diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000000..d4170e4e94 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,688 @@ +name: Automated Test Build + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + +jobs: + build-windows: + strategy: + fail-fast: false + matrix: + name: + - windows +# - windows-irrklang +# - windows-no-dxsdk + - windows-x64 +# - windows-2025 + include: + - name: windows + os: windows-2022 + vs: vs2022 + audiolib: miniaudio +# - name: windows-irrklang +# os: windows-2022 +# vs: vs2022 +# audiolib: irrklang +# - name: windows-no-dxsdk +# os: windows-2022 +# vs: vs2022 +# audiolib: miniaudio +# nodxsdk: true + - name: windows-x64 + os: windows-2022 + vs: vs2022 + audiolib: miniaudio + x64: true +# - name: windows-2025 +# os: windows-2025 +# vs: vs2025 # to be enabled after the release of Visual Studio 2025 +# audiolib: miniaudio + + runs-on: ${{ matrix.os }} + + steps: + - name: Checkout repository with submodules + uses: actions/checkout@v4 + with: + fetch-depth: 1 + submodules: true + + - name: Update submodules + run: | + cd ocgcore + git checkout master + git pull origin master + cd .. +# cd script +# git checkout master +# git pull origin master +# cd .. + + - name: Download premake + id: premake + uses: mercury233/action-cache-download-file@v1.0.0 + with: + url: https://github.com/premake/premake-core/releases/download/v5.0.0-beta7/premake-5.0.0-beta7-windows.zip + filename: premake5.zip + + - name: Extract premake + run: | + 7z x ${{ steps.premake.outputs.filepath }} + + - name: Download libevent + id: libevent + uses: mercury233/action-cache-download-file@v1.0.0 + with: + url: https://github.com/libevent/libevent/releases/download/release-2.1.12-stable/libevent-2.1.12-stable.tar.gz + filename: libevent.tar.gz + + - name: Extract libevent + run: | + tar xf ${{ steps.libevent.outputs.filepath }} + move libevent-2.1.12-stable event + + - name: Download freetype + id: freetype + uses: mercury233/action-cache-download-file@v1.0.0 + with: + url: https://downloads.sourceforge.net/freetype/freetype-2.13.3.tar.gz + + - name: Extract freetype + run: | + tar xf ${{ steps.freetype.outputs.filepath }} + move freetype-2.13.3 freetype + + - name: Download lua + id: lua + uses: mercury233/action-cache-download-file@v1.0.0 + with: + url: https://www.lua.org/ftp/lua-5.4.8.tar.gz + + - name: Extract lua + run: | + tar xf ${{ steps.lua.outputs.filepath }} + move lua-5.4.8 lua + + - name: Download sqlite + id: sqlite + uses: mercury233/action-cache-download-file@v1.0.0 + with: + url: https://www.sqlite.org/2025/sqlite-amalgamation-3500100.zip + + - name: Extract sqlite + run: | + 7z x ${{ steps.sqlite.outputs.filepath }} + move sqlite-amalgamation-3500100 sqlite3 + + - name: Download miniaudio + if: matrix.audiolib == 'miniaudio' + run: | + git clone --depth=1 -b 0.11.23 https://github.com/mackron/miniaudio + cd miniaudio + xcopy /Y extras\miniaudio_split\miniaudio.* . + cd .. + + - name: Download ogg + if: matrix.audiolib == 'miniaudio' + id: ogg + uses: mercury233/action-cache-download-file@v1.0.0 + with: + url: https://github.com/xiph/ogg/releases/download/v1.3.5/libogg-1.3.5.tar.gz + + - name: Extract ogg + if: matrix.audiolib == 'miniaudio' + run: | + tar xf ${{ steps.ogg.outputs.filepath }} + move libogg-1.3.5 miniaudio/external/ogg + + - name: Download opus + if: matrix.audiolib == 'miniaudio' + id: opus + uses: mercury233/action-cache-download-file@v1.0.0 + with: + url: https://github.com/xiph/opus/releases/download/v1.5.2/opus-1.5.2.tar.gz + + - name: Extract opus + if: matrix.audiolib == 'miniaudio' + run: | + tar xf ${{ steps.opus.outputs.filepath }} + move opus-1.5.2 miniaudio/external/opus + + - name: Download opusfile + if: matrix.audiolib == 'miniaudio' + id: opusfile + uses: mercury233/action-cache-download-file@v1.0.0 + with: + url: https://github.com/xiph/opusfile/releases/download/v0.12/opusfile-0.12.tar.gz + + - name: Extract opusfile + if: matrix.audiolib == 'miniaudio' + run: | + tar xf ${{ steps.opusfile.outputs.filepath }} + move opusfile-0.12 miniaudio/external/opusfile + + - name: Download vorbis + if: matrix.audiolib == 'miniaudio' + id: vorbis + uses: mercury233/action-cache-download-file@v1.0.0 + with: + url: https://github.com/xiph/vorbis/releases/download/v1.3.7/libvorbis-1.3.7.tar.gz + + - name: Extract vorbis + if: matrix.audiolib == 'miniaudio' + run: | + tar xf ${{ steps.vorbis.outputs.filepath }} + move libvorbis-1.3.7 miniaudio/external/vorbis + + - name: Download irrKlang + if: matrix.audiolib == 'irrklang' + id: irrKlang + uses: mercury233/action-cache-download-file@v1.0.0 + with: + url: https://www.ambiera.at/downloads/irrKlang-32bit-1.6.0.zip + + - name: Extract irrKlang + if: matrix.audiolib == 'irrklang' + run: | + 7z x ${{ steps.irrKlang.outputs.filepath }} + move irrKlang-1.6.0 irrKlang + + - name: Download irrlicht + run: | + git clone --depth=1 https://github.com/mercury233/irrlicht + + - name: Check DirectX SDK + if: matrix.nodxsdk != true + id: dxsdk + uses: actions/cache@v4 + with: + key: dxsdk + path: DXSDK + + - name: Download DirectX SDK + if: matrix.nodxsdk != true && steps.dxsdk.outputs.cache-hit != 'true' + id: dxsdk-download + uses: mercury233/action-cache-download-file@v1.0.0 + with: + url: https://download.microsoft.com/download/a/e/7/ae743f1f-632b-4809-87a9-aa1bb3458e31/DXSDK_Jun10.exe + + - name: Install DirectX SDK + if: matrix.nodxsdk != true && steps.dxsdk.outputs.cache-hit != 'true' + run: | + 7z x ${{ steps.dxsdk-download.outputs.filepath }} -aoa + + - name: Set DirectX SDK environment variable + if: matrix.nodxsdk != true + run: | + $dxsdkPath = Resolve-Path 'DXSDK' + "DXSDK_DIR=$($dxsdkPath.ProviderPath)\" | Out-File -FilePath $env:GITHUB_ENV -Append + + - name: Copy premake files + run: | + xcopy /E premake\* . + xcopy /E resource\* . + + - name: Use premake to generate Visual Studio solution + run: | + .\premake5.exe ${{ matrix.vs }} --audio-lib=${{ matrix.audiolib }} + + - name: Add msbuild to PATH + uses: microsoft/setup-msbuild@v2 + + - name: Build solution + run: | + MSBuild.exe build\YGOPro.sln /m /p:Configuration=Release /p:Platform=${{ matrix.x64 && 'x64' || 'Win32' }} + + - name: Upload build artifacts + uses: actions/upload-artifact@v4 + with: + name: YGOPro-${{ matrix.name }} + path: | + bin/release/x86/YGOPro.exe + bin/release/x64/YGOPro.exe + + build-linux: + strategy: + fail-fast: false + matrix: + name: + - ubuntu-22 + - ubuntu-24 + - ubuntu-static-link + include: + - name: ubuntu-22 + os: ubuntu-22.04 + premake-version: 5.0.0-beta4 + - name: ubuntu-24 + os: ubuntu-24.04 + premake-version: 5.0.0-beta7 + - name: ubuntu-static-link + os: ubuntu-22.04 + premake-version: 5.0.0-beta4 + static-link: true + + runs-on: ${{ matrix.os }} + + steps: + - name: Checkout repository with submodules + uses: actions/checkout@v4 + with: + fetch-depth: 1 + submodules: true + + - name: Update submodules + run: | + cd ocgcore + git checkout master + git pull origin master + cd .. +# cd script +# git checkout master +# git pull origin master +# cd .. + + - name: Install dependencies + run: | + sudo apt-get update + sudo apt-get install -y libgl1-mesa-dev libglu1-mesa-dev libxxf86vm-dev + + - name: Install dependencies (dynamic link) + if: matrix.static-link != true + run: | + sudo apt-get install -y libevent-dev libfreetype6-dev libsqlite3-dev libopusfile-dev libvorbis-dev + + - name: Download premake + id: premake + uses: mercury233/action-cache-download-file@v1.0.0 + with: + url: https://github.com/premake/premake-core/releases/download/v${{ matrix.premake-version }}/premake-${{ matrix.premake-version }}-linux.tar.gz + filename: premake5.tar.gz + + - name: Extract premake + run: | + tar xf ${{ steps.premake.outputs.filepath }} + chmod +x ./premake5 + + - name: Download libevent + if: matrix.static-link == true + id: libevent + uses: mercury233/action-cache-download-file@v1.0.0 + with: + url: https://github.com/libevent/libevent/releases/download/release-2.1.12-stable/libevent-2.1.12-stable.tar.gz + filename: libevent.tar.gz + + - name: Extract libevent + if: matrix.static-link == true + run: | + tar xf ${{ steps.libevent.outputs.filepath }} + mv libevent-2.1.12-stable event + + - name: Configure libevent + if: matrix.static-link == true + run: | + cd event + ./configure --disable-openssl --enable-static=yes --enable-shared=no + sed -f make-event-config.sed < config.h > ./include/event2/event-config.h + cd .. + + - name: Download freetype + if: matrix.static-link == true + id: freetype + uses: mercury233/action-cache-download-file@v1.0.0 + with: + url: https://downloads.sourceforge.net/freetype/freetype-2.13.3.tar.gz + + - name: Extract freetype + if: matrix.static-link == true + run: | + tar xf ${{ steps.freetype.outputs.filepath }} + mv freetype-2.13.3 freetype + + - name: Download lua + id: lua + uses: mercury233/action-cache-download-file@v1.0.0 + with: + url: https://www.lua.org/ftp/lua-5.4.8.tar.gz + + - name: Extract lua + run: | + tar xf ${{ steps.lua.outputs.filepath }} + mv lua-5.4.8 lua + + - name: Download sqlite + if: matrix.static-link == true + id: sqlite + uses: mercury233/action-cache-download-file@v1.0.0 + with: + url: https://www.sqlite.org/2025/sqlite-amalgamation-3500100.zip + + - name: Extract sqlite + if: matrix.static-link == true + run: | + 7z x ${{ steps.sqlite.outputs.filepath }} + mv sqlite-amalgamation-3500100 sqlite3 + + - name: Download miniaudio + run: | + git clone --depth=1 -b 0.11.23 https://github.com/mackron/miniaudio + cd miniaudio + cp extras/miniaudio_split/miniaudio.* . + cd .. + + - name: Download ogg + if: matrix.static-link == true + id: ogg + uses: mercury233/action-cache-download-file@v1.0.0 + with: + url: https://github.com/xiph/ogg/releases/download/v1.3.5/libogg-1.3.5.tar.gz + + - name: Extract ogg + if: matrix.static-link == true + run: | + tar xf ${{ steps.ogg.outputs.filepath }} + mv libogg-1.3.5 miniaudio/external/ogg + + - name: Configure ogg + if: matrix.static-link == true + run: | + cd miniaudio/external/ogg + ./configure + cd ../../.. + + - name: Download opus + if: matrix.static-link == true + id: opus + uses: mercury233/action-cache-download-file@v1.0.0 + with: + url: https://github.com/xiph/opus/releases/download/v1.5.2/opus-1.5.2.tar.gz + + - name: Extract opus + if: matrix.static-link == true + run: | + tar xf ${{ steps.opus.outputs.filepath }} + mv opus-1.5.2 miniaudio/external/opus + + - name: Download opusfile + if: matrix.static-link == true + id: opusfile + uses: mercury233/action-cache-download-file@v1.0.0 + with: + url: https://github.com/xiph/opusfile/releases/download/v0.12/opusfile-0.12.tar.gz + + - name: Extract opusfile + if: matrix.static-link == true + run: | + tar xf ${{ steps.opusfile.outputs.filepath }} + mv opusfile-0.12 miniaudio/external/opusfile + + - name: Download vorbis + if: matrix.static-link == true + id: vorbis + uses: mercury233/action-cache-download-file@v1.0.0 + with: + url: https://github.com/xiph/vorbis/releases/download/v1.3.7/libvorbis-1.3.7.tar.gz + + - name: Extract vorbis + if: matrix.static-link == true + run: | + tar xf ${{ steps.vorbis.outputs.filepath }} + mv libvorbis-1.3.7 miniaudio/external/vorbis + + - name: Download irrlicht + run: | + git clone --depth=1 https://github.com/mercury233/irrlicht + + - name: Copy premake files + run: | + cp -pr premake/* . + cp -pr resource/* . + + - name: Use premake to generate make files (apt packages) + if: matrix.static-link != true + run: | + ./premake5 gmake + + - name: Use premake to generate make files (static link) + if: matrix.static-link == true + run: | + ./premake5 gmake \ + --build-event \ + --build-freetype \ + --build-sqlite \ + --build-opus-vorbis + + - name: Make + run: | + cd build + make -j 4 config=release + cd .. + + - name: Upload build artifacts + uses: actions/upload-artifact@v4 + with: + name: YGOPro-${{ matrix.name }} + path: | + bin/release/YGOPro + + build-macos: + strategy: + fail-fast: false + matrix: + name: + - macos-15-intel + - macos-15-universal-static-link + - macos-15-arm +# - macos-15-intel-cross-compile-static-link + include: + - name: macos-15-intel + os: macos-15-intel + - name: macos-15-universal-static-link + os: macos-15 + cross-build-intel: true + cross-build-arm: true + static-link: true + - name: macos-15-arm + os: macos-15 +# - name: macos-15-intel-cross-compile-static-link +# os: macos-15 +# cross-build-intel: true +# static-link: true + + runs-on: ${{ matrix.os }} + + steps: + - name: Checkout repository with submodules + uses: actions/checkout@v4 + with: + fetch-depth: 1 + submodules: true + + - name: Update submodules + run: | + cd ocgcore + git checkout master + git pull origin master + cd .. +# cd script +# git checkout master +# git pull origin master +# cd .. + + - name: Install dependencies + if: matrix.static-link != true + run: | + brew install opus opusfile libvorbis +# brew install sqlite libx11 freetype libevent + + - name: Download premake + id: premake + uses: mercury233/action-cache-download-file@v1.0.0 + with: + url: https://github.com/premake/premake-core/releases/download/v5.0.0-beta7/premake-5.0.0-beta7-macosx.tar.gz + filename: premake5.tar.gz + + - name: Extract premake + run: | + tar xf ${{ steps.premake.outputs.filepath }} + chmod +x ./premake5 + + - name: Download libevent + if: matrix.static-link == true + id: libevent + uses: mercury233/action-cache-download-file@v1.0.0 + with: + url: https://github.com/libevent/libevent/releases/download/release-2.1.12-stable/libevent-2.1.12-stable.tar.gz + filename: libevent.tar.gz + + - name: Extract libevent + if: matrix.static-link == true + run: | + tar xf ${{ steps.libevent.outputs.filepath }} + mv libevent-2.1.12-stable event + + - name: Configure libevent + if: matrix.static-link == true + run: | + cd event + ./configure --disable-openssl --enable-static=yes --enable-shared=no + sed -f make-event-config.sed < config.h > ./include/event2/event-config.h + cd .. + + - name: Download freetype + if: matrix.static-link == true + id: freetype + uses: mercury233/action-cache-download-file@v1.0.0 + with: + url: https://downloads.sourceforge.net/freetype/freetype-2.13.3.tar.gz + + - name: Extract freetype + if: matrix.static-link == true + run: | + tar xf ${{ steps.freetype.outputs.filepath }} + mv freetype-2.13.3 freetype + + - name: Download lua + id: lua + uses: mercury233/action-cache-download-file@v1.0.0 + with: + url: https://www.lua.org/ftp/lua-5.4.8.tar.gz + + - name: Extract lua + run: | + tar xf ${{ steps.lua.outputs.filepath }} + mv lua-5.4.8 lua + + - name: Download sqlite + if: matrix.static-link == true + id: sqlite + uses: mercury233/action-cache-download-file@v1.0.0 + with: + url: https://www.sqlite.org/2025/sqlite-amalgamation-3500100.zip + + - name: Extract sqlite + if: matrix.static-link == true + run: | + 7z x ${{ steps.sqlite.outputs.filepath }} + mv sqlite-amalgamation-3500100 sqlite3 + + - name: Download miniaudio + run: | + git clone --depth=1 -b 0.11.23 https://github.com/mackron/miniaudio + cd miniaudio + cp extras/miniaudio_split/miniaudio.* . + cd .. + + - name: Download ogg + if: matrix.static-link == true + id: ogg + uses: mercury233/action-cache-download-file@v1.0.0 + with: + url: https://github.com/xiph/ogg/releases/download/v1.3.5/libogg-1.3.5.tar.gz + + - name: Extract ogg + if: matrix.static-link == true + run: | + tar xf ${{ steps.ogg.outputs.filepath }} + mv libogg-1.3.5 miniaudio/external/ogg + + - name: Download opus + if: matrix.static-link == true + id: opus + uses: mercury233/action-cache-download-file@v1.0.0 + with: + url: https://github.com/xiph/opus/releases/download/v1.5.2/opus-1.5.2.tar.gz + + - name: Extract opus + if: matrix.static-link == true + run: | + tar xf ${{ steps.opus.outputs.filepath }} + mv opus-1.5.2 miniaudio/external/opus + + - name: Download opusfile + if: matrix.static-link == true + id: opusfile + uses: mercury233/action-cache-download-file@v1.0.0 + with: + url: https://github.com/xiph/opusfile/releases/download/v0.12/opusfile-0.12.tar.gz + + - name: Extract opusfile + if: matrix.static-link == true + run: | + tar xf ${{ steps.opusfile.outputs.filepath }} + mv opusfile-0.12 miniaudio/external/opusfile + + - name: Download vorbis + if: matrix.static-link == true + id: vorbis + uses: mercury233/action-cache-download-file@v1.0.0 + with: + url: https://github.com/xiph/vorbis/releases/download/v1.3.7/libvorbis-1.3.7.tar.gz + + - name: Extract vorbis + if: matrix.static-link == true + run: | + tar xf ${{ steps.vorbis.outputs.filepath }} + mv libvorbis-1.3.7 miniaudio/external/vorbis + + - name: Download irrlicht + run: | + git clone --depth=1 https://github.com/mercury233/irrlicht + + - name: Copy premake files + run: | + cp -pr premake/* . + cp -pr resource/* . + + - name: Use premake to generate make files (Homebrew packages) + if: matrix.static-link != true + run: | + DYLD_LIBRARY_PATH=$(brew --prefix)/lib ./premake5 gmake + + - name: Use premake to generate make files (static link) + if: matrix.static-link == true + run: | + ./premake5 gmake ${{ matrix.cross-build-intel == true && '--mac-intel' || '' }} ${{ matrix.cross-build-arm == true && '--mac-arm' || '' }} \ + --build-event \ + --build-freetype \ + --build-sqlite \ + --build-opus-vorbis + + - name: Make + run: | + cd build + make -j 3 config=release + cd .. + + - name: Upload build artifacts + uses: actions/upload-artifact@v4 + with: + name: YGOPro-${{ matrix.name }} + path: | + bin/release/YGOPro diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000000..e92d0deca0 --- /dev/null +++ b/.gitignore @@ -0,0 +1,42 @@ +.DS_Store + +/deck +/expansions +/fonts +/icon +/pack +/pics +/replay +/single +/sound +!/sound/files.txt +/WindBot +/cards.cdb +/error.log +/bot.conf +/Bot.exe +/bot + +/ygopro +/ygopro.exe +/ygopro.app +/ikpMP3.dll +/irrKlang.dll + +/.vscode/ +/bin/ +/build +/obj/ +/event +/freetype +/irrlicht +/irrklang +/ikpmp3 +/lua +/miniaudio +/sqlite3 +/gframe/*.ico +/gframe/ygopro.rc +/gframe/ygopro.aps +/premake5 +/premake5.exe diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000000..7ad00cab16 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,6 @@ +[submodule "ocgcore"] + path = ocgcore + url = https://github.com/Fluorohydride/ygopro-core.git +[submodule "script"] + path = script + url = https://github.com/Fluorohydride/ygopro-scripts.git diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000000..d159169d10 --- /dev/null +++ b/LICENSE @@ -0,0 +1,339 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Lesser General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. diff --git a/README.md b/README.md new file mode 100644 index 0000000000..cd7b5e7129 --- /dev/null +++ b/README.md @@ -0,0 +1,64 @@ +## YGOPro +A script engine for "yu-gi-oh!" and sample gui + +[中文说明](https://github.com/Fluorohydride/ygopro/wiki/%E4%B8%AD%E6%96%87%E8%AF%B4%E6%98%8E) + +### Keys: +* ESC: Minimize the window. +* A: Holding down this button will let the system stop at every timing. +* S: Holding down this button will let the system skip every timing. +* D: Holding down this button will let the system stop at available timing. +* R: Fix the font glitch. +* F1~F4: Show the cards in your grave, banished zone, extra deck, xyz materials. +* F5~F8: Show the cards in your opponent's grave, banished zone, extra deck, xyz materials. + +### Color in card list: +#### Background: +* White = your card, Grey = your opponent's card + +#### Text: +Cards in deck, extra deck and banished zone: +* Black = face-up, Blue = face-down + +Xyz materials: +* Black = default, Blue = the owner of the xyz material is different from its controller + +### Sequence: +* Monster Zone: 1~5, starting from the left hand side. +* Spell & Trap Zone: 1~5, starting from the left hand side. +* Field Zone: 6 +* Pendulum Zone: 0~1, starting from the left hand side. +* The others: 1~n, starting from the bottom. + +### Deck edit page: +* All numeric textboxs: They support >, =, <, >=, <= signs. +* Card name: Search card names and texts by default, $foo will only search foo in card names, and @foo will search cards of "foo" archetype(due to translation, card name contains "foo" does not mean that card is "foo" card). + +### Command-line options: +* `-e foo.cdb`: Load foo.cdb as the extra database. +* `-n nickname`: Set the nickname. +* `-h 192.168.0.2`: Set the host to join in LAN mode. +* `-p 7911`: Set the port to join in LAN mode. +* `-w abc`: Set the password to join in LAN mode. +* `-d`: Enter the deck edit page. +* `-d deck`: If used along with `-j` it mean select the deck, or it will open the deck to edit. +* `-c`: Create host with default settings. +* `-j`: Join the host specified in above, or if absent, lasthost in system.conf file. +* `-r`: Enter the replay mode page. +* `-r replay.yrp`: Load the replay.yrp in replay mode. +* `-s`: Enter the single mode page. +* `-s puzzle.lua`: Load the puzzle.lua in single mode. +* `-k`: Keep when duel finished. See below. + +#### Note: +* `-c` `-j` `-e` `-r` `-s` shoule be the last parameter, because any parameters after it will get ignored. +* `-d` `-c` `-j` `-e` `-r` `-s` will make YGOPro automatically exit when the duel or deck editing is finished. This is useful for some launchers. If you want to keep it, add `-k` before them. +* `-d` `-r` `-s` support full path of file, or just filename. But remember deck filename should NOT have extension when replay and single filename MUST have extension. + +### Directories: +* pics: .jpg card images(177*254). +* script: .lua script files. +* textures: Other image files. +* deck: .ydk deck files. +* replay: .yrp replay files. +* expansions: *.cdb will be loaded as extra databases. diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt new file mode 100644 index 0000000000..e3dfcaf6c2 --- /dev/null +++ b/cmake/CMakeLists.txt @@ -0,0 +1,47 @@ +project (ygo) + +cmake_minimum_required (VERSION 3.8) + +if(NOT CMAKE_BUILD_TYPE) + message(STATUS "Setting build type to 'Debug' as none was specified.") + set(CMAKE_BUILD_TYPE Debug CACHE STRING "Choose the type of build." FORCE) + set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release" "MinSizeRel" "RelWithDebInfo") +endif() + +list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake") +list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/macros") + +set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) +set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) +set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) + +set(CMAKE_CXX_STANDARD 14) +set(CMAKE_CXX_STANDARD_REQUIRED ON) +set(CMAKE_CXX_EXTENSIONS OFF) + +include (AutoFiles) + +include (platform/settings) + +if (MSVC) + add_subdirectory (event) + add_subdirectory (freetype) + add_subdirectory (irrlicht) + add_subdirectory (sqlite3) + add_subdirectory (lua) +else () + find_package(LibEvent REQUIRED) + find_package(Freetype REQUIRED) + find_package(Irrlicht REQUIRED) + find_package(Sqlite REQUIRED) + find_package(Lua REQUIRED) + find_package(OpenGL REQUIRED) +endif () + +option(USE_IRRKLANG "Use irrKlang sound library" OFF) +if (USE_IRRKLANG) + set(IRRKLANG_DIR ${CMAKE_SOURCE_DIR}/irrKlang) +endif () + +add_subdirectory (ocgcore) +add_subdirectory (gframe) diff --git a/cmake/compiler/clang-compile.cmake b/cmake/compiler/clang-compile.cmake new file mode 100644 index 0000000000..295ef8fd9f --- /dev/null +++ b/cmake/compiler/clang-compile.cmake @@ -0,0 +1 @@ +include (compiler/gcc) diff --git a/cmake/compiler/gcc.cmake b/cmake/compiler/gcc.cmake new file mode 100644 index 0000000000..849cd5307d --- /dev/null +++ b/cmake/compiler/gcc.cmake @@ -0,0 +1,3 @@ +set (CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -D_DEBUG") +set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -D_DEBUG") +add_definitions ( "-fexceptions" "-fomit-frame-pointer" "-fno-strict-aliasing" "-Wno-format-security" ) diff --git a/cmake/compiler/icc.cmake b/cmake/compiler/icc.cmake new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/cmake/compiler/icc.cmake @@ -0,0 +1 @@ + diff --git a/cmake/compiler/mingw.cmake b/cmake/compiler/mingw.cmake new file mode 100644 index 0000000000..a354d58542 --- /dev/null +++ b/cmake/compiler/mingw.cmake @@ -0,0 +1 @@ +add_definitions ( "-static-libgcc" "-static-libstdc++" ) diff --git a/cmake/compiler/msvc.cmake b/cmake/compiler/msvc.cmake new file mode 100644 index 0000000000..7db1508288 --- /dev/null +++ b/cmake/compiler/msvc.cmake @@ -0,0 +1,6 @@ +add_definitions ( "-wd4996" "-D_CRT_SECURE_NO_WARNINGS" ) +add_definitions ( "-D_UNICODE" "-DUNICODE" "/utf-8" ) + +include (MSVCMultipleProcessCompile) +include (MSVCStaticRuntime) +include (MSVCJustMyCodeDebugging) diff --git a/cmake/macros/AutoFiles.cmake b/cmake/macros/AutoFiles.cmake new file mode 100644 index 0000000000..d2f205d42d --- /dev/null +++ b/cmake/macros/AutoFiles.cmake @@ -0,0 +1,32 @@ +function (AutoFiles _folder _base _pattern) + if (ARGC GREATER 3) + set(_exclude ${ARGN}) + else () + set(_exclude) + endif () + file (GLOB _files RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}/ ${_folder}/*) + set (folderFiles) + foreach (_fname ${_files}) + if (IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/${_fname}) + AutoFiles ("${_fname}" "${_base}" "${_pattern}" "${_exclude}") + elseif (_fname MATCHES ${_pattern}) + if(_exclude) + if (NOT _fname MATCHES ${_exclude}) + set(folderFiles ${folderFiles} ${_fname}) + endif () + else () + set(folderFiles ${folderFiles} ${_fname}) + endif () + endif () + endforeach () + + string(REPLACE "./" "" _folder2 ${_folder}) + string(REPLACE "/" "\\" _folder2 ${_folder2}) + if (_folder2 STREQUAL ".") + source_group(${_base} FILES ${folderFiles}) + else () + source_group(${_base}\\${_folder2} FILES ${folderFiles}) + endif () + + set(AUTO_FILES_RESULT ${AUTO_FILES_RESULT} ${folderFiles} PARENT_SCOPE) +endfunction () diff --git a/cmake/macros/FindDL.cmake b/cmake/macros/FindDL.cmake new file mode 100644 index 0000000000..2f67a798d7 --- /dev/null +++ b/cmake/macros/FindDL.cmake @@ -0,0 +1,27 @@ +# - Try to find the dl library +# Once done this will define +# +# DL_FOUND - System has libdl +# DL_LIBRARIES - The libraries needed to use libdl +# DL_DEFINITIONS - Compiler switches required for using libdl + +FIND_PATH(DL_INCLUDE_DIR dlfcn.h + PATH_SUFFIXES include + PATHS + ~/Library/Frameworks + /Library/Frameworks + /opt/local +) + +FIND_LIBRARY(DL_LIBRARIES NAMES dl + PATH_SUFFIXES lib64 lib + PATHS + ~/Library/Frameworks + /Library/Frameworks + /opt/local +) + +INCLUDE(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(libdl DEFAULT_MSG DL_LIBRARIES DL_INCLUDE_DIR) + +MARK_AS_ADVANCED(DL_INCLUDE_DIR DL_LIBRARIES) diff --git a/cmake/macros/FindFreetype.cmake b/cmake/macros/FindFreetype.cmake new file mode 100644 index 0000000000..acd7ab604b --- /dev/null +++ b/cmake/macros/FindFreetype.cmake @@ -0,0 +1,38 @@ +# - Try to find the Lib library +# Once done this will define +# +# FREETYPE_FOUND - System has freetype +# FREETYPE_INCLUDE_DIR - The freetype include directory +# FREETYPE_LIBRARIES - The libraries needed to use freetype +# FREETYPE_DEFINITIONS - Compiler switches required for using freetype + +SET(FREETYPE_DEFINITIONS ${PC_FREETYPE_CFLAGS_OTHER}) + +FIND_PATH(FREETYPE_INCLUDE_DIR ft2build.h + HINTS + ${PC_FREETYPE_INCLUDEDIR} + ${PC_FREETYPE_INCLUDE_DIRS} + PATH_SUFFIXES freetype2 + PATHS + ~/Library/Frameworks + /Library/Frameworks + /opt/local +) + +FIND_LIBRARY(FREETYPE_LIBRARIES NAMES freetype + HINTS + ${PC_FREETYPE_LIBDIR} + ${PC_FREETYPE_LIBRARY_DIRS} + PATH_SUFFIXES lib64 lib + PATHS + ~/Library/Frameworks + /Library/Frameworks + /opt/local +) + +SET(FREETYPE_LIBRARIES ${FREETYPE_LIBRARIES}) + +INCLUDE(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(FREETYPE DEFAULT_MSG FREETYPE_LIBRARIES FREETYPE_INCLUDE_DIR) + +MARK_AS_ADVANCED(FREETYPE_INCLUDE_DIR FREETYPE_LIBRARIES) diff --git a/cmake/macros/FindIrrlicht.cmake b/cmake/macros/FindIrrlicht.cmake new file mode 100644 index 0000000000..14e0177eca --- /dev/null +++ b/cmake/macros/FindIrrlicht.cmake @@ -0,0 +1,42 @@ +# - Try to find the Lib library +# Once done this will define +# +# IRRLICHT_FOUND - System has IRRLICHT +# IRRLICHT_INCLUDE_DIR - The IRRLICHT include directory +# IRRLICHT_LIBRARIES - The libraries needed to use IRRLICHT +# IRRLICHT_DEFINITIONS - Compiler switches required for using IRRLICHT + + +# use pkg-config to get the directories and then use these values +# in the FIND_PATH() and FIND_LIBRARY() calls +#FIND_PACKAGE(PkgConfig) +#PKG_SEARCH_MODULE(PC_IRRLICHT Irrlicht) + +SET(IRRLICHT_DEFINITIONS ${PC_IRRLICHT_CFLAGS_OTHER}) + +FIND_PATH(IRRLICHT_INCLUDE_DIR irrlicht.h + HINTS + ${PC_IRRLICHT_INCLUDEDIR} + ${PC_IRRLICHT_INCLUDE_DIRS} + PATH_SUFFIXES include include/irrlicht + PATHS + ~/Library/Frameworks + /Library/Frameworks + /opt/local +) + +FIND_LIBRARY(IRRLICHT_LIBRARIES NAMES Irrlicht irrlicht + HINTS + ${PC_IRRLICHT_LIBDIR} + ${PC_IRRLICHT_LIBRARY_DIRS} + PATH_SUFFIXES lib64 lib + PATHS + ~/Library/Frameworks + /Library/Frameworks + /opt/local +) + +INCLUDE(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(Irrlicht DEFAULT_MSG IRRLICHT_LIBRARIES IRRLICHT_INCLUDE_DIR) + +MARK_AS_ADVANCED(IRRLICHT_INCLUDE_DIR IRRLICHT_LIBRARIES) diff --git a/cmake/macros/FindLibEvent.cmake b/cmake/macros/FindLibEvent.cmake new file mode 100644 index 0000000000..d2749c519a --- /dev/null +++ b/cmake/macros/FindLibEvent.cmake @@ -0,0 +1,54 @@ +# - Try to find the Lib library +# Once done this will define +# +# LIBEVENT_FOUND - System has Libevent +# LIBEVENT_INCLUDE_DIR - The Libevent include directory +# LIBEVENT_LIBRARIES - The libraries needed to use Libevent +# LIBEVENT_DEFINITIONS - Compiler switches required for using Libevent + + +# use pkg-config to get the directories and then use these values +# in the FIND_PATH() and FIND_LIBRARY() calls +#FIND_PACKAGE(PkgConfig) +#PKG_SEARCH_MODULE(PC_LIBEVENT event) + +SET(LIBEVENT_DEFINITIONS ${PC_LIBEVENT_CFLAGS_OTHER}) + +FIND_PATH(LIBEVENT_INCLUDE_DIR event2/event.h + HINTS + ${PC_LIBEVENT_INCLUDEDIR} + ${PC_LIBEVENT_INCLUDE_DIRS} + PATH_SUFFIXES include + PATHS + ~/Library/Frameworks + /Library/Frameworks + /opt/local +) + +FIND_LIBRARY(LIBEVENT_LIBRARIES NAMES event + HINTS + ${PC_LIBEVENT_LIBDIR} + ${PC_LIBEVENT_LIBRARY_DIRS} + PATH_SUFFIXES lib64 lib + PATHS + ~/Library/Frameworks + /Library/Frameworks + /opt/local +) + +FIND_LIBRARY(LIBEVENT_LIBRARIES_PTHREADS NAMES event_pthreads + HINTS + ${PC_LIBEVENT_LIBDIR} + ${PC_LIBEVENT_LIBRARY_DIRS} + PATH_SUFFIXES lib64 lib + PATHS + ~/Library/Frameworks + /Library/Frameworks + /opt/local +) +SET(LIBEVENT_LIBRARIES ${LIBEVENT_LIBRARIES} ${LIBEVENT_LIBRARIES_PTHREADS}) + +INCLUDE(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(LibEvent DEFAULT_MSG LIBEVENT_LIBRARIES LIBEVENT_INCLUDE_DIR) + +MARK_AS_ADVANCED(LIBEVENT_INCLUDE_DIR LIBEVENT_LIBRARIES) diff --git a/cmake/macros/FindLua.cmake b/cmake/macros/FindLua.cmake new file mode 100644 index 0000000000..e6265214c1 --- /dev/null +++ b/cmake/macros/FindLua.cmake @@ -0,0 +1,80 @@ +# Locate Lua library +# This module defines +# LUA52_FOUND, if false, do not try to link to Lua +# LUA_LIBRARIES +# LUA_INCLUDE_DIR, where to find lua.h +# LUA_VERSION_STRING, the version of Lua found (since CMake 2.8.8) +# +# Note that the expected include convention is +# #include "lua.h" +# and not +# #include +# This is because, the lua location is not standardized and may exist +# in locations other than lua/ + +#============================================================================= +# Copyright 2007-2009 Kitware, Inc. +# +# Distributed under the OSI-approved BSD License (the "License"); +# see accompanying file Copyright.txt for details. +# +# This software is distributed WITHOUT ANY WARRANTY; without even the +# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the License for more information. +#============================================================================= +# (To distribute this file outside of CMake, substitute the full +# License text for the above reference.) + +FIND_PATH(LUA_INCLUDE_DIR lua.h + HINTS + $ENV{LUA_DIR} + PATH_SUFFIXES include/lua53 include/lua5.3 include/lua include + PATHS + ~/Library/Frameworks + /Library/Frameworks + /sw # Fink + /opt/local # DarwinPorts + /opt/csw # Blastwave + /opt +) + +FIND_LIBRARY(LUA_LIBRARY + NAMES lua53-c++ lua5.3-c++ lua-5.3-c++ lua-c++ + HINTS + $ENV{LUA_DIR} + PATH_SUFFIXES lib64 lib + PATHS + ~/Library/Frameworks + /Library/Frameworks + /sw + /opt/local + /opt/csw + /opt +) + +IF(LUA_LIBRARY) + # include the math library for Unix + IF(UNIX AND NOT APPLE) + FIND_LIBRARY(LUA_MATH_LIBRARY m) + SET( LUA_LIBRARIES "${LUA_LIBRARY};${LUA_MATH_LIBRARY}" CACHE STRING "Lua Libraries") + # For Windows and Mac, don't need to explicitly include the math library + ELSE(UNIX AND NOT APPLE) + SET( LUA_LIBRARIES "${LUA_LIBRARY}" CACHE STRING "Lua Libraries") + ENDIF(UNIX AND NOT APPLE) +ENDIF(LUA_LIBRARY) + +IF(LUA_INCLUDE_DIR AND EXISTS "${LUA_INCLUDE_DIR}/lua.h") + FILE(STRINGS "${LUA_INCLUDE_DIR}/lua.h" lua_version_str REGEX "^#define[ \t]+LUA_RELEASE[ \t]+\"Lua .+\"") + + STRING(REGEX REPLACE "^#define[ \t]+LUA_RELEASE[ \t]+\"Lua ([^\"]+)\".*" "\\1" LUA_VERSION_STRING "${lua_version_str}") + UNSET(lua_version_str) +ENDIF() + +INCLUDE(FindPackageHandleStandardArgs) +# handle the QUIETLY and REQUIRED arguments and set LUA_FOUND to TRUE if +# all listed variables are TRUE +FIND_PACKAGE_HANDLE_STANDARD_ARGS(Lua + REQUIRED_VARS LUA_LIBRARIES LUA_INCLUDE_DIR + VERSION_VAR LUA_VERSION_STRING) + +MARK_AS_ADVANCED(LUA_INCLUDE_DIR LUA_LIBRARIES LUA_LIBRARY LUA_MATH_LIBRARY) diff --git a/cmake/macros/FindSqlite.cmake b/cmake/macros/FindSqlite.cmake new file mode 100644 index 0000000000..6d5c8cf090 --- /dev/null +++ b/cmake/macros/FindSqlite.cmake @@ -0,0 +1,38 @@ +# - Try to find the Lib library +# Once done this will define +# +# SQLITE_FOUND - System has sqlite +# SQLITE_INCLUDE_DIR - The sqlite include directory +# SQLITE_LIBRARIES - The libraries needed to use sqlite +# SQLITE_DEFINITIONS - Compiler switches required for using sqlite + +SET(SQLITE_DEFINITIONS ${PC_SQLITE_CFLAGS_OTHER}) + +FIND_PATH(SQLITE_INCLUDE_DIR sqlite3.h + HINTS + ${PC_SQLITE_INCLUDEDIR} + ${PC_SQLITE_INCLUDE_DIRS} + PATH_SUFFIXES include + PATHS + ~/Library/Frameworks + /Library/Frameworks + /opt/local +) + +FIND_LIBRARY(SQLITE_LIBRARIES NAMES sqlite3 + HINTS + ${PC_SQLITE_LIBDIR} + ${PC_SQLITE_LIBRARY_DIRS} + PATH_SUFFIXES lib64 lib + PATHS + ~/Library/Frameworks + /Library/Frameworks + /opt/local +) + +SET(SQLITE_LIBRARIES ${SQLITE_LIBRARIES}) + +INCLUDE(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(SQLITE DEFAULT_MSG SQLITE_LIBRARIES SQLITE_INCLUDE_DIR) + +MARK_AS_ADVANCED(SQLITE_INCLUDE_DIR SQLITE_LIBRARIES) diff --git a/cmake/macros/ListCombinations.cmake b/cmake/macros/ListCombinations.cmake new file mode 100644 index 0000000000..4321f624a8 --- /dev/null +++ b/cmake/macros/ListCombinations.cmake @@ -0,0 +1,53 @@ +# - Combine lists of prefixes and suffixes in all combinations +# +# list_combinations(var PREFIXES listitems... SUFFIXES listitems...) - +# where var is the name of your desired output variable and PREFIXES +# and SUFFIXES are special arguments that indicate the start of your +# list of prefixes or suffixes respectively. +# +# Original Author: +# 2009-2010 Ryan Pavlik +# http://academic.cleardefinition.com +# Iowa State University HCI Graduate Program/VRAC +# +# Copyright Iowa State University 2009-2010. +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + +if(__list_combinations) + return() +endif() +set(__list_combinations YES) + +function(list_combinations var) + # Parse arguments + set(_prefixes) + set(_suffixes) + set(_nowhere) + set(_curdest _nowhere) + foreach(_element ${ARGN}) + if("${_element}" STREQUAL "PREFIXES") + set(_curdest _prefixes) + elseif("${_element}" STREQUAL "SUFFIXES") + set(_curdest _suffixes) + else() + list(APPEND ${_curdest} "${_element}") + endif() + endforeach() + if(_nowhere) + message(STATUS "_prefixes ${_prefixes}") + message(STATUS "_prefixes ${_suffixes}") + message(STATUS "_prefixes ${_nowhere}") + message(FATAL_ERROR + "Syntax error in use of ${CMAKE_CURRENT_LIST_FILE}") + endif() + + foreach(_prefix ${_prefixes}) + foreach(_suffix ${_suffixes}) + list(APPEND _out "${_prefix}${_suffix}") + endforeach() + endforeach() + + set(${var} "${_out}" PARENT_SCOPE) +endfunction() diff --git a/cmake/macros/MSVCJustMyCodeDebugging.cmake b/cmake/macros/MSVCJustMyCodeDebugging.cmake new file mode 100644 index 0000000000..4a1fd951e9 --- /dev/null +++ b/cmake/macros/MSVCJustMyCodeDebugging.cmake @@ -0,0 +1,23 @@ +# - Enable Just My Code debugging on MSVC +# +# include(MSVCJustMyCodeDebugging) +# +# Requires these CMake modules: +# ListCombinations.cmake +# +# The cmake property VS_JUST_MY_CODE_DEBUGGING introduced in CMake 3.15 +# also add /JMC to Release configuration, which is inappropriate + +if(MSVC AND NOT "${MSVC_VERSION}" LESS 1918) + # Only available in VS 2017 15.8 and newer + include(ListCombinations) + list_combinations(_varnames + PREFIXES + CMAKE_CXX_FLAGS_ + SUFFIXES + DEBUG + RELWITHDEBINFO) + foreach(_var ${_varnames}) + set(${_var} "${${_var}} /JMC") + endforeach() +endif() diff --git a/cmake/macros/MSVCMultipleProcessCompile.cmake b/cmake/macros/MSVCMultipleProcessCompile.cmake new file mode 100644 index 0000000000..aad4eabded --- /dev/null +++ b/cmake/macros/MSVCMultipleProcessCompile.cmake @@ -0,0 +1,31 @@ +# - Compile with multiple processes on MSVC +# +# include(MSVCMultipleProcessCompile) +# +# Requires these CMake modules: +# ListCombinations.cmake +# +# Original Author: +# 2009-2010 Ryan Pavlik +# http://academic.cleardefinition.com +# Iowa State University HCI Graduate Program/VRAC +# +# Copyright Iowa State University 2009-2010. +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + +if(MSVC AND NOT "${MSVC_VERSION}" LESS 1400) + # Only available in VS 2005 and newer + string(TOUPPER "${CMAKE_CONFIGURATION_TYPES}" _conftypesUC) + include(ListCombinations) + list_combinations(_varnames + PREFIXES + CMAKE_C_FLAGS_ + CMAKE_CXX_FLAGS_ + SUFFIXES + ${_conftypesUC}) + foreach(_var ${_varnames}) + set(${_var} "${${_var}} /MP") + endforeach() +endif() diff --git a/cmake/macros/MSVCStaticRuntime.cmake b/cmake/macros/MSVCStaticRuntime.cmake new file mode 100644 index 0000000000..e4ceea6f92 --- /dev/null +++ b/cmake/macros/MSVCStaticRuntime.cmake @@ -0,0 +1,33 @@ +# - Modify compile flags to use the static runtimes of MSVC +# +# include(MSVCStaticRuntime) +# +# Requires these CMake modules: +# ListCombinations.cmake +# +# Original Author: +# 2009-2010 Ryan Pavlik +# http://academic.cleardefinition.com +# Iowa State University HCI Graduate Program/VRAC +# +# Copyright Iowa State University 2009-2010. +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + +if(MSVC) + string(TOUPPER "${CMAKE_CONFIGURATION_TYPES}" _conftypesUC) + include(ListCombinations) + list_combinations(_varnames + PREFIXES + CMAKE_C_FLAGS_ + CMAKE_CXX_FLAGS_ + SUFFIXES + ${_conftypesUC}) + foreach(_var ${_varnames}) + string(REPLACE "/MDd" "/MTd" ${_var} "${${_var}}") + string(REPLACE "/MD" "/MT" ${_var} "${${_var}}") + endforeach() +endif() + +set(Boost_USE_STATIC_LIBS ON) diff --git a/cmake/platform/apple.cmake b/cmake/platform/apple.cmake new file mode 100644 index 0000000000..302f0c074d --- /dev/null +++ b/cmake/platform/apple.cmake @@ -0,0 +1 @@ +add_definitions ( "-DLUA_USE_MACOSX" ) diff --git a/cmake/platform/common.cmake b/cmake/platform/common.cmake new file mode 100644 index 0000000000..4cf72c6742 --- /dev/null +++ b/cmake/platform/common.cmake @@ -0,0 +1 @@ +add_definitions ( "-DLUA_USE_POSIX" ) diff --git a/cmake/platform/linux.cmake b/cmake/platform/linux.cmake new file mode 100644 index 0000000000..5a4931dbfc --- /dev/null +++ b/cmake/platform/linux.cmake @@ -0,0 +1 @@ +add_definitions ( "-DLUA_USE_LINUX" ) diff --git a/cmake/platform/settings.cmake b/cmake/platform/settings.cmake new file mode 100644 index 0000000000..078feca96c --- /dev/null +++ b/cmake/platform/settings.cmake @@ -0,0 +1,13 @@ +if(CMAKE_SIZEOF_VOID_P MATCHES 8) + set(PLATFORM 64) + MESSAGE(STATUS "Detected 64-bit platform") +else() + set(PLATFORM 32) + MESSAGE(STATUS "Detected 32-bit platform") +endif() + +if(WIN32) + include(platform/win) +elseif(UNIX) + include(platform/unix) +endif() diff --git a/cmake/platform/unix.cmake b/cmake/platform/unix.cmake new file mode 100644 index 0000000000..6b28a8aaf5 --- /dev/null +++ b/cmake/platform/unix.cmake @@ -0,0 +1,21 @@ +if (APPLE) + include (platform/apple) + if ("${CMAKE_GENERATOR}" MATCHES "Xcode") + include (platform/xcode) + endif () +elseif (CMAKE_SYSTEM MATCHES Linux) + include (platform/linux) +else () + include (platform/common) +endif () + +if(CMAKE_C_COMPILER MATCHES "icc") + include(compiler/icc) +elseif(CMAKE_C_COMPILER MATCHES "clang") + include(compiler/clang-compile) +elseif(CMAKE_C_COMPILER MATCHES "cc") + include(compiler/gcc) +endif() + +find_package(Threads) +find_package(DL) diff --git a/cmake/platform/win.cmake b/cmake/platform/win.cmake new file mode 100644 index 0000000000..c7c89f0c99 --- /dev/null +++ b/cmake/platform/win.cmake @@ -0,0 +1,10 @@ +if ( MSVC ) + include(compiler/msvc) +elseif ( MINGW ) + if(CMAKE_C_COMPILER MATCHES "clang") + include(compiler/clang) + elseif(CMAKE_C_COMPILER MATCHES "cc") + include(compiler/gcc) + endif() + include(compiler/mingw) +endif() diff --git a/cmake/platform/xcode.cmake b/cmake/platform/xcode.cmake new file mode 100644 index 0000000000..745a404bf3 --- /dev/null +++ b/cmake/platform/xcode.cmake @@ -0,0 +1,2 @@ +set(CMAKE_XCODE_ATTRIBUTE_GCC_VERSION "com.apple.compilers.llvm.clang.1_0") +set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LIBRARY "libc++") diff --git a/gframe/CGUIButton.h b/gframe/CGUIButton.h deleted file mode 100644 index d40a529017..0000000000 --- a/gframe/CGUIButton.h +++ /dev/null @@ -1,143 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __C_GUI_BUTTON_H_INCLUDED__ -#define __C_GUI_BUTTON_H_INCLUDED__ - -#include "IrrCompileConfig.h" -#ifdef _IRR_COMPILE_WITH_GUI_ - -#include "IGUIButton.h" -#include "IGUISpriteBank.h" -#include "SColor.h" - -namespace irr -{ -namespace gui -{ - - class CGUIButton : public IGUIButton - { - public: - - //! constructor - CGUIButton(IGUIEnvironment* environment, IGUIElement* parent, - s32 id, core::rect rectangle, bool noclip=false); - - //! destructor - virtual ~CGUIButton(); - - //! called if an event happened. - virtual bool OnEvent(const SEvent& event); - - //! draws the element and its children - virtual void draw(); - - //! sets another skin independent font. if this is set to zero, the button uses the font of the skin. - virtual void setOverrideFont(IGUIFont* font=0); - - //! Gets the override font (if any) - virtual IGUIFont* getOverrideFont() const; - - //! Get the font which is used right now for drawing - virtual IGUIFont* getActiveFont() const; - - //! Sets an image which should be displayed on the button when it is in normal state. - virtual void setImage(video::ITexture* image=0); - - //! Sets an image which should be displayed on the button when it is in normal state. - virtual void setImage(video::ITexture* image, const core::rect& pos); - - //! Sets an image which should be displayed on the button when it is in pressed state. - virtual void setPressedImage(video::ITexture* image=0); - - //! Sets an image which should be displayed on the button when it is in pressed state. - virtual void setPressedImage(video::ITexture* image, const core::rect& pos); - - //! Sets the sprite bank used by the button - virtual void setSpriteBank(IGUISpriteBank* bank=0); - - //! Sets the animated sprite for a specific button state - /** \param index: Number of the sprite within the sprite bank, use -1 for no sprite - \param state: State of the button to set the sprite for - \param index: The sprite number from the current sprite bank - \param color: The color of the sprite - */ - virtual void setSprite(EGUI_BUTTON_STATE state, s32 index, - video::SColor color=video::SColor(255,255,255,255), bool loop=false); - - //! Sets if the button should behave like a push button. Which means it - //! can be in two states: Normal or Pressed. With a click on the button, - //! the user can change the state of the button. - virtual void setIsPushButton(bool isPushButton=true); - - //! Checks whether the button is a push button - virtual bool isPushButton() const; - - //! Sets the pressed state of the button if this is a pushbutton - virtual void setPressed(bool pressed=true); - - //! Returns if the button is currently pressed - virtual bool isPressed() const; - - //! Sets if the button should use the skin to draw its border - virtual void setDrawBorder(bool border=true); - - //! Checks if the button face and border are being drawn - virtual bool isDrawingBorder() const; - - //! Sets if the alpha channel should be used for drawing images on the button (default is false) - virtual void setUseAlphaChannel(bool useAlphaChannel=true); - - //! Checks if the alpha channel should be used for drawing images on the button - virtual bool isAlphaChannelUsed() const; - - //! Sets if the button should scale the button images to fit - virtual void setScaleImage(bool scaleImage=true); - - //! Checks whether the button scales the used images - virtual bool isScalingImage() const; - - //! Writes attributes of the element. - virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options) const; - - //! Reads attributes of the element - virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options); - - protected: - - struct ButtonSprite - { - s32 Index; - video::SColor Color; - bool Loop; - }; - - ButtonSprite ButtonSprites[EGBS_COUNT]; - - IGUISpriteBank* SpriteBank; - IGUIFont* OverrideFont; - - video::ITexture* Image; - video::ITexture* PressedImage; - - core::rect ImageRect; - core::rect PressedImageRect; - - u32 ClickTime, HoverTime, FocusTime; - - bool IsPushButton; - bool Pressed; - bool UseAlphaChannel; - bool DrawBorder; - bool ScaleImage; - }; - -} // end namespace gui -} // end namespace irr - -#endif // _IRR_COMPILE_WITH_GUI_ - -#endif // __C_GUI_BUTTON_H_INCLUDED__ - diff --git a/gframe/CGUIImageButton.cpp b/gframe/CGUIImageButton.cpp index 6f61024e30..8553871b24 100644 --- a/gframe/CGUIImageButton.cpp +++ b/gframe/CGUIImageButton.cpp @@ -1,14 +1,21 @@ -#ifdef _MSC_VER -#pragma warning(disable: 4244) -#endif +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h #include "CGUIImageButton.h" +#ifdef _IRR_COMPILE_WITH_GUI_ + +#include +#include +#include +#include +#include namespace irr { namespace gui { void Draw2DImageRotation(video::IVideoDriver* driver, video::ITexture* image, core::rect sourceRect, - core::position2d position, core::position2d rotationPoint, f32 rotation, core::vector2df scale, bool useAlphaChannel, video::SColor color) { + core::vector2d position, core::vector2d rotationPoint, f32 rotation, core::vector2df scale, bool useAlphaChannel, video::SColor color) { irr::video::SMaterial material; irr::core::matrix4 oldProjMat = driver->getTransform(irr::video::ETS_PROJECTION); driver->setTransform(irr::video::ETS_PROJECTION, irr::core::matrix4()); @@ -56,7 +63,7 @@ void Draw2DImageRotation(video::IVideoDriver* driver, video::ITexture* image, co driver->setTransform(irr::video::ETS_VIEW, oldViewMat); } void Draw2DImageQuad(video::IVideoDriver* driver, video::ITexture* image, core::rect sourceRect, - core::position2d corner[4], bool useAlphaChannel, video::SColor color) { + core::vector2d corner[4], bool useAlphaChannel, video::SColor color) { irr::video::SMaterial material; irr::core::matrix4 oldProjMat = driver->getTransform(irr::video::ETS_PROJECTION); driver->setTransform(irr::video::ETS_PROJECTION, irr::core::matrix4()); @@ -94,24 +101,220 @@ void Draw2DImageQuad(video::IVideoDriver* driver, video::ITexture* image, core:: driver->setTransform(irr::video::ETS_PROJECTION, oldProjMat); driver->setTransform(irr::video::ETS_VIEW, oldViewMat); } -CGUIImageButton::CGUIImageButton(IGUIEnvironment* environment, IGUIElement* parent, s32 id, core::rect rectangle) - : CGUIButton(environment, parent, id, rectangle) { - isDrawImage = true; - imageRotation = 0.0f; - imageScale = core::vector2df(1.0f, 1.0f); -} CGUIImageButton* CGUIImageButton::addImageButton(IGUIEnvironment *env, const core::rect& rectangle, IGUIElement* parent, s32 id) { CGUIImageButton* button = new CGUIImageButton(env, parent ? parent : 0, id, rectangle); button->drop(); return button; } +//! constructor +CGUIImageButton::CGUIImageButton(IGUIEnvironment* environment, IGUIElement* parent, + s32 id, core::rect rectangle, bool noclip) + : IGUIButton(environment, parent, id, rectangle), + SpriteBank(0), OverrideFont(0), Image(0), PressedImage(0), + IsPushButton(false), Pressed(false), + UseAlphaChannel(false), DrawBorder(true), ScaleImage(false) { +#ifdef _DEBUG + setDebugName("CGUIImageButton"); +#endif + setNotClipped(noclip); + + // Initialize the sprites. + for (u32 i = 0; i < EGBS_COUNT; ++i) + ButtonSprites[i].Index = -1; + + // This element can be tabbed. + setTabStop(true); + setTabOrder(-1); + isDrawImage = true; + isFixedSize = false; + imageRotation = 0.0f; + imageScale = core::vector2df(1.0f, 1.0f); + imageSize = core::dimension2di(rectangle.getWidth(), rectangle.getHeight()); +} +//! destructor +CGUIImageButton::~CGUIImageButton() +{ + if (OverrideFont) + OverrideFont->drop(); + + if (Image) + Image->drop(); + + if (PressedImage) + PressedImage->drop(); + + if (SpriteBank) + SpriteBank->drop(); +} + + +//! Sets if the images should be scaled to fit the button +void CGUIImageButton::setScaleImage(bool scaleImage) +{ + ScaleImage = scaleImage; +} + + +//! Returns whether the button scale the used images +bool CGUIImageButton::isScalingImage() const +{ + _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; + return ScaleImage; +} + + +//! Sets if the button should use the skin to draw its border +void CGUIImageButton::setDrawBorder(bool border) +{ + DrawBorder = border; +} + + +void CGUIImageButton::setSpriteBank(IGUISpriteBank* sprites) +{ + if (sprites) + sprites->grab(); + + if (SpriteBank) + SpriteBank->drop(); + + SpriteBank = sprites; +} + + +void CGUIImageButton::setSprite(EGUI_BUTTON_STATE state, s32 index, video::SColor color, bool loop) +{ + if (SpriteBank) + { + ButtonSprites[(u32)state].Index = index; + ButtonSprites[(u32)state].Color = color; + ButtonSprites[(u32)state].Loop = loop; + } + else + { + ButtonSprites[(u32)state].Index = -1; + } +} + + +//! called if an event happened. +bool CGUIImageButton::OnEvent(const SEvent& event) +{ + if (!isEnabled()) + return IGUIElement::OnEvent(event); + + switch (event.EventType) + { + case EET_KEY_INPUT_EVENT: + if (event.KeyInput.PressedDown && + (event.KeyInput.Key == KEY_RETURN || event.KeyInput.Key == KEY_SPACE)) + { + if (!IsPushButton) + setPressed(true); + else + setPressed(!Pressed); + + return true; + } + if (Pressed && !IsPushButton && event.KeyInput.PressedDown && event.KeyInput.Key == KEY_ESCAPE) + { + setPressed(false); + return true; + } + else + if (!event.KeyInput.PressedDown && Pressed && + (event.KeyInput.Key == KEY_RETURN || event.KeyInput.Key == KEY_SPACE)) + { + + if (!IsPushButton) + setPressed(false); + + if (Parent) + { + SEvent newEvent; + newEvent.EventType = EET_GUI_EVENT; + newEvent.GUIEvent.Caller = this; + newEvent.GUIEvent.Element = 0; + newEvent.GUIEvent.EventType = EGET_BUTTON_CLICKED; + Parent->OnEvent(newEvent); + } + return true; + } + break; + case EET_GUI_EVENT: + if (event.GUIEvent.Caller == this) + { + if (event.GUIEvent.EventType == EGET_ELEMENT_FOCUS_LOST) + { + if (!IsPushButton) + setPressed(false); + } + } + break; + case EET_MOUSE_INPUT_EVENT: + if (event.MouseInput.Event == EMIE_LMOUSE_PRESSED_DOWN) + { + if (Environment->hasFocus(this) && + !AbsoluteClippingRect.isPointInside(core::vector2d(event.MouseInput.X, event.MouseInput.Y))) + { + Environment->removeFocus(this); + return false; + } + + if (!IsPushButton) + setPressed(true); + + Environment->setFocus(this); + return true; + } + else + if (event.MouseInput.Event == EMIE_LMOUSE_LEFT_UP) + { + bool wasPressed = Pressed; + + if (!AbsoluteClippingRect.isPointInside(core::vector2d(event.MouseInput.X, event.MouseInput.Y))) + { + if (!IsPushButton) + setPressed(false); + return true; + } + + if (!IsPushButton) + setPressed(false); + else + { + setPressed(!Pressed); + } + + if ((!IsPushButton && wasPressed && Parent) || + (IsPushButton && wasPressed != Pressed)) + { + SEvent newEvent; + newEvent.EventType = EET_GUI_EVENT; + newEvent.GUIEvent.Caller = this; + newEvent.GUIEvent.Element = 0; + newEvent.GUIEvent.EventType = EGET_BUTTON_CLICKED; + Parent->OnEvent(newEvent); + } + + return true; + } + break; + default: + break; + } + + return Parent ? Parent->OnEvent(event) : false; +} + + void CGUIImageButton::draw() { if (!IsVisible) return; IGUISkin* skin = Environment->getSkin(); video::IVideoDriver* driver = Environment->getVideoDriver(); - core::position2di center = AbsoluteRect.getCenter(); - core::position2di pos = center; + irr::core::vector2di center = AbsoluteRect.getCenter(); + irr::core::vector2di pos = center; pos.X -= (s32)(ImageRect.getWidth() * imageScale.X * 0.5f); pos.Y -= (s32)(ImageRect.getHeight() * imageScale.Y * 0.5f); if(Pressed) { @@ -129,6 +332,31 @@ void CGUIImageButton::draw() { irr::gui::Draw2DImageRotation(driver, Image, ImageRect, pos, center, imageRotation, imageScale); IGUIElement::draw(); } +void CGUIImageButton::setImage(video::ITexture* image) +{ + if(image) + image->grab(); + if(Image) + Image->drop(); + + Image = image; + if(image) { + ImageRect = core::rect(core::vector2d(0, 0), image->getOriginalSize()); + if(isFixedSize) + imageScale = core::vector2df((irr::f32)imageSize.Width / image->getSize().Width, (irr::f32)imageSize.Height / image->getSize().Height); + } + + if(!PressedImage) + setPressedImage(Image); +} + +//! Sets the image which should be displayed on the button when it is in its normal state. +void CGUIImageButton::setImage(video::ITexture* image, const core::rect& pos) +{ + setImage(image); + ImageRect = pos; +} + void CGUIImageButton::setDrawImage(bool b) { isDrawImage = b; } @@ -138,12 +366,31 @@ void CGUIImageButton::setImageRotation(f32 r) { void CGUIImageButton::setImageScale(core::vector2df s) { imageScale = s; } +void CGUIImageButton::setImageSize(core::dimension2di s) { + isFixedSize = true; + imageSize = s; +} + +//! sets another skin independent font. if this is set to zero, the button uses the font of the skin. +void CGUIImageButton::setOverrideFont(IGUIFont* font) +{ + if (OverrideFont == font) + return; + + if (OverrideFont) + OverrideFont->drop(); + + OverrideFont = font; + + if (OverrideFont) + OverrideFont->grab(); +} IGUIFont* CGUIImageButton::getOverrideFont( void ) const { IGUISkin* skin = Environment->getSkin(); if (!skin) - return NULL; + return nullptr; return skin->getFont(); } @@ -151,9 +398,141 @@ IGUIFont* CGUIImageButton::getActiveFont() const { IGUISkin* skin = Environment->getSkin(); if (!skin) - return NULL; + return nullptr; return skin->getFont(); } +//! Sets an image which should be displayed on the button when it is in pressed state. +void CGUIImageButton::setPressedImage(video::ITexture* image) +{ + if (image) + image->grab(); + + if (PressedImage) + PressedImage->drop(); + + PressedImage = image; + if (image) + PressedImageRect = core::rect(core::vector2d(0, 0), image->getOriginalSize()); } + + +//! Sets the image which should be displayed on the button when it is in its pressed state. +void CGUIImageButton::setPressedImage(video::ITexture* image, const core::rect& pos) +{ + setPressedImage(image); + PressedImageRect = pos; } + + +//! Sets if the button should behave like a push button. Which means it +//! can be in two states: Normal or Pressed. With a click on the button, +//! the user can change the state of the button. +void CGUIImageButton::setIsPushButton(bool isPushButton) +{ + IsPushButton = isPushButton; +} + + +//! Returns if the button is currently pressed +bool CGUIImageButton::isPressed() const +{ + _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; + return Pressed; +} + + +//! Sets the pressed state of the button if this is a pushbutton +void CGUIImageButton::setPressed(bool pressed) +{ + if (Pressed != pressed) + { + Pressed = pressed; + } +} + + +//! Returns whether the button is a push button +bool CGUIImageButton::isPushButton() const +{ + _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; + return IsPushButton; +} + + +//! Sets if the alpha channel should be used for drawing images on the button (default is false) +void CGUIImageButton::setUseAlphaChannel(bool useAlphaChannel) +{ + UseAlphaChannel = useAlphaChannel; +} + + +//! Returns if the alpha channel should be used for drawing images on the button +bool CGUIImageButton::isAlphaChannelUsed() const +{ + _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; + return UseAlphaChannel; +} + + +bool CGUIImageButton::isDrawingBorder() const +{ + _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; + return DrawBorder; +} + + +//! Writes attributes of the element. +void CGUIImageButton::serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options = 0) const +{ + IGUIButton::serializeAttributes(out, options); + + out->addBool("PushButton", IsPushButton); + if (IsPushButton) + out->addBool("Pressed", Pressed); + + out->addTexture("Image", Image); + out->addRect("ImageRect", ImageRect); + out->addTexture("PressedImage", PressedImage); + out->addRect("PressedImageRect", PressedImageRect); + + out->addBool("UseAlphaChannel", isAlphaChannelUsed()); + out->addBool("Border", isDrawingBorder()); + out->addBool("ScaleImage", isScalingImage()); + + // out->addString ("OverrideFont", OverrideFont); +} + + +//! Reads attributes of the element +void CGUIImageButton::deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options = 0) +{ + IGUIButton::deserializeAttributes(in, options); + + IsPushButton = in->getAttributeAsBool("PushButton"); + Pressed = IsPushButton ? in->getAttributeAsBool("Pressed") : false; + + core::rect rec = in->getAttributeAsRect("ImageRect"); + if (rec.isValid()) + setImage(in->getAttributeAsTexture("Image"), rec); + else + setImage(in->getAttributeAsTexture("Image")); + + rec = in->getAttributeAsRect("PressedImageRect"); + if (rec.isValid()) + setPressedImage(in->getAttributeAsTexture("PressedImage"), rec); + else + setPressedImage(in->getAttributeAsTexture("PressedImage")); + + setDrawBorder(in->getAttributeAsBool("Border")); + setUseAlphaChannel(in->getAttributeAsBool("UseAlphaChannel")); + setScaleImage(in->getAttributeAsBool("ScaleImage")); + + // setOverrideFont(in->getAttributeAsString("OverrideFont")); + + updateAbsolutePosition(); +} + +} // end namespace gui +} // end namespace irr +#endif // _IRR_COMPILE_WITH_GUI_ diff --git a/gframe/CGUIImageButton.h b/gframe/CGUIImageButton.h index d0416085a0..9a2528b547 100644 --- a/gframe/CGUIImageButton.h +++ b/gframe/CGUIImageButton.h @@ -1,35 +1,160 @@ +// Copyright (C) 2002-2012 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + #ifndef _C_GUI_IMAGE_BUTTON_H_ #define _C_GUI_IMAGE_BUTTON_H_ -#include -#include "CGUIButton.h" +#include +#ifdef _IRR_COMPILE_WITH_GUI_ + +#include +#include namespace irr { +namespace video { +class IVideoDriver; +class ITexture; +} namespace gui { +class IGUISpriteBank; void Draw2DImageRotation(video::IVideoDriver* driver, video::ITexture* image, core::rect sourceRect, - core::position2d position, core::position2d rotationPoint, f32 rotation = 0.0f, + core::vector2d position, core::vector2d rotationPoint, f32 rotation = 0.0f, core::vector2df scale = core::vector2df(1.0, 1.0), bool useAlphaChannel = true, video::SColor color = 0xffffffff); void Draw2DImageQuad(video::IVideoDriver* driver, video::ITexture* image, core::rect sourceRect, - core::position2d corner[4], bool useAlphaChannel = true, video::SColor color = 0xffffffff); -class CGUIImageButton : public CGUIButton { + core::vector2d corner[4], bool useAlphaChannel = true, video::SColor color = 0xffffffff); + +class CGUIImageButton : public IGUIButton { public: - CGUIImageButton(IGUIEnvironment* environment, IGUIElement* parent, s32 id, core::rect rectangle); - static CGUIImageButton* addImageButton(IGUIEnvironment *env, const core::rect& rectangle, IGUIElement* parent, s32 id); - virtual void draw(); - virtual void setDrawImage(bool b); - virtual void setImageRotation(f32 r); - virtual void setImageScale(core::vector2df s); - virtual IGUIFont* getOverrideFont(void) const; - virtual IGUIFont* getActiveFont() const; - -private: + static CGUIImageButton* addImageButton(IGUIEnvironment* env, const core::rect& rectangle, IGUIElement* parent, s32 id); + + //! constructor + CGUIImageButton(IGUIEnvironment* environment, IGUIElement* parent, + s32 id, core::rect rectangle, bool noclip = false); + + //! destructor + ~CGUIImageButton() override; + + //! called if an event happened. + bool OnEvent(const SEvent& event) override; + + //! draws the element and its children + void draw() override; + + //! sets another skin independent font. if this is set to zero, the button uses the font of the skin. + void setOverrideFont(IGUIFont* font = 0) override; + + //! Gets the override font (if any) + IGUIFont* getOverrideFont() const override; + + //! Get the font which is used right now for drawing + IGUIFont* getActiveFont() const override; + + //! Sets an image which should be displayed on the button when it is in normal state. + void setImage(video::ITexture* image = 0) override; + + //! Sets an image which should be displayed on the button when it is in normal state. + void setImage(video::ITexture* image, const core::rect& pos) override; + + //! Sets an image which should be displayed on the button when it is in pressed state. + void setPressedImage(video::ITexture* image = 0) override; + + //! Sets an image which should be displayed on the button when it is in pressed state. + void setPressedImage(video::ITexture* image, const core::rect& pos) override; + + //! Sets the sprite bank used by the button + void setSpriteBank(IGUISpriteBank* bank = 0) override; + + //! Sets the animated sprite for a specific button state + /** \param index: Number of the sprite within the sprite bank, use -1 for no sprite + \param state: State of the button to set the sprite for + \param index: The sprite number from the current sprite bank + \param color: The color of the sprite + */ + void setSprite(EGUI_BUTTON_STATE state, s32 index, + video::SColor color = video::SColor(255, 255, 255, 255), bool loop = false) override; + + //! Sets if the button should behave like a push button. Which means it + //! can be in two states: Normal or Pressed. With a click on the button, + //! the user can change the state of the button. + void setIsPushButton(bool isPushButton = true) override; + + //! Checks whether the button is a push button + bool isPushButton() const override; + + //! Sets the pressed state of the button if this is a pushbutton + void setPressed(bool pressed = true) override; + + //! Returns if the button is currently pressed + bool isPressed() const override; + + //! Sets if the button should use the skin to draw its border + void setDrawBorder(bool border = true) override; + + //! Checks if the button face and border are being drawn + bool isDrawingBorder() const override; + + //! Sets if the alpha channel should be used for drawing images on the button (default is false) + void setUseAlphaChannel(bool useAlphaChannel = true) override; + + //! Checks if the alpha channel should be used for drawing images on the button + bool isAlphaChannelUsed() const override; + + //! Sets if the button should scale the button images to fit + void setScaleImage(bool scaleImage = true) override; + + //! Checks whether the button scales the used images + bool isScalingImage() const override; + + //! Writes attributes of the element. + void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options) const override; + + //! Reads attributes of the element + void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options) override; + + // from ygopro + void setDrawImage(bool b); + void setImageRotation(f32 r); + void setImageScale(core::vector2df s); + void setImageSize(core::dimension2di s); + +protected: + struct ButtonSprite + { + s32 Index; + video::SColor Color; + bool Loop; + }; + + ButtonSprite ButtonSprites[EGBS_COUNT]; + + IGUISpriteBank* SpriteBank; + IGUIFont* OverrideFont; + + video::ITexture* Image; + video::ITexture* PressedImage; + + core::rect ImageRect; + core::rect PressedImageRect; + + bool IsPushButton; + bool Pressed; + bool UseAlphaChannel; + bool DrawBorder; + bool ScaleImage; + + // from ygopro bool isDrawImage; + bool isFixedSize; f32 imageRotation; core::vector2df imageScale; + core::dimension2di imageSize; }; } } +#endif // _IRR_COMPILE_WITH_GUI_ + #endif //_C_GUI_IMAGE_BUTTON_H_ diff --git a/gframe/CGUITTFont.cpp b/gframe/CGUITTFont.cpp index debbbd053b..914472c5ea 100644 --- a/gframe/CGUITTFont.cpp +++ b/gframe/CGUITTFont.cpp @@ -28,6 +28,7 @@ john@suckerfreegames.com */ +#define _IRR_STATIC_LIB_ #include #include "CGUITTFont.h" @@ -79,9 +80,9 @@ video::IImage* SGUITTGlyph::createGlyphImage(const FT_Bitmap& bits, video::IVide const u32 image_pitch = image->getPitch() / sizeof(u16); u16* image_data = (u16*)image->lock(); u8* glyph_data = bits.buffer; - for (s32 y = 0; y < bits.rows; ++y) { + for (s32 y = 0; y < (s32)bits.rows; ++y) { u16* row = image_data; - for (s32 x = 0; x < bits.width; ++x) { + for (s32 x = 0; x < (s32)bits.width; ++x) { // Monochrome bitmaps store 8 pixels per byte. The left-most pixel is the bit 0x80. // So, we go through the data each bit at a time. if ((glyph_data[y * bits.pitch + (x / 8)] & (0x80 >> (x % 8))) != 0) @@ -105,9 +106,9 @@ video::IImage* SGUITTGlyph::createGlyphImage(const FT_Bitmap& bits, video::IVide const u32 image_pitch = image->getPitch() / sizeof(u32); u32* image_data = (u32*)image->lock(); u8* glyph_data = bits.buffer; - for (s32 y = 0; y < bits.rows; ++y) { + for (s32 y = 0; y < (s32)bits.rows; ++y) { u8* row = glyph_data; - for (s32 x = 0; x < bits.width; ++x) { + for (s32 x = 0; x < (s32)bits.width; ++x) { image_data[y * image_pitch + x] |= static_cast(255.0f * (static_cast(*row++) / gray_count)) << 24; //data[y * image_pitch + x] |= ((u32)(*bitsdata++) << 24); } @@ -153,10 +154,12 @@ void SGUITTGlyph::preload(u32 char_index, FT_Face face, video::IVideoDriver* dri } glyph_page = parent->getLastGlyphPageIndex(); - u32 texture_side_length = page->texture->getOriginalSize().Width; + u32 texture_side_length = page->texture_size.Width - font_size; + u32 margin = (u32)(font_size * 0.5); + u32 sprite_size = (u32)(font_size * 1.5); core::vector2di page_position( - (page->used_slots % (texture_side_length / font_size)) * font_size, - (page->used_slots / (texture_side_length / font_size)) * font_size + (s32)(page->used_slots % (s32)(texture_side_length / sprite_size)) * sprite_size + margin, + (s32)(page->used_slots / (s32)(texture_side_length / sprite_size)) * sprite_size + margin ); source_rect.UpperLeftCorner = page_position; source_rect.LowerRightCorner = core::vector2di(page_position.X + bits.width, page_position.Y + bits.rows); @@ -230,7 +233,7 @@ CGUITTFont* CGUITTFont::create(IrrlichtDevice *device, const io::path& filename, //! Constructor. CGUITTFont::CGUITTFont(IGUIEnvironment *env) : use_monochrome(false), use_transparency(true), use_hinting(true), use_auto_hinting(true), - batch_load_size(1), Device(0), Environment(env), Driver(0), GlobalKerningWidth(0), GlobalKerningHeight(0) { + batch_load_size(1), Device(0), Environment(env), Driver(0), GlobalKerningWidth(0), GlobalKerningHeight(0), supposed_line_height(0) { #ifdef _DEBUG setDebugName("CGUITTFont"); #endif @@ -267,7 +270,7 @@ bool CGUITTFont::load(const io::path& filename, const u32 size, const bool antia // Log. if (logger) - logger->log(L"CGUITTFont", core::stringw(core::stringw(L"Creating new font: ") + core::ustring(filename).toWCHAR_s() + L" " + core::stringc(size) + L"pt " + (antialias ? L"+antialias " : L"-antialias ") + (transparency ? L"+transparency" : L"-transparency")).c_str(), irr::ELL_INFORMATION); + logger->log(L"CGUITTFont", core::stringw(core::stringw(L"Creating new font: ") + core::stringc(filename) + L" " + core::stringc(size) + L"pt " + (antialias ? L"+antialias " : L"-antialias ") + (transparency ? L"+transparency" : L"-transparency")).c_str(), irr::ELL_INFORMATION); // Grab the face. SGUITTFace* face = 0; @@ -302,15 +305,12 @@ bool CGUITTFont::load(const io::path& filename, const u32 size, const bool antia return false; } } else { - core::ustring converter(filename); - if (FT_New_Face(c_library, reinterpret_cast(converter.toUTF8_s().c_str()), 0, &face->face)) { - if (logger) logger->log(L"CGUITTFont", L"FT_New_Face failed.", irr::ELL_INFORMATION); + if (logger) logger->log(L"CGUITTFont", L"FT_New_Face failed.", irr::ELL_INFORMATION); - c_faces.remove(filename); - delete face; - face = 0; - return false; - } + c_faces.remove(filename); + delete face; + face = 0; + return false; } } else { // Using another instance of this face. @@ -322,7 +322,7 @@ bool CGUITTFont::load(const io::path& filename, const u32 size, const bool antia tt_face = face->face; // Store font metrics. - FT_Set_Pixel_Sizes(tt_face, size, 0); + FT_Set_Pixel_Sizes(tt_face, 0, size); font_metrics = tt_face->size->metrics; // Allocate our glyphs. @@ -345,6 +345,24 @@ bool CGUITTFont::load(const io::path& filename, const u32 size, const bool antia getGlyphIndexByChar((uchar32_t)0); batch_load_size = old_size; + // Calculate the supposed line height of this font (of this size) -- + // Not using FT_SizeMetric::ascender or height, but actually by testing some of the glyphs, + // to see what should give a reasonable not cluttered line height. + // The ascender or height info may as well just be arbitrary ones. + + // Get the maximum font height. Unfortunately, we have to do this hack as + // Irrlicht will draw things wrong. In FreeType, the font size is the + // maximum size for a single glyph, but that glyph may hang "under" the + // draw line, increasing the total font height to beyond the set size. + // Irrlicht does not understand this concept when drawing fonts. Also, I + // add +1 to give it a 1 pixel blank border. This makes things like + // tooltips look nicer. + s32 test1 = getHeightFromCharacter((uchar32_t)'g') + 1; + s32 test2 = getHeightFromCharacter((uchar32_t)'j') + 1; + s32 test3 = getHeightFromCharacter((uchar32_t)0x55B5) + 1; + + supposed_line_height = core::max_(test1, core::max_(test2, test3)); + return true; } @@ -443,13 +461,12 @@ CGUITTGlyphPage* CGUITTFont::createGlyphPage(const u8& pixel_mode) { if (page_texture_size.Width > max_texture_size.Width || page_texture_size.Height > max_texture_size.Height) page_texture_size = max_texture_size; - if (!page->createPageTexture(pixel_mode, page_texture_size)) - // TODO: add error message? - return 0; + page->texture_size = page_texture_size; + page->pixel_mode = pixel_mode; if (page) { // Determine the number of glyph slots on the page and add it to the list of pages. - page->available_slots = (page_texture_size.Width / size) * (page_texture_size.Height / size); + page->available_slots = (u32)((page_texture_size.Width - size) / (u32)(size * 1.5)) * (u32)((page_texture_size.Height - size) / (u32)(size * 1.5)); Glyph_Pages.push_back(page); } return page; @@ -472,6 +489,12 @@ void CGUITTFont::setFontHinting(const bool enable, const bool enable_auto_hintin } void CGUITTFont::draw(const core::stringw& text, const core::rect& position, video::SColor color, bool hcenter, bool vcenter, const core::rect* clip) { + if (!Driver) + return; + drawUstring(text, position, color, hcenter, vcenter, clip); +} + +void CGUITTFont::drawUstring(const core::ustring& utext, const core::rect&position, video::SColor color, bool hcenter, bool vcenter, const core::rect*clip) { if (!Driver) return; @@ -483,11 +506,11 @@ void CGUITTFont::draw(const core::stringw& text, const core::rect& position // Set up some variables. core::dimension2d textDimension; - core::position2d offset = position.UpperLeftCorner; + core::vector2d offset = position.UpperLeftCorner; // Determine offset positions. if (hcenter || vcenter) { - textDimension = getDimension(text.c_str()); + textDimension = getDimension(utext); if (hcenter) offset.X = ((position.getWidth() - textDimension.Width) >> 1) + offset.X; @@ -496,9 +519,6 @@ void CGUITTFont::draw(const core::stringw& text, const core::rect& position offset.Y = ((position.getHeight() - textDimension.Height) >> 1) + offset.Y; } - // Convert to a unicode string. - core::ustring utext(text); - // Set up our render map. core::map Render_Map; @@ -508,29 +528,28 @@ void CGUITTFont::draw(const core::stringw& text, const core::rect& position core::ustring::const_iterator iter(utext); while (!iter.atEnd()) { uchar32_t currentChar = *iter; + + bool lineBreak = false; + if (currentChar == L'\r') { // Mac or Windows breaks + lineBreak = true; + if (*(iter + 1) == L'\n') // Windows line breaks. + currentChar = *(++iter); + } else if (currentChar == L'\n') { // Unix breaks + lineBreak = true; + } + if (lineBreak) { + previousChar = 0; + offset.Y += supposed_line_height; //font_metrics.ascender / 64; + offset.X = position.UpperLeftCorner.X; + if (hcenter) + offset.X += (position.getWidth() - textDimension.Width) >> 1; + ++iter; + continue; + } + n = getGlyphIndexByChar(currentChar); bool visible = (Invisible.findFirst(currentChar) == -1); if (n > 0 && visible) { - bool lineBreak = false; - if (currentChar == L'\r') { // Mac or Windows breaks - lineBreak = true; - if (*(iter + 1) == (uchar32_t)'\n') // Windows line breaks. - currentChar = *(++iter); - } else if (currentChar == (uchar32_t)'\n') { // Unix breaks - lineBreak = true; - } - - if (lineBreak) { - previousChar = 0; - offset.Y += font_metrics.ascender / 64; - offset.X = position.UpperLeftCorner.X; - - if (hcenter) - offset.X += (position.getWidth() - textDimension.Width) >> 1; - ++iter; - continue; - } - // Calculate the glyph offset. s32 offx = Glyphs[n - 1].offset.X; s32 offy = (font_metrics.ascender / 64) - Glyphs[n - 1].offset.Y; @@ -543,7 +562,7 @@ void CGUITTFont::draw(const core::stringw& text, const core::rect& position // Determine rendering information. SGUITTGlyph& glyph = Glyphs[n - 1]; CGUITTGlyphPage* const page = Glyph_Pages[glyph.glyph_page]; - page->render_positions.push_back(core::position2di(offset.X + offx, offset.Y + offy)); + page->render_positions.push_back(irr::core::vector2di(offset.X + offx, offset.Y + offy)); page->render_source_rects.push_back(glyph.source_rect); Render_Map.set(glyph.glyph_page, page); } @@ -577,20 +596,8 @@ core::dimension2d CGUITTFont::getDimension(const wchar_t* text) const { } core::dimension2d CGUITTFont::getDimension(const core::ustring& text) const { - // Get the maximum font height. Unfortunately, we have to do this hack as - // Irrlicht will draw things wrong. In FreeType, the font size is the - // maximum size for a single glyph, but that glyph may hang "under" the - // draw line, increasing the total font height to beyond the set size. - // Irrlicht does not understand this concept when drawing fonts. Also, I - // add +1 to give it a 1 pixel blank border. This makes things like - // tooltips look nicer. - s32 test1 = getHeightFromCharacter((uchar32_t)'g') + 1; - s32 test2 = getHeightFromCharacter((uchar32_t)'j') + 1; - s32 test3 = getHeightFromCharacter((uchar32_t)'_') + 1; - s32 max_font_height = core::max_(test1, core::max_(test2, test3)); - - core::dimension2d text_dimension(0, max_font_height); - core::dimension2d line(0, max_font_height); + core::dimension2d text_dimension(0, supposed_line_height); + core::dimension2d line(0, supposed_line_height); uchar32_t previousChar = 0; core::ustring::const_iterator iter = text.begin(); @@ -619,7 +626,7 @@ core::dimension2d CGUITTFont::getDimension(const core::ustring& text) const if (text_dimension.Width < line.Width) text_dimension.Width = line.Width; line.Width = 0; - line.Height = max_font_height; + line.Height = supposed_line_height; continue; } line.Width += getWidthFromCharacter(p); @@ -803,11 +810,6 @@ core::vector2di CGUITTFont::getKerning(const uchar32_t thisLetter, const uchar32 } void CGUITTFont::setInvisibleCharacters(const wchar_t *s) { - core::ustring us(s); - Invisible = us; -} - -void CGUITTFont::setInvisibleCharacters(const core::ustring& s) { Invisible = s; } @@ -831,7 +833,8 @@ video::IImage* CGUITTFont::createTextureFromChar(const uchar32_t& ch) { // Copy the image data out of the page texture. core::dimension2du glyph_size(glyph.source_rect.getSize()); video::IImage* image = Driver->createImage(format, glyph_size); - pageholder->copyTo(image, core::position2di(0, 0), glyph.source_rect); + pageholder->copyTo(image, irr::core::vector2di(0, 0), glyph.source_rect); + pageholder->drop(); tex->unlock(); return image; @@ -853,17 +856,14 @@ void CGUITTFont::createSharedPlane() { 0---1 */ - using namespace core; - using namespace video; - using namespace scene; - S3DVertex vertices[4]; + video::S3DVertex vertices[4]; u16 indices[6] = {0, 2, 3, 3, 1, 0}; - vertices[0] = S3DVertex(vector3df(0, -1, 0), vector3df(0, 0, -1), SColor(255, 255, 255, 255), vector2df(0, 1)); - vertices[1] = S3DVertex(vector3df(1, -1, 0), vector3df(0, 0, -1), SColor(255, 255, 255, 255), vector2df(1, 1)); - vertices[2] = S3DVertex(vector3df(0, 0, 0), vector3df(0, 0, -1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vertices[3] = S3DVertex(vector3df(1, 0, 0), vector3df(0, 0, -1), SColor(255, 255, 255, 255), vector2df(1, 0)); + vertices[0] = video::S3DVertex(core::vector3df(0, -1, 0), core::vector3df(0, 0, -1), video::SColor(255, 255, 255, 255), core::vector2df(0, 1)); + vertices[1] = video::S3DVertex(core::vector3df(1, -1, 0), core::vector3df(0, 0, -1), video::SColor(255, 255, 255, 255), core::vector2df(1, 1)); + vertices[2] = video::S3DVertex(core::vector3df(0, 0, 0), core::vector3df(0, 0, -1), video::SColor(255, 255, 255, 255), core::vector2df(0, 0)); + vertices[3] = video::S3DVertex(core::vector3df(1, 0, 0), core::vector3df(0, 0, -1), video::SColor(255, 255, 255, 255), core::vector2df(1, 0)); - SMeshBuffer* buf = new SMeshBuffer(); + scene::SMeshBuffer* buf = new scene::SMeshBuffer(); buf->append(vertices, 4, indices, 6); shared_plane_.addMeshBuffer( buf ); @@ -881,11 +881,7 @@ core::dimension2d CGUITTFont::getDimensionUntilEndOfLine(const wchar_t* p) } core::array CGUITTFont::addTextSceneNode(const wchar_t* text, scene::ISceneManager* smgr, scene::ISceneNode* parent, const video::SColor& color, bool center) { - using namespace core; - using namespace video; - using namespace scene; - - array container; + core::array container; if (!Driver || !smgr) return container; if (!parent) @@ -896,8 +892,8 @@ core::array CGUITTFont::addTextSceneNode(const wchar_t* text if (!shared_plane_ptr_) //this points to a static mesh that contains the plane createSharedPlane(); //if it's not initialized, we create one. - dimension2d text_size(getDimension(text)); //convert from unsigned to signed. - vector3df start_point(0, 0, 0), offset; + core::dimension2d text_size(getDimension(text)); //convert from unsigned to signed. + core::vector3df start_point(0, 0, 0), offset; /** NOTICE: Because we are considering adding texts into 3D world, all Y axis vectors are inverted. @@ -911,7 +907,7 @@ core::array CGUITTFont::addTextSceneNode(const wchar_t* text } // the default font material - SMaterial mat; + video::SMaterial mat; mat.setFlag(video::EMF_LIGHTING, true); mat.setFlag(video::EMF_ZWRITE_ENABLE, false); mat.setFlag(video::EMF_NORMALIZE_NORMALS, true); @@ -923,7 +919,7 @@ core::array CGUITTFont::addTextSceneNode(const wchar_t* text wchar_t current_char = 0, previous_char = 0; u32 n = 0; - array glyph_indices; + core::array glyph_indices; while (*text) { current_char = *text; @@ -938,7 +934,7 @@ core::array CGUITTFont::addTextSceneNode(const wchar_t* text if (line_break) { previous_char = 0; - offset.Y -= tt_face->size->metrics.ascender / 64; + offset.Y -= supposed_line_height; //tt_face->size->metrics.ascender / 64; offset.X = start_point.X; if (center) offset.X += (text_size.Width - getDimensionUntilEndOfLine(text + 1).Width) >> 1; @@ -956,23 +952,23 @@ core::array CGUITTFont::addTextSceneNode(const wchar_t* text s32 offy = (font_metrics.ascender / 64) - glyph.offset.Y; // Apply kerning. - vector2di k = getKerning(current_char, previous_char); + core::vector2di k = getKerning(current_char, previous_char); offset.X += k.X; offset.Y += k.Y; - vector3df current_pos(offset.X + offx, offset.Y - offy, 0); - dimension2d letter_size = dimension2d(texw, texh); + core::vector3df current_pos(offset.X + offx, offset.Y - offy, 0); + core::dimension2d letter_size = core::dimension2d(texw, texh); // Now we copy planes corresponding to the letter size. - IMeshManipulator* mani = smgr->getMeshManipulator(); - IMesh* meshcopy = mani->createMeshCopy(shared_plane_ptr_); - mani->scale(meshcopy, vector3df((f32)letter_size.Width, (f32)letter_size.Height, 1)); + scene::IMeshManipulator* mani = smgr->getMeshManipulator(); + scene::IMesh* meshcopy = mani->createMeshCopy(shared_plane_ptr_); + mani->scale(meshcopy, core::vector3df((f32)letter_size.Width, (f32)letter_size.Height, 1)); - ISceneNode* current_node = smgr->addMeshSceneNode(meshcopy, parent, -1, current_pos); + scene::ISceneNode* current_node = smgr->addMeshSceneNode(meshcopy, parent, -1, current_pos); meshcopy->drop(); current_node->getMaterial(0) = mat; - current_node->setAutomaticCulling(EAC_OFF); + current_node->setAutomaticCulling(scene::EAC_OFF); current_node->setIsDebugObject(true); //so the picking won't have any effect on individual letter //current_node->setDebugDataVisible(EDS_BBOX); //de-comment this when debugging @@ -990,7 +986,7 @@ core::array CGUITTFont::addTextSceneNode(const wchar_t* text for (u32 i = 0; i < glyph_indices.size(); ++i) { u32 n = glyph_indices[i]; SGUITTGlyph const& glyph = Glyphs[n - 1]; - ITexture* current_tex = Glyph_Pages[glyph.glyph_page]->texture; + video::ITexture* current_tex = Glyph_Pages[glyph.glyph_page]->texture; f32 page_texture_size = (f32)current_tex->getSize().Width; //Now we calculate the UV position according to the texture size and the source rect. // @@ -1006,15 +1002,15 @@ core::array CGUITTFont::addTextSceneNode(const wchar_t* text f32 v2 = v1 + (glyph.source_rect.getHeight() / page_texture_size); //we can be quite sure that this is IMeshSceneNode, because we just added them in the above loop. - IMeshSceneNode* node = static_cast(container[i]); + scene::IMeshSceneNode* node = static_cast(container[i]); - S3DVertex* pv = static_cast(node->getMesh()->getMeshBuffer(0)->getVertices()); + video::S3DVertex* pv = static_cast(node->getMesh()->getMeshBuffer(0)->getVertices()); //pv[0].TCoords.Y = pv[1].TCoords.Y = (letter_size.Height - 1) / static_cast(letter_size.Height); //pv[1].TCoords.X = pv[3].TCoords.X = (letter_size.Width - 1) / static_cast(letter_size.Width); - pv[0].TCoords = vector2df(u1, v2); - pv[1].TCoords = vector2df(u2, v2); - pv[2].TCoords = vector2df(u1, v1); - pv[3].TCoords = vector2df(u2, v1); + pv[0].TCoords = core::vector2df(u1, v2); + pv[1].TCoords = core::vector2df(u2, v2); + pv[2].TCoords = core::vector2df(u1, v1); + pv[3].TCoords = core::vector2df(u2, v1); container[i]->getMaterial(0).setTexture(0, current_tex); } diff --git a/gframe/CGUITTFont.h b/gframe/CGUITTFont.h index e498ebac76..869a9f6497 100644 --- a/gframe/CGUITTFont.h +++ b/gframe/CGUITTFont.h @@ -54,7 +54,7 @@ class CGUITTAssistDelete { //! Structure representing a single TrueType glyph. struct SGUITTGlyph { //! Constructor. - SGUITTGlyph() : isLoaded(false), glyph_page(0), surface(0), parent(0) {} + SGUITTGlyph() : isLoaded(false), glyph_page(0), advance({}), surface(0), parent(0) {} //! Destructor. ~SGUITTGlyph() { @@ -143,6 +143,12 @@ class CGUITTGlyphPage { void updateTexture() { if (!dirty) return; + if (!texture) { + if (!createPageTexture(pixel_mode, texture_size)) + // TODO: add error message? + return; + } + void* ptr = texture->lock(); video::ECOLOR_FORMAT format = texture->getColorFormat(); core::dimension2du size = texture->getOriginalSize(); @@ -176,6 +182,9 @@ class CGUITTGlyphPage { core::array render_positions; core::array render_source_rects; + core::dimension2du texture_size; + u8 pixel_mode; + private: core::array glyph_to_be_paged; video::IVideoDriver* driver; @@ -198,93 +207,95 @@ class CGUITTFont : public IGUIFont { static CGUITTFont* create(IrrlichtDevice *device, const io::path& filename, const u32 size, const bool antialias = true, const bool transparency = true); //! Destructor - virtual ~CGUITTFont(); + ~CGUITTFont() override; //! Sets the amount of glyphs to batch load. - virtual void setBatchLoadSize(u32 batch_size) { + void setBatchLoadSize(u32 batch_size) { batch_load_size = batch_size; } //! Sets the maximum texture size for a page of glyphs. - virtual void setMaxPageTextureSize(const core::dimension2du& texture_size) { + void setMaxPageTextureSize(const core::dimension2du& texture_size) { max_page_texture_size = texture_size; } //! Get the font size. - virtual u32 getFontSize() const { + u32 getFontSize() const { return size; } //! Check the font's transparency. - virtual bool isTransparent() const { + bool isTransparent() const { return use_transparency; } //! Check if the font auto-hinting is enabled. //! Auto-hinting is FreeType's built-in font hinting engine. - virtual bool useAutoHinting() const { + bool useAutoHinting() const { return use_auto_hinting; } //! Check if the font hinting is enabled. - virtual bool useHinting() const { + bool useHinting() const { return use_hinting; } //! Check if the font is being loaded as a monochrome font. //! The font can either be a 256 color grayscale font, or a 2 color monochrome font. - virtual bool useMonochrome() const { + bool useMonochrome() const { return use_monochrome; } //! Tells the font to allow transparency when rendering. //! Default: true. //! \param flag If true, the font draws using transparency. - virtual void setTransparency(const bool flag); + void setTransparency(const bool flag); //! Tells the font to use monochrome rendering. //! Default: false. //! \param flag If true, the font draws using a monochrome image. If false, the font uses a grayscale image. - virtual void setMonochrome(const bool flag); + void setMonochrome(const bool flag); //! Enables or disables font hinting. //! Default: Hinting and auto-hinting true. //! \param enable If false, font hinting is turned off. If true, font hinting is turned on. //! \param enable_auto_hinting If true, FreeType uses its own auto-hinting algorithm. If false, it tries to use the algorithm specified by the font. - virtual void setFontHinting(const bool enable, const bool enable_auto_hinting = true); + void setFontHinting(const bool enable, const bool enable_auto_hinting = true); //! Draws some text and clips it to the specified rectangle if wanted. - virtual void draw(const core::stringw& text, const core::rect& position, + void draw(const core::stringw& text, const core::rect& position, video::SColor color, bool hcenter = false, bool vcenter = false, - const core::rect* clip = 0); + const core::rect* clip = 0) override; + void drawUstring(const core::ustring& text, const core::rect& position, + video::SColor color, bool hcenter = false, bool vcenter = false, + const core::rect* clip = 0); //! Returns the dimension of a character produced by this font. - virtual core::dimension2d getCharDimension(const wchar_t ch) const; + core::dimension2d getCharDimension(const wchar_t ch) const; //! Returns the dimension of a text string. - virtual core::dimension2d getDimension(const wchar_t* text) const; - virtual core::dimension2d getDimension(const core::ustring& text) const; + core::dimension2d getDimension(const wchar_t* text) const override; + core::dimension2d getDimension(const core::ustring& text) const; //! Calculates the index of the character in the text which is on a specific position. - virtual s32 getCharacterFromPos(const wchar_t* text, s32 pixel_x) const; - virtual s32 getCharacterFromPos(const core::ustring& text, s32 pixel_x) const; + s32 getCharacterFromPos(const wchar_t* text, s32 pixel_x) const override; + s32 getCharacterFromPos(const core::ustring& text, s32 pixel_x) const; //! Sets global kerning width for the font. - virtual void setKerningWidth(s32 kerning); + void setKerningWidth(s32 kerning) override; //! Sets global kerning height for the font. - virtual void setKerningHeight(s32 kerning); + void setKerningHeight(s32 kerning) override; //! Gets kerning values (distance between letters) for the font. If no parameters are provided, - virtual s32 getKerningWidth(const wchar_t* thisLetter = 0, const wchar_t* previousLetter = 0) const; - virtual s32 getKerningWidth(const uchar32_t thisLetter = 0, const uchar32_t previousLetter = 0) const; + s32 getKerningWidth(const wchar_t* thisLetter = 0, const wchar_t* previousLetter = 0) const override; + s32 getKerningWidth(const uchar32_t thisLetter = 0, const uchar32_t previousLetter = 0) const; //! Returns the distance between letters - virtual s32 getKerningHeight() const; + s32 getKerningHeight() const override; //! Define which characters should not be drawn by the font. - virtual void setInvisibleCharacters(const wchar_t *s); - virtual void setInvisibleCharacters(const core::ustring& s); + void setInvisibleCharacters(const wchar_t *s) final; //! Get the last glyph page if there's still available slots. //! If not, it will return zero. @@ -303,14 +314,14 @@ class CGUITTFont : public IGUIFont { //! Create corresponding character's software image copy from the font, //! so you can use this data just like any ordinary video::IImage. //! \param ch The character you need - virtual video::IImage* createTextureFromChar(const uchar32_t& ch); + video::IImage* createTextureFromChar(const uchar32_t& ch); //! This function is for debugging mostly. If the page doesn't exist it returns zero. //! \param page_index Simply return the texture handle of a given page index. - virtual video::ITexture* getPageTextureByIndex(const u32& page_index) const; + video::ITexture* getPageTextureByIndex(const u32& page_index) const; //! Add a list of scene nodes generated by putting font textures on the 3D planes. - virtual core::array addTextSceneNode + core::array addTextSceneNode (const wchar_t* text, scene::ISceneManager* smgr, scene::ISceneNode* parent = 0, const video::SColor& color = video::SColor(255, 0, 0, 0), bool center = false ); @@ -331,7 +342,7 @@ class CGUITTFont : public IGUIFont { static scene::IMesh* shared_plane_ptr_; static scene::SMesh shared_plane_; - CGUITTFont(IGUIEnvironment *env); + explicit CGUITTFont(IGUIEnvironment *env); bool load(const io::path& filename, const u32 size, const bool antialias, const bool transparency); void reset_images(); void update_glyph_pages() const; @@ -340,7 +351,7 @@ class CGUITTFont : public IGUIFont { load_flags = FT_LOAD_DEFAULT | FT_LOAD_RENDER; if (!useHinting()) load_flags |= FT_LOAD_NO_HINTING; if (!useAutoHinting()) load_flags |= FT_LOAD_NO_AUTOHINT; - if (useMonochrome()) load_flags |= FT_LOAD_MONOCHROME | FT_LOAD_TARGET_MONO | FT_RENDER_MODE_MONO; + if (useMonochrome()) load_flags |= FT_LOAD_MONOCHROME | FT_LOAD_TARGET_MONO; else load_flags |= FT_LOAD_TARGET_NORMAL; } u32 getWidthFromCharacter(wchar_t c) const; @@ -368,6 +379,7 @@ class CGUITTFont : public IGUIFont { s32 GlobalKerningWidth; s32 GlobalKerningHeight; + s32 supposed_line_height; core::ustring Invisible; }; diff --git a/gframe/CMakeLists.txt b/gframe/CMakeLists.txt new file mode 100644 index 0000000000..ee5e027826 --- /dev/null +++ b/gframe/CMakeLists.txt @@ -0,0 +1,69 @@ +project (ygopro) + +if (NOT WIN32 AND NOT APPLE) + include (FindX11) +endif () + +add_subdirectory (lzma) + +set (AUTO_FILES_RESULT) +if (MSVC) + AutoFiles("." "res" "\\.(rc)$") + AutoFiles("." "src" "\\.(cpp|c|h)$" "CGUIButton.cpp|lzma/\\.*") +else () + AutoFiles("." "src" "\\.(cpp|c|h)$" "lzma/\\.*") +endif () + +if (MSVC) + add_executable (ygopro WIN32 ${AUTO_FILES_RESULT}) + set_target_properties (ygopro PROPERTIES + LINK_FLAGS /ENTRY:"mainCRTStartup" + VS_DEBUGGER_WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}" + ) + set_property(DIRECTORY ${CMAKE_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT ygopro) +else () + add_executable (ygopro ${AUTO_FILES_RESULT}) +endif () + +target_link_libraries (ygopro ocgcore clzma) + +if (MSVC) + target_link_libraries (ygopro irrlicht freetype sqlite3 event) + include_directories ( "../irrlicht/include" "../freetype/include" "../event/include" "../sqlite3" ) +else () + target_link_libraries (ygopro + ${IRRLICHT_LIBRARIES} + ${FREETYPE_LIBRARIES} + ${SQLITE_LIBRARIES} + ${LIBEVENT_LIBRARIES} + ${OPENGL_gl_LIBRARY} + ) + include_directories ( + ${IRRLICHT_INCLUDE_DIR} + ${FREETYPE_INCLUDE_DIR} + ${SQLITE_INCLUDE_DIRS} + ${LIBEVENT_INCLUDE_DIR} + ${OPENGL_INCLUDE_DIR} + ) + target_link_libraries (ygopro ${CMAKE_THREAD_LIBS_INIT} ${DL_LIBRARIES}) +endif () + +if (APPLE) + find_library(COCOA_LIBRARY Cocoa) + find_library(IOKIT_LIBRARY IOKit) + target_link_libraries(ygopro ${COCOA_LIBRARY} ${IOKIT_LIBRARY}) +endif () + +if (USE_IRRKLANG) + add_definitions ( "-DYGOPRO_USE_IRRKLANG" ) + if (MSVC) + target_link_libraries (ygopro ${IRRKLANG_DIR}/lib/Win32-visualStudio/irrKlang.lib) + elseif (CMAKE_SYSTEM MATCHES Linux) + target_link_libraries (ygopro ${IRRKLANG_DIR}/bin/linux-gcc-64/libIrrKlang.so) + endif () + include_directories ( "${IRRKLANG_DIR}/include" ) +endif () + +if (WIN32) + target_link_libraries (ygopro ws2_32 winmm gdi32 kernel32 user32 imm32 opengl32) +endif () diff --git a/gframe/bufferio.h b/gframe/bufferio.h index 24b66f393e..dccc70124f 100644 --- a/gframe/bufferio.h +++ b/gframe/bufferio.h @@ -1,116 +1,178 @@ #ifndef BUFFERIO_H #define BUFFERIO_H -#ifdef _MSC_VER -#pragma warning(disable: 4244) -#endif +#include +#include +#include +#include class BufferIO { public: - inline static int ReadInt32(char*& p) { - int ret = *(int*)p; - p += 4; + template + static T Read(unsigned char*& p) { + T ret{}; + std::memcpy(&ret, p, sizeof(T)); + p += sizeof(T); return ret; } - inline static short ReadInt16(char*& p) { - short ret = *(short*)p; - p += 2; - return ret; + template + static void Write(unsigned char*& p, const T& value) { + std::memcpy(p, &value, sizeof(T)); + p += sizeof(T); } - inline static char ReadInt8(char*& p) { - char ret = *(char*)p; - p++; - return ret; + + static void VectorWriteBlock(std::vector& buffer, const void* src, size_t size) { + const auto len = buffer.size(); + buffer.resize(len + size); + std::memcpy(buffer.data() + len, src, size); } - inline static unsigned char ReadUInt8(char*& p) { - unsigned char ret = *(unsigned char*)p; - p++; - return ret; + template + static void VectorWrite(std::vector& buffer, const T& value) { + VectorWriteBlock(buffer, &value, sizeof(T)); + } + + // for compatibility + [[deprecated]] + static int32_t ReadInt32(unsigned char*& p) { + return Read(p); + } + [[deprecated]] + static short ReadInt16(unsigned char*& p) { + return Read(p); + } + [[deprecated]] + static char ReadInt8(unsigned char*& p) { + return Read(p); } - inline static void WriteInt32(char*& p, int val) { - (*(int*)p) = val; - p += 4; + [[deprecated]] + static unsigned char ReadUInt8(unsigned char*& p) { + return Read(p); } - inline static void WriteInt16(char*& p, short val) { - (*(short*)p) = val; - p += 2; + [[deprecated]] + static void WriteInt32(unsigned char*& p, int32_t val) { + Write(p, val); } - inline static void WriteInt8(char*& p, char val) { - *p = val; - p++; + [[deprecated]] + static void WriteInt16(unsigned char*& p, short val) { + Write(p, val); } + [[deprecated]] + static void WriteInt8(unsigned char*& p, char val) { + Write(p, val); + } + /** + * @brief Copy a C-style string to another C-style string. + * @param src The source wide string + * @param pstr The destination char string + * @param bufsize The length of the destination buffer + * @return The length of the copied string + */ template - inline static int CopyWStr(T1* src, T2* pstr, int bufsize) { + static int CopyWStr(const T1* src, T2* pstr, int bufsize) { int l = 0; while(src[l] && l < bufsize - 1) { - pstr[l] = src[l]; + pstr[l] = (T2)src[l]; l++; } pstr[l] = 0; return l; } template - inline static int CopyWStrRef(T1* src, T2*& pstr, int bufsize) { + static int CopyWStrRef(const T1* src, T2*& pstr, int bufsize) { int l = 0; while(src[l] && l < bufsize - 1) { - pstr[l] = src[l]; + pstr[l] = (T2)src[l]; l++; } pstr += l; *pstr = 0; return l; } - static int EncodeUTF8(const wchar_t * wsrc, char * str) { - char* pstr = str; - while(*wsrc != 0) { - if(*wsrc < 0x80) { - *str = *wsrc; - ++str; - } else if(*wsrc < 0x800) { - str[0] = ((*wsrc >> 6) & 0x1f) | 0xc0; - str[1] = ((*wsrc) & 0x3f) | 0x80; - str += 2; - } else { - str[0] = ((*wsrc >> 12) & 0xf) | 0xe0; - str[1] = ((*wsrc >> 6) & 0x3f) | 0x80; - str[2] = ((*wsrc) & 0x3f) | 0x80; - str += 3; - } - wsrc++; + template + static int CopyCharArray(const T1* src, T2(&dst)[N]) { + return CopyWStr(src, dst, N); + } + template + static void CopyString(const char* src, char(&dst)[N], size_t len = N - 1) { + if(len >= N) + len = N - 1; + std::strncpy(dst, src, len); + dst[len] = 0; + } + template + static void CopyWideString(const wchar_t* src, wchar_t(&dst)[N], size_t len = N - 1) { + if(len >= N) + len = N - 1; + std::wcsncpy(dst, src, len); + dst[len] = 0; + } + static bool IsHighSurrogate(unsigned int c) { + return (c >= 0xd800U && c <= 0xdbffU); + } + static bool IsLowSurrogate(unsigned int c) { + return (c >= 0xdc00U && c <= 0xdfffU); + } + static bool IsUnicodeChar(unsigned int c) { + if(IsHighSurrogate(c)) + return false; + if (IsLowSurrogate(c)) + return false; + if (c > 0x10ffffU) + return false; + return true; + } + // UTF-16/UTF-32 to UTF-8 + // return: string length + static int EncodeUTF8String(const wchar_t* wsrc, char* str, size_t len) { + if (len == 0) { + str[0] = 0; + return 0; } - *str = 0; - return str - pstr; - } - static int DecodeUTF8(const char * src, wchar_t * wstr) { - const char* p = src; - wchar_t* wp = wstr; - while(*p != 0) { - if((*p & 0x80) == 0) { - *wp = *p; - p++; - } else if((*p & 0xe0) == 0xc0) { - *wp = (((int)p[0] & 0x1f) << 6) | ((int)p[1] & 0x3f); - p += 2; - } else if((*p & 0xf0) == 0xe0) { - *wp = (((int)p[0] & 0xf) << 12) | (((int)p[1] & 0x3f) << 6) | ((int)p[2] & 0x3f); - p += 3; - } else if((*p & 0xf8) == 0xf0) { - *wp = (((int)p[0] & 0x7) << 18) | (((int)p[1] & 0x3f) << 12) | (((int)p[2] & 0x3f) << 6) | ((int)p[3] & 0x3f); - p += 4; - } else - p++; - wp++; + std::mbstate_t state{}; + size_t result_len = std::wcsrtombs(str, &wsrc, len - 1, &state); + if (result_len == static_cast(-1)) + result_len = 0; + str[result_len] = 0; + return static_cast(result_len); + } + // UTF-8 to UTF-16/UTF-32 + // return: string length + static int DecodeUTF8String(const char* src, wchar_t* wstr, size_t len) { + if (len == 0) { + wstr[0] = 0; + return 0; } - *wp = 0; - return wp - wstr; + std::mbstate_t state{}; + size_t result_len = std::mbsrtowcs(wstr, &src, len - 1, &state); + if (result_len == static_cast(-1)) + result_len = 0; + wstr[result_len] = 0; + return static_cast(result_len); + } + template + static int EncodeUTF8(const wchar_t* src, char(&dst)[N]) { + return EncodeUTF8String(src, dst, N); + } + template + static int DecodeUTF8(const char* src, wchar_t(&dst)[N]) { + return DecodeUTF8String(src, dst, N); + } + template + static void NullTerminate(T(&str)[N]) { + str[N - 1] = 0; } static int GetVal(const wchar_t* pstr) { - int ret = 0; - while(*pstr >= L'0' && *pstr <= L'9') { - ret = ret * 10 + (*pstr - L'0'); - pstr++; + if (*pstr >= L'0' && *pstr <= L'9') { + int ret{}; + wchar_t* str_end{}; + ret = std::wcstol(pstr, &str_end, 10); + if (*str_end == 0) + return ret; + else + return 0; } - return ret; + else + return 0; } }; diff --git a/gframe/client_card.cpp b/gframe/client_card.cpp index e9d88f1822..6b48869d68 100644 --- a/gframe/client_card.cpp +++ b/gframe/client_card.cpp @@ -4,220 +4,246 @@ namespace ygo { -ClientCard::ClientCard() { - curAlpha = 255; - dAlpha = 0; - aniFrame = 0; - is_moving = false; - is_fading = false; - is_hovered = false; - is_selectable = false; - is_selected = false; - is_showequip = false; - is_showtarget = false; - is_highlighting = false; - is_disabled = false; - is_reversed = false; - is_conti = false; - cmdFlag = 0; - code = 0; - chain_code = 0; - type = 0; - alias = 0; - level = 0; - rank = 0; - race = 0; - attribute = 0; - attack = 0; - defence = 0; - base_attack = 0; - base_defence = 0; - lscale = 0; - rscale = 0; - cHint = 0; - chValue = 0; - atkstring[0] = 0; - defstring[0] = 0; - lvstring[0] = 0; - rscstring[0] = 0; - lscstring[0] = 0; - overlayTarget = 0; - equipTarget = 0; +ClientCard::~ClientCard() { + ClearTarget(); + if (equipTarget) { + equipTarget->is_showequip = false; + equipTarget->equipped.erase(this); + equipTarget = nullptr; + } + for (auto& card : equipped) { + card->is_showequip = false; + card->equipTarget = nullptr; + } + equipped.clear(); + if (overlayTarget) { + for (auto it = overlayTarget->overlayed.begin(); it != overlayTarget->overlayed.end(); ) { + if (*it == this) { + it = overlayTarget->overlayed.erase(it); + } + else + ++it; + } + overlayTarget = nullptr; + } + for (auto& card : overlayed) { + card->overlayTarget = nullptr; + } + overlayed.clear(); } -void ClientCard::SetCode(int code) { - if((location == LOCATION_HAND) && (this->code != (unsigned int)code)) { - this->code = code; +void ClientCard::SetCode(unsigned int x) { + if (code == x) { + return; + } + if (x == 0) { + chain_code = code; + } + code = x; + if (location == LOCATION_HAND) { mainGame->dField.MoveCard(this, 5); - } else - this->code = code; + } } -void ClientCard::UpdateInfo(char* buf) { - int flag = BufferIO::ReadInt32(buf); - if(flag == 0) +void ClientCard::UpdateInfo(unsigned char* buf) { + int flag = BufferIO::Read(buf); + if (flag == 0) { + ClearData(); return; - int pdata; + } if(flag & QUERY_CODE) { - pdata = BufferIO::ReadInt32(buf); - if((location == LOCATION_HAND) && ((unsigned int)pdata != code)) { - code = pdata; - mainGame->dField.MoveCard(this, 5); - } else - code = pdata; + int pdata = BufferIO::Read(buf); + if (!pdata) + ClearData(); + SetCode(pdata); } if(flag & QUERY_POSITION) { - pdata = BufferIO::ReadInt32(buf); - position = (pdata >> 24) & 0xff; + int pdata = (BufferIO::Read(buf) >> 24) & 0xff; + if((location & (LOCATION_EXTRA | LOCATION_REMOVED)) && pdata != position) { + position = pdata; + mainGame->dField.MoveCard(this, 1); + } else + position = pdata; } if(flag & QUERY_ALIAS) - alias = BufferIO::ReadInt32(buf); + alias = BufferIO::Read(buf); if(flag & QUERY_TYPE) - type = BufferIO::ReadInt32(buf); + type = BufferIO::Read(buf); if(flag & QUERY_LEVEL) { - pdata = BufferIO::ReadInt32(buf); + int pdata = BufferIO::Read(buf); if(level != (unsigned int)pdata) { level = pdata; myswprintf(lvstring, L"L%d", level); } } if(flag & QUERY_RANK) { - pdata = BufferIO::ReadInt32(buf); + int pdata = BufferIO::Read(buf); if(pdata && rank != (unsigned int)pdata) { rank = pdata; myswprintf(lvstring, L"R%d", rank); } } if(flag & QUERY_ATTRIBUTE) - attribute = BufferIO::ReadInt32(buf); + attribute = BufferIO::Read(buf); if(flag & QUERY_RACE) - race = BufferIO::ReadInt32(buf); + race = BufferIO::Read(buf); if(flag & QUERY_ATTACK) { - attack = BufferIO::ReadInt32(buf); + attack = BufferIO::Read(buf); if(attack < 0) { atkstring[0] = '?'; atkstring[1] = 0; } else myswprintf(atkstring, L"%d", attack); } - if(flag & QUERY_DEFENCE) { - defence = BufferIO::ReadInt32(buf); - if(defence < 0) { + if(flag & QUERY_DEFENSE) { + defense = BufferIO::Read(buf); + if(type & TYPE_LINK) { + defstring[0] = '-'; + defstring[1] = 0; + } else if(defense < 0) { defstring[0] = '?'; defstring[1] = 0; } else - myswprintf(defstring, L"%d", defence); + myswprintf(defstring, L"%d", defense); } if(flag & QUERY_BASE_ATTACK) - base_attack = BufferIO::ReadInt32(buf); - if(flag & QUERY_BASE_DEFENCE) - base_defence = BufferIO::ReadInt32(buf); + base_attack = BufferIO::Read(buf); + if(flag & QUERY_BASE_DEFENSE) + base_defense = BufferIO::Read(buf); if(flag & QUERY_REASON) - reason = BufferIO::ReadInt32(buf); + reason = BufferIO::Read(buf); + if(flag & QUERY_REASON_CARD) + buf += 4; if(flag & QUERY_EQUIP_CARD) { - int c = BufferIO::ReadInt8(buf); - int l = BufferIO::ReadInt8(buf); - int s = BufferIO::ReadInt8(buf); - BufferIO::ReadInt8(buf); - ClientCard* ecard = mainGame->dField.GetCard(c, l, s); - equipTarget = ecard; - ecard->equipped.insert(this); + int c = BufferIO::Read(buf); + unsigned int l = BufferIO::Read(buf); + int s = BufferIO::Read(buf); + BufferIO::Read(buf); + ClientCard* ecard = mainGame->dField.GetCard(mainGame->LocalPlayer(c), l, s); + if (ecard) { + equipTarget = ecard; + ecard->equipped.insert(this); + } } if(flag & QUERY_TARGET_CARD) { - int count = BufferIO::ReadInt32(buf); + int count = BufferIO::Read(buf); for(int i = 0; i < count; ++i) { - int c = BufferIO::ReadInt8(buf); - int l = BufferIO::ReadInt8(buf); - int s = BufferIO::ReadInt8(buf); - BufferIO::ReadInt8(buf); - ClientCard* tcard = mainGame->dField.GetCard(c, l, s); - cardTarget.insert(tcard); - tcard->ownerTarget.insert(this); + int c = BufferIO::Read(buf); + unsigned int l = BufferIO::Read(buf); + int s = BufferIO::Read(buf); + BufferIO::Read(buf); + ClientCard* tcard = mainGame->dField.GetCard(mainGame->LocalPlayer(c), l, s); + if (tcard) { + cardTarget.insert(tcard); + tcard->ownerTarget.insert(this); + } } } if(flag & QUERY_OVERLAY_CARD) { - int count = BufferIO::ReadInt32(buf); + int count = BufferIO::Read(buf); for(int i = 0; i < count; ++i) { - overlayed[i]->SetCode(BufferIO::ReadInt32(buf)); + overlayed[i]->SetCode(BufferIO::Read(buf)); } } if(flag & QUERY_COUNTERS) { - int count = BufferIO::ReadInt32(buf); + int count = BufferIO::Read(buf); for(int i = 0; i < count; ++i) { - int ctype = BufferIO::ReadInt16(buf); - int ccount = BufferIO::ReadInt16(buf); + int ctype = BufferIO::Read(buf); + int ccount = BufferIO::Read(buf); counters[ctype] = ccount; } } if(flag & QUERY_OWNER) - owner = BufferIO::ReadInt32(buf); - if(flag & QUERY_IS_DISABLED) - is_disabled = BufferIO::ReadInt32(buf); - if(flag & QUERY_IS_PUBLIC) - is_public = BufferIO::ReadInt32(buf); + owner = BufferIO::Read(buf); + if(flag & QUERY_STATUS) + status = BufferIO::Read(buf); if(flag & QUERY_LSCALE) { - pdata = BufferIO::ReadInt32(buf); - if(pdata && lscale != (unsigned int)pdata) { - lscale = pdata; - myswprintf(lscstring, L"%d", lscale); - } + lscale = BufferIO::Read(buf); + myswprintf(lscstring, L"%d", lscale); } if(flag & QUERY_RSCALE) { - pdata = BufferIO::ReadInt32(buf); - if(pdata && rscale != (unsigned int)pdata) { - rscale = pdata; - myswprintf(rscstring, L"%d", rscale); + rscale = BufferIO::Read(buf); + myswprintf(rscstring, L"%d", rscale); + } + if(flag & QUERY_LINK) { + int pdata = BufferIO::Read(buf); + if (link != (unsigned int)pdata) { + link = pdata; + } + myswprintf(linkstring, L"L\x2012%d", link); + pdata = BufferIO::Read(buf); + if (link_marker != (unsigned int)pdata) { + link_marker = pdata; } } } void ClientCard::ClearTarget() { - for(auto cit = cardTarget.begin(); cit != cardTarget.end(); ++cit) { - if(is_showtarget) - (*cit)->is_showtarget = false; - (*cit)->ownerTarget.erase(this); + for (auto& pcard : cardTarget) { + pcard->is_showtarget = false; + pcard->ownerTarget.erase(this); } - for(auto cit = ownerTarget.begin(); cit != ownerTarget.end(); ++cit) { - if(is_showtarget) - (*cit)->is_showtarget = false; - (*cit)->cardTarget.erase(this); + for (auto& pcard : ownerTarget) { + pcard->is_showtarget = false; + pcard->cardTarget.erase(this); } cardTarget.clear(); ownerTarget.clear(); } +void ClientCard::ClearData() { + alias = 0; + type = 0; + level = 0; + rank = 0; + race = 0; + attribute = 0; + attack = 0; + defense = 0; + base_attack = 0; + base_defense = 0; + lscale = 0; + rscale = 0; + link = 0; + link_marker = 0; + status = 0; + + atkstring[0] = 0; + defstring[0] = 0; + lvstring[0] = 0; + linkstring[0] = 0; + rscstring[0] = 0; + lscstring[0] = 0; + counters.clear(); +} bool ClientCard::client_card_sort(ClientCard* c1, ClientCard* c2) { - int32 cp1 = c1->overlayTarget ? c1->overlayTarget->controler : c1->controler; - int32 cp2 = c2->overlayTarget ? c2->overlayTarget->controler : c2->controler; + if(c1->is_selected != c2->is_selected) + return c1->is_selected < c2->is_selected; + int cp1 = c1->overlayTarget ? c1->overlayTarget->controler : c1->controler; + int cp2 = c2->overlayTarget ? c2->overlayTarget->controler : c2->controler; if(cp1 != cp2) return cp1 < cp2; if(c1->location != c2->location) return c1->location < c2->location; - if(c1->location & LOCATION_OVERLAY) - if(c1->overlayTarget != c2->overlayTarget) + if (c1->location == LOCATION_OVERLAY) { + if (c1->overlayTarget != c2->overlayTarget) return c1->overlayTarget->sequence < c2->overlayTarget->sequence; - else return c1->sequence < c2->sequence; - else { - if(c1->location & 0x71) - return c1->sequence > c2->sequence; else return c1->sequence < c2->sequence; } -} -bool ClientCard::deck_sort_lv(code_pointer p1, code_pointer p2) { - if((p1->second.type & 0x7) != (p2->second.type & 0x7)) - return (p1->second.type & 0x7) < (p2->second.type & 0x7); - if((p1->second.type & 0x7) == 1) { - int type1 = (p1->second.type & 0x8020c0) ? (p1->second.type & 0x8020c1) : (p1->second.type & 0x31); - int type2 = (p2->second.type & 0x8020c0) ? (p2->second.type & 0x8020c1) : (p2->second.type & 0x31); - if(type1 != type2) - return type1 < type2; - if(p1->second.level != p2->second.level) - return p1->second.level > p2->second.level; - if(p1->second.attack != p2->second.attack) - return p1->second.attack > p2->second.attack; - if(p1->second.defence != p2->second.defence) - return p1->second.defence > p2->second.defence; - else return p1->first < p2->first; - } - if((p1->second.type & 0xfffffff8) != (p2->second.type & 0xfffffff8)) - return (p1->second.type & 0xfffffff8) < (p2->second.type & 0xfffffff8); - return p1->first < p2->first; + else if (c1->location == LOCATION_DECK) { + return c1->sequence > c2->sequence; + } + else if (c1->location & (LOCATION_GRAVE | LOCATION_REMOVED | LOCATION_EXTRA)) { + auto it1 = std::find_if(mainGame->dField.chains.rbegin(), mainGame->dField.chains.rend(), [c1](const ChainInfo& ch) { + return c1 == ch.chain_card || ch.target.find(c1) != ch.target.end(); + }); + auto it2 = std::find_if(mainGame->dField.chains.rbegin(), mainGame->dField.chains.rend(), [c2](const ChainInfo& ch) { + return c2 == ch.chain_card || ch.target.find(c2) != ch.target.end(); + }); + if (it1 != mainGame->dField.chains.rend() || it2 != mainGame->dField.chains.rend()) { + return it1 < it2; + } + return c1->sequence > c2->sequence; + } + else { + return c1->sequence < c2->sequence; + } } } diff --git a/gframe/client_card.h b/gframe/client_card.h index 0c89e61358..d4a9c7023e 100644 --- a/gframe/client_card.h +++ b/gframe/client_card.h @@ -4,114 +4,82 @@ #include "config.h" #include #include -#include +#include namespace ygo { -struct CardData { - unsigned int code; - unsigned int alias; - unsigned long long setcode; - unsigned int type; - unsigned int level; - unsigned int attribute; - unsigned int race; - int attack; - int defence; - unsigned int lscale; - unsigned int rscale; -}; -struct CardDataC { - unsigned int code; - unsigned int alias; - unsigned long long setcode; - unsigned int type; - unsigned int level; - unsigned int attribute; - unsigned int race; - int attack; - int defence; - unsigned int lscale; - unsigned int rscale; - unsigned int ot; - unsigned int category; -}; -struct CardString { - wchar_t* name; - wchar_t* text; - wchar_t* desc[16]; -}; -typedef std::unordered_map::iterator code_pointer; - class ClientCard { public: - irr::video::ITexture* curTexture; irr::core::matrix4 mTransform; irr::core::vector3df curPos; irr::core::vector3df curRot; irr::core::vector3df dPos; irr::core::vector3df dRot; - u32 curAlpha; - u32 dAlpha; - u32 aniFrame; - bool is_moving; - bool is_fading; - bool is_hovered; - bool is_selectable; - bool is_selected; - bool is_showequip; - bool is_showtarget; - bool is_highlighting; - bool is_reversed; - bool is_conti; - u32 code; - u32 chain_code; - u32 alias; - u32 type; - u32 level; - u32 rank; - u32 attribute; - u32 race; - s32 attack; - s32 defence; - s32 base_attack; - s32 base_defence; - u32 lscale; - u32 rscale; - u32 reason; - u32 select_seq; - u8 owner; - u8 controler; - u8 location; - u8 sequence; - u8 position; - u8 is_disabled; - u8 is_public; - u8 cHint; - u32 chValue; - u32 opParam; - u32 symbol; - u32 cmdFlag; - ClientCard* overlayTarget; + irr::u32 curAlpha{ 255 }; + irr::u32 dAlpha{ 0 }; + irr::u32 aniFrame{ 0 }; + bool is_moving{ false }; + bool is_fading{ false }; + bool is_hovered{ false }; + bool is_selectable{ false }; + bool is_selected{ false }; + bool is_showequip{ false }; + bool is_showtarget{ false }; + bool is_showchaintarget{ false }; + bool is_highlighting{ false }; + bool is_reversed{ false }; + + unsigned int code{ 0 }; + unsigned int chain_code{ 0 }; + unsigned int alias{ 0 }; + unsigned int type{ 0 }; + unsigned int level{ 0 }; + unsigned int rank{ 0 }; + unsigned int link{ 0 }; + unsigned int attribute{ 0 }; + unsigned int race{ 0 }; + int attack{ 0 }; + int defense{ 0 }; + int base_attack{ 0 }; + int base_defense{ 0 }; + unsigned int lscale{ 0 }; + unsigned int rscale{ 0 }; + unsigned int link_marker{ 0 }; + unsigned int reason{ 0 }; + unsigned int select_seq{ 0 }; + unsigned char owner{ PLAYER_NONE }; + unsigned char controler{ PLAYER_NONE }; + unsigned char location{ 0 }; + unsigned char sequence{ 0 }; + unsigned char position{ 0 }; + unsigned int status{ 0 }; + unsigned char cHint{ 0 }; + unsigned int chValue{ 0 }; + unsigned int opParam{ 0 }; + unsigned int symbol{ 0 }; + unsigned int cmdFlag{ 0 }; + ClientCard* overlayTarget{ nullptr }; std::vector overlayed; - ClientCard* equipTarget; + ClientCard* equipTarget{ nullptr }; std::set equipped; std::set cardTarget; std::set ownerTarget; std::map counters; std::map desc_hints; - wchar_t atkstring[16]; - wchar_t defstring[16]; - wchar_t lvstring[16]; - wchar_t lscstring[16]; - wchar_t rscstring[16]; + wchar_t atkstring[16]{}; + wchar_t defstring[16]{}; + wchar_t lvstring[16]{}; + wchar_t linkstring[16]{}; + wchar_t lscstring[16]{}; + wchar_t rscstring[16]{}; - ClientCard(); - void SetCode(int code); - void UpdateInfo(char* buf); + ClientCard() = default; + ~ClientCard(); + void SetCode(unsigned int x); + void UpdateInfo(unsigned char* buf); void ClearTarget(); + void ClearData(); static bool client_card_sort(ClientCard* c1, ClientCard* c2); - static bool deck_sort_lv(code_pointer l1, code_pointer l2); }; } diff --git a/gframe/client_field.cpp b/gframe/client_field.cpp index debf5a387b..c78f8a5d3f 100644 --- a/gframe/client_field.cpp +++ b/gframe/client_field.cpp @@ -1,104 +1,155 @@ +#include #include "client_field.h" #include "client_card.h" +#include "duelclient.h" #include "data_manager.h" #include "image_manager.h" #include "game.h" #include "materials.h" -#include "../ocgcore/field.h" namespace ygo { ClientField::ClientField() { - panel = 0; - hovered_card = 0; - clicked_card = 0; - highlighting_card = 0; - deck_act = false; - grave_act = false; - remove_act = false; - extra_act = false; - pzone_act[0] = false; - pzone_act[1] = false; - deck_reversed = false; for(int p = 0; p < 2; ++p) { - for(int i = 0; i < 5; ++i) - mzone[p].push_back(0); - for(int i = 0; i < 8; ++i) - szone[p].push_back(0); + mzone[p].resize(7, 0); + szone[p].resize(8, 0); + } + rnd.seed(std::random_device()()); +} +ClientField::~ClientField() { + for (int i = 0; i < 2; ++i) { + for (auto& card : deck[i]) { + delete card; + } + deck[i].clear(); + for (auto& card : hand[i]) { + delete card; + } + hand[i].clear(); + for (auto& card : mzone[i]) { + delete card; + card = nullptr; + } + for (auto& card : szone[i]) { + delete card; + card = nullptr; + } + for (auto& card : grave[i]) { + delete card; + } + grave[i].clear(); + for (auto& card : remove[i]) { + delete card; + } + remove[i].clear(); + for (auto& card : extra[i]) { + delete card; + } + extra[i].clear(); } + for (auto& card : overlay_cards) { + delete card; + } + overlay_cards.clear(); } void ClientField::Clear() { for(int i = 0; i < 2; ++i) { - for(auto cit = deck[i].begin(); cit != deck[i].end(); ++cit) - delete *cit; + for (auto& card : deck[i]) { + delete card; + } deck[i].clear(); - for(auto cit = hand[i].begin(); cit != hand[i].end(); ++cit) - delete *cit; + for (auto& card : hand[i]) { + delete card; + } hand[i].clear(); - for(auto cit = mzone[i].begin(); cit != mzone[i].end(); ++cit) { - if(*cit) - delete *cit; - *cit = 0; - } - for(auto cit = szone[i].begin(); cit != szone[i].end(); ++cit) { - if(*cit) - delete *cit; - *cit = 0; - } - for(auto cit = grave[i].begin(); cit != grave[i].end(); ++cit) - delete *cit; + for (auto& card : mzone[i]) { + delete card; + card = nullptr; + } + for (auto& card : szone[i]) { + delete card; + card = nullptr; + } + for (auto& card : grave[i]) { + delete card; + } grave[i].clear(); - for(auto cit = remove[i].begin(); cit != remove[i].end(); ++cit) - delete *cit; + for (auto& card : remove[i]) { + delete card; + } remove[i].clear(); - for(auto cit = extra[i].begin(); cit != extra[i].end(); ++cit) - delete *cit; + for (auto& card : extra[i]) { + delete card; + } extra[i].clear(); + deck_act[i] = false; + grave_act[i] = false; + remove_act[i] = false; + extra_act[i] = false; + pzone_act[i] = false; + } + for (auto& card : overlay_cards) { + delete card; } - for(auto sit = overlay_cards.begin(); sit != overlay_cards.end(); ++sit) - delete *sit; overlay_cards.clear(); extra_p_count[0] = 0; extra_p_count[1] = 0; + player_desc_hints[0].clear(); + player_desc_hints[1].clear(); chains.clear(); + activatable_cards.clear(); + summonable_cards.clear(); + spsummonable_cards.clear(); + msetable_cards.clear(); + ssetable_cards.clear(); + reposable_cards.clear(); + attackable_cards.clear(); disabled_field = 0; - deck_act = false; - grave_act = false; - remove_act = false; - extra_act = false; - pzone_act[0] = false; - pzone_act[1] = false; + panel = 0; + hovered_card = 0; + clicked_card = 0; + highlighting_card = 0; + menu_card = 0; + hovered_controler = 0; + hovered_location = 0; + hovered_sequence = 0; + conti_act = false; deck_reversed = false; + cant_check_grave = false; + tag_surrender = false; + tag_teammate_surrender = false; +} +void ClientField::Initial(int player, int deckc, int extrac, int sidec) { + auto load_location = [&](std::vector& container, int count, uint8_t location) { + for(int i = 0; i < count; ++i) { + ClientCard* pcard = new ClientCard; + container.push_back(pcard); + pcard->owner = player; + pcard->controler = player; + pcard->location = location; + pcard->sequence = i; + pcard->position = POS_FACEDOWN_DEFENSE; + GetCardLocation(pcard, &pcard->curPos, &pcard->curRot, true); + } + }; + + load_location(deck[player], deckc, LOCATION_DECK); + load_location(extra[player], extrac, LOCATION_EXTRA); + load_location(remove[player], sidec, LOCATION_REMOVED); } -void ClientField::Initial(int player, int deckc, int extrac) { - ClientCard* pcard; - for(int i = 0; i < deckc; ++i) { - pcard = new ClientCard; - deck[player].push_back(pcard); - pcard->owner = player; - pcard->controler = player; - pcard->location = 0x1; - pcard->sequence = i; - GetCardLocation(pcard, &pcard->curPos, &pcard->curRot); - pcard->mTransform.setTranslation(pcard->curPos); - pcard->mTransform.setRotationRadians(pcard->curRot); - } - for(int i = 0; i < extrac; ++i) { - pcard = new ClientCard; - extra[player].push_back(pcard); - pcard->owner = player; - pcard->controler = player; - pcard->location = 0x40; - pcard->sequence = i; - pcard->position = POS_FACEDOWN_DEFENCE; - GetCardLocation(pcard, &pcard->curPos, &pcard->curRot); - pcard->mTransform.setTranslation(pcard->curPos); - pcard->mTransform.setRotationRadians(pcard->curRot); +void ClientField::ResetSequence(std::vector& list, bool reset_height) { + unsigned char seq = 0; + for (auto& pcard : list) { + pcard->sequence = seq++; + if (reset_height) { + pcard->curPos.Z = 0.01f + 0.01f * pcard->sequence; + pcard->mTransform.setTranslation(pcard->curPos); + } } } ClientCard* ClientField::GetCard(int controler, int location, int sequence, int sub_seq) { std::vector* lst = 0; - bool is_xyz = (location & 0x80) != 0; + bool is_xyz = (location & LOCATION_OVERLAY) != 0; location &= 0x7f; switch(location) { case LOCATION_DECK: @@ -147,22 +198,19 @@ void ClientField::AddCard(ClientCard* pcard, int controler, int location, int se case LOCATION_DECK: { if (sequence != 0 || deck[controler].size() == 0) { deck[controler].push_back(pcard); - pcard->sequence = deck[controler].size() - 1; } else { - deck[controler].push_back(0); - for(int i = deck[controler].size() - 1; i > 0; --i) { - deck[controler][i] = deck[controler][i - 1]; - deck[controler][i]->sequence++; - } - deck[controler][0] = pcard; - pcard->sequence = 0; + deck[controler].insert(deck[controler].begin(), pcard); } + ResetSequence(deck[controler], true); pcard->is_reversed = false; + pcard->ClearData(); + pcard->ClearTarget(); + SetShowMark(pcard, false); break; } case LOCATION_HAND: { hand[controler].push_back(pcard); - pcard->sequence = hand[controler].size() - 1; + ResetSequence(hand[controler], false); break; } case LOCATION_MZONE: { @@ -175,25 +223,30 @@ void ClientField::AddCard(ClientCard* pcard, int controler, int location, int se } case LOCATION_GRAVE: { grave[controler].push_back(pcard); - pcard->sequence = grave[controler].size() - 1; + pcard->sequence = (unsigned char)(grave[controler].size() - 1); break; } case LOCATION_REMOVED: { remove[controler].push_back(pcard); - pcard->sequence = remove[controler].size() - 1; + pcard->sequence = (unsigned char)(remove[controler].size() - 1); break; } case LOCATION_EXTRA: { - extra[controler].push_back(pcard); - pcard->sequence = extra[controler].size() - 1; - if ((pcard->type & TYPE_PENDULUM) && (pcard->position & POS_FACEUP)) + if(extra_p_count[controler] == 0 || (pcard->position & POS_FACEUP)) { + extra[controler].push_back(pcard); + } else { + size_t faceup_begin = extra[controler].size() - extra_p_count[controler]; + extra[controler].insert(extra[controler].begin() + faceup_begin, pcard); + } + ResetSequence(extra[controler], true); + if (pcard->position & POS_FACEUP) extra_p_count[controler]++; break; } } } ClientCard* ClientField::RemoveCard(int controler, int location, int sequence) { - ClientCard* pcard = 0; + ClientCard* pcard = nullptr; switch (location) { case LOCATION_DECK: { pcard = deck[controler][sequence]; @@ -208,21 +261,18 @@ ClientCard* ClientField::RemoveCard(int controler, int location, int sequence) { } case LOCATION_HAND: { pcard = hand[controler][sequence]; - for (size_t i = sequence; i < hand[controler].size() - 1; ++i) { - hand[controler][i] = hand[controler][i + 1]; - hand[controler][i]->sequence--; - } - hand[controler].erase(hand[controler].end() - 1); + hand[controler].erase(hand[controler].begin() + sequence); + ResetSequence(hand[controler], false); break; } case LOCATION_MZONE: { pcard = mzone[controler][sequence]; - mzone[controler][sequence] = 0; + mzone[controler][sequence] = nullptr; break; } case LOCATION_SZONE: { pcard = szone[controler][sequence]; - szone[controler][sequence] = 0; + szone[controler][sequence] = nullptr; break; } case LOCATION_GRAVE: { @@ -256,22 +306,24 @@ ClientCard* ClientField::RemoveCard(int controler, int location, int sequence) { extra[controler][i]->mTransform.setTranslation(extra[controler][i]->curPos); } extra[controler].erase(extra[controler].end() - 1); - if ((pcard->type & TYPE_PENDULUM) && (pcard->position & POS_FACEUP)) + if (pcard->position & POS_FACEUP) extra_p_count[controler]--; break; } + default: + return nullptr; } pcard->location = 0; return pcard; } -void ClientField::UpdateCard(int controler, int location, int sequence, char* data) { +void ClientField::UpdateCard(int controler, int location, int sequence, unsigned char* data) { ClientCard* pcard = GetCard(controler, location, sequence); - if(pcard) - pcard->UpdateInfo(data + 4); + int len = BufferIO::Read(data); + if (pcard && len > LEN_HEADER) + pcard->UpdateInfo(data); } -void ClientField::UpdateFieldCard(int controler, int location, char* data) { +void ClientField::UpdateFieldCard(int controler, int location, unsigned char* data) { std::vector* lst = 0; - std::vector::iterator cit; switch(location) { case LOCATION_DECK: lst = &deck[controler]; @@ -298,90 +350,162 @@ void ClientField::UpdateFieldCard(int controler, int location, char* data) { if(!lst) return; int len; - for(cit = lst->begin(); cit != lst->end(); ++cit) { - len = BufferIO::ReadInt32(data); - if(len > 8) + for(auto cit = lst->begin(); cit != lst->end(); ++cit) { + len = BufferIO::Read(data); + if(len > LEN_HEADER) (*cit)->UpdateInfo(data); data += len - 4; } } void ClientField::ClearCommandFlag() { - std::vector::iterator cit; - for(cit = activatable_cards.begin(); cit != activatable_cards.end(); ++cit) + for(auto cit = activatable_cards.begin(); cit != activatable_cards.end(); ++cit) (*cit)->cmdFlag = 0; - for(cit = summonable_cards.begin(); cit != summonable_cards.end(); ++cit) + for(auto cit = summonable_cards.begin(); cit != summonable_cards.end(); ++cit) (*cit)->cmdFlag = 0; - for(cit = spsummonable_cards.begin(); cit != spsummonable_cards.end(); ++cit) + for(auto cit = spsummonable_cards.begin(); cit != spsummonable_cards.end(); ++cit) (*cit)->cmdFlag = 0; - for(cit = msetable_cards.begin(); cit != msetable_cards.end(); ++cit) + for(auto cit = msetable_cards.begin(); cit != msetable_cards.end(); ++cit) (*cit)->cmdFlag = 0; - for(cit = ssetable_cards.begin(); cit != ssetable_cards.end(); ++cit) + for(auto cit = ssetable_cards.begin(); cit != ssetable_cards.end(); ++cit) (*cit)->cmdFlag = 0; - for(cit = reposable_cards.begin(); cit != reposable_cards.end(); ++cit) + for(auto cit = reposable_cards.begin(); cit != reposable_cards.end(); ++cit) (*cit)->cmdFlag = 0; - for(cit = attackable_cards.begin(); cit != attackable_cards.end(); ++cit) + for(auto cit = attackable_cards.begin(); cit != attackable_cards.end(); ++cit) (*cit)->cmdFlag = 0; - deck_act = false; - extra_act = false; - grave_act = false; - remove_act = false; - pzone_act[0] = false; - pzone_act[1] = false; + for(int i = 0; i < 2; ++i) { + deck_act[i] = false; + extra_act[i] = false; + grave_act[i] = false; + remove_act[i] = false; + pzone_act[i] = false; + } + conti_cards.clear(); + conti_act = false; } void ClientField::ClearSelect() { - std::vector::iterator cit; - for(cit = selectable_cards.begin(); cit != selectable_cards.end(); ++cit) { + for(auto cit = selectable_cards.begin(); cit != selectable_cards.end(); ++cit) { + (*cit)->is_selectable = false; + (*cit)->is_selected = false; + } + for(auto cit = selected_cards.begin(); cit != selected_cards.end(); ++cit) { + (*cit)->is_selectable = false; + (*cit)->is_selected = false; + } + for(auto cit = selectsum_all.begin(); cit != selectsum_all.end(); ++cit) { + (*cit)->is_selectable = false; + (*cit)->is_selected = false; + } + for(auto cit = selectsum_cards.begin(); cit != selectsum_cards.end(); ++cit) { (*cit)->is_selectable = false; (*cit)->is_selected = false; } } void ClientField::ClearChainSelect() { - std::vector::iterator cit; - for(cit = activatable_cards.begin(); cit != activatable_cards.end(); ++cit) { + for(auto cit = activatable_cards.begin(); cit != activatable_cards.end(); ++cit) { (*cit)->cmdFlag = 0; (*cit)->chain_code = 0; (*cit)->is_selectable = false; (*cit)->is_selected = false; - (*cit)->is_conti = false; + } + for(int i = 0; i < 2; ++i) { + deck_act[i] = false; + extra_act[i] = false; + grave_act[i] = false; + remove_act[i] = false; + pzone_act[i] = false; } conti_cards.clear(); - grave_act = false; - remove_act = false; - extra_act = false; + conti_act = false; } -void ClientField::ShowSelectCard(bool buttonok, bool chain) { +// needs to be synchronized with EGET_SCROLL_BAR_CHANGED +void ClientField::ShowSelectCard(bool buttonok, bool is_continuous) { + select_continuous = is_continuous; + if(cant_check_grave) { + bool has_card_in_grave = false; + for (auto& pcard : selectable_cards) { + if (pcard->location == LOCATION_GRAVE) { + has_card_in_grave = true; + break; + } + } + if(has_card_in_grave) { + std::shuffle(selectable_cards.begin(), selectable_cards.end(), rnd); + } + } + int startpos; + int ct; if(selectable_cards.size() <= 5) { - int startpos = 30 + 125 * (5 - selectable_cards.size()) / 2; - for(size_t i = 0; i < selectable_cards.size(); ++i) { - if(selectable_cards[i]->code) - mainGame->imageLoading.insert(std::make_pair(mainGame->btnCardSelect[i], selectable_cards[i]->code)); - else if(chain) - mainGame->imageLoading.insert(std::make_pair(mainGame->btnCardSelect[i], selectable_cards[i]->chain_code)); + startpos = 30 + 125 * (5 - selectable_cards.size()) / 2; + ct = selectable_cards.size(); + } else { + startpos = 30; + ct = 5; + } + for(int i = 0; i < ct; ++i) { + mainGame->stCardPos[i]->enableOverrideColor(false); + // image + if(selectable_cards[i]->code) + mainGame->imageLoading.insert(std::make_pair(mainGame->btnCardSelect[i], selectable_cards[i]->code)); + else if(select_continuous) + mainGame->imageLoading.insert(std::make_pair(mainGame->btnCardSelect[i], selectable_cards[i]->chain_code)); + else + mainGame->btnCardSelect[i]->setImage(imageManager.tCover[selectable_cards[i]->controler + 2]); + mainGame->btnCardSelect[i]->setRelativePosition(irr::core::rect(startpos + i * 125, 55, startpos + 120 + i * 125, 225)); + mainGame->btnCardSelect[i]->setPressed(false); + mainGame->btnCardSelect[i]->setVisible(true); + if(mainGame->dInfo.curMsg != MSG_SORT_CARD) { + // text + wchar_t formatBuffer[2048]; + if (select_continuous) + myswprintf(formatBuffer, L"%ls", dataManager.unknown_string); + else if (cant_check_grave && selectable_cards[i]->location == LOCATION_GRAVE) + myswprintf(formatBuffer, L"%ls", dataManager.FormatLocation(selectable_cards[i]->location, 0)); + else if (selectable_cards[i]->location == LOCATION_OVERLAY) + myswprintf(formatBuffer, L"%ls[%d](%d)", + dataManager.FormatLocation(selectable_cards[i]->overlayTarget), selectable_cards[i]->overlayTarget->sequence + 1, selectable_cards[i]->sequence + 1); else - mainGame->btnCardSelect[i]->setImage(imageManager.tCover); - mainGame->btnCardSelect[i]->setRelativePosition(rect(startpos + i * 125, 55, startpos + 120 + i * 125, 225)); - mainGame->btnCardSelect[i]->setPressed(false); - mainGame->btnCardSelect[i]->setVisible(true); - if(mainGame->dInfo.curMsg != MSG_SORT_CHAIN && mainGame->dInfo.curMsg != MSG_SORT_CARD) { - if(chain && selectable_cards[i]->is_conti) - myswprintf(formatBuffer, L"%ls", DataManager::unknown_string); - else - myswprintf(formatBuffer, L"%ls[%d]", dataManager.FormatLocation(selectable_cards[i]->location, selectable_cards[i]->sequence), - selectable_cards[i]->sequence + 1); - mainGame->stCardPos[i]->setText(formatBuffer); - mainGame->stCardPos[i]->setVisible(true); - if(selectable_cards[i]->controler) - mainGame->stCardPos[i]->setBackgroundColor(0xffd0d0d0); - else mainGame->stCardPos[i]->setBackgroundColor(0xffffffff); - } else { - if(sort_list[i]) { - myswprintf(formatBuffer, L"%d", sort_list[i]); - mainGame->stCardPos[i]->setText(formatBuffer); - } else mainGame->stCardPos[i]->setText(L""); - mainGame->stCardPos[i]->setBackgroundColor(0xffffffff); + myswprintf(formatBuffer, L"%ls[%d]", dataManager.FormatLocation(selectable_cards[i]), selectable_cards[i]->sequence + 1); + mainGame->stCardPos[i]->setText(formatBuffer); + // color + if (selectable_cards[i]->is_selected) + mainGame->stCardPos[i]->setBackgroundColor(0xffffff00); + else { + if(select_continuous) + mainGame->stCardPos[i]->setBackgroundColor(0xffffffff); + else if(selectable_cards[i]->location == LOCATION_OVERLAY) { + if(selectable_cards[i]->owner != selectable_cards[i]->overlayTarget->controler) + mainGame->stCardPos[i]->setOverrideColor(0xff0000ff); + if(selectable_cards[i]->overlayTarget->controler) + mainGame->stCardPos[i]->setBackgroundColor(0xffd0d0d0); + else + mainGame->stCardPos[i]->setBackgroundColor(0xffffffff); + } else if(selectable_cards[i]->location == LOCATION_DECK || selectable_cards[i]->location == LOCATION_EXTRA || selectable_cards[i]->location == LOCATION_REMOVED) { + if(selectable_cards[i]->position & POS_FACEDOWN) + mainGame->stCardPos[i]->setOverrideColor(0xff0000ff); + if(selectable_cards[i]->controler) + mainGame->stCardPos[i]->setBackgroundColor(0xffd0d0d0); + else + mainGame->stCardPos[i]->setBackgroundColor(0xffffffff); + } else { + if(selectable_cards[i]->controler) + mainGame->stCardPos[i]->setBackgroundColor(0xffd0d0d0); + else + mainGame->stCardPos[i]->setBackgroundColor(0xffffffff); + } } - mainGame->stCardPos[i]->setRelativePosition(rect(startpos + 10 + i * 125, 30, startpos + 109 + i * 125, 50)); + } else { + if(sort_list[i]) { + wchar_t formatBuffer[2048]; + myswprintf(formatBuffer, L"%d", sort_list[i]); + mainGame->stCardPos[i]->setText(formatBuffer); + } else + mainGame->stCardPos[i]->setText(L""); + mainGame->stCardPos[i]->setBackgroundColor(0xffffffff); } + mainGame->stCardPos[i]->setVisible(true); + mainGame->stCardPos[i]->setRelativePosition(irr::core::rect(startpos + i * 125, 30, startpos + 120 + i * 125, 50)); + } + if(selectable_cards.size() <= 5) { for(int i = selectable_cards.size(); i < 5; ++i) { mainGame->btnCardSelect[i]->setVisible(false); mainGame->stCardPos[i]->setVisible(false); @@ -389,66 +513,50 @@ void ClientField::ShowSelectCard(bool buttonok, bool chain) { mainGame->scrCardList->setPos(0); mainGame->scrCardList->setVisible(false); } else { - for(int i = 0; i < 5; ++i) { - if(selectable_cards[i]->code) - mainGame->imageLoading.insert(std::make_pair(mainGame->btnCardSelect[i], selectable_cards[i]->code)); - else if(chain) - mainGame->imageLoading.insert(std::make_pair(mainGame->btnCardSelect[i], selectable_cards[i]->chain_code)); - else - mainGame->btnCardSelect[i]->setImage(imageManager.tCover); - mainGame->btnCardSelect[i]->setRelativePosition(rect(30 + i * 125, 55, 30 + 120 + i * 125, 225)); - mainGame->btnCardSelect[i]->setPressed(false); - mainGame->btnCardSelect[i]->setVisible(true); - if(mainGame->dInfo.curMsg != MSG_SORT_CHAIN && mainGame->dInfo.curMsg != MSG_SORT_CARD) { - if(chain && selectable_cards[i]->is_conti) - myswprintf(formatBuffer, L"%ls", DataManager::unknown_string); - else - myswprintf(formatBuffer, L"%ls[%d]", dataManager.FormatLocation(selectable_cards[i]->location, selectable_cards[i]->sequence), - selectable_cards[i]->sequence + 1); - mainGame->stCardPos[i]->setText(formatBuffer); - mainGame->stCardPos[i]->setVisible(true); - if(selectable_cards[i]->controler) - mainGame->stCardPos[i]->setBackgroundColor(0xffd0d0d0); - else mainGame->stCardPos[i]->setBackgroundColor(0xffffffff); - } else { - if(sort_list[i]) { - myswprintf(formatBuffer, L"%d", sort_list[i]); - mainGame->stCardPos[i]->setText(formatBuffer); - } else mainGame->stCardPos[i]->setText(L""); - mainGame->stCardPos[i]->setBackgroundColor(0xffffffff); - } - mainGame->stCardPos[i]->setRelativePosition(rect(40 + i * 125, 30, 139 + i * 125, 50)); - } mainGame->scrCardList->setVisible(true); mainGame->scrCardList->setMin(0); mainGame->scrCardList->setMax((selectable_cards.size() - 5) * 10 + 9); mainGame->scrCardList->setPos(0); } - if(buttonok) - mainGame->btnSelectOK->setVisible(true); - else mainGame->btnSelectOK->setVisible(false); + mainGame->btnSelectOK->setVisible(buttonok); mainGame->PopupElement(mainGame->wCardSelect); } void ClientField::ShowChainCard() { + int startpos; + int ct; if(selectable_cards.size() <= 5) { - int startpos = 30 + 125 * (5 - selectable_cards.size()) / 2; - for(size_t i = 0; i < selectable_cards.size(); ++i) { - if(selectable_cards[i]->code) - mainGame->imageLoading.insert(std::make_pair(mainGame->btnCardSelect[i], selectable_cards[i]->code)); - else - mainGame->btnCardSelect[i]->setImage(imageManager.tCover); - mainGame->btnCardSelect[i]->setRelativePosition(rect(startpos + i * 125, 55, startpos + 120 + i * 125, 225)); - mainGame->btnCardSelect[i]->setPressed(false); - mainGame->btnCardSelect[i]->setVisible(true); - myswprintf(formatBuffer, L"%ls[%d]", dataManager.FormatLocation(selectable_cards[i]->location, selectable_cards[i]->sequence), - selectable_cards[i]->sequence + 1); - mainGame->stCardPos[i]->setText(formatBuffer); - mainGame->stCardPos[i]->setVisible(true); + startpos = 30 + 125 * (5 - selectable_cards.size()) / 2; + ct = selectable_cards.size(); + } else { + startpos = 30; + ct = 5; + } + for(int i = 0; i < ct; ++i) { + if(selectable_cards[i]->code) + mainGame->imageLoading.insert(std::make_pair(mainGame->btnCardSelect[i], selectable_cards[i]->code)); + else + mainGame->btnCardSelect[i]->setImage(imageManager.tCover[selectable_cards[i]->controler + 2]); + mainGame->btnCardSelect[i]->setRelativePosition(irr::core::rect(startpos + i * 125, 55, startpos + 120 + i * 125, 225)); + mainGame->btnCardSelect[i]->setPressed(false); + mainGame->btnCardSelect[i]->setVisible(true); + wchar_t formatBuffer[2048]; + myswprintf(formatBuffer, L"%ls[%d]", dataManager.FormatLocation(selectable_cards[i]), selectable_cards[i]->sequence + 1); + mainGame->stCardPos[i]->setText(formatBuffer); + if(selectable_cards[i]->location == LOCATION_OVERLAY) { + if(selectable_cards[i]->owner != selectable_cards[i]->overlayTarget->controler) + mainGame->stCardPos[i]->setOverrideColor(0xff0000ff); + if(selectable_cards[i]->overlayTarget->controler) + mainGame->stCardPos[i]->setBackgroundColor(0xffd0d0d0); + else mainGame->stCardPos[i]->setBackgroundColor(0xffffffff); + } else { if(selectable_cards[i]->controler) mainGame->stCardPos[i]->setBackgroundColor(0xffd0d0d0); else mainGame->stCardPos[i]->setBackgroundColor(0xffffffff); - mainGame->stCardPos[i]->setRelativePosition(rect(startpos + 10 + i * 125, 30, startpos + 109 + i * 125, 50)); } + mainGame->stCardPos[i]->setVisible(true); + mainGame->stCardPos[i]->setRelativePosition(irr::core::rect(startpos + i * 125, 30, startpos + 120 + i * 125, 50)); + } + if(selectable_cards.size() <= 5) { for(int i = selectable_cards.size(); i < 5; ++i) { mainGame->btnCardSelect[i]->setVisible(false); mainGame->stCardPos[i]->setVisible(false); @@ -456,23 +564,6 @@ void ClientField::ShowChainCard() { mainGame->scrCardList->setPos(0); mainGame->scrCardList->setVisible(false); } else { - for(int i = 0; i < 5; ++i) { - if(selectable_cards[i]->code) - mainGame->imageLoading.insert(std::make_pair(mainGame->btnCardSelect[i], selectable_cards[i]->code)); - else - mainGame->btnCardSelect[i]->setImage(imageManager.tCover); - mainGame->btnCardSelect[i]->setRelativePosition(rect(30 + i * 125, 55, 30 + 120 + i * 125, 225)); - mainGame->btnCardSelect[i]->setPressed(false); - mainGame->btnCardSelect[i]->setVisible(true); - myswprintf(formatBuffer, L"%ls[%d]", dataManager.FormatLocation(selectable_cards[i]->location, selectable_cards[i]->sequence), - selectable_cards[i]->sequence + 1); - mainGame->stCardPos[i]->setText(formatBuffer); - mainGame->stCardPos[i]->setVisible(true); - if(selectable_cards[i]->controler) - mainGame->stCardPos[i]->setBackgroundColor(0xffd0d0d0); - else mainGame->stCardPos[i]->setBackgroundColor(0xffffffff); - mainGame->stCardPos[i]->setRelativePosition(rect(40 + i * 125, 30, 139 + i * 125, 50)); - } mainGame->scrCardList->setVisible(true); mainGame->scrCardList->setMin(0); mainGame->scrCardList->setMax((selectable_cards.size() - 5) * 10 + 9); @@ -484,25 +575,55 @@ void ClientField::ShowChainCard() { mainGame->PopupElement(mainGame->wCardSelect); } void ClientField::ShowLocationCard() { + int startpos; + int ct; if(display_cards.size() <= 5) { - int startpos = 30 + 125 * (5 - display_cards.size()) / 2; - for(size_t i = 0; i < display_cards.size(); ++i) { - if(display_cards[i]->code) - mainGame->imageLoading.insert(std::make_pair(mainGame->btnCardDisplay[i], display_cards[i]->code)); + startpos = 30 + 125 * (5 - display_cards.size()) / 2; + ct = display_cards.size(); + } else { + startpos = 30; + ct = 5; + } + for(int i = 0; i < ct; ++i) { + mainGame->stDisplayPos[i]->enableOverrideColor(false); + if(display_cards[i]->code) + mainGame->imageLoading.insert(std::make_pair(mainGame->btnCardDisplay[i], display_cards[i]->code)); + else + mainGame->btnCardDisplay[i]->setImage(imageManager.tCover[display_cards[i]->controler + 2]); + mainGame->btnCardDisplay[i]->setRelativePosition(irr::core::rect(startpos + i * 125, 55, startpos + 120 + i * 125, 225)); + mainGame->btnCardDisplay[i]->setPressed(false); + mainGame->btnCardDisplay[i]->setVisible(true); + wchar_t formatBuffer[2048]; + if (display_cards[i]->location == LOCATION_OVERLAY) + myswprintf(formatBuffer, L"%ls[%d](%d)", + dataManager.FormatLocation(display_cards[i]->overlayTarget), display_cards[i]->overlayTarget->sequence + 1, display_cards[i]->sequence + 1); + else + myswprintf(formatBuffer, L"%ls[%d]", dataManager.FormatLocation(display_cards[i]), display_cards[i]->sequence + 1); + mainGame->stDisplayPos[i]->setText(formatBuffer); + if(display_cards[i]->location == LOCATION_OVERLAY) { + if(display_cards[i]->owner != display_cards[i]->overlayTarget->controler) + mainGame->stDisplayPos[i]->setOverrideColor(0xff0000ff); + if(display_cards[i]->overlayTarget->controler) + mainGame->stDisplayPos[i]->setBackgroundColor(0xffd0d0d0); + else + mainGame->stDisplayPos[i]->setBackgroundColor(0xffffffff); + } else if(display_cards[i]->location == LOCATION_EXTRA || display_cards[i]->location == LOCATION_REMOVED) { + if(display_cards[i]->position & POS_FACEDOWN) + mainGame->stDisplayPos[i]->setOverrideColor(0xff0000ff); + if(display_cards[i]->controler) + mainGame->stDisplayPos[i]->setBackgroundColor(0xffd0d0d0); else - mainGame->btnCardDisplay[i]->setImage(imageManager.tCover); - mainGame->btnCardDisplay[i]->setRelativePosition(rect(startpos + i * 125, 55, startpos + 120 + i * 125, 225)); - mainGame->btnCardDisplay[i]->setPressed(false); - mainGame->btnCardDisplay[i]->setVisible(true); - myswprintf(formatBuffer, L"%ls[%d]", dataManager.FormatLocation(display_cards[i]->location, display_cards[i]->sequence), - display_cards[i]->sequence + 1); - mainGame->stDisplayPos[i]->setText(formatBuffer); - mainGame->stDisplayPos[i]->setVisible(true); + mainGame->stDisplayPos[i]->setBackgroundColor(0xffffffff); + } else { if(display_cards[i]->controler) mainGame->stDisplayPos[i]->setBackgroundColor(0xffd0d0d0); - else mainGame->stDisplayPos[i]->setBackgroundColor(0xffffffff); - mainGame->stDisplayPos[i]->setRelativePosition(rect(startpos + 10 + i * 125, 30, startpos + 109 + i * 125, 50)); + else + mainGame->stDisplayPos[i]->setBackgroundColor(0xffffffff); } + mainGame->stDisplayPos[i]->setVisible(true); + mainGame->stDisplayPos[i]->setRelativePosition(irr::core::rect(startpos + i * 125, 30, startpos + 120 + i * 125, 50)); + } + if(display_cards.size() <= 5) { for(int i = display_cards.size(); i < 5; ++i) { mainGame->btnCardDisplay[i]->setVisible(false); mainGame->stDisplayPos[i]->setVisible(false); @@ -510,23 +631,6 @@ void ClientField::ShowLocationCard() { mainGame->scrDisplayList->setPos(0); mainGame->scrDisplayList->setVisible(false); } else { - for(int i = 0; i < 5; ++i) { - if(display_cards[i]->code) - mainGame->imageLoading.insert(std::make_pair(mainGame->btnCardDisplay[i], display_cards[i]->code)); - else - mainGame->btnCardDisplay[i]->setImage(imageManager.tCover); - mainGame->btnCardDisplay[i]->setRelativePosition(rect(30 + i * 125, 55, 30 + 120 + i * 125, 225)); - mainGame->btnCardDisplay[i]->setPressed(false); - mainGame->btnCardDisplay[i]->setVisible(true); - myswprintf(formatBuffer, L"%ls[%d]", dataManager.FormatLocation(display_cards[i]->location, display_cards[i]->sequence), - display_cards[i]->sequence + 1); - mainGame->stDisplayPos[i]->setText(formatBuffer); - mainGame->stDisplayPos[i]->setVisible(true); - if(display_cards[i]->controler) - mainGame->stDisplayPos[i]->setBackgroundColor(0xffd0d0d0); - else mainGame->stDisplayPos[i]->setBackgroundColor(0xffffffff); - mainGame->stDisplayPos[i]->setRelativePosition(rect(40 + i * 125, 30, 139 + i * 125, 50)); - } mainGame->scrDisplayList->setVisible(true); mainGame->scrDisplayList->setMin(0); mainGame->scrDisplayList->setMax((display_cards.size() - 5) * 10 + 9); @@ -535,6 +639,60 @@ void ClientField::ShowLocationCard() { mainGame->btnDisplayOK->setVisible(true); mainGame->PopupElement(mainGame->wCardDisplay); } +void ClientField::ShowSelectOption(int select_hint) { + selected_option = 0; + wchar_t textBuffer[256]; + int count = select_options.size(); + bool quickmode = true; + mainGame->gMutex.lock(); + for(auto option : select_options) { + if(mainGame->guiFont->getDimension(dataManager.GetDesc(option)).Width > 310) { + quickmode = false; + break; + } + } + for(int i = 0; (i < count) && (i < 5) && quickmode; i++) { + const wchar_t* option = dataManager.GetDesc(select_options[i]); + mainGame->btnOption[i]->setText(option); + } + if(quickmode) { + bool scrollbar = count > 5; + mainGame->scrOption->setVisible(scrollbar); + mainGame->scrOption->setPos(0); + mainGame->scrOption->setMax(scrollbar ? (count - 5) : 1); + mainGame->stOptions->setVisible(false); + mainGame->btnOptionp->setVisible(false); + mainGame->btnOptionn->setVisible(false); + mainGame->btnOptionOK->setVisible(false); + for(int i = 0; i < 5; i++) + mainGame->btnOption[i]->setVisible(i < count); + irr::core::recti pos = mainGame->wOptions->getRelativePosition(); + int newheight = 30 + 40 * (scrollbar ? 5 : count); + int oldheight = pos.LowerRightCorner.Y - pos.UpperLeftCorner.Y; + pos.UpperLeftCorner.Y = pos.UpperLeftCorner.Y + (oldheight - newheight) / 2; + pos.LowerRightCorner.X = pos.UpperLeftCorner.X + (scrollbar ? 375 : 350); + pos.LowerRightCorner.Y = pos.UpperLeftCorner.Y + newheight; + mainGame->wOptions->setRelativePosition(pos); + } else { + mainGame->SetStaticText(mainGame->stOptions, 310, mainGame->guiFont, dataManager.GetDesc(select_options[0])); + mainGame->stOptions->setVisible(true); + mainGame->btnOptionp->setVisible(false); + mainGame->btnOptionn->setVisible(count > 1); + mainGame->btnOptionOK->setVisible(true); + for(int i = 0; i < 5; i++) + mainGame->btnOption[i]->setVisible(false); + irr::core::recti pos = mainGame->wOptions->getRelativePosition(); + pos.LowerRightCorner.Y = pos.UpperLeftCorner.Y + 140; + mainGame->wOptions->setRelativePosition(pos); + } + if(select_hint) + myswprintf(textBuffer, L"%ls", dataManager.GetDesc(select_hint)); + else + myswprintf(textBuffer, dataManager.GetSysString(555)); + mainGame->wOptions->setText(textBuffer); + mainGame->PopupElement(mainGame->wOptions); + mainGame->gMutex.unlock(); +} void ClientField::ReplaySwap() { std::swap(deck[0], deck[1]); std::swap(hand[0], hand[1]); @@ -547,71 +705,55 @@ void ClientField::ReplaySwap() { for(int p = 0; p < 2; ++p) { for(auto cit = deck[p].begin(); cit != deck[p].end(); ++cit) { (*cit)->controler = 1 - (*cit)->controler; - GetCardLocation(*cit, &(*cit)->curPos, &(*cit)->curRot); - (*cit)->mTransform.setTranslation((*cit)->curPos); - (*cit)->mTransform.setRotationRadians((*cit)->curRot); + GetCardLocation(*cit, &(*cit)->curPos, &(*cit)->curRot, true); (*cit)->is_moving = false; } for(auto cit = hand[p].begin(); cit != hand[p].end(); ++cit) { (*cit)->controler = 1 - (*cit)->controler; - GetCardLocation(*cit, &(*cit)->curPos, &(*cit)->curRot); - (*cit)->mTransform.setTranslation((*cit)->curPos); - (*cit)->mTransform.setRotationRadians((*cit)->curRot); + GetCardLocation(*cit, &(*cit)->curPos, &(*cit)->curRot, true); (*cit)->is_moving = false; } for(auto cit = mzone[p].begin(); cit != mzone[p].end(); ++cit) { if(*cit) { (*cit)->controler = 1 - (*cit)->controler; - GetCardLocation(*cit, &(*cit)->curPos, &(*cit)->curRot); - (*cit)->mTransform.setTranslation((*cit)->curPos); - (*cit)->mTransform.setRotationRadians((*cit)->curRot); + GetCardLocation(*cit, &(*cit)->curPos, &(*cit)->curRot, true); (*cit)->is_moving = false; } } for(auto cit = szone[p].begin(); cit != szone[p].end(); ++cit) { if(*cit) { (*cit)->controler = 1 - (*cit)->controler; - GetCardLocation(*cit, &(*cit)->curPos, &(*cit)->curRot); - (*cit)->mTransform.setTranslation((*cit)->curPos); - (*cit)->mTransform.setRotationRadians((*cit)->curRot); + GetCardLocation(*cit, &(*cit)->curPos, &(*cit)->curRot, true); (*cit)->is_moving = false; } } for(auto cit = grave[p].begin(); cit != grave[p].end(); ++cit) { (*cit)->controler = 1 - (*cit)->controler; - GetCardLocation(*cit, &(*cit)->curPos, &(*cit)->curRot); - (*cit)->mTransform.setTranslation((*cit)->curPos); - (*cit)->mTransform.setRotationRadians((*cit)->curRot); + GetCardLocation(*cit, &(*cit)->curPos, &(*cit)->curRot, true); (*cit)->is_moving = false; } for(auto cit = remove[p].begin(); cit != remove[p].end(); ++cit) { (*cit)->controler = 1 - (*cit)->controler; - GetCardLocation(*cit, &(*cit)->curPos, &(*cit)->curRot); - (*cit)->mTransform.setTranslation((*cit)->curPos); - (*cit)->mTransform.setRotationRadians((*cit)->curRot); + GetCardLocation(*cit, &(*cit)->curPos, &(*cit)->curRot, true); (*cit)->is_moving = false; } for(auto cit = extra[p].begin(); cit != extra[p].end(); ++cit) { (*cit)->controler = 1 - (*cit)->controler; - GetCardLocation(*cit, &(*cit)->curPos, &(*cit)->curRot); - (*cit)->mTransform.setTranslation((*cit)->curPos); - (*cit)->mTransform.setRotationRadians((*cit)->curRot); + GetCardLocation(*cit, &(*cit)->curPos, &(*cit)->curRot, true); (*cit)->is_moving = false; } } for(auto cit = overlay_cards.begin(); cit != overlay_cards.end(); ++cit) { (*cit)->controler = 1 - (*cit)->controler; - GetCardLocation(*cit, &(*cit)->curPos, &(*cit)->curRot); - (*cit)->mTransform.setTranslation((*cit)->curPos); - (*cit)->mTransform.setRotationRadians((*cit)->curRot); + GetCardLocation(*cit, &(*cit)->curPos, &(*cit)->curRot, true); (*cit)->is_moving = false; } mainGame->dInfo.isFirst = !mainGame->dInfo.isFirst; + mainGame->dInfo.isReplaySwapped = !mainGame->dInfo.isReplaySwapped; std::swap(mainGame->dInfo.lp[0], mainGame->dInfo.lp[1]); - for(int i = 0; i < 16; ++i) - std::swap(mainGame->dInfo.strLP[0][i], mainGame->dInfo.strLP[1][i]); - for(int i = 0; i < 20; ++i) - std::swap(mainGame->dInfo.hostname[i], mainGame->dInfo.clientname[i]); + std::swap(mainGame->dInfo.strLP[0], mainGame->dInfo.strLP[1]); + std::swap(mainGame->dInfo.hostname, mainGame->dInfo.clientname); + std::swap(mainGame->dInfo.hostname_tag, mainGame->dInfo.clientname_tag); for(auto chit = chains.begin(); chit != chains.end(); ++chit) { chit->controler = 1 - chit->controler; GetChainLocation(chit->controler, chit->location, chit->sequence, &chit->chain_pos); @@ -621,56 +763,40 @@ void ClientField::ReplaySwap() { void ClientField::RefreshAllCards() { for(int p = 0; p < 2; ++p) { for(auto cit = deck[p].begin(); cit != deck[p].end(); ++cit) { - GetCardLocation(*cit, &(*cit)->curPos, &(*cit)->curRot); - (*cit)->mTransform.setTranslation((*cit)->curPos); - (*cit)->mTransform.setRotationRadians((*cit)->curRot); + GetCardLocation(*cit, &(*cit)->curPos, &(*cit)->curRot, true); (*cit)->is_moving = false; } for(auto cit = hand[p].begin(); cit != hand[p].end(); ++cit) { - GetCardLocation(*cit, &(*cit)->curPos, &(*cit)->curRot); - (*cit)->mTransform.setTranslation((*cit)->curPos); - (*cit)->mTransform.setRotationRadians((*cit)->curRot); + GetCardLocation(*cit, &(*cit)->curPos, &(*cit)->curRot, true); (*cit)->is_moving = false; } for(auto cit = mzone[p].begin(); cit != mzone[p].end(); ++cit) { if(*cit) { - GetCardLocation(*cit, &(*cit)->curPos, &(*cit)->curRot); - (*cit)->mTransform.setTranslation((*cit)->curPos); - (*cit)->mTransform.setRotationRadians((*cit)->curRot); + GetCardLocation(*cit, &(*cit)->curPos, &(*cit)->curRot, true); (*cit)->is_moving = false; } } for(auto cit = szone[p].begin(); cit != szone[p].end(); ++cit) { if(*cit) { - GetCardLocation(*cit, &(*cit)->curPos, &(*cit)->curRot); - (*cit)->mTransform.setTranslation((*cit)->curPos); - (*cit)->mTransform.setRotationRadians((*cit)->curRot); + GetCardLocation(*cit, &(*cit)->curPos, &(*cit)->curRot, true); (*cit)->is_moving = false; } } for(auto cit = grave[p].begin(); cit != grave[p].end(); ++cit) { - GetCardLocation(*cit, &(*cit)->curPos, &(*cit)->curRot); - (*cit)->mTransform.setTranslation((*cit)->curPos); - (*cit)->mTransform.setRotationRadians((*cit)->curRot); + GetCardLocation(*cit, &(*cit)->curPos, &(*cit)->curRot, true); (*cit)->is_moving = false; } for(auto cit = remove[p].begin(); cit != remove[p].end(); ++cit) { - GetCardLocation(*cit, &(*cit)->curPos, &(*cit)->curRot); - (*cit)->mTransform.setTranslation((*cit)->curPos); - (*cit)->mTransform.setRotationRadians((*cit)->curRot); + GetCardLocation(*cit, &(*cit)->curPos, &(*cit)->curRot, true); (*cit)->is_moving = false; } for(auto cit = extra[p].begin(); cit != extra[p].end(); ++cit) { - GetCardLocation(*cit, &(*cit)->curPos, &(*cit)->curRot); - (*cit)->mTransform.setTranslation((*cit)->curPos); - (*cit)->mTransform.setRotationRadians((*cit)->curRot); + GetCardLocation(*cit, &(*cit)->curPos, &(*cit)->curRot, true); (*cit)->is_moving = false; } } for(auto cit = overlay_cards.begin(); cit != overlay_cards.end(); ++cit) { - GetCardLocation(*cit, &(*cit)->curPos, &(*cit)->curRot); - (*cit)->mTransform.setTranslation((*cit)->curPos); - (*cit)->mTransform.setRotationRadians((*cit)->curRot); + GetCardLocation(*cit, &(*cit)->curPos, &(*cit)->curRot, true); (*cit)->is_moving = false; } } @@ -678,17 +804,12 @@ void ClientField::GetChainLocation(int controler, int location, int sequence, ir t->X = 0; t->Y = 0; t->Z = 0; + int rule = (mainGame->dInfo.duel_rule >= 4) ? 1 : 0; switch((location & 0x7f)) { case LOCATION_DECK: { - if (controler == 0) { - t->X = (matManager.vFields[0].Pos.X + matManager.vFields[1].Pos.X) / 2; - t->Y = (matManager.vFields[0].Pos.Y + matManager.vFields[2].Pos.Y) / 2; - t->Z = deck[controler].size() * 0.01f + 0.03f; - } else { - t->X = (matManager.vFields[68].Pos.X + matManager.vFields[69].Pos.X) / 2; - t->Y = (matManager.vFields[68].Pos.Y + matManager.vFields[70].Pos.Y) / 2; - t->Z = deck[controler].size() * 0.01f + 0.03f; - } + t->X = (matManager.vFieldDeck[controler][0].Pos.X + matManager.vFieldDeck[controler][1].Pos.X) / 2; + t->Y = (matManager.vFieldDeck[controler][0].Pos.Y + matManager.vFieldDeck[controler][2].Pos.Y) / 2; + t->Z = deck[controler].size() * 0.01f + 0.03f; break; } case LOCATION_HAND: { @@ -704,91 +825,33 @@ void ClientField::GetChainLocation(int controler, int location, int sequence, ir break; } case LOCATION_MZONE: { - if (controler == 0) { - t->X = (matManager.vFields[16].Pos.X + matManager.vFields[17].Pos.X) / 2 + 1.1f * sequence; - t->Y = (matManager.vFields[16].Pos.Y + matManager.vFields[18].Pos.Y) / 2; - t->Z = 0.03f; - } else { - t->X = (matManager.vFields[84].Pos.X + matManager.vFields[85].Pos.X) / 2 - 1.1f * sequence; - t->Y = (matManager.vFields[84].Pos.Y + matManager.vFields[86].Pos.Y) / 2; - t->Z = 0.03f; - } + t->X = (matManager.vFieldMzone[controler][sequence][0].Pos.X + matManager.vFieldMzone[controler][sequence][1].Pos.X) / 2; + t->Y = (matManager.vFieldMzone[controler][sequence][0].Pos.Y + matManager.vFieldMzone[controler][sequence][2].Pos.Y) / 2; + t->Z = 0.03f; break; } case LOCATION_SZONE: { - if (controler == 0) { - if (sequence <= 4) { - t->X = (matManager.vFields[36].Pos.X + matManager.vFields[37].Pos.X) / 2 + 1.1f * sequence; - t->Y = (matManager.vFields[36].Pos.Y + matManager.vFields[38].Pos.Y) / 2; - t->Z = 0.03f; - } else if (sequence == 5) { - t->X = (matManager.vFields[56].Pos.X + matManager.vFields[57].Pos.X) / 2; - t->Y = (matManager.vFields[56].Pos.Y + matManager.vFields[58].Pos.Y) / 2; - t->Z = 0.03f; - } else if (sequence == 6) { - t->X = (matManager.vFields[60].Pos.X + matManager.vFields[61].Pos.X) / 2; - t->Y = (matManager.vFields[60].Pos.Y + matManager.vFields[62].Pos.Y) / 2; - t->Z = 0.03f; - } else { - t->X = (matManager.vFields[64].Pos.X + matManager.vFields[65].Pos.X) / 2; - t->Y = (matManager.vFields[64].Pos.Y + matManager.vFields[66].Pos.Y) / 2; - t->Z = 0.03f; - } - } else { - if (sequence <= 4) { - t->X = (matManager.vFields[104].Pos.X + matManager.vFields[105].Pos.X) / 2 - 1.1f * sequence; - t->Y = (matManager.vFields[104].Pos.Y + matManager.vFields[106].Pos.Y) / 2; - t->Z = 0.03f; - } else if (sequence == 5) { - t->X = (matManager.vFields[124].Pos.X + matManager.vFields[125].Pos.X) / 2; - t->Y = (matManager.vFields[124].Pos.Y + matManager.vFields[126].Pos.Y) / 2; - t->Z = 0.03f; - } else if (sequence == 6) { - t->X = (matManager.vFields[128].Pos.X + matManager.vFields[129].Pos.X) / 2; - t->Y = (matManager.vFields[128].Pos.Y + matManager.vFields[130].Pos.Y) / 2; - t->Z = 0.03f; - } else { - t->X = (matManager.vFields[132].Pos.X + matManager.vFields[133].Pos.X) / 2; - t->Y = (matManager.vFields[132].Pos.Y + matManager.vFields[134].Pos.Y) / 2; - t->Z = 0.03f; - } - } + t->X = (matManager.vFieldSzone[controler][sequence][rule][0].Pos.X + matManager.vFieldSzone[controler][sequence][rule][1].Pos.X) / 2; + t->Y = (matManager.vFieldSzone[controler][sequence][rule][0].Pos.Y + matManager.vFieldSzone[controler][sequence][rule][2].Pos.Y) / 2; + t->Z = 0.03f; break; } case LOCATION_GRAVE: { - if (controler == 0) { - t->X = (matManager.vFields[4].Pos.X + matManager.vFields[5].Pos.X) / 2; - t->Y = (matManager.vFields[4].Pos.Y + matManager.vFields[6].Pos.Y) / 2; - t->Z = grave[controler].size() * 0.01f + 0.03f; - } else { - t->X = (matManager.vFields[72].Pos.X + matManager.vFields[73].Pos.X) / 2; - t->Y = (matManager.vFields[72].Pos.Y + matManager.vFields[74].Pos.Y) / 2; - t->Z = grave[controler].size() * 0.01f + 0.03f; - } + t->X = (matManager.vFieldGrave[controler][rule][0].Pos.X + matManager.vFieldGrave[controler][rule][1].Pos.X) / 2; + t->Y = (matManager.vFieldGrave[controler][rule][0].Pos.Y + matManager.vFieldGrave[controler][rule][2].Pos.Y) / 2; + t->Z = grave[controler].size() * 0.01f + 0.03f; break; } case LOCATION_REMOVED: { - if (controler == 0) { - t->X = (matManager.vFields[12].Pos.X + matManager.vFields[13].Pos.X) / 2; - t->Y = (matManager.vFields[12].Pos.Y + matManager.vFields[14].Pos.Y) / 2; - t->Z = remove[controler].size() * 0.01f + 0.03f; - } else { - t->X = (matManager.vFields[80].Pos.X + matManager.vFields[81].Pos.X) / 2; - t->Y = (matManager.vFields[80].Pos.Y + matManager.vFields[82].Pos.Y) / 2; - t->Z = remove[controler].size() * 0.01f + 0.03f; - } + t->X = (matManager.vFieldRemove[controler][rule][0].Pos.X + matManager.vFieldRemove[controler][rule][1].Pos.X) / 2; + t->Y = (matManager.vFieldRemove[controler][rule][0].Pos.Y + matManager.vFieldRemove[controler][rule][2].Pos.Y) / 2; + t->Z = remove[controler].size() * 0.01f + 0.03f; break; } case LOCATION_EXTRA: { - if (controler == 0) { - t->X = (matManager.vFields[8].Pos.X + matManager.vFields[9].Pos.X) / 2; - t->Y = (matManager.vFields[8].Pos.Y + matManager.vFields[10].Pos.Y) / 2; - t->Z = extra[controler].size() * 0.01f + 0.03f; - } else { - t->X = (matManager.vFields[76].Pos.X + matManager.vFields[77].Pos.X) / 2; - t->Y = (matManager.vFields[76].Pos.Y + matManager.vFields[78].Pos.Y) / 2; - t->Z = extra[controler].size() * 0.01f + 0.03f; - } + t->X = (matManager.vFieldExtra[controler][0].Pos.X + matManager.vFieldExtra[controler][1].Pos.X) / 2; + t->Y = (matManager.vFieldExtra[controler][0].Pos.Y + matManager.vFieldExtra[controler][2].Pos.Y) / 2; + t->Z = extra[controler].size() * 0.01f + 0.03f; break; } } @@ -797,12 +860,16 @@ void ClientField::GetCardLocation(ClientCard* pcard, irr::core::vector3df* t, ir int controler = pcard->controler; int sequence = pcard->sequence; int location = pcard->location; + int rule = (mainGame->dInfo.duel_rule >= 4) ? 1 : 0; + const float overlay_buttom = 0.0f; + const float material_height = 0.003f; + const float mzone_buttom = 0.020f; switch (location) { case LOCATION_DECK: { + t->X = (matManager.vFieldDeck[controler][0].Pos.X + matManager.vFieldDeck[controler][1].Pos.X) / 2; + t->Y = (matManager.vFieldDeck[controler][0].Pos.Y + matManager.vFieldDeck[controler][2].Pos.Y) / 2; + t->Z = 0.01f + 0.01f * sequence; if (controler == 0) { - t->X = (matManager.vFields[0].Pos.X + matManager.vFields[1].Pos.X) / 2; - t->Y = (matManager.vFields[0].Pos.Y + matManager.vFields[2].Pos.Y) / 2; - t->Z = 0.01f + 0.01f * sequence; if(deck_reversed == pcard->is_reversed) { r->X = 0.0f; r->Y = 3.1415926f; @@ -813,9 +880,6 @@ void ClientField::GetCardLocation(ClientCard* pcard, irr::core::vector3df* t, ir r->Z = 0.0f; } } else { - t->X = (matManager.vFields[68].Pos.X + matManager.vFields[69].Pos.X) / 2; - t->Y = (matManager.vFields[68].Pos.Y + matManager.vFields[70].Pos.Y) / 2; - t->Z = 0.01f + 0.01f * sequence; if(deck_reversed == pcard->is_reversed) { r->X = 0.0f; r->Y = 3.1415926f; @@ -877,11 +941,11 @@ void ClientField::GetCardLocation(ClientCard* pcard, irr::core::vector3df* t, ir break; } case LOCATION_MZONE: { + t->X = (matManager.vFieldMzone[controler][sequence][0].Pos.X + matManager.vFieldMzone[controler][sequence][1].Pos.X) / 2; + t->Y = (matManager.vFieldMzone[controler][sequence][0].Pos.Y + matManager.vFieldMzone[controler][sequence][2].Pos.Y) / 2; + t->Z = mzone_buttom; if (controler == 0) { - t->X = (matManager.vFields[16].Pos.X + matManager.vFields[17].Pos.X) / 2 + 1.1f * sequence; - t->Y = (matManager.vFields[16].Pos.Y + matManager.vFields[18].Pos.Y) / 2; - t->Z = 0.01f; - if (pcard->position & POS_DEFENCE) { + if (pcard->position & POS_DEFENSE) { r->X = 0.0f; r->Z = -3.1415926f / 2.0f; if (pcard->position & POS_FACEDOWN) @@ -895,10 +959,7 @@ void ClientField::GetCardLocation(ClientCard* pcard, irr::core::vector3df* t, ir else r->Y = 0.0f; } } else { - t->X = (matManager.vFields[84].Pos.X + matManager.vFields[85].Pos.X) / 2 - 1.1f * sequence; - t->Y = (matManager.vFields[84].Pos.Y + matManager.vFields[86].Pos.Y) / 2; - t->Z = 0.01f; - if (pcard->position & POS_DEFENCE) { + if (pcard->position & POS_DEFENSE) { r->X = 0.0f; r->Z = 3.1415926f / 2.0f; if (pcard->position & POS_FACEDOWN) @@ -915,47 +976,16 @@ void ClientField::GetCardLocation(ClientCard* pcard, irr::core::vector3df* t, ir break; } case LOCATION_SZONE: { + t->X = (matManager.vFieldSzone[controler][sequence][rule][0].Pos.X + matManager.vFieldSzone[controler][sequence][rule][1].Pos.X) / 2; + t->Y = (matManager.vFieldSzone[controler][sequence][rule][0].Pos.Y + matManager.vFieldSzone[controler][sequence][rule][2].Pos.Y) / 2; + t->Z = 0.01f; if (controler == 0) { - if (sequence <= 4) { - t->X = (matManager.vFields[36].Pos.X + matManager.vFields[37].Pos.X) / 2 + 1.1f * sequence; - t->Y = (matManager.vFields[36].Pos.Y + matManager.vFields[38].Pos.Y) / 2; - t->Z = 0.01f; - } else if (sequence == 5) { - t->X = (matManager.vFields[56].Pos.X + matManager.vFields[57].Pos.X) / 2; - t->Y = (matManager.vFields[56].Pos.Y + matManager.vFields[58].Pos.Y) / 2; - t->Z = 0.01f; - } else if (sequence == 6) { - t->X = (matManager.vFields[60].Pos.X + matManager.vFields[61].Pos.X) / 2; - t->Y = (matManager.vFields[60].Pos.Y + matManager.vFields[62].Pos.Y) / 2; - t->Z = 0.01f; - } else { - t->X = (matManager.vFields[64].Pos.X + matManager.vFields[65].Pos.X) / 2; - t->Y = (matManager.vFields[64].Pos.Y + matManager.vFields[66].Pos.Y) / 2; - t->Z = 0.01f; - } r->X = 0.0f; r->Z = 0.0f; if (pcard->position & POS_FACEDOWN) r->Y = 3.1415926f; else r->Y = 0.0f; } else { - if (sequence <= 4) { - t->X = (matManager.vFields[104].Pos.X + matManager.vFields[105].Pos.X) / 2 - 1.1f * sequence; - t->Y = (matManager.vFields[104].Pos.Y + matManager.vFields[106].Pos.Y) / 2; - t->Z = 0.01f; - } else if (sequence == 5) { - t->X = (matManager.vFields[124].Pos.X + matManager.vFields[125].Pos.X) / 2; - t->Y = (matManager.vFields[124].Pos.Y + matManager.vFields[126].Pos.Y) / 2; - t->Z = 0.01f; - } else if (sequence == 6) { - t->X = (matManager.vFields[128].Pos.X + matManager.vFields[129].Pos.X) / 2; - t->Y = (matManager.vFields[128].Pos.Y + matManager.vFields[130].Pos.Y) / 2; - t->Z = 0.01f; - } else { - t->X = (matManager.vFields[132].Pos.X + matManager.vFields[133].Pos.X) / 2; - t->Y = (matManager.vFields[132].Pos.Y + matManager.vFields[134].Pos.Y) / 2; - t->Z = 0.01f; - } r->X = 0.0f; r->Z = 3.1415926f; if (pcard->position & POS_FACEDOWN) @@ -965,17 +995,14 @@ void ClientField::GetCardLocation(ClientCard* pcard, irr::core::vector3df* t, ir break; } case LOCATION_GRAVE: { + t->X = (matManager.vFieldGrave[controler][rule][0].Pos.X + matManager.vFieldGrave[controler][rule][1].Pos.X) / 2; + t->Y = (matManager.vFieldGrave[controler][rule][0].Pos.Y + matManager.vFieldGrave[controler][rule][2].Pos.Y) / 2; + t->Z = 0.01f + 0.01f * sequence; if (controler == 0) { - t->X = (matManager.vFields[4].Pos.X + matManager.vFields[5].Pos.X) / 2; - t->Y = (matManager.vFields[4].Pos.Y + matManager.vFields[6].Pos.Y) / 2; - t->Z = 0.01f + 0.01f * sequence; r->X = 0.0f; r->Y = 0.0f; r->Z = 0.0f; } else { - t->X = (matManager.vFields[72].Pos.X + matManager.vFields[73].Pos.X) / 2; - t->Y = (matManager.vFields[72].Pos.Y + matManager.vFields[74].Pos.Y) / 2; - t->Z = 0.01f + 0.01f * sequence; r->X = 0.0f; r->Y = 0.0f; r->Z = 3.1415926f; @@ -983,10 +1010,10 @@ void ClientField::GetCardLocation(ClientCard* pcard, irr::core::vector3df* t, ir break; } case LOCATION_REMOVED: { + t->X = (matManager.vFieldRemove[controler][rule][0].Pos.X + matManager.vFieldRemove[controler][rule][1].Pos.X) / 2; + t->Y = (matManager.vFieldRemove[controler][rule][0].Pos.Y + matManager.vFieldRemove[controler][rule][2].Pos.Y) / 2; + t->Z = 0.01f + 0.01f * sequence; if (controler == 0) { - t->X = (matManager.vFields[12].Pos.X + matManager.vFields[13].Pos.X) / 2; - t->Y = (matManager.vFields[12].Pos.Y + matManager.vFields[14].Pos.Y) / 2; - t->Z = 0.01f + 0.01f * sequence; if(pcard->position & POS_FACEUP) { r->X = 0.0f; r->Y = 0.0f; @@ -997,9 +1024,6 @@ void ClientField::GetCardLocation(ClientCard* pcard, irr::core::vector3df* t, ir r->Z = 0.0f; } } else { - t->X = (matManager.vFields[80].Pos.X + matManager.vFields[81].Pos.X) / 2; - t->Y = (matManager.vFields[80].Pos.Y + matManager.vFields[82].Pos.Y) / 2; - t->Z = 0.01f + 0.01f * sequence; if(pcard->position & POS_FACEUP) { r->X = 0.0f; r->Y = 0.0f; @@ -1013,19 +1037,16 @@ void ClientField::GetCardLocation(ClientCard* pcard, irr::core::vector3df* t, ir break; } case LOCATION_EXTRA: { + t->X = (matManager.vFieldExtra[controler][0].Pos.X + matManager.vFieldExtra[controler][1].Pos.X) / 2; + t->Y = (matManager.vFieldExtra[controler][0].Pos.Y + matManager.vFieldExtra[controler][2].Pos.Y) / 2; + t->Z = 0.01f + 0.01f * sequence; if (controler == 0) { - t->X = (matManager.vFields[8].Pos.X + matManager.vFields[9].Pos.X) / 2; - t->Y = (matManager.vFields[8].Pos.Y + matManager.vFields[10].Pos.Y) / 2; - t->Z = 0.01f + 0.01f * sequence; r->X = 0.0f; if(pcard->position & POS_FACEUP) r->Y = 0.0f; else r->Y = 3.1415926f; r->Z = 0.0f; } else { - t->X = (matManager.vFields[76].Pos.X + matManager.vFields[77].Pos.X) / 2; - t->Y = (matManager.vFields[76].Pos.Y + matManager.vFields[78].Pos.Y) / 2; - t->Z = 0.01f * sequence; r->X = 0.0f; if(pcard->position & POS_FACEUP) r->Y = 0.0f; @@ -1035,21 +1056,22 @@ void ClientField::GetCardLocation(ClientCard* pcard, irr::core::vector3df* t, ir break; } case LOCATION_OVERLAY: { - if (pcard->overlayTarget->location != 0x4) { + if (pcard->overlayTarget->location != LOCATION_MZONE) { return; } int oseq = pcard->overlayTarget->sequence; + int mseq = (sequence < MAX_LAYER_COUNT) ? sequence : (MAX_LAYER_COUNT - 1); if (pcard->overlayTarget->controler == 0) { - t->X = (matManager.vFields[16].Pos.X + matManager.vFields[17].Pos.X) / 2 + 1.1f * oseq - 0.12f + 0.06f * sequence; - t->Y = (matManager.vFields[16].Pos.Y + matManager.vFields[18].Pos.Y) / 2 + 0.05f; - t->Z = 0.005f + pcard->sequence * 0.0001f; + t->X = (matManager.vFieldMzone[0][oseq][0].Pos.X + matManager.vFieldMzone[0][oseq][1].Pos.X) / 2 - 0.12f + 0.06f * mseq; + t->Y = (matManager.vFieldMzone[0][oseq][0].Pos.Y + matManager.vFieldMzone[0][oseq][2].Pos.Y) / 2 + 0.05f; + t->Z = overlay_buttom + mseq * material_height; r->X = 0.0f; r->Y = 0.0f; r->Z = 0.0f; } else { - t->X = (matManager.vFields[84].Pos.X + matManager.vFields[85].Pos.X) / 2 - 1.1f * oseq + 0.12f - 0.06f * sequence; - t->Y = (matManager.vFields[84].Pos.Y + matManager.vFields[86].Pos.Y) / 2 - 0.05f; - t->Z = 0.005f + pcard->sequence * 0.0001f; + t->X = (matManager.vFieldMzone[1][oseq][0].Pos.X + matManager.vFieldMzone[1][oseq][1].Pos.X) / 2 + 0.12f - 0.06f * mseq; + t->Y = (matManager.vFieldMzone[1][oseq][0].Pos.Y + matManager.vFieldMzone[1][oseq][2].Pos.Y) / 2 - 0.05f; + t->Z = overlay_buttom + mseq * material_height; r->X = 0.0f; r->Y = 0.0f; r->Z = 3.1415926f; @@ -1097,62 +1119,124 @@ void ClientField::FadeCard(ClientCard * pcard, int alpha, int frame) { pcard->is_fading = true; pcard->aniFrame = frame; } +bool ClientField::ShowSelectSum(bool panelmode) { + select_ready = CheckSelectSum(); + if(select_ready && (selectsum_cards.size() == 0 || selectable_cards.size() == 0)) { + SetResponseSelectedCards(); + ShowCancelOrFinishButton(0); + if(mainGame->wCardSelect->isVisible()) + mainGame->HideElement(mainGame->wCardSelect, true); + else + DuelClient::SendResponse(); + return true; + } + + auto display_hint = select_hint ? dataManager.GetDesc(select_hint) : dataManager.GetSysString(560); + + wchar_t cur_hint[20]; + if (select_curval_l == select_curval_h) { + myswprintf(cur_hint, L"%d", select_curval_l); + } else { + myswprintf(cur_hint, L"%d-%d", select_curval_l, select_curval_h); + } + + wchar_t target_hint[20]; + if (select_mode == 0) { // sum equal + myswprintf(target_hint, L"%d", select_sumval); + } else { // sum greater + myswprintf(target_hint, L"%d+", select_sumval); + } + + wchar_t textBuffer[256]; + myswprintf(textBuffer, L"%ls(%ls/%ls)", display_hint, cur_hint, target_hint); + + if(panelmode) { + mainGame->wCardSelect->setText(textBuffer); + mainGame->wCardSelect->setVisible(false); + mainGame->dField.ShowSelectCard(); + } else { + mainGame->stHintMsg->setText(textBuffer); + mainGame->stHintMsg->setVisible(true); + } + if (select_ready) { + ShowCancelOrFinishButton(2); + } else { + ShowCancelOrFinishButton(0); + } + return false; +} bool ClientField::CheckSelectSum() { std::set selable; - std::set::iterator sit; - for(size_t i = 0; i < selectsum_all.size(); ++i) { - selectsum_all[i]->is_selectable = false; - selectsum_all[i]->is_selected = false; - selable.insert(selectsum_all[i]); + for(auto sc : selectsum_all) { + sc->is_selectable = false; + sc->is_selected = false; + selable.insert(sc); } - for(size_t i = 0; i < selected_cards.size(); ++i) { - selected_cards[i]->is_selectable = true; + select_curval_l = 0; + select_curval_h = 0; + for(int i = 0; i < (int)selected_cards.size(); ++i) { + if(i < must_select_count) + selected_cards[i]->is_selectable = false; + else + selected_cards[i]->is_selectable = true; selected_cards[i]->is_selected = true; selable.erase(selected_cards[i]); + + int op1 = selected_cards[i]->opParam & 0xffff; + int op2 = selected_cards[i]->opParam >> 16; + int opmin = (op2 > 0 && op1 > op2) ? op2 : op1; + int opmax = op2 > op1 ? op2 : op1; + select_curval_l += opmin; + select_curval_h += opmax; } selectsum_cards.clear(); - bool ret; - if (select_mode == 0) { - ret = check_sel_sum_s(selable, 0, select_sumval); + if (select_mode == 0) { // sum equal + bool ret = check_sel_sum_s(selable, 0, select_sumval); selectable_cards.clear(); - for(sit = selectsum_cards.begin(); sit != selectsum_cards.end(); ++sit) { - (*sit)->is_selectable = true; - selectable_cards.push_back(*sit); + for(auto sc : selectsum_cards) { + sc->is_selectable = true; + selectable_cards.push_back(sc); + } + for(auto sc : selected_cards) { + selectable_cards.push_back(sc); } return ret; - } else { - int op1, op2, mm = -1, ms, m, max = 0, sumc = 0, sums; - ret = false; - for (size_t i = 0; i < selected_cards.size(); ++i) { - op1 = selected_cards[i]->opParam & 0xffff; - op2 = selected_cards[i]->opParam >> 16; - m = (op2 > 0 && op1 > op2) ? op2 : op1; - max += op2 > op1 ? op2 : op1; - if (mm == -1 || m < mm) - mm = m; - sumc += m; + } else { // sum greater + int mm = -1, mx = -1, max = 0, sumc = 0; + bool ret = false; + for (auto sc : selected_cards) { + int op1, op2; + get_sum_params(sc->opParam, op1, op2); + int opmin = (op2 > 0 && op1 > op2) ? op2 : op1; + int opmax = op2 > op1 ? op2 : op1; + if (mm == -1 || opmin < mm) + mm = opmin; + if (mx == -1 || opmax < mx) + mx = opmax; + sumc += opmin; + max += opmax; } if (select_sumval <= sumc) return true; - if (select_sumval <= max) + if (select_sumval <= max && select_sumval > max - mx) ret = true; - for(sit = selable.begin(); sit != selable.end(); ++sit) { - op1 = (*sit)->opParam & 0xffff; - op2 = (*sit)->opParam >> 16; - m = op1; - sums = sumc; + for(auto sc : selable) { + int op1, op2; + get_sum_params(sc->opParam, op1, op2); + int m = op1; + int sums = sumc; sums += m; - ms = mm; + int ms = mm; if (ms == -1 || m < ms) ms = m; if (sums >= select_sumval) { if (sums - ms < select_sumval) - selectsum_cards.insert(*sit); + selectsum_cards.insert(sc); } else { std::set left(selable); - left.erase(*sit); + left.erase(sc); if (check_min(left, left.begin(), select_sumval - sums, select_sumval - sums + ms - 1)) - selectsum_cards.insert(*sit); + selectsum_cards.insert(sc); } if (op2 == 0) continue; @@ -1164,27 +1248,59 @@ bool ClientField::CheckSelectSum() { ms = m; if (sums >= select_sumval) { if (sums - ms < select_sumval) - selectsum_cards.insert(*sit); + selectsum_cards.insert(sc); } else { std::set left(selable); - left.erase(*sit); + left.erase(sc); if (check_min(left, left.begin(), select_sumval - sums, select_sumval - sums + ms - 1)) - selectsum_cards.insert(*sit); + selectsum_cards.insert(sc); } } selectable_cards.clear(); - for(sit = selectsum_cards.begin(); sit != selectsum_cards.end(); ++sit) { - (*sit)->is_selectable = true; - selectable_cards.push_back(*sit); + for(auto sc : selectsum_cards) { + sc->is_selectable = true; + selectable_cards.push_back(sc); + } + for(auto sc : selected_cards) { + selectable_cards.push_back(sc); } return ret; } } -bool ClientField::check_min(std::set& left, std::set::iterator index, int min, int max) { +bool ClientField::CheckSelectTribute() { + std::set selable; + for(auto sit = selectsum_all.begin(); sit != selectsum_all.end(); ++sit) { + (*sit)->is_selectable = false; + (*sit)->is_selected = false; + selable.insert(*sit); + } + for(int i = 0; i < (int)selected_cards.size(); ++i) { + selected_cards[i]->is_selectable = true; + selected_cards[i]->is_selected = true; + selable.erase(selected_cards[i]); + } + selectsum_cards.clear(); + bool ret = check_sel_sum_trib_s(selable, 0, 0); + selectable_cards.clear(); + for(auto sit = selectsum_cards.begin(); sit != selectsum_cards.end(); ++sit) { + (*sit)->is_selectable = true; + selectable_cards.push_back(*sit); + } + return ret; +} +void ClientField::get_sum_params(unsigned int opParam, int& op1, int& op2) { + op1 = opParam & 0xffff; + op2 = (opParam >> 16) & 0xffff; + if (op2 & 0x8000) { + op1 = opParam & 0x7fffffff; + op2 = 0; + } +} +bool ClientField::check_min(const std::set& left, std::set::const_iterator index, int min, int max) { if (index == left.end()) return false; - int op1 = (*index)->opParam & 0xffff; - int op2 = (*index)->opParam >> 16; + int op1, op2; + get_sum_params((*index)->opParam, op1, op2); int m = (op2 > 0 && op1 > op2) ? op2 : op1; if (m >= min && m <= max) return true; @@ -1192,51 +1308,276 @@ bool ClientField::check_min(std::set& left, std::set:: return (min > m && check_min(left, index, min - m, max - m)) || check_min(left, index, min, max); } -bool ClientField::check_sel_sum_s(std::set& left, int index, int acc) { +bool ClientField::check_sel_sum_s(const std::set& left, int index, int acc) { + if (acc < 0) + return false; if (index == (int)selected_cards.size()) { - if (acc == 0) - return true; + if (acc == 0) { + int count = selected_cards.size() - must_select_count; + return count >= select_min && count <= select_max; + } check_sel_sum_t(left, acc); return false; } - int l = selected_cards[index]->opParam; - int l1 = l & 0xffff; - int l2 = l >> 16; + int l1, l2; + get_sum_params(selected_cards[index]->opParam, l1, l2); bool res1 = false, res2 = false; res1 = check_sel_sum_s(left, index + 1, acc - l1); if (l2 > 0) res2 = check_sel_sum_s(left, index + 1, acc - l2); return res1 || res2; } -void ClientField::check_sel_sum_t(std::set& left, int acc) { - std::set::iterator sit; - for (sit = left.begin(); sit != left.end(); ++sit) { +void ClientField::check_sel_sum_t(const std::set& left, int acc) { + int count = selected_cards.size() + 1 - must_select_count; + for (auto sit = left.begin(); sit != left.end(); ++sit) { if (selectsum_cards.find(*sit) != selectsum_cards.end()) continue; std::set testlist(left); testlist.erase(*sit); - int l = (*sit)->opParam; - int l1 = l & 0xffff; - int l2 = l >> 16; - if (check_sum(testlist, testlist.begin(), acc - l1, selected_cards.size() + 1) - || (l2 > 0 && check_sum(testlist, testlist.begin(), acc - l2, selected_cards.size() + 1))) { + int l1, l2; + get_sum_params((*sit)->opParam, l1, l2); + if (check_sum(testlist.begin(), testlist.end(), acc - l1, count) + || (l2 > 0 && check_sum(testlist.begin(), testlist.end(), acc - l2, count))) { selectsum_cards.insert(*sit); } } } -bool ClientField::check_sum(std::set& testlist, std::set::iterator index, int acc, int count) { +bool ClientField::check_sum(std::set::const_iterator index, std::set::const_iterator end, int acc, int count) { if (acc == 0) return count >= select_min && count <= select_max; - if (acc < 0 || index == testlist.end()) + if (acc < 0 || index == end) return false; - int l = (*index)->opParam; - int l1 = l & 0xffff; - int l2 = l >> 16; + int l1, l2; + get_sum_params((*index)->opParam, l1, l2); if ((l1 == acc || (l2 > 0 && l2 == acc)) && (count + 1 >= select_min) && (count + 1 <= select_max)) return true; ++index; - return (acc > l1 && check_sum(testlist, index, acc - l1, count + 1)) - || (l2 > 0 && acc > l2 && check_sum(testlist, index, acc - l2, count + 1)) - || check_sum(testlist, index, acc, count); + return (acc > l1 && check_sum(index, end, acc - l1, count + 1)) + || (l2 > 0 && acc > l2 && check_sum(index, end, acc - l2, count + 1)) + || check_sum(index, end, acc, count); +} +bool ClientField::check_sel_sum_trib_s(const std::set& left, int index, int acc) { + if(acc > select_max) + return false; + if(index == (int)selected_cards.size()) { + check_sel_sum_trib_t(left, acc); + return acc >= select_min && acc <= select_max; + } + int l1, l2; + get_sum_params(selected_cards[index]->opParam, l1, l2); + bool res1 = false, res2 = false; + res1 = check_sel_sum_trib_s(left, index + 1, acc + l1); + if(l2 > 0) + res2 = check_sel_sum_trib_s(left, index + 1, acc + l2); + return res1 || res2; +} +void ClientField::check_sel_sum_trib_t(const std::set& left, int acc) { + for(auto sit = left.begin(); sit != left.end(); ++sit) { + if(selectsum_cards.find(*sit) != selectsum_cards.end()) + continue; + std::set testlist(left); + testlist.erase(*sit); + int l1, l2; + get_sum_params((*sit)->opParam, l1, l2); + if(check_sum_trib(testlist.begin(), testlist.end(), acc + l1) + || (l2 > 0 && check_sum_trib(testlist.begin(), testlist.end(), acc + l2))) { + selectsum_cards.insert(*sit); + } + } +} +bool ClientField::check_sum_trib(std::set::const_iterator index, std::set::const_iterator end, int acc) { + if(acc >= select_min && acc <= select_max) + return true; + if(acc > select_max || index == end) + return false; + int l1, l2; + get_sum_params((*index)->opParam, l1, l2); + if((acc + l1 >= select_min && acc + l1 <= select_max) || (acc + l2 >= select_min && acc + l2 <= select_max)) + return true; + ++index; + return check_sum_trib(index, end, acc + l1) + || check_sum_trib(index, end, acc + l2) + || check_sum_trib(index, end, acc); +} +template +static bool is_declarable(const T& cd, const std::vector& opcode) { + std::stack stack; + for(auto it = opcode.begin(); it != opcode.end(); ++it) { + switch(*it) { + case OPCODE_ADD: { + if (stack.size() >= 2) { + int rhs = stack.top(); + stack.pop(); + int lhs = stack.top(); + stack.pop(); + stack.push(lhs + rhs); + } + break; + } + case OPCODE_SUB: { + if (stack.size() >= 2) { + int rhs = stack.top(); + stack.pop(); + int lhs = stack.top(); + stack.pop(); + stack.push(lhs - rhs); + } + break; + } + case OPCODE_MUL: { + if (stack.size() >= 2) { + int rhs = stack.top(); + stack.pop(); + int lhs = stack.top(); + stack.pop(); + stack.push(lhs * rhs); + } + break; + } + case OPCODE_DIV: { + if (stack.size() >= 2) { + int rhs = stack.top(); + stack.pop(); + int lhs = stack.top(); + stack.pop(); + stack.push(rhs != 0 ? lhs / rhs : 0); + } + break; + } + case OPCODE_AND: { + if (stack.size() >= 2) { + int rhs = stack.top(); + stack.pop(); + int lhs = stack.top(); + stack.pop(); + stack.push(static_cast(lhs && rhs)); + } + break; + } + case OPCODE_OR: { + if (stack.size() >= 2) { + int rhs = stack.top(); + stack.pop(); + int lhs = stack.top(); + stack.pop(); + stack.push(static_cast(lhs || rhs)); + } + break; + } + case OPCODE_NEG: { + if (stack.size() >= 1) { + int val = stack.top(); + stack.pop(); + stack.push(-val); + } + break; + } + case OPCODE_NOT: { + if (stack.size() >= 1) { + int val = stack.top(); + stack.pop(); + stack.push(static_cast(!val)); + } + break; + } + case OPCODE_ISCODE: { + if (stack.size() >= 1) { + int code = stack.top(); + stack.pop(); + stack.push(cd.code == code); + } + break; + } + case OPCODE_ISSETCARD: { + if (stack.size() >= 1) { + uint32_t set_code = stack.top(); + stack.pop(); + bool res = false; + for (const auto& x : cd.setcode) { + if(check_setcode(x, set_code)) { + res = true; + break; + } + } + stack.push(res); + } + break; + } + case OPCODE_ISTYPE: { + if (stack.size() >= 1) { + int val = stack.top(); + stack.pop(); + stack.push(cd.type & val); + } + break; + } + case OPCODE_ISRACE: { + if (stack.size() >= 1) { + int race = stack.top(); + stack.pop(); + stack.push(cd.race & race); + } + break; + } + case OPCODE_ISATTRIBUTE: { + if (stack.size() >= 1) { + int attribute = stack.top(); + stack.pop(); + stack.push(cd.attribute & attribute); + } + break; + } + default: { + stack.push(*it); + break; + } + } + } + if(stack.size() != 1 || stack.top() == 0) + return false; + if (cd.type & TYPE_TOKEN) + return false; + return !cd.alias || second_code.find(cd.code) != second_code.end(); +} +void ClientField::UpdateDeclarableList() { + const wchar_t* pname = mainGame->ebANCard->getText(); + int trycode = BufferIO::GetVal(pname); + CardData cd; + if (dataManager.GetData(trycode, &cd) && is_declarable(cd, declare_opcodes)) { + auto& _strings = dataManager.GetStringTable(); + auto it = _strings.find(trycode); + mainGame->lstANCard->clear(); + ancard.clear(); + mainGame->lstANCard->addItem(it->second.name.c_str()); + ancard.push_back(trycode); + return; + } + if(pname[0] == 0) { + int sel = mainGame->lstANCard->getSelected(); + trycode = (sel == -1) ? 0 : ancard[sel]; + } + mainGame->lstANCard->clear(); + ancard.clear(); + auto& _datas = dataManager.GetDataTable(); + auto& _strings = dataManager.GetStringTable(); + for(auto& entry : _strings) { + auto& code = entry.first; + auto& str = entry.second; + if(str.name.find(pname) != std::wstring::npos) { + auto cp = _datas.find(code); + if (cp == _datas.end()) + continue; + //datas.alias can be double card names or alias + if(is_declarable(cp->second, declare_opcodes)) { + if(pname == str.name || trycode == code) { //exact match or last used + mainGame->lstANCard->insertItem(0, str.name.c_str(), -1); + ancard.insert(ancard.begin(), code); + } else { + mainGame->lstANCard->addItem(str.name.c_str()); + ancard.push_back(code); + } + } + } + } } } diff --git a/gframe/client_field.h b/gframe/client_field.h index ae40c08249..fe062547b6 100644 --- a/gframe/client_field.h +++ b/gframe/client_field.h @@ -2,21 +2,25 @@ #define CLIENT_FIELD_H #include "config.h" +#include #include +#include +#include namespace ygo { class ClientCard; -struct ChainInfo{ +struct ChainInfo { irr::core::vector3df chain_pos; - ClientCard* chain_card; - int code; - int desc; - int controler; - int location; - int sequence; - bool solved; + ClientCard* chain_card{ nullptr }; + int code{ 0 }; + int desc{ 0 }; + int controler{ 0 }; + int location{ 0 }; + int sequence{ 0 }; + bool solved{ false }; + std::set target; }; class ClientField: public irr::IEventReceiver { @@ -29,6 +33,7 @@ class ClientField: public irr::IEventReceiver { std::vector remove[2]; std::vector extra[2]; std::set overlay_cards; + std::vector summonable_cards; std::vector spsummonable_cards; std::vector msetable_cards; @@ -37,89 +42,127 @@ class ClientField: public irr::IEventReceiver { std::vector activatable_cards; std::vector attackable_cards; std::vector conti_cards; - std::vector activatable_descs; + std::vector> activatable_descs; std::vector select_options; + std::vector select_options_index; std::vector chains; - int extra_p_count[2]; - - size_t selected_option; - ClientCard* attacker; - ClientCard* attack_target; - int disabled_field; - int selectable_field; - int selected_field; - int select_min; - int select_max; - int select_sumval; - int select_cancelable; - int select_mode; - bool select_ready; - int announce_count; - int select_counter_count; - int select_counter_type; + int extra_p_count[2]{}; + + size_t selected_option{ 0 }; + ClientCard* attacker{ nullptr }; + ClientCard* attack_target{ nullptr }; + unsigned int disabled_field{ 0 }; + unsigned int selectable_field{ 0 }; + unsigned int selected_field{ 0 }; + int select_min{ 0 }; + int select_max{ 0 }; + int must_select_count{ 0 }; + int select_curval_l{ 0 }; + int select_curval_h{ 0 }; + int select_sumval{ 0 }; + int select_mode{ 0 }; + int select_hint{0}; + bool select_cancelable{false}; + bool select_panalmode{ false }; + bool select_ready{ false }; + int announce_count{ 0 }; + int select_counter_count{ 0 }; + int select_counter_type{ 0 }; std::vector selectable_cards; std::vector selected_cards; std::set selectsum_cards; std::vector selectsum_all; + std::vector declare_opcodes; std::vector display_cards; std::vector sort_list; - bool grave_act; - bool remove_act; - bool deck_act; - bool extra_act; - bool pzone_act[2]; - bool chain_forced; + std::map player_desc_hints[2]; + bool grave_act[2]{ false }; + bool remove_act[2]{ false }; + bool deck_act[2]{ false }; + bool extra_act[2]{ false }; + bool pzone_act[2]{ false }; + bool conti_act{ false }; + bool chain_forced{ false }; ChainInfo current_chain; - bool last_chain; - bool deck_reversed; - + bool last_chain{ false }; + bool deck_reversed{ false }; + bool select_continuous{ false }; + bool cant_check_grave{ false }; + bool tag_surrender{ false }; + bool tag_teammate_surrender{ false }; + std::mt19937 rnd; + ClientField(); + ~ClientField() override; void Clear(); - void Initial(int player, int deckc, int extrac); + void Initial(int player, int deckc, int extrac, int sidec = 0); + void ResetSequence(std::vector& list, bool reset_height); ClientCard* GetCard(int controler, int location, int sequence, int sub_seq = 0); void AddCard(ClientCard* pcard, int controler, int location, int sequence); ClientCard* RemoveCard(int controler, int location, int sequence); - void UpdateCard(int controler, int location, int sequence, char* data); - void UpdateFieldCard(int controler, int location, char* data); + void UpdateCard(int controler, int location, int sequence, unsigned char* data); + void UpdateFieldCard(int controler, int location, unsigned char* data); void ClearCommandFlag(); void ClearSelect(); void ClearChainSelect(); - void ShowSelectCard(bool buttonok = false, bool chain = false); + void ShowSelectCard(bool buttonok = false, bool is_continuous = false); void ShowChainCard(); void ShowLocationCard(); + void ShowSelectOption(int select_hint = 0); void ReplaySwap(); void RefreshAllCards(); - + void GetChainLocation(int controler, int location, int sequence, irr::core::vector3df* t); void GetCardLocation(ClientCard* pcard, irr::core::vector3df* t, irr::core::vector3df* r, bool setTrans = false); void MoveCard(ClientCard* pcard, int frame); void FadeCard(ClientCard* pcard, int alpha, int frame); + bool ShowSelectSum(bool panelmode); bool CheckSelectSum(); - bool check_min(std::set& left, std::set::iterator index, int min, int max); - bool check_sel_sum_s(std::set& left, int index, int acc); - void check_sel_sum_t(std::set& left, int acc); - bool check_sum(std::set& testlist, std::set::iterator index, int acc, int count); - - irr::gui::IGUIElement* panel; + bool CheckSelectTribute(); + void get_sum_params(unsigned int opParam, int& op1, int& op2); + bool check_min(const std::set& left, std::set::const_iterator index, int min, int max); + bool check_sel_sum_s(const std::set& left, int index, int acc); + void check_sel_sum_t(const std::set& left, int acc); + bool check_sum(std::set::const_iterator index, std::set::const_iterator end, int acc, int count); + bool check_sel_sum_trib_s(const std::set& left, int index, int acc); + void check_sel_sum_trib_t(const std::set& left, int acc); + bool check_sum_trib(std::set::const_iterator index, std::set::const_iterator end, int acc); + + void UpdateDeclarableList(); + + irr::gui::IGUIElement* panel{ nullptr }; std::vector ancard; - int hovered_controler; - int hovered_location; - size_t hovered_sequence; - int command_controler; - int command_location; - size_t command_sequence; - ClientCard* hovered_card; - ClientCard* clicked_card; - ClientCard* command_card; - ClientCard* highlighting_card; - int list_command; - wchar_t formatBuffer[2048]; + int hovered_controler{ 0 }; + int hovered_location{ 0 }; + size_t hovered_sequence{ 0 }; + int command_controler{ 0 }; + int command_location{ 0 }; + size_t command_sequence{ 0 }; + ClientCard* hovered_card{ nullptr }; + int hovered_player{ 0 }; + ClientCard* clicked_card{ nullptr }; + ClientCard* command_card{ nullptr }; + ClientCard* highlighting_card{ nullptr }; + ClientCard* menu_card{ nullptr }; + int list_command{ 0 }; - virtual bool OnEvent(const irr::SEvent& event); + bool OnEvent(const irr::SEvent& event) override; + bool OnCommonEvent(const irr::SEvent& event); void GetHoverField(int x, int y); void ShowMenu(int flag, int x, int y); + void HideMenu(); + void UpdateChainButtons(); + void ShowCancelOrFinishButton(int buttonOp); + void SetShowMark(ClientCard* pcard, bool enable); + void ShowCardInfoInList(ClientCard* pcard, irr::gui::IGUIElement* element, irr::gui::IGUIElement* parent); + void SetResponseSelectedCards() const; + void SetResponseSelectedOption() const; + void CancelOrFinish(); }; } +//special cards +#define CARD_QUESTION 38723936 + #endif //CLIENT_FIELD_H diff --git a/gframe/config.h b/gframe/config.h index 3abd33ab59..0e87da1764 100644 --- a/gframe/config.h +++ b/gframe/config.h @@ -1,77 +1,90 @@ -#ifndef __CONFIG_H -#define __CONFIG_H - -#pragma once - -#define _IRR_STATIC_LIB_ -#define _IRR_COMPILE_WITH_DX9_DEV_PACK -#ifdef _WIN32 - -#include -#include -#include - -#ifdef _MSC_VER -#define myswprintf _swprintf -#else -#define myswprintf swprintf -#endif - -#define socklen_t int - -#else //_WIN32 - -#include -#include -#include -#include -#include -#include -#include - -#define SD_BOTH 2 -#define SOCKET int -#define closesocket close -#define INVALID_SOCKET -1 -#define SOCKET_ERROR -1 -#define SOCKADDR_IN sockaddr_in -#define SOCKADDR sockaddr -#define SOCKET_ERRNO() (errno) - -#include -#define myswprintf(buf, fmt, ...) swprintf(buf, 4096, fmt, ##__VA_ARGS__) -inline int _wtoi(const wchar_t * s) { - wchar_t * endptr; - return (int)wcstol(s, &endptr, 10); -} -#endif - -#include -#include -#include -#include "CGUITTFont.h" -#include "CGUIImageButton.h" -#include -#include -#include -#include -#include -#include "bufferio.h" -#include "mymutex.h" -#include "mysignal.h" -#include "mythread.h" -#include "../ocgcore/ocgapi.h" -#include "../ocgcore/card.h" - -using namespace irr; -using namespace core; -using namespace scene; -using namespace video; -using namespace io; -using namespace gui; - -extern const unsigned short PRO_VERSION; -extern int enable_log; -extern bool exit_on_return; - -#endif +#ifndef YGOPRO_CONFIG_H +#define YGOPRO_CONFIG_H + +#define _IRR_STATIC_LIB_ +#define IRR_COMPILE_WITH_DX9_DEV_PACK + +#include + +#ifdef _WIN32 + +#define NOMINMAX +#include +#include +#include + +#if defined(_MSC_VER) || defined(__MINGW32__) +#define mywcsncasecmp _wcsnicmp +#define mystrncasecmp _strnicmp +#else +#define mywcsncasecmp wcsncasecmp +#define mystrncasecmp strncasecmp +#endif + +#define socklen_t int + +#else //_WIN32 + +#include +#include +#include +#include +#include +#include + +#define SD_BOTH 2 +#define SOCKET int +#define closesocket close +#define INVALID_SOCKET -1 +#define SOCKET_ERROR -1 +#define SOCKADDR_IN sockaddr_in +#define SOCKADDR sockaddr +#define SOCKET_ERRNO() (errno) + +#define mywcsncasecmp wcsncasecmp +#define mystrncasecmp strncasecmp +#endif + +#include +#include +#include +#include +#include +#include "bufferio.h" +#include "../ocgcore/ocgapi.h" + +template +inline int myswprintf(wchar_t(&buf)[N], const wchar_t* fmt, TR... args) { + return std::swprintf(buf, N, fmt, args...); +} +template +inline int mysnprintf(char(&buf)[N], const char* fmt, TR... args) { + return std::snprintf(buf, N, fmt, args...); +} + +inline FILE* mywfopen(const wchar_t* filename, const char* mode) { + FILE* fp{}; +#ifdef _WIN32 + wchar_t wmode[20]{}; + BufferIO::CopyCharArray(mode, wmode); + fp = _wfopen(filename, wmode); +#else + char fname[1024]{}; + BufferIO::EncodeUTF8(filename, fname); + fp = std::fopen(fname, mode); +#endif + return fp; +} + +#define myfopen std::fopen + +#include + +constexpr uint16_t PRO_VERSION = 0x1362; +extern unsigned int enable_log; +extern bool exit_on_return; +extern bool open_file; +extern wchar_t open_file_name[256]; +extern bool bot_mode; + +#endif diff --git a/gframe/data_manager.cpp b/gframe/data_manager.cpp index c3a3dd6b96..95238616ca 100644 --- a/gframe/data_manager.cpp +++ b/gframe/data_manager.cpp @@ -1,199 +1,271 @@ #include "data_manager.h" -#include +#include "game.h" +#include "client_card.h" +#include "spmemvfs/spmemvfs.h" namespace ygo { -const wchar_t* DataManager::unknown_string = L"???"; -wchar_t DataManager::strBuffer[2048]; +unsigned char DataManager::scriptBuffer[0x100000] = {}; DataManager dataManager; +static const char SELECT_STMT[] = "SELECT datas.id, datas.ot, datas.alias, datas.setcode, datas.type, datas.atk, datas.def, datas.level, datas.race, datas.attribute, datas.category," +" texts.name, texts.desc, texts.str1, texts.str2, texts.str3, texts.str4, texts.str5, texts.str6, texts.str7, texts.str8," +" texts.str9, texts.str10, texts.str11, texts.str12, texts.str13, texts.str14, texts.str15, texts.str16 FROM datas INNER JOIN texts ON datas.id = texts.id"; -bool DataManager::LoadDB(const char* file) { - sqlite3* pDB; - if(sqlite3_open(file, &pDB) != SQLITE_OK) - return Error(pDB); - sqlite3_stmt* pStmt; - const char* sql = "select * from datas,texts where datas.id=texts.id"; - if(sqlite3_prepare_v2(pDB, sql, -1, &pStmt, 0) != SQLITE_OK) - return Error(pDB); - CardDataC cd; - CardString cs; - for(int i = 0; i < 16; ++i) cs.desc[i] = 0; - int step = 0, len = 0; - do { - step = sqlite3_step(pStmt); - if(step == SQLITE_BUSY || step == SQLITE_ERROR || step == SQLITE_MISUSE) +DataManager::DataManager() : _datas(32768), _strings(32768) { + extra_setcode = { + {8512558u, {0x8f, 0x54, 0x59, 0x82, 0x13a}}, + {55088578u, {0x8f, 0x54, 0x59, 0x82, 0x13a}}, + }; +} +bool DataManager::ReadDB(sqlite3* pDB) { + sqlite3_stmt* pStmt = nullptr; + if (sqlite3_prepare_v2(pDB, SELECT_STMT, -1, &pStmt, nullptr) != SQLITE_OK) + return Error(pDB, pStmt); + wchar_t strBuffer[4096]; + for (int step = sqlite3_step(pStmt); step != SQLITE_DONE; step = sqlite3_step(pStmt)) { + if (step != SQLITE_ROW) return Error(pDB, pStmt); - else if(step == SQLITE_ROW) { - cd.code = sqlite3_column_int(pStmt, 0); - cd.ot = sqlite3_column_int(pStmt, 1); - cd.alias = sqlite3_column_int(pStmt, 2); - cd.setcode = sqlite3_column_int64(pStmt, 3); - cd.type = sqlite3_column_int(pStmt, 4); - cd.attack = sqlite3_column_int(pStmt, 5); - cd.defence = sqlite3_column_int(pStmt, 6); - unsigned int level = sqlite3_column_int(pStmt, 7); - cd.level = level & 0xff; - cd.lscale = (level >> 24) & 0xff; - cd.rscale = (level >> 16) & 0xff; - cd.race = sqlite3_column_int(pStmt, 8); - cd.attribute = sqlite3_column_int(pStmt, 9); - cd.category = sqlite3_column_int(pStmt, 10); - _datas.insert(std::make_pair(cd.code, cd)); - len = BufferIO::DecodeUTF8((const char*)sqlite3_column_text(pStmt, 12), strBuffer); - if(len) { - cs.name = new wchar_t[len + 1]; - memcpy(cs.name, strBuffer, (len + 1)*sizeof(wchar_t)); - } else cs.name = 0; - len = BufferIO::DecodeUTF8((const char*)sqlite3_column_text(pStmt, 13), strBuffer); - if(len) { - cs.text = new wchar_t[len + 1]; - memcpy(cs.text, strBuffer, (len + 1)*sizeof(wchar_t)); - } else { - cs.text = new wchar_t[1]; - cs.text[0] = 0; - } - for(int i = 14; i < 30; ++i) { - len = BufferIO::DecodeUTF8((const char*)sqlite3_column_text(pStmt, i), strBuffer); - if(len) { - cs.desc[i - 14] = new wchar_t[len + 1]; - memcpy(cs.desc[i - 14], strBuffer, (len + 1)*sizeof(wchar_t)); - } else cs.desc[i - 14] = 0; + uint32_t code = static_cast(sqlite3_column_int64(pStmt, 0)); + auto& cd = _datas[code]; + cd.code = code; + cd.ot = sqlite3_column_int(pStmt, 1); + cd.alias = sqlite3_column_int(pStmt, 2); + uint64_t setcode = static_cast(sqlite3_column_int64(pStmt, 3)); + write_setcode(cd.setcode, setcode); + cd.type = static_cast(sqlite3_column_int64(pStmt, 4)); + cd.attack = sqlite3_column_int(pStmt, 5); + cd.defense = sqlite3_column_int(pStmt, 6); + if (cd.type & TYPE_LINK) { + cd.link_marker = cd.defense; + cd.defense = 0; + } + else + cd.link_marker = 0; + uint32_t level = static_cast(sqlite3_column_int64(pStmt, 7)); + cd.level = level & 0xff; + cd.lscale = (level >> 24) & 0xff; + cd.rscale = (level >> 16) & 0xff; + cd.race = static_cast(sqlite3_column_int64(pStmt, 8)); + cd.attribute = static_cast(sqlite3_column_int64(pStmt, 9)); + cd.category = static_cast(sqlite3_column_int64(pStmt, 10)); + auto& cs = _strings[code]; + if (const char* text = (const char*)sqlite3_column_text(pStmt, 11)) { + BufferIO::DecodeUTF8(text, strBuffer); + cs.name = strBuffer; + } + if (const char* text = (const char*)sqlite3_column_text(pStmt, 12)) { + BufferIO::DecodeUTF8(text, strBuffer); + cs.text = strBuffer; + } + for (int i = 0; i < DESC_COUNT; ++i) { + if (const char* text = (const char*)sqlite3_column_text(pStmt, 13 + i)) { + BufferIO::DecodeUTF8(text, strBuffer); + cs.desc[i] = strBuffer; } - _strings.insert(std::make_pair(cd.code, cs)); } - } while(step != SQLITE_DONE); + } sqlite3_finalize(pStmt); - sqlite3_close(pDB); + for (const auto& entry : extra_setcode) { + const auto& code = entry.first; + const auto& list = entry.second; + if (list.size() > SIZE_SETCODE || list.empty()) + continue; + auto it = _datas.find(code); + if (it == _datas.end()) + continue; + std::memcpy(it->second.setcode, list.data(), list.size() * sizeof(uint16_t)); + } return true; } +bool DataManager::LoadDB(const wchar_t* wfile) { + char file[256]; + BufferIO::EncodeUTF8(wfile, file); +#ifdef _IRR_WCHAR_FILESYSTEM + auto reader = FileSystem->createAndOpenFile(wfile); +#else + auto reader = FileSystem->createAndOpenFile(file); +#endif + if(reader == nullptr) + return false; + spmemvfs_db_t db; + spmembuffer_t* mem = (spmembuffer_t*)std::calloc(sizeof(spmembuffer_t), 1); + spmemvfs_env_init(); + mem->total = mem->used = reader->getSize(); + mem->data = (char*)std::malloc(mem->total); + reader->read(mem->data, mem->total); + reader->drop(); + bool ret{}; + if (spmemvfs_open_db(&db, file, mem) != SQLITE_OK) + ret = Error(db.handle); + else + ret = ReadDB(db.handle); + spmemvfs_close_db(&db); + spmemvfs_env_fini(); + return ret; +} bool DataManager::LoadStrings(const char* file) { - FILE* fp = fopen(file, "r"); + FILE* fp = myfopen(file, "r"); if(!fp) return false; - for(int i = 0; i < 2048; ++i) - _sysStrings[i] = 0; - char linebuf[256]; - char strbuf[256]; - int value; - fseek(fp, 0, SEEK_END); - int fsize = ftell(fp); - fseek(fp, 0, SEEK_SET); - fgets(linebuf, 256, fp); - while(ftell(fp) < fsize) { - fgets(linebuf, 256, fp); - if(linebuf[0] != '!') - continue; - sscanf(linebuf, "!%s", strbuf); - if(!strcmp(strbuf, "system")) { - sscanf(&linebuf[7], "%d %s", &value, strbuf); - int len = BufferIO::DecodeUTF8(strbuf, strBuffer); - wchar_t* pbuf = new wchar_t[len + 1]; - wcscpy(pbuf, strBuffer); - _sysStrings[value] = pbuf; - } else if(!strcmp(strbuf, "victory")) { - sscanf(&linebuf[8], "%x %s", &value, strbuf); - int len = BufferIO::DecodeUTF8(strbuf, strBuffer); - wchar_t* pbuf = new wchar_t[len + 1]; - wcscpy(pbuf, strBuffer); - _victoryStrings[value] = pbuf; - } else if(!strcmp(strbuf, "counter")) { - sscanf(&linebuf[8], "%x %s", &value, strbuf); - int len = BufferIO::DecodeUTF8(strbuf, strBuffer); - wchar_t* pbuf = new wchar_t[len + 1]; - wcscpy(pbuf, strBuffer); - _counterStrings[value] = pbuf; + char linebuf[TEXT_LINE_SIZE]{}; + while(std::fgets(linebuf, sizeof linebuf, fp)) { + ReadStringConfLine(linebuf); + } + std::fclose(fp); + return true; +} +bool DataManager::LoadStrings(irr::io::IReadFile* reader) { + char ch{}; + std::string linebuf; + while (reader->read(&ch, 1)) { + if (ch == '\0') + break; + linebuf.push_back(ch); + if (ch == '\n' || linebuf.size() >= TEXT_LINE_SIZE - 1) { + ReadStringConfLine(linebuf.data()); + linebuf.clear(); } } - fclose(fp); - for(int i = 0; i < 255; ++i) - myswprintf(numStrings[i], L"%d", i); + reader->drop(); return true; } +void DataManager::ReadStringConfLine(const char* linebuf) { + if(linebuf[0] != '!') + return; + char strbuf[TEXT_LINE_SIZE]{}; + int value{}; + wchar_t strBuffer[4096]{}; + if (std::sscanf(linebuf, "!%63s", strbuf) != 1) + return; + if(!std::strcmp(strbuf, "system")) { + if (std::sscanf(&linebuf[7], "%d %240[^\n]", &value, strbuf) != 2) + return; + BufferIO::DecodeUTF8(strbuf, strBuffer); + _sysStrings[value] = strBuffer; + } else if(!std::strcmp(strbuf, "victory")) { + if (std::sscanf(&linebuf[8], "%x %240[^\n]", &value, strbuf) != 2) + return; + BufferIO::DecodeUTF8(strbuf, strBuffer); + _victoryStrings[value] = strBuffer; + } else if(!std::strcmp(strbuf, "counter")) { + if (std::sscanf(&linebuf[8], "%x %240[^\n]", &value, strbuf) != 2) + return; + BufferIO::DecodeUTF8(strbuf, strBuffer); + _counterStrings[value] = strBuffer; + } else if(!std::strcmp(strbuf, "setname")) { + //using tab for comment + if (std::sscanf(&linebuf[8], "%x %240[^\t\n]", &value, strbuf) != 2) + return; + BufferIO::DecodeUTF8(strbuf, strBuffer); + _setnameStrings[value] = strBuffer; + } +} bool DataManager::Error(sqlite3* pDB, sqlite3_stmt* pStmt) { - BufferIO::DecodeUTF8(sqlite3_errmsg(pDB), strBuffer); - if(pStmt) - sqlite3_finalize(pStmt); - sqlite3_close(pDB); + if (const char* msg = sqlite3_errmsg(pDB)) + mysnprintf(errmsg, "%s", msg); + else + errmsg[0] = '\0'; + sqlite3_finalize(pStmt); return false; } -bool DataManager::GetData(int code, CardData* pData) { +code_pointer DataManager::GetCodePointer(uint32_t code) const { + return _datas.find(code); +} +string_pointer DataManager::GetStringPointer(uint32_t code) const { + return _strings.find(code); +} +bool DataManager::GetData(uint32_t code, CardData* pData) const { auto cdit = _datas.find(code); if(cdit == _datas.end()) return false; - if(pData) - *pData = *((CardData*)&cdit->second); + if (pData) { + std::memcpy(pData, &cdit->second, sizeof(CardData)); + } return true; } -code_pointer DataManager::GetCodePointer(int code) { - return _datas.find(code); -} -bool DataManager::GetString(int code, CardString* pStr) { +bool DataManager::GetString(uint32_t code, CardString* pStr) const { auto csit = _strings.find(code); if(csit == _strings.end()) { - pStr->name = (wchar_t*)unknown_string; - pStr->text = (wchar_t*)unknown_string; + pStr->name = unknown_string; + pStr->text = unknown_string; return false; } *pStr = csit->second; return true; } -const wchar_t* DataManager::GetName(int code) { +const wchar_t* DataManager::GetName(uint32_t code) const { auto csit = _strings.find(code); if(csit == _strings.end()) return unknown_string; - if(csit->second.name) - return csit->second.name; + if(!csit->second.name.empty()) + return csit->second.name.c_str(); return unknown_string; } -const wchar_t* DataManager::GetText(int code) { +const wchar_t* DataManager::GetText(uint32_t code) const { auto csit = _strings.find(code); if(csit == _strings.end()) return unknown_string; - if(csit->second.text) - return csit->second.text; + if(!csit->second.text.empty()) + return csit->second.text.c_str(); return unknown_string; } -const wchar_t* DataManager::GetDesc(int strCode) { - if(strCode < 10000) +const wchar_t* DataManager::GetDesc(uint32_t strCode) const { + if (strCode < (MIN_CARD_ID << 4)) return GetSysString(strCode); - int code = strCode >> 4; - int offset = strCode & 0xf; + unsigned int code = (strCode >> 4) & 0x0fffffff; + unsigned int offset = strCode & 0xf; auto csit = _strings.find(code); if(csit == _strings.end()) return unknown_string; - if(csit->second.desc[offset]) - return csit->second.desc[offset]; + if(!csit->second.desc[offset].empty()) + return csit->second.desc[offset].c_str(); return unknown_string; } -const wchar_t* DataManager::GetSysString(int code) { - if(code < 0 || code >= 2048 || _sysStrings[code] == 0) +const wchar_t* DataManager::GetMapString(const wstring_map& table, uint32_t code) const { + auto csit = table.find(code); + if (csit == table.end()) return unknown_string; - return _sysStrings[code]; + return csit->second.c_str(); } -const wchar_t* DataManager::GetVictoryString(int code) { - auto csit = _victoryStrings.find(code); - if(csit == _victoryStrings.end()) - return unknown_string; - return csit->second; +const wchar_t* DataManager::GetSysString(uint32_t code) const { + return GetMapString(_sysStrings, code); } -const wchar_t* DataManager::GetCounterName(int code) { - auto csit = _counterStrings.find(code); - if(csit == _counterStrings.end()) - return unknown_string; - return csit->second; +const wchar_t* DataManager::GetVictoryString(uint32_t code) const { + return GetMapString(_victoryStrings, code); +} +const wchar_t* DataManager::GetCounterName(uint32_t code) const { + return GetMapString(_counterStrings, code); +} +const wchar_t* DataManager::GetSetName(uint32_t code) const { + return GetMapString(_setnameStrings, code); } -const wchar_t* DataManager::GetNumString(int num, bool bracket) { +std::vector DataManager::GetSetCodes(std::wstring setname) const { + std::vector matchingCodes; + for(auto csit = _setnameStrings.begin(); csit != _setnameStrings.end(); ++csit) { + auto xpos = csit->second.find_first_of(L'|');//setname|another setname or extra info + if(setname.size() < 2) { + if(csit->second.compare(0, xpos, setname) == 0 + || csit->second.compare(xpos + 1, csit->second.length(), setname) == 0) + matchingCodes.push_back(csit->first); + } else { + if(csit->second.substr(0, xpos).find(setname) != std::wstring::npos + || csit->second.substr(xpos + 1).find(setname) != std::wstring::npos) { + matchingCodes.push_back(csit->first); + } + } + } + return matchingCodes; +} +std::wstring DataManager::GetNumString(int num, bool bracket) const { if(!bracket) - return numStrings[num]; - wchar_t* p = numBuffer; - *p++ = L'('; - BufferIO::CopyWStrRef(numStrings[num], p, 4); - *p = L')'; - *++p = 0; + return std::to_wstring(num); + std::wstring numBuffer{ L"(" }; + numBuffer.append(std::to_wstring(num)); + numBuffer.push_back(L')'); return numBuffer; } -const wchar_t* DataManager::FormatLocation(int location, int sequence) { - if(location == 0x8) { +const wchar_t* DataManager::FormatLocation(int location, int sequence) const { + if(location == LOCATION_SZONE) { if(sequence < 5) return GetSysString(1003); else if(sequence == 5) @@ -201,68 +273,221 @@ const wchar_t* DataManager::FormatLocation(int location, int sequence) { else return GetSysString(1009); } - int filter = 1, i = 1000; - while(filter != location) { - filter <<= 1; - i++; + int string_id = 0; + for (int i = 0; i < 10; ++i) { + if ((0x1U << i) == location) { + string_id = STRING_ID_LOCATION + i; + break; + } } - if(filter == location) - return GetSysString(i); + if (string_id) + return GetSysString(string_id); else return unknown_string; } -const wchar_t* DataManager::FormatAttribute(int attribute) { - wchar_t* p = attBuffer; - int filter = 1, i = 1010; - for(; filter != 0x80; filter <<= 1, ++i) { - if(attribute & filter) { - BufferIO::CopyWStrRef(GetSysString(i), p, 16); - *p = L'|'; - *++p = 0; +const wchar_t* DataManager::FormatLocation(ClientCard* card) const { + if (!card) + return unknown_string; + return FormatLocation(card->location, card->sequence); +} +std::wstring DataManager::FormatAttribute(unsigned int attribute) const { + std::wstring buffer; + for (int i = 0; i < ATTRIBUTES_COUNT; ++i) { + if (attribute & (0x1U << i)) { + if (!buffer.empty()) + buffer.push_back(L'|'); + buffer.append(GetSysString(STRING_ID_ATTRIBUTE + i)); } } - if(p != attBuffer) - *(p - 1) = 0; - else - return unknown_string; - return attBuffer; -} -const wchar_t* DataManager::FormatRace(int race) { - wchar_t* p = racBuffer; - int filter = 1, i = 1020; - for(; filter != 0x1000000; filter <<= 1, ++i) { - if(race & filter) { - BufferIO::CopyWStrRef(GetSysString(i), p, 16); - *p = L'|'; - *++p = 0; + if (buffer.empty()) + buffer = unknown_string; + return buffer; +} +std::wstring DataManager::FormatRace(unsigned int race) const { + std::wstring buffer; + for(int i = 0; i < RACES_COUNT; ++i) { + if(race & (0x1U << i)) { + if (!buffer.empty()) + buffer.push_back(L'|'); + buffer.append(GetSysString(STRING_ID_RACE + i)); } } - if(p != racBuffer) - *(p - 1) = 0; - else - return unknown_string; - return racBuffer; -} -const wchar_t* DataManager::FormatType(int type) { - wchar_t* p = tpBuffer; - int filter = 1, i = 1050; - for(; filter != 0x2000000; filter <<= 1, ++i) { - if(type & filter) { - BufferIO::CopyWStrRef(GetSysString(i), p, 16); - *p = L'|'; - *++p = 0; + if (buffer.empty()) + buffer = unknown_string; + return buffer; +} +std::wstring DataManager::FormatType(unsigned int type) const { + std::wstring buffer; + for (int i = 0; i < TYPES_COUNT; ++i) { + if (type & (0x1U << i)) { + if (!buffer.empty()) + buffer.push_back(L'|'); + buffer.append(GetSysString(STRING_ID_TYPE + i)); } } - if(p != tpBuffer) - *(p - 1) = 0; - else - return unknown_string; - return tpBuffer; + if (buffer.empty()) + buffer = unknown_string; + return buffer; } -int DataManager::CardReader(int code, void* pData) { - if(!dataManager.GetData(code, (CardData*)pData)) - memset(pData, 0, sizeof(CardData)); +std::wstring DataManager::FormatSetName(const uint16_t setcode[]) const { + std::wstring buffer; + for(int i = 0; i < 10; ++i) { + if (!setcode[i]) + break; + const wchar_t* setname = GetSetName(setcode[i]); + if (!buffer.empty()) + buffer.push_back(L'|'); + buffer.append(setname); + } + if (buffer.empty()) + buffer = unknown_string; + return buffer; +} +std::wstring DataManager::FormatLinkMarker(unsigned int link_marker) const { + std::wstring buffer; + if (link_marker & LINK_MARKER_TOP_LEFT) + buffer.append(L"[\u2196]"); + if (link_marker & LINK_MARKER_TOP) + buffer.append(L"[\u2191]"); + if (link_marker & LINK_MARKER_TOP_RIGHT) + buffer.append(L"[\u2197]"); + if (link_marker & LINK_MARKER_LEFT) + buffer.append(L"[\u2190]"); + if (link_marker & LINK_MARKER_RIGHT) + buffer.append(L"[\u2192]"); + if (link_marker & LINK_MARKER_BOTTOM_LEFT) + buffer.append(L"[\u2199]"); + if (link_marker & LINK_MARKER_BOTTOM) + buffer.append(L"[\u2193]"); + if (link_marker & LINK_MARKER_BOTTOM_RIGHT) + buffer.append(L"[\u2198]"); + return buffer; +} +uint32_t DataManager::CardReader(uint32_t code, card_data* pData) { + if (!dataManager.GetData(code, pData)) + pData->clear(); return 0; } +unsigned char* DataManager::ScriptReaderEx(const char* script_path, int* slen) { + // default script name: ./script/c%d.lua + if (std::strncmp(script_path, "./script", 8) != 0) // not a card script file + return ReadScriptFromFile(script_path, slen); + const char* script_name = script_path + 2; + char expansions_path[1024]{}; + mysnprintf(expansions_path, "./expansions/%s", script_name); + if (mainGame->gameConf.prefer_expansion_script) { // debug script with raw file in expansions + if (ReadScriptFromFile(expansions_path, slen)) + return scriptBuffer; + if (ReadScriptFromIrrFS(script_name, slen)) + return scriptBuffer; + if (ReadScriptFromFile(script_path, slen)) + return scriptBuffer; + } else { + if (ReadScriptFromIrrFS(script_name, slen)) + return scriptBuffer; + if (ReadScriptFromFile(script_path, slen)) + return scriptBuffer; + if (ReadScriptFromFile(expansions_path, slen)) + return scriptBuffer; + } + + return nullptr; +} +unsigned char* DataManager::ReadScriptFromIrrFS(const char* script_name, int* slen) { +#ifdef _IRR_WCHAR_FILESYSTEM + wchar_t fname[256]{}; + BufferIO::DecodeUTF8(script_name, fname); + auto reader = dataManager.FileSystem->createAndOpenFile(fname); +#else + auto reader = dataManager.FileSystem->createAndOpenFile(script_name); +#endif + if (!reader) + return nullptr; + int size = reader->read(scriptBuffer, sizeof scriptBuffer); + reader->drop(); + if (size >= (int)sizeof scriptBuffer) + return nullptr; + *slen = size; + return scriptBuffer; +} +unsigned char* DataManager::ReadScriptFromFile(const char* script_name, int* slen) { + FILE* fp = myfopen(script_name, "rb"); + if (!fp) + return nullptr; + size_t len = std::fread(scriptBuffer, 1, sizeof scriptBuffer, fp); + std::fclose(fp); + if (len >= sizeof scriptBuffer) + return nullptr; + *slen = (int)len; + return scriptBuffer; +} +bool DataManager::deck_sort_lv(code_pointer p1, code_pointer p2) { + if ((p1->second.type & 0x7) != (p2->second.type & 0x7)) + return (p1->second.type & 0x7) < (p2->second.type & 0x7); + if ((p1->second.type & 0x7) == 1) { + int type1 = (p1->second.type & 0x48020c0) ? (p1->second.type & 0x48020c1) : (p1->second.type & 0x31); + int type2 = (p2->second.type & 0x48020c0) ? (p2->second.type & 0x48020c1) : (p2->second.type & 0x31); + if (type1 != type2) + return type1 < type2; + if (p1->second.level != p2->second.level) + return p1->second.level > p2->second.level; + if (p1->second.attack != p2->second.attack) + return p1->second.attack > p2->second.attack; + if (p1->second.defense != p2->second.defense) + return p1->second.defense > p2->second.defense; + return p1->first < p2->first; + } + if ((p1->second.type & 0xfffffff8) != (p2->second.type & 0xfffffff8)) + return (p1->second.type & 0xfffffff8) < (p2->second.type & 0xfffffff8); + return p1->first < p2->first; +} +bool DataManager::deck_sort_atk(code_pointer p1, code_pointer p2) { + if ((p1->second.type & 0x7) != (p2->second.type & 0x7)) + return (p1->second.type & 0x7) < (p2->second.type & 0x7); + if ((p1->second.type & 0x7) == 1) { + if (p1->second.attack != p2->second.attack) + return p1->second.attack > p2->second.attack; + if (p1->second.defense != p2->second.defense) + return p1->second.defense > p2->second.defense; + if (p1->second.level != p2->second.level) + return p1->second.level > p2->second.level; + int type1 = (p1->second.type & 0x48020c0) ? (p1->second.type & 0x48020c1) : (p1->second.type & 0x31); + int type2 = (p2->second.type & 0x48020c0) ? (p2->second.type & 0x48020c1) : (p2->second.type & 0x31); + if (type1 != type2) + return type1 < type2; + return p1->first < p2->first; + } + if ((p1->second.type & 0xfffffff8) != (p2->second.type & 0xfffffff8)) + return (p1->second.type & 0xfffffff8) < (p2->second.type & 0xfffffff8); + return p1->first < p2->first; +} +bool DataManager::deck_sort_def(code_pointer p1, code_pointer p2) { + if ((p1->second.type & 0x7) != (p2->second.type & 0x7)) + return (p1->second.type & 0x7) < (p2->second.type & 0x7); + if ((p1->second.type & 0x7) == 1) { + if (p1->second.defense != p2->second.defense) + return p1->second.defense > p2->second.defense; + if (p1->second.attack != p2->second.attack) + return p1->second.attack > p2->second.attack; + if (p1->second.level != p2->second.level) + return p1->second.level > p2->second.level; + int type1 = (p1->second.type & 0x48020c0) ? (p1->second.type & 0x48020c1) : (p1->second.type & 0x31); + int type2 = (p2->second.type & 0x48020c0) ? (p2->second.type & 0x48020c1) : (p2->second.type & 0x31); + if (type1 != type2) + return type1 < type2; + return p1->first < p2->first; + } + if ((p1->second.type & 0xfffffff8) != (p2->second.type & 0xfffffff8)) + return (p1->second.type & 0xfffffff8) < (p2->second.type & 0xfffffff8); + return p1->first < p2->first; +} +bool DataManager::deck_sort_name(code_pointer p1, code_pointer p2) { + const wchar_t* name1 = dataManager.GetName(p1->first); + const wchar_t* name2 = dataManager.GetName(p2->first); + int res = std::wcscmp(name1, name2); + if (res != 0) + return res < 0; + return p1->first < p2->first; +} } diff --git a/gframe/data_manager.h b/gframe/data_manager.h index bafe2a119d..246e140d97 100644 --- a/gframe/data_manager.h +++ b/gframe/data_manager.h @@ -1,50 +1,136 @@ #ifndef DATAMANAGER_H #define DATAMANAGER_H -#include "config.h" -#include "sqlite3.h" -#include "client_card.h" #include +#include +#include +#include +#include "../ocgcore/card_data.h" + +namespace irr { + namespace io { + class IReadFile; + class IFileSystem; + } +} namespace ygo { +constexpr int MAX_STRING_ID = 0x7ff; +constexpr uint32_t MIN_CARD_ID = (uint32_t)(MAX_STRING_ID + 1) >> 4; +constexpr uint32_t MAX_CARD_ID = 0x0fffffffU; + +using CardData = card_data; +struct CardDataC { + uint32_t code{}; + uint32_t alias{}; + uint16_t setcode[SIZE_SETCODE]{}; + uint32_t type{}; + uint32_t level{}; + uint32_t attribute{}; + uint32_t race{}; + int32_t attack{}; + int32_t defense{}; + uint32_t lscale{}; + uint32_t rscale{}; + uint32_t link_marker{}; + uint32_t ot{}; + uint32_t category{}; + + bool is_setcodes(const std::vector& values) const { + for (auto& value : values) { + for (const auto& x : setcode) { + if(!x) + break; + if(check_setcode(x, value)) + return true; + } + } + return false; + } +}; +constexpr int DESC_COUNT = 16; +struct CardString { + std::wstring name; + std::wstring text; + std::wstring desc[DESC_COUNT]; +}; +using code_pointer = std::unordered_map::const_iterator; +using string_pointer = std::unordered_map::const_iterator; +using wstring_map = std::unordered_map; + +class ClientCard; + class DataManager { public: - DataManager(): _datas(8192), _strings(8192) {} - bool LoadDB(const char* file); + DataManager(); + bool ReadDB(sqlite3* pDB); + bool LoadDB(const wchar_t* wfile); bool LoadStrings(const char* file); - bool Error(sqlite3* pDB, sqlite3_stmt* pStmt = 0); - bool GetData(int code, CardData* pData); - code_pointer GetCodePointer(int code); - bool GetString(int code, CardString* pStr); - const wchar_t* GetName(int code); - const wchar_t* GetText(int code); - const wchar_t* GetDesc(int strCode); - const wchar_t* GetSysString(int code); - const wchar_t* GetVictoryString(int code); - const wchar_t* GetCounterName(int code); - const wchar_t* GetNumString(int num, bool bracket = false); - const wchar_t* FormatLocation(int location, int sequence); - const wchar_t* FormatAttribute(int attribute); - const wchar_t* FormatRace(int race); - const wchar_t* FormatType(int type); - - std::unordered_map _datas; - std::unordered_map _strings; - std::unordered_map _counterStrings; - std::unordered_map _victoryStrings; - - wchar_t* _sysStrings[2048]; - wchar_t numStrings[256][4]; - wchar_t numBuffer[6]; - wchar_t attBuffer[128]; - wchar_t racBuffer[128]; - wchar_t tpBuffer[128]; - - static wchar_t strBuffer[2048]; - static const wchar_t* unknown_string; - static int CardReader(int, void*); + bool LoadStrings(irr::io::IReadFile* reader); + void ReadStringConfLine(const char* linebuf); + bool Error(sqlite3* pDB, sqlite3_stmt* pStmt = nullptr); + + code_pointer GetCodePointer(uint32_t code) const; + string_pointer GetStringPointer(uint32_t code) const; + const std::unordered_map& GetDataTable() const { + return _datas; + } + const std::unordered_map& GetStringTable() const { + return _strings; + } + bool GetData(uint32_t code, CardData* pData) const; + bool GetString(uint32_t code, CardString* pStr) const; + const wchar_t* GetName(uint32_t code) const; + const wchar_t* GetText(uint32_t code) const; + const wchar_t* GetDesc(uint32_t strCode) const; + const wchar_t* GetSysString(uint32_t code) const; + const wchar_t* GetVictoryString(uint32_t code) const; + const wchar_t* GetCounterName(uint32_t code) const; + const wchar_t* GetSetName(uint32_t code) const; + std::vector GetSetCodes(std::wstring setname) const; + std::wstring GetNumString(int num, bool bracket = false) const; + const wchar_t* FormatLocation(int location, int sequence) const; + const wchar_t* FormatLocation(ClientCard* card) const; + std::wstring FormatAttribute(unsigned int attribute) const; + std::wstring FormatRace(unsigned int race) const; + std::wstring FormatType(unsigned int type) const; + std::wstring FormatSetName(const uint16_t setcode[]) const; + std::wstring FormatLinkMarker(unsigned int link_marker) const; + + wstring_map _counterStrings; + wstring_map _victoryStrings; + wstring_map _setnameStrings; + wstring_map _sysStrings; + char errmsg[512]{}; + const wchar_t* unknown_string{ L"???" }; + irr::io::IFileSystem* FileSystem{}; + + static constexpr uint32_t STRING_ID_LOCATION = 1000; + static constexpr uint32_t STRING_ID_ATTRIBUTE = 1010; + static constexpr uint32_t STRING_ID_RACE = 1020; + static constexpr uint32_t STRING_ID_TYPE = 1050; + static constexpr int TYPES_COUNT = 27; + + static unsigned char scriptBuffer[0x100000]; + static uint32_t CardReader(uint32_t, card_data*); + static unsigned char* ScriptReaderEx(const char* script_path, int* slen); + + //read by IFileSystem + static unsigned char* ReadScriptFromIrrFS(const char* script_name, int* slen); + //read by fread + static unsigned char* ReadScriptFromFile(const char* script_name, int* slen); + static bool deck_sort_lv(code_pointer l1, code_pointer l2); + static bool deck_sort_atk(code_pointer l1, code_pointer l2); + static bool deck_sort_def(code_pointer l1, code_pointer l2); + static bool deck_sort_name(code_pointer l1, code_pointer l2); + +private: + const wchar_t* GetMapString(const wstring_map& table, uint32_t code) const; + std::unordered_map _datas; + std::unordered_map _strings; + std::unordered_map> extra_setcode; }; extern DataManager dataManager; diff --git a/gframe/deck_con.cpp b/gframe/deck_con.cpp index 83374fd4e3..766153739f 100644 --- a/gframe/deck_con.cpp +++ b/gframe/deck_con.cpp @@ -1,41 +1,203 @@ +#include #include "config.h" #include "deck_con.h" -#include "data_manager.h" -#include "deck_manager.h" +#include "myfilesystem.h" #include "image_manager.h" +#include "sound_manager.h" #include "game.h" #include "duelclient.h" -#include namespace ygo { +static int parse_filter(const wchar_t* pstr, unsigned int* type) { + if(*pstr == L'=') { + *type = 1; + return BufferIO::GetVal(pstr + 1); + } else if(*pstr >= L'0' && *pstr <= L'9') { + *type = 1; + return BufferIO::GetVal(pstr); + } else if(*pstr == L'>') { + if(*(pstr + 1) == L'=') { + *type = 2; + return BufferIO::GetVal(pstr + 2); + } else { + *type = 3; + return BufferIO::GetVal(pstr + 1); + } + } else if(*pstr == L'<') { + if(*(pstr + 1) == L'=') { + *type = 4; + return BufferIO::GetVal(pstr + 2); + } else { + *type = 5; + return BufferIO::GetVal(pstr + 1); + } + } else if(*pstr == L'?') { + *type = 6; + return 0; + } + *type = 0; + return 0; +} + + +static inline bool havePopupWindow() { + return mainGame->wQuery->isVisible() || mainGame->wCategories->isVisible() || mainGame->wLinkMarks->isVisible() || mainGame->wDeckManage->isVisible() || mainGame->wDMQuery->isVisible(); +} + +static inline void get_deck_file(wchar_t* ret) { + DeckManager::GetDeckFile(ret, mainGame->cbDBCategory->getSelected(), mainGame->cbDBCategory->getText(), mainGame->cbDBDecks->getText()); +} + +static inline void load_current_deck(irr::gui::IGUIComboBox* cbCategory, irr::gui::IGUIComboBox* cbDeck) { + deckManager.LoadCurrentDeck(cbCategory->getSelected(), cbCategory->getText(), cbDeck->getText()); +} + +DeckBuilder::DeckBuilder() { + std::random_device rd; + std::array seed{}; + for (auto& x : seed) + x = rd(); + std::seed_seq seq(seed.begin(), seed.end()); + rnd.seed(seq); +} +void DeckBuilder::Initialize() { + mainGame->is_building = true; + mainGame->is_siding = false; + mainGame->ClearCardInfo(); + mainGame->wInfos->setVisible(true); + mainGame->wCardImg->setVisible(true); + mainGame->wDeckEdit->setVisible(true); + mainGame->wFilter->setVisible(true); + mainGame->wSort->setVisible(true); + mainGame->btnLeaveGame->setVisible(true); + mainGame->btnLeaveGame->setText(dataManager.GetSysString(1306)); + mainGame->btnSideOK->setVisible(false); + mainGame->btnSideShuffle->setVisible(false); + mainGame->btnSideSort->setVisible(false); + mainGame->btnSideReload->setVisible(false); + if (mainGame->gameConf.use_lflist) { + if (mainGame->gameConf.default_lflist >= 0 && mainGame->gameConf.default_lflist < (int)deckManager._lfList.size()) { + filterList = &deckManager._lfList[mainGame->gameConf.default_lflist]; + } + else { + mainGame->gameConf.default_lflist = 0; + filterList = &deckManager._lfList.front(); + } + } + else { + filterList = &deckManager._lfList.back(); + } + ClearSearch(); + mouse_pos.set(0, 0); + hovered_code = 0; + hovered_pos = 0; + hovered_seq = -1; + is_lastcard = 0; + is_draging = false; + is_starting_dragging = false; + prev_deck = mainGame->cbDBDecks->getSelected(); + prev_category = mainGame->cbDBCategory->getSelected(); + RefreshReadonly(prev_category); + RefreshPackListScroll(); + prev_operation = 0; + prev_sel = -1; + is_modified = false; + mainGame->device->setEventReceiver(this); +} +void DeckBuilder::Terminate() { + mainGame->is_building = false; + mainGame->ClearCardInfo(); + mainGame->wDeckEdit->setVisible(false); + mainGame->wCategories->setVisible(false); + mainGame->wFilter->setVisible(false); + mainGame->wSort->setVisible(false); + mainGame->wCardImg->setVisible(false); + mainGame->wInfos->setVisible(false); + mainGame->btnLeaveGame->setVisible(false); + mainGame->wBigCard->setVisible(false); + mainGame->btnBigCardOriginalSize->setVisible(false); + mainGame->btnBigCardZoomIn->setVisible(false); + mainGame->btnBigCardZoomOut->setVisible(false); + mainGame->btnBigCardClose->setVisible(false); + mainGame->ResizeChatInputWindow(); + mainGame->PopupElement(mainGame->wMainMenu); + mainGame->device->setEventReceiver(&mainGame->menuHandler); + mainGame->wACMessage->setVisible(false); + mainGame->ClearTextures(); + mainGame->showingcode = 0; + mainGame->scrFilter->setVisible(false); + mainGame->scrPackCards->setVisible(false); + mainGame->scrPackCards->setPos(0); + int catesel = mainGame->cbDBCategory->getSelected(); + if (catesel >= 0) + BufferIO::CopyWideString(mainGame->cbDBCategory->getItem(catesel), mainGame->gameConf.lastcategory); + int decksel = mainGame->cbDBDecks->getSelected(); + if (decksel >= 0) + BufferIO::CopyWideString(mainGame->cbDBDecks->getItem(decksel), mainGame->gameConf.lastdeck); + if(exit_on_return) + mainGame->device->closeDevice(); +} bool DeckBuilder::OnEvent(const irr::SEvent& event) { + if(mainGame->dField.OnCommonEvent(event)) + return false; + auto& _datas = dataManager.GetDataTable(); switch(event.EventType) { case irr::EET_GUI_EVENT: { - s32 id = event.GUIEvent.Caller->getID(); + irr::s32 id = event.GUIEvent.Caller->getID(); + if(((mainGame->wCategories->isVisible() && id != BUTTON_CATEGORY_OK) || + (mainGame->wQuery->isVisible() && id != BUTTON_YES && id != BUTTON_NO) || + (mainGame->wLinkMarks->isVisible() && id != BUTTON_MARKERS_OK) || + (mainGame->wDMQuery->isVisible() && id != BUTTON_DM_OK && id != BUTTON_DM_CANCEL) || + (mainGame->wDeckManage->isVisible() && !(id >= WINDOW_DECK_MANAGE && id < COMBOBOX_LFLIST))) + && event.GUIEvent.EventType != irr::gui::EGET_LISTBOX_CHANGED + && event.GUIEvent.EventType != irr::gui::EGET_COMBO_BOX_CHANGED) { + if(mainGame->wDMQuery->isVisible()) + mainGame->wDMQuery->getParent()->bringToFront(mainGame->wDMQuery); + break; + } switch(event.GUIEvent.EventType) { + case irr::gui::EGET_ELEMENT_CLOSED: { + if(id == WINDOW_DECK_MANAGE) { + mainGame->HideElement(mainGame->wDeckManage); + return true; + break; + } + break; + } case irr::gui::EGET_BUTTON_CLICKED: { + soundManager.PlaySoundEffect(SOUND_BUTTON); switch(id) { case BUTTON_CLEAR_DECK: { - deckManager.current_deck.main.clear(); - deckManager.current_deck.extra.clear(); - deckManager.current_deck.side.clear(); + mainGame->gMutex.lock(); + mainGame->SetStaticText(mainGame->stQMessage, 310, mainGame->guiFont, dataManager.GetSysString(1339)); + mainGame->PopupElement(mainGame->wQuery); + mainGame->gMutex.unlock(); + prev_operation = id; break; } case BUTTON_SORT_DECK: { - std::sort(deckManager.current_deck.main.begin(), deckManager.current_deck.main.end(), ClientCard::deck_sort_lv); - std::sort(deckManager.current_deck.extra.begin(), deckManager.current_deck.extra.end(), ClientCard::deck_sort_lv); - std::sort(deckManager.current_deck.side.begin(), deckManager.current_deck.side.end(), ClientCard::deck_sort_lv); + std::sort(deckManager.current_deck.main.begin(), deckManager.current_deck.main.end(), DataManager::deck_sort_lv); + std::sort(deckManager.current_deck.extra.begin(), deckManager.current_deck.extra.end(), DataManager::deck_sort_lv); + std::sort(deckManager.current_deck.side.begin(), deckManager.current_deck.side.end(), DataManager::deck_sort_lv); + is_modified = true; break; } case BUTTON_SHUFFLE_DECK: { - std::random_shuffle(deckManager.current_deck.main.begin(), deckManager.current_deck.main.end()); + std::shuffle(deckManager.current_deck.main.begin(), deckManager.current_deck.main.end(), rnd); + is_modified = true; break; } case BUTTON_SAVE_DECK: { - if(deckManager.SaveDeck(deckManager.current_deck, mainGame->cbDBDecks->getItem(mainGame->cbDBDecks->getSelected()))) { + int sel = mainGame->cbDBDecks->getSelected(); + if(sel == -1) + break; + wchar_t filepath[256]; + get_deck_file(filepath); + if(DeckManager::SaveDeck(deckManager.current_deck, filepath)) { mainGame->stACMessage->setText(dataManager.GetSysString(1335)); mainGame->PopupElement(mainGame->wACMessage, 20); + is_modified = false; } break; } @@ -44,8 +206,8 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) { if(*dname == 0) break; int sel = -1; - for(size_t i = 0; i < mainGame->cbDBDecks->getItemCount(); ++i) { - if(!wcscmp(dname, mainGame->cbDBDecks->getItem(i))) { + for(int i = 0; i < (int)mainGame->cbDBDecks->getItemCount(); ++i) { + if(!std::wcscmp(dname, mainGame->cbDBDecks->getItem(i))) { sel = i; break; } @@ -56,29 +218,52 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) { mainGame->cbDBDecks->addItem(dname); mainGame->cbDBDecks->setSelected(mainGame->cbDBDecks->getItemCount() - 1); } - if(deckManager.SaveDeck(deckManager.current_deck, dname)) { + prev_deck = mainGame->cbDBDecks->getSelected(); + int catesel = mainGame->cbDBCategory->getSelected(); + wchar_t catepath[256]; + DeckManager::GetCategoryPath(catepath, catesel, mainGame->cbDBCategory->getText()); + wchar_t filepath[256]; + myswprintf(filepath, L"%ls/%ls.ydk", catepath, dname); + if(DeckManager::SaveDeck(deckManager.current_deck, filepath)) { mainGame->stACMessage->setText(dataManager.GetSysString(1335)); mainGame->PopupElement(mainGame->wACMessage, 20); + is_modified = false; + if(catesel == -1) { + catesel = 2; + prev_category = catesel; + RefreshReadonly(catesel); + mainGame->cbDBCategory->setSelected(catesel); + mainGame->btnManageDeck->setEnabled(true); + mainGame->cbDBCategory->setEnabled(true); + mainGame->cbDBDecks->setEnabled(true); + } } break; } - case BUTTON_DBEXIT: { - mainGame->is_building = false; - mainGame->wDeckEdit->setVisible(false); - mainGame->wCategories->setVisible(false); - mainGame->wFilter->setVisible(false); - mainGame->wCardImg->setVisible(false); - mainGame->wInfos->setVisible(false); - mainGame->PopupElement(mainGame->wMainMenu); - mainGame->device->setEventReceiver(&mainGame->menuHandler); - mainGame->wACMessage->setVisible(false); - imageManager.ClearTexture(); - mainGame->scrFilter->setVisible(false); - if(mainGame->cbDBDecks->getSelected() != -1) { - BufferIO::CopyWStr(mainGame->cbDBDecks->getItem(mainGame->cbDBDecks->getSelected()), mainGame->gameConf.lastdeck, 64); + case BUTTON_DELETE_DECK: { + int sel = mainGame->cbDBDecks->getSelected(); + if(sel == -1) + break; + mainGame->gMutex.lock(); + wchar_t textBuffer[256]; + myswprintf(textBuffer, L"%ls\n%ls", mainGame->cbDBDecks->getItem(sel), dataManager.GetSysString(1337)); + mainGame->SetStaticText(mainGame->stQMessage, 310, mainGame->guiFont, textBuffer); + mainGame->PopupElement(mainGame->wQuery); + mainGame->gMutex.unlock(); + prev_operation = id; + prev_sel = sel; + break; + } + case BUTTON_LEAVE_GAME: { + if(is_modified && !readonly && !mainGame->chkIgnoreDeckChanges->isChecked()) { + mainGame->gMutex.lock(); + mainGame->SetStaticText(mainGame->stQMessage, 310, mainGame->guiFont, dataManager.GetSysString(1356)); + mainGame->PopupElement(mainGame->wQuery); + mainGame->gMutex.unlock(); + prev_operation = id; + break; } - if(exit_on_return) - mainGame->device->closeDevice(); + Terminate(); break; } case BUTTON_EFFECT_FILTER: { @@ -86,129 +271,549 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) { break; } case BUTTON_START_FILTER: { - filter_type = mainGame->cbCardType->getSelected(); - filter_type2 = mainGame->cbCardType2->getItemData(mainGame->cbCardType2->getSelected()); - filter_lm = mainGame->cbLimit->getSelected(); - if(filter_type > 1) { - FilterCards(); + StartFilter(); + if(!mainGame->gameConf.separate_clear_button) + ClearFilter(); + break; + } + case BUTTON_CLEAR_FILTER: { + ClearSearch(); + break; + } + case BUTTON_CATEGORY_OK: { + filter_effect = 0; + long long filter = 0x1; + for(int i = 0; i < 32; ++i, filter <<= 1) + if(mainGame->chkCategory[i]->isChecked()) + filter_effect |= filter; + mainGame->btnEffectFilter->setPressed(filter_effect > 0); + mainGame->HideElement(mainGame->wCategories); + InstantSearch(); + break; + } + case BUTTON_MANAGE_DECK: { + if(is_modified && !readonly && !mainGame->chkIgnoreDeckChanges->isChecked()) { + mainGame->gMutex.lock(); + mainGame->SetStaticText(mainGame->stQMessage, 310, mainGame->guiFont, dataManager.GetSysString(1356)); + mainGame->PopupElement(mainGame->wQuery); + mainGame->gMutex.unlock(); + prev_operation = id; break; } - filter_attrib = mainGame->cbAttribute->getItemData(mainGame->cbAttribute->getSelected()); - filter_race = mainGame->cbRace->getItemData(mainGame->cbRace->getSelected()); - const wchar_t* pstr = mainGame->ebAttack->getText(); - if(*pstr == 0) filter_atktype = 0; - else { - if(*pstr == L'=') { - filter_atktype = 1; - filter_atk = BufferIO::GetVal(pstr + 1); - } else if(*pstr >= L'0' && *pstr <= L'9') { - filter_atktype = 1; - filter_atk = BufferIO::GetVal(pstr); - } else if(*pstr == L'>') { - if(*(pstr + 1) == L'=') { - filter_atktype = 2; - filter_atk = BufferIO::GetVal(pstr + 2); - } else { - filter_atktype = 3; - filter_atk = BufferIO::GetVal(pstr + 1); + ShowDeckManage(); + break; + } + case BUTTON_NEW_CATEGORY: { + mainGame->gMutex.lock(); + mainGame->stDMMessage->setText(dataManager.GetSysString(1469)); + mainGame->ebDMName->setVisible(true); + mainGame->ebDMName->setText(L""); + mainGame->PopupElement(mainGame->wDMQuery); + mainGame->gMutex.unlock(); + prev_operation = id; + break; + } + case BUTTON_RENAME_CATEGORY: { + if(mainGame->lstCategories->getSelected() < 4) + break; + mainGame->gMutex.lock(); + mainGame->stDMMessage->setText(dataManager.GetSysString(1469)); + mainGame->ebDMName->setVisible(true); + mainGame->ebDMName->setText(mainGame->lstCategories->getListItem(mainGame->lstCategories->getSelected())); + mainGame->PopupElement(mainGame->wDMQuery); + mainGame->gMutex.unlock(); + prev_operation = id; + break; + } + case BUTTON_DELETE_CATEGORY: { + mainGame->gMutex.lock(); + mainGame->stDMMessage->setText(dataManager.GetSysString(1470)); + mainGame->stDMMessage2->setVisible(true); + mainGame->stDMMessage2->setText(mainGame->lstCategories->getListItem(mainGame->lstCategories->getSelected())); + mainGame->PopupElement(mainGame->wDMQuery); + mainGame->gMutex.unlock(); + prev_operation = id; + break; + } + case BUTTON_NEW_DECK: { + mainGame->gMutex.lock(); + mainGame->stDMMessage->setText(dataManager.GetSysString(1471)); + mainGame->ebDMName->setVisible(true); + mainGame->ebDMName->setText(L""); + mainGame->PopupElement(mainGame->wDMQuery); + mainGame->gMutex.unlock(); + prev_operation = id; + break; + } + case BUTTON_RENAME_DECK: { + mainGame->gMutex.lock(); + mainGame->stDMMessage->setText(dataManager.GetSysString(1471)); + mainGame->ebDMName->setVisible(true); + mainGame->ebDMName->setText(mainGame->lstDecks->getListItem(mainGame->lstDecks->getSelected())); + mainGame->PopupElement(mainGame->wDMQuery); + mainGame->gMutex.unlock(); + prev_operation = id; + break; + } + case BUTTON_DELETE_DECK_DM: { + mainGame->gMutex.lock(); + mainGame->stDMMessage->setText(dataManager.GetSysString(1337)); + mainGame->stDMMessage2->setVisible(true); + mainGame->stDMMessage2->setText(mainGame->lstDecks->getListItem(mainGame->lstDecks->getSelected())); + mainGame->PopupElement(mainGame->wDMQuery); + mainGame->gMutex.unlock(); + prev_operation = id; + break; + } + case BUTTON_MOVE_DECK: { + mainGame->gMutex.lock(); + mainGame->stDMMessage->setText(dataManager.GetSysString(1472)); + mainGame->cbDMCategory->setVisible(true); + mainGame->cbDMCategory->clear(); + int catesel = mainGame->lstCategories->getSelected(); + if(catesel != 2) + mainGame->cbDMCategory->addItem(dataManager.GetSysString(1452)); + for(int i = 4; i < (int)mainGame->lstCategories->getItemCount(); i++) { + if(i != catesel) + mainGame->cbDMCategory->addItem(mainGame->lstCategories->getListItem(i)); + } + mainGame->PopupElement(mainGame->wDMQuery); + mainGame->gMutex.unlock(); + prev_operation = id; + break; + } + case BUTTON_COPY_DECK: { + mainGame->gMutex.lock(); + mainGame->stDMMessage->setText(dataManager.GetSysString(1473)); + mainGame->cbDMCategory->setVisible(true); + mainGame->cbDMCategory->clear(); + int catesel = mainGame->lstCategories->getSelected(); + if(catesel != 2) + mainGame->cbDMCategory->addItem(dataManager.GetSysString(1452)); + for(int i = 4; i < (int)mainGame->lstCategories->getItemCount(); i++) { + if(i != catesel) + mainGame->cbDMCategory->addItem(mainGame->lstCategories->getListItem(i)); + } + mainGame->PopupElement(mainGame->wDMQuery); + mainGame->gMutex.unlock(); + prev_operation = id; + break; + } + case BUTTON_IMPORT_DECK_CODE: { + time_t nowtime = std::time(nullptr); + wchar_t timetext[40]; + std::wcsftime(timetext, sizeof timetext / sizeof timetext[0], L"%Y-%m-%d %H-%M-%S", std::localtime(&nowtime)); + mainGame->gMutex.lock(); + mainGame->stDMMessage->setText(dataManager.GetSysString(1471)); + mainGame->ebDMName->setVisible(true); + mainGame->ebDMName->setText(timetext); + mainGame->PopupElement(mainGame->wDMQuery); + mainGame->gMutex.unlock(); + prev_operation = id; + break; + } + case BUTTON_EXPORT_DECK_CODE: { + std::stringstream textStream; + deckManager.SaveDeck(deckManager.current_deck, textStream); + wchar_t text[0x10000]; + BufferIO::DecodeUTF8(textStream.str().c_str(), text); + mainGame->env->getOSOperator()->copyToClipboard(text); + mainGame->stACMessage->setText(dataManager.GetSysString(1480)); + mainGame->PopupElement(mainGame->wACMessage, 20); + break; + } + case BUTTON_DM_OK: { + switch(prev_operation) { + case BUTTON_NEW_CATEGORY: { + int catesel = 0; + const wchar_t* catename = mainGame->ebDMName->getText(); + if(DeckManager::CreateCategory(catename)) { + mainGame->cbDBCategory->addItem(catename); + mainGame->lstCategories->addItem(catename); + catesel = mainGame->lstCategories->getItemCount() - 1; + } else { + for(int i = DECK_CATEGORY_CUSTOM; i < (int)mainGame->lstCategories->getItemCount(); i++) { + if(!mywcsncasecmp(mainGame->lstCategories->getListItem(i), catename, 256)) { + catesel = i; + mainGame->stACMessage->setText(dataManager.GetSysString(1474)); + mainGame->PopupElement(mainGame->wACMessage, 20); + break; + } } - } else if(*pstr == L'<') { - if(*(pstr + 1) == L'=') { - filter_atktype = 4; - filter_atk = BufferIO::GetVal(pstr + 2); - } else { - filter_atktype = 5; - filter_atk = BufferIO::GetVal(pstr + 1); + } + if(catesel > 0) { + mainGame->lstCategories->setSelected(catesel); + RefreshDeckList(); + mainGame->lstDecks->setSelected(0); + mainGame->cbDBCategory->setSelected(catesel); + ChangeCategory(catesel); + } + break; + } + case BUTTON_RENAME_CATEGORY: { + int catesel = mainGame->lstCategories->getSelected(); + if (catesel < DECK_CATEGORY_CUSTOM) + break; + const wchar_t* oldcatename = mainGame->lstCategories->getListItem(catesel); + const wchar_t* newcatename = mainGame->ebDMName->getText(); + if(DeckManager::RenameCategory(oldcatename, newcatename)) { + mainGame->cbDBCategory->removeItem(catesel); + mainGame->cbDBCategory->addItem(newcatename); + mainGame->lstCategories->removeItem(catesel); + mainGame->lstCategories->addItem(newcatename); + catesel = mainGame->lstCategories->getItemCount() - 1; + } else { + catesel = 0; + for(int i = DECK_CATEGORY_CUSTOM; i < (int)mainGame->lstCategories->getItemCount(); i++) { + if(!mywcsncasecmp(mainGame->lstCategories->getListItem(i), newcatename, 256)) { + catesel = i; + mainGame->stACMessage->setText(dataManager.GetSysString(1474)); + mainGame->PopupElement(mainGame->wACMessage, 20); + break; + } } - } else if(*pstr == L'?') { - filter_atktype = 6; - } else filter_atktype = 0; + } + if(catesel > 0) { + mainGame->lstCategories->setSelected(catesel); + RefreshDeckList(); + mainGame->lstDecks->setSelected(0); + mainGame->cbDBCategory->setSelected(catesel); + ChangeCategory(catesel); + } + break; } - pstr = mainGame->ebDefence->getText(); - if(*pstr == 0) filter_deftype = 0; - else { - if(*pstr == L'=') { - filter_deftype = 1; - filter_def = BufferIO::GetVal(pstr + 1); - } else if(*pstr >= L'0' && *pstr <= L'9') { - filter_deftype = 1; - filter_def = BufferIO::GetVal(pstr); - } else if(*pstr == L'>') { - if(*(pstr + 1) == L'=') { - filter_deftype = 2; - filter_def = BufferIO::GetVal(pstr + 2); + case BUTTON_DELETE_CATEGORY: { + int catesel = mainGame->lstCategories->getSelected(); + if (catesel < DECK_CATEGORY_CUSTOM) + break; + const wchar_t* catename = mainGame->lstCategories->getListItem(catesel); + if(DeckManager::DeleteCategory(catename)) { + mainGame->cbDBCategory->removeItem(catesel); + mainGame->lstCategories->removeItem(catesel); + catesel = DECK_CATEGORY_NONE; + mainGame->lstCategories->setSelected(catesel); + RefreshDeckList(); + mainGame->lstDecks->setSelected(0); + mainGame->cbDBCategory->setSelected(catesel); + ChangeCategory(catesel); + } else { + mainGame->stACMessage->setText(dataManager.GetSysString(1476)); + mainGame->PopupElement(mainGame->wACMessage, 20); + } + break; + } + case BUTTON_NEW_DECK: + case BUTTON_IMPORT_DECK_CODE: { + const wchar_t* deckname = mainGame->ebDMName->getText(); + wchar_t catepath[256]; + DeckManager::GetCategoryPath(catepath, mainGame->cbDBCategory->getSelected(), mainGame->cbDBCategory->getText()); + wchar_t filepath[256]; + myswprintf(filepath, L"%ls/%ls.ydk", catepath, deckname); + bool res = false; + if(!FileSystem::IsFileExists(filepath)) { + if(prev_operation == BUTTON_NEW_DECK) { + deckManager.current_deck.main.clear(); + deckManager.current_deck.extra.clear(); + deckManager.current_deck.side.clear(); } else { - filter_deftype = 3; - filter_def = BufferIO::GetVal(pstr + 1); + const wchar_t* txt = mainGame->env->getOSOperator()->getTextFromClipboard(); + if(txt) { + char text[0x10000]; + BufferIO::EncodeUTF8(txt, text); + std::istringstream textStream(text); + deckManager.LoadCurrentDeck(textStream); + } } - } else if(*pstr == L'<') { - if(*(pstr + 1) == L'=') { - filter_deftype = 4; - filter_def = BufferIO::GetVal(pstr + 2); - } else { - filter_deftype = 5; - filter_def = BufferIO::GetVal(pstr + 1); + res = DeckManager::SaveDeck(deckManager.current_deck, filepath); + RefreshDeckList(); + ChangeCategory(mainGame->lstCategories->getSelected()); + } + for(int i = 0; i < (int)mainGame->lstDecks->getItemCount(); i++) { + if(!mywcsncasecmp(mainGame->lstDecks->getListItem(i), deckname, 256)) { + deckManager.LoadCurrentDeck(filepath); + prev_deck = i; + mainGame->cbDBDecks->setSelected(prev_deck); + mainGame->lstDecks->setSelected(prev_deck); + if(!res) { + mainGame->stACMessage->setText(dataManager.GetSysString(1475)); + mainGame->PopupElement(mainGame->wACMessage, 20); + } + break; } - } else if(*pstr == L'?') { - filter_deftype = 6; - } else filter_deftype = 0; + } + break; } - pstr = mainGame->ebStar->getText(); - if(*pstr == 0) filter_lvtype = 0; - else { - if(*pstr == L'=') { - filter_lvtype = 1; - filter_lv = BufferIO::GetVal(pstr + 1); - } else if(*pstr >= L'0' && *pstr <= L'9') { - filter_lvtype = 1; - filter_lv = BufferIO::GetVal(pstr); - } else if(*pstr == L'>') { - if(*(pstr + 1) == L'=') { - filter_lvtype = 2; - filter_lv = BufferIO::GetVal(pstr + 2); - } else { - filter_lvtype = 3; - filter_lv = BufferIO::GetVal(pstr + 1); + case BUTTON_RENAME_DECK: { + int catesel = mainGame->lstCategories->getSelected(); + int decksel = mainGame->lstDecks->getSelected(); + const wchar_t* catename = mainGame->lstCategories->getListItem(catesel); + wchar_t oldfilepath[256]; + get_deck_file(oldfilepath); + const wchar_t* newdeckname = mainGame->ebDMName->getText(); + wchar_t newfilepath[256]; + if(catesel == 2) { + myswprintf(newfilepath, L"./deck/%ls.ydk", newdeckname); + } else { + myswprintf(newfilepath, L"./deck/%ls/%ls.ydk", catename, newdeckname); + } + bool res = false; + if(!FileSystem::IsFileExists(newfilepath)) { + res = FileSystem::Rename(oldfilepath, newfilepath); + } + RefreshDeckList(); + ChangeCategory(catesel); + for(int i = 0; i < (int)mainGame->lstDecks->getItemCount(); i++) { + if(!mywcsncasecmp(mainGame->lstDecks->getListItem(i), newdeckname, 256)) { + deckManager.LoadCurrentDeck(newfilepath); + prev_deck = i; + mainGame->cbDBDecks->setSelected(prev_deck); + mainGame->lstDecks->setSelected(prev_deck); + if(!res) { + mainGame->stACMessage->setText(dataManager.GetSysString(1475)); + mainGame->PopupElement(mainGame->wACMessage, 20); + } + break; } - } else if(*pstr == L'<') { - if(*(pstr + 1) == L'=') { - filter_lvtype = 4; - filter_lv = BufferIO::GetVal(pstr + 2); - } else { - filter_lvtype = 5; - filter_lv = BufferIO::GetVal(pstr + 1); + } + break; + } + case BUTTON_DELETE_DECK_DM: { + int decksel = mainGame->lstDecks->getSelected(); + wchar_t filepath[256]; + get_deck_file(filepath); + if(DeckManager::DeleteDeck(filepath)) { + mainGame->lstDecks->removeItem(decksel); + mainGame->cbDBDecks->removeItem(decksel); + decksel--; + if(decksel == -1) { + decksel = mainGame->lstDecks->getItemCount() - 1; + } + if(decksel != -1) { + mainGame->lstDecks->setSelected(decksel); + mainGame->cbDBDecks->setSelected(decksel); + load_current_deck(mainGame->cbDBCategory, mainGame->cbDBDecks); + } + RefreshReadonly(prev_category); + prev_deck = decksel; + } else { + mainGame->stACMessage->setText(dataManager.GetSysString(1476)); + mainGame->PopupElement(mainGame->wACMessage, 20); + } + break; + } + case BUTTON_MOVE_DECK: { + int oldcatesel = mainGame->lstCategories->getSelected(); + int newcatesel = mainGame->cbDMCategory->getSelected(); + int decksel = mainGame->lstDecks->getSelected(); + const wchar_t* newcatename = mainGame->cbDMCategory->getText(); + const wchar_t* olddeckname = mainGame->lstDecks->getListItem(decksel); + wchar_t deckname[256]; + BufferIO::CopyWideString(olddeckname, deckname); + wchar_t oldfilepath[256]; + get_deck_file(oldfilepath); + wchar_t newfilepath[256]; + if(oldcatesel != 2 && newcatesel == 0) { + myswprintf(newfilepath, L"./deck/%ls.ydk", deckname); + } else { + myswprintf(newfilepath, L"./deck/%ls/%ls.ydk", newcatename, deckname); + } + bool res = false; + if(!FileSystem::IsFileExists(newfilepath)) { + res = FileSystem::Rename(oldfilepath, newfilepath); + } + mainGame->lstCategories->setSelected(newcatename); + int catesel = mainGame->lstCategories->getSelected(); + RefreshDeckList(); + mainGame->cbDBCategory->setSelected(catesel); + ChangeCategory(catesel); + for(int i = 0; i < (int)mainGame->lstDecks->getItemCount(); i++) { + if(!mywcsncasecmp(mainGame->lstDecks->getListItem(i), deckname, 256)) { + deckManager.LoadCurrentDeck(newfilepath); + prev_deck = i; + mainGame->cbDBDecks->setSelected(prev_deck); + mainGame->lstDecks->setSelected(prev_deck); + if(!res) { + mainGame->stACMessage->setText(dataManager.GetSysString(1475)); + mainGame->PopupElement(mainGame->wACMessage, 20); + } + break; + } + } + break; + } + case BUTTON_COPY_DECK: { + int oldcatesel = mainGame->lstCategories->getSelected(); + int newcatesel = mainGame->cbDMCategory->getSelected(); + int decksel = mainGame->lstDecks->getSelected(); + const wchar_t* newcatename = mainGame->cbDMCategory->getText(); + const wchar_t* olddeckname = mainGame->lstDecks->getListItem(decksel); + wchar_t deckname[256]; + BufferIO::CopyWideString(olddeckname, deckname); + wchar_t newfilepath[256]; + if(oldcatesel != 2 && newcatesel == 0) { + myswprintf(newfilepath, L"./deck/%ls.ydk", deckname); + } else { + myswprintf(newfilepath, L"./deck/%ls/%ls.ydk", newcatename, deckname); + } + bool res = false; + if(!FileSystem::IsFileExists(newfilepath)) { + res = DeckManager::SaveDeck(deckManager.current_deck, newfilepath); + } + mainGame->lstCategories->setSelected(newcatename); + int catesel = mainGame->lstCategories->getSelected(); + RefreshDeckList(); + mainGame->cbDBCategory->setSelected(catesel); + ChangeCategory(catesel); + for(int i = 0; i < (int)mainGame->lstDecks->getItemCount(); i++) { + if(!mywcsncasecmp(mainGame->lstDecks->getListItem(i), deckname, 256)) { + deckManager.LoadCurrentDeck(newfilepath); + prev_deck = i; + mainGame->cbDBDecks->setSelected(prev_deck); + mainGame->lstDecks->setSelected(prev_deck); + if(!res) { + mainGame->stACMessage->setText(dataManager.GetSysString(1475)); + mainGame->PopupElement(mainGame->wACMessage, 20); + } + break; } - } else filter_lvtype = 0; + } + break; + } + default: + break; } - FilterCards(); + prev_operation = 0; + mainGame->HideElement(mainGame->wDMQuery); + mainGame->stDMMessage2->setVisible(false); + mainGame->ebDMName->setVisible(false); + mainGame->cbDMCategory->setVisible(false); break; } - case BUTTON_CATEGORY_OK: { - filter_effect = 0; - long long filter = 0x1; - for(int i = 0; i < 32; ++i, filter <<= 1) - if(mainGame->chkCategory[i]->isChecked()) - filter_effect |= filter; - mainGame->HideElement(mainGame->wCategories); + case BUTTON_DM_CANCEL: { + mainGame->HideElement(mainGame->wDMQuery); + mainGame->stDMMessage2->setVisible(false); + mainGame->ebDMName->setVisible(false); + mainGame->cbDMCategory->setVisible(false); break; } case BUTTON_SIDE_OK: { - if(deckManager.current_deck.main.size() != pre_mainc || deckManager.current_deck.extra.size() != pre_extrac - || deckManager.current_deck.side.size() != pre_sidec) { + if(deckManager.current_deck.main.size() != pre_mainc + || deckManager.current_deck.extra.size() != pre_extrac + || deckManager.current_deck.side.size() != pre_sidec) { + soundManager.PlaySoundEffect(SOUND_INFO); mainGame->env->addMessageBox(L"", dataManager.GetSysString(1410)); break; } - char deckbuf[1024]; - char* pdeck = deckbuf; - BufferIO::WriteInt32(pdeck, deckManager.current_deck.main.size() + deckManager.current_deck.extra.size()); - BufferIO::WriteInt32(pdeck, deckManager.current_deck.side.size()); - for(size_t i = 0; i < deckManager.current_deck.main.size(); ++i) - BufferIO::WriteInt32(pdeck, deckManager.current_deck.main[i]->first); - for(size_t i = 0; i < deckManager.current_deck.extra.size(); ++i) - BufferIO::WriteInt32(pdeck, deckManager.current_deck.extra[i]->first); - for(size_t i = 0; i < deckManager.current_deck.side.size(); ++i) - BufferIO::WriteInt32(pdeck, deckManager.current_deck.side[i]->first); - DuelClient::SendBufferToServer(CTOS_UPDATE_DECK, deckbuf, pdeck - deckbuf); + mainGame->ClearCardInfo(); + DuelClient::SendUpdateDeck(deckManager.current_deck); + break; + } + case BUTTON_SIDE_RELOAD: { + load_current_deck(mainGame->cbCategorySelect, mainGame->cbDeckSelect); + break; + } + case BUTTON_BIG_CARD_ORIG_SIZE: { + ShowBigCard(bigcard_code, 1); + break; + } + case BUTTON_BIG_CARD_ZOOM_IN: { + bigcard_zoom += 0.2f; + ZoomBigCard(); + break; + } + case BUTTON_BIG_CARD_ZOOM_OUT: { + bigcard_zoom -= 0.2f; + ZoomBigCard(); + break; + } + case BUTTON_BIG_CARD_CLOSE: { + CloseBigCard(); + break; + } + case BUTTON_MSG_OK: { + mainGame->HideElement(mainGame->wMessage); + mainGame->actionSignal.Set(); + break; + } + case BUTTON_YES: { + mainGame->HideElement(mainGame->wQuery); + if(!mainGame->is_building || mainGame->is_siding) + break; + if(prev_operation == BUTTON_CLEAR_DECK) { + deckManager.current_deck.main.clear(); + deckManager.current_deck.extra.clear(); + deckManager.current_deck.side.clear(); + is_modified = true; + } else if(prev_operation == BUTTON_DELETE_DECK) { + int sel = prev_sel; + mainGame->cbDBDecks->setSelected(sel); + wchar_t filepath[256]; + get_deck_file(filepath); + if(DeckManager::DeleteDeck(filepath)) { + mainGame->cbDBDecks->removeItem(sel); + int count = mainGame->cbDBDecks->getItemCount(); + if(sel >= count) + sel = count - 1; + mainGame->cbDBDecks->setSelected(sel); + if(sel != -1) + load_current_deck(mainGame->cbDBCategory, mainGame->cbDBDecks); + mainGame->stACMessage->setText(dataManager.GetSysString(1338)); + mainGame->PopupElement(mainGame->wACMessage, 20); + prev_deck = sel; + is_modified = false; + } + prev_sel = -1; + } else if(prev_operation == BUTTON_LEAVE_GAME) { + Terminate(); + } else if(prev_operation == COMBOBOX_DBCATEGORY) { + int catesel = mainGame->cbDBCategory->getSelected(); + ChangeCategory(catesel); + } else if(prev_operation == COMBOBOX_DBDECKS) { + int decksel = mainGame->cbDBDecks->getSelected(); + load_current_deck(mainGame->cbDBCategory, mainGame->cbDBDecks); + prev_deck = decksel; + is_modified = false; + } else if(prev_operation == BUTTON_MANAGE_DECK) { + ShowDeckManage(); + } + prev_operation = 0; + break; + } + case BUTTON_NO: { + mainGame->HideElement(mainGame->wQuery); + if(prev_operation == COMBOBOX_DBCATEGORY) { + mainGame->cbDBCategory->setSelected(prev_category); + } else if(prev_operation == COMBOBOX_DBDECKS) { + mainGame->cbDBDecks->setSelected(prev_deck); + } + prev_operation = 0; + break; + } + case BUTTON_MARKS_FILTER: { + mainGame->PopupElement(mainGame->wLinkMarks); + break; + } + case BUTTON_MARKERS_OK: { + filter_marks = 0; + if (mainGame->btnMark[0]->isPressed()) + filter_marks |= 0100; + if (mainGame->btnMark[1]->isPressed()) + filter_marks |= 0200; + if (mainGame->btnMark[2]->isPressed()) + filter_marks |= 0400; + if (mainGame->btnMark[3]->isPressed()) + filter_marks |= 0010; + if (mainGame->btnMark[4]->isPressed()) + filter_marks |= 0040; + if (mainGame->btnMark[5]->isPressed()) + filter_marks |= 0001; + if (mainGame->btnMark[6]->isPressed()) + filter_marks |= 0002; + if (mainGame->btnMark[7]->isPressed()) + filter_marks |= 0004; + mainGame->HideElement(mainGame->wLinkMarks); + mainGame->btnMarksFilter->setPressed(filter_marks > 0); + InstantSearch(); break; } } @@ -216,23 +821,27 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) { } case irr::gui::EGET_SCROLL_BAR_CHANGED: { switch(id) { - case SCROLL_CARDTEXT: { - u32 pos = mainGame->scrCardText->getPos(); - mainGame->SetStaticText(mainGame->stText, mainGame->stText->getRelativePosition().getWidth()-25, mainGame->textFont, mainGame->showingtext, pos); + case SCROLL_FILTER: { + GetHoveredCard(); break; } - break; } + break; } case irr::gui::EGET_EDITBOX_ENTER: { + switch(id) { + case EDITBOX_INPUTS: + case EDITBOX_KEYWORD: { + StartFilter(); + break; + } + } + break; + } + case irr::gui::EGET_EDITBOX_CHANGED: { switch(id) { case EDITBOX_KEYWORD: { - irr::SEvent me; - me.EventType = irr::EET_GUI_EVENT; - me.GUIEvent.EventType = irr::gui::EGET_BUTTON_CLICKED; - me.GUIEvent.Caller = mainGame->btnStartFilter; - me.GUIEvent.Element = mainGame->btnStartFilter; - mainGame->device->postEventFromUser(me); + InstantSearch(); break; } } @@ -240,33 +849,81 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) { } case irr::gui::EGET_COMBO_BOX_CHANGED: { switch(id) { - case COMBOBOX_DBLFLIST: { - filterList = deckManager._lfList[mainGame->cbDBLFList->getSelected()].content; + case COMBOBOX_DBCATEGORY: { + if(havePopupWindow()) { + mainGame->cbDBCategory->setSelected(prev_category); + break; + } + int catesel = mainGame->cbDBCategory->getSelected(); + if(catesel == 3) { + catesel = 2; + mainGame->cbDBCategory->setSelected(2); + if(prev_category == 2) + break; + } + if(is_modified && !readonly && !mainGame->chkIgnoreDeckChanges->isChecked()) { + mainGame->gMutex.lock(); + mainGame->SetStaticText(mainGame->stQMessage, 310, mainGame->guiFont, dataManager.GetSysString(1356)); + mainGame->PopupElement(mainGame->wQuery); + mainGame->gMutex.unlock(); + prev_operation = id; + break; + } + ChangeCategory(catesel); break; } case COMBOBOX_DBDECKS: { - deckManager.LoadDeck(mainGame->cbDBDecks->getItem(mainGame->cbDBDecks->getSelected())); + if(havePopupWindow()) { + mainGame->cbDBDecks->setSelected(prev_deck); + break; + } + if(is_modified && !readonly && !mainGame->chkIgnoreDeckChanges->isChecked()) { + mainGame->gMutex.lock(); + mainGame->SetStaticText(mainGame->stQMessage, 310, mainGame->guiFont, dataManager.GetSysString(1356)); + mainGame->PopupElement(mainGame->wQuery); + mainGame->gMutex.unlock(); + prev_operation = id; + break; + } + int decksel = mainGame->cbDBDecks->getSelected(); + if(decksel >= 0) { + load_current_deck(mainGame->cbDBCategory, mainGame->cbDBDecks); + } + prev_deck = decksel; + is_modified = false; break; } case COMBOBOX_MAINTYPE: { + mainGame->cbCardType2->setSelected(0); + mainGame->cbAttribute->setSelected(0); + mainGame->cbRace->setSelected(0); + mainGame->ebAttack->setText(L""); + mainGame->ebDefense->setText(L""); + mainGame->ebStar->setText(L""); + mainGame->ebScale->setText(L""); switch(mainGame->cbCardType->getSelected()) { case 0: { mainGame->cbCardType2->setEnabled(false); + mainGame->cbCardType2->setSelected(0); mainGame->cbRace->setEnabled(false); mainGame->cbAttribute->setEnabled(false); mainGame->ebAttack->setEnabled(false); - mainGame->ebDefence->setEnabled(false); + mainGame->ebDefense->setEnabled(false); mainGame->ebStar->setEnabled(false); + mainGame->ebScale->setEnabled(false); break; } case 1: { + wchar_t normaltuner[32]; + wchar_t normalpen[32]; wchar_t syntuner[32]; mainGame->cbCardType2->setEnabled(true); mainGame->cbRace->setEnabled(true); mainGame->cbAttribute->setEnabled(true); mainGame->ebAttack->setEnabled(true); - mainGame->ebDefence->setEnabled(true); + mainGame->ebDefense->setEnabled(true); mainGame->ebStar->setEnabled(true); + mainGame->ebScale->setEnabled(true); mainGame->cbCardType2->clear(); mainGame->cbCardType2->addItem(dataManager.GetSysString(1080), 0); mainGame->cbCardType2->addItem(dataManager.GetSysString(1054), TYPE_MONSTER + TYPE_NORMAL); @@ -274,10 +931,16 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) { mainGame->cbCardType2->addItem(dataManager.GetSysString(1056), TYPE_MONSTER + TYPE_FUSION); mainGame->cbCardType2->addItem(dataManager.GetSysString(1057), TYPE_MONSTER + TYPE_RITUAL); mainGame->cbCardType2->addItem(dataManager.GetSysString(1063), TYPE_MONSTER + TYPE_SYNCHRO); - myswprintf(syntuner, L"%ls|%ls", dataManager.GetSysString(1063), dataManager.GetSysString(1062)); - mainGame->cbCardType2->addItem(syntuner, TYPE_MONSTER + TYPE_SYNCHRO + TYPE_TUNER); mainGame->cbCardType2->addItem(dataManager.GetSysString(1073), TYPE_MONSTER + TYPE_XYZ); mainGame->cbCardType2->addItem(dataManager.GetSysString(1074), TYPE_MONSTER + TYPE_PENDULUM); + mainGame->cbCardType2->addItem(dataManager.GetSysString(1076), TYPE_MONSTER + TYPE_LINK); + mainGame->cbCardType2->addItem(dataManager.GetSysString(1075), TYPE_MONSTER + TYPE_SPSUMMON); + myswprintf(normaltuner, L"%ls|%ls", dataManager.GetSysString(1054), dataManager.GetSysString(1062)); + mainGame->cbCardType2->addItem(normaltuner, TYPE_MONSTER + TYPE_NORMAL + TYPE_TUNER); + myswprintf(normalpen, L"%ls|%ls", dataManager.GetSysString(1054), dataManager.GetSysString(1074)); + mainGame->cbCardType2->addItem(normalpen, TYPE_MONSTER + TYPE_NORMAL + TYPE_PENDULUM); + myswprintf(syntuner, L"%ls|%ls", dataManager.GetSysString(1063), dataManager.GetSysString(1062)); + mainGame->cbCardType2->addItem(syntuner, TYPE_MONSTER + TYPE_SYNCHRO + TYPE_TUNER); mainGame->cbCardType2->addItem(dataManager.GetSysString(1062), TYPE_MONSTER + TYPE_TUNER); mainGame->cbCardType2->addItem(dataManager.GetSysString(1061), TYPE_MONSTER + TYPE_DUAL); mainGame->cbCardType2->addItem(dataManager.GetSysString(1060), TYPE_MONSTER + TYPE_UNION); @@ -291,8 +954,9 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) { mainGame->cbRace->setEnabled(false); mainGame->cbAttribute->setEnabled(false); mainGame->ebAttack->setEnabled(false); - mainGame->ebDefence->setEnabled(false); + mainGame->ebDefense->setEnabled(false); mainGame->ebStar->setEnabled(false); + mainGame->ebScale->setEnabled(false); mainGame->cbCardType2->clear(); mainGame->cbCardType2->addItem(dataManager.GetSysString(1080), 0); mainGame->cbCardType2->addItem(dataManager.GetSysString(1054), TYPE_SPELL); @@ -308,8 +972,9 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) { mainGame->cbRace->setEnabled(false); mainGame->cbAttribute->setEnabled(false); mainGame->ebAttack->setEnabled(false); - mainGame->ebDefence->setEnabled(false); + mainGame->ebDefense->setEnabled(false); mainGame->ebStar->setEnabled(false); + mainGame->ebScale->setEnabled(false); mainGame->cbCardType2->clear(); mainGame->cbCardType2->addItem(dataManager.GetSysString(1080), 0); mainGame->cbCardType2->addItem(dataManager.GetSysString(1054), TYPE_TRAP); @@ -318,8 +983,77 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) { break; } } + mainGame->env->setFocus(0); + InstantSearch(); + break; + } + case COMBOBOX_SORTTYPE: { + SortList(); + mainGame->env->setFocus(0); + break; + } + case COMBOBOX_SECONDTYPE: { + if (mainGame->cbCardType->getSelected() == 1) { + if (mainGame->cbCardType2->getSelected() == 8) { + mainGame->ebDefense->setEnabled(false); + mainGame->ebDefense->setText(L""); + } else { + mainGame->ebDefense->setEnabled(true); + } + } + mainGame->env->setFocus(0); + InstantSearch(); + break; + } + case COMBOBOX_ATTRIBUTE: + case COMBOBOX_RACE: + case COMBOBOX_LIMIT: + mainGame->env->setFocus(0); + InstantSearch(); + break; + } + break; + } + case irr::gui::EGET_LISTBOX_CHANGED: { + switch(id) { + case LISTBOX_CATEGORIES: { + if(mainGame->wDMQuery->isVisible()) { + mainGame->lstCategories->setSelected(prev_category); + break; + } + int catesel = mainGame->lstCategories->getSelected(); + if(catesel == 3) { + catesel = 2; + mainGame->lstCategories->setSelected(catesel); + if(prev_category == catesel) + break; + } + RefreshDeckList(); + mainGame->lstDecks->setSelected(0); + mainGame->cbDBCategory->setSelected(catesel); + ChangeCategory(catesel); + break; + } + case LISTBOX_DECKS: { + if(mainGame->wDMQuery->isVisible()) { + mainGame->lstDecks->setSelected(prev_deck); + break; + } + int decksel = mainGame->lstDecks->getSelected(); + mainGame->cbDBDecks->setSelected(decksel); + if(decksel == -1) + break; + wchar_t filepath[256]; + wchar_t catepath[256]; + DeckManager::GetCategoryPath(catepath, mainGame->lstCategories->getSelected(), mainGame->lstCategories->getListItem(mainGame->lstCategories->getSelected())); + myswprintf(filepath, L"%ls/%ls.ydk", catepath, mainGame->lstDecks->getListItem(decksel)); + deckManager.LoadCurrentDeck(filepath, showing_pack); + RefreshPackListScroll(); + prev_deck = decksel; + break; } } + break; } default: break; } @@ -328,280 +1062,194 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) { case irr::EET_MOUSE_INPUT_EVENT: { switch(event.MouseInput.Event) { case irr::EMIE_LMOUSE_PRESSED_DOWN: { - if(mainGame->wCategories->isVisible()) + irr::gui::IGUIElement* root = mainGame->env->getRootGUIElement(); + if(root->getElementFromPoint(mouse_pos) != root) + break; + if(havePopupWindow()) break; if(hovered_pos == 0 || hovered_seq == -1) break; click_pos = hovered_pos; + if(readonly) + break; dragx = event.MouseInput.X; dragy = event.MouseInput.Y; - draging_pointer = dataManager.GetCodePointer(hovered_code); - unsigned int limitcode = draging_pointer->second.alias ? draging_pointer->second.alias : draging_pointer->first; + draging_pointer = _datas.find(hovered_code); + if (draging_pointer == _datas.end()) + break; if(hovered_pos == 4) { - int limit = 3; - if(filterList->count(limitcode)) - limit = (*filterList)[limitcode]; - for(size_t i = 0; i < deckManager.current_deck.main.size(); ++i) - if(deckManager.current_deck.main[i]->first == limitcode - || deckManager.current_deck.main[i]->second.alias == limitcode) - limit--; - for(size_t i = 0; i < deckManager.current_deck.extra.size(); ++i) - if(deckManager.current_deck.extra[i]->first == limitcode - || deckManager.current_deck.extra[i]->second.alias == limitcode) - limit--; - for(size_t i = 0; i < deckManager.current_deck.side.size(); ++i) - if(deckManager.current_deck.side[i]->first == limitcode - || deckManager.current_deck.side[i]->second.alias == limitcode) - limit--; - if(limit <= 0) + if(!check_limit(draging_pointer)) break; } - if(hovered_pos == 1) - deckManager.current_deck.main.erase(deckManager.current_deck.main.begin() + hovered_seq); - else if(hovered_pos == 2) - deckManager.current_deck.extra.erase(deckManager.current_deck.extra.begin() + hovered_seq); - else if(hovered_pos == 3) - deckManager.current_deck.side.erase(deckManager.current_deck.side.begin() + hovered_seq); - is_draging = true; + is_starting_dragging = true; break; } case irr::EMIE_LMOUSE_LEFT_UP: { + is_starting_dragging = false; + irr::gui::IGUIElement* root = mainGame->env->getRootGUIElement(); + if(!is_draging && !mainGame->is_siding && root->getElementFromPoint(mouse_pos) == mainGame->imgCard) { + soundManager.PlaySoundEffect(SOUND_CARD_DROP); + ShowBigCard(mainGame->showingcode, 1); + break; + } if(!is_draging) break; - if(!mainGame->is_siding) { - if((hovered_pos == 1 && (draging_pointer->second.type & 0x802040)) || (hovered_pos == 2 && !(draging_pointer->second.type & 0x802040))) - hovered_pos = 0; - if((hovered_pos == 1 || (hovered_pos == 0 && click_pos == 1)) && deckManager.current_deck.main.size() < 60) { - if(hovered_seq == -1) - deckManager.current_deck.main.push_back(draging_pointer); - else if(hovered_seq < (int)deckManager.current_deck.main.size() && hovered_pos) - deckManager.current_deck.main.insert(deckManager.current_deck.main.begin() + hovered_seq, draging_pointer); - else deckManager.current_deck.main.push_back(draging_pointer); - is_draging = false; - } else if((hovered_pos == 2 || (hovered_pos == 0 && click_pos == 2)) && deckManager.current_deck.extra.size() < 15) { - if(hovered_seq == -1) - deckManager.current_deck.extra.push_back(draging_pointer); - else if(hovered_seq < (int)deckManager.current_deck.extra.size() && hovered_pos) - deckManager.current_deck.extra.insert(deckManager.current_deck.extra.begin() + hovered_seq, draging_pointer); - else deckManager.current_deck.extra.push_back(draging_pointer); - is_draging = false; - } else if((hovered_pos == 3 || (hovered_pos == 0 && click_pos == 3)) && deckManager.current_deck.side.size() < 15) { - if(hovered_seq == -1) - deckManager.current_deck.side.push_back(draging_pointer); - else if(hovered_seq < (int)deckManager.current_deck.side.size() && hovered_pos) - deckManager.current_deck.side.insert(deckManager.current_deck.side.begin() + hovered_seq, draging_pointer); - else deckManager.current_deck.side.push_back(draging_pointer); - is_draging = false; - } else if (hovered_pos == 4) - is_draging = false; - } else { - if((hovered_pos == 1 && (draging_pointer->second.type & 0x802040)) || (hovered_pos == 2 && !(draging_pointer->second.type & 0x802040)) || hovered_pos == 4) - hovered_pos = 0; - if((hovered_pos == 1 || (hovered_pos == 0 && click_pos == 1)) && deckManager.current_deck.main.size() < 65) { - if(hovered_seq == -1) - deckManager.current_deck.main.push_back(draging_pointer); - else if(hovered_seq < (int)deckManager.current_deck.main.size() && hovered_pos) - deckManager.current_deck.main.insert(deckManager.current_deck.main.begin() + hovered_seq, draging_pointer); - else deckManager.current_deck.main.push_back(draging_pointer); - is_draging = false; - } else if((hovered_pos == 2 || (hovered_pos == 0 && click_pos == 2)) && deckManager.current_deck.extra.size() < 20) { - if(hovered_seq == -1) - deckManager.current_deck.extra.push_back(draging_pointer); - else if(hovered_seq < (int)deckManager.current_deck.extra.size() && hovered_pos) - deckManager.current_deck.extra.insert(deckManager.current_deck.extra.begin() + hovered_seq, draging_pointer); - else deckManager.current_deck.extra.push_back(draging_pointer); - is_draging = false; - } else if((hovered_pos == 3 || (hovered_pos == 0 && click_pos == 3)) && deckManager.current_deck.side.size() < 20) { - if(hovered_seq == -1) - deckManager.current_deck.side.push_back(draging_pointer); - else if(hovered_seq < (int)deckManager.current_deck.side.size() && hovered_pos) - deckManager.current_deck.side.insert(deckManager.current_deck.side.begin() + hovered_seq, draging_pointer); - else deckManager.current_deck.side.push_back(draging_pointer); - is_draging = false; - } - } - if(is_draging) { + soundManager.PlaySoundEffect(SOUND_CARD_DROP); + bool pushed = false; + if(hovered_pos == 1) + pushed = push_main(draging_pointer, hovered_seq); + else if(hovered_pos == 2) + pushed = push_extra(draging_pointer, hovered_seq + is_lastcard); + else if(hovered_pos == 3) + pushed = push_side(draging_pointer, hovered_seq + is_lastcard); + else if(hovered_pos == 4 && !mainGame->is_siding) + pushed = true; + if(!pushed) { if(click_pos == 1) - deckManager.current_deck.main.push_back(draging_pointer); + push_main(draging_pointer); else if(click_pos == 2) - deckManager.current_deck.extra.push_back(draging_pointer); + push_extra(draging_pointer); else if(click_pos == 3) - deckManager.current_deck.side.push_back(draging_pointer); + push_side(draging_pointer); } is_draging = false; break; } + case irr::EMIE_LMOUSE_DOUBLE_CLICK: { + irr::gui::IGUIElement* root = mainGame->env->getRootGUIElement(); + if(!is_draging && !mainGame->is_siding && root->getElementFromPoint(mouse_pos) == root && hovered_code) { + soundManager.PlaySoundEffect(SOUND_CARD_DROP); + ShowBigCard(hovered_code, 1); + break; + } + break; + } case irr::EMIE_RMOUSE_LEFT_UP: { if(mainGame->is_siding) { if(is_draging) break; if(hovered_pos == 0 || hovered_seq == -1) break; - draging_pointer = dataManager.GetCodePointer(hovered_code); + auto pointer = _datas.find(hovered_code); + if (pointer == _datas.end()) + break; + soundManager.PlaySoundEffect(SOUND_CARD_DROP); if(hovered_pos == 1) { - if(deckManager.current_deck.side.size() < 20) { - deckManager.current_deck.main.erase(deckManager.current_deck.main.begin() + hovered_seq); - deckManager.current_deck.side.push_back(draging_pointer); - } + if(push_side(pointer)) + pop_main(hovered_seq); } else if(hovered_pos == 2) { - if(deckManager.current_deck.side.size() < 20) { - deckManager.current_deck.extra.erase(deckManager.current_deck.extra.begin() + hovered_seq); - deckManager.current_deck.side.push_back(draging_pointer); - } + if(push_side(pointer)) + pop_extra(hovered_seq); } else { - if((draging_pointer->second.type & 0x802040) && deckManager.current_deck.extra.size() < 20) { - deckManager.current_deck.side.erase(deckManager.current_deck.side.begin() + hovered_seq); - deckManager.current_deck.extra.push_back(draging_pointer); - } - if(!(draging_pointer->second.type & 0x802040) && deckManager.current_deck.main.size() < 64) { - deckManager.current_deck.side.erase(deckManager.current_deck.side.begin() + hovered_seq); - deckManager.current_deck.main.push_back(draging_pointer); - } + if(push_extra(pointer) || push_main(pointer)) + pop_side(hovered_seq); } break; } - if(mainGame->wCategories->isVisible()) + if(mainGame->wBigCard->isVisible()) { + CloseBigCard(); break; - if(hovered_pos == 0 || hovered_seq == -1) + } + if(havePopupWindow()) break; - if(!is_draging) - draging_pointer = dataManager.GetCodePointer(hovered_code); - if(hovered_pos == 1) { - if(!is_draging) - deckManager.current_deck.main.erase(deckManager.current_deck.main.begin() + hovered_seq); - else if(deckManager.current_deck.side.size() < 15) { - deckManager.current_deck.side.push_back(draging_pointer); - is_draging = false; - } - } else if(hovered_pos == 2) { - if(!is_draging) - deckManager.current_deck.extra.erase(deckManager.current_deck.extra.begin() + hovered_seq); - else if(deckManager.current_deck.side.size() < 15) { - deckManager.current_deck.side.push_back(draging_pointer); - is_draging = false; - } - } else if(hovered_pos == 3) { - if(!is_draging) - deckManager.current_deck.side.erase(deckManager.current_deck.side.begin() + hovered_seq); - else { - if((draging_pointer->second.type & 0x802040) && deckManager.current_deck.extra.size() < 15) { - deckManager.current_deck.extra.push_back(draging_pointer); - is_draging = false; - } else if(!(draging_pointer->second.type & 0x802040) && deckManager.current_deck.main.size() < 60) { - deckManager.current_deck.main.push_back(draging_pointer); - is_draging = false; - } + if(!is_draging) { + if(hovered_pos == 0 || hovered_seq == -1) + break; + if(readonly) + break; + soundManager.PlaySoundEffect(SOUND_CARD_DROP); + if(hovered_pos == 1) { + pop_main(hovered_seq); + } else if(hovered_pos == 2) { + pop_extra(hovered_seq); + } else if(hovered_pos == 3) { + pop_side(hovered_seq); + } else { + auto pointer = _datas.find(hovered_code); + if (pointer == _datas.end()) + break; + if(!check_limit(pointer)) + break; + if(!push_extra(pointer) && !push_main(pointer)) + push_side(pointer); } } else { - if(is_draging) { - if(deckManager.current_deck.side.size() < 15) { - deckManager.current_deck.side.push_back(draging_pointer); - is_draging = false; - } + soundManager.PlaySoundEffect(SOUND_CARD_PICK); + if(click_pos == 1) { + push_side(draging_pointer); + } else if(click_pos == 2) { + push_side(draging_pointer); + } else if(click_pos == 3) { + if(!push_extra(draging_pointer)) + push_main(draging_pointer); } else { - unsigned int limitcode = draging_pointer->second.alias ? draging_pointer->second.alias : draging_pointer->first; - int limit = 3; - if(filterList->count(limitcode)) - limit = (*filterList)[limitcode]; - for(size_t i = 0; i < deckManager.current_deck.main.size(); ++i) - if(deckManager.current_deck.main[i]->first == limitcode - || deckManager.current_deck.main[i]->second.alias == limitcode) - limit--; - for(size_t i = 0; i < deckManager.current_deck.extra.size(); ++i) - if(deckManager.current_deck.extra[i]->first == limitcode - || deckManager.current_deck.extra[i]->second.alias == limitcode) - limit--; - for(size_t i = 0; i < deckManager.current_deck.side.size(); ++i) - if(deckManager.current_deck.side[i]->first == limitcode - || deckManager.current_deck.side[i]->second.alias == limitcode) - limit--; - if(limit <= 0) - break; - if((draging_pointer->second.type & 0x802040) && deckManager.current_deck.extra.size() < 15) { - deckManager.current_deck.extra.push_back(draging_pointer); - } else if(!(draging_pointer->second.type & 0x802040) && deckManager.current_deck.main.size() < 60) { - deckManager.current_deck.main.push_back(draging_pointer); - } + push_side(draging_pointer); } + is_draging = false; } break; } - case irr::EMIE_MOUSE_MOVED: { - int x = event.MouseInput.X; - int y = event.MouseInput.Y; - int pre_code = hovered_code; - if(x >= 314 && x <= 794 && y >= 164 && y <= 435) { - int lx = 10, px, py = (y - 164) / 68; - hovered_pos = 1; - if(deckManager.current_deck.main.size() > 40) - lx = (deckManager.current_deck.main.size() - 41) / 4 + 11; - if(x >= 750) - px = lx - 1; - else px = (x - 314) * (lx - 1) / 436; - if(py*lx + px >= (int)deckManager.current_deck.main.size()) { - hovered_seq = -1; - hovered_code = 0; - } else { - hovered_seq = py * lx + px; - hovered_code = deckManager.current_deck.main[hovered_seq]->first; - } - } else if(x >= 314 && x <= 794 && y >= 466 && y <= 530) { - int lx = deckManager.current_deck.extra.size(); - hovered_pos = 2; - if(lx < 10) - lx = 10; - if(x >= 750) - hovered_seq = lx - 1; - else hovered_seq = (x - 314) * (lx - 1) / 436; - if(hovered_seq >= (int)deckManager.current_deck.extra.size()) { - hovered_seq = -1; - hovered_code = 0; - } else { - hovered_code = deckManager.current_deck.extra[hovered_seq]->first; - } - } else if (x >= 314 && x <= 794 && y >= 564 && y <= 628) { - int lx = deckManager.current_deck.side.size(); - hovered_pos = 3; - if(lx < 10) - lx = 10; - if(x >= 750) - hovered_seq = lx - 1; - else hovered_seq = (x - 314) * (lx - 1) / 436; - if(hovered_seq >= (int)deckManager.current_deck.side.size()) { - hovered_seq = -1; - hovered_code = 0; - } else { - hovered_code = deckManager.current_deck.side[hovered_seq]->first; - } - } else if(x >= 810 && x <= 995 && y >= 165 && y <= 626) { - hovered_pos = 4; - hovered_seq = (y - 165) / 66; - if(mainGame->scrFilter->getPos() + hovered_seq >= (int)results.size()) { - hovered_seq = -1; - hovered_code = 0; - } else { - hovered_code = results[mainGame->scrFilter->getPos() + hovered_seq]->first; - } + case irr::EMIE_MMOUSE_LEFT_UP: { + if (mainGame->is_siding) + break; + if (havePopupWindow()) + break; + if (hovered_pos == 0 || hovered_seq == -1) + break; + if (readonly) + break; + if (is_draging) + break; + auto pointer = _datas.find(hovered_code); + if (pointer == _datas.end()) + break; + if(!check_limit(pointer)) + break; + soundManager.PlaySoundEffect(SOUND_CARD_PICK); + if (hovered_pos == 1) { + if(!push_main(pointer)) + push_side(pointer); + } else if (hovered_pos == 2) { + if(!push_extra(pointer)) + push_side(pointer); + } else if (hovered_pos == 3) { + if(!push_side(pointer) && !push_extra(pointer)) + push_main(pointer); } else { - hovered_pos = 0; - hovered_code = 0; + if(!push_extra(pointer) && !push_main(pointer)) + push_side(pointer); } - if(is_draging) { - dragx = x; - dragy = y; - } - if(!is_draging && pre_code != hovered_code) { - if(hovered_code) { - mainGame->ShowCardInfo(hovered_code); - } - if(pre_code) - imageManager.RemoveTexture(pre_code); + break; + } + case irr::EMIE_MOUSE_MOVED: { + if(is_starting_dragging) { + is_draging = true; + soundManager.PlaySoundEffect(SOUND_CARD_PICK); + if(hovered_pos == 1) + pop_main(hovered_seq); + else if(hovered_pos == 2) + pop_extra(hovered_seq); + else if(hovered_pos == 3) + pop_side(hovered_seq); + is_starting_dragging = false; } + mouse_pos.set(event.MouseInput.X, event.MouseInput.Y); + GetHoveredCard(); break; } case irr::EMIE_MOUSE_WHEEL: { + irr::gui::IGUIElement* root = mainGame->env->getRootGUIElement(); + if(root->getElementFromPoint(mouse_pos) == mainGame->imgBigCard) { + bigcard_zoom += 0.1f * event.MouseInput.Wheel; + ZoomBigCard(mouse_pos.X, mouse_pos.Y); + break; + } if(!mainGame->scrFilter->isVisible()) break; + if(mainGame->env->hasFocus(mainGame->scrFilter)) + break; + if(root->getElementFromPoint(mouse_pos) != root) + break; if(event.MouseInput.Wheel < 0) { if(mainGame->scrFilter->getPos() < mainGame->scrFilter->getMax()) mainGame->scrFilter->setPos(mainGame->scrFilter->getPos() + 1); @@ -609,9 +1257,7 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) { if(mainGame->scrFilter->getPos() > 0) mainGame->scrFilter->setPos(mainGame->scrFilter->getPos() - 1); } - SEvent e = event; - e.MouseInput.Event = irr::EMIE_MOUSE_MOVED; - mainGame->device->postEventFromUser(e); + GetHoveredCard(); break; } default: break; @@ -619,48 +1265,223 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) { break; } case irr::EET_KEY_INPUT_EVENT: { - switch(event.KeyInput.Key) { - case irr::KEY_KEY_R: { - if(!event.KeyInput.PressedDown) - mainGame->textFont->setTransparency(true); - break; - } - case irr::KEY_ESCAPE: { - mainGame->device->minimizeWindow(); - break; - } - default: break; - } break; } default: break; } return false; } +void DeckBuilder::GetHoveredCard() { + int pre_code = hovered_code; + hovered_pos = 0; + hovered_code = 0; + irr::gui::IGUIElement* root = mainGame->env->getRootGUIElement(); + if(root->getElementFromPoint(mouse_pos) != root) + return; + irr::core::vector2di pos = mainGame->ResizeReverse(mouse_pos.X, mouse_pos.Y); + int x = pos.X; + int y = pos.Y; + is_lastcard = 0; + if(x >= 314 && x <= 794) { + if(showing_pack) { + if((x <= 772 || !mainGame->scrPackCards->isVisible()) && y >= 164 && y <= 624) { + int mainsize = deckManager.current_deck.main.size(); + int lx = 10; + int dy = 68; + if(mainsize > 10 * 7) + lx = 11; + if(mainsize > 11 * 7) + lx = 12; + if(mainsize > 60) + dy = 66; + int px; + int py = (y - 164) / dy; + hovered_pos = 1; + if(x >= 750) + px = lx - 1; + else + px = (x - 314) * (lx - 1) / (mainGame->scrPackCards->isVisible() ? 414.0f : 436.0f); + hovered_seq = py * lx + px + mainGame->scrPackCards->getPos() * lx; + if(hovered_seq >= mainsize) { + hovered_seq = -1; + hovered_code = 0; + } else { + hovered_code = deckManager.current_deck.main[hovered_seq]->first; + } + } + } else if(y >= 164 && y <= 435) { + int lx = 10, px, py = (y - 164) / 68; + hovered_pos = 1; + if(deckManager.current_deck.main.size() > DECK_MIN_SIZE) + lx = (deckManager.current_deck.main.size() - 41) / 4 + 11; + if(x >= 750) + px = lx - 1; + else + px = (x - 314) * (lx - 1) / 436; + hovered_seq = py * lx + px; + if(hovered_seq >= (int)deckManager.current_deck.main.size()) { + hovered_seq = -1; + hovered_code = 0; + } else { + hovered_code = deckManager.current_deck.main[hovered_seq]->first; + } + } else if(y >= 466 && y <= 530) { + int lx = deckManager.current_deck.extra.size(); + hovered_pos = 2; + if(lx < 10) + lx = 10; + if(x >= 750) + hovered_seq = lx - 1; + else + hovered_seq = (x - 314) * (lx - 1) / 436; + if(hovered_seq >= (int)deckManager.current_deck.extra.size()) { + hovered_seq = -1; + hovered_code = 0; + } else { + hovered_code = deckManager.current_deck.extra[hovered_seq]->first; + if(x >= 772) + is_lastcard = 1; + } + } else if (y >= 564 && y <= 628) { + int lx = deckManager.current_deck.side.size(); + hovered_pos = 3; + if(lx < 10) + lx = 10; + if(x >= 750) + hovered_seq = lx - 1; + else + hovered_seq = (x - 314) * (lx - 1) / 436; + if(hovered_seq >= (int)deckManager.current_deck.side.size()) { + hovered_seq = -1; + hovered_code = 0; + } else { + hovered_code = deckManager.current_deck.side[hovered_seq]->first; + if(x >= 772) + is_lastcard = 1; + } + } + } else if(x >= 810 && x <= 995 && y >= 165 && y <= 626) { + hovered_pos = 4; + hovered_seq = (y - 165) / 66; + int current_pos = mainGame->scrFilter->getPos() + hovered_seq; + if(current_pos >= (int)results.size()) { + hovered_seq = -1; + hovered_code = 0; + } else { + hovered_code = results[current_pos]->first; + } + } + if(is_draging) { + dragx = mouse_pos.X; + dragy = mouse_pos.Y; + } + if(!is_draging && pre_code != hovered_code) { + if(hovered_code) + mainGame->ShowCardInfo(hovered_code); + } +} +void DeckBuilder::StartFilter() { + filter_type = mainGame->cbCardType->getSelected(); + filter_type2 = mainGame->cbCardType2->getItemData(mainGame->cbCardType2->getSelected()); + filter_lm = mainGame->cbLimit->getSelected(); + if(filter_type == 1) { + filter_attrib = mainGame->cbAttribute->getItemData(mainGame->cbAttribute->getSelected()); + filter_race = mainGame->cbRace->getItemData(mainGame->cbRace->getSelected()); + filter_atk = parse_filter(mainGame->ebAttack->getText(), &filter_atktype); + filter_def = parse_filter(mainGame->ebDefense->getText(), &filter_deftype); + filter_lv = parse_filter(mainGame->ebStar->getText(), &filter_lvtype); + filter_scl = parse_filter(mainGame->ebScale->getText(), &filter_scltype); + } + FilterCards(); +} void DeckBuilder::FilterCards() { results.clear(); + struct element_t { + std::wstring keyword; + std::vector setcodes; + enum class type_t { + all, + name, + setcode + } type{ type_t::all }; + bool exclude{ false }; + }; const wchar_t* pstr = mainGame->ebCardName->getText(); int trycode = BufferIO::GetVal(pstr); - if(dataManager.GetData(trycode, 0)) { - auto ptr = dataManager.GetCodePointer(trycode); - results.push_back(ptr); - mainGame->scrFilter->setVisible(false); - mainGame->scrFilter->setPos(0); - myswprintf(result_string, L"%d", results.size()); - return; + std::wstring str{ pstr }; + std::vector query_elements; + if(mainGame->gameConf.search_multiple_keywords) { + const wchar_t separator = mainGame->gameConf.search_multiple_keywords == 1 ? L' ' : L'+'; + const wchar_t minussign = L'-'; + const wchar_t quotation = L'\"'; + size_t element_start = 0; + for(;;) { + element_start = str.find_first_not_of(separator, element_start); + if(element_start == std::wstring::npos) + break; + element_t element; + if(str[element_start] == minussign) { + element.exclude = true; + element_start++; + } + if(element_start >= str.size()) + break; + if(str[element_start] == L'$') { + element.type = element_t::type_t::name; + element_start++; + } else if(str[element_start] == L'@') { + element.type = element_t::type_t::setcode; + element_start++; + } + if(element_start >= str.size()) + break; + wchar_t delimiter = separator; + if(str[element_start] == quotation) { + delimiter = quotation; + element_start++; + } + size_t element_end = str.find_first_of(delimiter, element_start); + if(element_end != std::wstring::npos) { + size_t length = element_end - element_start; + element.keyword = str.substr(element_start, length); + } else + element.keyword = str.substr(element_start); + element.setcodes = dataManager.GetSetCodes(element.keyword); + query_elements.push_back(element); + if(element_end == std::wstring::npos) + break; + element_start = element_end + 1; + } + } else { + element_t element; + size_t element_start = 0; + if(str[element_start] == L'$') { + element.type = element_t::type_t::name; + element_start++; + } else if(str[element_start] == L'@') { + element.type = element_t::type_t::setcode; + element_start++; + } + if(element_start < str.size()) { + element.keyword = str.substr(element_start); + element.setcodes = dataManager.GetSetCodes(element.keyword); + query_elements.push_back(element); + } } - if(pstr[0] == 0 || (pstr[0] == L'$' && pstr[1] == 0)) - pstr = 0; - auto strpointer = dataManager._strings.begin(); - for(code_pointer ptr = dataManager._datas.begin(); ptr != dataManager._datas.end(); ++ptr, ++strpointer) { - const CardDataC& data = ptr->second; - const CardString& text = strpointer->second; + auto& _datas = dataManager.GetDataTable(); + auto& _strings = dataManager.GetStringTable(); + for (code_pointer ptr = _datas.begin(); ptr != _datas.end(); ++ptr) { + auto& code = ptr->first; + auto& data = ptr->second; + auto strpointer = _strings.find(code); + if (strpointer == _strings.end()) + continue; + const CardString& strings = strpointer->second; if(data.type & TYPE_TOKEN) continue; switch(filter_type) { case 1: { - int type2 = data.type & 0xe03ef1; - if(!(data.type & TYPE_MONSTER) || (filter_type2 == 0x21 && type2 != 0x21) || (data.type & filter_type2) != filter_type2) + if(!(data.type & TYPE_MONSTER) || (data.type & filter_type2) != filter_type2) continue; if(filter_race && data.race != filter_race) continue; @@ -673,15 +1494,23 @@ void DeckBuilder::FilterCards() { continue; } if(filter_deftype) { - if((filter_deftype == 1 && data.defence != filter_def) || (filter_deftype == 2 && data.defence < filter_def) - || (filter_deftype == 3 && data.defence <= filter_def) || (filter_deftype == 4 && (data.defence > filter_def || data.defence < 0)) - || (filter_deftype == 5 && (data.defence >= filter_def || data.defence < 0)) || (filter_deftype == 6 && data.defence != -2)) + if((filter_deftype == 1 && data.defense != filter_def) || (filter_deftype == 2 && data.defense < filter_def) + || (filter_deftype == 3 && data.defense <= filter_def) || (filter_deftype == 4 && (data.defense > filter_def || data.defense < 0)) + || (filter_deftype == 5 && (data.defense >= filter_def || data.defense < 0)) || (filter_deftype == 6 && data.defense != -2) + || (data.type & TYPE_LINK)) continue; } if(filter_lvtype) { if((filter_lvtype == 1 && data.level != filter_lv) || (filter_lvtype == 2 && data.level < filter_lv) || (filter_lvtype == 3 && data.level <= filter_lv) || (filter_lvtype == 4 && data.level > filter_lv) - || (filter_lvtype == 5 && data.level >= filter_lv)) + || (filter_lvtype == 5 && data.level >= filter_lv) || filter_lvtype == 6) + continue; + } + if(filter_scltype) { + if((filter_scltype == 1 && data.lscale != filter_scl) || (filter_scltype == 2 && data.lscale < filter_scl) + || (filter_scltype == 3 && data.lscale <= filter_scl) || (filter_scltype == 4 && (data.lscale > filter_scl)) + || (filter_scltype == 5 && (data.lscale >= filter_scl)) || filter_scltype == 6 + || !(data.type & TYPE_PENDULUM)) continue; } break; @@ -703,25 +1532,47 @@ void DeckBuilder::FilterCards() { } if(filter_effect && !(data.category & filter_effect)) continue; + if(filter_marks && (data.link_marker & filter_marks) != filter_marks) + continue; if(filter_lm) { - if(filter_lm <= 3 && (!filterList->count(ptr->first) || (*filterList)[ptr->first] != filter_lm - 1)) + if(filter_lm <= 3 && (!filterList->content.count(ptr->first) || filterList->content.at(ptr->first) != filter_lm - 1)) + continue; + if(filter_lm == 4 && !(data.ot & AVAIL_OCG)) + continue; + if(filter_lm == 5 && !(data.ot & AVAIL_TCG)) continue; - if(filter_lm == 4 && data.ot != 1) + if(filter_lm == 6 && !(data.ot & AVAIL_SC)) continue; - if(filter_lm == 5 && data.ot != 2) + if(filter_lm == 7 && !(data.ot & AVAIL_CUSTOM)) + continue; + if(filter_lm == 8 && ((data.ot & AVAIL_OCGTCG) != AVAIL_OCGTCG)) continue; } - if(pstr) { - if(pstr[0] == L'$') { - if(wcsstr(text.name, &pstr[1]) == 0) - continue; + bool is_target = true; + for (auto elements_iterator = query_elements.begin(); elements_iterator != query_elements.end(); ++elements_iterator) { + bool match = false; + if (elements_iterator->type == element_t::type_t::name) { + match = CardNameContains(strings.name.c_str(), elements_iterator->keyword.c_str()); + } else if (elements_iterator->type == element_t::type_t::setcode) { + match = data.is_setcodes(elements_iterator->setcodes); + } else if (trycode && (data.code == trycode || data.alias == trycode && is_alternative(data.code, data.alias))){ + match = true; + } else { + match = CardNameContains(strings.name.c_str(), elements_iterator->keyword.c_str()) + || strings.text.find(elements_iterator->keyword) != std::wstring::npos + || data.is_setcodes(elements_iterator->setcodes); } - else { - if(wcsstr(text.name, pstr) == 0 && wcsstr(text.text, pstr) == 0) - continue; + if(elements_iterator->exclude) + match = !match; + if(!match) { + is_target = false; + break; } } - results.push_back(ptr); + if(is_target) + results.push_back(ptr); + else + continue; } myswprintf(result_string, L"%d", results.size()); if(results.size() > 7) { @@ -732,16 +1583,315 @@ void DeckBuilder::FilterCards() { mainGame->scrFilter->setVisible(false); mainGame->scrFilter->setPos(0); } - std::sort(results.begin(), results.end(), ClientCard::deck_sort_lv); + SortList(); +} +void DeckBuilder::InstantSearch() { + if(mainGame->gameConf.auto_search_limit >= 0 && ((int)std::wcslen(mainGame->ebCardName->getText()) >= mainGame->gameConf.auto_search_limit)) + StartFilter(); +} +void DeckBuilder::ClearSearch() { + mainGame->cbCardType->setSelected(0); + mainGame->cbCardType2->setSelected(0); + mainGame->cbCardType2->setEnabled(false); + mainGame->cbRace->setEnabled(false); + mainGame->cbAttribute->setEnabled(false); + mainGame->ebAttack->setEnabled(false); + mainGame->ebDefense->setEnabled(false); + mainGame->ebStar->setEnabled(false); + mainGame->ebScale->setEnabled(false); + mainGame->ebCardName->setText(L""); + mainGame->scrFilter->setVisible(false); + mainGame->scrFilter->setPos(0); + ClearFilter(); + results.clear(); + myswprintf(result_string, L"%d", 0); +} +void DeckBuilder::ClearFilter() { mainGame->cbAttribute->setSelected(0); mainGame->cbRace->setSelected(0); mainGame->cbLimit->setSelected(0); mainGame->ebAttack->setText(L""); - mainGame->ebDefence->setText(L""); + mainGame->ebDefense->setText(L""); mainGame->ebStar->setText(L""); + mainGame->ebScale->setText(L""); filter_effect = 0; for(int i = 0; i < 32; ++i) mainGame->chkCategory[i]->setChecked(false); + filter_marks = 0; + for(int i = 0; i < 8; i++) + mainGame->btnMark[i]->setPressed(false); + mainGame->btnEffectFilter->setPressed(false); + mainGame->btnMarksFilter->setPressed(false); +} +void DeckBuilder::SortList() { + auto left = results.begin(); + const wchar_t* pstr = mainGame->ebCardName->getText(); + for(auto it = results.begin(); it != results.end(); ++it) { + if(std::wcscmp(pstr, dataManager.GetName((*it)->first)) == 0) { + std::iter_swap(left, it); + ++left; + } + } + switch(mainGame->cbSortType->getSelected()) { + case 0: + std::sort(left, results.end(), DataManager::deck_sort_lv); + break; + case 1: + std::sort(left, results.end(), DataManager::deck_sort_atk); + break; + case 2: + std::sort(left, results.end(), DataManager::deck_sort_def); + break; + case 3: + std::sort(left, results.end(), DataManager::deck_sort_name); + break; + } +} + +void DeckBuilder::RefreshDeckList() { + irr::gui::IGUIListBox* lstCategories = mainGame->lstCategories; + irr::gui::IGUIListBox* lstDecks = mainGame->lstDecks; + wchar_t catepath[256]; + DeckManager::GetCategoryPath(catepath, lstCategories->getSelected(), lstCategories->getListItem(lstCategories->getSelected())); + lstDecks->clear(); + mainGame->RefreshDeck(catepath, [lstDecks](const wchar_t* item) { lstDecks->addItem(item); }); +} +void DeckBuilder::RefreshReadonly(int catesel) { + bool hasDeck = mainGame->cbDBDecks->getItemCount() != 0; + readonly = catesel < 2; + showing_pack = catesel == 0; + mainGame->btnSaveDeck->setEnabled(!readonly); + mainGame->btnSaveDeckAs->setEnabled(!readonly); + mainGame->btnClearDeck->setEnabled(!readonly); + mainGame->btnShuffleDeck->setEnabled(!readonly); + mainGame->btnSortDeck->setEnabled(!readonly); + mainGame->btnDeleteDeck->setEnabled(hasDeck && !readonly); + mainGame->btnRenameCategory->setEnabled(catesel > 3); + mainGame->btnDeleteCategory->setEnabled(catesel > 3); + mainGame->btnNewDeck->setEnabled(!readonly); + mainGame->btnRenameDeck->setEnabled(hasDeck && !readonly); + mainGame->btnDMDeleteDeck->setEnabled(hasDeck && !readonly); + mainGame->btnMoveDeck->setEnabled(hasDeck && !readonly); + mainGame->btnCopyDeck->setEnabled(hasDeck); +} +void DeckBuilder::RefreshPackListScroll() { + if(showing_pack) { + mainGame->scrPackCards->setPos(0); + int mainsize = deckManager.current_deck.main.size(); + if(mainsize <= 7 * 12) { + mainGame->scrPackCards->setVisible(false); + } else { + mainGame->scrPackCards->setVisible(true); + mainGame->scrPackCards->setMax((int)ceil(((float)mainsize - 7 * 12) / 12.0f)); + } + } else { + mainGame->scrPackCards->setVisible(false); + mainGame->scrPackCards->setPos(0); + } +} +void DeckBuilder::ChangeCategory(int catesel) { + mainGame->RefreshDeck(mainGame->cbDBCategory, mainGame->cbDBDecks); + mainGame->cbDBDecks->setSelected(0); + RefreshReadonly(catesel); + load_current_deck(mainGame->cbDBCategory, mainGame->cbDBDecks); + is_modified = false; + prev_category = catesel; + prev_deck = 0; +} +void DeckBuilder::ShowDeckManage() { + mainGame->RefreshCategoryDeck(mainGame->cbDBCategory, mainGame->cbDBDecks, false); + mainGame->cbDBCategory->setSelected(prev_category); + mainGame->RefreshDeck(mainGame->cbDBCategory, mainGame->cbDBDecks); + mainGame->cbDBDecks->setSelected(prev_deck); + irr::gui::IGUIListBox* lstCategories = mainGame->lstCategories; + lstCategories->clear(); + lstCategories->addItem(dataManager.GetSysString(1450)); + lstCategories->addItem(dataManager.GetSysString(1451)); + lstCategories->addItem(dataManager.GetSysString(1452)); + lstCategories->addItem(dataManager.GetSysString(1453)); + FileSystem::TraversalDir(L"./deck", [lstCategories](const wchar_t* name, bool isdir) { + if(isdir) { + lstCategories->addItem(name); + } + }); + lstCategories->setSelected(prev_category); + RefreshDeckList(); + RefreshReadonly(prev_category); + mainGame->lstDecks->setSelected(prev_deck); + mainGame->PopupElement(mainGame->wDeckManage); } +void DeckBuilder::ShowBigCard(int code, float zoom) { + bigcard_code = code; + bigcard_zoom = zoom; + auto img = imageManager.GetBigPicture(code, zoom); + mainGame->imgBigCard->setImage(img); + auto size = img->getSize(); + irr::s32 left = mainGame->window_size.Width / 2 - size.Width / 2; + irr::s32 top = mainGame->window_size.Height / 2 - size.Height / 2; + mainGame->imgBigCard->setRelativePosition(irr::core::recti(0, 0, size.Width, size.Height)); + mainGame->wBigCard->setRelativePosition(irr::core::recti(left, top, left + size.Width, top + size.Height)); + mainGame->gMutex.lock(); + mainGame->btnBigCardOriginalSize->setVisible(true); + mainGame->btnBigCardZoomIn->setVisible(true); + mainGame->btnBigCardZoomOut->setVisible(true); + mainGame->btnBigCardClose->setVisible(true); + mainGame->ShowElement(mainGame->wBigCard); + mainGame->env->getRootGUIElement()->bringToFront(mainGame->wBigCard); + mainGame->gMutex.unlock(); +} +void DeckBuilder::ZoomBigCard(irr::s32 centerx, irr::s32 centery) { + if(bigcard_zoom >= 4) + bigcard_zoom = 4; + if(bigcard_zoom <= 0.2f) + bigcard_zoom = 0.2f; + auto img = imageManager.GetBigPicture(bigcard_code, bigcard_zoom); + mainGame->imgBigCard->setImage(img); + auto size = img->getSize(); + auto pos = mainGame->wBigCard->getRelativePosition(); + if(centerx == -1) { + centerx = pos.UpperLeftCorner.X + pos.getWidth() / 2; + centery = pos.UpperLeftCorner.Y + pos.getHeight() * 0.444f; + } + float posx = (float)(centerx - pos.UpperLeftCorner.X) / pos.getWidth(); + float posy = (float)(centery - pos.UpperLeftCorner.Y) / pos.getHeight(); + irr::s32 left = centerx - size.Width * posx; + irr::s32 top = centery - size.Height * posy; + mainGame->imgBigCard->setRelativePosition(irr::core::recti(0, 0, size.Width, size.Height)); + mainGame->wBigCard->setRelativePosition(irr::core::recti(left, top, left + size.Width, top + size.Height)); +} +void DeckBuilder::CloseBigCard() { + mainGame->HideElement(mainGame->wBigCard); + mainGame->btnBigCardOriginalSize->setVisible(false); + mainGame->btnBigCardZoomIn->setVisible(false); + mainGame->btnBigCardZoomOut->setVisible(false); + mainGame->btnBigCardClose->setVisible(false); +} + +static inline wchar_t NormalizeChar(wchar_t c) { + /* + // Convert all symbols and punctuations to space. + if (c != 0 && c < 128 && !isalnum(c)) { + return ' '; + } + */ + // Convert latin chararacters to uppercase to ignore case. + if (c < 128 && isalpha(c)) { + return toupper(c); + } + // Remove some accentued characters that are not supported by the editbox. + if (c >= 232 && c <= 235) { + return 'E'; + } + if (c >= 238 && c <= 239) { + return 'I'; + } + return c; +} +bool DeckBuilder::CardNameContains(const wchar_t* haystack, const wchar_t* needle) { + if(!needle[0]) { + return true; + } + if(!haystack) { + return false; + } + int i = 0; + int j = 0; + while(haystack[i]) { + wchar_t ca = NormalizeChar(haystack[i]); + wchar_t cb = NormalizeChar(needle[j]); + if(ca == cb) { + j++; + if(!needle[j]) { + return true; + } + } else { + i -= j; + j = 0; + } + i++; + } + return false; +} +bool DeckBuilder::push_main(code_pointer pointer, int seq) { + if(pointer->second.type & (TYPE_FUSION | TYPE_SYNCHRO | TYPE_XYZ | TYPE_LINK)) + return false; + auto& container = deckManager.current_deck.main; + int maxc = mainGame->is_siding ? DECK_MAX_SIZE + 5 : DECK_MAX_SIZE; + if((int)container.size() >= maxc) + return false; + if(seq >= 0 && seq < (int)container.size()) + container.insert(container.begin() + seq, pointer); + else + container.push_back(pointer); + is_modified = true; + GetHoveredCard(); + return true; +} +bool DeckBuilder::push_extra(code_pointer pointer, int seq) { + if(!(pointer->second.type & (TYPE_FUSION | TYPE_SYNCHRO | TYPE_XYZ | TYPE_LINK))) + return false; + auto& container = deckManager.current_deck.extra; + int maxc = mainGame->is_siding ? EXTRA_MAX_SIZE + 5 : EXTRA_MAX_SIZE; + if((int)container.size() >= maxc) + return false; + if(seq >= 0 && seq < (int)container.size()) + container.insert(container.begin() + seq, pointer); + else + container.push_back(pointer); + is_modified = true; + GetHoveredCard(); + return true; +} +bool DeckBuilder::push_side(code_pointer pointer, int seq) { + auto& container = deckManager.current_deck.side; + int maxc = mainGame->is_siding ? SIDE_MAX_SIZE + 5 : SIDE_MAX_SIZE; + if((int)container.size() >= maxc) + return false; + if(seq >= 0 && seq < (int)container.size()) + container.insert(container.begin() + seq, pointer); + else + container.push_back(pointer); + is_modified = true; + GetHoveredCard(); + return true; +} +void DeckBuilder::pop_main(int seq) { + auto& container = deckManager.current_deck.main; + container.erase(container.begin() + seq); + is_modified = true; + GetHoveredCard(); +} +void DeckBuilder::pop_extra(int seq) { + auto& container = deckManager.current_deck.extra; + container.erase(container.begin() + seq); + is_modified = true; + GetHoveredCard(); +} +void DeckBuilder::pop_side(int seq) { + auto& container = deckManager.current_deck.side; + container.erase(container.begin() + seq); + is_modified = true; + GetHoveredCard(); +} +bool DeckBuilder::check_limit(code_pointer pointer) { + auto limitcode = pointer->second.alias ? pointer->second.alias : pointer->first; + int limit = 3; + auto flit = filterList->content.find(limitcode); + if(flit != filterList->content.end()) + limit = flit->second; + for (auto& card : deckManager.current_deck.main) { + if (card->first == limitcode || card->second.alias == limitcode) + limit--; + } + for (auto& card : deckManager.current_deck.extra) { + if (card->first == limitcode || card->second.alias == limitcode) + limit--; + } + for (auto& card : deckManager.current_deck.side) { + if (card->first == limitcode || card->second.alias == limitcode) + limit--; + } + return limit > 0; +} } diff --git a/gframe/deck_con.h b/gframe/deck_con.h index 03977f3de6..4dd2a1f38e 100644 --- a/gframe/deck_con.h +++ b/gframe/deck_con.h @@ -1,45 +1,92 @@ #ifndef DECK_CON_H #define DECK_CON_H -#include "config.h" #include #include -#include "client_card.h" +#include +#include +#include "data_manager.h" +#include "deck_manager.h" namespace ygo { class DeckBuilder: public irr::IEventReceiver { public: - virtual bool OnEvent(const irr::SEvent& event); + DeckBuilder(); + bool OnEvent(const irr::SEvent& event) override; + void Initialize(); + void Terminate(); + void GetHoveredCard(); void FilterCards(); - - long long filter_effect; - unsigned int filter_type; - unsigned int filter_type2; - unsigned int filter_attrib; - unsigned int filter_race; - unsigned int filter_atktype; - int filter_atk; - unsigned int filter_deftype; - int filter_def; - unsigned int filter_lvtype; - unsigned int filter_lv; - int filter_lm; - int hovered_code; - int hovered_pos; - int hovered_seq; - int click_pos; - bool is_draging; - int dragx; - int dragy; - size_t pre_mainc; - size_t pre_extrac; - size_t pre_sidec; + void StartFilter(); + void ClearFilter(); + void InstantSearch(); + void ClearSearch(); + void SortList(); + + void RefreshDeckList(); + void RefreshReadonly(int catesel); + void RefreshPackListScroll(); + void ChangeCategory(int catesel); + void ShowDeckManage(); + void ShowBigCard(int code, float zoom); + void ZoomBigCard(irr::s32 centerx = -1, irr::s32 centery = -1); + void CloseBigCard(); + + bool CardNameContains(const wchar_t *haystack, const wchar_t *needle); + + bool push_main(code_pointer pointer, int seq = -1); + bool push_extra(code_pointer pointer, int seq = -1); + bool push_side(code_pointer pointer, int seq = -1); + void pop_main(int seq); + void pop_extra(int seq); + void pop_side(int seq); + bool check_limit(code_pointer pointer); + + unsigned long long filter_effect{}; + unsigned int filter_type{}; + unsigned int filter_type2{}; + unsigned int filter_attrib{}; + unsigned int filter_race{}; + unsigned int filter_atktype{}; + int filter_atk{}; + unsigned int filter_deftype{}; + int filter_def{}; + unsigned int filter_lvtype{}; + unsigned int filter_lv{}; + unsigned int filter_scltype{}; + unsigned int filter_scl{}; + unsigned int filter_marks{}; + int filter_lm{}; + irr::core::vector2di mouse_pos; + int hovered_code{}; + int hovered_pos{}; + int hovered_seq{ -1 }; + int is_lastcard{}; + int click_pos{}; + bool is_draging{}; + bool is_starting_dragging{}; + int dragx{}; + int dragy{}; + int bigcard_code{}; + float bigcard_zoom{}; + size_t pre_mainc{}; + size_t pre_extrac{}; + size_t pre_sidec{}; code_pointer draging_pointer; - - std::unordered_map* filterList; + int prev_category{}; + int prev_deck{}; + irr::s32 prev_operation{}; + int prev_sel{ -1 }; + bool is_modified{}; + bool readonly{}; + bool showing_pack{}; + std::mt19937 rnd; + + const LFList* filterList{}; std::vector results; - wchar_t result_string[8]; + wchar_t result_string[8]{}; + std::vector expansionPacks; }; } diff --git a/gframe/deck_manager.cpp b/gframe/deck_manager.cpp index 7f6e2b61af..8659445779 100644 --- a/gframe/deck_manager.cpp +++ b/gframe/deck_manager.cpp @@ -1,151 +1,225 @@ #include "deck_manager.h" -#include "data_manager.h" #include "game.h" -#include +#include "myfilesystem.h" +#include "network.h" namespace ygo { DeckManager deckManager; -void DeckManager::LoadLFList() { - LFList* cur = NULL; - FILE* fp = fopen("lflist.conf", "r"); - char linebuf[256]; - wchar_t strBuffer[256]; +void DeckManager::LoadLFListSingle(const char* path) { + auto cur = _lfList.rend(); + FILE* fp = myfopen(path, "r"); + char linebuf[256]{}; + wchar_t strBuffer[256]{}; if(fp) { - fseek(fp, 0, SEEK_END); - int fsize = ftell(fp); - fseek(fp, 0, SEEK_SET); - fgets(linebuf, 256, fp); - while(ftell(fp) < fsize) { - fgets(linebuf, 256, fp); + while(std::fgets(linebuf, sizeof linebuf, fp)) { if(linebuf[0] == '#') continue; - int p = 0, sa = 0, code, count; if(linebuf[0] == '!') { - sa = BufferIO::DecodeUTF8((const char*)(&linebuf[1]), strBuffer); - while(strBuffer[sa - 1] == L'\r' || strBuffer[sa - 1] == L'\n' ) sa--; + auto len = std::strcspn(linebuf, "\r\n"); + linebuf[len] = 0; + BufferIO::DecodeUTF8(&linebuf[1], strBuffer); LFList newlist; + newlist.listName = strBuffer; + newlist.hash = 0x7dfcee6a; _lfList.push_back(newlist); - cur = &_lfList[_lfList.size() - 1]; - memcpy(cur->listName, (const void*)strBuffer, 40); - cur->listName[sa] = 0; - cur->content = new std::unordered_map; - cur->hash = 0x7dfcee6a; + cur = _lfList.rbegin(); continue; } - while(linebuf[p] != ' ' && linebuf[p] != '\t' && linebuf[p] != 0) p++; - if(linebuf[p] == 0) + if (cur == _lfList.rend()) + continue; + char* pos = linebuf; + errno = 0; + auto result = std::strtoul(pos, &pos, 10); + if (errno || result > UINT32_MAX) + continue; + if (pos == linebuf || *pos != ' ') continue; - linebuf[p++] = 0; - sa = p; - code = atoi(linebuf); - if(code == 0) + uint32_t code = static_cast(result); + errno = 0; + int count = std::strtol(pos, &pos, 10); + if (errno) continue; - while(linebuf[p] == ' ' || linebuf[p] == '\t') p++; - while(linebuf[p] != ' ' && linebuf[p] != '\t' && linebuf[p] != 0) p++; - linebuf[p] = 0; - count = atoi(&linebuf[sa]); - if(cur == NULL) continue; - (*cur->content)[code] = count; + if (count < 0 || count > 2) + continue; + cur->content[code] = count; cur->hash = cur->hash ^ ((code << 18) | (code >> 14)) ^ ((code << (27 + count)) | (code >> (5 - count))); } - fclose(fp); + std::fclose(fp); } +} +void DeckManager::LoadLFList() { + LoadLFListSingle("expansions/lflist.conf"); + LoadLFListSingle("lflist.conf"); LFList nolimit; - myswprintf(nolimit.listName, L"N/A"); + nolimit.listName = L"N/A"; nolimit.hash = 0; - nolimit.content = new std::unordered_map; _lfList.push_back(nolimit); } -wchar_t* DeckManager::GetLFListName(int lfhash) { - for(size_t i = 0; i < _lfList.size(); ++i) { - if(_lfList[i].hash == (unsigned int)lfhash) { - return _lfList[i].listName; - } - } - return (wchar_t*)dataManager.unknown_string; +const wchar_t* DeckManager::GetLFListName(unsigned int lfhash) { + auto lit = std::find_if(_lfList.begin(), _lfList.end(), [lfhash](const ygo::LFList& list) { + return list.hash == lfhash; + }); + if(lit != _lfList.end()) + return lit->listName.c_str(); + return dataManager.unknown_string; +} +const LFList* DeckManager::GetLFList(unsigned int lfhash) { + auto lit = std::find_if(_lfList.begin(), _lfList.end(), [lfhash](const ygo::LFList& list) { + return list.hash == lfhash; + }); + if (lit != _lfList.end()) + return &(*lit); + return nullptr; } -int DeckManager::CheckLFList(Deck& deck, int lfhash, bool allow_ocg, bool allow_tcg) { +static unsigned int checkAvail(unsigned int ot, unsigned int avail) { + if((ot & avail) == avail) + return 0; + if((ot & AVAIL_OCG) && (avail != AVAIL_OCG)) + return DECKERROR_OCGONLY; + if((ot & AVAIL_TCG) && (avail != AVAIL_TCG)) + return DECKERROR_TCGONLY; + return DECKERROR_NOTAVAIL; +} +unsigned int DeckManager::CheckDeck(const Deck& deck, unsigned int lfhash, int rule) { std::unordered_map ccount; - std::unordered_map* list = 0; - for(size_t i = 0; i < _lfList.size(); ++i) { - if(_lfList[i].hash == (unsigned int)lfhash) { - list = _lfList[i].content; - break; - } - } - if(!list) + // rule + if(deck.main.size() < DECK_MIN_SIZE || deck.main.size() > DECK_MAX_SIZE) + return (DECKERROR_MAINCOUNT << 28) | (unsigned)deck.main.size(); + if(deck.extra.size() > EXTRA_MAX_SIZE) + return (DECKERROR_EXTRACOUNT << 28) | (unsigned)deck.extra.size(); + if(deck.side.size() > SIDE_MAX_SIZE) + return (DECKERROR_SIDECOUNT << 28) | (unsigned)deck.side.size(); + auto lflist = GetLFList(lfhash); + if (!lflist) return 0; - int dc = 0; - if(deck.main.size() < 40 || deck.main.size() > 60 || deck.extra.size() > 15 || deck.side.size() > 15) - return 1; - for(size_t i = 0; i < deck.main.size(); ++i) { - code_pointer cit = deck.main[i]; - if((!allow_ocg && (cit->second.ot == 0x1)) || (!allow_tcg && (cit->second.ot == 0x2))) - return cit->first; - if(cit->second.type & (TYPE_FUSION | TYPE_SYNCHRO | TYPE_XYZ | TYPE_TOKEN)) - return 1; + auto& list = lflist->content; + const unsigned int rule_map[6] = { AVAIL_OCG, AVAIL_TCG, AVAIL_SC, AVAIL_CUSTOM, AVAIL_OCGTCG, 0 }; + unsigned int avail = 0; + if (rule >= 0 && rule < (int)(sizeof rule_map / sizeof rule_map[0])) + avail = rule_map[rule]; + for (auto& cit : deck.main) { + auto gameruleDeckError = checkAvail(cit->second.ot, avail); + if(gameruleDeckError) + return (gameruleDeckError << 28) | cit->first; + if (cit->second.type & (TYPES_EXTRA_DECK | TYPE_TOKEN)) + return (DECKERROR_MAINCOUNT << 28); int code = cit->second.alias ? cit->second.alias : cit->first; ccount[code]++; - dc = ccount[code]; - auto it = list->find(code); - if(dc > 3 || (it != list->end() && dc > it->second)) - return cit->first; + int dc = ccount[code]; + if(dc > 3) + return (DECKERROR_CARDCOUNT << 28) | cit->first; + auto it = list.find(code); + if(it != list.end() && dc > it->second) + return (DECKERROR_LFLIST << 28) | cit->first; } - for(size_t i = 0; i < deck.extra.size(); ++i) { - code_pointer cit = deck.extra[i]; - if((!allow_ocg && (cit->second.ot == 0x1)) || (!allow_tcg && (cit->second.ot == 0x2))) - return cit->first; + for (auto& cit : deck.extra) { + auto gameruleDeckError = checkAvail(cit->second.ot, avail); + if(gameruleDeckError) + return (gameruleDeckError << 28) | cit->first; + if (!(cit->second.type & TYPES_EXTRA_DECK) || cit->second.type & TYPE_TOKEN) + return (DECKERROR_EXTRACOUNT << 28); int code = cit->second.alias ? cit->second.alias : cit->first; ccount[code]++; - dc = ccount[code]; - auto it = list->find(code); - if(dc > 3 || (it != list->end() && dc > it->second)) - return cit->first; + int dc = ccount[code]; + if(dc > 3) + return (DECKERROR_CARDCOUNT << 28) | cit->first; + auto it = list.find(code); + if(it != list.end() && dc > it->second) + return (DECKERROR_LFLIST << 28) | cit->first; } - for(size_t i = 0; i < deck.side.size(); ++i) { - code_pointer cit = deck.side[i]; - if((!allow_ocg && (cit->second.ot == 0x1)) || (!allow_tcg && (cit->second.ot == 0x2))) - return cit->first; + for (auto& cit : deck.side) { + auto gameruleDeckError = checkAvail(cit->second.ot, avail); + if(gameruleDeckError) + return (gameruleDeckError << 28) | cit->first; + if (cit->second.type & TYPE_TOKEN) + return (DECKERROR_SIDECOUNT << 28); int code = cit->second.alias ? cit->second.alias : cit->first; ccount[code]++; - dc = ccount[code]; - auto it = list->find(code); - if(dc > 3 || (it != list->end() && dc > it->second)) - return cit->first; + int dc = ccount[code]; + if(dc > 3) + return (DECKERROR_CARDCOUNT << 28) | cit->first; + auto it = list.find(code); + if(it != list.end() && dc > it->second) + return (DECKERROR_LFLIST << 28) | cit->first; } return 0; } -void DeckManager::LoadDeck(Deck& deck, int* dbuf, int mainc, int sidec) { +uint32_t DeckManager::LoadDeck(Deck& deck, uint32_t dbuf[], int mainc, int sidec, bool is_packlist) { deck.clear(); - int code; - CardData cd; + uint32_t errorcode = 0; + auto& _datas = dataManager.GetDataTable(); for(int i = 0; i < mainc; ++i) { - code = dbuf[i]; - if(!dataManager.GetData(code, &cd)) + auto code = dbuf[i]; + auto it = _datas.find(code); + if(it == _datas.end()) { + errorcode = code; continue; - if(cd.type & TYPE_TOKEN) + } + auto& cd = it->second; + if (cd.type & TYPE_TOKEN) { + errorcode = code; continue; - else if(cd.type & 0x802040 && deck.extra.size() < 15) { - deck.extra.push_back(dataManager.GetCodePointer(code)); - } else if(deck.main.size() < 60) { - deck.main.push_back(dataManager.GetCodePointer(code)); + } + if(is_packlist) { + deck.main.push_back(it); + continue; + } + if (cd.type & TYPES_EXTRA_DECK) { + if (deck.extra.size() < EXTRA_MAX_SIZE) + deck.extra.push_back(it); + } + else { + if (deck.main.size() < DECK_MAX_SIZE) + deck.main.push_back(it); } } for(int i = 0; i < sidec; ++i) { - code = dbuf[mainc + i]; - if(!dataManager.GetData(code, &cd)) + auto code = dbuf[mainc + i]; + auto it = _datas.find(code); + if(it == _datas.end()) { + errorcode = code; continue; - if(cd.type & TYPE_TOKEN) + } + auto& cd = it->second; + if (cd.type & TYPE_TOKEN) { + errorcode = code; + continue; + } + if(deck.side.size() < SIDE_MAX_SIZE) + deck.side.push_back(it); + } + return errorcode; +} +uint32_t DeckManager::LoadDeckFromStream(Deck& deck, std::istringstream& deckStream, bool is_packlist) { + int ct = 0; + int mainc = 0, sidec = 0; + uint32_t cardlist[PACK_MAX_SIZE]{}; + bool is_side = false; + std::string linebuf; + while (std::getline(deckStream, linebuf, '\n') && ct < PACK_MAX_SIZE) { + if (linebuf[0] == '!') { + is_side = true; + continue; + } + if (linebuf[0] < '0' || linebuf[0] > '9') continue; - if(deck.side.size() < 15) - deck.side.push_back(dataManager.GetCodePointer(code)); + errno = 0; + auto code = std::strtoul(linebuf.c_str(), nullptr, 10); + if (errno || code > UINT32_MAX) + continue; + cardlist[ct++] = code; + if (is_side) + ++sidec; + else + ++mainc; } + return LoadDeck(deck, cardlist, mainc, sidec, is_packlist); } -bool DeckManager::LoadSide(Deck& deck, int* dbuf, int mainc, int sidec) { - std::unordered_map pcount; - std::unordered_map ncount; +bool DeckManager::LoadSide(Deck& deck, uint32_t dbuf[], int mainc, int sidec) { + std::unordered_map pcount; + std::unordered_map ncount; for(size_t i = 0; i < deck.main.size(); ++i) pcount[deck.main[i]->first]++; for(size_t i = 0; i < deck.extra.size(); ++i) @@ -154,7 +228,7 @@ bool DeckManager::LoadSide(Deck& deck, int* dbuf, int mainc, int sidec) { pcount[deck.side[i]->first]++; Deck ndeck; LoadDeck(ndeck, dbuf, mainc, sidec); - if(ndeck.main.size() != deck.main.size() || ndeck.extra.size() != deck.extra.size()) + if (ndeck.main.size() != deck.main.size() || ndeck.extra.size() != deck.extra.size() || ndeck.side.size() != deck.side.size()) return false; for(size_t i = 0; i < ndeck.main.size(); ++i) ncount[ndeck.main[i]->first]++; @@ -162,74 +236,169 @@ bool DeckManager::LoadSide(Deck& deck, int* dbuf, int mainc, int sidec) { ncount[ndeck.extra[i]->first]++; for(size_t i = 0; i < ndeck.side.size(); ++i) ncount[ndeck.side[i]->first]++; - for(auto cdit = ncount.begin(); cdit != ncount.end(); ++cdit) - if(cdit->second != pcount[cdit->first]) + for (auto& cdit : ncount) + if (cdit.second != pcount[cdit.first]) return false; deck = ndeck; return true; } -bool DeckManager::LoadDeck(const wchar_t* file) { - int sp = 0, ct = 0, mainc = 0, sidec = 0, code; - wchar_t deck[64]; - myswprintf(deck, L"./deck/%ls.ydk", file); - int cardlist[128]; - bool is_side = false; -#ifdef WIN32 - FILE* fp = _wfopen(deck, L"r"); +void DeckManager::GetCategoryPath(wchar_t* ret, int index, const wchar_t* text) { + wchar_t catepath[256]; + switch(index) { + case DECK_CATEGORY_PACK: + myswprintf(catepath, L"./pack"); + break; + case DECK_CATEGORY_BOT: + BufferIO::CopyWideString(mainGame->gameConf.bot_deck_path, catepath); + break; + case -1: + case DECK_CATEGORY_NONE: + case DECK_CATEGORY_SEPARATOR: + myswprintf(catepath, L"./deck"); + break; + default: + myswprintf(catepath, L"./deck/%ls", text); + } + BufferIO::CopyWStr(catepath, ret, 256); +} +void DeckManager::GetDeckFile(wchar_t* ret, int category_index, const wchar_t* category_name, const wchar_t* deckname) { + wchar_t filepath[256]; + wchar_t catepath[256]; + if(deckname != nullptr) { + GetCategoryPath(catepath, category_index, category_name); + myswprintf(filepath, L"%ls/%ls.ydk", catepath, deckname); + BufferIO::CopyWStr(filepath, ret, 256); + } + else { + BufferIO::CopyWStr(L"", ret, 256); + } +} +FILE* DeckManager::OpenDeckFile(const wchar_t* file, const char* mode) { + FILE* fp = mywfopen(file, mode); + return fp; +} +irr::io::IReadFile* DeckManager::OpenDeckReader(const wchar_t* file) { +#ifdef _IRR_WCHAR_FILESYSTEM + auto reader = dataManager.FileSystem->createAndOpenFile(file); #else - char deckfn[256]; - BufferIO::EncodeUTF8(deck, deckfn); - FILE* fp = fopen(deckfn, "r"); + char file2[256]; + BufferIO::EncodeUTF8(file, file2); + auto reader = dataManager.FileSystem->createAndOpenFile(file2); #endif - if(!fp) + return reader; +} +bool DeckManager::LoadCurrentDeck(std::istringstream& deckStream, bool is_packlist) { + LoadDeckFromStream(current_deck, deckStream, is_packlist); + return true; // the above LoadDeck has return value but we ignore it here for now +} +bool DeckManager::LoadCurrentDeck(const wchar_t* file, bool is_packlist) { + current_deck.clear(); + if (!file[0]) return false; - char linebuf[256]; - fseek(fp, 0, SEEK_END); - int fsize = ftell(fp); - fseek(fp, 0, SEEK_SET); - fgets(linebuf, 256, fp); - while(ftell(fp) < fsize && ct < 128) { - fgets(linebuf, 256, fp); - if(linebuf[0] == '!') { - is_side = true; - continue; - } - if(linebuf[0] < '0' || linebuf[0] > '9') - continue; - sp = 0; - while(linebuf[sp] >= '0' && linebuf[sp] <= '9') sp++; - linebuf[sp] = 0; - code = atoi(linebuf); - cardlist[ct++] = code; - if(is_side) sidec++; - else mainc++; + char deckBuffer[MAX_YDK_SIZE]{}; + auto reader = OpenDeckReader(file); + if(!reader) { + wchar_t localfile[256]; + myswprintf(localfile, L"./deck/%ls.ydk", file); + reader = OpenDeckReader(localfile); } - fclose(fp); - LoadDeck(current_deck, cardlist, mainc, sidec); - return true; + if(!reader && !mywcsncasecmp(file, L"./pack", 6)) { + wchar_t zipfile[256]; + myswprintf(zipfile, L"%ls", file + 2); + reader = OpenDeckReader(zipfile); + } + if(!reader) + return false; + std::memset(deckBuffer, 0, sizeof deckBuffer); + int size = reader->read(deckBuffer, sizeof deckBuffer); + reader->drop(); + if (size >= (int)sizeof deckBuffer) { + return false; + } + std::istringstream deckStream(deckBuffer); + LoadDeckFromStream(current_deck, deckStream, is_packlist); + return true; // the above function has return value but we ignore it here for now } -bool DeckManager::SaveDeck(Deck& deck, const wchar_t* name) { - wchar_t file[64]; - myswprintf(file, L"./deck/%ls.ydk", name); -#ifdef WIN32 - FILE* fp = _wfopen(file, L"w"); -#else - char filefn[256]; - BufferIO::EncodeUTF8(file, filefn); - FILE* fp = fopen(filefn, "w"); -#endif - if(!fp) +bool DeckManager::LoadCurrentDeck(int category_index, const wchar_t* category_name, const wchar_t* deckname) { + wchar_t filepath[256]; + GetDeckFile(filepath, category_index, category_name, deckname); + bool is_packlist = (category_index == DECK_CATEGORY_PACK); + if(!LoadCurrentDeck(filepath, is_packlist)) return false; - fprintf(fp, "#created by ...\n#main\n"); + if (mainGame->is_building) + mainGame->deckBuilder.RefreshPackListScroll(); + return true; +} +void DeckManager::SaveDeck(const Deck& deck, std::stringstream& deckStream) { + deckStream << "#created by ..." << std::endl; + deckStream << "#main" << std::endl; for(size_t i = 0; i < deck.main.size(); ++i) - fprintf(fp, "%d\n", deck.main[i]->first); - fprintf(fp, "#extra\n"); + deckStream << deck.main[i]->first << std::endl; + deckStream << "#extra" << std::endl; for(size_t i = 0; i < deck.extra.size(); ++i) - fprintf(fp, "%d\n", deck.extra[i]->first); - fprintf(fp, "!side\n"); + deckStream << deck.extra[i]->first << std::endl; + deckStream << "!side" << std::endl; for(size_t i = 0; i < deck.side.size(); ++i) - fprintf(fp, "%d\n", deck.side[i]->first); - fclose(fp); + deckStream << deck.side[i]->first << std::endl; +} +bool DeckManager::SaveDeck(const Deck& deck, const wchar_t* file) { + if(!FileSystem::IsDirExists(L"./deck") && !FileSystem::MakeDir(L"./deck")) + return false; + FILE* fp = OpenDeckFile(file, "w"); + if(!fp) + return false; + std::stringstream deckStream; + SaveDeck(deck, deckStream); + std::fputs(deckStream.str().c_str(), fp); + std::fclose(fp); + return true; +} +bool DeckManager::DeleteDeck(const wchar_t* file) { + return FileSystem::RemoveFile(file); +} +bool DeckManager::CreateCategory(const wchar_t* name) { + if(!FileSystem::IsDirExists(L"./deck") && !FileSystem::MakeDir(L"./deck")) + return false; + if(name[0] == 0) + return false; + wchar_t localname[256]; + myswprintf(localname, L"./deck/%ls", name); + return FileSystem::MakeDir(localname); +} +bool DeckManager::RenameCategory(const wchar_t* oldname, const wchar_t* newname) { + if(!FileSystem::IsDirExists(L"./deck") && !FileSystem::MakeDir(L"./deck")) + return false; + if(newname[0] == 0) + return false; + wchar_t oldlocalname[256]; + wchar_t newlocalname[256]; + myswprintf(oldlocalname, L"./deck/%ls", oldname); + myswprintf(newlocalname, L"./deck/%ls", newname); + return FileSystem::Rename(oldlocalname, newlocalname); +} +bool DeckManager::DeleteCategory(const wchar_t* name) { + wchar_t localname[256]; + myswprintf(localname, L"./deck/%ls", name); + if(!FileSystem::IsDirExists(localname)) + return false; + return FileSystem::DeleteDir(localname); +} +bool DeckManager::SaveDeckArray(const DeckArray& deck, const wchar_t* name) { + if (!FileSystem::IsDirExists(L"./deck") && !FileSystem::MakeDir(L"./deck")) + return false; + FILE* fp = OpenDeckFile(name, "w"); + if (!fp) + return false; + std::fprintf(fp, "#created by ...\n#main\n"); + for (const auto& code : deck.main) + std::fprintf(fp, "%u\n", code); + std::fprintf(fp, "#extra\n"); + for (const auto& code : deck.extra) + std::fprintf(fp, "%u\n", code); + std::fprintf(fp, "!side\n"); + for (const auto& code : deck.side) + std::fprintf(fp, "%u\n", code); + std::fclose(fp); return true; } } diff --git a/gframe/deck_manager.h b/gframe/deck_manager.h index a2583146dd..f338e38070 100644 --- a/gframe/deck_manager.h +++ b/gframe/deck_manager.h @@ -1,23 +1,38 @@ #ifndef DECKMANAGER_H #define DECKMANAGER_H -#include "config.h" -#include "client_card.h" #include #include +#include +#include "data_manager.h" namespace ygo { +constexpr int DECK_MAX_SIZE = 60; +constexpr int DECK_MIN_SIZE = 40; +constexpr int EXTRA_MAX_SIZE = 15; +constexpr int SIDE_MAX_SIZE = 15; +constexpr int PACK_MAX_SIZE = 1000; + +constexpr int MAINC_MAX = 250; // the limit of card_state +constexpr int SIDEC_MAX = MAINC_MAX; + +constexpr int DECK_CATEGORY_PACK = 0; +constexpr int DECK_CATEGORY_BOT = 1; +constexpr int DECK_CATEGORY_NONE = 2; +constexpr int DECK_CATEGORY_SEPARATOR = 3; +constexpr int DECK_CATEGORY_CUSTOM = 4; + struct LFList { - unsigned int hash; - wchar_t listName[20]; - std::unordered_map* content; + unsigned int hash{}; + std::wstring listName; + std::unordered_map content; }; struct Deck { std::vector main; std::vector extra; std::vector side; - Deck() {} + Deck() = default; Deck(const Deck& ndeck) { main = ndeck.main; extra = ndeck.extra; @@ -30,18 +45,42 @@ struct Deck { } }; +struct DeckArray { + std::vector main; + std::vector extra; + std::vector side; +}; + class DeckManager { public: Deck current_deck; std::vector _lfList; + static constexpr int MAX_YDK_SIZE = 0x10000; + + void LoadLFListSingle(const char* path); void LoadLFList(); - wchar_t* GetLFListName(int lfhash); - int CheckLFList(Deck& deck, int lfhash, bool allow_ocg, bool allow_tcg); - void LoadDeck(Deck& deck, int* dbuf, int mainc, int sidec); - bool LoadSide(Deck& deck, int* dbuf, int mainc, int sidec); - bool LoadDeck(const wchar_t* file); - bool SaveDeck(Deck& deck, const wchar_t* name); + const wchar_t* GetLFListName(unsigned int lfhash); + const LFList* GetLFList(unsigned int lfhash); + unsigned int CheckDeck(const Deck& deck, unsigned int lfhash, int rule); + bool LoadCurrentDeck(const wchar_t* file, bool is_packlist = false); + bool LoadCurrentDeck(int category_index, const wchar_t* category_name, const wchar_t* deckname); + bool LoadCurrentDeck(std::istringstream& deckStream, bool is_packlist = false); + + static uint32_t LoadDeck(Deck& deck, uint32_t dbuf[], int mainc, int sidec, bool is_packlist = false); + static uint32_t LoadDeckFromStream(Deck& deck, std::istringstream& deckStream, bool is_packlist = false); + static bool LoadSide(Deck& deck, uint32_t dbuf[], int mainc, int sidec); + static void GetCategoryPath(wchar_t* ret, int index, const wchar_t* text); + static void GetDeckFile(wchar_t* ret, int category_index, const wchar_t* category_name, const wchar_t* deckname); + static FILE* OpenDeckFile(const wchar_t* file, const char* mode); + static irr::io::IReadFile* OpenDeckReader(const wchar_t* file); + static bool SaveDeck(const Deck& deck, const wchar_t* file); + static void SaveDeck(const Deck& deck, std::stringstream& deckStream); + static bool DeleteDeck(const wchar_t* file); + static bool CreateCategory(const wchar_t* name); + static bool RenameCategory(const wchar_t* oldname, const wchar_t* newname); + static bool DeleteCategory(const wchar_t* name); + static bool SaveDeckArray(const DeckArray& deck, const wchar_t* name); }; extern DeckManager deckManager; diff --git a/gframe/drawing.cpp b/gframe/drawing.cpp index f39bf60007..675d81739f 100644 --- a/gframe/drawing.cpp +++ b/gframe/drawing.cpp @@ -1,9 +1,10 @@ #include "game.h" +#include "client_card.h" #include "materials.h" #include "image_manager.h" #include "deck_manager.h" +#include "sound_manager.h" #include "duelclient.h" -#include "../ocgcore/field.h" namespace ygo { @@ -11,32 +12,33 @@ void Game::DrawSelectionLine(irr::video::S3DVertex* vec, bool strip, int width, if(!gameConf.use_d3d) { float origin[4] = {1.0f, 1.0f, 1.0f, 1.0f}; glLineWidth(width); - glLineStipple(1, linePattern); + glLineStipple(1, linePatternGL); if(strip) glEnable(GL_LINE_STIPPLE); glDisable(GL_TEXTURE_2D); glMaterialfv(GL_FRONT, GL_AMBIENT, cv); glBegin(GL_LINE_LOOP); - glVertex3fv((float*)&vec[0].Pos); - glVertex3fv((float*)&vec[1].Pos); - glVertex3fv((float*)&vec[3].Pos); - glVertex3fv((float*)&vec[2].Pos); + glVertex3fv(&vec[0].Pos.X); + glVertex3fv(&vec[1].Pos.X); + glVertex3fv(&vec[3].Pos.X); + glVertex3fv(&vec[2].Pos.X); glEnd(); glMaterialfv(GL_FRONT, GL_AMBIENT, origin); glDisable(GL_LINE_STIPPLE); + glEnable(GL_TEXTURE_2D); } else { driver->setMaterial(matManager.mOutLine); if(strip) { - if(linePattern < 15) { - driver->draw3DLine(vec[0].Pos, vec[0].Pos + (vec[1].Pos - vec[0].Pos) * (linePattern + 1) / 15.0); - driver->draw3DLine(vec[1].Pos, vec[1].Pos + (vec[3].Pos - vec[1].Pos) * (linePattern + 1) / 15.0); - driver->draw3DLine(vec[3].Pos, vec[3].Pos + (vec[2].Pos - vec[3].Pos) * (linePattern + 1) / 15.0); - driver->draw3DLine(vec[2].Pos, vec[2].Pos + (vec[0].Pos - vec[2].Pos) * (linePattern + 1) / 15.0); + if(linePatternD3D < 15) { + driver->draw3DLine(vec[0].Pos, vec[0].Pos + (vec[1].Pos - vec[0].Pos) * (linePatternD3D + 1) / 15.0); + driver->draw3DLine(vec[1].Pos, vec[1].Pos + (vec[3].Pos - vec[1].Pos) * (linePatternD3D + 1) / 15.0); + driver->draw3DLine(vec[3].Pos, vec[3].Pos + (vec[2].Pos - vec[3].Pos) * (linePatternD3D + 1) / 15.0); + driver->draw3DLine(vec[2].Pos, vec[2].Pos + (vec[0].Pos - vec[2].Pos) * (linePatternD3D + 1) / 15.0); } else { - driver->draw3DLine(vec[0].Pos + (vec[1].Pos - vec[0].Pos) * (linePattern - 14) / 15.0, vec[1].Pos); - driver->draw3DLine(vec[1].Pos + (vec[3].Pos - vec[1].Pos) * (linePattern - 14) / 15.0, vec[3].Pos); - driver->draw3DLine(vec[3].Pos + (vec[2].Pos - vec[3].Pos) * (linePattern - 14) / 15.0, vec[2].Pos); - driver->draw3DLine(vec[2].Pos + (vec[0].Pos - vec[2].Pos) * (linePattern - 14) / 15.0, vec[0].Pos); + driver->draw3DLine(vec[0].Pos + (vec[1].Pos - vec[0].Pos) * (linePatternD3D - 14) / 15.0, vec[1].Pos); + driver->draw3DLine(vec[1].Pos + (vec[3].Pos - vec[1].Pos) * (linePatternD3D - 14) / 15.0, vec[3].Pos); + driver->draw3DLine(vec[3].Pos + (vec[2].Pos - vec[3].Pos) * (linePatternD3D - 14) / 15.0, vec[2].Pos); + driver->draw3DLine(vec[2].Pos + (vec[0].Pos - vec[2].Pos) * (linePatternD3D - 14) / 15.0, vec[0].Pos); } } else { driver->draw3DLine(vec[0].Pos, vec[1].Pos); @@ -46,12 +48,32 @@ void Game::DrawSelectionLine(irr::video::S3DVertex* vec, bool strip, int width, } } } +void Game::DrawSelectionLine(irr::gui::IGUIElement* element, int width, irr::video::SColor color) { + irr::core::recti pos = element->getAbsolutePosition(); + float x1 = pos.UpperLeftCorner.X; + float x2 = pos.LowerRightCorner.X; + float y1 = pos.UpperLeftCorner.Y; + float y2 = pos.LowerRightCorner.Y; + float w = pos.getWidth(); + float h = pos.getHeight(); + if(linePatternD3D < 15) { + driver->draw2DRectangle(color, irr::core::recti(x1 - 1 - width, y1 - 1 - width, x1 + (w * (linePatternD3D + 1) / 15.0) + 1 + width, y1 - 1)); + driver->draw2DRectangle(color, irr::core::recti(x2 - (w * (linePatternD3D + 1) / 15.0) - 1 - width, y2 + 1, x2 + 1 + width, y2 + 1 + width)); + driver->draw2DRectangle(color, irr::core::recti(x1 - 1 - width, y1 - 1 - width, x1 - 1, y2 - (h * (linePatternD3D + 1) / 15.0) + 1 + width)); + driver->draw2DRectangle(color, irr::core::recti(x2 + 1, y1 + (h * (linePatternD3D + 1) / 15.0) - 1 - width, x2 + 1 + width, y2 + 1 + width)); + } else { + driver->draw2DRectangle(color, irr::core::recti(x1 - 1 - width + (w * (linePatternD3D - 14) / 15.0), y1 - 1 - width, x2 + 1 + width, y1 - 1)); + driver->draw2DRectangle(color, irr::core::recti(x1 - 1 - width, y2 + 1, x2 - (w * (linePatternD3D - 14) / 15.0) + 1 + width, y2 + 1 + width)); + driver->draw2DRectangle(color, irr::core::recti(x1 - 1 - width, y2 - (h * (linePatternD3D - 14) / 15.0) - 1 - width, x1 - 1, y2 + 1 + width)); + driver->draw2DRectangle(color, irr::core::recti(x2 + 1, y1 - 1 - width, x2 + 1 + width, y1 + (h * (linePatternD3D - 14) / 15.0) + 1 + width)); + } +} void Game::DrawBackGround() { static int selFieldAlpha = 255; static int selFieldDAlpha = -10; - matrix4 im = irr::core::IdentityMatrix; - im.setTranslation(vector3df(0, 0, -0.01f)); - driver->setTransform(irr::video::ETS_WORLD, im); +// matrix4 im = irr::core::IdentityMatrix; +// im.setTranslation(irr::core::vector3df(0, 0, -0.01f)); +// driver->setTransform(irr::video::ETS_WORLD, im); //dark shade // matManager.mSelField.AmbientColor = 0xff000000; // matManager.mSelField.DiffuseColor = 0xa0000000; @@ -62,85 +84,124 @@ void Game::DrawBackGround() { // driver->setMaterial(matManager.mBackLine); // driver->drawVertexPrimitiveList(matManager.vBackLine, 76, matManager.iBackLine, 58, irr::video::EVT_STANDARD, irr::scene::EPT_LINES); //draw field + //draw field spell card driver->setTransform(irr::video::ETS_WORLD, irr::core::IdentityMatrix); - matManager.mTexture.setTexture(0, imageManager.tField); + bool drawField = false; + int rule = (dInfo.duel_rule >= 4) ? 1 : 0; + if(gameConf.draw_field_spell) { + int fieldcode1 = -1; + int fieldcode2 = -1; + if(dField.szone[0][5] && dField.szone[0][5]->position & POS_FACEUP) + fieldcode1 = dField.szone[0][5]->code; + if(dField.szone[1][5] && dField.szone[1][5]->position & POS_FACEUP) + fieldcode2 = dField.szone[1][5]->code; + int fieldcode = (fieldcode1 > 0) ? fieldcode1 : fieldcode2; + if(fieldcode1 > 0 && fieldcode2 > 0 && fieldcode1 != fieldcode2) { + auto texture = imageManager.GetTextureField(fieldcode1); + if(texture) { + drawField = true; + matManager.mTexture.setTexture(0, texture); + driver->setMaterial(matManager.mTexture); + driver->drawVertexPrimitiveList(matManager.vFieldSpell1, 4, matManager.iRectangle, 2); + } + texture = imageManager.GetTextureField(fieldcode2); + if(texture) { + drawField = true; + matManager.mTexture.setTexture(0, texture); + driver->setMaterial(matManager.mTexture); + driver->drawVertexPrimitiveList(matManager.vFieldSpell2, 4, matManager.iRectangle, 2); + } + } else if(fieldcode > 0) { + auto texture = imageManager.GetTextureField(fieldcode); + if(texture) { + drawField = true; + matManager.mTexture.setTexture(0, texture); + driver->setMaterial(matManager.mTexture); + driver->drawVertexPrimitiveList(matManager.vFieldSpell, 4, matManager.iRectangle, 2); + } + } + } + matManager.mTexture.setTexture(0, drawField ? imageManager.tFieldTransparent[rule] : imageManager.tField[rule]); driver->setMaterial(matManager.mTexture); driver->drawVertexPrimitiveList(matManager.vField, 4, matManager.iRectangle, 2); driver->setMaterial(matManager.mBackLine); //select field - if(dInfo.curMsg == MSG_SELECT_PLACE || dInfo.curMsg == MSG_SELECT_DISFIELD) { + if(dInfo.curMsg == MSG_SELECT_PLACE || dInfo.curMsg == MSG_SELECT_DISFIELD || dInfo.curMsg == MSG_HINT) { float cv[4] = {0.0f, 0.0f, 1.0f, 1.0f}; - int filter = 0x1; - for (int i = 0; i < 5; ++i, filter <<= 1) { - if ((dField.selectable_field & filter) > 0) - DrawSelectionLine(&matManager.vFields[16 + i * 4], !(dField.selected_field & filter), 2, cv); + unsigned int filter = 0x1; + for (int i = 0; i < 7; ++i, filter <<= 1) { + if (dField.selectable_field & filter) + DrawSelectionLine(matManager.vFieldMzone[0][i], !(dField.selected_field & filter), 2, cv); } filter = 0x100; for (int i = 0; i < 8; ++i, filter <<= 1) { - if ((dField.selectable_field & filter) > 0) - DrawSelectionLine(&matManager.vFields[36 + i * 4], !(dField.selected_field & filter), 2, cv); + if (dField.selectable_field & filter) + DrawSelectionLine(matManager.vFieldSzone[0][i][rule], !(dField.selected_field & filter), 2, cv); } filter = 0x10000; - for (int i = 0; i < 5; ++i, filter <<= 1) { - if ((dField.selectable_field & filter) > 0) - DrawSelectionLine(&matManager.vFields[84 + i * 4], !(dField.selected_field & filter), 2, cv); + for (int i = 0; i < 7; ++i, filter <<= 1) { + if (dField.selectable_field & filter) + DrawSelectionLine(matManager.vFieldMzone[1][i], !(dField.selected_field & filter), 2, cv); } filter = 0x1000000; for (int i = 0; i < 8; ++i, filter <<= 1) { - if ((dField.selectable_field & filter) > 0) - DrawSelectionLine(&matManager.vFields[104 + i * 4], !(dField.selected_field & filter), 2, cv); + if (dField.selectable_field & filter) + DrawSelectionLine(matManager.vFieldSzone[1][i][rule], !(dField.selected_field & filter), 2, cv); } } //disabled field { /*float cv[4] = {0.0f, 0.0f, 1.0f, 1.0f};*/ - int filter = 0x1; - for (int i = 0; i < 5; ++i, filter <<= 1) { - if ((dField.disabled_field & filter) > 0) { - driver->draw3DLine(matManager.vFields[16 + i * 4].Pos, matManager.vFields[16 + i * 4 + 3].Pos, 0xffffffff); - driver->draw3DLine(matManager.vFields[16 + i * 4 + 1].Pos, matManager.vFields[16 + i * 4 + 2].Pos, 0xffffffff); + unsigned int filter = 0x1; + for (int i = 0; i < 7; ++i, filter <<= 1) { + if (dField.disabled_field & filter) { + driver->draw3DLine(matManager.vFieldMzone[0][i][0].Pos, matManager.vFieldMzone[0][i][3].Pos, 0xffffffff); + driver->draw3DLine(matManager.vFieldMzone[0][i][1].Pos, matManager.vFieldMzone[0][i][2].Pos, 0xffffffff); } } filter = 0x100; for (int i = 0; i < 8; ++i, filter <<= 1) { - if ((dField.disabled_field & filter) > 0) { - driver->draw3DLine(matManager.vFields[36 + i * 4].Pos, matManager.vFields[36 + i * 4 + 3].Pos, 0xffffffff); - driver->draw3DLine(matManager.vFields[36 + i * 4 + 1].Pos, matManager.vFields[36 + i * 4 + 2].Pos, 0xffffffff); + if (dField.disabled_field & filter) { + driver->draw3DLine(matManager.vFieldSzone[0][i][rule][0].Pos, matManager.vFieldSzone[0][i][rule][3].Pos, 0xffffffff); + driver->draw3DLine(matManager.vFieldSzone[0][i][rule][1].Pos, matManager.vFieldSzone[0][i][rule][2].Pos, 0xffffffff); } } filter = 0x10000; - for (int i = 0; i < 5; ++i, filter <<= 1) { - if ((dField.disabled_field & filter) > 0) { - driver->draw3DLine(matManager.vFields[84 + i * 4].Pos, matManager.vFields[84 + i * 4 + 3].Pos, 0xffffffff); - driver->draw3DLine(matManager.vFields[84 + i * 4 + 1].Pos, matManager.vFields[84 + i * 4 + 2].Pos, 0xffffffff); + for (int i = 0; i < 7; ++i, filter <<= 1) { + if (dField.disabled_field & filter) { + driver->draw3DLine(matManager.vFieldMzone[1][i][0].Pos, matManager.vFieldMzone[1][i][3].Pos, 0xffffffff); + driver->draw3DLine(matManager.vFieldMzone[1][i][1].Pos, matManager.vFieldMzone[1][i][2].Pos, 0xffffffff); } } filter = 0x1000000; for (int i = 0; i < 8; ++i, filter <<= 1) { - if ((dField.disabled_field & filter) > 0) { - driver->draw3DLine(matManager.vFields[104 + i * 4].Pos, matManager.vFields[104 + i * 4 + 3].Pos, 0xffffffff); - driver->draw3DLine(matManager.vFields[104 + i * 4 + 1].Pos, matManager.vFields[104 + i * 4 + 2].Pos, 0xffffffff); + if (dField.disabled_field & filter) { + driver->draw3DLine(matManager.vFieldSzone[1][i][rule][0].Pos, matManager.vFieldSzone[1][i][rule][3].Pos, 0xffffffff); + driver->draw3DLine(matManager.vFieldSzone[1][i][rule][1].Pos, matManager.vFieldSzone[1][i][rule][2].Pos, 0xffffffff); } } } //current sel - if (dField.hovered_location != 0 && dField.hovered_location != 2) { - int index = 0; - if (dField.hovered_controler == 0) { - if (dField.hovered_location == LOCATION_DECK) index = 0; - else if (dField.hovered_location == LOCATION_MZONE) index = 16 + dField.hovered_sequence * 4; - else if (dField.hovered_location == LOCATION_SZONE) index = 36 + dField.hovered_sequence * 4; - else if (dField.hovered_location == LOCATION_GRAVE) index = 4; - else if (dField.hovered_location == LOCATION_REMOVED) index = 12; - else if (dField.hovered_location == LOCATION_EXTRA) index = 8; - } else { - if (dField.hovered_location == LOCATION_DECK) index = 68; - else if (dField.hovered_location == LOCATION_MZONE) index = 84 + dField.hovered_sequence * 4; - else if (dField.hovered_location == LOCATION_SZONE) index = 104 + dField.hovered_sequence * 4; - else if (dField.hovered_location == LOCATION_GRAVE) index = 72; - else if (dField.hovered_location == LOCATION_REMOVED) index = 80; - else if (dField.hovered_location == LOCATION_EXTRA) index = 76; - } + if (dField.hovered_location != 0 && dField.hovered_location != 2 && dField.hovered_location != POSITION_HINT + && !(dInfo.duel_rule < 4 && dField.hovered_location == LOCATION_MZONE && dField.hovered_sequence > 4) + && !(dInfo.duel_rule >= 4 && dField.hovered_location == LOCATION_SZONE && dField.hovered_sequence > 5)) { + irr::video::S3DVertex* vertex = 0; + if (dField.hovered_location == LOCATION_DECK) + vertex = matManager.vFieldDeck[dField.hovered_controler]; + else if (dField.hovered_location == LOCATION_MZONE) { + vertex = matManager.vFieldMzone[dField.hovered_controler][dField.hovered_sequence]; + ClientCard* pcard = dField.mzone[dField.hovered_controler][dField.hovered_sequence]; + if(pcard && pcard->type & TYPE_LINK) { + DrawLinkedZones(pcard); + } + } else if (dField.hovered_location == LOCATION_SZONE) + vertex = matManager.vFieldSzone[dField.hovered_controler][dField.hovered_sequence][rule]; + else if (dField.hovered_location == LOCATION_GRAVE) + vertex = matManager.vFieldGrave[dField.hovered_controler][rule]; + else if (dField.hovered_location == LOCATION_REMOVED) + vertex = matManager.vFieldRemove[dField.hovered_controler][rule]; + else if (dField.hovered_location == LOCATION_EXTRA) + vertex = matManager.vFieldExtra[dField.hovered_controler]; selFieldAlpha += selFieldDAlpha; if (selFieldAlpha <= 5) { selFieldAlpha = 5; @@ -153,33 +214,127 @@ void Game::DrawBackGround() { matManager.mSelField.AmbientColor = 0xffffffff; matManager.mSelField.DiffuseColor = selFieldAlpha << 24; driver->setMaterial(matManager.mSelField); - driver->drawVertexPrimitiveList(&matManager.vFields[index], 4, matManager.iRectangle, 2); + driver->drawVertexPrimitiveList(vertex, 4, matManager.iRectangle, 2); + } +} +void Game::DrawLinkedZones(ClientCard* pcard) { + auto mark = pcard->link_marker; + ClientCard* pcard2; + if (dField.hovered_sequence < 5) { + if (mark & LINK_MARKER_LEFT && dField.hovered_sequence > 0) { + pcard2 = dField.mzone[dField.hovered_controler][dField.hovered_sequence - 1]; + CheckMutual(pcard2, LINK_MARKER_RIGHT); + driver->drawVertexPrimitiveList(&matManager.vFieldMzone[dField.hovered_controler][dField.hovered_sequence - 1], 4, matManager.iRectangle, 2); + } + if (mark & LINK_MARKER_RIGHT && dField.hovered_sequence < 4) { + pcard2 = dField.mzone[dField.hovered_controler][dField.hovered_sequence + 1]; + CheckMutual(pcard2, LINK_MARKER_LEFT); + driver->drawVertexPrimitiveList(&matManager.vFieldMzone[dField.hovered_controler][dField.hovered_sequence + 1], 4, matManager.iRectangle, 2); + } + if (dInfo.duel_rule >= 4) { + if ((mark & LINK_MARKER_TOP_LEFT && dField.hovered_sequence == 2) + || (mark & LINK_MARKER_TOP && dField.hovered_sequence == 1) + || (mark & LINK_MARKER_TOP_RIGHT && dField.hovered_sequence == 0)) { + int arrow = (dField.hovered_sequence == 2) ? LINK_MARKER_BOTTOM_RIGHT : (dField.hovered_sequence == 1) ? LINK_MARKER_BOTTOM : LINK_MARKER_BOTTOM_LEFT; + pcard2 = dField.mzone[dField.hovered_controler][5]; + if (!pcard2) { + pcard2 = dField.mzone[1 - dField.hovered_controler][6]; + arrow = (dField.hovered_sequence == 2) ? LINK_MARKER_TOP_LEFT : (dField.hovered_sequence == 1) ? LINK_MARKER_TOP : LINK_MARKER_TOP_RIGHT; + } + CheckMutual(pcard2, arrow); + driver->drawVertexPrimitiveList(&matManager.vFieldMzone[dField.hovered_controler][5], 4, matManager.iRectangle, 2); + } + if ((mark & LINK_MARKER_TOP_LEFT && dField.hovered_sequence == 4) + || (mark & LINK_MARKER_TOP && dField.hovered_sequence == 3) + || (mark & LINK_MARKER_TOP_RIGHT && dField.hovered_sequence == 2)) { + int arrow = (dField.hovered_sequence == 4) ? LINK_MARKER_BOTTOM_RIGHT : (dField.hovered_sequence == 3) ? LINK_MARKER_BOTTOM : LINK_MARKER_BOTTOM_LEFT; + pcard2 = dField.mzone[dField.hovered_controler][6]; + if (!pcard2) { + pcard2 = dField.mzone[1 - dField.hovered_controler][5]; + arrow = (dField.hovered_sequence == 4) ? LINK_MARKER_TOP_LEFT : (dField.hovered_sequence == 3) ? LINK_MARKER_TOP : LINK_MARKER_TOP_RIGHT; + } + CheckMutual(pcard2, arrow); + driver->drawVertexPrimitiveList(&matManager.vFieldMzone[dField.hovered_controler][6], 4, matManager.iRectangle, 2); + } + } + } else { + int swap = (dField.hovered_sequence == 5) ? 0 : 2; + if (mark & LINK_MARKER_BOTTOM_LEFT) { + pcard2 = dField.mzone[dField.hovered_controler][0 + swap]; + CheckMutual(pcard2, LINK_MARKER_TOP_RIGHT); + driver->drawVertexPrimitiveList(&matManager.vFieldMzone[dField.hovered_controler][0 + swap], 4, matManager.iRectangle, 2); + } + if (mark & LINK_MARKER_BOTTOM) { + pcard2 = dField.mzone[dField.hovered_controler][1 + swap]; + CheckMutual(pcard2, LINK_MARKER_TOP); + driver->drawVertexPrimitiveList(&matManager.vFieldMzone[dField.hovered_controler][1 + swap], 4, matManager.iRectangle, 2); + } + if (mark & LINK_MARKER_BOTTOM_RIGHT) { + pcard2 = dField.mzone[dField.hovered_controler][2 + swap]; + CheckMutual(pcard2, LINK_MARKER_TOP_LEFT); + driver->drawVertexPrimitiveList(&matManager.vFieldMzone[dField.hovered_controler][2 + swap], 4, matManager.iRectangle, 2); + } + if (mark & LINK_MARKER_TOP_LEFT) { + pcard2 = dField.mzone[1 - dField.hovered_controler][4 - swap]; + CheckMutual(pcard2, LINK_MARKER_TOP_LEFT); + driver->drawVertexPrimitiveList(&matManager.vFieldMzone[1 - dField.hovered_controler][4 - swap], 4, matManager.iRectangle, 2); + } + if (mark & LINK_MARKER_TOP) { + pcard2 = dField.mzone[1 - dField.hovered_controler][3 - swap]; + CheckMutual(pcard2, LINK_MARKER_TOP); + driver->drawVertexPrimitiveList(&matManager.vFieldMzone[1 - dField.hovered_controler][3 - swap], 4, matManager.iRectangle, 2); + } + if (mark & LINK_MARKER_TOP_RIGHT) { + pcard2 = dField.mzone[1 - dField.hovered_controler][2 - swap]; + CheckMutual(pcard2, LINK_MARKER_TOP_RIGHT); + driver->drawVertexPrimitiveList(&matManager.vFieldMzone[1 - dField.hovered_controler][2 - swap], 4, matManager.iRectangle, 2); + } + } +} +void Game::CheckMutual(ClientCard* pcard, int mark) { + matManager.mSelField.AmbientColor = 0xff0261a2; + driver->setMaterial(matManager.mSelField); + if (pcard && pcard->type & TYPE_LINK && pcard->link_marker & mark) { + matManager.mSelField.AmbientColor = 0xff009900; + driver->setMaterial(matManager.mSelField); } } void Game::DrawCards() { for(int p = 0; p < 2; ++p) { - for(int i = 0; i < 5; ++i) - if(dField.mzone[p][i]) - DrawCard(dField.mzone[p][i]); - for(int i = 0; i < 8; ++i) - if(dField.szone[p][i]) - DrawCard(dField.szone[p][i]); - for(size_t i = 0; i < dField.deck[p].size(); ++i) - DrawCard(dField.deck[p][i]); - for(size_t i = 0; i < dField.hand[p].size(); ++i) - DrawCard(dField.hand[p][i]); - for(size_t i = 0; i < dField.grave[p].size(); ++i) - DrawCard(dField.grave[p][i]); - for(size_t i = 0; i < dField.remove[p].size(); ++i) - DrawCard(dField.remove[p][i]); - for(size_t i = 0; i < dField.extra[p].size(); ++i) - DrawCard(dField.extra[p][i]); - } - for(auto cit = dField.overlay_cards.begin(); cit != dField.overlay_cards.end(); ++cit) - DrawCard(*cit); + for(auto it = dField.mzone[p].begin(); it != dField.mzone[p].end(); ++it) + if(*it) + DrawCard(*it); + for(auto it = dField.szone[p].begin(); it != dField.szone[p].end(); ++it) + if(*it) + DrawCard(*it); + for(auto it = dField.deck[p].begin(); it != dField.deck[p].end(); ++it) + DrawCard(*it); + for(auto it = dField.hand[p].begin(); it != dField.hand[p].end(); ++it) + DrawCard(*it); + for(auto it = dField.grave[p].begin(); it != dField.grave[p].end(); ++it) + DrawCard(*it); + for(auto it = dField.remove[p].begin(); it != dField.remove[p].end(); ++it) + DrawCard(*it); + for(auto it = dField.extra[p].begin(); it != dField.extra[p].end(); ++it) + DrawCard(*it); + } + for (auto cit = dField.overlay_cards.begin(); cit != dField.overlay_cards.end(); ++cit) { + auto pcard = (*cit); + auto olcard = pcard->overlayTarget; + if (pcard->aniFrame) { + DrawCard(pcard); + } + else if (olcard && olcard->location == LOCATION_MZONE) { + if (pcard->sequence < MAX_LAYER_COUNT) { + DrawCard(pcard); + } + } + else { + DrawCard(pcard); + } + } } void Game::DrawCard(ClientCard* pcard) { - driver->setTransform(irr::video::ETS_WORLD, pcard->mTransform); if(pcard->aniFrame) { if(pcard->is_moving) { pcard->curPos += pcard->dPos; @@ -193,30 +348,28 @@ void Game::DrawCard(ClientCard* pcard) { if(pcard->aniFrame == 0) { pcard->is_moving = false; pcard->is_fading = false; + pcard->chain_code = 0; } } matManager.mCard.AmbientColor = 0xffffffff; matManager.mCard.DiffuseColor = (pcard->curAlpha << 24) | 0xffffff; - matManager.mCard.setTexture(0, imageManager.GetTexture(pcard->code)); driver->setTransform(irr::video::ETS_WORLD, pcard->mTransform); - driver->setMaterial(matManager.mCard); - driver->drawVertexPrimitiveList(matManager.vCardFront, 4, matManager.iRectangle, 2); - matManager.mCard.setTexture(0, imageManager.tCover); - driver->setMaterial(matManager.mCard); - driver->drawVertexPrimitiveList(matManager.vCardBack, 4, matManager.iRectangle, 2); - if(pcard->is_showequip) { - matManager.mTexture.setTexture(0, imageManager.tEquip); - driver->setMaterial(matManager.mTexture); - driver->drawVertexPrimitiveList(matManager.vSymbol, 4, matManager.iRectangle, 2); - } else if(pcard->is_showtarget) { - matManager.mTexture.setTexture(0, imageManager.tTarget); - driver->setMaterial(matManager.mTexture); - driver->drawVertexPrimitiveList(matManager.vSymbol, 4, matManager.iRectangle, 2); - } else if(pcard->is_disabled && (pcard->location & LOCATION_ONFIELD) && (pcard->position & POS_FACEUP)) { - matManager.mTexture.setTexture(0, imageManager.tNegated); - driver->setMaterial(matManager.mTexture); - driver->drawVertexPrimitiveList(matManager.vNegate, 4, matManager.iRectangle, 2); + auto m22 = pcard->mTransform(2, 2); + if(m22 > -0.99 || pcard->is_moving) { + auto code = pcard->code; + if (code == 0 && pcard->is_moving) + code = pcard->chain_code; + matManager.mCard.setTexture(0, imageManager.GetTexture(code)); + driver->setMaterial(matManager.mCard); + driver->drawVertexPrimitiveList(matManager.vCardFront, 4, matManager.iRectangle, 2); + } + if(m22 < 0.99 || pcard->is_moving) { + matManager.mCard.setTexture(0, imageManager.tCover[pcard->controler]); + driver->setMaterial(matManager.mCard); + driver->drawVertexPrimitiveList(matManager.vCardBack, 4, matManager.iRectangle, 2); } + if(pcard->is_moving) + return; if(pcard->is_selectable && (pcard->location & 0xe)) { float cv[4] = {1.0f, 1.0f, 0.0f, 1.0f}; if((pcard->location == LOCATION_HAND && pcard->code) || ((pcard->location & 0xc) && (pcard->position & POS_FACEUP))) @@ -231,59 +384,105 @@ void Game::DrawCard(ClientCard* pcard) { else DrawSelectionLine(matManager.vCardOutliner, true, 2, cv); } + irr::core::matrix4 im; + im.setTranslation(pcard->curPos); + driver->setTransform(irr::video::ETS_WORLD, im); + if(pcard->is_showequip) { + matManager.mTexture.setTexture(0, imageManager.tEquip); + driver->setMaterial(matManager.mTexture); + driver->drawVertexPrimitiveList(matManager.vSymbol, 4, matManager.iRectangle, 2); + } else if(pcard->is_showtarget) { + matManager.mTexture.setTexture(0, imageManager.tTarget); + driver->setMaterial(matManager.mTexture); + driver->drawVertexPrimitiveList(matManager.vSymbol, 4, matManager.iRectangle, 2); + } else if(pcard->is_showchaintarget) { + matManager.mTexture.setTexture(0, imageManager.tChainTarget); + driver->setMaterial(matManager.mTexture); + driver->drawVertexPrimitiveList(matManager.vSymbol, 4, matManager.iRectangle, 2); + } else if((pcard->status & (STATUS_DISABLED | STATUS_FORBIDDEN)) + && (pcard->location & LOCATION_ONFIELD) && (pcard->position & POS_FACEUP)) { + matManager.mTexture.setTexture(0, imageManager.tNegated); + driver->setMaterial(matManager.mTexture); + driver->drawVertexPrimitiveList(matManager.vNegate, 4, matManager.iRectangle, 2); + } if(pcard->cmdFlag & COMMAND_ATTACK) { matManager.mTexture.setTexture(0, imageManager.tAttack); driver->setMaterial(matManager.mTexture); irr::core::matrix4 atk; - atk.setTranslation(pcard->curPos + vector3df(0, -atkdy / 4.0f - 0.35f, 0.05f)); + atk.setTranslation(pcard->curPos + irr::core::vector3df(0, (pcard->controler == 0 ? -1 : 1) * (atkdy / 4.0f + 0.35f), 0.05f)); + atk.setRotationRadians(irr::core::vector3df(0, 0, pcard->controler == 0 ? 0 : 3.1415926f)); driver->setTransform(irr::video::ETS_WORLD, atk); driver->drawVertexPrimitiveList(matManager.vSymbol, 4, matManager.iRectangle, 2); } } +template +void Game::DrawShadowText(irr::gui::CGUITTFont* font, const T& text, const irr::core::rect& position, const irr::core::rect& padding, + irr::video::SColor color, irr::video::SColor shadowcolor, bool hcenter, bool vcenter, const irr::core::rect* clip) { + irr::core::rect shadowposition = irr::core::recti(position.UpperLeftCorner.X - padding.UpperLeftCorner.X, position.UpperLeftCorner.Y - padding.UpperLeftCorner.Y, + position.LowerRightCorner.X - padding.LowerRightCorner.X, position.LowerRightCorner.Y - padding.LowerRightCorner.Y); + font->drawUstring(text, shadowposition, shadowcolor, hcenter, vcenter, clip); + font->drawUstring(text, position, color, hcenter, vcenter, clip); +} void Game::DrawMisc() { static irr::core::vector3df act_rot(0, 0, 0); - irr::core::matrix4 im, ic, it; + int rule = (dInfo.duel_rule >= 4) ? 1 : 0; + irr::core::matrix4 im, ic, it, ig; act_rot.Z += 0.02f; im.setRotationRadians(act_rot); matManager.mTexture.setTexture(0, imageManager.tAct); driver->setMaterial(matManager.mTexture); - if(dField.deck_act) { - im.setTranslation(vector3df(matManager.vFields[0].Pos.X - (matManager.vFields[0].Pos.X - matManager.vFields[1].Pos.X)/2, - matManager.vFields[0].Pos.Y - (matManager.vFields[0].Pos.Y - matManager.vFields[3].Pos.Y)/2, dField.deck[0].size() * 0.01f + 0.02f)); - driver->setTransform(irr::video::ETS_WORLD, im); - driver->drawVertexPrimitiveList(matManager.vActivate, 4, matManager.iRectangle, 2); - } - if(dField.grave_act) { - im.setTranslation(vector3df(matManager.vFields[4].Pos.X - (matManager.vFields[4].Pos.X - matManager.vFields[5].Pos.X)/2, - matManager.vFields[4].Pos.Y - (matManager.vFields[4].Pos.Y - matManager.vFields[6].Pos.Y)/2, dField.grave[0].size() * 0.01f + 0.02f)); - driver->setTransform(irr::video::ETS_WORLD, im); - driver->drawVertexPrimitiveList(matManager.vActivate, 4, matManager.iRectangle, 2); - } - if(dField.remove_act) { - im.setTranslation(vector3df(matManager.vFields[12].Pos.X - (matManager.vFields[12].Pos.X - matManager.vFields[13].Pos.X)/2, - matManager.vFields[12].Pos.Y - (matManager.vFields[12].Pos.Y - matManager.vFields[14].Pos.Y)/2, dField.remove[0].size() * 0.01f + 0.02f)); - driver->setTransform(irr::video::ETS_WORLD, im); - driver->drawVertexPrimitiveList(matManager.vActivate, 4, matManager.iRectangle, 2); - } - if(dField.extra_act) { - im.setTranslation(vector3df(matManager.vFields[8].Pos.X - (matManager.vFields[8].Pos.X - matManager.vFields[9].Pos.X)/2, - matManager.vFields[8].Pos.Y - (matManager.vFields[8].Pos.Y - matManager.vFields[10].Pos.Y)/2, dField.extra[0].size() * 0.01f + 0.02f)); - driver->setTransform(irr::video::ETS_WORLD, im); - driver->drawVertexPrimitiveList(matManager.vActivate, 4, matManager.iRectangle, 2); - } - if(dField.pzone_act[0]) { - im.setTranslation(vector3df(matManager.vFields[60].Pos.X - (matManager.vFields[60].Pos.X - matManager.vFields[61].Pos.X)/2, - matManager.vFields[60].Pos.Y - (matManager.vFields[60].Pos.Y - matManager.vFields[62].Pos.Y)/2, 0.03f)); - driver->setTransform(irr::video::ETS_WORLD, im); - driver->drawVertexPrimitiveList(matManager.vActivate, 4, matManager.iRectangle, 2); + for(int player = 0; player < 2; ++player) { + if(dField.deck_act[player]) { + im.setTranslation(irr::core::vector3df((matManager.vFieldDeck[player][0].Pos.X + matManager.vFieldDeck[player][1].Pos.X) / 2, + (matManager.vFieldDeck[player][0].Pos.Y + matManager.vFieldDeck[player][2].Pos.Y) / 2, dField.deck[player].size() * 0.01f + 0.02f)); + driver->setTransform(irr::video::ETS_WORLD, im); + driver->drawVertexPrimitiveList(matManager.vActivate, 4, matManager.iRectangle, 2); + } + if(dField.grave_act[player]) { + im.setTranslation(irr::core::vector3df((matManager.vFieldGrave[player][rule][0].Pos.X + matManager.vFieldGrave[player][rule][1].Pos.X) / 2, + (matManager.vFieldGrave[player][rule][0].Pos.Y + matManager.vFieldGrave[player][rule][2].Pos.Y) / 2, dField.grave[player].size() * 0.01f + 0.02f)); + driver->setTransform(irr::video::ETS_WORLD, im); + driver->drawVertexPrimitiveList(matManager.vActivate, 4, matManager.iRectangle, 2); + } + if(dField.remove_act[player]) { + im.setTranslation(irr::core::vector3df((matManager.vFieldRemove[player][rule][0].Pos.X + matManager.vFieldRemove[player][rule][1].Pos.X) / 2, + (matManager.vFieldRemove[player][rule][0].Pos.Y + matManager.vFieldRemove[player][rule][2].Pos.Y) / 2, dField.remove[player].size() * 0.01f + 0.02f)); + driver->setTransform(irr::video::ETS_WORLD, im); + driver->drawVertexPrimitiveList(matManager.vActivate, 4, matManager.iRectangle, 2); + } + if(dField.extra_act[player]) { + im.setTranslation(irr::core::vector3df((matManager.vFieldExtra[player][0].Pos.X + matManager.vFieldExtra[player][1].Pos.X) / 2, + (matManager.vFieldExtra[player][0].Pos.Y + matManager.vFieldExtra[player][2].Pos.Y) / 2, dField.extra[player].size() * 0.01f + 0.02f)); + driver->setTransform(irr::video::ETS_WORLD, im); + driver->drawVertexPrimitiveList(matManager.vActivate, 4, matManager.iRectangle, 2); + } + if(dField.pzone_act[player]) { + int seq = dInfo.duel_rule >= 4 ? 0 : 6; + im.setTranslation(irr::core::vector3df((matManager.vFieldSzone[player][seq][rule][0].Pos.X + matManager.vFieldSzone[player][seq][rule][1].Pos.X) / 2, + (matManager.vFieldSzone[player][seq][rule][0].Pos.Y + matManager.vFieldSzone[player][seq][rule][2].Pos.Y) / 2, 0.03f)); + driver->setTransform(irr::video::ETS_WORLD, im); + driver->drawVertexPrimitiveList(matManager.vActivate, 4, matManager.iRectangle, 2); + } } - if(dField.pzone_act[1]) { - im.setTranslation(vector3df(matManager.vFields[128].Pos.X - (matManager.vFields[128].Pos.X - matManager.vFields[129].Pos.X)/2, - matManager.vFields[128].Pos.Y - (matManager.vFields[128].Pos.Y - matManager.vFields[130].Pos.Y)/2, 0.03f)); + if(dField.conti_act) { + irr::core::vector3df pos = irr::core::vector3df((matManager.vFieldContiAct[0].X + matManager.vFieldContiAct[1].X) / 2, + (matManager.vFieldContiAct[0].Y + matManager.vFieldContiAct[2].Y) / 2, 0); + im.setRotationRadians(irr::core::vector3df(0, 0, 0)); + for(auto cit = dField.conti_cards.begin(); cit != dField.conti_cards.end(); ++cit) { + im.setTranslation(pos); + driver->setTransform(irr::video::ETS_WORLD, im); + matManager.mCard.setTexture(0, imageManager.GetTexture((*cit)->code)); + driver->setMaterial(matManager.mCard); + driver->drawVertexPrimitiveList(matManager.vCardFront, 4, matManager.iRectangle, 2); + pos.Z += 0.03f; + } + im.setTranslation(pos); + im.setRotationRadians(act_rot); driver->setTransform(irr::video::ETS_WORLD, im); + driver->setMaterial(matManager.mTexture); driver->drawVertexPrimitiveList(matManager.vActivate, 4, matManager.iRectangle, 2); } - if(dField.chains.size() > 1) { + if(dField.chains.size() > 1 || mainGame->gameConf.draw_single_chain) { for(size_t i = 0; i < dField.chains.size(); ++i) { if(dField.chains[i].solved) break; @@ -297,176 +496,235 @@ void Game::DrawMisc() { it.setScale(0.6f); it.setTranslation(dField.chains[i].chain_pos); matManager.mTRTexture.setTexture(0, imageManager.tNumber); - matManager.vChainNum[0].TCoords = vector2df(0.19375f * (i % 5), 0.2421875f * (i / 5)); - matManager.vChainNum[1].TCoords = vector2df(0.19375f * (i % 5 + 1), 0.2421875f * (i / 5)); - matManager.vChainNum[2].TCoords = vector2df(0.19375f * (i % 5), 0.2421875f * (i / 5 + 1)); - matManager.vChainNum[3].TCoords = vector2df(0.19375f * (i % 5 + 1), 0.2421875f * (i / 5 + 1)); + matManager.vChainNum[0].TCoords = irr::core::vector2df(0.19375f * (i % 5), 0.2421875f * (i / 5)); + matManager.vChainNum[1].TCoords = irr::core::vector2df(0.19375f * (i % 5 + 1), 0.2421875f * (i / 5)); + matManager.vChainNum[2].TCoords = irr::core::vector2df(0.19375f * (i % 5), 0.2421875f * (i / 5 + 1)); + matManager.vChainNum[3].TCoords = irr::core::vector2df(0.19375f * (i % 5 + 1), 0.2421875f * (i / 5 + 1)); driver->setMaterial(matManager.mTRTexture); driver->setTransform(irr::video::ETS_WORLD, it); driver->drawVertexPrimitiveList(matManager.vChainNum, 4, matManager.iRectangle, 2); } } + if(dField.cant_check_grave) { + matManager.mTexture.setTexture(0, imageManager.tNegated); + driver->setMaterial(matManager.mTexture); + ig.setTranslation(irr::core::vector3df((matManager.vFieldGrave[0][rule][0].Pos.X + matManager.vFieldGrave[0][rule][1].Pos.X) / 2, + (matManager.vFieldGrave[0][rule][0].Pos.Y + matManager.vFieldGrave[0][rule][2].Pos.Y) / 2, dField.grave[0].size() * 0.01f + 0.02f)); + driver->setTransform(irr::video::ETS_WORLD, ig); + driver->drawVertexPrimitiveList(matManager.vNegate, 4, matManager.iRectangle, 2); + ig.setTranslation(irr::core::vector3df((matManager.vFieldGrave[1][rule][0].Pos.X + matManager.vFieldGrave[1][rule][1].Pos.X) / 2, + (matManager.vFieldGrave[1][rule][0].Pos.Y + matManager.vFieldGrave[1][rule][2].Pos.Y) / 2, dField.grave[1].size() * 0.01f + 0.02f)); + driver->setTransform(irr::video::ETS_WORLD, ig); + driver->drawVertexPrimitiveList(matManager.vNegate, 4, matManager.iRectangle, 2); + } + //finish button + if(btnCancelOrFinish->isVisible() && dField.select_ready) + DrawSelectionLine(btnCancelOrFinish, 2, 0xffffff00); + if(btnLeaveGame->isVisible() && dField.tag_teammate_surrender) + DrawSelectionLine(btnLeaveGame, 2, 0xffffff00); //lp bar if((dInfo.turn % 2 && dInfo.isFirst) || (!(dInfo.turn % 2) && !dInfo.isFirst)) { - driver->draw2DRectangle(0xa0000000, recti(327, 8, 630, 51)); - driver->draw2DRectangleOutline(recti(327, 8, 630, 51), 0xffff8080); + driver->draw2DRectangle(0xa0000000, Resize(327, 8, 630, 51)); + driver->draw2DRectangleOutline(Resize(327, 8, 630, 51), 0xffff8080); } else { - driver->draw2DRectangle(0xa0000000, recti(689, 8, 991, 51)); - driver->draw2DRectangleOutline(recti(689, 8, 991, 51), 0xffff8080); - } - driver->draw2DImage(imageManager.tLPFrame, recti(330, 10, 629, 30), recti(0, 0, 200, 20), 0, 0, true); - driver->draw2DImage(imageManager.tLPFrame, recti(691, 10, 990, 30), recti(0, 0, 200, 20), 0, 0, true); - if(dInfo.lp[0] >= 8000) - driver->draw2DImage(imageManager.tLPBar, recti(335, 12, 625, 28), recti(0, 0, 16, 16), 0, 0, true); - else driver->draw2DImage(imageManager.tLPBar, recti(335, 12, 335 + 290 * dInfo.lp[0] / 8000, 28), recti(0, 0, 16, 16), 0, 0, true); - if(dInfo.lp[1] >= 8000) - driver->draw2DImage(imageManager.tLPBar, recti(696, 12, 986, 28), recti(0, 0, 16, 16), 0, 0, true); - else driver->draw2DImage(imageManager.tLPBar, recti(986 - 290 * dInfo.lp[1] / 8000, 12, 986, 28), recti(0, 0, 16, 16), 0, 0, true); + driver->draw2DRectangle(0xa0000000, Resize(689, 8, 991, 51)); + driver->draw2DRectangleOutline(Resize(689, 8, 991, 51), 0xffff8080); + } + driver->draw2DImage(imageManager.tLPFrame, Resize(330, 10, 629, 30), irr::core::recti(0, 0, 200, 20), 0, 0, true); + driver->draw2DImage(imageManager.tLPFrame, Resize(691, 10, 990, 30), irr::core::recti(0, 0, 200, 20), 0, 0, true); + if(dInfo.start_lp) { + auto maxLP = dInfo.isTag ? dInfo.start_lp / 2 : dInfo.start_lp; + if(dInfo.lp[0] >= maxLP) { + auto layerCount = dInfo.lp[0] / maxLP; + auto partialLP = dInfo.lp[0] % maxLP; + auto bgColorPos = (layerCount - 1) % 5; + auto fgColorPos = layerCount % 5; + driver->draw2DImage(imageManager.tLPBar, Resize(335 + 290 * partialLP / maxLP, 12, 625, 28), irr::core::recti(0, bgColorPos * 16, 16, (bgColorPos + 1) * 16), 0, 0, true); + if(partialLP > 0) { + driver->draw2DImage(imageManager.tLPBar, Resize(335, 12, 335 + 290 * partialLP / maxLP, 28), irr::core::recti(0, fgColorPos * 16, 16, (fgColorPos + 1) * 16), 0, 0, true); + } + } + else driver->draw2DImage(imageManager.tLPBar, Resize(335, 12, 335 + 290 * dInfo.lp[0] / maxLP, 28), irr::core::recti(0, 0, 16, 16), 0, 0, true); + if(dInfo.lp[1] >= maxLP) { + auto layerCount = dInfo.lp[1] / maxLP; + auto partialLP = dInfo.lp[1] % maxLP; + auto bgColorPos = (layerCount - 1) % 5; + auto fgColorPos = layerCount % 5; + driver->draw2DImage(imageManager.tLPBar, Resize(696, 12, 986 - 290 * partialLP / maxLP, 28), irr::core::recti(0, bgColorPos * 16, 16, (bgColorPos + 1) * 16), 0, 0, true); + if(partialLP > 0) { + driver->draw2DImage(imageManager.tLPBar, Resize(986 - 290 * partialLP / maxLP, 12, 986, 28), irr::core::recti(0, fgColorPos * 16, 16, (fgColorPos + 1) * 16), 0, 0, true); + } + } + else driver->draw2DImage(imageManager.tLPBar, Resize(986 - 290 * dInfo.lp[1] / maxLP, 12, 986, 28), irr::core::recti(0, 0, 16, 16), 0, 0, true); + } if(lpframe) { dInfo.lp[lpplayer] -= lpd; myswprintf(dInfo.strLP[lpplayer], L"%d", dInfo.lp[lpplayer]); lpccolor -= 0x19000000; lpframe--; } - if(lpcstring) { + if(lpcstring.size()) { if(lpplayer == 0) { - lpcFont->draw(lpcstring, recti(400, 470, 920, 520), lpccolor | 0x00ffffff, true, false, 0); - lpcFont->draw(lpcstring, recti(400, 472, 922, 520), lpccolor, true, false, 0); + DrawShadowText(lpcFont, lpcstring, Resize(400, 472, 922, 520), Resize(0, 2, 2, 0), lpccolor, lpccolor | 0x00ffffff, true, false, 0); } else { - lpcFont->draw(lpcstring, recti(400, 160, 920, 210), lpccolor | 0x00ffffff, true, false, 0); - lpcFont->draw(lpcstring, recti(400, 162, 922, 210), lpccolor, true, false, 0); + DrawShadowText(lpcFont, lpcstring, Resize(400, 162, 922, 210), Resize(0, 2, 2, 0), lpccolor, lpccolor | 0x00ffffff, true, false, 0); } } if(!dInfo.isReplay && dInfo.player_type < 7 && dInfo.time_limit) { - driver->draw2DRectangle(recti(525, 34, 525 + dInfo.time_left[0] * 100 / dInfo.time_limit, 44), 0xa0e0e0e0, 0xa0e0e0e0, 0xa0c0c0c0, 0xa0c0c0c0); - driver->draw2DRectangleOutline(recti(525, 34, 625, 44), 0xffffffff); - driver->draw2DRectangle(recti(795 - dInfo.time_left[1] * 100 / dInfo.time_limit, 34, 795, 44), 0xa0e0e0e0, 0xa0e0e0e0, 0xa0c0c0c0, 0xa0c0c0c0); - driver->draw2DRectangleOutline(recti(695, 34, 795, 44), 0xffffffff); - } - numFont->draw(dInfo.strLP[0], recti(330, 11, 629, 30), 0xff000000, true, false, 0); - numFont->draw(dInfo.strLP[0], recti(330, 12, 631, 30), 0xffffff00, true, false, 0); - numFont->draw(dInfo.strLP[1], recti(691, 11, 990, 30), 0xff000000, true, false, 0); - numFont->draw(dInfo.strLP[1], recti(691, 12, 992, 30), 0xffffff00, true, false, 0); + driver->draw2DRectangle(Resize(525, 34, 525 + dInfo.time_left[0] * 100 / dInfo.time_limit, 44), 0xa0e0e0e0, 0xa0e0e0e0, 0xa0c0c0c0, 0xa0c0c0c0); + driver->draw2DRectangleOutline(Resize(525, 34, 625, 44), 0xffffffff); + driver->draw2DRectangle(Resize(795 - dInfo.time_left[1] * 100 / dInfo.time_limit, 34, 795, 44), 0xa0e0e0e0, 0xa0e0e0e0, 0xa0c0c0c0, 0xa0c0c0c0); + driver->draw2DRectangleOutline(Resize(695, 34, 795, 44), 0xffffffff); + } + DrawShadowText(numFont, dInfo.strLP[0], Resize(330, 12, 631, 30), Resize(0, 1, 2, 0), 0xffffff00, 0xff000000, true, false, 0); + DrawShadowText(numFont, dInfo.strLP[1], Resize(691, 12, 992, 30), Resize(0, 1, 2, 0), 0xffffff00, 0xff000000, true, false, 0); - if(!dInfo.isTag || !dInfo.tag_player[0]) - textFont->draw(dInfo.hostname, recti(335, 31, 629, 50), 0xffffffff, false, false, 0); - else - textFont->draw(dInfo.hostname_tag, recti(335, 31, 629, 50), 0xffffffff, false, false, 0); - if(!dInfo.isTag || !dInfo.tag_player[1]) { - auto cld = textFont->getDimension(dInfo.clientname); - textFont->draw(dInfo.clientname, recti(986 - cld.Width, 31, 986, 50), 0xffffffff, false, false, 0); - } else { - auto cld = textFont->getDimension(dInfo.clientname_tag); - textFont->draw(dInfo.clientname_tag, recti(986 - cld.Width, 31, 986, 50), 0xffffffff, false, false, 0); + if(!gameConf.hide_player_name) { + irr::core::recti p1size = Resize(335, 31, 629, 50); + irr::core::recti p2size = Resize(986, 31, 986, 50); + if(!dInfo.isTag || !dInfo.tag_player[0]) + textFont->drawUstring(dInfo.hostname, p1size, 0xffffffff, false, false, 0); + else + textFont->drawUstring(dInfo.hostname_tag, p1size, 0xffffffff, false, false, 0); + if(!dInfo.isTag || !dInfo.tag_player[1]) { + auto cld = textFont->getDimension(dInfo.clientname); + p2size.UpperLeftCorner.X -= cld.Width; + textFont->drawUstring(dInfo.clientname, p2size, 0xffffffff, false, false, 0); + } else { + auto cld = textFont->getDimension(dInfo.clientname_tag); + p2size.UpperLeftCorner.X -= cld.Width; + textFont->drawUstring(dInfo.clientname_tag, p2size, 0xffffffff, false, false, 0); + } } - driver->draw2DRectangle(recti(632, 10, 688, 30), 0x00000000, 0x00000000, 0xffffffff, 0xffffffff); - driver->draw2DRectangle(recti(632, 30, 688, 50), 0xffffffff, 0xffffffff, 0x00000000, 0x00000000); - lpcFont->draw(dataManager.GetNumString(dInfo.turn), recti(635, 5, 685, 40), 0x80000000, true, false, 0); - lpcFont->draw(dataManager.GetNumString(dInfo.turn), recti(635, 5, 687, 40), 0x8000ffff, true, false, 0); + driver->draw2DRectangle(Resize(632, 10, 688, 30), 0x00000000, 0x00000000, 0xffffffff, 0xffffffff); + driver->draw2DRectangle(Resize(632, 30, 688, 50), 0xffffffff, 0xffffffff, 0x00000000, 0x00000000); + DrawShadowText(lpcFont, dataManager.GetNumString(dInfo.turn), Resize(635, 5, 687, 40), Resize(0, 0, 2, 0), 0x8000ffff, 0x80000000, true, false, 0); ClientCard* pcard; for(int i = 0; i < 5; ++i) { pcard = dField.mzone[0][i]; - if(pcard && pcard->code != 0) { - int m = 493 + i * 85; - adFont->draw(L"/", recti(m - 4, 416, m + 4, 436), 0xff000000, true, false, 0); - adFont->draw(L"/", recti(m - 3, 417, m + 5, 437), 0xffffffff, true, false, 0); - int w = adFont->getDimension(pcard->atkstring).Width; - adFont->draw(pcard->atkstring, recti(m - 5 - w, 416, m - 5, 436), 0xff000000, false, false, 0); - adFont->draw(pcard->atkstring, recti(m - 4 - w, 417, m - 4, 437), - pcard->attack > pcard->base_attack ? 0xffffff00 : pcard->attack < pcard->base_attack ? 0xffff2090 : 0xffffffff , false, false, 0); - w = adFont->getDimension(pcard->defstring).Width; - adFont->draw(pcard->defstring, recti(m + 4, 416, m + 4 + w, 436), 0xff000000, false, false, 0); - adFont->draw(pcard->defstring, recti(m + 5, 417, m + 5 + w, 437), - pcard->defence > pcard->base_defence ? 0xffffff00 : pcard->defence < pcard->base_defence ? 0xffff2090 : 0xffffffff , false, false, 0); - adFont->draw(pcard->lvstring, recti(473 + i * 80, 356, 475 + i * 80, 366), 0xff000000, false, false, 0); - adFont->draw(pcard->lvstring, recti(474 + i * 80, 357, 476 + i * 80, 367), - (pcard->type & TYPE_XYZ) ? 0xffff80ff : (pcard->type & TYPE_TUNER) ? 0xffffff00 : 0xffffffff, false, false, 0); - } + if(pcard && pcard->code != 0) + DrawStatus(pcard, 493 + i * 85, 416, 473 + i * 80, 356); } + pcard = dField.mzone[0][5]; + if(pcard && pcard->code != 0) + DrawStatus(pcard, 589, 338, 563, 291); + pcard = dField.mzone[0][6]; + if(pcard && pcard->code != 0) + DrawStatus(pcard, 743, 338, 712, 291); for(int i = 0; i < 5; ++i) { pcard = dField.mzone[1][i]; - if(pcard && (pcard->position & POS_FACEUP)) { - int m = 803 - i * 68; - adFont->draw(L"/", recti(m - 4, 235, m + 4, 255), 0xff000000, true, false, 0); - adFont->draw(L"/", recti(m - 3, 236, m + 5, 256), 0xffffffff, true, false, 0); - int w = adFont->getDimension(pcard->atkstring).Width; - adFont->draw(pcard->atkstring, recti(m - 5 - w, 235, m - 5, 255), 0xff000000, false, false, 0); - adFont->draw(pcard->atkstring, recti(m - 4 - w, 236, m - 4, 256), - pcard->attack > pcard->base_attack ? 0xffffff00 : pcard->attack < pcard->base_attack ? 0xffff2090 : 0xffffffff , false, false, 0); - w = adFont->getDimension(pcard->defstring).Width; - adFont->draw(pcard->defstring, recti(m + 4, 235, m + 4 + w, 255), 0xff000000, false, false, 0); - adFont->draw(pcard->defstring, recti(m + 5, 236, m + 5 + w, 256), - pcard->defence > pcard->base_defence ? 0xffffff00 : pcard->defence < pcard->base_defence ? 0xffff2090 : 0xffffffff , false, false, 0); - adFont->draw(pcard->lvstring, recti(779 - i * 71, 272, 800 - i * 71, 292), 0xff000000, false, false, 0); - adFont->draw(pcard->lvstring, recti(780 - i * 71, 273, 800 - i * 71, 293), - (pcard->type & TYPE_XYZ) ? 0xffff80ff : (pcard->type & TYPE_TUNER) ? 0xffffff00 : 0xffffffff, false, false, 0); - } - } - pcard = dField.szone[0][6]; - if(pcard) { - adFont->draw(pcard->lscstring, recti(426, 394, 438, 414), 0xff000000, true, false, 0); - adFont->draw(pcard->lscstring, recti(427, 395, 439, 415), 0xffffffff, true, false, 0); - } - pcard = dField.szone[0][7]; - if(pcard) { - adFont->draw(pcard->rscstring, recti(880, 394, 912, 414), 0xff000000, true, false, 0); - adFont->draw(pcard->rscstring, recti(881, 395, 913, 415), 0xffffffff, true, false, 0); - } - pcard = dField.szone[1][6]; - if(pcard) { - adFont->draw(pcard->lscstring, recti(839, 245, 871, 265), 0xff000000, true, false, 0); - adFont->draw(pcard->lscstring, recti(840, 246, 872, 266), 0xffffffff, true, false, 0); - } - pcard = dField.szone[1][7]; - if(pcard) { - adFont->draw(pcard->rscstring, recti(463, 245, 495, 265), 0xff000000, true, false, 0); - adFont->draw(pcard->rscstring, recti(464, 246, 496, 266), 0xffffffff, true, false, 0); + if(pcard && (pcard->position & POS_FACEUP)) + DrawStatus(pcard, 803 - i * 68, 235, 779 - i * 71, 272); + } + pcard = dField.mzone[1][5]; + if(pcard && (pcard->position & POS_FACEUP)) + DrawStatus(pcard, 739, 291, 710, 338); + pcard = dField.mzone[1][6]; + if(pcard && (pcard->position & POS_FACEUP)) + DrawStatus(pcard, 593, 291, 555, 338); + if(dInfo.duel_rule < 4) { + pcard = dField.szone[0][6]; + if(pcard) { + DrawShadowText(adFont, pcard->lscstring, Resize(427, 395, 439, 415), Resize(1, 1, 1, 1), 0xffffffff, 0xff000000, true, false, 0); + } + pcard = dField.szone[0][7]; + if(pcard) { + DrawShadowText(adFont, pcard->rscstring, Resize(881, 395, 913, 415), Resize(1, 1, 1, 1), 0xffffffff, 0xff000000, true, false, 0); + } + pcard = dField.szone[1][6]; + if(pcard) { + DrawShadowText(adFont, pcard->lscstring, Resize(840, 246, 872, 266), Resize(1, 1, 1, 1), 0xffffffff, 0xff000000, true, false, 0); + } + pcard = dField.szone[1][7]; + if(pcard) { + DrawShadowText(adFont, pcard->rscstring, Resize(464, 246, 496, 266), Resize(1, 1, 1, 1), 0xffffffff, 0xff000000, true, false, 0); + } + } else { + pcard = dField.szone[0][0]; + if(pcard && (pcard->type & TYPE_PENDULUM) && !pcard->equipTarget) { + DrawShadowText(adFont, pcard->lscstring, Resize(455, 431, 467, 451), Resize(1, 1, 1, 1), 0xffffffff, 0xff000000, true, false, 0); + } + pcard = dField.szone[0][4]; + if(pcard && (pcard->type & TYPE_PENDULUM) && !pcard->equipTarget) { + DrawShadowText(adFont, pcard->rscstring, Resize(851, 431, 883, 451), Resize(1, 1, 1, 1), 0xffffffff, 0xff000000, true, false, 0); + } + pcard = dField.szone[1][0]; + if(pcard && (pcard->type & TYPE_PENDULUM) && !pcard->equipTarget) { + DrawShadowText(adFont, pcard->lscstring, Resize(807, 223, 839, 243), Resize(1, 1, 1, 1), 0xffffffff, 0xff000000, true, false, 0); + } + pcard = dField.szone[1][4]; + if(pcard && (pcard->type & TYPE_PENDULUM) && !pcard->equipTarget) { + DrawShadowText(adFont, pcard->rscstring, Resize(499, 223, 531, 243), Resize(1, 1, 1, 1), 0xffffffff, 0xff000000, true, false, 0); + } } if(dField.extra[0].size()) { - int offset = (dField.extra[0].size() >= 10) ? 0 : mainGame->textFont->getDimension(dataManager.GetNumString(1)).Width; - numFont->draw(dataManager.GetNumString(dField.extra[0].size()), recti(320 + offset, 562, 371, 552), 0xff000000, true, false, 0); - numFont->draw(dataManager.GetNumString(dField.extra[0].size()), recti(320 + offset, 563, 373, 553), 0xffffff00, true, false, 0); - numFont->draw(dataManager.GetNumString(dField.extra_p_count[0], true), recti(340, 562, 391, 552), 0xff000000, true, false, 0); - numFont->draw(dataManager.GetNumString(dField.extra_p_count[0], true), recti(340, 563, 393, 553), 0xffffff00, true, false, 0); + int offset = (dField.extra[0].size() >= 10) ? 0 : numFont->getDimension(dataManager.GetNumString(1)).Width; + DrawShadowText(numFont, dataManager.GetNumString(dField.extra[0].size()), Resize(320, 563, 373, 553, offset, 0, 0, 0), Resize(0, 1, 2, 1), 0xffffff00, 0xff000000, true, false, 0); + DrawShadowText(numFont, dataManager.GetNumString(dField.extra_p_count[0], true), Resize(340, 563, 393, 553), Resize(0, 1, 2, 1), 0xffffff00, 0xff000000, true, false, 0); } if(dField.deck[0].size()) { - numFont->draw(dataManager.GetNumString(dField.deck[0].size()), recti(907, 562, 1021, 552), 0xff000000, true, false, 0); - numFont->draw(dataManager.GetNumString(dField.deck[0].size()), recti(908, 563, 1023, 553), 0xffffff00, true, false, 0); - } - if(dField.grave[0].size()) { - numFont->draw(dataManager.GetNumString(dField.grave[0].size()), recti(837, 375, 984, 456), 0xff000000, true, false, 0); - numFont->draw(dataManager.GetNumString(dField.grave[0].size()), recti(837, 376, 986, 457), 0xffffff00, true, false, 0); + DrawShadowText(numFont, dataManager.GetNumString(dField.deck[0].size()), Resize(908, 563, 1023, 553), Resize(0, 1, 2, 1), 0xffffff00, 0xff000000, true, false, 0); } - if(dField.remove[0].size()) { - numFont->draw(dataManager.GetNumString(dField.remove[0].size()), recti(1015, 375, 957, 380), 0xff000000, true, false, 0); - numFont->draw(dataManager.GetNumString(dField.remove[0].size()), recti(1015, 376, 959, 381), 0xffffff00, true, false, 0); + if (rule == 0) { + if (dField.grave[0].size()) { + DrawShadowText(numFont, dataManager.GetNumString(dField.grave[0].size()), Resize(837, 376, 986, 381), Resize(0, 1, 2, 1), 0xffffff00, 0xff000000, true, false, 0); + } + if (dField.remove[0].size()) { + DrawShadowText(numFont, dataManager.GetNumString(dField.remove[0].size()), Resize(1015, 376, 959, 381), Resize(0, 1, 2, 1), 0xffffff00, 0xff000000, true, false, 0); + } + } else { + if (dField.grave[0].size()) { + DrawShadowText(numFont, dataManager.GetNumString(dField.grave[0].size()), Resize(870, 457, 1004, 462), Resize(0, 1, 2, 1), 0xffffff00, 0xff000000, true, false, 0); + } + if (dField.remove[0].size()) { + DrawShadowText(numFont, dataManager.GetNumString(dField.remove[0].size()), Resize(837, 376, 986, 381), Resize(0, 1, 2, 1), 0xffffff00, 0xff000000, true, false, 0); + } } if(dField.extra[1].size()) { - int offset = (dField.extra[1].size() >= 10) ? 0 : mainGame->textFont->getDimension(dataManager.GetNumString(1)).Width; - numFont->draw(dataManager.GetNumString(dField.extra[1].size()), recti(808 + offset, 207, 898, 232), 0xff000000, true, false, 0); - numFont->draw(dataManager.GetNumString(dField.extra[1].size()), recti(808 + offset, 208, 900, 233), 0xffffff00, true, false, 0); - numFont->draw(dataManager.GetNumString(dField.extra_p_count[1], true), recti(828, 207, 918, 232), 0xff000000, true, false, 0); - numFont->draw(dataManager.GetNumString(dField.extra_p_count[1], true), recti(828, 208, 920, 233), 0xffffff00, true, false, 0); + int offset = (dField.extra[1].size() >= 10) ? 0 : numFont->getDimension(dataManager.GetNumString(1)).Width; + DrawShadowText(numFont, dataManager.GetNumString(dField.extra[1].size()), Resize(808, 208, 900, 233, offset, 0, 0, 0), Resize(0, 1, 2, 1), 0xffffff00, 0xff000000, true, false, 0); + DrawShadowText(numFont, dataManager.GetNumString(dField.extra_p_count[1], true), Resize(828, 208, 920, 233), Resize(0, 1, 2, 1), 0xffffff00, 0xff000000, true, false, 0); } if(dField.deck[1].size()) { - numFont->draw(dataManager.GetNumString(dField.deck[1].size()), recti(465, 207, 481, 232), 0xff000000, true, false, 0); - numFont->draw(dataManager.GetNumString(dField.deck[1].size()), recti(465, 208, 483, 233), 0xffffff00, true, false, 0); + DrawShadowText(numFont, dataManager.GetNumString(dField.deck[1].size()), Resize(465, 208, 483, 233), Resize(0, 1, 2, 1), 0xffffff00, 0xff000000, true, false, 0); } - if(dField.grave[1].size()) { - numFont->draw(dataManager.GetNumString(dField.grave[1].size()), recti(420, 310, 462, 281), 0xff000000, true, false, 0); - numFont->draw(dataManager.GetNumString(dField.grave[1].size()), recti(420, 311, 464, 282), 0xffffff00, true, false, 0); + if (rule == 0) { + if (dField.grave[1].size()) { + DrawShadowText(numFont, dataManager.GetNumString(dField.grave[1].size()), Resize(420, 311, 464, 282), Resize(0, 1, 2, 1), 0xffffff00, 0xff000000, true, false, 0); + } + if (dField.remove[1].size()) { + DrawShadowText(numFont, dataManager.GetNumString(dField.remove[1].size()), Resize(300, 311, 445, 341), Resize(0, 1, 2, 1), 0xffffff00, 0xff000000, true, false, 0); + } + } else { + if (dField.grave[1].size()) { + DrawShadowText(numFont, dataManager.GetNumString(dField.grave[1].size()), Resize(455, 250, 464, 300), Resize(0, 1, 2, 1), 0xffffff00, 0xff000000, true, false, 0); + } + if (dField.remove[1].size()) { + DrawShadowText(numFont, dataManager.GetNumString(dField.remove[1].size()), Resize(420, 311, 464, 282), Resize(0, 1, 2, 1), 0xffffff00, 0xff000000, true, false, 0); + } } - if(dField.remove[1].size()) { - numFont->draw(dataManager.GetNumString(dField.remove[1].size()), recti(300, 310, 443, 340), 0xff000000, true, false, 0); - numFont->draw(dataManager.GetNumString(dField.remove[1].size()), recti(300, 311, 445, 341), 0xffffff00, true, false, 0); +} +void Game::DrawStatus(ClientCard* pcard, int x1, int y1, int x2, int y2) { + DrawShadowText(adFont, L"/", Resize(x1 - 3, y1 + 1, x1 + 5, y1 + 21), Resize(1, 1, 1, 1), 0xffffffff, 0xff000000, true, false, 0); + int w = adFont->getDimension(pcard->atkstring).Width; + DrawShadowText(adFont, pcard->atkstring, Resize(x1 - 4, y1 + 1, x1 - 4, y1 + 21, -w, 0, 0, 0), Resize(1, 1, 1, 1), + pcard->attack > pcard->base_attack ? 0xffffff00 : pcard->attack < pcard->base_attack ? 0xffff2090 : 0xffffffff, 0xff000000); + if(pcard->type & TYPE_LINK) { + w = adFont->getDimension(pcard->linkstring).Width; + DrawShadowText(adFont, pcard->linkstring, Resize(x1 + 5, y1 + 1, x1 + 5, y1 + 21, 0, 0, w, 0), Resize(1, 1, 1, 1), 0xff99ffff); + } else { + w = adFont->getDimension(pcard->defstring).Width; + DrawShadowText(adFont, pcard->defstring, Resize(x1 + 5, y1 + 1, x1 + 5, y1 + 21, 0, 0, w, 0), Resize(1, 1, 1, 1), + pcard->defense > pcard->base_defense ? 0xffffff00 : pcard->defense < pcard->base_defense ? 0xffff2090 : 0xffffffff); + DrawShadowText(adFont, pcard->lvstring, Resize(x2 + 1, y2, x2 + 3, y2 + 21), Resize(1, 1, 1, 1), + (pcard->type & TYPE_XYZ) ? 0xffff80ff : (pcard->type & TYPE_TUNER) ? 0xffffff00 : 0xffffffff); } } void Game::DrawGUI() { - if(imageLoading.size()) { - std::map::iterator mit; - for(mit = imageLoading.begin(); mit != imageLoading.end(); ++mit) - mit->first->setImage(imageManager.GetTexture(mit->second)); - imageLoading.clear(); + while (imageLoading.size()) { + auto mit = imageLoading.cbegin(); + mit->first->setImage(imageManager.GetTexture(mit->second)); + imageLoading.erase(mit); } for(auto fit = fadingList.begin(); fit != fadingList.end();) { auto fthis = fit++; @@ -548,31 +806,34 @@ void Game::DrawGUI() { env->drawAll(); } void Game::DrawSpec() { + irr::s32 midx = 574 + (CARD_IMG_WIDTH * 0.5); + irr::s32 midy = 150 + (CARD_IMG_HEIGHT * 0.5); if(showcard) { switch(showcard) { case 1: { - driver->draw2DImage(imageManager.GetTexture(showcardcode), position2di(574, 150)); - driver->draw2DImage(imageManager.tMask, recti(574, 150, 574 + (showcarddif > 177 ? 177 : showcarddif), 404), - recti(254 - showcarddif, 0, 254 - (showcarddif > 177 ? showcarddif - 177 : 0), 254), 0, 0, true); + driver->draw2DImage(imageManager.GetTexture(showcardcode, true), ResizeCardHint(574, 150)); + driver->draw2DImage(imageManager.tMask, ResizeCardMid(574, 150, 574 + (showcarddif > CARD_IMG_WIDTH ? CARD_IMG_WIDTH : showcarddif), 150 + CARD_IMG_HEIGHT, midx, midy), + irr::core::recti(CARD_IMG_HEIGHT - showcarddif, 0, CARD_IMG_HEIGHT - (showcarddif > CARD_IMG_WIDTH ? showcarddif - CARD_IMG_WIDTH : 0), CARD_IMG_HEIGHT), 0, 0, true); showcarddif += 15; - if(showcarddif >= 254) { + if(showcarddif >= CARD_IMG_HEIGHT) { showcard = 2; showcarddif = 0; } break; } case 2: { - driver->draw2DImage(imageManager.GetTexture(showcardcode), position2di(574, 150)); - driver->draw2DImage(imageManager.tMask, recti(574 + showcarddif, 150, 761, 404), recti(0, 0, 177 - showcarddif, 254), 0, 0, true); + driver->draw2DImage(imageManager.GetTexture(showcardcode, true), ResizeCardHint(574, 150)); + driver->draw2DImage(imageManager.tMask, ResizeCardMid(574 + showcarddif, 150, 574 + CARD_IMG_WIDTH, 150 + CARD_IMG_HEIGHT, midx, midy), + irr::core::recti(0, 0, CARD_IMG_WIDTH - showcarddif, CARD_IMG_HEIGHT), 0, 0, true); showcarddif += 15; - if(showcarddif >= 177) { + if(showcarddif >= CARD_IMG_WIDTH) { showcard = 0; } break; } case 3: { - driver->draw2DImage(imageManager.GetTexture(showcardcode), position2di(574, 150)); - driver->draw2DImage(imageManager.tNegated, recti(536 + showcarddif, 141 + showcarddif, 793 - showcarddif, 397 - showcarddif), recti(0, 0, 128, 128), 0, 0, true); + driver->draw2DImage(imageManager.GetTexture(showcardcode, true), ResizeCardHint(574, 150)); + driver->draw2DImage(imageManager.tNegated, ResizeCardMid(536 + showcarddif, 141 + showcarddif, 792 - showcarddif, 397 - showcarddif, midx, midy), irr::core::recti(0, 0, 128, 128), 0, 0, true); if(showcarddif < 64) showcarddif += 4; break; @@ -582,8 +843,8 @@ void Game::DrawSpec() { matManager.c2d[1] = (showcarddif << 24) | 0xffffff; matManager.c2d[2] = (showcarddif << 24) | 0xffffff; matManager.c2d[3] = (showcarddif << 24) | 0xffffff; - driver->draw2DImage(imageManager.GetTexture(showcardcode), recti(574, 154, 751, 404), - recti(0, 0, 177, 254), 0, matManager.c2d, true); + driver->draw2DImage(imageManager.GetTexture(showcardcode, true), ResizeCardHint(574, 150, 574 + CARD_IMG_WIDTH, 150 + CARD_IMG_HEIGHT), + ResizeFit(0, 0, CARD_IMG_WIDTH, CARD_IMG_HEIGHT), 0, matManager.c2d, true); if(showcarddif < 255) showcarddif += 17; break; @@ -593,28 +854,34 @@ void Game::DrawSpec() { matManager.c2d[1] = (showcarddif << 25) | 0xffffff; matManager.c2d[2] = (showcarddif << 25) | 0xffffff; matManager.c2d[3] = (showcarddif << 25) | 0xffffff; - driver->draw2DImage(imageManager.GetTexture(showcardcode), recti(662 - showcarddif * 0.69685f, 277 - showcarddif, 662 + showcarddif * 0.69685f, 277 + showcarddif), - recti(0, 0, 177, 254), 0, matManager.c2d, true); + driver->draw2DImage(imageManager.GetTexture(showcardcode, true), ResizeCardMid(662 - showcarddif * 0.69685f, 277 - showcarddif, 662 + showcarddif * 0.69685f, 277 + showcarddif, midx, midy), + ResizeFit(0, 0, CARD_IMG_WIDTH, CARD_IMG_HEIGHT), 0, matManager.c2d, true); if(showcarddif < 127) showcarddif += 9; break; } case 6: { - driver->draw2DImage(imageManager.GetTexture(showcardcode), position2di(574, 150)); - driver->draw2DImage(imageManager.tNumber, recti(536 + showcarddif, 141 + showcarddif, 793 - showcarddif, 397 - showcarddif), - recti((showcardp % 5) * 64, (showcardp / 5) * 64, (showcardp % 5 + 1) * 64, (showcardp / 5 + 1) * 64), 0, 0, true); + driver->draw2DImage(imageManager.GetTexture(showcardcode, true), ResizeCardHint(574, 150)); + driver->draw2DImage(imageManager.tNumber, ResizeCardMid(536 + showcarddif, 141 + showcarddif, 792 - showcarddif, 397 - showcarddif, midx, midy), + irr::core::recti((showcardp % 5) * 64, (showcardp / 5) * 64, (showcardp % 5 + 1) * 64, (showcardp / 5 + 1) * 64), 0, 0, true); if(showcarddif < 64) showcarddif += 4; break; } case 7: { - core::position2d corner[4]; - float y = sin(showcarddif * 3.1415926f / 180.0f) * 254; - corner[0] = core::position2d(574 - (254 - y) * 0.3f, 404 - y); - corner[1] = core::position2d(751 + (254 - y) * 0.3f, 404 - y); - corner[2] = core::position2d(574, 404); - corner[3] = core::position2d(751, 404); - irr::gui::Draw2DImageQuad(driver, imageManager.GetTexture(showcardcode), rect(0, 0, 177, 254), corner); + float mul = xScale; + if(xScale > yScale) + mul = yScale; + irr::core::vector2d corner[4]; + float y = sin(showcarddif * 3.1415926f / 180.0f) * CARD_IMG_HEIGHT * mul; + irr::s32 winx = midx * xScale + (574 - midx) * mul; + irr::s32 winx2 = midx * xScale + (751 - midx) * mul; + irr::s32 winy = midy * yScale + (404 - midy) * mul; + corner[0] = irr::core::vector2d(winx - (CARD_IMG_HEIGHT * mul - y) * 0.3f, winy - y); + corner[1] = irr::core::vector2d(winx2 + (CARD_IMG_HEIGHT * mul - y) * 0.3f, winy - y); + corner[2] = irr::core::vector2d(winx, winy); + corner[3] = irr::core::vector2d(winx2, winy); + irr::gui::Draw2DImageQuad(driver, imageManager.GetTexture(showcardcode, true), ResizeFit(0, 0, CARD_IMG_WIDTH, CARD_IMG_HEIGHT), corner); showcardp++; showcarddif += 9; if(showcarddif >= 90) @@ -627,8 +894,8 @@ void Game::DrawSpec() { } case 100: { if(showcardp < 60) { - driver->draw2DImage(imageManager.tHand[(showcardcode >> 16) & 0x3], position2di(615, showcarddif)); - driver->draw2DImage(imageManager.tHand[showcardcode & 0x3], position2di(615, 540 - showcarddif)); + driver->draw2DImage(imageManager.tHand[(showcardcode >> 16) & 0x3], irr::core::vector2di((615 + 44.5) * xScale - 44.5, (showcarddif + 64) * yScale - 64)); + driver->draw2DImage(imageManager.tHand[showcardcode & 0x3], irr::core::vector2di((615 + 44.5) * xScale - 44.5, (540 - showcarddif + 64) * yScale - 64)); float dy = -0.333333f * showcardp + 10; showcardp++; if(showcardp < 30) @@ -686,21 +953,19 @@ void Game::DrawSpec() { auto pos = lpcFont->getDimension(lstr); if(showcardp < 10) { int alpha = (showcardp * 25) << 24; - lpcFont->draw(lstr, recti(651 - pos.Width / 2 - (9 - showcardp) * 40, 291, 950, 370), alpha); - lpcFont->draw(lstr, recti(650 - pos.Width / 2 - (9 - showcardp) * 40, 290, 950, 370), alpha | 0xffffff); + DrawShadowText(lpcFont, lstr, ResizePhaseHint(660 - (9 - showcardp) * 40, 290, 960, 370, pos.Width), Resize(-1, -1, 0, 0), alpha | 0xffffff, alpha); } else if(showcardp < showcarddif) { - recti loc = recti(650 - pos.Width / 2, 290, 950, 370); - lpcFont->draw(lstr, recti(651 - pos.Width / 2, 291, 950, 370), 0xff000000); - lpcFont->draw(lstr, loc, 0xffffffff); - if(dInfo.vic_string && (showcardcode == 1 || showcardcode == 2)) { - driver->draw2DRectangle(0xa0000000, recti(540, 320, 800, 340)); - guiFont->draw(dInfo.vic_string, recti(502, 321, 840, 340), 0xff000000, true, true); - guiFont->draw(dInfo.vic_string, recti(500, 320, 840, 340), 0xffffffff, true, true); + DrawShadowText(lpcFont, lstr, ResizePhaseHint(660, 290, 960, 370, pos.Width), Resize(-1, -1, 0, 0), 0xffffffff); + if(dInfo.vic_string.size() && (showcardcode == 1 || showcardcode == 2)) { + int w = guiFont->getDimension(dInfo.vic_string).Width; + if(w < 200) + w = 200; + driver->draw2DRectangle(0xa0000000, ResizeWin(640 - w / 2, 320, 690 + w / 2, 340)); + DrawShadowText(guiFont, dInfo.vic_string, ResizeWin(640 - w / 2, 320, 690 + w / 2, 340), Resize(-2, -1, 0, 0), 0xffffffff, 0xff000000, true, true, 0); } } else if(showcardp < showcarddif + 10) { int alpha = ((showcarddif + 10 - showcardp) * 25) << 24; - lpcFont->draw(lstr, recti(651 - pos.Width / 2 + (showcardp - showcarddif) * 40, 291, 950, 370), alpha); - lpcFont->draw(lstr, recti(650 - pos.Width / 2 + (showcardp - showcarddif) * 40, 290, 950, 370), alpha | 0xffffff); + DrawShadowText(lpcFont, lstr, ResizePhaseHint(660 + (showcardp - showcarddif) * 40, 290, 960, 370, pos.Width), Resize(-1, -1, 0, 0), alpha | 0xffffff, alpha); } showcardp++; break; @@ -713,7 +978,7 @@ void Game::DrawSpec() { matk.setRotationRadians(atk_r); driver->setTransform(irr::video::ETS_WORLD, matk); driver->setMaterial(matManager.mATK); - driver->drawVertexPrimitiveList(&matManager.vArrow[attack_sv], 40, matManager.iArrow, 10, EVT_STANDARD, EPT_TRIANGLE_STRIP); + driver->drawVertexPrimitiveList(&matManager.vArrow[attack_sv], 12, matManager.iArrow, 10, irr::video::EVT_STANDARD, irr::scene::EPT_TRIANGLE_STRIP); attack_sv += 4; if (attack_sv > 28) attack_sv = 0; @@ -726,28 +991,55 @@ void Game::DrawSpec() { showChat = false; hideChatTimer--; } - int maxChatLines = mainGame->dInfo.isStarted ? 5 : 8; - for(int i = 0; i < maxChatLines; ++i) { + int chatRectY = 0; + for(int i = 0; i < 8; ++i) { static unsigned int chatColor[] = {0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xff8080ff, 0xffff4040, 0xffff4040, 0xffff4040, 0xff40ff40, 0xff4040ff, 0xff40ffff, 0xffff40ff, 0xffffff40, 0xffffffff, 0xff808080, 0xff404040}; if(chatTiming[i]) { chatTiming[i]--; - if(!showChat && i > 2) - continue; - int w = textFont->getDimension(chatMsg[i].c_str()).Width; - driver->draw2DRectangle(recti(305, 596 - 20 * i, 307 + w, 616 - 20 * i), 0xa0000000, 0xa0000000, 0xa0000000, 0xa0000000); - textFont->draw(chatMsg[i].c_str(), rect(305, 595 - 20 * i, 1020, 615 - 20 * i), 0xff000000, false, false); - textFont->draw(chatMsg[i].c_str(), rect(306, 596 - 20 * i, 1021, 616 - 20 * i), chatColor[chatType[i]], false, false); + if(!is_building) { + if(dInfo.isStarted && i >= 5) + continue; + if(!showChat && i > 2) + continue; + } + + int x = wChat->getRelativePosition().UpperLeftCorner.X; + int y = window_size.Height - 25; + int maxwidth = 705 * xScale; + if(is_building) { + x = 810 * xScale; + maxwidth = 205 * xScale; + } + + std::wstring msg = SetStaticText(nullptr, maxwidth, guiFont, chatMsg[i].c_str()); + int w = guiFont->getDimension(msg).Width; + int h = guiFont->getDimension(msg).Height + 2; + + irr::core::recti rectloc(x, y - chatRectY - h, x + 2 + w, y - chatRectY); + irr::core::recti msgloc(x, y - chatRectY - h, x - 4, y - chatRectY); + irr::core::recti shadowloc = msgloc + irr::core::vector2di(1, 1); + + driver->draw2DRectangle(rectloc, 0xa0000000, 0xa0000000, 0xa0000000, 0xa0000000); + guiFont->drawUstring(msg, msgloc, 0xff000000, false, false); + guiFont->drawUstring(msg, shadowloc, chatColor[chatType[i]], false, false); + + chatRectY += h; } } } +void Game::DrawBackImage(irr::video::ITexture* texture) { + if(!texture) + return; + driver->draw2DImage(texture, Resize(0, 0, 1024, 640), irr::core::recti(0, 0, texture->getOriginalSize().Width, texture->getOriginalSize().Height)); +} void Game::ShowElement(irr::gui::IGUIElement * win, int autoframe) { FadingUnit fu; fu.fadingSize = win->getRelativePosition(); for(auto fit = fadingList.begin(); fit != fadingList.end(); ++fit) - if(win == fit->guiFading) + if(win == fit->guiFading && win != wOptions && win != wANNumber) // the size of wOptions is always setted by ClientField::ShowSelectOption before showing it fu.fadingSize = fit->fadingSize; - irr::core::position2di center = fu.fadingSize.getCenter(); + irr::core::vector2di center = fu.fadingSize.getCenter(); fu.fadingDiff.X = fu.fadingSize.getWidth() / 10; fu.fadingDiff.Y = (fu.fadingSize.getHeight() - 4) / 10; fu.fadingUL = center; @@ -774,9 +1066,12 @@ void Game::ShowElement(irr::gui::IGUIElement * win, int autoframe) { btnCardDisplay[i]->setDrawImage(false); } win->setRelativePosition(irr::core::recti(center.X, center.Y, 0, 0)); + win->setVisible(true); fadingList.push_back(fu); } void Game::HideElement(irr::gui::IGUIElement * win, bool set_action) { + if(!win->isVisible() && !set_action) + return; FadingUnit fu; fu.fadingSize = win->getRelativePosition(); for(auto fit = fadingList.begin(); fit != fadingList.end(); ++fit) @@ -800,16 +1095,24 @@ void Game::HideElement(irr::gui::IGUIElement * win, bool set_action) { if(win == wCardSelect) { for(int i = 0; i < 5; ++i) btnCardSelect[i]->setDrawImage(false); + stCardListTip->setVisible(false); + for(auto& pcard : dField.selectable_cards) + dField.SetShowMark(pcard, false); } if(win == wCardDisplay) { for(int i = 0; i < 5; ++i) btnCardDisplay[i]->setDrawImage(false); + stCardListTip->setVisible(false); + for(auto& pcard : dField.display_cards) + dField.SetShowMark(pcard, false); } fadingList.push_back(fu); } void Game::PopupElement(irr::gui::IGUIElement * element, int hideframe) { + soundManager.PlayDialogSound(element); element->getParent()->bringToFront(element); - dField.panel = element; + if(!is_building) + dField.panel = element; env->setFocus(element); if(!hideframe) ShowElement(element); @@ -817,151 +1120,213 @@ void Game::PopupElement(irr::gui::IGUIElement * element, int hideframe) { } void Game::WaitFrameSignal(int frame) { frameSignal.Reset(); - signalFrame = frame; + signalFrame = (gameConf.quick_animation && frame >= 12) ? 12 : frame; frameSignal.Wait(); } -void Game::DrawThumb(code_pointer cp, position2di pos, std::unordered_map* lflist) { - const int width = 44; //standard pic size, maybe it should be defined in game.h - const int height = 64; - int code = cp->first; - int lcode = cp->second.alias; +void Game::DrawThumb(code_pointer cp, irr::core::vector2di pos, const LFList* lflist, bool drag) { + auto code = cp->first; + auto lcode = cp->second.alias; if(lcode == 0) lcode = code; irr::video::ITexture* img = imageManager.GetTextureThumb(code); - if(img == NULL) - return; //NULL->getSize() will cause a crash - dimension2d size = img->getOriginalSize(); - driver->draw2DImage(img, rect(pos.X, pos.Y, pos.X + width, pos.Y + height), rect(0, 0, size.Width, size.Height)); - - if(lflist->count(lcode)) { - switch((*lflist)[lcode]) { + if(img == nullptr) + return; //nullptr->getSize() will cause a crash + irr::core::dimension2d size = img->getOriginalSize(); + irr::core::recti dragloc = mainGame->Resize(pos.X, pos.Y, pos.X + CARD_THUMB_WIDTH, pos.Y + CARD_THUMB_HEIGHT); + irr::core::recti limitloc = mainGame->Resize(pos.X, pos.Y, pos.X + 20, pos.Y + 20); + irr::core::recti otloc = Resize(pos.X + 7, pos.Y + 50, pos.X + 37, pos.Y + 65); + if(drag) { + dragloc = irr::core::recti(pos.X, pos.Y, pos.X + CARD_THUMB_WIDTH * mainGame->xScale, pos.Y + CARD_THUMB_HEIGHT * mainGame->yScale); + limitloc = irr::core::recti(pos.X, pos.Y, pos.X + 20 * mainGame->xScale, pos.Y + 20 * mainGame->yScale); + otloc = irr::core::recti(pos.X + 7, pos.Y + 50 * mainGame->yScale, pos.X + 37 * mainGame->xScale, pos.Y + 65 * mainGame->yScale); + } + driver->draw2DImage(img, dragloc, irr::core::rect(0, 0, size.Width, size.Height)); + auto lfit = lflist->content.find(lcode); + if (lfit != lflist->content.end()) { + switch(lfit->second) { case 0: - driver->draw2DImage(imageManager.tLim, recti(pos.X, pos.Y, pos.X + 20, pos.Y + 20), recti(0, 0, 64, 64), 0, 0, true); + driver->draw2DImage(imageManager.tLim, limitloc, irr::core::recti(0, 0, 64, 64), 0, 0, true); break; case 1: - driver->draw2DImage(imageManager.tLim, recti(pos.X, pos.Y, pos.X + 20, pos.Y + 20), recti(64, 0, 128, 64), 0, 0, true); + driver->draw2DImage(imageManager.tLim, limitloc, irr::core::recti(64, 0, 128, 64), 0, 0, true); break; case 2: - driver->draw2DImage(imageManager.tLim, recti(pos.X, pos.Y, pos.X + 20, pos.Y + 20), recti(0, 64, 64, 128), 0, 0, true); + driver->draw2DImage(imageManager.tLim, limitloc, irr::core::recti(0, 64, 64, 128), 0, 0, true); break; } } + bool showAvail = false; + bool showNotAvail = false; + int filter_lm = cbLimit->getSelected(); + bool avail = !((filter_lm == 4 && !(cp->second.ot & AVAIL_OCG) + || (filter_lm == 5 && !(cp->second.ot & AVAIL_TCG)) + || (filter_lm == 6 && !(cp->second.ot & AVAIL_SC)) + || (filter_lm == 7 && !(cp->second.ot & AVAIL_CUSTOM)) + || (filter_lm == 8 && (cp->second.ot & AVAIL_OCGTCG) != AVAIL_OCGTCG))); + if(filter_lm >= 4) { + showAvail = avail; + showNotAvail = !avail; + } else if(!(cp->second.ot & gameConf.defaultOT)) { + showNotAvail = true; + } + if(showAvail) { + if((cp->second.ot & AVAIL_OCG) && !(cp->second.ot & AVAIL_TCG)) + driver->draw2DImage(imageManager.tOT, otloc, irr::core::recti(0, 128, 128, 192), 0, 0, true); + else if((cp->second.ot & AVAIL_TCG) && !(cp->second.ot & AVAIL_OCG)) + driver->draw2DImage(imageManager.tOT, otloc, irr::core::recti(0, 192, 128, 256), 0, 0, true); + } else if(showNotAvail) { + if(cp->second.ot & AVAIL_OCG) + driver->draw2DImage(imageManager.tOT, otloc, irr::core::recti(0, 0, 128, 64), 0, 0, true); + else if(cp->second.ot & AVAIL_TCG) + driver->draw2DImage(imageManager.tOT, otloc, irr::core::recti(0, 64, 128, 128), 0, 0, true); + else if(!avail) + driver->draw2DImage(imageManager.tLim, otloc, irr::core::recti(0, 0, 64, 64), 0, 0, true); + } } void Game::DrawDeckBd() { wchar_t textBuffer[64]; //main deck - driver->draw2DRectangle(recti(310, 137, 410, 157), 0x400000ff, 0x400000ff, 0x40000000, 0x40000000); - driver->draw2DRectangleOutline(recti(309, 136, 410, 157)); - textFont->draw(dataManager.GetSysString(1330), recti(314, 136, 409, 156), 0xff000000, false, true); - textFont->draw(dataManager.GetSysString(1330), recti(315, 137, 410, 157), 0xffffffff, false, true); - numFont->draw(dataManager.numStrings[deckManager.current_deck.main.size()], recti(379, 137, 439, 157), 0xff000000, false, true); - numFont->draw(dataManager.numStrings[deckManager.current_deck.main.size()], recti(380, 138, 440, 158), 0xffffffff, false, true); - driver->draw2DRectangle(recti(310, 160, 797, 436), 0x400000ff, 0x400000ff, 0x40000000, 0x40000000); - driver->draw2DRectangleOutline(recti(309, 159, 797, 436)); + int mainsize = deckManager.current_deck.main.size(); + driver->draw2DRectangle(Resize(310, 137, 410, 157), 0x400000ff, 0x400000ff, 0x40000000, 0x40000000); + driver->draw2DRectangleOutline(Resize(309, 136, 410, 157)); + DrawShadowText(textFont, dataManager.GetSysString(deckBuilder.showing_pack ? 1477 : 1330), Resize(315, 137, 410, 157), Resize(1, 1, 1, 1), 0xffffffff, 0xff000000, false, true); + DrawShadowText(numFont, dataManager.GetNumString(mainsize), Resize(380, 138, 440, 158), Resize(1, 1, 1, 1), 0xffffffff, 0xff000000, false, true); + driver->draw2DRectangle(Resize(310, 160, 797, deckBuilder.showing_pack ? 630 : 436), 0x400000ff, 0x400000ff, 0x40000000, 0x40000000); + driver->draw2DRectangleOutline(Resize(309, 159, 797, deckBuilder.showing_pack ? 630 : 436)); int lx; + int dy = 68; float dx; - if(deckManager.current_deck.main.size() <= 40) { + if(mainsize <= 40) { dx = 436.0f / 9; lx = 10; + } else if(deckBuilder.showing_pack) { + lx = 10; + if(mainsize > 10 * 7) + lx = 11; + if(mainsize > 11 * 7) + lx = 12; + dx = (mainGame->scrPackCards->isVisible() ? 414.0f : 436.0f) / (lx - 1); + if(mainsize > 60) + dy = 66; } else { - lx = (deckManager.current_deck.main.size() - 41) / 4 + 11; + lx = (mainsize - 41) / 4 + 11; dx = 436.0f / (lx - 1); } - for(size_t i = 0; i < deckManager.current_deck.main.size(); ++i) { - DrawThumb(deckManager.current_deck.main[i], position2di(314 + (i % lx) * dx, 164 + (i / lx) * 68), deckBuilder.filterList); - if(deckBuilder.hovered_pos == 1 && deckBuilder.hovered_seq == (int)i) - driver->draw2DRectangleOutline(recti(313 + (i % lx) * dx, 163 + (i / lx) * 68, 359 + (i % lx) * dx, 228 + (i / lx) * 68)); - } - //extra deck - driver->draw2DRectangle(recti(310, 440, 410, 460), 0x400000ff, 0x400000ff, 0x40000000, 0x40000000); - driver->draw2DRectangleOutline(recti(309, 439, 410, 460)); - textFont->draw(dataManager.GetSysString(1331), recti(314, 439, 409, 459), 0xff000000, false, true); - textFont->draw(dataManager.GetSysString(1331), recti(315, 440, 410, 460), 0xffffffff, false, true); - numFont->draw(dataManager.numStrings[deckManager.current_deck.extra.size()], recti(379, 440, 439, 460), 0xff000000, false, true); - numFont->draw(dataManager.numStrings[deckManager.current_deck.extra.size()], recti(380, 441, 440, 461), 0xffffffff, false, true); - driver->draw2DRectangle(recti(310, 463, 797, 533), 0x400000ff, 0x400000ff, 0x40000000, 0x40000000); - driver->draw2DRectangleOutline(recti(309, 462, 797, 533)); - if(deckManager.current_deck.extra.size() <= 10) - dx = 436.0f / 9; - else dx = 436.0f / (deckManager.current_deck.extra.size() - 1); - for(size_t i = 0; i < deckManager.current_deck.extra.size(); ++i) { - DrawThumb(deckManager.current_deck.extra[i], position2di(314 + i * dx, 466), deckBuilder.filterList); - if(deckBuilder.hovered_pos == 2 && deckBuilder.hovered_seq == (int)i) - driver->draw2DRectangleOutline(recti(313 + i * dx, 465, 359 + i * dx, 531)); - } - //side deck - driver->draw2DRectangle(recti(310, 537, 410, 557), 0x400000ff, 0x400000ff, 0x40000000, 0x40000000); - driver->draw2DRectangleOutline(recti(309, 536, 410, 557)); - textFont->draw(dataManager.GetSysString(1332), recti(314, 536, 409, 556), 0xff000000, false, true); - textFont->draw(dataManager.GetSysString(1332), recti(315, 537, 410, 557), 0xffffffff, false, true); - numFont->draw(dataManager.numStrings[deckManager.current_deck.side.size()], recti(379, 537, 439, 557), 0xff000000, false, true); - numFont->draw(dataManager.numStrings[deckManager.current_deck.side.size()], recti(380, 538, 440, 558), 0xffffffff, false, true); - driver->draw2DRectangle(recti(310, 560, 797, 630), 0x400000ff, 0x400000ff, 0x40000000, 0x40000000); - driver->draw2DRectangleOutline(recti(309, 559, 797, 630)); - if(deckManager.current_deck.side.size() <= 10) - dx = 436.0f / 9; - else dx = 436.0f / (deckManager.current_deck.side.size() - 1); - for(size_t i = 0; i < deckManager.current_deck.side.size(); ++i) { - DrawThumb(deckManager.current_deck.side[i], position2di(314 + i * dx, 564), deckBuilder.filterList); - if(deckBuilder.hovered_pos == 3 && deckBuilder.hovered_seq == (int)i) - driver->draw2DRectangleOutline(recti(313 + i * dx, 563, 359 + i * dx, 629)); - } - driver->draw2DRectangle(recti(805, 137, 915, 157), 0x400000ff, 0x400000ff, 0x40000000, 0x40000000); - driver->draw2DRectangleOutline(recti(804, 136, 915, 157)); - textFont->draw(dataManager.GetSysString(1333), recti(809, 136, 914, 156), 0xff000000, false, true); - textFont->draw(dataManager.GetSysString(1333), recti(810, 137, 915, 157), 0xffffffff, false, true); - numFont->draw(deckBuilder.result_string, recti(874, 136, 934, 156), 0xff000000, false, true); - numFont->draw(deckBuilder.result_string, recti(875, 137, 935, 157), 0xffffffff, false, true); - driver->draw2DRectangle(recti(805, 160, 1020, 630), 0x400000ff, 0x400000ff, 0x40000000, 0x40000000); - driver->draw2DRectangleOutline(recti(804, 159, 1020, 630)); - for(size_t i = 0; i < 7 && i + mainGame->scrFilter->getPos() < deckBuilder.results.size(); ++i) { - code_pointer ptr = deckBuilder.results[i + mainGame->scrFilter->getPos()]; + int padding = scrPackCards->getPos() * lx; + for(int i = 0; i < mainsize - padding && i < 7 * lx; ++i) { + int j = i + padding; + DrawThumb(deckManager.current_deck.main[j], irr::core::vector2di(314 + (i % lx) * dx, 164 + (i / lx) * dy), deckBuilder.filterList); + if(deckBuilder.hovered_pos == 1 && deckBuilder.hovered_seq == j) + driver->draw2DRectangleOutline(Resize(313 + (i % lx) * dx, 163 + (i / lx) * dy, 359 + (i % lx) * dx, 228 + (i / lx) * dy)); + } + if(!deckBuilder.showing_pack) { + //extra deck + driver->draw2DRectangle(Resize(310, 440, 410, 460), 0x400000ff, 0x400000ff, 0x40000000, 0x40000000); + driver->draw2DRectangleOutline(Resize(309, 439, 410, 460)); + DrawShadowText(textFont, dataManager.GetSysString(1331), Resize(315, 440, 410, 460), Resize(1, 1, 1, 1), 0xffffffff, 0xff000000, false, true); + DrawShadowText(numFont, dataManager.GetNumString(deckManager.current_deck.extra.size()), Resize(380, 441, 440, 461), Resize(1, 1, 1, 1), 0xffffffff, 0xff000000, false, true); + driver->draw2DRectangle(Resize(310, 463, 797, 533), 0x400000ff, 0x400000ff, 0x40000000, 0x40000000); + driver->draw2DRectangleOutline(Resize(309, 462, 797, 533)); + if(deckManager.current_deck.extra.size() <= 10) + dx = 436.0f / 9; + else dx = 436.0f / (deckManager.current_deck.extra.size() - 1); + for(size_t i = 0; i < deckManager.current_deck.extra.size(); ++i) { + DrawThumb(deckManager.current_deck.extra[i], irr::core::vector2di(314 + i * dx, 466), deckBuilder.filterList); + if(deckBuilder.hovered_pos == 2 && deckBuilder.hovered_seq == (int)i) + driver->draw2DRectangleOutline(Resize(313 + i * dx, 465, 359 + i * dx, 531)); + } + //side deck + driver->draw2DRectangle(Resize(310, 537, 410, 557), 0x400000ff, 0x400000ff, 0x40000000, 0x40000000); + driver->draw2DRectangleOutline(Resize(309, 536, 410, 557)); + DrawShadowText(textFont, dataManager.GetSysString(1332), Resize(315, 537, 410, 557), Resize(1, 1, 1, 1), 0xffffffff, 0xff000000, false, true); + DrawShadowText(numFont, dataManager.GetNumString(deckManager.current_deck.side.size()), Resize(380, 538, 440, 558), Resize(1, 1, 1, 1), 0xffffffff, 0xff000000, false, true); + driver->draw2DRectangle(Resize(310, 560, 797, 630), 0x400000ff, 0x400000ff, 0x40000000, 0x40000000); + driver->draw2DRectangleOutline(Resize(309, 559, 797, 630)); + if(deckManager.current_deck.side.size() <= 10) + dx = 436.0f / 9; + else dx = 436.0f / (deckManager.current_deck.side.size() - 1); + for(size_t i = 0; i < deckManager.current_deck.side.size(); ++i) { + DrawThumb(deckManager.current_deck.side[i], irr::core::vector2di(314 + i * dx, 564), deckBuilder.filterList); + if(deckBuilder.hovered_pos == 3 && deckBuilder.hovered_seq == (int)i) + driver->draw2DRectangleOutline(Resize(313 + i * dx, 563, 359 + i * dx, 629)); + } + } + if(is_siding) { + // side chat background + driver->draw2DRectangle(Resize(805, 10, 1020, 630), 0x400000ff, 0x400000ff, 0x40000000, 0x40000000); + driver->draw2DRectangleOutline(Resize(804, 9, 1020, 630)); + } else { + //search result + driver->draw2DRectangle(Resize(805, 137, 926, 157), 0x400000ff, 0x400000ff, 0x40000000, 0x40000000); + driver->draw2DRectangleOutline(Resize(804, 136, 926, 157)); + DrawShadowText(textFont, dataManager.GetSysString(1333), Resize(810, 137, 915, 157), Resize(1, 1, 1, 1), 0xffffffff, 0xff000000, false, true); + DrawShadowText(numFont, deckBuilder.result_string, Resize(875, 137, 935, 157), Resize(1, 1, 1, 1), 0xffffffff, 0xff000000, false, true); + driver->draw2DRectangle(Resize(805, 160, 1020, 630), 0x400000ff, 0x400000ff, 0x40000000, 0x40000000); + driver->draw2DRectangleOutline(Resize(804, 159, 1020, 630)); + } + int max_result = mainGame->gameConf.use_image_load_background_thread ? 9 : 7; + for(int i = 0; i < max_result && i + scrFilter->getPos() < (int)deckBuilder.results.size(); ++i) { + code_pointer ptr = deckBuilder.results[i + scrFilter->getPos()]; + if(i >= 7) + { + imageManager.GetTextureThumb(ptr->second.code); + break; + } if(deckBuilder.hovered_pos == 4 && deckBuilder.hovered_seq == (int)i) - driver->draw2DRectangle(0x80000000, recti(806, 164 + i * 66, 1019, 230 + i * 66)); - DrawThumb(ptr, position2di(810, 165 + i * 66), deckBuilder.filterList); + driver->draw2DRectangle(0x80000000, Resize(806, 164 + i * 66, 1019, 230 + i * 66)); + DrawThumb(ptr, irr::core::vector2di(810, 165 + i * 66), deckBuilder.filterList); + const wchar_t* availBuffer = L""; + if ((ptr->second.ot & AVAIL_OCGTCG) == AVAIL_OCG) + availBuffer = L" [OCG]"; + else if ((ptr->second.ot & AVAIL_OCGTCG) == AVAIL_TCG) + availBuffer = L" [TCG]"; + else if ((ptr->second.ot & AVAIL_CUSTOM) == AVAIL_CUSTOM) + availBuffer = L" [Custom]"; if(ptr->second.type & TYPE_MONSTER) { myswprintf(textBuffer, L"%ls", dataManager.GetName(ptr->first)); - textFont->draw(textBuffer, recti(859, 164 + i * 66, 955, 185 + i * 66), 0xff000000, false, false); - textFont->draw(textBuffer, recti(860, 165 + i * 66, 955, 185 + i * 66), 0xffffffff, false, false); - myswprintf(textBuffer, L"%ls/%ls \x2605%d", dataManager.FormatAttribute(ptr->second.attribute), dataManager.FormatRace(ptr->second.race), ptr->second.level); - textFont->draw(textBuffer, recti(859, 186 + i * 66, 955, 207 + i * 66), 0xff000000, false, false); - textFont->draw(textBuffer, recti(860, 187 + i * 66, 955, 207 + i * 66), 0xffffffff, false, false); - if(ptr->second.attack < 0 && ptr->second.defence < 0) - myswprintf(textBuffer, L"?/?"); - else if(ptr->second.attack < 0) - myswprintf(textBuffer, L"?/%d", ptr->second.defence); - else if(ptr->second.defence < 0) - myswprintf(textBuffer, L"%d/?", ptr->second.attack); - else myswprintf(textBuffer, L"%d/%d", ptr->second.attack, ptr->second.defence); + DrawShadowText(textFont, textBuffer, Resize(860, 165 + i * 66, 955, 185 + i * 66), Resize(1, 1, 0, 0)); + const wchar_t* form = L"\u2605"; + wchar_t adBuffer[32]{}; + wchar_t scaleBuffer[16]{}; + if(!(ptr->second.type & TYPE_LINK)) { + if(ptr->second.type & TYPE_XYZ) + form = L"\u2606"; + if(ptr->second.attack < 0 && ptr->second.defense < 0) + myswprintf(adBuffer, L"?/?"); + else if(ptr->second.attack < 0) + myswprintf(adBuffer, L"?/%d", ptr->second.defense); + else if(ptr->second.defense < 0) + myswprintf(adBuffer, L"%d/?", ptr->second.attack); + else + myswprintf(adBuffer, L"%d/%d", ptr->second.attack, ptr->second.defense); + } else { + form = L"LINK-"; + if(ptr->second.attack < 0) + myswprintf(adBuffer, L"?/-"); + else + myswprintf(adBuffer, L"%d/-", ptr->second.attack); + } + const auto& attribute = dataManager.FormatAttribute(ptr->second.attribute); + const auto& race = dataManager.FormatRace(ptr->second.race); + myswprintf(textBuffer, L"%ls/%ls %ls%d", attribute.c_str(), race.c_str(), form, ptr->second.level); + DrawShadowText(textFont, textBuffer, Resize(860, 187 + i * 66, 955, 207 + i * 66), Resize(1, 1, 0, 0)); if(ptr->second.type & TYPE_PENDULUM) { - wchar_t scaleBuffer[16]; myswprintf(scaleBuffer, L" %d/%d", ptr->second.lscale, ptr->second.rscale); - wcscat(textBuffer, scaleBuffer); } - if((ptr->second.ot & 0x3) == 1) - wcscat(textBuffer, L" [OCG]"); - else if((ptr->second.ot & 0x3) == 2) - wcscat(textBuffer, L" [TCG]"); - textFont->draw(textBuffer, recti(859, 208 + i * 66, 955, 229 + i * 66), 0xff000000, false, false); - textFont->draw(textBuffer, recti(860, 209 + i * 66, 955, 229 + i * 66), 0xffffffff, false, false); + myswprintf(textBuffer, L"%ls%ls%ls", adBuffer, scaleBuffer, availBuffer); + DrawShadowText(textFont, textBuffer, Resize(860, 209 + i * 66, 955, 229 + i * 66), Resize(1, 1, 0, 0)); } else { myswprintf(textBuffer, L"%ls", dataManager.GetName(ptr->first)); - textFont->draw(textBuffer, recti(859, 164 + i * 66, 955, 185 + i * 66), 0xff000000, false, false); - textFont->draw(textBuffer, recti(860, 165 + i * 66, 955, 185 + i * 66), 0xffffffff, false, false); - const wchar_t* ptype = dataManager.FormatType(ptr->second.type); - textFont->draw(ptype, recti(859, 186 + i * 66, 955, 207 + i * 66), 0xff000000, false, false); - textFont->draw(ptype, recti(860, 187 + i * 66, 955, 207 + i * 66), 0xffffffff, false, false); - textBuffer[0] = 0; - if((ptr->second.ot & 0x3) == 1) - wcscat(textBuffer, L"[OCG]"); - else if((ptr->second.ot & 0x3) == 2) - wcscat(textBuffer, L"[TCG]"); - textFont->draw(textBuffer, recti(859, 208 + i * 66, 955, 229 + i * 66), 0xff000000, false, false); - textFont->draw(textBuffer, recti(860, 209 + i * 66, 955, 229 + i * 66), 0xffffffff, false, false); + DrawShadowText(textFont, textBuffer, Resize(860, 165 + i * 66, 955, 185 + i * 66), Resize(1, 1, 0, 0)); + const auto& type = dataManager.FormatType(ptr->second.type); + myswprintf(textBuffer, L"%ls", type.c_str()); + DrawShadowText(textFont, textBuffer, Resize(860, 187 + i * 66, 955, 207 + i * 66), Resize(1, 1, 0, 0)); + myswprintf(textBuffer, L"%ls", availBuffer); + DrawShadowText(textFont, textBuffer, Resize(860, 209 + i * 66, 955, 229 + i * 66), Resize(1, 1, 0, 0)); } } if(deckBuilder.is_draging) { - DrawThumb(deckBuilder.draging_pointer, position2di(deckBuilder.dragx - 22, deckBuilder.dragy - 32), deckBuilder.filterList); + DrawThumb(deckBuilder.draging_pointer, irr::core::vector2di(deckBuilder.dragx - CARD_THUMB_WIDTH / 2 * mainGame->xScale, deckBuilder.dragy - CARD_THUMB_HEIGHT / 2 * mainGame->yScale), deckBuilder.filterList, true); } } } diff --git a/gframe/duelclient.cpp b/gframe/duelclient.cpp index d1c66efe64..58e59121b6 100644 --- a/gframe/duelclient.cpp +++ b/gframe/duelclient.cpp @@ -1,35 +1,41 @@ +#include "config.h" #include "duelclient.h" #include "client_card.h" #include "materials.h" #include "image_manager.h" +#include "sound_manager.h" #include "single_mode.h" -#include "../ocgcore/field.h" -#include "../ocgcore/duel.h" #include "game.h" +#include "deck_manager.h" #include "replay.h" -#include "replay_mode.h" +#include namespace ygo { unsigned DuelClient::connect_state = 0; -unsigned char DuelClient::response_buf[64]; -unsigned char DuelClient::response_len = 0; +unsigned char DuelClient::response_buf[SIZE_RETURN_VALUE]; +size_t DuelClient::response_len = 0; unsigned int DuelClient::watching = 0; unsigned char DuelClient::selftype = 0; bool DuelClient::is_host = false; event_base* DuelClient::client_base = 0; bufferevent* DuelClient::client_bev = 0; -char DuelClient::duel_client_read[0x2000]; -char DuelClient::duel_client_write[0x2000]; +unsigned char DuelClient::duel_client_write[SIZE_NETWORK_BUFFER]; bool DuelClient::is_closing = false; +bool DuelClient::is_swapping = false; int DuelClient::select_hint = 0; +int DuelClient::select_unselect_hint = 0; +int DuelClient::last_select_hint = 0; +unsigned char DuelClient::last_successful_msg[SIZE_NETWORK_BUFFER]; +size_t DuelClient::last_successful_msg_length = 0; wchar_t DuelClient::event_string[256]; -mtrandom DuelClient::rnd; +std::mt19937 DuelClient::rnd; +std::uniform_real_distribution DuelClient::real_dist; bool DuelClient::is_refreshing = false; int DuelClient::match_kill = 0; std::vector DuelClient::hosts; -std::set DuelClient::remotes; +std::set> DuelClient::remotes; event* DuelClient::resp_event = 0; bool DuelClient::StartClient(unsigned int ip, unsigned short port, bool create_game) { @@ -39,12 +45,12 @@ bool DuelClient::StartClient(unsigned int ip, unsigned short port, bool create_g client_base = event_base_new(); if(!client_base) return false; - memset(&sin, 0, sizeof(sin)); + std::memset(&sin, 0, sizeof sin); sin.sin_family = AF_INET; sin.sin_addr.s_addr = htonl(ip); sin.sin_port = htons(port); client_bev = bufferevent_socket_new(client_base, -1, BEV_OPT_CLOSE_ON_FREE); - bufferevent_setcb(client_bev, ClientRead, NULL, ClientEvent, (void*)create_game); + bufferevent_setcb(client_bev, ClientRead, nullptr, ClientEvent, (void*)create_game); if (bufferevent_socket_connect(client_bev, (sockaddr*)&sin, sizeof(sin)) < 0) { bufferevent_free(client_bev); event_base_free(client_base); @@ -53,13 +59,13 @@ bool DuelClient::StartClient(unsigned int ip, unsigned short port, bool create_g return false; } connect_state = 0x1; - rnd.reset(time(0)); + rnd.seed(std::random_device()()); if(!create_game) { timeval timeout = {5, 0}; - event* resp_event = event_new(client_base, 0, EV_TIMEOUT, ConnectTimeout, 0); - event_add(resp_event, &timeout); + event* timeout_event = event_new(client_base, 0, EV_TIMEOUT, ConnectTimeout, 0); + event_add(timeout_event, &timeout); } - Thread::NewThread(ClientThread, 0); + std::thread(ClientThread).detach(); return true; } void DuelClient::ConnectTimeout(evutil_socket_t fd, short events, void* arg) { @@ -69,9 +75,16 @@ void DuelClient::ConnectTimeout(evutil_socket_t fd, short events, void* arg) { mainGame->btnCreateHost->setEnabled(true); mainGame->btnJoinHost->setEnabled(true); mainGame->btnJoinCancel->setEnabled(true); - mainGame->gMutex.Lock(); + mainGame->btnStartBot->setEnabled(true); + mainGame->btnBotCancel->setEnabled(true); + mainGame->gMutex.lock(); + if(bot_mode && !mainGame->wSinglePlay->isVisible()) + mainGame->ShowElement(mainGame->wSinglePlay); + else if(!bot_mode && !mainGame->wLanWindow->isVisible()) + mainGame->ShowElement(mainGame->wLanWindow); + soundManager.PlaySoundEffect(SOUND_INFO); mainGame->env->addMessageBox(L"", dataManager.GetSysString(1400)); - mainGame->gMutex.Unlock(); + mainGame->gMutex.unlock(); } event_base_loopbreak(client_base); } @@ -86,46 +99,73 @@ void DuelClient::StopClient(bool is_exiting) { } void DuelClient::ClientRead(bufferevent* bev, void* ctx) { evbuffer* input = bufferevent_get_input(bev); - size_t len = evbuffer_get_length(input); - unsigned short packet_len = 0; - while(true) { - if(len < 2) - return; - evbuffer_copyout(input, &packet_len, 2); - if(len < (size_t)packet_len + 2) - return; - evbuffer_remove(input, duel_client_read, packet_len + 2); - if(packet_len) - HandleSTOCPacketLan(&duel_client_read[2], packet_len); + int len = evbuffer_get_length(input); + if (len < 2) + return; + unsigned char* duel_client_read = new unsigned char[SIZE_NETWORK_BUFFER]; + uint16_t packet_len = 0; + while (len >= 2) { + evbuffer_copyout(input, &packet_len, sizeof packet_len); + if (len < packet_len + 2) + break; + int read_len = evbuffer_remove(input, duel_client_read, packet_len + 2); + if (read_len > 2) + HandleSTOCPacketLan(&duel_client_read[2], read_len - 2); len -= packet_len + 2; } + delete[] duel_client_read; } -void DuelClient::ClientEvent(bufferevent *bev, short events, void *ctx) { +void DuelClient::ClientEvent(bufferevent* bev, short events, void* ctx) { if (events & BEV_EVENT_CONNECTED) { - bool create_game = (size_t)ctx != 0; + bool create_game = (intptr_t)ctx; + if(!create_game) { + uint16_t hostname_buf[LEN_HOSTNAME]; + auto hostname_len = BufferIO::CopyCharArray(mainGame->ebJoinHost->getText(), hostname_buf); + auto hostname_msglen = (hostname_len + 1) * sizeof(uint16_t); + char buf[LEN_HOSTNAME * sizeof(uint16_t) + sizeof(uint32_t)]; + memset(buf, 0, sizeof(uint32_t)); // real_ip + memcpy(buf + sizeof(uint32_t), hostname_buf, hostname_msglen); + SendBufferToServer(CTOS_EXTERNAL_ADDRESS, buf, hostname_msglen + sizeof(uint32_t)); + } CTOS_PlayerInfo cspi; - BufferIO::CopyWStr(mainGame->ebNickName->getText(), cspi.name, 20); + BufferIO::CopyCharArray(mainGame->ebNickName->getText(), cspi.name); SendPacketToServer(CTOS_PLAYER_INFO, cspi); if(create_game) { CTOS_CreateGame cscg; - BufferIO::CopyWStr(mainGame->ebServerName->getText(), cscg.name, 20); - BufferIO::CopyWStr(mainGame->ebServerPass->getText(), cscg.pass, 20); - cscg.info.rule = mainGame->cbRule->getSelected(); - cscg.info.mode = mainGame->cbMatchMode->getSelected(); - cscg.info.start_hand = _wtoi(mainGame->ebStartHand->getText()); - cscg.info.start_lp = _wtoi(mainGame->ebStartLP->getText()); - cscg.info.draw_count = _wtoi(mainGame->ebDrawCount->getText()); - cscg.info.time_limit = _wtoi(mainGame->ebTimeLimit->getText()); - cscg.info.lflist = mainGame->cbLFlist->getItemData(mainGame->cbLFlist->getSelected()); - cscg.info.enable_priority = mainGame->chkEnablePriority->isChecked(); - cscg.info.no_check_deck = mainGame->chkNoCheckDeck->isChecked(); - cscg.info.no_shuffle_deck = mainGame->chkNoShuffleDeck->isChecked(); + if(bot_mode) { + BufferIO::CopyCharArray(L"Bot Game", cscg.name); + BufferIO::CopyCharArray(L"", cscg.pass); + cscg.info.rule = 5; + cscg.info.mode = 0; + cscg.info.start_hand = 5; + cscg.info.start_lp = 8000; + cscg.info.draw_count = 1; + cscg.info.time_limit = 0; + cscg.info.lflist = 0; + cscg.info.duel_rule = mainGame->cbBotRule->getSelected() + 3; + cscg.info.no_check_deck = mainGame->chkBotNoCheckDeck->isChecked(); + cscg.info.no_shuffle_deck = mainGame->chkBotNoShuffleDeck->isChecked(); + } + else { + BufferIO::CopyCharArray(mainGame->ebServerName->getText(), cscg.name); + BufferIO::CopyCharArray(mainGame->ebServerPass->getText(), cscg.pass); + cscg.info.rule = mainGame->cbRule->getSelected(); + cscg.info.mode = mainGame->cbMatchMode->getSelected(); + cscg.info.start_hand = std::wcstol(mainGame->ebStartHand->getText(),nullptr,10); + cscg.info.start_lp = std::wcstol(mainGame->ebStartLP->getText(),nullptr,10); + cscg.info.draw_count = std::wcstol(mainGame->ebDrawCount->getText(),nullptr,10); + cscg.info.time_limit = std::wcstol(mainGame->ebTimeLimit->getText(),nullptr,10); + cscg.info.lflist = mainGame->cbHostLFlist->getItemData(mainGame->cbHostLFlist->getSelected()); + cscg.info.duel_rule = mainGame->cbDuelRule->getSelected() + 1; + cscg.info.no_check_deck = mainGame->chkNoCheckDeck->isChecked(); + cscg.info.no_shuffle_deck = mainGame->chkNoShuffleDeck->isChecked(); + } SendPacketToServer(CTOS_CREATE_GAME, cscg); } else { CTOS_JoinGame csjg; csjg.version = PRO_VERSION; csjg.gameid = 0; - BufferIO::CopyWStr(mainGame->ebJoinPass->getText(), csjg.pass, 20); + BufferIO::CopyCharArray(mainGame->ebJoinPass->getText(), csjg.pass); SendPacketToServer(CTOS_JOIN_GAME, csjg); } bufferevent_enable(bev, EV_READ); @@ -137,45 +177,68 @@ void DuelClient::ClientEvent(bufferevent *bev, short events, void *ctx) { mainGame->btnCreateHost->setEnabled(true); mainGame->btnJoinHost->setEnabled(true); mainGame->btnJoinCancel->setEnabled(true); - mainGame->gMutex.Lock(); + mainGame->btnStartBot->setEnabled(true); + mainGame->btnBotCancel->setEnabled(true); + mainGame->gMutex.lock(); + if(bot_mode && !mainGame->wSinglePlay->isVisible()) + mainGame->ShowElement(mainGame->wSinglePlay); + else if(!bot_mode && !mainGame->wLanWindow->isVisible()) + mainGame->ShowElement(mainGame->wLanWindow); + soundManager.PlaySoundEffect(SOUND_INFO); mainGame->env->addMessageBox(L"", dataManager.GetSysString(1400)); - mainGame->gMutex.Unlock(); + mainGame->gMutex.unlock(); } else if(connect_state == 0x7) { if(!mainGame->dInfo.isStarted && !mainGame->is_building) { mainGame->btnCreateHost->setEnabled(true); mainGame->btnJoinHost->setEnabled(true); mainGame->btnJoinCancel->setEnabled(true); - mainGame->gMutex.Lock(); + mainGame->btnStartBot->setEnabled(true); + mainGame->btnBotCancel->setEnabled(true); + mainGame->gMutex.lock(); mainGame->HideElement(mainGame->wHostPrepare); - mainGame->ShowElement(mainGame->wLanWindow); + if(bot_mode) + mainGame->ShowElement(mainGame->wSinglePlay); + else + mainGame->ShowElement(mainGame->wLanWindow); mainGame->wChat->setVisible(false); + soundManager.PlaySoundEffect(SOUND_INFO); if(events & BEV_EVENT_EOF) mainGame->env->addMessageBox(L"", dataManager.GetSysString(1401)); else mainGame->env->addMessageBox(L"", dataManager.GetSysString(1402)); - mainGame->gMutex.Unlock(); + mainGame->gMutex.unlock(); } else { - mainGame->gMutex.Lock(); + mainGame->gMutex.lock(); + soundManager.PlaySoundEffect(SOUND_INFO); mainGame->env->addMessageBox(L"", dataManager.GetSysString(1502)); mainGame->btnCreateHost->setEnabled(true); mainGame->btnJoinHost->setEnabled(true); mainGame->btnJoinCancel->setEnabled(true); - mainGame->gMutex.Unlock(); + mainGame->btnStartBot->setEnabled(true); + mainGame->btnBotCancel->setEnabled(true); + mainGame->stTip->setVisible(false); + mainGame->gMutex.unlock(); mainGame->closeDoneSignal.Reset(); mainGame->closeSignal.Set(); mainGame->closeDoneSignal.Wait(); - mainGame->gMutex.Lock(); + mainGame->gMutex.lock(); mainGame->dInfo.isStarted = false; + mainGame->dInfo.isInDuel = false; + mainGame->dInfo.isFinished = false; mainGame->is_building = false; + mainGame->ResizeChatInputWindow(); mainGame->device->setEventReceiver(&mainGame->menuHandler); - mainGame->ShowElement(mainGame->wLanWindow); - mainGame->gMutex.Unlock(); + if(bot_mode) + mainGame->ShowElement(mainGame->wSinglePlay); + else + mainGame->ShowElement(mainGame->wLanWindow); + mainGame->gMutex.unlock(); } } } event_base_loopexit(client_base, 0); } } -int DuelClient::ClientThread(void* param) { +int DuelClient::ClientThread() { event_base_dispatch(client_base); bufferevent_free(client_bev); event_base_free(client_base); @@ -184,60 +247,118 @@ int DuelClient::ClientThread(void* param) { connect_state = 0; return 0; } -void DuelClient::HandleSTOCPacketLan(char* data, unsigned int len) { - char* pdata = data; - unsigned char pktType = BufferIO::ReadUInt8(pdata); +void DuelClient::HandleSTOCPacketLan(unsigned char* data, int len) { + unsigned char* pdata = data; + unsigned char pktType = BufferIO::Read(pdata); switch(pktType) { case STOC_GAME_MSG: { + if (len < 1 + (int)sizeof(unsigned char)) + return; ClientAnalyze(pdata, len - 1); break; } case STOC_ERROR_MSG: { - STOC_ErrorMsg* pkt = (STOC_ErrorMsg*)pdata; + if (len < 1 + (int)sizeof(STOC_ErrorMsg)) + return; + STOC_ErrorMsg packet; + std::memcpy(&packet, pdata, sizeof packet); + const auto* pkt = &packet; switch(pkt->msg) { case ERRMSG_JOINERROR: { mainGame->btnCreateHost->setEnabled(true); mainGame->btnJoinHost->setEnabled(true); mainGame->btnJoinCancel->setEnabled(true); - mainGame->gMutex.Lock(); + mainGame->btnStartBot->setEnabled(true); + mainGame->btnBotCancel->setEnabled(true); + mainGame->gMutex.lock(); + soundManager.PlaySoundEffect(SOUND_INFO); if(pkt->code == 0) mainGame->env->addMessageBox(L"", dataManager.GetSysString(1403)); else if(pkt->code == 1) mainGame->env->addMessageBox(L"", dataManager.GetSysString(1404)); else if(pkt->code == 2) mainGame->env->addMessageBox(L"", dataManager.GetSysString(1405)); - mainGame->gMutex.Unlock(); + mainGame->gMutex.unlock(); event_base_loopbreak(client_base); break; } case ERRMSG_DECKERROR: { - mainGame->gMutex.Lock(); - if(pkt->code == 1) - mainGame->env->addMessageBox(L"", dataManager.GetSysString(1406)); - else { - wchar_t msgbuf[256]; - myswprintf(msgbuf, dataManager.GetSysString(1407), dataManager.GetName(pkt->code)); - mainGame->env->addMessageBox(L"", msgbuf); + mainGame->gMutex.lock(); + unsigned int code = pkt->code & MAX_CARD_ID; + unsigned int flag = pkt->code >> 28; + wchar_t msgbuf[256]; + switch(flag) + { + case DECKERROR_LFLIST: { + myswprintf(msgbuf, dataManager.GetSysString(1407), dataManager.GetName(code)); + break; + } + case DECKERROR_OCGONLY: { + myswprintf(msgbuf, dataManager.GetSysString(1413), dataManager.GetName(code)); + break; + } + case DECKERROR_TCGONLY: { + myswprintf(msgbuf, dataManager.GetSysString(1414), dataManager.GetName(code)); + break; + } + case DECKERROR_UNKNOWNCARD: { + myswprintf(msgbuf, dataManager.GetSysString(1415), dataManager.GetName(code), code); + break; + } + case DECKERROR_CARDCOUNT: { + myswprintf(msgbuf, dataManager.GetSysString(1416), dataManager.GetName(code)); + break; } + case DECKERROR_MAINCOUNT: { + myswprintf(msgbuf, dataManager.GetSysString(1417), code); + break; + } + case DECKERROR_EXTRACOUNT: { + if(code>0) + myswprintf(msgbuf, dataManager.GetSysString(1418), code); + else + myswprintf(msgbuf, dataManager.GetSysString(1420)); + break; + } + case DECKERROR_SIDECOUNT: { + myswprintf(msgbuf, dataManager.GetSysString(1419), code); + break; + } + case DECKERROR_NOTAVAIL: { + myswprintf(msgbuf, dataManager.GetSysString(1432), dataManager.GetName(code)); + break; + } + default: { + myswprintf(msgbuf, dataManager.GetSysString(1406)); + break; + } + } + soundManager.PlaySoundEffect(SOUND_INFO); + mainGame->env->addMessageBox(L"", msgbuf); + mainGame->cbCategorySelect->setEnabled(true); mainGame->cbDeckSelect->setEnabled(true); - mainGame->gMutex.Unlock(); + mainGame->gMutex.unlock(); break; } case ERRMSG_SIDEERROR: { - mainGame->gMutex.Lock(); + mainGame->gMutex.lock(); + soundManager.PlaySoundEffect(SOUND_INFO); mainGame->env->addMessageBox(L"", dataManager.GetSysString(1408)); - mainGame->gMutex.Unlock(); + mainGame->gMutex.unlock(); break; } case ERRMSG_VERERROR: { mainGame->btnCreateHost->setEnabled(true); mainGame->btnJoinHost->setEnabled(true); mainGame->btnJoinCancel->setEnabled(true); - mainGame->gMutex.Lock(); + mainGame->btnStartBot->setEnabled(true); + mainGame->btnBotCancel->setEnabled(true); + mainGame->gMutex.lock(); wchar_t msgbuf[256]; myswprintf(msgbuf, dataManager.GetSysString(1411), pkt->code >> 12, (pkt->code >> 4) & 0xff, pkt->code & 0xf); + soundManager.PlaySoundEffect(SOUND_INFO); mainGame->env->addMessageBox(L"", msgbuf); - mainGame->gMutex.Unlock(); + mainGame->gMutex.unlock(); event_base_loopbreak(client_base); break; } @@ -249,13 +370,17 @@ void DuelClient::HandleSTOCPacketLan(char* data, unsigned int len) { break; } case STOC_SELECT_TP: { - mainGame->gMutex.Lock(); - mainGame->ShowElement(mainGame->wFTSelect); - mainGame->gMutex.Unlock(); + mainGame->gMutex.lock(); + mainGame->PopupElement(mainGame->wFTSelect); + mainGame->gMutex.unlock(); break; } case STOC_HAND_RESULT: { - STOC_HandResult* pkt = (STOC_HandResult*)pdata; + if (len < 1 + (int)sizeof(STOC_HandResult)) + return; + STOC_HandResult packet; + std::memcpy(&packet, pdata, sizeof packet); + const auto* pkt = &packet; mainGame->stHintMsg->setVisible(false); mainGame->showcardcode = (pkt->res1 - 1) + ((pkt->res2 - 1) << 16); mainGame->showcarddif = 50; @@ -268,43 +393,73 @@ void DuelClient::HandleSTOCPacketLan(char* data, unsigned int len) { break; } case STOC_CHANGE_SIDE: { - mainGame->gMutex.Lock(); + mainGame->gMutex.lock(); mainGame->dInfo.isStarted = false; + mainGame->dInfo.isInDuel = false; mainGame->dField.Clear(); mainGame->is_building = true; mainGame->is_siding = true; - mainGame->wPhase->setVisible(false); + mainGame->CloseGameWindow(); + mainGame->ResizeChatInputWindow(); mainGame->wDeckEdit->setVisible(false); mainGame->wFilter->setVisible(false); - mainGame->btnSideOK->setVisible(true); + mainGame->wSort->setVisible(false); if(mainGame->dInfo.player_type < 7) mainGame->btnLeaveGame->setVisible(false); + mainGame->btnSideOK->setVisible(true); + mainGame->btnSideShuffle->setVisible(true); + mainGame->btnSideSort->setVisible(true); + mainGame->btnSideReload->setVisible(true); mainGame->deckBuilder.result_string[0] = L'0'; mainGame->deckBuilder.result_string[1] = 0; mainGame->deckBuilder.results.clear(); + mainGame->deckBuilder.hovered_code = 0; mainGame->deckBuilder.is_draging = false; + mainGame->deckBuilder.is_starting_dragging = false; + mainGame->deckBuilder.readonly = false; + mainGame->deckBuilder.showing_pack = false; mainGame->deckBuilder.pre_mainc = deckManager.current_deck.main.size(); mainGame->deckBuilder.pre_extrac = deckManager.current_deck.extra.size(); mainGame->deckBuilder.pre_sidec = deckManager.current_deck.side.size(); mainGame->device->setEventReceiver(&mainGame->deckBuilder); - mainGame->gMutex.Unlock(); + mainGame->gMutex.unlock(); break; } case STOC_WAITING_SIDE: { - mainGame->gMutex.Lock(); + mainGame->dInfo.isInDuel = false; + mainGame->gMutex.lock(); mainGame->dField.Clear(); mainGame->stHintMsg->setText(dataManager.GetSysString(1409)); mainGame->stHintMsg->setVisible(true); - mainGame->gMutex.Unlock(); + mainGame->gMutex.unlock(); + break; + } + case STOC_DECK_COUNT: { + if (len < 1 + (int)sizeof(int16_t) * 6) + return; + mainGame->gMutex.lock(); + int deckc = BufferIO::Read(pdata); + int extrac = BufferIO::Read(pdata); + int sidec = BufferIO::Read(pdata); + mainGame->dField.Initial(0, deckc, extrac, sidec); + deckc = BufferIO::Read(pdata); + extrac = BufferIO::Read(pdata); + sidec = BufferIO::Read(pdata); + mainGame->dField.Initial(1, deckc, extrac, sidec); + mainGame->gMutex.unlock(); break; } case STOC_JOIN_GAME: { - STOC_JoinGame* pkt = (STOC_JoinGame*)pdata; + if (len < 1 + (int)sizeof(STOC_JoinGame)) + return; + STOC_JoinGame packet; + std::memcpy(&packet, pdata, sizeof packet); + const auto* pkt = &packet; std::wstring str; wchar_t msgbuf[256]; myswprintf(msgbuf, L"%ls%ls\n", dataManager.GetSysString(1226), deckManager.GetLFListName(pkt->info.lflist)); str.append(msgbuf); - myswprintf(msgbuf, L"%ls%ls\n", dataManager.GetSysString(1225), dataManager.GetSysString(1240 + pkt->info.rule)); + myswprintf(msgbuf, L"%ls%ls\n", dataManager.GetSysString(1225), dataManager.GetSysString(1481 + pkt->info.rule)); str.append(msgbuf); myswprintf(msgbuf, L"%ls%ls\n", dataManager.GetSysString(1227), dataManager.GetSysString(1244 + pkt->info.mode)); str.append(msgbuf); @@ -319,8 +474,8 @@ void DuelClient::HandleSTOCPacketLan(char* data, unsigned int len) { str.append(msgbuf); myswprintf(msgbuf, L"%ls%d\n", dataManager.GetSysString(1233), pkt->info.draw_count); str.append(msgbuf); - if(pkt->info.enable_priority) { - myswprintf(msgbuf, L"*%ls\n", dataManager.GetSysString(1236)); + if(pkt->info.duel_rule != DEFAULT_DUEL_RULE) { + myswprintf(msgbuf, L"*%ls\n", dataManager.GetSysString(1260 + pkt->info.duel_rule - 1)); str.append(msgbuf); } if(pkt->info.no_check_deck) { @@ -331,7 +486,7 @@ void DuelClient::HandleSTOCPacketLan(char* data, unsigned int len) { myswprintf(msgbuf, L"*%ls\n", dataManager.GetSysString(1230)); str.append(msgbuf); } - mainGame->gMutex.Lock(); + mainGame->gMutex.lock(); if(pkt->info.mode == 2) { mainGame->dInfo.isTag = true; mainGame->chkHostPrepReady[2]->setVisible(true); @@ -345,37 +500,44 @@ void DuelClient::HandleSTOCPacketLan(char* data, unsigned int len) { mainGame->stHostPrepDuelist[2]->setVisible(false); mainGame->stHostPrepDuelist[3]->setVisible(false); } - for(int i = 0; i < 4; ++i) + for(int i = 0; i < 4; ++i) { mainGame->chkHostPrepReady[i]->setChecked(false); + mainGame->stHostPrepDuelist[i]->setText(L""); + mainGame->stHostPrepDuelist[i]->setToolTipText(L""); + } + mainGame->btnHostPrepReady->setVisible(true); + mainGame->btnHostPrepNotReady->setVisible(false); mainGame->dInfo.time_limit = pkt->info.time_limit; mainGame->dInfo.time_left[0] = 0; mainGame->dInfo.time_left[1] = 0; - mainGame->deckBuilder.filterList = 0; - for(auto lit = deckManager._lfList.begin(); lit != deckManager._lfList.end(); ++lit) - if(lit->hash == pkt->info.lflist) - mainGame->deckBuilder.filterList = lit->content; - if(mainGame->deckBuilder.filterList == 0) - mainGame->deckBuilder.filterList = deckManager._lfList[0].content; - mainGame->stHostPrepDuelist[0]->setText(L""); - mainGame->stHostPrepDuelist[1]->setText(L""); - mainGame->stHostPrepDuelist[2]->setText(L""); - mainGame->stHostPrepDuelist[3]->setText(L""); + mainGame->deckBuilder.filterList = deckManager.GetLFList(pkt->info.lflist); + if(mainGame->deckBuilder.filterList == nullptr) + mainGame->deckBuilder.filterList = &deckManager._lfList[0]; mainGame->stHostPrepOB->setText(L""); - mainGame->SetStaticText(mainGame->stHostPrepRule, 180, mainGame->guiFont, (wchar_t*)str.c_str()); - mainGame->RefreshDeck(mainGame->cbDeckSelect); + mainGame->SetStaticText(mainGame->stHostPrepRule, 180, mainGame->guiFont, str.c_str()); + mainGame->RefreshCategoryDeck(mainGame->cbCategorySelect, mainGame->cbDeckSelect); + mainGame->cbCategorySelect->setEnabled(true); mainGame->cbDeckSelect->setEnabled(true); - if(mainGame->wCreateHost->isVisible()) - mainGame->HideElement(mainGame->wCreateHost); - else if (mainGame->wLanWindow->isVisible()) - mainGame->HideElement(mainGame->wLanWindow); + mainGame->HideElement(mainGame->wCreateHost); + mainGame->HideElement(mainGame->wLanWindow); + mainGame->HideElement(mainGame->wSinglePlay); mainGame->ShowElement(mainGame->wHostPrepare); - mainGame->wChat->setVisible(true); - mainGame->gMutex.Unlock(); + mainGame->ResizeChatInputWindow(); + if(!mainGame->chkIgnore1->isChecked()) + mainGame->wChat->setVisible(true); + mainGame->gMutex.unlock(); + mainGame->dInfo.duel_rule = pkt->info.duel_rule; + mainGame->dInfo.start_lp = pkt->info.start_lp; + watching = 0; connect_state |= 0x4; break; } case STOC_TYPE_CHANGE: { - STOC_TypeChange* pkt = (STOC_TypeChange*)pdata; + if (len < 1 + (int)sizeof(STOC_TypeChange)) + return; + STOC_TypeChange packet; + std::memcpy(&packet, pdata, sizeof packet); + const auto* pkt = &packet; if(!mainGame->dInfo.isTag) { selftype = pkt->type & 0xf; is_host = ((pkt->type >> 4) & 0xf) != 0; @@ -391,16 +553,24 @@ void DuelClient::HandleSTOCPacketLan(char* data, unsigned int len) { mainGame->btnHostPrepKick[1]->setVisible(false); } mainGame->chkHostPrepReady[0]->setEnabled(false); - mainGame->chkHostPrepReady[0]->setChecked(false); mainGame->chkHostPrepReady[1]->setEnabled(false); - mainGame->chkHostPrepReady[1]->setChecked(false); if(selftype < 2) { mainGame->chkHostPrepReady[selftype]->setEnabled(true); + mainGame->chkHostPrepReady[selftype]->setChecked(false); mainGame->btnHostPrepDuelist->setEnabled(false); mainGame->btnHostPrepOB->setEnabled(true); + mainGame->btnHostPrepReady->setVisible(true); + mainGame->btnHostPrepNotReady->setVisible(false); } else { mainGame->btnHostPrepDuelist->setEnabled(true); mainGame->btnHostPrepOB->setEnabled(false); + mainGame->btnHostPrepReady->setVisible(false); + mainGame->btnHostPrepNotReady->setVisible(false); + } + if(mainGame->chkHostPrepReady[0]->isChecked() && mainGame->chkHostPrepReady[1]->isChecked()) { + mainGame->btnHostPrepStart->setEnabled(true); + } else { + mainGame->btnHostPrepStart->setEnabled(false); } } else { if(selftype < 4) { @@ -422,8 +592,18 @@ void DuelClient::HandleSTOCPacketLan(char* data, unsigned int len) { if(selftype < 4) { mainGame->chkHostPrepReady[selftype]->setEnabled(true); mainGame->btnHostPrepOB->setEnabled(true); + mainGame->btnHostPrepReady->setVisible(true); + mainGame->btnHostPrepNotReady->setVisible(false); } else { mainGame->btnHostPrepOB->setEnabled(false); + mainGame->btnHostPrepReady->setVisible(false); + mainGame->btnHostPrepNotReady->setVisible(false); + } + if(mainGame->chkHostPrepReady[0]->isChecked() && mainGame->chkHostPrepReady[1]->isChecked() + && mainGame->chkHostPrepReady[2]->isChecked() && mainGame->chkHostPrepReady[3]->isChecked()) { + mainGame->btnHostPrepStart->setEnabled(true); + } else { + mainGame->btnHostPrepStart->setEnabled(false); } } mainGame->dInfo.player_type = selftype; @@ -432,9 +612,10 @@ void DuelClient::HandleSTOCPacketLan(char* data, unsigned int len) { case STOC_DUEL_START: { mainGame->HideElement(mainGame->wHostPrepare); mainGame->WaitFrameSignal(11); - mainGame->gMutex.Lock(); + mainGame->gMutex.lock(); mainGame->dField.Clear(); mainGame->dInfo.isStarted = true; + mainGame->dInfo.isFinished = false; mainGame->dInfo.lp[0] = 0; mainGame->dInfo.lp[1] = 0; mainGame->dInfo.strLP[0][0] = 0; @@ -443,106 +624,160 @@ void DuelClient::HandleSTOCPacketLan(char* data, unsigned int len) { mainGame->dInfo.time_left[0] = 0; mainGame->dInfo.time_left[1] = 0; mainGame->dInfo.time_player = 2; + mainGame->dInfo.isReplaySwapped = false; mainGame->is_building = false; mainGame->wCardImg->setVisible(true); mainGame->wInfos->setVisible(true); mainGame->wPhase->setVisible(true); mainGame->btnSideOK->setVisible(false); - mainGame->btnDP->setVisible(false); - mainGame->btnSP->setVisible(false); - mainGame->btnM1->setVisible(false); + mainGame->btnSideShuffle->setVisible(false); + mainGame->btnSideSort->setVisible(false); + mainGame->btnSideReload->setVisible(false); + mainGame->btnPhaseStatus->setVisible(false); mainGame->btnBP->setVisible(false); mainGame->btnM2->setVisible(false); mainGame->btnEP->setVisible(false); mainGame->btnShuffle->setVisible(false); - mainGame->wChat->setVisible(true); - mainGame->imgCard->setImage(imageManager.tCover); + mainGame->ResizeChatInputWindow(); + if(!mainGame->chkIgnore1->isChecked()) + mainGame->wChat->setVisible(true); + if(mainGame->chkDefaultShowChain->isChecked()) { + mainGame->always_chain = true; + mainGame->ignore_chain = false; + mainGame->chain_when_avail = false; + } mainGame->device->setEventReceiver(&mainGame->dField); if(!mainGame->dInfo.isTag) { if(selftype > 1) { - mainGame->dInfo.player_type = 7; + mainGame->dInfo.player_type = NETPLAYER_TYPE_OBSERVER; mainGame->btnLeaveGame->setText(dataManager.GetSysString(1350)); mainGame->btnLeaveGame->setVisible(true); + mainGame->btnSpectatorSwap->setVisible(true); } if(selftype != 1) { - BufferIO::CopyWStr(mainGame->stHostPrepDuelist[0]->getText(), mainGame->dInfo.hostname, 20); - BufferIO::CopyWStr(mainGame->stHostPrepDuelist[1]->getText(), mainGame->dInfo.clientname, 20); + BufferIO::CopyWideString(mainGame->stHostPrepDuelist[0]->getToolTipText().c_str(), mainGame->dInfo.hostname); + BufferIO::CopyWideString(mainGame->stHostPrepDuelist[1]->getToolTipText().c_str(), mainGame->dInfo.clientname); } else { - BufferIO::CopyWStr(mainGame->stHostPrepDuelist[1]->getText(), mainGame->dInfo.hostname, 20); - BufferIO::CopyWStr(mainGame->stHostPrepDuelist[0]->getText(), mainGame->dInfo.clientname, 20); + BufferIO::CopyWideString(mainGame->stHostPrepDuelist[1]->getToolTipText().c_str(), mainGame->dInfo.hostname); + BufferIO::CopyWideString(mainGame->stHostPrepDuelist[0]->getToolTipText().c_str(), mainGame->dInfo.clientname); } } else { if(selftype > 3) { - mainGame->dInfo.player_type = 7; + mainGame->dInfo.player_type = NETPLAYER_TYPE_OBSERVER; mainGame->btnLeaveGame->setText(dataManager.GetSysString(1350)); mainGame->btnLeaveGame->setVisible(true); + mainGame->btnSpectatorSwap->setVisible(true); } if(selftype > 1 && selftype < 4) { - BufferIO::CopyWStr(mainGame->stHostPrepDuelist[2]->getText(), mainGame->dInfo.hostname, 20); - BufferIO::CopyWStr(mainGame->stHostPrepDuelist[3]->getText(), mainGame->dInfo.hostname_tag, 20); - BufferIO::CopyWStr(mainGame->stHostPrepDuelist[0]->getText(), mainGame->dInfo.clientname, 20); - BufferIO::CopyWStr(mainGame->stHostPrepDuelist[1]->getText(), mainGame->dInfo.clientname_tag, 20); + BufferIO::CopyWideString(mainGame->stHostPrepDuelist[2]->getToolTipText().c_str(), mainGame->dInfo.hostname); + BufferIO::CopyWideString(mainGame->stHostPrepDuelist[3]->getToolTipText().c_str(), mainGame->dInfo.hostname_tag); + BufferIO::CopyWideString(mainGame->stHostPrepDuelist[0]->getToolTipText().c_str(), mainGame->dInfo.clientname); + BufferIO::CopyWideString(mainGame->stHostPrepDuelist[1]->getToolTipText().c_str(), mainGame->dInfo.clientname_tag); } else { - BufferIO::CopyWStr(mainGame->stHostPrepDuelist[0]->getText(), mainGame->dInfo.hostname, 20); - BufferIO::CopyWStr(mainGame->stHostPrepDuelist[1]->getText(), mainGame->dInfo.hostname_tag, 20); - BufferIO::CopyWStr(mainGame->stHostPrepDuelist[2]->getText(), mainGame->dInfo.clientname, 20); - BufferIO::CopyWStr(mainGame->stHostPrepDuelist[3]->getText(), mainGame->dInfo.clientname_tag, 20); + BufferIO::CopyWideString(mainGame->stHostPrepDuelist[0]->getToolTipText().c_str(), mainGame->dInfo.hostname); + BufferIO::CopyWideString(mainGame->stHostPrepDuelist[1]->getToolTipText().c_str(), mainGame->dInfo.hostname_tag); + BufferIO::CopyWideString(mainGame->stHostPrepDuelist[2]->getToolTipText().c_str(), mainGame->dInfo.clientname); + BufferIO::CopyWideString(mainGame->stHostPrepDuelist[3]->getToolTipText().c_str(), mainGame->dInfo.clientname_tag); } mainGame->dInfo.tag_player[0] = false; mainGame->dInfo.tag_player[1] = false; } - mainGame->gMutex.Unlock(); + mainGame->gMutex.unlock(); match_kill = 0; break; } case STOC_DUEL_END: { - mainGame->gMutex.Lock(); + mainGame->gMutex.lock(); + if(mainGame->dInfo.player_type < 7) + mainGame->btnLeaveGame->setVisible(false); + mainGame->CloseGameButtons(); mainGame->stMessage->setText(dataManager.GetSysString(1500)); mainGame->PopupElement(mainGame->wMessage); - mainGame->gMutex.Unlock(); + mainGame->gMutex.unlock(); mainGame->actionSignal.Reset(); mainGame->actionSignal.Wait(); mainGame->closeDoneSignal.Reset(); mainGame->closeSignal.Set(); mainGame->closeDoneSignal.Wait(); - mainGame->gMutex.Lock(); + mainGame->gMutex.lock(); mainGame->dInfo.isStarted = false; + mainGame->dInfo.isInDuel = false; + mainGame->dInfo.isFinished = true; + mainGame->is_building = false; + mainGame->wDeckEdit->setVisible(false); mainGame->btnCreateHost->setEnabled(true); mainGame->btnJoinHost->setEnabled(true); mainGame->btnJoinCancel->setEnabled(true); + mainGame->btnStartBot->setEnabled(true); + mainGame->btnBotCancel->setEnabled(true); + mainGame->stTip->setVisible(false); + mainGame->ResizeChatInputWindow(); mainGame->device->setEventReceiver(&mainGame->menuHandler); - mainGame->ShowElement(mainGame->wLanWindow); - mainGame->gMutex.Unlock(); + if(bot_mode) + mainGame->ShowElement(mainGame->wSinglePlay); + else + mainGame->ShowElement(mainGame->wLanWindow); + mainGame->gMutex.unlock(); event_base_loopbreak(client_base); if(exit_on_return) mainGame->device->closeDevice(); break; } case STOC_REPLAY: { - mainGame->gMutex.Lock(); + if (len < 1 + (int)sizeof(ExtendedReplayHeader)) + return; + mainGame->gMutex.lock(); mainGame->wPhase->setVisible(false); if(mainGame->dInfo.player_type < 7) mainGame->btnLeaveGame->setVisible(false); - mainGame->ebRSName->setText(L""); - mainGame->PopupElement(mainGame->wReplaySave); - mainGame->gMutex.Unlock(); - mainGame->replaySignal.Reset(); - mainGame->replaySignal.Wait(); + mainGame->CloseGameButtons(); + auto prep = pdata; + Replay new_replay; + std::memcpy(&new_replay.pheader, prep, sizeof(new_replay.pheader)); + time_t starttime; + if (new_replay.pheader.base.flag & REPLAY_UNIFORM) + starttime = new_replay.pheader.base.start_time; + else + starttime = new_replay.pheader.base.seed; + wchar_t timetext[40]; + std::wcsftime(timetext, sizeof timetext / sizeof timetext[0], L"%Y-%m-%d %H-%M-%S", std::localtime(&starttime)); + mainGame->ebRSName->setText(timetext); + if(!mainGame->chkAutoSaveReplay->isChecked()) { + mainGame->wReplaySave->setText(dataManager.GetSysString(1340)); + mainGame->PopupElement(mainGame->wReplaySave); + mainGame->gMutex.unlock(); + mainGame->replaySignal.Reset(); + mainGame->replaySignal.Wait(); + } + else { + mainGame->actionParam = 1; + wchar_t msgbuf[256]; + myswprintf(msgbuf, dataManager.GetSysString(1367), timetext); + mainGame->SetStaticText(mainGame->stACMessage, 310, mainGame->guiFont, msgbuf); + mainGame->PopupElement(mainGame->wACMessage, 20); + mainGame->gMutex.unlock(); + mainGame->WaitFrameSignal(30); + } if(mainGame->actionParam || !is_host) { - char* prep = pdata; - Replay new_replay; - memcpy(&new_replay.pheader, prep, sizeof(ReplayHeader)); - prep += sizeof(ReplayHeader); - memcpy(new_replay.comp_data, prep, len - sizeof(ReplayHeader) - 1); - new_replay.comp_size = len - sizeof(ReplayHeader) - 1; - if(mainGame->actionParam) - new_replay.SaveReplay(mainGame->ebRSName->getText()); - else new_replay.SaveReplay(L"_LastReplay"); + prep += sizeof new_replay.pheader; + std::memcpy(new_replay.comp_data, prep, len - sizeof new_replay.pheader - 1); + new_replay.comp_size = len - sizeof new_replay.pheader - 1; + if (mainGame->actionParam) { + bool save_result = new_replay.SaveReplay(mainGame->ebRSName->getText()); + if (!save_result) + new_replay.SaveReplay(L"_LastReplay"); + } + else + new_replay.SaveReplay(L"_LastReplay"); } break; } case STOC_TIME_LIMIT: { - STOC_TimeLimit* pkt = (STOC_TimeLimit*)pdata; + if (len < 1 + (int)sizeof(STOC_TimeLimit)) + return; + STOC_TimeLimit packet; + std::memcpy(&packet, pdata, sizeof packet); + const auto* pkt = &packet; int lplayer = mainGame->LocalPlayer(pkt->player); if(lplayer == 0) DuelClient::SendPacketToServer(CTOS_TIME_CONFIRM); @@ -551,30 +786,32 @@ void DuelClient::HandleSTOCPacketLan(char* data, unsigned int len) { break; } case STOC_CHAT: { - STOC_Chat* pkt = (STOC_Chat*)pdata; - int player = pkt->player; + if (len < 1 + sizeof(uint16_t) + sizeof(uint16_t) * 1) + return; + if (len > 1 + sizeof(uint16_t) + sizeof(uint16_t) * LEN_CHAT_MSG) + return; + const int chat_msg_size = len - 1 - sizeof(uint16_t); + if (chat_msg_size % sizeof(uint16_t)) + return; + uint16_t chat_player_type = BufferIO::Read(pdata); + uint16_t chat_msg[LEN_CHAT_MSG]; + std::memcpy(chat_msg, pdata, chat_msg_size); + pdata += chat_msg_size; + const int chat_msg_len = chat_msg_size / sizeof(uint16_t); + if (chat_msg[chat_msg_len - 1] != 0) + return; + int player = chat_player_type; + auto play_sound = false; if(player < 4) { if(mainGame->chkIgnore1->isChecked()) break; - if(!mainGame->dInfo.isTag) { - if(mainGame->dInfo.isStarted) - player = mainGame->LocalPlayer(player); - } else { - if(mainGame->dInfo.isStarted && !mainGame->dInfo.isFirst) - player ^= 2; - if(player == 0) - player = 0; - else if(player == 1) - player = 2; - else if(player == 2) - player = 1; - else if(player == 3) - player = 3; - else - player = 10; - } + auto localplayer = mainGame->ChatLocalPlayer(player); + player = localplayer & 0xf; + if(!(localplayer & 0x10)) + play_sound = true; } else { if(player == 8) { //system custom message. + play_sound = true; if(mainGame->chkIgnore1->isChecked()) break; } else if(player < 11 || player > 19) { @@ -583,135 +820,263 @@ void DuelClient::HandleSTOCPacketLan(char* data, unsigned int len) { player = 10; } } - wchar_t msg[256]; - BufferIO::CopyWStr(pkt->msg, msg, 256); - msg[(len - 3) / 2] = 0; - mainGame->gMutex.Lock(); - mainGame->AddChatMsg(msg, player); - mainGame->gMutex.Unlock(); + // UTF-16 to wchar_t + wchar_t msg[LEN_CHAT_MSG]; + BufferIO::CopyCharArray(chat_msg, msg); + mainGame->gMutex.lock(); + mainGame->AddChatMsg(msg, player, play_sound); + mainGame->gMutex.unlock(); break; } case STOC_HS_PLAYER_ENTER: { - STOC_HS_PlayerEnter* pkt = (STOC_HS_PlayerEnter*)pdata; + if (len < 1 + sizeof(STOC_HS_PlayerEnter)) + return; + soundManager.PlaySoundEffect(SOUND_PLAYER_ENTER); + STOC_HS_PlayerEnter packet; + std::memcpy(&packet, pdata, sizeof(STOC_HS_PlayerEnter)); + auto pkt = &packet; if(pkt->pos > 3) break; wchar_t name[20]; - BufferIO::CopyWStr(pkt->name, name, 20); + BufferIO::NullTerminate(pkt->name); + BufferIO::CopyCharArray(pkt->name, name); if(mainGame->dInfo.isTag) { if(pkt->pos == 0) - BufferIO::CopyWStr(pkt->name, mainGame->dInfo.hostname, 20); + BufferIO::CopyCharArray(pkt->name, mainGame->dInfo.hostname); else if(pkt->pos == 1) - BufferIO::CopyWStr(pkt->name, mainGame->dInfo.hostname_tag, 20); + BufferIO::CopyCharArray(pkt->name, mainGame->dInfo.hostname_tag); else if(pkt->pos == 2) - BufferIO::CopyWStr(pkt->name, mainGame->dInfo.clientname, 20); + BufferIO::CopyCharArray(pkt->name, mainGame->dInfo.clientname); else if(pkt->pos == 3) - BufferIO::CopyWStr(pkt->name, mainGame->dInfo.clientname_tag, 20); + BufferIO::CopyCharArray(pkt->name, mainGame->dInfo.clientname_tag); } else { if(pkt->pos == 0) - BufferIO::CopyWStr(pkt->name, mainGame->dInfo.hostname, 20); + BufferIO::CopyCharArray(pkt->name, mainGame->dInfo.hostname); else if(pkt->pos == 1) - BufferIO::CopyWStr(pkt->name, mainGame->dInfo.clientname, 20); + BufferIO::CopyCharArray(pkt->name, mainGame->dInfo.clientname); } - mainGame->gMutex.Lock(); - mainGame->stHostPrepDuelist[pkt->pos]->setText(name); - mainGame->gMutex.Unlock(); + mainGame->gMutex.lock(); + if(mainGame->gameConf.hide_player_name) + mainGame->stHostPrepDuelist[pkt->pos]->setText(L"[********]"); + else + mainGame->stHostPrepDuelist[pkt->pos]->setText(name); + mainGame->stHostPrepDuelist[pkt->pos]->setToolTipText(name); + mainGame->gMutex.unlock(); + mainGame->FlashWindow(); break; } case STOC_HS_PLAYER_CHANGE: { - STOC_HS_PlayerChange* pkt = (STOC_HS_PlayerChange*)pdata; + if (len < 1 + (int)sizeof(STOC_HS_PlayerChange)) + return; + STOC_HS_PlayerChange packet; + std::memcpy(&packet, pdata, sizeof packet); + const auto* pkt = &packet; unsigned char pos = (pkt->status >> 4) & 0xf; unsigned char state = pkt->status & 0xf; if(pos > 3) break; - mainGame->gMutex.Lock(); + mainGame->gMutex.lock(); if(state < 8) { - wchar_t* prename = (wchar_t*)mainGame->stHostPrepDuelist[pos]->getText(); - mainGame->stHostPrepDuelist[state]->setText(prename); + soundManager.PlaySoundEffect(SOUND_PLAYER_ENTER); + const wchar_t* prename = mainGame->stHostPrepDuelist[pos]->getToolTipText().c_str(); + if(mainGame->gameConf.hide_player_name) + mainGame->stHostPrepDuelist[state]->setText(L"[********]"); + else + mainGame->stHostPrepDuelist[state]->setText(prename); + mainGame->stHostPrepDuelist[state]->setToolTipText(prename); mainGame->stHostPrepDuelist[pos]->setText(L""); + mainGame->stHostPrepDuelist[pos]->setToolTipText(L""); mainGame->chkHostPrepReady[pos]->setChecked(false); if(pos == 0) - BufferIO::CopyWStr(prename, mainGame->dInfo.hostname, 20); + BufferIO::CopyCharArray(prename, mainGame->dInfo.hostname); else if(pos == 1) - BufferIO::CopyWStr(prename, mainGame->dInfo.hostname_tag, 20); + BufferIO::CopyCharArray(prename, mainGame->dInfo.hostname_tag); else if(pos == 2) - BufferIO::CopyWStr(prename, mainGame->dInfo.clientname, 20); + BufferIO::CopyCharArray(prename, mainGame->dInfo.clientname); else if(pos == 3) - BufferIO::CopyWStr(prename, mainGame->dInfo.clientname_tag, 20); + BufferIO::CopyCharArray(prename, mainGame->dInfo.clientname_tag); } else if(state == PLAYERCHANGE_READY) { mainGame->chkHostPrepReady[pos]->setChecked(true); + if(pos == selftype) { + mainGame->btnHostPrepReady->setVisible(false); + mainGame->btnHostPrepNotReady->setVisible(true); + } } else if(state == PLAYERCHANGE_NOTREADY) { mainGame->chkHostPrepReady[pos]->setChecked(false); + if(pos == selftype) { + mainGame->btnHostPrepReady->setVisible(true); + mainGame->btnHostPrepNotReady->setVisible(false); + } } else if(state == PLAYERCHANGE_LEAVE) { mainGame->stHostPrepDuelist[pos]->setText(L""); + mainGame->stHostPrepDuelist[pos]->setToolTipText(L""); mainGame->chkHostPrepReady[pos]->setChecked(false); } else if(state == PLAYERCHANGE_OBSERVE) { watching++; wchar_t watchbuf[32]; myswprintf(watchbuf, L"%ls%d", dataManager.GetSysString(1253), watching); mainGame->stHostPrepDuelist[pos]->setText(L""); + mainGame->stHostPrepDuelist[pos]->setToolTipText(L""); mainGame->chkHostPrepReady[pos]->setChecked(false); mainGame->stHostPrepOB->setText(watchbuf); } - mainGame->gMutex.Unlock(); + if(mainGame->chkHostPrepReady[0]->isChecked() && mainGame->chkHostPrepReady[1]->isChecked() + && (!mainGame->dInfo.isTag || (mainGame->chkHostPrepReady[2]->isChecked() && mainGame->chkHostPrepReady[3]->isChecked()))) { + mainGame->btnHostPrepStart->setEnabled(true); + } else { + mainGame->btnHostPrepStart->setEnabled(false); + } + mainGame->gMutex.unlock(); break; } case STOC_HS_WATCH_CHANGE: { - STOC_HS_WatchChange* pkt = (STOC_HS_WatchChange*)pdata; + if (len < 1 + (int)sizeof(STOC_HS_WatchChange)) + return; + STOC_HS_WatchChange packet; + std::memcpy(&packet, pdata, sizeof packet); + const auto* pkt = &packet; watching = pkt->watch_count; wchar_t watchbuf[32]; myswprintf(watchbuf, L"%ls%d", dataManager.GetSysString(1253), watching); - mainGame->gMutex.Lock(); + mainGame->gMutex.lock(); mainGame->stHostPrepOB->setText(watchbuf); - mainGame->gMutex.Unlock(); + mainGame->gMutex.unlock(); + break; + } + case STOC_TEAMMATE_SURRENDER: { + if(!mainGame->dField.tag_surrender) + mainGame->dField.tag_teammate_surrender = true; + mainGame->btnLeaveGame->setText(dataManager.GetSysString(1355)); break; } } } -int DuelClient::ClientAnalyze(char * msg, unsigned int len) { - char* pbuf = msg; +// Analyze STOC_GAME_MSG packet +bool DuelClient::ClientAnalyze(unsigned char* msg, int len) { + unsigned char* pbuf = msg; wchar_t textBuffer[256]; - mainGame->dInfo.curMsg = BufferIO::ReadUInt8(pbuf); - mainGame->wCmdMenu->setVisible(false); + mainGame->dInfo.curMsg = BufferIO::Read(pbuf); + if(mainGame->dInfo.curMsg != MSG_RETRY) { + std::memcpy(last_successful_msg, msg, len); + last_successful_msg_length = len; + } + mainGame->dField.HideMenu(); if(!mainGame->dInfo.isReplay && mainGame->dInfo.curMsg != MSG_WAITING && mainGame->dInfo.curMsg != MSG_CARD_SELECTED) { mainGame->waitFrame = -1; mainGame->stHintMsg->setVisible(false); if(mainGame->wCardSelect->isVisible()) { - mainGame->gMutex.Lock(); + mainGame->gMutex.lock(); mainGame->HideElement(mainGame->wCardSelect); - mainGame->gMutex.Unlock(); + mainGame->gMutex.unlock(); + mainGame->WaitFrameSignal(11); + } + if(mainGame->wOptions->isVisible()) { + mainGame->gMutex.lock(); + mainGame->HideElement(mainGame->wOptions); + mainGame->gMutex.unlock(); mainGame->WaitFrameSignal(11); } } if(mainGame->dInfo.time_player == 1) mainGame->dInfo.time_player = 2; + if(is_swapping) { + mainGame->gMutex.lock(); + mainGame->dField.ReplaySwap(); + mainGame->gMutex.unlock(); + is_swapping = false; + } switch(mainGame->dInfo.curMsg) { case MSG_RETRY: { - mainGame->gMutex.Lock(); + if(last_successful_msg_length) { + auto p = last_successful_msg; + auto last_msg = BufferIO::Read(p); + int err_desc = 1421; + switch(last_msg) { + case MSG_ANNOUNCE_CARD: + err_desc = 1422; + break; + case MSG_ANNOUNCE_ATTRIB: + err_desc = 1423; + break; + case MSG_ANNOUNCE_RACE: + err_desc = 1424; + break; + case MSG_ANNOUNCE_NUMBER: + err_desc = 1425; + break; + case MSG_SELECT_EFFECTYN: + case MSG_SELECT_YESNO: + case MSG_SELECT_OPTION: + err_desc = 1426; + break; + case MSG_SELECT_CARD: + case MSG_SELECT_UNSELECT_CARD: + case MSG_SELECT_TRIBUTE: + case MSG_SELECT_SUM: + case MSG_SORT_CARD: + err_desc = 1427; + break; + case MSG_SELECT_CHAIN: + err_desc = 1428; + break; + case MSG_SELECT_PLACE: + case MSG_SELECT_DISFIELD: + err_desc = 1429; + break; + case MSG_SELECT_POSITION: + err_desc = 1430; + break; + case MSG_SELECT_COUNTER: + err_desc = 1431; + break; + default: + break; + } + mainGame->gMutex.lock(); + mainGame->stMessage->setText(dataManager.GetDesc(err_desc)); + mainGame->PopupElement(mainGame->wMessage); + mainGame->gMutex.unlock(); + mainGame->actionSignal.Reset(); + mainGame->actionSignal.Wait(); + select_hint = last_select_hint; + return ClientAnalyze(last_successful_msg, last_successful_msg_length); + } + mainGame->gMutex.lock(); mainGame->stMessage->setText(L"Error occurs."); mainGame->PopupElement(mainGame->wMessage); - mainGame->gMutex.Unlock(); + mainGame->gMutex.unlock(); mainGame->actionSignal.Reset(); mainGame->actionSignal.Wait(); - mainGame->closeDoneSignal.Reset(); - mainGame->closeSignal.Set(); - mainGame->closeDoneSignal.Wait(); - mainGame->gMutex.Lock(); - mainGame->dInfo.isStarted = false; - mainGame->btnCreateHost->setEnabled(true); - mainGame->btnJoinHost->setEnabled(true); - mainGame->btnJoinCancel->setEnabled(true); - mainGame->device->setEventReceiver(&mainGame->menuHandler); - mainGame->ShowElement(mainGame->wLanWindow); - mainGame->gMutex.Unlock(); - event_base_loopbreak(client_base); - if(exit_on_return) - mainGame->device->closeDevice(); + if(!mainGame->dInfo.isSingleMode) { + mainGame->closeDoneSignal.Reset(); + mainGame->closeSignal.Set(); + mainGame->closeDoneSignal.Wait(); + mainGame->gMutex.lock(); + mainGame->dInfo.isStarted = false; + mainGame->dInfo.isInDuel = false; + mainGame->dInfo.isFinished = false; + mainGame->btnCreateHost->setEnabled(true); + mainGame->btnJoinHost->setEnabled(true); + mainGame->btnJoinCancel->setEnabled(true); + mainGame->btnStartBot->setEnabled(true); + mainGame->btnBotCancel->setEnabled(true); + mainGame->stTip->setVisible(false); + mainGame->device->setEventReceiver(&mainGame->menuHandler); + if(bot_mode) + mainGame->ShowElement(mainGame->wSinglePlay); + else + mainGame->ShowElement(mainGame->wLanWindow); + mainGame->gMutex.unlock(); + event_base_loopbreak(client_base); + if(exit_on_return) + mainGame->device->closeDevice(); + } return false; } case MSG_HINT: { - int type = BufferIO::ReadInt8(pbuf); - /*int player = */BufferIO::ReadInt8(pbuf); - int data = BufferIO::ReadInt32(pbuf); + int type = BufferIO::Read(pbuf); + int player = BufferIO::Read(pbuf); + int data = BufferIO::Read(pbuf); if(mainGame->dInfo.isReplay && mainGame->dInfo.isReplaySkiping) return true; switch (type) { @@ -720,26 +1085,26 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { break; } case HINT_MESSAGE: { - mainGame->gMutex.Lock(); + mainGame->gMutex.lock(); mainGame->stMessage->setText(dataManager.GetDesc(data)); mainGame->PopupElement(mainGame->wMessage); - mainGame->gMutex.Unlock(); + mainGame->gMutex.unlock(); mainGame->actionSignal.Reset(); mainGame->actionSignal.Wait(); break; } case HINT_SELECTMSG: { select_hint = data; + last_select_hint = data; break; } case HINT_OPSELECTED: { myswprintf(textBuffer, dataManager.GetSysString(1510), dataManager.GetDesc(data)); - mainGame->lstLog->addItem(textBuffer); - mainGame->logParam.push_back(0); - mainGame->gMutex.Lock(); - mainGame->SetStaticText(mainGame->stACMessage, 310, mainGame->textFont, textBuffer); + mainGame->AddLog(textBuffer); + mainGame->gMutex.lock(); + mainGame->SetStaticText(mainGame->stACMessage, 310, mainGame->guiFont, textBuffer); mainGame->PopupElement(mainGame->wACMessage, 20); - mainGame->gMutex.Unlock(); + mainGame->gMutex.unlock(); mainGame->WaitFrameSignal(40); break; } @@ -751,46 +1116,44 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { break; } case HINT_RACE: { - myswprintf(textBuffer, dataManager.GetSysString(1511), dataManager.FormatRace(data)); - mainGame->lstLog->addItem(textBuffer); - mainGame->logParam.push_back(0); - mainGame->gMutex.Lock(); - mainGame->SetStaticText(mainGame->stACMessage, 310, mainGame->textFont, textBuffer); + const auto& race = dataManager.FormatRace(data); + myswprintf(textBuffer, dataManager.GetSysString(1511), race.c_str()); + mainGame->AddLog(textBuffer); + mainGame->gMutex.lock(); + mainGame->SetStaticText(mainGame->stACMessage, 310, mainGame->guiFont, textBuffer); mainGame->PopupElement(mainGame->wACMessage, 20); - mainGame->gMutex.Unlock(); + mainGame->gMutex.unlock(); mainGame->WaitFrameSignal(40); break; } case HINT_ATTRIB: { - myswprintf(textBuffer, dataManager.GetSysString(1511), dataManager.FormatAttribute(data)); - mainGame->lstLog->addItem(textBuffer); - mainGame->logParam.push_back(0); - mainGame->gMutex.Lock(); - mainGame->SetStaticText(mainGame->stACMessage, 310, mainGame->textFont, textBuffer); + const auto& attribute = dataManager.FormatAttribute(data); + myswprintf(textBuffer, dataManager.GetSysString(1511), attribute.c_str()); + mainGame->AddLog(textBuffer); + mainGame->gMutex.lock(); + mainGame->SetStaticText(mainGame->stACMessage, 310, mainGame->guiFont, textBuffer); mainGame->PopupElement(mainGame->wACMessage, 20); - mainGame->gMutex.Unlock(); + mainGame->gMutex.unlock(); mainGame->WaitFrameSignal(40); break; } case HINT_CODE: { myswprintf(textBuffer, dataManager.GetSysString(1511), dataManager.GetName(data)); - mainGame->lstLog->addItem(textBuffer); - mainGame->logParam.push_back(data); - mainGame->gMutex.Lock(); - mainGame->SetStaticText(mainGame->stACMessage, 310, mainGame->textFont, textBuffer); + mainGame->AddLog(textBuffer, data); + mainGame->gMutex.lock(); + mainGame->SetStaticText(mainGame->stACMessage, 310, mainGame->guiFont, textBuffer); mainGame->PopupElement(mainGame->wACMessage, 20); - mainGame->gMutex.Unlock(); + mainGame->gMutex.unlock(); mainGame->WaitFrameSignal(40); break; } case HINT_NUMBER: { myswprintf(textBuffer, dataManager.GetSysString(1512), data); - mainGame->lstLog->addItem(textBuffer); - mainGame->logParam.push_back(0); - mainGame->gMutex.Lock(); - mainGame->SetStaticText(mainGame->stACMessage, 310, mainGame->textFont, textBuffer); + mainGame->AddLog(textBuffer); + mainGame->gMutex.lock(); + mainGame->SetStaticText(mainGame->stACMessage, 310, mainGame->guiFont, textBuffer); mainGame->PopupElement(mainGame->wACMessage, 20); - mainGame->gMutex.Unlock(); + mainGame->gMutex.unlock(); mainGame->WaitFrameSignal(40); break; } @@ -801,49 +1164,93 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { mainGame->WaitFrameSignal(30); break; } + case HINT_ZONE: { + if(mainGame->LocalPlayer(player) == 1) + data = (data >> 16) | (data << 16); + for(unsigned filter = 0x1; filter != 0; filter <<= 1) { + std::wstring str; + if(unsigned s = filter & data) { + if(s & 0x60) { + str += dataManager.GetSysString(1081); + data &= ~0x600000; + } else if(s & 0xffff) + str += dataManager.GetSysString(102); + else if(s & 0xffff0000) { + str += dataManager.GetSysString(103); + s >>= 16; + } + if(s & 0x1f) + str += dataManager.GetSysString(1002); + else if(s & 0xff00) { + s >>= 8; + if(s & 0x1f) + str += dataManager.GetSysString(1003); + else if(s & 0x20) + str += dataManager.GetSysString(1008); + else if(s & 0xc0) + str += dataManager.GetSysString(1009); + } + int seq = 1; + for(int i = 0x1; i < 0x100; i <<= 1) { + if(s & i) + break; + ++seq; + } + str += L"(" + std::to_wstring(seq) + L")"; + myswprintf(textBuffer, dataManager.GetSysString(1510), str.c_str()); + mainGame->AddLog(textBuffer); + } + } + mainGame->dField.selectable_field = data; + mainGame->WaitFrameSignal(40); + mainGame->dField.selectable_field = 0; + break; + } } break; } case MSG_WIN: { - int player = BufferIO::ReadInt8(pbuf); - int type = BufferIO::ReadInt8(pbuf); + mainGame->dInfo.isFinished = true; + int player = BufferIO::Read(pbuf); + int type = BufferIO::Read(pbuf); mainGame->showcarddif = 110; mainGame->showcardp = 0; - mainGame->dInfo.vic_string = 0; + mainGame->dInfo.vic_string = L""; wchar_t vic_buf[256]; if(player == 2) mainGame->showcardcode = 3; - else if(mainGame->LocalPlayer(player) == 0) { - mainGame->showcardcode = 1; - if(match_kill) - myswprintf(vic_buf, dataManager.GetVictoryString(0x20), dataManager.GetName(match_kill)); - else if(type < 0x10) - myswprintf(vic_buf, L"[%ls] %ls", mainGame->dInfo.clientname, dataManager.GetVictoryString(type)); - else - myswprintf(vic_buf, L"%ls", dataManager.GetVictoryString(type)); - mainGame->dInfo.vic_string = vic_buf; - } else { - mainGame->showcardcode = 2; + else { + wchar_t vic_name[20]; + if(mainGame->LocalPlayer(player) == 0) { + mainGame->showcardcode = 1; + myswprintf(vic_name, L"%ls", mainGame->dInfo.clientname); + } + else { + mainGame->showcardcode = 2; + myswprintf(vic_name, L"%ls", mainGame->dInfo.hostname); + } + if(mainGame->gameConf.hide_player_name) + myswprintf(vic_name, L"********"); if(match_kill) - myswprintf(vic_buf, dataManager.GetVictoryString(0x20), dataManager.GetName(match_kill)); + myswprintf(vic_buf, dataManager.GetVictoryString(0xffff), dataManager.GetName(match_kill)); else if(type < 0x10) - myswprintf(vic_buf, L"[%ls] %ls", mainGame->dInfo.hostname, dataManager.GetVictoryString(type)); + myswprintf(vic_buf, L"[%ls] %ls", vic_name, dataManager.GetVictoryString(type)); else myswprintf(vic_buf, L"%ls", dataManager.GetVictoryString(type)); mainGame->dInfo.vic_string = vic_buf; } mainGame->showcard = 101; mainGame->WaitFrameSignal(120); - mainGame->dInfo.vic_string = 0; + mainGame->dInfo.vic_string = L""; mainGame->showcard = 0; break; } case MSG_WAITING: { mainGame->waitFrame = 0; - mainGame->gMutex.Lock(); + mainGame->gMutex.lock(); mainGame->stHintMsg->setText(dataManager.GetSysString(1390)); mainGame->stHintMsg->setVisible(true); - mainGame->gMutex.Unlock(); + mainGame->gMutex.unlock(); return true; } case MSG_START: { @@ -853,8 +1260,10 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { mainGame->showcard = 101; mainGame->WaitFrameSignal(40); mainGame->showcard = 0; - mainGame->gMutex.Lock(); - int playertype = BufferIO::ReadInt8(pbuf); + mainGame->gMutex.lock(); + mainGame->dField.Clear(); + mainGame->dInfo.isInDuel = true; + int playertype = BufferIO::Read(pbuf); mainGame->dInfo.isFirst = (playertype & 0xf) ? false : true; if(playertype & 0xf0) mainGame->dInfo.player_type = 7; @@ -864,266 +1273,313 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { else mainGame->dInfo.tag_player[0] = true; } - mainGame->dInfo.lp[mainGame->LocalPlayer(0)] = BufferIO::ReadInt32(pbuf); - mainGame->dInfo.lp[mainGame->LocalPlayer(1)] = BufferIO::ReadInt32(pbuf); + mainGame->dInfo.duel_rule = BufferIO::Read(pbuf); + mainGame->dInfo.lp[mainGame->LocalPlayer(0)] = BufferIO::Read(pbuf); + mainGame->dInfo.lp[mainGame->LocalPlayer(1)] = BufferIO::Read(pbuf); myswprintf(mainGame->dInfo.strLP[0], L"%d", mainGame->dInfo.lp[0]); myswprintf(mainGame->dInfo.strLP[1], L"%d", mainGame->dInfo.lp[1]); - int deckc = BufferIO::ReadInt16(pbuf); - int extrac = BufferIO::ReadInt16(pbuf); + int deckc = BufferIO::Read(pbuf); + int extrac = BufferIO::Read(pbuf); mainGame->dField.Initial(mainGame->LocalPlayer(0), deckc, extrac); - deckc = BufferIO::ReadInt16(pbuf); - extrac = BufferIO::ReadInt16(pbuf); + deckc = BufferIO::Read(pbuf); + extrac = BufferIO::Read(pbuf); mainGame->dField.Initial(mainGame->LocalPlayer(1), deckc, extrac); mainGame->dInfo.turn = 0; - mainGame->dInfo.strTurn[0] = 0; mainGame->dInfo.is_shuffling = false; - mainGame->gMutex.Unlock(); + select_hint = 0; + select_unselect_hint = 0; + last_select_hint = 0; + last_successful_msg_length = 0; + if(mainGame->dInfo.isReplaySwapped) { + std::swap(mainGame->dInfo.hostname, mainGame->dInfo.clientname); + std::swap(mainGame->dInfo.hostname_tag, mainGame->dInfo.clientname_tag); + mainGame->dInfo.isReplaySwapped = false; + mainGame->dField.ReplaySwap(); + } + mainGame->gMutex.unlock(); return true; } case MSG_UPDATE_DATA: { - int player = mainGame->LocalPlayer(BufferIO::ReadInt8(pbuf)); - int location = BufferIO::ReadInt8(pbuf); - mainGame->gMutex.Lock(); + int player = mainGame->LocalPlayer(BufferIO::Read(pbuf)); + int location = BufferIO::Read(pbuf); + mainGame->gMutex.lock(); mainGame->dField.UpdateFieldCard(player, location, pbuf); - mainGame->gMutex.Unlock(); + mainGame->gMutex.unlock(); return true; } case MSG_UPDATE_CARD: { - int player = mainGame->LocalPlayer(BufferIO::ReadInt8(pbuf)); - int loc = BufferIO::ReadInt8(pbuf); - int seq = BufferIO::ReadInt8(pbuf); - mainGame->gMutex.Lock(); + int player = mainGame->LocalPlayer(BufferIO::Read(pbuf)); + unsigned int loc = BufferIO::Read(pbuf); + int seq = BufferIO::Read(pbuf); + mainGame->gMutex.lock(); mainGame->dField.UpdateCard(player, loc, seq, pbuf); - mainGame->gMutex.Unlock(); + mainGame->gMutex.unlock(); break; } case MSG_SELECT_BATTLECMD: { - /*int selecting_player = */BufferIO::ReadInt8(pbuf); - int /*code, */desc, count, con, loc, seq/*, diratt*/; + /*int selecting_player = */BufferIO::Read(pbuf); + int desc, count, con, seq/*, diratt*/; + unsigned int code, loc; ClientCard* pcard; mainGame->dField.activatable_cards.clear(); mainGame->dField.activatable_descs.clear(); - count = BufferIO::ReadInt8(pbuf); + mainGame->dField.conti_cards.clear(); + count = BufferIO::Read(pbuf); for (int i = 0; i < count; ++i) { - /*code = */BufferIO::ReadInt32(pbuf); - con = mainGame->LocalPlayer(BufferIO::ReadInt8(pbuf)); - loc = BufferIO::ReadInt8(pbuf); - seq = BufferIO::ReadInt8(pbuf); - desc = BufferIO::ReadInt32(pbuf); + code = BufferIO::Read(pbuf); + con = mainGame->LocalPlayer(BufferIO::Read(pbuf)); + loc = BufferIO::Read(pbuf); + seq = BufferIO::Read(pbuf); + desc = BufferIO::Read(pbuf); pcard = mainGame->dField.GetCard(con, loc, seq); + int flag = 0; + if(code & 0x80000000) { + flag = EDESC_OPERATION; + code &= 0x7fffffff; + } mainGame->dField.activatable_cards.push_back(pcard); - mainGame->dField.activatable_descs.push_back(desc); - pcard->cmdFlag |= COMMAND_ACTIVATE; - if (pcard->location == LOCATION_GRAVE) - mainGame->dField.grave_act = true; - if (pcard->location == LOCATION_REMOVED) - mainGame->dField.remove_act = true; + mainGame->dField.activatable_descs.push_back(std::make_pair(desc, flag)); + if(flag & EDESC_OPERATION) { + pcard->chain_code = code; + mainGame->dField.conti_cards.push_back(pcard); + mainGame->dField.conti_act = true; + } else { + pcard->cmdFlag |= COMMAND_ACTIVATE; + if(pcard->location == LOCATION_GRAVE) + mainGame->dField.grave_act[con] = true; + else if(pcard->location == LOCATION_REMOVED) + mainGame->dField.remove_act[con] = true; + else if(pcard->location == LOCATION_EXTRA) + mainGame->dField.extra_act[con] = true; + } } mainGame->dField.attackable_cards.clear(); - count = BufferIO::ReadInt8(pbuf); + count = BufferIO::Read(pbuf); for (int i = 0; i < count; ++i) { - /*code = */BufferIO::ReadInt32(pbuf); - con = mainGame->LocalPlayer(BufferIO::ReadInt8(pbuf)); - loc = BufferIO::ReadInt8(pbuf); - seq = BufferIO::ReadInt8(pbuf); - /*diratt = */BufferIO::ReadInt8(pbuf); + /*code = */BufferIO::Read(pbuf); + con = mainGame->LocalPlayer(BufferIO::Read(pbuf)); + loc = BufferIO::Read(pbuf); + seq = BufferIO::Read(pbuf); + /*diratt = */BufferIO::Read(pbuf); pcard = mainGame->dField.GetCard(con, loc, seq); mainGame->dField.attackable_cards.push_back(pcard); pcard->cmdFlag |= COMMAND_ATTACK; } - mainGame->gMutex.Lock(); - if(BufferIO::ReadInt8(pbuf)) { + mainGame->gMutex.lock(); + if(BufferIO::Read(pbuf)) { mainGame->btnM2->setVisible(true); mainGame->btnM2->setEnabled(true); mainGame->btnM2->setPressed(false); } - if(BufferIO::ReadInt8(pbuf)) { + if(BufferIO::Read(pbuf)) { mainGame->btnEP->setVisible(true); mainGame->btnEP->setEnabled(true); mainGame->btnEP->setPressed(false); } - mainGame->gMutex.Unlock(); + mainGame->gMutex.unlock(); return false; } case MSG_SELECT_IDLECMD: { - /*int selecting_player = */BufferIO::ReadInt8(pbuf); - int code, desc, count, con, loc, seq; + /*int selecting_player = */BufferIO::Read(pbuf); + int desc, count, con, seq; + unsigned int code, loc; ClientCard* pcard; mainGame->dField.summonable_cards.clear(); - count = BufferIO::ReadInt8(pbuf); + count = BufferIO::Read(pbuf); for (int i = 0; i < count; ++i) { - code = BufferIO::ReadInt32(pbuf); - con = mainGame->LocalPlayer(BufferIO::ReadInt8(pbuf)); - loc = BufferIO::ReadInt8(pbuf); - seq = BufferIO::ReadInt8(pbuf); + code = BufferIO::Read(pbuf); + con = mainGame->LocalPlayer(BufferIO::Read(pbuf)); + loc = BufferIO::Read(pbuf); + seq = BufferIO::Read(pbuf); pcard = mainGame->dField.GetCard(con, loc, seq); mainGame->dField.summonable_cards.push_back(pcard); pcard->cmdFlag |= COMMAND_SUMMON; } mainGame->dField.spsummonable_cards.clear(); - count = BufferIO::ReadInt8(pbuf); + count = BufferIO::Read(pbuf); for (int i = 0; i < count; ++i) { - code = BufferIO::ReadInt32(pbuf); - con = mainGame->LocalPlayer(BufferIO::ReadInt8(pbuf)); - loc = BufferIO::ReadInt8(pbuf); - seq = BufferIO::ReadInt8(pbuf); + code = BufferIO::Read(pbuf); + con = mainGame->LocalPlayer(BufferIO::Read(pbuf)); + loc = BufferIO::Read(pbuf); + seq = BufferIO::Read(pbuf); pcard = mainGame->dField.GetCard(con, loc, seq); mainGame->dField.spsummonable_cards.push_back(pcard); pcard->cmdFlag |= COMMAND_SPSUMMON; if (pcard->location == LOCATION_DECK) { pcard->SetCode(code); - mainGame->dField.deck_act = true; + mainGame->dField.deck_act[con] = true; + } else if (pcard->location == LOCATION_GRAVE) + mainGame->dField.grave_act[con] = true; + else if (pcard->location == LOCATION_REMOVED) + mainGame->dField.remove_act[con] = true; + else if (pcard->location == LOCATION_EXTRA) + mainGame->dField.extra_act[con] = true; + else { + int left_seq = mainGame->dInfo.duel_rule >= 4 ? 0 : 6; + if (pcard->location == LOCATION_SZONE && pcard->sequence == left_seq && (pcard->type & TYPE_PENDULUM) && !pcard->equipTarget) + mainGame->dField.pzone_act[con] = true; } - if (pcard->location == LOCATION_GRAVE) - mainGame->dField.grave_act = true; - if (pcard->location == LOCATION_REMOVED) - mainGame->dField.remove_act = true; - if (pcard->location == LOCATION_EXTRA) - mainGame->dField.extra_act = true; - if (pcard->location == LOCATION_SZONE && pcard->sequence == 6) - mainGame->dField.pzone_act[pcard->controler] = true; } mainGame->dField.reposable_cards.clear(); - count = BufferIO::ReadInt8(pbuf); + count = BufferIO::Read(pbuf); for (int i = 0; i < count; ++i) { - code = BufferIO::ReadInt32(pbuf); - con = mainGame->LocalPlayer(BufferIO::ReadInt8(pbuf)); - loc = BufferIO::ReadInt8(pbuf); - seq = BufferIO::ReadInt8(pbuf); + code = BufferIO::Read(pbuf); + con = mainGame->LocalPlayer(BufferIO::Read(pbuf)); + loc = BufferIO::Read(pbuf); + seq = BufferIO::Read(pbuf); pcard = mainGame->dField.GetCard(con, loc, seq); mainGame->dField.reposable_cards.push_back(pcard); pcard->cmdFlag |= COMMAND_REPOS; } mainGame->dField.msetable_cards.clear(); - count = BufferIO::ReadInt8(pbuf); + count = BufferIO::Read(pbuf); for (int i = 0; i < count; ++i) { - code = BufferIO::ReadInt32(pbuf); - con = mainGame->LocalPlayer(BufferIO::ReadInt8(pbuf)); - loc = BufferIO::ReadInt8(pbuf); - seq = BufferIO::ReadInt8(pbuf); + code = BufferIO::Read(pbuf); + con = mainGame->LocalPlayer(BufferIO::Read(pbuf)); + loc = BufferIO::Read(pbuf); + seq = BufferIO::Read(pbuf); pcard = mainGame->dField.GetCard(con, loc, seq); mainGame->dField.msetable_cards.push_back(pcard); pcard->cmdFlag |= COMMAND_MSET; } mainGame->dField.ssetable_cards.clear(); - count = BufferIO::ReadInt8(pbuf); + count = BufferIO::Read(pbuf); for (int i = 0; i < count; ++i) { - code = BufferIO::ReadInt32(pbuf); - con = mainGame->LocalPlayer(BufferIO::ReadInt8(pbuf)); - loc = BufferIO::ReadInt8(pbuf); - seq = BufferIO::ReadInt8(pbuf); + code = BufferIO::Read(pbuf); + con = mainGame->LocalPlayer(BufferIO::Read(pbuf)); + loc = BufferIO::Read(pbuf); + seq = BufferIO::Read(pbuf); pcard = mainGame->dField.GetCard(con, loc, seq); mainGame->dField.ssetable_cards.push_back(pcard); pcard->cmdFlag |= COMMAND_SSET; } mainGame->dField.activatable_cards.clear(); mainGame->dField.activatable_descs.clear(); - count = BufferIO::ReadInt8(pbuf); + mainGame->dField.conti_cards.clear(); + count = BufferIO::Read(pbuf); for (int i = 0; i < count; ++i) { - code = BufferIO::ReadInt32(pbuf); - con = mainGame->LocalPlayer(BufferIO::ReadInt8(pbuf)); - loc = BufferIO::ReadInt8(pbuf); - seq = BufferIO::ReadInt8(pbuf); - desc = BufferIO::ReadInt32(pbuf); + code = BufferIO::Read(pbuf); + con = mainGame->LocalPlayer(BufferIO::Read(pbuf)); + loc = BufferIO::Read(pbuf); + seq = BufferIO::Read(pbuf); + desc = BufferIO::Read(pbuf); pcard = mainGame->dField.GetCard(con, loc, seq); + int flag = 0; + if(code & 0x80000000) { + flag = EDESC_OPERATION; + code &= 0x7fffffff; + } mainGame->dField.activatable_cards.push_back(pcard); - mainGame->dField.activatable_descs.push_back(desc); - pcard->cmdFlag |= COMMAND_ACTIVATE; - if (pcard->location == LOCATION_GRAVE) - mainGame->dField.grave_act = true; - if (pcard->location == LOCATION_REMOVED) - mainGame->dField.remove_act = true; - } - if(BufferIO::ReadInt8(pbuf)) { + mainGame->dField.activatable_descs.push_back(std::make_pair(desc, flag)); + if(flag & EDESC_OPERATION) { + pcard->chain_code = code; + mainGame->dField.conti_cards.push_back(pcard); + mainGame->dField.conti_act = true; + } else { + pcard->cmdFlag |= COMMAND_ACTIVATE; + if(pcard->location == LOCATION_GRAVE) + mainGame->dField.grave_act[con] = true; + else if(pcard->location == LOCATION_REMOVED) + mainGame->dField.remove_act[con] = true; + else if(pcard->location == LOCATION_EXTRA) + mainGame->dField.extra_act[con] = true; + } + } + if(BufferIO::Read(pbuf)) { mainGame->btnBP->setVisible(true); mainGame->btnBP->setEnabled(true); mainGame->btnBP->setPressed(false); } - if(BufferIO::ReadInt8(pbuf)) { + if(BufferIO::Read(pbuf)) { mainGame->btnEP->setVisible(true); mainGame->btnEP->setEnabled(true); mainGame->btnEP->setPressed(false); } - if (BufferIO::ReadInt8(pbuf)) { + if (BufferIO::Read(pbuf)) { mainGame->btnShuffle->setVisible(true); - } - else { + } else { mainGame->btnShuffle->setVisible(false); } return false; } case MSG_SELECT_EFFECTYN: { - /*int selecting_player = */BufferIO::ReadInt8(pbuf); - unsigned int code = (unsigned int)BufferIO::ReadInt32(pbuf); - int c = mainGame->LocalPlayer(BufferIO::ReadInt8(pbuf)); - int l = BufferIO::ReadInt8(pbuf); - int s = BufferIO::ReadInt8(pbuf); + /*int selecting_player = */BufferIO::Read(pbuf); + unsigned int code = BufferIO::Read(pbuf); + int c = mainGame->LocalPlayer(BufferIO::Read(pbuf)); + unsigned int l = BufferIO::Read(pbuf); + int s = BufferIO::Read(pbuf); ClientCard* pcard = mainGame->dField.GetCard(c, l, s); if (pcard->code != code) pcard->SetCode(code); - BufferIO::ReadInt8(pbuf); - pcard->is_highlighting = true; - mainGame->dField.highlighting_card = pcard; - myswprintf(textBuffer, dataManager.GetSysString(200), dataManager.FormatLocation(l, s), dataManager.GetName(code)); - mainGame->gMutex.Lock(); - mainGame->SetStaticText(mainGame->stQMessage, 310, mainGame->textFont, textBuffer); + BufferIO::Read(pbuf); + if(l != LOCATION_DECK) { + pcard->is_highlighting = true; + mainGame->dField.highlighting_card = pcard; + } + int desc = BufferIO::Read(pbuf); + if(desc == 0) { + wchar_t ynbuf[256]; + myswprintf(ynbuf, dataManager.GetSysString(200), dataManager.FormatLocation(l, s), dataManager.GetName(code)); + myswprintf(textBuffer, L"%ls\n%ls", event_string, ynbuf); + } else if(desc == 221) { + wchar_t ynbuf[256]; + myswprintf(ynbuf, dataManager.GetSysString(221), dataManager.FormatLocation(l, s), dataManager.GetName(code)); + myswprintf(textBuffer, L"%ls\n%ls\n%ls", event_string, ynbuf, dataManager.GetSysString(223)); + } else if(desc <= MAX_STRING_ID) { + myswprintf(textBuffer, dataManager.GetSysString(desc), dataManager.GetName(code)); + } else { + myswprintf(textBuffer, dataManager.GetDesc(desc), dataManager.GetName(code)); + } + mainGame->gMutex.lock(); + mainGame->SetStaticText(mainGame->stQMessage, 310, mainGame->guiFont, textBuffer); mainGame->PopupElement(mainGame->wQuery); - mainGame->gMutex.Unlock(); + mainGame->gMutex.unlock(); return false; } case MSG_SELECT_YESNO: { - /*int selecting_player = */BufferIO::ReadInt8(pbuf); - int desc = BufferIO::ReadInt32(pbuf); + /*int selecting_player = */BufferIO::Read(pbuf); + int desc = BufferIO::Read(pbuf); mainGame->dField.highlighting_card = 0; - mainGame->gMutex.Lock(); - mainGame->SetStaticText(mainGame->stQMessage, 310, mainGame->textFont, (wchar_t*)dataManager.GetDesc(desc)); + mainGame->gMutex.lock(); + mainGame->SetStaticText(mainGame->stQMessage, 310, mainGame->guiFont, dataManager.GetDesc(desc)); mainGame->PopupElement(mainGame->wQuery); - mainGame->gMutex.Unlock(); + mainGame->gMutex.unlock(); return false; } case MSG_SELECT_OPTION: { - /*int selecting_player = */BufferIO::ReadInt8(pbuf); - int count = BufferIO::ReadInt8(pbuf); + /*int selecting_player = */BufferIO::Read(pbuf); + int count = BufferIO::Read(pbuf); mainGame->dField.select_options.clear(); for (int i = 0; i < count; ++i) - mainGame->dField.select_options.push_back(BufferIO::ReadInt32(pbuf)); - mainGame->gMutex.Lock(); - mainGame->SetStaticText(mainGame->stOptions, 310, mainGame->textFont, - (wchar_t*)dataManager.GetDesc(mainGame->dField.select_options[0])); - mainGame->btnOptionp->setVisible(false); - if(count > 1) - mainGame->btnOptionn->setVisible(true); - else mainGame->btnOptionn->setVisible(false); - mainGame->dField.selected_option = 0; - if(select_hint) - myswprintf(textBuffer, L"%ls", dataManager.GetDesc(select_hint)); - else myswprintf(textBuffer, dataManager.GetSysString(555)); + mainGame->dField.select_options.push_back(BufferIO::Read(pbuf)); + mainGame->dField.ShowSelectOption(select_hint); select_hint = 0; - mainGame->wOptions->setText(textBuffer); - mainGame->PopupElement(mainGame->wOptions); - mainGame->gMutex.Unlock(); return false; } case MSG_SELECT_CARD: { - /*int selecting_player = */BufferIO::ReadInt8(pbuf); - mainGame->dField.select_cancelable = BufferIO::ReadInt8(pbuf); - mainGame->dField.select_min = BufferIO::ReadInt8(pbuf); - mainGame->dField.select_max = BufferIO::ReadInt8(pbuf); - int count = BufferIO::ReadInt8(pbuf); + /*int selecting_player = */BufferIO::Read(pbuf); + mainGame->dField.select_cancelable = BufferIO::Read(pbuf) != 0; + mainGame->dField.select_min = BufferIO::Read(pbuf); + mainGame->dField.select_max = BufferIO::Read(pbuf); + int count = BufferIO::Read(pbuf); mainGame->dField.selectable_cards.clear(); mainGame->dField.selected_cards.clear(); - int c, l, s, ss; + int c, s, ss; + unsigned int l; unsigned int code; bool panelmode = false; - mainGame->dField.select_ready = false; + size_t hand_count[2] = { mainGame->dField.hand[0].size(), mainGame->dField.hand[1].size() }; + int select_count_in_hand[2] = { 0, 0 }; + bool select_ready = mainGame->dField.select_min == 0; + mainGame->dField.select_ready = select_ready; ClientCard* pcard; for (int i = 0; i < count; ++i) { - code = (unsigned int)BufferIO::ReadInt32(pbuf); - c = mainGame->LocalPlayer(BufferIO::ReadInt8(pbuf)); - l = BufferIO::ReadInt8(pbuf); - s = BufferIO::ReadInt8(pbuf); - ss = BufferIO::ReadInt8(pbuf); - if ((l & LOCATION_OVERLAY) > 0) + code = BufferIO::Read(pbuf); + c = mainGame->LocalPlayer(BufferIO::Read(pbuf)); + l = BufferIO::Read(pbuf); + s = BufferIO::Read(pbuf); + ss = BufferIO::Read(pbuf); + if (l & LOCATION_OVERLAY) pcard = mainGame->dField.GetCard(c, l & 0x7f, s)->overlayed[ss]; else pcard = mainGame->dField.GetCard(c, l, s); @@ -1135,6 +1591,10 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { pcard->is_selected = false; if (l & 0xf1) panelmode = true; + if((l & LOCATION_HAND) && hand_count[c] >= 10) { + if(++select_count_in_hand[c] > 1) + panelmode = true; + } } std::sort(mainGame->dField.selectable_cards.begin(), mainGame->dField.selectable_cards.end(), ClientCard::client_card_sort); if(select_hint) @@ -1143,78 +1603,201 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { else myswprintf(textBuffer, L"%ls(%d-%d)", dataManager.GetSysString(560), mainGame->dField.select_min, mainGame->dField.select_max); select_hint = 0; if (panelmode) { - mainGame->gMutex.Lock(); + mainGame->gMutex.lock(); mainGame->wCardSelect->setText(textBuffer); - mainGame->dField.ShowSelectCard(); - mainGame->gMutex.Unlock(); + mainGame->dField.ShowSelectCard(select_ready); + mainGame->gMutex.unlock(); } else { mainGame->stHintMsg->setText(textBuffer); mainGame->stHintMsg->setVisible(true); } + if (mainGame->dField.select_cancelable) { + mainGame->dField.ShowCancelOrFinishButton(1); + } else if (select_ready) { + mainGame->dField.ShowCancelOrFinishButton(2); + } else { + mainGame->dField.ShowCancelOrFinishButton(0); + } + return false; + } + case MSG_SELECT_UNSELECT_CARD: { + /*int selecting_player = */BufferIO::Read(pbuf); + bool finishable = BufferIO::Read(pbuf) != 0; + bool cancelable = BufferIO::Read(pbuf) != 0; + mainGame->dField.select_cancelable = finishable || cancelable; + mainGame->dField.select_min = BufferIO::Read(pbuf); + mainGame->dField.select_max = BufferIO::Read(pbuf); + int count1 = BufferIO::Read(pbuf); + mainGame->dField.selectable_cards.clear(); + mainGame->dField.selected_cards.clear(); + int c, s, ss; + unsigned int l; + unsigned int code; + bool panelmode = false; + size_t hand_count[2] = { mainGame->dField.hand[0].size(), mainGame->dField.hand[1].size() }; + int select_count_in_hand[2] = { 0, 0 }; + mainGame->dField.select_ready = false; + ClientCard* pcard; + for (int i = 0; i < count1; ++i) { + code = (unsigned int)BufferIO::Read(pbuf); + c = mainGame->LocalPlayer(BufferIO::Read(pbuf)); + l = BufferIO::Read(pbuf); + s = BufferIO::Read(pbuf); + ss = BufferIO::Read(pbuf); + if (l & LOCATION_OVERLAY) + pcard = mainGame->dField.GetCard(c, l & 0x7f, s)->overlayed[ss]; + else + pcard = mainGame->dField.GetCard(c, l, s); + if (code != 0 && pcard->code != code) + pcard->SetCode(code); + pcard->select_seq = i; + mainGame->dField.selectable_cards.push_back(pcard); + pcard->is_selectable = true; + pcard->is_selected = false; + if (l & 0xf1) + panelmode = true; + if((l & LOCATION_HAND) && hand_count[c] >= 10) { + if(++select_count_in_hand[c] > 1) + panelmode = true; + } + } + int count2 = BufferIO::Read(pbuf); + for (int i = count1; i < count1 + count2; ++i) { + code = (unsigned int)BufferIO::Read(pbuf); + c = mainGame->LocalPlayer(BufferIO::Read(pbuf)); + l = BufferIO::Read(pbuf); + s = BufferIO::Read(pbuf); + ss = BufferIO::Read(pbuf); + if (l & LOCATION_OVERLAY) + pcard = mainGame->dField.GetCard(c, l & 0x7f, s)->overlayed[ss]; + else + pcard = mainGame->dField.GetCard(c, l, s); + if (code != 0 && pcard->code != code) + pcard->SetCode(code); + pcard->select_seq = i; + mainGame->dField.selectable_cards.push_back(pcard); + pcard->is_selectable = true; + pcard->is_selected = true; + if (l & 0xf1) + panelmode = true; + if((l & LOCATION_HAND) && hand_count[c] >= 10) { + if(++select_count_in_hand[c] > 1) + panelmode = true; + } + } + std::sort(mainGame->dField.selectable_cards.begin(), mainGame->dField.selectable_cards.end(), ClientCard::client_card_sort); + if(select_hint) + select_unselect_hint = select_hint; + if(select_unselect_hint) + myswprintf(textBuffer, L"%ls(%d-%d)", dataManager.GetDesc(select_unselect_hint), + mainGame->dField.select_min, mainGame->dField.select_max); + else myswprintf(textBuffer, L"%ls(%d-%d)", dataManager.GetSysString(560), mainGame->dField.select_min, mainGame->dField.select_max); + select_hint = 0; + if (panelmode) { + mainGame->gMutex.lock(); + mainGame->wCardSelect->setText(textBuffer); + mainGame->dField.ShowSelectCard(mainGame->dField.select_cancelable); + mainGame->gMutex.unlock(); + } else { + mainGame->stHintMsg->setText(textBuffer); + mainGame->stHintMsg->setVisible(true); + } + if (mainGame->dField.select_cancelable) { + if(finishable) { + mainGame->dField.select_ready = true; + mainGame->dField.ShowCancelOrFinishButton(2); + } + else { + mainGame->dField.ShowCancelOrFinishButton(1); + } + } + else + mainGame->dField.ShowCancelOrFinishButton(0); return false; } case MSG_SELECT_CHAIN: { - /*int selecting_player = */BufferIO::ReadInt8(pbuf); - int count = BufferIO::ReadInt8(pbuf); - int specount = BufferIO::ReadInt8(pbuf); - int forced = BufferIO::ReadInt8(pbuf); - /*int hint0 = */BufferIO::ReadInt32(pbuf); - /*int hint1 = */BufferIO::ReadInt32(pbuf); - int code, c, l, s, ss, desc; + /*int selecting_player = */BufferIO::Read(pbuf); + int count = BufferIO::Read(pbuf); + int specount = BufferIO::Read(pbuf); + /*int hint0 = */BufferIO::Read(pbuf); + /*int hint1 = */BufferIO::Read(pbuf); + int c, s, ss, desc; + unsigned int code,l; ClientCard* pcard; bool panelmode = false; - mainGame->dField.chain_forced = (forced != 0); + bool conti_exist = false; + bool select_trigger = (specount == 0x7f); + mainGame->dField.chain_forced = false; mainGame->dField.activatable_cards.clear(); mainGame->dField.activatable_descs.clear(); mainGame->dField.conti_cards.clear(); for (int i = 0; i < count; ++i) { - code = BufferIO::ReadInt32(pbuf); - c = mainGame->LocalPlayer(BufferIO::ReadInt8(pbuf)); - l = BufferIO::ReadInt8(pbuf); - s = BufferIO::ReadInt8(pbuf); - ss = BufferIO::ReadInt8(pbuf); - desc = BufferIO::ReadInt32(pbuf); + int flag = BufferIO::Read(pbuf); + int forced = BufferIO::Read(pbuf); + flag |= forced << 8; + code = BufferIO::Read(pbuf); + c = mainGame->LocalPlayer(BufferIO::Read(pbuf)); + l = BufferIO::Read(pbuf); + s = BufferIO::Read(pbuf); + ss = BufferIO::Read(pbuf); + desc = BufferIO::Read(pbuf); pcard = mainGame->dField.GetCard(c, l, s, ss); mainGame->dField.activatable_cards.push_back(pcard); - mainGame->dField.activatable_descs.push_back(desc); + mainGame->dField.activatable_descs.push_back(std::make_pair(desc, flag)); pcard->is_selected = false; - if(code >= 1000000000) { - pcard->is_conti = true; - pcard->chain_code = code % 1000000000; - mainGame->dField.conti_cards.push_back(pcard); - mainGame->dField.remove_act = true; + if(forced) { + mainGame->dField.chain_forced = true; } - else { + if(flag & EDESC_OPERATION) { pcard->chain_code = code; + mainGame->dField.conti_cards.push_back(pcard); + mainGame->dField.conti_act = true; + conti_exist = true; + } else { pcard->is_selectable = true; - pcard->cmdFlag |= COMMAND_ACTIVATE; - if(l == LOCATION_GRAVE) - mainGame->dField.grave_act = true; - if(l == LOCATION_REMOVED) - mainGame->dField.remove_act = true; - if(l == LOCATION_EXTRA) - mainGame->dField.extra_act = true; - if(l == LOCATION_OVERLAY) + if(flag & EDESC_RESET) + pcard->cmdFlag |= COMMAND_RESET; + else + pcard->cmdFlag |= COMMAND_ACTIVATE; + if(pcard->location == LOCATION_DECK) { + pcard->SetCode(code); + mainGame->dField.deck_act[c] = true; + } else if(l == LOCATION_GRAVE) + mainGame->dField.grave_act[c] = true; + else if(l == LOCATION_REMOVED) + mainGame->dField.remove_act[c] = true; + else if(l == LOCATION_EXTRA) + mainGame->dField.extra_act[c] = true; + else if(l == LOCATION_OVERLAY) panelmode = true; } } - if(!forced && (mainGame->ignore_chain || ((count == 0 || specount == 0) && !mainGame->always_chain))) { + if(!select_trigger && !mainGame->dField.chain_forced && (mainGame->ignore_chain || ((count == 0 || specount == 0) && !mainGame->always_chain)) && (count == 0 || !mainGame->chain_when_avail)) { SetResponseI(-1); mainGame->dField.ClearChainSelect(); - if(mainGame->chkWaitChain->isChecked()) { - mainGame->WaitFrameSignal(rnd.real() * 20 + 20); + if(mainGame->chkWaitChain->isChecked() && !mainGame->ignore_chain) { + mainGame->WaitFrameSignal(std::uniform_int_distribution<>(20, 40)(rnd)); } DuelClient::SendResponse(); return true; } - if(mainGame->chkAutoChain->isChecked() && forced) { - SetResponseI(0); + if(mainGame->chkAutoChain->isChecked() && mainGame->dField.chain_forced && !(mainGame->always_chain || mainGame->chain_when_avail)) { + for(size_t i = 0; i < mainGame->dField.activatable_descs.size();++i) { + auto it = mainGame->dField.activatable_descs[i]; + if(it.second >> 8) { + SetResponseI((int)i); + break; + } + } mainGame->dField.ClearChainSelect(); DuelClient::SendResponse(); return true; } - mainGame->gMutex.Lock(); - mainGame->stHintMsg->setText(dataManager.GetSysString(550)); + mainGame->gMutex.lock(); + if(!conti_exist) + mainGame->stHintMsg->setText(dataManager.GetSysString(550)); + else + mainGame->stHintMsg->setText(dataManager.GetSysString(556)); mainGame->stHintMsg->setVisible(true); if(panelmode) { mainGame->dField.list_command = COMMAND_ACTIVATE; @@ -1224,62 +1807,88 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { mainGame->dField.selectable_cards.erase(eit, mainGame->dField.selectable_cards.end()); mainGame->dField.ShowChainCard(); } else { - if(!forced) { + if(!mainGame->dField.chain_forced) { if(count == 0) myswprintf(textBuffer, L"%ls\n%ls", dataManager.GetSysString(201), dataManager.GetSysString(202)); + else if(select_trigger) + myswprintf(textBuffer, L"%ls\n%ls\n%ls", event_string, dataManager.GetSysString(222), dataManager.GetSysString(223)); else myswprintf(textBuffer, L"%ls\n%ls", event_string, dataManager.GetSysString(203)); - mainGame->SetStaticText(mainGame->stQMessage, 310, mainGame->textFont, (wchar_t*)textBuffer); + mainGame->SetStaticText(mainGame->stQMessage, 310, mainGame->guiFont, textBuffer); mainGame->PopupElement(mainGame->wQuery); } } - mainGame->gMutex.Unlock(); + mainGame->gMutex.unlock(); return false; } case MSG_SELECT_PLACE: case MSG_SELECT_DISFIELD: { - /*int selecting_player = */BufferIO::ReadInt8(pbuf); - mainGame->dField.select_min = BufferIO::ReadInt8(pbuf); - mainGame->dField.selectable_field = ~BufferIO::ReadInt32(pbuf); + int selecting_player = BufferIO::Read(pbuf); + int count = BufferIO::Read(pbuf); + mainGame->dField.select_min = count > 0 ? count : 1; + mainGame->dField.select_ready = false; + mainGame->dField.select_cancelable = count == 0; + mainGame->dField.selectable_field = ~BufferIO::Read(pbuf); + if(selecting_player == mainGame->LocalPlayer(1)) + mainGame->dField.selectable_field = (mainGame->dField.selectable_field >> 16) | (mainGame->dField.selectable_field << 16); mainGame->dField.selected_field = 0; - unsigned char respbuf[64]; + unsigned char respbuf[SIZE_RETURN_VALUE]; int pzone = 0; - if (mainGame->dInfo.curMsg == MSG_SELECT_PLACE && mainGame->chkAutoPos->isChecked()) { - int filter; - if (mainGame->dField.selectable_field & 0x1f) { - respbuf[0] = mainGame->dInfo.isFirst ? 0 : 1; - respbuf[1] = 0x4; - filter = mainGame->dField.selectable_field & 0x1f; - } else if (mainGame->dField.selectable_field & 0x1f00) { - respbuf[0] = mainGame->dInfo.isFirst ? 0 : 1; - respbuf[1] = 0x8; - filter = (mainGame->dField.selectable_field >> 8) & 0x1f; + if (mainGame->dInfo.curMsg == MSG_SELECT_PLACE) { + if (select_hint) { + myswprintf(textBuffer, dataManager.GetSysString(569), dataManager.GetName(select_hint)); + } else + myswprintf(textBuffer, dataManager.GetSysString(560)); + } else { + if (select_hint) { + myswprintf(textBuffer, dataManager.GetDesc(select_hint)); + } else + myswprintf(textBuffer, dataManager.GetSysString(570)); + } + select_hint = 0; + mainGame->stHintMsg->setText(textBuffer); + mainGame->stHintMsg->setVisible(true); + if (mainGame->dInfo.curMsg == MSG_SELECT_PLACE && ( + (mainGame->chkMAutoPos->isChecked() && mainGame->dField.selectable_field & 0x7f007f) || + (mainGame->chkSTAutoPos->isChecked() && !(mainGame->dField.selectable_field & 0x7f007f)))) { + unsigned int filter; + if (mainGame->dField.selectable_field & 0x7f) { + respbuf[0] = mainGame->LocalPlayer(0); + respbuf[1] = LOCATION_MZONE; + filter = mainGame->dField.selectable_field & 0x7f; + } else if (mainGame->dField.selectable_field & 0x3f00) { + respbuf[0] = mainGame->LocalPlayer(0); + respbuf[1] = LOCATION_SZONE; + filter = (mainGame->dField.selectable_field >> 8) & 0x3f; } else if (mainGame->dField.selectable_field & 0xc000) { - respbuf[0] = mainGame->dInfo.isFirst ? 0 : 1; - respbuf[1] = 0x8; + respbuf[0] = mainGame->LocalPlayer(0); + respbuf[1] = LOCATION_SZONE; filter = (mainGame->dField.selectable_field >> 14) & 0x3; pzone = 1; - } else if (mainGame->dField.selectable_field & 0x1f0000) { - respbuf[0] = mainGame->dInfo.isFirst ? 1 : 0; - respbuf[1] = 0x4; - filter = (mainGame->dField.selectable_field >> 16) & 0x1f; - } else if (mainGame->dField.selectable_field & 0x1f000000) { - respbuf[0] = mainGame->dInfo.isFirst ? 1 : 0; - respbuf[1] = 0x8; - filter = (mainGame->dField.selectable_field >> 24) & 0x1f; + } else if (mainGame->dField.selectable_field & 0x7f0000) { + respbuf[0] = mainGame->LocalPlayer(1); + respbuf[1] = LOCATION_MZONE; + filter = (mainGame->dField.selectable_field >> 16) & 0x7f; + } else if (mainGame->dField.selectable_field & 0x3f000000) { + respbuf[0] = mainGame->LocalPlayer(1); + respbuf[1] = LOCATION_SZONE; + filter = (mainGame->dField.selectable_field >> 24) & 0x3f; } else { - respbuf[0] = mainGame->dInfo.isFirst ? 1 : 0; - respbuf[1] = 0x8; + respbuf[0] = mainGame->LocalPlayer(1); + respbuf[1] = LOCATION_SZONE; filter = (mainGame->dField.selectable_field >> 30) & 0x3; pzone = 1; } if(!pzone) { if(mainGame->chkRandomPos->isChecked()) { - respbuf[2] = rnd.real() * 5; - while(!(filter & (1 << respbuf[2]))) - respbuf[2] = rnd.real() * 5; + std::uniform_int_distribution<> dist(0, 6); + do { + respbuf[2] = dist(rnd); + } while(!(filter & (0x1U << respbuf[2]))); } else { - if (filter & 0x4) respbuf[2] = 2; + if (filter & 0x40) respbuf[2] = 6; + else if (filter & 0x20) respbuf[2] = 5; + else if (filter & 0x4) respbuf[2] = 2; else if (filter & 0x2) respbuf[2] = 1; else if (filter & 0x8) respbuf[2] = 3; else if (filter & 0x1) respbuf[2] = 0; @@ -1294,12 +1903,15 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { DuelClient::SendResponse(); return true; } + if(mainGame->dField.select_cancelable) { + mainGame->dField.ShowCancelOrFinishButton(1); + } return false; } case MSG_SELECT_POSITION: { - /*int selecting_player = */BufferIO::ReadInt8(pbuf); - unsigned int code = (unsigned int)BufferIO::ReadInt32(pbuf); - int positions = BufferIO::ReadInt8(pbuf); + /*int selecting_player = */BufferIO::Read(pbuf); + unsigned int code = (unsigned int)BufferIO::Read(pbuf); + unsigned int positions = BufferIO::Read(pbuf); if (positions == 0x1 || positions == 0x2 || positions == 0x4 || positions == 0x8) { SetResponseI(positions); return true; @@ -1314,181 +1926,180 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { else startpos = 155; if(positions & 0x1) { mainGame->imageLoading.insert(std::make_pair(mainGame->btnPSAU, code)); - mainGame->btnPSAU->setRelativePosition(rect(startpos, 45, startpos + 140, 185)); + mainGame->btnPSAU->setRelativePosition(irr::core::rect(startpos, 45, startpos + 140, 185)); mainGame->btnPSAU->setVisible(true); startpos += 145; } else mainGame->btnPSAU->setVisible(false); if(positions & 0x2) { - mainGame->btnPSAD->setRelativePosition(rect(startpos, 45, startpos + 140, 185)); + mainGame->btnPSAD->setRelativePosition(irr::core::rect(startpos, 45, startpos + 140, 185)); mainGame->btnPSAD->setVisible(true); startpos += 145; } else mainGame->btnPSAD->setVisible(false); if(positions & 0x4) { mainGame->imageLoading.insert(std::make_pair(mainGame->btnPSDU, code)); - mainGame->btnPSDU->setRelativePosition(rect(startpos, 45, startpos + 140, 185)); + mainGame->btnPSDU->setRelativePosition(irr::core::rect(startpos, 45, startpos + 140, 185)); mainGame->btnPSDU->setVisible(true); startpos += 145; } else mainGame->btnPSDU->setVisible(false); if(positions & 0x8) { - mainGame->btnPSDD->setRelativePosition(rect(startpos, 45, startpos + 140, 185)); + mainGame->btnPSDD->setRelativePosition(irr::core::rect(startpos, 45, startpos + 140, 185)); mainGame->btnPSDD->setVisible(true); startpos += 145; } else mainGame->btnPSDD->setVisible(false); - mainGame->gMutex.Lock(); + mainGame->gMutex.lock(); mainGame->PopupElement(mainGame->wPosSelect); - mainGame->gMutex.Unlock(); + mainGame->gMutex.unlock(); return false; } case MSG_SELECT_TRIBUTE: { - /*int selecting_player = */BufferIO::ReadInt8(pbuf); - mainGame->dField.select_cancelable = BufferIO::ReadInt8(pbuf) ? true : false; - mainGame->dField.select_min = BufferIO::ReadInt8(pbuf); - mainGame->dField.select_max = BufferIO::ReadInt8(pbuf); - int count = BufferIO::ReadInt8(pbuf); + /*int selecting_player = */BufferIO::Read(pbuf); + mainGame->dField.select_cancelable = BufferIO::Read(pbuf) != 0; + mainGame->dField.select_min = BufferIO::Read(pbuf); + mainGame->dField.select_max = BufferIO::Read(pbuf); + int count = BufferIO::Read(pbuf); mainGame->dField.selectable_cards.clear(); mainGame->dField.selected_cards.clear(); - int c, l, s, t; - unsigned int code; + mainGame->dField.selectsum_all.clear(); + mainGame->dField.selectsum_cards.clear(); + mainGame->dField.select_panalmode = false; + int c, s, t; + unsigned int code, l; ClientCard* pcard; mainGame->dField.select_ready = false; for (int i = 0; i < count; ++i) { - code = (unsigned int)BufferIO::ReadInt32(pbuf); - c = mainGame->LocalPlayer(BufferIO::ReadInt8(pbuf)); - l = BufferIO::ReadInt8(pbuf); - s = BufferIO::ReadInt8(pbuf); - t = BufferIO::ReadInt8(pbuf); + code = (unsigned int)BufferIO::Read(pbuf); + c = mainGame->LocalPlayer(BufferIO::Read(pbuf)); + l = BufferIO::Read(pbuf); + s = BufferIO::Read(pbuf); + t = BufferIO::Read(pbuf); pcard = mainGame->dField.GetCard(c, l, s); if (code && pcard->code != code) pcard->SetCode(code); mainGame->dField.selectable_cards.push_back(pcard); - pcard->opParam = t; + mainGame->dField.selectsum_all.push_back(pcard); + pcard->opParam = t << 16 | 1; pcard->select_seq = i; pcard->is_selectable = true; } + mainGame->dField.CheckSelectTribute(); if(select_hint) myswprintf(textBuffer, L"%ls(%d-%d)", dataManager.GetDesc(select_hint), mainGame->dField.select_min, mainGame->dField.select_max); else myswprintf(textBuffer, L"%ls(%d-%d)", dataManager.GetSysString(531), mainGame->dField.select_min, mainGame->dField.select_max); select_hint = 0; - mainGame->gMutex.Lock(); + mainGame->gMutex.lock(); mainGame->stHintMsg->setText(textBuffer); mainGame->stHintMsg->setVisible(true); - mainGame->gMutex.Unlock(); + if (mainGame->dField.select_cancelable) { + mainGame->dField.ShowCancelOrFinishButton(1); + } + mainGame->gMutex.unlock(); return false; } case MSG_SELECT_COUNTER: { - /*int selecting_player = */BufferIO::ReadInt8(pbuf); - mainGame->dField.select_counter_type = BufferIO::ReadInt16(pbuf); - mainGame->dField.select_counter_count = BufferIO::ReadInt8(pbuf); - int count = BufferIO::ReadInt8(pbuf); + /*int selecting_player = */BufferIO::Read(pbuf); + mainGame->dField.select_counter_type = BufferIO::Read(pbuf); + mainGame->dField.select_counter_count = BufferIO::Read(pbuf); + int count = BufferIO::Read(pbuf); mainGame->dField.selectable_cards.clear(); - int c, l, s, t/*, code*/; + int c, s, t/*, code*/; + unsigned int l; ClientCard* pcard; for (int i = 0; i < count; ++i) { - /*code = */BufferIO::ReadInt32(pbuf); - c = mainGame->LocalPlayer(BufferIO::ReadInt8(pbuf)); - l = BufferIO::ReadInt8(pbuf); - s = BufferIO::ReadInt8(pbuf); - t = BufferIO::ReadInt8(pbuf); + /*code = */BufferIO::Read(pbuf); + c = mainGame->LocalPlayer(BufferIO::Read(pbuf)); + l = BufferIO::Read(pbuf); + s = BufferIO::Read(pbuf); + t = BufferIO::Read(pbuf); pcard = mainGame->dField.GetCard(c, l, s); mainGame->dField.selectable_cards.push_back(pcard); pcard->opParam = (t << 16) | t; pcard->is_selectable = true; } myswprintf(textBuffer, dataManager.GetSysString(204), mainGame->dField.select_counter_count, dataManager.GetCounterName(mainGame->dField.select_counter_type)); - mainGame->gMutex.Lock(); + mainGame->gMutex.lock(); mainGame->stHintMsg->setText(textBuffer); mainGame->stHintMsg->setVisible(true); - mainGame->gMutex.Unlock(); + mainGame->gMutex.unlock(); return false; } case MSG_SELECT_SUM: { - mainGame->dField.select_mode = BufferIO::ReadInt8(pbuf); - /*int selecting_player = */BufferIO::ReadInt8(pbuf); - mainGame->dField.select_sumval = BufferIO::ReadInt32(pbuf); - mainGame->dField.select_min = BufferIO::ReadInt8(pbuf); - mainGame->dField.select_max = BufferIO::ReadInt8(pbuf); - int count = BufferIO::ReadInt8(pbuf); + mainGame->dField.select_mode = BufferIO::Read(pbuf); + /*int selecting_player = */BufferIO::Read(pbuf); + mainGame->dField.select_sumval = BufferIO::Read(pbuf); + mainGame->dField.select_min = BufferIO::Read(pbuf); + mainGame->dField.select_max = BufferIO::Read(pbuf); + mainGame->dField.must_select_count = BufferIO::Read(pbuf); mainGame->dField.selectsum_all.clear(); mainGame->dField.selected_cards.clear(); mainGame->dField.selectsum_cards.clear(); - int c, l, s; - unsigned int code; - bool panelmode = false; - ClientCard* pcard; + mainGame->dField.select_panalmode = false; + for (int i = 0; i < mainGame->dField.must_select_count; ++i) { + unsigned int code = (unsigned int)BufferIO::Read(pbuf); + int c = mainGame->LocalPlayer(BufferIO::Read(pbuf)); + unsigned int l = BufferIO::Read(pbuf); + int s = BufferIO::Read(pbuf); + ClientCard* pcard = mainGame->dField.GetCard(c, l, s); + if (code != 0 && pcard->code != code) + pcard->SetCode(code); + pcard->opParam = BufferIO::Read(pbuf); + pcard->select_seq = 0; + mainGame->dField.selected_cards.push_back(pcard); + } + int count = BufferIO::Read(pbuf); for (int i = 0; i < count; ++i) { - code = (unsigned int)BufferIO::ReadInt32(pbuf); - c = mainGame->LocalPlayer(BufferIO::ReadInt8(pbuf)); - l = BufferIO::ReadInt8(pbuf); - s = BufferIO::ReadInt8(pbuf); - pcard = mainGame->dField.GetCard(c, l, s); + unsigned int code = (unsigned int)BufferIO::Read(pbuf); + int c = mainGame->LocalPlayer(BufferIO::Read(pbuf)); + unsigned int l = BufferIO::Read(pbuf); + int s = BufferIO::Read(pbuf); + ClientCard* pcard = mainGame->dField.GetCard(c, l, s); if (code != 0 && pcard->code != code) pcard->SetCode(code); - pcard->opParam = BufferIO::ReadInt32(pbuf); + pcard->opParam = BufferIO::Read(pbuf); pcard->select_seq = i; mainGame->dField.selectsum_all.push_back(pcard); if ((l & 0xe) == 0) - panelmode = true; + mainGame->dField.select_panalmode = true; } std::sort(mainGame->dField.selectsum_all.begin(), mainGame->dField.selectsum_all.end(), ClientCard::client_card_sort); - mainGame->dField.CheckSelectSum(); - if(select_hint) - myswprintf(textBuffer, L"%ls(%d)", dataManager.GetDesc(select_hint), mainGame->dField.select_sumval); - else myswprintf(textBuffer, L"%ls(%d)", dataManager.GetSysString(560), mainGame->dField.select_sumval); + mainGame->dField.select_hint = select_hint; select_hint = 0; - if (panelmode) { - mainGame->wCardSelect->setText(textBuffer); - mainGame->dField.ShowSelectCard(); - } else { - mainGame->stHintMsg->setText(textBuffer); - mainGame->stHintMsg->setVisible(true); - } - return false; + return mainGame->dField.ShowSelectSum(mainGame->dField.select_panalmode); } - case MSG_SORT_CARD: - case MSG_SORT_CHAIN: { - /*int player = */BufferIO::ReadInt8(pbuf); - int count = BufferIO::ReadInt8(pbuf); + case MSG_SORT_CARD: { + /*int player = */BufferIO::Read(pbuf); + int count = BufferIO::Read(pbuf); mainGame->dField.selectable_cards.clear(); mainGame->dField.selected_cards.clear(); mainGame->dField.sort_list.clear(); - int c, l, s; - unsigned int code; + int c, s; + unsigned int code, l; ClientCard* pcard; for (int i = 0; i < count; ++i) { - code = (unsigned int)BufferIO::ReadInt32(pbuf); - c = mainGame->LocalPlayer(BufferIO::ReadInt8(pbuf)); - l = BufferIO::ReadInt8(pbuf); - s = BufferIO::ReadInt8(pbuf); + code = (unsigned int)BufferIO::Read(pbuf); + c = mainGame->LocalPlayer(BufferIO::Read(pbuf)); + l = BufferIO::Read(pbuf); + s = BufferIO::Read(pbuf); pcard = mainGame->dField.GetCard(c, l, s); if (code != 0 && pcard->code != code) pcard->SetCode(code); mainGame->dField.selectable_cards.push_back(pcard); mainGame->dField.sort_list.push_back(0); } - if (mainGame->chkAutoChain->isChecked() && mainGame->dInfo.curMsg == MSG_SORT_CHAIN) { - mainGame->dField.sort_list.clear(); - SetResponseI(-1); - DuelClient::SendResponse(); - return true; - } - if(mainGame->dInfo.curMsg == MSG_SORT_CHAIN) - mainGame->wCardSelect->setText(dataManager.GetSysString(206)); - else - mainGame->wCardSelect->setText(dataManager.GetSysString(205)); + mainGame->wCardSelect->setText(dataManager.GetSysString(205)); mainGame->dField.select_min = 0; mainGame->dField.select_max = count; mainGame->dField.ShowSelectCard(); return false; } case MSG_CONFIRM_DECKTOP: { - int player = mainGame->LocalPlayer(BufferIO::ReadInt8(pbuf)); - int count = BufferIO::ReadInt8(pbuf); - int code; + int player = mainGame->LocalPlayer(BufferIO::Read(pbuf)); + int count = BufferIO::Read(pbuf); + unsigned int code; ClientCard* pcard; mainGame->dField.selectable_cards.clear(); for (int i = 0; i < count; ++i) { - code = BufferIO::ReadInt32(pbuf); + code = BufferIO::Read(pbuf); pbuf += 3; pcard = *(mainGame->dField.deck[player].rbegin() + i); if (code != 0) @@ -1496,16 +2107,15 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { } if(mainGame->dInfo.isReplay && mainGame->dInfo.isReplaySkiping) return true; + soundManager.PlaySoundEffect(SOUND_REVEAL); myswprintf(textBuffer, dataManager.GetSysString(207), count); - mainGame->lstLog->addItem(textBuffer); - mainGame->logParam.push_back(0); + mainGame->AddLog(textBuffer); for (int i = 0; i < count; ++i) { pcard = *(mainGame->dField.deck[player].rbegin() + i); - mainGame->gMutex.Lock(); + mainGame->gMutex.lock(); myswprintf(textBuffer, L"*[%ls]", dataManager.GetName(pcard->code)); - mainGame->lstLog->addItem(textBuffer); - mainGame->logParam.push_back(pcard->code); - mainGame->gMutex.Unlock(); + mainGame->AddLog(textBuffer, pcard->code); + mainGame->gMutex.unlock(); float shift = -0.15f; if (player == 1) shift = 0.15f; pcard->dPos = irr::core::vector3df(shift, 0, 0); @@ -1514,6 +2124,43 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { else pcard->dRot = irr::core::vector3df(0, 0, 0); pcard->is_moving = true; pcard->aniFrame = 5; + mainGame->WaitFrameSignal(count > 5 ? 12 : 45); + mainGame->dField.MoveCard(pcard, 5); + mainGame->WaitFrameSignal(5); + } + return true; + } + case MSG_CONFIRM_EXTRATOP: { + int player = mainGame->LocalPlayer(BufferIO::Read(pbuf)); + int count = BufferIO::Read(pbuf); + unsigned int code; + ClientCard* pcard; + mainGame->dField.selectable_cards.clear(); + for (int i = 0; i < count; ++i) { + code = BufferIO::Read(pbuf); + pbuf += 3; + pcard = *(mainGame->dField.extra[player].rbegin() + i + mainGame->dField.extra_p_count[player]); + if (code != 0) + pcard->SetCode(code); + } + if(mainGame->dInfo.isReplay && mainGame->dInfo.isReplaySkiping) + return true; + soundManager.PlaySoundEffect(SOUND_REVEAL); + myswprintf(textBuffer, dataManager.GetSysString(207), count); + mainGame->AddLog(textBuffer); + for (int i = 0; i < count; ++i) { + pcard = *(mainGame->dField.extra[player].rbegin() + i + mainGame->dField.extra_p_count[player]); + mainGame->gMutex.lock(); + myswprintf(textBuffer, L"*[%ls]", dataManager.GetName(pcard->code)); + mainGame->AddLog(textBuffer, pcard->code); + mainGame->gMutex.unlock(); + if (player == 0) + pcard->dPos = irr::core::vector3df(0, -0.20f, 0); + else + pcard->dPos = irr::core::vector3df(0.15f, 0, 0); + pcard->dRot = irr::core::vector3df(0, 3.14159f / 5.0f, 0); + pcard->is_moving = true; + pcard->aniFrame = 5; mainGame->WaitFrameSignal(45); mainGame->dField.MoveCard(pcard, 5); mainGame->WaitFrameSignal(5); @@ -1521,9 +2168,11 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { return true; } case MSG_CONFIRM_CARDS: { - /*int player = */mainGame->LocalPlayer(BufferIO::ReadInt8(pbuf)); - int count = BufferIO::ReadInt8(pbuf); - int code, c, l, s; + /*int player = */mainGame->LocalPlayer(BufferIO::Read(pbuf)); + int skip_panel = BufferIO::Read(pbuf); + int count = BufferIO::Read(pbuf); + int c, s; + unsigned int code, l; std::vector field_confirm; std::vector panel_confirm; ClientCard* pcard; @@ -1531,22 +2180,21 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { pbuf += count * 7; return true; } + soundManager.PlaySoundEffect(SOUND_REVEAL); myswprintf(textBuffer, dataManager.GetSysString(208), count); - mainGame->lstLog->addItem(textBuffer); - mainGame->logParam.push_back(0); + mainGame->AddLog(textBuffer); for (int i = 0; i < count; ++i) { - code = BufferIO::ReadInt32(pbuf); - c = mainGame->LocalPlayer(BufferIO::ReadInt8(pbuf)); - l = BufferIO::ReadInt8(pbuf); - s = BufferIO::ReadInt8(pbuf); + code = BufferIO::Read(pbuf); + c = mainGame->LocalPlayer(BufferIO::Read(pbuf)); + l = BufferIO::Read(pbuf); + s = BufferIO::Read(pbuf); pcard = mainGame->dField.GetCard(c, l, s); if (code != 0) pcard->SetCode(code); - mainGame->gMutex.Lock(); + mainGame->gMutex.lock(); myswprintf(textBuffer, L"*[%ls]", dataManager.GetName(code)); - mainGame->lstLog->addItem(textBuffer); - mainGame->logParam.push_back(code); - mainGame->gMutex.Unlock(); + mainGame->AddLog(textBuffer, code); + mainGame->gMutex.unlock(); if (l & 0x41) { if(count == 1) { float shift = -0.15f; @@ -1571,12 +2219,13 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { } if (field_confirm.size() > 0) { mainGame->WaitFrameSignal(5); - for(size_t i = 0; i < field_confirm.size(); ++i) { + for(int i = 0; i < (int)field_confirm.size(); ++i) { pcard = field_confirm[i]; c = pcard->controler; l = pcard->location; if (l == LOCATION_HAND) { mainGame->dField.MoveCard(pcard, 5); + pcard->is_highlighting = true; } else if (l == LOCATION_MZONE) { if (pcard->position & POS_FACEUP) continue; @@ -1596,27 +2245,32 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { pcard->aniFrame = 5; } } - mainGame->WaitFrameSignal(90); - for(size_t i = 0; i < field_confirm.size(); ++i) { - mainGame->dField.MoveCard(field_confirm[i], 5); + if (mainGame->dInfo.isReplay) + mainGame->WaitFrameSignal(30); + else + mainGame->WaitFrameSignal(90); + for(int i = 0; i < (int)field_confirm.size(); ++i) { + pcard = field_confirm[i]; + mainGame->dField.MoveCard(pcard, 5); + pcard->is_highlighting = false; } mainGame->WaitFrameSignal(5); } - if (panel_confirm.size()) { + if (!skip_panel && panel_confirm.size() && mainGame->dInfo.player_type != 7) { std::sort(panel_confirm.begin(), panel_confirm.end(), ClientCard::client_card_sort); - mainGame->gMutex.Lock(); + mainGame->gMutex.lock(); mainGame->dField.selectable_cards = panel_confirm; myswprintf(textBuffer, dataManager.GetSysString(208), panel_confirm.size()); mainGame->wCardSelect->setText(textBuffer); mainGame->dField.ShowSelectCard(true); - mainGame->gMutex.Unlock(); + mainGame->gMutex.unlock(); mainGame->actionSignal.Reset(); mainGame->actionSignal.Wait(); } return true; } case MSG_SHUFFLE_DECK: { - int player = mainGame->LocalPlayer(BufferIO::ReadInt8(pbuf)); + int player = mainGame->LocalPlayer(BufferIO::Read(pbuf)); if(mainGame->dField.deck[player].size() < 2) return true; bool rev = mainGame->dField.deck_reversed; @@ -1633,9 +2287,10 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { mainGame->dField.deck[player][i]->is_reversed = false; } if(!mainGame->dInfo.isReplay || !mainGame->dInfo.isReplaySkiping) { + soundManager.PlaySoundEffect(SOUND_SHUFFLE); for (int i = 0; i < 5; ++i) { for (auto cit = mainGame->dField.deck[player].begin(); cit != mainGame->dField.deck[player].end(); ++cit) { - (*cit)->dPos = irr::core::vector3df(rand() * 0.4f / RAND_MAX - 0.2f, 0, 0); + (*cit)->dPos = irr::core::vector3df(real_dist(rnd) * 0.4f - 0.2f, 0, 0); (*cit)->dRot = irr::core::vector3df(0, 0, 0); (*cit)->is_moving = true; (*cit)->aniFrame = 3; @@ -1654,9 +2309,11 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { return true; } case MSG_SHUFFLE_HAND: { - int player = mainGame->LocalPlayer(BufferIO::ReadInt8(pbuf)); - /*int count = */BufferIO::ReadInt8(pbuf); + int player = mainGame->LocalPlayer(BufferIO::Read(pbuf)); + int count = BufferIO::Read(pbuf); if(!mainGame->dInfo.isReplay || !mainGame->dInfo.isReplaySkiping) { + if(count > 1) + soundManager.PlaySoundEffect(SOUND_SHUFFLE); mainGame->WaitFrameSignal(5); if(player == 1 && !mainGame->dInfo.isReplay && !mainGame->dInfo.isSingleMode) { bool flip = false; @@ -1681,8 +2338,10 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { } mainGame->WaitFrameSignal(11); } - for (auto cit = mainGame->dField.hand[player].begin(); cit != mainGame->dField.hand[player].end(); ++cit) - (*cit)->SetCode(BufferIO::ReadInt32(pbuf)); + for(auto cit = mainGame->dField.hand[player].begin(); cit != mainGame->dField.hand[player].end(); ++cit) { + (*cit)->SetCode(BufferIO::Read(pbuf)); + (*cit)->desc_hints.clear(); + } if(!mainGame->dInfo.isReplay || !mainGame->dInfo.isReplaySkiping) { for (auto cit = mainGame->dField.hand[player].begin(); cit != mainGame->dField.hand[player].end(); ++cit) { (*cit)->is_hovered = false; @@ -1692,46 +2351,79 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { } return true; } + case MSG_SHUFFLE_EXTRA: { + int player = mainGame->LocalPlayer(BufferIO::Read(pbuf)); + int count = BufferIO::Read(pbuf); + if((mainGame->dField.extra[player].size() - mainGame->dField.extra_p_count[player]) < 2) + return true; + if(!mainGame->dInfo.isReplay || !mainGame->dInfo.isReplaySkiping) { + if(count > 1) + soundManager.PlaySoundEffect(SOUND_SHUFFLE); + for (int i = 0; i < 5; ++i) { + for (auto cit = mainGame->dField.extra[player].begin(); cit != mainGame->dField.extra[player].end(); ++cit) { + if(!((*cit)->position & POS_FACEUP)) { + (*cit)->dPos = irr::core::vector3df(real_dist(rnd) * 0.4f - 0.2f, 0, 0); + (*cit)->dRot = irr::core::vector3df(0, 0, 0); + (*cit)->is_moving = true; + (*cit)->aniFrame = 3; + } + } + mainGame->WaitFrameSignal(3); + for (auto cit = mainGame->dField.extra[player].begin(); cit != mainGame->dField.extra[player].end(); ++cit) + if(!((*cit)->position & POS_FACEUP)) + mainGame->dField.MoveCard(*cit, 3); + mainGame->WaitFrameSignal(3); + } + } + for (auto cit = mainGame->dField.extra[player].begin(); cit != mainGame->dField.extra[player].end(); ++cit) + if(!((*cit)->position & POS_FACEUP)) + (*cit)->SetCode(BufferIO::Read(pbuf)); + return true; + } case MSG_REFRESH_DECK: { - /*int player = */mainGame->LocalPlayer(BufferIO::ReadInt8(pbuf)); + /*int player = */mainGame->LocalPlayer(BufferIO::Read(pbuf)); return true; } case MSG_SWAP_GRAVE_DECK: { - int player = mainGame->LocalPlayer(BufferIO::ReadInt8(pbuf)); + int player = mainGame->LocalPlayer(BufferIO::Read(pbuf)); if(mainGame->dInfo.isReplay && mainGame->dInfo.isReplaySkiping) { mainGame->dField.grave[player].swap(mainGame->dField.deck[player]); for (auto cit = mainGame->dField.grave[player].begin(); cit != mainGame->dField.grave[player].end(); ++cit) (*cit)->location = LOCATION_GRAVE; + int m = 0; for (auto cit = mainGame->dField.deck[player].begin(); cit != mainGame->dField.deck[player].end(); ) { - if ((*cit)->type & 0x802040) { - (*cit)->location = LOCATION_EXTRA; - mainGame->dField.extra[player].push_back(*cit); + if ((*cit)->type & (TYPE_FUSION | TYPE_SYNCHRO | TYPE_XYZ | TYPE_LINK)) { + (*cit)->position = POS_FACEDOWN; + mainGame->dField.AddCard(*cit, player, LOCATION_EXTRA, 0); cit = mainGame->dField.deck[player].erase(cit); } else { (*cit)->location = LOCATION_DECK; + (*cit)->sequence = m++; ++cit; } } } else { - mainGame->gMutex.Lock(); + mainGame->gMutex.lock(); mainGame->dField.grave[player].swap(mainGame->dField.deck[player]); for (auto cit = mainGame->dField.grave[player].begin(); cit != mainGame->dField.grave[player].end(); ++cit) { (*cit)->location = LOCATION_GRAVE; mainGame->dField.MoveCard(*cit, 10); } + int m = 0; for (auto cit = mainGame->dField.deck[player].begin(); cit != mainGame->dField.deck[player].end(); ) { ClientCard* pcard = *cit; - if (pcard->type & 0x802040) { - pcard->location = LOCATION_EXTRA; - mainGame->dField.extra[player].push_back(pcard); + if (pcard->type & (TYPE_FUSION | TYPE_SYNCHRO | TYPE_XYZ | TYPE_LINK)) { + pcard->position = POS_FACEDOWN; + mainGame->dField.AddCard(pcard, player, LOCATION_EXTRA, 0); cit = mainGame->dField.deck[player].erase(cit); } else { pcard->location = LOCATION_DECK; + pcard->sequence = m++; ++cit; } mainGame->dField.MoveCard(pcard, 10); } - mainGame->gMutex.Unlock(); + mainGame->gMutex.unlock(); mainGame->WaitFrameSignal(11); } return true; @@ -1747,9 +2439,9 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { return true; } case MSG_DECK_TOP: { - int player = mainGame->LocalPlayer(BufferIO::ReadInt8(pbuf)); - int seq = BufferIO::ReadInt8(pbuf); - unsigned int code = (unsigned int)BufferIO::ReadInt32(pbuf); + int player = mainGame->LocalPlayer(BufferIO::Read(pbuf)); + int seq = BufferIO::Read(pbuf); + unsigned int code = BufferIO::Read(pbuf); ClientCard* pcard = mainGame->dField.GetCard(player, LOCATION_DECK, mainGame->dField.deck[player].size() - 1 - seq); pcard->SetCode(code & 0x7fffffff); bool rev = (code & 0x80000000) != 0; @@ -1760,17 +2452,23 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { return true; } case MSG_SHUFFLE_SET_CARD: { - std::vector::iterator cit; - int count = BufferIO::ReadInt8(pbuf); - ClientCard* mc[5]; + std::vector* lst = 0; + unsigned int loc = BufferIO::Read(pbuf); + int count = BufferIO::Read(pbuf); + if(loc == LOCATION_MZONE) + lst = mainGame->dField.mzone; + else + lst = mainGame->dField.szone; + ClientCard* mc[5]{ nullptr }; ClientCard* swp; - int c, l, s, ps; + int c, s, ps; + unsigned int l; for (int i = 0; i < count; ++i) { - c = mainGame->LocalPlayer(BufferIO::ReadInt8(pbuf)); - l = BufferIO::ReadInt8(pbuf); - s = BufferIO::ReadInt8(pbuf); - BufferIO::ReadInt8(pbuf); - mc[i] = mainGame->dField.mzone[c][s]; + c = mainGame->LocalPlayer(BufferIO::Read(pbuf)); + l = BufferIO::Read(pbuf); + s = BufferIO::Read(pbuf); + BufferIO::Read(pbuf); + mc[i] = lst[c][s]; mc[i]->SetCode(0); if(!mainGame->dInfo.isReplay || !mainGame->dInfo.isReplaySkiping) { mc[i]->dPos = irr::core::vector3df((3.95f - mc[i]->curPos.X) / 10, 0, 0.05f); @@ -1782,23 +2480,24 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { if(!mainGame->dInfo.isReplay || !mainGame->dInfo.isReplaySkiping) mainGame->WaitFrameSignal(20); for (int i = 0; i < count; ++i) { - c = mainGame->LocalPlayer(BufferIO::ReadInt8(pbuf)); - l = BufferIO::ReadInt8(pbuf); - s = BufferIO::ReadInt8(pbuf); - BufferIO::ReadInt8(pbuf); + c = mainGame->LocalPlayer(BufferIO::Read(pbuf)); + l = BufferIO::Read(pbuf); + s = BufferIO::Read(pbuf); + BufferIO::Read(pbuf); ps = mc[i]->sequence; if (l > 0) { - swp = mainGame->dField.mzone[c][s]; - mainGame->dField.mzone[c][ps] = swp; - mainGame->dField.mzone[c][s] = mc[i]; + swp = lst[c][s]; + lst[c][ps] = swp; + lst[c][s] = mc[i]; mc[i]->sequence = s; swp->sequence = ps; } } if(!mainGame->dInfo.isReplay || !mainGame->dInfo.isReplaySkiping) { + soundManager.PlaySoundEffect(SOUND_SHUFFLE); for (int i = 0; i < count; ++i) { mainGame->dField.MoveCard(mc[i], 10); - for (cit = mc[i]->overlayed.begin(); cit != mc[i]->overlayed.end(); ++cit) + for (auto cit = mc[i]->overlayed.begin(); cit != mc[i]->overlayed.end(); ++cit) mainGame->dField.MoveCard(*cit, 10); } mainGame->WaitFrameSignal(11); @@ -1806,12 +2505,28 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { return true; } case MSG_NEW_TURN: { - int player = mainGame->LocalPlayer(BufferIO::ReadInt8(pbuf)); + int player = mainGame->LocalPlayer(BufferIO::Read(pbuf)); mainGame->dInfo.turn++; - if(!mainGame->dInfo.isTag && mainGame->dInfo.turn == 5 && !mainGame->dInfo.isReplay && mainGame->dInfo.player_type < 7) { + if(!mainGame->dInfo.isReplay && mainGame->dInfo.player_type < 7) { + mainGame->dField.tag_surrender = false; + mainGame->dField.tag_teammate_surrender = false; mainGame->btnLeaveGame->setText(dataManager.GetSysString(1351)); mainGame->btnLeaveGame->setVisible(true); } + mainGame->HideElement(mainGame->wSurrender); + if(!mainGame->dInfo.isReplay && mainGame->dInfo.player_type < 7) { + if(mainGame->gameConf.control_mode == 0) { + mainGame->btnChainIgnore->setVisible(true); + mainGame->btnChainAlways->setVisible(true); + mainGame->btnChainWhenAvail->setVisible(true); + mainGame->dField.UpdateChainButtons(); + } else { + mainGame->btnChainIgnore->setVisible(false); + mainGame->btnChainAlways->setVisible(false); + mainGame->btnChainWhenAvail->setVisible(false); + mainGame->btnCancelOrFinish->setVisible(false); + } + } if(mainGame->dInfo.isTag && mainGame->dInfo.turn != 1) { if(player == 0) mainGame->dInfo.tag_player[0] = !mainGame->dInfo.tag_player[0]; @@ -1819,7 +2534,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { mainGame->dInfo.tag_player[1] = !mainGame->dInfo.tag_player[1]; } if(!mainGame->dInfo.isReplay || !mainGame->dInfo.isReplaySkiping) { - myswprintf(mainGame->dInfo.strTurn, L"Turn:%d", mainGame->dInfo.turn); + soundManager.PlaySoundEffect(SOUND_NEXT_TURN); mainGame->showcardcode = 10; mainGame->showcarddif = 30; mainGame->showcardp = 0; @@ -1830,10 +2545,8 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { return true; } case MSG_NEW_PHASE: { - int phase = (unsigned char)BufferIO::ReadInt8(pbuf); - mainGame->btnDP->setVisible(false); - mainGame->btnSP->setVisible(false); - mainGame->btnM1->setVisible(false); + unsigned short phase = BufferIO::Read(pbuf); + mainGame->btnPhaseStatus->setVisible(false); mainGame->btnBP->setVisible(false); mainGame->btnM2->setVisible(false); mainGame->btnEP->setVisible(false); @@ -1842,37 +2555,34 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { mainGame->showcardp = 0; switch (phase) { case PHASE_DRAW: - mainGame->btnDP->setVisible(true); + mainGame->btnPhaseStatus->setText(L"\xff24\xff30"); mainGame->showcardcode = 4; break; case PHASE_STANDBY: - mainGame->btnSP->setVisible(true); + mainGame->btnPhaseStatus->setText(L"\xff33\xff30"); mainGame->showcardcode = 5; break; case PHASE_MAIN1: - mainGame->btnM1->setVisible(true); + mainGame->btnPhaseStatus->setText(L"\xff2d\xff11"); mainGame->showcardcode = 6; break; - case PHASE_BATTLE: - mainGame->btnBP->setVisible(true); - mainGame->btnBP->setPressed(true); - mainGame->btnBP->setEnabled(false); + case PHASE_BATTLE_START: + mainGame->btnPhaseStatus->setText(L"\xff22\xff30"); mainGame->showcardcode = 7; break; case PHASE_MAIN2: - mainGame->btnM2->setVisible(true); - mainGame->btnM2->setPressed(true); - mainGame->btnM2->setEnabled(false); + mainGame->btnPhaseStatus->setText(L"\xff2d\xff12"); mainGame->showcardcode = 8; break; case PHASE_END: - mainGame->btnEP->setVisible(true); - mainGame->btnEP->setPressed(true); - mainGame->btnEP->setEnabled(false); + mainGame->btnPhaseStatus->setText(L"\xff25\xff30"); mainGame->showcardcode = 9; break; } + mainGame->btnPhaseStatus->setPressed(true); + mainGame->btnPhaseStatus->setVisible(true); if(!mainGame->dInfo.isReplay || !mainGame->dInfo.isReplaySkiping) { + soundManager.PlaySoundEffect(SOUND_PHASE); mainGame->showcard = 101; mainGame->WaitFrameSignal(40); mainGame->showcard = 0; @@ -1880,30 +2590,35 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { return true; } case MSG_MOVE: { - unsigned int code = (unsigned int)BufferIO::ReadInt32(pbuf); - int pc = mainGame->LocalPlayer(BufferIO::ReadInt8(pbuf)); - int pl = BufferIO::ReadUInt8(pbuf); - int ps = BufferIO::ReadInt8(pbuf); - int pp = BufferIO::ReadInt8(pbuf); - int cc = mainGame->LocalPlayer(BufferIO::ReadInt8(pbuf)); - int cl = BufferIO::ReadUInt8(pbuf); - int cs = BufferIO::ReadInt8(pbuf); - int cp = BufferIO::ReadInt8(pbuf); - /*int reason = */BufferIO::ReadInt32(pbuf); + unsigned int code = BufferIO::Read(pbuf); + int pc = mainGame->LocalPlayer(BufferIO::Read(pbuf)); + unsigned int pl = BufferIO::Read(pbuf); + int ps = BufferIO::Read(pbuf); + unsigned int pp = BufferIO::Read(pbuf); + int cc = mainGame->LocalPlayer(BufferIO::Read(pbuf)); + unsigned int cl = BufferIO::Read(pbuf); + int cs = BufferIO::Read(pbuf); + unsigned int cp = BufferIO::Read(pbuf); + int reason = BufferIO::Read(pbuf); + if(!mainGame->dInfo.isReplay || !mainGame->dInfo.isReplaySkiping) { + if(cl & LOCATION_REMOVED && pl != cl) + soundManager.PlaySoundEffect(SOUND_BANISHED); + else if(reason & REASON_DESTROY && pl != cl) + soundManager.PlaySoundEffect(SOUND_DESTROYED); + } + int appear = mainGame->gameConf.quick_animation ? 12 : 20; if (pl == 0) { - ClientCard* pcard = new ClientCard(); + ClientCard* pcard = new ClientCard; pcard->position = cp; pcard->SetCode(code); if(!mainGame->dInfo.isReplay || !mainGame->dInfo.isReplaySkiping) { - mainGame->gMutex.Lock(); + mainGame->gMutex.lock(); mainGame->dField.AddCard(pcard, cc, cl, cs); - mainGame->gMutex.Unlock(); - mainGame->dField.GetCardLocation(pcard, &pcard->curPos, &pcard->curRot); - pcard->mTransform.setTranslation(pcard->curPos); - pcard->mTransform.setRotationRadians(pcard->curRot); + mainGame->gMutex.unlock(); + mainGame->dField.GetCardLocation(pcard, &pcard->curPos, &pcard->curRot, true); pcard->curAlpha = 5; - mainGame->dField.FadeCard(pcard, 255, 20); - mainGame->WaitFrameSignal(20); + mainGame->dField.FadeCard(pcard, 255, appear); + mainGame->WaitFrameSignal(appear); } else mainGame->dField.AddCard(pcard, cc, cl, cs); } else if (cl == 0) { @@ -1914,18 +2629,18 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { for(auto eqit = pcard->equipped.begin(); eqit != pcard->equipped.end(); ++eqit) (*eqit)->equipTarget = 0; if(!mainGame->dInfo.isReplay || !mainGame->dInfo.isReplaySkiping) { - mainGame->dField.FadeCard(pcard, 5, 20); - mainGame->WaitFrameSignal(20); - mainGame->gMutex.Lock(); + mainGame->dField.FadeCard(pcard, 5, appear); + mainGame->WaitFrameSignal(appear); + mainGame->gMutex.lock(); mainGame->dField.RemoveCard(pc, pl, ps); - mainGame->gMutex.Unlock(); + mainGame->gMutex.unlock(); if(pcard == mainGame->dField.hovered_card) mainGame->dField.hovered_card = 0; } else mainGame->dField.RemoveCard(pc, pl, ps); delete pcard; } else { - if (!(pl & 0x80) && !(cl & 0x80)) { + if (!(pl & LOCATION_OVERLAY) && !(cl & LOCATION_OVERLAY)) { ClientCard* pcard = mainGame->dField.GetCard(pc, pl, ps); if (pcard->code != code && (code != 0 || cl == 0x40)) pcard->SetCode(code); @@ -1941,18 +2656,20 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { pcard->equipTarget = 0; } } + pcard->is_hovered = false; pcard->is_showequip = false; pcard->is_showtarget = false; + pcard->is_showchaintarget = false; if(mainGame->dInfo.isReplay && mainGame->dInfo.isReplaySkiping) { mainGame->dField.RemoveCard(pc, pl, ps); pcard->position = cp; mainGame->dField.AddCard(pcard, cc, cl, cs); } else { - mainGame->gMutex.Lock(); + mainGame->gMutex.lock(); mainGame->dField.RemoveCard(pc, pl, ps); pcard->position = cp; mainGame->dField.AddCard(pcard, cc, cl, cs); - mainGame->gMutex.Unlock(); + mainGame->gMutex.unlock(); if (pl == cl && pc == cc && (cl & 0x71)) { pcard->dPos = irr::core::vector3df(-0.3f, 0, 0); pcard->dRot = irr::core::vector3df(0, 0, 0); @@ -1964,63 +2681,70 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { mainGame->WaitFrameSignal(5); } else { if (cl == 0x4 && pcard->overlayed.size() > 0) { - mainGame->gMutex.Lock(); + mainGame->gMutex.lock(); for (size_t i = 0; i < pcard->overlayed.size(); ++i) mainGame->dField.MoveCard(pcard->overlayed[i], 10); - mainGame->gMutex.Unlock(); + mainGame->gMutex.unlock(); mainGame->WaitFrameSignal(10); } if (cl == 0x2) { - mainGame->gMutex.Lock(); + mainGame->gMutex.lock(); for (size_t i = 0; i < mainGame->dField.hand[cc].size(); ++i) mainGame->dField.MoveCard(mainGame->dField.hand[cc][i], 10); - mainGame->gMutex.Unlock(); + mainGame->gMutex.unlock(); } else { - mainGame->gMutex.Lock(); + mainGame->gMutex.lock(); mainGame->dField.MoveCard(pcard, 10); if (pl == 0x2) for (size_t i = 0; i < mainGame->dField.hand[pc].size(); ++i) mainGame->dField.MoveCard(mainGame->dField.hand[pc][i], 10); - mainGame->gMutex.Unlock(); + mainGame->gMutex.unlock(); } mainGame->WaitFrameSignal(5); } } - } else if (!(pl & 0x80)) { + } else if (!(pl & LOCATION_OVERLAY)) { ClientCard* pcard = mainGame->dField.GetCard(pc, pl, ps); if (code != 0 && pcard->code != code) pcard->SetCode(code); pcard->counters.clear(); pcard->ClearTarget(); + if(pcard->equipTarget) { + pcard->equipTarget->is_showequip = false; + pcard->equipTarget->equipped.erase(pcard); + pcard->equipTarget = 0; + } + pcard->is_showequip = false; pcard->is_showtarget = false; + pcard->is_showchaintarget = false; ClientCard* olcard = mainGame->dField.GetCard(cc, cl & 0x7f, cs); if(mainGame->dInfo.isReplay && mainGame->dInfo.isReplaySkiping) { mainGame->dField.RemoveCard(pc, pl, ps); olcard->overlayed.push_back(pcard); mainGame->dField.overlay_cards.insert(pcard); pcard->overlayTarget = olcard; - pcard->location = 0x80; - pcard->sequence = olcard->overlayed.size() - 1; + pcard->location = LOCATION_OVERLAY; + pcard->sequence = (unsigned char)(olcard->overlayed.size() - 1); } else { - mainGame->gMutex.Lock(); + mainGame->gMutex.lock(); mainGame->dField.RemoveCard(pc, pl, ps); olcard->overlayed.push_back(pcard); mainGame->dField.overlay_cards.insert(pcard); - mainGame->gMutex.Unlock(); + mainGame->gMutex.unlock(); pcard->overlayTarget = olcard; - pcard->location = 0x80; - pcard->sequence = olcard->overlayed.size() - 1; - if (olcard->location == 0x4) { - mainGame->gMutex.Lock(); + pcard->location = LOCATION_OVERLAY; + pcard->sequence = (unsigned char)(olcard->overlayed.size() - 1); + if (olcard->location == LOCATION_MZONE) { + mainGame->gMutex.lock(); mainGame->dField.MoveCard(pcard, 10); if (pl == 0x2) for (size_t i = 0; i < mainGame->dField.hand[pc].size(); ++i) mainGame->dField.MoveCard(mainGame->dField.hand[pc][i], 10); - mainGame->gMutex.Unlock(); + mainGame->gMutex.unlock(); mainGame->WaitFrameSignal(5); } } - } else if (!(cl & 0x80)) { + } else if (!(cl & LOCATION_OVERLAY)) { ClientCard* olcard = mainGame->dField.GetCard(pc, pl & 0x7f, ps); ClientCard* pcard = olcard->overlayed[pp]; if(mainGame->dInfo.isReplay && mainGame->dInfo.isReplaySkiping) { @@ -2030,23 +2754,23 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { mainGame->dField.AddCard(pcard, cc, cl, cs); mainGame->dField.overlay_cards.erase(pcard); for (size_t i = 0; i < olcard->overlayed.size(); ++i) - olcard->overlayed[i]->sequence = i; + olcard->overlayed[i]->sequence = (unsigned char)i; } else { - mainGame->gMutex.Lock(); + mainGame->gMutex.lock(); olcard->overlayed.erase(olcard->overlayed.begin() + pcard->sequence); pcard->overlayTarget = 0; pcard->position = cp; mainGame->dField.AddCard(pcard, cc, cl, cs); mainGame->dField.overlay_cards.erase(pcard); for (size_t i = 0; i < olcard->overlayed.size(); ++i) { - olcard->overlayed[i]->sequence = i; + olcard->overlayed[i]->sequence = (unsigned char)i; mainGame->dField.MoveCard(olcard->overlayed[i], 2); } - mainGame->gMutex.Unlock(); + mainGame->gMutex.unlock(); mainGame->WaitFrameSignal(5); - mainGame->gMutex.Lock(); + mainGame->gMutex.lock(); mainGame->dField.MoveCard(pcard, 10); - mainGame->gMutex.Unlock(); + mainGame->gMutex.unlock(); mainGame->WaitFrameSignal(5); } } else { @@ -2056,25 +2780,25 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { if(mainGame->dInfo.isReplay && mainGame->dInfo.isReplaySkiping) { olcard1->overlayed.erase(olcard1->overlayed.begin() + pcard->sequence); olcard2->overlayed.push_back(pcard); - pcard->sequence = olcard2->overlayed.size() - 1; - pcard->location = 0x80; + pcard->sequence = (unsigned char)(olcard2->overlayed.size() - 1); + pcard->location = LOCATION_OVERLAY; pcard->overlayTarget = olcard2; for (size_t i = 0; i < olcard1->overlayed.size(); ++i) { - olcard1->overlayed[i]->sequence = i; + olcard1->overlayed[i]->sequence = (unsigned char)i; } } else { - mainGame->gMutex.Lock(); + mainGame->gMutex.lock(); olcard1->overlayed.erase(olcard1->overlayed.begin() + pcard->sequence); olcard2->overlayed.push_back(pcard); - pcard->sequence = olcard2->overlayed.size() - 1; - pcard->location = 0x80; + pcard->sequence = (unsigned char)(olcard2->overlayed.size() - 1); + pcard->location = LOCATION_OVERLAY; pcard->overlayTarget = olcard2; for (size_t i = 0; i < olcard1->overlayed.size(); ++i) { - olcard1->overlayed[i]->sequence = i; + olcard1->overlayed[i]->sequence = (unsigned char)i; mainGame->dField.MoveCard(olcard1->overlayed[i], 2); } mainGame->dField.MoveCard(pcard, 10); - mainGame->gMutex.Unlock(); + mainGame->gMutex.unlock(); mainGame->WaitFrameSignal(5); } } @@ -2082,12 +2806,12 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { return true; } case MSG_POS_CHANGE: { - unsigned int code = (unsigned int)BufferIO::ReadInt32(pbuf); - int cc = mainGame->LocalPlayer(BufferIO::ReadInt8(pbuf)); - int cl = BufferIO::ReadInt8(pbuf); - int cs = BufferIO::ReadInt8(pbuf); - int pp = BufferIO::ReadInt8(pbuf); - int cp = BufferIO::ReadInt8(pbuf); + unsigned int code = BufferIO::Read(pbuf); + int cc = mainGame->LocalPlayer(BufferIO::Read(pbuf)); + unsigned int cl = BufferIO::Read(pbuf); + int cs = BufferIO::Read(pbuf); + unsigned int pp = BufferIO::Read(pbuf); + unsigned int cp = BufferIO::Read(pbuf); ClientCard* pcard = mainGame->dField.GetCard(cc, cl, cs); if((pp & POS_FACEUP) && (cp & POS_FACEDOWN)) { pcard->counters.clear(); @@ -2104,30 +2828,32 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { return true; } case MSG_SET: { - /*int code = */BufferIO::ReadInt32(pbuf); - /*int cc = mainGame->LocalPlayer*/(BufferIO::ReadInt8(pbuf)); - /*int cl = */BufferIO::ReadInt8(pbuf); - /*int cs = */BufferIO::ReadInt8(pbuf); - /*int cp = */BufferIO::ReadInt8(pbuf); + /*int code = */BufferIO::Read(pbuf); + /*int cc = mainGame->LocalPlayer*/(BufferIO::Read(pbuf)); + /*int cl = */BufferIO::Read(pbuf); + /*int cs = */BufferIO::Read(pbuf); + /*int cp = */BufferIO::Read(pbuf); + if(!mainGame->dInfo.isReplay || !mainGame->dInfo.isReplaySkiping) + soundManager.PlaySoundEffect(SOUND_SET); myswprintf(event_string, dataManager.GetSysString(1601)); return true; } case MSG_SWAP: { - /*int code1 = */BufferIO::ReadInt32(pbuf); - int c1 = mainGame->LocalPlayer(BufferIO::ReadInt8(pbuf)); - int l1 = BufferIO::ReadInt8(pbuf); - int s1 = BufferIO::ReadInt8(pbuf); - /*int p1 = */BufferIO::ReadInt8(pbuf); - /*int code2 = */BufferIO::ReadInt32(pbuf); - int c2 = mainGame->LocalPlayer(BufferIO::ReadInt8(pbuf)); - int l2 = BufferIO::ReadInt8(pbuf); - int s2 = BufferIO::ReadInt8(pbuf); - /*int p2 = */BufferIO::ReadInt8(pbuf); + /*int code1 = */BufferIO::Read(pbuf); + int c1 = mainGame->LocalPlayer(BufferIO::Read(pbuf)); + unsigned int l1 = BufferIO::Read(pbuf); + int s1 = BufferIO::Read(pbuf); + /*int p1 = */BufferIO::Read(pbuf); + /*int code2 = */BufferIO::Read(pbuf); + int c2 = mainGame->LocalPlayer(BufferIO::Read(pbuf)); + unsigned int l2 = BufferIO::Read(pbuf); + int s2 = BufferIO::Read(pbuf); + /*int p2 = */BufferIO::Read(pbuf); myswprintf(event_string, dataManager.GetSysString(1602)); ClientCard* pc1 = mainGame->dField.GetCard(c1, l1, s1); ClientCard* pc2 = mainGame->dField.GetCard(c2, l2, s2); if(!mainGame->dInfo.isReplay || !mainGame->dInfo.isReplaySkiping) { - mainGame->gMutex.Lock(); + mainGame->gMutex.lock(); mainGame->dField.RemoveCard(c1, l1, s1); mainGame->dField.RemoveCard(c2, l2, s2); mainGame->dField.AddCard(pc1, c2, l2, s2); @@ -2138,7 +2864,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { mainGame->dField.MoveCard(pc1->overlayed[i], 10); for (size_t i = 0; i < pc2->overlayed.size(); ++i) mainGame->dField.MoveCard(pc2->overlayed[i], 10); - mainGame->gMutex.Unlock(); + mainGame->gMutex.unlock(); mainGame->WaitFrameSignal(11); } else { mainGame->dField.RemoveCard(c1, l1, s1); @@ -2149,19 +2875,20 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { return true; } case MSG_FIELD_DISABLED: { - int disabled = BufferIO::ReadInt32(pbuf); + unsigned int disabled = BufferIO::Read(pbuf); if (!mainGame->dInfo.isFirst) disabled = (disabled >> 16) | (disabled << 16); mainGame->dField.disabled_field = disabled; return true; } case MSG_SUMMONING: { - unsigned int code = (unsigned int)BufferIO::ReadInt32(pbuf); - /*int cc = */mainGame->LocalPlayer(BufferIO::ReadInt8(pbuf)); - /*int cl = */BufferIO::ReadInt8(pbuf); - /*int cs = */BufferIO::ReadInt8(pbuf); - /*int cp = */BufferIO::ReadInt8(pbuf); + unsigned int code = BufferIO::Read(pbuf); + /*int cc = */mainGame->LocalPlayer(BufferIO::Read(pbuf)); + /*int cl = */BufferIO::Read(pbuf); + /*int cs = */BufferIO::Read(pbuf); + /*int cp = */BufferIO::Read(pbuf); if(!mainGame->dInfo.isReplay || !mainGame->dInfo.isReplaySkiping) { + soundManager.PlaySoundEffect(SOUND_SUMMON); myswprintf(event_string, dataManager.GetSysString(1603), dataManager.GetName(code)); mainGame->showcardcode = code; mainGame->showcarddif = 0; @@ -2178,19 +2905,26 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { return true; } case MSG_SPSUMMONING: { - unsigned int code = (unsigned int)BufferIO::ReadInt32(pbuf); - /*int cc = */mainGame->LocalPlayer(BufferIO::ReadInt8(pbuf)); - /*int cl = */BufferIO::ReadInt8(pbuf); - /*int cs = */BufferIO::ReadInt8(pbuf); - /*int cp = */BufferIO::ReadInt8(pbuf); + unsigned int code = BufferIO::Read(pbuf); + /*int cc = */mainGame->LocalPlayer(BufferIO::Read(pbuf)); + /*int cl = */BufferIO::Read(pbuf); + /*int cs = */BufferIO::Read(pbuf); + /*int cp = */BufferIO::Read(pbuf); if(!mainGame->dInfo.isReplay || !mainGame->dInfo.isReplaySkiping) { + CardData cd; + if(dataManager.GetData(code, &cd) && (cd.type & TYPE_TOKEN)) + soundManager.PlaySoundEffect(SOUND_TOKEN); + else + soundManager.PlaySoundEffect(SOUND_SPECIAL_SUMMON); myswprintf(event_string, dataManager.GetSysString(1605), dataManager.GetName(code)); - mainGame->showcardcode = code; - mainGame->showcarddif = 1; - mainGame->showcard = 5; - mainGame->WaitFrameSignal(30); - mainGame->showcard = 0; - mainGame->WaitFrameSignal(11); + if(code) { + mainGame->showcardcode = code; + mainGame->showcarddif = 1; + mainGame->showcard = 5; + mainGame->WaitFrameSignal(30); + mainGame->showcard = 0; + mainGame->WaitFrameSignal(11); + } } return true; } @@ -2199,15 +2933,16 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { return true; } case MSG_FLIPSUMMONING: { - unsigned int code = (unsigned int)BufferIO::ReadInt32(pbuf); - int cc = mainGame->LocalPlayer(BufferIO::ReadInt8(pbuf)); - int cl = BufferIO::ReadInt8(pbuf); - int cs = BufferIO::ReadInt8(pbuf); - int cp = BufferIO::ReadInt8(pbuf); + unsigned int code = BufferIO::Read(pbuf); + int cc = mainGame->LocalPlayer(BufferIO::Read(pbuf)); + unsigned int cl = BufferIO::Read(pbuf); + int cs = BufferIO::Read(pbuf); + unsigned int cp = BufferIO::Read(pbuf); ClientCard* pcard = mainGame->dField.GetCard(cc, cl, cs); pcard->SetCode(code); pcard->position = cp; if(!mainGame->dInfo.isReplay || !mainGame->dInfo.isReplaySkiping) { + soundManager.PlaySoundEffect(SOUND_FLIP); myswprintf(event_string, dataManager.GetSysString(1607), dataManager.GetName(code)); mainGame->dField.MoveCard(pcard, 10); mainGame->WaitFrameSignal(11); @@ -2226,18 +2961,19 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { return true; } case MSG_CHAINING: { - unsigned int code = (unsigned int)BufferIO::ReadInt32(pbuf); - int pcc = mainGame->LocalPlayer(BufferIO::ReadInt8(pbuf)); - int pcl = BufferIO::ReadInt8(pbuf); - int pcs = BufferIO::ReadInt8(pbuf); - int subs = BufferIO::ReadInt8(pbuf); - int cc = mainGame->LocalPlayer(BufferIO::ReadInt8(pbuf)); - int cl = BufferIO::ReadInt8(pbuf); - int cs = BufferIO::ReadInt8(pbuf); - int desc = BufferIO::ReadInt32(pbuf); - /*int ct = */BufferIO::ReadInt8(pbuf); + unsigned int code = BufferIO::Read(pbuf); + int pcc = mainGame->LocalPlayer(BufferIO::Read(pbuf)); + unsigned int pcl = BufferIO::Read(pbuf); + int pcs = BufferIO::Read(pbuf); + int subs = BufferIO::Read(pbuf); + int cc = mainGame->LocalPlayer(BufferIO::Read(pbuf)); + unsigned int cl = BufferIO::Read(pbuf); + int cs = BufferIO::Read(pbuf); + int desc = BufferIO::Read(pbuf); + /*int ct = */BufferIO::Read(pbuf); if(mainGame->dInfo.isReplay && mainGame->dInfo.isReplaySkiping) return true; + soundManager.PlaySoundEffect(SOUND_ACTIVATE); ClientCard* pcard = mainGame->dField.GetCard(pcc, pcl, pcs, subs); if(pcard->code != code) { pcard->code = code; @@ -2247,7 +2983,17 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { mainGame->showcarddif = 0; mainGame->showcard = 1; pcard->is_highlighting = true; - mainGame->WaitFrameSignal(30); + if(pcard->location & 0x30) { + float shift = -0.15f; + if(cc == 1) shift = 0.15f; + pcard->dPos = irr::core::vector3df(shift, 0, 0); + pcard->dRot = irr::core::vector3df(0, 0, 0); + pcard->is_moving = true; + pcard->aniFrame = 5; + mainGame->WaitFrameSignal(30); + mainGame->dField.MoveCard(pcard, 5); + } else + mainGame->WaitFrameSignal(30); pcard->is_highlighting = false; mainGame->dField.current_chain.chain_card = pcard; mainGame->dField.current_chain.code = code; @@ -2257,13 +3003,14 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { mainGame->dField.current_chain.sequence = cs; mainGame->dField.GetChainLocation(cc, cl, cs, &mainGame->dField.current_chain.chain_pos); mainGame->dField.current_chain.solved = false; + mainGame->dField.current_chain.target.clear(); int chc = 0; - for(size_t i = 0; i < mainGame->dField.chains.size(); ++i) { + for(auto chit = mainGame->dField.chains.begin(); chit != mainGame->dField.chains.end(); ++chit) { if (cl == 0x10 || cl == 0x20) { - if (mainGame->dField.chains[i].controler == cc && mainGame->dField.chains[i].location == cl) + if (chit->controler == cc && chit->location == cl) chc++; } else { - if (mainGame->dField.chains[i].controler == cc && mainGame->dField.chains[i].location == cl && mainGame->dField.chains[i].sequence == cs) + if (chit->controler == cc && chit->location == cl && chit->sequence == cs) chc++; } } @@ -2274,23 +3021,23 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { return true; } case MSG_CHAINED: { - int ct = BufferIO::ReadInt8(pbuf); + int ct = BufferIO::Read(pbuf); if(mainGame->dInfo.isReplay && mainGame->dInfo.isReplaySkiping) return true; myswprintf(event_string, dataManager.GetSysString(1609), dataManager.GetName(mainGame->dField.current_chain.code)); - mainGame->gMutex.Lock(); + mainGame->gMutex.lock(); mainGame->dField.chains.push_back(mainGame->dField.current_chain); - mainGame->gMutex.Unlock(); + mainGame->gMutex.unlock(); if (ct > 1) mainGame->WaitFrameSignal(20); mainGame->dField.last_chain = true; return true; } case MSG_CHAIN_SOLVING: { - int ct = BufferIO::ReadInt8(pbuf); + int ct = BufferIO::Read(pbuf); if(mainGame->dInfo.isReplay && mainGame->dInfo.isReplaySkiping) return true; - if (mainGame->dField.chains.size() > 1) { + if(mainGame->dField.chains.size() > 1 || mainGame->gameConf.draw_single_chain) { if (mainGame->dField.last_chain) mainGame->WaitFrameSignal(11); for(int i = 0; i < 5; ++i) { @@ -2304,17 +3051,23 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { return true; } case MSG_CHAIN_SOLVED: { - /*int ct = */BufferIO::ReadInt8(pbuf); + /*int ct = */BufferIO::Read(pbuf); return true; } case MSG_CHAIN_END: { + for(auto chit = mainGame->dField.chains.begin(); chit != mainGame->dField.chains.end(); ++chit) { + for(auto tgit = chit->target.begin(); tgit != chit->target.end(); ++tgit) + (*tgit)->is_showchaintarget = false; + chit->chain_card->is_showchaintarget = false; + } mainGame->dField.chains.clear(); return true; } case MSG_CHAIN_NEGATED: case MSG_CHAIN_DISABLED: { - int ct = BufferIO::ReadInt8(pbuf); + int ct = BufferIO::Read(pbuf); if(!mainGame->dInfo.isReplay || !mainGame->dInfo.isReplaySkiping) { + soundManager.PlaySoundEffect(SOUND_NEGATE); mainGame->showcardcode = mainGame->dField.chains[ct - 1].code; mainGame->showcarddif = 0; mainGame->showcard = 3; @@ -2327,19 +3080,20 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { return true; } case MSG_RANDOM_SELECTED: { - /*int player = */BufferIO::ReadInt8(pbuf); - int count = BufferIO::ReadInt8(pbuf); + /*int player = */BufferIO::Read(pbuf); + int count = BufferIO::Read(pbuf); if(mainGame->dInfo.isReplay && mainGame->dInfo.isReplaySkiping) { pbuf += count * 4; return true; } + soundManager.PlaySoundEffect(SOUND_DICE); ClientCard* pcards[10]; for (int i = 0; i < count; ++i) { - int c = mainGame->LocalPlayer(BufferIO::ReadInt8(pbuf)); - int l = BufferIO::ReadInt8(pbuf); - int s = BufferIO::ReadInt8(pbuf); - int ss = BufferIO::ReadInt8(pbuf); - if ((l & 0x80) > 0) + int c = mainGame->LocalPlayer(BufferIO::Read(pbuf)); + unsigned int l = BufferIO::Read(pbuf); + int s = BufferIO::Read(pbuf); + int ss = BufferIO::Read(pbuf); + if (l & LOCATION_OVERLAY) pcards[i] = mainGame->dField.GetCard(c, l & 0x7f, s)->overlayed[ss]; else pcards[i] = mainGame->dField.GetCard(c, l, s); @@ -2351,19 +3105,20 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { return true; } case MSG_BECOME_TARGET: { - int count = BufferIO::ReadInt8(pbuf); + //soundManager.PlaySoundEffect(SOUND_TARGET); + int count = BufferIO::Read(pbuf); if(mainGame->dInfo.isReplay && mainGame->dInfo.isReplaySkiping) { pbuf += count * 4; return true; } - ClientCard* pcard; for (int i = 0; i < count; ++i) { - int c = mainGame->LocalPlayer(BufferIO::ReadInt8(pbuf)); - int l = BufferIO::ReadInt8(pbuf); - int s = BufferIO::ReadInt8(pbuf); - /*int ss = */BufferIO::ReadInt8(pbuf); - pcard = mainGame->dField.GetCard(c, l, s); + int c = mainGame->LocalPlayer(BufferIO::Read(pbuf)); + unsigned int l = BufferIO::Read(pbuf); + int s = BufferIO::Read(pbuf); + /*int ss = */BufferIO::Read(pbuf); + ClientCard* pcard = mainGame->dField.GetCard(c, l, s); pcard->is_highlighting = true; + mainGame->dField.current_chain.target.insert(pcard); if(pcard->location & LOCATION_ONFIELD) { for (int j = 0; j < 3; ++j) { mainGame->dField.FadeCard(pcard, 5, 5); @@ -2371,21 +3126,29 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { mainGame->dField.FadeCard(pcard, 255, 5); mainGame->WaitFrameSignal(5); } + } else if(pcard->location & 0x30) { + float shift = -0.15f; + if(c == 1) shift = 0.15f; + pcard->dPos = irr::core::vector3df(shift, 0, 0); + pcard->dRot = irr::core::vector3df(0, 0, 0); + pcard->is_moving = true; + pcard->aniFrame = 5; + mainGame->WaitFrameSignal(30); + mainGame->dField.MoveCard(pcard, 5); } else mainGame->WaitFrameSignal(30); - myswprintf(textBuffer, dataManager.GetSysString(1610), dataManager.GetName(pcard->code), dataManager.FormatLocation(l, s), s); - mainGame->lstLog->addItem(textBuffer); - mainGame->logParam.push_back(pcard->code); + myswprintf(textBuffer, dataManager.GetSysString(1610), dataManager.GetName(pcard->code), dataManager.FormatLocation(l, s), s + 1); + mainGame->AddLog(textBuffer, pcard->code); pcard->is_highlighting = false; } return true; } case MSG_DRAW: { - int player = mainGame->LocalPlayer(BufferIO::ReadInt8(pbuf)); - int count = BufferIO::ReadInt8(pbuf); + int player = mainGame->LocalPlayer(BufferIO::Read(pbuf)); + int count = BufferIO::Read(pbuf); ClientCard* pcard; for (int i = 0; i < count; ++i) { - unsigned int code = (unsigned int)BufferIO::ReadInt32(pbuf); + unsigned int code = BufferIO::Read(pbuf); pcard = mainGame->dField.GetCard(player, LOCATION_DECK, mainGame->dField.deck[player].size() - 1 - i); if(!mainGame->dField.deck_reversed || code) pcard->SetCode(code & 0x7fffffff); @@ -2398,13 +3161,14 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { } } else { for (int i = 0; i < count; ++i) { - mainGame->gMutex.Lock(); + soundManager.PlaySoundEffect(SOUND_DRAW); + mainGame->gMutex.lock(); pcard = mainGame->dField.GetCard(player, LOCATION_DECK, mainGame->dField.deck[player].size() - 1); mainGame->dField.deck[player].erase(mainGame->dField.deck[player].end() - 1); mainGame->dField.AddCard(pcard, player, LOCATION_HAND, 0); - for(size_t i = 0; i < mainGame->dField.hand[player].size(); ++i) - mainGame->dField.MoveCard(mainGame->dField.hand[player][i], 10); - mainGame->gMutex.Unlock(); + for(int j = 0; j < (int)mainGame->dField.hand[player].size(); ++j) + mainGame->dField.MoveCard(mainGame->dField.hand[player][j], 10); + mainGame->gMutex.unlock(); mainGame->WaitFrameSignal(5); } } @@ -2414,8 +3178,8 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { return true; } case MSG_DAMAGE: { - int player = mainGame->LocalPlayer(BufferIO::ReadInt8(pbuf)); - int val = BufferIO::ReadInt32(pbuf); + int player = mainGame->LocalPlayer(BufferIO::Read(pbuf)); + int val = BufferIO::Read(pbuf); int final = mainGame->dInfo.lp[player] - val; if (final < 0) final = 0; @@ -2424,6 +3188,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { myswprintf(mainGame->dInfo.strLP[player], L"%d", mainGame->dInfo.lp[player]); return true; } + soundManager.PlaySoundEffect(SOUND_DAMAGE); mainGame->lpd = (mainGame->dInfo.lp[player] - final) / 10; if (player == 0) myswprintf(event_string, dataManager.GetSysString(1613), val); @@ -2436,22 +3201,23 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { mainGame->WaitFrameSignal(30); mainGame->lpframe = 10; mainGame->WaitFrameSignal(11); - mainGame->lpcstring = 0; + mainGame->lpcstring = L""; mainGame->dInfo.lp[player] = final; - mainGame->gMutex.Lock(); + mainGame->gMutex.lock(); myswprintf(mainGame->dInfo.strLP[player], L"%d", mainGame->dInfo.lp[player]); - mainGame->gMutex.Unlock(); + mainGame->gMutex.unlock(); return true; } case MSG_RECOVER: { - int player = mainGame->LocalPlayer(BufferIO::ReadInt8(pbuf)); - int val = BufferIO::ReadInt32(pbuf); + int player = mainGame->LocalPlayer(BufferIO::Read(pbuf)); + int val = BufferIO::Read(pbuf); int final = mainGame->dInfo.lp[player] + val; if(mainGame->dInfo.isReplay && mainGame->dInfo.isReplaySkiping) { mainGame->dInfo.lp[player] = final; myswprintf(mainGame->dInfo.strLP[player], L"%d", mainGame->dInfo.lp[player]); return true; } + soundManager.PlaySoundEffect(SOUND_RECOVER); mainGame->lpd = (mainGame->dInfo.lp[player] - final) / 10; if (player == 0) myswprintf(event_string, dataManager.GetSysString(1615), val); @@ -2464,42 +3230,50 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { mainGame->WaitFrameSignal(30); mainGame->lpframe = 10; mainGame->WaitFrameSignal(11); - mainGame->lpcstring = 0; + mainGame->lpcstring = L""; mainGame->dInfo.lp[player] = final; - mainGame->gMutex.Lock(); + mainGame->gMutex.lock(); myswprintf(mainGame->dInfo.strLP[player], L"%d", mainGame->dInfo.lp[player]); - mainGame->gMutex.Unlock(); + mainGame->gMutex.unlock(); return true; } case MSG_EQUIP: { - int c1 = mainGame->LocalPlayer(BufferIO::ReadInt8(pbuf)); - int l1 = BufferIO::ReadInt8(pbuf); - int s1 = BufferIO::ReadInt8(pbuf); - BufferIO::ReadInt8(pbuf); - int c2 = mainGame->LocalPlayer(BufferIO::ReadInt8(pbuf)); - int l2 = BufferIO::ReadInt8(pbuf); - int s2 = BufferIO::ReadInt8(pbuf); - BufferIO::ReadInt8(pbuf); + int c1 = mainGame->LocalPlayer(BufferIO::Read(pbuf)); + unsigned int l1 = BufferIO::Read(pbuf); + int s1 = BufferIO::Read(pbuf); + BufferIO::Read(pbuf); + int c2 = mainGame->LocalPlayer(BufferIO::Read(pbuf)); + unsigned int l2 = BufferIO::Read(pbuf); + int s2 = BufferIO::Read(pbuf); + BufferIO::Read(pbuf); ClientCard* pc1 = mainGame->dField.GetCard(c1, l1, s1); ClientCard* pc2 = mainGame->dField.GetCard(c2, l2, s2); if(mainGame->dInfo.isReplay && mainGame->dInfo.isReplaySkiping) { + if(pc1->equipTarget) + pc1->equipTarget->equipped.erase(pc1); pc1->equipTarget = pc2; pc2->equipped.insert(pc1); } else { - mainGame->gMutex.Lock(); + soundManager.PlaySoundEffect(SOUND_EQUIP); + mainGame->gMutex.lock(); + if(pc1->equipTarget) { + pc1->is_showequip = false; + pc1->equipTarget->is_showequip = false; + pc1->equipTarget->equipped.erase(pc1); + } pc1->equipTarget = pc2; pc2->equipped.insert(pc1); if (mainGame->dField.hovered_card == pc1) pc2->is_showequip = true; else if (mainGame->dField.hovered_card == pc2) pc1->is_showequip = true; - mainGame->gMutex.Unlock(); + mainGame->gMutex.unlock(); } return true; } case MSG_LPUPDATE: { - int player = mainGame->LocalPlayer(BufferIO::ReadInt8(pbuf)); - int val = BufferIO::ReadInt32(pbuf); + int player = mainGame->LocalPlayer(BufferIO::Read(pbuf)); + int val = BufferIO::Read(pbuf); if(mainGame->dInfo.isReplay && mainGame->dInfo.isReplaySkiping) { mainGame->dInfo.lp[player] = val; myswprintf(mainGame->dInfo.strLP[player], L"%d", mainGame->dInfo.lp[player]); @@ -2510,87 +3284,87 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { mainGame->lpframe = 10; mainGame->WaitFrameSignal(11); mainGame->dInfo.lp[player] = val; - mainGame->gMutex.Lock(); + mainGame->gMutex.lock(); myswprintf(mainGame->dInfo.strLP[player], L"%d", mainGame->dInfo.lp[player]); - mainGame->gMutex.Unlock(); + mainGame->gMutex.unlock(); return true; } case MSG_UNEQUIP: { - int c1 = mainGame->LocalPlayer(BufferIO::ReadInt8(pbuf)); - int l1 = BufferIO::ReadInt8(pbuf); - int s1 = BufferIO::ReadInt8(pbuf); - BufferIO::ReadInt8(pbuf); + int c1 = mainGame->LocalPlayer(BufferIO::Read(pbuf)); + unsigned int l1 = BufferIO::Read(pbuf); + int s1 = BufferIO::Read(pbuf); + BufferIO::Read(pbuf); ClientCard* pc = mainGame->dField.GetCard(c1, l1, s1); if(mainGame->dInfo.isReplay && mainGame->dInfo.isReplaySkiping) { pc->equipTarget->equipped.erase(pc); pc->equipTarget = 0; } else { - mainGame->gMutex.Lock(); + mainGame->gMutex.lock(); if (mainGame->dField.hovered_card == pc) pc->equipTarget->is_showequip = false; else if (mainGame->dField.hovered_card == pc->equipTarget) pc->is_showequip = false; pc->equipTarget->equipped.erase(pc); pc->equipTarget = 0; - mainGame->gMutex.Unlock(); + mainGame->gMutex.unlock(); } return true; } case MSG_CARD_TARGET: { - int c1 = mainGame->LocalPlayer(BufferIO::ReadInt8(pbuf)); - int l1 = BufferIO::ReadInt8(pbuf); - int s1 = BufferIO::ReadInt8(pbuf); - BufferIO::ReadInt8(pbuf); - int c2 = mainGame->LocalPlayer(BufferIO::ReadInt8(pbuf)); - int l2 = BufferIO::ReadInt8(pbuf); - int s2 = BufferIO::ReadInt8(pbuf); - BufferIO::ReadInt8(pbuf); + int c1 = mainGame->LocalPlayer(BufferIO::Read(pbuf)); + unsigned int l1 = BufferIO::Read(pbuf); + int s1 = BufferIO::Read(pbuf); + BufferIO::Read(pbuf); + int c2 = mainGame->LocalPlayer(BufferIO::Read(pbuf)); + unsigned int l2 = BufferIO::Read(pbuf); + int s2 = BufferIO::Read(pbuf); + BufferIO::Read(pbuf); ClientCard* pc1 = mainGame->dField.GetCard(c1, l1, s1); ClientCard* pc2 = mainGame->dField.GetCard(c2, l2, s2); if(mainGame->dInfo.isReplay && mainGame->dInfo.isReplaySkiping) { pc1->cardTarget.insert(pc2); pc2->ownerTarget.insert(pc1); } else { - mainGame->gMutex.Lock(); + mainGame->gMutex.lock(); pc1->cardTarget.insert(pc2); pc2->ownerTarget.insert(pc1); if (mainGame->dField.hovered_card == pc1) pc2->is_showtarget = true; else if (mainGame->dField.hovered_card == pc2) pc1->is_showtarget = true; - mainGame->gMutex.Unlock(); + mainGame->gMutex.unlock(); } break; } case MSG_CANCEL_TARGET: { - int c1 = mainGame->LocalPlayer(BufferIO::ReadInt8(pbuf)); - int l1 = BufferIO::ReadInt8(pbuf); - int s1 = BufferIO::ReadInt8(pbuf); - BufferIO::ReadInt8(pbuf); - int c2 = mainGame->LocalPlayer(BufferIO::ReadInt8(pbuf)); - int l2 = BufferIO::ReadInt8(pbuf); - int s2 = BufferIO::ReadInt8(pbuf); - BufferIO::ReadInt8(pbuf); + int c1 = mainGame->LocalPlayer(BufferIO::Read(pbuf)); + unsigned int l1 = BufferIO::Read(pbuf); + int s1 = BufferIO::Read(pbuf); + BufferIO::Read(pbuf); + int c2 = mainGame->LocalPlayer(BufferIO::Read(pbuf)); + unsigned int l2 = BufferIO::Read(pbuf); + int s2 = BufferIO::Read(pbuf); + BufferIO::Read(pbuf); ClientCard* pc1 = mainGame->dField.GetCard(c1, l1, s1); ClientCard* pc2 = mainGame->dField.GetCard(c2, l2, s2); if(mainGame->dInfo.isReplay && mainGame->dInfo.isReplaySkiping) { pc1->cardTarget.erase(pc2); pc2->ownerTarget.erase(pc1); } else { - mainGame->gMutex.Lock(); + mainGame->gMutex.lock(); pc1->cardTarget.erase(pc2); pc2->ownerTarget.erase(pc1); if (mainGame->dField.hovered_card == pc1) pc2->is_showtarget = false; else if (mainGame->dField.hovered_card == pc2) pc1->is_showtarget = false; - mainGame->gMutex.Unlock(); + mainGame->gMutex.unlock(); } break; } case MSG_PAY_LPCOST: { - int player = mainGame->LocalPlayer(BufferIO::ReadInt8(pbuf)); - int cost = BufferIO::ReadInt32(pbuf); + int player = mainGame->LocalPlayer(BufferIO::Read(pbuf)); + int cost = BufferIO::Read(pbuf); int final = mainGame->dInfo.lp[player] - cost; if (final < 0) final = 0; @@ -2599,6 +3373,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { myswprintf(mainGame->dInfo.strLP[player], L"%d", mainGame->dInfo.lp[player]); return true; } + soundManager.PlaySoundEffect(SOUND_DAMAGE); mainGame->lpd = (mainGame->dInfo.lp[player] - final) / 10; mainGame->lpccolor = 0xff0000ff; mainGame->lpplayer = player; @@ -2607,71 +3382,74 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { mainGame->WaitFrameSignal(30); mainGame->lpframe = 10; mainGame->WaitFrameSignal(11); - mainGame->lpcstring = 0; + mainGame->lpcstring = L""; mainGame->dInfo.lp[player] = final; - mainGame->gMutex.Lock(); + mainGame->gMutex.lock(); myswprintf(mainGame->dInfo.strLP[player], L"%d", mainGame->dInfo.lp[player]); - mainGame->gMutex.Unlock(); + mainGame->gMutex.unlock(); return true; } case MSG_ADD_COUNTER: { - int type = BufferIO::ReadInt16(pbuf); - int c = mainGame->LocalPlayer(BufferIO::ReadInt8(pbuf)); - int l = BufferIO::ReadInt8(pbuf); - int s = BufferIO::ReadInt8(pbuf); - int count = BufferIO::ReadInt8(pbuf); + int type = BufferIO::Read(pbuf); + int c = mainGame->LocalPlayer(BufferIO::Read(pbuf)); + unsigned int l = BufferIO::Read(pbuf); + int s = BufferIO::Read(pbuf); + int count = BufferIO::Read(pbuf); ClientCard* pc = mainGame->dField.GetCard(c, l, s); if (pc->counters.count(type)) pc->counters[type] += count; else pc->counters[type] = count; if(mainGame->dInfo.isReplay && mainGame->dInfo.isReplaySkiping) return true; + soundManager.PlaySoundEffect(SOUND_COUNTER_ADD); myswprintf(textBuffer, dataManager.GetSysString(1617), dataManager.GetName(pc->code), count, dataManager.GetCounterName(type)); pc->is_highlighting = true; - mainGame->gMutex.Lock(); + mainGame->gMutex.lock(); mainGame->stACMessage->setText(textBuffer); mainGame->PopupElement(mainGame->wACMessage, 20); - mainGame->gMutex.Unlock(); + mainGame->gMutex.unlock(); mainGame->WaitFrameSignal(40); pc->is_highlighting = false; return true; } case MSG_REMOVE_COUNTER: { - int type = BufferIO::ReadInt16(pbuf); - int c = mainGame->LocalPlayer(BufferIO::ReadInt8(pbuf)); - int l = BufferIO::ReadInt8(pbuf); - int s = BufferIO::ReadInt8(pbuf); - int count = BufferIO::ReadInt8(pbuf); + int type = BufferIO::Read(pbuf); + int c = mainGame->LocalPlayer(BufferIO::Read(pbuf)); + unsigned int l = BufferIO::Read(pbuf); + int s = BufferIO::Read(pbuf); + int count = BufferIO::Read(pbuf); ClientCard* pc = mainGame->dField.GetCard(c, l, s); pc->counters[type] -= count; if (pc->counters[type] <= 0) pc->counters.erase(type); if(mainGame->dInfo.isReplay && mainGame->dInfo.isReplaySkiping) return true; + soundManager.PlaySoundEffect(SOUND_COUNTER_REMOVE); myswprintf(textBuffer, dataManager.GetSysString(1618), dataManager.GetName(pc->code), count, dataManager.GetCounterName(type)); pc->is_highlighting = true; - mainGame->gMutex.Lock(); + mainGame->gMutex.lock(); mainGame->stACMessage->setText(textBuffer); mainGame->PopupElement(mainGame->wACMessage, 20); - mainGame->gMutex.Unlock(); + mainGame->gMutex.unlock(); mainGame->WaitFrameSignal(40); pc->is_highlighting = false; return true; } case MSG_ATTACK: { - int ca = mainGame->LocalPlayer(BufferIO::ReadInt8(pbuf)); - int la = BufferIO::ReadInt8(pbuf); - int sa = BufferIO::ReadInt8(pbuf); - BufferIO::ReadInt8(pbuf); + int ca = mainGame->LocalPlayer(BufferIO::Read(pbuf)); + unsigned int la = BufferIO::Read(pbuf); + int sa = BufferIO::Read(pbuf); + BufferIO::Read(pbuf); mainGame->dField.attacker = mainGame->dField.GetCard(ca, la, sa); - int cd = mainGame->LocalPlayer(BufferIO::ReadInt8(pbuf)); - int ld = BufferIO::ReadInt8(pbuf); - int sd = BufferIO::ReadInt8(pbuf); - BufferIO::ReadInt8(pbuf); + int cd = mainGame->LocalPlayer(BufferIO::Read(pbuf)); + unsigned int ld = BufferIO::Read(pbuf); + int sd = BufferIO::Read(pbuf); + BufferIO::Read(pbuf); if(mainGame->dInfo.isReplay && mainGame->dInfo.isReplaySkiping) return true; float sy; if (ld != 0) { + soundManager.PlaySoundEffect(SOUND_ATTACK); mainGame->dField.attack_target = mainGame->dField.GetCard(cd, ld, sd); myswprintf(event_string, dataManager.GetSysString(1619), dataManager.GetName(mainGame->dField.attacker->code), dataManager.GetName(mainGame->dField.attack_target->code)); @@ -2680,12 +3458,13 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { float xd = mainGame->dField.attack_target->curPos.X; float yd = mainGame->dField.attack_target->curPos.Y; sy = (float)sqrt((xa - xd) * (xa - xd) + (ya - yd) * (ya - yd)) / 2; - mainGame->atk_t = vector3df((xa + xd) / 2, (ya + yd) / 2, 0); + mainGame->atk_t = irr::core::vector3df((xa + xd) / 2, (ya + yd) / 2, 0); if (ca == 0) - mainGame->atk_r = vector3df(0, 0, -atan((xd - xa) / (yd - ya))); + mainGame->atk_r = irr::core::vector3df(0, 0, -atan((xd - xa) / (yd - ya))); else - mainGame->atk_r = vector3df(0, 0, 3.1415926 - atan((xd - xa) / (yd - ya))); + mainGame->atk_r = irr::core::vector3df(0, 0, 3.1415926 - atan((xd - xa) / (yd - ya))); } else { + soundManager.PlaySoundEffect(SOUND_DIRECT_ATTACK); myswprintf(event_string, dataManager.GetSysString(1620), dataManager.GetName(mainGame->dField.attacker->code)); float xa = mainGame->dField.attacker->curPos.X; float ya = mainGame->dField.attacker->curPos.Y; @@ -2694,11 +3473,11 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { if (ca == 0) yd = -3.5f; sy = (float)sqrt((xa - xd) * (xa - xd) + (ya - yd) * (ya - yd)) / 2; - mainGame->atk_t = vector3df((xa + xd) / 2, (ya + yd) / 2, 0); + mainGame->atk_t = irr::core::vector3df((xa + xd) / 2, (ya + yd) / 2, 0); if (ca == 0) - mainGame->atk_r = vector3df(0, 0, -atan((xd - xa) / (yd - ya))); + mainGame->atk_r = irr::core::vector3df(0, 0, -atan((xd - xa) / (yd - ya))); else - mainGame->atk_r = vector3df(0, 0, 3.1415926 - atan((xd - xa) / (yd - ya))); + mainGame->atk_r = irr::core::vector3df(0, 0, 3.1415926 - atan((xd - xa) / (yd - ya))); } matManager.GenArrow(sy); mainGame->attack_sv = 0; @@ -2708,30 +3487,30 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { return true; } case MSG_BATTLE: { - int ca = mainGame->LocalPlayer(BufferIO::ReadInt8(pbuf)); - int la = BufferIO::ReadInt8(pbuf); - int sa = BufferIO::ReadInt8(pbuf); - BufferIO::ReadInt8(pbuf); - int aatk = BufferIO::ReadInt32(pbuf); - int adef = BufferIO::ReadInt32(pbuf); - /*int da = */BufferIO::ReadInt8(pbuf); - int cd = mainGame->LocalPlayer(BufferIO::ReadInt8(pbuf)); - int ld = BufferIO::ReadInt8(pbuf); - int sd = BufferIO::ReadInt8(pbuf); - BufferIO::ReadInt8(pbuf); - int datk = BufferIO::ReadInt32(pbuf); - int ddef = BufferIO::ReadInt32(pbuf); - /*int dd = */BufferIO::ReadInt8(pbuf); + int ca = mainGame->LocalPlayer(BufferIO::Read(pbuf)); + unsigned int la = BufferIO::Read(pbuf); + int sa = BufferIO::Read(pbuf); + BufferIO::Read(pbuf); + int aatk = BufferIO::Read(pbuf); + int adef = BufferIO::Read(pbuf); + /*int da = */BufferIO::Read(pbuf); + int cd = mainGame->LocalPlayer(BufferIO::Read(pbuf)); + unsigned int ld = BufferIO::Read(pbuf); + int sd = BufferIO::Read(pbuf); + BufferIO::Read(pbuf); + int datk = BufferIO::Read(pbuf); + int ddef = BufferIO::Read(pbuf); + /*int dd = */BufferIO::Read(pbuf); if(mainGame->dInfo.isReplay && mainGame->dInfo.isReplaySkiping) return true; - mainGame->gMutex.Lock(); + mainGame->gMutex.lock(); ClientCard* pcard = mainGame->dField.GetCard(ca, la, sa); if(aatk != pcard->attack) { pcard->attack = aatk; myswprintf(pcard->atkstring, L"%d", aatk); } - if(adef != pcard->defence) { - pcard->defence = adef; + if(adef != pcard->defense) { + pcard->defense = adef; myswprintf(pcard->defstring, L"%d", adef); } if(ld) { @@ -2740,12 +3519,12 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { pcard->attack = datk; myswprintf(pcard->atkstring, L"%d", datk); } - if(ddef != pcard->defence) { - pcard->defence = ddef; + if(ddef != pcard->defense) { + pcard->defense = ddef; myswprintf(pcard->defstring, L"%d", ddef); } } - mainGame->gMutex.Unlock(); + mainGame->gMutex.unlock(); return true; } case MSG_ATTACK_DISABLED: { @@ -2759,20 +3538,19 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { return true; } case MSG_MISSED_EFFECT: { - BufferIO::ReadInt32(pbuf); - unsigned int code = (unsigned int)BufferIO::ReadInt32(pbuf); + BufferIO::Read(pbuf); + unsigned int code = BufferIO::Read(pbuf); myswprintf(textBuffer, dataManager.GetSysString(1622), dataManager.GetName(code)); - mainGame->lstLog->addItem(textBuffer); - mainGame->logParam.push_back(code); + mainGame->AddLog(textBuffer, code); return true; } case MSG_TOSS_COIN: { - /*int player = */mainGame->LocalPlayer(BufferIO::ReadInt8(pbuf)); - int count = BufferIO::ReadInt8(pbuf); + /*int player = */mainGame->LocalPlayer(BufferIO::Read(pbuf)); + int count = BufferIO::Read(pbuf); wchar_t* pwbuf = textBuffer; BufferIO::CopyWStrRef(dataManager.GetSysString(1623), pwbuf, 256); for (int i = 0; i < count; ++i) { - int res = BufferIO::ReadInt8(pbuf); + int res = BufferIO::Read(pbuf); *pwbuf++ = L'['; BufferIO::CopyWStrRef(dataManager.GetSysString(res ? 60 : 61), pwbuf, 256); *pwbuf++ = L']'; @@ -2780,22 +3558,22 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { *pwbuf = 0; if(mainGame->dInfo.isReplay && mainGame->dInfo.isReplaySkiping) return true; - mainGame->gMutex.Lock(); - mainGame->lstLog->addItem(textBuffer); - mainGame->logParam.push_back(0); + soundManager.PlaySoundEffect(SOUND_COIN); + mainGame->gMutex.lock(); + mainGame->AddLog(textBuffer); mainGame->stACMessage->setText(textBuffer); mainGame->PopupElement(mainGame->wACMessage, 20); - mainGame->gMutex.Unlock(); + mainGame->gMutex.unlock(); mainGame->WaitFrameSignal(40); return true; } case MSG_TOSS_DICE: { - /*int player = */mainGame->LocalPlayer(BufferIO::ReadInt8(pbuf)); - int count = BufferIO::ReadInt8(pbuf); + /*int player = */mainGame->LocalPlayer(BufferIO::Read(pbuf)); + int count = BufferIO::Read(pbuf); wchar_t* pwbuf = textBuffer; BufferIO::CopyWStrRef(dataManager.GetSysString(1624), pwbuf, 256); for (int i = 0; i < count; ++i) { - int res = BufferIO::ReadInt8(pbuf); + int res = BufferIO::Read(pbuf); *pwbuf++ = L'['; *pwbuf++ = L'0' + res; *pwbuf++ = L']'; @@ -2803,20 +3581,46 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { *pwbuf = 0; if(mainGame->dInfo.isReplay && mainGame->dInfo.isReplaySkiping) return true; - mainGame->gMutex.Lock(); - mainGame->lstLog->addItem(textBuffer); - mainGame->logParam.push_back(0); + soundManager.PlaySoundEffect(SOUND_DICE); + mainGame->gMutex.lock(); + mainGame->AddLog(textBuffer); mainGame->stACMessage->setText(textBuffer); mainGame->PopupElement(mainGame->wACMessage, 20); - mainGame->gMutex.Unlock(); + mainGame->gMutex.unlock(); mainGame->WaitFrameSignal(40); return true; } + case MSG_ROCK_PAPER_SCISSORS: { + /*int player = */mainGame->LocalPlayer(BufferIO::Read(pbuf)); + if(mainGame->dInfo.isReplay && mainGame->dInfo.isReplaySkiping) + return true; + mainGame->gMutex.lock(); + mainGame->PopupElement(mainGame->wHand); + mainGame->gMutex.unlock(); + return false; + } + case MSG_HAND_RES: { + int res = BufferIO::Read(pbuf); + if(mainGame->dInfo.isReplay && mainGame->dInfo.isReplaySkiping) + return true; + mainGame->stHintMsg->setVisible(false); + int res1 = (res & 0x3) - 1; + int res2 = ((res >> 2) & 0x3) - 1; + if(mainGame->dInfo.isFirst) + mainGame->showcardcode = res1 + (res2 << 16); + else + mainGame->showcardcode = res2 + (res1 << 16); + mainGame->showcarddif = 50; + mainGame->showcardp = 0; + mainGame->showcard = 100; + mainGame->WaitFrameSignal(60); + return false; + } case MSG_ANNOUNCE_RACE: { - /*int player = */mainGame->LocalPlayer(BufferIO::ReadInt8(pbuf)); - mainGame->dField.announce_count = BufferIO::ReadInt8(pbuf); - int available = BufferIO::ReadInt32(pbuf); - for(int i = 0, filter = 0x1; i < 24; ++i, filter <<= 1) { + /*int player = */mainGame->LocalPlayer(BufferIO::Read(pbuf)); + mainGame->dField.announce_count = BufferIO::Read(pbuf); + int available = BufferIO::Read(pbuf); + for(int i = 0, filter = 0x1; i < RACES_COUNT; ++i, filter <<= 1) { mainGame->chkRace[i]->setChecked(false); if(filter & available) mainGame->chkRace[i]->setVisible(true); @@ -2826,16 +3630,16 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { myswprintf(textBuffer, L"%ls", dataManager.GetDesc(select_hint)); else myswprintf(textBuffer, dataManager.GetSysString(563)); select_hint = 0; - mainGame->gMutex.Lock(); + mainGame->gMutex.lock(); mainGame->wANRace->setText(textBuffer); mainGame->PopupElement(mainGame->wANRace); - mainGame->gMutex.Unlock(); + mainGame->gMutex.unlock(); return false; } case MSG_ANNOUNCE_ATTRIB: { - /*int player = */mainGame->LocalPlayer(BufferIO::ReadInt8(pbuf)); - mainGame->dField.announce_count = BufferIO::ReadInt8(pbuf); - int available = BufferIO::ReadInt32(pbuf); + /*int player = */mainGame->LocalPlayer(BufferIO::Read(pbuf)); + mainGame->dField.announce_count = BufferIO::Read(pbuf); + int available = BufferIO::Read(pbuf); for(int i = 0, filter = 0x1; i < 7; ++i, filter <<= 1) { mainGame->chkAttribute[i]->setChecked(false); if(filter & available) @@ -2846,52 +3650,89 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { myswprintf(textBuffer, L"%ls", dataManager.GetDesc(select_hint)); else myswprintf(textBuffer, dataManager.GetSysString(562)); select_hint = 0; - mainGame->gMutex.Lock(); + mainGame->gMutex.lock(); mainGame->wANAttribute->setText(textBuffer); mainGame->PopupElement(mainGame->wANAttribute); - mainGame->gMutex.Unlock(); + mainGame->gMutex.unlock(); return false; } case MSG_ANNOUNCE_CARD: { - /*int player = */mainGame->LocalPlayer(BufferIO::ReadInt8(pbuf)); + /*int player = */mainGame->LocalPlayer(BufferIO::Read(pbuf)); + int count = BufferIO::Read(pbuf); + mainGame->dField.declare_opcodes.clear(); + for (int i = 0; i < count; ++i) + mainGame->dField.declare_opcodes.push_back(BufferIO::Read(pbuf)); if(select_hint) myswprintf(textBuffer, L"%ls", dataManager.GetDesc(select_hint)); else myswprintf(textBuffer, dataManager.GetSysString(564)); select_hint = 0; - mainGame->gMutex.Lock(); + mainGame->gMutex.lock(); mainGame->ebANCard->setText(L""); mainGame->wANCard->setText(textBuffer); + mainGame->dField.UpdateDeclarableList(); mainGame->PopupElement(mainGame->wANCard); - mainGame->gMutex.Unlock(); + mainGame->gMutex.unlock(); return false; } case MSG_ANNOUNCE_NUMBER: { - /*int player = */mainGame->LocalPlayer(BufferIO::ReadInt8(pbuf)); - int count = BufferIO::ReadInt8(pbuf); - mainGame->gMutex.Lock(); + /*int player = */mainGame->LocalPlayer(BufferIO::Read(pbuf)); + int count = BufferIO::Read(pbuf); + mainGame->gMutex.lock(); mainGame->cbANNumber->clear(); + bool quickmode = count <= 12; + if(quickmode) { + for(int i = 0; i < 12; ++i) { + mainGame->btnANNumber[i]->setEnabled(false); + mainGame->btnANNumber[i]->setPressed(false); + mainGame->btnANNumber[i]->setVisible(true); + } + } for (int i = 0; i < count; ++i) { - int value = BufferIO::ReadInt32(pbuf); + int value = BufferIO::Read(pbuf); myswprintf(textBuffer, L" % d", value); mainGame->cbANNumber->addItem(textBuffer, value); + if(quickmode) { + if((value > 12 || value <= 0)) { + quickmode = false; + } else { + mainGame->btnANNumber[value - 1]->setEnabled(true); + } + } } mainGame->cbANNumber->setSelected(0); + if(quickmode) { + mainGame->cbANNumber->setVisible(false); + mainGame->btnANNumberOK->setRelativePosition(irr::core::rect(20, 195, 210, 230)); + mainGame->btnANNumberOK->setEnabled(false); + irr::core::recti pos = mainGame->wANNumber->getRelativePosition(); + pos.LowerRightCorner.Y = pos.UpperLeftCorner.Y + 250; + mainGame->wANNumber->setRelativePosition(pos); + } else { + for(int i = 0; i < 12; ++i) { + mainGame->btnANNumber[i]->setVisible(false); + } + mainGame->cbANNumber->setVisible(true); + mainGame->btnANNumberOK->setRelativePosition(irr::core::rect(80, 60, 150, 85)); + irr::core::recti pos = mainGame->wANNumber->getRelativePosition(); + pos.LowerRightCorner.Y = pos.UpperLeftCorner.Y + 95; + mainGame->wANNumber->setRelativePosition(pos); + } if(select_hint) myswprintf(textBuffer, L"%ls", dataManager.GetDesc(select_hint)); else myswprintf(textBuffer, dataManager.GetSysString(565)); select_hint = 0; mainGame->wANNumber->setText(textBuffer); mainGame->PopupElement(mainGame->wANNumber); - mainGame->gMutex.Unlock(); + mainGame->gMutex.unlock(); return false; } case MSG_CARD_HINT: { - int c = mainGame->LocalPlayer(BufferIO::ReadInt8(pbuf)); - int l = BufferIO::ReadInt8(pbuf); - int s = BufferIO::ReadInt8(pbuf); - BufferIO::ReadInt8(pbuf); - int chtype = BufferIO::ReadInt8(pbuf); - int value = BufferIO::ReadInt32(pbuf); + int c = mainGame->LocalPlayer(BufferIO::Read(pbuf)); + unsigned int l = BufferIO::Read(pbuf); + int s = BufferIO::Read(pbuf); + BufferIO::Read(pbuf); + int chtype = BufferIO::Read(pbuf); + int value = BufferIO::Read(pbuf); ClientCard* pcard = mainGame->dField.GetCard(c, l, s); if(!pcard) return true; @@ -2922,16 +3763,38 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { } return true; } + case MSG_PLAYER_HINT: { + int player = mainGame->LocalPlayer(BufferIO::Read(pbuf)); + int chtype = BufferIO::Read(pbuf); + int value = BufferIO::Read(pbuf); + auto& player_desc_hints = mainGame->dField.player_desc_hints[player]; + if(value == CARD_QUESTION && player == 0) { + if(chtype == PHINT_DESC_ADD) { + mainGame->dField.cant_check_grave = true; + } else if(chtype == PHINT_DESC_REMOVE) { + mainGame->dField.cant_check_grave = false; + } + } + else if(chtype == PHINT_DESC_ADD) { + player_desc_hints[value]++; + } else if(chtype == PHINT_DESC_REMOVE) { + player_desc_hints[value]--; + if(player_desc_hints[value] == 0) + player_desc_hints.erase(value); + } + return true; + } case MSG_MATCH_KILL: { - match_kill = BufferIO::ReadInt32(pbuf); + match_kill = BufferIO::Read(pbuf); return true; } case MSG_TAG_SWAP: { - int player = mainGame->LocalPlayer(BufferIO::ReadInt8(pbuf)); - size_t mcount = (size_t)BufferIO::ReadInt8(pbuf); - size_t ecount = (size_t)BufferIO::ReadInt8(pbuf); - size_t hcount = (size_t)BufferIO::ReadInt8(pbuf); - int topcode = BufferIO::ReadInt32(pbuf); + int player = mainGame->LocalPlayer(BufferIO::Read(pbuf)); + size_t mcount = (size_t)BufferIO::Read(pbuf); + size_t ecount = (size_t)BufferIO::Read(pbuf); + size_t pcount = (size_t)BufferIO::Read(pbuf); + size_t hcount = (size_t)BufferIO::Read(pbuf); + int topcode = BufferIO::Read(pbuf); if(!mainGame->dInfo.isReplay || !mainGame->dInfo.isReplaySkiping) { for (auto cit = mainGame->dField.deck[player].begin(); cit != mainGame->dField.deck[player].end(); ++cit) { if(player == 0) (*cit)->dPos.Y = 0.4f; @@ -2958,7 +3821,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { } // if(!mainGame->dInfo.isReplay || !mainGame->dInfo.isReplaySkiping) - mainGame->gMutex.Lock(); + mainGame->gMutex.lock(); if(mainGame->dField.deck[player].size() > mcount) { while(mainGame->dField.deck[player].size() > mcount) { ClientCard* ccard = *mainGame->dField.deck[player].rbegin(); @@ -2967,10 +3830,10 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { } } else { while(mainGame->dField.deck[player].size() < mcount) { - ClientCard* ccard = new ClientCard(); + ClientCard* ccard = new ClientCard; ccard->controler = player; ccard->location = LOCATION_DECK; - ccard->sequence = mainGame->dField.deck[player].size(); + ccard->sequence = (unsigned char)mainGame->dField.deck[player].size(); mainGame->dField.deck[player].push_back(ccard); } } @@ -2982,10 +3845,10 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { } } else { while(mainGame->dField.hand[player].size() < hcount) { - ClientCard* ccard = new ClientCard(); + ClientCard* ccard = new ClientCard; ccard->controler = player; ccard->location = LOCATION_HAND; - ccard->sequence = mainGame->dField.hand[player].size(); + ccard->sequence = (unsigned char)mainGame->dField.hand[player].size(); mainGame->dField.hand[player].push_back(ccard); } } @@ -2997,15 +3860,16 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { } } else { while(mainGame->dField.extra[player].size() < ecount) { - ClientCard* ccard = new ClientCard(); + ClientCard* ccard = new ClientCard; ccard->controler = player; ccard->location = LOCATION_EXTRA; - ccard->sequence = mainGame->dField.extra[player].size(); + ccard->sequence = (unsigned char)mainGame->dField.extra[player].size(); mainGame->dField.extra[player].push_back(ccard); } } + mainGame->dField.extra_p_count[player] = pcount; if(!mainGame->dInfo.isReplay || !mainGame->dInfo.isReplaySkiping) - mainGame->gMutex.Unlock(); + mainGame->gMutex.unlock(); // if(!mainGame->dInfo.isReplay || !mainGame->dInfo.isReplaySkiping) { for (auto cit = mainGame->dField.deck[player].begin(); cit != mainGame->dField.deck[player].end(); ++cit) { @@ -3019,7 +3883,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { (*mainGame->dField.deck[player].rbegin())->code = topcode; for (auto cit = mainGame->dField.hand[player].begin(); cit != mainGame->dField.hand[player].end(); ++cit) { ClientCard* pcard = *cit; - pcard->code = BufferIO::ReadInt32(pbuf); + pcard->code = BufferIO::Read(pbuf); mainGame->dField.GetCardLocation(pcard, &pcard->curPos, &pcard->curRot); if(player == 0) pcard->curPos.Y += 2.0f; else pcard->curPos.Y -= 3.0f; @@ -3027,7 +3891,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { } for (auto cit = mainGame->dField.extra[player].begin(); cit != mainGame->dField.extra[player].end(); ++cit) { ClientCard* pcard = *cit; - pcard->code = 0; + pcard->code = BufferIO::Read(pbuf) & 0x7fffffff; mainGame->dField.GetCardLocation(pcard, &pcard->curPos, &pcard->curRot); if(player == 0) pcard->curPos.Y += 2.0f; else pcard->curPos.Y -= 3.0f; @@ -3038,87 +3902,85 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { break; } case MSG_RELOAD_FIELD: { - mainGame->gMutex.Lock(); + if(!mainGame->dInfo.isReplay || !mainGame->dInfo.isReplaySkiping) { + mainGame->gMutex.lock(); + } mainGame->dField.Clear(); + mainGame->dInfo.duel_rule = BufferIO::Read(pbuf); int val = 0; - for(int p = 0; p < 2; ++p) { - mainGame->dInfo.lp[p] = BufferIO::ReadInt32(pbuf); + for(int i = 0; i < 2; ++i) { + int p = mainGame->LocalPlayer(i); + mainGame->dInfo.lp[p] = BufferIO::Read(pbuf); myswprintf(mainGame->dInfo.strLP[p], L"%d", mainGame->dInfo.lp[p]); - for(int seq = 0; seq < 5; ++seq) { - val = BufferIO::ReadInt8(pbuf); + for(int seq = 0; seq < 7; ++seq) { + val = BufferIO::Read(pbuf); if(val) { ClientCard* ccard = new ClientCard; mainGame->dField.AddCard(ccard, p, LOCATION_MZONE, seq); - ccard->position = BufferIO::ReadInt8(pbuf); - mainGame->dField.GetCardLocation(ccard, &ccard->curPos, &ccard->curRot, true); - val = BufferIO::ReadInt8(pbuf); + ccard->position = BufferIO::Read(pbuf); + val = BufferIO::Read(pbuf); if(val) { for(int xyz = 0; xyz < val; ++xyz) { ClientCard* xcard = new ClientCard; ccard->overlayed.push_back(xcard); mainGame->dField.overlay_cards.insert(xcard); - mainGame->gMutex.Unlock(); xcard->overlayTarget = ccard; - xcard->location = 0x80; - xcard->sequence = ccard->overlayed.size() - 1; - mainGame->dField.GetCardLocation(xcard, &xcard->curPos, &xcard->curRot, true); + xcard->location = LOCATION_OVERLAY; + xcard->sequence = (unsigned char)(ccard->overlayed.size() - 1); + xcard->owner = p; + xcard->controler = p; } } } } for(int seq = 0; seq < 8; ++seq) { - val = BufferIO::ReadInt8(pbuf); + val = BufferIO::Read(pbuf); if(val) { ClientCard* ccard = new ClientCard; mainGame->dField.AddCard(ccard, p, LOCATION_SZONE, seq); - ccard->position = BufferIO::ReadInt8(pbuf); - mainGame->dField.GetCardLocation(ccard, &ccard->curPos, &ccard->curRot, true); + ccard->position = BufferIO::Read(pbuf); } } - val = BufferIO::ReadInt8(pbuf); + val = BufferIO::Read(pbuf); for(int seq = 0; seq < val; ++seq) { ClientCard* ccard = new ClientCard; mainGame->dField.AddCard(ccard, p, LOCATION_DECK, seq); - mainGame->dField.GetCardLocation(ccard, &ccard->curPos, &ccard->curRot, true); } - val = BufferIO::ReadInt8(pbuf); + val = BufferIO::Read(pbuf); for(int seq = 0; seq < val; ++seq) { ClientCard* ccard = new ClientCard; mainGame->dField.AddCard(ccard, p, LOCATION_HAND, seq); - mainGame->dField.GetCardLocation(ccard, &ccard->curPos, &ccard->curRot, true); } - val = BufferIO::ReadInt8(pbuf); + val = BufferIO::Read(pbuf); for(int seq = 0; seq < val; ++seq) { ClientCard* ccard = new ClientCard; - mainGame->dField.AddCard(ccard, p, LOCATION_EXTRA, seq); - mainGame->dField.GetCardLocation(ccard, &ccard->curPos, &ccard->curRot, true); + mainGame->dField.AddCard(ccard, p, LOCATION_GRAVE, seq); } - val = BufferIO::ReadInt8(pbuf); + val = BufferIO::Read(pbuf); for(int seq = 0; seq < val; ++seq) { ClientCard* ccard = new ClientCard; - mainGame->dField.AddCard(ccard, p, LOCATION_GRAVE, seq); - mainGame->dField.GetCardLocation(ccard, &ccard->curPos, &ccard->curRot, true); + mainGame->dField.AddCard(ccard, p, LOCATION_REMOVED, seq); } - val = BufferIO::ReadInt8(pbuf); + val = BufferIO::Read(pbuf); for(int seq = 0; seq < val; ++seq) { ClientCard* ccard = new ClientCard; - mainGame->dField.AddCard(ccard, p, LOCATION_REMOVED, seq); - mainGame->dField.GetCardLocation(ccard, &ccard->curPos, &ccard->curRot, true); + mainGame->dField.AddCard(ccard, p, LOCATION_EXTRA, seq); } - val = BufferIO::ReadInt8(pbuf); + val = BufferIO::Read(pbuf); mainGame->dField.extra_p_count[p] = val; } - val = BufferIO::ReadInt8(pbuf); //chains + mainGame->dField.RefreshAllCards(); + val = BufferIO::Read(pbuf); //chains for(int i = 0; i < val; ++i) { - unsigned int code = (unsigned int)BufferIO::ReadInt32(pbuf); - int pcc = mainGame->LocalPlayer(BufferIO::ReadInt8(pbuf)); - int pcl = BufferIO::ReadInt8(pbuf); - int pcs = BufferIO::ReadInt8(pbuf); - int subs = BufferIO::ReadInt8(pbuf); - int cc = mainGame->LocalPlayer(BufferIO::ReadInt8(pbuf)); - int cl = BufferIO::ReadInt8(pbuf); - int cs = BufferIO::ReadInt8(pbuf); - int desc = BufferIO::ReadInt32(pbuf); + unsigned int code = BufferIO::Read(pbuf); + int pcc = mainGame->LocalPlayer(BufferIO::Read(pbuf)); + unsigned int pcl = BufferIO::Read(pbuf); + int pcs = BufferIO::Read(pbuf); + int subs = BufferIO::Read(pbuf); + int cc = mainGame->LocalPlayer(BufferIO::Read(pbuf)); + unsigned int cl = BufferIO::Read(pbuf); + int cs = BufferIO::Read(pbuf); + int desc = BufferIO::Read(pbuf); ClientCard* pcard = mainGame->dField.GetCard(pcc, pcl, pcs, subs); mainGame->dField.current_chain.chain_card = pcard; mainGame->dField.current_chain.code = code; @@ -3129,12 +3991,12 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { mainGame->dField.GetChainLocation(cc, cl, cs, &mainGame->dField.current_chain.chain_pos); mainGame->dField.current_chain.solved = false; int chc = 0; - for(size_t i = 0; i < mainGame->dField.chains.size(); ++i) { - if (cl == 0x10 || cl == 0x20) { - if (mainGame->dField.chains[i].controler == cc && mainGame->dField.chains[i].location == cl) + for(auto chit = mainGame->dField.chains.begin(); chit != mainGame->dField.chains.end(); ++chit) { + if(cl == 0x10 || cl == 0x20) { + if(chit->controler == cc && chit->location == cl) chc++; } else { - if (mainGame->dField.chains[i].controler == cc && mainGame->dField.chains[i].location == cl && mainGame->dField.chains[i].sequence == cs) + if(chit->controler == cc && chit->location == cl && chit->sequence == cs) chc++; } } @@ -3148,18 +4010,25 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { myswprintf(event_string, dataManager.GetSysString(1609), dataManager.GetName(mainGame->dField.current_chain.code)); mainGame->dField.last_chain = true; } - mainGame->gMutex.Unlock(); + if(!mainGame->dInfo.isReplay || !mainGame->dInfo.isReplaySkiping) { + mainGame->gMutex.unlock(); + } break; } } return true; } -void DuelClient::SetResponseI(int respI) { - *((int*)response_buf) = respI; - response_len = 4; +void DuelClient::SwapField() { + is_swapping = true; } -void DuelClient::SetResponseB(unsigned char * respB, unsigned char len) { - memcpy(response_buf, respB, len); +void DuelClient::SetResponseI(int32_t respI) { + std::memcpy(response_buf, &respI, sizeof respI); + response_len = sizeof respI; +} +void DuelClient::SetResponseB(void* respB, size_t len) { + if (len > SIZE_RETURN_VALUE) + len = SIZE_RETURN_VALUE; + std::memcpy(response_buf, respB, len); response_len = len; } void DuelClient::SendResponse() { @@ -3177,7 +4046,11 @@ void DuelClient::SendResponse() { mainGame->btnShuffle->setVisible(false); break; } - case MSG_SELECT_CARD: { + case MSG_SELECT_CARD: + case MSG_SELECT_UNSELECT_CARD: + case MSG_SELECT_TRIBUTE: + case MSG_SELECT_SUM: + case MSG_SELECT_COUNTER: { mainGame->dField.ClearSelect(); break; } @@ -3185,30 +4058,28 @@ void DuelClient::SendResponse() { mainGame->dField.ClearChainSelect(); break; } - case MSG_SELECT_TRIBUTE: { - mainGame->dField.ClearSelect(); - break; - } - case MSG_SELECT_COUNTER: { - mainGame->dField.ClearSelect(); - break; - } - case MSG_SELECT_SUM: { - for(size_t i = 0; i < mainGame->dField.selectsum_all.size(); ++i) { - mainGame->dField.selectsum_all[i]->is_selectable = false; - mainGame->dField.selectsum_all[i]->is_selected = false; - } - break; - } } if(mainGame->dInfo.isSingleMode) { - SingleMode::SetResponse(response_buf); + SingleMode::SetResponse(response_buf, response_len); mainGame->singleSignal.Set(); } else { mainGame->dInfo.time_player = 2; SendBufferToServer(CTOS_RESPONSE, response_buf, response_len); } } +void DuelClient::SendUpdateDeck(const Deck& deck) { + std::vector deckbuf; + deckbuf.reserve(1024); + BufferIO::VectorWrite(deckbuf, static_cast(deck.main.size() + deck.extra.size())); + BufferIO::VectorWrite(deckbuf, static_cast(deck.side.size())); + for (const auto& card: deck.main) + BufferIO::VectorWrite(deckbuf, card->first); + for (const auto& card: deck.extra) + BufferIO::VectorWrite(deckbuf, card->first); + for (const auto& card: deck.side) + BufferIO::VectorWrite(deckbuf, card->first); + SendBufferToServer(CTOS_UPDATE_DECK, deckbuf.data(), deckbuf.size()); +} void DuelClient::BeginRefreshHost() { if(is_refreshing) return; @@ -3225,7 +4096,7 @@ void DuelClient::BeginRefreshHost() { return; SOCKET reply = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); sockaddr_in reply_addr; - memset(&reply_addr, 0, sizeof(reply_addr)); + std::memset(&reply_addr, 0, sizeof reply_addr); reply_addr.sin_family = AF_INET; reply_addr.sin_port = htons(7921); reply_addr.sin_addr.s_addr = 0; @@ -3236,7 +4107,7 @@ void DuelClient::BeginRefreshHost() { timeval timeout = {3, 0}; resp_event = event_new(broadev, reply, EV_TIMEOUT | EV_READ | EV_PERSIST, BroadcastReply, broadev); event_add(resp_event, &timeout); - Thread::NewThread(RefreshThread, broadev); + std::thread(RefreshThread, broadev).detach(); //send request SOCKADDR_IN local; local.sin_family = AF_INET; @@ -3250,13 +4121,14 @@ void DuelClient::BeginRefreshHost() { for(int i = 0; i < 8; ++i) { if(host->h_addr_list[i] == 0) break; - unsigned int local_addr = *(unsigned int*)host->h_addr_list[i]; + unsigned int local_addr = 0; + std::memcpy(&local_addr, host->h_addr_list[i], sizeof local_addr); local.sin_addr.s_addr = local_addr; SOCKET sSend = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); if(sSend == INVALID_SOCKET) break; - BOOL opt = TRUE; - setsockopt(sSend, SOL_SOCKET, SO_BROADCAST, (const char*)&opt, sizeof(BOOL)); + int opt = TRUE; + setsockopt(sSend, SOL_SOCKET, SO_BROADCAST, (const char*)&opt, sizeof opt); if(bind(sSend, (sockaddr*)&local, sizeof(sockaddr)) == SOCKET_ERROR) { closesocket(sSend); break; @@ -3265,8 +4137,7 @@ void DuelClient::BeginRefreshHost() { closesocket(sSend); } } -int DuelClient::RefreshThread(void * arg) { - event_base* broadev = (event_base*)arg; +int DuelClient::RefreshThread(event_base* broadev) { event_base_dispatch(broadev); evutil_socket_t fd; event_get_assignment(resp_event, 0, &fd, 0, 0, 0); @@ -3287,31 +4158,39 @@ void DuelClient::BroadcastReply(evutil_socket_t fd, short events, void * arg) { socklen_t sz = sizeof(sockaddr_in); char buf[256]; /*int ret = */recvfrom(fd, buf, 256, 0, (sockaddr*)&bc_addr, &sz); + HostPacket packet; + std::memcpy(&packet, buf, sizeof packet); + HostPacket* pHP = &packet; + if(is_closing || pHP->identifier != NETWORK_SERVER_ID) + return; + if(pHP->version != PRO_VERSION) + return; unsigned int ipaddr = bc_addr.sin_addr.s_addr; - HostPacket* pHP = (HostPacket*)buf; - if(!is_closing && pHP->identifier == NETWORK_SERVER_ID && pHP->version == PRO_VERSION && remotes.find(ipaddr) == remotes.end() ) { - mainGame->gMutex.Lock(); - remotes.insert(ipaddr); + const auto remote = std::make_pair(ipaddr, pHP->port); + if(remotes.find(remote) == remotes.end()) { + mainGame->gMutex.lock(); + remotes.insert(remote); pHP->ipaddr = ipaddr; hosts.push_back(*pHP); std::wstring hoststr; hoststr.append(L"["); hoststr.append(deckManager.GetLFListName(pHP->host.lflist)); hoststr.append(L"]["); - hoststr.append(dataManager.GetSysString(pHP->host.rule + 1240)); + hoststr.append(dataManager.GetSysString(pHP->host.rule + 1481)); hoststr.append(L"]["); hoststr.append(dataManager.GetSysString(pHP->host.mode + 1244)); hoststr.append(L"]["); if(pHP->host.draw_count == 1 && pHP->host.start_hand == 5 && pHP->host.start_lp == 8000 - && !pHP->host.no_check_deck && !pHP->host.no_shuffle_deck && ! pHP->host.enable_priority) - hoststr.append(dataManager.GetSysString(1280)); - else hoststr.append(dataManager.GetSysString(1281)); + && !pHP->host.no_check_deck && !pHP->host.no_shuffle_deck + && pHP->host.duel_rule == DEFAULT_DUEL_RULE) + hoststr.append(dataManager.GetSysString(1247)); + else hoststr.append(dataManager.GetSysString(1248)); hoststr.append(L"]"); wchar_t gamename[20]; - BufferIO::CopyWStr(pHP->name, gamename, 20); + BufferIO::CopyCharArray(pHP->name, gamename); hoststr.append(gamename); mainGame->lstHostList->addItem(hoststr.c_str()); - mainGame->gMutex.Unlock(); + mainGame->gMutex.unlock(); } } } diff --git a/gframe/duelclient.h b/gframe/duelclient.h index 0895b3c856..fd7045476c 100644 --- a/gframe/duelclient.h +++ b/gframe/duelclient.h @@ -1,80 +1,83 @@ #ifndef DUELCLIENT_H #define DUELCLIENT_H -#include "config.h" #include #include -#include -#include -#include -#include -#include -#include "network.h" -#include "data_manager.h" +#include +#include "config.h" #include "deck_manager.h" -#include "../ocgcore/mtrandom.h" +#include "network.h" namespace ygo { class DuelClient { private: static unsigned int connect_state; - static unsigned char response_buf[64]; - static unsigned char response_len; + static unsigned char response_buf[SIZE_RETURN_VALUE]; + static size_t response_len; static unsigned int watching; - static unsigned char selftype; static bool is_host; static event_base* client_base; static bufferevent* client_bev; - static char duel_client_read[0x2000]; - static char duel_client_write[0x2000]; + static unsigned char duel_client_write[SIZE_NETWORK_BUFFER]; static bool is_closing; + static bool is_swapping; static int select_hint; + static int select_unselect_hint; + static int last_select_hint; + static unsigned char last_successful_msg[SIZE_NETWORK_BUFFER]; + static size_t last_successful_msg_length; static wchar_t event_string[256]; - static mtrandom rnd; + static std::mt19937 rnd; + static std::uniform_real_distribution real_dist; + static bool is_refreshing; + static int match_kill; + static event* resp_event; + static std::set> remotes; + public: + static unsigned char selftype; static bool StartClient(unsigned int ip, unsigned short port, bool create_game = true); static void ConnectTimeout(evutil_socket_t fd, short events, void* arg); static void StopClient(bool is_exiting = false); static void ClientRead(bufferevent* bev, void* ctx); - static void ClientEvent(bufferevent *bev, short events, void *ctx); - static int ClientThread(void* param); - static void HandleSTOCPacketLan(char* data, unsigned int len); - static int ClientAnalyze(char* msg, unsigned int len); - static void SetResponseI(int respI); - static void SetResponseB(unsigned char* respB, unsigned char len); + static void ClientEvent(bufferevent* bev, short events, void* ctx); + static int ClientThread(); + static void HandleSTOCPacketLan(unsigned char* data, int len); + static bool ClientAnalyze(unsigned char* msg, int len); + static void SwapField(); + static void SetResponseI(int32_t respI); + static void SetResponseB(void* respB, size_t len); static void SendResponse(); + static void SendUpdateDeck(const Deck& deck); static void SendPacketToServer(unsigned char proto) { - char* p = duel_client_write; - BufferIO::WriteInt16(p, 1); - BufferIO::WriteInt8(p, proto); + auto p = duel_client_write; + BufferIO::Write(p, 1); + BufferIO::Write(p, proto); bufferevent_write(client_bev, duel_client_write, 3); } template - static void SendPacketToServer(unsigned char proto, ST& st) { - char* p = duel_client_write; - BufferIO::WriteInt16(p, 1 + sizeof(ST)); - BufferIO::WriteInt8(p, proto); - memcpy(p, &st, sizeof(ST)); + static void SendPacketToServer(unsigned char proto, const ST& st) { + auto p = duel_client_write; + static_assert(sizeof(ST) <= MAX_DATA_SIZE, "Packet size is too large."); + BufferIO::Write(p, (uint16_t)(1 + sizeof(ST))); + BufferIO::Write(p, proto); + std::memcpy(p, &st, sizeof(ST)); bufferevent_write(client_bev, duel_client_write, sizeof(ST) + 3); } static void SendBufferToServer(unsigned char proto, void* buffer, size_t len) { - char* p = duel_client_write; - BufferIO::WriteInt16(p, 1 + len); - BufferIO::WriteInt8(p, proto); - memcpy(p, buffer, len); + auto p = duel_client_write; + if (len > MAX_DATA_SIZE) + len = MAX_DATA_SIZE; + BufferIO::Write(p, (uint16_t)(1 + len)); + BufferIO::Write(p, proto); + std::memcpy(p, buffer, len); bufferevent_write(client_bev, duel_client_write, len + 3); } - -protected: - static bool is_refreshing; - static int match_kill; - static event* resp_event; - static std::set remotes; -public: + static std::vector hosts; static void BeginRefreshHost(); - static int RefreshThread(void* arg); + static int RefreshThread(event_base* broadev); static void BroadcastReply(evutil_socket_t fd, short events, void* arg); }; diff --git a/gframe/event_handler.cpp b/gframe/event_handler.cpp index 441665e710..96ce7d893d 100644 --- a/gframe/event_handler.cpp +++ b/gframe/event_handler.cpp @@ -1,42 +1,48 @@ +#include "event_handler.h" #include "client_field.h" -#include "math.h" #include "network.h" #include "game.h" #include "duelclient.h" #include "data_manager.h" #include "image_manager.h" +#include "sound_manager.h" +#include "deck_manager.h" #include "replay_mode.h" #include "single_mode.h" #include "materials.h" -#include "../ocgcore/field.h" namespace ygo { bool ClientField::OnEvent(const irr::SEvent& event) { + if(OnCommonEvent(event)) + return false; switch(event.EventType) { case irr::EET_GUI_EVENT: { - s32 id = event.GUIEvent.Caller->getID(); + if(mainGame->fadingList.size()) + break; + irr::s32 id = event.GUIEvent.Caller->getID(); switch(event.GUIEvent.EventType) { case irr::gui::EGET_BUTTON_CLICKED: { switch(id) { - case BUTTON_CLEAR_LOG: { - mainGame->lstLog->clear(); - mainGame->logParam.clear(); - break; - } case BUTTON_HAND1: case BUTTON_HAND2: case BUTTON_HAND3: { mainGame->wHand->setVisible(false); - mainGame->stHintMsg->setText(L""); - mainGame->stHintMsg->setVisible(true); - CTOS_HandResult cshr; - cshr.res = id - BUTTON_HAND1 + 1; - DuelClient::SendPacketToServer(CTOS_HAND_RESULT, cshr); + if(mainGame->dInfo.curMsg == MSG_ROCK_PAPER_SCISSORS) { + DuelClient::SetResponseI(id - BUTTON_HAND1 + 1); + DuelClient::SendResponse(); + } else { + mainGame->stHintMsg->setText(L""); + mainGame->stHintMsg->setVisible(true); + CTOS_HandResult cshr; + cshr.res = id - BUTTON_HAND1 + 1; + DuelClient::SendPacketToServer(CTOS_HAND_RESULT, cshr); + } break; } case BUTTON_FIRST: case BUTTON_SECOND: { + soundManager.PlaySoundEffect(SOUND_BUTTON); mainGame->HideElement(mainGame->wFTSelect); CTOS_TPResult cstr; cstr.res = BUTTON_SECOND - id; @@ -46,54 +52,72 @@ bool ClientField::OnEvent(const irr::SEvent& event) { case BUTTON_REPLAY_START: { if(!mainGame->dInfo.isReplay) break; + soundManager.PlaySoundEffect(SOUND_BUTTON); mainGame->btnReplayStart->setVisible(false); mainGame->btnReplayPause->setVisible(true); mainGame->btnReplayStep->setVisible(false); + mainGame->btnReplayUndo->setVisible(false); ReplayMode::Pause(false, false); break; } case BUTTON_REPLAY_PAUSE: { if(!mainGame->dInfo.isReplay) break; + soundManager.PlaySoundEffect(SOUND_BUTTON); mainGame->btnReplayStart->setVisible(true); mainGame->btnReplayPause->setVisible(false); mainGame->btnReplayStep->setVisible(true); + mainGame->btnReplayUndo->setVisible(true); ReplayMode::Pause(true, false); break; } case BUTTON_REPLAY_STEP: { if(!mainGame->dInfo.isReplay) break; + soundManager.PlaySoundEffect(SOUND_BUTTON); ReplayMode::Pause(false, true); break; } case BUTTON_REPLAY_EXIT: { if(!mainGame->dInfo.isReplay) break; + soundManager.PlaySoundEffect(SOUND_BUTTON); ReplayMode::StopReplay(); break; } case BUTTON_REPLAY_SWAP: { + soundManager.PlaySoundEffect(SOUND_BUTTON); + if(mainGame->dInfo.isReplay) + ReplayMode::SwapField(); + else if(mainGame->dInfo.player_type == 7) + DuelClient::SwapField(); + break; + } + case BUTTON_REPLAY_UNDO: { if(!mainGame->dInfo.isReplay) break; - ReplayMode::SwapField(); + soundManager.PlaySoundEffect(SOUND_BUTTON); + ReplayMode::Undo(); break; } case BUTTON_REPLAY_SAVE: { if(mainGame->ebRSName->getText()[0] == 0) break; + soundManager.PlaySoundEffect(SOUND_BUTTON); mainGame->actionParam = 1; mainGame->HideElement(mainGame->wReplaySave); mainGame->replaySignal.Set(); break; } case BUTTON_REPLAY_CANCEL: { + soundManager.PlaySoundEffect(SOUND_BUTTON); mainGame->actionParam = 0; mainGame->HideElement(mainGame->wReplaySave); mainGame->replaySignal.Set(); break; } case BUTTON_LEAVE_GAME: { + soundManager.PlaySoundEffect(SOUND_BUTTON); if(mainGame->dInfo.isSingleMode) { mainGame->singleSignal.SetNoWait(true); SingleMode::StopPlay(false); @@ -102,28 +126,77 @@ bool ClientField::OnEvent(const irr::SEvent& event) { if(mainGame->dInfo.player_type == 7) { DuelClient::StopClient(); mainGame->dInfo.isStarted = false; + mainGame->dInfo.isInDuel = false; + mainGame->dInfo.isFinished = false; mainGame->device->setEventReceiver(&mainGame->menuHandler); - mainGame->wCardImg->setVisible(false); - mainGame->wInfos->setVisible(false); - mainGame->wPhase->setVisible(false); - mainGame->btnLeaveGame->setVisible(false); + mainGame->CloseDuelWindow(); mainGame->btnCreateHost->setEnabled(true); mainGame->btnJoinHost->setEnabled(true); mainGame->btnJoinCancel->setEnabled(true); - mainGame->ShowElement(mainGame->wLanWindow); + mainGame->btnStartBot->setEnabled(true); + mainGame->btnBotCancel->setEnabled(true); + if(bot_mode) + mainGame->ShowElement(mainGame->wSinglePlay); + else + mainGame->ShowElement(mainGame->wLanWindow); + if(exit_on_return) + mainGame->device->closeDevice(); } else { - DuelClient::SendPacketToServer(CTOS_SURRENDER); - if(panel) - mainGame->HideElement(panel); + if(!(mainGame->dInfo.isTag && mainGame->dField.tag_surrender)) + mainGame->PopupElement(mainGame->wSurrender); } break; } + case BUTTON_SURRENDER_YES: { + soundManager.PlaySoundEffect(SOUND_BUTTON); + DuelClient::SendPacketToServer(CTOS_SURRENDER); + mainGame->HideElement(mainGame->wSurrender); + mainGame->dField.tag_surrender = true; + break; + } + case BUTTON_SURRENDER_NO: { + soundManager.PlaySoundEffect(SOUND_BUTTON); + mainGame->dField.tag_teammate_surrender = false; + mainGame->HideElement(mainGame->wSurrender); + break; + } + case BUTTON_CHAIN_IGNORE: { + soundManager.PlaySoundEffect(SOUND_BUTTON); + mainGame->ignore_chain = mainGame->btnChainIgnore->isPressed(); + mainGame->always_chain = false; + mainGame->chain_when_avail = false; + UpdateChainButtons(); + break; + } + case BUTTON_CHAIN_ALWAYS: { + soundManager.PlaySoundEffect(SOUND_BUTTON); + mainGame->always_chain = mainGame->btnChainAlways->isPressed(); + mainGame->ignore_chain = false; + mainGame->chain_when_avail = false; + UpdateChainButtons(); + break; + } + case BUTTON_CHAIN_WHENAVAIL: { + soundManager.PlaySoundEffect(SOUND_BUTTON); + mainGame->chain_when_avail = mainGame->btnChainWhenAvail->isPressed(); + mainGame->always_chain = false; + mainGame->ignore_chain = false; + UpdateChainButtons(); + break; + } + case BUTTON_CANCEL_OR_FINISH: { + soundManager.PlaySoundEffect(SOUND_BUTTON); + CancelOrFinish(); + break; + } case BUTTON_MSG_OK: { + soundManager.PlaySoundEffect(SOUND_BUTTON); mainGame->HideElement(mainGame->wMessage); mainGame->actionSignal.Set(); break; } case BUTTON_YES: { + soundManager.PlaySoundEffect(SOUND_BUTTON); switch(mainGame->dInfo.curMsg) { case MSG_SELECT_YESNO: case MSG_SELECT_EFFECTYN: { @@ -134,11 +207,19 @@ bool ClientField::OnEvent(const irr::SEvent& event) { mainGame->HideElement(mainGame->wQuery, true); break; } - case MSG_SELECT_CHAIN: case MSG_SELECT_CARD: case MSG_SELECT_TRIBUTE: case MSG_SELECT_SUM: { mainGame->HideElement(mainGame->wQuery); + if(select_panalmode) + mainGame->dField.ShowSelectCard(true); + break; + } + case MSG_SELECT_CHAIN: { + mainGame->HideElement(mainGame->wQuery); + if (!chain_forced) { + ShowCancelOrFinishButton(1); + } break; } default: { @@ -149,6 +230,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) { break; } case BUTTON_NO: { + soundManager.PlaySoundEffect(SOUND_BUTTON); switch(mainGame->dInfo.curMsg) { case MSG_SELECT_YESNO: case MSG_SELECT_EFFECTYN: { @@ -162,16 +244,14 @@ bool ClientField::OnEvent(const irr::SEvent& event) { case MSG_SELECT_CHAIN: { DuelClient::SetResponseI(-1); mainGame->HideElement(mainGame->wQuery, true); + ShowCancelOrFinishButton(0); break; } case MSG_SELECT_CARD: case MSG_SELECT_TRIBUTE: case MSG_SELECT_SUM: { - unsigned char respbuf[64]; - respbuf[0] = selected_cards.size(); - for (size_t i = 0; i < selected_cards.size(); ++i) - respbuf[i + 1] = selected_cards[i]->select_seq; - DuelClient::SetResponseB(respbuf, selected_cards.size() + 1); + SetResponseSelectedCards(); + ShowCancelOrFinishButton(0); mainGame->HideElement(mainGame->wQuery, true); break; } @@ -193,56 +273,84 @@ bool ClientField::OnEvent(const irr::SEvent& event) { break; } case BUTTON_POS_DU: { - DuelClient::SetResponseI(POS_FACEUP_DEFENCE); + DuelClient::SetResponseI(POS_FACEUP_DEFENSE); mainGame->HideElement(mainGame->wPosSelect, true); break; } case BUTTON_POS_DD: { - DuelClient::SetResponseI(POS_FACEDOWN_DEFENCE); + DuelClient::SetResponseI(POS_FACEDOWN_DEFENSE); mainGame->HideElement(mainGame->wPosSelect, true); break; } case BUTTON_OPTION_PREV: { + soundManager.PlaySoundEffect(SOUND_BUTTON); selected_option--; mainGame->btnOptionn->setVisible(true); if(selected_option == 0) mainGame->btnOptionp->setVisible(false); - mainGame->SetStaticText(mainGame->stOptions, 310, mainGame->textFont, (wchar_t*)dataManager.GetDesc(select_options[selected_option])); + mainGame->SetStaticText(mainGame->stOptions, 310, mainGame->guiFont, dataManager.GetDesc(select_options[selected_option])); break; } case BUTTON_OPTION_NEXT: { + soundManager.PlaySoundEffect(SOUND_BUTTON); selected_option++; mainGame->btnOptionp->setVisible(true); if(selected_option == select_options.size() - 1) mainGame->btnOptionn->setVisible(false); - mainGame->SetStaticText(mainGame->stOptions, 310, mainGame->textFont, (wchar_t*)dataManager.GetDesc(select_options[selected_option])); + mainGame->SetStaticText(mainGame->stOptions, 310, mainGame->guiFont, dataManager.GetDesc(select_options[selected_option])); + break; + } + case BUTTON_OPTION_0: + case BUTTON_OPTION_1: + case BUTTON_OPTION_2: + case BUTTON_OPTION_3: + case BUTTON_OPTION_4: { + soundManager.PlaySoundEffect(SOUND_BUTTON); + int step = mainGame->scrOption->isVisible() ? mainGame->scrOption->getPos() : 0; + selected_option = id - BUTTON_OPTION_0 + step; + SetResponseSelectedOption(); + ShowCancelOrFinishButton(0); break; } case BUTTON_OPTION_OK: { - if (mainGame->dInfo.curMsg == MSG_SELECT_OPTION) { - DuelClient::SetResponseI(selected_option); - } else if (mainGame->dInfo.curMsg == MSG_SELECT_IDLECMD) { - int index = 0; - while(activatable_cards[index] != command_card || activatable_descs[index] != select_options[selected_option]) index++; - DuelClient::SetResponseI((index << 16) + 5); - } else if (mainGame->dInfo.curMsg == MSG_SELECT_BATTLECMD) { - int index = 0; - while(activatable_cards[index] != command_card || activatable_descs[index] != select_options[selected_option]) index++; - DuelClient::SetResponseI(index << 16); - } else { - int index = 0; - while(activatable_cards[index] != command_card || activatable_descs[index] != select_options[selected_option]) index++; - DuelClient::SetResponseI(index); + soundManager.PlaySoundEffect(SOUND_BUTTON); + SetResponseSelectedOption(); + ShowCancelOrFinishButton(0); + break; + } + case BUTTON_ANNUMBER_1: + case BUTTON_ANNUMBER_2: + case BUTTON_ANNUMBER_3: + case BUTTON_ANNUMBER_4: + case BUTTON_ANNUMBER_5: + case BUTTON_ANNUMBER_6: + case BUTTON_ANNUMBER_7: + case BUTTON_ANNUMBER_8: + case BUTTON_ANNUMBER_9: + case BUTTON_ANNUMBER_10: + case BUTTON_ANNUMBER_11: + case BUTTON_ANNUMBER_12: { + soundManager.PlaySoundEffect(SOUND_BUTTON); + for(int i = 0; i < (int)mainGame->cbANNumber->getItemCount(); ++i) { + if(id - BUTTON_ANNUMBER_1 + 1 == mainGame->cbANNumber->getItemData(i)) { + mainGame->cbANNumber->setSelected(i); + break; + } + } + for(int i = 0; i < 12; ++i) { + mainGame->btnANNumber[i]->setPressed(event.GUIEvent.Caller == mainGame->btnANNumber[i]); } - mainGame->HideElement(mainGame->wOptions, true); + mainGame->btnANNumberOK->setEnabled(true); break; } case BUTTON_ANNUMBER_OK: { + soundManager.PlaySoundEffect(SOUND_BUTTON); DuelClient::SetResponseI(mainGame->cbANNumber->getSelected()); mainGame->HideElement(mainGame->wANNumber, true); break; } case BUTTON_ANCARD_OK: { + soundManager.PlaySoundEffect(SOUND_BUTTON); int sel = mainGame->lstANCard->getSelected(); if(sel == -1) break; @@ -256,18 +364,30 @@ bool ClientField::OnEvent(const irr::SEvent& event) { DuelClient::SendResponse(); break; } - case BUTTON_CMD_ACTIVATE: { - mainGame->wCmdMenu->setVisible(false); + case BUTTON_CMD_ACTIVATE: + case BUTTON_CMD_RESET: { + HideMenu(); + ShowCancelOrFinishButton(0); if(!list_command) { - int index = -1; + if(!menu_card) + break; select_options.clear(); + select_options_index.clear(); for (size_t i = 0; i < activatable_cards.size(); ++i) { - if (activatable_cards[i] == clicked_card) { - select_options.push_back(activatable_descs[i]); - if (index == -1) index = i; + if (activatable_cards[i] == menu_card) { + if(activatable_descs[i].second & EDESC_OPERATION) + continue; + else if(activatable_descs[i].second & EDESC_RESET) { + if(id == BUTTON_CMD_ACTIVATE) continue; + } else { + if(id == BUTTON_CMD_RESET) continue; + } + select_options.push_back(activatable_descs[i].first); + select_options_index.push_back(i); } } if (select_options.size() == 1) { + int index = select_options_index[0]; if (mainGame->dInfo.curMsg == MSG_SELECT_IDLECMD) { DuelClient::SetResponseI((index << 16) + 5); } else if (mainGame->dInfo.curMsg == MSG_SELECT_BATTLECMD) { @@ -277,15 +397,14 @@ bool ClientField::OnEvent(const irr::SEvent& event) { } DuelClient::SendResponse(); } else { - mainGame->SetStaticText(mainGame->stOptions, 310, mainGame->textFont, (wchar_t*)dataManager.GetDesc(select_options[0])); - selected_option = 0; - command_card = clicked_card; - mainGame->btnOptionp->setVisible(false); - mainGame->btnOptionn->setVisible(true); - mainGame->ShowElement(mainGame->wOptions); + command_card = menu_card; + ShowSelectOption(); + select_ready = false; + ShowCancelOrFinishButton(1); } } else { selectable_cards.clear(); + bool is_continuous = false; switch(command_location) { case LOCATION_DECK: { for(size_t i = 0; i < deck[command_controler].size(); ++i) @@ -303,8 +422,6 @@ bool ClientField::OnEvent(const irr::SEvent& event) { for(size_t i = 0; i < remove[command_controler].size(); ++i) if(remove[command_controler][i]->cmdFlag & COMMAND_ACTIVATE) selectable_cards.push_back(remove[command_controler][i]); - selectable_cards.reserve(selectable_cards.size() + conti_cards.size()); - selectable_cards.insert(selectable_cards.end(), conti_cards.begin(), conti_cards.end()); break; } case LOCATION_EXTRA: { @@ -313,19 +430,33 @@ bool ClientField::OnEvent(const irr::SEvent& event) { selectable_cards.push_back(extra[command_controler][i]); break; } + case POSITION_HINT: { + is_continuous = true; + selectable_cards = conti_cards; + std::sort(selectable_cards.begin(), selectable_cards.end()); + auto eit = std::unique(selectable_cards.begin(), selectable_cards.end()); + selectable_cards.erase(eit, selectable_cards.end()); + break; + } + } + if (!is_continuous) { + mainGame->wCardSelect->setText(dataManager.GetSysString(566)); + list_command = COMMAND_ACTIVATE; + } else { + mainGame->wCardSelect->setText(dataManager.GetSysString(568)); + list_command = COMMAND_OPERATION; } - mainGame->wCardSelect->setText(dataManager.GetSysString(566)); - list_command = COMMAND_ACTIVATE; - ShowSelectCard(true, true); + std::sort(selectable_cards.begin(), selectable_cards.end(), ClientCard::client_card_sort); + ShowSelectCard(true, is_continuous); } break; } case BUTTON_CMD_SUMMON: { - mainGame->wCmdMenu->setVisible(false); - if(!clicked_card) + HideMenu(); + if(!menu_card) break; for(size_t i = 0; i < summonable_cards.size(); ++i) { - if(summonable_cards[i] == clicked_card) { + if(summonable_cards[i] == menu_card) { ClearCommandFlag(); DuelClient::SetResponseI(i << 16); DuelClient::SendResponse(); @@ -335,12 +466,12 @@ bool ClientField::OnEvent(const irr::SEvent& event) { break; } case BUTTON_CMD_SPSUMMON: { - mainGame->wCmdMenu->setVisible(false); + HideMenu(); if(!list_command) { - if(!clicked_card) + if(!menu_card) break; for(size_t i = 0; i < spsummonable_cards.size(); ++i) { - if(spsummonable_cards[i] == clicked_card) { + if(spsummonable_cards[i] == menu_card) { ClearCommandFlag(); DuelClient::SetResponseI((i << 16) + 1); DuelClient::SendResponse(); @@ -372,15 +503,17 @@ bool ClientField::OnEvent(const irr::SEvent& event) { list_command = COMMAND_SPSUMMON; mainGame->wCardSelect->setText(dataManager.GetSysString(509)); ShowSelectCard(); + select_ready = false; + ShowCancelOrFinishButton(1); } break; } case BUTTON_CMD_MSET: { - mainGame->wCmdMenu->setVisible(false); - if(!clicked_card) + HideMenu(); + if(!menu_card) break; for(size_t i = 0; i < msetable_cards.size(); ++i) { - if(msetable_cards[i] == clicked_card) { + if(msetable_cards[i] == menu_card) { DuelClient::SetResponseI((i << 16) + 3); DuelClient::SendResponse(); break; @@ -389,11 +522,11 @@ bool ClientField::OnEvent(const irr::SEvent& event) { break; } case BUTTON_CMD_SSET: { - mainGame->wCmdMenu->setVisible(false); - if(!clicked_card) + HideMenu(); + if(!menu_card) break; for(size_t i = 0; i < ssetable_cards.size(); ++i) { - if(ssetable_cards[i] == clicked_card) { + if(ssetable_cards[i] == menu_card) { DuelClient::SetResponseI((i << 16) + 4); DuelClient::SendResponse(); break; @@ -402,11 +535,11 @@ bool ClientField::OnEvent(const irr::SEvent& event) { break; } case BUTTON_CMD_REPOS: { - mainGame->wCmdMenu->setVisible(false); - if(!clicked_card) + HideMenu(); + if(!menu_card) break; for(size_t i = 0; i < reposable_cards.size(); ++i) { - if(reposable_cards[i] == clicked_card) { + if(reposable_cards[i] == menu_card) { DuelClient::SetResponseI((i << 16) + 2); DuelClient::SendResponse(); break; @@ -415,11 +548,11 @@ bool ClientField::OnEvent(const irr::SEvent& event) { break; } case BUTTON_CMD_ATTACK: { - mainGame->wCmdMenu->setVisible(false); - if(!clicked_card) + HideMenu(); + if(!menu_card) break; for(size_t i = 0; i < attackable_cards.size(); ++i) { - if(attackable_cards[i] == clicked_card) { + if(attackable_cards[i] == menu_card) { DuelClient::SetResponseI((i << 16) + 1); DuelClient::SendResponse(); break; @@ -428,50 +561,51 @@ bool ClientField::OnEvent(const irr::SEvent& event) { break; } case BUTTON_CMD_SHOWLIST: { - mainGame->wCmdMenu->setVisible(false); + HideMenu(); selectable_cards.clear(); + wchar_t formatBuffer[2048]; switch(command_location) { case LOCATION_DECK: { - for(int32 i = (int32)deck[command_controler].size() - 1; i >= 0 ; --i) - selectable_cards.push_back(deck[command_controler][i]); + selectable_cards.assign(deck[command_controler].rbegin(), deck[command_controler].rend()); myswprintf(formatBuffer, L"%ls(%d)", dataManager.GetSysString(1000), deck[command_controler].size()); mainGame->wCardSelect->setText(formatBuffer); break; } case LOCATION_MZONE: { ClientCard* pcard = mzone[command_controler][command_sequence]; - for(int32 i = 0; i < (int32)pcard->overlayed.size(); ++i) - selectable_cards.push_back(pcard->overlayed[i]); + selectable_cards.assign(pcard->overlayed.begin(), pcard->overlayed.end()); myswprintf(formatBuffer, L"%ls(%d)", dataManager.GetSysString(1007), pcard->overlayed.size()); mainGame->wCardSelect->setText(formatBuffer); break; } case LOCATION_GRAVE: { - for(int32 i = (int32)grave[command_controler].size() - 1; i >= 0 ; --i) - selectable_cards.push_back(grave[command_controler][i]); + selectable_cards.assign(grave[command_controler].rbegin(), grave[command_controler].rend()); myswprintf(formatBuffer, L"%ls(%d)", dataManager.GetSysString(1004), grave[command_controler].size()); mainGame->wCardSelect->setText(formatBuffer); break; } case LOCATION_REMOVED: { - for(int32 i = (int32)remove[command_controler].size() - 1; i >= 0 ; --i) - selectable_cards.push_back(remove[command_controler][i]); + selectable_cards.assign(remove[command_controler].rbegin(), remove[command_controler].rend()); myswprintf(formatBuffer, L"%ls(%d)", dataManager.GetSysString(1005), remove[command_controler].size()); mainGame->wCardSelect->setText(formatBuffer); break; } case LOCATION_EXTRA: { - for(int32 i = (int32)extra[command_controler].size() - 1; i >= 0 ; --i) - selectable_cards.push_back(extra[command_controler][i]); + selectable_cards.assign(extra[command_controler].rbegin(), extra[command_controler].rend()); myswprintf(formatBuffer, L"%ls(%d)", dataManager.GetSysString(1006), extra[command_controler].size()); mainGame->wCardSelect->setText(formatBuffer); break; } } list_command = COMMAND_LIST; + std::sort(selectable_cards.begin(), selectable_cards.end(), ClientCard::client_card_sort); ShowSelectCard(true); break; } + case BUTTON_PHASE: { + mainGame->btnPhaseStatus->setPressed(true); + break; + } case BUTTON_BP: { if(mainGame->dInfo.curMsg == MSG_SELECT_IDLECMD) { DuelClient::SetResponseI(6); @@ -515,19 +649,26 @@ bool ClientField::OnEvent(const irr::SEvent& event) { while(spsummonable_cards[index] != command_card) index++; DuelClient::SetResponseI((index << 16) + 1); mainGame->HideElement(mainGame->wCardSelect, true); + ShowCancelOrFinishButton(0); break; } - if(list_command == COMMAND_ACTIVATE) { - int index = -1; + if(list_command == COMMAND_ACTIVATE || list_command == COMMAND_OPERATION) { command_card = selectable_cards[id - BUTTON_CARD_0 + mainGame->scrCardList->getPos() / 10]; select_options.clear(); + select_options_index.clear(); for (size_t i = 0; i < activatable_cards.size(); ++i) { if (activatable_cards[i] == command_card) { - select_options.push_back(activatable_descs[i]); - if (index == -1) index = i; + if(activatable_descs[i].second & EDESC_OPERATION) { + if(list_command == COMMAND_ACTIVATE) continue; + } else { + if(list_command == COMMAND_OPERATION) continue; + } + select_options.push_back(activatable_descs[i].first); + select_options_index.push_back(i); } } if (select_options.size() == 1) { + int index = select_options_index[0]; if (mainGame->dInfo.curMsg == MSG_SELECT_IDLECMD) { DuelClient::SetResponseI((index << 16) + 5); } else if (mainGame->dInfo.curMsg == MSG_SELECT_BATTLECMD) { @@ -537,12 +678,8 @@ bool ClientField::OnEvent(const irr::SEvent& event) { } mainGame->HideElement(mainGame->wCardSelect, true); } else { - mainGame->SetStaticText(mainGame->stOptions, 310, mainGame->textFont, (wchar_t*)dataManager.GetDesc(select_options[0])); - selected_option = 0; - mainGame->btnOptionp->setVisible(false); - mainGame->btnOptionn->setVisible(true); mainGame->wCardSelect->setVisible(false); - mainGame->ShowElement(mainGame->wOptions); + ShowSelectOption(); } break; } @@ -565,41 +702,64 @@ bool ClientField::OnEvent(const irr::SEvent& event) { } int sel = selected_cards.size(); if (sel >= select_max) { - unsigned char respbuf[64]; - respbuf[0] = selected_cards.size(); - for (size_t i = 0; i < selected_cards.size(); ++i) - respbuf[i + 1] = selected_cards[i]->select_seq; - DuelClient::SetResponseB(respbuf, selected_cards.size() + 1); + SetResponseSelectedCards(); + ShowCancelOrFinishButton(0); mainGame->HideElement(mainGame->wCardSelect, true); } else if (sel >= select_min) { select_ready = true; mainGame->btnSelectOK->setVisible(true); + ShowCancelOrFinishButton(2); } else { select_ready = false; mainGame->btnSelectOK->setVisible(false); + if (select_cancelable && sel == 0) + ShowCancelOrFinishButton(1); + else + ShowCancelOrFinishButton(0); } break; } - case MSG_SELECT_SUM: { + case MSG_SELECT_UNSELECT_CARD: { command_card = selectable_cards[id - BUTTON_CARD_0 + mainGame->scrCardList->getPos() / 10]; + if (command_card->is_selected) { + command_card->is_selected = false; + if(command_card->controler) + mainGame->stCardPos[id - BUTTON_CARD_0]->setBackgroundColor(0xffd0d0d0); + else mainGame->stCardPos[id - BUTTON_CARD_0]->setBackgroundColor(0xffffffff); + } else { + command_card->is_selected = true; + mainGame->stCardPos[id - BUTTON_CARD_0]->setBackgroundColor(0xffffff00); + } selected_cards.push_back(command_card); - if (CheckSelectSum()) { - unsigned char respbuf[64]; - respbuf[0] = selected_cards.size(); - for (size_t i = 0; i < selected_cards.size(); ++i) - respbuf[i + 1] = selected_cards[i]->select_seq; - DuelClient::SetResponseB(respbuf, selected_cards.size() + 1); + if (selected_cards.size() > 0) { + SetResponseSelectedCards(); + ShowCancelOrFinishButton(0); mainGame->HideElement(mainGame->wCardSelect, true); + } + break; + } + case MSG_SELECT_SUM: { + command_card = selectable_cards[id - BUTTON_CARD_0 + mainGame->scrCardList->getPos() / 10]; + if (command_card->is_selected) { + command_card->is_selected = false; + int i = 0; + while(selected_cards[i] != command_card) i++; + selected_cards.erase(selected_cards.begin() + i); + if(command_card->controler) + mainGame->stCardPos[id - BUTTON_CARD_0]->setBackgroundColor(0xffd0d0d0); + else mainGame->stCardPos[id - BUTTON_CARD_0]->setBackgroundColor(0xffffffff); } else { - mainGame->wCardSelect->setVisible(false); - mainGame->dField.ShowSelectCard(); + command_card->is_selected = true; + mainGame->stCardPos[id - BUTTON_CARD_0]->setBackgroundColor(0xffffff00); + selected_cards.push_back(command_card); } + ShowSelectSum(true); break; } - case MSG_SORT_CHAIN: case MSG_SORT_CARD: { int offset = mainGame->scrCardList->getPos() / 10; int sel_seq = id - BUTTON_CARD_0 + offset; + wchar_t formatBuffer[2048]; if(sort_list[sel_seq]) { select_min--; int sel = sort_list[sel_seq]; @@ -621,7 +781,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) { myswprintf(formatBuffer, L"%d", select_min); mainGame->stCardPos[id - BUTTON_CARD_0]->setText(formatBuffer); if(select_min == select_max) { - unsigned char respbuf[64]; + unsigned char respbuf[SIZE_RETURN_VALUE]; for(int i = 0; i < select_max; ++i) respbuf[i] = sort_list[i] - 1; DuelClient::SetResponseB(respbuf, select_max); @@ -639,13 +799,10 @@ bool ClientField::OnEvent(const irr::SEvent& event) { mainGame->HideElement(mainGame->wCardSelect); break; } - if(mainGame->dInfo.curMsg == MSG_SELECT_CARD) { + if(mainGame->dInfo.curMsg == MSG_SELECT_CARD || mainGame->dInfo.curMsg == MSG_SELECT_SUM) { if(select_ready) { - unsigned char respbuf[64]; - respbuf[0] = selected_cards.size(); - for (size_t i = 0; i < selected_cards.size(); ++i) - respbuf[i + 1] = selected_cards[i]->select_seq; - DuelClient::SetResponseB(respbuf, selected_cards.size() + 1); + SetResponseSelectedCards(); + ShowCancelOrFinishButton(0); mainGame->HideElement(mainGame->wCardSelect, true); } break; @@ -653,8 +810,14 @@ bool ClientField::OnEvent(const irr::SEvent& event) { mainGame->HideElement(mainGame->wCardSelect); mainGame->actionSignal.Set(); break; + } else if(mainGame->dInfo.curMsg == MSG_SELECT_UNSELECT_CARD){ + DuelClient::SetResponseI(-1); + ShowCancelOrFinishButton(0); + mainGame->HideElement(mainGame->wCardSelect, true); } else { mainGame->HideElement(mainGame->wCardSelect); + if(mainGame->dInfo.curMsg == MSG_SELECT_CHAIN && !chain_forced) + ShowCancelOrFinishButton(1); break; } break; @@ -684,7 +847,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) { } case CHECK_RACE: { int rac = 0, filter = 0x1, count = 0; - for(int i = 0; i < 24; ++i, filter <<= 1) { + for(int i = 0; i < RACES_COUNT; ++i, filter <<= 1) { if(mainGame->chkRace[i]->isChecked()) { rac |= filter; count++; @@ -701,111 +864,138 @@ bool ClientField::OnEvent(const irr::SEvent& event) { } case irr::gui::EGET_LISTBOX_CHANGED: { switch(id) { - case LISTBOX_LOG: { - int sel = mainGame->lstLog->getSelected(); - if(sel != -1 && (int)mainGame->logParam.size() >= sel && mainGame->logParam[sel]) { - mainGame->ShowCardInfo(mainGame->logParam[sel]); + case LISTBOX_ANCARD: { + int sel = mainGame->lstANCard->getSelected(); + if(sel != -1) { + mainGame->ShowCardInfo(ancard[sel]); } break; } } break; } - case irr::gui::EGET_LISTBOX_SELECTED_AGAIN: { + case irr::gui::EGET_SCROLL_BAR_CHANGED: { switch(id) { - case LISTBOX_LOG: { - int sel = mainGame->lstLog->getSelected(); - if(sel != -1 && (int)mainGame->logParam.size() >= sel && mainGame->logParam[sel]) { - mainGame->wInfos->setActiveTab(0); + case SCROLL_OPTION_SELECT: { + int step = mainGame->scrOption->isVisible() ? mainGame->scrOption->getPos() : 0; + for(int i = 0; i < 5; i++) { + const wchar_t* option = dataManager.GetDesc(select_options[i + step]); + mainGame->btnOption[i]->setText(option); } break; } - } - break; - } - case irr::gui::EGET_SCROLL_BAR_CHANGED: { - switch(id) { case SCROLL_CARD_SELECT: { int pos = mainGame->scrCardList->getPos() / 10; for(int i = 0; i < 5; ++i) { + // draw selectable_cards[i + pos] in btnCardSelect[i] + mainGame->stCardPos[i]->enableOverrideColor(false); + // image if(selectable_cards[i + pos]->code) mainGame->btnCardSelect[i]->setImage(imageManager.GetTexture(selectable_cards[i + pos]->code)); + else if(select_continuous) + mainGame->btnCardSelect[i]->setImage(imageManager.GetTexture(selectable_cards[i + pos]->chain_code)); else - mainGame->btnCardSelect[i]->setImage(imageManager.tCover); - mainGame->btnCardSelect[i]->setRelativePosition(rect(30 + i * 125, 55, 30 + 120 + i * 125, 225)); - if (sort_list.size()){ - if (sort_list[pos + i]> 0) + mainGame->btnCardSelect[i]->setImage(imageManager.tCover[selectable_cards[i + pos]->controler + 2]); + mainGame->btnCardSelect[i]->setRelativePosition(irr::core::rect(30 + i * 125, 55, 30 + 120 + i * 125, 225)); + // text + wchar_t formatBuffer[2048]; + if(mainGame->dInfo.curMsg == MSG_SORT_CARD) { + if(sort_list[pos + i]) myswprintf(formatBuffer, L"%d", sort_list[pos + i]); else myswprintf(formatBuffer, L""); - } - else{ - myswprintf(formatBuffer, L"%ls[%d]", dataManager.FormatLocation(selectable_cards[i + pos]->location, - selectable_cards[i + pos]->sequence), selectable_cards[i + pos]->sequence + 1); + } else { + if (select_continuous) + myswprintf(formatBuffer, L"%ls", dataManager.unknown_string); + else if (cant_check_grave && selectable_cards[i + pos]->location == LOCATION_GRAVE) + myswprintf(formatBuffer, L"%ls", dataManager.FormatLocation(selectable_cards[i + pos]->location, 0)); + else if (selectable_cards[i + pos]->location == LOCATION_OVERLAY) + myswprintf(formatBuffer, L"%ls[%d](%d)", + dataManager.FormatLocation(selectable_cards[i + pos]->overlayTarget), selectable_cards[i + pos]->overlayTarget->sequence + 1, selectable_cards[i + pos]->sequence + 1); + else + myswprintf(formatBuffer, L"%ls[%d]", dataManager.FormatLocation(selectable_cards[i + pos]), selectable_cards[i + pos]->sequence + 1); } mainGame->stCardPos[i]->setText(formatBuffer); - if(selectable_cards[i + pos]->is_selected) - mainGame->stCardPos[i]->setBackgroundColor(0xffffff00); - else if(selectable_cards[i + pos]->controler) - mainGame->stCardPos[i]->setBackgroundColor(0xffd0d0d0); - else mainGame->stCardPos[i]->setBackgroundColor(0xffffffff); + // color + if(select_continuous) + mainGame->stCardPos[i]->setBackgroundColor(0xffffffff); + else if(selectable_cards[i + pos]->location == LOCATION_OVERLAY) { + if(selectable_cards[i + pos]->owner != selectable_cards[i + pos]->overlayTarget->controler) + mainGame->stCardPos[i]->setOverrideColor(0xff0000ff); + if(selectable_cards[i + pos]->is_selected) + mainGame->stCardPos[i]->setBackgroundColor(0xffffff00); + else if(selectable_cards[i + pos]->overlayTarget->controler) + mainGame->stCardPos[i]->setBackgroundColor(0xffd0d0d0); + else + mainGame->stCardPos[i]->setBackgroundColor(0xffffffff); + } else if(selectable_cards[i + pos]->location == LOCATION_DECK || selectable_cards[i + pos]->location == LOCATION_EXTRA || selectable_cards[i + pos]->location == LOCATION_REMOVED) { + if(selectable_cards[i + pos]->position & POS_FACEDOWN) + mainGame->stCardPos[i]->setOverrideColor(0xff0000ff); + if(selectable_cards[i + pos]->is_selected) + mainGame->stCardPos[i]->setBackgroundColor(0xffffff00); + else if(selectable_cards[i + pos]->controler) + mainGame->stCardPos[i]->setBackgroundColor(0xffd0d0d0); + else + mainGame->stCardPos[i]->setBackgroundColor(0xffffffff); + } else { + if(selectable_cards[i + pos]->is_selected) + mainGame->stCardPos[i]->setBackgroundColor(0xffffff00); + else if(selectable_cards[i + pos]->controler) + mainGame->stCardPos[i]->setBackgroundColor(0xffd0d0d0); + else + mainGame->stCardPos[i]->setBackgroundColor(0xffffffff); + } } break; } case SCROLL_CARD_DISPLAY: { int pos = mainGame->scrDisplayList->getPos() / 10; for(int i = 0; i < 5; ++i) { + // draw display_cards[i + pos] in btnCardDisplay[i] + mainGame->stDisplayPos[i]->enableOverrideColor(false); if(display_cards[i + pos]->code) mainGame->btnCardDisplay[i]->setImage(imageManager.GetTexture(display_cards[i + pos]->code)); else - mainGame->btnCardDisplay[i]->setImage(imageManager.tCover); - mainGame->btnCardDisplay[i]->setRelativePosition(rect(30 + i * 125, 55, 30 + 120 + i * 125, 225)); - myswprintf(formatBuffer, L"%ls[%d]", dataManager.FormatLocation(display_cards[i + pos]->location, display_cards[i + pos]->sequence), - display_cards[i + pos]->sequence + 1); + mainGame->btnCardDisplay[i]->setImage(imageManager.tCover[display_cards[i + pos]->controler + 2]); + mainGame->btnCardDisplay[i]->setRelativePosition(irr::core::rect(30 + i * 125, 55, 30 + 120 + i * 125, 225)); + wchar_t formatBuffer[2048]; + if(display_cards[i + pos]->location == LOCATION_OVERLAY) + myswprintf(formatBuffer, L"%ls[%d](%d)", + dataManager.FormatLocation(display_cards[i + pos]->overlayTarget), display_cards[i + pos]->overlayTarget->sequence + 1, display_cards[i + pos]->sequence + 1); + else + myswprintf(formatBuffer, L"%ls[%d]", dataManager.FormatLocation(display_cards[i + pos]), display_cards[i + pos]->sequence + 1); mainGame->stDisplayPos[i]->setText(formatBuffer); - if(display_cards[i + pos]->controler) - mainGame->stDisplayPos[i]->setBackgroundColor(0xffd0d0d0); - else mainGame->stDisplayPos[i]->setBackgroundColor(0xffffffff); + if(display_cards[i + pos]->location == LOCATION_OVERLAY) { + if(display_cards[i + pos]->owner != display_cards[i + pos]->overlayTarget->controler) + mainGame->stDisplayPos[i]->setOverrideColor(0xff0000ff); + // BackgroundColor: controller of the xyz monster + if(display_cards[i + pos]->overlayTarget->controler) + mainGame->stDisplayPos[i]->setBackgroundColor(0xffd0d0d0); + else + mainGame->stDisplayPos[i]->setBackgroundColor(0xffffffff); + } else if(display_cards[i + pos]->location == LOCATION_EXTRA || display_cards[i + pos]->location == LOCATION_REMOVED) { + if(display_cards[i + pos]->position & POS_FACEDOWN) + mainGame->stDisplayPos[i]->setOverrideColor(0xff0000ff); + if(display_cards[i + pos]->controler) + mainGame->stDisplayPos[i]->setBackgroundColor(0xffd0d0d0); + else + mainGame->stDisplayPos[i]->setBackgroundColor(0xffffffff); + } else { + if(display_cards[i + pos]->controler) + mainGame->stDisplayPos[i]->setBackgroundColor(0xffd0d0d0); + else + mainGame->stDisplayPos[i]->setBackgroundColor(0xffffffff); + } } break; } - case SCROLL_CARDTEXT: { - u32 pos = mainGame->scrCardText->getPos(); - mainGame->SetStaticText(mainGame->stText, mainGame->stText->getRelativePosition().getWidth()-25, mainGame->textFont, mainGame->showingtext, pos); - break; - } break; } } case irr::gui::EGET_EDITBOX_CHANGED: { switch(id) { case EDITBOX_ANCARD: { - const wchar_t* pname = mainGame->ebANCard->getText(); - int trycode = BufferIO::GetVal(pname); - CardString cstr; - CardData cd; - if(dataManager.GetString(trycode, &cstr) && dataManager.GetData(trycode, &cd) - && (cd.code == 78734254 || cd.code == 13857930 || !cd.alias && !((cd.type & (TYPE_MONSTER + TYPE_TOKEN)) == (TYPE_MONSTER + TYPE_TOKEN)))) { - mainGame->lstANCard->clear(); - ancard.clear(); - mainGame->lstANCard->addItem(cstr.name); - ancard.push_back(trycode); - break; - } - if(pname[0] == 0 || pname[1] == 0) - break; - mainGame->lstANCard->clear(); - ancard.clear(); - for(auto cit = dataManager._strings.begin(); cit != dataManager._strings.end(); ++cit) { - if(wcsstr(cit->second.name, pname) != 0) { - auto cp = dataManager.GetCodePointer(cit->first); - if(cp->second.code == 78734254 || cp->second.code == 13857930 - || !cp->second.alias && !((cp->second.type & (TYPE_MONSTER + TYPE_TOKEN)) == (TYPE_MONSTER + TYPE_TOKEN))) { - mainGame->lstANCard->addItem(cit->second.name); - ancard.push_back(cit->first); - } - } - } + UpdateDeclarableList(); break; } } @@ -814,54 +1004,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) { case irr::gui::EGET_EDITBOX_ENTER: { switch(id) { case EDITBOX_ANCARD: { - const wchar_t* pname = mainGame->ebANCard->getText(); - int trycode = BufferIO::GetVal(pname); - CardString cstr; - CardData cd; - if(dataManager.GetString(trycode, &cstr) && dataManager.GetData(trycode, &cd) - && (cd.code == 78734254 || cd.code == 13857930 || !cd.alias && !((cd.type & (TYPE_MONSTER + TYPE_TOKEN)) == (TYPE_MONSTER + TYPE_TOKEN)))) { - mainGame->lstANCard->clear(); - ancard.clear(); - mainGame->lstANCard->addItem(cstr.name); - ancard.push_back(trycode); - break; - } - if(pname[0] == 0) - break; - mainGame->lstANCard->clear(); - ancard.clear(); - for(auto cit = dataManager._strings.begin(); cit != dataManager._strings.end(); ++cit) { - if(wcsstr(cit->second.name, pname) != 0) { - auto cp = dataManager.GetCodePointer(cit->first); - if(cp->second.code == 78734254 || cp->second.code == 13857930 - || !cp->second.alias && !((cp->second.type & (TYPE_MONSTER + TYPE_TOKEN)) == (TYPE_MONSTER + TYPE_TOKEN))) { - mainGame->lstANCard->addItem(cit->second.name); - ancard.push_back(cit->first); - } - } - } - break; - } - case EDITBOX_CHAT: { - if(mainGame->dInfo.isReplay) - break; - const wchar_t* input = mainGame->ebChatInput->getText(); - if(input[0]) { - unsigned short msgbuf[256]; - if(mainGame->dInfo.isStarted) { - if(mainGame->dInfo.player_type < 7) { - if(mainGame->dInfo.isTag && (mainGame->dInfo.player_type % 2)) - mainGame->AddChatMsg((wchar_t*)input, 2); - else - mainGame->AddChatMsg((wchar_t*)input, 0); - } else - mainGame->AddChatMsg((wchar_t*)input, 10); - } else - mainGame->AddChatMsg((wchar_t*)input, 7); - int len = BufferIO::CopyWStr(input, msgbuf, 256); - DuelClient::SendBufferToServer(CTOS_CHAT, msgbuf, (len + 1) * sizeof(short)); - mainGame->ebChatInput->setText(L""); - } + UpdateDeclarableList(); break; } } @@ -871,31 +1014,46 @@ bool ClientField::OnEvent(const irr::SEvent& event) { if(id >= BUTTON_CARD_0 && id <= BUTTON_CARD_4) { int pos = mainGame->scrCardList->getPos() / 10; ClientCard* mcard = selectable_cards[id - BUTTON_CARD_0 + pos]; + SetShowMark(mcard, true); + ShowCardInfoInList(mcard, mainGame->btnCardSelect[id - BUTTON_CARD_0], mainGame->wCardSelect); if(mcard->code) { mainGame->ShowCardInfo(mcard->code); } else { - mainGame->imgCard->setImage(imageManager.tCover); - mainGame->stName->setText(L""); - mainGame->stInfo->setText(L""); - mainGame->stDataInfo->setText(L""); - mainGame->stText->setText(L""); - mainGame->scrCardText->setVisible(false); + mainGame->ClearCardInfo(mcard->controler); } } if(id >= BUTTON_DISPLAY_0 && id <= BUTTON_DISPLAY_4) { int pos = mainGame->scrDisplayList->getPos() / 10; ClientCard* mcard = display_cards[id - BUTTON_DISPLAY_0 + pos]; + SetShowMark(mcard, true); + ShowCardInfoInList(mcard, mainGame->btnCardDisplay[id - BUTTON_DISPLAY_0], mainGame->wCardDisplay); if(mcard->code) { mainGame->ShowCardInfo(mcard->code); } else { - mainGame->imgCard->setImage(imageManager.tCover); - mainGame->stName->setText(L""); - mainGame->stInfo->setText(L""); - mainGame->stDataInfo->setText(L""); - mainGame->stText->setText(L""); - mainGame->scrCardText->setVisible(false); + mainGame->ClearCardInfo(mcard->controler); } } + if(id == TEXT_CARD_LIST_TIP) { + mainGame->stCardListTip->setVisible(true); + } + break; + } + case irr::gui::EGET_ELEMENT_LEFT: { + if(id >= BUTTON_CARD_0 && id <= BUTTON_CARD_4 && mainGame->stCardListTip->isVisible()) { + int pos = mainGame->scrCardList->getPos() / 10; + ClientCard* mcard = selectable_cards[id - BUTTON_CARD_0 + pos]; + SetShowMark(mcard, false); + mainGame->stCardListTip->setVisible(false); + } + if(id >= BUTTON_DISPLAY_0 && id <= BUTTON_DISPLAY_4 && mainGame->stCardListTip->isVisible()) { + int pos = mainGame->scrDisplayList->getPos() / 10; + ClientCard* mcard = display_cards[id - BUTTON_DISPLAY_0 + pos]; + SetShowMark(mcard, false); + mainGame->stCardListTip->setVisible(false); + } + if(id == TEXT_CARD_LIST_TIP) { + mainGame->stCardListTip->setVisible(false); + } break; } default: @@ -908,56 +1066,73 @@ bool ClientField::OnEvent(const irr::SEvent& event) { case irr::EMIE_LMOUSE_LEFT_UP: { if(!mainGame->dInfo.isStarted) break; - s32 x = event.MouseInput.X; - s32 y = event.MouseInput.Y; hovered_location = 0; - irr::core::position2di pos(x, y); + irr::core::vector2di pos = mainGame->ResizeReverse(event.MouseInput.X, event.MouseInput.Y); + irr::core::vector2di mousepos(event.MouseInput.X, event.MouseInput.Y); + irr::s32 x = pos.X; + irr::s32 y = pos.Y; if(x < 300) break; - if(mainGame->wCmdMenu->isVisible() && !mainGame->wCmdMenu->getRelativePosition().isPointInside(pos)) - mainGame->wCmdMenu->setVisible(false); + if(mainGame->gameConf.control_mode == 1) { + mainGame->always_chain = event.MouseInput.isLeftPressed(); + mainGame->ignore_chain = false; + mainGame->chain_when_avail = false; + UpdateChainButtons(); + } + if(mainGame->wCmdMenu->isVisible() && !mainGame->wCmdMenu->getRelativePosition().isPointInside(mousepos)) + HideMenu(); + if(mainGame->btnBP->isVisible() && mainGame->btnBP->getAbsolutePosition().isPointInside(mousepos)) + break; + if(mainGame->btnM2->isVisible() && mainGame->btnM2->getAbsolutePosition().isPointInside(mousepos)) + break; if(panel && panel->isVisible()) break; GetHoverField(x, y); if(hovered_location & 0xe) clicked_card = GetCard(hovered_controler, hovered_location, hovered_sequence); else clicked_card = 0; + wchar_t formatBuffer[2048]; if(mainGame->dInfo.isReplay) { if(mainGame->wCardSelect->isVisible()) break; selectable_cards.clear(); switch(hovered_location) { case LOCATION_DECK: { - for(int32 i = (int32)deck[hovered_controler].size() - 1; i >= 0 ; --i) - selectable_cards.push_back(deck[hovered_controler][i]); + if(deck[hovered_controler].size() == 0) + break; + selectable_cards.assign(deck[hovered_controler].rbegin(), deck[hovered_controler].rend()); myswprintf(formatBuffer, L"%ls(%d)", dataManager.GetSysString(1000), deck[hovered_controler].size()); mainGame->wCardSelect->setText(formatBuffer); break; } case LOCATION_MZONE: { - for(int32 i = 0; i < (int32)clicked_card->overlayed.size(); ++i) - selectable_cards.push_back(clicked_card->overlayed[i]); + if(!clicked_card || clicked_card->overlayed.size() == 0) + break; + selectable_cards.assign(clicked_card->overlayed.begin(), clicked_card->overlayed.end()); myswprintf(formatBuffer, L"%ls(%d)", dataManager.GetSysString(1007), clicked_card->overlayed.size()); mainGame->wCardSelect->setText(formatBuffer); break; } case LOCATION_GRAVE: { - for(int32 i = (int32)grave[hovered_controler].size() - 1; i >= 0 ; --i) - selectable_cards.push_back(grave[hovered_controler][i]); + if(grave[hovered_controler].size() == 0) + break; + selectable_cards.assign(grave[hovered_controler].rbegin(), grave[hovered_controler].rend()); myswprintf(formatBuffer, L"%ls(%d)", dataManager.GetSysString(1004), grave[hovered_controler].size()); mainGame->wCardSelect->setText(formatBuffer); break; } case LOCATION_REMOVED: { - for(int32 i = (int32)remove[hovered_controler].size() - 1; i >= 0 ; --i) - selectable_cards.push_back(remove[hovered_controler][i]); + if(remove[hovered_controler].size() == 0) + break; + selectable_cards.assign(remove[hovered_controler].rbegin(), remove[hovered_controler].rend()); myswprintf(formatBuffer, L"%ls(%d)", dataManager.GetSysString(1005), remove[hovered_controler].size()); mainGame->wCardSelect->setText(formatBuffer); break; } case LOCATION_EXTRA: { - for(int32 i = (int32)extra[hovered_controler].size() - 1; i >= 0 ; --i) - selectable_cards.push_back(extra[hovered_controler][i]); + if(extra[hovered_controler].size() == 0) + break; + selectable_cards.assign(extra[hovered_controler].rbegin(), extra[hovered_controler].rend()); myswprintf(formatBuffer, L"%ls(%d)", dataManager.GetSysString(1006), extra[hovered_controler].size()); mainGame->wCardSelect->setText(formatBuffer); break; @@ -972,13 +1147,38 @@ bool ClientField::OnEvent(const irr::SEvent& event) { break; selectable_cards.clear(); switch(hovered_location) { + case LOCATION_MZONE: { + if(!clicked_card || clicked_card->overlayed.size() == 0) + break; + selectable_cards.assign(clicked_card->overlayed.begin(), clicked_card->overlayed.end()); + myswprintf(formatBuffer, L"%ls(%d)", dataManager.GetSysString(1007), clicked_card->overlayed.size()); + mainGame->wCardSelect->setText(formatBuffer); + break; + } case LOCATION_GRAVE: { - for(int32 i = (int32)grave[hovered_controler].size() - 1; i >= 0 ; --i) - selectable_cards.push_back(grave[hovered_controler][i]); + if(grave[hovered_controler].size() == 0) + break; + selectable_cards.assign(grave[hovered_controler].rbegin(), grave[hovered_controler].rend()); myswprintf(formatBuffer, L"%ls(%d)", dataManager.GetSysString(1004), grave[hovered_controler].size()); mainGame->wCardSelect->setText(formatBuffer); break; } + case LOCATION_REMOVED: { + if (remove[hovered_controler].size() == 0) + break; + selectable_cards.assign(remove[hovered_controler].rbegin(), remove[hovered_controler].rend()); + myswprintf(formatBuffer, L"%ls(%d)", dataManager.GetSysString(1005), remove[hovered_controler].size()); + mainGame->wCardSelect->setText(formatBuffer); + break; + } + case LOCATION_EXTRA: { + if (extra[hovered_controler].size() == 0) + break; + selectable_cards.assign(extra[hovered_controler].rbegin(), extra[hovered_controler].rend()); + myswprintf(formatBuffer, L"%ls(%d)", dataManager.GetSysString(1006), extra[hovered_controler].size()); + mainGame->wCardSelect->setText(formatBuffer); + break; + } } if(selectable_cards.size()) ShowSelectCard(true); @@ -1000,6 +1200,8 @@ bool ClientField::OnEvent(const irr::SEvent& event) { case LOCATION_GRAVE: { if(grave[hovered_controler].size() == 0) break; + if(cant_check_grave) + break; ShowMenu(COMMAND_LIST, x, y); break; } @@ -1050,6 +1252,8 @@ bool ClientField::OnEvent(const irr::SEvent& event) { int command_flag = 0; if(grave[hovered_controler].size() == 0) break; + if(cant_check_grave) + break; for(size_t i = 0; i < grave[hovered_controler].size(); ++i) command_flag |= grave[hovered_controler][i]->cmdFlag; command_flag |= COMMAND_LIST; @@ -1059,14 +1263,11 @@ bool ClientField::OnEvent(const irr::SEvent& event) { } case LOCATION_REMOVED: { int command_flag = 0; - if(remove[hovered_controler].size() == 0 && conti_cards.size() == 0) + if(remove[hovered_controler].size() == 0) break; for(size_t i = 0; i < remove[hovered_controler].size(); ++i) command_flag |= remove[hovered_controler][i]->cmdFlag; - if(conti_cards.size()) - command_flag |= COMMAND_ACTIVATE; - if(remove[hovered_controler].size()) - command_flag |= COMMAND_LIST; + command_flag |= COMMAND_LIST; list_command = 1; ShowMenu(command_flag, x, y); break; @@ -1082,16 +1283,25 @@ bool ClientField::OnEvent(const irr::SEvent& event) { ShowMenu(command_flag, x, y); break; } + case POSITION_HINT: { + int command_flag = 0; + if(conti_cards.size() == 0) + break; + command_flag |= COMMAND_OPERATION; + list_command = 1; + ShowMenu(command_flag, x, y); + break; + } } break; } case MSG_SELECT_PLACE: case MSG_SELECT_DISFIELD: { - if (!(hovered_location & LOCATION_ONFIELD) || hovered_sequence == 5) + if (!(hovered_location & LOCATION_ONFIELD)) break; - int flag = 1 << (hovered_sequence + (hovered_controler << 4) + ((hovered_location == LOCATION_MZONE) ? 0 : 8)); - if ((flag & selectable_field) > 0) { - if ((flag & selected_field) > 0) { + unsigned int flag = 0x1U << (hovered_sequence + (hovered_controler << 4) + ((hovered_location == LOCATION_MZONE) ? 0 : 8)); + if (flag & selectable_field) { + if (flag & selected_field) { selected_field &= ~flag; select_min++; } else { @@ -1101,10 +1311,10 @@ bool ClientField::OnEvent(const irr::SEvent& event) { unsigned char respbuf[80]; int filter = 1; int p = 0; - for (int i = 0; i < 5; ++i, filter <<= 1) { + for (int i = 0; i < 7; ++i, filter <<= 1) { if (selected_field & filter) { respbuf[p] = mainGame->LocalPlayer(0); - respbuf[p + 1] = 0x4; + respbuf[p + 1] = LOCATION_MZONE; respbuf[p + 2] = i; p += 3; } @@ -1113,16 +1323,16 @@ bool ClientField::OnEvent(const irr::SEvent& event) { for (int i = 0; i < 8; ++i, filter <<= 1) { if (selected_field & filter) { respbuf[p] = mainGame->LocalPlayer(0); - respbuf[p + 1] = 0x8; + respbuf[p + 1] = LOCATION_SZONE; respbuf[p + 2] = i; p += 3; } } filter = 0x10000; - for (int i = 0; i < 5; ++i, filter <<= 1) { + for (int i = 0; i < 7; ++i, filter <<= 1) { if (selected_field & filter) { respbuf[p] = mainGame->LocalPlayer(1); - respbuf[p + 1] = 0x4; + respbuf[p + 1] = LOCATION_MZONE; respbuf[p + 2] = i; p += 3; } @@ -1131,7 +1341,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) { for (int i = 0; i < 8; ++i, filter <<= 1) { if (selected_field & filter) { respbuf[p] = mainGame->LocalPlayer(1); - respbuf[p + 1] = 0x8; + respbuf[p + 1] = LOCATION_SZONE; respbuf[p + 2] = i; p += 3; } @@ -1140,16 +1350,16 @@ bool ClientField::OnEvent(const irr::SEvent& event) { selected_field = 0; DuelClient::SetResponseB(respbuf, p); DuelClient::SendResponse(); + ShowCancelOrFinishButton(0); } } } break; } - case MSG_SELECT_CARD: - case MSG_SELECT_TRIBUTE: { - if (!(hovered_location & 0xe) || !clicked_card || !clicked_card->is_selectable) + case MSG_SELECT_CARD: { + if(!(hovered_location & 0xe) || !clicked_card || !clicked_card->is_selectable) break; - if (clicked_card->is_selected) { + if(clicked_card->is_selected) { clicked_card->is_selected = false; int i = 0; while(selected_cards[i] != clicked_card) i++; @@ -1158,41 +1368,68 @@ bool ClientField::OnEvent(const irr::SEvent& event) { clicked_card->is_selected = true; selected_cards.push_back(clicked_card); } - int min = selected_cards.size(), max = 0; - if (mainGame->dInfo.curMsg == MSG_SELECT_CARD) { - max = selected_cards.size(); - } else { - for(size_t i = 0; i < selected_cards.size(); ++i) - max += selected_cards[i]->opParam; - } - if (min >= select_max) { - unsigned char respbuf[64]; - respbuf[0] = selected_cards.size(); - for (size_t i = 0; i < selected_cards.size(); ++i) - respbuf[i + 1] = selected_cards[i]->select_seq; - DuelClient::SetResponseB(respbuf, selected_cards.size() + 1); + if((int)selected_cards.size() >= select_max) { + SetResponseSelectedCards(); + ShowCancelOrFinishButton(0); DuelClient::SendResponse(); - } else if (max >= select_min) { + } else if((int)selected_cards.size() >= select_min) { if(selected_cards.size() == selectable_cards.size()) { - unsigned char respbuf[64]; - respbuf[0] = selected_cards.size(); - for (size_t i = 0; i < selected_cards.size(); ++i) - respbuf[i + 1] = selected_cards[i]->select_seq; - DuelClient::SetResponseB(respbuf, selected_cards.size() + 1); + SetResponseSelectedCards(); + ShowCancelOrFinishButton(0); DuelClient::SendResponse(); } else { select_ready = true; - if(mainGame->dInfo.curMsg == MSG_SELECT_TRIBUTE) { - wchar_t wbuf[256], *pwbuf = wbuf; - BufferIO::CopyWStrRef(dataManager.GetSysString(209), pwbuf, 256); - *pwbuf++ = L'\n'; - BufferIO::CopyWStrRef(dataManager.GetSysString(210), pwbuf, 256); - mainGame->stQMessage->setText(wbuf); - mainGame->PopupElement(mainGame->wQuery); - } + ShowCancelOrFinishButton(2); + } + } else { + select_ready = false; + if(select_cancelable && selected_cards.size() == 0) + ShowCancelOrFinishButton(1); + else + ShowCancelOrFinishButton(0); + } + break; + } + case MSG_SELECT_TRIBUTE: { + if (!(hovered_location & 0xe) || !clicked_card || !clicked_card->is_selectable) + break; + if(clicked_card->is_selected) { + auto it = std::find(selected_cards.begin(), selected_cards.end(), clicked_card); + selected_cards.erase(it); + } else { + selected_cards.push_back(clicked_card); + } + if(CheckSelectTribute()) { + if(selectsum_cards.size() == 0) { + SetResponseSelectedCards(); + ShowCancelOrFinishButton(0); + DuelClient::SendResponse(); + } else { + select_ready = true; + ShowCancelOrFinishButton(2); } } else { select_ready = false; + if (select_cancelable && selected_cards.size() == 0) + ShowCancelOrFinishButton(1); + else + ShowCancelOrFinishButton(0); + } + break; + } + case MSG_SELECT_UNSELECT_CARD: { + if (!(hovered_location & 0xe) || !clicked_card || !clicked_card->is_selectable) + break; + if (clicked_card->is_selected) { + clicked_card->is_selected = false; + } else { + clicked_card->is_selected = true; + } + selected_cards.push_back(clicked_card); + if (selected_cards.size() > 0) { + ShowCancelOrFinishButton(0); + SetResponseSelectedCards(); + DuelClient::SendResponse(); } break; } @@ -1204,12 +1441,12 @@ bool ClientField::OnEvent(const irr::SEvent& event) { clicked_card->is_selectable = false; select_counter_count--; if (select_counter_count == 0) { - unsigned char respbuf[64]; + unsigned short int respbuf[32]; for(size_t i = 0; i < selectable_cards.size(); ++i) respbuf[i] = (selectable_cards[i]->opParam >> 16) - (selectable_cards[i]->opParam & 0xffff); mainGame->stHintMsg->setVisible(false); ClearSelect(); - DuelClient::SetResponseB(respbuf, selectable_cards.size()); + DuelClient::SetResponseB(respbuf, selectable_cards.size() * 2); DuelClient::SendResponse(); } else { myswprintf(formatBuffer, dataManager.GetSysString(204), select_counter_count, dataManager.GetCounterName(select_counter_type)); @@ -1218,34 +1455,14 @@ bool ClientField::OnEvent(const irr::SEvent& event) { break; } case MSG_SELECT_SUM: { - if (!clicked_card) + if (!clicked_card || !clicked_card->is_selectable) break; if (clicked_card->is_selected) { - int i = 0; - while(selected_cards[i] != clicked_card) i++; - selected_cards.erase(selected_cards.begin() + i); - } else if (clicked_card->is_selectable) - selected_cards.push_back(clicked_card); - else break; - if (CheckSelectSum()) { - if(selectsum_cards.size() == 0 || selectable_cards.size() == 0) { - unsigned char respbuf[64]; - respbuf[0] = selected_cards.size(); - for (size_t i = 0; i < selected_cards.size(); ++i) - respbuf[i + 1] = selected_cards[i]->select_seq; - DuelClient::SetResponseB(respbuf, selected_cards.size() + 1); - DuelClient::SendResponse(); - } else { - select_ready = true; - wchar_t wbuf[256], *pwbuf = wbuf; - BufferIO::CopyWStrRef(dataManager.GetSysString(209), pwbuf, 256); - *pwbuf++ = L'\n'; - BufferIO::CopyWStrRef(dataManager.GetSysString(210), pwbuf, 256); - mainGame->stQMessage->setText(wbuf); - mainGame->PopupElement(mainGame->wQuery); - } + auto it = std::find(selected_cards.begin(), selected_cards.end(), clicked_card); + selected_cards.erase(it); } else - select_ready = false; + selected_cards.push_back(clicked_card); + ShowSelectSum(false); break; } } @@ -1254,166 +1471,86 @@ bool ClientField::OnEvent(const irr::SEvent& event) { case irr::EMIE_RMOUSE_LEFT_UP: { if(mainGame->dInfo.isReplay) break; - mainGame->wCmdMenu->setVisible(false); + if(event.MouseInput.isLeftPressed()) + break; + if(mainGame->gameConf.control_mode == 1 && event.MouseInput.X > 300 * mainGame->xScale) { + mainGame->ignore_chain = event.MouseInput.isRightPressed(); + mainGame->always_chain = false; + mainGame->chain_when_avail = false; + UpdateChainButtons(); + } + mainGame->HideElement(mainGame->wSurrender); + HideMenu(); if(mainGame->fadingList.size()) break; - switch(mainGame->dInfo.curMsg) { - case MSG_WAITING: { - if(mainGame->wCardSelect->isVisible()) { - mainGame->HideElement(mainGame->wCardSelect); - } + CancelOrFinish(); + break; + } + case irr::EMIE_MOUSE_MOVED: { + if(!mainGame->dInfo.isStarted) break; - } - case MSG_SELECT_BATTLECMD: { - if(mainGame->wCardSelect->isVisible()) { - mainGame->HideElement(mainGame->wCardSelect); - } - if(mainGame->wOptions->isVisible()) { - mainGame->HideElement(mainGame->wOptions); - } + bool should_show_tip = false; + irr::core::vector2di pos = mainGame->ResizeReverse(event.MouseInput.X, event.MouseInput.Y); + irr::core::vector2di mousepos = irr::core::vector2di(event.MouseInput.X, event.MouseInput.Y); + irr::s32 x = pos.X; + irr::s32 y = pos.Y; + wchar_t formatBuffer[2048]; + if(x < 300) { + irr::gui::IGUIElement* root = mainGame->env->getRootGUIElement(); + irr::gui::IGUIElement* elem = root->getElementFromPoint(pos); + if(elem == mainGame->btnCancelOrFinish) { + should_show_tip = true; + myswprintf(formatBuffer, dataManager.GetSysString(1700), mainGame->btnCancelOrFinish->getText()); + mainGame->stTip->setText(formatBuffer); + irr::core::dimension2d dtip = mainGame->guiFont->getDimension(formatBuffer) + irr::core::dimension2d(10, 10); + mainGame->stTip->setRelativePosition(mainGame->Resize(x - 10 - dtip.Width, y - 10 - dtip.Height, x - 10, y - 10)); + } + mainGame->stTip->setVisible(should_show_tip); break; } - case MSG_SELECT_IDLECMD: { - if(mainGame->wCardSelect->isVisible()) { - mainGame->HideElement(mainGame->wCardSelect); + hovered_location = 0; + ClientCard* mcard = 0; + int mplayer = -1; + if(!panel || !panel->isVisible() || !panel->getRelativePosition().isPointInside(mousepos)) { + GetHoverField(x, y); + if(hovered_location & 0xe) + mcard = GetCard(hovered_controler, hovered_location, hovered_sequence); + else if(hovered_location == LOCATION_GRAVE) { + if(grave[hovered_controler].size()) + mcard = grave[hovered_controler].back(); + } else if(hovered_location == LOCATION_REMOVED) { + if(remove[hovered_controler].size()) { + mcard = remove[hovered_controler].back(); + if(mcard->position & POS_FACEDOWN) + mcard = 0; + } + } else if(hovered_location == LOCATION_EXTRA) { + if(extra[hovered_controler].size()) { + mcard = extra[hovered_controler].back(); + if(mcard->position & POS_FACEDOWN) + mcard = 0; + } + } else if(hovered_location == LOCATION_DECK) { + if(deck[hovered_controler].size()) + mcard = deck[hovered_controler].back(); + } else { + if(mainGame->Resize(327, 8, 630, 51).isPointInside(mousepos)) + mplayer = 0; + else if(mainGame->Resize(689, 8, 991, 51).isPointInside(mousepos)) + mplayer = 1; } - if(mainGame->wOptions->isVisible()) { - mainGame->HideElement(mainGame->wOptions); + } + if(hovered_location == LOCATION_HAND && (mainGame->dInfo.is_shuffling || mainGame->dInfo.curMsg == MSG_SHUFFLE_HAND)) + mcard = 0; + if(mcard == 0 && mplayer < 0) + should_show_tip = false; + else if(mcard == hovered_card && mplayer == hovered_player) { + if(mainGame->stTip->isVisible()) { + should_show_tip = true; + irr::core::recti tpos = mainGame->stTip->getRelativePosition(); + mainGame->stTip->setRelativePosition(irr::core::vector2di(mousepos.X - tpos.getWidth() - 10, mcard ? mousepos.Y - tpos.getHeight() - 10 : y + 10)); } - break; } - case MSG_SELECT_YESNO: - case MSG_SELECT_EFFECTYN: { - if(highlighting_card) - highlighting_card->is_highlighting = false; - highlighting_card = 0; - DuelClient::SetResponseI(0); - mainGame->HideElement(mainGame->wQuery, true); - break; - } - case MSG_SELECT_CARD: { - if(selected_cards.size() == 0) { - if(select_cancelable) { - DuelClient::SetResponseI(-1); - if(mainGame->wCardSelect->isVisible()) - mainGame->HideElement(mainGame->wCardSelect, true); - else - DuelClient::SendResponse(); - } - break; - } - if(mainGame->wQuery->isVisible()) { - unsigned char respbuf[64]; - respbuf[0] = selected_cards.size(); - for (size_t i = 0; i < selected_cards.size(); ++i) - respbuf[i + 1] = selected_cards[i]->select_seq; - DuelClient::SetResponseB(respbuf, selected_cards.size() + 1); - mainGame->HideElement(mainGame->wQuery, true); - break; - } - if(select_ready) { - unsigned char respbuf[64]; - respbuf[0] = selected_cards.size(); - for (size_t i = 0; i < selected_cards.size(); ++i) - respbuf[i + 1] = selected_cards[i]->select_seq; - DuelClient::SetResponseB(respbuf, selected_cards.size() + 1); - if(mainGame->wCardSelect->isVisible()) - mainGame->HideElement(mainGame->wCardSelect, true); - else - DuelClient::SendResponse(); - } - break; - } - case MSG_SELECT_TRIBUTE: { - if(selected_cards.size() == 0) { - if(select_cancelable) { - DuelClient::SetResponseI(-1); - if(mainGame->wCardSelect->isVisible()) - mainGame->HideElement(mainGame->wCardSelect, true); - else - DuelClient::SendResponse(); - } - break; - } - if(mainGame->wQuery->isVisible()) { - unsigned char respbuf[64]; - respbuf[0] = selected_cards.size(); - for (size_t i = 0; i < selected_cards.size(); ++i) - respbuf[i + 1] = selected_cards[i]->select_seq; - DuelClient::SetResponseB(respbuf, selected_cards.size() + 1); - mainGame->HideElement(mainGame->wQuery, true); - break; - } - break; - } - case MSG_SELECT_SUM: { - if(mainGame->wQuery->isVisible()) { - unsigned char respbuf[64]; - respbuf[0] = selected_cards.size(); - for (size_t i = 0; i < selected_cards.size(); ++i) - respbuf[i + 1] = selected_cards[i]->select_seq; - DuelClient::SetResponseB(respbuf, selected_cards.size() + 1); - mainGame->HideElement(mainGame->wQuery, true); - break; - } - break; - } - case MSG_SELECT_CHAIN: { - if(chain_forced) - break; - if(mainGame->wCardSelect->isVisible()) { - mainGame->HideElement(mainGame->wCardSelect); - break; - } - if(mainGame->wQuery->isVisible()) { - DuelClient::SetResponseI(-1); - mainGame->HideElement(mainGame->wQuery, true); - } else { - mainGame->PopupElement(mainGame->wQuery); - } - if(mainGame->wOptions->isVisible()) { - DuelClient::SetResponseI(-1); - mainGame->HideElement(mainGame->wOptions); - } - break; - } - case MSG_SORT_CHAIN: - case MSG_SORT_CARD: { - if(mainGame->wCardSelect->isVisible()) { - DuelClient::SetResponseI(-1); - mainGame->HideElement(mainGame->wCardSelect, true); - } - break; - } - } - break; - } - case irr::EMIE_MOUSE_MOVED: { - if(!mainGame->dInfo.isStarted) - break; - s32 x = event.MouseInput.X; - s32 y = event.MouseInput.Y; - hovered_location = 0; - irr::core::position2di pos(x, y); - if(x < 300) - break; - ClientCard* mcard = 0; - if(!panel || !panel->isVisible() || !panel->getRelativePosition().isPointInside(pos)) { - GetHoverField(x, y); - if(hovered_location & 0xe) - mcard = GetCard(hovered_controler, hovered_location, hovered_sequence); - else if(hovered_location == LOCATION_GRAVE && grave[hovered_controler].size()) - mcard = *(grave[hovered_controler].rbegin()); - else if(hovered_location == LOCATION_REMOVED && remove[hovered_controler].size()) { - mcard = *(remove[hovered_controler].rbegin()); - if(mcard->position & POS_FACEDOWN) - mcard = 0; - } else if(hovered_location == LOCATION_DECK && deck[hovered_controler].size()) - mcard = *(deck[hovered_controler].rbegin()); - else mcard = 0; - } - if(hovered_location == LOCATION_HAND && (mainGame->dInfo.is_shuffling || mainGame->dInfo.curMsg == MSG_SHUFFLE_HAND)) - mcard = 0; if(mcard != hovered_card) { if(hovered_card) { if(hovered_card->location == LOCATION_HAND && !mainGame->dInfo.is_shuffling && mainGame->dInfo.curMsg != MSG_SHUFFLE_HAND) { @@ -1422,145 +1559,157 @@ bool ClientField::OnEvent(const irr::SEvent& event) { if(hovered_controler == 0) mainGame->hideChat = false; } - if(hovered_card->equipTarget) - hovered_card->equipTarget->is_showequip = false; - if(hovered_card->equipped.size()) - for(auto cit = hovered_card->equipped.begin(); cit != hovered_card->equipped.end(); ++cit) - (*cit)->is_showequip = false; - if(hovered_card->cardTarget.size()) - for(auto cit = hovered_card->cardTarget.begin(); cit != hovered_card->cardTarget.end(); ++cit) - (*cit)->is_showtarget = false; - if(hovered_card->ownerTarget.size()) - for(auto cit = hovered_card->ownerTarget.begin(); cit != hovered_card->ownerTarget.end(); ++cit) - (*cit)->is_showtarget = false; + SetShowMark(hovered_card, false); } if(mcard) { - if(mcard != clicked_card) - mainGame->wCmdMenu->setVisible(false); + if(mcard != menu_card) + HideMenu(); if(hovered_location == LOCATION_HAND) { mcard->is_hovered = true; MoveCard(mcard, 5); if(hovered_controler == 0) mainGame->hideChat = true; } - if(mcard->equipTarget) - mcard->equipTarget->is_showequip = true; - if(mcard->equipped.size()) - for(auto cit = mcard->equipped.begin(); cit != mcard->equipped.end(); ++cit) - (*cit)->is_showequip = true; - if(mcard->cardTarget.size()) - for(auto cit = mcard->cardTarget.begin(); cit != mcard->cardTarget.end(); ++cit) - (*cit)->is_showtarget = true; - if(mcard->ownerTarget.size()) - for(auto cit = mcard->ownerTarget.begin(); cit != mcard->ownerTarget.end(); ++cit) - (*cit)->is_showtarget = true; + SetShowMark(mcard, true); if(mcard->code) { mainGame->ShowCardInfo(mcard->code); if(mcard->location & 0xe) { std::wstring str; + myswprintf(formatBuffer, L"%ls", dataManager.GetName(mcard->code)); + str.append(formatBuffer); if(mcard->type & TYPE_MONSTER) { - myswprintf(formatBuffer, L"%ls", dataManager.GetName(mcard->code)); - str.append(formatBuffer); - if(mcard->alias && (mcard->alias < mcard->code - 10 || mcard->alias > mcard->code + 10) - && wcscmp(dataManager.GetName(mcard->code), dataManager.GetName(mcard->alias))) { + if(mcard->alias && std::wcscmp(dataManager.GetName(mcard->code), dataManager.GetName(mcard->alias))) { myswprintf(formatBuffer, L"\n(%ls)", dataManager.GetName(mcard->alias)); str.append(formatBuffer); } myswprintf(formatBuffer, L"\n%ls/%ls", mcard->atkstring, mcard->defstring); str.append(formatBuffer); - myswprintf(formatBuffer, L"\n\x2605%d %ls/%ls", (mcard->level ? mcard->level : mcard->rank), dataManager.FormatRace(mcard->race), dataManager.FormatAttribute(mcard->attribute)); - str.append(formatBuffer); - if(mcard->location == LOCATION_HAND && (mcard->type & TYPE_PENDULUM)) { - myswprintf(formatBuffer, L"\n%d/%d", mcard->lscale, mcard->rscale); + if(!(mcard->type & TYPE_LINK)) { + const wchar_t* form = L"\u2605"; + if (mcard->rank) form = L"\u2606"; + myswprintf(formatBuffer, L"\n%ls%d", form, (mcard->level ? mcard->level : mcard->rank)); str.append(formatBuffer); - } - if(mcard->counters.size()) { - for(std::map::iterator ctit = mcard->counters.begin(); ctit != mcard->counters.end(); ++ctit) { - myswprintf(formatBuffer, L"\n[%ls]: %d", dataManager.GetCounterName(ctit->first), ctit->second); - str.append(formatBuffer); - } - } - if(mcard->cHint && mcard->chValue && (mcard->location & LOCATION_ONFIELD)) { - if(mcard->cHint == CHINT_TURN) - myswprintf(formatBuffer, L"\n%ls%d", dataManager.GetSysString(211), mcard->chValue); - else if(mcard->cHint == CHINT_CARD) - myswprintf(formatBuffer, L"\n%ls%ls", dataManager.GetSysString(212), dataManager.GetName(mcard->chValue)); - else if(mcard->cHint == CHINT_RACE) - myswprintf(formatBuffer, L"\n%ls%ls", dataManager.GetSysString(213), dataManager.FormatRace(mcard->chValue)); - else if(mcard->cHint == CHINT_ATTRIBUTE) - myswprintf(formatBuffer, L"\n%ls%ls", dataManager.GetSysString(214), dataManager.FormatAttribute(mcard->chValue)); - else if(mcard->cHint == CHINT_NUMBER) - myswprintf(formatBuffer, L"\n%ls%d", dataManager.GetSysString(215), mcard->chValue); + } else { + myswprintf(formatBuffer, L"\nLINK-%d", mcard->link); str.append(formatBuffer); } - for(auto iter = mcard->desc_hints.begin(); iter != mcard->desc_hints.end(); ++iter) { - myswprintf(formatBuffer, L"\n*%ls", dataManager.GetDesc(iter->first)); + const auto& race = dataManager.FormatRace(mcard->race); + const auto& attribute = dataManager.FormatAttribute(mcard->attribute); + myswprintf(formatBuffer, L" %ls/%ls", race.c_str(), attribute.c_str()); + str.append(formatBuffer); + if(mcard->location == LOCATION_HAND && (mcard->type & TYPE_PENDULUM)) { + myswprintf(formatBuffer, L"\n%d/%d", mcard->lscale, mcard->rscale); str.append(formatBuffer); } } else { - myswprintf(formatBuffer, L"%ls", dataManager.GetName(mcard->code)); - str.append(formatBuffer); - if(mcard->alias && (mcard->alias < mcard->code - 10 || mcard->alias > mcard->code + 10)) { - myswprintf(formatBuffer, L"\n%ls", dataManager.GetName(mcard->alias)); + if(mcard->alias && std::wcscmp(dataManager.GetName(mcard->code), dataManager.GetName(mcard->alias))) { + myswprintf(formatBuffer, L"\n(%ls)", dataManager.GetName(mcard->alias)); str.append(formatBuffer); } - if(mcard->location == LOCATION_SZONE && (mcard->sequence == 6 || mcard->sequence == 7)) { + if(mcard->location == LOCATION_SZONE && (mcard->type & TYPE_PENDULUM)) { myswprintf(formatBuffer, L"\n%d/%d", mcard->lscale, mcard->rscale); str.append(formatBuffer); } - if(mcard->counters.size()) { - for(std::map::iterator ctit = mcard->counters.begin(); ctit != mcard->counters.end(); ++ctit) { - myswprintf(formatBuffer, L"\n[%ls]: %d", dataManager.GetCounterName(ctit->first), ctit->second); - str.append(formatBuffer); - } - } - if(mcard->cHint && mcard->chValue && (mcard->location & LOCATION_ONFIELD)) { - if(mcard->cHint == CHINT_TURN) - myswprintf(formatBuffer, L"\n%ls%d", dataManager.GetSysString(211), mcard->chValue); - else if(mcard->cHint == CHINT_CARD) - myswprintf(formatBuffer, L"\n%ls%ls", dataManager.GetSysString(212), dataManager.GetName(mcard->chValue)); - else if(mcard->cHint == CHINT_RACE) - myswprintf(formatBuffer, L"\n%ls%ls", dataManager.GetSysString(213), dataManager.FormatRace(mcard->chValue)); - else if(mcard->cHint == CHINT_ATTRIBUTE) - myswprintf(formatBuffer, L"\n%ls%ls", dataManager.GetSysString(214), dataManager.FormatAttribute(mcard->chValue)); - else if(mcard->cHint == CHINT_NUMBER) - myswprintf(formatBuffer, L"\n%ls%d", dataManager.GetSysString(215), mcard->chValue); - str.append(formatBuffer); + } + for(auto ctit = mcard->counters.begin(); ctit != mcard->counters.end(); ++ctit) { + myswprintf(formatBuffer, L"\n[%ls]: %d", dataManager.GetCounterName(ctit->first), ctit->second); + str.append(formatBuffer); + } + if(mcard->cHint && mcard->chValue && (mcard->location & LOCATION_ONFIELD)) { + if(mcard->cHint == CHINT_TURN) + myswprintf(formatBuffer, L"\n%ls%d", dataManager.GetSysString(211), mcard->chValue); + else if(mcard->cHint == CHINT_CARD) + myswprintf(formatBuffer, L"\n%ls%ls", dataManager.GetSysString(212), dataManager.GetName(mcard->chValue)); + else if(mcard->cHint == CHINT_RACE) { + const auto& race = dataManager.FormatRace(mcard->chValue); + myswprintf(formatBuffer, L"\n%ls%ls", dataManager.GetSysString(213), race.c_str()); } - for(auto iter = mcard->desc_hints.begin(); iter != mcard->desc_hints.end(); ++iter) { - myswprintf(formatBuffer, L"\n*%ls", dataManager.GetDesc(iter->first)); - str.append(formatBuffer); + else if(mcard->cHint == CHINT_ATTRIBUTE) { + const auto& attribute = dataManager.FormatAttribute(mcard->chValue); + myswprintf(formatBuffer, L"\n%ls%ls", dataManager.GetSysString(214), attribute.c_str()); } + else if(mcard->cHint == CHINT_NUMBER) + myswprintf(formatBuffer, L"\n%ls%d", dataManager.GetSysString(215), mcard->chValue); + str.append(formatBuffer); } - mainGame->stTip->setVisible(true); - irr::core::dimension2d dtip = mainGame->textFont->getDimension(str.c_str()); - mainGame->stTip->setRelativePosition(recti(x - 10 - dtip.Width, y - 10 - dtip.Height, x, y)); + for(auto iter = mcard->desc_hints.begin(); iter != mcard->desc_hints.end(); ++iter) { + myswprintf(formatBuffer, L"\n*%ls", dataManager.GetDesc(iter->first)); + str.append(formatBuffer); + } + should_show_tip = true; + irr::core::dimension2d dtip = mainGame->guiFont->getDimension(str.c_str()) + irr::core::dimension2d(10, 10); + mainGame->stTip->setRelativePosition(irr::core::recti(mousepos.X - 10 - dtip.Width, mousepos.Y - 10 - dtip.Height, mousepos.X - 10, mousepos.Y - 10)); mainGame->stTip->setText(str.c_str()); } } else { - mainGame->stTip->setVisible(false); - mainGame->imgCard->setImage(imageManager.tCover); - mainGame->stName->setText(L""); - mainGame->stInfo->setText(L""); - mainGame->stDataInfo->setText(L""); - mainGame->stText->setText(L""); - mainGame->scrCardText->setVisible(false); + should_show_tip = false; + mainGame->ClearCardInfo(mcard->controler); } - } else { - mainGame->stTip->setVisible(false); } hovered_card = mcard; - } else { - if(mainGame->stTip->isVisible()) { - irr::core::recti tpos = mainGame->stTip->getRelativePosition(); - mainGame->stTip->setRelativePosition(irr::core::position2di(x - tpos.getWidth() - 10, y - tpos.getHeight() - 10)); + } + if(mplayer != hovered_player) { + if(mplayer >= 0) { + const wchar_t* player_name; + if(mplayer == 0) { + if(!mainGame->dInfo.isTag || !mainGame->dInfo.tag_player[0]) + player_name = mainGame->dInfo.hostname; + else + player_name = mainGame->dInfo.hostname_tag; + } else { + if(!mainGame->dInfo.isTag || !mainGame->dInfo.tag_player[1]) + player_name = mainGame->dInfo.clientname; + else + player_name = mainGame->dInfo.clientname_tag; + } + std::wstring str(player_name); + const auto& mplayer_hints = mainGame->dField.player_desc_hints[mplayer]; + for(auto iter = mplayer_hints.begin(); iter != mplayer_hints.end(); ++iter) { + myswprintf(formatBuffer, L"\n*%ls", dataManager.GetDesc(iter->first)); + str.append(formatBuffer); + } + if(mainGame->dInfo.turn == 1) { + if(mplayer == 0 && mainGame->dInfo.isFirst || mplayer != 0 && !mainGame->dInfo.isFirst) + myswprintf(formatBuffer, L"\n*%ls", dataManager.GetSysString(100)); + else + myswprintf(formatBuffer, L"\n*%ls", dataManager.GetSysString(101)); + str.append(formatBuffer); + } + should_show_tip = true; + irr::core::dimension2d dtip = mainGame->guiFont->getDimension(str.c_str()) + irr::core::dimension2d(10, 10); + mainGame->stTip->setRelativePosition(irr::core::recti(mousepos.X - 10 - dtip.Width, mousepos.Y + 10, mousepos.X - 10, mousepos.Y + 10 + dtip.Height)); + mainGame->stTip->setText(str.c_str()); } + hovered_player = mplayer; } + mainGame->stTip->setVisible(should_show_tip); break; } case irr::EMIE_MOUSE_WHEEL: { break; } + case irr::EMIE_LMOUSE_PRESSED_DOWN: { + if(!mainGame->dInfo.isStarted) + break; + if(mainGame->gameConf.control_mode == 1 && event.MouseInput.X > 300 * mainGame->xScale) { + mainGame->always_chain = event.MouseInput.isLeftPressed(); + mainGame->ignore_chain = false; + mainGame->chain_when_avail = false; + UpdateChainButtons(); + } + break; + } + case irr::EMIE_RMOUSE_PRESSED_DOWN: { + if(!mainGame->dInfo.isStarted) + break; + if(mainGame->gameConf.control_mode == 1 && event.MouseInput.X > 300 * mainGame->xScale) { + mainGame->ignore_chain = event.MouseInput.isRightPressed(); + mainGame->always_chain = false; + mainGame->chain_when_avail = false; + UpdateChainButtons(); + } + break; + } default: break; } @@ -1569,61 +1718,100 @@ bool ClientField::OnEvent(const irr::SEvent& event) { case irr::EET_KEY_INPUT_EVENT: { switch(event.KeyInput.Key) { case irr::KEY_KEY_A: { - mainGame->always_chain = event.KeyInput.PressedDown; + if(mainGame->gameConf.control_mode == 0 && !mainGame->HasFocus(irr::gui::EGUIET_EDIT_BOX)) { + mainGame->always_chain = event.KeyInput.PressedDown; + mainGame->ignore_chain = false; + mainGame->chain_when_avail = false; + UpdateChainButtons(); + } break; } case irr::KEY_KEY_S: { - mainGame->ignore_chain = event.KeyInput.PressedDown; + if(mainGame->gameConf.control_mode == 0 && !mainGame->HasFocus(irr::gui::EGUIET_EDIT_BOX)) { + mainGame->ignore_chain = event.KeyInput.PressedDown; + mainGame->always_chain = false; + mainGame->chain_when_avail = false; + UpdateChainButtons(); + } break; } - case irr::KEY_KEY_R: { - if(!event.KeyInput.PressedDown) - mainGame->textFont->setTransparency(true); + case irr::KEY_KEY_D: { + if(mainGame->gameConf.control_mode == 0 && !mainGame->HasFocus(irr::gui::EGUIET_EDIT_BOX)) { + mainGame->chain_when_avail = event.KeyInput.PressedDown; + mainGame->always_chain = false; + mainGame->ignore_chain = false; + UpdateChainButtons(); + } break; } case irr::KEY_F1: case irr::KEY_F2: case irr::KEY_F3: + case irr::KEY_F4: case irr::KEY_F5: case irr::KEY_F6: - case irr::KEY_F7: { + case irr::KEY_F7: + case irr::KEY_F8: { if(!event.KeyInput.PressedDown && !mainGame->dInfo.isReplay && mainGame->dInfo.player_type != 7 && mainGame->dInfo.isStarted - && !mainGame->wCardDisplay->isVisible()) { + && !mainGame->wCardDisplay->isVisible() && !mainGame->HasFocus(irr::gui::EGUIET_EDIT_BOX)) { int loc_id = 0; display_cards.clear(); switch(event.KeyInput.Key) { case irr::KEY_F1: + if(cant_check_grave) + break; loc_id = 1004; - for(int32 i = (int32)grave[0].size() - 1; i >= 0 ; --i) - display_cards.push_back(grave[0][i]); + for(auto it = grave[0].rbegin(); it != grave[0].rend(); ++it) + display_cards.push_back(*it); break; case irr::KEY_F2: loc_id = 1005; - for(int32 i = (int32)remove[0].size() - 1; i >= 0 ; --i) - display_cards.push_back(remove[0][i]); + for(auto it = remove[0].rbegin(); it != remove[0].rend(); ++it) + display_cards.push_back(*it); break; case irr::KEY_F3: loc_id = 1006; - for(int32 i = (int32)extra[0].size() - 1; i >= 0 ; --i) - display_cards.push_back(extra[0][i]); + for(auto it = extra[0].rbegin(); it != extra[0].rend(); ++it) + display_cards.push_back(*it); + break; + case irr::KEY_F4: + loc_id = 1007; + for(auto it = mzone[0].begin(); it != mzone[0].end(); ++it) { + if(*it) { + for(auto oit = (*it)->overlayed.begin(); oit != (*it)->overlayed.end(); ++oit) + display_cards.push_back(*oit); + } + } break; case irr::KEY_F5: + if(cant_check_grave) + break; loc_id = 1004; - for(int32 i = (int32)grave[1].size() - 1; i >= 0 ; --i) - display_cards.push_back(grave[1][i]); + for(auto it = grave[1].rbegin(); it != grave[1].rend(); ++it) + display_cards.push_back(*it); break; case irr::KEY_F6: loc_id = 1005; - for(int32 i = (int32)remove[1].size() - 1; i >= 0 ; --i) - display_cards.push_back(remove[1][i]); + for(auto it = remove[1].rbegin(); it != remove[1].rend(); ++it) + display_cards.push_back(*it); break; case irr::KEY_F7: loc_id = 1006; - for(int32 i = (int32)extra[1].size() - 1; i >= 0 ; --i) - display_cards.push_back(extra[1][i]); + for(auto it = extra[1].rbegin(); it != extra[1].rend(); ++it) + display_cards.push_back(*it); + break; + case irr::KEY_F8: + loc_id = 1007; + for(auto it = mzone[1].begin(); it != mzone[1].end(); ++it) { + if(*it) { + for(auto oit = (*it)->overlayed.begin(); oit != (*it)->overlayed.end(); ++oit) + display_cards.push_back(*oit); + } + } break; } if(display_cards.size()) { + wchar_t formatBuffer[2048]; myswprintf(formatBuffer, L"%ls(%d)", dataManager.GetSysString(loc_id), display_cards.size()); mainGame->wCardDisplay->setText(formatBuffer); ShowLocationCard(); @@ -1631,8 +1819,252 @@ bool ClientField::OnEvent(const irr::SEvent& event) { } break; } + default: break; + } + break; + } + default: break; + } + return false; +} +bool ClientField::OnCommonEvent(const irr::SEvent& event) { + switch(event.EventType) { + case irr::EET_GUI_EVENT: { + irr::s32 id = event.GUIEvent.Caller->getID(); + switch(event.GUIEvent.EventType) { + case irr::gui::EGET_ELEMENT_HOVERED: { + if(event.GUIEvent.Caller->getType() == irr::gui::EGUIET_EDIT_BOX) { + mainGame->SetCursor(event.GUIEvent.Caller->isEnabled() ? irr::gui::ECI_IBEAM : irr::gui::ECI_NORMAL); + return true; + } + if(event.GUIEvent.Caller == mainGame->imgCard && mainGame->is_building && !mainGame->is_siding) { + mainGame->SetCursor(irr::gui::ECI_HAND); + return true; + } + break; + } + case irr::gui::EGET_ELEMENT_LEFT: { + if(event.GUIEvent.Caller->getType() == irr::gui::EGUIET_EDIT_BOX || event.GUIEvent.Caller == mainGame->imgCard) { + mainGame->SetCursor(irr::gui::ECI_NORMAL); + return true; + } + break; + } + case irr::gui::EGET_BUTTON_CLICKED: { + switch(id) { + case BUTTON_CLEAR_LOG: { + soundManager.PlaySoundEffect(SOUND_BUTTON); + mainGame->lstLog->clear(); + mainGame->logParam.clear(); + return true; + break; + } + case BUTTON_WINDOW_RESIZE_S: { + mainGame->SetWindowsScale(0.8f); + return true; + break; + } + case BUTTON_WINDOW_RESIZE_M: { + mainGame->SetWindowsScale(1.0f); + return true; + break; + } + case BUTTON_WINDOW_RESIZE_L: { + mainGame->SetWindowsScale(1.25f); + return true; + break; + } + case BUTTON_WINDOW_RESIZE_XL: { + mainGame->SetWindowsScale(1.5f); + return true; + break; + } + } + break; + } + case irr::gui::EGET_CHECKBOX_CHANGED: { + switch(id) { + case CHECKBOX_AUTO_SEARCH: { + mainGame->gameConf.auto_search_limit = mainGame->chkAutoSearch->isChecked() ? 0 : -1; + if(mainGame->is_building && !mainGame->is_siding) + mainGame->deckBuilder.InstantSearch(); + return true; + break; + } + case CHECKBOX_MULTI_KEYWORDS: { + mainGame->gameConf.search_multiple_keywords = mainGame->chkMultiKeywords->isChecked() ? 1 : 0; + if(mainGame->is_building && !mainGame->is_siding) + mainGame->deckBuilder.InstantSearch(); + return true; + break; + } + case CHECKBOX_ENABLE_MUSIC: { + if(!mainGame->chkEnableMusic->isChecked()) + soundManager.StopBGM(); + return true; + break; + } + case CHECKBOX_DISABLE_CHAT: { + bool show = (mainGame->is_building && !mainGame->is_siding) ? false : !mainGame->chkIgnore1->isChecked(); + mainGame->wChat->setVisible(show); + if(!show) + mainGame->ClearChatMsg(); + return true; + break; + } + case CHECKBOX_QUICK_ANIMATION: { + mainGame->gameConf.quick_animation = mainGame->chkQuickAnimation->isChecked() ? 1 : 0; + return true; + break; + } + case CHECKBOX_DRAW_SINGLE_CHAIN: { + mainGame->gameConf.draw_single_chain = mainGame->chkDrawSingleChain->isChecked() ? 1 : 0; + return true; + break; + } + case CHECKBOX_HIDE_PLAYER_NAME: { + mainGame->gameConf.hide_player_name = mainGame->chkHidePlayerName->isChecked() ? 1 : 0; + if(mainGame->gameConf.hide_player_name) + mainGame->ClearChatMsg(); + return true; + break; + } + case CHECKBOX_PREFER_EXPANSION: { + mainGame->gameConf.prefer_expansion_script = mainGame->chkPreferExpansionScript->isChecked() ? 1 : 0; + return true; + break; + } + case CHECKBOX_LFLIST: { + mainGame->gameConf.use_lflist = mainGame->chkLFlist->isChecked() ? 1 : 0; + mainGame->cbLFlist->setEnabled(mainGame->gameConf.use_lflist); + mainGame->cbLFlist->setSelected(mainGame->gameConf.use_lflist ? mainGame->gameConf.default_lflist : mainGame->cbLFlist->getItemCount() - 1); + mainGame->cbHostLFlist->setSelected(mainGame->gameConf.use_lflist ? mainGame->gameConf.default_lflist : mainGame->cbHostLFlist->getItemCount() - 1); + mainGame->deckBuilder.filterList = &deckManager._lfList[mainGame->cbLFlist->getSelected()]; + return true; + break; + } + } + break; + } + case irr::gui::EGET_COMBO_BOX_CHANGED: { + switch(id) { + case COMBOBOX_LFLIST: { + mainGame->gameConf.default_lflist = mainGame->cbLFlist->getSelected(); + mainGame->cbHostLFlist->setSelected(mainGame->gameConf.default_lflist); + mainGame->deckBuilder.filterList = &deckManager._lfList[mainGame->gameConf.default_lflist]; + return true; + break; + } + } + break; + } + case irr::gui::EGET_LISTBOX_CHANGED: { + switch(id) { + case LISTBOX_LOG: { + int sel = mainGame->lstLog->getSelected(); + if(sel != -1 && (int)mainGame->logParam.size() >= sel && mainGame->logParam[sel]) { + mainGame->ShowCardInfo(mainGame->logParam[sel]); + } + return true; + break; + } + } + break; + } + case irr::gui::EGET_LISTBOX_SELECTED_AGAIN: { + switch(id) { + case LISTBOX_LOG: { + int sel = mainGame->lstLog->getSelected(); + if(sel != -1 && (int)mainGame->logParam.size() >= sel && mainGame->logParam[sel]) { + mainGame->wInfos->setActiveTab(0); + } + return true; + break; + } + } + break; + } + case irr::gui::EGET_SCROLL_BAR_CHANGED: { + switch(id) { + case SCROLL_CARDTEXT: { + if(!mainGame->scrCardText->isVisible()) { + return true; + break; + } + irr::u32 pos = mainGame->scrCardText->getPos(); + mainGame->SetStaticText(mainGame->stText, mainGame->stText->getRelativePosition().getWidth() - 25, mainGame->guiFont, mainGame->showingtext, pos); + return true; + break; + } + case SCROLL_VOLUME: { + mainGame->gameConf.sound_volume = (double)mainGame->scrSoundVolume->getPos() / 100; + mainGame->gameConf.music_volume = (double)mainGame->scrMusicVolume->getPos() / 100; + soundManager.SetSoundVolume(mainGame->gameConf.sound_volume); + soundManager.SetMusicVolume(mainGame->gameConf.music_volume); + return true; + break; + } + case SCROLL_TAB_HELPER: { + irr::core::rect pos = mainGame->tabHelper->getRelativePosition(); + mainGame->tabHelper->setRelativePosition(irr::core::recti(0, mainGame->scrTabHelper->getPos() * -1, pos.LowerRightCorner.X, pos.LowerRightCorner.Y)); + return true; + break; + } + case SCROLL_TAB_SYSTEM: { + irr::core::rect pos = mainGame->tabSystem->getRelativePosition(); + mainGame->tabSystem->setRelativePosition(irr::core::recti(0, mainGame->scrTabSystem->getPos() * -1, pos.LowerRightCorner.X, pos.LowerRightCorner.Y)); + return true; + break; + } + } + break; + } + case irr::gui::EGET_EDITBOX_ENTER: { + switch(id) { + case EDITBOX_CHAT: { + if(mainGame->dInfo.isReplay) + break; + const wchar_t* input = mainGame->ebChatInput->getText(); + if(input[0]) { + uint16_t msgbuf[LEN_CHAT_MSG]; + int len = BufferIO::CopyCharArray(input, msgbuf); + DuelClient::SendBufferToServer(CTOS_CHAT, msgbuf, (len + 1) * sizeof(uint16_t)); + mainGame->ebChatInput->setText(L""); + return true; + } + break; + } + } + break; + } + default: break; + } + break; + } + case irr::EET_KEY_INPUT_EVENT: { + switch(event.KeyInput.Key) { + case irr::KEY_KEY_R: { + if(mainGame->gameConf.control_mode == 0 + && !event.KeyInput.PressedDown && !mainGame->HasFocus(irr::gui::EGUIET_EDIT_BOX)) { + mainGame->textFont->setTransparency(true); + mainGame->guiFont->setTransparency(true); + } + return true; + break; + } + case irr::KEY_F9: { + if(mainGame->gameConf.control_mode == 1 + && !event.KeyInput.PressedDown && !mainGame->HasFocus(irr::gui::EGUIET_EDIT_BOX)) { + mainGame->textFont->setTransparency(true); + mainGame->guiFont->setTransparency(true); + } + return true; + break; + } case irr::KEY_ESCAPE: { - mainGame->device->minimizeWindow(); + if(!mainGame->HasFocus(irr::gui::EGUIET_EDIT_BOX)) + mainGame->device->minimizeWindow(); + return true; break; } default: break; @@ -1646,7 +2078,8 @@ bool ClientField::OnEvent(const irr::SEvent& event) { void ClientField::GetHoverField(int x, int y) { irr::core::recti sfRect(430, 504, 875, 600); irr::core::recti ofRect(531, 135, 800, 191); - irr::core::position2di pos(x, y); + irr::core::vector2di pos(x, y); + int rule = (mainGame->dInfo.duel_rule >= 4) ? 1 : 0; if(sfRect.isPointInside(pos)) { int hc = hand[0].size(); int cardSize = 66; @@ -1709,116 +2142,196 @@ void ClientField::GetHoverField(int x, int y) { double boardx = 4.2 + 7.8 * screenx / vlen / cos(angle); double boardy = 8.0 - 7.8 * tan(angle); hovered_location = 0; - if(boardx >= matManager.vFields[8].Pos.X && boardx <= matManager.vFields[9].Pos.X) { - if(boardy >= matManager.vFields[8].Pos.Y && boardy <= matManager.vFields[10].Pos.Y) { + if(boardx >= matManager.vFieldExtra[0][0].Pos.X && boardx <= matManager.vFieldExtra[0][1].Pos.X) { + if(boardy >= matManager.vFieldExtra[0][0].Pos.Y && boardy <= matManager.vFieldExtra[0][2].Pos.Y) { hovered_controler = 0; hovered_location = LOCATION_EXTRA; - } else if(boardy >= matManager.vFields[56].Pos.Y && boardy <= matManager.vFields[58].Pos.Y) {//field + } else if(boardy >= matManager.vFieldSzone[0][5][rule][0].Pos.Y && boardy <= matManager.vFieldSzone[0][5][rule][2].Pos.Y) {//field hovered_controler = 0; hovered_location = LOCATION_SZONE; hovered_sequence = 5; - } else if(boardy >= matManager.vFields[60].Pos.Y && boardy <= matManager.vFields[62].Pos.Y) { + } else if(boardy >= matManager.vFieldSzone[0][6][rule][0].Pos.Y && boardy <= matManager.vFieldSzone[0][6][rule][2].Pos.Y) { hovered_controler = 0; hovered_location = LOCATION_SZONE; hovered_sequence = 6; - } else if(boardy >= matManager.vFields[134].Pos.Y && boardy <= matManager.vFields[132].Pos.Y) { + } else if(rule == 1 && boardy >= matManager.vFieldRemove[1][rule][2].Pos.Y && boardy <= matManager.vFieldRemove[1][rule][0].Pos.Y) { + hovered_controler = 1; + hovered_location = LOCATION_REMOVED; + } else if(rule == 0 && boardy >= matManager.vFieldSzone[1][7][rule][2].Pos.Y && boardy <= matManager.vFieldSzone[1][7][rule][0].Pos.Y) { hovered_controler = 1; hovered_location = LOCATION_SZONE; hovered_sequence = 7; - } else if(boardy >= matManager.vFields[74].Pos.Y && boardy <= matManager.vFields[72].Pos.Y) { + } else if(boardy >= matManager.vFieldGrave[1][rule][2].Pos.Y && boardy <= matManager.vFieldGrave[1][rule][0].Pos.Y) { hovered_controler = 1; hovered_location = LOCATION_GRAVE; - } else if(boardy >= matManager.vFields[70].Pos.Y && boardy <= matManager.vFields[68].Pos.Y) { + } else if(boardy >= matManager.vFieldDeck[1][2].Pos.Y && boardy <= matManager.vFieldDeck[1][0].Pos.Y) { hovered_controler = 1; hovered_location = LOCATION_DECK; } - } else if(boardx >= matManager.vFields[81].Pos.X && boardx <= matManager.vFields[80].Pos.X) { - if(boardy >= matManager.vFields[82].Pos.Y && boardy <= matManager.vFields[80].Pos.Y) { + } else if (boardx >= matManager.vFieldContiAct[0].X && boardx <= matManager.vFieldContiAct[1].X + && boardy >= matManager.vFieldContiAct[0].Y && boardy <= matManager.vFieldContiAct[2].Y) { + hovered_controler = 0; + hovered_location = POSITION_HINT; + } else if(rule == 0 && boardx >= matManager.vFieldRemove[1][rule][1].Pos.X && boardx <= matManager.vFieldRemove[1][rule][0].Pos.X) { + if(boardy >= matManager.vFieldRemove[1][rule][2].Pos.Y && boardy <= matManager.vFieldRemove[1][rule][0].Pos.Y) { hovered_controler = 1; hovered_location = LOCATION_REMOVED; } - } else if(boardx >= matManager.vFields[0].Pos.X && boardx <= matManager.vFields[1].Pos.X) { - if(boardy >= matManager.vFields[0].Pos.Y && boardy <= matManager.vFields[2].Pos.Y) { + } else if(rule == 1 && boardx >= matManager.vFieldSzone[1][7][rule][1].Pos.X && boardx <= matManager.vFieldSzone[1][7][rule][2].Pos.X) { + // deprecated szone[7] + if(boardy >= matManager.vFieldSzone[1][7][rule][2].Pos.Y && boardy <= matManager.vFieldSzone[1][7][rule][0].Pos.Y) { + hovered_controler = 1; + hovered_location = LOCATION_SZONE; + hovered_sequence = 7; + } + } else if(boardx >= matManager.vFieldDeck[0][0].Pos.X && boardx <= matManager.vFieldDeck[0][1].Pos.X) { + if(boardy >= matManager.vFieldDeck[0][0].Pos.Y && boardy <= matManager.vFieldDeck[0][2].Pos.Y) { hovered_controler = 0; hovered_location = LOCATION_DECK; - } else if(boardy >= matManager.vFields[4].Pos.Y && boardy <= matManager.vFields[6].Pos.Y) { + } else if(boardy >= matManager.vFieldGrave[0][rule][0].Pos.Y && boardy <= matManager.vFieldGrave[0][rule][2].Pos.Y) { hovered_controler = 0; hovered_location = LOCATION_GRAVE; - } else if(boardy >= matManager.vFields[130].Pos.Y && boardy <= matManager.vFields[128].Pos.Y) { + } else if(boardy >= matManager.vFieldSzone[1][6][rule][2].Pos.Y && boardy <= matManager.vFieldSzone[1][6][rule][0].Pos.Y) { hovered_controler = 1; hovered_location = LOCATION_SZONE; hovered_sequence = 6; - } else if(boardy >= matManager.vFields[64].Pos.Y && boardy <= matManager.vFields[66].Pos.Y) { + } else if(rule == 0 && boardy >= matManager.vFieldSzone[0][7][rule][0].Pos.Y && boardy <= matManager.vFieldSzone[0][7][rule][2].Pos.Y) { hovered_controler = 0; hovered_location = LOCATION_SZONE; hovered_sequence = 7; - } else if(boardy >= matManager.vFields[126].Pos.Y && boardy <= matManager.vFields[124].Pos.Y) { + } else if(rule == 1 && boardy >= matManager.vFieldRemove[0][rule][0].Pos.Y && boardy <= matManager.vFieldRemove[0][rule][2].Pos.Y) { + hovered_controler = 0; + hovered_location = LOCATION_REMOVED; + } else if(boardy >= matManager.vFieldSzone[1][5][rule][2].Pos.Y && boardy <= matManager.vFieldSzone[1][5][rule][0].Pos.Y) { hovered_controler = 1; hovered_location = LOCATION_SZONE; hovered_sequence = 5; - } else if(boardy >= matManager.vFields[78].Pos.Y && boardy <= matManager.vFields[76].Pos.Y) { + } else if(boardy >= matManager.vFieldExtra[1][2].Pos.Y && boardy <= matManager.vFieldExtra[1][0].Pos.Y) { hovered_controler = 1; hovered_location = LOCATION_EXTRA; } - } else if(boardx >= matManager.vFields[12].Pos.X && boardx <= matManager.vFields[13].Pos.X) { - if(boardy >= matManager.vFields[12].Pos.Y && boardy <= matManager.vFields[14].Pos.Y) { + } else if(rule == 1 && boardx >= matManager.vFieldSzone[0][7][rule][0].Pos.X && boardx <= matManager.vFieldSzone[0][7][rule][1].Pos.X) { + // deprecated szone[7] + if(boardy >= matManager.vFieldSzone[0][7][rule][0].Pos.Y && boardy <= matManager.vFieldSzone[0][7][rule][2].Pos.Y) { + hovered_controler = 0; + hovered_location = LOCATION_SZONE; + hovered_sequence = 7; + } + } else if(rule == 0 && boardx >= matManager.vFieldRemove[0][rule][0].Pos.X && boardx <= matManager.vFieldRemove[0][rule][1].Pos.X) { + if(boardy >= matManager.vFieldRemove[0][rule][0].Pos.Y && boardy <= matManager.vFieldRemove[0][rule][2].Pos.Y) { hovered_controler = 0; hovered_location = LOCATION_REMOVED; } - } else if(boardx >= matManager.vFields[36].Pos.X && boardx <= matManager.vFields[55].Pos.X) { - if(boardy > matManager.vFields[36].Pos.Y && boardy <= matManager.vFields[38].Pos.Y) { + } else if(boardx >= matManager.vFieldMzone[0][0][0].Pos.X && boardx <= matManager.vFieldMzone[0][4][1].Pos.X) { + int sequence = (boardx - matManager.vFieldMzone[0][0][0].Pos.X) / (matManager.vFieldMzone[0][0][1].Pos.X - matManager.vFieldMzone[0][0][0].Pos.X); + if(sequence > 4) + sequence = 4; + if(boardy > matManager.vFieldSzone[0][0][rule][0].Pos.Y && boardy <= matManager.vFieldSzone[0][0][rule][2].Pos.Y) { hovered_controler = 0; hovered_location = LOCATION_SZONE; - hovered_sequence = (boardx - 1.2) / 1.1; - if(hovered_sequence > 4) - hovered_sequence = 4; - } else if(boardy >= matManager.vFields[16].Pos.Y && boardy <= matManager.vFields[35].Pos.Y) { + hovered_sequence = sequence; + } else if(boardy >= matManager.vFieldMzone[0][0][0].Pos.Y && boardy <= matManager.vFieldMzone[0][0][2].Pos.Y) { hovered_controler = 0; hovered_location = LOCATION_MZONE; - hovered_sequence = (boardx - 1.2) / 1.1; - if(hovered_sequence > 4) - hovered_sequence = 4; - } else if(boardy >= matManager.vFields[103].Pos.Y && boardy <= matManager.vFields[84].Pos.Y) { + hovered_sequence = sequence; + } else if(boardy >= matManager.vFieldMzone[0][5][0].Pos.Y && boardy <= matManager.vFieldMzone[0][5][2].Pos.Y) { + if(sequence == 1) { + if (mzone[0][5]) { + hovered_controler = 0; + hovered_location = LOCATION_MZONE; + hovered_sequence = 5; + } + else if(mzone[1][6]) { + hovered_controler = 1; + hovered_location = LOCATION_MZONE; + hovered_sequence = 6; + } + else if((mainGame->dInfo.curMsg == MSG_SELECT_PLACE || mainGame->dInfo.curMsg == MSG_SELECT_DISFIELD)) { + if (mainGame->dField.selectable_field & (0x1 << (16 + 6))) { + hovered_controler = 1; + hovered_location = LOCATION_MZONE; + hovered_sequence = 6; + } + else { + hovered_controler = 0; + hovered_location = LOCATION_MZONE; + hovered_sequence = 5; + } + } + else{ + hovered_controler = 0; + hovered_location = LOCATION_MZONE; + hovered_sequence = 5; + } + } + else if(sequence == 3) { + if (mzone[0][6]) { + hovered_controler = 0; + hovered_location = LOCATION_MZONE; + hovered_sequence = 6; + } + else if (mzone[1][5]) { + hovered_controler = 1; + hovered_location = LOCATION_MZONE; + hovered_sequence = 5; + } + else if ((mainGame->dInfo.curMsg == MSG_SELECT_PLACE || mainGame->dInfo.curMsg == MSG_SELECT_DISFIELD)) { + if (mainGame->dField.selectable_field & (0x1 << (16 + 5))) { + hovered_controler = 1; + hovered_location = LOCATION_MZONE; + hovered_sequence = 5; + } + else { + hovered_controler = 0; + hovered_location = LOCATION_MZONE; + hovered_sequence = 6; + } + } + else { + hovered_controler = 0; + hovered_location = LOCATION_MZONE; + hovered_sequence = 6; + } + } + } else if(boardy >= matManager.vFieldMzone[1][0][2].Pos.Y && boardy <= matManager.vFieldMzone[1][0][0].Pos.Y) { hovered_controler = 1; hovered_location = LOCATION_MZONE; - hovered_sequence = 4 - (int)((boardx - 1.2) / 1.1); - if(hovered_sequence < 0) - hovered_sequence = 0; - } else if(boardy >= matManager.vFields[123].Pos.Y && boardy < matManager.vFields[104].Pos.Y) { + hovered_sequence = 4 - sequence; + } else if(boardy >= matManager.vFieldSzone[1][0][rule][2].Pos.Y && boardy < matManager.vFieldSzone[1][0][rule][0].Pos.Y) { hovered_controler = 1; hovered_location = LOCATION_SZONE; - hovered_sequence = 4 - (int)((boardx - 1.2) / 1.1); - if(hovered_sequence < 0) - hovered_sequence = 0; + hovered_sequence = 4 - sequence; } } -} + } } void ClientField::ShowMenu(int flag, int x, int y) { if(!flag) { - mainGame->wCmdMenu->setVisible(false); + HideMenu(); return; } + menu_card = clicked_card; int height = 1; + int offset = mainGame->gameConf.resize_popup_menu ? ((mainGame->yScale >= 0.666) ? 21 * mainGame->yScale : 14) : 21; if(flag & COMMAND_ACTIVATE) { mainGame->btnActivate->setVisible(true); - mainGame->btnActivate->setRelativePosition(position2di(1, height)); - height += 21; + mainGame->btnActivate->setRelativePosition(irr::core::vector2di(1, height)); + height += offset; } else mainGame->btnActivate->setVisible(false); if(flag & COMMAND_SUMMON) { mainGame->btnSummon->setVisible(true); - mainGame->btnSummon->setRelativePosition(position2di(1, height)); - height += 21; + mainGame->btnSummon->setRelativePosition(irr::core::vector2di(1, height)); + height += offset; } else mainGame->btnSummon->setVisible(false); if(flag & COMMAND_SPSUMMON) { mainGame->btnSPSummon->setVisible(true); - mainGame->btnSPSummon->setRelativePosition(position2di(1, height)); - height += 21; + mainGame->btnSPSummon->setRelativePosition(irr::core::vector2di(1, height)); + height += offset; } else mainGame->btnSPSummon->setVisible(false); if(flag & COMMAND_MSET) { mainGame->btnMSet->setVisible(true); - mainGame->btnMSet->setRelativePosition(position2di(1, height)); - height += 21; + mainGame->btnMSet->setRelativePosition(irr::core::vector2di(1, height)); + height += offset; } else mainGame->btnMSet->setVisible(false); if(flag & COMMAND_SSET) { if(!(clicked_card->type & TYPE_MONSTER)) @@ -1826,8 +2339,8 @@ void ClientField::ShowMenu(int flag, int x, int y) { else mainGame->btnSSet->setText(dataManager.GetSysString(1159)); mainGame->btnSSet->setVisible(true); - mainGame->btnSSet->setRelativePosition(position2di(1, height)); - height += 21; + mainGame->btnSSet->setRelativePosition(irr::core::vector2di(1, height)); + height += offset; } else mainGame->btnSSet->setVisible(false); if(flag & COMMAND_REPOS) { if(clicked_card->position & POS_FACEDOWN) @@ -1837,21 +2350,319 @@ void ClientField::ShowMenu(int flag, int x, int y) { else mainGame->btnRepos->setText(dataManager.GetSysString(1156)); mainGame->btnRepos->setVisible(true); - mainGame->btnRepos->setRelativePosition(position2di(1, height)); - height += 21; + mainGame->btnRepos->setRelativePosition(irr::core::vector2di(1, height)); + height += offset; } else mainGame->btnRepos->setVisible(false); if(flag & COMMAND_ATTACK) { mainGame->btnAttack->setVisible(true); - mainGame->btnAttack->setRelativePosition(position2di(1, height)); - height += 21; + mainGame->btnAttack->setRelativePosition(irr::core::vector2di(1, height)); + height += offset; } else mainGame->btnAttack->setVisible(false); if(flag & COMMAND_LIST) { mainGame->btnShowList->setVisible(true); - mainGame->btnShowList->setRelativePosition(position2di(1, height)); - height += 21; + mainGame->btnShowList->setRelativePosition(irr::core::vector2di(1, height)); + height += offset; } else mainGame->btnShowList->setVisible(false); + if(flag & COMMAND_OPERATION) { + mainGame->btnOperation->setVisible(true); + mainGame->btnOperation->setRelativePosition(irr::core::vector2di(1, height)); + height += offset; + } else mainGame->btnOperation->setVisible(false); + if(flag & COMMAND_RESET) { + mainGame->btnReset->setVisible(true); + mainGame->btnReset->setRelativePosition(irr::core::vector2di(1, height)); + height += offset; + } else mainGame->btnReset->setVisible(false); panel = mainGame->wCmdMenu; mainGame->wCmdMenu->setVisible(true); - mainGame->wCmdMenu->setRelativePosition(irr::core::recti(x - 20 , y - 20 - height, x + 80, y - 20)); + mainGame->btnBP->setEnabled(false); + mainGame->btnM2->setEnabled(false); + mainGame->btnEP->setEnabled(false); + if(mainGame->gameConf.resize_popup_menu) + mainGame->wCmdMenu->setRelativePosition(mainGame->Resize(x - 20, y - 20, x + 80, y - 20, 0, -height, 0, 0)); + else + mainGame->wCmdMenu->setRelativePosition(mainGame->Resize(x, y, x, y, -20, -(20 + height), 80, -20)); +} +void ClientField::HideMenu() { + mainGame->wCmdMenu->setVisible(false); + mainGame->btnBP->setEnabled(true); + mainGame->btnM2->setEnabled(true); + mainGame->btnEP->setEnabled(true); +} +void ClientField::UpdateChainButtons() { + if(mainGame->btnChainAlways->isVisible()) { + mainGame->btnChainIgnore->setPressed(mainGame->ignore_chain); + mainGame->btnChainAlways->setPressed(mainGame->always_chain); + mainGame->btnChainWhenAvail->setPressed(mainGame->chain_when_avail); + } +} +void ClientField::ShowCancelOrFinishButton(int buttonOp) { + if (!mainGame->gameConf.hide_hint_button && !mainGame->dInfo.isReplay) { + switch (buttonOp) { + case 1: + mainGame->btnCancelOrFinish->setText(dataManager.GetSysString(1295)); + mainGame->btnCancelOrFinish->setVisible(true); + break; + case 2: + mainGame->btnCancelOrFinish->setText(dataManager.GetSysString(1296)); + mainGame->btnCancelOrFinish->setVisible(true); + break; + case 0: + default: + mainGame->btnCancelOrFinish->setVisible(false); + break; + } + } else { + mainGame->btnCancelOrFinish->setVisible(false); + } +} +void ClientField::SetShowMark(ClientCard* pcard, bool enable) { + if(pcard->equipTarget) + pcard->equipTarget->is_showequip = enable; + for (auto& card : pcard->equipped) + card->is_showequip = enable; + for (auto& card : pcard->cardTarget) + card->is_showtarget = enable; + for (auto& card : pcard->ownerTarget) + card->is_showtarget = enable; + for (auto& ch : chains) { + if (pcard == ch.chain_card) { + for (auto& tg : ch.target) + tg->is_showchaintarget = enable; + } + if (ch.target.find(pcard) != ch.target.end()) + ch.chain_card->is_showchaintarget = enable; + } +} +void ClientField::ShowCardInfoInList(ClientCard* pcard, irr::gui::IGUIElement* element, irr::gui::IGUIElement* parent) { + std::wstring str(L""); + wchar_t formatBuffer[2048]; + if(pcard->code) { + str.append(dataManager.GetName(pcard->code)); + } + if (pcard->location != LOCATION_DECK) { + if (pcard->overlayTarget) { + myswprintf(formatBuffer, dataManager.GetSysString(225), dataManager.GetName(pcard->overlayTarget->code), pcard->overlayTarget->sequence + 1); + str.append(L"\n").append(formatBuffer); + } + if ((pcard->status & STATUS_PROC_COMPLETE) + && (pcard->type & (TYPE_RITUAL | TYPE_FUSION | TYPE_SYNCHRO | TYPE_XYZ | TYPE_LINK | TYPE_SPSUMMON))) + str.append(L"\n").append(dataManager.GetSysString(224)); + for (auto iter = pcard->desc_hints.begin(); iter != pcard->desc_hints.end(); ++iter) { + myswprintf(formatBuffer, L"\n*%ls", dataManager.GetDesc(iter->first)); + str.append(formatBuffer); + } + for (size_t i = 0; i < chains.size(); ++i) { + const auto& chit = chains[i]; + if (pcard == chit.chain_card) { + myswprintf(formatBuffer, dataManager.GetSysString(216), i + 1); + str.append(L"\n").append(formatBuffer); + } + if (chit.target.find(pcard) != chit.target.end()) { + myswprintf(formatBuffer, dataManager.GetSysString(217), i + 1, dataManager.GetName(chit.chain_card->code)); + str.append(L"\n").append(formatBuffer); + } + } + } + if(str.length() > 0) { + parent->addChild(mainGame->stCardListTip); + irr::core::rect ePos = element->getRelativePosition(); + irr::s32 x = (ePos.UpperLeftCorner.X + ePos.LowerRightCorner.X) / 2; + irr::s32 y = ePos.LowerRightCorner.Y; + mainGame->SetStaticText(mainGame->stCardListTip, 320, mainGame->guiFont, str.c_str()); + irr::core::dimension2d dTip = mainGame->guiFont->getDimension(mainGame->stCardListTip->getText()) + irr::core::dimension2d(10, 10); + irr::s32 w = dTip.Width / 2; + if(x - w < 10) + x = w + 10; + if(x + w > 670) + x = 670 - w; + mainGame->stCardListTip->setRelativePosition(irr::core::recti(x - w, y - 10, x + w, y - 10 + dTip.Height)); + mainGame->stCardListTip->setVisible(true); + } +} +void ClientField::SetResponseSelectedCards() const { + unsigned char respbuf[SIZE_RETURN_VALUE]{}; + int len = (int)selected_cards.size(); + if (len > UINT8_MAX) + len = UINT8_MAX; + respbuf[0] = (unsigned char)len; + for (int i = 0; i < len; ++i) + respbuf[i + 1] = selected_cards[i]->select_seq; + DuelClient::SetResponseB(respbuf, len + 1); +} +void ClientField::SetResponseSelectedOption() const { + if(mainGame->dInfo.curMsg == MSG_SELECT_OPTION) { + DuelClient::SetResponseI(selected_option); + } else { + int index = select_options_index[selected_option]; + if(mainGame->dInfo.curMsg == MSG_SELECT_IDLECMD) { + DuelClient::SetResponseI((index << 16) + 5); + } else if(mainGame->dInfo.curMsg == MSG_SELECT_BATTLECMD) { + DuelClient::SetResponseI(index << 16); + } else { + DuelClient::SetResponseI(index); + } + } + mainGame->HideElement(mainGame->wOptions, true); +} +void ClientField::CancelOrFinish() { + switch(mainGame->dInfo.curMsg) { + case MSG_WAITING: { + if(mainGame->wCardSelect->isVisible()) { + mainGame->HideElement(mainGame->wCardSelect); + ShowCancelOrFinishButton(0); + } + break; + } + case MSG_SELECT_BATTLECMD: { + if(mainGame->wCardSelect->isVisible()) { + mainGame->HideElement(mainGame->wCardSelect); + ShowCancelOrFinishButton(0); + } + if(mainGame->wOptions->isVisible()) { + mainGame->HideElement(mainGame->wOptions); + ShowCancelOrFinishButton(0); + } + break; + } + case MSG_SELECT_IDLECMD: { + if(mainGame->wCardSelect->isVisible()) { + mainGame->HideElement(mainGame->wCardSelect); + ShowCancelOrFinishButton(0); + } + if(mainGame->wOptions->isVisible()) { + mainGame->HideElement(mainGame->wOptions); + ShowCancelOrFinishButton(0); + } + break; + } + case MSG_SELECT_YESNO: + case MSG_SELECT_EFFECTYN: { + if(highlighting_card) + highlighting_card->is_highlighting = false; + highlighting_card = 0; + DuelClient::SetResponseI(0); + mainGame->HideElement(mainGame->wQuery, true); + break; + } + case MSG_SELECT_CARD: { + if(selected_cards.size() == 0) { + if(select_cancelable) { + DuelClient::SetResponseI(-1); + ShowCancelOrFinishButton(0); + if(mainGame->wCardSelect->isVisible()) + mainGame->HideElement(mainGame->wCardSelect, true); + else + DuelClient::SendResponse(); + } + } + if(mainGame->wQuery->isVisible()) { + SetResponseSelectedCards(); + ShowCancelOrFinishButton(0); + mainGame->HideElement(mainGame->wQuery, true); + break; + } + if(select_ready) { + SetResponseSelectedCards(); + ShowCancelOrFinishButton(0); + if(mainGame->wCardSelect->isVisible()) + mainGame->HideElement(mainGame->wCardSelect, true); + else + DuelClient::SendResponse(); + } + break; + } + case MSG_SELECT_UNSELECT_CARD: { + if (select_cancelable) { + DuelClient::SetResponseI(-1); + ShowCancelOrFinishButton(0); + if (mainGame->wCardSelect->isVisible()) + mainGame->HideElement(mainGame->wCardSelect, true); + else + DuelClient::SendResponse(); + } + break; + } + case MSG_SELECT_TRIBUTE: { + if(selected_cards.size() == 0) { + if(select_cancelable) { + DuelClient::SetResponseI(-1); + ShowCancelOrFinishButton(0); + if(mainGame->wCardSelect->isVisible()) + mainGame->HideElement(mainGame->wCardSelect, true); + else + DuelClient::SendResponse(); + } + break; + } + if(mainGame->wQuery->isVisible()) { + SetResponseSelectedCards(); + ShowCancelOrFinishButton(0); + mainGame->HideElement(mainGame->wQuery, true); + break; + } + if(select_ready) { + SetResponseSelectedCards(); + ShowCancelOrFinishButton(0); + DuelClient::SendResponse(); + } + break; + } + case MSG_SELECT_SUM: { + if (select_ready) { + SetResponseSelectedCards(); + ShowCancelOrFinishButton(0); + + if(mainGame->wCardSelect->isVisible()) + mainGame->HideElement(mainGame->wCardSelect, true); + else + DuelClient::SendResponse(); + } + break; + } + case MSG_SELECT_CHAIN: { + if(chain_forced) + break; + if(mainGame->wCardSelect->isVisible()) { + mainGame->HideElement(mainGame->wCardSelect); + break; + } + if(mainGame->wQuery->isVisible()) { + DuelClient::SetResponseI(-1); + ShowCancelOrFinishButton(0); + mainGame->HideElement(mainGame->wQuery, true); + } else { + mainGame->PopupElement(mainGame->wQuery); + ShowCancelOrFinishButton(0); + } + if(mainGame->wOptions->isVisible()) { + DuelClient::SetResponseI(-1); + ShowCancelOrFinishButton(0); + mainGame->HideElement(mainGame->wOptions); + } + break; + } + case MSG_SORT_CARD: { + if(mainGame->wCardSelect->isVisible()) { + DuelClient::SetResponseI(-1); + mainGame->HideElement(mainGame->wCardSelect, true); + sort_list.clear(); + } + break; + } + case MSG_SELECT_PLACE: { + if(select_cancelable) { + unsigned char respbuf[3]; + respbuf[0] = mainGame->LocalPlayer(0); + respbuf[1] = 0; + respbuf[2] = 0; + mainGame->dField.selectable_field = 0; + DuelClient::SetResponseB(respbuf, 3); + DuelClient::SendResponse(); + ShowCancelOrFinishButton(0); + } + break; + } + } } } diff --git a/gframe/event_handler.h b/gframe/event_handler.h index 34085fe8c3..53c2d46820 100644 --- a/gframe/event_handler.h +++ b/gframe/event_handler.h @@ -5,23 +5,4 @@ #include "game.h" #include "client_card.h" -namespace ygo { - -class EventHandler : public irr::IEventReceiver { -public: - virtual bool OnEvent(const irr::SEvent& event); - void GetHoverField(int x, int y); - void ShowMenu(int flag, int x, int y); - - irr::gui::IGUIElement* panel; - int hovered_controler; - int hovered_location; - int hovered_sequence; - ClientCard* hovered_card; - ClientCard* clicked_card; - wchar_t formatBuffer[256]; -}; - -} - #endif //EVENT_HANDLER_H diff --git a/gframe/game.cpp b/gframe/game.cpp index 9e499813e6..3e298ba9aa 100644 --- a/gframe/game.cpp +++ b/gframe/game.cpp @@ -1,545 +1,965 @@ #include "config.h" #include "game.h" +#include "myfilesystem.h" #include "image_manager.h" #include "data_manager.h" #include "deck_manager.h" +#include "sound_manager.h" #include "replay.h" #include "materials.h" #include "duelclient.h" #include "netserver.h" #include "single_mode.h" - -#ifdef _WIN32 -#include -#else -#include -#include -#endif - -const unsigned short PRO_VERSION = 0x1336; +#include namespace ygo { Game* mainGame; +void DuelInfo::Clear() { + isStarted = false; + isInDuel = false; + isFinished = false; + isReplay = false; + isReplaySkiping = false; + isFirst = false; + isTag = false; + isSingleMode = false; + is_shuffling = false; + tag_player[0] = false; + tag_player[1] = false; + isReplaySwapped = false; + lp[0] = 0; + lp[1] = 0; + start_lp = 0; + duel_rule = 0; + turn = 0; + curMsg = 0; + hostname[0] = 0; + clientname[0] = 0; + hostname_tag[0] = 0; + clientname_tag[0] = 0; + strLP[0][0] = 0; + strLP[1][0] = 0; + player_type = 0; + time_player = 0; + time_limit = 0; + time_left[0] = 0; + time_left[1] = 0; +} + bool Game::Initialize() { - srand(time(0)); LoadConfig(); - irr::SIrrlichtCreationParameters params = irr::SIrrlichtCreationParameters(); + irr::SIrrlichtCreationParameters params{}; params.AntiAlias = gameConf.antialias; if(gameConf.use_d3d) params.DriverType = irr::video::EDT_DIRECT3D9; else params.DriverType = irr::video::EDT_OPENGL; - params.WindowSize = irr::core::dimension2d(1024, 640); + params.WindowSize = irr::core::dimension2d(gameConf.window_width, gameConf.window_height); device = irr::createDeviceEx(params); - if(!device) + if(!device) { + ErrorLog("Failed to create Irrlicht Engine device!"); return false; - linePattern = 0x0f0f; - waitFrame = 0; - signalFrame = 0; - showcard = 0; - is_attacking = false; - lpframe = 0; - lpcstring = 0; - always_chain = false; - ignore_chain = false; - is_building = false; - memset(&dInfo, 0, sizeof(DuelInfo)); - memset(chatTiming, 0, sizeof(chatTiming)); + } +#ifndef _DEBUG + device->getLogger()->setLogLevel(irr::ELOG_LEVEL::ELL_ERROR); +#endif deckManager.LoadLFList(); driver = device->getVideoDriver(); driver->setTextureCreationFlag(irr::video::ETCF_CREATE_MIP_MAPS, false); driver->setTextureCreationFlag(irr::video::ETCF_OPTIMIZED_FOR_QUALITY, true); imageManager.SetDevice(device); - if(!imageManager.Initial()) + if(!imageManager.Initial()) { + ErrorLog("Failed to load textures!"); return false; - if(!dataManager.LoadDB("cards.cdb")) + } + dataManager.FileSystem = device->getFileSystem(); + if(!dataManager.LoadDB(L"cards.cdb")) { + ErrorLog("Failed to load card database (cards.cdb)!"); return false; - if(!dataManager.LoadStrings("strings.conf")) + } + if(!dataManager.LoadStrings("strings.conf")) { + ErrorLog("Failed to load strings!"); return false; -#ifdef _WIN32 - char fpath[1000]; - WIN32_FIND_DATAW fdataw; - HANDLE fh = FindFirstFileW(L"./expansions/*.cdb", &fdataw); - if(fh != INVALID_HANDLE_VALUE) { - do { - if(!(fdataw.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)) { - sprintf(fpath, "./expansions/%ls", fdataw.cFileName); - dataManager.LoadDB(fpath); - } - } while(FindNextFileW(fh, &fdataw)); - FindClose(fh); } -#else - DIR * dir; - struct dirent * dirp; - const char *foldername = "./expansions/"; - if((dir = opendir(foldername)) != NULL) { - while((dirp = readdir(dir)) != NULL) { - size_t len = strlen(dirp->d_name); - if(len < 5 || strcasecmp(dirp->d_name + len - 4, ".cdb") != 0) - continue; - char *filepath = (char *)malloc(sizeof(char)*(len + strlen(foldername))); - strncpy(filepath, foldername, strlen(foldername)+1); - strncat(filepath, dirp->d_name, len); - std::cout << "Found file " << filepath << std::endl; - if (!dataManager.LoadDB(filepath)) - std::cout << "Error loading file" << std::endl; - free(filepath); - } - closedir(dir); - } -#endif + LoadExpansions(); env = device->getGUIEnvironment(); numFont = irr::gui::CGUITTFont::createTTFont(env, gameConf.numfont, 16); + if(!numFont) { + const wchar_t* numFontPaths[] = { + L"./fonts/numFont.ttf", + L"./fonts/numFont.ttc", + L"./fonts/numFont.otf", + L"C:/Windows/Fonts/arialbd.ttf", + L"/usr/share/fonts/truetype/DroidSansFallbackFull.ttf", + L"/usr/share/fonts/opentype/noto/NotoSansCJK-Bold.ttc", + L"/usr/share/fonts/google-noto-cjk/NotoSansCJK-Bold.ttc", + L"/usr/share/fonts/noto-cjk/NotoSansCJK-Bold.ttc", + L"/System/Library/Fonts/SFNSTextCondensed-Bold.otf", + L"/System/Library/Fonts/SFNS.ttf", + }; + for(const wchar_t* path : numFontPaths) { + BufferIO::CopyWideString(path, gameConf.numfont); + numFont = irr::gui::CGUITTFont::createTTFont(env, gameConf.numfont, 16); + if(numFont) + break; + } + } + textFont = irr::gui::CGUITTFont::createTTFont(env, gameConf.textfont, gameConf.textfontsize); + if(!textFont) { + const wchar_t* textFontPaths[] = { + L"./fonts/textFont.ttf", + L"./fonts/textFont.ttc", + L"./fonts/textFont.otf", + L"C:/Windows/Fonts/msyh.ttc", + L"C:/Windows/Fonts/msyh.ttf", + L"C:/Windows/Fonts/simsun.ttc", + L"C:/Windows/Fonts/YuGothM.ttc", + L"C:/Windows/Fonts/meiryo.ttc", + L"C:/Windows/Fonts/msgothic.ttc", + L"/usr/share/fonts/truetype/DroidSansFallbackFull.ttf", + L"/usr/share/fonts/opentype/noto/NotoSansCJK-Regular.ttc", + L"/usr/share/fonts/google-noto-cjk/NotoSansCJK-Regular.ttc", + L"/usr/share/fonts/noto-cjk/NotoSansCJK-Regular.ttc", + L"/System/Library/Fonts/PingFang.ttc", + L"/System/Library/Fonts/STHeiti Medium.ttc", + }; + for(const wchar_t* path : textFontPaths) { + BufferIO::CopyWideString(path, gameConf.textfont); + textFont = irr::gui::CGUITTFont::createTTFont(env, gameConf.textfont, gameConf.textfontsize); + if(textFont) + break; + } + } + if(!numFont || !textFont) { + wchar_t fpath[1024]{}; + fpath[0] = 0; + FileSystem::TraversalDir(L"./fonts", [&fpath](const wchar_t* name, bool isdir) { + if(!isdir && (IsExtension(name, L".ttf") || IsExtension(name, L".ttc") || IsExtension(name, L".otf"))) { + myswprintf(fpath, L"./fonts/%ls", name); + } + }); + if(fpath[0] == 0) { + ErrorLog("No fonts found! Please place appropriate font file in the fonts directory, or edit system.conf manually."); + return false; + } + if(!numFont) { + BufferIO::CopyWideString(fpath, gameConf.numfont); + numFont = irr::gui::CGUITTFont::createTTFont(env, gameConf.numfont, 16); + } + if(!textFont) { + BufferIO::CopyWideString(fpath, gameConf.textfont); + textFont = irr::gui::CGUITTFont::createTTFont(env, gameConf.textfont, gameConf.textfontsize); + } + } + if(!numFont || !textFont) { + ErrorLog("Failed to load font(s)!"); + return false; + } adFont = irr::gui::CGUITTFont::createTTFont(env, gameConf.numfont, 12); lpcFont = irr::gui::CGUITTFont::createTTFont(env, gameConf.numfont, 48); guiFont = irr::gui::CGUITTFont::createTTFont(env, gameConf.textfont, gameConf.textfontsize); - textFont = guiFont; smgr = device->getSceneManager(); - device->setWindowCaption(L"[---]"); - device->setResizable(false); + device->setWindowCaption(L"YGOPro"); + device->setResizable(true); + if(gameConf.window_maximized) + device->maximizeWindow(); +#ifdef _WIN32 + irr::video::SExposedVideoData exposedData = driver->getExposedVideoData(); + if(gameConf.use_d3d) + hWnd = reinterpret_cast(exposedData.D3D9.HWnd); + else + hWnd = reinterpret_cast(exposedData.OpenGLWin32.HWnd); +#endif + SetWindowsIcon(); //main menu wchar_t strbuf[256]; - myswprintf(strbuf, L"YGOPro Version:%X.0%X.%X", PRO_VERSION >> 12, (PRO_VERSION >> 4) & 0xff, PRO_VERSION & 0xf); - wMainMenu = env->addWindow(rect(370, 200, 650, 415), false, strbuf); + myswprintf(strbuf, L"YGOPro Version:%X.0%X.%X", (PRO_VERSION & 0xf000U) >> 12, (PRO_VERSION & 0x0ff0U) >> 4, PRO_VERSION & 0x000fU); + wMainMenu = env->addWindow(irr::core::rect(370, 200, 650, 415), false, strbuf); wMainMenu->getCloseButton()->setVisible(false); - btnLanMode = env->addButton(rect(10, 30, 270, 60), wMainMenu, BUTTON_LAN_MODE, dataManager.GetSysString(1200)); - btnServerMode = env->addButton(rect(10, 65, 270, 95), wMainMenu, BUTTON_SINGLE_MODE, dataManager.GetSysString(1201)); - btnReplayMode = env->addButton(rect(10, 100, 270, 130), wMainMenu, BUTTON_REPLAY_MODE, dataManager.GetSysString(1202)); -// btnTestMode = env->addButton(rect(10, 135, 270, 165), wMainMenu, BUTTON_TEST_MODE, dataManager.GetSysString(1203)); - btnDeckEdit = env->addButton(rect(10, 135, 270, 165), wMainMenu, BUTTON_DECK_EDIT, dataManager.GetSysString(1204)); - btnModeExit = env->addButton(rect(10, 170, 270, 200), wMainMenu, BUTTON_MODE_EXIT, dataManager.GetSysString(1210)); + btnLanMode = env->addButton(irr::core::rect(10, 30, 270, 60), wMainMenu, BUTTON_LAN_MODE, dataManager.GetSysString(1200)); + btnSingleMode = env->addButton(irr::core::rect(10, 65, 270, 95), wMainMenu, BUTTON_SINGLE_MODE, dataManager.GetSysString(1201)); + btnReplayMode = env->addButton(irr::core::rect(10, 100, 270, 130), wMainMenu, BUTTON_REPLAY_MODE, dataManager.GetSysString(1202)); +// btnTestMode = env->addButton(irr::core::rect(10, 135, 270, 165), wMainMenu, BUTTON_TEST_MODE, dataManager.GetSysString(1203)); + btnDeckEdit = env->addButton(irr::core::rect(10, 135, 270, 165), wMainMenu, BUTTON_DECK_EDIT, dataManager.GetSysString(1204)); + btnModeExit = env->addButton(irr::core::rect(10, 170, 270, 200), wMainMenu, BUTTON_MODE_EXIT, dataManager.GetSysString(1210)); //lan mode - wLanWindow = env->addWindow(rect(220, 100, 800, 520), false, dataManager.GetSysString(1200)); + wLanWindow = env->addWindow(irr::core::rect(220, 100, 800, 520), false, dataManager.GetSysString(1200)); wLanWindow->getCloseButton()->setVisible(false); wLanWindow->setVisible(false); - env->addStaticText(dataManager.GetSysString(1220), rect(10, 30, 220, 50), false, false, wLanWindow); - ebNickName = env->addEditBox(gameConf.nickname, rect(110, 25, 450, 50), true, wLanWindow); + env->addStaticText(dataManager.GetSysString(1220), irr::core::rect(10, 30, 220, 50), false, false, wLanWindow); + ebNickName = env->addEditBox(gameConf.nickname, irr::core::rect(110, 25, 450, 50), true, wLanWindow); ebNickName->setTextAlignment(irr::gui::EGUIA_UPPERLEFT, irr::gui::EGUIA_CENTER); - lstHostList = env->addListBox(rect(10, 60, 570, 320), wLanWindow, LISTBOX_LAN_HOST, true); + lstHostList = env->addListBox(irr::core::rect(10, 60, 570, 320), wLanWindow, LISTBOX_LAN_HOST, true); lstHostList->setItemHeight(18); - btnLanRefresh = env->addButton(rect(240, 325, 340, 350), wLanWindow, BUTTON_LAN_REFRESH, dataManager.GetSysString(1217)); - env->addStaticText(dataManager.GetSysString(1221), rect(10, 360, 220, 380), false, false, wLanWindow); - ebJoinIP = env->addEditBox(gameConf.lastip, rect(110, 355, 250, 380), true, wLanWindow); - ebJoinIP->setTextAlignment(irr::gui::EGUIA_CENTER, irr::gui::EGUIA_CENTER); - ebJoinPort = env->addEditBox(gameConf.lastport, rect(260, 355, 320, 380), true, wLanWindow); + btnLanRefresh = env->addButton(irr::core::rect(240, 325, 340, 350), wLanWindow, BUTTON_LAN_REFRESH, dataManager.GetSysString(1217)); + env->addStaticText(dataManager.GetSysString(1221), irr::core::rect(10, 360, 220, 380), false, false, wLanWindow); + ebJoinHost = env->addEditBox(gameConf.lasthost, irr::core::rect(110, 355, 350, 380), true, wLanWindow); + ebJoinHost->setTextAlignment(irr::gui::EGUIA_CENTER, irr::gui::EGUIA_CENTER); + ebJoinPort = env->addEditBox(gameConf.lastport, irr::core::rect(360, 355, 420, 380), true, wLanWindow); ebJoinPort->setTextAlignment(irr::gui::EGUIA_CENTER, irr::gui::EGUIA_CENTER); - env->addStaticText(dataManager.GetSysString(1222), rect(10, 390, 220, 410), false, false, wLanWindow); - ebJoinPass = env->addEditBox(gameConf.roompass, rect(110, 385, 320, 410), true, wLanWindow); + env->addStaticText(dataManager.GetSysString(1222), irr::core::rect(10, 390, 220, 410), false, false, wLanWindow); + ebJoinPass = env->addEditBox(gameConf.roompass, irr::core::rect(110, 385, 420, 410), true, wLanWindow); ebJoinPass->setTextAlignment(irr::gui::EGUIA_CENTER, irr::gui::EGUIA_CENTER); - btnJoinHost = env->addButton(rect(460, 355, 570, 380), wLanWindow, BUTTON_JOIN_HOST, dataManager.GetSysString(1223)); - btnJoinCancel = env->addButton(rect(460, 385, 570, 410), wLanWindow, BUTTON_JOIN_CANCEL, dataManager.GetSysString(1212)); - btnCreateHost = env->addButton(rect(460, 25, 570, 50), wLanWindow, BUTTON_CREATE_HOST, dataManager.GetSysString(1224)); + btnJoinHost = env->addButton(irr::core::rect(460, 355, 570, 380), wLanWindow, BUTTON_JOIN_HOST, dataManager.GetSysString(1223)); + btnJoinCancel = env->addButton(irr::core::rect(460, 385, 570, 410), wLanWindow, BUTTON_JOIN_CANCEL, dataManager.GetSysString(1212)); + btnCreateHost = env->addButton(irr::core::rect(460, 25, 570, 50), wLanWindow, BUTTON_CREATE_HOST, dataManager.GetSysString(1224)); //create host - wCreateHost = env->addWindow(rect(320, 100, 700, 520), false, dataManager.GetSysString(1224)); + wCreateHost = env->addWindow(irr::core::rect(320, 100, 700, 520), false, dataManager.GetSysString(1224)); wCreateHost->getCloseButton()->setVisible(false); wCreateHost->setVisible(false); - env->addStaticText(dataManager.GetSysString(1226), rect(20, 30, 220, 50), false, false, wCreateHost); - cbLFlist = env->addComboBox(rect(140, 25, 300, 50), wCreateHost); + env->addStaticText(dataManager.GetSysString(1226), irr::core::rect(20, 30, 220, 50), false, false, wCreateHost); + cbHostLFlist = env->addComboBox(irr::core::rect(140, 25, 300, 50), wCreateHost); for(unsigned int i = 0; i < deckManager._lfList.size(); ++i) - cbLFlist->addItem(deckManager._lfList[i].listName, deckManager._lfList[i].hash); - env->addStaticText(dataManager.GetSysString(1225), rect(20, 60, 220, 80), false, false, wCreateHost); - cbRule = env->addComboBox(rect(140, 55, 300, 80), wCreateHost); - cbRule->addItem(dataManager.GetSysString(1240)); - cbRule->addItem(dataManager.GetSysString(1241)); - cbRule->addItem(dataManager.GetSysString(1242)); - cbRule->addItem(dataManager.GetSysString(1243)); - env->addStaticText(dataManager.GetSysString(1227), rect(20, 90, 220, 110), false, false, wCreateHost); - cbMatchMode = env->addComboBox(rect(140, 85, 300, 110), wCreateHost); + cbHostLFlist->addItem(deckManager._lfList[i].listName.c_str(), deckManager._lfList[i].hash); + cbHostLFlist->setSelected(gameConf.use_lflist ? gameConf.default_lflist : cbHostLFlist->getItemCount() - 1); + env->addStaticText(dataManager.GetSysString(1225), irr::core::rect(20, 60, 220, 80), false, false, wCreateHost); + cbRule = env->addComboBox(irr::core::rect(140, 55, 300, 80), wCreateHost); + cbRule->setMaxSelectionRows(10); + cbRule->addItem(dataManager.GetSysString(1481)); + cbRule->addItem(dataManager.GetSysString(1482)); + cbRule->addItem(dataManager.GetSysString(1483)); + cbRule->addItem(dataManager.GetSysString(1484)); + cbRule->addItem(dataManager.GetSysString(1485)); + cbRule->addItem(dataManager.GetSysString(1486)); + switch(gameConf.defaultOT) { + case 1: + cbRule->setSelected(0); + break; + case 2: + cbRule->setSelected(1); + break; + case 4: + cbRule->setSelected(3); + break; + case 8: + cbRule->setSelected(2); + break; + default: + cbRule->setSelected(5); + break; + } + env->addStaticText(dataManager.GetSysString(1227), irr::core::rect(20, 90, 220, 110), false, false, wCreateHost); + cbMatchMode = env->addComboBox(irr::core::rect(140, 85, 300, 110), wCreateHost); cbMatchMode->addItem(dataManager.GetSysString(1244)); cbMatchMode->addItem(dataManager.GetSysString(1245)); cbMatchMode->addItem(dataManager.GetSysString(1246)); - env->addStaticText(dataManager.GetSysString(1237), rect(20, 120, 320, 140), false, false, wCreateHost); + env->addStaticText(dataManager.GetSysString(1237), irr::core::rect(20, 120, 320, 140), false, false, wCreateHost); myswprintf(strbuf, L"%d", 180); - ebTimeLimit = env->addEditBox(strbuf, rect(140, 115, 220, 140), true, wCreateHost); + ebTimeLimit = env->addEditBox(strbuf, irr::core::rect(140, 115, 220, 140), true, wCreateHost); ebTimeLimit->setTextAlignment(irr::gui::EGUIA_CENTER, irr::gui::EGUIA_CENTER); - env->addStaticText(dataManager.GetSysString(1228), rect(20, 150, 320, 170), false, false, wCreateHost); - chkEnablePriority = env->addCheckBox(false, rect(20, 180, 360, 200), wCreateHost, -1, dataManager.GetSysString(1236)); - chkNoCheckDeck = env->addCheckBox(false, rect(20, 210, 170, 230), wCreateHost, -1, dataManager.GetSysString(1229)); - chkNoShuffleDeck = env->addCheckBox(false, rect(180, 210, 360, 230), wCreateHost, -1, dataManager.GetSysString(1230)); - env->addStaticText(dataManager.GetSysString(1231), rect(20, 240, 320, 260), false, false, wCreateHost); + env->addStaticText(dataManager.GetSysString(1228), irr::core::rect(20, 150, 320, 170), false, false, wCreateHost); + env->addStaticText(dataManager.GetSysString(1236), irr::core::rect(20, 180, 220, 200), false, false, wCreateHost); + cbDuelRule = env->addComboBox(irr::core::rect(140, 175, 300, 200), wCreateHost); + cbDuelRule->addItem(dataManager.GetSysString(1260)); + cbDuelRule->addItem(dataManager.GetSysString(1261)); + cbDuelRule->addItem(dataManager.GetSysString(1262)); + cbDuelRule->addItem(dataManager.GetSysString(1263)); + cbDuelRule->addItem(dataManager.GetSysString(1264)); + cbDuelRule->setSelected(gameConf.default_rule - 1); + chkNoCheckDeck = env->addCheckBox(false, irr::core::rect(20, 210, 170, 230), wCreateHost, -1, dataManager.GetSysString(1229)); + chkNoShuffleDeck = env->addCheckBox(false, irr::core::rect(180, 210, 360, 230), wCreateHost, -1, dataManager.GetSysString(1230)); + env->addStaticText(dataManager.GetSysString(1231), irr::core::rect(20, 240, 320, 260), false, false, wCreateHost); myswprintf(strbuf, L"%d", 8000); - ebStartLP = env->addEditBox(strbuf, rect(140, 235, 220, 260), true, wCreateHost); + ebStartLP = env->addEditBox(strbuf, irr::core::rect(140, 235, 220, 260), true, wCreateHost); ebStartLP->setTextAlignment(irr::gui::EGUIA_CENTER, irr::gui::EGUIA_CENTER); - env->addStaticText(dataManager.GetSysString(1232), rect(20, 270, 320, 290), false, false, wCreateHost); + env->addStaticText(dataManager.GetSysString(1232), irr::core::rect(20, 270, 320, 290), false, false, wCreateHost); myswprintf(strbuf, L"%d", 5); - ebStartHand = env->addEditBox(strbuf, rect(140, 265, 220, 290), true, wCreateHost); + ebStartHand = env->addEditBox(strbuf, irr::core::rect(140, 265, 220, 290), true, wCreateHost); ebStartHand->setTextAlignment(irr::gui::EGUIA_CENTER, irr::gui::EGUIA_CENTER); - env->addStaticText(dataManager.GetSysString(1233), rect(20, 300, 320, 320), false, false, wCreateHost); + env->addStaticText(dataManager.GetSysString(1233), irr::core::rect(20, 300, 320, 320), false, false, wCreateHost); myswprintf(strbuf, L"%d", 1); - ebDrawCount = env->addEditBox(strbuf, rect(140, 295, 220, 320), true, wCreateHost); + ebDrawCount = env->addEditBox(strbuf, irr::core::rect(140, 295, 220, 320), true, wCreateHost); ebDrawCount->setTextAlignment(irr::gui::EGUIA_CENTER, irr::gui::EGUIA_CENTER); - env->addStaticText(dataManager.GetSysString(1234), rect(10, 360, 220, 380), false, false, wCreateHost); - ebServerName = env->addEditBox(gameConf.gamename, rect(110, 355, 250, 380), true, wCreateHost); + env->addStaticText(dataManager.GetSysString(1234), irr::core::rect(10, 360, 220, 380), false, false, wCreateHost); + ebServerName = env->addEditBox(gameConf.gamename, irr::core::rect(110, 355, 250, 380), true, wCreateHost); ebServerName->setTextAlignment(irr::gui::EGUIA_CENTER, irr::gui::EGUIA_CENTER); - env->addStaticText(dataManager.GetSysString(1235), rect(10, 390, 220, 410), false, false, wCreateHost); - ebServerPass = env->addEditBox(L"", rect(110, 385, 250, 410), true, wCreateHost); + env->addStaticText(dataManager.GetSysString(1235), irr::core::rect(10, 390, 220, 410), false, false, wCreateHost); + ebServerPass = env->addEditBox(L"", irr::core::rect(110, 385, 250, 410), true, wCreateHost); ebServerPass->setTextAlignment(irr::gui::EGUIA_CENTER, irr::gui::EGUIA_CENTER); - btnHostConfirm = env->addButton(rect(260, 355, 370, 380), wCreateHost, BUTTON_HOST_CONFIRM, dataManager.GetSysString(1211)); - btnHostCancel = env->addButton(rect(260, 385, 370, 410), wCreateHost, BUTTON_HOST_CANCEL, dataManager.GetSysString(1212)); + btnHostConfirm = env->addButton(irr::core::rect(260, 355, 370, 380), wCreateHost, BUTTON_HOST_CONFIRM, dataManager.GetSysString(1211)); + btnHostCancel = env->addButton(irr::core::rect(260, 385, 370, 410), wCreateHost, BUTTON_HOST_CANCEL, dataManager.GetSysString(1212)); //host(single) - wHostPrepare = env->addWindow(rect(270, 120, 750, 440), false, dataManager.GetSysString(1250)); + wHostPrepare = env->addWindow(irr::core::rect(270, 120, 750, 440), false, dataManager.GetSysString(1250)); wHostPrepare->getCloseButton()->setVisible(false); wHostPrepare->setVisible(false); - btnHostPrepDuelist = env->addButton(rect(10, 30, 110, 55), wHostPrepare, BUTTON_HP_DUELIST, dataManager.GetSysString(1251)); + btnHostPrepDuelist = env->addButton(irr::core::rect(10, 30, 110, 55), wHostPrepare, BUTTON_HP_DUELIST, dataManager.GetSysString(1251)); for(int i = 0; i < 2; ++i) { - stHostPrepDuelist[i] = env->addStaticText(L"", rect(40, 65 + i * 25, 240, 85 + i * 25), true, false, wHostPrepare); - btnHostPrepKick[i] = env->addButton(rect(10, 65 + i * 25, 30, 85 + i * 25), wHostPrepare, BUTTON_HP_KICK, L"X"); - chkHostPrepReady[i] = env->addCheckBox(false, rect(250, 65 + i * 25, 270, 85 + i * 25), wHostPrepare, CHECKBOX_HP_READY, L""); + stHostPrepDuelist[i] = env->addStaticText(L"", irr::core::rect(40, 65 + i * 25, 240, 85 + i * 25), true, false, wHostPrepare); + btnHostPrepKick[i] = env->addButton(irr::core::rect(10, 65 + i * 25, 30, 85 + i * 25), wHostPrepare, BUTTON_HP_KICK, L"X"); + chkHostPrepReady[i] = env->addCheckBox(false, irr::core::rect(250, 65 + i * 25, 270, 85 + i * 25), wHostPrepare, CHECKBOX_HP_READY, L""); chkHostPrepReady[i]->setEnabled(false); } for(int i = 2; i < 4; ++i) { - stHostPrepDuelist[i] = env->addStaticText(L"", rect(40, 75 + i * 25, 240, 95 + i * 25), true, false, wHostPrepare); - btnHostPrepKick[i] = env->addButton(rect(10, 75 + i * 25, 30, 95 + i * 25), wHostPrepare, BUTTON_HP_KICK, L"X"); - chkHostPrepReady[i] = env->addCheckBox(false, rect(250, 75 + i * 25, 270, 95 + i * 25), wHostPrepare, CHECKBOX_HP_READY, L""); + stHostPrepDuelist[i] = env->addStaticText(L"", irr::core::rect(40, 75 + i * 25, 240, 95 + i * 25), true, false, wHostPrepare); + btnHostPrepKick[i] = env->addButton(irr::core::rect(10, 75 + i * 25, 30, 95 + i * 25), wHostPrepare, BUTTON_HP_KICK, L"X"); + chkHostPrepReady[i] = env->addCheckBox(false, irr::core::rect(250, 75 + i * 25, 270, 95 + i * 25), wHostPrepare, CHECKBOX_HP_READY, L""); chkHostPrepReady[i]->setEnabled(false); } - btnHostPrepOB = env->addButton(rect(10, 180, 110, 205), wHostPrepare, BUTTON_HP_OBSERVER, dataManager.GetSysString(1252)); - myswprintf(dataManager.strBuffer, L"%ls%d", dataManager.GetSysString(1253), 0); - stHostPrepOB = env->addStaticText(dataManager.strBuffer, rect(10, 210, 270, 230), false, false, wHostPrepare); - stHostPrepRule = env->addStaticText(L"", rect(280, 30, 460, 230), false, true, wHostPrepare); - env->addStaticText(dataManager.GetSysString(1254), rect(10, 235, 110, 255), false, false, wHostPrepare); - cbDeckSelect = env->addComboBox(rect(120, 230, 270, 255), wHostPrepare); - btnHostPrepStart = env->addButton(rect(230, 280, 340, 305), wHostPrepare, BUTTON_HP_START, dataManager.GetSysString(1215)); - btnHostPrepCancel = env->addButton(rect(350, 280, 460, 305), wHostPrepare, BUTTON_HP_CANCEL, dataManager.GetSysString(1212)); + btnHostPrepOB = env->addButton(irr::core::rect(10, 180, 110, 205), wHostPrepare, BUTTON_HP_OBSERVER, dataManager.GetSysString(1252)); + myswprintf(strbuf, L"%ls%d", dataManager.GetSysString(1253), 0); + stHostPrepOB = env->addStaticText(strbuf, irr::core::rect(10, 285, 270, 305), false, false, wHostPrepare); + stHostPrepRule = env->addStaticText(L"", irr::core::rect(280, 30, 460, 230), false, true, wHostPrepare); + env->addStaticText(dataManager.GetSysString(1254), irr::core::rect(10, 210, 110, 230), false, false, wHostPrepare); + cbCategorySelect = env->addComboBox(irr::core::rect(10, 230, 138, 255), wHostPrepare, COMBOBOX_HP_CATEGORY); + cbCategorySelect->setMaxSelectionRows(10); + cbDeckSelect = env->addComboBox(irr::core::rect(142, 230, 340, 255), wHostPrepare); + cbDeckSelect->setMaxSelectionRows(10); + btnHostPrepReady = env->addButton(irr::core::rect(170, 180, 270, 205), wHostPrepare, BUTTON_HP_READY, dataManager.GetSysString(1218)); + btnHostPrepNotReady = env->addButton(irr::core::rect(170, 180, 270, 205), wHostPrepare, BUTTON_HP_NOTREADY, dataManager.GetSysString(1219)); + btnHostPrepNotReady->setVisible(false); + btnHostPrepStart = env->addButton(irr::core::rect(230, 280, 340, 305), wHostPrepare, BUTTON_HP_START, dataManager.GetSysString(1215)); + btnHostPrepCancel = env->addButton(irr::core::rect(350, 280, 460, 305), wHostPrepare, BUTTON_HP_CANCEL, dataManager.GetSysString(1210)); //img - wCardImg = env->addStaticText(L"", rect(1, 1, 199, 273), true, false, 0, -1, true); + wCardImg = env->addStaticText(L"", irr::core::rect(1, 1, 1 + CARD_IMG_WIDTH + 20, 1 + CARD_IMG_HEIGHT + 18), true, false, 0, -1, true); wCardImg->setBackgroundColor(0xc0c0c0c0); wCardImg->setVisible(false); - imgCard = env->addImage(rect(9, 9, 187, 262), wCardImg); + imgCard = env->addImage(irr::core::rect(10, 9, 10 + CARD_IMG_WIDTH, 9 + CARD_IMG_HEIGHT), wCardImg); + imgCard->setImage(imageManager.tCover[0]); + showingcode = 0; + imgCard->setScaleImage(true); imgCard->setUseAlphaChannel(true); //phase - wPhase = env->addStaticText(L"", rect(480, 310, 855, 330)); + wPhase = env->addStaticText(L"", irr::core::rect(480, 310, 855, 330)); wPhase->setVisible(false); - btnDP = env->addButton(rect(0, 0, 50, 20), wPhase, -1, L"\xff24\xff30"); - btnDP->setEnabled(false); - btnDP->setPressed(true); - btnDP->setVisible(false); - btnSP = env->addButton(rect(65, 0, 115, 20), wPhase, -1, L"\xff33\xff30"); - btnSP->setEnabled(false); - btnSP->setPressed(true); - btnSP->setVisible(false); - btnM1 = env->addButton(rect(130, 0, 180, 20), wPhase, -1, L"\xff2d\xff11"); - btnM1->setEnabled(false); - btnM1->setPressed(true); - btnM1->setVisible(false); - btnBP = env->addButton(rect(195, 0, 245, 20), wPhase, BUTTON_BP, L"\xff22\xff30"); + btnPhaseStatus = env->addButton(irr::core::rect(0, 0, 50, 20), wPhase, BUTTON_PHASE, L""); + btnPhaseStatus->setIsPushButton(true); + btnPhaseStatus->setPressed(true); + btnPhaseStatus->setVisible(false); + btnBP = env->addButton(irr::core::rect(160, 0, 210, 20), wPhase, BUTTON_BP, L"\xff22\xff30"); btnBP->setVisible(false); - btnM2 = env->addButton(rect(260, 0, 310, 20), wPhase, BUTTON_M2, L"\xff2d\xff12"); + btnM2 = env->addButton(irr::core::rect(160, 0, 210, 20), wPhase, BUTTON_M2, L"\xff2d\xff12"); btnM2->setVisible(false); - btnEP = env->addButton(rect(325, 0, 375, 20), wPhase, BUTTON_EP, L"\xff25\xff30"); + btnEP = env->addButton(irr::core::rect(320, 0, 370, 20), wPhase, BUTTON_EP, L"\xff25\xff30"); btnEP->setVisible(false); - btnShuffle = env->addButton(rect(0, 0, 50, 20), wPhase, BUTTON_CMD_SHUFFLE, dataManager.GetSysString(1307)); - btnShuffle->setVisible(false); //tab - wInfos = env->addTabControl(rect(1, 275, 301, 639), 0, true); + wInfos = env->addTabControl(irr::core::rect(1, 275, 301, 639), 0, true); + wInfos->setTabExtraWidth(16); wInfos->setVisible(false); //info irr::gui::IGUITab* tabInfo = wInfos->addTab(dataManager.GetSysString(1270)); - stName = env->addStaticText(L"", rect(10, 10, 287, 32), true, false, tabInfo, -1, false); + stName = env->addStaticText(L"", irr::core::rect(10, 10, 287, 32), true, false, tabInfo, -1, false); stName->setTextAlignment(irr::gui::EGUIA_CENTER, irr::gui::EGUIA_CENTER); - stInfo = env->addStaticText(L"", rect(15, 37, 296, 60), false, true, tabInfo, -1, false); - stInfo->setOverrideColor(SColor(255, 0, 0, 255)); - stDataInfo = env->addStaticText(L"", rect(15, 60, 296, 83), false, true, tabInfo, -1, false); - stDataInfo->setOverrideColor(SColor(255, 0, 0, 255)); - stText = env->addStaticText(L"", rect(15, 83, 287, 324), false, true, tabInfo, -1, false); - scrCardText = env->addScrollBar(false, rect(267, 83, 287, 324), tabInfo, SCROLL_CARDTEXT); + stInfo = env->addStaticText(L"", irr::core::rect(15, 37, 296, 60), false, true, tabInfo, -1, false); + stInfo->setOverrideColor(irr::video::SColor(255, 0, 0, 255)); + stDataInfo = env->addStaticText(L"", irr::core::rect(15, 60, 296, 83), false, true, tabInfo, -1, false); + stDataInfo->setOverrideColor(irr::video::SColor(255, 0, 0, 255)); + stSetName = env->addStaticText(L"", irr::core::rect(15, 83, 296, 106), false, true, tabInfo, -1, false); + stSetName->setOverrideColor(irr::video::SColor(255, 0, 0, 255)); + stText = env->addStaticText(L"", irr::core::rect(15, 106, 287, 324), false, true, tabInfo, -1, false); + scrCardText = env->addScrollBar(false, irr::core::rect(267, 106, 287, 324), tabInfo, SCROLL_CARDTEXT); scrCardText->setLargeStep(1); scrCardText->setSmallStep(1); scrCardText->setVisible(false); //log - irr::gui::IGUITab* tabLog = wInfos->addTab(dataManager.GetSysString(1271)); - lstLog = env->addListBox(rect(10, 10, 290, 290), tabLog, LISTBOX_LOG, false); + irr::gui::IGUITab* tabLog = wInfos->addTab(dataManager.GetSysString(1271)); + lstLog = env->addListBox(irr::core::rect(10, 10, 290, 290), tabLog, LISTBOX_LOG, false); lstLog->setItemHeight(18); - btnClearLog = env->addButton(rect(160, 300, 260, 325), tabLog, BUTTON_CLEAR_LOG, dataManager.GetSysString(1272)); + btnClearLog = env->addButton(irr::core::rect(160, 300, 260, 325), tabLog, BUTTON_CLEAR_LOG, dataManager.GetSysString(1272)); + //helper + irr::gui::IGUITab* _tabHelper = wInfos->addTab(dataManager.GetSysString(1298)); + _tabHelper->setRelativePosition(irr::core::recti(16, 49, 299, 362)); + tabHelper = env->addWindow(irr::core::recti(0, 0, 250, 300), false, L"", _tabHelper); + tabHelper->setDrawTitlebar(false); + tabHelper->getCloseButton()->setVisible(false); + tabHelper->setDrawBackground(false); + tabHelper->setDraggable(false); + scrTabHelper = env->addScrollBar(false, irr::core::rect(252, 0, 272, 300), _tabHelper, SCROLL_TAB_HELPER); + scrTabHelper->setLargeStep(1); + scrTabHelper->setSmallStep(1); + scrTabHelper->setVisible(false); + int posX = 0; + int posY = 0; + chkMAutoPos = env->addCheckBox(false, irr::core::rect(posX, posY, posX + 260, posY + 25), tabHelper, -1, dataManager.GetSysString(1274)); + chkMAutoPos->setChecked(gameConf.chkMAutoPos != 0); + posY += 30; + chkSTAutoPos = env->addCheckBox(false, irr::core::rect(posX, posY, posX + 260, posY + 25), tabHelper, -1, dataManager.GetSysString(1278)); + chkSTAutoPos->setChecked(gameConf.chkSTAutoPos != 0); + posY += 30; + chkRandomPos = env->addCheckBox(false, irr::core::rect(posX + 20, posY, posX + 20 + 260, posY + 25), tabHelper, -1, dataManager.GetSysString(1275)); + chkRandomPos->setChecked(gameConf.chkRandomPos != 0); + posY += 30; + chkAutoChain = env->addCheckBox(false, irr::core::rect(posX, posY, posX + 260, posY + 25), tabHelper, -1, dataManager.GetSysString(1276)); + chkAutoChain->setChecked(gameConf.chkAutoChain != 0); + posY += 30; + chkWaitChain = env->addCheckBox(false, irr::core::rect(posX, posY, posX + 260, posY + 25), tabHelper, -1, dataManager.GetSysString(1277)); + chkWaitChain->setChecked(gameConf.chkWaitChain != 0); + posY += 30; + chkDefaultShowChain = env->addCheckBox(false, irr::core::rect(posX, posY, posX + 260, posY + 25), tabHelper, -1, dataManager.GetSysString(1354)); + chkDefaultShowChain->setChecked(gameConf.chkDefaultShowChain != 0); + posY += 30; + chkQuickAnimation = env->addCheckBox(false, irr::core::rect(posX, posY, posX + 260, posY + 25), tabHelper, CHECKBOX_QUICK_ANIMATION, dataManager.GetSysString(1299)); + chkQuickAnimation->setChecked(gameConf.quick_animation != 0); + posY += 30; + chkDrawSingleChain = env->addCheckBox(false, irr::core::rect(posX, posY, posX + 260, posY + 25), tabHelper, CHECKBOX_DRAW_SINGLE_CHAIN, dataManager.GetSysString(1287)); + chkDrawSingleChain->setChecked(gameConf.draw_single_chain != 0); + posY += 30; + chkAutoSaveReplay = env->addCheckBox(false, irr::core::rect(posX, posY, posX + 260, posY + 25), tabHelper, -1, dataManager.GetSysString(1366)); + chkAutoSaveReplay->setChecked(gameConf.auto_save_replay != 0); + elmTabHelperLast = chkAutoSaveReplay; //system - irr::gui::IGUITab* tabSystem = wInfos->addTab(dataManager.GetSysString(1273)); - chkAutoPos = env->addCheckBox(false, rect(20, 20, 280, 45), tabSystem, -1, dataManager.GetSysString(1274)); - chkAutoPos->setChecked(true); - chkRandomPos = env->addCheckBox(false, rect(40, 50, 300, 75), tabSystem, -1, dataManager.GetSysString(1275)); - chkAutoChain = env->addCheckBox(false, rect(20, 80, 280, 105), tabSystem, -1, dataManager.GetSysString(1276)); - chkWaitChain = env->addCheckBox(false, rect(20, 110, 280, 135), tabSystem, -1, dataManager.GetSysString(1277)); - chkIgnore1 = env->addCheckBox(false, rect(20, 170, 280, 195), tabSystem, -1, dataManager.GetSysString(1290)); - chkIgnore2 = env->addCheckBox(false, rect(20, 200, 280, 225), tabSystem, -1, dataManager.GetSysString(1291)); - chkIgnore2->setChecked(false); + irr::gui::IGUITab* _tabSystem = wInfos->addTab(dataManager.GetSysString(1273)); + _tabSystem->setRelativePosition(irr::core::recti(16, 49, 299, 362)); + tabSystem = env->addWindow(irr::core::recti(0, 0, 250, 300), false, L"", _tabSystem); + tabSystem->setDrawTitlebar(false); + tabSystem->getCloseButton()->setVisible(false); + tabSystem->setDrawBackground(false); + tabSystem->setDraggable(false); + scrTabSystem = env->addScrollBar(false, irr::core::rect(252, 0, 272, 300), _tabSystem, SCROLL_TAB_SYSTEM); + scrTabSystem->setLargeStep(1); + scrTabSystem->setSmallStep(1); + scrTabSystem->setVisible(false); + posY = 0; + chkIgnore1 = env->addCheckBox(false, irr::core::rect(posX, posY, posX + 260, posY + 25), tabSystem, CHECKBOX_DISABLE_CHAT, dataManager.GetSysString(1290)); + chkIgnore1->setChecked(gameConf.chkIgnore1 != 0); + posY += 30; + chkIgnore2 = env->addCheckBox(false, irr::core::rect(posX, posY, posX + 260, posY + 25), tabSystem, -1, dataManager.GetSysString(1291)); + chkIgnore2->setChecked(gameConf.chkIgnore2 != 0); + posY += 30; + chkHidePlayerName = env->addCheckBox(false, irr::core::rect(posX, posY, posX + 260, posY + 25), tabSystem, CHECKBOX_HIDE_PLAYER_NAME, dataManager.GetSysString(1289)); + chkHidePlayerName->setChecked(gameConf.hide_player_name != 0); + posY += 30; + chkIgnoreDeckChanges = env->addCheckBox(false, irr::core::rect(posX, posY, posX + 260, posY + 25), tabSystem, -1, dataManager.GetSysString(1357)); + chkIgnoreDeckChanges->setChecked(gameConf.chkIgnoreDeckChanges != 0); + posY += 30; + chkAutoSearch = env->addCheckBox(false, irr::core::rect(posX, posY, posX + 260, posY + 25), tabSystem, CHECKBOX_AUTO_SEARCH, dataManager.GetSysString(1358)); + chkAutoSearch->setChecked(gameConf.auto_search_limit >= 0); + posY += 30; + chkMultiKeywords = env->addCheckBox(false, irr::core::rect(posX, posY, posX + 260, posY + 25), tabSystem, CHECKBOX_MULTI_KEYWORDS, dataManager.GetSysString(1378)); + chkMultiKeywords->setChecked(gameConf.search_multiple_keywords > 0); + posY += 30; + chkPreferExpansionScript = env->addCheckBox(false, irr::core::rect(posX, posY, posX + 260, posY + 25), tabSystem, CHECKBOX_PREFER_EXPANSION, dataManager.GetSysString(1379)); + chkPreferExpansionScript->setChecked(gameConf.prefer_expansion_script != 0); + posY += 30; + env->addStaticText(dataManager.GetSysString(1282), irr::core::rect(posX + 23, posY + 3, posX + 110, posY + 28), false, false, tabSystem); + btnWinResizeS = env->addButton(irr::core::rect(posX + 115, posY, posX + 145, posY + 25), tabSystem, BUTTON_WINDOW_RESIZE_S, dataManager.GetSysString(1283)); + btnWinResizeM = env->addButton(irr::core::rect(posX + 150, posY, posX + 180, posY + 25), tabSystem, BUTTON_WINDOW_RESIZE_M, dataManager.GetSysString(1284)); + btnWinResizeL = env->addButton(irr::core::rect(posX + 185, posY, posX + 215, posY + 25), tabSystem, BUTTON_WINDOW_RESIZE_L, dataManager.GetSysString(1285)); + btnWinResizeXL = env->addButton(irr::core::rect(posX + 220, posY, posX + 250, posY + 25), tabSystem, BUTTON_WINDOW_RESIZE_XL, dataManager.GetSysString(1286)); + posY += 30; + chkLFlist = env->addCheckBox(false, irr::core::rect(posX, posY, posX + 110, posY + 25), tabSystem, CHECKBOX_LFLIST, dataManager.GetSysString(1288)); + chkLFlist->setChecked(gameConf.use_lflist); + cbLFlist = env->addComboBox(irr::core::rect(posX + 115, posY, posX + 250, posY + 25), tabSystem, COMBOBOX_LFLIST); + cbLFlist->setMaxSelectionRows(6); + for(unsigned int i = 0; i < deckManager._lfList.size(); ++i) + cbLFlist->addItem(deckManager._lfList[i].listName.c_str()); + cbLFlist->setEnabled(gameConf.use_lflist); + cbLFlist->setSelected(gameConf.use_lflist ? gameConf.default_lflist : cbLFlist->getItemCount() - 1); + posY += 30; + chkEnableSound = env->addCheckBox(gameConf.enable_sound, irr::core::rect(posX, posY, posX + 120, posY + 25), tabSystem, -1, dataManager.GetSysString(1279)); + chkEnableSound->setChecked(gameConf.enable_sound); + scrSoundVolume = env->addScrollBar(true, irr::core::rect(posX + 116, posY + 4, posX + 250, posY + 21), tabSystem, SCROLL_VOLUME); + scrSoundVolume->setMax(100); + scrSoundVolume->setMin(0); + scrSoundVolume->setPos(gameConf.sound_volume * 100); + scrSoundVolume->setLargeStep(1); + scrSoundVolume->setSmallStep(1); + posY += 30; + chkEnableMusic = env->addCheckBox(gameConf.enable_music, irr::core::rect(posX, posY, posX + 120, posY + 25), tabSystem, CHECKBOX_ENABLE_MUSIC, dataManager.GetSysString(1280)); + chkEnableMusic->setChecked(gameConf.enable_music); + scrMusicVolume = env->addScrollBar(true, irr::core::rect(posX + 116, posY + 4, posX + 250, posY + 21), tabSystem, SCROLL_VOLUME); + scrMusicVolume->setMax(100); + scrMusicVolume->setMin(0); + scrMusicVolume->setPos(gameConf.music_volume * 100); + scrMusicVolume->setLargeStep(1); + scrMusicVolume->setSmallStep(1); + posY += 30; + chkMusicMode = env->addCheckBox(false, irr::core::rect(posX, posY, posX + 260, posY + 25), tabSystem, -1, dataManager.GetSysString(1281)); + chkMusicMode->setChecked(gameConf.music_mode != 0); + elmTabSystemLast = chkMusicMode; // - wHand = env->addWindow(rect(500, 450, 825, 605), false, L""); + wHand = env->addWindow(irr::core::rect(500, 450, 825, 605), false, L""); wHand->getCloseButton()->setVisible(false); wHand->setDraggable(false); wHand->setDrawTitlebar(false); wHand->setVisible(false); for(int i = 0; i < 3; ++i) { - btnHand[i] = env->addButton(rect(10 + 105 * i, 10, 105 + 105 * i, 144), wHand, BUTTON_HAND1 + i, L""); + btnHand[i] = env->addButton(irr::core::rect(10 + 105 * i, 10, 105 + 105 * i, 144), wHand, BUTTON_HAND1 + i, L""); btnHand[i]->setImage(imageManager.tHand[i]); } // - wFTSelect = env->addWindow(rect(550, 240, 780, 340), false, L""); + wFTSelect = env->addWindow(irr::core::rect(550, 240, 780, 340), false, L""); wFTSelect->getCloseButton()->setVisible(false); wFTSelect->setVisible(false); - btnFirst = env->addButton(rect(10, 30, 220, 55), wFTSelect, BUTTON_FIRST, dataManager.GetSysString(100)); - btnSecond = env->addButton(rect(10, 60, 220, 85), wFTSelect, BUTTON_SECOND, dataManager.GetSysString(101)); + btnFirst = env->addButton(irr::core::rect(10, 30, 220, 55), wFTSelect, BUTTON_FIRST, dataManager.GetSysString(100)); + btnSecond = env->addButton(irr::core::rect(10, 60, 220, 85), wFTSelect, BUTTON_SECOND, dataManager.GetSysString(101)); //message (310) - wMessage = env->addWindow(rect(490, 200, 840, 340), false, dataManager.GetSysString(1216)); + wMessage = env->addWindow(irr::core::rect(490, 200, 840, 340), false, dataManager.GetSysString(1216)); wMessage->getCloseButton()->setVisible(false); wMessage->setVisible(false); - stMessage = env->addStaticText(L"", rect(20, 20, 350, 100), false, true, wMessage, -1, false); + stMessage = env->addStaticText(L"", irr::core::rect(20, 20, 350, 100), false, true, wMessage, -1, false); stMessage->setTextAlignment(irr::gui::EGUIA_UPPERLEFT, irr::gui::EGUIA_CENTER); - btnMsgOK = env->addButton(rect(130, 105, 220, 130), wMessage, BUTTON_MSG_OK, dataManager.GetSysString(1211)); + btnMsgOK = env->addButton(irr::core::rect(130, 105, 220, 130), wMessage, BUTTON_MSG_OK, dataManager.GetSysString(1211)); //auto fade message (310) - wACMessage = env->addWindow(rect(490, 240, 840, 300), false, L""); + wACMessage = env->addWindow(irr::core::rect(490, 240, 840, 300), false, L""); wACMessage->getCloseButton()->setVisible(false); wACMessage->setVisible(false); wACMessage->setDrawBackground(false); - stACMessage = env->addStaticText(L"", rect(0, 0, 350, 60), true, true, wACMessage, -1, true); + stACMessage = env->addStaticText(L"", irr::core::rect(0, 0, 350, 60), true, true, wACMessage, -1, true); stACMessage->setBackgroundColor(0xc0c0c0ff); stACMessage->setTextAlignment(irr::gui::EGUIA_CENTER, irr::gui::EGUIA_CENTER); //yes/no (310) - wQuery = env->addWindow(rect(490, 200, 840, 340), false, dataManager.GetSysString(560)); + wQuery = env->addWindow(irr::core::rect(490, 200, 840, 340), false, dataManager.GetSysString(560)); wQuery->getCloseButton()->setVisible(false); wQuery->setVisible(false); - stQMessage = env->addStaticText(L"", rect(20, 20, 350, 100), false, true, wQuery, -1, false); + stQMessage = env->addStaticText(L"", irr::core::rect(20, 20, 350, 100), false, true, wQuery, -1, false); stQMessage->setTextAlignment(irr::gui::EGUIA_UPPERLEFT, irr::gui::EGUIA_CENTER); - btnYes = env->addButton(rect(100, 105, 150, 130), wQuery, BUTTON_YES, dataManager.GetSysString(1213)); - btnNo = env->addButton(rect(200, 105, 250, 130), wQuery, BUTTON_NO, dataManager.GetSysString(1214)); + btnYes = env->addButton(irr::core::rect(100, 105, 150, 130), wQuery, BUTTON_YES, dataManager.GetSysString(1213)); + btnNo = env->addButton(irr::core::rect(200, 105, 250, 130), wQuery, BUTTON_NO, dataManager.GetSysString(1214)); + //surrender yes/no (310) + wSurrender = env->addWindow(irr::core::rect(490, 200, 840, 340), false, dataManager.GetSysString(560)); + wSurrender->getCloseButton()->setVisible(false); + wSurrender->setVisible(false); + stSurrenderMessage = env->addStaticText(dataManager.GetSysString(1359), irr::core::rect(20, 20, 350, 100), false, true, wSurrender, -1, false); + stSurrenderMessage->setTextAlignment(irr::gui::EGUIA_UPPERLEFT, irr::gui::EGUIA_CENTER); + btnSurrenderYes = env->addButton(irr::core::rect(100, 105, 150, 130), wSurrender, BUTTON_SURRENDER_YES, dataManager.GetSysString(1213)); + btnSurrenderNo = env->addButton(irr::core::rect(200, 105, 250, 130), wSurrender, BUTTON_SURRENDER_NO, dataManager.GetSysString(1214)); //options (310) - wOptions = env->addWindow(rect(490, 200, 840, 340), false, L""); + wOptions = env->addWindow(irr::core::rect(490, 200, 840, 340), false, L""); wOptions->getCloseButton()->setVisible(false); wOptions->setVisible(false); - stOptions = env->addStaticText(L"", rect(20, 20, 350, 100), false, true, wOptions, -1, false); + stOptions = env->addStaticText(L"", irr::core::rect(20, 20, 350, 100), false, true, wOptions, -1, false); stOptions->setTextAlignment(irr::gui::EGUIA_UPPERLEFT, irr::gui::EGUIA_CENTER); - btnOptionOK = env->addButton(rect(130, 105, 220, 130), wOptions, BUTTON_OPTION_OK, dataManager.GetSysString(1211)); - btnOptionp = env->addButton(rect(20, 105, 60, 130), wOptions, BUTTON_OPTION_PREV, L"<<<"); - btnOptionn = env->addButton(rect(290, 105, 330, 130), wOptions, BUTTON_OPTION_NEXT, L">>>"); + btnOptionOK = env->addButton(irr::core::rect(130, 105, 220, 130), wOptions, BUTTON_OPTION_OK, dataManager.GetSysString(1211)); + btnOptionp = env->addButton(irr::core::rect(20, 105, 60, 130), wOptions, BUTTON_OPTION_PREV, L"<<<"); + btnOptionn = env->addButton(irr::core::rect(290, 105, 330, 130), wOptions, BUTTON_OPTION_NEXT, L">>>"); + for(int i = 0; i < 5; ++i) { + btnOption[i] = env->addButton(irr::core::rect(10, 30 + 40 * i, 340, 60 + 40 * i), wOptions, BUTTON_OPTION_0 + i, L""); + } + scrOption = env->addScrollBar(false, irr::core::rect(350, 30, 365, 220), wOptions, SCROLL_OPTION_SELECT); + scrOption->setLargeStep(1); + scrOption->setSmallStep(1); + scrOption->setMin(0); //pos select - wPosSelect = env->addWindow(rect(340, 200, 935, 410), false, dataManager.GetSysString(561)); + wPosSelect = env->addWindow(irr::core::rect(340, 200, 935, 410), false, dataManager.GetSysString(561)); wPosSelect->getCloseButton()->setVisible(false); wPosSelect->setVisible(false); - btnPSAU = irr::gui::CGUIImageButton::addImageButton(env, rect(10, 45, 150, 185), wPosSelect, BUTTON_POS_AU); - btnPSAU->setImageScale(core::vector2df(0.5, 0.5)); - btnPSAD = irr::gui::CGUIImageButton::addImageButton(env, rect(155, 45, 295, 185), wPosSelect, BUTTON_POS_AD); - btnPSAD->setImageScale(core::vector2df(0.5, 0.5)); - btnPSAD->setImage(imageManager.tCover, rect(0, 0, 177, 254)); - btnPSDU = irr::gui::CGUIImageButton::addImageButton(env, rect(300, 45, 440, 185), wPosSelect, BUTTON_POS_DU); - btnPSDU->setImageScale(core::vector2df(0.5, 0.5)); + btnPSAU = irr::gui::CGUIImageButton::addImageButton(env, irr::core::rect(10, 45, 150, 185), wPosSelect, BUTTON_POS_AU); + btnPSAU->setImageSize(irr::core::dimension2di(CARD_IMG_WIDTH * 0.5f, CARD_IMG_HEIGHT * 0.5f)); + btnPSAD = irr::gui::CGUIImageButton::addImageButton(env, irr::core::rect(155, 45, 295, 185), wPosSelect, BUTTON_POS_AD); + btnPSAD->setImageSize(irr::core::dimension2di(CARD_IMG_WIDTH * 0.5f, CARD_IMG_HEIGHT * 0.5f)); + btnPSAD->setImage(imageManager.tCover[2]); + btnPSDU = irr::gui::CGUIImageButton::addImageButton(env, irr::core::rect(300, 45, 440, 185), wPosSelect, BUTTON_POS_DU); + btnPSDU->setImageSize(irr::core::dimension2di(CARD_IMG_WIDTH * 0.5f, CARD_IMG_HEIGHT * 0.5f)); btnPSDU->setImageRotation(270); - btnPSDD = irr::gui::CGUIImageButton::addImageButton(env, rect(445, 45, 585, 185), wPosSelect, BUTTON_POS_DD); - btnPSDD->setImageScale(core::vector2df(0.5, 0.5)); + btnPSDD = irr::gui::CGUIImageButton::addImageButton(env, irr::core::rect(445, 45, 585, 185), wPosSelect, BUTTON_POS_DD); + btnPSDD->setImageSize(irr::core::dimension2di(CARD_IMG_WIDTH * 0.5f, CARD_IMG_HEIGHT * 0.5f)); btnPSDD->setImageRotation(270); - btnPSDD->setImage(imageManager.tCover, rect(0, 0, 177, 254)); + btnPSDD->setImage(imageManager.tCover[2]); //card select - wCardSelect = env->addWindow(rect(320, 100, 1000, 400), false, L""); + wCardSelect = env->addWindow(irr::core::rect(320, 100, 1000, 400), false, L""); wCardSelect->getCloseButton()->setVisible(false); wCardSelect->setVisible(false); for(int i = 0; i < 5; ++i) { - stCardPos[i] = env->addStaticText(L"", rect(40 + 125 * i, 30, 139 + 125 * i, 50), true, false, wCardSelect, -1, true); + stCardPos[i] = env->addStaticText(L"", irr::core::rect(30 + 125 * i, 30, 150 + 125 * i, 50), true, false, wCardSelect, -1, true); stCardPos[i]->setBackgroundColor(0xffffffff); stCardPos[i]->setTextAlignment(irr::gui::EGUIA_CENTER, irr::gui::EGUIA_CENTER); - btnCardSelect[i] = irr::gui::CGUIImageButton::addImageButton(env, rect(30 + 125 * i, 55, 150 + 125 * i, 225), wCardSelect, BUTTON_CARD_0 + i); - btnCardSelect[i]->setImageScale(core::vector2df(0.6f, 0.6f)); + btnCardSelect[i] = irr::gui::CGUIImageButton::addImageButton(env, irr::core::rect(30 + 125 * i, 55, 150 + 125 * i, 225), wCardSelect, BUTTON_CARD_0 + i); + btnCardSelect[i]->setImageSize(irr::core::dimension2di(CARD_IMG_WIDTH * 0.6f, CARD_IMG_HEIGHT * 0.6f)); } - scrCardList = env->addScrollBar(true, rect(30, 235, 650, 255), wCardSelect, SCROLL_CARD_SELECT); - btnSelectOK = env->addButton(rect(300, 265, 380, 290), wCardSelect, BUTTON_CARD_SEL_OK, dataManager.GetSysString(1211)); + scrCardList = env->addScrollBar(true, irr::core::rect(30, 235, 650, 255), wCardSelect, SCROLL_CARD_SELECT); + btnSelectOK = env->addButton(irr::core::rect(300, 265, 380, 290), wCardSelect, BUTTON_CARD_SEL_OK, dataManager.GetSysString(1211)); //card display - wCardDisplay = env->addWindow(rect(320, 100, 1000, 400), false, L""); + wCardDisplay = env->addWindow(irr::core::rect(320, 100, 1000, 400), false, L""); wCardDisplay->getCloseButton()->setVisible(false); wCardDisplay->setVisible(false); for(int i = 0; i < 5; ++i) { - stDisplayPos[i] = env->addStaticText(L"", rect(40 + 125 * i, 30, 139 + 125 * i, 50), true, false, wCardDisplay, -1, true); + stDisplayPos[i] = env->addStaticText(L"", irr::core::rect(30 + 125 * i, 30, 150 + 125 * i, 50), true, false, wCardDisplay, -1, true); stDisplayPos[i]->setBackgroundColor(0xffffffff); stDisplayPos[i]->setTextAlignment(irr::gui::EGUIA_CENTER, irr::gui::EGUIA_CENTER); - btnCardDisplay[i] = irr::gui::CGUIImageButton::addImageButton(env, rect(30 + 125 * i, 55, 150 + 125 * i, 225), wCardDisplay, BUTTON_DISPLAY_0 + i); - btnCardDisplay[i]->setImageScale(core::vector2df(0.6f, 0.6f)); + btnCardDisplay[i] = irr::gui::CGUIImageButton::addImageButton(env, irr::core::rect(30 + 125 * i, 55, 150 + 125 * i, 225), wCardDisplay, BUTTON_DISPLAY_0 + i); + btnCardDisplay[i]->setImageSize(irr::core::dimension2di(CARD_IMG_WIDTH * 0.6f, CARD_IMG_HEIGHT * 0.6f)); } - scrDisplayList = env->addScrollBar(true, rect(30, 235, 650, 255), wCardDisplay, SCROLL_CARD_DISPLAY); - btnDisplayOK = env->addButton(rect(300, 265, 380, 290), wCardDisplay, BUTTON_CARD_DISP_OK, dataManager.GetSysString(1211)); + scrDisplayList = env->addScrollBar(true, irr::core::rect(30, 235, 650, 255), wCardDisplay, SCROLL_CARD_DISPLAY); + btnDisplayOK = env->addButton(irr::core::rect(300, 265, 380, 290), wCardDisplay, BUTTON_CARD_DISP_OK, dataManager.GetSysString(1211)); //announce number - wANNumber = env->addWindow(rect(550, 200, 780, 295), false, L""); + wANNumber = env->addWindow(irr::core::rect(550, 180, 780, 430), false, L""); wANNumber->getCloseButton()->setVisible(false); wANNumber->setVisible(false); - cbANNumber = env->addComboBox(rect(40, 30, 190, 50), wANNumber, -1); + cbANNumber = env->addComboBox(irr::core::rect(40, 30, 190, 50), wANNumber, -1); cbANNumber->setTextAlignment(irr::gui::EGUIA_CENTER, irr::gui::EGUIA_CENTER); - btnANNumberOK = env->addButton(rect(80, 60, 150, 85), wANNumber, BUTTON_ANNUMBER_OK, dataManager.GetSysString(1211)); + for(int i = 0; i < 12; ++i) { + myswprintf(strbuf, L"%d", i + 1); + btnANNumber[i] = env->addButton(irr::core::rect(20 + 50 * (i % 4), 40 + 50 * (i / 4), 60 + 50 * (i % 4), 80 + 50 * (i / 4)), wANNumber, BUTTON_ANNUMBER_1 + i, strbuf); + btnANNumber[i]->setIsPushButton(true); + } + btnANNumberOK = env->addButton(irr::core::rect(80, 60, 150, 85), wANNumber, BUTTON_ANNUMBER_OK, dataManager.GetSysString(1211)); //announce card - wANCard = env->addWindow(rect(560, 170, 770, 370), false, L""); + wANCard = env->addWindow(irr::core::rect(510, 120, 820, 420), false, L""); wANCard->getCloseButton()->setVisible(false); wANCard->setVisible(false); - ebANCard = env->addEditBox(L"", rect(20, 25, 190, 45), true, wANCard, EDITBOX_ANCARD); + ebANCard = env->addEditBox(L"", irr::core::rect(20, 25, 290, 45), true, wANCard, EDITBOX_ANCARD); ebANCard->setTextAlignment(irr::gui::EGUIA_CENTER, irr::gui::EGUIA_CENTER); - lstANCard = env->addListBox(rect(20, 50, 190, 160), wANCard, LISTBOX_ANCARD, true); - btnANCardOK = env->addButton(rect(60, 165, 150, 190), wANCard, BUTTON_ANCARD_OK, dataManager.GetSysString(1211)); + lstANCard = env->addListBox(irr::core::rect(20, 50, 290, 265), wANCard, LISTBOX_ANCARD, true); + btnANCardOK = env->addButton(irr::core::rect(110, 270, 200, 295), wANCard, BUTTON_ANCARD_OK, dataManager.GetSysString(1211)); //announce attribute - wANAttribute = env->addWindow(rect(500, 200, 830, 285), false, dataManager.GetSysString(562)); + wANAttribute = env->addWindow(irr::core::rect(500, 200, 830, 285), false, dataManager.GetSysString(562)); wANAttribute->getCloseButton()->setVisible(false); wANAttribute->setVisible(false); - for(int filter = 0x1, i = 0; i < 7; filter <<= 1, ++i) - chkAttribute[i] = env->addCheckBox(false, rect(10 + (i % 4) * 80, 25 + (i / 4) * 25, 90 + (i % 4) * 80, 50 + (i / 4) * 25), - wANAttribute, CHECK_ATTRIBUTE, dataManager.FormatAttribute(filter)); - //announce attribute - wANRace = env->addWindow(rect(480, 200, 850, 385), false, dataManager.GetSysString(563)); + for (int i = 0; i < ATTRIBUTES_COUNT; ++i) + chkAttribute[i] = env->addCheckBox(false, irr::core::rect(10 + (i % 4) * 80, 25 + (i / 4) * 25, 90 + (i % 4) * 80, 50 + (i / 4) * 25), + wANAttribute, CHECK_ATTRIBUTE, dataManager.GetSysString(DataManager::STRING_ID_ATTRIBUTE + i)); + //announce race + wANRace = env->addWindow(irr::core::rect(480, 200, 850, 410), false, dataManager.GetSysString(563)); wANRace->getCloseButton()->setVisible(false); wANRace->setVisible(false); - for(int filter = 0x1, i = 0; i < 24; filter <<= 1, ++i) - chkRace[i] = env->addCheckBox(false, rect(10 + (i % 4) * 90, 25 + (i / 4) * 25, 100 + (i % 4) * 90, 50 + (i / 4) * 25), - wANRace, CHECK_RACE, dataManager.FormatRace(filter)); + for (int i = 0; i < RACES_COUNT; ++i) + chkRace[i] = env->addCheckBox(false, irr::core::rect(10 + (i % 4) * 90, 25 + (i / 4) * 25, 100 + (i % 4) * 90, 50 + (i / 4) * 25), + wANRace, CHECK_RACE, dataManager.GetSysString(DataManager::STRING_ID_RACE + i)); //selection hint - stHintMsg = env->addStaticText(L"", rect(500, 60, 820, 90), true, false, 0, -1, false); + stHintMsg = env->addStaticText(L"", irr::core::rect(500, 60, 820, 90), true, false, 0, -1, false); stHintMsg->setBackgroundColor(0xc0ffffff); stHintMsg->setTextAlignment(irr::gui::EGUIA_CENTER, irr::gui::EGUIA_CENTER); stHintMsg->setVisible(false); - stTip = env->addStaticText(L"", rect(0, 0, 150, 150), false, true, 0, -1, true); - stTip->setBackgroundColor(0xc0ffffff); - stTip->setTextAlignment(irr::gui::EGUIA_CENTER, irr::gui::EGUIA_CENTER); - stTip->setVisible(false); //cmd menu - wCmdMenu = env->addWindow(rect(10, 10, 110, 179), false, L""); + wCmdMenu = env->addWindow(irr::core::rect(10, 10, 110, 179), false, L""); wCmdMenu->setDrawTitlebar(false); wCmdMenu->setVisible(false); wCmdMenu->getCloseButton()->setVisible(false); - btnActivate = env->addButton(rect(1, 1, 99, 21), wCmdMenu, BUTTON_CMD_ACTIVATE, dataManager.GetSysString(1150)); - btnSummon = env->addButton(rect(1, 22, 99, 42), wCmdMenu, BUTTON_CMD_SUMMON, dataManager.GetSysString(1151)); - btnSPSummon = env->addButton(rect(1, 43, 99, 63), wCmdMenu, BUTTON_CMD_SPSUMMON, dataManager.GetSysString(1152)); - btnMSet = env->addButton(rect(1, 64, 99, 84), wCmdMenu, BUTTON_CMD_MSET, dataManager.GetSysString(1153)); - btnSSet = env->addButton(rect(1, 85, 99, 105), wCmdMenu, BUTTON_CMD_SSET, dataManager.GetSysString(1153)); - btnRepos = env->addButton(rect(1, 106, 99, 126), wCmdMenu, BUTTON_CMD_REPOS, dataManager.GetSysString(1154)); - btnAttack = env->addButton(rect(1, 127, 99, 147), wCmdMenu, BUTTON_CMD_ATTACK, dataManager.GetSysString(1157)); - btnShowList = env->addButton(rect(1, 148, 99, 168), wCmdMenu, BUTTON_CMD_SHOWLIST, dataManager.GetSysString(1158)); + btnActivate = env->addButton(irr::core::rect(1, 1, 99, 21), wCmdMenu, BUTTON_CMD_ACTIVATE, dataManager.GetSysString(1150)); + btnSummon = env->addButton(irr::core::rect(1, 22, 99, 42), wCmdMenu, BUTTON_CMD_SUMMON, dataManager.GetSysString(1151)); + btnSPSummon = env->addButton(irr::core::rect(1, 43, 99, 63), wCmdMenu, BUTTON_CMD_SPSUMMON, dataManager.GetSysString(1152)); + btnMSet = env->addButton(irr::core::rect(1, 64, 99, 84), wCmdMenu, BUTTON_CMD_MSET, dataManager.GetSysString(1153)); + btnSSet = env->addButton(irr::core::rect(1, 85, 99, 105), wCmdMenu, BUTTON_CMD_SSET, dataManager.GetSysString(1153)); + btnRepos = env->addButton(irr::core::rect(1, 106, 99, 126), wCmdMenu, BUTTON_CMD_REPOS, dataManager.GetSysString(1154)); + btnAttack = env->addButton(irr::core::rect(1, 127, 99, 147), wCmdMenu, BUTTON_CMD_ATTACK, dataManager.GetSysString(1157)); + btnShowList = env->addButton(irr::core::rect(1, 148, 99, 168), wCmdMenu, BUTTON_CMD_SHOWLIST, dataManager.GetSysString(1158)); + btnOperation = env->addButton(irr::core::rect(1, 169, 99, 189), wCmdMenu, BUTTON_CMD_ACTIVATE, dataManager.GetSysString(1161)); + btnReset = env->addButton(irr::core::rect(1, 190, 99, 210), wCmdMenu, BUTTON_CMD_RESET, dataManager.GetSysString(1162)); //deck edit - wDeckEdit = env->addStaticText(L"", rect(309, 8, 605, 130), true, false, 0, -1, true); + wDeckEdit = env->addStaticText(L"", irr::core::rect(309, 5, 605, 130), true, false, 0, -1, true); wDeckEdit->setVisible(false); - env->addStaticText(dataManager.GetSysString(1300), rect(10, 9, 100, 29), false, false, wDeckEdit); - cbDBLFList = env->addComboBox(rect(80, 5, 220, 30), wDeckEdit, COMBOBOX_DBLFLIST); - env->addStaticText(dataManager.GetSysString(1301), rect(10, 39, 100, 59), false, false, wDeckEdit); - cbDBDecks = env->addComboBox(rect(80, 35, 220, 60), wDeckEdit, COMBOBOX_DBDECKS); - for(unsigned int i = 0; i < deckManager._lfList.size(); ++i) - cbDBLFList->addItem(deckManager._lfList[i].listName); - btnSaveDeck = env->addButton(rect(225, 35, 290, 60), wDeckEdit, BUTTON_SAVE_DECK, dataManager.GetSysString(1302)); - ebDeckname = env->addEditBox(L"", rect(80, 65, 220, 90), true, wDeckEdit, -1); + btnManageDeck = env->addButton(irr::core::rect(225, 5, 290, 30), wDeckEdit, BUTTON_MANAGE_DECK, dataManager.GetSysString(1328)); + //deck manage + wDeckManage = env->addWindow(irr::core::rect(310, 135, 800, 515), false, dataManager.GetSysString(1460), 0, WINDOW_DECK_MANAGE); + wDeckManage->setVisible(false); + lstCategories = env->addListBox(irr::core::rect(10, 30, 140, 370), wDeckManage, LISTBOX_CATEGORIES, true); + lstDecks = env->addListBox(irr::core::rect(150, 30, 340, 370), wDeckManage, LISTBOX_DECKS, true); + posY = 30; + btnNewCategory = env->addButton(irr::core::rect(350, posY, 480, posY + 25), wDeckManage, BUTTON_NEW_CATEGORY, dataManager.GetSysString(1461)); + posY += 35; + btnRenameCategory = env->addButton(irr::core::rect(350, posY, 480, posY + 25), wDeckManage, BUTTON_RENAME_CATEGORY, dataManager.GetSysString(1462)); + posY += 35; + btnDeleteCategory = env->addButton(irr::core::rect(350, posY, 480, posY + 25), wDeckManage, BUTTON_DELETE_CATEGORY, dataManager.GetSysString(1463)); + posY += 35; + btnNewDeck = env->addButton(irr::core::rect(350, posY, 480, posY + 25), wDeckManage, BUTTON_NEW_DECK, dataManager.GetSysString(1464)); + posY += 35; + btnRenameDeck = env->addButton(irr::core::rect(350, posY, 480, posY + 25), wDeckManage, BUTTON_RENAME_DECK, dataManager.GetSysString(1465)); + posY += 35; + btnDMDeleteDeck = env->addButton(irr::core::rect(350, posY, 480, posY + 25), wDeckManage, BUTTON_DELETE_DECK_DM, dataManager.GetSysString(1466)); + posY += 35; + btnMoveDeck = env->addButton(irr::core::rect(350, posY, 480, posY + 25), wDeckManage, BUTTON_MOVE_DECK, dataManager.GetSysString(1467)); + posY += 35; + btnCopyDeck = env->addButton(irr::core::rect(350, posY, 480, posY + 25), wDeckManage, BUTTON_COPY_DECK, dataManager.GetSysString(1468)); + posY += 35; + btnImportDeckCode = env->addButton(irr::core::rect(350, posY, 480, posY + 25), wDeckManage, BUTTON_IMPORT_DECK_CODE, dataManager.GetSysString(1478)); + posY += 35; + btnExportDeckCode = env->addButton(irr::core::rect(350, posY, 480, posY + 25), wDeckManage, BUTTON_EXPORT_DECK_CODE, dataManager.GetSysString(1479)); + //deck manage query + wDMQuery = env->addWindow(irr::core::rect(400, 200, 710, 320), false, dataManager.GetSysString(1460)); + wDMQuery->getCloseButton()->setVisible(false); + wDMQuery->setVisible(false); + stDMMessage = env->addStaticText(L"", irr::core::rect(20, 25, 290, 45), false, false, wDMQuery); + stDMMessage2 = env->addStaticText(L"", irr::core::rect(20, 50, 290, 70), false, false, wDMQuery, -1, true); + stDMMessage2->setTextAlignment(irr::gui::EGUIA_CENTER, irr::gui::EGUIA_CENTER); + ebDMName = env->addEditBox(L"", irr::core::rect(20, 50, 290, 70), true, wDMQuery, -1); + ebDMName->setTextAlignment(irr::gui::EGUIA_CENTER, irr::gui::EGUIA_CENTER); + cbDMCategory = env->addComboBox(irr::core::rect(20, 50, 290, 70), wDMQuery, -1); + stDMMessage2->setVisible(false); + ebDMName->setVisible(false); + cbDMCategory->setVisible(false); + cbDMCategory->setMaxSelectionRows(10); + btnDMOK = env->addButton(irr::core::rect(70, 80, 140, 105), wDMQuery, BUTTON_DM_OK, dataManager.GetSysString(1211)); + btnDMCancel = env->addButton(irr::core::rect(170, 80, 240, 105), wDMQuery, BUTTON_DM_CANCEL, dataManager.GetSysString(1212)); + scrPackCards = env->addScrollBar(false, irr::core::recti(775, 161, 795, 629), 0, SCROLL_FILTER); + scrPackCards->setLargeStep(1); + scrPackCards->setSmallStep(1); + scrPackCards->setVisible(false); + + stDBCategory = env->addStaticText(dataManager.GetSysString(1300), irr::core::rect(10, 9, 100, 29), false, false, wDeckEdit); + cbDBCategory = env->addComboBox(irr::core::rect(80, 5, 220, 30), wDeckEdit, COMBOBOX_DBCATEGORY); + cbDBCategory->setMaxSelectionRows(15); + stDeck = env->addStaticText(dataManager.GetSysString(1301), irr::core::rect(10, 39, 100, 59), false, false, wDeckEdit); + cbDBDecks = env->addComboBox(irr::core::rect(80, 35, 220, 60), wDeckEdit, COMBOBOX_DBDECKS); + cbDBDecks->setMaxSelectionRows(15); + btnSaveDeck = env->addButton(irr::core::rect(225, 35, 290, 60), wDeckEdit, BUTTON_SAVE_DECK, dataManager.GetSysString(1302)); + ebDeckname = env->addEditBox(L"", irr::core::rect(80, 65, 220, 90), true, wDeckEdit, -1); ebDeckname->setTextAlignment(irr::gui::EGUIA_CENTER, irr::gui::EGUIA_CENTER); - btnSaveDeckAs = env->addButton(rect(225, 65, 290, 90), wDeckEdit, BUTTON_SAVE_DECK_AS, dataManager.GetSysString(1303)); - btnClearDeck = env->addButton(rect(240, 95, 290, 116), wDeckEdit, BUTTON_CLEAR_DECK, dataManager.GetSysString(1304)); - btnSortDeck = env->addButton(rect(185, 95, 235, 116), wDeckEdit, BUTTON_SORT_DECK, dataManager.GetSysString(1305)); - btnShuffleDeck = env->addButton(rect(130, 95, 180, 116), wDeckEdit, BUTTON_SHUFFLE_DECK, dataManager.GetSysString(1307)); - btnDBExit = env->addButton(rect(10, 95, 90, 116), wDeckEdit, BUTTON_DBEXIT, dataManager.GetSysString(1306)); - btnSideOK = env->addButton(rect(510, 40, 820, 80), 0, BUTTON_SIDE_OK, dataManager.GetSysString(1334)); + btnSaveDeckAs = env->addButton(irr::core::rect(225, 65, 290, 90), wDeckEdit, BUTTON_SAVE_DECK_AS, dataManager.GetSysString(1303)); + btnDeleteDeck = env->addButton(irr::core::rect(225, 95, 290, 120), wDeckEdit, BUTTON_DELETE_DECK, dataManager.GetSysString(1308)); + btnShuffleDeck = env->addButton(irr::core::rect(5, 99, 55, 120), wDeckEdit, BUTTON_SHUFFLE_DECK, dataManager.GetSysString(1307)); + btnSortDeck = env->addButton(irr::core::rect(60, 99, 110, 120), wDeckEdit, BUTTON_SORT_DECK, dataManager.GetSysString(1305)); + btnClearDeck = env->addButton(irr::core::rect(115, 99, 165, 120), wDeckEdit, BUTTON_CLEAR_DECK, dataManager.GetSysString(1304)); + btnSideOK = env->addButton(irr::core::rect(400, 40, 710, 80), 0, BUTTON_SIDE_OK, dataManager.GetSysString(1334)); btnSideOK->setVisible(false); + btnSideShuffle = env->addButton(irr::core::rect(310, 100, 370, 130), 0, BUTTON_SHUFFLE_DECK, dataManager.GetSysString(1307)); + btnSideShuffle->setVisible(false); + btnSideSort = env->addButton(irr::core::rect(375, 100, 435, 130), 0, BUTTON_SORT_DECK, dataManager.GetSysString(1305)); + btnSideSort->setVisible(false); + btnSideReload = env->addButton(irr::core::rect(440, 100, 500, 130), 0, BUTTON_SIDE_RELOAD, dataManager.GetSysString(1309)); + btnSideReload->setVisible(false); + // + scrFilter = env->addScrollBar(false, irr::core::recti(999, 161, 1019, 629), 0, SCROLL_FILTER); + scrFilter->setLargeStep(10); + scrFilter->setSmallStep(1); + scrFilter->setVisible(false); + //sort type + wSort = env->addStaticText(L"", irr::core::rect(930, 132, 1020, 156), true, false, 0, -1, true); + cbSortType = env->addComboBox(irr::core::rect(10, 2, 85, 22), wSort, COMBOBOX_SORTTYPE); + cbSortType->setMaxSelectionRows(10); + for(int i = 1370; i <= 1373; i++) + cbSortType->addItem(dataManager.GetSysString(i)); + wSort->setVisible(false); //filters - wFilter = env->addStaticText(L"", rect(610, 8, 1020, 130), true, false, 0, -1, true); + wFilter = env->addStaticText(L"", irr::core::rect(610, 5, 1020, 130), true, false, 0, -1, true); wFilter->setVisible(false); - env->addStaticText(dataManager.GetSysString(1311), rect(10, 5, 70, 25), false, false, wFilter); - cbCardType = env->addComboBox(rect(60, 3, 120, 23), wFilter, COMBOBOX_MAINTYPE); + stCategory = env->addStaticText(dataManager.GetSysString(1311), irr::core::rect(10, 2 + 25 / 6, 70, 22 + 25 / 6), false, false, wFilter); + cbCardType = env->addComboBox(irr::core::rect(60, 25 / 6, 120, 20 + 25 / 6), wFilter, COMBOBOX_MAINTYPE); cbCardType->addItem(dataManager.GetSysString(1310)); cbCardType->addItem(dataManager.GetSysString(1312)); cbCardType->addItem(dataManager.GetSysString(1313)); cbCardType->addItem(dataManager.GetSysString(1314)); - cbCardType2 = env->addComboBox(rect(125, 3, 200, 23), wFilter, -1); + cbCardType2 = env->addComboBox(irr::core::rect(125, 25 / 6, 195, 20 + 25 / 6), wFilter, COMBOBOX_SECONDTYPE); + cbCardType2->setMaxSelectionRows(10); cbCardType2->addItem(dataManager.GetSysString(1310), 0); - env->addStaticText(dataManager.GetSysString(1315), rect(205, 5, 280, 25), false, false, wFilter); - cbLimit = env->addComboBox(rect(260, 3, 390, 23), wFilter, -1); + stLimit = env->addStaticText(dataManager.GetSysString(1315), irr::core::rect(205, 2 + 25 / 6, 280, 22 + 25 / 6), false, false, wFilter); + cbLimit = env->addComboBox(irr::core::rect(260, 25 / 6, 390, 20 + 25 / 6), wFilter, COMBOBOX_LIMIT); + cbLimit->setMaxSelectionRows(10); cbLimit->addItem(dataManager.GetSysString(1310)); cbLimit->addItem(dataManager.GetSysString(1316)); cbLimit->addItem(dataManager.GetSysString(1317)); cbLimit->addItem(dataManager.GetSysString(1318)); - cbLimit->addItem(dataManager.GetSysString(1240)); - cbLimit->addItem(dataManager.GetSysString(1241)); - env->addStaticText(dataManager.GetSysString(1319), rect(10, 28, 70, 48), false, false, wFilter); - cbAttribute = env->addComboBox(rect(60, 26, 190, 46), wFilter, -1); + cbLimit->addItem(dataManager.GetSysString(1481)); + cbLimit->addItem(dataManager.GetSysString(1482)); + cbLimit->addItem(dataManager.GetSysString(1483)); + cbLimit->addItem(dataManager.GetSysString(1484)); + cbLimit->addItem(dataManager.GetSysString(1485)); + stAttribute = env->addStaticText(dataManager.GetSysString(1319), irr::core::rect(10, 22 + 50 / 6, 70, 42 + 50 / 6), false, false, wFilter); + cbAttribute = env->addComboBox(irr::core::rect(60, 20 + 50 / 6, 195, 40 + 50 / 6), wFilter, COMBOBOX_ATTRIBUTE); + cbAttribute->setMaxSelectionRows(10); cbAttribute->addItem(dataManager.GetSysString(1310), 0); - for(int filter = 0x1; filter != 0x80; filter <<= 1) - cbAttribute->addItem(dataManager.FormatAttribute(filter), filter); - env->addStaticText(dataManager.GetSysString(1321), rect(10, 51, 70, 71), false, false, wFilter); - cbRace = env->addComboBox(rect(60, 49, 190, 69), wFilter, -1); + for (int i = 0; i < ATTRIBUTES_COUNT; ++i) + cbAttribute->addItem(dataManager.GetSysString(DataManager::STRING_ID_ATTRIBUTE + i), 0x1U << i); + stRace = env->addStaticText(dataManager.GetSysString(1321), irr::core::rect(10, 42 + 75 / 6, 70, 62 + 75 / 6), false, false, wFilter); + cbRace = env->addComboBox(irr::core::rect(60, 40 + 75 / 6, 195, 60 + 75 / 6), wFilter, COMBOBOX_RACE); + cbRace->setMaxSelectionRows(10); cbRace->addItem(dataManager.GetSysString(1310), 0); - for(int filter = 0x1; filter != 0x1000000; filter <<= 1) - cbRace->addItem(dataManager.FormatRace(filter), filter); - env->addStaticText(dataManager.GetSysString(1322), rect(205, 28, 280, 48), false, false, wFilter); - ebAttack = env->addEditBox(L"", rect(260, 26, 340, 46), true, wFilter); + for (int i = 0; i < RACES_COUNT; ++i) + cbRace->addItem(dataManager.GetSysString(DataManager::STRING_ID_RACE + i), 0x1U << i); + stAttack = env->addStaticText(dataManager.GetSysString(1322), irr::core::rect(205, 22 + 50 / 6, 280, 42 + 50 / 6), false, false, wFilter); + ebAttack = env->addEditBox(L"", irr::core::rect(260, 20 + 50 / 6, 340, 40 + 50 / 6), true, wFilter, EDITBOX_INPUTS); ebAttack->setTextAlignment(irr::gui::EGUIA_CENTER, irr::gui::EGUIA_CENTER); - env->addStaticText(dataManager.GetSysString(1323), rect(205, 51, 280, 71), false, false, wFilter); - ebDefence = env->addEditBox(L"", rect(260, 49, 340, 69), true, wFilter); - ebDefence->setTextAlignment(irr::gui::EGUIA_CENTER, irr::gui::EGUIA_CENTER); - env->addStaticText(dataManager.GetSysString(1324), rect(10, 74, 80, 94), false, false, wFilter); - ebStar = env->addEditBox(L"", rect(60, 72, 140, 92), true, wFilter); + stDefense = env->addStaticText(dataManager.GetSysString(1323), irr::core::rect(205, 42 + 75 / 6, 280, 62 + 75 / 6), false, false, wFilter); + ebDefense = env->addEditBox(L"", irr::core::rect(260, 40 + 75 / 6, 340, 60 + 75 / 6), true, wFilter, EDITBOX_INPUTS); + ebDefense->setTextAlignment(irr::gui::EGUIA_CENTER, irr::gui::EGUIA_CENTER); + stStar = env->addStaticText(dataManager.GetSysString(1324), irr::core::rect(10, 62 + 100 / 6, 80, 82 + 100 / 6), false, false, wFilter); + ebStar = env->addEditBox(L"", irr::core::rect(60, 60 + 100 / 6, 100, 80 + 100 / 6), true, wFilter, EDITBOX_INPUTS); ebStar->setTextAlignment(irr::gui::EGUIA_CENTER, irr::gui::EGUIA_CENTER); - env->addStaticText(dataManager.GetSysString(1325), rect(205, 74, 280, 94), false, false, wFilter); - ebCardName = env->addEditBox(L"", rect(260, 72, 390, 92), true, wFilter, EDITBOX_KEYWORD); + stScale = env->addStaticText(dataManager.GetSysString(1336), irr::core::rect(101, 62 + 100 / 6, 150, 82 + 100 / 6), false, false, wFilter); + ebScale = env->addEditBox(L"", irr::core::rect(150, 60 + 100 / 6, 195, 80 + 100 / 6), true, wFilter, EDITBOX_INPUTS); + ebScale->setTextAlignment(irr::gui::EGUIA_CENTER, irr::gui::EGUIA_CENTER); + stSearch = env->addStaticText(dataManager.GetSysString(1325), irr::core::rect(205, 62 + 100 / 6, 280, 82 + 100 / 6), false, false, wFilter); + ebCardName = env->addEditBox(L"", irr::core::rect(260, 60 + 100 / 6, 390, 80 + 100 / 6), true, wFilter, EDITBOX_KEYWORD); ebCardName->setTextAlignment(irr::gui::EGUIA_CENTER, irr::gui::EGUIA_CENTER); - btnEffectFilter = env->addButton(rect(345, 28, 390, 69), wFilter, BUTTON_EFFECT_FILTER, dataManager.GetSysString(1326)); - btnStartFilter = env->addButton(rect(210, 96, 390, 118), wFilter, BUTTON_START_FILTER, dataManager.GetSysString(1327)); - wCategories = env->addWindow(rect(630, 60, 1000, 270), false, dataManager.strBuffer); + btnEffectFilter = env->addButton(irr::core::rect(345, 20 + 50 / 6, 390, 60 + 75 / 6), wFilter, BUTTON_EFFECT_FILTER, dataManager.GetSysString(1326)); + btnStartFilter = env->addButton(irr::core::rect(205, 80 + 125 / 6, 390, 100 + 125 / 6), wFilter, BUTTON_START_FILTER, dataManager.GetSysString(1327)); + if(gameConf.separate_clear_button) { + btnStartFilter->setRelativePosition(irr::core::rect(260, 80 + 125 / 6, 390, 100 + 125 / 6)); + btnClearFilter = env->addButton(irr::core::rect(205, 80 + 125 / 6, 255, 100 + 125 / 6), wFilter, BUTTON_CLEAR_FILTER, dataManager.GetSysString(1304)); + } + wCategories = env->addWindow(irr::core::rect(600, 60, 1000, 305), false, L""); wCategories->getCloseButton()->setVisible(false); wCategories->setDrawTitlebar(false); wCategories->setDraggable(false); wCategories->setVisible(false); - btnCategoryOK = env->addButton(rect(135, 175, 235, 200), wCategories, BUTTON_CATEGORY_OK, dataManager.GetSysString(1211)); + btnCategoryOK = env->addButton(irr::core::rect(150, 210, 250, 235), wCategories, BUTTON_CATEGORY_OK, dataManager.GetSysString(1211)); + int catewidth = 0; + for(int i = 0; i < 32; ++i) { + irr::core::dimension2d dtxt = guiFont->getDimension(dataManager.GetSysString(1100 + i)); + if((int)dtxt.Width + 40 > catewidth) + catewidth = dtxt.Width + 40; + } for(int i = 0; i < 32; ++i) - chkCategory[i] = env->addCheckBox(false, recti(10 + (i % 4) * 90, 10 + (i / 4) * 20, 100 + (i % 4) * 90, 30 + (i / 4) * 20), wCategories, -1, dataManager.GetSysString(1100 + i)); - scrFilter = env->addScrollBar(false, recti(999, 161, 1019, 629), 0, SCROLL_FILTER); - scrFilter->setLargeStep(10); - scrFilter->setSmallStep(1); - scrFilter->setVisible(false); + chkCategory[i] = env->addCheckBox(false, irr::core::recti(10 + (i % 4) * catewidth, 5 + (i / 4) * 25, 10 + (i % 4 + 1) * catewidth, 5 + (i / 4 + 1) * 25), wCategories, -1, dataManager.GetSysString(1100 + i)); + int wcatewidth = catewidth * 4 + 16; + wCategories->setRelativePosition(irr::core::rect(1000 - wcatewidth, 60, 1000, 305)); + btnCategoryOK->setRelativePosition(irr::core::recti(wcatewidth / 2 - 50, 210, wcatewidth / 2 + 50, 235)); + btnMarksFilter = env->addButton(irr::core::rect(60, 80 + 125 / 6, 195, 100 + 125 / 6), wFilter, BUTTON_MARKS_FILTER, dataManager.GetSysString(1374)); + wLinkMarks = env->addWindow(irr::core::rect(700, 30, 820, 150), false, L""); + wLinkMarks->getCloseButton()->setVisible(false); + wLinkMarks->setDrawTitlebar(false); + wLinkMarks->setDraggable(false); + wLinkMarks->setVisible(false); + btnMarksOK = env->addButton(irr::core::recti(45, 45, 75, 75), wLinkMarks, BUTTON_MARKERS_OK, dataManager.GetSysString(1211)); + btnMark[0] = env->addButton(irr::core::recti(10, 10, 40, 40), wLinkMarks, -1, L"\u2196"); + btnMark[1] = env->addButton(irr::core::recti(45, 10, 75, 40), wLinkMarks, -1, L"\u2191"); + btnMark[2] = env->addButton(irr::core::recti(80, 10, 110, 40), wLinkMarks, -1, L"\u2197"); + btnMark[3] = env->addButton(irr::core::recti(10, 45, 40, 75), wLinkMarks, -1, L"\u2190"); + btnMark[4] = env->addButton(irr::core::recti(80, 45, 110, 75), wLinkMarks, -1, L"\u2192"); + btnMark[5] = env->addButton(irr::core::recti(10, 80, 40, 110), wLinkMarks, -1, L"\u2199"); + btnMark[6] = env->addButton(irr::core::recti(45, 80, 75, 110), wLinkMarks, -1, L"\u2193"); + btnMark[7] = env->addButton(irr::core::recti(80, 80, 110, 110), wLinkMarks, -1, L"\u2198"); + for(int i=0;i<8;i++) + btnMark[i]->setIsPushButton(true); //replay window - wReplay = env->addWindow(rect(220, 100, 800, 520), false, dataManager.GetSysString(1202)); + wReplay = env->addWindow(irr::core::rect(220, 100, 800, 520), false, dataManager.GetSysString(1202)); wReplay->getCloseButton()->setVisible(false); wReplay->setVisible(false); - lstReplayList = env->addListBox(rect(10, 30, 350, 400), wReplay, LISTBOX_REPLAY_LIST, true); + lstReplayList = env->addListBox(irr::core::rect(10, 30, 350, 400), wReplay, LISTBOX_REPLAY_LIST, true); lstReplayList->setItemHeight(18); - btnLoadReplay = env->addButton(rect(460, 355, 570, 380), wReplay, BUTTON_LOAD_REPLAY, dataManager.GetSysString(1348)); - btnReplayCancel = env->addButton(rect(460, 385, 570, 410), wReplay, BUTTON_CANCEL_REPLAY, dataManager.GetSysString(1347)); - env->addStaticText(dataManager.GetSysString(1349), rect(360, 30, 570, 50), false, true, wReplay); - stReplayInfo = env->addStaticText(L"", rect(360, 60, 570, 350), false, true, wReplay); - env->addStaticText(dataManager.GetSysString(1353), rect(360, 275, 570, 295), false, true, wReplay); - ebRepStartTurn = env->addEditBox(L"", rect(360, 300, 460, 320), true, wReplay, -1); + btnLoadReplay = env->addButton(irr::core::rect(470, 355, 570, 380), wReplay, BUTTON_LOAD_REPLAY, dataManager.GetSysString(1348)); + btnDeleteReplay = env->addButton(irr::core::rect(360, 355, 460, 380), wReplay, BUTTON_DELETE_REPLAY, dataManager.GetSysString(1361)); + btnRenameReplay = env->addButton(irr::core::rect(360, 385, 460, 410), wReplay, BUTTON_RENAME_REPLAY, dataManager.GetSysString(1362)); + btnReplayCancel = env->addButton(irr::core::rect(470, 385, 570, 410), wReplay, BUTTON_CANCEL_REPLAY, dataManager.GetSysString(1347)); + btnExportDeck = env->addButton(irr::core::rect(470, 325, 570, 350), wReplay, BUTTON_EXPORT_DECK, dataManager.GetSysString(1369)); + env->addStaticText(dataManager.GetSysString(1349), irr::core::rect(360, 30, 570, 50), false, true, wReplay); + stReplayInfo = env->addStaticText(L"", irr::core::rect(360, 60, 570, 320), false, true, wReplay); + env->addStaticText(dataManager.GetSysString(1353), irr::core::rect(360, 275, 570, 295), false, true, wReplay); + ebRepStartTurn = env->addEditBox(L"", irr::core::rect(360, 300, 460, 320), true, wReplay, -1); ebRepStartTurn->setTextAlignment(irr::gui::EGUIA_CENTER, irr::gui::EGUIA_CENTER); //single play window - wSinglePlay = env->addWindow(rect(220, 100, 800, 520), false, dataManager.GetSysString(1201)); + wSinglePlay = env->addWindow(irr::core::rect(220, 100, 800, 520), false, dataManager.GetSysString(1201)); wSinglePlay->getCloseButton()->setVisible(false); wSinglePlay->setVisible(false); - lstSinglePlayList = env->addListBox(rect(10, 30, 350, 400), wSinglePlay, LISTBOX_SINGLEPLAY_LIST, true); + irr::gui::IGUITabControl* wSingle = env->addTabControl(irr::core::rect(0, 20, 579, 419), wSinglePlay, true); + if(gameConf.enable_bot_mode) { + irr::gui::IGUITab* tabBot = wSingle->addTab(dataManager.GetSysString(1380)); + lstBotList = env->addListBox(irr::core::rect(10, 10, 350, 350), tabBot, LISTBOX_BOT_LIST, true); + lstBotList->setItemHeight(18); + btnStartBot = env->addButton(irr::core::rect(459, 301, 569, 326), tabBot, BUTTON_BOT_START, dataManager.GetSysString(1211)); + btnBotCancel = env->addButton(irr::core::rect(459, 331, 569, 356), tabBot, BUTTON_CANCEL_SINGLEPLAY, dataManager.GetSysString(1210)); + env->addStaticText(dataManager.GetSysString(1382), irr::core::rect(360, 10, 550, 30), false, true, tabBot); + stBotInfo = env->addStaticText(L"", irr::core::rect(360, 40, 560, 160), false, true, tabBot); + cbBotDeckCategory = env->addComboBox(irr::core::rect(360, 95, 560, 120), tabBot, COMBOBOX_BOT_DECKCATEGORY); + cbBotDeckCategory->setMaxSelectionRows(6); + cbBotDeckCategory->setVisible(false); + cbBotDeck = env->addComboBox(irr::core::rect(360, 130, 560, 155), tabBot); + cbBotDeck->setMaxSelectionRows(6); + cbBotDeck->setVisible(false); + cbBotRule = env->addComboBox(irr::core::rect(360, 165, 560, 190), tabBot, COMBOBOX_BOT_RULE); + cbBotRule->addItem(dataManager.GetSysString(1262)); + cbBotRule->addItem(dataManager.GetSysString(1263)); + cbBotRule->addItem(dataManager.GetSysString(1264)); + cbBotRule->setSelected(gameConf.default_rule - 3); + chkBotHand = env->addCheckBox(false, irr::core::rect(360, 200, 560, 220), tabBot, -1, dataManager.GetSysString(1384)); + chkBotNoCheckDeck = env->addCheckBox(false, irr::core::rect(360, 230, 560, 250), tabBot, -1, dataManager.GetSysString(1229)); + chkBotNoShuffleDeck = env->addCheckBox(false, irr::core::rect(360, 260, 560, 280), tabBot, -1, dataManager.GetSysString(1230)); + } else { // avoid null pointer + btnStartBot = env->addButton(irr::core::rect(0, 0, 0, 0), wSinglePlay); + btnBotCancel = env->addButton(irr::core::rect(0, 0, 0, 0), wSinglePlay); + btnStartBot->setVisible(false); + btnBotCancel->setVisible(false); + } + irr::gui::IGUITab* tabSingle = wSingle->addTab(dataManager.GetSysString(1381)); + lstSinglePlayList = env->addListBox(irr::core::rect(10, 10, 350, 350), tabSingle, LISTBOX_SINGLEPLAY_LIST, true); lstSinglePlayList->setItemHeight(18); - btnLoadSinglePlay = env->addButton(rect(460, 355, 570, 380), wSinglePlay, BUTTON_LOAD_SINGLEPLAY, dataManager.GetSysString(1211)); - btnSinglePlayCancel = env->addButton(rect(460, 385, 570, 410), wSinglePlay, BUTTON_CANCEL_SINGLEPLAY, dataManager.GetSysString(1210)); - env->addStaticText(dataManager.GetSysString(1352), rect(360, 30, 570, 50), false, true, wSinglePlay); - stSinglePlayInfo = env->addStaticText(L"", rect(360, 60, 570, 350), false, true, wSinglePlay); + btnLoadSinglePlay = env->addButton(irr::core::rect(459, 301, 569, 326), tabSingle, BUTTON_LOAD_SINGLEPLAY, dataManager.GetSysString(1211)); + btnSinglePlayCancel = env->addButton(irr::core::rect(459, 331, 569, 356), tabSingle, BUTTON_CANCEL_SINGLEPLAY, dataManager.GetSysString(1210)); + env->addStaticText(dataManager.GetSysString(1352), irr::core::rect(360, 10, 550, 30), false, true, tabSingle); + stSinglePlayInfo = env->addStaticText(L"", irr::core::rect(360, 40, 560, 160), false, true, tabSingle); + chkSinglePlayReturnDeckTop = env->addCheckBox(false, irr::core::rect(360, 260, 560, 280), tabSingle, -1, dataManager.GetSysString(1238)); //replay save - wReplaySave = env->addWindow(rect(510, 200, 820, 320), false, dataManager.GetSysString(1340)); + wReplaySave = env->addWindow(irr::core::rect(510, 200, 820, 320), false, dataManager.GetSysString(1340)); wReplaySave->getCloseButton()->setVisible(false); wReplaySave->setVisible(false); - env->addStaticText(dataManager.GetSysString(1342), rect(20, 25, 290, 45), false, false, wReplaySave); - ebRSName = env->addEditBox(L"", rect(20, 50, 290, 70), true, wReplaySave, -1); + env->addStaticText(dataManager.GetSysString(1342), irr::core::rect(20, 25, 290, 45), false, false, wReplaySave); + ebRSName = env->addEditBox(L"", irr::core::rect(20, 50, 290, 70), true, wReplaySave, -1); ebRSName->setTextAlignment(irr::gui::EGUIA_CENTER, irr::gui::EGUIA_CENTER); - btnRSYes = env->addButton(rect(70, 80, 140, 105), wReplaySave, BUTTON_REPLAY_SAVE, dataManager.GetSysString(1341)); - btnRSNo = env->addButton(rect(170, 80, 240, 105), wReplaySave, BUTTON_REPLAY_CANCEL, dataManager.GetSysString(1212)); + btnRSYes = env->addButton(irr::core::rect(70, 80, 140, 105), wReplaySave, BUTTON_REPLAY_SAVE, dataManager.GetSysString(1341)); + btnRSNo = env->addButton(irr::core::rect(170, 80, 240, 105), wReplaySave, BUTTON_REPLAY_CANCEL, dataManager.GetSysString(1212)); //replay control - wReplayControl = env->addStaticText(L"", rect(205, 143, 295, 273), true, false, 0, -1, true); + wReplayControl = env->addStaticText(L"", irr::core::rect(205, 118, 295, 273), true, false, 0, -1, true); wReplayControl->setVisible(false); - btnReplayStart = env->addButton(rect(5, 5, 85, 25), wReplayControl, BUTTON_REPLAY_START, dataManager.GetSysString(1343)); - btnReplayPause = env->addButton(rect(5, 30, 85, 50), wReplayControl, BUTTON_REPLAY_PAUSE, dataManager.GetSysString(1344)); - btnReplayStep = env->addButton(rect(5, 55, 85, 75), wReplayControl, BUTTON_REPLAY_STEP, dataManager.GetSysString(1345)); - btnReplaySwap = env->addButton(rect(5, 80, 85, 100), wReplayControl, BUTTON_REPLAY_SWAP, dataManager.GetSysString(1346)); - btnReplayExit = env->addButton(rect(5, 105, 85, 125), wReplayControl, BUTTON_REPLAY_EXIT, dataManager.GetSysString(1347)); + btnReplayStart = env->addButton(irr::core::rect(5, 5, 85, 25), wReplayControl, BUTTON_REPLAY_START, dataManager.GetSysString(1343)); + btnReplayPause = env->addButton(irr::core::rect(5, 30, 85, 50), wReplayControl, BUTTON_REPLAY_PAUSE, dataManager.GetSysString(1344)); + btnReplayStep = env->addButton(irr::core::rect(5, 55, 85, 75), wReplayControl, BUTTON_REPLAY_STEP, dataManager.GetSysString(1345)); + btnReplayUndo = env->addButton(irr::core::rect(5, 80, 85, 100), wReplayControl, BUTTON_REPLAY_UNDO, dataManager.GetSysString(1360)); + btnReplaySwap = env->addButton(irr::core::rect(5, 105, 85, 125), wReplayControl, BUTTON_REPLAY_SWAP, dataManager.GetSysString(1346)); + btnReplayExit = env->addButton(irr::core::rect(5, 130, 85, 150), wReplayControl, BUTTON_REPLAY_EXIT, dataManager.GetSysString(1347)); //chat - wChat = env->addWindow(rect(305, 615, 1020, 640), false, L""); + wChat = env->addWindow(irr::core::rect(305, 615, 1020, 640), false, L""); wChat->getCloseButton()->setVisible(false); wChat->setDraggable(false); wChat->setDrawTitlebar(false); wChat->setVisible(false); - ebChatInput = env->addEditBox(L"", rect(3, 2, 710, 22), true, wChat, EDITBOX_CHAT); - // - btnLeaveGame = env->addButton(rect(205, 5, 295, 80), 0, BUTTON_LEAVE_GAME, L""); + ebChatInput = env->addEditBox(L"", irr::core::rect(3, 2, 710, 22), true, wChat, EDITBOX_CHAT); + //swap + btnSpectatorSwap = env->addButton(irr::core::rect(205, 100, 295, 135), 0, BUTTON_REPLAY_SWAP, dataManager.GetSysString(1346)); + btnSpectatorSwap->setVisible(false); + //chain buttons + btnChainIgnore = env->addButton(irr::core::rect(205, 100, 295, 135), 0, BUTTON_CHAIN_IGNORE, dataManager.GetSysString(1292)); + btnChainAlways = env->addButton(irr::core::rect(205, 140, 295, 175), 0, BUTTON_CHAIN_ALWAYS, dataManager.GetSysString(1293)); + btnChainWhenAvail = env->addButton(irr::core::rect(205, 180, 295, 215), 0, BUTTON_CHAIN_WHENAVAIL, dataManager.GetSysString(1294)); + btnChainIgnore->setIsPushButton(true); + btnChainAlways->setIsPushButton(true); + btnChainWhenAvail->setIsPushButton(true); + btnChainIgnore->setVisible(false); + btnChainAlways->setVisible(false); + btnChainWhenAvail->setVisible(false); + //shuffle + btnShuffle = env->addButton(irr::core::rect(205, 230, 295, 265), 0, BUTTON_CMD_SHUFFLE, dataManager.GetSysString(1297)); + btnShuffle->setVisible(false); + //cancel or finish + btnCancelOrFinish = env->addButton(irr::core::rect(205, 230, 295, 265), 0, BUTTON_CANCEL_OR_FINISH, dataManager.GetSysString(1295)); + btnCancelOrFinish->setVisible(false); + //big picture + wBigCard = env->addWindow(irr::core::rect(0, 0, 0, 0), false, L""); + wBigCard->getCloseButton()->setVisible(false); + wBigCard->setDrawTitlebar(false); + wBigCard->setDrawBackground(false); + wBigCard->setVisible(false); + imgBigCard = env->addImage(irr::core::rect(0, 0, 0, 0), wBigCard); + imgBigCard->setScaleImage(false); + imgBigCard->setUseAlphaChannel(true); + btnBigCardOriginalSize = env->addButton(irr::core::rect(205, 100, 295, 135), 0, BUTTON_BIG_CARD_ORIG_SIZE, dataManager.GetSysString(1443)); + btnBigCardZoomIn = env->addButton(irr::core::rect(205, 140, 295, 175), 0, BUTTON_BIG_CARD_ZOOM_IN, dataManager.GetSysString(1441)); + btnBigCardZoomOut = env->addButton(irr::core::rect(205, 180, 295, 215), 0, BUTTON_BIG_CARD_ZOOM_OUT, dataManager.GetSysString(1442)); + btnBigCardClose = env->addButton(irr::core::rect(205, 230, 295, 265), 0, BUTTON_BIG_CARD_CLOSE, dataManager.GetSysString(1440)); + btnBigCardOriginalSize->setVisible(false); + btnBigCardZoomIn->setVisible(false); + btnBigCardZoomOut->setVisible(false); + btnBigCardClose->setVisible(false); + //leave/surrender/exit + btnLeaveGame = env->addButton(irr::core::rect(205, 5, 295, 80), 0, BUTTON_LEAVE_GAME, L""); btnLeaveGame->setVisible(false); + //tip + stTip = env->addStaticText(L"", irr::core::rect(0, 0, 150, 150), false, true, 0, -1, true); + stTip->setBackgroundColor(0xc0ffffff); + stTip->setTextAlignment(irr::gui::EGUIA_CENTER, irr::gui::EGUIA_CENTER); + stTip->setVisible(false); + //tip for cards in select / display list + stCardListTip = env->addStaticText(L"", irr::core::rect(0, 0, 150, 150), false, true, wCardSelect, TEXT_CARD_LIST_TIP, true); + stCardListTip->setBackgroundColor(0xc0ffffff); + stCardListTip->setTextAlignment(irr::gui::EGUIA_CENTER, irr::gui::EGUIA_CENTER); + stCardListTip->setVisible(false); device->setEventReceiver(&menuHandler); - LoadConfig(); + if(!soundManager.Init()) { + chkEnableSound->setChecked(false); + chkEnableSound->setEnabled(false); + chkEnableSound->setVisible(false); + chkEnableMusic->setChecked(false); + chkEnableMusic->setEnabled(false); + chkEnableMusic->setVisible(false); + scrSoundVolume->setVisible(false); + scrMusicVolume->setVisible(false); + chkMusicMode->setEnabled(false); + chkMusicMode->setVisible(false); + } env->getSkin()->setFont(guiFont); env->setFocus(wMainMenu); - for (u32 i = 0; i < EGDC_COUNT; ++i) { - SColor col = env->getSkin()->getColor((EGUI_DEFAULT_COLOR)i); + for (int i = 0; i < irr::gui::EGDC_COUNT; ++i) { + auto col = env->getSkin()->getColor((irr::gui::EGUI_DEFAULT_COLOR)i); col.setAlpha(224); - env->getSkin()->setColor((EGUI_DEFAULT_COLOR)i, col); + env->getSkin()->setColor((irr::gui::EGUI_DEFAULT_COLOR)i, col); + } + auto size = driver->getScreenSize(); + if(window_size != size) { + window_size = size; + xScale = window_size.Width / 1024.0; + yScale = window_size.Height / 640.0; + OnResize(); } - hideChat = false; - hideChatTimer = 0; return true; } void Game::MainLoop() { @@ -549,26 +969,40 @@ void Game::MainLoop() { BuildProjectionMatrix(mProjection, -0.90f, 0.45f, -0.42f, 0.42f, 1.0f, 100.0f); camera->setProjectionMatrix(mProjection); - mProjection.buildCameraLookAtMatrixLH(vector3df(4.2f, 8.0f, 7.8f), vector3df(4.2f, 0, 0), vector3df(0, 0, 1)); + mProjection.buildCameraLookAtMatrixLH(irr::core::vector3df(4.2f, 8.0f, 7.8f), irr::core::vector3df(4.2f, 0, 0), irr::core::vector3df(0, 0, 1)); camera->setViewMatrixAffector(mProjection); - smgr->setAmbientLight(SColorf(1.0f, 1.0f, 1.0f)); + smgr->setAmbientLight(irr::video::SColorf(1.0f, 1.0f, 1.0f)); float atkframe = 0.1f; irr::ITimer* timer = device->getTimer(); timer->setTime(0); int fps = 0; int cur_time = 0; while(device->run()) { - if(gameConf.use_d3d) - linePattern = (linePattern + 1) % 30; - else - linePattern = (linePattern << 1) | (linePattern >> 15); + auto size = driver->getScreenSize(); + if(window_size != size) { + window_size = size; + xScale = window_size.Width / 1024.0; + yScale = window_size.Height / 640.0; + OnResize(); + } + linePatternD3D = (linePatternD3D + 1) % 30; + linePatternGL = (linePatternGL << 1) | (linePatternGL >> 15); atkframe += 0.1f; atkdy = (float)sin(atkframe); - driver->beginScene(true, true, SColor(0, 0, 0, 0)); - if(imageManager.tBackGround) - driver->draw2DImage(imageManager.tBackGround, recti(0, 0, 1024, 640), recti(0, 0, imageManager.tBackGround->getOriginalSize().Width, imageManager.tBackGround->getOriginalSize().Height)); - gMutex.Lock(); + driver->beginScene(true, true, irr::video::SColor(0, 0, 0, 0)); + gMutex.lock(); if(dInfo.isStarted) { + if(dInfo.isFinished && showcardcode == 1) + soundManager.PlayBGM(BGM_WIN); + else if(dInfo.isFinished && (showcardcode == 2 || showcardcode == 3)) + soundManager.PlayBGM(BGM_LOSE); + else if(dInfo.lp[0] > 0 && dInfo.lp[0] <= dInfo.lp[1] / 2) + soundManager.PlayBGM(BGM_DISADVANTAGE); + else if(dInfo.lp[0] > 0 && dInfo.lp[0] >= dInfo.lp[1] * 2) + soundManager.PlayBGM(BGM_ADVANTAGE); + else + soundManager.PlayBGM(BGM_DUEL); + DrawBackImage(imageManager.tBackGround); DrawBackGround(); DrawCards(); DrawMisc(); @@ -576,11 +1010,16 @@ void Game::MainLoop() { driver->setMaterial(irr::video::IdentityMaterial); driver->clearZBuffer(); } else if(is_building) { + soundManager.PlayBGM(BGM_DECK); + DrawBackImage(imageManager.tBackGround_deck); DrawDeckBd(); + } else { + soundManager.PlayBGM(BGM_MENU); + DrawBackImage(imageManager.tBackGround_menu); } DrawGUI(); DrawSpec(); - gMutex.Unlock(); + gMutex.unlock(); if(signalFrame > 0) { signalFrame--; if(!signalFrame) @@ -597,20 +1036,14 @@ void Game::MainLoop() { } } driver->endScene(); - if(closeSignal.Wait(0)) + if(closeSignal.Wait(1)) CloseDuelWindow(); - if(!device->isWindowActive()) - ignore_chain = false; fps++; cur_time = timer->getTime(); if(cur_time < fps * 17 - 20) -#ifdef _WIN32 - Sleep(20); -#else - usleep(20000); -#endif + std::this_thread::sleep_for(std::chrono::milliseconds(20)); if(cur_time >= 1000) { - myswprintf(cap, L"FPS: %d", fps); + myswprintf(cap, L"YGOPro FPS: %d", fps); device->setWindowCaption(cap); fps = 0; cur_time -= 1000; @@ -621,17 +1054,13 @@ void Game::MainLoop() { } } DuelClient::StopClient(true); - if(mainGame->dInfo.isSingleMode) + if(dInfo.isSingleMode) SingleMode::StopPlay(true); -#ifdef _WIN32 - Sleep(500); -#else - usleep(500000); -#endif + std::this_thread::sleep_for(std::chrono::milliseconds(500)); SaveConfig(); -// device->drop(); + device->drop(); } -void Game::BuildProjectionMatrix(irr::core::matrix4& mProjection, f32 left, f32 right, f32 bottom, f32 top, f32 znear, f32 zfar) { +void Game::BuildProjectionMatrix(irr::core::matrix4& mProjection, irr::f32 left, irr::f32 right, irr::f32 bottom, irr::f32 top, irr::f32 znear, irr::f32 zfar) { for(int i = 0; i < 16; ++i) mProjection[i] = 0; mProjection[0] = 2.0f * znear / (right - left); @@ -642,279 +1071,589 @@ void Game::BuildProjectionMatrix(irr::core::matrix4& mProjection, f32 left, f32 mProjection[11] = 1.0f; mProjection[14] = znear * zfar / (znear - zfar); } -void Game::InitStaticText(irr::gui::IGUIStaticText* pControl, u32 cWidth, u32 cHeight, irr::gui::CGUITTFont* font, const wchar_t* text) { - SetStaticText(pControl, cWidth, font, text); - if(font->getDimension(dataManager.strBuffer).Height <= cHeight) { +void Game::InitStaticText(irr::gui::IGUIStaticText* pControl, irr::u32 cWidth, irr::u32 cHeight, irr::gui::CGUITTFont* font, const wchar_t* text) { + std::wstring format_text; + format_text = SetStaticText(pControl, cWidth, font, text); + if(font->getDimension(format_text.c_str()).Height <= cHeight) { scrCardText->setVisible(false); + if(env->hasFocus(scrCardText)) + env->removeFocus(scrCardText); return; } - SetStaticText(pControl, cWidth-25, font, text); - u32 fontheight = font->getDimension(L"A").Height + font->getKerningHeight(); - u32 step = (font->getDimension(dataManager.strBuffer).Height - cHeight) / fontheight + 1; + format_text = SetStaticText(pControl, cWidth-25, font, text); + irr::u32 fontheight = font->getDimension(L"A").Height + font->getKerningHeight(); + irr::u32 step = (font->getDimension(format_text.c_str()).Height - cHeight) / fontheight + 1; scrCardText->setVisible(true); scrCardText->setMin(0); scrCardText->setMax(step); scrCardText->setPos(0); } -void Game::SetStaticText(irr::gui::IGUIStaticText* pControl, u32 cWidth, irr::gui::CGUITTFont* font, const wchar_t* text, u32 pos) { - int pbuffer = 0; - u32 _width = 0, _height = 0; - for(int i = 0; text[i] != 0 && i < 1023; ++i) { - u32 w = font->getCharDimension(text[i]).Width; - if(text[i] == L'\n') { - dataManager.strBuffer[pbuffer++] = L'\n'; +std::wstring Game::SetStaticText(irr::gui::IGUIStaticText* pControl, irr::u32 cWidth, irr::gui::CGUITTFont* font, const wchar_t* text, irr::u32 pos) { + irr::u32 _width = 0, _height = 0; + wchar_t prev = 0; + std::wstring result; + result.reserve(4096); + const size_t text_len = std::wcslen(text); + + for(size_t i = 0; i < text_len ; ++i) { + wchar_t c = text[i]; + irr::u32 w = font->getCharDimension(c).Width + font->getKerningWidth(c, prev); + prev = c; + if (c == L'\r') { + continue; + } + if (c == L'\n') { + result.push_back(L'\n'); _width = 0; _height++; - if(_height == pos) - pbuffer = 0; + prev = 0; + if (_height == pos) + result.clear(); continue; - } else if(_width > 0 && _width + w > cWidth) { - dataManager.strBuffer[pbuffer++] = L'\n'; + } + if (_width > 0 && _width + w > cWidth) { + result.push_back(L'\n'); _width = 0; _height++; - if(_height == pos) - pbuffer = 0; + prev = 0; + if (_height == pos) + result.clear(); } _width += w; - dataManager.strBuffer[pbuffer++] = text[i]; + result.push_back(c); } - dataManager.strBuffer[pbuffer] = 0; - pControl->setText(dataManager.strBuffer); + if (pControl) + pControl->setText(result.c_str()); + return result; } -void Game::RefreshDeck(irr::gui::IGUIComboBox* cbDeck) { - cbDeck->clear(); -#ifdef _WIN32 - WIN32_FIND_DATAW fdataw; - HANDLE fh = FindFirstFileW(L"./deck/*.ydk", &fdataw); - if(fh == INVALID_HANDLE_VALUE) - return; - do { - if(!(fdataw.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)) { - wchar_t* pf = fdataw.cFileName; - while(*pf) pf++; - while(*pf != L'.') pf--; - *pf = 0; - cbDeck->addItem(fdataw.cFileName); +void Game::LoadExpansions() { + FileSystem::TraversalDir(L"./expansions", [](const wchar_t* name, bool isdir) { + if (isdir) + return; + wchar_t fpath[1024]; + myswprintf(fpath, L"./expansions/%ls", name); + if (IsExtension(name, L".cdb")) { + dataManager.LoadDB(fpath); + return; + } + if (IsExtension(name, L".conf")) { + char upath[1024]; + BufferIO::EncodeUTF8(fpath, upath); + dataManager.LoadStrings(upath); + return; } - } while(FindNextFileW(fh, &fdataw)); - FindClose(fh); + if (IsExtension(name, L".zip") || IsExtension(name, L".ypk")) { +#ifdef _IRR_WCHAR_FILESYSTEM + dataManager.FileSystem->addFileArchive(fpath, true, false, irr::io::EFAT_ZIP); #else - DIR * dir; - struct dirent * dirp; - if((dir = opendir("./deck/")) == NULL) - return; - while((dirp = readdir(dir)) != NULL) { - size_t len = strlen(dirp->d_name); - if(len < 5 || strcasecmp(dirp->d_name + len - 4, ".ydk") != 0) - continue; - dirp->d_name[len - 4] = 0; - wchar_t wname[256]; - BufferIO::DecodeUTF8(dirp->d_name, wname); - cbDeck->addItem(wname); - } - closedir(dir); + char upath[1024]; + BufferIO::EncodeUTF8(fpath, upath); + dataManager.FileSystem->addFileArchive(upath, true, false, irr::io::EFAT_ZIP); +#endif + return; + } + }); + for(irr::u32 i = 0; i < dataManager.FileSystem->getFileArchiveCount(); ++i) { + auto archive = dataManager.FileSystem->getFileArchive(i)->getFileList(); + for(irr::u32 j = 0; j < archive->getFileCount(); ++j) { +#ifdef _IRR_WCHAR_FILESYSTEM + const wchar_t* fname = archive->getFullFileName(j).c_str(); +#else + wchar_t fname[1024]; + const char* uname = archive->getFullFileName(j).c_str(); + BufferIO::DecodeUTF8(uname, fname); +#endif + if (IsExtension(fname, L".cdb")) { + dataManager.LoadDB(fname); + continue; + } + if (IsExtension(fname, L".conf")) { +#ifdef _IRR_WCHAR_FILESYSTEM + auto reader = dataManager.FileSystem->createAndOpenFile(fname); +#else + auto reader = dataManager.FileSystem->createAndOpenFile(uname); #endif - for(size_t i = 0; i < cbDeck->getItemCount(); ++i) { - if(!wcscmp(cbDeck->getItem(i), gameConf.lastdeck)) { - cbDeck->setSelected(i); - break; + dataManager.LoadStrings(reader); + continue; + } + if (!mywcsncasecmp(fname, L"pack/", 5) && IsExtension(fname, L".ydk")) { + deckBuilder.expansionPacks.push_back(fname); + continue; + } } } } -void Game::RefreshReplay() { - lstReplayList->clear(); -#ifdef _WIN32 - WIN32_FIND_DATAW fdataw; - HANDLE fh = FindFirstFileW(L"./replay/*.yrp", &fdataw); - if(fh == INVALID_HANDLE_VALUE) - return; - do { - if(!(fdataw.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) && Replay::CheckReplay(fdataw.cFileName)) { - lstReplayList->addItem(fdataw.cFileName); +void Game::RefreshCategoryDeck(irr::gui::IGUIComboBox* cbCategory, irr::gui::IGUIComboBox* cbDeck, bool selectlastused) { + cbCategory->clear(); + cbCategory->addItem(dataManager.GetSysString(1450)); + cbCategory->addItem(dataManager.GetSysString(1451)); + cbCategory->addItem(dataManager.GetSysString(1452)); + cbCategory->addItem(dataManager.GetSysString(1453)); + FileSystem::TraversalDir(L"./deck", [cbCategory](const wchar_t* name, bool isdir) { + if(isdir) { + cbCategory->addItem(name); } - } while(FindNextFileW(fh, &fdataw)); - FindClose(fh); -#else - DIR * dir; - struct dirent * dirp; - if((dir = opendir("./replay/")) == NULL) + }); + cbCategory->setSelected(2); + if(selectlastused) { + for(size_t i = 0; i < cbCategory->getItemCount(); ++i) { + if(!std::wcscmp(cbCategory->getItem(i), gameConf.lastcategory)) { + cbCategory->setSelected(i); + break; + } + } + } + RefreshDeck(cbCategory, cbDeck); + if(selectlastused) { + for(size_t i = 0; i < cbDeck->getItemCount(); ++i) { + if(!std::wcscmp(cbDeck->getItem(i), gameConf.lastdeck)) { + cbDeck->setSelected(i); + break; + } + } + } +} +void Game::RefreshDeck(irr::gui::IGUIComboBox* cbCategory, irr::gui::IGUIComboBox* cbDeck) { + if(cbCategory != cbDBCategory && cbCategory->getSelected() == 0) { + // can't use pack list in duel + cbDeck->clear(); return; - while((dirp = readdir(dir)) != NULL) { - size_t len = strlen(dirp->d_name); - if(len < 5 || strcasecmp(dirp->d_name + len - 4, ".yrp") != 0) - continue; - wchar_t wname[256]; - BufferIO::DecodeUTF8(dirp->d_name, wname); - if(Replay::CheckReplay(wname)) - lstReplayList->addItem(wname); } - closedir(dir); -#endif + wchar_t catepath[256]; + DeckManager::GetCategoryPath(catepath, cbCategory->getSelected(), cbCategory->getText()); + cbDeck->clear(); + RefreshDeck(catepath, [cbDeck](const wchar_t* item) { cbDeck->addItem(item); }); +} +void Game::RefreshDeck(const wchar_t* deckpath, const std::function& additem) { + if(!mywcsncasecmp(deckpath, L"./pack", 6)) { + for(auto& pack : deckBuilder.expansionPacks) { + // add pack/xxx.ydk + additem(pack.substr(5, pack.size() - 9).c_str()); + } + } + FileSystem::TraversalDir(deckpath, [additem](const wchar_t* name, bool isdir) { + if (!isdir && IsExtension(name, L".ydk")) { + wchar_t deckname[256]{}; + BufferIO::CopyWideString(name, deckname, std::wcslen(name) - 4); + additem(deckname); + } + }); +} +void Game::RefreshReplay() { + lstReplayList->clear(); + FileSystem::TraversalDir(L"./replay", [this](const wchar_t* name, bool isdir) { + if (!isdir && IsExtension(name, L".yrp")) + lstReplayList->addItem(name); + }); } void Game::RefreshSingleplay() { lstSinglePlayList->clear(); -#ifdef _WIN32 - WIN32_FIND_DATAW fdataw; - HANDLE fh = FindFirstFileW(L"./single/*.lua", &fdataw); - if(fh == INVALID_HANDLE_VALUE) - return; - do { - if(!(fdataw.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)) - lstSinglePlayList->addItem(fdataw.cFileName); - } while(FindNextFileW(fh, &fdataw)); - FindClose(fh); -#else - DIR * dir; - struct dirent * dirp; - if((dir = opendir("./single/")) == NULL) + stSinglePlayInfo->setText(L""); + FileSystem::TraversalDir(L"./single", [this](const wchar_t* name, bool isdir) { + if(!isdir && IsExtension(name, L".lua")) + lstSinglePlayList->addItem(name); + }); +} +void Game::RefreshBot() { + if(!gameConf.enable_bot_mode) return; - while((dirp = readdir(dir)) != NULL) { - size_t len = strlen(dirp->d_name); - if(len < 5 || strcasecmp(dirp->d_name + len - 4, ".lua") != 0) - continue; - wchar_t wname[256]; - BufferIO::DecodeUTF8(dirp->d_name, wname); - lstSinglePlayList->addItem(wname); + botInfo.clear(); + FILE* fp = myfopen("bot.conf", "r"); + char linebuf[256]{}; + char strbuf[256]{}; + if(fp) { + while(std::fgets(linebuf, 256, fp)) { + if(linebuf[0] == '#') + continue; + if(linebuf[0] == '!') { + BotInfo newinfo; + if (std::sscanf(linebuf, "!%240[^\n]", strbuf) != 1) + continue; + BufferIO::DecodeUTF8(strbuf, newinfo.name); + if (!std::fgets(linebuf, 256, fp)) + break; + if (std::sscanf(linebuf, "%240[^\n]", strbuf) != 1) + continue; + BufferIO::DecodeUTF8(strbuf, newinfo.command); + if (!std::fgets(linebuf, 256, fp)) + break; + if (std::sscanf(linebuf, "%240[^\n]", strbuf) != 1) + continue; + BufferIO::DecodeUTF8(strbuf, newinfo.desc); + if (!std::fgets(linebuf, 256, fp)) + break; + newinfo.support_master_rule_3 = !!std::strstr(linebuf, "SUPPORT_MASTER_RULE_3"); + newinfo.support_new_master_rule = !!std::strstr(linebuf, "SUPPORT_NEW_MASTER_RULE"); + newinfo.support_master_rule_2020 = !!std::strstr(linebuf, "SUPPORT_MASTER_RULE_2020"); + newinfo.select_deckfile = !!std::strstr(linebuf, "SELECT_DECKFILE"); + int rule = cbBotRule->getSelected() + 3; + if((rule == 3 && newinfo.support_master_rule_3) + || (rule == 4 && newinfo.support_new_master_rule) + || (rule == 5 && newinfo.support_master_rule_2020)) + botInfo.push_back(newinfo); + continue; + } + } + std::fclose(fp); + } + lstBotList->clear(); + stBotInfo->setText(L""); + cbBotDeckCategory->setVisible(false); + cbBotDeck->setVisible(false); + for(unsigned int i = 0; i < botInfo.size(); ++i) { + lstBotList->addItem(botInfo[i].name); + } + if(botInfo.size() == 0) { + SetStaticText(stBotInfo, 200, guiFont, dataManager.GetSysString(1385)); + } + else { + RefreshCategoryDeck(cbBotDeckCategory, cbBotDeck); } - closedir(dir); -#endif } void Game::LoadConfig() { - FILE* fp = fopen("system.conf", "r"); + FILE* fp = myfopen("system.conf", "r"); if(!fp) return; - char linebuf[256]; - char strbuf[32]; - char valbuf[256]; - wchar_t wstr[256]; - gameConf.antialias = 0; - gameConf.serverport = 7911; - gameConf.textfontsize = 12; - gameConf.nickname[0] = 0; - gameConf.gamename[0] = 0; - gameConf.lastdeck[0] = 0; - gameConf.numfont[0] = 0; - gameConf.textfont[0] = 0; - gameConf.lastip[0] = 0; - gameConf.lastport[0] = 0; - gameConf.roompass[0] = 0; - fseek(fp, 0, SEEK_END); - int fsize = ftell(fp); - fseek(fp, 0, SEEK_SET); - while(ftell(fp) < fsize) { - fgets(linebuf, 250, fp); - sscanf(linebuf, "%s = %s", strbuf, valbuf); - if(!strcmp(strbuf, "antialias")) { - gameConf.antialias = atoi(valbuf); - } else if(!strcmp(strbuf, "use_d3d")) { - gameConf.use_d3d = atoi(valbuf) > 0; - } else if(!strcmp(strbuf, "errorlog")) { - enable_log = atoi(valbuf); - } else if(!strcmp(strbuf, "nickname")) { - BufferIO::DecodeUTF8(valbuf, wstr); - BufferIO::CopyWStr(wstr, gameConf.nickname, 20); - } else if(!strcmp(strbuf, "gamename")) { - BufferIO::DecodeUTF8(valbuf, wstr); - BufferIO::CopyWStr(wstr, gameConf.gamename, 20); - } else if(!strcmp(strbuf, "lastdeck")) { - BufferIO::DecodeUTF8(valbuf, wstr); - BufferIO::CopyWStr(wstr, gameConf.lastdeck, 64); - } else if(!strcmp(strbuf, "textfont")) { - BufferIO::DecodeUTF8(valbuf, wstr); - int textfontsize; - sscanf(linebuf, "%s = %s %d", strbuf, valbuf, &textfontsize); - gameConf.textfontsize = textfontsize; - BufferIO::CopyWStr(wstr, gameConf.textfont, 256); - } else if(!strcmp(strbuf, "numfont")) { - BufferIO::DecodeUTF8(valbuf, wstr); - BufferIO::CopyWStr(wstr, gameConf.numfont, 256); - } else if(!strcmp(strbuf, "serverport")) { - gameConf.serverport = atoi(valbuf); - } else if(!strcmp(strbuf, "lastip")) { - BufferIO::DecodeUTF8(valbuf, wstr); - BufferIO::CopyWStr(wstr, gameConf.lastip, 20); - } else if(!strcmp(strbuf, "lastport")) { - BufferIO::DecodeUTF8(valbuf, wstr); - BufferIO::CopyWStr(wstr, gameConf.lastport, 20); - } else if(!strcmp(strbuf, "roompass")) { - BufferIO::DecodeUTF8(valbuf, wstr); - BufferIO::CopyWStr(wstr, gameConf.roompass, 20); + char linebuf[CONFIG_LINE_SIZE]{}; + char strbuf[64]{}; + char valbuf[960]{}; + while(std::fgets(linebuf, sizeof linebuf, fp)) { + if (std::sscanf(linebuf, "%63s = %959s", strbuf, valbuf) != 2) + continue; + if(!std::strcmp(strbuf, "antialias")) { + gameConf.antialias = std::strtol(valbuf, nullptr, 10); + } else if(!std::strcmp(strbuf, "use_d3d")) { + gameConf.use_d3d = std::strtol(valbuf, nullptr, 10) > 0; + } else if (!std::strcmp(strbuf, "use_image_scale_multi_thread")) { + gameConf.use_image_scale_multi_thread = std::strtol(valbuf, nullptr, 10) > 0; + } else if (!std::strcmp(strbuf, "use_image_load_background_thread")) { + gameConf.use_image_load_background_thread = std::strtol(valbuf, nullptr, 10) > 0; + } else if(!std::strcmp(strbuf, "errorlog")) { + unsigned int val = std::strtol(valbuf, nullptr, 10); + enable_log = val & 0xff; + } else if(!std::strcmp(strbuf, "serverport")) { + gameConf.serverport = std::strtol(valbuf, nullptr, 10); + } else if(!std::strcmp(strbuf, "lasthost")) { + BufferIO::DecodeUTF8(valbuf, gameConf.lasthost); + } else if(!std::strcmp(strbuf, "lastport")) { + BufferIO::DecodeUTF8(valbuf, gameConf.lastport); + } else if(!std::strcmp(strbuf, "automonsterpos")) { + gameConf.chkMAutoPos = std::strtol(valbuf, nullptr, 10); + } else if(!std::strcmp(strbuf, "autospellpos")) { + gameConf.chkSTAutoPos = std::strtol(valbuf, nullptr, 10); + } else if(!std::strcmp(strbuf, "randompos")) { + gameConf.chkRandomPos = std::strtol(valbuf, nullptr, 10); + } else if(!std::strcmp(strbuf, "autochain")) { + gameConf.chkAutoChain = std::strtol(valbuf, nullptr, 10); + } else if(!std::strcmp(strbuf, "waitchain")) { + gameConf.chkWaitChain = std::strtol(valbuf, nullptr, 10); + } else if(!std::strcmp(strbuf, "showchain")) { + gameConf.chkDefaultShowChain = std::strtol(valbuf, nullptr, 10); + } else if(!std::strcmp(strbuf, "mute_opponent")) { + gameConf.chkIgnore1 = std::strtol(valbuf, nullptr, 10); + } else if(!std::strcmp(strbuf, "mute_spectators")) { + gameConf.chkIgnore2 = std::strtol(valbuf, nullptr, 10); + } else if(!std::strcmp(strbuf, "use_lflist")) { + gameConf.use_lflist = std::strtol(valbuf, nullptr, 10); + } else if(!std::strcmp(strbuf, "default_lflist")) { + gameConf.default_lflist = std::strtol(valbuf, nullptr, 10); + } else if(!std::strcmp(strbuf, "default_rule")) { + gameConf.default_rule = std::strtol(valbuf, nullptr, 10); + if(gameConf.default_rule <= 0) + gameConf.default_rule = DEFAULT_DUEL_RULE; + } else if(!std::strcmp(strbuf, "hide_setname")) { + gameConf.hide_setname = std::strtol(valbuf, nullptr, 10); + } else if(!std::strcmp(strbuf, "hide_hint_button")) { + gameConf.hide_hint_button = std::strtol(valbuf, nullptr, 10); + } else if(!std::strcmp(strbuf, "control_mode")) { + gameConf.control_mode = std::strtol(valbuf, nullptr, 10); + } else if(!std::strcmp(strbuf, "draw_field_spell")) { + gameConf.draw_field_spell = std::strtol(valbuf, nullptr, 10); + } else if(!std::strcmp(strbuf, "separate_clear_button")) { + gameConf.separate_clear_button = std::strtol(valbuf, nullptr, 10); + } else if(!std::strcmp(strbuf, "auto_search_limit")) { + gameConf.auto_search_limit = std::strtol(valbuf, nullptr, 10); + } else if(!std::strcmp(strbuf, "search_multiple_keywords")) { + gameConf.search_multiple_keywords = std::strtol(valbuf, nullptr, 10); + } else if(!std::strcmp(strbuf, "ignore_deck_changes")) { + gameConf.chkIgnoreDeckChanges = std::strtol(valbuf, nullptr, 10); + } else if(!std::strcmp(strbuf, "default_ot")) { + gameConf.defaultOT = std::strtol(valbuf, nullptr, 10); + } else if(!std::strcmp(strbuf, "enable_bot_mode")) { + gameConf.enable_bot_mode = std::strtol(valbuf, nullptr, 10); + } else if(!std::strcmp(strbuf, "quick_animation")) { + gameConf.quick_animation = std::strtol(valbuf, nullptr, 10); + } else if(!std::strcmp(strbuf, "auto_save_replay")) { + gameConf.auto_save_replay = std::strtol(valbuf, nullptr, 10); + } else if(!std::strcmp(strbuf, "draw_single_chain")) { + gameConf.draw_single_chain = std::strtol(valbuf, nullptr, 10); + } else if(!std::strcmp(strbuf, "hide_player_name")) { + gameConf.hide_player_name = std::strtol(valbuf, nullptr, 10); + } else if(!std::strcmp(strbuf, "prefer_expansion_script")) { + gameConf.prefer_expansion_script = std::strtol(valbuf, nullptr, 10); + } else if(!std::strcmp(strbuf, "window_maximized")) { + gameConf.window_maximized = std::strtol(valbuf, nullptr, 10) > 0; + } else if(!std::strcmp(strbuf, "window_width")) { + gameConf.window_width = std::strtol(valbuf, nullptr, 10); + } else if(!std::strcmp(strbuf, "window_height")) { + gameConf.window_height = std::strtol(valbuf, nullptr, 10); + } else if(!std::strcmp(strbuf, "resize_popup_menu")) { + gameConf.resize_popup_menu = std::strtol(valbuf, nullptr, 10) > 0; +#ifdef YGOPRO_USE_AUDIO + } else if(!std::strcmp(strbuf, "enable_sound")) { + gameConf.enable_sound = std::strtol(valbuf, nullptr, 10) > 0; + } else if(!std::strcmp(strbuf, "sound_volume")) { + int vol = std::strtol(valbuf, nullptr, 10); + if (vol < 0) + vol = 0; + else if (vol > 100) + vol = 100; + gameConf.sound_volume = (double)vol / 100; + } else if(!std::strcmp(strbuf, "enable_music")) { + gameConf.enable_music = std::strtol(valbuf, nullptr, 10) > 0; + } else if(!std::strcmp(strbuf, "music_volume")) { + int vol = std::strtol(valbuf, nullptr, 10); + if (vol < 0) + vol = 0; + else if (vol > 100) + vol = 100; + gameConf.music_volume = (double)vol / 100; + } else if(!std::strcmp(strbuf, "music_mode")) { + gameConf.music_mode = std::strtol(valbuf, nullptr, 10); +#endif + } else { + // options allowing multiple words + if (std::sscanf(linebuf, "%63s = %959[^\n]", strbuf, valbuf) != 2) + continue; + if (!std::strcmp(strbuf, "textfont")) { + char* last_space = std::strrchr(valbuf, ' '); + if (last_space == nullptr) + continue; + int fontsize = std::strtol(last_space + 1, nullptr, 10); + if (fontsize > 0) + gameConf.textfontsize = fontsize; + *last_space = 0; + BufferIO::DecodeUTF8(valbuf, gameConf.textfont); + } else if (!std::strcmp(strbuf, "numfont")) { + BufferIO::DecodeUTF8(valbuf, gameConf.numfont); + } else if (!std::strcmp(strbuf, "nickname")) { + BufferIO::DecodeUTF8(valbuf, gameConf.nickname); + } else if (!std::strcmp(strbuf, "gamename")) { + BufferIO::DecodeUTF8(valbuf, gameConf.gamename); + } else if (!std::strcmp(strbuf, "roompass")) { + BufferIO::DecodeUTF8(valbuf, gameConf.roompass); + } else if (!std::strcmp(strbuf, "lastcategory")) { + BufferIO::DecodeUTF8(valbuf, gameConf.lastcategory); + } else if (!std::strcmp(strbuf, "lastdeck")) { + BufferIO::DecodeUTF8(valbuf, gameConf.lastdeck); + } else if(!std::strcmp(strbuf, "bot_deck_path")) { + BufferIO::DecodeUTF8(valbuf, gameConf.bot_deck_path); + } } } - fclose(fp); + std::fclose(fp); } void Game::SaveConfig() { - FILE* fp = fopen("system.conf", "w"); - fprintf(fp, "#config file\n#nickname & gamename should be less than 20 characters\n"); - char linebuf[256]; - fprintf(fp, "use_d3d = %d\n", gameConf.use_d3d ? 1 : 0); - fprintf(fp, "antialias = %d\n", gameConf.antialias); - fprintf(fp, "errorlog = %d\n", enable_log); - BufferIO::CopyWStr(ebNickName->getText(), gameConf.nickname, 20); + FILE* fp = myfopen("system.conf", "w"); + std::fprintf(fp, "#config file\n#nickname & gamename should be less than 20 characters\n"); + char linebuf[CONFIG_LINE_SIZE]; + std::fprintf(fp, "use_d3d = %d\n", gameConf.use_d3d ? 1 : 0); + std::fprintf(fp, "use_image_scale_multi_thread = %d\n", gameConf.use_image_scale_multi_thread ? 1 : 0); + std::fprintf(fp, "use_image_load_background_thread = %d\n", gameConf.use_image_load_background_thread ? 1 : 0); + std::fprintf(fp, "antialias = %d\n", gameConf.antialias); + std::fprintf(fp, "errorlog = %u\n", enable_log); + BufferIO::CopyWideString(ebNickName->getText(), gameConf.nickname); BufferIO::EncodeUTF8(gameConf.nickname, linebuf); - fprintf(fp, "nickname = %s\n", linebuf); + std::fprintf(fp, "nickname = %s\n", linebuf); BufferIO::EncodeUTF8(gameConf.gamename, linebuf); - fprintf(fp, "gamename = %s\n", linebuf); + std::fprintf(fp, "gamename = %s\n", linebuf); + BufferIO::EncodeUTF8(gameConf.lastcategory, linebuf); + std::fprintf(fp, "lastcategory = %s\n", linebuf); BufferIO::EncodeUTF8(gameConf.lastdeck, linebuf); - fprintf(fp, "lastdeck = %s\n", linebuf); + std::fprintf(fp, "lastdeck = %s\n", linebuf); BufferIO::EncodeUTF8(gameConf.textfont, linebuf); - fprintf(fp, "textfont = %s %d\n", linebuf, gameConf.textfontsize); + std::fprintf(fp, "textfont = %s %d\n", linebuf, gameConf.textfontsize); BufferIO::EncodeUTF8(gameConf.numfont, linebuf); - fprintf(fp, "numfont = %s\n", linebuf); - fprintf(fp, "serverport = %d\n", gameConf.serverport); - BufferIO::EncodeUTF8(gameConf.lastip, linebuf); - fprintf(fp, "lastip = %s\n", linebuf); + std::fprintf(fp, "numfont = %s\n", linebuf); + std::fprintf(fp, "serverport = %d\n", gameConf.serverport); + BufferIO::EncodeUTF8(gameConf.lasthost, linebuf); + std::fprintf(fp, "lasthost = %s\n", linebuf); BufferIO::EncodeUTF8(gameConf.lastport, linebuf); - fprintf(fp, "lastport = %s\n", linebuf); - fclose(fp); + std::fprintf(fp, "lastport = %s\n", linebuf); + //settings + std::fprintf(fp, "automonsterpos = %d\n", (chkMAutoPos->isChecked() ? 1 : 0)); + std::fprintf(fp, "autospellpos = %d\n", (chkSTAutoPos->isChecked() ? 1 : 0)); + std::fprintf(fp, "randompos = %d\n", (chkRandomPos->isChecked() ? 1 : 0)); + std::fprintf(fp, "autochain = %d\n", (chkAutoChain->isChecked() ? 1 : 0)); + std::fprintf(fp, "waitchain = %d\n", (chkWaitChain->isChecked() ? 1 : 0)); + std::fprintf(fp, "showchain = %d\n", (chkDefaultShowChain->isChecked() ? 1 : 0)); + std::fprintf(fp, "mute_opponent = %d\n", (chkIgnore1->isChecked() ? 1 : 0)); + std::fprintf(fp, "mute_spectators = %d\n", (chkIgnore2->isChecked() ? 1 : 0)); + std::fprintf(fp, "use_lflist = %d\n", gameConf.use_lflist); + std::fprintf(fp, "default_lflist = %d\n", gameConf.default_lflist); + std::fprintf(fp, "default_rule = %d\n", gameConf.default_rule == DEFAULT_DUEL_RULE ? 0 : gameConf.default_rule); + std::fprintf(fp, "hide_setname = %d\n", gameConf.hide_setname); + std::fprintf(fp, "hide_hint_button = %d\n", gameConf.hide_hint_button); + std::fprintf(fp, "#control_mode = 0: Key A/S/D/R Chain Buttons. control_mode = 1: MouseLeft/MouseRight/NULL/F9 Without Chain Buttons\n"); + std::fprintf(fp, "control_mode = %d\n", gameConf.control_mode); + std::fprintf(fp, "draw_field_spell = %d\n", gameConf.draw_field_spell); + std::fprintf(fp, "separate_clear_button = %d\n", gameConf.separate_clear_button); + std::fprintf(fp, "#auto_search_limit >= 0: Start search automatically when the user enters N chars\n"); + std::fprintf(fp, "auto_search_limit = %d\n", gameConf.auto_search_limit); + std::fprintf(fp, "#search_multiple_keywords = 0: Disable. 1: Search mutiple keywords with separator \" \". 2: with separator \"+\"\n"); + std::fprintf(fp, "search_multiple_keywords = %d\n", gameConf.search_multiple_keywords); + std::fprintf(fp, "ignore_deck_changes = %d\n", (chkIgnoreDeckChanges->isChecked() ? 1 : 0)); + std::fprintf(fp, "default_ot = %d\n", gameConf.defaultOT); + std::fprintf(fp, "enable_bot_mode = %d\n", gameConf.enable_bot_mode); + BufferIO::EncodeUTF8(gameConf.bot_deck_path, linebuf); + std::fprintf(fp, "bot_deck_path = %s\n", linebuf); + std::fprintf(fp, "quick_animation = %d\n", gameConf.quick_animation); + std::fprintf(fp, "auto_save_replay = %d\n", (chkAutoSaveReplay->isChecked() ? 1 : 0)); + std::fprintf(fp, "draw_single_chain = %d\n", gameConf.draw_single_chain); + std::fprintf(fp, "hide_player_name = %d\n", gameConf.hide_player_name); + std::fprintf(fp, "prefer_expansion_script = %d\n", gameConf.prefer_expansion_script); + std::fprintf(fp, "window_maximized = %d\n", (gameConf.window_maximized ? 1 : 0)); + std::fprintf(fp, "window_width = %d\n", gameConf.window_width); + std::fprintf(fp, "window_height = %d\n", gameConf.window_height); + std::fprintf(fp, "resize_popup_menu = %d\n", gameConf.resize_popup_menu ? 1 : 0); +#ifdef YGOPRO_USE_AUDIO + std::fprintf(fp, "enable_sound = %d\n", (chkEnableSound->isChecked() ? 1 : 0)); + std::fprintf(fp, "enable_music = %d\n", (chkEnableMusic->isChecked() ? 1 : 0)); + std::fprintf(fp, "#Volume of sound and music, between 0 and 100\n"); + int vol = gameConf.sound_volume * 100; + std::fprintf(fp, "sound_volume = %d\n", vol); + vol = gameConf.music_volume * 100; + std::fprintf(fp, "music_volume = %d\n", vol); + std::fprintf(fp, "music_mode = %d\n", (chkMusicMode->isChecked() ? 1 : 0)); +#endif + std::fclose(fp); } -void Game::ShowCardInfo(int code) { - CardData cd; +void Game::ShowCardInfo(int code, bool resize) { + if(showingcode == code && !resize) + return; wchar_t formatBuffer[256]; - if(!dataManager.GetData(code, &cd)) - memset(&cd, 0, sizeof(CardData)); - imgCard->setImage(imageManager.GetTexture(code)); - imgCard->setScaleImage(true); - if(cd.alias != 0 && (cd.alias - code < 10 || code - cd.alias < 10)) - myswprintf(formatBuffer, L"%ls[%08d]", dataManager.GetName(cd.alias), cd.alias); - else myswprintf(formatBuffer, L"%ls[%08d]", dataManager.GetName(code), code); + auto& _datas = dataManager.GetDataTable(); + auto cit = _datas.find(code); + bool is_valid = (cit != _datas.end()); + imgCard->setImage(imageManager.GetTexture(code, true)); + if (is_valid) { + auto& cd = cit->second; + if (is_alternative(cd.code,cd.alias)) + myswprintf(formatBuffer, L"%ls[%08d]", dataManager.GetName(cd.alias), cd.alias); + else + myswprintf(formatBuffer, L"%ls[%08d]", dataManager.GetName(code), code); + } + else { + myswprintf(formatBuffer, L"%ls[%08d]", dataManager.GetName(code), code); + } stName->setText(formatBuffer); - if(cd.type & TYPE_MONSTER) { - myswprintf(formatBuffer, L"[%ls] %ls/%ls", dataManager.FormatType(cd.type), dataManager.FormatRace(cd.race), dataManager.FormatAttribute(cd.attribute)); - stInfo->setText(formatBuffer); - formatBuffer[0] = L'['; - for(unsigned int i = 1; i <= cd.level; ++i) - formatBuffer[i] = 0x2605; - formatBuffer[cd.level + 1] = L']'; - formatBuffer[cd.level + 2] = L' '; - if(cd.attack < 0 && cd.defence < 0) - myswprintf(&formatBuffer[cd.level + 3], L"?/?"); - else if(cd.attack < 0) - myswprintf(&formatBuffer[cd.level + 3], L"?/%d", cd.defence); - else if(cd.defence < 0) - myswprintf(&formatBuffer[cd.level + 3], L"%d/?", cd.attack); + if((int)guiFont->getDimension(formatBuffer).Width > stName->getRelativePosition().getWidth() - gameConf.textfontsize) + stName->setToolTipText(formatBuffer); + else + stName->setToolTipText(nullptr); + int offset = 0; + if (is_valid && !gameConf.hide_setname) { + auto& cd = cit->second; + auto target = cit; + if (cd.alias && _datas.find(cd.alias) != _datas.end()) { + target = _datas.find(cd.alias); + } + if (target->second.setcode[0]) { + offset = 23;// *yScale; + const auto& setname = dataManager.FormatSetName(target->second.setcode); + myswprintf(formatBuffer, L"%ls%ls", dataManager.GetSysString(1329), setname.c_str()); + stSetName->setText(formatBuffer); + } else - myswprintf(&formatBuffer[cd.level + 3], L"%d/%d", cd.attack, cd.defence); + stSetName->setText(L""); + } + else { + stSetName->setText(L""); + } + if(is_valid && cit->second.type & TYPE_MONSTER) { + auto& cd = cit->second; + const auto& type = dataManager.FormatType(cd.type); + const auto& race = dataManager.FormatRace(cd.race); + const auto& attribute = dataManager.FormatAttribute(cd.attribute); + myswprintf(formatBuffer, L"[%ls] %ls/%ls", type.c_str(), race.c_str(), attribute.c_str()); + stInfo->setText(formatBuffer); + int offset_info = 0; + irr::core::dimension2d dtxt = guiFont->getDimension(formatBuffer); + if(dtxt.Width > (300 * xScale - 13) - 15) + offset_info = 15; + const wchar_t* form = L"\u2605"; + wchar_t adBuffer[64]{}; + wchar_t scaleBuffer[16]{}; + if(!(cd.type & TYPE_LINK)) { + if(cd.type & TYPE_XYZ) + form = L"\u2606"; + if(cd.attack < 0 && cd.defense < 0) + myswprintf(adBuffer, L"?/?"); + else if(cd.attack < 0) + myswprintf(adBuffer, L"?/%d", cd.defense); + else if(cd.defense < 0) + myswprintf(adBuffer, L"%d/?", cd.attack); + else + myswprintf(adBuffer, L"%d/%d", cd.attack, cd.defense); + } else { + form = L"LINK-"; + const auto& link_marker = dataManager.FormatLinkMarker(cd.link_marker); + if(cd.attack < 0) + myswprintf(adBuffer, L"?/- %ls", link_marker.c_str()); + else + myswprintf(adBuffer, L"%d/- %ls", cd.attack, link_marker.c_str()); + } if(cd.type & TYPE_PENDULUM) { - wchar_t scaleBuffer[16]; myswprintf(scaleBuffer, L" %d/%d", cd.lscale, cd.rscale); - wcscat(formatBuffer, scaleBuffer); } + myswprintf(formatBuffer, L"[%ls%d] %ls%ls", form, cd.level, adBuffer, scaleBuffer); stDataInfo->setText(formatBuffer); - stText->setRelativePosition(rect(15, 83, 287, 324)); - scrCardText->setRelativePosition(rect(267, 83, 287, 324)); - } else { - myswprintf(formatBuffer, L"[%ls]", dataManager.FormatType(cd.type)); + int offset_arrows = offset_info; + dtxt = guiFont->getDimension(formatBuffer); + if(dtxt.Width > (300 * xScale - 13) - 15) + offset_arrows += 15; + stInfo->setRelativePosition(irr::core::rect(15, 37, 300 * xScale - 13, (60 + offset_info))); + stDataInfo->setRelativePosition(irr::core::rect(15, (60 + offset_info), 300 * xScale - 13, (83 + offset_arrows))); + stSetName->setRelativePosition(irr::core::rect(15, (83 + offset_arrows), 296 * xScale, (83 + offset_arrows) + offset)); + stText->setRelativePosition(irr::core::rect(15, (83 + offset_arrows) + offset, 287 * xScale, 324 * yScale)); + scrCardText->setRelativePosition(irr::core::rect(287 * xScale - 20, (83 + offset_arrows) + offset, 287 * xScale, 324 * yScale)); + } + else { + if (is_valid) { + const auto& type = dataManager.FormatType(cit->second.type); + myswprintf(formatBuffer, L"[%ls]", type.c_str()); + } + else + myswprintf(formatBuffer, L"[%ls]", dataManager.unknown_string); stInfo->setText(formatBuffer); stDataInfo->setText(L""); - stText->setRelativePosition(rect(15, 60, 287, 324)); - scrCardText->setRelativePosition(rect(267, 60, 287, 324)); + stSetName->setRelativePosition(irr::core::rect(15, 60, 296 * xScale, 60 + offset)); + stText->setRelativePosition(irr::core::rect(15, 60 + offset, 287 * xScale, 324 * yScale)); + scrCardText->setRelativePosition(irr::core::rect(287 * xScale - 20, 60 + offset, 287 * xScale, 324 * yScale)); } + showingcode = code; showingtext = dataManager.GetText(code); const auto& tsize = stText->getRelativePosition(); - InitStaticText(stText, tsize.getWidth(), tsize.getHeight(), textFont, showingtext); + InitStaticText(stText, tsize.getWidth(), tsize.getHeight(), guiFont, showingtext); } -void Game::AddChatMsg(wchar_t* msg, int player) { +void Game::ClearCardInfo(int player) { + imgCard->setImage(imageManager.tCover[player]); + showingcode = 0; + stName->setText(L""); + stInfo->setText(L""); + stDataInfo->setText(L""); + stSetName->setText(L""); + stText->setText(L""); + scrCardText->setVisible(false); +} +void Game::AddLog(const wchar_t* msg, int param) { + logParam.push_back(param); + lstLog->addItem(msg); + if(!env->hasFocus(lstLog)) { + lstLog->setSelected(-1); + } +} +void Game::AddChatMsg(const wchar_t* msg, int player, bool play_sound) { for(int i = 7; i > 0; --i) { chatMsg[i] = chatMsg[i - 1]; chatTiming[i] = chatTiming[i - 1]; @@ -923,6 +1662,10 @@ void Game::AddChatMsg(wchar_t* msg, int player) { chatMsg[0].clear(); chatTiming[0] = 1200; chatType[0] = player; + if(gameConf.hide_player_name && player < 4) + player = 10; + if(play_sound) + soundManager.PlaySoundEffect(SOUND_CHAT); switch(player) { case 0: //from host chatMsg[0].append(dInfo.hostname); @@ -941,14 +1684,17 @@ void Game::AddChatMsg(wchar_t* msg, int player) { chatMsg[0].append(L": "); break; case 7: //local name - chatMsg[0].append(mainGame->ebNickName->getText()); + chatMsg[0].append(ebNickName->getText()); chatMsg[0].append(L": "); break; case 8: //system custom message, no prefix. chatMsg[0].append(L"[System]: "); break; case 9: //error message - chatMsg[0].append(L"[Script error:] "); + chatMsg[0].append(L"[Script Error]: "); + break; + case 10: //hidden name + chatMsg[0].append(L"[********]: "); break; default: //from watcher or unknown if(player < 11 || player > 19) @@ -956,18 +1702,60 @@ void Game::AddChatMsg(wchar_t* msg, int player) { } chatMsg[0].append(msg); } +void Game::ClearChatMsg() { + for(int i = 7; i >= 0; --i) { + chatTiming[i] = 0; + } +} +void Game::AddDebugMsg(const char* msg) { + if (enable_log & 0x1) { + wchar_t wbuf[1024]; + BufferIO::DecodeUTF8(msg, wbuf); + AddChatMsg(wbuf, 9); + } + if (enable_log & 0x2) { + char msgbuf[1040]; + mysnprintf(msgbuf, "[Script Error]: %s", msg); + ErrorLog(msgbuf); + } +} +void Game::ErrorLog(const char* msg) { +#ifdef _WIN32 + OutputDebugStringA(msg); +#else + std::fprintf(stderr, "%s\n", msg); +#endif + FILE* fp = myfopen("error.log", "a"); + if(!fp) + return; + time_t nowtime = std::time(nullptr); + char timebuf[40]; + std::strftime(timebuf, sizeof timebuf, "%Y-%m-%d %H:%M:%S", std::localtime(&nowtime)); + std::fprintf(fp, "[%s]%s\n", timebuf, msg); + std::fclose(fp); +} void Game::ClearTextures() { matManager.mCard.setTexture(0, 0); - mainGame->imgCard->setImage(0); - mainGame->btnPSAU->setImage(); - mainGame->btnPSDU->setImage(); + ClearCardInfo(0); + btnPSAU->setImage(); + btnPSDU->setImage(); for(int i=0; i<=4; ++i) { - mainGame->btnCardSelect[i]->setImage(); - mainGame->btnCardDisplay[i]->setImage(); + btnCardSelect[i]->setImage(); + btnCardDisplay[i]->setImage(); } imageManager.ClearTexture(); } -void Game::CloseDuelWindow() { +void Game::CloseGameButtons() { + btnChainIgnore->setVisible(false); + btnChainAlways->setVisible(false); + btnChainWhenAvail->setVisible(false); + btnCancelOrFinish->setVisible(false); + btnSpectatorSwap->setVisible(false); + btnShuffle->setVisible(false); + wSurrender->setVisible(false); +} +void Game::CloseGameWindow() { + CloseGameButtons(); for(auto wit = fadingList.begin(); wit != fadingList.end(); ++wit) { if(wit->isFadein) wit->autoFadeoutFrame = 1; @@ -977,13 +1765,11 @@ void Game::CloseDuelWindow() { wANCard->setVisible(false); wANNumber->setVisible(false); wANRace->setVisible(false); - wCardImg->setVisible(false); wCardSelect->setVisible(false); wCardDisplay->setVisible(false); wCmdMenu->setVisible(false); wFTSelect->setVisible(false); wHand->setVisible(false); - wInfos->setVisible(false); wMessage->setVisible(false); wOptions->setVisible(false); wPhase->setVisible(false); @@ -992,21 +1778,400 @@ void Game::CloseDuelWindow() { wReplayControl->setVisible(false); wReplaySave->setVisible(false); stHintMsg->setVisible(false); + stTip->setVisible(false); +} +void Game::CloseDuelWindow() { + CloseGameWindow(); + wCardImg->setVisible(false); + wInfos->setVisible(false); + wChat->setVisible(false); btnSideOK->setVisible(false); + btnSideShuffle->setVisible(false); + btnSideSort->setVisible(false); + btnSideReload->setVisible(false); btnLeaveGame->setVisible(false); - wChat->setVisible(false); + btnSpectatorSwap->setVisible(false); lstLog->clear(); logParam.clear(); lstHostList->clear(); DuelClient::hosts.clear(); ClearTextures(); + ResizeChatInputWindow(); closeDoneSignal.Set(); } -int Game::LocalPlayer(int player) { - return dInfo.isFirst ? player : 1 - player; +int Game::LocalPlayer(int player) const { + int pid = player ? 1 : 0; + return dInfo.isFirst ? pid : 1 - pid; +} +int Game::OppositePlayer(int player) { + auto player_side_bit = dInfo.isTag ? 0x2 : 0x1; + return player ^ player_side_bit; +} +int Game::ChatLocalPlayer(int player) { + if(player > 3) + return player; + bool is_self; + if(dInfo.isStarted || is_siding) { + if(dInfo.isInDuel) + // when in duel + player = mainGame->dInfo.isFirst ? player : OppositePlayer(player); + else { + // when changing side or waiting tp result + auto selftype_boundary = dInfo.isTag ? 2 : 1; + if(DuelClient::selftype >= selftype_boundary && DuelClient::selftype < 4) + player = OppositePlayer(player); + } + if (DuelClient::selftype >= 4) { + is_self = false; + } else if (dInfo.isTag) { + is_self = (player & 0x2) == 0 && (player & 0x1) == (DuelClient::selftype & 0x1); + } else { + is_self = player == 0; + } + } else { + // when in lobby + is_self = player == DuelClient::selftype; + } + if(dInfo.isTag && (player == 1 || player == 2)) { + player = 3 - player; + } + return player | (is_self ? 0x10 : 0); } const wchar_t* Game::LocalName(int local_player) { return local_player == 0 ? dInfo.hostname : dInfo.clientname; } +void Game::OnResize() { +#ifdef _WIN32 + WINDOWPLACEMENT plc; + plc.length = sizeof(WINDOWPLACEMENT); + if(GetWindowPlacement(hWnd, &plc)) + gameConf.window_maximized = (plc.showCmd == SW_SHOWMAXIMIZED); +#endif // _WIN32 + if(!gameConf.window_maximized) { + gameConf.window_width = window_size.Width; + gameConf.window_height = window_size.Height; + } + + irr::gui::CGUITTFont* old_numFont = numFont; + irr::gui::CGUITTFont* old_adFont = adFont; + irr::gui::CGUITTFont* old_lpcFont = lpcFont; + irr::gui::CGUITTFont* old_textFont = textFont; + numFont = irr::gui::CGUITTFont::createTTFont(env, gameConf.numfont, (yScale > 0.5 ? 16 * yScale : 8)); + adFont = irr::gui::CGUITTFont::createTTFont(env, gameConf.numfont, (yScale > 0.75 ? 12 * yScale : 9)); + lpcFont = irr::gui::CGUITTFont::createTTFont(env, gameConf.numfont, 48 * yScale); + textFont = irr::gui::CGUITTFont::createTTFont(env, gameConf.textfont, (yScale > 0.642 ? gameConf.textfontsize * yScale : 9)); + old_numFont->drop(); + old_adFont->drop(); + old_lpcFont->drop(); + old_textFont->drop(); + + imageManager.ClearTexture(); + imageManager.ResizeTexture(); + + wMainMenu->setRelativePosition(ResizeWin(370, 200, 650, 415)); + wDeckEdit->setRelativePosition(Resize(309, 5, 605, 130)); + cbDBDecks->setRelativePosition(Resize(80, 35, 220, 60)); + btnClearDeck->setRelativePosition(Resize(115, 99, 165, 120)); + btnSortDeck->setRelativePosition(Resize(60, 99, 110, 120)); + btnShuffleDeck->setRelativePosition(Resize(5, 99, 55, 120)); + btnSaveDeck->setRelativePosition(Resize(225, 35, 290, 60)); + btnSaveDeckAs->setRelativePosition(Resize(225, 65, 290, 90)); + ebDeckname->setRelativePosition(Resize(80, 65, 220, 90)); + cbDBCategory->setRelativePosition(Resize(80, 5, 220, 30)); + btnManageDeck->setRelativePosition(Resize(225, 5, 290, 30)); + wDeckManage->setRelativePosition(ResizeWin(310, 135, 800, 515)); + scrPackCards->setRelativePosition(Resize(775, 161, 795, 629)); + + wSort->setRelativePosition(Resize(930, 132, 1020, 156)); + cbSortType->setRelativePosition(Resize(10, 2, 85, 22)); + wFilter->setRelativePosition(Resize(610, 5, 1020, 130)); + scrFilter->setRelativePosition(Resize(999, 161, 1019, 629)); + cbCardType->setRelativePosition(Resize(60, 25 / 6, 120, 20 + 25 / 6)); + cbCardType2->setRelativePosition(Resize(125, 25 / 6, 195, 20 + 25 / 6)); + cbRace->setRelativePosition(Resize(60, 40 + 75 / 6, 195, 60 + 75 / 6)); + cbAttribute->setRelativePosition(Resize(60, 20 + 50 / 6, 195, 40 + 50 / 6)); + cbLimit->setRelativePosition(Resize(260, 25 / 6, 390, 20 + 25 / 6)); + ebStar->setRelativePosition(Resize(60, 60 + 100 / 6, 95, 80 + 100 / 6)); + ebScale->setRelativePosition(Resize(155, 60 + 100 / 6, 195, 80 + 100 / 6)); + ebAttack->setRelativePosition(Resize(260, 20 + 50 / 6, 340, 40 + 50 / 6)); + ebDefense->setRelativePosition(Resize(260, 40 + 75 / 6, 340, 60 + 75 / 6)); + ebCardName->setRelativePosition(Resize(260, 60 + 100 / 6, 390, 80 + 100 / 6)); + btnEffectFilter->setRelativePosition(Resize(345, 20 + 50 / 6, 390, 60 + 75 / 6)); + btnStartFilter->setRelativePosition(Resize(260, 80 + 125 / 6, 390, 100 + 125 / 6)); + if(btnClearFilter) + btnClearFilter->setRelativePosition(Resize(205, 80 + 125 / 6, 255, 100 + 125 / 6)); + btnMarksFilter->setRelativePosition(Resize(60, 80 + 125 / 6, 195, 100 + 125 / 6)); + + irr::core::recti btncatepos = btnEffectFilter->getAbsolutePosition(); + wCategories->setRelativePosition(irr::core::recti( + btncatepos.LowerRightCorner.X - wCategories->getRelativePosition().getWidth(), + btncatepos.LowerRightCorner.Y - btncatepos.getHeight() / 2, + btncatepos.LowerRightCorner.X, + btncatepos.LowerRightCorner.Y - btncatepos.getHeight() / 2 + 245)); + + wLinkMarks->setRelativePosition(ResizeWin(700, 30, 820, 150)); + stDBCategory->setRelativePosition(Resize(10, 9, 100, 29)); + stDeck->setRelativePosition(Resize(10, 39, 100, 59)); + stCategory->setRelativePosition(Resize(10, 2 + 25 / 6, 70, 22 + 25 / 6)); + stLimit->setRelativePosition(Resize(205, 2 + 25 / 6, 280, 22 + 25 / 6)); + stAttribute->setRelativePosition(Resize(10, 22 + 50 / 6, 70, 42 + 50 / 6)); + stRace->setRelativePosition(Resize(10, 42 + 75 / 6, 70, 62 + 75 / 6)); + stAttack->setRelativePosition(Resize(205, 22 + 50 / 6, 280, 42 + 50 / 6)); + stDefense->setRelativePosition(Resize(205, 42 + 75 / 6, 280, 62 + 75 / 6)); + stStar->setRelativePosition(Resize(10, 62 + 100 / 6, 70, 82 + 100 / 6)); + stSearch->setRelativePosition(Resize(205, 62 + 100 / 6, 280, 82 + 100 / 6)); + stScale->setRelativePosition(Resize(105, 62 + 100 / 6, 165, 82 + 100 / 6)); + btnSideOK->setRelativePosition(Resize(400, 40, 710, 80)); + btnSideShuffle->setRelativePosition(Resize(310, 100, 370, 130)); + btnSideSort->setRelativePosition(Resize(375, 100, 435, 130)); + btnSideReload->setRelativePosition(Resize(440, 100, 500, 130)); + btnDeleteDeck->setRelativePosition(Resize(225, 95, 290, 120)); + + wLanWindow->setRelativePosition(ResizeWin(220, 100, 800, 520)); + wCreateHost->setRelativePosition(ResizeWin(320, 100, 700, 520)); + wHostPrepare->setRelativePosition(ResizeWin(270, 120, 750, 440)); + wReplay->setRelativePosition(ResizeWin(220, 100, 800, 520)); + wSinglePlay->setRelativePosition(ResizeWin(220, 100, 800, 520)); + + wHand->setRelativePosition(ResizeWin(500, 450, 825, 605)); + wFTSelect->setRelativePosition(ResizeWin(550, 240, 780, 340)); + wMessage->setRelativePosition(ResizeWin(490, 200, 840, 340)); + wACMessage->setRelativePosition(ResizeWin(490, 240, 840, 300)); + wQuery->setRelativePosition(ResizeWin(490, 200, 840, 340)); + wSurrender->setRelativePosition(ResizeWin(490, 200, 840, 340)); + wOptions->setRelativePosition(ResizeWin(490, 200, 840, 340)); + wPosSelect->setRelativePosition(ResizeWin(340, 200, 935, 410)); + wCardSelect->setRelativePosition(ResizeWin(320, 100, 1000, 400)); + wANNumber->setRelativePosition(ResizeWin(550, 180, 780, 430)); + wANCard->setRelativePosition(ResizeWin(510, 120, 820, 420)); + wANAttribute->setRelativePosition(ResizeWin(500, 200, 830, 285)); + wANRace->setRelativePosition(ResizeWin(480, 200, 850, 410)); + wReplaySave->setRelativePosition(ResizeWin(510, 200, 820, 320)); + wDMQuery->setRelativePosition(ResizeWin(400, 200, 710, 320)); + + stHintMsg->setRelativePosition(ResizeWin(660 - 160 * xScale, 60, 660 + 160 * xScale, 90)); + + //sound / music volume bar + scrSoundVolume->setRelativePosition(irr::core::recti(scrSoundVolume->getRelativePosition().UpperLeftCorner.X, scrSoundVolume->getRelativePosition().UpperLeftCorner.Y, 20 + (300 * xScale) - 70, scrSoundVolume->getRelativePosition().LowerRightCorner.Y)); + scrMusicVolume->setRelativePosition(irr::core::recti(scrMusicVolume->getRelativePosition().UpperLeftCorner.X, scrMusicVolume->getRelativePosition().UpperLeftCorner.Y, 20 + (300 * xScale) - 70, scrMusicVolume->getRelativePosition().LowerRightCorner.Y)); + + irr::core::recti tabHelperPos = irr::core::recti(0, 0, 300 * xScale - 50, 365 * yScale - 65); + tabHelper->setRelativePosition(tabHelperPos); + scrTabHelper->setRelativePosition(irr::core::recti(tabHelperPos.LowerRightCorner.X + 2, 0, tabHelperPos.LowerRightCorner.X + 22, tabHelperPos.LowerRightCorner.Y)); + irr::s32 tabHelperLastY = elmTabHelperLast->getRelativePosition().LowerRightCorner.Y; + if(tabHelperLastY > tabHelperPos.LowerRightCorner.Y) { + scrTabHelper->setMax(tabHelperLastY - tabHelperPos.LowerRightCorner.Y + 5); + scrTabHelper->setPos(0); + scrTabHelper->setVisible(true); + } + else + scrTabHelper->setVisible(false); + + irr::core::recti tabSystemPos = irr::core::recti(0, 0, 300 * xScale - 50, 365 * yScale - 65); + tabSystem->setRelativePosition(tabSystemPos); + scrTabSystem->setRelativePosition(irr::core::recti(tabSystemPos.LowerRightCorner.X + 2, 0, tabSystemPos.LowerRightCorner.X + 22, tabSystemPos.LowerRightCorner.Y)); + irr::s32 tabSystemLastY = elmTabSystemLast->getRelativePosition().LowerRightCorner.Y; + if(tabSystemLastY > tabSystemPos.LowerRightCorner.Y) { + scrTabSystem->setMax(tabSystemLastY - tabSystemPos.LowerRightCorner.Y + 5); + scrTabSystem->setPos(0); + scrTabSystem->setVisible(true); + } else + scrTabSystem->setVisible(false); + + if(gameConf.resize_popup_menu) { + int width = 100 * xScale; + int height = (yScale >= 0.666) ? 21 * yScale : 14; + wCmdMenu->setRelativePosition(irr::core::recti(1, 1, width + 1, 1)); + btnActivate->setRelativePosition(irr::core::recti(1, 1, width, height)); + btnSummon->setRelativePosition(irr::core::recti(1, 1, width, height)); + btnSPSummon->setRelativePosition(irr::core::recti(1, 1, width, height)); + btnMSet->setRelativePosition(irr::core::recti(1, 1, width, height)); + btnSSet->setRelativePosition(irr::core::recti(1, 1, width, height)); + btnRepos->setRelativePosition(irr::core::recti(1, 1, width, height)); + btnAttack->setRelativePosition(irr::core::recti(1, 1, width, height)); + btnActivate->setRelativePosition(irr::core::recti(1, 1, width, height)); + btnShowList->setRelativePosition(irr::core::recti(1, 1, width, height)); + btnOperation->setRelativePosition(irr::core::recti(1, 1, width, height)); + btnReset->setRelativePosition(irr::core::recti(1, 1, width, height)); + } + + wCardImg->setRelativePosition(ResizeCardImgWin(1, 1, 20, 18)); + imgCard->setRelativePosition(ResizeCardImgWin(10, 9, 0, 0)); + wInfos->setRelativePosition(Resize(1, 275, 301, 639)); + stName->setRelativePosition(irr::core::recti(10, 10, 300 * xScale - 13, 10 + 22)); + lstLog->setRelativePosition(Resize(10, 10, 290, 290)); + if(showingcode) + ShowCardInfo(showingcode, true); + else + ClearCardInfo(); + btnClearLog->setRelativePosition(Resize(160, 300, 260, 325)); + + wPhase->setRelativePosition(Resize(480, 310, 855, 330)); + btnPhaseStatus->setRelativePosition(Resize(0, 0, 50, 20)); + btnBP->setRelativePosition(Resize(160, 0, 210, 20)); + btnM2->setRelativePosition(Resize(160, 0, 210, 20)); + btnEP->setRelativePosition(Resize(320, 0, 370, 20)); + + ResizeChatInputWindow(); + + btnLeaveGame->setRelativePosition(Resize(205, 5, 295, 80)); + wReplayControl->setRelativePosition(Resize(205, 143, 295, 273)); + btnReplayStart->setRelativePosition(Resize(5, 5, 85, 25)); + btnReplayPause->setRelativePosition(Resize(5, 5, 85, 25)); + btnReplayStep->setRelativePosition(Resize(5, 55, 85, 75)); + btnReplayUndo->setRelativePosition(Resize(5, 80, 85, 100)); + btnReplaySwap->setRelativePosition(Resize(5, 30, 85, 50)); + btnReplayExit->setRelativePosition(Resize(5, 105, 85, 125)); + + btnSpectatorSwap->setRelativePosition(Resize(205, 100, 295, 135)); + btnChainAlways->setRelativePosition(Resize(205, 140, 295, 175)); + btnChainIgnore->setRelativePosition(Resize(205, 100, 295, 135)); + btnChainWhenAvail->setRelativePosition(Resize(205, 180, 295, 215)); + btnShuffle->setRelativePosition(Resize(205, 230, 295, 265)); + btnCancelOrFinish->setRelativePosition(Resize(205, 230, 295, 265)); + + btnBigCardOriginalSize->setRelativePosition(Resize(205, 100, 295, 135)); + btnBigCardZoomIn->setRelativePosition(Resize(205, 140, 295, 175)); + btnBigCardZoomOut->setRelativePosition(Resize(205, 180, 295, 215)); + btnBigCardClose->setRelativePosition(Resize(205, 230, 295, 265)); + + irr::s32 barWidth = (xScale > 1) ? gameConf.textfontsize * xScale : gameConf.textfontsize; + env->getSkin()->setSize(irr::gui::EGDS_SCROLLBAR_SIZE, barWidth); +} +void Game::ResizeChatInputWindow() { + irr::s32 x = wInfos->getRelativePosition().LowerRightCorner.X + 6; + if(is_building) x = 802 * xScale; + wChat->setRelativePosition(irr::core::recti(x, window_size.Height - 25, window_size.Width, window_size.Height)); + ebChatInput->setRelativePosition(irr::core::recti(3, 2, window_size.Width - wChat->getRelativePosition().UpperLeftCorner.X - 6, 22)); +} +irr::core::recti Game::Resize(irr::s32 x, irr::s32 y, irr::s32 x2, irr::s32 y2) { + x = x * xScale; + y = y * yScale; + x2 = x2 * xScale; + y2 = y2 * yScale; + return irr::core::recti(x, y, x2, y2); +} +irr::core::recti Game::Resize(irr::s32 x, irr::s32 y, irr::s32 x2, irr::s32 y2, irr::s32 dx, irr::s32 dy, irr::s32 dx2, irr::s32 dy2) { + x = x * xScale + dx; + y = y * yScale + dy; + x2 = x2 * xScale + dx2; + y2 = y2 * yScale + dy2; + return irr::core::recti(x, y, x2, y2); +} +irr::core::vector2di Game::Resize(irr::s32 x, irr::s32 y) { + x = x * xScale; + y = y * yScale; + return irr::core::vector2di(x, y); +} +irr::core::vector2di Game::ResizeReverse(irr::s32 x, irr::s32 y) { + x = x / xScale; + y = y / yScale; + return irr::core::vector2di(x, y); +} +irr::core::recti Game::ResizeWin(irr::s32 x, irr::s32 y, irr::s32 x2, irr::s32 y2) { + irr::s32 w = x2 - x; + irr::s32 h = y2 - y; + x = (x + w / 2) * xScale - w / 2; + y = (y + h / 2) * yScale - h / 2; + x2 = w + x; + y2 = h + y; + return irr::core::recti(x, y, x2, y2); +} +irr::core::recti Game::ResizePhaseHint(irr::s32 x, irr::s32 y, irr::s32 x2, irr::s32 y2, irr::s32 width) { + x = x * xScale - width / 2; + y = y * yScale; + x2 = x2 * xScale; + y2 = y2 * yScale; + return irr::core::recti(x, y, x2, y2); +} +irr::core::recti Game::ResizeCardImgWin(irr::s32 x, irr::s32 y, irr::s32 mx, irr::s32 my) { + float mul = xScale; + if(xScale > yScale) + mul = yScale; + irr::s32 w = CARD_IMG_WIDTH * mul + mx * xScale; + irr::s32 h = CARD_IMG_HEIGHT * mul + my * yScale; + x = x * xScale; + y = y * yScale; + return irr::core::recti(x, y, x + w, y + h); +} +irr::core::recti Game::ResizeCardHint(irr::s32 x, irr::s32 y, irr::s32 x2, irr::s32 y2) { + return ResizeCardMid(x, y, x2, y2, (x + x2) * 0.5, (y + y2) * 0.5); +} +irr::core::vector2di Game::ResizeCardHint(irr::s32 x, irr::s32 y) { + return ResizeCardMid(x, y, x + CARD_IMG_WIDTH * 0.5, y + CARD_IMG_HEIGHT * 0.5); +} +irr::core::recti Game::ResizeCardMid(irr::s32 x, irr::s32 y, irr::s32 x2, irr::s32 y2, irr::s32 midx, irr::s32 midy) { + float mul = xScale; + if(xScale > yScale) + mul = yScale; + irr::s32 cx = midx * xScale; + irr::s32 cy = midy * yScale; + x = cx + (x - midx) * mul; + y = cy + (y - midy) * mul; + x2 = cx + (x2 - midx) * mul; + y2 = cy + (y2 - midy) * mul; + return irr::core::recti(x, y, x2, y2); +} +irr::core::vector2di Game::ResizeCardMid(irr::s32 x, irr::s32 y, irr::s32 midx, irr::s32 midy) { + float mul = xScale; + if(xScale > yScale) + mul = yScale; + irr::s32 cx = midx * xScale; + irr::s32 cy = midy * yScale; + x = cx + (x - midx) * mul; + y = cy + (y - midy) * mul; + return irr::core::vector2di(x, y); +} +irr::core::recti Game::ResizeFit(irr::s32 x, irr::s32 y, irr::s32 x2, irr::s32 y2) { + float mul = xScale; + if(xScale > yScale) + mul = yScale; + x = x * mul; + y = y * mul; + x2 = x2 * mul; + y2 = y2 * mul; + return irr::core::recti(x, y, x2, y2); +} +void Game::SetWindowsIcon() { +#ifdef _WIN32 + HINSTANCE hInstance = (HINSTANCE)GetModuleHandleW(nullptr); + HICON hSmallIcon = (HICON)LoadImageW(hInstance, MAKEINTRESOURCEW(1), IMAGE_ICON, 16, 16, LR_DEFAULTCOLOR); + HICON hBigIcon = (HICON)LoadImageW(hInstance, MAKEINTRESOURCEW(1), IMAGE_ICON, 32, 32, LR_DEFAULTCOLOR); + SendMessageW(hWnd, WM_SETICON, ICON_SMALL, (LPARAM)hSmallIcon); + SendMessageW(hWnd, WM_SETICON, ICON_BIG, (LPARAM)hBigIcon); +#endif +} +void Game::SetWindowsScale(float scale) { +#ifdef _WIN32 + WINDOWPLACEMENT plc; + plc.length = sizeof(WINDOWPLACEMENT); + if(GetWindowPlacement(hWnd, &plc) && (plc.showCmd == SW_SHOWMAXIMIZED)) + ShowWindow(hWnd, SW_RESTORE); + RECT rcWindow, rcClient; + GetWindowRect(hWnd, &rcWindow); + GetClientRect(hWnd, &rcClient); + MoveWindow(hWnd, rcWindow.left, rcWindow.top, + (rcWindow.right - rcWindow.left) - rcClient.right + 1024 * scale, + (rcWindow.bottom - rcWindow.top) - rcClient.bottom + 640 * scale, + true); +#endif +} +void Game::FlashWindow() { +#ifdef _WIN32 + FLASHWINFO fi; + fi.cbSize = sizeof(FLASHWINFO); + fi.hwnd = hWnd; + fi.dwFlags = FLASHW_TRAY | FLASHW_TIMERNOFG; + fi.uCount = 0; + fi.dwTimeout = 0; + FlashWindowEx(&fi); +#endif +} +void Game::SetCursor(irr::gui::ECURSOR_ICON icon) { + irr::gui::ICursorControl* cursor = device->getCursorControl(); + if(cursor->getActiveIcon() != icon) { + cursor->setActiveIcon(icon); + } +} } diff --git a/gframe/game.h b/gframe/game.h index 436a985516..48acdfd5f1 100644 --- a/gframe/game.h +++ b/gframe/game.h @@ -2,53 +2,149 @@ #define GAME_H #include "config.h" +#ifdef __APPLE__ +#include +#include +#else //__APPLE__ +#include +#include +#endif //__APPLE__ +#include "CGUIImageButton.h" +#include "CGUITTFont.h" +#include "mysignal.h" #include "client_field.h" #include "deck_con.h" #include "menu_handler.h" +#include #include #include #include +#include +#include namespace ygo { +constexpr int DEFAULT_DUEL_RULE = CURRENT_RULE; +constexpr int CONFIG_LINE_SIZE = 1024; +constexpr int TEXT_LINE_SIZE = 256; + +template +bool IsExtension(const wchar_t* filename, const wchar_t(&extension)[N]) { + auto flen = std::wcslen(filename); + constexpr size_t elen = N - 1; + if (!elen || flen < elen) + return false; + return !mywcsncasecmp(filename + (flen - elen), extension, elen); +} + +template +bool IsExtension(const char* filename, const char(&extension)[N]) { + auto flen = std::strlen(filename); + constexpr size_t elen = N - 1; + if (!elen || flen < elen) + return false; + return !mystrncasecmp(filename + (flen - elen), extension, elen); +} + struct Config { - bool use_d3d; - unsigned short antialias; - unsigned short serverport; - unsigned char textfontsize; - wchar_t lastip[20]; - wchar_t lastport[10]; - wchar_t nickname[20]; - wchar_t gamename[20]; - wchar_t lastdeck[64]; - wchar_t textfont[256]; - wchar_t numfont[256]; - wchar_t roompass[20]; + bool use_d3d{ false }; + bool use_image_scale_multi_thread{ true }; +#ifdef _OPENMP + bool use_image_load_background_thread{ false }; +#else + bool use_image_load_background_thread{ true }; +#endif + unsigned short antialias{ 0 }; + unsigned short serverport{ 7911 }; + unsigned char textfontsize{ 14 }; + wchar_t lasthost[100]{}; + wchar_t lastport[10]{}; + wchar_t nickname[20]{}; + wchar_t gamename[20]{}; + wchar_t roompass[20]{}; + //path + wchar_t lastcategory[256]{}; + wchar_t lastdeck[256]{}; + wchar_t textfont[256]{}; + wchar_t numfont[256]{}; + wchar_t bot_deck_path[256]{}; + //settings + int chkMAutoPos{ 0 }; + int chkSTAutoPos{ 1 }; + int chkRandomPos{ 0 }; + int chkAutoChain{ 0 }; + int chkWaitChain{ 0 }; + int chkDefaultShowChain{ 0 }; + int chkIgnore1{ 0 }; + int chkIgnore2{ 0 }; + int use_lflist{ 1 }; + int default_lflist{ 0 }; + int default_rule{ DEFAULT_DUEL_RULE }; + int hide_setname{ 0 }; + int hide_hint_button{ 0 }; + int control_mode{ 0 }; + int draw_field_spell{ 1 }; + int separate_clear_button{ 1 }; + int auto_search_limit{ -1 }; + int search_multiple_keywords{ 1 }; + int chkIgnoreDeckChanges{ 0 }; + int defaultOT{ 1 }; + int enable_bot_mode{ 0 }; + int quick_animation{ 0 }; + int auto_save_replay{ 0 }; + int draw_single_chain{ 0 }; + int hide_player_name{ 0 }; + int prefer_expansion_script{ 0 }; + bool enable_sound{ true }; + bool enable_music{ true }; + double sound_volume{ 0.5 }; + double music_volume{ 0.5 }; + int music_mode{ 1 }; + bool window_maximized{ false }; + int window_width{ 1024 }; + int window_height{ 640 }; + bool resize_popup_menu{ false }; }; struct DuelInfo { - bool isStarted; - bool isReplay; - bool isReplaySkiping; - bool isFirst; - bool isTag; - bool isSingleMode; - bool is_shuffling; - bool tag_player[2]; - int lp[2]; - int turn; - short curMsg; - wchar_t hostname[20]; - wchar_t clientname[20]; - wchar_t hostname_tag[20]; - wchar_t clientname_tag[20]; - wchar_t strLP[2][16]; - wchar_t strTurn[8]; - wchar_t* vic_string; - unsigned char player_type; - unsigned char time_player; - unsigned short time_limit; - unsigned short time_left[2]; + bool isStarted{ false }; + bool isInDuel{ false }; + bool isFinished{false}; + bool isReplay{ false }; + bool isReplaySkiping{ false }; + bool isFirst{ false }; + bool isTag{ false }; + bool isSingleMode{ false }; + bool is_shuffling{ false }; + bool tag_player[2]{}; + bool isReplaySwapped{ false }; + int lp[2]{}; + int start_lp{ 0 }; + int duel_rule{ 0 }; + int turn{ 0 }; + short curMsg{ 0 }; + wchar_t hostname[20]{}; + wchar_t clientname[20]{}; + wchar_t hostname_tag[20]{}; + wchar_t clientname_tag[20]{}; + wchar_t strLP[2][16]{}; + std::wstring vic_string; + unsigned char player_type{ 0 }; + unsigned char time_player{ 0 }; + unsigned short time_limit{ 0 }; + unsigned short time_left[2]{}; + + void Clear(); +}; + +struct BotInfo { + wchar_t name[256]{}; + wchar_t command[256]{}; + wchar_t desc[256]{}; + bool support_master_rule_3{ false }; + bool support_new_master_rule{ false }; + bool support_master_rule_2020{ false }; + bool select_deckfile{ false }; }; struct FadingUnit { @@ -68,37 +164,88 @@ class Game { public: bool Initialize(); void MainLoop(); - void BuildProjectionMatrix(irr::core::matrix4& mProjection, f32 left, f32 right, f32 bottom, f32 top, f32 znear, f32 zfar); - void InitStaticText(irr::gui::IGUIStaticText* pControl, u32 cWidth, u32 cHeight, irr::gui::CGUITTFont* font, const wchar_t* text); - void SetStaticText(irr::gui::IGUIStaticText* pControl, u32 cWidth, irr::gui::CGUITTFont* font, const wchar_t* text, u32 pos = 0); - void RefreshDeck(irr::gui::IGUIComboBox* cbDeck); + void BuildProjectionMatrix(irr::core::matrix4& mProjection, irr::f32 left, irr::f32 right, irr::f32 bottom, irr::f32 top, irr::f32 znear, irr::f32 zfar); + void InitStaticText(irr::gui::IGUIStaticText* pControl, irr::u32 cWidth, irr::u32 cHeight, irr::gui::CGUITTFont* font, const wchar_t* text); + std::wstring SetStaticText(irr::gui::IGUIStaticText* pControl, irr::u32 cWidth, irr::gui::CGUITTFont* font, const wchar_t* text, irr::u32 pos = 0); + void LoadExpansions(); + void RefreshCategoryDeck(irr::gui::IGUIComboBox* cbCategory, irr::gui::IGUIComboBox* cbDeck, bool selectlastused = true); + void RefreshDeck(irr::gui::IGUIComboBox* cbCategory, irr::gui::IGUIComboBox* cbDeck); + void RefreshDeck(const wchar_t* deckpath, const std::function& additem); void RefreshReplay(); void RefreshSingleplay(); + void RefreshBot(); void DrawSelectionLine(irr::video::S3DVertex* vec, bool strip, int width, float* cv); + void DrawSelectionLine(irr::gui::IGUIElement* element, int width, irr::video::SColor color); void DrawBackGround(); + void DrawLinkedZones(ClientCard* pcard); + void CheckMutual(ClientCard* pcard, int mark); void DrawCards(); void DrawCard(ClientCard* pcard); void DrawMisc(); + void DrawStatus(ClientCard* pcard, int x1, int y1, int x2, int y2); void DrawGUI(); void DrawSpec(); + void DrawBackImage(irr::video::ITexture* texture); void ShowElement(irr::gui::IGUIElement* element, int autoframe = 0); void HideElement(irr::gui::IGUIElement* element, bool set_action = false); void PopupElement(irr::gui::IGUIElement* element, int hideframe = 0); void WaitFrameSignal(int frame); - void DrawThumb(code_pointer cp, position2di pos, std::unordered_map* lflist); + void DrawThumb(code_pointer cp, irr::core::vector2di pos, const LFList* lflist, bool drag = false); void DrawDeckBd(); void LoadConfig(); void SaveConfig(); - void ShowCardInfo(int code); - void AddChatMsg(wchar_t* msg, int player); + void ShowCardInfo(int code, bool resize = false); + void ClearCardInfo(int player = 0); + void AddLog(const wchar_t* msg, int param = 0); + void AddChatMsg(const wchar_t* msg, int player, bool play_sound = false); + void ClearChatMsg(); + void AddDebugMsg(const char* msgbuf); + void ErrorLog(const char* msgbuf); void ClearTextures(); + void CloseGameButtons(); + void CloseGameWindow(); void CloseDuelWindow(); - int LocalPlayer(int player); + int LocalPlayer(int player) const; + int OppositePlayer(int player); + int ChatLocalPlayer(int player); const wchar_t* LocalName(int local_player); - Mutex gMutex; - Mutex gBuffer; + bool HasFocus(irr::gui::EGUI_ELEMENT_TYPE type) const { + irr::gui::IGUIElement* focus = env->getFocus(); + return focus && focus->hasType(type); + } + + void TrimText(irr::gui::IGUIElement* editbox) const { + irr::core::stringw text(editbox->getText()); + text.trim(); + editbox->setText(text.c_str()); + } + + void OnResize(); + void ResizeChatInputWindow(); + irr::core::recti Resize(irr::s32 x, irr::s32 y, irr::s32 x2, irr::s32 y2); + irr::core::recti Resize(irr::s32 x, irr::s32 y, irr::s32 x2, irr::s32 y2, irr::s32 dx, irr::s32 dy, irr::s32 dx2, irr::s32 dy2); + irr::core::vector2di Resize(irr::s32 x, irr::s32 y); + irr::core::vector2di ResizeReverse(irr::s32 x, irr::s32 y); + irr::core::recti ResizePhaseHint(irr::s32 x, irr::s32 y, irr::s32 x2, irr::s32 y2, irr::s32 width); + irr::core::recti ResizeWin(irr::s32 x, irr::s32 y, irr::s32 x2, irr::s32 y2); + irr::core::recti ResizeCardImgWin(irr::s32 x, irr::s32 y, irr::s32 mx, irr::s32 my); + irr::core::recti ResizeCardHint(irr::s32 x, irr::s32 y, irr::s32 x2, irr::s32 y2); + irr::core::vector2di ResizeCardHint(irr::s32 x, irr::s32 y); + irr::core::recti ResizeCardMid(irr::s32 x, irr::s32 y, irr::s32 x2, irr::s32 y2, irr::s32 midx, irr::s32 midy); + irr::core::vector2di ResizeCardMid(irr::s32 x, irr::s32 y, irr::s32 midx, irr::s32 midy); + irr::core::recti ResizeFit(irr::s32 x, irr::s32 y, irr::s32 x2, irr::s32 y2); + + void SetWindowsIcon(); + void SetWindowsScale(float scale); + void FlashWindow(); + void SetCursor(irr::gui::ECURSOR_ICON icon); + template + static void DrawShadowText(irr::gui::CGUITTFont* font, const T& text, const irr::core::rect& position, const irr::core::rect& padding, + irr::video::SColor color = 0xffffffff, irr::video::SColor shadowcolor = 0xff000000, bool hcenter = false, bool vcenter = false, const irr::core::rect* clip = nullptr); + + std::mutex gMutex; Signal frameSignal; Signal actionSignal; Signal replaySignal; @@ -111,35 +258,43 @@ class Game { std::list fadingList; std::vector logParam; std::wstring chatMsg[8]; + std::vector botInfo; - int hideChatTimer; - bool hideChat; - int chatTiming[8]; - int chatType[8]; - unsigned short linePattern; - int waitFrame; - int signalFrame; - int actionParam; - const wchar_t* showingtext; - int showcard; - int showcardcode; - int showcarddif; - int showcardp; - int is_attacking; - int attack_sv; + int hideChatTimer{}; + bool hideChat{}; + int chatTiming[8]{}; + int chatType[8]{}; + unsigned short linePatternD3D{}; + unsigned short linePatternGL{ 0x0f0f }; + int waitFrame{}; + int signalFrame{}; + int actionParam{}; + int showingcode{}; + const wchar_t* showingtext{}; + int showcard{}; + int showcardcode{}; + int showcarddif{}; + int showcardp{}; + int is_attacking{}; + int attack_sv{}; irr::core::vector3df atk_r; irr::core::vector3df atk_t; - float atkdy; - int lpframe; - int lpd; - int lpplayer; - int lpccolor; - wchar_t* lpcstring; - bool always_chain; - bool ignore_chain; - - bool is_building; - bool is_siding; + float atkdy{}; + int lpframe{}; + int lpd{}; + int lpplayer{}; + int lpccolor{}; + std::wstring lpcstring; + bool always_chain{}; + bool ignore_chain{}; + bool chain_when_avail{}; + + bool is_building{}; + bool is_siding{}; + + irr::core::dimension2d window_size; + float xScale{ 1.0f }; + float yScale{ 1.0f }; ClientField dField; DeckBuilder deckBuilder; @@ -148,6 +303,11 @@ class Game { irr::video::IVideoDriver* driver; irr::scene::ISceneManager* smgr; irr::scene::ICameraSceneNode* camera; + +#ifdef _WIN32 + HWND hWnd; +#endif + //GUI irr::gui::IGUIEnvironment* env; irr::gui::CGUITTFont* guiFont; @@ -155,31 +315,60 @@ class Game { irr::gui::CGUITTFont* numFont; irr::gui::CGUITTFont* adFont; irr::gui::CGUITTFont* lpcFont; - std::map imageLoading; + std::unordered_map imageLoading; //card image irr::gui::IGUIStaticText* wCardImg; irr::gui::IGUIImage* imgCard; //hint text irr::gui::IGUIStaticText* stHintMsg; irr::gui::IGUIStaticText* stTip; + irr::gui::IGUIStaticText* stCardListTip; //infos irr::gui::IGUITabControl* wInfos; irr::gui::IGUIStaticText* stName; irr::gui::IGUIStaticText* stInfo; irr::gui::IGUIStaticText* stDataInfo; + irr::gui::IGUIStaticText* stSetName; irr::gui::IGUIStaticText* stText; irr::gui::IGUIScrollBar* scrCardText; - irr::gui::IGUICheckBox* chkAutoPos; - irr::gui::IGUICheckBox* chkRandomPos; - irr::gui::IGUICheckBox* chkAutoChain; - irr::gui::IGUICheckBox* chkWaitChain; irr::gui::IGUIListBox* lstLog; irr::gui::IGUIButton* btnClearLog; irr::gui::IGUIButton* btnSaveLog; + irr::gui::IGUIWindow* tabHelper; + irr::gui::IGUIElement* elmTabHelperLast; + irr::gui::IGUIScrollBar* scrTabHelper; + irr::gui::IGUICheckBox* chkMAutoPos; + irr::gui::IGUICheckBox* chkSTAutoPos; + irr::gui::IGUICheckBox* chkRandomPos; + irr::gui::IGUICheckBox* chkAutoChain; + irr::gui::IGUICheckBox* chkWaitChain; + irr::gui::IGUICheckBox* chkDefaultShowChain; + irr::gui::IGUICheckBox* chkQuickAnimation; + irr::gui::IGUICheckBox* chkAutoSaveReplay; + irr::gui::IGUICheckBox* chkDrawSingleChain; + irr::gui::IGUICheckBox* chkHidePlayerName; + irr::gui::IGUIWindow* tabSystem; + irr::gui::IGUIElement* elmTabSystemLast; + irr::gui::IGUIScrollBar* scrTabSystem; + irr::gui::IGUICheckBox* chkIgnoreDeckChanges; + irr::gui::IGUICheckBox* chkAutoSearch; + irr::gui::IGUICheckBox* chkMultiKeywords; + irr::gui::IGUICheckBox* chkPreferExpansionScript; + irr::gui::IGUICheckBox* chkLFlist; + irr::gui::IGUIComboBox* cbLFlist; + irr::gui::IGUICheckBox* chkEnableSound; + irr::gui::IGUICheckBox* chkEnableMusic; + irr::gui::IGUIScrollBar* scrSoundVolume; + irr::gui::IGUIScrollBar* scrMusicVolume; + irr::gui::IGUICheckBox* chkMusicMode; + irr::gui::IGUIButton* btnWinResizeS; + irr::gui::IGUIButton* btnWinResizeM; + irr::gui::IGUIButton* btnWinResizeL; + irr::gui::IGUIButton* btnWinResizeXL; //main menu irr::gui::IGUIWindow* wMainMenu; irr::gui::IGUIButton* btnLanMode; - irr::gui::IGUIButton* btnServerMode; + irr::gui::IGUIButton* btnSingleMode; irr::gui::IGUIButton* btnReplayMode; irr::gui::IGUIButton* btnTestMode; irr::gui::IGUIButton* btnDeckEdit; @@ -189,7 +378,7 @@ class Game { irr::gui::IGUIEditBox* ebNickName; irr::gui::IGUIListBox* lstHostList; irr::gui::IGUIButton* btnLanRefresh; - irr::gui::IGUIEditBox* ebJoinIP; + irr::gui::IGUIEditBox* ebJoinHost; irr::gui::IGUIEditBox* ebJoinPort; irr::gui::IGUIEditBox* ebJoinPass; irr::gui::IGUIButton* btnJoinHost; @@ -197,7 +386,7 @@ class Game { irr::gui::IGUIButton* btnCreateHost; //create host irr::gui::IGUIWindow* wCreateHost; - irr::gui::IGUIComboBox* cbLFlist; + irr::gui::IGUIComboBox* cbHostLFlist; irr::gui::IGUIComboBox* cbMatchMode; irr::gui::IGUIComboBox* cbRule; irr::gui::IGUIEditBox* ebTimeLimit; @@ -206,7 +395,7 @@ class Game { irr::gui::IGUIEditBox* ebDrawCount; irr::gui::IGUIEditBox* ebServerName; irr::gui::IGUIEditBox* ebServerPass; - irr::gui::IGUICheckBox* chkEnablePriority; + irr::gui::IGUIComboBox* cbDuelRule; irr::gui::IGUICheckBox* chkNoCheckDeck; irr::gui::IGUICheckBox* chkNoShuffleDeck; irr::gui::IGUIButton* btnHostConfirm; @@ -218,9 +407,12 @@ class Game { irr::gui::IGUIStaticText* stHostPrepDuelist[4]; irr::gui::IGUICheckBox* chkHostPrepReady[4]; irr::gui::IGUIButton* btnHostPrepKick[4]; + irr::gui::IGUIComboBox* cbCategorySelect; irr::gui::IGUIComboBox* cbDeckSelect; irr::gui::IGUIStaticText* stHostPrepRule; irr::gui::IGUIStaticText* stHostPrepOB; + irr::gui::IGUIButton* btnHostPrepReady; + irr::gui::IGUIButton* btnHostPrepNotReady; irr::gui::IGUIButton* btnHostPrepStart; irr::gui::IGUIButton* btnHostPrepCancel; //replay @@ -228,12 +420,26 @@ class Game { irr::gui::IGUIListBox* lstReplayList; irr::gui::IGUIStaticText* stReplayInfo; irr::gui::IGUIButton* btnLoadReplay; + irr::gui::IGUIButton* btnDeleteReplay; + irr::gui::IGUIButton* btnRenameReplay; irr::gui::IGUIButton* btnReplayCancel; + irr::gui::IGUIButton* btnExportDeck; irr::gui::IGUIEditBox* ebRepStartTurn; //single play irr::gui::IGUIWindow* wSinglePlay; + irr::gui::IGUIListBox* lstBotList; + irr::gui::IGUIStaticText* stBotInfo; + irr::gui::IGUIButton* btnStartBot; + irr::gui::IGUIButton* btnBotCancel; + irr::gui::IGUIComboBox* cbBotDeckCategory; + irr::gui::IGUIComboBox* cbBotDeck; + irr::gui::IGUIComboBox* cbBotRule; + irr::gui::IGUICheckBox* chkBotHand; + irr::gui::IGUICheckBox* chkBotNoCheckDeck; + irr::gui::IGUICheckBox* chkBotNoShuffleDeck; irr::gui::IGUIListBox* lstSinglePlayList; irr::gui::IGUIStaticText* stSinglePlayInfo; + irr::gui::IGUICheckBox* chkSinglePlayReturnDeckTop; irr::gui::IGUIButton* btnLoadSinglePlay; irr::gui::IGUIButton* btnSinglePlayCancel; //hand @@ -255,12 +461,19 @@ class Game { irr::gui::IGUIStaticText* stQMessage; irr::gui::IGUIButton* btnYes; irr::gui::IGUIButton* btnNo; + //surrender yes/no + irr::gui::IGUIWindow* wSurrender; + irr::gui::IGUIStaticText* stSurrenderMessage; + irr::gui::IGUIButton* btnSurrenderYes; + irr::gui::IGUIButton* btnSurrenderNo; //options irr::gui::IGUIWindow* wOptions; irr::gui::IGUIStaticText* stOptions; irr::gui::IGUIButton* btnOptionp; irr::gui::IGUIButton* btnOptionn; irr::gui::IGUIButton* btnOptionOK; + irr::gui::IGUIButton* btnOption[5]; + irr::gui::IGUIScrollBar* scrOption; //pos selection irr::gui::IGUIWindow* wPosSelect; irr::gui::CGUIImageButton* btnPSAU; @@ -282,6 +495,7 @@ class Game { //announce number irr::gui::IGUIWindow* wANNumber; irr::gui::IGUIComboBox* cbANNumber; + irr::gui::IGUIButton* btnANNumber[12]; irr::gui::IGUIButton* btnANNumberOK; //announce card irr::gui::IGUIWindow* wANCard; @@ -293,7 +507,7 @@ class Game { irr::gui::IGUICheckBox* chkAttribute[7]; //announce race irr::gui::IGUIWindow* wANRace; - irr::gui::IGUICheckBox* chkRace[24]; + irr::gui::IGUICheckBox* chkRace[RACES_COUNT]; //cmd menu irr::gui::IGUIWindow* wCmdMenu; irr::gui::IGUIButton* btnActivate; @@ -304,6 +518,8 @@ class Game { irr::gui::IGUIButton* btnRepos; irr::gui::IGUIButton* btnAttack; irr::gui::IGUIButton* btnShowList; + irr::gui::IGUIButton* btnOperation; + irr::gui::IGUIButton* btnReset; irr::gui::IGUIButton* btnShuffle; //chat window irr::gui::IGUIWindow* wChat; @@ -313,24 +529,59 @@ class Game { irr::gui::IGUICheckBox* chkIgnore2; //phase button irr::gui::IGUIStaticText* wPhase; - irr::gui::IGUIButton* btnDP; - irr::gui::IGUIButton* btnSP; - irr::gui::IGUIButton* btnM1; + irr::gui::IGUIButton* btnPhaseStatus; irr::gui::IGUIButton* btnBP; irr::gui::IGUIButton* btnM2; irr::gui::IGUIButton* btnEP; //deck edit irr::gui::IGUIStaticText* wDeckEdit; - irr::gui::IGUIComboBox* cbDBLFList; + irr::gui::IGUIComboBox* cbDBCategory; irr::gui::IGUIComboBox* cbDBDecks; + irr::gui::IGUIButton* btnManageDeck; irr::gui::IGUIButton* btnClearDeck; irr::gui::IGUIButton* btnSortDeck; irr::gui::IGUIButton* btnShuffleDeck; irr::gui::IGUIButton* btnSaveDeck; + irr::gui::IGUIButton* btnDeleteDeck; irr::gui::IGUIButton* btnSaveDeckAs; - irr::gui::IGUIButton* btnDBExit; irr::gui::IGUIButton* btnSideOK; + irr::gui::IGUIButton* btnSideShuffle; + irr::gui::IGUIButton* btnSideSort; + irr::gui::IGUIButton* btnSideReload; irr::gui::IGUIEditBox* ebDeckname; + irr::gui::IGUIStaticText* stDBCategory; + irr::gui::IGUIStaticText* stDeck; + irr::gui::IGUIStaticText* stCategory; + irr::gui::IGUIStaticText* stLimit; + irr::gui::IGUIStaticText* stAttribute; + irr::gui::IGUIStaticText* stRace; + irr::gui::IGUIStaticText* stAttack; + irr::gui::IGUIStaticText* stDefense; + irr::gui::IGUIStaticText* stStar; + irr::gui::IGUIStaticText* stSearch; + irr::gui::IGUIStaticText* stScale; + //deck manage + irr::gui::IGUIWindow* wDeckManage; + irr::gui::IGUIListBox* lstCategories; + irr::gui::IGUIListBox* lstDecks; + irr::gui::IGUIButton* btnNewCategory; + irr::gui::IGUIButton* btnRenameCategory; + irr::gui::IGUIButton* btnDeleteCategory; + irr::gui::IGUIButton* btnNewDeck; + irr::gui::IGUIButton* btnRenameDeck; + irr::gui::IGUIButton* btnDMDeleteDeck; + irr::gui::IGUIButton* btnMoveDeck; + irr::gui::IGUIButton* btnCopyDeck; + irr::gui::IGUIButton* btnImportDeckCode; + irr::gui::IGUIButton* btnExportDeckCode; + irr::gui::IGUIWindow* wDMQuery; + irr::gui::IGUIStaticText* stDMMessage; + irr::gui::IGUIStaticText* stDMMessage2; + irr::gui::IGUIEditBox* ebDMName; + irr::gui::IGUIComboBox* cbDMCategory; + irr::gui::IGUIButton* btnDMOK; + irr::gui::IGUIButton* btnDMCancel; + irr::gui::IGUIScrollBar* scrPackCards; //filter irr::gui::IGUIStaticText* wFilter; irr::gui::IGUIScrollBar* scrFilter; @@ -340,14 +591,23 @@ class Game { irr::gui::IGUIComboBox* cbAttribute; irr::gui::IGUIComboBox* cbLimit; irr::gui::IGUIEditBox* ebStar; + irr::gui::IGUIEditBox* ebScale; irr::gui::IGUIEditBox* ebAttack; - irr::gui::IGUIEditBox* ebDefence; + irr::gui::IGUIEditBox* ebDefense; irr::gui::IGUIEditBox* ebCardName; irr::gui::IGUIButton* btnEffectFilter; irr::gui::IGUIButton* btnStartFilter; + irr::gui::IGUIButton* btnClearFilter; irr::gui::IGUIWindow* wCategories; irr::gui::IGUICheckBox* chkCategory[32]; irr::gui::IGUIButton* btnCategoryOK; + irr::gui::IGUIButton* btnMarksFilter; + irr::gui::IGUIWindow* wLinkMarks; + irr::gui::IGUIButton* btnMark[8]; + irr::gui::IGUIButton* btnMarksOK; + //sort type + irr::gui::IGUIStaticText* wSort; + irr::gui::IGUIComboBox* cbSortType; //replay save irr::gui::IGUIWindow* wReplaySave; irr::gui::IGUIEditBox* ebRSName; @@ -358,17 +618,39 @@ class Game { irr::gui::IGUIButton* btnReplayStart; irr::gui::IGUIButton* btnReplayPause; irr::gui::IGUIButton* btnReplayStep; + irr::gui::IGUIButton* btnReplayUndo; irr::gui::IGUIButton* btnReplayExit; irr::gui::IGUIButton* btnReplaySwap; //surrender/leave irr::gui::IGUIButton* btnLeaveGame; - + //swap + irr::gui::IGUIButton* btnSpectatorSwap; + //chain control + irr::gui::IGUIButton* btnChainIgnore; + irr::gui::IGUIButton* btnChainAlways; + irr::gui::IGUIButton* btnChainWhenAvail; + //cancel or finish + irr::gui::IGUIButton* btnCancelOrFinish; + //big picture + irr::gui::IGUIWindow* wBigCard; + irr::gui::IGUIImage* imgBigCard; + irr::gui::IGUIButton* btnBigCardOriginalSize; + irr::gui::IGUIButton* btnBigCardZoomIn; + irr::gui::IGUIButton* btnBigCardZoomOut; + irr::gui::IGUIButton* btnBigCardClose; }; extern Game* mainGame; } +#define SIZE_QUERY_BUFFER 0x4000 + +#define CARD_IMG_WIDTH 177 +#define CARD_IMG_HEIGHT 254 +#define CARD_THUMB_WIDTH 44 +#define CARD_THUMB_HEIGHT 64 + #define UEVENT_EXIT 0x1 #define UEVENT_TOWINDOW 0x2 @@ -380,6 +662,10 @@ extern Game* mainGame; #define COMMAND_REPOS 0x0020 #define COMMAND_ATTACK 0x0040 #define COMMAND_LIST 0x0080 +#define COMMAND_OPERATION 0x0100 +#define COMMAND_RESET 0x0200 + +#define POSITION_HINT 0x8000 #define BUTTON_LAN_MODE 100 #define BUTTON_SINGLE_MODE 101 @@ -400,10 +686,32 @@ extern Game* mainGame; #define BUTTON_HP_CANCEL 123 #define BUTTON_HP_KICK 124 #define CHECKBOX_HP_READY 125 +#define BUTTON_HP_READY 126 +#define BUTTON_HP_NOTREADY 127 +#define COMBOBOX_HP_CATEGORY 128 #define LISTBOX_REPLAY_LIST 130 #define BUTTON_LOAD_REPLAY 131 #define BUTTON_CANCEL_REPLAY 132 -#define EDITBOX_CHAT 140 +#define BUTTON_DELETE_REPLAY 133 +#define BUTTON_RENAME_REPLAY 134 +#define BUTTON_EXPORT_DECK 135 +#define BUTTON_REPLAY_START 140 +#define BUTTON_REPLAY_PAUSE 141 +#define BUTTON_REPLAY_STEP 142 +#define BUTTON_REPLAY_UNDO 143 +#define BUTTON_REPLAY_EXIT 144 +#define BUTTON_REPLAY_SWAP 145 +#define BUTTON_REPLAY_SAVE 146 +#define BUTTON_REPLAY_CANCEL 147 +#define LISTBOX_SINGLEPLAY_LIST 150 +#define BUTTON_LOAD_SINGLEPLAY 151 +#define BUTTON_CANCEL_SINGLEPLAY 152 +#define LISTBOX_BOT_LIST 153 +#define BUTTON_BOT_START 154 +#define COMBOBOX_BOT_RULE 155 +#define COMBOBOX_BOT_DECKCATEGORY 156 +#define EDITBOX_CHAT 199 + #define BUTTON_MSG_OK 200 #define BUTTON_YES 201 #define BUTTON_NO 202 @@ -419,6 +727,12 @@ extern Game* mainGame; #define BUTTON_OPTION_PREV 220 #define BUTTON_OPTION_NEXT 221 #define BUTTON_OPTION_OK 222 +#define BUTTON_OPTION_0 223 +#define BUTTON_OPTION_1 224 +#define BUTTON_OPTION_2 225 +#define BUTTON_OPTION_3 226 +#define BUTTON_OPTION_4 227 +#define SCROLL_OPTION_SELECT 228 #define BUTTON_CARD_0 230 #define BUTTON_CARD_1 231 #define BUTTON_CARD_2 232 @@ -426,6 +740,7 @@ extern Game* mainGame; #define BUTTON_CARD_4 234 #define SCROLL_CARD_SELECT 235 #define BUTTON_CARD_SEL_OK 236 +#define TEXT_CARD_LIST_TIP 237 #define BUTTON_CMD_ACTIVATE 240 #define BUTTON_CMD_SUMMON 241 #define BUTTON_CMD_SPSUMMON 242 @@ -435,6 +750,7 @@ extern Game* mainGame; #define BUTTON_CMD_ATTACK 246 #define BUTTON_CMD_SHOWLIST 247 #define BUTTON_CMD_SHUFFLE 248 +#define BUTTON_CMD_RESET 249 #define BUTTON_ANNUMBER_OK 250 #define BUTTON_ANCARD_OK 251 #define EDITBOX_ANCARD 252 @@ -445,9 +761,23 @@ extern Game* mainGame; #define BUTTON_M2 261 #define BUTTON_EP 262 #define BUTTON_LEAVE_GAME 263 -#define BUTTON_CLEAR_LOG 270 -#define LISTBOX_LOG 271 -#define SCROLL_CARDTEXT 280 +#define BUTTON_CHAIN_IGNORE 264 +#define BUTTON_CHAIN_ALWAYS 265 +#define BUTTON_CHAIN_WHENAVAIL 266 +#define BUTTON_CANCEL_OR_FINISH 267 +#define BUTTON_PHASE 268 +#define BUTTON_ANNUMBER_1 270 +#define BUTTON_ANNUMBER_2 271 +#define BUTTON_ANNUMBER_3 272 +#define BUTTON_ANNUMBER_4 273 +#define BUTTON_ANNUMBER_5 274 +#define BUTTON_ANNUMBER_6 275 +#define BUTTON_ANNUMBER_7 276 +#define BUTTON_ANNUMBER_8 277 +#define BUTTON_ANNUMBER_9 278 +#define BUTTON_ANNUMBER_10 279 +#define BUTTON_ANNUMBER_11 280 +#define BUTTON_ANNUMBER_12 281 #define BUTTON_DISPLAY_0 290 #define BUTTON_DISPLAY_1 291 #define BUTTON_DISPLAY_2 292 @@ -455,29 +785,82 @@ extern Game* mainGame; #define BUTTON_DISPLAY_4 294 #define SCROLL_CARD_DISPLAY 295 #define BUTTON_CARD_DISP_OK 296 -#define BUTTON_CATEGORY_OK 300 -#define COMBOBOX_DBLFLIST 301 +#define BUTTON_SURRENDER_YES 297 +#define BUTTON_SURRENDER_NO 298 + +#define BUTTON_MANAGE_DECK 300 +#define COMBOBOX_DBCATEGORY 301 #define COMBOBOX_DBDECKS 302 #define BUTTON_CLEAR_DECK 303 #define BUTTON_SAVE_DECK 304 #define BUTTON_SAVE_DECK_AS 305 -#define BUTTON_DBEXIT 306 -#define BUTTON_SORT_DECK 307 -#define BUTTON_SIDE_OK 308 -#define BUTTON_SHUFFLE_DECK 309 -#define COMBOBOX_MAINTYPE 310 -#define BUTTON_EFFECT_FILTER 311 -#define BUTTON_START_FILTER 312 -#define SCROLL_FILTER 314 -#define EDITBOX_KEYWORD 315 -#define BUTTON_REPLAY_START 320 -#define BUTTON_REPLAY_PAUSE 321 -#define BUTTON_REPLAY_STEP 322 -#define BUTTON_REPLAY_EXIT 323 -#define BUTTON_REPLAY_SWAP 324 -#define BUTTON_REPLAY_SAVE 330 -#define BUTTON_REPLAY_CANCEL 331 -#define LISTBOX_SINGLEPLAY_LIST 350 -#define BUTTON_LOAD_SINGLEPLAY 351 -#define BUTTON_CANCEL_SINGLEPLAY 352 +#define BUTTON_DELETE_DECK 306 +#define BUTTON_SIDE_RELOAD 307 +#define BUTTON_SORT_DECK 308 +#define BUTTON_SIDE_OK 309 +#define BUTTON_SHUFFLE_DECK 310 +#define COMBOBOX_MAINTYPE 311 +#define COMBOBOX_SECONDTYPE 312 +#define BUTTON_EFFECT_FILTER 313 +#define BUTTON_START_FILTER 314 +#define SCROLL_FILTER 315 +#define EDITBOX_KEYWORD 316 +#define BUTTON_CLEAR_FILTER 317 +#define COMBOBOX_ATTRIBUTE 318 +#define COMBOBOX_RACE 319 +#define COMBOBOX_LIMIT 320 +#define BUTTON_CATEGORY_OK 321 +#define BUTTON_MARKS_FILTER 322 +#define BUTTON_MARKERS_OK 323 +#define COMBOBOX_SORTTYPE 324 +#define EDITBOX_INPUTS 325 +#define WINDOW_DECK_MANAGE 330 +#define BUTTON_NEW_CATEGORY 331 +#define BUTTON_RENAME_CATEGORY 332 +#define BUTTON_DELETE_CATEGORY 333 +#define BUTTON_NEW_DECK 334 +#define BUTTON_RENAME_DECK 335 +#define BUTTON_DELETE_DECK_DM 336 +#define BUTTON_MOVE_DECK 337 +#define BUTTON_COPY_DECK 338 +#define LISTBOX_CATEGORIES 339 +#define LISTBOX_DECKS 340 +#define BUTTON_DM_OK 341 +#define BUTTON_DM_CANCEL 342 +#define BUTTON_IMPORT_DECK_CODE 343 +#define BUTTON_EXPORT_DECK_CODE 344 +#define COMBOBOX_LFLIST 349 + +#define BUTTON_CLEAR_LOG 350 +#define LISTBOX_LOG 351 +#define SCROLL_CARDTEXT 352 +#define CHECKBOX_AUTO_SEARCH 360 +#define CHECKBOX_ENABLE_SOUND 361 +#define CHECKBOX_ENABLE_MUSIC 362 +#define SCROLL_VOLUME 363 +#define CHECKBOX_DISABLE_CHAT 364 +#define BUTTON_WINDOW_RESIZE_S 365 +#define BUTTON_WINDOW_RESIZE_M 366 +#define BUTTON_WINDOW_RESIZE_L 367 +#define BUTTON_WINDOW_RESIZE_XL 368 +#define CHECKBOX_QUICK_ANIMATION 369 +#define SCROLL_TAB_HELPER 370 +#define SCROLL_TAB_SYSTEM 371 +#define CHECKBOX_MULTI_KEYWORDS 372 +#define CHECKBOX_PREFER_EXPANSION 373 +#define CHECKBOX_DRAW_SINGLE_CHAIN 374 +#define CHECKBOX_LFLIST 375 +#define CHECKBOX_HIDE_PLAYER_NAME 376 +#define BUTTON_BIG_CARD_CLOSE 380 +#define BUTTON_BIG_CARD_ZOOM_IN 381 +#define BUTTON_BIG_CARD_ZOOM_OUT 382 +#define BUTTON_BIG_CARD_ORIG_SIZE 383 + +#define AVAIL_OCG 0x1 +#define AVAIL_TCG 0x2 +#define AVAIL_CUSTOM 0x4 +#define AVAIL_SC 0x8 +#define AVAIL_OCGTCG (AVAIL_OCG|AVAIL_TCG) + +#define MAX_LAYER_COUNT 6 #endif // GAME_H diff --git a/gframe/gframe.cpp b/gframe/gframe.cpp index c05c638562..1eac9be7f8 100644 --- a/gframe/gframe.cpp +++ b/gframe/gframe.cpp @@ -2,11 +2,64 @@ #include "game.h" #include "data_manager.h" #include +#include +#include +#ifdef __APPLE__ +#import +#endif -int enable_log = 0; +#if defined(_WIN32) && (!defined(WDK_NTDDI_VERSION) || (WDK_NTDDI_VERSION < 0x0A000005)) // Redstone 4, Version 1803, Build 17134. +#error "This program requires the Windows 10 SDK version 1803 or above to compile on Windows. Otherwise, non-ASCII characters will not be displayed or processed correctly." +#endif + +unsigned int enable_log = 0x3; bool exit_on_return = false; +bool open_file = false; +wchar_t open_file_name[256] = L""; +bool bot_mode = false; + +void ClickButton(irr::gui::IGUIElement* btn) { + irr::SEvent event; + event.EventType = irr::EET_GUI_EVENT; + event.GUIEvent.EventType = irr::gui::EGET_BUTTON_CLICKED; + event.GUIEvent.Caller = btn; + ygo::mainGame->device->postEventFromUser(event); +} int main(int argc, char* argv[]) { +#if defined(_WIN32) + std::setlocale(LC_CTYPE, ".UTF-8"); +#elif defined(__APPLE__) + std::setlocale(LC_CTYPE, "UTF-8"); +#else + std::setlocale(LC_CTYPE, ""); +#endif +#ifdef __APPLE__ + CFURLRef bundle_url = CFBundleCopyBundleURL(CFBundleGetMainBundle()); + CFURLRef bundle_base_url = CFURLCreateCopyDeletingLastPathComponent(nullptr, bundle_url); + CFStringRef bundle_ext = CFURLCopyPathExtension(bundle_url); + if (bundle_ext) { + char path[PATH_MAX]; + if (CFStringCompare(bundle_ext, CFSTR("app"), kCFCompareCaseInsensitive) == kCFCompareEqualTo + && CFURLGetFileSystemRepresentation(bundle_base_url, true, (UInt8*)path, PATH_MAX)) { + chdir(path); + } + CFRelease(bundle_ext); + } + CFRelease(bundle_url); + CFRelease(bundle_base_url); +#endif //__APPLE__ +#ifdef _WIN32 + if (argc == 2 && (ygo::IsExtension(argv[1], ".ydk") || ygo::IsExtension(argv[1], ".yrp"))) { // open file from explorer + wchar_t exepath[MAX_PATH]; + GetModuleFileNameW(nullptr, exepath, MAX_PATH); + wchar_t* p = std::wcsrchr(exepath, L'\\'); + if (p) { + *p = 0; + SetCurrentDirectoryW(exepath); + } + } +#endif //_WIN32 #ifdef _WIN32 WORD wVersionRequested; WSADATA wsaData; @@ -21,41 +74,135 @@ int main(int argc, char* argv[]) { if(!ygo::mainGame->Initialize()) return 0; - for(int i = 1; i < argc; ++i) { - /*command line args: - * -j: join host (host info from system.conf) - * -d: deck edit - * -r: replay */ - if(argv[i][0] == '-' && argv[i][1] == 'e') { - ygo::dataManager.LoadDB(&argv[i][2]); - } else if(!strcmp(argv[i], "-j") || !strcmp(argv[i], "-d") || !strcmp(argv[i], "-r") || !strcmp(argv[i], "-s")) { - exit_on_return = true; - irr::SEvent event; - event.EventType = irr::EET_GUI_EVENT; - event.GUIEvent.EventType = irr::gui::EGET_BUTTON_CLICKED; - if(!strcmp(argv[i], "-j")) { - event.GUIEvent.Caller = ygo::mainGame->btnLanMode; - ygo::mainGame->device->postEventFromUser(event); - //TODO: wait for wLanWindow show. if network connection faster than wLanWindow, wLanWindow will still show on duel scene. - event.GUIEvent.Caller = ygo::mainGame->btnJoinHost; - ygo::mainGame->device->postEventFromUser(event); - } else if(!strcmp(argv[i], "-d")) { - event.GUIEvent.Caller = ygo::mainGame->btnDeckEdit; - ygo::mainGame->device->postEventFromUser(event); - } else if(!strcmp(argv[i], "-r")) { - event.GUIEvent.Caller = ygo::mainGame->btnReplayMode; - ygo::mainGame->device->postEventFromUser(event); - ygo::mainGame->lstReplayList->setSelected(0); - event.GUIEvent.Caller = ygo::mainGame->btnLoadReplay; - ygo::mainGame->device->postEventFromUser(event); - } else if(!strcmp(argv[i], "-s")) { - event.GUIEvent.Caller = ygo::mainGame->btnServerMode; - ygo::mainGame->device->postEventFromUser(event); - ygo::mainGame->lstSinglePlayList->setSelected(0); - event.GUIEvent.Caller = ygo::mainGame->btnLoadSinglePlay; - ygo::mainGame->device->postEventFromUser(event); - } +#ifdef _WIN32 + int wargc = 0; + std::unique_ptr wargv(CommandLineToArgvW(GetCommandLineW(), &wargc), [](wchar_t** wargv) { + LocalFree(wargv); + }); +#else + int wargc = argc; + auto wargv = std::make_unique(wargc); + for(int i = 0; i < argc; ++i) { + BufferIO::DecodeUTF8(argv[i], wargv[i]); + } +#endif //_WIN32 + bool keep_on_return = false; + bool deckCategorySpecified = false; + for(int i = 1; i < wargc; ++i) { + if (wargc == 2 && std::wcslen(wargv[1]) >= 4) { + wchar_t* pstrext = wargv[1] + std::wcslen(wargv[1]) - 4; + if (!mywcsncasecmp(pstrext, L".ydk", 4)) { + open_file = true; + BufferIO::CopyWideString(wargv[1], open_file_name); + exit_on_return = true; + ClickButton(ygo::mainGame->btnDeckEdit); + break; + } + if (!mywcsncasecmp(pstrext, L".yrp", 4)) { + open_file = true; + BufferIO::CopyWideString(wargv[1], open_file_name); + exit_on_return = true; + ClickButton(ygo::mainGame->btnReplayMode); + ClickButton(ygo::mainGame->btnLoadReplay); + break; + } + } + if(wargv[i][0] == L'-' && wargv[i][1] == L'e' && wargv[i][2] != L'\0') { + ygo::dataManager.LoadDB(&wargv[i][2]); + continue; + } + if(!std::wcscmp(wargv[i], L"-e")) { // extra database + ++i; + if(i < wargc) { + ygo::dataManager.LoadDB(wargv[i]); + } + continue; + } else if(!std::wcscmp(wargv[i], L"-n")) { // nickName + ++i; + if(i < wargc) + ygo::mainGame->ebNickName->setText(wargv[i]); + continue; + } else if(!std::wcscmp(wargv[i], L"-h")) { // Host address + ++i; + if(i < wargc) + ygo::mainGame->ebJoinHost->setText(wargv[i]); + continue; + } else if(!std::wcscmp(wargv[i], L"-p")) { // host Port + ++i; + if(i < wargc) + ygo::mainGame->ebJoinPort->setText(wargv[i]); + continue; + } else if(!std::wcscmp(wargv[i], L"-w")) { // host passWord + ++i; + if(i < wargc) + ygo::mainGame->ebJoinPass->setText(wargv[i]); + continue; + } else if(!std::wcscmp(wargv[i], L"-k")) { // Keep on return + exit_on_return = false; + keep_on_return = true; + } else if(!std::wcscmp(wargv[i], L"--deck-category")) { + ++i; + if(i < wargc) { + deckCategorySpecified = true; + BufferIO::CopyWideString(wargv[i], ygo::mainGame->gameConf.lastcategory); + } + } else if(!std::wcscmp(wargv[i], L"-d")) { // Deck + ++i; + if(!deckCategorySpecified) + ygo::mainGame->gameConf.lastcategory[0] = 0; + if(i + 1 < wargc) { // select deck + BufferIO::CopyWideString(wargv[i], ygo::mainGame->gameConf.lastdeck); + continue; + } else { // open deck + exit_on_return = !keep_on_return; + if(i < wargc) { + open_file = true; + if(deckCategorySpecified) { +#ifdef _WIN32 + myswprintf(open_file_name, L"%ls\\%ls", ygo::mainGame->gameConf.lastcategory, wargv[i]); +#else + myswprintf(open_file_name, L"%ls/%ls", ygo::mainGame->gameConf.lastcategory, wargv[i]); +#endif + } else { + BufferIO::CopyWideString(wargv[i], open_file_name); + } + } + ClickButton(ygo::mainGame->btnDeckEdit); + break; + } + } else if(!std::wcscmp(wargv[i], L"-c")) { // Create host + exit_on_return = !keep_on_return; + ygo::mainGame->HideElement(ygo::mainGame->wMainMenu); + ClickButton(ygo::mainGame->btnHostConfirm); + break; + } else if(!std::wcscmp(wargv[i], L"-j")) { // Join host + exit_on_return = !keep_on_return; + ygo::mainGame->HideElement(ygo::mainGame->wMainMenu); + ClickButton(ygo::mainGame->btnJoinHost); + break; + } else if(!std::wcscmp(wargv[i], L"-r")) { // Replay + exit_on_return = !keep_on_return; + ++i; + if(i < wargc) { + open_file = true; + BufferIO::CopyWideString(wargv[i], open_file_name); + } + ClickButton(ygo::mainGame->btnReplayMode); + if(open_file) + ClickButton(ygo::mainGame->btnLoadReplay); + break; + } else if(!std::wcscmp(wargv[i], L"-s")) { // Single + exit_on_return = !keep_on_return; + ++i; + if(i < wargc) { + open_file = true; + BufferIO::CopyWideString(wargv[i], open_file_name); + } + ClickButton(ygo::mainGame->btnSingleMode); + if(open_file) + ClickButton(ygo::mainGame->btnLoadSinglePlay); + break; } } ygo::mainGame->MainLoop(); diff --git a/gframe/image_manager.cpp b/gframe/image_manager.cpp index a16432a35a..423f1b444c 100644 --- a/gframe/image_manager.cpp +++ b/gframe/image_manager.cpp @@ -1,12 +1,25 @@ #include "image_manager.h" +#include "image_resizer.h" +#include "game.h" +#include namespace ygo { ImageManager imageManager; bool ImageManager::Initial() { - tCover = driver->getTexture("textures/cover.jpg"); - tUnknown = driver->getTexture("textures/unknown.jpg"); + tCover[0] = nullptr; + tCover[1] = nullptr; + tCover[2] = GetTextureFromFile("textures/cover.jpg", CARD_IMG_WIDTH, CARD_IMG_HEIGHT); + tCover[3] = GetTextureFromFile("textures/cover2.jpg", CARD_IMG_WIDTH, CARD_IMG_HEIGHT); + if(!tCover[3]) + tCover[3] = tCover[2]; + tUnknown = nullptr; + tUnknownFit = nullptr; + tUnknownThumb = nullptr; + tBigPicture = nullptr; + tLoading = nullptr; + tThumbLoadingThreadRunning = false; tAct = driver->getTexture("textures/act.png"); tAttack = driver->getTexture("textures/attack.png"); tChain = driver->getTexture("textures/chain.png"); @@ -17,12 +30,20 @@ bool ImageManager::Initial() { tMask = driver->getTexture("textures/mask.png"); tEquip = driver->getTexture("textures/equip.png"); tTarget = driver->getTexture("textures/target.png"); + tChainTarget = driver->getTexture("textures/chaintarget.png"); tLim = driver->getTexture("textures/lim.png"); + tOT = driver->getTexture("textures/ot.png"); tHand[0] = driver->getTexture("textures/f1.jpg"); tHand[1] = driver->getTexture("textures/f2.jpg"); tHand[2] = driver->getTexture("textures/f3.jpg"); - tBackGround = driver->getTexture("textures/bg.jpg"); - tField = driver->getTexture("textures/field2.png"); + tBackGround = nullptr; + tBackGround_menu = nullptr; + tBackGround_deck = nullptr; + tField[0] = driver->getTexture("textures/field2.png"); + tFieldTransparent[0] = driver->getTexture("textures/field-transparent2.png"); + tField[1] = driver->getTexture("textures/field3.png"); + tFieldTransparent[1] = driver->getTexture("textures/field-transparent3.png"); + ResizeTexture(); return true; } void ImageManager::SetDevice(irr::IrrlichtDevice* dev) { @@ -30,65 +51,317 @@ void ImageManager::SetDevice(irr::IrrlichtDevice* dev) { driver = dev->getVideoDriver(); } void ImageManager::ClearTexture() { - for(auto tit = tMap.begin(); tit != tMap.end(); ++tit) { + for(auto tit = tMap[0].begin(); tit != tMap[0].end(); ++tit) { + if(tit->second) + driver->removeTexture(tit->second); + } + for(auto tit = tMap[1].begin(); tit != tMap[1].end(); ++tit) { if(tit->second) driver->removeTexture(tit->second); } for(auto tit = tThumb.begin(); tit != tThumb.end(); ++tit) { + if(tit->second && tit->second != tLoading) + driver->removeTexture(tit->second); + } + for(auto tit = tFields.begin(); tit != tFields.end(); ++tit) { if(tit->second) driver->removeTexture(tit->second); } - tMap.clear(); + if(tBigPicture != nullptr) { + driver->removeTexture(tBigPicture); + tBigPicture = nullptr; + } + tMap[0].clear(); + tMap[1].clear(); tThumb.clear(); + tFields.clear(); + tThumbLoadingMutex.lock(); + tThumbLoading.clear(); + while(!tThumbLoadingCodes.empty()) + tThumbLoadingCodes.pop(); + tThumbLoadingThreadRunning = false; + tThumbLoadingMutex.unlock(); } -void ImageManager::RemoveTexture(int code) { - auto tit = tMap.find(code); - if(tit != tMap.end()) { - if(tit->second) - driver->removeTexture(tit->second); - tMap.erase(tit); +void ImageManager::ResizeTexture() { + irr::s32 imgWidth = CARD_IMG_WIDTH * mainGame->xScale; + irr::s32 imgHeight = CARD_IMG_HEIGHT * mainGame->yScale; + irr::s32 imgWidthThumb = CARD_THUMB_WIDTH * mainGame->xScale; + irr::s32 imgHeightThumb = CARD_THUMB_HEIGHT * mainGame->yScale; + float mul = (mainGame->xScale > mainGame->yScale) ? mainGame->yScale : mainGame->xScale; + irr::s32 imgWidthFit = CARD_IMG_WIDTH * mul; + irr::s32 imgHeightFit = CARD_IMG_HEIGHT * mul; + irr::s32 bgWidth = 1024 * mainGame->xScale; + irr::s32 bgHeight = 640 * mainGame->yScale; + driver->removeTexture(tCover[0]); + driver->removeTexture(tCover[1]); + tCover[0] = GetTextureFromFile("textures/cover.jpg", imgWidth, imgHeight); + tCover[1] = GetTextureFromFile("textures/cover2.jpg", imgWidth, imgHeight); + if(!tCover[1]) + tCover[1] = tCover[0]; + driver->removeTexture(tUnknown); + driver->removeTexture(tUnknownFit); + driver->removeTexture(tUnknownThumb); + driver->removeTexture(tLoading); + tLoading = GetTextureFromFile("textures/cover.jpg", imgWidthThumb, imgHeightThumb); + tUnknown = GetTextureFromFile("textures/unknown.jpg", CARD_IMG_WIDTH, CARD_IMG_HEIGHT); + tUnknownFit = GetTextureFromFile("textures/unknown.jpg", imgWidthFit, imgHeightFit); + tUnknownThumb = GetTextureFromFile("textures/unknown.jpg", imgWidthThumb, imgHeightThumb); + driver->removeTexture(tBackGround); + tBackGround = GetTextureFromFile("textures/bg.jpg", bgWidth, bgHeight); + driver->removeTexture(tBackGround_menu); + tBackGround_menu = GetTextureFromFile("textures/bg_menu.jpg", bgWidth, bgHeight); + if(!tBackGround_menu) + tBackGround_menu = tBackGround; + driver->removeTexture(tBackGround_deck); + tBackGround_deck = GetTextureFromFile("textures/bg_deck.jpg", bgWidth, bgHeight); + if(!tBackGround_deck) + tBackGround_deck = tBackGround; +} +void ImageManager::resizeImage(irr::video::IImage* src, irr::video::IImage* dest, bool use_threading) { + imageResizer.resize(src, dest, use_threading); +} +/** + * Convert image to texture, resizing if needed. + * @param name Texture name (Irrlicht texture key). + * @param srcimg Source image; will be dropped by this function. + * @return Texture pointer. Remove via `driver->removeTexture` (do not `drop`). + */ +irr::video::ITexture* ImageManager::addTexture(const char* name, irr::video::IImage* srcimg, irr::s32 width, irr::s32 height) { + if(srcimg == nullptr) + return nullptr; + irr::video::ITexture* texture; + if(srcimg->getDimension() == irr::core::dimension2d(width, height)) { + texture = driver->addTexture(name, srcimg); + } else { + irr::video::IImage* destimg = driver->createImage(srcimg->getColorFormat(), irr::core::dimension2d(width, height)); + resizeImage(srcimg, destimg, mainGame->gameConf.use_image_scale_multi_thread); + texture = driver->addTexture(name, destimg); + destimg->drop(); } + srcimg->drop(); + return texture; } -irr::video::ITexture* ImageManager::GetTexture(int code) { +/** + * Load image from file and convert to texture. + * @return Texture pointer. Remove via `driver->removeTexture` (do not `drop`). + */ +irr::video::ITexture* ImageManager::GetTextureFromFile(const char* file, irr::s32 width, irr::s32 height) { + irr::video::IImage* img = driver->createImageFromFile(file); + if(img == nullptr) { + return nullptr; + } + char name[256]; + mysnprintf(name, "%s/%d_%d", file, width, height); + return addTexture(name, img, width, height); +} +/** + * Load card picture from `expansions` or `pics` folder. + * Files in the expansions directory have priority, allowing custom pictures to be loaded without modifying the original files. + * @return Image pointer. Must be dropped after use. + */ +irr::video::IImage* ImageManager::GetImage(int code) { + char file[256]; + mysnprintf(file, "expansions/pics/%d.jpg", code); + irr::video::IImage* img = driver->createImageFromFile(file); + if(img == nullptr) { + mysnprintf(file, "pics/%d.jpg", code); + img = driver->createImageFromFile(file); + } + return img; +} +/** + * Load card picture. + * @return Texture pointer. Remove via `driver->removeTexture` (do not `drop`). + */ +irr::video::ITexture* ImageManager::GetTexture(int code, irr::s32 width, irr::s32 height) { + irr::video::IImage* img = GetImage(code); + if(img == nullptr) { + return nullptr; + } + char name[256]; + mysnprintf(name, "pics/%d/%d_%d", code, width, height); + return addTexture(name, img, width, height); +} +/** + * Load managed card picture texture. + * @param fit Resize to fit scale if true. + * @return Texture pointer. Should NOT be removed nor dropped. + */ +irr::video::ITexture* ImageManager::GetTexture(int code, bool fit) { if(code == 0) - return tUnknown; - auto tit = tMap.find(code); - if(tit == tMap.end()) { - char file[256]; - sprintf(file, "pics/%d.jpg", code); - irr::video::ITexture* img = driver->getTexture(file); - if(img == NULL) { - tMap[code] = NULL; - return GetTextureThumb(code); - } else { - tMap[code] = img; - return img; - } + return fit ? tUnknownFit : tUnknown; + int width = CARD_IMG_WIDTH; + int height = CARD_IMG_HEIGHT; + if(fit) { + float mul = mainGame->xScale; + if(mainGame->xScale > mainGame->yScale) + mul = mainGame->yScale; + width = width * mul; + height = height * mul; + } + auto tit = tMap[fit ? 1 : 0].find(code); + if(tit == tMap[fit ? 1 : 0].end()) { + irr::video::ITexture* texture = GetTexture(code, width, height); + tMap[fit ? 1 : 0][code] = texture; + return (texture == nullptr) ? (fit ? tUnknownFit : tUnknown) : texture; } if(tit->second) return tit->second; else - return GetTextureThumb(code); + return fit ? tUnknownFit : tUnknown; } +/** + * Load managed card picture texture with zoom. + * @return Texture pointer. Should NOT be removed nor dropped. + */ +irr::video::ITexture* ImageManager::GetBigPicture(int code, float zoom) { + if(code == 0) + return tUnknownFit; + if(tBigPicture != nullptr) { + driver->removeTexture(tBigPicture); + tBigPicture = nullptr; + } + irr::video::IImage* img = GetImage(code); + if(img == nullptr) { + return tUnknownFit; + } + char name[256]; + mysnprintf(name, "pics/%d/big", code); + auto origsize = img->getDimension(); + tBigPicture = addTexture(name, img, origsize.Width * zoom, origsize.Height * zoom); + return tBigPicture; +} +int ImageManager::LoadThumbThread() { + while(true) { + imageManager.tThumbLoadingMutex.lock(); + imageManager.tThumbLoadingThreadRunning = !imageManager.tThumbLoadingCodes.empty(); + if(!imageManager.tThumbLoadingThreadRunning) { + imageManager.tThumbLoadingMutex.unlock(); + break; + } + int code = imageManager.tThumbLoadingCodes.front(); + imageManager.tThumbLoadingCodes.pop(); + imageManager.tThumbLoadingMutex.unlock(); + irr::video::IImage* img = imageManager.GetImage(code); + if(img != nullptr) { + int width = CARD_THUMB_WIDTH * mainGame->xScale; + int height = CARD_THUMB_HEIGHT * mainGame->yScale; + if(img->getDimension() == irr::core::dimension2d(width, height)) { + imageManager.tThumbLoadingMutex.lock(); + if(imageManager.tThumbLoadingThreadRunning) + imageManager.tThumbLoading[code] = img; + else + img->drop(); + imageManager.tThumbLoadingMutex.unlock(); + } else { + irr::video::IImage *destimg = imageManager.driver->createImage(img->getColorFormat(), irr::core::dimension2d(width, height)); + imageManager.resizeImage(img, destimg, mainGame->gameConf.use_image_scale_multi_thread); + img->drop(); + imageManager.tThumbLoadingMutex.lock(); + if(imageManager.tThumbLoadingThreadRunning) + imageManager.tThumbLoading[code] = destimg; + else + destimg->drop(); + imageManager.tThumbLoadingMutex.unlock(); + } + } else { + imageManager.tThumbLoadingMutex.lock(); + if(imageManager.tThumbLoadingThreadRunning) + imageManager.tThumbLoading[code] = nullptr; + imageManager.tThumbLoadingMutex.unlock(); + } + } + return 0; +} +/** + * Load managed card thumbnail texture. + * @return Texture pointer. Should NOT be removed nor dropped. + */ irr::video::ITexture* ImageManager::GetTextureThumb(int code) { if(code == 0) - return tUnknown; + return tUnknownThumb; auto tit = tThumb.find(code); + if(tit == tThumb.end() && !mainGame->gameConf.use_image_load_background_thread) { + int width = CARD_THUMB_WIDTH * mainGame->xScale; + int height = CARD_THUMB_HEIGHT * mainGame->yScale; + irr::video::ITexture* texture = GetTexture(code, width, height); + tThumb[code] = texture; + return (texture == nullptr) ? tUnknownThumb : texture; + } + if(tit == tThumb.end() || tit->second == tLoading) { + imageManager.tThumbLoadingMutex.lock(); + auto lit = tThumbLoading.find(code); + if(lit != tThumbLoading.end()) { + if(lit->second != nullptr) { + char textureName[256]; + mysnprintf(textureName, "pics/%d/thumbnail", code); + irr::video::ITexture* texture = driver->addTexture(textureName, lit->second); // textures must be added in the main thread due to OpenGL + lit->second->drop(); + tThumb[code] = texture; + } else { + tThumb[code] = nullptr; + } + tThumbLoading.erase(lit); + } + imageManager.tThumbLoadingMutex.unlock(); + tit = tThumb.find(code); + } if(tit == tThumb.end()) { + tThumb[code] = tLoading; + imageManager.tThumbLoadingMutex.lock(); + tThumbLoadingCodes.push(code); + if(!tThumbLoadingThreadRunning) { + tThumbLoadingThreadRunning = true; + std::thread(LoadThumbThread).detach(); + } + imageManager.tThumbLoadingMutex.unlock(); + return tLoading; + } + if(tit->second) + return tit->second; + else + return tUnknownThumb; +} +/** + * Load managed duel field texture. + * @return Texture pointer. Should NOT be removed nor dropped. + */ +irr::video::ITexture* ImageManager::GetTextureField(int code) { + if(code == 0) + return nullptr; + auto tit = tFields.find(code); + if(tit == tFields.end()) { + irr::s32 width = 512 * mainGame->xScale; + irr::s32 height = 512 * mainGame->yScale; char file[256]; - sprintf(file, "pics/thumbnail/%d.jpg", code); - irr::video::ITexture* img = driver->getTexture(file); - if(img == NULL) { - tThumb[code] = NULL; - return tUnknown; + mysnprintf(file, "expansions/pics/field/%d.png", code); + irr::video::ITexture* img = GetTextureFromFile(file, width, height); + if(img == nullptr) { + mysnprintf(file, "expansions/pics/field/%d.jpg", code); + img = GetTextureFromFile(file, width, height); + } + if(img == nullptr) { + mysnprintf(file, "pics/field/%d.png", code); + img = GetTextureFromFile(file, width, height); + } + if(img == nullptr) { + mysnprintf(file, "pics/field/%d.jpg", code); + img = GetTextureFromFile(file, width, height); + if(img == nullptr) { + tFields[code] = nullptr; + return nullptr; + } else { + tFields[code] = img; + return img; + } } else { - tThumb[code] = img; + tFields[code] = img; return img; } } if(tit->second) return tit->second; else - return tUnknown; + return nullptr; } } diff --git a/gframe/image_manager.h b/gframe/image_manager.h index dbfc980f41..3714e70470 100644 --- a/gframe/image_manager.h +++ b/gframe/image_manager.h @@ -4,24 +4,44 @@ #include "config.h" #include "data_manager.h" #include +#include +#include namespace ygo { class ImageManager { +private: + void resizeImage(irr::video::IImage* src, irr::video::IImage* dest, bool use_threading); + irr::video::ITexture* addTexture(const char* name, irr::video::IImage* srcimg, irr::s32 width, irr::s32 height); public: bool Initial(); void SetDevice(irr::IrrlichtDevice* dev); void ClearTexture(); - void RemoveTexture(int code); - irr::video::ITexture* GetTexture(int code); + void ResizeTexture(); + irr::video::ITexture* GetTextureFromFile(const char* file, irr::s32 width, irr::s32 height); + irr::video::IImage* GetImage(int code); + irr::video::ITexture* GetTexture(int code, irr::s32 width, irr::s32 height); + irr::video::ITexture* GetTexture(int code, bool fit = false); + irr::video::ITexture* GetBigPicture(int code, float zoom); irr::video::ITexture* GetTextureThumb(int code); + irr::video::ITexture* GetTextureField(int code); + static int LoadThumbThread(); - std::unordered_map tMap; + std::unordered_map tMap[2]; std::unordered_map tThumb; + std::unordered_map tFields; + std::unordered_map tThumbLoading; + std::queue tThumbLoadingCodes; + std::mutex tThumbLoadingMutex; + bool tThumbLoadingThreadRunning; irr::IrrlichtDevice* device; irr::video::IVideoDriver* driver; - irr::video::ITexture* tCover; + irr::video::ITexture* tCover[4]; irr::video::ITexture* tUnknown; + irr::video::ITexture* tUnknownFit; + irr::video::ITexture* tUnknownThumb; + irr::video::ITexture* tBigPicture; + irr::video::ITexture* tLoading; irr::video::ITexture* tAct; irr::video::ITexture* tAttack; irr::video::ITexture* tNegated; @@ -32,10 +52,15 @@ class ImageManager { irr::video::ITexture* tMask; irr::video::ITexture* tEquip; irr::video::ITexture* tTarget; + irr::video::ITexture* tChainTarget; irr::video::ITexture* tLim; + irr::video::ITexture* tOT; irr::video::ITexture* tHand[3]; irr::video::ITexture* tBackGround; - irr::video::ITexture* tField; + irr::video::ITexture* tBackGround_menu; + irr::video::ITexture* tBackGround_deck; + irr::video::ITexture* tField[2]; + irr::video::ITexture* tFieldTransparent[2]; }; extern ImageManager imageManager; diff --git a/gframe/image_resizer.cpp b/gframe/image_resizer.cpp new file mode 100644 index 0000000000..cf09f34b16 --- /dev/null +++ b/gframe/image_resizer.cpp @@ -0,0 +1,203 @@ +#include "image_resizer.h" +#include +#ifdef _OPENMP +#include +#endif + +#define STB_IMAGE_RESIZE2_IMPLEMENTATION +#include "stb_image_resize2.h" + +namespace ygo { + +ImageResizer imageResizer; + +struct StbSamplerCache { + STBIR_RESIZE resize{}; + int in_w = 0; + int in_h = 0; + int out_w = 0; + int out_h = 0; + stbir_pixel_layout layout = STBIR_BGRA; + bool samplers_built = false; + + ~StbSamplerCache() { + if(samplers_built) { + stbir_free_samplers(&resize); + samplers_built = false; + } + } + + void reset_if_needed(int new_in_w, int new_in_h, int new_out_w, int new_out_h, stbir_pixel_layout new_layout) { + if(new_in_w == in_w && new_in_h == in_h && new_out_w == out_w && new_out_h == out_h && new_layout == layout) + return; + if(samplers_built) { + stbir_free_samplers(&resize); + samplers_built = false; + } + in_w = new_in_w; + in_h = new_in_h; + out_w = new_out_w; + out_h = new_out_h; + layout = new_layout; + resize = STBIR_RESIZE{}; + } +}; + +/** + * Scale image using stb_image_resize2. + * Returns true on success, false on failure or unsupported format. + */ +bool ImageResizer::imageScaleSTB(irr::video::IImage* src, irr::video::IImage* dest) { + if(!src || !dest) + return false; + + const auto srcDim = src->getDimension(); + const auto destDim = dest->getDimension(); + if(srcDim.Width == 0 || srcDim.Height == 0 || destDim.Width == 0 || destDim.Height == 0) + return false; + if(src->getColorFormat() != dest->getColorFormat()) + return false; + + stbir_pixel_layout layout = STBIR_BGRA; + // Fast-paths (8-bit per channel only): + // - ECF_A8R8G8B8: Irrlicht stores as BGRA in memory on little-endian. + // - ECF_R8G8B8: common for JPEGs (3 channels). + switch(src->getColorFormat()) { + case irr::video::ECF_A8R8G8B8: + layout = STBIR_BGRA; + break; + case irr::video::ECF_R8G8B8: + layout = STBIR_RGB; + break; + default: + return false; + } + + void* srcPtr = src->lock(); + if(!srcPtr) + return false; + void* destPtr = dest->lock(); + if(!destPtr) { + src->unlock(); + return false; + } + + const int srcStride = (int)src->getPitch(); + const int destStride = (int)dest->getPitch(); + + thread_local StbSamplerCache cache; + cache.reset_if_needed((int)srcDim.Width, (int)srcDim.Height, (int)destDim.Width, (int)destDim.Height, layout); + + if(!cache.samplers_built) { + stbir_resize_init(&cache.resize, + srcPtr, (int)srcDim.Width, (int)srcDim.Height, srcStride, + destPtr, (int)destDim.Width, (int)destDim.Height, destStride, + layout, STBIR_TYPE_UINT8); + stbir_set_edgemodes(&cache.resize, STBIR_EDGE_CLAMP, STBIR_EDGE_CLAMP); + // Use box filters to reduce aliasing when downscaling. + stbir_set_filters(&cache.resize, STBIR_FILTER_BOX, STBIR_FILTER_BOX); + cache.samplers_built = (stbir_build_samplers(&cache.resize) != 0); + if(!cache.samplers_built) { + dest->unlock(); + src->unlock(); + return false; + } + } else { + // Reuse samplers but update buffer pointers for the current images + stbir_set_buffer_ptrs(&cache.resize, srcPtr, srcStride, destPtr, destStride); + } + + const int ok = stbir_resize_extended(&cache.resize); + dest->unlock(); + src->unlock(); + return ok != 0; +} + +/** + * Scale image using nearest neighbor anti-aliasing. + * Function by Warr1024, from https://github.com/minetest/minetest/issues/2419, modified. + */ +void ImageResizer::imageScaleNNAA(irr::video::IImage* src, irr::video::IImage* dest, bool use_threading) { + const auto& srcDim = src->getDimension(); + const auto& destDim = dest->getDimension(); + if (destDim.Width == 0 || destDim.Height == 0) + return; + + // Cache scale ratios. + const double rx = (double)srcDim.Width / destDim.Width; + const double ry = (double)srcDim.Height / destDim.Height; + +#pragma omp parallel if(use_threading) +{ + // Walk each destination image pixel. +#pragma omp for schedule(dynamic) + for(irr::s32 dy = 0; dy < (irr::s32)destDim.Height; dy++) { + for(irr::s32 dx = 0; dx < (irr::s32)destDim.Width; dx++) { + // Calculate floating-point source rectangle bounds. + double minsx = dx * rx; + double maxsx = minsx + rx; + double minsy = dy * ry; + double maxsy = minsy + ry; + irr::u32 sx_begin = (irr::u32)std::floor(minsx); + irr::u32 sx_end = (irr::u32)std::ceil(maxsx); + if (sx_end > srcDim.Width) + sx_end = srcDim.Width; + irr::u32 sy_begin = (irr::u32)std::floor(minsy); + irr::u32 sy_end = (irr::u32)std::ceil(maxsy); + if (sy_end > srcDim.Height) + sy_end = srcDim.Height; + + // Total area, and integral of r, g, b values over that area, + // initialized to zero, to be summed up in next loops. + double area = 0, ra = 0, ga = 0, ba = 0, aa = 0; + irr::video::SColor pxl, npxl; + + // Loop over the integral pixel positions described by those bounds. + for(irr::u32 sy = sy_begin; sy < sy_end; sy++) { + for(irr::u32 sx = sx_begin; sx < sx_end; sx++) { + // Calculate width, height, then area of dest pixel + // that's covered by this source pixel. + double pw = 1; + if(minsx > sx) + pw += sx - minsx; + if(maxsx < (sx + 1)) + pw += maxsx - sx - 1; + double ph = 1; + if(minsy > sy) + ph += sy - minsy; + if(maxsy < (sy + 1)) + ph += maxsy - sy - 1; + double pa = pw * ph; + + // Get source pixel and add it to totals, weighted + // by covered area and alpha. + pxl = src->getPixel(sx, sy); + area += pa; + ra += pa * pxl.getRed(); + ga += pa * pxl.getGreen(); + ba += pa * pxl.getBlue(); + aa += pa * pxl.getAlpha(); + } + } + // Set the destination image pixel to the average color. + if(area > 0) { + npxl.set((irr::u32)(aa / area + 0.5), + (irr::u32)(ra / area + 0.5), + (irr::u32)(ga / area + 0.5), + (irr::u32)(ba / area + 0.5)); + } else { + npxl.set(0); + } + dest->setPixel(dx, dy, npxl); + } + } +} // end of parallel region +} + +void ImageResizer::resize(irr::video::IImage* src, irr::video::IImage* dest, bool use_threading) { + if(imageScaleSTB(src, dest)) + return; + imageScaleNNAA(src, dest, use_threading); +} + +} // namespace ygo diff --git a/gframe/image_resizer.h b/gframe/image_resizer.h new file mode 100644 index 0000000000..1b4b0fd722 --- /dev/null +++ b/gframe/image_resizer.h @@ -0,0 +1,20 @@ +#ifndef IMAGE_RESIZER_H +#define IMAGE_RESIZER_H + +#include + +namespace ygo { + +class ImageResizer { +private: + bool imageScaleSTB(irr::video::IImage* src, irr::video::IImage* dest); + void imageScaleNNAA(irr::video::IImage* src, irr::video::IImage* dest, bool use_threading); +public: + void resize(irr::video::IImage* src, irr::video::IImage* dest, bool use_threading); +}; + +extern ImageResizer imageResizer; + +} // namespace ygo + +#endif // IMAGE_RESIZER_H diff --git a/gframe/irrUString.h b/gframe/irrUString.h index fdad57f005..88e81d0f7e 100644 --- a/gframe/irrUString.h +++ b/gframe/irrUString.h @@ -1,6 +1,7 @@ /* Basic Unicode string class for Irrlicht. Copyright (c) 2009-2011 John Norman + Copyright (c) 2022 Edoardo Lolletti This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any @@ -11,15 +12,15 @@ 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. + 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. + must not be misrepresented as being the original software. 3. This notice may not be removed or altered from any source - distribution. + distribution. The original version of this class can be located at: http://irrlicht.suckerfreegames.com/ @@ -31,448 +32,119 @@ #ifndef __IRR_USTRING_H_INCLUDED__ #define __IRR_USTRING_H_INCLUDED__ -#if (__cplusplus > 199711L) || (_MSC_VER >= 1600) || defined(__GXX_EXPERIMENTAL_CXX0X__) -# define USTRING_CPP0X -# if defined(__GXX_EXPERIMENTAL_CXX0X__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 5))) -# define USTRING_CPP0X_NEWLITERALS -# endif -#endif - -#include -#include -#include -#include - -#ifdef USTRING_CPP0X -# include -#endif - -#ifndef USTRING_NO_STL -# include -# include -# include -#endif - -#include "irrTypes.h" -#include "irrAllocator.h" -#include "irrArray.h" -#include "irrMath.h" -#include "irrString.h" -#include "path.h" - -//! UTF-16 surrogate start values. -static const irr::u16 UTF16_HI_SURROGATE = 0xD800; -static const irr::u16 UTF16_LO_SURROGATE = 0xDC00; +#include +#include +#include -//! Is a UTF-16 code point a surrogate? -#define UTF16_IS_SURROGATE(c) (((c) & 0xF800) == 0xD800) -#define UTF16_IS_SURROGATE_HI(c) (((c) & 0xFC00) == 0xD800) -#define UTF16_IS_SURROGATE_LO(c) (((c) & 0xFC00) == 0xDC00) +#include +#include +#include namespace irr { -// Define our character types. -#ifdef USTRING_CPP0X_NEWLITERALS // C++0x typedef char32_t uchar32_t; typedef char16_t uchar16_t; typedef char uchar8_t; -#else -typedef u32 uchar32_t; -typedef u16 uchar16_t; -typedef u8 uchar8_t; -#endif namespace core { namespace unicode { //! The unicode replacement character. Used to replace invalid characters. -const irr::u16 UTF_REPLACEMENT_CHARACTER = 0xFFFD; +constexpr uchar32_t UTF_REPLACEMENT_CHARACTER = 0xFFFD; //! Convert a UTF-16 surrogate pair into a UTF-32 character. //! \param high The high value of the pair. //! \param low The low value of the pair. //! \return The UTF-32 character expressed by the surrogate pair. -inline uchar32_t toUTF32(uchar16_t high, uchar16_t low) { +inline constexpr uchar32_t toUTF32(uchar16_t high, uchar16_t low) { // Convert the surrogate pair into a single UTF-32 character. uchar32_t x = ((high & ((1 << 6) - 1)) << 10) | (low & ((1 << 10) - 1)); uchar32_t wu = ((high >> 6) & ((1 << 5) - 1)) + 1; return (wu << 16) | x; } -//! Swaps the endianness of a 16-bit value. -//! \return The new value. -inline uchar16_t swapEndian16(const uchar16_t& c) { - return ((c >> 8) & 0x00FF) | ((c << 8) & 0xFF00); -} - -//! Swaps the endianness of a 32-bit value. -//! \return The new value. -inline uchar32_t swapEndian32(const uchar32_t& c) { - return ((c >> 24) & 0x000000FF) | - ((c >> 8) & 0x0000FF00) | - ((c << 8) & 0x00FF0000) | - ((c << 24) & 0xFF000000); -} - -//! The Unicode byte order mark. -const u16 BOM = 0xFEFF; - -//! The size of the Unicode byte order mark in terms of the Unicode character size. -const u8 BOM_UTF8_LEN = 3; -const u8 BOM_UTF16_LEN = 1; -const u8 BOM_UTF32_LEN = 1; - -//! Unicode byte order marks for file operations. -const u8 BOM_ENCODE_UTF8[3] = { 0xEF, 0xBB, 0xBF }; -const u8 BOM_ENCODE_UTF16_BE[2] = { 0xFE, 0xFF }; -const u8 BOM_ENCODE_UTF16_LE[2] = { 0xFF, 0xFE }; -const u8 BOM_ENCODE_UTF32_BE[4] = { 0x00, 0x00, 0xFE, 0xFF }; -const u8 BOM_ENCODE_UTF32_LE[4] = { 0xFF, 0xFE, 0x00, 0x00 }; - -//! The size in bytes of the Unicode byte marks for file operations. -const u8 BOM_ENCODE_UTF8_LEN = 3; -const u8 BOM_ENCODE_UTF16_LEN = 2; -const u8 BOM_ENCODE_UTF32_LEN = 4; - -//! Unicode encoding type. -enum EUTF_ENCODE { - EUTFE_NONE = 0, - EUTFE_UTF8, - EUTFE_UTF16, - EUTFE_UTF16_LE, - EUTFE_UTF16_BE, - EUTFE_UTF32, - EUTFE_UTF32_LE, - EUTFE_UTF32_BE -}; - -//! Unicode endianness. -enum EUTF_ENDIAN { - EUTFEE_NATIVE = 0, - EUTFEE_LITTLE, - EUTFEE_BIG -}; - -//! Returns the specified unicode byte order mark in a byte array. -//! The byte order mark is the first few bytes in a text file that signifies its encoding. -/** \param mode The Unicode encoding method that we want to get the byte order mark for. - If EUTFE_UTF16 or EUTFE_UTF32 is passed, it uses the native system endianness. **/ -//! \return An array that contains a byte order mark. -inline core::array getUnicodeBOM(EUTF_ENCODE mode) { -#define COPY_ARRAY(source, size) \ - memcpy(ret.pointer(), source, size); \ - ret.set_used(size) - - core::array ret(4); - switch (mode) { - case EUTFE_UTF8: - COPY_ARRAY(BOM_ENCODE_UTF8, BOM_ENCODE_UTF8_LEN); - break; - case EUTFE_UTF16: -#ifdef __BIG_ENDIAN__ - COPY_ARRAY(BOM_ENCODE_UTF16_BE, BOM_ENCODE_UTF16_LEN); -#else - COPY_ARRAY(BOM_ENCODE_UTF16_LE, BOM_ENCODE_UTF16_LEN); -#endif - break; - case EUTFE_UTF16_BE: - COPY_ARRAY(BOM_ENCODE_UTF16_BE, BOM_ENCODE_UTF16_LEN); - break; - case EUTFE_UTF16_LE: - COPY_ARRAY(BOM_ENCODE_UTF16_LE, BOM_ENCODE_UTF16_LEN); - break; - case EUTFE_UTF32: -#ifdef __BIG_ENDIAN__ - COPY_ARRAY(BOM_ENCODE_UTF32_BE, BOM_ENCODE_UTF32_LEN); -#else - COPY_ARRAY(BOM_ENCODE_UTF32_LE, BOM_ENCODE_UTF32_LEN); -#endif - break; - case EUTFE_UTF32_BE: - COPY_ARRAY(BOM_ENCODE_UTF32_BE, BOM_ENCODE_UTF32_LEN); - break; - case EUTFE_UTF32_LE: - COPY_ARRAY(BOM_ENCODE_UTF32_LE, BOM_ENCODE_UTF32_LEN); - break; - default: break; - } - return ret; - -#undef COPY_ARRAY -} - -//! Detects if the given data stream starts with a unicode BOM. -//! \param data The data stream to check. -//! \return The unicode BOM associated with the data stream, or EUTFE_NONE if none was found. -inline EUTF_ENCODE determineUnicodeBOM(const char* data) { - if (memcmp(data, BOM_ENCODE_UTF8, 3) == 0) return EUTFE_UTF8; - if (memcmp(data, BOM_ENCODE_UTF16_BE, 2) == 0) return EUTFE_UTF16_BE; - if (memcmp(data, BOM_ENCODE_UTF16_LE, 2) == 0) return EUTFE_UTF16_LE; - if (memcmp(data, BOM_ENCODE_UTF32_BE, 4) == 0) return EUTFE_UTF32_BE; - if (memcmp(data, BOM_ENCODE_UTF32_LE, 4) == 0) return EUTFE_UTF32_LE; - return EUTFE_NONE; -} - } // end namespace unicode //! UTF-16 string class. -template > class ustring16 { public: + //! UTF-16 surrogate start values. + static constexpr uint16_t UTF16_HI_SURROGATE = 0xD800; + static constexpr uint16_t UTF16_LO_SURROGATE = 0xDC00; - ///------------------/// - /// iterator classes /// - ///------------------/// - - //! Access an element in a unicode string, allowing one to change it. - class _ustring16_iterator_access { - public: - _ustring16_iterator_access(const ustring16* s, u32 p) : ref(s), pos(p) {} - - //! Allow the class to be interpreted as a single UTF-32 character. - operator uchar32_t() const { - return _get(); - } - - //! Allow one to change the character in the unicode string. - //! \param c The new character to use. - //! \return Myself. - _ustring16_iterator_access& operator=(const uchar32_t c) { - _set(c); - return *this; - } - - //! Increments the value by 1. - //! \return Myself. - _ustring16_iterator_access& operator++() { - _set(_get() + 1); - return *this; - } - - //! Increments the value by 1, returning the old value. - //! \return A unicode character. - uchar32_t operator++(int) { - uchar32_t old = _get(); - _set(old + 1); - return old; - } - - //! Decrements the value by 1. - //! \return Myself. - _ustring16_iterator_access& operator--() { - _set(_get() - 1); - return *this; - } - - //! Decrements the value by 1, returning the old value. - //! \return A unicode character. - uchar32_t operator--(int) { - uchar32_t old = _get(); - _set(old - 1); - return old; - } - - //! Adds to the value by a specified amount. - //! \param val The amount to add to this character. - //! \return Myself. - _ustring16_iterator_access& operator+=(int val) { - _set(_get() + val); - return *this; - } - - //! Subtracts from the value by a specified amount. - //! \param val The amount to subtract from this character. - //! \return Myself. - _ustring16_iterator_access& operator-=(int val) { - _set(_get() - val); - return *this; - } - - //! Multiples the value by a specified amount. - //! \param val The amount to multiply this character by. - //! \return Myself. - _ustring16_iterator_access& operator*=(int val) { - _set(_get() * val); - return *this; - } - - //! Divides the value by a specified amount. - //! \param val The amount to divide this character by. - //! \return Myself. - _ustring16_iterator_access& operator/=(int val) { - _set(_get() / val); - return *this; - } - - //! Modulos the value by a specified amount. - //! \param val The amount to modulo this character by. - //! \return Myself. - _ustring16_iterator_access& operator%=(int val) { - _set(_get() % val); - return *this; - } - - //! Adds to the value by a specified amount. - //! \param val The amount to add to this character. - //! \return A unicode character. - uchar32_t operator+(int val) const { - return _get() + val; - } - - //! Subtracts from the value by a specified amount. - //! \param val The amount to subtract from this character. - //! \return A unicode character. - uchar32_t operator-(int val) const { - return _get() - val; - } - - //! Multiplies the value by a specified amount. - //! \param val The amount to multiply this character by. - //! \return A unicode character. - uchar32_t operator*(int val) const { - return _get() * val; - } - - //! Divides the value by a specified amount. - //! \param val The amount to divide this character by. - //! \return A unicode character. - uchar32_t operator/(int val) const { - return _get() / val; - } - - //! Modulos the value by a specified amount. - //! \param val The amount to modulo this character by. - //! \return A unicode character. - uchar32_t operator%(int val) const { - return _get() % val; - } - - private: - //! Gets a uchar32_t from our current position. - uchar32_t _get() const { - const uchar16_t* a = ref->c_str(); - if (!UTF16_IS_SURROGATE(a[pos])) - return static_cast(a[pos]); - else { - if (pos + 1 >= ref->size_raw()) - return 0; - - return unicode::toUTF32(a[pos], a[pos + 1]); - } - } - - //! Sets a uchar32_t at our current position. - void _set(uchar32_t c) { - ustring16* ref2 = const_cast*>(ref); - const uchar16_t* a = ref2->c_str(); - if (c > 0xFFFF) { - // c will be multibyte, so split it up into the high and low surrogate pairs. - uchar16_t x = static_cast(c); - uchar16_t vh = UTF16_HI_SURROGATE | ((((c >> 16) & ((1 << 5) - 1)) - 1) << 6) | (x >> 10); - uchar16_t vl = UTF16_LO_SURROGATE | (x & ((1 << 10) - 1)); - - // If the previous position was a surrogate pair, just replace them. Else, insert the low pair. - if (UTF16_IS_SURROGATE_HI(a[pos]) && pos + 1 != ref2->size_raw()) - ref2->replace_raw(vl, static_cast(pos) + 1); - else ref2->insert_raw(vl, static_cast(pos) + 1); - - ref2->replace_raw(vh, static_cast(pos)); - } else { - // c will be a single byte. - uchar16_t vh = static_cast(c); - - // If the previous position was a surrogate pair, remove the extra byte. - if (UTF16_IS_SURROGATE_HI(a[pos])) - ref2->erase_raw(static_cast(pos) + 1); - - ref2->replace_raw(vh, static_cast(pos)); - } - } + //! Is a UTF-16 code point a surrogate? + static constexpr bool UTF16_IS_SURROGATE(uchar16_t c) { + return (c & 0xF800) == UTF16_HI_SURROGATE; + } + static constexpr bool UTF16_IS_SURROGATE_HI(uchar16_t c) { + return (c & 0xFC00) == UTF16_HI_SURROGATE; + } + static constexpr bool UTF16_IS_SURROGATE_LO(uchar16_t c) { + return (c & 0xFC00) == UTF16_LO_SURROGATE; + } + static constexpr bool UTF16_IS_VALID_SURROGATE_PAIR(uchar16_t lo, uchar16_t hi) { + return UTF16_IS_SURROGATE_HI(hi) && UTF16_IS_SURROGATE_LO(lo); + } - const ustring16* ref; - u32 pos; - }; - typedef typename ustring16::_ustring16_iterator_access access; + typedef uchar32_t access; //! Iterator to iterate through a UTF-16 string. -#ifndef USTRING_NO_STL - class _ustring16_const_iterator : public std::iterator < - std::bidirectional_iterator_tag, // iterator_category - access, // value_type - ptrdiff_t, // difference_type - const access, // pointer - const access // reference - > -#else class _ustring16_const_iterator -#endif { public: typedef _ustring16_const_iterator _Iter; - typedef std::iterator _Base; typedef const access const_pointer; typedef const access const_reference; - -#ifndef USTRING_NO_STL - typedef typename _Base::value_type value_type; - typedef typename _Base::difference_type difference_type; - typedef typename _Base::difference_type distance_type; - typedef typename _Base::pointer pointer; - typedef const_reference reference; -#else + typedef ptrdiff_t distance_type; + // stuff for std::iterator_traits + typedef std::bidirectional_iterator_tag iterator_category; typedef access value_type; - typedef u32 difference_type; - typedef u32 distance_type; - typedef const_pointer pointer; + typedef distance_type difference_type; + typedef const access pointer; typedef const_reference reference; -#endif //! Constructors. _ustring16_const_iterator(const _Iter& i) : ref(i.ref), pos(i.pos) {} - _ustring16_const_iterator(const ustring16& s) : ref(&s), pos(0) {} - _ustring16_const_iterator(const ustring16& s, const u32 p) : ref(&s), pos(0) { - if (ref->size_raw() == 0 || p == 0) + _ustring16_const_iterator(const ustring16& s) : ref(&s), pos(0) {} + _ustring16_const_iterator(const ustring16& s, const u32 p) : ref(&s), pos(0) { + if(ref->size_raw() == 0 || p == 0) return; // Go to the appropriate position. - u32 i = p; - u32 sr = ref->size_raw(); - const uchar16_t* a = ref->c_str(); - while (i != 0 && pos < sr) { - if (UTF16_IS_SURROGATE_HI(a[pos])) - pos += 2; - else ++pos; - --i; - } + + advance(p); } //! Test for equalness. bool operator==(const _Iter& iter) const { - if (ref == iter.ref && pos == iter.pos) + if(ref == iter.ref && pos == iter.pos) return true; return false; } //! Test for unequalness. bool operator!=(const _Iter& iter) const { - if (ref != iter.ref || pos != iter.pos) - return true; - return false; + return !operator==(iter); } //! Switch to the next full character in the string. _Iter& operator++() { // ++iterator - if (pos == ref->size_raw()) return *this; - const uchar16_t* a = ref->c_str(); - if (UTF16_IS_SURROGATE_HI(a[pos])) - pos += 2; // TODO: check for valid low surrogate? - else ++pos; - if (pos > ref->size_raw()) pos = ref->size_raw(); + if(pos == ref->size_raw()) return *this; + if(is_utf32) { + pos++; + } else { + if(isNextCodepointValidSurrogatePair()) + pos += 2; + else + pos++; + if(pos > ref->size_raw()) + pos = ref->size_raw(); + } return *this; } @@ -487,11 +159,15 @@ class ustring16 { //! Switch to the previous full character in the string. _Iter& operator--() { // --iterator - if (pos == 0) return *this; - const uchar16_t* a = ref->c_str(); - --pos; - if (UTF16_IS_SURROGATE_LO(a[pos]) && pos != 0) // low surrogate, go back one more. + if(pos == 0) return *this; + if(is_utf32) { --pos; + } else { + const uchar16_t* a = reinterpret_cast(ref->data()); + --pos; + if(UTF16_IS_SURROGATE_LO(a[pos]) && pos != 0 && UTF16_IS_SURROGATE_HI(a[pos - 1])) // low surrogate, go back one more. + --pos; + } return *this; } @@ -506,25 +182,13 @@ class ustring16 { //! Advance a specified number of full characters in the string. //! \return Myself. _Iter& operator+=(const difference_type v) { - if (v == 0) return *this; - if (v < 0) return operator-=(v * -1); + if(v == 0) return *this; + if(v < 0) return operator-=(v * -1); - if (pos >= ref->size_raw()) + if(pos >= ref->size_raw()) return *this; - // Go to the appropriate position. - // TODO: Don't force u32 on an x64 OS. Make it agnostic. - u32 i = (u32)v; - u32 sr = ref->size_raw(); - const uchar16_t* a = ref->c_str(); - while (i != 0 && pos < sr) { - if (UTF16_IS_SURROGATE_HI(a[pos])) - pos += 2; - else ++pos; - --i; - } - if (pos > sr) - pos = sr; + advance(v); return *this; } @@ -532,22 +196,13 @@ class ustring16 { //! Go back a specified number of full characters in the string. //! \return Myself. _Iter& operator-=(const difference_type v) { - if (v == 0) return *this; - if (v > 0) return operator+=(v * -1); + if(v == 0) return *this; + if(v < 0) return operator+=(-v); - if (pos == 0) + if(pos == 0) return *this; - // Go to the appropriate position. - // TODO: Don't force u32 on an x64 OS. Make it agnostic. - u32 i = (u32)v; - const uchar16_t* a = ref->c_str(); - while (i != 0 && pos != 0) { - --pos; - if (UTF16_IS_SURROGATE_LO(a[pos]) != 0 && pos != 0) - --pos; - --i; - } + go_back(v); return *this; } @@ -569,15 +224,15 @@ class ustring16 { //! Returns the distance between two iterators. difference_type operator-(const _Iter& iter) const { // Make sure we reference the same object! - if (ref != iter.ref) + if(ref != iter.ref) return difference_type(); _Iter i = iter; - difference_type ret; + difference_type ret = 0; // Walk up. - if (pos > i.pos) { - while (pos > i.pos) { + if(pos > i.pos) { + while(pos > i.pos) { ++i; ++ret; } @@ -585,7 +240,7 @@ class ustring16 { } // Walk down. - while (pos < i.pos) { + while(pos < i.pos) { --i; --ret; } @@ -594,30 +249,28 @@ class ustring16 { //! Accesses the full character at the iterator's position. const_reference operator*() const { - if (pos >= ref->size_raw()) { - const uchar16_t* a = ref->c_str(); - u32 p = ref->size_raw(); - if (UTF16_IS_SURROGATE_LO(a[p])) - --p; - reference ret(ref, p); - return ret; - } - const_reference ret(ref, pos); - return ret; - } - - //! Accesses the full character at the iterator's position. - reference operator*() { - if (pos >= ref->size_raw()) { - const uchar16_t* a = ref->c_str(); - u32 p = ref->size_raw(); - if (UTF16_IS_SURROGATE_LO(a[p])) - --p; - reference ret(ref, p); - return ret; - } - reference ret(ref, pos); - return ret; + auto size = ref->size_raw(); + _IRR_DEBUG_BREAK_IF(pos >= size); + if(is_utf32) { + const uchar32_t* data = reinterpret_cast(ref->data()); + auto ch = data[pos]; + if(ch >= 0xFDD0 && ch <= 0xFDEF) + return unicode::UTF_REPLACEMENT_CHARACTER; + return ch; + } + const uchar16_t* data = reinterpret_cast(ref->data()); + auto hi = data[pos]; + if(!UTF16_IS_SURROGATE(hi)) { + if(hi >= 0xFDD0 && hi <= 0xFDEF) + return unicode::UTF_REPLACEMENT_CHARACTER; + return static_cast(hi); + } + if((pos + 1 >= size) || !UTF16_IS_SURROGATE_HI(hi)) + return unicode::UTF_REPLACEMENT_CHARACTER; + auto lo = data[pos + 1]; + if(!UTF16_IS_SURROGATE_LO(lo)) + return unicode::UTF_REPLACEMENT_CHARACTER; + return unicode::toUTF32(hi, lo); } //! Accesses the full character at the iterator's position. @@ -637,10 +290,7 @@ class ustring16 { //! Is the iterator at the end of the string? bool atEnd() const { - const uchar16_t* a = ref->c_str(); - if (UTF16_IS_SURROGATE(a[pos])) - return (pos + 1) >= ref->size_raw(); - else return pos >= ref->size_raw(); + return pos >= ref->size_raw(); } //! Moves the iterator to the start of the string. @@ -660,73 +310,60 @@ class ustring16 { } protected: - const ustring16* ref; + const ustring16* ref; u32 pos; - }; - - //! Iterator to iterate through a UTF-16 string. - class _ustring16_iterator : public _ustring16_const_iterator { - public: - typedef _ustring16_iterator _Iter; - typedef _ustring16_const_iterator _Base; - typedef typename _Base::const_pointer const_pointer; - typedef typename _Base::const_reference const_reference; - - typedef typename _Base::value_type value_type; - typedef typename _Base::difference_type difference_type; - typedef typename _Base::distance_type distance_type; - typedef access pointer; - typedef access reference; - - using _Base::pos; - using _Base::ref; + static constexpr bool is_utf32 = sizeof(wchar_t) == 4; - //! Constructors. - _ustring16_iterator(const _Iter& i) : _ustring16_const_iterator(i) {} - _ustring16_iterator(const ustring16& s) : _ustring16_const_iterator(s) {} - _ustring16_iterator(const ustring16& s, const u32 p) : _ustring16_const_iterator(s, p) {} - - //! Accesses the full character at the iterator's position. - reference operator*() const { - if (pos >= ref->size_raw()) { - const uchar16_t* a = ref->c_str(); - u32 p = ref->size_raw(); - if (UTF16_IS_SURROGATE_LO(a[p])) - --p; - reference ret(ref, p); - return ret; - } - reference ret(ref, pos); - return ret; + bool isNextCodepointValidSurrogatePair() const { + if(is_utf32) + return true; + const uchar16_t* data = reinterpret_cast(ref->data()); + if(!UTF16_IS_SURROGATE_HI(data[pos])) + return false; + if((pos + 1) >= ref->size_raw()) + return false; + return UTF16_IS_SURROGATE_LO(data[pos + 1]); } - //! Accesses the full character at the iterator's position. - reference operator*() { - if (pos >= ref->size_raw()) { - const uchar16_t* a = ref->c_str(); - u32 p = ref->size_raw(); - if (UTF16_IS_SURROGATE_LO(a[p])) - --p; - reference ret(ref, p); - return ret; + void advance(const difference_type v) { + u32 sr = ref->size_raw(); + if(is_utf32) { + pos += (u32)v; + } else { + u32 i = (u32)v; + while(i != 0 && pos < sr) { + if(isNextCodepointValidSurrogatePair()) { + pos += 2; + } else + pos++; + --i; + } } - reference ret(ref, pos); - return ret; - } - - //! Accesses the full character at the iterator's position. - pointer operator->() const { - return operator*(); + if(pos > sr) + pos = sr; } - //! Accesses the full character at the iterator's position. - pointer operator->() { - return operator*(); + void go_back(const difference_type v) { + // Go to the appropriate position. + // TODO: Don't force u32 on an x64 OS. Make it agnostic. + auto i = static_cast(v); + if(is_utf32) { + if(pos < i) + pos = 0; + pos -= i; + } else { + const uchar16_t* a = reinterpret_cast(ref->data()); + while(i != 0 && pos != 0) { + --pos; + if(UTF16_IS_SURROGATE_LO(a[pos]) && pos != 0 && UTF16_IS_SURROGATE_HI(a[pos - 1])) + --pos; + --i; + } + } } }; - typedef typename ustring16::_ustring16_iterator iterator; - typedef typename ustring16::_ustring16_const_iterator const_iterator; + typedef typename ustring16::_ustring16_const_iterator const_iterator; ///----------------------/// /// end iterator classes /// @@ -734,1701 +371,190 @@ class ustring16 { //! Default constructor ustring16() - : array(0), allocated(1), used(0) { -#if __BIG_ENDIAN__ - encoding = unicode::EUTFE_UTF16_BE; -#else - encoding = unicode::EUTFE_UTF16_LE; -#endif - array = allocator.allocate(1); // new u16[1]; - array[0] = 0x0; - } - - - //! Constructor - ustring16(const ustring16& other) - : array(0), allocated(0), used(0) { -#if __BIG_ENDIAN__ - encoding = unicode::EUTFE_UTF16_BE; -#else - encoding = unicode::EUTFE_UTF16_LE; -#endif - *this = other; + : data_(nullptr), size_(0xffffffff), size_raw_(0) { } //! Constructor from other string types - template - ustring16(const string& other) - : array(0), allocated(0), used(0) { -#if __BIG_ENDIAN__ - encoding = unicode::EUTFE_UTF16_BE; -#else - encoding = unicode::EUTFE_UTF16_LE; -#endif - *this = other; + ustring16(const ustring16& other) + : data_(nullptr), size_(0xffffffff), size_raw_(0) { + data_ = other.data(); + size_raw_ = other.size_raw(); } - -#ifndef USTRING_NO_STL - //! Constructor from std::string - template - ustring16(const std::basic_string& other) - : array(0), allocated(0), used(0) { -#if __BIG_ENDIAN__ - encoding = unicode::EUTFE_UTF16_BE; -#else - encoding = unicode::EUTFE_UTF16_LE; -#endif - *this = other.c_str(); + ustring16(const stringw& other) + : data_(nullptr), size_(0), size_raw_(0) { + assign(other.c_str(), static_cast(other.size())); } + template + ustring16(const std::basic_string& other) + : data_(nullptr), size_(0), size_raw_(0) { + assign(other.data(), static_cast(other.size())); + } - //! Constructor from iterator. - template - ustring16(Itr first, Itr last) - : array(0), allocated(0), used(0) { -#if __BIG_ENDIAN__ - encoding = unicode::EUTFE_UTF16_BE; -#else - encoding = unicode::EUTFE_UTF16_LE; -#endif - reserve(std::distance(first, last)); - array[used] = 0; - for (; first != last; ++first) - append((uchar32_t)*first); + //! Constructor for copying a UTF-32 string from a pointer. + ustring16(const wchar_t* const c) + : data_(nullptr), size_(0), size_raw_(0) { + assign(c); } -#endif -#ifndef USTRING_CPP0X_NEWLITERALS - //! Constructor for copying a character string from a pointer. - ustring16(const char* const c) - : array(0), allocated(0), used(0) { -#if __BIG_ENDIAN__ - encoding = unicode::EUTFE_UTF16_BE; -#else - encoding = unicode::EUTFE_UTF16_LE; -#endif - - loadDataStream(c, strlen(c)); - //append((uchar8_t*)c); + //! Constructor for copying a UTF-32 from a pointer with a given length. + ustring16(const wchar_t* const c, u32 length) + : data_(nullptr), size_(0), size_raw_(0) { + assign(c, length); } - //! Constructor for copying a character string from a pointer with a given length. - ustring16(const char* const c, u32 length) - : array(0), allocated(0), used(0) { -#if __BIG_ENDIAN__ - encoding = unicode::EUTFE_UTF16_BE; -#else - encoding = unicode::EUTFE_UTF16_LE; -#endif + //! Assignment operator for other string types + ustring16& operator=(const ustring16& other) { + data_ = other.data(); + size_raw_ = other.size_raw(); + size_ = 0xffffffff; + return *this; + } - loadDataStream(c, length); + ustring16& operator=(const stringw& other) { + assign(other.c_str(), static_cast(other.size())); + return *this; } -#endif + template + ustring16& operator=(const std::basic_string& other) { + assign(other.data(), static_cast(other.size())); + return *this; + } - //! Constructor for copying a UTF-8 string from a pointer. - ustring16(const uchar8_t* const c) - : array(0), allocated(0), used(0) { -#if __BIG_ENDIAN__ - encoding = unicode::EUTFE_UTF16_BE; -#else - encoding = unicode::EUTFE_UTF16_LE; -#endif - append(c); + //! Assignment operator for UTF-16 strings + ustring16& operator=(const wchar_t* const c) { + assign(c); + return *this; } - //! Constructor for copying a UTF-8 string from a pointer with a given length. - ustring16(const uchar8_t* const c, u32 length) - : array(0), allocated(0), used(0) { -#if __BIG_ENDIAN__ - encoding = unicode::EUTFE_UTF16_BE; -#else - encoding = unicode::EUTFE_UTF16_LE; -#endif + //! Assignment operator for other strings. + /** Note that this assumes that a correct unicode string is stored in the string. **/ + template + ustring16& operator=(const B* const c) { + static_assert(sizeof(B) == sizeof(wchar_t), "unsupported character size"); + *this = reinterpret_cast(c); - append(c, length); + return *this; } - //! Constructor for copying a UTF-16 string from a pointer. - ustring16(const uchar16_t* const c) - : array(0), allocated(0), used(0) { -#if __BIG_ENDIAN__ - encoding = unicode::EUTFE_UTF16_BE; -#else - encoding = unicode::EUTFE_UTF16_LE; -#endif - - append(c); + //! Returns the length of a ustring16 in full characters. + //! \return Length of a ustring16 in full characters. + u32 size() const { + if (sizeof(wchar_t) == 4) { + return size_raw_; + } else { + if(size_ != 0xffffffff) + return size_; + + const uchar16_t* array = reinterpret_cast(data_); + size_ = 0; + for(u32 i = 0; i < size_raw_; ++i, ++size_) { + if(UTF16_IS_SURROGATE_HI(array[i])) { + if((i + 1) >= size_raw_) + break; + ++i; + } + } + return size_; + } } - //! Constructor for copying a UTF-16 string from a pointer with a given length - ustring16(const uchar16_t* const c, u32 length) - : array(0), allocated(0), used(0) { -#if __BIG_ENDIAN__ - encoding = unicode::EUTFE_UTF16_BE; -#else - encoding = unicode::EUTFE_UTF16_LE; -#endif - - append(c, length); + //! Informs if the ustring is empty or not. + //! \return True if the ustring is empty, false if not. + bool empty() const { + return (size_raw() == 0); } - //! Constructor for copying a UTF-32 string from a pointer. - ustring16(const uchar32_t* const c) - : array(0), allocated(0), used(0) { -#if __BIG_ENDIAN__ - encoding = unicode::EUTFE_UTF16_BE; -#else - encoding = unicode::EUTFE_UTF16_LE; -#endif - - append(c); + //! Returns a pointer to the raw UTF-16 string data. + //! \return pointer to C-style NUL terminated array of UTF-16 code points. + const wchar_t* data() const { + return data_; } - //! Constructor for copying a UTF-32 from a pointer with a given length. - ustring16(const uchar32_t* const c, u32 length) - : array(0), allocated(0), used(0) { -#if __BIG_ENDIAN__ - encoding = unicode::EUTFE_UTF16_BE; -#else - encoding = unicode::EUTFE_UTF16_LE; -#endif + //! assigns a UTF-16 string to this ustring16 + //! \param other The UTF-16 string to assign. + //! \param length The length of the string to assign. + //! \return A reference to our current string. + void assign(const wchar_t* const other, u32 length = 0xffffffff) { + + // Calculate the size of the string to read in. + if(length == 0xffffffff) { + length = 0; + auto* p = other; + while(*p++) { + ++length; + } + } - append(c, length); + data_ = other; + size_raw_ = length; + size_ = 0xffffffff; + validate(); } - //! Constructor for copying a wchar_t string from a pointer. - ustring16(const wchar_t* const c) - : array(0), allocated(0), used(0) { -#if __BIG_ENDIAN__ - encoding = unicode::EUTFE_UTF16_BE; -#else - encoding = unicode::EUTFE_UTF16_LE; -#endif + //! Finds first occurrence of character. + //! \param c The character to search for. + //! \return Position where the character has been found, or -1 if not found. + s32 findFirst(uchar32_t c) const { + s32 pos = 0; + for(auto t : *this) { + if(c == t) + return pos; + ++pos; + } - if (sizeof(wchar_t) == 4) - append(reinterpret_cast(c)); - else if (sizeof(wchar_t) == 2) - append(reinterpret_cast(c)); - else if (sizeof(wchar_t) == 1) - append(reinterpret_cast(c)); + return -1; } - //! Constructor for copying a wchar_t string from a pointer with a given length. - ustring16(const wchar_t* const c, u32 length) - : array(0), allocated(0), used(0) { -#if __BIG_ENDIAN__ - encoding = unicode::EUTFE_UTF16_BE; -#else - encoding = unicode::EUTFE_UTF16_LE; -#endif - - if (sizeof(wchar_t) == 4) - append(reinterpret_cast(c), length); - else if (sizeof(wchar_t) == 2) - append(reinterpret_cast(c), length); - else if (sizeof(wchar_t) == 1) - append(reinterpret_cast(c), length); + //! Validate the existing ustring16, checking for valid surrogate pairs and checking for proper termination. + //! \return A reference to our current string. + void validate() { + // Validate all unicode characters. + if (sizeof(wchar_t) == 4) { + size_ = size_raw_; + return; + } } - -#ifdef USTRING_CPP0X - //! Constructor for moving a ustring16 - ustring16(ustring16 && other) - : array(other.array), encoding(other.encoding), allocated(other.allocated), used(other.used) { - //std::cout << "MOVE constructor" << std::endl; - other.array = 0; - other.allocated = 0; - other.used = 0; + //! Returns the raw number of UTF-16 code points in the string which includes the individual surrogates. + //! \return The raw number of UTF-16 code points, excluding the trialing NUL. + u32 size_raw() const { + return size_raw_; } -#endif - //! Destructor - ~ustring16() { - allocator.deallocate(array); // delete [] array; - } - - - //! Assignment operator - ustring16& operator=(const ustring16& other) { - if (this == &other) - return *this; - - used = other.size_raw(); - if (used >= allocated) { - allocator.deallocate(array); // delete [] array; - allocated = used + 1; - array = allocator.allocate(used + 1); //new u16[used]; - } - - const uchar16_t* p = other.c_str(); - for (u32 i = 0; i <= used; ++i, ++p) - array[i] = *p; - - array[used] = 0; - - // Validate our new UTF-16 string. - validate(); - - return *this; - } - - -#ifdef USTRING_CPP0X - //! Move assignment operator - ustring16& operator=(ustring16 && other) { - if (this != &other) { - //std::cout << "MOVE operator=" << std::endl; - allocator.deallocate(array); - - array = other.array; - allocated = other.allocated; - encoding = other.encoding; - used = other.used; - other.array = 0; - other.used = 0; - } - return *this; - } -#endif - - - //! Assignment operator for other string types - template - ustring16& operator=(const string& other) { - *this = other.c_str(); - return *this; - } - - - //! Assignment operator for UTF-8 strings - ustring16& operator=(const uchar8_t* const c) { - if (!array) { - array = allocator.allocate(1); //new u16[1]; - allocated = 1; - } - used = 0; - array[used] = 0x0; - if (!c) return *this; - - //! Append our string now. - append(c); - return *this; - } - - - //! Assignment operator for UTF-16 strings - ustring16& operator=(const uchar16_t* const c) { - if (!array) { - array = allocator.allocate(1); //new u16[1]; - allocated = 1; - } - used = 0; - array[used] = 0x0; - if (!c) return *this; - - //! Append our string now. - append(c); - return *this; - } - - - //! Assignment operator for UTF-32 strings - ustring16& operator=(const uchar32_t* const c) { - if (!array) { - array = allocator.allocate(1); //new u16[1]; - allocated = 1; - } - used = 0; - array[used] = 0x0; - if (!c) return *this; - - //! Append our string now. - append(c); - return *this; - } - - - //! Assignment operator for wchar_t strings. - /** Note that this assumes that a correct unicode string is stored in the wchar_t string. - Since wchar_t changes depending on its platform, it could either be a UTF-8, -16, or -32 string. - This function assumes you are storing the correct unicode encoding inside the wchar_t string. **/ - ustring16& operator=(const wchar_t* const c) { - if (sizeof(wchar_t) == 4) - *this = reinterpret_cast(c); - else if (sizeof(wchar_t) == 2) - *this = reinterpret_cast(c); - else if (sizeof(wchar_t) == 1) - *this = reinterpret_cast(c); - - return *this; - } - - - //! Assignment operator for other strings. - /** Note that this assumes that a correct unicode string is stored in the string. **/ - template - ustring16& operator=(const B* const c) { - if (sizeof(B) == 4) - *this = reinterpret_cast(c); - else if (sizeof(B) == 2) - *this = reinterpret_cast(c); - else if (sizeof(B) == 1) - *this = reinterpret_cast(c); - - return *this; - } - - - //! Direct access operator - access operator [](const u32 index) { - _IRR_DEBUG_BREAK_IF(index >= size()) // bad index - iterator iter(*this, index); - return iter.operator * (); - } - - - //! Direct access operator - const access operator [](const u32 index) const { - _IRR_DEBUG_BREAK_IF(index >= size()) // bad index - const_iterator iter(*this, index); - return iter.operator * (); - } - - - //! Equality operator - bool operator ==(const uchar16_t* const str) const { - if (!str) - return false; - - u32 i; - for(i = 0; array[i] && str[i]; ++i) - if (array[i] != str[i]) - return false; - - return !array[i] && !str[i]; - } - - - //! Equality operator - bool operator ==(const ustring16& other) const { - for(u32 i = 0; array[i] && other.array[i]; ++i) - if (array[i] != other.array[i]) - return false; - - return used == other.used; - } - - - //! Is smaller comparator - bool operator <(const ustring16& other) const { - for(u32 i = 0; array[i] && other.array[i]; ++i) { - s32 diff = array[i] - other.array[i]; - if ( diff ) - return diff < 0; - } - - return used < other.used; - } - - - //! Inequality operator - bool operator !=(const uchar16_t* const str) const { - return !(*this == str); - } - - - //! Inequality operator - bool operator !=(const ustring16& other) const { - return !(*this == other); - } - - - //! Returns the length of a ustring16 in full characters. - //! \return Length of a ustring16 in full characters. - u32 size() const { - const_iterator i(*this, 0); - u32 pos = 0; - while (!i.atEnd()) { - ++i; - ++pos; - } - return pos; - } - - - //! Informs if the ustring is empty or not. - //! \return True if the ustring is empty, false if not. - bool empty() const { - return (size_raw() == 0); - } - - - //! Returns a pointer to the raw UTF-16 string data. - //! \return pointer to C-style NUL terminated array of UTF-16 code points. - const uchar16_t* c_str() const { - return array; - } - - - //! Compares the first n characters of this string with another. - //! \param other Other string to compare to. - //! \param n Number of characters to compare. - //! \return True if the n first characters of both strings are equal. - bool equalsn(const ustring16& other, u32 n) const { - u32 i; - const uchar16_t* oa = other.c_str(); - for(i = 0; array[i] && oa[i] && i < n; ++i) - if (array[i] != oa[i]) - return false; - - // if one (or both) of the strings was smaller then they - // are only equal if they have the same length - return (i == n) || (used == other.used); - } - - - //! Compares the first n characters of this string with another. - //! \param str Other string to compare to. - //! \param n Number of characters to compare. - //! \return True if the n first characters of both strings are equal. - bool equalsn(const uchar16_t* const str, u32 n) const { - if (!str) - return false; - u32 i; - for(i = 0; array[i] && str[i] && i < n; ++i) - if (array[i] != str[i]) - return false; - - // if one (or both) of the strings was smaller then they - // are only equal if they have the same length - return (i == n) || (array[i] == 0 && str[i] == 0); - } - - - //! Appends a character to this ustring16 - //! \param character The character to append. - //! \return A reference to our current string. - ustring16& append(uchar32_t character) { - if (used + 2 >= allocated) - reallocate(used + 2); - - if (character > 0xFFFF) { - used += 2; - - // character will be multibyte, so split it up into a surrogate pair. - uchar16_t x = static_cast(character); - uchar16_t vh = UTF16_HI_SURROGATE | ((((character >> 16) & ((1 << 5) - 1)) - 1) << 6) | (x >> 10); - uchar16_t vl = UTF16_LO_SURROGATE | (x & ((1 << 10) - 1)); - array[used - 2] = vh; - array[used - 1] = vl; - } else { - ++used; - array[used - 1] = character; - } - array[used] = 0; - - return *this; - } - - - //! Appends a UTF-8 string to this ustring16 - //! \param other The UTF-8 string to append. - //! \param length The length of the string to append. - //! \return A reference to our current string. - ustring16& append(const uchar8_t* const other, u32 length = 0xffffffff) { - if (!other) - return *this; - - // Determine if the string is long enough for a BOM. - u32 len = 0; - const uchar8_t* p = other; - do { - ++len; - } while (*p++ && len < unicode::BOM_ENCODE_UTF8_LEN); - - // Check for BOM. - unicode::EUTF_ENCODE c_bom = unicode::EUTFE_NONE; - if (len == unicode::BOM_ENCODE_UTF8_LEN) { - if (memcmp(other, unicode::BOM_ENCODE_UTF8, unicode::BOM_ENCODE_UTF8_LEN) == 0) - c_bom = unicode::EUTFE_UTF8; - } - - // If a BOM was found, don't include it in the string. - const uchar8_t* c2 = other; - if (c_bom != unicode::EUTFE_NONE) { - c2 = other + unicode::BOM_UTF8_LEN; - length -= unicode::BOM_UTF8_LEN; - } - - // Calculate the size of the string to read in. - len = 0; - p = c2; - do { - ++len; - } while(*p++ && len < length); - if (len > length) - len = length; - - // If we need to grow the array, do it now. - if (used + len >= allocated) - reallocate(used + (len * 2)); - u32 start = used; - - // Convert UTF-8 to UTF-16. - u32 pos = start; - for (u32 l = 0; l < len;) { - ++used; - if (((c2[l] >> 6) & 0x03) == 0x02) { - // Invalid continuation byte. - array[pos++] = unicode::UTF_REPLACEMENT_CHARACTER; - ++l; - } else if (c2[l] == 0xC0 || c2[l] == 0xC1) { - // Invalid byte - overlong encoding. - array[pos++] = unicode::UTF_REPLACEMENT_CHARACTER; - ++l; - } else if ((c2[l] & 0xF8) == 0xF0) { - // 4 bytes UTF-8, 2 bytes UTF-16. - // Check for a full string. - if ((l + 3) >= len) { - array[pos++] = unicode::UTF_REPLACEMENT_CHARACTER; - l += 3; - break; - } - - // Validate. - bool valid = true; - u8 l2 = 0; - if (valid && (((c2[l + 1] >> 6) & 0x03) == 0x02)) ++l2; - else valid = false; - if (valid && (((c2[l + 2] >> 6) & 0x03) == 0x02)) ++l2; - else valid = false; - if (valid && (((c2[l + 3] >> 6) & 0x03) == 0x02)) ++l2; - else valid = false; - if (!valid) { - array[pos++] = unicode::UTF_REPLACEMENT_CHARACTER; - l += l2; - continue; - } - - // Decode. - uchar8_t b1 = ((c2[l] & 0x7) << 2) | ((c2[l + 1] >> 4) & 0x3); - uchar8_t b2 = ((c2[l + 1] & 0xF) << 4) | ((c2[l + 2] >> 2) & 0xF); - uchar8_t b3 = ((c2[l + 2] & 0x3) << 6) | (c2[l + 3] & 0x3F); - uchar32_t v = b3 | ((uchar32_t)b2 << 8) | ((uchar32_t)b1 << 16); - - // Split v up into a surrogate pair. - uchar16_t x = static_cast(v); - uchar16_t vh = UTF16_HI_SURROGATE | ((((v >> 16) & ((1 << 5) - 1)) - 1) << 6) | (x >> 10); - uchar16_t vl = UTF16_LO_SURROGATE | (x & ((1 << 10) - 1)); - - array[pos++] = vh; - array[pos++] = vl; - l += 4; - ++used; // Using two shorts this time, so increase used by 1. - } else if ((c2[l] & 0xF0) == 0xE0) { - // 3 bytes UTF-8, 1 byte UTF-16. - // Check for a full string. - if ((l + 2) >= len) { - array[pos++] = unicode::UTF_REPLACEMENT_CHARACTER; - l += 2; - break; - } - - // Validate. - bool valid = true; - u8 l2 = 0; - if (valid && (((c2[l + 1] >> 6) & 0x03) == 0x02)) ++l2; - else valid = false; - if (valid && (((c2[l + 2] >> 6) & 0x03) == 0x02)) ++l2; - else valid = false; - if (!valid) { - array[pos++] = unicode::UTF_REPLACEMENT_CHARACTER; - l += l2; - continue; - } - - // Decode. - uchar8_t b1 = ((c2[l] & 0xF) << 4) | ((c2[l + 1] >> 2) & 0xF); - uchar8_t b2 = ((c2[l + 1] & 0x3) << 6) | (c2[l + 2] & 0x3F); - uchar16_t ch = b2 | ((uchar16_t)b1 << 8); - array[pos++] = ch; - l += 3; - } else if ((c2[l] & 0xE0) == 0xC0) { - // 2 bytes UTF-8, 1 byte UTF-16. - // Check for a full string. - if ((l + 1) >= len) { - array[pos++] = unicode::UTF_REPLACEMENT_CHARACTER; - l += 1; - break; - } - - // Validate. - if (((c2[l + 1] >> 6) & 0x03) != 0x02) { - array[pos++] = unicode::UTF_REPLACEMENT_CHARACTER; - ++l; - continue; - } - - // Decode. - uchar8_t b1 = (c2[l] >> 2) & 0x7; - uchar8_t b2 = ((c2[l] & 0x3) << 6) | (c2[l + 1] & 0x3F); - uchar16_t ch = b2 | ((uchar16_t)b1 << 8); - array[pos++] = ch; - l += 2; - } else { - // 1 byte UTF-8, 1 byte UTF-16. - // Validate. - if (c2[l] > 0x7F) { - // Values above 0xF4 are restricted and aren't used. By now, anything above 0x7F is invalid. - array[pos++] = unicode::UTF_REPLACEMENT_CHARACTER; - } else array[pos++] = static_cast(c2[l]); - ++l; - } - } - array[used] = 0; - - // Validate our new UTF-16 string. - validate(); - - return *this; - } - - - //! Appends a UTF-16 string to this ustring16 - //! \param other The UTF-16 string to append. - //! \param length The length of the string to append. - //! \return A reference to our current string. - ustring16& append(const uchar16_t* const other, u32 length = 0xffffffff) { - if (!other) - return *this; - - // Determine if the string is long enough for a BOM. - u32 len = 0; - const uchar16_t* p = other; - do { - ++len; - } while (*p++ && len < unicode::BOM_ENCODE_UTF16_LEN); - - // Check for the BOM to determine the string's endianness. - unicode::EUTF_ENDIAN c_end = unicode::EUTFEE_NATIVE; - if (memcmp(other, unicode::BOM_ENCODE_UTF16_LE, unicode::BOM_ENCODE_UTF16_LEN) == 0) - c_end = unicode::EUTFEE_LITTLE; - else if (memcmp(other, unicode::BOM_ENCODE_UTF16_BE, unicode::BOM_ENCODE_UTF16_LEN) == 0) - c_end = unicode::EUTFEE_BIG; - - // If a BOM was found, don't include it in the string. - const uchar16_t* c2 = other; - if (c_end != unicode::EUTFEE_NATIVE) { - c2 = other + unicode::BOM_UTF16_LEN; - length -= unicode::BOM_UTF16_LEN; - } - - // Calculate the size of the string to read in. - len = 0; - p = c2; - do { - ++len; - } while(*p++ && len < length); - if (len > length) - len = length; - - // If we need to grow the size of the array, do it now. - if (used + len >= allocated) - reallocate(used + (len * 2)); - u32 start = used; - used += len; - - // Copy the string now. - unicode::EUTF_ENDIAN m_end = getEndianness(); - for (u32 l = start; l < start + len; ++l) { - array[l] = (uchar16_t)c2[l]; - if (c_end != unicode::EUTFEE_NATIVE && c_end != m_end) - array[l] = unicode::swapEndian16(array[l]); - } - - array[used] = 0; - - // Validate our new UTF-16 string. - validate(); - return *this; - } - - - //! Appends a UTF-32 string to this ustring16 - //! \param other The UTF-32 string to append. - //! \param length The length of the string to append. - //! \return A reference to our current string. - ustring16& append(const uchar32_t* const other, u32 length = 0xffffffff) { - if (!other) - return *this; - - // Check for the BOM to determine the string's endianness. - unicode::EUTF_ENDIAN c_end = unicode::EUTFEE_NATIVE; - if (memcmp(other, unicode::BOM_ENCODE_UTF32_LE, unicode::BOM_ENCODE_UTF32_LEN) == 0) - c_end = unicode::EUTFEE_LITTLE; - else if (memcmp(other, unicode::BOM_ENCODE_UTF32_BE, unicode::BOM_ENCODE_UTF32_LEN) == 0) - c_end = unicode::EUTFEE_BIG; - - // If a BOM was found, don't include it in the string. - const uchar32_t* c2 = other; - if (c_end != unicode::EUTFEE_NATIVE) { - c2 = other + unicode::BOM_UTF32_LEN; - length -= unicode::BOM_UTF32_LEN; - } - - // Calculate the size of the string to read in. - u32 len = 0; - const uchar32_t* p = c2; - do { - ++len; - } while(*p++ && len < length); - if (len > length) - len = length; - - // If we need to grow the size of the array, do it now. - // In case all of the UTF-32 string is split into surrogate pairs, do len * 2. - if (used + (len * 2) >= allocated) - reallocate(used + ((len * 2) * 2)); - u32 start = used; - - // Convert UTF-32 to UTF-16. - unicode::EUTF_ENDIAN m_end = getEndianness(); - u32 pos = start; - for (u32 l = 0; l < len; ++l) { - ++used; - - uchar32_t ch = c2[l]; - if (c_end != unicode::EUTFEE_NATIVE && c_end != m_end) - ch = unicode::swapEndian32(ch); - - if (ch > 0xFFFF) { - // Split ch up into a surrogate pair as it is over 16 bits long. - uchar16_t x = static_cast(ch); - uchar16_t vh = UTF16_HI_SURROGATE | ((((ch >> 16) & ((1 << 5) - 1)) - 1) << 6) | (x >> 10); - uchar16_t vl = UTF16_LO_SURROGATE | (x & ((1 << 10) - 1)); - array[pos++] = vh; - array[pos++] = vl; - ++used; // Using two shorts, so increased used again. - } else if (ch >= 0xD800 && ch <= 0xDFFF) { - // Between possible UTF-16 surrogates (invalid!) - array[pos++] = unicode::UTF_REPLACEMENT_CHARACTER; - } else array[pos++] = static_cast(ch); - } - array[used] = 0; - - // Validate our new UTF-16 string. - validate(); - - return *this; - } - - - //! Appends a ustring16 to this ustring16 - //! \param other The string to append to this one. - //! \return A reference to our current string. - ustring16& append(const ustring16& other) { - const uchar16_t* oa = other.c_str(); - - u32 len = other.size_raw(); - - if (used + len >= allocated) - reallocate(used + len); - - for (u32 l = 0; l < len; ++l) - array[used + l] = oa[l]; - - used += len; - array[used] = 0; - - return *this; - } - - - //! Appends a certain amount of characters of a ustring16 to this ustring16. - //! \param other The string to append to this one. - //! \param length How many characters of the other string to add to this one. - //! \return A reference to our current string. - ustring16& append(const ustring16& other, u32 length) { - if (other.size() == 0) - return *this; - - if (other.size() < length) { - append(other); - return *this; - } - - if (used + length * 2 >= allocated) - reallocate(used + length * 2); - - const_iterator iter(other, 0); - u32 l = length; - while (!iter.atEnd() && l) { - uchar32_t c = *iter; - append(c); - ++iter; - --l; - } - - return *this; - } - - - //! Reserves some memory. - //! \param count The amount of characters to reserve. - void reserve(u32 count) { - if (count < allocated) - return; - - reallocate(count); - } - - - //! Finds first occurrence of character. - //! \param c The character to search for. - //! \return Position where the character has been found, or -1 if not found. - s32 findFirst(uchar32_t c) const { - const_iterator i(*this, 0); - - s32 pos = 0; - while (!i.atEnd()) { - uchar32_t t = *i; - if (c == t) - return pos; - ++pos; - ++i; - } - - return -1; - } - - //! Finds first occurrence of a character of a list. - //! \param c A list of characters to find. For example if the method should find the first occurrence of 'a' or 'b', this parameter should be "ab". - //! \param count The amount of characters in the list. Usually, this should be strlen(c). - //! \return Position where one of the characters has been found, or -1 if not found. - s32 findFirstChar(const uchar32_t* const c, u32 count = 1) const { - if (!c || !count) - return -1; - - const_iterator i(*this, 0); - - s32 pos = 0; - while (!i.atEnd()) { - uchar32_t t = *i; - for (u32 j = 0; j < count; ++j) - if (t == c[j]) - return pos; - ++pos; - ++i; - } - - return -1; - } - - - //! Finds first position of a character not in a given list. - //! \param c A list of characters to NOT find. For example if the method should find the first occurrence of a character not 'a' or 'b', this parameter should be "ab". - //! \param count The amount of characters in the list. Usually, this should be strlen(c). - //! \return Position where the character has been found, or -1 if not found. - s32 findFirstCharNotInList(const uchar32_t* const c, u32 count = 1) const { - if (!c || !count) - return -1; - - const_iterator i(*this, 0); - - s32 pos = 0; - while (!i.atEnd()) { - uchar32_t t = *i; - u32 j; - for (j = 0; j < count; ++j) - if (t == c[j]) - break; - - if (j == count) - return pos; - ++pos; - ++i; - } - - return -1; - } - - //! Finds last position of a character not in a given list. - //! \param c A list of characters to NOT find. For example if the method should find the first occurrence of a character not 'a' or 'b', this parameter should be "ab". - //! \param count The amount of characters in the list. Usually, this should be strlen(c). - //! \return Position where the character has been found, or -1 if not found. - s32 findLastCharNotInList(const uchar32_t* const c, u32 count = 1) const { - if (!c || !count) - return -1; - - const_iterator i(end()); - --i; - - s32 pos = size() - 1; - while (!i.atStart()) { - uchar32_t t = *i; - u32 j; - for (j = 0; j < count; ++j) - if (t == c[j]) - break; - - if (j == count) - return pos; - --pos; - --i; - } - - return -1; - } - - //! Finds next occurrence of character. - //! \param c The character to search for. - //! \param startPos The position in the string to start searching. - //! \return Position where the character has been found, or -1 if not found. - s32 findNext(uchar32_t c, u32 startPos) const { - const_iterator i(*this, startPos); - - s32 pos = startPos; - while (!i.atEnd()) { - uchar32_t t = *i; - if (t == c) - return pos; - ++pos; - ++i; - } - - return -1; - } - - - //! Finds last occurrence of character. - //! \param c The character to search for. - //! \param start The start position of the reverse search ( default = -1, on end ). - //! \return Position where the character has been found, or -1 if not found. - s32 findLast(uchar32_t c, s32 start = -1) const { - u32 s = size(); - start = core::clamp ( start < 0 ? (s32)s : start, 0, (s32)s ) - 1; - - const_iterator i(*this, start); - u32 pos = start; - while (!i.atStart()) { - uchar32_t t = *i; - if (t == c) - return pos; - --pos; - --i; - } - - return -1; - } - - //! Finds last occurrence of a character in a list. - //! \param c A list of strings to find. For example if the method should find the last occurrence of 'a' or 'b', this parameter should be "ab". - //! \param count The amount of characters in the list. Usually, this should be strlen(c). - //! \return Position where one of the characters has been found, or -1 if not found. - s32 findLastChar(const uchar32_t* const c, u32 count = 1) const { - if (!c || !count) - return -1; - - const_iterator i(end()); - --i; - - s32 pos = size(); - while (!i.atStart()) { - uchar32_t t = *i; - for (u32 j = 0; j < count; ++j) - if (t == c[j]) - return pos; - --pos; - --i; - } - - return -1; - } - - - //! Finds another ustring16 in this ustring16. - //! \param str The string to find. - //! \param start The start position of the search. - //! \return Positions where the ustring16 has been found, or -1 if not found. - s32 find(const ustring16& str, const u32 start = 0) const { - u32 my_size = size(); - u32 their_size = str.size(); - - if (their_size == 0 || my_size - start < their_size) - return -1; - - const_iterator i(*this, start); - - s32 pos = start; - while (!i.atEnd()) { - const_iterator i2(i); - const_iterator j(str, 0); - uchar32_t t1 = (uchar32_t) * i2; - uchar32_t t2 = (uchar32_t) * j; - while (t1 == t2) { - ++i2; - ++j; - if (j.atEnd()) - return pos; - t1 = (uchar32_t) * i2; - t2 = (uchar32_t) * j; - } - ++i; - ++pos; - } - - return -1; - } - - - //! Finds another ustring16 in this ustring16. - //! \param str The string to find. - //! \param start The start position of the search. - //! \return Positions where the string has been found, or -1 if not found. - s32 find_raw(const ustring16& str, const u32 start = 0) const { - const uchar16_t* data = str.c_str(); - if (data && *data) { - u32 len = 0; - - while (data[len]) - ++len; - - if (len > used) - return -1; - - for (u32 i = start; i <= used - len; ++i) { - u32 j = 0; - - while(data[j] && array[i + j] == data[j]) - ++j; - - if (!data[j]) - return i; - } - } - - return -1; - } - - - //! Returns a substring. - //! \param begin: Start of substring. - //! \param length: Length of substring. - //! \return A reference to our current string. - ustring16 subString(u32 begin, s32 length) const { - u32 len = size(); - // if start after ustring16 - // or no proper substring length - if ((length <= 0) || (begin >= len)) - return ustring16(""); - // clamp length to maximal value - if ((length + begin) > len) - length = len - begin; - - ustring16 o; - o.reserve((length + 1) * 2); - - const_iterator i(*this, begin); - while (!i.atEnd() && length) { - o.append(*i); - ++i; - --length; - } - - return o; - } - - - //! Appends a character to this ustring16. - //! \param c Character to append. - //! \return A reference to our current string. - ustring16& operator += (uchar32_t c) { - append(c); - return *this; - } - - - //! Appends a char ustring16 to this ustring16. - //! \param c Char ustring16 to append. - //! \return A reference to our current string. - ustring16& operator += (const uchar16_t* const c) { - append(c); - return *this; - } - - - //! Appends a ustring16 to this ustring16. - //! \param other ustring16 to append. - //! \return A reference to our current string. - ustring16& operator += (const ustring16& other) { - append(other); - return *this; - } - - - //! Replaces all characters of a given type with another one. - //! \param toReplace Character to replace. - //! \param replaceWith Character replacing the old one. - //! \return A reference to our current string. - ustring16& replace(uchar32_t toReplace, uchar32_t replaceWith) { - iterator i(*this, 0); - while (!i.atEnd()) { - typename ustring16::iterator::access a = *i; - if ((uchar32_t)a == toReplace) - a = replaceWith; - ++i; - } - return *this; - } - - - //! Replaces all instances of a string with another one. - //! \param toReplace The string to replace. - //! \param replaceWith The string replacing the old one. - //! \return A reference to our current string. - ustring16& replace(const ustring16& toReplace, const ustring16& replaceWith) { - if (toReplace.size() == 0) - return *this; - - const uchar16_t* other = toReplace.c_str(); - const uchar16_t* replace = replaceWith.c_str(); - const u32 other_size = toReplace.size_raw(); - const u32 replace_size = replaceWith.size_raw(); - - // Determine the delta. The algorithm will change depending on the delta. - s32 delta = replace_size - other_size; - - // A character for character replace. The string will not shrink or grow. - if (delta == 0) { - s32 pos = 0; - while ((pos = find_raw(other, pos)) != -1) { - for (u32 i = 0; i < replace_size; ++i) - array[pos + i] = replace[i]; - ++pos; - } - return *this; - } - - // We are going to be removing some characters. The string will shrink. - if (delta < 0) { - u32 i = 0; - for (u32 pos = 0; pos <= used; ++i, ++pos) { - // Is this potentially a match? - if (array[pos] == *other) { - // Check to see if we have a match. - u32 j; - for (j = 0; j < other_size; ++j) { - if (array[pos + j] != other[j]) - break; - } - - // If we have a match, replace characters. - if (j == other_size) { - for (j = 0; j < replace_size; ++j) - array[i + j] = replace[j]; - i += replace_size - 1; - pos += other_size - 1; - continue; - } - } - - // No match found, just copy characters. - array[i - 1] = array[pos]; - } - array[i] = 0; - used = i; - - return *this; - } - - // We are going to be adding characters, so the string size will increase. - // Count the number of times toReplace exists in the string so we can allocate the new size. - u32 find_count = 0; - s32 pos = 0; - while ((pos = find_raw(other, pos)) != -1) { - ++find_count; - ++pos; - } - - // Re-allocate the string now, if needed. - u32 len = delta * find_count; - if (used + len >= allocated) - reallocate(used + len); - - // Start replacing. - pos = 0; - while ((pos = find_raw(other, pos)) != -1) { - uchar16_t* start = array + pos + other_size - 1; - uchar16_t* ptr = array + used; - uchar16_t* end = array + used + delta; - - // Shift characters to make room for the string. - while (ptr != start) { - *end = *ptr; - --ptr; - --end; - } - - // Add the new string now. - for (u32 i = 0; i < replace_size; ++i) - array[pos + i] = replace[i]; - - pos += replace_size; - used += delta; - } - - // Terminate the string and return ourself. - array[used] = 0; - return *this; - } - - - //! Removes characters from a ustring16.. - //! \param c The character to remove. - //! \return A reference to our current string. - ustring16& remove(uchar32_t c) { - u32 pos = 0; - u32 found = 0; - u32 len = (c > 0xFFFF ? 2 : 1); // Remove characters equal to the size of c as a UTF-16 character. - for (u32 i = 0; i <= used; ++i) { - uchar32_t uc32 = 0; - if (!UTF16_IS_SURROGATE_HI(array[i])) - uc32 |= array[i]; - else if (i + 1 <= used) { - // Convert the surrogate pair into a single UTF-32 character. - uc32 = unicode::toUTF32(array[i], array[i + 1]); - } - u32 len2 = (uc32 > 0xFFFF ? 2 : 1); - - if (uc32 == c) { - found += len; - continue; - } - - array[pos++] = array[i]; - if (len2 == 2) - array[pos++] = array[++i]; - } - used -= found; - array[used] = 0; - return *this; - } - - - //! Removes a ustring16 from the ustring16. - //! \param toRemove The string to remove. - //! \return A reference to our current string. - ustring16& remove(const ustring16& toRemove) { - u32 size = toRemove.size_raw(); - if (size == 0) return *this; - - const uchar16_t* tra = toRemove.c_str(); - u32 pos = 0; - u32 found = 0; - for (u32 i = 0; i <= used; ++i) { - u32 j = 0; - while (j < size) { - if (array[i + j] != tra[j]) - break; - ++j; - } - if (j == size) { - found += size; - i += size - 1; - continue; - } - - array[pos++] = array[i]; - } - used -= found; - array[used] = 0; - return *this; - } - - - //! Removes characters from the ustring16. - //! \param characters The characters to remove. - //! \return A reference to our current string. - ustring16& removeChars(const ustring16& characters) { - if (characters.size_raw() == 0) - return *this; - - u32 pos = 0; - u32 found = 0; - const_iterator iter(characters); - for (u32 i = 0; i <= used; ++i) { - uchar32_t uc32 = 0; - if (!UTF16_IS_SURROGATE_HI(array[i])) - uc32 |= array[i]; - else if (i + 1 <= used) { - // Convert the surrogate pair into a single UTF-32 character. - uc32 = unicode::toUTF32(array[i], array[i + 1]); - } - u32 len2 = (uc32 > 0xFFFF ? 2 : 1); - - bool cont = false; - iter.toStart(); - while (!iter.atEnd()) { - uchar32_t c = *iter; - if (uc32 == c) { - found += (c > 0xFFFF ? 2 : 1); // Remove characters equal to the size of c as a UTF-16 character. - ++i; - cont = true; - break; - } - ++iter; - } - if (cont) continue; - - array[pos++] = array[i]; - if (len2 == 2) - array[pos++] = array[++i]; - } - used -= found; - array[used] = 0; - return *this; - } - - - //! Trims the ustring16. - //! Removes the specified characters (by default, Latin-1 whitespace) from the begining and the end of the ustring16. - //! \param whitespace The characters that are to be considered as whitespace. - //! \return A reference to our current string. - ustring16& trim(const ustring16& whitespace = " \t\n\r") { - core::array utf32white = whitespace.toUTF32(); - - // find start and end of the substring without the specified characters - const s32 begin = findFirstCharNotInList(utf32white.const_pointer(), whitespace.used + 1); - if (begin == -1) - return (*this = ""); - - const s32 end = findLastCharNotInList(utf32white.const_pointer(), whitespace.used + 1); - - return (*this = subString(begin, (end + 1) - begin)); - } - - - //! Erases a character from the ustring16. - //! May be slow, because all elements following after the erased element have to be copied. - //! \param index Index of element to be erased. - //! \return A reference to our current string. - ustring16& erase(u32 index) { - _IRR_DEBUG_BREAK_IF(index > used) // access violation - - iterator i(*this, index); - - uchar32_t t = *i; - u32 len = (t > 0xFFFF ? 2 : 1); - - for (u32 j = static_cast(i.getPos()) + len; j <= used; ++j) - array[j - len] = array[j]; - - used -= len; - array[used] = 0; - - return *this; - } - - - //! Validate the existing ustring16, checking for valid surrogate pairs and checking for proper termination. - //! \return A reference to our current string. - ustring16& validate() { - // Validate all unicode characters. - for (u32 i = 0; i < allocated; ++i) { - // Terminate on existing null. - if (array[i] == 0) { - used = i; - return *this; - } - if (UTF16_IS_SURROGATE(array[i])) { - if (((i + 1) >= allocated) || UTF16_IS_SURROGATE_LO(array[i])) - array[i] = unicode::UTF_REPLACEMENT_CHARACTER; - else if (UTF16_IS_SURROGATE_HI(array[i]) && !UTF16_IS_SURROGATE_LO(array[i + 1])) - array[i] = unicode::UTF_REPLACEMENT_CHARACTER; - ++i; - } - if (array[i] >= 0xFDD0 && array[i] <= 0xFDEF) - array[i] = unicode::UTF_REPLACEMENT_CHARACTER; - } - - // terminate - used = 0; - if (allocated > 0) { - used = allocated - 1; - array[used] = 0; - } - return *this; - } - - - //! Gets the last char of the ustring16, or 0. - //! \return The last char of the ustring16, or 0. - uchar32_t lastChar() const { - if (used < 1) - return 0; - - if (UTF16_IS_SURROGATE_LO(array[used - 1])) { - // Make sure we have a paired surrogate. - if (used < 2) - return 0; - - // Check for an invalid surrogate. - if (!UTF16_IS_SURROGATE_HI(array[used - 2])) - return 0; - - // Convert the surrogate pair into a single UTF-32 character. - return unicode::toUTF32(array[used - 2], array[used - 1]); - } else { - return array[used - 1]; - } - } - - - //! Split the ustring16 into parts. - /** This method will split a ustring16 at certain delimiter characters - into the container passed in as reference. The type of the container - has to be given as template parameter. It must provide a push_back and - a size method. - \param ret The result container - \param c C-style ustring16 of delimiter characters - \param count Number of delimiter characters - \param ignoreEmptyTokens Flag to avoid empty substrings in the result - container. If two delimiters occur without a character in between, an - empty substring would be placed in the result. If this flag is set, - only non-empty strings are stored. - \param keepSeparators Flag which allows to add the separator to the - result ustring16. If this flag is true, the concatenation of the - substrings results in the original ustring16. Otherwise, only the - characters between the delimiters are returned. - \return The number of resulting substrings - */ - template - u32 split(container& ret, const uchar32_t* const c, u32 count = 1, bool ignoreEmptyTokens = true, bool keepSeparators = false) const { - if (!c) - return 0; - - const_iterator i(*this); - const u32 oldSize = ret.size(); - u32 pos = 0; - u32 lastpos = 0; - u32 lastpospos = 0; - bool lastWasSeparator = false; - while (!i.atEnd()) { - uchar32_t ch = *i; - bool foundSeparator = false; - for (u32 j = 0; j < count; ++j) { - if (ch == c[j]) { - if ((!ignoreEmptyTokens || pos - lastpos != 0) && - !lastWasSeparator) - ret.push_back(ustring16(&array[lastpospos], pos - lastpos)); - foundSeparator = true; - lastpos = (keepSeparators ? pos : pos + 1); - lastpospos = (keepSeparators ? i.getPos() : i.getPos() + 1); - break; - } - } - lastWasSeparator = foundSeparator; - ++pos; - ++i; - } - u32 s = size() + 1; - if (s > lastpos) - ret.push_back(ustring16(&array[lastpospos], s - lastpos)); - return ret.size() - oldSize; - } - - - //! Split the ustring16 into parts. - /** This method will split a ustring16 at certain delimiter characters - into the container passed in as reference. The type of the container - has to be given as template parameter. It must provide a push_back and - a size method. - \param ret The result container - \param c A unicode string of delimiter characters - \param ignoreEmptyTokens Flag to avoid empty substrings in the result - container. If two delimiters occur without a character in between, an - empty substring would be placed in the result. If this flag is set, - only non-empty strings are stored. - \param keepSeparators Flag which allows to add the separator to the - result ustring16. If this flag is true, the concatenation of the - substrings results in the original ustring16. Otherwise, only the - characters between the delimiters are returned. - \return The number of resulting substrings - */ - template - u32 split(container& ret, const ustring16& c, bool ignoreEmptyTokens = true, bool keepSeparators = false) const { - core::array v = c.toUTF32(); - return split(ret, v.pointer(), v.size(), ignoreEmptyTokens, keepSeparators); - } - - - //! Gets the size of the allocated memory buffer for the string. - //! \return The size of the allocated memory buffer. - u32 capacity() const { - return allocated; - } - - - //! Returns the raw number of UTF-16 code points in the string which includes the individual surrogates. - //! \return The raw number of UTF-16 code points, excluding the trialing NUL. - u32 size_raw() const { - return used; - } - - - //! Inserts a character into the string. - //! \param c The character to insert. - //! \param pos The position to insert the character. - //! \return A reference to our current string. - ustring16& insert(uchar32_t c, u32 pos) { - u8 len = (c > 0xFFFF ? 2 : 1); - - if (used + len >= allocated) - reallocate(used + len); - - used += len; - - iterator iter(*this, pos); - for (u32 i = used - 2; i > iter.getPos(); --i) - array[i] = array[i - len]; - - if (c > 0xFFFF) { - // c will be multibyte, so split it up into a surrogate pair. - uchar16_t x = static_cast(c); - uchar16_t vh = UTF16_HI_SURROGATE | ((((c >> 16) & ((1 << 5) - 1)) - 1) << 6) | (x >> 10); - uchar16_t vl = UTF16_LO_SURROGATE | (x & ((1 << 10) - 1)); - array[iter.getPos()] = vh; - array[iter.getPos() + 1] = vl; - } else { - array[iter.getPos()] = static_cast(c); - } - array[used] = 0; - return *this; - } - - - //! Inserts a string into the string. - //! \param c The string to insert. - //! \param pos The position to insert the string. - //! \return A reference to our current string. - ustring16& insert(const ustring16& c, u32 pos) { - u32 len = c.size_raw(); - if (len == 0) return *this; - - if (used + len >= allocated) - reallocate(used + len); - - used += len; - - iterator iter(*this, pos); - for (u32 i = used - 2; i > iter.getPos() + len; --i) - array[i] = array[i - len]; - - const uchar16_t* s = c.c_str(); - for (u32 i = 0; i < len; ++i) { - array[pos++] = *s; - ++s; - } - - array[used] = 0; - return *this; - } - - - //! Inserts a character into the string. - //! \param c The character to insert. - //! \param pos The position to insert the character. - //! \return A reference to our current string. - ustring16& insert_raw(uchar16_t c, u32 pos) { - if (used + 1 >= allocated) - reallocate(used + 1); - - ++used; - - for (u32 i = used - 1; i > pos; --i) - array[i] = array[i - 1]; - - array[pos] = c; - array[used] = 0; - return *this; - } - - - //! Removes a character from string. - //! \param pos Position of the character to remove. - //! \return A reference to our current string. - ustring16& erase_raw(u32 pos) { - for (u32 i = pos; i <= used; ++i) { - array[i] = array[i + 1]; - } - --used; - array[used] = 0; - return *this; - } - - - //! Replaces a character in the string. - //! \param c The new character. - //! \param pos The position of the character to replace. - //! \return A reference to our current string. - ustring16& replace_raw(uchar16_t c, u32 pos) { - array[pos] = c; - return *this; - } - - - //! Returns an iterator to the beginning of the string. - //! \return An iterator to the beginning of the string. - iterator begin() { - iterator i(*this, 0); - return i; - } - - - //! Returns an iterator to the beginning of the string. - //! \return An iterator to the beginning of the string. - const_iterator begin() const { - const_iterator i(*this, 0); - return i; + //! Returns an iterator to the beginning of the string. + //! \return An iterator to the beginning of the string. + const_iterator begin() const { + return { *this }; } //! Returns an iterator to the beginning of the string. //! \return An iterator to the beginning of the string. const_iterator cbegin() const { - const_iterator i(*this, 0); - return i; - } - - - //! Returns an iterator to the end of the string. - //! \return An iterator to the end of the string. - iterator end() { - iterator i(*this, 0); - i.toEnd(); - return i; + return begin(); } //! Returns an iterator to the end of the string. //! \return An iterator to the end of the string. const_iterator end() const { - const_iterator i(*this, 0); + const_iterator i{ *this }; i.toEnd(); return i; } @@ -2437,642 +563,19 @@ class ustring16 { //! Returns an iterator to the end of the string. //! \return An iterator to the end of the string. const_iterator cend() const { - const_iterator i(*this, 0); - i.toEnd(); - return i; - } - - - //! Converts the string to a UTF-8 encoded string. - //! \param addBOM If true, the proper unicode byte-order mark will be prefixed to the string. - //! \return A string containing the UTF-8 encoded string. - core::string toUTF8_s(const bool addBOM = false) const { - core::string ret; - ret.reserve(used * 4 + (addBOM ? unicode::BOM_UTF8_LEN : 0) + 1); - const_iterator iter(*this, 0); - - // Add the byte order mark if the user wants it. - if (addBOM) { - ret.append(unicode::BOM_ENCODE_UTF8[0]); - ret.append(unicode::BOM_ENCODE_UTF8[1]); - ret.append(unicode::BOM_ENCODE_UTF8[2]); - } - - while (!iter.atEnd()) { - uchar32_t c = *iter; - if (c > 0xFFFF) { - // 4 bytes - uchar8_t b1 = (0x1E << 3) | ((c >> 18) & 0x7); - uchar8_t b2 = (0x2 << 6) | ((c >> 12) & 0x3F); - uchar8_t b3 = (0x2 << 6) | ((c >> 6) & 0x3F); - uchar8_t b4 = (0x2 << 6) | (c & 0x3F); - ret.append(b1); - ret.append(b2); - ret.append(b3); - ret.append(b4); - } else if (c > 0x7FF) { - // 3 bytes - uchar8_t b1 = (0xE << 4) | ((c >> 12) & 0xF); - uchar8_t b2 = (0x2 << 6) | ((c >> 6) & 0x3F); - uchar8_t b3 = (0x2 << 6) | (c & 0x3F); - ret.append(b1); - ret.append(b2); - ret.append(b3); - } else if (c > 0x7F) { - // 2 bytes - uchar8_t b1 = (0x6 << 5) | ((c >> 6) & 0x1F); - uchar8_t b2 = (0x2 << 6) | (c & 0x3F); - ret.append(b1); - ret.append(b2); - } else { - // 1 byte - ret.append(static_cast(c)); - } - ++iter; - } - return ret; - } - - - //! Converts the string to a UTF-8 encoded string array. - //! \param addBOM If true, the proper unicode byte-order mark will be prefixed to the string. - //! \return An array containing the UTF-8 encoded string. - core::array toUTF8(const bool addBOM = false) const { - core::array ret(used * 4 + (addBOM ? unicode::BOM_UTF8_LEN : 0) + 1); - const_iterator iter(*this, 0); - - // Add the byte order mark if the user wants it. - if (addBOM) { - ret.push_back(unicode::BOM_ENCODE_UTF8[0]); - ret.push_back(unicode::BOM_ENCODE_UTF8[1]); - ret.push_back(unicode::BOM_ENCODE_UTF8[2]); - } - - while (!iter.atEnd()) { - uchar32_t c = *iter; - if (c > 0xFFFF) { - // 4 bytes - uchar8_t b1 = (0x1E << 3) | ((c >> 18) & 0x7); - uchar8_t b2 = (0x2 << 6) | ((c >> 12) & 0x3F); - uchar8_t b3 = (0x2 << 6) | ((c >> 6) & 0x3F); - uchar8_t b4 = (0x2 << 6) | (c & 0x3F); - ret.push_back(b1); - ret.push_back(b2); - ret.push_back(b3); - ret.push_back(b4); - } else if (c > 0x7FF) { - // 3 bytes - uchar8_t b1 = (0xE << 4) | ((c >> 12) & 0xF); - uchar8_t b2 = (0x2 << 6) | ((c >> 6) & 0x3F); - uchar8_t b3 = (0x2 << 6) | (c & 0x3F); - ret.push_back(b1); - ret.push_back(b2); - ret.push_back(b3); - } else if (c > 0x7F) { - // 2 bytes - uchar8_t b1 = (0x6 << 5) | ((c >> 6) & 0x1F); - uchar8_t b2 = (0x2 << 6) | (c & 0x3F); - ret.push_back(b1); - ret.push_back(b2); - } else { - // 1 byte - ret.push_back(static_cast(c)); - } - ++iter; - } - ret.push_back(0); - return ret; - } - -/* -#ifdef USTRING_CPP0X_NEWLITERALS // C++0x - //! Converts the string to a UTF-16 encoded string. - //! \param endian The desired endianness of the string. - //! \param addBOM If true, the proper unicode byte-order mark will be prefixed to the string. - //! \return A string containing the UTF-16 encoded string. - core::string toUTF16_s(const unicode::EUTF_ENDIAN endian = unicode::EUTFEE_NATIVE, const bool addBOM = false) const { - core::string ret; - ret.reserve(used + (addBOM ? unicode::BOM_UTF16_LEN : 0) + 1); - - // Add the BOM if specified. - if (addBOM) { - if (endian == unicode::EUTFEE_NATIVE) - ret[0] = unicode::BOM; - else if (endian == unicode::EUTFEE_LITTLE) { - uchar8_t* ptr8 = reinterpret_cast(ret.c_str()); - *ptr8++ = unicode::BOM_ENCODE_UTF16_LE[0]; - *ptr8 = unicode::BOM_ENCODE_UTF16_LE[1]; - } else { - uchar8_t* ptr8 = reinterpret_cast(ret.c_str()); - *ptr8++ = unicode::BOM_ENCODE_UTF16_BE[0]; - *ptr8 = unicode::BOM_ENCODE_UTF16_BE[1]; - } - } - - ret.append(array); - if (endian != unicode::EUTFEE_NATIVE && getEndianness() != endian) { - char16_t* ptr = ret.c_str(); - for (u32 i = 0; i < ret.size(); ++i) - *ptr++ = unicode::swapEndian16(*ptr); - } - return ret; - } -#endif -*/ - - //! Converts the string to a UTF-16 encoded string array. - //! Unfortunately, no toUTF16_s() version exists due to limitations with Irrlicht's string class. - //! \param endian The desired endianness of the string. - //! \param addBOM If true, the proper unicode byte-order mark will be prefixed to the string. - //! \return An array containing the UTF-16 encoded string. - core::array toUTF16(const unicode::EUTF_ENDIAN endian = unicode::EUTFEE_NATIVE, const bool addBOM = false) const { - core::array ret(used + (addBOM ? unicode::BOM_UTF16_LEN : 0) + 1); - uchar16_t* ptr = ret.pointer(); - - // Add the BOM if specified. - if (addBOM) { - if (endian == unicode::EUTFEE_NATIVE) - *ptr = unicode::BOM; - else if (endian == unicode::EUTFEE_LITTLE) { - uchar8_t* ptr8 = reinterpret_cast(ptr); - *ptr8++ = unicode::BOM_ENCODE_UTF16_LE[0]; - *ptr8 = unicode::BOM_ENCODE_UTF16_LE[1]; - } else { - uchar8_t* ptr8 = reinterpret_cast(ptr); - *ptr8++ = unicode::BOM_ENCODE_UTF16_BE[0]; - *ptr8 = unicode::BOM_ENCODE_UTF16_BE[1]; - } - ++ptr; - } - - memcpy((void*)ptr, (void*)array, used * sizeof(uchar16_t)); - if (endian != unicode::EUTFEE_NATIVE && getEndianness() != endian) { - for (u32 i = 0; i <= used; ++i, ++ptr) - *ptr = unicode::swapEndian16(*ptr); - } - ret.set_used(used + (addBOM ? unicode::BOM_UTF16_LEN : 0)); - ret.push_back(0); - return ret; - } - -/* -#ifdef USTRING_CPP0X_NEWLITERALS // C++0x - //! Converts the string to a UTF-32 encoded string. - //! \param endian The desired endianness of the string. - //! \param addBOM If true, the proper unicode byte-order mark will be prefixed to the string. - //! \return A string containing the UTF-32 encoded string. - core::string toUTF32_s(const unicode::EUTF_ENDIAN endian = unicode::EUTFEE_NATIVE, const bool addBOM = false) const { - core::string ret; - ret.reserve(size() + 1 + (addBOM ? unicode::BOM_UTF32_LEN : 0)); - const_iterator iter(*this, 0); - - // Add the BOM if specified. - if (addBOM) { - if (endian == unicode::EUTFEE_NATIVE) - ret.append(unicode::BOM); - else { - union { - uchar32_t full; - u8 chunk[4]; - } t; - - if (endian == unicode::EUTFEE_LITTLE) { - t.chunk[0] = unicode::BOM_ENCODE_UTF32_LE[0]; - t.chunk[1] = unicode::BOM_ENCODE_UTF32_LE[1]; - t.chunk[2] = unicode::BOM_ENCODE_UTF32_LE[2]; - t.chunk[3] = unicode::BOM_ENCODE_UTF32_LE[3]; - } else { - t.chunk[0] = unicode::BOM_ENCODE_UTF32_BE[0]; - t.chunk[1] = unicode::BOM_ENCODE_UTF32_BE[1]; - t.chunk[2] = unicode::BOM_ENCODE_UTF32_BE[2]; - t.chunk[3] = unicode::BOM_ENCODE_UTF32_BE[3]; - } - ret.append(t.full); - } - } - - while (!iter.atEnd()) { - uchar32_t c = *iter; - if (endian != unicode::EUTFEE_NATIVE && getEndianness() != endian) - c = unicode::swapEndian32(c); - ret.append(c); - ++iter; - } - return ret; - } -#endif -*/ - - //! Converts the string to a UTF-32 encoded string array. - //! Unfortunately, no toUTF32_s() version exists due to limitations with Irrlicht's string class. - //! \param endian The desired endianness of the string. - //! \param addBOM If true, the proper unicode byte-order mark will be prefixed to the string. - //! \return An array containing the UTF-32 encoded string. - core::array toUTF32(const unicode::EUTF_ENDIAN endian = unicode::EUTFEE_NATIVE, const bool addBOM = false) const { - core::array ret(size() + (addBOM ? unicode::BOM_UTF32_LEN : 0) + 1); - const_iterator iter(*this, 0); - - // Add the BOM if specified. - if (addBOM) { - if (endian == unicode::EUTFEE_NATIVE) - ret.push_back(unicode::BOM); - else { - union { - uchar32_t full; - u8 chunk[4]; - } t; - - if (endian == unicode::EUTFEE_LITTLE) { - t.chunk[0] = unicode::BOM_ENCODE_UTF32_LE[0]; - t.chunk[1] = unicode::BOM_ENCODE_UTF32_LE[1]; - t.chunk[2] = unicode::BOM_ENCODE_UTF32_LE[2]; - t.chunk[3] = unicode::BOM_ENCODE_UTF32_LE[3]; - } else { - t.chunk[0] = unicode::BOM_ENCODE_UTF32_BE[0]; - t.chunk[1] = unicode::BOM_ENCODE_UTF32_BE[1]; - t.chunk[2] = unicode::BOM_ENCODE_UTF32_BE[2]; - t.chunk[3] = unicode::BOM_ENCODE_UTF32_BE[3]; - } - ret.push_back(t.full); - } - } - ret.push_back(0); - - while (!iter.atEnd()) { - uchar32_t c = *iter; - if (endian != unicode::EUTFEE_NATIVE && getEndianness() != endian) - c = unicode::swapEndian32(c); - ret.push_back(c); - ++iter; - } - return ret; - } - - - //! Converts the string to a wchar_t encoded string. - /** The size of a wchar_t changes depending on the platform. This function will store a - correct UTF-8, -16, or -32 encoded string depending on the size of a wchar_t. **/ - //! \param endian The desired endianness of the string. - //! \param addBOM If true, the proper unicode byte-order mark will be prefixed to the string. - //! \return A string containing the wchar_t encoded string. - core::string toWCHAR_s(const unicode::EUTF_ENDIAN endian = unicode::EUTFEE_NATIVE, const bool addBOM = false) const { - if (sizeof(wchar_t) == 4) { - core::array a(toUTF32(endian, addBOM)); - core::stringw ret(a.pointer()); - return ret; - } else if (sizeof(wchar_t) == 2) { - if (endian == unicode::EUTFEE_NATIVE && addBOM == false) { - core::stringw ret(array); - return ret; - } else { - core::array a(toUTF16(endian, addBOM)); - core::stringw ret(a.pointer()); - return ret; - } - } else if (sizeof(wchar_t) == 1) { - core::array a(toUTF8(addBOM)); - core::stringw ret(a.pointer()); - return ret; - } - - // Shouldn't happen. - return core::stringw(); - } - - - //! Converts the string to a wchar_t encoded string array. - /** The size of a wchar_t changes depending on the platform. This function will store a - correct UTF-8, -16, or -32 encoded string depending on the size of a wchar_t. **/ - //! \param endian The desired endianness of the string. - //! \param addBOM If true, the proper unicode byte-order mark will be prefixed to the string. - //! \return An array containing the wchar_t encoded string. - core::array toWCHAR(const unicode::EUTF_ENDIAN endian = unicode::EUTFEE_NATIVE, const bool addBOM = false) const { - if (sizeof(wchar_t) == 4) { - core::array a(toUTF32(endian, addBOM)); - core::array ret(a.size()); - ret.set_used(a.size()); - memcpy((void*)ret.pointer(), (void*)a.pointer(), a.size() * sizeof(uchar32_t)); - return ret; - } - if (sizeof(wchar_t) == 2) { - if (endian == unicode::EUTFEE_NATIVE && addBOM == false) { - core::array ret(used); - ret.set_used(used); - memcpy((void*)ret.pointer(), (void*)array, used * sizeof(uchar16_t)); - return ret; - } else { - core::array a(toUTF16(endian, addBOM)); - core::array ret(a.size()); - ret.set_used(a.size()); - memcpy((void*)ret.pointer(), (void*)a.pointer(), a.size() * sizeof(uchar16_t)); - return ret; - } - } - if (sizeof(wchar_t) == 1) { - core::array a(toUTF8(addBOM)); - core::array ret(a.size()); - ret.set_used(a.size()); - memcpy((void*)ret.pointer(), (void*)a.pointer(), a.size() * sizeof(uchar8_t)); - return ret; - } - - // Shouldn't happen. - return core::array(); - } - - //! Converts the string to a properly encoded io::path string. - //! \param endian The desired endianness of the string. - //! \param addBOM If true, the proper unicode byte-order mark will be prefixed to the string. - //! \return An io::path string containing the properly encoded string. - io::path toPATH_s(const unicode::EUTF_ENDIAN endian = unicode::EUTFEE_NATIVE, const bool addBOM = false) const { -#if defined(_IRR_WCHAR_FILESYSTEM) - return toWCHAR_s(endian, addBOM); -#else - return toUTF8_s(addBOM); -#endif - } - - //! Loads an unknown stream of data. - //! Will attempt to determine if the stream is unicode data. Useful for loading from files. - //! \param data The data stream to load from. - //! \param data_size The length of the data string. - //! \return A reference to our current string. - ustring16& loadDataStream(const char* data, size_t data_size) { - // Clear our string. - *this = ""; - if (!data) - return *this; - - unicode::EUTF_ENCODE e = unicode::determineUnicodeBOM(data); - switch (e) { - default: - case unicode::EUTFE_UTF8: - append((uchar8_t*)data, data_size); - break; - - case unicode::EUTFE_UTF16: - case unicode::EUTFE_UTF16_BE: - case unicode::EUTFE_UTF16_LE: - append((uchar16_t*)data, data_size / 2); - break; - - case unicode::EUTFE_UTF32: - case unicode::EUTFE_UTF32_BE: - case unicode::EUTFE_UTF32_LE: - append((uchar32_t*)data, data_size / 4); - break; - } - - return *this; - } - - //! Gets the encoding of the Unicode string this class contains. - //! \return An enum describing the current encoding of this string. - const unicode::EUTF_ENCODE getEncoding() const { - return encoding; - } - - //! Gets the endianness of the Unicode string this class contains. - //! \return An enum describing the endianness of this string. - const unicode::EUTF_ENDIAN getEndianness() const { - if (encoding == unicode::EUTFE_UTF16_LE || - encoding == unicode::EUTFE_UTF32_LE) - return unicode::EUTFEE_LITTLE; - else return unicode::EUTFEE_BIG; + return end(); } private: - //! Reallocate the string, making it bigger or smaller. - //! \param new_size The new size of the string. - void reallocate(u32 new_size) { - uchar16_t* old_array = array; - - array = allocator.allocate(new_size + 1); //new u16[new_size]; - allocated = new_size + 1; - if (old_array == 0) return; - - u32 amount = used < new_size ? used : new_size; - for (u32 i = 0; i <= amount; ++i) - array[i] = old_array[i]; - - if (allocated <= used) - used = allocated - 1; - - array[used] = 0; - - allocator.deallocate(old_array); // delete [] old_array; - } - //--- member variables - uchar16_t* array; - unicode::EUTF_ENCODE encoding; - u32 allocated; - u32 used; - TAlloc allocator; - //irrAllocator allocator; -}; - -typedef ustring16 > ustring; - - -//! Appends two ustring16s. -template -inline ustring16 operator+(const ustring16& left, const ustring16& right) { - ustring16 ret(left); - ret += right; - return ret; -} - - -//! Appends a ustring16 and a null-terminated unicode string. -template -inline ustring16 operator+(const ustring16& left, const B* const right) { - ustring16 ret(left); - ret += right; - return ret; -} - - -//! Appends a ustring16 and a null-terminated unicode string. -template -inline ustring16 operator+(const B* const left, const ustring16& right) { - ustring16 ret(left); - ret += right; - return ret; -} - - -//! Appends a ustring16 and an Irrlicht string. -template -inline ustring16 operator+(const ustring16& left, const string& right) { - ustring16 ret(left); - ret += right; - return ret; -} - - -//! Appends a ustring16 and an Irrlicht string. -template -inline ustring16 operator+(const string& left, const ustring16& right) { - ustring16 ret(left); - ret += right; - return ret; -} - - -//! Appends a ustring16 and a std::basic_string. -template -inline ustring16 operator+(const ustring16& left, const std::basic_string& right) { - ustring16 ret(left); - ret += right; - return ret; -} - - -//! Appends a ustring16 and a std::basic_string. -template -inline ustring16 operator+(const std::basic_string& left, const ustring16& right) { - ustring16 ret(left); - ret += right; - return ret; -} - - -#ifdef USTRING_CPP0X -//! Appends two ustring16s. -template -inline ustring16 && operator+(const ustring16& left, ustring16 && right) { - //std::cout << "MOVE operator+(&, &&)" << std::endl; - right.insert(left, 0); - return std::move(right); -} - - -//! Appends two ustring16s. -template -inline ustring16 && operator+(ustring16 && left, const ustring16& right) { - //std::cout << "MOVE operator+(&&, &)" << std::endl; - left.append(right); - return std::move(left); -} - - -//! Appends two ustring16s. -template -inline ustring16 && operator+(ustring16 && left, ustring16 && right) { - //std::cout << "MOVE operator+(&&, &&)" << std::endl; - if ((right.size_raw() <= left.capacity() - left.size_raw()) || - (right.capacity() - right.size_raw() < left.size_raw())) { - left.append(right); - return std::move(left); - } else { - right.insert(left, 0); - return std::move(right); - } -} - - -//! Appends a ustring16 and a null-terminated unicode string. -template -inline ustring16 && operator+(ustring16 && left, const B* const right) { - //std::cout << "MOVE operator+(&&, B*)" << std::endl; - left.append(right); - return std::move(left); -} - - -//! Appends a ustring16 and a null-terminated unicode string. -template -inline ustring16 && operator+(const B* const left, ustring16 && right) { - //std::cout << "MOVE operator+(B*, &&)" << std::endl; - right.insert(left, 0); - return std::move(right); -} - - -//! Appends a ustring16 and an Irrlicht string. -template -inline ustring16 && operator+(const string& left, ustring16 && right) { - //std::cout << "MOVE operator+(&, &&)" << std::endl; - right.insert(left, 0); - return std::move(right); -} - - -//! Appends a ustring16 and an Irrlicht string. -template -inline ustring16 && operator+(ustring16 && left, const string& right) { - //std::cout << "MOVE operator+(&&, &)" << std::endl; - left.append(right); - return std::move(left); -} - - -//! Appends a ustring16 and a std::basic_string. -template -inline ustring16 && operator+(const std::basic_string& left, ustring16 && right) { - //std::cout << "MOVE operator+(&, &&)" << std::endl; - right.insert(core::ustring16(left), 0); - return std::move(right); -} - - -//! Appends a ustring16 and a std::basic_string. -template -inline ustring16 && operator+(ustring16 && left, const std::basic_string& right) { - //std::cout << "MOVE operator+(&&, &)" << std::endl; - left.append(right); - return std::move(left); -} -#endif - - -#ifndef USTRING_NO_STL -//! Writes a ustring16 to an ostream. -template -inline std::ostream& operator<<(std::ostream& out, const ustring16& in) { - out << in.toUTF8_s().c_str(); - return out; -} - -//! Writes a ustring16 to a wostream. -template -inline std::wostream& operator<<(std::wostream& out, const ustring16& in) { - out << in.toWCHAR_s().c_str(); - return out; -} -#endif - - -#ifndef USTRING_NO_STL - -namespace unicode { - -//! Hashing algorithm for hashing a ustring. Used for things like unordered_maps. -//! Algorithm taken from std::hash. -class hash : public std::unary_function { -public: - size_t operator()(const core::ustring& s) const { - size_t ret = 2166136261U; - size_t index = 0; - size_t stride = 1 + s.size_raw() / 10; - - core::ustring::const_iterator i = s.begin(); - while (i != s.end()) { - // TODO: Don't force u32 on an x64 OS. Make it agnostic. - ret = 16777619U * ret ^ (size_t)s[(u32)index]; - index += stride; - i += stride; - } - return (ret); - } + const wchar_t* data_; + mutable u32 size_; + u32 size_raw_; }; -} // end namespace unicode - -#endif +typedef ustring16 ustring; } // end namespace core } // end namespace irr diff --git a/gframe/lzma/CMakeLists.txt b/gframe/lzma/CMakeLists.txt new file mode 100644 index 0000000000..9195aca0a9 --- /dev/null +++ b/gframe/lzma/CMakeLists.txt @@ -0,0 +1,6 @@ +project (clzma) + +set (AUTO_FILES_RESULT) +AutoFiles("." "src" "\\.(cpp|c|h)$") + +add_library (clzma STATIC ${AUTO_FILES_RESULT}) diff --git a/gframe/lzma/LzmaLib.h b/gframe/lzma/LzmaLib.h index 76c99ce758..9b41eebaa9 100644 --- a/gframe/lzma/LzmaLib.h +++ b/gframe/lzma/LzmaLib.h @@ -125,7 +125,7 @@ LzmaUncompress SZ_ERROR_INPUT_EOF - it needs more bytes in input buffer (src) */ -MY_STDAPI LzmaUncompress(unsigned char *dest, size_t *destLen, const unsigned char *src, SizeT *srcLen, +MY_STDAPI LzmaUncompress(unsigned char *dest, size_t *destLen, const unsigned char *src, size_t *srcLen, const unsigned char *props, size_t propsSize); #ifdef __cplusplus diff --git a/gframe/lzma/premake4.lua b/gframe/lzma/premake4.lua deleted file mode 100644 index 41a85e6604..0000000000 --- a/gframe/lzma/premake4.lua +++ /dev/null @@ -1,3 +0,0 @@ -project "clzma" - kind "StaticLib" - files { "**.c", "**.h" } diff --git a/gframe/lzma/premake5.lua b/gframe/lzma/premake5.lua new file mode 100644 index 0000000000..c1fb4678ab --- /dev/null +++ b/gframe/lzma/premake5.lua @@ -0,0 +1,4 @@ +project "clzma" + kind "StaticLib" + cdialect "C11" + files { "*.c", "*.h" } diff --git a/gframe/materials.cpp b/gframe/materials.cpp index 9e0946dc73..d629da065d 100644 --- a/gframe/materials.cpp +++ b/gframe/materials.cpp @@ -4,51 +4,36 @@ namespace ygo { Materials matManager; +inline void SetS3DVertex(irr::video::S3DVertex* v, irr::f32 x1, irr::f32 y1, irr::f32 x2, irr::f32 y2, irr::f32 z, irr::f32 nz, irr::f32 tu1, irr::f32 tv1, irr::f32 tu2, irr::f32 tv2) { + v[0] = irr::video::S3DVertex(x1, y1, z, 0, 0, nz, irr::video::SColor(255, 255, 255, 255), tu1, tv1); + v[1] = irr::video::S3DVertex(x2, y1, z, 0, 0, nz, irr::video::SColor(255, 255, 255, 255), tu2, tv1); + v[2] = irr::video::S3DVertex(x1, y2, z, 0, 0, nz, irr::video::SColor(255, 255, 255, 255), tu1, tv2); + v[3] = irr::video::S3DVertex(x2, y2, z, 0, 0, nz, irr::video::SColor(255, 255, 255, 255), tu2, tv2); +} + Materials::Materials() { - vCardFront[0] = S3DVertex(vector3df(-0.35f, -0.5f, 0), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vCardFront[1] = S3DVertex(vector3df(0.35f, -0.5f, 0), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(1, 0)); - vCardFront[2] = S3DVertex(vector3df(-0.35f, 0.5f, 0), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 1)); - vCardFront[3] = S3DVertex(vector3df(0.35f, 0.5f, 0), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(1, 1)); - vCardOutline[0] = S3DVertex(vector3df(-0.375f, -0.54f, 0), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vCardOutline[1] = S3DVertex(vector3df(0.37f, -0.54f, 0), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(1, 0)); - vCardOutline[2] = S3DVertex(vector3df(-0.375f, 0.54f, 0), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 1)); - vCardOutline[3] = S3DVertex(vector3df(0.37f, 0.54f, 0), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(1, 1)); - vCardOutliner[0] = S3DVertex(vector3df(0.37f, -0.54f, 0), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vCardOutliner[1] = S3DVertex(vector3df(-0.375f, -0.54f, 0), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(1, 0)); - vCardOutliner[2] = S3DVertex(vector3df(0.37f, 0.54f, 0), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 1)); - vCardOutliner[3] = S3DVertex(vector3df(-0.375f, 0.54f, 0), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(1, 1)); - vCardBack[0] = S3DVertex(vector3df(0.35f, -0.5f, 0), vector3df(0, 0, -1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vCardBack[1] = S3DVertex(vector3df(-0.35f, -0.5f, 0), vector3df(0, 0, -1), SColor(255, 255, 255, 255), vector2df(1, 0)); - vCardBack[2] = S3DVertex(vector3df(0.35f, 0.5f, 0), vector3df(0, 0, -1), SColor(255, 255, 255, 255), vector2df(0, 1)); - vCardBack[3] = S3DVertex(vector3df(-0.35f, 0.5f, 0), vector3df(0, 0, -1), SColor(255, 255, 255, 255), vector2df(1, 1)); - vSymbol[0] = S3DVertex(vector3df(-0.35f, -0.35f, 0.01f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vSymbol[1] = S3DVertex(vector3df(0.35f, -0.35f, 0.01f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(1, 0)); - vSymbol[2] = S3DVertex(vector3df(-0.35f, 0.35f, 0.01f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 1)); - vSymbol[3] = S3DVertex(vector3df(0.35f, 0.35f, 0.01f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(1, 1)); - vNegate[0] = S3DVertex(vector3df(-0.25f, -0.28f, 0.01f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vNegate[1] = S3DVertex(vector3df(0.25f, -0.28f, 0.01f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(1, 0)); - vNegate[2] = S3DVertex(vector3df(-0.25f, 0.22f, 0.01f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 1)); - vNegate[3] = S3DVertex(vector3df(0.25f, 0.22f, 0.01f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(1, 1)); - vChainNum[0] = S3DVertex(vector3df(-0.35f, -0.35f, 0), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vChainNum[1] = S3DVertex(vector3df(0.35f, -0.35f, 0), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0.19375f, 0)); - vChainNum[2] = S3DVertex(vector3df(-0.35f, 0.35f, 0), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0.2421875f)); - vChainNum[3] = S3DVertex(vector3df(0.35f, 0.35f, 0), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0.19375f, 0.2421875f)); - vActivate[0] = S3DVertex(vector3df(-0.5f, -0.5f, 0), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vActivate[1] = S3DVertex(vector3df(0.5f, -0.5f, 0), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(1, 0)); - vActivate[2] = S3DVertex(vector3df(-0.5f, 0.5f, 0), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 1)); - vActivate[3] = S3DVertex(vector3df(0.5f, 0.5f, 0), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(1, 1)); - vField[0] = S3DVertex(vector3df(-1.0f, -4.0f, 0), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vField[1] = S3DVertex(vector3df(9.0f, -4.0f, 0), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(1, 0)); - vField[2] = S3DVertex(vector3df(-1.0f, 4.0f, 0), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 1)); - vField[3] = S3DVertex(vector3df(9.0f, 4.0f, 0), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(1, 1)); + SetS3DVertex(vCardFront, -0.35f, -0.5f, 0.35f, 0.5f, 0, 1, 0, 0, 1, 1); + SetS3DVertex(vCardOutline, -0.375f, -0.54f, 0.37f, 0.54f, 0, 1, 0, 0, 1, 1); + SetS3DVertex(vCardOutliner, 0.37f, -0.54f, -0.375f, 0.54f, 0, 1, 0, 0, 1, 1); + SetS3DVertex(vCardBack, 0.35f, -0.5f, -0.35f, 0.5f, 0, -1, 0, 0, 1, 1); + SetS3DVertex(vSymbol, -0.35f, -0.35f, 0.35f, 0.35f, 0.01f, 1, 0, 0, 1, 1); + SetS3DVertex(vNegate, -0.25f, -0.28f, 0.25f, 0.22f, 0.01f, 1, 0, 0, 1, 1); + SetS3DVertex(vChainNum, -0.35f, -0.35f, 0.35f, 0.35f, 0, 1, 0, 0, 0.19375f, 0.2421875f); + SetS3DVertex(vActivate, -0.5f, -0.5f, 0.5f, 0.5f, 0, 1, 0, 0, 1, 1); + SetS3DVertex(vField, -1.0f, -4.0f, 9.0f, 4.0f, 0, 1, 0, 0, 1, 1); + SetS3DVertex(vFieldSpell, 1.2f, -3.2f, 6.7f, 3.2f, 0, 1, 0, 0, 1, 1); + SetS3DVertex(vFieldSpell1, 1.2f, 0.8f, 6.7f, 3.2f, 0, 1, 0, 0.2f, 1, 0.63636f); + SetS3DVertex(vFieldSpell2, 1.2f, -3.2f, 6.7f, -0.8f, 0, 1, 1, 0.63636f, 0, 0.2f); + + /* //background grids for (int i = 0; i < 6; ++i) { - vBackLine[i * 6 + 0] = S3DVertex(vector3df(1.2f + i * 1.1f, 0.5f, -0.01f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vBackLine[i * 6 + 1] = S3DVertex(vector3df(1.2f + i * 1.1f, -0.5f, -0.01f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vBackLine[i * 6 + 2] = S3DVertex(vector3df(1.2f + i * 1.1f, 1.7f, -0.01f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vBackLine[i * 6 + 3] = S3DVertex(vector3df(1.2f + i * 1.1f, -1.7f, -0.01f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vBackLine[i * 6 + 4] = S3DVertex(vector3df(1.2f + i * 1.1f, 2.9f, -0.01f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vBackLine[i * 6 + 5] = S3DVertex(vector3df(1.2f + i * 1.1f, -2.9f, -0.01f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); + vBackLine[i * 6 + 0] = irr::video::S3DVertex(irr::core::vector3df(1.2f + i * 1.1f, 0.5f, -0.01f), irr::core::vector3df(0, 0, 1), irr::video::SColor(255, 255, 255, 255), irr::core::vector2df(0, 0)); + vBackLine[i * 6 + 1] = irr::video::S3DVertex(irr::core::vector3df(1.2f + i * 1.1f, -0.5f, -0.01f), irr::core::vector3df(0, 0, 1), irr::video::SColor(255, 255, 255, 255), irr::core::vector2df(0, 0)); + vBackLine[i * 6 + 2] = irr::video::S3DVertex(irr::core::vector3df(1.2f + i * 1.1f, 1.7f, -0.01f), irr::core::vector3df(0, 0, 1), irr::video::SColor(255, 255, 255, 255), irr::core::vector2df(0, 0)); + vBackLine[i * 6 + 3] = irr::video::S3DVertex(irr::core::vector3df(1.2f + i * 1.1f, -1.7f, -0.01f), irr::core::vector3df(0, 0, 1), irr::video::SColor(255, 255, 255, 255), irr::core::vector2df(0, 0)); + vBackLine[i * 6 + 4] = irr::video::S3DVertex(irr::core::vector3df(1.2f + i * 1.1f, 2.9f, -0.01f), irr::core::vector3df(0, 0, 1), irr::video::SColor(255, 255, 255, 255), irr::core::vector2df(0, 0)); + vBackLine[i * 6 + 5] = irr::video::S3DVertex(irr::core::vector3df(1.2f + i * 1.1f, -2.9f, -0.01f), irr::core::vector3df(0, 0, 1), irr::video::SColor(255, 255, 255, 255), irr::core::vector2df(0, 0)); } for(int i = 0; i < 6; ++i) { iBackLine[i * 4 + 0] = i * 6 + 0; @@ -59,10 +44,10 @@ Materials::Materials() { iBackLine[i * 2 + 25] = 30 + i; } //extra0 - vBackLine[36] = S3DVertex(vector3df(0.2f, 2.4f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vBackLine[37] = S3DVertex(vector3df(1.0f, 2.4f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vBackLine[38] = S3DVertex(vector3df(0.2f, 3.6f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vBackLine[39] = S3DVertex(vector3df(1.0f, 3.6f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); + vBackLine[36] = irr::video::S3DVertex(irr::core::vector3df(0.2f, 2.4f, 0.0f), irr::core::vector3df(0, 0, 1), irr::video::SColor(255, 255, 255, 255), irr::core::vector2df(0, 0)); + vBackLine[37] = irr::video::S3DVertex(irr::core::vector3df(1.0f, 2.4f, 0.0f), irr::core::vector3df(0, 0, 1), irr::video::SColor(255, 255, 255, 255), irr::core::vector2df(0, 0)); + vBackLine[38] = irr::video::S3DVertex(irr::core::vector3df(0.2f, 3.6f, 0.0f), irr::core::vector3df(0, 0, 1), irr::video::SColor(255, 255, 255, 255), irr::core::vector2df(0, 0)); + vBackLine[39] = irr::video::S3DVertex(irr::core::vector3df(1.0f, 3.6f, 0.0f), irr::core::vector3df(0, 0, 1), irr::video::SColor(255, 255, 255, 255), irr::core::vector2df(0, 0)); iBackLine[36] = 36; iBackLine[37] = 37; iBackLine[38] = 36; @@ -72,10 +57,10 @@ Materials::Materials() { iBackLine[42] = 38; iBackLine[43] = 39; //field0 - vBackLine[40] = S3DVertex(vector3df(0.2f, 1.1f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vBackLine[41] = S3DVertex(vector3df(1.0f, 1.1f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vBackLine[42] = S3DVertex(vector3df(0.2f, 2.3f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vBackLine[43] = S3DVertex(vector3df(1.0f, 2.3f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); + vBackLine[40] = irr::video::S3DVertex(irr::core::vector3df(0.2f, 1.1f, 0.0f), irr::core::vector3df(0, 0, 1), irr::video::SColor(255, 255, 255, 255), irr::core::vector2df(0, 0)); + vBackLine[41] = irr::video::S3DVertex(irr::core::vector3df(1.0f, 1.1f, 0.0f), irr::core::vector3df(0, 0, 1), irr::video::SColor(255, 255, 255, 255), irr::core::vector2df(0, 0)); + vBackLine[42] = irr::video::S3DVertex(irr::core::vector3df(0.2f, 2.3f, 0.0f), irr::core::vector3df(0, 0, 1), irr::video::SColor(255, 255, 255, 255), irr::core::vector2df(0, 0)); + vBackLine[43] = irr::video::S3DVertex(irr::core::vector3df(1.0f, 2.3f, 0.0f), irr::core::vector3df(0, 0, 1), irr::video::SColor(255, 255, 255, 255), irr::core::vector2df(0, 0)); iBackLine[44] = 40; iBackLine[45] = 41; iBackLine[46] = 40; @@ -85,10 +70,10 @@ Materials::Materials() { iBackLine[50] = 42; iBackLine[51] = 43; //deck0 - vBackLine[44] = S3DVertex(vector3df(6.9f, 2.4f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vBackLine[45] = S3DVertex(vector3df(7.7f, 2.4f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vBackLine[46] = S3DVertex(vector3df(6.9f, 3.6f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vBackLine[47] = S3DVertex(vector3df(7.7f, 3.6f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); + vBackLine[44] = irr::video::S3DVertex(irr::core::vector3df(6.9f, 2.4f, 0.0f), irr::core::vector3df(0, 0, 1), irr::video::SColor(255, 255, 255, 255), irr::core::vector2df(0, 0)); + vBackLine[45] = irr::video::S3DVertex(irr::core::vector3df(7.7f, 2.4f, 0.0f), irr::core::vector3df(0, 0, 1), irr::video::SColor(255, 255, 255, 255), irr::core::vector2df(0, 0)); + vBackLine[46] = irr::video::S3DVertex(irr::core::vector3df(6.9f, 3.6f, 0.0f), irr::core::vector3df(0, 0, 1), irr::video::SColor(255, 255, 255, 255), irr::core::vector2df(0, 0)); + vBackLine[47] = irr::video::S3DVertex(irr::core::vector3df(7.7f, 3.6f, 0.0f), irr::core::vector3df(0, 0, 1), irr::video::SColor(255, 255, 255, 255), irr::core::vector2df(0, 0)); iBackLine[52] = 44; iBackLine[53] = 45; iBackLine[54] = 44; @@ -98,10 +83,10 @@ Materials::Materials() { iBackLine[58] = 46; iBackLine[59] = 47; //grave0 - vBackLine[48] = S3DVertex(vector3df(6.9f, 1.1f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vBackLine[49] = S3DVertex(vector3df(7.7f, 1.1f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vBackLine[50] = S3DVertex(vector3df(6.9f, 2.3f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vBackLine[51] = S3DVertex(vector3df(7.7f, 2.3f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); + vBackLine[48] = irr::video::S3DVertex(irr::core::vector3df(6.9f, 1.1f, 0.0f), irr::core::vector3df(0, 0, 1), irr::video::SColor(255, 255, 255, 255), irr::core::vector2df(0, 0)); + vBackLine[49] = irr::video::S3DVertex(irr::core::vector3df(7.7f, 1.1f, 0.0f), irr::core::vector3df(0, 0, 1), irr::video::SColor(255, 255, 255, 255), irr::core::vector2df(0, 0)); + vBackLine[50] = irr::video::S3DVertex(irr::core::vector3df(6.9f, 2.3f, 0.0f), irr::core::vector3df(0, 0, 1), irr::video::SColor(255, 255, 255, 255), irr::core::vector2df(0, 0)); + vBackLine[51] = irr::video::S3DVertex(irr::core::vector3df(7.7f, 2.3f, 0.0f), irr::core::vector3df(0, 0, 1), irr::video::SColor(255, 255, 255, 255), irr::core::vector2df(0, 0)); iBackLine[60] = 48; iBackLine[61] = 49; iBackLine[62] = 48; @@ -111,10 +96,10 @@ Materials::Materials() { iBackLine[66] = 50; iBackLine[67] = 51; //remove0 - vBackLine[52] = S3DVertex(vector3df(6.9f, -0.2f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vBackLine[53] = S3DVertex(vector3df(7.7f, -0.2f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vBackLine[54] = S3DVertex(vector3df(6.9f, 1.0f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vBackLine[55] = S3DVertex(vector3df(7.7f, 1.0f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); + vBackLine[52] = irr::video::S3DVertex(irr::core::vector3df(6.9f, -0.2f, 0.0f), irr::core::vector3df(0, 0, 1), irr::video::SColor(255, 255, 255, 255), irr::core::vector2df(0, 0)); + vBackLine[53] = irr::video::S3DVertex(irr::core::vector3df(7.7f, -0.2f, 0.0f), irr::core::vector3df(0, 0, 1), irr::video::SColor(255, 255, 255, 255), irr::core::vector2df(0, 0)); + vBackLine[54] = irr::video::S3DVertex(irr::core::vector3df(6.9f, 1.0f, 0.0f), irr::core::vector3df(0, 0, 1), irr::video::SColor(255, 255, 255, 255), irr::core::vector2df(0, 0)); + vBackLine[55] = irr::video::S3DVertex(irr::core::vector3df(7.7f, 1.0f, 0.0f), irr::core::vector3df(0, 0, 1), irr::video::SColor(255, 255, 255, 255), irr::core::vector2df(0, 0)); iBackLine[68] = 52; iBackLine[69] = 53; iBackLine[70] = 52; @@ -124,10 +109,10 @@ Materials::Materials() { iBackLine[74] = 54; iBackLine[75] = 55; //extra1 - vBackLine[56] = S3DVertex(vector3df(6.9f, -2.4f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vBackLine[57] = S3DVertex(vector3df(7.7f, -2.4f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vBackLine[58] = S3DVertex(vector3df(6.9f, -3.6f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vBackLine[59] = S3DVertex(vector3df(7.7f, -3.6f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); + vBackLine[56] = irr::video::S3DVertex(irr::core::vector3df(6.9f, -2.4f, 0.0f), irr::core::vector3df(0, 0, 1), irr::video::SColor(255, 255, 255, 255), irr::core::vector2df(0, 0)); + vBackLine[57] = irr::video::S3DVertex(irr::core::vector3df(7.7f, -2.4f, 0.0f), irr::core::vector3df(0, 0, 1), irr::video::SColor(255, 255, 255, 255), irr::core::vector2df(0, 0)); + vBackLine[58] = irr::video::S3DVertex(irr::core::vector3df(6.9f, -3.6f, 0.0f), irr::core::vector3df(0, 0, 1), irr::video::SColor(255, 255, 255, 255), irr::core::vector2df(0, 0)); + vBackLine[59] = irr::video::S3DVertex(irr::core::vector3df(7.7f, -3.6f, 0.0f), irr::core::vector3df(0, 0, 1), irr::video::SColor(255, 255, 255, 255), irr::core::vector2df(0, 0)); iBackLine[76] = 56; iBackLine[77] = 57; iBackLine[78] = 56; @@ -137,10 +122,10 @@ Materials::Materials() { iBackLine[82] = 58; iBackLine[83] = 59; //field1 - vBackLine[60] = S3DVertex(vector3df(6.9f, -1.1f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vBackLine[61] = S3DVertex(vector3df(7.7f, -1.1f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vBackLine[62] = S3DVertex(vector3df(6.9f, -2.3f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vBackLine[63] = S3DVertex(vector3df(7.7f, -2.3f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); + vBackLine[60] = irr::video::S3DVertex(irr::core::vector3df(6.9f, -1.1f, 0.0f), irr::core::vector3df(0, 0, 1), irr::video::SColor(255, 255, 255, 255), irr::core::vector2df(0, 0)); + vBackLine[61] = irr::video::S3DVertex(irr::core::vector3df(7.7f, -1.1f, 0.0f), irr::core::vector3df(0, 0, 1), irr::video::SColor(255, 255, 255, 255), irr::core::vector2df(0, 0)); + vBackLine[62] = irr::video::S3DVertex(irr::core::vector3df(6.9f, -2.3f, 0.0f), irr::core::vector3df(0, 0, 1), irr::video::SColor(255, 255, 255, 255), irr::core::vector2df(0, 0)); + vBackLine[63] = irr::video::S3DVertex(irr::core::vector3df(7.7f, -2.3f, 0.0f), irr::core::vector3df(0, 0, 1), irr::video::SColor(255, 255, 255, 255), irr::core::vector2df(0, 0)); iBackLine[84] = 60; iBackLine[85] = 61; iBackLine[86] = 60; @@ -150,10 +135,10 @@ Materials::Materials() { iBackLine[90] = 62; iBackLine[91] = 63; //deck1 - vBackLine[64] = S3DVertex(vector3df(0.2f, -2.4f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vBackLine[65] = S3DVertex(vector3df(1.0f, -2.4f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vBackLine[66] = S3DVertex(vector3df(0.2f, -3.6f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vBackLine[67] = S3DVertex(vector3df(1.0f, -3.6f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); + vBackLine[64] = irr::video::S3DVertex(irr::core::vector3df(0.2f, -2.4f, 0.0f), irr::core::vector3df(0, 0, 1), irr::video::SColor(255, 255, 255, 255), irr::core::vector2df(0, 0)); + vBackLine[65] = irr::video::S3DVertex(irr::core::vector3df(1.0f, -2.4f, 0.0f), irr::core::vector3df(0, 0, 1), irr::video::SColor(255, 255, 255, 255), irr::core::vector2df(0, 0)); + vBackLine[66] = irr::video::S3DVertex(irr::core::vector3df(0.2f, -3.6f, 0.0f), irr::core::vector3df(0, 0, 1), irr::video::SColor(255, 255, 255, 255), irr::core::vector2df(0, 0)); + vBackLine[67] = irr::video::S3DVertex(irr::core::vector3df(1.0f, -3.6f, 0.0f), irr::core::vector3df(0, 0, 1), irr::video::SColor(255, 255, 255, 255), irr::core::vector2df(0, 0)); iBackLine[92] = 64; iBackLine[93] = 65; iBackLine[94] = 64; @@ -163,10 +148,10 @@ Materials::Materials() { iBackLine[98] = 66; iBackLine[99] = 67; //grave1 - vBackLine[68] = S3DVertex(vector3df(0.2f, -1.1f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vBackLine[69] = S3DVertex(vector3df(1.0f, -1.1f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vBackLine[70] = S3DVertex(vector3df(0.2f, -2.3f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vBackLine[71] = S3DVertex(vector3df(1.0f, -2.3f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); + vBackLine[68] = irr::video::S3DVertex(irr::core::vector3df(0.2f, -1.1f, 0.0f), irr::core::vector3df(0, 0, 1), irr::video::SColor(255, 255, 255, 255), irr::core::vector2df(0, 0)); + vBackLine[69] = irr::video::S3DVertex(irr::core::vector3df(1.0f, -1.1f, 0.0f), irr::core::vector3df(0, 0, 1), irr::video::SColor(255, 255, 255, 255), irr::core::vector2df(0, 0)); + vBackLine[70] = irr::video::S3DVertex(irr::core::vector3df(0.2f, -2.3f, 0.0f), irr::core::vector3df(0, 0, 1), irr::video::SColor(255, 255, 255, 255), irr::core::vector2df(0, 0)); + vBackLine[71] = irr::video::S3DVertex(irr::core::vector3df(1.0f, -2.3f, 0.0f), irr::core::vector3df(0, 0, 1), irr::video::SColor(255, 255, 255, 255), irr::core::vector2df(0, 0)); iBackLine[100] = 68; iBackLine[101] = 69; iBackLine[102] = 68; @@ -176,10 +161,10 @@ Materials::Materials() { iBackLine[106] = 70; iBackLine[107] = 71; //remove1 - vBackLine[72] = S3DVertex(vector3df(0.2f, 0.2f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vBackLine[73] = S3DVertex(vector3df(1.0f, 0.2f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vBackLine[74] = S3DVertex(vector3df(0.2f, -1.0f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vBackLine[75] = S3DVertex(vector3df(1.0f, -1.0f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); + vBackLine[72] = irr::video::S3DVertex(irr::core::vector3df(0.2f, 0.2f, 0.0f), irr::core::vector3df(0, 0, 1), irr::video::SColor(255, 255, 255, 255), irr::core::vector2df(0, 0)); + vBackLine[73] = irr::video::S3DVertex(irr::core::vector3df(1.0f, 0.2f, 0.0f), irr::core::vector3df(0, 0, 1), irr::video::SColor(255, 255, 255, 255), irr::core::vector2df(0, 0)); + vBackLine[74] = irr::video::S3DVertex(irr::core::vector3df(0.2f, -1.0f, 0.0f), irr::core::vector3df(0, 0, 1), irr::video::SColor(255, 255, 255, 255), irr::core::vector2df(0, 0)); + vBackLine[75] = irr::video::S3DVertex(irr::core::vector3df(1.0f, -1.0f, 0.0f), irr::core::vector3df(0, 0, 1), irr::video::SColor(255, 255, 255, 255), irr::core::vector2df(0, 0)); iBackLine[108] = 72; iBackLine[109] = 73; iBackLine[110] = 72; @@ -188,6 +173,7 @@ Materials::Materials() { iBackLine[113] = 75; iBackLine[114] = 74; iBackLine[115] = 75; + */ iRectangle[0] = 0; iRectangle[1] = 1; @@ -196,154 +182,65 @@ Materials::Materials() { iRectangle[4] = 1; iRectangle[5] = 3; - //deck0 - vFields[0] = S3DVertex(vector3df(6.9f, 2.7f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vFields[1] = S3DVertex(vector3df(7.7f, 2.7f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vFields[2] = S3DVertex(vector3df(6.9f, 3.9f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vFields[3] = S3DVertex(vector3df(7.7f, 3.9f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - //grave0 - vFields[4] = S3DVertex(vector3df(6.9f, 0.1f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vFields[5] = S3DVertex(vector3df(7.7f, 0.1f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vFields[6] = S3DVertex(vector3df(6.9f, 1.3f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vFields[7] = S3DVertex(vector3df(7.7f, 1.3f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - //extra0 - vFields[8] = S3DVertex(vector3df(0.2f, 2.7f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vFields[9] = S3DVertex(vector3df(1.0f, 2.7f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vFields[10] = S3DVertex(vector3df(0.2f, 3.9f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vFields[11] = S3DVertex(vector3df(1.0f, 3.9f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - //remove0 - vFields[12] = S3DVertex(vector3df(7.9f, 0.1f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vFields[13] = S3DVertex(vector3df(8.7f, 0.1f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vFields[14] = S3DVertex(vector3df(7.9f, 1.3f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vFields[15] = S3DVertex(vector3df(8.7f, 1.3f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - //mzone0 - vFields[16] = S3DVertex(vector3df(1.2f, 0.8f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vFields[17] = S3DVertex(vector3df(2.3f, 0.8f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vFields[18] = S3DVertex(vector3df(1.2f, 2.0f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vFields[19] = S3DVertex(vector3df(2.3f, 2.0f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vFields[20] = S3DVertex(vector3df(2.3f, 0.8f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vFields[21] = S3DVertex(vector3df(3.4f, 0.8f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vFields[22] = S3DVertex(vector3df(2.3f, 2.0f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vFields[23] = S3DVertex(vector3df(3.4f, 2.0f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vFields[24] = S3DVertex(vector3df(3.4f, 0.8f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vFields[25] = S3DVertex(vector3df(4.5f, 0.8f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vFields[26] = S3DVertex(vector3df(3.4f, 2.0f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vFields[27] = S3DVertex(vector3df(4.5f, 2.0f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vFields[28] = S3DVertex(vector3df(4.5f, 0.8f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vFields[29] = S3DVertex(vector3df(5.6f, 0.8f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vFields[30] = S3DVertex(vector3df(4.5f, 2.0f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vFields[31] = S3DVertex(vector3df(5.6f, 2.0f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vFields[32] = S3DVertex(vector3df(5.6f, 0.8f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vFields[33] = S3DVertex(vector3df(6.7f, 0.8f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vFields[34] = S3DVertex(vector3df(5.6f, 2.0f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vFields[35] = S3DVertex(vector3df(6.7f, 2.0f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - //szone0 - vFields[36] = S3DVertex(vector3df(1.2f, 2.0f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vFields[37] = S3DVertex(vector3df(2.3f, 2.0f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vFields[38] = S3DVertex(vector3df(1.2f, 3.2f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vFields[39] = S3DVertex(vector3df(2.3f, 3.2f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vFields[40] = S3DVertex(vector3df(2.3f, 2.0f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vFields[41] = S3DVertex(vector3df(3.4f, 2.0f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vFields[42] = S3DVertex(vector3df(2.3f, 3.2f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vFields[43] = S3DVertex(vector3df(3.4f, 3.2f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vFields[44] = S3DVertex(vector3df(3.4f, 2.0f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vFields[45] = S3DVertex(vector3df(4.5f, 2.0f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vFields[46] = S3DVertex(vector3df(3.4f, 3.2f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vFields[47] = S3DVertex(vector3df(4.5f, 3.2f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vFields[48] = S3DVertex(vector3df(4.5f, 2.0f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vFields[49] = S3DVertex(vector3df(5.6f, 2.0f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vFields[50] = S3DVertex(vector3df(4.5f, 3.2f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vFields[51] = S3DVertex(vector3df(5.6f, 3.2f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vFields[52] = S3DVertex(vector3df(5.6f, 2.0f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vFields[53] = S3DVertex(vector3df(6.7f, 2.0f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vFields[54] = S3DVertex(vector3df(5.6f, 3.2f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vFields[55] = S3DVertex(vector3df(6.7f, 3.2f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vFields[56] = S3DVertex(vector3df(0.2f, 0.1f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0));//field - vFields[57] = S3DVertex(vector3df(1.0f, 0.1f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vFields[58] = S3DVertex(vector3df(0.2f, 1.3f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vFields[59] = S3DVertex(vector3df(1.0f, 1.3f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vFields[60] = S3DVertex(vector3df(0.2f, 1.4f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0));//LScale - vFields[61] = S3DVertex(vector3df(1.0f, 1.4f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vFields[62] = S3DVertex(vector3df(0.2f, 2.6f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vFields[63] = S3DVertex(vector3df(1.0f, 2.6f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vFields[64] = S3DVertex(vector3df(6.9f, 1.4f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0));//RScale - vFields[65] = S3DVertex(vector3df(7.7f, 1.4f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vFields[66] = S3DVertex(vector3df(6.9f, 2.6f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vFields[67] = S3DVertex(vector3df(7.7f, 2.6f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - //deck1 - vFields[68] = S3DVertex(vector3df(1.0f, -2.7f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vFields[69] = S3DVertex(vector3df(0.2f, -2.7f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vFields[70] = S3DVertex(vector3df(1.0f, -3.9f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vFields[71] = S3DVertex(vector3df(0.2f, -3.9f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - //grave1 - vFields[72] = S3DVertex(vector3df(1.0f, -0.1f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vFields[73] = S3DVertex(vector3df(0.2f, -0.1f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vFields[74] = S3DVertex(vector3df(1.0f, -1.3f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vFields[75] = S3DVertex(vector3df(0.2f, -1.3f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - //extra1 - vFields[76] = S3DVertex(vector3df(7.7f, -2.7f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vFields[77] = S3DVertex(vector3df(6.9f, -2.7f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vFields[78] = S3DVertex(vector3df(7.7f, -3.9f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vFields[79] = S3DVertex(vector3df(6.9f, -3.9f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - //remove1 - vFields[80] = S3DVertex(vector3df(0.0f, -0.1f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vFields[81] = S3DVertex(vector3df(-0.8f, -0.1f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vFields[82] = S3DVertex(vector3df(0.0f, -1.3f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vFields[83] = S3DVertex(vector3df(-0.8f, -1.3f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - //mzone1 - vFields[84] = S3DVertex(vector3df(6.7f, -0.8f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vFields[85] = S3DVertex(vector3df(5.6f, -0.8f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vFields[86] = S3DVertex(vector3df(6.7f, -2.0f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vFields[87] = S3DVertex(vector3df(5.6f, -2.0f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vFields[88] = S3DVertex(vector3df(5.6f, -0.8f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vFields[89] = S3DVertex(vector3df(4.5f, -0.8f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vFields[90] = S3DVertex(vector3df(5.6f, -2.0f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vFields[91] = S3DVertex(vector3df(4.5f, -2.0f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vFields[92] = S3DVertex(vector3df(4.5f, -0.8f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vFields[93] = S3DVertex(vector3df(3.4f, -0.8f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vFields[94] = S3DVertex(vector3df(4.5f, -2.0f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vFields[95] = S3DVertex(vector3df(3.4f, -2.0f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vFields[96] = S3DVertex(vector3df(3.4f, -0.8f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vFields[97] = S3DVertex(vector3df(2.3f, -0.8f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vFields[98] = S3DVertex(vector3df(3.4f, -2.0f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vFields[99] = S3DVertex(vector3df(2.3f, -2.0f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vFields[100] = S3DVertex(vector3df(2.3f, -0.8f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vFields[101] = S3DVertex(vector3df(1.2f, -0.8f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vFields[102] = S3DVertex(vector3df(2.3f, -2.0f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vFields[103] = S3DVertex(vector3df(1.2f, -2.0f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - //szone1 - vFields[104] = S3DVertex(vector3df(6.7f, -2.0f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vFields[105] = S3DVertex(vector3df(5.6f, -2.0f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vFields[106] = S3DVertex(vector3df(6.7f, -3.2f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vFields[107] = S3DVertex(vector3df(5.6f, -3.2f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vFields[108] = S3DVertex(vector3df(5.6f, -2.0f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vFields[109] = S3DVertex(vector3df(4.5f, -2.0f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vFields[110] = S3DVertex(vector3df(5.6f, -3.2f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vFields[111] = S3DVertex(vector3df(4.5f, -3.2f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vFields[112] = S3DVertex(vector3df(4.5f, -2.0f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vFields[113] = S3DVertex(vector3df(3.4f, -2.0f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vFields[114] = S3DVertex(vector3df(4.5f, -3.2f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vFields[115] = S3DVertex(vector3df(3.4f, -3.2f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vFields[116] = S3DVertex(vector3df(3.4f, -2.0f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vFields[117] = S3DVertex(vector3df(2.3f, -2.0f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vFields[118] = S3DVertex(vector3df(3.4f, -3.2f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vFields[119] = S3DVertex(vector3df(2.3f, -3.2f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vFields[120] = S3DVertex(vector3df(2.3f, -2.0f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vFields[121] = S3DVertex(vector3df(1.2f, -2.0f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vFields[122] = S3DVertex(vector3df(2.3f, -3.2f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vFields[123] = S3DVertex(vector3df(1.2f, -3.2f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vFields[124] = S3DVertex(vector3df(7.7f, -0.1f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0));//field - vFields[125] = S3DVertex(vector3df(6.9f, -0.1f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vFields[126] = S3DVertex(vector3df(7.7f, -1.3f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vFields[127] = S3DVertex(vector3df(6.9f, -1.3f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vFields[128] = S3DVertex(vector3df(7.7f, -1.4f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0));//lscale - vFields[129] = S3DVertex(vector3df(6.9f, -1.4f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vFields[130] = S3DVertex(vector3df(7.7f, -2.6f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vFields[131] = S3DVertex(vector3df(6.9f, -2.6f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vFields[132] = S3DVertex(vector3df(1.0f, -1.4f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0));//rscale - vFields[133] = S3DVertex(vector3df(0.2f, -1.4f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vFields[134] = S3DVertex(vector3df(1.0f, -2.6f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); - vFields[135] = S3DVertex(vector3df(0.2f, -2.6f, 0.0f), vector3df(0, 0, 1), SColor(255, 255, 255, 255), vector2df(0, 0)); + SetS3DVertex(vFieldDeck[0], 6.9f, 2.7f, 7.7f, 3.9f, 0, 1, 0, 0, 0, 0); + //grave + SetS3DVertex(vFieldGrave[0][0], 6.9f, 0.1f, 7.7f, 1.3f, 0, 1, 0, 0, 0, 0); + SetS3DVertex(vFieldGrave[0][1], 6.9f, 1.4f, 7.7f, 2.6f, 0, 1, 0, 0, 0, 0); + //extra + SetS3DVertex(vFieldExtra[0], 0.2f, 2.7f, 1.0f, 3.9f, 0, 1, 0, 0, 0, 0); + //remove + SetS3DVertex(vFieldRemove[0][0], 7.9f, 0.1f, 8.7f, 1.3f, 0, 1, 0, 0, 0, 0); + SetS3DVertex(vFieldRemove[0][1], 6.9f, 0.1f, 7.7f, 1.3f, 0, 1, 0, 0, 0, 0); + for(int i = 0; i < 5; ++i) + SetS3DVertex(vFieldMzone[0][i], 1.2f + i * 1.1f, 0.8f, 2.3f + i * 1.1f, 2.0f, 0, 1, 0, 0, 0, 0); + SetS3DVertex(vFieldMzone[0][5], 2.3f, -0.6f, 3.4f, 0.6f, 0, 1, 0, 0, 0, 0); + SetS3DVertex(vFieldMzone[0][6], 4.5f, -0.6f, 5.6f, 0.6f, 0, 1, 0, 0, 0, 0); + for (int i = 0; i < 5; ++i) { + SetS3DVertex(vFieldSzone[0][i][0], 1.2f + i * 1.1f, 2.0f, 2.3f + i * 1.1f, 3.2f, 0, 1, 0, 0, 0, 0); + SetS3DVertex(vFieldSzone[0][i][1], 1.2f + i * 1.1f, 2.0f, 2.3f + i * 1.1f, 3.2f, 0, 1, 0, 0, 0, 0); + } + //field + SetS3DVertex(vFieldSzone[0][5][0], 0.2f, 0.1f, 1.0f, 1.3f, 0, 1, 0, 0, 0, 0); + SetS3DVertex(vFieldSzone[0][5][1], 0.2f, 1.4f, 1.0f, 2.6f, 0, 1, 0, 0, 0, 0); + //LScale + SetS3DVertex(vFieldSzone[0][6][0], 0.2f, 1.4f, 1.0f, 2.6f, 0, 1, 0, 0, 0, 0); + SetS3DVertex(vFieldSzone[0][6][1], 0.2f, 0.1f, 1.0f, 1.3f, 0, 1, 0, 0, 0, 0); + //RScale + SetS3DVertex(vFieldSzone[0][7][0], 6.9f, 1.4f, 7.7f, 2.6f, 0, 1, 0, 0, 0, 0); + SetS3DVertex(vFieldSzone[0][7][1], 7.9f, 0.1f, 8.7f, 1.3f, 0, 1, 0, 0, 0, 0); + + SetS3DVertex(vFieldDeck[1], 1.0f, -2.7f, 0.2f, -3.9f, 0, 1, 0, 0, 0, 0); + //grave + SetS3DVertex(vFieldGrave[1][0], 1.0f, -0.1f, 0.2f, -1.3f, 0, 1, 0, 0, 0, 0); + SetS3DVertex(vFieldGrave[1][1], 1.0f, -1.4f, 0.2f, -2.6f, 0, 1, 0, 0, 0, 0); + //extra + SetS3DVertex(vFieldExtra[1], 7.7f, -2.7f, 6.9f, -3.9f, 0, 1, 0, 0, 0, 0); + //remove + SetS3DVertex(vFieldRemove[1][0], 0.0f, -0.1f, -0.8f, -1.3f, 0, 1, 0, 0, 0, 0); + SetS3DVertex(vFieldRemove[1][1], 1.0f, -0.1f, 0.2f, -1.3f, 0, 1, 0, 0, 0, 0); + for(int i = 0; i < 5; ++i) + SetS3DVertex(vFieldMzone[1][i], 6.7f - i * 1.1f, -0.8f, 5.6f - i * 1.1f, -2.0f, 0, 1, 0, 0, 0, 0); + SetS3DVertex(vFieldMzone[1][5], 5.6f, 0.6f, 4.5f, -0.6f, 0, 1, 0, 0, 0, 0); + SetS3DVertex(vFieldMzone[1][6], 3.4f, 0.6f, 2.3f, -0.6f, 0, 1, 0, 0, 0, 0); + for (int i = 0; i < 5; ++i) { + SetS3DVertex(vFieldSzone[1][i][0], 6.7f - i * 1.1f, -2.0f, 5.6f - i * 1.1f, -3.2f, 0, 1, 0, 0, 0, 0); + SetS3DVertex(vFieldSzone[1][i][1], 6.7f - i * 1.1f, -2.0f, 5.6f - i * 1.1f, -3.2f, 0, 1, 0, 0, 0, 0); + } + //field + SetS3DVertex(vFieldSzone[1][5][0], 7.7f, -0.1f, 6.9f, -1.3f, 0, 1, 0, 0, 0, 0); + SetS3DVertex(vFieldSzone[1][5][1], 7.7f, -1.4f, 6.9f, -2.6f, 0, 1, 0, 0, 0, 0); + //LScale + SetS3DVertex(vFieldSzone[1][6][0], 7.7f, -1.4f, 6.9f, -2.6f, 0, 1, 0, 0, 0, 0); + SetS3DVertex(vFieldSzone[1][6][1], 7.7f, -0.1f, 6.9f, -1.3f, 0, 1, 0, 0, 0, 0); + //RScale + SetS3DVertex(vFieldSzone[1][7][0], 1.0f, -1.4f, 0.2f, -2.6f, 0, 1, 0, 0, 0, 0); + SetS3DVertex(vFieldSzone[1][7][1], 0.0f, -0.1f, -0.8f, -1.3f, 0, 1, 0, 0, 0, 0); + + //conti_act + vFieldContiAct[0] = irr::core::vector3df(3.5f, -0.6f, 0.0f); + vFieldContiAct[1] = irr::core::vector3df(4.4f, -0.6f, 0.0f); + vFieldContiAct[2] = irr::core::vector3df(3.5f, 0.6f, 0.0f); + vFieldContiAct[3] = irr::core::vector3df(4.4f, 0.6f, 0.0f); for(int i = 0; i < 40; ++i) @@ -353,7 +250,7 @@ Materials::Materials() { mCard.DiffuseColor = 0xff000000; mCard.ColorMaterial = irr::video::ECM_NONE; mCard.MaterialType = irr::video::EMT_ONETEXTURE_BLEND; - mCard.MaterialTypeParam = pack_textureBlendFunc(EBF_SRC_ALPHA, EBF_ONE_MINUS_SRC_ALPHA, EMFN_MODULATE_1X, EAS_VERTEX_COLOR); + mCard.MaterialTypeParam = pack_textureBlendFunc(irr::video::EBF_SRC_ALPHA, irr::video::EBF_ONE_MINUS_SRC_ALPHA, irr::video::EMFN_MODULATE_1X, irr::video::EAS_VERTEX_COLOR); mTexture.AmbientColor = 0xffffffff; mTexture.DiffuseColor = 0xff000000; mTexture.ColorMaterial = irr::video::ECM_NONE; @@ -361,15 +258,15 @@ Materials::Materials() { mBackLine.ColorMaterial = irr::video::ECM_NONE; mBackLine.AmbientColor = 0xffffffff; mBackLine.DiffuseColor = 0xc0000000; - mBackLine.AntiAliasing = EAAM_FULL_BASIC; + mBackLine.AntiAliasing = irr::video::EAAM_FULL_BASIC; mBackLine.MaterialType = irr::video::EMT_ONETEXTURE_BLEND; - mBackLine.MaterialTypeParam = pack_textureBlendFunc(EBF_SRC_ALPHA, EBF_ONE_MINUS_SRC_ALPHA, EMFN_MODULATE_1X, EAS_VERTEX_COLOR); + mBackLine.MaterialTypeParam = pack_textureBlendFunc(irr::video::EBF_SRC_ALPHA, irr::video::EBF_ONE_MINUS_SRC_ALPHA, irr::video::EMFN_MODULATE_1X, irr::video::EAS_VERTEX_COLOR); mBackLine.Thickness = 2; mSelField.ColorMaterial = irr::video::ECM_NONE; mSelField.AmbientColor = 0xffffffff; mSelField.DiffuseColor = 0xff000000; mSelField.MaterialType = irr::video::EMT_ONETEXTURE_BLEND; - mSelField.MaterialTypeParam = pack_textureBlendFunc(EBF_SRC_ALPHA, EBF_ONE_MINUS_SRC_ALPHA, EMFN_MODULATE_1X, EAS_VERTEX_COLOR); + mSelField.MaterialTypeParam = pack_textureBlendFunc(irr::video::EBF_SRC_ALPHA, irr::video::EBF_ONE_MINUS_SRC_ALPHA, irr::video::EMFN_MODULATE_1X, irr::video::EAS_VERTEX_COLOR); mOutLine.ColorMaterial = irr::video::ECM_AMBIENT; mOutLine.DiffuseColor = 0xff000000; mOutLine.Thickness = 2; @@ -377,15 +274,15 @@ Materials::Materials() { mTRTexture.AmbientColor = 0xffffff00; mATK.ColorMaterial = irr::video::ECM_AMBIENT; mATK.DiffuseColor = 0x80000000; - mATK.setFlag(EMF_BACK_FACE_CULLING, FALSE); + mATK.setFlag(irr::video::EMF_BACK_FACE_CULLING, false); mATK.MaterialType = irr::video::EMT_ONETEXTURE_BLEND; - mATK.MaterialTypeParam = pack_textureBlendFunc(EBF_SRC_ALPHA, EBF_ONE_MINUS_SRC_ALPHA, EMFN_MODULATE_1X, EAS_VERTEX_COLOR); + mATK.MaterialTypeParam = pack_textureBlendFunc(irr::video::EBF_SRC_ALPHA, irr::video::EBF_ONE_MINUS_SRC_ALPHA, irr::video::EMFN_MODULATE_1X, irr::video::EAS_VERTEX_COLOR); } void Materials::GenArrow(float y) { float ay = 1.0f; for (int i = 0; i < 19; ++i) { - vArrow[i * 2] = S3DVertex(vector3df(0.1f, ay * y, -2.0f * (ay * ay - 1.0f)), vector3df(0, ay * y, 1), 0xc000ff00, vector2df(0, 0)); - vArrow[i * 2 + 1] = S3DVertex(vector3df(-0.1f, ay * y, -2.0f * (ay * ay - 1.0f)), vector3df(0, ay * y, 1), 0xc000ff00, vector2df(0, 0)); + vArrow[i * 2] = irr::video::S3DVertex(irr::core::vector3df(0.1f, ay * y, -2.0f * (ay * ay - 1.0f)), irr::core::vector3df(0, ay * y, 1), 0xc000ff00, irr::core::vector2df(0, 0)); + vArrow[i * 2 + 1] = irr::video::S3DVertex(irr::core::vector3df(-0.1f, ay * y, -2.0f * (ay * ay - 1.0f)), irr::core::vector3df(0, ay * y, 1), 0xc000ff00, irr::core::vector2df(0, 0)); ay -= 0.1f; } vArrow[36].Pos.X = 0.2f; @@ -394,7 +291,7 @@ void Materials::GenArrow(float y) { vArrow[37].Pos.X = -0.2f; vArrow[37].Pos.Y = vArrow[35].Pos.Y - 0.01f; vArrow[37].Pos.Z = vArrow[35].Pos.Z - 0.01f; - vArrow[38] = S3DVertex(vector3df(0.0f, -1.0f * y, 0.0f), vector3df(0.0f, -1.0f, -1.0f), 0xc0ffffff, vector2df(0, 0)); + vArrow[38] = irr::video::S3DVertex(irr::core::vector3df(0.0f, -1.0f * y, 0.0f), irr::core::vector3df(0.0f, -1.0f, -1.0f), 0xc0ffffff, irr::core::vector2df(0, 0)); vArrow[39] = vArrow[38]; } diff --git a/gframe/materials.h b/gframe/materials.h index 4d10676d67..8743139d4c 100644 --- a/gframe/materials.h +++ b/gframe/materials.h @@ -1,4 +1,7 @@ -#include "config.h" +#ifndef MATERIALS_H +#define MATERIALS_H + +#include namespace ygo { @@ -7,22 +10,31 @@ class Materials { Materials(); void GenArrow(float y); - S3DVertex vCardFront[4]; - S3DVertex vCardOutline[4]; - S3DVertex vCardOutliner[4]; - S3DVertex vCardBack[4]; - S3DVertex vSymbol[4]; - S3DVertex vNegate[4]; - S3DVertex vChainNum[4]; - S3DVertex vActivate[4]; - S3DVertex vField[4]; - S3DVertex vBackLine[76]; - S3DVertex vFields[136]; - S3DVertex vArrow[40]; - SColor c2d[4]; - u16 iRectangle[6]; - u16 iBackLine[116]; - u16 iArrow[40]; + irr::video::S3DVertex vCardFront[4]; + irr::video::S3DVertex vCardOutline[4]; + irr::video::S3DVertex vCardOutliner[4]; + irr::video::S3DVertex vCardBack[4]; + irr::video::S3DVertex vSymbol[4]; + irr::video::S3DVertex vNegate[4]; + irr::video::S3DVertex vChainNum[4]; + irr::video::S3DVertex vActivate[4]; + irr::video::S3DVertex vField[4]; + irr::video::S3DVertex vFieldSpell[4]; + irr::video::S3DVertex vFieldSpell1[4]; + irr::video::S3DVertex vFieldSpell2[4]; + //irr::video::S3DVertex vBackLine[76]; + irr::video::S3DVertex vFieldDeck[2][4]; + irr::video::S3DVertex vFieldGrave[2][2][4]; //[player][rule], rule = 0: dule_rule <= 3, 1: dule_rule >= 4 + irr::video::S3DVertex vFieldExtra[2][4]; + irr::video::S3DVertex vFieldRemove[2][2][4]; //[player][rule] + irr::video::S3DVertex vFieldMzone[2][7][4]; //[player][sequence] + irr::video::S3DVertex vFieldSzone[2][8][2][4]; //[player][sequence][rule] + irr::core::vector3df vFieldContiAct[4]; + irr::video::S3DVertex vArrow[40]; + irr::video::SColor c2d[4]; + irr::u16 iRectangle[6]; + //irr::u16 iBackLine[116]; + irr::u16 iArrow[40]; irr::video::SMaterial mCard; irr::video::SMaterial mTexture; irr::video::SMaterial mBackLine; @@ -35,3 +47,5 @@ class Materials { extern Materials matManager; } + +#endif //MATERIALS_H diff --git a/gframe/menu_handler.cpp b/gframe/menu_handler.cpp index 4426bb9679..37423a655a 100644 --- a/gframe/menu_handler.cpp +++ b/gframe/menu_handler.cpp @@ -1,22 +1,43 @@ #include "config.h" #include "menu_handler.h" +#include "myfilesystem.h" #include "netserver.h" #include "duelclient.h" #include "deck_manager.h" #include "replay_mode.h" #include "single_mode.h" #include "image_manager.h" +#include "sound_manager.h" #include "game.h" namespace ygo { +void UpdateDeck() { + BufferIO::CopyWideString(mainGame->cbCategorySelect->getText(), mainGame->gameConf.lastcategory); + BufferIO::CopyWideString(mainGame->cbDeckSelect->getText(), mainGame->gameConf.lastdeck); + DuelClient::SendUpdateDeck(deckManager.current_deck); +} bool MenuHandler::OnEvent(const irr::SEvent& event) { + if(mainGame->dField.OnCommonEvent(event)) + return false; switch(event.EventType) { case irr::EET_GUI_EVENT: { irr::gui::IGUIElement* caller = event.GUIEvent.Caller; - s32 id = caller->getID(); + irr::s32 id = caller->getID(); + if(mainGame->wQuery->isVisible() && id != BUTTON_YES && id != BUTTON_NO) { + mainGame->wQuery->getParent()->bringToFront(mainGame->wQuery); + break; + } + if(mainGame->wReplaySave->isVisible() && id != BUTTON_REPLAY_SAVE && id != BUTTON_REPLAY_CANCEL) { + mainGame->wReplaySave->getParent()->bringToFront(mainGame->wReplaySave); + break; + } switch(event.GUIEvent.EventType) { case irr::gui::EGET_BUTTON_CLICKED: { + if(id < 110) + soundManager.PlaySoundEffect(SOUND_MENU); + else + soundManager.PlaySoundEffect(SOUND_BUTTON); switch(id) { case BUTTON_MODE_EXIT: { mainGame->device->closeDevice(); @@ -31,40 +52,45 @@ bool MenuHandler::OnEvent(const irr::SEvent& event) { break; } case BUTTON_JOIN_HOST: { - #if WINVER >= 0x0600 - struct addrinfo hints, *servinfo; - memset(&hints, 0, sizeof(struct addrinfo)); - hints.ai_family = AF_INET; /* Allow IPv4 or IPv6 */ - hints.ai_socktype = SOCK_STREAM; /* Datagram socket */ - hints.ai_flags = AI_PASSIVE; /* For wildcard IP address */ - hints.ai_protocol = 0; /* Any protocol */ - hints.ai_canonname = NULL; - hints.ai_addr = NULL; - hints.ai_next = NULL; - int status; - char hostname[100]; - char ip[20]; - const wchar_t* pstr = mainGame->ebJoinIP->getText(); - BufferIO::CopyWStr(pstr, hostname, 100); - if ((status = getaddrinfo(hostname, NULL, &hints, &servinfo)) == -1) { - fprintf(stderr, "getaddrinfo error: %s\n", gai_strerror(status)); - //error handling - BufferIO::CopyWStr(pstr, ip, 16); - } else - inet_ntop(AF_INET, &(((struct sockaddr_in *)servinfo->ai_addr)->sin_addr), ip, 20); - freeaddrinfo(servinfo); - #else - //int status; - char hostname[100]; + bot_mode = false; + mainGame->TrimText(mainGame->ebJoinHost); + mainGame->TrimText(mainGame->ebJoinPort); char ip[20]; - const wchar_t* pstr = mainGame->ebJoinIP->getText(); - BufferIO::CopyWStr(pstr, hostname, 100); - BufferIO::CopyWStr(pstr, ip, 16); - #endif + wchar_t pstr[100]; + wchar_t portstr[10]; + BufferIO::CopyWideString(mainGame->ebJoinHost->getText(), pstr); + BufferIO::CopyWideString(mainGame->ebJoinPort->getText(), portstr); + BufferIO::EncodeUTF8(pstr, ip); unsigned int remote_addr = htonl(inet_addr(ip)); - unsigned int remote_port = _wtoi(mainGame->ebJoinPort->getText()); - BufferIO::CopyWStr(pstr, mainGame->gameConf.lastip, 20); - BufferIO::CopyWStr(mainGame->ebJoinPort->getText(), mainGame->gameConf.lastport, 20); + if(remote_addr == -1) { + char hostname[100]; + char port[6]; + BufferIO::EncodeUTF8(pstr, hostname); + BufferIO::EncodeUTF8(portstr, port); + struct evutil_addrinfo hints; + struct evutil_addrinfo *answer = nullptr; + std::memset(&hints, 0, sizeof hints); + hints.ai_family = AF_INET; + hints.ai_socktype = SOCK_STREAM; + hints.ai_protocol = IPPROTO_TCP; + hints.ai_flags = EVUTIL_AI_ADDRCONFIG; + int status = evutil_getaddrinfo(hostname, port, &hints, &answer); + if(status != 0) { + mainGame->gMutex.lock(); + soundManager.PlaySoundEffect(SOUND_INFO); + mainGame->env->addMessageBox(L"", dataManager.GetSysString(1412)); + mainGame->gMutex.unlock(); + break; + } else { + sockaddr_in * sin = ((struct sockaddr_in *)answer->ai_addr); + evutil_inet_ntop(AF_INET, &(sin->sin_addr), ip, 20); + remote_addr = htonl(inet_addr(ip)); + evutil_freeaddrinfo(answer); + } + } + unsigned int remote_port = std::wcstol(portstr, nullptr, 10); + BufferIO::CopyWideString(pstr, mainGame->gameConf.lasthost); + BufferIO::CopyWideString(portstr, mainGame->gameConf.lastport); if(DuelClient::StartClient(remote_addr, remote_port, false)) { mainGame->btnCreateHost->setEnabled(false); mainGame->btnJoinHost->setEnabled(false); @@ -75,6 +101,8 @@ bool MenuHandler::OnEvent(const irr::SEvent& event) { case BUTTON_JOIN_CANCEL: { mainGame->HideElement(mainGame->wLanWindow); mainGame->ShowElement(mainGame->wMainMenu); + if(exit_on_return) + mainGame->device->closeDevice(); break; } case BUTTON_LAN_REFRESH: { @@ -89,11 +117,17 @@ bool MenuHandler::OnEvent(const irr::SEvent& event) { break; } case BUTTON_HOST_CONFIRM: { - BufferIO::CopyWStr(mainGame->ebServerName->getText(), mainGame->gameConf.gamename, 20); - if(!NetServer::StartServer(mainGame->gameConf.serverport)) + bot_mode = false; + BufferIO::CopyWideString(mainGame->ebServerName->getText(), mainGame->gameConf.gamename); + if(!NetServer::StartServer(mainGame->gameConf.serverport)) { + soundManager.PlaySoundEffect(SOUND_INFO); + mainGame->env->addMessageBox(L"", dataManager.GetSysString(1402)); break; + } if(!DuelClient::StartClient(0x7f000001, mainGame->gameConf.serverport)) { NetServer::StopServer(); + soundManager.PlaySoundEffect(SOUND_INFO); + mainGame->env->addMessageBox(L"", dataManager.GetSysString(1402)); break; } mainGame->btnHostConfirm->setEnabled(false); @@ -109,6 +143,8 @@ bool MenuHandler::OnEvent(const irr::SEvent& event) { break; } case BUTTON_HP_DUELIST: { + mainGame->cbCategorySelect->setEnabled(true); + mainGame->cbDeckSelect->setEnabled(true); DuelClient::SendPacketToServer(CTOS_HS_TODUELIST); break; } @@ -117,21 +153,39 @@ bool MenuHandler::OnEvent(const irr::SEvent& event) { break; } case BUTTON_HP_KICK: { - int id = 0; - while(id < 4) { - if(mainGame->btnHostPrepKick[id] == caller) + int index = 0; + while(index < 4) { + if(mainGame->btnHostPrepKick[index] == caller) break; - id++; + ++index; } CTOS_Kick csk; - csk.pos = id; + csk.pos = index; DuelClient::SendPacketToServer(CTOS_HS_KICK, csk); break; } - case BUTTON_HP_START: { - if(!mainGame->chkHostPrepReady[0]->isChecked() - || !mainGame->chkHostPrepReady[1]->isChecked()) + case BUTTON_HP_READY: { + if(mainGame->cbCategorySelect->getSelected() == -1 || mainGame->cbDeckSelect->getSelected() == -1 || + !deckManager.LoadCurrentDeck(mainGame->cbCategorySelect->getSelected(), mainGame->cbCategorySelect->getText(), mainGame->cbDeckSelect->getText())) { + mainGame->gMutex.lock(); + soundManager.PlaySoundEffect(SOUND_INFO); + mainGame->env->addMessageBox(L"", dataManager.GetSysString(1406)); + mainGame->gMutex.unlock(); break; + } + UpdateDeck(); + DuelClient::SendPacketToServer(CTOS_HS_READY); + mainGame->cbCategorySelect->setEnabled(false); + mainGame->cbDeckSelect->setEnabled(false); + break; + } + case BUTTON_HP_NOTREADY: { + DuelClient::SendPacketToServer(CTOS_HS_NOTREADY); + mainGame->cbCategorySelect->setEnabled(true); + mainGame->cbDeckSelect->setEnabled(true); + break; + } + case BUTTON_HP_START: { DuelClient::SendPacketToServer(CTOS_HS_START); break; } @@ -140,8 +194,13 @@ bool MenuHandler::OnEvent(const irr::SEvent& event) { mainGame->btnCreateHost->setEnabled(true); mainGame->btnJoinHost->setEnabled(true); mainGame->btnJoinCancel->setEnabled(true); + mainGame->btnStartBot->setEnabled(true); + mainGame->btnBotCancel->setEnabled(true); mainGame->HideElement(mainGame->wHostPrepare); - mainGame->ShowElement(mainGame->wLanWindow); + if(bot_mode) + mainGame->ShowElement(mainGame->wSinglePlay); + else + mainGame->ShowElement(mainGame->wLanWindow); mainGame->wChat->setVisible(false); if(exit_on_return) mainGame->device->closeDevice(); @@ -151,6 +210,7 @@ bool MenuHandler::OnEvent(const irr::SEvent& event) { mainGame->HideElement(mainGame->wMainMenu); mainGame->ShowElement(mainGame->wReplay); mainGame->ebRepStartTurn->setText(L"1"); + mainGame->stReplayInfo->setText(L""); mainGame->RefreshReplay(); break; } @@ -158,46 +218,185 @@ bool MenuHandler::OnEvent(const irr::SEvent& event) { mainGame->HideElement(mainGame->wMainMenu); mainGame->ShowElement(mainGame->wSinglePlay); mainGame->RefreshSingleplay(); + mainGame->RefreshBot(); break; } case BUTTON_LOAD_REPLAY: { - if(mainGame->lstReplayList->getSelected() == -1) - break; - if(!ReplayMode::cur_replay.OpenReplay(mainGame->lstReplayList->getListItem(mainGame->lstReplayList->getSelected()))) - break; - mainGame->imgCard->setImage(imageManager.tCover); + int start_turn = 1; + if(open_file) { + open_file = false; + if (!ReplayMode::cur_replay.OpenReplay(open_file_name)) { + if (exit_on_return) + mainGame->device->closeDevice(); + break; + } + } else { + auto selected = mainGame->lstReplayList->getSelected(); + if(selected == -1) + break; + wchar_t replay_path[256]{}; + myswprintf(replay_path, L"./replay/%ls", mainGame->lstReplayList->getListItem(selected)); + if (!ReplayMode::cur_replay.OpenReplay(replay_path)) + break; + start_turn = std::wcstol(mainGame->ebRepStartTurn->getText(), nullptr, 10); + } + mainGame->ClearCardInfo(); mainGame->wCardImg->setVisible(true); mainGame->wInfos->setVisible(true); mainGame->wReplay->setVisible(true); - mainGame->stName->setText(L""); - mainGame->stInfo->setText(L""); - mainGame->stDataInfo->setText(L""); - mainGame->stText->setText(L""); - mainGame->scrCardText->setVisible(false); mainGame->wReplayControl->setVisible(true); mainGame->btnReplayStart->setVisible(false); mainGame->btnReplayPause->setVisible(true); mainGame->btnReplayStep->setVisible(false); + mainGame->btnReplayUndo->setVisible(false); mainGame->wPhase->setVisible(true); - mainGame->dField.panel = 0; - mainGame->dField.hovered_card = 0; - mainGame->dField.clicked_card = 0; mainGame->dField.Clear(); mainGame->HideElement(mainGame->wReplay); mainGame->device->setEventReceiver(&mainGame->dField); - unsigned int start_turn = _wtoi(mainGame->ebRepStartTurn->getText()); if(start_turn == 1) start_turn = 0; ReplayMode::StartReplay(start_turn); break; } + case BUTTON_DELETE_REPLAY: { + int sel = mainGame->lstReplayList->getSelected(); + if(sel == -1) + break; + mainGame->gMutex.lock(); + wchar_t textBuffer[256]; + myswprintf(textBuffer, L"%ls\n%ls", mainGame->lstReplayList->getListItem(sel), dataManager.GetSysString(1363)); + mainGame->SetStaticText(mainGame->stQMessage, 310, mainGame->guiFont, textBuffer); + mainGame->PopupElement(mainGame->wQuery); + mainGame->gMutex.unlock(); + prev_operation = id; + prev_sel = sel; + break; + } + case BUTTON_RENAME_REPLAY: { + int sel = mainGame->lstReplayList->getSelected(); + if(sel == -1) + break; + mainGame->gMutex.lock(); + mainGame->wReplaySave->setText(dataManager.GetSysString(1364)); + mainGame->ebRSName->setText(mainGame->lstReplayList->getListItem(sel)); + mainGame->PopupElement(mainGame->wReplaySave); + mainGame->gMutex.unlock(); + prev_operation = id; + prev_sel = sel; + break; + } case BUTTON_CANCEL_REPLAY: { mainGame->HideElement(mainGame->wReplay); mainGame->ShowElement(mainGame->wMainMenu); break; } + case BUTTON_EXPORT_DECK: { + auto selected = mainGame->lstReplayList->getSelected(); + if(selected == -1) + break; + Replay replay; + wchar_t replay_filename[256]{}; + wchar_t namebuf[4][20]{}; + wchar_t filename[256]{}; + wchar_t replay_path[256]{}; + BufferIO::CopyWideString(mainGame->lstReplayList->getListItem(selected), replay_filename); + myswprintf(replay_path, L"./replay/%ls", replay_filename); + if (!replay.OpenReplay(replay_path)) + break; + if (replay.pheader.base.flag & REPLAY_SINGLE_MODE) + break; + for (size_t i = 0; i < replay.decks.size(); ++i) { + BufferIO::CopyWideString(replay.players[Replay::GetDeckPlayer(i)].c_str(), namebuf[i]); + FileSystem::SafeFileName(namebuf[i]); + } + for (size_t i = 0; i < replay.decks.size(); ++i) { + myswprintf(filename, L"./deck/%ls-%d %ls.ydk", replay_filename, i + 1, namebuf[i]); + DeckManager::SaveDeckArray(replay.decks[i], filename); + } + mainGame->stACMessage->setText(dataManager.GetSysString(1335)); + mainGame->PopupElement(mainGame->wACMessage, 20); + break; + } + case BUTTON_BOT_START: { + int sel = mainGame->lstBotList->getSelected(); + if(sel == -1) + break; + bot_mode = true; +#ifdef _WIN32 + if(!NetServer::StartServer(mainGame->gameConf.serverport)) { + soundManager.PlaySoundEffect(SOUND_INFO); + mainGame->env->addMessageBox(L"", dataManager.GetSysString(1402)); + break; + } + if(!DuelClient::StartClient(0x7f000001, mainGame->gameConf.serverport)) { + NetServer::StopServer(); + soundManager.PlaySoundEffect(SOUND_INFO); + mainGame->env->addMessageBox(L"", dataManager.GetSysString(1402)); + break; + } + STARTUPINFOW si; + PROCESS_INFORMATION pi; + ZeroMemory(&si, sizeof(si)); + si.cb = sizeof(si); + ZeroMemory(&pi, sizeof(pi)); + wchar_t cmd[MAX_PATH]; + wchar_t arg1[512]; + if(mainGame->botInfo[sel].select_deckfile) { + wchar_t botdeck[256]; + DeckManager::GetDeckFile(botdeck, mainGame->cbBotDeckCategory->getSelected(), mainGame->cbBotDeckCategory->getText(), mainGame->cbBotDeck->getText()); + myswprintf(arg1, L"%ls DeckFile='%ls'", mainGame->botInfo[sel].command, botdeck); + } + else + myswprintf(arg1, L"%ls", mainGame->botInfo[sel].command); + int flag = 0; + flag += (mainGame->chkBotHand->isChecked() ? 0x1 : 0); + myswprintf(cmd, L"Bot.exe \"%ls\" %d %d", arg1, flag, mainGame->gameConf.serverport); + if(!CreateProcessW(nullptr, cmd, nullptr, nullptr, FALSE, 0, nullptr, nullptr, &si, &pi)) + { + NetServer::StopServer(); + break; + } +#else + if(fork() == 0) { + usleep(100000); + wchar_t warg1[512]; + if(mainGame->botInfo[sel].select_deckfile) { + wchar_t botdeck[256]; + DeckManager::GetDeckFile(botdeck, mainGame->cbBotDeckCategory->getSelected(), mainGame->cbBotDeckCategory->getText(), mainGame->cbBotDeck->getText()); + myswprintf(warg1, L"%ls DeckFile='%ls'", mainGame->botInfo[sel].command, botdeck); + } + else + myswprintf(warg1, L"%ls", mainGame->botInfo[sel].command); + char arg1[512]; + BufferIO::EncodeUTF8(warg1, arg1); + int flag = 0; + flag += (mainGame->chkBotHand->isChecked() ? 0x1 : 0); + char arg2[8]; + mysnprintf(arg2, "%d", flag); + char arg3[8]; + mysnprintf(arg3, "%d", mainGame->gameConf.serverport); + execl("./bot", "bot", arg1, arg2, arg3, nullptr); + std::exit(0); + } else { + if(!NetServer::StartServer(mainGame->gameConf.serverport)) { + soundManager.PlaySoundEffect(SOUND_INFO); + mainGame->env->addMessageBox(L"", dataManager.GetSysString(1402)); + break; + } + if(!DuelClient::StartClient(0x7f000001, mainGame->gameConf.serverport)) { + NetServer::StopServer(); + soundManager.PlaySoundEffect(SOUND_INFO); + mainGame->env->addMessageBox(L"", dataManager.GetSysString(1402)); + break; + } + } +#endif + mainGame->btnStartBot->setEnabled(false); + mainGame->btnBotCancel->setEnabled(false); + break; + } case BUTTON_LOAD_SINGLEPLAY: { - if(mainGame->lstSinglePlayList->getSelected() == -1) + if(!open_file && mainGame->lstSinglePlayList->getSelected() == -1) break; mainGame->singleSignal.SetNoWait(false); SingleMode::StartPlay(); @@ -209,40 +408,92 @@ bool MenuHandler::OnEvent(const irr::SEvent& event) { break; } case BUTTON_DECK_EDIT: { - mainGame->RefreshDeck(mainGame->cbDBDecks); - if(mainGame->cbDBDecks->getSelected() != -1) - deckManager.LoadDeck(mainGame->cbDBDecks->getItem(mainGame->cbDBDecks->getSelected())); + mainGame->RefreshCategoryDeck(mainGame->cbDBCategory, mainGame->cbDBDecks); + if(open_file && deckManager.LoadCurrentDeck(open_file_name)) { +#ifdef _WIN32 + wchar_t *dash = std::wcsrchr(open_file_name, L'\\'); +#else + wchar_t *dash = std::wcsrchr(open_file_name, L'/'); +#endif + wchar_t *dot = std::wcsrchr(open_file_name, L'.'); + if(dash && dot && !mywcsncasecmp(dot, L".ydk", 4)) { // full path + wchar_t deck_name[256]; + BufferIO::CopyWideString(dash + 1, deck_name, dot - dash - 1); + mainGame->ebDeckname->setText(deck_name); + mainGame->cbDBCategory->setSelected(-1); + mainGame->cbDBDecks->setSelected(-1); + mainGame->btnManageDeck->setEnabled(false); + mainGame->cbDBCategory->setEnabled(false); + mainGame->cbDBDecks->setEnabled(false); + } else if(dash) { // has category + wchar_t deck_name[256]; + BufferIO::CopyWideString(dash + 1, deck_name); + for(size_t i = 0; i < mainGame->cbDBDecks->getItemCount(); ++i) { + if(!std::wcscmp(mainGame->cbDBDecks->getItem(i), deck_name)) { + BufferIO::CopyWideString(deck_name, mainGame->gameConf.lastdeck); + mainGame->cbDBDecks->setSelected(i); + break; + } + } + } else { // only deck name + for(size_t i = 0; i < mainGame->cbDBDecks->getItemCount(); ++i) { + if(!std::wcscmp(mainGame->cbDBDecks->getItem(i), open_file_name)) { + BufferIO::CopyWideString(open_file_name, mainGame->gameConf.lastdeck); + mainGame->cbDBDecks->setSelected(i); + break; + } + } + } + open_file = false; + } + else if(mainGame->cbDBCategory->getSelected() != -1 && mainGame->cbDBDecks->getSelected() != -1) { + deckManager.LoadCurrentDeck(mainGame->cbDBCategory->getSelected(), mainGame->cbDBCategory->getText(), mainGame->cbDBDecks->getText()); + mainGame->ebDeckname->setText(L""); + } mainGame->HideElement(mainGame->wMainMenu); - mainGame->is_building = true; - mainGame->is_siding = false; - mainGame->wInfos->setVisible(true); - mainGame->wCardImg->setVisible(true); - mainGame->wDeckEdit->setVisible(true); - mainGame->wFilter->setVisible(true); - mainGame->btnSideOK->setVisible(false); - mainGame->deckBuilder.filterList = deckManager._lfList[0].content; - mainGame->cbDBLFList->setSelected(0); - mainGame->cbCardType->setSelected(0); - mainGame->cbCardType2->setSelected(0); - mainGame->cbAttribute->setSelected(0); - mainGame->cbRace->setSelected(0); - mainGame->ebAttack->setText(L""); - mainGame->ebDefence->setText(L""); - mainGame->ebStar->setText(L""); - mainGame->cbCardType2->setEnabled(false); - mainGame->cbAttribute->setEnabled(false); - mainGame->cbRace->setEnabled(false); - mainGame->ebAttack->setEnabled(false); - mainGame->ebDefence->setEnabled(false); - mainGame->ebStar->setEnabled(false); - mainGame->deckBuilder.filter_effect = 0; - mainGame->deckBuilder.result_string[0] = L'0'; - mainGame->deckBuilder.result_string[1] = 0; - mainGame->deckBuilder.results.clear(); - mainGame->deckBuilder.is_draging = false; - mainGame->device->setEventReceiver(&mainGame->deckBuilder); - for(int i = 0; i < 32; ++i) - mainGame->chkCategory[i]->setChecked(false); + mainGame->deckBuilder.Initialize(); + break; + } + case BUTTON_YES: { + mainGame->HideElement(mainGame->wQuery); + if(prev_operation == BUTTON_DELETE_REPLAY) { + if(Replay::DeleteReplay(mainGame->lstReplayList->getListItem(prev_sel))) { + mainGame->stReplayInfo->setText(L""); + mainGame->lstReplayList->removeItem(prev_sel); + } + } + prev_operation = 0; + prev_sel = -1; + break; + } + case BUTTON_NO: { + mainGame->HideElement(mainGame->wQuery); + prev_operation = 0; + prev_sel = -1; + break; + } + case BUTTON_REPLAY_SAVE: { + mainGame->HideElement(mainGame->wReplaySave); + if(prev_operation == BUTTON_RENAME_REPLAY) { + wchar_t newname[256]; + BufferIO::CopyWideString(mainGame->ebRSName->getText(), newname); + if (!IsExtension(newname, L".yrp")) { + myswprintf(newname, L"%ls.yrp", mainGame->ebRSName->getText()); + } + if(Replay::RenameReplay(mainGame->lstReplayList->getListItem(prev_sel), newname)) { + mainGame->lstReplayList->setItem(prev_sel, newname, -1); + } else { + mainGame->env->addMessageBox(L"", dataManager.GetSysString(1365)); + } + } + prev_operation = 0; + prev_sel = -1; + break; + } + case BUTTON_REPLAY_CANCEL: { + mainGame->HideElement(mainGame->wReplaySave); + prev_operation = 0; + prev_sel = -1; break; } } @@ -258,37 +509,104 @@ bool MenuHandler::OnEvent(const irr::SEvent& event) { int port = DuelClient::hosts[sel].port; wchar_t buf[20]; myswprintf(buf, L"%d.%d.%d.%d", addr & 0xff, (addr >> 8) & 0xff, (addr >> 16) & 0xff, (addr >> 24) & 0xff); - mainGame->ebJoinIP->setText(buf); + mainGame->ebJoinHost->setText(buf); myswprintf(buf, L"%d", port); mainGame->ebJoinPort->setText(buf); break; } case LISTBOX_REPLAY_LIST: { int sel = mainGame->lstReplayList->getSelected(); - if(sel == -1) + if(sel < 0) + break; + auto filename = mainGame->lstReplayList->getListItem(sel); + if (!filename) break; - if(!ReplayMode::cur_replay.OpenReplay(mainGame->lstReplayList->getListItem(sel))) + wchar_t replay_path[256]{}; + myswprintf(replay_path, L"./replay/%ls", filename); + if (!temp_replay.OpenReplay(replay_path)) { + mainGame->stReplayInfo->setText(L"Error"); break; - wchar_t infobuf[256]; + } + wchar_t infobuf[256]{}; std::wstring repinfo; - time_t curtime = ReplayMode::cur_replay.pheader.seed; - tm* st = localtime(&curtime); - myswprintf(infobuf, L"%d/%d/%d %02d:%02d:%02d\n", st->tm_year + 1900, st->tm_mon + 1, st->tm_mday, st->tm_hour, st->tm_min, st->tm_sec); + time_t curtime; + const auto& rh = temp_replay.pheader.base; + if(temp_replay.pheader.base.flag & REPLAY_UNIFORM) + curtime = rh.start_time; + else{ + curtime = rh.seed; + wchar_t version_info[256]{}; + myswprintf(version_info, L"version 0x%X\n", rh.version); + repinfo.append(version_info); + } + std::wcsftime(infobuf, sizeof infobuf / sizeof infobuf[0], L"%Y/%m/%d %H:%M:%S\n", std::localtime(&curtime)); repinfo.append(infobuf); - wchar_t namebuf[4][20]; - BufferIO::CopyWStr((unsigned short*)&ReplayMode::cur_replay.replay_data[0], namebuf[0], 20); - BufferIO::CopyWStr((unsigned short*)&ReplayMode::cur_replay.replay_data[40], namebuf[1], 20); - if(ReplayMode::cur_replay.pheader.flag & REPLAY_TAG) { - BufferIO::CopyWStr((unsigned short*)&ReplayMode::cur_replay.replay_data[80], namebuf[2], 20); - BufferIO::CopyWStr((unsigned short*)&ReplayMode::cur_replay.replay_data[120], namebuf[3], 20); + if (rh.flag & REPLAY_SINGLE_MODE) { + wchar_t path[256]{}; + BufferIO::DecodeUTF8(temp_replay.script_name.c_str(), path); + repinfo.append(path); + repinfo.append(L"\n"); } - if(ReplayMode::cur_replay.pheader.flag & REPLAY_TAG) - myswprintf(infobuf, L"%ls\n%ls\n===VS===\n%ls\n%ls\n", namebuf[0], namebuf[1], namebuf[2], namebuf[3]); + const auto& player_names = temp_replay.players; + if(rh.flag & REPLAY_TAG) + myswprintf(infobuf, L"%ls\n%ls\n===VS===\n%ls\n%ls\n", player_names[0].c_str(), player_names[1].c_str(), player_names[2].c_str(), player_names[3].c_str()); else - myswprintf(infobuf, L"%ls\n===VS===\n%ls\n", namebuf[0], namebuf[1]); + myswprintf(infobuf, L"%ls\n===VS===\n%ls\n", player_names[0].c_str(), player_names[1].c_str()); repinfo.append(infobuf); mainGame->ebRepStartTurn->setText(L"1"); - mainGame->SetStaticText(mainGame->stReplayInfo, 180, mainGame->guiFont, (wchar_t*)repinfo.c_str()); + mainGame->SetStaticText(mainGame->stReplayInfo, 180, mainGame->guiFont, repinfo.c_str()); + break; + } + case LISTBOX_SINGLEPLAY_LIST: { + int sel = mainGame->lstSinglePlayList->getSelected(); + if(sel == -1) + break; + const wchar_t* name = mainGame->lstSinglePlayList->getListItem(sel); + wchar_t fname[256]; + myswprintf(fname, L"./single/%ls", name); + FILE* fp = mywfopen(fname, "rb"); + if(!fp) { + mainGame->stSinglePlayInfo->setText(L""); + break; + } + char linebuf[1024]; + wchar_t wlinebuf[1024]; + std::wstring message = L""; + bool in_message = false; + while(std::fgets(linebuf, 1024, fp)) { + if(!std::strncmp(linebuf, "--[[message", 11)) { + size_t len = std::strlen(linebuf); + char* msgend = std::strrchr(linebuf, ']'); + if(len <= 13) { + in_message = true; + continue; + } else if(len > 15 && msgend) { + *(msgend - 1) = '\0'; + BufferIO::DecodeUTF8(linebuf + 12, wlinebuf); + message.append(wlinebuf); + break; + } + } + if(!std::strncmp(linebuf, "]]", 2)) { + in_message = false; + break; + } + if(in_message) { + BufferIO::DecodeUTF8(linebuf, wlinebuf); + message.append(wlinebuf); + } + } + std::fclose(fp); + mainGame->SetStaticText(mainGame->stSinglePlayInfo, 200, mainGame->guiFont, message.c_str()); + break; + } + case LISTBOX_BOT_LIST: { + int sel = mainGame->lstBotList->getSelected(); + if(sel == -1) + break; + mainGame->SetStaticText(mainGame->stBotInfo, 200, mainGame->guiFont, mainGame->botInfo[sel].desc); + mainGame->cbBotDeckCategory->setVisible(mainGame->botInfo[sel].select_deckfile); + mainGame->cbBotDeck->setVisible(mainGame->botInfo[sel].select_deckfile); break; } } @@ -301,28 +619,22 @@ bool MenuHandler::OnEvent(const irr::SEvent& event) { break; mainGame->env->setFocus(mainGame->wHostPrepare); if(static_cast(caller)->isChecked()) { - if(mainGame->cbDeckSelect->getSelected() == -1 || - !deckManager.LoadDeck(mainGame->cbDeckSelect->getItem(mainGame->cbDeckSelect->getSelected()))) { + if(mainGame->cbCategorySelect->getSelected() == -1 || mainGame->cbDeckSelect->getSelected() == -1 || + !deckManager.LoadCurrentDeck(mainGame->cbCategorySelect->getSelected(), mainGame->cbCategorySelect->getText(), mainGame->cbDeckSelect->getText())) { + mainGame->gMutex.lock(); static_cast(caller)->setChecked(false); + soundManager.PlaySoundEffect(SOUND_INFO); + mainGame->env->addMessageBox(L"", dataManager.GetSysString(1406)); + mainGame->gMutex.unlock(); break; } - BufferIO::CopyWStr(mainGame->cbDeckSelect->getItem(mainGame->cbDeckSelect->getSelected()), - mainGame->gameConf.lastdeck, 20); - char deckbuf[1024]; - char* pdeck = deckbuf; - BufferIO::WriteInt32(pdeck, deckManager.current_deck.main.size() + deckManager.current_deck.extra.size()); - BufferIO::WriteInt32(pdeck, deckManager.current_deck.side.size()); - for(size_t i = 0; i < deckManager.current_deck.main.size(); ++i) - BufferIO::WriteInt32(pdeck, deckManager.current_deck.main[i]->first); - for(size_t i = 0; i < deckManager.current_deck.extra.size(); ++i) - BufferIO::WriteInt32(pdeck, deckManager.current_deck.extra[i]->first); - for(size_t i = 0; i < deckManager.current_deck.side.size(); ++i) - BufferIO::WriteInt32(pdeck, deckManager.current_deck.side[i]->first); - DuelClient::SendBufferToServer(CTOS_UPDATE_DECK, deckbuf, pdeck - deckbuf); + UpdateDeck(); DuelClient::SendPacketToServer(CTOS_HS_READY); + mainGame->cbCategorySelect->setEnabled(false); mainGame->cbDeckSelect->setEnabled(false); } else { DuelClient::SendPacketToServer(CTOS_HS_NOTREADY); + mainGame->cbCategorySelect->setEnabled(true); mainGame->cbDeckSelect->setEnabled(true); } break; @@ -330,46 +642,37 @@ bool MenuHandler::OnEvent(const irr::SEvent& event) { } break; } - case irr::gui::EGET_EDITBOX_ENTER: { + case irr::gui::EGET_COMBO_BOX_CHANGED: { switch(id) { - case EDITBOX_CHAT: { - if(mainGame->dInfo.isReplay) - break; - const wchar_t* input = mainGame->ebChatInput->getText(); - if(input[0]) { - unsigned short msgbuf[256]; - if(mainGame->dInfo.isStarted) { - if(mainGame->dInfo.player_type < 7) { - if(mainGame->dInfo.isTag && (mainGame->dInfo.player_type % 2)) - mainGame->AddChatMsg((wchar_t*)input, 2); - else - mainGame->AddChatMsg((wchar_t*)input, 0); - } else - mainGame->AddChatMsg((wchar_t*)input, 10); - } else - mainGame->AddChatMsg((wchar_t*)input, 7); - int len = BufferIO::CopyWStr(input, msgbuf, 256); - DuelClient::SendBufferToServer(CTOS_CHAT, msgbuf, (len + 1) * sizeof(short)); - mainGame->ebChatInput->setText(L""); + case COMBOBOX_BOT_RULE: { + mainGame->RefreshBot(); + break; + } + case COMBOBOX_HP_CATEGORY: { + int catesel = mainGame->cbCategorySelect->getSelected(); + if(catesel == 3) { + catesel = 2; + mainGame->cbCategorySelect->setSelected(2); + } + if(catesel >= 0) { + mainGame->RefreshDeck(mainGame->cbCategorySelect, mainGame->cbDeckSelect); + mainGame->cbDeckSelect->setSelected(0); + } + break; + } + case COMBOBOX_BOT_DECKCATEGORY: { + int catesel = mainGame->cbBotDeckCategory->getSelected(); + if(catesel == 3) { + catesel = 2; + mainGame->cbBotDeckCategory->setSelected(2); + } + if(catesel >= 0) { + mainGame->RefreshDeck(mainGame->cbBotDeckCategory, mainGame->cbBotDeck); + mainGame->cbBotDeck->setSelected(0); } break; } } - break; - } - default: break; - } - break; - } - case irr::EET_KEY_INPUT_EVENT: { - switch(event.KeyInput.Key) { - case irr::KEY_KEY_R: { - if(!event.KeyInput.PressedDown) - mainGame->textFont->setTransparency(true); - break; - } - case irr::KEY_ESCAPE: { - mainGame->device->minimizeWindow(); break; } default: break; diff --git a/gframe/menu_handler.h b/gframe/menu_handler.h index 9e2e444e01..dba1754d82 100644 --- a/gframe/menu_handler.h +++ b/gframe/menu_handler.h @@ -1,14 +1,17 @@ #ifndef MENU_HANDLER_H #define MENU_HANDLER_H -#include "config.h" +#include +#include "replay.h" namespace ygo { class MenuHandler: public irr::IEventReceiver { public: - virtual bool OnEvent(const irr::SEvent& event); - + bool OnEvent(const irr::SEvent& event) override; + irr::s32 prev_operation{ 0 }; + int prev_sel{ -1 }; + Replay temp_replay; }; } diff --git a/gframe/myfilesystem.h b/gframe/myfilesystem.h new file mode 100644 index 0000000000..90066b7b48 --- /dev/null +++ b/gframe/myfilesystem.h @@ -0,0 +1,276 @@ +#ifndef FILESYSTEM_H +#define FILESYSTEM_H + +#include +#include +#include "bufferio.h" + +#ifndef _WIN32 +#include +#include +#include +#include +#include +#include +#endif + +#ifdef _WIN32 + +#define NOMINMAX +#include +#include + +class FileSystem { +public: + static void SafeFileName(wchar_t* wfile) { + while((wfile = std::wcspbrk(wfile, L"<>:\"/\\|?*")) != nullptr) + *wfile++ = L'_'; + } + + static bool IsFileExists(const wchar_t* wfile) { + DWORD attr = GetFileAttributesW(wfile); + return attr != INVALID_FILE_ATTRIBUTES && !(attr & FILE_ATTRIBUTE_DIRECTORY); + } + + static bool IsFileExists(const char* file) { + wchar_t wfile[1024]; + BufferIO::DecodeUTF8(file, wfile); + return IsFileExists(wfile); + } + + static bool IsDirExists(const wchar_t* wdir) { + DWORD attr = GetFileAttributesW(wdir); + return attr != INVALID_FILE_ATTRIBUTES && (attr & FILE_ATTRIBUTE_DIRECTORY); + } + + static bool IsDirExists(const char* dir) { + wchar_t wdir[1024]; + BufferIO::DecodeUTF8(dir, wdir); + return IsDirExists(wdir); + } + + static bool MakeDir(const wchar_t* wdir) { + return CreateDirectoryW(wdir, nullptr); + } + + static bool MakeDir(const char* dir) { + wchar_t wdir[1024]; + BufferIO::DecodeUTF8(dir, wdir); + return MakeDir(wdir); + } + + static bool Rename(const wchar_t* woldname, const wchar_t* wnewname) { + return MoveFileW(woldname, wnewname); + } + + static bool Rename(const char* oldname, const char* newname) { + wchar_t woldname[1024]; + wchar_t wnewname[1024]; + BufferIO::DecodeUTF8(oldname, woldname); + BufferIO::DecodeUTF8(newname, wnewname); + return Rename(woldname, wnewname); + } + + static bool DeleteDir(const wchar_t* wdir) { + size_t len = std::wcslen(wdir); + wchar_t pdir[1024 + 1]{}; + if(len >= 1024) + return false; + BufferIO::CopyWideString(wdir, pdir); + // pFrom must be double-null terminated for SHFileOperationW + // pdir[len] is already '\0' and pdir[len+1] is '\0' due to zero-init + SHFILEOPSTRUCTW lpFileOp{}; + lpFileOp.hwnd = nullptr; + lpFileOp.wFunc = FO_DELETE; + lpFileOp.pFrom = pdir; + lpFileOp.pTo = nullptr; + lpFileOp.fFlags = FOF_ALLOWUNDO | FOF_NOCONFIRMATION | FOF_NOERRORUI | FOF_SILENT; + return SHFileOperationW(&lpFileOp) == 0; + } + + static bool DeleteDir(const char* dir) { + wchar_t wdir[1024]; + BufferIO::DecodeUTF8(dir, wdir); + return DeleteDir(wdir); + } + + static bool RemoveFile(const wchar_t* wfile) { + return DeleteFileW(wfile); + } + + static bool RemoveFile(const char* file) { + return DeleteFileA(file); + } + + static void TraversalDir(const wchar_t* wpath, const std::function& cb) { + wchar_t findstr[1024]; + std::swprintf(findstr, sizeof findstr / sizeof findstr[0], L"%ls/*", wpath); + WIN32_FIND_DATAW fdataw; + HANDLE fh = FindFirstFileW(findstr, &fdataw); + if(fh == INVALID_HANDLE_VALUE) + return; + do { + if(std::wcscmp(fdataw.cFileName, L".") && std::wcscmp(fdataw.cFileName, L"..")) + cb(fdataw.cFileName, (fdataw.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)); + } while(FindNextFileW(fh, &fdataw)); + FindClose(fh); + } + + static void TraversalDir(const char* path, const std::function& cb) { + wchar_t wpath[1024]; + BufferIO::DecodeUTF8(path, wpath); + TraversalDir(wpath, [&cb](const wchar_t* wname, bool isdir) { + char name[1024]; + BufferIO::EncodeUTF8(wname, name); + cb(name, isdir); + }); + } +}; + +#else + +class FileSystem { +public: + static void SafeFileName(wchar_t* wfile) { + while((wfile = std::wcspbrk(wfile, L"/")) != nullptr) + *wfile++ = L'_'; + } + + static bool IsFileExists(const char* file) { + struct stat fileStat; + return (stat(file, &fileStat) == 0) && !S_ISDIR(fileStat.st_mode); + } + + static bool IsFileExists(const wchar_t* wfile) { + char file[1024]; + BufferIO::EncodeUTF8(wfile, file); + return IsFileExists(file); + } + + static bool IsDirExists(const char* dir) { + struct stat fileStat; + return (stat(dir, &fileStat) == 0) && S_ISDIR(fileStat.st_mode); + } + + static bool IsDirExists(const wchar_t* wdir) { + char dir[1024]; + BufferIO::EncodeUTF8(wdir, dir); + return IsDirExists(dir); + } + + static bool MakeDir(const char* dir) { + return mkdir(dir, 0775) == 0; + } + + static bool MakeDir(const wchar_t* wdir) { + char dir[1024]; + BufferIO::EncodeUTF8(wdir, dir); + return MakeDir(dir); + } + + static bool Rename(const wchar_t* woldname, const wchar_t* wnewname) { + char oldname[1024]; + char newname[1024]; + BufferIO::EncodeUTF8(woldname, oldname); + BufferIO::EncodeUTF8(wnewname, newname); + return Rename(oldname, newname); + } + + static bool Rename(const char* oldname, const char* newname) { + return rename(oldname, newname) == 0; + } + + static bool DeleteDir(const wchar_t* wdir) { + char dir[1024]; + BufferIO::EncodeUTF8(wdir, dir); + return DeleteDir(dir); + } + + static bool DeleteDir(const char* dir) { + bool success = true; + TraversalDir(dir, [dir, &success](const char *name, bool isdir) { + char full_path[1024]; + int len = std::snprintf(full_path, sizeof(full_path), "%s/%s", dir, name); + if (len < 0 || len >= (int)(sizeof full_path)) { + success = false; + return; + } + if (isdir) + { + if(!DeleteDir(full_path)) + success = false; + } + else + { + if(unlink(full_path) != 0) + success = false; + } + }); + if (rmdir(dir) != 0) + success = false; + return success; + } + + static bool RemoveFile(const wchar_t* wfile) { + char file[1024]; + BufferIO::EncodeUTF8(wfile, file); + return RemoveFile(file); + } + + static bool RemoveFile(const char* file) { + return unlink(file) == 0; + } + + struct file_unit { + std::string filename; + bool is_dir; + }; + + static void TraversalDir(const char* path, const std::function& cb) { + DIR* dir = nullptr; + struct dirent* dirp = nullptr; + if((dir = opendir(path)) == nullptr) + return; + struct stat fileStat; + std::vector file_list; + while((dirp = readdir(dir)) != nullptr) { + file_unit funit; + char fname[1024]; + int len = std::snprintf(fname, sizeof(fname), "%s/%s", path, dirp->d_name); + if (len < 0 || len >= (int)(sizeof fname)) + continue; + stat(fname, &fileStat); + funit.filename = std::string(dirp->d_name); + funit.is_dir = S_ISDIR(fileStat.st_mode); + if(funit.is_dir && (std::strcmp(dirp->d_name, ".") == 0 || std::strcmp(dirp->d_name, "..") == 0)) + continue; + file_list.push_back(funit); + } + closedir(dir); + std::sort(file_list.begin(), file_list.end(), TraversalDirSort); + for (file_unit funit : file_list) + cb(funit.filename.c_str(), funit.is_dir); + } + + static bool TraversalDirSort(file_unit file1, file_unit file2) { + if(file1.is_dir != file2.is_dir) { + return file2.is_dir; + } else { + return file1.filename < file2.filename; + } + } + + static void TraversalDir(const wchar_t* wpath, const std::function& cb) { + char path[1024]; + BufferIO::EncodeUTF8(wpath, path); + TraversalDir(path, [&cb](const char* name, bool isdir) { + wchar_t wname[1024]; + BufferIO::DecodeUTF8(name, wname); + cb(wname, isdir); + }); + } +}; + +#endif // _WIN32 + +#endif //FILESYSTEM_H diff --git a/gframe/mymutex.h b/gframe/mymutex.h deleted file mode 100644 index 15cddff3e0..0000000000 --- a/gframe/mymutex.h +++ /dev/null @@ -1,56 +0,0 @@ -#ifndef MUTEX_H -#define MUTEX_H - -#ifdef _WIN32 - -#include - -class Mutex { -public: - Mutex() { - InitializeCriticalSection(&_mutex); - } - ~Mutex() { - DeleteCriticalSection(&_mutex); - } - void Lock() { - EnterCriticalSection(&_mutex); - } - void Unlock() { - LeaveCriticalSection(&_mutex); - } - bool TryLock() { - return TryEnterCriticalSection(&_mutex) == TRUE; - } -private: - CRITICAL_SECTION _mutex; -}; - -#else // _WIN32 - -#include - -class Mutex { -public: - Mutex() { - pthread_mutex_init(&mutex_t, NULL); - } - ~Mutex() { - pthread_mutex_destroy(&mutex_t); - } - void Lock() { - pthread_mutex_lock(&mutex_t); - } - void Unlock() { - pthread_mutex_unlock(&mutex_t); - } - bool TryLock() { - return !pthread_mutex_trylock(&mutex_t); - } -private: - pthread_mutex_t mutex_t; -}; - -#endif // _WIN32 - -#endif // MUTEX_H diff --git a/gframe/mysignal.h b/gframe/mysignal.h index 09c5dccd8e..513bab64cb 100644 --- a/gframe/mysignal.h +++ b/gframe/mysignal.h @@ -1,135 +1,51 @@ #ifndef SIGNAL_H #define SIGNAL_H -#ifdef _WIN32 - -#include - -class Signal { -public: - Signal() { - _event = CreateEvent(0, FALSE, FALSE, 0); - _nowait = false; - } - ~Signal() { - CloseHandle(_event); - } - void Set() { - SetEvent(_event); - } - void Reset() { - ResetEvent(_event); - } - void Wait() { - if(_nowait) - return; - WaitForSingleObject(_event, INFINITE); - } - bool Wait(long milli) { - if(_nowait) - return false; - return WaitForSingleObject(_event, milli + 1) != WAIT_TIMEOUT; - } - void SetNoWait(bool nowait) { - _nowait = nowait; - } -private: - HANDLE _event; - bool _nowait; -}; - -#else // _WIN32 - -#include -#include +#include +#include class Signal { public: Signal() { _state = false; _nowait = false; - pthread_mutex_init(&_mutex, NULL); - pthread_cond_init(&_cond, NULL); } ~Signal() { - pthread_cond_destroy(&_cond); - pthread_mutex_destroy(&_mutex); + } void Set() { - if(pthread_mutex_lock(&_mutex)) - return; + std::unique_lock lock(_mutex); _state = true; - if(pthread_cond_broadcast(&_cond)) - { - pthread_mutex_unlock(&_mutex); - // ERROR Broadcasting event status! - return; - } - pthread_mutex_unlock(&_mutex); + _cond.notify_all(); } void Reset() { - if(pthread_mutex_lock(&_mutex)) - return; + std::unique_lock lock(_mutex); _state = false; - pthread_mutex_unlock(&_mutex); } void Wait() { - if(_nowait || pthread_mutex_lock(&_mutex)) + if(_nowait) return; - while(!_state) - { - if(pthread_cond_wait(&_cond, &_mutex)) - { - pthread_mutex_unlock(&_mutex); - // ERROR Waiting events; - return; - } - } + std::unique_lock lock(_mutex); + _cond.wait(lock, [this]() { return _state; }); _state = false; - pthread_mutex_unlock(&_mutex); } - bool Wait(long milliseconds) - { - if (_nowait || pthread_mutex_lock(&_mutex) != 0) + bool Wait(long milliseconds) { + if(_nowait) return false; - - int rc = 0; - struct timespec abstime; - - struct timeval tv; - gettimeofday(&tv, NULL); - abstime.tv_sec = tv.tv_sec + milliseconds / 1000; - abstime.tv_nsec = tv.tv_usec*1000 + (milliseconds % 1000)*1000000; - if (abstime.tv_nsec >= 1000000000) - { - abstime.tv_nsec -= 1000000000; - abstime.tv_sec++; - } - - while (!_state) - { - if ((rc = pthread_cond_timedwait(&_cond, &_mutex, &abstime))) - { - if (rc == ETIMEDOUT) break; - pthread_mutex_unlock(&_mutex); - return false; - } - } + std::unique_lock lock(_mutex); + bool res = _cond.wait_for(lock, std::chrono::milliseconds(milliseconds), [this]() { return _state; }); _state = false; - pthread_mutex_unlock(&_mutex); - return rc == 0; + return res; } void SetNoWait(bool nowait) { _nowait = nowait; } private: - pthread_mutex_t _mutex; - pthread_cond_t _cond; + std::mutex _mutex; + std::condition_variable _cond; bool _state; bool _nowait; }; -#endif // _WIN32 - #endif // SIGNAL_H diff --git a/gframe/mythread.h b/gframe/mythread.h deleted file mode 100644 index b08d333335..0000000000 --- a/gframe/mythread.h +++ /dev/null @@ -1,31 +0,0 @@ -#ifndef THREAD_H -#define THREAD_H - -#ifdef _WIN32 - -#include - -class Thread { -public: - static void NewThread(int (*thread_func)(void*), void* param) { - CreateThread(0, 0, (LPTHREAD_START_ROUTINE)thread_func, param, 0, 0); - } -}; - -#else // _WIN32 - -#include - -class Thread { -public: - static void NewThread(int (*thread_func)(void*), void* param) { - pthread_t thread; - pthread_attr_t attr; - pthread_attr_init(&attr); - pthread_create(&thread, &attr, (void * (*)(void *))thread_func, param); - } -}; - -#endif // _WIN32 - -#endif // THREAD_H diff --git a/gframe/netserver.cpp b/gframe/netserver.cpp index a8c3d0381f..aa2d7e05ed 100644 --- a/gframe/netserver.cpp +++ b/gframe/netserver.cpp @@ -1,6 +1,9 @@ +#include "config.h" #include "netserver.h" #include "single_duel.h" #include "tag_duel.h" +#include "deck_manager.h" +#include namespace ygo { std::unordered_map NetServer::users; @@ -9,9 +12,9 @@ event_base* NetServer::net_evbase = 0; event* NetServer::broadcast_ev = 0; evconnlistener* NetServer::listener = 0; DuelMode* NetServer::duel_mode = 0; -char NetServer::net_server_read[0x2000]; -char NetServer::net_server_write[0x2000]; -unsigned short NetServer::last_sent = 0; +unsigned char NetServer::net_server_write[SIZE_NETWORK_BUFFER]; +unsigned char NetServer::net_server_read[SIZE_NETWORK_BUFFER]; +size_t NetServer::last_sent = 0; bool NetServer::StartServer(unsigned short port) { if(net_evbase) @@ -20,12 +23,12 @@ bool NetServer::StartServer(unsigned short port) { if(!net_evbase) return false; sockaddr_in sin; - memset(&sin, 0, sizeof(sin)); + std::memset(&sin, 0, sizeof sin); server_port = port; sin.sin_family = AF_INET; sin.sin_addr.s_addr = htonl(INADDR_ANY); sin.sin_port = htons(port); - listener = evconnlistener_new_bind(net_evbase, ServerAccept, NULL, + listener = evconnlistener_new_bind(net_evbase, ServerAccept, nullptr, LEV_OPT_CLOSE_ON_FREE | LEV_OPT_REUSEABLE, -1, (sockaddr*)&sin, sizeof(sin)); if(!listener) { event_base_free(net_evbase); @@ -33,17 +36,18 @@ bool NetServer::StartServer(unsigned short port) { return false; } evconnlistener_set_error_cb(listener, ServerAcceptError); - Thread::NewThread(ServerThread, net_evbase); + std::thread(ServerThread).detach(); return true; } bool NetServer::StartBroadcast() { if(!net_evbase) return false; SOCKET udp = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); - BOOL opt = TRUE; - setsockopt(udp, SOL_SOCKET, SO_BROADCAST, (const char*)&opt, sizeof(BOOL)); + int opt = TRUE; + setsockopt(udp, SOL_SOCKET, SO_BROADCAST, (const char*)&opt, sizeof opt); + setsockopt(udp, SOL_SOCKET, SO_REUSEADDR, (const char*)&opt, sizeof opt); sockaddr_in addr; - memset(&addr, 0, sizeof(addr)); + std::memset(&addr, 0, sizeof addr); addr.sin_family = AF_INET; addr.sin_port = htons(7920); addr.sin_addr.s_addr = 0; @@ -51,8 +55,8 @@ bool NetServer::StartBroadcast() { closesocket(udp); return false; } - broadcast_ev = event_new(net_evbase, udp, EV_READ | EV_PERSIST, BroadcastEvent, NULL); - event_add(broadcast_ev, NULL); + broadcast_ev = event_new(net_evbase, udp, EV_READ | EV_PERSIST, BroadcastEvent, nullptr); + event_add(broadcast_ev, nullptr); return true; } void NetServer::StopServer() { @@ -83,7 +87,9 @@ void NetServer::BroadcastEvent(evutil_socket_t fd, short events, void* arg) { int ret = recvfrom(fd, buf, 256, 0, (sockaddr*)&bc_addr, &sz); if(ret == -1) return; - HostRequest* pHR = (HostRequest*)buf; + HostRequest packet; + std::memcpy(&packet, buf, sizeof packet); + const HostRequest* pHR = &packet; if(pHR->identifier == NETWORK_CLIENT_ID) { SOCKADDR_IN sockTo; sockTo.sin_addr.s_addr = bc_addr.sin_addr.s_addr; @@ -94,7 +100,7 @@ void NetServer::BroadcastEvent(evutil_socket_t fd, short events, void* arg) { hp.port = server_port; hp.version = PRO_VERSION; hp.host = duel_mode->host_info; - BufferIO::CopyWStr(duel_mode->name, hp.name, 20); + BufferIO::CopyCharArray(duel_mode->name, hp.name); sendto(fd, (const char*)&hp, sizeof(HostPacket), 0, (sockaddr*)&sockTo, sizeof(sockTo)); } } @@ -105,25 +111,30 @@ void NetServer::ServerAccept(evconnlistener* listener, evutil_socket_t fd, socka dp.type = 0xff; dp.bev = bev; users[bev] = dp; - bufferevent_setcb(bev, ServerEchoRead, NULL, ServerEchoEvent, NULL); + bufferevent_setcb(bev, ServerEchoRead, nullptr, ServerEchoEvent, nullptr); bufferevent_enable(bev, EV_READ); } void NetServer::ServerAcceptError(evconnlistener* listener, void* ctx) { event_base_loopexit(net_evbase, 0); } +/* +* packet_len: 2 bytes +* proto: 1 byte +* [data]: (packet_len - 1) bytes +*/ void NetServer::ServerEchoRead(bufferevent *bev, void *ctx) { evbuffer* input = bufferevent_get_input(bev); - size_t len = evbuffer_get_length(input); - unsigned short packet_len = 0; - while(true) { - if(len < 2) - return; - evbuffer_copyout(input, &packet_len, 2); - if(len < (size_t)packet_len + 2) - return; - evbuffer_remove(input, net_server_read, packet_len + 2); - if(packet_len) - HandleCTOSPacket(&users[bev], &net_server_read[2], packet_len); + int len = evbuffer_get_length(input); + if (len < 2) + return; + uint16_t packet_len = 0; + while (len >= 2) { + evbuffer_copyout(input, &packet_len, sizeof packet_len); + if (len < packet_len + 2) + break; + int read_len = evbuffer_remove(input, net_server_read, packet_len + 2); + if (read_len > 2) + HandleCTOSPacket(&users[bev], &net_server_read[2], read_len - 2); len -= packet_len + 2; } } @@ -133,10 +144,11 @@ void NetServer::ServerEchoEvent(bufferevent* bev, short events, void* ctx) { DuelMode* dm = dp->game; if(dm) dm->LeaveGame(dp); - else DisconnectPlayer(dp); + else + DisconnectPlayer(dp); } } -int NetServer::ServerThread(void* param) { +int NetServer::ServerThread() { event_base_dispatch(net_evbase); for(auto bit = users.begin(); bit != users.end(); ++bit) { bufferevent_disable(bit->first, EV_READ); @@ -170,16 +182,18 @@ void NetServer::DisconnectPlayer(DuelPlayer* dp) { users.erase(bit); } } -void NetServer::HandleCTOSPacket(DuelPlayer* dp, char* data, unsigned int len) { - char* pdata = data; - unsigned char pktType = BufferIO::ReadUInt8(pdata); +void NetServer::HandleCTOSPacket(DuelPlayer* dp, unsigned char* data, int len) { + auto pdata = data; + unsigned char pktType = BufferIO::Read(pdata); if((pktType != CTOS_SURRENDER) && (pktType != CTOS_CHAT) && (dp->state == 0xff || (dp->state && dp->state != pktType))) return; switch(pktType) { case CTOS_RESPONSE: { if(!dp->game || !duel_mode->pduel) return; - duel_mode->GetResponse(dp, pdata, len > 64 ? 64 : len - 1); + if (len < 1 + (int)sizeof(unsigned char)) + return; + duel_mode->GetResponse(dp, pdata, len - 1); break; } case CTOS_TIME_CONFIRM: { @@ -191,119 +205,184 @@ void NetServer::HandleCTOSPacket(DuelPlayer* dp, char* data, unsigned int len) { case CTOS_CHAT: { if(!dp->game) return; + if (len < 1 + sizeof(uint16_t) * 1) + return; + if (len > 1 + sizeof(uint16_t) * LEN_CHAT_MSG) + return; + if ((len - 1) % sizeof(uint16_t)) + return; duel_mode->Chat(dp, pdata, len - 1); break; } case CTOS_UPDATE_DECK: { if(!dp->game) return; - duel_mode->UpdateDeck(dp, pdata); + if (len < 1 + (int)sizeof(int32_t) + (int)sizeof(int32_t)) + return; + if (len > 1 + (int)sizeof(CTOS_DeckData)) + return; + duel_mode->UpdateDeck(dp, pdata, len - 1); break; } case CTOS_HAND_RESULT: { if(!dp->game) return; - CTOS_HandResult* pkt = (CTOS_HandResult*)pdata; + if (len < 1 + (int)sizeof(CTOS_HandResult)) + return; + CTOS_HandResult packet; + std::memcpy(&packet, pdata, sizeof packet); + const auto* pkt = &packet; dp->game->HandResult(dp, pkt->res); break; } case CTOS_TP_RESULT: { if(!dp->game) return; - CTOS_TPResult* pkt = (CTOS_TPResult*)pdata; + if (len < 1 + (int)sizeof(CTOS_TPResult)) + return; + CTOS_TPResult packet; + std::memcpy(&packet, pdata, sizeof packet); + const auto* pkt = &packet; dp->game->TPResult(dp, pkt->res); break; } case CTOS_PLAYER_INFO: { - CTOS_PlayerInfo* pkt = (CTOS_PlayerInfo*)pdata; - BufferIO::CopyWStr(pkt->name, dp->name, 20); + if (len < 1 + (int)sizeof(CTOS_PlayerInfo)) + return; + CTOS_PlayerInfo packet; + std::memcpy(&packet, pdata, sizeof packet); + auto pkt = &packet; + BufferIO::NullTerminate(pkt->name); + BufferIO::CopyCharArray(pkt->name, dp->name); + break; + } + case CTOS_EXTERNAL_ADDRESS: { + // for other server & reverse proxy use only + /* + wchar_t hostname[LEN_HOSTNAME]; + uint32_t real_ip = ntohl(BufferIO::Read(pdata)); + BufferIO::CopyCharArray((uint16_t*)pdata, hostname); + */ break; } case CTOS_CREATE_GAME: { if(dp->game || duel_mode) return; - CTOS_CreateGame* pkt = (CTOS_CreateGame*)pdata; - if(pkt->info.mode == MODE_SINGLE) { + if (len < 1 + (int)sizeof(CTOS_CreateGame)) + return; + CTOS_CreateGame packet; + std::memcpy(&packet, pdata, sizeof packet); + auto pkt = &packet; + if(pkt->info.rule > CURRENT_RULE) + pkt->info.rule = CURRENT_RULE; + if(pkt->info.mode > MODE_TAG) + pkt->info.mode = MODE_SINGLE; + bool found = false; + for (const auto& lflist : deckManager._lfList) { + if(pkt->info.lflist == lflist.hash) { + found = true; + break; + } + } + if (!found) { + if (deckManager._lfList.size()) + pkt->info.lflist = deckManager._lfList[0].hash; + else + pkt->info.lflist = 0; + } + if (pkt->info.mode == MODE_SINGLE) { duel_mode = new SingleDuel(false); duel_mode->etimer = event_new(net_evbase, 0, EV_TIMEOUT | EV_PERSIST, SingleDuel::SingleTimer, duel_mode); - } else if(pkt->info.mode == MODE_MATCH) { + } + else if (pkt->info.mode == MODE_MATCH) { duel_mode = new SingleDuel(true); duel_mode->etimer = event_new(net_evbase, 0, EV_TIMEOUT | EV_PERSIST, SingleDuel::SingleTimer, duel_mode); - } else if(pkt->info.mode == MODE_TAG) { + } + else if (pkt->info.mode == MODE_TAG) { duel_mode = new TagDuel(); duel_mode->etimer = event_new(net_evbase, 0, EV_TIMEOUT | EV_PERSIST, TagDuel::TagTimer, duel_mode); } - if(pkt->info.rule > 3) - pkt->info.rule = 0; - if(pkt->info.mode > 2) - pkt->info.mode = 0; - unsigned int hash = 1; - for(auto lfit = deckManager._lfList.begin(); lfit != deckManager._lfList.end(); ++lfit) { - if(pkt->info.lflist == lfit->hash) { - hash = pkt->info.lflist; - break; - } - } - if(hash == 1) - pkt->info.lflist = deckManager._lfList[0].hash; + else + return; duel_mode->host_info = pkt->info; - BufferIO::CopyWStr(pkt->name, duel_mode->name, 20); - BufferIO::CopyWStr(pkt->pass, duel_mode->pass, 20); + BufferIO::NullTerminate(pkt->name); + BufferIO::NullTerminate(pkt->pass); + BufferIO::CopyCharArray(pkt->name, duel_mode->name); + BufferIO::CopyCharArray(pkt->pass, duel_mode->pass); duel_mode->JoinGame(dp, 0, true); StartBroadcast(); break; } case CTOS_JOIN_GAME: { - if(!duel_mode) - break; + if (!duel_mode) + return; + if (len < 1 + (int)sizeof(CTOS_JoinGame)) + return; duel_mode->JoinGame(dp, pdata, false); break; } case CTOS_LEAVE_GAME: { - if(!duel_mode) - break; + if (!duel_mode) + return; duel_mode->LeaveGame(dp); break; } case CTOS_SURRENDER: { - if(!duel_mode) - break; + if (!duel_mode) + return; duel_mode->Surrender(dp); break; } case CTOS_HS_TODUELIST: { - if(!duel_mode || duel_mode->pduel) - break; + if (!duel_mode || duel_mode->pduel) + return; duel_mode->ToDuelist(dp); break; } case CTOS_HS_TOOBSERVER: { - if(!duel_mode || duel_mode->pduel) - break; + if (!duel_mode || duel_mode->pduel) + return; duel_mode->ToObserver(dp); break; } case CTOS_HS_READY: case CTOS_HS_NOTREADY: { - if(!duel_mode || duel_mode->pduel) - break; + if (!duel_mode || duel_mode->pduel) + return; duel_mode->PlayerReady(dp, (CTOS_HS_NOTREADY - pktType) != 0); break; } case CTOS_HS_KICK: { - if(!duel_mode || duel_mode->pduel) - break; - CTOS_Kick* pkt = (CTOS_Kick*)pdata; + if (!duel_mode || duel_mode->pduel) + return; + if (len < 1 + (int)sizeof(CTOS_Kick)) + return; + CTOS_Kick packet; + std::memcpy(&packet, pdata, sizeof packet); + const auto* pkt = &packet; duel_mode->PlayerKick(dp, pkt->pos); break; } case CTOS_HS_START: { - if(!duel_mode || duel_mode->pduel) - break; + if (!duel_mode || duel_mode->pduel) + return; duel_mode->StartDuel(dp); break; } } } +size_t NetServer::CreateChatPacket(unsigned char* src, int src_size, unsigned char* dst, uint16_t dst_player_type) { + uint16_t src_msg[LEN_CHAT_MSG]; + std::memcpy(src_msg, src, src_size); + const int src_len = src_size / sizeof(uint16_t); + if (src_msg[src_len - 1] != 0) + return 0; + // STOC_Chat packet + auto pdst = dst; + BufferIO::Write(pdst, dst_player_type); + std::memcpy(pdst, src_msg, src_size); + pdst += src_size; + return sizeof(dst_player_type) + src_size; +} } diff --git a/gframe/netserver.h b/gframe/netserver.h index 78108434d1..b43188c1cf 100644 --- a/gframe/netserver.h +++ b/gframe/netserver.h @@ -1,12 +1,9 @@ #ifndef NETSERVER_H #define NETSERVER_H +#include #include "config.h" #include "network.h" -#include "data_manager.h" -#include "deck_manager.h" -#include -#include namespace ygo { @@ -18,9 +15,9 @@ class NetServer { static event* broadcast_ev; static evconnlistener* listener; static DuelMode* duel_mode; - static char net_server_read[0x2000]; - static char net_server_write[0x2000]; - static unsigned short last_sent; + static unsigned char net_server_write[SIZE_NETWORK_BUFFER]; + static unsigned char net_server_read[SIZE_NETWORK_BUFFER]; + static size_t last_sent; public: static bool StartServer(unsigned short port); @@ -33,36 +30,39 @@ class NetServer { static void ServerAcceptError(evconnlistener *listener, void* ctx); static void ServerEchoRead(bufferevent* bev, void* ctx); static void ServerEchoEvent(bufferevent* bev, short events, void* ctx); - static int ServerThread(void* param); + static int ServerThread(); static void DisconnectPlayer(DuelPlayer* dp); - static void HandleCTOSPacket(DuelPlayer* dp, char* data, unsigned int len); + static void HandleCTOSPacket(DuelPlayer* dp, unsigned char* data, int len); + static size_t CreateChatPacket(unsigned char* src, int src_size, unsigned char* dst, uint16_t dst_player_type); static void SendPacketToPlayer(DuelPlayer* dp, unsigned char proto) { - char* p = net_server_write; - BufferIO::WriteInt16(p, 1); - BufferIO::WriteInt8(p, proto); + auto p = net_server_write; + BufferIO::Write(p, 1); + BufferIO::Write(p, proto); last_sent = 3; - if(!dp) - return; - bufferevent_write(dp->bev, net_server_write, last_sent); + if (dp) + bufferevent_write(dp->bev, net_server_write, 3); } template - static void SendPacketToPlayer(DuelPlayer* dp, unsigned char proto, ST& st) { - char* p = net_server_write; - BufferIO::WriteInt16(p, 1 + sizeof(ST)); - BufferIO::WriteInt8(p, proto); - memcpy(p, &st, sizeof(ST)); + static void SendPacketToPlayer(DuelPlayer* dp, unsigned char proto, const ST& st) { + auto p = net_server_write; + static_assert(sizeof(ST) <= MAX_DATA_SIZE, "Packet size is too large."); + BufferIO::Write(p, (uint16_t)(1 + sizeof(ST))); + BufferIO::Write(p, proto); + std::memcpy(p, &st, sizeof(ST)); last_sent = sizeof(ST) + 3; - if(dp) - bufferevent_write(dp->bev, net_server_write, last_sent); + if (dp) + bufferevent_write(dp->bev, net_server_write, sizeof(ST) + 3); } static void SendBufferToPlayer(DuelPlayer* dp, unsigned char proto, void* buffer, size_t len) { - char* p = net_server_write; - BufferIO::WriteInt16(p, 1 + len); - BufferIO::WriteInt8(p, proto); - memcpy(p, buffer, len); + auto p = net_server_write; + if (len > MAX_DATA_SIZE) + len = MAX_DATA_SIZE; + BufferIO::Write(p, (uint16_t)(1 + len)); + BufferIO::Write(p, proto); + std::memcpy(p, buffer, len); last_sent = len + 3; - if(dp) - bufferevent_write(dp->bev, net_server_write, last_sent); + if (dp) + bufferevent_write(dp->bev, net_server_write, len + 3); } static void ReSendToPlayer(DuelPlayer* dp) { if(dp) diff --git a/gframe/network.h b/gframe/network.h index 9bc40cee1e..00ac58dda8 100644 --- a/gframe/network.h +++ b/gframe/network.h @@ -1,148 +1,245 @@ #ifndef NETWORK_H #define NETWORK_H -#include "config.h" -#include "deck_manager.h" +#include +#include #include #include #include #include #include +#include +#include "deck_manager.h" + +#define check_trivially_copyable(T) static_assert(std::is_trivially_copyable::value == true && std::is_standard_layout::value == true, "not trivially copyable") namespace ygo { +constexpr int SIZE_NETWORK_BUFFER = 0x20000; +constexpr int MAX_DATA_SIZE = UINT16_MAX - 1; + struct HostInfo { - unsigned int lflist; - unsigned char rule; - unsigned char mode; - bool enable_priority; - bool no_check_deck; - bool no_shuffle_deck; - unsigned int start_lp; - unsigned char start_hand; - unsigned char draw_count; - unsigned short time_limit; + uint32_t lflist{}; + uint8_t rule{}; + uint8_t mode{}; + uint8_t duel_rule{}; + uint8_t no_check_deck{}; + uint8_t no_shuffle_deck{}; + // byte padding[3] + + int32_t start_lp{}; + uint8_t start_hand{}; + uint8_t draw_count{}; + uint16_t time_limit{}; }; +check_trivially_copyable(HostInfo); +static_assert(sizeof(HostInfo) == 20, "size mismatch: HostInfo"); + struct HostPacket { - unsigned short identifier; - unsigned short version; - unsigned short port; - unsigned int ipaddr; - unsigned short name[20]; + uint16_t identifier{}; + uint16_t version{}; + uint16_t port{}; + // byte padding[2] + + uint32_t ipaddr{}; + uint16_t name[20]{}; HostInfo host; }; +check_trivially_copyable(HostPacket); +static_assert(sizeof(HostPacket) == 72, "size mismatch: HostPacket"); + struct HostRequest { - unsigned short identifier; + uint16_t identifier{}; +}; +check_trivially_copyable(HostRequest); +static_assert(sizeof(HostRequest) == 2, "size mismatch: HostRequest"); + +struct CTOS_DeckData { + int32_t mainc{}; + int32_t sidec{}; + uint32_t list[MAINC_MAX + SIDEC_MAX]{}; }; +check_trivially_copyable(CTOS_DeckData); + struct CTOS_HandResult { - unsigned char res; + uint8_t res{}; }; +check_trivially_copyable(CTOS_HandResult); +static_assert(sizeof(CTOS_HandResult) == 1, "size mismatch: CTOS_HandResult"); + struct CTOS_TPResult { - unsigned char res; + uint8_t res{}; }; +check_trivially_copyable(CTOS_TPResult); +static_assert(sizeof(CTOS_TPResult) == 1, "size mismatch: CTOS_TPResult"); + struct CTOS_PlayerInfo { - unsigned short name[20]; + uint16_t name[20]{}; }; +check_trivially_copyable(CTOS_PlayerInfo); +static_assert(sizeof(CTOS_PlayerInfo) == 40, "size mismatch: CTOS_PlayerInfo"); + struct CTOS_CreateGame { HostInfo info; - unsigned short name[20]; - unsigned short pass[20]; + uint16_t name[20]{}; + uint16_t pass[20]{}; }; +check_trivially_copyable(CTOS_CreateGame); +static_assert(sizeof(CTOS_CreateGame) == 100, "size mismatch: CTOS_CreateGame"); + struct CTOS_JoinGame { - unsigned short version; - unsigned int gameid; - unsigned short pass[20]; + uint16_t version{}; + // byte padding[2] + + uint32_t gameid{}; + uint16_t pass[20]{}; }; +check_trivially_copyable(CTOS_JoinGame); +static_assert(sizeof(CTOS_JoinGame) == 48, "size mismatch: CTOS_JoinGame"); + struct CTOS_Kick { - unsigned char pos; + uint8_t pos{}; }; +check_trivially_copyable(CTOS_Kick); +static_assert(sizeof(CTOS_Kick) == 1, "size mismatch: CTOS_Kick"); + +/* +* CTOS_ExternalAddress +* uint32_t real_ip; (IPv4 address, BE, alway 0 in normal client) +* uint16_t hostname[256]; (UTF-16 string) +*/ + +constexpr int LEN_HOSTNAME = 256; + +// STOC struct STOC_ErrorMsg { - unsigned char msg; - unsigned int code; + uint8_t msg{}; + // byte padding[3] + + uint32_t code{}; }; +check_trivially_copyable(STOC_ErrorMsg); +static_assert(sizeof(STOC_ErrorMsg) == 8, "size mismatch: STOC_ErrorMsg"); + struct STOC_HandResult { - unsigned char res1; - unsigned char res2; + uint8_t res1{}; + uint8_t res2{}; }; +check_trivially_copyable(STOC_HandResult); +static_assert(sizeof(STOC_HandResult) == 2, "size mismatch: STOC_HandResult"); + +// reserved for STOC_CREATE_GAME struct STOC_CreateGame { - unsigned int gameid; + uint32_t gameid{}; }; +check_trivially_copyable(STOC_CreateGame); +static_assert(sizeof(STOC_CreateGame) == 4, "size mismatch: STOC_CreateGame"); + struct STOC_JoinGame { HostInfo info; }; +check_trivially_copyable(STOC_JoinGame); +static_assert(sizeof(STOC_JoinGame) == 20, "size mismatch: STOC_JoinGame"); + struct STOC_TypeChange { - unsigned char type; + uint8_t type{}; }; +check_trivially_copyable(STOC_TypeChange); +static_assert(sizeof(STOC_TypeChange) == 1, "size mismatch: STOC_TypeChange"); + +// reserved for STOC_LEAVE_GAME struct STOC_ExitGame { - unsigned char pos; + uint8_t pos{}; }; +check_trivially_copyable(STOC_ExitGame); +static_assert(sizeof(STOC_ExitGame) == 1, "size mismatch: STOC_ExitGame"); + struct STOC_TimeLimit { - unsigned char player; - unsigned short left_time; -}; -struct STOC_Chat { - unsigned short player; - unsigned short msg[256]; + uint8_t player{}; + // byte padding[1] + + uint16_t left_time{}; }; +check_trivially_copyable(STOC_TimeLimit); +static_assert(sizeof(STOC_TimeLimit) == 4, "size mismatch: STOC_TimeLimit"); + +/* +* STOC_Chat +* uint16_t player_type; +* uint16_t msg[256]; (UTF-16 string) +*/ +constexpr int LEN_CHAT_PLAYER = 1; +constexpr int LEN_CHAT_MSG = 256; +constexpr int SIZE_STOC_CHAT = (LEN_CHAT_PLAYER + LEN_CHAT_MSG) * sizeof(uint16_t); + +#pragma pack(push, 1) struct STOC_HS_PlayerEnter { - unsigned short name[20]; - unsigned char pos; + uint16_t name[20]{}; + uint8_t pos{}; }; +#pragma pack(pop) +check_trivially_copyable(STOC_HS_PlayerEnter); +static_assert(sizeof(STOC_HS_PlayerEnter) == 41, "size mismatch: STOC_HS_PlayerEnter"); + struct STOC_HS_PlayerChange { //pos<<4 | state - unsigned char status; + uint8_t status{}; }; +check_trivially_copyable(STOC_HS_PlayerChange); +static_assert(sizeof(STOC_HS_PlayerChange) == 1, "size mismatch: STOC_HS_PlayerChange"); + struct STOC_HS_WatchChange { - unsigned short watch_count; + uint16_t watch_count{}; }; +check_trivially_copyable(STOC_HS_WatchChange); +static_assert(sizeof(STOC_HS_WatchChange) == 2, "size mismatch: STOC_HS_WatchChange"); class DuelMode; struct DuelPlayer { - unsigned short name[20]; - DuelMode* game; - unsigned char type; - unsigned char state; - bufferevent* bev; - DuelPlayer() { - game = 0; - type = 0; - state = 0; - bev = 0; - } + uint16_t name[20]{}; + DuelMode* game{}; + uint8_t type{}; + uint8_t state{}; + bufferevent* bev{}; }; +inline unsigned int GetPosition(unsigned char* qbuf, size_t offset) { + unsigned int info = 0; + std::memcpy(&info, qbuf + offset, sizeof info); + return info >> 24; +} + class DuelMode { public: - DuelMode(): host_player(0), pduel(0) {} - virtual ~DuelMode() {} - virtual void Chat(DuelPlayer* dp, void* pdata, int len) {} - virtual void JoinGame(DuelPlayer* dp, void* pdata, bool is_creater) {} - virtual void LeaveGame(DuelPlayer* dp) {} - virtual void ToDuelist(DuelPlayer* dp) {} - virtual void ToObserver(DuelPlayer* dp) {} - virtual void PlayerReady(DuelPlayer* dp, bool is_ready) {} - virtual void PlayerKick(DuelPlayer* dp, unsigned char pos) {} - virtual void UpdateDeck(DuelPlayer* dp, void* pdata) {} - virtual void StartDuel(DuelPlayer* dp) {} - virtual void HandResult(DuelPlayer* dp, unsigned char res) {} - virtual void TPResult(DuelPlayer* dp, unsigned char tp) {} - virtual void Process() {} - virtual int Analyze(char* msgbuffer, unsigned int len) { - return 0; - } - virtual void Surrender(DuelPlayer* dp) {} - virtual void GetResponse(DuelPlayer* dp, void* pdata, unsigned int len) {} - virtual void TimeConfirm(DuelPlayer* dp) {} - virtual void EndDuel() {}; + DuelMode() = default; + virtual ~DuelMode() = default; + virtual void Chat(DuelPlayer* dp, unsigned char* pdata, int len) = 0; + virtual void JoinGame(DuelPlayer* dp, unsigned char* pdata, bool is_creater) = 0; + virtual void LeaveGame(DuelPlayer* dp) = 0; + virtual void ToDuelist(DuelPlayer* dp) = 0; + virtual void ToObserver(DuelPlayer* dp) = 0; + virtual void PlayerReady(DuelPlayer* dp, bool is_ready) = 0; + virtual void PlayerKick(DuelPlayer* dp, unsigned char pos) = 0; + virtual void UpdateDeck(DuelPlayer* dp, unsigned char* pdata, int len) = 0; + virtual void StartDuel(DuelPlayer* dp) = 0; + virtual void HandResult(DuelPlayer* dp, unsigned char res) = 0; + virtual void TPResult(DuelPlayer* dp, unsigned char tp) = 0; + virtual void Process() = 0; + virtual int Analyze(unsigned char* msgbuffer, unsigned int len) = 0; + virtual void Surrender(DuelPlayer* dp) = 0; + virtual void GetResponse(DuelPlayer* dp, unsigned char* pdata, unsigned int len) = 0; + virtual void TimeConfirm(DuelPlayer* dp) = 0; + virtual void EndDuel() = 0; public: - event* etimer; - DuelPlayer* host_player; + event* etimer { nullptr }; + DuelPlayer* host_player{ nullptr }; HostInfo host_info; - unsigned long pduel; - wchar_t name[20]; - wchar_t pass[20]; + int duel_stage{}; + intptr_t pduel{}; + wchar_t name[20]{}; + wchar_t pass[20]{}; }; } @@ -158,44 +255,62 @@ class DuelMode { #define NETPLAYER_TYPE_PLAYER6 5 #define NETPLAYER_TYPE_OBSERVER 7 -#define CTOS_RESPONSE 0x1 -#define CTOS_UPDATE_DECK 0x2 -#define CTOS_HAND_RESULT 0x3 -#define CTOS_TP_RESULT 0x4 -#define CTOS_PLAYER_INFO 0x10 -#define CTOS_CREATE_GAME 0x11 -#define CTOS_JOIN_GAME 0x12 -#define CTOS_LEAVE_GAME 0x13 -#define CTOS_SURRENDER 0x14 -#define CTOS_TIME_CONFIRM 0x15 -#define CTOS_CHAT 0x16 -#define CTOS_HS_TODUELIST 0x20 -#define CTOS_HS_TOOBSERVER 0x21 -#define CTOS_HS_READY 0x22 -#define CTOS_HS_NOTREADY 0x23 -#define CTOS_HS_KICK 0x24 -#define CTOS_HS_START 0x25 - -#define STOC_GAME_MSG 0x1 -#define STOC_ERROR_MSG 0x2 -#define STOC_SELECT_HAND 0x3 -#define STOC_SELECT_TP 0x4 -#define STOC_HAND_RESULT 0x5 -#define STOC_TP_RESULT 0x6 -#define STOC_CHANGE_SIDE 0x7 -#define STOC_WAITING_SIDE 0x8 -#define STOC_CREATE_GAME 0x11 -#define STOC_JOIN_GAME 0x12 -#define STOC_TYPE_CHANGE 0x13 -#define STOC_LEAVE_GAME 0x14 -#define STOC_DUEL_START 0x15 -#define STOC_DUEL_END 0x16 -#define STOC_REPLAY 0x17 -#define STOC_TIME_LIMIT 0x18 -#define STOC_CHAT 0x19 -#define STOC_HS_PLAYER_ENTER 0x20 -#define STOC_HS_PLAYER_CHANGE 0x21 -#define STOC_HS_WATCH_CHANGE 0x22 +#define CTOS_RESPONSE 0x1 // byte array +#define CTOS_UPDATE_DECK 0x2 // CTOS_DeckData +#define CTOS_HAND_RESULT 0x3 // CTOS_HandResult +#define CTOS_TP_RESULT 0x4 // CTOS_TPResult +#define CTOS_PLAYER_INFO 0x10 // CTOS_PlayerInfo +#define CTOS_CREATE_GAME 0x11 // CTOS_CreateGame +#define CTOS_JOIN_GAME 0x12 // CTOS_JoinGame +#define CTOS_LEAVE_GAME 0x13 // no data +#define CTOS_SURRENDER 0x14 // no data +#define CTOS_TIME_CONFIRM 0x15 // no data +#define CTOS_CHAT 0x16 // uint16_t array +#define CTOS_EXTERNAL_ADDRESS 0x17 // CTOS_ExternalAddress +#define CTOS_HS_TODUELIST 0x20 // no data +#define CTOS_HS_TOOBSERVER 0x21 // no data +#define CTOS_HS_READY 0x22 // no data +#define CTOS_HS_NOTREADY 0x23 // no data +#define CTOS_HS_KICK 0x24 // CTOS_Kick +#define CTOS_HS_START 0x25 // no data +#define CTOS_REQUEST_FIELD 0x30 + +#define STOC_GAME_MSG 0x1 // byte array +#define STOC_ERROR_MSG 0x2 // STOC_ErrorMsg +#define STOC_SELECT_HAND 0x3 // no data +#define STOC_SELECT_TP 0x4 // no data +#define STOC_HAND_RESULT 0x5 // STOC_HandResult +#define STOC_TP_RESULT 0x6 // reserved +#define STOC_CHANGE_SIDE 0x7 // no data +#define STOC_WAITING_SIDE 0x8 // no data +#define STOC_DECK_COUNT 0x9 // int16_t[6] +#define STOC_CREATE_GAME 0x11 // reserved +#define STOC_JOIN_GAME 0x12 // STOC_JoinGame +#define STOC_TYPE_CHANGE 0x13 // STOC_TypeChange +#define STOC_LEAVE_GAME 0x14 // reserved +#define STOC_DUEL_START 0x15 // no data +#define STOC_DUEL_END 0x16 // no data +#define STOC_REPLAY 0x17 // ExtendedReplayHeader + byte array +#define STOC_TIME_LIMIT 0x18 // STOC_TimeLimit +#define STOC_CHAT 0x19 // uint16_t + uint16_t array +#define STOC_HS_PLAYER_ENTER 0x20 // STOC_HS_PlayerEnter +#define STOC_HS_PLAYER_CHANGE 0x21 // STOC_HS_PlayerChange +#define STOC_HS_WATCH_CHANGE 0x22 // STOC_HS_WatchChange +#define STOC_TEAMMATE_SURRENDER 0x23 // no data +#define STOC_FIELD_FINISH 0x30 + +// STOC_GAME_MSG header +#define MSG_WAITING 3 +#define MSG_START 4 +#define MSG_UPDATE_DATA 6 // flag=0: clear +#define MSG_UPDATE_CARD 7 // flag=QUERY_CODE, code=0: clear +#define MSG_REQUEST_DECK 8 +#define MSG_REFRESH_DECK 34 +#define MSG_CARD_SELECTED 80 +#define MSG_UNEQUIP 95 +#define MSG_BE_CHAIN_TARGET 121 +#define MSG_CREATE_RELATION 122 +#define MSG_RELEASE_RELATION 123 #define PLAYERCHANGE_OBSERVE 0x8 #define PLAYERCHANGE_READY 0x9 @@ -207,7 +322,24 @@ class DuelMode { #define ERRMSG_SIDEERROR 0x3 #define ERRMSG_VERERROR 0x4 +#define DECKERROR_LFLIST 0x1U +#define DECKERROR_OCGONLY 0x2U +#define DECKERROR_TCGONLY 0x3U +#define DECKERROR_UNKNOWNCARD 0x4U +#define DECKERROR_CARDCOUNT 0x5U +#define DECKERROR_MAINCOUNT 0x6U +#define DECKERROR_EXTRACOUNT 0x7U +#define DECKERROR_SIDECOUNT 0x8U +#define DECKERROR_NOTAVAIL 0x9U + #define MODE_SINGLE 0x0 #define MODE_MATCH 0x1 #define MODE_TAG 0x2 + +#define DUEL_STAGE_BEGIN 0 +#define DUEL_STAGE_FINGER 1 +#define DUEL_STAGE_FIRSTGO 2 +#define DUEL_STAGE_DUELING 3 +#define DUEL_STAGE_SIDING 4 +#define DUEL_STAGE_END 5 #endif //NETWORK_H diff --git a/gframe/premake4.lua b/gframe/premake4.lua deleted file mode 100644 index cd6615f535..0000000000 --- a/gframe/premake4.lua +++ /dev/null @@ -1,23 +0,0 @@ -include "lzma" - -project "ygopro" - kind "WindowedApp" - - files { "**.cpp", "**.cc", "**.c", "**.h" } - excludes "lzma/**" - includedirs { "../ocgcore" } - links { "ocgcore", "clzma", "Irrlicht", "freetype", "sqlite3", "lua" , "event"} - - configuration "windows" - files "ygopro.rc" - excludes "CGUIButton.cpp" - includedirs { "../irrlicht/include", "../freetype/include", "../event/include", "../sqlite3" } - links { "opengl32", "ws2_32", "winmm", "gdi32", "kernel32", "user32", "imm32" } - configuration {"windows", "not vs*"} - includedirs { "/mingw/include/irrlicht", "/mingw/include/freetype2" } - configuration "not vs*" - buildoptions { "-std=gnu++0x", "-fno-rtti" } - configuration "not windows" - includedirs { "/usr/include/lua", "/usr/include/lua5.2", "/usr/include/lua/5.2", "/usr/include/irrlicht", "/usr/include/freetype2" } - excludes { "COSOperator.*" } - links { "event_pthreads", "GL", "dl", "pthread" } diff --git a/gframe/premake5.lua b/gframe/premake5.lua new file mode 100644 index 0000000000..f4befd3fea --- /dev/null +++ b/gframe/premake5.lua @@ -0,0 +1,112 @@ +include "lzma/." +include "spmemvfs/." + +project "YGOPro" + kind "WindowedApp" + rtti "Off" + openmp "On" + + files { "*.cpp", "*.h" } + includedirs { "../ocgcore" } + links { "ocgcore", "clzma", "cspmemvfs", LUA_LIB_NAME, "sqlite3", "irrlicht", "freetype", "event" } + + if not BUILD_LUA then + libdirs { LUA_LIB_DIR } + end + + if BUILD_EVENT then + includedirs { "../event/include" } + else + includedirs { EVENT_INCLUDE_DIR } + libdirs { EVENT_LIB_DIR } + links { "event_pthreads" } + end + + if BUILD_IRRLICHT then + includedirs { "../irrlicht/include" } + else + includedirs { IRRLICHT_INCLUDE_DIR } + libdirs { IRRLICHT_LIB_DIR } + end + + if BUILD_FREETYPE then + includedirs { "../freetype/custom", "../freetype/include" } + else + includedirs { FREETYPE_INCLUDE_DIR } + libdirs { FREETYPE_LIB_DIR } + end + + if BUILD_SQLITE then + includedirs { "../sqlite3" } + else + includedirs { SQLITE_INCLUDE_DIR } + libdirs { SQLITE_LIB_DIR } + end + + if USE_AUDIO then + defines { "YGOPRO_USE_AUDIO" } + if AUDIO_LIB == "miniaudio" then + defines { "YGOPRO_USE_MINIAUDIO" } + includedirs { "../miniaudio" } + links { "miniaudio" } + if MINIAUDIO_SUPPORT_OPUS_VORBIS then + defines { "YGOPRO_MINIAUDIO_SUPPORT_OPUS_VORBIS" } + includedirs { "../miniaudio/extras/decoders/libopus", "../miniaudio/extras/decoders/libvorbis" } + if not MINIAUDIO_BUILD_OPUS_VORBIS then + links { "opusfile", "vorbisfile", "opus", "vorbis", "ogg" } + libdirs { OPUS_LIB_DIR, OPUSFILE_LIB_DIR, VORBIS_LIB_DIR, OGG_LIB_DIR } + end + end + end + if AUDIO_LIB == "irrklang" then + defines { "YGOPRO_USE_IRRKLANG" } + includedirs { IRRKLANG_INCLUDE_DIR } + if not IRRKLANG_PRO then + libdirs { IRRKLANG_LIB_DIR } + end + if IRRKLANG_PRO_BUILD_IKPMP3 then + links { "ikpmp3" } + end + end + end + + filter "system:windows" + entrypoint "mainCRTStartup" + defines { "_IRR_WCHAR_FILESYSTEM" } + files "ygopro.rc" + links { "ws2_32", "iphlpapi" } + if USE_AUDIO and AUDIO_LIB == "irrklang" then + links { "irrKlang" } + if IRRKLANG_PRO then + defines { "IRRKLANG_STATIC" } + filter { "system:windows", "not configurations:Debug" } + libdirs { IRRKLANG_PRO_RELEASE_LIB_DIR } + filter { "system:windows", "configurations:Debug" } + libdirs { IRRKLANG_PRO_DEBUG_LIB_DIR } + filter {} + end + end + filter "not action:vs*" + cppdialect "C++14" + + filter "system:macosx" + openmp "Off" + links { "OpenGL.framework", "Cocoa.framework", "IOKit.framework" } + defines { "GL_SILENCE_DEPRECATION" } + if MAC_ARM then + linkoptions { "-arch arm64" } + end + if MAC_INTEL then + linkoptions { "-arch x86_64" } + end + if USE_AUDIO and AUDIO_LIB == "irrklang" then + links { "irrklang" } + end + + filter "system:linux" + links { "GL", "X11", "Xxf86vm", "dl", "pthread" } + linkoptions { "-fopenmp" } + if USE_AUDIO and AUDIO_LIB == "irrklang" then + links { "IrrKlang" } + linkoptions{ IRRKLANG_LINK_RPATH } + end diff --git a/gframe/replay.cpp b/gframe/replay.cpp index 47a437a758..f46e83a8ff 100644 --- a/gframe/replay.cpp +++ b/gframe/replay.cpp @@ -1,225 +1,274 @@ +#include "config.h" #include "replay.h" -#include "../ocgcore/ocgapi.h" -#include "../ocgcore/card.h" -#include +#include "myfilesystem.h" #include "lzma/LzmaLib.h" namespace ygo { Replay::Replay() { - is_recording = false; - is_replaying = false; - replay_data = new unsigned char[0x20000]; - comp_data = new unsigned char[0x2000]; + replay_data = new unsigned char[MAX_REPLAY_SIZE]; + comp_data = new unsigned char[MAX_COMP_SIZE]; } Replay::~Replay() { delete[] replay_data; delete[] comp_data; } void Replay::BeginRecord() { -#ifdef _WIN32 - if(is_recording) - CloseHandle(recording_fp); - recording_fp = CreateFileW(L"./replay/_LastReplay.yrp", GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_FLAG_WRITE_THROUGH, NULL); - if(recording_fp == INVALID_HANDLE_VALUE) + if(!FileSystem::IsDirExists(L"./replay") && !FileSystem::MakeDir(L"./replay")) return; -#else if(is_recording) - fclose(fp); - fp = fopen("./replay/_LastReplay.yrp", "wb"); + std::fclose(fp); + fp = myfopen("./replay/_LastReplay.yrp", "wb"); if(!fp) return; -#endif - pdata = replay_data; + Reset(); is_recording = true; } -void Replay::WriteHeader(ReplayHeader& header) { +void Replay::WriteHeader(ExtendedReplayHeader& header) { pheader = header; -#ifdef _WIN32 - DWORD size; - WriteFile(recording_fp, &header, sizeof(header), &size, NULL); -#else - fwrite(&header, sizeof(header), 1, fp); - fflush(fp); -#endif -} -void Replay::WriteData(const void* data, unsigned int length, bool flush) { - if(!is_recording) - return; - memcpy(pdata, data, length); - pdata += length; -#ifdef _WIN32 - DWORD size; - WriteFile(recording_fp, data, length, &size, NULL); -#else - fwrite(data, length, 1, fp); - if(flush) - fflush(fp); -#endif + std::fwrite(&header, sizeof header, 1, fp); + std::fflush(fp); } -void Replay::WriteInt32(int data, bool flush) { +void Replay::WriteData(const void* data, size_t length, bool flush) { if(!is_recording) return; - *((int*)(pdata)) = data; - pdata += 4; -#ifdef _WIN32 - DWORD size; - WriteFile(recording_fp, &data, sizeof(int), &size, NULL); -#else - fwrite(&data, sizeof(int), 1, fp); - if(flush) - fflush(fp); -#endif -} -void Replay::WriteInt16(short data, bool flush) { - if(!is_recording) + if (replay_size + length > MAX_REPLAY_SIZE) return; - *((short*)(pdata)) = data; - pdata += 2; -#ifdef _WIN32 - DWORD size; - WriteFile(recording_fp, &data, sizeof(short), &size, NULL); -#else - fwrite(&data, sizeof(short), 1, fp); + std::memcpy(replay_data + replay_size, data, length); + replay_size += length; + std::fwrite(data, length, 1, fp); if(flush) - fflush(fp); -#endif + std::fflush(fp); } -void Replay::WriteInt8(char data, bool flush) { - if(!is_recording) - return; - *pdata = data; - pdata++; -#ifdef _WIN32 - DWORD size; - WriteFile(recording_fp, &data, sizeof(char), &size, NULL); -#else - fwrite(&data, sizeof(char), 1, fp); - if(flush) - fflush(fp); -#endif +void Replay::WriteInt32(int32_t data, bool flush) { + Write(data, flush); } void Replay::Flush() { if(!is_recording) return; -#ifdef _WIN32 -#else - fflush(fp); -#endif + std::fflush(fp); } void Replay::EndRecord() { if(!is_recording) return; -#ifdef _WIN32 - CloseHandle(recording_fp); -#else - fclose(fp); -#endif - pheader.datasize = pdata - replay_data; - pheader.flag |= REPLAY_COMPRESSED; + std::fclose(fp); + pheader.base.datasize = replay_size; + pheader.base.flag |= REPLAY_COMPRESSED; size_t propsize = 5; - comp_size = 0x1000; - LzmaCompress(comp_data, &comp_size, replay_data, pdata - replay_data, pheader.props, &propsize, 5, 1 << 24, 3, 0, 2, 32, 1); + comp_size = MAX_COMP_SIZE; + int ret = LzmaCompress(comp_data, &comp_size, replay_data, replay_size, pheader.base.props, &propsize, 5, 0x1U << 24, 3, 0, 2, 32, 1); + if (ret != SZ_OK) { + std::memcpy(comp_data, &ret, sizeof ret); + comp_size = sizeof ret; + } is_recording = false; } -void Replay::SaveReplay(const wchar_t* name) { - wchar_t fname[64]; - myswprintf(fname, L"./replay/%ls.yrp", name); -#ifdef WIN32 - fp = _wfopen(fname, L"wb"); -#else - char fname2[256]; - BufferIO::EncodeUTF8(fname, fname2); - fp = fopen(fname2, "wb"); -#endif - if(!fp) - return; - fwrite(&pheader, sizeof(pheader), 1, fp); - fwrite(comp_data, comp_size, 1, fp); - fclose(fp); +bool Replay::SaveReplay(const wchar_t* base_name) { + if(!FileSystem::IsDirExists(L"./replay") && !FileSystem::MakeDir(L"./replay")) + return false; + wchar_t filename[256]{}; + wchar_t path[256]{}; + BufferIO::CopyWideString(base_name, filename); + FileSystem::SafeFileName(filename); + if (myswprintf(path, L"./replay/%ls.yrp", filename) <= 0) + return false; + FILE* rfp = mywfopen(path, "wb"); + if(!rfp) + return false; + std::fwrite(&pheader, sizeof pheader, 1, rfp); + std::fwrite(comp_data, comp_size, 1, rfp); + std::fclose(rfp); + return true; } bool Replay::OpenReplay(const wchar_t* name) { - wchar_t fname[256]; - myswprintf(fname, L"./replay/%ls", name); -#ifdef WIN32 - fp = _wfopen(fname, L"rb"); -#else - char fname2[256]; - BufferIO::EncodeUTF8(fname, fname2); - fp = fopen(fname2, "rb"); -#endif - if(!fp) + FILE* rfp = mywfopen(name, "rb"); + if(!rfp) { + wchar_t fname[256]; + if (myswprintf(fname, L"./replay/%ls", name) <= 0) + return false; + rfp = mywfopen(fname, "rb"); + } + if(!rfp) + return false; + + Reset(); + bool correct_header = true; + if (std::fread(&pheader, sizeof pheader.base, 1, rfp) < 1) + correct_header = false; + else if (pheader.base.id != REPLAY_ID_YRP1 && pheader.base.id != REPLAY_ID_YRP2) + correct_header = false; + else if (pheader.base.version < 0x12d0u) + correct_header = false; + else if (pheader.base.version >= 0x1353u && !(pheader.base.flag & REPLAY_UNIFORM)) + correct_header = false; + if (!correct_header) { + std::fclose(rfp); return false; - fseek(fp, 0, SEEK_END); - comp_size = ftell(fp) - sizeof(pheader); - fseek(fp, 0, SEEK_SET); - fread(&pheader, sizeof(pheader), 1, fp); - if(pheader.flag & REPLAY_COMPRESSED) { - fread(comp_data, 0x1000, 1, fp); - fclose(fp); - replay_size = pheader.datasize; - if(LzmaUncompress(replay_data, &replay_size, comp_data, &comp_size, pheader.props, 5) != SZ_OK) + } + if (pheader.base.id == REPLAY_ID_YRP2 && std::fread(reinterpret_cast(&pheader) + sizeof pheader.base, sizeof pheader - sizeof pheader.base, 1, rfp) < 1) { + std::fclose(rfp); + return false; + } + if(pheader.base.flag & REPLAY_COMPRESSED) { + comp_size = std::fread(comp_data, 1, MAX_COMP_SIZE, rfp); + std::fclose(rfp); + if (pheader.base.datasize > MAX_REPLAY_SIZE) + return false; + replay_size = pheader.base.datasize; + if (LzmaUncompress(replay_data, &replay_size, comp_data, &comp_size, pheader.base.props, 5) != SZ_OK) return false; + if (replay_size != pheader.base.datasize) { + replay_size = 0; + return false; + } } else { - fread(replay_data, 0x20000, 1, fp); - fclose(fp); - replay_size = comp_size; + replay_size = std::fread(replay_data, 1, MAX_REPLAY_SIZE, rfp); + std::fclose(rfp); + comp_size = 0; } - pdata = replay_data; is_replaying = true; + can_read = true; + if (!ReadInfo()) { + Reset(); + return false; + } + info_offset = data_position; + data_position = 0; return true; } -bool Replay::CheckReplay(const wchar_t* name) { +bool Replay::DeleteReplay(const wchar_t* name) { + if (std::wcschr(name, L'/') || std::wcschr(name, L'\\')) + return false; wchar_t fname[256]; - myswprintf(fname, L"./replay/%ls", name); -#ifdef WIN32 - FILE* rfp = _wfopen(fname, L"rb"); -#else - char fname2[256]; - BufferIO::EncodeUTF8(fname, fname2); - FILE* rfp = fopen(fname2, "rb"); -#endif - if(!rfp) + if(myswprintf(fname, L"./replay/%ls", name) <= 0) return false; - ReplayHeader rheader; - fread(&rheader, sizeof(ReplayHeader), 1, rfp); - fclose(rfp); - return rheader.id == 0x31707279 && rheader.version >= 0x12d0; + return FileSystem::RemoveFile(fname); } -bool Replay::ReadNextResponse(unsigned char resp[64]) { - if(pdata - replay_data >= (int)replay_size) +bool Replay::RenameReplay(const wchar_t* oldname, const wchar_t* newname) { + wchar_t old_path[256]; + wchar_t new_path[256]; + if (std::wcschr(oldname, L'/') || std::wcschr(oldname, L'\\')) + return false; + if (std::wcschr(newname, L'/') || std::wcschr(newname, L'\\')) + return false; + if (myswprintf(old_path, L"./replay/%ls", oldname) <= 0) return false; - int len = *pdata++; - if(len > 64) + if (myswprintf(new_path, L"./replay/%ls", newname) <= 0) + return false; + char oldfilefn[1024]; + char newfilefn[1024]; + BufferIO::EncodeUTF8(old_path, oldfilefn); + BufferIO::EncodeUTF8(new_path, newfilefn); + int result = std::rename(oldfilefn, newfilefn); + return result == 0; +} +bool Replay::ReadNextResponse(unsigned char resp[]) { + unsigned char len{}; + if (!ReadData(&len, sizeof len)) + return false; + if (!ReadData(resp, len)) return false; - memcpy(resp, pdata, len); - pdata += len; return true; } -void Replay::ReadData(void* data, unsigned int length) { - if(!is_replaying) - return; - memcpy(data, pdata, length); - pdata += length; -} -int Replay::ReadInt32() { - if(!is_replaying) - return -1; - int ret = *((int*)pdata); - pdata += 4; - return ret; -} -short Replay::ReadInt16() { - if(!is_replaying) - return -1; - short ret = *((short*)pdata); - pdata += 4; - return ret; -} -char Replay::ReadInt8() { - if(!is_replaying) - return -1; - return *pdata++; +bool Replay::ReadName(wchar_t* data) { + uint16_t buffer[20]{}; + if (!ReadData(buffer, sizeof buffer)) { + return false; + } + BufferIO::CopyWStr(buffer, data, 20); + return true; +} +void Replay::ReadHeader(ExtendedReplayHeader& header) { + header = pheader; +} +bool Replay::ReadData(void* data, size_t length) { + if (!is_replaying || !can_read) + return false; + if (data_position + length > replay_size) { + can_read = false; + return false; + } + if (length) + std::memcpy(data, &replay_data[data_position], length); + data_position += length; + return true; +} +int32_t Replay::ReadInt32() { + return Read(); +} +void Replay::Rewind() { + data_position = 0; + can_read = true; +} +void Replay::Reset() { + is_recording = false; + is_replaying = false; + can_read = false; + replay_size = 0; + comp_size = 0; + data_position = 0; + info_offset = 0; + players.clear(); + params = { 0 }; + decks.clear(); + script_name.clear(); +} +void Replay::SkipInfo(){ + if (data_position == 0) + data_position += info_offset; +} +bool Replay::IsReplaying() const { + return is_replaying; +} +bool Replay::ReadInfo() { + int player_count = (pheader.base.flag & REPLAY_TAG) ? 4 : 2; + for (int i = 0; i < player_count; ++i) { + wchar_t name[20]{}; + if (!ReadName(name)) + return false; + players.push_back(name); + } + if (!ReadData(¶ms, sizeof params)) + return false; + bool is_tag1 = pheader.base.flag & REPLAY_TAG; + bool is_tag2 = params.duel_flag & DUEL_TAG_MODE; + if (is_tag1 != is_tag2) + return false; + if (pheader.base.flag & REPLAY_SINGLE_MODE) { + uint16_t slen = Read(); + char filename[256]{}; + if (slen == 0 || slen > sizeof(filename) - 1) + return false; + if (!ReadData(filename, slen)) + return false; + filename[slen] = 0; + if (std::strncmp(filename, "./single/", 9)) + return false; + script_name = filename + 9; + if (script_name.find_first_of(R"(/\)") != std::string::npos) + return false; + } + else { + for (int p = 0; p < player_count; ++p) { + DeckArray deck; + uint32_t main = Read(); + if (main > MAINC_MAX) + return false; + if (main) + deck.main.resize(main); + if (!ReadData(deck.main.data(), main * sizeof(uint32_t))) + return false; + uint32_t extra = Read(); + if (extra > MAINC_MAX) + return false; + if (extra) + deck.extra.resize(extra); + if (!ReadData(deck.extra.data(), extra * sizeof(uint32_t))) + return false; + decks.push_back(deck); + } + } + return true; } } diff --git a/gframe/replay.h b/gframe/replay.h index a702f6ff05..726f1b78d2 100644 --- a/gframe/replay.h +++ b/gframe/replay.h @@ -1,59 +1,123 @@ #ifndef REPLAY_H #define REPLAY_H -#include "config.h" -#include +#include +#include +#include +#include "../ocgcore/ocgapi.h" +#include "deck_manager.h" namespace ygo { +// replay flag #define REPLAY_COMPRESSED 0x1 #define REPLAY_TAG 0x2 #define REPLAY_DECODED 0x4 +#define REPLAY_SINGLE_MODE 0x8 +#define REPLAY_UNIFORM 0x10 + +#define REPLAY_ID_YRP1 0x31707279 +#define REPLAY_ID_YRP2 0x32707279 + +// max size +constexpr int MAX_REPLAY_SIZE = 0x80000; +constexpr int MAX_COMP_SIZE = UINT16_MAX + 1; struct ReplayHeader { - unsigned int id; - unsigned int version; - unsigned int flag; - unsigned int seed; - unsigned int datasize; - unsigned int hash; - unsigned char props[8]; + uint32_t id{}; + uint32_t version{}; + uint32_t flag{}; + uint32_t seed{}; + uint32_t datasize{}; + uint32_t start_time{}; + uint8_t props[8]{}; +}; + +struct ExtendedReplayHeader { + ReplayHeader base; + uint32_t seed_sequence[SEED_COUNT]{}; + uint32_t header_version{ 1 }; + uint32_t value1{}; + uint32_t value2{}; + uint32_t value3{}; +}; + +struct DuelParameters { + int32_t start_lp{}; + int32_t start_hand{}; + int32_t draw_count{}; + uint32_t duel_flag{}; }; class Replay { public: Replay(); ~Replay(); + + // record void BeginRecord(); - void WriteHeader(ReplayHeader& header); - void WriteData(const void* data, unsigned int length, bool flush = true); - void WriteInt32(int data, bool flush = true); - void WriteInt16(short data, bool flush = true); - void WriteInt8(char data, bool flush = true); + void WriteHeader(ExtendedReplayHeader& header); + void WriteData(const void* data, size_t length, bool flush = true); + template + void Write(T data, bool flush = true) { + WriteData(&data, sizeof(T), flush); + } + void WriteInt32(int32_t data, bool flush = true); void Flush(); void EndRecord(); - void SaveReplay(const wchar_t* name); + bool SaveReplay(const wchar_t* base_name); + + // play + static bool DeleteReplay(const wchar_t* name); + static bool RenameReplay(const wchar_t* oldname, const wchar_t* newname); + static size_t GetDeckPlayer(size_t deck_index) { + switch (deck_index) { + case 2: + return 3; + case 3: + return 2; + default: + return deck_index; + } + } bool OpenReplay(const wchar_t* name); - static bool CheckReplay(const wchar_t* name); - bool ReadNextResponse(unsigned char resp[64]); - void ReadHeader(ReplayHeader& header); - void ReadData(void* data, unsigned int length); - int ReadInt32(); - short ReadInt16(); - char ReadInt8(); - - FILE* fp; - ReplayHeader pheader; -#ifdef _WIN32 - HANDLE recording_fp; -#endif - unsigned char* replay_data; + bool ReadNextResponse(unsigned char resp[]); + bool ReadName(wchar_t* data); + void ReadHeader(ExtendedReplayHeader& header); + bool ReadData(void* data, size_t length); + template + T Read() { + T ret{}; + ReadData(&ret, sizeof(T)); + return ret; + } + int32_t ReadInt32(); + void Rewind(); + void Reset(); + void SkipInfo(); + bool IsReplaying() const; + + FILE* fp{ nullptr }; + ExtendedReplayHeader pheader; unsigned char* comp_data; - unsigned char* pdata; - size_t replay_size; - size_t comp_size; - bool is_recording; - bool is_replaying; + size_t comp_size{}; + + std::vector players; // 80 or 160 bytes + DuelParameters params; // 16 bytes + + std::vector decks; // 4 bytes, main deck, 4 bytes, extra deck + std::string script_name; // 2 bytes, script name (max: 256 bytes) + +private: + bool ReadInfo(); + + unsigned char* replay_data; + size_t replay_size{}; + size_t data_position{}; + size_t info_offset{}; + bool is_recording{}; + bool is_replaying{}; + bool can_read{}; }; } diff --git a/gframe/replay_mode.cpp b/gframe/replay_mode.cpp index d0fdadbd77..ef81592dd0 100644 --- a/gframe/replay_mode.cpp +++ b/gframe/replay_mode.cpp @@ -1,26 +1,30 @@ #include "replay_mode.h" #include "duelclient.h" #include "game.h" -#include "../ocgcore/duel.h" -#include "../ocgcore/field.h" -#include "../ocgcore/mtrandom.h" +#include "data_manager.h" +#include +#include namespace ygo { -long ReplayMode::pduel = 0; +intptr_t ReplayMode::pduel = 0; Replay ReplayMode::cur_replay; bool ReplayMode::is_continuing = true; bool ReplayMode::is_closing = false; bool ReplayMode::is_pausing = false; bool ReplayMode::is_paused = false; bool ReplayMode::is_swaping = false; +bool ReplayMode::is_restarting = false; bool ReplayMode::exit_pending = false; int ReplayMode::skip_turn = 0; -wchar_t ReplayMode::event_string[256]; +int ReplayMode::current_step = 0; +int ReplayMode::skip_step = 0; bool ReplayMode::StartReplay(int skipturn) { skip_turn = skipturn; - Thread::NewThread(ReplayThread, 0); + if(skip_turn < 0) + skip_turn = 0; + std::thread(ReplayThread).detach(); return true; } void ReplayMode::StopReplay(bool is_exiting) { @@ -46,169 +50,268 @@ void ReplayMode::Pause(bool is_pause, bool is_step) { } } bool ReplayMode::ReadReplayResponse() { - unsigned char resp[64]; + unsigned char resp[SIZE_RETURN_VALUE]; bool result = cur_replay.ReadNextResponse(resp); if(result) set_responseb(pduel, resp); return result; } -int ReplayMode::ReplayThread(void* param) { - ReplayHeader rh = cur_replay.pheader; +int ReplayMode::ReplayThread() { + const auto& rh = cur_replay.pheader.base; + mainGame->dInfo.Clear(); mainGame->dInfo.isFirst = true; - mtrandom rnd; - int seed = rh.seed; - rnd.reset(seed); - if(rh.flag & REPLAY_TAG) { - cur_replay.ReadData(mainGame->dInfo.hostname, 40); - cur_replay.ReadData(mainGame->dInfo.hostname_tag, 40); - cur_replay.ReadData(mainGame->dInfo.clientname_tag, 40); - cur_replay.ReadData(mainGame->dInfo.clientname, 40); - mainGame->dInfo.isTag = true; - } else { - cur_replay.ReadData(mainGame->dInfo.hostname, 40); - cur_replay.ReadData(mainGame->dInfo.clientname, 40); - } - set_card_reader((card_reader)DataManager::CardReader); - set_message_handler((message_handler)MessageHandler); - pduel = create_duel(rnd.rand()); - int start_lp = cur_replay.ReadInt32(); - int start_hand = cur_replay.ReadInt32(); - int draw_count = cur_replay.ReadInt32(); - int opt = cur_replay.ReadInt32(); - set_player_info(pduel, 0, start_lp, start_hand, draw_count); - set_player_info(pduel, 1, start_lp, start_hand, draw_count); - mainGame->dInfo.lp[0] = start_lp; - mainGame->dInfo.lp[1] = start_lp; - myswprintf(mainGame->dInfo.strLP[0], L"%d", mainGame->dInfo.lp[0]); - myswprintf(mainGame->dInfo.strLP[1], L"%d", mainGame->dInfo.lp[1]); - mainGame->dInfo.turn = 0; - mainGame->dInfo.strTurn[0] = 0; - if(!(opt & DUEL_TAG_MODE)) { - int main = cur_replay.ReadInt32(); - for(int i = 0; i < main; ++i) - new_card(pduel, cur_replay.ReadInt32(), 0, 0, LOCATION_DECK, 0, 0); - int extra = cur_replay.ReadInt32(); - for(int i = 0; i < extra; ++i) - new_card(pduel, cur_replay.ReadInt32(), 0, 0, LOCATION_EXTRA, 0, 0); - mainGame->dField.Initial(0, main, extra); - main = cur_replay.ReadInt32(); - for(int i = 0; i < main; ++i) - new_card(pduel, cur_replay.ReadInt32(), 1, 1, LOCATION_DECK, 0, 0); - extra = cur_replay.ReadInt32(); - for(int i = 0; i < extra; ++i) - new_card(pduel, cur_replay.ReadInt32(), 1, 1, LOCATION_EXTRA, 0, 0); - mainGame->dField.Initial(1, main, extra); - } else { - int main = cur_replay.ReadInt32(); - for(int i = 0; i < main; ++i) - new_card(pduel, cur_replay.ReadInt32(), 0, 0, LOCATION_DECK, 0, 0); - int extra = cur_replay.ReadInt32(); - for(int i = 0; i < extra; ++i) - new_card(pduel, cur_replay.ReadInt32(), 0, 0, LOCATION_EXTRA, 0, 0); - mainGame->dField.Initial(0, main, extra); - main = cur_replay.ReadInt32(); - for(int i = 0; i < main; ++i) - new_tag_card(pduel, cur_replay.ReadInt32(), 0, LOCATION_DECK); - extra = cur_replay.ReadInt32(); - for(int i = 0; i < extra; ++i) - new_tag_card(pduel, cur_replay.ReadInt32(), 0, LOCATION_EXTRA); - main = cur_replay.ReadInt32(); - for(int i = 0; i < main; ++i) - new_card(pduel, cur_replay.ReadInt32(), 1, 1, LOCATION_DECK, 0, 0); - extra = cur_replay.ReadInt32(); - for(int i = 0; i < extra; ++i) - new_card(pduel, cur_replay.ReadInt32(), 1, 1, LOCATION_EXTRA, 0, 0); - mainGame->dField.Initial(1, main, extra); - main = cur_replay.ReadInt32(); - for(int i = 0; i < main; ++i) - new_tag_card(pduel, cur_replay.ReadInt32(), 1, LOCATION_DECK); - extra = cur_replay.ReadInt32(); - for(int i = 0; i < extra; ++i) - new_tag_card(pduel, cur_replay.ReadInt32(), 1, LOCATION_EXTRA); + mainGame->dInfo.isTag = !!(rh.flag & REPLAY_TAG); + mainGame->dInfo.isSingleMode = !!(rh.flag & REPLAY_SINGLE_MODE); + mainGame->dInfo.tag_player[0] = false; + mainGame->dInfo.tag_player[1] = false; + set_script_reader(DataManager::ScriptReaderEx); + set_card_reader(DataManager::CardReader); + set_message_handler(ReplayMode::MessageHandler); + if(!StartDuel()) { + EndDuel(); + return 0; } - start_duel(pduel, opt); - ReplayRefreshDeck(0); - ReplayRefreshDeck(1); - ReplayRefreshExtra(0); - ReplayRefreshExtra(1); mainGame->dInfo.isStarted = true; + mainGame->dInfo.isFinished = false; mainGame->dInfo.isReplay = true; - char engineBuffer[0x1000]; + mainGame->dInfo.isReplaySkiping = (skip_turn > 0); + std::vector engineBuffer; + engineBuffer.resize(SIZE_MESSAGE_BUFFER); is_continuing = true; + skip_step = 0; + if(mainGame->dInfo.isSingleMode) { + int len = get_message(pduel, engineBuffer.data()); + if (len > 0) + is_continuing = ReplayAnalyze(engineBuffer.data(), len); + } else { + ReplayRefreshDeck(0); + ReplayRefreshDeck(1); + ReplayRefreshExtra(0); + ReplayRefreshExtra(1); + } exit_pending = false; - if(skip_turn < 0) - skip_turn = 0; - if(skip_turn) { - mainGame->dInfo.isReplaySkiping = true; - mainGame->gMutex.Lock(); - } else - mainGame->dInfo.isReplaySkiping = false; - int len = 0; + current_step = 0; + if(mainGame->dInfo.isReplaySkiping) + mainGame->gMutex.lock(); while (is_continuing && !exit_pending) { - int result = process(pduel); - len = result & 0xffff; - /*int flag = result >> 16;*/ + unsigned int result = process(pduel); + int len = result & PROCESSOR_BUFFER_LEN; if (len > 0) { - get_message(pduel, (byte*)engineBuffer); - is_continuing = ReplayAnalyze(engineBuffer, len); + if (len > (int)engineBuffer.size()) + engineBuffer.resize(len); + get_message(pduel, engineBuffer.data()); + is_continuing = ReplayAnalyze(engineBuffer.data(), len); + if(is_restarting) { + mainGame->gMutex.lock(); + is_restarting = false; + mainGame->dInfo.isReplaySkiping = true; + Restart(false); + int step = current_step - 1; + if(step < 0) + step = 0; + if(mainGame->dInfo.isSingleMode) { + is_continuing = true; + skip_step = 0; + int len = get_message(pduel, engineBuffer.data()); + if (len > 0) { + is_continuing = ReplayAnalyze(engineBuffer.data(), len); + } + } else { + ReplayRefreshDeck(0); + ReplayRefreshDeck(1); + ReplayRefreshExtra(0); + ReplayRefreshExtra(1); + } + if(step == 0) { + Pause(true, false); + mainGame->dInfo.isStarted = true; + mainGame->dInfo.isFinished = false; + mainGame->dInfo.isReplaySkiping = false; + mainGame->dField.RefreshAllCards(); + mainGame->gMutex.unlock(); + } + skip_step = step; + current_step = 0; + } } } if(mainGame->dInfo.isReplaySkiping) { mainGame->dInfo.isReplaySkiping = false; mainGame->dField.RefreshAllCards(); - mainGame->gMutex.Unlock(); + mainGame->gMutex.unlock(); + } + EndDuel(); + pduel = 0; + is_continuing = true; + is_closing = false; + is_pausing = false; + is_paused = false; + is_swaping = false; + is_restarting = false; + exit_pending = false; + skip_turn = 0; + current_step = 0; + skip_step = 0; + return 0; +} +bool ReplayMode::StartDuel() { + const auto& rh = cur_replay.pheader.base; + cur_replay.SkipInfo(); + if(rh.flag & REPLAY_TAG) { + BufferIO::CopyWideString(cur_replay.players[0].c_str(), mainGame->dInfo.hostname); + BufferIO::CopyWideString(cur_replay.players[1].c_str(), mainGame->dInfo.hostname_tag); + BufferIO::CopyWideString(cur_replay.players[2].c_str(), mainGame->dInfo.clientname_tag); + BufferIO::CopyWideString(cur_replay.players[3].c_str(), mainGame->dInfo.clientname); + } else { + BufferIO::CopyWideString(cur_replay.players[0].c_str(), mainGame->dInfo.hostname); + BufferIO::CopyWideString(cur_replay.players[1].c_str(), mainGame->dInfo.clientname); } + if(rh.id == REPLAY_ID_YRP1) { + std::mt19937 rnd(rh.seed); + pduel = create_duel(rnd()); + } else { + pduel = create_duel_v2(cur_replay.pheader.seed_sequence); + } + mainGame->dInfo.duel_rule = cur_replay.params.duel_flag >> 16; + set_player_info(pduel, 0, cur_replay.params.start_lp, cur_replay.params.start_hand, cur_replay.params.draw_count); + set_player_info(pduel, 1, cur_replay.params.start_lp, cur_replay.params.start_hand, cur_replay.params.draw_count); + mainGame->dInfo.lp[0] = cur_replay.params.start_lp; + mainGame->dInfo.lp[1] = cur_replay.params.start_lp; + mainGame->dInfo.start_lp = cur_replay.params.start_lp; + myswprintf(mainGame->dInfo.strLP[0], L"%d", mainGame->dInfo.lp[0]); + myswprintf(mainGame->dInfo.strLP[1], L"%d", mainGame->dInfo.lp[1]); + mainGame->dInfo.turn = 0; + if(!(rh.flag & REPLAY_SINGLE_MODE)) { + if(!(rh.flag & REPLAY_TAG)) { + for (int i = 0; i < 2; ++i) { + for (const auto& code : cur_replay.decks[i].main) + new_card(pduel, code, i, i, LOCATION_DECK, 0, POS_FACEDOWN_DEFENSE); + for (const auto& code : cur_replay.decks[i].extra) + new_card(pduel, code, i, i, LOCATION_EXTRA, 0, POS_FACEDOWN_DEFENSE); + mainGame->dField.Initial(mainGame->LocalPlayer(i), cur_replay.decks[i].main.size(), cur_replay.decks[i].extra.size()); + } + } else { + for (const auto& code : cur_replay.decks[0].main) + new_card(pduel, code, 0, 0, LOCATION_DECK, 0, POS_FACEDOWN_DEFENSE); + for (const auto& code : cur_replay.decks[0].extra) + new_card(pduel, code, 0, 0, LOCATION_EXTRA, 0, POS_FACEDOWN_DEFENSE); + mainGame->dField.Initial(mainGame->LocalPlayer(0), cur_replay.decks[0].main.size(), cur_replay.decks[0].extra.size()); + for (const auto& code : cur_replay.decks[1].main) + new_tag_card(pduel, code, 0, LOCATION_DECK); + for (const auto& code : cur_replay.decks[1].extra) + new_tag_card(pduel, code, 0, LOCATION_EXTRA); + for (const auto& code : cur_replay.decks[2].main) + new_card(pduel, code, 1, 1, LOCATION_DECK, 0, POS_FACEDOWN_DEFENSE); + for (const auto& code : cur_replay.decks[2].extra) + new_card(pduel, code, 1, 1, LOCATION_EXTRA, 0, POS_FACEDOWN_DEFENSE); + mainGame->dField.Initial(mainGame->LocalPlayer(1), cur_replay.decks[2].main.size(), cur_replay.decks[2].extra.size()); + for (const auto& code : cur_replay.decks[3].main) + new_tag_card(pduel, code, 1, LOCATION_DECK); + for (const auto& code : cur_replay.decks[3].extra) + new_tag_card(pduel, code, 1, LOCATION_EXTRA); + } + } else { + char filename[256]{}; + mysnprintf(filename, "./single/%s", cur_replay.script_name.c_str()); + if(!preload_script(pduel, filename)) { + return false; + } + } + start_duel(pduel, cur_replay.params.duel_flag); + return true; +} +void ReplayMode::EndDuel() { end_duel(pduel); if(!is_closing) { mainGame->actionSignal.Reset(); - mainGame->gMutex.Lock(); + mainGame->gMutex.lock(); mainGame->stMessage->setText(dataManager.GetSysString(1501)); - if(mainGame->wCardSelect->isVisible()) - mainGame->HideElement(mainGame->wCardSelect); + mainGame->HideElement(mainGame->wCardSelect); mainGame->PopupElement(mainGame->wMessage); - mainGame->gMutex.Unlock(); + mainGame->gMutex.unlock(); mainGame->actionSignal.Wait(); - mainGame->gMutex.Lock(); + mainGame->gMutex.lock(); mainGame->dInfo.isStarted = false; + mainGame->dInfo.isInDuel = false; + mainGame->dInfo.isFinished = true; mainGame->dInfo.isReplay = false; - mainGame->gMutex.Unlock(); + mainGame->dInfo.isSingleMode = false; + mainGame->gMutex.unlock(); mainGame->closeDoneSignal.Reset(); mainGame->closeSignal.Set(); mainGame->closeDoneSignal.Wait(); - mainGame->gMutex.Lock(); + mainGame->gMutex.lock(); mainGame->ShowElement(mainGame->wReplay); + mainGame->stTip->setVisible(false); mainGame->device->setEventReceiver(&mainGame->menuHandler); - mainGame->gMutex.Unlock(); + mainGame->gMutex.unlock(); + if(exit_on_return) + mainGame->device->closeDevice(); } - return 0; } -bool ReplayMode::ReplayAnalyze(char* msg, unsigned int len) { - char* offset, *pbuf = msg; +void ReplayMode::Restart(bool refresh) { + end_duel(pduel); + mainGame->dInfo.isStarted = false; + mainGame->dInfo.isInDuel = false; + mainGame->dInfo.isFinished = true; + mainGame->dField.Clear(); + //mainGame->device->setEventReceiver(&mainGame->dField); + cur_replay.Rewind(); + mainGame->dInfo.tag_player[0] = false; + mainGame->dInfo.tag_player[1] = false; + if(!StartDuel()) { + EndDuel(); + } + if(refresh) { + mainGame->dField.RefreshAllCards(); + mainGame->dInfo.isStarted = true; + mainGame->dInfo.isFinished = false; + } + if (mainGame->dInfo.isReplaySwapped){ + std::swap(mainGame->dInfo.lp[0], mainGame->dInfo.lp[1]); + std::swap(mainGame->dInfo.strLP[0], mainGame->dInfo.strLP[1]); + std::swap(mainGame->dInfo.hostname, mainGame->dInfo.clientname); + std::swap(mainGame->dInfo.hostname_tag, mainGame->dInfo.clientname_tag); + } + skip_turn = 0; +} +void ReplayMode::Undo() { + if(skip_step > 0 || current_step == 0) + return; + is_restarting = true; + Pause(false, false); +} +bool ReplayMode::ReplayAnalyze(unsigned char* msg, unsigned int len) { + unsigned char* pbuf = msg; int player, count; - bool pauseable; + is_restarting = false; while (pbuf - msg < (int)len) { if(is_closing) return false; + if(is_restarting) { + //is_restarting = false; + return true; + } if(is_swaping) { - mainGame->gMutex.Lock(); + mainGame->gMutex.lock(); mainGame->dField.ReplaySwap(); - mainGame->gMutex.Unlock(); + mainGame->gMutex.unlock(); is_swaping = false; } - offset = pbuf; - pauseable = true; - mainGame->dInfo.curMsg = BufferIO::ReadUInt8(pbuf); + auto offset = pbuf; + bool pauseable = true; + mainGame->dInfo.curMsg = BufferIO::Read(pbuf); switch (mainGame->dInfo.curMsg) { case MSG_RETRY: { if(mainGame->dInfo.isReplaySkiping) { mainGame->dInfo.isReplaySkiping = false; mainGame->dField.RefreshAllCards(); - mainGame->gMutex.Unlock(); + mainGame->gMutex.unlock(); } - mainGame->gMutex.Lock(); + mainGame->gMutex.lock(); mainGame->stMessage->setText(L"Error occurs."); mainGame->PopupElement(mainGame->wMessage); - mainGame->gMutex.Unlock(); + mainGame->gMutex.unlock(); mainGame->actionSignal.Reset(); mainGame->actionSignal.Wait(); return false; @@ -222,124 +325,149 @@ bool ReplayMode::ReplayAnalyze(char* msg, unsigned int len) { if(mainGame->dInfo.isReplaySkiping) { mainGame->dInfo.isReplaySkiping = false; mainGame->dField.RefreshAllCards(); - mainGame->gMutex.Unlock(); + mainGame->gMutex.unlock(); } pbuf += 2; DuelClient::ClientAnalyze(offset, pbuf - offset); return false; } case MSG_SELECT_BATTLECMD: { - player = BufferIO::ReadInt8(pbuf); - count = BufferIO::ReadInt8(pbuf); + player = BufferIO::Read(pbuf); + count = BufferIO::Read(pbuf); pbuf += count * 11; - count = BufferIO::ReadInt8(pbuf); + count = BufferIO::Read(pbuf); pbuf += count * 8 + 2; ReplayRefresh(); return ReadReplayResponse(); } case MSG_SELECT_IDLECMD: { - player = BufferIO::ReadInt8(pbuf); - count = BufferIO::ReadInt8(pbuf); + player = BufferIO::Read(pbuf); + count = BufferIO::Read(pbuf); pbuf += count * 7; - count = BufferIO::ReadInt8(pbuf); + count = BufferIO::Read(pbuf); pbuf += count * 7; - count = BufferIO::ReadInt8(pbuf); + count = BufferIO::Read(pbuf); pbuf += count * 7; - count = BufferIO::ReadInt8(pbuf); + count = BufferIO::Read(pbuf); pbuf += count * 7; - count = BufferIO::ReadInt8(pbuf); + count = BufferIO::Read(pbuf); pbuf += count * 7; - count = BufferIO::ReadInt8(pbuf); + count = BufferIO::Read(pbuf); pbuf += count * 11 + 3; ReplayRefresh(); return ReadReplayResponse(); } case MSG_SELECT_EFFECTYN: { - player = BufferIO::ReadInt8(pbuf); - pbuf += 8; + player = BufferIO::Read(pbuf); + pbuf += 12; return ReadReplayResponse(); } case MSG_SELECT_YESNO: { - player = BufferIO::ReadInt8(pbuf); + player = BufferIO::Read(pbuf); pbuf += 4; return ReadReplayResponse(); } case MSG_SELECT_OPTION: { - player = BufferIO::ReadInt8(pbuf); - count = BufferIO::ReadInt8(pbuf); + player = BufferIO::Read(pbuf); + count = BufferIO::Read(pbuf); pbuf += count * 4; return ReadReplayResponse(); } case MSG_SELECT_CARD: case MSG_SELECT_TRIBUTE: { - player = BufferIO::ReadInt8(pbuf); + player = BufferIO::Read(pbuf); pbuf += 3; - count = BufferIO::ReadInt8(pbuf); + count = BufferIO::Read(pbuf); + pbuf += count * 8; + return ReadReplayResponse(); + } + case MSG_SELECT_UNSELECT_CARD: { + player = BufferIO::Read(pbuf); + pbuf += 4; + count = BufferIO::Read(pbuf); + pbuf += count * 8; + count = BufferIO::Read(pbuf); pbuf += count * 8; return ReadReplayResponse(); } case MSG_SELECT_CHAIN: { - player = BufferIO::ReadInt8(pbuf); - count = BufferIO::ReadInt8(pbuf); - pbuf += 10 + count * 12; + player = BufferIO::Read(pbuf); + count = BufferIO::Read(pbuf); + pbuf += 9 + count * 14; return ReadReplayResponse(); } case MSG_SELECT_PLACE: case MSG_SELECT_DISFIELD: { - player = BufferIO::ReadInt8(pbuf); + player = BufferIO::Read(pbuf); pbuf += 5; return ReadReplayResponse(); } case MSG_SELECT_POSITION: { - player = BufferIO::ReadInt8(pbuf); + player = BufferIO::Read(pbuf); pbuf += 5; return ReadReplayResponse(); } case MSG_SELECT_COUNTER: { - player = BufferIO::ReadInt8(pbuf); - pbuf += 3; - count = BufferIO::ReadInt8(pbuf); - pbuf += count * 8; + player = BufferIO::Read(pbuf); + pbuf += 4; + count = BufferIO::Read(pbuf); + pbuf += count * 9; return ReadReplayResponse(); } case MSG_SELECT_SUM: { pbuf++; - player = BufferIO::ReadInt8(pbuf); + player = BufferIO::Read(pbuf); pbuf += 6; - count = BufferIO::ReadInt8(pbuf); + count = BufferIO::Read(pbuf); + pbuf += count * 11; + count = BufferIO::Read(pbuf); pbuf += count * 11; return ReadReplayResponse(); } - case MSG_SORT_CARD: - case MSG_SORT_CHAIN: { - player = BufferIO::ReadInt8(pbuf); - count = BufferIO::ReadInt8(pbuf); + case MSG_SORT_CARD: { + player = BufferIO::Read(pbuf); + count = BufferIO::Read(pbuf); pbuf += count * 7; return ReadReplayResponse(); } case MSG_CONFIRM_DECKTOP: { - player = BufferIO::ReadInt8(pbuf); - count = BufferIO::ReadInt8(pbuf); + player = BufferIO::Read(pbuf); + count = BufferIO::Read(pbuf); + pbuf += count * 7; + DuelClient::ClientAnalyze(offset, pbuf - offset); + break; + } + case MSG_CONFIRM_EXTRATOP: { + player = BufferIO::Read(pbuf); + count = BufferIO::Read(pbuf); pbuf += count * 7; DuelClient::ClientAnalyze(offset, pbuf - offset); break; } case MSG_CONFIRM_CARDS: { - player = BufferIO::ReadInt8(pbuf); - count = BufferIO::ReadInt8(pbuf); + player = BufferIO::Read(pbuf); + pbuf += 1; + count = BufferIO::Read(pbuf); pbuf += count * 7; DuelClient::ClientAnalyze(offset, pbuf - offset); break; } case MSG_SHUFFLE_DECK: { - player = BufferIO::ReadInt8(pbuf); + player = BufferIO::Read(pbuf); DuelClient::ClientAnalyze(offset, pbuf - offset); ReplayRefreshDeck(player); break; } case MSG_SHUFFLE_HAND: { - /*int oplayer = */BufferIO::ReadInt8(pbuf); - int count = BufferIO::ReadInt8(pbuf); + /*int oplayer = */BufferIO::Read(pbuf); + int count = BufferIO::Read(pbuf); + pbuf += count * 4; + DuelClient::ClientAnalyze(offset, pbuf - offset); + break; + } + case MSG_SHUFFLE_EXTRA: { + /*int oplayer = */BufferIO::Read(pbuf); + int count = BufferIO::Read(pbuf); pbuf += count * 4; DuelClient::ClientAnalyze(offset, pbuf - offset); break; @@ -350,13 +478,15 @@ bool ReplayMode::ReplayAnalyze(char* msg, unsigned int len) { break; } case MSG_SWAP_GRAVE_DECK: { - player = BufferIO::ReadInt8(pbuf); + player = BufferIO::Read(pbuf); DuelClient::ClientAnalyze(offset, pbuf - offset); ReplayRefreshGrave(player); break; } case MSG_REVERSE_DECK: { DuelClient::ClientAnalyze(offset, pbuf - offset); + ReplayRefreshDeck(0); + ReplayRefreshDeck(1); break; } case MSG_DECK_TOP: { @@ -365,7 +495,8 @@ bool ReplayMode::ReplayAnalyze(char* msg, unsigned int len) { break; } case MSG_SHUFFLE_SET_CARD: { - count = BufferIO::ReadInt8(pbuf); + pbuf++; + count = BufferIO::Read(pbuf); pbuf += count * 8; DuelClient::ClientAnalyze(offset, pbuf - offset); break; @@ -376,15 +507,15 @@ bool ReplayMode::ReplayAnalyze(char* msg, unsigned int len) { if(skip_turn == 0) { mainGame->dInfo.isReplaySkiping = false; mainGame->dField.RefreshAllCards(); - mainGame->gMutex.Unlock(); + mainGame->gMutex.unlock(); } } - player = BufferIO::ReadInt8(pbuf); + player = BufferIO::Read(pbuf); DuelClient::ClientAnalyze(offset, pbuf - offset); break; } case MSG_NEW_PHASE: { - pbuf++; + pbuf += 2; DuelClient::ClientAnalyze(offset, pbuf - offset); ReplayRefresh(); break; @@ -400,8 +531,10 @@ bool ReplayMode::ReplayAnalyze(char* msg, unsigned int len) { /*int cp = pbuf[11];*/ pbuf += 16; DuelClient::ClientAnalyze(offset, pbuf - offset); - if(cl && !(cl & 0x80) && (pl != cl || pc != cc)) + if(cl && !(cl & LOCATION_OVERLAY) && (pl != cl || pc != cc)) ReplayRefreshSingle(cc, cl, cs); + else if(pl == cl && cl == LOCATION_DECK) + ReplayRefreshDeck(cc); break; } case MSG_POS_CHANGE: { @@ -501,22 +634,22 @@ bool ReplayMode::ReplayAnalyze(char* msg, unsigned int len) { } case MSG_CARD_SELECTED: case MSG_RANDOM_SELECTED: { - player = BufferIO::ReadInt8(pbuf); - count = BufferIO::ReadInt8(pbuf); + player = BufferIO::Read(pbuf); + count = BufferIO::Read(pbuf); pbuf += count * 4; DuelClient::ClientAnalyze(offset, pbuf - offset); pauseable = false; break; } case MSG_BECOME_TARGET: { - count = BufferIO::ReadInt8(pbuf); + count = BufferIO::Read(pbuf); pbuf += count * 4; DuelClient::ClientAnalyze(offset, pbuf - offset); break; } case MSG_DRAW: { - player = BufferIO::ReadInt8(pbuf); - count = BufferIO::ReadInt8(pbuf); + player = BufferIO::Read(pbuf); + count = BufferIO::Read(pbuf); pbuf += count * 4; DuelClient::ClientAnalyze(offset, pbuf - offset); break; @@ -566,12 +699,12 @@ bool ReplayMode::ReplayAnalyze(char* msg, unsigned int len) { break; } case MSG_ADD_COUNTER: { - pbuf += 6; + pbuf += 7; DuelClient::ClientAnalyze(offset, pbuf - offset); break; } case MSG_REMOVE_COUNTER: { - pbuf += 6; + pbuf += 7; DuelClient::ClientAnalyze(offset, pbuf - offset); break; } @@ -609,36 +742,42 @@ bool ReplayMode::ReplayAnalyze(char* msg, unsigned int len) { break; } case MSG_TOSS_COIN: { - player = BufferIO::ReadInt8(pbuf); - count = BufferIO::ReadInt8(pbuf); + player = BufferIO::Read(pbuf); + count = BufferIO::Read(pbuf); pbuf += count; DuelClient::ClientAnalyze(offset, pbuf - offset); break; } case MSG_TOSS_DICE: { - player = BufferIO::ReadInt8(pbuf); - count = BufferIO::ReadInt8(pbuf); + player = BufferIO::Read(pbuf); + count = BufferIO::Read(pbuf); pbuf += count; DuelClient::ClientAnalyze(offset, pbuf - offset); break; } + case MSG_ROCK_PAPER_SCISSORS: { + player = BufferIO::Read(pbuf); + return ReadReplayResponse(); + } + case MSG_HAND_RES: { + pbuf += 1; + DuelClient::ClientAnalyze(offset, pbuf - offset); + break; + } case MSG_ANNOUNCE_RACE: { - player = BufferIO::ReadInt8(pbuf); + player = BufferIO::Read(pbuf); pbuf += 5; return ReadReplayResponse(); } case MSG_ANNOUNCE_ATTRIB: { - player = BufferIO::ReadInt8(pbuf); + player = BufferIO::Read(pbuf); pbuf += 5; return ReadReplayResponse(); } - case MSG_ANNOUNCE_CARD: { - player = BufferIO::ReadInt8(pbuf); - return ReadReplayResponse(); - } + case MSG_ANNOUNCE_CARD: case MSG_ANNOUNCE_NUMBER: { - player = BufferIO::ReadInt8(pbuf); - count = BufferIO::ReadInt8(pbuf); + player = BufferIO::Read(pbuf); + count = BufferIO::Read(pbuf); pbuf += 4 * count; return ReadReplayResponse(); } @@ -647,84 +786,141 @@ bool ReplayMode::ReplayAnalyze(char* msg, unsigned int len) { DuelClient::ClientAnalyze(offset, pbuf - offset); break; } + case MSG_PLAYER_HINT: { + pbuf += 6; + DuelClient::ClientAnalyze(offset, pbuf - offset); + break; + } case MSG_MATCH_KILL: { pbuf += 4; break; } case MSG_TAG_SWAP: { player = pbuf[0]; - pbuf += pbuf[3] * 4 + 8; + pbuf += pbuf[2] * 4 + pbuf[4] * 4 + 9; DuelClient::ClientAnalyze(offset, pbuf - offset); ReplayRefreshDeck(player); ReplayRefreshExtra(player); break; } + case MSG_RELOAD_FIELD: { + pbuf++; + for(int p = 0; p < 2; ++p) { + pbuf += 4; + for(int seq = 0; seq < 7; ++seq) { + int val = BufferIO::Read(pbuf); + if(val) + pbuf += 2; + } + for(int seq = 0; seq < 8; ++seq) { + int val = BufferIO::Read(pbuf); + if(val) + pbuf++; + } + pbuf += 6; + } + pbuf++; + DuelClient::ClientAnalyze(offset, pbuf - offset); + ReplayReload(); + mainGame->dField.RefreshAllCards(); + break; + } + case MSG_AI_NAME: { + int len = BufferIO::Read(pbuf); + pbuf += len + 1; + break; } - if(pauseable && is_pausing) { - is_paused = true; - mainGame->actionSignal.Reset(); - mainGame->actionSignal.Wait(); - is_paused = false; + case MSG_SHOW_HINT: { + int len = BufferIO::Read(pbuf); + pbuf += len + 1; + break; + } + } + if(pauseable) { + current_step++; + if(skip_step) { + skip_step--; + if(skip_step == 0) { + Pause(true, false); + mainGame->dInfo.isStarted = true; + mainGame->dInfo.isFinished = false; + mainGame->dInfo.isReplaySkiping = false; + mainGame->dField.RefreshAllCards(); + mainGame->gMutex.unlock(); + } + } + if(is_pausing) { + is_paused = true; + mainGame->actionSignal.Reset(); + mainGame->actionSignal.Wait(); + is_paused = false; + } } } return true; } +inline void ReplayMode::ReloadLocation(int player, int location, int flag, std::vector& queryBuffer) { + query_field_card(pduel, player, location, flag, queryBuffer.data(), 0); + mainGame->dField.UpdateFieldCard(mainGame->LocalPlayer(player), location, queryBuffer.data()); +} void ReplayMode::ReplayRefresh(int flag) { - unsigned char queryBuffer[0x1000]; - /*int len = */query_field_card(pduel, 0, LOCATION_MZONE, flag, queryBuffer, 0); - mainGame->dField.UpdateFieldCard(mainGame->LocalPlayer(0), LOCATION_MZONE, (char*)queryBuffer); - /*len = */query_field_card(pduel, 1, LOCATION_MZONE, flag, queryBuffer, 0); - mainGame->dField.UpdateFieldCard(mainGame->LocalPlayer(1), LOCATION_MZONE, (char*)queryBuffer); - /*len = */query_field_card(pduel, 0, LOCATION_SZONE, flag, queryBuffer, 0); - mainGame->dField.UpdateFieldCard(mainGame->LocalPlayer(0), LOCATION_SZONE, (char*)queryBuffer); - /*len = */query_field_card(pduel, 1, LOCATION_SZONE, flag, queryBuffer, 0); - mainGame->dField.UpdateFieldCard(mainGame->LocalPlayer(1), LOCATION_SZONE, (char*)queryBuffer); - /*len = */query_field_card(pduel, 0, LOCATION_HAND, flag, queryBuffer, 0); - mainGame->dField.UpdateFieldCard(mainGame->LocalPlayer(0), LOCATION_HAND, (char*)queryBuffer); - /*len = */query_field_card(pduel, 1, LOCATION_HAND, flag, queryBuffer, 0); - mainGame->dField.UpdateFieldCard(mainGame->LocalPlayer(1), LOCATION_HAND, (char*)queryBuffer); + std::vector queryBuffer; + queryBuffer.resize(SIZE_QUERY_BUFFER); + ReloadLocation(0, LOCATION_MZONE, flag, queryBuffer); + ReloadLocation(1, LOCATION_MZONE, flag, queryBuffer); + ReloadLocation(0, LOCATION_SZONE, flag, queryBuffer); + ReloadLocation(1, LOCATION_SZONE, flag, queryBuffer); + ReloadLocation(0, LOCATION_HAND, flag, queryBuffer); + ReloadLocation(1, LOCATION_HAND, flag, queryBuffer); } -void ReplayMode::ReplayRefreshHand(int player, int flag) { - unsigned char queryBuffer[0x1000]; - /*int len = */query_field_card(pduel, player, LOCATION_HAND, flag, queryBuffer, 0); - mainGame->dField.UpdateFieldCard(mainGame->LocalPlayer(player), LOCATION_HAND, (char*)queryBuffer); +void ReplayMode::ReplayRefreshLocation(int player, int location, int flag) { + std::vector queryBuffer; + queryBuffer.resize(SIZE_QUERY_BUFFER); + ReloadLocation(player, location, flag, queryBuffer); } -void ReplayMode::ReplayRefreshGrave(int player, int flag) { - unsigned char queryBuffer[0x1000]; - /*int len = */query_field_card(pduel, player, LOCATION_GRAVE, flag, queryBuffer, 0); - mainGame->dField.UpdateFieldCard(mainGame->LocalPlayer(player), LOCATION_GRAVE, (char*)queryBuffer); +inline void ReplayMode::ReplayRefreshHand(int player, int flag) { + ReplayRefreshLocation(player, LOCATION_HAND, flag); } -void ReplayMode::ReplayRefreshDeck(int player, int flag) { - unsigned char queryBuffer[0x1000]; - /*int len = */query_field_card(pduel, player, LOCATION_DECK, flag, queryBuffer, 0); - mainGame->dField.UpdateFieldCard(mainGame->LocalPlayer(player), LOCATION_DECK, (char*)queryBuffer); +inline void ReplayMode::ReplayRefreshGrave(int player, int flag) { + ReplayRefreshLocation(player, LOCATION_GRAVE, flag); } -void ReplayMode::ReplayRefreshExtra(int player, int flag) { - unsigned char queryBuffer[0x1000]; - /*int len = */query_field_card(pduel, player, LOCATION_EXTRA, flag, queryBuffer, 0); - mainGame->dField.UpdateFieldCard(mainGame->LocalPlayer(player), LOCATION_EXTRA, (char*)queryBuffer); +inline void ReplayMode::ReplayRefreshDeck(int player, int flag) { + ReplayRefreshLocation(player, LOCATION_DECK, flag); +} +inline void ReplayMode::ReplayRefreshExtra(int player, int flag) { + ReplayRefreshLocation(player, LOCATION_EXTRA, flag); } void ReplayMode::ReplayRefreshSingle(int player, int location, int sequence, int flag) { unsigned char queryBuffer[0x1000]; /*int len = */query_card(pduel, player, location, sequence, flag, queryBuffer, 0); - mainGame->dField.UpdateCard(mainGame->LocalPlayer(player), location, sequence, (char*)queryBuffer); + mainGame->dField.UpdateCard(mainGame->LocalPlayer(player), location, sequence, queryBuffer); } -int ReplayMode::MessageHandler(long fduel, int type) { +void ReplayMode::ReplayReload() { + std::vector queryBuffer; + queryBuffer.resize(SIZE_QUERY_BUFFER); + unsigned int flag = 0xffdfff; + ReloadLocation(0, LOCATION_MZONE, flag, queryBuffer); + ReloadLocation(1, LOCATION_MZONE, flag, queryBuffer); + ReloadLocation(0, LOCATION_SZONE, flag, queryBuffer); + ReloadLocation(1, LOCATION_SZONE, flag, queryBuffer); + ReloadLocation(0, LOCATION_HAND, flag, queryBuffer); + ReloadLocation(1, LOCATION_HAND, flag, queryBuffer); + + ReloadLocation(0, LOCATION_DECK, flag, queryBuffer); + ReloadLocation(1, LOCATION_DECK, flag, queryBuffer); + ReloadLocation(0, LOCATION_EXTRA, flag, queryBuffer); + ReloadLocation(1, LOCATION_EXTRA, flag, queryBuffer); + ReloadLocation(0, LOCATION_GRAVE, flag, queryBuffer); + ReloadLocation(1, LOCATION_GRAVE, flag, queryBuffer); + ReloadLocation(0, LOCATION_REMOVED, flag, queryBuffer); + ReloadLocation(1, LOCATION_REMOVED, flag, queryBuffer); +} +uint32_t ReplayMode::MessageHandler(intptr_t fduel, uint32_t type) { if(!enable_log) return 0; char msgbuf[1024]; - get_log_message(fduel, (byte*)msgbuf); - if(enable_log == 1) { - wchar_t wbuf[1024]; - BufferIO::DecodeUTF8(msgbuf, wbuf); - mainGame->AddChatMsg(wbuf, 9); - } else if(enable_log == 2) { - FILE* fp = fopen("error.log", "at"); - if(!fp) - return 0; - fprintf(fp, "[Script error:] %s\n", msgbuf); - fclose(fp); - } + get_log_message(fduel, msgbuf); + mainGame->AddDebugMsg(msgbuf); return 0; } diff --git a/gframe/replay_mode.h b/gframe/replay_mode.h index 57ce08f1d5..cc425d5eae 100644 --- a/gframe/replay_mode.h +++ b/gframe/replay_mode.h @@ -1,45 +1,52 @@ #ifndef REPLAY_MODE_H #define REPLAY_MODE_H -#include "config.h" -#include "data_manager.h" -#include "deck_manager.h" +#include +#include #include "replay.h" -#include "../ocgcore/mtrandom.h" namespace ygo { class ReplayMode { private: - static long pduel; + static intptr_t pduel; static bool is_continuing; static bool is_closing; static bool is_pausing; static bool is_paused; static bool is_swaping; + static bool is_restarting; static bool exit_pending; static int skip_turn; - static wchar_t event_string[256]; + static int current_step; + static int skip_step; + static void ReloadLocation(int player, int location, int flag, std::vector& queryBuffer); + public: static Replay cur_replay; -public: static bool StartReplay(int skipturn); static void StopReplay(bool is_exiting = false); static void SwapField(); static void Pause(bool is_pause, bool is_step); static bool ReadReplayResponse(); - static int ReplayThread(void* param); - static bool ReplayAnalyze(char* msg, unsigned int len); + static int ReplayThread(); + static bool StartDuel(); + static void EndDuel(); + static void Restart(bool refresh); + static void Undo(); + static bool ReplayAnalyze(unsigned char* msg, unsigned int len); - static void ReplayRefresh(int flag = 0x781fff); + static void ReplayRefresh(int flag = 0xf81fff); + static void ReplayRefreshLocation(int player, int location, int flag); static void ReplayRefreshHand(int player, int flag = 0x781fff); static void ReplayRefreshGrave(int player, int flag = 0x181fff); static void ReplayRefreshDeck(int player, int flag = 0x181fff); static void ReplayRefreshExtra(int player, int flag = 0x181fff); - static void ReplayRefreshSingle(int player, int location, int sequence, int flag = 0x781fff); + static void ReplayRefreshSingle(int player, int location, int sequence, int flag = 0xf81fff); + static void ReplayReload(); - static int MessageHandler(long fduel, int type); + static uint32_t MessageHandler(intptr_t fduel, uint32_t type); }; } diff --git a/gframe/single_duel.cpp b/gframe/single_duel.cpp index fbe1bb71a0..7b792637ce 100644 --- a/gframe/single_duel.cpp +++ b/gframe/single_duel.cpp @@ -1,44 +1,28 @@ +#include "config.h" #include "single_duel.h" #include "netserver.h" #include "game.h" -#include "../ocgcore/ocgapi.h" -#include "../ocgcore/card.h" -#include "../ocgcore/duel.h" -#include "../ocgcore/field.h" +#include "data_manager.h" #include "../ocgcore/mtrandom.h" namespace ygo { SingleDuel::SingleDuel(bool is_match) { match_mode = is_match; - match_kill = 0; - for(int i = 0; i < 2; ++i) { - players[i] = 0; - ready[i] = false; - } - duel_count = 0; - memset(match_result, 0, 3); } SingleDuel::~SingleDuel() { } -void SingleDuel::Chat(DuelPlayer* dp, void* pdata, int len) { - STOC_Chat scc; - scc.player = dp->type; - unsigned short* msg = (unsigned short*)pdata; - int msglen = BufferIO::CopyWStr(msg, scc.msg, 256); - if(dp->type > 1) { - NetServer::SendBufferToPlayer(players[0], STOC_CHAT, &scc, 4 + msglen * 2); - NetServer::ReSendToPlayer(players[1]); - for(auto pit = observers.begin(); pit != observers.end(); ++pit) - if((*pit) != dp) - NetServer::ReSendToPlayer(*pit); - } else { - NetServer::SendBufferToPlayer(players[1 - dp->type], STOC_CHAT, &scc, 4 + msglen * 2); - for(auto pit = observers.begin(); pit != observers.end(); ++pit) - NetServer::ReSendToPlayer(*pit); - } +void SingleDuel::Chat(DuelPlayer* dp, unsigned char* pdata, int len) { + unsigned char scc[SIZE_STOC_CHAT]; + const auto scc_size = NetServer::CreateChatPacket(pdata, len, scc, dp->type); + if (!scc_size) + return; + NetServer::SendBufferToPlayer(players[0], STOC_CHAT, scc, scc_size); + NetServer::ReSendToPlayer(players[1]); + for(auto pit = observers.begin(); pit != observers.end(); ++pit) + NetServer::ReSendToPlayer(*pit); } -void SingleDuel::JoinGame(DuelPlayer* dp, void* pdata, bool is_creater) { +void SingleDuel::JoinGame(DuelPlayer* dp, unsigned char* pdata, bool is_creater) { if(!is_creater) { if(dp->game && dp->type != 0xff) { STOC_ErrorMsg scem; @@ -48,7 +32,9 @@ void SingleDuel::JoinGame(DuelPlayer* dp, void* pdata, bool is_creater) { NetServer::DisconnectPlayer(dp); return; } - CTOS_JoinGame* pkt = (CTOS_JoinGame*)pdata; + CTOS_JoinGame packet; + std::memcpy(&packet, pdata, sizeof packet); + auto pkt = &packet; if(pkt->version != PRO_VERSION) { STOC_ErrorMsg scem; scem.msg = ERRMSG_VERERROR; @@ -58,8 +44,9 @@ void SingleDuel::JoinGame(DuelPlayer* dp, void* pdata, bool is_creater) { return; } wchar_t jpass[20]; - BufferIO::CopyWStr(pkt->pass, jpass, 20); - if(wcscmp(jpass, pass)) { + BufferIO::NullTerminate(pkt->pass); + BufferIO::CopyCharArray(pkt->pass, jpass); + if(std::wcscmp(jpass, pass)) { STOC_ErrorMsg scem; scem.msg = ERRMSG_JOINERROR; scem.code = 1; @@ -76,13 +63,15 @@ void SingleDuel::JoinGame(DuelPlayer* dp, void* pdata, bool is_creater) { sctc.type = (host_player == dp) ? 0x10 : 0; if(!players[0] || !players[1]) { STOC_HS_PlayerEnter scpe; - BufferIO::CopyWStr(dp->name, scpe.name, 20); - if(players[0]) { + BufferIO::CopyCharArray(dp->name, scpe.name); + if(!players[0]) + scpe.pos = 0; + else scpe.pos = 1; + if(players[0]) { NetServer::SendPacketToPlayer(players[0], STOC_HS_PLAYER_ENTER, scpe); } if(players[1]) { - scpe.pos = 0; NetServer::SendPacketToPlayer(players[1], STOC_HS_PLAYER_ENTER, scpe); } for(auto pit = observers.begin(); pit != observers.end(); ++pit) @@ -101,7 +90,7 @@ void SingleDuel::JoinGame(DuelPlayer* dp, void* pdata, bool is_creater) { dp->type = NETPLAYER_TYPE_OBSERVER; sctc.type |= NETPLAYER_TYPE_OBSERVER; STOC_HS_WatchChange scwc; - scwc.watch_count = observers.size(); + scwc.watch_count = (unsigned short)observers.size(); if(players[0]) NetServer::SendPacketToPlayer(players[0], STOC_HS_WATCH_CHANGE, scwc); if(players[1]) @@ -113,7 +102,7 @@ void SingleDuel::JoinGame(DuelPlayer* dp, void* pdata, bool is_creater) { NetServer::SendPacketToPlayer(dp, STOC_TYPE_CHANGE, sctc); if(players[0]) { STOC_HS_PlayerEnter scpe; - BufferIO::CopyWStr(players[0]->name, scpe.name, 20); + BufferIO::CopyCharArray(players[0]->name, scpe.name); scpe.pos = 0; NetServer::SendPacketToPlayer(dp, STOC_HS_PLAYER_ENTER, scpe); if(ready[0]) { @@ -124,7 +113,7 @@ void SingleDuel::JoinGame(DuelPlayer* dp, void* pdata, bool is_creater) { } if(players[1]) { STOC_HS_PlayerEnter scpe; - BufferIO::CopyWStr(players[1]->name, scpe.name, 20); + BufferIO::CopyCharArray(players[1]->name, scpe.name); scpe.pos = 1; NetServer::SendPacketToPlayer(dp, STOC_HS_PLAYER_ENTER, scpe); if(ready[1]) { @@ -135,7 +124,7 @@ void SingleDuel::JoinGame(DuelPlayer* dp, void* pdata, bool is_creater) { } if(observers.size()) { STOC_HS_WatchChange scwc; - scwc.watch_count = observers.size(); + scwc.watch_count = (unsigned short)observers.size(); NetServer::SendPacketToPlayer(dp, STOC_HS_WATCH_CHANGE, scwc); } } @@ -145,9 +134,9 @@ void SingleDuel::LeaveGame(DuelPlayer* dp) { NetServer::StopServer(); } else if(dp->type == NETPLAYER_TYPE_OBSERVER) { observers.erase(dp); - if(!pduel) { + if(duel_stage == DUEL_STAGE_BEGIN) { STOC_HS_WatchChange scwc; - scwc.watch_count = observers.size(); + scwc.watch_count = (unsigned short)observers.size(); if(players[0]) NetServer::SendPacketToPlayer(players[0], STOC_HS_WATCH_CHANGE, scwc); if(players[1]) @@ -157,7 +146,7 @@ void SingleDuel::LeaveGame(DuelPlayer* dp) { } NetServer::DisconnectPlayer(dp); } else { - if(!pduel && duel_count == 0) { + if(duel_stage == DUEL_STAGE_BEGIN) { STOC_HS_PlayerChange scpc; players[dp->type] = 0; ready[dp->type] = false; @@ -170,26 +159,28 @@ void SingleDuel::LeaveGame(DuelPlayer* dp) { NetServer::SendPacketToPlayer(*pit, STOC_HS_PLAYER_CHANGE, scpc); NetServer::DisconnectPlayer(dp); } else { - if(!pduel) { + if(duel_stage == DUEL_STAGE_SIDING) { if(!ready[0]) NetServer::SendPacketToPlayer(players[0], STOC_DUEL_START); if(!ready[1]) NetServer::SendPacketToPlayer(players[1], STOC_DUEL_START); } - unsigned char wbuf[3]; - wbuf[0] = MSG_WIN; - wbuf[1] = 1 - dp->type; - wbuf[2] = 0; - NetServer::SendBufferToPlayer(players[0], STOC_GAME_MSG, wbuf, 3); - NetServer::ReSendToPlayer(players[1]); - for(auto oit = observers.begin(); oit != observers.end(); ++oit) - NetServer::ReSendToPlayer(*oit); - EndDuel(); - NetServer::SendPacketToPlayer(players[0], STOC_DUEL_END); - NetServer::ReSendToPlayer(players[1]); - for(auto oit = observers.begin(); oit != observers.end(); ++oit) - NetServer::ReSendToPlayer(*oit); - NetServer::StopServer(); + if(duel_stage != DUEL_STAGE_END) { + unsigned char wbuf[3]; + wbuf[0] = MSG_WIN; + wbuf[1] = 1 - dp->type; + wbuf[2] = 0x4; + NetServer::SendBufferToPlayer(players[0], STOC_GAME_MSG, wbuf, 3); + NetServer::ReSendToPlayer(players[1]); + for(auto oit = observers.begin(); oit != observers.end(); ++oit) + NetServer::ReSendToPlayer(*oit); + EndDuel(); + NetServer::SendPacketToPlayer(players[0], STOC_DUEL_END); + NetServer::ReSendToPlayer(players[1]); + for(auto oit = observers.begin(); oit != observers.end(); ++oit) + NetServer::ReSendToPlayer(*oit); + } + NetServer::DisconnectPlayer(dp); } } } @@ -200,7 +191,7 @@ void SingleDuel::ToDuelist(DuelPlayer* dp) { return; observers.erase(dp); STOC_HS_PlayerEnter scpe; - BufferIO::CopyWStr(dp->name, scpe.name, 20); + BufferIO::CopyCharArray(dp->name, scpe.name); if(!players[0]) { players[0] = dp; dp->type = NETPLAYER_TYPE_PLAYER1; @@ -211,7 +202,7 @@ void SingleDuel::ToDuelist(DuelPlayer* dp) { scpe.pos = 1; } STOC_HS_WatchChange scwc; - scwc.watch_count = observers.size(); + scwc.watch_count = (unsigned short)observers.size(); NetServer::SendPacketToPlayer(players[0], STOC_HS_PLAYER_ENTER, scpe); NetServer::SendPacketToPlayer(players[0], STOC_HS_WATCH_CHANGE, scwc); if(players[1]) { @@ -251,16 +242,21 @@ void SingleDuel::PlayerReady(DuelPlayer* dp, bool is_ready) { if(ready[dp->type] == is_ready) return; if(is_ready) { - bool allow_ocg = host_info.rule == 0 || host_info.rule == 2; - bool allow_tcg = host_info.rule == 1 || host_info.rule == 2; - int res = host_info.no_check_deck ? false : deckManager.CheckLFList(pdeck[dp->type], host_info.lflist, allow_ocg, allow_tcg); - if(res) { + unsigned int deckerror = 0; + if(!host_info.no_check_deck) { + if(deck_error[dp->type]) { + deckerror = (DECKERROR_UNKNOWNCARD << 28) | deck_error[dp->type]; + } else { + deckerror = deckManager.CheckDeck(pdeck[dp->type], host_info.lflist, host_info.rule); + } + } + if(deckerror) { STOC_HS_PlayerChange scpc; scpc.status = (dp->type << 4) | PLAYERCHANGE_NOTREADY; NetServer::SendPacketToPlayer(dp, STOC_HS_PLAYER_CHANGE, scpc); STOC_ErrorMsg scem; scem.msg = ERRMSG_DECKERROR; - scem.code = res; + scem.code = deckerror; NetServer::SendPacketToPlayer(dp, STOC_ERROR_MSG, scem); return; } @@ -268,6 +264,7 @@ void SingleDuel::PlayerReady(DuelPlayer* dp, bool is_ready) { ready[dp->type] = is_ready; STOC_HS_PlayerChange scpc; scpc.status = (dp->type << 4) | (is_ready ? PLAYERCHANGE_READY : PLAYERCHANGE_NOTREADY); + NetServer::SendPacketToPlayer(players[dp->type], STOC_HS_PLAYER_CHANGE, scpc); if(players[1 - dp->type]) NetServer::SendPacketToPlayer(players[1 - dp->type], STOC_HS_PLAYER_CHANGE, scpc); for(auto pit = observers.begin(); pit != observers.end(); ++pit) @@ -278,22 +275,38 @@ void SingleDuel::PlayerKick(DuelPlayer* dp, unsigned char pos) { return; LeaveGame(players[pos]); } -void SingleDuel::UpdateDeck(DuelPlayer* dp, void* pdata) { +void SingleDuel::UpdateDeck(DuelPlayer* dp, unsigned char* pdata, int len) { if(dp->type > 1 || ready[dp->type]) return; - char* deckbuf = (char*)pdata; - int mainc = BufferIO::ReadInt32(deckbuf); - int sidec = BufferIO::ReadInt32(deckbuf); + if (len < 8 || len > sizeof(CTOS_DeckData)) + return; + bool valid = true; + CTOS_DeckData deckbuf; + std::memcpy(&deckbuf, pdata, len); + if (deckbuf.mainc < 0 || deckbuf.mainc > MAINC_MAX) + valid = false; + else if (deckbuf.sidec < 0 || deckbuf.sidec > SIDEC_MAX) + valid = false; + else if (len < (2 + deckbuf.mainc + deckbuf.sidec) * (int)sizeof(int32_t)) + valid = false; + if (!valid) { + STOC_ErrorMsg scem; + scem.msg = ERRMSG_DECKERROR; + scem.code = 0; + NetServer::SendPacketToPlayer(dp, STOC_ERROR_MSG, scem); + return; + } if(duel_count == 0) { - deckManager.LoadDeck(pdeck[dp->type], (int*)deckbuf, mainc, sidec); + deck_error[dp->type] = DeckManager::LoadDeck(pdeck[dp->type], deckbuf.list, deckbuf.mainc, deckbuf.sidec); } else { - if(deckManager.LoadSide(pdeck[dp->type], (int*)deckbuf, mainc, sidec)) { + if(DeckManager::LoadSide(pdeck[dp->type], deckbuf.list, deckbuf.mainc, deckbuf.sidec)) { ready[dp->type] = true; NetServer::SendPacketToPlayer(dp, STOC_DUEL_START); if(ready[0] && ready[1]) { NetServer::SendPacketToPlayer(players[tp_player], STOC_SELECT_TP); players[1 - tp_player]->state = 0xff; players[tp_player]->state = CTOS_TP_RESULT; + duel_stage = DUEL_STAGE_FIRSTGO; } } else { STOC_ErrorMsg scem; @@ -316,12 +329,27 @@ void SingleDuel::StartDuel(DuelPlayer* dp) { (*oit)->state = CTOS_LEAVE_GAME; NetServer::ReSendToPlayer(*oit); } + unsigned char deckbuff[12]; + auto pbuf = deckbuff; + BufferIO::Write(pbuf, (uint16_t)pdeck[0].main.size()); + BufferIO::Write(pbuf, (uint16_t)pdeck[0].extra.size()); + BufferIO::Write(pbuf, (uint16_t)pdeck[0].side.size()); + BufferIO::Write(pbuf, (uint16_t)pdeck[1].main.size()); + BufferIO::Write(pbuf, (uint16_t)pdeck[1].extra.size()); + BufferIO::Write(pbuf, (uint16_t)pdeck[1].side.size()); + NetServer::SendBufferToPlayer(players[0], STOC_DECK_COUNT, deckbuff, 12); + char tempbuff[6]; + std::memcpy(tempbuff, deckbuff, 6); + std::memcpy(deckbuff, deckbuff + 6, 6); + std::memcpy(deckbuff + 6, tempbuff, 6); + NetServer::SendBufferToPlayer(players[1], STOC_DECK_COUNT, deckbuff, 12); NetServer::SendPacketToPlayer(players[0], STOC_SELECT_HAND); NetServer::ReSendToPlayer(players[1]); hand_result[0] = 0; hand_result[1] = 0; players[0]->state = CTOS_HAND_RESULT; players[1]->state = CTOS_HAND_RESULT; + duel_stage = DUEL_STAGE_FINGER; } void SingleDuel::HandResult(DuelPlayer* dp, unsigned char res) { if(res > 3) @@ -349,23 +377,25 @@ void SingleDuel::HandResult(DuelPlayer* dp, unsigned char res) { } else if((hand_result[0] == 1 && hand_result[1] == 2) || (hand_result[0] == 2 && hand_result[1] == 3) || (hand_result[0] == 3 && hand_result[1] == 1)) { - NetServer::SendPacketToPlayer(players[1], CTOS_TP_RESULT); + NetServer::SendPacketToPlayer(players[1], STOC_SELECT_TP); tp_player = 1; players[0]->state = 0xff; players[1]->state = CTOS_TP_RESULT; + duel_stage = DUEL_STAGE_FIRSTGO; } else { - NetServer::SendPacketToPlayer(players[0], CTOS_TP_RESULT); + NetServer::SendPacketToPlayer(players[0], STOC_SELECT_TP); players[1]->state = 0xff; players[0]->state = CTOS_TP_RESULT; tp_player = 0; + duel_stage = DUEL_STAGE_FIRSTGO; } } } void SingleDuel::TPResult(DuelPlayer* dp, unsigned char tp) { if(dp->state != CTOS_TP_RESULT) return; + duel_stage = DUEL_STAGE_DUELING; bool swapped = false; - mtrandom rnd; pplayer[0] = players[0]; pplayer[1] = players[1]; if((tp && dp->type == 1) || (!tp && dp->type == 0)) { @@ -380,38 +410,32 @@ void SingleDuel::TPResult(DuelPlayer* dp, unsigned char tp) { swapped = true; } dp->state = CTOS_RESPONSE; - ReplayHeader rh; - rh.id = 0x31707279; - rh.version = PRO_VERSION; - rh.flag = 0; - time_t seed = time(0); - rh.seed = seed; + std::random_device rd; + ExtendedReplayHeader rh; + rh.base.id = REPLAY_ID_YRP2; + rh.base.version = PRO_VERSION; + rh.base.flag = REPLAY_UNIFORM; + rh.base.start_time = (uint32_t)std::time(nullptr); + for (auto& x : rh.seed_sequence) + x = rd(); + mtrandom rnd(rh.seed_sequence, SEED_COUNT); last_replay.BeginRecord(); last_replay.WriteHeader(rh); - rnd.reset(seed); last_replay.WriteData(players[0]->name, 40, false); last_replay.WriteData(players[1]->name, 40, false); if(!host_info.no_shuffle_deck) { - for(size_t i = pdeck[0].main.size() - 1; i > 0; --i) { - int swap = rnd.real() * (i + 1); - std::swap(pdeck[0].main[i], pdeck[0].main[swap]); - } - for(size_t i = pdeck[1].main.size() - 1; i > 0; --i) { - int swap = rnd.real() * (i + 1); - std::swap(pdeck[1].main[i], pdeck[1].main[swap]); - } + rnd.shuffle_vector(pdeck[0].main); + rnd.shuffle_vector(pdeck[1].main); } time_limit[0] = host_info.time_limit; time_limit[1] = host_info.time_limit; - set_card_reader((card_reader)DataManager::CardReader); - set_message_handler((message_handler)SingleDuel::MessageHandler); - rnd.reset(seed); - pduel = create_duel(rnd.rand()); + set_script_reader(DataManager::ScriptReaderEx); + set_card_reader(DataManager::CardReader); + set_message_handler(SingleDuel::MessageHandler); + pduel = create_duel_v2(rh.seed_sequence); set_player_info(pduel, 0, host_info.start_lp, host_info.start_hand, host_info.draw_count); set_player_info(pduel, 1, host_info.start_lp, host_info.start_hand, host_info.draw_count); - int opt = 0; - if(host_info.enable_priority) - opt |= DUEL_OBSOLETE_RULING; + unsigned int opt = (unsigned int)host_info.duel_rule << 16; if(host_info.no_shuffle_deck) opt |= DUEL_PSEUDO_SHUFFLE; last_replay.WriteInt32(host_info.start_lp, false); @@ -419,62 +443,65 @@ void SingleDuel::TPResult(DuelPlayer* dp, unsigned char tp) { last_replay.WriteInt32(host_info.draw_count, false); last_replay.WriteInt32(opt, false); last_replay.Flush(); - last_replay.WriteInt32(pdeck[0].main.size(), false); - for(int32 i = (int32)pdeck[0].main.size() - 1; i >= 0; --i) { - new_card(pduel, pdeck[0].main[i]->first, 0, 0, LOCATION_DECK, 0, 0); - last_replay.WriteInt32(pdeck[0].main[i]->first, false); - } - last_replay.WriteInt32(pdeck[0].extra.size(), false); - for(int32 i = (int32)pdeck[0].extra.size() - 1; i >= 0; --i) { - new_card(pduel, pdeck[0].extra[i]->first, 0, 0, LOCATION_EXTRA, 0, 0); - last_replay.WriteInt32(pdeck[0].extra[i]->first, false); - } - last_replay.WriteInt32(pdeck[1].main.size(), false); - for(int32 i = (int32)pdeck[1].main.size() - 1; i >= 0; --i) { - new_card(pduel, pdeck[1].main[i]->first, 1, 1, LOCATION_DECK, 0, 0); - last_replay.WriteInt32(pdeck[1].main[i]->first, false); - } - last_replay.WriteInt32(pdeck[1].extra.size(), false); - for(int32 i = (int32)pdeck[1].extra.size() - 1; i >= 0; --i) { - new_card(pduel, pdeck[1].extra[i]->first, 1, 1, LOCATION_EXTRA, 0, 0); - last_replay.WriteInt32(pdeck[1].extra[i]->first, false); - } + auto load = [&](const std::vector& deck_container, uint8_t p, uint8_t location) { + last_replay.WriteInt32(deck_container.size(), false); + for (auto cit = deck_container.rbegin(); cit != deck_container.rend(); ++cit) { + new_card(pduel, (*cit)->first, p, p, location, 0, POS_FACEDOWN_DEFENSE); + last_replay.WriteInt32((*cit)->first, false); + } + }; + load(pdeck[0].main, 0, LOCATION_DECK); + load(pdeck[0].extra, 0, LOCATION_EXTRA); + load(pdeck[1].main, 1, LOCATION_DECK); + load(pdeck[1].extra, 1, LOCATION_EXTRA); last_replay.Flush(); - char startbuf[32], *pbuf = startbuf; - BufferIO::WriteInt8(pbuf, MSG_START); - BufferIO::WriteInt8(pbuf, 0); - BufferIO::WriteInt32(pbuf, host_info.start_lp); - BufferIO::WriteInt32(pbuf, host_info.start_lp); - BufferIO::WriteInt16(pbuf, query_field_count(pduel, 0, 0x1)); - BufferIO::WriteInt16(pbuf, query_field_count(pduel, 0, 0x40)); - BufferIO::WriteInt16(pbuf, query_field_count(pduel, 1, 0x1)); - BufferIO::WriteInt16(pbuf, query_field_count(pduel, 1, 0x40)); - NetServer::SendBufferToPlayer(players[0], STOC_GAME_MSG, startbuf, 18); + unsigned char startbuf[32]{}; + auto pbuf = startbuf; + BufferIO::Write(pbuf, MSG_START); + BufferIO::Write(pbuf, 0); + BufferIO::Write(pbuf, host_info.duel_rule); + BufferIO::Write(pbuf, host_info.start_lp); + BufferIO::Write(pbuf, host_info.start_lp); + BufferIO::Write(pbuf, query_field_count(pduel, 0, LOCATION_DECK)); + BufferIO::Write(pbuf, query_field_count(pduel, 0, LOCATION_EXTRA)); + BufferIO::Write(pbuf, query_field_count(pduel, 1, LOCATION_DECK)); + BufferIO::Write(pbuf, query_field_count(pduel, 1, LOCATION_EXTRA)); + NetServer::SendBufferToPlayer(players[0], STOC_GAME_MSG, startbuf, 19); startbuf[1] = 1; - NetServer::SendBufferToPlayer(players[1], STOC_GAME_MSG, startbuf, 18); + NetServer::SendBufferToPlayer(players[1], STOC_GAME_MSG, startbuf, 19); if(!swapped) startbuf[1] = 0x10; - else startbuf[1] = 0x11; + else + startbuf[1] = 0x11; for(auto oit = observers.begin(); oit != observers.end(); ++oit) - NetServer::SendBufferToPlayer(*oit, STOC_GAME_MSG, startbuf, 18); + NetServer::SendBufferToPlayer(*oit, STOC_GAME_MSG, startbuf, 19); RefreshExtra(0); RefreshExtra(1); start_duel(pduel, opt); + if(host_info.time_limit) { + time_elapsed = 0; + timeval timeout = { 1, 0 }; + event_add(etimer, &timeout); + } Process(); } void SingleDuel::Process() { - char engineBuffer[0x1000]; - unsigned int engFlag = 0, engLen = 0; + std::vector engineBuffer; + engineBuffer.reserve(SIZE_MESSAGE_BUFFER); + unsigned int engFlag = 0; + int engLen = 0; int stop = 0; while (!stop) { - if (engFlag == 2) + if (engFlag == PROCESSOR_END) break; - int result = process(pduel); - engLen = result & 0xffff; - engFlag = result >> 16; + unsigned int result = process(pduel); + engLen = result & PROCESSOR_BUFFER_LEN; + engFlag = result & PROCESSOR_FLAG; if (engLen > 0) { - get_message(pduel, (byte*)&engineBuffer); - stop = Analyze(engineBuffer, engLen); + if (engLen > (int)engineBuffer.size()) + engineBuffer.resize(engLen); + get_message(pduel, engineBuffer.data()); + stop = Analyze(engineBuffer.data(), engLen); } } if(stop == 2) @@ -486,7 +513,7 @@ void SingleDuel::DuelEndProc() { NetServer::ReSendToPlayer(players[1]); for(auto oit = observers.begin(); oit != observers.end(); ++oit) NetServer::ReSendToPlayer(*oit); - NetServer::StopServer(); + duel_stage = DUEL_STAGE_END; } else { int winc[3] = {0, 0, 0}; for(int i = 0; i < duel_count; ++i) @@ -499,7 +526,7 @@ void SingleDuel::DuelEndProc() { NetServer::ReSendToPlayer(players[1]); for(auto oit = observers.begin(); oit != observers.end(); ++oit) NetServer::ReSendToPlayer(*oit); - NetServer::StopServer(); + duel_stage = DUEL_STAGE_END; } else { if(players[0] != pplayer[0]) { players[0] = pplayer[0]; @@ -518,6 +545,7 @@ void SingleDuel::DuelEndProc() { NetServer::SendPacketToPlayer(players[1], STOC_CHANGE_SIDE); for(auto oit = observers.begin(); oit != observers.end(); ++oit) NetServer::SendPacketToPlayer(*oit, STOC_WAITING_SIDE); + duel_stage = DUEL_STAGE_SIDING; } } } @@ -525,7 +553,7 @@ void SingleDuel::Surrender(DuelPlayer* dp) { if(dp->type > 1 || !pduel) return; unsigned char wbuf[3]; - uint32 player = dp->type; + uint32_t player = dp->type; wbuf[0] = MSG_WIN; wbuf[1] = 1 - player; wbuf[2] = 0; @@ -544,12 +572,13 @@ void SingleDuel::Surrender(DuelPlayer* dp) { DuelEndProc(); event_del(etimer); } -int SingleDuel::Analyze(char* msgbuffer, unsigned int len) { - char* offset, *pbufw, *pbuf = msgbuffer; +// Analyze ocgcore message +int SingleDuel::Analyze(unsigned char* msgbuffer, unsigned int len) { + unsigned char* offset, *pbufw, *pbuf = msgbuffer; int player, count, type; while (pbuf - msgbuffer < (int)len) { offset = pbuf; - unsigned char engType = BufferIO::ReadUInt8(pbuf); + unsigned char engType = BufferIO::Read(pbuf); switch (engType) { case MSG_RETRY: { WaitforResponse(last_response); @@ -557,9 +586,9 @@ int SingleDuel::Analyze(char* msgbuffer, unsigned int len) { return 1; } case MSG_HINT: { - type = BufferIO::ReadInt8(pbuf); - player = BufferIO::ReadInt8(pbuf); - BufferIO::ReadInt32(pbuf); + type = BufferIO::Read(pbuf); + player = BufferIO::Read(pbuf); + BufferIO::Read(pbuf); switch (type) { case 1: case 2: @@ -572,7 +601,8 @@ int SingleDuel::Analyze(char* msgbuffer, unsigned int len) { case 6: case 7: case 8: - case 9: { + case 9: + case 11: { NetServer::SendBufferToPlayer(players[1 - player], STOC_GAME_MSG, offset, pbuf - offset); for(auto oit = observers.begin(); oit != observers.end(); ++oit) NetServer::ReSendToPlayer(*oit); @@ -589,8 +619,8 @@ int SingleDuel::Analyze(char* msgbuffer, unsigned int len) { break; } case MSG_WIN: { - player = BufferIO::ReadInt8(pbuf); - type = BufferIO::ReadInt8(pbuf); + player = BufferIO::Read(pbuf); + type = BufferIO::Read(pbuf); NetServer::SendBufferToPlayer(players[0], STOC_GAME_MSG, offset, pbuf - offset); NetServer::ReSendToPlayer(players[1]); for(auto oit = observers.begin(); oit != observers.end(); ++oit) @@ -609,10 +639,10 @@ int SingleDuel::Analyze(char* msgbuffer, unsigned int len) { return 2; } case MSG_SELECT_BATTLECMD: { - player = BufferIO::ReadInt8(pbuf); - count = BufferIO::ReadInt8(pbuf); + player = BufferIO::Read(pbuf); + count = BufferIO::Read(pbuf); pbuf += count * 11; - count = BufferIO::ReadInt8(pbuf); + count = BufferIO::Read(pbuf); pbuf += count * 8 + 2; RefreshMzone(0); RefreshMzone(1); @@ -625,18 +655,18 @@ int SingleDuel::Analyze(char* msgbuffer, unsigned int len) { return 1; } case MSG_SELECT_IDLECMD: { - player = BufferIO::ReadInt8(pbuf); - count = BufferIO::ReadInt8(pbuf); + player = BufferIO::Read(pbuf); + count = BufferIO::Read(pbuf); pbuf += count * 7; - count = BufferIO::ReadInt8(pbuf); + count = BufferIO::Read(pbuf); pbuf += count * 7; - count = BufferIO::ReadInt8(pbuf); + count = BufferIO::Read(pbuf); pbuf += count * 7; - count = BufferIO::ReadInt8(pbuf); + count = BufferIO::Read(pbuf); pbuf += count * 7; - count = BufferIO::ReadInt8(pbuf); + count = BufferIO::Read(pbuf); pbuf += count * 7; - count = BufferIO::ReadInt8(pbuf); + count = BufferIO::Read(pbuf); pbuf += count * 11 + 3; RefreshMzone(0); RefreshMzone(1); @@ -649,22 +679,22 @@ int SingleDuel::Analyze(char* msgbuffer, unsigned int len) { return 1; } case MSG_SELECT_EFFECTYN: { - player = BufferIO::ReadInt8(pbuf); - pbuf += 8; + player = BufferIO::Read(pbuf); + pbuf += 12; WaitforResponse(player); NetServer::SendBufferToPlayer(players[player], STOC_GAME_MSG, offset, pbuf - offset); return 1; } case MSG_SELECT_YESNO: { - player = BufferIO::ReadInt8(pbuf); + player = BufferIO::Read(pbuf); pbuf += 4; WaitforResponse(player); NetServer::SendBufferToPlayer(players[player], STOC_GAME_MSG, offset, pbuf - offset); return 1; } case MSG_SELECT_OPTION: { - player = BufferIO::ReadInt8(pbuf); - count = BufferIO::ReadInt8(pbuf); + player = BufferIO::Read(pbuf); + count = BufferIO::Read(pbuf); pbuf += count * 4; WaitforResponse(player); NetServer::SendBufferToPlayer(players[player], STOC_GAME_MSG, offset, pbuf - offset); @@ -672,77 +702,106 @@ int SingleDuel::Analyze(char* msgbuffer, unsigned int len) { } case MSG_SELECT_CARD: case MSG_SELECT_TRIBUTE: { - player = BufferIO::ReadInt8(pbuf); + player = BufferIO::Read(pbuf); pbuf += 3; - count = BufferIO::ReadInt8(pbuf); + count = BufferIO::Read(pbuf); int c/*, l, s, ss, code*/; for (int i = 0; i < count; ++i) { pbufw = pbuf; - /*code = */BufferIO::ReadInt32(pbuf); - c = BufferIO::ReadInt8(pbuf); - /*l = */BufferIO::ReadInt8(pbuf); - /*s = */BufferIO::ReadInt8(pbuf); - /*ss = */BufferIO::ReadInt8(pbuf); - if (c != player) BufferIO::WriteInt32(pbufw, 0); + /*code = */BufferIO::Read(pbuf); + c = BufferIO::Read(pbuf); + /*l = */BufferIO::Read(pbuf); + /*s = */BufferIO::Read(pbuf); + /*ss = */BufferIO::Read(pbuf); + if (c != player) BufferIO::Write(pbufw, 0); + } + WaitforResponse(player); + NetServer::SendBufferToPlayer(players[player], STOC_GAME_MSG, offset, pbuf - offset); + return 1; + } + case MSG_SELECT_UNSELECT_CARD: { + player = BufferIO::Read(pbuf); + pbuf += 4; + count = BufferIO::Read(pbuf); + int c/*, l, s, ss, code*/; + for (int i = 0; i < count; ++i) { + pbufw = pbuf; + /*code = */BufferIO::Read(pbuf); + c = BufferIO::Read(pbuf); + /*l = */BufferIO::Read(pbuf); + /*s = */BufferIO::Read(pbuf); + /*ss = */BufferIO::Read(pbuf); + if (c != player) BufferIO::Write(pbufw, 0); + } + count = BufferIO::Read(pbuf); + for (int i = 0; i < count; ++i) { + pbufw = pbuf; + /*code = */BufferIO::Read(pbuf); + c = BufferIO::Read(pbuf); + /*l = */BufferIO::Read(pbuf); + /*s = */BufferIO::Read(pbuf); + /*ss = */BufferIO::Read(pbuf); + if (c != player) BufferIO::Write(pbufw, 0); } WaitforResponse(player); NetServer::SendBufferToPlayer(players[player], STOC_GAME_MSG, offset, pbuf - offset); return 1; } case MSG_SELECT_CHAIN: { - player = BufferIO::ReadInt8(pbuf); - count = BufferIO::ReadInt8(pbuf); - pbuf += 10 + count * 12; + player = BufferIO::Read(pbuf); + count = BufferIO::Read(pbuf); + pbuf += 9 + count * 14; WaitforResponse(player); NetServer::SendBufferToPlayer(players[player], STOC_GAME_MSG, offset, pbuf - offset); return 1; } case MSG_SELECT_PLACE: case MSG_SELECT_DISFIELD: { - player = BufferIO::ReadInt8(pbuf); + player = BufferIO::Read(pbuf); pbuf += 5; WaitforResponse(player); NetServer::SendBufferToPlayer(players[player], STOC_GAME_MSG, offset, pbuf - offset); return 1; } case MSG_SELECT_POSITION: { - player = BufferIO::ReadInt8(pbuf); + player = BufferIO::Read(pbuf); pbuf += 5; WaitforResponse(player); NetServer::SendBufferToPlayer(players[player], STOC_GAME_MSG, offset, pbuf - offset); return 1; } case MSG_SELECT_COUNTER: { - player = BufferIO::ReadInt8(pbuf); - pbuf += 3; - count = BufferIO::ReadInt8(pbuf); - pbuf += count * 8; + player = BufferIO::Read(pbuf); + pbuf += 4; + count = BufferIO::Read(pbuf); + pbuf += count * 9; WaitforResponse(player); NetServer::SendBufferToPlayer(players[player], STOC_GAME_MSG, offset, pbuf - offset); return 1; } case MSG_SELECT_SUM: { pbuf++; - player = BufferIO::ReadInt8(pbuf); + player = BufferIO::Read(pbuf); pbuf += 6; - count = BufferIO::ReadInt8(pbuf); + count = BufferIO::Read(pbuf); + pbuf += count * 11; + count = BufferIO::Read(pbuf); pbuf += count * 11; WaitforResponse(player); NetServer::SendBufferToPlayer(players[player], STOC_GAME_MSG, offset, pbuf - offset); return 1; } - case MSG_SORT_CARD: - case MSG_SORT_CHAIN: { - player = BufferIO::ReadInt8(pbuf); - count = BufferIO::ReadInt8(pbuf); + case MSG_SORT_CARD: { + player = BufferIO::Read(pbuf); + count = BufferIO::Read(pbuf); pbuf += count * 7; WaitforResponse(player); NetServer::SendBufferToPlayer(players[player], STOC_GAME_MSG, offset, pbuf - offset); return 1; } case MSG_CONFIRM_DECKTOP: { - player = BufferIO::ReadInt8(pbuf); - count = BufferIO::ReadInt8(pbuf); + player = BufferIO::Read(pbuf); + count = BufferIO::Read(pbuf); pbuf += count * 7; NetServer::SendBufferToPlayer(players[0], STOC_GAME_MSG, offset, pbuf - offset); NetServer::ReSendToPlayer(players[1]); @@ -750,9 +809,20 @@ int SingleDuel::Analyze(char* msgbuffer, unsigned int len) { NetServer::ReSendToPlayer(*oit); break; } + case MSG_CONFIRM_EXTRATOP: { + player = BufferIO::Read(pbuf); + count = BufferIO::Read(pbuf); + pbuf += count * 7; + NetServer::SendBufferToPlayer(players[0], STOC_GAME_MSG, offset, pbuf - offset); + NetServer::ReSendToPlayer(players[1]); + for (auto oit = observers.begin(); oit != observers.end(); ++oit) + NetServer::ReSendToPlayer(*oit); + break; + } case MSG_CONFIRM_CARDS: { - player = BufferIO::ReadInt8(pbuf); - count = BufferIO::ReadInt8(pbuf); + player = BufferIO::Read(pbuf); + pbuf += 1; + count = BufferIO::Read(pbuf); if(pbuf[5] != LOCATION_DECK) { pbuf += count * 7; NetServer::SendBufferToPlayer(players[player], STOC_GAME_MSG, offset, pbuf - offset); @@ -766,7 +836,7 @@ int SingleDuel::Analyze(char* msgbuffer, unsigned int len) { break; } case MSG_SHUFFLE_DECK: { - player = BufferIO::ReadInt8(pbuf); + player = BufferIO::Read(pbuf); NetServer::SendBufferToPlayer(players[0], STOC_GAME_MSG, offset, pbuf - offset); NetServer::ReSendToPlayer(players[1]); for(auto oit = observers.begin(); oit != observers.end(); ++oit) @@ -774,17 +844,29 @@ int SingleDuel::Analyze(char* msgbuffer, unsigned int len) { break; } case MSG_SHUFFLE_HAND: { - player = BufferIO::ReadInt8(pbuf); - count = BufferIO::ReadInt8(pbuf); + player = BufferIO::Read(pbuf); + count = BufferIO::Read(pbuf); NetServer::SendBufferToPlayer(players[player], STOC_GAME_MSG, offset, (pbuf - offset) + count * 4); for(int i = 0; i < count; ++i) - BufferIO::WriteInt32(pbuf, 0); + BufferIO::Write(pbuf, 0); NetServer::SendBufferToPlayer(players[1 - player], STOC_GAME_MSG, offset, pbuf - offset); for(auto oit = observers.begin(); oit != observers.end(); ++oit) NetServer::ReSendToPlayer(*oit); RefreshHand(player, 0x781fff, 0); break; } + case MSG_SHUFFLE_EXTRA: { + player = BufferIO::Read(pbuf); + count = BufferIO::Read(pbuf); + NetServer::SendBufferToPlayer(players[player], STOC_GAME_MSG, offset, (pbuf - offset) + count * 4); + for (int i = 0; i < count; ++i) + BufferIO::Write(pbuf, 0); + NetServer::SendBufferToPlayer(players[1 - player], STOC_GAME_MSG, offset, pbuf - offset); + for (auto oit = observers.begin(); oit != observers.end(); ++oit) + NetServer::ReSendToPlayer(*oit); + RefreshExtra(player); + break; + } case MSG_REFRESH_DECK: { pbuf++; NetServer::SendBufferToPlayer(players[0], STOC_GAME_MSG, offset, pbuf - offset); @@ -794,7 +876,7 @@ int SingleDuel::Analyze(char* msgbuffer, unsigned int len) { break; } case MSG_SWAP_GRAVE_DECK: { - player = BufferIO::ReadInt8(pbuf); + player = BufferIO::Read(pbuf); NetServer::SendBufferToPlayer(players[0], STOC_GAME_MSG, offset, pbuf - offset); NetServer::ReSendToPlayer(players[1]); for(auto oit = observers.begin(); oit != observers.end(); ++oit) @@ -818,14 +900,21 @@ int SingleDuel::Analyze(char* msgbuffer, unsigned int len) { break; } case MSG_SHUFFLE_SET_CARD: { - count = BufferIO::ReadInt8(pbuf); + unsigned int loc = BufferIO::Read(pbuf); + count = BufferIO::Read(pbuf); pbuf += count * 8; NetServer::SendBufferToPlayer(players[0], STOC_GAME_MSG, offset, pbuf - offset); NetServer::ReSendToPlayer(players[1]); for(auto oit = observers.begin(); oit != observers.end(); ++oit) NetServer::ReSendToPlayer(*oit); - RefreshMzone(0, 0x181fff, 0); - RefreshMzone(1, 0x181fff, 0); + if(loc == LOCATION_MZONE) { + RefreshMzone(0, 0x181fff, 0); + RefreshMzone(1, 0x181fff, 0); + } + else { + RefreshSzone(0, 0x181fff, 0); + RefreshSzone(1, 0x181fff, 0); + } break; } case MSG_NEW_TURN: { @@ -845,7 +934,7 @@ int SingleDuel::Analyze(char* msgbuffer, unsigned int len) { break; } case MSG_NEW_PHASE: { - pbuf++; + pbuf += 2; NetServer::SendBufferToPlayer(players[0], STOC_GAME_MSG, offset, pbuf - offset); NetServer::ReSendToPlayer(players[1]); for(auto oit = observers.begin(); oit != observers.end(); ++oit) @@ -871,11 +960,11 @@ int SingleDuel::Analyze(char* msgbuffer, unsigned int len) { pbuf += 16; NetServer::SendBufferToPlayer(players[cc], STOC_GAME_MSG, offset, pbuf - offset); if (!(cl & (LOCATION_GRAVE + LOCATION_OVERLAY)) && ((cl & (LOCATION_DECK + LOCATION_HAND)) || (cp & POS_FACEDOWN))) - BufferIO::WriteInt32(pbufw, 0); + BufferIO::Write(pbufw, 0); NetServer::SendBufferToPlayer(players[1 - cc], STOC_GAME_MSG, offset, pbuf - offset); for(auto oit = observers.begin(); oit != observers.end(); ++oit) NetServer::ReSendToPlayer(*oit); - if (cl != 0 && (cl & 0x80) == 0 && (cl != pl || pc != cc)) + if (cl != 0 && (cl & LOCATION_OVERLAY) == 0 && (cl != pl || pc != cc)) RefreshSingle(cc, cl, cs); break; } @@ -895,7 +984,7 @@ int SingleDuel::Analyze(char* msgbuffer, unsigned int len) { break; } case MSG_SET: { - BufferIO::WriteInt32(pbuf, 0); + BufferIO::Write(pbuf, 0); pbuf += 4; NetServer::SendBufferToPlayer(players[0], STOC_GAME_MSG, offset, pbuf - offset); NetServer::ReSendToPlayer(players[1]); @@ -904,11 +993,19 @@ int SingleDuel::Analyze(char* msgbuffer, unsigned int len) { break; } case MSG_SWAP: { + int c1 = pbuf[4]; + int l1 = pbuf[5]; + int s1 = pbuf[6]; + int c2 = pbuf[12]; + int l2 = pbuf[13]; + int s2 = pbuf[14]; pbuf += 16; NetServer::SendBufferToPlayer(players[0], STOC_GAME_MSG, offset, pbuf - offset); NetServer::ReSendToPlayer(players[1]); for(auto oit = observers.begin(); oit != observers.end(); ++oit) NetServer::ReSendToPlayer(*oit); + RefreshSingle(c1, l1, s1); + RefreshSingle(c2, l2, s2); break; } case MSG_FIELD_DISABLED: { @@ -939,9 +1036,16 @@ int SingleDuel::Analyze(char* msgbuffer, unsigned int len) { break; } case MSG_SPSUMMONING: { + pbufw = pbuf; + int cc = pbuf[4]; + /*int cl = pbuf[5];*/ + /*int cs = pbuf[6];*/ + int cp = pbuf[7]; pbuf += 8; - NetServer::SendBufferToPlayer(players[0], STOC_GAME_MSG, offset, pbuf - offset); - NetServer::ReSendToPlayer(players[1]); + NetServer::SendBufferToPlayer(players[cc], STOC_GAME_MSG, offset, pbuf - offset); + if (cp & POS_FACEDOWN) + BufferIO::Write(pbufw, 0); + NetServer::SendBufferToPlayer(players[1 - cc], STOC_GAME_MSG, offset, pbuf - offset); for(auto oit = observers.begin(); oit != observers.end(); ++oit) NetServer::ReSendToPlayer(*oit); break; @@ -1051,14 +1155,14 @@ int SingleDuel::Analyze(char* msgbuffer, unsigned int len) { break; } case MSG_CARD_SELECTED: { - player = BufferIO::ReadInt8(pbuf); - count = BufferIO::ReadInt8(pbuf); + player = BufferIO::Read(pbuf); + count = BufferIO::Read(pbuf); pbuf += count * 4; break; } case MSG_RANDOM_SELECTED: { - player = BufferIO::ReadInt8(pbuf); - count = BufferIO::ReadInt8(pbuf); + player = BufferIO::Read(pbuf); + count = BufferIO::Read(pbuf); pbuf += count * 4; NetServer::SendBufferToPlayer(players[player], STOC_GAME_MSG, offset, pbuf - offset); NetServer::ReSendToPlayer(players[1]); @@ -1067,7 +1171,7 @@ int SingleDuel::Analyze(char* msgbuffer, unsigned int len) { break; } case MSG_BECOME_TARGET: { - count = BufferIO::ReadInt8(pbuf); + count = BufferIO::Read(pbuf); pbuf += count * 4; NetServer::SendBufferToPlayer(players[0], STOC_GAME_MSG, offset, pbuf - offset); NetServer::ReSendToPlayer(players[1]); @@ -1076,14 +1180,14 @@ int SingleDuel::Analyze(char* msgbuffer, unsigned int len) { break; } case MSG_DRAW: { - player = BufferIO::ReadInt8(pbuf); - count = BufferIO::ReadInt8(pbuf); + player = BufferIO::Read(pbuf); + count = BufferIO::Read(pbuf); pbufw = pbuf; pbuf += count * 4; NetServer::SendBufferToPlayer(players[player], STOC_GAME_MSG, offset, pbuf - offset); for (int i = 0; i < count; ++i) { if(!(pbufw[3] & 0x80)) - BufferIO::WriteInt32(pbufw, 0); + BufferIO::Write(pbufw, 0); else pbufw += 4; } @@ -1157,7 +1261,7 @@ int SingleDuel::Analyze(char* msgbuffer, unsigned int len) { break; } case MSG_ADD_COUNTER: { - pbuf += 6; + pbuf += 7; NetServer::SendBufferToPlayer(players[0], STOC_GAME_MSG, offset, pbuf - offset); NetServer::ReSendToPlayer(players[1]); for(auto oit = observers.begin(); oit != observers.end(); ++oit) @@ -1165,7 +1269,7 @@ int SingleDuel::Analyze(char* msgbuffer, unsigned int len) { break; } case MSG_REMOVE_COUNTER: { - pbuf += 6; + pbuf += 7; NetServer::SendBufferToPlayer(players[0], STOC_GAME_MSG, offset, pbuf - offset); NetServer::ReSendToPlayer(players[1]); for(auto oit = observers.begin(); oit != observers.end(); ++oit) @@ -1220,8 +1324,8 @@ int SingleDuel::Analyze(char* msgbuffer, unsigned int len) { break; } case MSG_TOSS_COIN: { - player = BufferIO::ReadInt8(pbuf); - count = BufferIO::ReadInt8(pbuf); + player = BufferIO::Read(pbuf); + count = BufferIO::Read(pbuf); pbuf += count; NetServer::SendBufferToPlayer(players[0], STOC_GAME_MSG, offset, pbuf - offset); NetServer::ReSendToPlayer(players[1]); @@ -1230,8 +1334,8 @@ int SingleDuel::Analyze(char* msgbuffer, unsigned int len) { break; } case MSG_TOSS_DICE: { - player = BufferIO::ReadInt8(pbuf); - count = BufferIO::ReadInt8(pbuf); + player = BufferIO::Read(pbuf); + count = BufferIO::Read(pbuf); pbuf += count; NetServer::SendBufferToPlayer(players[0], STOC_GAME_MSG, offset, pbuf - offset); NetServer::ReSendToPlayer(players[1]); @@ -1239,29 +1343,38 @@ int SingleDuel::Analyze(char* msgbuffer, unsigned int len) { NetServer::ReSendToPlayer(*oit); break; } - case MSG_ANNOUNCE_RACE: { - player = BufferIO::ReadInt8(pbuf); - pbuf += 5; + case MSG_ROCK_PAPER_SCISSORS: { + player = BufferIO::Read(pbuf); WaitforResponse(player); NetServer::SendBufferToPlayer(players[player], STOC_GAME_MSG, offset, pbuf - offset); return 1; } - case MSG_ANNOUNCE_ATTRIB: { - player = BufferIO::ReadInt8(pbuf); + case MSG_HAND_RES: { + pbuf += 1; + NetServer::SendBufferToPlayer(players[0], STOC_GAME_MSG, offset, pbuf - offset); + NetServer::ReSendToPlayer(players[1]); + for (auto oit = observers.begin(); oit != observers.end(); ++oit) + NetServer::ReSendToPlayer(*oit); + break; + } + case MSG_ANNOUNCE_RACE: { + player = BufferIO::Read(pbuf); pbuf += 5; WaitforResponse(player); NetServer::SendBufferToPlayer(players[player], STOC_GAME_MSG, offset, pbuf - offset); return 1; } - case MSG_ANNOUNCE_CARD: { - player = BufferIO::ReadInt8(pbuf); + case MSG_ANNOUNCE_ATTRIB: { + player = BufferIO::Read(pbuf); + pbuf += 5; WaitforResponse(player); NetServer::SendBufferToPlayer(players[player], STOC_GAME_MSG, offset, pbuf - offset); return 1; } + case MSG_ANNOUNCE_CARD: case MSG_ANNOUNCE_NUMBER: { - player = BufferIO::ReadInt8(pbuf); - count = BufferIO::ReadInt8(pbuf); + player = BufferIO::Read(pbuf); + count = BufferIO::Read(pbuf); pbuf += 4 * count; WaitforResponse(player); NetServer::SendBufferToPlayer(players[player], STOC_GAME_MSG, offset, pbuf - offset); @@ -1275,8 +1388,16 @@ int SingleDuel::Analyze(char* msgbuffer, unsigned int len) { NetServer::ReSendToPlayer(*oit); break; } + case MSG_PLAYER_HINT: { + pbuf += 6; + NetServer::SendBufferToPlayer(players[0], STOC_GAME_MSG, offset, pbuf - offset); + NetServer::ReSendToPlayer(players[1]); + for(auto oit = observers.begin(); oit != observers.end(); ++oit) + NetServer::ReSendToPlayer(*oit); + break; + } case MSG_MATCH_KILL: { - int code = BufferIO::ReadInt32(pbuf); + int code = BufferIO::Read(pbuf); if(match_mode) { match_kill = code; NetServer::SendBufferToPlayer(players[0], STOC_GAME_MSG, offset, pbuf - offset); @@ -1290,10 +1411,12 @@ int SingleDuel::Analyze(char* msgbuffer, unsigned int len) { } return 0; } -void SingleDuel::GetResponse(DuelPlayer* dp, void* pdata, unsigned int len) { - byte resb[64]; - memcpy(resb, pdata, len); - last_replay.WriteInt8(len); +void SingleDuel::GetResponse(DuelPlayer* dp, unsigned char* pdata, unsigned int len) { + unsigned char resb[SIZE_RETURN_VALUE]{}; + if (len > SIZE_RETURN_VALUE) + len = SIZE_RETURN_VALUE; + std::memcpy(resb, pdata, len); + last_replay.Write(len); last_replay.WriteData(resb, len); set_responseb(pduel, resb); players[dp->type]->state = 0xff; @@ -1301,7 +1424,7 @@ void SingleDuel::GetResponse(DuelPlayer* dp, void* pdata, unsigned int len) { if(time_limit[dp->type] >= time_elapsed) time_limit[dp->type] -= time_elapsed; else time_limit[dp->type] = 0; - event_del(etimer); + time_elapsed = 0; } Process(); } @@ -1310,14 +1433,15 @@ void SingleDuel::EndDuel() { return; last_replay.EndRecord(); char replaybuf[0x2000], *pbuf = replaybuf; - memcpy(pbuf, &last_replay.pheader, sizeof(ReplayHeader)); - pbuf += sizeof(ReplayHeader); - memcpy(pbuf, last_replay.comp_data, last_replay.comp_size); - NetServer::SendBufferToPlayer(players[0], STOC_REPLAY, replaybuf, sizeof(ReplayHeader) + last_replay.comp_size); + std::memcpy(pbuf, &last_replay.pheader, sizeof last_replay.pheader); + pbuf += sizeof last_replay.pheader; + std::memcpy(pbuf, last_replay.comp_data, last_replay.comp_size); + NetServer::SendBufferToPlayer(players[0], STOC_REPLAY, replaybuf, sizeof last_replay.pheader + last_replay.comp_size); NetServer::ReSendToPlayer(players[1]); for(auto oit = observers.begin(); oit != observers.end(); ++oit) NetServer::ReSendToPlayer(*oit); end_duel(pduel); + event_del(etimer); pduel = 0; } void SingleDuel::WaitforResponse(int playerid) { @@ -1340,138 +1464,134 @@ void SingleDuel::TimeConfirm(DuelPlayer* dp) { if(dp->type != last_response) return; players[last_response]->state = CTOS_RESPONSE; - time_elapsed = 0; - timeval timeout = {1, 0}; - event_add(etimer, &timeout); + if(time_elapsed < 10) + time_elapsed = 0; +} +inline int SingleDuel::WriteUpdateData(int& player, int location, int& flag, unsigned char*& qbuf, int& use_cache) { + flag |= (QUERY_CODE | QUERY_POSITION); + BufferIO::Write(qbuf, MSG_UPDATE_DATA); + BufferIO::Write(qbuf, player); + BufferIO::Write(qbuf, location); + int len = query_field_card(pduel, player, location, flag, qbuf, use_cache); + return len; } void SingleDuel::RefreshMzone(int player, int flag, int use_cache) { - char query_buffer[0x1000]; - char* qbuf = query_buffer; - BufferIO::WriteInt8(qbuf, MSG_UPDATE_DATA); - BufferIO::WriteInt8(qbuf, player); - BufferIO::WriteInt8(qbuf, LOCATION_MZONE); - int len = query_field_card(pduel, player, LOCATION_MZONE, flag, (unsigned char*)qbuf, use_cache); - NetServer::SendBufferToPlayer(players[player], STOC_GAME_MSG, query_buffer, len + 3); - for (int i = 0; i < 5; ++i) { - int clen = BufferIO::ReadInt32(qbuf); - if (clen == 4) + std::vector query_buffer; + query_buffer.resize(SIZE_QUERY_BUFFER); + auto qbuf = query_buffer.data(); + auto len = WriteUpdateData(player, LOCATION_MZONE, flag, qbuf, use_cache); + NetServer::SendBufferToPlayer(players[player], STOC_GAME_MSG, query_buffer.data(), len + 3); + int qlen = 0; + while(qlen < len) { + const int clen = BufferIO::Read(qbuf); + qlen += clen; + if (clen <= LEN_HEADER) continue; - if (qbuf[11] & POS_FACEDOWN) - memset(qbuf, 0, clen - 4); + auto position = GetPosition(qbuf, 8); + if (position & POS_FACEDOWN) + std::memset(qbuf, 0, clen - 4); qbuf += clen - 4; } - NetServer::SendBufferToPlayer(players[1 - player], STOC_GAME_MSG, query_buffer, len + 3); + NetServer::SendBufferToPlayer(players[1 - player], STOC_GAME_MSG, query_buffer.data(), len + 3); for(auto pit = observers.begin(); pit != observers.end(); ++pit) NetServer::ReSendToPlayer(*pit); } void SingleDuel::RefreshSzone(int player, int flag, int use_cache) { - char query_buffer[0x1000]; - char* qbuf = query_buffer; - BufferIO::WriteInt8(qbuf, MSG_UPDATE_DATA); - BufferIO::WriteInt8(qbuf, player); - BufferIO::WriteInt8(qbuf, LOCATION_SZONE); - int len = query_field_card(pduel, player, LOCATION_SZONE, flag, (unsigned char*)qbuf, use_cache); - NetServer::SendBufferToPlayer(players[player], STOC_GAME_MSG, query_buffer, len + 3); - for (int i = 0; i < 8; ++i) { - int clen = BufferIO::ReadInt32(qbuf); - if (clen == 4) + std::vector query_buffer; + query_buffer.resize(SIZE_QUERY_BUFFER); + auto qbuf = query_buffer.data(); + auto len = WriteUpdateData(player, LOCATION_SZONE, flag, qbuf, use_cache); + NetServer::SendBufferToPlayer(players[player], STOC_GAME_MSG, query_buffer.data(), len + 3); + int qlen = 0; + while(qlen < len) { + const int clen = BufferIO::Read(qbuf); + qlen += clen; + if (clen <= LEN_HEADER) continue; - if (qbuf[11] & POS_FACEDOWN) - memset(qbuf, 0, clen - 4); + auto position = GetPosition(qbuf, 8); + if (position & POS_FACEDOWN) + std::memset(qbuf, 0, clen - 4); qbuf += clen - 4; } - NetServer::SendBufferToPlayer(players[1 - player], STOC_GAME_MSG, query_buffer, len + 3); + NetServer::SendBufferToPlayer(players[1 - player], STOC_GAME_MSG, query_buffer.data(), len + 3); for(auto pit = observers.begin(); pit != observers.end(); ++pit) NetServer::ReSendToPlayer(*pit); } void SingleDuel::RefreshHand(int player, int flag, int use_cache) { - char query_buffer[0x1000]; - char* qbuf = query_buffer; - BufferIO::WriteInt8(qbuf, MSG_UPDATE_DATA); - BufferIO::WriteInt8(qbuf, player); - BufferIO::WriteInt8(qbuf, LOCATION_HAND); - int len = query_field_card(pduel, player, LOCATION_HAND, flag | QUERY_IS_PUBLIC, (unsigned char*)qbuf, use_cache); - NetServer::SendBufferToPlayer(players[player], STOC_GAME_MSG, query_buffer, len + 3); - int qlen = 0, slen; + std::vector query_buffer; + query_buffer.resize(SIZE_QUERY_BUFFER); + auto qbuf = query_buffer.data(); + auto len = WriteUpdateData(player, LOCATION_HAND, flag, qbuf, use_cache); + NetServer::SendBufferToPlayer(players[player], STOC_GAME_MSG, query_buffer.data(), len + 3); + int qlen = 0; while(qlen < len) { - slen = BufferIO::ReadInt32(qbuf); - int qflag = *(int*)qbuf; - int pos = slen - 8; - if(qflag & QUERY_LSCALE) - pos -= 4; - if(qflag & QUERY_RSCALE) - pos -= 4; - if(!qbuf[pos]) - memset(qbuf, 0, slen - 4); - qbuf += slen - 4; + const int slen = BufferIO::Read(qbuf); qlen += slen; + if (slen <= LEN_HEADER) + continue; + auto position = GetPosition(qbuf, 8); + if(!(position & POS_FACEUP)) + std::memset(qbuf, 0, slen - 4); + qbuf += slen - 4; } - NetServer::SendBufferToPlayer(players[1 - player], STOC_GAME_MSG, query_buffer, len + 3); + NetServer::SendBufferToPlayer(players[1 - player], STOC_GAME_MSG, query_buffer.data(), len + 3); for(auto pit = observers.begin(); pit != observers.end(); ++pit) NetServer::ReSendToPlayer(*pit); } void SingleDuel::RefreshGrave(int player, int flag, int use_cache) { - char query_buffer[0x1000]; - char* qbuf = query_buffer; - BufferIO::WriteInt8(qbuf, MSG_UPDATE_DATA); - BufferIO::WriteInt8(qbuf, player); - BufferIO::WriteInt8(qbuf, LOCATION_GRAVE); - int len = query_field_card(pduel, player, LOCATION_GRAVE, flag, (unsigned char*)qbuf, use_cache); - NetServer::SendBufferToPlayer(players[0], STOC_GAME_MSG, query_buffer, len + 3); + std::vector query_buffer; + query_buffer.resize(SIZE_QUERY_BUFFER); + auto qbuf = query_buffer.data(); + auto len = WriteUpdateData(player, LOCATION_GRAVE, flag, qbuf, use_cache); + NetServer::SendBufferToPlayer(players[0], STOC_GAME_MSG, query_buffer.data(), len + 3); NetServer::ReSendToPlayer(players[1]); for(auto pit = observers.begin(); pit != observers.end(); ++pit) NetServer::ReSendToPlayer(*pit); } void SingleDuel::RefreshExtra(int player, int flag, int use_cache) { - char query_buffer[0x1000]; - char* qbuf = query_buffer; - BufferIO::WriteInt8(qbuf, MSG_UPDATE_DATA); - BufferIO::WriteInt8(qbuf, player); - BufferIO::WriteInt8(qbuf, LOCATION_EXTRA); - int len = query_field_card(pduel, player, LOCATION_EXTRA, flag, (unsigned char*)qbuf, use_cache); - NetServer::SendBufferToPlayer(players[player], STOC_GAME_MSG, query_buffer, len + 3); + std::vector query_buffer; + query_buffer.resize(SIZE_QUERY_BUFFER); + auto qbuf = query_buffer.data(); + auto len = WriteUpdateData(player, LOCATION_EXTRA, flag, qbuf, use_cache); + NetServer::SendBufferToPlayer(players[player], STOC_GAME_MSG, query_buffer.data(), len + 3); } void SingleDuel::RefreshSingle(int player, int location, int sequence, int flag) { - char query_buffer[0x1000]; - char* qbuf = query_buffer; - BufferIO::WriteInt8(qbuf, MSG_UPDATE_CARD); - BufferIO::WriteInt8(qbuf, player); - BufferIO::WriteInt8(qbuf, location); - BufferIO::WriteInt8(qbuf, sequence); - int len = query_card(pduel, player, location, sequence, flag, (unsigned char*)qbuf, 0); + flag |= (QUERY_CODE | QUERY_POSITION); + unsigned char query_buffer[0x1000]; + auto qbuf = query_buffer; + BufferIO::Write(qbuf, MSG_UPDATE_CARD); + BufferIO::Write(qbuf, player); + BufferIO::Write(qbuf, location); + BufferIO::Write(qbuf, sequence); + int len = query_card(pduel, player, location, sequence, flag, qbuf, 0); NetServer::SendBufferToPlayer(players[player], STOC_GAME_MSG, query_buffer, len + 4); - if(location == LOCATION_REMOVED && (qbuf[15] & POS_FACEDOWN)) + if (len <= LEN_HEADER) return; - if ((location & 0x90) || ((location & 0x2c) && (qbuf[15] & POS_FACEUP))) { - NetServer::ReSendToPlayer(players[1 - player]); - for(auto pit = observers.begin(); pit != observers.end(); ++pit) - NetServer::ReSendToPlayer(*pit); + const int clen = BufferIO::Read(qbuf); + auto position = GetPosition(qbuf, 8); + if (position & POS_FACEDOWN) { + BufferIO::Write(qbuf, QUERY_CODE); + BufferIO::Write(qbuf, 0); + std::memset(qbuf, 0, clen - 12); } + NetServer::SendBufferToPlayer(players[1 - player], STOC_GAME_MSG, query_buffer, len + 4); + for (auto pit = observers.begin(); pit != observers.end(); ++pit) + NetServer::ReSendToPlayer(*pit); } -int SingleDuel::MessageHandler(long fduel, int type) { +uint32_t SingleDuel::MessageHandler(intptr_t fduel, uint32_t type) { if(!enable_log) return 0; char msgbuf[1024]; - get_log_message(fduel, (byte*)msgbuf); - if(enable_log == 1) { - wchar_t wbuf[1024]; - BufferIO::DecodeUTF8(msgbuf, wbuf); - mainGame->AddChatMsg(wbuf, 9); - } else if(enable_log == 2) { - FILE* fp = fopen("error.log", "at"); - if(!fp) - return 0; - fprintf(fp, "[Script error:] %s\n", msgbuf); - fclose(fp); - } + get_log_message(fduel, msgbuf); + mainGame->AddDebugMsg(msgbuf); return 0; } void SingleDuel::SingleTimer(evutil_socket_t fd, short events, void* arg) { SingleDuel* sd = static_cast(arg); sd->time_elapsed++; - if(sd->time_elapsed >= sd->time_limit[sd->last_response]) { + if(sd->time_elapsed >= sd->time_limit[sd->last_response] || sd->time_limit[sd->last_response] <= 0) { unsigned char wbuf[3]; - uint32 player = sd->last_response; + uint32_t player = sd->last_response; wbuf[0] = MSG_WIN; wbuf[1] = 1 - player; wbuf[2] = 0x3; @@ -1489,7 +1609,10 @@ void SingleDuel::SingleTimer(evutil_socket_t fd, short events, void* arg) { sd->EndDuel(); sd->DuelEndProc(); event_del(sd->etimer); + return; } + timeval timeout = { 1, 0 }; + event_add(sd->etimer, &timeout); } } diff --git a/gframe/single_duel.h b/gframe/single_duel.h index 41984d0c49..326d48d354 100644 --- a/gframe/single_duel.h +++ b/gframe/single_duel.h @@ -1,8 +1,9 @@ #ifndef SINGLE_DUEL_H #define SINGLE_DUEL_H -#include "config.h" +#include #include "network.h" +#include "deck_manager.h" #include "replay.h" namespace ygo { @@ -10,53 +11,57 @@ namespace ygo { class SingleDuel: public DuelMode { public: SingleDuel(bool is_match); - virtual ~SingleDuel(); - virtual void Chat(DuelPlayer* dp, void* pdata, int len); - virtual void JoinGame(DuelPlayer* dp, void* pdata, bool is_creater); - virtual void LeaveGame(DuelPlayer* dp); - virtual void ToDuelist(DuelPlayer* dp); - virtual void ToObserver(DuelPlayer* dp); - virtual void PlayerReady(DuelPlayer* dp, bool ready); - virtual void PlayerKick(DuelPlayer* dp, unsigned char pos); - virtual void UpdateDeck(DuelPlayer* dp, void* pdata); - virtual void StartDuel(DuelPlayer* dp); - virtual void HandResult(DuelPlayer* dp, unsigned char res); - virtual void TPResult(DuelPlayer* dp, unsigned char tp); - virtual void Process(); - virtual void Surrender(DuelPlayer* dp); - virtual int Analyze(char* msgbuffer, unsigned int len); - virtual void GetResponse(DuelPlayer* dp, void* pdata, unsigned int len); - virtual void TimeConfirm(DuelPlayer* dp); - virtual void EndDuel(); + ~SingleDuel() override; + void Chat(DuelPlayer* dp, unsigned char* pdata, int len) override; + void JoinGame(DuelPlayer* dp, unsigned char* pdata, bool is_creater) override; + void LeaveGame(DuelPlayer* dp) override; + void ToDuelist(DuelPlayer* dp) override; + void ToObserver(DuelPlayer* dp) override; + void PlayerReady(DuelPlayer* dp, bool is_ready) override; + void PlayerKick(DuelPlayer* dp, unsigned char pos) override; + void UpdateDeck(DuelPlayer* dp, unsigned char* pdata, int len) override; + void StartDuel(DuelPlayer* dp) override; + void HandResult(DuelPlayer* dp, unsigned char res) override; + void TPResult(DuelPlayer* dp, unsigned char tp) override; + void Process() override; + void Surrender(DuelPlayer* dp) override; + int Analyze(unsigned char* msgbuffer, unsigned int len) override; + void GetResponse(DuelPlayer* dp, unsigned char* pdata, unsigned int len) override; + void TimeConfirm(DuelPlayer* dp) override; + void EndDuel() override; void DuelEndProc(); void WaitforResponse(int playerid); - void RefreshMzone(int player, int flag = 0x81fff, int use_cache = 1); + void RefreshMzone(int player, int flag = 0x881fff, int use_cache = 1); void RefreshSzone(int player, int flag = 0x681fff, int use_cache = 1); - void RefreshHand(int player, int flag = 0x781fff, int use_cache = 1); + void RefreshHand(int player, int flag = 0x681fff, int use_cache = 1); void RefreshGrave(int player, int flag = 0x81fff, int use_cache = 1); - void RefreshExtra(int player, int flag = 0x81fff, int use_cache = 1); - void RefreshSingle(int player, int location, int sequence, int flag = 0x781fff); - - static int MessageHandler(long fduel, int type); + void RefreshExtra(int player, int flag = 0xe81fff, int use_cache = 1); + void RefreshSingle(int player, int location, int sequence, int flag = 0xf81fff); + + static uint32_t MessageHandler(intptr_t fduel, uint32_t type); static void SingleTimer(evutil_socket_t fd, short events, void* arg); + +private: + int WriteUpdateData(int& player, int location, int& flag, unsigned char*& qbuf, int& use_cache); protected: - DuelPlayer* players[2]; - DuelPlayer* pplayer[2]; - bool ready[2]; + DuelPlayer* players[2]{}; + DuelPlayer* pplayer[2]{}; + bool ready[2]{}; Deck pdeck[2]; - unsigned char hand_result[2]; - unsigned char last_response; + int deck_error[2]{}; + unsigned char hand_result[2]{}; + unsigned char last_response{ 0 }; std::set observers; Replay last_replay; - bool match_mode; - int match_kill; - unsigned char duel_count; - unsigned char tp_player; - unsigned char match_result[3]; - unsigned short time_limit[2]; - unsigned short time_elapsed; + bool match_mode{ false }; + int match_kill{ 0 }; + unsigned char duel_count{ 0 }; + unsigned char tp_player{ 0 }; + unsigned char match_result[3]{}; + short time_limit[2]{}; + short time_elapsed{ 0 }; }; } diff --git a/gframe/single_mode.cpp b/gframe/single_mode.cpp index 0d4b66ad05..09079b6bc4 100644 --- a/gframe/single_mode.cpp +++ b/gframe/single_mode.cpp @@ -1,19 +1,19 @@ #include "single_mode.h" #include "duelclient.h" #include "game.h" -#include "../ocgcore/duel.h" -#include "../ocgcore/field.h" -#include "../ocgcore/mtrandom.h" +#include "data_manager.h" +#include +#include namespace ygo { -long SingleMode::pduel = 0; +intptr_t SingleMode::pduel = 0; bool SingleMode::is_closing = false; bool SingleMode::is_continuing = false; -wchar_t SingleMode::event_string[256]; +Replay SingleMode::last_replay; bool SingleMode::StartPlay() { - Thread::NewThread(SinglePlayThread, 0); + std::thread(SinglePlayThread).detach(); return true; } void SingleMode::StopPlay(bool is_exiting) { @@ -22,110 +22,185 @@ void SingleMode::StopPlay(bool is_exiting) { mainGame->actionSignal.Set(); mainGame->singleSignal.Set(); } -void SingleMode::SetResponse(unsigned char* resp) { +void SingleMode::SetResponse(unsigned char* resp, unsigned int len) { if(!pduel) return; + last_replay.Write(len); + last_replay.WriteData(resp, len); set_responseb(pduel, resp); } -int SingleMode::SinglePlayThread(void* param) { - const wchar_t* name = mainGame->lstSinglePlayList->getListItem(mainGame->lstSinglePlayList->getSelected()); - wchar_t fname[256]; - myswprintf(fname, L"./single/%ls", name); - char fname2[256]; - size_t slen = BufferIO::EncodeUTF8(fname, fname2); - mtrandom rnd; - time_t seed = time(0); - rnd.reset(seed); - set_card_reader((card_reader)DataManager::CardReader); - set_message_handler((message_handler)MessageHandler); - pduel = create_duel(rnd.rand()); - set_player_info(pduel, 0, 8000, 5, 1); - set_player_info(pduel, 1, 8000, 5, 1); - mainGame->dInfo.lp[0] = 8000; - mainGame->dInfo.lp[1] = 8000; +int SingleMode::SinglePlayThread() { + const int start_lp = 8000; + const int start_hand = 5; + const int draw_count = 1; + mainGame->dInfo.Clear(); + int opt = 0; + std::random_device rd; + ExtendedReplayHeader rh; + rh.base.id = REPLAY_ID_YRP2; + rh.base.version = PRO_VERSION; + rh.base.flag = REPLAY_UNIFORM | REPLAY_SINGLE_MODE; + rh.base.start_time = (uint32_t)std::time(nullptr); + for (auto& x : rh.seed_sequence) + x = rd(); + std::seed_seq seed(rh.seed_sequence, rh.seed_sequence + SEED_COUNT); + std::mt19937 rnd(seed); + uint32_t duel_seed[SEED_COUNT]{}; + for (auto& x : duel_seed) + x = rnd(); + set_script_reader(DataManager::ScriptReaderEx); + set_card_reader(DataManager::CardReader); + set_message_handler(SingleMode::MessageHandler); + pduel = create_duel_v2(duel_seed); + set_player_info(pduel, 0, start_lp, start_hand, draw_count); + set_player_info(pduel, 1, start_lp, start_hand, draw_count); + mainGame->dInfo.lp[0] = start_lp; + mainGame->dInfo.lp[1] = start_lp; + mainGame->dInfo.start_lp = start_lp; myswprintf(mainGame->dInfo.strLP[0], L"%d", mainGame->dInfo.lp[0]); myswprintf(mainGame->dInfo.strLP[1], L"%d", mainGame->dInfo.lp[1]); - BufferIO::CopyWStr(mainGame->ebNickName->getText(), mainGame->dInfo.hostname, 20); + BufferIO::CopyWideString(mainGame->ebNickName->getText(), mainGame->dInfo.hostname); mainGame->dInfo.clientname[0] = 0; + mainGame->dInfo.player_type = 0; mainGame->dInfo.turn = 0; - mainGame->dInfo.strTurn[0] = 0; - if(!preload_script(pduel, fname2, slen)) { + if(mainGame->chkSinglePlayReturnDeckTop->isChecked()) + opt |= DUEL_RETURN_DECK_TOP; + char filename[256]{}; + int slen = 0; + if(open_file) { + open_file = false; + slen = BufferIO::EncodeUTF8(open_file_name, filename); + if(!preload_script(pduel, filename)) { + wchar_t fname[256]{}; + myswprintf(fname, L"./single/%ls", open_file_name); + slen = BufferIO::EncodeUTF8(fname, filename); + if(!preload_script(pduel, filename)) + slen = 0; + } + } else { + const wchar_t* name = mainGame->lstSinglePlayList->getListItem(mainGame->lstSinglePlayList->getSelected()); + wchar_t fname[256]{}; + myswprintf(fname, L"./single/%ls", name); + slen = BufferIO::EncodeUTF8(fname, filename); + if(!preload_script(pduel, filename)) + slen = 0; + } + if(slen == 0) { end_duel(pduel); return 0; } - mainGame->gMutex.Lock(); + mainGame->gMutex.lock(); mainGame->HideElement(mainGame->wSinglePlay); + mainGame->ClearCardInfo(); mainGame->wCardImg->setVisible(true); mainGame->wInfos->setVisible(true); mainGame->btnLeaveGame->setVisible(true); mainGame->btnLeaveGame->setText(dataManager.GetSysString(1210)); - mainGame->stName->setText(L""); - mainGame->stInfo->setText(L""); - mainGame->stDataInfo->setText(L""); - mainGame->stText->setText(L""); - mainGame->scrCardText->setVisible(false); mainGame->wPhase->setVisible(true); - mainGame->dField.panel = 0; - mainGame->dField.hovered_card = 0; - mainGame->dField.clicked_card = 0; mainGame->dField.Clear(); mainGame->dInfo.isFirst = true; mainGame->dInfo.isStarted = true; + mainGame->dInfo.isFinished = false; mainGame->dInfo.isSingleMode = true; mainGame->device->setEventReceiver(&mainGame->dField); - mainGame->gMutex.Unlock(); - start_duel(pduel, 0); - char engineBuffer[0x1000]; + mainGame->gMutex.unlock(); + std::vector engineBuffer; + engineBuffer.resize(SIZE_MESSAGE_BUFFER); is_closing = false; is_continuing = true; - int len = 0; + int len = get_message(pduel, engineBuffer.data()); + if (len > 0) + is_continuing = SinglePlayAnalyze(engineBuffer.data(), len); + last_replay.BeginRecord(); + last_replay.WriteHeader(rh); + uint16_t host_name[20]{}; + BufferIO::CopyCharArray(mainGame->dInfo.hostname, host_name); + last_replay.WriteData(host_name, sizeof host_name, false); + uint16_t client_name[20]{}; + BufferIO::CopyCharArray(mainGame->dInfo.clientname, client_name); + last_replay.WriteData(client_name, sizeof client_name, false); + last_replay.WriteInt32(start_lp, false); + last_replay.WriteInt32(start_hand, false); + last_replay.WriteInt32(draw_count, false); + last_replay.WriteInt32(opt, false); + last_replay.Write(slen, false); + last_replay.WriteData(filename, slen, false); + last_replay.Flush(); + start_duel(pduel, opt); while (is_continuing) { - int result = process(pduel); - len = result & 0xffff; - /* int flag = result >> 16; */ + unsigned int result = process(pduel); + len = result & PROCESSOR_BUFFER_LEN; if (len > 0) { - get_message(pduel, (byte*)engineBuffer); - is_continuing = SinglePlayAnalyze(engineBuffer, len); + if (len > (int)engineBuffer.size()) + engineBuffer.resize(len); + get_message(pduel, engineBuffer.data()); + is_continuing = SinglePlayAnalyze(engineBuffer.data(), len); } } + last_replay.EndRecord(); + mainGame->gMutex.lock(); + time_t nowtime = std::time(nullptr); + wchar_t timetext[40]; + std::wcsftime(timetext, sizeof timetext / sizeof timetext[0], L"%Y-%m-%d %H-%M-%S", std::localtime(&nowtime)); + mainGame->ebRSName->setText(timetext); + if(!mainGame->chkAutoSaveReplay->isChecked()) { + mainGame->wReplaySave->setText(dataManager.GetSysString(1340)); + mainGame->PopupElement(mainGame->wReplaySave); + mainGame->gMutex.unlock(); + mainGame->replaySignal.Reset(); + mainGame->replaySignal.Wait(); + } else { + mainGame->actionParam = 1; + wchar_t msgbuf[256]; + myswprintf(msgbuf, dataManager.GetSysString(1367), timetext); + mainGame->SetStaticText(mainGame->stACMessage, 310, mainGame->guiFont, msgbuf); + mainGame->PopupElement(mainGame->wACMessage, 20); + mainGame->gMutex.unlock(); + mainGame->WaitFrameSignal(30); + } + if(mainGame->actionParam) + last_replay.SaveReplay(mainGame->ebRSName->getText()); end_duel(pduel); if(!is_closing) { - mainGame->gMutex.Lock(); + mainGame->gMutex.lock(); mainGame->dInfo.isStarted = false; + mainGame->dInfo.isInDuel = false; + mainGame->dInfo.isFinished = true; mainGame->dInfo.isSingleMode = false; - mainGame->gMutex.Unlock(); + mainGame->gMutex.unlock(); mainGame->closeDoneSignal.Reset(); mainGame->closeSignal.Set(); mainGame->closeDoneSignal.Wait(); - mainGame->gMutex.Lock(); + mainGame->gMutex.lock(); mainGame->ShowElement(mainGame->wSinglePlay); + mainGame->stTip->setVisible(false); mainGame->device->setEventReceiver(&mainGame->menuHandler); - mainGame->gMutex.Unlock(); + mainGame->gMutex.unlock(); + if(exit_on_return) + mainGame->device->closeDevice(); } return 0; } -bool SingleMode::SinglePlayAnalyze(char* msg, unsigned int len) { - char* offset, *pbuf = msg; +bool SingleMode::SinglePlayAnalyze(unsigned char* msg, unsigned int len) { + unsigned char* offset, * pbuf = msg; int player, count; while (pbuf - msg < (int)len) { if(is_closing || !is_continuing) return false; offset = pbuf; - mainGame->dInfo.curMsg = BufferIO::ReadUInt8(pbuf); + mainGame->dInfo.curMsg = BufferIO::Read(pbuf); switch (mainGame->dInfo.curMsg) { case MSG_RETRY: { - mainGame->gMutex.Lock(); - mainGame->stMessage->setText(L"Error occurs."); - mainGame->PopupElement(mainGame->wMessage); - mainGame->gMutex.Unlock(); - mainGame->actionSignal.Reset(); - mainGame->actionSignal.Wait(); - return false; + if(!DuelClient::ClientAnalyze(offset, pbuf - offset)) { + mainGame->singleSignal.Reset(); + mainGame->singleSignal.Wait(); + } + break; } case MSG_HINT: { - /*int type = */BufferIO::ReadInt8(pbuf); - int player = BufferIO::ReadInt8(pbuf); - /*int data = */BufferIO::ReadInt32(pbuf); + /*int type = */BufferIO::Read(pbuf); + int player = BufferIO::Read(pbuf); + /*int data = */BufferIO::Read(pbuf); if(player == 0) DuelClient::ClientAnalyze(offset, pbuf - offset); break; @@ -136,10 +211,10 @@ bool SingleMode::SinglePlayAnalyze(char* msg, unsigned int len) { return false; } case MSG_SELECT_BATTLECMD: { - player = BufferIO::ReadInt8(pbuf); - count = BufferIO::ReadInt8(pbuf); + player = BufferIO::Read(pbuf); + count = BufferIO::Read(pbuf); pbuf += count * 11; - count = BufferIO::ReadInt8(pbuf); + count = BufferIO::Read(pbuf); pbuf += count * 8 + 2; SinglePlayRefresh(); if(!DuelClient::ClientAnalyze(offset, pbuf - offset)) { @@ -149,18 +224,18 @@ bool SingleMode::SinglePlayAnalyze(char* msg, unsigned int len) { break; } case MSG_SELECT_IDLECMD: { - player = BufferIO::ReadInt8(pbuf); - count = BufferIO::ReadInt8(pbuf); + player = BufferIO::Read(pbuf); + count = BufferIO::Read(pbuf); pbuf += count * 7; - count = BufferIO::ReadInt8(pbuf); + count = BufferIO::Read(pbuf); pbuf += count * 7; - count = BufferIO::ReadInt8(pbuf); + count = BufferIO::Read(pbuf); pbuf += count * 7; - count = BufferIO::ReadInt8(pbuf); + count = BufferIO::Read(pbuf); pbuf += count * 7; - count = BufferIO::ReadInt8(pbuf); + count = BufferIO::Read(pbuf); pbuf += count * 7; - count = BufferIO::ReadInt8(pbuf); + count = BufferIO::Read(pbuf); pbuf += count * 11 + 3; SinglePlayRefresh(); if(!DuelClient::ClientAnalyze(offset, pbuf - offset)) { @@ -170,8 +245,8 @@ bool SingleMode::SinglePlayAnalyze(char* msg, unsigned int len) { break; } case MSG_SELECT_EFFECTYN: { - player = BufferIO::ReadInt8(pbuf); - pbuf += 8; + player = BufferIO::Read(pbuf); + pbuf += 12; DuelClient::ClientAnalyze(offset, pbuf - offset); if(!DuelClient::ClientAnalyze(offset, pbuf - offset)) { mainGame->singleSignal.Reset(); @@ -180,7 +255,7 @@ bool SingleMode::SinglePlayAnalyze(char* msg, unsigned int len) { break; } case MSG_SELECT_YESNO: { - player = BufferIO::ReadInt8(pbuf); + player = BufferIO::Read(pbuf); pbuf += 4; if(!DuelClient::ClientAnalyze(offset, pbuf - offset)) { mainGame->singleSignal.Reset(); @@ -189,8 +264,8 @@ bool SingleMode::SinglePlayAnalyze(char* msg, unsigned int len) { break; } case MSG_SELECT_OPTION: { - player = BufferIO::ReadInt8(pbuf); - count = BufferIO::ReadInt8(pbuf); + player = BufferIO::Read(pbuf); + count = BufferIO::Read(pbuf); pbuf += count * 4; if(!DuelClient::ClientAnalyze(offset, pbuf - offset)) { mainGame->singleSignal.Reset(); @@ -200,9 +275,22 @@ bool SingleMode::SinglePlayAnalyze(char* msg, unsigned int len) { } case MSG_SELECT_CARD: case MSG_SELECT_TRIBUTE: { - player = BufferIO::ReadInt8(pbuf); + player = BufferIO::Read(pbuf); pbuf += 3; - count = BufferIO::ReadInt8(pbuf); + count = BufferIO::Read(pbuf); + pbuf += count * 8; + if(!DuelClient::ClientAnalyze(offset, pbuf - offset)) { + mainGame->singleSignal.Reset(); + mainGame->singleSignal.Wait(); + } + break; + } + case MSG_SELECT_UNSELECT_CARD: { + player = BufferIO::Read(pbuf); + pbuf += 4; + count = BufferIO::Read(pbuf); + pbuf += count * 8; + count = BufferIO::Read(pbuf); pbuf += count * 8; if(!DuelClient::ClientAnalyze(offset, pbuf - offset)) { mainGame->singleSignal.Reset(); @@ -211,9 +299,9 @@ bool SingleMode::SinglePlayAnalyze(char* msg, unsigned int len) { break; } case MSG_SELECT_CHAIN: { - player = BufferIO::ReadInt8(pbuf); - count = BufferIO::ReadInt8(pbuf); - pbuf += 10 + count * 12; + player = BufferIO::Read(pbuf); + count = BufferIO::Read(pbuf); + pbuf += 9 + count * 14; if(!DuelClient::ClientAnalyze(offset, pbuf - offset)) { mainGame->singleSignal.Reset(); mainGame->singleSignal.Wait(); @@ -222,7 +310,7 @@ bool SingleMode::SinglePlayAnalyze(char* msg, unsigned int len) { } case MSG_SELECT_PLACE: case MSG_SELECT_DISFIELD: { - player = BufferIO::ReadInt8(pbuf); + player = BufferIO::Read(pbuf); pbuf += 5; if(!DuelClient::ClientAnalyze(offset, pbuf - offset)) { mainGame->singleSignal.Reset(); @@ -231,7 +319,7 @@ bool SingleMode::SinglePlayAnalyze(char* msg, unsigned int len) { break; } case MSG_SELECT_POSITION: { - player = BufferIO::ReadInt8(pbuf); + player = BufferIO::Read(pbuf); pbuf += 5; if(!DuelClient::ClientAnalyze(offset, pbuf - offset)) { mainGame->singleSignal.Reset(); @@ -240,10 +328,10 @@ bool SingleMode::SinglePlayAnalyze(char* msg, unsigned int len) { break; } case MSG_SELECT_COUNTER: { - player = BufferIO::ReadInt8(pbuf); - pbuf += 3; - count = BufferIO::ReadInt8(pbuf); - pbuf += count * 8; + player = BufferIO::Read(pbuf); + pbuf += 4; + count = BufferIO::Read(pbuf); + pbuf += count * 9; if(!DuelClient::ClientAnalyze(offset, pbuf - offset)) { mainGame->singleSignal.Reset(); mainGame->singleSignal.Wait(); @@ -252,9 +340,11 @@ bool SingleMode::SinglePlayAnalyze(char* msg, unsigned int len) { } case MSG_SELECT_SUM: { pbuf++; - player = BufferIO::ReadInt8(pbuf); + player = BufferIO::Read(pbuf); pbuf += 6; - count = BufferIO::ReadInt8(pbuf); + count = BufferIO::Read(pbuf); + pbuf += count * 11; + count = BufferIO::Read(pbuf); pbuf += count * 11; if(!DuelClient::ClientAnalyze(offset, pbuf - offset)) { mainGame->singleSignal.Reset(); @@ -262,10 +352,9 @@ bool SingleMode::SinglePlayAnalyze(char* msg, unsigned int len) { } break; } - case MSG_SORT_CARD: - case MSG_SORT_CHAIN: { - player = BufferIO::ReadInt8(pbuf); - count = BufferIO::ReadInt8(pbuf); + case MSG_SORT_CARD: { + player = BufferIO::Read(pbuf); + count = BufferIO::Read(pbuf); pbuf += count * 7; if(!DuelClient::ClientAnalyze(offset, pbuf - offset)) { mainGame->singleSignal.Reset(); @@ -274,28 +363,43 @@ bool SingleMode::SinglePlayAnalyze(char* msg, unsigned int len) { break; } case MSG_CONFIRM_DECKTOP: { - player = BufferIO::ReadInt8(pbuf); - count = BufferIO::ReadInt8(pbuf); + player = BufferIO::Read(pbuf); + count = BufferIO::Read(pbuf); + pbuf += count * 7; + DuelClient::ClientAnalyze(offset, pbuf - offset); + break; + } + case MSG_CONFIRM_EXTRATOP: { + player = BufferIO::Read(pbuf); + count = BufferIO::Read(pbuf); pbuf += count * 7; DuelClient::ClientAnalyze(offset, pbuf - offset); break; } case MSG_CONFIRM_CARDS: { - player = BufferIO::ReadInt8(pbuf); - count = BufferIO::ReadInt8(pbuf); + player = BufferIO::Read(pbuf); + pbuf += 1; + count = BufferIO::Read(pbuf); pbuf += count * 7; DuelClient::ClientAnalyze(offset, pbuf - offset); break; } case MSG_SHUFFLE_DECK: { - player = BufferIO::ReadInt8(pbuf); + player = BufferIO::Read(pbuf); DuelClient::ClientAnalyze(offset, pbuf - offset); SinglePlayRefreshDeck(player); break; } case MSG_SHUFFLE_HAND: { - /*int oplayer = */BufferIO::ReadInt8(pbuf); - int count = BufferIO::ReadInt8(pbuf); + /*int oplayer = */BufferIO::Read(pbuf); + int count = BufferIO::Read(pbuf); + pbuf += count * 4; + DuelClient::ClientAnalyze(offset, pbuf - offset); + break; + } + case MSG_SHUFFLE_EXTRA: { + player = BufferIO::Read(pbuf); + count = BufferIO::Read(pbuf); pbuf += count * 4; DuelClient::ClientAnalyze(offset, pbuf - offset); break; @@ -306,13 +410,15 @@ bool SingleMode::SinglePlayAnalyze(char* msg, unsigned int len) { break; } case MSG_SWAP_GRAVE_DECK: { - player = BufferIO::ReadInt8(pbuf); + player = BufferIO::Read(pbuf); DuelClient::ClientAnalyze(offset, pbuf - offset); SinglePlayRefreshGrave(player); break; } case MSG_REVERSE_DECK: { DuelClient::ClientAnalyze(offset, pbuf - offset); + SinglePlayRefreshDeck(0); + SinglePlayRefreshDeck(1); break; } case MSG_DECK_TOP: { @@ -321,18 +427,19 @@ bool SingleMode::SinglePlayAnalyze(char* msg, unsigned int len) { break; } case MSG_SHUFFLE_SET_CARD: { - count = BufferIO::ReadInt8(pbuf); + pbuf++; + count = BufferIO::Read(pbuf); pbuf += count * 8; DuelClient::ClientAnalyze(offset, pbuf - offset); break; } case MSG_NEW_TURN: { - player = BufferIO::ReadInt8(pbuf); + player = BufferIO::Read(pbuf); DuelClient::ClientAnalyze(offset, pbuf - offset); break; } case MSG_NEW_PHASE: { - pbuf++; + pbuf += 2; DuelClient::ClientAnalyze(offset, pbuf - offset); SinglePlayRefresh(); break; @@ -348,7 +455,7 @@ bool SingleMode::SinglePlayAnalyze(char* msg, unsigned int len) { /*int cp = pbuf[11];*/ pbuf += 16; DuelClient::ClientAnalyze(offset, pbuf - offset); - if(cl && !(cl & 0x80) && (pl != cl || pc != cc)) + if(cl && !(cl & LOCATION_OVERLAY) && (pl != cl || pc != cc)) SinglePlayRefreshSingle(cc, cl, cs); break; } @@ -443,21 +550,21 @@ bool SingleMode::SinglePlayAnalyze(char* msg, unsigned int len) { } case MSG_CARD_SELECTED: case MSG_RANDOM_SELECTED: { - player = BufferIO::ReadInt8(pbuf); - count = BufferIO::ReadInt8(pbuf); + player = BufferIO::Read(pbuf); + count = BufferIO::Read(pbuf); pbuf += count * 4; DuelClient::ClientAnalyze(offset, pbuf - offset); break; } case MSG_BECOME_TARGET: { - count = BufferIO::ReadInt8(pbuf); + count = BufferIO::Read(pbuf); pbuf += count * 4; DuelClient::ClientAnalyze(offset, pbuf - offset); break; } case MSG_DRAW: { - player = BufferIO::ReadInt8(pbuf); - count = BufferIO::ReadInt8(pbuf); + player = BufferIO::Read(pbuf); + count = BufferIO::Read(pbuf); pbuf += count * 4; DuelClient::ClientAnalyze(offset, pbuf - offset); break; @@ -503,12 +610,12 @@ bool SingleMode::SinglePlayAnalyze(char* msg, unsigned int len) { break; } case MSG_ADD_COUNTER: { - pbuf += 6; + pbuf += 7; DuelClient::ClientAnalyze(offset, pbuf - offset); break; } case MSG_REMOVE_COUNTER: { - pbuf += 6; + pbuf += 7; DuelClient::ClientAnalyze(offset, pbuf - offset); break; } @@ -542,30 +649,34 @@ bool SingleMode::SinglePlayAnalyze(char* msg, unsigned int len) { break; } case MSG_TOSS_COIN: { - player = BufferIO::ReadInt8(pbuf); - count = BufferIO::ReadInt8(pbuf); + player = BufferIO::Read(pbuf); + count = BufferIO::Read(pbuf); pbuf += count; DuelClient::ClientAnalyze(offset, pbuf - offset); break; } case MSG_TOSS_DICE: { - player = BufferIO::ReadInt8(pbuf); - count = BufferIO::ReadInt8(pbuf); + player = BufferIO::Read(pbuf); + count = BufferIO::Read(pbuf); pbuf += count; DuelClient::ClientAnalyze(offset, pbuf - offset); break; } - case MSG_ANNOUNCE_RACE: { - player = BufferIO::ReadInt8(pbuf); - pbuf += 5; + case MSG_ROCK_PAPER_SCISSORS: { + player = BufferIO::Read(pbuf); if(!DuelClient::ClientAnalyze(offset, pbuf - offset)) { mainGame->singleSignal.Reset(); mainGame->singleSignal.Wait(); } break; } - case MSG_ANNOUNCE_ATTRIB: { - player = BufferIO::ReadInt8(pbuf); + case MSG_HAND_RES: { + pbuf += 1; + DuelClient::ClientAnalyze(offset, pbuf - offset); + break; + } + case MSG_ANNOUNCE_RACE: { + player = BufferIO::Read(pbuf); pbuf += 5; if(!DuelClient::ClientAnalyze(offset, pbuf - offset)) { mainGame->singleSignal.Reset(); @@ -573,17 +684,19 @@ bool SingleMode::SinglePlayAnalyze(char* msg, unsigned int len) { } break; } - case MSG_ANNOUNCE_CARD: { - player = BufferIO::ReadInt8(pbuf); + case MSG_ANNOUNCE_ATTRIB: { + player = BufferIO::Read(pbuf); + pbuf += 5; if(!DuelClient::ClientAnalyze(offset, pbuf - offset)) { mainGame->singleSignal.Reset(); mainGame->singleSignal.Wait(); } break; } + case MSG_ANNOUNCE_CARD: case MSG_ANNOUNCE_NUMBER: { - player = BufferIO::ReadInt8(pbuf); - count = BufferIO::ReadInt8(pbuf); + player = BufferIO::Read(pbuf); + count = BufferIO::Read(pbuf); pbuf += 4 * count; if(!DuelClient::ClientAnalyze(offset, pbuf - offset)) { mainGame->singleSignal.Reset(); @@ -596,9 +709,14 @@ bool SingleMode::SinglePlayAnalyze(char* msg, unsigned int len) { DuelClient::ClientAnalyze(offset, pbuf - offset); break; } + case MSG_PLAYER_HINT: { + pbuf += 6; + DuelClient::ClientAnalyze(offset, pbuf - offset); + break; + } case MSG_TAG_SWAP: { player = pbuf[0]; - pbuf += pbuf[3] * 4 + 8; + pbuf += pbuf[2] * 4 + pbuf[4] * 4 + 9; DuelClient::ClientAnalyze(offset, pbuf - offset); SinglePlayRefreshDeck(player); SinglePlayRefreshExtra(player); @@ -609,96 +727,57 @@ bool SingleMode::SinglePlayAnalyze(char* msg, unsigned int len) { break; } case MSG_RELOAD_FIELD: { - mainGame->gMutex.Lock(); - mainGame->dField.Clear(); - int val = 0; + pbuf++; for(int p = 0; p < 2; ++p) { - mainGame->dInfo.lp[p] = BufferIO::ReadInt32(pbuf); - myswprintf(mainGame->dInfo.strLP[p], L"%d", mainGame->dInfo.lp[p]); - for(int seq = 0; seq < 5; ++seq) { - val = BufferIO::ReadInt8(pbuf); - if(val) { - ClientCard* ccard = new ClientCard; - mainGame->dField.AddCard(ccard, p, LOCATION_MZONE, seq); - ccard->position = BufferIO::ReadInt8(pbuf); - val = BufferIO::ReadInt8(pbuf); - if(val) { - for(int xyz = 0; xyz < val; ++xyz) { - ClientCard* xcard = new ClientCard; - ccard->overlayed.push_back(xcard); - mainGame->dField.overlay_cards.insert(xcard); - xcard->overlayTarget = ccard; - xcard->location = 0x80; - xcard->sequence = ccard->overlayed.size() - 1; - } - } - } + pbuf += 4; + for(int seq = 0; seq < 7; ++seq) { + int val = BufferIO::Read(pbuf); + if(val) + pbuf += 2; } for(int seq = 0; seq < 8; ++seq) { - val = BufferIO::ReadInt8(pbuf); - if(val) { - ClientCard* ccard = new ClientCard; - mainGame->dField.AddCard(ccard, p, LOCATION_SZONE, seq); - ccard->position = BufferIO::ReadInt8(pbuf); - } + int val = BufferIO::Read(pbuf); + if(val) + pbuf++; } - val = BufferIO::ReadInt8(pbuf); - for(int seq = 0; seq < val; ++seq) { - ClientCard* ccard = new ClientCard; - mainGame->dField.AddCard(ccard, p, LOCATION_DECK, seq); - } - val = BufferIO::ReadInt8(pbuf); - for(int seq = 0; seq < val; ++seq) { - ClientCard* ccard = new ClientCard; - mainGame->dField.AddCard(ccard, p, LOCATION_HAND, seq); - } - val = BufferIO::ReadInt8(pbuf); - for(int seq = 0; seq < val; ++seq) { - ClientCard* ccard = new ClientCard; - mainGame->dField.AddCard(ccard, p, LOCATION_GRAVE, seq); - } - val = BufferIO::ReadInt8(pbuf); - for(int seq = 0; seq < val; ++seq) { - ClientCard* ccard = new ClientCard; - mainGame->dField.AddCard(ccard, p, LOCATION_REMOVED, seq); - } - val = BufferIO::ReadInt8(pbuf); - for(int seq = 0; seq < val; ++seq) { - ClientCard* ccard = new ClientCard; - mainGame->dField.AddCard(ccard, p, LOCATION_EXTRA, seq); - } - val = BufferIO::ReadInt8(pbuf); - mainGame->dField.extra_p_count[p] = val; + pbuf += 6; } - BufferIO::ReadInt8(pbuf); //chain count, always 0 + count = BufferIO::Read(pbuf); + pbuf += count * 15; + DuelClient::ClientAnalyze(offset, pbuf - offset); SinglePlayReload(); + mainGame->gMutex.lock(); mainGame->dField.RefreshAllCards(); - mainGame->gMutex.Unlock(); + mainGame->gMutex.unlock(); break; } case MSG_AI_NAME: { - char namebuf[128]; - wchar_t wname[128]; - int len = BufferIO::ReadInt16(pbuf); - char* begin = pbuf; - pbuf += len + 1; - memcpy(namebuf, begin, len + 1); + char namebuf[SIZE_AI_NAME]{}; + wchar_t wname[20]{}; + int name_len = BufferIO::Read(pbuf); + if (name_len + 1 <= (int)sizeof namebuf) { + std::memcpy(namebuf, pbuf, name_len); + namebuf[name_len] = 0; + } + pbuf += name_len + 1; BufferIO::DecodeUTF8(namebuf, wname); - BufferIO::CopyWStr(wname, mainGame->dInfo.clientname, 20); + BufferIO::CopyCharArray(wname, mainGame->dInfo.clientname); break; } case MSG_SHOW_HINT: { - char msgbuf[1024]; - wchar_t msg[1024]; - int len = BufferIO::ReadInt16(pbuf); - char* begin = pbuf; - pbuf += len + 1; - memcpy(msgbuf, begin, len + 1); + char msgbuf[SIZE_HINT_MSG]{}; + wchar_t msg[SIZE_HINT_MSG]{}; + int msg_len = BufferIO::Read(pbuf); + if (msg_len + 1 <= (int)sizeof msgbuf) { + std::memcpy(msgbuf, pbuf, msg_len); + msgbuf[msg_len] = 0; + } + pbuf += msg_len + 1; BufferIO::DecodeUTF8(msgbuf, msg); - mainGame->gMutex.Lock(); - mainGame->SetStaticText(mainGame->stMessage, 310, mainGame->textFont, msg); + mainGame->gMutex.lock(); + mainGame->SetStaticText(mainGame->stMessage, 310, mainGame->guiFont, msg); mainGame->PopupElement(mainGame->wMessage); - mainGame->gMutex.Unlock(); + mainGame->gMutex.unlock(); mainGame->actionSignal.Reset(); mainGame->actionSignal.Wait(); break; @@ -707,94 +786,68 @@ bool SingleMode::SinglePlayAnalyze(char* msg, unsigned int len) { } return is_continuing; } +inline void SingleMode::ReloadLocation(int player, int location, int flag, std::vector& queryBuffer) { + query_field_card(pduel, player, location, flag, queryBuffer.data(), 0); + mainGame->dField.UpdateFieldCard(mainGame->LocalPlayer(player), location, queryBuffer.data()); +} void SingleMode::SinglePlayRefresh(int flag) { - unsigned char queryBuffer[0x1000]; - /*int len = */query_field_card(pduel, 0, LOCATION_MZONE, flag, queryBuffer, 0); - mainGame->dField.UpdateFieldCard(mainGame->LocalPlayer(0), LOCATION_MZONE, (char*)queryBuffer); - /*len = */query_field_card(pduel, 1, LOCATION_MZONE, flag, queryBuffer, 0); - mainGame->dField.UpdateFieldCard(mainGame->LocalPlayer(1), LOCATION_MZONE, (char*)queryBuffer); - /*len = */query_field_card(pduel, 0, LOCATION_SZONE, flag, queryBuffer, 0); - mainGame->dField.UpdateFieldCard(mainGame->LocalPlayer(0), LOCATION_SZONE, (char*)queryBuffer); - /*len = */query_field_card(pduel, 1, LOCATION_SZONE, flag, queryBuffer, 0); - mainGame->dField.UpdateFieldCard(mainGame->LocalPlayer(1), LOCATION_SZONE, (char*)queryBuffer); - /*len = */query_field_card(pduel, 0, LOCATION_HAND, flag, queryBuffer, 0); - mainGame->dField.UpdateFieldCard(mainGame->LocalPlayer(0), LOCATION_HAND, (char*)queryBuffer); - /*len = */query_field_card(pduel, 1, LOCATION_HAND, flag, queryBuffer, 0); - mainGame->dField.UpdateFieldCard(mainGame->LocalPlayer(1), LOCATION_HAND, (char*)queryBuffer); + std::vector queryBuffer; + queryBuffer.resize(SIZE_QUERY_BUFFER); + ReloadLocation(0, LOCATION_MZONE, flag, queryBuffer); + ReloadLocation(1, LOCATION_MZONE, flag, queryBuffer); + ReloadLocation(0, LOCATION_SZONE, flag, queryBuffer); + ReloadLocation(1, LOCATION_SZONE, flag, queryBuffer); + ReloadLocation(0, LOCATION_HAND, flag, queryBuffer); + ReloadLocation(1, LOCATION_HAND, flag, queryBuffer); } -void SingleMode::SinglePlayRefreshHand(int player, int flag) { - unsigned char queryBuffer[0x1000]; - /*int len = */query_field_card(pduel, player, LOCATION_HAND, flag, queryBuffer, 0); - mainGame->dField.UpdateFieldCard(mainGame->LocalPlayer(player), LOCATION_HAND, (char*)queryBuffer); +void SingleMode::SingleRefreshLocation(int player, int location, int flag) { + std::vector queryBuffer; + queryBuffer.resize(SIZE_QUERY_BUFFER); + ReloadLocation(player, location, flag, queryBuffer); } -void SingleMode::SinglePlayRefreshGrave(int player, int flag) { - unsigned char queryBuffer[0x1000]; - /*int len = */query_field_card(pduel, player, LOCATION_GRAVE, flag, queryBuffer, 0); - mainGame->dField.UpdateFieldCard(mainGame->LocalPlayer(player), LOCATION_GRAVE, (char*)queryBuffer); +inline void SingleMode::SinglePlayRefreshHand(int player, int flag) { + SingleRefreshLocation(player, LOCATION_HAND, flag); } -void SingleMode::SinglePlayRefreshDeck(int player, int flag) { - unsigned char queryBuffer[0x1000]; - /*int len = */query_field_card(pduel, player, LOCATION_DECK, flag, queryBuffer, 0); - mainGame->dField.UpdateFieldCard(mainGame->LocalPlayer(player), LOCATION_DECK, (char*)queryBuffer); +inline void SingleMode::SinglePlayRefreshGrave(int player, int flag) { + SingleRefreshLocation(player, LOCATION_GRAVE, flag); } -void SingleMode::SinglePlayRefreshExtra(int player, int flag) { - unsigned char queryBuffer[0x1000]; - /*int len = */query_field_card(pduel, player, LOCATION_EXTRA, flag, queryBuffer, 0); - mainGame->dField.UpdateFieldCard(mainGame->LocalPlayer(player), LOCATION_EXTRA, (char*)queryBuffer); +inline void SingleMode::SinglePlayRefreshDeck(int player, int flag) { + SingleRefreshLocation(player, LOCATION_DECK, flag); +} +inline void SingleMode::SinglePlayRefreshExtra(int player, int flag) { + SingleRefreshLocation(player, LOCATION_EXTRA, flag); } void SingleMode::SinglePlayRefreshSingle(int player, int location, int sequence, int flag) { unsigned char queryBuffer[0x1000]; /*int len = */query_card(pduel, player, location, sequence, flag, queryBuffer, 0); - mainGame->dField.UpdateCard(mainGame->LocalPlayer(player), location, sequence, (char*)queryBuffer); + mainGame->dField.UpdateCard(mainGame->LocalPlayer(player), location, sequence, queryBuffer); } void SingleMode::SinglePlayReload() { - unsigned char queryBuffer[0x1000]; - unsigned int flag = 0x7fdfff; - /*int len = */query_field_card(pduel, 0, LOCATION_MZONE, flag, queryBuffer, 0); - mainGame->dField.UpdateFieldCard(mainGame->LocalPlayer(0), LOCATION_MZONE, (char*)queryBuffer); - /*len = */query_field_card(pduel, 1, LOCATION_MZONE, flag, queryBuffer, 0); - mainGame->dField.UpdateFieldCard(mainGame->LocalPlayer(1), LOCATION_MZONE, (char*)queryBuffer); - /*len = */query_field_card(pduel, 0, LOCATION_SZONE, flag, queryBuffer, 0); - mainGame->dField.UpdateFieldCard(mainGame->LocalPlayer(0), LOCATION_SZONE, (char*)queryBuffer); - /*len = */query_field_card(pduel, 1, LOCATION_SZONE, flag, queryBuffer, 0); - mainGame->dField.UpdateFieldCard(mainGame->LocalPlayer(1), LOCATION_SZONE, (char*)queryBuffer); - /*len = */query_field_card(pduel, 0, LOCATION_HAND, flag, queryBuffer, 0); - mainGame->dField.UpdateFieldCard(mainGame->LocalPlayer(0), LOCATION_HAND, (char*)queryBuffer); - /*len = */query_field_card(pduel, 1, LOCATION_HAND, flag, queryBuffer, 0); - mainGame->dField.UpdateFieldCard(mainGame->LocalPlayer(1), LOCATION_HAND, (char*)queryBuffer); - /*len = */query_field_card(pduel, 0, LOCATION_DECK, flag, queryBuffer, 0); - mainGame->dField.UpdateFieldCard(mainGame->LocalPlayer(0), LOCATION_DECK, (char*)queryBuffer); - /*len = */query_field_card(pduel, 1, LOCATION_DECK, flag, queryBuffer, 0); - mainGame->dField.UpdateFieldCard(mainGame->LocalPlayer(1), LOCATION_DECK, (char*)queryBuffer); - /*len = */query_field_card(pduel, 0, LOCATION_EXTRA, flag, queryBuffer, 0); - mainGame->dField.UpdateFieldCard(mainGame->LocalPlayer(0), LOCATION_EXTRA, (char*)queryBuffer); - /*len = */query_field_card(pduel, 1, LOCATION_EXTRA, flag, queryBuffer, 0); - mainGame->dField.UpdateFieldCard(mainGame->LocalPlayer(1), LOCATION_EXTRA, (char*)queryBuffer); - /*len = */query_field_card(pduel, 0, LOCATION_GRAVE, flag, queryBuffer, 0); - mainGame->dField.UpdateFieldCard(mainGame->LocalPlayer(0), LOCATION_GRAVE, (char*)queryBuffer); - /*len = */query_field_card(pduel, 1, LOCATION_GRAVE, flag, queryBuffer, 0); - mainGame->dField.UpdateFieldCard(mainGame->LocalPlayer(1), LOCATION_GRAVE, (char*)queryBuffer); - /*len = */query_field_card(pduel, 0, LOCATION_REMOVED, flag, queryBuffer, 0); - mainGame->dField.UpdateFieldCard(mainGame->LocalPlayer(0), LOCATION_REMOVED, (char*)queryBuffer); - /*len = */query_field_card(pduel, 1, LOCATION_REMOVED, flag, queryBuffer, 0); - mainGame->dField.UpdateFieldCard(mainGame->LocalPlayer(1), LOCATION_REMOVED, (char*)queryBuffer); + std::vector queryBuffer; + queryBuffer.resize(SIZE_QUERY_BUFFER); + unsigned int flag = 0xffdfff; + ReloadLocation(0, LOCATION_MZONE, flag, queryBuffer); + ReloadLocation(1, LOCATION_MZONE, flag, queryBuffer); + ReloadLocation(0, LOCATION_SZONE, flag, queryBuffer); + ReloadLocation(1, LOCATION_SZONE, flag, queryBuffer); + ReloadLocation(0, LOCATION_HAND, flag, queryBuffer); + ReloadLocation(1, LOCATION_HAND, flag, queryBuffer); + + ReloadLocation(0, LOCATION_DECK, flag, queryBuffer); + ReloadLocation(1, LOCATION_DECK, flag, queryBuffer); + ReloadLocation(0, LOCATION_EXTRA, flag, queryBuffer); + ReloadLocation(1, LOCATION_EXTRA, flag, queryBuffer); + ReloadLocation(0, LOCATION_GRAVE, flag, queryBuffer); + ReloadLocation(1, LOCATION_GRAVE, flag, queryBuffer); + ReloadLocation(0, LOCATION_REMOVED, flag, queryBuffer); + ReloadLocation(1, LOCATION_REMOVED, flag, queryBuffer); } -int SingleMode::MessageHandler(long fduel, int type) { +uint32_t SingleMode::MessageHandler(intptr_t fduel, uint32_t type) { if(!enable_log) return 0; char msgbuf[1024]; - get_log_message(fduel, (byte*)msgbuf); - if(enable_log == 1) { - wchar_t wbuf[1024]; - BufferIO::DecodeUTF8(msgbuf, wbuf); - mainGame->AddChatMsg(wbuf, 9); - } else if(enable_log == 2) { - FILE* fp = fopen("error.log", "at"); - if(!fp) - return 0; - fprintf(fp, "[Script error:] %s\n", msgbuf); - fclose(fp); - } + get_log_message(fduel, msgbuf); + mainGame->AddDebugMsg(msgbuf); return 0; } diff --git a/gframe/single_mode.h b/gframe/single_mode.h index 607d538282..447d5a92b7 100644 --- a/gframe/single_mode.h +++ b/gframe/single_mode.h @@ -1,36 +1,39 @@ #ifndef SINGLE_MODE_H #define SINGLE_MODE_H -#include "config.h" -#include "data_manager.h" -#include "deck_manager.h" -#include "../ocgcore/mtrandom.h" +#include +#include +#include "replay.h" namespace ygo { class SingleMode { private: - static long pduel; + static intptr_t pduel; static bool is_closing; static bool is_continuing; - static wchar_t event_string[256]; - + static void ReloadLocation(int player, int location, int flag, std::vector& queryBuffer); + public: static bool StartPlay(); static void StopPlay(bool is_exiting = false); - static void SetResponse(unsigned char* resp); - static int SinglePlayThread(void* param); - static bool SinglePlayAnalyze(char* msg, unsigned int len); + static void SetResponse(unsigned char* resp, unsigned int len); + static int SinglePlayThread(); + static bool SinglePlayAnalyze(unsigned char* msg, unsigned int len); - static void SinglePlayRefresh(int flag = 0x781fff); + static void SinglePlayRefresh(int flag = 0xf81fff); + static void SingleRefreshLocation(int player, int location, int flag); static void SinglePlayRefreshHand(int player, int flag = 0x781fff); static void SinglePlayRefreshGrave(int player, int flag = 0x181fff); static void SinglePlayRefreshDeck(int player, int flag = 0x181fff); static void SinglePlayRefreshExtra(int player, int flag = 0x181fff); - static void SinglePlayRefreshSingle(int player, int location, int sequence, int flag = 0x781fff); + static void SinglePlayRefreshSingle(int player, int location, int sequence, int flag = 0xf81fff); static void SinglePlayReload(); - static int MessageHandler(long fduel, int type); + static uint32_t MessageHandler(intptr_t fduel, uint32_t type); + +protected: + static Replay last_replay; }; } diff --git a/gframe/sound_manager.cpp b/gframe/sound_manager.cpp new file mode 100644 index 0000000000..5202997550 --- /dev/null +++ b/gframe/sound_manager.cpp @@ -0,0 +1,341 @@ +#include "sound_manager.h" +#include "myfilesystem.h" +#if defined(YGOPRO_USE_MINIAUDIO) && defined(YGOPRO_MINIAUDIO_SUPPORT_OPUS_VORBIS) +#include +#include +#endif +#ifdef IRRKLANG_STATIC +#include "../ikpmp3/ikpMP3.h" +#endif + +namespace ygo { + +SoundManager soundManager; + +bool SoundManager::Init() { +#ifdef YGOPRO_USE_AUDIO + bgm_scene = -1; + RefreshBGMList(); + rnd.seed(std::random_device()()); +#ifdef YGOPRO_USE_MINIAUDIO + engineConfig = ma_engine_config_init(); +#ifdef YGOPRO_MINIAUDIO_SUPPORT_OPUS_VORBIS + ma_decoding_backend_vtable* pCustomBackendVTables[] = + { + ma_decoding_backend_libvorbis, + ma_decoding_backend_libopus + }; + resourceManagerConfig = ma_resource_manager_config_init(); + resourceManagerConfig.ppCustomDecodingBackendVTables = pCustomBackendVTables; + resourceManagerConfig.customDecodingBackendCount = sizeof(pCustomBackendVTables) / sizeof(pCustomBackendVTables[0]); + resourceManagerConfig.pCustomDecodingBackendUserData = NULL; + if(ma_resource_manager_init(&resourceManagerConfig, &resourceManager) != MA_SUCCESS) { + return false; + } + engineConfig.pResourceManager = &resourceManager; +#endif + if(ma_engine_init(&engineConfig, &engineSound) != MA_SUCCESS || ma_engine_init(&engineConfig, &engineMusic) != MA_SUCCESS) { + return false; + } else { + return true; + } +#endif // YGOPRO_USE_MINIAUDIO +#ifdef YGOPRO_USE_IRRKLANG + engineSound = irrklang::createIrrKlangDevice(); + engineMusic = irrklang::createIrrKlangDevice(); + if(!engineSound || !engineMusic) { + return false; + } else { +#ifdef IRRKLANG_STATIC + irrklang::ikpMP3Init(engineMusic); +#endif + return true; + } +#endif // YGOPRO_USE_IRRKLANG +#endif // YGOPRO_USE_AUDIO + return false; +} +void SoundManager::RefreshBGMList() { +#ifdef YGOPRO_USE_AUDIO + RefershBGMDir(L"", BGM_DUEL); + RefershBGMDir(L"duel", BGM_DUEL); + RefershBGMDir(L"menu", BGM_MENU); + RefershBGMDir(L"deck", BGM_DECK); + RefershBGMDir(L"advantage", BGM_ADVANTAGE); + RefershBGMDir(L"disadvantage", BGM_DISADVANTAGE); + RefershBGMDir(L"win", BGM_WIN); + RefershBGMDir(L"lose", BGM_LOSE); +#endif +} +void SoundManager::RefershBGMDir(std::wstring path, int scene) { +#ifdef YGOPRO_USE_AUDIO + std::wstring search = L"./sound/BGM/" + path; + FileSystem::TraversalDir(search.c_str(), [this, &path, scene](const wchar_t* name, bool isdir) { + if(!isdir && ( + IsExtension(name, L".mp3") +#if defined(YGOPRO_MINIAUDIO_SUPPORT_OPUS_VORBIS) || defined(YGOPRO_USE_IRRKLANG) + || IsExtension(name, L".ogg") +#endif + )) { + std::wstring filename = path + L"/" + name; + BGMList[BGM_ALL].push_back(filename); + BGMList[scene].push_back(filename); + } + }); +#endif // YGOPRO_USE_AUDIO +} +void SoundManager::PlaySoundEffect(int sound) { +#ifdef YGOPRO_USE_AUDIO + if(!mainGame->chkEnableSound->isChecked()) + return; + std::string soundName; + switch(sound) { + case SOUND_SUMMON: { + soundName = "summon"; + break; + } + case SOUND_SPECIAL_SUMMON: { + soundName = "specialsummon"; + break; + } + case SOUND_ACTIVATE: { + soundName = "activate"; + break; + } + case SOUND_SET: { + soundName = "set"; + break; + } + case SOUND_FLIP: { + soundName = "flip"; + break; + } + case SOUND_REVEAL: { + soundName = "reveal"; + break; + } + case SOUND_EQUIP: { + soundName = "equip"; + break; + } + case SOUND_DESTROYED: { + soundName = "destroyed"; + break; + } + case SOUND_BANISHED: { + soundName = "banished"; + break; + } + case SOUND_TOKEN: { + soundName = "token"; + break; + } + case SOUND_NEGATE: { + soundName = "negate"; + break; + } + case SOUND_ATTACK: { + soundName = "attack"; + break; + } + case SOUND_DIRECT_ATTACK: { + soundName = "directattack"; + break; + } + case SOUND_DRAW: { + soundName = "draw"; + break; + } + case SOUND_SHUFFLE: { + soundName = "shuffle"; + break; + } + case SOUND_DAMAGE: { + soundName = "damage"; + break; + } + case SOUND_RECOVER: { + soundName = "gainlp"; + break; + } + case SOUND_COUNTER_ADD: { + soundName = "addcounter"; + break; + } + case SOUND_COUNTER_REMOVE: { + soundName = "removecounter"; + break; + } + case SOUND_COIN: { + soundName = "coinflip"; + break; + } + case SOUND_DICE: { + soundName = "diceroll"; + break; + } + case SOUND_NEXT_TURN: { + soundName = "nextturn"; + break; + } + case SOUND_PHASE: { + soundName = "phase"; + break; + } + case SOUND_MENU: { + soundName = "menu"; + break; + } + case SOUND_BUTTON: { + soundName = "button"; + break; + } + case SOUND_INFO: { + soundName = "info"; + break; + } + case SOUND_QUESTION: { + soundName = "question"; + break; + } + case SOUND_CARD_PICK: { + soundName = "cardpick"; + break; + } + case SOUND_CARD_DROP: { + soundName = "carddrop"; + break; + } + case SOUND_PLAYER_ENTER: { + soundName = "playerenter"; + break; + } + case SOUND_CHAT: { + soundName = "chatmessage"; + break; + } + default: + return; + } + std::string soundPath = "./sound/" + soundName + ".wav"; + SetSoundVolume(mainGame->gameConf.sound_volume); +#ifdef YGOPRO_USE_MINIAUDIO + ma_engine_play_sound(&engineSound, soundPath.c_str(), nullptr); +#endif +#ifdef YGOPRO_USE_IRRKLANG + engineSound->play2D(soundPath.c_str()); +#endif +#endif // YGOPRO_USE_AUDIO +} +void SoundManager::PlayDialogSound(irr::gui::IGUIElement * element) { +#ifdef YGOPRO_USE_AUDIO + if(element == mainGame->wMessage) { + PlaySoundEffect(SOUND_INFO); + } else if(element == mainGame->wQuery) { + PlaySoundEffect(SOUND_QUESTION); + } else if(element == mainGame->wSurrender) { + PlaySoundEffect(SOUND_QUESTION); + } else if(element == mainGame->wOptions) { + PlaySoundEffect(SOUND_QUESTION); + } else if(element == mainGame->wANAttribute) { + PlaySoundEffect(SOUND_QUESTION); + } else if(element == mainGame->wANCard) { + PlaySoundEffect(SOUND_QUESTION); + } else if(element == mainGame->wANNumber) { + PlaySoundEffect(SOUND_QUESTION); + } else if(element == mainGame->wANRace) { + PlaySoundEffect(SOUND_QUESTION); + } else if(element == mainGame->wReplaySave) { + PlaySoundEffect(SOUND_QUESTION); + } else if(element == mainGame->wFTSelect) { + PlaySoundEffect(SOUND_QUESTION); + } +#endif // YGOPRO_USE_AUDIO +} +bool SoundManager::IsPlayingMusic(wchar_t* music) { +#ifdef YGOPRO_USE_MINIAUDIO + if(music) { + return !mywcsncasecmp(currentPlayingMusic, music, 1024) && ma_sound_is_playing(&soundBGM); + } else { + return currentPlayingMusic[0] && ma_sound_is_playing(&soundBGM); + } +#endif +#ifdef YGOPRO_USE_IRRKLANG + if(music) { + char cmusic[1024]; + BufferIO::EncodeUTF8(music, cmusic); + return engineMusic->isCurrentlyPlaying(cmusic); + } else { + return soundBGM && !soundBGM->isFinished(); + } +#endif + return false; +} +void SoundManager::PlayMusic(wchar_t* music, bool loop) { +#ifdef YGOPRO_USE_AUDIO + if(!mainGame->chkEnableMusic->isChecked()) + return; + if(!IsPlayingMusic(music)) { + StopBGM(); + SetMusicVolume(mainGame->gameConf.music_volume); +#ifdef YGOPRO_USE_MINIAUDIO + BufferIO::CopyWStr(music, currentPlayingMusic, 1024); + ma_sound_init_from_file_w(&engineMusic, music, MA_SOUND_FLAG_ASYNC | MA_SOUND_FLAG_STREAM, nullptr, nullptr, &soundBGM); + ma_sound_set_looping(&soundBGM, loop); + ma_sound_start(&soundBGM); +#endif +#ifdef YGOPRO_USE_IRRKLANG + char cmusic[1024]; + BufferIO::EncodeUTF8(music, cmusic); + soundBGM = engineMusic->play2D(cmusic, loop, false, true); +#endif + } +#endif +} +void SoundManager::PlayBGM(int scene) { +#ifdef YGOPRO_USE_AUDIO + if(!mainGame->chkEnableMusic->isChecked()) + return; + if(!mainGame->chkMusicMode->isChecked()) + scene = BGM_ALL; + if(scene != bgm_scene || !IsPlayingMusic()) { + int count = BGMList[scene].size(); + if(count <= 0) + return; + bgm_scene = scene; + int bgm = (count > 1) ? std::uniform_int_distribution<>(0, count - 1)(rnd) : 0; + auto name = BGMList[scene][bgm].c_str(); + wchar_t BGMName[1024]; + myswprintf(BGMName, L"./sound/BGM/%ls", name); + PlayMusic(BGMName, false); + } +#endif +} +void SoundManager::StopBGM() { +#ifdef YGOPRO_USE_MINIAUDIO + if(!currentPlayingMusic[0]) + return; + memset(currentPlayingMusic, 0, sizeof(currentPlayingMusic)); + ma_sound_uninit(&soundBGM); +#endif +#ifdef YGOPRO_USE_IRRKLANG + engineMusic->stopAllSounds(); +#endif +} +void SoundManager::SetSoundVolume(double volume) { +#ifdef YGOPRO_USE_MINIAUDIO + ma_engine_set_volume(&engineSound, volume); +#endif +#ifdef YGOPRO_USE_IRRKLANG + engineSound->setSoundVolume(volume); +#endif +} +void SoundManager::SetMusicVolume(double volume) { +#ifdef YGOPRO_USE_MINIAUDIO + ma_engine_set_volume(&engineMusic, volume); +#endif +#ifdef YGOPRO_USE_IRRKLANG + engineMusic->setSoundVolume(volume); +#endif +} +} diff --git a/gframe/sound_manager.h b/gframe/sound_manager.h new file mode 100644 index 0000000000..94f0918e1c --- /dev/null +++ b/gframe/sound_manager.h @@ -0,0 +1,98 @@ +#ifndef SOUNDMANAGER_H +#define SOUNDMANAGER_H + +#include "game.h" +#include +#ifdef YGOPRO_USE_MINIAUDIO +#include +#endif +#ifdef YGOPRO_USE_IRRKLANG +#include +#endif + +namespace ygo { + +class SoundManager { +private: + std::vector BGMList[8]; + int bgm_scene{}; + std::mt19937 rnd; +#ifdef YGOPRO_USE_MINIAUDIO + ma_engine_config engineConfig; +#ifdef YGOPRO_MINIAUDIO_SUPPORT_OPUS_VORBIS + ma_resource_manager_config resourceManagerConfig; + ma_resource_manager resourceManager; +#endif + ma_engine engineSound; + ma_engine engineMusic; + ma_sound soundBGM; + wchar_t currentPlayingMusic[1024]{}; +#endif +#ifdef YGOPRO_USE_IRRKLANG + irrklang::ISoundEngine* engineSound; + irrklang::ISoundEngine* engineMusic; + irrklang::ISound* soundBGM; +#endif + void RefershBGMDir(std::wstring path, int scene); + +public: + bool Init(); + void RefreshBGMList(); + void PlaySoundEffect(int sound); + void PlayDialogSound(irr::gui::IGUIElement * element); + bool IsPlayingMusic(wchar_t* music = 0); + void PlayMusic(wchar_t* music, bool loop); + void PlayBGM(int scene); + void StopBGM(); + void SetSoundVolume(double volume); + void SetMusicVolume(double volume); +}; + +extern SoundManager soundManager; + +#define SOUND_SUMMON 101 +#define SOUND_SPECIAL_SUMMON 102 +#define SOUND_ACTIVATE 103 +#define SOUND_SET 104 +#define SOUND_FLIP 105 +#define SOUND_REVEAL 106 +#define SOUND_EQUIP 107 +#define SOUND_DESTROYED 108 +#define SOUND_BANISHED 109 +#define SOUND_TOKEN 110 +#define SOUND_NEGATE 111 + +#define SOUND_ATTACK 201 +#define SOUND_DIRECT_ATTACK 202 +#define SOUND_DRAW 203 +#define SOUND_SHUFFLE 204 +#define SOUND_DAMAGE 205 +#define SOUND_RECOVER 206 +#define SOUND_COUNTER_ADD 207 +#define SOUND_COUNTER_REMOVE 208 +#define SOUND_COIN 209 +#define SOUND_DICE 210 +#define SOUND_NEXT_TURN 211 +#define SOUND_PHASE 212 + +#define SOUND_MENU 301 +#define SOUND_BUTTON 302 +#define SOUND_INFO 303 +#define SOUND_QUESTION 304 +#define SOUND_CARD_PICK 305 +#define SOUND_CARD_DROP 306 +#define SOUND_PLAYER_ENTER 307 +#define SOUND_CHAT 308 + +#define BGM_ALL 0 +#define BGM_DUEL 1 +#define BGM_MENU 2 +#define BGM_DECK 3 +#define BGM_ADVANTAGE 4 +#define BGM_DISADVANTAGE 5 +#define BGM_WIN 6 +#define BGM_LOSE 7 + +} + +#endif //SOUNDMANAGER_H diff --git a/gframe/spmemvfs/premake5.lua b/gframe/spmemvfs/premake5.lua new file mode 100644 index 0000000000..3806cc3fd4 --- /dev/null +++ b/gframe/spmemvfs/premake5.lua @@ -0,0 +1,11 @@ +project "cspmemvfs" + kind "StaticLib" + cdialect "C11" + files { "*.c", "*.h" } + + if BUILD_SQLITE then + includedirs { "../../sqlite3" } + end + + filter "not action:vs*" + defines { "_POSIX_C_SOURCE=200809L" } diff --git a/gframe/spmemvfs/spmemvfs.c b/gframe/spmemvfs/spmemvfs.c new file mode 100644 index 0000000000..2740a57d80 --- /dev/null +++ b/gframe/spmemvfs/spmemvfs.c @@ -0,0 +1,548 @@ +/* +* BSD 2-Clause License +* +* Copyright 2009 Stephen Liu +* All rights reserved. +* +* Redistribution and use in source and binary forms, with or without +* modification, are permitted provided that the following conditions are met: +* +* * Redistributions of source code must retain the above copyright notice, this +* list of conditions and the following disclaimer. +* +* * Redistributions in binary form must reproduce the above copyright notice, +* this list of conditions and the following disclaimer in the documentation +* and/or other materials provided with the distribution. +* +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +#include +#include +#include + +#include "spmemvfs.h" + +#include "sqlite3.h" + +/* Useful macros used in several places */ +#define SPMEMVFS_MIN(x,y) ((x)<(y)?(x):(y)) +#define SPMEMVFS_MAX(x,y) ((x)>(y)?(x):(y)) + +static void spmemvfsDebug(const char *format, ...){ + +#if defined(SPMEMVFS_DEBUG) + + char logTemp[ 1024 ] = { 0 }; + + va_list vaList; + va_start( vaList, format ); + vsnprintf( logTemp, sizeof( logTemp ), format, vaList ); + va_end ( vaList ); + + if( strchr( logTemp, '\n' ) ) { + printf( "%s", logTemp ); + } else { + printf( "%s\n", logTemp ); + } +#endif + +} + +//=========================================================================== + +typedef struct spmemfile_t { + sqlite3_file base; + char * path; + int flags; + spmembuffer_t * mem; +} spmemfile_t; + +static int spmemfileClose( sqlite3_file * file ); +static int spmemfileRead( sqlite3_file * file, void * buffer, int len, sqlite3_int64 offset ); +static int spmemfileWrite( sqlite3_file * file, const void * buffer, int len, sqlite3_int64 offset ); +static int spmemfileTruncate( sqlite3_file * file, sqlite3_int64 size ); +static int spmemfileSync( sqlite3_file * file, int flags ); +static int spmemfileFileSize( sqlite3_file * file, sqlite3_int64 * size ); +static int spmemfileLock( sqlite3_file * file, int type ); +static int spmemfileUnlock( sqlite3_file * file, int type ); +static int spmemfileCheckReservedLock( sqlite3_file * file, int * result ); +static int spmemfileFileControl( sqlite3_file * file, int op, void * arg ); +static int spmemfileSectorSize( sqlite3_file * file ); +static int spmemfileDeviceCharacteristics( sqlite3_file * file ); + +static sqlite3_io_methods g_spmemfile_io_memthods = { + 1, /* iVersion */ + spmemfileClose, /* xClose */ + spmemfileRead, /* xRead */ + spmemfileWrite, /* xWrite */ + spmemfileTruncate, /* xTruncate */ + spmemfileSync, /* xSync */ + spmemfileFileSize, /* xFileSize */ + spmemfileLock, /* xLock */ + spmemfileUnlock, /* xUnlock */ + spmemfileCheckReservedLock, /* xCheckReservedLock */ + spmemfileFileControl, /* xFileControl */ + spmemfileSectorSize, /* xSectorSize */ + spmemfileDeviceCharacteristics /* xDeviceCharacteristics */ +}; + +int spmemfileClose( sqlite3_file * file ) +{ + spmemfile_t * memfile = (spmemfile_t*)file; + + spmemvfsDebug( "call %s( %p )", __func__, memfile ); + + if( SQLITE_OPEN_MAIN_DB & memfile->flags ) { + // noop + } else { + if( NULL != memfile->mem ) { + if( memfile->mem->data ) free( memfile->mem->data ); + free( memfile->mem ); + } + } + + free( memfile->path ); + + return SQLITE_OK; +} + +int spmemfileRead( sqlite3_file * file, void * buffer, int len, sqlite3_int64 offset ) +{ + spmemfile_t * memfile = (spmemfile_t*)file; + + spmemvfsDebug( "call %s( %p, ..., %d, %lld ), len %d", + __func__, memfile, len, offset, memfile->mem->used ); + + if( ( offset + len ) > memfile->mem->used ) { + return SQLITE_IOERR_SHORT_READ; + } + + memcpy( buffer, memfile->mem->data + offset, len ); + + return SQLITE_OK; +} + +int spmemfileWrite( sqlite3_file * file, const void * buffer, int len, sqlite3_int64 offset ) +{ + spmemfile_t * memfile = (spmemfile_t*)file; + spmembuffer_t * mem = memfile->mem; + + spmemvfsDebug( "call %s( %p, ..., %d, %lld ), len %d", + __func__, memfile, len, offset, mem->used ); + + if( ( offset + len ) > mem->total ) { + int newTotal = 2 * ( offset + len + mem->total ); + char * newBuffer = (char*)realloc( mem->data, newTotal ); + if( NULL == newBuffer ) { + return SQLITE_NOMEM; + } + + mem->total = newTotal; + mem->data = newBuffer; + } + + memcpy( mem->data + offset, buffer, len ); + + mem->used = SPMEMVFS_MAX( mem->used, offset + len ); + + return SQLITE_OK; +} + +int spmemfileTruncate( sqlite3_file * file, sqlite3_int64 size ) +{ + spmemfile_t * memfile = (spmemfile_t*)file; + + spmemvfsDebug( "call %s( %p )", __func__, memfile ); + + memfile->mem->used = SPMEMVFS_MIN( memfile->mem->used, size ); + + return SQLITE_OK; +} + +int spmemfileSync( sqlite3_file * file, int flags ) +{ + spmemvfsDebug( "call %s( %p )", __func__, file ); + + return SQLITE_OK; +} + +int spmemfileFileSize( sqlite3_file * file, sqlite3_int64 * size ) +{ + spmemfile_t * memfile = (spmemfile_t*)file; + + spmemvfsDebug( "call %s( %p )", __func__, memfile ); + + * size = memfile->mem->used; + + return SQLITE_OK; +} + +int spmemfileLock( sqlite3_file * file, int type ) +{ + spmemvfsDebug( "call %s( %p )", __func__, file ); + + return SQLITE_OK; +} + +int spmemfileUnlock( sqlite3_file * file, int type ) +{ + spmemvfsDebug( "call %s( %p )", __func__, file ); + + return SQLITE_OK; +} + +int spmemfileCheckReservedLock( sqlite3_file * file, int * result ) +{ + spmemvfsDebug( "call %s( %p )", __func__, file ); + + *result = 0; + + return SQLITE_OK; +} + +int spmemfileFileControl( sqlite3_file * file, int op, void * arg ) +{ + spmemvfsDebug( "call %s( %p )", __func__, file ); + + return SQLITE_OK; +} + +int spmemfileSectorSize( sqlite3_file * file ) +{ + spmemvfsDebug( "call %s( %p )", __func__, file ); + + return 0; +} + +int spmemfileDeviceCharacteristics( sqlite3_file * file ) +{ + spmemvfsDebug( "call %s( %p )", __func__, file ); + + return 0; +} + +//=========================================================================== + +typedef struct spmemvfs_cb_t { + void * arg; + spmembuffer_t * ( * load ) ( void * args, const char * path ); +} spmemvfs_cb_t; + +typedef struct spmemvfs_t { + sqlite3_vfs base; + spmemvfs_cb_t cb; + sqlite3_vfs * parent; +} spmemvfs_t; + +static int spmemvfsOpen( sqlite3_vfs * vfs, const char * path, sqlite3_file * file, int flags, int * outflags ); +static int spmemvfsDelete( sqlite3_vfs * vfs, const char * path, int syncDir ); +static int spmemvfsAccess( sqlite3_vfs * vfs, const char * path, int flags, int * result ); +static int spmemvfsFullPathname( sqlite3_vfs * vfs, const char * path, int len, char * fullpath ); +static void * spmemvfsDlOpen( sqlite3_vfs * vfs, const char * path ); +static void spmemvfsDlError( sqlite3_vfs * vfs, int len, char * errmsg ); +static void ( * spmemvfsDlSym ( sqlite3_vfs * vfs, void * handle, const char * symbol ) ) ( void ); +static void spmemvfsDlClose( sqlite3_vfs * vfs, void * handle ); +static int spmemvfsRandomness( sqlite3_vfs * vfs, int len, char * buffer ); +static int spmemvfsSleep( sqlite3_vfs * vfs, int microseconds ); +static int spmemvfsCurrentTime( sqlite3_vfs * vfs, double * result ); + +static spmemvfs_t g_spmemvfs = { + { + 1, /* iVersion */ + 0, /* szOsFile */ + 0, /* mxPathname */ + 0, /* pNext */ + SPMEMVFS_NAME, /* zName */ + 0, /* pAppData */ + spmemvfsOpen, /* xOpen */ + spmemvfsDelete, /* xDelete */ + spmemvfsAccess, /* xAccess */ + spmemvfsFullPathname, /* xFullPathname */ + spmemvfsDlOpen, /* xDlOpen */ + spmemvfsDlError, /* xDlError */ + spmemvfsDlSym, /* xDlSym */ + spmemvfsDlClose, /* xDlClose */ + spmemvfsRandomness, /* xRandomness */ + spmemvfsSleep, /* xSleep */ + spmemvfsCurrentTime /* xCurrentTime */ + }, + { 0 }, + 0 /* pParent */ +}; + +int spmemvfsOpen( sqlite3_vfs * vfs, const char * path, sqlite3_file * file, int flags, int * outflags ) +{ + spmemvfs_t * memvfs = (spmemvfs_t*)vfs; + spmemfile_t * memfile = (spmemfile_t*)file; + + spmemvfsDebug( "call %s( %p(%p), %s, %p, %x, %p )\n", + __func__, vfs, &g_spmemvfs, path, file, flags, outflags ); + + memset( memfile, 0, sizeof( spmemfile_t ) ); + memfile->base.pMethods = &g_spmemfile_io_memthods; + memfile->flags = flags; + + memfile->path = strdup( path ); + + if( SQLITE_OPEN_MAIN_DB & memfile->flags ) { + memfile->mem = memvfs->cb.load( memvfs->cb.arg, path ); + } else { + memfile->mem = (spmembuffer_t*)calloc( sizeof( spmembuffer_t ), 1 ); + } + + return memfile->mem ? SQLITE_OK : SQLITE_ERROR; +} + +int spmemvfsDelete( sqlite3_vfs * vfs, const char * path, int syncDir ) +{ + spmemvfsDebug( "call %s( %p(%p), %s, %d )\n", + __func__, vfs, &g_spmemvfs, path, syncDir ); + + return SQLITE_OK; +} + +int spmemvfsAccess( sqlite3_vfs * vfs, const char * path, int flags, int * result ) +{ + * result = 0; + return SQLITE_OK; +} + +int spmemvfsFullPathname( sqlite3_vfs * vfs, const char * path, int len, char * fullpath ) +{ + strncpy( fullpath, path, len ); + fullpath[ len - 1 ] = '\0'; + + return SQLITE_OK; +} + +void * spmemvfsDlOpen( sqlite3_vfs * vfs, const char * path ) +{ + return NULL; +} + +void spmemvfsDlError( sqlite3_vfs * vfs, int len, char * errmsg ) +{ + // noop +} + +void ( * spmemvfsDlSym ( sqlite3_vfs * vfs, void * handle, const char * symbol ) ) ( void ) +{ + return NULL; +} + +void spmemvfsDlClose( sqlite3_vfs * vfs, void * handle ) +{ + // noop +} + +int spmemvfsRandomness( sqlite3_vfs * vfs, int len, char * buffer ) +{ + return SQLITE_OK; +} + +int spmemvfsSleep( sqlite3_vfs * vfs, int microseconds ) +{ + return SQLITE_OK; +} + +int spmemvfsCurrentTime( sqlite3_vfs * vfs, double * result ) +{ + return SQLITE_OK; +} + +//=========================================================================== + +int spmemvfs_init( spmemvfs_cb_t * cb ) +{ + sqlite3_vfs * parent = NULL; + + if( g_spmemvfs.parent ) return SQLITE_OK; + + parent = sqlite3_vfs_find( 0 ); + + g_spmemvfs.parent = parent; + + g_spmemvfs.base.mxPathname = parent->mxPathname; + g_spmemvfs.base.szOsFile = sizeof( spmemfile_t ); + + g_spmemvfs.cb = * cb; + + return sqlite3_vfs_register( (sqlite3_vfs*)&g_spmemvfs, 0 ); +} + +//=========================================================================== + +typedef struct spmembuffer_link_t { + char * path; + spmembuffer_t * mem; + struct spmembuffer_link_t * next; +} spmembuffer_link_t; + +spmembuffer_link_t * spmembuffer_link_remove( spmembuffer_link_t ** head, const char * path ) +{ + spmembuffer_link_t * ret = NULL; + + spmembuffer_link_t ** iter = head; + for( ; NULL != *iter; ) { + spmembuffer_link_t * curr = *iter; + + if( 0 == strcmp( path, curr->path ) ) { + ret = curr; + *iter = curr->next; + break; + } else { + iter = &( curr->next ); + } + } + + return ret; +} + +void spmembuffer_link_free( spmembuffer_link_t * iter ) +{ + free( iter->path ); + free( iter->mem->data ); + free( iter->mem ); + free( iter ); +} + +//=========================================================================== + +typedef struct spmemvfs_env_t { + spmembuffer_link_t * head; + sqlite3_mutex * mutex; +} spmemvfs_env_t; + +static spmemvfs_env_t * g_spmemvfs_env = NULL; + +static spmembuffer_t * load_cb( void * arg, const char * path ) +{ + spmembuffer_t * ret = NULL; + + spmemvfs_env_t * env = (spmemvfs_env_t*)arg; + + sqlite3_mutex_enter( env->mutex ); + { + spmembuffer_link_t * toFind = spmembuffer_link_remove( &( env->head ), path ); + + if( NULL != toFind ) { + ret = toFind->mem; + free( toFind->path ); + free( toFind ); + } + } + sqlite3_mutex_leave( env->mutex ); + + return ret; +} + +int spmemvfs_env_init() +{ + int ret = 0; + + if( NULL == g_spmemvfs_env ) { + spmemvfs_cb_t cb; + + g_spmemvfs_env = (spmemvfs_env_t*)calloc( sizeof( spmemvfs_env_t ), 1 ); + g_spmemvfs_env->mutex = sqlite3_mutex_alloc( SQLITE_MUTEX_FAST ); + + cb.arg = g_spmemvfs_env; + cb.load = load_cb; + + ret = spmemvfs_init( &cb ); + } + + return ret; +} + +void spmemvfs_env_fini() +{ + if( NULL != g_spmemvfs_env ) { + spmembuffer_link_t * iter = NULL; + + sqlite3_vfs_unregister( (sqlite3_vfs*)&g_spmemvfs ); + g_spmemvfs.parent = NULL; + + sqlite3_mutex_free( g_spmemvfs_env->mutex ); + + iter = g_spmemvfs_env->head; + for( ; NULL != iter; ) { + spmembuffer_link_t * next = iter->next; + + spmembuffer_link_free( iter ); + + iter = next; + } + + free( g_spmemvfs_env ); + g_spmemvfs_env = NULL; + } +} + +int spmemvfs_open_db( spmemvfs_db_t * db, const char * path, spmembuffer_t * mem ) +{ + int ret = 0; + + spmembuffer_link_t * iter = NULL; + + memset( db, 0, sizeof( spmemvfs_db_t ) ); + + iter = (spmembuffer_link_t*)calloc( sizeof( spmembuffer_link_t ), 1 ); + iter->path = strdup( path ); + iter->mem = mem; + + sqlite3_mutex_enter( g_spmemvfs_env->mutex ); + { + iter->next = g_spmemvfs_env->head; + g_spmemvfs_env->head = iter; + } + sqlite3_mutex_leave( g_spmemvfs_env->mutex ); + + ret = sqlite3_open_v2( path, &(db->handle), + SQLITE_OPEN_READONLY, SPMEMVFS_NAME); + //SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE, SPMEMVFS_NAME ); + + if( 0 == ret ) { + db->mem = mem; + } else { + sqlite3_mutex_enter( g_spmemvfs_env->mutex ); + { + iter = spmembuffer_link_remove( &(g_spmemvfs_env->head), path ); + if( NULL != iter ) spmembuffer_link_free( iter ); + } + sqlite3_mutex_leave( g_spmemvfs_env->mutex ); + } + + return ret; +} + +int spmemvfs_close_db( spmemvfs_db_t * db ) +{ + int ret = 0; + + if( NULL == db ) return 0; + + if( NULL != db->handle ) { + ret = sqlite3_close( db->handle ); + db->handle = NULL; + } + + if( NULL != db->mem ) { + if( NULL != db->mem->data ) free( db->mem->data ); + free( db->mem ); + db->mem = NULL; + } + + return ret; +} + diff --git a/gframe/spmemvfs/spmemvfs.h b/gframe/spmemvfs/spmemvfs.h new file mode 100644 index 0000000000..f932c27f32 --- /dev/null +++ b/gframe/spmemvfs/spmemvfs.h @@ -0,0 +1,64 @@ +/* +* BSD 2-Clause License +* +* Copyright 2009 Stephen Liu +* All rights reserved. +* +* Redistribution and use in source and binary forms, with or without +* modification, are permitted provided that the following conditions are met: +* +* * Redistributions of source code must retain the above copyright notice, this +* list of conditions and the following disclaimer. +* +* * Redistributions in binary form must reproduce the above copyright notice, +* this list of conditions and the following disclaimer in the documentation +* and/or other materials provided with the distribution. +* +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +#ifndef __spmemvfs_h__ +#define __spmemvfs_h__ + +#ifdef __cplusplus +extern "C" { +#endif + +#include "sqlite3.h" + +#define SPMEMVFS_NAME "spmemvfs" + +typedef struct spmembuffer_t { + char * data; + int used; + int total; +} spmembuffer_t; + +typedef struct spmemvfs_db_t { + sqlite3 * handle; + spmembuffer_t * mem; +} spmemvfs_db_t; + +int spmemvfs_env_init(); + +void spmemvfs_env_fini(); + +int spmemvfs_open_db( spmemvfs_db_t * db, const char * path, spmembuffer_t * mem ); + +int spmemvfs_close_db( spmemvfs_db_t * db ); + +#ifdef __cplusplus +} +#endif + +#endif + diff --git a/gframe/stb_image_resize2.h b/gframe/stb_image_resize2.h new file mode 100644 index 0000000000..6146ab7eee --- /dev/null +++ b/gframe/stb_image_resize2.h @@ -0,0 +1,10651 @@ +/* stb_image_resize2 - v2.17 - public domain image resizing + + by Jeff Roberts (v2) and Jorge L Rodriguez + http://github.com/nothings/stb + + Can be threaded with the extended API. SSE2, AVX, Neon and WASM SIMD support. Only + scaling and translation is supported, no rotations or shears. + + COMPILING & LINKING + In one C/C++ file that #includes this file, do this: + #define STB_IMAGE_RESIZE_IMPLEMENTATION + before the #include. That will create the implementation in that file. + + EASY API CALLS: + Easy API downsamples w/Mitchell filter, upsamples w/cubic interpolation, clamps to edge. + + stbir_resize_uint8_srgb( input_pixels, input_w, input_h, input_stride_in_bytes, + output_pixels, output_w, output_h, output_stride_in_bytes, + pixel_layout_enum ) + + stbir_resize_uint8_linear( input_pixels, input_w, input_h, input_stride_in_bytes, + output_pixels, output_w, output_h, output_stride_in_bytes, + pixel_layout_enum ) + + stbir_resize_float_linear( input_pixels, input_w, input_h, input_stride_in_bytes, + output_pixels, output_w, output_h, output_stride_in_bytes, + pixel_layout_enum ) + + If you pass NULL or zero for the output_pixels, we will allocate the output buffer + for you and return it from the function (free with free() or STBIR_FREE). + As a special case, XX_stride_in_bytes of 0 means packed continuously in memory. + + API LEVELS + There are three levels of API - easy-to-use, medium-complexity and extended-complexity. + + See the "header file" section of the source for API documentation. + + ADDITIONAL DOCUMENTATION + + MEMORY ALLOCATION + By default, we use malloc and free for memory allocation. To override the + memory allocation, before the implementation #include, add a: + + #define STBIR_MALLOC(size,user_data) ... + #define STBIR_FREE(ptr,user_data) ... + + Each resize makes exactly one call to malloc/free (unless you use the + extended API where you can do one allocation for many resizes). Under + address sanitizer, we do separate allocations to find overread/writes. + + PERFORMANCE + This library was written with an emphasis on performance. When testing + stb_image_resize with RGBA, the fastest mode is STBIR_4CHANNEL with + STBIR_TYPE_UINT8 pixels and CLAMPed edges (which is what many other resize + libs do by default). Also, make sure SIMD is turned on of course (default + for 64-bit targets). Avoid WRAP edge mode if you want the fastest speed. + + This library also comes with profiling built-in. If you define STBIR_PROFILE, + you can use the advanced API and get low-level profiling information by + calling stbir_resize_extended_profile_info() or stbir_resize_split_profile_info() + after a resize. + + SIMD + Most of the routines have optimized SSE2, AVX, NEON and WASM versions. + + On Microsoft compilers, we automatically turn on SIMD for 64-bit x64 and + ARM; for 32-bit x86 and ARM, you select SIMD mode by defining STBIR_SSE2 or + STBIR_NEON. For AVX and AVX2, we auto-select it by detecting the /arch:AVX + or /arch:AVX2 switches. You can also always manually turn SSE2, AVX or AVX2 + support on by defining STBIR_SSE2, STBIR_AVX or STBIR_AVX2. + + On Linux, SSE2 and Neon is on by default for 64-bit x64 or ARM64. For 32-bit, + we select x86 SIMD mode by whether you have -msse2, -mavx or -mavx2 enabled + on the command line. For 32-bit ARM, you must pass -mfpu=neon-vfpv4 for both + clang and GCC, but GCC also requires an additional -mfp16-format=ieee to + automatically enable NEON. + + On x86 platforms, you can also define STBIR_FP16C to turn on FP16C instructions + for converting back and forth to half-floats. This is autoselected when we + are using AVX2. Clang and GCC also require the -mf16c switch. ARM always uses + the built-in half float hardware NEON instructions. + + You can also tell us to use multiply-add instructions with STBIR_USE_FMA. + Because x86 doesn't always have fma, we turn it off by default to maintain + determinism across all platforms. If you don't care about non-FMA determinism + and are willing to restrict yourself to more recent x86 CPUs (around the AVX + timeframe), then fma will give you around a 15% speedup. + + You can force off SIMD in all cases by defining STBIR_NO_SIMD. You can turn + off AVX or AVX2 specifically with STBIR_NO_AVX or STBIR_NO_AVX2. AVX is 10% + to 40% faster, and AVX2 is generally another 12%. + + ALPHA CHANNEL + Most of the resizing functions provide the ability to control how the alpha + channel of an image is processed. + + When alpha represents transparency, it is important that when combining + colors with filtering, the pixels should not be treated equally; they + should use a weighted average based on their alpha values. For example, + if a pixel is 1% opaque bright green and another pixel is 99% opaque + black and you average them, the average will be 50% opaque, but the + unweighted average and will be a middling green color, while the weighted + average will be nearly black. This means the unweighted version introduced + green energy that didn't exist in the source image. + + (If you want to know why this makes sense, you can work out the math for + the following: consider what happens if you alpha composite a source image + over a fixed color and then average the output, vs. if you average the + source image pixels and then composite that over the same fixed color. + Only the weighted average produces the same result as the ground truth + composite-then-average result.) + + Therefore, it is in general best to "alpha weight" the pixels when applying + filters to them. This essentially means multiplying the colors by the alpha + values before combining them, and then dividing by the alpha value at the + end. + + The computer graphics industry introduced a technique called "premultiplied + alpha" or "associated alpha" in which image colors are stored in image files + already multiplied by their alpha. This saves some math when compositing, + and also avoids the need to divide by the alpha at the end (which is quite + inefficient). However, while premultiplied alpha is common in the movie CGI + industry, it is not commonplace in other industries like videogames, and most + consumer file formats are generally expected to contain not-premultiplied + colors. For example, Photoshop saves PNG files "unpremultiplied", and web + browsers like Chrome and Firefox expect PNG images to be unpremultiplied. + + Note that there are three possibilities that might describe your image + and resize expectation: + + 1. images are not premultiplied, alpha weighting is desired + 2. images are not premultiplied, alpha weighting is not desired + 3. images are premultiplied + + Both case #2 and case #3 require the exact same math: no alpha weighting + should be applied or removed. Only case 1 requires extra math operations; + the other two cases can be handled identically. + + stb_image_resize expects case #1 by default, applying alpha weighting to + images, expecting the input images to be unpremultiplied. This is what the + COLOR+ALPHA buffer types tell the resizer to do. + + When you use the pixel layouts STBIR_RGBA, STBIR_BGRA, STBIR_ARGB, + STBIR_ABGR, STBIR_RX, or STBIR_XR you are telling us that the pixels are + non-premultiplied. In these cases, the resizer will alpha weight the colors + (effectively creating the premultiplied image), do the filtering, and then + convert back to non-premult on exit. + + When you use the pixel layouts STBIR_RGBA_PM, STBIR_RGBA_PM, STBIR_RGBA_PM, + STBIR_RGBA_PM, STBIR_RX_PM or STBIR_XR_PM, you are telling that the pixels + ARE premultiplied. In this case, the resizer doesn't have to do the + premultipling - it can filter directly on the input. This about twice as + fast as the non-premultiplied case, so it's the right option if your data is + already setup correctly. + + When you use the pixel layout STBIR_4CHANNEL or STBIR_2CHANNEL, you are + telling us that there is no channel that represents transparency; it may be + RGB and some unrelated fourth channel that has been stored in the alpha + channel, but it is actually not alpha. No special processing will be + performed. + + The difference between the generic 4 or 2 channel layouts, and the + specialized _PM versions is with the _PM versions you are telling us that + the data *is* alpha, just don't premultiply it. That's important when + using SRGB pixel formats, we need to know where the alpha is, because + it is converted linearly (rather than with the SRGB converters). + + Because alpha weighting produces the same effect as premultiplying, you + even have the option with non-premultiplied inputs to let the resizer + produce a premultiplied output. Because the intially computed alpha-weighted + output image is effectively premultiplied, this is actually more performant + than the normal path which un-premultiplies the output image as a final step. + + Finally, when converting both in and out of non-premulitplied space (for + example, when using STBIR_RGBA), we go to somewhat heroic measures to + ensure that areas with zero alpha value pixels get something reasonable + in the RGB values. If you don't care about the RGB values of zero alpha + pixels, you can call the stbir_set_non_pm_alpha_speed_over_quality() + function - this runs a premultiplied resize about 25% faster. That said, + when you really care about speed, using premultiplied pixels for both in + and out (STBIR_RGBA_PM, etc) much faster than both of these premultiplied + options. + + PIXEL LAYOUT CONVERSION + The resizer can convert from some pixel layouts to others. When using the + stbir_set_pixel_layouts(), you can, for example, specify STBIR_RGBA + on input, and STBIR_ARGB on output, and it will re-organize the channels + during the resize. Currently, you can only convert between two pixel + layouts with the same number of channels. + + DETERMINISM + We commit to being deterministic (from x64 to ARM to scalar to SIMD, etc). + This requires compiling with fast-math off (using at least /fp:precise). + Also, you must turn off fp-contracting (which turns mult+adds into fmas)! + We attempt to do this with pragmas, but with Clang, you usually want to add + -ffp-contract=off to the command line as well. + + For 32-bit x86, you must use SSE and SSE2 codegen for determinism. That is, + if the scalar x87 unit gets used at all, we immediately lose determinism. + On Microsoft Visual Studio 2008 and earlier, from what we can tell there is + no way to be deterministic in 32-bit x86 (some x87 always leaks in, even + with fp:strict). On 32-bit x86 GCC, determinism requires both -msse2 and + -fpmath=sse. + + Note that we will not be deterministic with float data containing NaNs - + the NaNs will propagate differently on different SIMD and platforms. + + If you turn on STBIR_USE_FMA, then we will be deterministic with other + fma targets, but we will differ from non-fma targets (this is unavoidable, + because a fma isn't simply an add with a mult - it also introduces a + rounding difference compared to non-fma instruction sequences. + + FLOAT PIXEL FORMAT RANGE + Any range of values can be used for the non-alpha float data that you pass + in (0 to 1, -1 to 1, whatever). However, if you are inputting float values + but *outputting* bytes or shorts, you must use a range of 0 to 1 so that we + scale back properly. The alpha channel must also be 0 to 1 for any format + that does premultiplication prior to resizing. + + Note also that with float output, using filters with negative lobes, the + output filtered values might go slightly out of range. You can define + STBIR_FLOAT_LOW_CLAMP and/or STBIR_FLOAT_HIGH_CLAMP to specify the range + to clamp to on output, if that's important. + + MAX/MIN SCALE FACTORS + The input pixel resolutions are in integers, and we do the internal pointer + resolution in size_t sized integers. However, the scale ratio from input + resolution to output resolution is calculated in float form. This means + the effective possible scale ratio is limited to 24 bits (or 16 million + to 1). As you get close to the size of the float resolution (again, 16 + million pixels wide or high), you might start seeing float inaccuracy + issues in general in the pipeline. If you have to do extreme resizes, + you can usually do this is multiple stages (using float intermediate + buffers). + + FLIPPED IMAGES + Stride is just the delta from one scanline to the next. This means you can + use a negative stride to handle inverted images (point to the final + scanline and use a negative stride). You can invert the input or output, + using negative strides. + + DEFAULT FILTERS + For functions which don't provide explicit control over what filters to + use, you can change the compile-time defaults with: + + #define STBIR_DEFAULT_FILTER_UPSAMPLE STBIR_FILTER_something + #define STBIR_DEFAULT_FILTER_DOWNSAMPLE STBIR_FILTER_something + + See stbir_filter in the header-file section for the list of filters. + + NEW FILTERS + A number of 1D filter kernels are supplied. For a list of supported + filters, see the stbir_filter enum. You can install your own filters by + using the stbir_set_filter_callbacks function. + + PROGRESS + For interactive use with slow resize operations, you can use the + scanline callbacks in the extended API. It would have to be a *very* large + image resample to need progress though - we're very fast. + + CEIL and FLOOR + In scalar mode, the only functions we use from math.h are ceilf and floorf, + but if you have your own versions, you can define the STBIR_CEILF(v) and + STBIR_FLOORF(v) macros and we'll use them instead. In SIMD, we just use + our own versions. + + ASSERT + Define STBIR_ASSERT(boolval) to override assert() and not use assert.h + + PORTING FROM VERSION 1 + The API has changed. You can continue to use the old version of stb_image_resize.h, + which is available in the "deprecated/" directory. + + If you're using the old simple-to-use API, porting is straightforward. + (For more advanced APIs, read the documentation.) + + stbir_resize_uint8(): + - call `stbir_resize_uint8_linear`, cast channel count to `stbir_pixel_layout` + + stbir_resize_float(): + - call `stbir_resize_float_linear`, cast channel count to `stbir_pixel_layout` + + stbir_resize_uint8_srgb(): + - function name is unchanged + - cast channel count to `stbir_pixel_layout` + - above is sufficient unless your image has alpha and it's not RGBA/BGRA + - in that case, follow the below instructions for stbir_resize_uint8_srgb_edgemode + + stbir_resize_uint8_srgb_edgemode() + - switch to the "medium complexity" API + - stbir_resize(), very similar API but a few more parameters: + - pixel_layout: cast channel count to `stbir_pixel_layout` + - data_type: STBIR_TYPE_UINT8_SRGB + - edge: unchanged (STBIR_EDGE_WRAP, etc.) + - filter: STBIR_FILTER_DEFAULT + - which channel is alpha is specified in stbir_pixel_layout, see enum for details + + FUTURE TODOS + * For polyphase integral filters, we just memcpy the coeffs to dupe + them, but we should indirect and use the same coeff memory. + * Add pixel layout conversions for sensible different channel counts + (maybe, 1->3/4, 3->4, 4->1, 3->1). + * For SIMD encode and decode scanline routines, do any pre-aligning + for bad input/output buffer alignments and pitch? + * For very wide scanlines, we should we do vertical strips to stay within + L2 cache. Maybe do chunks of 1K pixels at a time. There would be + some pixel reconversion, but probably dwarfed by things falling out + of cache. Probably also something possible with alternating between + scattering and gathering at high resize scales? + * Should we have a multiple MIPs at the same time function (could keep + more memory in cache during multiple resizes)? + * Rewrite the coefficient generator to do many at once. + * AVX-512 vertical kernels - worried about downclocking here. + * Convert the reincludes to macros when we know they aren't changing. + * Experiment with pivoting the horizontal and always using the + vertical filters (which are faster, but perhaps not enough to overcome + the pivot cost and the extra memory touches). Need to buffer the whole + image so have to balance memory use. + * Most of our code is internally function pointers, should we compile + all the SIMD stuff always and dynamically dispatch? + + CONTRIBUTORS + Jeff Roberts: 2.0 implementation, optimizations, SIMD + Martins Mozeiko: NEON simd, WASM simd, clang and GCC whisperer + Fabian Giesen: half float and srgb converters + Sean Barrett: API design, optimizations + Jorge L Rodriguez: Original 1.0 implementation + Aras Pranckevicius: bugfixes + Nathan Reed: warning fixes for 1.0 + + REVISIONS + 2.17 (2025-10-25) silly format bug in easy-to-use APIs. + 2.16 (2025-10-21) fixed the easy-to-use APIs to allow inverted bitmaps (negative + strides), fix vertical filter kernel callback, fix threaded + gather buffer priming (and assert). + (thanks adipose, TainZerL, and Harrison Green) + 2.15 (2025-07-17) fixed an assert in debug mode when using floats with input + callbacks, work around GCC warning when adding to null ptr + (thanks Johannes Spohr and Pyry Kovanen). + 2.14 (2025-05-09) fixed a bug using downsampling gather horizontal first, and + scatter with vertical first. + 2.13 (2025-02-27) fixed a bug when using input callbacks, turned off simd for + tiny-c, fixed some variables that should have been static, + fixes a bug when calculating temp memory with resizes that + exceed 2GB of temp memory (very large resizes). + 2.12 (2024-10-18) fix incorrect use of user_data with STBIR_FREE + 2.11 (2024-09-08) fix harmless asan warnings in 2-channel and 3-channel mode + with AVX-2, fix some weird scaling edge conditions with + point sample mode. + 2.10 (2024-07-27) fix the defines GCC and mingw for loop unroll control, + fix MSVC 32-bit arm half float routines. + 2.09 (2024-06-19) fix the defines for 32-bit ARM GCC builds (was selecting + hardware half floats). + 2.08 (2024-06-10) fix for RGB->BGR three channel flips and add SIMD (thanks + to Ryan Salsbury), fix for sub-rect resizes, use the + pragmas to control unrolling when they are available. + 2.07 (2024-05-24) fix for slow final split during threaded conversions of very + wide scanlines when downsampling (caused by extra input + converting), fix for wide scanline resamples with many + splits (int overflow), fix GCC warning. + 2.06 (2024-02-10) fix for identical width/height 3x or more down-scaling + undersampling a single row on rare resize ratios (about 1%). + 2.05 (2024-02-07) fix for 2 pixel to 1 pixel resizes with wrap (thanks Aras), + fix for output callback (thanks Julien Koenen). + 2.04 (2023-11-17) fix for rare AVX bug, shadowed symbol (thanks Nikola Smiljanic). + 2.03 (2023-11-01) ASAN and TSAN warnings fixed, minor tweaks. + 2.00 (2023-10-10) mostly new source: new api, optimizations, simd, vertical-first, etc + 2x-5x faster without simd, 4x-12x faster with simd, + in some cases, 20x to 40x faster esp resizing large to very small. + 0.96 (2019-03-04) fixed warnings + 0.95 (2017-07-23) fixed warnings + 0.94 (2017-03-18) fixed warnings + 0.93 (2017-03-03) fixed bug with certain combinations of heights + 0.92 (2017-01-02) fix integer overflow on large (>2GB) images + 0.91 (2016-04-02) fix warnings; fix handling of subpixel regions + 0.90 (2014-09-17) first released version + + LICENSE + See end of file for license information. +*/ + +#if !defined(STB_IMAGE_RESIZE_DO_HORIZONTALS) && !defined(STB_IMAGE_RESIZE_DO_VERTICALS) && !defined(STB_IMAGE_RESIZE_DO_CODERS) // for internal re-includes + +#ifndef STBIR_INCLUDE_STB_IMAGE_RESIZE2_H +#define STBIR_INCLUDE_STB_IMAGE_RESIZE2_H + +#include +#ifdef _MSC_VER +typedef unsigned char stbir_uint8; +typedef unsigned short stbir_uint16; +typedef unsigned int stbir_uint32; +typedef unsigned __int64 stbir_uint64; +#else +#include +typedef uint8_t stbir_uint8; +typedef uint16_t stbir_uint16; +typedef uint32_t stbir_uint32; +typedef uint64_t stbir_uint64; +#endif + +#ifndef STBIRDEF +#ifdef STB_IMAGE_RESIZE_STATIC +#define STBIRDEF static +#else +#ifdef __cplusplus +#define STBIRDEF extern "C" +#else +#define STBIRDEF extern +#endif +#endif +#endif + +////////////////////////////////////////////////////////////////////////////// +//// start "header file" /////////////////////////////////////////////////// +// +// Easy-to-use API: +// +// * stride is the offset between successive rows of image data +// in memory, in bytes. specify 0 for packed continuously in memory +// * colorspace is linear or sRGB as specified by function name +// * Uses the default filters +// * Uses edge mode clamped +// * returned result is 1 for success or 0 in case of an error. + + +// stbir_pixel_layout specifies: +// number of channels +// order of channels +// whether color is premultiplied by alpha +// for back compatibility, you can cast the old channel count to an stbir_pixel_layout +typedef enum +{ + STBIR_1CHANNEL = 1, + STBIR_2CHANNEL = 2, + STBIR_RGB = 3, // 3-chan, with order specified (for channel flipping) + STBIR_BGR = 0, // 3-chan, with order specified (for channel flipping) + STBIR_4CHANNEL = 5, + + STBIR_RGBA = 4, // alpha formats, where alpha is NOT premultiplied into color channels + STBIR_BGRA = 6, + STBIR_ARGB = 7, + STBIR_ABGR = 8, + STBIR_RA = 9, + STBIR_AR = 10, + + STBIR_RGBA_PM = 11, // alpha formats, where alpha is premultiplied into color channels + STBIR_BGRA_PM = 12, + STBIR_ARGB_PM = 13, + STBIR_ABGR_PM = 14, + STBIR_RA_PM = 15, + STBIR_AR_PM = 16, + + STBIR_RGBA_NO_AW = 11, // alpha formats, where NO alpha weighting is applied at all! + STBIR_BGRA_NO_AW = 12, // these are just synonyms for the _PM flags (which also do + STBIR_ARGB_NO_AW = 13, // no alpha weighting). These names just make it more clear + STBIR_ABGR_NO_AW = 14, // for some folks). + STBIR_RA_NO_AW = 15, + STBIR_AR_NO_AW = 16, + +} stbir_pixel_layout; + +//=============================================================== +// Simple-complexity API +// +// If output_pixels is NULL (0), then we will allocate the buffer and return it to you. +//-------------------------------- + +STBIRDEF unsigned char * stbir_resize_uint8_srgb( const unsigned char *input_pixels , int input_w , int input_h, int input_stride_in_bytes, + unsigned char *output_pixels, int output_w, int output_h, int output_stride_in_bytes, + stbir_pixel_layout pixel_type ); + +STBIRDEF unsigned char * stbir_resize_uint8_linear( const unsigned char *input_pixels , int input_w , int input_h, int input_stride_in_bytes, + unsigned char *output_pixels, int output_w, int output_h, int output_stride_in_bytes, + stbir_pixel_layout pixel_type ); + +STBIRDEF float * stbir_resize_float_linear( const float *input_pixels , int input_w , int input_h, int input_stride_in_bytes, + float *output_pixels, int output_w, int output_h, int output_stride_in_bytes, + stbir_pixel_layout pixel_type ); +//=============================================================== + +//=============================================================== +// Medium-complexity API +// +// This extends the easy-to-use API as follows: +// +// * Can specify the datatype - U8, U8_SRGB, U16, FLOAT, HALF_FLOAT +// * Edge wrap can selected explicitly +// * Filter can be selected explicitly +//-------------------------------- + +typedef enum +{ + STBIR_EDGE_CLAMP = 0, + STBIR_EDGE_REFLECT = 1, + STBIR_EDGE_WRAP = 2, // this edge mode is slower and uses more memory + STBIR_EDGE_ZERO = 3, +} stbir_edge; + +typedef enum +{ + STBIR_FILTER_DEFAULT = 0, // use same filter type that easy-to-use API chooses + STBIR_FILTER_BOX = 1, // A trapezoid w/1-pixel wide ramps, same result as box for integer scale ratios + STBIR_FILTER_TRIANGLE = 2, // On upsampling, produces same results as bilinear texture filtering + STBIR_FILTER_CUBICBSPLINE = 3, // The cubic b-spline (aka Mitchell-Netrevalli with B=1,C=0), gaussian-esque + STBIR_FILTER_CATMULLROM = 4, // An interpolating cubic spline + STBIR_FILTER_MITCHELL = 5, // Mitchell-Netrevalli filter with B=1/3, C=1/3 + STBIR_FILTER_POINT_SAMPLE = 6, // Simple point sampling + STBIR_FILTER_OTHER = 7, // User callback specified +} stbir_filter; + +typedef enum +{ + STBIR_TYPE_UINT8 = 0, + STBIR_TYPE_UINT8_SRGB = 1, + STBIR_TYPE_UINT8_SRGB_ALPHA = 2, // alpha channel, when present, should also be SRGB (this is very unusual) + STBIR_TYPE_UINT16 = 3, + STBIR_TYPE_FLOAT = 4, + STBIR_TYPE_HALF_FLOAT = 5 +} stbir_datatype; + +// medium api +STBIRDEF void * stbir_resize( const void *input_pixels , int input_w , int input_h, int input_stride_in_bytes, + void *output_pixels, int output_w, int output_h, int output_stride_in_bytes, + stbir_pixel_layout pixel_layout, stbir_datatype data_type, + stbir_edge edge, stbir_filter filter ); +//=============================================================== + + + +//=============================================================== +// Extended-complexity API +// +// This API exposes all resize functionality. +// +// * Separate filter types for each axis +// * Separate edge modes for each axis +// * Separate input and output data types +// * Can specify regions with subpixel correctness +// * Can specify alpha flags +// * Can specify a memory callback +// * Can specify a callback data type for pixel input and output +// * Can be threaded for a single resize +// * Can be used to resize many frames without recalculating the sampler info +// +// Use this API as follows: +// 1) Call the stbir_resize_init function on a local STBIR_RESIZE structure +// 2) Call any of the stbir_set functions +// 3) Optionally call stbir_build_samplers() if you are going to resample multiple times +// with the same input and output dimensions (like resizing video frames) +// 4) Resample by calling stbir_resize_extended(). +// 5) Call stbir_free_samplers() if you called stbir_build_samplers() +//-------------------------------- + + +// Types: + +// INPUT CALLBACK: this callback is used for input scanlines +typedef void const * stbir_input_callback( void * optional_output, void const * input_ptr, int num_pixels, int x, int y, void * context ); + +// OUTPUT CALLBACK: this callback is used for output scanlines +typedef void stbir_output_callback( void const * output_ptr, int num_pixels, int y, void * context ); + +// callbacks for user installed filters +typedef float stbir__kernel_callback( float x, float scale, void * user_data ); // centered at zero +typedef float stbir__support_callback( float scale, void * user_data ); + +// internal structure with precomputed scaling +typedef struct stbir__info stbir__info; + +typedef struct STBIR_RESIZE // use the stbir_resize_init and stbir_override functions to set these values for future compatibility +{ + void * user_data; + void const * input_pixels; + int input_w, input_h; + double input_s0, input_t0, input_s1, input_t1; + stbir_input_callback * input_cb; + void * output_pixels; + int output_w, output_h; + int output_subx, output_suby, output_subw, output_subh; + stbir_output_callback * output_cb; + int input_stride_in_bytes; + int output_stride_in_bytes; + int splits; + int fast_alpha; + int needs_rebuild; + int called_alloc; + stbir_pixel_layout input_pixel_layout_public; + stbir_pixel_layout output_pixel_layout_public; + stbir_datatype input_data_type; + stbir_datatype output_data_type; + stbir_filter horizontal_filter, vertical_filter; + stbir_edge horizontal_edge, vertical_edge; + stbir__kernel_callback * horizontal_filter_kernel; stbir__support_callback * horizontal_filter_support; + stbir__kernel_callback * vertical_filter_kernel; stbir__support_callback * vertical_filter_support; + stbir__info * samplers; +} STBIR_RESIZE; + +// extended complexity api + + +// First off, you must ALWAYS call stbir_resize_init on your resize structure before any of the other calls! +STBIRDEF void stbir_resize_init( STBIR_RESIZE * resize, + const void *input_pixels, int input_w, int input_h, int input_stride_in_bytes, // stride can be zero + void *output_pixels, int output_w, int output_h, int output_stride_in_bytes, // stride can be zero + stbir_pixel_layout pixel_layout, stbir_datatype data_type ); + +//=============================================================== +// You can update these parameters any time after resize_init and there is no cost +//-------------------------------- + +STBIRDEF void stbir_set_datatypes( STBIR_RESIZE * resize, stbir_datatype input_type, stbir_datatype output_type ); +STBIRDEF void stbir_set_pixel_callbacks( STBIR_RESIZE * resize, stbir_input_callback * input_cb, stbir_output_callback * output_cb ); // no callbacks by default +STBIRDEF void stbir_set_user_data( STBIR_RESIZE * resize, void * user_data ); // pass back STBIR_RESIZE* by default +STBIRDEF void stbir_set_buffer_ptrs( STBIR_RESIZE * resize, const void * input_pixels, int input_stride_in_bytes, void * output_pixels, int output_stride_in_bytes ); + +//=============================================================== + + +//=============================================================== +// If you call any of these functions, you will trigger a sampler rebuild! +//-------------------------------- + +STBIRDEF int stbir_set_pixel_layouts( STBIR_RESIZE * resize, stbir_pixel_layout input_pixel_layout, stbir_pixel_layout output_pixel_layout ); // sets new buffer layouts +STBIRDEF int stbir_set_edgemodes( STBIR_RESIZE * resize, stbir_edge horizontal_edge, stbir_edge vertical_edge ); // CLAMP by default + +STBIRDEF int stbir_set_filters( STBIR_RESIZE * resize, stbir_filter horizontal_filter, stbir_filter vertical_filter ); // STBIR_DEFAULT_FILTER_UPSAMPLE/DOWNSAMPLE by default +STBIRDEF int stbir_set_filter_callbacks( STBIR_RESIZE * resize, stbir__kernel_callback * horizontal_filter, stbir__support_callback * horizontal_support, stbir__kernel_callback * vertical_filter, stbir__support_callback * vertical_support ); + +STBIRDEF int stbir_set_pixel_subrect( STBIR_RESIZE * resize, int subx, int suby, int subw, int subh ); // sets both sub-regions (full regions by default) +STBIRDEF int stbir_set_input_subrect( STBIR_RESIZE * resize, double s0, double t0, double s1, double t1 ); // sets input sub-region (full region by default) +STBIRDEF int stbir_set_output_pixel_subrect( STBIR_RESIZE * resize, int subx, int suby, int subw, int subh ); // sets output sub-region (full region by default) + +// when inputting AND outputting non-premultiplied alpha pixels, we use a slower but higher quality technique +// that fills the zero alpha pixel's RGB values with something plausible. If you don't care about areas of +// zero alpha, you can call this function to get about a 25% speed improvement for STBIR_RGBA to STBIR_RGBA +// types of resizes. +STBIRDEF int stbir_set_non_pm_alpha_speed_over_quality( STBIR_RESIZE * resize, int non_pma_alpha_speed_over_quality ); +//=============================================================== + + +//=============================================================== +// You can call build_samplers to prebuild all the internal data we need to resample. +// Then, if you call resize_extended many times with the same resize, you only pay the +// cost once. +// If you do call build_samplers, you MUST call free_samplers eventually. +//-------------------------------- + +// This builds the samplers and does one allocation +STBIRDEF int stbir_build_samplers( STBIR_RESIZE * resize ); + +// You MUST call this, if you call stbir_build_samplers or stbir_build_samplers_with_splits +STBIRDEF void stbir_free_samplers( STBIR_RESIZE * resize ); +//=============================================================== + + +// And this is the main function to perform the resize synchronously on one thread. +STBIRDEF int stbir_resize_extended( STBIR_RESIZE * resize ); + + +//=============================================================== +// Use these functions for multithreading. +// 1) You call stbir_build_samplers_with_splits first on the main thread +// 2) Then stbir_resize_with_split on each thread +// 3) stbir_free_samplers when done on the main thread +//-------------------------------- + +// This will build samplers for threading. +// You can pass in the number of threads you'd like to use (try_splits). +// It returns the number of splits (threads) that you can call it with. +/// It might be less if the image resize can't be split up that many ways. + +STBIRDEF int stbir_build_samplers_with_splits( STBIR_RESIZE * resize, int try_splits ); + +// This function does a split of the resizing (you call this fuction for each +// split, on multiple threads). A split is a piece of the output resize pixel space. + +// Note that you MUST call stbir_build_samplers_with_splits before stbir_resize_extended_split! + +// Usually, you will always call stbir_resize_split with split_start as the thread_index +// and "1" for the split_count. +// But, if you have a weird situation where you MIGHT want 8 threads, but sometimes +// only 4 threads, you can use 0,2,4,6 for the split_start's and use "2" for the +// split_count each time to turn in into a 4 thread resize. (This is unusual). + +STBIRDEF int stbir_resize_extended_split( STBIR_RESIZE * resize, int split_start, int split_count ); +//=============================================================== + + +//=============================================================== +// Pixel Callbacks info: +//-------------------------------- + +// The input callback is super flexible - it calls you with the input address +// (based on the stride and base pointer), it gives you an optional_output +// pointer that you can fill, or you can just return your own pointer into +// your own data. +// +// You can also do conversion from non-supported data types if necessary - in +// this case, you ignore the input_ptr and just use the x and y parameters to +// calculate your own input_ptr based on the size of each non-supported pixel. +// (Something like the third example below.) +// +// You can also install just an input or just an output callback by setting the +// callback that you don't want to zero. +// +// First example, progress: (getting a callback that you can monitor the progress): +// void const * my_callback( void * optional_output, void const * input_ptr, int num_pixels, int x, int y, void * context ) +// { +// percentage_done = y / input_height; +// return input_ptr; // use buffer from call +// } +// +// Next example, copying: (copy from some other buffer or stream): +// void const * my_callback( void * optional_output, void const * input_ptr, int num_pixels, int x, int y, void * context ) +// { +// CopyOrStreamData( optional_output, other_data_src, num_pixels * pixel_width_in_bytes ); +// return optional_output; // return the optional buffer that we filled +// } +// +// Third example, input another buffer without copying: (zero-copy from other buffer): +// void const * my_callback( void * optional_output, void const * input_ptr, int num_pixels, int x, int y, void * context ) +// { +// void * pixels = ( (char*) other_image_base ) + ( y * other_image_stride ) + ( x * other_pixel_width_in_bytes ); +// return pixels; // return pointer to your data without copying +// } +// +// +// The output callback is considerably simpler - it just calls you so that you can dump +// out each scanline. You could even directly copy out to disk if you have a simple format +// like TGA or BMP. You can also convert to other output types here if you want. +// +// Simple example: +// void const * my_output( void * output_ptr, int num_pixels, int y, void * context ) +// { +// percentage_done = y / output_height; +// fwrite( output_ptr, pixel_width_in_bytes, num_pixels, output_file ); +// } +//=============================================================== + + + + +//=============================================================== +// optional built-in profiling API +//-------------------------------- + +#ifdef STBIR_PROFILE + +typedef struct STBIR_PROFILE_INFO +{ + stbir_uint64 total_clocks; + + // how many clocks spent (of total_clocks) in the various resize routines, along with a string description + // there are "resize_count" number of zones + stbir_uint64 clocks[ 8 ]; + char const ** descriptions; + + // count of clocks and descriptions + stbir_uint32 count; +} STBIR_PROFILE_INFO; + +// use after calling stbir_resize_extended (or stbir_build_samplers or stbir_build_samplers_with_splits) +STBIRDEF void stbir_resize_build_profile_info( STBIR_PROFILE_INFO * out_info, STBIR_RESIZE const * resize ); + +// use after calling stbir_resize_extended +STBIRDEF void stbir_resize_extended_profile_info( STBIR_PROFILE_INFO * out_info, STBIR_RESIZE const * resize ); + +// use after calling stbir_resize_extended_split +STBIRDEF void stbir_resize_split_profile_info( STBIR_PROFILE_INFO * out_info, STBIR_RESIZE const * resize, int split_start, int split_num ); + +//=============================================================== + +#endif + + +//// end header file ///////////////////////////////////////////////////// +#endif // STBIR_INCLUDE_STB_IMAGE_RESIZE2_H + +#if defined(STB_IMAGE_RESIZE_IMPLEMENTATION) || defined(STB_IMAGE_RESIZE2_IMPLEMENTATION) + +#ifndef STBIR_ASSERT +#include +#define STBIR_ASSERT(x) assert(x) +#endif + +#ifndef STBIR_MALLOC +#include +#define STBIR_MALLOC(size,user_data) ((void)(user_data), malloc(size)) +#define STBIR_FREE(ptr,user_data) ((void)(user_data), free(ptr)) +// (we used the comma operator to evaluate user_data, to avoid "unused parameter" warnings) +#endif + +#ifdef _MSC_VER + +#define stbir__inline __forceinline + +#else + +#define stbir__inline __inline__ + +// Clang address sanitizer +#if defined(__has_feature) + #if __has_feature(address_sanitizer) || __has_feature(memory_sanitizer) + #ifndef STBIR__SEPARATE_ALLOCATIONS + #define STBIR__SEPARATE_ALLOCATIONS + #endif + #endif +#endif + +#endif + +// GCC and MSVC +#if defined(__SANITIZE_ADDRESS__) + #ifndef STBIR__SEPARATE_ALLOCATIONS + #define STBIR__SEPARATE_ALLOCATIONS + #endif +#endif + +// Always turn off automatic FMA use - use STBIR_USE_FMA if you want. +// Otherwise, this is a determinism disaster. +#ifndef STBIR_DONT_CHANGE_FP_CONTRACT // override in case you don't want this behavior +#if defined(_MSC_VER) && !defined(__clang__) +#if _MSC_VER > 1200 +#pragma fp_contract(off) +#endif +#elif defined(__GNUC__) && !defined(__clang__) +#pragma GCC optimize("fp-contract=off") +#else +#pragma STDC FP_CONTRACT OFF +#endif +#endif + +#ifdef _MSC_VER +#define STBIR__UNUSED(v) (void)(v) +#else +#define STBIR__UNUSED(v) (void)sizeof(v) +#endif + +#define STBIR__ARRAY_SIZE(a) (sizeof((a))/sizeof((a)[0])) + + +#ifndef STBIR_DEFAULT_FILTER_UPSAMPLE +#define STBIR_DEFAULT_FILTER_UPSAMPLE STBIR_FILTER_CATMULLROM +#endif + +#ifndef STBIR_DEFAULT_FILTER_DOWNSAMPLE +#define STBIR_DEFAULT_FILTER_DOWNSAMPLE STBIR_FILTER_MITCHELL +#endif + + +#ifndef STBIR__HEADER_FILENAME +#define STBIR__HEADER_FILENAME "stb_image_resize2.h" +#endif + +// the internal pixel layout enums are in a different order, so we can easily do range comparisons of types +// the public pixel layout is ordered in a way that if you cast num_channels (1-4) to the enum, you get something sensible +typedef enum +{ + STBIRI_1CHANNEL = 0, + STBIRI_2CHANNEL = 1, + STBIRI_RGB = 2, + STBIRI_BGR = 3, + STBIRI_4CHANNEL = 4, + + STBIRI_RGBA = 5, + STBIRI_BGRA = 6, + STBIRI_ARGB = 7, + STBIRI_ABGR = 8, + STBIRI_RA = 9, + STBIRI_AR = 10, + + STBIRI_RGBA_PM = 11, + STBIRI_BGRA_PM = 12, + STBIRI_ARGB_PM = 13, + STBIRI_ABGR_PM = 14, + STBIRI_RA_PM = 15, + STBIRI_AR_PM = 16, +} stbir_internal_pixel_layout; + +// define the public pixel layouts to not compile inside the implementation (to avoid accidental use) +#define STBIR_BGR bad_dont_use_in_implementation +#define STBIR_1CHANNEL STBIR_BGR +#define STBIR_2CHANNEL STBIR_BGR +#define STBIR_RGB STBIR_BGR +#define STBIR_RGBA STBIR_BGR +#define STBIR_4CHANNEL STBIR_BGR +#define STBIR_BGRA STBIR_BGR +#define STBIR_ARGB STBIR_BGR +#define STBIR_ABGR STBIR_BGR +#define STBIR_RA STBIR_BGR +#define STBIR_AR STBIR_BGR +#define STBIR_RGBA_PM STBIR_BGR +#define STBIR_BGRA_PM STBIR_BGR +#define STBIR_ARGB_PM STBIR_BGR +#define STBIR_ABGR_PM STBIR_BGR +#define STBIR_RA_PM STBIR_BGR +#define STBIR_AR_PM STBIR_BGR + +// must match stbir_datatype +static unsigned char stbir__type_size[] = { + 1,1,1,2,4,2 // STBIR_TYPE_UINT8,STBIR_TYPE_UINT8_SRGB,STBIR_TYPE_UINT8_SRGB_ALPHA,STBIR_TYPE_UINT16,STBIR_TYPE_FLOAT,STBIR_TYPE_HALF_FLOAT +}; + +// When gathering, the contributors are which source pixels contribute. +// When scattering, the contributors are which destination pixels are contributed to. +typedef struct +{ + int n0; // First contributing pixel + int n1; // Last contributing pixel +} stbir__contributors; + +typedef struct +{ + int lowest; // First sample index for whole filter + int highest; // Last sample index for whole filter + int widest; // widest single set of samples for an output +} stbir__filter_extent_info; + +typedef struct +{ + int n0; // First pixel of decode buffer to write to + int n1; // Last pixel of decode that will be written to + int pixel_offset_for_input; // Pixel offset into input_scanline +} stbir__span; + +typedef struct stbir__scale_info +{ + int input_full_size; + int output_sub_size; + float scale; + float inv_scale; + float pixel_shift; // starting shift in output pixel space (in pixels) + int scale_is_rational; + stbir_uint32 scale_numerator, scale_denominator; +} stbir__scale_info; + +typedef struct +{ + stbir__contributors * contributors; + float* coefficients; + stbir__contributors * gather_prescatter_contributors; + float * gather_prescatter_coefficients; + stbir__scale_info scale_info; + float support; + stbir_filter filter_enum; + stbir__kernel_callback * filter_kernel; + stbir__support_callback * filter_support; + stbir_edge edge; + int coefficient_width; + int filter_pixel_width; + int filter_pixel_margin; + int num_contributors; + int contributors_size; + int coefficients_size; + stbir__filter_extent_info extent_info; + int is_gather; // 0 = scatter, 1 = gather with scale >= 1, 2 = gather with scale < 1 + int gather_prescatter_num_contributors; + int gather_prescatter_coefficient_width; + int gather_prescatter_contributors_size; + int gather_prescatter_coefficients_size; +} stbir__sampler; + +typedef struct +{ + stbir__contributors conservative; + int edge_sizes[2]; // this can be less than filter_pixel_margin, if the filter and scaling falls off + stbir__span spans[2]; // can be two spans, if doing input subrect with clamp mode WRAP +} stbir__extents; + +typedef struct +{ +#ifdef STBIR_PROFILE + union + { + struct { stbir_uint64 total, looping, vertical, horizontal, decode, encode, alpha, unalpha; } named; + stbir_uint64 array[8]; + } profile; + stbir_uint64 * current_zone_excluded_ptr; +#endif + float* decode_buffer; + + int ring_buffer_first_scanline; + int ring_buffer_last_scanline; + int ring_buffer_begin_index; // first_scanline is at this index in the ring buffer + int start_output_y, end_output_y; + int start_input_y, end_input_y; // used in scatter only + + #ifdef STBIR__SEPARATE_ALLOCATIONS + float** ring_buffers; // one pointer for each ring buffer + #else + float* ring_buffer; // one big buffer that we index into + #endif + + float* vertical_buffer; + + char no_cache_straddle[64]; +} stbir__per_split_info; + +typedef float * stbir__decode_pixels_func( float * decode, int width_times_channels, void const * input ); +typedef void stbir__alpha_weight_func( float * decode_buffer, int width_times_channels ); +typedef void stbir__horizontal_gather_channels_func( float * output_buffer, unsigned int output_sub_size, float const * decode_buffer, + stbir__contributors const * horizontal_contributors, float const * horizontal_coefficients, int coefficient_width ); +typedef void stbir__alpha_unweight_func(float * encode_buffer, int width_times_channels ); +typedef void stbir__encode_pixels_func( void * output, int width_times_channels, float const * encode ); + +struct stbir__info +{ +#ifdef STBIR_PROFILE + union + { + struct { stbir_uint64 total, build, alloc, horizontal, vertical, cleanup, pivot; } named; + stbir_uint64 array[7]; + } profile; + stbir_uint64 * current_zone_excluded_ptr; +#endif + stbir__sampler horizontal; + stbir__sampler vertical; + + void const * input_data; + void * output_data; + + int input_stride_bytes; + int output_stride_bytes; + int ring_buffer_length_bytes; // The length of an individual entry in the ring buffer. The total number of ring buffers is stbir__get_filter_pixel_width(filter) + int ring_buffer_num_entries; // Total number of entries in the ring buffer. + + stbir_datatype input_type; + stbir_datatype output_type; + + stbir_input_callback * in_pixels_cb; + void * user_data; + stbir_output_callback * out_pixels_cb; + + stbir__extents scanline_extents; + + void * alloced_mem; + stbir__per_split_info * split_info; // by default 1, but there will be N of these allocated based on the thread init you did + + stbir__decode_pixels_func * decode_pixels; + stbir__alpha_weight_func * alpha_weight; + stbir__horizontal_gather_channels_func * horizontal_gather_channels; + stbir__alpha_unweight_func * alpha_unweight; + stbir__encode_pixels_func * encode_pixels; + + int alloc_ring_buffer_num_entries; // Number of entries in the ring buffer that will be allocated + int splits; // count of splits + + stbir_internal_pixel_layout input_pixel_layout_internal; + stbir_internal_pixel_layout output_pixel_layout_internal; + + int input_color_and_type; + int offset_x, offset_y; // offset within output_data + int vertical_first; + int channels; + int effective_channels; // same as channels, except on RGBA/ARGB (7), or XA/AX (3) + size_t alloced_total; +}; + + +#define stbir__max_uint8_as_float 255.0f +#define stbir__max_uint16_as_float 65535.0f +#define stbir__max_uint8_as_float_inverted 3.9215689e-03f // (1.0f/255.0f) +#define stbir__max_uint16_as_float_inverted 1.5259022e-05f // (1.0f/65535.0f) +#define stbir__small_float ((float)1 / (1 << 20) / (1 << 20) / (1 << 20) / (1 << 20) / (1 << 20) / (1 << 20)) + +// min/max friendly +#define STBIR_CLAMP(x, xmin, xmax) for(;;) { \ + if ( (x) < (xmin) ) (x) = (xmin); \ + if ( (x) > (xmax) ) (x) = (xmax); \ + break; \ +} + +static stbir__inline int stbir__min(int a, int b) +{ + return a < b ? a : b; +} + +static stbir__inline int stbir__max(int a, int b) +{ + return a > b ? a : b; +} + +static float stbir__srgb_uchar_to_linear_float[256] = { + 0.000000f, 0.000304f, 0.000607f, 0.000911f, 0.001214f, 0.001518f, 0.001821f, 0.002125f, 0.002428f, 0.002732f, 0.003035f, + 0.003347f, 0.003677f, 0.004025f, 0.004391f, 0.004777f, 0.005182f, 0.005605f, 0.006049f, 0.006512f, 0.006995f, 0.007499f, + 0.008023f, 0.008568f, 0.009134f, 0.009721f, 0.010330f, 0.010960f, 0.011612f, 0.012286f, 0.012983f, 0.013702f, 0.014444f, + 0.015209f, 0.015996f, 0.016807f, 0.017642f, 0.018500f, 0.019382f, 0.020289f, 0.021219f, 0.022174f, 0.023153f, 0.024158f, + 0.025187f, 0.026241f, 0.027321f, 0.028426f, 0.029557f, 0.030713f, 0.031896f, 0.033105f, 0.034340f, 0.035601f, 0.036889f, + 0.038204f, 0.039546f, 0.040915f, 0.042311f, 0.043735f, 0.045186f, 0.046665f, 0.048172f, 0.049707f, 0.051269f, 0.052861f, + 0.054480f, 0.056128f, 0.057805f, 0.059511f, 0.061246f, 0.063010f, 0.064803f, 0.066626f, 0.068478f, 0.070360f, 0.072272f, + 0.074214f, 0.076185f, 0.078187f, 0.080220f, 0.082283f, 0.084376f, 0.086500f, 0.088656f, 0.090842f, 0.093059f, 0.095307f, + 0.097587f, 0.099899f, 0.102242f, 0.104616f, 0.107023f, 0.109462f, 0.111932f, 0.114435f, 0.116971f, 0.119538f, 0.122139f, + 0.124772f, 0.127438f, 0.130136f, 0.132868f, 0.135633f, 0.138432f, 0.141263f, 0.144128f, 0.147027f, 0.149960f, 0.152926f, + 0.155926f, 0.158961f, 0.162029f, 0.165132f, 0.168269f, 0.171441f, 0.174647f, 0.177888f, 0.181164f, 0.184475f, 0.187821f, + 0.191202f, 0.194618f, 0.198069f, 0.201556f, 0.205079f, 0.208637f, 0.212231f, 0.215861f, 0.219526f, 0.223228f, 0.226966f, + 0.230740f, 0.234551f, 0.238398f, 0.242281f, 0.246201f, 0.250158f, 0.254152f, 0.258183f, 0.262251f, 0.266356f, 0.270498f, + 0.274677f, 0.278894f, 0.283149f, 0.287441f, 0.291771f, 0.296138f, 0.300544f, 0.304987f, 0.309469f, 0.313989f, 0.318547f, + 0.323143f, 0.327778f, 0.332452f, 0.337164f, 0.341914f, 0.346704f, 0.351533f, 0.356400f, 0.361307f, 0.366253f, 0.371238f, + 0.376262f, 0.381326f, 0.386430f, 0.391573f, 0.396755f, 0.401978f, 0.407240f, 0.412543f, 0.417885f, 0.423268f, 0.428691f, + 0.434154f, 0.439657f, 0.445201f, 0.450786f, 0.456411f, 0.462077f, 0.467784f, 0.473532f, 0.479320f, 0.485150f, 0.491021f, + 0.496933f, 0.502887f, 0.508881f, 0.514918f, 0.520996f, 0.527115f, 0.533276f, 0.539480f, 0.545725f, 0.552011f, 0.558340f, + 0.564712f, 0.571125f, 0.577581f, 0.584078f, 0.590619f, 0.597202f, 0.603827f, 0.610496f, 0.617207f, 0.623960f, 0.630757f, + 0.637597f, 0.644480f, 0.651406f, 0.658375f, 0.665387f, 0.672443f, 0.679543f, 0.686685f, 0.693872f, 0.701102f, 0.708376f, + 0.715694f, 0.723055f, 0.730461f, 0.737911f, 0.745404f, 0.752942f, 0.760525f, 0.768151f, 0.775822f, 0.783538f, 0.791298f, + 0.799103f, 0.806952f, 0.814847f, 0.822786f, 0.830770f, 0.838799f, 0.846873f, 0.854993f, 0.863157f, 0.871367f, 0.879622f, + 0.887923f, 0.896269f, 0.904661f, 0.913099f, 0.921582f, 0.930111f, 0.938686f, 0.947307f, 0.955974f, 0.964686f, 0.973445f, + 0.982251f, 0.991102f, 1.0f +}; + +typedef union +{ + unsigned int u; + float f; +} stbir__FP32; + +// From https://gist.github.com/rygorous/2203834 + +static const stbir_uint32 fp32_to_srgb8_tab4[104] = { + 0x0073000d, 0x007a000d, 0x0080000d, 0x0087000d, 0x008d000d, 0x0094000d, 0x009a000d, 0x00a1000d, + 0x00a7001a, 0x00b4001a, 0x00c1001a, 0x00ce001a, 0x00da001a, 0x00e7001a, 0x00f4001a, 0x0101001a, + 0x010e0033, 0x01280033, 0x01410033, 0x015b0033, 0x01750033, 0x018f0033, 0x01a80033, 0x01c20033, + 0x01dc0067, 0x020f0067, 0x02430067, 0x02760067, 0x02aa0067, 0x02dd0067, 0x03110067, 0x03440067, + 0x037800ce, 0x03df00ce, 0x044600ce, 0x04ad00ce, 0x051400ce, 0x057b00c5, 0x05dd00bc, 0x063b00b5, + 0x06970158, 0x07420142, 0x07e30130, 0x087b0120, 0x090b0112, 0x09940106, 0x0a1700fc, 0x0a9500f2, + 0x0b0f01cb, 0x0bf401ae, 0x0ccb0195, 0x0d950180, 0x0e56016e, 0x0f0d015e, 0x0fbc0150, 0x10630143, + 0x11070264, 0x1238023e, 0x1357021d, 0x14660201, 0x156601e9, 0x165a01d3, 0x174401c0, 0x182401af, + 0x18fe0331, 0x1a9602fe, 0x1c1502d2, 0x1d7e02ad, 0x1ed4028d, 0x201a0270, 0x21520256, 0x227d0240, + 0x239f0443, 0x25c003fe, 0x27bf03c4, 0x29a10392, 0x2b6a0367, 0x2d1d0341, 0x2ebe031f, 0x304d0300, + 0x31d105b0, 0x34a80555, 0x37520507, 0x39d504c5, 0x3c37048b, 0x3e7c0458, 0x40a8042a, 0x42bd0401, + 0x44c20798, 0x488e071e, 0x4c1c06b6, 0x4f76065d, 0x52a50610, 0x55ac05cc, 0x5892058f, 0x5b590559, + 0x5e0c0a23, 0x631c0980, 0x67db08f6, 0x6c55087f, 0x70940818, 0x74a007bd, 0x787d076c, 0x7c330723, +}; + +static stbir__inline stbir_uint8 stbir__linear_to_srgb_uchar(float in) +{ + static const stbir__FP32 almostone = { 0x3f7fffff }; // 1-eps + static const stbir__FP32 minval = { (127-13) << 23 }; + stbir_uint32 tab,bias,scale,t; + stbir__FP32 f; + + // Clamp to [2^(-13), 1-eps]; these two values map to 0 and 1, respectively. + // The tests are carefully written so that NaNs map to 0, same as in the reference + // implementation. + if (!(in > minval.f)) // written this way to catch NaNs + return 0; + if (in > almostone.f) + return 255; + + // Do the table lookup and unpack bias, scale + f.f = in; + tab = fp32_to_srgb8_tab4[(f.u - minval.u) >> 20]; + bias = (tab >> 16) << 9; + scale = tab & 0xffff; + + // Grab next-highest mantissa bits and perform linear interpolation + t = (f.u >> 12) & 0xff; + return (unsigned char) ((bias + scale*t) >> 16); +} + +#ifndef STBIR_FORCE_GATHER_FILTER_SCANLINES_AMOUNT +#define STBIR_FORCE_GATHER_FILTER_SCANLINES_AMOUNT 32 // when downsampling and <= 32 scanlines of buffering, use gather. gather used down to 1/8th scaling for 25% win. +#endif + +#ifndef STBIR_FORCE_MINIMUM_SCANLINES_FOR_SPLITS +#define STBIR_FORCE_MINIMUM_SCANLINES_FOR_SPLITS 4 // when threading, what is the minimum number of scanlines for a split? +#endif + +#define STBIR_INPUT_CALLBACK_PADDING 3 + +#ifdef _M_IX86_FP +#if ( _M_IX86_FP >= 1 ) +#ifndef STBIR_SSE +#define STBIR_SSE +#endif +#endif +#endif + +#ifdef __TINYC__ + // tiny c has no intrinsics yet - this can become a version check if they add them + #define STBIR_NO_SIMD +#endif + +#if defined(_x86_64) || defined( __x86_64__ ) || defined( _M_X64 ) || defined(__x86_64) || defined(_M_AMD64) || defined(__SSE2__) || defined(STBIR_SSE) || defined(STBIR_SSE2) + #ifndef STBIR_SSE2 + #define STBIR_SSE2 + #endif + #if defined(__AVX__) || defined(STBIR_AVX2) + #ifndef STBIR_AVX + #ifndef STBIR_NO_AVX + #define STBIR_AVX + #endif + #endif + #endif + #if defined(__AVX2__) || defined(STBIR_AVX2) + #ifndef STBIR_NO_AVX2 + #ifndef STBIR_AVX2 + #define STBIR_AVX2 + #endif + #if defined( _MSC_VER ) && !defined(__clang__) + #ifndef STBIR_FP16C // FP16C instructions are on all AVX2 cpus, so we can autoselect it here on microsoft - clang needs -m16c + #define STBIR_FP16C + #endif + #endif + #endif + #endif + #ifdef __F16C__ + #ifndef STBIR_FP16C // turn on FP16C instructions if the define is set (for clang and gcc) + #define STBIR_FP16C + #endif + #endif +#endif + +#if defined( _M_ARM64 ) || defined( __aarch64__ ) || defined( __arm64__ ) || ((__ARM_NEON_FP & 4) != 0) || defined(__ARM_NEON__) +#ifndef STBIR_NEON +#define STBIR_NEON +#endif +#endif + +#if defined(_M_ARM) || defined(__arm__) +#ifdef STBIR_USE_FMA +#undef STBIR_USE_FMA // no FMA for 32-bit arm on MSVC +#endif +#endif + +#if defined(__wasm__) && defined(__wasm_simd128__) +#ifndef STBIR_WASM +#define STBIR_WASM +#endif +#endif + +// restrict pointers for the output pointers, other loop and unroll control +#if defined( _MSC_VER ) && !defined(__clang__) + #define STBIR_STREAMOUT_PTR( star ) star __restrict + #define STBIR_NO_UNROLL( ptr ) __assume(ptr) // this oddly keeps msvc from unrolling a loop + #if _MSC_VER >= 1900 + #define STBIR_NO_UNROLL_LOOP_START __pragma(loop( no_vector )) + #else + #define STBIR_NO_UNROLL_LOOP_START + #endif +#elif defined( __clang__ ) + #define STBIR_STREAMOUT_PTR( star ) star __restrict__ + #define STBIR_NO_UNROLL( ptr ) __asm__ (""::"r"(ptr)) + #if ( __clang_major__ >= 4 ) || ( ( __clang_major__ >= 3 ) && ( __clang_minor__ >= 5 ) ) + #define STBIR_NO_UNROLL_LOOP_START _Pragma("clang loop unroll(disable)") _Pragma("clang loop vectorize(disable)") + #else + #define STBIR_NO_UNROLL_LOOP_START + #endif +#elif defined( __GNUC__ ) + #define STBIR_STREAMOUT_PTR( star ) star __restrict__ + #define STBIR_NO_UNROLL( ptr ) __asm__ (""::"r"(ptr)) + #if __GNUC__ >= 14 + #define STBIR_NO_UNROLL_LOOP_START _Pragma("GCC unroll 0") _Pragma("GCC novector") + #else + #define STBIR_NO_UNROLL_LOOP_START + #endif + #define STBIR_NO_UNROLL_LOOP_START_INF_FOR +#else + #define STBIR_STREAMOUT_PTR( star ) star + #define STBIR_NO_UNROLL( ptr ) + #define STBIR_NO_UNROLL_LOOP_START +#endif + +#ifndef STBIR_NO_UNROLL_LOOP_START_INF_FOR +#define STBIR_NO_UNROLL_LOOP_START_INF_FOR STBIR_NO_UNROLL_LOOP_START +#endif + +#ifdef STBIR_NO_SIMD // force simd off for whatever reason + +// force simd off overrides everything else, so clear it all + +#ifdef STBIR_SSE2 +#undef STBIR_SSE2 +#endif + +#ifdef STBIR_AVX +#undef STBIR_AVX +#endif + +#ifdef STBIR_NEON +#undef STBIR_NEON +#endif + +#ifdef STBIR_AVX2 +#undef STBIR_AVX2 +#endif + +#ifdef STBIR_FP16C +#undef STBIR_FP16C +#endif + +#ifdef STBIR_WASM +#undef STBIR_WASM +#endif + +#ifdef STBIR_SIMD +#undef STBIR_SIMD +#endif + +#else // STBIR_SIMD + +#ifdef STBIR_SSE2 + #include + + #define stbir__simdf __m128 + #define stbir__simdi __m128i + + #define stbir_simdi_castf( reg ) _mm_castps_si128(reg) + #define stbir_simdf_casti( reg ) _mm_castsi128_ps(reg) + + #define stbir__simdf_load( reg, ptr ) (reg) = _mm_loadu_ps( (float const*)(ptr) ) + #define stbir__simdi_load( reg, ptr ) (reg) = _mm_loadu_si128 ( (stbir__simdi const*)(ptr) ) + #define stbir__simdf_load1( out, ptr ) (out) = _mm_load_ss( (float const*)(ptr) ) // top values can be random (not denormal or nan for perf) + #define stbir__simdi_load1( out, ptr ) (out) = _mm_castps_si128( _mm_load_ss( (float const*)(ptr) )) + #define stbir__simdf_load1z( out, ptr ) (out) = _mm_load_ss( (float const*)(ptr) ) // top values must be zero + #define stbir__simdf_frep4( fvar ) _mm_set_ps1( fvar ) + #define stbir__simdf_load1frep4( out, fvar ) (out) = _mm_set_ps1( fvar ) + #define stbir__simdf_load2( out, ptr ) (out) = _mm_castsi128_ps( _mm_loadl_epi64( (__m128i*)(ptr)) ) // top values can be random (not denormal or nan for perf) + #define stbir__simdf_load2z( out, ptr ) (out) = _mm_castsi128_ps( _mm_loadl_epi64( (__m128i*)(ptr)) ) // top values must be zero + #define stbir__simdf_load2hmerge( out, reg, ptr ) (out) = _mm_castpd_ps(_mm_loadh_pd( _mm_castps_pd(reg), (double*)(ptr) )) + + #define stbir__simdf_zeroP() _mm_setzero_ps() + #define stbir__simdf_zero( reg ) (reg) = _mm_setzero_ps() + + #define stbir__simdf_store( ptr, reg ) _mm_storeu_ps( (float*)(ptr), reg ) + #define stbir__simdf_store1( ptr, reg ) _mm_store_ss( (float*)(ptr), reg ) + #define stbir__simdf_store2( ptr, reg ) _mm_storel_epi64( (__m128i*)(ptr), _mm_castps_si128(reg) ) + #define stbir__simdf_store2h( ptr, reg ) _mm_storeh_pd( (double*)(ptr), _mm_castps_pd(reg) ) + + #define stbir__simdi_store( ptr, reg ) _mm_storeu_si128( (__m128i*)(ptr), reg ) + #define stbir__simdi_store1( ptr, reg ) _mm_store_ss( (float*)(ptr), _mm_castsi128_ps(reg) ) + #define stbir__simdi_store2( ptr, reg ) _mm_storel_epi64( (__m128i*)(ptr), (reg) ) + + #define stbir__prefetch( ptr ) _mm_prefetch((char*)(ptr), _MM_HINT_T0 ) + + #define stbir__simdi_expand_u8_to_u32(out0,out1,out2,out3,ireg) \ + { \ + stbir__simdi zero = _mm_setzero_si128(); \ + out2 = _mm_unpacklo_epi8( ireg, zero ); \ + out3 = _mm_unpackhi_epi8( ireg, zero ); \ + out0 = _mm_unpacklo_epi16( out2, zero ); \ + out1 = _mm_unpackhi_epi16( out2, zero ); \ + out2 = _mm_unpacklo_epi16( out3, zero ); \ + out3 = _mm_unpackhi_epi16( out3, zero ); \ + } + +#define stbir__simdi_expand_u8_to_1u32(out,ireg) \ + { \ + stbir__simdi zero = _mm_setzero_si128(); \ + out = _mm_unpacklo_epi8( ireg, zero ); \ + out = _mm_unpacklo_epi16( out, zero ); \ + } + + #define stbir__simdi_expand_u16_to_u32(out0,out1,ireg) \ + { \ + stbir__simdi zero = _mm_setzero_si128(); \ + out0 = _mm_unpacklo_epi16( ireg, zero ); \ + out1 = _mm_unpackhi_epi16( ireg, zero ); \ + } + + #define stbir__simdf_convert_float_to_i32( i, f ) (i) = _mm_cvttps_epi32(f) + #define stbir__simdf_convert_float_to_int( f ) _mm_cvtt_ss2si(f) + #define stbir__simdf_convert_float_to_uint8( f ) ((unsigned char)_mm_cvtsi128_si32(_mm_cvttps_epi32(_mm_max_ps(_mm_min_ps(f,STBIR__CONSTF(STBIR_max_uint8_as_float)),_mm_setzero_ps())))) + #define stbir__simdf_convert_float_to_short( f ) ((unsigned short)_mm_cvtsi128_si32(_mm_cvttps_epi32(_mm_max_ps(_mm_min_ps(f,STBIR__CONSTF(STBIR_max_uint16_as_float)),_mm_setzero_ps())))) + + #define stbir__simdi_to_int( i ) _mm_cvtsi128_si32(i) + #define stbir__simdi_convert_i32_to_float(out, ireg) (out) = _mm_cvtepi32_ps( ireg ) + #define stbir__simdf_add( out, reg0, reg1 ) (out) = _mm_add_ps( reg0, reg1 ) + #define stbir__simdf_mult( out, reg0, reg1 ) (out) = _mm_mul_ps( reg0, reg1 ) + #define stbir__simdf_mult_mem( out, reg, ptr ) (out) = _mm_mul_ps( reg, _mm_loadu_ps( (float const*)(ptr) ) ) + #define stbir__simdf_mult1_mem( out, reg, ptr ) (out) = _mm_mul_ss( reg, _mm_load_ss( (float const*)(ptr) ) ) + #define stbir__simdf_add_mem( out, reg, ptr ) (out) = _mm_add_ps( reg, _mm_loadu_ps( (float const*)(ptr) ) ) + #define stbir__simdf_add1_mem( out, reg, ptr ) (out) = _mm_add_ss( reg, _mm_load_ss( (float const*)(ptr) ) ) + + #ifdef STBIR_USE_FMA // not on by default to maintain bit identical simd to non-simd + #include + #define stbir__simdf_madd( out, add, mul1, mul2 ) (out) = _mm_fmadd_ps( mul1, mul2, add ) + #define stbir__simdf_madd1( out, add, mul1, mul2 ) (out) = _mm_fmadd_ss( mul1, mul2, add ) + #define stbir__simdf_madd_mem( out, add, mul, ptr ) (out) = _mm_fmadd_ps( mul, _mm_loadu_ps( (float const*)(ptr) ), add ) + #define stbir__simdf_madd1_mem( out, add, mul, ptr ) (out) = _mm_fmadd_ss( mul, _mm_load_ss( (float const*)(ptr) ), add ) + #else + #define stbir__simdf_madd( out, add, mul1, mul2 ) (out) = _mm_add_ps( add, _mm_mul_ps( mul1, mul2 ) ) + #define stbir__simdf_madd1( out, add, mul1, mul2 ) (out) = _mm_add_ss( add, _mm_mul_ss( mul1, mul2 ) ) + #define stbir__simdf_madd_mem( out, add, mul, ptr ) (out) = _mm_add_ps( add, _mm_mul_ps( mul, _mm_loadu_ps( (float const*)(ptr) ) ) ) + #define stbir__simdf_madd1_mem( out, add, mul, ptr ) (out) = _mm_add_ss( add, _mm_mul_ss( mul, _mm_load_ss( (float const*)(ptr) ) ) ) + #endif + + #define stbir__simdf_add1( out, reg0, reg1 ) (out) = _mm_add_ss( reg0, reg1 ) + #define stbir__simdf_mult1( out, reg0, reg1 ) (out) = _mm_mul_ss( reg0, reg1 ) + + #define stbir__simdf_and( out, reg0, reg1 ) (out) = _mm_and_ps( reg0, reg1 ) + #define stbir__simdf_or( out, reg0, reg1 ) (out) = _mm_or_ps( reg0, reg1 ) + + #define stbir__simdf_min( out, reg0, reg1 ) (out) = _mm_min_ps( reg0, reg1 ) + #define stbir__simdf_max( out, reg0, reg1 ) (out) = _mm_max_ps( reg0, reg1 ) + #define stbir__simdf_min1( out, reg0, reg1 ) (out) = _mm_min_ss( reg0, reg1 ) + #define stbir__simdf_max1( out, reg0, reg1 ) (out) = _mm_max_ss( reg0, reg1 ) + + #define stbir__simdf_0123ABCDto3ABx( out, reg0, reg1 ) (out)=_mm_castsi128_ps( _mm_shuffle_epi32( _mm_castps_si128( _mm_shuffle_ps( reg1,reg0, (0<<0) + (1<<2) + (2<<4) + (3<<6) )), (3<<0) + (0<<2) + (1<<4) + (2<<6) ) ) + #define stbir__simdf_0123ABCDto23Ax( out, reg0, reg1 ) (out)=_mm_castsi128_ps( _mm_shuffle_epi32( _mm_castps_si128( _mm_shuffle_ps( reg1,reg0, (0<<0) + (1<<2) + (2<<4) + (3<<6) )), (2<<0) + (3<<2) + (0<<4) + (1<<6) ) ) + + static const stbir__simdf STBIR_zeroones = { 0.0f,1.0f,0.0f,1.0f }; + static const stbir__simdf STBIR_onezeros = { 1.0f,0.0f,1.0f,0.0f }; + #define stbir__simdf_aaa1( out, alp, ones ) (out)=_mm_castsi128_ps( _mm_shuffle_epi32( _mm_castps_si128( _mm_movehl_ps( ones, alp ) ), (1<<0) + (1<<2) + (1<<4) + (2<<6) ) ) + #define stbir__simdf_1aaa( out, alp, ones ) (out)=_mm_castsi128_ps( _mm_shuffle_epi32( _mm_castps_si128( _mm_movelh_ps( ones, alp ) ), (0<<0) + (2<<2) + (2<<4) + (2<<6) ) ) + #define stbir__simdf_a1a1( out, alp, ones) (out) = _mm_or_ps( _mm_castsi128_ps( _mm_srli_epi64( _mm_castps_si128(alp), 32 ) ), STBIR_zeroones ) + #define stbir__simdf_1a1a( out, alp, ones) (out) = _mm_or_ps( _mm_castsi128_ps( _mm_slli_epi64( _mm_castps_si128(alp), 32 ) ), STBIR_onezeros ) + + #define stbir__simdf_swiz( reg, one, two, three, four ) _mm_castsi128_ps( _mm_shuffle_epi32( _mm_castps_si128( reg ), (one<<0) + (two<<2) + (three<<4) + (four<<6) ) ) + + #define stbir__simdi_and( out, reg0, reg1 ) (out) = _mm_and_si128( reg0, reg1 ) + #define stbir__simdi_or( out, reg0, reg1 ) (out) = _mm_or_si128( reg0, reg1 ) + #define stbir__simdi_16madd( out, reg0, reg1 ) (out) = _mm_madd_epi16( reg0, reg1 ) + + #define stbir__simdf_pack_to_8bytes(out,aa,bb) \ + { \ + stbir__simdf af,bf; \ + stbir__simdi a,b; \ + af = _mm_min_ps( aa, STBIR_max_uint8_as_float ); \ + bf = _mm_min_ps( bb, STBIR_max_uint8_as_float ); \ + af = _mm_max_ps( af, _mm_setzero_ps() ); \ + bf = _mm_max_ps( bf, _mm_setzero_ps() ); \ + a = _mm_cvttps_epi32( af ); \ + b = _mm_cvttps_epi32( bf ); \ + a = _mm_packs_epi32( a, b ); \ + out = _mm_packus_epi16( a, a ); \ + } + + #define stbir__simdf_load4_transposed( o0, o1, o2, o3, ptr ) \ + stbir__simdf_load( o0, (ptr) ); \ + stbir__simdf_load( o1, (ptr)+4 ); \ + stbir__simdf_load( o2, (ptr)+8 ); \ + stbir__simdf_load( o3, (ptr)+12 ); \ + { \ + __m128 tmp0, tmp1, tmp2, tmp3; \ + tmp0 = _mm_unpacklo_ps(o0, o1); \ + tmp2 = _mm_unpacklo_ps(o2, o3); \ + tmp1 = _mm_unpackhi_ps(o0, o1); \ + tmp3 = _mm_unpackhi_ps(o2, o3); \ + o0 = _mm_movelh_ps(tmp0, tmp2); \ + o1 = _mm_movehl_ps(tmp2, tmp0); \ + o2 = _mm_movelh_ps(tmp1, tmp3); \ + o3 = _mm_movehl_ps(tmp3, tmp1); \ + } + + #define stbir__interleave_pack_and_store_16_u8( ptr, r0, r1, r2, r3 ) \ + r0 = _mm_packs_epi32( r0, r1 ); \ + r2 = _mm_packs_epi32( r2, r3 ); \ + r1 = _mm_unpacklo_epi16( r0, r2 ); \ + r3 = _mm_unpackhi_epi16( r0, r2 ); \ + r0 = _mm_unpacklo_epi16( r1, r3 ); \ + r2 = _mm_unpackhi_epi16( r1, r3 ); \ + r0 = _mm_packus_epi16( r0, r2 ); \ + stbir__simdi_store( ptr, r0 ); \ + + #define stbir__simdi_32shr( out, reg, imm ) out = _mm_srli_epi32( reg, imm ) + + #if defined(_MSC_VER) && !defined(__clang__) + // msvc inits with 8 bytes + #define STBIR__CONST_32_TO_8( v ) (char)(unsigned char)((v)&255),(char)(unsigned char)(((v)>>8)&255),(char)(unsigned char)(((v)>>16)&255),(char)(unsigned char)(((v)>>24)&255) + #define STBIR__CONST_4_32i( v ) STBIR__CONST_32_TO_8( v ), STBIR__CONST_32_TO_8( v ), STBIR__CONST_32_TO_8( v ), STBIR__CONST_32_TO_8( v ) + #define STBIR__CONST_4d_32i( v0, v1, v2, v3 ) STBIR__CONST_32_TO_8( v0 ), STBIR__CONST_32_TO_8( v1 ), STBIR__CONST_32_TO_8( v2 ), STBIR__CONST_32_TO_8( v3 ) + #else + // everything else inits with long long's + #define STBIR__CONST_4_32i( v ) (long long)((((stbir_uint64)(stbir_uint32)(v))<<32)|((stbir_uint64)(stbir_uint32)(v))),(long long)((((stbir_uint64)(stbir_uint32)(v))<<32)|((stbir_uint64)(stbir_uint32)(v))) + #define STBIR__CONST_4d_32i( v0, v1, v2, v3 ) (long long)((((stbir_uint64)(stbir_uint32)(v1))<<32)|((stbir_uint64)(stbir_uint32)(v0))),(long long)((((stbir_uint64)(stbir_uint32)(v3))<<32)|((stbir_uint64)(stbir_uint32)(v2))) + #endif + + #define STBIR__SIMDF_CONST(var, x) stbir__simdf var = { x, x, x, x } + #define STBIR__SIMDI_CONST(var, x) stbir__simdi var = { STBIR__CONST_4_32i(x) } + #define STBIR__CONSTF(var) (var) + #define STBIR__CONSTI(var) (var) + + #if defined(STBIR_AVX) || defined(__SSE4_1__) + #include + #define stbir__simdf_pack_to_8words(out,reg0,reg1) out = _mm_packus_epi32(_mm_cvttps_epi32(_mm_max_ps(_mm_min_ps(reg0,STBIR__CONSTF(STBIR_max_uint16_as_float)),_mm_setzero_ps())), _mm_cvttps_epi32(_mm_max_ps(_mm_min_ps(reg1,STBIR__CONSTF(STBIR_max_uint16_as_float)),_mm_setzero_ps()))) + #else + static STBIR__SIMDI_CONST(stbir__s32_32768, 32768); + static STBIR__SIMDI_CONST(stbir__s16_32768, ((32768<<16)|32768)); + + #define stbir__simdf_pack_to_8words(out,reg0,reg1) \ + { \ + stbir__simdi tmp0,tmp1; \ + tmp0 = _mm_cvttps_epi32(_mm_max_ps(_mm_min_ps(reg0,STBIR__CONSTF(STBIR_max_uint16_as_float)),_mm_setzero_ps())); \ + tmp1 = _mm_cvttps_epi32(_mm_max_ps(_mm_min_ps(reg1,STBIR__CONSTF(STBIR_max_uint16_as_float)),_mm_setzero_ps())); \ + tmp0 = _mm_sub_epi32( tmp0, stbir__s32_32768 ); \ + tmp1 = _mm_sub_epi32( tmp1, stbir__s32_32768 ); \ + out = _mm_packs_epi32( tmp0, tmp1 ); \ + out = _mm_sub_epi16( out, stbir__s16_32768 ); \ + } + + #endif + + #define STBIR_SIMD + + // if we detect AVX, set the simd8 defines + #ifdef STBIR_AVX + #include + #define STBIR_SIMD8 + #define stbir__simdf8 __m256 + #define stbir__simdi8 __m256i + #define stbir__simdf8_load( out, ptr ) (out) = _mm256_loadu_ps( (float const *)(ptr) ) + #define stbir__simdi8_load( out, ptr ) (out) = _mm256_loadu_si256( (__m256i const *)(ptr) ) + #define stbir__simdf8_mult( out, a, b ) (out) = _mm256_mul_ps( (a), (b) ) + #define stbir__simdf8_store( ptr, out ) _mm256_storeu_ps( (float*)(ptr), out ) + #define stbir__simdi8_store( ptr, reg ) _mm256_storeu_si256( (__m256i*)(ptr), reg ) + #define stbir__simdf8_frep8( fval ) _mm256_set1_ps( fval ) + + #define stbir__simdf8_min( out, reg0, reg1 ) (out) = _mm256_min_ps( reg0, reg1 ) + #define stbir__simdf8_max( out, reg0, reg1 ) (out) = _mm256_max_ps( reg0, reg1 ) + + #define stbir__simdf8_add4halves( out, bot4, top8 ) (out) = _mm_add_ps( bot4, _mm256_extractf128_ps( top8, 1 ) ) + #define stbir__simdf8_mult_mem( out, reg, ptr ) (out) = _mm256_mul_ps( reg, _mm256_loadu_ps( (float const*)(ptr) ) ) + #define stbir__simdf8_add_mem( out, reg, ptr ) (out) = _mm256_add_ps( reg, _mm256_loadu_ps( (float const*)(ptr) ) ) + #define stbir__simdf8_add( out, a, b ) (out) = _mm256_add_ps( a, b ) + #define stbir__simdf8_load1b( out, ptr ) (out) = _mm256_broadcast_ss( ptr ) + #define stbir__simdf_load1rep4( out, ptr ) (out) = _mm_broadcast_ss( ptr ) // avx load instruction + + #define stbir__simdi8_convert_i32_to_float(out, ireg) (out) = _mm256_cvtepi32_ps( ireg ) + #define stbir__simdf8_convert_float_to_i32( i, f ) (i) = _mm256_cvttps_epi32(f) + + #define stbir__simdf8_bot4s( out, a, b ) (out) = _mm256_permute2f128_ps(a,b, (0<<0)+(2<<4) ) + #define stbir__simdf8_top4s( out, a, b ) (out) = _mm256_permute2f128_ps(a,b, (1<<0)+(3<<4) ) + + #define stbir__simdf8_gettop4( reg ) _mm256_extractf128_ps(reg,1) + + #ifdef STBIR_AVX2 + + #define stbir__simdi8_expand_u8_to_u32(out0,out1,ireg) \ + { \ + stbir__simdi8 a, zero =_mm256_setzero_si256();\ + a = _mm256_permute4x64_epi64( _mm256_unpacklo_epi8( _mm256_permute4x64_epi64(_mm256_castsi128_si256(ireg),(0<<0)+(2<<2)+(1<<4)+(3<<6)), zero ),(0<<0)+(2<<2)+(1<<4)+(3<<6)); \ + out0 = _mm256_unpacklo_epi16( a, zero ); \ + out1 = _mm256_unpackhi_epi16( a, zero ); \ + } + + #define stbir__simdf8_pack_to_16bytes(out,aa,bb) \ + { \ + stbir__simdi8 t; \ + stbir__simdf8 af,bf; \ + stbir__simdi8 a,b; \ + af = _mm256_min_ps( aa, STBIR_max_uint8_as_floatX ); \ + bf = _mm256_min_ps( bb, STBIR_max_uint8_as_floatX ); \ + af = _mm256_max_ps( af, _mm256_setzero_ps() ); \ + bf = _mm256_max_ps( bf, _mm256_setzero_ps() ); \ + a = _mm256_cvttps_epi32( af ); \ + b = _mm256_cvttps_epi32( bf ); \ + t = _mm256_permute4x64_epi64( _mm256_packs_epi32( a, b ), (0<<0)+(2<<2)+(1<<4)+(3<<6) ); \ + out = _mm256_castsi256_si128( _mm256_permute4x64_epi64( _mm256_packus_epi16( t, t ), (0<<0)+(2<<2)+(1<<4)+(3<<6) ) ); \ + } + + #define stbir__simdi8_expand_u16_to_u32(out,ireg) out = _mm256_unpacklo_epi16( _mm256_permute4x64_epi64(_mm256_castsi128_si256(ireg),(0<<0)+(2<<2)+(1<<4)+(3<<6)), _mm256_setzero_si256() ); + + #define stbir__simdf8_pack_to_16words(out,aa,bb) \ + { \ + stbir__simdf8 af,bf; \ + stbir__simdi8 a,b; \ + af = _mm256_min_ps( aa, STBIR_max_uint16_as_floatX ); \ + bf = _mm256_min_ps( bb, STBIR_max_uint16_as_floatX ); \ + af = _mm256_max_ps( af, _mm256_setzero_ps() ); \ + bf = _mm256_max_ps( bf, _mm256_setzero_ps() ); \ + a = _mm256_cvttps_epi32( af ); \ + b = _mm256_cvttps_epi32( bf ); \ + (out) = _mm256_permute4x64_epi64( _mm256_packus_epi32(a, b), (0<<0)+(2<<2)+(1<<4)+(3<<6) ); \ + } + + #else + + #define stbir__simdi8_expand_u8_to_u32(out0,out1,ireg) \ + { \ + stbir__simdi a,zero = _mm_setzero_si128(); \ + a = _mm_unpacklo_epi8( ireg, zero ); \ + out0 = _mm256_setr_m128i( _mm_unpacklo_epi16( a, zero ), _mm_unpackhi_epi16( a, zero ) ); \ + a = _mm_unpackhi_epi8( ireg, zero ); \ + out1 = _mm256_setr_m128i( _mm_unpacklo_epi16( a, zero ), _mm_unpackhi_epi16( a, zero ) ); \ + } + + #define stbir__simdf8_pack_to_16bytes(out,aa,bb) \ + { \ + stbir__simdi t; \ + stbir__simdf8 af,bf; \ + stbir__simdi8 a,b; \ + af = _mm256_min_ps( aa, STBIR_max_uint8_as_floatX ); \ + bf = _mm256_min_ps( bb, STBIR_max_uint8_as_floatX ); \ + af = _mm256_max_ps( af, _mm256_setzero_ps() ); \ + bf = _mm256_max_ps( bf, _mm256_setzero_ps() ); \ + a = _mm256_cvttps_epi32( af ); \ + b = _mm256_cvttps_epi32( bf ); \ + out = _mm_packs_epi32( _mm256_castsi256_si128(a), _mm256_extractf128_si256( a, 1 ) ); \ + out = _mm_packus_epi16( out, out ); \ + t = _mm_packs_epi32( _mm256_castsi256_si128(b), _mm256_extractf128_si256( b, 1 ) ); \ + t = _mm_packus_epi16( t, t ); \ + out = _mm_castps_si128( _mm_shuffle_ps( _mm_castsi128_ps(out), _mm_castsi128_ps(t), (0<<0)+(1<<2)+(0<<4)+(1<<6) ) ); \ + } + + #define stbir__simdi8_expand_u16_to_u32(out,ireg) \ + { \ + stbir__simdi a,b,zero = _mm_setzero_si128(); \ + a = _mm_unpacklo_epi16( ireg, zero ); \ + b = _mm_unpackhi_epi16( ireg, zero ); \ + out = _mm256_insertf128_si256( _mm256_castsi128_si256( a ), b, 1 ); \ + } + + #define stbir__simdf8_pack_to_16words(out,aa,bb) \ + { \ + stbir__simdi t0,t1; \ + stbir__simdf8 af,bf; \ + stbir__simdi8 a,b; \ + af = _mm256_min_ps( aa, STBIR_max_uint16_as_floatX ); \ + bf = _mm256_min_ps( bb, STBIR_max_uint16_as_floatX ); \ + af = _mm256_max_ps( af, _mm256_setzero_ps() ); \ + bf = _mm256_max_ps( bf, _mm256_setzero_ps() ); \ + a = _mm256_cvttps_epi32( af ); \ + b = _mm256_cvttps_epi32( bf ); \ + t0 = _mm_packus_epi32( _mm256_castsi256_si128(a), _mm256_extractf128_si256( a, 1 ) ); \ + t1 = _mm_packus_epi32( _mm256_castsi256_si128(b), _mm256_extractf128_si256( b, 1 ) ); \ + out = _mm256_setr_m128i( t0, t1 ); \ + } + + #endif + + static __m256i stbir_00001111 = { STBIR__CONST_4d_32i( 0, 0, 0, 0 ), STBIR__CONST_4d_32i( 1, 1, 1, 1 ) }; + #define stbir__simdf8_0123to00001111( out, in ) (out) = _mm256_permutevar_ps ( in, stbir_00001111 ) + + static __m256i stbir_22223333 = { STBIR__CONST_4d_32i( 2, 2, 2, 2 ), STBIR__CONST_4d_32i( 3, 3, 3, 3 ) }; + #define stbir__simdf8_0123to22223333( out, in ) (out) = _mm256_permutevar_ps ( in, stbir_22223333 ) + + #define stbir__simdf8_0123to2222( out, in ) (out) = stbir__simdf_swiz(_mm256_castps256_ps128(in), 2,2,2,2 ) + + #define stbir__simdf8_load4b( out, ptr ) (out) = _mm256_broadcast_ps( (__m128 const *)(ptr) ) + + static __m256i stbir_00112233 = { STBIR__CONST_4d_32i( 0, 0, 1, 1 ), STBIR__CONST_4d_32i( 2, 2, 3, 3 ) }; + #define stbir__simdf8_0123to00112233( out, in ) (out) = _mm256_permutevar_ps ( in, stbir_00112233 ) + #define stbir__simdf8_add4( out, a8, b ) (out) = _mm256_add_ps( a8, _mm256_castps128_ps256( b ) ) + + static __m256i stbir_load6 = { STBIR__CONST_4_32i( 0x80000000 ), STBIR__CONST_4d_32i( 0x80000000, 0x80000000, 0, 0 ) }; + #define stbir__simdf8_load6z( out, ptr ) (out) = _mm256_maskload_ps( ptr, stbir_load6 ) + + #define stbir__simdf8_0123to00000000( out, in ) (out) = _mm256_shuffle_ps ( in, in, (0<<0)+(0<<2)+(0<<4)+(0<<6) ) + #define stbir__simdf8_0123to11111111( out, in ) (out) = _mm256_shuffle_ps ( in, in, (1<<0)+(1<<2)+(1<<4)+(1<<6) ) + #define stbir__simdf8_0123to22222222( out, in ) (out) = _mm256_shuffle_ps ( in, in, (2<<0)+(2<<2)+(2<<4)+(2<<6) ) + #define stbir__simdf8_0123to33333333( out, in ) (out) = _mm256_shuffle_ps ( in, in, (3<<0)+(3<<2)+(3<<4)+(3<<6) ) + #define stbir__simdf8_0123to21032103( out, in ) (out) = _mm256_shuffle_ps ( in, in, (2<<0)+(1<<2)+(0<<4)+(3<<6) ) + #define stbir__simdf8_0123to32103210( out, in ) (out) = _mm256_shuffle_ps ( in, in, (3<<0)+(2<<2)+(1<<4)+(0<<6) ) + #define stbir__simdf8_0123to12301230( out, in ) (out) = _mm256_shuffle_ps ( in, in, (1<<0)+(2<<2)+(3<<4)+(0<<6) ) + #define stbir__simdf8_0123to10321032( out, in ) (out) = _mm256_shuffle_ps ( in, in, (1<<0)+(0<<2)+(3<<4)+(2<<6) ) + #define stbir__simdf8_0123to30123012( out, in ) (out) = _mm256_shuffle_ps ( in, in, (3<<0)+(0<<2)+(1<<4)+(2<<6) ) + + #define stbir__simdf8_0123to11331133( out, in ) (out) = _mm256_shuffle_ps ( in, in, (1<<0)+(1<<2)+(3<<4)+(3<<6) ) + #define stbir__simdf8_0123to00220022( out, in ) (out) = _mm256_shuffle_ps ( in, in, (0<<0)+(0<<2)+(2<<4)+(2<<6) ) + + #define stbir__simdf8_aaa1( out, alp, ones ) (out) = _mm256_blend_ps( alp, ones, (1<<0)+(1<<1)+(1<<2)+(0<<3)+(1<<4)+(1<<5)+(1<<6)+(0<<7)); (out)=_mm256_shuffle_ps( out,out, (3<<0) + (3<<2) + (3<<4) + (0<<6) ) + #define stbir__simdf8_1aaa( out, alp, ones ) (out) = _mm256_blend_ps( alp, ones, (0<<0)+(1<<1)+(1<<2)+(1<<3)+(0<<4)+(1<<5)+(1<<6)+(1<<7)); (out)=_mm256_shuffle_ps( out,out, (1<<0) + (0<<2) + (0<<4) + (0<<6) ) + #define stbir__simdf8_a1a1( out, alp, ones) (out) = _mm256_blend_ps( alp, ones, (1<<0)+(0<<1)+(1<<2)+(0<<3)+(1<<4)+(0<<5)+(1<<6)+(0<<7)); (out)=_mm256_shuffle_ps( out,out, (1<<0) + (0<<2) + (3<<4) + (2<<6) ) + #define stbir__simdf8_1a1a( out, alp, ones) (out) = _mm256_blend_ps( alp, ones, (0<<0)+(1<<1)+(0<<2)+(1<<3)+(0<<4)+(1<<5)+(0<<6)+(1<<7)); (out)=_mm256_shuffle_ps( out,out, (1<<0) + (0<<2) + (3<<4) + (2<<6) ) + + #define stbir__simdf8_zero( reg ) (reg) = _mm256_setzero_ps() + + #ifdef STBIR_USE_FMA // not on by default to maintain bit identical simd to non-simd + #define stbir__simdf8_madd( out, add, mul1, mul2 ) (out) = _mm256_fmadd_ps( mul1, mul2, add ) + #define stbir__simdf8_madd_mem( out, add, mul, ptr ) (out) = _mm256_fmadd_ps( mul, _mm256_loadu_ps( (float const*)(ptr) ), add ) + #define stbir__simdf8_madd_mem4( out, add, mul, ptr )(out) = _mm256_fmadd_ps( _mm256_setr_m128( mul, _mm_setzero_ps() ), _mm256_setr_m128( _mm_loadu_ps( (float const*)(ptr) ), _mm_setzero_ps() ), add ) + #else + #define stbir__simdf8_madd( out, add, mul1, mul2 ) (out) = _mm256_add_ps( add, _mm256_mul_ps( mul1, mul2 ) ) + #define stbir__simdf8_madd_mem( out, add, mul, ptr ) (out) = _mm256_add_ps( add, _mm256_mul_ps( mul, _mm256_loadu_ps( (float const*)(ptr) ) ) ) + #define stbir__simdf8_madd_mem4( out, add, mul, ptr ) (out) = _mm256_add_ps( add, _mm256_setr_m128( _mm_mul_ps( mul, _mm_loadu_ps( (float const*)(ptr) ) ), _mm_setzero_ps() ) ) + #endif + #define stbir__if_simdf8_cast_to_simdf4( val ) _mm256_castps256_ps128( val ) + + #endif + + #ifdef STBIR_FLOORF + #undef STBIR_FLOORF + #endif + #define STBIR_FLOORF stbir_simd_floorf + static stbir__inline float stbir_simd_floorf(float x) // martins floorf + { + #if defined(STBIR_AVX) || defined(__SSE4_1__) || defined(STBIR_SSE41) + __m128 t = _mm_set_ss(x); + return _mm_cvtss_f32( _mm_floor_ss(t, t) ); + #else + __m128 f = _mm_set_ss(x); + __m128 t = _mm_cvtepi32_ps(_mm_cvttps_epi32(f)); + __m128 r = _mm_add_ss(t, _mm_and_ps(_mm_cmplt_ss(f, t), _mm_set_ss(-1.0f))); + return _mm_cvtss_f32(r); + #endif + } + + #ifdef STBIR_CEILF + #undef STBIR_CEILF + #endif + #define STBIR_CEILF stbir_simd_ceilf + static stbir__inline float stbir_simd_ceilf(float x) // martins ceilf + { + #if defined(STBIR_AVX) || defined(__SSE4_1__) || defined(STBIR_SSE41) + __m128 t = _mm_set_ss(x); + return _mm_cvtss_f32( _mm_ceil_ss(t, t) ); + #else + __m128 f = _mm_set_ss(x); + __m128 t = _mm_cvtepi32_ps(_mm_cvttps_epi32(f)); + __m128 r = _mm_add_ss(t, _mm_and_ps(_mm_cmplt_ss(t, f), _mm_set_ss(1.0f))); + return _mm_cvtss_f32(r); + #endif + } + +#elif defined(STBIR_NEON) + + #include + + #define stbir__simdf float32x4_t + #define stbir__simdi uint32x4_t + + #define stbir_simdi_castf( reg ) vreinterpretq_u32_f32(reg) + #define stbir_simdf_casti( reg ) vreinterpretq_f32_u32(reg) + + #define stbir__simdf_load( reg, ptr ) (reg) = vld1q_f32( (float const*)(ptr) ) + #define stbir__simdi_load( reg, ptr ) (reg) = vld1q_u32( (uint32_t const*)(ptr) ) + #define stbir__simdf_load1( out, ptr ) (out) = vld1q_dup_f32( (float const*)(ptr) ) // top values can be random (not denormal or nan for perf) + #define stbir__simdi_load1( out, ptr ) (out) = vld1q_dup_u32( (uint32_t const*)(ptr) ) + #define stbir__simdf_load1z( out, ptr ) (out) = vld1q_lane_f32( (float const*)(ptr), vdupq_n_f32(0), 0 ) // top values must be zero + #define stbir__simdf_frep4( fvar ) vdupq_n_f32( fvar ) + #define stbir__simdf_load1frep4( out, fvar ) (out) = vdupq_n_f32( fvar ) + #define stbir__simdf_load2( out, ptr ) (out) = vcombine_f32( vld1_f32( (float const*)(ptr) ), vcreate_f32(0) ) // top values can be random (not denormal or nan for perf) + #define stbir__simdf_load2z( out, ptr ) (out) = vcombine_f32( vld1_f32( (float const*)(ptr) ), vcreate_f32(0) ) // top values must be zero + #define stbir__simdf_load2hmerge( out, reg, ptr ) (out) = vcombine_f32( vget_low_f32(reg), vld1_f32( (float const*)(ptr) ) ) + + #define stbir__simdf_zeroP() vdupq_n_f32(0) + #define stbir__simdf_zero( reg ) (reg) = vdupq_n_f32(0) + + #define stbir__simdf_store( ptr, reg ) vst1q_f32( (float*)(ptr), reg ) + #define stbir__simdf_store1( ptr, reg ) vst1q_lane_f32( (float*)(ptr), reg, 0) + #define stbir__simdf_store2( ptr, reg ) vst1_f32( (float*)(ptr), vget_low_f32(reg) ) + #define stbir__simdf_store2h( ptr, reg ) vst1_f32( (float*)(ptr), vget_high_f32(reg) ) + + #define stbir__simdi_store( ptr, reg ) vst1q_u32( (uint32_t*)(ptr), reg ) + #define stbir__simdi_store1( ptr, reg ) vst1q_lane_u32( (uint32_t*)(ptr), reg, 0 ) + #define stbir__simdi_store2( ptr, reg ) vst1_u32( (uint32_t*)(ptr), vget_low_u32(reg) ) + + #define stbir__prefetch( ptr ) + + #define stbir__simdi_expand_u8_to_u32(out0,out1,out2,out3,ireg) \ + { \ + uint16x8_t l = vmovl_u8( vget_low_u8 ( vreinterpretq_u8_u32(ireg) ) ); \ + uint16x8_t h = vmovl_u8( vget_high_u8( vreinterpretq_u8_u32(ireg) ) ); \ + out0 = vmovl_u16( vget_low_u16 ( l ) ); \ + out1 = vmovl_u16( vget_high_u16( l ) ); \ + out2 = vmovl_u16( vget_low_u16 ( h ) ); \ + out3 = vmovl_u16( vget_high_u16( h ) ); \ + } + + #define stbir__simdi_expand_u8_to_1u32(out,ireg) \ + { \ + uint16x8_t tmp = vmovl_u8( vget_low_u8( vreinterpretq_u8_u32(ireg) ) ); \ + out = vmovl_u16( vget_low_u16( tmp ) ); \ + } + + #define stbir__simdi_expand_u16_to_u32(out0,out1,ireg) \ + { \ + uint16x8_t tmp = vreinterpretq_u16_u32(ireg); \ + out0 = vmovl_u16( vget_low_u16 ( tmp ) ); \ + out1 = vmovl_u16( vget_high_u16( tmp ) ); \ + } + + #define stbir__simdf_convert_float_to_i32( i, f ) (i) = vreinterpretq_u32_s32( vcvtq_s32_f32(f) ) + #define stbir__simdf_convert_float_to_int( f ) vgetq_lane_s32(vcvtq_s32_f32(f), 0) + #define stbir__simdi_to_int( i ) (int)vgetq_lane_u32(i, 0) + #define stbir__simdf_convert_float_to_uint8( f ) ((unsigned char)vgetq_lane_s32(vcvtq_s32_f32(vmaxq_f32(vminq_f32(f,STBIR__CONSTF(STBIR_max_uint8_as_float)),vdupq_n_f32(0))), 0)) + #define stbir__simdf_convert_float_to_short( f ) ((unsigned short)vgetq_lane_s32(vcvtq_s32_f32(vmaxq_f32(vminq_f32(f,STBIR__CONSTF(STBIR_max_uint16_as_float)),vdupq_n_f32(0))), 0)) + #define stbir__simdi_convert_i32_to_float(out, ireg) (out) = vcvtq_f32_s32( vreinterpretq_s32_u32(ireg) ) + #define stbir__simdf_add( out, reg0, reg1 ) (out) = vaddq_f32( reg0, reg1 ) + #define stbir__simdf_mult( out, reg0, reg1 ) (out) = vmulq_f32( reg0, reg1 ) + #define stbir__simdf_mult_mem( out, reg, ptr ) (out) = vmulq_f32( reg, vld1q_f32( (float const*)(ptr) ) ) + #define stbir__simdf_mult1_mem( out, reg, ptr ) (out) = vmulq_f32( reg, vld1q_dup_f32( (float const*)(ptr) ) ) + #define stbir__simdf_add_mem( out, reg, ptr ) (out) = vaddq_f32( reg, vld1q_f32( (float const*)(ptr) ) ) + #define stbir__simdf_add1_mem( out, reg, ptr ) (out) = vaddq_f32( reg, vld1q_dup_f32( (float const*)(ptr) ) ) + + #ifdef STBIR_USE_FMA // not on by default to maintain bit identical simd to non-simd (and also x64 no madd to arm madd) + #define stbir__simdf_madd( out, add, mul1, mul2 ) (out) = vfmaq_f32( add, mul1, mul2 ) + #define stbir__simdf_madd1( out, add, mul1, mul2 ) (out) = vfmaq_f32( add, mul1, mul2 ) + #define stbir__simdf_madd_mem( out, add, mul, ptr ) (out) = vfmaq_f32( add, mul, vld1q_f32( (float const*)(ptr) ) ) + #define stbir__simdf_madd1_mem( out, add, mul, ptr ) (out) = vfmaq_f32( add, mul, vld1q_dup_f32( (float const*)(ptr) ) ) + #else + #define stbir__simdf_madd( out, add, mul1, mul2 ) (out) = vaddq_f32( add, vmulq_f32( mul1, mul2 ) ) + #define stbir__simdf_madd1( out, add, mul1, mul2 ) (out) = vaddq_f32( add, vmulq_f32( mul1, mul2 ) ) + #define stbir__simdf_madd_mem( out, add, mul, ptr ) (out) = vaddq_f32( add, vmulq_f32( mul, vld1q_f32( (float const*)(ptr) ) ) ) + #define stbir__simdf_madd1_mem( out, add, mul, ptr ) (out) = vaddq_f32( add, vmulq_f32( mul, vld1q_dup_f32( (float const*)(ptr) ) ) ) + #endif + + #define stbir__simdf_add1( out, reg0, reg1 ) (out) = vaddq_f32( reg0, reg1 ) + #define stbir__simdf_mult1( out, reg0, reg1 ) (out) = vmulq_f32( reg0, reg1 ) + + #define stbir__simdf_and( out, reg0, reg1 ) (out) = vreinterpretq_f32_u32( vandq_u32( vreinterpretq_u32_f32(reg0), vreinterpretq_u32_f32(reg1) ) ) + #define stbir__simdf_or( out, reg0, reg1 ) (out) = vreinterpretq_f32_u32( vorrq_u32( vreinterpretq_u32_f32(reg0), vreinterpretq_u32_f32(reg1) ) ) + + #define stbir__simdf_min( out, reg0, reg1 ) (out) = vminq_f32( reg0, reg1 ) + #define stbir__simdf_max( out, reg0, reg1 ) (out) = vmaxq_f32( reg0, reg1 ) + #define stbir__simdf_min1( out, reg0, reg1 ) (out) = vminq_f32( reg0, reg1 ) + #define stbir__simdf_max1( out, reg0, reg1 ) (out) = vmaxq_f32( reg0, reg1 ) + + #define stbir__simdf_0123ABCDto3ABx( out, reg0, reg1 ) (out) = vextq_f32( reg0, reg1, 3 ) + #define stbir__simdf_0123ABCDto23Ax( out, reg0, reg1 ) (out) = vextq_f32( reg0, reg1, 2 ) + + #define stbir__simdf_a1a1( out, alp, ones ) (out) = vzipq_f32(vuzpq_f32(alp, alp).val[1], ones).val[0] + #define stbir__simdf_1a1a( out, alp, ones ) (out) = vzipq_f32(ones, vuzpq_f32(alp, alp).val[0]).val[0] + + #if defined( _M_ARM64 ) || defined( __aarch64__ ) || defined( __arm64__ ) + + #define stbir__simdf_aaa1( out, alp, ones ) (out) = vcopyq_laneq_f32(vdupq_n_f32(vgetq_lane_f32(alp, 3)), 3, ones, 3) + #define stbir__simdf_1aaa( out, alp, ones ) (out) = vcopyq_laneq_f32(vdupq_n_f32(vgetq_lane_f32(alp, 0)), 0, ones, 0) + + #if defined( _MSC_VER ) && !defined(__clang__) + #define stbir_make16(a,b,c,d) vcombine_u8( \ + vcreate_u8( (4*a+0) | ((4*a+1)<<8) | ((4*a+2)<<16) | ((4*a+3)<<24) | \ + ((stbir_uint64)(4*b+0)<<32) | ((stbir_uint64)(4*b+1)<<40) | ((stbir_uint64)(4*b+2)<<48) | ((stbir_uint64)(4*b+3)<<56)), \ + vcreate_u8( (4*c+0) | ((4*c+1)<<8) | ((4*c+2)<<16) | ((4*c+3)<<24) | \ + ((stbir_uint64)(4*d+0)<<32) | ((stbir_uint64)(4*d+1)<<40) | ((stbir_uint64)(4*d+2)<<48) | ((stbir_uint64)(4*d+3)<<56) ) ) + + static stbir__inline uint8x16x2_t stbir_make16x2(float32x4_t rega,float32x4_t regb) + { + uint8x16x2_t r = { vreinterpretq_u8_f32(rega), vreinterpretq_u8_f32(regb) }; + return r; + } + #else + #define stbir_make16(a,b,c,d) (uint8x16_t){4*a+0,4*a+1,4*a+2,4*a+3,4*b+0,4*b+1,4*b+2,4*b+3,4*c+0,4*c+1,4*c+2,4*c+3,4*d+0,4*d+1,4*d+2,4*d+3} + #define stbir_make16x2(a,b) (uint8x16x2_t){{vreinterpretq_u8_f32(a),vreinterpretq_u8_f32(b)}} + #endif + + #define stbir__simdf_swiz( reg, one, two, three, four ) vreinterpretq_f32_u8( vqtbl1q_u8( vreinterpretq_u8_f32(reg), stbir_make16(one, two, three, four) ) ) + #define stbir__simdf_swiz2( rega, regb, one, two, three, four ) vreinterpretq_f32_u8( vqtbl2q_u8( stbir_make16x2(rega,regb), stbir_make16(one, two, three, four) ) ) + + #define stbir__simdi_16madd( out, reg0, reg1 ) \ + { \ + int16x8_t r0 = vreinterpretq_s16_u32(reg0); \ + int16x8_t r1 = vreinterpretq_s16_u32(reg1); \ + int32x4_t tmp0 = vmull_s16( vget_low_s16(r0), vget_low_s16(r1) ); \ + int32x4_t tmp1 = vmull_s16( vget_high_s16(r0), vget_high_s16(r1) ); \ + (out) = vreinterpretq_u32_s32( vpaddq_s32(tmp0, tmp1) ); \ + } + + #else + + #define stbir__simdf_aaa1( out, alp, ones ) (out) = vsetq_lane_f32(1.0f, vdupq_n_f32(vgetq_lane_f32(alp, 3)), 3) + #define stbir__simdf_1aaa( out, alp, ones ) (out) = vsetq_lane_f32(1.0f, vdupq_n_f32(vgetq_lane_f32(alp, 0)), 0) + + #if defined( _MSC_VER ) && !defined(__clang__) + static stbir__inline uint8x8x2_t stbir_make8x2(float32x4_t reg) + { + uint8x8x2_t r = { { vget_low_u8(vreinterpretq_u8_f32(reg)), vget_high_u8(vreinterpretq_u8_f32(reg)) } }; + return r; + } + #define stbir_make8(a,b) vcreate_u8( \ + (4*a+0) | ((4*a+1)<<8) | ((4*a+2)<<16) | ((4*a+3)<<24) | \ + ((stbir_uint64)(4*b+0)<<32) | ((stbir_uint64)(4*b+1)<<40) | ((stbir_uint64)(4*b+2)<<48) | ((stbir_uint64)(4*b+3)<<56) ) + #else + #define stbir_make8x2(reg) (uint8x8x2_t){ { vget_low_u8(vreinterpretq_u8_f32(reg)), vget_high_u8(vreinterpretq_u8_f32(reg)) } } + #define stbir_make8(a,b) (uint8x8_t){4*a+0,4*a+1,4*a+2,4*a+3,4*b+0,4*b+1,4*b+2,4*b+3} + #endif + + #define stbir__simdf_swiz( reg, one, two, three, four ) vreinterpretq_f32_u8( vcombine_u8( \ + vtbl2_u8( stbir_make8x2( reg ), stbir_make8( one, two ) ), \ + vtbl2_u8( stbir_make8x2( reg ), stbir_make8( three, four ) ) ) ) + + #define stbir__simdi_16madd( out, reg0, reg1 ) \ + { \ + int16x8_t r0 = vreinterpretq_s16_u32(reg0); \ + int16x8_t r1 = vreinterpretq_s16_u32(reg1); \ + int32x4_t tmp0 = vmull_s16( vget_low_s16(r0), vget_low_s16(r1) ); \ + int32x4_t tmp1 = vmull_s16( vget_high_s16(r0), vget_high_s16(r1) ); \ + int32x2_t out0 = vpadd_s32( vget_low_s32(tmp0), vget_high_s32(tmp0) ); \ + int32x2_t out1 = vpadd_s32( vget_low_s32(tmp1), vget_high_s32(tmp1) ); \ + (out) = vreinterpretq_u32_s32( vcombine_s32(out0, out1) ); \ + } + + #endif + + #define stbir__simdi_and( out, reg0, reg1 ) (out) = vandq_u32( reg0, reg1 ) + #define stbir__simdi_or( out, reg0, reg1 ) (out) = vorrq_u32( reg0, reg1 ) + + #define stbir__simdf_pack_to_8bytes(out,aa,bb) \ + { \ + float32x4_t af = vmaxq_f32( vminq_f32(aa,STBIR__CONSTF(STBIR_max_uint8_as_float) ), vdupq_n_f32(0) ); \ + float32x4_t bf = vmaxq_f32( vminq_f32(bb,STBIR__CONSTF(STBIR_max_uint8_as_float) ), vdupq_n_f32(0) ); \ + int16x4_t ai = vqmovn_s32( vcvtq_s32_f32( af ) ); \ + int16x4_t bi = vqmovn_s32( vcvtq_s32_f32( bf ) ); \ + uint8x8_t out8 = vqmovun_s16( vcombine_s16(ai, bi) ); \ + out = vreinterpretq_u32_u8( vcombine_u8(out8, out8) ); \ + } + + #define stbir__simdf_pack_to_8words(out,aa,bb) \ + { \ + float32x4_t af = vmaxq_f32( vminq_f32(aa,STBIR__CONSTF(STBIR_max_uint16_as_float) ), vdupq_n_f32(0) ); \ + float32x4_t bf = vmaxq_f32( vminq_f32(bb,STBIR__CONSTF(STBIR_max_uint16_as_float) ), vdupq_n_f32(0) ); \ + int32x4_t ai = vcvtq_s32_f32( af ); \ + int32x4_t bi = vcvtq_s32_f32( bf ); \ + out = vreinterpretq_u32_u16( vcombine_u16(vqmovun_s32(ai), vqmovun_s32(bi)) ); \ + } + + #define stbir__interleave_pack_and_store_16_u8( ptr, r0, r1, r2, r3 ) \ + { \ + int16x4x2_t tmp0 = vzip_s16( vqmovn_s32(vreinterpretq_s32_u32(r0)), vqmovn_s32(vreinterpretq_s32_u32(r2)) ); \ + int16x4x2_t tmp1 = vzip_s16( vqmovn_s32(vreinterpretq_s32_u32(r1)), vqmovn_s32(vreinterpretq_s32_u32(r3)) ); \ + uint8x8x2_t out = \ + { { \ + vqmovun_s16( vcombine_s16(tmp0.val[0], tmp0.val[1]) ), \ + vqmovun_s16( vcombine_s16(tmp1.val[0], tmp1.val[1]) ), \ + } }; \ + vst2_u8(ptr, out); \ + } + + #define stbir__simdf_load4_transposed( o0, o1, o2, o3, ptr ) \ + { \ + float32x4x4_t tmp = vld4q_f32(ptr); \ + o0 = tmp.val[0]; \ + o1 = tmp.val[1]; \ + o2 = tmp.val[2]; \ + o3 = tmp.val[3]; \ + } + + #define stbir__simdi_32shr( out, reg, imm ) out = vshrq_n_u32( reg, imm ) + + #if defined( _MSC_VER ) && !defined(__clang__) + #define STBIR__SIMDF_CONST(var, x) __declspec(align(8)) float var[] = { x, x, x, x } + #define STBIR__SIMDI_CONST(var, x) __declspec(align(8)) uint32_t var[] = { x, x, x, x } + #define STBIR__CONSTF(var) (*(const float32x4_t*)var) + #define STBIR__CONSTI(var) (*(const uint32x4_t*)var) + #else + #define STBIR__SIMDF_CONST(var, x) stbir__simdf var = { x, x, x, x } + #define STBIR__SIMDI_CONST(var, x) stbir__simdi var = { x, x, x, x } + #define STBIR__CONSTF(var) (var) + #define STBIR__CONSTI(var) (var) + #endif + + #ifdef STBIR_FLOORF + #undef STBIR_FLOORF + #endif + #define STBIR_FLOORF stbir_simd_floorf + static stbir__inline float stbir_simd_floorf(float x) + { + #if defined( _M_ARM64 ) || defined( __aarch64__ ) || defined( __arm64__ ) + return vget_lane_f32( vrndm_f32( vdup_n_f32(x) ), 0); + #else + float32x2_t f = vdup_n_f32(x); + float32x2_t t = vcvt_f32_s32(vcvt_s32_f32(f)); + uint32x2_t a = vclt_f32(f, t); + uint32x2_t b = vreinterpret_u32_f32(vdup_n_f32(-1.0f)); + float32x2_t r = vadd_f32(t, vreinterpret_f32_u32(vand_u32(a, b))); + return vget_lane_f32(r, 0); + #endif + } + + #ifdef STBIR_CEILF + #undef STBIR_CEILF + #endif + #define STBIR_CEILF stbir_simd_ceilf + static stbir__inline float stbir_simd_ceilf(float x) + { + #if defined( _M_ARM64 ) || defined( __aarch64__ ) || defined( __arm64__ ) + return vget_lane_f32( vrndp_f32( vdup_n_f32(x) ), 0); + #else + float32x2_t f = vdup_n_f32(x); + float32x2_t t = vcvt_f32_s32(vcvt_s32_f32(f)); + uint32x2_t a = vclt_f32(t, f); + uint32x2_t b = vreinterpret_u32_f32(vdup_n_f32(1.0f)); + float32x2_t r = vadd_f32(t, vreinterpret_f32_u32(vand_u32(a, b))); + return vget_lane_f32(r, 0); + #endif + } + + #define STBIR_SIMD + +#elif defined(STBIR_WASM) + + #include + + #define stbir__simdf v128_t + #define stbir__simdi v128_t + + #define stbir_simdi_castf( reg ) (reg) + #define stbir_simdf_casti( reg ) (reg) + + #define stbir__simdf_load( reg, ptr ) (reg) = wasm_v128_load( (void const*)(ptr) ) + #define stbir__simdi_load( reg, ptr ) (reg) = wasm_v128_load( (void const*)(ptr) ) + #define stbir__simdf_load1( out, ptr ) (out) = wasm_v128_load32_splat( (void const*)(ptr) ) // top values can be random (not denormal or nan for perf) + #define stbir__simdi_load1( out, ptr ) (out) = wasm_v128_load32_splat( (void const*)(ptr) ) + #define stbir__simdf_load1z( out, ptr ) (out) = wasm_v128_load32_zero( (void const*)(ptr) ) // top values must be zero + #define stbir__simdf_frep4( fvar ) wasm_f32x4_splat( fvar ) + #define stbir__simdf_load1frep4( out, fvar ) (out) = wasm_f32x4_splat( fvar ) + #define stbir__simdf_load2( out, ptr ) (out) = wasm_v128_load64_splat( (void const*)(ptr) ) // top values can be random (not denormal or nan for perf) + #define stbir__simdf_load2z( out, ptr ) (out) = wasm_v128_load64_zero( (void const*)(ptr) ) // top values must be zero + #define stbir__simdf_load2hmerge( out, reg, ptr ) (out) = wasm_v128_load64_lane( (void const*)(ptr), reg, 1 ) + + #define stbir__simdf_zeroP() wasm_f32x4_const_splat(0) + #define stbir__simdf_zero( reg ) (reg) = wasm_f32x4_const_splat(0) + + #define stbir__simdf_store( ptr, reg ) wasm_v128_store( (void*)(ptr), reg ) + #define stbir__simdf_store1( ptr, reg ) wasm_v128_store32_lane( (void*)(ptr), reg, 0 ) + #define stbir__simdf_store2( ptr, reg ) wasm_v128_store64_lane( (void*)(ptr), reg, 0 ) + #define stbir__simdf_store2h( ptr, reg ) wasm_v128_store64_lane( (void*)(ptr), reg, 1 ) + + #define stbir__simdi_store( ptr, reg ) wasm_v128_store( (void*)(ptr), reg ) + #define stbir__simdi_store1( ptr, reg ) wasm_v128_store32_lane( (void*)(ptr), reg, 0 ) + #define stbir__simdi_store2( ptr, reg ) wasm_v128_store64_lane( (void*)(ptr), reg, 0 ) + + #define stbir__prefetch( ptr ) + + #define stbir__simdi_expand_u8_to_u32(out0,out1,out2,out3,ireg) \ + { \ + v128_t l = wasm_u16x8_extend_low_u8x16 ( ireg ); \ + v128_t h = wasm_u16x8_extend_high_u8x16( ireg ); \ + out0 = wasm_u32x4_extend_low_u16x8 ( l ); \ + out1 = wasm_u32x4_extend_high_u16x8( l ); \ + out2 = wasm_u32x4_extend_low_u16x8 ( h ); \ + out3 = wasm_u32x4_extend_high_u16x8( h ); \ + } + + #define stbir__simdi_expand_u8_to_1u32(out,ireg) \ + { \ + v128_t tmp = wasm_u16x8_extend_low_u8x16(ireg); \ + out = wasm_u32x4_extend_low_u16x8(tmp); \ + } + + #define stbir__simdi_expand_u16_to_u32(out0,out1,ireg) \ + { \ + out0 = wasm_u32x4_extend_low_u16x8 ( ireg ); \ + out1 = wasm_u32x4_extend_high_u16x8( ireg ); \ + } + + #define stbir__simdf_convert_float_to_i32( i, f ) (i) = wasm_i32x4_trunc_sat_f32x4(f) + #define stbir__simdf_convert_float_to_int( f ) wasm_i32x4_extract_lane(wasm_i32x4_trunc_sat_f32x4(f), 0) + #define stbir__simdi_to_int( i ) wasm_i32x4_extract_lane(i, 0) + #define stbir__simdf_convert_float_to_uint8( f ) ((unsigned char)wasm_i32x4_extract_lane(wasm_i32x4_trunc_sat_f32x4(wasm_f32x4_max(wasm_f32x4_min(f,STBIR_max_uint8_as_float),wasm_f32x4_const_splat(0))), 0)) + #define stbir__simdf_convert_float_to_short( f ) ((unsigned short)wasm_i32x4_extract_lane(wasm_i32x4_trunc_sat_f32x4(wasm_f32x4_max(wasm_f32x4_min(f,STBIR_max_uint16_as_float),wasm_f32x4_const_splat(0))), 0)) + #define stbir__simdi_convert_i32_to_float(out, ireg) (out) = wasm_f32x4_convert_i32x4(ireg) + #define stbir__simdf_add( out, reg0, reg1 ) (out) = wasm_f32x4_add( reg0, reg1 ) + #define stbir__simdf_mult( out, reg0, reg1 ) (out) = wasm_f32x4_mul( reg0, reg1 ) + #define stbir__simdf_mult_mem( out, reg, ptr ) (out) = wasm_f32x4_mul( reg, wasm_v128_load( (void const*)(ptr) ) ) + #define stbir__simdf_mult1_mem( out, reg, ptr ) (out) = wasm_f32x4_mul( reg, wasm_v128_load32_splat( (void const*)(ptr) ) ) + #define stbir__simdf_add_mem( out, reg, ptr ) (out) = wasm_f32x4_add( reg, wasm_v128_load( (void const*)(ptr) ) ) + #define stbir__simdf_add1_mem( out, reg, ptr ) (out) = wasm_f32x4_add( reg, wasm_v128_load32_splat( (void const*)(ptr) ) ) + + #define stbir__simdf_madd( out, add, mul1, mul2 ) (out) = wasm_f32x4_add( add, wasm_f32x4_mul( mul1, mul2 ) ) + #define stbir__simdf_madd1( out, add, mul1, mul2 ) (out) = wasm_f32x4_add( add, wasm_f32x4_mul( mul1, mul2 ) ) + #define stbir__simdf_madd_mem( out, add, mul, ptr ) (out) = wasm_f32x4_add( add, wasm_f32x4_mul( mul, wasm_v128_load( (void const*)(ptr) ) ) ) + #define stbir__simdf_madd1_mem( out, add, mul, ptr ) (out) = wasm_f32x4_add( add, wasm_f32x4_mul( mul, wasm_v128_load32_splat( (void const*)(ptr) ) ) ) + + #define stbir__simdf_add1( out, reg0, reg1 ) (out) = wasm_f32x4_add( reg0, reg1 ) + #define stbir__simdf_mult1( out, reg0, reg1 ) (out) = wasm_f32x4_mul( reg0, reg1 ) + + #define stbir__simdf_and( out, reg0, reg1 ) (out) = wasm_v128_and( reg0, reg1 ) + #define stbir__simdf_or( out, reg0, reg1 ) (out) = wasm_v128_or( reg0, reg1 ) + + #define stbir__simdf_min( out, reg0, reg1 ) (out) = wasm_f32x4_min( reg0, reg1 ) + #define stbir__simdf_max( out, reg0, reg1 ) (out) = wasm_f32x4_max( reg0, reg1 ) + #define stbir__simdf_min1( out, reg0, reg1 ) (out) = wasm_f32x4_min( reg0, reg1 ) + #define stbir__simdf_max1( out, reg0, reg1 ) (out) = wasm_f32x4_max( reg0, reg1 ) + + #define stbir__simdf_0123ABCDto3ABx( out, reg0, reg1 ) (out) = wasm_i32x4_shuffle( reg0, reg1, 3, 4, 5, -1 ) + #define stbir__simdf_0123ABCDto23Ax( out, reg0, reg1 ) (out) = wasm_i32x4_shuffle( reg0, reg1, 2, 3, 4, -1 ) + + #define stbir__simdf_aaa1(out,alp,ones) (out) = wasm_i32x4_shuffle(alp, ones, 3, 3, 3, 4) + #define stbir__simdf_1aaa(out,alp,ones) (out) = wasm_i32x4_shuffle(alp, ones, 4, 0, 0, 0) + #define stbir__simdf_a1a1(out,alp,ones) (out) = wasm_i32x4_shuffle(alp, ones, 1, 4, 3, 4) + #define stbir__simdf_1a1a(out,alp,ones) (out) = wasm_i32x4_shuffle(alp, ones, 4, 0, 4, 2) + + #define stbir__simdf_swiz( reg, one, two, three, four ) wasm_i32x4_shuffle(reg, reg, one, two, three, four) + + #define stbir__simdi_and( out, reg0, reg1 ) (out) = wasm_v128_and( reg0, reg1 ) + #define stbir__simdi_or( out, reg0, reg1 ) (out) = wasm_v128_or( reg0, reg1 ) + #define stbir__simdi_16madd( out, reg0, reg1 ) (out) = wasm_i32x4_dot_i16x8( reg0, reg1 ) + + #define stbir__simdf_pack_to_8bytes(out,aa,bb) \ + { \ + v128_t af = wasm_f32x4_max( wasm_f32x4_min(aa, STBIR_max_uint8_as_float), wasm_f32x4_const_splat(0) ); \ + v128_t bf = wasm_f32x4_max( wasm_f32x4_min(bb, STBIR_max_uint8_as_float), wasm_f32x4_const_splat(0) ); \ + v128_t ai = wasm_i32x4_trunc_sat_f32x4( af ); \ + v128_t bi = wasm_i32x4_trunc_sat_f32x4( bf ); \ + v128_t out16 = wasm_i16x8_narrow_i32x4( ai, bi ); \ + out = wasm_u8x16_narrow_i16x8( out16, out16 ); \ + } + + #define stbir__simdf_pack_to_8words(out,aa,bb) \ + { \ + v128_t af = wasm_f32x4_max( wasm_f32x4_min(aa, STBIR_max_uint16_as_float), wasm_f32x4_const_splat(0)); \ + v128_t bf = wasm_f32x4_max( wasm_f32x4_min(bb, STBIR_max_uint16_as_float), wasm_f32x4_const_splat(0)); \ + v128_t ai = wasm_i32x4_trunc_sat_f32x4( af ); \ + v128_t bi = wasm_i32x4_trunc_sat_f32x4( bf ); \ + out = wasm_u16x8_narrow_i32x4( ai, bi ); \ + } + + #define stbir__interleave_pack_and_store_16_u8( ptr, r0, r1, r2, r3 ) \ + { \ + v128_t tmp0 = wasm_i16x8_narrow_i32x4(r0, r1); \ + v128_t tmp1 = wasm_i16x8_narrow_i32x4(r2, r3); \ + v128_t tmp = wasm_u8x16_narrow_i16x8(tmp0, tmp1); \ + tmp = wasm_i8x16_shuffle(tmp, tmp, 0, 4, 8, 12, 1, 5, 9, 13, 2, 6, 10, 14, 3, 7, 11, 15); \ + wasm_v128_store( (void*)(ptr), tmp); \ + } + + #define stbir__simdf_load4_transposed( o0, o1, o2, o3, ptr ) \ + { \ + v128_t t0 = wasm_v128_load( ptr ); \ + v128_t t1 = wasm_v128_load( ptr+4 ); \ + v128_t t2 = wasm_v128_load( ptr+8 ); \ + v128_t t3 = wasm_v128_load( ptr+12 ); \ + v128_t s0 = wasm_i32x4_shuffle(t0, t1, 0, 4, 2, 6); \ + v128_t s1 = wasm_i32x4_shuffle(t0, t1, 1, 5, 3, 7); \ + v128_t s2 = wasm_i32x4_shuffle(t2, t3, 0, 4, 2, 6); \ + v128_t s3 = wasm_i32x4_shuffle(t2, t3, 1, 5, 3, 7); \ + o0 = wasm_i32x4_shuffle(s0, s2, 0, 1, 4, 5); \ + o1 = wasm_i32x4_shuffle(s1, s3, 0, 1, 4, 5); \ + o2 = wasm_i32x4_shuffle(s0, s2, 2, 3, 6, 7); \ + o3 = wasm_i32x4_shuffle(s1, s3, 2, 3, 6, 7); \ + } + + #define stbir__simdi_32shr( out, reg, imm ) out = wasm_u32x4_shr( reg, imm ) + + typedef float stbir__f32x4 __attribute__((__vector_size__(16), __aligned__(16))); + #define STBIR__SIMDF_CONST(var, x) stbir__simdf var = (v128_t)(stbir__f32x4){ x, x, x, x } + #define STBIR__SIMDI_CONST(var, x) stbir__simdi var = { x, x, x, x } + #define STBIR__CONSTF(var) (var) + #define STBIR__CONSTI(var) (var) + + #ifdef STBIR_FLOORF + #undef STBIR_FLOORF + #endif + #define STBIR_FLOORF stbir_simd_floorf + static stbir__inline float stbir_simd_floorf(float x) + { + return wasm_f32x4_extract_lane( wasm_f32x4_floor( wasm_f32x4_splat(x) ), 0); + } + + #ifdef STBIR_CEILF + #undef STBIR_CEILF + #endif + #define STBIR_CEILF stbir_simd_ceilf + static stbir__inline float stbir_simd_ceilf(float x) + { + return wasm_f32x4_extract_lane( wasm_f32x4_ceil( wasm_f32x4_splat(x) ), 0); + } + + #define STBIR_SIMD + +#endif // SSE2/NEON/WASM + +#endif // NO SIMD + +#ifdef STBIR_SIMD8 + #define stbir__simdfX stbir__simdf8 + #define stbir__simdiX stbir__simdi8 + #define stbir__simdfX_load stbir__simdf8_load + #define stbir__simdiX_load stbir__simdi8_load + #define stbir__simdfX_mult stbir__simdf8_mult + #define stbir__simdfX_add_mem stbir__simdf8_add_mem + #define stbir__simdfX_madd_mem stbir__simdf8_madd_mem + #define stbir__simdfX_store stbir__simdf8_store + #define stbir__simdiX_store stbir__simdi8_store + #define stbir__simdf_frepX stbir__simdf8_frep8 + #define stbir__simdfX_madd stbir__simdf8_madd + #define stbir__simdfX_min stbir__simdf8_min + #define stbir__simdfX_max stbir__simdf8_max + #define stbir__simdfX_aaa1 stbir__simdf8_aaa1 + #define stbir__simdfX_1aaa stbir__simdf8_1aaa + #define stbir__simdfX_a1a1 stbir__simdf8_a1a1 + #define stbir__simdfX_1a1a stbir__simdf8_1a1a + #define stbir__simdfX_convert_float_to_i32 stbir__simdf8_convert_float_to_i32 + #define stbir__simdfX_pack_to_words stbir__simdf8_pack_to_16words + #define stbir__simdfX_zero stbir__simdf8_zero + #define STBIR_onesX STBIR_ones8 + #define STBIR_max_uint8_as_floatX STBIR_max_uint8_as_float8 + #define STBIR_max_uint16_as_floatX STBIR_max_uint16_as_float8 + #define STBIR_simd_point5X STBIR_simd_point58 + #define stbir__simdfX_float_count 8 + #define stbir__simdfX_0123to1230 stbir__simdf8_0123to12301230 + #define stbir__simdfX_0123to2103 stbir__simdf8_0123to21032103 + static const stbir__simdf8 STBIR_max_uint16_as_float_inverted8 = { stbir__max_uint16_as_float_inverted,stbir__max_uint16_as_float_inverted,stbir__max_uint16_as_float_inverted,stbir__max_uint16_as_float_inverted,stbir__max_uint16_as_float_inverted,stbir__max_uint16_as_float_inverted,stbir__max_uint16_as_float_inverted,stbir__max_uint16_as_float_inverted }; + static const stbir__simdf8 STBIR_max_uint8_as_float_inverted8 = { stbir__max_uint8_as_float_inverted,stbir__max_uint8_as_float_inverted,stbir__max_uint8_as_float_inverted,stbir__max_uint8_as_float_inverted,stbir__max_uint8_as_float_inverted,stbir__max_uint8_as_float_inverted,stbir__max_uint8_as_float_inverted,stbir__max_uint8_as_float_inverted }; + static const stbir__simdf8 STBIR_ones8 = { 1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0 }; + static const stbir__simdf8 STBIR_simd_point58 = { 0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5 }; + static const stbir__simdf8 STBIR_max_uint8_as_float8 = { stbir__max_uint8_as_float,stbir__max_uint8_as_float,stbir__max_uint8_as_float,stbir__max_uint8_as_float, stbir__max_uint8_as_float,stbir__max_uint8_as_float,stbir__max_uint8_as_float,stbir__max_uint8_as_float }; + static const stbir__simdf8 STBIR_max_uint16_as_float8 = { stbir__max_uint16_as_float,stbir__max_uint16_as_float,stbir__max_uint16_as_float,stbir__max_uint16_as_float, stbir__max_uint16_as_float,stbir__max_uint16_as_float,stbir__max_uint16_as_float,stbir__max_uint16_as_float }; +#else + #define stbir__simdfX stbir__simdf + #define stbir__simdiX stbir__simdi + #define stbir__simdfX_load stbir__simdf_load + #define stbir__simdiX_load stbir__simdi_load + #define stbir__simdfX_mult stbir__simdf_mult + #define stbir__simdfX_add_mem stbir__simdf_add_mem + #define stbir__simdfX_madd_mem stbir__simdf_madd_mem + #define stbir__simdfX_store stbir__simdf_store + #define stbir__simdiX_store stbir__simdi_store + #define stbir__simdf_frepX stbir__simdf_frep4 + #define stbir__simdfX_madd stbir__simdf_madd + #define stbir__simdfX_min stbir__simdf_min + #define stbir__simdfX_max stbir__simdf_max + #define stbir__simdfX_aaa1 stbir__simdf_aaa1 + #define stbir__simdfX_1aaa stbir__simdf_1aaa + #define stbir__simdfX_a1a1 stbir__simdf_a1a1 + #define stbir__simdfX_1a1a stbir__simdf_1a1a + #define stbir__simdfX_convert_float_to_i32 stbir__simdf_convert_float_to_i32 + #define stbir__simdfX_pack_to_words stbir__simdf_pack_to_8words + #define stbir__simdfX_zero stbir__simdf_zero + #define STBIR_onesX STBIR__CONSTF(STBIR_ones) + #define STBIR_simd_point5X STBIR__CONSTF(STBIR_simd_point5) + #define STBIR_max_uint8_as_floatX STBIR__CONSTF(STBIR_max_uint8_as_float) + #define STBIR_max_uint16_as_floatX STBIR__CONSTF(STBIR_max_uint16_as_float) + #define stbir__simdfX_float_count 4 + #define stbir__if_simdf8_cast_to_simdf4( val ) ( val ) + #define stbir__simdfX_0123to1230 stbir__simdf_0123to1230 + #define stbir__simdfX_0123to2103 stbir__simdf_0123to2103 +#endif + + +#if defined(STBIR_NEON) && !defined(_M_ARM) && !defined(__arm__) + + #if defined( _MSC_VER ) && !defined(__clang__) + typedef __int16 stbir__FP16; + #else + typedef float16_t stbir__FP16; + #endif + +#else // no NEON, or 32-bit ARM for MSVC + + typedef union stbir__FP16 + { + unsigned short u; + } stbir__FP16; + +#endif + +#if (!defined(STBIR_NEON) && !defined(STBIR_FP16C)) || (defined(STBIR_NEON) && defined(_M_ARM)) || (defined(STBIR_NEON) && defined(__arm__)) + + // Fabian's half float routines, see: https://gist.github.com/rygorous/2156668 + + static stbir__inline float stbir__half_to_float( stbir__FP16 h ) + { + static const stbir__FP32 magic = { (254 - 15) << 23 }; + static const stbir__FP32 was_infnan = { (127 + 16) << 23 }; + stbir__FP32 o; + + o.u = (h.u & 0x7fff) << 13; // exponent/mantissa bits + o.f *= magic.f; // exponent adjust + if (o.f >= was_infnan.f) // make sure Inf/NaN survive + o.u |= 255 << 23; + o.u |= (h.u & 0x8000) << 16; // sign bit + return o.f; + } + + static stbir__inline stbir__FP16 stbir__float_to_half(float val) + { + stbir__FP32 f32infty = { 255 << 23 }; + stbir__FP32 f16max = { (127 + 16) << 23 }; + stbir__FP32 denorm_magic = { ((127 - 15) + (23 - 10) + 1) << 23 }; + unsigned int sign_mask = 0x80000000u; + stbir__FP16 o = { 0 }; + stbir__FP32 f; + unsigned int sign; + + f.f = val; + sign = f.u & sign_mask; + f.u ^= sign; + + if (f.u >= f16max.u) // result is Inf or NaN (all exponent bits set) + o.u = (f.u > f32infty.u) ? 0x7e00 : 0x7c00; // NaN->qNaN and Inf->Inf + else // (De)normalized number or zero + { + if (f.u < (113 << 23)) // resulting FP16 is subnormal or zero + { + // use a magic value to align our 10 mantissa bits at the bottom of + // the float. as long as FP addition is round-to-nearest-even this + // just works. + f.f += denorm_magic.f; + // and one integer subtract of the bias later, we have our final float! + o.u = (unsigned short) ( f.u - denorm_magic.u ); + } + else + { + unsigned int mant_odd = (f.u >> 13) & 1; // resulting mantissa is odd + // update exponent, rounding bias part 1 + f.u = f.u + ((15u - 127) << 23) + 0xfff; + // rounding bias part 2 + f.u += mant_odd; + // take the bits! + o.u = (unsigned short) ( f.u >> 13 ); + } + } + + o.u |= sign >> 16; + return o; + } + +#endif + + +#if defined(STBIR_FP16C) + + #include + + static stbir__inline void stbir__half_to_float_SIMD(float * output, stbir__FP16 const * input) + { + _mm256_storeu_ps( (float*)output, _mm256_cvtph_ps( _mm_loadu_si128( (__m128i const* )input ) ) ); + } + + static stbir__inline void stbir__float_to_half_SIMD(stbir__FP16 * output, float const * input) + { + _mm_storeu_si128( (__m128i*)output, _mm256_cvtps_ph( _mm256_loadu_ps( input ), 0 ) ); + } + + static stbir__inline float stbir__half_to_float( stbir__FP16 h ) + { + return _mm_cvtss_f32( _mm_cvtph_ps( _mm_cvtsi32_si128( (int)h.u ) ) ); + } + + static stbir__inline stbir__FP16 stbir__float_to_half( float f ) + { + stbir__FP16 h; + h.u = (unsigned short) _mm_cvtsi128_si32( _mm_cvtps_ph( _mm_set_ss( f ), 0 ) ); + return h; + } + +#elif defined(STBIR_SSE2) + + // Fabian's half float routines, see: https://gist.github.com/rygorous/2156668 + stbir__inline static void stbir__half_to_float_SIMD(float * output, void const * input) + { + static const STBIR__SIMDI_CONST(mask_nosign, 0x7fff); + static const STBIR__SIMDI_CONST(smallest_normal, 0x0400); + static const STBIR__SIMDI_CONST(infinity, 0x7c00); + static const STBIR__SIMDI_CONST(expadjust_normal, (127 - 15) << 23); + static const STBIR__SIMDI_CONST(magic_denorm, 113 << 23); + + __m128i i = _mm_loadu_si128 ( (__m128i const*)(input) ); + __m128i h = _mm_unpacklo_epi16 ( i, _mm_setzero_si128() ); + __m128i mnosign = STBIR__CONSTI(mask_nosign); + __m128i eadjust = STBIR__CONSTI(expadjust_normal); + __m128i smallest = STBIR__CONSTI(smallest_normal); + __m128i infty = STBIR__CONSTI(infinity); + __m128i expmant = _mm_and_si128(mnosign, h); + __m128i justsign = _mm_xor_si128(h, expmant); + __m128i b_notinfnan = _mm_cmpgt_epi32(infty, expmant); + __m128i b_isdenorm = _mm_cmpgt_epi32(smallest, expmant); + __m128i shifted = _mm_slli_epi32(expmant, 13); + __m128i adj_infnan = _mm_andnot_si128(b_notinfnan, eadjust); + __m128i adjusted = _mm_add_epi32(eadjust, shifted); + __m128i den1 = _mm_add_epi32(shifted, STBIR__CONSTI(magic_denorm)); + __m128i adjusted2 = _mm_add_epi32(adjusted, adj_infnan); + __m128 den2 = _mm_sub_ps(_mm_castsi128_ps(den1), *(const __m128 *)&magic_denorm); + __m128 adjusted3 = _mm_and_ps(den2, _mm_castsi128_ps(b_isdenorm)); + __m128 adjusted4 = _mm_andnot_ps(_mm_castsi128_ps(b_isdenorm), _mm_castsi128_ps(adjusted2)); + __m128 adjusted5 = _mm_or_ps(adjusted3, adjusted4); + __m128i sign = _mm_slli_epi32(justsign, 16); + __m128 final = _mm_or_ps(adjusted5, _mm_castsi128_ps(sign)); + stbir__simdf_store( output + 0, final ); + + h = _mm_unpackhi_epi16 ( i, _mm_setzero_si128() ); + expmant = _mm_and_si128(mnosign, h); + justsign = _mm_xor_si128(h, expmant); + b_notinfnan = _mm_cmpgt_epi32(infty, expmant); + b_isdenorm = _mm_cmpgt_epi32(smallest, expmant); + shifted = _mm_slli_epi32(expmant, 13); + adj_infnan = _mm_andnot_si128(b_notinfnan, eadjust); + adjusted = _mm_add_epi32(eadjust, shifted); + den1 = _mm_add_epi32(shifted, STBIR__CONSTI(magic_denorm)); + adjusted2 = _mm_add_epi32(adjusted, adj_infnan); + den2 = _mm_sub_ps(_mm_castsi128_ps(den1), *(const __m128 *)&magic_denorm); + adjusted3 = _mm_and_ps(den2, _mm_castsi128_ps(b_isdenorm)); + adjusted4 = _mm_andnot_ps(_mm_castsi128_ps(b_isdenorm), _mm_castsi128_ps(adjusted2)); + adjusted5 = _mm_or_ps(adjusted3, adjusted4); + sign = _mm_slli_epi32(justsign, 16); + final = _mm_or_ps(adjusted5, _mm_castsi128_ps(sign)); + stbir__simdf_store( output + 4, final ); + + // ~38 SSE2 ops for 8 values + } + + // Fabian's round-to-nearest-even float to half + // ~48 SSE2 ops for 8 output + stbir__inline static void stbir__float_to_half_SIMD(void * output, float const * input) + { + static const STBIR__SIMDI_CONST(mask_sign, 0x80000000u); + static const STBIR__SIMDI_CONST(c_f16max, (127 + 16) << 23); // all FP32 values >=this round to +inf + static const STBIR__SIMDI_CONST(c_nanbit, 0x200); + static const STBIR__SIMDI_CONST(c_infty_as_fp16, 0x7c00); + static const STBIR__SIMDI_CONST(c_min_normal, (127 - 14) << 23); // smallest FP32 that yields a normalized FP16 + static const STBIR__SIMDI_CONST(c_subnorm_magic, ((127 - 15) + (23 - 10) + 1) << 23); + static const STBIR__SIMDI_CONST(c_normal_bias, 0xfff - ((127 - 15) << 23)); // adjust exponent and add mantissa rounding + + __m128 f = _mm_loadu_ps(input); + __m128 msign = _mm_castsi128_ps(STBIR__CONSTI(mask_sign)); + __m128 justsign = _mm_and_ps(msign, f); + __m128 absf = _mm_xor_ps(f, justsign); + __m128i absf_int = _mm_castps_si128(absf); // the cast is "free" (extra bypass latency, but no thruput hit) + __m128i f16max = STBIR__CONSTI(c_f16max); + __m128 b_isnan = _mm_cmpunord_ps(absf, absf); // is this a NaN? + __m128i b_isregular = _mm_cmpgt_epi32(f16max, absf_int); // (sub)normalized or special? + __m128i nanbit = _mm_and_si128(_mm_castps_si128(b_isnan), STBIR__CONSTI(c_nanbit)); + __m128i inf_or_nan = _mm_or_si128(nanbit, STBIR__CONSTI(c_infty_as_fp16)); // output for specials + + __m128i min_normal = STBIR__CONSTI(c_min_normal); + __m128i b_issub = _mm_cmpgt_epi32(min_normal, absf_int); + + // "result is subnormal" path + __m128 subnorm1 = _mm_add_ps(absf, _mm_castsi128_ps(STBIR__CONSTI(c_subnorm_magic))); // magic value to round output mantissa + __m128i subnorm2 = _mm_sub_epi32(_mm_castps_si128(subnorm1), STBIR__CONSTI(c_subnorm_magic)); // subtract out bias + + // "result is normal" path + __m128i mantoddbit = _mm_slli_epi32(absf_int, 31 - 13); // shift bit 13 (mantissa LSB) to sign + __m128i mantodd = _mm_srai_epi32(mantoddbit, 31); // -1 if FP16 mantissa odd, else 0 + + __m128i round1 = _mm_add_epi32(absf_int, STBIR__CONSTI(c_normal_bias)); + __m128i round2 = _mm_sub_epi32(round1, mantodd); // if mantissa LSB odd, bias towards rounding up (RTNE) + __m128i normal = _mm_srli_epi32(round2, 13); // rounded result + + // combine the two non-specials + __m128i nonspecial = _mm_or_si128(_mm_and_si128(subnorm2, b_issub), _mm_andnot_si128(b_issub, normal)); + + // merge in specials as well + __m128i joined = _mm_or_si128(_mm_and_si128(nonspecial, b_isregular), _mm_andnot_si128(b_isregular, inf_or_nan)); + + __m128i sign_shift = _mm_srai_epi32(_mm_castps_si128(justsign), 16); + __m128i final2, final= _mm_or_si128(joined, sign_shift); + + f = _mm_loadu_ps(input+4); + justsign = _mm_and_ps(msign, f); + absf = _mm_xor_ps(f, justsign); + absf_int = _mm_castps_si128(absf); // the cast is "free" (extra bypass latency, but no thruput hit) + b_isnan = _mm_cmpunord_ps(absf, absf); // is this a NaN? + b_isregular = _mm_cmpgt_epi32(f16max, absf_int); // (sub)normalized or special? + nanbit = _mm_and_si128(_mm_castps_si128(b_isnan), c_nanbit); + inf_or_nan = _mm_or_si128(nanbit, STBIR__CONSTI(c_infty_as_fp16)); // output for specials + + b_issub = _mm_cmpgt_epi32(min_normal, absf_int); + + // "result is subnormal" path + subnorm1 = _mm_add_ps(absf, _mm_castsi128_ps(STBIR__CONSTI(c_subnorm_magic))); // magic value to round output mantissa + subnorm2 = _mm_sub_epi32(_mm_castps_si128(subnorm1), STBIR__CONSTI(c_subnorm_magic)); // subtract out bias + + // "result is normal" path + mantoddbit = _mm_slli_epi32(absf_int, 31 - 13); // shift bit 13 (mantissa LSB) to sign + mantodd = _mm_srai_epi32(mantoddbit, 31); // -1 if FP16 mantissa odd, else 0 + + round1 = _mm_add_epi32(absf_int, STBIR__CONSTI(c_normal_bias)); + round2 = _mm_sub_epi32(round1, mantodd); // if mantissa LSB odd, bias towards rounding up (RTNE) + normal = _mm_srli_epi32(round2, 13); // rounded result + + // combine the two non-specials + nonspecial = _mm_or_si128(_mm_and_si128(subnorm2, b_issub), _mm_andnot_si128(b_issub, normal)); + + // merge in specials as well + joined = _mm_or_si128(_mm_and_si128(nonspecial, b_isregular), _mm_andnot_si128(b_isregular, inf_or_nan)); + + sign_shift = _mm_srai_epi32(_mm_castps_si128(justsign), 16); + final2 = _mm_or_si128(joined, sign_shift); + final = _mm_packs_epi32(final, final2); + stbir__simdi_store( output,final ); + } + +#elif defined(STBIR_NEON) && defined(_MSC_VER) && defined(_M_ARM64) && !defined(__clang__) // 64-bit ARM on MSVC (not clang) + + static stbir__inline void stbir__half_to_float_SIMD(float * output, stbir__FP16 const * input) + { + float16x4_t in0 = vld1_f16(input + 0); + float16x4_t in1 = vld1_f16(input + 4); + vst1q_f32(output + 0, vcvt_f32_f16(in0)); + vst1q_f32(output + 4, vcvt_f32_f16(in1)); + } + + static stbir__inline void stbir__float_to_half_SIMD(stbir__FP16 * output, float const * input) + { + float16x4_t out0 = vcvt_f16_f32(vld1q_f32(input + 0)); + float16x4_t out1 = vcvt_f16_f32(vld1q_f32(input + 4)); + vst1_f16(output+0, out0); + vst1_f16(output+4, out1); + } + + static stbir__inline float stbir__half_to_float( stbir__FP16 h ) + { + return vgetq_lane_f32(vcvt_f32_f16(vld1_dup_f16(&h)), 0); + } + + static stbir__inline stbir__FP16 stbir__float_to_half( float f ) + { + return vget_lane_f16(vcvt_f16_f32(vdupq_n_f32(f)), 0).n16_u16[0]; + } + +#elif defined(STBIR_NEON) && ( defined( _M_ARM64 ) || defined( __aarch64__ ) || defined( __arm64__ ) ) // 64-bit ARM + + static stbir__inline void stbir__half_to_float_SIMD(float * output, stbir__FP16 const * input) + { + float16x8_t in = vld1q_f16(input); + vst1q_f32(output + 0, vcvt_f32_f16(vget_low_f16(in))); + vst1q_f32(output + 4, vcvt_f32_f16(vget_high_f16(in))); + } + + static stbir__inline void stbir__float_to_half_SIMD(stbir__FP16 * output, float const * input) + { + float16x4_t out0 = vcvt_f16_f32(vld1q_f32(input + 0)); + float16x4_t out1 = vcvt_f16_f32(vld1q_f32(input + 4)); + vst1q_f16(output, vcombine_f16(out0, out1)); + } + + static stbir__inline float stbir__half_to_float( stbir__FP16 h ) + { + return vgetq_lane_f32(vcvt_f32_f16(vdup_n_f16(h)), 0); + } + + static stbir__inline stbir__FP16 stbir__float_to_half( float f ) + { + return vget_lane_f16(vcvt_f16_f32(vdupq_n_f32(f)), 0); + } + +#elif defined(STBIR_WASM) || (defined(STBIR_NEON) && (defined(_MSC_VER) || defined(_M_ARM) || defined(__arm__))) // WASM or 32-bit ARM on MSVC/clang + + static stbir__inline void stbir__half_to_float_SIMD(float * output, stbir__FP16 const * input) + { + for (int i=0; i<8; i++) + { + output[i] = stbir__half_to_float(input[i]); + } + } + static stbir__inline void stbir__float_to_half_SIMD(stbir__FP16 * output, float const * input) + { + for (int i=0; i<8; i++) + { + output[i] = stbir__float_to_half(input[i]); + } + } + +#endif + + +#ifdef STBIR_SIMD + +#define stbir__simdf_0123to3333( out, reg ) (out) = stbir__simdf_swiz( reg, 3,3,3,3 ) +#define stbir__simdf_0123to2222( out, reg ) (out) = stbir__simdf_swiz( reg, 2,2,2,2 ) +#define stbir__simdf_0123to1111( out, reg ) (out) = stbir__simdf_swiz( reg, 1,1,1,1 ) +#define stbir__simdf_0123to0000( out, reg ) (out) = stbir__simdf_swiz( reg, 0,0,0,0 ) +#define stbir__simdf_0123to0003( out, reg ) (out) = stbir__simdf_swiz( reg, 0,0,0,3 ) +#define stbir__simdf_0123to0001( out, reg ) (out) = stbir__simdf_swiz( reg, 0,0,0,1 ) +#define stbir__simdf_0123to1122( out, reg ) (out) = stbir__simdf_swiz( reg, 1,1,2,2 ) +#define stbir__simdf_0123to2333( out, reg ) (out) = stbir__simdf_swiz( reg, 2,3,3,3 ) +#define stbir__simdf_0123to0023( out, reg ) (out) = stbir__simdf_swiz( reg, 0,0,2,3 ) +#define stbir__simdf_0123to1230( out, reg ) (out) = stbir__simdf_swiz( reg, 1,2,3,0 ) +#define stbir__simdf_0123to2103( out, reg ) (out) = stbir__simdf_swiz( reg, 2,1,0,3 ) +#define stbir__simdf_0123to3210( out, reg ) (out) = stbir__simdf_swiz( reg, 3,2,1,0 ) +#define stbir__simdf_0123to2301( out, reg ) (out) = stbir__simdf_swiz( reg, 2,3,0,1 ) +#define stbir__simdf_0123to3012( out, reg ) (out) = stbir__simdf_swiz( reg, 3,0,1,2 ) +#define stbir__simdf_0123to0011( out, reg ) (out) = stbir__simdf_swiz( reg, 0,0,1,1 ) +#define stbir__simdf_0123to1100( out, reg ) (out) = stbir__simdf_swiz( reg, 1,1,0,0 ) +#define stbir__simdf_0123to2233( out, reg ) (out) = stbir__simdf_swiz( reg, 2,2,3,3 ) +#define stbir__simdf_0123to1133( out, reg ) (out) = stbir__simdf_swiz( reg, 1,1,3,3 ) +#define stbir__simdf_0123to0022( out, reg ) (out) = stbir__simdf_swiz( reg, 0,0,2,2 ) +#define stbir__simdf_0123to1032( out, reg ) (out) = stbir__simdf_swiz( reg, 1,0,3,2 ) + +typedef union stbir__simdi_u32 +{ + stbir_uint32 m128i_u32[4]; + int m128i_i32[4]; + stbir__simdi m128i_i128; +} stbir__simdi_u32; + +static const int STBIR_mask[9] = { 0,0,0,-1,-1,-1,0,0,0 }; + +static const STBIR__SIMDF_CONST(STBIR_max_uint8_as_float, stbir__max_uint8_as_float); +static const STBIR__SIMDF_CONST(STBIR_max_uint16_as_float, stbir__max_uint16_as_float); +static const STBIR__SIMDF_CONST(STBIR_max_uint8_as_float_inverted, stbir__max_uint8_as_float_inverted); +static const STBIR__SIMDF_CONST(STBIR_max_uint16_as_float_inverted, stbir__max_uint16_as_float_inverted); + +static const STBIR__SIMDF_CONST(STBIR_simd_point5, 0.5f); +static const STBIR__SIMDF_CONST(STBIR_ones, 1.0f); +static const STBIR__SIMDI_CONST(STBIR_almost_zero, (127 - 13) << 23); +static const STBIR__SIMDI_CONST(STBIR_almost_one, 0x3f7fffff); +static const STBIR__SIMDI_CONST(STBIR_mastissa_mask, 0xff); +static const STBIR__SIMDI_CONST(STBIR_topscale, 0x02000000); + +// Basically, in simd mode, we unroll the proper amount, and we don't want +// the non-simd remnant loops to be unroll because they only run a few times +// Adding this switch saves about 5K on clang which is Captain Unroll the 3rd. +#define STBIR_SIMD_STREAMOUT_PTR( star ) STBIR_STREAMOUT_PTR( star ) +#define STBIR_SIMD_NO_UNROLL(ptr) STBIR_NO_UNROLL(ptr) +#define STBIR_SIMD_NO_UNROLL_LOOP_START STBIR_NO_UNROLL_LOOP_START +#define STBIR_SIMD_NO_UNROLL_LOOP_START_INF_FOR STBIR_NO_UNROLL_LOOP_START_INF_FOR + +#ifdef STBIR_MEMCPY +#undef STBIR_MEMCPY +#endif +#define STBIR_MEMCPY stbir_simd_memcpy + +// override normal use of memcpy with much simpler copy (faster and smaller with our sized copies) +static void stbir_simd_memcpy( void * dest, void const * src, size_t bytes ) +{ + char STBIR_SIMD_STREAMOUT_PTR (*) d = (char*) dest; + char STBIR_SIMD_STREAMOUT_PTR( * ) d_end = ((char*) dest) + bytes; + ptrdiff_t ofs_to_src = (char*)src - (char*)dest; + + // check overlaps + STBIR_ASSERT( ( ( d >= ( (char*)src) + bytes ) ) || ( ( d + bytes ) <= (char*)src ) ); + + if ( bytes < (16*stbir__simdfX_float_count) ) + { + if ( bytes < 16 ) + { + if ( bytes ) + { + STBIR_SIMD_NO_UNROLL_LOOP_START + do + { + STBIR_SIMD_NO_UNROLL(d); + d[ 0 ] = d[ ofs_to_src ]; + ++d; + } while ( d < d_end ); + } + } + else + { + stbir__simdf x; + // do one unaligned to get us aligned for the stream out below + stbir__simdf_load( x, ( d + ofs_to_src ) ); + stbir__simdf_store( d, x ); + d = (char*)( ( ( (size_t)d ) + 16 ) & ~15 ); + + STBIR_SIMD_NO_UNROLL_LOOP_START_INF_FOR + for(;;) + { + STBIR_SIMD_NO_UNROLL(d); + + if ( d > ( d_end - 16 ) ) + { + if ( d == d_end ) + return; + d = d_end - 16; + } + + stbir__simdf_load( x, ( d + ofs_to_src ) ); + stbir__simdf_store( d, x ); + d += 16; + } + } + } + else + { + stbir__simdfX x0,x1,x2,x3; + + // do one unaligned to get us aligned for the stream out below + stbir__simdfX_load( x0, ( d + ofs_to_src ) + 0*stbir__simdfX_float_count ); + stbir__simdfX_load( x1, ( d + ofs_to_src ) + 4*stbir__simdfX_float_count ); + stbir__simdfX_load( x2, ( d + ofs_to_src ) + 8*stbir__simdfX_float_count ); + stbir__simdfX_load( x3, ( d + ofs_to_src ) + 12*stbir__simdfX_float_count ); + stbir__simdfX_store( d + 0*stbir__simdfX_float_count, x0 ); + stbir__simdfX_store( d + 4*stbir__simdfX_float_count, x1 ); + stbir__simdfX_store( d + 8*stbir__simdfX_float_count, x2 ); + stbir__simdfX_store( d + 12*stbir__simdfX_float_count, x3 ); + d = (char*)( ( ( (size_t)d ) + (16*stbir__simdfX_float_count) ) & ~((16*stbir__simdfX_float_count)-1) ); + + STBIR_SIMD_NO_UNROLL_LOOP_START_INF_FOR + for(;;) + { + STBIR_SIMD_NO_UNROLL(d); + + if ( d > ( d_end - (16*stbir__simdfX_float_count) ) ) + { + if ( d == d_end ) + return; + d = d_end - (16*stbir__simdfX_float_count); + } + + stbir__simdfX_load( x0, ( d + ofs_to_src ) + 0*stbir__simdfX_float_count ); + stbir__simdfX_load( x1, ( d + ofs_to_src ) + 4*stbir__simdfX_float_count ); + stbir__simdfX_load( x2, ( d + ofs_to_src ) + 8*stbir__simdfX_float_count ); + stbir__simdfX_load( x3, ( d + ofs_to_src ) + 12*stbir__simdfX_float_count ); + stbir__simdfX_store( d + 0*stbir__simdfX_float_count, x0 ); + stbir__simdfX_store( d + 4*stbir__simdfX_float_count, x1 ); + stbir__simdfX_store( d + 8*stbir__simdfX_float_count, x2 ); + stbir__simdfX_store( d + 12*stbir__simdfX_float_count, x3 ); + d += (16*stbir__simdfX_float_count); + } + } +} + +// memcpy that is specically intentionally overlapping (src is smaller then dest, so can be +// a normal forward copy, bytes is divisible by 4 and bytes is greater than or equal to +// the diff between dest and src) +static void stbir_overlapping_memcpy( void * dest, void const * src, size_t bytes ) +{ + char STBIR_SIMD_STREAMOUT_PTR (*) sd = (char*) src; + char STBIR_SIMD_STREAMOUT_PTR( * ) s_end = ((char*) src) + bytes; + ptrdiff_t ofs_to_dest = (char*)dest - (char*)src; + + if ( ofs_to_dest >= 16 ) // is the overlap more than 16 away? + { + char STBIR_SIMD_STREAMOUT_PTR( * ) s_end16 = ((char*) src) + (bytes&~15); + STBIR_SIMD_NO_UNROLL_LOOP_START + do + { + stbir__simdf x; + STBIR_SIMD_NO_UNROLL(sd); + stbir__simdf_load( x, sd ); + stbir__simdf_store( ( sd + ofs_to_dest ), x ); + sd += 16; + } while ( sd < s_end16 ); + + if ( sd == s_end ) + return; + } + + do + { + STBIR_SIMD_NO_UNROLL(sd); + *(int*)( sd + ofs_to_dest ) = *(int*) sd; + sd += 4; + } while ( sd < s_end ); +} + +#else // no SSE2 + +// when in scalar mode, we let unrolling happen, so this macro just does the __restrict +#define STBIR_SIMD_STREAMOUT_PTR( star ) STBIR_STREAMOUT_PTR( star ) +#define STBIR_SIMD_NO_UNROLL(ptr) +#define STBIR_SIMD_NO_UNROLL_LOOP_START +#define STBIR_SIMD_NO_UNROLL_LOOP_START_INF_FOR + +#endif // SSE2 + + +#ifdef STBIR_PROFILE + +#ifndef STBIR_PROFILE_FUNC + +#if defined(_x86_64) || defined( __x86_64__ ) || defined( _M_X64 ) || defined(__x86_64) || defined(__SSE2__) || defined(STBIR_SSE) || defined( _M_IX86_FP ) || defined(__i386) || defined( __i386__ ) || defined( _M_IX86 ) || defined( _X86_ ) + +#ifdef _MSC_VER + + STBIRDEF stbir_uint64 __rdtsc(); + #define STBIR_PROFILE_FUNC() __rdtsc() + +#else // non msvc + + static stbir__inline stbir_uint64 STBIR_PROFILE_FUNC() + { + stbir_uint32 lo, hi; + asm volatile ("rdtsc" : "=a" (lo), "=d" (hi) ); + return ( ( (stbir_uint64) hi ) << 32 ) | ( (stbir_uint64) lo ); + } + +#endif // msvc + +#elif defined( _M_ARM64 ) || defined( __aarch64__ ) || defined( __arm64__ ) || defined(__ARM_NEON__) + +#if defined( _MSC_VER ) && !defined(__clang__) + + #define STBIR_PROFILE_FUNC() _ReadStatusReg(ARM64_CNTVCT) + +#else + + static stbir__inline stbir_uint64 STBIR_PROFILE_FUNC() + { + stbir_uint64 tsc; + asm volatile("mrs %0, cntvct_el0" : "=r" (tsc)); + return tsc; + } + +#endif + +#else // x64, arm + +#error Unknown platform for profiling. + +#endif // x64, arm + +#endif // STBIR_PROFILE_FUNC + +#define STBIR_ONLY_PROFILE_GET_SPLIT_INFO ,stbir__per_split_info * split_info +#define STBIR_ONLY_PROFILE_SET_SPLIT_INFO ,split_info + +#define STBIR_ONLY_PROFILE_BUILD_GET_INFO ,stbir__info * profile_info +#define STBIR_ONLY_PROFILE_BUILD_SET_INFO ,profile_info + +// super light-weight micro profiler +#define STBIR_PROFILE_START_ll( info, wh ) { stbir_uint64 wh##thiszonetime = STBIR_PROFILE_FUNC(); stbir_uint64 * wh##save_parent_excluded_ptr = info->current_zone_excluded_ptr; stbir_uint64 wh##current_zone_excluded = 0; info->current_zone_excluded_ptr = &wh##current_zone_excluded; +#define STBIR_PROFILE_END_ll( info, wh ) wh##thiszonetime = STBIR_PROFILE_FUNC() - wh##thiszonetime; info->profile.named.wh += wh##thiszonetime - wh##current_zone_excluded; *wh##save_parent_excluded_ptr += wh##thiszonetime; info->current_zone_excluded_ptr = wh##save_parent_excluded_ptr; } +#define STBIR_PROFILE_FIRST_START_ll( info, wh ) { int i; info->current_zone_excluded_ptr = &info->profile.named.total; for(i=0;iprofile.array);i++) info->profile.array[i]=0; } STBIR_PROFILE_START_ll( info, wh ); +#define STBIR_PROFILE_CLEAR_EXTRAS_ll( info, num ) { int extra; for(extra=1;extra<(num);extra++) { int i; for(i=0;iprofile.array);i++) (info)[extra].profile.array[i]=0; } } + +// for thread data +#define STBIR_PROFILE_START( wh ) STBIR_PROFILE_START_ll( split_info, wh ) +#define STBIR_PROFILE_END( wh ) STBIR_PROFILE_END_ll( split_info, wh ) +#define STBIR_PROFILE_FIRST_START( wh ) STBIR_PROFILE_FIRST_START_ll( split_info, wh ) +#define STBIR_PROFILE_CLEAR_EXTRAS() STBIR_PROFILE_CLEAR_EXTRAS_ll( split_info, split_count ) + +// for build data +#define STBIR_PROFILE_BUILD_START( wh ) STBIR_PROFILE_START_ll( profile_info, wh ) +#define STBIR_PROFILE_BUILD_END( wh ) STBIR_PROFILE_END_ll( profile_info, wh ) +#define STBIR_PROFILE_BUILD_FIRST_START( wh ) STBIR_PROFILE_FIRST_START_ll( profile_info, wh ) +#define STBIR_PROFILE_BUILD_CLEAR( info ) { int i; for(i=0;iprofile.array);i++) info->profile.array[i]=0; } + +#else // no profile + +#define STBIR_ONLY_PROFILE_GET_SPLIT_INFO +#define STBIR_ONLY_PROFILE_SET_SPLIT_INFO + +#define STBIR_ONLY_PROFILE_BUILD_GET_INFO +#define STBIR_ONLY_PROFILE_BUILD_SET_INFO + +#define STBIR_PROFILE_START( wh ) +#define STBIR_PROFILE_END( wh ) +#define STBIR_PROFILE_FIRST_START( wh ) +#define STBIR_PROFILE_CLEAR_EXTRAS( ) + +#define STBIR_PROFILE_BUILD_START( wh ) +#define STBIR_PROFILE_BUILD_END( wh ) +#define STBIR_PROFILE_BUILD_FIRST_START( wh ) +#define STBIR_PROFILE_BUILD_CLEAR( info ) + +#endif // stbir_profile + +#ifndef STBIR_CEILF +#include +#if _MSC_VER <= 1200 // support VC6 for Sean +#define STBIR_CEILF(x) ((float)ceil((float)(x))) +#define STBIR_FLOORF(x) ((float)floor((float)(x))) +#else +#define STBIR_CEILF(x) ceilf(x) +#define STBIR_FLOORF(x) floorf(x) +#endif +#endif + +#ifndef STBIR_MEMCPY +// For memcpy +#include +#define STBIR_MEMCPY( dest, src, len ) memcpy( dest, src, len ) +#endif + +#ifndef STBIR_SIMD + +// memcpy that is specifically intentionally overlapping (src is smaller then dest, so can be +// a normal forward copy, bytes is divisible by 4 and bytes is greater than or equal to +// the diff between dest and src) +static void stbir_overlapping_memcpy( void * dest, void const * src, size_t bytes ) +{ + char STBIR_SIMD_STREAMOUT_PTR (*) sd = (char*) src; + char STBIR_SIMD_STREAMOUT_PTR( * ) s_end = ((char*) src) + bytes; + ptrdiff_t ofs_to_dest = (char*)dest - (char*)src; + + if ( ofs_to_dest >= 8 ) // is the overlap more than 8 away? + { + char STBIR_SIMD_STREAMOUT_PTR( * ) s_end8 = ((char*) src) + (bytes&~7); + STBIR_NO_UNROLL_LOOP_START + do + { + STBIR_NO_UNROLL(sd); + *(stbir_uint64*)( sd + ofs_to_dest ) = *(stbir_uint64*) sd; + sd += 8; + } while ( sd < s_end8 ); + + if ( sd == s_end ) + return; + } + + STBIR_NO_UNROLL_LOOP_START + do + { + STBIR_NO_UNROLL(sd); + *(int*)( sd + ofs_to_dest ) = *(int*) sd; + sd += 4; + } while ( sd < s_end ); +} + +#endif + +static float stbir__filter_trapezoid(float x, float scale, void * user_data) +{ + float halfscale = scale / 2; + float t = 0.5f + halfscale; + STBIR_ASSERT(scale <= 1); + STBIR__UNUSED(user_data); + + if ( x < 0.0f ) x = -x; + + if (x >= t) + return 0.0f; + else + { + float r = 0.5f - halfscale; + if (x <= r) + return 1.0f; + else + return (t - x) / scale; + } +} + +static float stbir__support_trapezoid(float scale, void * user_data) +{ + STBIR__UNUSED(user_data); + return 0.5f + scale / 2.0f; +} + +static float stbir__filter_triangle(float x, float s, void * user_data) +{ + STBIR__UNUSED(s); + STBIR__UNUSED(user_data); + + if ( x < 0.0f ) x = -x; + + if (x <= 1.0f) + return 1.0f - x; + else + return 0.0f; +} + +static float stbir__filter_point(float x, float s, void * user_data) +{ + STBIR__UNUSED(x); + STBIR__UNUSED(s); + STBIR__UNUSED(user_data); + + return 1.0f; +} + +static float stbir__filter_cubic(float x, float s, void * user_data) +{ + STBIR__UNUSED(s); + STBIR__UNUSED(user_data); + + if ( x < 0.0f ) x = -x; + + if (x < 1.0f) + return (4.0f + x*x*(3.0f*x - 6.0f))/6.0f; + else if (x < 2.0f) + return (8.0f + x*(-12.0f + x*(6.0f - x)))/6.0f; + + return (0.0f); +} + +static float stbir__filter_catmullrom(float x, float s, void * user_data) +{ + STBIR__UNUSED(s); + STBIR__UNUSED(user_data); + + if ( x < 0.0f ) x = -x; + + if (x < 1.0f) + return 1.0f - x*x*(2.5f - 1.5f*x); + else if (x < 2.0f) + return 2.0f - x*(4.0f + x*(0.5f*x - 2.5f)); + + return (0.0f); +} + +static float stbir__filter_mitchell(float x, float s, void * user_data) +{ + STBIR__UNUSED(s); + STBIR__UNUSED(user_data); + + if ( x < 0.0f ) x = -x; + + if (x < 1.0f) + return (16.0f + x*x*(21.0f * x - 36.0f))/18.0f; + else if (x < 2.0f) + return (32.0f + x*(-60.0f + x*(36.0f - 7.0f*x)))/18.0f; + + return (0.0f); +} + +static float stbir__support_zeropoint5(float s, void * user_data) +{ + STBIR__UNUSED(s); + STBIR__UNUSED(user_data); + return 0.5f; +} + +static float stbir__support_one(float s, void * user_data) +{ + STBIR__UNUSED(s); + STBIR__UNUSED(user_data); + return 1; +} + +static float stbir__support_two(float s, void * user_data) +{ + STBIR__UNUSED(s); + STBIR__UNUSED(user_data); + return 2; +} + +// This is the maximum number of input samples that can affect an output sample +// with the given filter from the output pixel's perspective +static int stbir__get_filter_pixel_width(stbir__support_callback * support, float scale, void * user_data) +{ + STBIR_ASSERT(support != 0); + + if ( scale >= ( 1.0f-stbir__small_float ) ) // upscale + return (int)STBIR_CEILF(support(1.0f/scale,user_data) * 2.0f); + else + return (int)STBIR_CEILF(support(scale,user_data) * 2.0f / scale); +} + +// this is how many coefficents per run of the filter (which is different +// from the filter_pixel_width depending on if we are scattering or gathering) +static int stbir__get_coefficient_width(stbir__sampler * samp, int is_gather, void * user_data) +{ + float scale = samp->scale_info.scale; + stbir__support_callback * support = samp->filter_support; + + switch( is_gather ) + { + case 1: + return (int)STBIR_CEILF(support(1.0f / scale, user_data) * 2.0f); + case 2: + return (int)STBIR_CEILF(support(scale, user_data) * 2.0f / scale); + case 0: + return (int)STBIR_CEILF(support(scale, user_data) * 2.0f); + default: + STBIR_ASSERT( (is_gather >= 0 ) && (is_gather <= 2 ) ); + return 0; + } +} + +static int stbir__get_contributors(stbir__sampler * samp, int is_gather) +{ + if (is_gather) + return samp->scale_info.output_sub_size; + else + return (samp->scale_info.input_full_size + samp->filter_pixel_margin * 2); +} + +static int stbir__edge_zero_full( int n, int max ) +{ + STBIR__UNUSED(n); + STBIR__UNUSED(max); + return 0; // NOTREACHED +} + +static int stbir__edge_clamp_full( int n, int max ) +{ + if (n < 0) + return 0; + + if (n >= max) + return max - 1; + + return n; // NOTREACHED +} + +static int stbir__edge_reflect_full( int n, int max ) +{ + if (n < 0) + { + if (n > -max) + return -n; + else + return max - 1; + } + + if (n >= max) + { + int max2 = max * 2; + if (n >= max2) + return 0; + else + return max2 - n - 1; + } + + return n; // NOTREACHED +} + +static int stbir__edge_wrap_full( int n, int max ) +{ + if (n >= 0) + return (n % max); + else + { + int m = (-n) % max; + + if (m != 0) + m = max - m; + + return (m); + } +} + +typedef int stbir__edge_wrap_func( int n, int max ); +static stbir__edge_wrap_func * stbir__edge_wrap_slow[] = +{ + stbir__edge_clamp_full, // STBIR_EDGE_CLAMP + stbir__edge_reflect_full, // STBIR_EDGE_REFLECT + stbir__edge_wrap_full, // STBIR_EDGE_WRAP + stbir__edge_zero_full, // STBIR_EDGE_ZERO +}; + +stbir__inline static int stbir__edge_wrap(stbir_edge edge, int n, int max) +{ + // avoid per-pixel switch + if (n >= 0 && n < max) + return n; + return stbir__edge_wrap_slow[edge]( n, max ); +} + +#define STBIR__MERGE_RUNS_PIXEL_THRESHOLD 16 + +// get information on the extents of a sampler +static void stbir__get_extents( stbir__sampler * samp, stbir__extents * scanline_extents ) +{ + int j, stop; + int left_margin, right_margin; + int min_n = 0x7fffffff, max_n = -0x7fffffff; + int min_left = 0x7fffffff, max_left = -0x7fffffff; + int min_right = 0x7fffffff, max_right = -0x7fffffff; + stbir_edge edge = samp->edge; + stbir__contributors* contributors = samp->contributors; + int output_sub_size = samp->scale_info.output_sub_size; + int input_full_size = samp->scale_info.input_full_size; + int filter_pixel_margin = samp->filter_pixel_margin; + + STBIR_ASSERT( samp->is_gather ); + + stop = output_sub_size; + for (j = 0; j < stop; j++ ) + { + STBIR_ASSERT( contributors[j].n1 >= contributors[j].n0 ); + if ( contributors[j].n0 < min_n ) + { + min_n = contributors[j].n0; + stop = j + filter_pixel_margin; // if we find a new min, only scan another filter width + if ( stop > output_sub_size ) stop = output_sub_size; + } + } + + stop = 0; + for (j = output_sub_size - 1; j >= stop; j-- ) + { + STBIR_ASSERT( contributors[j].n1 >= contributors[j].n0 ); + if ( contributors[j].n1 > max_n ) + { + max_n = contributors[j].n1; + stop = j - filter_pixel_margin; // if we find a new max, only scan another filter width + if (stop<0) stop = 0; + } + } + + STBIR_ASSERT( scanline_extents->conservative.n0 <= min_n ); + STBIR_ASSERT( scanline_extents->conservative.n1 >= max_n ); + + // now calculate how much into the margins we really read + left_margin = 0; + if ( min_n < 0 ) + { + left_margin = -min_n; + min_n = 0; + } + + right_margin = 0; + if ( max_n >= input_full_size ) + { + right_margin = max_n - input_full_size + 1; + max_n = input_full_size - 1; + } + + // index 1 is margin pixel extents (how many pixels we hang over the edge) + scanline_extents->edge_sizes[0] = left_margin; + scanline_extents->edge_sizes[1] = right_margin; + + // index 2 is pixels read from the input + scanline_extents->spans[0].n0 = min_n; + scanline_extents->spans[0].n1 = max_n; + scanline_extents->spans[0].pixel_offset_for_input = min_n; + + // default to no other input range + scanline_extents->spans[1].n0 = 0; + scanline_extents->spans[1].n1 = -1; + scanline_extents->spans[1].pixel_offset_for_input = 0; + + // don't have to do edge calc for zero clamp + if ( edge == STBIR_EDGE_ZERO ) + return; + + // convert margin pixels to the pixels within the input (min and max) + for( j = -left_margin ; j < 0 ; j++ ) + { + int p = stbir__edge_wrap( edge, j, input_full_size ); + if ( p < min_left ) + min_left = p; + if ( p > max_left ) + max_left = p; + } + + for( j = input_full_size ; j < (input_full_size + right_margin) ; j++ ) + { + int p = stbir__edge_wrap( edge, j, input_full_size ); + if ( p < min_right ) + min_right = p; + if ( p > max_right ) + max_right = p; + } + + // merge the left margin pixel region if it connects within 4 pixels of main pixel region + if ( min_left != 0x7fffffff ) + { + if ( ( ( min_left <= min_n ) && ( ( max_left + STBIR__MERGE_RUNS_PIXEL_THRESHOLD ) >= min_n ) ) || + ( ( min_n <= min_left ) && ( ( max_n + STBIR__MERGE_RUNS_PIXEL_THRESHOLD ) >= max_left ) ) ) + { + scanline_extents->spans[0].n0 = min_n = stbir__min( min_n, min_left ); + scanline_extents->spans[0].n1 = max_n = stbir__max( max_n, max_left ); + scanline_extents->spans[0].pixel_offset_for_input = min_n; + left_margin = 0; + } + } + + // merge the right margin pixel region if it connects within 4 pixels of main pixel region + if ( min_right != 0x7fffffff ) + { + if ( ( ( min_right <= min_n ) && ( ( max_right + STBIR__MERGE_RUNS_PIXEL_THRESHOLD ) >= min_n ) ) || + ( ( min_n <= min_right ) && ( ( max_n + STBIR__MERGE_RUNS_PIXEL_THRESHOLD ) >= max_right ) ) ) + { + scanline_extents->spans[0].n0 = min_n = stbir__min( min_n, min_right ); + scanline_extents->spans[0].n1 = max_n = stbir__max( max_n, max_right ); + scanline_extents->spans[0].pixel_offset_for_input = min_n; + right_margin = 0; + } + } + + STBIR_ASSERT( scanline_extents->conservative.n0 <= min_n ); + STBIR_ASSERT( scanline_extents->conservative.n1 >= max_n ); + + // you get two ranges when you have the WRAP edge mode and you are doing just the a piece of the resize + // so you need to get a second run of pixels from the opposite side of the scanline (which you + // wouldn't need except for WRAP) + + + // if we can't merge the min_left range, add it as a second range + if ( ( left_margin ) && ( min_left != 0x7fffffff ) ) + { + stbir__span * newspan = scanline_extents->spans + 1; + STBIR_ASSERT( right_margin == 0 ); + if ( min_left < scanline_extents->spans[0].n0 ) + { + scanline_extents->spans[1].pixel_offset_for_input = scanline_extents->spans[0].n0; + scanline_extents->spans[1].n0 = scanline_extents->spans[0].n0; + scanline_extents->spans[1].n1 = scanline_extents->spans[0].n1; + --newspan; + } + newspan->pixel_offset_for_input = min_left; + newspan->n0 = -left_margin; + newspan->n1 = ( max_left - min_left ) - left_margin; + scanline_extents->edge_sizes[0] = 0; // don't need to copy the left margin, since we are directly decoding into the margin + } + // if we can't merge the min_left range, add it as a second range + else + if ( ( right_margin ) && ( min_right != 0x7fffffff ) ) + { + stbir__span * newspan = scanline_extents->spans + 1; + if ( min_right < scanline_extents->spans[0].n0 ) + { + scanline_extents->spans[1].pixel_offset_for_input = scanline_extents->spans[0].n0; + scanline_extents->spans[1].n0 = scanline_extents->spans[0].n0; + scanline_extents->spans[1].n1 = scanline_extents->spans[0].n1; + --newspan; + } + newspan->pixel_offset_for_input = min_right; + newspan->n0 = scanline_extents->spans[1].n1 + 1; + newspan->n1 = scanline_extents->spans[1].n1 + 1 + ( max_right - min_right ); + scanline_extents->edge_sizes[1] = 0; // don't need to copy the right margin, since we are directly decoding into the margin + } + + // sort the spans into write output order + if ( ( scanline_extents->spans[1].n1 > scanline_extents->spans[1].n0 ) && ( scanline_extents->spans[0].n0 > scanline_extents->spans[1].n0 ) ) + { + stbir__span tspan = scanline_extents->spans[0]; + scanline_extents->spans[0] = scanline_extents->spans[1]; + scanline_extents->spans[1] = tspan; + } +} + +static void stbir__calculate_in_pixel_range( int * first_pixel, int * last_pixel, float out_pixel_center, float out_filter_radius, float inv_scale, float out_shift, int input_size, stbir_edge edge ) +{ + int first, last; + float out_pixel_influence_lowerbound = out_pixel_center - out_filter_radius; + float out_pixel_influence_upperbound = out_pixel_center + out_filter_radius; + + float in_pixel_influence_lowerbound = (out_pixel_influence_lowerbound + out_shift) * inv_scale; + float in_pixel_influence_upperbound = (out_pixel_influence_upperbound + out_shift) * inv_scale; + + first = (int)(STBIR_FLOORF(in_pixel_influence_lowerbound + 0.5f)); + last = (int)(STBIR_FLOORF(in_pixel_influence_upperbound - 0.5f)); + if ( last < first ) last = first; // point sample mode can span a value *right* at 0.5, and cause these to cross + + if ( edge == STBIR_EDGE_WRAP ) + { + if ( first < -input_size ) + first = -input_size; + if ( last >= (input_size*2)) + last = (input_size*2) - 1; + } + + *first_pixel = first; + *last_pixel = last; +} + +static void stbir__calculate_coefficients_for_gather_upsample( float out_filter_radius, stbir__kernel_callback * kernel, stbir__scale_info * scale_info, int num_contributors, stbir__contributors* contributors, float* coefficient_group, int coefficient_width, stbir_edge edge, void * user_data ) +{ + int n, end; + float inv_scale = scale_info->inv_scale; + float out_shift = scale_info->pixel_shift; + int input_size = scale_info->input_full_size; + int numerator = scale_info->scale_numerator; + int polyphase = ( ( scale_info->scale_is_rational ) && ( numerator < num_contributors ) ); + + // Looping through out pixels + end = num_contributors; if ( polyphase ) end = numerator; + for (n = 0; n < end; n++) + { + int i; + int last_non_zero; + float out_pixel_center = (float)n + 0.5f; + float in_center_of_out = (out_pixel_center + out_shift) * inv_scale; + + int in_first_pixel, in_last_pixel; + + stbir__calculate_in_pixel_range( &in_first_pixel, &in_last_pixel, out_pixel_center, out_filter_radius, inv_scale, out_shift, input_size, edge ); + + // make sure we never generate a range larger than our precalculated coeff width + // this only happens in point sample mode, but it's a good safe thing to do anyway + if ( ( in_last_pixel - in_first_pixel + 1 ) > coefficient_width ) + in_last_pixel = in_first_pixel + coefficient_width - 1; + + last_non_zero = -1; + for (i = 0; i <= in_last_pixel - in_first_pixel; i++) + { + float in_pixel_center = (float)(i + in_first_pixel) + 0.5f; + float coeff = kernel(in_center_of_out - in_pixel_center, inv_scale, user_data); + + // kill denormals + if ( ( ( coeff < stbir__small_float ) && ( coeff > -stbir__small_float ) ) ) + { + if ( i == 0 ) // if we're at the front, just eat zero contributors + { + STBIR_ASSERT ( ( in_last_pixel - in_first_pixel ) != 0 ); // there should be at least one contrib + ++in_first_pixel; + i--; + continue; + } + coeff = 0; // make sure is fully zero (should keep denormals away) + } + else + last_non_zero = i; + + coefficient_group[i] = coeff; + } + + in_last_pixel = last_non_zero+in_first_pixel; // kills trailing zeros + contributors->n0 = in_first_pixel; + contributors->n1 = in_last_pixel; + + STBIR_ASSERT(contributors->n1 >= contributors->n0); + + ++contributors; + coefficient_group += coefficient_width; + } +} + +static void stbir__insert_coeff( stbir__contributors * contribs, float * coeffs, int new_pixel, float new_coeff, int max_width ) +{ + if ( new_pixel <= contribs->n1 ) // before the end + { + if ( new_pixel < contribs->n0 ) // before the front? + { + if ( ( contribs->n1 - new_pixel + 1 ) <= max_width ) + { + int j, o = contribs->n0 - new_pixel; + for ( j = contribs->n1 - contribs->n0 ; j <= 0 ; j-- ) + coeffs[ j + o ] = coeffs[ j ]; + for ( j = 1 ; j < o ; j-- ) + coeffs[ j ] = coeffs[ 0 ]; + coeffs[ 0 ] = new_coeff; + contribs->n0 = new_pixel; + } + } + else + { + coeffs[ new_pixel - contribs->n0 ] += new_coeff; + } + } + else + { + if ( ( new_pixel - contribs->n0 + 1 ) <= max_width ) + { + int j, e = new_pixel - contribs->n0; + for( j = ( contribs->n1 - contribs->n0 ) + 1 ; j < e ; j++ ) // clear in-betweens coeffs if there are any + coeffs[j] = 0; + + coeffs[ e ] = new_coeff; + contribs->n1 = new_pixel; + } + } +} + +static void stbir__calculate_out_pixel_range( int * first_pixel, int * last_pixel, float in_pixel_center, float in_pixels_radius, float scale, float out_shift, int out_size ) +{ + float in_pixel_influence_lowerbound = in_pixel_center - in_pixels_radius; + float in_pixel_influence_upperbound = in_pixel_center + in_pixels_radius; + float out_pixel_influence_lowerbound = in_pixel_influence_lowerbound * scale - out_shift; + float out_pixel_influence_upperbound = in_pixel_influence_upperbound * scale - out_shift; + int out_first_pixel = (int)(STBIR_FLOORF(out_pixel_influence_lowerbound + 0.5f)); + int out_last_pixel = (int)(STBIR_FLOORF(out_pixel_influence_upperbound - 0.5f)); + + if ( out_first_pixel < 0 ) + out_first_pixel = 0; + if ( out_last_pixel >= out_size ) + out_last_pixel = out_size - 1; + *first_pixel = out_first_pixel; + *last_pixel = out_last_pixel; +} + +static void stbir__calculate_coefficients_for_gather_downsample( int start, int end, float in_pixels_radius, stbir__kernel_callback * kernel, stbir__scale_info * scale_info, int coefficient_width, int num_contributors, stbir__contributors * contributors, float * coefficient_group, void * user_data ) +{ + int in_pixel; + int i; + int first_out_inited = -1; + float scale = scale_info->scale; + float out_shift = scale_info->pixel_shift; + int out_size = scale_info->output_sub_size; + int numerator = scale_info->scale_numerator; + int polyphase = ( ( scale_info->scale_is_rational ) && ( numerator < out_size ) ); + + STBIR__UNUSED(num_contributors); + + // Loop through the input pixels + for (in_pixel = start; in_pixel < end; in_pixel++) + { + float in_pixel_center = (float)in_pixel + 0.5f; + float out_center_of_in = in_pixel_center * scale - out_shift; + int out_first_pixel, out_last_pixel; + + stbir__calculate_out_pixel_range( &out_first_pixel, &out_last_pixel, in_pixel_center, in_pixels_radius, scale, out_shift, out_size ); + + if ( out_first_pixel > out_last_pixel ) + continue; + + // clamp or exit if we are using polyphase filtering, and the limit is up + if ( polyphase ) + { + // when polyphase, you only have to do coeffs up to the numerator count + if ( out_first_pixel == numerator ) + break; + + // don't do any extra work, clamp last pixel at numerator too + if ( out_last_pixel >= numerator ) + out_last_pixel = numerator - 1; + } + + for (i = 0; i <= out_last_pixel - out_first_pixel; i++) + { + float out_pixel_center = (float)(i + out_first_pixel) + 0.5f; + float x = out_pixel_center - out_center_of_in; + float coeff = kernel(x, scale, user_data) * scale; + + // kill the coeff if it's too small (avoid denormals) + if ( ( ( coeff < stbir__small_float ) && ( coeff > -stbir__small_float ) ) ) + coeff = 0.0f; + + { + int out = i + out_first_pixel; + float * coeffs = coefficient_group + out * coefficient_width; + stbir__contributors * contribs = contributors + out; + + // is this the first time this output pixel has been seen? Init it. + if ( out > first_out_inited ) + { + STBIR_ASSERT( out == ( first_out_inited + 1 ) ); // ensure we have only advanced one at time + first_out_inited = out; + contribs->n0 = in_pixel; + contribs->n1 = in_pixel; + coeffs[0] = coeff; + } + else + { + // insert on end (always in order) + if ( coeffs[0] == 0.0f ) // if the first coefficent is zero, then zap it for this coeffs + { + STBIR_ASSERT( ( in_pixel - contribs->n0 ) == 1 ); // ensure that when we zap, we're at the 2nd pos + contribs->n0 = in_pixel; + } + contribs->n1 = in_pixel; + STBIR_ASSERT( ( in_pixel - contribs->n0 ) < coefficient_width ); + coeffs[in_pixel - contribs->n0] = coeff; + } + } + } + } +} + +#ifdef STBIR_RENORMALIZE_IN_FLOAT +#define STBIR_RENORM_TYPE float +#else +#define STBIR_RENORM_TYPE double +#endif + +static void stbir__cleanup_gathered_coefficients( stbir_edge edge, stbir__filter_extent_info* filter_info, stbir__scale_info * scale_info, int num_contributors, stbir__contributors* contributors, float * coefficient_group, int coefficient_width ) +{ + int input_size = scale_info->input_full_size; + int input_last_n1 = input_size - 1; + int n, end; + int lowest = 0x7fffffff; + int highest = -0x7fffffff; + int widest = -1; + int numerator = scale_info->scale_numerator; + int denominator = scale_info->scale_denominator; + int polyphase = ( ( scale_info->scale_is_rational ) && ( numerator < num_contributors ) ); + float * coeffs; + stbir__contributors * contribs; + + // weight all the coeffs for each sample + coeffs = coefficient_group; + contribs = contributors; + end = num_contributors; if ( polyphase ) end = numerator; + for (n = 0; n < end; n++) + { + int i; + STBIR_RENORM_TYPE filter_scale, total_filter = 0; + int e; + + // add all contribs + e = contribs->n1 - contribs->n0; + for( i = 0 ; i <= e ; i++ ) + { + total_filter += (STBIR_RENORM_TYPE) coeffs[i]; + STBIR_ASSERT( ( coeffs[i] >= -2.0f ) && ( coeffs[i] <= 2.0f ) ); // check for wonky weights + } + + // rescale + if ( ( total_filter < stbir__small_float ) && ( total_filter > -stbir__small_float ) ) + { + // all coeffs are extremely small, just zero it + contribs->n1 = contribs->n0; + coeffs[0] = 0.0f; + } + else + { + // if the total isn't 1.0, rescale everything + if ( ( total_filter < (1.0f-stbir__small_float) ) || ( total_filter > (1.0f+stbir__small_float) ) ) + { + filter_scale = ((STBIR_RENORM_TYPE)1.0) / total_filter; + + // scale them all + for (i = 0; i <= e; i++) + coeffs[i] = (float) ( coeffs[i] * filter_scale ); + } + } + ++contribs; + coeffs += coefficient_width; + } + + // if we have a rational for the scale, we can exploit the polyphaseness to not calculate + // most of the coefficients, so we copy them here + if ( polyphase ) + { + stbir__contributors * prev_contribs = contributors; + stbir__contributors * cur_contribs = contributors + numerator; + + for( n = numerator ; n < num_contributors ; n++ ) + { + cur_contribs->n0 = prev_contribs->n0 + denominator; + cur_contribs->n1 = prev_contribs->n1 + denominator; + ++cur_contribs; + ++prev_contribs; + } + stbir_overlapping_memcpy( coefficient_group + numerator * coefficient_width, coefficient_group, ( num_contributors - numerator ) * coefficient_width * sizeof( coeffs[ 0 ] ) ); + } + + coeffs = coefficient_group; + contribs = contributors; + + for (n = 0; n < num_contributors; n++) + { + int i; + + // in zero edge mode, just remove out of bounds contribs completely (since their weights are accounted for now) + if ( edge == STBIR_EDGE_ZERO ) + { + // shrink the right side if necessary + if ( contribs->n1 > input_last_n1 ) + contribs->n1 = input_last_n1; + + // shrink the left side + if ( contribs->n0 < 0 ) + { + int j, left, skips = 0; + + skips = -contribs->n0; + contribs->n0 = 0; + + // now move down the weights + left = contribs->n1 - contribs->n0 + 1; + if ( left > 0 ) + { + for( j = 0 ; j < left ; j++ ) + coeffs[ j ] = coeffs[ j + skips ]; + } + } + } + else if ( ( edge == STBIR_EDGE_CLAMP ) || ( edge == STBIR_EDGE_REFLECT ) ) + { + // for clamp and reflect, calculate the true inbounds position (based on edge type) and just add that to the existing weight + + // right hand side first + if ( contribs->n1 > input_last_n1 ) + { + int start = contribs->n0; + int endi = contribs->n1; + contribs->n1 = input_last_n1; + for( i = input_size; i <= endi; i++ ) + stbir__insert_coeff( contribs, coeffs, stbir__edge_wrap_slow[edge]( i, input_size ), coeffs[i-start], coefficient_width ); + } + + // now check left hand edge + if ( contribs->n0 < 0 ) + { + int save_n0; + float save_n0_coeff; + float * c = coeffs - ( contribs->n0 + 1 ); + + // reinsert the coeffs with it reflected or clamped (insert accumulates, if the coeffs exist) + for( i = -1 ; i > contribs->n0 ; i-- ) + stbir__insert_coeff( contribs, coeffs, stbir__edge_wrap_slow[edge]( i, input_size ), *c--, coefficient_width ); + save_n0 = contribs->n0; + save_n0_coeff = c[0]; // save it, since we didn't do the final one (i==n0), because there might be too many coeffs to hold (before we resize)! + + // now slide all the coeffs down (since we have accumulated them in the positive contribs) and reset the first contrib + contribs->n0 = 0; + for(i = 0 ; i <= contribs->n1 ; i++ ) + coeffs[i] = coeffs[i-save_n0]; + + // now that we have shrunk down the contribs, we insert the first one safely + stbir__insert_coeff( contribs, coeffs, stbir__edge_wrap_slow[edge]( save_n0, input_size ), save_n0_coeff, coefficient_width ); + } + } + + if ( contribs->n0 <= contribs->n1 ) + { + int diff = contribs->n1 - contribs->n0 + 1; + while ( diff && ( coeffs[ diff-1 ] == 0.0f ) ) + --diff; + + contribs->n1 = contribs->n0 + diff - 1; + + if ( contribs->n0 <= contribs->n1 ) + { + if ( contribs->n0 < lowest ) + lowest = contribs->n0; + if ( contribs->n1 > highest ) + highest = contribs->n1; + if ( diff > widest ) + widest = diff; + } + + // re-zero out unused coefficients (if any) + for( i = diff ; i < coefficient_width ; i++ ) + coeffs[i] = 0.0f; + } + + ++contribs; + coeffs += coefficient_width; + } + filter_info->lowest = lowest; + filter_info->highest = highest; + filter_info->widest = widest; +} + +#undef STBIR_RENORM_TYPE + +static int stbir__pack_coefficients( int num_contributors, stbir__contributors* contributors, float * coefficents, int coefficient_width, int widest, int row0, int row1 ) +{ + #define STBIR_MOVE_1( dest, src ) { STBIR_NO_UNROLL(dest); ((stbir_uint32*)(dest))[0] = ((stbir_uint32*)(src))[0]; } + #define STBIR_MOVE_2( dest, src ) { STBIR_NO_UNROLL(dest); ((stbir_uint64*)(dest))[0] = ((stbir_uint64*)(src))[0]; } + #ifdef STBIR_SIMD + #define STBIR_MOVE_4( dest, src ) { stbir__simdf t; STBIR_NO_UNROLL(dest); stbir__simdf_load( t, src ); stbir__simdf_store( dest, t ); } + #else + #define STBIR_MOVE_4( dest, src ) { STBIR_NO_UNROLL(dest); ((stbir_uint64*)(dest))[0] = ((stbir_uint64*)(src))[0]; ((stbir_uint64*)(dest))[1] = ((stbir_uint64*)(src))[1]; } + #endif + + int row_end = row1 + 1; + STBIR__UNUSED( row0 ); // only used in an assert + + if ( coefficient_width != widest ) + { + float * pc = coefficents; + float * coeffs = coefficents; + float * pc_end = coefficents + num_contributors * widest; + switch( widest ) + { + case 1: + STBIR_NO_UNROLL_LOOP_START + do { + STBIR_MOVE_1( pc, coeffs ); + ++pc; + coeffs += coefficient_width; + } while ( pc < pc_end ); + break; + case 2: + STBIR_NO_UNROLL_LOOP_START + do { + STBIR_MOVE_2( pc, coeffs ); + pc += 2; + coeffs += coefficient_width; + } while ( pc < pc_end ); + break; + case 3: + STBIR_NO_UNROLL_LOOP_START + do { + STBIR_MOVE_2( pc, coeffs ); + STBIR_MOVE_1( pc+2, coeffs+2 ); + pc += 3; + coeffs += coefficient_width; + } while ( pc < pc_end ); + break; + case 4: + STBIR_NO_UNROLL_LOOP_START + do { + STBIR_MOVE_4( pc, coeffs ); + pc += 4; + coeffs += coefficient_width; + } while ( pc < pc_end ); + break; + case 5: + STBIR_NO_UNROLL_LOOP_START + do { + STBIR_MOVE_4( pc, coeffs ); + STBIR_MOVE_1( pc+4, coeffs+4 ); + pc += 5; + coeffs += coefficient_width; + } while ( pc < pc_end ); + break; + case 6: + STBIR_NO_UNROLL_LOOP_START + do { + STBIR_MOVE_4( pc, coeffs ); + STBIR_MOVE_2( pc+4, coeffs+4 ); + pc += 6; + coeffs += coefficient_width; + } while ( pc < pc_end ); + break; + case 7: + STBIR_NO_UNROLL_LOOP_START + do { + STBIR_MOVE_4( pc, coeffs ); + STBIR_MOVE_2( pc+4, coeffs+4 ); + STBIR_MOVE_1( pc+6, coeffs+6 ); + pc += 7; + coeffs += coefficient_width; + } while ( pc < pc_end ); + break; + case 8: + STBIR_NO_UNROLL_LOOP_START + do { + STBIR_MOVE_4( pc, coeffs ); + STBIR_MOVE_4( pc+4, coeffs+4 ); + pc += 8; + coeffs += coefficient_width; + } while ( pc < pc_end ); + break; + case 9: + STBIR_NO_UNROLL_LOOP_START + do { + STBIR_MOVE_4( pc, coeffs ); + STBIR_MOVE_4( pc+4, coeffs+4 ); + STBIR_MOVE_1( pc+8, coeffs+8 ); + pc += 9; + coeffs += coefficient_width; + } while ( pc < pc_end ); + break; + case 10: + STBIR_NO_UNROLL_LOOP_START + do { + STBIR_MOVE_4( pc, coeffs ); + STBIR_MOVE_4( pc+4, coeffs+4 ); + STBIR_MOVE_2( pc+8, coeffs+8 ); + pc += 10; + coeffs += coefficient_width; + } while ( pc < pc_end ); + break; + case 11: + STBIR_NO_UNROLL_LOOP_START + do { + STBIR_MOVE_4( pc, coeffs ); + STBIR_MOVE_4( pc+4, coeffs+4 ); + STBIR_MOVE_2( pc+8, coeffs+8 ); + STBIR_MOVE_1( pc+10, coeffs+10 ); + pc += 11; + coeffs += coefficient_width; + } while ( pc < pc_end ); + break; + case 12: + STBIR_NO_UNROLL_LOOP_START + do { + STBIR_MOVE_4( pc, coeffs ); + STBIR_MOVE_4( pc+4, coeffs+4 ); + STBIR_MOVE_4( pc+8, coeffs+8 ); + pc += 12; + coeffs += coefficient_width; + } while ( pc < pc_end ); + break; + default: + STBIR_NO_UNROLL_LOOP_START + do { + float * copy_end = pc + widest - 4; + float * c = coeffs; + do { + STBIR_NO_UNROLL( pc ); + STBIR_MOVE_4( pc, c ); + pc += 4; + c += 4; + } while ( pc <= copy_end ); + copy_end += 4; + STBIR_NO_UNROLL_LOOP_START + while ( pc < copy_end ) + { + STBIR_MOVE_1( pc, c ); + ++pc; ++c; + } + coeffs += coefficient_width; + } while ( pc < pc_end ); + break; + } + } + + // some horizontal routines read one float off the end (which is then masked off), so put in a sentinal so we don't read an snan or denormal + coefficents[ widest * num_contributors ] = 8888.0f; + + // the minimum we might read for unrolled filters widths is 12. So, we need to + // make sure we never read outside the decode buffer, by possibly moving + // the sample area back into the scanline, and putting zeros weights first. + // we start on the right edge and check until we're well past the possible + // clip area (2*widest). + { + stbir__contributors * contribs = contributors + num_contributors - 1; + float * coeffs = coefficents + widest * ( num_contributors - 1 ); + + // go until no chance of clipping (this is usually less than 8 lops) + while ( ( contribs >= contributors ) && ( ( contribs->n0 + widest*2 ) >= row_end ) ) + { + // might we clip?? + if ( ( contribs->n0 + widest ) > row_end ) + { + int stop_range = widest; + + // if range is larger than 12, it will be handled by generic loops that can terminate on the exact length + // of this contrib n1, instead of a fixed widest amount - so calculate this + if ( widest > 12 ) + { + int mod; + + // how far will be read in the n_coeff loop (which depends on the widest count mod4); + mod = widest & 3; + stop_range = ( ( ( contribs->n1 - contribs->n0 + 1 ) - mod + 3 ) & ~3 ) + mod; + + // the n_coeff loops do a minimum amount of coeffs, so factor that in! + if ( stop_range < ( 8 + mod ) ) stop_range = 8 + mod; + } + + // now see if we still clip with the refined range + if ( ( contribs->n0 + stop_range ) > row_end ) + { + int new_n0 = row_end - stop_range; + int num = contribs->n1 - contribs->n0 + 1; + int backup = contribs->n0 - new_n0; + float * from_co = coeffs + num - 1; + float * to_co = from_co + backup; + + STBIR_ASSERT( ( new_n0 >= row0 ) && ( new_n0 < contribs->n0 ) ); + + // move the coeffs over + while( num ) + { + *to_co-- = *from_co--; + --num; + } + // zero new positions + while ( to_co >= coeffs ) + *to_co-- = 0; + // set new start point + contribs->n0 = new_n0; + if ( widest > 12 ) + { + int mod; + + // how far will be read in the n_coeff loop (which depends on the widest count mod4); + mod = widest & 3; + stop_range = ( ( ( contribs->n1 - contribs->n0 + 1 ) - mod + 3 ) & ~3 ) + mod; + + // the n_coeff loops do a minimum amount of coeffs, so factor that in! + if ( stop_range < ( 8 + mod ) ) stop_range = 8 + mod; + } + } + } + --contribs; + coeffs -= widest; + } + } + + return widest; + #undef STBIR_MOVE_1 + #undef STBIR_MOVE_2 + #undef STBIR_MOVE_4 +} + +static void stbir__calculate_filters( stbir__sampler * samp, stbir__sampler * other_axis_for_pivot, void * user_data STBIR_ONLY_PROFILE_BUILD_GET_INFO ) +{ + int n; + float scale = samp->scale_info.scale; + stbir__kernel_callback * kernel = samp->filter_kernel; + stbir__support_callback * support = samp->filter_support; + float inv_scale = samp->scale_info.inv_scale; + int input_full_size = samp->scale_info.input_full_size; + int gather_num_contributors = samp->num_contributors; + stbir__contributors* gather_contributors = samp->contributors; + float * gather_coeffs = samp->coefficients; + int gather_coefficient_width = samp->coefficient_width; + + switch ( samp->is_gather ) + { + case 1: // gather upsample + { + float out_pixels_radius = support(inv_scale,user_data) * scale; + + stbir__calculate_coefficients_for_gather_upsample( out_pixels_radius, kernel, &samp->scale_info, gather_num_contributors, gather_contributors, gather_coeffs, gather_coefficient_width, samp->edge, user_data ); + + STBIR_PROFILE_BUILD_START( cleanup ); + stbir__cleanup_gathered_coefficients( samp->edge, &samp->extent_info, &samp->scale_info, gather_num_contributors, gather_contributors, gather_coeffs, gather_coefficient_width ); + STBIR_PROFILE_BUILD_END( cleanup ); + } + break; + + case 0: // scatter downsample (only on vertical) + case 2: // gather downsample + { + float in_pixels_radius = support(scale,user_data) * inv_scale; + int filter_pixel_margin = samp->filter_pixel_margin; + int input_end = input_full_size + filter_pixel_margin; + + // if this is a scatter, we do a downsample gather to get the coeffs, and then pivot after + if ( !samp->is_gather ) + { + // check if we are using the same gather downsample on the horizontal as this vertical, + // if so, then we don't have to generate them, we can just pivot from the horizontal. + if ( other_axis_for_pivot ) + { + gather_contributors = other_axis_for_pivot->contributors; + gather_coeffs = other_axis_for_pivot->coefficients; + gather_coefficient_width = other_axis_for_pivot->coefficient_width; + gather_num_contributors = other_axis_for_pivot->num_contributors; + samp->extent_info.lowest = other_axis_for_pivot->extent_info.lowest; + samp->extent_info.highest = other_axis_for_pivot->extent_info.highest; + samp->extent_info.widest = other_axis_for_pivot->extent_info.widest; + goto jump_right_to_pivot; + } + + gather_contributors = samp->gather_prescatter_contributors; + gather_coeffs = samp->gather_prescatter_coefficients; + gather_coefficient_width = samp->gather_prescatter_coefficient_width; + gather_num_contributors = samp->gather_prescatter_num_contributors; + } + + stbir__calculate_coefficients_for_gather_downsample( -filter_pixel_margin, input_end, in_pixels_radius, kernel, &samp->scale_info, gather_coefficient_width, gather_num_contributors, gather_contributors, gather_coeffs, user_data ); + + STBIR_PROFILE_BUILD_START( cleanup ); + stbir__cleanup_gathered_coefficients( samp->edge, &samp->extent_info, &samp->scale_info, gather_num_contributors, gather_contributors, gather_coeffs, gather_coefficient_width ); + STBIR_PROFILE_BUILD_END( cleanup ); + + if ( !samp->is_gather ) + { + // if this is a scatter (vertical only), then we need to pivot the coeffs + stbir__contributors * scatter_contributors; + int highest_set; + + jump_right_to_pivot: + + STBIR_PROFILE_BUILD_START( pivot ); + + highest_set = (-filter_pixel_margin) - 1; + for (n = 0; n < gather_num_contributors; n++) + { + int k; + int gn0 = gather_contributors->n0, gn1 = gather_contributors->n1; + int scatter_coefficient_width = samp->coefficient_width; + float * scatter_coeffs = samp->coefficients + ( gn0 + filter_pixel_margin ) * scatter_coefficient_width; + float * g_coeffs = gather_coeffs; + scatter_contributors = samp->contributors + ( gn0 + filter_pixel_margin ); + + for (k = gn0 ; k <= gn1 ; k++ ) + { + float gc = *g_coeffs++; + + // skip zero and denormals - must skip zeros to avoid adding coeffs beyond scatter_coefficient_width + // (which happens when pivoting from horizontal, which might have dummy zeros) + if ( ( ( gc >= stbir__small_float ) || ( gc <= -stbir__small_float ) ) ) + { + if ( ( k > highest_set ) || ( scatter_contributors->n0 > scatter_contributors->n1 ) ) + { + { + // if we are skipping over several contributors, we need to clear the skipped ones + stbir__contributors * clear_contributors = samp->contributors + ( highest_set + filter_pixel_margin + 1); + while ( clear_contributors < scatter_contributors ) + { + clear_contributors->n0 = 0; + clear_contributors->n1 = -1; + ++clear_contributors; + } + } + scatter_contributors->n0 = n; + scatter_contributors->n1 = n; + scatter_coeffs[0] = gc; + highest_set = k; + } + else + { + stbir__insert_coeff( scatter_contributors, scatter_coeffs, n, gc, scatter_coefficient_width ); + } + STBIR_ASSERT( ( scatter_contributors->n1 - scatter_contributors->n0 + 1 ) <= scatter_coefficient_width ); + } + ++scatter_contributors; + scatter_coeffs += scatter_coefficient_width; + } + + ++gather_contributors; + gather_coeffs += gather_coefficient_width; + } + + // now clear any unset contribs + { + stbir__contributors * clear_contributors = samp->contributors + ( highest_set + filter_pixel_margin + 1); + stbir__contributors * end_contributors = samp->contributors + samp->num_contributors; + while ( clear_contributors < end_contributors ) + { + clear_contributors->n0 = 0; + clear_contributors->n1 = -1; + ++clear_contributors; + } + } + + STBIR_PROFILE_BUILD_END( pivot ); + } + } + break; + } +} + + +//======================================================================================================== +// scanline decoders and encoders + +#define stbir__coder_min_num 1 +#define STB_IMAGE_RESIZE_DO_CODERS +#include STBIR__HEADER_FILENAME + +#define stbir__decode_suffix BGRA +#define stbir__decode_swizzle +#define stbir__decode_order0 2 +#define stbir__decode_order1 1 +#define stbir__decode_order2 0 +#define stbir__decode_order3 3 +#define stbir__encode_order0 2 +#define stbir__encode_order1 1 +#define stbir__encode_order2 0 +#define stbir__encode_order3 3 +#define stbir__coder_min_num 4 +#define STB_IMAGE_RESIZE_DO_CODERS +#include STBIR__HEADER_FILENAME + +#define stbir__decode_suffix ARGB +#define stbir__decode_swizzle +#define stbir__decode_order0 1 +#define stbir__decode_order1 2 +#define stbir__decode_order2 3 +#define stbir__decode_order3 0 +#define stbir__encode_order0 3 +#define stbir__encode_order1 0 +#define stbir__encode_order2 1 +#define stbir__encode_order3 2 +#define stbir__coder_min_num 4 +#define STB_IMAGE_RESIZE_DO_CODERS +#include STBIR__HEADER_FILENAME + +#define stbir__decode_suffix ABGR +#define stbir__decode_swizzle +#define stbir__decode_order0 3 +#define stbir__decode_order1 2 +#define stbir__decode_order2 1 +#define stbir__decode_order3 0 +#define stbir__encode_order0 3 +#define stbir__encode_order1 2 +#define stbir__encode_order2 1 +#define stbir__encode_order3 0 +#define stbir__coder_min_num 4 +#define STB_IMAGE_RESIZE_DO_CODERS +#include STBIR__HEADER_FILENAME + +#define stbir__decode_suffix AR +#define stbir__decode_swizzle +#define stbir__decode_order0 1 +#define stbir__decode_order1 0 +#define stbir__decode_order2 3 +#define stbir__decode_order3 2 +#define stbir__encode_order0 1 +#define stbir__encode_order1 0 +#define stbir__encode_order2 3 +#define stbir__encode_order3 2 +#define stbir__coder_min_num 2 +#define STB_IMAGE_RESIZE_DO_CODERS +#include STBIR__HEADER_FILENAME + + +// fancy alpha means we expand to keep both premultipied and non-premultiplied color channels +static void stbir__fancy_alpha_weight_4ch( float * out_buffer, int width_times_channels ) +{ + float STBIR_STREAMOUT_PTR(*) out = out_buffer; + float const * end_decode = out_buffer + ( width_times_channels / 4 ) * 7; // decode buffer aligned to end of out_buffer + float STBIR_STREAMOUT_PTR(*) decode = (float*)end_decode - width_times_channels; + + // fancy alpha is stored internally as R G B A Rpm Gpm Bpm + + #ifdef STBIR_SIMD + + #ifdef STBIR_SIMD8 + decode += 16; + STBIR_NO_UNROLL_LOOP_START + while ( decode <= end_decode ) + { + stbir__simdf8 d0,d1,a0,a1,p0,p1; + STBIR_NO_UNROLL(decode); + stbir__simdf8_load( d0, decode-16 ); + stbir__simdf8_load( d1, decode-16+8 ); + stbir__simdf8_0123to33333333( a0, d0 ); + stbir__simdf8_0123to33333333( a1, d1 ); + stbir__simdf8_mult( p0, a0, d0 ); + stbir__simdf8_mult( p1, a1, d1 ); + stbir__simdf8_bot4s( a0, d0, p0 ); + stbir__simdf8_bot4s( a1, d1, p1 ); + stbir__simdf8_top4s( d0, d0, p0 ); + stbir__simdf8_top4s( d1, d1, p1 ); + stbir__simdf8_store ( out, a0 ); + stbir__simdf8_store ( out+7, d0 ); + stbir__simdf8_store ( out+14, a1 ); + stbir__simdf8_store ( out+21, d1 ); + decode += 16; + out += 28; + } + decode -= 16; + #else + decode += 8; + STBIR_NO_UNROLL_LOOP_START + while ( decode <= end_decode ) + { + stbir__simdf d0,a0,d1,a1,p0,p1; + STBIR_NO_UNROLL(decode); + stbir__simdf_load( d0, decode-8 ); + stbir__simdf_load( d1, decode-8+4 ); + stbir__simdf_0123to3333( a0, d0 ); + stbir__simdf_0123to3333( a1, d1 ); + stbir__simdf_mult( p0, a0, d0 ); + stbir__simdf_mult( p1, a1, d1 ); + stbir__simdf_store ( out, d0 ); + stbir__simdf_store ( out+4, p0 ); + stbir__simdf_store ( out+7, d1 ); + stbir__simdf_store ( out+7+4, p1 ); + decode += 8; + out += 14; + } + decode -= 8; + #endif + + // might be one last odd pixel + #ifdef STBIR_SIMD8 + STBIR_NO_UNROLL_LOOP_START + while ( decode < end_decode ) + #else + if ( decode < end_decode ) + #endif + { + stbir__simdf d,a,p; + STBIR_NO_UNROLL(decode); + stbir__simdf_load( d, decode ); + stbir__simdf_0123to3333( a, d ); + stbir__simdf_mult( p, a, d ); + stbir__simdf_store ( out, d ); + stbir__simdf_store ( out+4, p ); + decode += 4; + out += 7; + } + + #else + + while( decode < end_decode ) + { + float r = decode[0], g = decode[1], b = decode[2], alpha = decode[3]; + out[0] = r; + out[1] = g; + out[2] = b; + out[3] = alpha; + out[4] = r * alpha; + out[5] = g * alpha; + out[6] = b * alpha; + out += 7; + decode += 4; + } + + #endif +} + +static void stbir__fancy_alpha_weight_2ch( float * out_buffer, int width_times_channels ) +{ + float STBIR_STREAMOUT_PTR(*) out = out_buffer; + float const * end_decode = out_buffer + ( width_times_channels / 2 ) * 3; + float STBIR_STREAMOUT_PTR(*) decode = (float*)end_decode - width_times_channels; + + // for fancy alpha, turns into: [X A Xpm][X A Xpm],etc + + #ifdef STBIR_SIMD + + decode += 8; + if ( decode <= end_decode ) + { + STBIR_NO_UNROLL_LOOP_START + do { + #ifdef STBIR_SIMD8 + stbir__simdf8 d0,a0,p0; + STBIR_NO_UNROLL(decode); + stbir__simdf8_load( d0, decode-8 ); + stbir__simdf8_0123to11331133( p0, d0 ); + stbir__simdf8_0123to00220022( a0, d0 ); + stbir__simdf8_mult( p0, p0, a0 ); + + stbir__simdf_store2( out, stbir__if_simdf8_cast_to_simdf4( d0 ) ); + stbir__simdf_store( out+2, stbir__if_simdf8_cast_to_simdf4( p0 ) ); + stbir__simdf_store2h( out+3, stbir__if_simdf8_cast_to_simdf4( d0 ) ); + + stbir__simdf_store2( out+6, stbir__simdf8_gettop4( d0 ) ); + stbir__simdf_store( out+8, stbir__simdf8_gettop4( p0 ) ); + stbir__simdf_store2h( out+9, stbir__simdf8_gettop4( d0 ) ); + #else + stbir__simdf d0,a0,d1,a1,p0,p1; + STBIR_NO_UNROLL(decode); + stbir__simdf_load( d0, decode-8 ); + stbir__simdf_load( d1, decode-8+4 ); + stbir__simdf_0123to1133( p0, d0 ); + stbir__simdf_0123to1133( p1, d1 ); + stbir__simdf_0123to0022( a0, d0 ); + stbir__simdf_0123to0022( a1, d1 ); + stbir__simdf_mult( p0, p0, a0 ); + stbir__simdf_mult( p1, p1, a1 ); + + stbir__simdf_store2( out, d0 ); + stbir__simdf_store( out+2, p0 ); + stbir__simdf_store2h( out+3, d0 ); + + stbir__simdf_store2( out+6, d1 ); + stbir__simdf_store( out+8, p1 ); + stbir__simdf_store2h( out+9, d1 ); + #endif + decode += 8; + out += 12; + } while ( decode <= end_decode ); + } + decode -= 8; + #endif + + STBIR_SIMD_NO_UNROLL_LOOP_START + while( decode < end_decode ) + { + float x = decode[0], y = decode[1]; + STBIR_SIMD_NO_UNROLL(decode); + out[0] = x; + out[1] = y; + out[2] = x * y; + out += 3; + decode += 2; + } +} + +static void stbir__fancy_alpha_unweight_4ch( float * encode_buffer, int width_times_channels ) +{ + float STBIR_SIMD_STREAMOUT_PTR(*) encode = encode_buffer; + float STBIR_SIMD_STREAMOUT_PTR(*) input = encode_buffer; + float const * end_output = encode_buffer + width_times_channels; + + // fancy RGBA is stored internally as R G B A Rpm Gpm Bpm + + STBIR_SIMD_NO_UNROLL_LOOP_START + do { + float alpha = input[3]; +#ifdef STBIR_SIMD + stbir__simdf i,ia; + STBIR_SIMD_NO_UNROLL(encode); + if ( alpha < stbir__small_float ) + { + stbir__simdf_load( i, input ); + stbir__simdf_store( encode, i ); + } + else + { + stbir__simdf_load1frep4( ia, 1.0f / alpha ); + stbir__simdf_load( i, input+4 ); + stbir__simdf_mult( i, i, ia ); + stbir__simdf_store( encode, i ); + encode[3] = alpha; + } +#else + if ( alpha < stbir__small_float ) + { + encode[0] = input[0]; + encode[1] = input[1]; + encode[2] = input[2]; + } + else + { + float ialpha = 1.0f / alpha; + encode[0] = input[4] * ialpha; + encode[1] = input[5] * ialpha; + encode[2] = input[6] * ialpha; + } + encode[3] = alpha; +#endif + + input += 7; + encode += 4; + } while ( encode < end_output ); +} + +// format: [X A Xpm][X A Xpm] etc +static void stbir__fancy_alpha_unweight_2ch( float * encode_buffer, int width_times_channels ) +{ + float STBIR_SIMD_STREAMOUT_PTR(*) encode = encode_buffer; + float STBIR_SIMD_STREAMOUT_PTR(*) input = encode_buffer; + float const * end_output = encode_buffer + width_times_channels; + + do { + float alpha = input[1]; + encode[0] = input[0]; + if ( alpha >= stbir__small_float ) + encode[0] = input[2] / alpha; + encode[1] = alpha; + + input += 3; + encode += 2; + } while ( encode < end_output ); +} + +static void stbir__simple_alpha_weight_4ch( float * decode_buffer, int width_times_channels ) +{ + float STBIR_STREAMOUT_PTR(*) decode = decode_buffer; + float const * end_decode = decode_buffer + width_times_channels; + + #ifdef STBIR_SIMD + { + decode += 2 * stbir__simdfX_float_count; + STBIR_NO_UNROLL_LOOP_START + while ( decode <= end_decode ) + { + stbir__simdfX d0,a0,d1,a1; + STBIR_NO_UNROLL(decode); + stbir__simdfX_load( d0, decode-2*stbir__simdfX_float_count ); + stbir__simdfX_load( d1, decode-2*stbir__simdfX_float_count+stbir__simdfX_float_count ); + stbir__simdfX_aaa1( a0, d0, STBIR_onesX ); + stbir__simdfX_aaa1( a1, d1, STBIR_onesX ); + stbir__simdfX_mult( d0, d0, a0 ); + stbir__simdfX_mult( d1, d1, a1 ); + stbir__simdfX_store ( decode-2*stbir__simdfX_float_count, d0 ); + stbir__simdfX_store ( decode-2*stbir__simdfX_float_count+stbir__simdfX_float_count, d1 ); + decode += 2 * stbir__simdfX_float_count; + } + decode -= 2 * stbir__simdfX_float_count; + + // few last pixels remnants + #ifdef STBIR_SIMD8 + STBIR_NO_UNROLL_LOOP_START + while ( decode < end_decode ) + #else + if ( decode < end_decode ) + #endif + { + stbir__simdf d,a; + stbir__simdf_load( d, decode ); + stbir__simdf_aaa1( a, d, STBIR__CONSTF(STBIR_ones) ); + stbir__simdf_mult( d, d, a ); + stbir__simdf_store ( decode, d ); + decode += 4; + } + } + + #else + + while( decode < end_decode ) + { + float alpha = decode[3]; + decode[0] *= alpha; + decode[1] *= alpha; + decode[2] *= alpha; + decode += 4; + } + + #endif +} + +static void stbir__simple_alpha_weight_2ch( float * decode_buffer, int width_times_channels ) +{ + float STBIR_STREAMOUT_PTR(*) decode = decode_buffer; + float const * end_decode = decode_buffer + width_times_channels; + + #ifdef STBIR_SIMD + decode += 2 * stbir__simdfX_float_count; + STBIR_NO_UNROLL_LOOP_START + while ( decode <= end_decode ) + { + stbir__simdfX d0,a0,d1,a1; + STBIR_NO_UNROLL(decode); + stbir__simdfX_load( d0, decode-2*stbir__simdfX_float_count ); + stbir__simdfX_load( d1, decode-2*stbir__simdfX_float_count+stbir__simdfX_float_count ); + stbir__simdfX_a1a1( a0, d0, STBIR_onesX ); + stbir__simdfX_a1a1( a1, d1, STBIR_onesX ); + stbir__simdfX_mult( d0, d0, a0 ); + stbir__simdfX_mult( d1, d1, a1 ); + stbir__simdfX_store ( decode-2*stbir__simdfX_float_count, d0 ); + stbir__simdfX_store ( decode-2*stbir__simdfX_float_count+stbir__simdfX_float_count, d1 ); + decode += 2 * stbir__simdfX_float_count; + } + decode -= 2 * stbir__simdfX_float_count; + #endif + + STBIR_SIMD_NO_UNROLL_LOOP_START + while( decode < end_decode ) + { + float alpha = decode[1]; + STBIR_SIMD_NO_UNROLL(decode); + decode[0] *= alpha; + decode += 2; + } +} + +static void stbir__simple_alpha_unweight_4ch( float * encode_buffer, int width_times_channels ) +{ + float STBIR_SIMD_STREAMOUT_PTR(*) encode = encode_buffer; + float const * end_output = encode_buffer + width_times_channels; + + STBIR_SIMD_NO_UNROLL_LOOP_START + do { + float alpha = encode[3]; + +#ifdef STBIR_SIMD + stbir__simdf i,ia; + STBIR_SIMD_NO_UNROLL(encode); + if ( alpha >= stbir__small_float ) + { + stbir__simdf_load1frep4( ia, 1.0f / alpha ); + stbir__simdf_load( i, encode ); + stbir__simdf_mult( i, i, ia ); + stbir__simdf_store( encode, i ); + encode[3] = alpha; + } +#else + if ( alpha >= stbir__small_float ) + { + float ialpha = 1.0f / alpha; + encode[0] *= ialpha; + encode[1] *= ialpha; + encode[2] *= ialpha; + } +#endif + encode += 4; + } while ( encode < end_output ); +} + +static void stbir__simple_alpha_unweight_2ch( float * encode_buffer, int width_times_channels ) +{ + float STBIR_SIMD_STREAMOUT_PTR(*) encode = encode_buffer; + float const * end_output = encode_buffer + width_times_channels; + + do { + float alpha = encode[1]; + if ( alpha >= stbir__small_float ) + encode[0] /= alpha; + encode += 2; + } while ( encode < end_output ); +} + + +// only used in RGB->BGR or BGR->RGB +static void stbir__simple_flip_3ch( float * decode_buffer, int width_times_channels ) +{ + float STBIR_STREAMOUT_PTR(*) decode = decode_buffer; + float const * end_decode = decode_buffer + width_times_channels; + +#ifdef STBIR_SIMD + #ifdef stbir__simdf_swiz2 // do we have two argument swizzles? + end_decode -= 12; + STBIR_NO_UNROLL_LOOP_START + while( decode <= end_decode ) + { + // on arm64 8 instructions, no overlapping stores + stbir__simdf a,b,c,na,nb; + STBIR_SIMD_NO_UNROLL(decode); + stbir__simdf_load( a, decode ); + stbir__simdf_load( b, decode+4 ); + stbir__simdf_load( c, decode+8 ); + + na = stbir__simdf_swiz2( a, b, 2, 1, 0, 5 ); + b = stbir__simdf_swiz2( a, b, 4, 3, 6, 7 ); + nb = stbir__simdf_swiz2( b, c, 0, 1, 4, 3 ); + c = stbir__simdf_swiz2( b, c, 2, 7, 6, 5 ); + + stbir__simdf_store( decode, na ); + stbir__simdf_store( decode+4, nb ); + stbir__simdf_store( decode+8, c ); + decode += 12; + } + end_decode += 12; + #else + end_decode -= 24; + STBIR_NO_UNROLL_LOOP_START + while( decode <= end_decode ) + { + // 26 instructions on x64 + stbir__simdf a,b,c,d,e,f,g; + float i21, i23; + STBIR_SIMD_NO_UNROLL(decode); + stbir__simdf_load( a, decode ); + stbir__simdf_load( b, decode+3 ); + stbir__simdf_load( c, decode+6 ); + stbir__simdf_load( d, decode+9 ); + stbir__simdf_load( e, decode+12 ); + stbir__simdf_load( f, decode+15 ); + stbir__simdf_load( g, decode+18 ); + + a = stbir__simdf_swiz( a, 2, 1, 0, 3 ); + b = stbir__simdf_swiz( b, 2, 1, 0, 3 ); + c = stbir__simdf_swiz( c, 2, 1, 0, 3 ); + d = stbir__simdf_swiz( d, 2, 1, 0, 3 ); + e = stbir__simdf_swiz( e, 2, 1, 0, 3 ); + f = stbir__simdf_swiz( f, 2, 1, 0, 3 ); + g = stbir__simdf_swiz( g, 2, 1, 0, 3 ); + + // stores overlap, need to be in order, + stbir__simdf_store( decode, a ); + i21 = decode[21]; + stbir__simdf_store( decode+3, b ); + i23 = decode[23]; + stbir__simdf_store( decode+6, c ); + stbir__simdf_store( decode+9, d ); + stbir__simdf_store( decode+12, e ); + stbir__simdf_store( decode+15, f ); + stbir__simdf_store( decode+18, g ); + decode[21] = i23; + decode[23] = i21; + decode += 24; + } + end_decode += 24; + #endif +#else + end_decode -= 12; + STBIR_NO_UNROLL_LOOP_START + while( decode <= end_decode ) + { + // 16 instructions + float t0,t1,t2,t3; + STBIR_NO_UNROLL(decode); + t0 = decode[0]; t1 = decode[3]; t2 = decode[6]; t3 = decode[9]; + decode[0] = decode[2]; decode[3] = decode[5]; decode[6] = decode[8]; decode[9] = decode[11]; + decode[2] = t0; decode[5] = t1; decode[8] = t2; decode[11] = t3; + decode += 12; + } + end_decode += 12; +#endif + + STBIR_NO_UNROLL_LOOP_START + while( decode < end_decode ) + { + float t = decode[0]; + STBIR_NO_UNROLL(decode); + decode[0] = decode[2]; + decode[2] = t; + decode += 3; + } +} + + + +static void stbir__decode_scanline(stbir__info const * stbir_info, int n, float * output_buffer STBIR_ONLY_PROFILE_GET_SPLIT_INFO ) +{ + int channels = stbir_info->channels; + int effective_channels = stbir_info->effective_channels; + int input_sample_in_bytes = stbir__type_size[stbir_info->input_type] * channels; + stbir_edge edge_horizontal = stbir_info->horizontal.edge; + stbir_edge edge_vertical = stbir_info->vertical.edge; + int row = stbir__edge_wrap(edge_vertical, n, stbir_info->vertical.scale_info.input_full_size); + const void* input_plane_data = ( (char *) stbir_info->input_data ) + (size_t)row * (size_t) stbir_info->input_stride_bytes; + stbir__span const * spans = stbir_info->scanline_extents.spans; + float * full_decode_buffer = output_buffer - stbir_info->scanline_extents.conservative.n0 * effective_channels; + float * last_decoded = 0; + + // if we are on edge_zero, and we get in here with an out of bounds n, then the calculate filters has failed + STBIR_ASSERT( !(edge_vertical == STBIR_EDGE_ZERO && (n < 0 || n >= stbir_info->vertical.scale_info.input_full_size)) ); + + do + { + float * decode_buffer; + void const * input_data; + float * end_decode; + int width_times_channels; + int width; + + if ( spans->n1 < spans->n0 ) + break; + + width = spans->n1 + 1 - spans->n0; + decode_buffer = full_decode_buffer + spans->n0 * effective_channels; + end_decode = full_decode_buffer + ( spans->n1 + 1 ) * effective_channels; + width_times_channels = width * channels; + + // read directly out of input plane by default + input_data = ( (char*)input_plane_data ) + spans->pixel_offset_for_input * input_sample_in_bytes; + + // if we have an input callback, call it to get the input data + if ( stbir_info->in_pixels_cb ) + { + // call the callback with a temp buffer (that they can choose to use or not). the temp is just right aligned memory in the decode_buffer itself + input_data = stbir_info->in_pixels_cb( ( (char*) end_decode ) - ( width * input_sample_in_bytes ) + ( ( stbir_info->input_type != STBIR_TYPE_FLOAT ) ? ( sizeof(float)*STBIR_INPUT_CALLBACK_PADDING ) : 0 ), input_plane_data, width, spans->pixel_offset_for_input, row, stbir_info->user_data ); + } + + STBIR_PROFILE_START( decode ); + // convert the pixels info the float decode_buffer, (we index from end_decode, so that when channelsdecode_pixels( (float*)end_decode - width_times_channels, width_times_channels, input_data ); + STBIR_PROFILE_END( decode ); + + if (stbir_info->alpha_weight) + { + STBIR_PROFILE_START( alpha ); + stbir_info->alpha_weight( decode_buffer, width_times_channels ); + STBIR_PROFILE_END( alpha ); + } + + ++spans; + } while ( spans <= ( &stbir_info->scanline_extents.spans[1] ) ); + + // handle the edge_wrap filter (all other types are handled back out at the calculate_filter stage) + // basically the idea here is that if we have the whole scanline in memory, we don't redecode the + // wrapped edge pixels, and instead just memcpy them from the scanline into the edge positions + if ( ( edge_horizontal == STBIR_EDGE_WRAP ) && ( stbir_info->scanline_extents.edge_sizes[0] | stbir_info->scanline_extents.edge_sizes[1] ) ) + { + // this code only runs if we're in edge_wrap, and we're doing the entire scanline + int e, start_x[2]; + int input_full_size = stbir_info->horizontal.scale_info.input_full_size; + + start_x[0] = -stbir_info->scanline_extents.edge_sizes[0]; // left edge start x + start_x[1] = input_full_size; // right edge + + for( e = 0; e < 2 ; e++ ) + { + // do each margin + int margin = stbir_info->scanline_extents.edge_sizes[e]; + if ( margin ) + { + int x = start_x[e]; + float * marg = full_decode_buffer + x * effective_channels; + float const * src = full_decode_buffer + stbir__edge_wrap(edge_horizontal, x, input_full_size) * effective_channels; + STBIR_MEMCPY( marg, src, margin * effective_channels * sizeof(float) ); + if ( e == 1 ) last_decoded = marg + margin * effective_channels; + } + } + } + + // some of the horizontal gathers read one float off the edge (which is masked out), but we force a zero here to make sure no NaNs leak in + // (we can't pre-zero it, because the input callback can use that area as padding) + last_decoded[0] = 0.0f; + + // we clear this extra float, because the final output pixel filter kernel might have used one less coeff than the max filter width + // when this happens, we do read that pixel from the input, so it too could be Nan, so just zero an extra one. + // this fits because each scanline is padded by three floats (STBIR_INPUT_CALLBACK_PADDING) + last_decoded[1] = 0.0f; +} + + +//================= +// Do 1 channel horizontal routines + +#ifdef STBIR_SIMD + +#define stbir__1_coeff_only() \ + stbir__simdf tot,c; \ + STBIR_SIMD_NO_UNROLL(decode); \ + stbir__simdf_load1( c, hc ); \ + stbir__simdf_mult1_mem( tot, c, decode ); + +#define stbir__2_coeff_only() \ + stbir__simdf tot,c,d; \ + STBIR_SIMD_NO_UNROLL(decode); \ + stbir__simdf_load2z( c, hc ); \ + stbir__simdf_load2( d, decode ); \ + stbir__simdf_mult( tot, c, d ); \ + stbir__simdf_0123to1230( c, tot ); \ + stbir__simdf_add1( tot, tot, c ); + +#define stbir__3_coeff_only() \ + stbir__simdf tot,c,t; \ + STBIR_SIMD_NO_UNROLL(decode); \ + stbir__simdf_load( c, hc ); \ + stbir__simdf_mult_mem( tot, c, decode ); \ + stbir__simdf_0123to1230( c, tot ); \ + stbir__simdf_0123to2301( t, tot ); \ + stbir__simdf_add1( tot, tot, c ); \ + stbir__simdf_add1( tot, tot, t ); + +#define stbir__store_output_tiny() \ + stbir__simdf_store1( output, tot ); \ + horizontal_coefficients += coefficient_width; \ + ++horizontal_contributors; \ + output += 1; + +#define stbir__4_coeff_start() \ + stbir__simdf tot,c; \ + STBIR_SIMD_NO_UNROLL(decode); \ + stbir__simdf_load( c, hc ); \ + stbir__simdf_mult_mem( tot, c, decode ); \ + +#define stbir__4_coeff_continue_from_4( ofs ) \ + STBIR_SIMD_NO_UNROLL(decode); \ + stbir__simdf_load( c, hc + (ofs) ); \ + stbir__simdf_madd_mem( tot, tot, c, decode+(ofs) ); + +#define stbir__1_coeff_remnant( ofs ) \ + { stbir__simdf d; \ + stbir__simdf_load1z( c, hc + (ofs) ); \ + stbir__simdf_load1( d, decode + (ofs) ); \ + stbir__simdf_madd( tot, tot, d, c ); } + +#define stbir__2_coeff_remnant( ofs ) \ + { stbir__simdf d; \ + stbir__simdf_load2z( c, hc+(ofs) ); \ + stbir__simdf_load2( d, decode+(ofs) ); \ + stbir__simdf_madd( tot, tot, d, c ); } + +#define stbir__3_coeff_setup() \ + stbir__simdf mask; \ + stbir__simdf_load( mask, STBIR_mask + 3 ); + +#define stbir__3_coeff_remnant( ofs ) \ + stbir__simdf_load( c, hc+(ofs) ); \ + stbir__simdf_and( c, c, mask ); \ + stbir__simdf_madd_mem( tot, tot, c, decode+(ofs) ); + +#define stbir__store_output() \ + stbir__simdf_0123to2301( c, tot ); \ + stbir__simdf_add( tot, tot, c ); \ + stbir__simdf_0123to1230( c, tot ); \ + stbir__simdf_add1( tot, tot, c ); \ + stbir__simdf_store1( output, tot ); \ + horizontal_coefficients += coefficient_width; \ + ++horizontal_contributors; \ + output += 1; + +#else + +#define stbir__1_coeff_only() \ + float tot; \ + tot = decode[0]*hc[0]; + +#define stbir__2_coeff_only() \ + float tot; \ + tot = decode[0] * hc[0]; \ + tot += decode[1] * hc[1]; + +#define stbir__3_coeff_only() \ + float tot; \ + tot = decode[0] * hc[0]; \ + tot += decode[1] * hc[1]; \ + tot += decode[2] * hc[2]; + +#define stbir__store_output_tiny() \ + output[0] = tot; \ + horizontal_coefficients += coefficient_width; \ + ++horizontal_contributors; \ + output += 1; + +#define stbir__4_coeff_start() \ + float tot0,tot1,tot2,tot3; \ + tot0 = decode[0] * hc[0]; \ + tot1 = decode[1] * hc[1]; \ + tot2 = decode[2] * hc[2]; \ + tot3 = decode[3] * hc[3]; + +#define stbir__4_coeff_continue_from_4( ofs ) \ + tot0 += decode[0+(ofs)] * hc[0+(ofs)]; \ + tot1 += decode[1+(ofs)] * hc[1+(ofs)]; \ + tot2 += decode[2+(ofs)] * hc[2+(ofs)]; \ + tot3 += decode[3+(ofs)] * hc[3+(ofs)]; + +#define stbir__1_coeff_remnant( ofs ) \ + tot0 += decode[0+(ofs)] * hc[0+(ofs)]; + +#define stbir__2_coeff_remnant( ofs ) \ + tot0 += decode[0+(ofs)] * hc[0+(ofs)]; \ + tot1 += decode[1+(ofs)] * hc[1+(ofs)]; \ + +#define stbir__3_coeff_remnant( ofs ) \ + tot0 += decode[0+(ofs)] * hc[0+(ofs)]; \ + tot1 += decode[1+(ofs)] * hc[1+(ofs)]; \ + tot2 += decode[2+(ofs)] * hc[2+(ofs)]; + +#define stbir__store_output() \ + output[0] = (tot0+tot2)+(tot1+tot3); \ + horizontal_coefficients += coefficient_width; \ + ++horizontal_contributors; \ + output += 1; + +#endif + +#define STBIR__horizontal_channels 1 +#define STB_IMAGE_RESIZE_DO_HORIZONTALS +#include STBIR__HEADER_FILENAME + + +//================= +// Do 2 channel horizontal routines + +#ifdef STBIR_SIMD + +#define stbir__1_coeff_only() \ + stbir__simdf tot,c,d; \ + STBIR_SIMD_NO_UNROLL(decode); \ + stbir__simdf_load1z( c, hc ); \ + stbir__simdf_0123to0011( c, c ); \ + stbir__simdf_load2( d, decode ); \ + stbir__simdf_mult( tot, d, c ); + +#define stbir__2_coeff_only() \ + stbir__simdf tot,c; \ + STBIR_SIMD_NO_UNROLL(decode); \ + stbir__simdf_load2( c, hc ); \ + stbir__simdf_0123to0011( c, c ); \ + stbir__simdf_mult_mem( tot, c, decode ); + +#define stbir__3_coeff_only() \ + stbir__simdf tot,c,cs,d; \ + STBIR_SIMD_NO_UNROLL(decode); \ + stbir__simdf_load( cs, hc ); \ + stbir__simdf_0123to0011( c, cs ); \ + stbir__simdf_mult_mem( tot, c, decode ); \ + stbir__simdf_0123to2222( c, cs ); \ + stbir__simdf_load2z( d, decode+4 ); \ + stbir__simdf_madd( tot, tot, d, c ); + +#define stbir__store_output_tiny() \ + stbir__simdf_0123to2301( c, tot ); \ + stbir__simdf_add( tot, tot, c ); \ + stbir__simdf_store2( output, tot ); \ + horizontal_coefficients += coefficient_width; \ + ++horizontal_contributors; \ + output += 2; + +#ifdef STBIR_SIMD8 + +#define stbir__4_coeff_start() \ + stbir__simdf8 tot0,c,cs; \ + STBIR_SIMD_NO_UNROLL(decode); \ + stbir__simdf8_load4b( cs, hc ); \ + stbir__simdf8_0123to00112233( c, cs ); \ + stbir__simdf8_mult_mem( tot0, c, decode ); + +#define stbir__4_coeff_continue_from_4( ofs ) \ + STBIR_SIMD_NO_UNROLL(decode); \ + stbir__simdf8_load4b( cs, hc + (ofs) ); \ + stbir__simdf8_0123to00112233( c, cs ); \ + stbir__simdf8_madd_mem( tot0, tot0, c, decode+(ofs)*2 ); + +#define stbir__1_coeff_remnant( ofs ) \ + { stbir__simdf t,d; \ + stbir__simdf_load1z( t, hc + (ofs) ); \ + stbir__simdf_load2( d, decode + (ofs) * 2 ); \ + stbir__simdf_0123to0011( t, t ); \ + stbir__simdf_mult( t, t, d ); \ + stbir__simdf8_add4( tot0, tot0, t ); } + +#define stbir__2_coeff_remnant( ofs ) \ + { stbir__simdf t; \ + stbir__simdf_load2( t, hc + (ofs) ); \ + stbir__simdf_0123to0011( t, t ); \ + stbir__simdf_mult_mem( t, t, decode+(ofs)*2 ); \ + stbir__simdf8_add4( tot0, tot0, t ); } + +#define stbir__3_coeff_remnant( ofs ) \ + { stbir__simdf8 d; \ + stbir__simdf8_load4b( cs, hc + (ofs) ); \ + stbir__simdf8_0123to00112233( c, cs ); \ + stbir__simdf8_load6z( d, decode+(ofs)*2 ); \ + stbir__simdf8_madd( tot0, tot0, c, d ); } + +#define stbir__store_output() \ + { stbir__simdf t,d; \ + stbir__simdf8_add4halves( t, stbir__if_simdf8_cast_to_simdf4(tot0), tot0 ); \ + stbir__simdf_0123to2301( d, t ); \ + stbir__simdf_add( t, t, d ); \ + stbir__simdf_store2( output, t ); \ + horizontal_coefficients += coefficient_width; \ + ++horizontal_contributors; \ + output += 2; } + +#else + +#define stbir__4_coeff_start() \ + stbir__simdf tot0,tot1,c,cs; \ + STBIR_SIMD_NO_UNROLL(decode); \ + stbir__simdf_load( cs, hc ); \ + stbir__simdf_0123to0011( c, cs ); \ + stbir__simdf_mult_mem( tot0, c, decode ); \ + stbir__simdf_0123to2233( c, cs ); \ + stbir__simdf_mult_mem( tot1, c, decode+4 ); + +#define stbir__4_coeff_continue_from_4( ofs ) \ + STBIR_SIMD_NO_UNROLL(decode); \ + stbir__simdf_load( cs, hc + (ofs) ); \ + stbir__simdf_0123to0011( c, cs ); \ + stbir__simdf_madd_mem( tot0, tot0, c, decode+(ofs)*2 ); \ + stbir__simdf_0123to2233( c, cs ); \ + stbir__simdf_madd_mem( tot1, tot1, c, decode+(ofs)*2+4 ); + +#define stbir__1_coeff_remnant( ofs ) \ + { stbir__simdf d; \ + stbir__simdf_load1z( cs, hc + (ofs) ); \ + stbir__simdf_0123to0011( c, cs ); \ + stbir__simdf_load2( d, decode + (ofs) * 2 ); \ + stbir__simdf_madd( tot0, tot0, d, c ); } + +#define stbir__2_coeff_remnant( ofs ) \ + stbir__simdf_load2( cs, hc + (ofs) ); \ + stbir__simdf_0123to0011( c, cs ); \ + stbir__simdf_madd_mem( tot0, tot0, c, decode+(ofs)*2 ); + +#define stbir__3_coeff_remnant( ofs ) \ + { stbir__simdf d; \ + stbir__simdf_load( cs, hc + (ofs) ); \ + stbir__simdf_0123to0011( c, cs ); \ + stbir__simdf_madd_mem( tot0, tot0, c, decode+(ofs)*2 ); \ + stbir__simdf_0123to2222( c, cs ); \ + stbir__simdf_load2z( d, decode + (ofs) * 2 + 4 ); \ + stbir__simdf_madd( tot1, tot1, d, c ); } + +#define stbir__store_output() \ + stbir__simdf_add( tot0, tot0, tot1 ); \ + stbir__simdf_0123to2301( c, tot0 ); \ + stbir__simdf_add( tot0, tot0, c ); \ + stbir__simdf_store2( output, tot0 ); \ + horizontal_coefficients += coefficient_width; \ + ++horizontal_contributors; \ + output += 2; + +#endif + +#else + +#define stbir__1_coeff_only() \ + float tota,totb,c; \ + c = hc[0]; \ + tota = decode[0]*c; \ + totb = decode[1]*c; + +#define stbir__2_coeff_only() \ + float tota,totb,c; \ + c = hc[0]; \ + tota = decode[0]*c; \ + totb = decode[1]*c; \ + c = hc[1]; \ + tota += decode[2]*c; \ + totb += decode[3]*c; + +// this weird order of add matches the simd +#define stbir__3_coeff_only() \ + float tota,totb,c; \ + c = hc[0]; \ + tota = decode[0]*c; \ + totb = decode[1]*c; \ + c = hc[2]; \ + tota += decode[4]*c; \ + totb += decode[5]*c; \ + c = hc[1]; \ + tota += decode[2]*c; \ + totb += decode[3]*c; + +#define stbir__store_output_tiny() \ + output[0] = tota; \ + output[1] = totb; \ + horizontal_coefficients += coefficient_width; \ + ++horizontal_contributors; \ + output += 2; + +#define stbir__4_coeff_start() \ + float tota0,tota1,tota2,tota3,totb0,totb1,totb2,totb3,c; \ + c = hc[0]; \ + tota0 = decode[0]*c; \ + totb0 = decode[1]*c; \ + c = hc[1]; \ + tota1 = decode[2]*c; \ + totb1 = decode[3]*c; \ + c = hc[2]; \ + tota2 = decode[4]*c; \ + totb2 = decode[5]*c; \ + c = hc[3]; \ + tota3 = decode[6]*c; \ + totb3 = decode[7]*c; + +#define stbir__4_coeff_continue_from_4( ofs ) \ + c = hc[0+(ofs)]; \ + tota0 += decode[0+(ofs)*2]*c; \ + totb0 += decode[1+(ofs)*2]*c; \ + c = hc[1+(ofs)]; \ + tota1 += decode[2+(ofs)*2]*c; \ + totb1 += decode[3+(ofs)*2]*c; \ + c = hc[2+(ofs)]; \ + tota2 += decode[4+(ofs)*2]*c; \ + totb2 += decode[5+(ofs)*2]*c; \ + c = hc[3+(ofs)]; \ + tota3 += decode[6+(ofs)*2]*c; \ + totb3 += decode[7+(ofs)*2]*c; + +#define stbir__1_coeff_remnant( ofs ) \ + c = hc[0+(ofs)]; \ + tota0 += decode[0+(ofs)*2] * c; \ + totb0 += decode[1+(ofs)*2] * c; + +#define stbir__2_coeff_remnant( ofs ) \ + c = hc[0+(ofs)]; \ + tota0 += decode[0+(ofs)*2] * c; \ + totb0 += decode[1+(ofs)*2] * c; \ + c = hc[1+(ofs)]; \ + tota1 += decode[2+(ofs)*2] * c; \ + totb1 += decode[3+(ofs)*2] * c; + +#define stbir__3_coeff_remnant( ofs ) \ + c = hc[0+(ofs)]; \ + tota0 += decode[0+(ofs)*2] * c; \ + totb0 += decode[1+(ofs)*2] * c; \ + c = hc[1+(ofs)]; \ + tota1 += decode[2+(ofs)*2] * c; \ + totb1 += decode[3+(ofs)*2] * c; \ + c = hc[2+(ofs)]; \ + tota2 += decode[4+(ofs)*2] * c; \ + totb2 += decode[5+(ofs)*2] * c; + +#define stbir__store_output() \ + output[0] = (tota0+tota2)+(tota1+tota3); \ + output[1] = (totb0+totb2)+(totb1+totb3); \ + horizontal_coefficients += coefficient_width; \ + ++horizontal_contributors; \ + output += 2; + +#endif + +#define STBIR__horizontal_channels 2 +#define STB_IMAGE_RESIZE_DO_HORIZONTALS +#include STBIR__HEADER_FILENAME + + +//================= +// Do 3 channel horizontal routines + +#ifdef STBIR_SIMD + +#define stbir__1_coeff_only() \ + stbir__simdf tot,c,d; \ + STBIR_SIMD_NO_UNROLL(decode); \ + stbir__simdf_load1z( c, hc ); \ + stbir__simdf_0123to0001( c, c ); \ + stbir__simdf_load( d, decode ); \ + stbir__simdf_mult( tot, d, c ); + +#define stbir__2_coeff_only() \ + stbir__simdf tot,c,cs,d; \ + STBIR_SIMD_NO_UNROLL(decode); \ + stbir__simdf_load2( cs, hc ); \ + stbir__simdf_0123to0000( c, cs ); \ + stbir__simdf_load( d, decode ); \ + stbir__simdf_mult( tot, d, c ); \ + stbir__simdf_0123to1111( c, cs ); \ + stbir__simdf_load( d, decode+3 ); \ + stbir__simdf_madd( tot, tot, d, c ); + +#define stbir__3_coeff_only() \ + stbir__simdf tot,c,d,cs; \ + STBIR_SIMD_NO_UNROLL(decode); \ + stbir__simdf_load( cs, hc ); \ + stbir__simdf_0123to0000( c, cs ); \ + stbir__simdf_load( d, decode ); \ + stbir__simdf_mult( tot, d, c ); \ + stbir__simdf_0123to1111( c, cs ); \ + stbir__simdf_load( d, decode+3 ); \ + stbir__simdf_madd( tot, tot, d, c ); \ + stbir__simdf_0123to2222( c, cs ); \ + stbir__simdf_load( d, decode+6 ); \ + stbir__simdf_madd( tot, tot, d, c ); + +#define stbir__store_output_tiny() \ + stbir__simdf_store2( output, tot ); \ + stbir__simdf_0123to2301( tot, tot ); \ + stbir__simdf_store1( output+2, tot ); \ + horizontal_coefficients += coefficient_width; \ + ++horizontal_contributors; \ + output += 3; + +#ifdef STBIR_SIMD8 + +// we're loading from the XXXYYY decode by -1 to get the XXXYYY into different halves of the AVX reg fyi +#define stbir__4_coeff_start() \ + stbir__simdf8 tot0,tot1,c,cs; stbir__simdf t; \ + STBIR_SIMD_NO_UNROLL(decode); \ + stbir__simdf8_load4b( cs, hc ); \ + stbir__simdf8_0123to00001111( c, cs ); \ + stbir__simdf8_mult_mem( tot0, c, decode - 1 ); \ + stbir__simdf8_0123to22223333( c, cs ); \ + stbir__simdf8_mult_mem( tot1, c, decode+6 - 1 ); + +#define stbir__4_coeff_continue_from_4( ofs ) \ + STBIR_SIMD_NO_UNROLL(decode); \ + stbir__simdf8_load4b( cs, hc + (ofs) ); \ + stbir__simdf8_0123to00001111( c, cs ); \ + stbir__simdf8_madd_mem( tot0, tot0, c, decode+(ofs)*3 - 1 ); \ + stbir__simdf8_0123to22223333( c, cs ); \ + stbir__simdf8_madd_mem( tot1, tot1, c, decode+(ofs)*3 + 6 - 1 ); + +#define stbir__1_coeff_remnant( ofs ) \ + STBIR_SIMD_NO_UNROLL(decode); \ + stbir__simdf_load1rep4( t, hc + (ofs) ); \ + stbir__simdf8_madd_mem4( tot0, tot0, t, decode+(ofs)*3 - 1 ); + +#define stbir__2_coeff_remnant( ofs ) \ + STBIR_SIMD_NO_UNROLL(decode); \ + stbir__simdf8_load4b( cs, hc + (ofs) - 2 ); \ + stbir__simdf8_0123to22223333( c, cs ); \ + stbir__simdf8_madd_mem( tot0, tot0, c, decode+(ofs)*3 - 1 ); + + #define stbir__3_coeff_remnant( ofs ) \ + STBIR_SIMD_NO_UNROLL(decode); \ + stbir__simdf8_load4b( cs, hc + (ofs) ); \ + stbir__simdf8_0123to00001111( c, cs ); \ + stbir__simdf8_madd_mem( tot0, tot0, c, decode+(ofs)*3 - 1 ); \ + stbir__simdf8_0123to2222( t, cs ); \ + stbir__simdf8_madd_mem4( tot1, tot1, t, decode+(ofs)*3 + 6 - 1 ); + +#define stbir__store_output() \ + stbir__simdf8_add( tot0, tot0, tot1 ); \ + stbir__simdf_0123to1230( t, stbir__if_simdf8_cast_to_simdf4( tot0 ) ); \ + stbir__simdf8_add4halves( t, t, tot0 ); \ + horizontal_coefficients += coefficient_width; \ + ++horizontal_contributors; \ + output += 3; \ + if ( output < output_end ) \ + { \ + stbir__simdf_store( output-3, t ); \ + continue; \ + } \ + { stbir__simdf tt; stbir__simdf_0123to2301( tt, t ); \ + stbir__simdf_store2( output-3, t ); \ + stbir__simdf_store1( output+2-3, tt ); } \ + break; + + +#else + +#define stbir__4_coeff_start() \ + stbir__simdf tot0,tot1,tot2,c,cs; \ + STBIR_SIMD_NO_UNROLL(decode); \ + stbir__simdf_load( cs, hc ); \ + stbir__simdf_0123to0001( c, cs ); \ + stbir__simdf_mult_mem( tot0, c, decode ); \ + stbir__simdf_0123to1122( c, cs ); \ + stbir__simdf_mult_mem( tot1, c, decode+4 ); \ + stbir__simdf_0123to2333( c, cs ); \ + stbir__simdf_mult_mem( tot2, c, decode+8 ); + +#define stbir__4_coeff_continue_from_4( ofs ) \ + STBIR_SIMD_NO_UNROLL(decode); \ + stbir__simdf_load( cs, hc + (ofs) ); \ + stbir__simdf_0123to0001( c, cs ); \ + stbir__simdf_madd_mem( tot0, tot0, c, decode+(ofs)*3 ); \ + stbir__simdf_0123to1122( c, cs ); \ + stbir__simdf_madd_mem( tot1, tot1, c, decode+(ofs)*3+4 ); \ + stbir__simdf_0123to2333( c, cs ); \ + stbir__simdf_madd_mem( tot2, tot2, c, decode+(ofs)*3+8 ); + +#define stbir__1_coeff_remnant( ofs ) \ + STBIR_SIMD_NO_UNROLL(decode); \ + stbir__simdf_load1z( c, hc + (ofs) ); \ + stbir__simdf_0123to0001( c, c ); \ + stbir__simdf_madd_mem( tot0, tot0, c, decode+(ofs)*3 ); + +#define stbir__2_coeff_remnant( ofs ) \ + { stbir__simdf d; \ + STBIR_SIMD_NO_UNROLL(decode); \ + stbir__simdf_load2z( cs, hc + (ofs) ); \ + stbir__simdf_0123to0001( c, cs ); \ + stbir__simdf_madd_mem( tot0, tot0, c, decode+(ofs)*3 ); \ + stbir__simdf_0123to1122( c, cs ); \ + stbir__simdf_load2z( d, decode+(ofs)*3+4 ); \ + stbir__simdf_madd( tot1, tot1, c, d ); } + +#define stbir__3_coeff_remnant( ofs ) \ + { stbir__simdf d; \ + STBIR_SIMD_NO_UNROLL(decode); \ + stbir__simdf_load( cs, hc + (ofs) ); \ + stbir__simdf_0123to0001( c, cs ); \ + stbir__simdf_madd_mem( tot0, tot0, c, decode+(ofs)*3 ); \ + stbir__simdf_0123to1122( c, cs ); \ + stbir__simdf_madd_mem( tot1, tot1, c, decode+(ofs)*3+4 ); \ + stbir__simdf_0123to2222( c, cs ); \ + stbir__simdf_load1z( d, decode+(ofs)*3+8 ); \ + stbir__simdf_madd( tot2, tot2, c, d ); } + +#define stbir__store_output() \ + stbir__simdf_0123ABCDto3ABx( c, tot0, tot1 ); \ + stbir__simdf_0123ABCDto23Ax( cs, tot1, tot2 ); \ + stbir__simdf_0123to1230( tot2, tot2 ); \ + stbir__simdf_add( tot0, tot0, cs ); \ + stbir__simdf_add( c, c, tot2 ); \ + stbir__simdf_add( tot0, tot0, c ); \ + horizontal_coefficients += coefficient_width; \ + ++horizontal_contributors; \ + output += 3; \ + if ( output < output_end ) \ + { \ + stbir__simdf_store( output-3, tot0 ); \ + continue; \ + } \ + stbir__simdf_0123to2301( tot1, tot0 ); \ + stbir__simdf_store2( output-3, tot0 ); \ + stbir__simdf_store1( output+2-3, tot1 ); \ + break; + +#endif + +#else + +#define stbir__1_coeff_only() \ + float tot0, tot1, tot2, c; \ + c = hc[0]; \ + tot0 = decode[0]*c; \ + tot1 = decode[1]*c; \ + tot2 = decode[2]*c; + +#define stbir__2_coeff_only() \ + float tot0, tot1, tot2, c; \ + c = hc[0]; \ + tot0 = decode[0]*c; \ + tot1 = decode[1]*c; \ + tot2 = decode[2]*c; \ + c = hc[1]; \ + tot0 += decode[3]*c; \ + tot1 += decode[4]*c; \ + tot2 += decode[5]*c; + +#define stbir__3_coeff_only() \ + float tot0, tot1, tot2, c; \ + c = hc[0]; \ + tot0 = decode[0]*c; \ + tot1 = decode[1]*c; \ + tot2 = decode[2]*c; \ + c = hc[1]; \ + tot0 += decode[3]*c; \ + tot1 += decode[4]*c; \ + tot2 += decode[5]*c; \ + c = hc[2]; \ + tot0 += decode[6]*c; \ + tot1 += decode[7]*c; \ + tot2 += decode[8]*c; + +#define stbir__store_output_tiny() \ + output[0] = tot0; \ + output[1] = tot1; \ + output[2] = tot2; \ + horizontal_coefficients += coefficient_width; \ + ++horizontal_contributors; \ + output += 3; + +#define stbir__4_coeff_start() \ + float tota0,tota1,tota2,totb0,totb1,totb2,totc0,totc1,totc2,totd0,totd1,totd2,c; \ + c = hc[0]; \ + tota0 = decode[0]*c; \ + tota1 = decode[1]*c; \ + tota2 = decode[2]*c; \ + c = hc[1]; \ + totb0 = decode[3]*c; \ + totb1 = decode[4]*c; \ + totb2 = decode[5]*c; \ + c = hc[2]; \ + totc0 = decode[6]*c; \ + totc1 = decode[7]*c; \ + totc2 = decode[8]*c; \ + c = hc[3]; \ + totd0 = decode[9]*c; \ + totd1 = decode[10]*c; \ + totd2 = decode[11]*c; + +#define stbir__4_coeff_continue_from_4( ofs ) \ + c = hc[0+(ofs)]; \ + tota0 += decode[0+(ofs)*3]*c; \ + tota1 += decode[1+(ofs)*3]*c; \ + tota2 += decode[2+(ofs)*3]*c; \ + c = hc[1+(ofs)]; \ + totb0 += decode[3+(ofs)*3]*c; \ + totb1 += decode[4+(ofs)*3]*c; \ + totb2 += decode[5+(ofs)*3]*c; \ + c = hc[2+(ofs)]; \ + totc0 += decode[6+(ofs)*3]*c; \ + totc1 += decode[7+(ofs)*3]*c; \ + totc2 += decode[8+(ofs)*3]*c; \ + c = hc[3+(ofs)]; \ + totd0 += decode[9+(ofs)*3]*c; \ + totd1 += decode[10+(ofs)*3]*c; \ + totd2 += decode[11+(ofs)*3]*c; + +#define stbir__1_coeff_remnant( ofs ) \ + c = hc[0+(ofs)]; \ + tota0 += decode[0+(ofs)*3]*c; \ + tota1 += decode[1+(ofs)*3]*c; \ + tota2 += decode[2+(ofs)*3]*c; + +#define stbir__2_coeff_remnant( ofs ) \ + c = hc[0+(ofs)]; \ + tota0 += decode[0+(ofs)*3]*c; \ + tota1 += decode[1+(ofs)*3]*c; \ + tota2 += decode[2+(ofs)*3]*c; \ + c = hc[1+(ofs)]; \ + totb0 += decode[3+(ofs)*3]*c; \ + totb1 += decode[4+(ofs)*3]*c; \ + totb2 += decode[5+(ofs)*3]*c; \ + +#define stbir__3_coeff_remnant( ofs ) \ + c = hc[0+(ofs)]; \ + tota0 += decode[0+(ofs)*3]*c; \ + tota1 += decode[1+(ofs)*3]*c; \ + tota2 += decode[2+(ofs)*3]*c; \ + c = hc[1+(ofs)]; \ + totb0 += decode[3+(ofs)*3]*c; \ + totb1 += decode[4+(ofs)*3]*c; \ + totb2 += decode[5+(ofs)*3]*c; \ + c = hc[2+(ofs)]; \ + totc0 += decode[6+(ofs)*3]*c; \ + totc1 += decode[7+(ofs)*3]*c; \ + totc2 += decode[8+(ofs)*3]*c; + +#define stbir__store_output() \ + output[0] = (tota0+totc0)+(totb0+totd0); \ + output[1] = (tota1+totc1)+(totb1+totd1); \ + output[2] = (tota2+totc2)+(totb2+totd2); \ + horizontal_coefficients += coefficient_width; \ + ++horizontal_contributors; \ + output += 3; + +#endif + +#define STBIR__horizontal_channels 3 +#define STB_IMAGE_RESIZE_DO_HORIZONTALS +#include STBIR__HEADER_FILENAME + +//================= +// Do 4 channel horizontal routines + +#ifdef STBIR_SIMD + +#define stbir__1_coeff_only() \ + stbir__simdf tot,c; \ + STBIR_SIMD_NO_UNROLL(decode); \ + stbir__simdf_load1( c, hc ); \ + stbir__simdf_0123to0000( c, c ); \ + stbir__simdf_mult_mem( tot, c, decode ); + +#define stbir__2_coeff_only() \ + stbir__simdf tot,c,cs; \ + STBIR_SIMD_NO_UNROLL(decode); \ + stbir__simdf_load2( cs, hc ); \ + stbir__simdf_0123to0000( c, cs ); \ + stbir__simdf_mult_mem( tot, c, decode ); \ + stbir__simdf_0123to1111( c, cs ); \ + stbir__simdf_madd_mem( tot, tot, c, decode+4 ); + +#define stbir__3_coeff_only() \ + stbir__simdf tot,c,cs; \ + STBIR_SIMD_NO_UNROLL(decode); \ + stbir__simdf_load( cs, hc ); \ + stbir__simdf_0123to0000( c, cs ); \ + stbir__simdf_mult_mem( tot, c, decode ); \ + stbir__simdf_0123to1111( c, cs ); \ + stbir__simdf_madd_mem( tot, tot, c, decode+4 ); \ + stbir__simdf_0123to2222( c, cs ); \ + stbir__simdf_madd_mem( tot, tot, c, decode+8 ); + +#define stbir__store_output_tiny() \ + stbir__simdf_store( output, tot ); \ + horizontal_coefficients += coefficient_width; \ + ++horizontal_contributors; \ + output += 4; + +#ifdef STBIR_SIMD8 + +#define stbir__4_coeff_start() \ + stbir__simdf8 tot0,c,cs; stbir__simdf t; \ + STBIR_SIMD_NO_UNROLL(decode); \ + stbir__simdf8_load4b( cs, hc ); \ + stbir__simdf8_0123to00001111( c, cs ); \ + stbir__simdf8_mult_mem( tot0, c, decode ); \ + stbir__simdf8_0123to22223333( c, cs ); \ + stbir__simdf8_madd_mem( tot0, tot0, c, decode+8 ); + +#define stbir__4_coeff_continue_from_4( ofs ) \ + STBIR_SIMD_NO_UNROLL(decode); \ + stbir__simdf8_load4b( cs, hc + (ofs) ); \ + stbir__simdf8_0123to00001111( c, cs ); \ + stbir__simdf8_madd_mem( tot0, tot0, c, decode+(ofs)*4 ); \ + stbir__simdf8_0123to22223333( c, cs ); \ + stbir__simdf8_madd_mem( tot0, tot0, c, decode+(ofs)*4+8 ); + +#define stbir__1_coeff_remnant( ofs ) \ + STBIR_SIMD_NO_UNROLL(decode); \ + stbir__simdf_load1rep4( t, hc + (ofs) ); \ + stbir__simdf8_madd_mem4( tot0, tot0, t, decode+(ofs)*4 ); + +#define stbir__2_coeff_remnant( ofs ) \ + STBIR_SIMD_NO_UNROLL(decode); \ + stbir__simdf8_load4b( cs, hc + (ofs) - 2 ); \ + stbir__simdf8_0123to22223333( c, cs ); \ + stbir__simdf8_madd_mem( tot0, tot0, c, decode+(ofs)*4 ); + + #define stbir__3_coeff_remnant( ofs ) \ + STBIR_SIMD_NO_UNROLL(decode); \ + stbir__simdf8_load4b( cs, hc + (ofs) ); \ + stbir__simdf8_0123to00001111( c, cs ); \ + stbir__simdf8_madd_mem( tot0, tot0, c, decode+(ofs)*4 ); \ + stbir__simdf8_0123to2222( t, cs ); \ + stbir__simdf8_madd_mem4( tot0, tot0, t, decode+(ofs)*4+8 ); + +#define stbir__store_output() \ + stbir__simdf8_add4halves( t, stbir__if_simdf8_cast_to_simdf4(tot0), tot0 ); \ + stbir__simdf_store( output, t ); \ + horizontal_coefficients += coefficient_width; \ + ++horizontal_contributors; \ + output += 4; + +#else + +#define stbir__4_coeff_start() \ + stbir__simdf tot0,tot1,c,cs; \ + STBIR_SIMD_NO_UNROLL(decode); \ + stbir__simdf_load( cs, hc ); \ + stbir__simdf_0123to0000( c, cs ); \ + stbir__simdf_mult_mem( tot0, c, decode ); \ + stbir__simdf_0123to1111( c, cs ); \ + stbir__simdf_mult_mem( tot1, c, decode+4 ); \ + stbir__simdf_0123to2222( c, cs ); \ + stbir__simdf_madd_mem( tot0, tot0, c, decode+8 ); \ + stbir__simdf_0123to3333( c, cs ); \ + stbir__simdf_madd_mem( tot1, tot1, c, decode+12 ); + +#define stbir__4_coeff_continue_from_4( ofs ) \ + STBIR_SIMD_NO_UNROLL(decode); \ + stbir__simdf_load( cs, hc + (ofs) ); \ + stbir__simdf_0123to0000( c, cs ); \ + stbir__simdf_madd_mem( tot0, tot0, c, decode+(ofs)*4 ); \ + stbir__simdf_0123to1111( c, cs ); \ + stbir__simdf_madd_mem( tot1, tot1, c, decode+(ofs)*4+4 ); \ + stbir__simdf_0123to2222( c, cs ); \ + stbir__simdf_madd_mem( tot0, tot0, c, decode+(ofs)*4+8 ); \ + stbir__simdf_0123to3333( c, cs ); \ + stbir__simdf_madd_mem( tot1, tot1, c, decode+(ofs)*4+12 ); + +#define stbir__1_coeff_remnant( ofs ) \ + STBIR_SIMD_NO_UNROLL(decode); \ + stbir__simdf_load1( c, hc + (ofs) ); \ + stbir__simdf_0123to0000( c, c ); \ + stbir__simdf_madd_mem( tot0, tot0, c, decode+(ofs)*4 ); + +#define stbir__2_coeff_remnant( ofs ) \ + STBIR_SIMD_NO_UNROLL(decode); \ + stbir__simdf_load2( cs, hc + (ofs) ); \ + stbir__simdf_0123to0000( c, cs ); \ + stbir__simdf_madd_mem( tot0, tot0, c, decode+(ofs)*4 ); \ + stbir__simdf_0123to1111( c, cs ); \ + stbir__simdf_madd_mem( tot1, tot1, c, decode+(ofs)*4+4 ); + +#define stbir__3_coeff_remnant( ofs ) \ + STBIR_SIMD_NO_UNROLL(decode); \ + stbir__simdf_load( cs, hc + (ofs) ); \ + stbir__simdf_0123to0000( c, cs ); \ + stbir__simdf_madd_mem( tot0, tot0, c, decode+(ofs)*4 ); \ + stbir__simdf_0123to1111( c, cs ); \ + stbir__simdf_madd_mem( tot1, tot1, c, decode+(ofs)*4+4 ); \ + stbir__simdf_0123to2222( c, cs ); \ + stbir__simdf_madd_mem( tot0, tot0, c, decode+(ofs)*4+8 ); + +#define stbir__store_output() \ + stbir__simdf_add( tot0, tot0, tot1 ); \ + stbir__simdf_store( output, tot0 ); \ + horizontal_coefficients += coefficient_width; \ + ++horizontal_contributors; \ + output += 4; + +#endif + +#else + +#define stbir__1_coeff_only() \ + float p0,p1,p2,p3,c; \ + STBIR_SIMD_NO_UNROLL(decode); \ + c = hc[0]; \ + p0 = decode[0] * c; \ + p1 = decode[1] * c; \ + p2 = decode[2] * c; \ + p3 = decode[3] * c; + +#define stbir__2_coeff_only() \ + float p0,p1,p2,p3,c; \ + STBIR_SIMD_NO_UNROLL(decode); \ + c = hc[0]; \ + p0 = decode[0] * c; \ + p1 = decode[1] * c; \ + p2 = decode[2] * c; \ + p3 = decode[3] * c; \ + c = hc[1]; \ + p0 += decode[4] * c; \ + p1 += decode[5] * c; \ + p2 += decode[6] * c; \ + p3 += decode[7] * c; + +#define stbir__3_coeff_only() \ + float p0,p1,p2,p3,c; \ + STBIR_SIMD_NO_UNROLL(decode); \ + c = hc[0]; \ + p0 = decode[0] * c; \ + p1 = decode[1] * c; \ + p2 = decode[2] * c; \ + p3 = decode[3] * c; \ + c = hc[1]; \ + p0 += decode[4] * c; \ + p1 += decode[5] * c; \ + p2 += decode[6] * c; \ + p3 += decode[7] * c; \ + c = hc[2]; \ + p0 += decode[8] * c; \ + p1 += decode[9] * c; \ + p2 += decode[10] * c; \ + p3 += decode[11] * c; + +#define stbir__store_output_tiny() \ + output[0] = p0; \ + output[1] = p1; \ + output[2] = p2; \ + output[3] = p3; \ + horizontal_coefficients += coefficient_width; \ + ++horizontal_contributors; \ + output += 4; + +#define stbir__4_coeff_start() \ + float x0,x1,x2,x3,y0,y1,y2,y3,c; \ + STBIR_SIMD_NO_UNROLL(decode); \ + c = hc[0]; \ + x0 = decode[0] * c; \ + x1 = decode[1] * c; \ + x2 = decode[2] * c; \ + x3 = decode[3] * c; \ + c = hc[1]; \ + y0 = decode[4] * c; \ + y1 = decode[5] * c; \ + y2 = decode[6] * c; \ + y3 = decode[7] * c; \ + c = hc[2]; \ + x0 += decode[8] * c; \ + x1 += decode[9] * c; \ + x2 += decode[10] * c; \ + x3 += decode[11] * c; \ + c = hc[3]; \ + y0 += decode[12] * c; \ + y1 += decode[13] * c; \ + y2 += decode[14] * c; \ + y3 += decode[15] * c; + +#define stbir__4_coeff_continue_from_4( ofs ) \ + STBIR_SIMD_NO_UNROLL(decode); \ + c = hc[0+(ofs)]; \ + x0 += decode[0+(ofs)*4] * c; \ + x1 += decode[1+(ofs)*4] * c; \ + x2 += decode[2+(ofs)*4] * c; \ + x3 += decode[3+(ofs)*4] * c; \ + c = hc[1+(ofs)]; \ + y0 += decode[4+(ofs)*4] * c; \ + y1 += decode[5+(ofs)*4] * c; \ + y2 += decode[6+(ofs)*4] * c; \ + y3 += decode[7+(ofs)*4] * c; \ + c = hc[2+(ofs)]; \ + x0 += decode[8+(ofs)*4] * c; \ + x1 += decode[9+(ofs)*4] * c; \ + x2 += decode[10+(ofs)*4] * c; \ + x3 += decode[11+(ofs)*4] * c; \ + c = hc[3+(ofs)]; \ + y0 += decode[12+(ofs)*4] * c; \ + y1 += decode[13+(ofs)*4] * c; \ + y2 += decode[14+(ofs)*4] * c; \ + y3 += decode[15+(ofs)*4] * c; + +#define stbir__1_coeff_remnant( ofs ) \ + STBIR_SIMD_NO_UNROLL(decode); \ + c = hc[0+(ofs)]; \ + x0 += decode[0+(ofs)*4] * c; \ + x1 += decode[1+(ofs)*4] * c; \ + x2 += decode[2+(ofs)*4] * c; \ + x3 += decode[3+(ofs)*4] * c; + +#define stbir__2_coeff_remnant( ofs ) \ + STBIR_SIMD_NO_UNROLL(decode); \ + c = hc[0+(ofs)]; \ + x0 += decode[0+(ofs)*4] * c; \ + x1 += decode[1+(ofs)*4] * c; \ + x2 += decode[2+(ofs)*4] * c; \ + x3 += decode[3+(ofs)*4] * c; \ + c = hc[1+(ofs)]; \ + y0 += decode[4+(ofs)*4] * c; \ + y1 += decode[5+(ofs)*4] * c; \ + y2 += decode[6+(ofs)*4] * c; \ + y3 += decode[7+(ofs)*4] * c; + +#define stbir__3_coeff_remnant( ofs ) \ + STBIR_SIMD_NO_UNROLL(decode); \ + c = hc[0+(ofs)]; \ + x0 += decode[0+(ofs)*4] * c; \ + x1 += decode[1+(ofs)*4] * c; \ + x2 += decode[2+(ofs)*4] * c; \ + x3 += decode[3+(ofs)*4] * c; \ + c = hc[1+(ofs)]; \ + y0 += decode[4+(ofs)*4] * c; \ + y1 += decode[5+(ofs)*4] * c; \ + y2 += decode[6+(ofs)*4] * c; \ + y3 += decode[7+(ofs)*4] * c; \ + c = hc[2+(ofs)]; \ + x0 += decode[8+(ofs)*4] * c; \ + x1 += decode[9+(ofs)*4] * c; \ + x2 += decode[10+(ofs)*4] * c; \ + x3 += decode[11+(ofs)*4] * c; + +#define stbir__store_output() \ + output[0] = x0 + y0; \ + output[1] = x1 + y1; \ + output[2] = x2 + y2; \ + output[3] = x3 + y3; \ + horizontal_coefficients += coefficient_width; \ + ++horizontal_contributors; \ + output += 4; + +#endif + +#define STBIR__horizontal_channels 4 +#define STB_IMAGE_RESIZE_DO_HORIZONTALS +#include STBIR__HEADER_FILENAME + + + +//================= +// Do 7 channel horizontal routines + +#ifdef STBIR_SIMD + +#define stbir__1_coeff_only() \ + stbir__simdf tot0,tot1,c; \ + STBIR_SIMD_NO_UNROLL(decode); \ + stbir__simdf_load1( c, hc ); \ + stbir__simdf_0123to0000( c, c ); \ + stbir__simdf_mult_mem( tot0, c, decode ); \ + stbir__simdf_mult_mem( tot1, c, decode+3 ); + +#define stbir__2_coeff_only() \ + stbir__simdf tot0,tot1,c,cs; \ + STBIR_SIMD_NO_UNROLL(decode); \ + stbir__simdf_load2( cs, hc ); \ + stbir__simdf_0123to0000( c, cs ); \ + stbir__simdf_mult_mem( tot0, c, decode ); \ + stbir__simdf_mult_mem( tot1, c, decode+3 ); \ + stbir__simdf_0123to1111( c, cs ); \ + stbir__simdf_madd_mem( tot0, tot0, c, decode+7 ); \ + stbir__simdf_madd_mem( tot1, tot1, c,decode+10 ); + +#define stbir__3_coeff_only() \ + stbir__simdf tot0,tot1,c,cs; \ + STBIR_SIMD_NO_UNROLL(decode); \ + stbir__simdf_load( cs, hc ); \ + stbir__simdf_0123to0000( c, cs ); \ + stbir__simdf_mult_mem( tot0, c, decode ); \ + stbir__simdf_mult_mem( tot1, c, decode+3 ); \ + stbir__simdf_0123to1111( c, cs ); \ + stbir__simdf_madd_mem( tot0, tot0, c, decode+7 ); \ + stbir__simdf_madd_mem( tot1, tot1, c, decode+10 ); \ + stbir__simdf_0123to2222( c, cs ); \ + stbir__simdf_madd_mem( tot0, tot0, c, decode+14 ); \ + stbir__simdf_madd_mem( tot1, tot1, c, decode+17 ); + +#define stbir__store_output_tiny() \ + stbir__simdf_store( output+3, tot1 ); \ + stbir__simdf_store( output, tot0 ); \ + horizontal_coefficients += coefficient_width; \ + ++horizontal_contributors; \ + output += 7; + +#ifdef STBIR_SIMD8 + +#define stbir__4_coeff_start() \ + stbir__simdf8 tot0,tot1,c,cs; \ + STBIR_SIMD_NO_UNROLL(decode); \ + stbir__simdf8_load4b( cs, hc ); \ + stbir__simdf8_0123to00000000( c, cs ); \ + stbir__simdf8_mult_mem( tot0, c, decode ); \ + stbir__simdf8_0123to11111111( c, cs ); \ + stbir__simdf8_mult_mem( tot1, c, decode+7 ); \ + stbir__simdf8_0123to22222222( c, cs ); \ + stbir__simdf8_madd_mem( tot0, tot0, c, decode+14 ); \ + stbir__simdf8_0123to33333333( c, cs ); \ + stbir__simdf8_madd_mem( tot1, tot1, c, decode+21 ); + +#define stbir__4_coeff_continue_from_4( ofs ) \ + STBIR_SIMD_NO_UNROLL(decode); \ + stbir__simdf8_load4b( cs, hc + (ofs) ); \ + stbir__simdf8_0123to00000000( c, cs ); \ + stbir__simdf8_madd_mem( tot0, tot0, c, decode+(ofs)*7 ); \ + stbir__simdf8_0123to11111111( c, cs ); \ + stbir__simdf8_madd_mem( tot1, tot1, c, decode+(ofs)*7+7 ); \ + stbir__simdf8_0123to22222222( c, cs ); \ + stbir__simdf8_madd_mem( tot0, tot0, c, decode+(ofs)*7+14 ); \ + stbir__simdf8_0123to33333333( c, cs ); \ + stbir__simdf8_madd_mem( tot1, tot1, c, decode+(ofs)*7+21 ); + +#define stbir__1_coeff_remnant( ofs ) \ + STBIR_SIMD_NO_UNROLL(decode); \ + stbir__simdf8_load1b( c, hc + (ofs) ); \ + stbir__simdf8_madd_mem( tot0, tot0, c, decode+(ofs)*7 ); + +#define stbir__2_coeff_remnant( ofs ) \ + STBIR_SIMD_NO_UNROLL(decode); \ + stbir__simdf8_load1b( c, hc + (ofs) ); \ + stbir__simdf8_madd_mem( tot0, tot0, c, decode+(ofs)*7 ); \ + stbir__simdf8_load1b( c, hc + (ofs)+1 ); \ + stbir__simdf8_madd_mem( tot1, tot1, c, decode+(ofs)*7+7 ); + +#define stbir__3_coeff_remnant( ofs ) \ + STBIR_SIMD_NO_UNROLL(decode); \ + stbir__simdf8_load4b( cs, hc + (ofs) ); \ + stbir__simdf8_0123to00000000( c, cs ); \ + stbir__simdf8_madd_mem( tot0, tot0, c, decode+(ofs)*7 ); \ + stbir__simdf8_0123to11111111( c, cs ); \ + stbir__simdf8_madd_mem( tot1, tot1, c, decode+(ofs)*7+7 ); \ + stbir__simdf8_0123to22222222( c, cs ); \ + stbir__simdf8_madd_mem( tot0, tot0, c, decode+(ofs)*7+14 ); + +#define stbir__store_output() \ + stbir__simdf8_add( tot0, tot0, tot1 ); \ + horizontal_coefficients += coefficient_width; \ + ++horizontal_contributors; \ + output += 7; \ + if ( output < output_end ) \ + { \ + stbir__simdf8_store( output-7, tot0 ); \ + continue; \ + } \ + stbir__simdf_store( output-7+3, stbir__simdf_swiz(stbir__simdf8_gettop4(tot0),0,0,1,2) ); \ + stbir__simdf_store( output-7, stbir__if_simdf8_cast_to_simdf4(tot0) ); \ + break; + +#else + +#define stbir__4_coeff_start() \ + stbir__simdf tot0,tot1,tot2,tot3,c,cs; \ + STBIR_SIMD_NO_UNROLL(decode); \ + stbir__simdf_load( cs, hc ); \ + stbir__simdf_0123to0000( c, cs ); \ + stbir__simdf_mult_mem( tot0, c, decode ); \ + stbir__simdf_mult_mem( tot1, c, decode+3 ); \ + stbir__simdf_0123to1111( c, cs ); \ + stbir__simdf_mult_mem( tot2, c, decode+7 ); \ + stbir__simdf_mult_mem( tot3, c, decode+10 ); \ + stbir__simdf_0123to2222( c, cs ); \ + stbir__simdf_madd_mem( tot0, tot0, c, decode+14 ); \ + stbir__simdf_madd_mem( tot1, tot1, c, decode+17 ); \ + stbir__simdf_0123to3333( c, cs ); \ + stbir__simdf_madd_mem( tot2, tot2, c, decode+21 ); \ + stbir__simdf_madd_mem( tot3, tot3, c, decode+24 ); + +#define stbir__4_coeff_continue_from_4( ofs ) \ + STBIR_SIMD_NO_UNROLL(decode); \ + stbir__simdf_load( cs, hc + (ofs) ); \ + stbir__simdf_0123to0000( c, cs ); \ + stbir__simdf_madd_mem( tot0, tot0, c, decode+(ofs)*7 ); \ + stbir__simdf_madd_mem( tot1, tot1, c, decode+(ofs)*7+3 ); \ + stbir__simdf_0123to1111( c, cs ); \ + stbir__simdf_madd_mem( tot2, tot2, c, decode+(ofs)*7+7 ); \ + stbir__simdf_madd_mem( tot3, tot3, c, decode+(ofs)*7+10 ); \ + stbir__simdf_0123to2222( c, cs ); \ + stbir__simdf_madd_mem( tot0, tot0, c, decode+(ofs)*7+14 ); \ + stbir__simdf_madd_mem( tot1, tot1, c, decode+(ofs)*7+17 ); \ + stbir__simdf_0123to3333( c, cs ); \ + stbir__simdf_madd_mem( tot2, tot2, c, decode+(ofs)*7+21 ); \ + stbir__simdf_madd_mem( tot3, tot3, c, decode+(ofs)*7+24 ); + +#define stbir__1_coeff_remnant( ofs ) \ + STBIR_SIMD_NO_UNROLL(decode); \ + stbir__simdf_load1( c, hc + (ofs) ); \ + stbir__simdf_0123to0000( c, c ); \ + stbir__simdf_madd_mem( tot0, tot0, c, decode+(ofs)*7 ); \ + stbir__simdf_madd_mem( tot1, tot1, c, decode+(ofs)*7+3 ); \ + +#define stbir__2_coeff_remnant( ofs ) \ + STBIR_SIMD_NO_UNROLL(decode); \ + stbir__simdf_load2( cs, hc + (ofs) ); \ + stbir__simdf_0123to0000( c, cs ); \ + stbir__simdf_madd_mem( tot0, tot0, c, decode+(ofs)*7 ); \ + stbir__simdf_madd_mem( tot1, tot1, c, decode+(ofs)*7+3 ); \ + stbir__simdf_0123to1111( c, cs ); \ + stbir__simdf_madd_mem( tot2, tot2, c, decode+(ofs)*7+7 ); \ + stbir__simdf_madd_mem( tot3, tot3, c, decode+(ofs)*7+10 ); + +#define stbir__3_coeff_remnant( ofs ) \ + STBIR_SIMD_NO_UNROLL(decode); \ + stbir__simdf_load( cs, hc + (ofs) ); \ + stbir__simdf_0123to0000( c, cs ); \ + stbir__simdf_madd_mem( tot0, tot0, c, decode+(ofs)*7 ); \ + stbir__simdf_madd_mem( tot1, tot1, c, decode+(ofs)*7+3 ); \ + stbir__simdf_0123to1111( c, cs ); \ + stbir__simdf_madd_mem( tot2, tot2, c, decode+(ofs)*7+7 ); \ + stbir__simdf_madd_mem( tot3, tot3, c, decode+(ofs)*7+10 ); \ + stbir__simdf_0123to2222( c, cs ); \ + stbir__simdf_madd_mem( tot0, tot0, c, decode+(ofs)*7+14 ); \ + stbir__simdf_madd_mem( tot1, tot1, c, decode+(ofs)*7+17 ); + +#define stbir__store_output() \ + stbir__simdf_add( tot0, tot0, tot2 ); \ + stbir__simdf_add( tot1, tot1, tot3 ); \ + stbir__simdf_store( output+3, tot1 ); \ + stbir__simdf_store( output, tot0 ); \ + horizontal_coefficients += coefficient_width; \ + ++horizontal_contributors; \ + output += 7; + +#endif + +#else + +#define stbir__1_coeff_only() \ + float tot0, tot1, tot2, tot3, tot4, tot5, tot6, c; \ + c = hc[0]; \ + tot0 = decode[0]*c; \ + tot1 = decode[1]*c; \ + tot2 = decode[2]*c; \ + tot3 = decode[3]*c; \ + tot4 = decode[4]*c; \ + tot5 = decode[5]*c; \ + tot6 = decode[6]*c; + +#define stbir__2_coeff_only() \ + float tot0, tot1, tot2, tot3, tot4, tot5, tot6, c; \ + c = hc[0]; \ + tot0 = decode[0]*c; \ + tot1 = decode[1]*c; \ + tot2 = decode[2]*c; \ + tot3 = decode[3]*c; \ + tot4 = decode[4]*c; \ + tot5 = decode[5]*c; \ + tot6 = decode[6]*c; \ + c = hc[1]; \ + tot0 += decode[7]*c; \ + tot1 += decode[8]*c; \ + tot2 += decode[9]*c; \ + tot3 += decode[10]*c; \ + tot4 += decode[11]*c; \ + tot5 += decode[12]*c; \ + tot6 += decode[13]*c; \ + +#define stbir__3_coeff_only() \ + float tot0, tot1, tot2, tot3, tot4, tot5, tot6, c; \ + c = hc[0]; \ + tot0 = decode[0]*c; \ + tot1 = decode[1]*c; \ + tot2 = decode[2]*c; \ + tot3 = decode[3]*c; \ + tot4 = decode[4]*c; \ + tot5 = decode[5]*c; \ + tot6 = decode[6]*c; \ + c = hc[1]; \ + tot0 += decode[7]*c; \ + tot1 += decode[8]*c; \ + tot2 += decode[9]*c; \ + tot3 += decode[10]*c; \ + tot4 += decode[11]*c; \ + tot5 += decode[12]*c; \ + tot6 += decode[13]*c; \ + c = hc[2]; \ + tot0 += decode[14]*c; \ + tot1 += decode[15]*c; \ + tot2 += decode[16]*c; \ + tot3 += decode[17]*c; \ + tot4 += decode[18]*c; \ + tot5 += decode[19]*c; \ + tot6 += decode[20]*c; \ + +#define stbir__store_output_tiny() \ + output[0] = tot0; \ + output[1] = tot1; \ + output[2] = tot2; \ + output[3] = tot3; \ + output[4] = tot4; \ + output[5] = tot5; \ + output[6] = tot6; \ + horizontal_coefficients += coefficient_width; \ + ++horizontal_contributors; \ + output += 7; + +#define stbir__4_coeff_start() \ + float x0,x1,x2,x3,x4,x5,x6,y0,y1,y2,y3,y4,y5,y6,c; \ + STBIR_SIMD_NO_UNROLL(decode); \ + c = hc[0]; \ + x0 = decode[0] * c; \ + x1 = decode[1] * c; \ + x2 = decode[2] * c; \ + x3 = decode[3] * c; \ + x4 = decode[4] * c; \ + x5 = decode[5] * c; \ + x6 = decode[6] * c; \ + c = hc[1]; \ + y0 = decode[7] * c; \ + y1 = decode[8] * c; \ + y2 = decode[9] * c; \ + y3 = decode[10] * c; \ + y4 = decode[11] * c; \ + y5 = decode[12] * c; \ + y6 = decode[13] * c; \ + c = hc[2]; \ + x0 += decode[14] * c; \ + x1 += decode[15] * c; \ + x2 += decode[16] * c; \ + x3 += decode[17] * c; \ + x4 += decode[18] * c; \ + x5 += decode[19] * c; \ + x6 += decode[20] * c; \ + c = hc[3]; \ + y0 += decode[21] * c; \ + y1 += decode[22] * c; \ + y2 += decode[23] * c; \ + y3 += decode[24] * c; \ + y4 += decode[25] * c; \ + y5 += decode[26] * c; \ + y6 += decode[27] * c; + +#define stbir__4_coeff_continue_from_4( ofs ) \ + STBIR_SIMD_NO_UNROLL(decode); \ + c = hc[0+(ofs)]; \ + x0 += decode[0+(ofs)*7] * c; \ + x1 += decode[1+(ofs)*7] * c; \ + x2 += decode[2+(ofs)*7] * c; \ + x3 += decode[3+(ofs)*7] * c; \ + x4 += decode[4+(ofs)*7] * c; \ + x5 += decode[5+(ofs)*7] * c; \ + x6 += decode[6+(ofs)*7] * c; \ + c = hc[1+(ofs)]; \ + y0 += decode[7+(ofs)*7] * c; \ + y1 += decode[8+(ofs)*7] * c; \ + y2 += decode[9+(ofs)*7] * c; \ + y3 += decode[10+(ofs)*7] * c; \ + y4 += decode[11+(ofs)*7] * c; \ + y5 += decode[12+(ofs)*7] * c; \ + y6 += decode[13+(ofs)*7] * c; \ + c = hc[2+(ofs)]; \ + x0 += decode[14+(ofs)*7] * c; \ + x1 += decode[15+(ofs)*7] * c; \ + x2 += decode[16+(ofs)*7] * c; \ + x3 += decode[17+(ofs)*7] * c; \ + x4 += decode[18+(ofs)*7] * c; \ + x5 += decode[19+(ofs)*7] * c; \ + x6 += decode[20+(ofs)*7] * c; \ + c = hc[3+(ofs)]; \ + y0 += decode[21+(ofs)*7] * c; \ + y1 += decode[22+(ofs)*7] * c; \ + y2 += decode[23+(ofs)*7] * c; \ + y3 += decode[24+(ofs)*7] * c; \ + y4 += decode[25+(ofs)*7] * c; \ + y5 += decode[26+(ofs)*7] * c; \ + y6 += decode[27+(ofs)*7] * c; + +#define stbir__1_coeff_remnant( ofs ) \ + STBIR_SIMD_NO_UNROLL(decode); \ + c = hc[0+(ofs)]; \ + x0 += decode[0+(ofs)*7] * c; \ + x1 += decode[1+(ofs)*7] * c; \ + x2 += decode[2+(ofs)*7] * c; \ + x3 += decode[3+(ofs)*7] * c; \ + x4 += decode[4+(ofs)*7] * c; \ + x5 += decode[5+(ofs)*7] * c; \ + x6 += decode[6+(ofs)*7] * c; \ + +#define stbir__2_coeff_remnant( ofs ) \ + STBIR_SIMD_NO_UNROLL(decode); \ + c = hc[0+(ofs)]; \ + x0 += decode[0+(ofs)*7] * c; \ + x1 += decode[1+(ofs)*7] * c; \ + x2 += decode[2+(ofs)*7] * c; \ + x3 += decode[3+(ofs)*7] * c; \ + x4 += decode[4+(ofs)*7] * c; \ + x5 += decode[5+(ofs)*7] * c; \ + x6 += decode[6+(ofs)*7] * c; \ + c = hc[1+(ofs)]; \ + y0 += decode[7+(ofs)*7] * c; \ + y1 += decode[8+(ofs)*7] * c; \ + y2 += decode[9+(ofs)*7] * c; \ + y3 += decode[10+(ofs)*7] * c; \ + y4 += decode[11+(ofs)*7] * c; \ + y5 += decode[12+(ofs)*7] * c; \ + y6 += decode[13+(ofs)*7] * c; \ + +#define stbir__3_coeff_remnant( ofs ) \ + STBIR_SIMD_NO_UNROLL(decode); \ + c = hc[0+(ofs)]; \ + x0 += decode[0+(ofs)*7] * c; \ + x1 += decode[1+(ofs)*7] * c; \ + x2 += decode[2+(ofs)*7] * c; \ + x3 += decode[3+(ofs)*7] * c; \ + x4 += decode[4+(ofs)*7] * c; \ + x5 += decode[5+(ofs)*7] * c; \ + x6 += decode[6+(ofs)*7] * c; \ + c = hc[1+(ofs)]; \ + y0 += decode[7+(ofs)*7] * c; \ + y1 += decode[8+(ofs)*7] * c; \ + y2 += decode[9+(ofs)*7] * c; \ + y3 += decode[10+(ofs)*7] * c; \ + y4 += decode[11+(ofs)*7] * c; \ + y5 += decode[12+(ofs)*7] * c; \ + y6 += decode[13+(ofs)*7] * c; \ + c = hc[2+(ofs)]; \ + x0 += decode[14+(ofs)*7] * c; \ + x1 += decode[15+(ofs)*7] * c; \ + x2 += decode[16+(ofs)*7] * c; \ + x3 += decode[17+(ofs)*7] * c; \ + x4 += decode[18+(ofs)*7] * c; \ + x5 += decode[19+(ofs)*7] * c; \ + x6 += decode[20+(ofs)*7] * c; \ + +#define stbir__store_output() \ + output[0] = x0 + y0; \ + output[1] = x1 + y1; \ + output[2] = x2 + y2; \ + output[3] = x3 + y3; \ + output[4] = x4 + y4; \ + output[5] = x5 + y5; \ + output[6] = x6 + y6; \ + horizontal_coefficients += coefficient_width; \ + ++horizontal_contributors; \ + output += 7; + +#endif + +#define STBIR__horizontal_channels 7 +#define STB_IMAGE_RESIZE_DO_HORIZONTALS +#include STBIR__HEADER_FILENAME + + +// include all of the vertical resamplers (both scatter and gather versions) + +#define STBIR__vertical_channels 1 +#define STB_IMAGE_RESIZE_DO_VERTICALS +#include STBIR__HEADER_FILENAME + +#define STBIR__vertical_channels 1 +#define STB_IMAGE_RESIZE_DO_VERTICALS +#define STB_IMAGE_RESIZE_VERTICAL_CONTINUE +#include STBIR__HEADER_FILENAME + +#define STBIR__vertical_channels 2 +#define STB_IMAGE_RESIZE_DO_VERTICALS +#include STBIR__HEADER_FILENAME + +#define STBIR__vertical_channels 2 +#define STB_IMAGE_RESIZE_DO_VERTICALS +#define STB_IMAGE_RESIZE_VERTICAL_CONTINUE +#include STBIR__HEADER_FILENAME + +#define STBIR__vertical_channels 3 +#define STB_IMAGE_RESIZE_DO_VERTICALS +#include STBIR__HEADER_FILENAME + +#define STBIR__vertical_channels 3 +#define STB_IMAGE_RESIZE_DO_VERTICALS +#define STB_IMAGE_RESIZE_VERTICAL_CONTINUE +#include STBIR__HEADER_FILENAME + +#define STBIR__vertical_channels 4 +#define STB_IMAGE_RESIZE_DO_VERTICALS +#include STBIR__HEADER_FILENAME + +#define STBIR__vertical_channels 4 +#define STB_IMAGE_RESIZE_DO_VERTICALS +#define STB_IMAGE_RESIZE_VERTICAL_CONTINUE +#include STBIR__HEADER_FILENAME + +#define STBIR__vertical_channels 5 +#define STB_IMAGE_RESIZE_DO_VERTICALS +#include STBIR__HEADER_FILENAME + +#define STBIR__vertical_channels 5 +#define STB_IMAGE_RESIZE_DO_VERTICALS +#define STB_IMAGE_RESIZE_VERTICAL_CONTINUE +#include STBIR__HEADER_FILENAME + +#define STBIR__vertical_channels 6 +#define STB_IMAGE_RESIZE_DO_VERTICALS +#include STBIR__HEADER_FILENAME + +#define STBIR__vertical_channels 6 +#define STB_IMAGE_RESIZE_DO_VERTICALS +#define STB_IMAGE_RESIZE_VERTICAL_CONTINUE +#include STBIR__HEADER_FILENAME + +#define STBIR__vertical_channels 7 +#define STB_IMAGE_RESIZE_DO_VERTICALS +#include STBIR__HEADER_FILENAME + +#define STBIR__vertical_channels 7 +#define STB_IMAGE_RESIZE_DO_VERTICALS +#define STB_IMAGE_RESIZE_VERTICAL_CONTINUE +#include STBIR__HEADER_FILENAME + +#define STBIR__vertical_channels 8 +#define STB_IMAGE_RESIZE_DO_VERTICALS +#include STBIR__HEADER_FILENAME + +#define STBIR__vertical_channels 8 +#define STB_IMAGE_RESIZE_DO_VERTICALS +#define STB_IMAGE_RESIZE_VERTICAL_CONTINUE +#include STBIR__HEADER_FILENAME + +typedef void STBIR_VERTICAL_GATHERFUNC( float * output, float const * coeffs, float const ** inputs, float const * input0_end ); + +static STBIR_VERTICAL_GATHERFUNC * stbir__vertical_gathers[ 8 ] = +{ + stbir__vertical_gather_with_1_coeffs,stbir__vertical_gather_with_2_coeffs,stbir__vertical_gather_with_3_coeffs,stbir__vertical_gather_with_4_coeffs,stbir__vertical_gather_with_5_coeffs,stbir__vertical_gather_with_6_coeffs,stbir__vertical_gather_with_7_coeffs,stbir__vertical_gather_with_8_coeffs +}; + +static STBIR_VERTICAL_GATHERFUNC * stbir__vertical_gathers_continues[ 8 ] = +{ + stbir__vertical_gather_with_1_coeffs_cont,stbir__vertical_gather_with_2_coeffs_cont,stbir__vertical_gather_with_3_coeffs_cont,stbir__vertical_gather_with_4_coeffs_cont,stbir__vertical_gather_with_5_coeffs_cont,stbir__vertical_gather_with_6_coeffs_cont,stbir__vertical_gather_with_7_coeffs_cont,stbir__vertical_gather_with_8_coeffs_cont +}; + +typedef void STBIR_VERTICAL_SCATTERFUNC( float ** outputs, float const * coeffs, float const * input, float const * input_end ); + +static STBIR_VERTICAL_SCATTERFUNC * stbir__vertical_scatter_sets[ 8 ] = +{ + stbir__vertical_scatter_with_1_coeffs,stbir__vertical_scatter_with_2_coeffs,stbir__vertical_scatter_with_3_coeffs,stbir__vertical_scatter_with_4_coeffs,stbir__vertical_scatter_with_5_coeffs,stbir__vertical_scatter_with_6_coeffs,stbir__vertical_scatter_with_7_coeffs,stbir__vertical_scatter_with_8_coeffs +}; + +static STBIR_VERTICAL_SCATTERFUNC * stbir__vertical_scatter_blends[ 8 ] = +{ + stbir__vertical_scatter_with_1_coeffs_cont,stbir__vertical_scatter_with_2_coeffs_cont,stbir__vertical_scatter_with_3_coeffs_cont,stbir__vertical_scatter_with_4_coeffs_cont,stbir__vertical_scatter_with_5_coeffs_cont,stbir__vertical_scatter_with_6_coeffs_cont,stbir__vertical_scatter_with_7_coeffs_cont,stbir__vertical_scatter_with_8_coeffs_cont +}; + + +static void stbir__encode_scanline( stbir__info const * stbir_info, void *output_buffer_data, float * encode_buffer, int row STBIR_ONLY_PROFILE_GET_SPLIT_INFO ) +{ + int num_pixels = stbir_info->horizontal.scale_info.output_sub_size; + int channels = stbir_info->channels; + int width_times_channels = num_pixels * channels; + void * output_buffer; + + // un-alpha weight if we need to + if ( stbir_info->alpha_unweight ) + { + STBIR_PROFILE_START( unalpha ); + stbir_info->alpha_unweight( encode_buffer, width_times_channels ); + STBIR_PROFILE_END( unalpha ); + } + + // write directly into output by default + output_buffer = output_buffer_data; + + // if we have an output callback, we first convert the decode buffer in place (and then hand that to the callback) + if ( stbir_info->out_pixels_cb ) + output_buffer = encode_buffer; + + STBIR_PROFILE_START( encode ); + // convert into the output buffer + stbir_info->encode_pixels( output_buffer, width_times_channels, encode_buffer ); + STBIR_PROFILE_END( encode ); + + // if we have an output callback, call it to send the data + if ( stbir_info->out_pixels_cb ) + stbir_info->out_pixels_cb( output_buffer, num_pixels, row, stbir_info->user_data ); +} + + +// Get the ring buffer pointer for an index +static float* stbir__get_ring_buffer_entry(stbir__info const * stbir_info, stbir__per_split_info const * split_info, int index ) +{ + STBIR_ASSERT( index < stbir_info->ring_buffer_num_entries ); + + #ifdef STBIR__SEPARATE_ALLOCATIONS + return split_info->ring_buffers[ index ]; + #else + return (float*) ( ( (char*) split_info->ring_buffer ) + ( index * stbir_info->ring_buffer_length_bytes ) ); + #endif +} + +// Get the specified scan line from the ring buffer +static float* stbir__get_ring_buffer_scanline(stbir__info const * stbir_info, stbir__per_split_info const * split_info, int get_scanline) +{ + int ring_buffer_index = (split_info->ring_buffer_begin_index + (get_scanline - split_info->ring_buffer_first_scanline)) % stbir_info->ring_buffer_num_entries; + return stbir__get_ring_buffer_entry( stbir_info, split_info, ring_buffer_index ); +} + +static void stbir__resample_horizontal_gather(stbir__info const * stbir_info, float* output_buffer, float const * input_buffer STBIR_ONLY_PROFILE_GET_SPLIT_INFO ) +{ + float const * decode_buffer = input_buffer - ( stbir_info->scanline_extents.conservative.n0 * stbir_info->effective_channels ); + + STBIR_PROFILE_START( horizontal ); + if ( ( stbir_info->horizontal.filter_enum == STBIR_FILTER_POINT_SAMPLE ) && ( stbir_info->horizontal.scale_info.scale == 1.0f ) ) + STBIR_MEMCPY( output_buffer, input_buffer, stbir_info->horizontal.scale_info.output_sub_size * sizeof( float ) * stbir_info->effective_channels ); + else + stbir_info->horizontal_gather_channels( output_buffer, stbir_info->horizontal.scale_info.output_sub_size, decode_buffer, stbir_info->horizontal.contributors, stbir_info->horizontal.coefficients, stbir_info->horizontal.coefficient_width ); + STBIR_PROFILE_END( horizontal ); +} + +static void stbir__resample_vertical_gather(stbir__info const * stbir_info, stbir__per_split_info* split_info, int n, int contrib_n0, int contrib_n1, float const * vertical_coefficients ) +{ + float* encode_buffer = split_info->vertical_buffer; + float* decode_buffer = split_info->decode_buffer; + int vertical_first = stbir_info->vertical_first; + int width = (vertical_first) ? ( stbir_info->scanline_extents.conservative.n1-stbir_info->scanline_extents.conservative.n0+1 ) : stbir_info->horizontal.scale_info.output_sub_size; + int width_times_channels = stbir_info->effective_channels * width; + + STBIR_ASSERT( stbir_info->vertical.is_gather ); + + // loop over the contributing scanlines and scale into the buffer + STBIR_PROFILE_START( vertical ); + { + int k = 0, total = contrib_n1 - contrib_n0 + 1; + STBIR_ASSERT( total > 0 ); + do { + float const * inputs[8]; + int i, cnt = total; if ( cnt > 8 ) cnt = 8; + for( i = 0 ; i < cnt ; i++ ) + inputs[ i ] = stbir__get_ring_buffer_scanline(stbir_info, split_info, k+i+contrib_n0 ); + + // call the N scanlines at a time function (up to 8 scanlines of blending at once) + ((k==0)?stbir__vertical_gathers:stbir__vertical_gathers_continues)[cnt-1]( (vertical_first) ? decode_buffer : encode_buffer, vertical_coefficients + k, inputs, inputs[0] + width_times_channels ); + k += cnt; + total -= cnt; + } while ( total ); + } + STBIR_PROFILE_END( vertical ); + + if ( vertical_first ) + { + // Now resample the gathered vertical data in the horizontal axis into the encode buffer + decode_buffer[ width_times_channels ] = 0.0f; // clear two over for horizontals with a remnant of 3 + decode_buffer[ width_times_channels+1 ] = 0.0f; + stbir__resample_horizontal_gather(stbir_info, encode_buffer, decode_buffer STBIR_ONLY_PROFILE_SET_SPLIT_INFO ); + } + + stbir__encode_scanline( stbir_info, ( (char *) stbir_info->output_data ) + ((size_t)n * (size_t)stbir_info->output_stride_bytes), + encode_buffer, n STBIR_ONLY_PROFILE_SET_SPLIT_INFO ); +} + +static void stbir__decode_and_resample_for_vertical_gather_loop(stbir__info const * stbir_info, stbir__per_split_info* split_info, int n) +{ + int ring_buffer_index; + float* ring_buffer; + + // Decode the nth scanline from the source image into the decode buffer. + stbir__decode_scanline( stbir_info, n, split_info->decode_buffer STBIR_ONLY_PROFILE_SET_SPLIT_INFO ); + + // update new end scanline + split_info->ring_buffer_last_scanline = n; + + // get ring buffer + ring_buffer_index = (split_info->ring_buffer_begin_index + (split_info->ring_buffer_last_scanline - split_info->ring_buffer_first_scanline)) % stbir_info->ring_buffer_num_entries; + ring_buffer = stbir__get_ring_buffer_entry(stbir_info, split_info, ring_buffer_index); + + // Now resample it into the ring buffer. + stbir__resample_horizontal_gather( stbir_info, ring_buffer, split_info->decode_buffer STBIR_ONLY_PROFILE_SET_SPLIT_INFO ); + + // Now it's sitting in the ring buffer ready to be used as source for the vertical sampling. +} + +static void stbir__vertical_gather_loop( stbir__info const * stbir_info, stbir__per_split_info* split_info, int split_count ) +{ + int y, start_output_y, end_output_y; + stbir__contributors* vertical_contributors = stbir_info->vertical.contributors; + float const * vertical_coefficients = stbir_info->vertical.coefficients; + + STBIR_ASSERT( stbir_info->vertical.is_gather ); + + start_output_y = split_info->start_output_y; + end_output_y = split_info[split_count-1].end_output_y; + + vertical_contributors += start_output_y; + vertical_coefficients += start_output_y * stbir_info->vertical.coefficient_width; + + // initialize the ring buffer for gathering + split_info->ring_buffer_begin_index = 0; + split_info->ring_buffer_first_scanline = vertical_contributors->n0; + split_info->ring_buffer_last_scanline = split_info->ring_buffer_first_scanline - 1; // means "empty" + + for (y = start_output_y; y < end_output_y; y++) + { + int in_first_scanline, in_last_scanline; + + in_first_scanline = vertical_contributors->n0; + in_last_scanline = vertical_contributors->n1; + + // make sure the indexing hasn't broken + STBIR_ASSERT( in_first_scanline >= split_info->ring_buffer_first_scanline ); + + // Load in new scanlines + while (in_last_scanline > split_info->ring_buffer_last_scanline) + { + STBIR_ASSERT( ( split_info->ring_buffer_last_scanline - split_info->ring_buffer_first_scanline + 1 ) <= stbir_info->ring_buffer_num_entries ); + + // make sure there was room in the ring buffer when we add new scanlines + if ( ( split_info->ring_buffer_last_scanline - split_info->ring_buffer_first_scanline + 1 ) == stbir_info->ring_buffer_num_entries ) + { + split_info->ring_buffer_first_scanline++; + split_info->ring_buffer_begin_index++; + } + + if ( stbir_info->vertical_first ) + { + float * ring_buffer = stbir__get_ring_buffer_scanline( stbir_info, split_info, ++split_info->ring_buffer_last_scanline ); + // Decode the nth scanline from the source image into the decode buffer. + stbir__decode_scanline( stbir_info, split_info->ring_buffer_last_scanline, ring_buffer STBIR_ONLY_PROFILE_SET_SPLIT_INFO ); + } + else + { + stbir__decode_and_resample_for_vertical_gather_loop(stbir_info, split_info, split_info->ring_buffer_last_scanline + 1); + } + } + + // Now all buffers should be ready to write a row of vertical sampling, so do it. + stbir__resample_vertical_gather(stbir_info, split_info, y, in_first_scanline, in_last_scanline, vertical_coefficients ); + + ++vertical_contributors; + vertical_coefficients += stbir_info->vertical.coefficient_width; + } +} + +#define STBIR__FLOAT_EMPTY_MARKER 3.0e+38F +#define STBIR__FLOAT_BUFFER_IS_EMPTY(ptr) ((ptr)[0]==STBIR__FLOAT_EMPTY_MARKER) + +static void stbir__encode_first_scanline_from_scatter(stbir__info const * stbir_info, stbir__per_split_info* split_info) +{ + // evict a scanline out into the output buffer + float* ring_buffer_entry = stbir__get_ring_buffer_entry(stbir_info, split_info, split_info->ring_buffer_begin_index ); + + // dump the scanline out + stbir__encode_scanline( stbir_info, ( (char *)stbir_info->output_data ) + ( (size_t)split_info->ring_buffer_first_scanline * (size_t)stbir_info->output_stride_bytes ), ring_buffer_entry, split_info->ring_buffer_first_scanline STBIR_ONLY_PROFILE_SET_SPLIT_INFO ); + + // mark it as empty + ring_buffer_entry[ 0 ] = STBIR__FLOAT_EMPTY_MARKER; + + // advance the first scanline + split_info->ring_buffer_first_scanline++; + if ( ++split_info->ring_buffer_begin_index == stbir_info->ring_buffer_num_entries ) + split_info->ring_buffer_begin_index = 0; +} + +static void stbir__horizontal_resample_and_encode_first_scanline_from_scatter(stbir__info const * stbir_info, stbir__per_split_info* split_info) +{ + // evict a scanline out into the output buffer + + float* ring_buffer_entry = stbir__get_ring_buffer_entry(stbir_info, split_info, split_info->ring_buffer_begin_index ); + + // Now resample it into the buffer. + stbir__resample_horizontal_gather( stbir_info, split_info->vertical_buffer, ring_buffer_entry STBIR_ONLY_PROFILE_SET_SPLIT_INFO ); + + // dump the scanline out + stbir__encode_scanline( stbir_info, ( (char *)stbir_info->output_data ) + ( (size_t)split_info->ring_buffer_first_scanline * (size_t)stbir_info->output_stride_bytes ), split_info->vertical_buffer, split_info->ring_buffer_first_scanline STBIR_ONLY_PROFILE_SET_SPLIT_INFO ); + + // mark it as empty + ring_buffer_entry[ 0 ] = STBIR__FLOAT_EMPTY_MARKER; + + // advance the first scanline + split_info->ring_buffer_first_scanline++; + if ( ++split_info->ring_buffer_begin_index == stbir_info->ring_buffer_num_entries ) + split_info->ring_buffer_begin_index = 0; +} + +static void stbir__resample_vertical_scatter(stbir__info const * stbir_info, stbir__per_split_info* split_info, int n0, int n1, float const * vertical_coefficients, float const * vertical_buffer, float const * vertical_buffer_end ) +{ + STBIR_ASSERT( !stbir_info->vertical.is_gather ); + + STBIR_PROFILE_START( vertical ); + { + int k = 0, total = n1 - n0 + 1; + STBIR_ASSERT( total > 0 ); + do { + float * outputs[8]; + int i, n = total; if ( n > 8 ) n = 8; + for( i = 0 ; i < n ; i++ ) + { + outputs[ i ] = stbir__get_ring_buffer_scanline(stbir_info, split_info, k+i+n0 ); + if ( ( i ) && ( STBIR__FLOAT_BUFFER_IS_EMPTY( outputs[i] ) != STBIR__FLOAT_BUFFER_IS_EMPTY( outputs[0] ) ) ) // make sure runs are of the same type + { + n = i; + break; + } + } + // call the scatter to N scanlines at a time function (up to 8 scanlines of scattering at once) + ((STBIR__FLOAT_BUFFER_IS_EMPTY( outputs[0] ))?stbir__vertical_scatter_sets:stbir__vertical_scatter_blends)[n-1]( outputs, vertical_coefficients + k, vertical_buffer, vertical_buffer_end ); + k += n; + total -= n; + } while ( total ); + } + + STBIR_PROFILE_END( vertical ); +} + +typedef void stbir__handle_scanline_for_scatter_func(stbir__info const * stbir_info, stbir__per_split_info* split_info); + +static void stbir__vertical_scatter_loop( stbir__info const * stbir_info, stbir__per_split_info* split_info, int split_count ) +{ + int y, start_output_y, end_output_y, start_input_y, end_input_y; + stbir__contributors* vertical_contributors = stbir_info->vertical.contributors; + float const * vertical_coefficients = stbir_info->vertical.coefficients; + stbir__handle_scanline_for_scatter_func * handle_scanline_for_scatter; + void * scanline_scatter_buffer; + void * scanline_scatter_buffer_end; + int on_first_input_y, last_input_y; + int width = (stbir_info->vertical_first) ? ( stbir_info->scanline_extents.conservative.n1-stbir_info->scanline_extents.conservative.n0+1 ) : stbir_info->horizontal.scale_info.output_sub_size; + int width_times_channels = stbir_info->effective_channels * width; + + STBIR_ASSERT( !stbir_info->vertical.is_gather ); + + start_output_y = split_info->start_output_y; + end_output_y = split_info[split_count-1].end_output_y; // may do multiple split counts + + start_input_y = split_info->start_input_y; + end_input_y = split_info[split_count-1].end_input_y; + + // adjust for starting offset start_input_y + y = start_input_y + stbir_info->vertical.filter_pixel_margin; + vertical_contributors += y ; + vertical_coefficients += stbir_info->vertical.coefficient_width * y; + + if ( stbir_info->vertical_first ) + { + handle_scanline_for_scatter = stbir__horizontal_resample_and_encode_first_scanline_from_scatter; + scanline_scatter_buffer = split_info->decode_buffer; + scanline_scatter_buffer_end = ( (char*) scanline_scatter_buffer ) + sizeof( float ) * stbir_info->effective_channels * (stbir_info->scanline_extents.conservative.n1-stbir_info->scanline_extents.conservative.n0+1); + } + else + { + handle_scanline_for_scatter = stbir__encode_first_scanline_from_scatter; + scanline_scatter_buffer = split_info->vertical_buffer; + scanline_scatter_buffer_end = ( (char*) scanline_scatter_buffer ) + sizeof( float ) * stbir_info->effective_channels * stbir_info->horizontal.scale_info.output_sub_size; + } + + // initialize the ring buffer for scattering + split_info->ring_buffer_first_scanline = start_output_y; + split_info->ring_buffer_last_scanline = -1; + split_info->ring_buffer_begin_index = -1; + + // mark all the buffers as empty to start + for( y = 0 ; y < stbir_info->ring_buffer_num_entries ; y++ ) + { + float * decode_buffer = stbir__get_ring_buffer_entry( stbir_info, split_info, y ); + decode_buffer[ width_times_channels ] = 0.0f; // clear two over for horizontals with a remnant of 3 + decode_buffer[ width_times_channels+1 ] = 0.0f; + decode_buffer[0] = STBIR__FLOAT_EMPTY_MARKER; // only used on scatter + } + + // do the loop in input space + on_first_input_y = 1; last_input_y = start_input_y; + for (y = start_input_y ; y < end_input_y; y++) + { + int out_first_scanline, out_last_scanline; + + out_first_scanline = vertical_contributors->n0; + out_last_scanline = vertical_contributors->n1; + + STBIR_ASSERT(out_last_scanline - out_first_scanline + 1 <= stbir_info->ring_buffer_num_entries); + + if ( ( out_last_scanline >= out_first_scanline ) && ( ( ( out_first_scanline >= start_output_y ) && ( out_first_scanline < end_output_y ) ) || ( ( out_last_scanline >= start_output_y ) && ( out_last_scanline < end_output_y ) ) ) ) + { + float const * vc = vertical_coefficients; + + // keep track of the range actually seen for the next resize + last_input_y = y; + if ( ( on_first_input_y ) && ( y > start_input_y ) ) + split_info->start_input_y = y; + on_first_input_y = 0; + + // clip the region + if ( out_first_scanline < start_output_y ) + { + vc += start_output_y - out_first_scanline; + out_first_scanline = start_output_y; + } + + if ( out_last_scanline >= end_output_y ) + out_last_scanline = end_output_y - 1; + + // if very first scanline, init the index + if (split_info->ring_buffer_begin_index < 0) + split_info->ring_buffer_begin_index = out_first_scanline - start_output_y; + + STBIR_ASSERT( split_info->ring_buffer_begin_index <= out_first_scanline ); + + // Decode the nth scanline from the source image into the decode buffer. + stbir__decode_scanline( stbir_info, y, split_info->decode_buffer STBIR_ONLY_PROFILE_SET_SPLIT_INFO ); + + // When horizontal first, we resample horizontally into the vertical buffer before we scatter it out + if ( !stbir_info->vertical_first ) + stbir__resample_horizontal_gather( stbir_info, split_info->vertical_buffer, split_info->decode_buffer STBIR_ONLY_PROFILE_SET_SPLIT_INFO ); + + // Now it's sitting in the buffer ready to be distributed into the ring buffers. + + // evict from the ringbuffer, if we need are full + if ( ( ( split_info->ring_buffer_last_scanline - split_info->ring_buffer_first_scanline + 1 ) == stbir_info->ring_buffer_num_entries ) && + ( out_last_scanline > split_info->ring_buffer_last_scanline ) ) + handle_scanline_for_scatter( stbir_info, split_info ); + + // Now the horizontal buffer is ready to write to all ring buffer rows, so do it. + stbir__resample_vertical_scatter(stbir_info, split_info, out_first_scanline, out_last_scanline, vc, (float*)scanline_scatter_buffer, (float*)scanline_scatter_buffer_end ); + + // update the end of the buffer + if ( out_last_scanline > split_info->ring_buffer_last_scanline ) + split_info->ring_buffer_last_scanline = out_last_scanline; + } + ++vertical_contributors; + vertical_coefficients += stbir_info->vertical.coefficient_width; + } + + // now evict the scanlines that are left over in the ring buffer + while ( split_info->ring_buffer_first_scanline < end_output_y ) + handle_scanline_for_scatter(stbir_info, split_info); + + // update the end_input_y if we do multiple resizes with the same data + ++last_input_y; + for( y = 0 ; y < split_count; y++ ) + if ( split_info[y].end_input_y > last_input_y ) + split_info[y].end_input_y = last_input_y; +} + + +static stbir__kernel_callback * stbir__builtin_kernels[] = { 0, stbir__filter_trapezoid, stbir__filter_triangle, stbir__filter_cubic, stbir__filter_catmullrom, stbir__filter_mitchell, stbir__filter_point }; +static stbir__support_callback * stbir__builtin_supports[] = { 0, stbir__support_trapezoid, stbir__support_one, stbir__support_two, stbir__support_two, stbir__support_two, stbir__support_zeropoint5 }; + +static void stbir__set_sampler(stbir__sampler * samp, stbir_filter filter, stbir__kernel_callback * kernel, stbir__support_callback * support, stbir_edge edge, stbir__scale_info * scale_info, int always_gather, void * user_data ) +{ + // set filter + if (filter == 0) + { + filter = STBIR_DEFAULT_FILTER_DOWNSAMPLE; // default to downsample + if (scale_info->scale >= ( 1.0f - stbir__small_float ) ) + { + if ( (scale_info->scale <= ( 1.0f + stbir__small_float ) ) && ( STBIR_CEILF(scale_info->pixel_shift) == scale_info->pixel_shift ) ) + filter = STBIR_FILTER_POINT_SAMPLE; + else + filter = STBIR_DEFAULT_FILTER_UPSAMPLE; + } + } + samp->filter_enum = filter; + + STBIR_ASSERT(samp->filter_enum != 0); + STBIR_ASSERT((unsigned)samp->filter_enum < STBIR_FILTER_OTHER); + samp->filter_kernel = stbir__builtin_kernels[ filter ]; + samp->filter_support = stbir__builtin_supports[ filter ]; + + if ( kernel && support ) + { + samp->filter_kernel = kernel; + samp->filter_support = support; + samp->filter_enum = STBIR_FILTER_OTHER; + } + + samp->edge = edge; + samp->filter_pixel_width = stbir__get_filter_pixel_width (samp->filter_support, scale_info->scale, user_data ); + // Gather is always better, but in extreme downsamples, you have to most or all of the data in memory + // For horizontal, we always have all the pixels, so we always use gather here (always_gather==1). + // For vertical, we use gather if scaling up (which means we will have samp->filter_pixel_width + // scanlines in memory at once). + samp->is_gather = 0; + if ( scale_info->scale >= ( 1.0f - stbir__small_float ) ) + samp->is_gather = 1; + else if ( ( always_gather ) || ( samp->filter_pixel_width <= STBIR_FORCE_GATHER_FILTER_SCANLINES_AMOUNT ) ) + samp->is_gather = 2; + + // pre calculate stuff based on the above + samp->coefficient_width = stbir__get_coefficient_width(samp, samp->is_gather, user_data); + + // filter_pixel_width is the conservative size in pixels of input that affect an output pixel. + // In rare cases (only with 2 pix to 1 pix with the default filters), it's possible that the + // filter will extend before or after the scanline beyond just one extra entire copy of the + // scanline (we would hit the edge twice). We don't let you do that, so we clamp the total + // width to 3x the total of input pixel (once for the scanline, once for the left side + // overhang, and once for the right side). We only do this for edge mode, since the other + // modes can just re-edge clamp back in again. + if ( edge == STBIR_EDGE_WRAP ) + if ( samp->filter_pixel_width > ( scale_info->input_full_size * 3 ) ) + samp->filter_pixel_width = scale_info->input_full_size * 3; + + // This is how much to expand buffers to account for filters seeking outside + // the image boundaries. + samp->filter_pixel_margin = samp->filter_pixel_width / 2; + + // filter_pixel_margin is the amount that this filter can overhang on just one side of either + // end of the scanline (left or the right). Since we only allow you to overhang 1 scanline's + // worth of pixels, we clamp this one side of overhang to the input scanline size. Again, + // this clamping only happens in rare cases with the default filters (2 pix to 1 pix). + if ( edge == STBIR_EDGE_WRAP ) + if ( samp->filter_pixel_margin > scale_info->input_full_size ) + samp->filter_pixel_margin = scale_info->input_full_size; + + samp->num_contributors = stbir__get_contributors(samp, samp->is_gather); + + samp->contributors_size = samp->num_contributors * sizeof(stbir__contributors); + samp->coefficients_size = samp->num_contributors * samp->coefficient_width * sizeof(float) + sizeof(float)*STBIR_INPUT_CALLBACK_PADDING; // extra sizeof(float) is padding + + samp->gather_prescatter_contributors = 0; + samp->gather_prescatter_coefficients = 0; + if ( samp->is_gather == 0 ) + { + samp->gather_prescatter_coefficient_width = samp->filter_pixel_width; + samp->gather_prescatter_num_contributors = stbir__get_contributors(samp, 2); + samp->gather_prescatter_contributors_size = samp->gather_prescatter_num_contributors * sizeof(stbir__contributors); + samp->gather_prescatter_coefficients_size = samp->gather_prescatter_num_contributors * samp->gather_prescatter_coefficient_width * sizeof(float); + } +} + +static void stbir__get_conservative_extents( stbir__sampler * samp, stbir__contributors * range, void * user_data ) +{ + float scale = samp->scale_info.scale; + float out_shift = samp->scale_info.pixel_shift; + stbir__support_callback * support = samp->filter_support; + int input_full_size = samp->scale_info.input_full_size; + stbir_edge edge = samp->edge; + float inv_scale = samp->scale_info.inv_scale; + + STBIR_ASSERT( samp->is_gather != 0 ); + + if ( samp->is_gather == 1 ) + { + int in_first_pixel, in_last_pixel; + float out_filter_radius = support(inv_scale, user_data) * scale; + + stbir__calculate_in_pixel_range( &in_first_pixel, &in_last_pixel, 0.5, out_filter_radius, inv_scale, out_shift, input_full_size, edge ); + range->n0 = in_first_pixel; + stbir__calculate_in_pixel_range( &in_first_pixel, &in_last_pixel, ( (float)(samp->scale_info.output_sub_size-1) ) + 0.5f, out_filter_radius, inv_scale, out_shift, input_full_size, edge ); + range->n1 = in_last_pixel; + } + else if ( samp->is_gather == 2 ) // downsample gather, refine + { + float in_pixels_radius = support(scale, user_data) * inv_scale; + int filter_pixel_margin = samp->filter_pixel_margin; + int output_sub_size = samp->scale_info.output_sub_size; + int input_end; + int n; + int in_first_pixel, in_last_pixel; + + // get a conservative area of the input range + stbir__calculate_in_pixel_range( &in_first_pixel, &in_last_pixel, 0, 0, inv_scale, out_shift, input_full_size, edge ); + range->n0 = in_first_pixel; + stbir__calculate_in_pixel_range( &in_first_pixel, &in_last_pixel, (float)output_sub_size, 0, inv_scale, out_shift, input_full_size, edge ); + range->n1 = in_last_pixel; + + // now go through the margin to the start of area to find bottom + n = range->n0 + 1; + input_end = -filter_pixel_margin; + while( n >= input_end ) + { + int out_first_pixel, out_last_pixel; + stbir__calculate_out_pixel_range( &out_first_pixel, &out_last_pixel, ((float)n)+0.5f, in_pixels_radius, scale, out_shift, output_sub_size ); + if ( out_first_pixel > out_last_pixel ) + break; + + if ( ( out_first_pixel < output_sub_size ) || ( out_last_pixel >= 0 ) ) + range->n0 = n; + --n; + } + + // now go through the end of the area through the margin to find top + n = range->n1 - 1; + input_end = n + 1 + filter_pixel_margin; + while( n <= input_end ) + { + int out_first_pixel, out_last_pixel; + stbir__calculate_out_pixel_range( &out_first_pixel, &out_last_pixel, ((float)n)+0.5f, in_pixels_radius, scale, out_shift, output_sub_size ); + if ( out_first_pixel > out_last_pixel ) + break; + if ( ( out_first_pixel < output_sub_size ) || ( out_last_pixel >= 0 ) ) + range->n1 = n; + ++n; + } + } + + if ( samp->edge == STBIR_EDGE_WRAP ) + { + // if we are wrapping, and we are very close to the image size (so the edges might merge), just use the scanline up to the edge + if ( ( range->n0 > 0 ) && ( range->n1 >= input_full_size ) ) + { + int marg = range->n1 - input_full_size + 1; + if ( ( marg + STBIR__MERGE_RUNS_PIXEL_THRESHOLD ) >= range->n0 ) + range->n0 = 0; + } + if ( ( range->n0 < 0 ) && ( range->n1 < (input_full_size-1) ) ) + { + int marg = -range->n0; + if ( ( input_full_size - marg - STBIR__MERGE_RUNS_PIXEL_THRESHOLD - 1 ) <= range->n1 ) + range->n1 = input_full_size - 1; + } + } + else + { + // for non-edge-wrap modes, we never read over the edge, so clamp + if ( range->n0 < 0 ) + range->n0 = 0; + if ( range->n1 >= input_full_size ) + range->n1 = input_full_size - 1; + } +} + +static void stbir__get_split_info( stbir__per_split_info* split_info, int splits, int output_height, int vertical_pixel_margin, int input_full_height, int is_gather, stbir__contributors * contribs ) +{ + int i, cur; + int left = output_height; + + cur = 0; + for( i = 0 ; i < splits ; i++ ) + { + int each; + + split_info[i].start_output_y = cur; + each = left / ( splits - i ); + split_info[i].end_output_y = cur + each; + + // ok, when we are gathering, we need to make sure we are starting on a y offset that doesn't have + // a "special" set of coefficients. Basically, with exactly the right filter at exactly the right + // resize at exactly the right phase, some of the coefficents can be zero. When they are zero, we + // don't process them at all. But this leads to a tricky thing with the thread splits, where we + // might have a set of two coeffs like this for example: (4,4) and (3,6). The 4,4 means there was + // just one single coeff because things worked out perfectly (normally, they all have 4 coeffs + // like the range 3,6. The problem is that if we start right on the (4,4) on a brand new thread, + // then when we get to (3,6), we don't have the "3" sample in memory (because we didn't load + // it on the initial (4,4) range because it didn't have a 3 (we only add new samples that are + // larger than our existing samples - it's just how the eviction works). So, our solution here + // is pretty simple, if we start right on a range that has samples that start earlier, then we + // simply bump up our previous thread split range to include it, and then start this threads + // range with the smaller sample. It just moves one scanline from one thread split to another, + // so that we end with the unusual one, instead of start with it. To do this, we check 2-4 + // sample at each thread split start and then occassionally move them. + + if ( ( is_gather ) && ( i ) ) + { + stbir__contributors * small_contribs; + int j, smallest, stop, start_n0; + stbir__contributors * split_contribs = contribs + cur; + + // scan for a max of 3x the filter width or until the next thread split + stop = vertical_pixel_margin * 3; + if ( each < stop ) + stop = each; + + // loops a few times before early out + smallest = 0; + small_contribs = split_contribs; + start_n0 = small_contribs->n0; + for( j = 1 ; j <= stop ; j++ ) + { + ++split_contribs; + if ( split_contribs->n0 > start_n0 ) + break; + if ( split_contribs->n0 < small_contribs->n0 ) + { + small_contribs = split_contribs; + smallest = j; + } + } + + split_info[i-1].end_output_y += smallest; + split_info[i].start_output_y += smallest; + } + + cur += each; + left -= each; + + // scatter range (updated to minimum as you run it) + split_info[i].start_input_y = -vertical_pixel_margin; + split_info[i].end_input_y = input_full_height + vertical_pixel_margin; + } +} + +static void stbir__free_internal_mem( stbir__info *info ) +{ + #define STBIR__FREE_AND_CLEAR( ptr ) { if ( ptr ) { void * p = (ptr); (ptr) = 0; STBIR_FREE( p, info->user_data); } } + + if ( info ) + { + #ifndef STBIR__SEPARATE_ALLOCATIONS + STBIR__FREE_AND_CLEAR( info->alloced_mem ); + #else + int i,j; + + if ( ( info->vertical.gather_prescatter_contributors ) && ( (void*)info->vertical.gather_prescatter_contributors != (void*)info->split_info[0].decode_buffer ) ) + { + STBIR__FREE_AND_CLEAR( info->vertical.gather_prescatter_coefficients ); + STBIR__FREE_AND_CLEAR( info->vertical.gather_prescatter_contributors ); + } + for( i = 0 ; i < info->splits ; i++ ) + { + for( j = 0 ; j < info->alloc_ring_buffer_num_entries ; j++ ) + { + #ifdef STBIR_SIMD8 + if ( info->effective_channels == 3 ) + --info->split_info[i].ring_buffers[j]; // avx in 3 channel mode needs one float at the start of the buffer + #endif + STBIR__FREE_AND_CLEAR( info->split_info[i].ring_buffers[j] ); + } + + #ifdef STBIR_SIMD8 + if ( info->effective_channels == 3 ) + --info->split_info[i].decode_buffer; // avx in 3 channel mode needs one float at the start of the buffer + #endif + STBIR__FREE_AND_CLEAR( info->split_info[i].decode_buffer ); + STBIR__FREE_AND_CLEAR( info->split_info[i].ring_buffers ); + STBIR__FREE_AND_CLEAR( info->split_info[i].vertical_buffer ); + } + STBIR__FREE_AND_CLEAR( info->split_info ); + if ( info->vertical.coefficients != info->horizontal.coefficients ) + { + STBIR__FREE_AND_CLEAR( info->vertical.coefficients ); + STBIR__FREE_AND_CLEAR( info->vertical.contributors ); + } + STBIR__FREE_AND_CLEAR( info->horizontal.coefficients ); + STBIR__FREE_AND_CLEAR( info->horizontal.contributors ); + STBIR__FREE_AND_CLEAR( info->alloced_mem ); + STBIR_FREE( info, info->user_data ); + #endif + } + + #undef STBIR__FREE_AND_CLEAR +} + +static int stbir__get_max_split( int splits, int height ) +{ + int i; + int max = 0; + + for( i = 0 ; i < splits ; i++ ) + { + int each = height / ( splits - i ); + if ( each > max ) + max = each; + height -= each; + } + return max; +} + +static stbir__horizontal_gather_channels_func ** stbir__horizontal_gather_n_coeffs_funcs[8] = +{ + 0, stbir__horizontal_gather_1_channels_with_n_coeffs_funcs, stbir__horizontal_gather_2_channels_with_n_coeffs_funcs, stbir__horizontal_gather_3_channels_with_n_coeffs_funcs, stbir__horizontal_gather_4_channels_with_n_coeffs_funcs, 0,0, stbir__horizontal_gather_7_channels_with_n_coeffs_funcs +}; + +static stbir__horizontal_gather_channels_func ** stbir__horizontal_gather_channels_funcs[8] = +{ + 0, stbir__horizontal_gather_1_channels_funcs, stbir__horizontal_gather_2_channels_funcs, stbir__horizontal_gather_3_channels_funcs, stbir__horizontal_gather_4_channels_funcs, 0,0, stbir__horizontal_gather_7_channels_funcs +}; + +// there are six resize classifications: 0 == vertical scatter, 1 == vertical gather < 1x scale, 2 == vertical gather 1x-2x scale, 4 == vertical gather < 3x scale, 4 == vertical gather > 3x scale, 5 == <=4 pixel height, 6 == <=4 pixel wide column +#define STBIR_RESIZE_CLASSIFICATIONS 8 + +static float stbir__compute_weights[5][STBIR_RESIZE_CLASSIFICATIONS][4]= // 5 = 0=1chan, 1=2chan, 2=3chan, 3=4chan, 4=7chan +{ + { + { 1.00000f, 1.00000f, 0.31250f, 1.00000f }, + { 0.56250f, 0.59375f, 0.00000f, 0.96875f }, + { 1.00000f, 0.06250f, 0.00000f, 1.00000f }, + { 0.00000f, 0.09375f, 1.00000f, 1.00000f }, + { 1.00000f, 1.00000f, 1.00000f, 1.00000f }, + { 0.03125f, 0.12500f, 1.00000f, 1.00000f }, + { 0.06250f, 0.12500f, 0.00000f, 1.00000f }, + { 0.00000f, 1.00000f, 0.00000f, 0.03125f }, + }, { + { 0.00000f, 0.84375f, 0.00000f, 0.03125f }, + { 0.09375f, 0.93750f, 0.00000f, 0.78125f }, + { 0.87500f, 0.21875f, 0.00000f, 0.96875f }, + { 0.09375f, 0.09375f, 1.00000f, 1.00000f }, + { 1.00000f, 1.00000f, 1.00000f, 1.00000f }, + { 0.03125f, 0.12500f, 1.00000f, 1.00000f }, + { 0.06250f, 0.12500f, 0.00000f, 1.00000f }, + { 0.00000f, 1.00000f, 0.00000f, 0.53125f }, + }, { + { 0.00000f, 0.53125f, 0.00000f, 0.03125f }, + { 0.06250f, 0.96875f, 0.00000f, 0.53125f }, + { 0.87500f, 0.18750f, 0.00000f, 0.93750f }, + { 0.00000f, 0.09375f, 1.00000f, 1.00000f }, + { 1.00000f, 1.00000f, 1.00000f, 1.00000f }, + { 0.03125f, 0.12500f, 1.00000f, 1.00000f }, + { 0.06250f, 0.12500f, 0.00000f, 1.00000f }, + { 0.00000f, 1.00000f, 0.00000f, 0.56250f }, + }, { + { 0.00000f, 0.50000f, 0.00000f, 0.71875f }, + { 0.06250f, 0.84375f, 0.00000f, 0.87500f }, + { 1.00000f, 0.50000f, 0.50000f, 0.96875f }, + { 1.00000f, 0.09375f, 0.31250f, 0.50000f }, + { 1.00000f, 1.00000f, 1.00000f, 1.00000f }, + { 1.00000f, 0.03125f, 0.03125f, 0.53125f }, + { 0.18750f, 0.12500f, 0.00000f, 1.00000f }, + { 0.00000f, 1.00000f, 0.03125f, 0.18750f }, + }, { + { 0.00000f, 0.59375f, 0.00000f, 0.96875f }, + { 0.06250f, 0.81250f, 0.06250f, 0.59375f }, + { 0.75000f, 0.43750f, 0.12500f, 0.96875f }, + { 0.87500f, 0.06250f, 0.18750f, 0.43750f }, + { 1.00000f, 1.00000f, 1.00000f, 1.00000f }, + { 0.15625f, 0.12500f, 1.00000f, 1.00000f }, + { 0.06250f, 0.12500f, 0.00000f, 1.00000f }, + { 0.00000f, 1.00000f, 0.03125f, 0.34375f }, + } +}; + +// structure that allow us to query and override info for training the costs +typedef struct STBIR__V_FIRST_INFO +{ + double v_cost, h_cost; + int control_v_first; // 0 = no control, 1 = force hori, 2 = force vert + int v_first; + int v_resize_classification; + int is_gather; +} STBIR__V_FIRST_INFO; + +#ifdef STBIR__V_FIRST_INFO_BUFFER +static STBIR__V_FIRST_INFO STBIR__V_FIRST_INFO_BUFFER = {0}; +#define STBIR__V_FIRST_INFO_POINTER &STBIR__V_FIRST_INFO_BUFFER +#else +#define STBIR__V_FIRST_INFO_POINTER 0 +#endif + +// Figure out whether to scale along the horizontal or vertical first. +// This only *super* important when you are scaling by a massively +// different amount in the vertical vs the horizontal (for example, if +// you are scaling by 2x in the width, and 0.5x in the height, then you +// want to do the vertical scale first, because it's around 3x faster +// in that order. +// +// In more normal circumstances, this makes a 20-40% differences, so +// it's good to get right, but not critical. The normal way that you +// decide which direction goes first is just figuring out which +// direction does more multiplies. But with modern CPUs with their +// fancy caches and SIMD and high IPC abilities, so there's just a lot +// more that goes into it. +// +// My handwavy sort of solution is to have an app that does a whole +// bunch of timing for both vertical and horizontal first modes, +// and then another app that can read lots of these timing files +// and try to search for the best weights to use. Dotimings.c +// is the app that does a bunch of timings, and vf_train.c is the +// app that solves for the best weights (and shows how well it +// does currently). + +static int stbir__should_do_vertical_first( float weights_table[STBIR_RESIZE_CLASSIFICATIONS][4], int horizontal_filter_pixel_width, float horizontal_scale, int horizontal_output_size, int vertical_filter_pixel_width, float vertical_scale, int vertical_output_size, int is_gather, STBIR__V_FIRST_INFO * info ) +{ + double v_cost, h_cost; + float * weights; + int vertical_first; + int v_classification; + + // categorize the resize into buckets + if ( ( vertical_output_size <= 4 ) || ( horizontal_output_size <= 4 ) ) + v_classification = ( vertical_output_size < horizontal_output_size ) ? 6 : 7; + else if ( vertical_scale <= 1.0f ) + v_classification = ( is_gather ) ? 1 : 0; + else if ( vertical_scale <= 2.0f) + v_classification = 2; + else if ( vertical_scale <= 3.0f) + v_classification = 3; + else if ( vertical_scale <= 4.0f) + v_classification = 5; + else + v_classification = 6; + + // use the right weights + weights = weights_table[ v_classification ]; + + // this is the costs when you don't take into account modern CPUs with high ipc and simd and caches - wish we had a better estimate + h_cost = (float)horizontal_filter_pixel_width * weights[0] + horizontal_scale * (float)vertical_filter_pixel_width * weights[1]; + v_cost = (float)vertical_filter_pixel_width * weights[2] + vertical_scale * (float)horizontal_filter_pixel_width * weights[3]; + + // use computation estimate to decide vertical first or not + vertical_first = ( v_cost <= h_cost ) ? 1 : 0; + + // save these, if requested + if ( info ) + { + info->h_cost = h_cost; + info->v_cost = v_cost; + info->v_resize_classification = v_classification; + info->v_first = vertical_first; + info->is_gather = is_gather; + } + + // and this allows us to override everything for testing (see dotiming.c) + if ( ( info ) && ( info->control_v_first ) ) + vertical_first = ( info->control_v_first == 2 ) ? 1 : 0; + + return vertical_first; +} + +// layout lookups - must match stbir_internal_pixel_layout +static unsigned char stbir__pixel_channels[] = { + 1,2,3,3,4, // 1ch, 2ch, rgb, bgr, 4ch + 4,4,4,4,2,2, // RGBA,BGRA,ARGB,ABGR,RA,AR + 4,4,4,4,2,2, // RGBA_PM,BGRA_PM,ARGB_PM,ABGR_PM,RA_PM,AR_PM +}; + +// the internal pixel layout enums are in a different order, so we can easily do range comparisons of types +// the public pixel layout is ordered in a way that if you cast num_channels (1-4) to the enum, you get something sensible +static stbir_internal_pixel_layout stbir__pixel_layout_convert_public_to_internal[] = { + STBIRI_BGR, STBIRI_1CHANNEL, STBIRI_2CHANNEL, STBIRI_RGB, STBIRI_RGBA, + STBIRI_4CHANNEL, STBIRI_BGRA, STBIRI_ARGB, STBIRI_ABGR, STBIRI_RA, STBIRI_AR, + STBIRI_RGBA_PM, STBIRI_BGRA_PM, STBIRI_ARGB_PM, STBIRI_ABGR_PM, STBIRI_RA_PM, STBIRI_AR_PM, +}; + +static stbir__info * stbir__alloc_internal_mem_and_build_samplers( stbir__sampler * horizontal, stbir__sampler * vertical, stbir__contributors * conservative, stbir_pixel_layout input_pixel_layout_public, stbir_pixel_layout output_pixel_layout_public, int splits, int new_x, int new_y, int fast_alpha, void * user_data STBIR_ONLY_PROFILE_BUILD_GET_INFO ) +{ + static char stbir_channel_count_index[8]={ 9,0,1,2, 3,9,9,4 }; + + stbir__info * info = 0; + void * alloced = 0; + size_t alloced_total = 0; + int vertical_first; + size_t decode_buffer_size, ring_buffer_length_bytes, ring_buffer_size, vertical_buffer_size; + int alloc_ring_buffer_num_entries; + + int alpha_weighting_type = 0; // 0=none, 1=simple, 2=fancy + int conservative_split_output_size = stbir__get_max_split( splits, vertical->scale_info.output_sub_size ); + stbir_internal_pixel_layout input_pixel_layout = stbir__pixel_layout_convert_public_to_internal[ input_pixel_layout_public ]; + stbir_internal_pixel_layout output_pixel_layout = stbir__pixel_layout_convert_public_to_internal[ output_pixel_layout_public ]; + int channels = stbir__pixel_channels[ input_pixel_layout ]; + int effective_channels = channels; + + // first figure out what type of alpha weighting to use (if any) + if ( ( horizontal->filter_enum != STBIR_FILTER_POINT_SAMPLE ) || ( vertical->filter_enum != STBIR_FILTER_POINT_SAMPLE ) ) // no alpha weighting on point sampling + { + if ( ( input_pixel_layout >= STBIRI_RGBA ) && ( input_pixel_layout <= STBIRI_AR ) && ( output_pixel_layout >= STBIRI_RGBA ) && ( output_pixel_layout <= STBIRI_AR ) ) + { + if ( fast_alpha ) + { + alpha_weighting_type = 4; + } + else + { + static int fancy_alpha_effective_cnts[6] = { 7, 7, 7, 7, 3, 3 }; + alpha_weighting_type = 2; + effective_channels = fancy_alpha_effective_cnts[ input_pixel_layout - STBIRI_RGBA ]; + } + } + else if ( ( input_pixel_layout >= STBIRI_RGBA_PM ) && ( input_pixel_layout <= STBIRI_AR_PM ) && ( output_pixel_layout >= STBIRI_RGBA ) && ( output_pixel_layout <= STBIRI_AR ) ) + { + // input premult, output non-premult + alpha_weighting_type = 3; + } + else if ( ( input_pixel_layout >= STBIRI_RGBA ) && ( input_pixel_layout <= STBIRI_AR ) && ( output_pixel_layout >= STBIRI_RGBA_PM ) && ( output_pixel_layout <= STBIRI_AR_PM ) ) + { + // input non-premult, output premult + alpha_weighting_type = 1; + } + } + + // channel in and out count must match currently + if ( channels != stbir__pixel_channels[ output_pixel_layout ] ) + return 0; + + // get vertical first + vertical_first = stbir__should_do_vertical_first( stbir__compute_weights[ (int)stbir_channel_count_index[ effective_channels ] ], horizontal->filter_pixel_width, horizontal->scale_info.scale, horizontal->scale_info.output_sub_size, vertical->filter_pixel_width, vertical->scale_info.scale, vertical->scale_info.output_sub_size, vertical->is_gather, STBIR__V_FIRST_INFO_POINTER ); + + // sometimes read one float off in some of the unrolled loops (with a weight of zero coeff, so it doesn't have an effect) + // we use a few extra floats instead of just 1, so that input callback buffer can overlap with the decode buffer without + // the conversion routines overwriting the callback input data. + decode_buffer_size = ( conservative->n1 - conservative->n0 + 1 ) * effective_channels * sizeof(float) + sizeof(float)*STBIR_INPUT_CALLBACK_PADDING; // extra floats for input callback stagger + +#if defined( STBIR__SEPARATE_ALLOCATIONS ) && defined(STBIR_SIMD8) + if ( effective_channels == 3 ) + decode_buffer_size += sizeof(float); // avx in 3 channel mode needs one float at the start of the buffer (only with separate allocations) +#endif + + ring_buffer_length_bytes = (size_t)horizontal->scale_info.output_sub_size * (size_t)effective_channels * sizeof(float) + sizeof(float)*STBIR_INPUT_CALLBACK_PADDING; // extra floats for padding + + // if we do vertical first, the ring buffer holds a whole decoded line + if ( vertical_first ) + ring_buffer_length_bytes = ( decode_buffer_size + 15 ) & ~15; + + if ( ( ring_buffer_length_bytes & 4095 ) == 0 ) ring_buffer_length_bytes += 64*3; // avoid 4k alias + + // One extra entry because floating point precision problems sometimes cause an extra to be necessary. + alloc_ring_buffer_num_entries = vertical->filter_pixel_width + 1; + + // we never need more ring buffer entries than the scanlines we're outputting when in scatter mode + if ( ( !vertical->is_gather ) && ( alloc_ring_buffer_num_entries > conservative_split_output_size ) ) + alloc_ring_buffer_num_entries = conservative_split_output_size; + + ring_buffer_size = (size_t)alloc_ring_buffer_num_entries * (size_t)ring_buffer_length_bytes; + + // The vertical buffer is used differently, depending on whether we are scattering + // the vertical scanlines, or gathering them. + // If scattering, it's used at the temp buffer to accumulate each output. + // If gathering, it's just the output buffer. + vertical_buffer_size = (size_t)horizontal->scale_info.output_sub_size * (size_t)effective_channels * sizeof(float) + sizeof(float); // extra float for padding + + // we make two passes through this loop, 1st to add everything up, 2nd to allocate and init + for(;;) + { + int i; + void * advance_mem = alloced; + int copy_horizontal = 0; + stbir__sampler * possibly_use_horizontal_for_pivot = 0; + +#ifdef STBIR__SEPARATE_ALLOCATIONS + #define STBIR__NEXT_PTR( ptr, size, ntype ) if ( alloced ) { void * p = STBIR_MALLOC( size, user_data); if ( p == 0 ) { stbir__free_internal_mem( info ); return 0; } (ptr) = (ntype*)p; } +#else + #define STBIR__NEXT_PTR( ptr, size, ntype ) advance_mem = (void*) ( ( ((size_t)advance_mem) + 15 ) & ~15 ); if ( alloced ) ptr = (ntype*)advance_mem; advance_mem = (char*)(((size_t)advance_mem) + (size)); +#endif + + STBIR__NEXT_PTR( info, sizeof( stbir__info ), stbir__info ); + + STBIR__NEXT_PTR( info->split_info, sizeof( stbir__per_split_info ) * splits, stbir__per_split_info ); + + if ( info ) + { + static stbir__alpha_weight_func * fancy_alpha_weights[6] = { stbir__fancy_alpha_weight_4ch, stbir__fancy_alpha_weight_4ch, stbir__fancy_alpha_weight_4ch, stbir__fancy_alpha_weight_4ch, stbir__fancy_alpha_weight_2ch, stbir__fancy_alpha_weight_2ch }; + static stbir__alpha_unweight_func * fancy_alpha_unweights[6] = { stbir__fancy_alpha_unweight_4ch, stbir__fancy_alpha_unweight_4ch, stbir__fancy_alpha_unweight_4ch, stbir__fancy_alpha_unweight_4ch, stbir__fancy_alpha_unweight_2ch, stbir__fancy_alpha_unweight_2ch }; + static stbir__alpha_weight_func * simple_alpha_weights[6] = { stbir__simple_alpha_weight_4ch, stbir__simple_alpha_weight_4ch, stbir__simple_alpha_weight_4ch, stbir__simple_alpha_weight_4ch, stbir__simple_alpha_weight_2ch, stbir__simple_alpha_weight_2ch }; + static stbir__alpha_unweight_func * simple_alpha_unweights[6] = { stbir__simple_alpha_unweight_4ch, stbir__simple_alpha_unweight_4ch, stbir__simple_alpha_unweight_4ch, stbir__simple_alpha_unweight_4ch, stbir__simple_alpha_unweight_2ch, stbir__simple_alpha_unweight_2ch }; + + // initialize info fields + info->alloced_mem = alloced; + info->alloced_total = alloced_total; + + info->channels = channels; + info->effective_channels = effective_channels; + + info->offset_x = new_x; + info->offset_y = new_y; + info->alloc_ring_buffer_num_entries = (int)alloc_ring_buffer_num_entries; + info->ring_buffer_num_entries = 0; + info->ring_buffer_length_bytes = (int)ring_buffer_length_bytes; + info->splits = splits; + info->vertical_first = vertical_first; + + info->input_pixel_layout_internal = input_pixel_layout; + info->output_pixel_layout_internal = output_pixel_layout; + + // setup alpha weight functions + info->alpha_weight = 0; + info->alpha_unweight = 0; + + // handle alpha weighting functions and overrides + if ( alpha_weighting_type == 2 ) + { + // high quality alpha multiplying on the way in, dividing on the way out + info->alpha_weight = fancy_alpha_weights[ input_pixel_layout - STBIRI_RGBA ]; + info->alpha_unweight = fancy_alpha_unweights[ output_pixel_layout - STBIRI_RGBA ]; + } + else if ( alpha_weighting_type == 4 ) + { + // fast alpha multiplying on the way in, dividing on the way out + info->alpha_weight = simple_alpha_weights[ input_pixel_layout - STBIRI_RGBA ]; + info->alpha_unweight = simple_alpha_unweights[ output_pixel_layout - STBIRI_RGBA ]; + } + else if ( alpha_weighting_type == 1 ) + { + // fast alpha on the way in, leave in premultiplied form on way out + info->alpha_weight = simple_alpha_weights[ input_pixel_layout - STBIRI_RGBA ]; + } + else if ( alpha_weighting_type == 3 ) + { + // incoming is premultiplied, fast alpha dividing on the way out - non-premultiplied output + info->alpha_unweight = simple_alpha_unweights[ output_pixel_layout - STBIRI_RGBA ]; + } + + // handle 3-chan color flipping, using the alpha weight path + if ( ( ( input_pixel_layout == STBIRI_RGB ) && ( output_pixel_layout == STBIRI_BGR ) ) || + ( ( input_pixel_layout == STBIRI_BGR ) && ( output_pixel_layout == STBIRI_RGB ) ) ) + { + // do the flipping on the smaller of the two ends + if ( horizontal->scale_info.scale < 1.0f ) + info->alpha_unweight = stbir__simple_flip_3ch; + else + info->alpha_weight = stbir__simple_flip_3ch; + } + + } + + // get all the per-split buffers + for( i = 0 ; i < splits ; i++ ) + { + STBIR__NEXT_PTR( info->split_info[i].decode_buffer, decode_buffer_size, float ); + +#ifdef STBIR__SEPARATE_ALLOCATIONS + + #ifdef STBIR_SIMD8 + if ( ( info ) && ( effective_channels == 3 ) ) + ++info->split_info[i].decode_buffer; // avx in 3 channel mode needs one float at the start of the buffer + #endif + + STBIR__NEXT_PTR( info->split_info[i].ring_buffers, alloc_ring_buffer_num_entries * sizeof(float*), float* ); + { + int j; + for( j = 0 ; j < alloc_ring_buffer_num_entries ; j++ ) + { + STBIR__NEXT_PTR( info->split_info[i].ring_buffers[j], ring_buffer_length_bytes, float ); + #ifdef STBIR_SIMD8 + if ( ( info ) && ( effective_channels == 3 ) ) + ++info->split_info[i].ring_buffers[j]; // avx in 3 channel mode needs one float at the start of the buffer + #endif + } + } +#else + STBIR__NEXT_PTR( info->split_info[i].ring_buffer, ring_buffer_size, float ); +#endif + STBIR__NEXT_PTR( info->split_info[i].vertical_buffer, vertical_buffer_size, float ); + } + + // alloc memory for to-be-pivoted coeffs (if necessary) + if ( vertical->is_gather == 0 ) + { + size_t both; + size_t temp_mem_amt; + + // when in vertical scatter mode, we first build the coefficients in gather mode, and then pivot after, + // that means we need two buffers, so we try to use the decode buffer and ring buffer for this. if that + // is too small, we just allocate extra memory to use as this temp. + + both = (size_t)vertical->gather_prescatter_contributors_size + (size_t)vertical->gather_prescatter_coefficients_size; + +#ifdef STBIR__SEPARATE_ALLOCATIONS + temp_mem_amt = decode_buffer_size; + + #ifdef STBIR_SIMD8 + if ( effective_channels == 3 ) + --temp_mem_amt; // avx in 3 channel mode needs one float at the start of the buffer + #endif +#else + temp_mem_amt = (size_t)( decode_buffer_size + ring_buffer_size + vertical_buffer_size ) * (size_t)splits; +#endif + if ( temp_mem_amt >= both ) + { + if ( info ) + { + vertical->gather_prescatter_contributors = (stbir__contributors*)info->split_info[0].decode_buffer; + vertical->gather_prescatter_coefficients = (float*) ( ( (char*)info->split_info[0].decode_buffer ) + vertical->gather_prescatter_contributors_size ); + } + } + else + { + // ring+decode memory is too small, so allocate temp memory + STBIR__NEXT_PTR( vertical->gather_prescatter_contributors, vertical->gather_prescatter_contributors_size, stbir__contributors ); + STBIR__NEXT_PTR( vertical->gather_prescatter_coefficients, vertical->gather_prescatter_coefficients_size, float ); + } + } + + STBIR__NEXT_PTR( horizontal->contributors, horizontal->contributors_size, stbir__contributors ); + STBIR__NEXT_PTR( horizontal->coefficients, horizontal->coefficients_size, float ); + + // are the two filters identical?? (happens a lot with mipmap generation) + if ( ( horizontal->filter_kernel == vertical->filter_kernel ) && ( horizontal->filter_support == vertical->filter_support ) && ( horizontal->edge == vertical->edge ) && ( horizontal->scale_info.output_sub_size == vertical->scale_info.output_sub_size ) ) + { + float diff_scale = horizontal->scale_info.scale - vertical->scale_info.scale; + float diff_shift = horizontal->scale_info.pixel_shift - vertical->scale_info.pixel_shift; + if ( diff_scale < 0.0f ) diff_scale = -diff_scale; + if ( diff_shift < 0.0f ) diff_shift = -diff_shift; + if ( ( diff_scale <= stbir__small_float ) && ( diff_shift <= stbir__small_float ) ) + { + if ( horizontal->is_gather == vertical->is_gather ) + { + copy_horizontal = 1; + goto no_vert_alloc; + } + // everything matches, but vertical is scatter, horizontal is gather, use horizontal coeffs for vertical pivot coeffs + possibly_use_horizontal_for_pivot = horizontal; + } + } + + STBIR__NEXT_PTR( vertical->contributors, vertical->contributors_size, stbir__contributors ); + STBIR__NEXT_PTR( vertical->coefficients, vertical->coefficients_size, float ); + + no_vert_alloc: + + if ( info ) + { + STBIR_PROFILE_BUILD_START( horizontal ); + + stbir__calculate_filters( horizontal, 0, user_data STBIR_ONLY_PROFILE_BUILD_SET_INFO ); + + // setup the horizontal gather functions + // start with defaulting to the n_coeffs functions (specialized on channels and remnant leftover) + info->horizontal_gather_channels = stbir__horizontal_gather_n_coeffs_funcs[ effective_channels ][ horizontal->extent_info.widest & 3 ]; + // but if the number of coeffs <= 12, use another set of special cases. <=12 coeffs is any enlarging resize, or shrinking resize down to about 1/3 size + if ( horizontal->extent_info.widest <= 12 ) + info->horizontal_gather_channels = stbir__horizontal_gather_channels_funcs[ effective_channels ][ horizontal->extent_info.widest - 1 ]; + + info->scanline_extents.conservative.n0 = conservative->n0; + info->scanline_extents.conservative.n1 = conservative->n1; + + // get exact extents + stbir__get_extents( horizontal, &info->scanline_extents ); + + // pack the horizontal coeffs + horizontal->coefficient_width = stbir__pack_coefficients(horizontal->num_contributors, horizontal->contributors, horizontal->coefficients, horizontal->coefficient_width, horizontal->extent_info.widest, info->scanline_extents.conservative.n0, info->scanline_extents.conservative.n1 ); + + STBIR_MEMCPY( &info->horizontal, horizontal, sizeof( stbir__sampler ) ); + + STBIR_PROFILE_BUILD_END( horizontal ); + + if ( copy_horizontal ) + { + STBIR_MEMCPY( &info->vertical, horizontal, sizeof( stbir__sampler ) ); + } + else + { + STBIR_PROFILE_BUILD_START( vertical ); + + stbir__calculate_filters( vertical, possibly_use_horizontal_for_pivot, user_data STBIR_ONLY_PROFILE_BUILD_SET_INFO ); + STBIR_MEMCPY( &info->vertical, vertical, sizeof( stbir__sampler ) ); + + STBIR_PROFILE_BUILD_END( vertical ); + } + + // setup the vertical split ranges + stbir__get_split_info( info->split_info, info->splits, info->vertical.scale_info.output_sub_size, info->vertical.filter_pixel_margin, info->vertical.scale_info.input_full_size, info->vertical.is_gather, info->vertical.contributors ); + + // now we know precisely how many entries we need + info->ring_buffer_num_entries = info->vertical.extent_info.widest; + + // we never need more ring buffer entries than the scanlines we're outputting + if ( ( !info->vertical.is_gather ) && ( info->ring_buffer_num_entries > conservative_split_output_size ) ) + info->ring_buffer_num_entries = conservative_split_output_size; + STBIR_ASSERT( info->ring_buffer_num_entries <= info->alloc_ring_buffer_num_entries ); + } + #undef STBIR__NEXT_PTR + + + // is this the first time through loop? + if ( info == 0 ) + { + alloced_total = ( 15 + (size_t)advance_mem ); + alloced = STBIR_MALLOC( alloced_total, user_data ); + if ( alloced == 0 ) + return 0; + } + else + return info; // success + } +} + +static int stbir__perform_resize( stbir__info const * info, int split_start, int split_count ) +{ + stbir__per_split_info * split_info = info->split_info + split_start; + + STBIR_PROFILE_CLEAR_EXTRAS(); + + STBIR_PROFILE_FIRST_START( looping ); + if (info->vertical.is_gather) + stbir__vertical_gather_loop( info, split_info, split_count ); + else + stbir__vertical_scatter_loop( info, split_info, split_count ); + STBIR_PROFILE_END( looping ); + + return 1; +} + +static void stbir__update_info_from_resize( stbir__info * info, STBIR_RESIZE * resize ) +{ + static stbir__decode_pixels_func * decode_simple[STBIR_TYPE_HALF_FLOAT-STBIR_TYPE_UINT8_SRGB+1]= + { + /* 1ch-4ch */ stbir__decode_uint8_srgb, stbir__decode_uint8_srgb, 0, stbir__decode_float_linear, stbir__decode_half_float_linear, + }; + + static stbir__decode_pixels_func * decode_alphas[STBIRI_AR-STBIRI_RGBA+1][STBIR_TYPE_HALF_FLOAT-STBIR_TYPE_UINT8_SRGB+1]= + { + { /* RGBA */ stbir__decode_uint8_srgb4_linearalpha, stbir__decode_uint8_srgb, 0, stbir__decode_float_linear, stbir__decode_half_float_linear }, + { /* BGRA */ stbir__decode_uint8_srgb4_linearalpha_BGRA, stbir__decode_uint8_srgb_BGRA, 0, stbir__decode_float_linear_BGRA, stbir__decode_half_float_linear_BGRA }, + { /* ARGB */ stbir__decode_uint8_srgb4_linearalpha_ARGB, stbir__decode_uint8_srgb_ARGB, 0, stbir__decode_float_linear_ARGB, stbir__decode_half_float_linear_ARGB }, + { /* ABGR */ stbir__decode_uint8_srgb4_linearalpha_ABGR, stbir__decode_uint8_srgb_ABGR, 0, stbir__decode_float_linear_ABGR, stbir__decode_half_float_linear_ABGR }, + { /* RA */ stbir__decode_uint8_srgb2_linearalpha, stbir__decode_uint8_srgb, 0, stbir__decode_float_linear, stbir__decode_half_float_linear }, + { /* AR */ stbir__decode_uint8_srgb2_linearalpha_AR, stbir__decode_uint8_srgb_AR, 0, stbir__decode_float_linear_AR, stbir__decode_half_float_linear_AR }, + }; + + static stbir__decode_pixels_func * decode_simple_scaled_or_not[2][2]= + { + { stbir__decode_uint8_linear_scaled, stbir__decode_uint8_linear }, { stbir__decode_uint16_linear_scaled, stbir__decode_uint16_linear }, + }; + + static stbir__decode_pixels_func * decode_alphas_scaled_or_not[STBIRI_AR-STBIRI_RGBA+1][2][2]= + { + { /* RGBA */ { stbir__decode_uint8_linear_scaled, stbir__decode_uint8_linear }, { stbir__decode_uint16_linear_scaled, stbir__decode_uint16_linear } }, + { /* BGRA */ { stbir__decode_uint8_linear_scaled_BGRA, stbir__decode_uint8_linear_BGRA }, { stbir__decode_uint16_linear_scaled_BGRA, stbir__decode_uint16_linear_BGRA } }, + { /* ARGB */ { stbir__decode_uint8_linear_scaled_ARGB, stbir__decode_uint8_linear_ARGB }, { stbir__decode_uint16_linear_scaled_ARGB, stbir__decode_uint16_linear_ARGB } }, + { /* ABGR */ { stbir__decode_uint8_linear_scaled_ABGR, stbir__decode_uint8_linear_ABGR }, { stbir__decode_uint16_linear_scaled_ABGR, stbir__decode_uint16_linear_ABGR } }, + { /* RA */ { stbir__decode_uint8_linear_scaled, stbir__decode_uint8_linear }, { stbir__decode_uint16_linear_scaled, stbir__decode_uint16_linear } }, + { /* AR */ { stbir__decode_uint8_linear_scaled_AR, stbir__decode_uint8_linear_AR }, { stbir__decode_uint16_linear_scaled_AR, stbir__decode_uint16_linear_AR } } + }; + + static stbir__encode_pixels_func * encode_simple[STBIR_TYPE_HALF_FLOAT-STBIR_TYPE_UINT8_SRGB+1]= + { + /* 1ch-4ch */ stbir__encode_uint8_srgb, stbir__encode_uint8_srgb, 0, stbir__encode_float_linear, stbir__encode_half_float_linear, + }; + + static stbir__encode_pixels_func * encode_alphas[STBIRI_AR-STBIRI_RGBA+1][STBIR_TYPE_HALF_FLOAT-STBIR_TYPE_UINT8_SRGB+1]= + { + { /* RGBA */ stbir__encode_uint8_srgb4_linearalpha, stbir__encode_uint8_srgb, 0, stbir__encode_float_linear, stbir__encode_half_float_linear }, + { /* BGRA */ stbir__encode_uint8_srgb4_linearalpha_BGRA, stbir__encode_uint8_srgb_BGRA, 0, stbir__encode_float_linear_BGRA, stbir__encode_half_float_linear_BGRA }, + { /* ARGB */ stbir__encode_uint8_srgb4_linearalpha_ARGB, stbir__encode_uint8_srgb_ARGB, 0, stbir__encode_float_linear_ARGB, stbir__encode_half_float_linear_ARGB }, + { /* ABGR */ stbir__encode_uint8_srgb4_linearalpha_ABGR, stbir__encode_uint8_srgb_ABGR, 0, stbir__encode_float_linear_ABGR, stbir__encode_half_float_linear_ABGR }, + { /* RA */ stbir__encode_uint8_srgb2_linearalpha, stbir__encode_uint8_srgb, 0, stbir__encode_float_linear, stbir__encode_half_float_linear }, + { /* AR */ stbir__encode_uint8_srgb2_linearalpha_AR, stbir__encode_uint8_srgb_AR, 0, stbir__encode_float_linear_AR, stbir__encode_half_float_linear_AR } + }; + + static stbir__encode_pixels_func * encode_simple_scaled_or_not[2][2]= + { + { stbir__encode_uint8_linear_scaled, stbir__encode_uint8_linear }, { stbir__encode_uint16_linear_scaled, stbir__encode_uint16_linear }, + }; + + static stbir__encode_pixels_func * encode_alphas_scaled_or_not[STBIRI_AR-STBIRI_RGBA+1][2][2]= + { + { /* RGBA */ { stbir__encode_uint8_linear_scaled, stbir__encode_uint8_linear }, { stbir__encode_uint16_linear_scaled, stbir__encode_uint16_linear } }, + { /* BGRA */ { stbir__encode_uint8_linear_scaled_BGRA, stbir__encode_uint8_linear_BGRA }, { stbir__encode_uint16_linear_scaled_BGRA, stbir__encode_uint16_linear_BGRA } }, + { /* ARGB */ { stbir__encode_uint8_linear_scaled_ARGB, stbir__encode_uint8_linear_ARGB }, { stbir__encode_uint16_linear_scaled_ARGB, stbir__encode_uint16_linear_ARGB } }, + { /* ABGR */ { stbir__encode_uint8_linear_scaled_ABGR, stbir__encode_uint8_linear_ABGR }, { stbir__encode_uint16_linear_scaled_ABGR, stbir__encode_uint16_linear_ABGR } }, + { /* RA */ { stbir__encode_uint8_linear_scaled, stbir__encode_uint8_linear }, { stbir__encode_uint16_linear_scaled, stbir__encode_uint16_linear } }, + { /* AR */ { stbir__encode_uint8_linear_scaled_AR, stbir__encode_uint8_linear_AR }, { stbir__encode_uint16_linear_scaled_AR, stbir__encode_uint16_linear_AR } } + }; + + stbir__decode_pixels_func * decode_pixels = 0; + stbir__encode_pixels_func * encode_pixels = 0; + stbir_datatype input_type, output_type; + + input_type = resize->input_data_type; + output_type = resize->output_data_type; + info->input_data = resize->input_pixels; + info->input_stride_bytes = resize->input_stride_in_bytes; + info->output_stride_bytes = resize->output_stride_in_bytes; + + // if we're completely point sampling, then we can turn off SRGB + if ( ( info->horizontal.filter_enum == STBIR_FILTER_POINT_SAMPLE ) && ( info->vertical.filter_enum == STBIR_FILTER_POINT_SAMPLE ) ) + { + if ( ( ( input_type == STBIR_TYPE_UINT8_SRGB ) || ( input_type == STBIR_TYPE_UINT8_SRGB_ALPHA ) ) && + ( ( output_type == STBIR_TYPE_UINT8_SRGB ) || ( output_type == STBIR_TYPE_UINT8_SRGB_ALPHA ) ) ) + { + input_type = STBIR_TYPE_UINT8; + output_type = STBIR_TYPE_UINT8; + } + } + + // recalc the output and input strides + if ( info->input_stride_bytes == 0 ) + info->input_stride_bytes = info->channels * info->horizontal.scale_info.input_full_size * stbir__type_size[input_type]; + + if ( info->output_stride_bytes == 0 ) + info->output_stride_bytes = info->channels * info->horizontal.scale_info.output_sub_size * stbir__type_size[output_type]; + + // calc offset + info->output_data = ( (char*) resize->output_pixels ) + ( (size_t) info->offset_y * (size_t) resize->output_stride_in_bytes ) + ( info->offset_x * info->channels * stbir__type_size[output_type] ); + + info->in_pixels_cb = resize->input_cb; + info->user_data = resize->user_data; + info->out_pixels_cb = resize->output_cb; + + // setup the input format converters + if ( ( input_type == STBIR_TYPE_UINT8 ) || ( input_type == STBIR_TYPE_UINT16 ) ) + { + int non_scaled = 0; + + // check if we can run unscaled - 0-255.0/0-65535.0 instead of 0-1.0 (which is a tiny bit faster when doing linear 8->8 or 16->16) + if ( ( !info->alpha_weight ) && ( !info->alpha_unweight ) ) // don't short circuit when alpha weighting (get everything to 0-1.0 as usual) + if ( ( ( input_type == STBIR_TYPE_UINT8 ) && ( output_type == STBIR_TYPE_UINT8 ) ) || ( ( input_type == STBIR_TYPE_UINT16 ) && ( output_type == STBIR_TYPE_UINT16 ) ) ) + non_scaled = 1; + + if ( info->input_pixel_layout_internal <= STBIRI_4CHANNEL ) + decode_pixels = decode_simple_scaled_or_not[ input_type == STBIR_TYPE_UINT16 ][ non_scaled ]; + else + decode_pixels = decode_alphas_scaled_or_not[ ( info->input_pixel_layout_internal - STBIRI_RGBA ) % ( STBIRI_AR-STBIRI_RGBA+1 ) ][ input_type == STBIR_TYPE_UINT16 ][ non_scaled ]; + } + else + { + if ( info->input_pixel_layout_internal <= STBIRI_4CHANNEL ) + decode_pixels = decode_simple[ input_type - STBIR_TYPE_UINT8_SRGB ]; + else + decode_pixels = decode_alphas[ ( info->input_pixel_layout_internal - STBIRI_RGBA ) % ( STBIRI_AR-STBIRI_RGBA+1 ) ][ input_type - STBIR_TYPE_UINT8_SRGB ]; + } + + // setup the output format converters + if ( ( output_type == STBIR_TYPE_UINT8 ) || ( output_type == STBIR_TYPE_UINT16 ) ) + { + int non_scaled = 0; + + // check if we can run unscaled - 0-255.0/0-65535.0 instead of 0-1.0 (which is a tiny bit faster when doing linear 8->8 or 16->16) + if ( ( !info->alpha_weight ) && ( !info->alpha_unweight ) ) // don't short circuit when alpha weighting (get everything to 0-1.0 as usual) + if ( ( ( input_type == STBIR_TYPE_UINT8 ) && ( output_type == STBIR_TYPE_UINT8 ) ) || ( ( input_type == STBIR_TYPE_UINT16 ) && ( output_type == STBIR_TYPE_UINT16 ) ) ) + non_scaled = 1; + + if ( info->output_pixel_layout_internal <= STBIRI_4CHANNEL ) + encode_pixels = encode_simple_scaled_or_not[ output_type == STBIR_TYPE_UINT16 ][ non_scaled ]; + else + encode_pixels = encode_alphas_scaled_or_not[ ( info->output_pixel_layout_internal - STBIRI_RGBA ) % ( STBIRI_AR-STBIRI_RGBA+1 ) ][ output_type == STBIR_TYPE_UINT16 ][ non_scaled ]; + } + else + { + if ( info->output_pixel_layout_internal <= STBIRI_4CHANNEL ) + encode_pixels = encode_simple[ output_type - STBIR_TYPE_UINT8_SRGB ]; + else + encode_pixels = encode_alphas[ ( info->output_pixel_layout_internal - STBIRI_RGBA ) % ( STBIRI_AR-STBIRI_RGBA+1 ) ][ output_type - STBIR_TYPE_UINT8_SRGB ]; + } + + info->input_type = input_type; + info->output_type = output_type; + info->decode_pixels = decode_pixels; + info->encode_pixels = encode_pixels; +} + +static void stbir__clip( int * outx, int * outsubw, int outw, double * u0, double * u1 ) +{ + double per, adj; + int over; + + // do left/top edge + if ( *outx < 0 ) + { + per = ( (double)*outx ) / ( (double)*outsubw ); // is negative + adj = per * ( *u1 - *u0 ); + *u0 -= adj; // increases u0 + *outx = 0; + } + + // do right/bot edge + over = outw - ( *outx + *outsubw ); + if ( over < 0 ) + { + per = ( (double)over ) / ( (double)*outsubw ); // is negative + adj = per * ( *u1 - *u0 ); + *u1 += adj; // decrease u1 + *outsubw = outw - *outx; + } +} + +// converts a double to a rational that has less than one float bit of error (returns 0 if unable to do so) +static int stbir__double_to_rational(double f, stbir_uint32 limit, stbir_uint32 *numer, stbir_uint32 *denom, int limit_denom ) // limit_denom (1) or limit numer (0) +{ + double err; + stbir_uint64 top, bot; + stbir_uint64 numer_last = 0; + stbir_uint64 denom_last = 1; + stbir_uint64 numer_estimate = 1; + stbir_uint64 denom_estimate = 0; + + // scale to past float error range + top = (stbir_uint64)( f * (double)(1 << 25) ); + bot = 1 << 25; + + // keep refining, but usually stops in a few loops - usually 5 for bad cases + for(;;) + { + stbir_uint64 est, temp; + + // hit limit, break out and do best full range estimate + if ( ( ( limit_denom ) ? denom_estimate : numer_estimate ) >= limit ) + break; + + // is the current error less than 1 bit of a float? if so, we're done + if ( denom_estimate ) + { + err = ( (double)numer_estimate / (double)denom_estimate ) - f; + if ( err < 0.0 ) err = -err; + if ( err < ( 1.0 / (double)(1<<24) ) ) + { + // yup, found it + *numer = (stbir_uint32) numer_estimate; + *denom = (stbir_uint32) denom_estimate; + return 1; + } + } + + // no more refinement bits left? break out and do full range estimate + if ( bot == 0 ) + break; + + // gcd the estimate bits + est = top / bot; + temp = top % bot; + top = bot; + bot = temp; + + // move remainders + temp = est * denom_estimate + denom_last; + denom_last = denom_estimate; + denom_estimate = temp; + + // move remainders + temp = est * numer_estimate + numer_last; + numer_last = numer_estimate; + numer_estimate = temp; + } + + // we didn't fine anything good enough for float, use a full range estimate + if ( limit_denom ) + { + numer_estimate= (stbir_uint64)( f * (double)limit + 0.5 ); + denom_estimate = limit; + } + else + { + numer_estimate = limit; + denom_estimate = (stbir_uint64)( ( (double)limit / f ) + 0.5 ); + } + + *numer = (stbir_uint32) numer_estimate; + *denom = (stbir_uint32) denom_estimate; + + err = ( denom_estimate ) ? ( ( (double)(stbir_uint32)numer_estimate / (double)(stbir_uint32)denom_estimate ) - f ) : 1.0; + if ( err < 0.0 ) err = -err; + return ( err < ( 1.0 / (double)(1<<24) ) ) ? 1 : 0; +} + +static int stbir__calculate_region_transform( stbir__scale_info * scale_info, int output_full_range, int * output_offset, int output_sub_range, int input_full_range, double input_s0, double input_s1 ) +{ + double output_range, input_range, output_s, input_s, ratio, scale; + + input_s = input_s1 - input_s0; + + // null area + if ( ( output_full_range == 0 ) || ( input_full_range == 0 ) || + ( output_sub_range == 0 ) || ( input_s <= stbir__small_float ) ) + return 0; + + // are either of the ranges completely out of bounds? + if ( ( *output_offset >= output_full_range ) || ( ( *output_offset + output_sub_range ) <= 0 ) || ( input_s0 >= (1.0f-stbir__small_float) ) || ( input_s1 <= stbir__small_float ) ) + return 0; + + output_range = (double)output_full_range; + input_range = (double)input_full_range; + + output_s = ( (double)output_sub_range) / output_range; + + // figure out the scaling to use + ratio = output_s / input_s; + + // save scale before clipping + scale = ( output_range / input_range ) * ratio; + scale_info->scale = (float)scale; + scale_info->inv_scale = (float)( 1.0 / scale ); + + // clip output area to left/right output edges (and adjust input area) + stbir__clip( output_offset, &output_sub_range, output_full_range, &input_s0, &input_s1 ); + + // recalc input area + input_s = input_s1 - input_s0; + + // after clipping do we have zero input area? + if ( input_s <= stbir__small_float ) + return 0; + + // calculate and store the starting source offsets in output pixel space + scale_info->pixel_shift = (float) ( input_s0 * ratio * output_range ); + + scale_info->scale_is_rational = stbir__double_to_rational( scale, ( scale <= 1.0 ) ? output_full_range : input_full_range, &scale_info->scale_numerator, &scale_info->scale_denominator, ( scale >= 1.0 ) ); + + scale_info->input_full_size = input_full_range; + scale_info->output_sub_size = output_sub_range; + + return 1; +} + + +static void stbir__init_and_set_layout( STBIR_RESIZE * resize, stbir_pixel_layout pixel_layout, stbir_datatype data_type ) +{ + resize->input_cb = 0; + resize->output_cb = 0; + resize->user_data = resize; + resize->samplers = 0; + resize->called_alloc = 0; + resize->horizontal_filter = STBIR_FILTER_DEFAULT; + resize->horizontal_filter_kernel = 0; resize->horizontal_filter_support = 0; + resize->vertical_filter = STBIR_FILTER_DEFAULT; + resize->vertical_filter_kernel = 0; resize->vertical_filter_support = 0; + resize->horizontal_edge = STBIR_EDGE_CLAMP; + resize->vertical_edge = STBIR_EDGE_CLAMP; + resize->input_s0 = 0; resize->input_t0 = 0; resize->input_s1 = 1; resize->input_t1 = 1; + resize->output_subx = 0; resize->output_suby = 0; resize->output_subw = resize->output_w; resize->output_subh = resize->output_h; + resize->input_data_type = data_type; + resize->output_data_type = data_type; + resize->input_pixel_layout_public = pixel_layout; + resize->output_pixel_layout_public = pixel_layout; + resize->needs_rebuild = 1; +} + +STBIRDEF void stbir_resize_init( STBIR_RESIZE * resize, + const void *input_pixels, int input_w, int input_h, int input_stride_in_bytes, // stride can be zero + void *output_pixels, int output_w, int output_h, int output_stride_in_bytes, // stride can be zero + stbir_pixel_layout pixel_layout, stbir_datatype data_type ) +{ + resize->input_pixels = input_pixels; + resize->input_w = input_w; + resize->input_h = input_h; + resize->input_stride_in_bytes = input_stride_in_bytes; + resize->output_pixels = output_pixels; + resize->output_w = output_w; + resize->output_h = output_h; + resize->output_stride_in_bytes = output_stride_in_bytes; + resize->fast_alpha = 0; + + stbir__init_and_set_layout( resize, pixel_layout, data_type ); +} + +// You can update parameters any time after resize_init +STBIRDEF void stbir_set_datatypes( STBIR_RESIZE * resize, stbir_datatype input_type, stbir_datatype output_type ) // by default, datatype from resize_init +{ + resize->input_data_type = input_type; + resize->output_data_type = output_type; + if ( ( resize->samplers ) && ( !resize->needs_rebuild ) ) + stbir__update_info_from_resize( resize->samplers, resize ); +} + +STBIRDEF void stbir_set_pixel_callbacks( STBIR_RESIZE * resize, stbir_input_callback * input_cb, stbir_output_callback * output_cb ) // no callbacks by default +{ + resize->input_cb = input_cb; + resize->output_cb = output_cb; + + if ( ( resize->samplers ) && ( !resize->needs_rebuild ) ) + { + resize->samplers->in_pixels_cb = input_cb; + resize->samplers->out_pixels_cb = output_cb; + } +} + +STBIRDEF void stbir_set_user_data( STBIR_RESIZE * resize, void * user_data ) // pass back STBIR_RESIZE* by default +{ + resize->user_data = user_data; + if ( ( resize->samplers ) && ( !resize->needs_rebuild ) ) + resize->samplers->user_data = user_data; +} + +STBIRDEF void stbir_set_buffer_ptrs( STBIR_RESIZE * resize, const void * input_pixels, int input_stride_in_bytes, void * output_pixels, int output_stride_in_bytes ) +{ + resize->input_pixels = input_pixels; + resize->input_stride_in_bytes = input_stride_in_bytes; + resize->output_pixels = output_pixels; + resize->output_stride_in_bytes = output_stride_in_bytes; + if ( ( resize->samplers ) && ( !resize->needs_rebuild ) ) + stbir__update_info_from_resize( resize->samplers, resize ); +} + + +STBIRDEF int stbir_set_edgemodes( STBIR_RESIZE * resize, stbir_edge horizontal_edge, stbir_edge vertical_edge ) // CLAMP by default +{ + resize->horizontal_edge = horizontal_edge; + resize->vertical_edge = vertical_edge; + resize->needs_rebuild = 1; + return 1; +} + +STBIRDEF int stbir_set_filters( STBIR_RESIZE * resize, stbir_filter horizontal_filter, stbir_filter vertical_filter ) // STBIR_DEFAULT_FILTER_UPSAMPLE/DOWNSAMPLE by default +{ + resize->horizontal_filter = horizontal_filter; + resize->vertical_filter = vertical_filter; + resize->needs_rebuild = 1; + return 1; +} + +STBIRDEF int stbir_set_filter_callbacks( STBIR_RESIZE * resize, stbir__kernel_callback * horizontal_filter, stbir__support_callback * horizontal_support, stbir__kernel_callback * vertical_filter, stbir__support_callback * vertical_support ) +{ + resize->horizontal_filter_kernel = horizontal_filter; resize->horizontal_filter_support = horizontal_support; + resize->vertical_filter_kernel = vertical_filter; resize->vertical_filter_support = vertical_support; + resize->needs_rebuild = 1; + return 1; +} + +STBIRDEF int stbir_set_pixel_layouts( STBIR_RESIZE * resize, stbir_pixel_layout input_pixel_layout, stbir_pixel_layout output_pixel_layout ) // sets new pixel layouts +{ + resize->input_pixel_layout_public = input_pixel_layout; + resize->output_pixel_layout_public = output_pixel_layout; + resize->needs_rebuild = 1; + return 1; +} + + +STBIRDEF int stbir_set_non_pm_alpha_speed_over_quality( STBIR_RESIZE * resize, int non_pma_alpha_speed_over_quality ) // sets alpha speed +{ + resize->fast_alpha = non_pma_alpha_speed_over_quality; + resize->needs_rebuild = 1; + return 1; +} + +STBIRDEF int stbir_set_input_subrect( STBIR_RESIZE * resize, double s0, double t0, double s1, double t1 ) // sets input region (full region by default) +{ + resize->input_s0 = s0; + resize->input_t0 = t0; + resize->input_s1 = s1; + resize->input_t1 = t1; + resize->needs_rebuild = 1; + + // are we inbounds? + if ( ( s1 < stbir__small_float ) || ( (s1-s0) < stbir__small_float ) || + ( t1 < stbir__small_float ) || ( (t1-t0) < stbir__small_float ) || + ( s0 > (1.0f-stbir__small_float) ) || + ( t0 > (1.0f-stbir__small_float) ) ) + return 0; + + return 1; +} + +STBIRDEF int stbir_set_output_pixel_subrect( STBIR_RESIZE * resize, int subx, int suby, int subw, int subh ) // sets input region (full region by default) +{ + resize->output_subx = subx; + resize->output_suby = suby; + resize->output_subw = subw; + resize->output_subh = subh; + resize->needs_rebuild = 1; + + // are we inbounds? + if ( ( subx >= resize->output_w ) || ( ( subx + subw ) <= 0 ) || ( suby >= resize->output_h ) || ( ( suby + subh ) <= 0 ) || ( subw == 0 ) || ( subh == 0 ) ) + return 0; + + return 1; +} + +STBIRDEF int stbir_set_pixel_subrect( STBIR_RESIZE * resize, int subx, int suby, int subw, int subh ) // sets both regions (full regions by default) +{ + double s0, t0, s1, t1; + + s0 = ( (double)subx ) / ( (double)resize->output_w ); + t0 = ( (double)suby ) / ( (double)resize->output_h ); + s1 = ( (double)(subx+subw) ) / ( (double)resize->output_w ); + t1 = ( (double)(suby+subh) ) / ( (double)resize->output_h ); + + resize->input_s0 = s0; + resize->input_t0 = t0; + resize->input_s1 = s1; + resize->input_t1 = t1; + resize->output_subx = subx; + resize->output_suby = suby; + resize->output_subw = subw; + resize->output_subh = subh; + resize->needs_rebuild = 1; + + // are we inbounds? + if ( ( subx >= resize->output_w ) || ( ( subx + subw ) <= 0 ) || ( suby >= resize->output_h ) || ( ( suby + subh ) <= 0 ) || ( subw == 0 ) || ( subh == 0 ) ) + return 0; + + return 1; +} + +static int stbir__perform_build( STBIR_RESIZE * resize, int splits ) +{ + stbir__contributors conservative = { 0, 0 }; + stbir__sampler horizontal, vertical; + int new_output_subx, new_output_suby; + stbir__info * out_info; + #ifdef STBIR_PROFILE + stbir__info profile_infod; // used to contain building profile info before everything is allocated + stbir__info * profile_info = &profile_infod; + #endif + + // have we already built the samplers? + if ( resize->samplers ) + return 0; + + #define STBIR_RETURN_ERROR_AND_ASSERT( exp ) STBIR_ASSERT( !(exp) ); if (exp) return 0; + STBIR_RETURN_ERROR_AND_ASSERT( (unsigned)resize->horizontal_filter >= STBIR_FILTER_OTHER) + STBIR_RETURN_ERROR_AND_ASSERT( (unsigned)resize->vertical_filter >= STBIR_FILTER_OTHER) + #undef STBIR_RETURN_ERROR_AND_ASSERT + + if ( splits <= 0 ) + return 0; + + STBIR_PROFILE_BUILD_FIRST_START( build ); + + new_output_subx = resize->output_subx; + new_output_suby = resize->output_suby; + + // do horizontal clip and scale calcs + if ( !stbir__calculate_region_transform( &horizontal.scale_info, resize->output_w, &new_output_subx, resize->output_subw, resize->input_w, resize->input_s0, resize->input_s1 ) ) + return 0; + + // do vertical clip and scale calcs + if ( !stbir__calculate_region_transform( &vertical.scale_info, resize->output_h, &new_output_suby, resize->output_subh, resize->input_h, resize->input_t0, resize->input_t1 ) ) + return 0; + + // if nothing to do, just return + if ( ( horizontal.scale_info.output_sub_size == 0 ) || ( vertical.scale_info.output_sub_size == 0 ) ) + return 0; + + stbir__set_sampler(&horizontal, resize->horizontal_filter, resize->horizontal_filter_kernel, resize->horizontal_filter_support, resize->horizontal_edge, &horizontal.scale_info, 1, resize->user_data ); + stbir__get_conservative_extents( &horizontal, &conservative, resize->user_data ); + stbir__set_sampler(&vertical, resize->vertical_filter, resize->vertical_filter_kernel, resize->vertical_filter_support, resize->vertical_edge, &vertical.scale_info, 0, resize->user_data ); + + if ( ( vertical.scale_info.output_sub_size / splits ) < STBIR_FORCE_MINIMUM_SCANLINES_FOR_SPLITS ) // each split should be a minimum of 4 scanlines (handwavey choice) + { + splits = vertical.scale_info.output_sub_size / STBIR_FORCE_MINIMUM_SCANLINES_FOR_SPLITS; + if ( splits == 0 ) splits = 1; + } + + STBIR_PROFILE_BUILD_START( alloc ); + out_info = stbir__alloc_internal_mem_and_build_samplers( &horizontal, &vertical, &conservative, resize->input_pixel_layout_public, resize->output_pixel_layout_public, splits, new_output_subx, new_output_suby, resize->fast_alpha, resize->user_data STBIR_ONLY_PROFILE_BUILD_SET_INFO ); + STBIR_PROFILE_BUILD_END( alloc ); + STBIR_PROFILE_BUILD_END( build ); + + if ( out_info ) + { + resize->splits = splits; + resize->samplers = out_info; + resize->needs_rebuild = 0; + #ifdef STBIR_PROFILE + STBIR_MEMCPY( &out_info->profile, &profile_infod.profile, sizeof( out_info->profile ) ); + #endif + + // update anything that can be changed without recalcing samplers + stbir__update_info_from_resize( out_info, resize ); + + return splits; + } + + return 0; +} + +void stbir_free_samplers( STBIR_RESIZE * resize ) +{ + if ( resize->samplers ) + { + stbir__free_internal_mem( resize->samplers ); + resize->samplers = 0; + resize->called_alloc = 0; + } +} + +STBIRDEF int stbir_build_samplers_with_splits( STBIR_RESIZE * resize, int splits ) +{ + if ( ( resize->samplers == 0 ) || ( resize->needs_rebuild ) ) + { + if ( resize->samplers ) + stbir_free_samplers( resize ); + + resize->called_alloc = 1; + return stbir__perform_build( resize, splits ); + } + + STBIR_PROFILE_BUILD_CLEAR( resize->samplers ); + + return 1; +} + +STBIRDEF int stbir_build_samplers( STBIR_RESIZE * resize ) +{ + return stbir_build_samplers_with_splits( resize, 1 ); +} + +STBIRDEF int stbir_resize_extended( STBIR_RESIZE * resize ) +{ + int result; + + if ( ( resize->samplers == 0 ) || ( resize->needs_rebuild ) ) + { + int alloc_state = resize->called_alloc; // remember allocated state + + if ( resize->samplers ) + { + stbir__free_internal_mem( resize->samplers ); + resize->samplers = 0; + } + + if ( !stbir_build_samplers( resize ) ) + return 0; + + resize->called_alloc = alloc_state; + + // if build_samplers succeeded (above), but there are no samplers set, then + // the area to stretch into was zero pixels, so don't do anything and return + // success + if ( resize->samplers == 0 ) + return 1; + } + else + { + // didn't build anything - clear it + STBIR_PROFILE_BUILD_CLEAR( resize->samplers ); + } + + // do resize + result = stbir__perform_resize( resize->samplers, 0, resize->splits ); + + // if we alloced, then free + if ( !resize->called_alloc ) + { + stbir_free_samplers( resize ); + resize->samplers = 0; + } + + return result; +} + +STBIRDEF int stbir_resize_extended_split( STBIR_RESIZE * resize, int split_start, int split_count ) +{ + STBIR_ASSERT( resize->samplers ); + + // if we're just doing the whole thing, call full + if ( ( split_start == -1 ) || ( ( split_start == 0 ) && ( split_count == resize->splits ) ) ) + return stbir_resize_extended( resize ); + + // you **must** build samplers first when using split resize + if ( ( resize->samplers == 0 ) || ( resize->needs_rebuild ) ) + return 0; + + if ( ( split_start >= resize->splits ) || ( split_start < 0 ) || ( ( split_start + split_count ) > resize->splits ) || ( split_count <= 0 ) ) + return 0; + + // do resize + return stbir__perform_resize( resize->samplers, split_start, split_count ); +} + + +static void * stbir_quick_resize_helper( const void *input_pixels , int input_w , int input_h, int input_stride_in_bytes, + void *output_pixels, int output_w, int output_h, int output_stride_in_bytes, + stbir_pixel_layout pixel_layout, stbir_datatype data_type, stbir_edge edge, stbir_filter filter ) +{ + STBIR_RESIZE resize; + int scanline_output_in_bytes; + int positive_output_stride_in_bytes; + void * start_ptr; + void * free_ptr; + + scanline_output_in_bytes = output_w * stbir__type_size[ data_type ] * stbir__pixel_channels[ stbir__pixel_layout_convert_public_to_internal[ pixel_layout ] ]; + if ( scanline_output_in_bytes == 0 ) + return 0; + + // if zero stride, use scanline output + if ( output_stride_in_bytes == 0 ) + output_stride_in_bytes = scanline_output_in_bytes; + + // abs value for inverted images (negative pitches) + positive_output_stride_in_bytes = output_stride_in_bytes; + if ( positive_output_stride_in_bytes < 0 ) + positive_output_stride_in_bytes = -positive_output_stride_in_bytes; + + // is the requested stride smaller than the scanline output? if so, just fail + if ( positive_output_stride_in_bytes < scanline_output_in_bytes ) + return 0; + + start_ptr = output_pixels; + free_ptr = 0; // no free pointer, since they passed buffer to use + + // did they pass a zero for the dest? if so, allocate the buffer + if ( output_pixels == 0 ) + { + size_t size; + char * ptr; + + size = (size_t)positive_output_stride_in_bytes * (size_t)output_h; + if ( size == 0 ) + return 0; + + ptr = (char*) STBIR_MALLOC( size, 0 ); + if ( ptr == 0 ) + return 0; + + free_ptr = ptr; + + // point at the last scanline, if they requested a flipped image + if ( output_stride_in_bytes < 0 ) + start_ptr = ptr + ( (size_t)positive_output_stride_in_bytes * (size_t)( output_h - 1 ) ); + else + start_ptr = ptr; + } + + // ok, now do the resize + stbir_resize_init( &resize, + input_pixels, input_w, input_h, input_stride_in_bytes, + start_ptr, output_w, output_h, output_stride_in_bytes, + pixel_layout, data_type ); + + resize.horizontal_edge = edge; + resize.vertical_edge = edge; + resize.horizontal_filter = filter; + resize.vertical_filter = filter; + + if ( !stbir_resize_extended( &resize ) ) + { + if ( free_ptr ) + STBIR_FREE( free_ptr, 0 ); + return 0; + } + + return (free_ptr) ? free_ptr : start_ptr; +} + + + +STBIRDEF unsigned char * stbir_resize_uint8_linear( const unsigned char *input_pixels , int input_w , int input_h, int input_stride_in_bytes, + unsigned char *output_pixels, int output_w, int output_h, int output_stride_in_bytes, + stbir_pixel_layout pixel_layout ) +{ + return (unsigned char *) stbir_quick_resize_helper( input_pixels , input_w , input_h, input_stride_in_bytes, + output_pixels, output_w, output_h, output_stride_in_bytes, + pixel_layout, STBIR_TYPE_UINT8, STBIR_EDGE_CLAMP, STBIR_FILTER_DEFAULT ); +} + +STBIRDEF unsigned char * stbir_resize_uint8_srgb( const unsigned char *input_pixels , int input_w , int input_h, int input_stride_in_bytes, + unsigned char *output_pixels, int output_w, int output_h, int output_stride_in_bytes, + stbir_pixel_layout pixel_layout ) +{ + return (unsigned char *) stbir_quick_resize_helper( input_pixels , input_w , input_h, input_stride_in_bytes, + output_pixels, output_w, output_h, output_stride_in_bytes, + pixel_layout, STBIR_TYPE_UINT8_SRGB, STBIR_EDGE_CLAMP, STBIR_FILTER_DEFAULT ); +} + + +STBIRDEF float * stbir_resize_float_linear( const float *input_pixels , int input_w , int input_h, int input_stride_in_bytes, + float *output_pixels, int output_w, int output_h, int output_stride_in_bytes, + stbir_pixel_layout pixel_layout ) +{ + return (float *) stbir_quick_resize_helper( input_pixels , input_w , input_h, input_stride_in_bytes, + output_pixels, output_w, output_h, output_stride_in_bytes, + pixel_layout, STBIR_TYPE_FLOAT, STBIR_EDGE_CLAMP, STBIR_FILTER_DEFAULT ); +} + + +STBIRDEF void * stbir_resize( const void *input_pixels , int input_w , int input_h, int input_stride_in_bytes, + void *output_pixels, int output_w, int output_h, int output_stride_in_bytes, + stbir_pixel_layout pixel_layout, stbir_datatype data_type, + stbir_edge edge, stbir_filter filter ) +{ + return (void *) stbir_quick_resize_helper( input_pixels , input_w , input_h, input_stride_in_bytes, + output_pixels, output_w, output_h, output_stride_in_bytes, + pixel_layout, data_type, edge, filter ); +} + +#ifdef STBIR_PROFILE + +STBIRDEF void stbir_resize_build_profile_info( STBIR_PROFILE_INFO * info, STBIR_RESIZE const * resize ) +{ + static char const * bdescriptions[6] = { "Building", "Allocating", "Horizontal sampler", "Vertical sampler", "Coefficient cleanup", "Coefficient piovot" } ; + stbir__info* samp = resize->samplers; + int i; + + typedef int testa[ (STBIR__ARRAY_SIZE( bdescriptions ) == (STBIR__ARRAY_SIZE( samp->profile.array )-1) )?1:-1]; + typedef int testb[ (sizeof( samp->profile.array ) == (sizeof(samp->profile.named)) )?1:-1]; + typedef int testc[ (sizeof( info->clocks ) >= (sizeof(samp->profile.named)) )?1:-1]; + + for( i = 0 ; i < STBIR__ARRAY_SIZE( bdescriptions ) ; i++) + info->clocks[i] = samp->profile.array[i+1]; + + info->total_clocks = samp->profile.named.total; + info->descriptions = bdescriptions; + info->count = STBIR__ARRAY_SIZE( bdescriptions ); +} + +STBIRDEF void stbir_resize_split_profile_info( STBIR_PROFILE_INFO * info, STBIR_RESIZE const * resize, int split_start, int split_count ) +{ + static char const * descriptions[7] = { "Looping", "Vertical sampling", "Horizontal sampling", "Scanline input", "Scanline output", "Alpha weighting", "Alpha unweighting" }; + stbir__per_split_info * split_info; + int s, i; + + typedef int testa[ (STBIR__ARRAY_SIZE( descriptions ) == (STBIR__ARRAY_SIZE( split_info->profile.array )-1) )?1:-1]; + typedef int testb[ (sizeof( split_info->profile.array ) == (sizeof(split_info->profile.named)) )?1:-1]; + typedef int testc[ (sizeof( info->clocks ) >= (sizeof(split_info->profile.named)) )?1:-1]; + + if ( split_start == -1 ) + { + split_start = 0; + split_count = resize->samplers->splits; + } + + if ( ( split_start >= resize->splits ) || ( split_start < 0 ) || ( ( split_start + split_count ) > resize->splits ) || ( split_count <= 0 ) ) + { + info->total_clocks = 0; + info->descriptions = 0; + info->count = 0; + return; + } + + split_info = resize->samplers->split_info + split_start; + + // sum up the profile from all the splits + for( i = 0 ; i < STBIR__ARRAY_SIZE( descriptions ) ; i++ ) + { + stbir_uint64 sum = 0; + for( s = 0 ; s < split_count ; s++ ) + sum += split_info[s].profile.array[i+1]; + info->clocks[i] = sum; + } + + info->total_clocks = split_info->profile.named.total; + info->descriptions = descriptions; + info->count = STBIR__ARRAY_SIZE( descriptions ); +} + +STBIRDEF void stbir_resize_extended_profile_info( STBIR_PROFILE_INFO * info, STBIR_RESIZE const * resize ) +{ + stbir_resize_split_profile_info( info, resize, -1, 0 ); +} + +#endif // STBIR_PROFILE + +#undef STBIR_BGR +#undef STBIR_1CHANNEL +#undef STBIR_2CHANNEL +#undef STBIR_RGB +#undef STBIR_RGBA +#undef STBIR_4CHANNEL +#undef STBIR_BGRA +#undef STBIR_ARGB +#undef STBIR_ABGR +#undef STBIR_RA +#undef STBIR_AR +#undef STBIR_RGBA_PM +#undef STBIR_BGRA_PM +#undef STBIR_ARGB_PM +#undef STBIR_ABGR_PM +#undef STBIR_RA_PM +#undef STBIR_AR_PM + +#endif // STB_IMAGE_RESIZE_IMPLEMENTATION + +#else // STB_IMAGE_RESIZE_HORIZONTALS&STB_IMAGE_RESIZE_DO_VERTICALS + +// we reinclude the header file to define all the horizontal functions +// specializing each function for the number of coeffs is 20-40% faster *OVERALL* + +// by including the header file again this way, we can still debug the functions + +#define STBIR_strs_join2( start, mid, end ) start##mid##end +#define STBIR_strs_join1( start, mid, end ) STBIR_strs_join2( start, mid, end ) + +#define STBIR_strs_join24( start, mid1, mid2, end ) start##mid1##mid2##end +#define STBIR_strs_join14( start, mid1, mid2, end ) STBIR_strs_join24( start, mid1, mid2, end ) + +#ifdef STB_IMAGE_RESIZE_DO_CODERS + +#ifdef stbir__decode_suffix +#define STBIR__CODER_NAME( name ) STBIR_strs_join1( name, _, stbir__decode_suffix ) +#else +#define STBIR__CODER_NAME( name ) name +#endif + +#ifdef stbir__decode_swizzle +#define stbir__decode_simdf8_flip(reg) STBIR_strs_join1( STBIR_strs_join1( STBIR_strs_join1( STBIR_strs_join1( stbir__simdf8_0123to,stbir__decode_order0,stbir__decode_order1),stbir__decode_order2,stbir__decode_order3),stbir__decode_order0,stbir__decode_order1),stbir__decode_order2,stbir__decode_order3)(reg, reg) +#define stbir__decode_simdf4_flip(reg) STBIR_strs_join1( STBIR_strs_join1( stbir__simdf_0123to,stbir__decode_order0,stbir__decode_order1),stbir__decode_order2,stbir__decode_order3)(reg, reg) +#define stbir__encode_simdf8_unflip(reg) STBIR_strs_join1( STBIR_strs_join1( STBIR_strs_join1( STBIR_strs_join1( stbir__simdf8_0123to,stbir__encode_order0,stbir__encode_order1),stbir__encode_order2,stbir__encode_order3),stbir__encode_order0,stbir__encode_order1),stbir__encode_order2,stbir__encode_order3)(reg, reg) +#define stbir__encode_simdf4_unflip(reg) STBIR_strs_join1( STBIR_strs_join1( stbir__simdf_0123to,stbir__encode_order0,stbir__encode_order1),stbir__encode_order2,stbir__encode_order3)(reg, reg) +#else +#define stbir__decode_order0 0 +#define stbir__decode_order1 1 +#define stbir__decode_order2 2 +#define stbir__decode_order3 3 +#define stbir__encode_order0 0 +#define stbir__encode_order1 1 +#define stbir__encode_order2 2 +#define stbir__encode_order3 3 +#define stbir__decode_simdf8_flip(reg) +#define stbir__decode_simdf4_flip(reg) +#define stbir__encode_simdf8_unflip(reg) +#define stbir__encode_simdf4_unflip(reg) +#endif + +#ifdef STBIR_SIMD8 +#define stbir__encode_simdfX_unflip stbir__encode_simdf8_unflip +#else +#define stbir__encode_simdfX_unflip stbir__encode_simdf4_unflip +#endif + +static float * STBIR__CODER_NAME( stbir__decode_uint8_linear_scaled )( float * decodep, int width_times_channels, void const * inputp ) +{ + float STBIR_STREAMOUT_PTR( * ) decode = decodep; + float * decode_end = (float*) decode + width_times_channels; + unsigned char const * input = (unsigned char const*)inputp; + + #ifdef STBIR_SIMD + unsigned char const * end_input_m16 = input + width_times_channels - 16; + if ( width_times_channels >= 16 ) + { + decode_end -= 16; + STBIR_NO_UNROLL_LOOP_START_INF_FOR + for(;;) + { + #ifdef STBIR_SIMD8 + stbir__simdi i; stbir__simdi8 o0,o1; + stbir__simdf8 of0, of1; + STBIR_NO_UNROLL(decode); + stbir__simdi_load( i, input ); + stbir__simdi8_expand_u8_to_u32( o0, o1, i ); + stbir__simdi8_convert_i32_to_float( of0, o0 ); + stbir__simdi8_convert_i32_to_float( of1, o1 ); + stbir__simdf8_mult( of0, of0, STBIR_max_uint8_as_float_inverted8); + stbir__simdf8_mult( of1, of1, STBIR_max_uint8_as_float_inverted8); + stbir__decode_simdf8_flip( of0 ); + stbir__decode_simdf8_flip( of1 ); + stbir__simdf8_store( decode + 0, of0 ); + stbir__simdf8_store( decode + 8, of1 ); + #else + stbir__simdi i, o0, o1, o2, o3; + stbir__simdf of0, of1, of2, of3; + STBIR_NO_UNROLL(decode); + stbir__simdi_load( i, input ); + stbir__simdi_expand_u8_to_u32( o0,o1,o2,o3,i); + stbir__simdi_convert_i32_to_float( of0, o0 ); + stbir__simdi_convert_i32_to_float( of1, o1 ); + stbir__simdi_convert_i32_to_float( of2, o2 ); + stbir__simdi_convert_i32_to_float( of3, o3 ); + stbir__simdf_mult( of0, of0, STBIR__CONSTF(STBIR_max_uint8_as_float_inverted) ); + stbir__simdf_mult( of1, of1, STBIR__CONSTF(STBIR_max_uint8_as_float_inverted) ); + stbir__simdf_mult( of2, of2, STBIR__CONSTF(STBIR_max_uint8_as_float_inverted) ); + stbir__simdf_mult( of3, of3, STBIR__CONSTF(STBIR_max_uint8_as_float_inverted) ); + stbir__decode_simdf4_flip( of0 ); + stbir__decode_simdf4_flip( of1 ); + stbir__decode_simdf4_flip( of2 ); + stbir__decode_simdf4_flip( of3 ); + stbir__simdf_store( decode + 0, of0 ); + stbir__simdf_store( decode + 4, of1 ); + stbir__simdf_store( decode + 8, of2 ); + stbir__simdf_store( decode + 12, of3 ); + #endif + decode += 16; + input += 16; + if ( decode <= decode_end ) + continue; + if ( decode == ( decode_end + 16 ) ) + break; + decode = decode_end; // backup and do last couple + input = end_input_m16; + } + return decode_end + 16; + } + #endif + + // try to do blocks of 4 when you can + #if stbir__coder_min_num != 3 // doesn't divide cleanly by four + decode += 4; + STBIR_SIMD_NO_UNROLL_LOOP_START + while( decode <= decode_end ) + { + STBIR_SIMD_NO_UNROLL(decode); + decode[0-4] = ((float)(input[stbir__decode_order0])) * stbir__max_uint8_as_float_inverted; + decode[1-4] = ((float)(input[stbir__decode_order1])) * stbir__max_uint8_as_float_inverted; + decode[2-4] = ((float)(input[stbir__decode_order2])) * stbir__max_uint8_as_float_inverted; + decode[3-4] = ((float)(input[stbir__decode_order3])) * stbir__max_uint8_as_float_inverted; + decode += 4; + input += 4; + } + decode -= 4; + #endif + + // do the remnants + #if stbir__coder_min_num < 4 + STBIR_NO_UNROLL_LOOP_START + while( decode < decode_end ) + { + STBIR_NO_UNROLL(decode); + decode[0] = ((float)(input[stbir__decode_order0])) * stbir__max_uint8_as_float_inverted; + #if stbir__coder_min_num >= 2 + decode[1] = ((float)(input[stbir__decode_order1])) * stbir__max_uint8_as_float_inverted; + #endif + #if stbir__coder_min_num >= 3 + decode[2] = ((float)(input[stbir__decode_order2])) * stbir__max_uint8_as_float_inverted; + #endif + decode += stbir__coder_min_num; + input += stbir__coder_min_num; + } + #endif + + return decode_end; +} + +static void STBIR__CODER_NAME( stbir__encode_uint8_linear_scaled )( void * outputp, int width_times_channels, float const * encode ) +{ + unsigned char STBIR_SIMD_STREAMOUT_PTR( * ) output = (unsigned char *) outputp; + unsigned char * end_output = ( (unsigned char *) output ) + width_times_channels; + + #ifdef STBIR_SIMD + if ( width_times_channels >= stbir__simdfX_float_count*2 ) + { + float const * end_encode_m8 = encode + width_times_channels - stbir__simdfX_float_count*2; + end_output -= stbir__simdfX_float_count*2; + STBIR_NO_UNROLL_LOOP_START_INF_FOR + for(;;) + { + stbir__simdfX e0, e1; + stbir__simdi i; + STBIR_SIMD_NO_UNROLL(encode); + stbir__simdfX_madd_mem( e0, STBIR_simd_point5X, STBIR_max_uint8_as_floatX, encode ); + stbir__simdfX_madd_mem( e1, STBIR_simd_point5X, STBIR_max_uint8_as_floatX, encode+stbir__simdfX_float_count ); + stbir__encode_simdfX_unflip( e0 ); + stbir__encode_simdfX_unflip( e1 ); + #ifdef STBIR_SIMD8 + stbir__simdf8_pack_to_16bytes( i, e0, e1 ); + stbir__simdi_store( output, i ); + #else + stbir__simdf_pack_to_8bytes( i, e0, e1 ); + stbir__simdi_store2( output, i ); + #endif + encode += stbir__simdfX_float_count*2; + output += stbir__simdfX_float_count*2; + if ( output <= end_output ) + continue; + if ( output == ( end_output + stbir__simdfX_float_count*2 ) ) + break; + output = end_output; // backup and do last couple + encode = end_encode_m8; + } + return; + } + + // try to do blocks of 4 when you can + #if stbir__coder_min_num != 3 // doesn't divide cleanly by four + output += 4; + STBIR_NO_UNROLL_LOOP_START + while( output <= end_output ) + { + stbir__simdf e0; + stbir__simdi i0; + STBIR_NO_UNROLL(encode); + stbir__simdf_load( e0, encode ); + stbir__simdf_madd( e0, STBIR__CONSTF(STBIR_simd_point5), STBIR__CONSTF(STBIR_max_uint8_as_float), e0 ); + stbir__encode_simdf4_unflip( e0 ); + stbir__simdf_pack_to_8bytes( i0, e0, e0 ); // only use first 4 + *(int*)(output-4) = stbir__simdi_to_int( i0 ); + output += 4; + encode += 4; + } + output -= 4; + #endif + + // do the remnants + #if stbir__coder_min_num < 4 + STBIR_NO_UNROLL_LOOP_START + while( output < end_output ) + { + stbir__simdf e0; + STBIR_NO_UNROLL(encode); + stbir__simdf_madd1_mem( e0, STBIR__CONSTF(STBIR_simd_point5), STBIR__CONSTF(STBIR_max_uint8_as_float), encode+stbir__encode_order0 ); output[0] = stbir__simdf_convert_float_to_uint8( e0 ); + #if stbir__coder_min_num >= 2 + stbir__simdf_madd1_mem( e0, STBIR__CONSTF(STBIR_simd_point5), STBIR__CONSTF(STBIR_max_uint8_as_float), encode+stbir__encode_order1 ); output[1] = stbir__simdf_convert_float_to_uint8( e0 ); + #endif + #if stbir__coder_min_num >= 3 + stbir__simdf_madd1_mem( e0, STBIR__CONSTF(STBIR_simd_point5), STBIR__CONSTF(STBIR_max_uint8_as_float), encode+stbir__encode_order2 ); output[2] = stbir__simdf_convert_float_to_uint8( e0 ); + #endif + output += stbir__coder_min_num; + encode += stbir__coder_min_num; + } + #endif + + #else + + // try to do blocks of 4 when you can + #if stbir__coder_min_num != 3 // doesn't divide cleanly by four + output += 4; + while( output <= end_output ) + { + float f; + f = encode[stbir__encode_order0] * stbir__max_uint8_as_float + 0.5f; STBIR_CLAMP(f, 0, 255); output[0-4] = (unsigned char)f; + f = encode[stbir__encode_order1] * stbir__max_uint8_as_float + 0.5f; STBIR_CLAMP(f, 0, 255); output[1-4] = (unsigned char)f; + f = encode[stbir__encode_order2] * stbir__max_uint8_as_float + 0.5f; STBIR_CLAMP(f, 0, 255); output[2-4] = (unsigned char)f; + f = encode[stbir__encode_order3] * stbir__max_uint8_as_float + 0.5f; STBIR_CLAMP(f, 0, 255); output[3-4] = (unsigned char)f; + output += 4; + encode += 4; + } + output -= 4; + #endif + + // do the remnants + #if stbir__coder_min_num < 4 + STBIR_NO_UNROLL_LOOP_START + while( output < end_output ) + { + float f; + STBIR_NO_UNROLL(encode); + f = encode[stbir__encode_order0] * stbir__max_uint8_as_float + 0.5f; STBIR_CLAMP(f, 0, 255); output[0] = (unsigned char)f; + #if stbir__coder_min_num >= 2 + f = encode[stbir__encode_order1] * stbir__max_uint8_as_float + 0.5f; STBIR_CLAMP(f, 0, 255); output[1] = (unsigned char)f; + #endif + #if stbir__coder_min_num >= 3 + f = encode[stbir__encode_order2] * stbir__max_uint8_as_float + 0.5f; STBIR_CLAMP(f, 0, 255); output[2] = (unsigned char)f; + #endif + output += stbir__coder_min_num; + encode += stbir__coder_min_num; + } + #endif + #endif +} + +static float * STBIR__CODER_NAME(stbir__decode_uint8_linear)( float * decodep, int width_times_channels, void const * inputp ) +{ + float STBIR_STREAMOUT_PTR( * ) decode = decodep; + float * decode_end = (float*) decode + width_times_channels; + unsigned char const * input = (unsigned char const*)inputp; + + #ifdef STBIR_SIMD + unsigned char const * end_input_m16 = input + width_times_channels - 16; + if ( width_times_channels >= 16 ) + { + decode_end -= 16; + STBIR_NO_UNROLL_LOOP_START_INF_FOR + for(;;) + { + #ifdef STBIR_SIMD8 + stbir__simdi i; stbir__simdi8 o0,o1; + stbir__simdf8 of0, of1; + STBIR_NO_UNROLL(decode); + stbir__simdi_load( i, input ); + stbir__simdi8_expand_u8_to_u32( o0, o1, i ); + stbir__simdi8_convert_i32_to_float( of0, o0 ); + stbir__simdi8_convert_i32_to_float( of1, o1 ); + stbir__decode_simdf8_flip( of0 ); + stbir__decode_simdf8_flip( of1 ); + stbir__simdf8_store( decode + 0, of0 ); + stbir__simdf8_store( decode + 8, of1 ); + #else + stbir__simdi i, o0, o1, o2, o3; + stbir__simdf of0, of1, of2, of3; + STBIR_NO_UNROLL(decode); + stbir__simdi_load( i, input ); + stbir__simdi_expand_u8_to_u32( o0,o1,o2,o3,i); + stbir__simdi_convert_i32_to_float( of0, o0 ); + stbir__simdi_convert_i32_to_float( of1, o1 ); + stbir__simdi_convert_i32_to_float( of2, o2 ); + stbir__simdi_convert_i32_to_float( of3, o3 ); + stbir__decode_simdf4_flip( of0 ); + stbir__decode_simdf4_flip( of1 ); + stbir__decode_simdf4_flip( of2 ); + stbir__decode_simdf4_flip( of3 ); + stbir__simdf_store( decode + 0, of0 ); + stbir__simdf_store( decode + 4, of1 ); + stbir__simdf_store( decode + 8, of2 ); + stbir__simdf_store( decode + 12, of3 ); +#endif + decode += 16; + input += 16; + if ( decode <= decode_end ) + continue; + if ( decode == ( decode_end + 16 ) ) + break; + decode = decode_end; // backup and do last couple + input = end_input_m16; + } + return decode_end + 16; + } + #endif + + // try to do blocks of 4 when you can + #if stbir__coder_min_num != 3 // doesn't divide cleanly by four + decode += 4; + STBIR_SIMD_NO_UNROLL_LOOP_START + while( decode <= decode_end ) + { + STBIR_SIMD_NO_UNROLL(decode); + decode[0-4] = ((float)(input[stbir__decode_order0])); + decode[1-4] = ((float)(input[stbir__decode_order1])); + decode[2-4] = ((float)(input[stbir__decode_order2])); + decode[3-4] = ((float)(input[stbir__decode_order3])); + decode += 4; + input += 4; + } + decode -= 4; + #endif + + // do the remnants + #if stbir__coder_min_num < 4 + STBIR_NO_UNROLL_LOOP_START + while( decode < decode_end ) + { + STBIR_NO_UNROLL(decode); + decode[0] = ((float)(input[stbir__decode_order0])); + #if stbir__coder_min_num >= 2 + decode[1] = ((float)(input[stbir__decode_order1])); + #endif + #if stbir__coder_min_num >= 3 + decode[2] = ((float)(input[stbir__decode_order2])); + #endif + decode += stbir__coder_min_num; + input += stbir__coder_min_num; + } + #endif + return decode_end; +} + +static void STBIR__CODER_NAME( stbir__encode_uint8_linear )( void * outputp, int width_times_channels, float const * encode ) +{ + unsigned char STBIR_SIMD_STREAMOUT_PTR( * ) output = (unsigned char *) outputp; + unsigned char * end_output = ( (unsigned char *) output ) + width_times_channels; + + #ifdef STBIR_SIMD + if ( width_times_channels >= stbir__simdfX_float_count*2 ) + { + float const * end_encode_m8 = encode + width_times_channels - stbir__simdfX_float_count*2; + end_output -= stbir__simdfX_float_count*2; + STBIR_SIMD_NO_UNROLL_LOOP_START_INF_FOR + for(;;) + { + stbir__simdfX e0, e1; + stbir__simdi i; + STBIR_SIMD_NO_UNROLL(encode); + stbir__simdfX_add_mem( e0, STBIR_simd_point5X, encode ); + stbir__simdfX_add_mem( e1, STBIR_simd_point5X, encode+stbir__simdfX_float_count ); + stbir__encode_simdfX_unflip( e0 ); + stbir__encode_simdfX_unflip( e1 ); + #ifdef STBIR_SIMD8 + stbir__simdf8_pack_to_16bytes( i, e0, e1 ); + stbir__simdi_store( output, i ); + #else + stbir__simdf_pack_to_8bytes( i, e0, e1 ); + stbir__simdi_store2( output, i ); + #endif + encode += stbir__simdfX_float_count*2; + output += stbir__simdfX_float_count*2; + if ( output <= end_output ) + continue; + if ( output == ( end_output + stbir__simdfX_float_count*2 ) ) + break; + output = end_output; // backup and do last couple + encode = end_encode_m8; + } + return; + } + + // try to do blocks of 4 when you can + #if stbir__coder_min_num != 3 // doesn't divide cleanly by four + output += 4; + STBIR_NO_UNROLL_LOOP_START + while( output <= end_output ) + { + stbir__simdf e0; + stbir__simdi i0; + STBIR_NO_UNROLL(encode); + stbir__simdf_load( e0, encode ); + stbir__simdf_add( e0, STBIR__CONSTF(STBIR_simd_point5), e0 ); + stbir__encode_simdf4_unflip( e0 ); + stbir__simdf_pack_to_8bytes( i0, e0, e0 ); // only use first 4 + *(int*)(output-4) = stbir__simdi_to_int( i0 ); + output += 4; + encode += 4; + } + output -= 4; + #endif + + #else + + // try to do blocks of 4 when you can + #if stbir__coder_min_num != 3 // doesn't divide cleanly by four + output += 4; + while( output <= end_output ) + { + float f; + f = encode[stbir__encode_order0] + 0.5f; STBIR_CLAMP(f, 0, 255); output[0-4] = (unsigned char)f; + f = encode[stbir__encode_order1] + 0.5f; STBIR_CLAMP(f, 0, 255); output[1-4] = (unsigned char)f; + f = encode[stbir__encode_order2] + 0.5f; STBIR_CLAMP(f, 0, 255); output[2-4] = (unsigned char)f; + f = encode[stbir__encode_order3] + 0.5f; STBIR_CLAMP(f, 0, 255); output[3-4] = (unsigned char)f; + output += 4; + encode += 4; + } + output -= 4; + #endif + + #endif + + // do the remnants + #if stbir__coder_min_num < 4 + STBIR_NO_UNROLL_LOOP_START + while( output < end_output ) + { + float f; + STBIR_NO_UNROLL(encode); + f = encode[stbir__encode_order0] + 0.5f; STBIR_CLAMP(f, 0, 255); output[0] = (unsigned char)f; + #if stbir__coder_min_num >= 2 + f = encode[stbir__encode_order1] + 0.5f; STBIR_CLAMP(f, 0, 255); output[1] = (unsigned char)f; + #endif + #if stbir__coder_min_num >= 3 + f = encode[stbir__encode_order2] + 0.5f; STBIR_CLAMP(f, 0, 255); output[2] = (unsigned char)f; + #endif + output += stbir__coder_min_num; + encode += stbir__coder_min_num; + } + #endif +} + +static float * STBIR__CODER_NAME(stbir__decode_uint8_srgb)( float * decodep, int width_times_channels, void const * inputp ) +{ + float STBIR_STREAMOUT_PTR( * ) decode = decodep; + float * decode_end = (float*) decode + width_times_channels; + unsigned char const * input = (unsigned char const *)inputp; + + // try to do blocks of 4 when you can + #if stbir__coder_min_num != 3 // doesn't divide cleanly by four + decode += 4; + while( decode <= decode_end ) + { + decode[0-4] = stbir__srgb_uchar_to_linear_float[ input[ stbir__decode_order0 ] ]; + decode[1-4] = stbir__srgb_uchar_to_linear_float[ input[ stbir__decode_order1 ] ]; + decode[2-4] = stbir__srgb_uchar_to_linear_float[ input[ stbir__decode_order2 ] ]; + decode[3-4] = stbir__srgb_uchar_to_linear_float[ input[ stbir__decode_order3 ] ]; + decode += 4; + input += 4; + } + decode -= 4; + #endif + + // do the remnants + #if stbir__coder_min_num < 4 + STBIR_NO_UNROLL_LOOP_START + while( decode < decode_end ) + { + STBIR_NO_UNROLL(decode); + decode[0] = stbir__srgb_uchar_to_linear_float[ input[ stbir__decode_order0 ] ]; + #if stbir__coder_min_num >= 2 + decode[1] = stbir__srgb_uchar_to_linear_float[ input[ stbir__decode_order1 ] ]; + #endif + #if stbir__coder_min_num >= 3 + decode[2] = stbir__srgb_uchar_to_linear_float[ input[ stbir__decode_order2 ] ]; + #endif + decode += stbir__coder_min_num; + input += stbir__coder_min_num; + } + #endif + return decode_end; +} + +#define stbir__min_max_shift20( i, f ) \ + stbir__simdf_max( f, f, stbir_simdf_casti(STBIR__CONSTI( STBIR_almost_zero )) ); \ + stbir__simdf_min( f, f, stbir_simdf_casti(STBIR__CONSTI( STBIR_almost_one )) ); \ + stbir__simdi_32shr( i, stbir_simdi_castf( f ), 20 ); + +#define stbir__scale_and_convert( i, f ) \ + stbir__simdf_madd( f, STBIR__CONSTF( STBIR_simd_point5 ), STBIR__CONSTF( STBIR_max_uint8_as_float ), f ); \ + stbir__simdf_max( f, f, stbir__simdf_zeroP() ); \ + stbir__simdf_min( f, f, STBIR__CONSTF( STBIR_max_uint8_as_float ) ); \ + stbir__simdf_convert_float_to_i32( i, f ); + +#define stbir__linear_to_srgb_finish( i, f ) \ +{ \ + stbir__simdi temp; \ + stbir__simdi_32shr( temp, stbir_simdi_castf( f ), 12 ) ; \ + stbir__simdi_and( temp, temp, STBIR__CONSTI(STBIR_mastissa_mask) ); \ + stbir__simdi_or( temp, temp, STBIR__CONSTI(STBIR_topscale) ); \ + stbir__simdi_16madd( i, i, temp ); \ + stbir__simdi_32shr( i, i, 16 ); \ +} + +#define stbir__simdi_table_lookup2( v0,v1, table ) \ +{ \ + stbir__simdi_u32 temp0,temp1; \ + temp0.m128i_i128 = v0; \ + temp1.m128i_i128 = v1; \ + temp0.m128i_u32[0] = table[temp0.m128i_i32[0]]; temp0.m128i_u32[1] = table[temp0.m128i_i32[1]]; temp0.m128i_u32[2] = table[temp0.m128i_i32[2]]; temp0.m128i_u32[3] = table[temp0.m128i_i32[3]]; \ + temp1.m128i_u32[0] = table[temp1.m128i_i32[0]]; temp1.m128i_u32[1] = table[temp1.m128i_i32[1]]; temp1.m128i_u32[2] = table[temp1.m128i_i32[2]]; temp1.m128i_u32[3] = table[temp1.m128i_i32[3]]; \ + v0 = temp0.m128i_i128; \ + v1 = temp1.m128i_i128; \ +} + +#define stbir__simdi_table_lookup3( v0,v1,v2, table ) \ +{ \ + stbir__simdi_u32 temp0,temp1,temp2; \ + temp0.m128i_i128 = v0; \ + temp1.m128i_i128 = v1; \ + temp2.m128i_i128 = v2; \ + temp0.m128i_u32[0] = table[temp0.m128i_i32[0]]; temp0.m128i_u32[1] = table[temp0.m128i_i32[1]]; temp0.m128i_u32[2] = table[temp0.m128i_i32[2]]; temp0.m128i_u32[3] = table[temp0.m128i_i32[3]]; \ + temp1.m128i_u32[0] = table[temp1.m128i_i32[0]]; temp1.m128i_u32[1] = table[temp1.m128i_i32[1]]; temp1.m128i_u32[2] = table[temp1.m128i_i32[2]]; temp1.m128i_u32[3] = table[temp1.m128i_i32[3]]; \ + temp2.m128i_u32[0] = table[temp2.m128i_i32[0]]; temp2.m128i_u32[1] = table[temp2.m128i_i32[1]]; temp2.m128i_u32[2] = table[temp2.m128i_i32[2]]; temp2.m128i_u32[3] = table[temp2.m128i_i32[3]]; \ + v0 = temp0.m128i_i128; \ + v1 = temp1.m128i_i128; \ + v2 = temp2.m128i_i128; \ +} + +#define stbir__simdi_table_lookup4( v0,v1,v2,v3, table ) \ +{ \ + stbir__simdi_u32 temp0,temp1,temp2,temp3; \ + temp0.m128i_i128 = v0; \ + temp1.m128i_i128 = v1; \ + temp2.m128i_i128 = v2; \ + temp3.m128i_i128 = v3; \ + temp0.m128i_u32[0] = table[temp0.m128i_i32[0]]; temp0.m128i_u32[1] = table[temp0.m128i_i32[1]]; temp0.m128i_u32[2] = table[temp0.m128i_i32[2]]; temp0.m128i_u32[3] = table[temp0.m128i_i32[3]]; \ + temp1.m128i_u32[0] = table[temp1.m128i_i32[0]]; temp1.m128i_u32[1] = table[temp1.m128i_i32[1]]; temp1.m128i_u32[2] = table[temp1.m128i_i32[2]]; temp1.m128i_u32[3] = table[temp1.m128i_i32[3]]; \ + temp2.m128i_u32[0] = table[temp2.m128i_i32[0]]; temp2.m128i_u32[1] = table[temp2.m128i_i32[1]]; temp2.m128i_u32[2] = table[temp2.m128i_i32[2]]; temp2.m128i_u32[3] = table[temp2.m128i_i32[3]]; \ + temp3.m128i_u32[0] = table[temp3.m128i_i32[0]]; temp3.m128i_u32[1] = table[temp3.m128i_i32[1]]; temp3.m128i_u32[2] = table[temp3.m128i_i32[2]]; temp3.m128i_u32[3] = table[temp3.m128i_i32[3]]; \ + v0 = temp0.m128i_i128; \ + v1 = temp1.m128i_i128; \ + v2 = temp2.m128i_i128; \ + v3 = temp3.m128i_i128; \ +} + +static void STBIR__CODER_NAME( stbir__encode_uint8_srgb )( void * outputp, int width_times_channels, float const * encode ) +{ + unsigned char STBIR_SIMD_STREAMOUT_PTR( * ) output = (unsigned char*) outputp; + unsigned char * end_output = ( (unsigned char*) output ) + width_times_channels; + + #ifdef STBIR_SIMD + + if ( width_times_channels >= 16 ) + { + float const * end_encode_m16 = encode + width_times_channels - 16; + end_output -= 16; + STBIR_SIMD_NO_UNROLL_LOOP_START_INF_FOR + for(;;) + { + stbir__simdf f0, f1, f2, f3; + stbir__simdi i0, i1, i2, i3; + STBIR_SIMD_NO_UNROLL(encode); + + stbir__simdf_load4_transposed( f0, f1, f2, f3, encode ); + + stbir__min_max_shift20( i0, f0 ); + stbir__min_max_shift20( i1, f1 ); + stbir__min_max_shift20( i2, f2 ); + stbir__min_max_shift20( i3, f3 ); + + stbir__simdi_table_lookup4( i0, i1, i2, i3, ( fp32_to_srgb8_tab4 - (127-13)*8 ) ); + + stbir__linear_to_srgb_finish( i0, f0 ); + stbir__linear_to_srgb_finish( i1, f1 ); + stbir__linear_to_srgb_finish( i2, f2 ); + stbir__linear_to_srgb_finish( i3, f3 ); + + stbir__interleave_pack_and_store_16_u8( output, STBIR_strs_join1(i, ,stbir__encode_order0), STBIR_strs_join1(i, ,stbir__encode_order1), STBIR_strs_join1(i, ,stbir__encode_order2), STBIR_strs_join1(i, ,stbir__encode_order3) ); + + encode += 16; + output += 16; + if ( output <= end_output ) + continue; + if ( output == ( end_output + 16 ) ) + break; + output = end_output; // backup and do last couple + encode = end_encode_m16; + } + return; + } + #endif + + // try to do blocks of 4 when you can + #if stbir__coder_min_num != 3 // doesn't divide cleanly by four + output += 4; + STBIR_SIMD_NO_UNROLL_LOOP_START + while ( output <= end_output ) + { + STBIR_SIMD_NO_UNROLL(encode); + + output[0-4] = stbir__linear_to_srgb_uchar( encode[stbir__encode_order0] ); + output[1-4] = stbir__linear_to_srgb_uchar( encode[stbir__encode_order1] ); + output[2-4] = stbir__linear_to_srgb_uchar( encode[stbir__encode_order2] ); + output[3-4] = stbir__linear_to_srgb_uchar( encode[stbir__encode_order3] ); + + output += 4; + encode += 4; + } + output -= 4; + #endif + + // do the remnants + #if stbir__coder_min_num < 4 + STBIR_NO_UNROLL_LOOP_START + while( output < end_output ) + { + STBIR_NO_UNROLL(encode); + output[0] = stbir__linear_to_srgb_uchar( encode[stbir__encode_order0] ); + #if stbir__coder_min_num >= 2 + output[1] = stbir__linear_to_srgb_uchar( encode[stbir__encode_order1] ); + #endif + #if stbir__coder_min_num >= 3 + output[2] = stbir__linear_to_srgb_uchar( encode[stbir__encode_order2] ); + #endif + output += stbir__coder_min_num; + encode += stbir__coder_min_num; + } + #endif +} + +#if ( stbir__coder_min_num == 4 ) || ( ( stbir__coder_min_num == 1 ) && ( !defined(stbir__decode_swizzle) ) ) + +static float * STBIR__CODER_NAME(stbir__decode_uint8_srgb4_linearalpha)( float * decodep, int width_times_channels, void const * inputp ) +{ + float STBIR_STREAMOUT_PTR( * ) decode = decodep; + float * decode_end = (float*) decode + width_times_channels; + unsigned char const * input = (unsigned char const *)inputp; + + do { + decode[0] = stbir__srgb_uchar_to_linear_float[ input[stbir__decode_order0] ]; + decode[1] = stbir__srgb_uchar_to_linear_float[ input[stbir__decode_order1] ]; + decode[2] = stbir__srgb_uchar_to_linear_float[ input[stbir__decode_order2] ]; + decode[3] = ( (float) input[stbir__decode_order3] ) * stbir__max_uint8_as_float_inverted; + input += 4; + decode += 4; + } while( decode < decode_end ); + return decode_end; +} + + +static void STBIR__CODER_NAME( stbir__encode_uint8_srgb4_linearalpha )( void * outputp, int width_times_channels, float const * encode ) +{ + unsigned char STBIR_SIMD_STREAMOUT_PTR( * ) output = (unsigned char*) outputp; + unsigned char * end_output = ( (unsigned char*) output ) + width_times_channels; + + #ifdef STBIR_SIMD + + if ( width_times_channels >= 16 ) + { + float const * end_encode_m16 = encode + width_times_channels - 16; + end_output -= 16; + STBIR_SIMD_NO_UNROLL_LOOP_START_INF_FOR + for(;;) + { + stbir__simdf f0, f1, f2, f3; + stbir__simdi i0, i1, i2, i3; + + STBIR_SIMD_NO_UNROLL(encode); + stbir__simdf_load4_transposed( f0, f1, f2, f3, encode ); + + stbir__min_max_shift20( i0, f0 ); + stbir__min_max_shift20( i1, f1 ); + stbir__min_max_shift20( i2, f2 ); + stbir__scale_and_convert( i3, f3 ); + + stbir__simdi_table_lookup3( i0, i1, i2, ( fp32_to_srgb8_tab4 - (127-13)*8 ) ); + + stbir__linear_to_srgb_finish( i0, f0 ); + stbir__linear_to_srgb_finish( i1, f1 ); + stbir__linear_to_srgb_finish( i2, f2 ); + + stbir__interleave_pack_and_store_16_u8( output, STBIR_strs_join1(i, ,stbir__encode_order0), STBIR_strs_join1(i, ,stbir__encode_order1), STBIR_strs_join1(i, ,stbir__encode_order2), STBIR_strs_join1(i, ,stbir__encode_order3) ); + + output += 16; + encode += 16; + + if ( output <= end_output ) + continue; + if ( output == ( end_output + 16 ) ) + break; + output = end_output; // backup and do last couple + encode = end_encode_m16; + } + return; + } + #endif + + STBIR_SIMD_NO_UNROLL_LOOP_START + do { + float f; + STBIR_SIMD_NO_UNROLL(encode); + + output[stbir__decode_order0] = stbir__linear_to_srgb_uchar( encode[0] ); + output[stbir__decode_order1] = stbir__linear_to_srgb_uchar( encode[1] ); + output[stbir__decode_order2] = stbir__linear_to_srgb_uchar( encode[2] ); + + f = encode[3] * stbir__max_uint8_as_float + 0.5f; + STBIR_CLAMP(f, 0, 255); + output[stbir__decode_order3] = (unsigned char) f; + + output += 4; + encode += 4; + } while( output < end_output ); +} + +#endif + +#if ( stbir__coder_min_num == 2 ) || ( ( stbir__coder_min_num == 1 ) && ( !defined(stbir__decode_swizzle) ) ) + +static float * STBIR__CODER_NAME(stbir__decode_uint8_srgb2_linearalpha)( float * decodep, int width_times_channels, void const * inputp ) +{ + float STBIR_STREAMOUT_PTR( * ) decode = decodep; + float * decode_end = (float*) decode + width_times_channels; + unsigned char const * input = (unsigned char const *)inputp; + + decode += 4; + while( decode <= decode_end ) + { + decode[0-4] = stbir__srgb_uchar_to_linear_float[ input[stbir__decode_order0] ]; + decode[1-4] = ( (float) input[stbir__decode_order1] ) * stbir__max_uint8_as_float_inverted; + decode[2-4] = stbir__srgb_uchar_to_linear_float[ input[stbir__decode_order0+2] ]; + decode[3-4] = ( (float) input[stbir__decode_order1+2] ) * stbir__max_uint8_as_float_inverted; + input += 4; + decode += 4; + } + decode -= 4; + if( decode < decode_end ) + { + decode[0] = stbir__srgb_uchar_to_linear_float[ stbir__decode_order0 ]; + decode[1] = ( (float) input[stbir__decode_order1] ) * stbir__max_uint8_as_float_inverted; + } + return decode_end; +} + +static void STBIR__CODER_NAME( stbir__encode_uint8_srgb2_linearalpha )( void * outputp, int width_times_channels, float const * encode ) +{ + unsigned char STBIR_SIMD_STREAMOUT_PTR( * ) output = (unsigned char*) outputp; + unsigned char * end_output = ( (unsigned char*) output ) + width_times_channels; + + #ifdef STBIR_SIMD + + if ( width_times_channels >= 16 ) + { + float const * end_encode_m16 = encode + width_times_channels - 16; + end_output -= 16; + STBIR_SIMD_NO_UNROLL_LOOP_START_INF_FOR + for(;;) + { + stbir__simdf f0, f1, f2, f3; + stbir__simdi i0, i1, i2, i3; + + STBIR_SIMD_NO_UNROLL(encode); + stbir__simdf_load4_transposed( f0, f1, f2, f3, encode ); + + stbir__min_max_shift20( i0, f0 ); + stbir__scale_and_convert( i1, f1 ); + stbir__min_max_shift20( i2, f2 ); + stbir__scale_and_convert( i3, f3 ); + + stbir__simdi_table_lookup2( i0, i2, ( fp32_to_srgb8_tab4 - (127-13)*8 ) ); + + stbir__linear_to_srgb_finish( i0, f0 ); + stbir__linear_to_srgb_finish( i2, f2 ); + + stbir__interleave_pack_and_store_16_u8( output, STBIR_strs_join1(i, ,stbir__encode_order0), STBIR_strs_join1(i, ,stbir__encode_order1), STBIR_strs_join1(i, ,stbir__encode_order2), STBIR_strs_join1(i, ,stbir__encode_order3) ); + + output += 16; + encode += 16; + if ( output <= end_output ) + continue; + if ( output == ( end_output + 16 ) ) + break; + output = end_output; // backup and do last couple + encode = end_encode_m16; + } + return; + } + #endif + + STBIR_SIMD_NO_UNROLL_LOOP_START + do { + float f; + STBIR_SIMD_NO_UNROLL(encode); + + output[stbir__decode_order0] = stbir__linear_to_srgb_uchar( encode[0] ); + + f = encode[1] * stbir__max_uint8_as_float + 0.5f; + STBIR_CLAMP(f, 0, 255); + output[stbir__decode_order1] = (unsigned char) f; + + output += 2; + encode += 2; + } while( output < end_output ); +} + +#endif + +static float * STBIR__CODER_NAME(stbir__decode_uint16_linear_scaled)( float * decodep, int width_times_channels, void const * inputp ) +{ + float STBIR_STREAMOUT_PTR( * ) decode = decodep; + float * decode_end = (float*) decode + width_times_channels; + unsigned short const * input = (unsigned short const *)inputp; + + #ifdef STBIR_SIMD + unsigned short const * end_input_m8 = input + width_times_channels - 8; + if ( width_times_channels >= 8 ) + { + decode_end -= 8; + STBIR_NO_UNROLL_LOOP_START_INF_FOR + for(;;) + { + #ifdef STBIR_SIMD8 + stbir__simdi i; stbir__simdi8 o; + stbir__simdf8 of; + STBIR_NO_UNROLL(decode); + stbir__simdi_load( i, input ); + stbir__simdi8_expand_u16_to_u32( o, i ); + stbir__simdi8_convert_i32_to_float( of, o ); + stbir__simdf8_mult( of, of, STBIR_max_uint16_as_float_inverted8); + stbir__decode_simdf8_flip( of ); + stbir__simdf8_store( decode + 0, of ); + #else + stbir__simdi i, o0, o1; + stbir__simdf of0, of1; + STBIR_NO_UNROLL(decode); + stbir__simdi_load( i, input ); + stbir__simdi_expand_u16_to_u32( o0,o1,i ); + stbir__simdi_convert_i32_to_float( of0, o0 ); + stbir__simdi_convert_i32_to_float( of1, o1 ); + stbir__simdf_mult( of0, of0, STBIR__CONSTF(STBIR_max_uint16_as_float_inverted) ); + stbir__simdf_mult( of1, of1, STBIR__CONSTF(STBIR_max_uint16_as_float_inverted)); + stbir__decode_simdf4_flip( of0 ); + stbir__decode_simdf4_flip( of1 ); + stbir__simdf_store( decode + 0, of0 ); + stbir__simdf_store( decode + 4, of1 ); + #endif + decode += 8; + input += 8; + if ( decode <= decode_end ) + continue; + if ( decode == ( decode_end + 8 ) ) + break; + decode = decode_end; // backup and do last couple + input = end_input_m8; + } + return decode_end + 8; + } + #endif + + // try to do blocks of 4 when you can + #if stbir__coder_min_num != 3 // doesn't divide cleanly by four + decode += 4; + STBIR_SIMD_NO_UNROLL_LOOP_START + while( decode <= decode_end ) + { + STBIR_SIMD_NO_UNROLL(decode); + decode[0-4] = ((float)(input[stbir__decode_order0])) * stbir__max_uint16_as_float_inverted; + decode[1-4] = ((float)(input[stbir__decode_order1])) * stbir__max_uint16_as_float_inverted; + decode[2-4] = ((float)(input[stbir__decode_order2])) * stbir__max_uint16_as_float_inverted; + decode[3-4] = ((float)(input[stbir__decode_order3])) * stbir__max_uint16_as_float_inverted; + decode += 4; + input += 4; + } + decode -= 4; + #endif + + // do the remnants + #if stbir__coder_min_num < 4 + STBIR_NO_UNROLL_LOOP_START + while( decode < decode_end ) + { + STBIR_NO_UNROLL(decode); + decode[0] = ((float)(input[stbir__decode_order0])) * stbir__max_uint16_as_float_inverted; + #if stbir__coder_min_num >= 2 + decode[1] = ((float)(input[stbir__decode_order1])) * stbir__max_uint16_as_float_inverted; + #endif + #if stbir__coder_min_num >= 3 + decode[2] = ((float)(input[stbir__decode_order2])) * stbir__max_uint16_as_float_inverted; + #endif + decode += stbir__coder_min_num; + input += stbir__coder_min_num; + } + #endif + return decode_end; +} + + +static void STBIR__CODER_NAME(stbir__encode_uint16_linear_scaled)( void * outputp, int width_times_channels, float const * encode ) +{ + unsigned short STBIR_SIMD_STREAMOUT_PTR( * ) output = (unsigned short*) outputp; + unsigned short * end_output = ( (unsigned short*) output ) + width_times_channels; + + #ifdef STBIR_SIMD + { + if ( width_times_channels >= stbir__simdfX_float_count*2 ) + { + float const * end_encode_m8 = encode + width_times_channels - stbir__simdfX_float_count*2; + end_output -= stbir__simdfX_float_count*2; + STBIR_SIMD_NO_UNROLL_LOOP_START_INF_FOR + for(;;) + { + stbir__simdfX e0, e1; + stbir__simdiX i; + STBIR_SIMD_NO_UNROLL(encode); + stbir__simdfX_madd_mem( e0, STBIR_simd_point5X, STBIR_max_uint16_as_floatX, encode ); + stbir__simdfX_madd_mem( e1, STBIR_simd_point5X, STBIR_max_uint16_as_floatX, encode+stbir__simdfX_float_count ); + stbir__encode_simdfX_unflip( e0 ); + stbir__encode_simdfX_unflip( e1 ); + stbir__simdfX_pack_to_words( i, e0, e1 ); + stbir__simdiX_store( output, i ); + encode += stbir__simdfX_float_count*2; + output += stbir__simdfX_float_count*2; + if ( output <= end_output ) + continue; + if ( output == ( end_output + stbir__simdfX_float_count*2 ) ) + break; + output = end_output; // backup and do last couple + encode = end_encode_m8; + } + return; + } + } + + // try to do blocks of 4 when you can + #if stbir__coder_min_num != 3 // doesn't divide cleanly by four + output += 4; + STBIR_NO_UNROLL_LOOP_START + while( output <= end_output ) + { + stbir__simdf e; + stbir__simdi i; + STBIR_NO_UNROLL(encode); + stbir__simdf_load( e, encode ); + stbir__simdf_madd( e, STBIR__CONSTF(STBIR_simd_point5), STBIR__CONSTF(STBIR_max_uint16_as_float), e ); + stbir__encode_simdf4_unflip( e ); + stbir__simdf_pack_to_8words( i, e, e ); // only use first 4 + stbir__simdi_store2( output-4, i ); + output += 4; + encode += 4; + } + output -= 4; + #endif + + // do the remnants + #if stbir__coder_min_num < 4 + STBIR_NO_UNROLL_LOOP_START + while( output < end_output ) + { + stbir__simdf e; + STBIR_NO_UNROLL(encode); + stbir__simdf_madd1_mem( e, STBIR__CONSTF(STBIR_simd_point5), STBIR__CONSTF(STBIR_max_uint16_as_float), encode+stbir__encode_order0 ); output[0] = stbir__simdf_convert_float_to_short( e ); + #if stbir__coder_min_num >= 2 + stbir__simdf_madd1_mem( e, STBIR__CONSTF(STBIR_simd_point5), STBIR__CONSTF(STBIR_max_uint16_as_float), encode+stbir__encode_order1 ); output[1] = stbir__simdf_convert_float_to_short( e ); + #endif + #if stbir__coder_min_num >= 3 + stbir__simdf_madd1_mem( e, STBIR__CONSTF(STBIR_simd_point5), STBIR__CONSTF(STBIR_max_uint16_as_float), encode+stbir__encode_order2 ); output[2] = stbir__simdf_convert_float_to_short( e ); + #endif + output += stbir__coder_min_num; + encode += stbir__coder_min_num; + } + #endif + + #else + + // try to do blocks of 4 when you can + #if stbir__coder_min_num != 3 // doesn't divide cleanly by four + output += 4; + STBIR_SIMD_NO_UNROLL_LOOP_START + while( output <= end_output ) + { + float f; + STBIR_SIMD_NO_UNROLL(encode); + f = encode[stbir__encode_order0] * stbir__max_uint16_as_float + 0.5f; STBIR_CLAMP(f, 0, 65535); output[0-4] = (unsigned short)f; + f = encode[stbir__encode_order1] * stbir__max_uint16_as_float + 0.5f; STBIR_CLAMP(f, 0, 65535); output[1-4] = (unsigned short)f; + f = encode[stbir__encode_order2] * stbir__max_uint16_as_float + 0.5f; STBIR_CLAMP(f, 0, 65535); output[2-4] = (unsigned short)f; + f = encode[stbir__encode_order3] * stbir__max_uint16_as_float + 0.5f; STBIR_CLAMP(f, 0, 65535); output[3-4] = (unsigned short)f; + output += 4; + encode += 4; + } + output -= 4; + #endif + + // do the remnants + #if stbir__coder_min_num < 4 + STBIR_NO_UNROLL_LOOP_START + while( output < end_output ) + { + float f; + STBIR_NO_UNROLL(encode); + f = encode[stbir__encode_order0] * stbir__max_uint16_as_float + 0.5f; STBIR_CLAMP(f, 0, 65535); output[0] = (unsigned short)f; + #if stbir__coder_min_num >= 2 + f = encode[stbir__encode_order1] * stbir__max_uint16_as_float + 0.5f; STBIR_CLAMP(f, 0, 65535); output[1] = (unsigned short)f; + #endif + #if stbir__coder_min_num >= 3 + f = encode[stbir__encode_order2] * stbir__max_uint16_as_float + 0.5f; STBIR_CLAMP(f, 0, 65535); output[2] = (unsigned short)f; + #endif + output += stbir__coder_min_num; + encode += stbir__coder_min_num; + } + #endif + #endif +} + +static float * STBIR__CODER_NAME(stbir__decode_uint16_linear)( float * decodep, int width_times_channels, void const * inputp ) +{ + float STBIR_STREAMOUT_PTR( * ) decode = decodep; + float * decode_end = (float*) decode + width_times_channels; + unsigned short const * input = (unsigned short const *)inputp; + + #ifdef STBIR_SIMD + unsigned short const * end_input_m8 = input + width_times_channels - 8; + if ( width_times_channels >= 8 ) + { + decode_end -= 8; + STBIR_NO_UNROLL_LOOP_START_INF_FOR + for(;;) + { + #ifdef STBIR_SIMD8 + stbir__simdi i; stbir__simdi8 o; + stbir__simdf8 of; + STBIR_NO_UNROLL(decode); + stbir__simdi_load( i, input ); + stbir__simdi8_expand_u16_to_u32( o, i ); + stbir__simdi8_convert_i32_to_float( of, o ); + stbir__decode_simdf8_flip( of ); + stbir__simdf8_store( decode + 0, of ); + #else + stbir__simdi i, o0, o1; + stbir__simdf of0, of1; + STBIR_NO_UNROLL(decode); + stbir__simdi_load( i, input ); + stbir__simdi_expand_u16_to_u32( o0, o1, i ); + stbir__simdi_convert_i32_to_float( of0, o0 ); + stbir__simdi_convert_i32_to_float( of1, o1 ); + stbir__decode_simdf4_flip( of0 ); + stbir__decode_simdf4_flip( of1 ); + stbir__simdf_store( decode + 0, of0 ); + stbir__simdf_store( decode + 4, of1 ); + #endif + decode += 8; + input += 8; + if ( decode <= decode_end ) + continue; + if ( decode == ( decode_end + 8 ) ) + break; + decode = decode_end; // backup and do last couple + input = end_input_m8; + } + return decode_end + 8; + } + #endif + + // try to do blocks of 4 when you can + #if stbir__coder_min_num != 3 // doesn't divide cleanly by four + decode += 4; + STBIR_SIMD_NO_UNROLL_LOOP_START + while( decode <= decode_end ) + { + STBIR_SIMD_NO_UNROLL(decode); + decode[0-4] = ((float)(input[stbir__decode_order0])); + decode[1-4] = ((float)(input[stbir__decode_order1])); + decode[2-4] = ((float)(input[stbir__decode_order2])); + decode[3-4] = ((float)(input[stbir__decode_order3])); + decode += 4; + input += 4; + } + decode -= 4; + #endif + + // do the remnants + #if stbir__coder_min_num < 4 + STBIR_NO_UNROLL_LOOP_START + while( decode < decode_end ) + { + STBIR_NO_UNROLL(decode); + decode[0] = ((float)(input[stbir__decode_order0])); + #if stbir__coder_min_num >= 2 + decode[1] = ((float)(input[stbir__decode_order1])); + #endif + #if stbir__coder_min_num >= 3 + decode[2] = ((float)(input[stbir__decode_order2])); + #endif + decode += stbir__coder_min_num; + input += stbir__coder_min_num; + } + #endif + return decode_end; +} + +static void STBIR__CODER_NAME(stbir__encode_uint16_linear)( void * outputp, int width_times_channels, float const * encode ) +{ + unsigned short STBIR_SIMD_STREAMOUT_PTR( * ) output = (unsigned short*) outputp; + unsigned short * end_output = ( (unsigned short*) output ) + width_times_channels; + + #ifdef STBIR_SIMD + { + if ( width_times_channels >= stbir__simdfX_float_count*2 ) + { + float const * end_encode_m8 = encode + width_times_channels - stbir__simdfX_float_count*2; + end_output -= stbir__simdfX_float_count*2; + STBIR_SIMD_NO_UNROLL_LOOP_START_INF_FOR + for(;;) + { + stbir__simdfX e0, e1; + stbir__simdiX i; + STBIR_SIMD_NO_UNROLL(encode); + stbir__simdfX_add_mem( e0, STBIR_simd_point5X, encode ); + stbir__simdfX_add_mem( e1, STBIR_simd_point5X, encode+stbir__simdfX_float_count ); + stbir__encode_simdfX_unflip( e0 ); + stbir__encode_simdfX_unflip( e1 ); + stbir__simdfX_pack_to_words( i, e0, e1 ); + stbir__simdiX_store( output, i ); + encode += stbir__simdfX_float_count*2; + output += stbir__simdfX_float_count*2; + if ( output <= end_output ) + continue; + if ( output == ( end_output + stbir__simdfX_float_count*2 ) ) + break; + output = end_output; // backup and do last couple + encode = end_encode_m8; + } + return; + } + } + + // try to do blocks of 4 when you can + #if stbir__coder_min_num != 3 // doesn't divide cleanly by four + output += 4; + STBIR_NO_UNROLL_LOOP_START + while( output <= end_output ) + { + stbir__simdf e; + stbir__simdi i; + STBIR_NO_UNROLL(encode); + stbir__simdf_load( e, encode ); + stbir__simdf_add( e, STBIR__CONSTF(STBIR_simd_point5), e ); + stbir__encode_simdf4_unflip( e ); + stbir__simdf_pack_to_8words( i, e, e ); // only use first 4 + stbir__simdi_store2( output-4, i ); + output += 4; + encode += 4; + } + output -= 4; + #endif + + #else + + // try to do blocks of 4 when you can + #if stbir__coder_min_num != 3 // doesn't divide cleanly by four + output += 4; + STBIR_SIMD_NO_UNROLL_LOOP_START + while( output <= end_output ) + { + float f; + STBIR_SIMD_NO_UNROLL(encode); + f = encode[stbir__encode_order0] + 0.5f; STBIR_CLAMP(f, 0, 65535); output[0-4] = (unsigned short)f; + f = encode[stbir__encode_order1] + 0.5f; STBIR_CLAMP(f, 0, 65535); output[1-4] = (unsigned short)f; + f = encode[stbir__encode_order2] + 0.5f; STBIR_CLAMP(f, 0, 65535); output[2-4] = (unsigned short)f; + f = encode[stbir__encode_order3] + 0.5f; STBIR_CLAMP(f, 0, 65535); output[3-4] = (unsigned short)f; + output += 4; + encode += 4; + } + output -= 4; + #endif + + #endif + + // do the remnants + #if stbir__coder_min_num < 4 + STBIR_NO_UNROLL_LOOP_START + while( output < end_output ) + { + float f; + STBIR_NO_UNROLL(encode); + f = encode[stbir__encode_order0] + 0.5f; STBIR_CLAMP(f, 0, 65535); output[0] = (unsigned short)f; + #if stbir__coder_min_num >= 2 + f = encode[stbir__encode_order1] + 0.5f; STBIR_CLAMP(f, 0, 65535); output[1] = (unsigned short)f; + #endif + #if stbir__coder_min_num >= 3 + f = encode[stbir__encode_order2] + 0.5f; STBIR_CLAMP(f, 0, 65535); output[2] = (unsigned short)f; + #endif + output += stbir__coder_min_num; + encode += stbir__coder_min_num; + } + #endif +} + +static float * STBIR__CODER_NAME(stbir__decode_half_float_linear)( float * decodep, int width_times_channels, void const * inputp ) +{ + float STBIR_STREAMOUT_PTR( * ) decode = decodep; + float * decode_end = (float*) decode + width_times_channels; + stbir__FP16 const * input = (stbir__FP16 const *)inputp; + + #ifdef STBIR_SIMD + if ( width_times_channels >= 8 ) + { + stbir__FP16 const * end_input_m8 = input + width_times_channels - 8; + decode_end -= 8; + STBIR_NO_UNROLL_LOOP_START_INF_FOR + for(;;) + { + STBIR_NO_UNROLL(decode); + + stbir__half_to_float_SIMD( decode, input ); + #ifdef stbir__decode_swizzle + #ifdef STBIR_SIMD8 + { + stbir__simdf8 of; + stbir__simdf8_load( of, decode ); + stbir__decode_simdf8_flip( of ); + stbir__simdf8_store( decode, of ); + } + #else + { + stbir__simdf of0,of1; + stbir__simdf_load( of0, decode ); + stbir__simdf_load( of1, decode+4 ); + stbir__decode_simdf4_flip( of0 ); + stbir__decode_simdf4_flip( of1 ); + stbir__simdf_store( decode, of0 ); + stbir__simdf_store( decode+4, of1 ); + } + #endif + #endif + decode += 8; + input += 8; + if ( decode <= decode_end ) + continue; + if ( decode == ( decode_end + 8 ) ) + break; + decode = decode_end; // backup and do last couple + input = end_input_m8; + } + return decode_end + 8; + } + #endif + + // try to do blocks of 4 when you can + #if stbir__coder_min_num != 3 // doesn't divide cleanly by four + decode += 4; + STBIR_SIMD_NO_UNROLL_LOOP_START + while( decode <= decode_end ) + { + STBIR_SIMD_NO_UNROLL(decode); + decode[0-4] = stbir__half_to_float(input[stbir__decode_order0]); + decode[1-4] = stbir__half_to_float(input[stbir__decode_order1]); + decode[2-4] = stbir__half_to_float(input[stbir__decode_order2]); + decode[3-4] = stbir__half_to_float(input[stbir__decode_order3]); + decode += 4; + input += 4; + } + decode -= 4; + #endif + + // do the remnants + #if stbir__coder_min_num < 4 + STBIR_NO_UNROLL_LOOP_START + while( decode < decode_end ) + { + STBIR_NO_UNROLL(decode); + decode[0] = stbir__half_to_float(input[stbir__decode_order0]); + #if stbir__coder_min_num >= 2 + decode[1] = stbir__half_to_float(input[stbir__decode_order1]); + #endif + #if stbir__coder_min_num >= 3 + decode[2] = stbir__half_to_float(input[stbir__decode_order2]); + #endif + decode += stbir__coder_min_num; + input += stbir__coder_min_num; + } + #endif + return decode_end; +} + +static void STBIR__CODER_NAME( stbir__encode_half_float_linear )( void * outputp, int width_times_channels, float const * encode ) +{ + stbir__FP16 STBIR_SIMD_STREAMOUT_PTR( * ) output = (stbir__FP16*) outputp; + stbir__FP16 * end_output = ( (stbir__FP16*) output ) + width_times_channels; + + #ifdef STBIR_SIMD + if ( width_times_channels >= 8 ) + { + float const * end_encode_m8 = encode + width_times_channels - 8; + end_output -= 8; + STBIR_SIMD_NO_UNROLL_LOOP_START_INF_FOR + for(;;) + { + STBIR_SIMD_NO_UNROLL(encode); + #ifdef stbir__decode_swizzle + #ifdef STBIR_SIMD8 + { + stbir__simdf8 of; + stbir__simdf8_load( of, encode ); + stbir__encode_simdf8_unflip( of ); + stbir__float_to_half_SIMD( output, (float*)&of ); + } + #else + { + stbir__simdf of[2]; + stbir__simdf_load( of[0], encode ); + stbir__simdf_load( of[1], encode+4 ); + stbir__encode_simdf4_unflip( of[0] ); + stbir__encode_simdf4_unflip( of[1] ); + stbir__float_to_half_SIMD( output, (float*)of ); + } + #endif + #else + stbir__float_to_half_SIMD( output, encode ); + #endif + encode += 8; + output += 8; + if ( output <= end_output ) + continue; + if ( output == ( end_output + 8 ) ) + break; + output = end_output; // backup and do last couple + encode = end_encode_m8; + } + return; + } + #endif + + // try to do blocks of 4 when you can + #if stbir__coder_min_num != 3 // doesn't divide cleanly by four + output += 4; + STBIR_SIMD_NO_UNROLL_LOOP_START + while( output <= end_output ) + { + STBIR_SIMD_NO_UNROLL(output); + output[0-4] = stbir__float_to_half(encode[stbir__encode_order0]); + output[1-4] = stbir__float_to_half(encode[stbir__encode_order1]); + output[2-4] = stbir__float_to_half(encode[stbir__encode_order2]); + output[3-4] = stbir__float_to_half(encode[stbir__encode_order3]); + output += 4; + encode += 4; + } + output -= 4; + #endif + + // do the remnants + #if stbir__coder_min_num < 4 + STBIR_NO_UNROLL_LOOP_START + while( output < end_output ) + { + STBIR_NO_UNROLL(output); + output[0] = stbir__float_to_half(encode[stbir__encode_order0]); + #if stbir__coder_min_num >= 2 + output[1] = stbir__float_to_half(encode[stbir__encode_order1]); + #endif + #if stbir__coder_min_num >= 3 + output[2] = stbir__float_to_half(encode[stbir__encode_order2]); + #endif + output += stbir__coder_min_num; + encode += stbir__coder_min_num; + } + #endif +} + +static float * STBIR__CODER_NAME(stbir__decode_float_linear)( float * decodep, int width_times_channels, void const * inputp ) +{ + #ifdef stbir__decode_swizzle + float STBIR_STREAMOUT_PTR( * ) decode = decodep; + float * decode_end = (float*) decode + width_times_channels; + float const * input = (float const *)inputp; + + #ifdef STBIR_SIMD + if ( width_times_channels >= 16 ) + { + float const * end_input_m16 = input + width_times_channels - 16; + decode_end -= 16; + STBIR_NO_UNROLL_LOOP_START_INF_FOR + for(;;) + { + STBIR_NO_UNROLL(decode); + #ifdef stbir__decode_swizzle + #ifdef STBIR_SIMD8 + { + stbir__simdf8 of0,of1; + stbir__simdf8_load( of0, input ); + stbir__simdf8_load( of1, input+8 ); + stbir__decode_simdf8_flip( of0 ); + stbir__decode_simdf8_flip( of1 ); + stbir__simdf8_store( decode, of0 ); + stbir__simdf8_store( decode+8, of1 ); + } + #else + { + stbir__simdf of0,of1,of2,of3; + stbir__simdf_load( of0, input ); + stbir__simdf_load( of1, input+4 ); + stbir__simdf_load( of2, input+8 ); + stbir__simdf_load( of3, input+12 ); + stbir__decode_simdf4_flip( of0 ); + stbir__decode_simdf4_flip( of1 ); + stbir__decode_simdf4_flip( of2 ); + stbir__decode_simdf4_flip( of3 ); + stbir__simdf_store( decode, of0 ); + stbir__simdf_store( decode+4, of1 ); + stbir__simdf_store( decode+8, of2 ); + stbir__simdf_store( decode+12, of3 ); + } + #endif + #endif + decode += 16; + input += 16; + if ( decode <= decode_end ) + continue; + if ( decode == ( decode_end + 16 ) ) + break; + decode = decode_end; // backup and do last couple + input = end_input_m16; + } + return decode_end + 16; + } + #endif + + // try to do blocks of 4 when you can + #if stbir__coder_min_num != 3 // doesn't divide cleanly by four + decode += 4; + STBIR_SIMD_NO_UNROLL_LOOP_START + while( decode <= decode_end ) + { + STBIR_SIMD_NO_UNROLL(decode); + decode[0-4] = input[stbir__decode_order0]; + decode[1-4] = input[stbir__decode_order1]; + decode[2-4] = input[stbir__decode_order2]; + decode[3-4] = input[stbir__decode_order3]; + decode += 4; + input += 4; + } + decode -= 4; + #endif + + // do the remnants + #if stbir__coder_min_num < 4 + STBIR_NO_UNROLL_LOOP_START + while( decode < decode_end ) + { + STBIR_NO_UNROLL(decode); + decode[0] = input[stbir__decode_order0]; + #if stbir__coder_min_num >= 2 + decode[1] = input[stbir__decode_order1]; + #endif + #if stbir__coder_min_num >= 3 + decode[2] = input[stbir__decode_order2]; + #endif + decode += stbir__coder_min_num; + input += stbir__coder_min_num; + } + #endif + return decode_end; + + #else + + if ( (void*)decodep != inputp ) + STBIR_MEMCPY( decodep, inputp, width_times_channels * sizeof( float ) ); + + return decodep + width_times_channels; + + #endif +} + +static void STBIR__CODER_NAME( stbir__encode_float_linear )( void * outputp, int width_times_channels, float const * encode ) +{ + #if !defined( STBIR_FLOAT_HIGH_CLAMP ) && !defined(STBIR_FLOAT_LO_CLAMP) && !defined(stbir__decode_swizzle) + + if ( (void*)outputp != (void*) encode ) + STBIR_MEMCPY( outputp, encode, width_times_channels * sizeof( float ) ); + + #else + + float STBIR_SIMD_STREAMOUT_PTR( * ) output = (float*) outputp; + float * end_output = ( (float*) output ) + width_times_channels; + + #ifdef STBIR_FLOAT_HIGH_CLAMP + #define stbir_scalar_hi_clamp( v ) if ( v > STBIR_FLOAT_HIGH_CLAMP ) v = STBIR_FLOAT_HIGH_CLAMP; + #else + #define stbir_scalar_hi_clamp( v ) + #endif + #ifdef STBIR_FLOAT_LOW_CLAMP + #define stbir_scalar_lo_clamp( v ) if ( v < STBIR_FLOAT_LOW_CLAMP ) v = STBIR_FLOAT_LOW_CLAMP; + #else + #define stbir_scalar_lo_clamp( v ) + #endif + + #ifdef STBIR_SIMD + + #ifdef STBIR_FLOAT_HIGH_CLAMP + const stbir__simdfX high_clamp = stbir__simdf_frepX(STBIR_FLOAT_HIGH_CLAMP); + #endif + #ifdef STBIR_FLOAT_LOW_CLAMP + const stbir__simdfX low_clamp = stbir__simdf_frepX(STBIR_FLOAT_LOW_CLAMP); + #endif + + if ( width_times_channels >= ( stbir__simdfX_float_count * 2 ) ) + { + float const * end_encode_m8 = encode + width_times_channels - ( stbir__simdfX_float_count * 2 ); + end_output -= ( stbir__simdfX_float_count * 2 ); + STBIR_SIMD_NO_UNROLL_LOOP_START_INF_FOR + for(;;) + { + stbir__simdfX e0, e1; + STBIR_SIMD_NO_UNROLL(encode); + stbir__simdfX_load( e0, encode ); + stbir__simdfX_load( e1, encode+stbir__simdfX_float_count ); +#ifdef STBIR_FLOAT_HIGH_CLAMP + stbir__simdfX_min( e0, e0, high_clamp ); + stbir__simdfX_min( e1, e1, high_clamp ); +#endif +#ifdef STBIR_FLOAT_LOW_CLAMP + stbir__simdfX_max( e0, e0, low_clamp ); + stbir__simdfX_max( e1, e1, low_clamp ); +#endif + stbir__encode_simdfX_unflip( e0 ); + stbir__encode_simdfX_unflip( e1 ); + stbir__simdfX_store( output, e0 ); + stbir__simdfX_store( output+stbir__simdfX_float_count, e1 ); + encode += stbir__simdfX_float_count * 2; + output += stbir__simdfX_float_count * 2; + if ( output < end_output ) + continue; + if ( output == ( end_output + ( stbir__simdfX_float_count * 2 ) ) ) + break; + output = end_output; // backup and do last couple + encode = end_encode_m8; + } + return; + } + + // try to do blocks of 4 when you can + #if stbir__coder_min_num != 3 // doesn't divide cleanly by four + output += 4; + STBIR_NO_UNROLL_LOOP_START + while( output <= end_output ) + { + stbir__simdf e0; + STBIR_NO_UNROLL(encode); + stbir__simdf_load( e0, encode ); +#ifdef STBIR_FLOAT_HIGH_CLAMP + stbir__simdf_min( e0, e0, high_clamp ); +#endif +#ifdef STBIR_FLOAT_LOW_CLAMP + stbir__simdf_max( e0, e0, low_clamp ); +#endif + stbir__encode_simdf4_unflip( e0 ); + stbir__simdf_store( output-4, e0 ); + output += 4; + encode += 4; + } + output -= 4; + #endif + + #else + + // try to do blocks of 4 when you can + #if stbir__coder_min_num != 3 // doesn't divide cleanly by four + output += 4; + STBIR_SIMD_NO_UNROLL_LOOP_START + while( output <= end_output ) + { + float e; + STBIR_SIMD_NO_UNROLL(encode); + e = encode[ stbir__encode_order0 ]; stbir_scalar_hi_clamp( e ); stbir_scalar_lo_clamp( e ); output[0-4] = e; + e = encode[ stbir__encode_order1 ]; stbir_scalar_hi_clamp( e ); stbir_scalar_lo_clamp( e ); output[1-4] = e; + e = encode[ stbir__encode_order2 ]; stbir_scalar_hi_clamp( e ); stbir_scalar_lo_clamp( e ); output[2-4] = e; + e = encode[ stbir__encode_order3 ]; stbir_scalar_hi_clamp( e ); stbir_scalar_lo_clamp( e ); output[3-4] = e; + output += 4; + encode += 4; + } + output -= 4; + + #endif + + #endif + + // do the remnants + #if stbir__coder_min_num < 4 + STBIR_NO_UNROLL_LOOP_START + while( output < end_output ) + { + float e; + STBIR_NO_UNROLL(encode); + e = encode[ stbir__encode_order0 ]; stbir_scalar_hi_clamp( e ); stbir_scalar_lo_clamp( e ); output[0] = e; + #if stbir__coder_min_num >= 2 + e = encode[ stbir__encode_order1 ]; stbir_scalar_hi_clamp( e ); stbir_scalar_lo_clamp( e ); output[1] = e; + #endif + #if stbir__coder_min_num >= 3 + e = encode[ stbir__encode_order2 ]; stbir_scalar_hi_clamp( e ); stbir_scalar_lo_clamp( e ); output[2] = e; + #endif + output += stbir__coder_min_num; + encode += stbir__coder_min_num; + } + #endif + + #endif +} + +#undef stbir__decode_suffix +#undef stbir__decode_simdf8_flip +#undef stbir__decode_simdf4_flip +#undef stbir__decode_order0 +#undef stbir__decode_order1 +#undef stbir__decode_order2 +#undef stbir__decode_order3 +#undef stbir__encode_order0 +#undef stbir__encode_order1 +#undef stbir__encode_order2 +#undef stbir__encode_order3 +#undef stbir__encode_simdf8_unflip +#undef stbir__encode_simdf4_unflip +#undef stbir__encode_simdfX_unflip +#undef STBIR__CODER_NAME +#undef stbir__coder_min_num +#undef stbir__decode_swizzle +#undef stbir_scalar_hi_clamp +#undef stbir_scalar_lo_clamp +#undef STB_IMAGE_RESIZE_DO_CODERS + +#elif defined( STB_IMAGE_RESIZE_DO_VERTICALS) + +#ifdef STB_IMAGE_RESIZE_VERTICAL_CONTINUE +#define STBIR_chans( start, end ) STBIR_strs_join14(start,STBIR__vertical_channels,end,_cont) +#else +#define STBIR_chans( start, end ) STBIR_strs_join1(start,STBIR__vertical_channels,end) +#endif + +#if STBIR__vertical_channels >= 1 +#define stbIF0( code ) code +#else +#define stbIF0( code ) +#endif +#if STBIR__vertical_channels >= 2 +#define stbIF1( code ) code +#else +#define stbIF1( code ) +#endif +#if STBIR__vertical_channels >= 3 +#define stbIF2( code ) code +#else +#define stbIF2( code ) +#endif +#if STBIR__vertical_channels >= 4 +#define stbIF3( code ) code +#else +#define stbIF3( code ) +#endif +#if STBIR__vertical_channels >= 5 +#define stbIF4( code ) code +#else +#define stbIF4( code ) +#endif +#if STBIR__vertical_channels >= 6 +#define stbIF5( code ) code +#else +#define stbIF5( code ) +#endif +#if STBIR__vertical_channels >= 7 +#define stbIF6( code ) code +#else +#define stbIF6( code ) +#endif +#if STBIR__vertical_channels >= 8 +#define stbIF7( code ) code +#else +#define stbIF7( code ) +#endif + +static void STBIR_chans( stbir__vertical_scatter_with_,_coeffs)( float ** outputs, float const * vertical_coefficients, float const * input, float const * input_end ) +{ + stbIF0( float STBIR_SIMD_STREAMOUT_PTR( * ) output0 = outputs[0]; float c0s = vertical_coefficients[0]; ) + stbIF1( float STBIR_SIMD_STREAMOUT_PTR( * ) output1 = outputs[1]; float c1s = vertical_coefficients[1]; ) + stbIF2( float STBIR_SIMD_STREAMOUT_PTR( * ) output2 = outputs[2]; float c2s = vertical_coefficients[2]; ) + stbIF3( float STBIR_SIMD_STREAMOUT_PTR( * ) output3 = outputs[3]; float c3s = vertical_coefficients[3]; ) + stbIF4( float STBIR_SIMD_STREAMOUT_PTR( * ) output4 = outputs[4]; float c4s = vertical_coefficients[4]; ) + stbIF5( float STBIR_SIMD_STREAMOUT_PTR( * ) output5 = outputs[5]; float c5s = vertical_coefficients[5]; ) + stbIF6( float STBIR_SIMD_STREAMOUT_PTR( * ) output6 = outputs[6]; float c6s = vertical_coefficients[6]; ) + stbIF7( float STBIR_SIMD_STREAMOUT_PTR( * ) output7 = outputs[7]; float c7s = vertical_coefficients[7]; ) + + #ifdef STBIR_SIMD + { + stbIF0(stbir__simdfX c0 = stbir__simdf_frepX( c0s ); ) + stbIF1(stbir__simdfX c1 = stbir__simdf_frepX( c1s ); ) + stbIF2(stbir__simdfX c2 = stbir__simdf_frepX( c2s ); ) + stbIF3(stbir__simdfX c3 = stbir__simdf_frepX( c3s ); ) + stbIF4(stbir__simdfX c4 = stbir__simdf_frepX( c4s ); ) + stbIF5(stbir__simdfX c5 = stbir__simdf_frepX( c5s ); ) + stbIF6(stbir__simdfX c6 = stbir__simdf_frepX( c6s ); ) + stbIF7(stbir__simdfX c7 = stbir__simdf_frepX( c7s ); ) + STBIR_SIMD_NO_UNROLL_LOOP_START + while ( ( (char*)input_end - (char*) input ) >= (16*stbir__simdfX_float_count) ) + { + stbir__simdfX o0, o1, o2, o3, r0, r1, r2, r3; + STBIR_SIMD_NO_UNROLL(output0); + + stbir__simdfX_load( r0, input ); stbir__simdfX_load( r1, input+stbir__simdfX_float_count ); stbir__simdfX_load( r2, input+(2*stbir__simdfX_float_count) ); stbir__simdfX_load( r3, input+(3*stbir__simdfX_float_count) ); + + #ifdef STB_IMAGE_RESIZE_VERTICAL_CONTINUE + stbIF0( stbir__simdfX_load( o0, output0 ); stbir__simdfX_load( o1, output0+stbir__simdfX_float_count ); stbir__simdfX_load( o2, output0+(2*stbir__simdfX_float_count) ); stbir__simdfX_load( o3, output0+(3*stbir__simdfX_float_count) ); + stbir__simdfX_madd( o0, o0, r0, c0 ); stbir__simdfX_madd( o1, o1, r1, c0 ); stbir__simdfX_madd( o2, o2, r2, c0 ); stbir__simdfX_madd( o3, o3, r3, c0 ); + stbir__simdfX_store( output0, o0 ); stbir__simdfX_store( output0+stbir__simdfX_float_count, o1 ); stbir__simdfX_store( output0+(2*stbir__simdfX_float_count), o2 ); stbir__simdfX_store( output0+(3*stbir__simdfX_float_count), o3 ); ) + stbIF1( stbir__simdfX_load( o0, output1 ); stbir__simdfX_load( o1, output1+stbir__simdfX_float_count ); stbir__simdfX_load( o2, output1+(2*stbir__simdfX_float_count) ); stbir__simdfX_load( o3, output1+(3*stbir__simdfX_float_count) ); + stbir__simdfX_madd( o0, o0, r0, c1 ); stbir__simdfX_madd( o1, o1, r1, c1 ); stbir__simdfX_madd( o2, o2, r2, c1 ); stbir__simdfX_madd( o3, o3, r3, c1 ); + stbir__simdfX_store( output1, o0 ); stbir__simdfX_store( output1+stbir__simdfX_float_count, o1 ); stbir__simdfX_store( output1+(2*stbir__simdfX_float_count), o2 ); stbir__simdfX_store( output1+(3*stbir__simdfX_float_count), o3 ); ) + stbIF2( stbir__simdfX_load( o0, output2 ); stbir__simdfX_load( o1, output2+stbir__simdfX_float_count ); stbir__simdfX_load( o2, output2+(2*stbir__simdfX_float_count) ); stbir__simdfX_load( o3, output2+(3*stbir__simdfX_float_count) ); + stbir__simdfX_madd( o0, o0, r0, c2 ); stbir__simdfX_madd( o1, o1, r1, c2 ); stbir__simdfX_madd( o2, o2, r2, c2 ); stbir__simdfX_madd( o3, o3, r3, c2 ); + stbir__simdfX_store( output2, o0 ); stbir__simdfX_store( output2+stbir__simdfX_float_count, o1 ); stbir__simdfX_store( output2+(2*stbir__simdfX_float_count), o2 ); stbir__simdfX_store( output2+(3*stbir__simdfX_float_count), o3 ); ) + stbIF3( stbir__simdfX_load( o0, output3 ); stbir__simdfX_load( o1, output3+stbir__simdfX_float_count ); stbir__simdfX_load( o2, output3+(2*stbir__simdfX_float_count) ); stbir__simdfX_load( o3, output3+(3*stbir__simdfX_float_count) ); + stbir__simdfX_madd( o0, o0, r0, c3 ); stbir__simdfX_madd( o1, o1, r1, c3 ); stbir__simdfX_madd( o2, o2, r2, c3 ); stbir__simdfX_madd( o3, o3, r3, c3 ); + stbir__simdfX_store( output3, o0 ); stbir__simdfX_store( output3+stbir__simdfX_float_count, o1 ); stbir__simdfX_store( output3+(2*stbir__simdfX_float_count), o2 ); stbir__simdfX_store( output3+(3*stbir__simdfX_float_count), o3 ); ) + stbIF4( stbir__simdfX_load( o0, output4 ); stbir__simdfX_load( o1, output4+stbir__simdfX_float_count ); stbir__simdfX_load( o2, output4+(2*stbir__simdfX_float_count) ); stbir__simdfX_load( o3, output4+(3*stbir__simdfX_float_count) ); + stbir__simdfX_madd( o0, o0, r0, c4 ); stbir__simdfX_madd( o1, o1, r1, c4 ); stbir__simdfX_madd( o2, o2, r2, c4 ); stbir__simdfX_madd( o3, o3, r3, c4 ); + stbir__simdfX_store( output4, o0 ); stbir__simdfX_store( output4+stbir__simdfX_float_count, o1 ); stbir__simdfX_store( output4+(2*stbir__simdfX_float_count), o2 ); stbir__simdfX_store( output4+(3*stbir__simdfX_float_count), o3 ); ) + stbIF5( stbir__simdfX_load( o0, output5 ); stbir__simdfX_load( o1, output5+stbir__simdfX_float_count ); stbir__simdfX_load( o2, output5+(2*stbir__simdfX_float_count)); stbir__simdfX_load( o3, output5+(3*stbir__simdfX_float_count) ); + stbir__simdfX_madd( o0, o0, r0, c5 ); stbir__simdfX_madd( o1, o1, r1, c5 ); stbir__simdfX_madd( o2, o2, r2, c5 ); stbir__simdfX_madd( o3, o3, r3, c5 ); + stbir__simdfX_store( output5, o0 ); stbir__simdfX_store( output5+stbir__simdfX_float_count, o1 ); stbir__simdfX_store( output5+(2*stbir__simdfX_float_count), o2 ); stbir__simdfX_store( output5+(3*stbir__simdfX_float_count), o3 ); ) + stbIF6( stbir__simdfX_load( o0, output6 ); stbir__simdfX_load( o1, output6+stbir__simdfX_float_count ); stbir__simdfX_load( o2, output6+(2*stbir__simdfX_float_count) ); stbir__simdfX_load( o3, output6+(3*stbir__simdfX_float_count) ); + stbir__simdfX_madd( o0, o0, r0, c6 ); stbir__simdfX_madd( o1, o1, r1, c6 ); stbir__simdfX_madd( o2, o2, r2, c6 ); stbir__simdfX_madd( o3, o3, r3, c6 ); + stbir__simdfX_store( output6, o0 ); stbir__simdfX_store( output6+stbir__simdfX_float_count, o1 ); stbir__simdfX_store( output6+(2*stbir__simdfX_float_count), o2 ); stbir__simdfX_store( output6+(3*stbir__simdfX_float_count), o3 ); ) + stbIF7( stbir__simdfX_load( o0, output7 ); stbir__simdfX_load( o1, output7+stbir__simdfX_float_count ); stbir__simdfX_load( o2, output7+(2*stbir__simdfX_float_count) ); stbir__simdfX_load( o3, output7+(3*stbir__simdfX_float_count) ); + stbir__simdfX_madd( o0, o0, r0, c7 ); stbir__simdfX_madd( o1, o1, r1, c7 ); stbir__simdfX_madd( o2, o2, r2, c7 ); stbir__simdfX_madd( o3, o3, r3, c7 ); + stbir__simdfX_store( output7, o0 ); stbir__simdfX_store( output7+stbir__simdfX_float_count, o1 ); stbir__simdfX_store( output7+(2*stbir__simdfX_float_count), o2 ); stbir__simdfX_store( output7+(3*stbir__simdfX_float_count), o3 ); ) + #else + stbIF0( stbir__simdfX_mult( o0, r0, c0 ); stbir__simdfX_mult( o1, r1, c0 ); stbir__simdfX_mult( o2, r2, c0 ); stbir__simdfX_mult( o3, r3, c0 ); + stbir__simdfX_store( output0, o0 ); stbir__simdfX_store( output0+stbir__simdfX_float_count, o1 ); stbir__simdfX_store( output0+(2*stbir__simdfX_float_count), o2 ); stbir__simdfX_store( output0+(3*stbir__simdfX_float_count), o3 ); ) + stbIF1( stbir__simdfX_mult( o0, r0, c1 ); stbir__simdfX_mult( o1, r1, c1 ); stbir__simdfX_mult( o2, r2, c1 ); stbir__simdfX_mult( o3, r3, c1 ); + stbir__simdfX_store( output1, o0 ); stbir__simdfX_store( output1+stbir__simdfX_float_count, o1 ); stbir__simdfX_store( output1+(2*stbir__simdfX_float_count), o2 ); stbir__simdfX_store( output1+(3*stbir__simdfX_float_count), o3 ); ) + stbIF2( stbir__simdfX_mult( o0, r0, c2 ); stbir__simdfX_mult( o1, r1, c2 ); stbir__simdfX_mult( o2, r2, c2 ); stbir__simdfX_mult( o3, r3, c2 ); + stbir__simdfX_store( output2, o0 ); stbir__simdfX_store( output2+stbir__simdfX_float_count, o1 ); stbir__simdfX_store( output2+(2*stbir__simdfX_float_count), o2 ); stbir__simdfX_store( output2+(3*stbir__simdfX_float_count), o3 ); ) + stbIF3( stbir__simdfX_mult( o0, r0, c3 ); stbir__simdfX_mult( o1, r1, c3 ); stbir__simdfX_mult( o2, r2, c3 ); stbir__simdfX_mult( o3, r3, c3 ); + stbir__simdfX_store( output3, o0 ); stbir__simdfX_store( output3+stbir__simdfX_float_count, o1 ); stbir__simdfX_store( output3+(2*stbir__simdfX_float_count), o2 ); stbir__simdfX_store( output3+(3*stbir__simdfX_float_count), o3 ); ) + stbIF4( stbir__simdfX_mult( o0, r0, c4 ); stbir__simdfX_mult( o1, r1, c4 ); stbir__simdfX_mult( o2, r2, c4 ); stbir__simdfX_mult( o3, r3, c4 ); + stbir__simdfX_store( output4, o0 ); stbir__simdfX_store( output4+stbir__simdfX_float_count, o1 ); stbir__simdfX_store( output4+(2*stbir__simdfX_float_count), o2 ); stbir__simdfX_store( output4+(3*stbir__simdfX_float_count), o3 ); ) + stbIF5( stbir__simdfX_mult( o0, r0, c5 ); stbir__simdfX_mult( o1, r1, c5 ); stbir__simdfX_mult( o2, r2, c5 ); stbir__simdfX_mult( o3, r3, c5 ); + stbir__simdfX_store( output5, o0 ); stbir__simdfX_store( output5+stbir__simdfX_float_count, o1 ); stbir__simdfX_store( output5+(2*stbir__simdfX_float_count), o2 ); stbir__simdfX_store( output5+(3*stbir__simdfX_float_count), o3 ); ) + stbIF6( stbir__simdfX_mult( o0, r0, c6 ); stbir__simdfX_mult( o1, r1, c6 ); stbir__simdfX_mult( o2, r2, c6 ); stbir__simdfX_mult( o3, r3, c6 ); + stbir__simdfX_store( output6, o0 ); stbir__simdfX_store( output6+stbir__simdfX_float_count, o1 ); stbir__simdfX_store( output6+(2*stbir__simdfX_float_count), o2 ); stbir__simdfX_store( output6+(3*stbir__simdfX_float_count), o3 ); ) + stbIF7( stbir__simdfX_mult( o0, r0, c7 ); stbir__simdfX_mult( o1, r1, c7 ); stbir__simdfX_mult( o2, r2, c7 ); stbir__simdfX_mult( o3, r3, c7 ); + stbir__simdfX_store( output7, o0 ); stbir__simdfX_store( output7+stbir__simdfX_float_count, o1 ); stbir__simdfX_store( output7+(2*stbir__simdfX_float_count), o2 ); stbir__simdfX_store( output7+(3*stbir__simdfX_float_count), o3 ); ) + #endif + + input += (4*stbir__simdfX_float_count); + stbIF0( output0 += (4*stbir__simdfX_float_count); ) stbIF1( output1 += (4*stbir__simdfX_float_count); ) stbIF2( output2 += (4*stbir__simdfX_float_count); ) stbIF3( output3 += (4*stbir__simdfX_float_count); ) stbIF4( output4 += (4*stbir__simdfX_float_count); ) stbIF5( output5 += (4*stbir__simdfX_float_count); ) stbIF6( output6 += (4*stbir__simdfX_float_count); ) stbIF7( output7 += (4*stbir__simdfX_float_count); ) + } + STBIR_SIMD_NO_UNROLL_LOOP_START + while ( ( (char*)input_end - (char*) input ) >= 16 ) + { + stbir__simdf o0, r0; + STBIR_SIMD_NO_UNROLL(output0); + + stbir__simdf_load( r0, input ); + + #ifdef STB_IMAGE_RESIZE_VERTICAL_CONTINUE + stbIF0( stbir__simdf_load( o0, output0 ); stbir__simdf_madd( o0, o0, r0, stbir__if_simdf8_cast_to_simdf4( c0 ) ); stbir__simdf_store( output0, o0 ); ) + stbIF1( stbir__simdf_load( o0, output1 ); stbir__simdf_madd( o0, o0, r0, stbir__if_simdf8_cast_to_simdf4( c1 ) ); stbir__simdf_store( output1, o0 ); ) + stbIF2( stbir__simdf_load( o0, output2 ); stbir__simdf_madd( o0, o0, r0, stbir__if_simdf8_cast_to_simdf4( c2 ) ); stbir__simdf_store( output2, o0 ); ) + stbIF3( stbir__simdf_load( o0, output3 ); stbir__simdf_madd( o0, o0, r0, stbir__if_simdf8_cast_to_simdf4( c3 ) ); stbir__simdf_store( output3, o0 ); ) + stbIF4( stbir__simdf_load( o0, output4 ); stbir__simdf_madd( o0, o0, r0, stbir__if_simdf8_cast_to_simdf4( c4 ) ); stbir__simdf_store( output4, o0 ); ) + stbIF5( stbir__simdf_load( o0, output5 ); stbir__simdf_madd( o0, o0, r0, stbir__if_simdf8_cast_to_simdf4( c5 ) ); stbir__simdf_store( output5, o0 ); ) + stbIF6( stbir__simdf_load( o0, output6 ); stbir__simdf_madd( o0, o0, r0, stbir__if_simdf8_cast_to_simdf4( c6 ) ); stbir__simdf_store( output6, o0 ); ) + stbIF7( stbir__simdf_load( o0, output7 ); stbir__simdf_madd( o0, o0, r0, stbir__if_simdf8_cast_to_simdf4( c7 ) ); stbir__simdf_store( output7, o0 ); ) + #else + stbIF0( stbir__simdf_mult( o0, r0, stbir__if_simdf8_cast_to_simdf4( c0 ) ); stbir__simdf_store( output0, o0 ); ) + stbIF1( stbir__simdf_mult( o0, r0, stbir__if_simdf8_cast_to_simdf4( c1 ) ); stbir__simdf_store( output1, o0 ); ) + stbIF2( stbir__simdf_mult( o0, r0, stbir__if_simdf8_cast_to_simdf4( c2 ) ); stbir__simdf_store( output2, o0 ); ) + stbIF3( stbir__simdf_mult( o0, r0, stbir__if_simdf8_cast_to_simdf4( c3 ) ); stbir__simdf_store( output3, o0 ); ) + stbIF4( stbir__simdf_mult( o0, r0, stbir__if_simdf8_cast_to_simdf4( c4 ) ); stbir__simdf_store( output4, o0 ); ) + stbIF5( stbir__simdf_mult( o0, r0, stbir__if_simdf8_cast_to_simdf4( c5 ) ); stbir__simdf_store( output5, o0 ); ) + stbIF6( stbir__simdf_mult( o0, r0, stbir__if_simdf8_cast_to_simdf4( c6 ) ); stbir__simdf_store( output6, o0 ); ) + stbIF7( stbir__simdf_mult( o0, r0, stbir__if_simdf8_cast_to_simdf4( c7 ) ); stbir__simdf_store( output7, o0 ); ) + #endif + + input += 4; + stbIF0( output0 += 4; ) stbIF1( output1 += 4; ) stbIF2( output2 += 4; ) stbIF3( output3 += 4; ) stbIF4( output4 += 4; ) stbIF5( output5 += 4; ) stbIF6( output6 += 4; ) stbIF7( output7 += 4; ) + } + } + #else + STBIR_NO_UNROLL_LOOP_START + while ( ( (char*)input_end - (char*) input ) >= 16 ) + { + float r0, r1, r2, r3; + STBIR_NO_UNROLL(input); + + r0 = input[0], r1 = input[1], r2 = input[2], r3 = input[3]; + + #ifdef STB_IMAGE_RESIZE_VERTICAL_CONTINUE + stbIF0( output0[0] += ( r0 * c0s ); output0[1] += ( r1 * c0s ); output0[2] += ( r2 * c0s ); output0[3] += ( r3 * c0s ); ) + stbIF1( output1[0] += ( r0 * c1s ); output1[1] += ( r1 * c1s ); output1[2] += ( r2 * c1s ); output1[3] += ( r3 * c1s ); ) + stbIF2( output2[0] += ( r0 * c2s ); output2[1] += ( r1 * c2s ); output2[2] += ( r2 * c2s ); output2[3] += ( r3 * c2s ); ) + stbIF3( output3[0] += ( r0 * c3s ); output3[1] += ( r1 * c3s ); output3[2] += ( r2 * c3s ); output3[3] += ( r3 * c3s ); ) + stbIF4( output4[0] += ( r0 * c4s ); output4[1] += ( r1 * c4s ); output4[2] += ( r2 * c4s ); output4[3] += ( r3 * c4s ); ) + stbIF5( output5[0] += ( r0 * c5s ); output5[1] += ( r1 * c5s ); output5[2] += ( r2 * c5s ); output5[3] += ( r3 * c5s ); ) + stbIF6( output6[0] += ( r0 * c6s ); output6[1] += ( r1 * c6s ); output6[2] += ( r2 * c6s ); output6[3] += ( r3 * c6s ); ) + stbIF7( output7[0] += ( r0 * c7s ); output7[1] += ( r1 * c7s ); output7[2] += ( r2 * c7s ); output7[3] += ( r3 * c7s ); ) + #else + stbIF0( output0[0] = ( r0 * c0s ); output0[1] = ( r1 * c0s ); output0[2] = ( r2 * c0s ); output0[3] = ( r3 * c0s ); ) + stbIF1( output1[0] = ( r0 * c1s ); output1[1] = ( r1 * c1s ); output1[2] = ( r2 * c1s ); output1[3] = ( r3 * c1s ); ) + stbIF2( output2[0] = ( r0 * c2s ); output2[1] = ( r1 * c2s ); output2[2] = ( r2 * c2s ); output2[3] = ( r3 * c2s ); ) + stbIF3( output3[0] = ( r0 * c3s ); output3[1] = ( r1 * c3s ); output3[2] = ( r2 * c3s ); output3[3] = ( r3 * c3s ); ) + stbIF4( output4[0] = ( r0 * c4s ); output4[1] = ( r1 * c4s ); output4[2] = ( r2 * c4s ); output4[3] = ( r3 * c4s ); ) + stbIF5( output5[0] = ( r0 * c5s ); output5[1] = ( r1 * c5s ); output5[2] = ( r2 * c5s ); output5[3] = ( r3 * c5s ); ) + stbIF6( output6[0] = ( r0 * c6s ); output6[1] = ( r1 * c6s ); output6[2] = ( r2 * c6s ); output6[3] = ( r3 * c6s ); ) + stbIF7( output7[0] = ( r0 * c7s ); output7[1] = ( r1 * c7s ); output7[2] = ( r2 * c7s ); output7[3] = ( r3 * c7s ); ) + #endif + + input += 4; + stbIF0( output0 += 4; ) stbIF1( output1 += 4; ) stbIF2( output2 += 4; ) stbIF3( output3 += 4; ) stbIF4( output4 += 4; ) stbIF5( output5 += 4; ) stbIF6( output6 += 4; ) stbIF7( output7 += 4; ) + } + #endif + STBIR_NO_UNROLL_LOOP_START + while ( input < input_end ) + { + float r = input[0]; + STBIR_NO_UNROLL(output0); + + #ifdef STB_IMAGE_RESIZE_VERTICAL_CONTINUE + stbIF0( output0[0] += ( r * c0s ); ) + stbIF1( output1[0] += ( r * c1s ); ) + stbIF2( output2[0] += ( r * c2s ); ) + stbIF3( output3[0] += ( r * c3s ); ) + stbIF4( output4[0] += ( r * c4s ); ) + stbIF5( output5[0] += ( r * c5s ); ) + stbIF6( output6[0] += ( r * c6s ); ) + stbIF7( output7[0] += ( r * c7s ); ) + #else + stbIF0( output0[0] = ( r * c0s ); ) + stbIF1( output1[0] = ( r * c1s ); ) + stbIF2( output2[0] = ( r * c2s ); ) + stbIF3( output3[0] = ( r * c3s ); ) + stbIF4( output4[0] = ( r * c4s ); ) + stbIF5( output5[0] = ( r * c5s ); ) + stbIF6( output6[0] = ( r * c6s ); ) + stbIF7( output7[0] = ( r * c7s ); ) + #endif + + ++input; + stbIF0( ++output0; ) stbIF1( ++output1; ) stbIF2( ++output2; ) stbIF3( ++output3; ) stbIF4( ++output4; ) stbIF5( ++output5; ) stbIF6( ++output6; ) stbIF7( ++output7; ) + } +} + +static void STBIR_chans( stbir__vertical_gather_with_,_coeffs)( float * outputp, float const * vertical_coefficients, float const ** inputs, float const * input0_end ) +{ + float STBIR_SIMD_STREAMOUT_PTR( * ) output = outputp; + + stbIF0( float const * input0 = inputs[0]; float c0s = vertical_coefficients[0]; ) + stbIF1( float const * input1 = inputs[1]; float c1s = vertical_coefficients[1]; ) + stbIF2( float const * input2 = inputs[2]; float c2s = vertical_coefficients[2]; ) + stbIF3( float const * input3 = inputs[3]; float c3s = vertical_coefficients[3]; ) + stbIF4( float const * input4 = inputs[4]; float c4s = vertical_coefficients[4]; ) + stbIF5( float const * input5 = inputs[5]; float c5s = vertical_coefficients[5]; ) + stbIF6( float const * input6 = inputs[6]; float c6s = vertical_coefficients[6]; ) + stbIF7( float const * input7 = inputs[7]; float c7s = vertical_coefficients[7]; ) + +#if ( STBIR__vertical_channels == 1 ) && !defined(STB_IMAGE_RESIZE_VERTICAL_CONTINUE) + // check single channel one weight + if ( ( c0s >= (1.0f-0.000001f) ) && ( c0s <= (1.0f+0.000001f) ) ) + { + STBIR_MEMCPY( output, input0, (char*)input0_end - (char*)input0 ); + return; + } +#endif + + #ifdef STBIR_SIMD + { + stbIF0(stbir__simdfX c0 = stbir__simdf_frepX( c0s ); ) + stbIF1(stbir__simdfX c1 = stbir__simdf_frepX( c1s ); ) + stbIF2(stbir__simdfX c2 = stbir__simdf_frepX( c2s ); ) + stbIF3(stbir__simdfX c3 = stbir__simdf_frepX( c3s ); ) + stbIF4(stbir__simdfX c4 = stbir__simdf_frepX( c4s ); ) + stbIF5(stbir__simdfX c5 = stbir__simdf_frepX( c5s ); ) + stbIF6(stbir__simdfX c6 = stbir__simdf_frepX( c6s ); ) + stbIF7(stbir__simdfX c7 = stbir__simdf_frepX( c7s ); ) + + STBIR_SIMD_NO_UNROLL_LOOP_START + while ( ( (char*)input0_end - (char*) input0 ) >= (16*stbir__simdfX_float_count) ) + { + stbir__simdfX o0, o1, o2, o3, r0, r1, r2, r3; + STBIR_SIMD_NO_UNROLL(output); + + // prefetch four loop iterations ahead (doesn't affect much for small resizes, but helps with big ones) + stbIF0( stbir__prefetch( input0 + (16*stbir__simdfX_float_count) ); ) + stbIF1( stbir__prefetch( input1 + (16*stbir__simdfX_float_count) ); ) + stbIF2( stbir__prefetch( input2 + (16*stbir__simdfX_float_count) ); ) + stbIF3( stbir__prefetch( input3 + (16*stbir__simdfX_float_count) ); ) + stbIF4( stbir__prefetch( input4 + (16*stbir__simdfX_float_count) ); ) + stbIF5( stbir__prefetch( input5 + (16*stbir__simdfX_float_count) ); ) + stbIF6( stbir__prefetch( input6 + (16*stbir__simdfX_float_count) ); ) + stbIF7( stbir__prefetch( input7 + (16*stbir__simdfX_float_count) ); ) + + #ifdef STB_IMAGE_RESIZE_VERTICAL_CONTINUE + stbIF0( stbir__simdfX_load( o0, output ); stbir__simdfX_load( o1, output+stbir__simdfX_float_count ); stbir__simdfX_load( o2, output+(2*stbir__simdfX_float_count) ); stbir__simdfX_load( o3, output+(3*stbir__simdfX_float_count) ); + stbir__simdfX_load( r0, input0 ); stbir__simdfX_load( r1, input0+stbir__simdfX_float_count ); stbir__simdfX_load( r2, input0+(2*stbir__simdfX_float_count) ); stbir__simdfX_load( r3, input0+(3*stbir__simdfX_float_count) ); + stbir__simdfX_madd( o0, o0, r0, c0 ); stbir__simdfX_madd( o1, o1, r1, c0 ); stbir__simdfX_madd( o2, o2, r2, c0 ); stbir__simdfX_madd( o3, o3, r3, c0 ); ) + #else + stbIF0( stbir__simdfX_load( r0, input0 ); stbir__simdfX_load( r1, input0+stbir__simdfX_float_count ); stbir__simdfX_load( r2, input0+(2*stbir__simdfX_float_count) ); stbir__simdfX_load( r3, input0+(3*stbir__simdfX_float_count) ); + stbir__simdfX_mult( o0, r0, c0 ); stbir__simdfX_mult( o1, r1, c0 ); stbir__simdfX_mult( o2, r2, c0 ); stbir__simdfX_mult( o3, r3, c0 ); ) + #endif + + stbIF1( stbir__simdfX_load( r0, input1 ); stbir__simdfX_load( r1, input1+stbir__simdfX_float_count ); stbir__simdfX_load( r2, input1+(2*stbir__simdfX_float_count) ); stbir__simdfX_load( r3, input1+(3*stbir__simdfX_float_count) ); + stbir__simdfX_madd( o0, o0, r0, c1 ); stbir__simdfX_madd( o1, o1, r1, c1 ); stbir__simdfX_madd( o2, o2, r2, c1 ); stbir__simdfX_madd( o3, o3, r3, c1 ); ) + stbIF2( stbir__simdfX_load( r0, input2 ); stbir__simdfX_load( r1, input2+stbir__simdfX_float_count ); stbir__simdfX_load( r2, input2+(2*stbir__simdfX_float_count) ); stbir__simdfX_load( r3, input2+(3*stbir__simdfX_float_count) ); + stbir__simdfX_madd( o0, o0, r0, c2 ); stbir__simdfX_madd( o1, o1, r1, c2 ); stbir__simdfX_madd( o2, o2, r2, c2 ); stbir__simdfX_madd( o3, o3, r3, c2 ); ) + stbIF3( stbir__simdfX_load( r0, input3 ); stbir__simdfX_load( r1, input3+stbir__simdfX_float_count ); stbir__simdfX_load( r2, input3+(2*stbir__simdfX_float_count) ); stbir__simdfX_load( r3, input3+(3*stbir__simdfX_float_count) ); + stbir__simdfX_madd( o0, o0, r0, c3 ); stbir__simdfX_madd( o1, o1, r1, c3 ); stbir__simdfX_madd( o2, o2, r2, c3 ); stbir__simdfX_madd( o3, o3, r3, c3 ); ) + stbIF4( stbir__simdfX_load( r0, input4 ); stbir__simdfX_load( r1, input4+stbir__simdfX_float_count ); stbir__simdfX_load( r2, input4+(2*stbir__simdfX_float_count) ); stbir__simdfX_load( r3, input4+(3*stbir__simdfX_float_count) ); + stbir__simdfX_madd( o0, o0, r0, c4 ); stbir__simdfX_madd( o1, o1, r1, c4 ); stbir__simdfX_madd( o2, o2, r2, c4 ); stbir__simdfX_madd( o3, o3, r3, c4 ); ) + stbIF5( stbir__simdfX_load( r0, input5 ); stbir__simdfX_load( r1, input5+stbir__simdfX_float_count ); stbir__simdfX_load( r2, input5+(2*stbir__simdfX_float_count) ); stbir__simdfX_load( r3, input5+(3*stbir__simdfX_float_count) ); + stbir__simdfX_madd( o0, o0, r0, c5 ); stbir__simdfX_madd( o1, o1, r1, c5 ); stbir__simdfX_madd( o2, o2, r2, c5 ); stbir__simdfX_madd( o3, o3, r3, c5 ); ) + stbIF6( stbir__simdfX_load( r0, input6 ); stbir__simdfX_load( r1, input6+stbir__simdfX_float_count ); stbir__simdfX_load( r2, input6+(2*stbir__simdfX_float_count) ); stbir__simdfX_load( r3, input6+(3*stbir__simdfX_float_count) ); + stbir__simdfX_madd( o0, o0, r0, c6 ); stbir__simdfX_madd( o1, o1, r1, c6 ); stbir__simdfX_madd( o2, o2, r2, c6 ); stbir__simdfX_madd( o3, o3, r3, c6 ); ) + stbIF7( stbir__simdfX_load( r0, input7 ); stbir__simdfX_load( r1, input7+stbir__simdfX_float_count ); stbir__simdfX_load( r2, input7+(2*stbir__simdfX_float_count) ); stbir__simdfX_load( r3, input7+(3*stbir__simdfX_float_count) ); + stbir__simdfX_madd( o0, o0, r0, c7 ); stbir__simdfX_madd( o1, o1, r1, c7 ); stbir__simdfX_madd( o2, o2, r2, c7 ); stbir__simdfX_madd( o3, o3, r3, c7 ); ) + + stbir__simdfX_store( output, o0 ); stbir__simdfX_store( output+stbir__simdfX_float_count, o1 ); stbir__simdfX_store( output+(2*stbir__simdfX_float_count), o2 ); stbir__simdfX_store( output+(3*stbir__simdfX_float_count), o3 ); + output += (4*stbir__simdfX_float_count); + stbIF0( input0 += (4*stbir__simdfX_float_count); ) stbIF1( input1 += (4*stbir__simdfX_float_count); ) stbIF2( input2 += (4*stbir__simdfX_float_count); ) stbIF3( input3 += (4*stbir__simdfX_float_count); ) stbIF4( input4 += (4*stbir__simdfX_float_count); ) stbIF5( input5 += (4*stbir__simdfX_float_count); ) stbIF6( input6 += (4*stbir__simdfX_float_count); ) stbIF7( input7 += (4*stbir__simdfX_float_count); ) + } + + STBIR_SIMD_NO_UNROLL_LOOP_START + while ( ( (char*)input0_end - (char*) input0 ) >= 16 ) + { + stbir__simdf o0, r0; + STBIR_SIMD_NO_UNROLL(output); + + #ifdef STB_IMAGE_RESIZE_VERTICAL_CONTINUE + stbIF0( stbir__simdf_load( o0, output ); stbir__simdf_load( r0, input0 ); stbir__simdf_madd( o0, o0, r0, stbir__if_simdf8_cast_to_simdf4( c0 ) ); ) + #else + stbIF0( stbir__simdf_load( r0, input0 ); stbir__simdf_mult( o0, r0, stbir__if_simdf8_cast_to_simdf4( c0 ) ); ) + #endif + stbIF1( stbir__simdf_load( r0, input1 ); stbir__simdf_madd( o0, o0, r0, stbir__if_simdf8_cast_to_simdf4( c1 ) ); ) + stbIF2( stbir__simdf_load( r0, input2 ); stbir__simdf_madd( o0, o0, r0, stbir__if_simdf8_cast_to_simdf4( c2 ) ); ) + stbIF3( stbir__simdf_load( r0, input3 ); stbir__simdf_madd( o0, o0, r0, stbir__if_simdf8_cast_to_simdf4( c3 ) ); ) + stbIF4( stbir__simdf_load( r0, input4 ); stbir__simdf_madd( o0, o0, r0, stbir__if_simdf8_cast_to_simdf4( c4 ) ); ) + stbIF5( stbir__simdf_load( r0, input5 ); stbir__simdf_madd( o0, o0, r0, stbir__if_simdf8_cast_to_simdf4( c5 ) ); ) + stbIF6( stbir__simdf_load( r0, input6 ); stbir__simdf_madd( o0, o0, r0, stbir__if_simdf8_cast_to_simdf4( c6 ) ); ) + stbIF7( stbir__simdf_load( r0, input7 ); stbir__simdf_madd( o0, o0, r0, stbir__if_simdf8_cast_to_simdf4( c7 ) ); ) + + stbir__simdf_store( output, o0 ); + output += 4; + stbIF0( input0 += 4; ) stbIF1( input1 += 4; ) stbIF2( input2 += 4; ) stbIF3( input3 += 4; ) stbIF4( input4 += 4; ) stbIF5( input5 += 4; ) stbIF6( input6 += 4; ) stbIF7( input7 += 4; ) + } + } + #else + STBIR_NO_UNROLL_LOOP_START + while ( ( (char*)input0_end - (char*) input0 ) >= 16 ) + { + float o0, o1, o2, o3; + STBIR_NO_UNROLL(output); + #ifdef STB_IMAGE_RESIZE_VERTICAL_CONTINUE + stbIF0( o0 = output[0] + input0[0] * c0s; o1 = output[1] + input0[1] * c0s; o2 = output[2] + input0[2] * c0s; o3 = output[3] + input0[3] * c0s; ) + #else + stbIF0( o0 = input0[0] * c0s; o1 = input0[1] * c0s; o2 = input0[2] * c0s; o3 = input0[3] * c0s; ) + #endif + stbIF1( o0 += input1[0] * c1s; o1 += input1[1] * c1s; o2 += input1[2] * c1s; o3 += input1[3] * c1s; ) + stbIF2( o0 += input2[0] * c2s; o1 += input2[1] * c2s; o2 += input2[2] * c2s; o3 += input2[3] * c2s; ) + stbIF3( o0 += input3[0] * c3s; o1 += input3[1] * c3s; o2 += input3[2] * c3s; o3 += input3[3] * c3s; ) + stbIF4( o0 += input4[0] * c4s; o1 += input4[1] * c4s; o2 += input4[2] * c4s; o3 += input4[3] * c4s; ) + stbIF5( o0 += input5[0] * c5s; o1 += input5[1] * c5s; o2 += input5[2] * c5s; o3 += input5[3] * c5s; ) + stbIF6( o0 += input6[0] * c6s; o1 += input6[1] * c6s; o2 += input6[2] * c6s; o3 += input6[3] * c6s; ) + stbIF7( o0 += input7[0] * c7s; o1 += input7[1] * c7s; o2 += input7[2] * c7s; o3 += input7[3] * c7s; ) + output[0] = o0; output[1] = o1; output[2] = o2; output[3] = o3; + output += 4; + stbIF0( input0 += 4; ) stbIF1( input1 += 4; ) stbIF2( input2 += 4; ) stbIF3( input3 += 4; ) stbIF4( input4 += 4; ) stbIF5( input5 += 4; ) stbIF6( input6 += 4; ) stbIF7( input7 += 4; ) + } + #endif + STBIR_NO_UNROLL_LOOP_START + while ( input0 < input0_end ) + { + float o0; + STBIR_NO_UNROLL(output); + #ifdef STB_IMAGE_RESIZE_VERTICAL_CONTINUE + stbIF0( o0 = output[0] + input0[0] * c0s; ) + #else + stbIF0( o0 = input0[0] * c0s; ) + #endif + stbIF1( o0 += input1[0] * c1s; ) + stbIF2( o0 += input2[0] * c2s; ) + stbIF3( o0 += input3[0] * c3s; ) + stbIF4( o0 += input4[0] * c4s; ) + stbIF5( o0 += input5[0] * c5s; ) + stbIF6( o0 += input6[0] * c6s; ) + stbIF7( o0 += input7[0] * c7s; ) + output[0] = o0; + ++output; + stbIF0( ++input0; ) stbIF1( ++input1; ) stbIF2( ++input2; ) stbIF3( ++input3; ) stbIF4( ++input4; ) stbIF5( ++input5; ) stbIF6( ++input6; ) stbIF7( ++input7; ) + } +} + +#undef stbIF0 +#undef stbIF1 +#undef stbIF2 +#undef stbIF3 +#undef stbIF4 +#undef stbIF5 +#undef stbIF6 +#undef stbIF7 +#undef STB_IMAGE_RESIZE_DO_VERTICALS +#undef STBIR__vertical_channels +#undef STB_IMAGE_RESIZE_DO_HORIZONTALS +#undef STBIR_strs_join24 +#undef STBIR_strs_join14 +#undef STBIR_chans +#ifdef STB_IMAGE_RESIZE_VERTICAL_CONTINUE +#undef STB_IMAGE_RESIZE_VERTICAL_CONTINUE +#endif + +#else // !STB_IMAGE_RESIZE_DO_VERTICALS + +#define STBIR_chans( start, end ) STBIR_strs_join1(start,STBIR__horizontal_channels,end) + +#ifndef stbir__2_coeff_only +#define stbir__2_coeff_only() \ + stbir__1_coeff_only(); \ + stbir__1_coeff_remnant(1); +#endif + +#ifndef stbir__2_coeff_remnant +#define stbir__2_coeff_remnant( ofs ) \ + stbir__1_coeff_remnant(ofs); \ + stbir__1_coeff_remnant((ofs)+1); +#endif + +#ifndef stbir__3_coeff_only +#define stbir__3_coeff_only() \ + stbir__2_coeff_only(); \ + stbir__1_coeff_remnant(2); +#endif + +#ifndef stbir__3_coeff_remnant +#define stbir__3_coeff_remnant( ofs ) \ + stbir__2_coeff_remnant(ofs); \ + stbir__1_coeff_remnant((ofs)+2); +#endif + +#ifndef stbir__3_coeff_setup +#define stbir__3_coeff_setup() +#endif + +#ifndef stbir__4_coeff_start +#define stbir__4_coeff_start() \ + stbir__2_coeff_only(); \ + stbir__2_coeff_remnant(2); +#endif + +#ifndef stbir__4_coeff_continue_from_4 +#define stbir__4_coeff_continue_from_4( ofs ) \ + stbir__2_coeff_remnant(ofs); \ + stbir__2_coeff_remnant((ofs)+2); +#endif + +#ifndef stbir__store_output_tiny +#define stbir__store_output_tiny stbir__store_output +#endif + +static void STBIR_chans( stbir__horizontal_gather_,_channels_with_1_coeff)( float * output_buffer, unsigned int output_sub_size, float const * decode_buffer, stbir__contributors const * horizontal_contributors, float const * horizontal_coefficients, int coefficient_width ) +{ + float const * output_end = output_buffer + output_sub_size * STBIR__horizontal_channels; + float STBIR_SIMD_STREAMOUT_PTR( * ) output = output_buffer; + STBIR_SIMD_NO_UNROLL_LOOP_START + do { + float const * decode = decode_buffer + horizontal_contributors->n0 * STBIR__horizontal_channels; + float const * hc = horizontal_coefficients; + stbir__1_coeff_only(); + stbir__store_output_tiny(); + } while ( output < output_end ); +} + +static void STBIR_chans( stbir__horizontal_gather_,_channels_with_2_coeffs)( float * output_buffer, unsigned int output_sub_size, float const * decode_buffer, stbir__contributors const * horizontal_contributors, float const * horizontal_coefficients, int coefficient_width ) +{ + float const * output_end = output_buffer + output_sub_size * STBIR__horizontal_channels; + float STBIR_SIMD_STREAMOUT_PTR( * ) output = output_buffer; + STBIR_SIMD_NO_UNROLL_LOOP_START + do { + float const * decode = decode_buffer + horizontal_contributors->n0 * STBIR__horizontal_channels; + float const * hc = horizontal_coefficients; + stbir__2_coeff_only(); + stbir__store_output_tiny(); + } while ( output < output_end ); +} + +static void STBIR_chans( stbir__horizontal_gather_,_channels_with_3_coeffs)( float * output_buffer, unsigned int output_sub_size, float const * decode_buffer, stbir__contributors const * horizontal_contributors, float const * horizontal_coefficients, int coefficient_width ) +{ + float const * output_end = output_buffer + output_sub_size * STBIR__horizontal_channels; + float STBIR_SIMD_STREAMOUT_PTR( * ) output = output_buffer; + STBIR_SIMD_NO_UNROLL_LOOP_START + do { + float const * decode = decode_buffer + horizontal_contributors->n0 * STBIR__horizontal_channels; + float const * hc = horizontal_coefficients; + stbir__3_coeff_only(); + stbir__store_output_tiny(); + } while ( output < output_end ); +} + +static void STBIR_chans( stbir__horizontal_gather_,_channels_with_4_coeffs)( float * output_buffer, unsigned int output_sub_size, float const * decode_buffer, stbir__contributors const * horizontal_contributors, float const * horizontal_coefficients, int coefficient_width ) +{ + float const * output_end = output_buffer + output_sub_size * STBIR__horizontal_channels; + float STBIR_SIMD_STREAMOUT_PTR( * ) output = output_buffer; + STBIR_SIMD_NO_UNROLL_LOOP_START + do { + float const * decode = decode_buffer + horizontal_contributors->n0 * STBIR__horizontal_channels; + float const * hc = horizontal_coefficients; + stbir__4_coeff_start(); + stbir__store_output(); + } while ( output < output_end ); +} + +static void STBIR_chans( stbir__horizontal_gather_,_channels_with_5_coeffs)( float * output_buffer, unsigned int output_sub_size, float const * decode_buffer, stbir__contributors const * horizontal_contributors, float const * horizontal_coefficients, int coefficient_width ) +{ + float const * output_end = output_buffer + output_sub_size * STBIR__horizontal_channels; + float STBIR_SIMD_STREAMOUT_PTR( * ) output = output_buffer; + STBIR_SIMD_NO_UNROLL_LOOP_START + do { + float const * decode = decode_buffer + horizontal_contributors->n0 * STBIR__horizontal_channels; + float const * hc = horizontal_coefficients; + stbir__4_coeff_start(); + stbir__1_coeff_remnant(4); + stbir__store_output(); + } while ( output < output_end ); +} + +static void STBIR_chans( stbir__horizontal_gather_,_channels_with_6_coeffs)( float * output_buffer, unsigned int output_sub_size, float const * decode_buffer, stbir__contributors const * horizontal_contributors, float const * horizontal_coefficients, int coefficient_width ) +{ + float const * output_end = output_buffer + output_sub_size * STBIR__horizontal_channels; + float STBIR_SIMD_STREAMOUT_PTR( * ) output = output_buffer; + STBIR_SIMD_NO_UNROLL_LOOP_START + do { + float const * decode = decode_buffer + horizontal_contributors->n0 * STBIR__horizontal_channels; + float const * hc = horizontal_coefficients; + stbir__4_coeff_start(); + stbir__2_coeff_remnant(4); + stbir__store_output(); + } while ( output < output_end ); +} + +static void STBIR_chans( stbir__horizontal_gather_,_channels_with_7_coeffs)( float * output_buffer, unsigned int output_sub_size, float const * decode_buffer, stbir__contributors const * horizontal_contributors, float const * horizontal_coefficients, int coefficient_width ) +{ + float const * output_end = output_buffer + output_sub_size * STBIR__horizontal_channels; + float STBIR_SIMD_STREAMOUT_PTR( * ) output = output_buffer; + stbir__3_coeff_setup(); + STBIR_SIMD_NO_UNROLL_LOOP_START + do { + float const * decode = decode_buffer + horizontal_contributors->n0 * STBIR__horizontal_channels; + float const * hc = horizontal_coefficients; + + stbir__4_coeff_start(); + stbir__3_coeff_remnant(4); + stbir__store_output(); + } while ( output < output_end ); +} + +static void STBIR_chans( stbir__horizontal_gather_,_channels_with_8_coeffs)( float * output_buffer, unsigned int output_sub_size, float const * decode_buffer, stbir__contributors const * horizontal_contributors, float const * horizontal_coefficients, int coefficient_width ) +{ + float const * output_end = output_buffer + output_sub_size * STBIR__horizontal_channels; + float STBIR_SIMD_STREAMOUT_PTR( * ) output = output_buffer; + STBIR_SIMD_NO_UNROLL_LOOP_START + do { + float const * decode = decode_buffer + horizontal_contributors->n0 * STBIR__horizontal_channels; + float const * hc = horizontal_coefficients; + stbir__4_coeff_start(); + stbir__4_coeff_continue_from_4(4); + stbir__store_output(); + } while ( output < output_end ); +} + +static void STBIR_chans( stbir__horizontal_gather_,_channels_with_9_coeffs)( float * output_buffer, unsigned int output_sub_size, float const * decode_buffer, stbir__contributors const * horizontal_contributors, float const * horizontal_coefficients, int coefficient_width ) +{ + float const * output_end = output_buffer + output_sub_size * STBIR__horizontal_channels; + float STBIR_SIMD_STREAMOUT_PTR( * ) output = output_buffer; + STBIR_SIMD_NO_UNROLL_LOOP_START + do { + float const * decode = decode_buffer + horizontal_contributors->n0 * STBIR__horizontal_channels; + float const * hc = horizontal_coefficients; + stbir__4_coeff_start(); + stbir__4_coeff_continue_from_4(4); + stbir__1_coeff_remnant(8); + stbir__store_output(); + } while ( output < output_end ); +} + +static void STBIR_chans( stbir__horizontal_gather_,_channels_with_10_coeffs)( float * output_buffer, unsigned int output_sub_size, float const * decode_buffer, stbir__contributors const * horizontal_contributors, float const * horizontal_coefficients, int coefficient_width ) +{ + float const * output_end = output_buffer + output_sub_size * STBIR__horizontal_channels; + float STBIR_SIMD_STREAMOUT_PTR( * ) output = output_buffer; + STBIR_SIMD_NO_UNROLL_LOOP_START + do { + float const * decode = decode_buffer + horizontal_contributors->n0 * STBIR__horizontal_channels; + float const * hc = horizontal_coefficients; + stbir__4_coeff_start(); + stbir__4_coeff_continue_from_4(4); + stbir__2_coeff_remnant(8); + stbir__store_output(); + } while ( output < output_end ); +} + +static void STBIR_chans( stbir__horizontal_gather_,_channels_with_11_coeffs)( float * output_buffer, unsigned int output_sub_size, float const * decode_buffer, stbir__contributors const * horizontal_contributors, float const * horizontal_coefficients, int coefficient_width ) +{ + float const * output_end = output_buffer + output_sub_size * STBIR__horizontal_channels; + float STBIR_SIMD_STREAMOUT_PTR( * ) output = output_buffer; + stbir__3_coeff_setup(); + STBIR_SIMD_NO_UNROLL_LOOP_START + do { + float const * decode = decode_buffer + horizontal_contributors->n0 * STBIR__horizontal_channels; + float const * hc = horizontal_coefficients; + stbir__4_coeff_start(); + stbir__4_coeff_continue_from_4(4); + stbir__3_coeff_remnant(8); + stbir__store_output(); + } while ( output < output_end ); +} + +static void STBIR_chans( stbir__horizontal_gather_,_channels_with_12_coeffs)( float * output_buffer, unsigned int output_sub_size, float const * decode_buffer, stbir__contributors const * horizontal_contributors, float const * horizontal_coefficients, int coefficient_width ) +{ + float const * output_end = output_buffer + output_sub_size * STBIR__horizontal_channels; + float STBIR_SIMD_STREAMOUT_PTR( * ) output = output_buffer; + STBIR_SIMD_NO_UNROLL_LOOP_START + do { + float const * decode = decode_buffer + horizontal_contributors->n0 * STBIR__horizontal_channels; + float const * hc = horizontal_coefficients; + stbir__4_coeff_start(); + stbir__4_coeff_continue_from_4(4); + stbir__4_coeff_continue_from_4(8); + stbir__store_output(); + } while ( output < output_end ); +} + +static void STBIR_chans( stbir__horizontal_gather_,_channels_with_n_coeffs_mod0 )( float * output_buffer, unsigned int output_sub_size, float const * decode_buffer, stbir__contributors const * horizontal_contributors, float const * horizontal_coefficients, int coefficient_width ) +{ + float const * output_end = output_buffer + output_sub_size * STBIR__horizontal_channels; + float STBIR_SIMD_STREAMOUT_PTR( * ) output = output_buffer; + STBIR_SIMD_NO_UNROLL_LOOP_START + do { + float const * decode = decode_buffer + horizontal_contributors->n0 * STBIR__horizontal_channels; + int n = ( ( horizontal_contributors->n1 - horizontal_contributors->n0 + 1 ) - 4 + 3 ) >> 2; + float const * hc = horizontal_coefficients; + + stbir__4_coeff_start(); + STBIR_SIMD_NO_UNROLL_LOOP_START + do { + hc += 4; + decode += STBIR__horizontal_channels * 4; + stbir__4_coeff_continue_from_4( 0 ); + --n; + } while ( n > 0 ); + stbir__store_output(); + } while ( output < output_end ); +} + +static void STBIR_chans( stbir__horizontal_gather_,_channels_with_n_coeffs_mod1 )( float * output_buffer, unsigned int output_sub_size, float const * decode_buffer, stbir__contributors const * horizontal_contributors, float const * horizontal_coefficients, int coefficient_width ) +{ + float const * output_end = output_buffer + output_sub_size * STBIR__horizontal_channels; + float STBIR_SIMD_STREAMOUT_PTR( * ) output = output_buffer; + STBIR_SIMD_NO_UNROLL_LOOP_START + do { + float const * decode = decode_buffer + horizontal_contributors->n0 * STBIR__horizontal_channels; + int n = ( ( horizontal_contributors->n1 - horizontal_contributors->n0 + 1 ) - 5 + 3 ) >> 2; + float const * hc = horizontal_coefficients; + + stbir__4_coeff_start(); + STBIR_SIMD_NO_UNROLL_LOOP_START + do { + hc += 4; + decode += STBIR__horizontal_channels * 4; + stbir__4_coeff_continue_from_4( 0 ); + --n; + } while ( n > 0 ); + stbir__1_coeff_remnant( 4 ); + stbir__store_output(); + } while ( output < output_end ); +} + +static void STBIR_chans( stbir__horizontal_gather_,_channels_with_n_coeffs_mod2 )( float * output_buffer, unsigned int output_sub_size, float const * decode_buffer, stbir__contributors const * horizontal_contributors, float const * horizontal_coefficients, int coefficient_width ) +{ + float const * output_end = output_buffer + output_sub_size * STBIR__horizontal_channels; + float STBIR_SIMD_STREAMOUT_PTR( * ) output = output_buffer; + STBIR_SIMD_NO_UNROLL_LOOP_START + do { + float const * decode = decode_buffer + horizontal_contributors->n0 * STBIR__horizontal_channels; + int n = ( ( horizontal_contributors->n1 - horizontal_contributors->n0 + 1 ) - 6 + 3 ) >> 2; + float const * hc = horizontal_coefficients; + + stbir__4_coeff_start(); + STBIR_SIMD_NO_UNROLL_LOOP_START + do { + hc += 4; + decode += STBIR__horizontal_channels * 4; + stbir__4_coeff_continue_from_4( 0 ); + --n; + } while ( n > 0 ); + stbir__2_coeff_remnant( 4 ); + + stbir__store_output(); + } while ( output < output_end ); +} + +static void STBIR_chans( stbir__horizontal_gather_,_channels_with_n_coeffs_mod3 )( float * output_buffer, unsigned int output_sub_size, float const * decode_buffer, stbir__contributors const * horizontal_contributors, float const * horizontal_coefficients, int coefficient_width ) +{ + float const * output_end = output_buffer + output_sub_size * STBIR__horizontal_channels; + float STBIR_SIMD_STREAMOUT_PTR( * ) output = output_buffer; + stbir__3_coeff_setup(); + STBIR_SIMD_NO_UNROLL_LOOP_START + do { + float const * decode = decode_buffer + horizontal_contributors->n0 * STBIR__horizontal_channels; + int n = ( ( horizontal_contributors->n1 - horizontal_contributors->n0 + 1 ) - 7 + 3 ) >> 2; + float const * hc = horizontal_coefficients; + + stbir__4_coeff_start(); + STBIR_SIMD_NO_UNROLL_LOOP_START + do { + hc += 4; + decode += STBIR__horizontal_channels * 4; + stbir__4_coeff_continue_from_4( 0 ); + --n; + } while ( n > 0 ); + stbir__3_coeff_remnant( 4 ); + + stbir__store_output(); + } while ( output < output_end ); +} + +static stbir__horizontal_gather_channels_func * STBIR_chans(stbir__horizontal_gather_,_channels_with_n_coeffs_funcs)[4]= +{ + STBIR_chans(stbir__horizontal_gather_,_channels_with_n_coeffs_mod0), + STBIR_chans(stbir__horizontal_gather_,_channels_with_n_coeffs_mod1), + STBIR_chans(stbir__horizontal_gather_,_channels_with_n_coeffs_mod2), + STBIR_chans(stbir__horizontal_gather_,_channels_with_n_coeffs_mod3), +}; + +static stbir__horizontal_gather_channels_func * STBIR_chans(stbir__horizontal_gather_,_channels_funcs)[12]= +{ + STBIR_chans(stbir__horizontal_gather_,_channels_with_1_coeff), + STBIR_chans(stbir__horizontal_gather_,_channels_with_2_coeffs), + STBIR_chans(stbir__horizontal_gather_,_channels_with_3_coeffs), + STBIR_chans(stbir__horizontal_gather_,_channels_with_4_coeffs), + STBIR_chans(stbir__horizontal_gather_,_channels_with_5_coeffs), + STBIR_chans(stbir__horizontal_gather_,_channels_with_6_coeffs), + STBIR_chans(stbir__horizontal_gather_,_channels_with_7_coeffs), + STBIR_chans(stbir__horizontal_gather_,_channels_with_8_coeffs), + STBIR_chans(stbir__horizontal_gather_,_channels_with_9_coeffs), + STBIR_chans(stbir__horizontal_gather_,_channels_with_10_coeffs), + STBIR_chans(stbir__horizontal_gather_,_channels_with_11_coeffs), + STBIR_chans(stbir__horizontal_gather_,_channels_with_12_coeffs), +}; + +#undef STBIR__horizontal_channels +#undef STB_IMAGE_RESIZE_DO_HORIZONTALS +#undef stbir__1_coeff_only +#undef stbir__1_coeff_remnant +#undef stbir__2_coeff_only +#undef stbir__2_coeff_remnant +#undef stbir__3_coeff_only +#undef stbir__3_coeff_remnant +#undef stbir__3_coeff_setup +#undef stbir__4_coeff_start +#undef stbir__4_coeff_continue_from_4 +#undef stbir__store_output +#undef stbir__store_output_tiny +#undef STBIR_chans + +#endif // HORIZONALS + +#undef STBIR_strs_join2 +#undef STBIR_strs_join1 + +#endif // STB_IMAGE_RESIZE_DO_HORIZONTALS/VERTICALS/CODERS + +/* +------------------------------------------------------------------------------ +This software is available under 2 licenses -- choose whichever you prefer. +------------------------------------------------------------------------------ +ALTERNATIVE A - MIT License +Copyright (c) 2017 Sean Barrett +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +------------------------------------------------------------------------------ +ALTERNATIVE B - Public Domain (www.unlicense.org) +This is free and unencumbered software released into the public domain. +Anyone is free to copy, modify, publish, use, compile, sell, or distribute this +software, either in source code form or as a compiled binary, for any purpose, +commercial or non-commercial, and by any means. +In jurisdictions that recognize copyright laws, the author or authors of this +software dedicate any and all copyright interest in the software to the public +domain. We make this dedication for the benefit of the public at large and to +the detriment of our heirs and successors. We intend this dedication to be an +overt act of relinquishment in perpetuity of all present and future rights to +this software under copyright law. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN +ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +------------------------------------------------------------------------------ +*/ diff --git a/gframe/tag_duel.cpp b/gframe/tag_duel.cpp index 0673261611..78a0eb612e 100644 --- a/gframe/tag_duel.cpp +++ b/gframe/tag_duel.cpp @@ -1,10 +1,8 @@ +#include "config.h" #include "tag_duel.h" #include "netserver.h" #include "game.h" -#include "../ocgcore/ocgapi.h" -#include "../ocgcore/card.h" -#include "../ocgcore/duel.h" -#include "../ocgcore/field.h" +#include "data_manager.h" #include "../ocgcore/mtrandom.h" namespace ygo { @@ -13,20 +11,22 @@ TagDuel::TagDuel() { for(int i = 0; i < 4; ++i) { players[i] = 0; ready[i] = false; + surrender[i] = false; } } TagDuel::~TagDuel() { } -void TagDuel::Chat(DuelPlayer* dp, void* pdata, int len) { - STOC_Chat scc; - scc.player = dp->type; - unsigned short* msg = (unsigned short*)pdata; - int msglen = BufferIO::CopyWStr(msg, scc.msg, 256); +void TagDuel::Chat(DuelPlayer* dp, unsigned char* pdata, int len) { + unsigned char scc[SIZE_STOC_CHAT]; + const auto scc_size = NetServer::CreateChatPacket(pdata, len, scc, dp->type); + if (!scc_size) + return; for(int i = 0; i < 4; ++i) - if(players[i] != dp) - NetServer::SendBufferToPlayer(players[i], STOC_CHAT, &scc, 4 + msglen * 2); + NetServer::SendBufferToPlayer(players[i], STOC_CHAT, scc, scc_size); + for(auto pit = observers.begin(); pit != observers.end(); ++pit) + NetServer::ReSendToPlayer(*pit); } -void TagDuel::JoinGame(DuelPlayer* dp, void* pdata, bool is_creater) { +void TagDuel::JoinGame(DuelPlayer* dp, unsigned char* pdata, bool is_creater) { if(!is_creater) { if(dp->game && dp->type != 0xff) { STOC_ErrorMsg scem; @@ -36,7 +36,9 @@ void TagDuel::JoinGame(DuelPlayer* dp, void* pdata, bool is_creater) { NetServer::DisconnectPlayer(dp); return; } - CTOS_JoinGame* pkt = (CTOS_JoinGame*)pdata; + CTOS_JoinGame packet; + std::memcpy(&packet, pdata, sizeof packet); + auto pkt = &packet; if(pkt->version != PRO_VERSION) { STOC_ErrorMsg scem; scem.msg = ERRMSG_VERERROR; @@ -46,8 +48,9 @@ void TagDuel::JoinGame(DuelPlayer* dp, void* pdata, bool is_creater) { return; } wchar_t jpass[20]; - BufferIO::CopyWStr(pkt->pass, jpass, 20); - if(wcscmp(jpass, pass)) { + BufferIO::NullTerminate(pkt->pass); + BufferIO::CopyCharArray(pkt->pass, jpass); + if(std::wcscmp(jpass, pass)) { STOC_ErrorMsg scem; scem.msg = ERRMSG_JOINERROR; scem.code = 1; @@ -64,7 +67,7 @@ void TagDuel::JoinGame(DuelPlayer* dp, void* pdata, bool is_creater) { sctc.type = (host_player == dp) ? 0x10 : 0; if(!players[0] || !players[1] || !players[2] || !players[3]) { STOC_HS_PlayerEnter scpe; - BufferIO::CopyWStr(dp->name, scpe.name, 20); + BufferIO::CopyCharArray(dp->name, scpe.name); if(!players[0]) scpe.pos = 0; else if(!players[1]) @@ -86,7 +89,7 @@ void TagDuel::JoinGame(DuelPlayer* dp, void* pdata, bool is_creater) { dp->type = NETPLAYER_TYPE_OBSERVER; sctc.type |= NETPLAYER_TYPE_OBSERVER; STOC_HS_WatchChange scwc; - scwc.watch_count = observers.size(); + scwc.watch_count = (unsigned short)observers.size(); for(int i = 0; i < 4; ++i) if(players[i]) NetServer::SendPacketToPlayer(players[i], STOC_HS_WATCH_CHANGE, scwc); @@ -98,7 +101,7 @@ void TagDuel::JoinGame(DuelPlayer* dp, void* pdata, bool is_creater) { for(int i = 0; i < 4; ++i) if(players[i]) { STOC_HS_PlayerEnter scpe; - BufferIO::CopyWStr(players[i]->name, scpe.name, 20); + BufferIO::CopyCharArray(players[i]->name, scpe.name); scpe.pos = i; NetServer::SendPacketToPlayer(dp, STOC_HS_PLAYER_ENTER, scpe); if(ready[i]) { @@ -109,7 +112,7 @@ void TagDuel::JoinGame(DuelPlayer* dp, void* pdata, bool is_creater) { } if(observers.size()) { STOC_HS_WatchChange scwc; - scwc.watch_count = observers.size(); + scwc.watch_count = (unsigned short)observers.size(); NetServer::SendPacketToPlayer(dp, STOC_HS_WATCH_CHANGE, scwc); } } @@ -119,9 +122,9 @@ void TagDuel::LeaveGame(DuelPlayer* dp) { NetServer::StopServer(); } else if(dp->type == NETPLAYER_TYPE_OBSERVER) { observers.erase(dp); - if(!pduel) { + if(duel_stage == DUEL_STAGE_BEGIN) { STOC_HS_WatchChange scwc; - scwc.watch_count = observers.size(); + scwc.watch_count = (unsigned short)observers.size(); for(int i = 0; i < 4; ++i) if(players[i]) NetServer::SendPacketToPlayer(players[i], STOC_HS_WATCH_CHANGE, scwc); @@ -130,7 +133,7 @@ void TagDuel::LeaveGame(DuelPlayer* dp) { } NetServer::DisconnectPlayer(dp); } else { - if(!pduel) { + if(duel_stage == DUEL_STAGE_BEGIN) { STOC_HS_PlayerChange scpc; players[dp->type] = 0; ready[dp->type] = false; @@ -140,11 +143,11 @@ void TagDuel::LeaveGame(DuelPlayer* dp) { NetServer::SendPacketToPlayer(players[i], STOC_HS_PLAYER_CHANGE, scpc); for(auto pit = observers.begin(); pit != observers.end(); ++pit) NetServer::SendPacketToPlayer(*pit, STOC_HS_PLAYER_CHANGE, scpc); - NetServer::DisconnectPlayer(dp); - } else { + } else if(duel_stage != DUEL_STAGE_END) { EndDuel(); DuelEndProc(); } + NetServer::DisconnectPlayer(dp); } } void TagDuel::ToDuelist(DuelPlayer* dp) { @@ -153,7 +156,7 @@ void TagDuel::ToDuelist(DuelPlayer* dp) { if(dp->type == NETPLAYER_TYPE_OBSERVER) { observers.erase(dp); STOC_HS_PlayerEnter scpe; - BufferIO::CopyWStr(dp->name, scpe.name, 20); + BufferIO::CopyCharArray(dp->name, scpe.name); if(!players[0]) dp->type = 0; else if(!players[1]) @@ -165,7 +168,7 @@ void TagDuel::ToDuelist(DuelPlayer* dp) { players[dp->type] = dp; scpe.pos = dp->type; STOC_HS_WatchChange scwc; - scwc.watch_count = observers.size(); + scwc.watch_count = (unsigned short)observers.size(); for(int i = 0; i < 4; ++i) if(players[i]) { NetServer::SendPacketToPlayer(players[i], STOC_HS_PLAYER_ENTER, scpe); @@ -181,7 +184,7 @@ void TagDuel::ToDuelist(DuelPlayer* dp) { } else { if(ready[dp->type]) return; - uint8 dptype = (dp->type + 1) % 4; + unsigned char dptype = (dp->type + 1) % 4; while(players[dptype]) dptype = (dptype + 1) % 4; STOC_HS_PlayerChange scpc; @@ -221,16 +224,21 @@ void TagDuel::PlayerReady(DuelPlayer* dp, bool is_ready) { if(dp->type > 3 || ready[dp->type] == is_ready) return; if(is_ready) { - bool allow_ocg = host_info.rule == 0 || host_info.rule == 2; - bool allow_tcg = host_info.rule == 1 || host_info.rule == 2; - int res = host_info.no_check_deck ? false : deckManager.CheckLFList(pdeck[dp->type], host_info.lflist, allow_ocg, allow_tcg); - if(res) { + unsigned int deckerror = 0; + if(!host_info.no_check_deck) { + if(deck_error[dp->type]) { + deckerror = (DECKERROR_UNKNOWNCARD << 28) | deck_error[dp->type]; + } else { + deckerror = deckManager.CheckDeck(pdeck[dp->type], host_info.lflist, host_info.rule); + } + } + if(deckerror) { STOC_HS_PlayerChange scpc; scpc.status = (dp->type << 4) | PLAYERCHANGE_NOTREADY; NetServer::SendPacketToPlayer(dp, STOC_HS_PLAYER_CHANGE, scpc); STOC_ErrorMsg scem; scem.msg = ERRMSG_DECKERROR; - scem.code = res; + scem.code = deckerror; NetServer::SendPacketToPlayer(dp, STOC_ERROR_MSG, scem); return; } @@ -239,7 +247,7 @@ void TagDuel::PlayerReady(DuelPlayer* dp, bool is_ready) { STOC_HS_PlayerChange scpc; scpc.status = (dp->type << 4) | (is_ready ? PLAYERCHANGE_READY : PLAYERCHANGE_NOTREADY); for(int i = 0; i < 4; ++i) - if(players[i] && players[i] != dp) + if(players[i]) NetServer::SendPacketToPlayer(players[i], STOC_HS_PLAYER_CHANGE, scpc); for(auto pit = observers.begin(); pit != observers.end(); ++pit) NetServer::SendPacketToPlayer(*pit, STOC_HS_PLAYER_CHANGE, scpc); @@ -249,13 +257,28 @@ void TagDuel::PlayerKick(DuelPlayer* dp, unsigned char pos) { return; LeaveGame(players[pos]); } -void TagDuel::UpdateDeck(DuelPlayer* dp, void* pdata) { +void TagDuel::UpdateDeck(DuelPlayer* dp, unsigned char* pdata, int len) { if(dp->type > 3 || ready[dp->type]) return; - char* deckbuf = (char*)pdata; - int mainc = BufferIO::ReadInt32(deckbuf); - int sidec = BufferIO::ReadInt32(deckbuf); - deckManager.LoadDeck(pdeck[dp->type], (int*)deckbuf, mainc, sidec); + if (len < 8 || len > sizeof(CTOS_DeckData)) + return; + bool valid = true; + CTOS_DeckData deckbuf; + std::memcpy(&deckbuf, pdata, len); + if (deckbuf.mainc < 0 || deckbuf.mainc > MAINC_MAX) + valid = false; + else if (deckbuf.sidec < 0 || deckbuf.sidec > SIDEC_MAX) + valid = false; + else if (len < (2 + deckbuf.mainc + deckbuf.sidec) * (int)sizeof(int32_t)) + valid = false; + if (!valid) { + STOC_ErrorMsg scem; + scem.msg = ERRMSG_DECKERROR; + scem.code = 0; + NetServer::SendPacketToPlayer(dp, STOC_ERROR_MSG, scem); + return; + } + deck_error[dp->type] = DeckManager::LoadDeck(pdeck[dp->type], deckbuf.list, deckbuf.mainc, deckbuf.sidec); } void TagDuel::StartDuel(DuelPlayer* dp) { if(dp != host_player) @@ -270,12 +293,29 @@ void TagDuel::StartDuel(DuelPlayer* dp) { (*oit)->state = CTOS_LEAVE_GAME; NetServer::ReSendToPlayer(*oit); } + unsigned char deckbuff[12]; + auto pbuf = deckbuff; + BufferIO::Write(pbuf, (uint16_t)pdeck[0].main.size()); + BufferIO::Write(pbuf, (uint16_t)pdeck[0].extra.size()); + BufferIO::Write(pbuf, (uint16_t)pdeck[0].side.size()); + BufferIO::Write(pbuf, (uint16_t)pdeck[2].main.size()); + BufferIO::Write(pbuf, (uint16_t)pdeck[2].extra.size()); + BufferIO::Write(pbuf, (uint16_t)pdeck[2].side.size()); + NetServer::SendBufferToPlayer(players[0], STOC_DECK_COUNT, deckbuff, 12); + NetServer::ReSendToPlayer(players[1]); + char tempbuff[6]; + std::memcpy(tempbuff, deckbuff, 6); + std::memcpy(deckbuff, deckbuff + 6, 6); + std::memcpy(deckbuff + 6, tempbuff, 6); + NetServer::SendBufferToPlayer(players[2], STOC_DECK_COUNT, deckbuff, 12); + NetServer::ReSendToPlayer(players[3]); NetServer::SendPacketToPlayer(players[0], STOC_SELECT_HAND); NetServer::ReSendToPlayer(players[2]); hand_result[0] = 0; hand_result[1] = 0; players[0]->state = CTOS_HAND_RESULT; players[2]->state = CTOS_HAND_RESULT; + duel_stage = DUEL_STAGE_FINGER; } void TagDuel::HandResult(DuelPlayer* dp, unsigned char res) { if(res > 3 || dp->state != CTOS_HAND_RESULT) @@ -306,21 +346,23 @@ void TagDuel::HandResult(DuelPlayer* dp, unsigned char res) { } else if((hand_result[0] == 1 && hand_result[1] == 2) || (hand_result[0] == 2 && hand_result[1] == 3) || (hand_result[0] == 3 && hand_result[1] == 1)) { - NetServer::SendPacketToPlayer(players[2], CTOS_TP_RESULT); + NetServer::SendPacketToPlayer(players[2], STOC_SELECT_TP); players[0]->state = 0xff; players[2]->state = CTOS_TP_RESULT; + duel_stage = DUEL_STAGE_FIRSTGO; } else { - NetServer::SendPacketToPlayer(players[0], CTOS_TP_RESULT); + NetServer::SendPacketToPlayer(players[0], STOC_SELECT_TP); players[2]->state = 0xff; players[0]->state = CTOS_TP_RESULT; + duel_stage = DUEL_STAGE_FIRSTGO; } } } void TagDuel::TPResult(DuelPlayer* dp, unsigned char tp) { if(dp->state != CTOS_TP_RESULT) return; + duel_stage = DUEL_STAGE_DUELING; bool swapped = false; - mtrandom rnd; pplayer[0] = players[0]; pplayer[1] = players[1]; pplayer[2] = players[2]; @@ -340,48 +382,36 @@ void TagDuel::TPResult(DuelPlayer* dp, unsigned char tp) { cur_player[0] = players[0]; cur_player[1] = players[3]; dp->state = CTOS_RESPONSE; - ReplayHeader rh; - rh.id = 0x31707279; - rh.version = PRO_VERSION; - rh.flag = REPLAY_TAG; - time_t seed = time(0); - rh.seed = seed; + std::random_device rd; + ExtendedReplayHeader rh; + rh.base.id = REPLAY_ID_YRP2; + rh.base.version = PRO_VERSION; + rh.base.flag = REPLAY_UNIFORM | REPLAY_TAG; + rh.base.start_time = (uint32_t)std::time(nullptr); + for (auto& x : rh.seed_sequence) + x = rd(); + mtrandom rnd(rh.seed_sequence, SEED_COUNT); last_replay.BeginRecord(); last_replay.WriteHeader(rh); - rnd.reset(seed); last_replay.WriteData(players[0]->name, 40, false); last_replay.WriteData(players[1]->name, 40, false); last_replay.WriteData(players[2]->name, 40, false); last_replay.WriteData(players[3]->name, 40, false); if(!host_info.no_shuffle_deck) { - for(size_t i = pdeck[0].main.size() - 1; i > 0; --i) { - int swap = rnd.real() * (i + 1); - std::swap(pdeck[0].main[i], pdeck[0].main[swap]); - } - for(size_t i = pdeck[1].main.size() - 1; i > 0; --i) { - int swap = rnd.real() * (i + 1); - std::swap(pdeck[1].main[i], pdeck[1].main[swap]); - } - for(size_t i = pdeck[2].main.size() - 1; i > 0; --i) { - int swap = rnd.real() * (i + 1); - std::swap(pdeck[2].main[i], pdeck[2].main[swap]); - } - for(size_t i = pdeck[3].main.size() - 1; i > 0; --i) { - int swap = rnd.real() * (i + 1); - std::swap(pdeck[3].main[i], pdeck[3].main[swap]); - } + rnd.shuffle_vector(pdeck[0].main); + rnd.shuffle_vector(pdeck[1].main); + rnd.shuffle_vector(pdeck[2].main); + rnd.shuffle_vector(pdeck[3].main); } time_limit[0] = host_info.time_limit; time_limit[1] = host_info.time_limit; - set_card_reader((card_reader)DataManager::CardReader); - set_message_handler((message_handler)TagDuel::MessageHandler); - rnd.reset(seed); - pduel = create_duel(rnd.rand()); + set_script_reader(DataManager::ScriptReaderEx); + set_card_reader(DataManager::CardReader); + set_message_handler(TagDuel::MessageHandler); + pduel = create_duel_v2(rh.seed_sequence); set_player_info(pduel, 0, host_info.start_lp, host_info.start_hand, host_info.draw_count); set_player_info(pduel, 1, host_info.start_lp, host_info.start_hand, host_info.draw_count); - int opt = 0; - if(host_info.enable_priority) - opt |= DUEL_OBSOLETE_RULING; + unsigned int opt = (unsigned int)host_info.duel_rule << 16; if(host_info.no_shuffle_deck) opt |= DUEL_PSEUDO_SHUFFLE; opt |= DUEL_TAG_MODE; @@ -390,88 +420,77 @@ void TagDuel::TPResult(DuelPlayer* dp, unsigned char tp) { last_replay.WriteInt32(host_info.draw_count, false); last_replay.WriteInt32(opt, false); last_replay.Flush(); - // - last_replay.WriteInt32(pdeck[0].main.size(), false); - for(int32 i = (int32)pdeck[0].main.size() - 1; i >= 0; --i) { - new_card(pduel, pdeck[0].main[i]->first, 0, 0, LOCATION_DECK, 0, 0); - last_replay.WriteInt32(pdeck[0].main[i]->first, false); - } - last_replay.WriteInt32(pdeck[0].extra.size(), false); - for(int32 i = (int32)pdeck[0].extra.size() - 1; i >= 0; --i) { - new_card(pduel, pdeck[0].extra[i]->first, 0, 0, LOCATION_EXTRA, 0, 0); - last_replay.WriteInt32(pdeck[0].extra[i]->first, false); - } - // - last_replay.WriteInt32(pdeck[1].main.size(), false); - for(int32 i = (int32)pdeck[1].main.size() - 1; i >= 0; --i) { - new_tag_card(pduel, pdeck[1].main[i]->first, 0, LOCATION_DECK); - last_replay.WriteInt32(pdeck[1].main[i]->first, false); - } - last_replay.WriteInt32(pdeck[1].extra.size(), false); - for(int32 i = (int32)pdeck[1].extra.size() - 1; i >= 0; --i) { - new_tag_card(pduel, pdeck[1].extra[i]->first, 0, LOCATION_EXTRA); - last_replay.WriteInt32(pdeck[1].extra[i]->first, false); - } - // - last_replay.WriteInt32(pdeck[3].main.size(), false); - for(int32 i = (int32)pdeck[3].main.size() - 1; i >= 0; --i) { - new_card(pduel, pdeck[3].main[i]->first, 1, 1, LOCATION_DECK, 0, 0); - last_replay.WriteInt32(pdeck[3].main[i]->first, false); - } - last_replay.WriteInt32(pdeck[3].extra.size(), false); - for(int32 i = (int32)pdeck[3].extra.size() - 1; i >= 0; --i) { - new_card(pduel, pdeck[3].extra[i]->first, 1, 1, LOCATION_EXTRA, 0, 0); - last_replay.WriteInt32(pdeck[3].extra[i]->first, false); - } - // - last_replay.WriteInt32(pdeck[2].main.size(), false); - for(int32 i = (int32)pdeck[2].main.size() - 1; i >= 0; --i) { - new_tag_card(pduel, pdeck[2].main[i]->first, 1, LOCATION_DECK); - last_replay.WriteInt32(pdeck[2].main[i]->first, false); - } - last_replay.WriteInt32(pdeck[2].extra.size(), false); - for(int32 i = (int32)pdeck[2].extra.size() - 1; i >= 0; --i) { - new_tag_card(pduel, pdeck[2].extra[i]->first, 1, LOCATION_EXTRA); - last_replay.WriteInt32(pdeck[2].extra[i]->first, false); - } + auto load_single = [&](const std::vector& deck_container, uint8_t p, uint8_t location) { + last_replay.WriteInt32(deck_container.size(), false); + for (auto cit = deck_container.rbegin(); cit != deck_container.rend(); ++cit) { + new_card(pduel, (*cit)->first, p, p, location, 0, POS_FACEDOWN_DEFENSE); + last_replay.WriteInt32((*cit)->first, false); + } + }; + auto load_tag = [&](const std::vector& deck_container, uint8_t p, uint8_t location) { + last_replay.WriteInt32(deck_container.size(), false); + for (auto cit = deck_container.rbegin(); cit != deck_container.rend(); ++cit) { + new_tag_card(pduel, (*cit)->first, p, location); + last_replay.WriteInt32((*cit)->first, false); + } + }; + load_single(pdeck[0].main, 0, LOCATION_DECK); + load_single(pdeck[0].extra, 0, LOCATION_EXTRA); + load_tag(pdeck[1].main, 0, LOCATION_DECK); + load_tag(pdeck[1].extra, 0, LOCATION_EXTRA); + load_single(pdeck[3].main, 1, LOCATION_DECK); + load_single(pdeck[3].extra, 1, LOCATION_EXTRA); + load_tag(pdeck[2].main, 1, LOCATION_DECK); + load_tag(pdeck[2].extra, 1, LOCATION_EXTRA); last_replay.Flush(); - char startbuf[32], *pbuf = startbuf; - BufferIO::WriteInt8(pbuf, MSG_START); - BufferIO::WriteInt8(pbuf, 0); - BufferIO::WriteInt32(pbuf, host_info.start_lp); - BufferIO::WriteInt32(pbuf, host_info.start_lp); - BufferIO::WriteInt16(pbuf, query_field_count(pduel, 0, 0x1)); - BufferIO::WriteInt16(pbuf, query_field_count(pduel, 0, 0x40)); - BufferIO::WriteInt16(pbuf, query_field_count(pduel, 1, 0x1)); - BufferIO::WriteInt16(pbuf, query_field_count(pduel, 1, 0x40)); - NetServer::SendBufferToPlayer(players[0], STOC_GAME_MSG, startbuf, 18); + unsigned char startbuf[32]{}; + auto pbuf = startbuf; + BufferIO::Write(pbuf, MSG_START); + BufferIO::Write(pbuf, 0); + BufferIO::Write(pbuf, host_info.duel_rule); + BufferIO::Write(pbuf, host_info.start_lp); + BufferIO::Write(pbuf, host_info.start_lp); + BufferIO::Write(pbuf, query_field_count(pduel, 0, LOCATION_DECK)); + BufferIO::Write(pbuf, query_field_count(pduel, 0, LOCATION_EXTRA)); + BufferIO::Write(pbuf, query_field_count(pduel, 1, LOCATION_DECK)); + BufferIO::Write(pbuf, query_field_count(pduel, 1, LOCATION_EXTRA)); + NetServer::SendBufferToPlayer(players[0], STOC_GAME_MSG, startbuf, 19); NetServer::ReSendToPlayer(players[1]); startbuf[1] = 1; - NetServer::SendBufferToPlayer(players[2], STOC_GAME_MSG, startbuf, 18); + NetServer::SendBufferToPlayer(players[2], STOC_GAME_MSG, startbuf, 19); NetServer::ReSendToPlayer(players[3]); if(!swapped) startbuf[1] = 0x10; else startbuf[1] = 0x11; for(auto oit = observers.begin(); oit != observers.end(); ++oit) - NetServer::SendBufferToPlayer(*oit, STOC_GAME_MSG, startbuf, 18); + NetServer::SendBufferToPlayer(*oit, STOC_GAME_MSG, startbuf, 19); RefreshExtra(0); RefreshExtra(1); start_duel(pduel, opt); + if(host_info.time_limit) { + time_elapsed = 0; + timeval timeout = { 1, 0 }; + event_add(etimer, &timeout); + } Process(); } void TagDuel::Process() { - char engineBuffer[0x1000]; - unsigned int engFlag = 0, engLen = 0; + std::vector engineBuffer; + engineBuffer.reserve(SIZE_MESSAGE_BUFFER); + unsigned int engFlag = 0; + int engLen = 0; int stop = 0; while (!stop) { - if (engFlag == 2) + if (engFlag == PROCESSOR_END) break; - int result = process(pduel); - engLen = result & 0xffff; - engFlag = result >> 16; + unsigned int result = process(pduel); + engLen = result & PROCESSOR_BUFFER_LEN; + engFlag = result & PROCESSOR_FLAG; if (engLen > 0) { - get_message(pduel, (byte*)&engineBuffer); - stop = Analyze(engineBuffer, engLen); + if (engLen > (int)engineBuffer.size()) + engineBuffer.resize(engLen); + get_message(pduel, engineBuffer.data()); + stop = Analyze(engineBuffer.data(), engLen); } } if(stop == 2) @@ -484,17 +503,43 @@ void TagDuel::DuelEndProc() { NetServer::ReSendToPlayer(players[3]); for(auto oit = observers.begin(); oit != observers.end(); ++oit) NetServer::ReSendToPlayer(*oit); - NetServer::StopServer(); + duel_stage = DUEL_STAGE_END; } void TagDuel::Surrender(DuelPlayer* dp) { - return; + if(dp->type > 3 || !pduel) + return; + uint32_t player = dp->type; + if(surrender[player]) + return; + static const uint32_t teammatemap[] = { 1, 0, 3, 2 }; + uint32_t teammate = teammatemap[player]; + if(!surrender[teammate]) { + surrender[player] = true; + NetServer::SendPacketToPlayer(players[player], STOC_TEAMMATE_SURRENDER); + NetServer::SendPacketToPlayer(players[teammate], STOC_TEAMMATE_SURRENDER); + return; + } + static const uint32_t winplayermap[] = { 1, 1, 0, 0 }; + unsigned char wbuf[3]; + wbuf[0] = MSG_WIN; + wbuf[1] = winplayermap[player]; + wbuf[2] = 0; + NetServer::SendBufferToPlayer(players[0], STOC_GAME_MSG, wbuf, 3); + NetServer::ReSendToPlayer(players[1]); + NetServer::ReSendToPlayer(players[2]); + NetServer::ReSendToPlayer(players[3]); + for(auto oit = observers.begin(); oit != observers.end(); ++oit) + NetServer::ReSendToPlayer(*oit); + EndDuel(); + DuelEndProc(); + event_del(etimer); } -int TagDuel::Analyze(char* msgbuffer, unsigned int len) { - char* offset, *pbufw, *pbuf = msgbuffer; +int TagDuel::Analyze(unsigned char* msgbuffer, unsigned int len) { + unsigned char* offset, *pbufw, *pbuf = msgbuffer; int player, count, type; while (pbuf - msgbuffer < (int)len) { offset = pbuf; - unsigned char engType = BufferIO::ReadUInt8(pbuf); + unsigned char engType = BufferIO::Read(pbuf); switch (engType) { case MSG_RETRY: { WaitforResponse(last_response); @@ -502,15 +547,14 @@ int TagDuel::Analyze(char* msgbuffer, unsigned int len) { return 1; } case MSG_HINT: { - type = BufferIO::ReadInt8(pbuf); - player = BufferIO::ReadInt8(pbuf); - BufferIO::ReadInt32(pbuf); + type = BufferIO::Read(pbuf); + player = BufferIO::Read(pbuf); + BufferIO::Read(pbuf); switch (type) { case 1: case 2: case 3: - case 5: - case 10: { + case 5: { NetServer::SendBufferToPlayer(cur_player[player], STOC_GAME_MSG, offset, pbuf - offset); break; } @@ -518,7 +562,8 @@ int TagDuel::Analyze(char* msgbuffer, unsigned int len) { case 6: case 7: case 8: - case 9: { + case 9: + case 11: { for(int i = 0; i < 4; ++i) if(players[i] != cur_player[player]) NetServer::SendBufferToPlayer(players[i], STOC_GAME_MSG, offset, pbuf - offset); @@ -526,12 +571,19 @@ int TagDuel::Analyze(char* msgbuffer, unsigned int len) { NetServer::ReSendToPlayer(*oit); break; } + case 10: { + for(int i = 0; i < 4; ++i) + NetServer::SendBufferToPlayer(players[i], STOC_GAME_MSG, offset, pbuf - offset); + for(auto oit = observers.begin(); oit != observers.end(); ++oit) + NetServer::ReSendToPlayer(*oit); + break; + } } break; } case MSG_WIN: { - player = BufferIO::ReadInt8(pbuf); - type = BufferIO::ReadInt8(pbuf); + player = BufferIO::Read(pbuf); + type = BufferIO::Read(pbuf); NetServer::SendBufferToPlayer(players[0], STOC_GAME_MSG, offset, pbuf - offset); NetServer::ReSendToPlayer(players[1]); NetServer::ReSendToPlayer(players[2]); @@ -542,10 +594,10 @@ int TagDuel::Analyze(char* msgbuffer, unsigned int len) { return 2; } case MSG_SELECT_BATTLECMD: { - player = BufferIO::ReadInt8(pbuf); - count = BufferIO::ReadInt8(pbuf); + player = BufferIO::Read(pbuf); + count = BufferIO::Read(pbuf); pbuf += count * 11; - count = BufferIO::ReadInt8(pbuf); + count = BufferIO::Read(pbuf); pbuf += count * 8 + 2; RefreshMzone(0); RefreshMzone(1); @@ -558,18 +610,18 @@ int TagDuel::Analyze(char* msgbuffer, unsigned int len) { return 1; } case MSG_SELECT_IDLECMD: { - player = BufferIO::ReadInt8(pbuf); - count = BufferIO::ReadInt8(pbuf); + player = BufferIO::Read(pbuf); + count = BufferIO::Read(pbuf); pbuf += count * 7; - count = BufferIO::ReadInt8(pbuf); + count = BufferIO::Read(pbuf); pbuf += count * 7; - count = BufferIO::ReadInt8(pbuf); + count = BufferIO::Read(pbuf); pbuf += count * 7; - count = BufferIO::ReadInt8(pbuf); + count = BufferIO::Read(pbuf); pbuf += count * 7; - count = BufferIO::ReadInt8(pbuf); + count = BufferIO::Read(pbuf); pbuf += count * 7; - count = BufferIO::ReadInt8(pbuf); + count = BufferIO::Read(pbuf); pbuf += count * 11 + 3; RefreshMzone(0); RefreshMzone(1); @@ -582,22 +634,22 @@ int TagDuel::Analyze(char* msgbuffer, unsigned int len) { return 1; } case MSG_SELECT_EFFECTYN: { - player = BufferIO::ReadInt8(pbuf); - pbuf += 8; + player = BufferIO::Read(pbuf); + pbuf += 12; WaitforResponse(player); NetServer::SendBufferToPlayer(cur_player[player], STOC_GAME_MSG, offset, pbuf - offset); return 1; } case MSG_SELECT_YESNO: { - player = BufferIO::ReadInt8(pbuf); + player = BufferIO::Read(pbuf); pbuf += 4; WaitforResponse(player); NetServer::SendBufferToPlayer(cur_player[player], STOC_GAME_MSG, offset, pbuf - offset); return 1; } case MSG_SELECT_OPTION: { - player = BufferIO::ReadInt8(pbuf); - count = BufferIO::ReadInt8(pbuf); + player = BufferIO::Read(pbuf); + count = BufferIO::Read(pbuf); pbuf += count * 4; WaitforResponse(player); NetServer::SendBufferToPlayer(cur_player[player], STOC_GAME_MSG, offset, pbuf - offset); @@ -605,77 +657,106 @@ int TagDuel::Analyze(char* msgbuffer, unsigned int len) { } case MSG_SELECT_CARD: case MSG_SELECT_TRIBUTE: { - player = BufferIO::ReadInt8(pbuf); + player = BufferIO::Read(pbuf); pbuf += 3; - count = BufferIO::ReadInt8(pbuf); + count = BufferIO::Read(pbuf); + int c/*, l, s, ss, code*/; + for (int i = 0; i < count; ++i) { + pbufw = pbuf; + /*code = */BufferIO::Read(pbuf); + c = BufferIO::Read(pbuf); + /*l = */BufferIO::Read(pbuf); + /*s = */BufferIO::Read(pbuf); + /*ss = */BufferIO::Read(pbuf); + if (c != player) BufferIO::Write(pbufw, 0); + } + WaitforResponse(player); + NetServer::SendBufferToPlayer(cur_player[player], STOC_GAME_MSG, offset, pbuf - offset); + return 1; + } + case MSG_SELECT_UNSELECT_CARD: { + player = BufferIO::Read(pbuf); + pbuf += 4; + count = BufferIO::Read(pbuf); int c/*, l, s, ss, code*/; for (int i = 0; i < count; ++i) { pbufw = pbuf; - /*code = */BufferIO::ReadInt32(pbuf); - c = BufferIO::ReadInt8(pbuf); - /*l = */BufferIO::ReadInt8(pbuf); - /*s = */BufferIO::ReadInt8(pbuf); - /*ss = */BufferIO::ReadInt8(pbuf); - if (c != player) BufferIO::WriteInt32(pbufw, 0); + /*code = */BufferIO::Read(pbuf); + c = BufferIO::Read(pbuf); + /*l = */BufferIO::Read(pbuf); + /*s = */BufferIO::Read(pbuf); + /*ss = */BufferIO::Read(pbuf); + if (c != player) BufferIO::Write(pbufw, 0); + } + count = BufferIO::Read(pbuf); + for (int i = 0; i < count; ++i) { + pbufw = pbuf; + /*code = */BufferIO::Read(pbuf); + c = BufferIO::Read(pbuf); + /*l = */BufferIO::Read(pbuf); + /*s = */BufferIO::Read(pbuf); + /*ss = */BufferIO::Read(pbuf); + if (c != player) BufferIO::Write(pbufw, 0); } WaitforResponse(player); NetServer::SendBufferToPlayer(cur_player[player], STOC_GAME_MSG, offset, pbuf - offset); return 1; } case MSG_SELECT_CHAIN: { - player = BufferIO::ReadInt8(pbuf); - count = BufferIO::ReadInt8(pbuf); - pbuf += 10 + count * 12; + player = BufferIO::Read(pbuf); + count = BufferIO::Read(pbuf); + pbuf += 9 + count * 14; WaitforResponse(player); NetServer::SendBufferToPlayer(cur_player[player], STOC_GAME_MSG, offset, pbuf - offset); return 1; } case MSG_SELECT_PLACE: case MSG_SELECT_DISFIELD: { - player = BufferIO::ReadInt8(pbuf); + player = BufferIO::Read(pbuf); pbuf += 5; WaitforResponse(player); NetServer::SendBufferToPlayer(cur_player[player], STOC_GAME_MSG, offset, pbuf - offset); return 1; } case MSG_SELECT_POSITION: { - player = BufferIO::ReadInt8(pbuf); + player = BufferIO::Read(pbuf); pbuf += 5; WaitforResponse(player); NetServer::SendBufferToPlayer(cur_player[player], STOC_GAME_MSG, offset, pbuf - offset); return 1; } case MSG_SELECT_COUNTER: { - player = BufferIO::ReadInt8(pbuf); - pbuf += 3; - count = BufferIO::ReadInt8(pbuf); - pbuf += count * 8; + player = BufferIO::Read(pbuf); + pbuf += 4; + count = BufferIO::Read(pbuf); + pbuf += count * 9; WaitforResponse(player); NetServer::SendBufferToPlayer(cur_player[player], STOC_GAME_MSG, offset, pbuf - offset); return 1; } case MSG_SELECT_SUM: { pbuf++; - player = BufferIO::ReadInt8(pbuf); + player = BufferIO::Read(pbuf); pbuf += 6; - count = BufferIO::ReadInt8(pbuf); + count = BufferIO::Read(pbuf); + pbuf += count * 11; + count = BufferIO::Read(pbuf); pbuf += count * 11; WaitforResponse(player); NetServer::SendBufferToPlayer(cur_player[player], STOC_GAME_MSG, offset, pbuf - offset); return 1; } - case MSG_SORT_CARD: - case MSG_SORT_CHAIN: { - player = BufferIO::ReadInt8(pbuf); - count = BufferIO::ReadInt8(pbuf); + case MSG_SORT_CARD: { + player = BufferIO::Read(pbuf); + count = BufferIO::Read(pbuf); pbuf += count * 7; WaitforResponse(player); NetServer::SendBufferToPlayer(cur_player[player], STOC_GAME_MSG, offset, pbuf - offset); return 1; } case MSG_CONFIRM_DECKTOP: { - player = BufferIO::ReadInt8(pbuf); - count = BufferIO::ReadInt8(pbuf); + player = BufferIO::Read(pbuf); + count = BufferIO::Read(pbuf); pbuf += count * 7; NetServer::SendBufferToPlayer(players[0], STOC_GAME_MSG, offset, pbuf - offset); NetServer::ReSendToPlayer(players[1]); @@ -685,10 +766,23 @@ int TagDuel::Analyze(char* msgbuffer, unsigned int len) { NetServer::ReSendToPlayer(*oit); break; } + case MSG_CONFIRM_EXTRATOP: { + player = BufferIO::Read(pbuf); + count = BufferIO::Read(pbuf); + pbuf += count * 7; + NetServer::SendBufferToPlayer(players[0], STOC_GAME_MSG, offset, pbuf - offset); + NetServer::ReSendToPlayer(players[1]); + NetServer::ReSendToPlayer(players[2]); + NetServer::ReSendToPlayer(players[3]); + for (auto oit = observers.begin(); oit != observers.end(); ++oit) + NetServer::ReSendToPlayer(*oit); + break; + } case MSG_CONFIRM_CARDS: { - player = BufferIO::ReadInt8(pbuf); - count = BufferIO::ReadInt8(pbuf); - if(pbuf[5] == LOCATION_HAND) { + player = BufferIO::Read(pbuf); + pbuf += 1; + count = BufferIO::Read(pbuf); + if(pbuf[5] != LOCATION_DECK) { pbuf += count * 7; NetServer::SendBufferToPlayer(players[0], STOC_GAME_MSG, offset, pbuf - offset); NetServer::ReSendToPlayer(players[1]); @@ -703,7 +797,7 @@ int TagDuel::Analyze(char* msgbuffer, unsigned int len) { break; } case MSG_SHUFFLE_DECK: { - player = BufferIO::ReadInt8(pbuf); + player = BufferIO::Read(pbuf); NetServer::SendBufferToPlayer(players[0], STOC_GAME_MSG, offset, pbuf - offset); NetServer::ReSendToPlayer(players[1]); NetServer::ReSendToPlayer(players[2]); @@ -713,11 +807,11 @@ int TagDuel::Analyze(char* msgbuffer, unsigned int len) { break; } case MSG_SHUFFLE_HAND: { - player = BufferIO::ReadInt8(pbuf); - count = BufferIO::ReadInt8(pbuf); + player = BufferIO::Read(pbuf); + count = BufferIO::Read(pbuf); NetServer::SendBufferToPlayer(cur_player[player], STOC_GAME_MSG, offset, (pbuf - offset) + count * 4); for(int i = 0; i < count; ++i) - BufferIO::WriteInt32(pbuf, 0); + BufferIO::Write(pbuf, 0); for(int i = 0; i < 4; ++i) if(players[i] != cur_player[player]) NetServer::SendBufferToPlayer(players[i], STOC_GAME_MSG, offset, pbuf - offset); @@ -726,6 +820,20 @@ int TagDuel::Analyze(char* msgbuffer, unsigned int len) { RefreshHand(player, 0x781fff, 0); break; } + case MSG_SHUFFLE_EXTRA: { + player = BufferIO::Read(pbuf); + count = BufferIO::Read(pbuf); + NetServer::SendBufferToPlayer(cur_player[player], STOC_GAME_MSG, offset, (pbuf - offset) + count * 4); + for(int i = 0; i < count; ++i) + BufferIO::Write(pbuf, 0); + for(int i = 0; i < 4; ++i) + if(players[i] != cur_player[player]) + NetServer::SendBufferToPlayer(players[i], STOC_GAME_MSG, offset, pbuf - offset); + for(auto oit = observers.begin(); oit != observers.end(); ++oit) + NetServer::ReSendToPlayer(*oit); + RefreshExtra(player); + break; + } case MSG_REFRESH_DECK: { pbuf++; NetServer::SendBufferToPlayer(players[0], STOC_GAME_MSG, offset, pbuf - offset); @@ -737,7 +845,7 @@ int TagDuel::Analyze(char* msgbuffer, unsigned int len) { break; } case MSG_SWAP_GRAVE_DECK: { - player = BufferIO::ReadInt8(pbuf); + player = BufferIO::Read(pbuf); NetServer::SendBufferToPlayer(players[0], STOC_GAME_MSG, offset, pbuf - offset); NetServer::ReSendToPlayer(players[1]); NetServer::ReSendToPlayer(players[2]); @@ -767,7 +875,8 @@ int TagDuel::Analyze(char* msgbuffer, unsigned int len) { break; } case MSG_SHUFFLE_SET_CARD: { - count = BufferIO::ReadInt8(pbuf); + unsigned int loc = BufferIO::Read(pbuf); + count = BufferIO::Read(pbuf); pbuf += count * 8; NetServer::SendBufferToPlayer(players[0], STOC_GAME_MSG, offset, pbuf - offset); NetServer::ReSendToPlayer(players[1]); @@ -775,8 +884,13 @@ int TagDuel::Analyze(char* msgbuffer, unsigned int len) { NetServer::ReSendToPlayer(players[3]); for(auto oit = observers.begin(); oit != observers.end(); ++oit) NetServer::ReSendToPlayer(*oit); - RefreshMzone(0, 0x181fff, 0); - RefreshMzone(1, 0x181fff, 0); + if(loc == LOCATION_MZONE) { + RefreshMzone(0, 0x181fff, 0); + RefreshMzone(1, 0x181fff, 0); + } else { + RefreshSzone(0, 0x181fff, 0); + RefreshSzone(1, 0x181fff, 0); + } break; } case MSG_NEW_TURN: { @@ -803,10 +917,13 @@ int TagDuel::Analyze(char* msgbuffer, unsigned int len) { } } turn_count++; + for(int i = 0; i < 4; ++i) { + surrender[i] = false; + } break; } case MSG_NEW_PHASE: { - pbuf++; + pbuf += 2; NetServer::SendBufferToPlayer(players[0], STOC_GAME_MSG, offset, pbuf - offset); NetServer::ReSendToPlayer(players[1]); NetServer::ReSendToPlayer(players[2]); @@ -834,13 +951,13 @@ int TagDuel::Analyze(char* msgbuffer, unsigned int len) { pbuf += 16; NetServer::SendBufferToPlayer(cur_player[cc], STOC_GAME_MSG, offset, pbuf - offset); if (!(cl & (LOCATION_GRAVE + LOCATION_OVERLAY)) && ((cl & (LOCATION_DECK + LOCATION_HAND)) || (cp & POS_FACEDOWN))) - BufferIO::WriteInt32(pbufw, 0); + BufferIO::Write(pbufw, 0); for(int i = 0; i < 4; ++i) if(players[i] != cur_player[cc]) NetServer::SendBufferToPlayer(players[i], STOC_GAME_MSG, offset, pbuf - offset); for(auto oit = observers.begin(); oit != observers.end(); ++oit) NetServer::ReSendToPlayer(*oit); - if (cl != 0 && (cl & 0x80) == 0 && (cl != pl || pc != cc)) + if (cl != 0 && (cl & LOCATION_OVERLAY) == 0 && (cl != pl || pc != cc)) RefreshSingle(cc, cl, cs); break; } @@ -862,7 +979,7 @@ int TagDuel::Analyze(char* msgbuffer, unsigned int len) { break; } case MSG_SET: { - BufferIO::WriteInt32(pbuf, 0); + BufferIO::Write(pbuf, 0); pbuf += 4; NetServer::SendBufferToPlayer(players[0], STOC_GAME_MSG, offset, pbuf - offset); NetServer::ReSendToPlayer(players[1]); @@ -873,6 +990,12 @@ int TagDuel::Analyze(char* msgbuffer, unsigned int len) { break; } case MSG_SWAP: { + int c1 = pbuf[4]; + int l1 = pbuf[5]; + int s1 = pbuf[6]; + int c2 = pbuf[12]; + int l2 = pbuf[13]; + int s2 = pbuf[14]; pbuf += 16; NetServer::SendBufferToPlayer(players[0], STOC_GAME_MSG, offset, pbuf - offset); NetServer::ReSendToPlayer(players[1]); @@ -880,6 +1003,8 @@ int TagDuel::Analyze(char* msgbuffer, unsigned int len) { NetServer::ReSendToPlayer(players[3]); for(auto oit = observers.begin(); oit != observers.end(); ++oit) NetServer::ReSendToPlayer(*oit); + RefreshSingle(c1, l1, s1); + RefreshSingle(c2, l2, s2); break; } case MSG_FIELD_DISABLED: { @@ -916,11 +1041,20 @@ int TagDuel::Analyze(char* msgbuffer, unsigned int len) { break; } case MSG_SPSUMMONING: { + pbufw = pbuf; + int cc = pbuf[4]; + /*int cl = pbuf[5];*/ + /*int cs = pbuf[6];*/ + int cp = pbuf[7]; pbuf += 8; - NetServer::SendBufferToPlayer(players[0], STOC_GAME_MSG, offset, pbuf - offset); - NetServer::ReSendToPlayer(players[1]); - NetServer::ReSendToPlayer(players[2]); - NetServer::ReSendToPlayer(players[3]); + auto pid = (cc == 0) ? 0 : 2; + NetServer::SendBufferToPlayer(players[pid], STOC_GAME_MSG, offset, pbuf - offset); + NetServer::ReSendToPlayer(players[pid + 1]); + if (cp & POS_FACEDOWN) + BufferIO::Write(pbufw, 0); + pid = 2 - pid; + NetServer::SendBufferToPlayer(players[pid], STOC_GAME_MSG, offset, pbuf - offset); + NetServer::ReSendToPlayer(players[pid + 1]); for(auto oit = observers.begin(); oit != observers.end(); ++oit) NetServer::ReSendToPlayer(*oit); break; @@ -1050,14 +1184,14 @@ int TagDuel::Analyze(char* msgbuffer, unsigned int len) { break; } case MSG_CARD_SELECTED: { - player = BufferIO::ReadInt8(pbuf); - count = BufferIO::ReadInt8(pbuf); + player = BufferIO::Read(pbuf); + count = BufferIO::Read(pbuf); pbuf += count * 4; break; } case MSG_RANDOM_SELECTED: { - player = BufferIO::ReadInt8(pbuf); - count = BufferIO::ReadInt8(pbuf); + player = BufferIO::Read(pbuf); + count = BufferIO::Read(pbuf); pbuf += count * 4; NetServer::SendBufferToPlayer(players[player], STOC_GAME_MSG, offset, pbuf - offset); NetServer::ReSendToPlayer(players[1]); @@ -1068,7 +1202,7 @@ int TagDuel::Analyze(char* msgbuffer, unsigned int len) { break; } case MSG_BECOME_TARGET: { - count = BufferIO::ReadInt8(pbuf); + count = BufferIO::Read(pbuf); pbuf += count * 4; NetServer::SendBufferToPlayer(players[0], STOC_GAME_MSG, offset, pbuf - offset); NetServer::ReSendToPlayer(players[1]); @@ -1079,14 +1213,14 @@ int TagDuel::Analyze(char* msgbuffer, unsigned int len) { break; } case MSG_DRAW: { - player = BufferIO::ReadInt8(pbuf); - count = BufferIO::ReadInt8(pbuf); + player = BufferIO::Read(pbuf); + count = BufferIO::Read(pbuf); pbufw = pbuf; pbuf += count * 4; NetServer::SendBufferToPlayer(cur_player[player], STOC_GAME_MSG, offset, pbuf - offset); for (int i = 0; i < count; ++i) { if(!(pbufw[3] & 0x80)) - BufferIO::WriteInt32(pbufw, 0); + BufferIO::Write(pbufw, 0); else pbufw += 4; } @@ -1178,7 +1312,7 @@ int TagDuel::Analyze(char* msgbuffer, unsigned int len) { break; } case MSG_ADD_COUNTER: { - pbuf += 6; + pbuf += 7; NetServer::SendBufferToPlayer(players[0], STOC_GAME_MSG, offset, pbuf - offset); NetServer::ReSendToPlayer(players[1]); NetServer::ReSendToPlayer(players[2]); @@ -1188,7 +1322,7 @@ int TagDuel::Analyze(char* msgbuffer, unsigned int len) { break; } case MSG_REMOVE_COUNTER: { - pbuf += 6; + pbuf += 7; NetServer::SendBufferToPlayer(players[0], STOC_GAME_MSG, offset, pbuf - offset); NetServer::ReSendToPlayer(players[1]); NetServer::ReSendToPlayer(players[2]); @@ -1255,8 +1389,8 @@ int TagDuel::Analyze(char* msgbuffer, unsigned int len) { break; } case MSG_TOSS_COIN: { - player = BufferIO::ReadInt8(pbuf); - count = BufferIO::ReadInt8(pbuf); + player = BufferIO::Read(pbuf); + count = BufferIO::Read(pbuf); pbuf += count; NetServer::SendBufferToPlayer(players[0], STOC_GAME_MSG, offset, pbuf - offset); NetServer::ReSendToPlayer(players[1]); @@ -1267,8 +1401,8 @@ int TagDuel::Analyze(char* msgbuffer, unsigned int len) { break; } case MSG_TOSS_DICE: { - player = BufferIO::ReadInt8(pbuf); - count = BufferIO::ReadInt8(pbuf); + player = BufferIO::Read(pbuf); + count = BufferIO::Read(pbuf); pbuf += count; NetServer::SendBufferToPlayer(players[0], STOC_GAME_MSG, offset, pbuf - offset); NetServer::ReSendToPlayer(players[1]); @@ -1278,29 +1412,40 @@ int TagDuel::Analyze(char* msgbuffer, unsigned int len) { NetServer::ReSendToPlayer(*oit); break; } - case MSG_ANNOUNCE_RACE: { - player = BufferIO::ReadInt8(pbuf); - pbuf += 5; + case MSG_ROCK_PAPER_SCISSORS: { + player = BufferIO::Read(pbuf); WaitforResponse(player); NetServer::SendBufferToPlayer(cur_player[player], STOC_GAME_MSG, offset, pbuf - offset); return 1; } - case MSG_ANNOUNCE_ATTRIB: { - player = BufferIO::ReadInt8(pbuf); + case MSG_HAND_RES: { + pbuf += 1; + NetServer::SendBufferToPlayer(players[0], STOC_GAME_MSG, offset, pbuf - offset); + NetServer::ReSendToPlayer(players[1]); + NetServer::ReSendToPlayer(players[2]); + NetServer::ReSendToPlayer(players[3]); + for (auto oit = observers.begin(); oit != observers.end(); ++oit) + NetServer::ReSendToPlayer(*oit); + break; + } + case MSG_ANNOUNCE_RACE: { + player = BufferIO::Read(pbuf); pbuf += 5; WaitforResponse(player); NetServer::SendBufferToPlayer(cur_player[player], STOC_GAME_MSG, offset, pbuf - offset); return 1; } - case MSG_ANNOUNCE_CARD: { - player = BufferIO::ReadInt8(pbuf); + case MSG_ANNOUNCE_ATTRIB: { + player = BufferIO::Read(pbuf); + pbuf += 5; WaitforResponse(player); NetServer::SendBufferToPlayer(cur_player[player], STOC_GAME_MSG, offset, pbuf - offset); return 1; } + case MSG_ANNOUNCE_CARD: case MSG_ANNOUNCE_NUMBER: { - player = BufferIO::ReadInt8(pbuf); - count = BufferIO::ReadInt8(pbuf); + player = BufferIO::Read(pbuf); + count = BufferIO::Read(pbuf); pbuf += 4 * count; WaitforResponse(player); NetServer::SendBufferToPlayer(cur_player[player], STOC_GAME_MSG, offset, pbuf - offset); @@ -1316,17 +1461,34 @@ int TagDuel::Analyze(char* msgbuffer, unsigned int len) { NetServer::ReSendToPlayer(*oit); break; } + case MSG_PLAYER_HINT: { + pbuf += 6; + NetServer::SendBufferToPlayer(players[0], STOC_GAME_MSG, offset, pbuf - offset); + NetServer::ReSendToPlayer(players[1]); + NetServer::ReSendToPlayer(players[2]); + NetServer::ReSendToPlayer(players[3]); + for(auto oit = observers.begin(); oit != observers.end(); ++oit) + NetServer::ReSendToPlayer(*oit); + break; + } case MSG_TAG_SWAP: { - player = BufferIO::ReadInt8(pbuf); - /*int mcount = */BufferIO::ReadInt8(pbuf); - /*int ecount = */BufferIO::ReadInt8(pbuf); - int hcount = BufferIO::ReadInt8(pbuf); + player = BufferIO::Read(pbuf); + /*int mcount = */BufferIO::Read(pbuf); + int ecount = BufferIO::Read(pbuf); + /*int pcount = */BufferIO::Read(pbuf); + int hcount = BufferIO::Read(pbuf); pbufw = pbuf + 4; - pbuf += hcount * 4 + 4; + pbuf += hcount * 4 + ecount * 4 + 4; NetServer::SendBufferToPlayer(cur_player[player], STOC_GAME_MSG, offset, pbuf - offset); for (int i = 0; i < hcount; ++i) { if(!(pbufw[3] & 0x80)) - BufferIO::WriteInt32(pbufw, 0); + BufferIO::Write(pbufw, 0); + else + pbufw += 4; + } + for (int i = 0; i < ecount; ++i) { + if(!(pbufw[3] & 0x80)) + BufferIO::Write(pbufw, 0); else pbufw += 4; } @@ -1352,10 +1514,12 @@ int TagDuel::Analyze(char* msgbuffer, unsigned int len) { } return 0; } -void TagDuel::GetResponse(DuelPlayer* dp, void* pdata, unsigned int len) { - byte resb[64]; - memcpy(resb, pdata, len); - last_replay.WriteInt8(len); +void TagDuel::GetResponse(DuelPlayer* dp, unsigned char* pdata, unsigned int len) { + unsigned char resb[SIZE_RETURN_VALUE]{}; + if (len > SIZE_RETURN_VALUE) + len = SIZE_RETURN_VALUE; + std::memcpy(resb, pdata, len); + last_replay.Write(len); last_replay.WriteData(resb, len); set_responseb(pduel, resb); players[dp->type]->state = 0xff; @@ -1364,7 +1528,7 @@ void TagDuel::GetResponse(DuelPlayer* dp, void* pdata, unsigned int len) { if(time_limit[resp_type] >= time_elapsed) time_limit[resp_type] -= time_elapsed; else time_limit[resp_type] = 0; - event_del(etimer); + time_elapsed = 0; } Process(); } @@ -1373,16 +1537,17 @@ void TagDuel::EndDuel() { return; last_replay.EndRecord(); char replaybuf[0x2000], *pbuf = replaybuf; - memcpy(pbuf, &last_replay.pheader, sizeof(ReplayHeader)); - pbuf += sizeof(ReplayHeader); - memcpy(pbuf, last_replay.comp_data, last_replay.comp_size); - NetServer::SendBufferToPlayer(players[0], STOC_REPLAY, replaybuf, sizeof(ReplayHeader) + last_replay.comp_size); + std::memcpy(pbuf, &last_replay.pheader, sizeof last_replay.pheader); + pbuf += sizeof last_replay.pheader; + std::memcpy(pbuf, last_replay.comp_data, last_replay.comp_size); + NetServer::SendBufferToPlayer(players[0], STOC_REPLAY, replaybuf, sizeof last_replay.pheader + last_replay.comp_size); NetServer::ReSendToPlayer(players[1]); NetServer::ReSendToPlayer(players[2]); NetServer::ReSendToPlayer(players[3]); for(auto oit = observers.begin(); oit != observers.end(); ++oit) NetServer::ReSendToPlayer(*oit); end_duel(pduel); + event_del(etimer); pduel = 0; } void TagDuel::WaitforResponse(int playerid) { @@ -1409,94 +1574,96 @@ void TagDuel::TimeConfirm(DuelPlayer* dp) { if(dp != cur_player[last_response]) return; cur_player[last_response]->state = CTOS_RESPONSE; - time_elapsed = 0; - timeval timeout = {1, 0}; - event_add(etimer, &timeout); + if(time_elapsed < 10) + time_elapsed = 0; +} +inline int TagDuel::WriteUpdateData(int& player, int location, int& flag, unsigned char*& qbuf, int& use_cache) { + flag |= (QUERY_CODE | QUERY_POSITION); + BufferIO::Write(qbuf, MSG_UPDATE_DATA); + BufferIO::Write(qbuf, player); + BufferIO::Write(qbuf, location); + int len = query_field_card(pduel, player, location, flag, qbuf, use_cache); + return len; } void TagDuel::RefreshMzone(int player, int flag, int use_cache) { - char query_buffer[0x1000]; - char* qbuf = query_buffer; - BufferIO::WriteInt8(qbuf, MSG_UPDATE_DATA); - BufferIO::WriteInt8(qbuf, player); - BufferIO::WriteInt8(qbuf, LOCATION_MZONE); - int len = query_field_card(pduel, player, LOCATION_MZONE, flag, (unsigned char*)qbuf, use_cache); + std::vector query_buffer; + query_buffer.resize(SIZE_QUERY_BUFFER); + auto qbuf = query_buffer.data(); + auto len = WriteUpdateData(player, LOCATION_MZONE, flag, qbuf, use_cache); int pid = (player == 0) ? 0 : 2; - NetServer::SendBufferToPlayer(players[pid], STOC_GAME_MSG, query_buffer, len + 3); + NetServer::SendBufferToPlayer(players[pid], STOC_GAME_MSG, query_buffer.data(), len + 3); NetServer::ReSendToPlayer(players[pid + 1]); - for (int i = 0; i < 5; ++i) { - int clen = BufferIO::ReadInt32(qbuf); - if (clen == 4) + int qlen = 0; + while(qlen < len) { + int clen = BufferIO::Read(qbuf); + qlen += clen; + if (clen <= LEN_HEADER) continue; - if (qbuf[11] & POS_FACEDOWN) - memset(qbuf, 0, clen - 4); + auto position = GetPosition(qbuf, 8); + if (position & POS_FACEDOWN) + std::memset(qbuf, 0, clen - 4); qbuf += clen - 4; } pid = 2 - pid; - NetServer::SendBufferToPlayer(players[pid], STOC_GAME_MSG, query_buffer, len + 3); + NetServer::SendBufferToPlayer(players[pid], STOC_GAME_MSG, query_buffer.data(), len + 3); NetServer::ReSendToPlayer(players[pid + 1]); for(auto pit = observers.begin(); pit != observers.end(); ++pit) NetServer::ReSendToPlayer(*pit); } void TagDuel::RefreshSzone(int player, int flag, int use_cache) { - char query_buffer[0x1000]; - char* qbuf = query_buffer; - BufferIO::WriteInt8(qbuf, MSG_UPDATE_DATA); - BufferIO::WriteInt8(qbuf, player); - BufferIO::WriteInt8(qbuf, LOCATION_SZONE); - int len = query_field_card(pduel, player, LOCATION_SZONE, flag, (unsigned char*)qbuf, use_cache); + std::vector query_buffer; + query_buffer.resize(SIZE_QUERY_BUFFER); + auto qbuf = query_buffer.data(); + auto len = WriteUpdateData(player, LOCATION_SZONE, flag, qbuf, use_cache); int pid = (player == 0) ? 0 : 2; - NetServer::SendBufferToPlayer(players[pid], STOC_GAME_MSG, query_buffer, len + 3); + NetServer::SendBufferToPlayer(players[pid], STOC_GAME_MSG, query_buffer.data(), len + 3); NetServer::ReSendToPlayer(players[pid + 1]); - for (int i = 0; i < 8; ++i) { - int clen = BufferIO::ReadInt32(qbuf); - if (clen == 4) + int qlen = 0; + while(qlen < len) { + int clen = BufferIO::Read(qbuf); + qlen += clen; + if (clen <= LEN_HEADER) continue; - if (qbuf[11] & POS_FACEDOWN) - memset(qbuf, 0, clen - 4); + auto position = GetPosition(qbuf, 8); + if (position & POS_FACEDOWN) + std::memset(qbuf, 0, clen - 4); qbuf += clen - 4; } pid = 2 - pid; - NetServer::SendBufferToPlayer(players[pid], STOC_GAME_MSG, query_buffer, len + 3); + NetServer::SendBufferToPlayer(players[pid], STOC_GAME_MSG, query_buffer.data(), len + 3); NetServer::ReSendToPlayer(players[pid + 1]); for(auto pit = observers.begin(); pit != observers.end(); ++pit) NetServer::ReSendToPlayer(*pit); } void TagDuel::RefreshHand(int player, int flag, int use_cache) { - char query_buffer[0x1000]; - char* qbuf = query_buffer; - BufferIO::WriteInt8(qbuf, MSG_UPDATE_DATA); - BufferIO::WriteInt8(qbuf, player); - BufferIO::WriteInt8(qbuf, LOCATION_HAND); - int len = query_field_card(pduel, player, LOCATION_HAND, flag | QUERY_IS_PUBLIC, (unsigned char*)qbuf, use_cache); - NetServer::SendBufferToPlayer(cur_player[player], STOC_GAME_MSG, query_buffer, len + 3); - int qlen = 0, slen; + std::vector query_buffer; + query_buffer.resize(SIZE_QUERY_BUFFER); + auto qbuf = query_buffer.data(); + auto len = WriteUpdateData(player, LOCATION_HAND, flag, qbuf, use_cache); + NetServer::SendBufferToPlayer(cur_player[player], STOC_GAME_MSG, query_buffer.data(), len + 3); + int qlen = 0; while(qlen < len) { - slen = BufferIO::ReadInt32(qbuf); - int qflag = *(int*)qbuf; - int pos = slen - 8; - if(qflag & QUERY_LSCALE) - pos -= 4; - if(qflag & QUERY_RSCALE) - pos -= 4; - if(!qbuf[pos]) - memset(qbuf, 0, slen - 4); - qbuf += slen - 4; + int slen = BufferIO::Read(qbuf); qlen += slen; + if (slen <= LEN_HEADER) + continue; + auto position = GetPosition(qbuf, 8); + if(!(position & POS_FACEUP)) + std::memset(qbuf, 0, slen - 4); + qbuf += slen - 4; } for(int i = 0; i < 4; ++i) if(players[i] != cur_player[player]) - NetServer::SendBufferToPlayer(players[i], STOC_GAME_MSG, query_buffer, len + 3); + NetServer::SendBufferToPlayer(players[i], STOC_GAME_MSG, query_buffer.data(), len + 3); for(auto pit = observers.begin(); pit != observers.end(); ++pit) NetServer::ReSendToPlayer(*pit); } void TagDuel::RefreshGrave(int player, int flag, int use_cache) { - char query_buffer[0x1000]; - char* qbuf = query_buffer; - BufferIO::WriteInt8(qbuf, MSG_UPDATE_DATA); - BufferIO::WriteInt8(qbuf, player); - BufferIO::WriteInt8(qbuf, LOCATION_GRAVE); - int len = query_field_card(pduel, player, LOCATION_GRAVE, flag, (unsigned char*)qbuf, use_cache); - NetServer::SendBufferToPlayer(players[0], STOC_GAME_MSG, query_buffer, len + 3); + std::vector query_buffer; + query_buffer.resize(SIZE_QUERY_BUFFER); + auto qbuf = query_buffer.data(); + auto len = WriteUpdateData(player, LOCATION_GRAVE, flag, qbuf, use_cache); + NetServer::SendBufferToPlayer(players[0], STOC_GAME_MSG, query_buffer.data(), len + 3); NetServer::ReSendToPlayer(players[1]); NetServer::ReSendToPlayer(players[2]); NetServer::ReSendToPlayer(players[3]); @@ -1504,27 +1671,27 @@ void TagDuel::RefreshGrave(int player, int flag, int use_cache) { NetServer::ReSendToPlayer(*pit); } void TagDuel::RefreshExtra(int player, int flag, int use_cache) { - char query_buffer[0x1000]; - char* qbuf = query_buffer; - BufferIO::WriteInt8(qbuf, MSG_UPDATE_DATA); - BufferIO::WriteInt8(qbuf, player); - BufferIO::WriteInt8(qbuf, LOCATION_EXTRA); - int len = query_field_card(pduel, player, LOCATION_EXTRA, flag, (unsigned char*)qbuf, use_cache); - NetServer::SendBufferToPlayer(cur_player[player], STOC_GAME_MSG, query_buffer, len + 3); + std::vector query_buffer; + query_buffer.resize(SIZE_QUERY_BUFFER); + auto qbuf = query_buffer.data(); + auto len = WriteUpdateData(player, LOCATION_EXTRA, flag, qbuf, use_cache); + NetServer::SendBufferToPlayer(cur_player[player], STOC_GAME_MSG, query_buffer.data(), len + 3); } void TagDuel::RefreshSingle(int player, int location, int sequence, int flag) { - char query_buffer[0x1000]; - char* qbuf = query_buffer; - BufferIO::WriteInt8(qbuf, MSG_UPDATE_CARD); - BufferIO::WriteInt8(qbuf, player); - BufferIO::WriteInt8(qbuf, location); - BufferIO::WriteInt8(qbuf, sequence); - int len = query_card(pduel, player, location, sequence, flag, (unsigned char*)qbuf, 0); + flag |= (QUERY_CODE | QUERY_POSITION); + unsigned char query_buffer[0x1000]; + auto qbuf = query_buffer; + BufferIO::Write(qbuf, MSG_UPDATE_CARD); + BufferIO::Write(qbuf, player); + BufferIO::Write(qbuf, location); + BufferIO::Write(qbuf, sequence); + int len = query_card(pduel, player, location, sequence, flag, qbuf, 0); + auto position = GetPosition(qbuf, 12); if(location & LOCATION_ONFIELD) { int pid = (player == 0) ? 0 : 2; NetServer::SendBufferToPlayer(players[pid], STOC_GAME_MSG, query_buffer, len + 4); NetServer::ReSendToPlayer(players[pid + 1]); - if(qbuf[15] & POS_FACEUP) { + if(position & POS_FACEUP) { pid = 2 - pid; NetServer::SendBufferToPlayer(players[pid], STOC_GAME_MSG, query_buffer, len + 4); NetServer::ReSendToPlayer(players[pid + 1]); @@ -1535,7 +1702,7 @@ void TagDuel::RefreshSingle(int player, int location, int sequence, int flag) { int pid = (player == 0) ? 0 : 2; NetServer::SendBufferToPlayer(players[pid], STOC_GAME_MSG, query_buffer, len + 4); NetServer::ReSendToPlayer(players[pid + 1]); - if(location == LOCATION_REMOVED && (qbuf[15] & POS_FACEDOWN)) + if(location == LOCATION_REMOVED && (position & POS_FACEDOWN)) return; if (location & 0x90) { for(int i = 0; i < 4; ++i) @@ -1546,30 +1713,20 @@ void TagDuel::RefreshSingle(int player, int location, int sequence, int flag) { } } } -int TagDuel::MessageHandler(long fduel, int type) { +uint32_t TagDuel::MessageHandler(intptr_t fduel, uint32_t type) { if(!enable_log) return 0; char msgbuf[1024]; - get_log_message(fduel, (byte*)msgbuf); - if(enable_log == 1) { - wchar_t wbuf[1024]; - BufferIO::DecodeUTF8(msgbuf, wbuf); - mainGame->AddChatMsg(wbuf, 9); - } else if(enable_log == 2) { - FILE* fp = fopen("error.log", "at"); - if(!fp) - return 0; - fprintf(fp, "[Script error:] %s\n", msgbuf); - fclose(fp); - } + get_log_message(fduel, msgbuf); + mainGame->AddDebugMsg(msgbuf); return 0; } void TagDuel::TagTimer(evutil_socket_t fd, short events, void* arg) { TagDuel* sd = static_cast(arg); sd->time_elapsed++; - if(sd->time_elapsed >= sd->time_limit[sd->last_response]) { + if(sd->time_elapsed >= sd->time_limit[sd->last_response] || sd->time_limit[sd->last_response] <= 0) { unsigned char wbuf[3]; - uint32 player = sd->last_response; + uint32_t player = sd->last_response; wbuf[0] = MSG_WIN; wbuf[1] = 1 - player; wbuf[2] = 0x3; @@ -1580,7 +1737,10 @@ void TagDuel::TagTimer(evutil_socket_t fd, short events, void* arg) { sd->EndDuel(); sd->DuelEndProc(); event_del(sd->etimer); + return; } + timeval timeout = { 1, 0 }; + event_add(sd->etimer, &timeout); } } diff --git a/gframe/tag_duel.h b/gframe/tag_duel.h index e627547761..376fc1262c 100644 --- a/gframe/tag_duel.h +++ b/gframe/tag_duel.h @@ -1,8 +1,9 @@ #ifndef TAG_DUEL_H #define TAG_DUEL_H -#include "config.h" +#include #include "network.h" +#include "deck_manager.h" #include "replay.h" namespace ygo { @@ -10,36 +11,39 @@ namespace ygo { class TagDuel: public DuelMode { public: TagDuel(); - virtual ~TagDuel(); - virtual void Chat(DuelPlayer* dp, void* pdata, int len); - virtual void JoinGame(DuelPlayer* dp, void* pdata, bool is_creater); - virtual void LeaveGame(DuelPlayer* dp); - virtual void ToDuelist(DuelPlayer* dp); - virtual void ToObserver(DuelPlayer* dp); - virtual void PlayerReady(DuelPlayer* dp, bool ready); - virtual void PlayerKick(DuelPlayer* dp, unsigned char pos); - virtual void UpdateDeck(DuelPlayer* dp, void* pdata); - virtual void StartDuel(DuelPlayer* dp); - virtual void HandResult(DuelPlayer* dp, unsigned char res); - virtual void TPResult(DuelPlayer* dp, unsigned char tp); - virtual void Process(); - virtual void Surrender(DuelPlayer* dp); - virtual int Analyze(char* msgbuffer, unsigned int len); - virtual void GetResponse(DuelPlayer* dp, void* pdata, unsigned int len); - virtual void TimeConfirm(DuelPlayer* dp); - virtual void EndDuel(); + ~TagDuel() override; + void Chat(DuelPlayer* dp, unsigned char* pdata, int len) override; + void JoinGame(DuelPlayer* dp, unsigned char* pdata, bool is_creater) override; + void LeaveGame(DuelPlayer* dp) override; + void ToDuelist(DuelPlayer* dp) override; + void ToObserver(DuelPlayer* dp) override; + void PlayerReady(DuelPlayer* dp, bool is_ready) override; + void PlayerKick(DuelPlayer* dp, unsigned char pos) override; + void UpdateDeck(DuelPlayer* dp, unsigned char* pdata, int len) override; + void StartDuel(DuelPlayer* dp) override; + void HandResult(DuelPlayer* dp, unsigned char res) override; + void TPResult(DuelPlayer* dp, unsigned char tp) override; + void Process() override; + void Surrender(DuelPlayer* dp) override; + int Analyze(unsigned char* msgbuffer, unsigned int len) override; + void GetResponse(DuelPlayer* dp, unsigned char* pdata, unsigned int len) override; + void TimeConfirm(DuelPlayer* dp) override; + void EndDuel() override; void DuelEndProc(); void WaitforResponse(int playerid); - void RefreshMzone(int player, int flag = 0x81fff, int use_cache = 1); + void RefreshMzone(int player, int flag = 0x881fff, int use_cache = 1); void RefreshSzone(int player, int flag = 0x681fff, int use_cache = 1); - void RefreshHand(int player, int flag = 0x781fff, int use_cache = 1); + void RefreshHand(int player, int flag = 0x681fff, int use_cache = 1); void RefreshGrave(int player, int flag = 0x81fff, int use_cache = 1); - void RefreshExtra(int player, int flag = 0x81fff, int use_cache = 1); - void RefreshSingle(int player, int location, int sequence, int flag = 0x781fff); - - static int MessageHandler(long fduel, int type); + void RefreshExtra(int player, int flag = 0xe81fff, int use_cache = 1); + void RefreshSingle(int player, int location, int sequence, int flag = 0xf81fff); + + static uint32_t MessageHandler(intptr_t fduel, uint32_t type); static void TagTimer(evutil_socket_t fd, short events, void* arg); + +private: + int WriteUpdateData(int& player, int location, int& flag, unsigned char*& qbuf, int& use_cache); protected: DuelPlayer* players[4]; @@ -47,13 +51,15 @@ class TagDuel: public DuelMode { DuelPlayer* cur_player[2]; std::set observers; bool ready[4]; + bool surrender[4]; Deck pdeck[4]; + int deck_error[4]; unsigned char hand_result[2]; unsigned char last_response; Replay last_replay; unsigned char turn_count; - unsigned short time_limit[2]; - unsigned short time_elapsed; + short time_limit[2]; + short time_elapsed; }; } diff --git a/lflist.conf b/lflist.conf index 40842b2939..c08a1ffdf7 100644 --- a/lflist.conf +++ b/lflist.conf @@ -1,4 +1,7502 @@ -#[2015.10][2015.4][2015.1][2014.10][2014.7][2014.4][2014.2][2013.9][2015.7 TCG][2015.4 TCG][2015.1 TCG][2014.10 TCG][2014.7 TCG][2014.4 TCG][2014.1.1 TCG][2013.10.11 TCG][2013.3.1][2012.9.1][2012.3.1][2011.9.1] +#[2026.1][2026.2 TCG][2025.10][2025.7][2025.4][2025.1][2024.10][2024.7][2024.4][2024.1][2023.10][2023.7][2023.4][2023.1][2022.10][2022.7][2022.4][2022.1][2021.10][2021.7][2021.4][2021.1][2020.10][2020.7][2020.4][2020.1][2019.10][2019.7][2019.4][2019.1][2018.10][2018.7][2018.4][2018.1][2017.10][2017.7][2017.4][2017.1][2016.10][2016.7][2016.4][2016.1][2015.10][2015.4][2015.1][2014.10][2014.7][2014.4][2014.2][2013.9][2025.10 TCG][2025.9 TCG][2025.4 TCG][2024.12 TCG][2024.9 TCG][2024.4 TCG][2024.1 TCG][2023.9 TCG][2023.6 TCG][2023.2 TCG][2022.12 TCG][2022.10 TCG][2022.5 TCG][2022.2 TCG][2021.10 TCG][2021.7 TCG][2021.3 TCG][2020.12 TCG][2020.9 TCG][2020.6 TCG][2020.4 TCG][2020.1 TCG][2019.10 TCG][2019.7 TCG][2019.4 TCG][2019.1 TCG][2018.12 TCG][2018.9 TCG][2018.5 TCG][2018.2 TCG][2017.11 TCG][2017.9 TCG][2017.6 TCG][2017.3 TCG][2016.8 TCG][2016.4 TCG][2015.11 TCG][2015.7 TCG][2015.4 TCG][2015.1 TCG][2014.10 TCG][2014.7 TCG][2014.4 TCG][2014.1.1 TCG][2013.10.11 TCG][2013.3.1][2012.9.1][2012.3.1][2011.9.1] +!2026.1 +#forbidden +20292186 0 --アーティファクト-デスサイズ +91869203 0 --アマゾネスの射手 +20663556 0 --イレカエル +44910027 0 --ヴィクトリー・ドラゴン +38273745 0 --ヴェルズ・ウロボロス +27552504 0 --永遠の淑女 ベアトリーチェ +62242678 0 --琰魔竜王 レッド・デーモン・カラミティ +34945480 0 --外神アザトート +95727991 0 --カタパルト・タートル +08903700 0 --儀式魔人リリーサー +11384280 0 --キャノン・ソルジャー +17412721 0 --旧神ノーデン +32909498 0 --クシャトリラ・フェンリル +50588353 0 --水晶機巧-ハリファイバー +62320425 0 --古衛兵アギド +25926710 0 --古尖兵ケルベク +03040496 0 --混沌魔龍 カオス・ルーラー +88071625 0 --The tyrant NEPTUNE +71818935 0 --閉ザサレシ天ノ月 +52653092 0 --SNo.0 ホープ・ゼアル +85115440 0 --十二獣ブルホーン +59537380 0 --守護竜アガーペイン +86148577 0 --守護竜エルピィ +04280258 0 --召命の神弓-アポロウーサ +21044178 0 --深淵に潜む者 +88581108 0 --真竜皇V.F.D. +27381364 0 --スプライト・エルフ +59859086 0 --スプラッシュ・メイジ +16923472 0 --ゼンマイハンター +15341821 0 --ダンディライオン +77679716 0 --超重武者装留ブレイク・アーマー +92731385 0 --ティアラメンツ・キトカロス +69015963 0 --デビル・フランケン +79875176 0 --トゥーン・キャノン・ソルジャー +75732622 0 --トーチ・ゴーレム +22593417 0 --トポロジック・ガンブラー・ドラゴン +03679218 0 --トロイメア・マーメイド +54719828 0 --No.16 色の支配者ショック・ルーラー +90590303 0 --No.41 泥睡魔獣バグースカ +35772782 0 --No.67 パラダイスマッシャー +63504681 0 --No.86 H-C ロンゴミアント +58820923 0 --No.95 ギャラクシーアイズ・ダークマター・ドラゴン +78706415 0 --ファイバーポッド +93369354 0 --フィッシュボーグ-ガンナー +23558733 0 --フェニキシアン・クラスター・アマリリス +09929398 0 --BF-朧影のゴウフウ +70369116 0 --捕食植物ヴェルテ・アナコンダ +63101919 0 --マジックテンペスター +34206604 0 --魔導サイエンティスト +68059897 0 --M∀LICE<Q>RED RANSOM +14702066 0 --メガキャノン・ソルジャー +96782886 0 --メンタルマスター +83152482 0 --ユニオン・キャリアー +34086406 0 --ラヴァルバル・チェイン +85243784 0 --リンクロス +73356503 0 --烈風の結界像 +57421866 0 --レベル・スティーラー +41482598 0 --悪夢の蜃気楼 +44763025 0 --いたずら好きな双子悪魔 +17375316 0 --押収 +35059553 0 --カイザーコロシアム +74191942 0 --苦渋の選択 +42829885 0 --強引な番兵 +55144522 0 --強欲な壺 +23557835 0 --次元融合 +31423101 0 --神剣-フェニックスブレード +57953380 0 --生還の宝札 +54447022 0 --ソウル・チャージ +60682203 0 --大寒波 +69243953 0 --蝶の短剣-エルマ +79571449 0 --天使の施し +63789924 0 --盗人の煙玉 +70828912 0 --早すぎた埋葬 +42703248 0 --ハリケーン +72537897 0 --魔獣の懐柔 +76375976 0 --魔鍾洞 +34906152 0 --マスドライバー +85602018 0 --遺言状 +27174286 0 --異次元からの帰還 +05851097 0 --虚無空間 +93016201 0 --王宮の弾圧 +61740673 0 --王宮の勅命 +23516703 0 --サモンリミッター +03280747 0 --第六感 +64697231 0 --ダスト・シュート +80604091 0 --血の代償 +32723153 0 --マジカル・エクスプロージョン +17178486 0 --ライフチェンジャー +28566710 0 --ラストバトル! +#limit +08633261 1 --アイス・ライゼオル +79606837 1 --虹光の宣告者 +29302858 1 --VS ラゼン +34022970 1 --エクス・ライゼオル +29301450 1 --S:Pリトルナイト +68304193 1 --クシャトリラ・ユニコーン +72270339 1 --黒魔女ディアベルスター +28642461 1 --K9-66a号 ヨクル +99937011 1 --剣神官ムドラ +38814750 1 --PSYフレームギア・γ +74586817 1 --PSYフレームロード・Ω +32731036 1 --深淵の獣ルベリオン +36521307 1 --斬機サーキュラー +78872731 1 --十二獣モルモラット +06602300 1 --重爆撃禽 ボム・フェネクス +63542003 1 --宿神像ケルドウ +09674034 1 --スネークアイ・エクセル +90241276 1 --蛇眼の炎燐 +76145933 1 --スプライト・ブルー +23434538 1 --増殖するG +35844557 1 --ソード・ライゼオル +90361010 1 --超重武者装留イワトオシ +37818794 1 --超魔導竜騎士-ドラグーン・オブ・レッドアイズ +04928565 1 --ティアラメンツ・クシャトリラ +00572850 1 --ティアラメンツ・シェイレーン +37961969 1 --ティアラメンツ・ハゥフニス +74078255 1 --ティアラメンツ・メイルゥ +73956664 1 --ティアラメンツ・レイノハート +91800273 1 --ディメンション・アトラクター +90953320 1 --TG ハイパー・ライブラリアン +91810826 1 --天盃龍チュンドラ +07375867 1 --星辰竜ムルル +75433814 1 --No.40 ギミック・パペット-ヘブンズ・ストリングス +17266660 1 --朱光の宣告者 +06637331 1 --深淵の獣ドルイドヴルム +33854624 1 --深淵の獣マグナムート +80453041 1 --ファントム・オブ・ユベル +33396948 1 --封印されしエクゾディア +44519536 1 --封印されし者の左足 +07902349 1 --封印されし者の左腕 +08124921 1 --封印されし者の右足 +70903634 1 --封印されし者の右腕 +94689206 1 --ブロックドラゴン +24094258 1 --ヘビーメタルフォーゼ・エレクトラム +10966439 1 --マシュマオ☆ヤミー +32061192 1 --M∀LICE<P>Dormouse +60764609 1 --魔を刻むデモンスミス +90809975 1 --餅カエル +30581601 1 --ヤミー★スナッチー +77103950 1 --壱世壊=ペルレイノ +33782437 1 --一時休戦 +01845204 1 --簡易融合 +19613556 1 --大嵐 +81439173 1 --おろかな埋葬 +85106525 1 --篝火 +13048472 1 --儀式の下準備 +84211599 1 --金満で謙虚な壺 +06153210 1 --計都星辰 +23701465 1 --原初の種 +80845034 1 --“罪宝狩りの悪魔” +30336082 1 --盃満ちる燦幻荘 +83764718 1 --死者蘇生 +07477101 1 --時空の七皇 +52340444 1 --閃刀機-ホーネットビット +32807846 1 --増援 +72892473 1 --手札抹殺 +98567237 1 --刻まれし魔の詠聖 +73628505 1 --テラ・フォーミング +11110587 1 --隣の芝刈り +24224830 1 --墓穴の指名者 +18144506 1 --ハーピィの羽根帚 +75500286 1 --封印の黄金櫃 +07394770 1 --ブリリアント・フュージョン +73468603 1 --盆回し +65681983 1 --抹殺の指名者 +46411259 1 --突然変異 +01475311 1 --闇の誘惑 +44362883 1 --烙印融合 +92107604 1 --神碑の泉 +27970830 1 --六武の門 +02295440 1 --ワン・フォー・ワン +90846359 1 --群雄割拠 +53334471 1 --御前試合 +82732705 1 --スキルドレイン +24207889 1 --センサー万別 +21076084 1 --トリックスター・リンカーネイション +58921041 1 --魔封じの芳香 +23002292 1 --レッド・リブート +#semi limit +92248362 2 --K9-17号 イヅナ +14558127 2 --灰流うらら +35726888 2 --おろかな副葬 +49238328 2 --強欲で金満な壺 +66730191 2 --燦幻開門 +15443125 2 --スプライト・スターター +48130397 2 --超融合 +41420027 2 --神の宣告 +40366667 2 --霊王の波動 + +!2026.2 TCG +#forbidden +62320425 0 --Agido the Ancient Sentinel +06728559 0 --Archnemeses Protos +80237445 0 --Artifact Mjollnir +20292186 0 --Artifact Scythe +19740112 0 --Barrier Statue of the Drought +47961808 0 --Barrier Statue of the Inferno +73356503 0 --Barrier Statue of the Stormwinds +10963799 0 --Barrier Statue of the Torrent +09929398 0 --Blackwing - Gofu the Vague Shadow +94689206 0 --Block Dragon +69015963 0 --Cyber-Stein +15341821 0 --Dandylion +08903700 0 --Djinn Releaser of Rituals +51858306 0 --Eclipse Wyvern +55623480 0 --Fairy Tail - Snow +78706415 0 --Fiber Jar +93369354 0 --Fishborg Blaster +42009836 0 --Fossil Dyna Pachycephalo +55204071 0 --Gimmick Puppet Nightmare +75732622 0 --Grinder Golem +41855169 0 --Jowgen the Spiritualist +25926710 0 --Kelbek the Ancient Vanguard +57421866 0 --Level Eater +34206604 0 --Magical Scientist +23434538 0 --Maxx "C" +96782886 0 --Mind Master +23558733 0 --Phoenixian Cluster Amaryllis +01357146 0 --Ronintoadin +91258852 0 --SPYRAL Master Plan +88071625 0 --The Tyrant Neptune +44910027 0 --Victory Dragon +17412721 0 --Elder Entity Norden +43387895 0 --Supreme King Dragon Starving Venom +92731385 0 --Tearlaments Kitkallos +04280258 0 --Apollousa, Bow of the Goddess +50588353 0 --Crystron Halqifibrax +98095162 0 --Curious, the Lightsworn Dominion +59537380 0 --Guardragon Agarpain +86148577 0 --Guardragon Elpy +24094258 0 --Heavymetalfoes Electrumite +59934749 0 --Isolde, Two Tales of the Noble Knights +39064822 0 --Knightmare Goblin +65330383 0 --Knightmare Gryphon +03679218 0 --Knightmare Mermaid +30342076 0 --Link Decoder +85243784 0 --Linkross +95454996 0 --Maliss White Binder +44097050 0 --Mecha Phantom Beast Auroradon +71818935 0 --Moon of the Closed Heaven +25725326 0 --Prank-Kids Meow-Meow-Mu +70369116 0 --Predaplant Verte Anaconda +72330894 0 --Simorgh, Bird of Sovereignty +59859086 0 --Splash Mage +27381364 0 --Spright Elf +33918636 0 --Superheavy Samurai Scarecrow +22593417 0 --Topologic Gumblar Dragon +83152482 0 --Union Carrier +84815190 0 --Baronne de Fleur +27548199 0 --Borreload Savage Dragon +03040496 0 --Chaos Ruler, the Chaotic Magical Dragon +79606837 0 --Herald of the Arc Light +62242678 0 --Hot Red Dragon Archfiend King Calamity +63101919 0 --Tempest Magician +21044178 0 --Abyss Dweller +00440556 0 --Bahamut Shark +27552504 0 --Beatrice, Lady of the Eternal +38273745 0 --Evilswarm Ouroboros +48626373 0 --Kashtira Arise-Heart +11398059 0 --King of the Feral Imps +34086406 0 --Lavalval Chain +04423206 0 --M-X-Saber Invoker +54719828 0 --Number 16: Shock Master +10389142 0 --Number 42: Galaxy Tomahawk +35772782 0 --Number 67: Pair-a-Dice Smasher +63504681 0 --Number 86: Heroic Champion - Rhongomyniad +95474755 0 --Number 89: Diablosis the Mind Hacker +58820923 0 --Number 95: Galaxy-Eyes Dark Matter Dragon +52653092 0 --Number S0: Utopic ZEXAL +34945480 0 --Outer Entity Azathot +88581108 0 --True King of All Calamities +81122844 0 --Wind-Up Carrier Zenmaity +85115440 0 --Zoodiac Broadbull +69243953 0 --Butterfly Dagger - Elma +57953380 0 --Card of Safe Return +60682203 0 --Cold Wave +17375316 0 --Confiscation +44763025 0 --Delinquent Duo +23557835 0 --Dimension Fusion +42703248 0 --Giant Trunade +79571449 0 --Graceful Charity +19613556 0 --Heavy Storm +35059553 0 --Kaiser Colosseum +85602018 0 --Last Will +34906152 0 --Mass Driver +46411259 0 --Metamorphosis +41482598 0 --Mirage of Nightmare +76375976 0 --Mystic Mine +89023486 0 --Original Sinful Spoils - Snake-Eye +74191942 0 --Painful Choice +55144522 0 --Pot of Greed +70828912 0 --Premature Burial +63789924 0 --Smoke Grenade of the Thief +54447022 0 --Soul Charge +42829885 0 --The Forceful Sentry +43262273 0 --Appointer of the Red Lotus +01041278 0 --Branded Expulsion +83326048 0 --Dimensional Barrier +87639778 0 --Harpie's Feather Storm +61740673 0 --Imperial Order +28566710 0 --Last Turn +23002292 0 --Red Reboot +27174286 0 --Return from the Different Dimension +93016201 0 --Royal Oppression +57585212 0 --Self-Destruct Button +03280747 0 --Sixth Sense +23516703 0 --Summon Limit +64697231 0 --Trap Dustshoot +80604091 0 --Ultimate Offering +05851097 0 --Vanity's Emptiness +#limit +07902349 1 --Left Arm of the Forbidden One +44519536 1 --Left Leg of the Forbidden One +70903634 1 --Right Arm of the Forbidden One +08124921 1 --Right Leg of the Forbidden One +76794549 1 --Astrograph Sorcerer +06637331 1 --Bystial Druiswurm +33854624 1 --Bystial Magnamhut +91800273 1 --Dimension Shifter +07375867 1 --Dracotail Mululu +33396948 1 --Exodia the Forbidden One +34022970 1 --Ext Ryzeal +63542003 1 --Keldo the Sacred Protector +28642461 1 --K9-66a Jokul +32061192 1 --Maliss

Dormouse +36521307 1 --Mathmech Circular +38572779 1 --Miscellaneousaurus +99937011 1 --Mudora the Sword Oracle +38814750 1 --PSY-Framegear Gamma +20663556 1 --Substitoad +37961969 1 --Tearlaments Havnis +74078255 1 --Tearlaments Merrli +00572850 1 --Tearlaments Scheiren +91810826 1 --Tenpai Dragon Chundra +93156774 1 --Vanquish Soul Hollie Sue +78872731 1 --Zoodiac Ratpier +46640168 1 --Fiendsmith's Lacrima +39512984 1 --Gem-Knight Master Diamond +80453041 1 --Phantom of Yubel +41999284 1 --Linkuriboh +73539069 1 --Striker Dragon +61665245 1 --Summon Sorceress +93896655 1 --Sunavalon Dryas +65563871 1 --Sunvine Healer +30581601 1 --Yummy★Snatchy +13332685 1 --Ame no Habakiri no Mitsurugi +74586817 1 --PSY-Framelord Omega +90953320 1 --T.G. Hyper Librarian +00581014 1 --Daigusto Emeral +75433814 1 --Number 40: Gimmick Puppet of Strings +69170557 1 --Number C40: Gimmick Puppet of Dark Strings +34909328 1 --Ryzeal Detonator +80181649 1 --"A Case for K9" +85106525 1 --Bonfire +07394770 1 --Brilliant Fusion +24224830 1 --Called by the Grave +72892473 1 --Card Destruction +59750328 1 --Card of Demise +91623717 1 --Chain Strike +99266988 1 --Chaos Space +67616300 1 --Chicken Game +65681983 1 --Crossout Designator +15854426 1 --Divine Wind of Mist Valley +95308449 1 --Final Countdown +81439173 1 --Foolish Burial +27970830 1 --Gateway of the Six +75500286 1 --Gold Sarcophagus +18144506 1 --Harpie's Feather Duster +66957584 1 --Infernity Launcher +01845204 1 --Instant Fusion +93946239 1 --Into the Void +06153210 1 --Ketu Dracotail +71650854 1 --Magical Mid-Breaker Field +43040603 1 --Monster Gate +83764718 1 --Monster Reborn +72537897 1 --Obedience Schooled +33782437 1 --One Day of Peace +02295440 1 --One for One +84211599 1 --Pot of Prosperity +58577036 1 --Reasoning +32807846 1 --Reinforcement of the Army +66730191 1 --Sangen Kaimen +30336082 1 --Sangen Summoning +24940422 1 --Sekka's Light +73468603 1 --Set Rotation +52340444 1 --Sky Striker Mecha - Hornet Drones +71344451 1 --Slash Draw +73628505 1 --Terraforming +11110587 1 --That Grass Looks Greener +25311006 1 --Triple Tactics Talent +58921041 1 --Anti-Spell Fragrance +53334471 1 --Gozen Match +32723153 1 --Magical Explosion +03734202 1 --Naturia Sacred Tree +90846359 1 --Rivalry of Warlords +82732705 1 --Skill Drain +41420027 1 --Solemn Judgment +24207889 1 --There Can Be Only One +#semi limit +94145021 2 --Droll & Lock Bird +08633261 2 --Ice Ryzeal +69272449 2 --Maliss

White Rabbit +35844557 2 --Sword Ryzeal +41165831 2 --Unchained Soul of Sharvara +44362883 2 --Branded Fusion +68337209 2 --Maliss in Underground +55584558 2 --Purrely Delicious Memory +21347668 2 --Purrely Sleepy Memory +92107604 2 --Runick Fountain + +!2025.10 +#forbidden +20292186 0 --アーティファクト-デスサイズ +91869203 0 --アマゾネスの射手 +20663556 0 --イレカエル +44910027 0 --ヴィクトリー・ドラゴン +38273745 0 --ヴェルズ・ウロボロス +27552504 0 --永遠の淑女 ベアトリーチェ +62242678 0 --琰魔竜王 レッド・デーモン・カラミティ +34945480 0 --外神アザトート +95727991 0 --カタパルト・タートル +08903700 0 --儀式魔人リリーサー +11384280 0 --キャノン・ソルジャー +17412721 0 --旧神ノーデン +32909498 0 --クシャトリラ・フェンリル +50588353 0 --水晶機巧-ハリファイバー +62320425 0 --古衛兵アギド +25926710 0 --古尖兵ケルベク +03040496 0 --混沌魔龍 カオス・ルーラー +88071625 0 --The tyrant NEPTUNE +52653092 0 --SNo.0 ホープ・ゼアル +85115440 0 --十二獣ブルホーン +59537380 0 --守護竜アガーペイン +86148577 0 --守護竜エルピィ +04280258 0 --召命の神弓-アポロウーサ +21044178 0 --深淵に潜む者 +88581108 0 --真竜皇V.F.D. +27381364 0 --スプライト・エルフ +16923472 0 --ゼンマイハンター +15341821 0 --ダンディライオン +77679716 0 --超重武者装留ブレイク・アーマー +92731385 0 --ティアラメンツ・キトカロス +69015963 0 --デビル・フランケン +79875176 0 --トゥーン・キャノン・ソルジャー +75732622 0 --トーチ・ゴーレム +22593417 0 --トポロジック・ガンブラー・ドラゴン +03679218 0 --トロイメア・マーメイド +54719828 0 --No.16 色の支配者ショック・ルーラー +35772782 0 --No.67 パラダイスマッシャー +63504681 0 --No.86 H-C ロンゴミアント +58820923 0 --No.95 ギャラクシーアイズ・ダークマター・ドラゴン +78706415 0 --ファイバーポッド +93369354 0 --フィッシュボーグ-ガンナー +23558733 0 --フェニキシアン・クラスター・アマリリス +09929398 0 --BF-朧影のゴウフウ +70369116 0 --捕食植物ヴェルテ・アナコンダ +63101919 0 --マジックテンペスター +34206604 0 --魔導サイエンティスト +14702066 0 --メガキャノン・ソルジャー +96782886 0 --メンタルマスター +90809975 0 --餅カエル +83152482 0 --ユニオン・キャリアー +34086406 0 --ラヴァルバル・チェイン +85243784 0 --リンクロス +73356503 0 --烈風の結界像 +57421866 0 --レベル・スティーラー +41482598 0 --悪夢の蜃気楼 +44763025 0 --いたずら好きな双子悪魔 +17375316 0 --押収 +35059553 0 --カイザーコロシアム +74191942 0 --苦渋の選択 +42829885 0 --強引な番兵 +55144522 0 --強欲な壺 +23557835 0 --次元融合 +31423101 0 --神剣-フェニックスブレード +57953380 0 --生還の宝札 +54447022 0 --ソウル・チャージ +60682203 0 --大寒波 +69243953 0 --蝶の短剣-エルマ +79571449 0 --天使の施し +63789924 0 --盗人の煙玉 +70828912 0 --早すぎた埋葬 +42703248 0 --ハリケーン +72537897 0 --魔獣の懐柔 +76375976 0 --魔鍾洞 +34906152 0 --マスドライバー +46411259 0 --突然変異 +85602018 0 --遺言状 +27174286 0 --異次元からの帰還 +05851097 0 --虚無空間 +93016201 0 --王宮の弾圧 +61740673 0 --王宮の勅命 +23516703 0 --サモンリミッター +03280747 0 --第六感 +64697231 0 --ダスト・シュート +80604091 0 --血の代償 +32723153 0 --マジカル・エクスプロージョン +17178486 0 --ライフチェンジャー +28566710 0 --ラストバトル! +#limit +79606837 1 --虹光の宣告者 +29302858 1 --VS ラゼン +34022970 1 --エクス・ライゼオル +51858306 1 --エクリプス・ワイバーン +29301450 1 --S:Pリトルナイト +68304193 1 --クシャトリラ・ユニコーン +72270339 1 --黒魔女ディアベルスター +28642461 1 --K9-66a号 ヨクル +99937011 1 --剣神官ムドラ +38814750 1 --PSYフレームギア・γ +74586817 1 --PSYフレームロード・Ω +32731036 1 --深淵の獣ルベリオン +36521307 1 --斬機サーキュラー +78872731 1 --十二獣モルモラット +06602300 1 --重爆撃禽 ボム・フェネクス +63542003 1 --宿神像ケルドウ +09674034 1 --スネークアイ・エクセル +90241276 1 --蛇眼の炎燐 +76145933 1 --スプライト・ブルー +35844557 1 --ソード・ライゼオル +90361010 1 --超重武者装留イワトオシ +37818794 1 --超魔導竜騎士-ドラグーン・オブ・レッドアイズ +04928565 1 --ティアラメンツ・クシャトリラ +00572850 1 --ティアラメンツ・シェイレーン +37961969 1 --ティアラメンツ・ハゥフニス +74078255 1 --ティアラメンツ・メイルゥ +73956664 1 --ティアラメンツ・レイノハート +91800273 1 --ディメンション・アトラクター +90953320 1 --TG ハイパー・ライブラリアン +91810826 1 --天盃龍チュンドラ +75433814 1 --No.40 ギミック・パペット-ヘブンズ・ストリングス +17266660 1 --朱光の宣告者 +06637331 1 --深淵の獣ドルイドヴルム +33854624 1 --深淵の獣マグナムート +80453041 1 --ファントム・オブ・ユベル +33396948 1 --封印されしエクゾディア +44519536 1 --封印されし者の左足 +07902349 1 --封印されし者の左腕 +08124921 1 --封印されし者の右足 +70903634 1 --封印されし者の右腕 +94689206 1 --ブロックドラゴン +24094258 1 --ヘビーメタルフォーゼ・エレクトラム +32061192 1 --M∀LICE<P>Dormouse +60764609 1 --魔を刻むデモンスミス +77103950 1 --壱世壊=ペルレイノ +33782437 1 --一時休戦 +01845204 1 --簡易融合 +19613556 1 --大嵐 +81439173 1 --おろかな埋葬 +85106525 1 --篝火 +84211599 1 --金満で謙虚な壺 +06153210 1 --計都星辰 +23701465 1 --原初の種 +80845034 1 --“罪宝狩りの悪魔” +30336082 1 --盃満ちる燦幻荘 +83764718 1 --死者蘇生 +15443125 1 --スプライト・スターター +07477101 1 --時空の七皇 +52340444 1 --閃刀機-ホーネットビット +32807846 1 --増援 +72892473 1 --手札抹殺 +98567237 1 --刻まれし魔の詠聖 +73628505 1 --テラ・フォーミング +11110587 1 --隣の芝刈り +18144506 1 --ハーピィの羽根帚 +75500286 1 --封印の黄金櫃 +07394770 1 --ブリリアント・フュージョン +73468603 1 --盆回し +65681983 1 --抹殺の指名者 +01475311 1 --闇の誘惑 +44362883 1 --烙印融合 +92107604 1 --神碑の泉 +27970830 1 --六武の門 +02295440 1 --ワン・フォー・ワン +90846359 1 --群雄割拠 +53334471 1 --御前試合 +82732705 1 --スキルドレイン +24207889 1 --センサー万別 +21076084 1 --トリックスター・リンカーネイション +58921041 1 --魔封じの芳香 +23002292 1 --レッド・リブート +#semi limit +76794549 2 --アストログラフ・マジシャン +92248362 2 --K9-17号 イヅナ +23434538 2 --増殖するG +72656408 2 --深淵の獣バルドレイク +30581601 2 --ヤミー★スナッチー +61292243 2 --EMERGENCY! +35726888 2 --おろかな副葬 +49238328 2 --強欲で金満な壺 +35261759 2 --強欲で貪欲な壺 +66730191 2 --燦幻開門 +48130397 2 --超融合 +24224830 2 --墓穴の指名者 +21347668 2 --ピュアリィ・スリーピィメモリー +71832012 2 --六世壊=パライゾス + +!2025.7 +#forbidden +20292186 0 --アーティファクト-デスサイズ +91869203 0 --アマゾネスの射手 +20663556 0 --イレカエル +44910027 0 --ヴィクトリー・ドラゴン +27552504 0 --永遠の淑女 ベアトリーチェ +51858306 0 --エクリプス・ワイバーン +62242678 0 --琰魔竜王 レッド・デーモン・カラミティ +34945480 0 --外神アザトート +95727991 0 --カタパルト・タートル +08903700 0 --儀式魔人リリーサー +11384280 0 --キャノン・ソルジャー +17412721 0 --旧神ノーデン +32909498 0 --クシャトリラ・フェンリル +50588353 0 --水晶機巧-ハリファイバー +62320425 0 --古衛兵アギド +25926710 0 --古尖兵ケルベク +03040496 0 --混沌魔龍 カオス・ルーラー +88071625 0 --The tyrant NEPTUNE +52653092 0 --SNo.0 ホープ・ゼアル +85115440 0 --十二獣ブルホーン +59537380 0 --守護竜アガーペイン +86148577 0 --守護竜エルピィ +04280258 0 --召命の神弓-アポロウーサ +21044178 0 --深淵に潜む者 +88581108 0 --真竜皇V.F.D. +27381364 0 --スプライト・エルフ +16923472 0 --ゼンマイハンター +15341821 0 --ダンディライオン +77679716 0 --超重武者装留ブレイク・アーマー +92731385 0 --ティアラメンツ・キトカロス +69015963 0 --デビル・フランケン +79875176 0 --トゥーン・キャノン・ソルジャー +75732622 0 --トーチ・ゴーレム +22593417 0 --トポロジック・ガンブラー・ドラゴン +03679218 0 --トロイメア・マーメイド +54719828 0 --No.16 色の支配者ショック・ルーラー +35772782 0 --No.67 パラダイスマッシャー +63504681 0 --No.86 H-C ロンゴミアント +58820923 0 --No.95 ギャラクシーアイズ・ダークマター・ドラゴン +78706415 0 --ファイバーポッド +93369354 0 --フィッシュボーグ-ガンナー +23558733 0 --フェニキシアン・クラスター・アマリリス +09929398 0 --BF-朧影のゴウフウ +70369116 0 --捕食植物ヴェルテ・アナコンダ +63101919 0 --マジックテンペスター +34206604 0 --魔導サイエンティスト +14702066 0 --メガキャノン・ソルジャー +96782886 0 --メンタルマスター +90809975 0 --餅カエル +83152482 0 --ユニオン・キャリアー +34086406 0 --ラヴァルバル・チェイン +85243784 0 --リンクロス +73356503 0 --烈風の結界像 +57421866 0 --レベル・スティーラー +41482598 0 --悪夢の蜃気楼 +44763025 0 --いたずら好きな双子悪魔 +17375316 0 --押収 +35059553 0 --カイザーコロシアム +74191942 0 --苦渋の選択 +42829885 0 --強引な番兵 +55144522 0 --強欲な壺 +23557835 0 --次元融合 +31423101 0 --神剣-フェニックスブレード +57953380 0 --生還の宝札 +54447022 0 --ソウル・チャージ +60682203 0 --大寒波 +69243953 0 --蝶の短剣-エルマ +79571449 0 --天使の施し +63789924 0 --盗人の煙玉 +70828912 0 --早すぎた埋葬 +42703248 0 --ハリケーン +76375976 0 --魔鍾洞 +34906152 0 --マスドライバー +46411259 0 --突然変異 +85602018 0 --遺言状 +27174286 0 --異次元からの帰還 +05851097 0 --虚無空間 +93016201 0 --王宮の弾圧 +61740673 0 --王宮の勅命 +23516703 0 --サモンリミッター +03280747 0 --第六感 +64697231 0 --ダスト・シュート +80604091 0 --血の代償 +32723153 0 --マジカル・エクスプロージョン +17178486 0 --ライフチェンジャー +28566710 0 --ラストバトル! +#limit +76794549 1 --アストログラフ・マジシャン +34022970 1 --エクス・ライゼオル +29301450 1 --S:Pリトルナイト +68304193 1 --クシャトリラ・ユニコーン +72270339 1 --黒魔女ディアベルスター +99937011 1 --剣神官ムドラ +38814750 1 --PSYフレームギア・γ +74586817 1 --PSYフレームロード・Ω +02563463 1 --流離のグリフォンライダー +32731036 1 --深淵の獣ルベリオン +36521307 1 --斬機サーキュラー +78872731 1 --十二獣モルモラット +06602300 1 --重爆撃禽 ボム・フェネクス +63542003 1 --宿神像ケルドウ +09674034 1 --スネークアイ・エクセル +90241276 1 --蛇眼の炎燐 +76145933 1 --スプライト・ブルー +35844557 1 --ソード・ライゼオル +90361010 1 --超重武者装留イワトオシ +37818794 1 --超魔導竜騎士-ドラグーン・オブ・レッドアイズ +04928565 1 --ティアラメンツ・クシャトリラ +00572850 1 --ティアラメンツ・シェイレーン +37961969 1 --ティアラメンツ・ハゥフニス +74078255 1 --ティアラメンツ・メイルゥ +73956664 1 --ティアラメンツ・レイノハート +91800273 1 --ディメンション・アトラクター +90953320 1 --TG ハイパー・ライブラリアン +91810826 1 --天盃龍チュンドラ +39064822 1 --トロイメア・ゴブリン +75433814 1 --No.40 ギミック・パペット-ヘブンズ・ストリングス +17266660 1 --朱光の宣告者 +06637331 1 --深淵の獣ドルイドヴルム +72656408 1 --深淵の獣バルドレイク +33854624 1 --深淵の獣マグナムート +80453041 1 --ファントム・オブ・ユベル +33396948 1 --封印されしエクゾディア +44519536 1 --封印されし者の左足 +07902349 1 --封印されし者の左腕 +08124921 1 --封印されし者の右足 +70903634 1 --封印されし者の右腕 +94689206 1 --ブロックドラゴン +24094258 1 --ヘビーメタルフォーゼ・エレクトラム +32061192 1 --M∀LICE<P>Dormouse +60764609 1 --魔を刻むデモンスミス +77103950 1 --壱世壊=ペルレイノ +33782437 1 --一時休戦 +01845204 1 --簡易融合 +61292243 1 --EMERGENCY! +19613556 1 --大嵐 +81439173 1 --おろかな埋葬 +85106525 1 --篝火 +84211599 1 --金満で謙虚な壺 +23701465 1 --原初の種 +80845034 1 --“罪宝狩りの悪魔” +30336082 1 --盃満ちる燦幻荘 +83764718 1 --死者蘇生 +15443125 1 --スプライト・スターター +07477101 1 --時空の七皇 +52340444 1 --閃刀機-ホーネットビット +32807846 1 --増援 +72892473 1 --手札抹殺 +98567237 1 --刻まれし魔の詠聖 +73628505 1 --テラ・フォーミング +11110587 1 --隣の芝刈り +18144506 1 --ハーピィの羽根帚 +75500286 1 --封印の黄金櫃 +07394770 1 --ブリリアント・フュージョン +73468603 1 --盆回し +65681983 1 --抹殺の指名者 +71832012 1 --六世壊=パライゾス +01475311 1 --闇の誘惑 +44362883 1 --烙印融合 +92107604 1 --神碑の泉 +27970830 1 --六武の門 +02295440 1 --ワン・フォー・ワン +90846359 1 --群雄割拠 +53334471 1 --御前試合 +82732705 1 --スキルドレイン +24207889 1 --センサー万別 +21076084 1 --トリックスター・リンカーネイション +58921041 1 --魔封じの芳香 +23002292 1 --レッド・リブート +#semi limit +13533678 2 --スプライト・ジェット +23434538 2 --増殖するG +35726888 2 --おろかな副葬 +67723438 2 --緊急テレポート +49238328 2 --強欲で金満な壺 +35261759 2 --強欲で貪欲な壺 +48130397 2 --超融合 +24224830 2 --墓穴の指名者 +93600443 2 --マスク・チェンジ・セカンド +21347668 2 --ピュアリィ・スリーピィメモリー + +!2025.4 +#forbidden +20292186 0 --アーティファクト-デスサイズ +91869203 0 --アマゾネスの射手 +20663556 0 --イレカエル +44910027 0 --ヴィクトリー・ドラゴン +27552504 0 --永遠の淑女 ベアトリーチェ +51858306 0 --エクリプス・ワイバーン +62242678 0 --琰魔竜王 レッド・デーモン・カラミティ +34945480 0 --外神アザトート +95727991 0 --カタパルト・タートル +08903700 0 --儀式魔人リリーサー +11384280 0 --キャノン・ソルジャー +17412721 0 --旧神ノーデン +32909498 0 --クシャトリラ・フェンリル +50588353 0 --水晶機巧-ハリファイバー +62320425 0 --古衛兵アギド +25926710 0 --古尖兵ケルベク +03040496 0 --混沌魔龍 カオス・ルーラー +02563463 0 --流離のグリフォンライダー +88071625 0 --The tyrant NEPTUNE +52653092 0 --SNo.0 ホープ・ゼアル +85115440 0 --十二獣ブルホーン +59537380 0 --守護竜アガーペイン +86148577 0 --守護竜エルピィ +21044178 0 --深淵に潜む者 +88581108 0 --真竜皇V.F.D. +27381364 0 --スプライト・エルフ +16923472 0 --ゼンマイハンター +15341821 0 --ダンディライオン +77679716 0 --超重武者装留ブレイク・アーマー +92731385 0 --ティアラメンツ・キトカロス +69015963 0 --デビル・フランケン +79875176 0 --トゥーン・キャノン・ソルジャー +75732622 0 --トーチ・ゴーレム +22593417 0 --トポロジック・ガンブラー・ドラゴン +39064822 0 --トロイメア・ゴブリン +03679218 0 --トロイメア・マーメイド +54719828 0 --No.16 色の支配者ショック・ルーラー +63504681 0 --No.86 H-C ロンゴミアント +58820923 0 --No.95 ギャラクシーアイズ・ダークマター・ドラゴン +78706415 0 --ファイバーポッド +93369354 0 --フィッシュボーグ-ガンナー +23558733 0 --フェニキシアン・クラスター・アマリリス +09929398 0 --BF-朧影のゴウフウ +70369116 0 --捕食植物ヴェルテ・アナコンダ +63101919 0 --マジックテンペスター +34206604 0 --魔導サイエンティスト +14702066 0 --メガキャノン・ソルジャー +96782886 0 --メンタルマスター +90809975 0 --餅カエル +83152482 0 --ユニオン・キャリアー +34086406 0 --ラヴァルバル・チェイン +85243784 0 --リンクロス +73356503 0 --烈風の結界像 +57421866 0 --レベル・スティーラー +41482598 0 --悪夢の蜃気楼 +44763025 0 --いたずら好きな双子悪魔 +17375316 0 --押収 +35059553 0 --カイザーコロシアム +74191942 0 --苦渋の選択 +42829885 0 --強引な番兵 +55144522 0 --強欲な壺 +23557835 0 --次元融合 +31423101 0 --神剣-フェニックスブレード +57953380 0 --生還の宝札 +54447022 0 --ソウル・チャージ +60682203 0 --大寒波 +69243953 0 --蝶の短剣-エルマ +79571449 0 --天使の施し +63789924 0 --盗人の煙玉 +70828912 0 --早すぎた埋葬 +42703248 0 --ハリケーン +76375976 0 --魔鍾洞 +34906152 0 --マスドライバー +46411259 0 --突然変異 +85602018 0 --遺言状 +27174286 0 --異次元からの帰還 +05851097 0 --虚無空間 +93016201 0 --王宮の弾圧 +61740673 0 --王宮の勅命 +23516703 0 --サモンリミッター +03280747 0 --第六感 +64697231 0 --ダスト・シュート +80604091 0 --血の代償 +32723153 0 --マジカル・エクスプロージョン +17178486 0 --ライフチェンジャー +28566710 0 --ラストバトル! +#limit +76794549 1 --アストログラフ・マジシャン +34022970 1 --エクス・ライゼオル +29301450 1 --S:Pリトルナイト +68304193 1 --クシャトリラ・ユニコーン +72270339 1 --黒魔女ディアベルスター +99937011 1 --剣神官ムドラ +38814750 1 --PSYフレームギア・γ +74586817 1 --PSYフレームロード・Ω +32731036 1 --深淵の獣ルベリオン +36521307 1 --斬機サーキュラー +48905153 1 --十二獣ドランシア +78872731 1 --十二獣モルモラット +06602300 1 --重爆撃禽 ボム・フェネクス +63542003 1 --宿神像ケルドウ +09674034 1 --スネークアイ・エクセル +90241276 1 --蛇眼の炎燐 +13533678 1 --スプライト・ジェット +76145933 1 --スプライト・ブルー +35844557 1 --ソード・ライゼオル +90361010 1 --超重武者装留イワトオシ +37818794 1 --超魔導竜騎士-ドラグーン・オブ・レッドアイズ +04928565 1 --ティアラメンツ・クシャトリラ +00572850 1 --ティアラメンツ・シェイレーン +37961969 1 --ティアラメンツ・ハゥフニス +74078255 1 --ティアラメンツ・メイルゥ +73956664 1 --ティアラメンツ・レイノハート +91800273 1 --ディメンション・アトラクター +90953320 1 --TG ハイパー・ライブラリアン +91810826 1 --天盃龍チュンドラ +75433814 1 --No.40 ギミック・パペット-ヘブンズ・ストリングス +17266660 1 --朱光の宣告者 +06637331 1 --深淵の獣ドルイドヴルム +72656408 1 --深淵の獣バルドレイク +33854624 1 --深淵の獣マグナムート +80453041 1 --ファントム・オブ・ユベル +33396948 1 --封印されしエクゾディア +44519536 1 --封印されし者の左足 +07902349 1 --封印されし者の左腕 +08124921 1 --封印されし者の右足 +70903634 1 --封印されし者の右腕 +94689206 1 --ブロックドラゴン +24094258 1 --ヘビーメタルフォーゼ・エレクトラム +32061192 1 --M∀LICE<P>Dormouse +60764609 1 --魔を刻むデモンスミス +77103950 1 --壱世壊=ペルレイノ +33782437 1 --一時休戦 +01845204 1 --簡易融合 +61292243 1 --EMERGENCY! +19613556 1 --大嵐 +81439173 1 --おろかな埋葬 +85106525 1 --篝火 +84211599 1 --金満で謙虚な壺 +23701465 1 --原初の種 +80845034 1 --“罪宝狩りの悪魔” +30336082 1 --盃満ちる燦幻荘 +83764718 1 --死者蘇生 +15443125 1 --スプライト・スターター +07477101 1 --時空の七皇 +52340444 1 --閃刀機-ホーネットビット +32807846 1 --増援 +72892473 1 --手札抹殺 +98567237 1 --刻まれし魔の詠聖 +73628505 1 --テラ・フォーミング +11110587 1 --隣の芝刈り +18144506 1 --ハーピィの羽根帚 +75500286 1 --封印の黄金櫃 +07394770 1 --ブリリアント・フュージョン +73468603 1 --盆回し +93600443 1 --マスク・チェンジ・セカンド +65681983 1 --抹殺の指名者 +71832012 1 --六世壊=パライゾス +01475311 1 --闇の誘惑 +44362883 1 --烙印融合 +92107604 1 --神碑の泉 +27970830 1 --六武の門 +02295440 1 --ワン・フォー・ワン +90846359 1 --群雄割拠 +53334471 1 --御前試合 +82732705 1 --スキルドレイン +24207889 1 --センサー万別 +21076084 1 --トリックスター・リンカーネイション +23002292 1 --レッド・リブート +#semi limit +34124316 2 --サイバーポッド +81275020 2 --SRベイゴマックス +23434538 2 --増殖するG +65734501 2 --R-ACEエアホイスター +35726888 2 --おろかな副葬 +67723438 2 --緊急テレポート +49238328 2 --強欲で金満な壺 +35261759 2 --強欲で貪欲な壺 +48130397 2 --超融合 +93729896 2 --ナイトメア・スローン +24224830 2 --墓穴の指名者 +21347668 2 --ピュアリィ・スリーピィメモリー +52947044 2 --フュージョン・デステニー +92714517 2 --ビッグウェルカム・ラビュリンス + +!2025.1 +#forbidden +91869203 0 --アマゾネスの射手 +20663556 0 --イレカエル +44910027 0 --ヴィクトリー・ドラゴン +27552504 0 --永遠の淑女 ベアトリーチェ +51858306 0 --エクリプス・ワイバーン +62242678 0 --琰魔竜王 レッド・デーモン・カラミティ +34945480 0 --外神アザトート +95727991 0 --カタパルト・タートル +08903700 0 --儀式魔人リリーサー +11384280 0 --キャノン・ソルジャー +17412721 0 --旧神ノーデン +32909498 0 --クシャトリラ・フェンリル +50588353 0 --水晶機巧-ハリファイバー +62320425 0 --古衛兵アギド +25926710 0 --古尖兵ケルベク +03040496 0 --混沌魔龍 カオス・ルーラー +02563463 0 --流離のグリフォンライダー +88071625 0 --The tyrant NEPTUNE +52653092 0 --SNo.0 ホープ・ゼアル +85115440 0 --十二獣ブルホーン +59537380 0 --守護竜アガーペイン +86148577 0 --守護竜エルピィ +21044178 0 --深淵に潜む者 +88581108 0 --真竜皇V.F.D. +27381364 0 --スプライト・エルフ +16923472 0 --ゼンマイハンター +15341821 0 --ダンディライオン +77679716 0 --超重武者装留ブレイク・アーマー +92731385 0 --ティアラメンツ・キトカロス +69015963 0 --デビル・フランケン +79875176 0 --トゥーン・キャノン・ソルジャー +75732622 0 --トーチ・ゴーレム +22593417 0 --トポロジック・ガンブラー・ドラゴン +39064822 0 --トロイメア・ゴブリン +03679218 0 --トロイメア・マーメイド +54719828 0 --No.16 色の支配者ショック・ルーラー +63504681 0 --No.86 H-C ロンゴミアント +58820923 0 --No.95 ギャラクシーアイズ・ダークマター・ドラゴン +78706415 0 --ファイバーポッド +93369354 0 --フィッシュボーグ-ガンナー +23558733 0 --フェニキシアン・クラスター・アマリリス +09929398 0 --BF-朧影のゴウフウ +70369116 0 --捕食植物ヴェルテ・アナコンダ +63101919 0 --マジックテンペスター +34206604 0 --魔導サイエンティスト +14702066 0 --メガキャノン・ソルジャー +96782886 0 --メンタルマスター +90809975 0 --餅カエル +83152482 0 --ユニオン・キャリアー +34086406 0 --ラヴァルバル・チェイン +85243784 0 --リンクロス +73356503 0 --烈風の結界像 +57421866 0 --レベル・スティーラー +41482598 0 --悪夢の蜃気楼 +44763025 0 --いたずら好きな双子悪魔 +17375316 0 --押収 +35059553 0 --カイザーコロシアム +74191942 0 --苦渋の選択 +42829885 0 --強引な番兵 +55144522 0 --強欲な壺 +23557835 0 --次元融合 +31423101 0 --神剣-フェニックスブレード +57953380 0 --生還の宝札 +54447022 0 --ソウル・チャージ +60682203 0 --大寒波 +69243953 0 --蝶の短剣-エルマ +79571449 0 --天使の施し +63789924 0 --盗人の煙玉 +70828912 0 --早すぎた埋葬 +42703248 0 --ハリケーン +76375976 0 --魔鍾洞 +34906152 0 --マスドライバー +46411259 0 --突然変異 +85602018 0 --遺言状 +27174286 0 --異次元からの帰還 +05851097 0 --虚無空間 +93016201 0 --王宮の弾圧 +61740673 0 --王宮の勅命 +03280747 0 --第六感 +64697231 0 --ダスト・シュート +80604091 0 --血の代償 +32723153 0 --マジカル・エクスプロージョン +17178486 0 --ライフチェンジャー +28566710 0 --ラストバトル! +#limit +20292186 1 --アーティファクト-デスサイズ +76794549 1 --アストログラフ・マジシャン +34022970 1 --エクス・ライゼオル +29301450 1 --S:Pリトルナイト +68304193 1 --クシャトリラ・ユニコーン +72270339 1 --黒魔女ディアベルスター +99937011 1 --剣神官ムドラ +34124316 1 --サイバーポッド +38814750 1 --PSYフレームギア・γ +74586817 1 --PSYフレームロード・Ω +32731036 1 --深淵の獣ルベリオン +36521307 1 --斬機サーキュラー +48905153 1 --十二獣ドランシア +78872731 1 --十二獣モルモラット +06602300 1 --重爆撃禽 ボム・フェネクス +63542003 1 --宿神像ケルドウ +09674034 1 --スネークアイ・エクセル +90241276 1 --蛇眼の炎燐 +13533678 1 --スプライト・ジェット +76145933 1 --スプライト・ブルー +90361010 1 --超重武者装留イワトオシ +37818794 1 --超魔導竜騎士-ドラグーン・オブ・レッドアイズ +04928565 1 --ティアラメンツ・クシャトリラ +00572850 1 --ティアラメンツ・シェイレーン +37961969 1 --ティアラメンツ・ハゥフニス +74078255 1 --ティアラメンツ・メイルゥ +73956664 1 --ティアラメンツ・レイノハート +90953320 1 --TG ハイパー・ライブラリアン +91810826 1 --天盃龍チュンドラ +75433814 1 --No.40 ギミック・パペット-ヘブンズ・ストリングス +17266660 1 --朱光の宣告者 +06637331 1 --深淵の獣ドルイドヴルム +72656408 1 --深淵の獣バルドレイク +33854624 1 --深淵の獣マグナムート +80453041 1 --ファントム・オブ・ユベル +33396948 1 --封印されしエクゾディア +44519536 1 --封印されし者の左足 +07902349 1 --封印されし者の左腕 +08124921 1 --封印されし者の右足 +70903634 1 --封印されし者の右腕 +94689206 1 --ブロックドラゴン +24094258 1 --ヘビーメタルフォーゼ・エレクトラム +60764609 1 --魔を刻むデモンスミス +77103950 1 --壱世壊=ペルレイノ +33782437 1 --一時休戦 +01845204 1 --簡易融合 +61292243 1 --EMERGENCY! +19613556 1 --大嵐 +81439173 1 --おろかな埋葬 +85106525 1 --篝火 +84211599 1 --金満で謙虚な壺 +23701465 1 --原初の種 +80845034 1 --“罪宝狩りの悪魔” +30336082 1 --盃満ちる燦幻荘 +83764718 1 --死者蘇生 +15443125 1 --スプライト・スターター +52340444 1 --閃刀機-ホーネットビット +32807846 1 --増援 +72892473 1 --手札抹殺 +98567237 1 --刻まれし魔の詠聖 +73628505 1 --テラ・フォーミング +18144506 1 --ハーピィの羽根帚 +21347668 1 --ピュアリィ・スリーピィメモリー +75500286 1 --封印の黄金櫃 +07394770 1 --ブリリアント・フュージョン +73468603 1 --盆回し +93600443 1 --マスク・チェンジ・セカンド +65681983 1 --抹殺の指名者 +71832012 1 --六世壊=パライゾス +01475311 1 --闇の誘惑 +44362883 1 --烙印融合 +92107604 1 --神碑の泉 +27970830 1 --六武の門 +02295440 1 --ワン・フォー・ワン +90846359 1 --群雄割拠 +53334471 1 --御前試合 +23516703 1 --サモンリミッター +82732705 1 --スキルドレイン +24207889 1 --センサー万別 +21076084 1 --トリックスター・リンカーネイション +23002292 1 --レッド・リブート +#semi limit +02526224 2 --炎王神獣 キリン +17330916 2 --EMモンキーボード +12289247 2 --クロノグラフ・マジシャン +21377582 2 --真竜剣皇マスターP +81275020 2 --SRベイゴマックス +23434538 2 --増殖するG +91800273 2 --ディメンション・アトラクター +33508719 2 --メタモルポット +65734501 2 --R-ACEエアホイスター +35726888 2 --おろかな副葬 +67723438 2 --緊急テレポート +45986603 2 --強奪 +49238328 2 --強欲で金満な壺 +35261759 2 --強欲で貪欲な壺 +46060017 2 --十二獣の会局 +07477101 2 --時空の七皇 +48130397 2 --超融合 +11110587 2 --隣の芝刈り +93729896 2 --ナイトメア・スローン +24224830 2 --墓穴の指名者 +52947044 2 --フュージョン・デステニー +92714517 2 --ビッグウェルカム・ラビュリンス + +!2024.10 +#forbidden +91869203 0 --アマゾネスの射手 +20663556 0 --イレカエル +44910027 0 --ヴィクトリー・ドラゴン +27552504 0 --永遠の淑女 ベアトリーチェ +51858306 0 --エクリプス・ワイバーン +62242678 0 --琰魔竜王 レッド・デーモン・カラミティ +34945480 0 --外神アザトート +95727991 0 --カタパルト・タートル +08903700 0 --儀式魔人リリーサー +11384280 0 --キャノン・ソルジャー +17412721 0 --旧神ノーデン +32909498 0 --クシャトリラ・フェンリル +50588353 0 --水晶機巧-ハリファイバー +62320425 0 --古衛兵アギド +25926710 0 --古尖兵ケルベク +03040496 0 --混沌魔龍 カオス・ルーラー +34124316 0 --サイバーポッド +02563463 0 --流離のグリフォンライダー +88071625 0 --The tyrant NEPTUNE +52653092 0 --SNo.0 ホープ・ゼアル +85115440 0 --十二獣ブルホーン +59537380 0 --守護竜アガーペイン +86148577 0 --守護竜エルピィ +88581108 0 --真竜皇V.F.D. +27381364 0 --スプライト・エルフ +16923472 0 --ゼンマイハンター +15341821 0 --ダンディライオン +77679716 0 --超重武者装留ブレイク・アーマー +92731385 0 --ティアラメンツ・キトカロス +69015963 0 --デビル・フランケン +79875176 0 --トゥーン・キャノン・ソルジャー +75732622 0 --トーチ・ゴーレム +22593417 0 --トポロジック・ガンブラー・ドラゴン +39064822 0 --トロイメア・ゴブリン +03679218 0 --トロイメア・マーメイド +54719828 0 --No.16 色の支配者ショック・ルーラー +63504681 0 --No.86 H-C ロンゴミアント +58820923 0 --No.95 ギャラクシーアイズ・ダークマター・ドラゴン +78706415 0 --ファイバーポッド +93369354 0 --フィッシュボーグ-ガンナー +23558733 0 --フェニキシアン・クラスター・アマリリス +09929398 0 --BF-朧影のゴウフウ +70369116 0 --捕食植物ヴェルテ・アナコンダ +63101919 0 --マジックテンペスター +34206604 0 --魔導サイエンティスト +14702066 0 --メガキャノン・ソルジャー +96782886 0 --メンタルマスター +90809975 0 --餅カエル +83152482 0 --ユニオン・キャリアー +34086406 0 --ラヴァルバル・チェイン +85243784 0 --リンクロス +73356503 0 --烈風の結界像 +57421866 0 --レベル・スティーラー +41482598 0 --悪夢の蜃気楼 +44763025 0 --いたずら好きな双子悪魔 +17375316 0 --押収 +35059553 0 --カイザーコロシアム +74191942 0 --苦渋の選択 +42829885 0 --強引な番兵 +55144522 0 --強欲な壺 +23557835 0 --次元融合 +31423101 0 --神剣-フェニックスブレード +57953380 0 --生還の宝札 +54447022 0 --ソウル・チャージ +60682203 0 --大寒波 +69243953 0 --蝶の短剣-エルマ +79571449 0 --天使の施し +63789924 0 --盗人の煙玉 +70828912 0 --早すぎた埋葬 +42703248 0 --ハリケーン +76375976 0 --魔鍾洞 +34906152 0 --マスドライバー +46411259 0 --突然変異 +85602018 0 --遺言状 +27174286 0 --異次元からの帰還 +05851097 0 --虚無空間 +93016201 0 --王宮の弾圧 +61740673 0 --王宮の勅命 +03280747 0 --第六感 +64697231 0 --ダスト・シュート +80604091 0 --血の代償 +32723153 0 --マジカル・エクスプロージョン +17178486 0 --ライフチェンジャー +28566710 0 --ラストバトル! +#limit +76794549 1 --アストログラフ・マジシャン +29301450 1 --S:Pリトルナイト +17330916 1 --EMモンキーボード +68304193 1 --クシャトリラ・ユニコーン +12289247 1 --クロノグラフ・マジシャン +72270339 1 --黒魔女ディアベルスター +99937011 1 --剣神官ムドラ +38814750 1 --PSYフレームギア・γ +74586817 1 --PSYフレームロード・Ω +32731036 1 --深淵の獣ルベリオン +36521307 1 --斬機サーキュラー +48905153 1 --十二獣ドランシア +78872731 1 --十二獣モルモラット +06602300 1 --重爆撃禽 ボム・フェネクス +63542003 1 --宿神像ケルドウ +21377582 1 --真竜剣皇マスターP +09674034 1 --スネークアイ・エクセル +90241276 1 --蛇眼の炎燐 +13533678 1 --スプライト・ジェット +76145933 1 --スプライト・ブルー +90361010 1 --超重武者装留イワトオシ +37818794 1 --超魔導竜騎士-ドラグーン・オブ・レッドアイズ +04928565 1 --ティアラメンツ・クシャトリラ +00572850 1 --ティアラメンツ・シェイレーン +37961969 1 --ティアラメンツ・ハゥフニス +74078255 1 --ティアラメンツ・メイルゥ +73956664 1 --ティアラメンツ・レイノハート +90953320 1 --TG ハイパー・ライブラリアン +91810826 1 --天盃龍チュンドラ +75433814 1 --No.40 ギミック・パペット-ヘブンズ・ストリングス +17266660 1 --朱光の宣告者 +06637331 1 --深淵の獣ドルイドヴルム +72656408 1 --深淵の獣バルドレイク +33854624 1 --深淵の獣マグナムート +80453041 1 --ファントム・オブ・ユベル +33396948 1 --封印されしエクゾディア +44519536 1 --封印されし者の左足 +07902349 1 --封印されし者の左腕 +08124921 1 --封印されし者の右足 +70903634 1 --封印されし者の右腕 +94689206 1 --ブロックドラゴン +24094258 1 --ヘビーメタルフォーゼ・エレクトラム +60764609 1 --魔を刻むデモンスミス +33508719 1 --メタモルポット +77103950 1 --壱世壊=ペルレイノ +33782437 1 --一時休戦 +01845204 1 --簡易融合 +61292243 1 --EMERGENCY! +19613556 1 --大嵐 +81439173 1 --おろかな埋葬 +85106525 1 --篝火 +84211599 1 --金満で謙虚な壺 +23701465 1 --原初の種 +45986603 1 --強奪 +80845034 1 --“罪宝狩りの悪魔” +30336082 1 --盃満ちる燦幻荘 +83764718 1 --死者蘇生 +46060017 1 --十二獣の会局 +15443125 1 --スプライト・スターター +52340444 1 --閃刀機-ホーネットビット +32807846 1 --増援 +72892473 1 --手札抹殺 +98567237 1 --刻まれし魔の詠聖 +73628505 1 --テラ・フォーミング +18144506 1 --ハーピィの羽根帚 +21347668 1 --ピュアリィ・スリーピィメモリー +07394770 1 --ブリリアント・フュージョン +73468603 1 --盆回し +93600443 1 --マスク・チェンジ・セカンド +65681983 1 --抹殺の指名者 +71832012 1 --六世壊=パライゾス +44362883 1 --烙印融合 +92107604 1 --神碑の泉 +27970830 1 --六武の門 +02295440 1 --ワン・フォー・ワン +90846359 1 --群雄割拠 +23516703 1 --サモンリミッター +82732705 1 --スキルドレイン +24207889 1 --センサー万別 +21076084 1 --トリックスター・リンカーネイション +23002292 1 --レッド・リブート +#semi limit +40177746 2 --イーバ +02526224 2 --炎王神獣 キリン +81275020 2 --SRベイゴマックス +23434538 2 --増殖するG +82385847 2 --ダイナレスラー・パンクラトプス +91800273 2 --ディメンション・アトラクター +09411399 2 --D-HERO ディアボリックガイ +04423206 2 --M.X-セイバー インヴォーカー +92746535 2 --竜剣士ラスターP +65734501 2 --R-ACEエアホイスター +35726888 2 --おろかな副葬 +67723438 2 --緊急テレポート +49238328 2 --強欲で金満な壺 +35261759 2 --強欲で貪欲な壺 +48130397 2 --超融合 +11110587 2 --隣の芝刈り +93729896 2 --ナイトメア・スローン +24224830 2 --墓穴の指名者 +55584558 2 --ピュアリィ・デリシャスメモリー +75500286 2 --封印の黄金櫃 +52947044 2 --フュージョン・デステニー +36637374 2 --烙印開幕 +53334471 2 --御前試合 +92714517 2 --ビッグウェルカム・ラビュリンス + +!2024.7 +#forbidden +91869203 0 --アマゾネスの射手 +20663556 0 --イレカエル +44910027 0 --ヴィクトリー・ドラゴン +51858306 0 --エクリプス・ワイバーン +62242678 0 --琰魔竜王 レッド・デーモン・カラミティ +34945480 0 --外神アザトート +95727991 0 --カタパルト・タートル +08903700 0 --儀式魔人リリーサー +11384280 0 --キャノン・ソルジャー +17412721 0 --旧神ノーデン +32909498 0 --クシャトリラ・フェンリル +50588353 0 --水晶機巧-ハリファイバー +62320425 0 --古衛兵アギド +25926710 0 --古尖兵ケルベク +03040496 0 --混沌魔龍 カオス・ルーラー +34124316 0 --サイバーポッド +02563463 0 --流離のグリフォンライダー +88071625 0 --The tyrant NEPTUNE +52653092 0 --SNo.0 ホープ・ゼアル +48905153 0 --十二獣ドランシア +85115440 0 --十二獣ブルホーン +59537380 0 --守護竜アガーペイン +86148577 0 --守護竜エルピィ +88581108 0 --真竜皇V.F.D. +21377582 0 --真竜剣皇マスターP +27381364 0 --スプライト・エルフ +16923472 0 --ゼンマイハンター +15341821 0 --ダンディライオン +77679716 0 --超重武者装留ブレイク・アーマー +37818794 0 --超魔導竜騎士-ドラグーン・オブ・レッドアイズ +92731385 0 --ティアラメンツ・キトカロス +69015963 0 --デビル・フランケン +79875176 0 --トゥーン・キャノン・ソルジャー +75732622 0 --トーチ・ゴーレム +22593417 0 --トポロジック・ガンブラー・ドラゴン +39064822 0 --トロイメア・ゴブリン +03679218 0 --トロイメア・マーメイド +54719828 0 --No.16 色の支配者ショック・ルーラー +63504681 0 --No.86 H-C ロンゴミアント +58820923 0 --No.95 ギャラクシーアイズ・ダークマター・ドラゴン +78706415 0 --ファイバーポッド +93369354 0 --フィッシュボーグ-ガンナー +23558733 0 --フェニキシアン・クラスター・アマリリス +09929398 0 --BF-朧影のゴウフウ +70369116 0 --捕食植物ヴェルテ・アナコンダ +63101919 0 --マジックテンペスター +34206604 0 --魔導サイエンティスト +14702066 0 --メガキャノン・ソルジャー +96782886 0 --メンタルマスター +90809975 0 --餅カエル +83152482 0 --ユニオン・キャリアー +34086406 0 --ラヴァルバル・チェイン +85243784 0 --リンクロス +73356503 0 --烈風の結界像 +57421866 0 --レベル・スティーラー +41482598 0 --悪夢の蜃気楼 +44763025 0 --いたずら好きな双子悪魔 +17375316 0 --押収 +35059553 0 --カイザーコロシアム +74191942 0 --苦渋の選択 +42829885 0 --強引な番兵 +45986603 0 --強奪 +55144522 0 --強欲な壺 +23557835 0 --次元融合 +31423101 0 --神剣-フェニックスブレード +57953380 0 --生還の宝札 +54447022 0 --ソウル・チャージ +60682203 0 --大寒波 +69243953 0 --蝶の短剣-エルマ +79571449 0 --天使の施し +63789924 0 --盗人の煙玉 +70828912 0 --早すぎた埋葬 +42703248 0 --ハリケーン +76375976 0 --魔鍾洞 +34906152 0 --マスドライバー +46411259 0 --突然変異 +85602018 0 --遺言状 +27174286 0 --異次元からの帰還 +05851097 0 --虚無空間 +93016201 0 --王宮の弾圧 +61740673 0 --王宮の勅命 +03280747 0 --第六感 +64697231 0 --ダスト・シュート +80604091 0 --血の代償 +32723153 0 --マジカル・エクスプロージョン +17178486 0 --ライフチェンジャー +28566710 0 --ラストバトル! +#limit +76794549 1 --アストログラフ・マジシャン +40177746 1 --イーバ +27552504 1 --永遠の淑女 ベアトリーチェ +29301450 1 --S:Pリトルナイト +07563579 1 --Emヒグルミ +17330916 1 --EMモンキーボード +68304193 1 --クシャトリラ・ユニコーン +12289247 1 --クロノグラフ・マジシャン +99937011 1 --剣神官ムドラ +38814750 1 --PSYフレームギア・γ +74586817 1 --PSYフレームロード・Ω +32731036 1 --深淵の獣ルベリオン +36521307 1 --斬機サーキュラー +78872731 1 --十二獣モルモラット +06602300 1 --重爆撃禽 ボム・フェネクス +63542003 1 --宿神像ケルドウ +09674034 1 --スネークアイ・エクセル +81275020 1 --SRベイゴマックス +13533678 1 --スプライト・ジェット +76145933 1 --スプライト・ブルー +82385847 1 --ダイナレスラー・パンクラトプス +90361010 1 --超重武者装留イワトオシ +04928565 1 --ティアラメンツ・クシャトリラ +00572850 1 --ティアラメンツ・シェイレーン +37961969 1 --ティアラメンツ・ハゥフニス +74078255 1 --ティアラメンツ・メイルゥ +73956664 1 --ティアラメンツ・レイノハート +90953320 1 --TG ハイパー・ライブラリアン +75433814 1 --No.40 ギミック・パペット-ヘブンズ・ストリングス +90448279 1 --天霆號アーゼウス +17266660 1 --朱光の宣告者 +06637331 1 --深淵の獣ドルイドヴルム +72656408 1 --深淵の獣バルドレイク +33854624 1 --深淵の獣マグナムート +33396948 1 --封印されしエクゾディア +44519536 1 --封印されし者の左足 +07902349 1 --封印されし者の左腕 +08124921 1 --封印されし者の右足 +70903634 1 --封印されし者の右腕 +94689206 1 --ブロックドラゴン +24094258 1 --ヘビーメタルフォーゼ・エレクトラム +31178212 1 --マジェスペクター・ユニコーン +04423206 1 --M.X-セイバー インヴォーカー +33508719 1 --メタモルポット +92746535 1 --竜剣士ラスターP +77103950 1 --壱世壊=ペルレイノ +33782437 1 --一時休戦 +01845204 1 --簡易融合 +61292243 1 --EMERGENCY! +19613556 1 --大嵐 +81439173 1 --おろかな埋葬 +84211599 1 --金満で謙虚な壺 +23701465 1 --原初の種 +80845034 1 --“罪宝狩りの悪魔” +30336082 1 --盃満ちる燦幻荘 +83764718 1 --死者蘇生 +46060017 1 --十二獣の会局 +15443125 1 --スプライト・スターター +52340444 1 --閃刀機-ホーネットビット +32807846 1 --増援 +72892473 1 --手札抹殺 +73628505 1 --テラ・フォーミング +18144506 1 --ハーピィの羽根帚 +21347668 1 --ピュアリィ・スリーピィメモリー +75500286 1 --封印の黄金櫃 +52947044 1 --フュージョン・デステニー +07394770 1 --ブリリアント・フュージョン +73468603 1 --盆回し +93600443 1 --マスク・チェンジ・セカンド +65681983 1 --抹殺の指名者 +71832012 1 --六世壊=パライゾス +36637374 1 --烙印開幕 +44362883 1 --烙印融合 +92107604 1 --神碑の泉 +27970830 1 --六武の門 +02295440 1 --ワン・フォー・ワン +90846359 1 --群雄割拠 +23516703 1 --サモンリミッター +82732705 1 --スキルドレイン +24207889 1 --センサー万別 +21076084 1 --トリックスター・リンカーネイション +23002292 1 --レッド・リブート +#semi limit +02526224 2 --炎王神獣 キリン +53804307 2 --焔征竜-ブラスター +90411554 2 --巌征竜-レドックス +78080961 2 --SPYRAL-ジーニアス +91800273 2 --ディメンション・アトラクター +09411399 2 --D-HERO ディアボリックガイ +26400609 2 --瀑征竜-タイダル +89399912 2 --嵐征竜-テンペスト +65734501 2 --R-ACEエアホイスター +35726888 2 --おろかな副葬 +85106525 2 --篝火 +67723438 2 --緊急テレポート +49238328 2 --強欲で金満な壺 +35261759 2 --強欲で貪欲な壺 +12580477 2 --サンダー・ボルト +48130397 2 --超融合 +11110587 2 --隣の芝刈り +24224830 2 --墓穴の指名者 +55584558 2 --ピュアリィ・デリシャスメモリー +56700100 2 --ピュアリィ・マイフレンド +14532163 2 --ライトニング・ストーム +92714517 2 --ビッグウェルカム・ラビュリンス + +!2024.4 +#forbidden +91869203 0 --アマゾネスの射手 +20663556 0 --イレカエル +44910027 0 --ヴィクトリー・ドラゴン +51858306 0 --エクリプス・ワイバーン +07563579 0 --Emヒグルミ +62242678 0 --琰魔竜王 レッド・デーモン・カラミティ +34945480 0 --外神アザトート +08903700 0 --儀式魔人リリーサー +11384280 0 --キャノン・ソルジャー +17412721 0 --旧神ノーデン +32909498 0 --クシャトリラ・フェンリル +50588353 0 --水晶機巧-ハリファイバー +62320425 0 --古衛兵アギド +25926710 0 --古尖兵ケルベク +03040496 0 --混沌魔龍 カオス・ルーラー +34124316 0 --サイバーポッド +02563463 0 --流離のグリフォンライダー +88071625 0 --The tyrant NEPTUNE +52653092 0 --SNo.0 ホープ・ゼアル +48905153 0 --十二獣ドランシア +85115440 0 --十二獣ブルホーン +59537380 0 --守護竜アガーペイン +86148577 0 --守護竜エルピィ +88581108 0 --真竜皇V.F.D. +21377582 0 --真竜剣皇マスターP +27381364 0 --スプライト・エルフ +16923472 0 --ゼンマイハンター +15341821 0 --ダンディライオン +77679716 0 --超重武者装留ブレイク・アーマー +37818794 0 --超魔導竜騎士-ドラグーン・オブ・レッドアイズ +92731385 0 --ティアラメンツ・キトカロス +69015963 0 --デビル・フランケン +79875176 0 --トゥーン・キャノン・ソルジャー +75732622 0 --トーチ・ゴーレム +22593417 0 --トポロジック・ガンブラー・ドラゴン +39064822 0 --トロイメア・ゴブリン +03679218 0 --トロイメア・マーメイド +54719828 0 --No.16 色の支配者ショック・ルーラー +63504681 0 --No.86 H-C ロンゴミアント +58820923 0 --No.95 ギャラクシーアイズ・ダークマター・ドラゴン +78706415 0 --ファイバーポッド +93369354 0 --フィッシュボーグ-ガンナー +23558733 0 --フェニキシアン・クラスター・アマリリス +09929398 0 --BF-朧影のゴウフウ +70369116 0 --捕食植物ヴェルテ・アナコンダ +31178212 0 --マジェスペクター・ユニコーン +63101919 0 --マジックテンペスター +34206604 0 --魔導サイエンティスト +14702066 0 --メガキャノン・ソルジャー +96782886 0 --メンタルマスター +90809975 0 --餅カエル +83152482 0 --ユニオン・キャリアー +34086406 0 --ラヴァルバル・チェイン +85243784 0 --リンクロス +73356503 0 --烈風の結界像 +57421866 0 --レベル・スティーラー +41482598 0 --悪夢の蜃気楼 +44763025 0 --いたずら好きな双子悪魔 +17375316 0 --押収 +74191942 0 --苦渋の選択 +42829885 0 --強引な番兵 +45986603 0 --強奪 +55144522 0 --強欲な壺 +23557835 0 --次元融合 +31423101 0 --神剣-フェニックスブレード +57953380 0 --生還の宝札 +54447022 0 --ソウル・チャージ +60682203 0 --大寒波 +69243953 0 --蝶の短剣-エルマ +79571449 0 --天使の施し +63789924 0 --盗人の煙玉 +70828912 0 --早すぎた埋葬 +42703248 0 --ハリケーン +76375976 0 --魔鍾洞 +34906152 0 --マスドライバー +46411259 0 --突然変異 +85602018 0 --遺言状 +27174286 0 --異次元からの帰還 +05851097 0 --虚無空間 +93016201 0 --王宮の弾圧 +61740673 0 --王宮の勅命 +03280747 0 --第六感 +64697231 0 --ダスト・シュート +80604091 0 --血の代償 +32723153 0 --マジカル・エクスプロージョン +17178486 0 --ライフチェンジャー +28566710 0 --ラストバトル! +#limit +76794549 1 --アストログラフ・マジシャン +40177746 1 --イーバ +53804307 1 --焔征竜-ブラスター +17330916 1 --EMモンキーボード +90411554 1 --巌征竜-レドックス +68304193 1 --クシャトリラ・ユニコーン +67441435 1 --グローアップ・バルブ +12289247 1 --クロノグラフ・マジシャン +99937011 1 --剣神官ムドラ +38814750 1 --PSYフレームギア・γ +74586817 1 --PSYフレームロード・Ω +32731036 1 --深淵の獣ルベリオン +36521307 1 --斬機サーキュラー +78872731 1 --十二獣モルモラット +06602300 1 --重爆撃禽 ボム・フェネクス +63542003 1 --宿神像ケルドウ +78080961 1 --SPYRAL-ジーニアス +81275020 1 --SRベイゴマックス +13533678 1 --スプライト・ジェット +76145933 1 --スプライト・ブルー +82385847 1 --ダイナレスラー・パンクラトプス +90361010 1 --超重武者装留イワトオシ +15291624 1 --超雷龍-サンダー・ドラゴン +04928565 1 --ティアラメンツ・クシャトリラ +00572850 1 --ティアラメンツ・シェイレーン +37961969 1 --ティアラメンツ・ハゥフニス +74078255 1 --ティアラメンツ・メイルゥ +73956664 1 --ティアラメンツ・レイノハート +90953320 1 --TG ハイパー・ライブラリアン +90448279 1 --天霆號アーゼウス +17266660 1 --朱光の宣告者 +26400609 1 --瀑征竜-タイダル +06637331 1 --深淵の獣ドルイドヴルム +72656408 1 --深淵の獣バルドレイク +33854624 1 --深淵の獣マグナムート +33396948 1 --封印されしエクゾディア +44519536 1 --封印されし者の左足 +07902349 1 --封印されし者の左腕 +08124921 1 --封印されし者の右足 +70903634 1 --封印されし者の右腕 +35272499 1 --捕食植物オフリス・スコーピオ +94689206 1 --ブロックドラゴン +24094258 1 --ヘビーメタルフォーゼ・エレクトラム +04423206 1 --M.X-セイバー インヴォーカー +33508719 1 --メタモルポット +89399912 1 --嵐征竜-テンペスト +92746535 1 --竜剣士ラスターP +77103950 1 --壱世壊=ペルレイノ +33782437 1 --一時休戦 +01845204 1 --簡易融合 +61292243 1 --EMERGENCY! +19613556 1 --大嵐 +81439173 1 --おろかな埋葬 +84211599 1 --金満で謙虚な壺 +23701465 1 --原初の種 +80845034 1 --“罪宝狩りの悪魔” +83764718 1 --死者蘇生 +46060017 1 --十二獣の会局 +15443125 1 --スプライト・スターター +52340444 1 --閃刀機-ホーネットビット +32807846 1 --増援 +72892473 1 --手札抹殺 +73628505 1 --テラ・フォーミング +18144506 1 --ハーピィの羽根帚 +21347668 1 --ピュアリィ・スリーピィメモリー +75500286 1 --封印の黄金櫃 +52947044 1 --フュージョン・デステニー +07394770 1 --ブリリアント・フュージョン +73468603 1 --盆回し +93600443 1 --マスク・チェンジ・セカンド +65681983 1 --抹殺の指名者 +71832012 1 --六世壊=パライゾス +36637374 1 --烙印開幕 +44362883 1 --烙印融合 +92107604 1 --神碑の泉 +27970830 1 --六武の門 +02295440 1 --ワン・フォー・ワン +90846359 1 --群雄割拠 +82732705 1 --スキルドレイン +24207889 1 --センサー万別 +35316708 1 --刻の封印 +21076084 1 --トリックスター・リンカーネイション +23002292 1 --レッド・リブート +#semi limit +29301450 2 --S:Pリトルナイト +02526224 2 --炎王神獣 キリン +09674034 2 --スネークアイ・エクセル +94677445 2 --星杯の神子イヴ +91800273 2 --ディメンション・アトラクター +09411399 2 --D-HERO ディアボリックガイ +65734501 2 --R-ACEエアホイスター +35726888 2 --おろかな副葬 +35059553 2 --カイザーコロシアム +67723438 2 --緊急テレポート +49238328 2 --強欲で金満な壺 +35261759 2 --強欲で貪欲な壺 +12580477 2 --サンダー・ボルト +48130397 2 --超融合 +11110587 2 --隣の芝刈り +24224830 2 --墓穴の指名者 +55584558 2 --ピュアリィ・デリシャスメモリー +56700100 2 --ピュアリィ・マイフレンド +14532163 2 --ライトニング・ストーム +92714517 2 --ビッグウェルカム・ラビュリンス + +!2024.1 +#forbidden +91869203 0 --アマゾネスの射手 +20663556 0 --イレカエル +44910027 0 --ヴィクトリー・ドラゴン +51858306 0 --エクリプス・ワイバーン +07563579 0 --Emヒグルミ +62242678 0 --琰魔竜王 レッド・デーモン・カラミティ +34945480 0 --外神アザトート +08903700 0 --儀式魔人リリーサー +11384280 0 --キャノン・ソルジャー +17412721 0 --旧神ノーデン +32909498 0 --クシャトリラ・フェンリル +50588353 0 --水晶機巧-ハリファイバー +62320425 0 --古衛兵アギド +25926710 0 --古尖兵ケルベク +03040496 0 --混沌魔龍 カオス・ルーラー +34124316 0 --サイバーポッド +02563463 0 --流離のグリフォンライダー +88071625 0 --The tyrant NEPTUNE +61665245 0 --サモン・ソーサレス +52653092 0 --SNo.0 ホープ・ゼアル +48905153 0 --十二獣ドランシア +85115440 0 --十二獣ブルホーン +59537380 0 --守護竜アガーペイン +86148577 0 --守護竜エルピィ +88581108 0 --真竜皇V.F.D. +21377582 0 --真竜剣皇マスターP +27381364 0 --スプライト・エルフ +16923472 0 --ゼンマイハンター +15341821 0 --ダンディライオン +77679716 0 --超重武者装留ブレイク・アーマー +37818794 0 --超魔導竜騎士-ドラグーン・オブ・レッドアイズ +92731385 0 --ティアラメンツ・キトカロス +69015963 0 --デビル・フランケン +79875176 0 --トゥーン・キャノン・ソルジャー +75732622 0 --トーチ・ゴーレム +22593417 0 --トポロジック・ガンブラー・ドラゴン +39064822 0 --トロイメア・ゴブリン +03679218 0 --トロイメア・マーメイド +54719828 0 --No.16 色の支配者ショック・ルーラー +63504681 0 --No.86 H-C ロンゴミアント +58820923 0 --No.95 ギャラクシーアイズ・ダークマター・ドラゴン +26400609 0 --瀑征竜-タイダル +78706415 0 --ファイバーポッド +93369354 0 --フィッシュボーグ-ガンナー +23558733 0 --フェニキシアン・クラスター・アマリリス +09929398 0 --BF-朧影のゴウフウ +70369116 0 --捕食植物ヴェルテ・アナコンダ +31178212 0 --マジェスペクター・ユニコーン +63101919 0 --マジックテンペスター +34206604 0 --魔導サイエンティスト +14702066 0 --メガキャノン・ソルジャー +96782886 0 --メンタルマスター +90809975 0 --餅カエル +83152482 0 --ユニオン・キャリアー +34086406 0 --ラヴァルバル・チェイン +85243784 0 --リンクロス +73356503 0 --烈風の結界像 +57421866 0 --レベル・スティーラー +41482598 0 --悪夢の蜃気楼 +44763025 0 --いたずら好きな双子悪魔 +17375316 0 --押収 +74191942 0 --苦渋の選択 +42829885 0 --強引な番兵 +45986603 0 --強奪 +55144522 0 --強欲な壺 +23557835 0 --次元融合 +31423101 0 --神剣-フェニックスブレード +57953380 0 --生還の宝札 +54447022 0 --ソウル・チャージ +60682203 0 --大寒波 +69243953 0 --蝶の短剣-エルマ +79571449 0 --天使の施し +63789924 0 --盗人の煙玉 +70828912 0 --早すぎた埋葬 +42703248 0 --ハリケーン +76375976 0 --魔鍾洞 +34906152 0 --マスドライバー +46411259 0 --突然変異 +85602018 0 --遺言状 +27174286 0 --異次元からの帰還 +05851097 0 --虚無空間 +93016201 0 --王宮の弾圧 +61740673 0 --王宮の勅命 +03280747 0 --第六感 +64697231 0 --ダスト・シュート +80604091 0 --血の代償 +32723153 0 --マジカル・エクスプロージョン +17178486 0 --ライフチェンジャー +28566710 0 --ラストバトル! +#limit +76794549 1 --アストログラフ・マジシャン +40177746 1 --イーバ +53804307 1 --焔征竜-ブラスター +17330916 1 --EMモンキーボード +90411554 1 --巌征竜-レドックス +68304193 1 --クシャトリラ・ユニコーン +67441435 1 --グローアップ・バルブ +12289247 1 --クロノグラフ・マジシャン +99937011 1 --剣神官ムドラ +38814750 1 --PSYフレームギア・γ +74586817 1 --PSYフレームロード・Ω +32731036 1 --深淵の獣ルベリオン +36521307 1 --斬機サーキュラー +78872731 1 --十二獣モルモラット +06602300 1 --重爆撃禽 ボム・フェネクス +63542003 1 --宿神像ケルドウ +78080961 1 --SPYRAL-ジーニアス +81275020 1 --SRベイゴマックス +13533678 1 --スプライト・ジェット +76145933 1 --スプライト・ブルー +94677445 1 --星杯の神子イヴ +82385847 1 --ダイナレスラー・パンクラトプス +90361010 1 --超重武者装留イワトオシ +15291624 1 --超雷龍-サンダー・ドラゴン +04928565 1 --ティアラメンツ・クシャトリラ +00572850 1 --ティアラメンツ・シェイレーン +37961969 1 --ティアラメンツ・ハゥフニス +74078255 1 --ティアラメンツ・メイルゥ +73956664 1 --ティアラメンツ・レイノハート +90953320 1 --TG ハイパー・ライブラリアン +90448279 1 --天霆號アーゼウス +17266660 1 --朱光の宣告者 +06637331 1 --深淵の獣ドルイドヴルム +72656408 1 --深淵の獣バルドレイク +33854624 1 --深淵の獣マグナムート +33396948 1 --封印されしエクゾディア +44519536 1 --封印されし者の左足 +07902349 1 --封印されし者の左腕 +08124921 1 --封印されし者の右足 +70903634 1 --封印されし者の右腕 +35272499 1 --捕食植物オフリス・スコーピオ +94689206 1 --ブロックドラゴン +24094258 1 --ヘビーメタルフォーゼ・エレクトラム +04423206 1 --M.X-セイバー インヴォーカー +33508719 1 --メタモルポット +89399912 1 --嵐征竜-テンペスト +92746535 1 --竜剣士ラスターP +77103950 1 --壱世壊=ペルレイノ +33782437 1 --一時休戦 +01845204 1 --簡易融合 +61292243 1 --EMERGENCY! +19613556 1 --大嵐 +81439173 1 --おろかな埋葬 +84211599 1 --金満で謙虚な壺 +23701465 1 --原初の種 +83764718 1 --死者蘇生 +46060017 1 --十二獣の会局 +15443125 1 --スプライト・スターター +52340444 1 --閃刀機-ホーネットビット +32807846 1 --増援 +72892473 1 --手札抹殺 +73628505 1 --テラ・フォーミング +18144506 1 --ハーピィの羽根帚 +21347668 1 --ピュアリィ・スリーピィメモリー +75500286 1 --封印の黄金櫃 +52947044 1 --フュージョン・デステニー +07394770 1 --ブリリアント・フュージョン +73468603 1 --盆回し +93600443 1 --マスク・チェンジ・セカンド +65681983 1 --抹殺の指名者 +71832012 1 --六世壊=パライゾス +36637374 1 --烙印開幕 +44362883 1 --烙印融合 +92107604 1 --神碑の泉 +27970830 1 --六武の門 +02295440 1 --ワン・フォー・ワン +90846359 1 --群雄割拠 +82732705 1 --スキルドレイン +35316708 1 --刻の封印 +21076084 1 --トリックスター・リンカーネイション +23002292 1 --レッド・リブート +#semi limit +69811710 2 --宵星の騎士ギルス +91800273 2 --ディメンション・アトラクター +09411399 2 --D-HERO ディアボリックガイ +69610326 2 --覇王眷竜ダークヴルム +65734501 2 --R-ACEエアホイスター +03285551 2 --アラメシアの儀 +66957584 2 --インフェルニティガン +35726888 2 --おろかな副葬 +67723438 2 --緊急テレポート +35261759 2 --強欲で貪欲な壺 +04031928 2 --心変わり +12580477 2 --サンダー・ボルト +48130397 2 --超融合 +11110587 2 --隣の芝刈り +24224830 2 --墓穴の指名者 +55584558 2 --ピュアリィ・デリシャスメモリー +56700100 2 --ピュアリィ・マイフレンド +14532163 2 --ライトニング・ストーム +24207889 2 --センサー万別 +92714517 2 --ビッグウェルカム・ラビュリンス + +!2023.10 +#forbidden +91869203 0 --アマゾネスの射手 +20663556 0 --イレカエル +44910027 0 --ヴィクトリー・ドラゴン +51858306 0 --エクリプス・ワイバーン +07563579 0 --Emヒグルミ +34945480 0 --外神アザトート +90411554 0 --巌征竜-レドックス +08903700 0 --儀式魔人リリーサー +11384280 0 --キャノン・ソルジャー +17412721 0 --旧神ノーデン +32909498 0 --クシャトリラ・フェンリル +50588353 0 --水晶機巧-ハリファイバー +62320425 0 --古衛兵アギド +25926710 0 --古尖兵ケルベク +03040496 0 --混沌魔龍 カオス・ルーラー +34124316 0 --サイバーポッド +02563463 0 --流離のグリフォンライダー +88071625 0 --The tyrant NEPTUNE +61665245 0 --サモン・ソーサレス +52653092 0 --SNo.0 ホープ・ゼアル +48905153 0 --十二獣ドランシア +85115440 0 --十二獣ブルホーン +59537380 0 --守護竜アガーペイン +86148577 0 --守護竜エルピィ +88581108 0 --真竜皇V.F.D. +21377582 0 --真竜剣皇マスターP +27381364 0 --スプライト・エルフ +94677445 0 --星杯の神子イヴ +16923472 0 --ゼンマイハンター +15341821 0 --ダンディライオン +77679716 0 --超重武者装留ブレイク・アーマー +37818794 0 --超魔導竜騎士-ドラグーン・オブ・レッドアイズ +92731385 0 --ティアラメンツ・キトカロス +69015963 0 --デビル・フランケン +79875176 0 --トゥーン・キャノン・ソルジャー +75732622 0 --トーチ・ゴーレム +22593417 0 --トポロジック・ガンブラー・ドラゴン +39064822 0 --トロイメア・ゴブリン +03679218 0 --トロイメア・マーメイド +54719828 0 --No.16 色の支配者ショック・ルーラー +63504681 0 --No.86 H-C ロンゴミアント +58820923 0 --No.95 ギャラクシーアイズ・ダークマター・ドラゴン +26400609 0 --瀑征竜-タイダル +71525232 0 --破滅竜ガンドラX +78706415 0 --ファイバーポッド +93369354 0 --フィッシュボーグ-ガンナー +23558733 0 --フェニキシアン・クラスター・アマリリス +09929398 0 --BF-朧影のゴウフウ +70369116 0 --捕食植物ヴェルテ・アナコンダ +31178212 0 --マジェスペクター・ユニコーン +63101919 0 --マジックテンペスター +34206604 0 --魔導サイエンティスト +14702066 0 --メガキャノン・ソルジャー +96782886 0 --メンタルマスター +90809975 0 --餅カエル +83152482 0 --ユニオン・キャリアー +34086406 0 --ラヴァルバル・チェイン +85243784 0 --リンクロス +73356503 0 --烈風の結界像 +57421866 0 --レベル・スティーラー +41482598 0 --悪夢の蜃気楼 +44763025 0 --いたずら好きな双子悪魔 +17375316 0 --押収 +19613556 0 --大嵐 +74191942 0 --苦渋の選択 +42829885 0 --強引な番兵 +45986603 0 --強奪 +55144522 0 --強欲な壺 +23557835 0 --次元融合 +31423101 0 --神剣-フェニックスブレード +57953380 0 --生還の宝札 +54447022 0 --ソウル・チャージ +60682203 0 --大寒波 +69243953 0 --蝶の短剣-エルマ +79571449 0 --天使の施し +63789924 0 --盗人の煙玉 +70828912 0 --早すぎた埋葬 +42703248 0 --ハリケーン +76375976 0 --魔鍾洞 +34906152 0 --マスドライバー +46411259 0 --突然変異 +85602018 0 --遺言状 +27174286 0 --異次元からの帰還 +05851097 0 --虚無空間 +93016201 0 --王宮の弾圧 +61740673 0 --王宮の勅命 +03280747 0 --第六感 +64697231 0 --ダスト・シュート +80604091 0 --血の代償 +32723153 0 --マジカル・エクスプロージョン +17178486 0 --ライフチェンジャー +28566710 0 --ラストバトル! +#limit +76794549 1 --アストログラフ・マジシャン +40177746 1 --イーバ +53804307 1 --焔征竜-ブラスター +17330916 1 --EMモンキーボード +68304193 1 --クシャトリラ・ユニコーン +67441435 1 --グローアップ・バルブ +12289247 1 --クロノグラフ・マジシャン +99937011 1 --剣神官ムドラ +38814750 1 --PSYフレームギア・γ +74586817 1 --PSYフレームロード・Ω +32731036 1 --深淵の獣ルベリオン +36521307 1 --斬機サーキュラー +78872731 1 --十二獣モルモラット +06602300 1 --重爆撃禽 ボム・フェネクス +63542003 1 --宿神像ケルドウ +78080961 1 --SPYRAL-ジーニアス +81275020 1 --SRベイゴマックス +13533678 1 --スプライト・ジェット +76145933 1 --スプライト・ブルー +82385847 1 --ダイナレスラー・パンクラトプス +90361010 1 --超重武者装留イワトオシ +15291624 1 --超雷龍-サンダー・ドラゴン +04928565 1 --ティアラメンツ・クシャトリラ +00572850 1 --ティアラメンツ・シェイレーン +37961969 1 --ティアラメンツ・ハゥフニス +74078255 1 --ティアラメンツ・メイルゥ +73956664 1 --ティアラメンツ・レイノハート +90953320 1 --TG ハイパー・ライブラリアン +90448279 1 --天霆號アーゼウス +17266660 1 --朱光の宣告者 +06637331 1 --深淵の獣ドルイドヴルム +72656408 1 --深淵の獣バルドレイク +33854624 1 --深淵の獣マグナムート +33396948 1 --封印されしエクゾディア +44519536 1 --封印されし者の左足 +07902349 1 --封印されし者の左腕 +08124921 1 --封印されし者の右足 +70903634 1 --封印されし者の右腕 +35272499 1 --捕食植物オフリス・スコーピオ +94689206 1 --ブロックドラゴン +24094258 1 --ヘビーメタルフォーゼ・エレクトラム +04423206 1 --M.X-セイバー インヴォーカー +33508719 1 --メタモルポット +89399912 1 --嵐征竜-テンペスト +92746535 1 --竜剣士ラスターP +77103950 1 --壱世壊=ペルレイノ +33782437 1 --一時休戦 +01845204 1 --簡易融合 +81439173 1 --おろかな埋葬 +84211599 1 --金満で謙虚な壺 +23701465 1 --原初の種 +04031928 1 --心変わり +83764718 1 --死者蘇生 +46060017 1 --十二獣の会局 +15443125 1 --スプライト・スターター +52340444 1 --閃刀機-ホーネットビット +32807846 1 --増援 +72892473 1 --手札抹殺 +73628505 1 --テラ・フォーミング +18144506 1 --ハーピィの羽根帚 +21347668 1 --ピュアリィ・スリーピィメモリー +75500286 1 --封印の黄金櫃 +52947044 1 --フュージョン・デステニー +07394770 1 --ブリリアント・フュージョン +73468603 1 --盆回し +93600443 1 --マスク・チェンジ・セカンド +65681983 1 --抹殺の指名者 +71832012 1 --六世壊=パライゾス +36637374 1 --烙印開幕 +44362883 1 --烙印融合 +92107604 1 --神碑の泉 +27970830 1 --六武の門 +02295440 1 --ワン・フォー・ワン +82732705 1 --スキルドレイン +35316708 1 --刻の封印 +21076084 1 --トリックスター・リンカーネイション +23002292 1 --レッド・リブート +#semi limit +69811710 2 --宵星の騎士ギルス +91800273 2 --ディメンション・アトラクター +09411399 2 --D-HERO ディアボリックガイ +87209160 2 --鉄獣戦線 フラクトール +69610326 2 --覇王眷竜ダークヴルム +65734501 2 --R-ACEエアホイスター +03285551 2 --アラメシアの儀 +66957584 2 --インフェルニティガン +35726888 2 --おろかな副葬 +67723438 2 --緊急テレポート +35261759 2 --強欲で貪欲な壺 +12580477 2 --サンダー・ボルト +63166095 2 --閃刀起動-エンゲージ +48130397 2 --超融合 +11110587 2 --隣の芝刈り +13035077 2 --ドラゴニックD +24224830 2 --墓穴の指名者 +55584558 2 --ピュアリィ・デリシャスメモリー +28126717 2 --ふわんだりぃずと謎の地図 +14532163 2 --ライトニング・ストーム +90846359 2 --群雄割拠 + +!2023.7 +#forbidden +91869203 0 --アマゾネスの射手 +20663556 0 --イレカエル +44910027 0 --ヴィクトリー・ドラゴン +51858306 0 --エクリプス・ワイバーン +07563579 0 --Emヒグルミ +34945480 0 --外神アザトート +90411554 0 --巌征竜-レドックス +08903700 0 --儀式魔人リリーサー +11384280 0 --キャノン・ソルジャー +17412721 0 --旧神ノーデン +32909498 0 --クシャトリラ・フェンリル +50588353 0 --水晶機巧-ハリファイバー +34124316 0 --サイバーポッド +02563463 0 --流離のグリフォンライダー +88071625 0 --The tyrant NEPTUNE +61665245 0 --サモン・ソーサレス +52653092 0 --SNo.0 ホープ・ゼアル +48905153 0 --十二獣ドランシア +85115440 0 --十二獣ブルホーン +59537380 0 --守護竜アガーペイン +86148577 0 --守護竜エルピィ +88581108 0 --真竜皇V.F.D. +21377582 0 --真竜剣皇マスターP +27381364 0 --スプライト・エルフ +94677445 0 --星杯の神子イヴ +16923472 0 --ゼンマイハンター +15341821 0 --ダンディライオン +77679716 0 --超重武者装留ブレイク・アーマー +37818794 0 --超魔導竜騎士-ドラグーン・オブ・レッドアイズ +92731385 0 --ティアラメンツ・キトカロス +69015963 0 --デビル・フランケン +79875176 0 --トゥーン・キャノン・ソルジャー +75732622 0 --トーチ・ゴーレム +22593417 0 --トポロジック・ガンブラー・ドラゴン +39064822 0 --トロイメア・ゴブリン +03679218 0 --トロイメア・マーメイド +54719828 0 --No.16 色の支配者ショック・ルーラー +58820923 0 --No.95 ギャラクシーアイズ・ダークマター・ドラゴン +26400609 0 --瀑征竜-タイダル +71525232 0 --破滅竜ガンドラX +78706415 0 --ファイバーポッド +93369354 0 --フィッシュボーグ-ガンナー +23558733 0 --フェニキシアン・クラスター・アマリリス +09929398 0 --BF-朧影のゴウフウ +70369116 0 --捕食植物ヴェルテ・アナコンダ +31178212 0 --マジェスペクター・ユニコーン +63101919 0 --マジックテンペスター +34206604 0 --魔導サイエンティスト +14702066 0 --メガキャノン・ソルジャー +96782886 0 --メンタルマスター +90809975 0 --餅カエル +83152482 0 --ユニオン・キャリアー +34086406 0 --ラヴァルバル・チェイン +85243784 0 --リンクロス +73356503 0 --烈風の結界像 +57421866 0 --レベル・スティーラー +41482598 0 --悪夢の蜃気楼 +44763025 0 --いたずら好きな双子悪魔 +17375316 0 --押収 +19613556 0 --大嵐 +74191942 0 --苦渋の選択 +42829885 0 --強引な番兵 +45986603 0 --強奪 +55144522 0 --強欲な壺 +23557835 0 --次元融合 +31423101 0 --神剣-フェニックスブレード +57953380 0 --生還の宝札 +54447022 0 --ソウル・チャージ +60682203 0 --大寒波 +69243953 0 --蝶の短剣-エルマ +79571449 0 --天使の施し +63789924 0 --盗人の煙玉 +70828912 0 --早すぎた埋葬 +42703248 0 --ハリケーン +76375976 0 --魔鍾洞 +34906152 0 --マスドライバー +46411259 0 --突然変異 +85602018 0 --遺言状 +27174286 0 --異次元からの帰還 +05851097 0 --虚無空間 +93016201 0 --王宮の弾圧 +61740673 0 --王宮の勅命 +03280747 0 --第六感 +64697231 0 --ダスト・シュート +80604091 0 --血の代償 +32723153 0 --マジカル・エクスプロージョン +17178486 0 --ライフチェンジャー +28566710 0 --ラストバトル! +#limit +76794549 1 --アストログラフ・マジシャン +40177746 1 --イーバ +53804307 1 --焔征竜-ブラスター +17330916 1 --EMモンキーボード +68304193 1 --クシャトリラ・ユニコーン +67441435 1 --グローアップ・バルブ +12289247 1 --クロノグラフ・マジシャン +99937011 1 --剣神官ムドラ +62320425 1 --古衛兵アギド +25926710 1 --古尖兵ケルベク +38814750 1 --PSYフレームギア・γ +74586817 1 --PSYフレームロード・Ω +32731036 1 --深淵の獣ルベリオン +36521307 1 --斬機サーキュラー +69811710 1 --宵星の騎士ギルス +78872731 1 --十二獣モルモラット +06602300 1 --重爆撃禽 ボム・フェネクス +63542003 1 --宿神像ケルドウ +78080961 1 --SPYRAL-ジーニアス +81275020 1 --SRベイゴマックス +13533678 1 --スプライト・ジェット +76145933 1 --スプライト・ブルー +82385847 1 --ダイナレスラー・パンクラトプス +90361010 1 --超重武者装留イワトオシ +15291624 1 --超雷龍-サンダー・ドラゴン +00572850 1 --ティアラメンツ・シェイレーン +37961969 1 --ティアラメンツ・ハゥフニス +74078255 1 --ティアラメンツ・メイルゥ +73956664 1 --ティアラメンツ・レイノハート +90953320 1 --TG ハイパー・ライブラリアン +90448279 1 --天霆號アーゼウス +17266660 1 --朱光の宣告者 +69610326 1 --覇王眷竜ダークヴルム +06637331 1 --深淵の獣ドルイドヴルム +72656408 1 --深淵の獣バルドレイク +33854624 1 --深淵の獣マグナムート +33396948 1 --封印されしエクゾディア +44519536 1 --封印されし者の左足 +07902349 1 --封印されし者の左腕 +08124921 1 --封印されし者の右足 +70903634 1 --封印されし者の右腕 +35272499 1 --捕食植物オフリス・スコーピオ +24094258 1 --ヘビーメタルフォーゼ・エレクトラム +04423206 1 --M.X-セイバー インヴォーカー +33508719 1 --メタモルポット +89399912 1 --嵐征竜-テンペスト +92746535 1 --竜剣士ラスターP +77103950 1 --壱世壊=ペルレイノ +33782437 1 --一時休戦 +01845204 1 --簡易融合 +81439173 1 --おろかな埋葬 +84211599 1 --金満で謙虚な壺 +23701465 1 --原初の種 +04031928 1 --心変わり +83764718 1 --死者蘇生 +46060017 1 --十二獣の会局 +15443125 1 --スプライト・スターター +52340444 1 --閃刀機-ホーネットビット +32807846 1 --増援 +72892473 1 --手札抹殺 +73628505 1 --テラ・フォーミング +13035077 1 --ドラゴニックD +18144506 1 --ハーピィの羽根帚 +21347668 1 --ピュアリィ・スリーピィメモリー +75500286 1 --封印の黄金櫃 +52947044 1 --フュージョン・デステニー +07394770 1 --ブリリアント・フュージョン +28126717 1 --ふわんだりぃずと謎の地図 +73468603 1 --盆回し +93600443 1 --マスク・チェンジ・セカンド +65681983 1 --抹殺の指名者 +71832012 1 --六世壊=パライゾス +36637374 1 --烙印開幕 +44362883 1 --烙印融合 +92107604 1 --神碑の泉 +27970830 1 --六武の門 +02295440 1 --ワン・フォー・ワン +82732705 1 --スキルドレイン +35316708 1 --刻の封印 +21076084 1 --トリックスター・リンカーネイション +23002292 1 --レッド・リブート +#semi limit +28985331 2 --終末の騎士 +83334932 2 --超重武者バイ-Q +91800273 2 --ディメンション・アトラクター +09411399 2 --D-HERO ディアボリックガイ +87209160 2 --鉄獣戦線 フラクトール +25725326 2 --プランキッズ・ミュー +94689206 2 --ブロックドラゴン +03285551 2 --アラメシアの儀 +66957584 2 --インフェルニティガン +35726888 2 --おろかな副葬 +67723438 2 --緊急テレポート +35261759 2 --強欲で貪欲な壺 +12580477 2 --サンダー・ボルト +63166095 2 --閃刀起動-エンゲージ +48130397 2 --超融合 +11110587 2 --隣の芝刈り +35371948 2 --トリックスター・ライトステージ +24224830 2 --墓穴の指名者 +14532163 2 --ライトニング・ストーム + +!2023.4 +#forbidden +91869203 0 --アマゾネスの射手 +20663556 0 --イレカエル +44910027 0 --ヴィクトリー・ドラゴン +51858306 0 --エクリプス・ワイバーン +07563579 0 --Emヒグルミ +17330916 0 --EMモンキーボード +34945480 0 --外神アザトート +90411554 0 --巌征竜-レドックス +08903700 0 --儀式魔人リリーサー +11384280 0 --キャノン・ソルジャー +17412721 0 --旧神ノーデン +50588353 0 --水晶機巧-ハリファイバー +34124316 0 --サイバーポッド +02563463 0 --流離のグリフォンライダー +88071625 0 --The tyrant NEPTUNE +61665245 0 --サモン・ソーサレス +52653092 0 --SNo.0 ホープ・ゼアル +48905153 0 --十二獣ドランシア +85115440 0 --十二獣ブルホーン +59537380 0 --守護竜アガーペイン +86148577 0 --守護竜エルピィ +88581108 0 --真竜皇V.F.D. +21377582 0 --真竜剣皇マスターP +27381364 0 --スプライト・エルフ +94677445 0 --星杯の神子イヴ +16923472 0 --ゼンマイハンター +15341821 0 --ダンディライオン +37818794 0 --超魔導竜騎士-ドラグーン・オブ・レッドアイズ +92731385 0 --ティアラメンツ・キトカロス +79875176 0 --トゥーン・キャノン・ソルジャー +75732622 0 --トーチ・ゴーレム +22593417 0 --トポロジック・ガンブラー・ドラゴン +39064822 0 --トロイメア・ゴブリン +03679218 0 --トロイメア・マーメイド +54719828 0 --No.16 色の支配者ショック・ルーラー +58820923 0 --No.95 ギャラクシーアイズ・ダークマター・ドラゴン +26400609 0 --瀑征竜-タイダル +71525232 0 --破滅竜ガンドラX +78706415 0 --ファイバーポッド +93369354 0 --フィッシュボーグ-ガンナー +23558733 0 --フェニキシアン・クラスター・アマリリス +09929398 0 --BF-朧影のゴウフウ +70369116 0 --捕食植物ヴェルテ・アナコンダ +31178212 0 --マジェスペクター・ユニコーン +63101919 0 --マジックテンペスター +34206604 0 --魔導サイエンティスト +04423206 0 --M.X-セイバー インヴォーカー +14702066 0 --メガキャノン・ソルジャー +96782886 0 --メンタルマスター +90809975 0 --餅カエル +83152482 0 --ユニオン・キャリアー +34086406 0 --ラヴァルバル・チェイン +85243784 0 --リンクロス +73356503 0 --烈風の結界像 +57421866 0 --レベル・スティーラー +41482598 0 --悪夢の蜃気楼 +44763025 0 --いたずら好きな双子悪魔 +17375316 0 --押収 +19613556 0 --大嵐 +74191942 0 --苦渋の選択 +42829885 0 --強引な番兵 +45986603 0 --強奪 +55144522 0 --強欲な壺 +23557835 0 --次元融合 +31423101 0 --神剣-フェニックスブレード +57953380 0 --生還の宝札 +54447022 0 --ソウル・チャージ +60682203 0 --大寒波 +69243953 0 --蝶の短剣-エルマ +79571449 0 --天使の施し +70828912 0 --早すぎた埋葬 +42703248 0 --ハリケーン +76375976 0 --魔鍾洞 +34906152 0 --マスドライバー +46411259 0 --突然変異 +85602018 0 --遺言状 +27174286 0 --異次元からの帰還 +05851097 0 --虚無空間 +93016201 0 --王宮の弾圧 +61740673 0 --王宮の勅命 +03280747 0 --第六感 +64697231 0 --ダスト・シュート +80604091 0 --血の代償 +32723153 0 --マジカル・エクスプロージョン +17178486 0 --ライフチェンジャー +28566710 0 --ラストバトル! +#limit +76794549 1 --アストログラフ・マジシャン +40177746 1 --イーバ +53804307 1 --焔征竜-ブラスター +32909498 1 --クシャトリラ・フェンリル +68304193 1 --クシャトリラ・ユニコーン +67441435 1 --グローアップ・バルブ +12289247 1 --クロノグラフ・マジシャン +99937011 1 --剣神官ムドラ +62320425 1 --古衛兵アギド +25926710 1 --古尖兵ケルベク +38814750 1 --PSYフレームギア・γ +74586817 1 --PSYフレームロード・Ω +32731036 1 --深淵の獣ルベリオン +69811710 1 --宵星の騎士ギルス +78872731 1 --十二獣モルモラット +06602300 1 --重爆撃禽 ボム・フェネクス +28985331 1 --終末の騎士 +63542003 1 --宿神像ケルドウ +78080961 1 --SPYRAL-ジーニアス +81275020 1 --SRベイゴマックス +13533678 1 --スプライト・ジェット +76145933 1 --スプライト・ブルー +82385847 1 --ダイナレスラー・パンクラトプス +15291624 1 --超雷龍-サンダー・ドラゴン +00572850 1 --ティアラメンツ・シェイレーン +37961969 1 --ティアラメンツ・ハゥフニス +74078255 1 --ティアラメンツ・メイルゥ +73956664 1 --ティアラメンツ・レイノハート +90953320 1 --TG ハイパー・ライブラリアン +69015963 1 --デビル・フランケン +90448279 1 --天霆號アーゼウス +17266660 1 --朱光の宣告者 +69610326 1 --覇王眷竜ダークヴルム +06637331 1 --深淵の獣ドルイドヴルム +72656408 1 --深淵の獣バルドレイク +33854624 1 --深淵の獣マグナムート +33396948 1 --封印されしエクゾディア +44519536 1 --封印されし者の左足 +07902349 1 --封印されし者の左腕 +08124921 1 --封印されし者の右足 +70903634 1 --封印されし者の右腕 +25725326 1 --プランキッズ・ミュー +35272499 1 --捕食植物オフリス・スコーピオ +24094258 1 --ヘビーメタルフォーゼ・エレクトラム +33508719 1 --メタモルポット +89399912 1 --嵐征竜-テンペスト +92746535 1 --竜剣士ラスターP +77103950 1 --壱世壊=ペルレイノ +33782437 1 --一時休戦 +01845204 1 --簡易融合 +81439173 1 --おろかな埋葬 +23701465 1 --原初の種 +04031928 1 --心変わり +83764718 1 --死者蘇生 +46060017 1 --十二獣の会局 +15443125 1 --スプライト・スターター +52340444 1 --閃刀機-ホーネットビット +32807846 1 --増援 +72892473 1 --手札抹殺 +73628505 1 --テラ・フォーミング +13035077 1 --ドラゴニックD +18144506 1 --ハーピィの羽根帚 +75500286 1 --封印の黄金櫃 +52947044 1 --フュージョン・デステニー +07394770 1 --ブリリアント・フュージョン +28126717 1 --ふわんだりぃずと謎の地図 +73468603 1 --盆回し +93600443 1 --マスク・チェンジ・セカンド +65681983 1 --抹殺の指名者 +71832012 1 --六世壊=パライゾス +36637374 1 --烙印開幕 +44362883 1 --烙印融合 +27970830 1 --六武の門 +02295440 1 --ワン・フォー・ワン +82732705 1 --スキルドレイン +35316708 1 --刻の封印 +21076084 1 --トリックスター・リンカーネイション +23002292 1 --レッド・リブート +#semi limit +25862681 2 --エンシェント・フェアリー・ドラゴン +26889158 2 --転生炎獣ガゼル +74997493 2 --鎖龍蛇-スカルデット +91800273 2 --ディメンション・アトラクター +09411399 2 --D-HERO ディアボリックガイ +18326736 2 --星守の騎士 プトレマイオス +87209160 2 --鉄獣戦線 フラクトール +09047460 2 --BF-隠れ蓑のスチーム +83107873 2 --雷鳥龍-サンダー・ドラゴン +03285551 2 --アラメシアの儀 +66957584 2 --インフェルニティガン +57103969 2 --炎舞-「天璣」 +35726888 2 --おろかな副葬 +67723438 2 --緊急テレポート +84211599 2 --金満で謙虚な壺 +35261759 2 --強欲で貪欲な壺 +12580477 2 --サンダー・ボルト +63166095 2 --閃刀起動-エンゲージ +48130397 2 --超融合 +01984618 2 --天底の使徒 +11110587 2 --隣の芝刈り +35371948 2 --トリックスター・ライトステージ +24224830 2 --墓穴の指名者 +46448938 2 --魔導書の神判 +14532163 2 --ライトニング・ストーム +92107604 2 --神碑の泉 + +!2023.1 +#forbidden +91869203 0 --アマゾネスの射手 +20663556 0 --イレカエル +44910027 0 --ヴィクトリー・ドラゴン +51858306 0 --エクリプス・ワイバーン +53804307 0 --焔征竜-ブラスター +07563579 0 --Emヒグルミ +17330916 0 --EMモンキーボード +34945480 0 --外神アザトート +90411554 0 --巌征竜-レドックス +08903700 0 --儀式魔人リリーサー +11384280 0 --キャノン・ソルジャー +17412721 0 --旧神ノーデン +50588353 0 --水晶機巧-ハリファイバー +67441435 0 --グローアップ・バルブ +34124316 0 --サイバーポッド +02563463 0 --流離のグリフォンライダー +88071625 0 --The tyrant NEPTUNE +61665245 0 --サモン・ソーサレス +52653092 0 --SNo.0 ホープ・ゼアル +48905153 0 --十二獣ドランシア +85115440 0 --十二獣ブルホーン +59537380 0 --守護竜アガーペイン +86148577 0 --守護竜エルピィ +88581108 0 --真竜皇V.F.D. +21377582 0 --真竜剣皇マスターP +94677445 0 --星杯の神子イヴ +16923472 0 --ゼンマイハンター +15341821 0 --ダンディライオン +37818794 0 --超魔導竜騎士-ドラグーン・オブ・レッドアイズ +92731385 0 --ティアラメンツ・キトカロス +79875176 0 --トゥーン・キャノン・ソルジャー +75732622 0 --トーチ・ゴーレム +22593417 0 --トポロジック・ガンブラー・ドラゴン +39064822 0 --トロイメア・ゴブリン +03679218 0 --トロイメア・マーメイド +54719828 0 --No.16 色の支配者ショック・ルーラー +58820923 0 --No.95 ギャラクシーアイズ・ダークマター・ドラゴン +26400609 0 --瀑征竜-タイダル +71525232 0 --破滅竜ガンドラX +78706415 0 --ファイバーポッド +93369354 0 --フィッシュボーグ-ガンナー +23558733 0 --フェニキシアン・クラスター・アマリリス +09929398 0 --BF-朧影のゴウフウ +70369116 0 --捕食植物ヴェルテ・アナコンダ +31178212 0 --マジェスペクター・ユニコーン +63101919 0 --マジックテンペスター +34206604 0 --魔導サイエンティスト +04423206 0 --M.X-セイバー インヴォーカー +14702066 0 --メガキャノン・ソルジャー +96782886 0 --メンタルマスター +90809975 0 --餅カエル +83152482 0 --ユニオン・キャリアー +34086406 0 --ラヴァルバル・チェイン +85243784 0 --リンクロス +73356503 0 --烈風の結界像 +57421866 0 --レベル・スティーラー +41482598 0 --悪夢の蜃気楼 +44763025 0 --いたずら好きな双子悪魔 +17375316 0 --押収 +19613556 0 --大嵐 +74191942 0 --苦渋の選択 +42829885 0 --強引な番兵 +45986603 0 --強奪 +55144522 0 --強欲な壺 +23557835 0 --次元融合 +31423101 0 --神剣-フェニックスブレード +57953380 0 --生還の宝札 +54447022 0 --ソウル・チャージ +60682203 0 --大寒波 +69243953 0 --蝶の短剣-エルマ +79571449 0 --天使の施し +70828912 0 --早すぎた埋葬 +42703248 0 --ハリケーン +76375976 0 --魔鍾洞 +34906152 0 --マスドライバー +46411259 0 --突然変異 +85602018 0 --遺言状 +27174286 0 --異次元からの帰還 +05851097 0 --虚無空間 +93016201 0 --王宮の弾圧 +61740673 0 --王宮の勅命 +03280747 0 --第六感 +64697231 0 --ダスト・シュート +80604091 0 --血の代償 +32723153 0 --マジカル・エクスプロージョン +17178486 0 --ライフチェンジャー +28566710 0 --ラストバトル! +#limit +76794549 1 --アストログラフ・マジシャン +40177746 1 --イーバ +25862681 1 --エンシェント・フェアリー・ドラゴン +32909498 1 --クシャトリラ・フェンリル +68304193 1 --クシャトリラ・ユニコーン +12289247 1 --クロノグラフ・マジシャン +62320425 1 --古衛兵アギド +38814750 1 --PSYフレームギア・γ +74586817 1 --PSYフレームロード・Ω +26889158 1 --転生炎獣ガゼル +74997493 1 --鎖龍蛇-スカルデット +69811710 1 --宵星の騎士ギルス +78872731 1 --十二獣モルモラット +06602300 1 --重爆撃禽 ボム・フェネクス +28985331 1 --終末の騎士 +63542003 1 --宿神像ケルドウ +78080961 1 --SPYRAL-ジーニアス +81275020 1 --SRベイゴマックス +13533678 1 --スプライト・ジェット +82385847 1 --ダイナレスラー・パンクラトプス +15291624 1 --超雷龍-サンダー・ドラゴン +00572850 1 --ティアラメンツ・シェイレーン +73956664 1 --ティアラメンツ・レイノハート +90953320 1 --TG ハイパー・ライブラリアン +69015963 1 --デビル・フランケン +18326736 1 --星守の騎士 プトレマイオス +90448279 1 --天霆號アーゼウス +17266660 1 --朱光の宣告者 +69610326 1 --覇王眷竜ダークヴルム +33854624 1 --深淵の獣マグナムート +33396948 1 --封印されしエクゾディア +44519536 1 --封印されし者の左足 +07902349 1 --封印されし者の左腕 +08124921 1 --封印されし者の右足 +70903634 1 --封印されし者の右腕 +09047460 1 --BF-隠れ蓑のスチーム +25725326 1 --プランキッズ・ミュー +35272499 1 --捕食植物オフリス・スコーピオ +24094258 1 --ヘビーメタルフォーゼ・エレクトラム +33508719 1 --メタモルポット +83107873 1 --雷鳥龍-サンダー・ドラゴン +89399912 1 --嵐征竜-テンペスト +92746535 1 --竜剣士ラスターP +77103950 1 --壱世壊=ペルレイノ +33782437 1 --一時休戦 +01845204 1 --簡易融合 +81439173 1 --おろかな埋葬 +23701465 1 --原初の種 +04031928 1 --心変わり +83764718 1 --死者蘇生 +46060017 1 --十二獣の会局 +15443125 1 --スプライト・スターター +52340444 1 --閃刀機-ホーネットビット +32807846 1 --増援 +72892473 1 --手札抹殺 +73628505 1 --テラ・フォーミング +01984618 1 --天底の使徒 +13035077 1 --ドラゴニックD +18144506 1 --ハーピィの羽根帚 +75500286 1 --封印の黄金櫃 +52947044 1 --フュージョン・デステニー +07394770 1 --ブリリアント・フュージョン +28126717 1 --ふわんだりぃずと謎の地図 +73468603 1 --盆回し +93600443 1 --マスク・チェンジ・セカンド +65681983 1 --抹殺の指名者 +46448938 1 --魔導書の神判 +71832012 1 --六世壊=パライゾス +36637374 1 --烙印開幕 +44362883 1 --烙印融合 +27970830 1 --六武の門 +02295440 1 --ワン・フォー・ワン +35316708 1 --刻の封印 +21076084 1 --トリックスター・リンカーネイション +23002292 1 --レッド・リブート +#semi limit +30741503 2 --オルフェゴール・ガラテア +09126351 2 --鬼ガエル +63288573 2 --閃刀姫-カガリ +37961969 2 --ティアラメンツ・ハゥフニス +91800273 2 --ディメンション・アトラクター +09411399 2 --D-HERO ディアボリックガイ +87209160 2 --鉄獣戦線 フラクトール +03078576 2 --八汰烏 +03285551 2 --アラメシアの儀 +66957584 2 --インフェルニティガン +57103969 2 --炎舞-「天璣」 +35726888 2 --おろかな副葬 +67723438 2 --緊急テレポート +84211599 2 --金満で謙虚な壺 +35261759 2 --強欲で貪欲な壺 +12580477 2 --サンダー・ボルト +63166095 2 --閃刀起動-エンゲージ +48130397 2 --超融合 +11110587 2 --隣の芝刈り +35371948 2 --トリックスター・ライトステージ +31434645 2 --呪われしエルドランド +24224830 2 --墓穴の指名者 +14532163 2 --ライトニング・ストーム + +!2022.10 +#forbidden +91869203 0 --アマゾネスの射手 +20663556 0 --イレカエル +44910027 0 --ヴィクトリー・ドラゴン +51858306 0 --エクリプス・ワイバーン +25862681 0 --エンシェント・フェアリー・ドラゴン +53804307 0 --焔征竜-ブラスター +07563579 0 --Emヒグルミ +17330916 0 --EMモンキーボード +34945480 0 --外神アザトート +90411554 0 --巌征竜-レドックス +08903700 0 --儀式魔人リリーサー +11384280 0 --キャノン・ソルジャー +17412721 0 --旧神ノーデン +50588353 0 --水晶機巧-ハリファイバー +67441435 0 --グローアップ・バルブ +34124316 0 --サイバーポッド +02563463 0 --流離のグリフォンライダー +88071625 0 --The tyrant NEPTUNE +61665245 0 --サモン・ソーサレス +52653092 0 --SNo.0 ホープ・ゼアル +48905153 0 --十二獣ドランシア +85115440 0 --十二獣ブルホーン +59537380 0 --守護竜アガーペイン +86148577 0 --守護竜エルピィ +88581108 0 --真竜皇V.F.D. +21377582 0 --真竜剣皇マスターP +94677445 0 --星杯の神子イヴ +16923472 0 --ゼンマイハンター +15341821 0 --ダンディライオン +37818794 0 --超魔導竜騎士-ドラグーン・オブ・レッドアイズ +18326736 0 --星守の騎士 プトレマイオス +79875176 0 --トゥーン・キャノン・ソルジャー +75732622 0 --トーチ・ゴーレム +22593417 0 --トポロジック・ガンブラー・ドラゴン +39064822 0 --トロイメア・ゴブリン +03679218 0 --トロイメア・マーメイド +54719828 0 --No.16 色の支配者ショック・ルーラー +58820923 0 --No.95 ギャラクシーアイズ・ダークマター・ドラゴン +26400609 0 --瀑征竜-タイダル +71525232 0 --破滅竜ガンドラX +78706415 0 --ファイバーポッド +93369354 0 --フィッシュボーグ-ガンナー +23558733 0 --フェニキシアン・クラスター・アマリリス +09929398 0 --BF-朧影のゴウフウ +09047460 0 --BF-隠れ蓑のスチーム +70369116 0 --捕食植物ヴェルテ・アナコンダ +31178212 0 --マジェスペクター・ユニコーン +63101919 0 --マジックテンペスター +34206604 0 --魔導サイエンティスト +04423206 0 --M.X-セイバー インヴォーカー +14702066 0 --メガキャノン・ソルジャー +96782886 0 --メンタルマスター +90809975 0 --餅カエル +83152482 0 --ユニオン・キャリアー +34086406 0 --ラヴァルバル・チェイン +85243784 0 --リンクロス +57421866 0 --レベル・スティーラー +41482598 0 --悪夢の蜃気楼 +44763025 0 --いたずら好きな双子悪魔 +17375316 0 --押収 +19613556 0 --大嵐 +74191942 0 --苦渋の選択 +42829885 0 --強引な番兵 +45986603 0 --強奪 +55144522 0 --強欲な壺 +04031928 0 --心変わり +23557835 0 --次元融合 +31423101 0 --神剣-フェニックスブレード +57953380 0 --生還の宝札 +54447022 0 --ソウル・チャージ +60682203 0 --大寒波 +69243953 0 --蝶の短剣-エルマ +79571449 0 --天使の施し +70828912 0 --早すぎた埋葬 +42703248 0 --ハリケーン +76375976 0 --魔鍾洞 +34906152 0 --マスドライバー +46411259 0 --突然変異 +85602018 0 --遺言状 +27174286 0 --異次元からの帰還 +05851097 0 --虚無空間 +93016201 0 --王宮の弾圧 +61740673 0 --王宮の勅命 +03280747 0 --第六感 +64697231 0 --ダスト・シュート +80604091 0 --血の代償 +32723153 0 --マジカル・エクスプロージョン +17178486 0 --ライフチェンジャー +28566710 0 --ラストバトル! +#limit +76794549 1 --アストログラフ・マジシャン +40177746 1 --イーバ +30741503 1 --オルフェゴール・ガラテア +09126351 1 --鬼ガエル +12289247 1 --クロノグラフ・マジシャン +62320425 1 --古衛兵アギド +38814750 1 --PSYフレームギア・γ +74586817 1 --PSYフレームロード・Ω +26889158 1 --転生炎獣ガゼル +74997493 1 --鎖龍蛇-スカルデット +69811710 1 --宵星の騎士ギルス +78872731 1 --十二獣モルモラット +06602300 1 --重爆撃禽 ボム・フェネクス +28985331 1 --終末の騎士 +63542003 1 --宿神像ケルドウ +78080961 1 --SPYRAL-ジーニアス +81275020 1 --SRベイゴマックス +13533678 1 --スプライト・ジェット +63288573 1 --閃刀姫-カガリ +82385847 1 --ダイナレスラー・パンクラトプス +15291624 1 --超雷龍-サンダー・ドラゴン +90953320 1 --TG ハイパー・ライブラリアン +69015963 1 --デビル・フランケン +90448279 1 --天霆號アーゼウス +17266660 1 --朱光の宣告者 +69610326 1 --覇王眷竜ダークヴルム +33396948 1 --封印されしエクゾディア +44519536 1 --封印されし者の左足 +07902349 1 --封印されし者の左腕 +08124921 1 --封印されし者の右足 +70903634 1 --封印されし者の右腕 +25725326 1 --プランキッズ・ミュー +35272499 1 --捕食植物オフリス・スコーピオ +24094258 1 --ヘビーメタルフォーゼ・エレクトラム +33508719 1 --メタモルポット +03078576 1 --八汰烏 +83107873 1 --雷鳥龍-サンダー・ドラゴン +89399912 1 --嵐征竜-テンペスト +92746535 1 --竜剣士ラスターP +03285551 1 --アラメシアの儀 +77103950 1 --壱世壊=ペルレイノ +33782437 1 --一時休戦 +01845204 1 --簡易融合 +66957584 1 --インフェルニティガン +81439173 1 --おろかな埋葬 +23701465 1 --原初の種 +83764718 1 --死者蘇生 +46060017 1 --十二獣の会局 +15443125 1 --スプライト・スターター +52340444 1 --閃刀機-ホーネットビット +32807846 1 --増援 +72892473 1 --手札抹殺 +73628505 1 --テラ・フォーミング +01984618 1 --天底の使徒 +13035077 1 --ドラゴニックD +35371948 1 --トリックスター・ライトステージ +18144506 1 --ハーピィの羽根帚 +75500286 1 --封印の黄金櫃 +52947044 1 --フュージョン・デステニー +07394770 1 --ブリリアント・フュージョン +28126717 1 --ふわんだりぃずと謎の地図 +73468603 1 --盆回し +93600443 1 --マスク・チェンジ・セカンド +65681983 1 --抹殺の指名者 +46448938 1 --魔導書の神判 +36637374 1 --烙印開幕 +27970830 1 --六武の門 +02295440 1 --ワン・フォー・ワン +35316708 1 --刻の封印 +21076084 1 --トリックスター・リンカーネイション +23002292 1 --レッド・リブート +#semi limit +01561110 2 --ABC-ドラゴン・バスター +49684352 2 --虹彩の魔術師 +30680659 2 --聖殿の水遣い +37961969 2 --ティアラメンツ・ハゥフニス +91800273 2 --ディメンション・アトラクター +09411399 2 --D-HERO ディアボリックガイ +87209160 2 --鉄獣戦線 フラクトール +25538345 2 --幻影騎士団ティアースケイル +57103969 2 --炎舞-「天璣」 +67723438 2 --緊急テレポート +84211599 2 --金満で謙虚な壺 +35261759 2 --強欲で貪欲な壺 +63166095 2 --閃刀起動-エンゲージ +48130397 2 --超融合 +11110587 2 --隣の芝刈り +31434645 2 --呪われしエルドランド +24224830 2 --墓穴の指名者 +14532163 2 --ライトニング・ストーム +44362883 2 --烙印融合 +20612097 2 --紅き血染めのエルドリクシル + +!2022.7 +#forbidden +91869203 0 --アマゾネスの射手 +20663556 0 --イレカエル +44910027 0 --ヴィクトリー・ドラゴン +51858306 0 --エクリプス・ワイバーン +25862681 0 --エンシェント・フェアリー・ドラゴン +53804307 0 --焔征竜-ブラスター +07563579 0 --Emヒグルミ +17330916 0 --EMモンキーボード +34945480 0 --外神アザトート +90411554 0 --巌征竜-レドックス +08903700 0 --儀式魔人リリーサー +11384280 0 --キャノン・ソルジャー +17412721 0 --旧神ノーデン +50588353 0 --水晶機巧-ハリファイバー +67441435 0 --グローアップ・バルブ +34124316 0 --サイバーポッド +88071625 0 --The tyrant NEPTUNE +61665245 0 --サモン・ソーサレス +52653092 0 --SNo.0 ホープ・ゼアル +48905153 0 --十二獣ドランシア +85115440 0 --十二獣ブルホーン +59537380 0 --守護竜アガーペイン +86148577 0 --守護竜エルピィ +88581108 0 --真竜皇V.F.D. +21377582 0 --真竜剣皇マスターP +94677445 0 --星杯の神子イヴ +16923472 0 --ゼンマイハンター +15341821 0 --ダンディライオン +37818794 0 --超魔導竜騎士-ドラグーン・オブ・レッドアイズ +18326736 0 --星守の騎士 プトレマイオス +79875176 0 --トゥーン・キャノン・ソルジャー +75732622 0 --トーチ・ゴーレム +22593417 0 --トポロジック・ガンブラー・ドラゴン +39064822 0 --トロイメア・ゴブリン +03679218 0 --トロイメア・マーメイド +54719828 0 --No.16 色の支配者ショック・ルーラー +58820923 0 --No.95 ギャラクシーアイズ・ダークマター・ドラゴン +26400609 0 --瀑征竜-タイダル +71525232 0 --破滅竜ガンドラX +78706415 0 --ファイバーポッド +93369354 0 --フィッシュボーグ-ガンナー +23558733 0 --フェニキシアン・クラスター・アマリリス +09929398 0 --BF-朧影のゴウフウ +09047460 0 --BF-隠れ蓑のスチーム +70369116 0 --捕食植物ヴェルテ・アナコンダ +31178212 0 --マジェスペクター・ユニコーン +63101919 0 --マジックテンペスター +34206604 0 --魔導サイエンティスト +04423206 0 --M.X-セイバー インヴォーカー +14702066 0 --メガキャノン・ソルジャー +96782886 0 --メンタルマスター +90809975 0 --餅カエル +03078576 0 --八汰烏 +34086406 0 --ラヴァルバル・チェイン +85243784 0 --リンクロス +57421866 0 --レベル・スティーラー +41482598 0 --悪夢の蜃気楼 +44763025 0 --いたずら好きな双子悪魔 +17375316 0 --押収 +19613556 0 --大嵐 +74191942 0 --苦渋の選択 +42829885 0 --強引な番兵 +45986603 0 --強奪 +55144522 0 --強欲な壺 +04031928 0 --心変わり +23557835 0 --次元融合 +31423101 0 --神剣-フェニックスブレード +57953380 0 --生還の宝札 +54447022 0 --ソウル・チャージ +60682203 0 --大寒波 +69243953 0 --蝶の短剣-エルマ +79571449 0 --天使の施し +70828912 0 --早すぎた埋葬 +42703248 0 --ハリケーン +76375976 0 --魔鍾洞 +34906152 0 --マスドライバー +46411259 0 --突然変異 +85602018 0 --遺言状 +27174286 0 --異次元からの帰還 +05851097 0 --虚無空間 +93016201 0 --王宮の弾圧 +61740673 0 --王宮の勅命 +03280747 0 --第六感 +64697231 0 --ダスト・シュート +80604091 0 --血の代償 +35316708 0 --刻の封印 +32723153 0 --マジカル・エクスプロージョン +17178486 0 --ライフチェンジャー +28566710 0 --ラストバトル! +#limit +76794549 1 --アストログラフ・マジシャン +40177746 1 --イーバ +01561110 1 --ABC-ドラゴン・バスター +30741503 1 --オルフェゴール・ガラテア +12289247 1 --クロノグラフ・マジシャン +49684352 1 --虹彩の魔術師 +38814750 1 --PSYフレームギア・γ +74586817 1 --PSYフレームロード・Ω +26889158 1 --転生炎獣ガゼル +74997493 1 --鎖龍蛇-スカルデット +69811710 1 --宵星の騎士ギルス +78872731 1 --十二獣モルモラット +06602300 1 --重爆撃禽 ボム・フェネクス +28985331 1 --終末の騎士 +78080961 1 --SPYRAL-ジーニアス +81275020 1 --SRベイゴマックス +30680659 1 --聖殿の水遣い +63288573 1 --閃刀姫-カガリ +82385847 1 --ダイナレスラー・パンクラトプス +15291624 1 --超雷龍-サンダー・ドラゴン +90953320 1 --TG ハイパー・ライブラリアン +69015963 1 --デビル・フランケン +90448279 1 --天霆號アーゼウス +69610326 1 --覇王眷竜ダークヴルム +25538345 1 --幻影騎士団ティアースケイル +33396948 1 --封印されしエクゾディア +44519536 1 --封印されし者の左足 +07902349 1 --封印されし者の左腕 +08124921 1 --封印されし者の右足 +70903634 1 --封印されし者の右腕 +25725326 1 --プランキッズ・ミュー +35272499 1 --捕食植物オフリス・スコーピオ +24094258 1 --ヘビーメタルフォーゼ・エレクトラム +33508719 1 --メタモルポット +83107873 1 --雷鳥龍-サンダー・ドラゴン +89399912 1 --嵐征竜-テンペスト +92746535 1 --竜剣士ラスターP +03285551 1 --アラメシアの儀 +33782437 1 --一時休戦 +01845204 1 --簡易融合 +66957584 1 --インフェルニティガン +81439173 1 --おろかな埋葬 +23701465 1 --原初の種 +83764718 1 --死者蘇生 +46060017 1 --十二獣の会局 +52340444 1 --閃刀機-ホーネットビット +32807846 1 --増援 +72892473 1 --手札抹殺 +73628505 1 --テラ・フォーミング +01984618 1 --天底の使徒 +13035077 1 --ドラゴニックD +35371948 1 --トリックスター・ライトステージ +18144506 1 --ハーピィの羽根帚 +75500286 1 --封印の黄金櫃 +52947044 1 --フュージョン・デステニー +07394770 1 --ブリリアント・フュージョン +73468603 1 --盆回し +93600443 1 --マスク・チェンジ・セカンド +65681983 1 --抹殺の指名者 +46448938 1 --魔導書の神判 +36637374 1 --烙印開幕 +27970830 1 --六武の門 +02295440 1 --ワン・フォー・ワン +21076084 1 --トリックスター・リンカーネイション +23002292 1 --レッド・リブート +#semi limit +64034255 2 --A・ジェネクス・バードマン +09411399 2 --D-HERO ディアボリックガイ +87209160 2 --鉄獣戦線 フラクトール +43694650 2 --未界域のジャッカロープ +57103969 2 --炎舞-「天璣」 +67723438 2 --緊急テレポート +84211599 2 --金満で謙虚な壺 +35261759 2 --強欲で貪欲な壺 +54631665 2 --SPYRAL RESORT +98338152 2 --閃刀機-ウィドウアンカー +63166095 2 --閃刀起動-エンゲージ +48130397 2 --超融合 +11110587 2 --隣の芝刈り +31434645 2 --呪われしエルドランド +24224830 2 --墓穴の指名者 +28126717 2 --ふわんだりぃずと謎の地図 +47679935 2 --暴走魔法陣 +44362883 2 --烙印融合 +20612097 2 --紅き血染めのエルドリクシル + +!2022.4 +#forbidden +91869203 0 --アマゾネスの射手 +20663556 0 --イレカエル +44910027 0 --ヴィクトリー・ドラゴン +51858306 0 --エクリプス・ワイバーン +25862681 0 --エンシェント・フェアリー・ドラゴン +53804307 0 --焔征竜-ブラスター +07563579 0 --Emヒグルミ +17330916 0 --EMモンキーボード +34945480 0 --外神アザトート +90411554 0 --巌征竜-レドックス +08903700 0 --儀式魔人リリーサー +11384280 0 --キャノン・ソルジャー +17412721 0 --旧神ノーデン +67441435 0 --グローアップ・バルブ +34124316 0 --サイバーポッド +88071625 0 --The tyrant NEPTUNE +61665245 0 --サモン・ソーサレス +52653092 0 --SNo.0 ホープ・ゼアル +48905153 0 --十二獣ドランシア +85115440 0 --十二獣ブルホーン +59537380 0 --守護竜アガーペイン +86148577 0 --守護竜エルピィ +88581108 0 --真竜皇V.F.D. +21377582 0 --真竜剣皇マスターP +94677445 0 --星杯の神子イヴ +16923472 0 --ゼンマイハンター +15341821 0 --ダンディライオン +37818794 0 --超魔導竜騎士-ドラグーン・オブ・レッドアイズ +18326736 0 --星守の騎士 プトレマイオス +79875176 0 --トゥーン・キャノン・ソルジャー +75732622 0 --トーチ・ゴーレム +22593417 0 --トポロジック・ガンブラー・ドラゴン +39064822 0 --トロイメア・ゴブリン +03679218 0 --トロイメア・マーメイド +54719828 0 --No.16 色の支配者ショック・ルーラー +58820923 0 --No.95 ギャラクシーアイズ・ダークマター・ドラゴン +26400609 0 --瀑征竜-タイダル +71525232 0 --破滅竜ガンドラX +78706415 0 --ファイバーポッド +93369354 0 --フィッシュボーグ-ガンナー +23558733 0 --フェニキシアン・クラスター・アマリリス +09929398 0 --BF-朧影のゴウフウ +09047460 0 --BF-隠れ蓑のスチーム +70369116 0 --捕食植物ヴェルテ・アナコンダ +31178212 0 --マジェスペクター・ユニコーン +63101919 0 --マジックテンペスター +34206604 0 --魔導サイエンティスト +04423206 0 --M.X-セイバー インヴォーカー +14702066 0 --メガキャノン・ソルジャー +96782886 0 --メンタルマスター +03078576 0 --八汰烏 +34086406 0 --ラヴァルバル・チェイン +85243784 0 --リンクロス +57421866 0 --レベル・スティーラー +41482598 0 --悪夢の蜃気楼 +44763025 0 --いたずら好きな双子悪魔 +17375316 0 --押収 +19613556 0 --大嵐 +74191942 0 --苦渋の選択 +42829885 0 --強引な番兵 +45986603 0 --強奪 +55144522 0 --強欲な壺 +04031928 0 --心変わり +23557835 0 --次元融合 +31423101 0 --神剣-フェニックスブレード +57953380 0 --生還の宝札 +54447022 0 --ソウル・チャージ +60682203 0 --大寒波 +69243953 0 --蝶の短剣-エルマ +79571449 0 --天使の施し +70828912 0 --早すぎた埋葬 +42703248 0 --ハリケーン +76375976 0 --魔鍾洞 +34906152 0 --マスドライバー +46448938 0 --魔導書の神判 +46411259 0 --突然変異 +85602018 0 --遺言状 +27174286 0 --異次元からの帰還 +61740673 0 --王宮の勅命 +93016201 0 --王宮の弾圧 +03280747 0 --第六感 +64697231 0 --ダスト・シュート +80604091 0 --血の代償 +35316708 0 --刻の封印 +32723153 0 --マジカル・エクスプロージョン +17178486 0 --ライフチェンジャー +28566710 0 --ラストバトル! +#limit +64034255 1 --A・ジェネクス・バードマン +76794549 1 --アストログラフ・マジシャン +01561110 1 --ABC-ドラゴン・バスター +30741503 1 --オルフェゴール・ガラテア +50588353 1 --水晶機巧-ハリファイバー +12289247 1 --クロノグラフ・マジシャン +49684352 1 --虹彩の魔術師 +38814750 1 --PSYフレームギア・γ +74586817 1 --PSYフレームロード・Ω +26889158 1 --転生炎獣ガゼル +74997493 1 --鎖龍蛇-スカルデット +69811710 1 --宵星の騎士ギルス +78872731 1 --十二獣モルモラット +06602300 1 --重爆撃禽 ボム・フェネクス +28985331 1 --終末の騎士 +78080961 1 --SPYRAL-ジーニアス +81275020 1 --SRベイゴマックス +30680659 1 --聖殿の水遣い +63288573 1 --閃刀姫-カガリ +82385847 1 --ダイナレスラー・パンクラトプス +15291624 1 --超雷龍-サンダー・ドラゴン +90953320 1 --TG ハイパー・ライブラリアン +69015963 1 --デビル・フランケン +90448279 1 --天霆號アーゼウス +69610326 1 --覇王眷竜ダークヴルム +25538345 1 --幻影騎士団ティアースケイル +33396948 1 --封印されしエクゾディア +44519536 1 --封印されし者の左足 +07902349 1 --封印されし者の左腕 +08124921 1 --封印されし者の右足 +70903634 1 --封印されし者の右腕 +25725326 1 --プランキッズ・ミュー +35272499 1 --捕食植物オフリス・スコーピオ +24094258 1 --ヘビーメタルフォーゼ・エレクトラム +33508719 1 --メタモルポット +90809975 1 --餅カエル +83107873 1 --雷鳥龍-サンダー・ドラゴン +89399912 1 --嵐征竜-テンペスト +92746535 1 --竜剣士ラスターP +03285551 1 --アラメシアの儀 +33782437 1 --一時休戦 +01845204 1 --簡易融合 +66957584 1 --インフェルニティガン +81439173 1 --おろかな埋葬 +23701465 1 --原初の種 +83764718 1 --死者蘇生 +46060017 1 --十二獣の会局 +52340444 1 --閃刀機-ホーネットビット +32807846 1 --増援 +72892473 1 --手札抹殺 +73628505 1 --テラ・フォーミング +01984618 1 --天底の使徒 +13035077 1 --ドラゴニックD +35371948 1 --トリックスター・ライトステージ +18144506 1 --ハーピィの羽根帚 +75500286 1 --封印の黄金櫃 +52947044 1 --フュージョン・デステニー +07394770 1 --ブリリアント・フュージョン +73468603 1 --盆回し +93600443 1 --マスク・チェンジ・セカンド +65681983 1 --抹殺の指名者 +27970830 1 --六武の門 +02295440 1 --ワン・フォー・ワン +05851097 1 --虚無空間 +21076084 1 --トリックスター・リンカーネイション +23002292 1 --レッド・リブート +#semi limit +57835716 2 --オルフェゴール・ディヴェル +81122844 2 --発条空母ゼンマイティ +73941492 2 --調弦の魔術師 +09411399 2 --D-HERO ディアボリックガイ +87209160 2 --鉄獣戦線 フラクトール +16226786 2 --深淵の暗殺者 +52687916 2 --氷結界の龍 トリシューラ +43694650 2 --未界域のジャッカロープ +29596581 2 --雷獣龍-サンダー・ドラゴン +48686504 2 --ローンファイア・ブロッサム +73680966 2 --終わりの始まり +57103969 2 --炎舞-「天璣」 +67723438 2 --緊急テレポート +84211599 2 --金満で謙虚な壺 +12580477 2 --サンダー・ボルト +35261759 2 --強欲で貪欲な壺 +54631665 2 --SPYRAL RESORT +98338152 2 --閃刀機-ウィドウアンカー +63166095 2 --閃刀起動-エンゲージ +48130397 2 --超融合 +11110587 2 --隣の芝刈り +31434645 2 --呪われしエルドランド +24224830 2 --墓穴の指名者 +15854426 2 --霞の谷の神風 +47679935 2 --暴走魔法陣 +56465981 2 --龍相剣現 +36637374 2 --烙印開幕 +20612097 2 --紅き血染めのエルドリクシル + +!2022.1 +#forbidden +91869203 0 --アマゾネスの射手 +20663556 0 --イレカエル +44910027 0 --ヴィクトリー・ドラゴン +51858306 0 --エクリプス・ワイバーン +25862681 0 --エンシェント・フェアリー・ドラゴン +53804307 0 --焔征竜-ブラスター +07563579 0 --Emヒグルミ +17330916 0 --EMモンキーボード +34945480 0 --外神アザトート +90411554 0 --巌征竜-レドックス +08903700 0 --儀式魔人リリーサー +11384280 0 --キャノン・ソルジャー +17412721 0 --旧神ノーデン +67441435 0 --グローアップ・バルブ +34124316 0 --サイバーポッド +88071625 0 --The tyrant NEPTUNE +61665245 0 --サモン・ソーサレス +52653092 0 --SNo.0 ホープ・ゼアル +48905153 0 --十二獣ドランシア +85115440 0 --十二獣ブルホーン +59537380 0 --守護竜アガーペイン +86148577 0 --守護竜エルピィ +88581108 0 --真竜皇V.F.D. +21377582 0 --真竜剣皇マスターP +94677445 0 --星杯の神子イヴ +16923472 0 --ゼンマイハンター +15341821 0 --ダンディライオン +37818794 0 --超魔導竜騎士-ドラグーン・オブ・レッドアイズ +18326736 0 --星守の騎士 プトレマイオス +79875176 0 --トゥーン・キャノン・ソルジャー +75732622 0 --トーチ・ゴーレム +22593417 0 --トポロジック・ガンブラー・ドラゴン +39064822 0 --トロイメア・ゴブリン +03679218 0 --トロイメア・マーメイド +54719828 0 --No.16 色の支配者ショック・ルーラー +58820923 0 --No.95 ギャラクシーアイズ・ダークマター・ドラゴン +26400609 0 --瀑征竜-タイダル +71525232 0 --破滅竜ガンドラX +78706415 0 --ファイバーポッド +93369354 0 --フィッシュボーグ-ガンナー +23558733 0 --フェニキシアン・クラスター・アマリリス +09929398 0 --BF-朧影のゴウフウ +09047460 0 --BF-隠れ蓑のスチーム +31178212 0 --マジェスペクター・ユニコーン +63101919 0 --マジックテンペスター +34206604 0 --魔導サイエンティスト +04423206 0 --M.X-セイバー インヴォーカー +14702066 0 --メガキャノン・ソルジャー +96782886 0 --メンタルマスター +03078576 0 --八汰烏 +34086406 0 --ラヴァルバル・チェイン +85243784 0 --リンクロス +57421866 0 --レベル・スティーラー +41482598 0 --悪夢の蜃気楼 +44763025 0 --いたずら好きな双子悪魔 +17375316 0 --押収 +19613556 0 --大嵐 +74191942 0 --苦渋の選択 +42829885 0 --強引な番兵 +45986603 0 --強奪 +55144522 0 --強欲な壺 +04031928 0 --心変わり +23557835 0 --次元融合 +31423101 0 --神剣-フェニックスブレード +57953380 0 --生還の宝札 +54447022 0 --ソウル・チャージ +60682203 0 --大寒波 +69243953 0 --蝶の短剣-エルマ +79571449 0 --天使の施し +70828912 0 --早すぎた埋葬 +42703248 0 --ハリケーン +52947044 0 --フュージョン・デステニー +76375976 0 --魔鍾洞 +34906152 0 --マスドライバー +46448938 0 --魔導書の神判 +46411259 0 --突然変異 +85602018 0 --遺言状 +27174286 0 --異次元からの帰還 +93016201 0 --王宮の弾圧 +03280747 0 --第六感 +64697231 0 --ダスト・シュート +80604091 0 --血の代償 +35316708 0 --刻の封印 +32723153 0 --マジカル・エクスプロージョン +17178486 0 --ライフチェンジャー +28566710 0 --ラストバトル! +#limit +64034255 1 --A・ジェネクス・バードマン +76794549 1 --アストログラフ・マジシャン +01561110 1 --ABC-ドラゴン・バスター +30741503 1 --オルフェゴール・ガラテア +57835716 1 --オルフェゴール・ディヴェル +50588353 1 --水晶機巧-ハリファイバー +12289247 1 --クロノグラフ・マジシャン +49684352 1 --虹彩の魔術師 +38814750 1 --PSYフレームギア・γ +74586817 1 --PSYフレームロード・Ω +26889158 1 --転生炎獣ガゼル +74997493 1 --鎖龍蛇-スカルデット +69811710 1 --宵星の騎士ギルス +78872731 1 --十二獣モルモラット +06602300 1 --重爆撃禽 ボム・フェネクス +28985331 1 --終末の騎士 +78080961 1 --SPYRAL-ジーニアス +81275020 1 --SRベイゴマックス +63288573 1 --閃刀姫-カガリ +81122844 1 --発条空母ゼンマイティ +82385847 1 --ダイナレスラー・パンクラトプス +73941492 1 --調弦の魔術師 +15291624 1 --超雷龍-サンダー・ドラゴン +90953320 1 --TG ハイパー・ライブラリアン +69015963 1 --デビル・フランケン +16226786 1 --深淵の暗殺者 +90448279 1 --天霆號アーゼウス +69610326 1 --覇王眷竜ダークヴルム +52687916 1 --氷結界の龍 トリシューラ +25538345 1 --幻影騎士団ティアースケイル +33396948 1 --封印されしエクゾディア +44519536 1 --封印されし者の左足 +07902349 1 --封印されし者の左腕 +08124921 1 --封印されし者の右足 +70903634 1 --封印されし者の右腕 +25725326 1 --プランキッズ・ミュー +70369116 1 --捕食植物ヴェルテ・アナコンダ +35272499 1 --捕食植物オフリス・スコーピオ +24094258 1 --ヘビーメタルフォーゼ・エレクトラム +33508719 1 --メタモルポット +90809975 1 --餅カエル +83107873 1 --雷鳥龍-サンダー・ドラゴン +89399912 1 --嵐征竜-テンペスト +92746535 1 --竜剣士ラスターP +33782437 1 --一時休戦 +01845204 1 --簡易融合 +66957584 1 --インフェルニティガン +81439173 1 --おろかな埋葬 +73680966 1 --終わりの始まり +23701465 1 --原初の種 +12580477 1 --サンダー・ボルト +83764718 1 --死者蘇生 +46060017 1 --十二獣の会局 +52340444 1 --閃刀機-ホーネットビット +32807846 1 --増援 +72892473 1 --手札抹殺 +73628505 1 --テラ・フォーミング +01984618 1 --天底の使徒 +13035077 1 --ドラゴニックD +35371948 1 --トリックスター・ライトステージ +18144506 1 --ハーピィの羽根帚 +75500286 1 --封印の黄金櫃 +07394770 1 --ブリリアント・フュージョン +73468603 1 --盆回し +93600443 1 --マスク・チェンジ・セカンド +65681983 1 --抹殺の指名者 +15854426 1 --霞の谷の神風 +27970830 1 --六武の門 +02295440 1 --ワン・フォー・ワン +05851097 1 --虚無空間 +61740673 1 --王宮の勅命 +21076084 1 --トリックスター・リンカーネイション +23002292 1 --レッド・リブート +#semi limit +42790071 2 --オルターガイスト・マルチフェイカー +30680659 2 --聖殿の水遣い +09411399 2 --D-HERO ディアボリックガイ +43694650 2 --未界域のジャッカロープ +29596581 2 --雷獣龍-サンダー・ドラゴン +48686504 2 --ローンファイア・ブロッサム +03285551 2 --アラメシアの儀 +57103969 2 --炎舞-「天璣」 +84731222 2 --希望の記憶 +67723438 2 --緊急テレポート +35261759 2 --強欲で貪欲な壺 +54631665 2 --SPYRAL RESORT +98338152 2 --閃刀機-ウィドウアンカー +63166095 2 --閃刀起動-エンゲージ +48130397 2 --超融合 +11110587 2 --隣の芝刈り +31434645 2 --呪われしエルドランド +24224830 2 --墓穴の指名者 +08949584 2 --ヒーローアライブ +47679935 2 --暴走魔法陣 +56465981 2 --龍相剣現 +89208725 2 --メタバース + +!2021.10 +#forbidden +91869203 0 --アマゾネスの射手 +20663556 0 --イレカエル +44910027 0 --ヴィクトリー・ドラゴン +51858306 0 --エクリプス・ワイバーン +25862681 0 --エンシェント・フェアリー・ドラゴン +53804307 0 --焔征竜-ブラスター +07563579 0 --Emヒグルミ +17330916 0 --EMモンキーボード +34945480 0 --外神アザトート +90411554 0 --巌征竜-レドックス +08903700 0 --儀式魔人リリーサー +11384280 0 --キャノン・ソルジャー +17412721 0 --旧神ノーデン +67441435 0 --グローアップ・バルブ +34124316 0 --サイバーポッド +88071625 0 --The tyrant NEPTUNE +61665245 0 --サモン・ソーサレス +52653092 0 --SNo.0 ホープ・ゼアル +48905153 0 --十二獣ドランシア +85115440 0 --十二獣ブルホーン +59537380 0 --守護竜アガーペイン +86148577 0 --守護竜エルピィ +88581108 0 --真竜皇V.F.D. +21377582 0 --真竜剣皇マスターP +94677445 0 --星杯の神子イヴ +16923472 0 --ゼンマイハンター +15341821 0 --ダンディライオン +37818794 0 --超魔導竜騎士-ドラグーン・オブ・レッドアイズ +18326736 0 --星守の騎士 プトレマイオス +79875176 0 --トゥーン・キャノン・ソルジャー +75732622 0 --トーチ・ゴーレム +22593417 0 --トポロジック・ガンブラー・ドラゴン +39064822 0 --トロイメア・ゴブリン +03679218 0 --トロイメア・マーメイド +54719828 0 --No.16 色の支配者ショック・ルーラー +58820923 0 --No.95 ギャラクシーアイズ・ダークマター・ドラゴン +26400609 0 --瀑征竜-タイダル +71525232 0 --破滅竜ガンドラX +78706415 0 --ファイバーポッド +93369354 0 --フィッシュボーグ-ガンナー +23558733 0 --フェニキシアン・クラスター・アマリリス +09929398 0 --BF-朧影のゴウフウ +09047460 0 --BF-隠れ蓑のスチーム +31178212 0 --マジェスペクター・ユニコーン +63101919 0 --マジックテンペスター +34206604 0 --魔導サイエンティスト +04423206 0 --M.X-セイバー インヴォーカー +14702066 0 --メガキャノン・ソルジャー +96782886 0 --メンタルマスター +03078576 0 --八汰烏 +34086406 0 --ラヴァルバル・チェイン +85243784 0 --リンクロス +57421866 0 --レベル・スティーラー +41482598 0 --悪夢の蜃気楼 +44763025 0 --いたずら好きな双子悪魔 +17375316 0 --押収 +19613556 0 --大嵐 +74191942 0 --苦渋の選択 +42829885 0 --強引な番兵 +45986603 0 --強奪 +55144522 0 --強欲な壺 +04031928 0 --心変わり +23557835 0 --次元融合 +31423101 0 --神剣-フェニックスブレード +57953380 0 --生還の宝札 +54447022 0 --ソウル・チャージ +60682203 0 --大寒波 +69243953 0 --蝶の短剣-エルマ +79571449 0 --天使の施し +70828912 0 --早すぎた埋葬 +42703248 0 --ハリケーン +76375976 0 --魔鍾洞 +34906152 0 --マスドライバー +46448938 0 --魔導書の神判 +46411259 0 --突然変異 +85602018 0 --遺言状 +27174286 0 --異次元からの帰還 +93016201 0 --王宮の弾圧 +03280747 0 --第六感 +64697231 0 --ダスト・シュート +80604091 0 --血の代償 +35316708 0 --刻の封印 +32723153 0 --マジカル・エクスプロージョン +17178486 0 --ライフチェンジャー +28566710 0 --ラストバトル! +#limit +64034255 1 --A・ジェネクス・バードマン +76794549 1 --アストログラフ・マジシャン +01561110 1 --ABC-ドラゴン・バスター +42790071 1 --オルターガイスト・マルチフェイカー +30741503 1 --オルフェゴール・ガラテア +57835716 1 --オルフェゴール・ディヴェル +50588353 1 --水晶機巧-ハリファイバー +12289247 1 --クロノグラフ・マジシャン +49684352 1 --虹彩の魔術師 +38814750 1 --PSYフレームギア・γ +74586817 1 --PSYフレームロード・Ω +26889158 1 --転生炎獣ガゼル +74997493 1 --鎖龍蛇-スカルデット +69811710 1 --宵星の騎士ギルス +78872731 1 --十二獣モルモラット +06602300 1 --重爆撃禽 ボム・フェネクス +28985331 1 --終末の騎士 +78080961 1 --SPYRAL-ジーニアス +81275020 1 --SRベイゴマックス +63288573 1 --閃刀姫-カガリ +81122844 1 --発条空母ゼンマイティ +82385847 1 --ダイナレスラー・パンクラトプス +73941492 1 --調弦の魔術師 +15291624 1 --超雷龍-サンダー・ドラゴン +90953320 1 --TG ハイパー・ライブラリアン +69015963 1 --デビル・フランケン +16226786 1 --深淵の暗殺者 +90448279 1 --天霆號アーゼウス +69610326 1 --覇王眷竜ダークヴルム +52687916 1 --氷結界の龍 トリシューラ +33396948 1 --封印されしエクゾディア +44519536 1 --封印されし者の左足 +07902349 1 --封印されし者の左腕 +08124921 1 --封印されし者の右足 +70903634 1 --封印されし者の右腕 +70369116 1 --捕食植物ヴェルテ・アナコンダ +35272499 1 --捕食植物オフリス・スコーピオ +24094258 1 --ヘビーメタルフォーゼ・エレクトラム +33508719 1 --メタモルポット +90809975 1 --餅カエル +83107873 1 --雷鳥龍-サンダー・ドラゴン +89399912 1 --嵐征竜-テンペスト +92746535 1 --竜剣士ラスターP +33782437 1 --一時休戦 +01845204 1 --簡易融合 +66957584 1 --インフェルニティガン +81439173 1 --おろかな埋葬 +73680966 1 --終わりの始まり +23701465 1 --原初の種 +12580477 1 --サンダー・ボルト +83764718 1 --死者蘇生 +46060017 1 --十二獣の会局 +52340444 1 --閃刀機-ホーネットビット +32807846 1 --増援 +72892473 1 --手札抹殺 +73628505 1 --テラ・フォーミング +01984618 1 --天底の使徒 +13035077 1 --ドラゴニックD +35371948 1 --トリックスター・ライトステージ +18144506 1 --ハーピィの羽根帚 +75500286 1 --封印の黄金櫃 +07394770 1 --ブリリアント・フュージョン +73468603 1 --盆回し +93600443 1 --マスク・チェンジ・セカンド +15854426 1 --霞の谷の神風 +27970830 1 --六武の門 +02295440 1 --ワン・フォー・ワン +05851097 1 --虚無空間 +61740673 1 --王宮の勅命 +21076084 1 --トリックスター・リンカーネイション +89208725 1 --メタバース +23002292 1 --レッド・リブート +#semi limit +40318957 2 --EMドクロバット・ジョーカー +44335251 2 --魂喰いオヴィラプター +09411399 2 --D-HERO ディアボリックガイ +43694650 2 --未界域のジャッカロープ +29596581 2 --雷獣龍-サンダー・ドラゴン +88264978 2 --レッドアイズ・ダークネスメタルドラゴン +48686504 2 --ローンファイア・ブロッサム +57103969 2 --炎舞-「天璣」 +84731222 2 --希望の記憶 +67723438 2 --緊急テレポート +35261759 2 --強欲で貪欲な壺 +73915051 2 --スケープ・ゴート +54631665 2 --SPYRAL RESORT +98338152 2 --閃刀機-ウィドウアンカー +63166095 2 --閃刀起動-エンゲージ +48130397 2 --超融合 +11110587 2 --隣の芝刈り +31434645 2 --呪われしエルドランド +24224830 2 --墓穴の指名者 +08949584 2 --ヒーローアライブ +47679935 2 --暴走魔法陣 +65681983 2 --抹殺の指名者 + +!2021.7 +#forbidden +91869203 0 --アマゾネスの射手 +20663556 0 --イレカエル +44910027 0 --ヴィクトリー・ドラゴン +51858306 0 --エクリプス・ワイバーン +25862681 0 --エンシェント・フェアリー・ドラゴン +53804307 0 --焔征竜-ブラスター +07563579 0 --Emヒグルミ +17330916 0 --EMモンキーボード +34945480 0 --外神アザトート +90411554 0 --巌征竜-レドックス +08903700 0 --儀式魔人リリーサー +11384280 0 --キャノン・ソルジャー +17412721 0 --旧神ノーデン +67441435 0 --グローアップ・バルブ +34124316 0 --サイバーポッド +88071625 0 --The tyrant NEPTUNE +61665245 0 --サモン・ソーサレス +52653092 0 --SNo.0 ホープ・ゼアル +48905153 0 --十二獣ドランシア +85115440 0 --十二獣ブルホーン +59537380 0 --守護竜アガーペイン +86148577 0 --守護竜エルピィ +21377582 0 --真竜剣皇マスターP +94677445 0 --星杯の神子イヴ +16923472 0 --ゼンマイハンター +15341821 0 --ダンディライオン +37818794 0 --超魔導竜騎士-ドラグーン・オブ・レッドアイズ +18326736 0 --星守の騎士 プトレマイオス +79875176 0 --トゥーン・キャノン・ソルジャー +75732622 0 --トーチ・ゴーレム +22593417 0 --トポロジック・ガンブラー・ドラゴン +39064822 0 --トロイメア・ゴブリン +03679218 0 --トロイメア・マーメイド +54719828 0 --No.16 色の支配者ショック・ルーラー +58820923 0 --No.95 ギャラクシーアイズ・ダークマター・ドラゴン +26400609 0 --瀑征竜-タイダル +71525232 0 --破滅竜ガンドラX +78706415 0 --ファイバーポッド +93369354 0 --フィッシュボーグ-ガンナー +23558733 0 --フェニキシアン・クラスター・アマリリス +09929398 0 --BF-朧影のゴウフウ +09047460 0 --BF-隠れ蓑のスチーム +31178212 0 --マジェスペクター・ユニコーン +63101919 0 --マジックテンペスター +34206604 0 --魔導サイエンティスト +04423206 0 --M.X-セイバー インヴォーカー +14702066 0 --メガキャノン・ソルジャー +96782886 0 --メンタルマスター +03078576 0 --八汰烏 +34086406 0 --ラヴァルバル・チェイン +85243784 0 --リンクロス +57421866 0 --レベル・スティーラー +41482598 0 --悪夢の蜃気楼 +44763025 0 --いたずら好きな双子悪魔 +17375316 0 --押収 +19613556 0 --大嵐 +74191942 0 --苦渋の選択 +42829885 0 --強引な番兵 +45986603 0 --強奪 +55144522 0 --強欲な壺 +04031928 0 --心変わり +23557835 0 --次元融合 +31423101 0 --神剣-フェニックスブレード +57953380 0 --生還の宝札 +54447022 0 --ソウル・チャージ +60682203 0 --大寒波 +69243953 0 --蝶の短剣-エルマ +79571449 0 --天使の施し +70828912 0 --早すぎた埋葬 +42703248 0 --ハリケーン +34906152 0 --マスドライバー +46448938 0 --魔導書の神判 +46411259 0 --突然変異 +85602018 0 --遺言状 +27174286 0 --異次元からの帰還 +93016201 0 --王宮の弾圧 +03280747 0 --第六感 +64697231 0 --ダスト・シュート +80604091 0 --血の代償 +35316708 0 --刻の封印 +32723153 0 --マジカル・エクスプロージョン +17178486 0 --ライフチェンジャー +28566710 0 --ラストバトル! +#limit +64034255 1 --A・ジェネクス・バードマン +76794549 1 --アストログラフ・マジシャン +01561110 1 --ABC-ドラゴン・バスター +42790071 1 --オルターガイスト・マルチフェイカー +30741503 1 --オルフェゴール・ガラテア +57835716 1 --オルフェゴール・ディヴェル +50588353 1 --水晶機巧-ハリファイバー +12289247 1 --クロノグラフ・マジシャン +49684352 1 --虹彩の魔術師 +74586817 1 --PSYフレームロード・Ω +26889158 1 --転生炎獣ガゼル +74997493 1 --鎖龍蛇-スカルデット +69811710 1 --宵星の騎士ギルス +78872731 1 --十二獣モルモラット +06602300 1 --重爆撃禽 ボム・フェネクス +28985331 1 --終末の騎士 +88581108 1 --真竜皇V.F.D. +78080961 1 --SPYRAL-ジーニアス +81275020 1 --SRベイゴマックス +63288573 1 --閃刀姫-カガリ +81122844 1 --発条空母ゼンマイティ +82385847 1 --ダイナレスラー・パンクラトプス +44335251 1 --魂喰いオヴィラプター +73941492 1 --調弦の魔術師 +15291624 1 --超雷龍-サンダー・ドラゴン +90953320 1 --TG ハイパー・ライブラリアン +69015963 1 --デビル・フランケン +16226786 1 --深淵の暗殺者 +69610326 1 --覇王眷竜ダークヴルム +52687916 1 --氷結界の龍 トリシューラ +33396948 1 --封印されしエクゾディア +44519536 1 --封印されし者の左足 +07902349 1 --封印されし者の左腕 +08124921 1 --封印されし者の右足 +70903634 1 --封印されし者の右腕 +70369116 1 --捕食植物ヴェルテ・アナコンダ +35272499 1 --捕食植物オフリス・スコーピオ +24094258 1 --ヘビーメタルフォーゼ・エレクトラム +33508719 1 --メタモルポット +90809975 1 --餅カエル +83107873 1 --雷鳥龍-サンダー・ドラゴン +89399912 1 --嵐征竜-テンペスト +92746535 1 --竜剣士ラスターP +88264978 1 --レッドアイズ・ダークネスメタルドラゴン +33782437 1 --一時休戦 +01845204 1 --簡易融合 +66957584 1 --インフェルニティガン +81439173 1 --おろかな埋葬 +73680966 1 --終わりの始まり +23701465 1 --原初の種 +12580477 1 --サンダー・ボルト +83764718 1 --死者蘇生 +46060017 1 --十二獣の会局 +52340444 1 --閃刀機-ホーネットビット +32807846 1 --増援 +72892473 1 --手札抹殺 +73628505 1 --テラ・フォーミング +01984618 1 --天底の使徒 +13035077 1 --ドラゴニックD +35371948 1 --トリックスター・ライトステージ +18144506 1 --ハーピィの羽根帚 +75500286 1 --封印の黄金櫃 +07394770 1 --ブリリアント・フュージョン +73468603 1 --盆回し +76375976 1 --魔鍾洞 +93600443 1 --マスク・チェンジ・セカンド +15854426 1 --霞の谷の神風 +27970830 1 --六武の門 +02295440 1 --ワン・フォー・ワン +05851097 1 --虚無空間 +61740673 1 --王宮の勅命 +21076084 1 --トリックスター・リンカーネイション +89208725 1 --メタバース +23002292 1 --レッド・リブート +#semi limit +40318957 2 --EMドクロバット・ジョーカー +38814750 2 --PSYフレームギア・γ +09411399 2 --D-HERO ディアボリックガイ +43694650 2 --未界域のジャッカロープ +70711847 2 --未界域のネッシー +29596581 2 --雷獣龍-サンダー・ドラゴン +48686504 2 --ローンファイア・ブロッサム +57103969 2 --炎舞-「天璣」 +84731222 2 --希望の記憶 +67723438 2 --緊急テレポート +52155219 2 --転生炎獣の炎陣 +73915051 2 --スケープ・ゴート +54631665 2 --SPYRAL RESORT +37520316 2 --精神操作 +98338152 2 --閃刀機-ウィドウアンカー +63166095 2 --閃刀起動-エンゲージ +48130397 2 --超融合 +11110587 2 --隣の芝刈り +31434645 2 --呪われしエルドランド +24224830 2 --墓穴の指名者 +47679935 2 --暴走魔法陣 +08949584 2 --ヒーローアライブ +53208660 2 --ペンデュラム・コール + +!2021.4 +#forbidden +91869203 0 --アマゾネスの射手 +20663556 0 --イレカエル +44910027 0 --ヴィクトリー・ドラゴン +51858306 0 --エクリプス・ワイバーン +25862681 0 --エンシェント・フェアリー・ドラゴン +53804307 0 --焔征竜-ブラスター +07563579 0 --Emヒグルミ +17330916 0 --EMモンキーボード +34945480 0 --外神アザトート +90411554 0 --巌征竜-レドックス +08903700 0 --儀式魔人リリーサー +11384280 0 --キャノン・ソルジャー +17412721 0 --旧神ノーデン +67441435 0 --グローアップ・バルブ +34124316 0 --サイバーポッド +88071625 0 --The tyrant NEPTUNE +61665245 0 --サモン・ソーサレス +52653092 0 --SNo.0 ホープ・ゼアル +85115440 0 --十二獣ブルホーン +59537380 0 --守護竜アガーペイン +86148577 0 --守護竜エルピィ +21377582 0 --真竜剣皇マスターP +94677445 0 --星杯の神子イヴ +16923472 0 --ゼンマイハンター +15341821 0 --ダンディライオン +37818794 0 --超魔導竜騎士-ドラグーン・オブ・レッドアイズ +18326736 0 --星守の騎士 プトレマイオス +79875176 0 --トゥーン・キャノン・ソルジャー +75732622 0 --トーチ・ゴーレム +22593417 0 --トポロジック・ガンブラー・ドラゴン +39064822 0 --トロイメア・ゴブリン +03679218 0 --トロイメア・マーメイド +54719828 0 --No.16 色の支配者ショック・ルーラー +58820923 0 --No.95 ギャラクシーアイズ・ダークマター・ドラゴン +26400609 0 --瀑征竜-タイダル +71525232 0 --破滅竜ガンドラX +78706415 0 --ファイバーポッド +93369354 0 --フィッシュボーグ-ガンナー +23558733 0 --フェニキシアン・クラスター・アマリリス +09929398 0 --BF-朧影のゴウフウ +09047460 0 --BF-隠れ蓑のスチーム +31178212 0 --マジェスペクター・ユニコーン +63101919 0 --マジックテンペスター +34206604 0 --魔導サイエンティスト +04423206 0 --M.X-セイバー インヴォーカー +14702066 0 --メガキャノン・ソルジャー +96782886 0 --メンタルマスター +03078576 0 --八汰烏 +34086406 0 --ラヴァルバル・チェイン +85243784 0 --リンクロス +57421866 0 --レベル・スティーラー +41482598 0 --悪夢の蜃気楼 +44763025 0 --いたずら好きな双子悪魔 +17375316 0 --押収 +19613556 0 --大嵐 +74191942 0 --苦渋の選択 +42829885 0 --強引な番兵 +45986603 0 --強奪 +55144522 0 --強欲な壺 +04031928 0 --心変わり +23557835 0 --次元融合 +31423101 0 --神剣-フェニックスブレード +57953380 0 --生還の宝札 +54447022 0 --ソウル・チャージ +60682203 0 --大寒波 +69243953 0 --蝶の短剣-エルマ +79571449 0 --天使の施し +70828912 0 --早すぎた埋葬 +42703248 0 --ハリケーン +34906152 0 --マスドライバー +46448938 0 --魔導書の神判 +46411259 0 --突然変異 +85602018 0 --遺言状 +27174286 0 --異次元からの帰還 +93016201 0 --王宮の弾圧 +03280747 0 --第六感 +64697231 0 --ダスト・シュート +80604091 0 --血の代償 +35316708 0 --刻の封印 +32723153 0 --マジカル・エクスプロージョン +17178486 0 --ライフチェンジャー +28566710 0 --ラストバトル! +#limit +64034255 1 --A・ジェネクス・バードマン +76794549 1 --アストログラフ・マジシャン +01561110 1 --ABC-ドラゴン・バスター +42790071 1 --オルターガイスト・マルチフェイカー +30741503 1 --オルフェゴール・ガラテア +57835716 1 --オルフェゴール・ディヴェル +50588353 1 --水晶機巧-ハリファイバー +12289247 1 --クロノグラフ・マジシャン +49684352 1 --虹彩の魔術師 +74586817 1 --PSYフレームロード・Ω +26889158 1 --転生炎獣ガゼル +74997493 1 --鎖龍蛇-スカルデット +69811710 1 --宵星の騎士ギルス +48905153 1 --十二獣ドランシア +78872731 1 --十二獣モルモラット +06602300 1 --重爆撃禽 ボム・フェネクス +28985331 1 --終末の騎士 +88581108 1 --真竜皇V.F.D. +78080961 1 --SPYRAL-ジーニアス +81275020 1 --SRベイゴマックス +63288573 1 --閃刀姫-カガリ +81122844 1 --発条空母ゼンマイティ +82385847 1 --ダイナレスラー・パンクラトプス +44335251 1 --魂喰いオヴィラプター +73941492 1 --調弦の魔術師 +15291624 1 --超雷龍-サンダー・ドラゴン +90953320 1 --TG ハイパー・ライブラリアン +69015963 1 --デビル・フランケン +16226786 1 --深淵の暗殺者 +69610326 1 --覇王眷竜ダークヴルム +52687916 1 --氷結界の龍 トリシューラ +33396948 1 --封印されしエクゾディア +44519536 1 --封印されし者の左足 +07902349 1 --封印されし者の左腕 +08124921 1 --封印されし者の右足 +70903634 1 --封印されし者の右腕 +70369116 1 --捕食植物ヴェルテ・アナコンダ +35272499 1 --捕食植物オフリス・スコーピオ +24094258 1 --ヘビーメタルフォーゼ・エレクトラム +33508719 1 --メタモルポット +90809975 1 --餅カエル +83107873 1 --雷鳥龍-サンダー・ドラゴン +89399912 1 --嵐征竜-テンペスト +92746535 1 --竜剣士ラスターP +88264978 1 --レッドアイズ・ダークネスメタルドラゴン +33782437 1 --一時休戦 +01845204 1 --簡易融合 +66957584 1 --インフェルニティガン +81439173 1 --おろかな埋葬 +73680966 1 --終わりの始まり +23701465 1 --原初の種 +12580477 1 --サンダー・ボルト +83764718 1 --死者蘇生 +46060017 1 --十二獣の会局 +52340444 1 --閃刀機-ホーネットビット +32807846 1 --増援 +72892473 1 --手札抹殺 +73628505 1 --テラ・フォーミング +01984618 1 --天底の使徒 +13035077 1 --ドラゴニックD +35371948 1 --トリックスター・ライトステージ +18144506 1 --ハーピィの羽根帚 +75500286 1 --封印の黄金櫃 +07394770 1 --ブリリアント・フュージョン +53208660 1 --ペンデュラム・コール +73468603 1 --盆回し +76375976 1 --魔鍾洞 +93600443 1 --マスク・チェンジ・セカンド +15854426 1 --霞の谷の神風 +27970830 1 --六武の門 +02295440 1 --ワン・フォー・ワン +05851097 1 --虚無空間 +61740673 1 --王宮の勅命 +21076084 1 --トリックスター・リンカーネイション +89208725 1 --メタバース +23002292 1 --レッド・リブート +#semi limit +40318957 2 --EMドクロバット・ジョーカー +59297550 2 --ゼンマイマジシャン +09411399 2 --D-HERO ディアボリックガイ +05043010 2 --ファイアウォール・ドラゴン +41386308 2 --マスマティシャン +43694650 2 --未界域のジャッカロープ +70711847 2 --未界域のネッシー +29596581 2 --雷獣龍-サンダー・ドラゴン +48686504 2 --ローンファイア・ブロッサム +84731222 2 --希望の記憶 +67723438 2 --緊急テレポート +52155219 2 --転生炎獣の炎陣 +73915051 2 --スケープ・ゴート +54631665 2 --SPYRAL RESORT +37520316 2 --精神操作 +98338152 2 --閃刀機-ウィドウアンカー +63166095 2 --閃刀起動-エンゲージ +48130397 2 --超融合 +11110587 2 --隣の芝刈り +31434645 2 --呪われしエルドランド +24224830 2 --墓穴の指名者 +47679935 2 --暴走魔法陣 +08949584 2 --ヒーローアライブ +66399653 2 --ユニオン格納庫 + +!2021.1 +#forbidden +91869203 0 --アマゾネスの射手 +20663556 0 --イレカエル +44910027 0 --ヴィクトリー・ドラゴン +51858306 0 --エクリプス・ワイバーン +25862681 0 --エンシェント・フェアリー・ドラゴン +53804307 0 --焔征竜-ブラスター +07563579 0 --Emヒグルミ +17330916 0 --EMモンキーボード +34945480 0 --外神アザトート +90411554 0 --巌征竜-レドックス +08903700 0 --儀式魔人リリーサー +11384280 0 --キャノン・ソルジャー +17412721 0 --旧神ノーデン +67441435 0 --グローアップ・バルブ +34124316 0 --サイバーポッド +88071625 0 --The tyrant NEPTUNE +61665245 0 --サモン・ソーサレス +52653092 0 --SNo.0 ホープ・ゼアル +85115440 0 --十二獣ブルホーン +59537380 0 --守護竜アガーペイン +86148577 0 --守護竜エルピィ +21377582 0 --真竜剣皇マスターP +94677445 0 --星杯の神子イヴ +16923472 0 --ゼンマイハンター +15341821 0 --ダンディライオン +37818794 0 --超魔導竜騎士-ドラグーン・オブ・レッドアイズ +18326736 0 --星守の騎士 プトレマイオス +79875176 0 --トゥーン・キャノン・ソルジャー +75732622 0 --トーチ・ゴーレム +22593417 0 --トポロジック・ガンブラー・ドラゴン +39064822 0 --トロイメア・ゴブリン +03679218 0 --トロイメア・マーメイド +54719828 0 --No.16 色の支配者ショック・ルーラー +58820923 0 --No.95 ギャラクシーアイズ・ダークマター・ドラゴン +26400609 0 --瀑征竜-タイダル +71525232 0 --破滅竜ガンドラX +78706415 0 --ファイバーポッド +93369354 0 --フィッシュボーグ-ガンナー +23558733 0 --フェニキシアン・クラスター・アマリリス +09929398 0 --BF-朧影のゴウフウ +09047460 0 --BF-隠れ蓑のスチーム +31178212 0 --マジェスペクター・ユニコーン +34206604 0 --魔導サイエンティスト +04423206 0 --M.X-セイバー インヴォーカー +14702066 0 --メガキャノン・ソルジャー +96782886 0 --メンタルマスター +03078576 0 --八汰烏 +34086406 0 --ラヴァルバル・チェイン +85243784 0 --リンクロス +57421866 0 --レベル・スティーラー +41482598 0 --悪夢の蜃気楼 +44763025 0 --いたずら好きな双子悪魔 +17375316 0 --押収 +19613556 0 --大嵐 +74191942 0 --苦渋の選択 +42829885 0 --強引な番兵 +45986603 0 --強奪 +55144522 0 --強欲な壺 +04031928 0 --心変わり +23557835 0 --次元融合 +31423101 0 --神剣-フェニックスブレード +57953380 0 --生還の宝札 +54447022 0 --ソウル・チャージ +60682203 0 --大寒波 +69243953 0 --蝶の短剣-エルマ +79571449 0 --天使の施し +70828912 0 --早すぎた埋葬 +42703248 0 --ハリケーン +34906152 0 --マスドライバー +46448938 0 --魔導書の神判 +46411259 0 --突然変異 +85602018 0 --遺言状 +27174286 0 --異次元からの帰還 +93016201 0 --王宮の弾圧 +03280747 0 --第六感 +64697231 0 --ダスト・シュート +80604091 0 --血の代償 +35316708 0 --刻の封印 +32723153 0 --マジカル・エクスプロージョン +17178486 0 --ライフチェンジャー +28566710 0 --ラストバトル! +#limit +64034255 1 --A・ジェネクス・バードマン +76794549 1 --アストログラフ・マジシャン +01561110 1 --ABC-ドラゴン・バスター +40318957 1 --EMドクロバット・ジョーカー +42790071 1 --オルターガイスト・マルチフェイカー +30741503 1 --オルフェゴール・ガラテア +57835716 1 --オルフェゴール・ディヴェル +50588353 1 --水晶機巧-ハリファイバー +12289247 1 --クロノグラフ・マジシャン +49684352 1 --虹彩の魔術師 +74586817 1 --PSYフレームロード・Ω +26889158 1 --転生炎獣ガゼル +74997493 1 --鎖龍蛇-スカルデット +69811710 1 --宵星の騎士ギルス +48905153 1 --十二獣ドランシア +78872731 1 --十二獣モルモラット +06602300 1 --重爆撃禽 ボム・フェネクス +28985331 1 --終末の騎士 +78080961 1 --SPYRAL-ジーニアス +81275020 1 --SRベイゴマックス +63288573 1 --閃刀姫-カガリ +81122844 1 --発条空母ゼンマイティ +82385847 1 --ダイナレスラー・パンクラトプス +44335251 1 --魂喰いオヴィラプター +73941492 1 --調弦の魔術師 +15291624 1 --超雷龍-サンダー・ドラゴン +90953320 1 --TG ハイパー・ライブラリアン +69015963 1 --デビル・フランケン +16226786 1 --深淵の暗殺者 +69610326 1 --覇王眷竜ダークヴルム +52687916 1 --氷結界の龍 トリシューラ +05043010 1 --ファイアウォール・ドラゴン +33396948 1 --封印されしエクゾディア +44519536 1 --封印されし者の左足 +07902349 1 --封印されし者の左腕 +08124921 1 --封印されし者の右足 +70903634 1 --封印されし者の右腕 +70369116 1 --捕食植物ヴェルテ・アナコンダ +35272499 1 --捕食植物オフリス・スコーピオ +24094258 1 --ヘビーメタルフォーゼ・エレクトラム +33508719 1 --メタモルポット +90809975 1 --餅カエル +83107873 1 --雷鳥龍-サンダー・ドラゴン +89399912 1 --嵐征竜-テンペスト +92746535 1 --竜剣士ラスターP +88264978 1 --レッドアイズ・ダークネスメタルドラゴン +33782437 1 --一時休戦 +01845204 1 --簡易融合 +66957584 1 --インフェルニティガン +81439173 1 --おろかな埋葬 +73680966 1 --終わりの始まり +23701465 1 --原初の種 +12580477 1 --サンダー・ボルト +83764718 1 --死者蘇生 +46060017 1 --十二獣の会局 +52340444 1 --閃刀機-ホーネットビット +32807846 1 --増援 +72892473 1 --手札抹殺 +73628505 1 --テラ・フォーミング +01984618 1 --天底の使徒 +13035077 1 --ドラゴニックD +35371948 1 --トリックスター・ライトステージ +18144506 1 --ハーピィの羽根帚 +75500286 1 --封印の黄金櫃 +07394770 1 --ブリリアント・フュージョン +53208660 1 --ペンデュラム・コール +73468603 1 --盆回し +76375976 1 --魔鍾洞 +93600443 1 --マスク・チェンジ・セカンド +15854426 1 --霞の谷の神風 +66399653 1 --ユニオン格納庫 +27970830 1 --六武の門 +02295440 1 --ワン・フォー・ワン +05851097 1 --虚無空間 +61740673 1 --王宮の勅命 +21076084 1 --トリックスター・リンカーネイション +89208725 1 --メタバース +23002292 1 --レッド・リブート +#semi limit +25533642 2 --オルターガイスト・メリュシーク +77075360 2 --ジャンク・スピーダー +59297550 2 --ゼンマイマジシャン +09411399 2 --D-HERO ディアボリックガイ +70583986 2 --氷結界の虎王ドゥローレン +41386308 2 --マスマティシャン +43694650 2 --未界域のジャッカロープ +70711847 2 --未界域のネッシー +29596581 2 --雷獣龍-サンダー・ドラゴン +48686504 2 --ローンファイア・ブロッサム +84731222 2 --希望の記憶 +67723438 2 --緊急テレポート +45305419 2 --継承の印 +52155219 2 --転生炎獣の炎陣 +73915051 2 --スケープ・ゴート +54631665 2 --SPYRAL RESORT +37520316 2 --精神操作 +98338152 2 --閃刀機-ウィドウアンカー +24010609 2 --閃刀機関-マルチロール +63166095 2 --閃刀起動-エンゲージ +48130397 2 --超融合 +11110587 2 --隣の芝刈り +31434645 2 --呪われしエルドランド +24224830 2 --墓穴の指名者 +47679935 2 --暴走魔法陣 +08949584 2 --ヒーローアライブ +01475311 2 --闇の誘惑 + +!2020.10 +#forbidden +91869203 0 --アマゾネスの射手 +20663556 0 --イレカエル +44910027 0 --ヴィクトリー・ドラゴン +51858306 0 --エクリプス・ワイバーン +25862681 0 --エンシェント・フェアリー・ドラゴン +53804307 0 --焔征竜-ブラスター +07563579 0 --Emヒグルミ +17330916 0 --EMモンキーボード +34945480 0 --外神アザトート +90411554 0 --巌征竜-レドックス +08903700 0 --儀式魔人リリーサー +11384280 0 --キャノン・ソルジャー +17412721 0 --旧神ノーデン +67441435 0 --グローアップ・バルブ +34124316 0 --サイバーポッド +88071625 0 --The tyrant NEPTUNE +61665245 0 --サモン・ソーサレス +52653092 0 --SNo.0 ホープ・ゼアル +85115440 0 --十二獣ブルホーン +59537380 0 --守護竜アガーペイン +86148577 0 --守護竜エルピィ +21377582 0 --真竜剣皇マスターP +94677445 0 --星杯の神子イヴ +16923472 0 --ゼンマイハンター +15341821 0 --ダンディライオン +37818794 0 --超魔導竜騎士-ドラグーン・オブ・レッドアイズ +18326736 0 --星守の騎士 プトレマイオス +79875176 0 --トゥーン・キャノン・ソルジャー +22593417 0 --トポロジック・ガンブラー・ドラゴン +39064822 0 --トロイメア・ゴブリン +03679218 0 --トロイメア・マーメイド +54719828 0 --No.16 色の支配者ショック・ルーラー +58820923 0 --No.95 ギャラクシーアイズ・ダークマター・ドラゴン +26400609 0 --瀑征竜-タイダル +71525232 0 --破滅竜ガンドラX +05043010 0 --ファイアウォール・ドラゴン +78706415 0 --ファイバーポッド +93369354 0 --フィッシュボーグ-ガンナー +23558733 0 --フェニキシアン・クラスター・アマリリス +09929398 0 --BF-朧影のゴウフウ +09047460 0 --BF-隠れ蓑のスチーム +31178212 0 --マジェスペクター・ユニコーン +34206604 0 --魔導サイエンティスト +04423206 0 --M.X-セイバー インヴォーカー +14702066 0 --メガキャノン・ソルジャー +96782886 0 --メンタルマスター +03078576 0 --八汰烏 +34086406 0 --ラヴァルバル・チェイン +85243784 0 --リンクロス +57421866 0 --レベル・スティーラー +41482598 0 --悪夢の蜃気楼 +44763025 0 --いたずら好きな双子悪魔 +17375316 0 --押収 +19613556 0 --大嵐 +74191942 0 --苦渋の選択 +42829885 0 --強引な番兵 +45986603 0 --強奪 +55144522 0 --強欲な壺 +04031928 0 --心変わり +23557835 0 --次元融合 +31423101 0 --神剣-フェニックスブレード +57953380 0 --生還の宝札 +54447022 0 --ソウル・チャージ +60682203 0 --大寒波 +69243953 0 --蝶の短剣-エルマ +79571449 0 --天使の施し +70828912 0 --早すぎた埋葬 +42703248 0 --ハリケーン +34906152 0 --マスドライバー +46448938 0 --魔導書の神判 +46411259 0 --突然変異 +85602018 0 --遺言状 +27174286 0 --異次元からの帰還 +93016201 0 --王宮の弾圧 +03280747 0 --第六感 +64697231 0 --ダスト・シュート +80604091 0 --血の代償 +35316708 0 --刻の封印 +32723153 0 --マジカル・エクスプロージョン +17178486 0 --ライフチェンジャー +28566710 0 --ラストバトル! +#limit +64034255 1 --A・ジェネクス・バードマン +76794549 1 --アストログラフ・マジシャン +01561110 1 --ABC-ドラゴン・バスター +40318957 1 --EMドクロバット・ジョーカー +42790071 1 --オルターガイスト・マルチフェイカー +30741503 1 --オルフェゴール・ガラテア +57835716 1 --オルフェゴール・ディヴェル +50588353 1 --水晶機巧-ハリファイバー +12289247 1 --クロノグラフ・マジシャン +49684352 1 --虹彩の魔術師 +74586817 1 --PSYフレームロード・Ω +26889158 1 --転生炎獣ガゼル +74997493 1 --鎖龍蛇-スカルデット +69811710 1 --宵星の騎士ギルス +77075360 1 --ジャンク・スピーダー +48905153 1 --十二獣ドランシア +78872731 1 --十二獣モルモラット +06602300 1 --重爆撃禽 ボム・フェネクス +28985331 1 --終末の騎士 +78080961 1 --SPYRAL-ジーニアス +81275020 1 --SRベイゴマックス +63288573 1 --閃刀姫-カガリ +81122844 1 --発条空母ゼンマイティ +59297550 1 --ゼンマイマジシャン +44335251 1 --魂喰いオヴィラプター +73941492 1 --調弦の魔術師 +15291624 1 --超雷龍-サンダー・ドラゴン +90953320 1 --TG ハイパー・ライブラリアン +69015963 1 --デビル・フランケン +75732622 1 --トーチ・ゴーレム +16226786 1 --深淵の暗殺者 +69610326 1 --覇王眷竜ダークヴルム +70583986 1 --氷結界の虎王ドゥローレン +52687916 1 --氷結界の龍 トリシューラ +33396948 1 --封印されしエクゾディア +44519536 1 --封印されし者の左足 +07902349 1 --封印されし者の左腕 +08124921 1 --封印されし者の右足 +70903634 1 --封印されし者の右腕 +70369116 1 --捕食植物ヴェルテ・アナコンダ +35272499 1 --捕食植物オフリス・スコーピオ +24094258 1 --ヘビーメタルフォーゼ・エレクトラム +33508719 1 --メタモルポット +90809975 1 --餅カエル +83107873 1 --雷鳥龍-サンダー・ドラゴン +89399912 1 --嵐征竜-テンペスト +92746535 1 --竜剣士ラスターP +88264978 1 --レッドアイズ・ダークネスメタルドラゴン +33782437 1 --一時休戦 +01845204 1 --簡易融合 +66957584 1 --インフェルニティガン +81439173 1 --おろかな埋葬 +73680966 1 --終わりの始まり +23701465 1 --原初の種 +12580477 1 --サンダー・ボルト +83764718 1 --死者蘇生 +46060017 1 --十二獣の会局 +52340444 1 --閃刀機-ホーネットビット +32807846 1 --増援 +72892473 1 --手札抹殺 +73628505 1 --テラ・フォーミング +13035077 1 --ドラゴニックD +35371948 1 --トリックスター・ライトステージ +18144506 1 --ハーピィの羽根帚 +75500286 1 --封印の黄金櫃 +07394770 1 --ブリリアント・フュージョン +53208660 1 --ペンデュラム・コール +73468603 1 --盆回し +76375976 1 --魔鍾洞 +93600443 1 --マスク・チェンジ・セカンド +15854426 1 --霞の谷の神風 +66399653 1 --ユニオン格納庫 +27970830 1 --六武の門 +02295440 1 --ワン・フォー・ワン +05851097 1 --虚無空間 +61740673 1 --王宮の勅命 +21076084 1 --トリックスター・リンカーネイション +89208725 1 --メタバース +#semi limit +25533642 2 --オルターガイスト・メリュシーク +14536035 2 --ダーク・グレファー +82385847 2 --ダイナレスラー・パンクラトプス +09411399 2 --D-HERO ディアボリックガイ +10802915 2 --魔界発現世行きデスガイド +41386308 2 --マスマティシャン +43694650 2 --未界域のジャッカロープ +70711847 2 --未界域のネッシー +29596581 2 --雷獣龍-サンダー・ドラゴン +48686504 2 --ローンファイア・ブロッサム +47325505 2 --化石調査 +84731222 2 --希望の記憶 +67723438 2 --緊急テレポート +45305419 2 --継承の印 +52155219 2 --転生炎獣の炎陣 +73915051 2 --スケープ・ゴート +54631665 2 --SPYRAL RESORT +37520316 2 --精神操作 +98338152 2 --閃刀機-ウィドウアンカー +24010609 2 --閃刀機関-マルチロール +63166095 2 --閃刀起動-エンゲージ +48130397 2 --超融合 +01984618 2 --天底の使徒 +11110587 2 --隣の芝刈り +24224830 2 --墓穴の指名者 +08949584 2 --ヒーローアライブ +01475311 2 --闇の誘惑 +23002292 2 --レッド・リブート + +!2020.7 +#forbidden +91869203 0 --アマゾネスの射手 +20663556 0 --イレカエル +44910027 0 --ヴィクトリー・ドラゴン +51858306 0 --エクリプス・ワイバーン +25862681 0 --エンシェント・フェアリー・ドラゴン +53804307 0 --焔征竜-ブラスター +07563579 0 --Emヒグルミ +17330916 0 --EMモンキーボード +34945480 0 --外神アザトート +90411554 0 --巌征竜-レドックス +08903700 0 --儀式魔人リリーサー +11384280 0 --キャノン・ソルジャー +17412721 0 --旧神ノーデン +67441435 0 --グローアップ・バルブ +34124316 0 --サイバーポッド +88071625 0 --The tyrant NEPTUNE +61665245 0 --サモン・ソーサレス +85115440 0 --十二獣ブルホーン +59537380 0 --守護竜アガーペイン +86148577 0 --守護竜エルピィ +21377582 0 --真竜剣皇マスターP +94677445 0 --星杯の神子イヴ +16923472 0 --ゼンマイハンター +15341821 0 --ダンディライオン +18326736 0 --星守の騎士 プトレマイオス +79875176 0 --トゥーン・キャノン・ソルジャー +22593417 0 --トポロジック・ガンブラー・ドラゴン +39064822 0 --トロイメア・ゴブリン +03679218 0 --トロイメア・マーメイド +54719828 0 --No.16 色の支配者ショック・ルーラー +58820923 0 --No.95 ギャラクシーアイズ・ダークマター・ドラゴン +26400609 0 --瀑征竜-タイダル +71525232 0 --破滅竜ガンドラX +05043010 0 --ファイアウォール・ドラゴン +78706415 0 --ファイバーポッド +93369354 0 --フィッシュボーグ-ガンナー +23558733 0 --フェニキシアン・クラスター・アマリリス +09929398 0 --BF-朧影のゴウフウ +09047460 0 --BF-隠れ蓑のスチーム +31178212 0 --マジェスペクター・ユニコーン +34206604 0 --魔導サイエンティスト +04423206 0 --M.X-セイバー インヴォーカー +14702066 0 --メガキャノン・ソルジャー +96782886 0 --メンタルマスター +03078576 0 --八汰烏 +34086406 0 --ラヴァルバル・チェイン +85243784 0 --リンクロス +57421866 0 --レベル・スティーラー +41482598 0 --悪夢の蜃気楼 +44763025 0 --いたずら好きな双子悪魔 +17375316 0 --押収 +19613556 0 --大嵐 +74191942 0 --苦渋の選択 +42829885 0 --強引な番兵 +45986603 0 --強奪 +55144522 0 --強欲な壺 +04031928 0 --心変わり +23557835 0 --次元融合 +31423101 0 --神剣-フェニックスブレード +57953380 0 --生還の宝札 +54447022 0 --ソウル・チャージ +60682203 0 --大寒波 +69243953 0 --蝶の短剣-エルマ +79571449 0 --天使の施し +70828912 0 --早すぎた埋葬 +42703248 0 --ハリケーン +34906152 0 --マスドライバー +46448938 0 --魔導書の神判 +46411259 0 --突然変異 +85602018 0 --遺言状 +27174286 0 --異次元からの帰還 +93016201 0 --王宮の弾圧 +03280747 0 --第六感 +64697231 0 --ダスト・シュート +80604091 0 --血の代償 +35316708 0 --刻の封印 +32723153 0 --マジカル・エクスプロージョン +17178486 0 --ライフチェンジャー +28566710 0 --ラストバトル! +#limit +64034255 1 --A・ジェネクス・バードマン +76794549 1 --アストログラフ・マジシャン +01561110 1 --ABC-ドラゴン・バスター +40318957 1 --EMドクロバット・ジョーカー +42790071 1 --オルターガイスト・マルチフェイカー +30741503 1 --オルフェゴール・ガラテア +57835716 1 --オルフェゴール・ディヴェル +50588353 1 --水晶機巧-ハリファイバー +12289247 1 --クロノグラフ・マジシャン +49684352 1 --虹彩の魔術師 +74586817 1 --PSYフレームロード・Ω +26889158 1 --転生炎獣ガゼル +74997493 1 --鎖龍蛇-スカルデット +77075360 1 --ジャンク・スピーダー +48905153 1 --十二獣ドランシア +78872731 1 --十二獣モルモラット +06602300 1 --重爆撃禽 ボム・フェネクス +28985331 1 --終末の騎士 +78080961 1 --SPYRAL-ジーニアス +81275020 1 --SRベイゴマックス +63288573 1 --閃刀姫-カガリ +81122844 1 --発条空母ゼンマイティ +59297550 1 --ゼンマイマジシャン +44335251 1 --魂喰いオヴィラプター +73941492 1 --調弦の魔術師 +37818794 1 --超魔導竜騎士-ドラグーン・オブ・レッドアイズ +15291624 1 --超雷龍-サンダー・ドラゴン +90953320 1 --TG ハイパー・ライブラリアン +69015963 1 --デビル・フランケン +75732622 1 --トーチ・ゴーレム +16226786 1 --深淵の暗殺者 +69610326 1 --覇王眷竜ダークヴルム +70583986 1 --氷結界の虎王ドゥローレン +52687916 1 --氷結界の龍トリシューラ +33396948 1 --封印されしエクゾディア +44519536 1 --封印されし者の左足 +07902349 1 --封印されし者の左腕 +08124921 1 --封印されし者の右足 +70903634 1 --封印されし者の右腕 +70369116 1 --捕食植物ヴェルテ・アナコンダ +35272499 1 --捕食植物オフリス・スコーピオ +24094258 1 --ヘビーメタルフォーゼ・エレクトラム +33508719 1 --メタモルポット +90809975 1 --餅カエル +83107873 1 --雷鳥龍-サンダー・ドラゴン +89399912 1 --嵐征竜-テンペスト +92746535 1 --竜剣士ラスターP +88264978 1 --レッドアイズ・ダークネスメタルドラゴン +33782437 1 --一時休戦 +01845204 1 --簡易融合 +66957584 1 --インフェルニティガン +81439173 1 --おろかな埋葬 +73680966 1 --終わりの始まり +23701465 1 --原初の種 +12580477 1 --サンダー・ボルト +83764718 1 --死者蘇生 +46060017 1 --十二獣の会局 +52340444 1 --閃刀機-ホーネットビット +32807846 1 --増援 +72892473 1 --手札抹殺 +73628505 1 --テラ・フォーミング +13035077 1 --ドラゴニックD +35371948 1 --トリックスター・ライトステージ +18144506 1 --ハーピィの羽根帚 +75500286 1 --封印の黄金櫃 +07394770 1 --ブリリアント・フュージョン +53208660 1 --ペンデュラム・コール +73468603 1 --盆回し +76375976 1 --魔鍾洞 +93600443 1 --マスク・チェンジ・セカンド +15854426 1 --霞の谷の神風 +66399653 1 --ユニオン格納庫 +06172122 1 --真紅眼融合 +27970830 1 --六武の門 +05851097 1 --虚無空間 +61740673 1 --王宮の勅命 +21076084 1 --トリックスター・リンカーネイション +89208725 1 --メタバース +#semi limit +25533642 2 --オルターガイスト・メリュシーク +99234526 2 --輝白竜 ワイバースター +21593977 2 --処刑人-マキュラ +14536035 2 --ダーク・グレファー +82385847 2 --ダイナレスラー・パンクラトプス +09411399 2 --D-HEROディアボリックガイ +28297833 2 --ネクロフェイス +10802915 2 --魔界発現世行きデスガイド +41386308 2 --マスマティシャン +43694650 2 --未界域のジャッカロープ +70711847 2 --未界域のネッシー +29596581 2 --雷獣龍-サンダー・ドラゴン +48686504 2 --ローンファイア・ブロッサム +47325505 2 --化石調査 +67723438 2 --緊急テレポート +45305419 2 --継承の印 +52155219 2 --転生炎獣の炎陣 +73915051 2 --スケープ・ゴート +54631665 2 --SPYRAL RESORT +37520316 2 --精神操作 +98338152 2 --閃刀機-ウィドウアンカー +24010609 2 --閃刀機関-マルチロール +63166095 2 --閃刀起動-エンゲージ +48130397 2 --超融合 +11110587 2 --隣の芝刈り +08949584 2 --ヒーローアライブ +01475311 2 --闇の誘惑 +02295440 2 --ワン・フォー・ワン +53936268 2 --パーソナル・スプーフィング +23002292 2 --レッド・リブート + +!2020.4 +#forbidden +91869203 0 --アマゾネスの射手 +20663556 0 --イレカエル +44910027 0 --ヴィクトリー・ドラゴン +51858306 0 --エクリプス・ワイバーン +25862681 0 --エンシェント・フェアリー・ドラゴン +53804307 0 --焔征竜-ブラスター +07563579 0 --Emヒグルミ +17330916 0 --EMモンキーボード +34945480 0 --外神アザトート +90411554 0 --巌征竜-レドックス +08903700 0 --儀式魔人リリーサー +11384280 0 --キャノン・ソルジャー +17412721 0 --旧神ノーデン +67441435 0 --グローアップ・バルブ +34124316 0 --サイバーポッド +88071625 0 --The tyrant NEPTUNE +61665245 0 --サモン・ソーサレス +85115440 0 --十二獣ブルホーン +59537380 0 --守護竜アガーペイン +86148577 0 --守護竜エルピィ +21377582 0 --真竜剣皇マスターP +94677445 0 --星杯の神子イヴ +16923472 0 --ゼンマイハンター +15341821 0 --ダンディライオン +18326736 0 --星守の騎士 プトレマイオス +79875176 0 --トゥーン・キャノン・ソルジャー +22593417 0 --トポロジック・ガンブラー・ドラゴン +39064822 0 --トロイメア・ゴブリン +03679218 0 --トロイメア・マーメイド +54719828 0 --No.16 色の支配者ショック・ルーラー +58820923 0 --No.95 ギャラクシーアイズ・ダークマター・ドラゴン +26400609 0 --瀑征竜-タイダル +71525232 0 --破滅竜ガンドラX +05043010 0 --ファイアウォール・ドラゴン +78706415 0 --ファイバーポッド +93369354 0 --フィッシュボーグ-ガンナー +23558733 0 --フェニキシアン・クラスター・アマリリス +09929398 0 --BF-朧影のゴウフウ +09047460 0 --BF-隠れ蓑のスチーム +31178212 0 --マジェスペクター・ユニコーン +34206604 0 --魔導サイエンティスト +04423206 0 --M.X-セイバー インヴォーカー +14702066 0 --メガキャノン・ソルジャー +96782886 0 --メンタルマスター +03078576 0 --八汰烏 +34086406 0 --ラヴァルバル・チェイン +57421866 0 --レベル・スティーラー +41482598 0 --悪夢の蜃気楼 +44763025 0 --いたずら好きな双子悪魔 +17375316 0 --押収 +19613556 0 --大嵐 +74191942 0 --苦渋の選択 +42829885 0 --強引な番兵 +45986603 0 --強奪 +55144522 0 --強欲な壺 +04031928 0 --心変わり +23557835 0 --次元融合 +31423101 0 --神剣-フェニックスブレード +57953380 0 --生還の宝札 +54447022 0 --ソウル・チャージ +60682203 0 --大寒波 +69243953 0 --蝶の短剣-エルマ +79571449 0 --天使の施し +70828912 0 --早すぎた埋葬 +42703248 0 --ハリケーン +34906152 0 --マスドライバー +46448938 0 --魔導書の神判 +46411259 0 --突然変異 +85602018 0 --遺言状 +27174286 0 --異次元からの帰還 +93016201 0 --王宮の弾圧 +03280747 0 --第六感 +64697231 0 --ダスト・シュート +80604091 0 --血の代償 +35316708 0 --刻の封印 +32723153 0 --マジカル・エクスプロージョン +17178486 0 --ライフチェンジャー +28566710 0 --ラストバトル! +#limit +64034255 1 --A・ジェネクス・バードマン +76794549 1 --アストログラフ・マジシャン +01561110 1 --ABC-ドラゴン・バスター +40318957 1 --EMドクロバット・ジョーカー +42790071 1 --オルターガイスト・マルチフェイカー +30741503 1 --オルフェゴール・ガラテア +57835716 1 --オルフェゴール・ディヴェル +99234526 1 --輝白竜 ワイバースター +50588353 1 --水晶機巧-ハリファイバー +12289247 1 --クロノグラフ・マジシャン +49684352 1 --虹彩の魔術師 +74586817 1 --PSYフレームロード・Ω +26889158 1 --転生炎獣ガゼル +74997493 1 --鎖龍蛇-スカルデット +77075360 1 --ジャンク・スピーダー +48905153 1 --十二獣ドランシア +78872731 1 --十二獣モルモラット +06602300 1 --重爆撃禽 ボム・フェネクス +28985331 1 --終末の騎士 +21593977 1 --処刑人-マキュラ +78080961 1 --SPYRAL-ジーニアス +81275020 1 --SRベイゴマックス +63288573 1 --閃刀姫-カガリ +81122844 1 --発条空母ゼンマイティ +59297550 1 --ゼンマイマジシャン +44335251 1 --魂喰いオヴィラプター +73941492 1 --調弦の魔術師 +37818794 1 --超魔導竜騎士-ドラグーン・オブ・レッドアイズ +15291624 1 --超雷龍-サンダー・ドラゴン +90953320 1 --TG ハイパー・ライブラリアン +69015963 1 --デビル・フランケン +75732622 1 --トーチ・ゴーレム +16226786 1 --深淵の暗殺者 +28297833 1 --ネクロフェイス +69610326 1 --覇王眷竜ダークヴルム +70583986 1 --氷結界の虎王ドゥローレン +52687916 1 --氷結界の龍トリシューラ +33396948 1 --封印されしエクゾディア +44519536 1 --封印されし者の左足 +07902349 1 --封印されし者の左腕 +08124921 1 --封印されし者の右足 +70903634 1 --封印されし者の右腕 +70369116 1 --捕食植物ヴェルテ・アナコンダ +35272499 1 --捕食植物オフリス・スコーピオ +24094258 1 --ヘビーメタルフォーゼ・エレクトラム +33508719 1 --メタモルポット +90809975 1 --餅カエル +83107873 1 --雷鳥龍-サンダー・ドラゴン +89399912 1 --嵐征竜-テンペスト +92746535 1 --竜剣士ラスターP +85243784 1 --リンクロス +88264978 1 --レッドアイズ・ダークネスメタルドラゴン +48686504 1 --ローンファイア・ブロッサム +33782437 1 --一時休戦 +01845204 1 --簡易融合 +66957584 1 --インフェルニティガン +81439173 1 --おろかな埋葬 +73680966 1 --終わりの始まり +23701465 1 --原初の種 +12580477 1 --サンダー・ボルト +83764718 1 --死者蘇生 +46060017 1 --十二獣の会局 +52340444 1 --閃刀機-ホーネットビット +32807846 1 --増援 +72892473 1 --手札抹殺 +73628505 1 --テラ・フォーミング +13035077 1 --ドラゴニックD +35371948 1 --トリックスター・ライトステージ +18144506 1 --ハーピィの羽根帚 +75500286 1 --封印の黄金櫃 +07394770 1 --ブリリアント・フュージョン +53208660 1 --ペンデュラム・コール +73468603 1 --盆回し +76375976 1 --魔鍾洞 +93600443 1 --マスク・チェンジ・セカンド +15854426 1 --霞の谷の神風 +66399653 1 --ユニオン格納庫 +06172122 1 --真紅眼融合 +27970830 1 --六武の門 +05851097 1 --虚無空間 +61740673 1 --王宮の勅命 +21076084 1 --トリックスター・リンカーネイション +89208725 1 --メタバース +#semi limit +25533642 2 --オルターガイスト・メリュシーク +78868119 2 --深海のディーヴァ +14536035 2 --ダーク・グレファー +82385847 2 --ダイナレスラー・パンクラトプス +09411399 2 --D-HEROディアボリックガイ +62706865 2 --ドラコネット +10802915 2 --魔界発現世行きデスガイド +41386308 2 --マスマティシャン +43694650 2 --未界域のジャッカロープ +70711847 2 --未界域のネッシー +29596581 2 --雷獣龍-サンダー・ドラゴン +47325505 2 --化石調査 +67723438 2 --緊急テレポート +45305419 2 --継承の印 +52155219 2 --転生炎獣の炎陣 +73915051 2 --スケープ・ゴート +54631665 2 --SPYRAL RESORT +37520316 2 --精神操作 +98338152 2 --閃刀機-ウィドウアンカー +24010609 2 --閃刀機関-マルチロール +63166095 2 --閃刀起動-エンゲージ +48130397 2 --超融合 +11110587 2 --隣の芝刈り +08949584 2 --ヒーローアライブ +01475311 2 --闇の誘惑 +02295440 2 --ワン・フォー・ワン +53936268 2 --パーソナル・スプーフィング +23002292 2 --レッド・リブート + +!2020.1 +#forbidden +91869203 0 --アマゾネスの射手 +20663556 0 --イレカエル +44910027 0 --ヴィクトリー・ドラゴン +51858306 0 --エクリプス・ワイバーン +25862681 0 --エンシェント・フェアリー・ドラゴン +53804307 0 --焔征竜-ブラスター +07563579 0 --Emヒグルミ +17330916 0 --EMモンキーボード +34945480 0 --外神アザトート +90411554 0 --巌征竜-レドックス +11384280 0 --キャノン・ソルジャー +17412721 0 --旧神ノーデン +67441435 0 --グローアップ・バルブ +34124316 0 --サイバーポッド +88071625 0 --The tyrant NEPTUNE +61665245 0 --サモン・ソーサレス +85115440 0 --十二獣ブルホーン +59537380 0 --守護竜アガーペイン +21593977 0 --処刑人-マキュラ +21377582 0 --真竜剣皇マスターP +16923472 0 --ゼンマイハンター +15341821 0 --ダンディライオン +18326736 0 --星守の騎士 プトレマイオス +79875176 0 --トゥーン・キャノン・ソルジャー +22593417 0 --トポロジック・ガンブラー・ドラゴン +39064822 0 --トロイメア・ゴブリン +03679218 0 --トロイメア・マーメイド +54719828 0 --No.16 色の支配者ショック・ルーラー +58820923 0 --No.95 ギャラクシーアイズ・ダークマター・ドラゴン +26400609 0 --瀑征竜-タイダル +71525232 0 --破滅竜ガンドラX +05043010 0 --ファイアウォール・ドラゴン +78706415 0 --ファイバーポッド +93369354 0 --フィッシュボーグ-ガンナー +23558733 0 --フェニキシアン・クラスター・アマリリス +09929398 0 --BF-朧影のゴウフウ +09047460 0 --BF-隠れ蓑のスチーム +31178212 0 --マジェスペクター・ユニコーン +34206604 0 --魔導サイエンティスト +04423206 0 --M.X-セイバー インヴォーカー +14702066 0 --メガキャノン・ソルジャー +96782886 0 --メンタルマスター +03078576 0 --八汰烏 +34086406 0 --ラヴァルバル・チェイン +88264978 0 --レッドアイズ・ダークネスメタルドラゴン +57421866 0 --レベル・スティーラー +41482598 0 --悪夢の蜃気楼 +44763025 0 --いたずら好きな双子悪魔 +17375316 0 --押収 +19613556 0 --大嵐 +74191942 0 --苦渋の選択 +42829885 0 --強引な番兵 +45986603 0 --強奪 +55144522 0 --強欲な壺 +04031928 0 --心変わり +23557835 0 --次元融合 +31423101 0 --神剣-フェニックスブレード +57953380 0 --生還の宝札 +54447022 0 --ソウル・チャージ +60682203 0 --大寒波 +69243953 0 --蝶の短剣-エルマ +79571449 0 --天使の施し +70828912 0 --早すぎた埋葬 +42703248 0 --ハリケーン +34906152 0 --マスドライバー +46448938 0 --魔導書の神判 +46411259 0 --突然変異 +85602018 0 --遺言状 +27174286 0 --異次元からの帰還 +93016201 0 --王宮の弾圧 +03280747 0 --第六感 +64697231 0 --ダスト・シュート +80604091 0 --血の代償 +35316708 0 --刻の封印 +32723153 0 --マジカル・エクスプロージョン +17178486 0 --ライフチェンジャー +28566710 0 --ラストバトル! +#limit +64034255 1 --A・ジェネクス・バードマン +76794549 1 --アストログラフ・マジシャン +40318957 1 --EMドクロバット・ジョーカー +42790071 1 --オルターガイスト・マルチフェイカー +99234526 1 --輝白竜 ワイバースター +50588353 1 --水晶機巧-ハリファイバー +12289247 1 --クロノグラフ・マジシャン +49684352 1 --虹彩の魔術師 +74586817 1 --PSYフレームロード・Ω +26889158 1 --転生炎獣ガゼル +74997493 1 --鎖龍蛇-スカルデット +48905153 1 --十二獣ドランシア +78872731 1 --十二獣モルモラット +06602300 1 --重爆撃禽 ボム・フェネクス +28985331 1 --終末の騎士 +81275020 1 --SRベイゴマックス +63288573 1 --閃刀姫-カガリ +44335251 1 --魂喰いオヴィラプター +73941492 1 --調弦の魔術師 +15291624 1 --超雷龍-サンダー・ドラゴン +75732622 1 --トーチ・ゴーレム +62706865 1 --ドラコネット +16226786 1 --深淵の暗殺者 +28297833 1 --ネクロフェイス +69610326 1 --覇王眷竜ダークヴルム +70583986 1 --氷結界の虎王ドゥローレン +33396948 1 --封印されしエクゾディア +44519536 1 --封印されし者の左足 +07902349 1 --封印されし者の左腕 +08124921 1 --封印されし者の右足 +70903634 1 --封印されし者の右腕 +24094258 1 --ヘビーメタルフォーゼ・エレクトラム +33508719 1 --メタモルポット +83107873 1 --雷鳥龍-サンダー・ドラゴン +89399912 1 --嵐征竜-テンペスト +92746535 1 --竜剣士ラスターP +48686504 1 --ローンファイア・ブロッサム +33782437 1 --一時休戦 +66957584 1 --インフェルニティガン +81439173 1 --おろかな埋葬 +73680966 1 --終わりの始まり +45305419 1 --継承の印 +23701465 1 --原初の種 +12580477 1 --サンダー・ボルト +83764718 1 --死者蘇生 +46060017 1 --十二獣の会局 +52340444 1 --閃刀機-ホーネットビット +32807846 1 --増援 +72892473 1 --手札抹殺 +73628505 1 --テラ・フォーミング +13035077 1 --ドラゴニックD +18144506 1 --ハーピィの羽根帚 +75500286 1 --封印の黄金櫃 +53208660 1 --ペンデュラム・コール +73468603 1 --盆回し +76375976 1 --魔鍾洞 +93600443 1 --マスク・チェンジ・セカンド +15854426 1 --霞の谷の神風 +05851097 1 --虚無空間 +61740673 1 --王宮の勅命 +21076084 1 --トリックスター・リンカーネイション +89208725 1 --メタバース +#semi limit +25533642 2 --オルターガイスト・メリュシーク +30741503 2 --オルフェゴール・ガラテア +57835716 2 --オルフェゴール・ディヴェル +78868119 2 --深海のディーヴァ +78080961 2 --SPYRAL-ジーニアス +14536035 2 --ダーク・グレファー +82385847 2 --ダイナレスラー・パンクラトプス +61283655 2 --トリックスター・キャンディナ +14558127 2 --灰流うらら +35272499 2 --捕食植物オフリス・スコーピオ +36042004 2 --ベビケラサウルス +10802915 2 --魔界発現世行きデスガイド +41386308 2 --マスマティシャン +89463537 2 --ユニコールの影霊衣 +29596581 2 --雷獣龍-サンダー・ドラゴン +16188701 2 --レディ・デバッガー +47325505 2 --化石調査 +67723438 2 --緊急テレポート +52155219 2 --転生炎獣の炎陣 +73915051 2 --スケープ・ゴート +54631665 2 --SPYRAL RESORT +37520316 2 --精神操作 +98338152 2 --閃刀機-ウィドウアンカー +24010609 2 --閃刀機関-マルチロール +63166095 2 --閃刀起動-エンゲージ +48130397 2 --超融合 +11110587 2 --隣の芝刈り +08949584 2 --ヒーローアライブ +01475311 2 --闇の誘惑 +02295440 2 --ワン・フォー・ワン +53936268 2 --パーソナル・スプーフィング +23002292 2 --レッド・リブート + +!2019.10 +#forbidden +91869203 0 --アマゾネスの射手 +20663556 0 --イレカエル +44910027 0 --ヴィクトリー・ドラゴン +51858306 0 --エクリプス・ワイバーン +25862681 0 --エンシェント・フェアリー・ドラゴン +53804307 0 --焔征竜-ブラスター +07563579 0 --Emヒグルミ +17330916 0 --EMモンキーボード +90411554 0 --巌征竜-レドックス +11384280 0 --キャノン・ソルジャー +17412721 0 --旧神ノーデン +67441435 0 --グローアップ・バルブ +34124316 0 --サイバーポッド +88071625 0 --The tyrant NEPTUNE +61665245 0 --サモン・ソーサレス +48905153 0 --十二獣ドランシア +85115440 0 --十二獣ブルホーン +59537380 0 --守護竜アガーペイン +21593977 0 --処刑人-マキュラ +21377582 0 --真竜剣皇マスターP +16923472 0 --ゼンマイハンター +15341821 0 --ダンディライオン +18326736 0 --星守の騎士 プトレマイオス +79875176 0 --トゥーン・キャノン・ソルジャー +39064822 0 --トロイメア・ゴブリン +03679218 0 --トロイメア・マーメイド +54719828 0 --No.16 色の支配者ショック・ルーラー +58820923 0 --No.95 ギャラクシーアイズ・ダークマター・ドラゴン +26400609 0 --瀑征竜-タイダル +71525232 0 --破滅竜ガンドラX +05043010 0 --ファイアウォール・ドラゴン +78706415 0 --ファイバーポッド +93369354 0 --フィッシュボーグ-ガンナー +23558733 0 --フェニキシアン・クラスター・アマリリス +09929398 0 --BF-朧影のゴウフウ +09047460 0 --BF-隠れ蓑のスチーム +31178212 0 --マジェスペクター・ユニコーン +34206604 0 --魔導サイエンティスト +04423206 0 --M.X-セイバー インヴォーカー +14702066 0 --メガキャノン・ソルジャー +96782886 0 --メンタルマスター +03078576 0 --八汰烏 +34086406 0 --ラヴァルバル・チェイン +88264978 0 --レッドアイズ・ダークネスメタルドラゴン +57421866 0 --レベル・スティーラー +41482598 0 --悪夢の蜃気楼 +44763025 0 --いたずら好きな双子悪魔 +17375316 0 --押収 +19613556 0 --大嵐 +74191942 0 --苦渋の選択 +42829885 0 --強引な番兵 +45986603 0 --強奪 +55144522 0 --強欲な壺 +04031928 0 --心変わり +23557835 0 --次元融合 +31423101 0 --神剣-フェニックスブレード +57953380 0 --生還の宝札 +54447022 0 --ソウル・チャージ +60682203 0 --大寒波 +69243953 0 --蝶の短剣-エルマ +79571449 0 --天使の施し +70828912 0 --早すぎた埋葬 +42703248 0 --ハリケーン +34906152 0 --マスドライバー +46448938 0 --魔導書の神判 +46411259 0 --突然変異 +85602018 0 --遺言状 +27174286 0 --異次元からの帰還 +93016201 0 --王宮の弾圧 +03280747 0 --第六感 +64697231 0 --ダスト・シュート +80604091 0 --血の代償 +35316708 0 --刻の封印 +32723153 0 --マジカル・エクスプロージョン +17178486 0 --ライフチェンジャー +28566710 0 --ラストバトル! +#limit +64034255 1 --A・ジェネクス・バードマン +76794549 1 --アストログラフ・マジシャン +40318957 1 --EMドクロバット・ジョーカー +42790071 1 --オルターガイスト・マルチフェイカー +99234526 1 --輝白竜 ワイバースター +50588353 1 --水晶機巧-ハリファイバー +12289247 1 --クロノグラフ・マジシャン +49684352 1 --虹彩の魔術師 +74586817 1 --PSYフレームロード・Ω +26889158 1 --転生炎獣ガゼル +74997493 1 --鎖龍蛇-スカルデット +78872731 1 --十二獣モルモラット +06602300 1 --重爆撃禽 ボム・フェネクス +28985331 1 --終末の騎士 +75286621 1 --召喚獣メルカバー +78868119 1 --深海のディーヴァ +81275020 1 --SRベイゴマックス +63288573 1 --閃刀姫-カガリ +44335251 1 --魂喰いオヴィラプター +73941492 1 --調弦の魔術師 +15291624 1 --超雷龍-サンダー・ドラゴン +75732622 1 --トーチ・ゴーレム +62706865 1 --ドラコネット +16226786 1 --深淵の暗殺者 +28297833 1 --ネクロフェイス +69610326 1 --覇王眷竜ダークヴルム +70583986 1 --氷結界の虎王ドゥローレン +33396948 1 --封印されしエクゾディア +44519536 1 --封印されし者の左足 +07902349 1 --封印されし者の左腕 +08124921 1 --封印されし者の右足 +70903634 1 --封印されし者の右腕 +24094258 1 --ヘビーメタルフォーゼ・エレクトラム +36042004 1 --ベビケラサウルス +10802915 1 --魔界発現世行きデスガイド +41386308 1 --マスマティシャン +33508719 1 --メタモルポット +89463537 1 --ユニコールの影霊衣 +83107873 1 --雷鳥龍-サンダー・ドラゴン +89399912 1 --嵐征竜-テンペスト +92746535 1 --竜剣士ラスターP +48686504 1 --ローンファイア・ブロッサム +33782437 1 --一時休戦 +66957584 1 --インフェルニティガン +81439173 1 --おろかな埋葬 +45305419 1 --継承の印 +23701465 1 --原初の種 +12580477 1 --サンダー・ボルト +83764718 1 --死者蘇生 +46060017 1 --十二獣の会局 +52340444 1 --閃刀機-ホーネットビット +32807846 1 --増援 +72892473 1 --手札抹殺 +73628505 1 --テラ・フォーミング +13035077 1 --ドラゴニックD +18144506 1 --ハーピィの羽根帚 +75500286 1 --封印の黄金櫃 +53208660 1 --ペンデュラム・コール +73468603 1 --盆回し +76375976 1 --魔鍾洞 +93600443 1 --マスク・チェンジ・セカンド +15854426 1 --霞の谷の神風 +05851097 1 --虚無空間 +61740673 1 --王宮の勅命 +21076084 1 --トリックスター・リンカーネイション +89208725 1 --メタバース +#semi limit +50720316 2 --E・HERO シャドー・ミスト +78080961 2 --SPYRAL-ジーニアス +14536035 2 --ダーク・グレファー +82385847 2 --ダイナレスラー・パンクラトプス +61283655 2 --トリックスター・キャンディナ +14558127 2 --灰流うらら +35272499 2 --捕食植物オフリス・スコーピオ +16188701 2 --レディ・デバッガー +47325505 2 --化石調査 +67723438 2 --緊急テレポート +99330325 2 --妨げられた壊獣の眠り +73915051 2 --スケープ・ゴート +54631665 2 --SPYRAL RESORT +98338152 2 --閃刀機-ウィドウアンカー +63166095 2 --閃刀起動-エンゲージ +91623717 2 --連鎖爆撃 +48130397 2 --超融合 +11110587 2 --隣の芝刈り +08949584 2 --ヒーローアライブ +58577036 2 --名推理 +14733538 2 --竜呼相打つ +02295440 2 --ワン・フォー・ワン +53936268 2 --パーソナル・スプーフィング + +!2019.7 +#forbidden +91869203 0 --アマゾネスの射手 +20663556 0 --イレカエル +44910027 0 --ヴィクトリー・ドラゴン +25862681 0 --エンシェント・フェアリー・ドラゴン +53804307 0 --焔征竜-ブラスター +07563579 0 --Emヒグルミ +17330916 0 --EMモンキーボード +90411554 0 --巌征竜-レドックス +11384280 0 --キャノン・ソルジャー +17412721 0 --旧神ノーデン +67441435 0 --グローアップ・バルブ +34124316 0 --サイバーポッド +88071625 0 --The tyrant NEPTUNE +61665245 0 --サモン・ソーサレス +48905153 0 --十二獣ドランシア +85115440 0 --十二獣ブルホーン +21593977 0 --処刑人-マキュラ +21377582 0 --真竜剣皇マスターP +16923472 0 --ゼンマイハンター +15341821 0 --ダンディライオン +18326736 0 --星守の騎士 プトレマイオス +79875176 0 --トゥーン・キャノン・ソルジャー +39064822 0 --トロイメア・ゴブリン +03679218 0 --トロイメア・マーメイド +54719828 0 --No.16 色の支配者ショック・ルーラー +58820923 0 --No.95 ギャラクシーアイズ・ダークマター・ドラゴン +26400609 0 --瀑征竜-タイダル +71525232 0 --破滅竜ガンドラX +05043010 0 --ファイアウォール・ドラゴン +78706415 0 --ファイバーポッド +93369354 0 --フィッシュボーグ-ガンナー +23558733 0 --フェニキシアン・クラスター・アマリリス +09929398 0 --BF-朧影のゴウフウ +09047460 0 --BF-隠れ蓑のスチーム +31178212 0 --マジェスペクター・ユニコーン +34206604 0 --魔導サイエンティスト +04423206 0 --M.X-セイバー インヴォーカー +14702066 0 --メガキャノン・ソルジャー +96782886 0 --メンタルマスター +03078576 0 --八汰烏 +34086406 0 --ラヴァルバル・チェイン +88264978 0 --レッドアイズ・ダークネスメタルドラゴン +57421866 0 --レベル・スティーラー +41482598 0 --悪夢の蜃気楼 +44763025 0 --いたずら好きな双子悪魔 +17375316 0 --押収 +19613556 0 --大嵐 +74191942 0 --苦渋の選択 +42829885 0 --強引な番兵 +45986603 0 --強奪 +55144522 0 --強欲な壺 +04031928 0 --心変わり +23557835 0 --次元融合 +46060017 0 --十二獣の会局 +31423101 0 --神剣-フェニックスブレード +57953380 0 --生還の宝札 +60682203 0 --大寒波 +69243953 0 --蝶の短剣-エルマ +79571449 0 --天使の施し +13035077 0 --ドラゴニックD +70828912 0 --早すぎた埋葬 +42703248 0 --ハリケーン +34906152 0 --マスドライバー +46448938 0 --魔導書の神判 +46411259 0 --突然変異 +85602018 0 --遺言状 +27174286 0 --異次元からの帰還 +93016201 0 --王宮の弾圧 +03280747 0 --第六感 +64697231 0 --ダスト・シュート +80604091 0 --血の代償 +35316708 0 --刻の封印 +32723153 0 --マジカル・エクスプロージョン +17178486 0 --ライフチェンジャー +28566710 0 --ラストバトル! +#limit +64034255 1 --A・ジェネクス・バードマン +76794549 1 --アストログラフ・マジシャン +50720316 1 --E・HERO シャドー・ミスト +40318957 1 --EMドクロバット・ジョーカー +42790071 1 --オルターガイスト・マルチフェイカー +50588353 1 --水晶機巧-ハリファイバー +12289247 1 --クロノグラフ・マジシャン +49684352 1 --虹彩の魔術師 +74586817 1 --PSYフレームロード・Ω +26889158 1 --転生炎獣ガゼル +78872731 1 --十二獣モルモラット +06602300 1 --重爆撃禽 ボム・フェネクス +28985331 1 --終末の騎士 +75286621 1 --召喚獣メルカバー +78868119 1 --深海のディーヴァ +81275020 1 --SRベイゴマックス +63288573 1 --閃刀姫-カガリ +44335251 1 --魂喰いオヴィラプター +73941492 1 --調弦の魔術師 +15291624 1 --超雷龍-サンダー・ドラゴン +75732622 1 --トーチ・ゴーレム +16226786 1 --深淵の暗殺者 +28297833 1 --ネクロフェイス +69610326 1 --覇王眷竜ダークヴルム +70583986 1 --氷結界の虎王ドゥローレン +33396948 1 --封印されしエクゾディア +44519536 1 --封印されし者の左足 +07902349 1 --封印されし者の左腕 +08124921 1 --封印されし者の右足 +70903634 1 --封印されし者の右腕 +35272499 1 --捕食植物オフリス・スコーピオ +24094258 1 --ヘビーメタルフォーゼ・エレクトラム +36042004 1 --ベビケラサウルス +10802915 1 --魔界発現世行きデスガイド +41386308 1 --マスマティシャン +33508719 1 --メタモルポット +89463537 1 --ユニコールの影霊衣 +83107873 1 --雷鳥龍-サンダー・ドラゴン +89399912 1 --嵐征竜-テンペスト +92746535 1 --竜剣士ラスターP +16188701 1 --レディ・デバッガー +48686504 1 --ローンファイア・ブロッサム +33782437 1 --一時休戦 +66957584 1 --インフェルニティガン +81439173 1 --おろかな埋葬 +45305419 1 --継承の印 +23701465 1 --原初の種 +99330325 1 --妨げられた壊獣の眠り +12580477 1 --サンダー・ボルト +83764718 1 --死者蘇生 +54631665 1 --SPYRAL RESORT +52340444 1 --閃刀機-ホーネットビット +32807846 1 --増援 +54447022 1 --ソウル・チャージ +72892473 1 --手札抹殺 +73628505 1 --テラ・フォーミング +18144506 1 --ハーピィの羽根帚 +75500286 1 --封印の黄金櫃 +53208660 1 --ペンデュラム・コール +73468603 1 --盆回し +93600443 1 --マスク・チェンジ・セカンド +15854426 1 --霞の谷の神風 +58577036 1 --名推理 +14733538 1 --竜呼相打つ +02295440 1 --ワン・フォー・ワン +05851097 1 --虚無空間 +61740673 1 --王宮の勅命 +21076084 1 --トリックスター・リンカーネイション +89208725 1 --メタバース +#semi limit +01561110 2 --ABC-ドラゴン・バスター +78080961 2 --SPYRAL-ジーニアス +65192027 2 --ダーク・アームド・ドラゴン +14536035 2 --ダーク・グレファー +82385847 2 --ダイナレスラー・パンクラトプス +90953320 2 --TG ハイパー・ライブラリアン +69015963 2 --デビル・フランケン +61283655 2 --トリックスター・キャンディナ +14558127 2 --灰流うらら +52687916 2 --氷結界の龍 トリシューラ +47325505 2 --化石調査 +67723438 2 --緊急テレポート +73915051 2 --スケープ・ゴート +98338152 2 --閃刀機-ウィドウアンカー +63166095 2 --閃刀起動-エンゲージ +91623717 2 --連鎖爆撃 +48130397 2 --超融合 +11110587 2 --隣の芝刈り +97211663 2 --影霊衣の反魂術 +08949584 2 --ヒーローアライブ +76375976 2 --魔鍾洞 +23171610 2 --リミッター解除 +40605147 2 --神の通告 +53936268 2 --パーソナル・スプーフィング + +!2019.4 +#forbidden +91869203 0 --アマゾネスの射手 +79875176 0 --トゥーン・キャノン・ソルジャー +11384280 0 --キャノン・ソルジャー +32723153 0 --マジカル·エクスプロージョン +20663556 0 --イレカエル +44910027 0 --ヴィクトリー・ドラゴン +25862681 0 --エンシェント・フェアリー・ドラゴン +53804307 0 --焔征竜-ブラスター +07563579 0 --Emヒグルミ +17330916 0 --EMモンキーボード +90411554 0 --巌征竜-レドックス +17412721 0 --旧神ノーデン +67441435 0 --グローアップ・バルブ +34124316 0 --サイバーポッド +88071625 0 --The tyrant NEPTUNE +61665245 0 --サモン・ソーサレス +48905153 0 --十二獣ドランシア +85115440 0 --十二獣ブルホーン +21593977 0 --処刑人-マキュラ +21377582 0 --真竜剣皇マスターP +16923472 0 --ゼンマイハンター +15341821 0 --ダンディライオン +18326736 0 --星守の騎士 プトレマイオス +39064822 0 --トロイメア・ゴブリン +58820923 0 --No.95 ギャラクシーアイズ・ダークマター・ドラゴン +54719828 0 --No.16 色の支配者ショック・ルーラー +26400609 0 --瀑征竜-タイダル +05043010 0 --ファイアウォール・ドラゴン +78706415 0 --ファイバーポッド +93369354 0 --フィッシュボーグ-ガンナー +23558733 0 --フェニキシアン・クラスター・アマリリス +09929398 0 --BF−朧影のゴウフウ +09047460 0 --BF−隠れ蓑のスチーム +31178212 0 --マジェスペクター・ユニコーン +34206604 0 --魔導サイエンティスト +04423206 0 --M.X-セイバー インヴォーカー +14702066 0 --メガキャノン・ソルジャー +96782886 0 --メンタルマスター +03078576 0 --八汰烏 +34086406 0 --ラヴァルバル・チェイン +88264978 0 --レッドアイズ·ダークネスメタルドラゴン +57421866 0 --レベル・スティーラー +41482598 0 --悪夢の蜃気楼 +44763025 0 --いたずら好きな双子悪魔 +19613556 0 --大嵐 +17375316 0 --押収 +74191942 0 --苦渋の選択 +42829885 0 --強引な番兵 +45986603 0 --強奪 +55144522 0 --強欲な壺 +04031928 0 --心変わり +46060017 0 --十二獣の会局 +31423101 0 --神剣-フェニックスブレード +23557835 0 --次元融合 +57953380 0 --生還の宝札 +60682203 0 --大寒波 +69243953 0 --蝶の短剣-エルマ +79571449 0 --天使の施し +13035077 0 --ドラゴニックD +70828912 0 --早すぎた埋葬 +42703248 0 --ハリケーン +34906152 0 --マスドライバー +46448938 0 --魔導書の神判 +46411259 0 --突然変異 +85602018 0 --遺言状 +27174286 0 --異次元からの帰還 +93016201 0 --王宮の弾圧 +03280747 0 --第六感 +64697231 0 --ダスト·シュート +80604091 0 --血の代償 +35316708 0 --刻の封印 +17178486 0 --ライフチェンジャー +28566710 0 --ラストバトル! +#limit +24094258 1 --ヘビーメタルフォーゼ・エレクトラム +76794549 1 --アストログラフ・マジシャン +73941492 1 --調弦の魔術師 +52340444 1 --閃刀機-ホーネットビット +73468603 1 --盆回し +64034255 1 --A·ジェネクス·バードマン +01561110 1 --ABC-ドラゴン・バスター +50720316 1 --E·HERO シャドー·ミスト +40318957 1 --EMドクロバット・ジョーカー +42790071 1 --オルターガイスト・マルチフェイカー +50588353 1 --水晶機巧-ハリファイバー +12289247 1 --クロノグラフ・マジシャン +49684352 1 --虹彩の魔術師 +74586817 1 --PSYフレームロード・Ω +78872731 1 --十二獣モルモラット +06602300 1 --重爆撃禽 ボム・フェネクス +28985331 1 --終末の騎士 +75286621 1 --召喚獣メルカバー +78868119 1 --深海のディーヴァ +78080961 1 --SPYRAL−ジーニアス +81275020 1 --SRベイゴマックス +63288573 1 --閃刀姫-カガリ +65192027 1 --ダーク·アームド·ドラゴン +44335251 1 --魂喰いオヴィラプター +90953320 1 --TG ハイパー·ライブラリアン +69015963 1 --デビル・フランケン +75732622 1 --トーチ・ゴーレム +16226786 1 --深淵の暗殺者 +28297833 1 --ネクロフェイス +69610326 1 --覇王眷竜ダークヴルム +70583986 1 --氷結界の虎王ドゥローレン +52687916 1 --氷結界の龍 トリシューラ +33396948 1 --封印されしエクゾディア +07902349 1 --封印されし者の左腕 +70903634 1 --封印されし者の右腕 +44519536 1 --封印されし者の左足 +08124921 1 --封印されし者の右足 +35272499 1 --捕食植物オフリス・スコーピオ +36042004 1 --ベビケラサウルス +10802915 1 --魔界発現世行きデスガイド +41386308 1 --マスマティシャン +33508719 1 --メタモルポット +89463537 1 --ユニコールの影霊衣 +89399912 1 --嵐征竜-テンペスト +92746535 1 --竜剣士ラスターP +48686504 1 --ローンファイア・ブロッサム +33782437 1 --一時休戦 +66957584 1 --インフェルニティガン +81439173 1 --おろかな埋葬 +23701465 1 --原初の種 +99330325 1 --妨げられた壊獣の眠り +45305419 1 --継承の印 +12580477 1 --サンダー·ボルト +83764718 1 --死者蘇生 +54631665 1 --SPYRAL RESORT +32807846 1 --増援 +54447022 1 --ソウル・チャージ +72892473 1 --手札抹殺 +73628505 1 --テラ・フォーミング +97211663 1 --影霊衣の反魂術 +18144506 1 --ハーピィの羽根帚 +75500286 1 --封印の黄金櫃 +53208660 1 --ペンデュラム・コール +93600443 1 --マスク・チェンジ・セカンド +15854426 1 --霞の谷の神風 +58577036 1 --名推理 +14733538 1 --竜呼相打つ +02295440 1 --ワン·フォー·ワン +05851097 1 --虚無空間 +61740673 1 --王宮の勅命 +21076084 1 --トリックスター・リンカーネイション +#semi limit +40044918 2 --E·HERO エアーマン +58984738 2 --真竜拳士ダイナマイトK +61283655 2 --トリックスター・キャンディナ +14558127 2 --灰流うらら +90809975 2 --餅カエル +47325505 2 --化石調査 +67723438 2 --緊急テレポート +73915051 2 --スケープ・ゴート +98338152 2 --閃刀機−ウィドウアンカー +63166095 2 --閃刀起動−エンゲージ +91623717 2 --連鎖爆撃 +11110587 2 --隣の芝刈り +08949584 2 --ヒーローアライブ +23171610 2 --リミッター解除 +48130397 2 --超融合 +23314220 2 --ルドラの魔導書 +41420027 2 --神の宣告 +40605147 2 --神の通告 +36468556 2 --停戦協定 +53936268 2 --パーソナル・スプーフィング + +!2019.1 +#forbidden +91869203 0 --アマゾネスの射手 +79875176 0 --トゥーン・キャノン・ソルジャー +11384280 0 --キャノン・ソルジャー +32723153 0 --マジカル·エクスプロージョン +20663556 0 --イレカエル +44910027 0 --ヴィクトリー・ドラゴン +25862681 0 --エンシェント・フェアリー・ドラゴン +53804307 0 --焔征竜-ブラスター +07563579 0 --Emヒグルミ +17330916 0 --EMモンキーボード +90411554 0 --巌征竜-レドックス +17412721 0 --旧神ノーデン +67441435 0 --グローアップ・バルブ +34124316 0 --サイバーポッド +88071625 0 --The tyrant NEPTUNE +61665245 0 --サモン・ソーサレス +48905153 0 --十二獣ドランシア +85115440 0 --十二獣ブルホーン +21593977 0 --処刑人-マキュラ +21377582 0 --真竜剣皇マスターP +16923472 0 --ゼンマイハンター +15341821 0 --ダンディライオン +18326736 0 --星守の騎士 プトレマイオス +39064822 0 --トロイメア・ゴブリン +58820923 0 --No.95 ギャラクシーアイズ・ダークマター・ドラゴン +54719828 0 --No.16 色の支配者ショック・ルーラー +26400609 0 --瀑征竜-タイダル +05043010 0 --ファイアウォール・ドラゴン +78706415 0 --ファイバーポッド +93369354 0 --フィッシュボーグ-ガンナー +23558733 0 --フェニキシアン・クラスター・アマリリス +09929398 0 --BF−朧影のゴウフウ +09047460 0 --BF−隠れ蓑のスチーム +31178212 0 --マジェスペクター・ユニコーン +34206604 0 --魔導サイエンティスト +04423206 0 --M.X-セイバー インヴォーカー +14702066 0 --メガキャノン・ソルジャー +96782886 0 --メンタルマスター +03078576 0 --八汰烏 +34086406 0 --ラヴァルバル・チェイン +57421866 0 --レベル・スティーラー +41482598 0 --悪夢の蜃気楼 +44763025 0 --いたずら好きな双子悪魔 +19613556 0 --大嵐 +17375316 0 --押収 +74191942 0 --苦渋の選択 +42829885 0 --強引な番兵 +45986603 0 --強奪 +55144522 0 --強欲な壺 +04031928 0 --心変わり +46060017 0 --十二獣の会局 +31423101 0 --神剣-フェニックスブレード +12580477 0 --サンダー·ボルト +23557835 0 --次元融合 +57953380 0 --生還の宝札 +60682203 0 --大寒波 +69243953 0 --蝶の短剣-エルマ +79571449 0 --天使の施し +13035077 0 --ドラゴニックD +70828912 0 --早すぎた埋葬 +42703248 0 --ハリケーン +34906152 0 --マスドライバー +46448938 0 --魔導書の神判 +46411259 0 --突然変異 +85602018 0 --遺言状 +27174286 0 --異次元からの帰還 +93016201 0 --王宮の弾圧 +03280747 0 --第六感 +64697231 0 --ダスト·シュート +80604091 0 --血の代償 +35316708 0 --刻の封印 +17178486 0 --ライフチェンジャー +28566710 0 --ラストバトル! +#limit +24094258 1 --ヘビーメタルフォーゼ・エレクトラム +76794549 1 --アストログラフ・マジシャン +73941492 1 --調弦の魔術師 +52340444 1 --閃刀機-ホーネットビット +73468603 1 --盆回し +64034255 1 --A·ジェネクス·バードマン +01561110 1 --ABC-ドラゴン・バスター +50720316 1 --E·HERO シャドー·ミスト +40318957 1 --EMドクロバット・ジョーカー +42790071 1 --オルターガイスト・マルチフェイカー +50588353 1 --水晶機巧-ハリファイバー +12289247 1 --クロノグラフ・マジシャン +49684352 1 --虹彩の魔術師 +74586817 1 --PSYフレームロード・Ω +78872731 1 --十二獣モルモラット +06602300 1 --重爆撃禽 ボム・フェネクス +75286621 1 --召喚獣メルカバー +78868119 1 --深海のディーヴァ +58984738 1 --真竜拳士ダイナマイトK +78080961 1 --SPYRAL−ジーニアス +63288573 1 --閃刀姫-カガリ +65192027 1 --ダーク·アームド·ドラゴン +44335251 1 --魂喰いオヴィラプター +90953320 1 --TG ハイパー·ライブラリアン +69015963 1 --デビル・フランケン +75732622 1 --トーチ・ゴーレム +16226786 1 --深淵の暗殺者 +28297833 1 --ネクロフェイス +69610326 1 --覇王眷竜ダークヴルム +70583986 1 --氷結界の虎王ドゥローレン +52687916 1 --氷結界の龍 トリシューラ +33396948 1 --封印されしエクゾディア +07902349 1 --封印されし者の左腕 +70903634 1 --封印されし者の右腕 +44519536 1 --封印されし者の左足 +08124921 1 --封印されし者の右足 +35272499 1 --捕食植物オフリス・スコーピオ +36042004 1 --ベビケラサウルス +10802915 1 --魔界発現世行きデスガイド +41386308 1 --マスマティシャン +33508719 1 --メタモルポット +90809975 1 --餅カエル +89463537 1 --ユニコールの影霊衣 +89399912 1 --嵐征竜-テンペスト +92746535 1 --竜剣士ラスターP +88264978 1 --レッドアイズ·ダークネスメタルドラゴン +48686504 1 --ローンファイア・ブロッサム +33782437 1 --一時休戦 +66957584 1 --インフェルニティガン +81439173 1 --おろかな埋葬 +23701465 1 --原初の種 +99330325 1 --妨げられた壊獣の眠り +45305419 1 --継承の印 +83764718 1 --死者蘇生 +54631665 1 --SPYRAL RESORT +32807846 1 --増援 +54447022 1 --ソウル・チャージ +72892473 1 --手札抹殺 +73628505 1 --テラ・フォーミング +97211663 1 --影霊衣の反魂術 +18144506 1 --ハーピィの羽根帚 +08949584 1 --ヒーローアライブ +75500286 1 --封印の黄金櫃 +53208660 1 --ペンデュラム・コール +93600443 1 --マスク・チェンジ・セカンド +15854426 1 --霞の谷の神風 +58577036 1 --名推理 +23171610 1 --リミッター解除 +14733538 1 --竜呼相打つ +02295440 1 --ワン·フォー·ワン +05851097 1 --虚無空間 +61740673 1 --王宮の勅命 +21076084 1 --トリックスター・リンカーネイション +#semi limit +40044918 2 --E·HERO エアーマン +68819554 2 --Emダメージ・ジャグラー +65536818 2 --源竜星-ボウテンコウ +81275020 2 --SRベイゴマックス +61283655 2 --トリックスター・キャンディナ +14558127 2 --灰流うらら +55623480 2 --妖精伝姫−シラユキ +47325505 2 --化石調査 +67723438 2 --緊急テレポート +73915051 2 --スケープ・ゴート +98338152 2 --閃刀機−ウィドウアンカー +63166095 2 --閃刀起動−エンゲージ +91623717 2 --連鎖爆撃 +11110587 2 --隣の芝刈り +48130397 2 --超融合 +66399653 2 --ユニオン格納庫 +23314220 2 --ルドラの魔導書 +84749824 2 --神の警告 +41420027 2 --神の宣告 +40605147 2 --神の通告 +36468556 2 --停戦協定 +53936268 2 --パーソナル・スプーフィング + +!2018.10 +#forbidden +91869203 0 --アマゾネスの射手 +79875176 0 --トゥーン・キャノン・ソルジャー +11384280 0 --キャノン・ソルジャー +32723153 0 --マジカル·エクスプロージョン +20663556 0 --イレカエル +44910027 0 --ヴィクトリー・ドラゴン +25862681 0 --エンシェント・フェアリー・ドラゴン +53804307 0 --焔征竜-ブラスター +07563579 0 --Emヒグルミ +17330916 0 --EMモンキーボード +90411554 0 --巌征竜-レドックス +17412721 0 --旧神ノーデン +34124316 0 --サイバーポッド +88071625 0 --The tyrant NEPTUNE +61665245 0 --サモン・ソーサレス +48905153 0 --十二獣ドランシア +85115440 0 --十二獣ブルホーン +21593977 0 --処刑人-マキュラ +21377582 0 --真竜剣皇マスターP +16923472 0 --ゼンマイハンター +18326736 0 --星守の騎士 プトレマイオス +54719828 0 --No.16 色の支配者ショック・ルーラー +26400609 0 --瀑征竜-タイダル +78706415 0 --ファイバーポッド +93369354 0 --フィッシュボーグ-ガンナー +23558733 0 --フェニキシアン・クラスター・アマリリス +09929398 0 --BF−朧影のゴウフウ +31178212 0 --マジェスペクター・ユニコーン +34206604 0 --魔導サイエンティスト +14702066 0 --メガキャノン・ソルジャー +96782886 0 --メンタルマスター +03078576 0 --八汰烏 +34086406 0 --ラヴァルバル・チェイン +57421866 0 --レベル・スティーラー +41482598 0 --悪夢の蜃気楼 +44763025 0 --いたずら好きな双子悪魔 +19613556 0 --大嵐 +17375316 0 --押収 +74191942 0 --苦渋の選択 +42829885 0 --強引な番兵 +45986603 0 --強奪 +55144522 0 --強欲な壺 +04031928 0 --心変わり +46060017 0 --十二獣の会局 +12580477 0 --サンダー·ボルト +23557835 0 --次元融合 +57953380 0 --生還の宝札 +60682203 0 --大寒波 +69243953 0 --蝶の短剣-エルマ +79571449 0 --天使の施し +13035077 0 --ドラゴニックD +70828912 0 --早すぎた埋葬 +42703248 0 --ハリケーン +34906152 0 --マスドライバー +46448938 0 --魔導書の神判 +46411259 0 --突然変異 +85602018 0 --遺言状 +27174286 0 --異次元からの帰還 +93016201 0 --王宮の弾圧 +03280747 0 --第六感 +64697231 0 --ダスト·シュート +80604091 0 --血の代償 +35316708 0 --刻の封印 +17178486 0 --ライフチェンジャー +28566710 0 --ラストバトル! +#limit +24094258 1 --ヘビーメタルフォーゼ・エレクトラム +76794549 1 --アストログラフ・マジシャン +73941492 1 --調弦の魔術師 +52340444 1 --閃刀機-ホーネットビット +73468603 1 --盆回し +64034255 1 --A·ジェネクス·バードマン +01561110 1 --ABC-ドラゴン・バスター +50720316 1 --E·HERO シャドー·ミスト +68819554 1 --Emダメージ・ジャグラー +40318957 1 --EMドクロバット・ジョーカー +65536818 1 --源竜星-ボウテンコウ +49684352 1 --虹彩の魔術師 +74586817 1 --PSYフレームロード・Ω +78872731 1 --十二獣モルモラット +06602300 1 --重爆撃禽 ボム・フェネクス +75286621 1 --召喚獣メルカバー +78868119 1 --深海のディーヴァ +58984738 1 --真竜拳士ダイナマイトK +78080961 1 --SPYRAL−ジーニアス +65192027 1 --ダーク·アームド·ドラゴン +44335251 1 --魂喰いオヴィラプター +15341821 1 --ダンディライオン +90953320 1 --TG ハイパー·ライブラリアン +69015963 1 --デビル・フランケン +75732622 1 --トーチ・ゴーレム +39064822 1 --トロイメア・ゴブリン +16226786 1 --深淵の暗殺者 +28297833 1 --ネクロフェイス +69610326 1 --覇王眷竜ダークヴルム +70583986 1 --氷結界の虎王ドゥローレン +52687916 1 --氷結界の龍 トリシューラ +05043010 1 --ファイアウォール・ドラゴン +33396948 1 --封印されしエクゾディア +07902349 1 --封印されし者の左腕 +70903634 1 --封印されし者の右腕 +44519536 1 --封印されし者の左足 +08124921 1 --封印されし者の右足 +55623480 1 --妖精伝姫−シラユキ +09047460 1 --BF−隠れ蓑のスチーム +35272499 1 --捕食植物オフリス・スコーピオ +36042004 1 --ベビケラサウルス +10802915 1 --魔界発現世行きデスガイド +33508719 1 --メタモルポット +90809975 1 --餅カエル +89463537 1 --ユニコールの影霊衣 +89399912 1 --嵐征竜-テンペスト +92746535 1 --竜剣士ラスターP +88264978 1 --レッドアイズ·ダークネスメタルドラゴン +48686504 1 --ローンファイア・ブロッサム +33782437 1 --一時休戦 +66957584 1 --インフェルニティガン +81439173 1 --おろかな埋葬 +23701465 1 --原初の種 +99330325 1 --妨げられた壊獣の眠り +45305419 1 --継承の印 +83764718 1 --死者蘇生 +54631665 1 --SPYRAL RESORT +32807846 1 --増援 +54447022 1 --ソウル・チャージ +72892473 1 --手札抹殺 +73628505 1 --テラ・フォーミング +97211663 1 --影霊衣の反魂術 +18144506 1 --ハーピィの羽根帚 +08949584 1 --ヒーローアライブ +75500286 1 --封印の黄金櫃 +53208660 1 --ペンデュラム・コール +93600443 1 --マスク・チェンジ・セカンド +15854426 1 --霞の谷の神風 +58577036 1 --名推理 +23171610 1 --リミッター解除 +14733538 1 --竜呼相打つ +23314220 1 --ルドラの魔導書 +02295440 1 --ワン·フォー·ワン +05851097 1 --虚無空間 +61740673 1 --王宮の勅命 +36468556 1 --停戦協定 +21076084 1 --トリックスター・リンカーネイション +#semi limit +40044918 2 --E·HERO エアーマン +42790071 2 --オルターガイスト・マルチフェイカー +81275020 2 --SRベイゴマックス +14558127 2 --灰流うらら +83531441 2 --彼岸の旅人 ダンテ +26674724 2 --ブリューナクの影霊衣 +47325505 2 --化石調査 +67723438 2 --緊急テレポート +73915051 2 --スケープ・ゴート +98338152 2 --閃刀機−ウィドウアンカー +63166095 2 --閃刀起動−エンゲージ +91623717 2 --連鎖爆撃 +11110587 2 --隣の芝刈り +48130397 2 --超融合 +66399653 2 --ユニオン格納庫 +84749824 2 --神の警告 +41420027 2 --神の宣告 +40605147 2 --神の通告 +35125879 2 --真竜皇の復活 +83555666 2 --破壊輪 + +!2018.7 +#forbidden +79875176 0 --トゥーン・キャノン・ソルジャー +11384280 0 --キャノン・ソルジャー +32723153 0 --マジカル·エクスプロージョン +20663556 0 --イレカエル +44910027 0 --ヴィクトリー・ドラゴン +25862681 0 --エンシェント・フェアリー・ドラゴン +53804307 0 --焔征竜-ブラスター +68819554 0 --Emダメージ・ジャグラー +07563579 0 --Emヒグルミ +17330916 0 --EMモンキーボード +90411554 0 --巌征竜-レドックス +17412721 0 --旧神ノーデン +34124316 0 --サイバーポッド +88071625 0 --The tyrant NEPTUNE +48905153 0 --十二獣ドランシア +85115440 0 --十二獣ブルホーン +21593977 0 --処刑人-マキュラ +21377582 0 --真竜剣皇マスターP +16923472 0 --ゼンマイハンター +18326736 0 --星守の騎士 プトレマイオス +54719828 0 --No.16 色の支配者ショック・ルーラー +26400609 0 --瀑征竜-タイダル +78706415 0 --ファイバーポッド +93369354 0 --フィッシュボーグ-ガンナー +23558733 0 --フェニキシアン・クラスター・アマリリス +09929398 0 --BF−朧影のゴウフウ +31178212 0 --マジェスペクター・ユニコーン +34206604 0 --魔導サイエンティスト +96782886 0 --メンタルマスター +03078576 0 --八汰烏 +34086406 0 --ラヴァルバル・チェイン +89399912 0 --嵐征竜-テンペスト +57421866 0 --レベル・スティーラー +41482598 0 --悪夢の蜃気楼 +44763025 0 --いたずら好きな双子悪魔 +19613556 0 --大嵐 +17375316 0 --押収 +74191942 0 --苦渋の選択 +42829885 0 --強引な番兵 +45986603 0 --強奪 +55144522 0 --強欲な壺 +04031928 0 --心変わり +46060017 0 --十二獣の会局 +12580477 0 --サンダー·ボルト +23557835 0 --次元融合 +57953380 0 --生還の宝札 +60682203 0 --大寒波 +69243953 0 --蝶の短剣-エルマ +79571449 0 --天使の施し +13035077 0 --ドラゴニックD +70828912 0 --早すぎた埋葬 +42703248 0 --ハリケーン +34906152 0 --マスドライバー +46448938 0 --魔導書の神判 +46411259 0 --突然変異 +85602018 0 --遺言状 +27174286 0 --異次元からの帰還 +93016201 0 --王宮の弾圧 +03280747 0 --第六感 +64697231 0 --ダスト·シュート +80604091 0 --血の代償 +35316708 0 --刻の封印 +17178486 0 --ライフチェンジャー +28566710 0 --ラストバトル! +#limit +24094258 1 --ヘビーメタルフォーゼ・エレクトラム +76794549 1 --アストログラフ・マジシャン +73941492 1 --調弦の魔術師 +52340444 1 --閃刀機-ホーネットビット +73468603 1 --盆回し +64034255 1 --A·ジェネクス·バードマン +01561110 1 --ABC-ドラゴン・バスター +50720316 1 --E·HERO シャドー·ミスト +40318957 1 --EMドクロバット・ジョーカー +65536818 1 --源竜星-ボウテンコウ +49684352 1 --虹彩の魔術師 +74586817 1 --PSYフレームロード・Ω +78872731 1 --十二獣モルモラット +06602300 1 --重爆撃禽 ボム・フェネクス +75286621 1 --召喚獣メルカバー +78868119 1 --深海のディーヴァ +58984738 1 --真竜拳士ダイナマイトK +78080961 1 --SPYRAL−ジーニアス +65192027 1 --ダーク·アームド·ドラゴン +44335251 1 --魂喰いオヴィラプター +15341821 1 --ダンディライオン +90953320 1 --TG ハイパー·ライブラリアン +69015963 1 --デビル・フランケン +75732622 1 --トーチ・ゴーレム +16226786 1 --深淵の暗殺者 +28297833 1 --ネクロフェイス +69610326 1 --覇王眷竜ダークヴルム +83531441 1 --彼岸の旅人 ダンテ +70583986 1 --氷結界の虎王ドゥローレン +52687916 1 --氷結界の龍 トリシューラ +05043010 1 --ファイアウォール・ドラゴン +33396948 1 --封印されしエクゾディア +07902349 1 --封印されし者の左腕 +70903634 1 --封印されし者の右腕 +44519536 1 --封印されし者の左足 +08124921 1 --封印されし者の右足 +55623480 1 --妖精伝姫−シラユキ +09047460 1 --BF−隠れ蓑のスチーム +26674724 1 --ブリューナクの影霊衣 +35272499 1 --捕食植物オフリス・スコーピオ +36042004 1 --ベビケラサウルス +10802915 1 --魔界発現世行きデスガイド +33508719 1 --メタモルポット +90809975 1 --餅カエル +89463537 1 --ユニコールの影霊衣 +92746535 1 --竜剣士ラスターP +88264978 1 --レッドアイズ·ダークネスメタルドラゴン +48686504 1 --ローンファイア・ブロッサム +33782437 1 --一時休戦 +66957584 1 --インフェルニティガン +81439173 1 --おろかな埋葬 +23701465 1 --原初の種 +99330325 1 --妨げられた壊獣の眠り +45305419 1 --継承の印 +83764718 1 --死者蘇生 +54631665 1 --SPYRAL RESORT +32807846 1 --増援 +54447022 1 --ソウル・チャージ +48130397 1 --超融合 +72892473 1 --手札抹殺 +73628505 1 --テラ・フォーミング +97211663 1 --影霊衣の反魂術 +18144506 1 --ハーピィの羽根帚 +53208660 1 --ペンデュラム・コール +93600443 1 --マスク・チェンジ・セカンド +15854426 1 --霞の谷の神風 +58577036 1 --名推理 +23171610 1 --リミッター解除 +14733538 1 --竜呼相打つ +23314220 1 --ルドラの魔導書 +02295440 1 --ワン·フォー·ワン +05851097 1 --虚無空間 +61740673 1 --王宮の勅命 +35125879 1 --真竜皇の復活 +36468556 1 --停戦協定 +21076084 1 --トリックスター・リンカーネイション +83555666 1 --破壊輪 +#semi limit +67723438 2 --緊急テレポート +56570271 2 --D-HERO ディスクガイ +04474060 2 --SPYRAL GEAR−ドローン +81275020 2 --SRベイゴマックス +94977269 2 --エルシャドール・ミドラーシュ +20366274 2 --エルシャドール・ネフィリム +45222299 2 --イビリチュア·ガストクラーケ +40044918 2 --E·HERO エアーマン +86120751 2 --召喚師アレイスター +14558127 2 --灰流うらら +47325505 2 --化石調査 +73915051 2 --スケープ・ゴート +91623717 2 --連鎖爆撃 +66399653 2 --ユニオン格納庫 +84749824 2 --神の警告 +41420027 2 --神の宣告 +40605147 2 --神の通告 + +!2018.4 +#forbidden +20663556 0 --イレカエル +44910027 0 --ヴィクトリー・ドラゴン +25862681 0 --エンシェント・フェアリー・ドラゴン +53804307 0 --焔征竜-ブラスター +68819554 0 --Emダメージ・ジャグラー +07563579 0 --Emヒグルミ +17330916 0 --EMモンキーボード +90411554 0 --巌征竜-レドックス +17412721 0 --旧神ノーデン +34124316 0 --サイバーポッド +88071625 0 --The tyrant NEPTUNE +48905153 0 --十二獣ドランシア +85115440 0 --十二獣ブルホーン +21593977 0 --処刑人-マキュラ +21377582 0 --真竜剣皇マスターP +16923472 0 --ゼンマイハンター +18326736 0 --星守の騎士 プトレマイオス +54719828 0 --No.16 色の支配者ショック・ルーラー +26400609 0 --瀑征竜-タイダル +78706415 0 --ファイバーポッド +93369354 0 --フィッシュボーグ-ガンナー +23558733 0 --フェニキシアン・クラスター・アマリリス +09929398 0 --BF−朧影のゴウフウ +31178212 0 --マジェスペクター・ユニコーン +34206604 0 --魔導サイエンティスト +96782886 0 --メンタルマスター +03078576 0 --八汰烏 +34086406 0 --ラヴァルバル・チェイン +89399912 0 --嵐征竜-テンペスト +57421866 0 --レベル・スティーラー +41482598 0 --悪夢の蜃気楼 +44763025 0 --いたずら好きな双子悪魔 +19613556 0 --大嵐 +17375316 0 --押収 +74191942 0 --苦渋の選択 +42829885 0 --強引な番兵 +45986603 0 --強奪 +55144522 0 --強欲な壺 +04031928 0 --心変わり +46060017 0 --十二獣の会局 +12580477 0 --サンダー·ボルト +23557835 0 --次元融合 +57953380 0 --生還の宝札 +60682203 0 --大寒波 +69243953 0 --蝶の短剣-エルマ +79571449 0 --天使の施し +13035077 0 --ドラゴニックD +70828912 0 --早すぎた埋葬 +42703248 0 --ハリケーン +34906152 0 --マスドライバー +46448938 0 --魔導書の神判 +46411259 0 --突然変異 +85602018 0 --遺言状 +27174286 0 --異次元からの帰還 +93016201 0 --王宮の弾圧 +03280747 0 --第六感 +64697231 0 --ダスト·シュート +80604091 0 --血の代償 +35316708 0 --刻の封印 +17178486 0 --ライフチェンジャー +28566710 0 --ラストバトル! +#limit +64034255 1 --A·ジェネクス·バードマン +01561110 1 --ABC-ドラゴン・バスター +20366274 1 --エルシャドール・ネフィリム +94977269 1 --エルシャドール・ミドラーシュ +50720316 1 --E·HERO シャドー·ミスト +40318957 1 --EMドクロバット・ジョーカー +65536818 1 --源竜星-ボウテンコウ +49684352 1 --虹彩の魔術師 +74586817 1 --PSYフレームロード・Ω +78872731 1 --十二獣モルモラット +06602300 1 --重爆撃禽 ボム・フェネクス +75286621 1 --召喚獣メルカバー +78868119 1 --深海のディーヴァ +58984738 1 --真竜拳士ダイナマイトK +04474060 1 --SPYRAL GEAR−ドローン +78080961 1 --SPYRAL−ジーニアス +81275020 1 --SRベイゴマックス +65192027 1 --ダーク·アームド·ドラゴン +44335251 1 --魂喰いオヴィラプター +15341821 1 --ダンディライオン +56570271 1 --D-HERO ディスクガイ +90953320 1 --TG ハイパー·ライブラリアン +69015963 1 --デビル・フランケン +75732622 1 --トーチ・ゴーレム +16226786 1 --深淵の暗殺者 +28297833 1 --ネクロフェイス +69610326 1 --覇王眷竜ダークヴルム +83531441 1 --彼岸の旅人 ダンテ +70583986 1 --氷結界の虎王ドゥローレン +52687916 1 --氷結界の龍 トリシューラ +05043010 1 --ファイアウォール・ドラゴン +33396948 1 --封印されしエクゾディア +07902349 1 --封印されし者の左腕 +70903634 1 --封印されし者の右腕 +44519536 1 --封印されし者の左足 +08124921 1 --封印されし者の右足 +55623480 1 --妖精伝姫−シラユキ +09047460 1 --BF−隠れ蓑のスチーム +26674724 1 --ブリューナクの影霊衣 +35272499 1 --捕食植物オフリス・スコーピオ +36042004 1 --ベビケラサウルス +10802915 1 --魔界発現世行きデスガイド +33508719 1 --メタモルポット +90809975 1 --餅カエル +89463537 1 --ユニコールの影霊衣 +92746535 1 --竜剣士ラスターP +88264978 1 --レッドアイズ·ダークネスメタルドラゴン +48686504 1 --ローンファイア・ブロッサム +33782437 1 --一時休戦 +66957584 1 --インフェルニティガン +81439173 1 --おろかな埋葬 +23701465 1 --原初の種 +99330325 1 --妨げられた壊獣の眠り +67723438 1 --緊急テレポート +45305419 1 --継承の印 +83764718 1 --死者蘇生 +54631665 1 --SPYRAL RESORT +32807846 1 --増援 +54447022 1 --ソウル・チャージ +48130397 1 --超融合 +72892473 1 --手札抹殺 +73628505 1 --テラ・フォーミング +97211663 1 --影霊衣の反魂術 +18144506 1 --ハーピィの羽根帚 +53208660 1 --ペンデュラム・コール +93600443 1 --マスク・チェンジ・セカンド +15854426 1 --霞の谷の神風 +58577036 1 --名推理 +23171610 1 --リミッター解除 +14733538 1 --竜呼相打つ +23314220 1 --ルドラの魔導書 +02295440 1 --ワン·フォー·ワン +05851097 1 --虚無空間 +61740673 1 --王宮の勅命 +35125879 1 --真竜皇の復活 +36468556 1 --停戦協定 +21076084 1 --トリックスター・リンカーネイション +83555666 1 --破壊輪 +32723153 1 --マジカル·エクスプロージョン +#semi limit +45222299 2 --イビリチュア·ガストクラーケ +43722862 2 --WW-アイス・ベル +40044918 2 --E·HERO エアーマン +86120751 2 --召喚師アレイスター +14558127 2 --灰流うらら +90307777 2 --影霊衣の術士 シュリット +41386308 2 --マスマティシャン +59750328 2 --命削りの宝札 +47325505 2 --化石調査 +49430782 2 --真竜の継承 +73915051 2 --スケープ・ゴート +91623717 2 --連鎖爆撃 +73468603 2 --盆回し +66399653 2 --ユニオン格納庫 +84749824 2 --神の警告 +41420027 2 --神の宣告 +40605147 2 --神の通告 + +!2018.1 +#forbidden +20663556 0 --イレカエル +44910027 0 --ヴィクトリー・ドラゴン +20366274 0 --エルシャドール・ネフィリム +25862681 0 --エンシェント・フェアリー・ドラゴン +53804307 0 --焔征竜-ブラスター +68819554 0 --Emダメージ・ジャグラー +07563579 0 --Emヒグルミ +17330916 0 --EMモンキーボード +90411554 0 --巌征竜-レドックス +17412721 0 --旧神ノーデン +34124316 0 --サイバーポッド +88071625 0 --The tyrant NEPTUNE +48905153 0 --十二獣ドランシア +85115440 0 --十二獣ブルホーン +21593977 0 --処刑人-マキュラ +21377582 0 --真竜剣皇マスターP +16923472 0 --ゼンマイハンター +56570271 0 --D-HERO ディスクガイ +18326736 0 --星守の騎士 プトレマイオス +54719828 0 --No.16 色の支配者ショック・ルーラー +26400609 0 --瀑征竜-タイダル +78706415 0 --ファイバーポッド +93369354 0 --フィッシュボーグ-ガンナー +31178212 0 --マジェスペクター・ユニコーン +34206604 0 --魔導サイエンティスト +96782886 0 --メンタルマスター +03078576 0 --八汰烏 +34086406 0 --ラヴァルバル・チェイン +89399912 0 --嵐征竜-テンペスト +57421866 0 --レベル・スティーラー +41482598 0 --悪夢の蜃気楼 +44763025 0 --いたずら好きな双子悪魔 +19613556 0 --大嵐 +17375316 0 --押収 +74191942 0 --苦渋の選択 +42829885 0 --強引な番兵 +45986603 0 --強奪 +55144522 0 --強欲な壺 +04031928 0 --心変わり +46060017 0 --十二獣の会局 +12580477 0 --サンダー·ボルト +23557835 0 --次元融合 +57953380 0 --生還の宝札 +60682203 0 --大寒波 +69243953 0 --蝶の短剣-エルマ +79571449 0 --天使の施し +13035077 0 --ドラゴニックD +70828912 0 --早すぎた埋葬 +42703248 0 --ハリケーン +34906152 0 --マスドライバー +46448938 0 --魔導書の神判 +46411259 0 --突然変異 +85602018 0 --遺言状 +27174286 0 --異次元からの帰還 +93016201 0 --王宮の弾圧 +03280747 0 --第六感 +64697231 0 --ダスト·シュート +80604091 0 --血の代償 +35316708 0 --刻の封印 +17178486 0 --ライフチェンジャー +28566710 0 --ラストバトル! +#limit +64034255 1 --A·ジェネクス·バードマン +01561110 1 --ABC-ドラゴン・バスター +50720316 1 --E·HERO シャドー·ミスト +40318957 1 --EMドクロバット・ジョーカー +65536818 1 --源竜星-ボウテンコウ +74586817 1 --PSYフレームロード・Ω +78872731 1 --十二獣モルモラット +06602300 1 --重爆撃禽 ボム・フェネクス +86120751 1 --召喚師アレイスター +78868119 1 --深海のディーヴァ +58984738 1 --真竜拳士ダイナマイトK +04474060 1 --SPYRAL GEAR−ドローン +78080961 1 --SPYRAL−ジーニアス +81275020 1 --SRベイゴマックス +65192027 1 --ダーク·アームド·ドラゴン +44335251 1 --魂喰いオヴィラプター +15341821 1 --ダンディライオン +90953320 1 --TG ハイパー·ライブラリアン +69015963 1 --デビル・フランケン +16226786 1 --深淵の暗殺者 +28297833 1 --ネクロフェイス +83531441 1 --彼岸の旅人 ダンテ +70583986 1 --氷結界の虎王ドゥローレン +52687916 1 --氷結界の龍 トリシューラ +05043010 1 --ファイアウォール・ドラゴン +33396948 1 --封印されしエクゾディア +07902349 1 --封印されし者の左腕 +70903634 1 --封印されし者の右腕 +44519536 1 --封印されし者の左足 +08124921 1 --封印されし者の右足 +55623480 1 --妖精伝姫−シラユキ +09929398 1 --BF−朧影のゴウフウ +09047460 1 --BF−隠れ蓑のスチーム +26674724 1 --ブリューナクの影霊衣 +36042004 1 --ベビケラサウルス +10802915 1 --魔界発現世行きデスガイド +33508719 1 --メタモルポット +90809975 1 --餅カエル +89463537 1 --ユニコールの影霊衣 +92746535 1 --竜剣士ラスターP +88264978 1 --レッドアイズ·ダークネスメタルドラゴン +33782437 1 --一時休戦 +66957584 1 --インフェルニティガン +81439173 1 --おろかな埋葬 +23701465 1 --原初の種 +99330325 1 --妨げられた壊獣の眠り +67723438 1 --緊急テレポート +89739383 1 --グリモの魔導書 +45305419 1 --継承の印 +83764718 1 --死者蘇生 +49430782 1 --真竜の継承 +54631665 1 --SPYRAL RESORT +32807846 1 --増援 +54447022 1 --ソウル・チャージ +48130397 1 --超融合 +72892473 1 --手札抹殺 +73628505 1 --テラ・フォーミング +97211663 1 --影霊衣の反魂術 +18144506 1 --ハーピィの羽根帚 +53208660 1 --ペンデュラム・コール +93600443 1 --マスク・チェンジ・セカンド +15854426 1 --霞の谷の神風 +58577036 1 --名推理 +23171610 1 --リミッター解除 +14733538 1 --竜呼相打つ +02295440 1 --ワン·フォー·ワン +05851097 1 --虚無空間 +61740673 1 --王宮の勅命 +41420027 1 --神の宣告 +35125879 1 --真竜皇の復活 +36468556 1 --停戦協定 +21076084 1 --トリックスター・リンカーネイション +83555666 1 --破壊輪 +32723153 1 --マジカル·エクスプロージョン +#semi limit +45222299 2 --イビリチュア·ガストクラーケ +43722862 2 --WW-アイス・ベル +40044918 2 --E·HERO エアーマン +00423585 2 --召喚僧サモンプリースト +33184167 2 --同族感染ウィルス +75732622 2 --トーチ・ゴーレム +90307777 2 --影霊衣の術士 シュリット +41386308 2 --マスマティシャン +10028593 2 --輪廻天狗 +48686504 2 --ローンファイア・ブロッサム +59750328 2 --命削りの宝札 +47325505 2 --化石調査 +73915051 2 --スケープ・ゴート +91623717 2 --連鎖爆撃 +67169062 2 --貪欲な壺 +22842126 2 --汎神の帝王 +73468603 2 --盆回し +43040603 2 --モンスターゲート +66399653 2 --ユニオン格納庫 +84749824 2 --神の警告 +40605147 2 --神の通告 + +!2017.10 +#forbidden +20663556 0 --イレカエル +44910027 0 --ヴィクトリー・ドラゴン +20366274 0 --エルシャドール・ネフィリム +53804307 0 --焔征竜-ブラスター +68819554 0 --Emダメージ・ジャグラー +07563579 0 --Emヒグルミ +17330916 0 --EMモンキーボード +90411554 0 --巌征竜-レドックス +17412721 0 --旧神ノーデン +34124316 0 --サイバーポッド +88071625 0 --The tyrant NEPTUNE +48905153 0 --十二獣ドランシア +85115440 0 --十二獣ブルホーン +21593977 0 --処刑人-マキュラ +21377582 0 --真竜剣皇マスターP +16923472 0 --ゼンマイハンター +56570271 0 --D-HERO ディスクガイ +18326736 0 --星守の騎士 プトレマイオス +54719828 0 --No.16 色の支配者ショック・ルーラー +26400609 0 --瀑征竜-タイダル +78706415 0 --ファイバーポッド +93369354 0 --フィッシュボーグ-ガンナー +31178212 0 --マジェスペクター・ユニコーン +34206604 0 --魔導サイエンティスト +96782886 0 --メンタルマスター +03078576 0 --八汰烏 +34086406 0 --ラヴァルバル・チェイン +89399912 0 --嵐征竜-テンペスト +57421866 0 --レベル・スティーラー +41482598 0 --悪夢の蜃気楼 +44763025 0 --いたずら好きな双子悪魔 +19613556 0 --大嵐 +17375316 0 --押収 +74191942 0 --苦渋の選択 +42829885 0 --強引な番兵 +45986603 0 --強奪 +55144522 0 --強欲な壺 +04031928 0 --心変わり +46060017 0 --十二獣の会局 +12580477 0 --サンダー·ボルト +23557835 0 --次元融合 +57953380 0 --生還の宝札 +60682203 0 --大寒波 +69243953 0 --蝶の短剣-エルマ +79571449 0 --天使の施し +13035077 0 --ドラゴニックD +70828912 0 --早すぎた埋葬 +42703248 0 --ハリケーン +34906152 0 --マスドライバー +46448938 0 --魔導書の神判 +46411259 0 --突然変異 +85602018 0 --遺言状 +27174286 0 --異次元からの帰還 +93016201 0 --王宮の弾圧 +03280747 0 --第六感 +64697231 0 --ダスト·シュート +80604091 0 --血の代償 +35316708 0 --刻の封印 +17178486 0 --ライフチェンジャー +28566710 0 --ラストバトル! +#limit +64034255 1 --A·ジェネクス·バードマン +01561110 1 --ABC-ドラゴン・バスター +50720316 1 --E·HERO シャドー·ミスト +40318957 1 --EMドクロバット・ジョーカー +65536818 1 --源竜星-ボウテンコウ +74586817 1 --PSYフレームロード・Ω +78872731 1 --十二獣モルモラット +06602300 1 --重爆撃禽 ボム・フェネクス +86120751 1 --召喚師アレイスター +78868119 1 --深海のディーヴァ +58984738 1 --真竜拳士ダイナマイトK +81275020 1 --SRベイゴマックス +65192027 1 --ダーク·アームド·ドラゴン +44335251 1 --魂喰いオヴィラプター +90953320 1 --TG ハイパー·ライブラリアン +69015963 1 --デビル・フランケン +33184167 1 --同族感染ウィルス +16226786 1 --深淵の暗殺者 +90307777 1 --影霊衣の術士 シュリット +28297833 1 --ネクロフェイス +83531441 1 --彼岸の旅人 ダンテ +70583986 1 --氷結界の虎王ドゥローレン +52687916 1 --氷結界の龍 トリシューラ +33396948 1 --封印されしエクゾディア +07902349 1 --封印されし者の左腕 +70903634 1 --封印されし者の右腕 +44519536 1 --封印されし者の左足 +08124921 1 --封印されし者の右足 +55623480 1 --妖精伝姫−シラユキ +09929398 1 --BF−朧影のゴウフウ +26674724 1 --ブリューナクの影霊衣 +36042004 1 --ベビケラサウルス +10802915 1 --魔界発現世行きデスガイド +33508719 1 --メタモルポット +90809975 1 --餅カエル +89463537 1 --ユニコールの影霊衣 +92746535 1 --竜剣士ラスターP +88264978 1 --レッドアイズ·ダークネスメタルドラゴン +33782437 1 --一時休戦 +66957584 1 --インフェルニティガン +81439173 1 --おろかな埋葬 +23701465 1 --原初の種 +99330325 1 --妨げられた壊獣の眠り +67723438 1 --緊急テレポート +89739383 1 --グリモの魔導書 +45305419 1 --継承の印 +83764718 1 --死者蘇生 +49430782 1 --真竜の継承 +32807846 1 --増援 +54447022 1 --ソウル・チャージ +48130397 1 --超融合 +72892473 1 --手札抹殺 +73628505 1 --テラ・フォーミング +97211663 1 --影霊衣の反魂術 +18144506 1 --ハーピィの羽根帚 +22842126 1 --汎神の帝王 +53208660 1 --ペンデュラム・コール +93600443 1 --マスク・チェンジ・セカンド +15854426 1 --霞の谷の神風 +58577036 1 --名推理 +23171610 1 --リミッター解除 +14733538 1 --竜呼相打つ +02295440 1 --ワン·フォー·ワン +05851097 1 --虚無空間 +61740673 1 --王宮の勅命 +84749824 1 --神の警告 +41420027 1 --神の宣告 +35125879 1 --真竜皇の復活 +36468556 1 --停戦協定 +21076084 1 --トリックスター・リンカーネイション +83555666 1 --破壊輪 +32723153 1 --マジカル·エクスプロージョン +#semi limit +45222299 2 --イビリチュア·ガストクラーケ +43722862 2 --WW-アイス・ベル +40044918 2 --E·HERO エアーマン +74311226 2 --海皇の竜騎隊 +00423585 2 --召喚僧サモンプリースト +23434538 2 --増殖するG +15341821 2 --ダンディライオン +10028593 2 --輪廻天狗 +59750328 2 --命削りの宝札 +47325505 2 --化石調査 +91623717 2 --連鎖爆撃 +67169062 2 --貪欲な壺 +53129443 2 --ブラック·ホール +77565204 2 --未来融合-フューチャー·フュージョン +43040603 2 --モンスターゲート +66399653 2 --ユニオン格納庫 +40605147 2 --神の通告 + +!2017.7 +#forbidden +20663556 0 --イレカエル +44910027 0 --ヴィクトリー・ドラゴン +20366274 0 --エルシャドール・ネフィリム +53804307 0 --焔征竜-ブラスター +68819554 0 --Emダメージ・ジャグラー +07563579 0 --Emヒグルミ +17330916 0 --EMモンキーボード +90411554 0 --巌征竜-レドックス +17412721 0 --旧神ノーデン +34124316 0 --サイバーポッド +88071625 0 --The tyrant NEPTUNE +48905153 0 --十二獣ドランシア +85115440 0 --十二獣ブルホーン +21593977 0 --処刑人-マキュラ +16923472 0 --ゼンマイハンター +56570271 0 --D-HERO ディスクガイ +18326736 0 --星守の騎士 プトレマイオス +33184167 0 --同族感染ウィルス +54719828 0 --No.16 色の支配者ショック・ルーラー +26400609 0 --瀑征竜-タイダル +78706415 0 --ファイバーポッド +93369354 0 --フィッシュボーグ-ガンナー +31178212 0 --マジェスペクター・ユニコーン +34206604 0 --魔導サイエンティスト +96782886 0 --メンタルマスター +03078576 0 --八汰烏 +34086406 0 --ラヴァルバル・チェイン +89399912 0 --嵐征竜-テンペスト +57421866 0 --レベル・スティーラー +41482598 0 --悪夢の蜃気楼 +44763025 0 --いたずら好きな双子悪魔 +19613556 0 --大嵐 +17375316 0 --押収 +74191942 0 --苦渋の選択 +42829885 0 --強引な番兵 +45986603 0 --強奪 +55144522 0 --強欲な壺 +04031928 0 --心変わり +46060017 0 --十二獣の会局 +12580477 0 --サンダー·ボルト +23557835 0 --次元融合 +57953380 0 --生還の宝札 +60682203 0 --大寒波 +69243953 0 --蝶の短剣-エルマ +79571449 0 --天使の施し +70828912 0 --早すぎた埋葬 +42703248 0 --ハリケーン +34906152 0 --マスドライバー +46448938 0 --魔導書の神判 +46411259 0 --突然変異 +85602018 0 --遺言状 +27174286 0 --異次元からの帰還 +93016201 0 --王宮の弾圧 +03280747 0 --第六感 +64697231 0 --ダスト·シュート +80604091 0 --血の代償 +35316708 0 --刻の封印 +17178486 0 --ライフチェンジャー +28566710 0 --ラストバトル! +#limit +64034255 1 --A·ジェネクス·バードマン +50720316 1 --E·HERO シャドー·ミスト +40318957 1 --EMドクロバット・ジョーカー +74586817 1 --PSYフレームロード・Ω +78872731 1 --十二獣モルモラット +06602300 1 --重爆撃禽 ボム・フェネクス +00423585 1 --召喚僧サモンプリースト +78868119 1 --深海のディーヴァ +21377582 1 --真竜剣皇マスターP +81275020 1 --SRベイゴマックス +65192027 1 --ダーク·アームド·ドラゴン +90953320 1 --TG ハイパー·ライブラリアン +69015963 1 --デビル・フランケン +16226786 1 --深淵の暗殺者 +90307777 1 --影霊衣の術士 シュリット +28297833 1 --ネクロフェイス +83531441 1 --彼岸の旅人 ダンテ +70583986 1 --氷結界の虎王ドゥローレン +52687916 1 --氷結界の龍 トリシューラ +33396948 1 --封印されしエクゾディア +07902349 1 --封印されし者の左腕 +70903634 1 --封印されし者の右腕 +44519536 1 --封印されし者の左足 +08124921 1 --封印されし者の右足 +55623480 1 --妖精伝姫−シラユキ +09929398 1 --BF−朧影のゴウフウ +26674724 1 --ブリューナクの影霊衣 +10802915 1 --魔界発現世行きデスガイド +33508719 1 --メタモルポット +90809975 1 --餅カエル +89463537 1 --ユニコールの影霊衣 +92746535 1 --竜剣士ラスターP +88264978 1 --レッドアイズ·ダークネスメタルドラゴン +33782437 1 --一時休戦 +66957584 1 --インフェルニティガン +81439173 1 --おろかな埋葬 +23701465 1 --原初の種 +99330325 1 --妨げられた壊獣の眠り +67723438 1 --緊急テレポート +45305419 1 --継承の印 +83764718 1 --死者蘇生 +32807846 1 --増援 +54447022 1 --ソウル・チャージ +48130397 1 --超融合 +72892473 1 --手札抹殺 +13035077 1 --ドラゴニックD +67169062 1 --貪欲な壺 +97211663 1 --影霊衣の反魂術 +18144506 1 --ハーピィの羽根帚 +22842126 1 --汎神の帝王 +53208660 1 --ペンデュラム・コール +93600443 1 --マスク・チェンジ・セカンド +15854426 1 --霞の谷の神風 +77565204 1 --未来融合-フューチャー·フュージョン +58577036 1 --名推理 +23171610 1 --リミッター解除 +14733538 1 --竜呼相打つ +02295440 1 --ワン·フォー·ワン +05851097 1 --虚無空間 +61740673 1 --王宮の勅命 +84749824 1 --神の警告 +41420027 1 --神の宣告 +36468556 1 --停戦協定 +83555666 1 --破壊輪 +32723153 1 --マジカル·エクスプロージョン +#semi limit +45222299 2 --イビリチュア·ガストクラーケ +40044918 2 --E·HERO エアーマン +47075569 2 --EMペンデュラム・マジシャン +74311226 2 --海皇の竜騎隊 +78010363 2 --黒き森のウィッチ +15341821 2 --ダンディライオン +84764038 2 --彼岸の悪鬼 スカラマリオン +10028593 2 --輪廻天狗 +14878871 2 --レスキューキャット +48976825 2 --異次元からの埋葬 +59750328 2 --命削りの宝札 +57103969 2 --炎舞-「天璣」 +96729612 2 --儀式の準備 +17639150 2 --機殻の生贄 +84171830 2 --真帝王領域 +91623717 2 --連鎖爆撃 +73628505 2 --テラ・フォーミング +53129443 2 --ブラック·ホール +43040603 2 --モンスターゲート +66399653 2 --ユニオン格納庫 +31222701 2 --揺れる眼差し +62265044 2 --竜の渓谷 +40605147 2 --神の通告 + +!2017.4 +#forbidden +20663556 0 --イレカエル +44910027 0 --ヴィクトリー・ドラゴン +20366274 0 --エルシャドール・ネフィリム +53804307 0 --焔征竜-ブラスター +68819554 0 --Emダメージ・ジャグラー +07563579 0 --Emヒグルミ +17330916 0 --EMモンキーボード +90411554 0 --巌征竜-レドックス +17412721 0 --旧神ノーデン +34124316 0 --サイバーポッド +88071625 0 --The tyrant NEPTUNE +48905153 0 --十二獣ドランシア +21593977 0 --処刑人-マキュラ +16923472 0 --ゼンマイハンター +56570271 0 --D-HERO ディスクガイ +18326736 0 --星守の騎士 プトレマイオス +33184167 0 --同族感染ウィルス +54719828 0 --No.16 色の支配者ショック・ルーラー +26400609 0 --瀑征竜-タイダル +78706415 0 --ファイバーポッド +93369354 0 --フィッシュボーグ-ガンナー +31178212 0 --マジェスペクター・ユニコーン +34206604 0 --魔導サイエンティスト +96782886 0 --メンタルマスター +03078576 0 --八汰烏 +34086406 0 --ラヴァルバル・チェイン +89399912 0 --嵐征竜-テンペスト +57421866 0 --レベル・スティーラー +41482598 0 --悪夢の蜃気楼 +44763025 0 --いたずら好きな双子悪魔 +19613556 0 --大嵐 +17375316 0 --押収 +74191942 0 --苦渋の選択 +42829885 0 --強引な番兵 +45986603 0 --強奪 +55144522 0 --強欲な壺 +04031928 0 --心変わり +46060017 0 --十二獣の会局 +12580477 0 --サンダー·ボルト +23557835 0 --次元融合 +57953380 0 --生還の宝札 +60682203 0 --大寒波 +69243953 0 --蝶の短剣-エルマ +79571449 0 --天使の施し +70828912 0 --早すぎた埋葬 +42703248 0 --ハリケーン +34906152 0 --マスドライバー +46448938 0 --魔導書の神判 +46411259 0 --突然変異 +85602018 0 --遺言状 +27174286 0 --異次元からの帰還 +93016201 0 --王宮の弾圧 +03280747 0 --第六感 +64697231 0 --ダスト·シュート +80604091 0 --血の代償 +35316708 0 --刻の封印 +17178486 0 --ライフチェンジャー +28566710 0 --ラストバトル! +#limit +64034255 1 --A·ジェネクス·バードマン +50720316 1 --E·HERO シャドー·ミスト +40318957 1 --EMドクロバット・ジョーカー +47075569 1 --EMペンデュラム・マジシャン +78010363 1 --黒き森のウィッチ +74586817 1 --PSYフレームロード・Ω +78872731 1 --十二獣モルモラット +06602300 1 --重爆撃禽 ボム・フェネクス +00423585 1 --召喚僧サモンプリースト +78868119 1 --深海のディーヴァ +81275020 1 --SRベイゴマックス +65192027 1 --ダーク·アームド·ドラゴン +90953320 1 --TG ハイパー·ライブラリアン +69015963 1 --デビル・フランケン +16226786 1 --深淵の暗殺者 +90307777 1 --影霊衣の術士 シュリット +28297833 1 --ネクロフェイス +84764038 1 --彼岸の悪鬼 スカラマリオン +83531441 1 --彼岸の旅人 ダンテ +70583986 1 --氷結界の虎王ドゥローレン +52687916 1 --氷結界の龍 トリシューラ +33396948 1 --封印されしエクゾディア +07902349 1 --封印されし者の左腕 +70903634 1 --封印されし者の右腕 +44519536 1 --封印されし者の左足 +08124921 1 --封印されし者の右足 +09929398 1 --BF−朧影のゴウフウ +26674724 1 --ブリューナクの影霊衣 +10802915 1 --魔界発現世行きデスガイド +33508719 1 --メタモルポット +90809975 1 --餅カエル +89463537 1 --ユニコールの影霊衣 +92746535 1 --竜剣士ラスターP +14878871 1 --レスキューキャット +88264978 1 --レッドアイズ·ダークネスメタルドラゴン +48976825 1 --異次元からの埋葬 +33782437 1 --一時休戦 +66957584 1 --インフェルニティガン +81439173 1 --おろかな埋葬 +23701465 1 --原初の種 +99330325 1 --妨げられた壊獣の眠り +96729612 1 --儀式の準備 +67723438 1 --緊急テレポート +45305419 1 --継承の印 +17639150 1 --機殻の生贄 +83764718 1 --死者蘇生 +32807846 1 --増援 +54447022 1 --ソウル・チャージ +48130397 1 --超融合 +72892473 1 --手札抹殺 +67169062 1 --貪欲な壺 +97211663 1 --影霊衣の反魂術 +18144506 1 --ハーピィの羽根帚 +22842126 1 --汎神の帝王 +53129443 1 --ブラック·ホール +53208660 1 --ペンデュラム・コール +93600443 1 --マスク・チェンジ・セカンド +15854426 1 --霞の谷の神風 +77565204 1 --未来融合-フューチャー·フュージョン +58577036 1 --名推理 +66399653 1 --ユニオン格納庫 +31222701 1 --揺れる眼差し +23171610 1 --リミッター解除 +14733538 1 --竜呼相打つ +62265044 1 --竜の渓谷 +02295440 1 --ワン·フォー·ワン +05851097 1 --虚無空間 +61740673 1 --王宮の勅命 +84749824 1 --神の警告 +41420027 1 --神の宣告 +36468556 1 --停戦協定 +83555666 1 --破壊輪 +32723153 1 --マジカル·エクスプロージョン +#semi limit +45222299 2 --イビリチュア·ガストクラーケ +40044918 2 --E·HERO エアーマン +74311226 2 --海皇の竜騎隊 +72989439 2 --カオス·ソルジャー -開闢の使者- +72714461 2 --慧眼の魔術師 +07391448 2 --ゴヨウ·ガーディアン +28985331 2 --終末の騎士 +15341821 2 --ダンディライオン +45206713 2 --DDスワラル・スライム +18239909 2 --爆竜剣士イグニスターP +50321796 2 --氷結界の龍 ブリューナク +55623480 2 --妖精伝姫−シラユキ +10028593 2 --輪廻天狗 +57103969 2 --炎舞-「天璣」 +84171830 2 --真帝王領域 +87910978 2 --洗脳-ブレインコントロール +91623717 2 --連鎖爆撃 +43040603 2 --モンスターゲート + +!2017.1 +#forbidden +20663556 0 --イレカエル +44910027 0 --ヴィクトリー・ドラゴン +20366274 0 --エルシャドール・ネフィリム +53804307 0 --焔征竜-ブラスター +68819554 0 --Emダメージ・ジャグラー +07563579 0 --Emヒグルミ +17330916 0 --EMモンキーボード +90411554 0 --巌征竜-レドックス +17412721 0 --旧神ノーデン +78010363 0 --黒き森のウィッチ +34124316 0 --サイバーポッド +21593977 0 --処刑人-マキュラ +16923472 0 --ゼンマイハンター +56570271 0 --D-HERO ディスクガイ +18326736 0 --星守の騎士 プトレマイオス +33184167 0 --同族感染ウィルス +54719828 0 --No.16 色の支配者ショック・ルーラー +26400609 0 --瀑征竜-タイダル +78706415 0 --ファイバーポッド +93369354 0 --フィッシュボーグ-ガンナー +31178212 0 --マジェスペクター・ユニコーン +34206604 0 --魔導サイエンティスト +96782886 0 --メンタルマスター +03078576 0 --八汰烏 +34086406 0 --ラヴァルバル・チェイン +89399912 0 --嵐征竜-テンペスト +57421866 0 --レベル・スティーラー +41482598 0 --悪夢の蜃気楼 +44763025 0 --いたずら好きな双子悪魔 +19613556 0 --大嵐 +17375316 0 --押収 +74191942 0 --苦渋の選択 +42829885 0 --強引な番兵 +45986603 0 --強奪 +55144522 0 --強欲な壺 +04031928 0 --心変わり +12580477 0 --サンダー·ボルト +23557835 0 --次元融合 +57953380 0 --生還の宝札 +60682203 0 --大寒波 +69243953 0 --蝶の短剣-エルマ +79571449 0 --天使の施し +70828912 0 --早すぎた埋葬 +42703248 0 --ハリケーン +34906152 0 --マスドライバー +46448938 0 --魔導書の神判 +46411259 0 --突然変異 +85602018 0 --遺言状 +27174286 0 --異次元からの帰還 +93016201 0 --王宮の弾圧 +03280747 0 --第六感 +64697231 0 --ダスト·シュート +80604091 0 --血の代償 +35316708 0 --刻の封印 +17178486 0 --ライフチェンジャー +28566710 0 --ラストバトル! +#limit +64034255 1 --A·ジェネクス·バードマン +40044918 1 --E·HERO エアーマン +50720316 1 --E·HERO シャドー·ミスト +40318957 1 --EMドクロバット・ジョーカー +47075569 1 --EMペンデュラム・マジシャン +07391448 1 --ゴヨウ·ガーディアン +74586817 1 --PSYフレームロード・Ω +06602300 1 --重爆撃禽 ボム・フェネクス +28985331 1 --終末の騎士 +00423585 1 --召喚僧サモンプリースト +78868119 1 --深海のディーヴァ +81275020 1 --SRベイゴマックス +65192027 1 --ダーク·アームド·ドラゴン +90953320 1 --TG ハイパー·ライブラリアン +69015963 1 --デビル・フランケン +16226786 1 --深淵の暗殺者 +90307777 1 --影霊衣の術士 シュリット +28297833 1 --ネクロフェイス +18239909 1 --爆竜剣士イグニスターP +84764038 1 --彼岸の悪鬼 スカラマリオン +83531441 1 --彼岸の旅人 ダンテ +70583986 1 --氷結界の虎王ドゥローレン +52687916 1 --氷結界の龍 トリシューラ +50321796 1 --氷結界の龍 ブリューナク +33396948 1 --封印されしエクゾディア +07902349 1 --封印されし者の左腕 +70903634 1 --封印されし者の右腕 +44519536 1 --封印されし者の左足 +08124921 1 --封印されし者の右足 +26674724 1 --ブリューナクの影霊衣 +10802915 1 --魔界発現世行きデスガイド +33508719 1 --メタモルポット +90809975 1 --餅カエル +89463537 1 --ユニコールの影霊衣 +92746535 1 --竜剣士ラスターP +14878871 1 --レスキューキャット +88264978 1 --レッドアイズ·ダークネスメタルドラゴン +48976825 1 --異次元からの埋葬 +33782437 1 --一時休戦 +66957584 1 --インフェルニティガン +57103969 1 --炎舞-「天璣」 +81439173 1 --おろかな埋葬 +23701465 1 --原初の種 +96729612 1 --儀式の準備 +67723438 1 --緊急テレポート +45305419 1 --継承の印 +17639150 1 --機殻の生贄 +83764718 1 --死者蘇生 +87910978 1 --洗脳-ブレインコントロール +32807846 1 --増援 +54447022 1 --ソウル・チャージ +48130397 1 --超融合 +72892473 1 --手札抹殺 +67169062 1 --貪欲な壺 +97211663 1 --影霊衣の反魂術 +18144506 1 --ハーピィの羽根帚 +22842126 1 --汎神の帝王 +53129443 1 --ブラック·ホール +53208660 1 --ペンデュラム・コール +93600443 1 --マスク・チェンジ・セカンド +15854426 1 --霞の谷の神風 +77565204 1 --未来融合-フューチャー·フュージョン +58577036 1 --名推理 +66399653 1 --ユニオン格納庫 +31222701 1 --揺れる眼差し +23171610 1 --リミッター解除 +14733538 1 --竜呼相打つ +62265044 1 --竜の渓谷 +02295440 1 --ワン·フォー·ワン +05851097 1 --虚無空間 +61740673 1 --王宮の勅命 +84749824 1 --神の警告 +41420027 1 --神の宣告 +36468556 1 --停戦協定 +83555666 1 --破壊輪 +32723153 1 --マジカル·エクスプロージョン +#semi limit +85103922 2 --アーティファクト-モラルタ +45222299 2 --イビリチュア·ガストクラーケ +74311226 2 --海皇の竜騎隊 +72989439 2 --カオス·ソルジャー -開闢の使者- +72714461 2 --慧眼の魔術師 +31560081 2 --聖なる魔術師 +15341821 2 --ダンディライオン +45206713 2 --DDスワラル・スライム +19580308 2 --DDラミア +10028593 2 --輪廻天狗 +84171830 2 --真帝王領域 +91623717 2 --連鎖爆撃 +43040603 2 --モンスターゲート + +!2016.10 +#forbidden +20663556 0 --イレカエル +44910027 0 --ヴィクトリー・ドラゴン +20366274 0 --エルシャドール・ネフィリム +53804307 0 --焔征竜-ブラスター +68819554 0 --Emダメージ・ジャグラー +07563579 0 --Emヒグルミ +17330916 0 --EMモンキーボード +90411554 0 --巌征竜-レドックス +17412721 0 --旧神ノーデン +78010363 0 --黒き森のウィッチ +07391448 0 --ゴヨウ·ガーディアン +34124316 0 --サイバーポッド +21593977 0 --処刑人-マキュラ +16923472 0 --ゼンマイハンター +56570271 0 --D-HERO ディスクガイ +18326736 0 --星守の騎士 プトレマイオス +33184167 0 --同族感染ウィルス +54719828 0 --No.16 色の支配者ショック・ルーラー +26400609 0 --瀑征竜-タイダル +50321796 0 --氷結界の龍 ブリューナク +78706415 0 --ファイバーポッド +93369354 0 --フィッシュボーグ-ガンナー +34206604 0 --魔導サイエンティスト +96782886 0 --メンタルマスター +03078576 0 --八汰烏 +34086406 0 --ラヴァルバル・チェイン +89399912 0 --嵐征竜-テンペスト +14878871 0 --レスキューキャット +57421866 0 --レベル・スティーラー +41482598 0 --悪夢の蜃気楼 +44763025 0 --いたずら好きな双子悪魔 +19613556 0 --大嵐 +17375316 0 --押収 +74191942 0 --苦渋の選択 +42829885 0 --強引な番兵 +45986603 0 --強奪 +55144522 0 --強欲な壺 +04031928 0 --心変わり +12580477 0 --サンダー·ボルト +23557835 0 --次元融合 +57953380 0 --生還の宝札 +87910978 0 --洗脳-ブレインコントロール +60682203 0 --大寒波 +69243953 0 --蝶の短剣-エルマ +79571449 0 --天使の施し +70828912 0 --早すぎた埋葬 +42703248 0 --ハリケーン +34906152 0 --マスドライバー +46448938 0 --魔導書の神判 +77565204 0 --未来融合-フューチャー·フュージョン +46411259 0 --突然変異 +85602018 0 --遺言状 +27174286 0 --異次元からの帰還 +93016201 0 --王宮の弾圧 +61740673 0 --王宮の勅命 +03280747 0 --第六感 +64697231 0 --ダスト·シュート +80604091 0 --血の代償 +35316708 0 --刻の封印 +17178486 0 --ライフチェンジャー +28566710 0 --ラストバトル! +#limit +64034255 1 --A·ジェネクス·バードマン +40044918 1 --E·HERO エアーマン +50720316 1 --E·HERO シャドー·ミスト +40318957 1 --EMドクロバット・ジョーカー +47075569 1 --EMペンデュラム・マジシャン +74586817 1 --PSYフレームロード・Ω +06602300 1 --重爆撃禽 ボム・フェネクス +28985331 1 --終末の騎士 +00423585 1 --召喚僧サモンプリースト +78868119 1 --深海のディーヴァ +31560081 1 --聖なる魔術師 +65192027 1 --ダーク·アームド·ドラゴン +15341821 1 --ダンディライオン +90953320 1 --TG ハイパー·ライブラリアン +69015963 1 --デビル・フランケン +16226786 1 --深淵の暗殺者 +90307777 1 --影霊衣の術士 シュリット +28297833 1 --ネクロフェイス +18239909 1 --爆竜剣士イグニスターP +84764038 1 --彼岸の悪鬼 スカラマリオン +83531441 1 --彼岸の旅人 ダンテ +52687916 1 --氷結界の龍 トリシューラ +33396948 1 --封印されしエクゾディア +07902349 1 --封印されし者の左腕 +70903634 1 --封印されし者の右腕 +44519536 1 --封印されし者の左足 +08124921 1 --封印されし者の右足 +26674724 1 --ブリューナクの影霊衣 +10802915 1 --魔界発現世行きデスガイド +31178212 1 --マジェスペクター・ユニコーン +33508719 1 --メタモルポット +89463537 1 --ユニコールの影霊衣 +92746535 1 --竜剣士ラスターP +88264978 1 --レッドアイズ·ダークネスメタルドラゴン +48976825 1 --異次元からの埋葬 +33782437 1 --一時休戦 +66957584 1 --インフェルニティガン +81439173 1 --おろかな埋葬 +23701465 1 --原初の種 +96729612 1 --儀式の準備 +67723438 1 --緊急テレポート +45305419 1 --継承の印 +17639150 1 --機殻の生贄 +83764718 1 --死者蘇生 +32807846 1 --増援 +54447022 1 --ソウル・チャージ +48130397 1 --超融合 +72892473 1 --手札抹殺 +67169062 1 --貪欲な壺 +97211663 1 --影霊衣の反魂術 +18144506 1 --ハーピィの羽根帚 +22842126 1 --汎神の帝王 +53129443 1 --ブラック·ホール +53208660 1 --ペンデュラム・コール +93600443 1 --マスク・チェンジ・セカンド +15854426 1 --霞の谷の神風 +58577036 1 --名推理 +31222701 1 --揺れる眼差し +23171610 1 --リミッター解除 +14733538 1 --竜呼相打つ +62265044 1 --竜の渓谷 +02295440 1 --ワン·フォー·ワン +05851097 1 --虚無空間 +84749824 1 --神の警告 +41420027 1 --神の宣告 +36468556 1 --停戦協定 +83555666 1 --破壊輪 +32723153 1 --マジカル·エクスプロージョン +#semi limit +85103922 2 --アーティファクト-モラルタ +45222299 2 --イビリチュア·ガストクラーケ +68184115 2 --甲虫装機 ダンセル +74311226 2 --海皇の竜騎隊 +72989439 2 --カオス·ソルジャー -開闢の使者- +72714461 2 --慧眼の魔術師 +45206713 2 --DDスワラル・スライム +19580308 2 --DDラミア +70583986 2 --氷結界の虎王ドゥローレン +91110378 2 --光天使スローネ +41386308 2 --マスマティシャン +92826944 2 --馬頭鬼 +10028593 2 --輪廻天狗 +06417578 2 --神の写し身との接触 +84171830 2 --真帝王領域 +91623717 2 --連鎖爆撃 +43040603 2 --モンスターゲート + +!2016.7 +#forbidden +20663556 0 --イレカエル +44910027 0 --ヴィクトリー・ドラゴン +20366274 0 --エルシャドール・ネフィリム +53804307 0 --焔征竜-ブラスター +68819554 0 --Emダメージ・ジャグラー +07563579 0 --Emヒグルミ +17330916 0 --EMモンキーボード +90411554 0 --巌征竜-レドックス +78010363 0 --黒き森のウィッチ +07391448 0 --ゴヨウ·ガーディアン +34124316 0 --サイバーポッド +21593977 0 --処刑人-マキュラ +31560081 0 --聖なる魔術師 +16923472 0 --ゼンマイハンター +56570271 0 --D-HERO ディスクガイ +33184167 0 --同族感染ウィルス +54719828 0 --No.16 色の支配者ショック・ルーラー +26400609 0 --瀑征竜-タイダル +50321796 0 --氷結界の龍 ブリューナク +78706415 0 --ファイバーポッド +93369354 0 --フィッシュボーグ-ガンナー +34206604 0 --魔導サイエンティスト +96782886 0 --メンタルマスター +03078576 0 --八汰烏 +34086406 0 --ラヴァルバル・チェイン +89399912 0 --嵐征竜-テンペスト +14878871 0 --レスキューキャット +41482598 0 --悪夢の蜃気楼 +44763025 0 --いたずら好きな双子悪魔 +19613556 0 --大嵐 +17375316 0 --押収 +74191942 0 --苦渋の選択 +42829885 0 --強引な番兵 +45986603 0 --強奪 +55144522 0 --強欲な壺 +04031928 0 --心変わり +12580477 0 --サンダー·ボルト +23557835 0 --次元融合 +57953380 0 --生還の宝札 +87910978 0 --洗脳-ブレインコントロール +60682203 0 --大寒波 +69243953 0 --蝶の短剣-エルマ +79571449 0 --天使の施し +70828912 0 --早すぎた埋葬 +42703248 0 --ハリケーン +34906152 0 --マスドライバー +46448938 0 --魔導書の神判 +77565204 0 --未来融合-フューチャー·フュージョン +46411259 0 --突然変異 +85602018 0 --遺言状 +27174286 0 --異次元からの帰還 +93016201 0 --王宮の弾圧 +61740673 0 --王宮の勅命 +03280747 0 --第六感 +64697231 0 --ダスト·シュート +80604091 0 --血の代償 +35316708 0 --刻の封印 +17178486 0 --ライフチェンジャー +28566710 0 --ラストバトル! +17412721 0 --旧神ノーデン +18326736 0 --星守の騎士 プトレマイオス +#limit +85103922 1 --アーティファクト-モラルタ +64034255 1 --A·ジェネクス·バードマン +68184115 1 --甲虫装機 ダンセル +40044918 1 --E·HERO エアーマン +40318957 1 --EMドクロバット・ジョーカー +47075569 1 --EMペンデュラム・マジシャン +72989439 1 --カオス·ソルジャー -開闢の使者- +06602300 1 --重爆撃禽 ボム・フェネクス +28985331 1 --終末の騎士 +00423585 1 --召喚僧サモンプリースト +65192027 1 --ダーク·アームド·ドラゴン +15341821 1 --ダンディライオン +90953320 1 --TG ハイパー·ライブラリアン +16226786 1 --深淵の暗殺者 +28297833 1 --ネクロフェイス +18239909 1 --爆竜剣士イグニスターP +84764038 1 --彼岸の悪鬼 スカラマリオン +83531441 1 --彼岸の旅人 ダンテ +52687916 1 --氷結界の龍 トリシューラ +33396948 1 --封印されしエクゾディア +07902349 1 --封印されし者の左腕 +70903634 1 --封印されし者の右腕 +44519536 1 --封印されし者の左足 +08124921 1 --封印されし者の右足 +26674724 1 --ブリューナクの影霊衣 +91110378 1 --光天使スローネ +10802915 1 --魔界発現世行きデスガイド +41386308 1 --マスマティシャン +33508719 1 --メタモルポット +89463537 1 --ユニコールの影霊衣 +92746535 1 --竜剣士ラスターP +88264978 1 --レッドアイズ·ダークネスメタルドラゴン +48976825 1 --異次元からの埋葬 +33782437 1 --一時休戦 +66957584 1 --インフェルニティガン +06417578 1 --神の写し身との接触 +81439173 1 --おろかな埋葬 +23701465 1 --原初の種 +96729612 1 --儀式の準備 +67723438 1 --緊急テレポート +45305419 1 --継承の印 +17639150 1 --機殻の生贄 +83764718 1 --死者蘇生 +84171830 1 --真帝王領域 +32807846 1 --増援 +54447022 1 --ソウル・チャージ +48130397 1 --超融合 +72892473 1 --手札抹殺 +67169062 1 --貪欲な壺 +97211663 1 --影霊衣の反魂術 +18144506 1 --ハーピィの羽根帚 +22842126 1 --汎神の帝王 +53129443 1 --ブラック·ホール +53208660 1 --ペンデュラム・コール +93600443 1 --マスク・チェンジ・セカンド +15854426 1 --霞の谷の神風 +58577036 1 --名推理 +43040603 1 --モンスターゲート +31222701 1 --揺れる眼差し +23171610 1 --リミッター解除 +14733538 1 --竜呼相打つ +62265044 1 --竜の渓谷 +02295440 1 --ワン·フォー·ワン +05851097 1 --虚無空間 +84749824 1 --神の警告 +41420027 1 --神の宣告 +36468556 1 --停戦協定 +83555666 1 --破壊輪 +32723153 1 --マジカル·エクスプロージョン +78868119 1 --深海のディーヴァ +50720316 1 --E·HERO シャドー·ミスト +72714461 1 --慧眼の魔術師 +90307777 1 --影霊衣の術士 シュリット +#semi limit +26202165 2 --クリッター +63519819 2 --サウザンド·アイズ·サクリファイス +17078030 2 --光の護封壁 +74311226 2 --海皇の竜騎隊 +65518099 2 --クリフォート・ツール +70583986 2 --氷結界の虎王ドゥローレン +92826944 2 --馬頭鬼 +10028593 2 --輪廻天狗 +91623717 2 --連鎖爆撃 +94886282 2 --光の援軍 +77505534 2 --堕ち影の蠢き +45222299 2 --イビリチュア·ガストクラーケ +27970830 2 --六武の門 + +!2016.4 +#forbidden +20663556 0 --イレカエル +44910027 0 --ヴィクトリー・ドラゴン +20366274 0 --エルシャドール・ネフィリム +53804307 0 --焔征竜-ブラスター +68819554 0 --Emダメージ・ジャグラー +07563579 0 --Emヒグルミ +17330916 0 --EMモンキーボード +90411554 0 --巌征竜-レドックス +78010363 0 --黒き森のウィッチ +07391448 0 --ゴヨウ·ガーディアン +34124316 0 --サイバーポッド +21593977 0 --処刑人-マキュラ +31560081 0 --聖なる魔術師 +16923472 0 --ゼンマイハンター +56570271 0 --D-HERO ディスクガイ +33184167 0 --同族感染ウィルス +54719828 0 --No.16 色の支配者ショック・ルーラー +26400609 0 --瀑征竜-タイダル +50321796 0 --氷結界の龍 ブリューナク +78706415 0 --ファイバーポッド +93369354 0 --フィッシュボーグ-ガンナー +34206604 0 --魔導サイエンティスト +96782886 0 --メンタルマスター +03078576 0 --八汰烏 +34086406 0 --ラヴァルバル・チェイン +89399912 0 --嵐征竜-テンペスト +14878871 0 --レスキューキャット +41482598 0 --悪夢の蜃気楼 +44763025 0 --いたずら好きな双子悪魔 +19613556 0 --大嵐 +17375316 0 --押収 +74191942 0 --苦渋の選択 +42829885 0 --強引な番兵 +45986603 0 --強奪 +55144522 0 --強欲な壺 +04031928 0 --心変わり +12580477 0 --サンダー·ボルト +23557835 0 --次元融合 +57953380 0 --生還の宝札 +87910978 0 --洗脳-ブレインコントロール +60682203 0 --大寒波 +69243953 0 --蝶の短剣-エルマ +79571449 0 --天使の施し +70828912 0 --早すぎた埋葬 +42703248 0 --ハリケーン +34906152 0 --マスドライバー +46448938 0 --魔導書の神判 +77565204 0 --未来融合-フューチャー·フュージョン +46411259 0 --突然変異 +85602018 0 --遺言状 +27174286 0 --異次元からの帰還 +93016201 0 --王宮の弾圧 +61740673 0 --王宮の勅命 +03280747 0 --第六感 +64697231 0 --ダスト·シュート +80604091 0 --血の代償 +35316708 0 --刻の封印 +17178486 0 --ライフチェンジャー +28566710 0 --ラストバトル! +17412721 0 --旧神ノーデン +18326736 0 --星守の騎士 プトレマイオス +#limit +85103922 1 --アーティファクト-モラルタ +64034255 1 --A·ジェネクス·バードマン +68184115 1 --甲虫装機 ダンセル +40044918 1 --E·HERO エアーマン +40318957 1 --EMドクロバット・ジョーカー +47075569 1 --EMペンデュラム・マジシャン +72989439 1 --カオス·ソルジャー -開闢の使者- +26202165 1 --クリッター +63519819 1 --サウザンド·アイズ·サクリファイス +06602300 1 --重爆撃禽 ボム・フェネクス +28985331 1 --終末の騎士 +00423585 1 --召喚僧サモンプリースト +65192027 1 --ダーク·アームド·ドラゴン +15341821 1 --ダンディライオン +90953320 1 --TG ハイパー·ライブラリアン +16226786 1 --深淵の暗殺者 +28297833 1 --ネクロフェイス +18239909 1 --爆竜剣士イグニスターP +84764038 1 --彼岸の悪鬼 スカラマリオン +83531441 1 --彼岸の旅人 ダンテ +52687916 1 --氷結界の龍 トリシューラ +33396948 1 --封印されしエクゾディア +07902349 1 --封印されし者の左腕 +70903634 1 --封印されし者の右腕 +44519536 1 --封印されし者の左足 +08124921 1 --封印されし者の右足 +26674724 1 --ブリューナクの影霊衣 +91110378 1 --光天使スローネ +10802915 1 --魔界発現世行きデスガイド +41386308 1 --マスマティシャン +33508719 1 --メタモルポット +89463537 1 --ユニコールの影霊衣 +92746535 1 --竜剣士ラスターP +88264978 1 --レッドアイズ·ダークネスメタルドラゴン +48976825 1 --異次元からの埋葬 +33782437 1 --一時休戦 +66957584 1 --インフェルニティガン +06417578 1 --神の写し身との接触 +81439173 1 --おろかな埋葬 +23701465 1 --原初の種 +96729612 1 --儀式の準備 +67723438 1 --緊急テレポート +45305419 1 --継承の印 +17639150 1 --機殻の生贄 +83764718 1 --死者蘇生 +84171830 1 --真帝王領域 +32807846 1 --増援 +54447022 1 --ソウル・チャージ +48130397 1 --超融合 +72892473 1 --手札抹殺 +67169062 1 --貪欲な壺 +97211663 1 --影霊衣の反魂術 +18144506 1 --ハーピィの羽根帚 +22842126 1 --汎神の帝王 +53129443 1 --ブラック·ホール +53208660 1 --ペンデュラム・コール +93600443 1 --マスク・チェンジ・セカンド +15854426 1 --霞の谷の神風 +58577036 1 --名推理 +43040603 1 --モンスターゲート +31222701 1 --揺れる眼差し +23171610 1 --リミッター解除 +14733538 1 --竜呼相打つ +62265044 1 --竜の渓谷 +02295440 1 --ワン·フォー·ワン +05851097 1 --虚無空間 +84749824 1 --神の警告 +41420027 1 --神の宣告 +36468556 1 --停戦協定 +83555666 1 --破壊輪 +17078030 1 --光の護封壁 +32723153 1 --マジカル·エクスプロージョン +78868119 1 --深海のディーヴァ +50720316 1 --E·HERO シャドー·ミスト +72714461 1 --慧眼の魔術師 +90307777 1 --影霊衣の術士 シュリット +#semi limit +74311226 2 --海皇の竜騎隊 +65518099 2 --クリフォート・ツール +70583986 2 --氷結界の虎王ドゥローレン +92826944 2 --馬頭鬼 +10028593 2 --輪廻天狗 +91623717 2 --連鎖爆撃 +27770341 2 --超再生能力 +94886282 2 --光の援軍 +77505534 2 --堕ち影の蠢き +45222299 2 --イビリチュア·ガストクラーケ +27970830 2 --六武の門 + +!2016.1 +#forbidden +20663556 0 --イレカエル +44910027 0 --ヴィクトリー・ドラゴン +20366274 0 --エルシャドール・ネフィリム +53804307 0 --焔征竜-ブラスター +68819554 0 --Emダメージ・ジャグラー +07563579 0 --Emヒグルミ +90411554 0 --巌征竜-レドックス +26202165 0 --クリッター +78010363 0 --黒き森のウィッチ +07391448 0 --ゴヨウ·ガーディアン +34124316 0 --サイバーポッド +63519819 0 --サウザンド·アイズ·サクリファイス +21593977 0 --処刑人-マキュラ +31560081 0 --聖なる魔術師 +16923472 0 --ゼンマイハンター +56570271 0 --D-HERO ディスクガイ +33184167 0 --同族感染ウィルス +54719828 0 --No.16 色の支配者ショック・ルーラー +26400609 0 --瀑征竜-タイダル +50321796 0 --氷結界の龍 ブリューナク +78706415 0 --ファイバーポッド +93369354 0 --フィッシュボーグ-ガンナー +34206604 0 --魔導サイエンティスト +96782886 0 --メンタルマスター +03078576 0 --八汰烏 +89399912 0 --嵐征竜-テンペスト +14878871 0 --レスキューキャット +41482598 0 --悪夢の蜃気楼 +44763025 0 --いたずら好きな双子悪魔 +19613556 0 --大嵐 +17375316 0 --押収 +74191942 0 --苦渋の選択 +42829885 0 --強引な番兵 +45986603 0 --強奪 +55144522 0 --強欲な壺 +04031928 0 --心変わり +12580477 0 --サンダー·ボルト +23557835 0 --次元融合 +57953380 0 --生還の宝札 +87910978 0 --洗脳-ブレインコントロール +60682203 0 --大寒波 +69243953 0 --蝶の短剣-エルマ +79571449 0 --天使の施し +70828912 0 --早すぎた埋葬 +42703248 0 --ハリケーン +34906152 0 --マスドライバー +46448938 0 --魔導書の神判 +77565204 0 --未来融合-フューチャー·フュージョン +46411259 0 --突然変異 +85602018 0 --遺言状 +27174286 0 --異次元からの帰還 +93016201 0 --王宮の弾圧 +61740673 0 --王宮の勅命 +03280747 0 --第六感 +64697231 0 --ダスト·シュート +80604091 0 --血の代償 +35316708 0 --刻の封印 +28566710 0 --ラストバトル! +17412721 0 --旧神ノーデン +18326736 0 --星守の騎士 プトレマイオス +#limit +85103922 1 --アーティファクト-モラルタ +64034255 1 --A·ジェネクス·バードマン +68184115 1 --甲虫装機 ダンセル +40044918 1 --E·HERO エアーマン +72989439 1 --カオス·ソルジャー -開闢の使者- +06602300 1 --重爆撃禽 ボム・フェネクス +28985331 1 --終末の騎士 +00423585 1 --召喚僧サモンプリースト +65192027 1 --ダーク·アームド·ドラゴン +15341821 1 --ダンディライオン +90953320 1 --TG ハイパー·ライブラリアン +16226786 1 --深淵の暗殺者 +28297833 1 --ネクロフェイス +52687916 1 --氷結界の龍 トリシューラ +33396948 1 --封印されしエクゾディア +07902349 1 --封印されし者の左腕 +70903634 1 --封印されし者の右腕 +44519536 1 --封印されし者の左足 +08124921 1 --封印されし者の右足 +26674724 1 --ブリューナクの影霊衣 +91110378 1 --光天使スローネ +41386308 1 --マスマティシャン +33508719 1 --メタモルポット +89463537 1 --ユニコールの影霊衣 +88264978 1 --レッドアイズ·ダークネスメタルドラゴン +48976825 1 --異次元からの埋葬 +33782437 1 --一時休戦 +66957584 1 --インフェルニティガン +06417578 1 --神の写し身との接触 +81439173 1 --おろかな埋葬 +23701465 1 --原初の種 +96729612 1 --儀式の準備 +45305419 1 --継承の印 +17639150 1 --機殻の生贄 +83764718 1 --死者蘇生 +32807846 1 --増援 +54447022 1 --ソウル・チャージ +27770341 1 --超再生能力 +48130397 1 --超融合 +72892473 1 --手札抹殺 +67169062 1 --貪欲な壺 +97211663 1 --影霊衣の反魂術 +18144506 1 --ハーピィの羽根帚 +53129443 1 --ブラック·ホール +15854426 1 --霞の谷の神風 +23171610 1 --リミッター解除 +62265044 1 --竜の渓谷 +02295440 1 --ワン·フォー·ワン +05851097 1 --虚無空間 +84749824 1 --神の警告 +41420027 1 --神の宣告 +36468556 1 --停戦協定 +83555666 1 --破壊輪 +17078030 1 --光の護封壁 +32723153 1 --マジカル·エクスプロージョン +78868119 1 --深海のディーヴァ +50720316 1 --E·HERO シャドー·ミスト +72714461 1 --慧眼の魔術師 +90307777 1 --影霊衣の術士 シュリット +67441435 1 --グローアップ·バルブ +#semi limit +74311226 2 --海皇の竜騎隊 +65518099 2 --クリフォート・ツール +09411399 2 --D-HERO ディアボリックガイ +70583986 2 --氷結界の虎王ドゥローレン +92826944 2 --馬頭鬼 +10028593 2 --輪廻天狗 +91623717 2 --連鎖爆撃 +16404809 2 --クリバンデット +22446869 2 --水精鱗-ディニクアビス +37520316 2 --精神操作 +14087893 2 --月の書 +94886282 2 --光の援軍 +75500286 2 --封印の黄金櫃 +01475311 2 --闇の誘惑 +41620959 2 --竜の霊廟 +77505534 2 --堕ち影の蠢き +57728570 2 --死のデッキ破壊ウイルス +45222299 2 --イビリチュア·ガストクラーケ +27970830 2 --六武の門 + !2015.10 #forbidden 20663556 0 --イレカエル @@ -6,793 +7504,7820 @@ 20366274 0 --エルシャドール・ネフィリム 53804307 0 --焔征竜-ブラスター 90411554 0 --巌征竜-レドックス -26202165 0 --クリッター -78010363 0 --黒き森のウィッチ -07391448 0 --ゴヨウ·ガーディアン +26202165 0 --クリッター +78010363 0 --黒き森のウィッチ +07391448 0 --ゴヨウ·ガーディアン +34124316 0 --サイバーポッド +63519819 0 --サウザンド·アイズ·サクリファイス +21593977 0 --処刑人-マキュラ +31560081 0 --聖なる魔術師 +16923472 0 --ゼンマイハンター +56570271 0 --D-HERO ディスクガイ +33184167 0 --同族感染ウィルス +26400609 0 --瀑征竜-タイダル +50321796 0 --氷結界の龍 ブリューナク +78706415 0 --ファイバーポッド +93369354 0 --フィッシュボーグ-ガンナー +34206604 0 --魔導サイエンティスト +96782886 0 --メンタルマスター +03078576 0 --八汰烏 +89399912 0 --嵐征竜-テンペスト +14878871 0 --レスキューキャット +41482598 0 --悪夢の蜃気楼 +44763025 0 --いたずら好きな双子悪魔 +19613556 0 --大嵐 +17375316 0 --押収 +74191942 0 --苦渋の選択 +42829885 0 --強引な番兵 +45986603 0 --強奪 +55144522 0 --強欲な壺 +04031928 0 --心変わり +12580477 0 --サンダー·ボルト +23557835 0 --次元融合 +57953380 0 --生還の宝札 +87910978 0 --洗脳-ブレインコントロール +60682203 0 --大寒波 +69243953 0 --蝶の短剣-エルマ +79571449 0 --天使の施し +70828912 0 --早すぎた埋葬 +42703248 0 --ハリケーン +34906152 0 --マスドライバー +46448938 0 --魔導書の神判 +77565204 0 --未来融合-フューチャー·フュージョン +46411259 0 --突然変異 +85602018 0 --遺言状 +27174286 0 --異次元からの帰還 +93016201 0 --王宮の弾圧 +61740673 0 --王宮の勅命 +03280747 0 --第六感 +64697231 0 --ダスト·シュート +80604091 0 --血の代償 +35316708 0 --刻の封印 +28566710 0 --ラストバトル! +17412721 0 --旧神ノーデン +18326736 0 --星守の騎士 プトレマイオス +#limit +85103922 1 --アーティファクト-モラルタ +64034255 1 --A·ジェネクス·バードマン +68184115 1 --甲虫装機 ダンセル +40044918 1 --E·HERO エアーマン +72989439 1 --カオス·ソルジャー -開闢の使者- +06602300 1 --重爆撃禽 ボム・フェネクス +28985331 1 --終末の騎士 +00423585 1 --召喚僧サモンプリースト +65192027 1 --ダーク·アームド·ドラゴン +15341821 1 --ダンディライオン +90953320 1 --TG ハイパー·ライブラリアン +16226786 1 --深淵の暗殺者 +28297833 1 --ネクロフェイス +52687916 1 --氷結界の龍 トリシューラ +33396948 1 --封印されしエクゾディア +07902349 1 --封印されし者の左腕 +70903634 1 --封印されし者の右腕 +44519536 1 --封印されし者の左足 +08124921 1 --封印されし者の右足 +26674724 1 --ブリューナクの影霊衣 +91110378 1 --光天使スローネ +41386308 1 --マスマティシャン +33508719 1 --メタモルポット +89463537 1 --ユニコールの影霊衣 +88264978 1 --レッドアイズ·ダークネスメタルドラゴン +48976825 1 --異次元からの埋葬 +33782437 1 --一時休戦 +66957584 1 --インフェルニティガン +06417578 1 --神の写し身との接触 +81439173 1 --おろかな埋葬 +23701465 1 --原初の種 +96729612 1 --儀式の準備 +45305419 1 --継承の印 +17639150 1 --機殻の生贄 +83764718 1 --死者蘇生 +32807846 1 --増援 +54447022 1 --ソウル・チャージ +27770341 1 --超再生能力 +48130397 1 --超融合 +72892473 1 --手札抹殺 +67169062 1 --貪欲な壺 +97211663 1 --影霊衣の反魂術 +18144506 1 --ハーピィの羽根帚 +53129443 1 --ブラック·ホール +15854426 1 --霞の谷の神風 +23171610 1 --リミッター解除 +62265044 1 --竜の渓谷 +02295440 1 --ワン·フォー·ワン +05851097 1 --虚無空間 +84749824 1 --神の警告 +41420027 1 --神の宣告 +36468556 1 --停戦協定 +83555666 1 --破壊輪 +17078030 1 --光の護封壁 +32723153 1 --マジカル·エクスプロージョン +78868119 1 --深海のディーヴァ +50720316 1 --E·HERO シャドー·ミスト +72714461 1 --慧眼の魔術師 +90307777 1 --影霊衣の術士 シュリット +67441435 1 --グローアップ·バルブ +#semi limit +74311226 2 --海皇の竜騎隊 +65518099 2 --クリフォート・ツール +09411399 2 --D-HERO ディアボリックガイ +70583986 2 --氷結界の虎王ドゥローレン +92826944 2 --馬頭鬼 +10028593 2 --輪廻天狗 +91623717 2 --連鎖爆撃 +16404809 2 --クリバンデット +22446869 2 --水精鱗-ディニクアビス +37520316 2 --精神操作 +14087893 2 --月の書 +94886282 2 --光の援軍 +75500286 2 --封印の黄金櫃 +01475311 2 --闇の誘惑 +41620959 2 --竜の霊廟 +77505534 2 --堕ち影の蠢き +57728570 2 --死のデッキ破壊ウイルス +45222299 2 --イビリチュア·ガストクラーケ +27970830 2 --六武の門 + +!2015.4 +#forbidden +20663556 0 --イレカエル +44910027 0 --ヴィクトリー・ドラゴン +20366274 0 --エルシャドール・ネフィリム +53804307 0 --焔征竜-ブラスター +90411554 0 --巌征竜-レドックス +26202165 0 --クリッター +67441435 0 --グローアップ·バルブ +78010363 0 --黒き森のウィッチ +07391448 0 --ゴヨウ·ガーディアン +34124316 0 --サイバーポッド +63519819 0 --サウザンド·アイズ·サクリファイス +21593977 0 --処刑人-マキュラ +31560081 0 --聖なる魔術師 +16923472 0 --ゼンマイハンター +56570271 0 --D-HERO ディスクガイ +33184167 0 --同族感染ウィルス +26400609 0 --瀑征竜-タイダル +50321796 0 --氷結界の龍 ブリューナク +78706415 0 --ファイバーポッド +93369354 0 --フィッシュボーグ-ガンナー +34206604 0 --魔導サイエンティスト +96782886 0 --メンタルマスター +03078576 0 --八汰烏 +89399912 0 --嵐征竜-テンペスト +14878871 0 --レスキューキャット +41482598 0 --悪夢の蜃気楼 +44763025 0 --いたずら好きな双子悪魔 +19613556 0 --大嵐 +17375316 0 --押収 +74191942 0 --苦渋の選択 +42829885 0 --強引な番兵 +45986603 0 --強奪 +55144522 0 --強欲な壺 +04031928 0 --心変わり +12580477 0 --サンダー·ボルト +23557835 0 --次元融合 +57953380 0 --生還の宝札 +87910978 0 --洗脳-ブレインコントロール +60682203 0 --大寒波 +69243953 0 --蝶の短剣-エルマ +79571449 0 --天使の施し +70828912 0 --早すぎた埋葬 +42703248 0 --ハリケーン +34906152 0 --マスドライバー +46448938 0 --魔導書の神判 +77565204 0 --未来融合-フューチャー·フュージョン +46411259 0 --突然変異 +85602018 0 --遺言状 +27174286 0 --異次元からの帰還 +93016201 0 --王宮の弾圧 +61740673 0 --王宮の勅命 +03280747 0 --第六感 +64697231 0 --ダスト·シュート +80604091 0 --血の代償 +35316708 0 --刻の封印 +28566710 0 --ラストバトル! +#limit +85103922 1 --アーティファクト-モラルタ +64034255 1 --A·ジェネクス·バードマン +45222299 1 --イビリチュア·ガストクラーケ +68184115 1 --甲虫装機 ダンセル +40044918 1 --E·HERO エアーマン +82301904 1 --混沌帝龍 -終焉の使者- +72989439 1 --カオス·ソルジャー -開闢の使者- +16404809 1 --クリバンデット +40737112 1 --混沌の黒魔術師 +06602300 1 --重爆撃禽 ボム・フェネクス +28985331 1 --終末の騎士 +00423585 1 --召喚僧サモンプリースト +65192027 1 --ダーク·アームド·ドラゴン +15341821 1 --ダンディライオン +90953320 1 --TG ハイパー·ライブラリアン +16226786 1 --深淵の暗殺者 +28297833 1 --ネクロフェイス +52687916 1 --氷結界の龍 トリシューラ +33396948 1 --封印されしエクゾディア +07902349 1 --封印されし者の左腕 +70903634 1 --封印されし者の右腕 +44519536 1 --封印されし者の左足 +08124921 1 --封印されし者の右足 +26674724 1 --ブリューナクの影霊衣 +91110378 1 --光天使スローネ +22446869 1 --水精鱗-ディニクアビス +41386308 1 --マスマティシャン +33508719 1 --メタモルポット +89463537 1 --ユニコールの影霊衣 +88264978 1 --レッドアイズ·ダークネスメタルドラゴン +48976825 1 --異次元からの埋葬 +33782437 1 --一時休戦 +01845204 1 --簡易融合 +66957584 1 --インフェルニティガン +06417578 1 --神の写し身との接触 +81439173 1 --おろかな埋葬 +23701465 1 --原初の種 +96729612 1 --儀式の準備 +45305419 1 --継承の印 +17639150 1 --機殻の生贄 +83764718 1 --死者蘇生 +37520316 1 --精神操作 +32807846 1 --増援 +54447022 1 --ソウル・チャージ +27770341 1 --超再生能力 +48130397 1 --超融合 +14087893 1 --月の書 +72892473 1 --手札抹殺 +67169062 1 --貪欲な壺 +97211663 1 --影霊衣の反魂術 +18144506 1 --ハーピィの羽根帚 +94886282 1 --光の援軍 +75500286 1 --封印の黄金櫃 +53129443 1 --ブラック·ホール +15854426 1 --霞の谷の神風 +01475311 1 --闇の誘惑 +23171610 1 --リミッター解除 +62265044 1 --竜の渓谷 +41620959 1 --竜の霊廟 +27970830 1 --六武の門 +02295440 1 --ワン·フォー·ワン +05851097 1 --虚無空間 +77505534 1 --堕ち影の蠢き +84749824 1 --神の警告 +41420027 1 --神の宣告 +57728570 1 --死のデッキ破壊ウイルス +36468556 1 --停戦協定 +46652477 1 --転生の予言 +83555666 1 --破壊輪 +17078030 1 --光の護封壁 +32723153 1 --マジカル·エクスプロージョン +#semi limit +79979666 2 --E·HERO バブルマン +37742478 2 --オネスト +74311226 2 --海皇の竜騎隊 +65518099 2 --クリフォート・ツール +81122844 2 --発条空母ゼンマイティ +09411399 2 --D-HERO ディアボリックガイ +70583986 2 --氷結界の虎王ドゥローレン +50091196 2 --フォーミュラ·シンクロン +02009101 2 --BF-疾風のゲイル +95492061 2 --マンジュ・ゴッド +92826944 2 --馬頭鬼 +10028593 2 --輪廻天狗 +91623717 2 --連鎖爆撃 +98494543 2 --魔法石の採掘 +29401950 2 --奈落の落とし穴 + +!2015.1 +#forbidden +20663556 0 --イレカエル +44910027 0 --ヴィクトリー・ドラゴン +53797637 0 --炎征竜-バーナー +26202165 0 --クリッター +67441435 0 --グローアップ·バルブ +78010363 0 --黒き森のウィッチ +07391448 0 --ゴヨウ·ガーディアン +40737112 0 --混沌の黒魔術師 +34124316 0 --サイバーポッド +63519819 0 --サウザンド·アイズ·サクリファイス +21593977 0 --処刑人-マキュラ +27415516 0 --水征竜-ストリーム +31560081 0 --聖なる魔術師 +16923472 0 --ゼンマイハンター +91020571 0 --地征竜-リアクタン +56570271 0 --D-HERO ディスクガイ +33184167 0 --同族感染ウィルス +50321796 0 --氷結界の龍 ブリューナク +78706415 0 --ファイバーポッド +93369354 0 --フィッシュボーグ-ガンナー +89185742 0 --風征竜-ライトニング +34206604 0 --魔導サイエンティスト +96782886 0 --メンタルマスター +03078576 0 --八汰烏 +14878871 0 --レスキューキャット +41482598 0 --悪夢の蜃気楼 +44763025 0 --いたずら好きな双子悪魔 +19613556 0 --大嵐 +17375316 0 --押収 +74191942 0 --苦渋の選択 +42829885 0 --強引な番兵 +45986603 0 --強奪 +55144522 0 --強欲な壺 +04031928 0 --心変わり +12580477 0 --サンダー·ボルト +23557835 0 --次元融合 +57953380 0 --生還の宝札 +87910978 0 --洗脳-ブレインコントロール +60682203 0 --大寒波 +69243953 0 --蝶の短剣-エルマ +79571449 0 --天使の施し +70828912 0 --早すぎた埋葬 +42703248 0 --ハリケーン +34906152 0 --マスドライバー +46448938 0 --魔導書の神判 +77565204 0 --未来融合-フューチャー·フュージョン +46411259 0 --突然変異 +85602018 0 --遺言状 +27174286 0 --異次元からの帰還 +93016201 0 --王宮の弾圧 +61740673 0 --王宮の勅命 +03280747 0 --第六感 +64697231 0 --ダスト·シュート +80604091 0 --血の代償 +35316708 0 --刻の封印 +28566710 0 --ラストバトル! +#limit +85103922 1 --アーティファクト-モラルタ +64034255 1 --A·ジェネクス·バードマン +45222299 1 --イビリチュア·ガストクラーケ +68184115 1 --甲虫装機 ダンセル +20366274 1 --エルシャドール・ネフィリム +94977269 1 --エルシャドール・ミドラーシュ +40044918 1 --E·HERO エアーマン +53804307 1 --焔征竜-ブラスター +82301904 1 --混沌帝龍 -終焉の使者- +72989439 1 --カオス·ソルジャー -開闢の使者- +90411554 1 --巌征竜-レドックス +08131171 1 --キラー・スネーク +06602300 1 --重爆撃禽 ボム・フェネクス +28985331 1 --終末の騎士 +00423585 1 --召喚僧サモンプリースト +23401839 1 --センジュ・ゴッド +81122844 1 --発条空母ゼンマイティ +65192027 1 --ダーク·アームド·ドラゴン +15341821 1 --ダンディライオン +90953320 1 --TG ハイパー·ライブラリアン +16226786 1 --深淵の暗殺者 +28297833 1 --ネクロフェイス +26400609 1 --瀑征竜-タイダル +52687916 1 --氷結界の龍 トリシューラ +33396948 1 --封印されしエクゾディア +07902349 1 --封印されし者の左腕 +70903634 1 --封印されし者の右腕 +44519536 1 --封印されし者の左足 +08124921 1 --封印されし者の右足 +50091196 1 --フォーミュラ·シンクロン +91110378 1 --光天使スローネ +22446869 1 --水精鱗-ディニクアビス +95492061 1 --マンジュ・ゴッド +33508719 1 --メタモルポット +89463537 1 --ユニコールの影霊衣 +89399912 1 --嵐征竜-テンペスト +88264978 1 --レッドアイズ·ダークネスメタルドラゴン +48976825 1 --異次元からの埋葬 +33782437 1 --一時休戦 +01845204 1 --簡易融合 +66957584 1 --インフェルニティガン +29762407 1 --王家の神殿 +81439173 1 --おろかな埋葬 +23701465 1 --原初の種 +96729612 1 --儀式の準備 +45305419 1 --継承の印 +83764718 1 --死者蘇生 +37520316 1 --精神操作 +32807846 1 --増援 +54447022 1 --ソウル・チャージ +27770341 1 --超再生能力 +48130397 1 --超融合 +14087893 1 --月の書 +72892473 1 --手札抹殺 +67169062 1 --貪欲な壺 +18144506 1 --ハーピィの羽根帚 +94886282 1 --光の援軍 +75500286 1 --封印の黄金櫃 +53129443 1 --ブラック·ホール +15854426 1 --霞の谷の神風 +01475311 1 --闇の誘惑 +23171610 1 --リミッター解除 +62265044 1 --竜の渓谷 +41620959 1 --竜の霊廟 +27970830 1 --六武の門 +02295440 1 --ワン·フォー·ワン +77505534 1 --堕ち影の蠢き +84749824 1 --神の警告 +41420027 1 --神の宣告 +17484499 1 --現世と冥界の逆転 +57728570 1 --死のデッキ破壊ウイルス +36468556 1 --停戦協定 +46652477 1 --転生の予言 +83555666 1 --破壊輪 +17078030 1 --光の護封壁 +32723153 1 --マジカル·エクスプロージョン +#semi limit +69207766 2 --甲虫装機 ホーネット +79979666 2 --E·HERO バブルマン +37742478 2 --オネスト +74311226 2 --海皇の竜騎隊 +29981921 2 --真六武衆-シエン +59509952 2 --大天使クリスティア +09411399 2 --D-HERO ディアボリックガイ +80117527 2 --No.11 ビッグ·アイ +70583986 2 --氷結界の虎王ドゥローレン +02009101 2 --BF-疾風のゲイル +92826944 2 --馬頭鬼 +30929786 2 --立炎星-トウケイ +10028593 2 --輪廻天狗 +91623717 2 --連鎖爆撃 +98494543 2 --魔法石の採掘 +43040603 2 --モンスターゲート +29401950 2 --奈落の落とし穴 + +!2014.10 +#forbidden +20663556 0 --イレカエル +44910027 0 --ヴィクトリー・ドラゴン +53797637 0 --炎征竜-バーナー +82301904 0 --混沌帝龍 -終焉の使者- +08131171 0 --キラー・スネーク +26202165 0 --クリッター +67441435 0 --グローアップ·バルブ +78010363 0 --黒き森のウィッチ +07391448 0 --ゴヨウ·ガーディアン +40737112 0 --混沌の黒魔術師 +34124316 0 --サイバーポッド +63519819 0 --サウザンド·アイズ·サクリファイス +21593977 0 --処刑人-マキュラ +27415516 0 --水征竜-ストリーム +31560081 0 --聖なる魔術師 +16923472 0 --ゼンマイハンター +91020571 0 --地征竜-リアクタン +56570271 0 --D-HERO ディスクガイ +33184167 0 --同族感染ウィルス +50321796 0 --氷結界の龍 ブリューナク +78706415 0 --ファイバーポッド +93369354 0 --フィッシュボーグ-ガンナー +89185742 0 --風征竜-ライトニング +34206604 0 --魔導サイエンティスト +96782886 0 --メンタルマスター +03078576 0 --八汰烏 +14878871 0 --レスキューキャット +41482598 0 --悪夢の蜃気楼 +44763025 0 --いたずら好きな双子悪魔 +29762407 0 --王家の神殿 +17375316 0 --押収 +74191942 0 --苦渋の選択 +42829885 0 --強引な番兵 +45986603 0 --強奪 +55144522 0 --強欲な壺 +04031928 0 --心変わり +12580477 0 --サンダー·ボルト +23557835 0 --次元融合 +57953380 0 --生還の宝札 +87910978 0 --洗脳-ブレインコントロール +60682203 0 --大寒波 +69243953 0 --蝶の短剣-エルマ +79571449 0 --天使の施し +18144506 0 --ハーピィの羽根帚 +70828912 0 --早すぎた埋葬 +42703248 0 --ハリケーン +34906152 0 --マスドライバー +46448938 0 --魔導書の神判 +77565204 0 --未来融合-フューチャー·フュージョン +46411259 0 --突然変異 +85602018 0 --遺言状 +27174286 0 --異次元からの帰還 +93016201 0 --王宮の弾圧 +61740673 0 --王宮の勅命 +17484499 0 --現世と冥界の逆転 +57728570 0 --死のデッキ破壊ウイルス +03280747 0 --第六感 +64697231 0 --ダスト·シュート +80604091 0 --血の代償 +35316708 0 --刻の封印 +83555666 0 --破壊輪 +28566710 0 --ラストバトル! +#limit +85103922 1 --アーティファクト-モラルタ +64034255 1 --A·ジェネクス·バードマン +45222299 1 --イビリチュア·ガストクラーケ +68184115 1 --甲虫装機 ダンセル +69207766 1 --甲虫装機 ホーネット +20366274 1 --エルシャドール・ネフィリム +94977269 1 --エルシャドール・ミドラーシュ +40044918 1 --E·HERO エアーマン +53804307 1 --焔征竜-ブラスター +74311226 1 --海皇の竜騎隊 +72989439 1 --カオス·ソルジャー -開闢の使者- +90411554 1 --巌征竜-レドックス +28985331 1 --終末の騎士 +00423585 1 --召喚僧サモンプリースト +81122844 1 --発条空母ゼンマイティ +65192027 1 --ダーク·アームド·ドラゴン +15341821 1 --ダンディライオン +90953320 1 --TG ハイパー·ライブラリアン +16226786 1 --深淵の暗殺者 +80117527 1 --No.11 ビッグ·アイ +28297833 1 --ネクロフェイス +26400609 1 --瀑征竜-タイダル +52687916 1 --氷結界の龍 トリシューラ +33396948 1 --封印されしエクゾディア +07902349 1 --封印されし者の左腕 +70903634 1 --封印されし者の右腕 +44519536 1 --封印されし者の左足 +08124921 1 --封印されし者の右足 +50091196 1 --フォーミュラ·シンクロン +91110378 1 --光天使スローネ +22446869 1 --水精鱗-ディニクアビス +33508719 1 --メタモルポット +89399912 1 --嵐征竜-テンペスト +30929786 1 --立炎星-トウケイ +88264978 1 --レッドアイズ·ダークネスメタルドラゴン +48976825 1 --異次元からの埋葬 +33782437 1 --一時休戦 +66957584 1 --インフェルニティガン +19613556 1 --大嵐 +81439173 1 --おろかな埋葬 +23701465 1 --原初の種 +83764718 1 --死者蘇生 +37520316 1 --精神操作 +32807846 1 --増援 +54447022 1 --ソウル・チャージ +27770341 1 --超再生能力 +14087893 1 --月の書 +72892473 1 --手札抹殺 +67169062 1 --貪欲な壺 +94886282 1 --光の援軍 +75500286 1 --封印の黄金櫃 +53129443 1 --ブラック·ホール +15854426 1 --霞の谷の神風 +43040603 1 --モンスターゲート +01475311 1 --闇の誘惑 +23171610 1 --リミッター解除 +62265044 1 --竜の渓谷 +41620959 1 --竜の霊廟 +27970830 1 --六武の門 +02295440 1 --ワン·フォー·ワン +77505534 1 --堕ち影の蠢き +84749824 1 --神の警告 +41420027 1 --神の宣告 +36468556 1 --停戦協定 +46652477 1 --転生の予言 +17078030 1 --光の護封壁 +32723153 1 --マジカル·エクスプロージョン +#semi limit +91279700 2 --ヴェルズ·オピオン +79979666 2 --E·HERO バブルマン +24861088 2 --先史遺産ネブラ・ディスク +37742478 2 --オネスト +85087012 2 --カードガンナー +29981921 2 --真六武衆-シエン +59509952 2 --大天使クリスティア +09411399 2 --D-HERO ディアボリックガイ +01315120 2 --TG ストライカー +98777036 2 --トラゴエディア +70583986 2 --氷結界の虎王ドゥローレン +02009101 2 --BF-疾風のゲイル +92826944 2 --馬頭鬼 +10028593 2 --輪廻天狗 +48686504 2 --ローンファイア·ブロッサム +25377819 2 --召集の聖刻印 +91623717 2 --連鎖爆撃 +08949584 2 --ヒーローアライブ +98494543 2 --魔法石の採掘 +29843091 2 --おジャマトリオ +29401950 2 --奈落の落とし穴 + +!2014.7 +#forbidden +20663556 0 --イレカエル +44910027 0 --ヴィクトリー・ドラゴン +53797637 0 --炎征竜-バーナー +82301904 0 --混沌帝龍 -終焉の使者- +08131171 0 --キラー・スネーク +26202165 0 --クリッター +67441435 0 --グローアップ·バルブ +78010363 0 --黒き森のウィッチ +07391448 0 --ゴヨウ·ガーディアン +40737112 0 --混沌の黒魔術師 +34124316 0 --サイバーポッド +63519819 0 --サウザンド·アイズ·サクリファイス +21593977 0 --処刑人-マキュラ +27415516 0 --水征竜-ストリーム +31560081 0 --聖なる魔術師 +16923472 0 --ゼンマイハンター +91020571 0 --地征竜-リアクタン +56570271 0 --D-HERO ディスクガイ +33184167 0 --同族感染ウィルス +50321796 0 --氷結界の龍 ブリューナク +78706415 0 --ファイバーポッド +93369354 0 --フィッシュボーグ-ガンナー +89185742 0 --風征竜-ライトニング +34206604 0 --魔導サイエンティスト +96782886 0 --メンタルマスター +03078576 0 --八汰烏 +14878871 0 --レスキューキャット +41482598 0 --悪夢の蜃気楼 +44763025 0 --いたずら好きな双子悪魔 +29762407 0 --王家の神殿 +17375316 0 --押収 +74191942 0 --苦渋の選択 +42829885 0 --強引な番兵 +45986603 0 --強奪 +55144522 0 --強欲な壺 +04031928 0 --心変わり +12580477 0 --サンダー·ボルト +23557835 0 --次元融合 +57953380 0 --生還の宝札 +87910978 0 --洗脳-ブレインコントロール +60682203 0 --大寒波 +69243953 0 --蝶の短剣-エルマ +79571449 0 --天使の施し +18144506 0 --ハーピィの羽根帚 +70828912 0 --早すぎた埋葬 +42703248 0 --ハリケーン +34906152 0 --マスドライバー +46448938 0 --魔導書の神判 +77565204 0 --未来融合-フューチャー·フュージョン +46411259 0 --突然変異 +85602018 0 --遺言状 +27174286 0 --異次元からの帰還 +93016201 0 --王宮の弾圧 +61740673 0 --王宮の勅命 +17484499 0 --現世と冥界の逆転 +57728570 0 --死のデッキ破壊ウイルス +03280747 0 --第六感 +64697231 0 --ダスト·シュート +80604091 0 --血の代償 +35316708 0 --刻の封印 +83555666 0 --破壊輪 +28566710 0 --ラストバトル! +#limit +85103922 1 --アーティファクト-モラルタ +64034255 1 --A·ジェネクス·バードマン +45222299 1 --イビリチュア·ガストクラーケ +68184115 1 --甲虫装機 ダンセル +69207766 1 --甲虫装機 ホーネット +40044918 1 --E·HERO エアーマン +53804307 1 --焔征竜-ブラスター +74311226 1 --海皇の竜騎隊 +72989439 1 --カオス·ソルジャー -開闢の使者- +90411554 1 --巌征竜-レドックス +28985331 1 --終末の騎士 +81122844 1 --発条空母ゼンマイティ +15341821 1 --ダンディライオン +90953320 1 --TG ハイパー·ライブラリアン +16226786 1 --深淵の暗殺者 +80117527 1 --No.11 ビッグ·アイ +28297833 1 --ネクロフェイス +26400609 1 --瀑征竜-タイダル +52687916 1 --氷結界の龍 トリシューラ +33396948 1 --封印されしエクゾディア +07902349 1 --封印されし者の左腕 +70903634 1 --封印されし者の右腕 +44519536 1 --封印されし者の左足 +08124921 1 --封印されし者の右足 +50091196 1 --フォーミュラ·シンクロン +02009101 1 --BF-疾風のゲイル +22446869 1 --水精鱗-ディニクアビス +33508719 1 --メタモルポット +89399912 1 --嵐征竜-テンペスト +30929786 1 --立炎星-トウケイ +88264978 1 --レッドアイズ·ダークネスメタルドラゴン +48976825 1 --異次元からの埋葬 +33782437 1 --一時休戦 +66957584 1 --インフェルニティガン +19613556 1 --大嵐 +81439173 1 --おろかな埋葬 +23701465 1 --原初の種 +83764718 1 --死者蘇生 +37520316 1 --精神操作 +32807846 1 --増援 +27770341 1 --超再生能力 +14087893 1 --月の書 +72892473 1 --手札抹殺 +67169062 1 --貪欲な壺 +94886282 1 --光の援軍 +75500286 1 --封印の黄金櫃 +53129443 1 --ブラック·ホール +15854426 1 --霞の谷の神風 +43040603 1 --モンスターゲート +01475311 1 --闇の誘惑 +23171610 1 --リミッター解除 +62265044 1 --竜の渓谷 +41620959 1 --竜の霊廟 +27970830 1 --六武の門 +02295440 1 --ワン·フォー·ワン +84749824 1 --神の警告 +41420027 1 --神の宣告 +36468556 1 --停戦協定 +46652477 1 --転生の予言 +84968490 1 --針虫の巣窟 +17078030 1 --光の護封壁 +32723153 1 --マジカル·エクスプロージョン +#semi limit +91279700 2 --ヴェルズ·オピオン +79979666 2 --E·HERO バブルマン +24861088 2 --先史遺産ネブラ・ディスク +37742478 2 --オネスト +85087012 2 --カードガンナー +00423585 2 --召喚僧サモンプリースト +29981921 2 --真六武衆-シエン +25484449 2 --ゼンマイシャーク +65192027 2 --ダーク·アームド·ドラゴン +59509952 2 --大天使クリスティア +09411399 2 --D-HERO ディアボリックガイ +01315120 2 --TG ストライカー +98777036 2 --トラゴエディア +70583986 2 --氷結界の虎王ドゥローレン +92826944 2 --馬頭鬼 +10028593 2 --輪廻天狗 +48686504 2 --ローンファイア·ブロッサム +25377819 2 --召集の聖刻印 +91623717 2 --連鎖爆撃 +08949584 2 --ヒーローアライブ +98494543 2 --魔法石の採掘 +60202749 2 --アビスフィアー +29843091 2 --おジャマトリオ +29401950 2 --奈落の落とし穴 + +!2014.4 +#forbidden +20663556 0 --イレカエル +53797637 0 --炎征竜-バーナー +44910027 0 --ヴィクトリー・ドラゴン +82301904 0 --混沌帝龍 -終焉の使者- +08131171 0 --キラー・スネーク +26202165 0 --クリッター +78010363 0 --黒き森のウィッチ +67441435 0 --グローアップ·バルブ +07391448 0 --ゴヨウ·ガーディアン +40737112 0 --混沌の黒魔術師 +34124316 0 --サイバーポッド +63519819 0 --サウザンド·アイズ·サクリファイス +21593977 0 --処刑人-マキュラ +27415516 0 --水征竜-ストリーム +31560081 0 --聖なる魔術師 +16923472 0 --ゼンマイハンター +91020571 0 --地征竜-リアクタン +56570271 0 --D-HERO ディスクガイ +33184167 0 --同族感染ウィルス +50321796 0 --氷結界の龍 ブリューナク +78706415 0 --ファイバーポッド +93369354 0 --フィッシュボーグ-ガンナー +89185742 0 --風征竜-ライトニング +34206604 0 --魔導サイエンティスト +96782886 0 --メンタルマスター +03078576 0 --八汰烏 +14878871 0 --レスキューキャット +41482598 0 --悪夢の蜃気楼 +44763025 0 --いたずら好きな双子悪魔 +29762407 0 --王家の神殿 +17375316 0 --押収 +74191942 0 --苦渋の選択 +42829885 0 --強引な番兵 +45986603 0 --強奪 +55144522 0 --強欲な壺 +04031928 0 --心変わり +12580477 0 --サンダー·ボルト +23557835 0 --次元融合 +57953380 0 --生還の宝札 +87910978 0 --洗脳-ブレインコントロール +60682203 0 --大寒波 +69243953 0 --蝶の短剣-エルマ +79571449 0 --天使の施し +42703248 0 --ハリケーン +18144506 0 --ハーピィの羽根帚 +70828912 0 --早すぎた埋葬 +34906152 0 --マスドライバー +46448938 0 --魔導書の神判 +77565204 0 --未来融合-フューチャー·フュージョン +46411259 0 --突然変異 +85602018 0 --遺言状 +27174286 0 --異次元からの帰還 +61740673 0 --王宮の勅命 +93016201 0 --王宮の弾圧 +17484499 0 --現世と冥界の逆転 +57728570 0 --死のデッキ破壊ウイルス +03280747 0 --第六感 +64697231 0 --ダスト·シュート +80604091 0 --血の代償 +35316708 0 --刻の封印 +83555666 0 --破壊輪 +28566710 0 --ラストバトル! +#limit +64034255 1 --A·ジェネクス·バードマン +45222299 1 --イビリチュア·ガストクラーケ +68184115 1 --甲虫装機 ダンセル +69207766 1 --甲虫装機 ホーネット +91279700 1 --ヴェルズ·オピオン +40044918 1 --E·HERO エアーマン +79979666 1 --E·HERO バブルマン +53804307 1 --焔征竜-ブラスター +74311226 1 --海皇の竜騎隊 +72989439 1 --カオス·ソルジャー -開闢の使者- +90411554 1 --巌征竜-レドックス +29981921 1 --真六武衆-シエン +81122844 1 --発条空母ゼンマイティ +25484449 1 --ゼンマイシャーク +15341821 1 --ダンディライオン +01315120 1 --TG ストライカー +90953320 1 --TG ハイパー·ライブラリアン +69015963 1 --デビル·フランケン +16226786 1 --深淵の暗殺者 +80117527 1 --No.11 ビッグ·アイ +28297833 1 --ネクロフェイス +26400609 1 --瀑征竜-タイダル +52687916 1 --氷結界の龍 トリシューラ +33396948 1 --封印されしエクゾディア +07902349 1 --封印されし者の左腕 +70903634 1 --封印されし者の右腕 +44519536 1 --封印されし者の左足 +08124921 1 --封印されし者の右足 +50091196 1 --フォーミュラ·シンクロン +02009101 1 --BF-疾風のゲイル +22446869 1 --水精鱗-ディニクアビス +92826944 1 --馬頭鬼 +33508719 1 --メタモルポット +89399912 1 --嵐征竜-テンペスト +30929786 1 --立炎星-トウケイ +88264978 1 --レッドアイズ·ダークネスメタルドラゴン +48976825 1 --異次元からの埋葬 +33782437 1 --一時休戦 +66957584 1 --インフェルニティガン +23701465 1 --原初の種 +81439173 1 --おろかな埋葬 +19613556 1 --大嵐 +83764718 1 --死者蘇生 +37520316 1 --精神操作 +32807846 1 --増援 +67169062 1 --貪欲な壺 +27770341 1 --超再生能力 +14087893 1 --月の書 +72892473 1 --手札抹殺 +94886282 1 --光の援軍 +75500286 1 --封印の黄金櫃 +53129443 1 --ブラック·ホール +15854426 1 --霞の谷の神風 +43040603 1 --モンスターゲート +01475311 1 --闇の誘惑 +23171610 1 --リミッター解除 +27970830 1 --六武の門 +02295440 1 --ワン·フォー·ワン +60202749 1 --アビスフィアー +84749824 1 --神の警告 +41420027 1 --神の宣告 +36468556 1 --停戦協定 +46652477 1 --転生の予言 +17078030 1 --光の護封壁 +32723153 1 --マジカル·エクスプロージョン +#semi limit +37742478 2 --オネスト +85087012 2 --カードガンナー +09596126 2 --カオス·ソーサラー +00423585 2 --召喚僧サモンプリースト +33420078 2 --ゾンビキャリア +65192027 2 --ダーク·アームド·ドラゴン +59509952 2 --大天使クリスティア +09411399 2 --D-HERO ディアボリックガイ +98777036 2 --トラゴエディア +70583986 2 --氷結界の虎王ドゥローレン +85138716 2 --レスキューラビット +10028593 2 --輪廻天狗 +48686504 2 --ローンファイア·ブロッサム +57103969 2 --炎舞-「天璣」 +72405967 2 --王家の生け贄 +91351370 2 --黒い旋風 +45725480 2 --七星の宝刀 +25377819 2 --召集の聖刻印 +08949584 2 --ヒーローアライブ +98494543 2 --魔法石の採掘 +91623717 2 --連鎖爆撃 +29843091 2 --おジャマトリオ +29401950 2 --奈落の落とし穴 + +!2014.2 +#forbidden +20663556 0 --イレカエル +53797637 0 --炎征竜-バーナー +44910027 0 --ヴィクトリー・ドラゴン +82301904 0 --混沌帝龍 -終焉の使者- +08131171 0 --キラー・スネーク +26202165 0 --クリッター +78010363 0 --黒き森のウィッチ +67441435 0 --グローアップ·バルブ +07391448 0 --ゴヨウ·ガーディアン +40737112 0 --混沌の黒魔術師 +34124316 0 --サイバーポッド +63519819 0 --サウザンド·アイズ·サクリファイス +81122844 0 --発条空母ゼンマイティ +21593977 0 --処刑人-マキュラ +27415516 0 --水征竜-ストリーム +31560081 0 --聖なる魔術師 +32646477 0 --ダーク·ダイブ·ボンバー +91020571 0 --地征竜-リアクタン +56570271 0 --D-HERO ディスクガイ +33184167 0 --同族感染ウィルス +50321796 0 --氷結界の龍 ブリューナク +78706415 0 --ファイバーポッド +93369354 0 --フィッシュボーグ-ガンナー +89185742 0 --風征竜-ライトニング +34206604 0 --魔導サイエンティスト +96782886 0 --メンタルマスター +03078576 0 --八汰烏 +14878871 0 --レスキューキャット +41482598 0 --悪夢の蜃気楼 +44763025 0 --いたずら好きな双子悪魔 +29762407 0 --王家の神殿 +17375316 0 --押収 +74191942 0 --苦渋の選択 +42829885 0 --強引な番兵 +45986603 0 --強奪 +55144522 0 --強欲な壺 +04031928 0 --心変わり +12580477 0 --サンダー·ボルト +23557835 0 --次元融合 +57953380 0 --生還の宝札 +87910978 0 --洗脳-ブレインコントロール +60682203 0 --大寒波 +69243953 0 --蝶の短剣-エルマ +79571449 0 --天使の施し +42703248 0 --ハリケーン +18144506 0 --ハーピィの羽根帚 +70828912 0 --早すぎた埋葬 +34906152 0 --マスドライバー +46448938 0 --魔導書の神判 +77565204 0 --未来融合-フューチャー·フュージョン +46411259 0 --突然変異 +85602018 0 --遺言状 +27174286 0 --異次元からの帰還 +61740673 0 --王宮の勅命 +93016201 0 --王宮の弾圧 +17484499 0 --現世と冥界の逆転 +57728570 0 --死のデッキ破壊ウイルス +03280747 0 --第六感 +64697231 0 --ダスト·シュート +35316708 0 --刻の封印 +83555666 0 --破壊輪 +28566710 0 --ラストバトル! +#limit +64034255 1 --A·ジェネクス·バードマン +45222299 1 --イビリチュア·ガストクラーケ +68184115 1 --甲虫装機 ダンセル +69207766 1 --甲虫装機 ホーネット +91279700 1 --ヴェルズ·オピオン +40044918 1 --E·HERO エアーマン +79979666 1 --E·HERO バブルマン +74311226 1 --海皇の竜騎隊 +72989439 1 --カオス·ソルジャー -開闢の使者- +29981921 1 --真六武衆-シエン +25484449 1 --ゼンマイシャーク +65192027 1 --ダーク·アームド·ドラゴン +15341821 1 --ダンディライオン +01315120 1 --TG ストライカー +90953320 1 --TG ハイパー·ライブラリアン +69015963 1 --デビル·フランケン +16226786 1 --深淵の暗殺者 +80117527 1 --No.11 ビッグ·アイ +28297833 1 --ネクロフェイス +52687916 1 --氷結界の龍 トリシューラ +33396948 1 --封印されしエクゾディア +07902349 1 --封印されし者の左腕 +70903634 1 --封印されし者の右腕 +44519536 1 --封印されし者の左足 +08124921 1 --封印されし者の右足 +50091196 1 --フォーミュラ·シンクロン +02009101 1 --BF-疾風のゲイル +22446869 1 --水精鱗-ディニクアビス +92826944 1 --馬頭鬼 +33508719 1 --メタモルポット +30929786 1 --立炎星-トウケイ +88264978 1 --レッドアイズ·ダークネスメタルドラゴン +48976825 1 --異次元からの埋葬 +33782437 1 --一時休戦 +66957584 1 --インフェルニティガン +23701465 1 --原初の種 +81439173 1 --おろかな埋葬 +19613556 1 --大嵐 +83764718 1 --死者蘇生 +45725480 1 --七星の宝刀 +37520316 1 --精神操作 +32807846 1 --増援 +67169062 1 --貪欲な壺 +27770341 1 --超再生能力 +14087893 1 --月の書 +72892473 1 --手札抹殺 +94886282 1 --光の援軍 +75500286 1 --封印の黄金櫃 +53129443 1 --ブラック·ホール +15854426 1 --霞の谷の神風 +43040603 1 --モンスターゲート +01475311 1 --闇の誘惑 +23171610 1 --リミッター解除 +27970830 1 --六武の門 +02295440 1 --ワン·フォー·ワン +60202749 1 --アビスフィアー +84749824 1 --神の警告 +41420027 1 --神の宣告 +80604091 1 --血の代償 +36468556 1 --停戦協定 +46652477 1 --転生の予言 +17078030 1 --光の護封壁 +32723153 1 --マジカル·エクスプロージョン +#semi limit +53804307 2 --焔征竜-ブラスター +37742478 2 --オネスト +85087012 2 --カードガンナー +09596126 2 --カオス·ソーサラー +90411554 2 --巌征竜-レドックス +00423585 2 --召喚僧サモンプリースト +33420078 2 --ゾンビキャリア +59509952 2 --大天使クリスティア +09411399 2 --D-HERO ディアボリックガイ +98777036 2 --トラゴエディア +26400609 2 --瀑征竜-タイダル +70583986 2 --氷結界の虎王ドゥローレン +89399912 2 --嵐征竜-テンペスト +85138716 2 --レスキューラビット +10028593 2 --輪廻天狗 +48686504 2 --ローンファイア·ブロッサム +10802915 2 --魔界発現世行きデスガイド +57103969 2 --炎舞-「天璣」 +72405967 2 --王家の生け贄 +91351370 2 --黒い旋風 +25377819 2 --召集の聖刻印 +08949584 2 --ヒーローアライブ +98494543 2 --魔法石の採掘 +91623717 2 --連鎖爆撃 +29843091 2 --おジャマトリオ +53582587 2 --激流葬 +29401950 2 --奈落の落とし穴 + +!2013.9 +#forbidden +20663556 0 --イレカエル +53797637 0 --炎征竜-バーナー +44910027 0 --ヴィクトリー・ドラゴン +82301904 0 --混沌帝龍 -終焉の使者- +08131171 0 --キラー・スネーク +26202165 0 --クリッター +78010363 0 --黒き森のウィッチ +67441435 0 --グローアップ·バルブ +07391448 0 --ゴヨウ·ガーディアン +40737112 0 --混沌の黒魔術師 +34124316 0 --サイバーポッド +63519819 0 --サウザンド·アイズ·サクリファイス +81122844 0 --発条空母ゼンマイティ +21593977 0 --処刑人-マキュラ +27415516 0 --水征竜-ストリーム +31560081 0 --聖なる魔術師 +32646477 0 --ダーク·ダイブ·ボンバー +91020571 0 --地征竜-リアクタン +56570271 0 --D-HERO ディスクガイ +69015963 0 --デビル·フランケン +33184167 0 --同族感染ウィルス +50321796 0 --氷結界の龍 ブリューナク +78706415 0 --ファイバーポッド +93369354 0 --フィッシュボーグ-ガンナー +89185742 0 --風征竜-ライトニング +34206604 0 --魔導サイエンティスト +96782886 0 --メンタルマスター +03078576 0 --八汰烏 +14878871 0 --レスキューキャット +41482598 0 --悪夢の蜃気楼 +44763025 0 --いたずら好きな双子悪魔 +29762407 0 --王家の神殿 +17375316 0 --押収 +74191942 0 --苦渋の選択 +42829885 0 --強引な番兵 +45986603 0 --強奪 +55144522 0 --強欲な壺 +04031928 0 --心変わり +12580477 0 --サンダー·ボルト +23557835 0 --次元融合 +57953380 0 --生還の宝札 +87910978 0 --洗脳-ブレインコントロール +60682203 0 --大寒波 +69243953 0 --蝶の短剣-エルマ +79571449 0 --天使の施し +42703248 0 --ハリケーン +18144506 0 --ハーピィの羽根帚 +70828912 0 --早すぎた埋葬 +34906152 0 --マスドライバー +46448938 0 --魔導書の神判 +77565204 0 --未来融合-フューチャー·フュージョン +46411259 0 --突然変異 +85602018 0 --遺言状 +61740673 0 --王宮の勅命 +93016201 0 --王宮の弾圧 +17484499 0 --現世と冥界の逆転 +57728570 0 --死のデッキ破壊ウイルス +03280747 0 --第六感 +64697231 0 --ダスト·シュート +35316708 0 --刻の封印 +83555666 0 --破壊輪 +28566710 0 --ラストバトル! +#limit +64034255 1 --A·ジェネクス·バードマン +45222299 1 --イビリチュア·ガストクラーケ +68184115 1 --甲虫装機 ダンセル +69207766 1 --甲虫装機 ホーネット +40044918 1 --E·HERO エアーマン +37742478 1 --オネスト +72989439 1 --カオス·ソルジャー -開闢の使者- +29981921 1 --真六武衆-シエン +25484449 1 --ゼンマイシャーク +33420078 1 --ゾンビキャリア +65192027 1 --ダーク·アームド·ドラゴン +15341821 1 --ダンディライオン +01315120 1 --TG ストライカー +90953320 1 --TG ハイパー·ライブラリアン +16226786 1 --深淵の暗殺者 +80117527 1 --No.11 ビッグ·アイ +28297833 1 --ネクロフェイス +52687916 1 --氷結界の龍 トリシューラ +33396948 1 --封印されしエクゾディア +07902349 1 --封印されし者の左腕 +70903634 1 --封印されし者の右腕 +44519536 1 --封印されし者の左足 +08124921 1 --封印されし者の右足 +50091196 1 --フォーミュラ·シンクロン +02009101 1 --BF-疾風のゲイル +22446869 1 --水精鱗-ディニクアビス +92826944 1 --馬頭鬼 +33508719 1 --メタモルポット +30929786 1 --立炎星-トウケイ +88264978 1 --レッドアイズ·ダークネスメタルドラゴン +48686504 1 --ローンファイア·ブロッサム +48976825 1 --異次元からの埋葬 +33782437 1 --一時休戦 +66957584 1 --インフェルニティガン +23701465 1 --原初の種 +81439173 1 --おろかな埋葬 +19613556 1 --大嵐 +83764718 1 --死者蘇生 +37520316 1 --精神操作 +32807846 1 --増援 +67169062 1 --貪欲な壺 +27770341 1 --超再生能力 +14087893 1 --月の書 +72892473 1 --手札抹殺 +94886282 1 --光の援軍 +53129443 1 --ブラック·ホール +15854426 1 --霞の谷の神風 +43040603 1 --モンスターゲート +01475311 1 --闇の誘惑 +23171610 1 --リミッター解除 +27970830 1 --六武の門 +02295440 1 --ワン·フォー·ワン +60202749 1 --アビスフィアー +27174286 1 --異次元からの帰還 +84749824 1 --神の警告 +41420027 1 --神の宣告 +80604091 1 --血の代償 +36468556 1 --停戦協定 +46652477 1 --転生の予言 +17078030 1 --光の護封壁 +32723153 1 --マジカル·エクスプロージョン +#semi limit +85087012 2 --カードガンナー +09596126 2 --カオス·ソーサラー +41470137 2 --剣闘獣ベストロウリィ +91188343 2 --神秘の代行者 アース +00423585 2 --召喚僧サモンプリースト +59509952 2 --大天使クリスティア +14943837 2 --デブリ·ドラゴン +09411399 2 --D-HERO ディアボリックガイ +98777036 2 --トラゴエディア +80344569 2 --N·グラン·モール +70583986 2 --氷結界の虎王ドゥローレン +71564252 2 --ライオウ +85138716 2 --レスキューラビット +10028593 2 --輪廻天狗 +10802915 2 --魔界発現世行きデスガイド +44330098 2 --冥府の使者ゴーズ +57103969 2 --炎舞-「天璣」 +72405967 2 --王家の生け贄 +91351370 2 --黒い旋風 +25377819 2 --召集の聖刻印 +08949584 2 --ヒーローアライブ +98494543 2 --魔法石の採掘 +91623717 2 --連鎖爆撃 +29843091 2 --おジャマトリオ +53582587 2 --激流葬 +29401950 2 --奈落の落とし穴 + +!2025.10 TCG +#forbidden +62320425 0 --Agido the Ancient Sentinel +06728559 0 --Archnemeses Protos +80237445 0 --Artifact Mjollnir +20292186 0 --Artifact Scythe +19740112 0 --Barrier Statue of the Drought +47961808 0 --Barrier Statue of the Inferno +73356503 0 --Barrier Statue of the Stormwinds +09929398 0 --Blackwing - Gofu the Vague Shadow +94689206 0 --Block Dragon +69015963 0 --Cyber-Stein +15341821 0 --Dandylion +08903700 0 --Djinn Releaser of Rituals +51858306 0 --Eclipse Wyvern +55623480 0 --Fairy Tail - Snow +78706415 0 --Fiber Jar +93369354 0 --Fishborg Blaster +42009836 0 --Fossil Dyna Pachycephalo +55204071 0 --Gimmick Puppet Nightmare +75732622 0 --Grinder Golem +41855169 0 --Jowgen the Spiritualist +25926710 0 --Kelbek the Ancient Vanguard +57421866 0 --Level Eater +34206604 0 --Magical Scientist +23434538 0 --Maxx "C" +96782886 0 --Mind Master +23558733 0 --Phoenixian Cluster Amaryllis +01357146 0 --Ronintoadin +91258852 0 --SPYRAL Master Plan +88071625 0 --The Tyrant Neptune +44910027 0 --Victory Dragon +17412721 0 --Elder Entity Norden +43387895 0 --Supreme King Dragon Starving Venom +92731385 0 --Tearlaments Kitkallos +04280258 0 --Apollousa, Bow of the Goddess +50588353 0 --Crystron Halqifibrax +98095162 0 --Curious, the Lightsworn Dominion +59537380 0 --Guardragon Agarpain +86148577 0 --Guardragon Elpy +24094258 0 --Heavymetalfoes Electrumite +59934749 0 --Isolde, Two Tales of the Noble Knights +39064822 0 --Knightmare Goblin +65330383 0 --Knightmare Gryphon +03679218 0 --Knightmare Mermaid +30342076 0 --Link Decoder +85243784 0 --Linkross +44097050 0 --Mecha Phantom Beast Auroradon +71818935 0 --Moon of the Closed Heaven +25725326 0 --Prank-Kids Meow-Meow-Mu +70369116 0 --Predaplant Verte Anaconda +72330894 0 --Simorgh, Bird of Sovereignty +59859086 0 --Splash Mage +27381364 0 --Spright Elf +33918636 0 --Superheavy Samurai Scarecrow +22593417 0 --Topologic Gumblar Dragon +83152482 0 --Union Carrier +84815190 0 --Baronne de Fleur +27548199 0 --Borreload Savage Dragon +03040496 0 --Chaos Ruler, the Chaotic Magical Dragon +62242678 0 --Hot Red Dragon Archfiend King Calamity +63101919 0 --Tempest Magician +21044178 0 --Abyss Dweller +00440556 0 --Bahamut Shark +27552504 0 --Beatrice, Lady of the Eternal +38273745 0 --Evilswarm Ouroboros +48626373 0 --Kashtira Arise-Heart +11398059 0 --King of the Feral Imps +34086406 0 --Lavalval Chain +04423206 0 --M-X-Saber Invoker +54719828 0 --Number 16: Shock Master +10389142 0 --Number 42: Galaxy Tomahawk +35772782 0 --Number 67: Pair-a-Dice Smasher +63504681 0 --Number 86: Heroic Champion - Rhongomyniad +95474755 0 --Number 89: Diablosis the Mind Hacker +58820923 0 --Number 95: Galaxy-Eyes Dark Matter Dragon +52653092 0 --Number S0: Utopic ZEXAL +34945480 0 --Outer Entity Azathot +88581108 0 --True King of All Calamities +81122844 0 --Wind-Up Carrier Zenmaity +85115440 0 --Zoodiac Broadbull +69243953 0 --Butterfly Dagger - Elma +57953380 0 --Card of Safe Return +60682203 0 --Cold Wave +17375316 0 --Confiscation +44763025 0 --Delinquent Duo +23557835 0 --Dimension Fusion +42703248 0 --Giant Trunade +79571449 0 --Graceful Charity +19613556 0 --Heavy Storm +35059553 0 --Kaiser Colosseum +85602018 0 --Last Will +34906152 0 --Mass Driver +46411259 0 --Metamorphosis +41482598 0 --Mirage of Nightmare +76375976 0 --Mystic Mine +89023486 0 --Original Sinful Spoils - Snake-Eye +74191942 0 --Painful Choice +55144522 0 --Pot of Greed +70828912 0 --Premature Burial +63789924 0 --Smoke Grenade of the Thief +54447022 0 --Soul Charge +42829885 0 --The Forceful Sentry +43262273 0 --Appointer of the Red Lotus +01041278 0 --Branded Expulsion +83326048 0 --Dimensional Barrier +61740673 0 --Imperial Order +28566710 0 --Last Turn +23002292 0 --Red Reboot +27174286 0 --Return from the Different Dimension +93016201 0 --Royal Oppression +57585212 0 --Self-Destruct Button +03280747 0 --Sixth Sense +23516703 0 --Summon Limit +64697231 0 --Trap Dustshoot +80604091 0 --Ultimate Offering +05851097 0 --Vanity's Emptiness +#limit +07902349 1 --Left Arm of the Forbidden One +44519536 1 --Left Leg of the Forbidden One +70903634 1 --Right Arm of the Forbidden One +08124921 1 --Right Leg of the Forbidden One +76794549 1 --Astrograph Sorcerer +06637331 1 --Bystial Druiswurm +33854624 1 --Bystial Magnamhut +14536035 1 --Dark Grepher +91800273 1 --Dimension Shifter +33396948 1 --Exodia the Forbidden One +34022970 1 --Ext Ryzeal +63542003 1 --Keldo the Sacred Protector +32061192 1 --Maliss

Dormouse +36521307 1 --Mathmech Circular +38572779 1 --Miscellaneousaurus +99937011 1 --Mudora the Sword Oracle +38814750 1 --PSY-Framegear Gamma +20663556 1 --Substitoad +37961969 1 --Tearlaments Havnis +74078255 1 --Tearlaments Merrli +00572850 1 --Tearlaments Scheiren +91810826 1 --Tenpai Dragon Chundra +29302858 1 --Vanquish Soul Razen +78872731 1 --Zoodiac Ratpier +46640168 1 --Fiendsmith's Lacrima +39512984 1 --Gem-Knight Master Diamond +80453041 1 --Phantom of Yubel +41999284 1 --Linkuriboh +73539069 1 --Striker Dragon +61665245 1 --Summon Sorceress +93896655 1 --Sunavalon Dryas +65563871 1 --Sunvine Healer +79606837 1 --Herald of the Arc Light +74586817 1 --PSY-Framelord Omega +90953320 1 --T.G. Hyper Librarian +00581014 1 --Daigusto Emeral +75433814 1 --Number 40: Gimmick Puppet of Strings +69170557 1 --Number C40: Gimmick Puppet of Dark Strings +34909328 1 --Ryzeal Detonator +48905153 1 --Zoodiac Drident +85106525 1 --Bonfire +07394770 1 --Brilliant Fusion +24224830 1 --Called by the Grave +72892473 1 --Card Destruction +59750328 1 --Card of Demise +91623717 1 --Chain Strike +04031928 1 --Change of Heart +99266988 1 --Chaos Space +67616300 1 --Chicken Game +65681983 1 --Crossout Designator +31552317 1 --Crystron Inclusion +15854426 1 --Divine Wind of Mist Valley +95308449 1 --Final Countdown +81439173 1 --Foolish Burial +27970830 1 --Gateway of the Six +75500286 1 --Gold Sarcophagus +18144506 1 --Harpie's Feather Duster +66957584 1 --Infernity Launcher +01845204 1 --Instant Fusion +93946239 1 --Into the Void +71650854 1 --Magical Mid-Breaker Field +43040603 1 --Monster Gate +83764718 1 --Monster Reborn +72537897 1 --Obedience Schooled +33782437 1 --One Day of Peace +02295440 1 --One for One +84211599 1 --Pot of Prosperity +58577036 1 --Reasoning +32807846 1 --Reinforcement of the Army +66730191 1 --Sangen Kaimen +30336082 1 --Sangen Summoning +24940422 1 --Sekka's Light +73468603 1 --Set Rotation +52340444 1 --Sky Striker Mecha - Hornet Drones +71344451 1 --Slash Draw +45986603 1 --Snatch Steal +54562327 1 --Stake your Soul! +73628505 1 --Terraforming +11110587 1 --That Grass Looks Greener +25311006 1 --Triple Tactics Talent +58921041 1 --Anti-Spell Fragrance +53334471 1 --Gozen Match +32723153 1 --Magical Explosion +03734202 1 --Naturia Sacred Tree +90846359 1 --Rivalry of Warlords +82732705 1 --Skill Drain +41420027 1 --Solemn Judgment +24207889 1 --There Can Be Only One +#semi limit +61901281 2 --Black Dragon Collapserpent +08633261 2 --Ice Ryzeal +69272449 2 --Maliss

White Rabbit +35844557 2 --Sword Ryzeal +41165831 2 --Unchained Soul of Sharvara +99234526 2 --White Dragon Wyverburster +44362883 2 --Branded Fusion +68337209 2 --Maliss in Underground +55584558 2 --Purrely Delicious Memory +21347668 2 --Purrely Sleepy Memory +92107604 2 --Runick Fountain + +!2025.9 TCG +#forbidden +62320425 0 --Agido the Ancient Sentinel +20292186 0 --Artifact Scythe +73356503 0 --Barrier Statue of the Stormwinds +09929398 0 --Blackwing - Gofu the Vague Shadow +94689206 0 --Block Dragon +69015963 0 --Cyber-Stein +15341821 0 --Dandylion +08903700 0 --Djinn Releaser of Rituals +51858306 0 --Eclipse Wyvern +55623480 0 --Fairy Tail - Snow +78706415 0 --Fiber Jar +93369354 0 --Fishborg Blaster +55204071 0 --Gimmick Puppet Nightmare +75732622 0 --Grinder Golem +41855169 0 --Jowgen the Spiritualist +25926710 0 --Kelbek the Ancient Vanguard +57421866 0 --Level Eater +34206604 0 --Magical Scientist +23434538 0 --Maxx "C" +96782886 0 --Mind Master +23558733 0 --Phoenixian Cluster Amaryllis +01357146 0 --Ronintoadin +91258852 0 --SPYRAL Master Plan +88071625 0 --The Tyrant Neptune +44910027 0 --Victory Dragon +17412721 0 --Elder Entity Norden +43387895 0 --Supreme King Dragon Starving Venom +92731385 0 --Tearlaments Kitkallos +04280258 0 --Apollousa, Bow of the Goddess +50588353 0 --Crystron Halqifibrax +98095162 0 --Curious, the Lightsworn Dominion +59537380 0 --Guardragon Agarpain +86148577 0 --Guardragon Elpy +24094258 0 --Heavymetalfoes Electrumite +59934749 0 --Isolde, Two Tales of the Noble Knights +39064822 0 --Knightmare Goblin +65330383 0 --Knightmare Gryphon +03679218 0 --Knightmare Mermaid +30342076 0 --Link Decoder +85243784 0 --Linkross +44097050 0 --Mecha Phantom Beast Auroradon +71818935 0 --Moon of the Closed Heaven +25725326 0 --Prank-Kids Meow-Meow-Mu +70369116 0 --Predaplant Verte Anaconda +72330894 0 --Simorgh, Bird of Sovereignty +59859086 0 --Splash Mage +27381364 0 --Spright Elf +33918636 0 --Superheavy Samurai Scarecrow +22593417 0 --Topologic Gumblar Dragon +83152482 0 --Union Carrier +84815190 0 --Baronne de Fleur +27548199 0 --Borreload Savage Dragon +03040496 0 --Chaos Ruler, the Chaotic Magical Dragon +62242678 0 --Hot Red Dragon Archfiend King Calamity +63101919 0 --Tempest Magician +21044178 0 --Abyss Dweller +00440556 0 --Bahamut Shark +27552504 0 --Beatrice, Lady of the Eternal +48626373 0 --Kashtira Arise-Heart +11398059 0 --King of the Feral Imps +34086406 0 --Lavalval Chain +04423206 0 --M-X-Saber Invoker +54719828 0 --Number 16: Shock Master +10389142 0 --Number 42: Galaxy Tomahawk +35772782 0 --Number 67: Pair-a-Dice Smasher +63504681 0 --Number 86: Heroic Champion - Rhongomyniad +95474755 0 --Number 89: Diablosis the Mind Hacker +58820923 0 --Number 95: Galaxy-Eyes Dark Matter Dragon +52653092 0 --Number S0: Utopic ZEXAL +34945480 0 --Outer Entity Azathot +88581108 0 --True King of All Calamities +81122844 0 --Wind-Up Carrier Zenmaity +85115440 0 --Zoodiac Broadbull +69243953 0 --Butterfly Dagger - Elma +57953380 0 --Card of Safe Return +60682203 0 --Cold Wave +17375316 0 --Confiscation +44763025 0 --Delinquent Duo +23557835 0 --Dimension Fusion +42703248 0 --Giant Trunade +79571449 0 --Graceful Charity +19613556 0 --Heavy Storm +35059553 0 --Kaiser Colosseum +85602018 0 --Last Will +34906152 0 --Mass Driver +46411259 0 --Metamorphosis +41482598 0 --Mirage of Nightmare +76375976 0 --Mystic Mine +89023486 0 --Original Sinful Spoils - Snake-Eye +74191942 0 --Painful Choice +55144522 0 --Pot of Greed +70828912 0 --Premature Burial +63789924 0 --Smoke Grenade of the Thief +54447022 0 --Soul Charge +42829885 0 --The Forceful Sentry +43262273 0 --Appointer of the Red Lotus +01041278 0 --Branded Expulsion +61740673 0 --Imperial Order +28566710 0 --Last Turn +23002292 0 --Red Reboot +27174286 0 --Return from the Different Dimension +93016201 0 --Royal Oppression +57585212 0 --Self-Destruct Button +03280747 0 --Sixth Sense +23516703 0 --Summon Limit +64697231 0 --Trap Dustshoot +80604091 0 --Ultimate Offering +05851097 0 --Vanity's Emptiness +#limit +07902349 1 --Left Arm of the Forbidden One +44519536 1 --Left Leg of the Forbidden One +70903634 1 --Right Arm of the Forbidden One +08124921 1 --Right Leg of the Forbidden One +06728559 1 --Archnemeses Protos +76794549 1 --Astrograph Sorcerer +06637331 1 --Bystial Druiswurm +33854624 1 --Bystial Magnamhut +14536035 1 --Dark Grepher +91800273 1 --Dimension Shifter +33396948 1 --Exodia the Forbidden One +34022970 1 --Ext Ryzeal +63542003 1 --Keldo the Sacred Protector +32061192 1 --Maliss

Dormouse +36521307 1 --Mathmech Circular +38572779 1 --Miscellaneousaurus +99937011 1 --Mudora the Sword Oracle +38814750 1 --PSY-Framegear Gamma +20663556 1 --Substitoad +37961969 1 --Tearlaments Havnis +74078255 1 --Tearlaments Merrli +00572850 1 --Tearlaments Scheiren +91810826 1 --Tenpai Dragon Chundra +29302858 1 --Vanquish Soul Razen +78872731 1 --Zoodiac Ratpier +46640168 1 --Fiendsmith's Lacrima +39512984 1 --Gem-Knight Master Diamond +80453041 1 --Phantom of Yubel +41999284 1 --Linkuriboh +73539069 1 --Striker Dragon +61665245 1 --Summon Sorceress +93896655 1 --Sunavalon Dryas +65563871 1 --Sunvine Healer +79606837 1 --Herald of the Arc Light +74586817 1 --PSY-Framelord Omega +90953320 1 --T.G. Hyper Librarian +00581014 1 --Daigusto Emeral +75433814 1 --Number 40: Gimmick Puppet of Strings +69170557 1 --Number C40: Gimmick Puppet of Dark Strings +34909328 1 --Ryzeal Detonator +48905153 1 --Zoodiac Drident +85106525 1 --Bonfire +07394770 1 --Brilliant Fusion +24224830 1 --Called by the Grave +72892473 1 --Card Destruction +59750328 1 --Card of Demise +91623717 1 --Chain Strike +04031928 1 --Change of Heart +99266988 1 --Chaos Space +67616300 1 --Chicken Game +65681983 1 --Crossout Designator +31552317 1 --Crystron Inclusion +15854426 1 --Divine Wind of Mist Valley +95308449 1 --Final Countdown +81439173 1 --Foolish Burial +27970830 1 --Gateway of the Six +75500286 1 --Gold Sarcophagus +18144506 1 --Harpie's Feather Duster +66957584 1 --Infernity Launcher +01845204 1 --Instant Fusion +93946239 1 --Into the Void +71650854 1 --Magical Mid-Breaker Field +43040603 1 --Monster Gate +83764718 1 --Monster Reborn +72537897 1 --Obedience Schooled +33782437 1 --One Day of Peace +02295440 1 --One for One +84211599 1 --Pot of Prosperity +58577036 1 --Reasoning +32807846 1 --Reinforcement of the Army +66730191 1 --Sangen Kaimen +30336082 1 --Sangen Summoning +24940422 1 --Sekka's Light +73468603 1 --Set Rotation +52340444 1 --Sky Striker Mecha - Hornet Drones +71344451 1 --Slash Draw +45986603 1 --Snatch Steal +54562327 1 --Stake your Soul! +73628505 1 --Terraforming +11110587 1 --That Grass Looks Greener +25311006 1 --Triple Tactics Talent +58921041 1 --Anti-Spell Fragrance +53334471 1 --Gozen Match +32723153 1 --Magical Explosion +03734202 1 --Naturia Sacred Tree +90846359 1 --Rivalry of Warlords +82732705 1 --Skill Drain +41420027 1 --Solemn Judgment +24207889 1 --There Can Be Only One +#semi limit +61901281 2 --Black Dragon Collapserpent +08633261 2 --Ice Ryzeal +69272449 2 --Maliss

White Rabbit +35844557 2 --Sword Ryzeal +41165831 2 --Unchained Soul of Sharvara +99234526 2 --White Dragon Wyverburster +44362883 2 --Branded Fusion +68337209 2 --Maliss in Underground +55584558 2 --Purrely Delicious Memory +21347668 2 --Purrely Sleepy Memory +92107604 2 --Runick Fountain + +!2025.4 TCG +#forbidden +62320425 0 --Agido the Ancient Sentinel +20292186 0 --Artifact Scythe +73356503 0 --Barrier Statue of the Stormwinds +09929398 0 --Blackwing - Gofu the Vague Shadow +94689206 0 --Block Dragon +69015963 0 --Cyber-Stein +15341821 0 --Dandylion +08903700 0 --Djinn Releaser of Rituals +51858306 0 --Eclipse Wyvern +55623480 0 --Fairy Tail - Snow +78706415 0 --Fiber Jar +93369354 0 --Fishborg Blaster +55204071 0 --Gimmick Puppet Nightmare +67441435 0 --Glow-Up Bulb +75732622 0 --Grinder Golem +41855169 0 --Jowgen the Spiritualist +25926710 0 --Kelbek the Ancient Vanguard +57421866 0 --Level Eater +34206604 0 --Magical Scientist +23434538 0 --Maxx "C" +96782886 0 --Mind Master +23558733 0 --Phoenixian Cluster Amaryllis +01357146 0 --Ronintoadin +91258852 0 --SPYRAL Master Plan +88071625 0 --The Tyrant Neptune +44910027 0 --Victory Dragon +17412721 0 --Elder Entity Norden +46640168 0 --Fiendsmith's Lacrima +43387895 0 --Supreme King Dragon Starving Venom +92731385 0 --Tearlaments Kitkallos +04280258 0 --Apollousa, Bow of the Goddess +50588353 0 --Crystron Halqifibrax +98095162 0 --Curious, the Lightsworn Dominion +59537380 0 --Guardragon Agarpain +86148577 0 --Guardragon Elpy +24094258 0 --Heavymetalfoes Electrumite +59934749 0 --Isolde, Two Tales of the Noble Knights +39064822 0 --Knightmare Goblin +65330383 0 --Knightmare Gryphon +03679218 0 --Knightmare Mermaid +30342076 0 --Link Decoder +85243784 0 --Linkross +41999284 0 --Linkuriboh +44097050 0 --Mecha Phantom Beast Auroradon +25725326 0 --Prank-Kids Meow-Meow-Mu +70369116 0 --Predaplant Verte Anaconda +72330894 0 --Simorgh, Bird of Sovereignty +27381364 0 --Spright Elf +61665245 0 --Summon Sorceress +33918636 0 --Superheavy Samurai Scarecrow +22593417 0 --Topologic Gumblar Dragon +83152482 0 --Union Carrier +84815190 0 --Baronne de Fleur +27548199 0 --Borreload Savage Dragon +03040496 0 --Chaos Ruler, the Chaotic Magical Dragon +62242678 0 --Hot Red Dragon Archfiend King Calamity +63101919 0 --Tempest Magician +21044178 0 --Abyss Dweller +00440556 0 --Bahamut Shark +27552504 0 --Beatrice, Lady of the Eternal +48626373 0 --Kashtira Arise-Heart +34086406 0 --Lavalval Chain +04423206 0 --M-X-Saber Invoker +54719828 0 --Number 16: Shock Master +10389142 0 --Number 42: Galaxy Tomahawk +63504681 0 --Number 86: Heroic Champion - Rhongomyniad +95474755 0 --Number 89: Diablosis the Mind Hacker +58820923 0 --Number 95: Galaxy-Eyes Dark Matter Dragon +52653092 0 --Number S0: Utopic ZEXAL +34945480 0 --Outer Entity Azathot +88581108 0 --True King of All Calamities +81122844 0 --Wind-Up Carrier Zenmaity +85115440 0 --Zoodiac Broadbull +48905153 0 --Zoodiac Drident +69243953 0 --Butterfly Dagger - Elma +57953380 0 --Card of Safe Return +60682203 0 --Cold Wave +17375316 0 --Confiscation +44763025 0 --Delinquent Duo +23557835 0 --Dimension Fusion +42703248 0 --Giant Trunade +79571449 0 --Graceful Charity +19613556 0 --Heavy Storm +35059553 0 --Kaiser Colosseum +85602018 0 --Last Will +34906152 0 --Mass Driver +46411259 0 --Metamorphosis +41482598 0 --Mirage of Nightmare +76375976 0 --Mystic Mine +89023486 0 --Original Sinful Spoils - Snake-Eye +74191942 0 --Painful Choice +55144522 0 --Pot of Greed +70828912 0 --Premature Burial +63789924 0 --Smoke Grenade of the Thief +54447022 0 --Soul Charge +42829885 0 --The Forceful Sentry +43262273 0 --Appointer of the Red Lotus +01041278 0 --Branded Expulsion +61740673 0 --Imperial Order +28566710 0 --Last Turn +23002292 0 --Red Reboot +27174286 0 --Return from the Different Dimension +93016201 0 --Royal Oppression +57585212 0 --Self-Destruct Button +03280747 0 --Sixth Sense +23516703 0 --Summon Limit +64697231 0 --Trap Dustshoot +80604091 0 --Ultimate Offering +05851097 0 --Vanity's Emptiness +#limit +07902349 1 --Left Arm of the Forbidden One +44519536 1 --Left Leg of the Forbidden One +70903634 1 --Right Arm of the Forbidden One +08124921 1 --Right Leg of the Forbidden One +06728559 1 --Archnemeses Protos +76794549 1 --Astrograph Sorcerer +06637331 1 --Bystial Druiswurm +33854624 1 --Bystial Magnamhut +14536035 1 --Dark Grepher +91800273 1 --Dimension Shifter +33396948 1 --Exodia the Forbidden One +63542003 1 --Keldo the Sacred Protector +21377582 1 --Master Peace, the True Dracoslaying King +36521307 1 --Mathmech Circular +38572779 1 --Miscellaneousaurus +99937011 1 --Mudora the Sword Oracle +12958919 1 --Phantom Skyblaster +38814750 1 --PSY-Framegear Gamma +20663556 1 --Substitoad +37961969 1 --Tearlaments Havnis +74078255 1 --Tearlaments Merrli +00572850 1 --Tearlaments Scheiren +91810826 1 --Tenpai Dragon Chundra +78872731 1 --Zoodiac Ratpier +39512984 1 --Gem-Knight Master Diamond +80453041 1 --Phantom of Yubel +73539069 1 --Striker Dragon +93896655 1 --Sunavalon Dryas +65563871 1 --Sunvine Healer +74586817 1 --PSY-Framelord Omega +90953320 1 --T.G. Hyper Librarian +00581014 1 --Daigusto Emeral +75433814 1 --Number 40: Gimmick Puppet of Strings +69170557 1 --Number C40: Gimmick Puppet of Dark Strings +34909328 1 --Ryzeal Detonator +85106525 1 --Bonfire +44362883 1 --Branded Fusion +07394770 1 --Brilliant Fusion +24224830 1 --Called by the Grave +72892473 1 --Card Destruction +59750328 1 --Card of Demise +91623717 1 --Chain Strike +04031928 1 --Change of Heart +99266988 1 --Chaos Space +67616300 1 --Chicken Game +65681983 1 --Crossout Designator +15854426 1 --Divine Wind of Mist Valley +13035077 1 --Dragonic Diagram +95308449 1 --Final Countdown +81439173 1 --Foolish Burial +27970830 1 --Gateway of the Six +75500286 1 --Gold Sarcophagus +18144506 1 --Harpie's Feather Duster +66957584 1 --Infernity Launcher +01845204 1 --Instant Fusion +93946239 1 --Into the Void +71650854 1 --Magical Mid-Breaker Field +43040603 1 --Monster Gate +83764718 1 --Monster Reborn +33782437 1 --One Day of Peace +02295440 1 --One for One +84211599 1 --Pot of Prosperity +58577036 1 --Reasoning +32807846 1 --Reinforcement of the Army +66730191 1 --Sangen Kaimen +30336082 1 --Sangen Summoning +24940422 1 --Sekka's Light +73468603 1 --Set Rotation +52340444 1 --Sky Striker Mecha - Hornet Drones +71344451 1 --Slash Draw +45986603 1 --Snatch Steal +73628505 1 --Terraforming +11110587 1 --That Grass Looks Greener +25311006 1 --Triple Tactics Talent +46060017 1 --Zoodiac Barrage +58921041 1 --Anti-Spell Fragrance +53334471 1 --Gozen Match +32723153 1 --Magical Explosion +03734202 1 --Naturia Sacred Tree +90846359 1 --Rivalry of Warlords +82732705 1 --Skill Drain +24207889 1 --There Can Be Only One +#semi limit +61901281 2 --Black Dragon Collapserpent +34022970 2 --Ext Ryzeal +08633261 2 --Ice Ryzeal +32061192 2 --Maliss

Dormouse +69272449 2 --Maliss

White Rabbit +33508719 2 --Morphing Jar +09674034 2 --Snake-Eye Ash +90241276 2 --Snake-Eyes Poplar +35844557 2 --Sword Ryzeal +41165831 2 --Unchained Soul of Sharvara +99234526 2 --White Dragon Wyverburster +14532163 2 --Lightning Storm +68337209 2 --Maliss in Underground +55584558 2 --Purrely Delicious Memory +21347668 2 --Purrely Sleepy Memory +92107604 2 --Runick Fountain + +!2024.12 TCG +#forbidden +62320425 0 --Agido the Ancient Sentinel +20292186 0 --Artifact Scythe +73356503 0 --Barrier Statue of the Stormwinds +09929398 0 --Blackwing - Gofu the Vague Shadow +94689206 0 --Block Dragon +69015963 0 --Cyber-Stein +15341821 0 --Dandylion +08903700 0 --Djinn Releaser of Rituals +51858306 0 --Eclipse Wyvern +55623480 0 --Fairy Tail - Snow +78706415 0 --Fiber Jar +93369354 0 --Fishborg Blaster +55204071 0 --Gimmick Puppet Nightmare +67441435 0 --Glow-Up Bulb +75732622 0 --Grinder Golem +41855169 0 --Jowgen the Spiritualist +25926710 0 --Kelbek the Ancient Vanguard +57421866 0 --Level Eater +34206604 0 --Magical Scientist +21377582 0 --Master Peace, the True Dracoslaying King +36521307 0 --Mathmech Circular +23434538 0 --Maxx "C" +96782886 0 --Mind Master +23558733 0 --Phoenixian Cluster Amaryllis +01357146 0 --Ronintoadin +91258852 0 --SPYRAL Master Plan +88071625 0 --The Tyrant Neptune +44910027 0 --Victory Dragon +17412721 0 --Elder Entity Norden +46640168 0 --Fiendsmith's Lacrima +43387895 0 --Supreme King Dragon Starving Venom +92731385 0 --Tearlaments Kitkallos +04280258 0 --Apollousa, Bow of the Goddess +50588353 0 --Crystron Halqifibrax +98095162 0 --Curious, the Lightsworn Dominion +59537380 0 --Guardragon Agarpain +86148577 0 --Guardragon Elpy +24094258 0 --Heavymetalfoes Electrumite +59934749 0 --Isolde, Two Tales of the Noble Knights +39064822 0 --Knightmare Goblin +03679218 0 --Knightmare Mermaid +85243784 0 --Linkross +41999284 0 --Linkuriboh +44097050 0 --Mecha Phantom Beast Auroradon +25725326 0 --Prank-Kids Meow-Meow-Mu +70369116 0 --Predaplant Verte Anaconda +72330894 0 --Simorgh, Bird of Sovereignty +27381364 0 --Spright Elf +61665245 0 --Summon Sorceress +33918636 0 --Superheavy Samurai Scarecrow +22593417 0 --Topologic Gumblar Dragon +83152482 0 --Union Carrier +84815190 0 --Baronne de Fleur +27548199 0 --Borreload Savage Dragon +03040496 0 --Chaos Ruler, the Chaotic Magical Dragon +62242678 0 --Hot Red Dragon Archfiend King Calamity +63101919 0 --Tempest Magician +27552504 0 --Beatrice, Lady of the Eternal +48626373 0 --Kashtira Arise-Heart +34086406 0 --Lavalval Chain +04423206 0 --M-X-Saber Invoker +54719828 0 --Number 16: Shock Master +10389142 0 --Number 42: Galaxy Tomahawk +63504681 0 --Number 86: Heroic Champion - Rhongomyniad +95474755 0 --Number 89: Diablosis the Mind Hacker +58820923 0 --Number 95: Galaxy-Eyes Dark Matter Dragon +52653092 0 --Number S0: Utopic ZEXAL +34945480 0 --Outer Entity Azathot +88581108 0 --True King of All Calamities +81122844 0 --Wind-Up Carrier Zenmaity +85115440 0 --Zoodiac Broadbull +48905153 0 --Zoodiac Drident +07394770 0 --Brilliant Fusion +69243953 0 --Butterfly Dagger - Elma +57953380 0 --Card of Safe Return +60682203 0 --Cold Wave +17375316 0 --Confiscation +44763025 0 --Delinquent Duo +23557835 0 --Dimension Fusion +42703248 0 --Giant Trunade +79571449 0 --Graceful Charity +19613556 0 --Heavy Storm +35059553 0 --Kaiser Colosseum +85602018 0 --Last Will +34906152 0 --Mass Driver +46411259 0 --Metamorphosis +41482598 0 --Mirage of Nightmare +76375976 0 --Mystic Mine +89023486 0 --Original Sinful Spoils - Snake-Eye +74191942 0 --Painful Choice +55144522 0 --Pot of Greed +70828912 0 --Premature Burial +63789924 0 --Smoke Grenade of the Thief +54447022 0 --Soul Charge +42829885 0 --The Forceful Sentry +43262273 0 --Appointer of the Red Lotus +01041278 0 --Branded Expulsion +61740673 0 --Imperial Order +28566710 0 --Last Turn +23002292 0 --Red Reboot +27174286 0 --Return from the Different Dimension +93016201 0 --Royal Oppression +57585212 0 --Self-Destruct Button +03280747 0 --Sixth Sense +23516703 0 --Summon Limit +64697231 0 --Trap Dustshoot +80604091 0 --Ultimate Offering +05851097 0 --Vanity's Emptiness +#limit +07902349 1 --Left Arm of the Forbidden One +44519536 1 --Left Leg of the Forbidden One +70903634 1 --Right Arm of the Forbidden One +08124921 1 --Right Leg of the Forbidden One +06728559 1 --Archnemeses Protos +76794549 1 --Astrograph Sorcerer +61901281 1 --Black Dragon Collapserpent +33854624 1 --Bystial Magnamhut +14536035 1 --Dark Grepher +33396948 1 --Exodia the Forbidden One +63542003 1 --Keldo the Sacred Protector +38572779 1 --Miscellaneousaurus +33508719 1 --Morphing Jar +99937011 1 --Mudora the Sword Oracle +12958919 1 --Phantom Skyblaster +38814750 1 --PSY-Framegear Gamma +09674034 1 --Snake-Eye Ash +90241276 1 --Snake-Eyes Poplar +20663556 1 --Substitoad +37961969 1 --Tearlaments Havnis +74078255 1 --Tearlaments Merrli +00572850 1 --Tearlaments Scheiren +91810826 1 --Tenpai Dragon Chundra +41165831 1 --Unchained Soul of Sharvara +99234526 1 --White Dragon Wyverburster +78872731 1 --Zoodiac Ratpier +39512984 1 --Gem-Knight Master Diamond +80453041 1 --Phantom of Yubel +73539069 1 --Striker Dragon +93896655 1 --Sunavalon Dryas +65563871 1 --Sunvine Healer +74586817 1 --PSY-Framelord Omega +90953320 1 --T.G. Hyper Librarian +00581014 1 --Daigusto Emeral +75433814 1 --Number 40: Gimmick Puppet of Strings +69170557 1 --Number C40: Gimmick Puppet of Dark Strings +44362883 1 --Branded Fusion +24224830 1 --Called by the Grave +72892473 1 --Card Destruction +59750328 1 --Card of Demise +91623717 1 --Chain Strike +04031928 1 --Change of Heart +99266988 1 --Chaos Space +67616300 1 --Chicken Game +15854426 1 --Divine Wind of Mist Valley +13035077 1 --Dragonic Diagram +95308449 1 --Final Countdown +81439173 1 --Foolish Burial +27970830 1 --Gateway of the Six +75500286 1 --Gold Sarcophagus +18144506 1 --Harpie's Feather Duster +66957584 1 --Infernity Launcher +01845204 1 --Instant Fusion +93946239 1 --Into the Void +71650854 1 --Magical Mid-Breaker Field +43040603 1 --Monster Gate +83764718 1 --Monster Reborn +33782437 1 --One Day of Peace +02295440 1 --One for One +84211599 1 --Pot of Prosperity +58577036 1 --Reasoning +32807846 1 --Reinforcement of the Army +66730191 1 --Sangen Kaimen +30336082 1 --Sangen Summoning +24940422 1 --Sekka's Light +73468603 1 --Set Rotation +52340444 1 --Sky Striker Mecha - Hornet Drones +71344451 1 --Slash Draw +45986603 1 --Snatch Steal +73628505 1 --Terraforming +11110587 1 --That Grass Looks Greener +46060017 1 --Zoodiac Barrage +58921041 1 --Anti-Spell Fragrance +53334471 1 --Gozen Match +32723153 1 --Magical Explosion +03734202 1 --Naturia Sacred Tree +90846359 1 --Rivalry of Warlords +82732705 1 --Skill Drain +24207889 1 --There Can Be Only One +#semi limit +34124316 2 --Cyber Jar +43694650 2 --Danger!? Jackalope? +99745551 2 --Danger!? Tsuchinoko? +40177746 2 --Eva +17330916 2 --Performapal Monkeyboard +14532163 2 --Lightning Storm +55584558 2 --Purrely Delicious Memory +21347668 2 --Purrely Sleepy Memory +92107604 2 --Runick Fountain + +!2024.9 TCG +#forbidden +62320425 0 --Agido the Ancient Sentinel +20292186 0 --Artifact Scythe +73356503 0 --Barrier Statue of the Stormwinds +09929398 0 --Blackwing - Gofu the Vague Shadow +94689206 0 --Block Dragon +69015963 0 --Cyber-Stein +15341821 0 --Dandylion +08903700 0 --Djinn Releaser of Rituals +51858306 0 --Eclipse Wyvern +55623480 0 --Fairy Tail - Snow +78706415 0 --Fiber Jar +93369354 0 --Fishborg Blaster +67441435 0 --Glow-Up Bulb +75732622 0 --Grinder Golem +25926710 0 --Kelbek the Ancient Vanguard +57421866 0 --Level Eater +34206604 0 --Magical Scientist +21377582 0 --Master Peace, the True Dracoslaying King +36521307 0 --Mathmech Circular +23434538 0 --Maxx "C" +96782886 0 --Mind Master +23558733 0 --Phoenixian Cluster Amaryllis +01357146 0 --Ronintoadin +91258852 0 --SPYRAL Master Plan +88071625 0 --The Tyrant Neptune +44910027 0 --Victory Dragon +17412721 0 --Elder Entity Norden +46640168 0 --Fiendsmith's Lacrima +43387895 0 --Supreme King Dragon Starving Venom +92731385 0 --Tearlaments Kitkallos +04280258 0 --Apollousa, Bow of the Goddess +50588353 0 --Crystron Halqifibrax +98095162 0 --Curious, the Lightsworn Dominion +59537380 0 --Guardragon Agarpain +86148577 0 --Guardragon Elpy +24094258 0 --Heavymetalfoes Electrumite +59934749 0 --Isolde, Two Tales of the Noble Knights +39064822 0 --Knightmare Goblin +03679218 0 --Knightmare Mermaid +85243784 0 --Linkross +41999284 0 --Linkuriboh +44097050 0 --Mecha Phantom Beast Auroradon +25725326 0 --Prank-Kids Meow-Meow-Mu +70369116 0 --Predaplant Verte Anaconda +72330894 0 --Simorgh, Bird of Sovereignty +27381364 0 --Spright Elf +61665245 0 --Summon Sorceress +33918636 0 --Superheavy Samurai Scarecrow +22593417 0 --Topologic Gumblar Dragon +83152482 0 --Union Carrier +84815190 0 --Baronne de Fleur +27548199 0 --Borreload Savage Dragon +03040496 0 --Chaos Ruler, the Chaotic Magical Dragon +62242678 0 --Hot Red Dragon Archfiend King Calamity +63101919 0 --Tempest Magician +27552504 0 --Beatrice, Lady of the Eternal +48626373 0 --Kashtira Arise-Heart +34086406 0 --Lavalval Chain +04423206 0 --M-X-Saber Invoker +54719828 0 --Number 16: Shock Master +10389142 0 --Number 42: Galaxy Tomahawk +63504681 0 --Number 86: Heroic Champion - Rhongomyniad +95474755 0 --Number 89: Diablosis the Mind Hacker +58820923 0 --Number 95: Galaxy-Eyes Dark Matter Dragon +52653092 0 --Number S0: Utopic ZEXAL +34945480 0 --Outer Entity Azathot +88581108 0 --True King of All Calamities +81122844 0 --Wind-Up Carrier Zenmaity +85115440 0 --Zoodiac Broadbull +48905153 0 --Zoodiac Drident +07394770 0 --Brilliant Fusion +69243953 0 --Butterfly Dagger - Elma +57953380 0 --Card of Safe Return +60682203 0 --Cold Wave +17375316 0 --Confiscation +44763025 0 --Delinquent Duo +23557835 0 --Dimension Fusion +42703248 0 --Giant Trunade +79571449 0 --Graceful Charity +19613556 0 --Heavy Storm +35059553 0 --Kaiser Colosseum +85602018 0 --Last Will +34906152 0 --Mass Driver +46411259 0 --Metamorphosis +41482598 0 --Mirage of Nightmare +76375976 0 --Mystic Mine +74191942 0 --Painful Choice +55144522 0 --Pot of Greed +70828912 0 --Premature Burial +63789924 0 --Smoke Grenade of the Thief +54447022 0 --Soul Charge +42829885 0 --The Forceful Sentry +46060017 0 --Zoodiac Barrage +43262273 0 --Appointer of the Red Lotus +01041278 0 --Branded Expulsion +61740673 0 --Imperial Order +28566710 0 --Last Turn +23002292 0 --Red Reboot +27174286 0 --Return from the Different Dimension +93016201 0 --Royal Oppression +57585212 0 --Self-Destruct Button +03280747 0 --Sixth Sense +23516703 0 --Summon Limit +64697231 0 --Trap Dustshoot +80604091 0 --Ultimate Offering +05851097 0 --Vanity's Emptiness +#limit +07902349 1 --Left Arm of the Forbidden One +44519536 1 --Left Leg of the Forbidden One +70903634 1 --Right Arm of the Forbidden One +08124921 1 --Right Leg of the Forbidden One +06728559 1 --Archnemeses Protos +76794549 1 --Astrograph Sorcerer +61901281 1 --Black Dragon Collapserpent +33854624 1 --Bystial Magnamhut +34124316 1 --Cyber Jar +43694650 1 --Danger!? Jackalope? +99745551 1 --Danger!? Tsuchinoko? +14536035 1 --Dark Grepher +40177746 1 --Eva +33396948 1 --Exodia the Forbidden One +63542003 1 --Keldo the Sacred Protector +38572779 1 --Miscellaneousaurus +33508719 1 --Morphing Jar +99937011 1 --Mudora the Sword Oracle +17330916 1 --Performapal Monkeyboard +12958919 1 --Phantom Skyblaster +38814750 1 --PSY-Framegear Gamma +65734501 1 --Rescue-ACE Air Lifter +09674034 1 --Snake-Eye Ash +90241276 1 --Snake-Eyes Poplar +20663556 1 --Substitoad +37961969 1 --Tearlaments Havnis +74078255 1 --Tearlaments Merrli +00572850 1 --Tearlaments Scheiren +41165831 1 --Unchained Soul of Sharvara +99234526 1 --White Dragon Wyverburster +78872731 1 --Zoodiac Ratpier +39512984 1 --Gem-Knight Master Diamond +73539069 1 --Striker Dragon +93896655 1 --Sunavalon Dryas +65563871 1 --Sunvine Healer +74586817 1 --PSY-Framelord Omega +90953320 1 --T.G. Hyper Librarian +00581014 1 --Daigusto Emeral +75433814 1 --Number 40: Gimmick Puppet of Strings +69170557 1 --Number C40: Gimmick Puppet of Dark Strings +44362883 1 --Branded Fusion +24224830 1 --Called by the Grave +72892473 1 --Card Destruction +59750328 1 --Card of Demise +91623717 1 --Chain Strike +04031928 1 --Change of Heart +99266988 1 --Chaos Space +67616300 1 --Chicken Game +15854426 1 --Divine Wind of Mist Valley +13035077 1 --Dragonic Diagram +95308449 1 --Final Countdown +81439173 1 --Foolish Burial +27970830 1 --Gateway of the Six +75500286 1 --Gold Sarcophagus +18144506 1 --Harpie's Feather Duster +66957584 1 --Infernity Launcher +01845204 1 --Instant Fusion +93946239 1 --Into the Void +71650854 1 --Magical Mid-Breaker Field +43040603 1 --Monster Gate +83764718 1 --Monster Reborn +33782437 1 --One Day of Peace +02295440 1 --One for One +80312545 1 --Opening of the Spirit Gates +84211599 1 --Pot of Prosperity +58577036 1 --Reasoning +32807846 1 --Reinforcement of the Army +30336082 1 --Sangen Summoning +24940422 1 --Sekka's Light +73468603 1 --Set Rotation +52340444 1 --Sky Striker Mecha - Hornet Drones +71344451 1 --Slash Draw +45986603 1 --Snatch Steal +73628505 1 --Terraforming +11110587 1 --That Grass Looks Greener +58921041 1 --Anti-Spell Fragrance +53334471 1 --Gozen Match +32723153 1 --Magical Explosion +03734202 1 --Naturia Sacred Tree +90846359 1 --Rivalry of Warlords +82732705 1 --Skill Drain +24207889 1 --There Can Be Only One +#semi limit +53804307 2 --Blaster, Dragon Ruler of Infernos +82385847 2 --Dinowrestler Pankratops +83190280 2 --Lunalight Tiger +90411554 2 --Redox, Dragon Ruler of Boulders +89399912 2 --Tempest, Dragon Ruler of Storms +26400609 2 --Tidal, Dragon Ruler of Waterfalls +15291624 2 --Thunder Dragon Colossus +94677445 2 --Ib the World Chalice Justiciar +14532163 2 --Lightning Storm +55584558 2 --Purrely Delicious Memory +21347668 2 --Purrely Sleepy Memory +92107604 2 --Runick Fountain + +!2024.4 TCG +#forbidden +62320425 0 --Agido the Ancient Sentinel +20292186 0 --Artifact Scythe +73356503 0 --Barrier Statue of the Stormwinds +09929398 0 --Blackwing - Gofu the Vague Shadow +94689206 0 --Block Dragon +69015963 0 --Cyber-Stein +15341821 0 --Dandylion +08903700 0 --Djinn Releaser of Rituals +51858306 0 --Eclipse Wyvern +40177746 0 --Eva +55623480 0 --Fairy Tail - Snow +78706415 0 --Fiber Jar +93369354 0 --Fishborg Blaster +67441435 0 --Glow-Up Bulb +75732622 0 --Grinder Golem +25926710 0 --Kelbek the Ancient Vanguard +57421866 0 --Level Eater +34206604 0 --Magical Scientist +21377582 0 --Master Peace, the True Dracoslaying King +36521307 0 --Mathmech Circular +23434538 0 --Maxx "C" +96782886 0 --Mind Master +07563579 0 --Performage Plushfire +23558733 0 --Phoenixian Cluster Amaryllis +01357146 0 --Ronintoadin +91258852 0 --SPYRAL Master Plan +88071625 0 --The Tyrant Neptune +44910027 0 --Victory Dragon +17412721 0 --Elder Entity Norden +43387895 0 --Supreme King Dragon Starving Venom +92731385 0 --Tearlaments Kitkallos +50588353 0 --Crystron Halqifibrax +98095162 0 --Curious, the Lightsworn Dominion +59537380 0 --Guardragon Agarpain +86148577 0 --Guardragon Elpy +24094258 0 --Heavymetalfoes Electrumite +59934749 0 --Isolde, Two Tales of the Noble Knights +39064822 0 --Knightmare Goblin +03679218 0 --Knightmare Mermaid +85243784 0 --Linkross +41999284 0 --Linkuriboh +44097050 0 --Mecha Phantom Beast Auroradon +25725326 0 --Prank-Kids Meow-Meow-Mu +70369116 0 --Predaplant Verte Anaconda +72330894 0 --Simorgh, Bird of Sovereignty +27381364 0 --Spright Elf +61665245 0 --Summon Sorceress +33918636 0 --Superheavy Samurai Scarecrow +22593417 0 --Topologic Gumblar Dragon +83152482 0 --Union Carrier +84815190 0 --Baronne de Fleur +27548199 0 --Borreload Savage Dragon +03040496 0 --Chaos Ruler, the Chaotic Magical Dragon +63101919 0 --Tempest Magician +48626373 0 --Kashtira Arise-Heart +34086406 0 --Lavalval Chain +04423206 0 --M-X-Saber Invoker +54719828 0 --Number 16: Shock Master +10389142 0 --Number 42: Galaxy Tomahawk +63504681 0 --Number 86: Heroic Champion - Rhongomyniad +95474755 0 --Number 89: Diablosis the Mind Hacker +58820923 0 --Number 95: Galaxy-Eyes Dark Matter Dragon +52653092 0 --Number S0: Utopic ZEXAL +34945480 0 --Outer Entity Azathot +88581108 0 --True King of All Calamities +81122844 0 --Wind-Up Carrier Zenmaity +85115440 0 --Zoodiac Broadbull +48905153 0 --Zoodiac Drident +07394770 0 --Brilliant Fusion +69243953 0 --Butterfly Dagger - Elma +57953380 0 --Card of Safe Return +60682203 0 --Cold Wave +17375316 0 --Confiscation +44763025 0 --Delinquent Duo +23557835 0 --Dimension Fusion +42703248 0 --Giant Trunade +79571449 0 --Graceful Charity +19613556 0 --Heavy Storm +35059553 0 --Kaiser Colosseum +85602018 0 --Last Will +34906152 0 --Mass Driver +46411259 0 --Metamorphosis +41482598 0 --Mirage of Nightmare +76375976 0 --Mystic Mine +74191942 0 --Painful Choice +55144522 0 --Pot of Greed +70828912 0 --Premature Burial +63789924 0 --Smoke Grenade of the Thief +54447022 0 --Soul Charge +11110587 0 --That Grass Looks Greener +42829885 0 --The Forceful Sentry +46060017 0 --Zoodiac Barrage +43262273 0 --Appointer of the Red Lotus +01041278 0 --Branded Expulsion +61740673 0 --Imperial Order +28566710 0 --Last Turn +23002292 0 --Red Reboot +27174286 0 --Return from the Different Dimension +93016201 0 --Royal Oppression +57585212 0 --Self-Destruct Button +03280747 0 --Sixth Sense +23516703 0 --Summon Limit +64697231 0 --Trap Dustshoot +80604091 0 --Ultimate Offering +05851097 0 --Vanity's Emptiness +#limit +07902349 1 --Left Arm of the Forbidden One +44519536 1 --Left Leg of the Forbidden One +70903634 1 --Right Arm of the Forbidden One +08124921 1 --Right Leg of the Forbidden One +06728559 1 --Archnemeses Protos +76794549 1 --Astrograph Sorcerer +61901281 1 --Black Dragon Collapserpent +53804307 1 --Blaster, Dragon Ruler of Infernos +33854624 1 --Bystial Magnamhut +34124316 1 --Cyber Jar +43694650 1 --Danger!? Jackalope? +99745551 1 --Danger!? Tsuchinoko? +14536035 1 --Dark Grepher +33396948 1 --Exodia the Forbidden One +63542003 1 --Keldo the Sacred Protector +83190280 1 --Lunalight Tiger +31178212 1 --Majespecter Unicorn - Kirin +38572779 1 --Miscellaneousaurus +33508719 1 --Morphing Jar +99937011 1 --Mudora the Sword Oracle +17330916 1 --Performapal Monkeyboard +12958919 1 --Phantom Skyblaster +38814750 1 --PSY-Framegear Gamma +26118970 1 --Red Rose Dragon +90411554 1 --Redox, Dragon Ruler of Boulders +65734501 1 --Rescue-ACE Air Lifter +20663556 1 --Substitoad +37961969 1 --Tearlaments Havnis +74078255 1 --Tearlaments Merrli +00572850 1 --Tearlaments Scheiren +89399912 1 --Tempest, Dragon Ruler of Storms +26400609 1 --Tidal, Dragon Ruler of Waterfalls +41165831 1 --Unchained Soul of Sharvara +99234526 1 --White Dragon Wyverburster +78872731 1 --Zoodiac Ratpier +39512984 1 --Gem-Knight Master Diamond +15291624 1 --Thunder Dragon Colossus +73539069 1 --Striker Dragon +93896655 1 --Sunavalon Dryas +65563871 1 --Sunvine Healer +25862681 1 --Ancient Fairy Dragon +65536818 1 --Denglong, First of the Yang Zing +94677445 1 --Ib the World Chalice Justiciar +74586817 1 --PSY-Framelord Omega +90953320 1 --T.G. Hyper Librarian +27552504 1 --Beatrice, Lady of the Eternal +00581014 1 --Daigusto Emeral +24224830 1 --Called by the Grave +72892473 1 --Card Destruction +59750328 1 --Card of Demise +91623717 1 --Chain Strike +04031928 1 --Change of Heart +99266988 1 --Chaos Space +67616300 1 --Chicken Game +15854426 1 --Divine Wind of Mist Valley +13035077 1 --Dragonic Diagram +95308449 1 --Final Countdown +81439173 1 --Foolish Burial +27970830 1 --Gateway of the Six +75500286 1 --Gold Sarcophagus +18144506 1 --Harpie's Feather Duster +66957584 1 --Infernity Launcher +01845204 1 --Instant Fusion +93946239 1 --Into the Void +71650854 1 --Magical Mid-Breaker Field +43040603 1 --Monster Gate +83764718 1 --Monster Reborn +33782437 1 --One Day of Peace +02295440 1 --One for One +58577036 1 --Reasoning +32807846 1 --Reinforcement of the Army +24940422 1 --Sekka's Light +73468603 1 --Set Rotation +52340444 1 --Sky Striker Mecha - Hornet Drones +71344451 1 --Slash Draw +45986603 1 --Snatch Steal +73628505 1 --Terraforming +58921041 1 --Anti-Spell Fragrance +53334471 1 --Gozen Match +32723153 1 --Magical Explosion +03734202 1 --Naturia Sacred Tree +90846359 1 --Rivalry of Warlords +24207889 1 --There Can Be Only One +35316708 1 --Time Seal +#semi limit +28985331 2 --Armageddon Knight +82385847 2 --Dinowrestler Pankratops +14532163 2 --Lightning Storm +55584558 2 --Purrely Delicious Memory +21347668 2 --Purrely Sleepy Memory +92107604 2 --Runick Fountain + +!2024.1 TCG +#forbidden +62320425 0 --Agido the Ancient Sentinel +06728559 0 --Archnemeses Protos +20292186 0 --Artifact Scythe +73356503 0 --Barrier Statue of the Stormwinds +09929398 0 --Blackwing - Gofu the Vague Shadow +94689206 0 --Block Dragon +69015963 0 --Cyber-Stein +15341821 0 --Dandylion +08903700 0 --Djinn Releaser of Rituals +51858306 0 --Eclipse Wyvern +40177746 0 --Eva +55623480 0 --Fairy Tail - Snow +78706415 0 --Fiber Jar +93369354 0 --Fishborg Blaster +67441435 0 --Glow-Up Bulb +75732622 0 --Grinder Golem +25926710 0 --Kelbek the Ancient Vanguard +57421866 0 --Level Eater +34206604 0 --Magical Scientist +31178212 0 --Majespecter Unicorn - Kirin +21377582 0 --Master Peace, the True Dracoslaying King +36521307 0 --Mathmech Circular +23434538 0 --Maxx "C" +96782886 0 --Mind Master +07563579 0 --Performage Plushfire +23558733 0 --Phoenixian Cluster Amaryllis +01357146 0 --Ronintoadin +91258852 0 --SPYRAL Master Plan +88071625 0 --The Tyrant Neptune +26400609 0 --Tidal, Dragon Ruler of Waterfalls +44910027 0 --Victory Dragon +17412721 0 --Elder Entity Norden +43387895 0 --Supreme King Dragon Starving Venom +92731385 0 --Tearlaments Kitkallos +15291624 0 --Thunder Dragon Colossus +50588353 0 --Crystron Halqifibrax +98095162 0 --Curious, the Lightsworn Dominion +59537380 0 --Guardragon Agarpain +86148577 0 --Guardragon Elpy +24094258 0 --Heavymetalfoes Electrumite +59934749 0 --Isolde, Two Tales of the Noble Knights +39064822 0 --Knightmare Goblin +03679218 0 --Knightmare Mermaid +85243784 0 --Linkross +44097050 0 --Mecha Phantom Beast Auroradon +25725326 0 --Prank-Kids Meow-Meow-Mu +70369116 0 --Predaplant Verte Anaconda +72330894 0 --Simorgh, Bird of Sovereignty +27381364 0 --Spright Elf +61665245 0 --Summon Sorceress +33918636 0 --Superheavy Samurai Scarecrow +22593417 0 --Topologic Gumblar Dragon +83152482 0 --Union Carrier +03040496 0 --Chaos Ruler, the Chaotic Magical Dragon +63101919 0 --Tempest Magician +48626373 0 --Kashtira Arise-Heart +34086406 0 --Lavalval Chain +04423206 0 --M-X-Saber Invoker +54719828 0 --Number 16: Shock Master +10389142 0 --Number 42: Galaxy Tomahawk +63504681 0 --Number 86: Heroic Champion - Rhongomyniad +95474755 0 --Number 89: Diablosis the Mind Hacker +58820923 0 --Number 95: Galaxy-Eyes Dark Matter Dragon +52653092 0 --Number S0: Utopic ZEXAL +34945480 0 --Outer Entity Azathot +88581108 0 --True King of All Calamities +81122844 0 --Wind-Up Carrier Zenmaity +85115440 0 --Zoodiac Broadbull +48905153 0 --Zoodiac Drident +07394770 0 --Brilliant Fusion +69243953 0 --Butterfly Dagger - Elma +57953380 0 --Card of Safe Return +67616300 0 --Chicken Game +60682203 0 --Cold Wave +17375316 0 --Confiscation +44763025 0 --Delinquent Duo +23557835 0 --Dimension Fusion +42703248 0 --Giant Trunade +79571449 0 --Graceful Charity +19613556 0 --Heavy Storm +35059553 0 --Kaiser Colosseum +85602018 0 --Last Will +34906152 0 --Mass Driver +46411259 0 --Metamorphosis +41482598 0 --Mirage of Nightmare +76375976 0 --Mystic Mine +74191942 0 --Painful Choice +55144522 0 --Pot of Greed +70828912 0 --Premature Burial +63789924 0 --Smoke Grenade of the Thief +54447022 0 --Soul Charge +11110587 0 --That Grass Looks Greener +42829885 0 --The Forceful Sentry +46060017 0 --Zoodiac Barrage +43262273 0 --Appointer of the Red Lotus +01041278 0 --Branded Expulsion +61740673 0 --Imperial Order +28566710 0 --Last Turn +23002292 0 --Red Reboot +27174286 0 --Return from the Different Dimension +93016201 0 --Royal Oppression +57585212 0 --Self-Destruct Button +03280747 0 --Sixth Sense +64697231 0 --Trap Dustshoot +80604091 0 --Ultimate Offering +05851097 0 --Vanity's Emptiness +#limit +07902349 1 --Left Arm of the Forbidden One +44519536 1 --Left Leg of the Forbidden One +70903634 1 --Right Arm of the Forbidden One +08124921 1 --Right Leg of the Forbidden One +28985331 1 --Armageddon Knight +76794549 1 --Astrograph Sorcerer +61901281 1 --Black Dragon Collapserpent +53804307 1 --Blaster, Dragon Ruler of Infernos +33854624 1 --Bystial Magnamhut +34124316 1 --Cyber Jar +43694650 1 --Danger!? Jackalope? +99745551 1 --Danger!? Tsuchinoko? +14536035 1 --Dark Grepher +33396948 1 --Exodia the Forbidden One +63542003 1 --Keldo the Sacred Protector +83190280 1 --Lunalight Tiger +38572779 1 --Miscellaneousaurus +33508719 1 --Morphing Jar +99937011 1 --Mudora the Sword Oracle +57835716 1 --Orcust Harp Horror +17330916 1 --Performapal Monkeyboard +12958919 1 --Phantom Skyblaster +38814750 1 --PSY-Framegear Gamma +26118970 1 --Red Rose Dragon +90411554 1 --Redox, Dragon Ruler of Boulders +65734501 1 --Rescue-ACE Air Lifter +20663556 1 --Substitoad +37961969 1 --Tearlaments Havnis +74078255 1 --Tearlaments Merrli +00572850 1 --Tearlaments Scheiren +89399912 1 --Tempest, Dragon Ruler of Storms +41165831 1 --Unchained Soul of Sharvara +99234526 1 --White Dragon Wyverburster +78872731 1 --Zoodiac Ratpier +39512984 1 --Gem-Knight Master Diamond +73539069 1 --Striker Dragon +93896655 1 --Sunavalon Dryas +65563871 1 --Sunvine Healer +25862681 1 --Ancient Fairy Dragon +65536818 1 --Denglong, First of the Yang Zing +94677445 1 --Ib the World Chalice Justiciar +74586817 1 --PSY-Framelord Omega +90953320 1 --T.G. Hyper Librarian +27552504 1 --Beatrice, Lady of the Eternal +00581014 1 --Daigusto Emeral +24224830 1 --Called by the Grave +72892473 1 --Card Destruction +59750328 1 --Card of Demise +91623717 1 --Chain Strike +04031928 1 --Change of Heart +99266988 1 --Chaos Space +15854426 1 --Divine Wind of Mist Valley +13035077 1 --Dragonic Diagram +95308449 1 --Final Countdown +81439173 1 --Foolish Burial +27970830 1 --Gateway of the Six +75500286 1 --Gold Sarcophagus +18144506 1 --Harpie's Feather Duster +66957584 1 --Infernity Launcher +01845204 1 --Instant Fusion +93946239 1 --Into the Void +71650854 1 --Magical Mid-Breaker Field +43040603 1 --Monster Gate +83764718 1 --Monster Reborn +33782437 1 --One Day of Peace +02295440 1 --One for One +55584558 1 --Purrely Delicious Memory +58577036 1 --Reasoning +32807846 1 --Reinforcement of the Army +24940422 1 --Sekka's Light +73468603 1 --Set Rotation +52340444 1 --Sky Striker Mecha - Hornet Drones +71344451 1 --Slash Draw +45986603 1 --Snatch Steal +73628505 1 --Terraforming +53334471 1 --Gozen Match +32723153 1 --Magical Explosion +03734202 1 --Naturia Sacred Tree +90846359 1 --Rivalry of Warlords +24207889 1 --There Can Be Only One +35316708 1 --Time Seal +#semi limit +09411399 2 --Destiny HERO - Malicious +82385847 2 --Dinowrestler Pankratops +81275020 2 --Speedroid Terrortop +14532163 2 --Lightning Storm +21347668 2 --Purrely Sleepy Memory +92107604 2 --Runick Fountain +63166095 2 --Sky Striker Mobilize - Engage! + +!2023.9 TCG +#forbidden +06728559 0 --Archnemeses Protos +20292186 0 --Artifact Scythe +73356503 0 --Barrier Statue of the Stormwinds +09929398 0 --Blackwing - Gofu the Vague Shadow +94689206 0 --Block Dragon +69015963 0 --Cyber-Stein +15341821 0 --Dandylion +08903700 0 --Djinn Releaser of Rituals +51858306 0 --Eclipse Wyvern +40177746 0 --Eva +55623480 0 --Fairy Tail - Snow +78706415 0 --Fiber Jar +93369354 0 --Fishborg Blaster +67441435 0 --Glow-Up Bulb +75732622 0 --Grinder Golem +57421866 0 --Level Eater +34206604 0 --Magical Scientist +31178212 0 --Majespecter Unicorn - Kirin +21377582 0 --Master Peace, the True Dracoslaying King +23434538 0 --Maxx "C" +96782886 0 --Mind Master +57835716 0 --Orcust Harp Horror +07563579 0 --Performage Plushfire +23558733 0 --Phoenixian Cluster Amaryllis +90411554 0 --Redox, Dragon Ruler of Boulders +01357146 0 --Ronintoadin +91258852 0 --SPYRAL Master Plan +88071625 0 --The Tyrant Neptune +26400609 0 --Tidal, Dragon Ruler of Waterfalls +44910027 0 --Victory Dragon +17412721 0 --Elder Entity Norden +43387895 0 --Supreme King Dragon Starving Venom +92731385 0 --Tearlaments Kitkallos +15291624 0 --Thunder Dragon Colossus +50588353 0 --Crystron Halqifibrax +98095162 0 --Curious, the Lightsworn Dominion +59537380 0 --Guardragon Agarpain +86148577 0 --Guardragon Elpy +24094258 0 --Heavymetalfoes Electrumite +39064822 0 --Knightmare Goblin +03679218 0 --Knightmare Mermaid +85243784 0 --Linkross +44097050 0 --Mecha Phantom Beast Auroradon +25725326 0 --Prank-Kids Meow-Meow-Mu +70369116 0 --Predaplant Verte Anaconda +72330894 0 --Simorgh, Bird of Sovereignty +27381364 0 --Spright Elf +61665245 0 --Summon Sorceress +33918636 0 --Superheavy Samurai Scarecrow +22593417 0 --Topologic Gumblar Dragon +83152482 0 --Union Carrier +03040496 0 --Chaos Ruler, the Chaotic Magical Dragon +94677445 0 --Ib the World Chalice Justiciar +63101919 0 --Tempest Magician +48626373 0 --Kashtira Arise-Heart +34086406 0 --Lavalval Chain +04423206 0 --M-X-Saber Invoker +54719828 0 --Number 16: Shock Master +10389142 0 --Number 42: Galaxy Tomahawk +63504681 0 --Number 86: Heroic Champion - Rhongomyniad +95474755 0 --Number 89: Diablosis the Mind Hacker +58820923 0 --Number 95: Galaxy-Eyes Dark Matter Dragon +52653092 0 --Number S0: Utopic ZEXAL +34945480 0 --Outer Entity Azathot +88581108 0 --True King of All Calamities +81122844 0 --Wind-Up Carrier Zenmaity +85115440 0 --Zoodiac Broadbull +48905153 0 --Zoodiac Drident +07394770 0 --Brilliant Fusion +69243953 0 --Butterfly Dagger - Elma +57953380 0 --Card of Safe Return +67616300 0 --Chicken Game +60682203 0 --Cold Wave +17375316 0 --Confiscation +44763025 0 --Delinquent Duo +23557835 0 --Dimension Fusion +42703248 0 --Giant Trunade +79571449 0 --Graceful Charity +19613556 0 --Heavy Storm +35059553 0 --Kaiser Colosseum +85602018 0 --Last Will +34906152 0 --Mass Driver +46411259 0 --Metamorphosis +41482598 0 --Mirage of Nightmare +76375976 0 --Mystic Mine +74191942 0 --Painful Choice +55144522 0 --Pot of Greed +70828912 0 --Premature Burial +63789924 0 --Smoke Grenade of the Thief +45986603 0 --Snatch Steal +54447022 0 --Soul Charge +11110587 0 --That Grass Looks Greener +42829885 0 --The Forceful Sentry +46060017 0 --Zoodiac Barrage +43262273 0 --Appointer of the Red Lotus +01041278 0 --Branded Expulsion +61740673 0 --Imperial Order +28566710 0 --Last Turn +23002292 0 --Red Reboot +27174286 0 --Return from the Different Dimension +93016201 0 --Royal Oppression +57585212 0 --Self-Destruct Button +03280747 0 --Sixth Sense +64697231 0 --Trap Dustshoot +80604091 0 --Ultimate Offering +05851097 0 --Vanity's Emptiness +#limit +07902349 1 --Left Arm of the Forbidden One +44519536 1 --Left Leg of the Forbidden One +70903634 1 --Right Arm of the Forbidden One +08124921 1 --Right Leg of the Forbidden One +62320425 1 --Agido the Ancient Sentinel +28985331 1 --Armageddon Knight +76794549 1 --Astrograph Sorcerer +61901281 1 --Black Dragon Collapserpent +53804307 1 --Blaster, Dragon Ruler of Infernos +33854624 1 --Bystial Magnamhut +34124316 1 --Cyber Jar +43694650 1 --Danger!? Jackalope? +99745551 1 --Danger!? Tsuchinoko? +14536035 1 --Dark Grepher +82385847 1 --Dinowrestler Pankratops +33396948 1 --Exodia the Forbidden One +99177923 1 --Infernity Archfiend +25926710 1 --Kelbek the Ancient Vanguard +63542003 1 --Keldo the Sacred Protector +83190280 1 --Lunalight Tiger +36521307 1 --Mathmech Circular +38572779 1 --Miscellaneousaurus +33508719 1 --Morphing Jar +99937011 1 --Mudora the Sword Oracle +17330916 1 --Performapal Monkeyboard +12958919 1 --Phantom Skyblaster +38814750 1 --PSY-Framegear Gamma +26118970 1 --Red Rose Dragon +81275020 1 --Speedroid Terrortop +20663556 1 --Substitoad +37961969 1 --Tearlaments Havnis +74078255 1 --Tearlaments Merrli +00572850 1 --Tearlaments Scheiren +89399912 1 --Tempest, Dragon Ruler of Storms +99234526 1 --White Dragon Wyverburster +78872731 1 --Zoodiac Ratpier +39512984 1 --Gem-Knight Master Diamond +73539069 1 --Striker Dragon +25862681 1 --Ancient Fairy Dragon +65536818 1 --Denglong, First of the Yang Zing +74586817 1 --PSY-Framelord Omega +90953320 1 --T.G. Hyper Librarian +27552504 1 --Beatrice, Lady of the Eternal +00581014 1 --Daigusto Emeral +24224830 1 --Called by the Grave +72892473 1 --Card Destruction +59750328 1 --Card of Demise +91623717 1 --Chain Strike +04031928 1 --Change of Heart +99266988 1 --Chaos Space +15854426 1 --Divine Wind of Mist Valley +13035077 1 --Dragonic Diagram +95308449 1 --Final Countdown +81439173 1 --Foolish Burial +27970830 1 --Gateway of the Six +75500286 1 --Gold Sarcophagus +18144506 1 --Harpie's Feather Duster +66957584 1 --Infernity Launcher +01845204 1 --Instant Fusion +93946239 1 --Into the Void +71650854 1 --Magical Mid-Breaker Field +37520316 1 --Mind Control +43040603 1 --Monster Gate +83764718 1 --Monster Reborn +33782437 1 --One Day of Peace +02295440 1 --One for One +55584558 1 --Purrely Delicious Memory +58577036 1 --Reasoning +32807846 1 --Reinforcement of the Army +24940422 1 --Sekka's Light +73468603 1 --Set Rotation +52340444 1 --Sky Striker Mecha - Hornet Drones +71344451 1 --Slash Draw +46448938 1 --Spellbook of Judgment +73628505 1 --Terraforming +70368879 1 --Upstart Goblin +32723153 1 --Magical Explosion +03734202 1 --Naturia Sacred Tree +35316708 1 --Time Seal +#semi limit +09411399 2 --Destiny HERO - Malicious +68304193 2 --Kashtira Unicorn +14532163 2 --Lightning Storm +35261759 2 --Pot of Desires +92107604 2 --Runick Fountain +63166095 2 --Sky Striker Mobilize - Engage! +15443125 2 --Spright Starter + +!2023.6 TCG +#forbidden +06728559 0 --Archnemeses Protos +20292186 0 --Artifact Scythe +73356503 0 --Barrier Statue of the Stormwinds +09929398 0 --Blackwing - Gofu the Vague Shadow +94689206 0 --Block Dragon +69015963 0 --Cyber-Stein +15341821 0 --Dandylion +08903700 0 --Djinn Releaser of Rituals +51858306 0 --Eclipse Wyvern +40177746 0 --Eva +55623480 0 --Fairy Tail - Snow +78706415 0 --Fiber Jar +93369354 0 --Fishborg Blaster +67441435 0 --Glow-Up Bulb +75732622 0 --Grinder Golem +57421866 0 --Level Eater +34206604 0 --Magical Scientist +31178212 0 --Majespecter Unicorn - Kirin +21377582 0 --Master Peace, the True Dracoslaying King +23434538 0 --Maxx "C" +96782886 0 --Mind Master +57835716 0 --Orcust Harp Horror +07563579 0 --Performage Plushfire +23558733 0 --Phoenixian Cluster Amaryllis +90411554 0 --Redox, Dragon Ruler of Boulders +01357146 0 --Ronintoadin +91258852 0 --SPYRAL Master Plan +88071625 0 --The Tyrant Neptune +26400609 0 --Tidal, Dragon Ruler of Waterfalls +44910027 0 --Victory Dragon +17412721 0 --Elder Entity Norden +43387895 0 --Supreme King Dragon Starving Venom +92731385 0 --Tearlaments Kitkallos +15291624 0 --Thunder Dragon Colossus +50588353 0 --Crystron Halqifibrax +98095162 0 --Curious, the Lightsworn Dominion +59537380 0 --Guardragon Agarpain +86148577 0 --Guardragon Elpy +24094258 0 --Heavymetalfoes Electrumite +39064822 0 --Knightmare Goblin +03679218 0 --Knightmare Mermaid +85243784 0 --Linkross +44097050 0 --Mecha Phantom Beast Auroradon +25725326 0 --Prank-Kids Meow-Meow-Mu +70369116 0 --Predaplant Verte Anaconda +72330894 0 --Simorgh, Bird of Sovereignty +27381364 0 --Spright Elf +61665245 0 --Summon Sorceress +33918636 0 --Superheavy Samurai Scarecrow +22593417 0 --Topologic Gumblar Dragon +83152482 0 --Union Carrier +03040496 0 --Chaos Ruler, the Chaotic Magical Dragon +94677445 0 --Ib the World Chalice Justiciar +63101919 0 --Tempest Magician +34086406 0 --Lavalval Chain +04423206 0 --M-X-Saber Invoker +54719828 0 --Number 16: Shock Master +10389142 0 --Number 42: Galaxy Tomahawk +63504681 0 --Number 86: Heroic Champion - Rhongomyniad +95474755 0 --Number 89: Diablosis the Mind Hacker +58820923 0 --Number 95: Galaxy-Eyes Dark Matter Dragon +52653092 0 --Number S0: Utopic ZEXAL +34945480 0 --Outer Entity Azathot +88581108 0 --True King of All Calamities +81122844 0 --Wind-Up Carrier Zenmaity +85115440 0 --Zoodiac Broadbull +48905153 0 --Zoodiac Drident +07394770 0 --Brilliant Fusion +69243953 0 --Butterfly Dagger - Elma +57953380 0 --Card of Safe Return +67616300 0 --Chicken Game +60682203 0 --Cold Wave +17375316 0 --Confiscation +44763025 0 --Delinquent Duo +23557835 0 --Dimension Fusion +42703248 0 --Giant Trunade +79571449 0 --Graceful Charity +19613556 0 --Heavy Storm +35059553 0 --Kaiser Colosseum +85602018 0 --Last Will +34906152 0 --Mass Driver +46411259 0 --Metamorphosis +41482598 0 --Mirage of Nightmare +76375976 0 --Mystic Mine +74191942 0 --Painful Choice +55144522 0 --Pot of Greed +70828912 0 --Premature Burial +63789924 0 --Smoke Grenade of the Thief +45986603 0 --Snatch Steal +54447022 0 --Soul Charge +11110587 0 --That Grass Looks Greener +42829885 0 --The Forceful Sentry +46060017 0 --Zoodiac Barrage +43262273 0 --Appointer of the Red Lotus +01041278 0 --Branded Expulsion +61740673 0 --Imperial Order +28566710 0 --Last Turn +23002292 0 --Red Reboot +27174286 0 --Return from the Different Dimension +93016201 0 --Royal Oppression +57585212 0 --Self-Destruct Button +03280747 0 --Sixth Sense +64697231 0 --Trap Dustshoot +80604091 0 --Ultimate Offering +05851097 0 --Vanity's Emptiness +#limit +07902349 1 --Left Arm of the Forbidden One +44519536 1 --Left Leg of the Forbidden One +70903634 1 --Right Arm of the Forbidden One +08124921 1 --Right Leg of the Forbidden One +62320425 1 --Agido the Ancient Sentinel +28985331 1 --Armageddon Knight +76794549 1 --Astrograph Sorcerer +61901281 1 --Black Dragon Collapserpent +53804307 1 --Blaster, Dragon Ruler of Infernos +34124316 1 --Cyber Jar +43694650 1 --Danger!? Jackalope? +99745551 1 --Danger!? Tsuchinoko? +14536035 1 --Dark Grepher +82385847 1 --Dinowrestler Pankratops +33396948 1 --Exodia the Forbidden One +99177923 1 --Infernity Archfiend +25926710 1 --Kelbek the Ancient Vanguard +63542003 1 --Keldo the Sacred Protector +83190280 1 --Lunalight Tiger +36521307 1 --Mathmech Circular +38572779 1 --Miscellaneousaurus +33508719 1 --Morphing Jar +99937011 1 --Mudora the Sword Oracle +17330916 1 --Performapal Monkeyboard +12958919 1 --Phantom Skyblaster +38814750 1 --PSY-Framegear Gamma +26118970 1 --Red Rose Dragon +26889158 1 --Salamangreat Gazelle +81275020 1 --Speedroid Terrortop +20663556 1 --Substitoad +37961969 1 --Tearlaments Havnis +74078255 1 --Tearlaments Merrli +00572850 1 --Tearlaments Scheiren +89399912 1 --Tempest, Dragon Ruler of Storms +99234526 1 --White Dragon Wyverburster +78872731 1 --Zoodiac Ratpier +39512984 1 --Gem-Knight Master Diamond +73539069 1 --Striker Dragon +25862681 1 --Ancient Fairy Dragon +65536818 1 --Denglong, First of the Yang Zing +74586817 1 --PSY-Framelord Omega +90953320 1 --T.G. Hyper Librarian +27552504 1 --Beatrice, Lady of the Eternal +00581014 1 --Daigusto Emeral +48626373 1 --Kashtira Arise-Heart +24224830 1 --Called by the Grave +72892473 1 --Card Destruction +59750328 1 --Card of Demise +91623717 1 --Chain Strike +04031928 1 --Change of Heart +15854426 1 --Divine Wind of Mist Valley +13035077 1 --Dragonic Diagram +95308449 1 --Final Countdown +81439173 1 --Foolish Burial +27970830 1 --Gateway of the Six +75500286 1 --Gold Sarcophagus +18144506 1 --Harpie's Feather Duster +66957584 1 --Infernity Launcher +01845204 1 --Instant Fusion +93946239 1 --Into the Void +71650854 1 --Magical Mid-Breaker Field +37520316 1 --Mind Control +43040603 1 --Monster Gate +83764718 1 --Monster Reborn +33782437 1 --One Day of Peace +02295440 1 --One for One +55584558 1 --Purrely Delicious Memory +58577036 1 --Reasoning +32807846 1 --Reinforcement of the Army +24940422 1 --Sekka's Light +73468603 1 --Set Rotation +52340444 1 --Sky Striker Mecha - Hornet Drones +71344451 1 --Slash Draw +46448938 1 --Spellbook of Judgment +73628505 1 --Terraforming +70368879 1 --Upstart Goblin +32723153 1 --Magical Explosion +03734202 1 --Naturia Sacred Tree +35316708 1 --Time Seal +#semi limit +09411399 2 --Destiny HERO - Malicious +17266660 2 --Herald of Orange Light +68304193 2 --Kashtira Unicorn +14532163 2 --Lightning Storm +35261759 2 --Pot of Desires +92107604 2 --Runick Fountain +63166095 2 --Sky Striker Mobilize - Engage! +15443125 2 --Spright Starter + +!2023.2 TCG +#forbidden +06728559 0 --Archnemeses Protos +20292186 0 --Artifact Scythe +73356503 0 --Barrier Statue of the Stormwinds +09929398 0 --Blackwing - Gofu the Vague Shadow +53804307 0 --Blaster, Dragon Ruler of Infernos +94689206 0 --Block Dragon +15341821 0 --Dandylion +08903700 0 --Djinn Releaser of Rituals +51858306 0 --Eclipse Wyvern +40177746 0 --Eva +55623480 0 --Fairy Tail - Snow +78706415 0 --Fiber Jar +93369354 0 --Fishborg Blaster +67441435 0 --Glow-Up Bulb +75732622 0 --Grinder Golem +57421866 0 --Level Eater +34206604 0 --Magical Scientist +31178212 0 --Majespecter Unicorn - Kirin +21377582 0 --Master Peace, the True Dracoslaying King +23434538 0 --Maxx "C" +96782886 0 --Mind Master +57835716 0 --Orcust Harp Horror +07563579 0 --Performage Plushfire +23558733 0 --Phoenixian Cluster Amaryllis +90411554 0 --Redox, Dragon Ruler of Boulders +01357146 0 --Ronintoadin +05592689 0 --Samsara Lotus +91258852 0 --SPYRAL Master Plan +88071625 0 --The Tyrant Neptune +26400609 0 --Tidal, Dragon Ruler of Waterfalls +44910027 0 --Victory Dragon +17412721 0 --Elder Entity Norden +43387895 0 --Supreme King Dragon Starving Venom +92731385 0 --Tearlaments Kitkallos +15291624 0 --Thunder Dragon Colossus +50588353 0 --Crystron Halqifibrax +98095162 0 --Curious, the Lightsworn Dominion +59537380 0 --Guardragon Agarpain +86148577 0 --Guardragon Elpy +24094258 0 --Heavymetalfoes Electrumite +39064822 0 --Knightmare Goblin +03679218 0 --Knightmare Mermaid +85243784 0 --Linkross +44097050 0 --Mecha Phantom Beast Auroradon +25725326 0 --Prank-Kids Meow-Meow-Mu +70369116 0 --Predaplant Verte Anaconda +72330894 0 --Simorgh, Bird of Sovereignty +27381364 0 --Spright Elf +61665245 0 --Summon Sorceress +22593417 0 --Topologic Gumblar Dragon +83152482 0 --Union Carrier +03040496 0 --Chaos Ruler, the Chaotic Magical Dragon +65536818 0 --Denglong, First of the Yang Zing +94677445 0 --Ib the World Chalice Justiciar +63101919 0 --Tempest Magician +34086406 0 --Lavalval Chain +04423206 0 --M-X-Saber Invoker +54719828 0 --Number 16: Shock Master +10389142 0 --Number 42: Galaxy Tomahawk +63504681 0 --Number 86: Heroic Champion - Rhongomyniad +58820923 0 --Number 95: Galaxy-Eyes Dark Matter Dragon +52653092 0 --Number S0: Utopic ZEXAL +34945480 0 --Outer Entity Azathot +88581108 0 --True King of All Calamities +81122844 0 --Wind-Up Carrier Zenmaity +85115440 0 --Zoodiac Broadbull +48905153 0 --Zoodiac Drident +07394770 0 --Brilliant Fusion +69243953 0 --Butterfly Dagger - Elma +57953380 0 --Card of Safe Return +67616300 0 --Chicken Game +60682203 0 --Cold Wave +17375316 0 --Confiscation +44763025 0 --Delinquent Duo +23557835 0 --Dimension Fusion +42703248 0 --Giant Trunade +79571449 0 --Graceful Charity +19613556 0 --Heavy Storm +35059553 0 --Kaiser Colosseum +85602018 0 --Last Will +34906152 0 --Mass Driver +46411259 0 --Metamorphosis +41482598 0 --Mirage of Nightmare +76375976 0 --Mystic Mine +74191942 0 --Painful Choice +55144522 0 --Pot of Greed +70828912 0 --Premature Burial +63789924 0 --Smoke Grenade of the Thief +45986603 0 --Snatch Steal +54447022 0 --Soul Charge +11110587 0 --That Grass Looks Greener +42829885 0 --The Forceful Sentry +46060017 0 --Zoodiac Barrage +61740673 0 --Imperial Order +28566710 0 --Last Turn +23002292 0 --Red Reboot +27174286 0 --Return from the Different Dimension +93016201 0 --Royal Oppression +57585212 0 --Self-Destruct Button +03280747 0 --Sixth Sense +64697231 0 --Trap Dustshoot +80604091 0 --Ultimate Offering +05851097 0 --Vanity's Emptiness +#limit +07902349 1 --Left Arm of the Forbidden One +44519536 1 --Left Leg of the Forbidden One +70903634 1 --Right Arm of the Forbidden One +08124921 1 --Right Leg of the Forbidden One +62320425 1 --Agido the Ancient Sentinel +28985331 1 --Armageddon Knight +76794549 1 --Astrograph Sorcerer +61901281 1 --Black Dragon Collapserpent +09047460 1 --Blackwing - Steam the Cloak +34124316 1 --Cyber Jar +69015963 1 --Cyber-Stein +43694650 1 --Danger!? Jackalope? +99745551 1 --Danger!? Tsuchinoko? +14536035 1 --Dark Grepher +82385847 1 --Dinowrestler Pankratops +33396948 1 --Exodia the Forbidden One +64034255 1 --Genex Ally Birdman +17266660 1 --Herald of Orange Light +99177923 1 --Infernity Archfiend +25926710 1 --Kelbek the Ancient Vanguard +63542003 1 --Keldo the Sacred Protector +83190280 1 --Lunalight Tiger +38572779 1 --Miscellaneousaurus +33508719 1 --Morphing Jar +99937011 1 --Mudora the Sword Oracle +17330916 1 --Performapal Monkeyboard +12958919 1 --Phantom Skyblaster +26118970 1 --Red Rose Dragon +26889158 1 --Salamangreat Gazelle +81275020 1 --Speedroid Terrortop +78080961 1 --SPYRAL Quik-Fix +20663556 1 --Substitoad +37961969 1 --Tearlaments Havnis +74078255 1 --Tearlaments Merrli +00572850 1 --Tearlaments Scheiren +89399912 1 --Tempest, Dragon Ruler of Storms +99234526 1 --White Dragon Wyverburster +78872731 1 --Zoodiac Ratpier +39512984 1 --Gem-Knight Master Diamond +73539069 1 --Striker Dragon +25862681 1 --Ancient Fairy Dragon +74586817 1 --PSY-Framelord Omega +90953320 1 --T.G. Hyper Librarian +27552504 1 --Beatrice, Lady of the Eternal +00581014 1 --Daigusto Emeral +24224830 1 --Called by the Grave +72892473 1 --Card Destruction +59750328 1 --Card of Demise +91623717 1 --Chain Strike +04031928 1 --Change of Heart +15854426 1 --Divine Wind of Mist Valley +14733538 1 --Draco Face-Off +13035077 1 --Dragonic Diagram +95308449 1 --Final Countdown +81439173 1 --Foolish Burial +27970830 1 --Gateway of the Six +75500286 1 --Gold Sarcophagus +18144506 1 --Harpie's Feather Duster +66957584 1 --Infernity Launcher +01845204 1 --Instant Fusion +93946239 1 --Into the Void +71650854 1 --Magical Mid-Breaker Field +37520316 1 --Mind Control +43040603 1 --Monster Gate +83764718 1 --Monster Reborn +33782437 1 --One Day of Peace +02295440 1 --One for One +58577036 1 --Reasoning +32807846 1 --Reinforcement of the Army +24940422 1 --Sekka's Light +73468603 1 --Set Rotation +52340444 1 --Sky Striker Mecha - Hornet Drones +24010609 1 --Sky Striker Mecha Modules - Multirole +63166095 1 --Sky Striker Mobilize - Engage! +71344451 1 --Slash Draw +46448938 1 --Spellbook of Judgment +73628505 1 --Terraforming +70368879 1 --Upstart Goblin +43262273 1 --Appointer of the Red Lotus +32723153 1 --Magical Explosion +35316708 1 --Time Seal +#semi limit +09411399 2 --Destiny HERO - Malicious +08491961 2 --Lyrilusc - Recital Starling +35261759 2 --Pot of Desires + +!2022.12 TCG +#forbidden +06728559 0 --Archnemeses Protos +09929398 0 --Blackwing - Gofu the Vague Shadow +53804307 0 --Blaster, Dragon Ruler of Infernos +94689206 0 --Block Dragon +15341821 0 --Dandylion +08903700 0 --Djinn Releaser of Rituals +51858306 0 --Eclipse Wyvern +40177746 0 --Eva +55623480 0 --Fairy Tail - Snow +78706415 0 --Fiber Jar +93369354 0 --Fishborg Blaster +67441435 0 --Glow-Up Bulb +75732622 0 --Grinder Golem +57421866 0 --Level Eater +34206604 0 --Magical Scientist +31178212 0 --Majespecter Unicorn - Kirin +21377582 0 --Master Peace, the True Dracoslaying King +23434538 0 --Maxx "C" +96782886 0 --Mind Master +57835716 0 --Orcust Harp Horror +07563579 0 --Performage Plushfire +23558733 0 --Phoenixian Cluster Amaryllis +90411554 0 --Redox, Dragon Ruler of Boulders +01357146 0 --Ronintoadin +05592689 0 --Samsara Lotus +91258852 0 --SPYRAL Master Plan +88071625 0 --The Tyrant Neptune +26400609 0 --Tidal, Dragon Ruler of Waterfalls +44910027 0 --Victory Dragon +17412721 0 --Elder Entity Norden +43387895 0 --Supreme King Dragon Starving Venom +15291624 0 --Thunder Dragon Colossus +50588353 0 --Crystron Halqifibrax +98095162 0 --Curious, the Lightsworn Dominion +59537380 0 --Guardragon Agarpain +86148577 0 --Guardragon Elpy +24094258 0 --Heavymetalfoes Electrumite +39064822 0 --Knightmare Goblin +03679218 0 --Knightmare Mermaid +85243784 0 --Linkross +44097050 0 --Mecha Phantom Beast Auroradon +25725326 0 --Prank-Kids Meow-Meow-Mu +70369116 0 --Predaplant Verte Anaconda +72330894 0 --Simorgh, Bird of Sovereignty +61665245 0 --Summon Sorceress +22593417 0 --Topologic Gumblar Dragon +83152482 0 --Union Carrier +25862681 0 --Ancient Fairy Dragon +03040496 0 --Chaos Ruler, the Chaotic Magical Dragon +65536818 0 --Denglong, First of the Yang Zing +94677445 0 --Ib the World Chalice Justiciar +63101919 0 --Tempest Magician +34086406 0 --Lavalval Chain +04423206 0 --M-X-Saber Invoker +54719828 0 --Number 16: Shock Master +10389142 0 --Number 42: Galaxy Tomahawk +63504681 0 --Number 86: Heroic Champion - Rhongomyniad +58820923 0 --Number 95: Galaxy-Eyes Dark Matter Dragon +52653092 0 --Number S0: Utopic ZEXAL +34945480 0 --Outer Entity Azathot +88581108 0 --True King of All Calamities +81122844 0 --Wind-Up Carrier Zenmaity +85115440 0 --Zoodiac Broadbull +48905153 0 --Zoodiac Drident +07394770 0 --Brilliant Fusion +69243953 0 --Butterfly Dagger - Elma +57953380 0 --Card of Safe Return +67616300 0 --Chicken Game +60682203 0 --Cold Wave +17375316 0 --Confiscation +44763025 0 --Delinquent Duo +23557835 0 --Dimension Fusion +42703248 0 --Giant Trunade +79571449 0 --Graceful Charity +19613556 0 --Heavy Storm +35059553 0 --Kaiser Colosseum +85602018 0 --Last Will +34906152 0 --Mass Driver +46411259 0 --Metamorphosis +41482598 0 --Mirage of Nightmare +76375976 0 --Mystic Mine +74191942 0 --Painful Choice +55144522 0 --Pot of Greed +70828912 0 --Premature Burial +63789924 0 --Smoke Grenade of the Thief +45986603 0 --Snatch Steal +54447022 0 --Soul Charge +11110587 0 --That Grass Looks Greener +42829885 0 --The Forceful Sentry +46060017 0 --Zoodiac Barrage +61740673 0 --Imperial Order +28566710 0 --Last Turn +23002292 0 --Red Reboot +27174286 0 --Return from the Different Dimension +93016201 0 --Royal Oppression +57585212 0 --Self-Destruct Button +03280747 0 --Sixth Sense +64697231 0 --Trap Dustshoot +80604091 0 --Ultimate Offering +05851097 0 --Vanity's Emptiness +#limit +07902349 1 --Left Arm of the Forbidden One +44519536 1 --Left Leg of the Forbidden One +70903634 1 --Right Arm of the Forbidden One +08124921 1 --Right Leg of the Forbidden One +28985331 1 --Armageddon Knight +76794549 1 --Astrograph Sorcerer +61901281 1 --Black Dragon Collapserpent +09047460 1 --Blackwing - Steam the Cloak +34124316 1 --Cyber Jar +69015963 1 --Cyber-Stein +43694650 1 --Danger!? Jackalope? +99745551 1 --Danger!? Tsuchinoko? +14536035 1 --Dark Grepher +05560911 1 --Destrudo the Lost Dragon's Frisson +82385847 1 --Dinowrestler Pankratops +33396948 1 --Exodia the Forbidden One +64034255 1 --Genex Ally Birdman +17266660 1 --Herald of Orange Light +99177923 1 --Infernity Archfiend +09742784 1 --Jet Synchron +83190280 1 --Lunalight Tiger +72291078 1 --Mecha Phantom Beast O-Lion +38572779 1 --Miscellaneousaurus +33508719 1 --Morphing Jar +17330916 1 --Performapal Monkeyboard +12958919 1 --Phantom Skyblaster +26118970 1 --Red Rose Dragon +26889158 1 --Salamangreat Gazelle +92559258 1 --Servant of Endymion +81275020 1 --Speedroid Terrortop +78080961 1 --SPYRAL Quik-Fix +20663556 1 --Substitoad +89399912 1 --Tempest, Dragon Ruler of Storms +30539496 1 --True King Lithosagym, the Disaster +99234526 1 --White Dragon Wyverburster +03078576 1 --Yata-Garasu +78872731 1 --Zoodiac Ratpier +39512984 1 --Gem-Knight Master Diamond +73539069 1 --Striker Dragon +74586817 1 --PSY-Framelord Omega +90953320 1 --T.G. Hyper Librarian +27552504 1 --Beatrice, Lady of the Eternal +00581014 1 --Daigusto Emeral +24224830 1 --Called by the Grave +72892473 1 --Card Destruction +59750328 1 --Card of Demise +91623717 1 --Chain Strike +04031928 1 --Change of Heart +15854426 1 --Divine Wind of Mist Valley +14733538 1 --Draco Face-Off +13035077 1 --Dragonic Diagram +95308449 1 --Final Countdown +81439173 1 --Foolish Burial +27970830 1 --Gateway of the Six +75500286 1 --Gold Sarcophagus +18144506 1 --Harpie's Feather Duster +66957584 1 --Infernity Launcher +01845204 1 --Instant Fusion +93946239 1 --Into the Void +71650854 1 --Magical Mid-Breaker Field +37520316 1 --Mind Control +43040603 1 --Monster Gate +83764718 1 --Monster Reborn +33782437 1 --One Day of Peace +02295440 1 --One for One +58577036 1 --Reasoning +32807846 1 --Reinforcement of the Army +24940422 1 --Sekka's Light +73468603 1 --Set Rotation +52340444 1 --Sky Striker Mecha - Hornet Drones +24010609 1 --Sky Striker Mecha Modules - Multirole +63166095 1 --Sky Striker Mobilize - Engage! +71344451 1 --Slash Draw +46448938 1 --Spellbook of Judgment +54631665 1 --SPYRAL Resort +73628505 1 --Terraforming +70368879 1 --Upstart Goblin +43262273 1 --Appointer of the Red Lotus +32723153 1 --Magical Explosion +35316708 1 --Time Seal +#semi limit +09411399 2 --Destiny HERO - Malicious +08491961 2 --Lyrilusc - Recital Starling +35261759 2 --Pot of Desires + +!2022.10 TCG +#forbidden +06728559 0 --Archnemeses Protos +09929398 0 --Blackwing - Gofu the Vague Shadow +53804307 0 --Blaster, Dragon Ruler of Infernos +94689206 0 --Block Dragon +15341821 0 --Dandylion +08903700 0 --Djinn Releaser of Rituals +51858306 0 --Eclipse Wyvern +40177746 0 --Eva +55623480 0 --Fairy Tail - Snow +78706415 0 --Fiber Jar +93369354 0 --Fishborg Blaster +67441435 0 --Glow-Up Bulb +75732622 0 --Grinder Golem +57421866 0 --Level Eater +34206604 0 --Magical Scientist +31178212 0 --Majespecter Unicorn - Kirin +21377582 0 --Master Peace, the True Dracoslaying King +23434538 0 --Maxx "C" +96782886 0 --Mind Master +57835716 0 --Orcust Harp Horror +07563579 0 --Performage Plushfire +23558733 0 --Phoenixian Cluster Amaryllis +90411554 0 --Redox, Dragon Ruler of Boulders +01357146 0 --Ronintoadin +05592689 0 --Samsara Lotus +91258852 0 --SPYRAL Master Plan +88071625 0 --The Tyrant Neptune +26400609 0 --Tidal, Dragon Ruler of Waterfalls +44910027 0 --Victory Dragon +17412721 0 --Elder Entity Norden +43387895 0 --Supreme King Dragon Starving Venom +15291624 0 --Thunder Dragon Colossus +50588353 0 --Crystron Halqifibrax +59537380 0 --Guardragon Agarpain +86148577 0 --Guardragon Elpy +24094258 0 --Heavymetalfoes Electrumite +39064822 0 --Knightmare Goblin +03679218 0 --Knightmare Mermaid +85243784 0 --Linkross +44097050 0 --Mecha Phantom Beast Auroradon +25725326 0 --Prank-Kids Meow-Meow-Mu +70369116 0 --Predaplant Verte Anaconda +72330894 0 --Simorgh, Bird of Sovereignty +61665245 0 --Summon Sorceress +22593417 0 --Topologic Gumblar Dragon +83152482 0 --Union Carrier +25862681 0 --Ancient Fairy Dragon +03040496 0 --Chaos Ruler, the Chaotic Magical Dragon +65536818 0 --Denglong, First of the Yang Zing +94677445 0 --Ib the World Chalice Justiciar +63101919 0 --Tempest Magician +34086406 0 --Lavalval Chain +04423206 0 --M-X-Saber Invoker +54719828 0 --Number 16: Shock Master +10389142 0 --Number 42: Galaxy Tomahawk +63504681 0 --Number 86: Heroic Champion - Rhongomyniad +58820923 0 --Number 95: Galaxy-Eyes Dark Matter Dragon +52653092 0 --Number S0: Utopic ZEXAL +34945480 0 --Outer Entity Azathot +18326736 0 --Tellarknight Ptolemaeus +88581108 0 --True King of All Calamities +81122844 0 --Wind-Up Carrier Zenmaity +85115440 0 --Zoodiac Broadbull +48905153 0 --Zoodiac Drident +07394770 0 --Brilliant Fusion +69243953 0 --Butterfly Dagger - Elma +57953380 0 --Card of Safe Return +67616300 0 --Chicken Game +60682203 0 --Cold Wave +17375316 0 --Confiscation +44763025 0 --Delinquent Duo +23557835 0 --Dimension Fusion +42703248 0 --Giant Trunade +79571449 0 --Graceful Charity +19613556 0 --Heavy Storm +35059553 0 --Kaiser Colosseum +85602018 0 --Last Will +34906152 0 --Mass Driver +46411259 0 --Metamorphosis +41482598 0 --Mirage of Nightmare +74191942 0 --Painful Choice +55144522 0 --Pot of Greed +70828912 0 --Premature Burial +63789924 0 --Smoke Grenade of the Thief +45986603 0 --Snatch Steal +54447022 0 --Soul Charge +11110587 0 --That Grass Looks Greener +42829885 0 --The Forceful Sentry +46060017 0 --Zoodiac Barrage +61740673 0 --Imperial Order +28566710 0 --Last Turn +23002292 0 --Red Reboot +27174286 0 --Return from the Different Dimension +93016201 0 --Royal Oppression +57585212 0 --Self-Destruct Button +03280747 0 --Sixth Sense +64697231 0 --Trap Dustshoot +80604091 0 --Ultimate Offering +05851097 0 --Vanity's Emptiness +#limit +07902349 1 --Left Arm of the Forbidden One +44519536 1 --Left Leg of the Forbidden One +70903634 1 --Right Arm of the Forbidden One +08124921 1 --Right Leg of the Forbidden One +28985331 1 --Armageddon Knight +76794549 1 --Astrograph Sorcerer +61901281 1 --Black Dragon Collapserpent +09047460 1 --Blackwing - Steam the Cloak +34124316 1 --Cyber Jar +69015963 1 --Cyber-Stein +43694650 1 --Danger!? Jackalope? +99745551 1 --Danger!? Tsuchinoko? +14536035 1 --Dark Grepher +05560911 1 --Destrudo the Lost Dragon's Frisson +82385847 1 --Dinowrestler Pankratops +33396948 1 --Exodia the Forbidden One +64034255 1 --Genex Ally Birdman +99177923 1 --Infernity Archfiend +09742784 1 --Jet Synchron +83190280 1 --Lunalight Tiger +72291078 1 --Mecha Phantom Beast O-Lion +38572779 1 --Miscellaneousaurus +33508719 1 --Morphing Jar +17330916 1 --Performapal Monkeyboard +12958919 1 --Phantom Skyblaster +26118970 1 --Red Rose Dragon +26889158 1 --Salamangreat Gazelle +92559258 1 --Servant of Endymion +81275020 1 --Speedroid Terrortop +78080961 1 --SPYRAL Quik-Fix +20663556 1 --Substitoad +89399912 1 --Tempest, Dragon Ruler of Storms +30539496 1 --True King Lithosagym, the Disaster +99234526 1 --White Dragon Wyverburster +03078576 1 --Yata-Garasu +78872731 1 --Zoodiac Ratpier +39512984 1 --Gem-Knight Master Diamond +73539069 1 --Striker Dragon +74586817 1 --PSY-Framelord Omega +90953320 1 --T.G. Hyper Librarian +27552504 1 --Beatrice, Lady of the Eternal +00581014 1 --Daigusto Emeral +08491961 1 --Lyrilusc - Recital Starling +24224830 1 --Called by the Grave +72892473 1 --Card Destruction +59750328 1 --Card of Demise +91623717 1 --Chain Strike +04031928 1 --Change of Heart +81674782 1 --Dimensional Fissure +15854426 1 --Divine Wind of Mist Valley +14733538 1 --Draco Face-Off +13035077 1 --Dragonic Diagram +95308449 1 --Final Countdown +81439173 1 --Foolish Burial +27970830 1 --Gateway of the Six +75500286 1 --Gold Sarcophagus +18144506 1 --Harpie's Feather Duster +66957584 1 --Infernity Launcher +01845204 1 --Instant Fusion +93946239 1 --Into the Void +71650854 1 --Magical Mid-Breaker Field +37520316 1 --Mind Control +43040603 1 --Monster Gate +83764718 1 --Monster Reborn +33782437 1 --One Day of Peace +02295440 1 --One for One +58577036 1 --Reasoning +32807846 1 --Reinforcement of the Army +24940422 1 --Sekka's Light +73468603 1 --Set Rotation +52340444 1 --Sky Striker Mecha - Hornet Drones +24010609 1 --Sky Striker Mecha Modules - Multirole +63166095 1 --Sky Striker Mobilize - Engage! +71344451 1 --Slash Draw +46448938 1 --Spellbook of Judgment +54631665 1 --SPYRAL Resort +73628505 1 --Terraforming +70368879 1 --Upstart Goblin +43262273 1 --Appointer of the Red Lotus +30241314 1 --Macro Cosmos +32723153 1 --Magical Explosion +89208725 1 --Metaverse +35316708 1 --Time Seal +#semi limit +09411399 2 --Destiny HERO - Malicious +57103969 2 --Fire Formation - Tenki +35261759 2 --Pot of Desires + +!2022.5 TCG +#forbidden +06728559 0 --Archnemeses Protos +09929398 0 --Blackwing - Gofu the Vague Shadow +09047460 0 --Blackwing - Steam the Cloak +53804307 0 --Blaster, Dragon Ruler of Infernos +94689206 0 --Block Dragon +34124316 0 --Cyber Jar +15341821 0 --Dandylion +08903700 0 --Djinn Releaser of Rituals +51858306 0 --Eclipse Wyvern +40177746 0 --Eva +78706415 0 --Fiber Jar +93369354 0 --Fishborg Blaster +67441435 0 --Glow-Up Bulb +75732622 0 --Grinder Golem +57421866 0 --Level Eater +34206604 0 --Magical Scientist +31178212 0 --Majespecter Unicorn - Kirin +21377582 0 --Master Peace, the True Dracoslaying King +23434538 0 --Maxx "C" +72291078 0 --Mecha Phantom Beast O-Lion +96782886 0 --Mind Master +57835716 0 --Orcust Harp Horror +07563579 0 --Performage Plushfire +23558733 0 --Phoenixian Cluster Amaryllis +90411554 0 --Redox, Dragon Ruler of Boulders +05592689 0 --Samsara Lotus +91258852 0 --SPYRAL Master Plan +20663556 0 --Substitoad +88071625 0 --The Tyrant Neptune +26400609 0 --Tidal, Dragon Ruler of Waterfalls +44910027 0 --Victory Dragon +17412721 0 --Elder Entity Norden +43387895 0 --Supreme King Dragon Starving Venom +15291624 0 --Thunder Dragon Colossus +59537380 0 --Guardragon Agarpain +86148577 0 --Guardragon Elpy +24094258 0 --Heavymetalfoes Electrumite +39064822 0 --Knightmare Goblin +03679218 0 --Knightmare Mermaid +85243784 0 --Linkross +44097050 0 --Mecha Phantom Beast Auroradon +25725326 0 --Prank-Kids Meow-Meow-Mu +70369116 0 --Predaplant Verte Anaconda +72330894 0 --Simorgh, Bird of Sovereignty +61665245 0 --Summon Sorceress +22593417 0 --Topologic Gumblar Dragon +83152482 0 --Union Carrier +25862681 0 --Ancient Fairy Dragon +65536818 0 --Denglong, First of the Yang Zing +94677445 0 --Ib the World Chalice Justiciar +63101919 0 --Tempest Magician +34086406 0 --Lavalval Chain +04423206 0 --M-X-Saber Invoker +54719828 0 --Number 16: Shock Master +10389142 0 --Number 42: Galaxy Tomahawk +63504681 0 --Number 86: Heroic Champion - Rhongomyniad +58820923 0 --Number 95: Galaxy-Eyes Dark Matter Dragon +52653092 0 --Number S0: Utopic ZEXAL +34945480 0 --Outer Entity Azathot +18326736 0 --Tellarknight Ptolemaeus +88581108 0 --True King of All Calamities +81122844 0 --Wind-Up Carrier Zenmaity +85115440 0 --Zoodiac Broadbull +48905153 0 --Zoodiac Drident +07394770 0 --Brilliant Fusion +69243953 0 --Butterfly Dagger - Elma +57953380 0 --Card of Safe Return +67616300 0 --Chicken Game +60682203 0 --Cold Wave +17375316 0 --Confiscation +44763025 0 --Delinquent Duo +23557835 0 --Dimension Fusion +42703248 0 --Giant Trunade +79571449 0 --Graceful Charity +19613556 0 --Heavy Storm +35059553 0 --Kaiser Colosseum +85602018 0 --Last Will +34906152 0 --Mass Driver +46411259 0 --Metamorphosis +41482598 0 --Mirage of Nightmare +74191942 0 --Painful Choice +55144522 0 --Pot of Greed +70828912 0 --Premature Burial +63789924 0 --Smoke Grenade of the Thief +45986603 0 --Snatch Steal +54447022 0 --Soul Charge +46448938 0 --Spellbook of Judgment +11110587 0 --That Grass Looks Greener +42829885 0 --The Forceful Sentry +46060017 0 --Zoodiac Barrage +61740673 0 --Imperial Order +28566710 0 --Last Turn +27174286 0 --Return from the Different Dimension +93016201 0 --Royal Oppression +57585212 0 --Self-Destruct Button +03280747 0 --Sixth Sense +64697231 0 --Trap Dustshoot +80604091 0 --Ultimate Offering +05851097 0 --Vanity's Emptiness +#limit +07902349 1 --Left Arm of the Forbidden One +44519536 1 --Left Leg of the Forbidden One +70903634 1 --Right Arm of the Forbidden One +08124921 1 --Right Leg of the Forbidden One +28985331 1 --Armageddon Knight +76794549 1 --Astrograph Sorcerer +61901281 1 --Black Dragon Collapserpent +69015963 1 --Cyber-Stein +43694650 1 --Danger!? Jackalope? +99745551 1 --Danger!? Tsuchinoko? +14536035 1 --Dark Grepher +05560911 1 --Destrudo the Lost Dragon's Frisson +82385847 1 --Dinowrestler Pankratops +33396948 1 --Exodia the Forbidden One +55623480 1 --Fairy Tail - Snow +64034255 1 --Genex Ally Birdman +99177923 1 --Infernity Archfiend +09742784 1 --Jet Synchron +83190280 1 --Lunalight Tiger +38572779 1 --Miscellaneousaurus +33508719 1 --Morphing Jar +17330916 1 --Performapal Monkeyboard +12958919 1 --Phantom Skyblaster +26118970 1 --Red Rose Dragon +26889158 1 --Salamangreat Gazelle +92559258 1 --Servant of Endymion +81275020 1 --Speedroid Terrortop +78080961 1 --SPYRAL Quik-Fix +89399912 1 --Tempest, Dragon Ruler of Storms +30539496 1 --True King Lithosagym, the Disaster +99234526 1 --White Dragon Wyverburster +03078576 1 --Yata-Garasu +78872731 1 --Zoodiac Ratpier +39512984 1 --Gem-Knight Master Diamond +50588353 1 --Crystron Halqifibrax +73539069 1 --Striker Dragon +74586817 1 --PSY-Framelord Omega +68431965 1 --Shooting Riser Dragon +90953320 1 --T.G. Hyper Librarian +27552504 1 --Beatrice, Lady of the Eternal +00581014 1 --Daigusto Emeral +08491961 1 --Lyrilusc - Recital Starling +24224830 1 --Called by the Grave +72892473 1 --Card Destruction +59750328 1 --Card of Demise +91623717 1 --Chain Strike +04031928 1 --Change of Heart +81674782 1 --Dimensional Fissure +15854426 1 --Divine Wind of Mist Valley +14733538 1 --Draco Face-Off +13035077 1 --Dragonic Diagram +95308449 1 --Final Countdown +81439173 1 --Foolish Burial +27970830 1 --Gateway of the Six +75500286 1 --Gold Sarcophagus +18144506 1 --Harpie's Feather Duster +66957584 1 --Infernity Launcher +01845204 1 --Instant Fusion +93946239 1 --Into the Void +71650854 1 --Magical Mid-Breaker Field +37520316 1 --Mind Control +43040603 1 --Monster Gate +83764718 1 --Monster Reborn +33782437 1 --One Day of Peace +02295440 1 --One for One +58577036 1 --Reasoning +32807846 1 --Reinforcement of the Army +24940422 1 --Sekka's Light +73468603 1 --Set Rotation +52340444 1 --Sky Striker Mecha - Hornet Drones +24010609 1 --Sky Striker Mecha Modules - Multirole +63166095 1 --Sky Striker Mobilize - Engage! +71344451 1 --Slash Draw +54631665 1 --SPYRAL Resort +73628505 1 --Terraforming +70368879 1 --Upstart Goblin +30241314 1 --Macro Cosmos +32723153 1 --Magical Explosion +89208725 1 --Metaverse +23002292 1 --Red Reboot +35316708 1 --Time Seal +#semi limit +09411399 2 --Destiny HERO - Malicious +58984738 2 --Dinomight Knight, the True Dracofighter +77235086 2 --Cyber Angel Benten +57103969 2 --Fire Formation - Tenki +52947044 2 --Fusion Destiny +01984618 2 --Nadir Servant +35261759 2 --Pot of Desires +35371948 2 --Trickstar Light Stage +17078030 2 --Wall of Revealing Light + +!2022.2 TCG +#forbidden +06728559 0 --Archnemeses Protos +09929398 0 --Blackwing - Gofu the Vague Shadow +09047460 0 --Blackwing - Steam the Cloak +53804307 0 --Blaster, Dragon Ruler of Infernos +94689206 0 --Block Dragon +34124316 0 --Cyber Jar +15341821 0 --Dandylion +08903700 0 --Djinn Releaser of Rituals +51858306 0 --Eclipse Wyvern +40177746 0 --Eva +78706415 0 --Fiber Jar +93369354 0 --Fishborg Blaster +67441435 0 --Glow-Up Bulb +75732622 0 --Grinder Golem +09742784 0 --Jet Synchron +57421866 0 --Level Eater +34206604 0 --Magical Scientist +31178212 0 --Majespecter Unicorn - Kirin +21377582 0 --Master Peace, the True Dracoslaying King +23434538 0 --Maxx "C" +72291078 0 --Mecha Phantom Beast O-Lion +96782886 0 --Mind Master +57835716 0 --Orcust Harp Horror +07563579 0 --Performage Plushfire +17330916 0 --Performapal Monkeyboard +23558733 0 --Phoenixian Cluster Amaryllis +90411554 0 --Redox, Dragon Ruler of Boulders +05592689 0 --Samsara Lotus +91258852 0 --SPYRAL Master Plan +20663556 0 --Substitoad +88071625 0 --The Tyrant Neptune +26400609 0 --Tidal, Dragon Ruler of Waterfalls +44910027 0 --Victory Dragon +03078576 0 --Yata-Garasu +17412721 0 --Elder Entity Norden +43387895 0 --Supreme King Dragon Starving Venom +15291624 0 --Thunder Dragon Colossus +59537380 0 --Guardragon Agarpain +86148577 0 --Guardragon Elpy +24094258 0 --Heavymetalfoes Electrumite +39064822 0 --Knightmare Goblin +03679218 0 --Knightmare Mermaid +85243784 0 --Linkross +72330894 0 --Simorgh, Bird of Sovereignty +61665245 0 --Summon Sorceress +22593417 0 --Topologic Gumblar Dragon +83152482 0 --Union Carrier +25862681 0 --Ancient Fairy Dragon +65536818 0 --Denglong, First of the Yang Zing +94677445 0 --Ib the World Chalice Justiciar +63101919 0 --Tempest Magician +34086406 0 --Lavalval Chain +04423206 0 --M-X-Saber Invoker +54719828 0 --Number 16: Shock Master +10389142 0 --Number 42: Galaxy Tomahawk +63504681 0 --Number 86: Heroic Champion - Rhongomyniad +58820923 0 --Number 95: Galaxy-Eyes Dark Matter Dragon +52653092 0 --Number S0: Utopic ZEXAL +34945480 0 --Outer Entity Azathot +18326736 0 --Tellarknight Ptolemaeus +88581108 0 --True King of All Calamities +81122844 0 --Wind-Up Carrier Zenmaity +85115440 0 --Zoodiac Broadbull +48905153 0 --Zoodiac Drident +07394770 0 --Brilliant Fusion +69243953 0 --Butterfly Dagger - Elma +57953380 0 --Card of Safe Return +04031928 0 --Change of Heart +67616300 0 --Chicken Game +60682203 0 --Cold Wave +17375316 0 --Confiscation +44763025 0 --Delinquent Duo +23557835 0 --Dimension Fusion +42703248 0 --Giant Trunade +79571449 0 --Graceful Charity +19613556 0 --Heavy Storm +35059553 0 --Kaiser Colosseum +85602018 0 --Last Will +34906152 0 --Mass Driver +46411259 0 --Metamorphosis +41482598 0 --Mirage of Nightmare +74191942 0 --Painful Choice +55144522 0 --Pot of Greed +70828912 0 --Premature Burial +63789924 0 --Smoke Grenade of the Thief +45986603 0 --Snatch Steal +54447022 0 --Soul Charge +46448938 0 --Spellbook of Judgment +11110587 0 --That Grass Looks Greener +42829885 0 --The Forceful Sentry +46060017 0 --Zoodiac Barrage +61740673 0 --Imperial Order +28566710 0 --Last Turn +27174286 0 --Return from the Different Dimension +93016201 0 --Royal Oppression +57585212 0 --Self-Destruct Button +03280747 0 --Sixth Sense +35316708 0 --Time Seal +64697231 0 --Trap Dustshoot +80604091 0 --Ultimate Offering +05851097 0 --Vanity's Emptiness +#limit +07902349 1 --Left Arm of the Forbidden One +44519536 1 --Left Leg of the Forbidden One +70903634 1 --Right Arm of the Forbidden One +08124921 1 --Right Leg of the Forbidden One +28985331 1 --Armageddon Knight +76794549 1 --Astrograph Sorcerer +61901281 1 --Black Dragon Collapserpent +69015963 1 --Cyber-Stein +43694650 1 --Danger!? Jackalope? +99745551 1 --Danger!? Tsuchinoko? +14536035 1 --Dark Grepher +05560911 1 --Destrudo the Lost Dragon's Frisson +58984738 1 --Dinomight Knight, the True Dracofighter +82385847 1 --Dinowrestler Pankratops +33396948 1 --Exodia the Forbidden One +55623480 1 --Fairy Tail - Snow +64034255 1 --Genex Ally Birdman +99177923 1 --Infernity Archfiend +83190280 1 --Lunalight Tiger +38572779 1 --Miscellaneousaurus +33508719 1 --Morphing Jar +16226786 1 --Night Assailant +12958919 1 --Phantom Skyblaster +26889158 1 --Salamangreat Gazelle +92559258 1 --Servant of Endymion +81275020 1 --Speedroid Terrortop +78080961 1 --SPYRAL Quik-Fix +89399912 1 --Tempest, Dragon Ruler of Storms +30539496 1 --True King Lithosagym, the Disaster +99234526 1 --White Dragon Wyverburster +78872731 1 --Zoodiac Ratpier +39512984 1 --Gem-Knight Master Diamond +25725326 1 --Prank-Kids Meow-Meow-Mu +73539069 1 --Striker Dragon +77235086 1 --Cyber Angel Benten +74586817 1 --PSY-Framelord Omega +90953320 1 --T.G. Hyper Librarian +52687916 1 --Trishula, Dragon of the Ice Barrier +27552504 1 --Beatrice, Lady of the Eternal +00581014 1 --Daigusto Emeral +08491961 1 --Lyrilusc - Recital Starling +87327776 1 --Salamangreat Miragestallio +24224830 1 --Called by the Grave +72892473 1 --Card Destruction +59750328 1 --Card of Demise +91623717 1 --Chain Strike +81674782 1 --Dimensional Fissure +15854426 1 --Divine Wind of Mist Valley +14733538 1 --Draco Face-Off +13035077 1 --Dragonic Diagram +95308449 1 --Final Countdown +57103969 1 --Fire Formation - Tenki +81439173 1 --Foolish Burial +27970830 1 --Gateway of the Six +75500286 1 --Gold Sarcophagus +18144506 1 --Harpie's Feather Duster +66957584 1 --Infernity Launcher +01845204 1 --Instant Fusion +93946239 1 --Into the Void +71650854 1 --Magical Mid-Breaker Field +37520316 1 --Mind Control +43040603 1 --Monster Gate +83764718 1 --Monster Reborn +33782437 1 --One Day of Peace +02295440 1 --One for One +35261759 1 --Pot of Desires +58577036 1 --Reasoning +32807846 1 --Reinforcement of the Army +24940422 1 --Sekka's Light +73468603 1 --Set Rotation +52340444 1 --Sky Striker Mecha - Hornet Drones +24010609 1 --Sky Striker Mecha Modules - Multirole +63166095 1 --Sky Striker Mobilize - Engage! +71344451 1 --Slash Draw +54631665 1 --SPYRAL Resort +73628505 1 --Terraforming +35371948 1 --Trickstar Light Stage +70368879 1 --Upstart Goblin +30241314 1 --Macro Cosmos +32723153 1 --Magical Explosion +89208725 1 --Metaverse +23002292 1 --Red Reboot +17078030 1 --Wall of Revealing Light +#semi limit +09411399 2 --Destiny HERO - Malicious +08949584 2 --A Hero Lives +52947044 2 --Fusion Destiny +01984618 2 --Nadir Servant +52155219 2 --Salamangreat Circle +73915051 2 --Scapegoat + +!2021.10 TCG +#forbidden +76794549 0 --Astrograph Sorcerer +09929398 0 --Blackwing - Gofu the Vague Shadow +09047460 0 --Blackwing - Steam the Cloak +53804307 0 --Blaster, Dragon Ruler of Infernos +94689206 0 --Block Dragon +34124316 0 --Cyber Jar +15341821 0 --Dandylion +05560911 0 --Destrudo the Lost Dragon's Frisson +08903700 0 --Djinn Releaser of Rituals +51858306 0 --Eclipse Wyvern +55623480 0 --Fairy Tail - Snow +78706415 0 --Fiber Jar +93369354 0 --Fishborg Blaster +67441435 0 --Glow-Up Bulb +75732622 0 --Grinder Golem +09742784 0 --Jet Synchron +57421866 0 --Level Eater +83190280 0 --Lunalight Tiger +34206604 0 --Magical Scientist +31178212 0 --Majespecter Unicorn - Kirin +21377582 0 --Master Peace, the True Dracoslaying King +23434538 0 --Maxx "C" +72291078 0 --Mecha Phantom Beast O-Lion +96782886 0 --Mind Master +57835716 0 --Orcust Harp Horror +07563579 0 --Performage Plushfire +17330916 0 --Performapal Monkeyboard +23558733 0 --Phoenixian Cluster Amaryllis +90411554 0 --Redox, Dragon Ruler of Boulders +05592689 0 --Samsara Lotus +91258852 0 --SPYRAL Master Plan +20663556 0 --Substitoad +88071625 0 --The Tyrant Neptune +26400609 0 --Tidal, Dragon Ruler of Waterfalls +44910027 0 --Victory Dragon +03078576 0 --Yata-Garasu +17412721 0 --Elder Entity Norden +43387895 0 --Supreme King Dragon Starving Venom +15291624 0 --Thunder Dragon Colossus +59537380 0 --Guardragon Agarpain +86148577 0 --Guardragon Elpy +24094258 0 --Heavymetalfoes Electrumite +39064822 0 --Knightmare Goblin +03679218 0 --Knightmare Mermaid +85243784 0 --Linkross +61665245 0 --Summon Sorceress +22593417 0 --Topologic Gumblar Dragon +83152482 0 --Union Carrier +25862681 0 --Ancient Fairy Dragon +65536818 0 --Denglong, First of the Yang Zing +94677445 0 --Ib the World Chalice Justiciar +63101919 0 --Tempest Magician +34086406 0 --Lavalval Chain +04423206 0 --M-X-Saber Invoker +54719828 0 --Number 16: Shock Master +10389142 0 --Number 42: Galaxy Tomahawk +63504681 0 --Number 86: Heroic Champion - Rhongomyniad +58820923 0 --Number 95: Galaxy-Eyes Dark Matter Dragon +52653092 0 --Number S0: Utopic ZEXAL +34945480 0 --Outer Entity Azathot +18326736 0 --Tellarknight Ptolemaeus +88581108 0 --True King of All Calamities +81122844 0 --Wind-Up Carrier Zenmaity +85115440 0 --Zoodiac Broadbull +48905153 0 --Zoodiac Drident +07394770 0 --Brilliant Fusion +69243953 0 --Butterfly Dagger - Elma +57953380 0 --Card of Safe Return +04031928 0 --Change of Heart +67616300 0 --Chicken Game +60682203 0 --Cold Wave +17375316 0 --Confiscation +44763025 0 --Delinquent Duo +23557835 0 --Dimension Fusion +42703248 0 --Giant Trunade +79571449 0 --Graceful Charity +19613556 0 --Heavy Storm +35059553 0 --Kaiser Colosseum +85602018 0 --Last Will +34906152 0 --Mass Driver +46411259 0 --Metamorphosis +41482598 0 --Mirage of Nightmare +74191942 0 --Painful Choice +55144522 0 --Pot of Greed +70828912 0 --Premature Burial +63789924 0 --Smoke Grenade of the Thief +45986603 0 --Snatch Steal +54447022 0 --Soul Charge +46448938 0 --Spellbook of Judgment +11110587 0 --That Grass Looks Greener +42829885 0 --The Forceful Sentry +46060017 0 --Zoodiac Barrage +28566710 0 --Last Turn +27174286 0 --Return from the Different Dimension +93016201 0 --Royal Oppression +57585212 0 --Self-Destruct Button +03280747 0 --Sixth Sense +35316708 0 --Time Seal +64697231 0 --Trap Dustshoot +80604091 0 --Ultimate Offering +05851097 0 --Vanity's Emptiness +#limit +07902349 1 --Left Arm of the Forbidden One +44519536 1 --Left Leg of the Forbidden One +70903634 1 --Right Arm of the Forbidden One +08124921 1 --Right Leg of the Forbidden One +28985331 1 --Armageddon Knight +61901281 1 --Black Dragon Collapserpent +69015963 1 --Cyber-Stein +43694650 1 --Danger!? Jackalope? +99745551 1 --Danger!? Tsuchinoko? +14536035 1 --Dark Grepher +58984738 1 --Dinomight Knight, the True Dracofighter +82385847 1 --Dinowrestler Pankratops +40177746 1 --Eva +33396948 1 --Exodia the Forbidden One +64034255 1 --Genex Ally Birdman +99177923 1 --Infernity Archfiend +38572779 1 --Miscellaneousaurus +33508719 1 --Morphing Jar +16226786 1 --Night Assailant +12958919 1 --Phantom Skyblaster +88264978 1 --Red-Eyes Darkness Metal Dragon +26889158 1 --Salamangreat Gazelle +92559258 1 --Servant of Endymion +81275020 1 --Speedroid Terrortop +78080961 1 --SPYRAL Quik-Fix +89399912 1 --Tempest, Dragon Ruler of Storms +30539496 1 --True King Lithosagym, the Disaster +99234526 1 --White Dragon Wyverburster +78872731 1 --Zoodiac Ratpier +39512984 1 --Gem-Knight Master Diamond +25725326 1 --Prank-Kids Meow-Meow-Mu +73539069 1 --Striker Dragon +77235086 1 --Cyber Angel Benten +74586817 1 --PSY-Framelord Omega +90953320 1 --T.G. Hyper Librarian +52687916 1 --Trishula, Dragon of the Ice Barrier +27552504 1 --Beatrice, Lady of the Eternal +00581014 1 --Daigusto Emeral +87327776 1 --Salamangreat Miragestallio +08949584 1 --A Hero Lives +24224830 1 --Called by the Grave +72892473 1 --Card Destruction +59750328 1 --Card of Demise +91623717 1 --Chain Strike +81674782 1 --Dimensional Fissure +15854426 1 --Divine Wind of Mist Valley +14733538 1 --Draco Face-Off +13035077 1 --Dragonic Diagram +95308449 1 --Final Countdown +57103969 1 --Fire Formation - Tenki +81439173 1 --Foolish Burial +27970830 1 --Gateway of the Six +75500286 1 --Gold Sarcophagus +18144506 1 --Harpie's Feather Duster +66957584 1 --Infernity Launcher +01845204 1 --Instant Fusion +93946239 1 --Into the Void +71650854 1 --Magical Mid-Breaker Field +37520316 1 --Mind Control +83764718 1 --Monster Reborn +33782437 1 --One Day of Peace +02295440 1 --One for One +12580477 1 --Raigeki +58577036 1 --Reasoning +32807846 1 --Reinforcement of the Army +52155219 1 --Salamangreat Circle +73915051 1 --Scapegoat +24940422 1 --Sekka's Light +73468603 1 --Set Rotation +52340444 1 --Sky Striker Mecha - Hornet Drones +24010609 1 --Sky Striker Mecha Modules - Multirole +63166095 1 --Sky Striker Mobilize - Engage! +71344451 1 --Slash Draw +54631665 1 --SPYRAL Resort +73628505 1 --Terraforming +35371948 1 --Trickstar Light Stage +70368879 1 --Upstart Goblin +61740673 1 --Imperial Order +30241314 1 --Macro Cosmos +32723153 1 --Magical Explosion +89208725 1 --Metaverse +23002292 1 --Red Reboot +82732705 1 --Skill Drain +17078030 1 --Wall of Revealing Light +#semi limit +70711847 2 --Danger! Nessie! +09411399 2 --Destiny HERO - Malicious +40318957 2 --Performapal Skullcrobat Joker +67723438 2 --Emergency Teleport + +!2021.7 TCG +#forbidden +76794549 0 --Astrograph Sorcerer +09929398 0 --Blackwing - Gofu the Vague Shadow +09047460 0 --Blackwing - Steam the Cloak +53804307 0 --Blaster, Dragon Ruler of Infernos +94689206 0 --Block Dragon +34124316 0 --Cyber Jar +15341821 0 --Dandylion +05560911 0 --Destrudo the Lost Dragon's Frisson +08903700 0 --Djinn Releaser of Rituals +51858306 0 --Eclipse Wyvern +55623480 0 --Fairy Tail - Snow +78706415 0 --Fiber Jar +93369354 0 --Fishborg Blaster +67441435 0 --Glow-Up Bulb +75732622 0 --Grinder Golem +09742784 0 --Jet Synchron +57421866 0 --Level Eater +83190280 0 --Lunalight Tiger +34206604 0 --Magical Scientist +31178212 0 --Majespecter Unicorn - Kirin +21377582 0 --Master Peace, the True Dracoslaying King +23434538 0 --Maxx "C" +72291078 0 --Mecha Phantom Beast O-Lion +96782886 0 --Mind Master +57835716 0 --Orcust Harp Horror +07563579 0 --Performage Plushfire +17330916 0 --Performapal Monkeyboard +23558733 0 --Phoenixian Cluster Amaryllis +90411554 0 --Redox, Dragon Ruler of Boulders +05592689 0 --Samsara Lotus +91258852 0 --SPYRAL Master Plan +20663556 0 --Substitoad +88071625 0 --The Tyrant Neptune +26400609 0 --Tidal, Dragon Ruler of Waterfalls +44910027 0 --Victory Dragon +03078576 0 --Yata-Garasu +17412721 0 --Elder Entity Norden +43387895 0 --Supreme King Dragon Starving Venom +15291624 0 --Thunder Dragon Colossus +59537380 0 --Guardragon Agarpain +86148577 0 --Guardragon Elpy +24094258 0 --Heavymetalfoes Electrumite +39064822 0 --Knightmare Goblin +03679218 0 --Knightmare Mermaid +85243784 0 --Linkross +61665245 0 --Summon Sorceress +22593417 0 --Topologic Gumblar Dragon +83152482 0 --Union Carrier +25862681 0 --Ancient Fairy Dragon +65536818 0 --Denglong, First of the Yang Zing +94677445 0 --Ib the World Chalice Justiciar +63101919 0 --Tempest Magician +34086406 0 --Lavalval Chain +04423206 0 --M-X-Saber Invoker +54719828 0 --Number 16: Shock Master +10389142 0 --Number 42: Galaxy Tomahawk +63504681 0 --Number 86: Heroic Champion - Rhongomyniad +58820923 0 --Number 95: Galaxy-Eyes Dark Matter Dragon +52653092 0 --Number S0: Utopic ZEXAL +34945480 0 --Outer Entity Azathot +18326736 0 --Tellarknight Ptolemaeus +88581108 0 --True King of All Calamities +81122844 0 --Wind-Up Carrier Zenmaity +85115440 0 --Zoodiac Broadbull +48905153 0 --Zoodiac Drident +07394770 0 --Brilliant Fusion +69243953 0 --Butterfly Dagger - Elma +57953380 0 --Card of Safe Return +04031928 0 --Change of Heart +67616300 0 --Chicken Game +60682203 0 --Cold Wave +17375316 0 --Confiscation +44763025 0 --Delinquent Duo +23557835 0 --Dimension Fusion +42703248 0 --Giant Trunade +79571449 0 --Graceful Charity +19613556 0 --Heavy Storm +35059553 0 --Kaiser Colosseum +85602018 0 --Last Will +34906152 0 --Mass Driver +46411259 0 --Metamorphosis +41482598 0 --Mirage of Nightmare +74191942 0 --Painful Choice +55144522 0 --Pot of Greed +70828912 0 --Premature Burial +63789924 0 --Smoke Grenade of the Thief +45986603 0 --Snatch Steal +54447022 0 --Soul Charge +46448938 0 --Spellbook of Judgment +11110587 0 --That Grass Looks Greener +42829885 0 --The Forceful Sentry +28566710 0 --Last Turn +27174286 0 --Return from the Different Dimension +93016201 0 --Royal Oppression +57585212 0 --Self-Destruct Button +03280747 0 --Sixth Sense +35316708 0 --Time Seal +64697231 0 --Trap Dustshoot +80604091 0 --Ultimate Offering +05851097 0 --Vanity's Emptiness +#limit +07902349 1 --Left Arm of the Forbidden One +44519536 1 --Left Leg of the Forbidden One +70903634 1 --Right Arm of the Forbidden One +08124921 1 --Right Leg of the Forbidden One +28985331 1 --Armageddon Knight +61901281 1 --Black Dragon Collapserpent +69015963 1 --Cyber-Stein +43694650 1 --Danger!? Jackalope? +70711847 1 --Danger! Nessie! +99745551 1 --Danger!? Tsuchinoko? +14536035 1 --Dark Grepher +58984738 1 --Dinomight Knight, the True Dracofighter +82385847 1 --Dinowrestler Pankratops +33396948 1 --Exodia the Forbidden One +64034255 1 --Genex Ally Birdman +99177923 1 --Infernity Archfiend +38572779 1 --Miscellaneousaurus +33508719 1 --Morphing Jar +16226786 1 --Night Assailant +40318957 1 --Performapal Skullcrobat Joker +12958919 1 --Phantom Skyblaster +88264978 1 --Red-Eyes Darkness Metal Dragon +26889158 1 --Salamangreat Gazelle +92559258 1 --Servant of Endymion +81275020 1 --Speedroid Terrortop +78080961 1 --SPYRAL Quik-Fix +89399912 1 --Tempest, Dragon Ruler of Storms +30539496 1 --True King Lithosagym, the Disaster +99234526 1 --White Dragon Wyverburster +78872731 1 --Zoodiac Ratpier +39512984 1 --Gem-Knight Master Diamond +73539069 1 --Striker Dragon +77235086 1 --Cyber Angel Benten +74586817 1 --PSY-Framelord Omega +90953320 1 --T.G. Hyper Librarian +52687916 1 --Trishula, Dragon of the Ice Barrier +27552504 1 --Beatrice, Lady of the Eternal +00581014 1 --Daigusto Emeral +87327776 1 --Salamangreat Miragestallio +08949584 1 --A Hero Lives +24224830 1 --Called by the Grave +72892473 1 --Card Destruction +59750328 1 --Card of Demise +91623717 1 --Chain Strike +81674782 1 --Dimensional Fissure +15854426 1 --Divine Wind of Mist Valley +14733538 1 --Draco Face-Off +13035077 1 --Dragonic Diagram +67723438 1 --Emergency Teleport +95308449 1 --Final Countdown +81439173 1 --Foolish Burial +27970830 1 --Gateway of the Six +75500286 1 --Gold Sarcophagus +18144506 1 --Harpie's Feather Duster +66957584 1 --Infernity Launcher +01845204 1 --Instant Fusion +93946239 1 --Into the Void +71650854 1 --Magical Mid-Breaker Field +37520316 1 --Mind Control +83764718 1 --Monster Reborn +33782437 1 --One Day of Peace +02295440 1 --One for One +12580477 1 --Raigeki +58577036 1 --Reasoning +32807846 1 --Reinforcement of the Army +52155219 1 --Salamangreat Circle +73915051 1 --Scapegoat +24940422 1 --Sekka's Light +73468603 1 --Set Rotation +52340444 1 --Sky Striker Mecha - Hornet Drones +24010609 1 --Sky Striker Mecha Modules - Multirole +63166095 1 --Sky Striker Mobilize - Engage! +71344451 1 --Slash Draw +54631665 1 --SPYRAL Resort +73628505 1 --Terraforming +35371948 1 --Trickstar Light Stage +70368879 1 --Upstart Goblin +46060017 1 --Zoodiac Barrage +61740673 1 --Imperial Order +30241314 1 --Macro Cosmos +32723153 1 --Magical Explosion +89208725 1 --Metaverse +23002292 1 --Red Reboot +82732705 1 --Skill Drain +17078030 1 --Wall of Revealing Light +#semi limit +09411399 2 --Destiny HERO - Malicious +49684352 2 --Double Iris Magician + +!2021.3 TCG +#forbidden +76794549 0 --Astrograph Sorcerer +09929398 0 --Blackwing - Gofu the Vague Shadow +09047460 0 --Blackwing - Steam the Cloak +53804307 0 --Blaster, Dragon Ruler of Infernos +94689206 0 --Block Dragon +34124316 0 --Cyber Jar +15341821 0 --Dandylion +05560911 0 --Destrudo the Lost Dragon's Frisson +08903700 0 --Djinn Releaser of Rituals +51858306 0 --Eclipse Wyvern +55623480 0 --Fairy Tail - Snow +78706415 0 --Fiber Jar +93369354 0 --Fishborg Blaster +67441435 0 --Glow-Up Bulb +75732622 0 --Grinder Golem +09742784 0 --Jet Synchron +57421866 0 --Level Eater +83190280 0 --Lunalight Tiger +34206604 0 --Magical Scientist +31178212 0 --Majespecter Unicorn - Kirin +21377582 0 --Master Peace, the True Dracoslaying King +23434538 0 --Maxx "C" +72291078 0 --Mecha Phantom Beast O-Lion +96782886 0 --Mind Master +57835716 0 --Orcust Harp Horror +07563579 0 --Performage Plushfire +17330916 0 --Performapal Monkeyboard +40318957 0 --Performapal Skullcrobat Joker +23558733 0 --Phoenixian Cluster Amaryllis +90411554 0 --Redox, Dragon Ruler of Boulders +05592689 0 --Samsara Lotus +91258852 0 --SPYRAL Master Plan +20663556 0 --Substitoad +88071625 0 --The Tyrant Neptune +26400609 0 --Tidal, Dragon Ruler of Waterfalls +44910027 0 --Victory Dragon +03078576 0 --Yata-Garasu +17412721 0 --Elder Entity Norden +43387895 0 --Supreme King Dragon Starving Venom +15291624 0 --Thunder Dragon Colossus +59537380 0 --Guardragon Agarpain +24094258 0 --Heavymetalfoes Electrumite +39064822 0 --Knightmare Goblin +03679218 0 --Knightmare Mermaid +85243784 0 --Linkross +61665245 0 --Summon Sorceress +22593417 0 --Topologic Gumblar Dragon +83152482 0 --Union Carrier +25862681 0 --Ancient Fairy Dragon +65536818 0 --Denglong, First of the Yang Zing +94677445 0 --Ib the World Chalice Justiciar +63101919 0 --Tempest Magician +34086406 0 --Lavalval Chain +04423206 0 --M-X-Saber Invoker +54719828 0 --Number 16: Shock Master +10389142 0 --Number 42: Galaxy Tomahawk +63504681 0 --Number 86: Heroic Champion - Rhongomyniad +58820923 0 --Number 95: Galaxy-Eyes Dark Matter Dragon +52653092 0 --Number S0: Utopic ZEXAL +34945480 0 --Outer Entity Azathot +87327776 0 --Salamangreat Miragestallio +18326736 0 --Tellarknight Ptolemaeus +88581108 0 --True King of All Calamities +81122844 0 --Wind-Up Carrier Zenmaity +85115440 0 --Zoodiac Broadbull +07394770 0 --Brilliant Fusion +69243953 0 --Butterfly Dagger - Elma +57953380 0 --Card of Safe Return +04031928 0 --Change of Heart +67616300 0 --Chicken Game +60682203 0 --Cold Wave +17375316 0 --Confiscation +44763025 0 --Delinquent Duo +23557835 0 --Dimension Fusion +42703248 0 --Giant Trunade +79571449 0 --Graceful Charity +19613556 0 --Heavy Storm +35059553 0 --Kaiser Colosseum +85602018 0 --Last Will +34906152 0 --Mass Driver +46411259 0 --Metamorphosis +41482598 0 --Mirage of Nightmare +74191942 0 --Painful Choice +55144522 0 --Pot of Greed +70828912 0 --Premature Burial +63166095 0 --Sky Striker Mobilize - Engage! +63789924 0 --Smoke Grenade of the Thief +45986603 0 --Snatch Steal +54447022 0 --Soul Charge +46448938 0 --Spellbook of Judgment +11110587 0 --That Grass Looks Greener +42829885 0 --The Forceful Sentry +28566710 0 --Last Turn +27174286 0 --Return from the Different Dimension +93016201 0 --Royal Oppression +57585212 0 --Self-Destruct Button +03280747 0 --Sixth Sense +35316708 0 --Time Seal +64697231 0 --Trap Dustshoot +80604091 0 --Ultimate Offering +05851097 0 --Vanity's Emptiness +#limit +07902349 1 --Left Arm of the Forbidden One +44519536 1 --Left Leg of the Forbidden One +70903634 1 --Right Arm of the Forbidden One +08124921 1 --Right Leg of the Forbidden One +28985331 1 --Armageddon Knight +61901281 1 --Black Dragon Collapserpent +69015963 1 --Cyber-Stein +43694650 1 --Danger!? Jackalope? +70711847 1 --Danger! Nessie! +99745551 1 --Danger!? Tsuchinoko? +14536035 1 --Dark Grepher +58984738 1 --Dinomight Knight, the True Dracofighter +82385847 1 --Dinowrestler Pankratops +49684352 1 --Double Iris Magician +33396948 1 --Exodia the Forbidden One +64034255 1 --Genex Ally Birdman +99177923 1 --Infernity Archfiend +33508719 1 --Morphing Jar +16226786 1 --Night Assailant +12958919 1 --Phantom Skyblaster +88264978 1 --Red-Eyes Darkness Metal Dragon +26889158 1 --Salamangreat Gazelle +92559258 1 --Servant of Endymion +81275020 1 --Speedroid Terrortop +78080961 1 --SPYRAL Quik-Fix +89399912 1 --Tempest, Dragon Ruler of Storms +30539496 1 --True King Lithosagym, the Disaster +99234526 1 --White Dragon Wyverburster +78872731 1 --Zoodiac Ratpier +39512984 1 --Gem-Knight Master Diamond +77235086 1 --Cyber Angel Benten +74586817 1 --PSY-Framelord Omega +90953320 1 --T.G. Hyper Librarian +52687916 1 --Trishula, Dragon of the Ice Barrier +27552504 1 --Beatrice, Lady of the Eternal +00581014 1 --Daigusto Emeral +48905153 1 --Zoodiac Drident +08949584 1 --A Hero Lives +24224830 1 --Called by the Grave +72892473 1 --Card Destruction +59750328 1 --Card of Demise +91623717 1 --Chain Strike +81674782 1 --Dimensional Fissure +15854426 1 --Divine Wind of Mist Valley +14733538 1 --Draco Face-Off +13035077 1 --Dragonic Diagram +67723438 1 --Emergency Teleport +95308449 1 --Final Countdown +81439173 1 --Foolish Burial +27970830 1 --Gateway of the Six +75500286 1 --Gold Sarcophagus +18144506 1 --Harpie's Feather Duster +66957584 1 --Infernity Launcher +01845204 1 --Instant Fusion +93946239 1 --Into the Void +71650854 1 --Magical Mid-Breaker Field +37520316 1 --Mind Control +83764718 1 --Monster Reborn +33782437 1 --One Day of Peace +02295440 1 --One for One +12580477 1 --Raigeki +58577036 1 --Reasoning +32807846 1 --Reinforcement of the Army +52155219 1 --Salamangreat Circle +73915051 1 --Scapegoat +24940422 1 --Sekka's Light +73468603 1 --Set Rotation +52340444 1 --Sky Striker Mecha - Hornet Drones +24010609 1 --Sky Striker Mecha Modules - Multirole +71344451 1 --Slash Draw +54631665 1 --SPYRAL Resort +45305419 1 --Symbol of Heritage +73628505 1 --Terraforming +35371948 1 --Trickstar Light Stage +70368879 1 --Upstart Goblin +46060017 1 --Zoodiac Barrage +61740673 1 --Imperial Order +30241314 1 --Macro Cosmos +32723153 1 --Magical Explosion +89208725 1 --Metaverse +23002292 1 --Red Reboot +82732705 1 --Skill Drain +17078030 1 --Wall of Revealing Light +#semi limit +09411399 2 --Destiny HERO - Malicious + +!2020.12 TCG +#forbidden +76794549 0 --Astrograph Sorcerer +09929398 0 --Blackwing - Gofu the Vague Shadow +09047460 0 --Blackwing - Steam the Cloak +53804307 0 --Blaster, Dragon Ruler of Infernos +94689206 0 --Block Dragon +34124316 0 --Cyber Jar +15341821 0 --Dandylion +05560911 0 --Destrudo the Lost Dragon's Frisson +08903700 0 --Djinn Releaser of Rituals +76218313 0 --Dragon Buster Destruction Sword +51858306 0 --Eclipse Wyvern +55623480 0 --Fairy Tail - Snow +78706415 0 --Fiber Jar +93369354 0 --Fishborg Blaster +67441435 0 --Glow-Up Bulb +75732622 0 --Grinder Golem +09742784 0 --Jet Synchron +57421866 0 --Level Eater +83190280 0 --Lunalight Tiger +34206604 0 --Magical Scientist +31178212 0 --Majespecter Unicorn - Kirin +21377582 0 --Master Peace, the True Dracoslaying King +23434538 0 --Maxx "C" +72291078 0 --Mecha Phantom Beast O-Lion +96782886 0 --Mind Master +57835716 0 --Orcust Harp Horror +07563579 0 --Performage Plushfire +17330916 0 --Performapal Monkeyboard +40318957 0 --Performapal Skullcrobat Joker +23558733 0 --Phoenixian Cluster Amaryllis +90411554 0 --Redox, Dragon Ruler of Boulders +05592689 0 --Samsara Lotus +91258852 0 --SPYRAL Master Plan +20663556 0 --Substitoad +88071625 0 --The Tyrant Neptune +26400609 0 --Tidal, Dragon Ruler of Waterfalls +44910027 0 --Victory Dragon +03078576 0 --Yata-Garasu +17412721 0 --Elder Entity Norden +43387895 0 --Supreme King Dragon Starving Venom +15291624 0 --Thunder Dragon Colossus +05043010 0 --Firewall Dragon +59537380 0 --Guardragon Agarpain +24094258 0 --Heavymetalfoes Electrumite +39064822 0 --Knightmare Goblin +03679218 0 --Knightmare Mermaid +85243784 0 --Linkross +61665245 0 --Summon Sorceress +22593417 0 --Topologic Gumblar Dragon +25862681 0 --Ancient Fairy Dragon +65536818 0 --Denglong, First of the Yang Zing +94677445 0 --Ib the World Chalice Justiciar +63101919 0 --Tempest Magician +34086406 0 --Lavalval Chain +04423206 0 --M-X-Saber Invoker +54719828 0 --Number 16: Shock Master +10389142 0 --Number 42: Galaxy Tomahawk +63504681 0 --Number 86: Heroic Champion - Rhongomyniad +58820923 0 --Number 95: Galaxy-Eyes Dark Matter Dragon +34945480 0 --Outer Entity Azathot +87327776 0 --Salamangreat Miragestallio +18326736 0 --Tellarknight Ptolemaeus +81122844 0 --Wind-Up Carrier Zenmaity +85115440 0 --Zoodiac Broadbull +07394770 0 --Brilliant Fusion +69243953 0 --Butterfly Dagger - Elma +57953380 0 --Card of Safe Return +04031928 0 --Change of Heart +67616300 0 --Chicken Game +60682203 0 --Cold Wave +17375316 0 --Confiscation +44763025 0 --Delinquent Duo +23557835 0 --Dimension Fusion +42703248 0 --Giant Trunade +79571449 0 --Graceful Charity +19613556 0 --Heavy Storm +35059553 0 --Kaiser Colosseum +85602018 0 --Last Will +34906152 0 --Mass Driver +46411259 0 --Metamorphosis +41482598 0 --Mirage of Nightmare +74191942 0 --Painful Choice +55144522 0 --Pot of Greed +70828912 0 --Premature Burial +94220427 0 --Rank-Up-Magic Argent Chaos Force +63166095 0 --Sky Striker Mobilize - Engage! +63789924 0 --Smoke Grenade of the Thief +45986603 0 --Snatch Steal +54447022 0 --Soul Charge +46448938 0 --Spellbook of Judgment +11110587 0 --That Grass Looks Greener +42829885 0 --The Forceful Sentry +28566710 0 --Last Turn +27174286 0 --Return from the Different Dimension +93016201 0 --Royal Oppression +57585212 0 --Self-Destruct Button +03280747 0 --Sixth Sense +35316708 0 --Time Seal +64697231 0 --Trap Dustshoot +80604091 0 --Ultimate Offering +05851097 0 --Vanity's Emptiness +#limit +07902349 1 --Left Arm of the Forbidden One +44519536 1 --Left Leg of the Forbidden One +70903634 1 --Right Arm of the Forbidden One +08124921 1 --Right Leg of the Forbidden One +28985331 1 --Armageddon Knight +61901281 1 --Black Dragon Collapserpent +69015963 1 --Cyber-Stein +43694650 1 --Danger!? Jackalope? +70711847 1 --Danger! Nessie! +99745551 1 --Danger!? Tsuchinoko? +14536035 1 --Dark Grepher +58984738 1 --Dinomight Knight, the True Dracofighter +82385847 1 --Dinowrestler Pankratops +49684352 1 --Double Iris Magician +33396948 1 --Exodia the Forbidden One +64034255 1 --Genex Ally Birdman +99177923 1 --Infernity Archfiend +33508719 1 --Morphing Jar +16226786 1 --Night Assailant +12958919 1 --Phantom Skyblaster +88264978 1 --Red-Eyes Darkness Metal Dragon +26889158 1 --Salamangreat Gazelle +92559258 1 --Servant of Endymion +81275020 1 --Speedroid Terrortop +78080961 1 --SPYRAL Quik-Fix +89399912 1 --Tempest, Dragon Ruler of Storms +30539496 1 --True King Lithosagym, the Disaster +99234526 1 --White Dragon Wyverburster +78872731 1 --Zoodiac Ratpier +39512984 1 --Gem-Knight Master Diamond +26692769 1 --The Phantom Knights of Rusty Bardiche +70583986 1 --Dewloren, Tiger King of the Ice Barrier +18239909 1 --Ignister Prominence, the Blasting Dracoslayer +74586817 1 --PSY-Framelord Omega +90953320 1 --T.G. Hyper Librarian +52687916 1 --Trishula, Dragon of the Ice Barrier +27552504 1 --Beatrice, Lady of the Eternal +00581014 1 --Daigusto Emeral +48905153 1 --Zoodiac Drident +08949584 1 --A Hero Lives +24224830 1 --Called by the Grave +72892473 1 --Card Destruction +59750328 1 --Card of Demise +91623717 1 --Chain Strike +81674782 1 --Dimensional Fissure +15854426 1 --Divine Wind of Mist Valley +14733538 1 --Draco Face-Off +13035077 1 --Dragonic Diagram +67723438 1 --Emergency Teleport +95308449 1 --Final Countdown +81439173 1 --Foolish Burial +27970830 1 --Gateway of the Six +75500286 1 --Gold Sarcophagus +18144506 1 --Harpie's Feather Duster +66957584 1 --Infernity Launcher +01845204 1 --Instant Fusion +93946239 1 --Into the Void +71650854 1 --Magical Mid-Breaker Field +37520316 1 --Mind Control +83764718 1 --Monster Reborn +33782437 1 --One Day of Peace +02295440 1 --One for One +12580477 1 --Raigeki +58577036 1 --Reasoning +32807846 1 --Reinforcement of the Army +52155219 1 --Salamangreat Circle +73915051 1 --Scapegoat +24940422 1 --Sekka's Light +73468603 1 --Set Rotation +52340444 1 --Sky Striker Mecha - Hornet Drones +24010609 1 --Sky Striker Mecha Modules - Multirole +71344451 1 --Slash Draw +54631665 1 --SPYRAL Resort +45305419 1 --Symbol of Heritage +73628505 1 --Terraforming +35371948 1 --Trickstar Light Stage +70368879 1 --Upstart Goblin +46060017 1 --Zoodiac Barrage +61740673 1 --Imperial Order +30241314 1 --Macro Cosmos +32723153 1 --Magical Explosion +89208725 1 --Metaverse +23002292 1 --Red Reboot +82732705 1 --Skill Drain +17078030 1 --Wall of Revealing Light +#semi limit +09411399 2 --Destiny HERO - Malicious +35125879 2 --True King's Return + +!2020.9 TCG +#forbidden +76794549 0 --Astrograph Sorcerer +09929398 0 --Blackwing - Gofu the Vague Shadow +09047460 0 --Blackwing - Steam the Cloak +53804307 0 --Blaster, Dragon Ruler of Infernos +94689206 0 --Block Dragon +34124316 0 --Cyber Jar +15341821 0 --Dandylion +05560911 0 --Destrudo the Lost Dragon's Frisson +08903700 0 --Djinn Releaser of Rituals +51858306 0 --Eclipse Wyvern +55623480 0 --Fairy Tail - Snow +78706415 0 --Fiber Jar +93369354 0 --Fishborg Blaster +67441435 0 --Glow-Up Bulb +75732622 0 --Grinder Golem +09742784 0 --Jet Synchron +57421866 0 --Level Eater +83190280 0 --Lunalight Tiger +34206604 0 --Magical Scientist +31178212 0 --Majespecter Unicorn - Kirin +21377582 0 --Master Peace, the True Dracoslaying King +23434538 0 --Maxx "C" +72291078 0 --Mecha Phantom Beast O-Lion +96782886 0 --Mind Master +57835716 0 --Orcust Harp Horror +07563579 0 --Performage Plushfire +17330916 0 --Performapal Monkeyboard +40318957 0 --Performapal Skullcrobat Joker +23558733 0 --Phoenixian Cluster Amaryllis +90411554 0 --Redox, Dragon Ruler of Boulders +05592689 0 --Samsara Lotus +91258852 0 --SPYRAL Master Plan +20663556 0 --Substitoad +88071625 0 --The Tyrant Neptune +26400609 0 --Tidal, Dragon Ruler of Waterfalls +44910027 0 --Victory Dragon +03078576 0 --Yata-Garasu +17412721 0 --Elder Entity Norden +43387895 0 --Supreme King Dragon Starving Venom +15291624 0 --Thunder Dragon Colossus +05043010 0 --Firewall Dragon +59537380 0 --Guardragon Agarpain +24094258 0 --Heavymetalfoes Electrumite +39064822 0 --Knightmare Goblin +03679218 0 --Knightmare Mermaid +61665245 0 --Summon Sorceress +22593417 0 --Topologic Gumblar Dragon +25862681 0 --Ancient Fairy Dragon +65536818 0 --Denglong, First of the Yang Zing +94677445 0 --Ib the World Chalice Justiciar +63101919 0 --Tempest Magician +34086406 0 --Lavalval Chain +04423206 0 --M-X-Saber Invoker +54719828 0 --Number 16: Shock Master +10389142 0 --Number 42: Galaxy Tomahawk +63504681 0 --Number 86: Heroic Champion - Rhongomyniad +58820923 0 --Number 95: Galaxy-Eyes Dark Matter Dragon +34945480 0 --Outer Entity Azathot +87327776 0 --Salamangreat Miragestallio +18326736 0 --Tellarknight Ptolemaeus +81122844 0 --Wind-Up Carrier Zenmaity +85115440 0 --Zoodiac Broadbull +07394770 0 --Brilliant Fusion +69243953 0 --Butterfly Dagger - Elma +57953380 0 --Card of Safe Return +04031928 0 --Change of Heart +67616300 0 --Chicken Game +60682203 0 --Cold Wave +17375316 0 --Confiscation +44763025 0 --Delinquent Duo +23557835 0 --Dimension Fusion +42703248 0 --Giant Trunade +79571449 0 --Graceful Charity +19613556 0 --Heavy Storm +35059553 0 --Kaiser Colosseum +85602018 0 --Last Will +34906152 0 --Mass Driver +46411259 0 --Metamorphosis +41482598 0 --Mirage of Nightmare +74191942 0 --Painful Choice +55144522 0 --Pot of Greed +70828912 0 --Premature Burial +94220427 0 --Rank-Up-Magic Argent Chaos Force +63166095 0 --Sky Striker Mobilize - Engage! +45986603 0 --Snatch Steal +54447022 0 --Soul Charge +46448938 0 --Spellbook of Judgment +11110587 0 --That Grass Looks Greener +42829885 0 --The Forceful Sentry +28566710 0 --Last Turn +27174286 0 --Return from the Different Dimension +93016201 0 --Royal Oppression +57585212 0 --Self-Destruct Button +03280747 0 --Sixth Sense +35316708 0 --Time Seal +64697231 0 --Trap Dustshoot +80604091 0 --Ultimate Offering +05851097 0 --Vanity's Emptiness +#limit +07902349 1 --Left Arm of the Forbidden One +44519536 1 --Left Leg of the Forbidden One +70903634 1 --Right Arm of the Forbidden One +08124921 1 --Right Leg of the Forbidden One +28985331 1 --Armageddon Knight +61901281 1 --Black Dragon Collapserpent +69015963 1 --Cyber-Stein +43694650 1 --Danger!? Jackalope? +70711847 1 --Danger! Nessie! +99745551 1 --Danger!? Tsuchinoko? +14536035 1 --Dark Grepher +58984738 1 --Dinomight Knight, the True Dracofighter +82385847 1 --Dinowrestler Pankratops +49684352 1 --Double Iris Magician +33396948 1 --Exodia the Forbidden One +64034255 1 --Genex Ally Birdman +99177923 1 --Infernity Archfiend +33508719 1 --Morphing Jar +16226786 1 --Night Assailant +12958919 1 --Phantom Skyblaster +88264978 1 --Red-Eyes Darkness Metal Dragon +26889158 1 --Salamangreat Gazelle +92559258 1 --Servant of Endymion +81275020 1 --Speedroid Terrortop +78080961 1 --SPYRAL Quik-Fix +89399912 1 --Tempest, Dragon Ruler of Storms +30539496 1 --True King Lithosagym, the Disaster +99234526 1 --White Dragon Wyverburster +78872731 1 --Zoodiac Ratpier +11877465 1 --Evigishki Mind Augus +39512984 1 --Gem-Knight Master Diamond +26692769 1 --The Phantom Knights of Rusty Bardiche +70583986 1 --Dewloren, Tiger King of the Ice Barrier +18239909 1 --Ignister Prominence, the Blasting Dracoslayer +74586817 1 --PSY-Framelord Omega +90953320 1 --T.G. Hyper Librarian +52687916 1 --Trishula, Dragon of the Ice Barrier +27552504 1 --Beatrice, Lady of the Eternal +00581014 1 --Daigusto Emeral +48905153 1 --Zoodiac Drident +08949584 1 --A Hero Lives +24224830 1 --Called by the Grave +72892473 1 --Card Destruction +59750328 1 --Card of Demise +91623717 1 --Chain Strike +81674782 1 --Dimensional Fissure +15854426 1 --Divine Wind of Mist Valley +14733538 1 --Draco Face-Off +13035077 1 --Dragonic Diagram +67723438 1 --Emergency Teleport +95308449 1 --Final Countdown +81439173 1 --Foolish Burial +27970830 1 --Gateway of the Six +75500286 1 --Gold Sarcophagus +18144506 1 --Harpie's Feather Duster +66957584 1 --Infernity Launcher +01845204 1 --Instant Fusion +93946239 1 --Into the Void +71650854 1 --Magical Mid-Breaker Field +37520316 1 --Mind Control +83764718 1 --Monster Reborn +33782437 1 --One Day of Peace +02295440 1 --One for One +12580477 1 --Raigeki +58577036 1 --Reasoning +32807846 1 --Reinforcement of the Army +52155219 1 --Salamangreat Circle +73915051 1 --Scapegoat +24940422 1 --Sekka's Light +73468603 1 --Set Rotation +52340444 1 --Sky Striker Mecha - Hornet Drones +24010609 1 --Sky Striker Mecha Modules - Multirole +71344451 1 --Slash Draw +54631665 1 --SPYRAL Resort +45305419 1 --Symbol of Heritage +73628505 1 --Terraforming +35371948 1 --Trickstar Light Stage +70368879 1 --Upstart Goblin +46060017 1 --Zoodiac Barrage +61740673 1 --Imperial Order +30241314 1 --Macro Cosmos +32723153 1 --Magical Explosion +89208725 1 --Metaverse +23002292 1 --Red Reboot +82732705 1 --Skill Drain +35125879 1 --True King's Return +17078030 1 --Wall of Revealing Light +#semi limit +57143342 2 --Cir, Malebranche of the Burning Abyss +09411399 2 --Destiny HERO - Malicious +20758643 2 --Graff, Malebranche of the Burning Abyss +01561110 2 --ABC-Dragon Buster +90809975 2 --Toadally Awesome + +!2020.6 TCG +#forbidden +76794549 0 --Astrograph Sorcerer +09929398 0 --Blackwing - Gofu the Vague Shadow +09047460 0 --Blackwing - Steam the Cloak +53804307 0 --Blaster, Dragon Ruler of Infernos +34124316 0 --Cyber Jar +15341821 0 --Dandylion +05560911 0 --Destrudo the Lost Dragon's Frisson +08903700 0 --Djinn Releaser of Rituals +49684352 0 --Double Iris Magician +51858306 0 --Eclipse Wyvern +55623480 0 --Fairy Tail - Snow +78706415 0 --Fiber Jar +93369354 0 --Fishborg Blaster +67441435 0 --Glow-Up Bulb +75732622 0 --Grinder Golem +57421866 0 --Level Eater +83190280 0 --Lunalight Tiger +34206604 0 --Magical Scientist +31178212 0 --Majespecter Unicorn - Kirin +21593977 0 --Makyura the Destructor +21377582 0 --Master Peace, the True Dracoslaying King +23434538 0 --Maxx "C" +96782886 0 --Mind Master +57835716 0 --Orcust Harp Horror +07563579 0 --Performage Plushfire +17330916 0 --Performapal Monkeyboard +40318957 0 --Performapal Skullcrobat Joker +23558733 0 --Phoenixian Cluster Amaryllis +90411554 0 --Redox, Dragon Ruler of Boulders +05592689 0 --Samsara Lotus +91258852 0 --SPYRAL Master Plan +20663556 0 --Substitoad +88071625 0 --The Tyrant Neptune +26400609 0 --Tidal, Dragon Ruler of Waterfalls +44910027 0 --Victory Dragon +03078576 0 --Yata-Garasu +17412721 0 --Elder Entity Norden +43387895 0 --Supreme King Dragon Starving Venom +15291624 0 --Thunder Dragon Colossus +05043010 0 --Firewall Dragon +59537380 0 --Guardragon Agarpain +24094258 0 --Heavymetalfoes Electrumite +39064822 0 --Knightmare Goblin +03679218 0 --Knightmare Mermaid +61665245 0 --Summon Sorceress +26692769 0 --The Phantom Knights of Rusty Bardiche +22593417 0 --Topologic Gumblar Dragon +25862681 0 --Ancient Fairy Dragon +65536818 0 --Denglong, First of the Yang Zing +94677445 0 --Ib the World Chalice Justiciar +63101919 0 --Tempest Magician +34086406 0 --Lavalval Chain +04423206 0 --M-X-Saber Invoker +54719828 0 --Number 16: Shock Master +10389142 0 --Number 42: Galaxy Tomahawk +63504681 0 --Number 86: Heroic Champion - Rhongomyniad +58820923 0 --Number 95: Galaxy-Eyes Dark Matter Dragon +34945480 0 --Outer Entity Azathot +87327776 0 --Salamangreat Miragestallio +18326736 0 --Tellarknight Ptolemaeus +81122844 0 --Wind-Up Carrier Zenmaity +85115440 0 --Zoodiac Broadbull +07394770 0 --Brilliant Fusion +69243953 0 --Butterfly Dagger - Elma +57953380 0 --Card of Safe Return +04031928 0 --Change of Heart +67616300 0 --Chicken Game +60682203 0 --Cold Wave +17375316 0 --Confiscation +44763025 0 --Delinquent Duo +23557835 0 --Dimension Fusion +42703248 0 --Giant Trunade +79571449 0 --Graceful Charity +18144506 0 --Harpie's Feather Duster +19613556 0 --Heavy Storm +35059553 0 --Kaiser Colosseum +85602018 0 --Last Will +34906152 0 --Mass Driver +46411259 0 --Metamorphosis +41482598 0 --Mirage of Nightmare +74191942 0 --Painful Choice +55144522 0 --Pot of Greed +70828912 0 --Premature Burial +94220427 0 --Rank-Up-Magic Argent Chaos Force +63166095 0 --Sky Striker Mobilize - Engage! +45986603 0 --Snatch Steal +54447022 0 --Soul Charge +46448938 0 --Spellbook of Judgment +11110587 0 --That Grass Looks Greener +42829885 0 --The Forceful Sentry +28566710 0 --Last Turn +27174286 0 --Return from the Different Dimension +93016201 0 --Royal Oppression +57585212 0 --Self-Destruct Button +03280747 0 --Sixth Sense +35316708 0 --Time Seal +64697231 0 --Trap Dustshoot +80604091 0 --Ultimate Offering +05851097 0 --Vanity's Emptiness +#limit +07902349 1 --Left Arm of the Forbidden One +44519536 1 --Left Leg of the Forbidden One +70903634 1 --Right Arm of the Forbidden One +08124921 1 --Right Leg of the Forbidden One +28985331 1 --Armageddon Knight +61901281 1 --Black Dragon Collapserpent +57143342 1 --Cir, Malebranche of the Burning Abyss +69015963 1 --Cyber-Stein +43694650 1 --Danger!? Jackalope? +70711847 1 --Danger! Nessie! +99745551 1 --Danger!? Tsuchinoko? +14536035 1 --Dark Grepher +58984738 1 --Dinomight Knight, the True Dracofighter +82385847 1 --Dinowrestler Pankratops +33396948 1 --Exodia the Forbidden One +64034255 1 --Genex Ally Birdman +20758643 1 --Graff, Malebranche of the Burning Abyss +99177923 1 --Infernity Archfiend +33508719 1 --Morphing Jar +16226786 1 --Night Assailant +12958919 1 --Phantom Skyblaster +88264978 1 --Red-Eyes Darkness Metal Dragon +26889158 1 --Salamangreat Gazelle +92559258 1 --Servant of Endymion +81275020 1 --Speedroid Terrortop +78080961 1 --SPYRAL Quik-Fix +89399912 1 --Tempest, Dragon Ruler of Storms +30539496 1 --True King Lithosagym, the Disaster +99234526 1 --White Dragon Wyverburster +78872731 1 --Zoodiac Ratpier +45222299 1 --Evigishki Gustkraken +11877465 1 --Evigishki Mind Augus +01561110 1 --ABC-Dragon Buster +39512984 1 --Gem-Knight Master Diamond +70583986 1 --Dewloren, Tiger King of the Ice Barrier +18239909 1 --Ignister Prominence, the Blasting Dracoslayer +74586817 1 --PSY-Framelord Omega +90953320 1 --T.G. Hyper Librarian +52687916 1 --Trishula, Dragon of the Ice Barrier +27552504 1 --Beatrice, Lady of the Eternal +00581014 1 --Daigusto Emeral +90809975 1 --Toadally Awesome +48905153 1 --Zoodiac Drident +08949584 1 --A Hero Lives +72892473 1 --Card Destruction +59750328 1 --Card of Demise +91623717 1 --Chain Strike +81674782 1 --Dimensional Fissure +15854426 1 --Divine Wind of Mist Valley +14733538 1 --Draco Face-Off +13035077 1 --Dragonic Diagram +67723438 1 --Emergency Teleport +95308449 1 --Final Countdown +81439173 1 --Foolish Burial +27970830 1 --Gateway of the Six +75500286 1 --Gold Sarcophagus +66957584 1 --Infernity Launcher +01845204 1 --Instant Fusion +93946239 1 --Into the Void +71650854 1 --Magical Mid-Breaker Field +37520316 1 --Mind Control +83764718 1 --Monster Reborn +33782437 1 --One Day of Peace +02295440 1 --One for One +22842126 1 --Pantheism of the Monarchs +12580477 1 --Raigeki +58577036 1 --Reasoning +32807846 1 --Reinforcement of the Army +52155219 1 --Salamangreat Circle +73915051 1 --Scapegoat +24940422 1 --Sekka's Light +73468603 1 --Set Rotation +52340444 1 --Sky Striker Mecha - Hornet Drones +24010609 1 --Sky Striker Mecha Modules - Multirole +71344451 1 --Slash Draw +54631665 1 --SPYRAL Resort +45305419 1 --Symbol of Heritage +73628505 1 --Terraforming +35371948 1 --Trickstar Light Stage +70368879 1 --Upstart Goblin +46060017 1 --Zoodiac Barrage +61740673 1 --Imperial Order +30241314 1 --Macro Cosmos +32723153 1 --Magical Explosion +89208725 1 --Metaverse +23002292 1 --Red Reboot +82732705 1 --Skill Drain +35125879 1 --True King's Return +17078030 1 --Wall of Revealing Light +#semi limit +09411399 2 --Destiny HERO - Malicious +10802915 2 --Tour Guide From the Underworld +98338152 2 --Sky Striker Mecha - Widow Anchor + +!2020.4 TCG +#forbidden +76794549 0 --Astrograph Sorcerer +09929398 0 --Blackwing - Gofu the Vague Shadow +09047460 0 --Blackwing - Steam the Cloak +53804307 0 --Blaster, Dragon Ruler of Infernos +34124316 0 --Cyber Jar +15341821 0 --Dandylion +05560911 0 --Destrudo the Lost Dragon's Frisson +08903700 0 --Djinn Releaser of Rituals +49684352 0 --Double Iris Magician +51858306 0 --Eclipse Wyvern +55623480 0 --Fairy Tail - Snow +78706415 0 --Fiber Jar +93369354 0 --Fishborg Blaster +67441435 0 --Glow-Up Bulb +75732622 0 --Grinder Golem +57421866 0 --Level Eater +83190280 0 --Lunalight Tiger +34206604 0 --Magical Scientist +31178212 0 --Majespecter Unicorn - Kirin +21593977 0 --Makyura the Destructor +21377582 0 --Master Peace, the True Dracoslaying King +23434538 0 --Maxx "C" +96782886 0 --Mind Master +57835716 0 --Orcust Harp Horror +07563579 0 --Performage Plushfire +17330916 0 --Performapal Monkeyboard +40318957 0 --Performapal Skullcrobat Joker +23558733 0 --Phoenixian Cluster Amaryllis +90411554 0 --Redox, Dragon Ruler of Boulders +05592689 0 --Samsara Lotus +91258852 0 --SPYRAL Master Plan +20663556 0 --Substitoad +88071625 0 --The Tyrant Neptune +26400609 0 --Tidal, Dragon Ruler of Waterfalls +44910027 0 --Victory Dragon +03078576 0 --Yata-Garasu +17412721 0 --Elder Entity Norden +43387895 0 --Supreme King Dragon Starving Venom +15291624 0 --Thunder Dragon Colossus +05043010 0 --Firewall Dragon +59537380 0 --Guardragon Agarpain +24094258 0 --Heavymetalfoes Electrumite +39064822 0 --Knightmare Goblin +03679218 0 --Knightmare Mermaid +61665245 0 --Summon Sorceress +26692769 0 --The Phantom Knights of Rusty Bardiche +22593417 0 --Topologic Gumblar Dragon +25862681 0 --Ancient Fairy Dragon +65536818 0 --Denglong, First of the Yang Zing +94677445 0 --Ib the World Chalice Justiciar +63101919 0 --Tempest Magician +34086406 0 --Lavalval Chain +04423206 0 --M-X-Saber Invoker +54719828 0 --Number 16: Shock Master +10389142 0 --Number 42: Galaxy Tomahawk +63504681 0 --Number 86: Heroic Champion - Rhongomyniad +58820923 0 --Number 95: Galaxy-Eyes Dark Matter Dragon +34945480 0 --Outer Entity Azathot +87327776 0 --Salamangreat Miragestallio +18326736 0 --Tellarknight Ptolemaeus +81122844 0 --Wind-Up Carrier Zenmaity +85115440 0 --Zoodiac Broadbull +07394770 0 --Brilliant Fusion +69243953 0 --Butterfly Dagger - Elma +57953380 0 --Card of Safe Return +04031928 0 --Change of Heart +67616300 0 --Chicken Game +60682203 0 --Cold Wave +17375316 0 --Confiscation +44763025 0 --Delinquent Duo +23557835 0 --Dimension Fusion +42703248 0 --Giant Trunade +79571449 0 --Graceful Charity +18144506 0 --Harpie's Feather Duster +19613556 0 --Heavy Storm +35059553 0 --Kaiser Colosseum +85602018 0 --Last Will +34906152 0 --Mass Driver +46411259 0 --Metamorphosis +41482598 0 --Mirage of Nightmare +74191942 0 --Painful Choice +55144522 0 --Pot of Greed +70828912 0 --Premature Burial +94220427 0 --Rank-Up-Magic Argent Chaos Force +63166095 0 --Sky Striker Mobilize - Engage! +45986603 0 --Snatch Steal +54447022 0 --Soul Charge +46448938 0 --Spellbook of Judgment +11110587 0 --That Grass Looks Greener +42829885 0 --The Forceful Sentry +28566710 0 --Last Turn +27174286 0 --Return from the Different Dimension +93016201 0 --Royal Oppression +57585212 0 --Self-Destruct Button +03280747 0 --Sixth Sense +35316708 0 --Time Seal +64697231 0 --Trap Dustshoot +80604091 0 --Ultimate Offering +05851097 0 --Vanity's Emptiness +#limit +07902349 1 --Left Arm of the Forbidden One +44519536 1 --Left Leg of the Forbidden One +70903634 1 --Right Arm of the Forbidden One +08124921 1 --Right Leg of the Forbidden One +42790071 1 --Altergeist Multifaker +28985331 1 --Armageddon Knight +61901281 1 --Black Dragon Collapserpent +57143342 1 --Cir, Malebranche of the Burning Abyss +69015963 1 --Cyber-Stein +43694650 1 --Danger!? Jackalope? +70711847 1 --Danger! Nessie! +99745551 1 --Danger!? Tsuchinoko? +14536035 1 --Dark Grepher +58984738 1 --Dinomight Knight, the True Dracofighter +82385847 1 --Dinowrestler Pankratops +33396948 1 --Exodia the Forbidden One +64034255 1 --Genex Ally Birdman +20758643 1 --Graff, Malebranche of the Burning Abyss +99177923 1 --Infernity Archfiend +33508719 1 --Morphing Jar +16226786 1 --Night Assailant +12958919 1 --Phantom Skyblaster +88264978 1 --Red-Eyes Darkness Metal Dragon +26889158 1 --Salamangreat Gazelle +92559258 1 --Servant of Endymion +81275020 1 --Speedroid Terrortop +78080961 1 --SPYRAL Quik-Fix +89399912 1 --Tempest, Dragon Ruler of Storms +30539496 1 --True King Lithosagym, the Disaster +99234526 1 --White Dragon Wyverburster +78872731 1 --Zoodiac Ratpier +45222299 1 --Evigishki Gustkraken +11877465 1 --Evigishki Mind Augus +89463537 1 --Nekroz of Unicore +01561110 1 --ABC-Dragon Buster +39512984 1 --Gem-Knight Master Diamond +48063985 1 --Ritual Beast Ulti-Cannahawk +70583986 1 --Dewloren, Tiger King of the Ice Barrier +18239909 1 --Ignister Prominence, the Blasting Dracoslayer +74586817 1 --PSY-Framelord Omega +90953320 1 --T.G. Hyper Librarian +52687916 1 --Trishula, Dragon of the Ice Barrier +27552504 1 --Beatrice, Lady of the Eternal +00581014 1 --Daigusto Emeral +90809975 1 --Toadally Awesome +48905153 1 --Zoodiac Drident +08949584 1 --A Hero Lives +72892473 1 --Card Destruction +59750328 1 --Card of Demise +91623717 1 --Chain Strike +81674782 1 --Dimensional Fissure +15854426 1 --Divine Wind of Mist Valley +14733538 1 --Draco Face-Off +13035077 1 --Dragonic Diagram +67723438 1 --Emergency Teleport +95308449 1 --Final Countdown +81439173 1 --Foolish Burial +27970830 1 --Gateway of the Six +75500286 1 --Gold Sarcophagus +66957584 1 --Infernity Launcher +01845204 1 --Instant Fusion +93946239 1 --Into the Void +71650854 1 --Magical Mid-Breaker Field +37520316 1 --Mind Control +83764718 1 --Monster Reborn +33782437 1 --One Day of Peace +02295440 1 --One for One +22842126 1 --Pantheism of the Monarchs +12580477 1 --Raigeki +58577036 1 --Reasoning +32807846 1 --Reinforcement of the Army +52155219 1 --Salamangreat Circle +73915051 1 --Scapegoat +24940422 1 --Sekka's Light +73468603 1 --Set Rotation +52340444 1 --Sky Striker Mecha - Hornet Drones +24010609 1 --Sky Striker Mecha Modules - Multirole +71344451 1 --Slash Draw +54631665 1 --SPYRAL Resort +45305419 1 --Symbol of Heritage +73628505 1 --Terraforming +35371948 1 --Trickstar Light Stage +70368879 1 --Upstart Goblin +46060017 1 --Zoodiac Barrage +61740673 1 --Imperial Order +30241314 1 --Macro Cosmos +32723153 1 --Magical Explosion +89208725 1 --Metaverse +23002292 1 --Red Reboot +82732705 1 --Skill Drain +35125879 1 --True King's Return +17078030 1 --Wall of Revealing Light +#semi limit +09411399 2 --Destiny HERO - Malicious +10802915 2 --Tour Guide From the Underworld +98338152 2 --Sky Striker Mecha - Widow Anchor + +!2020.1 TCG +#forbidden +76794549 0 --Astrograph Sorcerer +09929398 0 --Blackwing - Gofu the Vague Shadow +53804307 0 --Blaster, Dragon Ruler of Infernos +34124316 0 --Cyber Jar +15341821 0 --Dandylion +08903700 0 --Djinn Releaser of Rituals +49684352 0 --Double Iris Magician +51858306 0 --Eclipse Wyvern +55623480 0 --Fairy Tail - Snow +78706415 0 --Fiber Jar +93369354 0 --Fishborg Blaster +75732622 0 --Grinder Golem +57421866 0 --Level Eater +34206604 0 --Magical Scientist +31178212 0 --Majespecter Unicorn - Kirin +21593977 0 --Makyura the Destructor +21377582 0 --Master Peace, the True Dracoslaying King +23434538 0 --Maxx "C" +96782886 0 --Mind Master +57835716 0 --Orcust Harp Horror +07563579 0 --Performage Plushfire +17330916 0 --Performapal Monkeyboard +40318957 0 --Performapal Skullcrobat Joker +23558733 0 --Phoenixian Cluster Amaryllis +90411554 0 --Redox, Dragon Ruler of Boulders +05592689 0 --Samsara Lotus +20663556 0 --Substitoad +88071625 0 --The Tyrant Neptune +26400609 0 --Tidal, Dragon Ruler of Waterfalls +44910027 0 --Victory Dragon +03078576 0 --Yata-Garasu +17412721 0 --Elder Entity Norden +43387895 0 --Supreme King Dragon Starving Venom +15291624 0 --Thunder Dragon Colossus +05043010 0 --Firewall Dragon +59537380 0 --Guardragon Agarpain +24094258 0 --Heavymetalfoes Electrumite +39064822 0 --Knightmare Goblin +03679218 0 --Knightmare Mermaid +61665245 0 --Summon Sorceress +26692769 0 --The Phantom Knights of Rusty Bardiche +22593417 0 --Topologic Gumblar Dragon +25862681 0 --Ancient Fairy Dragon +65536818 0 --Denglong, First of the Yang Zing +94677445 0 --Ib the World Chalice Justiciar +63101919 0 --Tempest Magician +34086406 0 --Lavalval Chain +04423206 0 --M-X-Saber Invoker +54719828 0 --Number 16: Shock Master +10389142 0 --Number 42: Galaxy Tomahawk +63504681 0 --Number 86: Heroic Champion - Rhongomyniad +58820923 0 --Number 95: Galaxy-Eyes Dark Matter Dragon +34945480 0 --Outer Entity Azathot +87327776 0 --Salamangreat Miragestallio +18326736 0 --Tellarknight Ptolemaeus +81122844 0 --Wind-Up Carrier Zenmaity +85115440 0 --Zoodiac Broadbull +48905153 0 --Zoodiac Drident +07394770 0 --Brilliant Fusion +69243953 0 --Butterfly Dagger - Elma +57953380 0 --Card of Safe Return +04031928 0 --Change of Heart +67616300 0 --Chicken Game +60682203 0 --Cold Wave +17375316 0 --Confiscation +44763025 0 --Delinquent Duo +23557835 0 --Dimension Fusion +42703248 0 --Giant Trunade +79571449 0 --Graceful Charity +18144506 0 --Harpie's Feather Duster +19613556 0 --Heavy Storm +35059553 0 --Kaiser Colosseum +85602018 0 --Last Will +34906152 0 --Mass Driver +46411259 0 --Metamorphosis +41482598 0 --Mirage of Nightmare +74191942 0 --Painful Choice +55144522 0 --Pot of Greed +70828912 0 --Premature Burial +94220427 0 --Rank-Up-Magic Argent Chaos Force +63166095 0 --Sky Striker Mobilize - Engage! +45986603 0 --Snatch Steal +54447022 0 --Soul Charge +46448938 0 --Spellbook of Judgment +11110587 0 --That Grass Looks Greener +42829885 0 --The Forceful Sentry +28566710 0 --Last Turn +27174286 0 --Return from the Different Dimension +93016201 0 --Royal Oppression +57585212 0 --Self-Destruct Button +03280747 0 --Sixth Sense +35316708 0 --Time Seal +64697231 0 --Trap Dustshoot +80604091 0 --Ultimate Offering +05851097 0 --Vanity's Emptiness +#limit +07902349 1 --Left Arm of the Forbidden One +44519536 1 --Left Leg of the Forbidden One +70903634 1 --Right Arm of the Forbidden One +08124921 1 --Right Leg of the Forbidden One +42790071 1 --Altergeist Multifaker +28985331 1 --Armageddon Knight +61901281 1 --Black Dragon Collapserpent +57143342 1 --Cir, Malebranche of the Burning Abyss +69015963 1 --Cyber-Stein +70711847 1 --Danger! Nessie! +14536035 1 --Dark Grepher +58984738 1 --Dinomight Knight, the True Dracofighter +82385847 1 --Dinowrestler Pankratops +33396948 1 --Exodia the Forbidden One +64034255 1 --Genex Ally Birdman +20758643 1 --Graff, Malebranche of the Burning Abyss +99177923 1 --Infernity Archfiend +33508719 1 --Morphing Jar +16226786 1 --Night Assailant +12958919 1 --Phantom Skyblaster +88264978 1 --Red-Eyes Darkness Metal Dragon +26889158 1 --Salamangreat Gazelle +92559258 1 --Servant of Endymion +81275020 1 --Speedroid Terrortop +04474060 1 --SPYRAL GEAR - Drone +78080961 1 --SPYRAL Quik-Fix +89399912 1 --Tempest, Dragon Ruler of Storms +30539496 1 --True King Lithosagym, the Disaster +99234526 1 --White Dragon Wyverburster +78872731 1 --Zoodiac Ratpier +45222299 1 --Evigishki Gustkraken +11877465 1 --Evigishki Mind Augus +89463537 1 --Nekroz of Unicore +39512984 1 --Gem-Knight Master Diamond +48063985 1 --Ritual Beast Ulti-Cannahawk +70583986 1 --Dewloren, Tiger King of the Ice Barrier +18239909 1 --Ignister Prominence, the Blasting Dracoslayer +74586817 1 --PSY-Framelord Omega +27552504 1 --Beatrice, Lady of the Eternal +00581014 1 --Daigusto Emeral +08949584 1 --A Hero Lives +72892473 1 --Card Destruction +59750328 1 --Card of Demise +91623717 1 --Chain Strike +81674782 1 --Dimensional Fissure +15854426 1 --Divine Wind of Mist Valley +14733538 1 --Draco Face-Off +13035077 1 --Dragonic Diagram +67723438 1 --Emergency Teleport +95308449 1 --Final Countdown +81439173 1 --Foolish Burial +27970830 1 --Gateway of the Six +75500286 1 --Gold Sarcophagus +66957584 1 --Infernity Launcher +93946239 1 --Into the Void +71650854 1 --Magical Mid-Breaker Field +83764718 1 --Monster Reborn +33782437 1 --One Day of Peace +02295440 1 --One for One +22842126 1 --Pantheism of the Monarchs +67169062 1 --Pot of Avarice +12580477 1 --Raigeki +58577036 1 --Reasoning +32807846 1 --Reinforcement of the Army +52155219 1 --Salamangreat Circle +73915051 1 --Scapegoat +24940422 1 --Sekka's Light +73468603 1 --Set Rotation +52340444 1 --Sky Striker Mecha - Hornet Drones +98338152 1 --Sky Striker Mecha - Widow Anchor +24010609 1 --Sky Striker Mecha Modules - Multirole +71344451 1 --Slash Draw +54631665 1 --SPYRAL Resort +45305419 1 --Symbol of Heritage +73628505 1 --Terraforming +35371948 1 --Trickstar Light Stage +70368879 1 --Upstart Goblin +61740673 1 --Imperial Order +30241314 1 --Macro Cosmos +32723153 1 --Magical Explosion +89208725 1 --Metaverse +23002292 1 --Red Reboot +82732705 1 --Skill Drain +35125879 1 --True King's Return +17078030 1 --Wall of Revealing Light +#semi limit +43694650 2 --Danger!? Jackalope? +99745551 2 --Danger!? Tsuchinoko? +78868119 2 --Deep Sea Diva +28297833 2 --Necroface +10802915 2 --Tour Guide From the Underworld +37520316 2 --Mind Control + +!2019.10 TCG +#forbidden +59537380 0 --守護竜アガーペイン +03679218 0 --トロイメア・マーメイド +76794549 0 --アストログラフ・マジシャン +20663556 0 --イレカエル +44910027 0 --ヴィクトリー・ドラゴン +51858306 0 --エクリプス・ワイバーン +25862681 0 --エンシェント・フェアリー・ドラゴン +53804307 0 --焔征竜-ブラスター +07563579 0 --Emヒグルミ +40318957 0 --EMドクロバット・ジョーカー +17330916 0 --EMモンキーボード +79106360 0 --カオスポッド +90411554 0 --巌征竜-レドックス +08903700 0 --儀式魔人リリーサー +17412721 0 --旧神ノーデン +65536818 0 --源竜星-ボウテンコウ +49684352 0 --虹彩の魔術師 +34124316 0 --サイバーポッド +05592689 0 --サクリファイス・ロータス +88071625 0 --The tyrant NEPTUNE +61665245 0 --サモン・ソーサレス +48905153 0 --十二獣ドランシア +85115440 0 --十二獣ブルホーン +21593977 0 --処刑人-マキュラ +30539496 0 --真竜皇リトスアジムD +21377582 0 --真竜剣皇マスターP +81122844 0 --発条空母ゼンマイティ +23434538 0 --増殖するG +15341821 0 --ダンディライオン +18326736 0 --星守の騎士 プトレマイオス +33184167 0 --同族感染ウィルス +75732622 0 --トーチ・ゴーレム +22593417 0 --トポロジック・ガンブラー・ドラゴン +39064822 0 --トロイメア・ゴブリン +54719828 0 --No.16 色の支配者ショック·ルーラー +10389142 0 --No.42 スターシップ・ギャラクシー・トマホーク +63504681 0 --No.86 H-C ロンゴミアント +58820923 0 --No.95 ギャラクシーアイズ・ダークマター・ドラゴン +43387895 0 --覇王眷竜スターヴ・ヴェノム +26400609 0 --瀑征竜-タイダル +78706415 0 --ファイバーポッド +05043010 0 --ファイアウォール・ドラゴン +26692769 0 --幻影騎士団ラスティ・バルディッシュ +93369354 0 --フィッシュボーグ-ガンナー +55623480 0 --妖精伝姫-シラユキ +23558733 0 --フェニキシアン・クラスター・アマリリス +09929398 0 --BF-朧影のゴウフウ +31178212 0 --マジェスペクター・ユニコーン +34206604 0 --魔導サイエンティスト +04423206 0 --M.X-セイバー インヴォーカー +96782886 0 --メンタルマスター +03078576 0 --八汰烏 +34086406 0 --ラヴァルバル·チェイン +57421866 0 --レベル・スティーラー +41482598 0 --悪夢の蜃気楼 +44763025 0 --いたずら好きな双子悪魔 +19613556 0 --大嵐 +17375316 0 --押収 +35059553 0 --カイザーコロシアム +74191942 0 --苦渋の選択 +42829885 0 --強引な番兵 +45986603 0 --強奪 +55144522 0 --強欲な壺 +04031928 0 --心変わり +23557835 0 --次元融合 +57953380 0 --生還の宝札 +54447022 0 --ソウル・チャージ +60682203 0 --大寒波 +67616300 0 --チキンレース +67169062 0 --貪欲な壺 +69243953 0 --蝶の短剣-エルマ +79571449 0 --天使の施し +11110587 0 --隣の芝刈り +42703248 0 --ハリケーン +18144506 0 --ハーピィの羽根帚 +70828912 0 --早すぎた埋葬 +34906152 0 --マスドライバー +46448938 0 --魔導書の神判 +46411259 0 --突然変異 +85602018 0 --遺言状 +94220427 0 --RUM-アージェント・カオス・フォース +03298689 0 --RUM-幻影騎士団ラウンチ +27174286 0 --異次元からの帰還 +93016201 0 --王宮の弾圧 +05851097 0 --虚無空間 +57585212 0 --自爆スイッチ +03280747 0 --第六感 +64697231 0 --ダスト·シュート +35316708 0 --刻の封印 +80604091 0 --血の代償 +28566710 0 --ラストバトル! +#limit +98338152 1 --閃刀機-ウィドウアンカー +64034255 1 --A·ジェネクス·バードマン +61901281 1 --暗黒竜 コラプサーペント +45222299 1 --イビリチュア·ガストクラーケ +11877465 1 --イビリチュア·マインドオーガス +99177923 1 --インフェルニティ·デーモン +27552504 1 --永遠の淑女 ベアトリーチェ +42790071 1 --オルターガイスト・マルチフェイカー +99234526 1 --輝白竜 ワイバースター +12958919 1 --幻銃士 +74586817 1 --PSYフレームロード・Ω +26889158 1 --転生炎獣ガゼル +39512984 1 --ジェムナイトマスター・ダイヤ +78872731 1 --十二獣モルモラット +28985331 1 --終末の騎士 +78868119 1 --深海のディーヴァ +58984738 1 --真竜拳士ダイナマイトK +04474060 1 --SPYRAL GEAR-ドローン +78080961 1 --SPYRAL-ジーニアス +81275020 1 --SRベイゴマックス +48063985 1 --聖霊獣騎 カンナホーク +63288573 1 --閃刀姫-カガリ +14536035 1 --ダーク・グレファー +00581014 1 --ダイガスタ・エメラル +69015963 1 --デビル·フランケン +16226786 1 --深淵の暗殺者 +18239909 1 --爆竜剣士イグニスターP +57143342 1 --彼岸の悪鬼 ガトルホッグ +20758643 1 --彼岸の悪鬼 グラバースニッチ +70583986 1 --氷結界の虎王ドゥローレン +33396948 1 --封印されしエクゾディア +07902349 1 --封印されし者の左腕 +70903634 1 --封印されし者の右腕 +44519536 1 --封印されし者の左足 +08124921 1 --封印されし者の右足 +24094258 1 --ヘビーメタルフォーゼ・エレクトラム +10802915 1 --魔界発現世行きデスガイド +33508719 1 --メタモルポット +89463537 1 --ユニコールの影霊衣 +89399912 1 --嵐征竜-テンペスト +88264978 1 --レッドアイズ·ダークネスメタルドラゴン +16188701 1 --レディ・デバッガー +71344451 1 --一撃必殺!居合いドロー +33782437 1 --一時休戦 +66957584 1 --インフェルニティガン +81439173 1 --おろかな埋葬 +67723438 1 --緊急テレポート +45305419 1 --継承の印 +52155219 1 --転生炎獣の炎陣 +12580477 1 --サンダー·ボルト +81674782 1 --次元の裂け目 +83764718 1 --死者蘇生 +95308449 1 --終焉のカウントダウン +35125879 1 --真竜皇の復活 +73915051 1 --スケープ・ゴート +54631665 1 --SPYRAL RESORT +24010609 1 --閃刀機関-マルチロール +52340444 1 --閃刀機-ホーネットビット +32807846 1 --増援 +72892473 1 --手札抹殺 +91623717 1 --連鎖爆撃 +14087893 1 --月の書 +73628505 1 --テラ・フォーミング +35371948 1 --トリックスター・ライトステージ +70368879 1 --成金ゴブリン +22842126 1 --汎神の帝王 +71650854 1 --半魔導帯域 +08949584 1 --ヒーローアライブ +75500286 1 --封印の黄金櫃 +07394770 1 --ブリリアント・フュージョン +73468603 1 --盆回し +15854426 1 --霞の谷の神風 +58577036 1 --名推理 +14733538 1 --竜呼相打つ +27970830 1 --六武の門 +02295440 1 --ワン·フォー·ワン +61740673 1 --王宮の勅命 +84749824 1 --神の警告 +82732705 1 --スキルドレイン +73599290 1 --ソウルドレイン +17078030 1 --光の護封壁 +30241314 1 --マクロコスモス +32723153 1 --マジカル·エクスプロージョン +89208725 1 --メタバース +#semi limit +65192027 2 --ダーク·アームド·ドラゴン +68819554 2 --Emダメージ・ジャグラー +43694650 2 --Danger!? Jackalope? +99745551 2 --Danger!? Tsuchinoko? +70711847 2 --Danger! Nessie! +28297833 2 --ネクロフェイス + +!2019.7 TCG +#forbidden +76794549 0 --アストログラフ・マジシャン +20663556 0 --イレカエル +44910027 0 --ヴィクトリー・ドラゴン +51858306 0 --エクリプス・ワイバーン +25862681 0 --エンシェント・フェアリー・ドラゴン +53804307 0 --焔征竜-ブラスター +07563579 0 --Emヒグルミ +40318957 0 --EMドクロバット・ジョーカー +17330916 0 --EMモンキーボード +79106360 0 --カオスポッド +90411554 0 --巌征竜-レドックス +08903700 0 --儀式魔人リリーサー +17412721 0 --旧神ノーデン +65536818 0 --源竜星-ボウテンコウ +49684352 0 --虹彩の魔術師 +34124316 0 --サイバーポッド +05592689 0 --サクリファイス・ロータス +88071625 0 --The tyrant NEPTUNE +61665245 0 --サモン・ソーサレス +48905153 0 --十二獣ドランシア +85115440 0 --十二獣ブルホーン +21593977 0 --処刑人-マキュラ +30539496 0 --真竜皇リトスアジムD +21377582 0 --真竜剣皇マスターP +81122844 0 --発条空母ゼンマイティ +23434538 0 --増殖するG +15341821 0 --ダンディライオン +18326736 0 --星守の騎士 プトレマイオス +33184167 0 --同族感染ウィルス +75732622 0 --トーチ・ゴーレム +22593417 0 --トポロジック・ガンブラー・ドラゴン +39064822 0 --トロイメア・ゴブリン +54719828 0 --No.16 色の支配者ショック·ルーラー +10389142 0 --No.42 スターシップ・ギャラクシー・トマホーク +63504681 0 --No.86 H-C ロンゴミアント +58820923 0 --No.95 ギャラクシーアイズ・ダークマター・ドラゴン +43387895 0 --覇王眷竜スターヴ・ヴェノム +26400609 0 --瀑征竜-タイダル +78706415 0 --ファイバーポッド +05043010 0 --ファイアウォール・ドラゴン +26692769 0 --幻影騎士団ラスティ・バルディッシュ +93369354 0 --フィッシュボーグ-ガンナー +55623480 0 --妖精伝姫-シラユキ +23558733 0 --フェニキシアン・クラスター・アマリリス +09929398 0 --BF-朧影のゴウフウ +31178212 0 --マジェスペクター・ユニコーン +34206604 0 --魔導サイエンティスト +04423206 0 --M.X-セイバー インヴォーカー +96782886 0 --メンタルマスター +03078576 0 --八汰烏 +34086406 0 --ラヴァルバル·チェイン +57421866 0 --レベル・スティーラー +41482598 0 --悪夢の蜃気楼 +44763025 0 --いたずら好きな双子悪魔 +19613556 0 --大嵐 +17375316 0 --押収 +35059553 0 --カイザーコロシアム +74191942 0 --苦渋の選択 +42829885 0 --強引な番兵 +45986603 0 --強奪 +55144522 0 --強欲な壺 +04031928 0 --心変わり +23557835 0 --次元融合 +57953380 0 --生還の宝札 +54447022 0 --ソウル・チャージ +60682203 0 --大寒波 +67616300 0 --チキンレース +67169062 0 --貪欲な壺 +27770341 0 --超再生能力 +69243953 0 --蝶の短剣-エルマ +79571449 0 --天使の施し +11110587 0 --隣の芝刈り +42703248 0 --ハリケーン +18144506 0 --ハーピィの羽根帚 +70828912 0 --早すぎた埋葬 +34906152 0 --マスドライバー +46448938 0 --魔導書の神判 +46411259 0 --突然変異 +85602018 0 --遺言状 +94220427 0 --RUM-アージェント・カオス・フォース +03298689 0 --RUM-幻影騎士団ラウンチ +27174286 0 --異次元からの帰還 +93016201 0 --王宮の弾圧 +05851097 0 --虚無空間 +57585212 0 --自爆スイッチ +03280747 0 --第六感 +64697231 0 --ダスト·シュート +35316708 0 --刻の封印 +80604091 0 --血の代償 +28566710 0 --ラストバトル! +#limit +64034255 1 --A·ジェネクス·バードマン +61901281 1 --暗黒竜 コラプサーペント +45222299 1 --イビリチュア·ガストクラーケ +11877465 1 --イビリチュア·マインドオーガス +99177923 1 --インフェルニティ·デーモン +27552504 1 --永遠の淑女 ベアトリーチェ +20366274 1 --エルシャドール・ネフィリム +42790071 1 --オルターガイスト・マルチフェイカー +99234526 1 --輝白竜 ワイバースター +12958919 1 --幻銃士 +74586817 1 --PSYフレームロード・Ω +26889158 1 --転生炎獣ガゼル +39512984 1 --ジェムナイトマスター・ダイヤ +78872731 1 --十二獣モルモラット +28985331 1 --終末の騎士 +78868119 1 --深海のディーヴァ +58984738 1 --真竜拳士ダイナマイトK +04474060 1 --SPYRAL GEAR-ドローン +78080961 1 --SPYRAL-ジーニアス +81275020 1 --SRベイゴマックス +48063985 1 --聖霊獣騎 カンナホーク +63288573 1 --閃刀姫-カガリ +65192027 1 --ダーク·アームド·ドラゴン +14536035 1 --ダーク・グレファー +00581014 1 --ダイガスタ・エメラル +69015963 1 --デビル·フランケン +16226786 1 --深淵の暗殺者 +18239909 1 --爆竜剣士イグニスターP +57143342 1 --彼岸の悪鬼 ガトルホッグ +20758643 1 --彼岸の悪鬼 グラバースニッチ +70583986 1 --氷結界の虎王ドゥローレン +33396948 1 --封印されしエクゾディア +07902349 1 --封印されし者の左腕 +70903634 1 --封印されし者の右腕 +44519536 1 --封印されし者の左足 +08124921 1 --封印されし者の右足 +24094258 1 --ヘビーメタルフォーゼ・エレクトラム +10802915 1 --魔界発現世行きデスガイド +33508719 1 --メタモルポット +89463537 1 --ユニコールの影霊衣 +89399912 1 --嵐征竜-テンペスト +88264978 1 --レッドアイズ·ダークネスメタルドラゴン +16188701 1 --レディ・デバッガー +71344451 1 --一撃必殺!居合いドロー +33782437 1 --一時休戦 +66957584 1 --インフェルニティガン +81439173 1 --おろかな埋葬 +67723438 1 --緊急テレポート +45305419 1 --継承の印 +52155219 1 --転生炎獣の炎陣 +12580477 1 --サンダー·ボルト +81674782 1 --次元の裂け目 +83764718 1 --死者蘇生 +95308449 1 --終焉のカウントダウン +35125879 1 --真竜皇の復活 +73915051 1 --スケープ・ゴート +54631665 1 --SPYRAL RESORT +24010609 1 --閃刀機関-マルチロール +52340444 1 --閃刀機-ホーネットビット +32807846 1 --増援 +72892473 1 --手札抹殺 +91623717 1 --連鎖爆撃 +14087893 1 --月の書 +73628505 1 --テラ・フォーミング +35371948 1 --トリックスター・ライトステージ +70368879 1 --成金ゴブリン +22842126 1 --汎神の帝王 +71650854 1 --半魔導帯域 +08949584 1 --ヒーローアライブ +75500286 1 --封印の黄金櫃 +07394770 1 --ブリリアント・フュージョン +73468603 1 --盆回し +15854426 1 --霞の谷の神風 +58577036 1 --名推理 +14733538 1 --竜呼相打つ +27970830 1 --六武の門 +02295440 1 --ワン·フォー·ワン +61740673 1 --王宮の勅命 +84749824 1 --神の警告 +82732705 1 --スキルドレイン +73599290 1 --ソウルドレイン +17078030 1 --光の護封壁 +30241314 1 --マクロコスモス +32723153 1 --マジカル·エクスプロージョン +89208725 1 --メタバース +#semi limit +68184115 2 --甲虫装機 ダンセル +40044918 2 --E·HERO エアーマン +68819554 2 --Emダメージ・ジャグラー +82301904 2 --混沌帝龍 -終焉の使者- +09411399 2 --D-HERO ディアボリックガイ +43694650 2 --Danger!? Jackalope? +99745551 2 --Danger!? Tsuchinoko? +70711847 2 --Danger! Nessie! +96570609 2 --天帝アイテール +90307777 2 --影霊衣の術士 シュリット +28297833 2 --ネクロフェイス +72405967 2 --王家の生け贄 + +!2019.4 TCG +#forbidden +55623480 0 --妖精伝姫-シラユキ +75732622 0 --トーチ・ゴーレム +22593417 0 --トポロジック・ガンブラー・ドラゴン +10389142 0 --No.42 スターシップ・ギャラクシー・トマホーク +63504681 0 --No.86 H-C ロンゴミアント +54447022 0 --ソウル・チャージ +05043010 0 --ファイアウォール・ドラゴン +05592689 0 --サクリファイス・ロータス +39064822 0 --トロイメア・ゴブリン +04423206 0 --M.X-セイバー インヴォーカー +76794549 0 --アストログラフ・マジシャン +20663556 0 --イレカエル +44910027 0 --ヴィクトリー・ドラゴン +25862681 0 --エンシェント・フェアリー・ドラゴン +53804307 0 --焔征竜-ブラスター +07563579 0 --Emヒグルミ +40318957 0 --EMドクロバット・ジョーカー +17330916 0 --EMモンキーボード +79106360 0 --カオスポッド +90411554 0 --巌征竜-レドックス +08903700 0 --儀式魔人リリーサー +17412721 0 --旧神ノーデン +65536818 0 --源竜星-ボウテンコウ +49684352 0 --虹彩の魔術師 +34124316 0 --サイバーポッド +88071625 0 --The tyrant NEPTUNE +61665245 0 --サモン・ソーサレス +48905153 0 --十二獣ドランシア +85115440 0 --十二獣ブルホーン +21593977 0 --処刑人-マキュラ +30539496 0 --真竜皇リトスアジムD +21377582 0 --真竜剣皇マスターP +81122844 0 --発条空母ゼンマイティ +23434538 0 --増殖するG +00581014 0 --ダイガスタ・エメラル +15341821 0 --ダンディライオン +18326736 0 --星守の騎士 プトレマイオス +33184167 0 --同族感染ウィルス +54719828 0 --No.16 色の支配者ショック·ルーラー +58820923 0 --No.95 ギャラクシーアイズ・ダークマター・ドラゴン +43387895 0 --覇王眷竜スターヴ・ヴェノム +26400609 0 --瀑征竜-タイダル +78706415 0 --ファイバーポッド +93369354 0 --フィッシュボーグ-ガンナー +23558733 0 --フェニキシアン・クラスター・アマリリス +09929398 0 --BF-朧影のゴウフウ +31178212 0 --マジェスペクター・ユニコーン +34206604 0 --魔導サイエンティスト +96782886 0 --メンタルマスター +03078576 0 --八汰烏 +34086406 0 --ラヴァルバル·チェイン +89399912 0 --嵐征竜-テンペスト +57421866 0 --レベル・スティーラー +41482598 0 --悪夢の蜃気楼 +44763025 0 --いたずら好きな双子悪魔 +19613556 0 --大嵐 +17375316 0 --押収 +35059553 0 --カイザーコロシアム +74191942 0 --苦渋の選択 +42829885 0 --強引な番兵 +45986603 0 --強奪 +55144522 0 --強欲な壺 +04031928 0 --心変わり +23557835 0 --次元融合 +57953380 0 --生還の宝札 +60682203 0 --大寒波 +67616300 0 --チキンレース +67169062 0 --貪欲な壺 +27770341 0 --超再生能力 +69243953 0 --蝶の短剣-エルマ +79571449 0 --天使の施し +11110587 0 --隣の芝刈り +42703248 0 --ハリケーン +18144506 0 --ハーピィの羽根帚 +70828912 0 --早すぎた埋葬 +34906152 0 --マスドライバー +46448938 0 --魔導書の神判 +46411259 0 --突然変異 +85602018 0 --遺言状 +94220427 0 --RUM-アージェント・カオス・フォース +03298689 0 --RUM-幻影騎士団ラウンチ +27174286 0 --異次元からの帰還 +93016201 0 --王宮の弾圧 +05851097 0 --虚無空間 +57585212 0 --自爆スイッチ +03280747 0 --第六感 +64697231 0 --ダスト·シュート +35316708 0 --刻の封印 +80604091 0 --血の代償 +28566710 0 --ラストバトル! +#limit +82301904 1 --混沌帝龍 -終焉の使者- +69015963 1 --デビル·フランケン +14536035 1 --ダーク・グレファー +90307777 1 --影霊衣の術士 シュリット +20366274 1 --エルシャドール・ネフィリム +07394770 1 --ブリリアント・フュージョン +75500286 1 --封印の黄金櫃 +71650854 1 --半魔導帯域 +73915051 1 --スケープ・ゴート +71344451 1 --一撃必殺!居合いドロー +28985331 1 --終末の騎士 +40044918 1 --E·HERO エアーマン +33508719 1 --メタモルポット +24094258 1 --ヘビーメタルフォーゼ・エレクトラム +74586817 1 --PSYフレームロード・Ω +08949584 1 --ヒーローアライブ +72892473 1 --手札抹殺 +52340444 1 --閃刀機-ホーネットビット +64034255 1 --A·ジェネクス·バードマン +45222299 1 --イビリチュア·ガストクラーケ +11877465 1 --イビリチュア·マインドオーガス +99177923 1 --インフェルニティ·デーモン +68184115 1 --甲虫装機 ダンセル +27552504 1 --永遠の淑女 ベアトリーチェ +68819554 1 --Emダメージ・ジャグラー +65518099 1 --クリフォート・ツール +12958919 1 --幻銃士 +39512984 1 --ジェムナイトマスター・ダイヤ +78872731 1 --十二獣モルモラット +78868119 1 --深海のディーヴァ +58984738 1 --真竜拳士ダイナマイトK +04474060 1 --SPYRAL GEAR-ドローン +78080961 1 --SPYRAL-ジーニアス +81275020 1 --SRベイゴマックス +48063985 1 --聖霊獣騎 カンナホーク +63288573 1 --閃刀姫-カガリ +65192027 1 --ダーク·アームド·ドラゴン +96570609 1 --天帝アイテール +16226786 1 --深淵の暗殺者 +18239909 1 --爆竜剣士イグニスターP +57143342 1 --彼岸の悪鬼 ガトルホッグ +20758643 1 --彼岸の悪鬼 グラバースニッチ +70583986 1 --氷結界の虎王ドゥローレン +52687916 1 --氷結界の龍 トリシューラ +33396948 1 --封印されしエクゾディア +07902349 1 --封印されし者の左腕 +70903634 1 --封印されし者の右腕 +44519536 1 --封印されし者の左足 +08124921 1 --封印されし者の右足 +10802915 1 --魔界発現世行きデスガイド +89463537 1 --ユニコールの影霊衣 +88264978 1 --レッドアイズ·ダークネスメタルドラゴン +16188701 1 --レディ・デバッガー +33782437 1 --一時休戦 +66957584 1 --インフェルニティガン +72405967 1 --王家の生け贄 +81439173 1 --おろかな埋葬 +67723438 1 --緊急テレポート +45305419 1 --継承の印 +12580477 1 --サンダー·ボルト +95308449 1 --終焉のカウントダウン +74845897 1 --真炎の爆発 +35125879 1 --真竜皇の復活 +54631665 1 --SPYRAL RESORT +32807846 1 --増援 +14087893 1 --月の書 +81674782 1 --次元の裂け目 +83764718 1 --死者蘇生 +91623717 1 --連鎖爆撃 +70368879 1 --成金ゴブリン +22842126 1 --汎神の帝王 +53129443 1 --ブラック·ホール +73468603 1 --盆回し +15854426 1 --霞の谷の神風 +58577036 1 --名推理 +43040603 1 --モンスターゲート +14733538 1 --竜呼相打つ +27970830 1 --六武の門 +02295440 1 --ワン·フォー·ワン +61740673 1 --王宮の勅命 +84749824 1 --神の警告 +41420027 1 --神の宣告 +82732705 1 --スキルドレイン +73599290 1 --ソウルドレイン +17078030 1 --光の護封壁 +30241314 1 --マクロコスモス +32723153 1 --マジカル·エクスプロージョン +#semi limit +09411399 2 --D-HERO ディアボリックガイ +73628505 2 --テラ・フォーミング +28297833 2 --ネクロフェイス +92746535 2 --竜剣士ラスターP +48130397 2 --超融合 + +!2019.1 TCG +#forbidden +55623480 0 --妖精伝姫-シラユキ +75732622 0 --トーチ・ゴーレム +22593417 0 --トポロジック・ガンブラー・ドラゴン +10389142 0 --No.42 スターシップ・ギャラクシー・トマホーク +63504681 0 --No.86 H-C ロンゴミアント +54447022 0 --ソウル・チャージ +05043010 0 --ファイアウォール・ドラゴン +05592689 0 --サクリファイス・ロータス +39064822 0 --トロイメア・ゴブリン +04423206 0 --M.X-セイバー インヴォーカー +76794549 0 --アストログラフ・マジシャン +20663556 0 --イレカエル +44910027 0 --ヴィクトリー・ドラゴン +25862681 0 --エンシェント・フェアリー・ドラゴン +53804307 0 --焔征竜-ブラスター +07563579 0 --Emヒグルミ +40318957 0 --EMドクロバット・ジョーカー +17330916 0 --EMモンキーボード +79106360 0 --カオスポッド +90411554 0 --巌征竜-レドックス +08903700 0 --儀式魔人リリーサー +17412721 0 --旧神ノーデン +65536818 0 --源竜星-ボウテンコウ +49684352 0 --虹彩の魔術師 +34124316 0 --サイバーポッド +88071625 0 --The tyrant NEPTUNE +48905153 0 --十二獣ドランシア +85115440 0 --十二獣ブルホーン +21593977 0 --処刑人-マキュラ +30539496 0 --真竜皇リトスアジムD +21377582 0 --真竜剣皇マスターP +81122844 0 --発条空母ゼンマイティ +23434538 0 --増殖するG +00581014 0 --ダイガスタ・エメラル +15341821 0 --ダンディライオン +18326736 0 --星守の騎士 プトレマイオス +33184167 0 --同族感染ウィルス +54719828 0 --No.16 色の支配者ショック·ルーラー +43387895 0 --覇王眷竜スターヴ・ヴェノム +26400609 0 --瀑征竜-タイダル +78706415 0 --ファイバーポッド +93369354 0 --フィッシュボーグ-ガンナー +23558733 0 --フェニキシアン・クラスター・アマリリス +09929398 0 --BF-朧影のゴウフウ +31178212 0 --マジェスペクター・ユニコーン +34206604 0 --魔導サイエンティスト +96782886 0 --メンタルマスター +03078576 0 --八汰烏 +34086406 0 --ラヴァルバル·チェイン +89399912 0 --嵐征竜-テンペスト +57421866 0 --レベル・スティーラー +41482598 0 --悪夢の蜃気楼 +44763025 0 --いたずら好きな双子悪魔 +19613556 0 --大嵐 +17375316 0 --押収 +35059553 0 --カイザーコロシアム +74191942 0 --苦渋の選択 +42829885 0 --強引な番兵 +45986603 0 --強奪 +55144522 0 --強欲な壺 +04031928 0 --心変わり +23557835 0 --次元融合 +57953380 0 --生還の宝札 +60682203 0 --大寒波 +67616300 0 --チキンレース +67169062 0 --貪欲な壺 +27770341 0 --超再生能力 +69243953 0 --蝶の短剣-エルマ +79571449 0 --天使の施し +11110587 0 --隣の芝刈り +42703248 0 --ハリケーン +18144506 0 --ハーピィの羽根帚 +70828912 0 --早すぎた埋葬 +34906152 0 --マスドライバー +46448938 0 --魔導書の神判 +46411259 0 --突然変異 +85602018 0 --遺言状 +94220427 0 --RUM-アージェント・カオス・フォース +27174286 0 --異次元からの帰還 +93016201 0 --王宮の弾圧 +05851097 0 --虚無空間 +57585212 0 --自爆スイッチ +03280747 0 --第六感 +64697231 0 --ダスト·シュート +35316708 0 --刻の封印 +80604091 0 --血の代償 +28566710 0 --ラストバトル! +#limit +82301904 1 --混沌帝龍 -終焉の使者- +69015963 1 --デビル·フランケン +14536035 1 --ダーク・グレファー +90307777 1 --影霊衣の術士 シュリット +20366274 1 --エルシャドール・ネフィリム +07394770 1 --ブリリアント・フュージョン +75500286 1 --封印の黄金櫃 +71650854 1 --半魔導帯域 +73915051 1 --スケープ・ゴート +71344451 1 --一撃必殺!居合いドロー +28985331 1 --終末の騎士 +40044918 1 --E·HERO エアーマン +33508719 1 --メタモルポット +24094258 1 --ヘビーメタルフォーゼ・エレクトラム +74586817 1 --PSYフレームロード・Ω +08949584 1 --ヒーローアライブ +72892473 1 --手札抹殺 +52340444 1 --閃刀機-ホーネットビット +48130397 1 --超融合 +64034255 1 --A·ジェネクス·バードマン +45222299 1 --イビリチュア·ガストクラーケ +11877465 1 --イビリチュア·マインドオーガス +99177923 1 --インフェルニティ·デーモン +68184115 1 --甲虫装機 ダンセル +27552504 1 --永遠の淑女 ベアトリーチェ +68819554 1 --Emダメージ・ジャグラー +65518099 1 --クリフォート・ツール +38572779 1 --幻創のミセラサウルス +39512984 1 --ジェムナイトマスター・ダイヤ +78872731 1 --十二獣モルモラット +78868119 1 --深海のディーヴァ +58984738 1 --真竜拳士ダイナマイトK +04474060 1 --SPYRAL GEAR-ドローン +78080961 1 --SPYRAL-ジーニアス +81275020 1 --SRベイゴマックス +48063985 1 --聖霊獣騎 カンナホーク +65192027 1 --ダーク·アームド·ドラゴン +96570609 1 --天帝アイテール +16226786 1 --深淵の暗殺者 +18239909 1 --爆竜剣士イグニスターP +57143342 1 --彼岸の悪鬼 ガトルホッグ +20758643 1 --彼岸の悪鬼 グラバースニッチ +70583986 1 --氷結界の虎王ドゥローレン +52687916 1 --氷結界の龍 トリシューラ +33396948 1 --封印されしエクゾディア +07902349 1 --封印されし者の左腕 +70903634 1 --封印されし者の右腕 +44519536 1 --封印されし者の左足 +08124921 1 --封印されし者の右足 +10802915 1 --魔界発現世行きデスガイド +89463537 1 --ユニコールの影霊衣 +88264978 1 --レッドアイズ·ダークネスメタルドラゴン +33782437 1 --一時休戦 +66957584 1 --インフェルニティガン +72405967 1 --王家の生け贄 +81439173 1 --おろかな埋葬 +67723438 1 --緊急テレポート +45305419 1 --継承の印 +12580477 1 --サンダー·ボルト +95308449 1 --終焉のカウントダウン +74845897 1 --真炎の爆発 +35125879 1 --真竜皇の復活 +54631665 1 --SPYRAL RESORT +32807846 1 --増援 +14087893 1 --月の書 +81674782 1 --次元の裂け目 +83764718 1 --死者蘇生 +91623717 1 --連鎖爆撃 +70368879 1 --成金ゴブリン +22842126 1 --汎神の帝王 +53129443 1 --ブラック·ホール +73468603 1 --盆回し +15854426 1 --霞の谷の神風 +58577036 1 --名推理 +43040603 1 --モンスターゲート +14733538 1 --竜呼相打つ +27970830 1 --六武の門 +02295440 1 --ワン·フォー·ワン +61740673 1 --王宮の勅命 +84749824 1 --神の警告 +41420027 1 --神の宣告 +82732705 1 --スキルドレイン +73599290 1 --ソウルドレイン +17078030 1 --光の護封壁 +30241314 1 --マクロコスモス +32723153 1 --マジカル·エクスプロージョン +#semi limit +09411399 2 --D-HERO ディアボリックガイ +73628505 2 --テラ・フォーミング +28297833 2 --ネクロフェイス +92746535 2 --竜剣士ラスターP + +!2018.12 TCG +#forbidden +05043010 0 --ファイアウォール・ドラゴン +05592689 0 --サクリファイス・ロータス +39064822 0 --トロイメア・ゴブリン +04423206 0 --M.X-セイバー インヴォーカー +76794549 0 --アストログラフ・マジシャン +20663556 0 --イレカエル +44910027 0 --ヴィクトリー・ドラゴン +20366274 0 --エルシャドール・ネフィリム +25862681 0 --エンシェント・フェアリー・ドラゴン +53804307 0 --焔征竜-ブラスター +07563579 0 --Emヒグルミ +40318957 0 --EMドクロバット・ジョーカー +17330916 0 --EMモンキーボード +82301904 0 --混沌帝龍 -終焉の使者- +79106360 0 --カオスポッド +90411554 0 --巌征竜-レドックス +08903700 0 --儀式魔人リリーサー +17412721 0 --旧神ノーデン +65536818 0 --源竜星-ボウテンコウ +49684352 0 --虹彩の魔術師 +34124316 0 --サイバーポッド +88071625 0 --The tyrant NEPTUNE +48905153 0 --十二獣ドランシア +85115440 0 --十二獣ブルホーン +21593977 0 --処刑人-マキュラ +30539496 0 --真竜皇リトスアジムD +21377582 0 --真竜剣皇マスターP +81122844 0 --発条空母ゼンマイティ +23434538 0 --増殖するG +00581014 0 --ダイガスタ・エメラル +15341821 0 --ダンディライオン +69015963 0 --デビル·フランケン +18326736 0 --星守の騎士 プトレマイオス +33184167 0 --同族感染ウィルス +90307777 0 --影霊衣の術士 シュリット +54719828 0 --No.16 色の支配者ショック·ルーラー +43387895 0 --覇王眷竜スターヴ・ヴェノム +26400609 0 --瀑征竜-タイダル +78706415 0 --ファイバーポッド +93369354 0 --フィッシュボーグ-ガンナー +23558733 0 --フェニキシアン・クラスター・アマリリス +09929398 0 --BF-朧影のゴウフウ +31178212 0 --マジェスペクター・ユニコーン +34206604 0 --魔導サイエンティスト +96782886 0 --メンタルマスター +03078576 0 --八汰烏 +34086406 0 --ラヴァルバル·チェイン +89399912 0 --嵐征竜-テンペスト +57421866 0 --レベル・スティーラー +41482598 0 --悪夢の蜃気楼 +44763025 0 --いたずら好きな双子悪魔 +19613556 0 --大嵐 +17375316 0 --押収 +35059553 0 --カイザーコロシアム +74191942 0 --苦渋の選択 +42829885 0 --強引な番兵 +45986603 0 --強奪 +55144522 0 --強欲な壺 +04031928 0 --心変わり +23557835 0 --次元融合 +57953380 0 --生還の宝札 +60682203 0 --大寒波 +67616300 0 --チキンレース +67169062 0 --貪欲な壺 +27770341 0 --超再生能力 +69243953 0 --蝶の短剣-エルマ +79571449 0 --天使の施し +11110587 0 --隣の芝刈り +42703248 0 --ハリケーン +18144506 0 --ハーピィの羽根帚 +70828912 0 --早すぎた埋葬 +34906152 0 --マスドライバー +46448938 0 --魔導書の神判 +46411259 0 --突然変異 +85602018 0 --遺言状 +94220427 0 --RUM-アージェント・カオス・フォース +27174286 0 --異次元からの帰還 +93016201 0 --王宮の弾圧 +05851097 0 --虚無空間 +57585212 0 --自爆スイッチ +03280747 0 --第六感 +64697231 0 --ダスト·シュート +35316708 0 --刻の封印 +80604091 0 --血の代償 +28566710 0 --ラストバトル! +#limit +28985331 1 --終末の騎士 +40044918 1 --E·HERO エアーマン +33508719 1 --メタモルポット +24094258 1 --ヘビーメタルフォーゼ・エレクトラム +74586817 1 --PSYフレームロード・Ω +46772449 1 --励輝士 ヴェルズビュート +08949584 1 --ヒーローアライブ +72892473 1 --手札抹殺 +52340444 1 --閃刀機-ホーネットビット +48130397 1 --超融合 +64034255 1 --A·ジェネクス·バードマン +45222299 1 --イビリチュア·ガストクラーケ +11877465 1 --イビリチュア·マインドオーガス +99177923 1 --インフェルニティ·デーモン +68184115 1 --甲虫装機 ダンセル +69207766 1 --甲虫装機 ホーネット +27552504 1 --永遠の淑女 ベアトリーチェ +68819554 1 --Emダメージ・ジャグラー +65518099 1 --クリフォート・ツール +38572779 1 --幻創のミセラサウルス +39512984 1 --ジェムナイトマスター・ダイヤ +78872731 1 --十二獣モルモラット +78868119 1 --深海のディーヴァ +58984738 1 --真竜拳士ダイナマイトK +04474060 1 --SPYRAL GEAR-ドローン +78080961 1 --SPYRAL-ジーニアス +81275020 1 --SRベイゴマックス +48063985 1 --聖霊獣騎 カンナホーク +65192027 1 --ダーク·アームド·ドラゴン +96570609 1 --天帝アイテール +75732622 1 --トーチ・ゴーレム +16226786 1 --深淵の暗殺者 +18239909 1 --爆竜剣士イグニスターP +57143342 1 --彼岸の悪鬼 ガトルホッグ +20758643 1 --彼岸の悪鬼 グラバースニッチ +70583986 1 --氷結界の虎王ドゥローレン +52687916 1 --氷結界の龍 トリシューラ +33396948 1 --封印されしエクゾディア +07902349 1 --封印されし者の左腕 +70903634 1 --封印されし者の右腕 +44519536 1 --封印されし者の左足 +08124921 1 --封印されし者の右足 +26674724 1 --ブリューナクの影霊衣 +10802915 1 --魔界発現世行きデスガイド +89463537 1 --ユニコールの影霊衣 +88264978 1 --レッドアイズ·ダークネスメタルドラゴン +33782437 1 --一時休戦 +66957584 1 --インフェルニティガン +72405967 1 --王家の生け贄 +81439173 1 --おろかな埋葬 +67723438 1 --緊急テレポート +45305419 1 --継承の印 +99330325 1 --妨げられた壊獣の眠り +12580477 1 --サンダー·ボルト +95308449 1 --終焉のカウントダウン +74845897 1 --真炎の爆発 +35125879 1 --真竜皇の復活 +54631665 1 --SPYRAL RESORT +32807846 1 --増援 +54447022 1 --ソウル・チャージ +14087893 1 --月の書 +81674782 1 --次元の裂け目 +83764718 1 --死者蘇生 +91623717 1 --連鎖爆撃 +79844764 1 --帝王の烈旋 +70368879 1 --成金ゴブリン +22842126 1 --汎神の帝王 +53129443 1 --ブラック·ホール +73468603 1 --盆回し +15854426 1 --霞の谷の神風 +58577036 1 --名推理 +43040603 1 --モンスターゲート +14733538 1 --竜呼相打つ +27970830 1 --六武の門 +02295440 1 --ワン·フォー·ワン +09059700 1 --インフェルニティ・バリア +61740673 1 --王宮の勅命 +84749824 1 --神の警告 +41420027 1 --神の宣告 +82732705 1 --スキルドレイン +73599290 1 --ソウルドレイン +17078030 1 --光の護封壁 +30241314 1 --マクロコスモス +32723153 1 --マジカル·エクスプロージョン +54974237 1 --闇のデッキ破壊ウイルス +#semi limit +09411399 2 --D-HERO ディアボリックガイ +23171610 2 --リミッター解除 +73915051 2 --スケープ・ゴート +73628505 2 --テラ・フォーミング +59297550 2 --ゼンマイマジシャン +90953320 2 --TG ハイパー·ライブラリアン +28297833 2 --ネクロフェイス +92746535 2 --竜剣士ラスターP + +!2018.9 TCG +#forbidden +05592689 0 --サクリファイス・ロータス +39064822 0 --トロイメア・ゴブリン +04423206 0 --M.X-セイバー インヴォーカー +76794549 0 --アストログラフ・マジシャン +20663556 0 --イレカエル +44910027 0 --ヴィクトリー・ドラゴン +20366274 0 --エルシャドール・ネフィリム +25862681 0 --エンシェント・フェアリー・ドラゴン +53804307 0 --焔征竜-ブラスター +07563579 0 --Emヒグルミ +40318957 0 --EMドクロバット・ジョーカー +17330916 0 --EMモンキーボード +82301904 0 --混沌帝龍 -終焉の使者- +79106360 0 --カオスポッド +90411554 0 --巌征竜-レドックス +08903700 0 --儀式魔人リリーサー +17412721 0 --旧神ノーデン +65536818 0 --源竜星-ボウテンコウ +49684352 0 --虹彩の魔術師 +34124316 0 --サイバーポッド +88071625 0 --The tyrant NEPTUNE +48905153 0 --十二獣ドランシア +85115440 0 --十二獣ブルホーン +21593977 0 --処刑人-マキュラ +30539496 0 --真竜皇リトスアジムD +21377582 0 --真竜剣皇マスターP +81122844 0 --発条空母ゼンマイティ +23434538 0 --増殖するG +00581014 0 --ダイガスタ・エメラル +15341821 0 --ダンディライオン +69015963 0 --デビル·フランケン +18326736 0 --星守の騎士 プトレマイオス +33184167 0 --同族感染ウィルス +90307777 0 --影霊衣の術士 シュリット +54719828 0 --No.16 色の支配者ショック·ルーラー +43387895 0 --覇王眷竜スターヴ・ヴェノム +26400609 0 --瀑征竜-タイダル +78706415 0 --ファイバーポッド +93369354 0 --フィッシュボーグ-ガンナー +23558733 0 --フェニキシアン・クラスター・アマリリス +09929398 0 --BF-朧影のゴウフウ +31178212 0 --マジェスペクター・ユニコーン +34206604 0 --魔導サイエンティスト +96782886 0 --メンタルマスター +03078576 0 --八汰烏 +34086406 0 --ラヴァルバル·チェイン +89399912 0 --嵐征竜-テンペスト +57421866 0 --レベル・スティーラー +41482598 0 --悪夢の蜃気楼 +44763025 0 --いたずら好きな双子悪魔 +19613556 0 --大嵐 +17375316 0 --押収 +35059553 0 --カイザーコロシアム +74191942 0 --苦渋の選択 +42829885 0 --強引な番兵 +45986603 0 --強奪 +55144522 0 --強欲な壺 +04031928 0 --心変わり +23557835 0 --次元融合 +57953380 0 --生還の宝札 +60682203 0 --大寒波 +67616300 0 --チキンレース +67169062 0 --貪欲な壺 +27770341 0 --超再生能力 +69243953 0 --蝶の短剣-エルマ +79571449 0 --天使の施し +11110587 0 --隣の芝刈り +42703248 0 --ハリケーン +18144506 0 --ハーピィの羽根帚 +70828912 0 --早すぎた埋葬 +34906152 0 --マスドライバー +46448938 0 --魔導書の神判 +46411259 0 --突然変異 +85602018 0 --遺言状 +94220427 0 --RUM-アージェント・カオス・フォース +27174286 0 --異次元からの帰還 +93016201 0 --王宮の弾圧 +05851097 0 --虚無空間 +57585212 0 --自爆スイッチ +03280747 0 --第六感 +64697231 0 --ダスト·シュート +35316708 0 --刻の封印 +80604091 0 --血の代償 +28566710 0 --ラストバトル! +#limit +30012506 1 --A-アサルト・コア +40044918 1 --E·HERO エアーマン +33508719 1 --メタモルポット +24094258 1 --ヘビーメタルフォーゼ・エレクトラム +74586817 1 --PSYフレームロード・Ω +46772449 1 --励輝士 ヴェルズビュート +08949584 1 --ヒーローアライブ +72892473 1 --手札抹殺 +52340444 1 --閃刀機-ホーネットビット +48130397 1 --超融合 +64034255 1 --A·ジェネクス·バードマン +45222299 1 --イビリチュア·ガストクラーケ +11877465 1 --イビリチュア·マインドオーガス +99177923 1 --インフェルニティ·デーモン +68184115 1 --甲虫装機 ダンセル +69207766 1 --甲虫装機 ホーネット +27552504 1 --永遠の淑女 ベアトリーチェ +68819554 1 --Emダメージ・ジャグラー +65518099 1 --クリフォート・ツール +38572779 1 --幻創のミセラサウルス +39512984 1 --ジェムナイトマスター・ダイヤ +78872731 1 --十二獣モルモラット +78868119 1 --深海のディーヴァ +58984738 1 --真竜拳士ダイナマイトK +04474060 1 --SPYRAL GEAR-ドローン +78080961 1 --SPYRAL-ジーニアス +81275020 1 --SRベイゴマックス +48063985 1 --聖霊獣騎 カンナホーク +65192027 1 --ダーク·アームド·ドラゴン +96570609 1 --天帝アイテール +75732622 1 --トーチ・ゴーレム +16226786 1 --深淵の暗殺者 +18239909 1 --爆竜剣士イグニスターP +57143342 1 --彼岸の悪鬼 ガトルホッグ +20758643 1 --彼岸の悪鬼 グラバースニッチ +70583986 1 --氷結界の虎王ドゥローレン +52687916 1 --氷結界の龍 トリシューラ +05043010 1 --ファイアウォール・ドラゴン +33396948 1 --封印されしエクゾディア +07902349 1 --封印されし者の左腕 +70903634 1 --封印されし者の右腕 +44519536 1 --封印されし者の左足 +08124921 1 --封印されし者の右足 +26674724 1 --ブリューナクの影霊衣 +10802915 1 --魔界発現世行きデスガイド +89463537 1 --ユニコールの影霊衣 +88264978 1 --レッドアイズ·ダークネスメタルドラゴン +33782437 1 --一時休戦 +66957584 1 --インフェルニティガン +72405967 1 --王家の生け贄 +81439173 1 --おろかな埋葬 +67723438 1 --緊急テレポート +45305419 1 --継承の印 +99330325 1 --妨げられた壊獣の眠り +12580477 1 --サンダー·ボルト +95308449 1 --終焉のカウントダウン +74845897 1 --真炎の爆発 +35125879 1 --真竜皇の復活 +54631665 1 --SPYRAL RESORT +32807846 1 --増援 +54447022 1 --ソウル・チャージ +14087893 1 --月の書 +81674782 1 --次元の裂け目 +83764718 1 --死者蘇生 +91623717 1 --連鎖爆撃 +79844764 1 --帝王の烈旋 +70368879 1 --成金ゴブリン +22842126 1 --汎神の帝王 +53129443 1 --ブラック·ホール +73468603 1 --盆回し +15854426 1 --霞の谷の神風 +58577036 1 --名推理 +43040603 1 --モンスターゲート +14733538 1 --竜呼相打つ +27970830 1 --六武の門 +02295440 1 --ワン·フォー·ワン +09059700 1 --インフェルニティ・バリア +61740673 1 --王宮の勅命 +84749824 1 --神の警告 +41420027 1 --神の宣告 +82732705 1 --スキルドレイン +73599290 1 --ソウルドレイン +17078030 1 --光の護封壁 +30241314 1 --マクロコスモス +32723153 1 --マジカル·エクスプロージョン +54974237 1 --闇のデッキ破壊ウイルス +#semi limit +55885348 2 --Kozmo-ダークシミター +24224830 2 --墓穴の指名者 +23171610 2 --リミッター解除 +73915051 2 --スケープ・ゴート +73628505 2 --テラ・フォーミング +59297550 2 --ゼンマイマジシャン +90953320 2 --TG ハイパー·ライブラリアン +28297833 2 --ネクロフェイス +92746535 2 --竜剣士ラスターP + +!2018.5 TCG +#forbidden +76794549 0 --アストログラフ・マジシャン +20663556 0 --イレカエル +44910027 0 --ヴィクトリー・ドラゴン +20366274 0 --エルシャドール・ネフィリム +40044918 0 --E·HERO エアーマン +25862681 0 --エンシェント・フェアリー・ドラゴン +53804307 0 --焔征竜-ブラスター +07563579 0 --Emヒグルミ +40318957 0 --EMドクロバット・ジョーカー +17330916 0 --EMモンキーボード +82301904 0 --混沌帝龍 -終焉の使者- +79106360 0 --カオスポッド +90411554 0 --巌征竜-レドックス +08903700 0 --儀式魔人リリーサー +17412721 0 --旧神ノーデン +65536818 0 --源竜星-ボウテンコウ +49684352 0 --虹彩の魔術師 34124316 0 --サイバーポッド -63519819 0 --サウザンド·アイズ·サクリファイス +88071625 0 --The tyrant NEPTUNE +48905153 0 --十二獣ドランシア +85115440 0 --十二獣ブルホーン 21593977 0 --処刑人-マキュラ -31560081 0 --聖なる魔術師 -16923472 0 --ゼンマイハンター +30539496 0 --真竜皇リトスアジムD +21377582 0 --真竜剣皇マスターP +81122844 0 --発条空母ゼンマイティ +23434538 0 --増殖するG +00581014 0 --ダイガスタ・エメラル +15341821 0 --ダンディライオン 56570271 0 --D-HERO ディスクガイ +69015963 0 --デビル·フランケン +18326736 0 --星守の騎士 プトレマイオス 33184167 0 --同族感染ウィルス +90307777 0 --影霊衣の術士 シュリット +54719828 0 --No.16 色の支配者ショック·ルーラー +43387895 0 --覇王眷竜スターヴ・ヴェノム 26400609 0 --瀑征竜-タイダル -50321796 0 --氷結界の龍 ブリューナク 78706415 0 --ファイバーポッド 93369354 0 --フィッシュボーグ-ガンナー +23558733 0 --フェニキシアン・クラスター・アマリリス +09929398 0 --BF-朧影のゴウフウ +31178212 0 --マジェスペクター・ユニコーン 34206604 0 --魔導サイエンティスト +33508719 0 --メタモルポット 96782886 0 --メンタルマスター 03078576 0 --八汰烏 +34086406 0 --ラヴァルバル·チェイン 89399912 0 --嵐征竜-テンペスト -14878871 0 --レスキューキャット +46772449 0 --励輝士 ヴェルズビュート +57421866 0 --レベル・スティーラー 41482598 0 --悪夢の蜃気楼 44763025 0 --いたずら好きな双子悪魔 19613556 0 --大嵐 17375316 0 --押収 +35059553 0 --カイザーコロシアム 74191942 0 --苦渋の選択 42829885 0 --強引な番兵 45986603 0 --強奪 55144522 0 --強欲な壺 04031928 0 --心変わり -12580477 0 --サンダー·ボルト 23557835 0 --次元融合 57953380 0 --生還の宝札 -87910978 0 --洗脳-ブレインコントロール 60682203 0 --大寒波 +67616300 0 --チキンレース +48130397 0 --超融合 +67169062 0 --貪欲な壺 +27770341 0 --超再生能力 69243953 0 --蝶の短剣-エルマ +72892473 0 --手札抹殺 79571449 0 --天使の施し -70828912 0 --早すぎた埋葬 +11110587 0 --隣の芝刈り 42703248 0 --ハリケーン +18144506 0 --ハーピィの羽根帚 +70828912 0 --早すぎた埋葬 34906152 0 --マスドライバー 46448938 0 --魔導書の神判 -77565204 0 --未来融合-フューチャー·フュージョン 46411259 0 --突然変異 85602018 0 --遺言状 +94220427 0 --RUM-アージェント・カオス・フォース 27174286 0 --異次元からの帰還 93016201 0 --王宮の弾圧 -61740673 0 --王宮の勅命 +05851097 0 --虚無空間 +57585212 0 --自爆スイッチ 03280747 0 --第六感 64697231 0 --ダスト·シュート -80604091 0 --血の代償 35316708 0 --刻の封印 +80604091 0 --血の代償 28566710 0 --ラストバトル! +#limit +64034255 1 --A·ジェネクス·バードマン +45222299 1 --イビリチュア·ガストクラーケ +11877465 1 --イビリチュア·マインドオーガス +99177923 1 --インフェルニティ·デーモン +68184115 1 --甲虫装機 ダンセル +69207766 1 --甲虫装機 ホーネット +27552504 1 --永遠の淑女 ベアトリーチェ +68819554 1 --Emダメージ・ジャグラー +65518099 1 --クリフォート・ツール +38572779 1 --幻創のミセラサウルス +55885348 1 --Kozmo-ダークシミター +39512984 1 --ジェムナイトマスター・ダイヤ +78872731 1 --十二獣モルモラット +78868119 1 --深海のディーヴァ +58984738 1 --真竜拳士ダイナマイトK +04474060 1 --SPYRAL GEAR-ドローン +78080961 1 --SPYRAL-ジーニアス +81275020 1 --SRベイゴマックス +48063985 1 --聖霊獣騎 カンナホーク +65192027 1 --ダーク·アームド·ドラゴン +96570609 1 --天帝アイテール +75732622 1 --トーチ・ゴーレム +16226786 1 --深淵の暗殺者 +18239909 1 --爆竜剣士イグニスターP +57143342 1 --彼岸の悪鬼 ガトルホッグ +20758643 1 --彼岸の悪鬼 グラバースニッチ +70583986 1 --氷結界の虎王ドゥローレン +52687916 1 --氷結界の龍 トリシューラ +05043010 1 --ファイアウォール・ドラゴン +33396948 1 --封印されしエクゾディア +07902349 1 --封印されし者の左腕 +70903634 1 --封印されし者の右腕 +44519536 1 --封印されし者の左足 +08124921 1 --封印されし者の右足 +26674724 1 --ブリューナクの影霊衣 +10802915 1 --魔界発現世行きデスガイド +89463537 1 --ユニコールの影霊衣 +88264978 1 --レッドアイズ·ダークネスメタルドラゴン +33782437 1 --一時休戦 +66957584 1 --インフェルニティガン +72405967 1 --王家の生け贄 +81439173 1 --おろかな埋葬 +67723438 1 --緊急テレポート +45305419 1 --継承の印 +99330325 1 --妨げられた壊獣の眠り +12580477 1 --サンダー·ボルト +95308449 1 --終焉のカウントダウン +74845897 1 --真炎の爆発 +35125879 1 --真竜皇の復活 +54631665 1 --SPYRAL RESORT +32807846 1 --増援 +54447022 1 --ソウル・チャージ +14087893 1 --月の書 +81674782 1 --次元の裂け目 +83764718 1 --死者蘇生 +91623717 1 --連鎖爆撃 +79844764 1 --帝王の烈旋 +70368879 1 --成金ゴブリン +22842126 1 --汎神の帝王 +53129443 1 --ブラック·ホール +73468603 1 --盆回し +15854426 1 --霞の谷の神風 +58577036 1 --名推理 +43040603 1 --モンスターゲート +23171610 1 --リミッター解除 +14733538 1 --竜呼相打つ +27970830 1 --六武の門 +02295440 1 --ワン·フォー·ワン +09059700 1 --インフェルニティ・バリア +61740673 1 --王宮の勅命 +84749824 1 --神の警告 +41420027 1 --神の宣告 +82732705 1 --スキルドレイン +73599290 1 --ソウルドレイン +17078030 1 --光の護封壁 +30241314 1 --マクロコスモス +32723153 1 --マジカル·エクスプロージョン +54974237 1 --闇のデッキ破壊ウイルス +#semi limit +27279764 2 --アポクリフォート・キラー +59297550 2 --ゼンマイマジシャン +90953320 2 --TG ハイパー·ライブラリアン +28297833 2 --ネクロフェイス +92746535 2 --竜剣士ラスターP +48976825 2 --異次元からの埋葬 +83555666 2 --破壊輪 + +!2018.2 TCG +#forbidden +20663556 0 --イレカエル +44910027 0 --ヴィクトリー・ドラゴン +20366274 0 --エルシャドール・ネフィリム +40044918 0 --E·HERO エアーマン +53804307 0 --焔征竜-ブラスター +07563579 0 --Emヒグルミ +40318957 0 --EMドクロバット・ジョーカー +17330916 0 --EMモンキーボード +82301904 0 --混沌帝龍 -終焉の使者- +79106360 0 --カオスポッド +90411554 0 --巌征竜-レドックス +08903700 0 --儀式魔人リリーサー 17412721 0 --旧神ノーデン +65536818 0 --源竜星-ボウテンコウ +49684352 0 --虹彩の魔術師 +34124316 0 --サイバーポッド +88071625 0 --The tyrant NEPTUNE +48905153 0 --十二獣ドランシア +85115440 0 --十二獣ブルホーン +21593977 0 --処刑人-マキュラ +30539496 0 --真竜皇リトスアジムD +58984738 0 --真竜拳士ダイナマイトK +81122844 0 --発条空母ゼンマイティ +23434538 0 --増殖するG +00581014 0 --ダイガスタ・エメラル +15341821 0 --ダンディライオン +61468779 0 --地霊神グランソイル +56570271 0 --D-HERO ディスクガイ +69015963 0 --デビル·フランケン 18326736 0 --星守の騎士 プトレマイオス +33184167 0 --同族感染ウィルス +90307777 0 --影霊衣の術士 シュリット +54719828 0 --No.16 色の支配者ショック·ルーラー +26400609 0 --瀑征竜-タイダル +78706415 0 --ファイバーポッド +93369354 0 --フィッシュボーグ-ガンナー +09929398 0 --BF-朧影のゴウフウ +31178212 0 --マジェスペクター・ユニコーン +34206604 0 --魔導サイエンティスト +33508719 0 --メタモルポット +96782886 0 --メンタルマスター +03078576 0 --八汰烏 +34086406 0 --ラヴァルバル·チェイン +89399912 0 --嵐征竜-テンペスト +46772449 0 --励輝士 ヴェルズビュート +57421866 0 --レベル・スティーラー +41482598 0 --悪夢の蜃気楼 +44763025 0 --いたずら好きな双子悪魔 +19613556 0 --大嵐 +17375316 0 --押収 +35059553 0 --カイザーコロシアム +74191942 0 --苦渋の選択 +42829885 0 --強引な番兵 +45986603 0 --強奪 +55144522 0 --強欲な壺 +04031928 0 --心変わり +23557835 0 --次元融合 +57953380 0 --生還の宝札 +60682203 0 --大寒波 +67616300 0 --チキンレース +48130397 0 --超融合 +67169062 0 --貪欲な壺 +27770341 0 --超再生能力 +69243953 0 --蝶の短剣-エルマ +72892473 0 --手札抹殺 +79571449 0 --天使の施し +42703248 0 --ハリケーン +18144506 0 --ハーピィの羽根帚 +70828912 0 --早すぎた埋葬 +34906152 0 --マスドライバー +46448938 0 --魔導書の神判 +46411259 0 --突然変異 +85602018 0 --遺言状 +27174286 0 --異次元からの帰還 +93016201 0 --王宮の弾圧 +05851097 0 --虚無空間 +57585212 0 --自爆スイッチ +03280747 0 --第六感 +64697231 0 --ダスト·シュート +35316708 0 --刻の封印 +80604091 0 --血の代償 +28566710 0 --ラストバトル! #limit -85103922 1 --アーティファクト-モラルタ +27279764 1 --アポクリフォート・キラー 64034255 1 --A·ジェネクス·バードマン +45222299 1 --イビリチュア·ガストクラーケ +11877465 1 --イビリチュア·マインドオーガス +99177923 1 --インフェルニティ·デーモン 68184115 1 --甲虫装機 ダンセル -40044918 1 --E·HERO エアーマン -72989439 1 --カオス·ソルジャー -開闢の使者- -06602300 1 --重爆撃禽 ボム・フェネクス -28985331 1 --終末の騎士 -00423585 1 --召喚僧サモンプリースト +69207766 1 --甲虫装機 ホーネット +27552504 1 --永遠の淑女 ベアトリーチェ +68819554 1 --Emダメージ・ジャグラー +65518099 1 --クリフォート・ツール +38572779 1 --幻創のミセラサウルス +55885348 1 --Kozmo-ダークシミター +78872731 1 --十二獣モルモラット +78868119 1 --深海のディーヴァ +22499034 1 --真竜戦士イグニスH +04474060 1 --SPYRAL GEAR-ドローン +78080961 1 --SPYRAL-ジーニアス +81275020 1 --SRベイゴマックス +48063985 1 --聖霊獣騎 カンナホーク 65192027 1 --ダーク·アームド·ドラゴン -15341821 1 --ダンディライオン -90953320 1 --TG ハイパー·ライブラリアン +96570609 1 --天帝アイテール +75732622 1 --トーチ・ゴーレム 16226786 1 --深淵の暗殺者 -28297833 1 --ネクロフェイス +80344569 1 --N·グラン·モール +18239909 1 --爆竜剣士イグニスターP +57143342 1 --彼岸の悪鬼 ガトルホッグ +20758643 1 --彼岸の悪鬼 グラバースニッチ +70583986 1 --氷結界の虎王ドゥローレン 52687916 1 --氷結界の龍 トリシューラ +05043010 1 --ファイアウォール・ドラゴン 33396948 1 --封印されしエクゾディア 07902349 1 --封印されし者の左腕 70903634 1 --封印されし者の右腕 44519536 1 --封印されし者の左足 08124921 1 --封印されし者の右足 26674724 1 --ブリューナクの影霊衣 -91110378 1 --光天使スローネ -41386308 1 --マスマティシャン -33508719 1 --メタモルポット +10802915 1 --魔界発現世行きデスガイド 89463537 1 --ユニコールの影霊衣 88264978 1 --レッドアイズ·ダークネスメタルドラゴン -48976825 1 --異次元からの埋葬 33782437 1 --一時休戦 66957584 1 --インフェルニティガン -06417578 1 --神の写し身との接触 +72405967 1 --王家の生け贄 81439173 1 --おろかな埋葬 -23701465 1 --原初の種 -96729612 1 --儀式の準備 +67723438 1 --緊急テレポート 45305419 1 --継承の印 -17639150 1 --機殻の生贄 -83764718 1 --死者蘇生 +99330325 1 --妨げられた壊獣の眠り +12580477 1 --サンダー·ボルト +95308449 1 --終焉のカウントダウン +74845897 1 --真炎の爆発 +35125879 1 --真竜皇の復活 +54631665 1 --SPYRAL RESORT 32807846 1 --増援 54447022 1 --ソウル・チャージ -27770341 1 --超再生能力 -48130397 1 --超融合 -72892473 1 --手札抹殺 -67169062 1 --貪欲な壺 -97211663 1 --影霊衣の反魂術 -18144506 1 --ハーピィの羽根帚 +14087893 1 --月の書 +81674782 1 --次元の裂け目 +83764718 1 --死者蘇生 +79844764 1 --帝王の烈旋 +11110587 1 --隣の芝刈り +70368879 1 --成金ゴブリン +22842126 1 --汎神の帝王 53129443 1 --ブラック·ホール +73468603 1 --盆回し 15854426 1 --霞の谷の神風 +58577036 1 --名推理 +43040603 1 --モンスターゲート 23171610 1 --リミッター解除 -62265044 1 --竜の渓谷 +14733538 1 --竜呼相打つ +27970830 1 --六武の門 02295440 1 --ワン·フォー·ワン -05851097 1 --虚無空間 +09059700 1 --インフェルニティ・バリア +61740673 1 --王宮の勅命 84749824 1 --神の警告 41420027 1 --神の宣告 -36468556 1 --停戦協定 +94192409 1 --強制脱出装置 +82732705 1 --スキルドレイン +73599290 1 --ソウルドレイン 83555666 1 --破壊輪 17078030 1 --光の護封壁 +30241314 1 --マクロコスモス 32723153 1 --マジカル·エクスプロージョン -78868119 1 --深海のディーヴァ -50720316 1 --E·HERO シャドー·ミスト -72714461 1 --慧眼の魔術師 -90307777 1 --影霊衣の術士 シュリット -67441435 1 --グローアップ·バルブ +54974237 1 --闇のデッキ破壊ウイルス #semi limit 74311226 2 --海皇の竜騎隊 -65518099 2 --クリフォート・ツール -09411399 2 --D-HERO ディアボリックガイ -70583986 2 --氷結界の虎王ドゥローレン -92826944 2 --馬頭鬼 -10028593 2 --輪廻天狗 +59297550 2 --ゼンマイマジシャン +90953320 2 --TG ハイパー·ライブラリアン +28297833 2 --ネクロフェイス +41386308 2 --マスマティシャン +92746535 2 --竜剣士ラスターP +48976825 2 --異次元からの埋葬 91623717 2 --連鎖爆撃 -16404809 2 --クリバンデット -22446869 2 --水精鱗-ディニクアビス -37520316 2 --精神操作 -14087893 2 --月の書 -94886282 2 --光の援軍 -75500286 2 --封印の黄金櫃 -01475311 2 --闇の誘惑 -41620959 2 --竜の霊廟 -77505534 2 --堕ち影の蠢き -57728570 2 --死のデッキ破壊ウイルス -45222299 2 --イビリチュア·ガストクラーケ -27970830 2 --六武の門 -!2015.4 +!2017.11 TCG #forbidden +27279764 0 --アポクリフォート・キラー 20663556 0 --イレカエル 44910027 0 --ヴィクトリー・ドラゴン 20366274 0 --エルシャドール・ネフィリム +40044918 0 --E·HERO エアーマン 53804307 0 --焔征竜-ブラスター +68819554 0 --Emダメージ・ジャグラー +07563579 0 --Emヒグルミ +17330916 0 --EMモンキーボード +82301904 0 --混沌帝龍 -終焉の使者- +79106360 0 --カオスポッド 90411554 0 --巌征竜-レドックス -26202165 0 --クリッター -67441435 0 --グローアップ·バルブ -78010363 0 --黒き森のウィッチ -07391448 0 --ゴヨウ·ガーディアン +08903700 0 --儀式魔人リリーサー +17412721 0 --旧神ノーデン +65536818 0 --源竜星-ボウテンコウ 34124316 0 --サイバーポッド -63519819 0 --サウザンド·アイズ·サクリファイス +88071625 0 --The tyrant NEPTUNE +48905153 0 --十二獣ドランシア +85115440 0 --十二獣ブルホーン 21593977 0 --処刑人-マキュラ -31560081 0 --聖なる魔術師 -16923472 0 --ゼンマイハンター +30539496 0 --真竜皇リトスアジムD +58984738 0 --真竜拳士ダイナマイトK +81122844 0 --発条空母ゼンマイティ +00581014 0 --ダイガスタ・エメラル +61468779 0 --地霊神グランソイル 56570271 0 --D-HERO ディスクガイ +69015963 0 --デビル·フランケン +18326736 0 --星守の騎士 プトレマイオス 33184167 0 --同族感染ウィルス +90307777 0 --影霊衣の術士 シュリット +54719828 0 --No.16 色の支配者ショック·ルーラー 26400609 0 --瀑征竜-タイダル -50321796 0 --氷結界の龍 ブリューナク 78706415 0 --ファイバーポッド 93369354 0 --フィッシュボーグ-ガンナー +31178212 0 --マジェスペクター・ユニコーン 34206604 0 --魔導サイエンティスト +33508719 0 --メタモルポット 96782886 0 --メンタルマスター 03078576 0 --八汰烏 +34086406 0 --ラヴァルバル·チェイン 89399912 0 --嵐征竜-テンペスト -14878871 0 --レスキューキャット +46772449 0 --励輝士 ヴェルズビュート 41482598 0 --悪夢の蜃気楼 44763025 0 --いたずら好きな双子悪魔 19613556 0 --大嵐 17375316 0 --押収 +35059553 0 --カイザーコロシアム 74191942 0 --苦渋の選択 42829885 0 --強引な番兵 45986603 0 --強奪 55144522 0 --強欲な壺 04031928 0 --心変わり -12580477 0 --サンダー·ボルト 23557835 0 --次元融合 +83764718 0 --死者蘇生 57953380 0 --生還の宝札 -87910978 0 --洗脳-ブレインコントロール 60682203 0 --大寒波 +67616300 0 --チキンレース +48130397 0 --超融合 +67169062 0 --貪欲な壺 +27770341 0 --超再生能力 69243953 0 --蝶の短剣-エルマ +72892473 0 --手札抹殺 79571449 0 --天使の施し -70828912 0 --早すぎた埋葬 42703248 0 --ハリケーン +18144506 0 --ハーピィの羽根帚 +70828912 0 --早すぎた埋葬 34906152 0 --マスドライバー 46448938 0 --魔導書の神判 -77565204 0 --未来融合-フューチャー·フュージョン 46411259 0 --突然変異 85602018 0 --遺言状 27174286 0 --異次元からの帰還 93016201 0 --王宮の弾圧 -61740673 0 --王宮の勅命 +41420027 0 --神の宣告 +05851097 0 --虚無空間 +57585212 0 --自爆スイッチ 03280747 0 --第六感 64697231 0 --ダスト·シュート -80604091 0 --血の代償 35316708 0 --刻の封印 +80604091 0 --血の代償 28566710 0 --ラストバトル! #limit 85103922 1 --アーティファクト-モラルタ 64034255 1 --A·ジェネクス·バードマン 45222299 1 --イビリチュア·ガストクラーケ +11877465 1 --イビリチュア·マインドオーガス +99177923 1 --インフェルニティ·デーモン 68184115 1 --甲虫装機 ダンセル -40044918 1 --E·HERO エアーマン -82301904 1 --混沌帝龍 -終焉の使者- -72989439 1 --カオス·ソルジャー -開闢の使者- -16404809 1 --クリバンデット -40737112 1 --混沌の黒魔術師 -06602300 1 --重爆撃禽 ボム・フェネクス -28985331 1 --終末の騎士 -00423585 1 --召喚僧サモンプリースト +69207766 1 --甲虫装機 ホーネット +27552504 1 --永遠の淑女 ベアトリーチェ +65518099 1 --クリフォート・ツール +38572779 1 --幻創のミセラサウルス +55885348 1 --Kozmo-ダークシミター +78872731 1 --十二獣モルモラット +78868119 1 --深海のディーヴァ +22499034 1 --真竜戦士イグニスH +04474060 1 --SPYRAL GEAR-ドローン +78080961 1 --SPYRAL-ジーニアス +81275020 1 --SRベイゴマックス +48063985 1 --聖霊獣騎 カンナホーク +23434538 1 --増殖するG 65192027 1 --ダーク·アームド·ドラゴン 15341821 1 --ダンディライオン -90953320 1 --TG ハイパー·ライブラリアン +96570609 1 --天帝アイテール 16226786 1 --深淵の暗殺者 -28297833 1 --ネクロフェイス +80344569 1 --N·グラン·モール +18239909 1 --爆竜剣士イグニスターP +57143342 1 --彼岸の悪鬼 ガトルホッグ +20758643 1 --彼岸の悪鬼 グラバースニッチ +70583986 1 --氷結界の虎王ドゥローレン 52687916 1 --氷結界の龍 トリシューラ 33396948 1 --封印されしエクゾディア 07902349 1 --封印されし者の左腕 70903634 1 --封印されし者の右腕 44519536 1 --封印されし者の左足 08124921 1 --封印されし者の右足 +09929398 1 --BF-朧影のゴウフウ 26674724 1 --ブリューナクの影霊衣 -91110378 1 --光天使スローネ -22446869 1 --水精鱗-ディニクアビス -41386308 1 --マスマティシャン -33508719 1 --メタモルポット +10802915 1 --魔界発現世行きデスガイド 89463537 1 --ユニコールの影霊衣 88264978 1 --レッドアイズ·ダークネスメタルドラゴン -48976825 1 --異次元からの埋葬 33782437 1 --一時休戦 -01845204 1 --簡易融合 66957584 1 --インフェルニティガン -06417578 1 --神の写し身との接触 +72405967 1 --王家の生け贄 81439173 1 --おろかな埋葬 -23701465 1 --原初の種 -96729612 1 --儀式の準備 +67723438 1 --緊急テレポート 45305419 1 --継承の印 17639150 1 --機殻の生贄 -83764718 1 --死者蘇生 +99330325 1 --妨げられた壊獣の眠り +12580477 1 --サンダー·ボルト +95308449 1 --終焉のカウントダウン +74845897 1 --真炎の爆発 +35125879 1 --真竜皇の復活 37520316 1 --精神操作 32807846 1 --増援 54447022 1 --ソウル・チャージ -27770341 1 --超再生能力 -48130397 1 --超融合 14087893 1 --月の書 -72892473 1 --手札抹殺 -67169062 1 --貪欲な壺 -97211663 1 --影霊衣の反魂術 -18144506 1 --ハーピィの羽根帚 -94886282 1 --光の援軍 -75500286 1 --封印の黄金櫃 +81674782 1 --次元の裂け目 +79844764 1 --帝王の烈旋 +11110587 1 --隣の芝刈り +70368879 1 --成金ゴブリン +22842126 1 --汎神の帝王 53129443 1 --ブラック·ホール +73468603 1 --盆回し 15854426 1 --霞の谷の神風 -01475311 1 --闇の誘惑 +77565204 1 --未来融合-フューチャー·フュージョン +58577036 1 --名推理 +43040603 1 --モンスターゲート 23171610 1 --リミッター解除 -62265044 1 --竜の渓谷 -41620959 1 --竜の霊廟 +14733538 1 --竜呼相打つ 27970830 1 --六武の門 02295440 1 --ワン·フォー·ワン -05851097 1 --虚無空間 -77505534 1 --堕ち影の蠢き +09059700 1 --インフェルニティ・バリア +61740673 1 --王宮の勅命 84749824 1 --神の警告 -41420027 1 --神の宣告 -57728570 1 --死のデッキ破壊ウイルス -36468556 1 --停戦協定 -46652477 1 --転生の予言 +94192409 1 --強制脱出装置 +53582587 1 --激流葬 +82732705 1 --スキルドレイン +73599290 1 --ソウルドレイン +29401950 1 --奈落の落とし穴 83555666 1 --破壊輪 17078030 1 --光の護封壁 +30241314 1 --マクロコスモス 32723153 1 --マジカル·エクスプロージョン +54974237 1 --闇のデッキ破壊ウイルス #semi limit -79979666 2 --E·HERO バブルマン -37742478 2 --オネスト +85087012 2 --カードガンナー 74311226 2 --海皇の竜騎隊 -65518099 2 --クリフォート・ツール -81122844 2 --発条空母ゼンマイティ -09411399 2 --D-HERO ディアボリックガイ -70583986 2 --氷結界の虎王ドゥローレン -50091196 2 --フォーミュラ·シンクロン -02009101 2 --BF-疾風のゲイル -95492061 2 --マンジュ・ゴッド -92826944 2 --馬頭鬼 -10028593 2 --輪廻天狗 +72989439 2 --カオス·ソルジャー -開闢の使者- +59297550 2 --ゼンマイマジシャン +90953320 2 --TG ハイパー·ライブラリアン +28297833 2 --ネクロフェイス +50321796 2 --氷結界の龍 ブリューナク +41386308 2 --マスマティシャン +71564252 2 --ライオウ +92746535 2 --竜剣士ラスターP +48976825 2 --異次元からの埋葬 +06417578 2 --神の写し身との接触 +96729612 2 --儀式の準備 +87910978 2 --洗脳-ブレインコントロール 91623717 2 --連鎖爆撃 -98494543 2 --魔法石の採掘 -29401950 2 --奈落の落とし穴 +29843091 2 --おジャマトリオ +36468556 2 --停戦協定 -!2015.1 +!2017.9 TCG #forbidden +27279764 0 --アポクリフォート・キラー 20663556 0 --イレカエル 44910027 0 --ヴィクトリー・ドラゴン -53797637 0 --炎征竜-バーナー -26202165 0 --クリッター -67441435 0 --グローアップ·バルブ -78010363 0 --黒き森のウィッチ -07391448 0 --ゴヨウ·ガーディアン -40737112 0 --混沌の黒魔術師 +20366274 0 --エルシャドール・ネフィリム +40044918 0 --E·HERO エアーマン +53804307 0 --焔征竜-ブラスター +68819554 0 --Emダメージ・ジャグラー +07563579 0 --Emヒグルミ +17330916 0 --EMモンキーボード +82301904 0 --混沌帝龍 -終焉の使者- +79106360 0 --カオスポッド +90411554 0 --巌征竜-レドックス +08903700 0 --儀式魔人リリーサー +17412721 0 --旧神ノーデン +65536818 0 --源竜星-ボウテンコウ 34124316 0 --サイバーポッド -63519819 0 --サウザンド·アイズ·サクリファイス +88071625 0 --The tyrant NEPTUNE +48905153 0 --十二獣ドランシア +85115440 0 --十二獣ブルホーン 21593977 0 --処刑人-マキュラ -27415516 0 --水征竜-ストリーム -31560081 0 --聖なる魔術師 -16923472 0 --ゼンマイハンター -91020571 0 --地征竜-リアクタン +30539496 0 --真竜皇リトスアジムD +58984738 0 --真竜拳士ダイナマイトK +81122844 0 --発条空母ゼンマイティ +00581014 0 --ダイガスタ・エメラル +61468779 0 --地霊神グランソイル 56570271 0 --D-HERO ディスクガイ +69015963 0 --デビル·フランケン +18326736 0 --星守の騎士 プトレマイオス 33184167 0 --同族感染ウィルス -50321796 0 --氷結界の龍 ブリューナク +90307777 0 --影霊衣の術士 シュリット +54719828 0 --No.16 色の支配者ショック·ルーラー +26400609 0 --瀑征竜-タイダル 78706415 0 --ファイバーポッド 93369354 0 --フィッシュボーグ-ガンナー -89185742 0 --風征竜-ライトニング +31178212 0 --マジェスペクター・ユニコーン 34206604 0 --魔導サイエンティスト +33508719 0 --メタモルポット 96782886 0 --メンタルマスター 03078576 0 --八汰烏 -14878871 0 --レスキューキャット +34086406 0 --ラヴァルバル·チェイン +89399912 0 --嵐征竜-テンペスト +46772449 0 --励輝士 ヴェルズビュート 41482598 0 --悪夢の蜃気楼 44763025 0 --いたずら好きな双子悪魔 19613556 0 --大嵐 17375316 0 --押収 +35059553 0 --カイザーコロシアム 74191942 0 --苦渋の選択 42829885 0 --強引な番兵 45986603 0 --強奪 55144522 0 --強欲な壺 04031928 0 --心変わり -12580477 0 --サンダー·ボルト 23557835 0 --次元融合 +83764718 0 --死者蘇生 57953380 0 --生還の宝札 -87910978 0 --洗脳-ブレインコントロール 60682203 0 --大寒波 +67616300 0 --チキンレース +48130397 0 --超融合 +67169062 0 --貪欲な壺 +27770341 0 --超再生能力 69243953 0 --蝶の短剣-エルマ +72892473 0 --手札抹殺 79571449 0 --天使の施し -70828912 0 --早すぎた埋葬 42703248 0 --ハリケーン +18144506 0 --ハーピィの羽根帚 +70828912 0 --早すぎた埋葬 34906152 0 --マスドライバー 46448938 0 --魔導書の神判 -77565204 0 --未来融合-フューチャー·フュージョン 46411259 0 --突然変異 85602018 0 --遺言状 27174286 0 --異次元からの帰還 93016201 0 --王宮の弾圧 -61740673 0 --王宮の勅命 +41420027 0 --神の宣告 +05851097 0 --虚無空間 +57585212 0 --自爆スイッチ 03280747 0 --第六感 64697231 0 --ダスト·シュート -80604091 0 --血の代償 35316708 0 --刻の封印 +80604091 0 --血の代償 28566710 0 --ラストバトル! #limit 85103922 1 --アーティファクト-モラルタ 64034255 1 --A·ジェネクス·バードマン 45222299 1 --イビリチュア·ガストクラーケ +11877465 1 --イビリチュア·マインドオーガス +99177923 1 --インフェルニティ·デーモン 68184115 1 --甲虫装機 ダンセル -20366274 1 --エルシャドール・ネフィリム -94977269 1 --エルシャドール・ミドラーシュ -40044918 1 --E·HERO エアーマン -53804307 1 --焔征竜-ブラスター -82301904 1 --混沌帝龍 -終焉の使者- -72989439 1 --カオス·ソルジャー -開闢の使者- -90411554 1 --巌征竜-レドックス -08131171 1 --キラー・スネーク -06602300 1 --重爆撃禽 ボム・フェネクス -28985331 1 --終末の騎士 -00423585 1 --召喚僧サモンプリースト -23401839 1 --センジュ・ゴッド -81122844 1 --発条空母ゼンマイティ +69207766 1 --甲虫装機 ホーネット +27552504 1 --永遠の淑女 ベアトリーチェ +65518099 1 --クリフォート・ツール +38572779 1 --幻創のミセラサウルス +55885348 1 --Kozmo-ダークシミター +78872731 1 --十二獣モルモラット +78868119 1 --深海のディーヴァ +22499034 1 --真竜戦士イグニスH +81275020 1 --SRベイゴマックス +48063985 1 --聖霊獣騎 カンナホーク +23434538 1 --増殖するG 65192027 1 --ダーク·アームド·ドラゴン 15341821 1 --ダンディライオン -90953320 1 --TG ハイパー·ライブラリアン +96570609 1 --天帝アイテール 16226786 1 --深淵の暗殺者 -28297833 1 --ネクロフェイス -26400609 1 --瀑征竜-タイダル +80344569 1 --N·グラン·モール +18239909 1 --爆竜剣士イグニスターP +57143342 1 --彼岸の悪鬼 ガトルホッグ +20758643 1 --彼岸の悪鬼 グラバースニッチ +70583986 1 --氷結界の虎王ドゥローレン 52687916 1 --氷結界の龍 トリシューラ 33396948 1 --封印されしエクゾディア 07902349 1 --封印されし者の左腕 70903634 1 --封印されし者の右腕 44519536 1 --封印されし者の左足 -08124921 1 --封印されし者の右足 -50091196 1 --フォーミュラ·シンクロン -91110378 1 --光天使スローネ -22446869 1 --水精鱗-ディニクアビス -95492061 1 --マンジュ・ゴッド -33508719 1 --メタモルポット +08124921 1 --封印されし者の右足 +26674724 1 --ブリューナクの影霊衣 +10802915 1 --魔界発現世行きデスガイド 89463537 1 --ユニコールの影霊衣 -89399912 1 --嵐征竜-テンペスト 88264978 1 --レッドアイズ·ダークネスメタルドラゴン -48976825 1 --異次元からの埋葬 33782437 1 --一時休戦 -01845204 1 --簡易融合 66957584 1 --インフェルニティガン -29762407 1 --王家の神殿 +72405967 1 --王家の生け贄 81439173 1 --おろかな埋葬 -23701465 1 --原初の種 -96729612 1 --儀式の準備 +67723438 1 --緊急テレポート 45305419 1 --継承の印 -83764718 1 --死者蘇生 +17639150 1 --機殻の生贄 +99330325 1 --妨げられた壊獣の眠り +12580477 1 --サンダー·ボルト +95308449 1 --終焉のカウントダウン +74845897 1 --真炎の爆発 +35125879 1 --真竜皇の復活 37520316 1 --精神操作 32807846 1 --増援 54447022 1 --ソウル・チャージ -27770341 1 --超再生能力 -48130397 1 --超融合 14087893 1 --月の書 -72892473 1 --手札抹殺 -67169062 1 --貪欲な壺 -18144506 1 --ハーピィの羽根帚 -94886282 1 --光の援軍 -75500286 1 --封印の黄金櫃 +81674782 1 --次元の裂け目 +79844764 1 --帝王の烈旋 +11110587 1 --隣の芝刈り +70368879 1 --成金ゴブリン +22842126 1 --汎神の帝王 53129443 1 --ブラック·ホール 15854426 1 --霞の谷の神風 -01475311 1 --闇の誘惑 +77565204 1 --未来融合-フューチャー·フュージョン +58577036 1 --名推理 +43040603 1 --モンスターゲート 23171610 1 --リミッター解除 -62265044 1 --竜の渓谷 -41620959 1 --竜の霊廟 +14733538 1 --竜呼相打つ 27970830 1 --六武の門 02295440 1 --ワン·フォー·ワン -77505534 1 --堕ち影の蠢き +09059700 1 --インフェルニティ・バリア +61740673 1 --王宮の勅命 84749824 1 --神の警告 -41420027 1 --神の宣告 -17484499 1 --現世と冥界の逆転 -57728570 1 --死のデッキ破壊ウイルス -36468556 1 --停戦協定 -46652477 1 --転生の予言 +94192409 1 --強制脱出装置 +53582587 1 --激流葬 +82732705 1 --スキルドレイン +73599290 1 --ソウルドレイン +29401950 1 --奈落の落とし穴 83555666 1 --破壊輪 17078030 1 --光の護封壁 +30241314 1 --マクロコスモス 32723153 1 --マジカル·エクスプロージョン +54974237 1 --闇のデッキ破壊ウイルス #semi limit -69207766 2 --甲虫装機 ホーネット -79979666 2 --E·HERO バブルマン -37742478 2 --オネスト +85087012 2 --カードガンナー 74311226 2 --海皇の竜騎隊 -29981921 2 --真六武衆-シエン -59509952 2 --大天使クリスティア -09411399 2 --D-HERO ディアボリックガイ -80117527 2 --No.11 ビッグ·アイ -70583986 2 --氷結界の虎王ドゥローレン -02009101 2 --BF-疾風のゲイル -92826944 2 --馬頭鬼 -30929786 2 --立炎星-トウケイ -10028593 2 --輪廻天狗 +72989439 2 --カオス·ソルジャー -開闢の使者- +59297550 2 --ゼンマイマジシャン +90953320 2 --TG ハイパー·ライブラリアン +28297833 2 --ネクロフェイス +50321796 2 --氷結界の龍 ブリューナク +41386308 2 --マスマティシャン +71564252 2 --ライオウ +92746535 2 --竜剣士ラスターP +48976825 2 --異次元からの埋葬 +06417578 2 --神の写し身との接触 +96729612 2 --儀式の準備 +87910978 2 --洗脳-ブレインコントロール 91623717 2 --連鎖爆撃 -98494543 2 --魔法石の採掘 -43040603 2 --モンスターゲート -29401950 2 --奈落の落とし穴 +29843091 2 --おジャマトリオ +36468556 2 --停戦協定 -!2014.10 +!2017.6 TCG #forbidden +27279764 0 --アポクリフォート・キラー 20663556 0 --イレカエル 44910027 0 --ヴィクトリー・ドラゴン -53797637 0 --炎征竜-バーナー +20366274 0 --エルシャドール・ネフィリム +40044918 0 --E·HERO エアーマン +53804307 0 --焔征竜-ブラスター +68819554 0 --Emダメージ・ジャグラー +07563579 0 --Emヒグルミ +17330916 0 --EMモンキーボード 82301904 0 --混沌帝龍 -終焉の使者- -08131171 0 --キラー・スネーク -26202165 0 --クリッター -67441435 0 --グローアップ·バルブ +79106360 0 --カオスポッド +90411554 0 --巌征竜-レドックス +08903700 0 --儀式魔人リリーサー +17412721 0 --旧神ノーデン 78010363 0 --黒き森のウィッチ -07391448 0 --ゴヨウ·ガーディアン -40737112 0 --混沌の黒魔術師 34124316 0 --サイバーポッド -63519819 0 --サウザンド·アイズ·サクリファイス +88071625 0 --The tyrant NEPTUNE 21593977 0 --処刑人-マキュラ -27415516 0 --水征竜-ストリーム -31560081 0 --聖なる魔術師 -16923472 0 --ゼンマイハンター -91020571 0 --地征竜-リアクタン +81122844 0 --発条空母ゼンマイティ 56570271 0 --D-HERO ディスクガイ +69015963 0 --デビル·フランケン +18326736 0 --星守の騎士 プトレマイオス 33184167 0 --同族感染ウィルス -50321796 0 --氷結界の龍 ブリューナク +90307777 0 --影霊衣の術士 シュリット +54719828 0 --No.16 色の支配者ショック·ルーラー +26400609 0 --瀑征竜-タイダル 78706415 0 --ファイバーポッド 93369354 0 --フィッシュボーグ-ガンナー -89185742 0 --風征竜-ライトニング +31178212 0 --マジェスペクター・ユニコーン 34206604 0 --魔導サイエンティスト +33508719 0 --メタモルポット 96782886 0 --メンタルマスター 03078576 0 --八汰烏 -14878871 0 --レスキューキャット +34086406 0 --ラヴァルバル·チェイン +89399912 0 --嵐征竜-テンペスト +46772449 0 --励輝士 ヴェルズビュート 41482598 0 --悪夢の蜃気楼 44763025 0 --いたずら好きな双子悪魔 -29762407 0 --王家の神殿 +19613556 0 --大嵐 17375316 0 --押収 +35059553 0 --カイザーコロシアム 74191942 0 --苦渋の選択 42829885 0 --強引な番兵 45986603 0 --強奪 55144522 0 --強欲な壺 04031928 0 --心変わり -12580477 0 --サンダー·ボルト 23557835 0 --次元融合 +83764718 0 --死者蘇生 57953380 0 --生還の宝札 -87910978 0 --洗脳-ブレインコントロール 60682203 0 --大寒波 +67616300 0 --チキンレース +48130397 0 --超融合 +67169062 0 --貪欲な壺 +27770341 0 --超再生能力 69243953 0 --蝶の短剣-エルマ +72892473 0 --手札抹殺 79571449 0 --天使の施し +42703248 0 --ハリケーン 18144506 0 --ハーピィの羽根帚 70828912 0 --早すぎた埋葬 -42703248 0 --ハリケーン 34906152 0 --マスドライバー 46448938 0 --魔導書の神判 -77565204 0 --未来融合-フューチャー·フュージョン +27970830 0 --六武の門 46411259 0 --突然変異 +31222701 0 --揺れる眼差し 85602018 0 --遺言状 27174286 0 --異次元からの帰還 93016201 0 --王宮の弾圧 -61740673 0 --王宮の勅命 -17484499 0 --現世と冥界の逆転 -57728570 0 --死のデッキ破壊ウイルス +41420027 0 --神の宣告 +05851097 0 --虚無空間 +57585212 0 --自爆スイッチ 03280747 0 --第六感 64697231 0 --ダスト·シュート -80604091 0 --血の代償 35316708 0 --刻の封印 -83555666 0 --破壊輪 +80604091 0 --血の代償 28566710 0 --ラストバトル! #limit 85103922 1 --アーティファクト-モラルタ 64034255 1 --A·ジェネクス·バードマン 45222299 1 --イビリチュア·ガストクラーケ +11877465 1 --イビリチュア·マインドオーガス +99177923 1 --インフェルニティ·デーモン 68184115 1 --甲虫装機 ダンセル 69207766 1 --甲虫装機 ホーネット -20366274 1 --エルシャドール・ネフィリム -94977269 1 --エルシャドール・ミドラーシュ -40044918 1 --E·HERO エアーマン -53804307 1 --焔征竜-ブラスター -74311226 1 --海皇の竜騎隊 +27552504 1 --永遠の淑女 ベアトリーチェ 72989439 1 --カオス·ソルジャー -開闢の使者- -90411554 1 --巌征竜-レドックス -28985331 1 --終末の騎士 -00423585 1 --召喚僧サモンプリースト -81122844 1 --発条空母ゼンマイティ +65518099 1 --クリフォート・ツール +55885348 1 --Kozmo-ダークシミター +12580477 1 --サンダー·ボルト +78868119 1 --深海のディーヴァ +81275020 1 --SRベイゴマックス +48063985 1 --聖霊獣騎 カンナホーク +23434538 1 --増殖するG 65192027 1 --ダーク·アームド·ドラゴン 15341821 1 --ダンディライオン 90953320 1 --TG ハイパー·ライブラリアン +96570609 1 --天帝アイテール 16226786 1 --深淵の暗殺者 -80117527 1 --No.11 ビッグ·アイ -28297833 1 --ネクロフェイス -26400609 1 --瀑征竜-タイダル +80344569 1 --N·グラン·モール +18239909 1 --爆竜剣士イグニスターP +57143342 1 --彼岸の悪鬼 ガトルホッグ +20758643 1 --彼岸の悪鬼 グラバースニッチ +70583986 1 --氷結界の虎王ドゥローレン 52687916 1 --氷結界の龍 トリシューラ +50321796 1 --氷結界の龍 ブリューナク 33396948 1 --封印されしエクゾディア 07902349 1 --封印されし者の左腕 70903634 1 --封印されし者の右腕 44519536 1 --封印されし者の左足 08124921 1 --封印されし者の右足 -50091196 1 --フォーミュラ·シンクロン -91110378 1 --光天使スローネ -22446869 1 --水精鱗-ディニクアビス -33508719 1 --メタモルポット -89399912 1 --嵐征竜-テンペスト -30929786 1 --立炎星-トウケイ +26674724 1 --ブリューナクの影霊衣 +10802915 1 --魔界発現世行きデスガイド +41386308 1 --マスマティシャン +89463537 1 --ユニコールの影霊衣 +92746535 1 --竜剣士ラスターP +14878871 1 --レスキューキャット +85138716 1 --レスキューラビット 88264978 1 --レッドアイズ·ダークネスメタルドラゴン 48976825 1 --異次元からの埋葬 33782437 1 --一時休戦 66957584 1 --インフェルニティガン -19613556 1 --大嵐 +06417578 1 --神の写し身との接触 +72405967 1 --王家の生け贄 81439173 1 --おろかな埋葬 -23701465 1 --原初の種 -83764718 1 --死者蘇生 +96729612 1 --儀式の準備 +67723438 1 --緊急テレポート +45305419 1 --継承の印 +17639150 1 --機殻の生贄 +95308449 1 --終焉のカウントダウン +74845897 1 --真炎の爆発 37520316 1 --精神操作 +87910978 1 --洗脳-ブレインコントロール 32807846 1 --増援 54447022 1 --ソウル・チャージ -27770341 1 --超再生能力 14087893 1 --月の書 -72892473 1 --手札抹殺 -67169062 1 --貪欲な壺 -94886282 1 --光の援軍 -75500286 1 --封印の黄金櫃 -53129443 1 --ブラック·ホール +81674782 1 --次元の裂け目 +79844764 1 --帝王の烈旋 +11110587 1 --隣の芝刈り +70368879 1 --成金ゴブリン +22842126 1 --汎神の帝王 15854426 1 --霞の谷の神風 +77565204 1 --未来融合-フューチャー·フュージョン +58577036 1 --名推理 43040603 1 --モンスターゲート -01475311 1 --闇の誘惑 23171610 1 --リミッター解除 -62265044 1 --竜の渓谷 -41620959 1 --竜の霊廟 -27970830 1 --六武の門 +14733538 1 --竜呼相打つ 02295440 1 --ワン·フォー·ワン -77505534 1 --堕ち影の蠢き +09059700 1 --インフェルニティ・バリア +61740673 1 --王宮の勅命 84749824 1 --神の警告 -41420027 1 --神の宣告 -36468556 1 --停戦協定 -46652477 1 --転生の予言 +94192409 1 --強制脱出装置 +53582587 1 --激流葬 +82732705 1 --スキルドレイン +73599290 1 --ソウルドレイン +29401950 1 --奈落の落とし穴 +83555666 1 --破壊輪 17078030 1 --光の護封壁 +30241314 1 --マクロコスモス 32723153 1 --マジカル·エクスプロージョン +54974237 1 --闇のデッキ破壊ウイルス #semi limit -91279700 2 --ヴェルズ·オピオン -79979666 2 --E·HERO バブルマン -24861088 2 --先史遺産ネブラ・ディスク 37742478 2 --オネスト 85087012 2 --カードガンナー -29981921 2 --真六武衆-シエン -59509952 2 --大天使クリスティア -09411399 2 --D-HERO ディアボリックガイ -01315120 2 --TG ストライカー -98777036 2 --トラゴエディア -70583986 2 --氷結界の虎王ドゥローレン -02009101 2 --BF-疾風のゲイル -92826944 2 --馬頭鬼 -10028593 2 --輪廻天狗 -48686504 2 --ローンファイア·ブロッサム -25377819 2 --召集の聖刻印 +74311226 2 --海皇の竜騎隊 +78872731 2 --十二獣モルモラット +00423585 2 --召喚僧サモンプリースト +59297550 2 --ゼンマイマジシャン +14943837 2 --デブリ·ドラゴン +28297833 2 --ネクロフェイス +71564252 2 --ライオウ +99330325 2 --妨げられた壊獣の眠り +94886282 2 --光の援軍 +53129443 2 --ブラック·ホール +62265044 2 --竜の渓谷 91623717 2 --連鎖爆撃 -08949584 2 --ヒーローアライブ -98494543 2 --魔法石の採掘 29843091 2 --おジャマトリオ -29401950 2 --奈落の落とし穴 +36468556 2 --停戦協定 -!2014.7 +!2017.3 TCG #forbidden +27279764 0 --アポクリフォート・キラー 20663556 0 --イレカエル 44910027 0 --ヴィクトリー・ドラゴン -53797637 0 --炎征竜-バーナー +20366274 0 --エルシャドール・ネフィリム +40044918 0 --E·HERO エアーマン +53804307 0 --焔征竜-ブラスター +68819554 0 --Emダメージ・ジャグラー +07563579 0 --Emヒグルミ +17330916 0 --EMモンキーボード 82301904 0 --混沌帝龍 -終焉の使者- -08131171 0 --キラー・スネーク -26202165 0 --クリッター -67441435 0 --グローアップ·バルブ +79106360 0 --カオスポッド +90411554 0 --巌征竜-レドックス +08903700 0 --儀式魔人リリーサー 78010363 0 --黒き森のウィッチ -07391448 0 --ゴヨウ·ガーディアン -40737112 0 --混沌の黒魔術師 34124316 0 --サイバーポッド -63519819 0 --サウザンド·アイズ·サクリファイス +88071625 0 --The tyrant NEPTUNE 21593977 0 --処刑人-マキュラ -27415516 0 --水征竜-ストリーム -31560081 0 --聖なる魔術師 -16923472 0 --ゼンマイハンター -91020571 0 --地征竜-リアクタン +81122844 0 --発条空母ゼンマイティ 56570271 0 --D-HERO ディスクガイ +69015963 0 --デビル·フランケン +18326736 0 --星守の騎士 プトレマイオス 33184167 0 --同族感染ウィルス -50321796 0 --氷結界の龍 ブリューナク +90307777 0 --影霊衣の術士 シュリット +54719828 0 --No.16 色の支配者ショック·ルーラー +26400609 0 --瀑征竜-タイダル 78706415 0 --ファイバーポッド 93369354 0 --フィッシュボーグ-ガンナー -89185742 0 --風征竜-ライトニング +31178212 0 --マジェスペクター・ユニコーン 34206604 0 --魔導サイエンティスト +33508719 0 --メタモルポット 96782886 0 --メンタルマスター 03078576 0 --八汰烏 -14878871 0 --レスキューキャット +34086406 0 --ラヴァルバル·チェイン +89399912 0 --嵐征竜-テンペスト +46772449 0 --励輝士 ヴェルズビュート 41482598 0 --悪夢の蜃気楼 44763025 0 --いたずら好きな双子悪魔 -29762407 0 --王家の神殿 +19613556 0 --大嵐 17375316 0 --押収 +35059553 0 --カイザーコロシアム 74191942 0 --苦渋の選択 42829885 0 --強引な番兵 45986603 0 --強奪 55144522 0 --強欲な壺 04031928 0 --心変わり -12580477 0 --サンダー·ボルト 23557835 0 --次元融合 +83764718 0 --死者蘇生 57953380 0 --生還の宝札 -87910978 0 --洗脳-ブレインコントロール 60682203 0 --大寒波 +67616300 0 --チキンレース +48130397 0 --超融合 +67169062 0 --貪欲な壺 +27770341 0 --超再生能力 69243953 0 --蝶の短剣-エルマ +72892473 0 --手札抹殺 79571449 0 --天使の施し +42703248 0 --ハリケーン 18144506 0 --ハーピィの羽根帚 70828912 0 --早すぎた埋葬 -42703248 0 --ハリケーン 34906152 0 --マスドライバー 46448938 0 --魔導書の神判 -77565204 0 --未来融合-フューチャー·フュージョン +27970830 0 --六武の門 46411259 0 --突然変異 +31222701 0 --揺れる眼差し 85602018 0 --遺言状 27174286 0 --異次元からの帰還 93016201 0 --王宮の弾圧 -61740673 0 --王宮の勅命 -17484499 0 --現世と冥界の逆転 -57728570 0 --死のデッキ破壊ウイルス +41420027 0 --神の宣告 +05851097 0 --虚無空間 +57585212 0 --自爆スイッチ 03280747 0 --第六感 64697231 0 --ダスト·シュート -80604091 0 --血の代償 35316708 0 --刻の封印 -83555666 0 --破壊輪 +80604091 0 --血の代償 28566710 0 --ラストバトル! #limit 85103922 1 --アーティファクト-モラルタ 64034255 1 --A·ジェネクス·バードマン 45222299 1 --イビリチュア·ガストクラーケ +11877465 1 --イビリチュア·マインドオーガス +99177923 1 --インフェルニティ·デーモン 68184115 1 --甲虫装機 ダンセル 69207766 1 --甲虫装機 ホーネット -40044918 1 --E·HERO エアーマン -53804307 1 --焔征竜-ブラスター -74311226 1 --海皇の竜騎隊 +27552504 1 --永遠の淑女 ベアトリーチェ +40318957 1 --EMドクロバット・ジョーカー 72989439 1 --カオス·ソルジャー -開闢の使者- -90411554 1 --巌征竜-レドックス -28985331 1 --終末の騎士 -81122844 1 --発条空母ゼンマイティ +17412721 1 --旧神ノーデン +65518099 1 --クリフォート・ツール +55885348 1 --Kozmo Dark Destroyer +12580477 1 --サンダー·ボルト +78868119 1 --深海のディーヴァ +48063985 1 --聖霊獣騎 カンナホーク +23434538 1 --増殖するG +65192027 1 --ダーク·アームド·ドラゴン 15341821 1 --ダンディライオン 90953320 1 --TG ハイパー·ライブラリアン +96570609 1 --天帝アイテール 16226786 1 --深淵の暗殺者 -80117527 1 --No.11 ビッグ·アイ -28297833 1 --ネクロフェイス -26400609 1 --瀑征竜-タイダル +80344569 1 --N·グラン·モール +18239909 1 --爆竜剣士イグニスターP +57143342 1 --彼岸の悪鬼 ガトルホッグ +20758643 1 --彼岸の悪鬼 グラバースニッチ +70583986 1 --氷結界の虎王ドゥローレン 52687916 1 --氷結界の龍 トリシューラ +50321796 1 --氷結界の龍 ブリューナク 33396948 1 --封印されしエクゾディア 07902349 1 --封印されし者の左腕 70903634 1 --封印されし者の右腕 44519536 1 --封印されし者の左足 08124921 1 --封印されし者の右足 -50091196 1 --フォーミュラ·シンクロン -02009101 1 --BF-疾風のゲイル -22446869 1 --水精鱗-ディニクアビス -33508719 1 --メタモルポット -89399912 1 --嵐征竜-テンペスト -30929786 1 --立炎星-トウケイ +26674724 1 --ブリューナクの影霊衣 +10802915 1 --魔界発現世行きデスガイド +41386308 1 --マスマティシャン +89463537 1 --ユニコールの影霊衣 +92746535 1 --竜剣士ラスターP +14878871 1 --レスキューキャット +85138716 1 --レスキューラビット 88264978 1 --レッドアイズ·ダークネスメタルドラゴン 48976825 1 --異次元からの埋葬 33782437 1 --一時休戦 66957584 1 --インフェルニティガン -19613556 1 --大嵐 +06417578 1 --神の写し身との接触 +72405967 1 --王家の生け贄 81439173 1 --おろかな埋葬 -23701465 1 --原初の種 -83764718 1 --死者蘇生 +96729612 1 --儀式の準備 +67723438 1 --緊急テレポート +45305419 1 --継承の印 +17639150 1 --機殻の生贄 +95308449 1 --終焉のカウントダウン +74845897 1 --真炎の爆発 37520316 1 --精神操作 +87910978 1 --洗脳-ブレインコントロール 32807846 1 --増援 -27770341 1 --超再生能力 +54447022 1 --ソウル・チャージ 14087893 1 --月の書 -72892473 1 --手札抹殺 -67169062 1 --貪欲な壺 -94886282 1 --光の援軍 -75500286 1 --封印の黄金櫃 -53129443 1 --ブラック·ホール +81674782 1 --次元の裂け目 +79844764 1 --帝王の烈旋 +70368879 1 --成金ゴブリン +22842126 1 --汎神の帝王 +53208660 1 --ペンデュラム・コール 15854426 1 --霞の谷の神風 +77565204 1 --未来融合-フューチャー·フュージョン +58577036 1 --名推理 43040603 1 --モンスターゲート -01475311 1 --闇の誘惑 23171610 1 --リミッター解除 -62265044 1 --竜の渓谷 -41620959 1 --竜の霊廟 -27970830 1 --六武の門 +14733538 1 --竜呼相打つ 02295440 1 --ワン·フォー·ワン +09059700 1 --インフェルニティ・バリア +61740673 1 --王宮の勅命 84749824 1 --神の警告 -41420027 1 --神の宣告 -36468556 1 --停戦協定 -46652477 1 --転生の予言 -84968490 1 --針虫の巣窟 +94192409 1 --強制脱出装置 +53582587 1 --激流葬 +82732705 1 --スキルドレイン +73599290 1 --ソウルドレイン +29401950 1 --奈落の落とし穴 +83555666 1 --破壊輪 17078030 1 --光の護封壁 +30241314 1 --マクロコスモス 32723153 1 --マジカル·エクスプロージョン +54974237 1 --闇のデッキ破壊ウイルス #semi limit -91279700 2 --ヴェルズ·オピオン -79979666 2 --E·HERO バブルマン -24861088 2 --先史遺産ネブラ・ディスク 37742478 2 --オネスト 85087012 2 --カードガンナー +74311226 2 --海皇の竜騎隊 +72714461 2 --慧眼の魔術師 +78872731 2 --十二獣モルモラット 00423585 2 --召喚僧サモンプリースト -29981921 2 --真六武衆-シエン -25484449 2 --ゼンマイシャーク -65192027 2 --ダーク·アームド·ドラゴン -59509952 2 --大天使クリスティア -09411399 2 --D-HERO ディアボリックガイ -01315120 2 --TG ストライカー -98777036 2 --トラゴエディア -70583986 2 --氷結界の虎王ドゥローレン -92826944 2 --馬頭鬼 -10028593 2 --輪廻天狗 -48686504 2 --ローンファイア·ブロッサム -25377819 2 --召集の聖刻印 +59297550 2 --ゼンマイマジシャン +14943837 2 --デブリ·ドラゴン +28297833 2 --ネクロフェイス +71564252 2 --ライオウ +99330325 2 --妨げられた壊獣の眠り +94886282 2 --光の援軍 +53129443 2 --ブラック·ホール +62265044 2 --竜の渓谷 91623717 2 --連鎖爆撃 -08949584 2 --ヒーローアライブ -98494543 2 --魔法石の採掘 -60202749 2 --アビスフィアー 29843091 2 --おジャマトリオ -29401950 2 --奈落の落とし穴 +36468556 2 --停戦協定 -!2014.4 +!2016.8 TCG #forbidden +27279764 0 --アポクリフォート・キラー 20663556 0 --イレカエル -53797637 0 --炎征竜-バーナー 44910027 0 --ヴィクトリー・ドラゴン +20366274 0 --エルシャドール・ネフィリム +40044918 0 --E·HERO エアーマン +53804307 0 --焔征竜-ブラスター +68819554 0 --Emダメージ・ジャグラー +07563579 0 --Emヒグルミ +17330916 0 --EMモンキーボード 82301904 0 --混沌帝龍 -終焉の使者- -08131171 0 --キラー・スネーク +79106360 0 --カオスポッド +90411554 0 --巌征竜-レドックス +08903700 0 --儀式魔人リリーサー 26202165 0 --クリッター 78010363 0 --黒き森のウィッチ -67441435 0 --グローアップ·バルブ -07391448 0 --ゴヨウ·ガーディアン -40737112 0 --混沌の黒魔術師 34124316 0 --サイバーポッド -63519819 0 --サウザンド·アイズ·サクリファイス 21593977 0 --処刑人-マキュラ -27415516 0 --水征竜-ストリーム -31560081 0 --聖なる魔術師 -16923472 0 --ゼンマイハンター -91020571 0 --地征竜-リアクタン +81122844 0 --発条空母ゼンマイティ 56570271 0 --D-HERO ディスクガイ +69015963 0 --デビル·フランケン +18326736 0 --星守の騎士 プトレマイオス 33184167 0 --同族感染ウィルス -50321796 0 --氷結界の龍 ブリューナク +90307777 0 --影霊衣の術士 シュリット +54719828 0 --No.16 色の支配者ショック·ルーラー +26400609 0 --瀑征竜-タイダル 78706415 0 --ファイバーポッド 93369354 0 --フィッシュボーグ-ガンナー -89185742 0 --風征竜-ライトニング +50321796 0 --氷結界の龍 ブリューナク 34206604 0 --魔導サイエンティスト +33508719 0 --メタモルポット 96782886 0 --メンタルマスター 03078576 0 --八汰烏 +34086406 0 --ラヴァルバル·チェイン +89399912 0 --嵐征竜-テンペスト +46772449 0 --励輝士 ヴェルズビュート 14878871 0 --レスキューキャット 41482598 0 --悪夢の蜃気楼 44763025 0 --いたずら好きな双子悪魔 -29762407 0 --王家の神殿 +19613556 0 --大嵐 17375316 0 --押収 +35059553 0 --カイザーコロシアム 74191942 0 --苦渋の選択 42829885 0 --強引な番兵 45986603 0 --強奪 55144522 0 --強欲な壺 04031928 0 --心変わり -12580477 0 --サンダー·ボルト 23557835 0 --次元融合 +83764718 0 --死者蘇生 57953380 0 --生還の宝札 87910978 0 --洗脳-ブレインコントロール 60682203 0 --大寒波 +67616300 0 --チキンレース +48130397 0 --超融合 +67169062 0 --貪欲な壺 +27770341 0 --超再生能力 69243953 0 --蝶の短剣-エルマ +72892473 0 --手札抹殺 79571449 0 --天使の施し 42703248 0 --ハリケーン 18144506 0 --ハーピィの羽根帚 @@ -800,155 +15325,176 @@ 34906152 0 --マスドライバー 46448938 0 --魔導書の神判 77565204 0 --未来融合-フューチャー·フュージョン +27970830 0 --六武の門 46411259 0 --突然変異 +31222701 0 --揺れる眼差し 85602018 0 --遺言状 27174286 0 --異次元からの帰還 61740673 0 --王宮の勅命 93016201 0 --王宮の弾圧 -17484499 0 --現世と冥界の逆転 -57728570 0 --死のデッキ破壊ウイルス +41420027 0 --神の宣告 +57585212 0 --自爆スイッチ 03280747 0 --第六感 64697231 0 --ダスト·シュート -80604091 0 --血の代償 35316708 0 --刻の封印 -83555666 0 --破壊輪 +80604091 0 --血の代償 28566710 0 --ラストバトル! #limit +85103922 1 --アーティファクト-モラルタ 64034255 1 --A·ジェネクス·バードマン 45222299 1 --イビリチュア·ガストクラーケ +11877465 1 --イビリチュア·マインドオーガス +99177923 1 --インフェルニティ·デーモン 68184115 1 --甲虫装機 ダンセル 69207766 1 --甲虫装機 ホーネット -91279700 1 --ヴェルズ·オピオン -40044918 1 --E·HERO エアーマン -79979666 1 --E·HERO バブルマン -53804307 1 --焔征竜-ブラスター -74311226 1 --海皇の竜騎隊 +27552504 1 --永遠の淑女 ベアトリーチェ +40318957 1 --EMドクロバット・ジョーカー 72989439 1 --カオス·ソルジャー -開闢の使者- -90411554 1 --巌征竜-レドックス -29981921 1 --真六武衆-シエン -81122844 1 --発条空母ゼンマイティ -25484449 1 --ゼンマイシャーク +17412721 1 --旧神ノーデン +65518099 1 --クリフォート・ツール +72714461 1 --慧眼の魔術師 +55885348 1 --Kozmo Dark Destroyer +12580477 1 --サンダー·ボルト +78868119 1 --深海のディーヴァ +48063985 1 --聖霊獣騎 カンナホーク +65192027 1 --ダーク·アームド·ドラゴン 15341821 1 --ダンディライオン -01315120 1 --TG ストライカー 90953320 1 --TG ハイパー·ライブラリアン -69015963 1 --デビル·フランケン +96570609 1 --天帝アイテール 16226786 1 --深淵の暗殺者 -80117527 1 --No.11 ビッグ·アイ -28297833 1 --ネクロフェイス -26400609 1 --瀑征竜-タイダル +80344569 1 --N·グラン·モール +18239909 1 --爆竜剣士イグニスターP +57143342 1 --彼岸の悪鬼 ガトルホッグ +20758643 1 --彼岸の悪鬼 グラバースニッチ +70583986 1 --氷結界の虎王ドゥローレン 52687916 1 --氷結界の龍 トリシューラ 33396948 1 --封印されしエクゾディア 07902349 1 --封印されし者の左腕 70903634 1 --封印されし者の右腕 44519536 1 --封印されし者の左足 08124921 1 --封印されし者の右足 -50091196 1 --フォーミュラ·シンクロン -02009101 1 --BF-疾風のゲイル -22446869 1 --水精鱗-ディニクアビス -92826944 1 --馬頭鬼 -33508719 1 --メタモルポット -89399912 1 --嵐征竜-テンペスト -30929786 1 --立炎星-トウケイ +26674724 1 --ブリューナクの影霊衣 +10802915 1 --魔界発現世行きデスガイド +31178212 1 --マジェスペクター・ユニコーン +41386308 1 --マスマティシャン +89463537 1 --ユニコールの影霊衣 +92746535 1 --竜剣士ラスターP +85138716 1 --レスキューラビット 88264978 1 --レッドアイズ·ダークネスメタルドラゴン 48976825 1 --異次元からの埋葬 33782437 1 --一時休戦 66957584 1 --インフェルニティガン -23701465 1 --原初の種 +06417578 1 --神の写し身との接触 +72405967 1 --王家の生け贄 81439173 1 --おろかな埋葬 -19613556 1 --大嵐 -83764718 1 --死者蘇生 +96729612 1 --儀式の準備 +67723438 1 --緊急テレポート +45305419 1 --継承の印 +17639150 1 --機殻の生贄 +95308449 1 --終焉のカウントダウン +74845897 1 --真炎の爆発 37520316 1 --精神操作 32807846 1 --増援 -67169062 1 --貪欲な壺 -27770341 1 --超再生能力 +54447022 1 --ソウル・チャージ 14087893 1 --月の書 -72892473 1 --手札抹殺 -94886282 1 --光の援軍 -75500286 1 --封印の黄金櫃 -53129443 1 --ブラック·ホール +81674782 1 --次元の裂け目 +79844764 1 --帝王の烈旋 +70368879 1 --成金ゴブリン +22842126 1 --汎神の帝王 +53208660 1 --ペンデュラム・コール 15854426 1 --霞の谷の神風 +58577036 1 --名推理 43040603 1 --モンスターゲート -01475311 1 --闇の誘惑 23171610 1 --リミッター解除 -27970830 1 --六武の門 +14733538 1 --竜呼相打つ 02295440 1 --ワン·フォー·ワン -60202749 1 --アビスフィアー +09059700 1 --インフェルニティ・バリア +05851097 1 --虚無空間 84749824 1 --神の警告 -41420027 1 --神の宣告 -36468556 1 --停戦協定 -46652477 1 --転生の予言 +94192409 1 --強制脱出装置 +53582587 1 --激流葬 +82732705 1 --スキルドレイン +73599290 1 --ソウルドレイン +29401950 1 --奈落の落とし穴 +83555666 1 --破壊輪 17078030 1 --光の護封壁 +30241314 1 --マクロコスモス 32723153 1 --マジカル·エクスプロージョン +54974237 1 --闇のデッキ破壊ウイルス #semi limit 37742478 2 --オネスト 85087012 2 --カードガンナー -09596126 2 --カオス·ソーサラー +74311226 2 --海皇の竜騎隊 00423585 2 --召喚僧サモンプリースト -33420078 2 --ゾンビキャリア -65192027 2 --ダーク·アームド·ドラゴン -59509952 2 --大天使クリスティア -09411399 2 --D-HERO ディアボリックガイ -98777036 2 --トラゴエディア -70583986 2 --氷結界の虎王ドゥローレン -85138716 2 --レスキューラビット -10028593 2 --輪廻天狗 -48686504 2 --ローンファイア·ブロッサム -57103969 2 --炎舞-「天璣」 -72405967 2 --王家の生け贄 -91351370 2 --黒い旋風 -45725480 2 --七星の宝刀 -25377819 2 --召集の聖刻印 -08949584 2 --ヒーローアライブ -98494543 2 --魔法石の採掘 +59297550 2 --ゼンマイマジシャン +23434538 2 --増殖するG +14943837 2 --デブリ·ドラゴン +28297833 2 --ネクロフェイス +71564252 2 --ライオウ +94886282 2 --光の援軍 +53129443 2 --ブラック·ホール +62265044 2 --竜の渓谷 91623717 2 --連鎖爆撃 29843091 2 --おジャマトリオ -29401950 2 --奈落の落とし穴 +36468556 2 --停戦協定 -!2014.2 +!2016.4 TCG #forbidden +27279764 0 --アポクリフォート・キラー 20663556 0 --イレカエル -53797637 0 --炎征竜-バーナー +40044918 0 --E·HERO エアーマン +20366274 0 --エルシャドール・ネフィリム +53804307 0 --焔征竜-ブラスター +68819554 0 --Emダメージ・ジャグラー +07563579 0 --Emヒグルミ 44910027 0 --ヴィクトリー・ドラゴン 82301904 0 --混沌帝龍 -終焉の使者- -08131171 0 --キラー・スネーク +79106360 0 --カオスポッド +90411554 0 --巌征竜-レドックス +08903700 0 --儀式魔人リリーサー 26202165 0 --クリッター 78010363 0 --黒き森のウィッチ -67441435 0 --グローアップ·バルブ -07391448 0 --ゴヨウ·ガーディアン -40737112 0 --混沌の黒魔術師 -34124316 0 --サイバーポッド -63519819 0 --サウザンド·アイズ·サクリファイス -81122844 0 --発条空母ゼンマイティ -21593977 0 --処刑人-マキュラ -27415516 0 --水征竜-ストリーム -31560081 0 --聖なる魔術師 -32646477 0 --ダーク·ダイブ·ボンバー -91020571 0 --地征竜-リアクタン +34124316 0 --サイバーポッド +81122844 0 --発条空母ゼンマイティ +21593977 0 --処刑人-マキュラ 56570271 0 --D-HERO ディスクガイ +18326736 0 --星守の騎士 プトレマイオス +69015963 0 --デビル·フランケン 33184167 0 --同族感染ウィルス +54719828 0 --No.16 色の支配者ショック·ルーラー +90307777 0 --影霊衣の術士 シュリット +26400609 0 --瀑征竜-タイダル 50321796 0 --氷結界の龍 ブリューナク 78706415 0 --ファイバーポッド 93369354 0 --フィッシュボーグ-ガンナー -89185742 0 --風征竜-ライトニング 34206604 0 --魔導サイエンティスト +33508719 0 --メタモルポット 96782886 0 --メンタルマスター 03078576 0 --八汰烏 +89399912 0 --嵐征竜-テンペスト +34086406 0 --ラヴァルバル·チェイン +46772449 0 --励輝士 ヴェルズビュート 14878871 0 --レスキューキャット 41482598 0 --悪夢の蜃気楼 44763025 0 --いたずら好きな双子悪魔 -29762407 0 --王家の神殿 +19613556 0 --大嵐 17375316 0 --押収 74191942 0 --苦渋の選択 42829885 0 --強引な番兵 45986603 0 --強奪 55144522 0 --強欲な壺 04031928 0 --心変わり -12580477 0 --サンダー·ボルト 23557835 0 --次元融合 +83764718 0 --死者蘇生 57953380 0 --生還の宝札 87910978 0 --洗脳-ブレインコントロール 60682203 0 --大寒波 +67616300 0 --チキンレース +48130397 0 --超融合 +67169062 0 --貪欲な壺 +27770341 0 --超再生能力 69243953 0 --蝶の短剣-エルマ +72892473 0 --手札抹殺 79571449 0 --天使の施し 42703248 0 --ハリケーン 18144506 0 --ハーピィの羽根帚 @@ -956,157 +15502,170 @@ 34906152 0 --マスドライバー 46448938 0 --魔導書の神判 77565204 0 --未来融合-フューチャー·フュージョン +27970830 0 --六武の門 46411259 0 --突然変異 +31222701 0 --揺れる眼差し 85602018 0 --遺言状 27174286 0 --異次元からの帰還 61740673 0 --王宮の勅命 93016201 0 --王宮の弾圧 -17484499 0 --現世と冥界の逆転 -57728570 0 --死のデッキ破壊ウイルス +41420027 0 --神の宣告 +57585212 0 --自爆スイッチ 03280747 0 --第六感 64697231 0 --ダスト·シュート 35316708 0 --刻の封印 -83555666 0 --破壊輪 +80604091 0 --血の代償 28566710 0 --ラストバトル! #limit +85103922 1 --アーティファクト-モラルタ 64034255 1 --A·ジェネクス·バードマン 45222299 1 --イビリチュア·ガストクラーケ +11877465 1 --イビリチュア·マインドオーガス +99177923 1 --インフェルニティ·デーモン 68184115 1 --甲虫装機 ダンセル 69207766 1 --甲虫装機 ホーネット -91279700 1 --ヴェルズ·オピオン -40044918 1 --E·HERO エアーマン -79979666 1 --E·HERO バブルマン -74311226 1 --海皇の竜騎隊 +40318957 1 --EMドクロバット・ジョーカー +17330916 1 --EMモンキーボード 72989439 1 --カオス·ソルジャー -開闢の使者- -29981921 1 --真六武衆-シエン -25484449 1 --ゼンマイシャーク +17412721 1 --旧神ノーデン +65518099 1 --クリフォート・ツール +72714461 1 --慧眼の魔術師 +63519819 1 --サウザンド·アイズ·サクリファイス +12580477 1 --サンダー·ボルト +78868119 1 --深海のディーヴァ +48063985 1 --聖霊獣騎 カンナホーク +59297550 1 --ゼンマイマジシャン 65192027 1 --ダーク·アームド·ドラゴン 15341821 1 --ダンディライオン -01315120 1 --TG ストライカー 90953320 1 --TG ハイパー·ライブラリアン -69015963 1 --デビル·フランケン 16226786 1 --深淵の暗殺者 -80117527 1 --No.11 ビッグ·アイ -28297833 1 --ネクロフェイス +80344569 1 --N·グラン·モール +18239909 1 --爆竜剣士イグニスターP +20758643 1 --彼岸の悪鬼 グラバースニッチ +70583986 1 --氷結界の虎王ドゥローレン 52687916 1 --氷結界の龍 トリシューラ 33396948 1 --封印されしエクゾディア 07902349 1 --封印されし者の左腕 70903634 1 --封印されし者の右腕 44519536 1 --封印されし者の左足 08124921 1 --封印されし者の右足 -50091196 1 --フォーミュラ·シンクロン -02009101 1 --BF-疾風のゲイル -22446869 1 --水精鱗-ディニクアビス -92826944 1 --馬頭鬼 -33508719 1 --メタモルポット -30929786 1 --立炎星-トウケイ +26674724 1 --ブリューナクの影霊衣 +10802915 1 --魔界発現世行きデスガイド +41386308 1 --マスマティシャン +89463537 1 --ユニコールの影霊衣 +92746535 1 --竜剣士ラスターP +71564252 1 --ライオウ +85138716 1 --レスキューラビット 88264978 1 --レッドアイズ·ダークネスメタルドラゴン 48976825 1 --異次元からの埋葬 33782437 1 --一時休戦 66957584 1 --インフェルニティガン -23701465 1 --原初の種 +06417578 1 --神の写し身との接触 +72405967 1 --王家の生け贄 81439173 1 --おろかな埋葬 -19613556 1 --大嵐 -83764718 1 --死者蘇生 -45725480 1 --七星の宝刀 +96729612 1 --儀式の準備 +45305419 1 --継承の印 +17639150 1 --機殻の生贄 +95308449 1 --終焉のカウントダウン +74845897 1 --真炎の爆発 37520316 1 --精神操作 32807846 1 --増援 -67169062 1 --貪欲な壺 -27770341 1 --超再生能力 +54447022 1 --ソウル・チャージ 14087893 1 --月の書 -72892473 1 --手札抹殺 -94886282 1 --光の援軍 +81674782 1 --次元の裂け目 +70368879 1 --成金ゴブリン 75500286 1 --封印の黄金櫃 -53129443 1 --ブラック·ホール 15854426 1 --霞の谷の神風 +58577036 1 --名推理 43040603 1 --モンスターゲート -01475311 1 --闇の誘惑 23171610 1 --リミッター解除 -27970830 1 --六武の門 +14733538 1 --竜呼相打つ 02295440 1 --ワン·フォー·ワン -60202749 1 --アビスフィアー +09059700 1 --インフェルニティ・バリア +05851097 1 --虚無空間 84749824 1 --神の警告 -41420027 1 --神の宣告 -80604091 1 --血の代償 -36468556 1 --停戦協定 -46652477 1 --転生の予言 +94192409 1 --強制脱出装置 +53582587 1 --激流葬 +82732705 1 --スキルドレイン +73599290 1 --ソウルドレイン +29401950 1 --奈落の落とし穴 +83555666 1 --破壊輪 17078030 1 --光の護封壁 +30241314 1 --マクロコスモス 32723153 1 --マジカル·エクスプロージョン +54974237 1 --闇のデッキ破壊ウイルス #semi limit -53804307 2 --焔征竜-ブラスター 37742478 2 --オネスト 85087012 2 --カードガンナー -09596126 2 --カオス·ソーサラー -90411554 2 --巌征竜-レドックス +74311226 2 --海皇の竜騎隊 00423585 2 --召喚僧サモンプリースト -33420078 2 --ゾンビキャリア -59509952 2 --大天使クリスティア -09411399 2 --D-HERO ディアボリックガイ -98777036 2 --トラゴエディア -26400609 2 --瀑征竜-タイダル -70583986 2 --氷結界の虎王ドゥローレン -89399912 2 --嵐征竜-テンペスト -85138716 2 --レスキューラビット -10028593 2 --輪廻天狗 -48686504 2 --ローンファイア·ブロッサム -10802915 2 --魔界発現世行きデスガイド -57103969 2 --炎舞-「天璣」 -72405967 2 --王家の生け贄 -91351370 2 --黒い旋風 -25377819 2 --召集の聖刻印 -08949584 2 --ヒーローアライブ -98494543 2 --魔法石の採掘 +14943837 2 --デブリ·ドラゴン +57143342 2 --彼岸の悪鬼 ガトルホッグ +28297833 2 --ネクロフェイス +67723438 2 --緊急テレポート +94886282 2 --光の援軍 +53129443 2 --ブラック·ホール +62265044 2 --竜の渓谷 +01475311 2 --闇の誘惑 91623717 2 --連鎖爆撃 29843091 2 --おジャマトリオ -53582587 2 --激流葬 -29401950 2 --奈落の落とし穴 +36468556 2 --停戦協定 -!2013.9 +!2015.11 TCG #forbidden +27279764 0 --アポクリフォート・キラー 20663556 0 --イレカエル -53797637 0 --炎征竜-バーナー +40044918 0 --E·HERO エアーマン +20366274 0 --エルシャドール・ネフィリム +53804307 0 --焔征竜-ブラスター 44910027 0 --ヴィクトリー・ドラゴン 82301904 0 --混沌帝龍 -終焉の使者- -08131171 0 --キラー・スネーク +79106360 0 --カオスポッド +90411554 0 --巌征竜-レドックス +08903700 0 --儀式魔人リリーサー 26202165 0 --クリッター 78010363 0 --黒き森のウィッチ -67441435 0 --グローアップ·バルブ -07391448 0 --ゴヨウ·ガーディアン 40737112 0 --混沌の黒魔術師 34124316 0 --サイバーポッド 63519819 0 --サウザンド·アイズ·サクリファイス 81122844 0 --発条空母ゼンマイティ 21593977 0 --処刑人-マキュラ -27415516 0 --水征竜-ストリーム -31560081 0 --聖なる魔術師 -32646477 0 --ダーク·ダイブ·ボンバー -91020571 0 --地征竜-リアクタン 56570271 0 --D-HERO ディスクガイ 69015963 0 --デビル·フランケン 33184167 0 --同族感染ウィルス +54719828 0 --No.16 色の支配者ショック·ルーラー +90307777 0 --影霊衣の術士 シュリット +26400609 0 --瀑征竜-タイダル 50321796 0 --氷結界の龍 ブリューナク 78706415 0 --ファイバーポッド 93369354 0 --フィッシュボーグ-ガンナー -89185742 0 --風征竜-ライトニング 34206604 0 --魔導サイエンティスト +33508719 0 --メタモルポット 96782886 0 --メンタルマスター 03078576 0 --八汰烏 +89399912 0 --嵐征竜-テンペスト +34086406 0 --ラヴァルバル·チェイン +46772449 0 --励輝士 ヴェルズビュート 14878871 0 --レスキューキャット 41482598 0 --悪夢の蜃気楼 44763025 0 --いたずら好きな双子悪魔 -29762407 0 --王家の神殿 +19613556 0 --大嵐 17375316 0 --押収 74191942 0 --苦渋の選択 42829885 0 --強引な番兵 45986603 0 --強奪 55144522 0 --強欲な壺 04031928 0 --心変わり -12580477 0 --サンダー·ボルト 23557835 0 --次元融合 +83764718 0 --死者蘇生 57953380 0 --生還の宝札 87910978 0 --洗脳-ブレインコントロール 60682203 0 --大寒波 +48130397 0 --超融合 +67169062 0 --貪欲な壺 +27770341 0 --超再生能力 69243953 0 --蝶の短剣-エルマ +72892473 0 --手札抹殺 79571449 0 --天使の施し 42703248 0 --ハリケーン 18144506 0 --ハーピィの羽根帚 @@ -1114,106 +15673,105 @@ 34906152 0 --マスドライバー 46448938 0 --魔導書の神判 77565204 0 --未来融合-フューチャー·フュージョン +27970830 0 --六武の門 46411259 0 --突然変異 85602018 0 --遺言状 +27174286 0 --異次元からの帰還 61740673 0 --王宮の勅命 93016201 0 --王宮の弾圧 -17484499 0 --現世と冥界の逆転 -57728570 0 --死のデッキ破壊ウイルス +41420027 0 --神の宣告 +57585212 0 --自爆スイッチ 03280747 0 --第六感 64697231 0 --ダスト·シュート 35316708 0 --刻の封印 -83555666 0 --破壊輪 +80604091 0 --血の代償 28566710 0 --ラストバトル! #limit +85103922 1 --アーティファクト-モラルタ 64034255 1 --A·ジェネクス·バードマン 45222299 1 --イビリチュア·ガストクラーケ +11877465 1 --イビリチュア·マインドオーガス +99177923 1 --インフェルニティ·デーモン 68184115 1 --甲虫装機 ダンセル 69207766 1 --甲虫装機 ホーネット -40044918 1 --E·HERO エアーマン -37742478 1 --オネスト 72989439 1 --カオス·ソルジャー -開闢の使者- -29981921 1 --真六武衆-シエン -25484449 1 --ゼンマイシャーク -33420078 1 --ゾンビキャリア +65518099 1 --クリフォート・ツール +12580477 1 --サンダー·ボルト +78868119 1 --深海のディーヴァ +48063985 1 --聖霊獣騎 カンナホーク +59297550 1 --ゼンマイマジシャン 65192027 1 --ダーク·アームド·ドラゴン 15341821 1 --ダンディライオン -01315120 1 --TG ストライカー 90953320 1 --TG ハイパー·ライブラリアン +14943837 1 --デブリ·ドラゴン 16226786 1 --深淵の暗殺者 -80117527 1 --No.11 ビッグ·アイ -28297833 1 --ネクロフェイス +80344569 1 --N·グラン·モール +20758643 1 --彼岸の悪鬼 グラバースニッチ +70583986 1 --氷結界の虎王ドゥローレン 52687916 1 --氷結界の龍 トリシューラ 33396948 1 --封印されしエクゾディア 07902349 1 --封印されし者の左腕 70903634 1 --封印されし者の右腕 44519536 1 --封印されし者の左足 08124921 1 --封印されし者の右足 -50091196 1 --フォーミュラ·シンクロン -02009101 1 --BF-疾風のゲイル -22446869 1 --水精鱗-ディニクアビス -92826944 1 --馬頭鬼 -33508719 1 --メタモルポット -30929786 1 --立炎星-トウケイ +26674724 1 --ブリューナクの影霊衣 +10802915 1 --魔界発現世行きデスガイド +41386308 1 --マスマティシャン +89463537 1 --ユニコールの影霊衣 +71564252 1 --ライオウ +85138716 1 --レスキューラビット 88264978 1 --レッドアイズ·ダークネスメタルドラゴン -48686504 1 --ローンファイア·ブロッサム 48976825 1 --異次元からの埋葬 33782437 1 --一時休戦 66957584 1 --インフェルニティガン -23701465 1 --原初の種 +06417578 1 --神の写し身との接触 +72405967 1 --王家の生け贄 81439173 1 --おろかな埋葬 -19613556 1 --大嵐 -83764718 1 --死者蘇生 +96729612 1 --儀式の準備 +45305419 1 --継承の印 +17639150 1 --機殻の生贄 +95308449 1 --終焉のカウントダウン +74845897 1 --真炎の爆発 37520316 1 --精神操作 32807846 1 --増援 -67169062 1 --貪欲な壺 -27770341 1 --超再生能力 +54447022 1 --ソウル・チャージ 14087893 1 --月の書 -72892473 1 --手札抹殺 -94886282 1 --光の援軍 -53129443 1 --ブラック·ホール +81674782 1 --次元の裂け目 +75500286 1 --封印の黄金櫃 15854426 1 --霞の谷の神風 43040603 1 --モンスターゲート 01475311 1 --闇の誘惑 23171610 1 --リミッター解除 -27970830 1 --六武の門 02295440 1 --ワン·フォー·ワン -60202749 1 --アビスフィアー -27174286 1 --異次元からの帰還 +09059700 1 --インフェルニティ・バリア +05851097 1 --虚無空間 84749824 1 --神の警告 -41420027 1 --神の宣告 -80604091 1 --血の代償 -36468556 1 --停戦協定 -46652477 1 --転生の予言 +94192409 1 --強制脱出装置 +53582587 1 --激流葬 +57728570 1 --死のデッキ破壊ウイルス +82732705 1 --スキルドレイン +73599290 1 --ソウルドレイン +29401950 1 --奈落の落とし穴 +83555666 1 --破壊輪 17078030 1 --光の護封壁 +30241314 1 --マクロコスモス 32723153 1 --マジカル·エクスプロージョン +54974237 1 --闇のデッキ破壊ウイルス #semi limit +37742478 2 --オネスト 85087012 2 --カードガンナー -09596126 2 --カオス·ソーサラー -41470137 2 --剣闘獣ベストロウリィ -91188343 2 --神秘の代行者 アース +74311226 2 --海皇の竜騎隊 00423585 2 --召喚僧サモンプリースト -59509952 2 --大天使クリスティア -14943837 2 --デブリ·ドラゴン -09411399 2 --D-HERO ディアボリックガイ 98777036 2 --トラゴエディア -80344569 2 --N·グラン·モール -70583986 2 --氷結界の虎王ドゥローレン -71564252 2 --ライオウ -85138716 2 --レスキューラビット -10028593 2 --輪廻天狗 -10802915 2 --魔界発現世行きデスガイド -44330098 2 --冥府の使者ゴーズ -57103969 2 --炎舞-「天璣」 -72405967 2 --王家の生け贄 -91351370 2 --黒い旋風 -25377819 2 --召集の聖刻印 -08949584 2 --ヒーローアライブ -98494543 2 --魔法石の採掘 +57143342 2 --彼岸の悪鬼 ガトルホッグ +28297833 2 --ネクロフェイス +46052429 2 --高等儀式術 +94886282 2 --光の援軍 +53129443 2 --ブラック·ホール +62265044 2 --竜の渓谷 91623717 2 --連鎖爆撃 29843091 2 --おジャマトリオ -53582587 2 --激流葬 -29401950 2 --奈落の落とし穴 +36468556 2 --停戦協定 !2015.7 TCG #forbidden diff --git a/ocgcore b/ocgcore new file mode 160000 index 0000000000..e5ce3178a7 --- /dev/null +++ b/ocgcore @@ -0,0 +1 @@ +Subproject commit e5ce3178a7d78d3d31de0ef40993cb83b34772ce diff --git a/ocgcore/card.cpp b/ocgcore/card.cpp deleted file mode 100644 index 4216b4eea7..0000000000 --- a/ocgcore/card.cpp +++ /dev/null @@ -1,2541 +0,0 @@ -/* - * card.cpp - * - * Created on: 2010-5-7 - * Author: Argon - */ - -#include "card.h" -#include "field.h" -#include "effect.h" -#include "duel.h" -#include "group.h" -#include "interpreter.h" -#include "ocgapi.h" -#include -#include -#include - -bool card_sort::operator()(void* const & p1, void* const & p2) const { - card* c1 = (card*)p1; - card* c2 = (card*)p2; - return c1->cardid < c2->cardid; -} -bool card::card_operation_sort(card* c1, card* c2) { - duel* pduel = c1->pduel; - int32 cp1 = c1->overlay_target ? c1->overlay_target->current.controler : c1->current.controler; - int32 cp2 = c2->overlay_target ? c2->overlay_target->current.controler : c2->current.controler; - if(cp1 != cp2) { - if(cp1 == PLAYER_NONE || cp2 == PLAYER_NONE) - return cp1 < cp2; - if(pduel->game_field->infos.turn_player == 0) - return cp1 < cp2; - else - return cp1 > cp2; - } - if(c1->current.location != c2->current.location) - return c1->current.location < c2->current.location; - if(c1->current.location & LOCATION_OVERLAY) { - if(c1->overlay_target->current.sequence != c2->overlay_target->current.sequence) - return c1->overlay_target->current.sequence < c2->overlay_target->current.sequence; - else return c1->current.sequence < c2->current.sequence; - } else { - if(c1->current.location & 0x71) - return c1->current.sequence > c2->current.sequence; - else - return c1->current.sequence < c2->current.sequence; - } -} -card::card(duel* pd) { - scrtype = 1; - ref_handle = 0; - pduel = pd; - owner = PLAYER_NONE; - operation_param = 0; - status = 0; - memset(&q_cache, 0xff, sizeof(query_cache)); - equiping_target = 0; - pre_equip_target = 0; - overlay_target = 0; - memset(¤t, 0, sizeof(card_state)); - memset(&previous, 0, sizeof(card_state)); - memset(&temp, 0xff, sizeof(card_state)); - unique_pos[0] = unique_pos[1] = 0; - spsummon_counter[0] = spsummon_counter[1] = 0; - spsummon_counter_rst[0] = spsummon_counter_rst[1] = 0; - unique_code = 0; - assume_type = 0; - assume_value = 0; - spsummon_code = 0; - current.controler = PLAYER_NONE; -} -card::~card() { - indexer.clear(); - relations.clear(); - counters.clear(); - equiping_cards.clear(); - material_cards.clear(); - single_effect.clear(); - field_effect.clear(); - equip_effect.clear(); - relate_effect.clear(); -} -uint32 card::get_infos(byte* buf, int32 query_flag, int32 use_cache) { - int32* p = (int32*)buf; - int32 tdata = 0; - p += 2; - if(query_flag & QUERY_CODE) *p++ = data.code; - if(query_flag & QUERY_POSITION) *p++ = get_info_location(); - if(!use_cache) { - if(query_flag & QUERY_ALIAS) q_cache.code = *p++ = get_code(); - if(query_flag & QUERY_TYPE) q_cache.type = *p++ = get_type(); - if(query_flag & QUERY_LEVEL) q_cache.level = *p++ = get_level(); - if(query_flag & QUERY_RANK) q_cache.rank = *p++ = get_rank(); - if(query_flag & QUERY_ATTRIBUTE) q_cache.attribute = *p++ = get_attribute(); - if(query_flag & QUERY_RACE) q_cache.race = *p++ = get_race(); - if(query_flag & QUERY_ATTACK) q_cache.attack = *p++ = get_attack(); - if(query_flag & QUERY_DEFENCE) q_cache.defence = *p++ = get_defence(); - if(query_flag & QUERY_BASE_ATTACK) q_cache.base_attack = *p++ = get_base_attack(); - if(query_flag & QUERY_BASE_DEFENCE) q_cache.base_defence = *p++ = get_base_defence(); - if(query_flag & QUERY_REASON) q_cache.reason = *p++ = current.reason; - } else { - if((query_flag & QUERY_ALIAS) && ((uint32)(tdata = get_code()) != q_cache.alias)) { - q_cache.alias = tdata; - *p++ = tdata; - } else query_flag &= ~QUERY_ALIAS; - if((query_flag & QUERY_TYPE) && ((uint32)(tdata = get_type()) != q_cache.type)) { - q_cache.type = tdata; - *p++ = tdata; - } else query_flag &= ~QUERY_TYPE; - if((query_flag & QUERY_LEVEL) && ((uint32)(tdata = get_level()) != q_cache.level)) { - q_cache.level = tdata; - *p++ = tdata; - } else query_flag &= ~QUERY_LEVEL; - if((query_flag & QUERY_RANK) && ((uint32)(tdata = get_rank()) != q_cache.rank)) { - q_cache.rank = tdata; - *p++ = tdata; - } else query_flag &= ~QUERY_RANK; - if((query_flag & QUERY_ATTRIBUTE) && ((uint32)(tdata = get_attribute()) != q_cache.attribute)) { - q_cache.attribute = tdata; - *p++ = tdata; - } else query_flag &= ~QUERY_ATTRIBUTE; - if((query_flag & QUERY_RACE) && ((uint32)(tdata = get_race()) != q_cache.race)) { - q_cache.race = tdata; - *p++ = tdata; - } else query_flag &= ~QUERY_RACE; - if((query_flag & QUERY_ATTACK) && ((tdata = get_attack()) != q_cache.attack)) { - q_cache.attack = tdata; - *p++ = tdata; - } else query_flag &= ~QUERY_ATTACK; - if((query_flag & QUERY_DEFENCE) && ((tdata = get_defence()) != q_cache.defence)) { - q_cache.defence = tdata; - *p++ = tdata; - } else query_flag &= ~QUERY_DEFENCE; - if((query_flag & QUERY_BASE_ATTACK) && ((tdata = get_base_attack()) != q_cache.base_attack)) { - q_cache.base_attack = tdata; - *p++ = tdata; - } else query_flag &= ~QUERY_BASE_ATTACK; - if((query_flag & QUERY_BASE_DEFENCE) && ((tdata = get_base_defence()) != q_cache.base_defence)) { - q_cache.base_defence = tdata; - *p++ = tdata; - } else query_flag &= ~QUERY_BASE_DEFENCE; - if((query_flag & QUERY_REASON) && ((uint32)(tdata = current.reason) != q_cache.reason)) { - q_cache.reason = tdata; - *p++ = tdata; - } else query_flag &= ~QUERY_REASON; - } - if(query_flag & QUERY_REASON_CARD) - *p++ = current.reason_card ? current.reason_card->get_info_location() : 0; - if(query_flag & QUERY_EQUIP_CARD) { - if(equiping_target) - *p++ = equiping_target->get_info_location(); - else - query_flag &= ~QUERY_EQUIP_CARD; - } - if(query_flag & QUERY_TARGET_CARD) { - *p++ = effect_target_cards.size(); - card_set::iterator cit; - for(cit = effect_target_cards.begin(); cit != effect_target_cards.end(); ++cit) - *p++ = (*cit)->get_info_location(); - } - if(query_flag & QUERY_OVERLAY_CARD) { - *p++ = xyz_materials.size(); - for(auto clit = xyz_materials.begin(); clit != xyz_materials.end(); ++clit) - *p++ = (*clit)->data.code; - } - if(query_flag & QUERY_COUNTERS) { - *p++ = counters.size(); - counter_map::iterator cmit; - for(cmit = counters.begin(); cmit != counters.end(); ++cmit) - *p++ = cmit->first + (cmit->second << 16); - } - if(query_flag & QUERY_OWNER) - *p++ = owner; - if(query_flag & QUERY_IS_DISABLED) { - tdata = (status & STATUS_DISABLED) ? 1 : 0; - if(!use_cache || (tdata != q_cache.is_disabled)) { - q_cache.is_disabled = tdata; - *p++ = tdata; - } else - query_flag &= ~QUERY_IS_DISABLED; - } - if(query_flag & QUERY_IS_PUBLIC) - *p++ = (status & STATUS_IS_PUBLIC) ? 1 : 0; - if(!use_cache) { - if(query_flag & QUERY_LSCALE) q_cache.lscale = *p++ = get_lscale(); - if(query_flag & QUERY_RSCALE) q_cache.rscale = *p++ = get_rscale(); - } else { - if((query_flag & QUERY_LSCALE) && ((uint32)(tdata = get_lscale()) != q_cache.lscale)) { - q_cache.lscale = tdata; - *p++ = tdata; - } else query_flag &= ~QUERY_LSCALE; - if((query_flag & QUERY_RSCALE) && ((uint32)(tdata = get_rscale()) != q_cache.rscale)) { - q_cache.rscale = tdata; - *p++ = tdata; - } else query_flag &= ~QUERY_RSCALE; - } - *(uint32*)buf = (byte*)p - buf; - *(uint32*)(buf + 4) = query_flag; - return (byte*)p - buf; -} -uint32 card::get_info_location() { - if(overlay_target) { - uint32 c = overlay_target->current.controler; - uint32 l = overlay_target->current.location | LOCATION_OVERLAY; - uint32 s = overlay_target->current.sequence; - uint32 ss = current.sequence; - return c + (l << 8) + (s << 16) + (ss << 24); - } else { - uint32 c = current.controler; - uint32 l = current.location; - uint32 s = current.sequence; - uint32 ss = current.position; - return c + (l << 8) + (s << 16) + (ss << 24); - } -} -// get the current code -uint32 card::get_code() { - if(assume_type == ASSUME_CODE) - return assume_value; - if(!(current.location & 0x1c)) { - if(data.alias) - return data.alias; - return data.code; - } - if (temp.code != 0xffffffff) - return temp.code; - effect_set effects; - uint32 code = data.code; - temp.code = data.code; - filter_effect(EFFECT_CHANGE_CODE, &effects); - if (effects.size()) - code = effects.get_last()->get_value(this); - temp.code = 0xffffffff; - if (code == data.code) { - if(data.alias && !is_affected_by_effect(EFFECT_ADD_CODE)) - code = data.alias; - } else { - card_data dat; - read_card(code, &dat); - if (dat.alias) - code = dat.alias; - } - return code; -} -// get the current second-code -uint32 card::get_another_code() { - if(is_affected_by_effect(EFFECT_CHANGE_CODE)) - return 0; - effect_set eset; - filter_effect(EFFECT_ADD_CODE, &eset); - if(!eset.size()) - return 0; - uint32 otcode = eset.get_last()->get_value(this); - if(get_code() != otcode) - return otcode; - return 0; -} -int32 card::is_set_card(uint32 set_code) { - uint32 code = get_code(); - uint64 setcode; - if (code == data.code) { - setcode = data.setcode; - } else { - card_data dat; - ::read_card(code, &dat); - setcode = dat.setcode; - } - uint32 settype = set_code & 0xfff; - uint32 setsubtype = set_code & 0xf000; - while(setcode) { - if ((setcode & 0xfff) == settype && (setcode & 0xf000 & setsubtype) == setsubtype) - return TRUE; - setcode = setcode >> 16; - } - //add set code - effect_set eset; - filter_effect(EFFECT_ADD_SETCODE, &eset); - for(int32 i = 0; i < eset.size(); ++i) { - uint32 value = eset[i]->get_value(this); - if ((value & 0xfff) == settype && (value & 0xf000 & setsubtype) == setsubtype) - return TRUE; - } - //another code - uint32 code2 = get_another_code(); - uint64 setcode2; - if (code2 != 0) { - card_data dat; - ::read_card(code2, &dat); - setcode2 = dat.setcode; - } else { - return FALSE; - } - while(setcode2) { - if ((setcode2 & 0xfff) == settype && (setcode2 & 0xf000 & setsubtype) == setsubtype) - return TRUE; - setcode2 = setcode2 >> 16; - } - return FALSE; -} -int32 card::is_pre_set_card(uint32 set_code) { - uint32 code = previous.code; - uint64 setcode; - if (code == data.code) { - setcode = data.setcode; - } else { - card_data dat; - ::read_card(code, &dat); - setcode = dat.setcode; - } - uint32 settype = set_code & 0xfff; - uint32 setsubtype = set_code & 0xf000; - while(setcode) { - if ((setcode & 0xfff) == settype && (setcode & 0xf000 & setsubtype) == setsubtype) - return TRUE; - setcode = setcode >> 16; - } - //add set code - effect_set eset; - filter_effect(EFFECT_ADD_SETCODE, &eset); - for(int32 i = 0; i < eset.size(); ++i) { - uint32 value = eset[i]->get_value(this); - if ((value & 0xfff) == settype && (value & 0xf000 & setsubtype) == setsubtype) - return TRUE; - } - //another code - uint32 code2 = previous.code2; - uint64 setcode2; - if (code2 != 0) { - card_data dat; - ::read_card(code2, &dat); - setcode2 = dat.setcode; - } else { - return FALSE; - } - while(setcode2) { - if ((setcode2 & 0xfff) == settype && (setcode2 & 0xf000 & setsubtype) == setsubtype) - return TRUE; - setcode2 = setcode2 >> 16; - } - return FALSE; -} -uint32 card::get_type() { - if(assume_type == ASSUME_TYPE) - return assume_value; - if(!(current.location & 0x1e)) - return data.type; - if((current.location == LOCATION_SZONE) && (current.sequence >= 6)) - return TYPE_PENDULUM + TYPE_SPELL; - if (temp.type != 0xffffffff) - return temp.type; - effect_set effects; - int32 type = data.type; - temp.type = data.type; - filter_effect(EFFECT_ADD_TYPE, &effects, FALSE); - filter_effect(EFFECT_REMOVE_TYPE, &effects, FALSE); - filter_effect(EFFECT_CHANGE_TYPE, &effects); - for (int32 i = 0; i < effects.size(); ++i) { - if (effects[i]->code == EFFECT_ADD_TYPE) - type |= effects[i]->get_value(this); - else if (effects[i]->code == EFFECT_REMOVE_TYPE) - type &= ~(effects[i]->get_value(this)); - else - type = effects[i]->get_value(this); - temp.type = type; - } - temp.type = 0xffffffff; - return type; -} -int32 card::get_base_attack(uint8 swap) { - if (current.location != LOCATION_MZONE && !(data.type & TYPE_MONSTER) && !(get_type() & TYPE_MONSTER)) - return 0; - if (current.location != LOCATION_MZONE || status & STATUS_SUMMONING) - return data.attack; - if (temp.base_attack != -1) - return temp.base_attack; - if(!swap && is_affected_by_effect(EFFECT_SWAP_BASE_AD)) - return get_base_defence(TRUE); - int32 batk = data.attack; - temp.base_attack = data.attack; - if(temp.base_attack < 0) - temp.base_attack = 0; - effect_set effects; - filter_effect(EFFECT_SET_BASE_ATTACK, &effects); - for (int32 i = 0; i < effects.size(); ++i) { - batk = effects[i]->get_value(this); - if (batk < 0) - batk = 0; - temp.base_attack = batk; - } - if (batk < 0) - batk = 0; - temp.base_attack = -1; - return batk; -} -int32 card::get_attack() { - if(assume_type == ASSUME_ATTACK) - return assume_value; - if (current.location != LOCATION_MZONE && !(data.type & TYPE_MONSTER) && !(get_type() & TYPE_MONSTER)) - return 0; - if (current.location != LOCATION_MZONE || status & STATUS_SUMMONING) - return data.attack; - if (temp.attack != -1) - return temp.attack; - int32 atk; - calc_attack_defence(&atk, 0); - return atk; -} -int32 card::get_base_defence(uint8 swap) { - if (current.location != LOCATION_MZONE && !(data.type & TYPE_MONSTER) && !(get_type() & TYPE_MONSTER)) - return 0; - if (current.location != LOCATION_MZONE || status & STATUS_SUMMONING) - return data.defence; - if (temp.base_defence != -1) - return temp.base_defence; - if(!swap && is_affected_by_effect(EFFECT_SWAP_BASE_AD)) - return get_base_attack(TRUE); - int32 bdef = data.defence; - temp.base_defence = data.defence; - if(temp.base_defence < 0) - temp.base_defence = 0; - effect_set effects; - filter_effect(EFFECT_SET_BASE_DEFENCE, &effects); - for (int32 i = 0; i < effects.size(); ++i) { - bdef = effects[i]->get_value(this); - if (bdef < 0) - bdef = 0; - temp.base_defence = bdef; - } - if (bdef < 0) - bdef = 0; - temp.base_defence = -1; - return bdef; -} -int32 card::get_defence() { - if(assume_type == ASSUME_DEFENCE) - return assume_value; - if (current.location != LOCATION_MZONE && !(data.type & TYPE_MONSTER) && !(get_type() & TYPE_MONSTER)) - return 0; - if (current.location != LOCATION_MZONE || status & STATUS_SUMMONING) - return data.defence; - if (temp.defence != -1) - return temp.defence; - int32 def; - calc_attack_defence(0, &def); - return def; -} -void card::calc_attack_defence(int32 *patk, int32 *pdef) { - uint32 base_atk = get_base_attack(); - uint32 base_def = get_base_defence(); - temp.base_attack = base_atk; - temp.base_defence = base_def; - int32 up_atk = 0, upc_atk = 0; - int32 up_def = 0, upc_def = 0; - effect_set eset; - filter_effect(EFFECT_SWAP_AD, &eset, FALSE); - int32 swap = eset.size(); - if(swap || patk) { - temp.attack = base_atk; - filter_effect(EFFECT_UPDATE_ATTACK, &eset, FALSE); - filter_effect(EFFECT_SET_ATTACK, &eset, FALSE); - filter_effect(EFFECT_SET_ATTACK_FINAL, &eset, FALSE); - } - if(swap || pdef) { - temp.defence = base_def; - filter_effect(EFFECT_UPDATE_DEFENCE, &eset, FALSE); - filter_effect(EFFECT_SET_DEFENCE, &eset, FALSE); - filter_effect(EFFECT_SET_DEFENCE_FINAL, &eset, FALSE); - } - eset.sort(); - int32 rev = FALSE; - if (is_affected_by_effect(EFFECT_REVERSE_UPDATE)) - rev = TRUE; - effect_set effects_atk, effects_def; - int32 swap_final = FALSE; - for (int32 i = 0; i < eset.size(); ++i) { - switch (eset[i]->code) { - case EFFECT_UPDATE_ATTACK: - if ((eset[i]->type & EFFECT_TYPE_SINGLE) && !(eset[i]->flag & EFFECT_FLAG_SINGLE_RANGE)) - up_atk += eset[i]->get_value(this); - else - upc_atk += eset[i]->get_value(this); - break; - case EFFECT_SET_ATTACK: - base_atk = eset[i]->get_value(this); - if (!(eset[i]->type & EFFECT_TYPE_SINGLE)) - up_atk = 0; - break; - case EFFECT_SET_ATTACK_FINAL: - if ((eset[i]->type & EFFECT_TYPE_SINGLE) && !(eset[i]->flag & EFFECT_FLAG_SINGLE_RANGE)) { - base_atk = eset[i]->get_value(this); - up_atk = 0; - upc_atk = 0; - } else - effects_atk.add_item(eset[i]); - break; - case EFFECT_UPDATE_DEFENCE: - if ((eset[i]->type & EFFECT_TYPE_SINGLE) && !(eset[i]->flag & EFFECT_FLAG_SINGLE_RANGE)) - up_def += eset[i]->get_value(this); - else - upc_def += eset[i]->get_value(this); - break; - case EFFECT_SET_DEFENCE: - base_def = eset[i]->get_value(this); - if (!(eset[i]->type & EFFECT_TYPE_SINGLE)) - up_def = 0; - break; - case EFFECT_SET_DEFENCE_FINAL: - if ((eset[i]->type & EFFECT_TYPE_SINGLE) && !(eset[i]->flag & EFFECT_FLAG_SINGLE_RANGE)) { - base_def = eset[i]->get_value(this); - up_def = 0; - upc_def = 0; - } else - effects_def.add_item(eset[i]); - break; - case EFFECT_SWAP_AD: - if ((eset[i]->type & EFFECT_TYPE_SINGLE) && !(eset[i]->flag & EFFECT_FLAG_SINGLE_RANGE)) { - int32 a = base_atk + up_atk + upc_atk; - int32 d = base_def + up_def + upc_def; - base_atk = d; - up_atk = 0; - upc_atk = 0; - base_def = a; - up_def = 0; - upc_def = 0; - } else - swap_final = !swap_final; - break; - } - if (!rev) { - if (temp.attack != -1) - temp.attack = base_atk + up_atk + upc_atk; - if (temp.defence != -1) - temp.defence = base_def + up_def + upc_def; - } else { - if (temp.attack != -1) - temp.attack = base_atk - up_atk - upc_atk; - if (temp.defence != -1) - temp.defence = base_def - up_def - upc_def; - } - } - if (swap_final) { - int32 atk = temp.attack; - int32 def = temp.defence; - temp.attack = def; - temp.defence = atk; - } - if (patk) { - for (int32 i = 0; i < effects_atk.size(); ++i) - temp.attack = effects_atk[i]->get_value(this); - int32 atk = temp.attack; - if (atk < 0) - atk = 0; - *patk = atk; - } - if (pdef) { - for (int32 i = 0; i < effects_def.size(); ++i) - temp.defence = effects_def[i]->get_value(this); - int32 def = temp.defence; - if (def < 0) - def = 0; - *pdef = def; - } - temp.base_attack = -1; - temp.attack = -1; - temp.base_defence = -1; - temp.defence = -1; -} -uint32 card::get_level() { - if((data.type & TYPE_XYZ) || (status & STATUS_NO_LEVEL) - || (current.location != LOCATION_MZONE && !(data.type & TYPE_MONSTER) && !(get_type() & TYPE_MONSTER))) - return 0; - if(assume_type == ASSUME_LEVEL) - return assume_value; - if(!(current.location & LOCATION_MZONE) && !(data.type & TYPE_MONSTER)) - return data.level; - if (temp.level != 0xffffffff) - return temp.level; - effect_set effects; - int32 level = data.level; - temp.level = level; - int32 up = 0, upc = 0; - filter_effect(EFFECT_UPDATE_LEVEL, &effects, FALSE); - filter_effect(EFFECT_CHANGE_LEVEL, &effects, FALSE); - filter_effect(EFFECT_CHANGE_LEVEL_FINAL, &effects); - for (int32 i = 0; i < effects.size(); ++i) { - switch (effects[i]->code) { - case EFFECT_UPDATE_LEVEL: - if ((effects[i]->type & EFFECT_TYPE_SINGLE) && !(effects[i]->flag & EFFECT_FLAG_SINGLE_RANGE)) - up += effects[i]->get_value(this); - else - upc += effects[i]->get_value(this); - break; - case EFFECT_CHANGE_LEVEL: - level = effects[i]->get_value(this); - up = 0; - break; - case EFFECT_CHANGE_LEVEL_FINAL: - level = effects[i]->get_value(this); - up = 0; - upc = 0; - break; - } - temp.level = level + up + upc; - } - level += up + upc; - if(level < 1 && (get_type() & TYPE_MONSTER)) - level = 1; - temp.level = 0xffffffff; - return level; -} -uint32 card::get_rank() { - if(!(data.type & TYPE_XYZ) || (status & STATUS_NO_LEVEL)) - return 0; - if(assume_type == ASSUME_RANK) - return assume_value; - if(!(current.location & LOCATION_MZONE)) - return data.level; - if (temp.level != 0xffffffff) - return temp.level; - effect_set effects; - int32 rank = data.level; - temp.level = rank; - int32 up = 0, upc = 0; - filter_effect(EFFECT_UPDATE_RANK, &effects, FALSE); - filter_effect(EFFECT_CHANGE_RANK, &effects, FALSE); - filter_effect(EFFECT_CHANGE_RANK_FINAL, &effects); - for (int32 i = 0; i < effects.size(); ++i) { - switch (effects[i]->code) { - case EFFECT_UPDATE_RANK: - if ((effects[i]->type & EFFECT_TYPE_SINGLE) && !(effects[i]->flag & EFFECT_FLAG_SINGLE_RANGE)) - up += effects[i]->get_value(this); - else - upc += effects[i]->get_value(this); - break; - case EFFECT_CHANGE_RANK: - rank = effects[i]->get_value(this); - up = 0; - break; - case EFFECT_CHANGE_RANK_FINAL: - rank = effects[i]->get_value(this); - up = 0; - upc = 0; - break; - } - temp.level = rank + up + upc; - } - rank += up + upc; - if(rank < 1 && (get_type() & TYPE_MONSTER)) - rank = 1; - temp.level = 0xffffffff; - return rank; -} -uint32 card::get_synchro_level(card* pcard) { - if((data.type & TYPE_XYZ) || (status & STATUS_NO_LEVEL)) - return 0; - uint32 lev; - effect_set eset; - filter_effect(EFFECT_SYNCHRO_LEVEL, &eset); - if(eset.size()) - lev = eset[0]->get_value(pcard); - else - lev = get_level(); - return lev; -} -uint32 card::get_ritual_level(card* pcard) { - if((data.type & TYPE_XYZ) || (status & STATUS_NO_LEVEL)) - return 0; - uint32 lev; - effect_set eset; - filter_effect(EFFECT_RITUAL_LEVEL, &eset); - if(eset.size()) - lev = eset[0]->get_value(pcard); - else - lev = get_level(); - return lev; -} -uint32 card::check_xyz_level(card* pcard, uint32 lv) { - if(status & STATUS_NO_LEVEL) - return 0; - uint32 lev; - effect_set eset; - filter_effect(EFFECT_XYZ_LEVEL, &eset); - if(!eset.size()) { - lev = get_level(); - if(lev == lv) - return lev; - return 0; - } - pduel->lua->add_param(this, PARAM_TYPE_CARD); - pduel->lua->add_param(pcard, PARAM_TYPE_CARD); - lev = eset[0]->get_value(2); - if(((lev & 0xfff) == lv)) - return lev & 0xffff; - if(((lev >> 16) & 0xfff) == lv) - return (lev >> 16) & 0xffff; - return 0; -} -uint32 card::get_attribute() { - if(assume_type == ASSUME_ATTRIBUTE) - return assume_value; - if(current.location != LOCATION_MZONE && !(data.type & TYPE_MONSTER) && !(get_type() & TYPE_MONSTER)) - return 0; - if(!(current.location & (LOCATION_MZONE)) && !(data.type & TYPE_MONSTER) && !(get_type() & TYPE_TRAPMONSTER)) - return data.attribute; - if (temp.attribute != 0xffffffff) - return temp.attribute; - effect_set effects; - effect_set effects2; - int32 attribute = data.attribute; - temp.attribute = data.attribute; - filter_effect(EFFECT_ADD_ATTRIBUTE, &effects, FALSE); - filter_effect(EFFECT_REMOVE_ATTRIBUTE, &effects); - filter_effect(EFFECT_CHANGE_ATTRIBUTE, &effects2); - for (int32 i = 0; i < effects.size(); ++i) { - if (effects[i]->code == EFFECT_ADD_ATTRIBUTE) - attribute |= effects[i]->get_value(this); - else - attribute &= ~(effects[i]->get_value(this)); - temp.attribute = attribute; - } - for (int32 i = 0; i < effects2.size(); ++i) { - attribute = effects2[i]->get_value(this); - temp.attribute = attribute; - } - temp.attribute = 0xffffffff; - return attribute; -} -uint32 card::get_race() { - if(assume_type == ASSUME_RACE) - return assume_value; - if(current.location != LOCATION_MZONE && !(data.type & TYPE_MONSTER) && !(get_type() & TYPE_MONSTER)) - return 0; - if(!(current.location & (LOCATION_MZONE)) && !(data.type & TYPE_MONSTER) && !(get_type() & TYPE_TRAPMONSTER)) - return data.race; - if (temp.race != 0xffffffff) - return temp.race; - effect_set effects; - effect_set effects2; - int32 race = data.race; - temp.race = data.race; - filter_effect(EFFECT_ADD_RACE, &effects, FALSE); - filter_effect(EFFECT_REMOVE_RACE, &effects); - filter_effect(EFFECT_CHANGE_RACE, &effects2); - for (int32 i = 0; i < effects.size(); ++i) { - if (effects[i]->code == EFFECT_ADD_RACE) - race |= effects[i]->get_value(this); - else - race &= ~(effects[i]->get_value(this)); - temp.race = race; - } - for (int32 i = 0; i < effects2.size(); ++i) { - race = effects2[i]->get_value(this); - temp.race = race; - } - temp.race = 0xffffffff; - return race; -} -uint32 card::get_lscale() { - if(!(current.location & LOCATION_SZONE)) - return data.lscale; - if (temp.lscale != 0xffffffff) - return temp.lscale; - effect_set effects; - int32 lscale = data.lscale; - temp.lscale = data.lscale; - int32 up = 0, upc = 0; - filter_effect(EFFECT_UPDATE_LSCALE, &effects, FALSE); - filter_effect(EFFECT_CHANGE_LSCALE, &effects); - for (int32 i = 0; i < effects.size(); ++i) { - if (effects[i]->code == EFFECT_UPDATE_LSCALE) { - if ((effects[i]->type & EFFECT_TYPE_SINGLE) && !(effects[i]->flag & EFFECT_FLAG_SINGLE_RANGE)) - up += effects[i]->get_value(this); - else - upc += effects[i]->get_value(this); - } else { - lscale = effects[i]->get_value(this); - up = 0; - } - temp.lscale = lscale; - } - lscale += up + upc; - temp.lscale = 0xffffffff; - return lscale; -} -uint32 card::get_rscale() { - if(!(current.location & LOCATION_SZONE)) - return data.rscale; - if (temp.rscale != 0xffffffff) - return temp.rscale; - effect_set effects; - int32 rscale = data.rscale; - temp.rscale = data.rscale; - int32 up = 0, upc = 0; - filter_effect(EFFECT_UPDATE_RSCALE, &effects, FALSE); - filter_effect(EFFECT_CHANGE_RSCALE, &effects); - for (int32 i = 0; i < effects.size(); ++i) { - if (effects[i]->code == EFFECT_UPDATE_RSCALE) { - if ((effects[i]->type & EFFECT_TYPE_SINGLE) && !(effects[i]->flag & EFFECT_FLAG_SINGLE_RANGE)) - up += effects[i]->get_value(this); - else - upc += effects[i]->get_value(this); - } else { - rscale = effects[i]->get_value(this); - up = 0; - } - temp.rscale = rscale; - } - rscale += up + upc; - temp.rscale = 0xffffffff; - return rscale; -} -int32 card::is_position(int32 pos) { - return current.position & pos; -} -void card::set_status(uint32 status, int32 enabled) { - if (enabled) - this->status |= status; - else - this->status &= ~status; -} -int32 card::get_status(uint32 status) { - return this->status & status; -} -int32 card::is_status(uint32 status) { - if ((this->status & status) == status) - return TRUE; - return FALSE; -} -void card::equip(card *target, uint32 send_msg) { - if (equiping_target) - return; - target->equiping_cards.insert(this); - equiping_target = target; - for (auto it = equip_effect.begin(); it != equip_effect.end(); ++it) { - if (it->second->is_disable_related()) - pduel->game_field->add_to_disable_check_list(equiping_target); - } - if(send_msg) { - pduel->write_buffer8(MSG_EQUIP); - pduel->write_buffer32(get_info_location()); - pduel->write_buffer32(target->get_info_location()); - } - return; -} -void card::unequip() { - if (!equiping_target) - return; - for (auto it = equip_effect.begin(); it != equip_effect.end(); ++it) { - if (it->second->is_disable_related()) - pduel->game_field->add_to_disable_check_list(equiping_target); - } - equiping_target->equiping_cards.erase(this); - pre_equip_target = equiping_target; - equiping_target = 0; - return; -} -int32 card::get_union_count() { - card_set::iterator cit; - int32 count = 0; - for(cit = equiping_cards.begin(); cit != equiping_cards.end(); ++cit) { - if(((*cit)->data.type & TYPE_UNION) && (*cit)->is_status(STATUS_UNION)) - count++; - } - return count; -} -void card::xyz_overlay(card_set* materials) { - if(materials->size() == 0) - return; - card_set des; - if(materials->size() == 1) { - card* pcard = *materials->begin(); - pcard->reset(RESET_LEAVE + RESET_OVERLAY, RESET_EVENT); - if(pcard->unique_code) - pduel->game_field->remove_unique_card(pcard); - if(pcard->equiping_target) - pcard->unequip(); - xyz_add(pcard, &des); - } else { - field::card_vector cv; - for(auto cit = materials->begin(); cit != materials->end(); ++cit) - cv.push_back(*cit); - std::sort(cv.begin(), cv.end(), card::card_operation_sort); - for(auto cvit = cv.begin(); cvit != cv.end(); ++cvit) { - (*cvit)->reset(RESET_LEAVE + RESET_OVERLAY, RESET_EVENT); - if((*cvit)->unique_code) - pduel->game_field->remove_unique_card(*cvit); - if((*cvit)->equiping_target) - (*cvit)->unequip(); - xyz_add(*cvit, &des); - } - } - if(des.size()) - pduel->game_field->destroy(&des, 0, REASON_LOST_TARGET + REASON_RULE, PLAYER_NONE); - else - pduel->game_field->adjust_instant(); -} -void card::xyz_add(card* mat, card_set* des) { - if(mat->overlay_target == this) - return; - pduel->write_buffer8(MSG_MOVE); - pduel->write_buffer32(mat->data.code); - if(mat->overlay_target) { - pduel->write_buffer8(mat->overlay_target->current.controler); - pduel->write_buffer8(mat->overlay_target->current.location | LOCATION_OVERLAY); - pduel->write_buffer8(mat->overlay_target->current.sequence); - pduel->write_buffer8(mat->current.sequence); - mat->overlay_target->xyz_remove(mat); - } else { - pduel->write_buffer8(mat->current.controler); - pduel->write_buffer8(mat->current.location); - pduel->write_buffer8(mat->current.sequence); - pduel->write_buffer8(mat->current.position); - mat->enable_field_effect(false); - pduel->game_field->remove_card(mat); - pduel->game_field->add_to_disable_check_list(mat); - } - pduel->write_buffer8(current.controler); - pduel->write_buffer8(current.location | LOCATION_OVERLAY); - pduel->write_buffer8(current.sequence); - pduel->write_buffer8(current.position); - pduel->write_buffer32(REASON_XYZ + REASON_MATERIAL); - xyz_materials.push_back(mat); - for(auto cit = mat->equiping_cards.begin(); cit != mat->equiping_cards.end();) { - auto rm = cit++; - des->insert(*rm); - (*rm)->unequip(); - } - mat->overlay_target = this; - mat->current.controler = PLAYER_NONE; - mat->current.location = LOCATION_OVERLAY; - mat->current.sequence = xyz_materials.size() - 1; - mat->current.reason = REASON_XYZ + REASON_MATERIAL; -} -void card::xyz_remove(card* mat) { - if(mat->overlay_target != this) - return; - xyz_materials.erase(xyz_materials.begin() + mat->current.sequence); - mat->previous.controler = mat->current.controler; - mat->previous.location = mat->current.location; - mat->previous.sequence = mat->current.sequence; - mat->current.controler = PLAYER_NONE; - mat->current.location = 0; - mat->current.sequence = 0; - mat->overlay_target = 0; - for(auto clit = xyz_materials.begin(); clit != xyz_materials.end(); ++clit) - (*clit)->current.sequence = clit - xyz_materials.begin(); -} -void card::apply_field_effect() { - if (current.controler == PLAYER_NONE) - return; - for (auto it = field_effect.begin(); it != field_effect.end(); ++it) { - if (it->second->in_range(current.location, current.sequence) || ((it->second->range & LOCATION_HAND) - && (it->second->type & EFFECT_TYPE_TRIGGER_O) && !(it->second->code & EVENT_PHASE))) { - pduel->game_field->add_effect(it->second); - } - } - if(unique_code && (current.location & LOCATION_ONFIELD)) - pduel->game_field->add_unique_card(this); - spsummon_counter[0] = spsummon_counter[1] = 0; - spsummon_counter_rst[0] = spsummon_counter_rst[1] = 0; -} -void card::cancel_field_effect() { - if (current.controler == PLAYER_NONE) - return; - for (auto it = field_effect.begin(); it != field_effect.end(); ++it) { - if (it->second->in_range(current.location, current.sequence) || ((it->second->range & LOCATION_HAND) - && (it->second->type & EFFECT_TYPE_TRIGGER_O) && !(it->second->code & EVENT_PHASE))) { - pduel->game_field->remove_effect(it->second); - } - } - if(unique_code && (current.location & LOCATION_ONFIELD)) - pduel->game_field->remove_unique_card(this); -} -void card::enable_field_effect(int32 enabled) { - if (current.location == 0) - return; - if ((enabled && get_status(STATUS_EFFECT_ENABLED)) || (!enabled && !get_status(STATUS_EFFECT_ENABLED))) - return; - refresh_disable_status(); - if (enabled) { - set_status(STATUS_EFFECT_ENABLED, TRUE); - effect_container::iterator it; - for (it = single_effect.begin(); it != single_effect.end(); ++it) { - if ((it->second->flag & EFFECT_FLAG_SINGLE_RANGE) && it->second->in_range(current.location, current.sequence)) - it->second->id = pduel->game_field->infos.field_id++; - } - for (it = field_effect.begin(); it != field_effect.end(); ++it) { - if (it->second->in_range(current.location, current.sequence)) - it->second->id = pduel->game_field->infos.field_id++; - } - if(current.location == LOCATION_SZONE) { - for (it = equip_effect.begin(); it != equip_effect.end(); ++it) - it->second->id = pduel->game_field->infos.field_id++; - } - if (get_status(STATUS_DISABLED)) - reset(RESET_DISABLE, RESET_EVENT); - } else - set_status(STATUS_EFFECT_ENABLED, FALSE); - filter_immune_effect(); - if (get_status(STATUS_DISABLED)) - return; - filter_disable_related_cards(); -} -int32 card::add_effect(effect* peffect) { - effect_container::iterator it, rm; - if (get_status(STATUS_COPYING_EFFECT) && (peffect->flag & EFFECT_FLAG_UNCOPYABLE)) { - pduel->uncopy.insert(peffect); - return 0; - } - if (indexer.find(peffect) != indexer.end()) - return 0; - card* check_target = this; - if (peffect->type & EFFECT_TYPE_SINGLE) { - if((peffect->code == EFFECT_SET_ATTACK || peffect->code == EFFECT_SET_BASE_ATTACK) && !(peffect->flag & EFFECT_FLAG_SINGLE_RANGE)) { - for(it = single_effect.begin(); it != single_effect.end();) { - rm = it++; - if((rm->second->code == EFFECT_SET_ATTACK || rm->second->code == EFFECT_SET_ATTACK_FINAL) - && !(rm->second->flag & EFFECT_FLAG_SINGLE_RANGE)) - remove_effect(rm->second); - } - } - if(peffect->code == EFFECT_SET_ATTACK_FINAL && !(peffect->flag & EFFECT_FLAG_SINGLE_RANGE)) { - for(it = single_effect.begin(); it != single_effect.end();) { - rm = it++; - if((rm->second->code == EFFECT_UPDATE_ATTACK || rm->second->code == EFFECT_SET_ATTACK - || rm->second->code == EFFECT_SET_ATTACK_FINAL) && !(rm->second->flag & EFFECT_FLAG_SINGLE_RANGE)) - remove_effect(rm->second); - } - } - if((peffect->code == EFFECT_SET_DEFENCE || peffect->code == EFFECT_SET_BASE_DEFENCE) && !(peffect->flag & EFFECT_FLAG_SINGLE_RANGE)) { - for(it = single_effect.begin(); it != single_effect.end();) { - rm = it++; - if((rm->second->code == EFFECT_SET_DEFENCE || rm->second->code == EFFECT_SET_DEFENCE_FINAL) - && !(rm->second->flag & EFFECT_FLAG_SINGLE_RANGE)) - remove_effect(rm->second); - } - } - if(peffect->code == EFFECT_SET_DEFENCE_FINAL && !(peffect->flag & EFFECT_FLAG_SINGLE_RANGE)) { - for(it = single_effect.begin(); it != single_effect.end();) { - rm = it++; - if((rm->second->code == EFFECT_UPDATE_DEFENCE || rm->second->code == EFFECT_SET_DEFENCE - || rm->second->code == EFFECT_SET_DEFENCE_FINAL) && !(rm->second->flag & EFFECT_FLAG_SINGLE_RANGE)) - remove_effect(rm->second); - } - } - it = single_effect.insert(make_pair(peffect->code, peffect)); - } else if (peffect->type & EFFECT_TYPE_FIELD) - it = field_effect.insert(make_pair(peffect->code, peffect)); - else if (peffect->type & EFFECT_TYPE_EQUIP) { - it = equip_effect.insert(make_pair(peffect->code, peffect)); - if (equiping_target) - check_target = equiping_target; - else - check_target = 0; - } else - return 0; - peffect->id = pduel->game_field->infos.field_id++; - peffect->card_type = data.type; - if(get_status(STATUS_INITIALIZING)) - peffect->flag |= EFFECT_FLAG_INITIAL; - if (get_status(STATUS_COPYING_EFFECT)) { - peffect->copy_id = pduel->game_field->infos.copy_id; - peffect->reset_flag |= pduel->game_field->core.copy_reset; - peffect->reset_count = (peffect->reset_count & 0xffffff00) | pduel->game_field->core.copy_reset_count; - } - if((peffect->flag & EFFECT_FLAG_COPY_INHERIT) && pduel->game_field->core.reason_effect - && (pduel->game_field->core.reason_effect->copy_id)) { - peffect->copy_id = pduel->game_field->core.reason_effect->copy_id; - peffect->reset_flag |= pduel->game_field->core.reason_effect->reset_flag; - if((peffect->reset_count & 0xff) > (pduel->game_field->core.reason_effect->reset_count & 0xff)) - peffect->reset_count = (peffect->reset_count & 0xffffff00) | (pduel->game_field->core.reason_effect->reset_count & 0xff); - } - indexer.insert(make_pair(peffect, it)); - peffect->handler = this; - if((peffect->type & 0x7e0) - || (pduel->game_field->core.reason_effect && (pduel->game_field->core.reason_effect->status & EFFECT_STATUS_ACTIVATED))) - peffect->status |= EFFECT_STATUS_ACTIVATED; - if (peffect->in_range(current.location, current.sequence) && (peffect->type & EFFECT_TYPE_FIELD)) - pduel->game_field->add_effect(peffect); - if (current.controler != PLAYER_NONE && check_target) { - if (peffect->is_disable_related()) - pduel->game_field->add_to_disable_check_list(check_target); - } - if(peffect->flag & EFFECT_FLAG_OATH) { - effect* reason_effect = pduel->game_field->core.reason_effect; - pduel->game_field->effects.oath.insert(make_pair(peffect, reason_effect)); - } - if(peffect->reset_flag & RESET_PHASE) { - pduel->game_field->effects.pheff.insert(peffect); - if((peffect->reset_count & 0xff) == 0) - peffect->reset_count += 1; - } - if(peffect->reset_flag & RESET_CHAIN) - pduel->game_field->effects.cheff.insert(peffect); - if(peffect->flag & EFFECT_FLAG_COUNT_LIMIT) - pduel->game_field->effects.rechargeable.insert(peffect); - if(peffect->flag & EFFECT_FLAG_CLIENT_HINT) { - pduel->write_buffer8(MSG_CARD_HINT); - pduel->write_buffer32(get_info_location()); - pduel->write_buffer8(CHINT_DESC_ADD); - pduel->write_buffer32(peffect->description); - } - if(peffect->type & EFFECT_TYPE_SINGLE && peffect->code == EFFECT_UPDATE_LEVEL && !(peffect->flag & EFFECT_FLAG_SINGLE_RANGE)) { - int32 val = peffect->get_value(this); - if(val > 0) { - pduel->game_field->raise_single_event(this, 0, EVENT_LEVEL_UP, peffect, 0, 0, 0, val); - pduel->game_field->process_single_event(); - } - } - return peffect->id; -} -void card::remove_effect(effect* peffect) { - auto it = indexer.find(peffect); - if (it == indexer.end()) - return; - remove_effect(peffect, it->second); -} -void card::remove_effect(effect* peffect, effect_container::iterator it) { - card* check_target = this; - if (peffect->type & EFFECT_TYPE_SINGLE) - single_effect.erase(it); - else if (peffect->type & EFFECT_TYPE_FIELD) { - check_target = 0; - if (peffect->in_range(current.location, current.sequence) && get_status(STATUS_EFFECT_ENABLED) && !get_status(STATUS_DISABLED)) { - if (peffect->is_disable_related()) - pduel->game_field->update_disable_check_list(peffect); - } - field_effect.erase(it); - if (peffect->in_range(current.location, current.sequence)) - pduel->game_field->remove_effect(peffect); - } else if (peffect->type & EFFECT_TYPE_EQUIP) { - equip_effect.erase(it); - if (equiping_target) - check_target = equiping_target; - else - check_target = 0; - } - if ((current.controler != PLAYER_NONE) && !get_status(STATUS_DISABLED) && check_target) { - if (peffect->is_disable_related()) - pduel->game_field->add_to_disable_check_list(check_target); - } - indexer.erase(peffect); - if(peffect->flag & EFFECT_FLAG_OATH) - pduel->game_field->effects.oath.erase(peffect); - if(peffect->reset_flag & RESET_PHASE) - pduel->game_field->effects.pheff.erase(peffect); - if(peffect->reset_flag & RESET_CHAIN) - pduel->game_field->effects.cheff.erase(peffect); - if(peffect->flag & EFFECT_FLAG_COUNT_LIMIT) - pduel->game_field->effects.rechargeable.erase(peffect); - if(((peffect->code & 0xf0000) == EFFECT_COUNTER_PERMIT) && (peffect->type & EFFECT_TYPE_SINGLE)) { - auto cmit = counters.find(peffect->code & 0xffff); - if(cmit != counters.end()) { - pduel->write_buffer8(MSG_REMOVE_COUNTER); - pduel->write_buffer16(cmit->first); - pduel->write_buffer8(current.controler); - pduel->write_buffer8(current.location); - pduel->write_buffer8(current.sequence); - pduel->write_buffer8(cmit->second); - counters.erase(cmit); - } - } - if(peffect->flag & EFFECT_FLAG_CLIENT_HINT) { - pduel->write_buffer8(MSG_CARD_HINT); - pduel->write_buffer32(get_info_location()); - pduel->write_buffer8(CHINT_DESC_REMOVE); - pduel->write_buffer32(peffect->description); - } - if(peffect->code == EFFECT_UNIQUE_CHECK) { - pduel->game_field->remove_unique_card(this); - unique_pos[0] = unique_pos[1] = 0; - unique_code = 0; - } - pduel->game_field->core.reseted_effects.insert(peffect); -} -int32 card::copy_effect(uint32 code, uint32 reset, uint32 count) { - card_data cdata; - read_card(code, &cdata); - if(cdata.type & TYPE_NORMAL) - return -1; - set_status(STATUS_COPYING_EFFECT, TRUE); - uint32 cr = pduel->game_field->core.copy_reset; - uint8 crc = pduel->game_field->core.copy_reset_count; - pduel->game_field->core.copy_reset = reset; - pduel->game_field->core.copy_reset_count = count; - pduel->lua->add_param(this, PARAM_TYPE_CARD); - pduel->lua->call_code_function(code, (char*) "initial_effect", 1, 0); - pduel->game_field->infos.copy_id++; - set_status(STATUS_COPYING_EFFECT, FALSE); - pduel->game_field->core.copy_reset = cr; - pduel->game_field->core.copy_reset_count = crc; - for(auto eit = pduel->uncopy.begin(); eit != pduel->uncopy.end(); ++eit) - pduel->delete_effect(*eit); - pduel->uncopy.clear(); - return pduel->game_field->infos.copy_id - 1; -} -// add EFFECT_SET_CONTROL -void card::reset(uint32 id, uint32 reset_type) { - effect* peffect; - if (reset_type != RESET_EVENT && reset_type != RESET_PHASE && reset_type != RESET_CODE && reset_type != RESET_COPY && reset_type != RESET_CARD) - return; - if (reset_type == RESET_EVENT) { - for (auto rit = relations.begin(); rit != relations.end();) { - auto rrm = rit++; - if (rrm->second & 0xffff0000 & id) - relations.erase(rrm); - } - if(id & 0x47c0000) - relate_effect.clear(); - if(id & 0x5fc0000) { - announced_cards.clear(); - attacked_cards.clear(); - announce_count = 0; - attacked_count = 0; - attack_all_target = TRUE; - } - if(id & 0x5fe0000) { - battled_cards.clear(); - reset_effect_count(); - auto pr = field_effect.equal_range(EFFECT_DISABLE_FIELD); - for(; pr.first != pr.second; ++pr.first) - pr.first->second->value = 0; - set_status(STATUS_UNION, FALSE); - } - if(id & 0x57e0000) { - counters.clear(); - for(auto cit = effect_target_owner.begin(); cit != effect_target_owner.end(); ++cit) - (*cit)->effect_target_cards.erase(this); - for(auto cit = effect_target_cards.begin(); cit != effect_target_cards.end(); ++cit) { - card* pcard = *cit; - pcard->effect_target_owner.erase(this); - for(auto it = pcard->single_effect.begin(); it != pcard->single_effect.end();) { - auto rm = it++; - peffect = rm->second; - if((peffect->owner == this) && (peffect->flag & EFFECT_FLAG_OWNER_RELATE)) - pcard->remove_effect(peffect, rm); - } - } - effect_target_owner.clear(); - effect_target_cards.clear(); - } - if(id & 0x3fe0000) { - auto pr = field_effect.equal_range(EFFECT_USE_EXTRA_MZONE); - for(; pr.first != pr.second; ++pr.first) - pr.first->second->value = pr.first->second->value & 0xffff; - pr = field_effect.equal_range(EFFECT_USE_EXTRA_SZONE); - for(; pr.first != pr.second; ++pr.first) - pr.first->second->value = pr.first->second->value & 0xffff; - } - if(id & RESET_DISABLE) { - for(auto cmit = counters.begin(); cmit != counters.end();) { - auto rm = cmit++; - if(rm->first & COUNTER_NEED_ENABLE) { - pduel->write_buffer8(MSG_REMOVE_COUNTER); - pduel->write_buffer16(rm->first); - pduel->write_buffer8(current.controler); - pduel->write_buffer8(current.location); - pduel->write_buffer8(current.sequence); - pduel->write_buffer8(rm->second); - counters.erase(rm); - } - } - } - if(id & RESET_TURN_SET) { - effect* peffect = check_control_effect(); - if(peffect) { - effect* new_effect = pduel->new_effect(); - new_effect->id = peffect->id; - new_effect->owner = this; - new_effect->handler = this; - new_effect->type = EFFECT_TYPE_SINGLE; - new_effect->code = EFFECT_SET_CONTROL; - new_effect->value = current.controler; - new_effect->flag = EFFECT_FLAG_CANNOT_DISABLE; - new_effect->reset_flag = RESET_EVENT | 0xec0000; - this->add_effect(new_effect); - } - } - } - for (auto i = indexer.begin(); i != indexer.end();) { - auto rm = i++; - peffect = rm->first; - auto it = rm->second; - if (peffect->reset(id, reset_type)) - remove_effect(peffect, it); - } -} -void card::reset_effect_count() { - for (auto i = indexer.begin(); i != indexer.end(); ++i) { - effect* peffect = i->first; - if (peffect->flag & EFFECT_FLAG_COUNT_LIMIT) - peffect->recharge(); - } -} -int32 card::refresh_disable_status() { - int32 pre_dis = is_status(STATUS_DISABLED); - filter_immune_effect(); - if (!is_affected_by_effect(EFFECT_CANNOT_DISABLE) && is_affected_by_effect(EFFECT_DISABLE)) - set_status(STATUS_DISABLED, TRUE); - else - set_status(STATUS_DISABLED, FALSE); - int32 cur_dis = is_status(STATUS_DISABLED); - if(pre_dis != cur_dis) - filter_immune_effect(); - return is_status(STATUS_DISABLED); -} -uint8 card::refresh_control_status() { - uint8 final = owner; - if(pduel->game_field->core.remove_brainwashing && is_affected_by_effect(EFFECT_REMOVE_BRAINWASHING)) - return final; - effect_set eset; - filter_effect(EFFECT_SET_CONTROL, &eset); - if(eset.size()) - final = (uint8) (eset.get_last()->get_value(this, 0)); - return final; -} -void card::count_turn(uint16 ct) { - turn_counter = ct; - pduel->write_buffer8(MSG_CARD_HINT); - pduel->write_buffer32(get_info_location()); - pduel->write_buffer8(CHINT_TURN); - pduel->write_buffer32(ct); -} -void card::create_relation(card* target, uint32 reset) { - if (relations.find(target) != relations.end()) - return; - relations[target] = reset; -} -void card::create_relation(effect* peffect) { - auto it = relate_effect.find(peffect); - if (it != relate_effect.end()) - ++it->second; - else - relate_effect[peffect] = 1; -} -int32 card::is_has_relation(card* target) { - if (relations.find(target) != relations.end()) - return TRUE; - return FALSE; -} -int32 card::is_has_relation(effect* peffect) { - if (relate_effect.find(peffect) != relate_effect.end()) - return TRUE; - return FALSE; -} -void card::release_relation(card* target) { - if (relations.find(target) == relations.end()) - return; - relations.erase(target); -} -void card::release_relation(effect* peffect) { - auto it = relate_effect.find(peffect); - if (it != relate_effect.end() && --it->second == 0) - relate_effect.erase(it); -} -int32 card::leave_field_redirect(uint32 reason) { - effect_set es; - uint32 redirect; - if(data.type & TYPE_TOKEN) - return 0; - filter_effect(EFFECT_LEAVE_FIELD_REDIRECT, &es); - for(int32 i = 0; i < es.size(); ++i) { - redirect = es[i]->get_value(this, 0); - if((redirect & LOCATION_HAND) && !is_affected_by_effect(EFFECT_CANNOT_TO_HAND) && pduel->game_field->is_player_can_send_to_hand(current.controler, this)) - return redirect; - else if((redirect & LOCATION_DECK) && !is_affected_by_effect(EFFECT_CANNOT_TO_DECK) && pduel->game_field->is_player_can_send_to_deck(current.controler, this)) - return redirect; - else if((redirect & LOCATION_REMOVED) && !is_affected_by_effect(EFFECT_CANNOT_REMOVE) && pduel->game_field->is_player_can_remove(current.controler, this)) - return redirect; - } - return 0; -} -int32 card::destination_redirect(uint8 destination, uint32 reason) { - effect_set es; - uint32 redirect; - if(data.type & TYPE_TOKEN) - return 0; - if(destination == LOCATION_HAND) - filter_effect(EFFECT_TO_HAND_REDIRECT, &es); - else if(destination == LOCATION_DECK) - filter_effect(EFFECT_TO_DECK_REDIRECT, &es); - else if(destination == LOCATION_GRAVE) - filter_effect(EFFECT_TO_GRAVE_REDIRECT, &es); - else if(destination == LOCATION_REMOVED) - filter_effect(EFFECT_REMOVE_REDIRECT, &es); - else return 0; - for(int32 i = 0; i < es.size(); ++i) { - redirect = es[i]->get_value(this, 0); - if((redirect & LOCATION_HAND) && !is_affected_by_effect(EFFECT_CANNOT_TO_HAND) && pduel->game_field->is_player_can_send_to_hand(current.controler, this)) - return redirect; - if((redirect & LOCATION_DECK) && !is_affected_by_effect(EFFECT_CANNOT_TO_DECK) && pduel->game_field->is_player_can_send_to_deck(current.controler, this)) - return redirect; - if((redirect & LOCATION_REMOVED) && !is_affected_by_effect(EFFECT_CANNOT_REMOVE) && pduel->game_field->is_player_can_remove(current.controler, this)) - return redirect; - } - return 0; -} -int32 card::add_counter(uint8 playerid, uint16 countertype, uint16 count) { - if(!is_can_add_counter(playerid, countertype, count)) - return FALSE; - counters[countertype] += count; - pduel->write_buffer8(MSG_ADD_COUNTER); - pduel->write_buffer16(countertype); - pduel->write_buffer8(current.controler); - pduel->write_buffer8(current.location); - pduel->write_buffer8(current.sequence); - pduel->write_buffer8(count); - return TRUE; -} -int32 card::remove_counter(uint16 countertype, uint16 count) { - counter_map::iterator cmit = counters.find(countertype); - if(cmit == counters.end()) - return FALSE; - if(cmit->second <= count) - counters.erase(cmit); - else cmit->second -= count; - pduel->write_buffer8(MSG_REMOVE_COUNTER); - pduel->write_buffer16(countertype); - pduel->write_buffer8(current.controler); - pduel->write_buffer8(current.location); - pduel->write_buffer8(current.sequence); - pduel->write_buffer8(count); - return TRUE; -} -int32 card::is_can_add_counter(uint8 playerid, uint16 countertype, uint16 count) { - effect_set eset; - if(!pduel->game_field->is_player_can_place_counter(playerid, this, countertype, count)) - return FALSE; - if(!(current.location & LOCATION_ONFIELD) || !is_position(POS_FACEUP)) - return FALSE; - if((countertype & COUNTER_NEED_ENABLE) && is_status(STATUS_DISABLED)) - return FALSE; - if((countertype & COUNTER_NEED_PERMIT) && !is_affected_by_effect(EFFECT_COUNTER_PERMIT + (countertype & 0xffff))) - return FALSE; - int32 limit = -1; - int32 cur = 0; - counter_map::iterator cmit = counters.find(countertype); - if(cmit != counters.end()) - cur = cmit->second; - filter_effect(EFFECT_COUNTER_LIMIT + countertype, &eset); - for(int32 i = 0; i < eset.size(); ++i) - limit = eset[i]->get_value(); - if(limit > 0 && (cur + count > limit)) - return FALSE; - return TRUE; -} -int32 card::get_counter(uint16 countertype) { - counter_map::iterator cmit = counters.find(countertype); - if(cmit == counters.end()) - return 0; - return cmit->second; -} -void card::set_material(card_set* materials) { - if(!materials) { - material_cards.clear(); - return; - } - material_cards = *materials; - for(auto cit = material_cards.begin(); cit != material_cards.end(); ++cit) - (*cit)->current.reason_card = this; - effect_set eset; - filter_effect(EFFECT_MATERIAL_CHECK, &eset); - for(int i = 0; i < eset.size(); ++i) { - eset[i]->get_value(this); - } -} -void card::add_card_target(card* pcard) { - effect_target_cards.insert(pcard); - pcard->effect_target_owner.insert(this); - pduel->write_buffer8(MSG_CARD_TARGET); - pduel->write_buffer32(get_info_location()); - pduel->write_buffer32(pcard->get_info_location()); -} -void card::cancel_card_target(card* pcard) { - auto cit = effect_target_cards.find(pcard); - if(cit != effect_target_cards.end()) { - effect_target_cards.erase(cit); - pcard->effect_target_owner.erase(this); - pduel->write_buffer8(MSG_CANCEL_TARGET); - pduel->write_buffer32(get_info_location()); - pduel->write_buffer32(pcard->get_info_location()); - } -} -void card::filter_effect(int32 code, effect_set* eset, uint8 sort) { - effect* peffect; - auto rg = single_effect.equal_range(code); - for (; rg.first != rg.second; ++rg.first) { - peffect = rg.first->second; - if (peffect->is_available() && (!(peffect->flag & EFFECT_FLAG_SINGLE_RANGE) || is_affect_by_effect(peffect))) - eset->add_item(peffect); - } - for (auto cit = equiping_cards.begin(); cit != equiping_cards.end(); ++cit) { - rg = (*cit)->equip_effect.equal_range(code); - for (; rg.first != rg.second; ++rg.first) { - peffect = rg.first->second; - if (peffect->is_available() && is_affect_by_effect(peffect)) - eset->add_item(peffect); - } - } - rg = pduel->game_field->effects.aura_effect.equal_range(code); - for (; rg.first != rg.second; ++rg.first) { - peffect = rg.first->second; - if (!(peffect->flag & EFFECT_FLAG_PLAYER_TARGET) && peffect->is_available() - && peffect->is_target(this) && is_affect_by_effect(peffect)) - eset->add_item(peffect); - } - if(sort) - eset->sort(); -} -void card::filter_single_effect(int32 code, effect_set* eset, uint8 sort) { - effect* peffect; - auto rg = single_effect.equal_range(code); - for (; rg.first != rg.second; ++rg.first) { - peffect = rg.first->second; - if (peffect->is_available() && !(peffect->flag & EFFECT_FLAG_SINGLE_RANGE)) - eset->add_item(peffect); - } - if(sort) - eset->sort(); -} -void card::filter_single_continuous_effect(int32 code, effect_set* eset, uint8 sort) { - auto rg = single_effect.equal_range(code); - for (; rg.first != rg.second; ++rg.first) - eset->add_item(rg.first->second); - for (auto cit = equiping_cards.begin(); cit != equiping_cards.end(); ++cit) { - rg = (*cit)->equip_effect.equal_range(code); - for (; rg.first != rg.second; ++rg.first) - eset->add_item(rg.first->second); - } - if(sort) - eset->sort(); -} -void card::filter_immune_effect() { - effect* peffect; - immune_effect.clear(); - auto rg = single_effect.equal_range(EFFECT_IMMUNE_EFFECT); - for (; rg.first != rg.second; ++rg.first) { - peffect = rg.first->second; - if (peffect->is_available()) - immune_effect.add_item(peffect); - } - for (auto cit = equiping_cards.begin(); cit != equiping_cards.end(); ++cit) { - rg = (*cit)->equip_effect.equal_range(EFFECT_IMMUNE_EFFECT); - for (; rg.first != rg.second; ++rg.first) { - peffect = rg.first->second; - if (peffect->is_available()) - immune_effect.add_item(peffect); - } - } - rg = pduel->game_field->effects.aura_effect.equal_range(EFFECT_IMMUNE_EFFECT); - for (; rg.first != rg.second; ++rg.first) { - peffect = rg.first->second; - if (peffect->is_target(this) && peffect->is_available()) - immune_effect.add_item(peffect); - } - immune_effect.sort(); -} -void card::filter_disable_related_cards() { - for (auto it = indexer.begin(); it != indexer.end(); ++it) { - effect* peffect = it->first; - if (peffect->is_disable_related()) { - if (peffect->type & EFFECT_TYPE_FIELD) - pduel->game_field->update_disable_check_list(peffect); - else if ((peffect->type & EFFECT_TYPE_EQUIP) && equiping_target) - pduel->game_field->add_to_disable_check_list(equiping_target); - } - } -} -int32 card::filter_summon_procedure(uint8 playerid, effect_set* peset, uint8 ignore_count, uint8 min_tribute) { - effect_set eset; - filter_effect(EFFECT_LIMIT_SUMMON_PROC, &eset); - if(eset.size()) { - for(int32 i = 0; i < eset.size(); ++i) { - if(eset[i]->check_count_limit(playerid) && is_summonable(eset[i], min_tribute) - && pduel->game_field->is_player_can_summon(eset[i]->get_value(this), playerid, this)) - peset->add_item(eset[i]); - } - if(peset->size()) - return -1; - return -2; - } - eset.clear(); - filter_effect(EFFECT_SUMMON_PROC, &eset); - for(int32 i = 0; i < eset.size(); ++i) { - if(eset[i]->check_count_limit(playerid) && is_summonable(eset[i], min_tribute) - && pduel->game_field->is_player_can_summon(eset[i]->get_value(this), playerid, this)) - peset->add_item(eset[i]); - } - if(!pduel->game_field->is_player_can_summon(SUMMON_TYPE_NORMAL, playerid, this)) - return FALSE; - int32 rcount = get_summon_tribute_count(); - int32 min = rcount & 0xffff, max = (rcount >> 16) & 0xffff; - if(min > 0 && !pduel->game_field->is_player_can_summon(SUMMON_TYPE_ADVANCE, playerid, this)) - return FALSE; - int32 fcount = pduel->game_field->get_useable_count(current.controler, LOCATION_MZONE, current.controler, LOCATION_REASON_TOFIELD); - if(max <= -fcount) - return FALSE; - if(min < -fcount + 1) - min = -fcount + 1; - if(max < min_tribute) - return FALSE; - if(min < min_tribute) - min = min_tribute; - if(min == 0) - return TRUE; - int32 m = pduel->game_field->get_summon_release_list(this, 0, 0, 0); - if(m >= min) - return TRUE; - return FALSE; -} -int32 card::filter_set_procedure(uint8 playerid, effect_set* peset, uint8 ignore_count, uint8 min_tribute) { - effect_set eset; - filter_effect(EFFECT_LIMIT_SET_PROC, &eset); - if(eset.size()) { - for(int32 i = 0; i < eset.size(); ++i) { - if(eset[i]->check_count_limit(playerid) && is_summonable(eset[i], min_tribute) - && pduel->game_field->is_player_can_mset(eset[i]->get_value(this), playerid, this)) - peset->add_item(eset[i]); - } - if(peset->size()) - return -1; - return -2; - } - eset.clear(); - filter_effect(EFFECT_SET_PROC, &eset); - for(int32 i = 0; i < eset.size(); ++i) { - if(eset[i]->check_count_limit(playerid) && is_summonable(eset[i], min_tribute) - && pduel->game_field->is_player_can_mset(eset[i]->get_value(this), playerid, this)) - peset->add_item(eset[i]); - } - if(!pduel->game_field->is_player_can_mset(SUMMON_TYPE_NORMAL, playerid, this)) - return FALSE; - int32 rcount = get_set_tribute_count(); - int32 min = rcount & 0xffff, max = (rcount >> 16) & 0xffff; - if(min > 0 && !pduel->game_field->is_player_can_mset(SUMMON_TYPE_ADVANCE, playerid, this)) - return FALSE; - int32 fcount = pduel->game_field->get_useable_count(current.controler, LOCATION_MZONE, current.controler, LOCATION_REASON_TOFIELD); - if(max <= -fcount) - return FALSE; - if(min < -fcount + 1) - min = -fcount + 1; - if(max < min_tribute) - return FALSE; - if(min < min_tribute) - min = min_tribute; - if(min == 0) - return TRUE; - int32 m = pduel->game_field->get_summon_release_list(this, 0, 0, 0); - if(m >= min) - return TRUE; - return FALSE; -} -void card::filter_spsummon_procedure(uint8 playerid, effect_set* peset, uint32 summon_type) { - auto pr = field_effect.equal_range(EFFECT_SPSUMMON_PROC); - uint8 toplayer; - uint8 topos; - effect* peffect; - for(; pr.first != pr.second; ++pr.first) { - peffect = pr.first->second; - if(peffect->flag & EFFECT_FLAG_SPSUM_PARAM) { - topos = peffect->s_range; - if(peffect->o_range == 0) - toplayer = playerid; - else - toplayer = 1 - playerid; - } else { - topos = POS_FACEUP; - toplayer = playerid; - } - if(peffect->is_available() && peffect->check_count_limit(playerid) && is_summonable(peffect) - && !pduel->game_field->check_unique_onfield(this, toplayer)) { - uint32 sumtype = peffect->get_value(this); - if((!summon_type || summon_type == sumtype) - && pduel->game_field->is_player_can_spsummon(peffect, sumtype, topos, playerid, toplayer, this)) - peset->add_item(peffect); - } - } -} -void card::filter_spsummon_procedure_g(uint8 playerid, effect_set* peset) { - auto pr = field_effect.equal_range(EFFECT_SPSUMMON_PROC_G); - for(; pr.first != pr.second; ++pr.first) { - effect* peffect = pr.first->second; - if(!peffect->is_available() || !peffect->check_count_limit(playerid)) - continue; - if(current.controler != playerid && !(peffect->flag & EFFECT_FLAG_BOTH_SIDE)) - continue; - effect* oreason = pduel->game_field->core.reason_effect; - uint8 op = pduel->game_field->core.reason_player; - pduel->game_field->core.reason_effect = peffect; - pduel->game_field->core.reason_player = this->current.controler; - pduel->game_field->save_lp_cost(); - pduel->lua->add_param(peffect, PARAM_TYPE_EFFECT); - pduel->lua->add_param(this, PARAM_TYPE_CARD); - if(pduel->lua->check_condition(peffect->condition, 2)) - peset->add_item(peffect); - pduel->game_field->restore_lp_cost(); - pduel->game_field->core.reason_effect = oreason; - pduel->game_field->core.reason_player = op; - } -} -effect* card::is_affected_by_effect(int32 code) { - effect* peffect; - auto rg = single_effect.equal_range(code); - for (; rg.first != rg.second; ++rg.first) { - peffect = rg.first->second; - if (peffect->is_available() && (!(peffect->flag & EFFECT_FLAG_SINGLE_RANGE) || is_affect_by_effect(peffect))) - return peffect; - } - for (auto cit = equiping_cards.begin(); cit != equiping_cards.end(); ++cit) { - rg = (*cit)->equip_effect.equal_range(code); - for (; rg.first != rg.second; ++rg.first) { - peffect = rg.first->second; - if (peffect->is_available() && is_affect_by_effect(peffect)) - return peffect; - } - } - rg = pduel->game_field->effects.aura_effect.equal_range(code); - for (; rg.first != rg.second; ++rg.first) { - peffect = rg.first->second; - if (!(peffect->flag & EFFECT_FLAG_PLAYER_TARGET) && peffect->is_available() - && peffect->is_target(this) && is_affect_by_effect(peffect)) - return peffect; - } - return 0; -} -effect* card::is_affected_by_effect(int32 code, card* target) { - effect* peffect; - auto rg = single_effect.equal_range(code); - for (; rg.first != rg.second; ++rg.first) { - peffect = rg.first->second; - if (peffect->is_available() && (!(peffect->flag & EFFECT_FLAG_SINGLE_RANGE) || is_affect_by_effect(peffect)) - && peffect->get_value(target)) - return peffect; - } - for (auto cit = equiping_cards.begin(); cit != equiping_cards.end(); ++cit) { - rg = (*cit)->equip_effect.equal_range(code); - for (; rg.first != rg.second; ++rg.first) { - peffect = rg.first->second; - if (peffect->is_available() && is_affect_by_effect(peffect) && peffect->get_value(target)) - return peffect; - } - } - rg = pduel->game_field->effects.aura_effect.equal_range(code); - for (; rg.first != rg.second; ++rg.first) { - peffect = rg.first->second; - if (!(peffect->flag & EFFECT_FLAG_PLAYER_TARGET) && peffect->is_available() - && peffect->is_target(this) && is_affect_by_effect(peffect) && peffect->get_value(target)) - return peffect; - } - return 0; -} -effect* card::check_control_effect() { - effect* ret_effect = 0; - for (auto cit = equiping_cards.begin(); cit != equiping_cards.end(); ++cit) { - auto rg = (*cit)->equip_effect.equal_range(EFFECT_SET_CONTROL); - for (; rg.first != rg.second; ++rg.first) { - effect* peffect = rg.first->second; - if(!ret_effect || peffect->id > ret_effect->id) - ret_effect = peffect; - } - } - auto rg = single_effect.equal_range(EFFECT_SET_CONTROL); - for (; rg.first != rg.second; ++rg.first) { - effect* peffect = rg.first->second; - if(!(peffect->flag & EFFECT_FLAG_SINGLE_RANGE)) - continue; - if(!ret_effect || peffect->id > ret_effect->id) - ret_effect = peffect; - } - return ret_effect; -} -int32 card::fusion_check(group* fusion_m, card* cg, int32 chkf) { - auto ecit = single_effect.find(EFFECT_FUSION_MATERIAL); - if(ecit == single_effect.end()) - return FALSE; - effect* peffect = ecit->second; - if(!peffect->condition) - return FALSE; - pduel->lua->add_param(peffect, PARAM_TYPE_EFFECT); - pduel->lua->add_param(fusion_m, PARAM_TYPE_GROUP); - pduel->lua->add_param(cg, PARAM_TYPE_CARD); - pduel->lua->add_param(chkf, PARAM_TYPE_INT); - return pduel->lua->check_condition(peffect->condition, 4); -} -void card::fusion_select(uint8 playerid, group* fusion_m, card* cg, int32 chkf) { - effect* peffect = 0; - auto ecit = single_effect.find(EFFECT_FUSION_MATERIAL); - if(ecit != single_effect.end()) - peffect = ecit->second; - pduel->game_field->add_process(PROCESSOR_SELECT_FUSION, 0, peffect, fusion_m, playerid + (chkf << 16), (ptr)cg); -} -int32 card::is_equipable(card* pcard) { - effect_set eset; - if(this == pcard || pcard->current.location != LOCATION_MZONE) - return FALSE; - filter_effect(EFFECT_EQUIP_LIMIT, &eset); - if(eset.size() == 0) - return FALSE; - for(int32 i = 0; i < eset.size(); ++i) - if(eset[i]->get_value(pcard)) - return TRUE; - return FALSE; -} -int32 card::is_summonable() { - if(!(data.type & TYPE_MONSTER)) - return FALSE; - return !is_affected_by_effect(EFFECT_UNSUMMONABLE_CARD); -} -int32 card::is_summonable(effect* peffect) { - effect* oreason = pduel->game_field->core.reason_effect; - uint8 op = pduel->game_field->core.reason_player; - pduel->game_field->core.reason_effect = peffect; - pduel->game_field->core.reason_player = this->current.controler; - pduel->game_field->save_lp_cost(); - pduel->lua->add_param(peffect, PARAM_TYPE_EFFECT); - pduel->lua->add_param(this, PARAM_TYPE_CARD); - uint32 result = FALSE; - if(pduel->game_field->core.limit_tuner || pduel->game_field->core.limit_syn) { - pduel->lua->add_param(pduel->game_field->core.limit_tuner, PARAM_TYPE_CARD); - pduel->lua->add_param(pduel->game_field->core.limit_syn, PARAM_TYPE_GROUP); - if(pduel->lua->check_condition(peffect->condition, 4)) - result = TRUE; - } else if(pduel->game_field->core.limit_xyz) { - pduel->lua->add_param(pduel->game_field->core.limit_xyz, PARAM_TYPE_GROUP); - if(pduel->lua->check_condition(peffect->condition, 3)) - result = TRUE; - } else { - if(pduel->lua->check_condition(peffect->condition, 2)) - result = TRUE; - } - pduel->game_field->restore_lp_cost(); - pduel->game_field->core.reason_effect = oreason; - pduel->game_field->core.reason_player = op; - return result; -} -int32 card::is_summonable(effect* peffect, uint8 min_tribute) { - effect* oreason = pduel->game_field->core.reason_effect; - uint8 op = pduel->game_field->core.reason_player; - pduel->game_field->core.reason_effect = peffect; - pduel->game_field->core.reason_player = this->current.controler; - pduel->game_field->save_lp_cost(); - uint32 result = FALSE; - pduel->lua->add_param(peffect, PARAM_TYPE_EFFECT); - pduel->lua->add_param(this, PARAM_TYPE_CARD); - pduel->lua->add_param(min_tribute, PARAM_TYPE_INT); - if(pduel->lua->check_condition(peffect->condition, 3)) - result = TRUE; - pduel->game_field->restore_lp_cost(); - pduel->game_field->core.reason_effect = oreason; - pduel->game_field->core.reason_player = op; - return result; -} -int32 card::is_can_be_summoned(uint8 playerid, uint8 ignore_count, effect* peffect, uint8 min_tribute) { - if(!is_summonable()) - return FALSE; - if(pduel->game_field->check_unique_onfield(this, playerid)) - return FALSE; - if(!ignore_count && (pduel->game_field->core.extra_summon[playerid] || !is_affected_by_effect(EFFECT_EXTRA_SUMMON_COUNT)) - && pduel->game_field->core.summon_count[playerid] >= pduel->game_field->get_summon_count_limit(playerid)) - return FALSE; - if(is_affected_by_effect(EFFECT_FORBIDDEN)) - return FALSE; - pduel->game_field->save_lp_cost(); - effect_set eset; - filter_effect(EFFECT_SUMMON_COST, &eset); - for(int32 i = 0; i < eset.size(); ++i) { - pduel->lua->add_param(eset[i], PARAM_TYPE_EFFECT); - pduel->lua->add_param(this, PARAM_TYPE_CARD); - pduel->lua->add_param(playerid, PARAM_TYPE_INT); - if(!pduel->lua->check_condition(eset[i]->cost, 3)) { - pduel->game_field->restore_lp_cost(); - return FALSE; - } - } - if(current.location == LOCATION_MZONE) { - if(is_position(POS_FACEDOWN) - || !is_affected_by_effect(EFFECT_DUAL_SUMMONABLE) - || is_affected_by_effect(EFFECT_DUAL_STATUS) - || !pduel->game_field->is_player_can_summon(SUMMON_TYPE_DUAL, playerid, this) - || is_affected_by_effect(EFFECT_CANNOT_SUMMON)) { - pduel->game_field->restore_lp_cost(); - return FALSE; - } - } else if(current.location == LOCATION_HAND) { - if(is_affected_by_effect(EFFECT_CANNOT_SUMMON)) { - pduel->game_field->restore_lp_cost(); - return FALSE; - } - if(!ignore_count && !pduel->game_field->core.extra_summon[playerid] - && pduel->game_field->core.summon_count[playerid] >= pduel->game_field->get_summon_count_limit(playerid)) { - effect* pextra = is_affected_by_effect(EFFECT_EXTRA_SUMMON_COUNT); - if(pextra && !(pextra->flag & EFFECT_FLAG_FUNC_VALUE)) { - int32 count = pextra->get_value(); - if(min_tribute < count) - min_tribute = count; - } - } - effect_set proc; - int32 res = filter_summon_procedure(playerid, &proc, ignore_count, min_tribute); - if((peffect && res < 0) || (!peffect && (!res || res == -2) && !proc.size()) - || (peffect && (proc.size() == 0) && !pduel->game_field->is_player_can_summon(peffect->get_value(), playerid, this))) { - pduel->game_field->restore_lp_cost(); - return FALSE; - } - } - pduel->game_field->restore_lp_cost(); - return TRUE; -} -int32 card::get_summon_tribute_count() { - int32 min = 0, max = 0; - int32 minul = 0, maxul = 0; - int32 level = get_level(); - if(level < 5) - return 0; - else if(level < 7) - min = max = 1; - else - min = max = 2; - effect_set eset; - filter_effect(EFFECT_DECREASE_TRIBUTE, &eset); - for(int32 i = 0; i < eset.size(); ++i) { - int32 dec = eset[i]->get_value(this); - if(!(eset[i]->flag & EFFECT_FLAG_COUNT_LIMIT)) { - if(minul < (dec & 0xffff)) - minul = dec & 0xffff; - if(maxul < (dec >> 16)) - maxul = dec >> 16; - } else if((eset[i]->reset_count & 0xf00) > 0) { - min -= dec & 0xffff; - max -= dec >> 16; - } - } - min -= minul; - max -= maxul; - if(min < 0) min = 0; - if(max < min) max = min; - return min + (max << 16); -} -int32 card::get_set_tribute_count() { - int32 min = 0, max = 0; - int32 level = get_level(); - if(level < 5) - return 0; - else if(level < 7) - min = max = 1; - else - min = max = 2; - effect_set eset; - filter_effect(EFFECT_DECREASE_TRIBUTE_SET, &eset); - if(eset.size()) { - int32 dec = eset.get_last()->get_value(this); - min -= dec & 0xffff; - max -= dec >> 16; - } - if(min < 0) min = 0; - if(max < min) max = min; - return min + (max << 16); -} -int32 card::is_can_be_flip_summoned(uint8 playerid) { - if(is_status(STATUS_SUMMON_TURN) || is_status(STATUS_FLIP_SUMMON_TURN) || is_status(STATUS_SPSUMMON_TURN) || is_status(STATUS_FORM_CHANGED)) - return FALSE; - if(announce_count > 0) - return FALSE; - if(current.location != LOCATION_MZONE) - return FALSE; - if(!(current.position & POS_FACEDOWN)) - return FALSE; - if(pduel->game_field->check_unique_onfield(this, playerid)) - return FALSE; - if(!pduel->game_field->is_player_can_flipsummon(playerid, this)) - return FALSE; - if(is_affected_by_effect(EFFECT_FORBIDDEN)) - return FALSE; - if(is_affected_by_effect(EFFECT_CANNOT_FLIP_SUMMON)) - return FALSE; - if(is_affected_by_effect(EFFECT_CANNOT_CHANGE_POSITION)) - return FALSE; - pduel->game_field->save_lp_cost(); - effect_set eset; - filter_effect(EFFECT_FLIPSUMMON_COST, &eset); - for(int32 i = 0; i < eset.size(); ++i) { - pduel->lua->add_param(eset[i], PARAM_TYPE_EFFECT); - pduel->lua->add_param(this, PARAM_TYPE_CARD); - pduel->lua->add_param(playerid, PARAM_TYPE_INT); - if(!pduel->lua->check_condition(eset[i]->cost, 3)) { - pduel->game_field->restore_lp_cost(); - return FALSE; - } - } - pduel->game_field->restore_lp_cost(); - return TRUE; -} -int32 card::is_special_summonable(uint8 playerid, uint32 summon_type) { - if(!(data.type & TYPE_MONSTER)) - return FALSE; - if(is_affected_by_effect(EFFECT_CANNOT_SPECIAL_SUMMON)) - return FALSE; - if(is_affected_by_effect(EFFECT_FORBIDDEN)) - return FALSE; - pduel->game_field->save_lp_cost(); - effect_set eset; - filter_effect(EFFECT_SPSUMMON_COST, &eset); - for(int32 i = 0; i < eset.size(); ++i) { - pduel->lua->add_param(eset[i], PARAM_TYPE_EFFECT); - pduel->lua->add_param(this, PARAM_TYPE_CARD); - pduel->lua->add_param(playerid, PARAM_TYPE_INT); - if(!pduel->lua->check_condition(eset[i]->cost, 3)) { - pduel->game_field->restore_lp_cost(); - return FALSE; - } - } - eset.clear(); - filter_spsummon_procedure(playerid, &eset, summon_type); - pduel->game_field->core.limit_tuner = 0; - pduel->game_field->core.limit_xyz = 0; - pduel->game_field->core.limit_syn = 0; - pduel->game_field->restore_lp_cost(); - return eset.size(); -} -int32 card::is_can_be_special_summoned(effect * reason_effect, uint32 sumtype, uint8 sumpos, uint8 sumplayer, uint8 toplayer, uint8 nocheck, uint8 nolimit) { - if(current.location == LOCATION_MZONE) - return FALSE; - if(current.location == LOCATION_REMOVED && (current.position & POS_FACEDOWN)) - return FALSE; - if(is_affected_by_effect(EFFECT_REVIVE_LIMIT) && !is_status(STATUS_PROC_COMPLETE)) { - if((!nolimit && (current.location & 0x38)) || (!nocheck && !nolimit && (current.location & 0x3))) - return FALSE; - if(!nolimit && (data.type & TYPE_PENDULUM) && current.location == LOCATION_EXTRA && (current.position & POS_FACEUP)) - return FALSE; - } - //face-up pendulum xyz/syn, STATUS_PROC_COMPLETE - if((data.type & TYPE_PENDULUM) && current.location == LOCATION_EXTRA && (current.position & POS_FACEUP) && - (sumtype == SUMMON_TYPE_SYNCHRO || sumtype == SUMMON_TYPE_XYZ)) - return FALSE; - if(((sumpos & POS_FACEDOWN) == 0) && pduel->game_field->check_unique_onfield(this, toplayer)) - return FALSE; - sumtype |= SUMMON_TYPE_SPECIAL; - if((sumplayer == 0 || sumplayer == 1) && !pduel->game_field->is_player_can_spsummon(reason_effect, sumtype, sumpos, sumplayer, toplayer, this)) - return FALSE; - if(is_affected_by_effect(EFFECT_CANNOT_SPECIAL_SUMMON)) - return FALSE; - if(is_affected_by_effect(EFFECT_FORBIDDEN)) - return FALSE; - pduel->game_field->save_lp_cost(); - effect_set eset; - filter_effect(EFFECT_SPSUMMON_COST, &eset); - for(int32 i = 0; i < eset.size(); ++i) { - pduel->lua->add_param(eset[i], PARAM_TYPE_EFFECT); - pduel->lua->add_param(this, PARAM_TYPE_CARD); - pduel->lua->add_param(sumplayer, PARAM_TYPE_INT); - if(!pduel->lua->check_condition(eset[i]->cost, 3)) { - pduel->game_field->restore_lp_cost(); - return FALSE; - } - } - if(!nocheck) { - eset.clear(); - if(!(data.type & TYPE_MONSTER)) { - pduel->game_field->restore_lp_cost(); - return FALSE; - } - filter_effect(EFFECT_SPSUMMON_CONDITION, &eset); - for(int32 i = 0; i < eset.size(); ++i) { - pduel->lua->add_param(reason_effect, PARAM_TYPE_EFFECT); - pduel->lua->add_param(sumplayer, PARAM_TYPE_INT); - pduel->lua->add_param(sumtype, PARAM_TYPE_INT); - pduel->lua->add_param(sumpos, PARAM_TYPE_INT); - pduel->lua->add_param(toplayer, PARAM_TYPE_INT); - if(!eset[i]->check_value_condition(5)) { - pduel->game_field->restore_lp_cost(); - return FALSE; - } - } - } - pduel->game_field->restore_lp_cost(); - return TRUE; -} -int32 card::is_setable_mzone(uint8 playerid, uint8 ignore_count, effect* peffect, uint8 min_tribute) { - if(!(data.type & TYPE_MONSTER)) - return FALSE; - if(is_affected_by_effect(EFFECT_UNSUMMONABLE_CARD)) - return FALSE; - if(current.location != LOCATION_HAND) - return FALSE; - if(is_affected_by_effect(EFFECT_FORBIDDEN)) - return FALSE; - if(is_affected_by_effect(EFFECT_CANNOT_MSET)) - return FALSE; - if(!ignore_count && (pduel->game_field->core.extra_summon[playerid] || !is_affected_by_effect(EFFECT_EXTRA_SET_COUNT)) - && pduel->game_field->core.summon_count[playerid] >= pduel->game_field->get_summon_count_limit(playerid)) - return FALSE; - pduel->game_field->save_lp_cost(); - effect_set eset; - filter_effect(EFFECT_MSET_COST, &eset); - for(int32 i = 0; i < eset.size(); ++i) { - pduel->lua->add_param(eset[i], PARAM_TYPE_EFFECT); - pduel->lua->add_param(this, PARAM_TYPE_CARD); - pduel->lua->add_param(playerid, PARAM_TYPE_INT); - if(!pduel->lua->check_condition(eset[i]->cost, 3)) { - pduel->game_field->restore_lp_cost(); - return FALSE; - } - } - if(!ignore_count && !pduel->game_field->core.extra_summon[playerid] - && pduel->game_field->core.summon_count[playerid] >= pduel->game_field->get_summon_count_limit(playerid)) { - effect* pextra = is_affected_by_effect(EFFECT_EXTRA_SET_COUNT); - if(pextra && !(pextra->flag & EFFECT_FLAG_FUNC_VALUE)) { - int32 count = pextra->get_value(); - if(min_tribute < count) - min_tribute = count; - } - } - eset.clear(); - int32 res = filter_set_procedure(playerid, &eset, ignore_count, min_tribute); - if((peffect && res < 0) || (!peffect && (!res || res == -2) && !eset.size()) - || (peffect && (eset.size() == 0) && !pduel->game_field->is_player_can_mset(peffect->get_value(), playerid, this))) { - pduel->game_field->restore_lp_cost(); - return FALSE; - } - pduel->game_field->restore_lp_cost(); - return TRUE; -} -int32 card::is_setable_szone(uint8 playerid, uint8 ignore_fd) { - if(!(data.type & TYPE_FIELD) && !ignore_fd && pduel->game_field->get_useable_count(current.controler, LOCATION_SZONE, current.controler, LOCATION_REASON_TOFIELD) <= 0) - return FALSE; - if(data.type & TYPE_MONSTER && !is_affected_by_effect(EFFECT_MONSTER_SSET)) - return FALSE; - if(is_affected_by_effect(EFFECT_FORBIDDEN)) - return FALSE; - if(is_affected_by_effect(EFFECT_CANNOT_SSET)) - return FALSE; - if(!pduel->game_field->is_player_can_sset(playerid, this)) - return FALSE; - pduel->game_field->save_lp_cost(); - effect_set eset; - filter_effect(EFFECT_SSET_COST, &eset); - for(int32 i = 0; i < eset.size(); ++i) { - pduel->lua->add_param(eset[i], PARAM_TYPE_EFFECT); - pduel->lua->add_param(this, PARAM_TYPE_CARD); - pduel->lua->add_param(playerid, PARAM_TYPE_INT); - if(!pduel->lua->check_condition(eset[i]->cost, 3)) { - pduel->game_field->restore_lp_cost(); - return FALSE; - } - } - pduel->game_field->restore_lp_cost(); - return TRUE; -} -int32 card::is_affect_by_effect(effect* peffect) { - if(is_status(STATUS_SUMMONING)) - return FALSE; - if(!peffect || (peffect->flag & EFFECT_FLAG_IGNORE_IMMUNE)) - return TRUE; - if(peffect->is_immuned(&immune_effect)) - return FALSE; - return TRUE; -} -int32 card::is_destructable() { - if(overlay_target) - return FALSE; - if(current.location & (LOCATION_GRAVE + LOCATION_REMOVED)) - return FALSE; - if(is_affected_by_effect(EFFECT_INDESTRUCTABLE)) - return FALSE; - return TRUE; -} -int32 card::is_destructable_by_battle(card * pcard) { - if(is_affected_by_effect(EFFECT_INDESTRUCTABLE_BATTLE, pcard)) - return FALSE; - return TRUE; -} -effect* card::check_indestructable_by_effect(effect* peffect, uint8 playerid) { - if(!peffect) - return 0; - effect_set eset; - filter_effect(EFFECT_INDESTRUCTABLE_EFFECT, &eset); - for(int32 i = 0; i < eset.size(); ++i) { - pduel->lua->add_param(peffect, PARAM_TYPE_EFFECT); - pduel->lua->add_param(playerid, PARAM_TYPE_INT); - pduel->lua->add_param(this, PARAM_TYPE_CARD); - if(eset[i]->check_value_condition(3)) - return eset[i]; - } - return 0; -} -int32 card::is_destructable_by_effect(effect* peffect, uint8 playerid) { - return !check_indestructable_by_effect(peffect, playerid); -} -int32 card::is_removeable(uint8 playerid) { - if(!pduel->game_field->is_player_can_remove(playerid, this)) - return FALSE; - if(is_affected_by_effect(EFFECT_CANNOT_REMOVE)) - return FALSE; - return TRUE; -} -int32 card::is_removeable_as_cost(uint8 playerid) { - if(is_affected_by_effect(EFFECT_CANNOT_USE_AS_COST)) - return FALSE; - if(!pduel->game_field->is_player_can_remove(playerid, this)) - return FALSE; - if(is_affected_by_effect(EFFECT_CANNOT_REMOVE)) - return FALSE; - return TRUE; -} -int32 card::is_releasable_by_summon(uint8 playerid, card *pcard) { - if(is_status(STATUS_SUMMONING)) - return FALSE; - if(overlay_target) - return FALSE; - if(current.location & (LOCATION_GRAVE + LOCATION_REMOVED)) - return FALSE; - if(!pduel->game_field->is_player_can_release(playerid, this)) - return FALSE; - if(is_affected_by_effect(EFFECT_UNRELEASABLE_SUM, pcard)) - return FALSE; - if(pcard->is_affected_by_effect(EFFECT_TRIBUTE_LIMIT, this)) - return FALSE; - return TRUE; -} -int32 card::is_releasable_by_nonsummon(uint8 playerid) { - if(is_status(STATUS_SUMMONING)) - return FALSE; - if(overlay_target) - return FALSE; - if(current.location & (LOCATION_GRAVE + LOCATION_REMOVED)) - return FALSE; - if((current.location == LOCATION_HAND) && (data.type & (TYPE_SPELL | TYPE_TRAP))) - return FALSE; - if(!pduel->game_field->is_player_can_release(playerid, this)) - return FALSE; - if(is_affected_by_effect(EFFECT_UNRELEASABLE_NONSUM)) - return FALSE; - return TRUE; -} -int32 card::is_releasable_by_effect(uint8 playerid, effect* peffect) { - if(!peffect) - return TRUE; - effect_set eset; - filter_effect(EFFECT_UNRELEASABLE_EFFECT, &eset); - for(int32 i = 0; i < eset.size(); ++i) { - pduel->lua->add_param(peffect, PARAM_TYPE_EFFECT); - pduel->lua->add_param(playerid, PARAM_TYPE_INT); - pduel->lua->add_param(this, PARAM_TYPE_CARD); - if(eset[i]->check_value_condition(3)) - return FALSE; - } - return TRUE; -} -int32 card::is_capable_send_to_grave(uint8 playerid) { - if(is_affected_by_effect(EFFECT_CANNOT_TO_GRAVE)) - return FALSE; - if(!pduel->game_field->is_player_can_send_to_grave(playerid, this)) - return FALSE; - return TRUE; -} -int32 card::is_capable_send_to_hand(uint8 playerid) { - if(is_status(STATUS_LEAVE_CONFIRMED)) - return FALSE; - if((current.location == LOCATION_EXTRA) && (data.type & (TYPE_FUSION + TYPE_SYNCHRO + TYPE_XYZ))) - return FALSE; - if(is_affected_by_effect(EFFECT_CANNOT_TO_HAND)) - return FALSE; - if(!pduel->game_field->is_player_can_send_to_hand(playerid, this)) - return FALSE; - return TRUE; -} -int32 card::is_capable_send_to_deck(uint8 playerid) { - if(is_status(STATUS_LEAVE_CONFIRMED)) - return FALSE; - if((current.location == LOCATION_EXTRA) && (data.type & (TYPE_FUSION + TYPE_SYNCHRO + TYPE_XYZ))) - return FALSE; - if(is_affected_by_effect(EFFECT_CANNOT_TO_DECK)) - return FALSE; - if(!pduel->game_field->is_player_can_send_to_deck(playerid, this)) - return FALSE; - return TRUE; -} -int32 card::is_capable_send_to_extra(uint8 playerid) { - if(!(data.type & (TYPE_FUSION | TYPE_SYNCHRO | TYPE_XYZ | TYPE_PENDULUM))) - return FALSE; - if(is_affected_by_effect(EFFECT_CANNOT_TO_DECK)) - return FALSE; - if(!pduel->game_field->is_player_can_send_to_deck(playerid, this)) - return FALSE; - return TRUE; -} -int32 card::is_capable_cost_to_grave(uint8 playerid) { - uint32 redirect = 0; - uint32 dest = LOCATION_GRAVE; - if(data.type & TYPE_TOKEN) - return FALSE; - if((data.type & TYPE_PENDULUM) && (current.location & LOCATION_ONFIELD) && !is_affected_by_effect(EFFECT_CANNOT_TO_DECK)) - return FALSE; - if(current.location == LOCATION_GRAVE) - return FALSE; - if(is_affected_by_effect(EFFECT_CANNOT_USE_AS_COST)) - return FALSE; - if(!is_capable_send_to_grave(playerid)) - return FALSE; - uint32 op_param = operation_param; - operation_param = dest << 8; - if(current.location & LOCATION_ONFIELD) - redirect = leave_field_redirect(REASON_COST) & 0xffff; - if(redirect) dest = redirect; - redirect = destination_redirect(dest, REASON_COST) & 0xffff; - if(redirect) dest = redirect; - operation_param = op_param; - if(dest != LOCATION_GRAVE) - return FALSE; - return TRUE; -} -int32 card::is_capable_cost_to_hand(uint8 playerid) { - uint32 redirect = 0; - uint32 dest = LOCATION_HAND; - if(data.type & (TYPE_TOKEN | TYPE_FUSION | TYPE_SYNCHRO | TYPE_XYZ)) - return FALSE; - if(current.location == LOCATION_HAND) - return FALSE; - if(is_affected_by_effect(EFFECT_CANNOT_USE_AS_COST)) - return FALSE; - if(!is_capable_send_to_hand(playerid)) - return FALSE; - uint32 op_param = operation_param; - operation_param = dest << 8; - if(current.location & LOCATION_ONFIELD) - redirect = leave_field_redirect(REASON_COST) & 0xffff; - if(redirect) dest = redirect; - redirect = destination_redirect(dest, REASON_COST) & 0xffff; - if(redirect) dest = redirect; - operation_param = op_param; - if(dest != LOCATION_HAND) - return FALSE; - return TRUE; -} -int32 card::is_capable_cost_to_deck(uint8 playerid) { - uint32 redirect = 0; - uint32 dest = LOCATION_DECK; - if(data.type & (TYPE_TOKEN | TYPE_FUSION | TYPE_SYNCHRO | TYPE_XYZ)) - return FALSE; - if(current.location == LOCATION_DECK) - return FALSE; - if(is_affected_by_effect(EFFECT_CANNOT_USE_AS_COST)) - return FALSE; - if(!is_capable_send_to_deck(playerid)) - return FALSE; - uint32 op_param = operation_param; - operation_param = dest << 8; - if(current.location & LOCATION_ONFIELD) - redirect = leave_field_redirect(REASON_COST) & 0xffff; - if(redirect) dest = redirect; - redirect = destination_redirect(dest, REASON_COST) & 0xffff; - if(redirect) dest = redirect; - operation_param = op_param; - if(dest != LOCATION_DECK) - return FALSE; - return TRUE; -} -int32 card::is_capable_cost_to_extra(uint8 playerid) { - uint32 redirect = 0; - uint32 dest = LOCATION_DECK; - if(!(data.type & (TYPE_FUSION | TYPE_SYNCHRO | TYPE_XYZ))) - return FALSE; - if(current.location == LOCATION_EXTRA) - return FALSE; - if(is_affected_by_effect(EFFECT_CANNOT_USE_AS_COST)) - return FALSE; - if(!is_capable_send_to_deck(playerid)) - return FALSE; - uint32 op_param = operation_param; - operation_param = dest << 8; - if(current.location & LOCATION_ONFIELD) - redirect = leave_field_redirect(REASON_COST) & 0xffff; - if(redirect) dest = redirect; - redirect = destination_redirect(dest, REASON_COST) & 0xffff; - if(redirect) dest = redirect; - operation_param = op_param; - if(dest != LOCATION_DECK) - return FALSE; - return TRUE; -} -int32 card::is_capable_attack() { - if(!is_position(POS_FACEUP_ATTACK) && !(is_position(POS_FACEUP_DEFENCE) && is_affected_by_effect(EFFECT_DEFENCE_ATTACK))) - return FALSE; - if(is_affected_by_effect(EFFECT_FORBIDDEN)) - return FALSE; - if(is_affected_by_effect(EFFECT_CANNOT_ATTACK)) - return FALSE; - if(is_affected_by_effect(EFFECT_ATTACK_DISABLED)) - return FALSE; - if(pduel->game_field->is_player_affected_by_effect(pduel->game_field->infos.turn_player, EFFECT_SKIP_BP)) - return FALSE; - return TRUE; -} -int32 card::is_capable_attack_announce(uint8 playerid) { - if(!is_capable_attack()) - return FALSE; - if(is_affected_by_effect(EFFECT_CANNOT_ATTACK_ANNOUNCE)) - return FALSE; - pduel->game_field->save_lp_cost(); - effect_set eset; - pduel->game_field->filter_player_effect(playerid, EFFECT_ATTACK_COST, &eset, FALSE); - filter_effect(EFFECT_ATTACK_COST, &eset); - for(int32 i = 0; i < eset.size(); ++i) { - pduel->lua->add_param(eset[i], PARAM_TYPE_EFFECT); - pduel->lua->add_param(this, PARAM_TYPE_CARD); - pduel->lua->add_param(playerid, PARAM_TYPE_INT); - if(!pduel->lua->check_condition(eset[i]->cost, 3)) { - pduel->game_field->restore_lp_cost(); - return FALSE; - } - } - pduel->game_field->restore_lp_cost(); - return TRUE; -} -int32 card::is_capable_change_position(uint8 playerid) { - if(is_status(STATUS_SUMMON_TURN) || is_status(STATUS_FLIP_SUMMON_TURN) || is_status(STATUS_SPSUMMON_TURN) || is_status(STATUS_FORM_CHANGED)) - return FALSE; - if(announce_count > 0) - return FALSE; - if(is_affected_by_effect(EFFECT_FORBIDDEN)) - return FALSE; - if(is_affected_by_effect(EFFECT_CANNOT_CHANGE_POSITION)) - return FALSE; - if(pduel->game_field->is_player_affected_by_effect(playerid, EFFECT_CANNOT_CHANGE_POSITION)) - return FALSE; - return TRUE; -} -int32 card::is_capable_turn_set(uint8 playerid) { - if(data.type & TYPE_TOKEN) - return FALSE; - if(is_position(POS_FACEDOWN)) - return FALSE; - if(is_affected_by_effect(EFFECT_CANNOT_TURN_SET)) - return FALSE; - if(pduel->game_field->is_player_affected_by_effect(playerid, EFFECT_CANNOT_TURN_SET)) - return FALSE; - return TRUE; -} -int32 card::is_capable_change_control() { - if(is_affected_by_effect(EFFECT_CANNOT_CHANGE_CONTROL)) - return FALSE; - return TRUE; -} -int32 card::is_control_can_be_changed() { - if(current.controler == PLAYER_NONE) - return FALSE; - if(current.location != LOCATION_MZONE) - return FALSE; - if(pduel->game_field->get_useable_count(1 - current.controler, LOCATION_MZONE, current.controler, LOCATION_REASON_CONTROL) <= 0) - return FALSE; - if((data.type & TYPE_TRAPMONSTER) && pduel->game_field->get_useable_count(1 - current.controler, LOCATION_MZONE, current.controler, LOCATION_REASON_CONTROL) <= 0) - return FALSE; - if(is_affected_by_effect(EFFECT_CANNOT_CHANGE_CONTROL)) - return FALSE; - return TRUE; -} -int32 card::is_capable_be_battle_target(card* pcard) { - if(is_affected_by_effect(EFFECT_CANNOT_BE_BATTLE_TARGET, pcard)) - return FALSE; - if(pcard->is_affected_by_effect(EFFECT_CANNOT_SELECT_BATTLE_TARGET, this)) - return FALSE; - if(is_affected_by_effect(EFFECT_IGNORE_BATTLE_TARGET)) - return FALSE; - return TRUE; -} -int32 card::is_capable_be_effect_target(effect* peffect, uint8 playerid) { - if(is_status(STATUS_SUMMONING) || is_status(STATUS_BATTLE_DESTROYED)) - return FALSE; - effect_set eset; - filter_effect(EFFECT_CANNOT_BE_EFFECT_TARGET, &eset); - for(int32 i = 0; i < eset.size(); ++i) { - pduel->lua->add_param(playerid, PARAM_TYPE_INT); - if(eset[i]->get_value(peffect, 1)) - return FALSE; - } - eset.clear(); - peffect->handler->filter_effect(EFFECT_CANNOT_SELECT_EFFECT_TARGET, &eset); - for(int32 i = 0; i < eset.size(); ++i) { - pduel->lua->add_param(this, PARAM_TYPE_CARD); - if(eset[i]->get_value(peffect, 1)) - return FALSE; - } - return TRUE; -} -int32 card::is_can_be_fusion_material(uint8 ignore_mon) { - if(!ignore_mon && !(get_type() & TYPE_MONSTER)) - return FALSE; - if(is_affected_by_effect(EFFECT_FORBIDDEN)) - return FALSE; - if(is_affected_by_effect(EFFECT_CANNOT_BE_FUSION_MATERIAL)) - return FALSE; - return TRUE; -} -int32 card::is_can_be_synchro_material(card* scard, card* tuner) { - if(data.type & TYPE_XYZ) - return FALSE; - if(!(get_type() & TYPE_MONSTER)) - return FALSE; - if(scard && current.location == LOCATION_MZONE && current.controler != scard->current.controler && !is_affected_by_effect(EFFECT_SYNCHRO_MATERIAL)) - return FALSE; - if(is_affected_by_effect(EFFECT_FORBIDDEN)) - return FALSE; - //special fix for scrap chimera, not perfect yet - if(tuner && (pduel->game_field->core.global_flag & GLOBALFLAG_SCRAP_CHIMERA)) { - if(is_affected_by_effect(EFFECT_SCRAP_CHIMERA, tuner)) - return false; - } - effect_set eset; - filter_effect(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL, &eset); - for(int32 i = 0; i < eset.size(); ++i) - if(eset[i]->get_value(scard)) - return FALSE; - return TRUE; -} -int32 card::is_can_be_ritual_material(card* scard) { - if(!(get_type() & TYPE_MONSTER)) - return FALSE; - if(current.location == LOCATION_GRAVE) { - effect_set eset; - filter_effect(EFFECT_EXTRA_RITUAL_MATERIAL, &eset); - for(int32 i = 0; i < eset.size(); ++i) - if(eset[i]->get_value(scard)) - return TRUE; - return FALSE; - } - return TRUE; -} -int32 card::is_can_be_xyz_material(card* scard) { - if(data.type & TYPE_TOKEN) - return FALSE; - if(!(get_type() & TYPE_MONSTER)) - return FALSE; - if(is_affected_by_effect(EFFECT_FORBIDDEN)) - return FALSE; - effect_set eset; - filter_effect(EFFECT_CANNOT_BE_XYZ_MATERIAL, &eset); - for(int32 i = 0; i < eset.size(); ++i) - if(eset[i]->get_value(scard)) - return FALSE; - return TRUE; -} diff --git a/ocgcore/card.h b/ocgcore/card.h deleted file mode 100644 index d4d9457845..0000000000 --- a/ocgcore/card.h +++ /dev/null @@ -1,447 +0,0 @@ -/* - * card.h - * - * Created on: 2010-4-8 - * Author: Argon - */ - -#ifndef CARD_H_ -#define CARD_H_ - -#include "common.h" -#include "effectset.h" -#include -#include - -class card; -class duel; -class effect; -class group; - -struct card_data { - uint32 code; - uint32 alias; - uint64 setcode; - uint32 type; - uint32 level; - uint32 attribute; - uint32 race; - int32 attack; - int32 defence; - uint32 lscale; - uint32 rscale; -}; - -struct card_state { - uint32 code; - uint32 code2; - uint32 type; - uint32 level; - uint32 rank; - uint32 lscale; - uint32 rscale; - uint32 attribute; - uint32 race; - int32 attack; - int32 defence; - int32 base_attack; - int32 base_defence; - uint8 controler; - uint8 location; - uint8 sequence; - uint8 position; - uint32 reason; - card* reason_card; - uint8 reason_player; - effect* reason_effect; -}; - -struct query_cache { - uint32 code; - uint32 alias; - uint32 type; - uint32 level; - uint32 rank; - uint32 attribute; - uint32 race; - int32 attack; - int32 defence; - int32 base_attack; - int32 base_defence; - uint32 reason; - int32 is_public; - int32 is_disabled; - uint32 lscale; - uint32 rscale; -}; - -class card { -public: - typedef std::vector card_vector; - typedef std::multimap effect_container; - typedef std::set card_set; - typedef std::map effect_indexer; - typedef std::map effect_relation; - typedef std::map relation_map; - typedef std::map counter_map; - typedef std::map attacker_map; - int32 scrtype; - int32 ref_handle; - duel* pduel; - card_data data; - card_state previous; - card_state temp; - card_state current; - query_cache q_cache; - uint8 owner; - uint8 summon_player; - uint32 summon_info; - uint32 status; - uint32 operation_param; - uint8 announce_count; - uint8 attacked_count; - uint8 attack_all_target; - uint16 cardid; - uint32 fieldid; - uint32 fieldid_r; - uint16 turnid; - uint16 turn_counter; - uint8 unique_pos[2]; - uint16 unique_uid; - uint32 unique_code; - uint32 spsummon_code; - uint16 spsummon_counter[2]; - uint16 spsummon_counter_rst[2]; - uint8 assume_type; - uint32 assume_value; - effect* unique_effect; - card* equiping_target; - card* pre_equip_target; - card* overlay_target; - relation_map relations; - counter_map counters; - attacker_map announced_cards; - attacker_map attacked_cards; - attacker_map battled_cards; - card_set equiping_cards; - card_set material_cards; - card_set effect_target_owner; - card_set effect_target_cards; - card_vector xyz_materials; - effect_container single_effect; - effect_container field_effect; - effect_container equip_effect; - effect_indexer indexer; - effect_relation relate_effect; - effect_set_v immune_effect; - - explicit card(duel* pd); - ~card(); - static bool card_operation_sort(card* c1, card* c2); - - uint32 get_infos(byte* buf, int32 query_flag, int32 use_cache = TRUE); - uint32 get_info_location(); - uint32 get_code(); - uint32 get_another_code(); - int32 is_set_card(uint32 set_code); - int32 is_pre_set_card(uint32 set_code); - uint32 get_type(); - int32 get_base_attack(uint8 swap = FALSE); - int32 get_attack(); - int32 get_base_defence(uint8 swap = FALSE); - int32 get_defence(); - void calc_attack_defence(int32 *patk, int32 *pdef); - uint32 get_level(); - uint32 get_rank(); - uint32 get_synchro_level(card* pcard); - uint32 get_ritual_level(card* pcard); - uint32 check_xyz_level(card* pcard, uint32 lv); - uint32 get_attribute(); - uint32 get_race(); - uint32 get_lscale(); - uint32 get_rscale(); - int32 is_position(int32 pos); - void set_status(uint32 status, int32 enabled); - int32 get_status(uint32 status); - int32 is_status(uint32 status); - - void equip(card *target, uint32 send_msg = TRUE); - void unequip(); - int32 get_union_count(); - void xyz_overlay(card_set* materials); - void xyz_add(card* mat, card_set* des); - void xyz_remove(card* mat); - void apply_field_effect(); - void cancel_field_effect(); - void enable_field_effect(int32 enabled); - int32 add_effect(effect* peffect); - void remove_effect(effect* peffect); - void remove_effect(effect* peffect, effect_container::iterator it); - int32 copy_effect(uint32 code, uint32 reset, uint32 count); - void reset(uint32 id, uint32 reset_type); - void reset_effect_count(); - int32 refresh_disable_status(); - uint8 refresh_control_status(); - - void count_turn(uint16 ct); - void create_relation(card* target, uint32 reset); - void create_relation(effect* peffect); - int32 is_has_relation(card* target); - int32 is_has_relation(effect* peffect); - void release_relation(card* target); - void release_relation(effect* peffect); - int32 leave_field_redirect(uint32 reason); - int32 destination_redirect(uint8 destination, uint32 reason); - int32 add_counter(uint8 playerid, uint16 countertype, uint16 count); - int32 remove_counter(uint16 countertype, uint16 count); - int32 is_can_add_counter(uint8 playerid, uint16 countertype, uint16 count); - int32 get_counter(uint16 countertype); - void set_material(card_set* materials); - void add_card_target(card* pcard); - void cancel_card_target(card* pcard); - - void filter_effect(int32 code, effect_set* eset, uint8 sort = TRUE); - void filter_single_effect(int32 code, effect_set* eset, uint8 sort = TRUE); - void filter_single_continuous_effect(int32 code, effect_set* eset, uint8 sort = TRUE); - void filter_immune_effect(); - void filter_disable_related_cards(); - int32 filter_summon_procedure(uint8 playerid, effect_set* eset, uint8 ignore_count, uint8 min_tribute); - int32 filter_set_procedure(uint8 playerid, effect_set* eset, uint8 ignore_count, uint8 min_tribute); - void filter_spsummon_procedure(uint8 playerid, effect_set* eset, uint32 summon_type); - void filter_spsummon_procedure_g(uint8 playerid, effect_set* eset); - effect* is_affected_by_effect(int32 code); - effect* is_affected_by_effect(int32 code, card* target); - effect* check_control_effect(); - int32 fusion_check(group* fusion_m, card* cg, int32 chkf); - void fusion_select(uint8 playerid, group* fusion_m, card* cg, int32 chkf); - - int32 is_equipable(card* pcard); - int32 is_summonable(); - int32 is_summonable(effect* peffect); - int32 is_summonable(effect* peffect, uint8 min_tribute); - int32 is_can_be_summoned(uint8 playerid, uint8 ingore_count, effect* peffect, uint8 min_tribute); - int32 get_summon_tribute_count(); - int32 get_set_tribute_count(); - int32 is_can_be_flip_summoned(uint8 playerid); - int32 is_special_summonable(uint8 playerid, uint32 summon_type); - int32 is_can_be_special_summoned(effect* reason_effect, uint32 sumtype, uint8 sumpos, uint8 sumplayer, uint8 toplayer, uint8 nocheck, uint8 nolimit); - int32 is_setable_mzone(uint8 playerid, uint8 ignore_count, effect* peffect, uint8 min_tribute); - int32 is_setable_szone(uint8 playerid, uint8 ignore_fd = 0); - int32 is_affect_by_effect(effect* peffect); - int32 is_destructable(); - int32 is_destructable_by_battle(card* pcard); - effect* check_indestructable_by_effect(effect* peffect, uint8 playerid); - int32 is_destructable_by_effect(effect* peffect, uint8 playerid); - int32 is_removeable(uint8 playerid); - int32 is_removeable_as_cost(uint8 playerid); - int32 is_releasable_by_summon(uint8 playerid, card* pcard); - int32 is_releasable_by_nonsummon(uint8 playerid); - int32 is_releasable_by_effect(uint8 playerid, effect* peffect); - int32 is_capable_send_to_grave(uint8 playerid); - int32 is_capable_send_to_hand(uint8 playerid); - int32 is_capable_send_to_deck(uint8 playerid); - int32 is_capable_send_to_extra(uint8 playerid); - int32 is_capable_cost_to_grave(uint8 playerid); - int32 is_capable_cost_to_hand(uint8 playerid); - int32 is_capable_cost_to_deck(uint8 playerid); - int32 is_capable_cost_to_extra(uint8 playerid); - int32 is_capable_attack(); - int32 is_capable_attack_announce(uint8 playerid); - int32 is_capable_change_position(uint8 playerid); - int32 is_capable_turn_set(uint8 playerid); - int32 is_capable_change_control(); - int32 is_control_can_be_changed(); - int32 is_capable_be_battle_target(card* pcard); - int32 is_capable_be_effect_target(effect* peffect, uint8 playerid); - int32 is_can_be_fusion_material(uint8 ignore_mon = FALSE); - int32 is_can_be_synchro_material(card* scard, card* tuner = 0); - int32 is_can_be_ritual_material(card* scard); - int32 is_can_be_xyz_material(card* scard); -}; - -//Locations -#define LOCATION_DECK 0x01 // -#define LOCATION_HAND 0x02 // -#define LOCATION_MZONE 0x04 // -#define LOCATION_SZONE 0x08 // -#define LOCATION_GRAVE 0x10 // -#define LOCATION_REMOVED 0x20 // -#define LOCATION_EXTRA 0x40 // -#define LOCATION_OVERLAY 0x80 // -#define LOCATION_ONFIELD 0x0c // -#define LOCATION_FZONE 0x100 // -#define LOCATION_PZONE 0x200 // -//Positions -#define POS_FACEUP_ATTACK 0x1 -#define POS_FACEDOWN_ATTACK 0x2 -#define POS_FACEUP_DEFENCE 0x4 -#define POS_FACEDOWN_DEFENCE 0x8 -#define POS_FACEUP 0x5 -#define POS_FACEDOWN 0xa -#define POS_ATTACK 0x3 -#define POS_DEFENCE 0xc -#define NO_FLIP_EFFECT 0x10000 -//Types -#define TYPE_MONSTER 0x1 // -#define TYPE_SPELL 0x2 // -#define TYPE_TRAP 0x4 // -#define TYPE_NORMAL 0x10 // -#define TYPE_EFFECT 0x20 // -#define TYPE_FUSION 0x40 // -#define TYPE_RITUAL 0x80 // -#define TYPE_TRAPMONSTER 0x100 // -#define TYPE_SPIRIT 0x200 // -#define TYPE_UNION 0x400 // -#define TYPE_DUAL 0x800 // -#define TYPE_TUNER 0x1000 // -#define TYPE_SYNCHRO 0x2000 // -#define TYPE_TOKEN 0x4000 // -#define TYPE_QUICKPLAY 0x10000 // -#define TYPE_CONTINUOUS 0x20000 // -#define TYPE_EQUIP 0x40000 // -#define TYPE_FIELD 0x80000 // -#define TYPE_COUNTER 0x100000 // -#define TYPE_FLIP 0x200000 // -#define TYPE_TOON 0x400000 // -#define TYPE_XYZ 0x800000 // -#define TYPE_PENDULUM 0x1000000 // - -//Attributes -#define ATTRIBUTE_EARTH 0x01 // -#define ATTRIBUTE_WATER 0x02 // -#define ATTRIBUTE_FIRE 0x04 // -#define ATTRIBUTE_WIND 0x08 // -#define ATTRIBUTE_LIGHT 0x10 // -#define ATTRIBUTE_DARK 0x20 // -#define ATTRIBUTE_DEVINE 0x40 // -//Races -#define RACE_WARRIOR 0x1 // -#define RACE_SPELLCASTER 0x2 // -#define RACE_FAIRY 0x4 // -#define RACE_FIEND 0x8 // -#define RACE_ZOMBIE 0x10 // -#define RACE_MACHINE 0x20 // -#define RACE_AQUA 0x40 // -#define RACE_PYRO 0x80 // -#define RACE_ROCK 0x100 // -#define RACE_WINDBEAST 0x200 // -#define RACE_PLANT 0x400 // -#define RACE_INSECT 0x800 // -#define RACE_THUNDER 0x1000 // -#define RACE_DRAGON 0x2000 // -#define RACE_BEAST 0x4000 // -#define RACE_BEASTWARRIOR 0x8000 // -#define RACE_DINOSAUR 0x10000 // -#define RACE_FISH 0x20000 // -#define RACE_SEASERPENT 0x40000 // -#define RACE_REPTILE 0x80000 // -#define RACE_PSYCHO 0x100000 // -#define RACE_DEVINE 0x200000 // -#define RACE_CREATORGOD 0x400000 // -#define RACE_PHANTOMDRAGON 0x800000 // -//Reason -#define REASON_DESTROY 0x1 // -#define REASON_RELEASE 0x2 // -#define REASON_TEMPORARY 0x4 // -#define REASON_MATERIAL 0x8 // -#define REASON_SUMMON 0x10 // -#define REASON_BATTLE 0x20 // -#define REASON_EFFECT 0x40 // -#define REASON_COST 0x80 // -#define REASON_ADJUST 0x100 // -#define REASON_LOST_TARGET 0x200 // -#define REASON_RULE 0x400 // -#define REASON_SPSUMMON 0x800 // -#define REASON_DISSUMMON 0x1000 // -#define REASON_FLIP 0x2000 // -#define REASON_DISCARD 0x4000 // -#define REASON_RDAMAGE 0x8000 // -#define REASON_RRECOVER 0x10000 // -#define REASON_RETURN 0x20000 // -#define REASON_FUSION 0x40000 // -#define REASON_SYNCHRO 0x80000 // -#define REASON_RITUAL 0x100000 // -#define REASON_XYZ 0x200000 // -#define REASON_REPLACE 0x1000000 // -#define REASON_DRAW 0x2000000 // -#define REASON_REDIRECT 0x4000000 // -//Summon Type -#define SUMMON_TYPE_NORMAL 0x10000000 -#define SUMMON_TYPE_ADVANCE 0x11000000 -#define SUMMON_TYPE_DUAL 0x12000000 -#define SUMMON_TYPE_FLIP 0x20000000 -#define SUMMON_TYPE_SPECIAL 0x40000000 -#define SUMMON_TYPE_FUSION 0x43000000 -#define SUMMON_TYPE_RITUAL 0x45000000 -#define SUMMON_TYPE_SYNCHRO 0x46000000 -#define SUMMON_TYPE_XYZ 0x49000000 -#define SUMMON_TYPE_PENDULUM 0x4a000000 -//Status -#define STATUS_DISABLED 0x0001 // -#define STATUS_TO_ENABLE 0x0002 // -#define STATUS_TO_DISABLE 0x0004 // -#define STATUS_PROC_COMPLETE 0x0008 // -#define STATUS_SET_TURN 0x0010 // -#define STATUS_NO_LEVEL 0x0020 // -#define STATUS_REVIVE_LIMIT 0x0040 // -#define STATUS_SPSUMMON_STEP 0x0080 // -#define STATUS_FORM_CHANGED 0x0100 // -#define STATUS_SUMMONING 0x0200 // -#define STATUS_EFFECT_ENABLED 0x0400 // -#define STATUS_SUMMON_TURN 0x0800 // -#define STATUS_DESTROY_CONFIRMED 0x1000 // -#define STATUS_LEAVE_CONFIRMED 0x2000 // -#define STATUS_BATTLE_DESTROYED 0x4000 // -#define STATUS_COPYING_EFFECT 0x8000 // -#define STATUS_CHAINING 0x10000 // -#define STATUS_SUMMON_DISABLED 0x20000 // -#define STATUS_ACTIVATE_DISABLED 0x40000 // -#define STATUS_UNSUMMONABLE_CARD 0x80000 // -#define STATUS_UNION 0x100000 -#define STATUS_ATTACK_CANCELED 0x200000 -#define STATUS_INITIALIZING 0x400000 -#define STATUS_ACTIVATED 0x800000 -#define STATUS_JUST_POS 0x1000000 -#define STATUS_CONTINUOUS_POS 0x2000000 -#define STATUS_IS_PUBLIC 0x4000000 -#define STATUS_ACT_FROM_HAND 0x8000000 -#define STATUS_OPPO_BATTLE 0x10000000 -#define STATUS_FLIP_SUMMON_TURN 0x20000000 -#define STATUS_SPSUMMON_TURN 0x40000000 -//Counter -#define COUNTER_NEED_PERMIT 0x1000 -#define COUNTER_NEED_ENABLE 0x2000 -//Query list -#define QUERY_CODE 0x1 -#define QUERY_POSITION 0x2 -#define QUERY_ALIAS 0x4 -#define QUERY_TYPE 0x8 -#define QUERY_LEVEL 0x10 -#define QUERY_RANK 0x20 -#define QUERY_ATTRIBUTE 0x40 -#define QUERY_RACE 0x80 -#define QUERY_ATTACK 0x100 -#define QUERY_DEFENCE 0x200 -#define QUERY_BASE_ATTACK 0x400 -#define QUERY_BASE_DEFENCE 0x800 -#define QUERY_REASON 0x1000 -#define QUERY_REASON_CARD 0x2000 -#define QUERY_EQUIP_CARD 0x4000 -#define QUERY_TARGET_CARD 0x8000 -#define QUERY_OVERLAY_CARD 0x10000 -#define QUERY_COUNTERS 0x20000 -#define QUERY_OWNER 0x40000 -#define QUERY_IS_DISABLED 0x80000 -#define QUERY_IS_PUBLIC 0x100000 -#define QUERY_LSCALE 0x200000 -#define QUERY_RSCALE 0x400000 - -#define ASSUME_CODE 1 -#define ASSUME_TYPE 2 -#define ASSUME_LEVEL 3 -#define ASSUME_RANK 4 -#define ASSUME_ATTRIBUTE 5 -#define ASSUME_RACE 6 -#define ASSUME_ATTACK 7 -#define ASSUME_DEFENCE 8 -#endif /* CARD_H_ */ diff --git a/ocgcore/common.h b/ocgcore/common.h deleted file mode 100644 index d2fa92ed25..0000000000 --- a/ocgcore/common.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * common.h - * - * Created on: 2009-1-7 - * Author: Argon.Sun - */ - -#ifndef COMMON_H_ -#define COMMON_H_ - -#ifdef _MSC_VER -#pragma warning(disable: 4244) -#endif - -typedef unsigned long uptr; -typedef unsigned long long uint64; -typedef unsigned int uint32; -typedef unsigned short uint16; -typedef unsigned char uint8; -typedef unsigned char byte; -typedef long ptr; -typedef long long int64; -typedef int int32; -typedef short int16; -typedef char int8; -typedef int BOOL; - -#define MATCH_ALL(x,y) (((x)&(y))==(y)) -#define MATCH_ANY(x,y) ((x)&(y)) -#define ADD_BIT(x,y) ((x)|=(y)) -#define REMOVE_BIT(x,y) ((x)&=~(y)) - -#define OPERATION_SUCCESS 1 -#define OPERATION_FAIL 0 -#define OPERATION_CANCELED -1 -#define TRUE 1 -#define FALSE 0 -#ifndef NULL -#define NULL 0 -#endif -struct card_sort { - bool operator()(void* const & c1, void* const & c2) const; -}; - -#endif /* COMMON_H_ */ diff --git a/ocgcore/duel.cpp b/ocgcore/duel.cpp deleted file mode 100644 index e52593066f..0000000000 --- a/ocgcore/duel.cpp +++ /dev/null @@ -1,145 +0,0 @@ -/* - * duel.cpp - * - * Created on: 2010-5-2 - * Author: Argon - */ - -#include "duel.h" -#include "interpreter.h" -#include "field.h" -#include "card.h" -#include "effect.h" -#include "group.h" -#include "ocgapi.h" -#include - -duel::duel() { - lua = new interpreter(this); - game_field = new field(this); - game_field->temp_card = new_card(0); - clear_buffer(); -} -duel::~duel() { - for(std::set::iterator cit = cards.begin(); cit != cards.end(); ++cit) - delete *cit; - for(std::set::iterator git = groups.begin(); git != groups.end(); ++git) - delete *git; - for(std::set::iterator eit = effects.begin(); eit != effects.end(); ++eit) - delete *eit; - delete lua; - delete game_field; -} -void duel::clear() { - for(std::set::iterator cit = cards.begin(); cit != cards.end(); ++cit) - delete *cit; - for(std::set::iterator git = groups.begin(); git != groups.end(); ++git) - delete *git; - for(std::set::iterator eit = effects.begin(); eit != effects.end(); ++eit) - delete *eit; - delete game_field; - cards.clear(); - groups.clear(); - effects.clear(); - game_field = new field(this); - game_field->temp_card = new_card(0); -} -card* duel::new_card(uint32 code) { - card* pcard = new card(this); - cards.insert(pcard); - if(code) - ::read_card(code, &(pcard->data)); - pcard->data.code = code; - lua->register_card(pcard); - return pcard; -} -group* duel::register_group(group* pgroup) { - groups.insert(pgroup); - if(lua->call_depth) - sgroups.insert(pgroup); - lua->register_group(pgroup); - return pgroup; -} -group* duel::new_group() { - group* pgroup = new group(this); - return register_group(pgroup); -} -group* duel::new_group(card* pcard) { - group* pgroup = new group(this, pcard); - return register_group(pgroup); -} -group* duel::new_group(const card_set& cset) { - group* pgroup = new group(this, cset); - return register_group(pgroup); -} -effect* duel::new_effect() { - effect* peffect = new effect(this); - effects.insert(peffect); - lua->register_effect(peffect); - return peffect; -} -void duel::delete_card(card* pcard) { - cards.erase(pcard); - delete pcard; -} -void duel::delete_group(group* pgroup) { - lua->unregister_group(pgroup); - groups.erase(pgroup); - sgroups.erase(pgroup); - delete pgroup; -} -void duel::delete_effect(effect* peffect) { - lua->unregister_effect(peffect); - effects.erase(peffect); - delete peffect; -} -int32 duel::read_buffer(byte* buf) { - memcpy(buf, buffer, bufferlen); - return bufferlen; -} -void duel::release_script_group() { - std::set::iterator sit; - for(sit = sgroups.begin(); sit != sgroups.end(); ++sit) { - group* pgroup = *sit; - if(pgroup->is_readonly == 0) { - lua->unregister_group(pgroup); - groups.erase(pgroup); - delete pgroup; - } - } - sgroups.clear(); -} -void duel::restore_assumes() { - std::set::iterator sit; - for(sit = assumes.begin(); sit != assumes.end(); ++sit) - (*sit)->assume_type = 0; - assumes.clear(); -} -void duel::write_buffer32(uint32 value) { - *((uint32*)bufferp) = value; - bufferp += 4; - bufferlen += 4; -} -void duel::write_buffer16(uint16 value) { - *((uint16*)bufferp) = value; - bufferp += 2; - bufferlen += 2; -} -void duel::write_buffer8(uint8 value) { - *((uint8*)bufferp) = value; - bufferp += 1; - bufferlen += 1; -} -void duel::clear_buffer() { - bufferlen = 0; - bufferp = buffer; -} -void duel::set_responsei(uint32 resp) { - game_field->returns.ivalue[0] = resp; -} -void duel::set_responseb(byte* resp) { - memcpy(game_field->returns.bvalue, resp, 64); -} -int32 duel::get_next_integer(int32 l, int32 h) { - return (int32) (random.real() * (h - l + 1)) + l; -} diff --git a/ocgcore/duel.h b/ocgcore/duel.h deleted file mode 100644 index 8e8af4d5c5..0000000000 --- a/ocgcore/duel.h +++ /dev/null @@ -1,89 +0,0 @@ -/* - * duel.h - * - * Created on: 2010-4-8 - * Author: Argon - */ - -#ifndef DUEL_H_ -#define DUEL_H_ - -#include "common.h" -#include "mtrandom.h" -#include - -class card; -class group; -class effect; -class field; -class interpreter; - -struct duel_arg { - int16 start_lp; - int8 start_hand; - int8 draw_count; -}; -class duel { -public: - typedef std::set card_set; - char strbuffer[256]; - byte buffer[0x1000]; - uint32 bufferlen; - byte* bufferp; - interpreter* lua; - field* game_field; - mtrandom random; - std::set cards; - std::set assumes; - std::set groups; - std::set sgroups; - std::set effects; - std::set uncopy; - - duel(); - ~duel(); - void clear(); - - card* new_card(uint32 code); - group* new_group(); - group* new_group(card* pcard); - group* new_group(const card_set& cset); - effect* new_effect(); - void delete_card(card* pcard); - void delete_group(group* pgroup); - void delete_effect(effect* peffect); - void release_script_group(); - void restore_assumes(); - int32 read_buffer(byte* buf); - void write_buffer32(uint32 value); - void write_buffer16(uint16 value); - void write_buffer8(uint8 value); - void clear_buffer(); - void set_responsei(uint32 resp); - void set_responseb(byte* resp); - int32 get_next_integer(int32 l, int32 h); -private: - group* register_group(group* pgroup); -}; - -//Player -#define PLAYER_NONE 2 // -#define PLAYER_ALL 3 // -//Phase -#define PHASE_DRAW 0x01 // -#define PHASE_STANDBY 0x02 // -#define PHASE_MAIN1 0x04 // -#define PHASE_BATTLE 0x08 // -#define PHASE_DAMAGE 0x10 // -#define PHASE_DAMAGE_CAL 0x20 // -#define PHASE_MAIN2 0x40 // -#define PHASE_END 0x80 // -//Options -#define DUEL_TEST_MODE 0x01 -#define DUEL_ATTACK_FIRST_TURN 0x02 -#define DUEL_NO_CHAIN_HINT 0x04 -#define DUEL_OBSOLETE_RULING 0x08 -#define DUEL_PSEUDO_SHUFFLE 0x10 -#define DUEL_TAG_MODE 0x20 -#define DUEL_SIMPLE_AI 0x40 -#endif /* DUEL_H_ */ diff --git a/ocgcore/effect.cpp b/ocgcore/effect.cpp deleted file mode 100644 index d90ed177e6..0000000000 --- a/ocgcore/effect.cpp +++ /dev/null @@ -1,619 +0,0 @@ -/* - * effect.cpp - * - * Created on: 2010-5-7 - * Author: Argon - */ - -#include "effect.h" -#include "card.h" -#include "duel.h" -#include "group.h" -#include "interpreter.h" - -bool effect_sort_id(const effect* e1, const effect* e2) { - return e1->id < e2->id; -}; -effect::effect(duel* pd) { - scrtype = 3; - ref_handle = 0; - pduel = pd; - owner = 0; - handler = 0; - description = 0; - effect_owner = PLAYER_NONE; - card_type = 0; - active_type = 0; - id = 0; - code = 0; - type = 0; - flag = 0; - copy_id = 0; - range = 0; - s_range = 0; - o_range = 0; - reset_count = 0; - reset_flag = 0; - count_code = 0; - category = 0; - label = 0; - label_object = 0; - hint_timing[0] = 0; - hint_timing[1] = 0; - field_ref = 0; - status = 0; - condition = 0; - cost = 0; - target = 0; - value = 0; - operation = 0; -} -effect::~effect() { - -} -int32 effect::is_disable_related() { - if (code == EFFECT_IMMUNE_EFFECT || code == EFFECT_DISABLE || code == EFFECT_CANNOT_DISABLE) - return TRUE; - return FALSE; -} -int32 effect::is_available() { - if (type & EFFECT_TYPE_ACTIONS) - return FALSE; - if (type & EFFECT_TYPE_SINGLE) { - if (handler->current.controler == PLAYER_NONE) - return FALSE; - if((flag & EFFECT_FLAG_SINGLE_RANGE) && !in_range(handler->current.location, handler->current.sequence)) - return FALSE; - if((flag & EFFECT_FLAG_SINGLE_RANGE) && (handler->current.location & LOCATION_ONFIELD) - && (handler->is_position(POS_FACEDOWN) || (!handler->is_status(STATUS_EFFECT_ENABLED) && !(flag & EFFECT_FLAG_IMMEDIATELY_APPLY)))) - return FALSE; - if((flag & EFFECT_FLAG_OWNER_RELATE) && !(flag & EFFECT_FLAG_CANNOT_DISABLE) && owner->is_status(STATUS_DISABLED)) - return FALSE; - if(owner == handler && !(flag & EFFECT_FLAG_CANNOT_DISABLE) && handler->get_status(STATUS_DISABLED)) - return FALSE; - } - if (type & EFFECT_TYPE_EQUIP) { - if(handler->current.controler == PLAYER_NONE) - return FALSE; - if((flag & EFFECT_FLAG_OWNER_RELATE) && !(flag & EFFECT_FLAG_CANNOT_DISABLE) && owner->is_status(STATUS_DISABLED)) - return FALSE; - if(owner == handler && !(flag & EFFECT_FLAG_CANNOT_DISABLE) && handler->get_status(STATUS_DISABLED)) - return FALSE; - if(!(flag & EFFECT_FLAG_SET_AVAILABLE)) { - if(!(handler->get_status(STATUS_EFFECT_ENABLED))) - return FALSE; - if(!handler->is_position(POS_FACEUP)) - return FALSE; - } - } - if (type & EFFECT_TYPE_FIELD) { - if (!(flag & EFFECT_FLAG_FIELD_ONLY)) { - if(handler->current.controler == PLAYER_NONE) - return FALSE; - if((flag & EFFECT_FLAG_OWNER_RELATE) && !(flag & EFFECT_FLAG_CANNOT_DISABLE) && owner->is_status(STATUS_DISABLED)) - return FALSE; - if(owner == handler && !(flag & EFFECT_FLAG_CANNOT_DISABLE) && handler->get_status(STATUS_DISABLED)) - return FALSE; - if(handler->is_status(STATUS_BATTLE_DESTROYED) && !(flag & EFFECT_FLAG_AVAILABLE_BD)) - return FALSE; - if(!handler->get_status(STATUS_EFFECT_ENABLED) && !(flag & EFFECT_FLAG_IMMEDIATELY_APPLY)) - return FALSE; - if(!in_range(handler->current.location, handler->current.sequence)) - return FALSE; - if((handler->current.location & LOCATION_ONFIELD) && !handler->is_position(POS_FACEUP)) - return FALSE; - } - } - if (!condition) - return TRUE; - pduel->lua->add_param(this, PARAM_TYPE_EFFECT); - int32 res = pduel->lua->check_condition(condition, 1); - if(res) { - if(!(status & EFFECT_STATUS_AVAILABLE)) - id = pduel->game_field->infos.field_id++; - status |= EFFECT_STATUS_AVAILABLE; - } else - status &= ~EFFECT_STATUS_AVAILABLE; - return res; -} -int32 effect::check_count_limit(uint8 playerid) { - if((flag & EFFECT_FLAG_COUNT_LIMIT)) { - if(count_code == 0) { - if((reset_count & 0xf00) == 0) - return FALSE; - } else { - uint32 code = count_code & 0xfffffff; - uint32 count = (reset_count >> 12) & 0xf; - if(code == 1) { - if(pduel->game_field->get_effect_code((count_code & 0xf0000000) | handler->fieldid, PLAYER_NONE) >= count) - return FALSE; - } else { - if(pduel->game_field->get_effect_code(count_code, playerid) >= count) - return FALSE; - } - } - } - return TRUE; -} -int32 effect::is_activateable(uint8 playerid, const tevent& e, int32 neglect_cond, int32 neglect_cost, int32 neglect_target) { - if(!(type & EFFECT_TYPE_ACTIONS)) - return FALSE; - if(!check_count_limit(playerid)) - return FALSE; - if (!(flag & EFFECT_FLAG_FIELD_ONLY)) { - if (type & EFFECT_TYPE_ACTIVATE) { - if(handler->current.controler != playerid) - return FALSE; - if(pduel->game_field->check_unique_onfield(handler, playerid)) - return FALSE; - if(!(handler->data.type & TYPE_COUNTER)) { - if((code < 1132 || code > 1149) && pduel->game_field->infos.phase == PHASE_DAMAGE && !(flag & EFFECT_FLAG_DAMAGE_STEP)) - return FALSE; - if((code < 1134 || code > 1136) && pduel->game_field->infos.phase == PHASE_DAMAGE_CAL && !(flag & EFFECT_FLAG_DAMAGE_CAL)) - return FALSE; - } - if(handler->current.location == LOCATION_HAND) { - if(handler->data.type & TYPE_MONSTER) { - if(!(handler->data.type & TYPE_PENDULUM)) - return FALSE; - if(pduel->game_field->player[playerid].list_szone[6] && pduel->game_field->player[playerid].list_szone[7]) - return FALSE; - } else if(!(handler->data.type & TYPE_FIELD) - && pduel->game_field->get_useable_count(playerid, LOCATION_SZONE, playerid, LOCATION_REASON_TOFIELD) <= 0) - return FALSE; - } else if(handler->current.location == LOCATION_SZONE) { - if(handler->is_position(POS_FACEUP)) - return FALSE; - if(handler->get_status(STATUS_SET_TURN)) { - if((handler->data.type & TYPE_SPELL) && (handler->data.type & TYPE_QUICKPLAY)) - return FALSE; - } - } - int32 ecode = 0; - if(handler->current.location == LOCATION_HAND) { - if(handler->data.type & TYPE_TRAP) - ecode = EFFECT_TRAP_ACT_IN_HAND; - else if((handler->data.type & TYPE_SPELL) && pduel->game_field->infos.turn_player != playerid) { - if(handler->data.type & TYPE_QUICKPLAY) - ecode = EFFECT_QP_ACT_IN_NTPHAND; - else - return FALSE; - } - } else if(handler->current.location == LOCATION_SZONE) { - if((handler->data.type & TYPE_TRAP) && handler->get_status(STATUS_SET_TURN)) - ecode = EFFECT_TRAP_ACT_IN_SET_TURN; - } - if(ecode) { - int32 available = false; - effect_set eset; - handler->filter_effect(ecode, &eset); - for(int32 i = 0; i < eset.size(); ++i) { - if(eset[i]->check_count_limit(playerid)) { - available = true; - break; - } - } - if(!available) - return FALSE; - } - if(handler->is_affected_by_effect(EFFECT_FORBIDDEN)) - return FALSE; - if(handler->is_affected_by_effect(EFFECT_CANNOT_TRIGGER)) - return FALSE; - } else if(!(type & EFFECT_TYPE_CONTINUOUS)) { - if((handler->current.location & (LOCATION_ONFIELD | LOCATION_REMOVED)) && (code != EVENT_FLIP && !(flag & EFFECT_FLAG_SET_AVAILABLE)) - && (!handler->is_position(POS_FACEUP) || !handler->is_status(STATUS_EFFECT_ENABLED))) - return FALSE; - if(!(type & (EFFECT_TYPE_FLIP | EFFECT_TYPE_TRIGGER_F)) - && !((type & EFFECT_TYPE_SINGLE) - && (code == EVENT_TO_GRAVE || code == EVENT_DESTROYED || code == EVENT_SPSUMMON_SUCCESS || code == EVENT_TO_HAND))) { - if((code < 1132 || code > 1149) && pduel->game_field->infos.phase == PHASE_DAMAGE && !(flag & EFFECT_FLAG_DAMAGE_STEP)) - return FALSE; - if((code < 1134 || code > 1136) && pduel->game_field->infos.phase == PHASE_DAMAGE_CAL && !(flag & EFFECT_FLAG_DAMAGE_CAL)) - return FALSE; - } - if((type & EFFECT_TYPE_FIELD) && (handler->current.controler != playerid) && !(flag & EFFECT_FLAG_BOTH_SIDE)) - return FALSE; - if(handler->is_affected_by_effect(EFFECT_FORBIDDEN)) - return FALSE; - if(handler->is_affected_by_effect(EFFECT_CANNOT_TRIGGER)) - return FALSE; - } else { - if(!(flag & EFFECT_FLAG_AVAILABLE_BD) && (type & EFFECT_TYPE_FIELD) && handler->is_status(STATUS_BATTLE_DESTROYED)) - return FALSE; - if(((type & EFFECT_TYPE_FIELD) || ((type & EFFECT_TYPE_SINGLE) && (flag & EFFECT_FLAG_SINGLE_RANGE))) && (handler->current.location & LOCATION_ONFIELD) - && (!handler->is_position(POS_FACEUP) || !handler->is_status(STATUS_EFFECT_ENABLED))) - return FALSE; - if((type & EFFECT_TYPE_SINGLE) && (flag & EFFECT_FLAG_SINGLE_RANGE) && !in_range(handler->current.location, handler->current.sequence)) - return FALSE; - if((flag & EFFECT_FLAG_OWNER_RELATE) && !(flag & EFFECT_FLAG_CANNOT_DISABLE) && owner->is_status(STATUS_DISABLED)) - return FALSE; - if((handler == owner) && !(flag & EFFECT_FLAG_CANNOT_DISABLE) && handler->is_status(STATUS_DISABLED)) - return FALSE; - } - } else { - if((get_owner_player() != playerid) && !(flag & EFFECT_FLAG_BOTH_SIDE)) - return FALSE; - } - pduel->game_field->save_lp_cost(); - effect* oreason = pduel->game_field->core.reason_effect; - uint8 op = pduel->game_field->core.reason_player; - pduel->game_field->core.reason_effect = this; - pduel->game_field->core.reason_player = playerid; - int32 result = TRUE; - if(!(type & EFFECT_TYPE_CONTINUOUS)) - result = is_action_check(playerid); - if(result) - result = is_activate_ready(playerid, e, neglect_cond, neglect_cost, neglect_target); - pduel->game_field->core.reason_effect = oreason; - pduel->game_field->core.reason_player = op; - pduel->game_field->restore_lp_cost(); - return result; -} -// check EFFECT_CANNOT_ACTIVATE -int32 effect::is_action_check(uint8 playerid) { - effect_set eset; - pduel->game_field->filter_player_effect(playerid, EFFECT_CANNOT_ACTIVATE, &eset); - for(int i = 0; i < eset.size(); ++i) { - pduel->lua->add_param(this, PARAM_TYPE_EFFECT); - pduel->lua->add_param(playerid, PARAM_TYPE_INT); - if(eset[i]->check_value_condition(2)) - return FALSE; - } - eset.clear(); - pduel->game_field->filter_player_effect(playerid, EFFECT_ACTIVATE_COST, &eset); - for(int i = 0; i < eset.size(); ++i) { - pduel->lua->add_param(eset[i], PARAM_TYPE_EFFECT); - pduel->lua->add_param(this, PARAM_TYPE_EFFECT); - pduel->lua->add_param(playerid, PARAM_TYPE_INT); - if(!pduel->lua->check_condition(eset[i]->target, 3)) - continue; - pduel->lua->add_param(eset[i], PARAM_TYPE_EFFECT); - pduel->lua->add_param(this, PARAM_TYPE_EFFECT); - pduel->lua->add_param(playerid, PARAM_TYPE_INT); - if(!pduel->lua->check_condition(eset[i]->cost, 3)) - return FALSE; - } - return TRUE; -} -// check condition, cost(chk=0), target(chk=0) -int32 effect::is_activate_ready(uint8 playerid, const tevent& e, int32 neglect_cond, int32 neglect_cost, int32 neglect_target) { - if (!neglect_cond && condition) { - pduel->lua->add_param(this, PARAM_TYPE_EFFECT); - pduel->lua->add_param(playerid, PARAM_TYPE_INT); - pduel->lua->add_param(e.event_cards , PARAM_TYPE_GROUP); - pduel->lua->add_param(e.event_player, PARAM_TYPE_INT); - pduel->lua->add_param(e.event_value, PARAM_TYPE_INT); - pduel->lua->add_param(e.reason_effect , PARAM_TYPE_EFFECT); - pduel->lua->add_param(e.reason, PARAM_TYPE_INT); - pduel->lua->add_param(e.reason_player, PARAM_TYPE_INT); - if (!pduel->lua->check_condition(condition, 8)) { - return FALSE; - } - } - if(!neglect_cost && cost && !(type & EFFECT_TYPE_CONTINUOUS)) { - pduel->lua->add_param(this, PARAM_TYPE_EFFECT); - pduel->lua->add_param(playerid, PARAM_TYPE_INT); - pduel->lua->add_param(e.event_cards , PARAM_TYPE_GROUP); - pduel->lua->add_param(e.event_player, PARAM_TYPE_INT); - pduel->lua->add_param(e.event_value, PARAM_TYPE_INT); - pduel->lua->add_param(e.reason_effect , PARAM_TYPE_EFFECT); - pduel->lua->add_param(e.reason, PARAM_TYPE_INT); - pduel->lua->add_param(e.reason_player, PARAM_TYPE_INT); - pduel->lua->add_param((ptr)0, PARAM_TYPE_INT); - if (!pduel->lua->check_condition(cost, 9)) { - return FALSE; - } - } - if(!neglect_target && target) { - pduel->lua->add_param(this, PARAM_TYPE_EFFECT); - pduel->lua->add_param(playerid, PARAM_TYPE_INT); - pduel->lua->add_param(e.event_cards , PARAM_TYPE_GROUP); - pduel->lua->add_param(e.event_player, PARAM_TYPE_INT); - pduel->lua->add_param(e.event_value, PARAM_TYPE_INT); - pduel->lua->add_param(e.reason_effect , PARAM_TYPE_EFFECT); - pduel->lua->add_param(e.reason, PARAM_TYPE_INT); - pduel->lua->add_param(e.reason_player, PARAM_TYPE_INT); - pduel->lua->add_param((ptr)0, PARAM_TYPE_INT); - if (!pduel->lua->check_condition(target, 9)) { - return FALSE; - } - } - return TRUE; -} -int32 effect::is_condition_check(uint8 playerid, const tevent& e) { - if(!(type & EFFECT_TYPE_ACTIVATE) && (handler->current.location & (LOCATION_ONFIELD | LOCATION_REMOVED)) && !handler->is_position(POS_FACEUP)) - return FALSE; - if(!condition) - return TRUE; - effect* oreason = pduel->game_field->core.reason_effect; - uint8 op = pduel->game_field->core.reason_player; - pduel->game_field->core.reason_effect = this; - pduel->game_field->core.reason_player = playerid; - pduel->game_field->save_lp_cost(); - pduel->lua->add_param(this, PARAM_TYPE_EFFECT); - pduel->lua->add_param(playerid, PARAM_TYPE_INT); - pduel->lua->add_param(e.event_cards , PARAM_TYPE_GROUP); - pduel->lua->add_param(e.event_player, PARAM_TYPE_INT); - pduel->lua->add_param(e.event_value, PARAM_TYPE_INT); - pduel->lua->add_param(e.reason_effect , PARAM_TYPE_EFFECT); - pduel->lua->add_param(e.reason, PARAM_TYPE_INT); - pduel->lua->add_param(e.reason_player, PARAM_TYPE_INT); - if(!pduel->lua->check_condition(condition, 8)) { - pduel->game_field->restore_lp_cost(); - pduel->game_field->core.reason_effect = oreason; - pduel->game_field->core.reason_player = op; - return FALSE; - } - pduel->game_field->restore_lp_cost(); - pduel->game_field->core.reason_effect = oreason; - pduel->game_field->core.reason_player = op; - return TRUE; -} -int32 effect::is_activate_check(uint8 playerid, const tevent& e, int32 neglect_cond, int32 neglect_cost, int32 neglect_target) { - pduel->game_field->save_lp_cost(); - effect* oreason = pduel->game_field->core.reason_effect; - uint8 op = pduel->game_field->core.reason_player; - pduel->game_field->core.reason_effect = this; - pduel->game_field->core.reason_player = playerid; - int32 result = is_activate_ready(playerid, e, neglect_cond, neglect_cost, neglect_target); - pduel->game_field->core.reason_effect = oreason; - pduel->game_field->core.reason_player = op; - pduel->game_field->restore_lp_cost(); - return result; -} -int32 effect::is_target(card* pcard) { - if(type & EFFECT_TYPE_ACTIONS) - return FALSE; - if((type & EFFECT_TYPE_SINGLE) || (type & EFFECT_TYPE_EQUIP)) - return TRUE; - if(pcard && !(flag & EFFECT_FLAG_SET_AVAILABLE) && (pcard->current.location & LOCATION_ONFIELD) - && !pcard->is_position(POS_FACEUP)) - return FALSE; - if(!(flag & EFFECT_FLAG_IGNORE_RANGE)) { - if(pcard->get_status(STATUS_SUMMONING + STATUS_SUMMON_DISABLED)) - return FALSE; - if(flag & EFFECT_FLAG_ABSOLUTE_TARGET) { - if(pcard->current.controler == 0) { - if (!(s_range & pcard->current.location)) - return FALSE; - } else { - if(!(o_range & pcard->current.location)) - return FALSE; - } - } else { - if(pcard->current.controler == get_handler_player()) { - if(!(s_range & pcard->current.location)) - return FALSE; - } else { - if(!(o_range & pcard->current.location)) - return FALSE; - } - } - } - if(target) { - pduel->lua->add_param(this, PARAM_TYPE_EFFECT); - pduel->lua->add_param(pcard, PARAM_TYPE_CARD); - if (!pduel->lua->check_condition(target, 2)) { - return FALSE; - } - } - return TRUE; -} -int32 effect::is_target_player(uint8 playerid) { - if(!(flag & EFFECT_FLAG_PLAYER_TARGET)) - return FALSE; - uint8 self = get_handler_player(); - if(flag & EFFECT_FLAG_ABSOLUTE_TARGET) { - if(s_range && playerid == 0 ) - return TRUE; - if(o_range && playerid == 1 ) - return TRUE; - } else { - if(s_range && self == playerid) - return TRUE; - if(o_range && self != playerid) - return TRUE; - } - return FALSE; -} -int32 effect::is_player_effect_target(card* pcard) { - if(target) { - handler->pduel->lua->add_param(this, PARAM_TYPE_EFFECT); - handler->pduel->lua->add_param(pcard, PARAM_TYPE_CARD); - if(!handler->pduel->lua->check_condition(target, 2)) { - return FALSE; - } - } - return TRUE; -} -int32 effect::is_immuned(effect_set_v* effects) { - effect* peffect; - for (int i = 0; i < effects->count; ++i) { - peffect = effects->at(i); - if(peffect->value) { - pduel->lua->add_param(this, PARAM_TYPE_EFFECT); - if(peffect->check_value_condition(1)) - return TRUE; - } - } - return FALSE; -} -int32 effect::is_chainable(uint8 tp) { - if(!(type & EFFECT_TYPE_ACTIONS)) - return FALSE; - int32 sp = get_speed(); - if((type & EFFECT_TYPE_ACTIVATE) && (sp <= 1) && !(flag & EFFECT_FLAG_COF)) - return FALSE; - if(pduel->game_field->core.current_chain.size()) { - if(!(flag & EFFECT_FLAG_FIELD_ONLY) && (type & EFFECT_TYPE_TRIGGER_O) - && (handler->current.location == LOCATION_HAND)) { - if(pduel->game_field->core.current_chain.rbegin()->triggering_effect->get_speed() > 2) - return FALSE; - } else if(sp < pduel->game_field->core.current_chain.rbegin()->triggering_effect->get_speed()) - return FALSE; - } - if(pduel->game_field->core.chain_limit) { - pduel->lua->add_param(this, PARAM_TYPE_EFFECT); - pduel->lua->add_param(pduel->game_field->core.chain_limp, PARAM_TYPE_INT); - pduel->lua->add_param(tp, PARAM_TYPE_INT); - if(!pduel->lua->check_condition(pduel->game_field->core.chain_limit, 3)) - return FALSE; - } - if(pduel->game_field->core.chain_limit_p) { - pduel->lua->add_param(this, PARAM_TYPE_EFFECT); - pduel->lua->add_param(pduel->game_field->core.chain_limp_p, PARAM_TYPE_INT); - pduel->lua->add_param(tp, PARAM_TYPE_INT); - if(!pduel->lua->check_condition(pduel->game_field->core.chain_limit_p, 3)) - return FALSE; - } - return TRUE; -} -//return: this can be reset by reset_level or not -//RESET_CODE can only reset single effects without EFFECT_FLAG_SINGLE_RANGE -//RESET_DISABLE is valid only when owner == handler -int32 effect::reset(uint32 reset_level, uint32 reset_type) { - switch (reset_type) { - case RESET_EVENT: { - if(!(reset_flag & RESET_EVENT)) - return FALSE; - if(owner != handler) - reset_level &= ~RESET_DISABLE; - if(reset_level & 0xffff0000 & reset_flag) - return TRUE; - return FALSE; - break; - } - case RESET_CARD: { - return owner && (owner->data.code == reset_level); - break; - } - case RESET_PHASE: { - if(!(reset_flag & RESET_PHASE)) - return FALSE; - uint8 pid = get_handler_player(); - uint8 tp = handler->pduel->game_field->infos.turn_player; - if((((reset_flag & RESET_SELF_TURN) && pid == tp) || ((reset_flag & RESET_OPPO_TURN) && pid != tp)) - && (reset_level & 0xff & reset_flag)) - reset_count--; - if((reset_count & 0xff) == 0) - return TRUE; - return FALSE; - break; - } - case RESET_CODE: { - return (code == reset_level) && (type & EFFECT_TYPE_SINGLE) && !(type & EFFECT_TYPE_ACTIONS) - && !(flag & EFFECT_FLAG_SINGLE_RANGE); - break; - } - case RESET_COPY: { - return copy_id == reset_level; - break; - } - } - return FALSE; -} -void effect::dec_count(uint32 playerid) { - if(!(flag & EFFECT_FLAG_COUNT_LIMIT)) - return; - if(count_code == 0) { - if((reset_count & 0xf00) == 0) - return; - reset_count -= 0x100; - } else { - uint32 code = count_code & 0xfffffff; - if(code == 1) - pduel->game_field->add_effect_code((count_code & 0xf0000000) | handler->fieldid, PLAYER_NONE); - else - pduel->game_field->add_effect_code(count_code, playerid); - } -} -void effect::recharge() { - if((flag & EFFECT_FLAG_COUNT_LIMIT) && (count_code == 0)) { - reset_count &= 0xf0ff; - reset_count |= (reset_count >> 4) & 0xf00; - } -} -int32 effect::get_value(uint32 extraargs) { - if(flag & EFFECT_FLAG_FUNC_VALUE) { - pduel->lua->add_param(this, PARAM_TYPE_EFFECT, TRUE); - int32 res = pduel->lua->get_function_value(value, 1 + extraargs); - return res; - } else { - pduel->lua->params.clear(); - return (int32)value; - } -} -int32 effect::get_value(card* pcard, uint32 extraargs) { - if(flag & EFFECT_FLAG_FUNC_VALUE) { - pduel->lua->add_param(pcard, PARAM_TYPE_CARD, TRUE); - pduel->lua->add_param(this, PARAM_TYPE_EFFECT, TRUE); - int32 res = pduel->lua->get_function_value(value, 2 + extraargs); - return res; - } else { - pduel->lua->params.clear(); - return (int32)value; - } -} -int32 effect::get_value(effect* peffect, uint32 extraargs) { - if(flag & EFFECT_FLAG_FUNC_VALUE) { - pduel->lua->add_param(peffect, PARAM_TYPE_EFFECT, TRUE); - pduel->lua->add_param(this, PARAM_TYPE_EFFECT, TRUE); - int32 res = pduel->lua->get_function_value(value, 2 + extraargs); - return res; - } else { - pduel->lua->params.clear(); - return (int32)value; - } -} -int32 effect::check_value_condition(uint32 extraargs) { - if(flag & EFFECT_FLAG_FUNC_VALUE) { - pduel->lua->add_param(this, PARAM_TYPE_EFFECT, TRUE); - int32 res = pduel->lua->check_condition(value, 1 + extraargs); - return res; - } else { - pduel->lua->params.clear(); - return (int32)value; - } -} -int32 effect::get_speed() { - if(!(type & EFFECT_TYPE_ACTIONS)) - return 0; - if(type & (EFFECT_TYPE_TRIGGER_O | EFFECT_TYPE_TRIGGER_F | EFFECT_TYPE_IGNITION)) - return 1; - else if(type & (EFFECT_TYPE_QUICK_O | EFFECT_TYPE_QUICK_F)) - return 2; - else if(type & EFFECT_TYPE_ACTIVATE) { - if(handler->data.type & TYPE_MONSTER) - return 0; - else if(handler->data.type & TYPE_SPELL) { - if(handler->data.type & TYPE_QUICKPLAY) - return 2; - return 1; - } else { - if (handler->data.type & TYPE_COUNTER) - return 3; - return 2; - } - } - return 0; -} -uint8 effect::get_owner_player() { - if(effect_owner != PLAYER_NONE) - return effect_owner; - return owner->current.controler; -} -uint8 effect::get_handler_player() { - if(flag & EFFECT_FLAG_FIELD_ONLY) - return effect_owner; - return handler->current.controler; -} -int32 effect::in_range(int32 loc, int32 seq) { - if(loc != LOCATION_SZONE) - return range & loc; - if(seq < 5) - return range & LOCATION_SZONE; - if(seq == 5) - return range & (LOCATION_SZONE | LOCATION_FZONE); - return range & LOCATION_PZONE; -} diff --git a/ocgcore/effect.h b/ocgcore/effect.h deleted file mode 100644 index e35307eb88..0000000000 --- a/ocgcore/effect.h +++ /dev/null @@ -1,454 +0,0 @@ -/* - * effect.h - * - * Created on: 2010-3-13 - * Author: Argon - */ - -#ifndef EFFECT_H_ -#define EFFECT_H_ - -#include "common.h" -#include "field.h" -#include "effectset.h" -#include -#include -#include - -using namespace std; - -class card; -class duel; -class group; -class effect; -struct tevent; -struct effect_set; -struct effect_set_v; - -class effect { -public: - int32 scrtype; - int32 ref_handle; - duel* pduel; - card* owner; - card* handler; - uint8 effect_owner; - uint32 description; - uint32 code; - uint32 flag; - uint32 id; - uint16 type; - uint16 copy_id; - uint16 range; - uint16 s_range; - uint16 o_range; - uint16 reset_count; - uint32 reset_flag; - uint32 count_code; - uint32 category; - uint32 label; - uint32 hint_timing[2]; - uint32 card_type; - uint32 active_type; - uint16 field_ref; - uint16 status; - void* label_object; - int32 condition; - int32 cost; - int32 target; - int32 value; - int32 operation; - - explicit effect(duel* pd); - ~effect(); - - int32 is_disable_related(); - int32 is_available(); - int32 check_count_limit(uint8 playerid); - int32 is_activateable(uint8 playerid, const tevent& e, int32 neglect_cond = FALSE, int32 neglect_cost = FALSE, int32 neglect_target = FALSE); - int32 is_action_check(uint8 playerid); - int32 is_activate_ready(uint8 playerid, const tevent& e, int32 neglect_cond = FALSE, int32 neglect_cost = FALSE, int32 neglect_target = FALSE); - int32 is_condition_check(uint8 playerid, const tevent& e); - int32 is_activate_check(uint8 playerid, const tevent& e, int32 neglect_cond = FALSE, int32 neglect_cost = FALSE, int32 neglect_target = FALSE); - int32 is_target(card* pcard); - int32 is_target_player(uint8 playerid); - int32 is_player_effect_target(card* pcard); - int32 is_immuned(effect_set_v* effects); - int32 is_chainable(uint8 tp); - int32 reset(uint32 reset_level, uint32 reset_type); - void dec_count(uint32 playerid = 2); - void recharge(); - int32 get_value(uint32 extraargs = 0); - int32 get_value(card* pcard, uint32 extraargs = 0); - int32 get_value(effect* peffect, uint32 extraargs = 0); - int32 check_value_condition(uint32 extraargs = 0); - int32 get_speed(); - uint8 get_owner_player(); - uint8 get_handler_player(); - int32 in_range(int32 loc, int32 seq); -}; - -//status -#define EFFECT_STATUS_AVAILABLE 0x0001 -#define EFFECT_STATUS_ACTIVATED 0x0002 - -#define EFFECT_COUNT_CODE_OATH 0x10000000 -#define EFFECT_COUNT_CODE_DUEL 0x20000000 - -//========== Reset ========== -#define RESET_DRAW PHASE_DRAW -#define RESET_STANDBY PHASE_STANDBY -#define RESET_MAIN1 PHASE_MAIN1 -#define RESET_BATTLE PHASE_BATTLE -#define RESET_DAMAGE PHASE_DAMAGE -#define RESET_DAMAGE_CAL PHASE_DAMAGE_CAL -#define RESET_MAIN2 PHASE_MAIN2 -#define RESET_END PHASE_END -#define RESET_SELF_TURN 0x0100 -#define RESET_OPPO_TURN 0x0200 -#define RESET_PHASE 0x0400 -#define RESET_CHAIN 0x0800 -#define RESET_EVENT 0x1000 -#define RESET_CARD 0x2000 -#define RESET_CODE 0x4000 -#define RESET_COPY 0x8000 - -#define RESET_DISABLE 0x00010000 -#define RESET_TURN_SET 0x00020000 -#define RESET_TOGRAVE 0x00040000 -#define RESET_REMOVE 0x00080000 -#define RESET_TEMP_REMOVE 0x00100000 -#define RESET_TOHAND 0x00200000 -#define RESET_TODECK 0x00400000 -#define RESET_LEAVE 0x00800000 -#define RESET_TOFIELD 0x01000000 -#define RESET_CONTROL 0x02000000 -#define RESET_OVERLAY 0x04000000 -#define RESET_MSCHANGE 0x08000000 - -//========== Types ========== -#define EFFECT_TYPE_SINGLE 0x0001 // -#define EFFECT_TYPE_FIELD 0x0002 // -#define EFFECT_TYPE_EQUIP 0x0004 // -#define EFFECT_TYPE_ACTIONS 0x0008 // -#define EFFECT_TYPE_ACTIVATE 0x0010 // -#define EFFECT_TYPE_FLIP 0x0020 // -#define EFFECT_TYPE_IGNITION 0x0040 // -#define EFFECT_TYPE_TRIGGER_O 0x0080 // -#define EFFECT_TYPE_QUICK_O 0x0100 // -#define EFFECT_TYPE_TRIGGER_F 0x0200 // -#define EFFECT_TYPE_QUICK_F 0x0400 // -#define EFFECT_TYPE_CONTINUOUS 0x0800 // - -//========== Flags ========== -#define EFFECT_FLAG_INITIAL 0x0001 // -#define EFFECT_FLAG_FUNC_VALUE 0x0002 // -#define EFFECT_FLAG_COUNT_LIMIT 0x0004 // -#define EFFECT_FLAG_FIELD_ONLY 0x0008 // -#define EFFECT_FLAG_CARD_TARGET 0x0010 // -#define EFFECT_FLAG_IGNORE_RANGE 0x0020 // -#define EFFECT_FLAG_ABSOLUTE_TARGET 0x0040 // -#define EFFECT_FLAG_IGNORE_IMMUNE 0x0080 // -#define EFFECT_FLAG_SET_AVAILABLE 0x0100 // -#define EFFECT_FLAG_CONTINUOUS 0x0200 // -#define EFFECT_FLAG_CANNOT_DISABLE 0x0400 // -#define EFFECT_FLAG_PLAYER_TARGET 0x0800 // -#define EFFECT_FLAG_BOTH_SIDE 0x1000 // -#define EFFECT_FLAG_COPY_INHERIT 0x2000 // -#define EFFECT_FLAG_DAMAGE_STEP 0x4000 // -#define EFFECT_FLAG_DAMAGE_CAL 0x8000 // -#define EFFECT_FLAG_DELAY 0x10000 // -#define EFFECT_FLAG_SINGLE_RANGE 0x20000 // -#define EFFECT_FLAG_UNCOPYABLE 0x40000 // -#define EFFECT_FLAG_OATH 0x80000 // -#define EFFECT_FLAG_SPSUM_PARAM 0x100000 // -#define EFFECT_FLAG_REPEAT 0x200000 // -#define EFFECT_FLAG_NO_TURN_RESET 0x400000 // -#define EFFECT_FLAG_EVENT_PLAYER 0x800000 // -#define EFFECT_FLAG_OWNER_RELATE 0x1000000 // -#define EFFECT_FLAG_AVAILABLE_BD 0x2000000 // -#define EFFECT_FLAG_CLIENT_HINT 0x4000000 // -#define EFFECT_FLAG_CHAIN_UNIQUE 0x8000000 // -#define EFFECT_FLAG_NAGA 0x10000000 // -#define EFFECT_FLAG_COF 0x20000000 // -#define EFFECT_FLAG_CVAL_CHECK 0x40000000 // -#define EFFECT_FLAG_IMMEDIATELY_APPLY 0x80000000 // -//========== Codes ========== -#define EFFECT_IMMUNE_EFFECT 1 // -#define EFFECT_DISABLE 2 // -#define EFFECT_CANNOT_DISABLE 3 // -#define EFFECT_SET_CONTROL 4 // -#define EFFECT_CANNOT_CHANGE_CONTROL 5 // -#define EFFECT_CANNOT_ACTIVATE 6 // -#define EFFECT_CANNOT_TRIGGER 7 // -#define EFFECT_DISABLE_EFFECT 8 // -#define EFFECT_DISABLE_CHAIN 9 // -#define EFFECT_DISABLE_TRAPMONSTER 10 // -#define EFFECT_CANNOT_INACTIVATE 12 // -#define EFFECT_CANNOT_DISEFFECT 13 // -#define EFFECT_CANNOT_CHANGE_POSITION 14 // -#define EFFECT_TRAP_ACT_IN_HAND 15 // -#define EFFECT_TRAP_ACT_IN_SET_TURN 16 // -#define EFFECT_REMAIN_FIELD 17 // -#define EFFECT_MONSTER_SSET 18 // -#define EFFECT_CANNOT_SUMMON 20 // -#define EFFECT_CANNOT_FLIP_SUMMON 21 // -#define EFFECT_CANNOT_SPECIAL_SUMMON 22 // -#define EFFECT_CANNOT_MSET 23 // -#define EFFECT_CANNOT_SSET 24 // -#define EFFECT_CANNOT_DRAW 25 // -#define EFFECT_CANNOT_DISABLE_SUMMON 26 // -#define EFFECT_CANNOT_DISABLE_SPSUMMON 27 // -#define EFFECT_SET_SUMMON_COUNT_LIMIT 28 // -#define EFFECT_EXTRA_SUMMON_COUNT 29 // -#define EFFECT_SPSUMMON_CONDITION 30 // -#define EFFECT_REVIVE_LIMIT 31 // -#define EFFECT_SUMMON_PROC 32 // -#define EFFECT_LIMIT_SUMMON_PROC 33 // -#define EFFECT_SPSUMMON_PROC 34 // -#define EFFECT_EXTRA_SET_COUNT 35 // -#define EFFECT_SET_PROC 36 // -#define EFFECT_LIMIT_SET_PROC 37 // -#define EFFECT_DEVINE_LIGHT 38 // -#define EFFECT_CANNOT_DISABLE_FLIP_SUMMON 39 // -#define EFFECT_INDESTRUCTABLE 40 // -#define EFFECT_INDESTRUCTABLE_EFFECT 41 // -#define EFFECT_INDESTRUCTABLE_BATTLE 42 // -#define EFFECT_UNRELEASABLE_SUM 43 // -#define EFFECT_UNRELEASABLE_NONSUM 44 // -#define EFFECT_DESTROY_SUBSTITUTE 45 // -#define EFFECT_CANNOT_RELEASE 46 // -#define EFFECT_INDESTRUCTABLE_COUNT 47 // -#define EFFECT_UNRELEASABLE_EFFECT 48 // -#define EFFECT_DESTROY_REPLACE 50 // -#define EFFECT_RELEASE_REPLACE 51 // -#define EFFECT_SEND_REPLACE 52 // -#define EFFECT_CANNOT_DISCARD_HAND 55 // -#define EFFECT_CANNOT_DISCARD_DECK 56 // -#define EFFECT_CANNOT_USE_AS_COST 57 // -#define EFFECT_CANNOT_PLACE_COUNTER 58 // - -#define EFFECT_LEAVE_FIELD_REDIRECT 60 // -#define EFFECT_TO_HAND_REDIRECT 61 // -#define EFFECT_TO_DECK_REDIRECT 62 // -#define EFFECT_TO_GRAVE_REDIRECT 63 // -#define EFFECT_REMOVE_REDIRECT 64 // -#define EFFECT_CANNOT_TO_HAND 65 // -#define EFFECT_CANNOT_TO_DECK 66 // -#define EFFECT_CANNOT_REMOVE 67 // -#define EFFECT_CANNOT_TO_GRAVE 68 // -#define EFFECT_CANNOT_TURN_SET 69 // -#define EFFECT_CANNOT_BE_BATTLE_TARGET 70 // -#define EFFECT_CANNOT_BE_EFFECT_TARGET 71 // -#define EFFECT_IGNORE_BATTLE_TARGET 72 // -#define EFFECT_CANNOT_DIRECT_ATTACK 73 // -#define EFFECT_DIRECT_ATTACK 74 // -#define EFFECT_DUAL_STATUS 75 // -#define EFFECT_EQUIP_LIMIT 76 // -#define EFFECT_DUAL_SUMMONABLE 77 // -#define EFFECT_REVERSE_DAMAGE 80 // -#define EFFECT_REVERSE_RECOVER 81 // -#define EFFECT_CHANGE_DAMAGE 82 // -#define EFFECT_REFLECT_DAMAGE 83 // -#define EFFECT_CANNOT_ATTACK 85 // -#define EFFECT_CANNOT_ATTACK_ANNOUNCE 86 // -#define EFFECT_CANNOT_CHANGE_POS_E 87 // -#define EFFECT_ACTIVATE_COST 90 // -#define EFFECT_SUMMON_COST 91 // -#define EFFECT_SPSUMMON_COST 92 // -#define EFFECT_FLIPSUMMON_COST 93 // -#define EFFECT_MSET_COST 94 // -#define EFFECT_SSET_COST 95 // -#define EFFECT_ATTACK_COST 96 // - -#define EFFECT_UPDATE_ATTACK 100 // -#define EFFECT_SET_ATTACK 101 // -#define EFFECT_SET_ATTACK_FINAL 102 // -#define EFFECT_SET_BASE_ATTACK 103 // -#define EFFECT_UPDATE_DEFENCE 104 // -#define EFFECT_SET_DEFENCE 105 // -#define EFFECT_SET_DEFENCE_FINAL 106 // -#define EFFECT_SET_BASE_DEFENCE 107 // -#define EFFECT_REVERSE_UPDATE 108 // -#define EFFECT_SWAP_AD 109 // -#define EFFECT_SWAP_BASE_AD 110 // -#define EFFECT_ADD_CODE 113 // -#define EFFECT_CHANGE_CODE 114 // -#define EFFECT_ADD_TYPE 115 // -#define EFFECT_REMOVE_TYPE 116 // -#define EFFECT_CHANGE_TYPE 117 // -#define EFFECT_ADD_RACE 120 // -#define EFFECT_REMOVE_RACE 121 // -#define EFFECT_CHANGE_RACE 122 // -#define EFFECT_ADD_ATTRIBUTE 125 // -#define EFFECT_REMOVE_ATTRIBUTE 126 // -#define EFFECT_CHANGE_ATTRIBUTE 127 // -#define EFFECT_UPDATE_LEVEL 130 // -#define EFFECT_CHANGE_LEVEL 131 // -#define EFFECT_UPDATE_RANK 132 // -#define EFFECT_CHANGE_RANK 133 // -#define EFFECT_UPDATE_LSCALE 134 // -#define EFFECT_CHANGE_LSCALE 135 // -#define EFFECT_UPDATE_RSCALE 136 // -#define EFFECT_CHANGE_RSCALE 137 // -#define EFFECT_SET_POSITION 140 // -#define EFFECT_SELF_DESTROY 141 // -#define EFFECT_SELF_TOGRAVE 142 -#define EFFECT_DOUBLE_TRIBUTE 150 -#define EFFECT_DECREASE_TRIBUTE 151 -#define EFFECT_DECREASE_TRIBUTE_SET 152 -#define EFFECT_EXTRA_RELEASE 153 -#define EFFECT_TRIBUTE_LIMIT 154 -#define EFFECT_EXTRA_RELEASE_SUM 155 -#define EFFECT_PUBLIC 160 -#define EFFECT_COUNTER_PERMIT 0x10000 -#define EFFECT_COUNTER_LIMIT 0x20000 -#define EFFECT_RCOUNTER_REPLACE 0x30000 -#define EFFECT_LPCOST_CHANGE 170 -#define EFFECT_LPCOST_REPLACE 171 -#define EFFECT_SKIP_DP 180 -#define EFFECT_SKIP_SP 181 -#define EFFECT_SKIP_M1 182 -#define EFFECT_SKIP_BP 183 -#define EFFECT_SKIP_M2 184 -#define EFFECT_CANNOT_BP 185 -#define EFFECT_CANNOT_M2 186 -#define EFFECT_CANNOT_EP 187 -#define EFFECT_SKIP_TURN 188 -#define EFFECT_DEFENCE_ATTACK 190 -#define EFFECT_MUST_ATTACK 191 -#define EFFECT_FIRST_ATTACK 192 -#define EFFECT_ATTACK_ALL 193 -#define EFFECT_EXTRA_ATTACK 194 -#define EFFECT_MUST_BE_ATTACKED 195 -#define EFFECT_AUTO_BE_ATTACKED 196 -#define EFFECT_ATTACK_DISABLED 197 -#define EFFECT_NO_BATTLE_DAMAGE 200 -#define EFFECT_AVOID_BATTLE_DAMAGE 201 -#define EFFECT_REFLECT_BATTLE_DAMAGE 202 -#define EFFECT_PIERCE 203 -#define EFFECT_BATTLE_DESTROY_REDIRECT 204 -#define EFFECT_BATTLE_DAMAGE_TO_EFFECT 205 -#define EFFECT_TOSS_COIN_REPLACE 220 -#define EFFECT_TOSS_DICE_REPLACE 221 -#define EFFECT_FUSION_MATERIAL 230 -#define EFFECT_CHAIN_MATERIAL 231 -#define EFFECT_SYNCHRO_MATERIAL 232 -#define EFFECT_XYZ_MATERIAL 233 -#define EFFECT_FUSION_SUBSTITUTE 234 -#define EFFECT_CANNOT_BE_FUSION_MATERIAL 235 -#define EFFECT_CANNOT_BE_SYNCHRO_MATERIAL 236 -#define EFFECT_SYNCHRO_MATERIAL_CUSTOM 237 -#define EFFECT_CANNOT_BE_XYZ_MATERIAL 238 -#define EFFECT_SYNCHRO_LEVEL 240 -#define EFFECT_RITUAL_LEVEL 241 -#define EFFECT_XYZ_LEVEL 242 -#define EFFECT_EXTRA_RITUAL_MATERIAL 243 -#define EFFECT_NONTUNER 244 -#define EFFECT_OVERLAY_REMOVE_REPLACE 245 -#define EFFECT_SCRAP_CHIMERA 246 -#define EFFECT_SPSUM_EFFECT_ACTIVATED 250 -#define EFFECT_MATERIAL_CHECK 251 -#define EFFECT_DISABLE_FIELD 260 -#define EFFECT_USE_EXTRA_MZONE 261 -#define EFFECT_USE_EXTRA_SZONE 262 -#define EFFECT_MAX_MZONE 263 -#define EFFECT_MAX_SZONE 264 -#define EFFECT_HAND_LIMIT 270 -#define EFFECT_DRAW_COUNT 271 -#define EFFECT_SPIRIT_DONOT_RETURN 280 -#define EFFECT_SPIRIT_MAYNOT_RETURN 281 -#define EFFECT_CHANGE_ENVIRONMENT 290 -#define EFFECT_NECRO_VALLEY 291 -#define EFFECT_FORBIDDEN 292 -#define EFFECT_NECRO_VALLEY_IM 293 -#define EFFECT_REVERSE_DECK 294 -#define EFFECT_REMOVE_BRAINWASHING 295 -#define EFFECT_BP_TWICE 296 -#define EFFECT_UNIQUE_CHECK 297 -#define EFFECT_MATCH_KILL 300 -#define EFFECT_SYNCHRO_CHECK 310 -#define EFFECT_QP_ACT_IN_NTPHAND 311 -#define EFFECT_MUST_BE_SMATERIAL 312 -#define EFFECT_TO_GRAVE_REDIRECT_CB 313 -#define EFFECT_CHANGE_LEVEL_FINAL 314 -#define EFFECT_CHANGE_RANK_FINAL 315 -#define EFFECT_SPSUMMON_PROC_G 320 -#define EFFECT_SPSUMMON_COUNT_LIMIT 330 -#define EFFECT_LEFT_SPSUMMON_COUNT 331 -#define EFFECT_CANNOT_SELECT_BATTLE_TARGET 332 -#define EFFECT_CANNOT_SELECT_EFFECT_TARGET 333 -#define EFFECT_ADD_SETCODE 334 -#define EFFECT_NO_EFFECT_DAMAGE 335 -#define EFFECT_UNSUMMONABLE_CARD 336 - -#define EVENT_STARTUP 1000 -#define EVENT_FLIP 1001 -#define EVENT_FREE_CHAIN 1002 -#define EVENT_DESTROY 1010 -#define EVENT_REMOVE 1011 -#define EVENT_TO_HAND 1012 -#define EVENT_TO_DECK 1013 -#define EVENT_TO_GRAVE 1014 -#define EVENT_LEAVE_FIELD 1015 -#define EVENT_CHANGE_POS 1016 -#define EVENT_RELEASE 1017 -#define EVENT_DISCARD 1018 -#define EVENT_LEAVE_FIELD_P 1019 -#define EVENT_CHAIN_SOLVING 1020 -#define EVENT_CHAIN_ACTIVATING 1021 -#define EVENT_CHAIN_SOLVED 1022 -#define EVENT_CHAIN_ACTIVATED 1023 -#define EVENT_CHAIN_NEGATED 1024 -#define EVENT_CHAIN_DISABLED 1025 -#define EVENT_CHAIN_END 1026 -#define EVENT_CHAINING 1027 -#define EVENT_BECOME_TARGET 1028 -#define EVENT_DESTROYED 1029 -#define EVENT_ADJUST 1040 -#define EVENT_SUMMON_SUCCESS 1100 -#define EVENT_FLIP_SUMMON_SUCCESS 1101 -#define EVENT_SPSUMMON_SUCCESS 1102 -#define EVENT_SUMMON 1103 -#define EVENT_FLIP_SUMMON 1104 -#define EVENT_SPSUMMON 1105 -#define EVENT_MSET 1106 -#define EVENT_SSET 1107 -#define EVENT_BE_MATERIAL 1108 -#define EVENT_BE_PRE_MATERIAL 1109 -#define EVENT_DRAW 1110 -#define EVENT_DAMAGE 1111 -#define EVENT_RECOVER 1112 -#define EVENT_PREDRAW 1113 -#define EVENT_CONTROL_CHANGED 1120 -#define EVENT_EQUIP 1121 -#define EVENT_ATTACK_ANNOUNCE 1130 -#define EVENT_BE_BATTLE_TARGET 1131 -#define EVENT_BATTLE_START 1132 -#define EVENT_BATTLE_CONFIRM 1133 -#define EVENT_PRE_DAMAGE_CALCULATE 1134 -#define EVENT_DAMAGE_CALCULATING 1135 -#define EVENT_PRE_BATTLE_DAMAGE 1136 -#define EVENT_BATTLE_END 1137 -#define EVENT_BATTLED 1138 -#define EVENT_BATTLE_DESTROYING 1139 -#define EVENT_BATTLE_DESTROYED 1140 -#define EVENT_DAMAGE_STEP_END 1141 -#define EVENT_ATTACK_DISABLED 1142 -#define EVENT_BATTLE_DAMAGE 1143 -#define EVENT_TOSS_DICE 1150 -#define EVENT_TOSS_COIN 1151 -#define EVENT_TOSS_COIN_NEGATE 1152 -#define EVENT_TOSS_DICE_NEGATE 1153 -#define EVENT_LEVEL_UP 1200 -#define EVENT_PAY_LPCOST 1201 -#define EVENT_DETACH_MATERIAL 1202 -#define EVENT_RETURN_TO_GRAVE 1203 -#define EVENT_TURN_END 1210 -#define EVENT_PHASE 0x1000 -#define EVENT_PHASE_START 0x2000 -#define EVENT_PHASE_PRESTART 0x2100 -#define EVENT_ADD_COUNTER 0x10000 -#define EVENT_REMOVE_COUNTER 0x20000 - -#endif /* EFFECT_H_ */ diff --git a/ocgcore/effectset.h b/ocgcore/effectset.h deleted file mode 100644 index 0c16211373..0000000000 --- a/ocgcore/effectset.h +++ /dev/null @@ -1,105 +0,0 @@ -/* - * effectset.h - * - * Created on: 2011-10-8 - * Author: Argon - */ - -#ifndef EFFECTSET_H_ -#define EFFECTSET_H_ - -#include -#include -#include -#include - -class effect; - -bool effect_sort_id(const effect* e1, const effect* e2); - -struct effect_set { - effect_set(): count(0) {} - void add_item(effect* peffect) { - if(count >= 64) return; - container[count++] = peffect; - } - void remove_item(int index) { - if(index >= count) - return; - if(index == count - 1) { - count--; - return; - } - for(int i = index; i < count - 1; ++i) - container[i] = container[i + 1]; - count--; - } - void clear() { - count = 0; - } - int size() const { - return count; - } - void sort() { - if(count < 2) - return; - std::sort(container.begin(), container.begin() + count, effect_sort_id); - } - effect* const& get_last() const { - return container[count - 1]; - } - effect*& get_last() { - return container[count - 1]; - } - effect* const& operator[] (int index) const { - return container[index]; - } - effect*& operator[] (int index) { - return container[index]; - } - effect* const& at(int index) const { - return container[index]; - } - effect*& at(int index) { - return container[index]; - } -private: - std::array container; - int count; -}; - -struct effect_set_v { - effect_set_v(): count(0) {} - void add_item(effect* peffect) { - container.push_back(peffect); - count++; - } - void remove_item(int index) { - if(index >= count) - return; - container.erase(container.begin() + index); - count--; - } - void clear() { - container.clear(); - count = 0; - } - void sort() { - if(count < 2) - return; - std::sort(container.begin(), container.begin() + count, effect_sort_id); - } - effect*& get_last() { - return container[count - 1]; - } - effect*& operator[] (int index) { - return container[index]; - } - effect*& at(int index) { - return container[index]; - } - std::vector container; - int count; -}; - -#endif //EFFECTSET_H_ diff --git a/ocgcore/field.cpp b/ocgcore/field.cpp deleted file mode 100644 index 329e70502f..0000000000 --- a/ocgcore/field.cpp +++ /dev/null @@ -1,2289 +0,0 @@ -/* - * field.cpp - * - * Created on: 2010-7-21 - * Author: Argon - */ - -#include "field.h" -#include "duel.h" -#include "card.h" -#include "group.h" -#include "effect.h" -#include "interpreter.h" -#include -#include -#include - -int32 field::field_used_count[32] = {0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5}; - -bool chain::chain_operation_sort(const chain& c1, const chain& c2) { - return c1.triggering_effect->id < c2.triggering_effect->id; -} -bool tevent::operator< (const tevent& v) const { - return memcmp(this, &v, sizeof(tevent)) < 0; -} -field::field(duel* pduel) { - this->pduel = pduel; - infos.field_id = 1; - infos.copy_id = 1; - infos.can_shuffle = TRUE; - infos.turn_id = 0; - infos.card_id = 1; - infos.phase = 0; - infos.turn_player = 0; - for (int i = 0; i < 2; ++i) { - cost[i].count = 0; - cost[i].amount = 0; - core.hint_timing[i] = 0; - player[i].lp = 8000; - player[i].start_count = 5; - player[i].draw_count = 1; - player[i].disabled_location = 0; - player[i].used_location = 0; - player[i].extra_p_count = 0; - player[i].list_mzone.reserve(5); - player[i].list_szone.reserve(8); - player[i].list_main.reserve(45); - player[i].list_hand.reserve(10); - player[i].list_grave.reserve(30); - player[i].list_remove.reserve(30); - player[i].list_extra.reserve(15); - for(int j = 0; j < 5; ++j) - player[i].list_mzone.push_back(0); - for(int j = 0; j < 8; ++j) - player[i].list_szone.push_back(0); - core.shuffle_deck_check[i] = FALSE; - core.shuffle_hand_check[i] = FALSE; - } - core.pre_field[0] = 0; - core.pre_field[1] = 0; - for (int i = 0; i < 5; ++i) - core.opp_mzone[i] = 0; - core.summoning_card = 0; - core.summon_depth = 0; - core.summon_cancelable = FALSE; - core.chain_limit = 0; - core.chain_limit_p = 0; - core.chain_solving = FALSE; - core.conti_solving = FALSE; - core.conti_player = PLAYER_NONE; - core.win_player = 5; - core.win_reason = 0; - core.reason_effect = 0; - core.reason_player = PLAYER_NONE; - core.selfdes_disabled = FALSE; - core.flip_delayed = FALSE; - core.overdraw[0] = FALSE; - core.overdraw[1] = FALSE; - core.check_level = 0; - core.limit_tuner = 0; - core.limit_xyz = 0; - core.limit_syn = 0; - core.duel_options = 0; - core.attacker = 0; - core.attack_target = 0; - core.attack_rollback = FALSE; - core.deck_reversed = FALSE; - core.remove_brainwashing = FALSE; - core.effect_damage_step = FALSE; - core.shuffle_check_disabled = FALSE; - core.global_flag = 0; - nil_event.event_code = 0; - nil_event.event_cards = 0; - nil_event.event_player = PLAYER_NONE; - nil_event.event_value = 0; - nil_event.reason = 0; - nil_event.reason_effect = 0; - nil_event.reason_player = PLAYER_NONE; -} -field::~field() { - -} -void field::reload_field_info() { - pduel->write_buffer8(MSG_RELOAD_FIELD); - card* pcard; - for(int playerid = 0; playerid < 2; ++playerid) { - pduel->write_buffer32(player[playerid].lp); - for(uint32 i = 0; i < 5; ++i) { - pcard = player[playerid].list_mzone[i]; - if(pcard) { - pduel->write_buffer8(1); - pduel->write_buffer8(pcard->current.position); - pduel->write_buffer8(pcard->xyz_materials.size()); - } else { - pduel->write_buffer8(0); - } - } - for(uint32 i = 0; i < 8; ++i) { - pcard = player[playerid].list_szone[i]; - if(pcard) { - pduel->write_buffer8(1); - pduel->write_buffer8(pcard->current.position); - } else { - pduel->write_buffer8(0); - } - } - pduel->write_buffer8(player[playerid].list_main.size()); - pduel->write_buffer8(player[playerid].list_hand.size()); - pduel->write_buffer8(player[playerid].list_grave.size()); - pduel->write_buffer8(player[playerid].list_remove.size()); - pduel->write_buffer8(player[playerid].list_extra.size()); - pduel->write_buffer8(player[playerid].extra_p_count); - } - pduel->write_buffer8(core.current_chain.size()); - for(auto chit = core.current_chain.begin(); chit != core.current_chain.end(); ++chit) { - effect* peffect = chit->triggering_effect; - pduel->write_buffer32(peffect->handler->data.code); - pduel->write_buffer32(peffect->handler->get_info_location()); - pduel->write_buffer8(chit->triggering_controler); - pduel->write_buffer8(chit->triggering_location); - pduel->write_buffer8(chit->triggering_sequence); - pduel->write_buffer32(peffect->description); - } -} - -void field::add_card(uint8 playerid, card* pcard, uint8 location, uint8 sequence) { - if (pcard->current.location != 0) - return; - if (!is_location_useable(playerid, location, sequence)) - return; - if((pcard->data.type & (TYPE_FUSION | TYPE_SYNCHRO | TYPE_XYZ)) && (location & (LOCATION_HAND | LOCATION_DECK))) { - location = LOCATION_EXTRA; - pcard->operation_param = (pcard->operation_param & 0x00ffffff) | (POS_FACEDOWN_DEFENCE << 24); - } - pcard->current.controler = playerid; - pcard->current.location = location; - switch (location) { - case LOCATION_MZONE: - player[playerid].list_mzone[sequence] = pcard; - pcard->current.sequence = sequence; - break; - case LOCATION_SZONE: - player[playerid].list_szone[sequence] = pcard; - pcard->current.sequence = sequence; - break; - case LOCATION_DECK: - if (sequence == 0) { //deck top - player[playerid].list_main.push_back(pcard); - pcard->current.sequence = player[playerid].list_main.size() - 1; - pcard->current.position = POS_FACEUP_ATTACK; - } else if (sequence == 1) { //deck button - player[playerid].list_main.insert(player[playerid].list_main.begin(), pcard); - reset_sequence(playerid, LOCATION_DECK); - pcard->current.position = POS_FACEDOWN; - } else { //deck top & shuffle - player[playerid].list_main.push_back(pcard); - pcard->current.sequence = player[playerid].list_main.size() - 1; - if(!core.shuffle_check_disabled) - core.shuffle_deck_check[playerid] = TRUE; - pcard->current.position = POS_FACEDOWN; - } - break; - case LOCATION_HAND: - player[playerid].list_hand.push_back(pcard); - pcard->current.sequence = player[playerid].list_hand.size() - 1; - if(!(pcard->current.reason & REASON_DRAW) && !core.shuffle_check_disabled) - core.shuffle_hand_check[playerid] = TRUE; - break; - case LOCATION_GRAVE: - player[playerid].list_grave.push_back(pcard); - pcard->current.sequence = player[playerid].list_grave.size() - 1; - break; - case LOCATION_REMOVED: - player[playerid].list_remove.push_back(pcard); - pcard->current.sequence = player[playerid].list_remove.size() - 1; - break; - case LOCATION_EXTRA: - player[playerid].list_extra.push_back(pcard); - pcard->current.sequence = player[playerid].list_extra.size() - 1; - break; - } - pcard->apply_field_effect(); - pcard->fieldid = infos.field_id++; - pcard->fieldid_r = pcard->fieldid; - pcard->turnid = infos.turn_id; - if (location == LOCATION_MZONE) - player[playerid].used_location |= 1 << sequence; - if (location == LOCATION_SZONE) - player[playerid].used_location |= 256 << sequence; -} -void field::remove_card(card* pcard) { - if (pcard->current.controler == PLAYER_NONE || pcard->current.location == 0) - return; - uint8 playerid = pcard->current.controler; - switch (pcard->current.location) { - case LOCATION_MZONE: - player[playerid].list_mzone[pcard->current.sequence] = 0; - break; - case LOCATION_SZONE: - player[playerid].list_szone[pcard->current.sequence] = 0; - break; - case LOCATION_DECK: - player[playerid].list_main.erase(player[playerid].list_main.begin() + pcard->current.sequence); - reset_sequence(playerid, LOCATION_DECK); - if(!core.shuffle_check_disabled) - core.shuffle_deck_check[playerid] = TRUE; - break; - case LOCATION_HAND: - player[playerid].list_hand.erase(player[playerid].list_hand.begin() + pcard->current.sequence); - reset_sequence(playerid, LOCATION_HAND); - break; - case LOCATION_GRAVE: - player[playerid].list_grave.erase(player[playerid].list_grave.begin() + pcard->current.sequence); - reset_sequence(playerid, LOCATION_GRAVE); - break; - case LOCATION_REMOVED: - player[playerid].list_remove.erase(player[playerid].list_remove.begin() + pcard->current.sequence); - reset_sequence(playerid, LOCATION_REMOVED); - break; - case LOCATION_EXTRA: - player[playerid].list_extra.erase(player[playerid].list_extra.begin() + pcard->current.sequence); - reset_sequence(playerid, LOCATION_EXTRA); - break; - } - pcard->cancel_field_effect(); - if (pcard->current.location == LOCATION_MZONE) - player[playerid].used_location &= ~(1 << pcard->current.sequence); - if (pcard->current.location == LOCATION_SZONE) - player[playerid].used_location &= ~(256 << pcard->current.sequence); - pcard->previous.controler = pcard->current.controler; - pcard->previous.location = pcard->current.location; - pcard->previous.sequence = pcard->current.sequence; - pcard->previous.position = pcard->current.position; - pcard->current.controler = PLAYER_NONE; - pcard->current.location = 0; - pcard->current.sequence = 0; -} -void field::move_card(uint8 playerid, card* pcard, uint8 location, uint8 sequence) { - if (!is_location_useable(playerid, location, sequence)) - return; - uint8 preplayer = pcard->current.controler; - uint8 presequence = pcard->current.sequence; - if((pcard->data.type & (TYPE_FUSION | TYPE_SYNCHRO | TYPE_XYZ)) && (location & (LOCATION_HAND | LOCATION_DECK))) { - location = LOCATION_EXTRA; - pcard->operation_param = (pcard->operation_param & 0x00ffffff) | (POS_FACEDOWN_DEFENCE << 24); - } - if (pcard->current.location) { - if (pcard->current.location == location) { - if (pcard->current.location == LOCATION_DECK) { - if(preplayer == playerid) { - pduel->write_buffer8(MSG_MOVE); - pduel->write_buffer32(pcard->data.code); - pduel->write_buffer32(pcard->get_info_location()); - player[preplayer].list_main.erase(player[preplayer].list_main.begin() + pcard->current.sequence); - if (sequence == 0) { //deck top - player[playerid].list_main.push_back(pcard); - } else if (sequence == 1) { - player[playerid].list_main.insert(player[playerid].list_main.begin(), pcard); - } else { - player[playerid].list_main.push_back(pcard); - if(!core.shuffle_check_disabled) - core.shuffle_deck_check[playerid] = true; - } - reset_sequence(playerid, LOCATION_DECK); - pcard->previous.controler = preplayer; - pcard->current.controler = playerid; - pduel->write_buffer32(pcard->get_info_location()); - pduel->write_buffer32(pcard->current.reason); - return; - } else - remove_card(pcard); - } else if(location & LOCATION_ONFIELD) { - if (playerid == preplayer && sequence == presequence) - return; - if((location == LOCATION_MZONE && (sequence < 0 || sequence > 4 || player[playerid].list_mzone[sequence])) - || (location == LOCATION_SZONE && (sequence < 0 || sequence > 4 || player[playerid].list_szone[sequence]))) - return; - if(preplayer == playerid) { - pduel->write_buffer8(MSG_MOVE); - pduel->write_buffer32(pcard->data.code); - pduel->write_buffer32(pcard->get_info_location()); - } - pcard->previous.controler = pcard->current.controler; - pcard->previous.location = pcard->current.location; - pcard->previous.sequence = pcard->current.sequence; - pcard->previous.position = pcard->current.position; - if (location == LOCATION_MZONE) { - player[preplayer].list_mzone[presequence] = 0; - player[preplayer].used_location &= ~(1 << presequence); - player[playerid].list_mzone[sequence] = pcard; - player[playerid].used_location |= 1 << sequence; - pcard->current.controler = playerid; - pcard->current.sequence = sequence; - } else { - player[preplayer].list_szone[presequence] = 0; - player[preplayer].used_location &= ~(256 << presequence); - player[playerid].list_szone[sequence] = pcard; - player[playerid].used_location |= 256 << sequence; - pcard->current.controler = playerid; - pcard->current.sequence = sequence; - } - if(preplayer == playerid) { - pduel->write_buffer32(pcard->get_info_location()); - pduel->write_buffer32(pcard->current.reason); - } - return; - } else if(location == LOCATION_HAND) { - if(preplayer == playerid) - return; - remove_card(pcard); - } else { - if(location == LOCATION_GRAVE) { - if(pcard->current.sequence == player[pcard->current.controler].list_grave.size() - 1) - return; - pduel->write_buffer8(MSG_MOVE); - pduel->write_buffer32(pcard->data.code); - pduel->write_buffer32(pcard->get_info_location()); - player[pcard->current.controler].list_grave.erase(player[pcard->current.controler].list_grave.begin() + pcard->current.sequence); - player[pcard->current.controler].list_grave.push_back(pcard); - reset_sequence(pcard->current.controler, LOCATION_GRAVE); - pduel->write_buffer32(pcard->get_info_location()); - pduel->write_buffer32(pcard->current.reason); - } else if(location == LOCATION_REMOVED) { - if(pcard->current.sequence == player[pcard->current.controler].list_remove.size() - 1) - return; - pduel->write_buffer8(MSG_MOVE); - pduel->write_buffer32(pcard->data.code); - pduel->write_buffer32(pcard->get_info_location()); - player[pcard->current.controler].list_remove.erase(player[pcard->current.controler].list_remove.begin() + pcard->current.sequence); - player[pcard->current.controler].list_remove.push_back(pcard); - reset_sequence(pcard->current.controler, LOCATION_REMOVED); - pduel->write_buffer32(pcard->get_info_location()); - pduel->write_buffer32(pcard->current.reason); - } else { - pduel->write_buffer8(MSG_MOVE); - pduel->write_buffer32(pcard->data.code); - pduel->write_buffer32(pcard->get_info_location()); - player[pcard->current.controler].list_extra.erase(player[pcard->current.controler].list_extra.begin() + pcard->current.sequence); - player[pcard->current.controler].list_extra.push_back(pcard); - reset_sequence(pcard->current.controler, LOCATION_EXTRA); - pduel->write_buffer32(pcard->get_info_location()); - pduel->write_buffer32(pcard->current.reason); - } - return; - } - } else { - if((pcard->data.type & TYPE_PENDULUM) && (location == LOCATION_GRAVE) - && pcard->is_capable_send_to_extra(playerid) - && (((pcard->current.location == LOCATION_MZONE) && !pcard->is_status(STATUS_SUMMON_DISABLED)) - || ((pcard->current.location == LOCATION_SZONE) && !pcard->is_status(STATUS_ACTIVATE_DISABLED)))) { - location = LOCATION_EXTRA; - pcard->operation_param = (pcard->operation_param & 0x00ffffff) | (POS_FACEUP_DEFENCE << 24); - } - remove_card(pcard); - } - } - add_card(playerid, pcard, location, sequence); -} -// add EFFECT_SET_CONTROL -void field::set_control(card* pcard, uint8 playerid, uint16 reset_phase, uint8 reset_count) { - if((core.remove_brainwashing && pcard->is_affected_by_effect(EFFECT_REMOVE_BRAINWASHING)) || pcard->refresh_control_status() == playerid) - return; - effect* peffect = pduel->new_effect(); - if(core.reason_effect) - peffect->owner = core.reason_effect->handler; - else - peffect->owner = pcard; - peffect->handler = pcard; - peffect->type = EFFECT_TYPE_SINGLE; - peffect->code = EFFECT_SET_CONTROL; - peffect->value = playerid; - peffect->flag = EFFECT_FLAG_CANNOT_DISABLE; - peffect->reset_flag = RESET_EVENT | 0xc6c0000; - if(reset_count) { - peffect->reset_flag |= RESET_PHASE | reset_phase; - if(!(peffect->reset_flag & (RESET_SELF_TURN | RESET_OPPO_TURN))) - peffect->reset_flag |= (RESET_SELF_TURN | RESET_OPPO_TURN); - peffect->reset_count |= reset_count & 0xff; - } - pcard->add_effect(peffect); - pcard->current.controler = playerid; -} - -card* field::get_field_card(uint8 playerid, uint8 location, uint8 sequence) { - switch(location) { - case LOCATION_MZONE: { - if(sequence < 5) - return player[playerid].list_mzone[sequence]; - else - return 0; - break; - } - case LOCATION_SZONE: { - if(sequence < 8) - return player[playerid].list_szone[sequence]; - else - return 0; - break; - } - case LOCATION_DECK: { - if(sequence < player[playerid].list_main.size()) - return player[playerid].list_main[sequence]; - else - return 0; - break; - } - case LOCATION_HAND: { - if(sequence < player[playerid].list_hand.size()) - return player[playerid].list_hand[sequence]; - else - return 0; - break; - } - case LOCATION_GRAVE: { - if(sequence < player[playerid].list_grave.size()) - return player[playerid].list_grave[sequence]; - else - return 0; - break; - } - case LOCATION_REMOVED: { - if(sequence < player[playerid].list_remove.size()) - return player[playerid].list_remove[sequence]; - else - return 0; - break; - } - case LOCATION_EXTRA: { - if(sequence < player[playerid].list_extra.size()) - return player[playerid].list_extra[sequence]; - else - return 0; - break; - } - } - return 0; -} -int32 field::is_location_useable(uint8 playerid, uint8 location, uint8 sequence) { - if (location != LOCATION_MZONE && location != LOCATION_SZONE) - return TRUE; - int32 flag = player[playerid].disabled_location | player[playerid].used_location; - if (location == LOCATION_MZONE && flag & (1 << sequence)) - return FALSE; - if (location == LOCATION_SZONE && flag & (256 << sequence)) - return FALSE; - return TRUE; -} -int32 field::get_useable_count(uint8 playerid, uint8 location, uint8 uplayer, uint32 reason, uint32* list) { - if (location != LOCATION_MZONE && location != LOCATION_SZONE) - return 0; - uint32 flag = player[playerid].disabled_location | player[playerid].used_location; - uint32 used_flag = player[playerid].used_location; - effect_set eset; - if (location == LOCATION_MZONE) { - flag = (flag & 0x1f); - used_flag = (used_flag & 0x1f); - if(uplayer < 2) - filter_player_effect(playerid, EFFECT_MAX_MZONE, &eset); - } else { - flag = (flag & 0x1f00) >> 8; - used_flag = (used_flag & 0x1f00) >> 8; - if(uplayer < 2) - filter_player_effect(playerid, EFFECT_MAX_SZONE, &eset); - } - if(list) - *list = flag; - if(eset.size()) { - int32 max = 5; - for (int32 i = 0; i < eset.size(); ++i) { - pduel->lua->add_param(playerid, PARAM_TYPE_INT); - pduel->lua->add_param(uplayer, PARAM_TYPE_INT); - pduel->lua->add_param(reason, PARAM_TYPE_INT); - int32 v = eset[i]->get_value(3); - if (max > v) - max = v; - } - int32 block = 5 - field_used_count[flag]; - int32 limit = max - field_used_count[used_flag]; - return block < limit ? block : limit; - } else { - return 5 - field_used_count[flag]; - } -} -void field::shuffle(uint8 playerid, uint8 location) { - if(!(location & (LOCATION_HAND | LOCATION_DECK))) - return; - card_vector& svector = (location == LOCATION_HAND) ? player[playerid].list_hand : player[playerid].list_main; - if(svector.size() == 0) - return; - if(location == LOCATION_HAND) { - bool shuffle = false; - for(auto cit = svector.begin(); cit != svector.end(); ++cit) - if(!(*cit)->is_status(STATUS_IS_PUBLIC)) - shuffle = true; - if(!shuffle) { - core.shuffle_hand_check[playerid] = FALSE; - return; - } - } - if(location == LOCATION_HAND || !(core.duel_options & DUEL_PSEUDO_SHUFFLE)) { - if(svector.size() > 1) { - uint32 i = 0, s = svector.size(), r; - for(i = 0; i < s - 1; ++i) { - r = pduel->get_next_integer(i, s - 1); - card* t = svector[i]; - svector[i] = svector[r]; - svector[r] = t; - } - reset_sequence(playerid, location); - } - } - if(location == LOCATION_HAND) { - pduel->write_buffer8(MSG_SHUFFLE_HAND); - pduel->write_buffer8(playerid); - pduel->write_buffer8(player[playerid].list_hand.size()); - for(auto cit = svector.begin(); cit != svector.end(); ++cit) - pduel->write_buffer32((*cit)->data.code); - core.shuffle_hand_check[playerid] = FALSE; - } else { - pduel->write_buffer8(MSG_SHUFFLE_DECK); - pduel->write_buffer8(playerid); - core.shuffle_deck_check[playerid] = FALSE; - if(core.global_flag & GLOBALFLAG_DECK_REVERSE_CHECK) { - card* ptop = svector.back(); - if(core.deck_reversed || (ptop->current.position == POS_FACEUP_DEFENCE)) { - pduel->write_buffer8(MSG_DECK_TOP); - pduel->write_buffer8(playerid); - pduel->write_buffer8(0); - if(ptop->current.position != POS_FACEUP_DEFENCE) - pduel->write_buffer32(ptop->data.code); - else - pduel->write_buffer32(ptop->data.code | 0x80000000); - } - } - } -} -void field::reset_sequence(uint8 playerid, uint8 location) { - if(location & (LOCATION_ONFIELD)) - return; - card_vector::iterator cit; - uint32 i = 0; - switch(location) { - case LOCATION_DECK: - for(cit = player[playerid].list_main.begin(), i = 0; cit != player[playerid].list_main.end(); ++cit, ++i) - (*cit)->current.sequence = i; - break; - case LOCATION_HAND: - for(cit = player[playerid].list_hand.begin(), i = 0; cit != player[playerid].list_hand.end(); ++cit, ++i) - (*cit)->current.sequence = i; - break; - case LOCATION_EXTRA: - for(cit = player[playerid].list_extra.begin(), i = 0; cit != player[playerid].list_extra.end(); ++cit, ++i) - (*cit)->current.sequence = i; - break; - case LOCATION_GRAVE: - for(cit = player[playerid].list_grave.begin(), i = 0; cit != player[playerid].list_grave.end(); ++cit, ++i) - (*cit)->current.sequence = i; - break; - case LOCATION_REMOVED: - for(cit = player[playerid].list_remove.begin(), i = 0; cit != player[playerid].list_remove.end(); ++cit, ++i) - (*cit)->current.sequence = i; - break; - } -} -void field::swap_deck_and_grave(uint8 playerid) { - card_vector::iterator clit; - for(clit = player[playerid].list_grave.begin(); clit != player[playerid].list_grave.end(); ++clit) { - (*clit)->previous.location = LOCATION_GRAVE; - (*clit)->previous.sequence = (*clit)->current.sequence; - (*clit)->enable_field_effect(false); - (*clit)->cancel_field_effect(); - } - for(clit = player[playerid].list_main.begin(); clit != player[playerid].list_main.end(); ++clit) { - (*clit)->previous.location = LOCATION_DECK; - (*clit)->previous.sequence = (*clit)->current.sequence; - (*clit)->enable_field_effect(false); - (*clit)->cancel_field_effect(); - } - player[playerid].list_grave.swap(player[playerid].list_main); - card_vector ex; - for(clit = player[playerid].list_main.begin(); clit != player[playerid].list_main.end(); ) { - if((*clit)->data.type & (TYPE_FUSION | TYPE_SYNCHRO | TYPE_XYZ)) { - ex.push_back(*clit); - clit = player[playerid].list_main.erase(clit); - } else - ++clit; - } - for(clit = player[playerid].list_grave.begin(); clit != player[playerid].list_grave.end(); ++clit) { - (*clit)->current.location = LOCATION_GRAVE; - (*clit)->current.reason = REASON_EFFECT; - (*clit)->current.reason_effect = core.reason_effect; - (*clit)->current.reason_player = core.reason_player; - (*clit)->apply_field_effect(); - (*clit)->enable_field_effect(true); - (*clit)->reset(RESET_TOGRAVE, RESET_EVENT); - } - for(clit = player[playerid].list_main.begin(); clit != player[playerid].list_main.end(); ++clit) { - (*clit)->current.location = LOCATION_DECK; - (*clit)->current.reason = REASON_EFFECT; - (*clit)->current.reason_effect = core.reason_effect; - (*clit)->current.reason_player = core.reason_player; - (*clit)->apply_field_effect(); - (*clit)->enable_field_effect(true); - (*clit)->reset(RESET_TODECK, RESET_EVENT); - } - for(clit = ex.begin(); clit != ex.end(); ++clit) { - (*clit)->current.location = LOCATION_EXTRA; - (*clit)->current.reason = REASON_EFFECT; - (*clit)->current.reason_effect = core.reason_effect; - (*clit)->current.reason_player = core.reason_player; - (*clit)->apply_field_effect(); - (*clit)->enable_field_effect(true); - (*clit)->reset(RESET_TODECK, RESET_EVENT); - } - player[playerid].list_extra.insert(player[playerid].list_extra.end(), ex.begin(), ex.end()); - reset_sequence(playerid, LOCATION_GRAVE); - reset_sequence(playerid, LOCATION_EXTRA); - pduel->write_buffer8(MSG_SWAP_GRAVE_DECK); - pduel->write_buffer8(playerid); - shuffle(playerid, LOCATION_DECK); -} -void field::reverse_deck(uint8 playerid) { - int32 count = player[playerid].list_main.size(); - if(count == 0) - return; - for(int i = 0; i < count / 2; ++i) { - card* tmp = player[playerid].list_main[i]; - tmp->current.sequence = count - 1 - i; - player[playerid].list_main[count - 1 - i]->current.sequence = i; - player[playerid].list_main[i] = player[playerid].list_main[count - 1 - i]; - player[playerid].list_main[count - 1 - i] = tmp; - } -} -void field::tag_swap(uint8 playerid) { - card_vector::iterator clit; - //main - for(clit = player[playerid].list_main.begin(); clit != player[playerid].list_main.end(); ++clit) { - (*clit)->enable_field_effect(false); - (*clit)->cancel_field_effect(); - } - std::swap(player[playerid].list_main, player[playerid].tag_list_main); - for(clit = player[playerid].list_main.begin(); clit != player[playerid].list_main.end(); ++clit) { - (*clit)->apply_field_effect(); - (*clit)->enable_field_effect(true); - } - //hand - for(clit = player[playerid].list_hand.begin(); clit != player[playerid].list_hand.end(); ++clit) { - (*clit)->enable_field_effect(false); - (*clit)->cancel_field_effect(); - } - std::swap(player[playerid].list_hand, player[playerid].tag_list_hand); - for(clit = player[playerid].list_hand.begin(); clit != player[playerid].list_hand.end(); ++clit) { - (*clit)->apply_field_effect(); - (*clit)->enable_field_effect(true); - } - //extra - for(clit = player[playerid].list_extra.begin(); clit != player[playerid].list_extra.end(); ++clit) { - (*clit)->enable_field_effect(false); - (*clit)->cancel_field_effect(); - } - std::swap(player[playerid].list_extra, player[playerid].tag_list_extra); - for(clit = player[playerid].list_extra.begin(); clit != player[playerid].list_extra.end(); ++clit) { - (*clit)->apply_field_effect(); - (*clit)->enable_field_effect(true); - } - pduel->write_buffer8(MSG_TAG_SWAP); - pduel->write_buffer8(playerid); - pduel->write_buffer8(player[playerid].list_main.size()); - pduel->write_buffer8(player[playerid].list_extra.size()); - pduel->write_buffer8(player[playerid].list_hand.size()); - if(core.deck_reversed && player[playerid].list_main.size()) - pduel->write_buffer32(player[playerid].list_main.back()->data.code); - else - pduel->write_buffer32(0); - for(auto cit = player[playerid].list_hand.begin(); cit != player[playerid].list_hand.end(); ++cit) - pduel->write_buffer32((*cit)->data.code | ((*cit)->is_status(STATUS_IS_PUBLIC) ? 0x80000000 : 0)); -} -void field::add_effect(effect* peffect, uint8 owner_player) { - if (!peffect->handler) { - peffect->flag |= EFFECT_FLAG_FIELD_ONLY; - peffect->handler = peffect->owner; - peffect->effect_owner = owner_player; - peffect->id = infos.field_id++; - } - if((peffect->type & 0x7e0) - || (core.reason_effect && (core.reason_effect->status & EFFECT_STATUS_ACTIVATED))) - peffect->status |= EFFECT_STATUS_ACTIVATED; - peffect->card_type = peffect->owner->data.type; - effect_container::iterator it; - if (!(peffect->type & EFFECT_TYPE_ACTIONS)) { - it = effects.aura_effect.insert(make_pair(peffect->code, peffect)); - if(peffect->code == EFFECT_SPSUMMON_COUNT_LIMIT) - effects.spsummon_count_eff.insert(peffect); - } else { - if (peffect->type & EFFECT_TYPE_IGNITION) - it = effects.ignition_effect.insert(make_pair(peffect->code, peffect)); - else if (peffect->type & EFFECT_TYPE_ACTIVATE) - it = effects.activate_effect.insert(make_pair(peffect->code, peffect)); - else if (peffect->type & EFFECT_TYPE_TRIGGER_O && peffect->type & EFFECT_TYPE_FIELD) - it = effects.trigger_o_effect.insert(make_pair(peffect->code, peffect)); - else if (peffect->type & EFFECT_TYPE_TRIGGER_F && peffect->type & EFFECT_TYPE_FIELD) - it = effects.trigger_f_effect.insert(make_pair(peffect->code, peffect)); - else if (peffect->type & EFFECT_TYPE_QUICK_O) - it = effects.quick_o_effect.insert(make_pair(peffect->code, peffect)); - else if (peffect->type & EFFECT_TYPE_QUICK_F) - it = effects.quick_f_effect.insert(make_pair(peffect->code, peffect)); - else if (peffect->type & EFFECT_TYPE_CONTINUOUS) - it = effects.continuous_effect.insert(make_pair(peffect->code, peffect)); - } - effects.indexer.insert(make_pair(peffect, it)); - if((peffect->flag & EFFECT_FLAG_FIELD_ONLY)) { - if(peffect->flag & EFFECT_FLAG_OATH) - effects.oath.insert(make_pair(peffect, core.reason_effect)); - if(peffect->reset_flag & RESET_PHASE) - effects.pheff.insert(peffect); - if(peffect->reset_flag & RESET_CHAIN) - effects.cheff.insert(peffect); - if(peffect->flag & EFFECT_FLAG_COUNT_LIMIT) - effects.rechargeable.insert(peffect); - } -} -void field::remove_effect(effect* peffect) { - auto eit = effects.indexer.find(peffect); - if (eit == effects.indexer.end()) - return; - auto it = eit->second; - if (!(peffect->type & EFFECT_TYPE_ACTIONS)) { - effects.aura_effect.erase(it); - if(peffect->code == EFFECT_SPSUMMON_COUNT_LIMIT) - effects.spsummon_count_eff.erase(peffect); - } else { - if (peffect->type & EFFECT_TYPE_IGNITION) - effects.ignition_effect.erase(it); - else if (peffect->type & EFFECT_TYPE_ACTIVATE) - effects.activate_effect.erase(it); - else if (peffect->type & EFFECT_TYPE_TRIGGER_O) - effects.trigger_o_effect.erase(it); - else if (peffect->type & EFFECT_TYPE_TRIGGER_F) - effects.trigger_f_effect.erase(it); - else if (peffect->type & EFFECT_TYPE_QUICK_O) - effects.quick_o_effect.erase(it); - else if (peffect->type & EFFECT_TYPE_QUICK_F) - effects.quick_f_effect.erase(it); - else if (peffect->type & EFFECT_TYPE_CONTINUOUS) - effects.continuous_effect.erase(it); - } - effects.indexer.erase(peffect); - if((peffect->flag & EFFECT_FLAG_FIELD_ONLY)) { - if(peffect->flag & EFFECT_FLAG_OATH) - effects.oath.erase(peffect); - if(peffect->reset_flag & RESET_PHASE) - effects.pheff.erase(peffect); - if(peffect->reset_flag & RESET_CHAIN) - effects.cheff.erase(peffect); - if(peffect->flag & EFFECT_FLAG_COUNT_LIMIT) - effects.rechargeable.erase(peffect); - core.reseted_effects.insert(peffect); - } -} -void field::remove_oath_effect(effect* reason_effect) { - for(auto oeit = effects.oath.begin(); oeit != effects.oath.end();) { - auto rm = oeit++; - if(rm->second == reason_effect) { - effect* peffect = rm->first; - effects.oath.erase(rm); - if(peffect->flag & EFFECT_FLAG_FIELD_ONLY) - remove_effect(peffect); - else - peffect->handler->remove_effect(peffect); - } - } -} -void field::reset_effect(uint32 id, uint32 reset_type) { - int32 result; - for (auto it = effects.indexer.begin(); it != effects.indexer.end();) { - auto rm = it++; - auto peffect = rm->first; - auto pit = rm->second; - if (!(peffect->flag & EFFECT_FLAG_FIELD_ONLY)) - continue; - result = peffect->reset(id, reset_type); - if (result) { - if (!(peffect->type & EFFECT_TYPE_ACTIONS)) { - if (peffect->is_disable_related()) - update_disable_check_list(peffect); - effects.aura_effect.erase(pit); - } else { - if (peffect->type & EFFECT_TYPE_IGNITION) - effects.ignition_effect.erase(pit); - else if (peffect->type & EFFECT_TYPE_ACTIVATE) - effects.activate_effect.erase(pit); - else if (peffect->type & EFFECT_TYPE_TRIGGER_O) - effects.trigger_o_effect.erase(pit); - else if (peffect->type & EFFECT_TYPE_TRIGGER_F) - effects.trigger_f_effect.erase(pit); - else if (peffect->type & EFFECT_TYPE_QUICK_O) - effects.quick_o_effect.erase(pit); - else if (peffect->type & EFFECT_TYPE_QUICK_F) - effects.quick_f_effect.erase(pit); - else if (peffect->type & EFFECT_TYPE_CONTINUOUS) - effects.continuous_effect.erase(pit); - } - effects.indexer.erase(peffect); - pduel->delete_effect(peffect); - } - } -} -void field::reset_phase(uint32 phase) { - for(auto eit = effects.pheff.begin(); eit != effects.pheff.end();) { - auto rm = eit++; - if((*rm)->reset(phase, RESET_PHASE)) { - if((*rm)->flag & EFFECT_FLAG_FIELD_ONLY) - remove_effect((*rm)); - else - (*rm)->handler->remove_effect((*rm)); - } - } -} -void field::reset_chain() { - for(auto eit = effects.cheff.begin(); eit != effects.cheff.end();) { - auto rm = eit++; - if((*rm)->flag & EFFECT_FLAG_FIELD_ONLY) - remove_effect((*rm)); - else - (*rm)->handler->remove_effect((*rm)); - } -} -void field::add_effect_code(uint32 code, uint32 playerid) { - auto& count_map = (code & EFFECT_COUNT_CODE_DUEL) ? core.effect_count_code_duel : core.effect_count_code; - count_map[code + (playerid << 30)]++; -} -uint32 field::get_effect_code(uint32 code, uint32 playerid) { - auto& count_map = (code & EFFECT_COUNT_CODE_DUEL) ? core.effect_count_code_duel : core.effect_count_code; - auto iter = count_map.find(code + (playerid << 30)); - if(iter == count_map.end()) - return 0; - return iter->second; -} -void field::dec_effect_code(uint32 code, uint32 playerid) { - auto& count_map = (code & EFFECT_COUNT_CODE_DUEL) ? core.effect_count_code_duel : core.effect_count_code; - auto iter = count_map.find(code + (playerid << 30)); - if(iter == count_map.end()) - return; - if(iter->second > 0) - iter->second--; -} -void field::filter_field_effect(uint32 code, effect_set* eset, uint8 sort) { - effect* peffect; - auto rg = effects.aura_effect.equal_range(code); - for (; rg.first != rg.second; ) { - peffect = rg.first->second; - ++rg.first; - if (peffect->is_available()) - eset->add_item(peffect); - } - if(sort) - eset->sort(); -} -void field::filter_affected_cards(effect* peffect, card_set* cset) { - if ((peffect->type & EFFECT_TYPE_ACTIONS) || !(peffect->type & EFFECT_TYPE_FIELD) || (peffect->flag & EFFECT_FLAG_PLAYER_TARGET)) - return; - uint8 self = peffect->get_handler_player(); - if(self == PLAYER_NONE) - return; - card* pcard; - card_vector::iterator it; - uint16 range = peffect->s_range; - for(uint32 p = 0; p < 2; ++p) { - if (range & LOCATION_MZONE) { - for (int i = 0; i < 5; ++i) { - pcard = player[self].list_mzone[i]; - if (pcard && peffect->is_target(pcard)) - cset->insert(pcard); - } - } - if (range & LOCATION_SZONE) { - for (int i = 0; i < 8; ++i) { - pcard = player[self].list_szone[i]; - if (pcard && peffect->is_target(pcard)) - cset->insert(pcard); - } - } - if (range & LOCATION_GRAVE) { - for (it = player[self].list_grave.begin(); it != player[self].list_grave.end(); ++it) { - pcard = *it; - if (peffect->is_target(pcard)) - cset->insert(pcard); - } - } - if (range & LOCATION_REMOVED) { - for (it = player[self].list_remove.begin(); it != player[self].list_remove.end(); ++it) { - pcard = *it; - if (peffect->is_target(pcard)) - cset->insert(pcard); - } - } - if (range & LOCATION_HAND) { - for (it = player[self].list_hand.begin(); it != player[self].list_hand.end(); ++it) { - pcard = *it; - if (peffect->is_target(pcard)) - cset->insert(pcard); - } - } - range = peffect->o_range; - self = 1 - self; - } -} -void field::filter_player_effect(uint8 playerid, uint32 code, effect_set* eset, uint8 sort) { - auto rg = effects.aura_effect.equal_range(code); - for (; rg.first != rg.second; ++rg.first) { - effect* peffect = rg.first->second; - if (peffect->is_target_player(playerid) && peffect->is_available()) - eset->add_item(peffect); - } - if(sort) - eset->sort(); -} -int32 field::filter_matching_card(int32 findex, uint8 self, uint32 location1, uint32 location2, group* pgroup, card* pexception, uint32 extraargs, card** pret, int32 fcount, int32 is_target) { - if(self != 0 && self != 1) - return FALSE; - card* pcard; - int32 count = 0; - uint32 location = location1; - for(uint32 p = 0; p < 2; ++p) { - if(location & LOCATION_MZONE) { - for(uint32 i = 0; i < 5; ++i) { - pcard = player[self].list_mzone[i]; - if(pcard && !pcard->is_status(STATUS_SUMMONING) && !pcard->is_status(STATUS_SUMMON_DISABLED) && !pcard->is_status(STATUS_SPSUMMON_STEP) - && pcard != pexception && pduel->lua->check_matching(pcard, findex, extraargs) - && (!is_target || pcard->is_capable_be_effect_target(core.reason_effect, core.reason_player))) { - if(pret) { - *pret = pcard; - return TRUE; - } - count ++; - if(fcount && count >= fcount) - return TRUE; - if(pgroup) { - pgroup->container.insert(pcard); - } - } - } - } - if(location & LOCATION_SZONE) { - for(uint32 i = 0; i < 8; ++i) { - pcard = player[self].list_szone[i]; - if(pcard && pcard != pexception && pduel->lua->check_matching(pcard, findex, extraargs) - && (!is_target || pcard->is_capable_be_effect_target(core.reason_effect, core.reason_player))) { - if(pret) { - *pret = pcard; - return TRUE; - } - count ++; - if(fcount && count >= fcount) - return TRUE; - if(pgroup) { - pgroup->container.insert(pcard); - } - } - } - } - if(location & LOCATION_DECK) { - for(auto cit = player[self].list_main.rbegin(); cit != player[self].list_main.rend(); ++cit) { - if(*cit != pexception && pduel->lua->check_matching(*cit, findex, extraargs) - && (!is_target || (*cit)->is_capable_be_effect_target(core.reason_effect, core.reason_player))) { - if(pret) { - *pret = *cit; - return TRUE; - } - count ++; - if(fcount && count >= fcount) - return TRUE; - if(pgroup) { - pgroup->container.insert(*cit); - } - } - } - } - if(location & LOCATION_EXTRA) { - for(auto cit = player[self].list_extra.rbegin(); cit != player[self].list_extra.rend(); ++cit) { - if(*cit != pexception && pduel->lua->check_matching(*cit, findex, extraargs) - && (!is_target || (*cit)->is_capable_be_effect_target(core.reason_effect, core.reason_player))) { - if(pret) { - *pret = *cit; - return TRUE; - } - count ++; - if(fcount && count >= fcount) - return TRUE; - if(pgroup) { - pgroup->container.insert(*cit); - } - } - } - } - if(location & LOCATION_HAND) { - for(auto cit = player[self].list_hand.begin(); cit != player[self].list_hand.end(); ++cit) { - if(*cit != pexception && pduel->lua->check_matching(*cit, findex, extraargs) - && (!is_target || (*cit)->is_capable_be_effect_target(core.reason_effect, core.reason_player))) { - if(pret) { - *pret = *cit; - return TRUE; - } - count ++; - if(fcount && count >= fcount) - return TRUE; - if(pgroup) { - pgroup->container.insert(*cit); - } - } - } - } - if(location & LOCATION_GRAVE) { - for(auto cit = player[self].list_grave.rbegin(); cit != player[self].list_grave.rend(); ++cit) { - if(*cit != pexception && pduel->lua->check_matching(*cit, findex, extraargs) - && (!is_target || (*cit)->is_capable_be_effect_target(core.reason_effect, core.reason_player))) { - if(pret) { - *pret = *cit; - return TRUE; - } - count ++; - if(fcount && count >= fcount) - return TRUE; - if(pgroup) { - pgroup->container.insert(*cit); - } - } - } - } - if(location & LOCATION_REMOVED) { - for(auto cit = player[self].list_remove.rbegin(); cit != player[self].list_remove.rend(); ++cit) { - if(*cit != pexception && pduel->lua->check_matching(*cit, findex, extraargs) - && (!is_target || (*cit)->is_capable_be_effect_target(core.reason_effect, core.reason_player))) { - if(pret) { - *pret = *cit; - return TRUE; - } - count ++; - if(fcount && count >= fcount) - return TRUE; - if(pgroup) { - pgroup->container.insert(*cit); - } - } - } - } - location = location2; - self = 1 - self; - } - return FALSE; -} -int32 field::filter_field_card(uint8 self, uint32 location1, uint32 location2, group* pgroup) { - if(self != 0 && self != 1) - return 0; - uint32 location = location1; - uint32 count = 0; - card* pcard; - for(uint32 p = 0; p < 2; ++p) { - if(location & LOCATION_MZONE) { - for(int i = 0; i < 5; ++i) { - pcard = player[self].list_mzone[i]; - if(pcard && !pcard->is_status(STATUS_SUMMONING)) { - if(pgroup) - pgroup->container.insert(pcard); - count++; - } - } - } - if(location & LOCATION_SZONE) { - for(int i = 0; i < 8; ++i) { - pcard = player[self].list_szone[i]; - if(pcard) { - if(pgroup) - pgroup->container.insert(pcard); - count++; - } - } - } - if(location & LOCATION_HAND) { - if(pgroup) - pgroup->container.insert(player[self].list_hand.begin(), player[self].list_hand.end()); - count += player[self].list_hand.size(); - } - if(location & LOCATION_DECK) { - if(pgroup) - pgroup->container.insert(player[self].list_main.rbegin(), player[self].list_main.rend()); - count += player[self].list_main.size(); - } - if(location & LOCATION_EXTRA) { - if(pgroup) - pgroup->container.insert(player[self].list_extra.rbegin(), player[self].list_extra.rend()); - count += player[self].list_extra.size(); - } - if(location & LOCATION_GRAVE) { - if(pgroup) - pgroup->container.insert(player[self].list_grave.rbegin(), player[self].list_grave.rend()); - count += player[self].list_grave.size(); - } - if(location & LOCATION_REMOVED) { - if(pgroup) - pgroup->container.insert(player[self].list_remove.rbegin(), player[self].list_remove.rend()); - count += player[self].list_remove.size(); - } - location = location2; - self = 1 - self; - } - return count; -} -effect* field::is_player_affected_by_effect(uint8 playerid, uint32 code) { - auto rg = effects.aura_effect.equal_range(code); - for (; rg.first != rg.second; ++rg.first) { - effect* peffect = rg.first->second; - if (peffect->is_target_player(playerid) && peffect->is_available()) - return peffect; - } - return 0; -} -int32 field::get_release_list(uint8 playerid, card_set* release_list, card_set* ex_list, int32 use_con, int32 use_hand, int32 fun, int32 exarg, card* exp) { - card* pcard; - uint32 rcount = 0; - for(uint32 i = 0; i < 5; ++i) { - pcard = player[playerid].list_mzone[i]; - if(pcard && pcard != exp && pcard->is_releasable_by_nonsummon(playerid) - && (!use_con || pduel->lua->check_matching(pcard, fun, exarg))) { - if(release_list) - release_list->insert(pcard); - pcard->operation_param = 1; - rcount++; - } - } - if(use_hand) { - for(uint32 i = 0; i < player[playerid].list_hand.size(); ++i) { - pcard = player[playerid].list_hand[i]; - if(pcard && pcard != exp && pcard->is_releasable_by_nonsummon(playerid) - && (!use_con || pduel->lua->check_matching(pcard, fun, exarg))) { - if(release_list) - release_list->insert(pcard); - pcard->operation_param = 1; - rcount++; - } - } - } - for(uint32 i = 0; i < 5; ++i) { - pcard = player[1 - playerid].list_mzone[i]; - if(pcard && pcard != exp && (pcard->is_position(POS_FACEUP) || !use_con) && pcard->is_affected_by_effect(EFFECT_EXTRA_RELEASE) - && pcard->is_releasable_by_nonsummon(playerid) && (!use_con || pduel->lua->check_matching(pcard, fun, exarg))) { - if(ex_list) - ex_list->insert(pcard); - pcard->operation_param = 1; - rcount++; - } - } - return rcount; -} -int32 field::check_release_list(uint8 playerid, int32 count, int32 use_con, int32 use_hand, int32 fun, int32 exarg, card* exp) { - card* pcard; - for(uint32 i = 0; i < 5; ++i) { - pcard = player[playerid].list_mzone[i]; - if(pcard && pcard != exp && pcard->is_releasable_by_nonsummon(playerid) - && (!use_con || pduel->lua->check_matching(pcard, fun, exarg))) { - count--; - if(count == 0) - return TRUE; - } - } - if(use_hand) { - for(uint32 i = 0; i < player[playerid].list_hand.size(); ++i) { - pcard = player[playerid].list_hand[i]; - if(pcard && pcard != exp && pcard->is_releasable_by_nonsummon(playerid) - && (!use_con || pduel->lua->check_matching(pcard, fun, exarg))) { - count--; - if(count == 0) - return TRUE; - } - } - } - for(uint32 i = 0; i < 5; ++i) { - pcard = player[1 - playerid].list_mzone[i]; - if(pcard && pcard != exp && (!use_con || pcard->is_position(POS_FACEUP)) && pcard->is_affected_by_effect(EFFECT_EXTRA_RELEASE) - && pcard->is_releasable_by_nonsummon(playerid) && (!use_con || pduel->lua->check_matching(pcard, fun, exarg))) { - count--; - if(count == 0) - return TRUE; - } - } - return FALSE; -} -int32 field::get_summon_release_list(card* target, card_set* release_list, card_set* ex_list, card_set* ex_list_sum, group* mg, uint32 ex) { - uint8 p = target->current.controler; - card* pcard; - uint32 rcount = 0; - for(int i = 0; i < 5; ++i) { - pcard = player[p].list_mzone[i]; - if(pcard && pcard->is_releasable_by_summon(p, target)) { - if(mg && !mg->has_card(pcard)) - continue; - if(release_list) - release_list->insert(pcard); - if(pcard->is_affected_by_effect(EFFECT_DOUBLE_TRIBUTE, target)) - pcard->operation_param = 2; - else - pcard->operation_param = 1; - rcount += pcard->operation_param; - } - } - uint32 ex_sum_max = 0; - for(int i = 0; i < 5; ++i) { - pcard = player[1 - p].list_mzone[i]; - if(!(pcard && pcard->is_releasable_by_summon(p, target))) - continue; - if(mg && !mg->has_card(pcard)) - continue; - if(ex || pcard->is_affected_by_effect(EFFECT_EXTRA_RELEASE)) { - if(ex_list) - ex_list->insert(pcard); - if(pcard->is_affected_by_effect(EFFECT_DOUBLE_TRIBUTE, target)) - pcard->operation_param = 2; - else - pcard->operation_param = 1; - rcount += pcard->operation_param; - } else { - effect* peffect = pcard->is_affected_by_effect(EFFECT_EXTRA_RELEASE_SUM); - if(!peffect || ((peffect->flag & EFFECT_FLAG_COUNT_LIMIT) && (peffect->reset_count & 0xf00) == 0)) - continue; - if(ex_list_sum) - ex_list_sum->insert(pcard); - if(pcard->is_affected_by_effect(EFFECT_DOUBLE_TRIBUTE, target)) - pcard->operation_param = 2; - else - pcard->operation_param = 1; - if(ex_sum_max < pcard->operation_param) - ex_sum_max = pcard->operation_param; - } - } - return rcount + ex_sum_max; -} -int32 field::get_summon_count_limit(uint8 playerid) { - effect_set eset; - filter_player_effect(playerid, EFFECT_SET_SUMMON_COUNT_LIMIT, &eset); - int32 count = 1, c; - for(int32 i = 0; i < eset.size(); ++i) { - c = eset[i]->get_value(); - if(c > count) - count = c; - } - return count; -} -int32 field::get_draw_count(uint8 playerid) { - effect_set eset; - filter_player_effect(infos.turn_player, EFFECT_DRAW_COUNT, &eset); - int32 count = player[playerid].draw_count; - if(eset.size()) - count = eset.get_last()->get_value(); - return count; -} -void field::get_ritual_material(uint8 playerid, effect* peffect, card_set* material) { - card* pcard; - for(int i = 0; i < 5; ++i) { - pcard = player[playerid].list_mzone[i]; - if(pcard && pcard->get_level() && pcard->is_affect_by_effect(core.reason_effect) - && pcard->is_releasable_by_nonsummon(playerid) && pcard->is_releasable_by_effect(playerid, peffect)) - material->insert(pcard); - } - for(int i = 0; i < 5; ++i) { - pcard = player[1 - playerid].list_mzone[i]; - if(pcard && pcard->get_level() && pcard->is_affect_by_effect(core.reason_effect) - && pcard->is_affected_by_effect(EFFECT_EXTRA_RELEASE) - && pcard->is_releasable_by_nonsummon(playerid) && pcard->is_releasable_by_effect(playerid, peffect)) - material->insert(pcard); - } - for(auto cit = player[playerid].list_hand.begin(); cit != player[playerid].list_hand.end(); ++cit) - if(((*cit)->data.type & TYPE_MONSTER) && (*cit)->is_releasable_by_nonsummon(playerid)) - material->insert((*cit)); - for(auto cit = player[playerid].list_grave.begin(); cit != player[playerid].list_grave.end(); ++cit) - if(((*cit)->data.type & TYPE_MONSTER) && (*cit)->is_affected_by_effect(EFFECT_EXTRA_RITUAL_MATERIAL) && (*cit)->is_removeable(playerid)) - material->insert((*cit)); -} -void field::ritual_release(card_set* material) { - card_set rel; - card_set rem; - for(auto cit = material->begin(); cit != material->end(); ++cit) { - if((*cit)->current.location == LOCATION_GRAVE) - rem.insert(*cit); - else - rel.insert(*cit); - } - release(&rel, core.reason_effect, REASON_RITUAL + REASON_EFFECT + REASON_MATERIAL, core.reason_player); - send_to(&rem, core.reason_effect, REASON_RITUAL + REASON_EFFECT + REASON_MATERIAL, core.reason_player, PLAYER_NONE, LOCATION_REMOVED, 0, POS_FACEUP); -} -void field::get_xyz_material(card* scard, int32 findex, uint32 lv, int32 maxc) { - card* pcard = 0; - int32 playerid = scard->current.controler; - core.xmaterial_lst.clear(); - uint32 xyz_level; - for(int i = 0; i < 5; ++i) { - pcard = player[playerid].list_mzone[i]; - if(pcard && pcard->is_position(POS_FACEUP) && pcard->is_can_be_xyz_material(scard) && (xyz_level = pcard->check_xyz_level(scard, lv)) - && (findex == 0 || pduel->lua->check_matching(pcard, findex, 0))) - core.xmaterial_lst.insert(std::make_pair((xyz_level >> 12) & 0xf, pcard)); - } - for(int i = 0; i < 5; ++i) { - pcard = player[1 - playerid].list_mzone[i]; - if(pcard && pcard->is_position(POS_FACEUP) && pcard->is_can_be_xyz_material(scard) && (xyz_level = pcard->check_xyz_level(scard, lv)) - && pcard->is_affected_by_effect(EFFECT_XYZ_MATERIAL) && (findex == 0 || pduel->lua->check_matching(pcard, findex, 0))) - core.xmaterial_lst.insert(std::make_pair((xyz_level >> 12) & 0xf, pcard)); - } - if(core.global_flag & GLOBALFLAG_XMAT_COUNT_LIMIT) { - if(maxc > (int32)core.xmaterial_lst.size()) - maxc = (int32)core.xmaterial_lst.size(); - auto iter = core.xmaterial_lst.lower_bound(maxc); - core.xmaterial_lst.erase(core.xmaterial_lst.begin(), iter); - } -} -void field::get_overlay_group(uint8 self, uint8 s, uint8 o, card_set* pset) { - uint8 c = s; - card* pcard; - for(int p = 0; p < 2; ++p) { - if(c) { - for(int i = 0; i < 5; ++i) { - pcard = player[self].list_mzone[i]; - if(pcard && !pcard->is_status(STATUS_SUMMONING) && pcard->xyz_materials.size()) - pset->insert(pcard->xyz_materials.begin(), pcard->xyz_materials.end()); - } - } - self = 1 - self; - c = o; - } -} -int32 field::get_overlay_count(uint8 self, uint8 s, uint8 o) { - uint8 c = s; - uint32 count = 0; - for(int p = 0; p < 2; ++p) { - if(c) { - for(int i = 0; i < 5; ++i) { - card* pcard = player[self].list_mzone[i]; - if(pcard && !pcard->is_status(STATUS_SUMMONING)) - count += pcard->xyz_materials.size(); - } - } - self = 1 - self; - c = o; - } - return count; -} -void field::update_disable_check_list(effect* peffect) { - card_set cset; - filter_affected_cards(peffect, &cset); - for (auto it = cset.begin(); it != cset.end(); ++it) - add_to_disable_check_list(*it); -} -void field::add_to_disable_check_list(card* pcard) { - if (effects.disable_check_set.find(pcard) != effects.disable_check_set.end()) - return; - effects.disable_check_set.insert(pcard); - effects.disable_check_list.push_back(pcard); -} -void field::adjust_disable_check_list() { - card* checking; - int32 pre_disable, new_disable; - if (!effects.disable_check_list.size()) - return; - card_set checked; - do { - checked.clear(); - while (effects.disable_check_list.size()) { - checking = effects.disable_check_list.front(); - effects.disable_check_list.pop_front(); - effects.disable_check_set.erase(checking); - checked.insert(checking); - if (checking->is_status(STATUS_TO_ENABLE + STATUS_TO_DISABLE)) - continue; - pre_disable = checking->is_status(STATUS_DISABLED); - checking->refresh_disable_status(); - new_disable = checking->is_status(STATUS_DISABLED); - if (pre_disable != new_disable && checking->is_status(STATUS_EFFECT_ENABLED)) { - checking->filter_disable_related_cards(); - if (pre_disable) - checking->set_status(STATUS_TO_ENABLE, TRUE); - else - checking->set_status(STATUS_TO_DISABLE, TRUE); - } - } - for (card_set::iterator it = checked.begin(); it != checked.end(); ++it) { - if((*it)->is_status(STATUS_DISABLED) && (*it)->is_status(STATUS_TO_DISABLE) && !(*it)->is_status(STATUS_TO_ENABLE)) - (*it)->reset(RESET_DISABLE, RESET_EVENT); - (*it)->set_status(STATUS_TO_ENABLE + STATUS_TO_DISABLE, FALSE); - } - } while(effects.disable_check_list.size()); -} -void field::adjust_self_destroy_set() { - if(core.selfdes_disabled || !core.self_destroy_set.empty() || !core.self_tograve_set.empty()) - return; - card_set cset; - for(uint8 p = 0; p < 2; ++p) { - for(uint8 i = 0; i < 5; ++i) { - card* pcard = player[p].list_mzone[i]; - if(pcard && pcard->is_position(POS_FACEUP)) - cset.insert(pcard); - } - for(uint8 i = 0; i < 8; ++i) { - card* pcard = player[p].list_szone[i]; - if(pcard && pcard->is_position(POS_FACEUP)) - cset.insert(pcard); - } - } - core.self_destroy_set.clear(); - core.self_tograve_set.clear(); - effect* peffect; - for(auto cit = cset.begin(); cit != cset.end(); ++cit) { - card* pcard = *cit; - if((!pcard->is_status(STATUS_DISABLED) && (peffect = check_unique_onfield(pcard, pcard->current.controler))) - || (peffect = pcard->is_affected_by_effect(EFFECT_SELF_DESTROY))) { - core.self_destroy_set.insert(pcard); - pcard->current.reason_effect = peffect; - pcard->current.reason_player = peffect->get_handler_player(); - } - } - if(core.global_flag & GLOBALFLAG_SELF_TOGRAVE) { - for(auto cit = cset.begin(); cit != cset.end(); ++cit) { - card* pcard = *cit; - if(peffect = pcard->is_affected_by_effect(EFFECT_SELF_TOGRAVE)) { - core.self_tograve_set.insert(pcard); - pcard->current.reason_effect = peffect; - pcard->current.reason_player = peffect->get_handler_player(); - } - } - } - if(!core.self_destroy_set.empty() || !core.self_tograve_set.empty()) - add_process(PROCESSOR_SELF_DESTROY, 0, 0, 0, 0, 0); -} -void field::add_unique_card(card* pcard) { - uint8 con = pcard->current.controler; - if(pcard->unique_pos[0]) - core.unique_cards[con].insert(pcard); - if(pcard->unique_pos[1]) - core.unique_cards[1 - con].insert(pcard); - pcard->unique_uid = infos.copy_id++; -} - -void field::remove_unique_card(card* pcard) { - uint8 con = pcard->current.controler; - if(con == PLAYER_NONE) - return; - if(pcard->unique_pos[0]) - core.unique_cards[con].erase(pcard); - if(pcard->unique_pos[1]) - core.unique_cards[1 - con].erase(pcard); -} - -effect* field::check_unique_onfield(card* pcard, uint8 controler) { - if(!pcard->unique_code) - return 0; - for(auto iter = core.unique_cards[controler].begin(); iter != core.unique_cards[controler].end(); ++iter) { - card* ucard = *iter; - if((ucard != pcard) && ucard->get_status(STATUS_EFFECT_ENABLED) && (ucard->unique_code == pcard->unique_code) - && (!(pcard->current.location & LOCATION_ONFIELD) || pcard->is_position(POS_FACEDOWN) || (ucard->unique_uid < pcard->unique_uid))) - return pcard->unique_effect; - } - return 0; -} - -int32 field::check_spsummon_once(card* pcard, uint8 playerid) { - if(pcard->spsummon_code == 0) - return TRUE; - auto iter = core.spsummon_once_map[playerid].find(pcard->spsummon_code); - return (iter == core.spsummon_once_map[playerid].end()) || (iter->second == 0); -} - -void field::check_card_counter(card* pcard, int32 counter_type, int32 playerid) { - auto& counter_map = (counter_type == 1) ? core.summon_counter : - (counter_type == 2) ? core.normalsummon_counter : - (counter_type == 3) ? core.spsummon_counter : - (counter_type == 4) ? core.flipsummon_counter : core.attack_counter; - for(auto iter = counter_map.begin(); iter != counter_map.end(); ++iter) { - auto& info = iter->second; - if((playerid == 0) && (info.second & 0xffff) != 0) - continue; - if((playerid == 1) && (info.second & 0xffff0000) != 0) - continue; - if(info.first) { - pduel->lua->add_param(pcard, PARAM_TYPE_CARD); - if(!pduel->lua->check_condition(info.first, 1)) { - if(playerid == 0) - info.second += 0x1; - else - info.second += 0x10000; - } - } - } -} -void field::check_chain_counter(effect* peffect, int32 playerid, int32 chainid, bool cancel) { - for(auto iter = core.chain_counter.begin(); iter != core.chain_counter.end(); ++iter) { - auto& info = iter->second; - if(info.first) { - pduel->lua->add_param(peffect, PARAM_TYPE_EFFECT); - pduel->lua->add_param(playerid, PARAM_TYPE_INT); - pduel->lua->add_param(chainid, PARAM_TYPE_INT); - if(!pduel->lua->check_condition(info.first, 3)) { - if(playerid == 0) { - if(!cancel) - info.second += 0x1; - else if(info.second & 0xffff) - info.second -= 0x1; - } else { - if(!cancel) - info.second += 0x10000; - else if(info.second & 0xffff0000) - info.second -= 0x10000; - } - } - } - } -} -void field::set_spsummon_counter(uint8 playerid, bool add, bool chain) { - if(add) { - core.spsummon_state_count[playerid]++; - if(chain) - core.spsummon_state_count_rst[playerid]++; - } else { - if(chain) { - core.spsummon_state_count[playerid] -= core.spsummon_state_count_rst[playerid]; - core.spsummon_state_count_rst[playerid] = 0; - } else - core.spsummon_state_count[playerid]--; - } - if(core.global_flag & GLOBALFLAG_SPSUMMON_COUNT) { - for(auto iter = effects.spsummon_count_eff.begin(); iter != effects.spsummon_count_eff.end(); ++iter) { - effect* peffect = *iter; - card* pcard = peffect->handler; - if(add) { - if(pcard->is_status(STATUS_EFFECT_ENABLED) && !pcard->is_status(STATUS_DISABLED) && pcard->is_position(POS_FACEUP)) { - if(((playerid == pcard->current.controler) && peffect->s_range) || ((playerid != pcard->current.controler) && peffect->o_range)) { - pcard->spsummon_counter[playerid]++; - if(chain) - pcard->spsummon_counter_rst[playerid]++; - } - } - } else { - pcard->spsummon_counter[playerid] -= pcard->spsummon_counter_rst[playerid]; - pcard->spsummon_counter_rst[playerid] = 0; - } - } - } -} -int32 field::check_spsummon_counter(uint8 playerid, uint8 ct) { - if(core.global_flag & GLOBALFLAG_SPSUMMON_COUNT) { - for(auto iter = effects.spsummon_count_eff.begin(); iter != effects.spsummon_count_eff.end(); ++iter) { - effect* peffect = *iter; - card* pcard = peffect->handler; - uint16 val = (uint16)peffect->value; - if(pcard->is_status(STATUS_EFFECT_ENABLED) && !pcard->is_status(STATUS_DISABLED) && pcard->is_position(POS_FACEUP)) { - if(pcard->spsummon_counter[playerid] + ct > val) - return FALSE; - } - } - } - return TRUE; -} -int32 field::check_lp_cost(uint8 playerid, uint32 lp) { - effect_set eset; - int32 val = lp; - if(lp == 0) - return TRUE; - filter_player_effect(playerid, EFFECT_LPCOST_CHANGE, &eset); - for(int32 i = 0; i < eset.size(); ++i) { - pduel->lua->add_param(core.reason_effect, PARAM_TYPE_EFFECT); - pduel->lua->add_param(playerid, PARAM_TYPE_INT); - pduel->lua->add_param(val, PARAM_TYPE_INT); - val = eset[i]->get_value(3); - if(val <= 0) - return TRUE; - } - tevent e; - e.event_cards = 0; - e.event_player = playerid; - e.event_value = lp; - e.reason = 0; - e.reason_effect = core.reason_effect; - e.reason_player = playerid; - if(effect_replace_check(EFFECT_LPCOST_REPLACE, e)) - return true; - cost[playerid].amount += val; - if(cost[playerid].amount <= player[playerid].lp) - return TRUE; - return FALSE; -} -void field::save_lp_cost() { - for(uint8 playerid = 0; playerid < 2; ++playerid) { - if(cost[playerid].count < 8) - cost[playerid].lpstack[cost[playerid].count] = cost[playerid].amount; - cost[playerid].count++; - } -} -void field::restore_lp_cost() { - for(uint8 playerid = 0; playerid < 2; ++playerid) { - cost[playerid].count--; - if(cost[playerid].count < 8) - cost[playerid].amount = cost[playerid].lpstack[cost[playerid].count]; - } -} -uint32 field::get_field_counter(uint8 self, uint8 s, uint8 o, uint16 countertype) { - uint8 c = s; - uint32 count = 0; - for(int p = 0; p < 2; ++p) { - if(c) { - for(int i = 0; i < 5; ++i) { - if(player[self].list_mzone[i]) - count += player[self].list_mzone[i]->get_counter(countertype); - } - for(int i = 0; i < 8; ++i) { - if(player[self].list_szone[i]) - count += player[self].list_szone[i]->get_counter(countertype); - } - } - self = 1 - self; - c = o; - } - return count; -} -int32 field::effect_replace_check(uint32 code, const tevent& e) { - auto pr = effects.continuous_effect.equal_range(code); - for (; pr.first != pr.second; ++pr.first) { - effect* peffect = pr.first->second; - if(peffect->is_activateable(peffect->get_handler_player(), e)) - return TRUE; - } - return FALSE; -} -int32 field::get_attack_target(card* pcard, card_vector* v, uint8 chain_attack) { - uint8 p = pcard->current.controler; - effect* peffect; - card* atarget; - pcard->operation_param = 0; - card_vector must_be_attack; - card_vector* pv; - card_vector::iterator cit; - for(uint32 i = 0; i < 5; ++i) { - atarget = player[1 - p].list_mzone[i]; - if(atarget && atarget->is_affected_by_effect(EFFECT_MUST_BE_ATTACKED, pcard)) - must_be_attack.push_back(atarget); - } - if(pcard->attack_all_target && (peffect = pcard->is_affected_by_effect(EFFECT_ATTACK_ALL))) { - if(pcard->announced_cards.size()) { - if(must_be_attack.size()) - pv = &must_be_attack; - else - pv = &player[1 - p].list_mzone; - for(cit = pv->begin(); cit != pv->end(); ++cit) { - atarget = *cit; - if(!atarget || pcard->announced_cards.count(atarget->fieldid_r)) - continue; - if(atarget->is_affected_by_effect(EFFECT_IGNORE_BATTLE_TARGET)) - continue; - if(atarget->is_affected_by_effect(EFFECT_CANNOT_BE_BATTLE_TARGET, pcard)) - continue; - if(pcard->is_affected_by_effect(EFFECT_CANNOT_SELECT_BATTLE_TARGET, atarget)) - continue; - pduel->lua->add_param(atarget, PARAM_TYPE_CARD); - if(!peffect->check_value_condition(1)) - continue; - v->push_back(atarget); - } - return must_be_attack.size() ? TRUE : FALSE; - } - } else if(!chain_attack) { - uint32 extrac = 0; - if((peffect = pcard->is_affected_by_effect(EFFECT_EXTRA_ATTACK))) - extrac = peffect->get_value(pcard); - if(pcard->announce_count >= extrac + 1) - return FALSE; - } - uint32 mcount = 0; - if(must_be_attack.size()) - pv = &must_be_attack; - else - pv = &player[1 - p].list_mzone; - for(cit = pv->begin(); cit != pv->end(); ++cit) { - atarget = *cit; - if(!atarget) - continue; - if(atarget->is_affected_by_effect(EFFECT_IGNORE_BATTLE_TARGET)) - continue; - mcount++; - if(atarget->is_affected_by_effect(EFFECT_CANNOT_BE_BATTLE_TARGET, pcard)) - continue; - if(pcard->is_affected_by_effect(EFFECT_CANNOT_SELECT_BATTLE_TARGET, atarget)) - continue; - if(chain_attack && core.chain_attack_target && atarget != core.chain_attack_target) - continue; - v->push_back(atarget); - } - if(must_be_attack.size()) - return TRUE; - if((mcount == 0 || pcard->is_affected_by_effect(EFFECT_DIRECT_ATTACK)) - && !pcard->is_affected_by_effect(EFFECT_CANNOT_DIRECT_ATTACK) - && !(chain_attack && core.chain_attack_target)) - pcard->operation_param = 1; - return must_be_attack.size() ? TRUE : FALSE; -} -void field::attack_all_target_check() { - if(!core.attacker) - return; - if(!core.attack_target) { - core.attacker->attack_all_target = FALSE; - return; - } - effect* peffect = core.attacker->is_affected_by_effect(EFFECT_ATTACK_ALL); - if(!peffect) - return; - pduel->lua->add_param(core.attack_target, PARAM_TYPE_CARD); - if(!peffect->check_value_condition(1)) - core.attacker->attack_all_target = FALSE; -} -int32 field::check_synchro_material(card* pcard, int32 findex1, int32 findex2, int32 min, int32 max, card* smat, group* mg) { - card* tuner; - if(core.global_flag & GLOBALFLAG_MUST_BE_SMATERIAL) { - effect_set eset; - filter_player_effect(pcard->current.controler, EFFECT_MUST_BE_SMATERIAL, &eset); - if(eset.size()) - return check_tuner_material(pcard, eset[0]->handler, findex1, findex2, min, max, smat, mg); - } - if(mg) { - for(auto cit = mg->container.begin(); cit != mg->container.end(); ++cit) { - tuner = *cit; - if(check_tuner_material(pcard, tuner, findex1, findex2, min, max, smat, mg)) - return TRUE; - } - } else { - for(uint8 p = 0; p < 2; ++p) { - for(int32 i = 0; i < 5; ++i) { - tuner = player[p].list_mzone[i]; - if(check_tuner_material(pcard, tuner, findex1, findex2, min, max, smat, mg)) - return TRUE; - } - } - } - return FALSE; -} -int32 field::check_tuner_material(card* pcard, card* tuner, int32 findex1, int32 findex2, int32 min, int32 max, card* smat, group* mg) { - effect* peffect; - if(tuner && tuner->is_position(POS_FACEUP) && (tuner->get_type() & TYPE_TUNER) && tuner->is_can_be_synchro_material(pcard)) { - effect* pcheck = tuner->is_affected_by_effect(EFFECT_SYNCHRO_CHECK); - if(pcheck) - pcheck->get_value(tuner); - if((mg && !mg->has_card(tuner)) || !pduel->lua->check_matching(tuner, findex1, 0)) { - pduel->restore_assumes(); - return FALSE; - } - if((peffect = tuner->is_affected_by_effect(EFFECT_SYNCHRO_MATERIAL_CUSTOM, pcard))) { - if(!peffect->target) { - pduel->restore_assumes(); - return FALSE; - } - pduel->lua->add_param(peffect, PARAM_TYPE_EFFECT); - pduel->lua->add_param(pcard, PARAM_TYPE_CARD); - pduel->lua->add_param(findex2, PARAM_TYPE_INDEX); - pduel->lua->add_param(min, PARAM_TYPE_INT); - pduel->lua->add_param(max, PARAM_TYPE_INT); - if(pduel->lua->check_condition(peffect->target, 5)) { - pduel->restore_assumes(); - return TRUE; - } - } else { - int32 l = tuner->get_synchro_level(pcard); - int32 l1 = l & 0xffff; - //int32 l2 = l >> 16; - int32 lv = pcard->get_level(); - lv -= l1; - if(lv <= 0) { - pduel->restore_assumes(); - return FALSE; - } - if(smat) { - if(pcheck) - pcheck->get_value(smat); - if(!smat->is_position(POS_FACEUP) || !smat->is_can_be_synchro_material(pcard, tuner) || !pduel->lua->check_matching(smat, findex2, 0)) { - pduel->restore_assumes(); - return FALSE; - } - l = smat->get_synchro_level(pcard); - l1 = l & 0xffff; - lv -= l1; - min--; - max--; - if(lv <= 0) { - pduel->restore_assumes(); - if(lv == 0 && min == 0) - return TRUE; - return FALSE; - } - if(max == 0) { - pduel->restore_assumes(); - return FALSE; - } - } - card_vector nsyn; - card* pm; - if(mg) { - for(auto cit = mg->container.begin(); cit != mg->container.end(); ++cit) { - pm = *cit; - if(pm != tuner && pm != smat && pm->is_can_be_synchro_material(pcard, tuner)) { - if(pcheck) - pcheck->get_value(pm); - if(pm->current.location == LOCATION_MZONE && !pm->is_position(POS_FACEUP)) - continue; - if(!pduel->lua->check_matching(pm, findex2, 0)) - continue; - nsyn.push_back(pm); - pm->operation_param = pm->get_synchro_level(pcard); - } - } - } else { - for(uint8 p = 0; p < 2; ++p) { - for(int32 i = 0; i < 5; ++i) { - pm = player[p].list_mzone[i]; - if(pm && pm != tuner && pm != smat && pm->is_position(POS_FACEUP) && pm->is_can_be_synchro_material(pcard, tuner)) { - if(pcheck) - pcheck->get_value(pm); - if(!pduel->lua->check_matching(pm, findex2, 0)) - continue; - nsyn.push_back(pm); - pm->operation_param = pm->get_synchro_level(pcard); - } - } - } - } - if(!(core.global_flag & GLOBALFLAG_SCRAP_CHIMERA)) { - if(check_with_sum_limit(&nsyn, lv, 0, 1, min, max)) { - pduel->restore_assumes(); - return TRUE; - } - } else { - effect* pscrap = 0; - for(auto cit = nsyn.begin(); cit != nsyn.end(); ++cit) { - pscrap = (*cit)->is_affected_by_effect(EFFECT_SCRAP_CHIMERA); - if(pscrap) - break; - } - if(pscrap) { - card_vector nsyn_filtered; - for(auto cit = nsyn.begin(); cit != nsyn.end(); ++cit) { - if(!pscrap->get_value(*cit)) - nsyn_filtered.push_back(*cit); - } - if(nsyn_filtered.size() == nsyn.size()) { - if(check_with_sum_limit(&nsyn, lv, 0, 1, min, max)) { - pduel->restore_assumes(); - return TRUE; - } - } else { - if(check_with_sum_limit(&nsyn_filtered, lv, 0, 1, min, max)) { - pduel->restore_assumes(); - return TRUE; - } - card_vector nsyn_removed; - for(auto cit = nsyn.begin(); cit != nsyn.end(); ++cit) { - if(!(*cit)->is_affected_by_effect(EFFECT_SCRAP_CHIMERA)) - nsyn_removed.push_back(*cit); - } - if(check_with_sum_limit(&nsyn_removed, lv, 0, 1, min, max)) { - pduel->restore_assumes(); - return TRUE; - } - } - } else { - if(check_with_sum_limit(&nsyn, lv, 0, 1, min, max)) { - pduel->restore_assumes(); - return TRUE; - } - } - } - } - } - pduel->restore_assumes(); - return FALSE; -} -int32 field::check_with_sum_limit(card_vector* mats, int32 acc, int32 index, int32 count, int32 min, int32 max) { - if((uint32)index >= mats->size()) - return FALSE; - int32 op1 = mats->at(index)->operation_param & 0xffff; - int32 op2 = (mats->at(index)->operation_param >> 16) & 0xffff; - if((op1 == acc || op2 == acc) && count >= min && count <= max) - return TRUE; - return (acc > op1 && check_with_sum_limit(mats, acc - op1, index + 1, count + 1, min, max)) - || (op2 && acc > op2 && check_with_sum_limit(mats, acc - op2, index + 1, count + 1, min, max)) - || check_with_sum_limit(mats, acc, index + 1, count, min, max); -} -int32 field::check_xyz_material(card* scard, int32 findex, int32 lv, int32 min, int32 max, group* mg) { - if(mg) { - uint32 xyz_level; - core.xmaterial_lst.clear(); - for (auto cit = mg->container.begin(); cit != mg->container.end(); ++cit) { - if((xyz_level = (*cit)->check_xyz_level(scard, lv)) && (findex == 0 || pduel->lua->check_matching(*cit, findex, 0))) - core.xmaterial_lst.insert(std::make_pair((xyz_level >> 12) & 0xf, *cit)); - } - if(core.global_flag & GLOBALFLAG_XMAT_COUNT_LIMIT) { - if(max > (int32)core.xmaterial_lst.size()) - max = (int32)core.xmaterial_lst.size(); - auto iter = core.xmaterial_lst.lower_bound(max); - core.xmaterial_lst.erase(core.xmaterial_lst.begin(), iter); - } - } else - get_xyz_material(scard, findex, lv, max); - return (int32)core.xmaterial_lst.size() >= min; -} -int32 field::is_player_can_draw(uint8 playerid) { - return !is_player_affected_by_effect(playerid, EFFECT_CANNOT_DRAW); -} -int32 field::is_player_can_discard_deck(uint8 playerid, int32 count) { - if(player[playerid].list_main.size() < (uint32)count) - return FALSE; - return !is_player_affected_by_effect(playerid, EFFECT_CANNOT_DISCARD_DECK); -} -int32 field::is_player_can_discard_deck_as_cost(uint8 playerid, int32 count) { - if(player[playerid].list_main.size() < (uint32)count) - return FALSE; - if(is_player_affected_by_effect(playerid, EFFECT_CANNOT_DISCARD_DECK)) - return FALSE; - if((count == 1) && core.deck_reversed) - return player[playerid].list_main.back()->is_capable_cost_to_grave(playerid); - effect_set eset; - filter_field_effect(EFFECT_TO_GRAVE_REDIRECT, &eset); - for(int32 i = 0; i < eset.size(); ++i) { - uint32 redirect = eset[i]->get_value(); - if((redirect & LOCATION_REMOVED) && player[playerid].list_main.back()->is_affected_by_effect(EFFECT_CANNOT_REMOVE)) - continue; - uint8 p = eset[i]->get_handler_player(); - if((p == playerid && eset[i]->s_range & LOCATION_DECK) || (p != playerid && eset[i]->o_range & LOCATION_DECK)) - return FALSE; - } - return TRUE; -} -int32 field::is_player_can_discard_hand(uint8 playerid, card * pcard, effect * peffect, uint32 reason) { - if(pcard->current.location != LOCATION_HAND) - return FALSE; - effect_set eset; - filter_player_effect(playerid, EFFECT_CANNOT_DISCARD_HAND, &eset); - for(int32 i = 0; i < eset.size(); ++i) { - if(!eset[i]->target) - return FALSE; - pduel->lua->add_param(eset[i], PARAM_TYPE_EFFECT); - pduel->lua->add_param(pcard, PARAM_TYPE_CARD); - pduel->lua->add_param(peffect, PARAM_TYPE_EFFECT); - pduel->lua->add_param(reason, PARAM_TYPE_INT); - if (pduel->lua->check_condition(eset[i]->target, 4)) - return FALSE; - } - return TRUE; -} -int32 field::is_player_can_summon(uint8 playerid) { - effect_set eset; - filter_player_effect(playerid, EFFECT_CANNOT_SUMMON, &eset); - for(int32 i = 0; i < eset.size(); ++i) { - if(!eset[i]->target) - return FALSE; - } - return TRUE; -} -int32 field::is_player_can_summon(uint32 sumtype, uint8 playerid, card * pcard) { - effect_set eset; - sumtype |= SUMMON_TYPE_NORMAL; - filter_player_effect(playerid, EFFECT_CANNOT_SUMMON, &eset); - for(int32 i = 0; i < eset.size(); ++i) { - if(!eset[i]->target) - return FALSE; - pduel->lua->add_param(eset[i], PARAM_TYPE_EFFECT); - pduel->lua->add_param(pcard, PARAM_TYPE_CARD); - pduel->lua->add_param(playerid, PARAM_TYPE_INT); - pduel->lua->add_param(sumtype, PARAM_TYPE_INT); - if (pduel->lua->check_condition(eset[i]->target, 4)) - return FALSE; - } - return TRUE; -} -int32 field::is_player_can_mset(uint32 sumtype, uint8 playerid, card * pcard) { - effect_set eset; - sumtype |= SUMMON_TYPE_NORMAL; - filter_player_effect(playerid, EFFECT_CANNOT_MSET, &eset); - for(int32 i = 0; i < eset.size(); ++i) { - if(!eset[i]->target) - return FALSE; - pduel->lua->add_param(eset[i], PARAM_TYPE_EFFECT); - pduel->lua->add_param(pcard, PARAM_TYPE_CARD); - pduel->lua->add_param(playerid, PARAM_TYPE_INT); - pduel->lua->add_param(sumtype, PARAM_TYPE_INT); - if (pduel->lua->check_condition(eset[i]->target, 4)) - return FALSE; - } - return TRUE; -} -int32 field::is_player_can_sset(uint8 playerid, card * pcard) { - effect_set eset; - filter_player_effect(playerid, EFFECT_CANNOT_SSET, &eset); - for(int32 i = 0; i < eset.size(); ++i) { - if(!eset[i]->target) - return FALSE; - pduel->lua->add_param(eset[i], PARAM_TYPE_EFFECT); - pduel->lua->add_param(pcard, PARAM_TYPE_CARD); - pduel->lua->add_param(playerid, PARAM_TYPE_INT); - if (pduel->lua->check_condition(eset[i]->target, 3)) - return FALSE; - } - return TRUE; -} -int32 field::is_player_can_spsummon(uint8 playerid) { - effect_set eset; - filter_player_effect(playerid, EFFECT_CANNOT_SPECIAL_SUMMON, &eset); - for(int32 i = 0; i < eset.size(); ++i) { - if(!eset[i]->target) - return FALSE; - } - return is_player_can_spsummon_count(playerid, 1); -} -int32 field::is_player_can_spsummon(effect * peffect, uint32 sumtype, uint8 sumpos, uint8 playerid, uint8 toplayer, card * pcard) { - effect_set eset; - if(pcard->is_affected_by_effect(EFFECT_CANNOT_SPECIAL_SUMMON)) - return FALSE; - if(pcard->is_affected_by_effect(EFFECT_FORBIDDEN)) - return FALSE; - sumtype |= SUMMON_TYPE_SPECIAL; - if(sumpos & POS_FACEDOWN && is_player_affected_by_effect(playerid, EFFECT_DEVINE_LIGHT)) - sumpos = (sumpos & POS_FACEUP) | (sumpos >> 1); - filter_player_effect(playerid, EFFECT_CANNOT_SPECIAL_SUMMON, &eset); - for(int32 i = 0; i < eset.size(); ++i) { - if(!eset[i]->target) - return FALSE; - pduel->lua->add_param(eset[i], PARAM_TYPE_EFFECT); - pduel->lua->add_param(pcard, PARAM_TYPE_CARD); - pduel->lua->add_param(playerid, PARAM_TYPE_INT); - pduel->lua->add_param(sumtype, PARAM_TYPE_INT); - pduel->lua->add_param(sumpos, PARAM_TYPE_INT); - pduel->lua->add_param(toplayer, PARAM_TYPE_INT); - pduel->lua->add_param(peffect, PARAM_TYPE_EFFECT); - if (pduel->lua->check_condition(eset[i]->target, 7)) - return FALSE; - } - if(!check_spsummon_once(pcard, playerid)) - return FALSE; - if(!check_spsummon_counter(playerid)) - return FALSE; - return TRUE; -} -int32 field::is_player_can_flipsummon(uint8 playerid, card * pcard) { - effect_set eset; - filter_player_effect(playerid, EFFECT_CANNOT_FLIP_SUMMON, &eset); - for(int32 i = 0; i < eset.size(); ++i) { - if(!eset[i]->target) - return FALSE; - pduel->lua->add_param(eset[i], PARAM_TYPE_EFFECT); - pduel->lua->add_param(pcard, PARAM_TYPE_CARD); - pduel->lua->add_param(playerid, PARAM_TYPE_INT); - if (pduel->lua->check_condition(eset[i]->target, 3)) - return FALSE; - } - return TRUE; -} -int32 field::is_player_can_spsummon_monster(uint8 playerid, uint8 toplayer, uint8 sumpos, card_data * pdata) { - temp_card->data = *pdata; - return is_player_can_spsummon(core.reason_effect, SUMMON_TYPE_SPECIAL, sumpos, playerid, toplayer, temp_card); -} -int32 field::is_player_can_release(uint8 playerid, card * pcard) { - effect_set eset; - filter_player_effect(playerid, EFFECT_CANNOT_RELEASE, &eset); - for(int32 i = 0; i < eset.size(); ++i) { - if(!eset[i]->target) - return FALSE; - pduel->lua->add_param(eset[i], PARAM_TYPE_EFFECT); - pduel->lua->add_param(pcard, PARAM_TYPE_CARD); - pduel->lua->add_param(playerid, PARAM_TYPE_INT); - if (pduel->lua->check_condition(eset[i]->target, 3)) - return FALSE; - } - return TRUE; -} -int32 field::is_player_can_spsummon_count(uint8 playerid, uint32 count) { - effect_set eset; - filter_player_effect(playerid, EFFECT_LEFT_SPSUMMON_COUNT, &eset); - for(int32 i = 0; i < eset.size(); ++i) { - pduel->lua->add_param(core.reason_effect, PARAM_TYPE_EFFECT); - pduel->lua->add_param(playerid, PARAM_TYPE_INT); - int32 v = eset[i]->get_value(2); - if(v < (int32)count) - return FALSE; - } - return check_spsummon_counter(playerid, count); -} -int32 field::is_player_can_place_counter(uint8 playerid, card * pcard, uint16 countertype, uint16 count) { - effect_set eset; - filter_player_effect(playerid, EFFECT_CANNOT_PLACE_COUNTER, &eset); - for(int32 i = 0; i < eset.size(); ++i) { - if(!eset[i]->target) - return FALSE; - pduel->lua->add_param(eset[i], PARAM_TYPE_EFFECT); - pduel->lua->add_param(pcard, PARAM_TYPE_CARD); - pduel->lua->add_param(playerid, PARAM_TYPE_INT); - if (pduel->lua->check_condition(eset[i]->target, 3)) - return FALSE; - } - return TRUE; -} -int32 field::is_player_can_remove_counter(uint8 playerid, card * pcard, uint8 s, uint8 o, uint16 countertype, uint16 count, uint32 reason) { - if((pcard && pcard->get_counter(countertype) >= count) || (!pcard && get_field_counter(playerid, s, o, countertype) >= count)) - return TRUE; - pair pr; - pr = effects.continuous_effect.equal_range(EFFECT_RCOUNTER_REPLACE + countertype); - effect* peffect; - tevent e; - e.event_cards = 0; - e.event_player = playerid; - e.event_value = count; - e.reason = reason; - e.reason_effect = core.reason_effect; - e.reason_player = playerid; - for (; pr.first != pr.second; ++pr.first) { - peffect = pr.first->second; - if(peffect->is_activateable(peffect->get_handler_player(), e)) - return TRUE; - } - return FALSE; -} -int32 field::is_player_can_remove_overlay_card(uint8 playerid, card * pcard, uint8 s, uint8 o, uint16 min, uint32 reason) { - if((pcard && pcard->xyz_materials.size() >= min) || (!pcard && get_overlay_count(playerid, s, o) >= min)) - return TRUE; - pair pr; - pr = effects.continuous_effect.equal_range(EFFECT_OVERLAY_REMOVE_REPLACE); - effect* peffect; - tevent e; - e.event_cards = 0; - e.event_player = playerid; - e.event_value = min; - e.reason = reason; - e.reason_effect = core.reason_effect; - e.reason_player = playerid; - for (; pr.first != pr.second; ++pr.first) { - peffect = pr.first->second; - if(peffect->is_activateable(peffect->get_handler_player(), e)) - return TRUE; - } - return FALSE; -} -int32 field::is_player_can_send_to_grave(uint8 playerid, card * pcard) { - effect_set eset; - filter_player_effect(playerid, EFFECT_CANNOT_TO_GRAVE, &eset); - for(int32 i = 0; i < eset.size(); ++i) { - if(!eset[i]->target) - return FALSE; - pduel->lua->add_param(eset[i], PARAM_TYPE_EFFECT); - pduel->lua->add_param(pcard, PARAM_TYPE_CARD); - pduel->lua->add_param(playerid, PARAM_TYPE_INT); - if (pduel->lua->check_condition(eset[i]->target, 3)) - return FALSE; - } - return TRUE; -} -int32 field::is_player_can_send_to_hand(uint8 playerid, card * pcard) { - effect_set eset; - filter_player_effect(playerid, EFFECT_CANNOT_TO_HAND, &eset); - for(int32 i = 0; i < eset.size(); ++i) { - if(!eset[i]->target) - return FALSE; - pduel->lua->add_param(eset[i], PARAM_TYPE_EFFECT); - pduel->lua->add_param(pcard, PARAM_TYPE_CARD); - pduel->lua->add_param(playerid, PARAM_TYPE_INT); - if (pduel->lua->check_condition(eset[i]->target, 3)) - return FALSE; - } - return TRUE; -} -int32 field::is_player_can_send_to_deck(uint8 playerid, card * pcard) { - effect_set eset; - filter_player_effect(playerid, EFFECT_CANNOT_TO_DECK, &eset); - for(int32 i = 0; i < eset.size(); ++i) { - if(!eset[i]->target) - return FALSE; - pduel->lua->add_param(eset[i], PARAM_TYPE_EFFECT); - pduel->lua->add_param(pcard, PARAM_TYPE_CARD); - pduel->lua->add_param(playerid, PARAM_TYPE_INT); - if (pduel->lua->check_condition(eset[i]->target, 3)) - return FALSE; - } - return TRUE; -} -int32 field::is_player_can_remove(uint8 playerid, card * pcard) { - effect_set eset; - filter_player_effect(playerid, EFFECT_CANNOT_REMOVE, &eset); - for(int32 i = 0; i < eset.size(); ++i) { - if(!eset[i]->target) - return FALSE; - pduel->lua->add_param(eset[i], PARAM_TYPE_EFFECT); - pduel->lua->add_param(pcard, PARAM_TYPE_CARD); - pduel->lua->add_param(playerid, PARAM_TYPE_INT); - if (pduel->lua->check_condition(eset[i]->target, 3)) - return FALSE; - } - return TRUE; -} -int32 field::is_chain_negatable(uint8 chaincount, uint8 naga_check) { - effect_set eset; - if(chaincount < 0 || chaincount > core.current_chain.size()) - return FALSE; - effect* peffect; - if(chaincount == 0) - peffect = core.current_chain.back().triggering_effect; - else - peffect = core.current_chain[chaincount - 1].triggering_effect; - if(naga_check && peffect->flag & EFFECT_FLAG_NAGA) - return FALSE; - if(peffect->flag & EFFECT_FLAG_CANNOT_DISABLE) - return FALSE; - filter_field_effect(EFFECT_CANNOT_INACTIVATE, &eset); - for(int32 i = 0; i < eset.size(); ++i) { - pduel->lua->add_param(chaincount, PARAM_TYPE_INT); - if(eset[i]->check_value_condition(1)) - return FALSE; - } - return TRUE; -} -int32 field::is_chain_disablable(uint8 chaincount, uint8 naga_check) { - effect_set eset; - if(chaincount < 0 || chaincount > core.current_chain.size()) - return FALSE; - effect* peffect; - if(chaincount == 0) - peffect = core.current_chain.back().triggering_effect; - else - peffect = core.current_chain[chaincount - 1].triggering_effect; - if(naga_check && peffect->flag & EFFECT_FLAG_NAGA) - return FALSE; - if(peffect->flag & EFFECT_FLAG_CANNOT_DISABLE) - return FALSE; - filter_field_effect(EFFECT_CANNOT_DISEFFECT, &eset); - for(int32 i = 0; i < eset.size(); ++i) { - pduel->lua->add_param(chaincount, PARAM_TYPE_INT); - if(eset[i]->check_value_condition(1)) - return FALSE; - } - return TRUE; -} -int32 field::check_chain_target(uint8 chaincount, card * pcard) { - if(chaincount < 0 || chaincount > core.current_chain.size()) - return FALSE; - chain* pchain; - if(chaincount == 0) - pchain = &core.current_chain.back(); - else - pchain = &core.current_chain[chaincount - 1]; - effect* peffect = pchain->triggering_effect; - uint8 tp = pchain->triggering_player; - if(!(peffect->flag & EFFECT_FLAG_CARD_TARGET) || !peffect->target) - return FALSE; - if(!pcard->is_capable_be_effect_target(peffect, tp)) - return false; - pduel->lua->add_param(peffect, PARAM_TYPE_EFFECT); - pduel->lua->add_param(tp, PARAM_TYPE_INT); - pduel->lua->add_param(pchain->evt.event_cards , PARAM_TYPE_GROUP); - pduel->lua->add_param(pchain->evt.event_player, PARAM_TYPE_INT); - pduel->lua->add_param(pchain->evt.event_value, PARAM_TYPE_INT); - pduel->lua->add_param(pchain->evt.reason_effect , PARAM_TYPE_EFFECT); - pduel->lua->add_param(pchain->evt.reason, PARAM_TYPE_INT); - pduel->lua->add_param(pchain->evt.reason_player, PARAM_TYPE_INT); - pduel->lua->add_param((ptr)0, PARAM_TYPE_INT); - pduel->lua->add_param(pcard, PARAM_TYPE_CARD); - return pduel->lua->check_condition(peffect->target, 10); -} -int32 field::is_able_to_enter_bp() { - return ((core.duel_options & DUEL_ATTACK_FIRST_TURN) || infos.turn_id != 1) - && infos.phase < PHASE_BATTLE - && !is_player_affected_by_effect(infos.turn_player, EFFECT_CANNOT_BP); -} diff --git a/ocgcore/field.h b/ocgcore/field.h deleted file mode 100644 index 8de8e2c35a..0000000000 --- a/ocgcore/field.h +++ /dev/null @@ -1,817 +0,0 @@ -/* - * field.h - * - * Created on: 2010-5-8 - * Author: Argon - */ - -#ifndef FIELD_H_ -#define FIELD_H_ - -#include "memory.h" -#include "common.h" -#include "effectset.h" -#include -#include -#include -#include -#include -#include -#include -#include - -class card; -struct card_data; -class duel; -class group; -class effect; - -struct tevent { - card* trigger_card; - group* event_cards; - effect* reason_effect; - uint32 event_code; - uint32 event_value; - uint32 reason; - uint8 event_player; - uint8 reason_player; - bool operator< (const tevent& v) const; -}; -struct optarget { - group* op_cards; - uint8 op_count; - uint8 op_player; - int32 op_param; -}; -struct chain { - typedef std::map opmap; - uint16 chain_id; - uint8 chain_count; - uint8 triggering_player; - uint8 triggering_controler; - uint8 triggering_location; - uint8 triggering_sequence; - effect* triggering_effect; - group* target_cards; - int32 replace_op; - uint8 target_player; - int32 target_param; - effect* disable_reason; - uint8 disable_player; - tevent evt; - opmap opinfos; - uint32 flag; - static bool chain_operation_sort(const chain& c1, const chain& c2); -}; - -struct player_info { - typedef std::vector card_vector; - int32 lp; - int32 start_count; - int32 draw_count; - uint32 used_location; - uint32 disabled_location; - uint32 extra_p_count; - card_vector list_mzone; - card_vector list_szone; - card_vector list_main; - card_vector list_grave; - card_vector list_hand; - card_vector list_remove; - card_vector list_extra; - card_vector tag_list_main; - card_vector tag_list_hand; - card_vector tag_list_extra; -}; -struct field_effect { - typedef std::multimap effect_container; - typedef std::map effect_indexer; - typedef std::map oath_effects; - typedef std::set effect_collection; - - effect_container aura_effect; - effect_container ignition_effect; - effect_container activate_effect; - effect_container trigger_o_effect; - effect_container trigger_f_effect; - effect_container quick_o_effect; - effect_container quick_f_effect; - effect_container continuous_effect; - effect_indexer indexer; - oath_effects oath; - effect_collection pheff; - effect_collection cheff; - effect_collection rechargeable; - effect_collection spsummon_count_eff; - - std::list disable_check_list; - std::set disable_check_set; -}; -struct field_info { - int32 field_id; - int16 copy_id; - int16 turn_id; - int16 card_id; - uint8 phase; - uint8 turn_player; - uint8 priorities[2]; - uint8 can_shuffle; -}; -struct lpcost { - int32 count; - int32 amount; - int32 lpstack[8]; -}; -struct processor_unit { - uint16 type; - uint16 step; - effect* peffect; - group* ptarget; - ptr arg1; - ptr arg2; -}; -union return_value { - int8 bvalue[64]; - int16 svalue[32]; - int32 ivalue[16]; - int64 lvalue[8]; -}; -struct processor { - typedef std::vector effect_vector; - typedef std::vector card_vector; - typedef std::vector option_vector; - typedef std::list card_list; - typedef std::list event_list; - typedef std::list chain_list; - typedef std::map instant_f_list; - typedef std::vector chain_array; - typedef std::list processor_list; - typedef std::set card_set; - typedef std::set effect_collection; - typedef std::set > delayed_effect_collection; - - processor_list units; - processor_list subunits; - processor_unit reserved; - card_vector select_cards; - card_vector summonable_cards; - card_vector spsummonable_cards; - card_vector repositionable_cards; - card_vector msetable_cards; - card_vector ssetable_cards; - card_vector attackable_cards; - effect_vector select_effects; - option_vector select_options; - event_list point_event; - event_list instant_event; - event_list queue_event; - event_list used_event; - event_list single_event; - event_list solving_event; - event_list sub_solving_event; - chain_array select_chains; - chain_array current_chain; - chain_list tpchain; - chain_list ntpchain; - chain_list continuous_chain; - chain_list desrep_chain; - chain_list new_fchain; - chain_list new_fchain_s; - chain_list new_ochain; - chain_list new_ochain_s; - chain_list new_fchain_b; - chain_list new_ochain_b; - chain_list new_ochain_h; - chain_list new_chains; - chain_list tmp_chain; - delayed_effect_collection delayed_quick_tmp; - delayed_effect_collection delayed_quick_break; - delayed_effect_collection delayed_quick; - instant_f_list quick_f_chain; - card_set leave_confirmed; - card_set special_summoning; - card_set equiping_cards; - card_set control_adjust_set[2]; - card_set self_destroy_set; - card_set self_tograve_set; - card_set release_cards; - card_set release_cards_ex; - card_set release_cards_ex_sum; - card_set destroy_set; - card_set battle_destroy_rep; - card_set fusion_materials; - card_set synchro_materials; - card_set operated_set; - card_set discarded_set; - card_set destroy_canceled; - card_set delayed_enable_set; - effect_set_v disfield_effects; - effect_set_v extraz_effects; - effect_set_v extraz_effects_e; - std::set reseted_effects; - std::list delayed_tp; - std::list delayed_ntp; - event_list delayed_tev; - event_list delayed_ntev; - std::unordered_map readjust_map; - std::unordered_set unique_cards[2]; - std::unordered_map effect_count_code; - std::unordered_map effect_count_code_duel; - std::unordered_map spsummon_once_map[2]; - std::unordered_map spsummon_once_map_rst[2]; - std::multimap > xmaterial_lst; - ptr temp_var[4]; - uint32 global_flag; - uint16 pre_field[2]; - uint16 opp_mzone[5]; - int32 chain_limit; - uint8 chain_limp; - int32 chain_limit_p; - uint8 chain_limp_p; - uint8 chain_solving; - uint8 conti_solving; - uint8 win_player; - uint8 win_reason; - uint8 re_adjust; - effect* reason_effect; - uint8 reason_player; - card* summoning_card; - uint8 summon_depth; - uint8 summon_cancelable; - card* attacker; - card* sub_attacker; - card* attack_target; - card* sub_attack_target; - card* limit_tuner; - group* limit_xyz; - group* limit_syn; - uint8 attack_cancelable; - uint8 attack_rollback; - uint8 effect_damage_step; - int32 battle_damage[2]; - int32 summon_count[2]; - uint8 extra_summon[2]; - int32 spe_effect[2]; - int32 duel_options; - uint32 copy_reset; - uint8 copy_reset_count; - uint8 dice_result[5]; - uint8 coin_result[5]; - uint8 to_bp; - uint8 to_m2; - uint8 to_ep; - uint8 skip_m2; - uint8 chain_attack; - card* chain_attack_target; - uint8 selfdes_disabled; - uint8 overdraw[2]; - int32 check_level; - uint8 shuffle_check_disabled; - uint8 shuffle_hand_check[2]; - uint8 shuffle_deck_check[2]; - uint8 deck_reversed; - uint8 remove_brainwashing; - uint8 flip_delayed; - uint8 damage_calculated; - uint8 hand_adjusted; - uint8 summon_state_count[2]; - uint8 normalsummon_state_count[2]; - uint8 flipsummon_state_count[2]; - uint8 spsummon_state_count[2]; - uint8 spsummon_state_count_rst[2]; - uint8 spsummon_state_count_tmp[2]; - bool spsummon_rst; - uint8 attack_state_count[2]; - uint8 battle_phase_count[2]; - uint8 phase_action; - uint8 battle_phase_action; - uint32 hint_timing[2]; - uint8 current_player; - uint8 conti_player; - std::unordered_map > summon_counter; - std::unordered_map > normalsummon_counter; - std::unordered_map > spsummon_counter; - std::unordered_map > flipsummon_counter; - std::unordered_map > attack_counter; - std::unordered_map > chain_counter; -}; -class field { -public: - typedef std::multimap effect_container; - typedef std::map effect_indexer; - typedef std::set card_set; - typedef std::vector effect_vector; - typedef std::vector card_vector; - typedef std::list card_list; - typedef std::list event_list; - typedef std::list chain_list; - typedef std::map instant_f_list; - typedef std::vector chain_array; - typedef std::list processor_list; - typedef std::map oath_effects; - - duel* pduel; - player_info player[2]; - card* temp_card; - field_info infos; - lpcost cost[2]; - field_effect effects; - processor core; - return_value returns; - tevent nil_event; - - static int32 field_used_count[32]; - explicit field(duel* pduel); - ~field(); - void reload_field_info(); - - void add_card(uint8 playerid, card* pcard, uint8 location, uint8 sequence); - void remove_card(card* pcard); - void move_card(uint8 playerid, card* pcard, uint8 location, uint8 sequence); - void set_control(card* pcard, uint8 playerid, uint16 reset_phase, uint8 reset_count); - card* get_field_card(uint8 playerid, uint8 location, uint8 sequence); - int32 is_location_useable(uint8 playerid, uint8 location, uint8 sequence); - int32 get_useable_count(uint8 playerid, uint8 location, uint8 uplayer, uint32 reason, uint32* list = 0); - void shuffle(uint8 playerid, uint8 location); - void reset_sequence(uint8 playerid, uint8 location); - void swap_deck_and_grave(uint8 playerid); - void reverse_deck(uint8 playerid); - void tag_swap(uint8 playerid); - - void add_effect(effect* peffect, uint8 owner_player = 2); - void remove_effect(effect* peffect); - void remove_oath_effect(effect* reason_effect); - void reset_effect(uint32 id, uint32 reset_type); - void reset_phase(uint32 phase); - void reset_chain(); - void add_effect_code(uint32 code, uint32 playerid); - uint32 get_effect_code(uint32 code, uint32 playerid); - void dec_effect_code(uint32 code, uint32 playerid); - - void filter_field_effect(uint32 code, effect_set* eset, uint8 sort = TRUE); - void filter_affected_cards(effect* peffect, card_set* cset); - void filter_player_effect(uint8 playerid, uint32 code, effect_set* eset, uint8 sort = TRUE); - int32 filter_matching_card(int32 findex, uint8 self, uint32 location1, uint32 location2, group* pgroup, card* pexception, uint32 extraargs, card** pret = 0, int32 fcount = 0, int32 is_target = FALSE); - int32 filter_field_card(uint8 self, uint32 location, uint32 location2, group* pgroup); - effect* is_player_affected_by_effect(uint8 playerid, uint32 code); - - int32 get_release_list(uint8 playerid, card_set* release_list, card_set* ex_list, int32 use_con, int32 use_hand, int32 fun, int32 exarg, card* exp); - int32 check_release_list(uint8 playerid, int32 count, int32 use_con, int32 use_hand, int32 fun, int32 exarg, card* exp); - int32 get_summon_release_list(card* target, card_set* release_list, card_set* ex_list, card_set* ex_list_sum, group* mg = 0, uint32 ex = 0); - int32 get_summon_count_limit(uint8 playerid); - int32 get_draw_count(uint8 playerid); - void get_ritual_material(uint8 playerid, effect* peffect, card_set* material); - void ritual_release(card_set* material); - void get_xyz_material(card* scard, int32 findex, uint32 lv, int32 maxc); - void get_overlay_group(uint8 self, uint8 s, uint8 o, card_set* pset); - int32 get_overlay_count(uint8 self, uint8 s, uint8 o); - void update_disable_check_list(effect* peffect); - void add_to_disable_check_list(card* pcard); - void adjust_disable_check_list(); - void adjust_self_destroy_set(); - void add_unique_card(card* pcard); - void remove_unique_card(card* pcard); - effect* check_unique_onfield(card* pcard, uint8 controler); - int32 check_spsummon_once(card* pcard, uint8 playerid); - void check_card_counter(card* pcard, int32 counter_type, int32 playerid); - void check_chain_counter(effect* peffect, int32 playerid, int32 chainid, bool cancel = false); - void set_spsummon_counter(uint8 playerid, bool add = true, bool chain = false); - int32 check_spsummon_counter(uint8 playerid, uint8 ct = 1); - - int32 check_lp_cost(uint8 playerid, uint32 cost); - void save_lp_cost(); - void restore_lp_cost(); - int32 pay_lp_cost(uint32 step, uint8 playerid, uint32 cost); - - uint32 get_field_counter(uint8 self, uint8 s, uint8 o, uint16 countertype); - int32 effect_replace_check(uint32 code, const tevent& e); - int32 get_attack_target(card* pcard, card_vector* v, uint8 chain_attack = FALSE); - void attack_all_target_check(); - int32 check_synchro_material(card* pcard, int32 findex1, int32 findex2, int32 min, int32 max, card* smat, group* mg); - int32 check_tuner_material(card* pcard, card* tuner, int32 findex1, int32 findex2, int32 min, int32 max, card* smat, group* mg); - int32 check_with_sum_limit(card_vector* mats, int32 acc, int32 index, int32 count, int32 min, int32 max); - int32 check_xyz_material(card* pcard, int32 findex, int32 lv, int32 min, int32 max, group* mg); - - int32 is_player_can_draw(uint8 playerid); - int32 is_player_can_discard_deck(uint8 playerid, int32 count); - int32 is_player_can_discard_deck_as_cost(uint8 playerid, int32 count); - int32 is_player_can_discard_hand(uint8 playerid, card* pcard, effect* peffect, uint32 reason); - int32 is_player_can_summon(uint8 playerid); - int32 is_player_can_summon(uint32 sumtype, uint8 playerid, card* pcard); - int32 is_player_can_mset(uint32 sumtype, uint8 playerid, card* pcard); - int32 is_player_can_sset(uint8 playerid, card* pcard); - int32 is_player_can_spsummon(uint8 playerid); - int32 is_player_can_spsummon(effect* peffect, uint32 sumtype, uint8 sumpos, uint8 playerid, uint8 toplayer, card* pcard); - int32 is_player_can_flipsummon(uint8 playerid, card* pcard); - int32 is_player_can_spsummon_monster(uint8 playerid, uint8 toplayer, uint8 sumpos, card_data* pdata); - int32 is_player_can_spsummon_count(uint8 playerid, uint32 count); - int32 is_player_can_release(uint8 playerid, card* pcard); - int32 is_player_can_place_counter(uint8 playerid, card* pcard, uint16 countertype, uint16 count); - int32 is_player_can_remove_counter(uint8 playerid, card* pcard, uint8 s, uint8 o, uint16 countertype, uint16 count, uint32 reason); - int32 is_player_can_remove_overlay_card(uint8 playerid, card* pcard, uint8 s, uint8 o, uint16 count, uint32 reason); - int32 is_player_can_send_to_grave(uint8 playerid, card* pcard); - int32 is_player_can_send_to_hand(uint8 playerid, card* pcard); - int32 is_player_can_send_to_deck(uint8 playerid, card* pcard); - int32 is_player_can_remove(uint8 playerid, card* pcard); - int32 is_chain_negatable(uint8 chaincount, uint8 naga_check = FALSE); - int32 is_chain_disablable(uint8 chaincount, uint8 naga_check = FALSE); - int32 check_chain_target(uint8 chaincount, card* pcard); - int32 is_able_to_enter_bp(); - - void add_process(uint16 type, uint16 step, effect* peffect, group* target, ptr arg1, ptr arg2); - int32 process(); - int32 execute_cost(uint16 step, effect* peffect, uint8 triggering_player); - int32 execute_operation(uint16 step, effect* peffect, uint8 triggering_player); - int32 execute_target(uint16 step, effect* peffect, uint8 triggering_player); - void raise_event(card* event_card, uint32 event_code, effect* reason_effect, uint32 reason, uint8 reason_player, uint8 event_player, uint32 event_value); - void raise_event(card_set* event_cards, uint32 event_code, effect* reason_effect, uint32 reason, uint8 reason_player, uint8 event_player, uint32 event_value); - void raise_single_event(card* trigger_card, card_set* event_cards, uint32 event_code, effect* reason_effect, uint32 reason, uint8 reason_player, uint8 event_player, uint32 event_value); - int32 check_event(uint32 code, tevent* pe = 0); - int32 check_event_c(effect* peffect, uint8 playerid, int32 neglect_con, int32 neglect_cost, int32 copy_info, tevent* pe = 0); - int32 check_hint_timing(effect* peffect); - int32 process_phase_event(int16 step, int32 phase_event); - int32 process_point_event(int16 step, int32 skip_trigger, int32 skip_freechain, int32 skip_new); - int32 process_quick_effect(int16 step, int32 skip_freechain, uint8 priority); - int32 process_instant_event(); - int32 process_single_event(); - int32 process_idle_command(uint16 step); - int32 process_battle_command(uint16 step); - int32 process_damage_step(uint16 step); - void calculate_battle_damage(effect** pdamchange, card** preason_card, uint8* battle_destroyed); - int32 process_turn(uint16 step, uint8 turn_player); - - int32 add_chain(uint16 step); - int32 sort_chain(uint16 step, uint8 tp); - int32 solve_continuous(uint16 step, effect* peffect, uint8 triggering_player); - int32 solve_chain(uint16 step, uint32 chainend_arg1, uint32 chainend_arg2); - int32 break_effect(); - void adjust_instant(); - void adjust_all(); - void refresh_location_info_instant(); - int32 refresh_location_info(uint16 step); - int32 adjust_step(uint16 step); - - //operations - int32 negate_chain(uint8 chaincount); - int32 disable_chain(uint8 chaincount); - void change_chain_effect(uint8 chaincount, int32 replace_op); - void change_target(uint8 chaincount, group* targets); - void change_target_player(uint8 chaincount, uint8 playerid); - void change_target_param(uint8 chaincount, int32 param); - void remove_counter(uint32 reason, card* pcard, uint32 rplayer, uint32 s, uint32 o, uint32 countertype, uint32 count); - void remove_overlay_card(uint32 reason, card* pcard, uint32 rplayer, uint32 s, uint32 o, uint16 min, uint16 max); - void get_control(effect* reason_effect, uint32 reason_player, card* pcard, uint32 playerid, uint32 reset_phase, uint32 reset_count); - void swap_control(effect* reason_effect, uint32 reason_player, card* pcard1, card* pcard2, uint32 reset_phase, uint32 reset_count); - void equip(uint32 equip_player, card* equip_card, card* target, uint32 up, uint32 is_step); - void draw(effect* reason_effect, uint32 reason, uint32 reason_player, uint32 playerid, uint32 count); - void damage(effect* reason_effect, uint32 reason, uint32 reason_player, card* pcard, uint32 playerid, uint32 amount); - void recover(effect* reason_effect, uint32 reason, uint32 reason_player, uint32 playerid, uint32 amount); - void summon(uint32 sumplayer, card* target, effect* proc, uint32 ignore_count, uint32 min_tribute); - void special_summon_rule(uint32 sumplayer, card* target, uint32 summon_type); - void special_summon(card_set* target, uint32 sumtype, uint32 sumplayer, uint32 playerid, uint32 nocheck, uint32 nolimit, uint32 positions); - void special_summon_step(card* target, uint32 sumtype, uint32 sumplayer, uint32 playerid, uint32 nocheck, uint32 nolimit, uint32 positions); - void special_summon_complete(effect* reason_effect, uint8 reason_player); - void destroy(card_set* targets, effect* reason_effect, uint32 reason, uint32 reason_player, uint32 playerid = 2, uint32 destination = 0, uint32 sequence = 0); - void destroy(card* target, effect* reason_effect, uint32 reason, uint32 reason_player, uint32 playerid = 2, uint32 destination = 0, uint32 sequence = 0); - void release(card_set* targets, effect* reason_effect, uint32 reason, uint32 reason_player); - void release(card* target, effect* reason_effect, uint32 reason, uint32 reason_player); - void send_to(card_set* targets, effect* reason_effect, uint32 reason, uint32 reason_player, uint32 playerid, uint32 destination, uint32 sequence, uint32 position); - void send_to(card* target, effect* reason_effect, uint32 reason, uint32 reason_player, uint32 playerid, uint32 destination, uint32 sequence, uint32 position); - void move_to_field(card* target, uint32 move_player, uint32 playerid, uint32 destination, uint32 positions, uint32 enable = FALSE, uint32 ret = FALSE, uint32 is_equip = FALSE); - void change_position(card_set* targets, effect* reason_effect, uint32 reason_player, uint32 au, uint32 ad, uint32 du, uint32 dd, uint32 noflip, uint32 enable = FALSE); - void change_position(card* target, effect* reason_effect, uint32 reason_player, uint32 npos, uint32 noflip, uint32 enable = FALSE); - - int32 remove_counter(uint16 step, uint32 reason, card* pcard, uint8 rplayer, uint8 s, uint8 o, uint16 countertype, uint16 count); - int32 remove_overlay_card(uint16 step, uint32 reason, card* pcard, uint8 rplayer, uint8 s, uint8 o, uint16 min, uint16 max); - int32 get_control(uint16 step, effect* reason_effect, uint8 reason_player, card* pcard, uint8 playerid, uint16 reset_phase, uint8 reset_count); - int32 swap_control(uint16 step, effect* reason_effect, uint8 reason_player, card* pcard1, card* pcard2, uint16 reset_phase, uint8 reset_count); - int32 control_adjust(uint16 step); - int32 self_destroy(uint16 step); - int32 equip(uint16 step, uint8 equip_player, card* equip_card, card* target, uint32 up, uint32 is_step); - int32 draw(uint16 step, effect* reason_effect, uint32 reason, uint8 reason_player, uint8 playerid, uint32 count); - int32 damage(uint16 step, effect* reason_effect, uint32 reason, uint8 reason_player, card* pcard, uint8 playerid, uint32 amount); - int32 recover(uint16 step, effect* reason_effect, uint32 reason, uint8 reason_player, uint8 playerid, uint32 amount); - int32 summon(uint16 step, uint8 sumplayer, card* target, effect* proc, uint8 ignore_count, uint8 min_tribute); - int32 flip_summon(uint16 step, uint8 sumplayer, card* target); - int32 mset(uint16 step, uint8 setplayer, card* ptarget, effect* proc, uint8 ignore_count, uint8 min_tribute); - int32 sset(uint16 step, uint8 setplayer, uint8 toplayer, card* ptarget); - int32 sset_g(uint16 step, uint8 setplayer, uint8 toplayer, group* ptarget); - int32 special_summon_rule(uint16 step, uint8 sumplayer, card* target, uint32 summon_type); - int32 special_summon_step(uint16 step, group* targets, card* target); - int32 special_summon(uint16 step, effect* reason_effect, uint8 reason_player, group* targets); - int32 destroy(uint16 step, group* targets, card* target, uint8 battle); - int32 destroy(uint16 step, group* targets, effect* reason_effect, uint32 reason, uint8 reason_player); - int32 release(uint16 step, group* targets, card* target); - int32 release(uint16 step, group* targets, effect* reason_effect, uint32 reason, uint8 reason_player); - int32 send_to(uint16 step, group* targets, card* target); - int32 send_to(uint16 step, group* targets, effect* reason_effect, uint32 reason, uint8 reason_player); - int32 discard_deck(uint16 step, uint8 playerid, uint8 count, uint32 reason); - int32 move_to_field(uint16 step, card* target, uint32 enable, uint32 ret, uint32 is_equip); - int32 change_position(uint16 step, group* targets, effect* reason_effect, uint8 reason_player, uint32 enable); - int32 operation_replace(uint16 step, effect* replace_effect, group* targets, ptr arg, ptr replace_type); - int32 select_synchro_material(int16 step, uint8 playerid, card* pcard, int32 min, int32 max, card* smat, group* mg); - int32 select_xyz_material(int16 step, uint8 playerid, uint32 lv, card* pcard, int32 min, int32 max); - int32 select_release_cards(int16 step, uint8 playerid, uint8 check_field, uint8 cancelable, int32 min, int32 max); - int32 select_tribute_cards(int16 step, uint8 playerid, uint8 cancelable, int32 min, int32 max); - int32 toss_coin(uint16 step, effect* reason_effect, uint8 reason_player, uint8 playerid, uint8 count); - int32 toss_dice(uint16 step, effect* reason_effect, uint8 reason_player, uint8 playerid, uint8 count1, uint8 count2); - - int32 select_battle_command(uint16 step, uint8 playerid); - int32 select_idle_command(uint16 step, uint8 playerid); - int32 select_effect_yes_no(uint16 step, uint8 playerid, card* pcard); - int32 select_yes_no(uint16 step, uint8 playerid, uint32 description); - int32 select_option(uint16 step, uint8 playerid); - int32 select_card(uint16 step, uint8 playerid, uint8 cancelable, uint8 min, uint8 max); - int32 select_chain(uint16 step, uint8 playerid, uint8 spe_count, uint8 forced); - int32 select_place(uint16 step, uint8 playerid, uint32 flag, uint8 count); - int32 select_position(uint16 step, uint8 playerid, uint32 code, uint8 positions); - int32 select_tribute(uint16 step, uint8 playerid, uint8 cancelable, uint8 min, uint8 max); - int32 select_counter(uint16 step, uint8 playerid, uint16 countertype, uint16 count); - int32 select_with_sum_limit(int16 step, uint8 playerid, int32 acc, int32 min, int max); - int32 sort_card(int16 step, uint8 playerid, uint8 is_chain); - int32 announce_race(int16 step, uint8 playerid, int32 count, int32 available); - int32 announce_attribute(int16 step, uint8 playerid, int32 count, int32 available); - int32 announce_card(int16 step, uint8 playerid); - int32 announce_number(int16 step, uint8 playerid); -}; - -//Location Use Reason -#define LOCATION_REASON_TOFIELD 0x1 -#define LOCATION_REASON_CONTROL 0x2 -//Chain Info -#define CHAIN_DISABLE_ACTIVATE 0x01 -#define CHAIN_DISABLE_EFFECT 0x02 -#define CHAIN_HAND_EFFECT 0x04 -#define CHAININFO_CHAIN_COUNT 0x01 -#define CHAININFO_TRIGGERING_EFFECT 0x02 -#define CHAININFO_TRIGGERING_PLAYER 0x04 -#define CHAININFO_TRIGGERING_CONTROLER 0x08 -#define CHAININFO_TRIGGERING_LOCATION 0x10 -#define CHAININFO_TRIGGERING_SEQUENCE 0x20 -#define CHAININFO_TARGET_CARDS 0x40 -#define CHAININFO_TARGET_PLAYER 0x80 -#define CHAININFO_TARGET_PARAM 0x100 -#define CHAININFO_DISABLE_REASON 0x200 -#define CHAININFO_DISABLE_PLAYER 0x400 -#define CHAININFO_CHAIN_ID 0x800 -#define CHAININFO_TYPE 0x1000 -#define CHAININFO_EXTTYPE 0x2000 -//Timing -#define TIMING_DRAW_PHASE 0x1 -#define TIMING_STANDBY_PHASE 0x2 -#define TIMING_MAIN_END 0x4 -#define TIMING_BATTLE_START 0x8 -#define TIMING_BATTLE_END 0x10 -#define TIMING_END_PHASE 0x20 -#define TIMING_SUMMON 0x40 -#define TIMING_SPSUMMON 0x80 -#define TIMING_FLIPSUMMON 0x100 -#define TIMING_MSET 0x200 -#define TIMING_SSET 0x400 -#define TIMING_POS_CHANGE 0x800 -#define TIMING_ATTACK 0x1000 -#define TIMING_DAMAGE_STEP 0x2000 -#define TIMING_DAMAGE_CAL 0x4000 -#define TIMING_CHAIN_END 0x8000 -#define TIMING_DRAW 0x10000 -#define TIMING_DAMAGE 0x20000 -#define TIMING_RECOVER 0x40000 -#define TIMING_DESTROY 0x80000 -#define TIMING_REMOVE 0x100000 -#define TIMING_TOHAND 0x200000 -#define TIMING_TODECK 0x400000 -#define TIMING_TOGRAVE 0x800000 -#define TIMING_BATTLE_PHASE 0x1000000 -#define TIMING_EQUIP 0x2000000 - -#define GLOBALFLAG_DECK_REVERSE_CHECK 0x1 -#define GLOBALFLAG_BRAINWASHING_CHECK 0x2 -#define GLOBALFLAG_SCRAP_CHIMERA 0x4 -#define GLOBALFLAG_DELAYED_QUICKEFFECT 0x8 -#define GLOBALFLAG_DETACH_EVENT 0x10 -#define GLOBALFLAG_MUST_BE_SMATERIAL 0x20 -#define GLOBALFLAG_SPSUMMON_COUNT 0x40 -#define GLOBALFLAG_XMAT_COUNT_LIMIT 0x80 -#define GLOBALFLAG_SELF_TOGRAVE 0x100 -#define GLOBALFLAG_SPSUMMON_ONCE 0x200 -// -#define PROCESSOR_NONE 0 -#define PROCESSOR_WAITING 0x10000 -#define PROCESSOR_END 0x20000 - -#define PROCESSOR_ADJUST 1 -#define PROCESSOR_HINT 2 -#define PROCESSOR_TURN 3 -#define PROCESSOR_WAIT 4 -#define PROCESSOR_REFRESH_LOC 5 -#define PROCESSOR_SELECT_IDLECMD 10 -#define PROCESSOR_SELECT_EFFECTYN 11 -#define PROCESSOR_SELECT_BATTLECMD 12 -#define PROCESSOR_SELECT_YESNO 13 -#define PROCESSOR_SELECT_OPTION 14 -#define PROCESSOR_SELECT_CARD 15 -#define PROCESSOR_SELECT_CHAIN 16 -#define PROCESSOR_SELECT_PLACE 18 -#define PROCESSOR_SELECT_POSITION 19 -#define PROCESSOR_SELECT_TRIBUTE_P 20 -#define PROCESSOR_SORT_CHAIN 21 -#define PROCESSOR_SELECT_COUNTER 22 -#define PROCESSOR_SELECT_SUM 23 -#define PROCESSOR_SELECT_DISFIELD 24 -#define PROCESSOR_SORT_CARD 25 -#define PROCESSOR_SELECT_RELEASE 26 -#define PROCESSOR_SELECT_TRIBUTE 27 -#define PROCESSOR_POINT_EVENT 30 -#define PROCESSOR_QUICK_EFFECT 31 -#define PROCESSOR_IDLE_COMMAND 32 -#define PROCESSOR_PHASE_EVENT 33 -#define PROCESSOR_BATTLE_COMMAND 34 -#define PROCESSOR_DAMAGE_STEP 35 -#define PROCESSOR_ADD_CHAIN 40 -#define PROCESSOR_SOLVE_CHAIN 42 -#define PROCESSOR_SOLVE_CONTINUOUS 43 -#define PROCESSOR_EXECUTE_COST 44 -#define PROCESSOR_EXECUTE_OPERATION 45 -#define PROCESSOR_EXECUTE_TARGET 46 -#define PROCESSOR_DESTROY 50 -#define PROCESSOR_RELEASE 51 -#define PROCESSOR_SENDTO 52 -#define PROCESSOR_MOVETOFIELD 53 -#define PROCESSOR_CHANGEPOS 54 -#define PROCESSOR_OPERATION_REPLACE 55 -#define PROCESSOR_DESTROY_STEP 56 -#define PROCESSOR_RELEASE_STEP 57 -#define PROCESSOR_SENDTO_STEP 58 -#define PROCESSOR_SUMMON_RULE 60 -#define PROCESSOR_SPSUMMON_RULE 61 -#define PROCESSOR_SPSUMMON 62 -#define PROCESSOR_FLIP_SUMMON 63 -#define PROCESSOR_MSET 64 -#define PROCESSOR_SSET 65 -#define PROCESSOR_SPSUMMON_STEP 66 -#define PROCESSOR_SSET_G 67 -#define PROCESSOR_DRAW 70 -#define PROCESSOR_DAMAGE 71 -#define PROCESSOR_RECOVER 72 -#define PROCESSOR_EQUIP 73 -#define PROCESSOR_GET_CONTROL 74 -#define PROCESSOR_SWAP_CONTROL 75 -#define PROCESSOR_CONTROL_ADJUST 76 -#define PROCESSOR_SELF_DESTROY 77 -#define PROCESSOR_PAY_LPCOST 80 -#define PROCESSOR_REMOVE_COUNTER 81 -#define PROCESSOR_ATTACK_DISABLE 82 - -#define PROCESSOR_DESTROY_S 100 -#define PROCESSOR_RELEASE_S 101 -#define PROCESSOR_SENDTO_S 102 -#define PROCESSOR_CHANGEPOS_S 103 -#define PROCESSOR_ANNOUNCE_RACE 110 -#define PROCESSOR_ANNOUNCE_ATTRIB 111 -#define PROCESSOR_ANNOUNCE_LEVEL 112 -#define PROCESSOR_ANNOUNCE_CARD 113 -#define PROCESSOR_ANNOUNCE_TYPE 114 -#define PROCESSOR_ANNOUNCE_NUMBER 115 -#define PROCESSOR_ANNOUNCE_COIN 116 -#define PROCESSOR_TOSS_DICE 117 -#define PROCESSOR_TOSS_COIN 118 -#define PROCESSOR_SELECT_YESNO_S 120 -#define PROCESSOR_SELECT_OPTION_S 121 -#define PROCESSOR_SELECT_CARD_S 122 -#define PROCESSOR_SELECT_EFFECTYN_S 123 -#define PROCESSOR_SELECT_PLACE_S 125 -#define PROCESSOR_SELECT_POSITION_S 126 -#define PROCESSOR_SELECT_TRIBUTE_S 127 -#define PROCESSOR_SORT_CARDS_S 128 -#define PROCESSOR_SELECT_RELEASE_S 129 -#define PROCESSOR_SELECT_TARGET 130 -#define PROCESSOR_SELECT_FUSION 131 -#define PROCESSOR_SELECT_SYNCHRO 132 -#define PROCESSOR_SELECT_SUM_S 133 -#define PROCESSOR_SELECT_DISFIELD_S 134 -#define PROCESSOR_SPSUMMON_S 135 -#define PROCESSOR_SPSUMMON_STEP_S 136 -#define PROCESSOR_SPSUMMON_COMP_S 137 -#define PROCESSOR_RANDOM_SELECT_S 138 -#define PROCESSOR_SELECT_XMATERIAL 139 -#define PROCESSOR_DRAW_S 140 -#define PROCESSOR_DAMAGE_S 141 -#define PROCESSOR_RECOVER_S 142 -#define PROCESSOR_EQUIP_S 143 -#define PROCESSOR_GET_CONTROL_S 144 -#define PROCESSOR_SWAP_CONTROL_S 145 -#define PROCESSOR_DISCARD_HAND_S 150 -#define PROCESSOR_DISCARD_DECK_S 151 -#define PROCESSOR_SORT_DECK_S 152 -#define PROCESSOR_REMOVEOL_S 160 -#define PROCESSOR_MOVETOFIELD_S 161 - -//Hints -#define HINT_EVENT 1 -#define HINT_MESSAGE 2 -#define HINT_SELECTMSG 3 -#define HINT_OPSELECTED 4 -#define HINT_EFFECT 5 -#define HINT_RACE 6 -#define HINT_ATTRIB 7 -#define HINT_CODE 8 -#define HINT_NUMBER 9 -#define HINT_CARD 10 -// -#define CHINT_TURN 1 -#define CHINT_CARD 2 -#define CHINT_RACE 3 -#define CHINT_ATTRIBUTE 4 -#define CHINT_NUMBER 5 -#define CHINT_DESC_ADD 6 -#define CHINT_DESC_REMOVE 7 -//Messages -#define MSG_RETRY 1 -#define MSG_HINT 2 -#define MSG_WAITING 3 -#define MSG_START 4 -#define MSG_WIN 5 -#define MSG_UPDATE_DATA 6 -#define MSG_UPDATE_CARD 7 -#define MSG_REQUEST_DECK 8 -#define MSG_SELECT_BATTLECMD 10 -#define MSG_SELECT_IDLECMD 11 -#define MSG_SELECT_EFFECTYN 12 -#define MSG_SELECT_YESNO 13 -#define MSG_SELECT_OPTION 14 -#define MSG_SELECT_CARD 15 -#define MSG_SELECT_CHAIN 16 -#define MSG_SELECT_PLACE 18 -#define MSG_SELECT_POSITION 19 -#define MSG_SELECT_TRIBUTE 20 -#define MSG_SORT_CHAIN 21 -#define MSG_SELECT_COUNTER 22 -#define MSG_SELECT_SUM 23 -#define MSG_SELECT_DISFIELD 24 -#define MSG_SORT_CARD 25 -#define MSG_CONFIRM_DECKTOP 30 -#define MSG_CONFIRM_CARDS 31 -#define MSG_SHUFFLE_DECK 32 -#define MSG_SHUFFLE_HAND 33 -#define MSG_REFRESH_DECK 34 -#define MSG_SWAP_GRAVE_DECK 35 -#define MSG_SHUFFLE_SET_CARD 36 -#define MSG_REVERSE_DECK 37 -#define MSG_DECK_TOP 38 -#define MSG_NEW_TURN 40 -#define MSG_NEW_PHASE 41 -#define MSG_MOVE 50 -#define MSG_POS_CHANGE 53 -#define MSG_SET 54 -#define MSG_SWAP 55 -#define MSG_FIELD_DISABLED 56 -#define MSG_SUMMONING 60 -#define MSG_SUMMONED 61 -#define MSG_SPSUMMONING 62 -#define MSG_SPSUMMONED 63 -#define MSG_FLIPSUMMONING 64 -#define MSG_FLIPSUMMONED 65 -#define MSG_CHAINING 70 -#define MSG_CHAINED 71 -#define MSG_CHAIN_SOLVING 72 -#define MSG_CHAIN_SOLVED 73 -#define MSG_CHAIN_END 74 -#define MSG_CHAIN_NEGATED 75 -#define MSG_CHAIN_DISABLED 76 -#define MSG_CARD_SELECTED 80 -#define MSG_RANDOM_SELECTED 81 -#define MSG_BECOME_TARGET 83 -#define MSG_DRAW 90 -#define MSG_DAMAGE 91 -#define MSG_RECOVER 92 -#define MSG_EQUIP 93 -#define MSG_LPUPDATE 94 -#define MSG_UNEQUIP 95 -#define MSG_CARD_TARGET 96 -#define MSG_CANCEL_TARGET 97 -#define MSG_PAY_LPCOST 100 -#define MSG_ADD_COUNTER 101 -#define MSG_REMOVE_COUNTER 102 -#define MSG_ATTACK 110 -#define MSG_BATTLE 111 -#define MSG_ATTACK_DISABLED 112 -#define MSG_DAMAGE_STEP_START 113 -#define MSG_DAMAGE_STEP_END 114 -#define MSG_MISSED_EFFECT 120 -#define MSG_BE_CHAIN_TARGET 121 -#define MSG_CREATE_RELATION 122 -#define MSG_RELEASE_RELATION 123 -#define MSG_TOSS_COIN 130 -#define MSG_TOSS_DICE 131 -#define MSG_ANNOUNCE_RACE 140 -#define MSG_ANNOUNCE_ATTRIB 141 -#define MSG_ANNOUNCE_CARD 142 -#define MSG_ANNOUNCE_NUMBER 143 -#define MSG_CARD_HINT 160 -#define MSG_TAG_SWAP 161 -#define MSG_RELOAD_FIELD 162 -#define MSG_AI_NAME 163 -#define MSG_SHOW_HINT 164 -#define MSG_MATCH_KILL 170 -#define MSG_CUSTOM_MSG 180 -#endif /* FIELD_H_ */ diff --git a/ocgcore/group.cpp b/ocgcore/group.cpp deleted file mode 100644 index 173697c87f..0000000000 --- a/ocgcore/group.cpp +++ /dev/null @@ -1,33 +0,0 @@ -/* - * group.cpp - * - * Created on: 2010-8-3 - * Author: Argon - */ - -#include "group.h" -#include "card.h" -#include "duel.h" - -group::group(duel* pd) { - scrtype = 2; - ref_handle = 0; - pduel = pd; - is_readonly = FALSE; -} -group::group(duel* pd, card* pcard) { - container.insert(pcard); - scrtype = 2; - ref_handle = 0; - pduel = pd; - is_readonly = FALSE; -} -group::group(duel* pd, const card_set& cset): container(cset) { - scrtype = 2; - ref_handle = 0; - pduel = pd; - is_readonly = FALSE; -} -group::~group() { - -} diff --git a/ocgcore/group.h b/ocgcore/group.h deleted file mode 100644 index 32f1e166d4..0000000000 --- a/ocgcore/group.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - * group.h - * - * Created on: 2010-5-6 - * Author: Argon - */ - -#ifndef GROUP_H_ -#define GROUP_H_ - -#include "common.h" -#include -#include - -class card; -class duel; - -class group { -public: - typedef std::set card_set; - int32 scrtype; - int32 ref_handle; - duel* pduel; - card_set container; - card_set::iterator it; - uint32 is_readonly; - - inline bool has_card(card* c) { - return container.find(c) != container.end(); - } - - explicit group(duel* pd); - group(duel* pd, card* pcard); - group(duel* pd, const card_set& cset); - ~group(); -}; - -#endif /* GROUP_H_ */ diff --git a/ocgcore/interpreter.cpp b/ocgcore/interpreter.cpp deleted file mode 100644 index 366abfa95f..0000000000 --- a/ocgcore/interpreter.cpp +++ /dev/null @@ -1,1101 +0,0 @@ -/* - * interpreter.cpp - * - * Created on: 2010-4-28 - * Author: Argon - */ - -#include -#include -#include "duel.h" -#include "group.h" -#include "card.h" -#include "effect.h" -#include "scriptlib.h" -#include "ocgapi.h" -#include "interpreter.h" - -static const struct luaL_Reg cardlib[] = { - { "GetCode", scriptlib::card_get_code }, - { "GetOriginalCode", scriptlib::card_get_origin_code }, - { "GetOriginalCodeRule", scriptlib::card_get_origin_code_rule }, - { "IsSetCard", scriptlib::card_is_set_card }, - { "IsPreviousSetCard", scriptlib::card_is_pre_set_card }, - { "GetType", scriptlib::card_get_type }, - { "GetOriginalType", scriptlib::card_get_origin_type }, - { "GetLevel", scriptlib::card_get_level }, - { "GetRank", scriptlib::card_get_rank }, - { "GetSynchroLevel", scriptlib::card_get_synchro_level }, - { "GetRitualLevel", scriptlib::card_get_ritual_level }, - { "GetOriginalLevel", scriptlib::card_get_origin_level }, - { "GetOriginalRank", scriptlib::card_get_origin_rank }, - { "IsXyzLevel", scriptlib::card_is_xyz_level }, - { "GetLeftScale", scriptlib::card_get_lscale }, - { "GetOriginalLeftScale", scriptlib::card_get_origin_lscale }, - { "GetRightScale", scriptlib::card_get_rscale }, - { "GetOriginalRightScale", scriptlib::card_get_origin_rscale }, - { "GetAttribute", scriptlib::card_get_attribute }, - { "GetOriginalAttribute", scriptlib::card_get_origin_attribute }, - { "GetRace", scriptlib::card_get_race }, - { "GetOriginalRace", scriptlib::card_get_origin_race }, - { "GetAttack", scriptlib::card_get_attack }, - { "GetBaseAttack", scriptlib::card_get_origin_attack }, - { "GetTextAttack", scriptlib::card_get_text_attack }, - { "GetDefence", scriptlib::card_get_defence }, - { "GetBaseDefence", scriptlib::card_get_origin_defence }, - { "GetTextDefence", scriptlib::card_get_text_defence }, - { "GetPreviousCodeOnField", scriptlib::card_get_previous_code_onfield }, - { "GetPreviousTypeOnField", scriptlib::card_get_previous_type_onfield }, - { "GetPreviousLevelOnField", scriptlib::card_get_previous_level_onfield }, - { "GetPreviousRankOnField", scriptlib::card_get_previous_rank_onfield }, - { "GetPreviousAttributeOnField", scriptlib::card_get_previous_attribute_onfield }, - { "GetPreviousRaceOnField", scriptlib::card_get_previous_race_onfield }, - { "GetPreviousAttackOnField", scriptlib::card_get_previous_attack_onfield }, - { "GetPreviousDefenceOnField", scriptlib::card_get_previous_defence_onfield }, - { "GetOwner", scriptlib::card_get_owner }, - { "GetControler", scriptlib::card_get_controler }, - { "GetPreviousControler", scriptlib::card_get_previous_controler }, - { "GetReason", scriptlib::card_get_reason }, - { "GetReasonCard", scriptlib::card_get_reason_card }, - { "GetReasonPlayer", scriptlib::card_get_reason_player }, - { "GetReasonEffect", scriptlib::card_get_reason_effect }, - { "GetPosition", scriptlib::card_get_position }, - { "GetPreviousPosition", scriptlib::card_get_previous_position }, - { "GetBattlePosition", scriptlib::card_get_battle_position }, - { "GetLocation", scriptlib::card_get_location }, - { "GetPreviousLocation", scriptlib::card_get_previous_location }, - { "GetSequence", scriptlib::card_get_sequence }, - { "GetPreviousSequence", scriptlib::card_get_previous_sequence }, - { "GetSummonType", scriptlib::card_get_summon_type }, - { "GetSummonLocation", scriptlib::card_get_summon_location }, - { "GetSummonPlayer", scriptlib::card_get_summon_player }, - { "GetDestination", scriptlib::card_get_destination }, - { "GetLeaveFieldDest", scriptlib::card_get_leave_field_dest }, - { "GetTurnID", scriptlib::card_get_turnid }, - { "GetFieldID", scriptlib::card_get_fieldid }, - { "GetRealFieldID", scriptlib::card_get_fieldidr }, - { "IsCode", scriptlib::card_is_code }, - { "IsType", scriptlib::card_is_type }, - { "IsRace", scriptlib::card_is_race }, - { "IsAttribute", scriptlib::card_is_attribute }, - { "IsReason", scriptlib::card_is_reason }, - { "IsStatus", scriptlib::card_is_status }, - { "IsNotTuner", scriptlib::card_is_not_tuner }, - { "SetStatus", scriptlib::card_set_status }, - { "IsDualState", scriptlib::card_is_dual_state }, - { "EnableDualState", scriptlib::card_enable_dual_state }, - { "SetTurnCounter", scriptlib::card_set_turn_counter }, - { "GetTurnCounter", scriptlib::card_get_turn_counter }, - { "SetMaterial", scriptlib::card_set_material }, - { "GetMaterial", scriptlib::card_get_material }, - { "GetMaterialCount", scriptlib::card_get_material_count }, - { "GetEquipGroup", scriptlib::card_get_equip_group }, - { "GetEquipCount", scriptlib::card_get_equip_count }, - { "GetEquipTarget", scriptlib::card_get_equip_target }, - { "GetPreviousEquipTarget", scriptlib::card_get_pre_equip_target }, - { "CheckEquipTarget", scriptlib::card_check_equip_target }, - { "GetUnionCount", scriptlib::card_get_union_count }, - { "GetOverlayGroup", scriptlib::card_get_overlay_group }, - { "GetOverlayCount", scriptlib::card_get_overlay_count }, - { "GetOverlayTarget", scriptlib::card_get_overlay_target }, - { "CheckRemoveOverlayCard", scriptlib::card_check_remove_overlay_card }, - { "RemoveOverlayCard", scriptlib::card_remove_overlay_card }, - { "GetAttackedGroup", scriptlib::card_get_attacked_group }, - { "GetAttackedGroupCount", scriptlib::card_get_attacked_group_count }, - { "GetAttackedCount", scriptlib::card_get_attacked_count }, - { "GetBattledGroup", scriptlib::card_get_battled_group }, - { "GetBattledGroupCount", scriptlib::card_get_battled_group_count }, - { "GetAttackAnnouncedCount", scriptlib::card_get_attack_announced_count }, - { "IsDirectAttacked", scriptlib::card_is_direct_attacked }, - { "SetCardTarget", scriptlib::card_set_card_target }, - { "GetCardTarget", scriptlib::card_get_card_target }, - { "GetFirstCardTarget", scriptlib::card_get_first_card_target }, - { "GetCardTargetCount", scriptlib::card_get_card_target_count }, - { "IsHasCardTarget", scriptlib::card_is_has_card_target }, - { "CancelCardTarget", scriptlib::card_cancel_card_target }, - { "GetOwnerTarget", scriptlib::card_get_owner_target }, - { "GetOwnerTargetCount", scriptlib::card_get_owner_target_count }, - { "GetActivateEffect", scriptlib::card_get_activate_effect }, - { "CheckActivateEffect", scriptlib::card_check_activate_effect }, - { "RegisterEffect", scriptlib::card_register_effect }, - { "IsHasEffect", scriptlib::card_is_has_effect }, - { "ResetEffect", scriptlib::card_reset_effect }, - { "GetEffectCount", scriptlib::card_get_effect_count }, - { "RegisterFlagEffect", scriptlib::card_register_flag_effect }, - { "GetFlagEffect", scriptlib::card_get_flag_effect }, - { "ResetFlagEffect", scriptlib::card_reset_flag_effect }, - { "SetFlagEffectLabel", scriptlib::card_set_flag_effect_label }, - { "GetFlagEffectLabel", scriptlib::card_get_flag_effect_label }, - { "CreateRelation", scriptlib::card_create_relation }, - { "ReleaseRelation", scriptlib::card_release_relation }, - { "CreateEffectRelation", scriptlib::card_create_effect_relation }, - { "ReleaseEffectRelation", scriptlib::card_release_effect_relation }, - { "ClearEffectRelation", scriptlib::card_clear_effect_relation }, - { "IsRelateToEffect", scriptlib::card_is_relate_to_effect }, - { "IsRelateToCard", scriptlib::card_is_relate_to_card }, - { "IsRelateToBattle", scriptlib::card_is_relate_to_battle }, - { "CopyEffect", scriptlib::card_copy_effect }, - { "EnableUnsummonable", scriptlib::card_enable_unsummonable }, - { "EnableReviveLimit", scriptlib::card_enable_revive_limit }, - { "CompleteProcedure", scriptlib::card_complete_procedure }, - { "IsDisabled", scriptlib::card_is_disabled }, - { "IsDestructable", scriptlib::card_is_destructable }, - { "IsSummonableCard", scriptlib::card_is_summonable }, - { "IsSpecialSummonable", scriptlib::card_is_special_summonable }, - { "IsSynchroSummonable", scriptlib::card_is_synchro_summonable }, - { "IsXyzSummonable", scriptlib::card_is_xyz_summonable }, - { "IsSummonable", scriptlib::card_is_can_be_summoned }, - { "IsMSetable", scriptlib::card_is_msetable }, - { "IsSSetable", scriptlib::card_is_ssetable }, - { "IsCanBeSpecialSummoned", scriptlib::card_is_can_be_special_summoned }, - { "IsAbleToHand", scriptlib::card_is_able_to_hand }, - { "IsAbleToDeck", scriptlib::card_is_able_to_deck }, - { "IsAbleToExtra", scriptlib::card_is_able_to_extra }, - { "IsAbleToGrave", scriptlib::card_is_able_to_grave }, - { "IsAbleToRemove", scriptlib::card_is_able_to_remove }, - { "IsAbleToHandAsCost", scriptlib::card_is_able_to_hand_as_cost }, - { "IsAbleToDeckAsCost", scriptlib::card_is_able_to_deck_as_cost }, - { "IsAbleToExtraAsCost", scriptlib::card_is_able_to_extra_as_cost }, - { "IsAbleToDeckOrExtraAsCost", scriptlib::card_is_able_to_deck_or_extra_as_cost }, - { "IsAbleToGraveAsCost", scriptlib::card_is_able_to_grave_as_cost }, - { "IsAbleToRemoveAsCost", scriptlib::card_is_able_to_remove_as_cost }, - { "IsReleasable", scriptlib::card_is_releasable }, - { "IsReleasableByEffect", scriptlib::card_is_releasable_by_effect }, - { "IsDiscardable", scriptlib::card_is_discardable }, - { "IsAttackable", scriptlib::card_is_attackable }, - { "IsChainAttackable", scriptlib::card_is_chain_attackable }, - { "IsFaceup", scriptlib::card_is_faceup }, - { "IsAttackPos", scriptlib::card_is_attack_pos }, - { "IsFacedown", scriptlib::card_is_facedown }, - { "IsDefencePos", scriptlib::card_is_defence_pos }, - { "IsPosition", scriptlib::card_is_position }, - { "IsPreviousPosition", scriptlib::card_is_pre_position }, - { "IsControler", scriptlib::card_is_controler }, - { "IsOnField", scriptlib::card_is_onfield }, - { "IsLocation", scriptlib::card_is_location }, - { "IsPreviousLocation", scriptlib::card_is_pre_location }, - { "IsLevelBelow", scriptlib::card_is_level_below }, - { "IsLevelAbove", scriptlib::card_is_level_above }, - { "IsRankBelow", scriptlib::card_is_rank_below }, - { "IsRankAbove", scriptlib::card_is_rank_above }, - { "IsAttackBelow", scriptlib::card_is_attack_below }, - { "IsAttackAbove", scriptlib::card_is_attack_above }, - { "IsDefenceBelow", scriptlib::card_is_defence_below }, - { "IsDefenceAbove", scriptlib::card_is_defence_above }, - { "IsPublic", scriptlib::card_is_public }, - { "IsForbidden", scriptlib::card_is_forbidden }, - { "IsAbleToChangeControler", scriptlib::card_is_able_to_change_controler }, - { "IsControlerCanBeChanged", scriptlib::card_is_controler_can_be_changed }, - { "AddCounter", scriptlib::card_add_counter }, - { "RemoveCounter", scriptlib::card_remove_counter }, - { "GetCounter", scriptlib::card_get_counter }, - { "EnableCounterPermit", scriptlib::card_enable_counter_permit }, - { "SetCounterLimit", scriptlib::card_set_counter_limit }, - { "IsCanTurnSet", scriptlib::card_is_can_turn_set }, - { "IsCanAddCounter", scriptlib::card_is_can_add_counter }, - { "IsCanRemoveCounter", scriptlib::card_is_can_remove_counter }, - { "IsCanBeFusionMaterial", scriptlib::card_is_can_be_fusion_material }, - { "IsCanBeSynchroMaterial", scriptlib::card_is_can_be_synchro_material }, - { "IsCanBeRitualMaterial", scriptlib::card_is_can_be_ritual_material }, - { "IsCanBeXyzMaterial", scriptlib::card_is_can_be_xyz_material }, - { "CheckFusionMaterial", scriptlib::card_check_fusion_material }, - { "IsImmuneToEffect", scriptlib::card_is_immune_to_effect }, - { "IsCanBeEffectTarget", scriptlib::card_is_can_be_effect_target }, - { "IsCanBeBattleTarget", scriptlib::card_is_can_be_battle_target }, - { "AddTrapMonsterAttribute", scriptlib::card_add_trap_monster_attribute }, - { "TrapMonsterBlock", scriptlib::card_trap_monster_block }, - { "CancelToGrave", scriptlib::card_cancel_to_grave }, - { "GetTributeRequirement", scriptlib::card_get_tribute_requirement }, - { "GetBattleTarget", scriptlib::card_get_battle_target }, - { "GetAttackableTarget", scriptlib::card_get_attackable_target }, - { "SetHint", scriptlib::card_set_hint }, - { "ReverseInDeck", scriptlib::card_reverse_in_deck }, - { "SetUniqueOnField", scriptlib::card_set_unique_onfield }, - { "CheckUniqueOnField", scriptlib::card_check_unique_onfield }, - { "ResetNegateEffect", scriptlib::card_reset_negate_effect }, - { "AssumeProperty", scriptlib::card_assume_prop }, - { "SetSPSummonOnce", scriptlib::card_set_spsummon_once }, - { NULL, NULL } -}; - -static const struct luaL_Reg effectlib[] = { - { "CreateEffect", scriptlib::effect_new }, - { "GlobalEffect", scriptlib::effect_newex }, - { "Clone", scriptlib::effect_clone }, - { "Reset", scriptlib::effect_reset }, - { "GetFieldID", scriptlib::effect_get_field_id }, - { "SetDescription", scriptlib::effect_set_description }, - { "SetCode", scriptlib::effect_set_code }, - { "SetRange", scriptlib::effect_set_range }, - { "SetTargetRange", scriptlib::effect_set_target_range }, - { "SetAbsoluteRange", scriptlib::effect_set_absolute_range }, - { "SetCountLimit", scriptlib::effect_set_count_limit }, - { "SetReset", scriptlib::effect_set_reset }, - { "SetType", scriptlib::effect_set_type }, - { "SetProperty", scriptlib::effect_set_property }, - { "SetLabel", scriptlib::effect_set_label }, - { "SetLabelObject", scriptlib::effect_set_label_object }, - { "SetCategory", scriptlib::effect_set_category }, - { "SetHintTiming", scriptlib::effect_set_hint_timing }, - { "SetCondition", scriptlib::effect_set_condition }, - { "SetTarget", scriptlib::effect_set_target }, - { "SetCost", scriptlib::effect_set_cost }, - { "SetValue", scriptlib::effect_set_value }, - { "SetOperation", scriptlib::effect_set_operation }, - { "SetOwnerPlayer", scriptlib::effect_set_owner_player }, - { "GetDescription", scriptlib::effect_get_description }, - { "GetCode", scriptlib::effect_get_code }, - { "GetType", scriptlib::effect_get_type }, - { "GetProperty", scriptlib::effect_get_property }, - { "GetLabel", scriptlib::effect_get_label }, - { "GetLabelObject", scriptlib::effect_get_label_object }, - { "GetCategory", scriptlib::effect_get_category }, - { "GetOwner", scriptlib::effect_get_owner }, - { "GetHandler", scriptlib::effect_get_handler }, - { "GetCondition", scriptlib::effect_get_condition }, - { "GetTarget", scriptlib::effect_get_target }, - { "GetCost", scriptlib::effect_get_cost }, - { "GetValue", scriptlib::effect_get_value }, - { "GetOperation", scriptlib::effect_get_operation }, - { "GetActiveType", scriptlib::effect_get_active_type }, - { "IsActiveType", scriptlib::effect_is_active_type }, - { "GetOwnerPlayer", scriptlib::effect_get_owner_player }, - { "GetHandlerPlayer", scriptlib::effect_get_handler_player }, - { "IsHasProperty", scriptlib::effect_is_has_property }, - { "IsHasCategory", scriptlib::effect_is_has_category }, - { "IsHasType", scriptlib::effect_is_has_type }, - { "IsActivatable", scriptlib::effect_is_activatable }, - { "IsActivated", scriptlib::effect_is_activated }, - { "GetActivateLocation", scriptlib::effect_get_activate_location }, - { NULL, NULL } -}; - -static const struct luaL_Reg grouplib[] = { - { "CreateGroup", scriptlib::group_new }, - { "KeepAlive", scriptlib::group_keep_alive }, - { "DeleteGroup", scriptlib::group_delete }, - { "Clone", scriptlib::group_clone }, - { "FromCards", scriptlib::group_from_cards }, - { "Clear", scriptlib::group_clear }, - { "AddCard", scriptlib::group_add_card }, - { "RemoveCard", scriptlib::group_remove_card }, - { "GetNext", scriptlib::group_get_next }, - { "GetFirst", scriptlib::group_get_first }, - { "GetCount", scriptlib::group_get_count }, - { "ForEach", scriptlib::group_for_each }, - { "Filter", scriptlib::group_filter }, - { "FilterCount", scriptlib::group_filter_count }, - { "FilterSelect", scriptlib::group_filter_select }, - { "Select", scriptlib::group_select }, - { "RandomSelect", scriptlib::group_random_select }, - { "IsExists", scriptlib::group_is_exists }, - { "CheckWithSumEqual", scriptlib::group_check_with_sum_equal }, - { "SelectWithSumEqual", scriptlib::group_select_with_sum_equal }, - { "CheckWithSumGreater", scriptlib::group_check_with_sum_greater }, - { "SelectWithSumGreater", scriptlib::group_select_with_sum_greater }, - { "GetMinGroup", scriptlib::group_get_min_group }, - { "GetMaxGroup", scriptlib::group_get_max_group }, - { "GetSum", scriptlib::group_get_sum }, - { "GetClassCount", scriptlib::group_get_class_count }, - { "Remove", scriptlib::group_remove }, - { "Merge", scriptlib::group_merge }, - { "Sub", scriptlib::group_sub }, - { "Equal", scriptlib::group_equal }, - { "IsContains", scriptlib::group_is_contains }, - { "SearchCard", scriptlib::group_search_card }, - { NULL, NULL } -}; - -static const struct luaL_Reg duellib[] = { - { "EnableGlobalFlag", scriptlib::duel_enable_global_flag }, - { "GetLP", scriptlib::duel_get_lp }, - { "SetLP", scriptlib::duel_set_lp }, - { "GetTurnPlayer", scriptlib::duel_get_turn_player }, - { "GetTurnCount", scriptlib::duel_get_turn_count }, - { "GetDrawCount", scriptlib::duel_get_draw_count }, - { "RegisterEffect", scriptlib::duel_register_effect }, - { "RegisterFlagEffect", scriptlib::duel_register_flag_effect }, - { "GetFlagEffect", scriptlib::duel_get_flag_effect }, - { "ResetFlagEffect", scriptlib::duel_reset_flag_effect }, - { "Destroy", scriptlib::duel_destroy }, - { "Remove", scriptlib::duel_remove }, - { "SendtoGrave", scriptlib::duel_sendto_grave }, - { "SendtoHand", scriptlib::duel_sendto_hand }, - { "SendtoDeck", scriptlib::duel_sendto_deck }, - { "GetOperatedGroup", scriptlib::duel_get_operated_group }, - { "Summon", scriptlib::duel_summon }, - { "SpecialSummonRule", scriptlib::duel_special_summon_rule }, - { "SynchroSummon", scriptlib::duel_synchro_summon }, - { "XyzSummon", scriptlib::duel_xyz_summon }, - { "MSet", scriptlib::duel_setm }, - { "SSet", scriptlib::duel_sets }, - { "CreateToken", scriptlib::duel_create_token }, - { "SpecialSummon", scriptlib::duel_special_summon }, - { "SpecialSummonStep", scriptlib::duel_special_summon_step }, - { "SpecialSummonComplete", scriptlib::duel_special_summon_complete }, - { "RemoveCounter", scriptlib::duel_remove_counter }, - { "IsCanRemoveCounter", scriptlib::duel_is_can_remove_counter }, - { "GetCounter", scriptlib::duel_get_counter }, - { "ChangePosition", scriptlib::duel_change_form }, - { "Release", scriptlib::duel_release }, - { "MoveToField", scriptlib::duel_move_to_field }, - { "ReturnToField", scriptlib::duel_return_to_field }, - { "MoveSequence", scriptlib::duel_move_sequence }, - { "SetChainLimit", scriptlib::duel_set_chain_limit }, - { "SetChainLimitTillChainEnd", scriptlib::duel_set_chain_limit_p }, - { "GetChainMaterial", scriptlib::duel_get_chain_material }, - { "ConfirmDecktop", scriptlib::duel_confirm_decktop }, - { "ConfirmCards", scriptlib::duel_confirm_cards }, - { "SortDecktop", scriptlib::duel_sort_decktop }, - { "CheckEvent", scriptlib::duel_check_event }, - { "RaiseEvent", scriptlib::duel_raise_event }, - { "RaiseSingleEvent", scriptlib::duel_raise_single_event }, - { "CheckTiming", scriptlib::duel_check_timing }, - { "GetEnvironment", scriptlib::duel_get_environment }, - { "IsEnvironment", scriptlib::duel_is_environment }, - { "Win", scriptlib::duel_win }, - { "Draw", scriptlib::duel_draw }, - { "Damage", scriptlib::duel_damage }, - { "Recover", scriptlib::duel_recover }, - { "Equip", scriptlib::duel_equip }, - { "EquipComplete", scriptlib::duel_equip_complete }, - { "GetControl", scriptlib::duel_get_control }, - { "SwapControl", scriptlib::duel_swap_control }, - { "CheckLPCost", scriptlib::duel_check_lp_cost }, - { "PayLPCost", scriptlib::duel_pay_lp_cost }, - { "DiscardDeck", scriptlib::duel_discard_deck }, - { "DiscardHand", scriptlib::duel_discard_hand }, - { "DisableShuffleCheck", scriptlib::duel_disable_shuffle_check }, - { "ShuffleDeck", scriptlib::duel_shuffle_deck }, - { "ShuffleHand", scriptlib::duel_shuffle_hand }, - { "ShuffleSetCard", scriptlib::duel_shuffle_setcard }, - { "ChangeAttacker", scriptlib::duel_change_attacker }, - { "ReplaceAttacker", scriptlib::duel_replace_attacker }, - { "ChangeAttackTarget", scriptlib::duel_change_attack_target }, - { "ReplaceAttackTarget", scriptlib::duel_replace_attack_target }, - { "CalculateDamage", scriptlib::duel_calculate_damage }, - { "GetBattleDamage", scriptlib::duel_get_battle_damage }, - { "ChangeBattleDamage", scriptlib::duel_change_battle_damage }, - { "ChangeTargetCard", scriptlib::duel_change_target }, - { "ChangeTargetPlayer", scriptlib::duel_change_target_player }, - { "ChangeTargetParam", scriptlib::duel_change_target_param }, - { "BreakEffect", scriptlib::duel_break_effect }, - { "ChangeChainOperation", scriptlib::duel_change_effect }, - { "NegateActivation", scriptlib::duel_negate_activate }, - { "NegateEffect", scriptlib::duel_negate_effect }, - { "NegateRelatedChain", scriptlib::duel_negate_related_chain }, - { "NegateSummon", scriptlib::duel_disable_summon }, - { "IncreaseSummonedCount", scriptlib::duel_increase_summon_count }, - { "CheckSummonedCount", scriptlib::duel_check_summon_count }, - { "GetLocationCount", scriptlib::duel_get_location_count }, - { "GetFieldCard", scriptlib::duel_get_field_card }, - { "CheckLocation", scriptlib::duel_check_location }, - { "GetCurrentChain", scriptlib::duel_get_current_chain }, - { "GetChainInfo", scriptlib::duel_get_chain_info }, - { "GetFirstTarget", scriptlib::duel_get_first_target }, - { "GetCurrentPhase", scriptlib::duel_get_current_phase }, - { "SkipPhase", scriptlib::duel_skip_phase }, - { "IsDamageCalculated", scriptlib::duel_is_damage_calculated }, - { "GetAttacker", scriptlib::duel_get_attacker }, - { "GetAttackTarget", scriptlib::duel_get_attack_target }, - { "NegateAttack", scriptlib::duel_disable_attack }, - { "ChainAttack", scriptlib::duel_chain_attack }, - { "Readjust", scriptlib::duel_readjust }, - { "AdjustInstantly", scriptlib::duel_adjust_instantly }, - { "GetFieldGroup", scriptlib::duel_get_field_group }, - { "GetFieldGroupCount", scriptlib::duel_get_field_group_count }, - { "GetDecktopGroup", scriptlib::duel_get_decktop_group }, - { "GetMatchingGroup", scriptlib::duel_get_matching_group }, - { "GetMatchingGroupCount", scriptlib::duel_get_matching_count }, - { "GetFirstMatchingCard", scriptlib::duel_get_first_matching_card }, - { "IsExistingMatchingCard", scriptlib::duel_is_existing_matching_card }, - { "SelectMatchingCard", scriptlib::duel_select_matching_cards }, - { "GetReleaseGroup", scriptlib::duel_get_release_group }, - { "GetReleaseGroupCount", scriptlib::duel_get_release_group_count }, - { "CheckReleaseGroup", scriptlib::duel_check_release_group }, - { "SelectReleaseGroup", scriptlib::duel_select_release_group }, - { "CheckReleaseGroupEx", scriptlib::duel_check_release_group_ex }, - { "SelectReleaseGroupEx", scriptlib::duel_select_release_group_ex }, - { "GetTributeGroup", scriptlib::duel_get_tribute_group }, - { "GetTributeCount", scriptlib::duel_get_tribute_count }, - { "SelectTribute", scriptlib::duel_select_tribute }, - { "GetTargetCount", scriptlib::duel_get_target_count }, - { "IsExistingTarget", scriptlib::duel_is_existing_target }, - { "SelectTarget", scriptlib::duel_select_target }, - { "SelectFusionMaterial", scriptlib::duel_select_fusion_material }, - { "SetFusionMaterial", scriptlib::duel_set_fusion_material }, - { "SetSynchroMaterial", scriptlib::duel_set_synchro_material }, - { "SelectSynchroMaterial", scriptlib::duel_select_synchro_material }, - { "CheckSynchroMaterial", scriptlib::duel_check_synchro_material }, - { "SelectTunerMaterial", scriptlib::duel_select_tuner_material }, - { "CheckTunerMaterial", scriptlib::duel_check_tuner_material }, - { "GetRitualMaterial", scriptlib::duel_get_ritual_material }, - { "ReleaseRitualMaterial", scriptlib::duel_release_ritual_material }, - { "SetTargetCard", scriptlib::duel_set_target_card }, - { "ClearTargetCard", scriptlib::duel_clear_target_card }, - { "SetTargetPlayer", scriptlib::duel_set_target_player }, - { "SetTargetParam", scriptlib::duel_set_target_param }, - { "SetOperationInfo", scriptlib::duel_set_operation_info }, - { "GetOperationInfo", scriptlib::duel_get_operation_info }, - { "GetOperationCount", scriptlib::duel_get_operation_count }, - { "CheckXyzMaterial", scriptlib::duel_check_xyz_material }, - { "SelectXyzMaterial", scriptlib::duel_select_xyz_material }, - { "Overlay", scriptlib::duel_overlay }, - { "GetOverlayGroup", scriptlib::duel_get_overlay_group }, - { "GetOverlayCount", scriptlib::duel_get_overlay_count }, - { "CheckRemoveOverlayCard", scriptlib::duel_check_remove_overlay_card }, - { "RemoveOverlayCard", scriptlib::duel_remove_overlay_card }, - { "Hint", scriptlib::duel_hint }, - { "HintSelection", scriptlib::duel_hint_selection }, - { "SelectEffectYesNo", scriptlib::duel_select_effect_yesno }, - { "SelectYesNo", scriptlib::duel_select_yesno }, - { "SelectOption", scriptlib::duel_select_option }, - { "SelectSequence", scriptlib::duel_select_sequence }, - { "SelectPosition", scriptlib::duel_select_position }, - { "SelectDisableField", scriptlib::duel_select_disable_field }, - { "AnnounceRace", scriptlib::duel_announce_race }, - { "AnnounceAttribute", scriptlib::duel_announce_attribute }, - { "AnnounceLevel", scriptlib::duel_announce_level }, - { "AnnounceCard", scriptlib::duel_announce_card }, - { "AnnounceType", scriptlib::duel_announce_type }, - { "AnnounceNumber", scriptlib::duel_announce_number }, - { "AnnounceCoin", scriptlib::duel_announce_coin }, - { "TossCoin", scriptlib::duel_toss_coin }, - { "TossDice", scriptlib::duel_toss_dice }, - { "GetCoinResult", scriptlib::duel_get_coin_result }, - { "GetDiceResult", scriptlib::duel_get_dice_result }, - { "SetCoinResult", scriptlib::duel_set_coin_result }, - { "SetDiceResult", scriptlib::duel_set_dice_result }, - { "IsPlayerAffectedByEffect", scriptlib::duel_is_player_affected_by_effect }, - { "IsPlayerCanDraw", scriptlib::duel_is_player_can_draw }, - { "IsPlayerCanDiscardDeck", scriptlib::duel_is_player_can_discard_deck }, - { "IsPlayerCanDiscardDeckAsCost", scriptlib::duel_is_player_can_discard_deck_as_cost }, - { "IsPlayerCanSummon", scriptlib::duel_is_player_can_summon }, - { "IsPlayerCanSpecialSummon", scriptlib::duel_is_player_can_spsummon }, - { "IsPlayerCanFlipSummon", scriptlib::duel_is_player_can_flipsummon }, - { "IsPlayerCanSpecialSummonMonster", scriptlib::duel_is_player_can_spsummon_monster }, - { "IsPlayerCanSpecialSummonCount", scriptlib::duel_is_player_can_spsummon_count }, - { "IsPlayerCanRelease", scriptlib::duel_is_player_can_release }, - { "IsPlayerCanRemove", scriptlib::duel_is_player_can_remove }, - { "IsPlayerCanSendtoHand", scriptlib::duel_is_player_can_send_to_hand }, - { "IsPlayerCanSendtoGrave", scriptlib::duel_is_player_can_send_to_grave }, - { "IsPlayerCanSendtoDeck", scriptlib::duel_is_player_can_send_to_deck }, - { "IsChainNegatable", scriptlib::duel_is_chain_negatable }, - { "IsChainDisablable", scriptlib::duel_is_chain_disablable }, - { "CheckChainTarget", scriptlib::duel_check_chain_target }, - { "CheckChainUniqueness", scriptlib::duel_check_chain_uniqueness }, - { "GetActivityCount", scriptlib::duel_get_activity_count }, - { "CheckPhaseActivity", scriptlib::duel_check_phase_activity }, - { "AddCustomActivityCounter", scriptlib::duel_add_custom_activity_counter }, - { "GetCustomActivityCount", scriptlib::duel_get_custom_activity_count }, - { "IsAbleToEnterBP", scriptlib::duel_is_able_to_enter_bp }, - { "VenomSwampCheck", scriptlib::duel_venom_swamp_check }, - { "SwapDeckAndGrave", scriptlib::duel_swap_deck_and_grave }, - { "MajesticCopy", scriptlib::duel_majestic_copy }, - { NULL, NULL } -}; - -static const struct luaL_Reg debuglib[] = { - { "Message", scriptlib::debug_message }, - { "AddCard", scriptlib::debug_add_card }, - { "SetPlayerInfo", scriptlib::debug_set_player_info }, - { "PreEquip", scriptlib::debug_pre_equip }, - { "PreSetTarget", scriptlib::debug_pre_set_target }, - { "PreAddCounter", scriptlib::debug_pre_add_counter }, - { "ReloadFieldBegin", scriptlib::debug_reload_field_begin }, - { "ReloadFieldEnd", scriptlib::debug_reload_field_end }, - { "SetAIName", scriptlib::debug_set_ai_name }, - { "ShowHint", scriptlib::debug_show_hint }, - { NULL, NULL } -}; - -interpreter::interpreter(duel* pd): coroutines(256) { - lua_state = luaL_newstate(); - current_state = lua_state; - pduel = pd; - no_action = 0; - call_depth = 0; - set_duel_info(lua_state, pd); - //Initial - luaL_openlibs(lua_state); - lua_pushnil(lua_state); - lua_setglobal(lua_state, "file"); - lua_pushnil(lua_state); - lua_setglobal(lua_state, "io"); - lua_pushnil(lua_state); - lua_setglobal(lua_state, "os"); - lua_getglobal(lua_state, "bit32"); - lua_setglobal(lua_state, "bit"); - //open all libs - luaL_newlib(lua_state, cardlib); - lua_pushstring(lua_state, "__index"); - lua_pushvalue(lua_state, -2); - lua_rawset(lua_state, -3); - lua_setglobal(lua_state, "Card"); - luaL_newlib(lua_state, effectlib); - lua_pushstring(lua_state, "__index"); - lua_pushvalue(lua_state, -2); - lua_rawset(lua_state, -3); - lua_setglobal(lua_state, "Effect"); - luaL_newlib(lua_state, grouplib); - lua_pushstring(lua_state, "__index"); - lua_pushvalue(lua_state, -2); - lua_rawset(lua_state, -3); - lua_setglobal(lua_state, "Group"); - luaL_newlib(lua_state, duellib); - lua_setglobal(lua_state, "Duel"); - luaL_newlib(lua_state, debuglib); - lua_setglobal(lua_state, "Debug"); - //extra scripts - load_script((char*) "./script/constant.lua"); - load_script((char*) "./script/utility.lua"); -} -interpreter::~interpreter() { - lua_close(lua_state); -} -int32 interpreter::register_card(card *pcard) { - //create a card in by userdata - card ** ppcard = (card**) lua_newuserdata(lua_state, sizeof(card*)); - *ppcard = pcard; - pcard->ref_handle = luaL_ref(lua_state, LUA_REGISTRYINDEX); - //some userdata may be created in script like token so use current_state - lua_rawgeti(current_state, LUA_REGISTRYINDEX, pcard->ref_handle); - //load script - if(pcard->data.alias && (pcard->data.alias < pcard->data.code + 10) && (pcard->data.code < pcard->data.alias + 10)) - load_card_script(pcard->data.alias); - else - load_card_script(pcard->data.code); - //set metatable of pointer to base script - lua_setmetatable(current_state, -2); - lua_pop(current_state, 1); - //Initial - if(pcard->data.code && (!(pcard->data.type & TYPE_NORMAL) || (pcard->data.type & TYPE_PENDULUM))) { - pcard->set_status(STATUS_INITIALIZING, TRUE); - add_param(pcard, PARAM_TYPE_CARD); - call_card_function(pcard, (char*) "initial_effect", 1, 0); - pcard->set_status(STATUS_INITIALIZING, FALSE); - } - pcard->cardid = pduel->game_field->infos.card_id++; - return OPERATION_SUCCESS; -} -void interpreter::register_effect(effect *peffect) { - if (!peffect) - return; - //create a effect in by userdata - effect ** ppeffect = (effect**) lua_newuserdata(lua_state, sizeof(effect*)); - *ppeffect = peffect; - peffect->ref_handle = luaL_ref(lua_state, LUA_REGISTRYINDEX); - //set metatable of pointer to base script - lua_rawgeti(lua_state, LUA_REGISTRYINDEX, peffect->ref_handle); - lua_getglobal(lua_state, "Effect"); - lua_setmetatable(lua_state, -2); - lua_pop(lua_state, 1); -} -void interpreter::unregister_effect(effect *peffect) { - if (!peffect) - return; - if(peffect->condition) - luaL_unref(lua_state, LUA_REGISTRYINDEX, peffect->condition); - if(peffect->cost) - luaL_unref(lua_state, LUA_REGISTRYINDEX, peffect->cost); - if(peffect->target) - luaL_unref(lua_state, LUA_REGISTRYINDEX, peffect->target); - if(peffect->operation) - luaL_unref(lua_state, LUA_REGISTRYINDEX, peffect->operation); - if(peffect->value && (peffect->flag & EFFECT_FLAG_FUNC_VALUE)) - luaL_unref(lua_state, LUA_REGISTRYINDEX, peffect->value); - luaL_unref(lua_state, LUA_REGISTRYINDEX, peffect->ref_handle); - peffect->ref_handle = 0; -} -void interpreter::register_group(group *pgroup) { - if (!pgroup) - return; - //create a group in by userdata - group ** ppgroup = (group**) lua_newuserdata(lua_state, sizeof(group*)); - *ppgroup = pgroup; - pgroup->ref_handle = luaL_ref(lua_state, LUA_REGISTRYINDEX); - //set metatable of pointer to base script - lua_rawgeti(lua_state, LUA_REGISTRYINDEX, pgroup->ref_handle); - lua_getglobal(lua_state, "Group"); - lua_setmetatable(lua_state, -2); - lua_pop(lua_state, 1); -} -void interpreter::unregister_group(group *pgroup) { - if (!pgroup) - return; - luaL_unref(lua_state, LUA_REGISTRYINDEX, pgroup->ref_handle); - pgroup->ref_handle = 0; -} -int32 interpreter::load_script(char* script_name) { - int32 error; - int32 len = 0; - byte* buffer = read_script(script_name, &len); - if (!buffer) - return OPERATION_FAIL; - no_action++; - error = luaL_loadbuffer(current_state, (const char*) buffer, len, (const char*) script_name) || lua_pcall(current_state, 0, 0, 0); - if (error) { - sprintf(pduel->strbuffer, lua_tostring(current_state, -1)); - handle_message(pduel, 1); - lua_pop(current_state, 1); - no_action--; - return OPERATION_FAIL; - } - no_action--; - return OPERATION_SUCCESS; -} -int32 interpreter::load_card_script(uint32 code) { - char class_name[20]; - char script_name[64]; - sprintf(class_name, "c%d", code); - lua_getglobal(current_state, class_name); - //if script is not loaded, create and load it - if (lua_isnil(current_state, -1)) { - lua_pop(current_state, 1); - //create a table & set metatable - lua_createtable(current_state, 0, 0); - lua_setglobal(current_state, class_name); - lua_getglobal(current_state, class_name); - lua_getglobal(current_state, "Card"); - lua_setmetatable(current_state, -2); - lua_pushstring(current_state, "__index"); - lua_pushvalue(current_state, -2); - lua_rawset(current_state, -3); - //load extra scripts - sprintf(script_name, "./script/c%d.lua", code); - if (!load_script(script_name)) { - return OPERATION_FAIL; - } - } - return OPERATION_SUCCESS; -} -void interpreter::add_param(void *param, int32 type, bool front) { - if(front) - params.push_front(make_pair(param, type)); - else - params.push_back(make_pair(param, type)); -} -void interpreter::add_param(ptr param, int32 type, bool front) { - if(front) - params.push_front(make_pair((void*)param, type)); - else - params.push_back(make_pair((void*)param, type)); -} -void interpreter::push_param(lua_State* L, bool is_coroutine) { - uint32 type; - int32 pushed = 0; - for (auto it = params.begin(); it != params.end(); ++it) { - type = it->second; - switch(type) { - case PARAM_TYPE_INT: - lua_pushinteger(L, (ptr) it->first); - break; - case PARAM_TYPE_STRING: - lua_pushstring(L, (const char *) it->first); - break; - case PARAM_TYPE_BOOLEAN: - lua_pushboolean(L, (ptr) it->first); - break; - case PARAM_TYPE_CARD: { - if (it->first) - lua_rawgeti(L, LUA_REGISTRYINDEX, ((card*)it->first)->ref_handle); - else - lua_pushnil(L); - break; - } - case PARAM_TYPE_EFFECT: { - if (it->first) - lua_rawgeti(L, LUA_REGISTRYINDEX, ((effect*)it->first)->ref_handle); - else - lua_pushnil(L); - break; - } - case PARAM_TYPE_GROUP: { - if (it->first) - lua_rawgeti(L, LUA_REGISTRYINDEX, ((group*)it->first)->ref_handle); - else - lua_pushnil(L); - break; - } - case PARAM_TYPE_FUNCTION: { - function2value(L, (ptr)it->first); - break; - } - case PARAM_TYPE_INDEX: { - int32 index = (int32)(ptr)it->first; - if(index > 0) - lua_pushvalue(L, index); - else if(is_coroutine) { - //copy value from current_state to new stack - lua_pushvalue(current_state, index); - int32 ref = luaL_ref(current_state, LUA_REGISTRYINDEX); - lua_rawgeti(L, LUA_REGISTRYINDEX, ref); - luaL_unref(current_state, LUA_REGISTRYINDEX, ref); - } else { - //the calling function is pushed before the params, so the actual index is: index - pushed -1 - lua_pushvalue(L, index - pushed - 1); - } - break; - } - } - pushed++; - } - params.clear(); -} -int32 interpreter::call_function(int32 f, uint32 param_count, uint32 ret_count) { - if (!f) { - sprintf(pduel->strbuffer, "\"CallFunction\": attempt to call a null function."); - handle_message(pduel, 1); - params.clear(); - return OPERATION_FAIL; - } - if (param_count != params.size()) { - sprintf(pduel->strbuffer, "\"CallFunction\": incorrect parameter count (%d expected, %ud pushed)", param_count, params.size()); - handle_message(pduel, 1); - params.clear(); - return OPERATION_FAIL; - } - function2value(current_state, f); - if (!lua_isfunction(current_state, -1)) { - sprintf(pduel->strbuffer, "\"CallFunction\": attempt to call an error function"); - handle_message(pduel, 1); - lua_pop(current_state, 1); - params.clear(); - return OPERATION_FAIL; - } - no_action++; - call_depth++; - push_param(current_state); - if (lua_pcall(current_state, param_count, ret_count, 0)) { - sprintf(pduel->strbuffer, lua_tostring(current_state, -1)); - handle_message(pduel, 1); - lua_pop(current_state, 1); - no_action--; - call_depth--; - if(call_depth == 0) { - pduel->release_script_group(); - pduel->restore_assumes(); - } - return OPERATION_FAIL; - } - no_action--; - call_depth--; - if(call_depth == 0) { - pduel->release_script_group(); - pduel->restore_assumes(); - } - return OPERATION_SUCCESS; -} -int32 interpreter::call_card_function(card* pcard, char* f, uint32 param_count, uint32 ret_count) { - if (param_count != params.size()) { - sprintf(pduel->strbuffer, "\"CallCardFunction\"(c%d.%s): incorrect parameter count", pcard->data.code, f); - handle_message(pduel, 1); - params.clear(); - return OPERATION_FAIL; - } - card2value(current_state, pcard); - lua_getfield(current_state, -1, f); - if (!lua_isfunction(current_state, -1)) { - sprintf(pduel->strbuffer, "\"CallCardFunction\"(c%d.%s): attempt to call an error function", pcard->data.code, f); - handle_message(pduel, 1); - lua_pop(current_state, 2); - params.clear(); - return OPERATION_FAIL; - } - no_action++; - call_depth++; - lua_remove(current_state, -2); - push_param(current_state); - if (lua_pcall(current_state, param_count, ret_count, 0)) { - sprintf(pduel->strbuffer, lua_tostring(current_state, -1)); - handle_message(pduel, 1); - lua_pop(current_state, 1); - no_action--; - call_depth--; - if(call_depth == 0) { - pduel->release_script_group(); - pduel->restore_assumes(); - } - return OPERATION_FAIL; - } - no_action--; - call_depth--; - if(call_depth == 0) { - pduel->release_script_group(); - pduel->restore_assumes(); - } - return OPERATION_SUCCESS; -} -int32 interpreter::call_code_function(uint32 code, char* f, uint32 param_count, uint32 ret_count) { - if (param_count != params.size()) { - sprintf(pduel->strbuffer, "\"CallCodeFunction\": incorrect parameter count"); - handle_message(pduel, 1); - params.clear(); - return OPERATION_FAIL; - } - load_card_script(code); - lua_getfield(current_state, -1, f); - if (!lua_isfunction(current_state, -1)) { - sprintf(pduel->strbuffer, "\"CallCodeFunction\": attempt to call an error function"); - handle_message(pduel, 1); - lua_pop(current_state, 2); - params.clear(); - return OPERATION_FAIL; - } - lua_remove(current_state, -2); - no_action++; - call_depth++; - push_param(current_state); - if (lua_pcall(current_state, param_count, ret_count, 0)) { - sprintf(pduel->strbuffer, lua_tostring(current_state, -1)); - handle_message(pduel, 1); - lua_pop(current_state, 1); - no_action--; - call_depth--; - if(call_depth == 0) { - pduel->release_script_group(); - pduel->restore_assumes(); - } - return OPERATION_FAIL; - } - no_action--; - call_depth--; - if(call_depth == 0) { - pduel->release_script_group(); - pduel->restore_assumes(); - } - return OPERATION_SUCCESS; -} -int32 interpreter::check_condition(int32 f, uint32 param_count) { - int32 result; - if(!f) { - params.clear(); - return TRUE; - } - no_action++; - call_depth++; - if (call_function(f, param_count, 1)) { - result = lua_toboolean(current_state, -1); - lua_pop(current_state, 1); - no_action--; - call_depth--; - if(call_depth == 0) { - pduel->release_script_group(); - pduel->restore_assumes(); - } - return result; - } - no_action--; - call_depth--; - if(call_depth == 0) { - pduel->release_script_group(); - pduel->restore_assumes(); - } - return OPERATION_FAIL; -} -int32 interpreter::check_matching(card* pcard, int32 findex, int32 extraargs) { - int32 result; - if(!findex || lua_isnil(current_state, findex)) - return TRUE; - no_action++; - call_depth++; - lua_pushvalue(current_state, findex); - interpreter::card2value(current_state, pcard); - for(int32 i = 0; i < extraargs; ++i) - lua_pushvalue(current_state, (int32)(-extraargs - 2)); - if (lua_pcall(current_state, 1 + extraargs, 1, 0)) { - sprintf(pduel->strbuffer, lua_tostring(current_state, -1)); - handle_message(pduel, 1); - lua_pop(current_state, 1); - no_action--; - call_depth--; - if(call_depth == 0) { - pduel->release_script_group(); - pduel->restore_assumes(); - } - return OPERATION_FAIL; - } - result = lua_toboolean(current_state, -1); - lua_pop(current_state, 1); - no_action--; - call_depth--; - if(call_depth == 0) { - pduel->release_script_group(); - pduel->restore_assumes(); - } - return result; -} -int32 interpreter::get_operation_value(card* pcard, int32 findex, int32 extraargs) { - int32 result; - if(!findex || lua_isnil(current_state, findex)) - return 0; - no_action++; - call_depth++; - lua_pushvalue(current_state, findex); - interpreter::card2value(current_state, pcard); - for(int32 i = 0; i < extraargs; ++i) - lua_pushvalue(current_state, (int32)(-extraargs - 2)); - if (lua_pcall(current_state, 1 + extraargs, 1, 0)) { - sprintf(pduel->strbuffer, lua_tostring(current_state, -1)); - handle_message(pduel, 1); - lua_pop(current_state, 1); - no_action--; - call_depth--; - if(call_depth == 0) { - pduel->release_script_group(); - pduel->restore_assumes(); - } - return OPERATION_FAIL; - } - result = lua_tointeger(current_state, -1); - lua_pop(current_state, 1); - no_action--; - call_depth--; - if(call_depth == 0) { - pduel->release_script_group(); - pduel->restore_assumes(); - } - return result; -} -int32 interpreter::get_function_value(int32 f, uint32 param_count) { - int32 result; - if(!f) { - params.clear(); - return 0; - } - no_action++; - call_depth++; - if (call_function(f, param_count, 1)) { - if (lua_isboolean(current_state, -1)) - result = lua_toboolean(current_state, -1); - else - result = lua_tointeger(current_state, -1); - lua_pop(current_state, 1); - no_action--; - call_depth--; - if(call_depth == 0) { - pduel->release_script_group(); - pduel->restore_assumes(); - } - return result; - } - no_action--; - call_depth--; - if(call_depth == 0) { - pduel->release_script_group(); - pduel->restore_assumes(); - } - return OPERATION_FAIL; -} -int32 interpreter::call_coroutine(int32 f, uint32 param_count, uint32 * yield_value, uint16 step) { - *yield_value = 0; - if (!f) { - sprintf(pduel->strbuffer, "\"CallCoroutine\": attempt to call a null function"); - handle_message(pduel, 1); - params.clear(); - return OPERATION_FAIL; - } - if (param_count != params.size()) { - sprintf(pduel->strbuffer, "\"CallCoroutine\": incorrect parameter count"); - handle_message(pduel, 1); - params.clear(); - return OPERATION_FAIL; - } - coroutine_map::iterator it; - it = coroutines.find(f); - lua_State* rthread; - if (it == coroutines.end()) { - rthread = lua_newthread(lua_state); - function2value(rthread, f); - if(!lua_isfunction(rthread, -1)) { - sprintf(pduel->strbuffer, "\"CallCoroutine\": attempt to call an error function"); - handle_message(pduel, 1); - params.clear(); - return OPERATION_FAIL; - } - call_depth++; - coroutines.insert(make_pair(f, rthread)); - } else { - rthread = it->second; - if(step == 0) { - sprintf(pduel->strbuffer, "recursive event trigger detected."); - handle_message(pduel, 1); - params.clear(); - call_depth--; - if(call_depth == 0) { - pduel->release_script_group(); - pduel->restore_assumes(); - } - return OPERATION_FAIL; - } - } - push_param(rthread, true); - current_state = rthread; - int32 result = lua_resume(rthread, 0, param_count); - if (result == 0) { - coroutines.erase(f); - if(yield_value) - *yield_value = lua_isboolean(rthread, -1) ? lua_toboolean(rthread, -1) : lua_tointeger(rthread, -1); - current_state = lua_state; - call_depth--; - if(call_depth == 0) { - pduel->release_script_group(); - pduel->restore_assumes(); - } - return COROUTINE_FINISH; - } else if (result == LUA_YIELD) { - return COROUTINE_YIELD; - } else { - coroutines.erase(f); - sprintf(pduel->strbuffer, lua_tostring(rthread, -1)); - handle_message(pduel, 1); - lua_pop(rthread, 1); - current_state = lua_state; - call_depth--; - if(call_depth == 0) { - pduel->release_script_group(); - pduel->restore_assumes(); - } - return COROUTINE_ERROR; - } -} -//Convert a pointer to a lua value, +1 -0 -void interpreter::card2value(lua_State* L, card* pcard) { - if (!pcard || pcard->ref_handle == 0) - lua_pushnil(L); - else - lua_rawgeti(L, LUA_REGISTRYINDEX, pcard->ref_handle); -} -void interpreter::group2value(lua_State* L, group* pgroup) { - if (!pgroup || pgroup->ref_handle == 0) - lua_pushnil(L); - else - lua_rawgeti(L, LUA_REGISTRYINDEX, pgroup->ref_handle); -} -void interpreter::effect2value(lua_State* L, effect* peffect) { - if (!peffect || peffect->ref_handle == 0) - lua_pushnil(L); - else - lua_rawgeti(L, LUA_REGISTRYINDEX, peffect->ref_handle); -} -void interpreter::function2value(lua_State* L, int32 func_ref) { - if (!func_ref) - lua_pushnil(L); - else - lua_rawgeti(L, LUA_REGISTRYINDEX, func_ref); -} -int32 interpreter::get_function_handle(lua_State* L, int32 index) { - lua_pushvalue(L, index); - int32 ref = luaL_ref(L, LUA_REGISTRYINDEX); - return ref; -} -void interpreter::set_duel_info(lua_State* L, duel* pduel) { - lua_pushlightuserdata(L, pduel); - luaL_ref(L, LUA_REGISTRYINDEX); -} -duel* interpreter::get_duel_info(lua_State * L) { - lua_rawgeti(L, LUA_REGISTRYINDEX, 3); - duel* pduel = (duel*)lua_topointer(L, -1); - lua_pop(L, 1); - return pduel; -} diff --git a/ocgcore/interpreter.h b/ocgcore/interpreter.h deleted file mode 100644 index ac944f82d9..0000000000 --- a/ocgcore/interpreter.h +++ /dev/null @@ -1,91 +0,0 @@ -/* - * interpreter.h - * - * Created on: 2010-4-28 - * Author: Argon - */ - -#ifndef INTERPRETER_H_ -#define INTERPRETER_H_ - -extern "C" { -#ifdef WIN32 -#include -#include -#include -#else -#include -#include -#include -#endif -} -#include "common.h" -#include -#include - -class card; -class effect; -class group; -class duel; - -class interpreter { -public: - typedef std::unordered_map coroutine_map; - typedef std::list > param_list; - - duel* pduel; - char msgbuf[64]; - lua_State* lua_state; - lua_State* current_state; - param_list params; - param_list resumes; - coroutine_map coroutines; - int32 no_action; - int32 call_depth; - - explicit interpreter(duel* pd); - ~interpreter(); - - int32 register_card(card *pcard); - void register_effect(effect* peffect); - void unregister_effect(effect* peffect); - void register_group(group* pgroup); - void unregister_group(group* pgroup); - - int32 load_script(char* buffer); - int32 load_card_script(uint32 code); - void add_param(void* param, int32 type, bool front = false); - void add_param(ptr param, int32 type, bool front = false); - void push_param(lua_State* L, bool is_coroutine = false); - int32 call_function(int32 f, uint32 param_count, uint32 ret_count); - int32 call_card_function(card *pcard, char *f, uint32 param_count, uint32 ret_count); - int32 call_code_function(uint32 code, char *f, uint32 param_count, uint32 ret_count); - int32 check_condition(int32 f, uint32 param_count); - int32 check_matching(card* pcard, int32 findex, int32 extraargs); - int32 get_operation_value(card* pcard, int32 findex, int32 extraargs); - int32 get_function_value(int32 f, uint32 param_count); - int32 call_coroutine(int32 f, uint32 param_count, uint32* yield_value, uint16 step); - - static void card2value(lua_State* L, card* pcard); - static void group2value(lua_State* L, group* pgroup); - static void effect2value(lua_State* L, effect* peffect); - static void function2value(lua_State* L, int32 pointer); - static int32 get_function_handle(lua_State* L, int32 index); - static void set_duel_info(lua_State* L, duel* pduel); - static duel* get_duel_info(lua_State* L); -}; - -#define PARAM_TYPE_INT 0x01 -#define PARAM_TYPE_STRING 0x02 -#define PARAM_TYPE_CARD 0x04 -#define PARAM_TYPE_GROUP 0x08 -#define PARAM_TYPE_EFFECT 0x10 -#define PARAM_TYPE_FUNCTION 0x20 -#define PARAM_TYPE_BOOLEAN 0x40 -#define PARAM_TYPE_INDEX 0x80 - -#define COROUTINE_FINISH 1 -#define COROUTINE_YIELD 2 -#define COROUTINE_ERROR 3 - -#endif /* INTERPRETER_H_ */ diff --git a/ocgcore/libcard.cpp b/ocgcore/libcard.cpp deleted file mode 100644 index d477c25c83..0000000000 --- a/ocgcore/libcard.cpp +++ /dev/null @@ -1,2178 +0,0 @@ -/* - * libcard.cpp - * - * Created on: 2010-5-6 - * Author: Argon - */ - -#include "scriptlib.h" -#include "duel.h" -#include "field.h" -#include "card.h" -#include "effect.h" -#include "group.h" -#include - -int32 scriptlib::card_get_code(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - lua_pushinteger(L, pcard->get_code()); - uint32 otcode = pcard->get_another_code(); - if(otcode) { - lua_pushinteger(L, otcode); - return 2; - } - return 1; -} -// GetOriginalCode(): get the original code printed on card -// return: 1 int -int32 scriptlib::card_get_origin_code(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - if(pcard->data.alias) { - int32 dif = pcard->data.code - pcard->data.alias; - if(dif > -10 && dif < 10) - lua_pushinteger(L, pcard->data.alias); - else - lua_pushinteger(L, pcard->data.code); - } else - lua_pushinteger(L, pcard->data.code); - return 1; -} -// GetOriginalCodeRule(): get the original code in duel (can be different from printed code) -// return: 1-2 int -int32 scriptlib::card_get_origin_code_rule(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - effect_set eset; - pcard->filter_effect(EFFECT_ADD_CODE, &eset); - if(pcard->data.alias && !eset.size()) - lua_pushinteger(L, pcard->data.alias); - else { - lua_pushinteger(L, pcard->data.code); - if(eset.size()) { - uint32 otcode = eset.get_last()->get_value(pcard); - lua_pushinteger(L, otcode); - return 2; - } - } - return 1; -} -int32 scriptlib::card_is_set_card(lua_State *L) { - check_param_count(L, 2); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - uint32 set_code = lua_tointeger(L, 2); - lua_pushboolean(L, pcard->is_set_card(set_code)); - return 1; -} -int32 scriptlib::card_is_pre_set_card(lua_State *L) { - check_param_count(L, 2); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - uint32 set_code = lua_tointeger(L, 2); - lua_pushboolean(L, pcard->is_pre_set_card(set_code)); - return 1; -} -int32 scriptlib::card_get_type(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - lua_pushinteger(L, pcard->get_type()); - return 1; -} -int32 scriptlib::card_get_origin_type(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - lua_pushinteger(L, pcard->data.type); - return 1; -} -int32 scriptlib::card_get_level(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - lua_pushinteger(L, pcard->get_level()); - return 1; -} -int32 scriptlib::card_get_rank(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - lua_pushinteger(L, pcard->get_rank()); - return 1; -} -int32 scriptlib::card_get_synchro_level(lua_State *L) { - check_param_count(L, 2); - check_param(L, PARAM_TYPE_CARD, 2); - card* pcard = *(card**) lua_touserdata(L, 1); - card* scard = *(card**) lua_touserdata(L, 2); - lua_pushinteger(L, pcard->get_synchro_level(scard)); - return 1; -} -int32 scriptlib::card_get_ritual_level(lua_State *L) { - check_param_count(L, 2); - check_param(L, PARAM_TYPE_CARD, 2); - card* pcard = *(card**) lua_touserdata(L, 1); - card* scard = *(card**) lua_touserdata(L, 2); - lua_pushinteger(L, pcard->get_ritual_level(scard)); - return 1; -} -int32 scriptlib::card_get_origin_level(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - if((pcard->data.type & TYPE_XYZ) || (pcard->status & STATUS_NO_LEVEL)) - lua_pushinteger(L, 0); - else - lua_pushinteger(L, pcard->data.level); - return 1; -} -int32 scriptlib::card_get_origin_rank(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - if(!(pcard->data.type & TYPE_XYZ)) - lua_pushinteger(L, 0); - else - lua_pushinteger(L, pcard->data.level); - return 1; -} -int32 scriptlib::card_is_xyz_level(lua_State *L) { - check_param_count(L, 3); - check_param(L, PARAM_TYPE_CARD, 1); - check_param(L, PARAM_TYPE_CARD, 2); - card* pcard = *(card**) lua_touserdata(L, 1); - card* xyzcard = *(card**) lua_touserdata(L, 2); - uint32 lv = lua_tointeger(L, 3); - lua_pushboolean(L, pcard->check_xyz_level(xyzcard, lv)); - return 1; -} -int32 scriptlib::card_get_lscale(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - lua_pushinteger(L, pcard->get_lscale()); - return 1; -} -int32 scriptlib::card_get_origin_lscale(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - lua_pushinteger(L, pcard->data.lscale); - return 1; -} -int32 scriptlib::card_get_rscale(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - lua_pushinteger(L, pcard->get_rscale()); - return 1; -} -int32 scriptlib::card_get_origin_rscale(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - lua_pushinteger(L, pcard->data.rscale); - return 1; -} -int32 scriptlib::card_get_attribute(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - lua_pushinteger(L, pcard->get_attribute()); - return 1; -} -int32 scriptlib::card_get_origin_attribute(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - if(pcard->status & STATUS_NO_LEVEL) - lua_pushinteger(L, 0); - else - lua_pushinteger(L, pcard->data.attribute); - return 1; -} -int32 scriptlib::card_get_race(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - lua_pushinteger(L, pcard->get_race()); - return 1; -} -int32 scriptlib::card_get_origin_race(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - if(pcard->status & STATUS_NO_LEVEL) - lua_pushinteger(L, 0); - else - lua_pushinteger(L, pcard->data.race); - return 1; -} -int32 scriptlib::card_get_attack(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - lua_pushinteger(L, pcard->get_attack()); - return 1; -} -int32 scriptlib::card_get_origin_attack(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - lua_pushinteger(L, pcard->get_base_attack()); - return 1; -} -int32 scriptlib::card_get_text_attack(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - if(pcard->status & STATUS_NO_LEVEL) - lua_pushinteger(L, 0); - else - lua_pushinteger(L, pcard->data.attack); - return 1; -} -int32 scriptlib::card_get_defence(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - lua_pushinteger(L, pcard->get_defence()); - return 1; -} -int32 scriptlib::card_get_origin_defence(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - lua_pushinteger(L, pcard->get_base_defence()); - return 1; -} -int32 scriptlib::card_get_text_defence(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - if(pcard->status & STATUS_NO_LEVEL) - lua_pushinteger(L, 0); - else - lua_pushinteger(L, pcard->data.defence); - return 1; -} -int32 scriptlib:: card_get_previous_code_onfield(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - lua_pushinteger(L, pcard->previous.code); - if(pcard->previous.code2) { - lua_pushinteger(L, pcard->previous.code2); - return 2; - } - return 1; -} -int32 scriptlib::card_get_previous_type_onfield(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - lua_pushinteger(L, pcard->previous.type); - return 1; -} -int32 scriptlib::card_get_previous_level_onfield(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - lua_pushinteger(L, pcard->previous.level); - return 1; -} -int32 scriptlib::card_get_previous_rank_onfield(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - lua_pushinteger(L, pcard->previous.rank); - return 1; -} -int32 scriptlib::card_get_previous_attribute_onfield(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - lua_pushinteger(L, pcard->previous.attribute); - return 1; -} -int32 scriptlib::card_get_previous_race_onfield(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - lua_pushinteger(L, pcard->previous.race); - return 1; -} -int32 scriptlib::card_get_previous_attack_onfield(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - lua_pushinteger(L, pcard->previous.attack); - return 1; -} -int32 scriptlib::card_get_previous_defence_onfield(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - lua_pushinteger(L, pcard->previous.defence); - return 1; -} -int32 scriptlib::card_get_owner(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - lua_pushinteger(L, pcard->owner); - return 1; -} -int32 scriptlib::card_get_controler(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - lua_pushinteger(L, pcard->current.controler); - return 1; -} -int32 scriptlib::card_get_previous_controler(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - lua_pushinteger(L, pcard->previous.controler); - return 1; -} -int32 scriptlib::card_get_reason(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - lua_pushinteger(L, pcard->current.reason); - return 1; -} -int32 scriptlib::card_get_reason_card(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - interpreter::card2value(L, pcard->current.reason_card); - return 1; -} -int32 scriptlib::card_get_reason_player(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - lua_pushinteger(L, pcard->current.reason_player); - return 1; -} -int32 scriptlib::card_get_reason_effect(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - interpreter::effect2value(L, pcard->current.reason_effect); - return 1; -} -int32 scriptlib::card_get_position(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - lua_pushinteger(L, pcard->current.position); - return 1; -} -int32 scriptlib::card_get_previous_position(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - lua_pushinteger(L, pcard->previous.position); - return 1; -} -int32 scriptlib::card_get_battle_position(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - lua_pushinteger(L, pcard->temp.position); - return 1; -} -int32 scriptlib::card_get_location(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - if(pcard->is_status(STATUS_SUMMONING) || pcard->is_status(STATUS_SUMMON_DISABLED)) - lua_pushinteger(L, 0); - else - lua_pushinteger(L, pcard->current.location); - return 1; -} -int32 scriptlib::card_get_previous_location(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - lua_pushinteger(L, pcard->previous.location); - return 1; -} -int32 scriptlib::card_get_sequence(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - lua_pushinteger(L, pcard->current.sequence); - return 1; -} -int32 scriptlib::card_get_previous_sequence(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - lua_pushinteger(L, pcard->previous.sequence); - return 1; -} -int32 scriptlib::card_get_summon_type(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - lua_pushinteger(L, pcard->summon_info & 0xff00ffff); - return 1; -} -int32 scriptlib::card_get_summon_location(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - lua_pushinteger(L, (pcard->summon_info >> 16) & 0xff); - return 1; -} -int32 scriptlib::card_get_summon_player(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - lua_pushinteger(L, pcard->summon_player); - return 1; -} -int32 scriptlib::card_get_destination(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - lua_pushinteger(L, (pcard->operation_param >> 8) & 0xff); - return 1; -} -int32 scriptlib::card_get_leave_field_dest(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - lua_pushinteger(L, pcard->leave_field_redirect(REASON_EFFECT)); - return 1; -} -int32 scriptlib::card_get_turnid(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - lua_pushinteger(L, pcard->turnid); - return 1; -} -int32 scriptlib::card_get_fieldid(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - lua_pushinteger(L, pcard->fieldid); - return 1; -} -int32 scriptlib::card_get_fieldidr(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - lua_pushinteger(L, pcard->fieldid_r); - return 1; -} -int32 scriptlib::card_is_code(lua_State *L) { - check_param_count(L, 2); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - uint32 code1 = pcard->get_code(); - uint32 code2 = pcard->get_another_code(); - uint32 count = lua_gettop(L) - 1; - uint32 result = FALSE; - for(uint32 i = 0; i < count; ++i) { - if(lua_isnil(L, i + 2)) - continue; - uint32 tcode = lua_tointeger(L, i + 2); - if(code1 == tcode || (code2 && code2 == tcode)) { - result = TRUE; - break; - } - } - lua_pushboolean(L, result); - return 1; -} -int32 scriptlib::card_is_type(lua_State *L) { - check_param_count(L, 2); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - uint32 ttype = lua_tointeger(L, 2); - if(pcard->get_type() & ttype) - lua_pushboolean(L, 1); - else - lua_pushboolean(L, 0); - return 1; -} -int32 scriptlib::card_is_race(lua_State *L) { - check_param_count(L, 2); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - uint32 trace = lua_tointeger(L, 2); - if(pcard->get_race() & trace) - lua_pushboolean(L, 1); - else - lua_pushboolean(L, 0); - return 1; -} -int32 scriptlib::card_is_attribute(lua_State *L) { - check_param_count(L, 2); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - uint32 tattrib = lua_tointeger(L, 2); - if(pcard->get_attribute() & tattrib) - lua_pushboolean(L, 1); - else - lua_pushboolean(L, 0); - return 1; -} -int32 scriptlib::card_is_reason(lua_State *L) { - check_param_count(L, 2); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - uint32 treason = lua_tointeger(L, 2); - if(pcard->current.reason & treason) - lua_pushboolean(L, 1); - else - lua_pushboolean(L, 0); - return 1; -} -int32 scriptlib::card_is_status(lua_State *L) { - check_param_count(L, 2); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - uint32 tstatus = lua_tounsigned(L, 2); - if(pcard->status & tstatus) - lua_pushboolean(L, 1); - else - lua_pushboolean(L, 0); - return 1; -} -int32 scriptlib::card_is_not_tuner(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - uint32 type = pcard->get_type(); - if(!(type & TYPE_TUNER) || pcard->is_affected_by_effect(EFFECT_NONTUNER)) - lua_pushboolean(L, 1); - else - lua_pushboolean(L, 0); - return 1; -} -int32 scriptlib::card_set_status(lua_State *L) { - check_param_count(L, 3); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - if(pcard->status & STATUS_COPYING_EFFECT) - return 0; - uint32 tstatus = lua_tounsigned(L, 2); - int32 enable = lua_toboolean(L, 3); - pcard->set_status(tstatus, enable); - return 0; -} -int32 scriptlib::card_is_dual_state(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - lua_pushboolean(L, (ptr)pcard->is_affected_by_effect(EFFECT_DUAL_STATUS)); - return 1; -} -int32 scriptlib::card_enable_dual_state(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - duel* pduel = pcard->pduel; - effect* deffect = pduel->new_effect(); - deffect->owner = pcard; - deffect->code = EFFECT_DUAL_STATUS; - deffect->type = EFFECT_TYPE_SINGLE; - deffect->flag = EFFECT_FLAG_CANNOT_DISABLE; - deffect->reset_flag = RESET_EVENT + 0x1fe0000; - pcard->add_effect(deffect); - return 0; -} -int32 scriptlib::card_set_turn_counter(lua_State *L) { - check_param_count(L, 2); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - int32 ct = lua_tointeger(L, 2); - pcard->count_turn(ct); - return 0; -} -int32 scriptlib::card_get_turn_counter(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - lua_pushinteger(L, pcard->turn_counter); - return 1; -} -int32 scriptlib::card_set_material(lua_State *L) { - check_param_count(L, 2); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - if(!lua_isnil(L, 2)) { - check_param(L, PARAM_TYPE_GROUP, 2); - group* pgroup = *(group**) lua_touserdata(L, 2); - pcard->set_material(&pgroup->container); - } else - pcard->set_material(0); - return 0; -} -int32 scriptlib::card_get_material(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - group* pgroup = pcard->pduel->new_group(pcard->material_cards); - interpreter::group2value(L, pgroup); - return 1; -} -int32 scriptlib::card_get_material_count(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - lua_pushinteger(L, pcard->material_cards.size()); - return 1; -} -int32 scriptlib::card_get_equip_group(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - group* pgroup = pcard->pduel->new_group(pcard->equiping_cards); - interpreter::group2value(L, pgroup); - return 1; -} -int32 scriptlib::card_get_equip_count(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - lua_pushinteger(L, pcard->equiping_cards.size()); - return 1; -} -int32 scriptlib::card_get_equip_target(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - interpreter::card2value(L, pcard->equiping_target); - return 1; -} -int32 scriptlib::card_get_pre_equip_target(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - interpreter::card2value(L, pcard->pre_equip_target); - return 1; -} -int32 scriptlib::card_check_equip_target(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_CARD, 1); - check_param(L, PARAM_TYPE_CARD, 2); - card* pcard = *(card**) lua_touserdata(L, 1); - card* target = *(card**) lua_touserdata(L, 2); - if(pcard->is_affected_by_effect(EFFECT_EQUIP_LIMIT, target) - && (!pcard->is_status(STATUS_UNION) || target->get_union_count() == 0)) - lua_pushboolean(L, 1); - else - lua_pushboolean(L, 0); - return 1; -} -int32 scriptlib::card_get_union_count(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - lua_pushinteger(L, pcard->get_union_count()); - return 1; -} -int32 scriptlib::card_get_overlay_group(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - group* pgroup = pcard->pduel->new_group(); - pgroup->container.insert(pcard->xyz_materials.begin(), pcard->xyz_materials.end()); - interpreter::group2value(L, pgroup); - return 1; -} -int32 scriptlib::card_get_overlay_count(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - lua_pushinteger(L, pcard->xyz_materials.size()); - return 1; -} -int32 scriptlib::card_get_overlay_target(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - interpreter::card2value(L, pcard->overlay_target); - return 1; -} -int32 scriptlib::card_check_remove_overlay_card(lua_State *L) { - check_param_count(L, 4); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - int32 playerid = lua_tointeger(L, 2); - if(playerid != 0 && playerid != 1) - return 0; - int32 count = lua_tointeger(L, 3); - int32 reason = lua_tointeger(L, 4); - duel* pduel = pcard->pduel; - lua_pushboolean(L, pduel->game_field->is_player_can_remove_overlay_card(playerid, pcard, 0, 0, count, reason)); - return 1; -} -int32 scriptlib::card_remove_overlay_card(lua_State *L) { - check_action_permission(L); - check_param_count(L, 5); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - int32 playerid = lua_tointeger(L, 2); - if(playerid != 0 && playerid != 1) - return 0; - int32 min = lua_tointeger(L, 3); - int32 max = lua_tointeger(L, 4); - int32 reason = lua_tointeger(L, 5); - duel* pduel = pcard->pduel; - pduel->game_field->remove_overlay_card(reason, pcard, playerid, 0, 0, min, max); - return lua_yield(L, 0); -} -int32 scriptlib::card_get_attacked_group(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - group* pgroup = pcard->pduel->new_group(); - card::attacker_map::iterator cit; - for(cit = pcard->attacked_cards.begin(); cit != pcard->attacked_cards.end(); ++cit) { - if(cit->second) - pgroup->container.insert(cit->second); - } - interpreter::group2value(L, pgroup); - return 1; -} -int32 scriptlib::card_get_attacked_group_count(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - lua_pushinteger(L, pcard->attacked_cards.size()); - return 1; -} -int32 scriptlib::card_get_attacked_count(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - lua_pushinteger(L, pcard->attacked_count); - return 1; -} -int32 scriptlib::card_get_battled_group(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - group* pgroup = pcard->pduel->new_group(); - card::attacker_map::iterator cit; - for(cit = pcard->battled_cards.begin(); cit != pcard->battled_cards.end(); ++cit) { - if(cit->second) - pgroup->container.insert(cit->second); - } - interpreter::group2value(L, pgroup); - return 1; -} -int32 scriptlib::card_get_battled_group_count(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - lua_pushinteger(L, pcard->battled_cards.size()); - return 1; -} -int32 scriptlib::card_get_attack_announced_count(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - lua_pushinteger(L, pcard->announce_count); - return 1; -} -int32 scriptlib::card_is_direct_attacked(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - bool ret = false; - for(auto cit = pcard->attacked_cards.begin(); cit != pcard->attacked_cards.end(); ++cit) - if(cit->first == 0) - ret = true; - lua_pushboolean(L, ret); - return 1; -} -int32 scriptlib::card_set_card_target(lua_State *L) { - check_param_count(L, 2); - check_param(L, PARAM_TYPE_CARD, 1); - check_param(L, PARAM_TYPE_CARD, 2); - card* pcard = *(card**) lua_touserdata(L, 1); - card* ocard = *(card**) lua_touserdata(L, 2); - pcard->add_card_target(ocard); - return 0; -} -int32 scriptlib::card_get_card_target(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - group* pgroup = pcard->pduel->new_group(pcard->effect_target_cards); - interpreter::group2value(L, pgroup); - return 1; -} -int32 scriptlib::card_get_first_card_target(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - if(pcard->effect_target_cards.size()) - interpreter::card2value(L, *pcard->effect_target_cards.begin()); - else lua_pushnil(L); - return 1; -} -int32 scriptlib::card_get_card_target_count(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - lua_pushinteger(L, pcard->effect_target_cards.size()); - return 1; -} -int32 scriptlib::card_is_has_card_target(lua_State *L) { - check_param_count(L, 2); - check_param(L, PARAM_TYPE_CARD, 1); - check_param(L, PARAM_TYPE_CARD, 2); - card* pcard = *(card**) lua_touserdata(L, 1); - card* rcard = *(card**) lua_touserdata(L, 2); - lua_pushboolean(L, pcard->effect_target_cards.count(rcard)); - return 1; -} -int32 scriptlib::card_cancel_card_target(lua_State *L) { - check_param_count(L, 2); - check_param(L, PARAM_TYPE_CARD, 1); - check_param(L, PARAM_TYPE_CARD, 2); - card* pcard = *(card**) lua_touserdata(L, 1); - card* rcard = *(card**) lua_touserdata(L, 2); - pcard->cancel_card_target(rcard); - return 0; -} -int32 scriptlib::card_get_owner_target(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - group* pgroup = pcard->pduel->new_group(pcard->effect_target_owner); - interpreter::group2value(L, pgroup); - return 1; -} -int32 scriptlib::card_get_owner_target_count(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - lua_pushinteger(L, pcard->effect_target_owner.size()); - return 1; -} -int32 scriptlib::card_get_activate_effect(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - int32 count = 0; - for(auto eit = pcard->field_effect.begin(); eit != pcard->field_effect.end(); ++eit) { - if(eit->second->type & EFFECT_TYPE_ACTIVATE) { - interpreter::effect2value(L, eit->second); - count++; - } - } - return count; -} -int32 scriptlib::card_check_activate_effect(lua_State *L) { - check_param_count(L, 4); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - int32 neglect_con = lua_toboolean(L, 2); - int32 neglect_cost = lua_toboolean(L, 3); - int32 copy_info = lua_toboolean(L, 4); - duel* pduel = pcard->pduel; - tevent pe; - for(auto eit = pcard->field_effect.begin(); eit != pcard->field_effect.end(); ++eit) { - effect* peffect = eit->second; - if((peffect->type & EFFECT_TYPE_ACTIVATE) - && pduel->game_field->check_event_c(peffect, pduel->game_field->core.reason_player, neglect_con, neglect_cost, copy_info, &pe)) { - if(!copy_info || (peffect->code == EVENT_FREE_CHAIN)) { - interpreter::effect2value(L, peffect); - return 1; - } else { - interpreter::effect2value(L, peffect); - interpreter::group2value(L, pe.event_cards); - lua_pushinteger(L, pe.event_player); - lua_pushinteger(L, pe.event_value); - interpreter::effect2value(L, pe.reason_effect); - lua_pushinteger(L, pe.reason); - lua_pushinteger(L, pe.reason_player); - return 7; - } - } - } - return 0; -} -int32 scriptlib::card_register_effect(lua_State *L) { - check_param_count(L, 2); - check_param(L, PARAM_TYPE_CARD, 1); - check_param(L, PARAM_TYPE_EFFECT, 2); - card* pcard = *(card**) lua_touserdata(L, 1); - effect* peffect = *(effect**) lua_touserdata(L, 2); - int32 forced = lua_toboolean(L, 3); - duel* pduel = pcard->pduel; - if(peffect->owner == pduel->game_field->temp_card) - return 0; - if(!forced && pduel->game_field->core.reason_effect && !pcard->is_affect_by_effect(pduel->game_field->core.reason_effect)) { - pduel->game_field->core.reseted_effects.insert(peffect); - return 0; - } - int32 id; - if (peffect->handler) - id = -1; - else - id = pcard->add_effect(peffect); - lua_pushinteger(L, id); - return 1; -} -int32 scriptlib::card_is_has_effect(lua_State *L) { - check_param_count(L, 2); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - uint32 code = lua_tointeger(L, 2); - if(pcard && pcard->is_affected_by_effect(code)) - lua_pushboolean(L, 1); - else - lua_pushboolean(L, 0); - return 1; -} -int32 scriptlib::card_reset_effect(lua_State *L) { - check_param_count(L, 3); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - uint32 code = lua_tointeger(L, 2); - uint32 type = lua_tointeger(L, 3); - pcard->reset(code, type); - return 0; -} -int32 scriptlib::card_get_effect_count(lua_State *L) { - check_param_count(L, 2); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - uint32 code = lua_tointeger(L, 2); - effect_set eset; - pcard->filter_effect(code, &eset); - lua_pushinteger(L, eset.size()); - return 1; -} -int32 scriptlib::card_register_flag_effect(lua_State *L) { - check_param_count(L, 5); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - int32 code = (lua_tointeger(L, 2) & 0xfffffff) | 0x10000000; - int32 reset = lua_tointeger(L, 3); - int32 flag = lua_tointeger(L, 4); - int32 count = lua_tointeger(L, 5); - int32 lab = 0; - int32 desc = 0; - if(lua_gettop(L) >= 6) - lab = lua_tointeger(L, 6); - if(lua_gettop(L) >= 7) - desc = lua_tointeger(L, 7); - if(count == 0) - count = 1; - if(reset & (RESET_PHASE) && !(reset & (RESET_SELF_TURN | RESET_OPPO_TURN))) - reset |= (RESET_SELF_TURN | RESET_OPPO_TURN); - duel* pduel = pcard->pduel; - effect* peffect = pduel->new_effect(); - peffect->owner = pcard; - peffect->handler = 0; - peffect->type = EFFECT_TYPE_SINGLE; - peffect->code = code; - peffect->reset_flag = reset; - peffect->flag = flag | EFFECT_FLAG_CANNOT_DISABLE; - peffect->reset_count |= count & 0xff; - peffect->label = lab; - peffect->description = desc; - pcard->add_effect(peffect); - interpreter::effect2value(L, peffect); - return 1; -} -int32 scriptlib::card_get_flag_effect(lua_State *L) { - check_param_count(L, 2); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - int32 code = (lua_tointeger(L, 2) & 0xfffffff) | 0x10000000; - lua_pushinteger(L, pcard->single_effect.count(code)); - return 1; -} -int32 scriptlib::card_reset_flag_effect(lua_State *L) { - check_param_count(L, 2); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - int32 code = (lua_tointeger(L, 2) & 0xfffffff) | 0x10000000; - pcard->reset(code, RESET_CODE); - return 0; -} -int32 scriptlib::card_set_flag_effect_label(lua_State *L) { - check_param_count(L, 3); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - int32 code = (lua_tointeger(L, 2) & 0xfffffff) | 0x10000000; - int lab = lua_tointeger(L, 3); - auto eit = pcard->single_effect.find(code); - if(eit == pcard->single_effect.end()) - lua_pushboolean(L, FALSE); - else { - eit->second->label = lab; - lua_pushboolean(L, TRUE); - } - return 1; -} -int32 scriptlib::card_get_flag_effect_label(lua_State *L) { - check_param_count(L, 2); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - int32 code = (lua_tointeger(L, 2) & 0xfffffff) | 0x10000000; - auto eit = pcard->single_effect.find(code); - if(eit == pcard->single_effect.end()) - lua_pushnil(L); - else - lua_pushinteger(L, eit->second->label); - return 1; -} -int32 scriptlib::card_create_relation(lua_State *L) { - check_param_count(L, 3); - check_param(L, PARAM_TYPE_CARD, 1); - check_param(L, PARAM_TYPE_CARD, 2); - card* pcard = *(card**) lua_touserdata(L, 1); - card* rcard = *(card**) lua_touserdata(L, 2); - uint32 reset = lua_tointeger(L, 3); - pcard->create_relation(rcard, reset); - return 0; -} -int32 scriptlib::card_release_relation(lua_State *L) { - check_param_count(L, 2); - check_param(L, PARAM_TYPE_CARD, 1); - check_param(L, PARAM_TYPE_CARD, 2); - card* pcard = *(card**) lua_touserdata(L, 1); - card* rcard = *(card**) lua_touserdata(L, 2); - pcard->release_relation(rcard); - return 0; -} -int32 scriptlib::card_create_effect_relation(lua_State *L) { - check_param_count(L, 2); - check_param(L, PARAM_TYPE_CARD, 1); - check_param(L, PARAM_TYPE_EFFECT, 2); - card* pcard = *(card**) lua_touserdata(L, 1); - effect* peffect = *(effect**) lua_touserdata(L, 2); - pcard->create_relation(peffect); - return 0; -} -int32 scriptlib::card_release_effect_relation(lua_State *L) { - check_param_count(L, 2); - check_param(L, PARAM_TYPE_CARD, 1); - check_param(L, PARAM_TYPE_EFFECT, 2); - card* pcard = *(card**) lua_touserdata(L, 1); - effect* peffect = *(effect**) lua_touserdata(L, 2); - pcard->release_relation(peffect); - return 0; -} -int32 scriptlib::card_clear_effect_relation(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - pcard->relate_effect.clear(); - return 0; -} -int32 scriptlib::card_is_relate_to_effect(lua_State *L) { - check_param_count(L, 2); - check_param(L, PARAM_TYPE_CARD, 1); - check_param(L, PARAM_TYPE_EFFECT, 2); - card* pcard = *(card**) lua_touserdata(L, 1); - effect* peffect = *(effect**) lua_touserdata(L, 2); - if(pcard && pcard->is_has_relation(peffect)) - lua_pushboolean(L, 1); - else - lua_pushboolean(L, 0); - return 1; -} -int32 scriptlib::card_is_relate_to_card(lua_State *L) { - check_param_count(L, 2); - check_param(L, PARAM_TYPE_CARD, 1); - check_param(L, PARAM_TYPE_CARD, 2); - card* pcard = *(card**) lua_touserdata(L, 1); - card* rcard = *(card**) lua_touserdata(L, 2); - if(pcard && pcard->is_has_relation(rcard)) - lua_pushboolean(L, 1); - else - lua_pushboolean(L, 0); - return 1; -} -int32 scriptlib::card_is_relate_to_battle(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - duel* pduel = pcard->pduel; - if(pcard->fieldid_r == pduel->game_field->core.pre_field[0] || pcard->fieldid_r == pduel->game_field->core.pre_field[1]) - lua_pushboolean(L, 1); - else - lua_pushboolean(L, 0); - return 1; -} -int32 scriptlib::card_copy_effect(lua_State *L) { - check_param_count(L, 3); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - uint32 code = lua_tointeger(L, 2); - uint32 reset = lua_tointeger(L, 3); - uint32 count = lua_tointeger(L, 4); - if(count == 0) - count = 1; - if(reset & RESET_PHASE && !(reset & (RESET_SELF_TURN | RESET_OPPO_TURN))) - reset |= (RESET_SELF_TURN | RESET_OPPO_TURN); - lua_pushinteger(L, pcard->copy_effect(code, reset, count)); - return 1; -} -int32 scriptlib::card_enable_unsummonable(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - duel* pduel = pcard->pduel; - if(!pcard->is_status(STATUS_COPYING_EFFECT)) { - effect* peffect = pduel->new_effect(); - peffect->owner = pcard; - peffect->code = EFFECT_UNSUMMONABLE_CARD; - peffect->type = EFFECT_TYPE_SINGLE; - peffect->flag = EFFECT_FLAG_CANNOT_DISABLE | EFFECT_FLAG_UNCOPYABLE; - pcard->add_effect(peffect); - } - return 0; -} -int32 scriptlib::card_enable_revive_limit(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - duel* pduel = pcard->pduel; - if(!pcard->is_status(STATUS_COPYING_EFFECT)) { - effect* peffect1 = pduel->new_effect(); - peffect1->owner = pcard; - peffect1->code = EFFECT_UNSUMMONABLE_CARD; - peffect1->type = EFFECT_TYPE_SINGLE; - peffect1->flag = EFFECT_FLAG_CANNOT_DISABLE | EFFECT_FLAG_UNCOPYABLE; - pcard->add_effect(peffect1); - effect* peffect2 = pduel->new_effect(); - peffect2->owner = pcard; - peffect2->code = EFFECT_REVIVE_LIMIT; - peffect2->type = EFFECT_TYPE_SINGLE; - peffect2->flag = EFFECT_FLAG_CANNOT_DISABLE | EFFECT_FLAG_UNCOPYABLE; - pcard->add_effect(peffect2); - } - return 0; -} -int32 scriptlib::card_complete_procedure(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - pcard->set_status(STATUS_PROC_COMPLETE, TRUE); - return 0; -} -int32 scriptlib::card_is_disabled(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - lua_pushboolean(L, pcard->is_status(STATUS_DISABLED)); - return 1; -} -int32 scriptlib::card_is_destructable(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_CARD, 1); - effect* peffect = 0; - if(lua_gettop(L) > 1) { - check_param(L, PARAM_TYPE_EFFECT, 2); - peffect = *(effect**) lua_touserdata(L, 2); - } - card* pcard = *(card**) lua_touserdata(L, 1); - if(peffect) - lua_pushboolean(L, pcard->is_destructable_by_effect(peffect, pcard->pduel->game_field->core.reason_player)); - else - lua_pushboolean(L, pcard->is_destructable()); - return 1; -} -int32 scriptlib::card_is_summonable(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_CARD, 1); - card * pcard = *(card**) lua_touserdata(L, 1); - lua_pushboolean(L, pcard->is_summonable()); - return 1; -} -int32 scriptlib::card_is_msetable(lua_State *L) { - check_param_count(L, 3); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - uint32 p = pcard->pduel->game_field->core.reason_player; - uint32 ign = lua_toboolean(L, 2); - effect* peffect = 0; - if(!lua_isnil(L, 3)) { - check_param(L, PARAM_TYPE_EFFECT, 3); - peffect = *(effect**)lua_touserdata(L, 3); - } - uint32 minc = 0; - if(lua_gettop(L) > 3) - minc = lua_tointeger(L, 4); - lua_pushboolean(L, pcard->is_setable_mzone(p, ign, peffect, minc)); - return 1; -} -int32 scriptlib::card_is_ssetable(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - uint32 p = pcard->pduel->game_field->core.reason_player; - uint32 ign = FALSE; - if(lua_gettop(L) >= 2) - ign = lua_toboolean(L, 2); - lua_pushboolean(L, pcard->is_setable_szone(p, ign)); - return 1; -} -int32 scriptlib::card_is_special_summonable(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - uint32 p = pcard->pduel->game_field->core.reason_player; - lua_pushboolean(L, pcard->is_special_summonable(p, 0)); - return 1; -} -int32 scriptlib::card_is_synchro_summonable(lua_State *L) { - check_param_count(L, 2); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - if(!(pcard->data.type & TYPE_SYNCHRO)) - return 0; - card* tuner = 0; - group* mg = 0; - if(!lua_isnil(L, 2)) { - check_param(L, PARAM_TYPE_CARD, 2); - tuner = *(card**) lua_touserdata(L, 2); - } - if(lua_gettop(L) >= 3) { - if(!lua_isnil(L, 3)) { - check_param(L, PARAM_TYPE_GROUP, 3); - mg = *(group**) lua_touserdata(L, 3); - } - } - uint32 p = pcard->pduel->game_field->core.reason_player; - pcard->pduel->game_field->core.limit_tuner = tuner; - pcard->pduel->game_field->core.limit_syn = mg; - lua_pushboolean(L, pcard->is_special_summonable(p, SUMMON_TYPE_SYNCHRO)); - return 1; -} -int32 scriptlib::card_is_xyz_summonable(lua_State *L) { - check_param_count(L, 2); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - if(!(pcard->data.type & TYPE_XYZ)) - return 0; - group* materials = 0; - if(!lua_isnil(L, 2)) { - check_param(L, PARAM_TYPE_GROUP, 2); - materials = *(group**) lua_touserdata(L, 2); - } - uint32 p = pcard->pduel->game_field->core.reason_player; - pcard->pduel->game_field->core.limit_xyz = materials; - lua_pushboolean(L, pcard->is_special_summonable(p, SUMMON_TYPE_XYZ)); - return 1; -} -int32 scriptlib::card_is_can_be_summoned(lua_State *L) { - check_param_count(L, 3); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - uint32 p = pcard->pduel->game_field->core.reason_player; - uint32 ign = lua_toboolean(L, 2); - effect* peffect = 0; - if(!lua_isnil(L, 3)) { - check_param(L, PARAM_TYPE_EFFECT, 3); - peffect = *(effect**)lua_touserdata(L, 3); - } - uint32 minc = 0; - if(lua_gettop(L) > 3) - minc = lua_tointeger(L, 4); - lua_pushboolean(L, pcard->is_can_be_summoned(p, ign, peffect, minc)); - return 1; -} -int32 scriptlib::card_is_can_be_special_summoned(lua_State *L) { - check_param_count(L, 6); - check_param(L, PARAM_TYPE_CARD, 1); - check_param(L, PARAM_TYPE_EFFECT, 2); - card* pcard = *(card**) lua_touserdata(L, 1); - effect* peffect = *(effect**) lua_touserdata(L, 2); - uint32 sumtype = lua_tointeger(L, 3); - uint32 sumplayer = lua_tointeger(L, 4); - uint32 nocheck = lua_toboolean(L, 5); - uint32 nolimit = lua_toboolean(L, 6); - uint32 sumpos = POS_FACEUP; - uint32 toplayer = sumplayer; - if(lua_gettop(L) > 6) - sumpos = lua_tointeger(L, 7); - if(lua_gettop(L) > 7) - toplayer = lua_tointeger(L, 8); - if(pcard->is_can_be_special_summoned(peffect, sumtype, sumpos, sumplayer, toplayer, nocheck, nolimit)) - lua_pushboolean(L, 1); - else - lua_pushboolean(L, 0); - return 1; -} -int32 scriptlib::card_is_able_to_hand(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - uint32 p = pcard->pduel->game_field->core.reason_player; - if(pcard->is_capable_send_to_hand(p)) - lua_pushboolean(L, 1); - else - lua_pushboolean(L, 0); - return 1; -} -int32 scriptlib::card_is_able_to_grave(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - uint32 p = pcard->pduel->game_field->core.reason_player; - if(pcard->is_capable_send_to_grave(p)) - lua_pushboolean(L, 1); - else - lua_pushboolean(L, 0); - return 1; -} -int32 scriptlib::card_is_able_to_deck(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - uint32 p = pcard->pduel->game_field->core.reason_player; - if(pcard->is_capable_send_to_deck(p)) - lua_pushboolean(L, 1); - else - lua_pushboolean(L, 0); - return 1; -} -int32 scriptlib::card_is_able_to_extra(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - uint32 p = pcard->pduel->game_field->core.reason_player; - if(pcard->is_capable_send_to_extra(p)) - lua_pushboolean(L, 1); - else - lua_pushboolean(L, 0); - return 1; -} -int32 scriptlib::card_is_able_to_remove(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - uint32 p = pcard->pduel->game_field->core.reason_player; - if(lua_gettop(L) >= 2) - p = lua_tointeger(L, 2); - if(pcard->is_removeable(p)) - lua_pushboolean(L, 1); - else - lua_pushboolean(L, 0); - return 1; -} -int32 scriptlib::card_is_able_to_hand_as_cost(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - uint32 p = pcard->pduel->game_field->core.reason_player; - if(pcard->is_capable_cost_to_hand(p)) - lua_pushboolean(L, 1); - else - lua_pushboolean(L, 0); - return 1; -} -int32 scriptlib::card_is_able_to_grave_as_cost(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - uint32 p = pcard->pduel->game_field->core.reason_player; - if(pcard->is_capable_cost_to_grave(p)) - lua_pushboolean(L, 1); - else - lua_pushboolean(L, 0); - return 1; -} -int32 scriptlib::card_is_able_to_deck_as_cost(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - uint32 p = pcard->pduel->game_field->core.reason_player; - if(pcard->is_capable_cost_to_deck(p)) - lua_pushboolean(L, 1); - else - lua_pushboolean(L, 0); - return 1; -} -int32 scriptlib::card_is_able_to_extra_as_cost(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - uint32 p = pcard->pduel->game_field->core.reason_player; - if(pcard->is_capable_cost_to_extra(p)) - lua_pushboolean(L, 1); - else - lua_pushboolean(L, 0); - return 1; -} -int32 scriptlib::card_is_able_to_deck_or_extra_as_cost(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - uint32 p = pcard->pduel->game_field->core.reason_player; - int32 val = (pcard->data.type & 0x802040) ? pcard->is_capable_cost_to_extra(p) : pcard->is_capable_cost_to_deck(p); - if(val) - lua_pushboolean(L, 1); - else - lua_pushboolean(L, 0); - return 1; -} -int32 scriptlib::card_is_able_to_remove_as_cost(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - uint32 p = pcard->pduel->game_field->core.reason_player; - if(pcard->is_removeable_as_cost(p)) - lua_pushboolean(L, 1); - else - lua_pushboolean(L, 0); - return 1; -} -int32 scriptlib::card_is_releasable(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - uint32 p = pcard->pduel->game_field->core.reason_player; - if(pcard->is_releasable_by_nonsummon(p)) - lua_pushboolean(L, 1); - else - lua_pushboolean(L, 0); - return 1; -} -int32 scriptlib::card_is_releasable_by_effect(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - uint32 p = pcard->pduel->game_field->core.reason_player; - effect* re = pcard->pduel->game_field->core.reason_effect; - if(pcard->is_releasable_by_effect(p, re)) - lua_pushboolean(L, 1); - else - lua_pushboolean(L, 0); - return 1; -} -int32 scriptlib::card_is_discardable(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - uint32 p = pcard->pduel->game_field->core.reason_player; - effect* pe = pcard->pduel->game_field->core.reason_effect; - uint32 reason = REASON_COST; - if(lua_gettop(L) > 1) - reason = lua_tointeger(L, 2); - if((reason != REASON_COST || !pcard->is_affected_by_effect(EFFECT_CANNOT_USE_AS_COST)) - && pcard->pduel->game_field->is_player_can_discard_hand(p, pcard, pe, reason)) - lua_pushboolean(L, 1); - else - lua_pushboolean(L, 0); - return 1; -} -int32 scriptlib::card_is_attackable(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - lua_pushboolean(L, pcard->is_capable_attack()); - return 1; -} -int32 scriptlib::card_is_chain_attackable(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_CARD, 1); - int32 monsteronly = FALSE; - card* pcard = *(card**) lua_touserdata(L, 1); - duel* pduel = pcard->pduel; - int32 ac = 2; - if(lua_gettop(L) > 1) - ac = lua_tointeger(L, 2); - if(lua_gettop(L) > 2) - monsteronly = lua_toboolean(L, 3); - card* attacker = pduel->game_field->core.attacker; - if(attacker->is_status(STATUS_BATTLE_DESTROYED) - || attacker->current.controler != pduel->game_field->infos.turn_player - || attacker->fieldid_r != pduel->game_field->core.pre_field[0] - || !attacker->is_capable_attack_announce(pduel->game_field->infos.turn_player) - || (ac != 0 && attacker->announce_count >= ac) - || (ac == 2 && attacker->is_affected_by_effect(EFFECT_EXTRA_ATTACK))) { - lua_pushboolean(L, 0); - return 1; - } - pduel->game_field->core.select_cards.clear(); - pduel->game_field->get_attack_target(attacker, &pduel->game_field->core.select_cards, TRUE); - if(pduel->game_field->core.select_cards.size() == 0 && (monsteronly || attacker->operation_param == 0)) - lua_pushboolean(L, 0); - else - lua_pushboolean(L, 1); - return 1; -} -int32 scriptlib::card_is_faceup(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - lua_pushboolean(L, pcard->is_position(POS_FACEUP)); - return 1; -} -int32 scriptlib::card_is_attack_pos(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - lua_pushboolean(L, pcard->is_position(POS_ATTACK)); - return 1; -} -int32 scriptlib::card_is_facedown(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - lua_pushboolean(L, pcard->is_position(POS_FACEDOWN)); - return 1; -} -int32 scriptlib::card_is_defence_pos(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - lua_pushboolean(L, pcard->is_position(POS_DEFENCE)); - return 1; -} -int32 scriptlib::card_is_position(lua_State *L) { - check_param_count(L, 2); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - uint32 pos = lua_tointeger(L, 2); - lua_pushboolean(L, pcard->is_position(pos)); - return 1; -} -int32 scriptlib::card_is_pre_position(lua_State *L) { - check_param_count(L, 2); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - uint32 pos = lua_tointeger(L, 2); - lua_pushboolean(L, pcard->previous.position & pos); - return 1; -} -int32 scriptlib::card_is_controler(lua_State *L) { - check_param_count(L, 2); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - uint32 con = lua_tointeger(L, 2); - if(pcard->current.controler == con) - lua_pushboolean(L, 1); - else - lua_pushboolean(L, 0); - return 1; -} -int32 scriptlib::card_is_onfield(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - if((pcard->current.location & LOCATION_ONFIELD) && !pcard->is_status(STATUS_SUMMONING) && !pcard->is_status(STATUS_SUMMON_DISABLED)) - lua_pushboolean(L, 1); - else - lua_pushboolean(L, 0); - return 1; -} -int32 scriptlib::card_is_location(lua_State *L) { - check_param_count(L, 2); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - uint32 loc = lua_tointeger(L, 2); - if(pcard->current.location == LOCATION_MZONE) { - if((loc & LOCATION_MZONE) && !pcard->is_status(STATUS_SUMMONING) && !pcard->is_status(STATUS_SUMMON_DISABLED)) - lua_pushboolean(L, 1); - else - lua_pushboolean(L, 0); - } else - lua_pushboolean(L, pcard->current.location & loc); - return 1; -} -int32 scriptlib::card_is_pre_location(lua_State *L) { - check_param_count(L, 2); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - uint32 loc = lua_tointeger(L, 2); - lua_pushboolean(L, pcard->previous.location & loc); - return 1; -} -int32 scriptlib::card_is_level_below(lua_State *L) { - check_param_count(L, 2); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - uint32 lvl = lua_tointeger(L, 2); - if((pcard->data.type & TYPE_XYZ) || (pcard->status & STATUS_NO_LEVEL) - || (!(pcard->data.type & TYPE_MONSTER) && !(pcard->get_type() & TYPE_MONSTER) && !(pcard->current.location & LOCATION_MZONE))) - lua_pushboolean(L, 0); - else - lua_pushboolean(L, pcard->get_level() <= lvl); - return 1; -} -int32 scriptlib::card_is_level_above(lua_State *L) { - check_param_count(L, 2); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - uint32 lvl = lua_tointeger(L, 2); - if((pcard->data.type & TYPE_XYZ) || (pcard->status & STATUS_NO_LEVEL) - || (!(pcard->data.type & TYPE_MONSTER) && !(pcard->get_type() & TYPE_MONSTER) && !(pcard->current.location & LOCATION_MZONE))) - lua_pushboolean(L, 0); - else - lua_pushboolean(L, pcard->get_level() >= lvl); - return 1; -} -int32 scriptlib::card_is_rank_below(lua_State *L) { - check_param_count(L, 2); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - uint32 rnk = lua_tointeger(L, 2); - if(!(pcard->data.type & TYPE_XYZ) || (pcard->status & STATUS_NO_LEVEL) - || (!(pcard->data.type & TYPE_MONSTER) && !(pcard->current.location & LOCATION_MZONE))) - lua_pushboolean(L, 0); - else - lua_pushboolean(L, pcard->get_rank() <= rnk); - return 1; -} -int32 scriptlib::card_is_rank_above(lua_State *L) { - check_param_count(L, 2); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - uint32 rnk = lua_tointeger(L, 2); - if(!(pcard->data.type & TYPE_XYZ) || (pcard->status & STATUS_NO_LEVEL) - || (!(pcard->data.type & TYPE_MONSTER) && !(pcard->current.location & LOCATION_MZONE))) - lua_pushboolean(L, 0); - else - lua_pushboolean(L, pcard->get_rank() >= rnk); - return 1; -} -int32 scriptlib::card_is_attack_below(lua_State *L) { - check_param_count(L, 2); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - int32 atk = lua_tointeger(L, 2); - if(!(pcard->data.type & TYPE_MONSTER) && !(pcard->get_type() & TYPE_MONSTER) && !(pcard->current.location & LOCATION_MZONE)) - lua_pushboolean(L, 0); - else { - int _atk = pcard->get_attack(); - lua_pushboolean(L, _atk >= 0 && _atk <= atk); - } - return 1; -} -int32 scriptlib::card_is_attack_above(lua_State *L) { - check_param_count(L, 2); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - int32 atk = lua_tointeger(L, 2); - if(!(pcard->data.type & TYPE_MONSTER) && !(pcard->get_type() & TYPE_MONSTER) && !(pcard->current.location & LOCATION_MZONE)) - lua_pushboolean(L, 0); - else { - int _atk = pcard->get_attack(); - lua_pushboolean(L, _atk >= atk); - } - return 1; -} -int32 scriptlib::card_is_defence_below(lua_State *L) { - check_param_count(L, 2); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - int32 def = lua_tointeger(L, 2); - if(!(pcard->data.type & TYPE_MONSTER) && !(pcard->get_type() & TYPE_MONSTER) && !(pcard->current.location & LOCATION_MZONE)) - lua_pushboolean(L, 0); - else { - int _def = pcard->get_defence(); - lua_pushboolean(L, _def >= 0 && _def <= def); - } - return 1; -} -int32 scriptlib::card_is_defence_above(lua_State *L) { - check_param_count(L, 2); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - int32 def = lua_tointeger(L, 2); - if(!(pcard->data.type & TYPE_MONSTER) && !(pcard->get_type() & TYPE_MONSTER) && !(pcard->current.location & LOCATION_MZONE)) - lua_pushboolean(L, 0); - else { - int _def = pcard->get_defence(); - lua_pushboolean(L, _def >= def); - } - return 1; -} -int32 scriptlib::card_is_public(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - if(pcard->is_status(STATUS_IS_PUBLIC)) - lua_pushboolean(L, 1); - else - lua_pushboolean(L, 0); - return 1; -} -int32 scriptlib::card_is_forbidden(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - if(pcard->is_affected_by_effect(EFFECT_FORBIDDEN)) - lua_pushboolean(L, 1); - else - lua_pushboolean(L, 0); - return 1; -} -int32 scriptlib::card_is_able_to_change_controler(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - if(pcard->is_capable_change_control()) - lua_pushboolean(L, 1); - else - lua_pushboolean(L, 0); - return 1; -} -int32 scriptlib::card_is_controler_can_be_changed(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - if(pcard->is_control_can_be_changed()) - lua_pushboolean(L, 1); - else - lua_pushboolean(L, 0); - return 1; -} -int32 scriptlib::card_add_counter(lua_State *L) { - check_param_count(L, 3); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - uint32 countertype = lua_tointeger(L, 2); - uint32 count = lua_tointeger(L, 3); - if(pcard->is_affect_by_effect(pcard->pduel->game_field->core.reason_effect)) - lua_pushboolean(L, pcard->add_counter(pcard->pduel->game_field->core.reason_player, countertype, count)); - else lua_pushboolean(L, 0); - return 1; -} -int32 scriptlib::card_remove_counter(lua_State *L) { - check_action_permission(L); - check_param_count(L, 5); - check_param(L, PARAM_TYPE_CARD, 1); - card * pcard = *(card**) lua_touserdata(L, 1); - uint32 rplayer = lua_tointeger(L, 2); - uint32 countertype = lua_tointeger(L, 3); - uint32 count = lua_tointeger(L, 4); - uint32 reason = lua_tointeger(L, 5); - if(countertype == 0) { - for(auto cmit = pcard->counters.begin(); cmit != pcard->counters.end(); ++cmit) { - pcard->pduel->write_buffer8(MSG_REMOVE_COUNTER); - pcard->pduel->write_buffer16(cmit->first); - pcard->pduel->write_buffer8(pcard->current.controler); - pcard->pduel->write_buffer8(pcard->current.location); - pcard->pduel->write_buffer8(pcard->current.sequence); - pcard->pduel->write_buffer8(cmit->second); - } - pcard->counters.clear(); - return 0; - } else { - pcard->pduel->game_field->remove_counter(reason, pcard, rplayer, 0, 0, countertype, count); - return lua_yield(L, 0); - } -} -int32 scriptlib::card_get_counter(lua_State *L) { - check_param_count(L, 2); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - uint32 countertype = lua_tointeger(L, 2); - if(countertype == 0) - lua_pushinteger(L, pcard->counters.size()); - else - lua_pushinteger(L, pcard->get_counter(countertype)); - return 1; -} -int32 scriptlib::card_enable_counter_permit(lua_State *L) { - check_param_count(L, 2); - card* pcard = *(card**) lua_touserdata(L, 1); - int32 countertype = lua_tointeger(L, 2); - uint32 prange; - if(lua_gettop(L) > 2) - prange = lua_tointeger(L, 3); - else if(pcard->data.type & TYPE_MONSTER) - prange = LOCATION_MZONE; - else - prange = LOCATION_SZONE | LOCATION_FZONE; - effect* peffect = pcard->pduel->new_effect(); - peffect->owner = pcard; - peffect->type = EFFECT_TYPE_SINGLE; - peffect->code = EFFECT_COUNTER_PERMIT | countertype; - peffect->flag = EFFECT_FLAG_SINGLE_RANGE; - peffect->range = prange; - pcard->add_effect(peffect); - return 0; -} -int32 scriptlib::card_set_counter_limit(lua_State *L) { - check_param_count(L, 3); - card* pcard = *(card**) lua_touserdata(L, 1); - int32 countertype = lua_tointeger(L, 2); - int32 limit = lua_tointeger(L, 3); - effect* peffect = pcard->pduel->new_effect(); - peffect->owner = pcard; - peffect->type = EFFECT_TYPE_SINGLE; - peffect->code = EFFECT_COUNTER_LIMIT | countertype; - peffect->value = limit; - pcard->add_effect(peffect); - return 0; -} -int32 scriptlib::card_is_can_turn_set(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - lua_pushboolean(L, pcard->is_capable_turn_set(pcard->pduel->game_field->core.reason_player)); - return 1; -} -int32 scriptlib::card_is_can_add_counter(lua_State *L) { - check_param_count(L, 3); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - uint32 countertype = lua_tointeger(L, 2); - uint32 count = lua_tointeger(L, 3); - lua_pushboolean(L, pcard->is_can_add_counter(pcard->pduel->game_field->core.reason_player, countertype, count)); - return 1; -} -int32 scriptlib::card_is_can_remove_counter(lua_State *L) { - check_param_count(L, 5); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - uint32 playerid = lua_tointeger(L, 2); - if(playerid != 0 && playerid != 1) - return 0; - uint32 countertype = lua_tointeger(L, 3); - uint32 count = lua_tointeger(L, 4); - uint32 reason = lua_tointeger(L, 5); - lua_pushboolean(L, pcard->pduel->game_field->is_player_can_remove_counter(playerid, pcard, 0, 0, countertype, count, reason)); - return 1; -} -int32 scriptlib::card_is_can_be_fusion_material(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - uint32 ign = FALSE; - if(lua_gettop(L) >= 2) - ign = lua_toboolean(L, 2); - lua_pushboolean(L, pcard->is_can_be_fusion_material(ign)); - return 1; -} -int32 scriptlib::card_is_can_be_synchro_material(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - card* scard = 0; - card* tuner = 0; - if(lua_gettop(L) >= 2) { - check_param(L, PARAM_TYPE_CARD, 2); - scard = *(card**) lua_touserdata(L, 2); - } - if(lua_gettop(L) >= 3) { - check_param(L, PARAM_TYPE_CARD, 3); - tuner = *(card**) lua_touserdata(L, 3); - } - lua_pushboolean(L, pcard->is_can_be_synchro_material(scard, tuner)); - return 1; -} -int32 scriptlib::card_is_can_be_ritual_material(lua_State *L) { - check_param_count(L, 2); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - card* scard = 0; - if(lua_gettop(L) >= 2 && !lua_isnil(L, 2)) { - check_param(L, PARAM_TYPE_CARD, 2); - scard = *(card**) lua_touserdata(L, 2); - } - lua_pushboolean(L, pcard->is_can_be_ritual_material(scard)); - return 1; -} -int32 scriptlib::card_is_can_be_xyz_material(lua_State *L) { - check_param_count(L, 2); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - card* scard = 0; - if(lua_gettop(L) >= 2 && !lua_isnil(L, 2)) { - check_param(L, PARAM_TYPE_CARD, 2); - scard = *(card**) lua_touserdata(L, 2); - } - lua_pushboolean(L, pcard->is_can_be_xyz_material(scard)); - return 1; -} -int32 scriptlib::card_check_fusion_material(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - int32 chkf = PLAYER_NONE; - group* pgroup = 0; - if(lua_gettop(L) > 1 && !lua_isnil(L, 2)) { - check_param(L, PARAM_TYPE_GROUP, 2); - pgroup = *(group**) lua_touserdata(L, 2); - } - card* cg = 0; - if(lua_gettop(L) > 2 && !lua_isnil(L, 3)) { - check_param(L, PARAM_TYPE_CARD, 3); - cg = *(card**) lua_touserdata(L, 3); - } - if(lua_gettop(L) > 3) - chkf = lua_tointeger(L, 4); - lua_pushboolean(L, pcard->fusion_check(pgroup, cg, chkf)); - return 1; -} -int32 scriptlib::card_is_immune_to_effect(lua_State *L) { - check_param_count(L, 2); - check_param(L, PARAM_TYPE_CARD, 1); - check_param(L, PARAM_TYPE_EFFECT, 2); - card* pcard = *(card**) lua_touserdata(L, 1); - effect* peffect = *(effect**) lua_touserdata(L, 2); - lua_pushboolean(L, !pcard->is_affect_by_effect(peffect)); - return 1; -} -int32 scriptlib::card_is_can_be_effect_target(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - duel* pduel = pcard->pduel; - effect* peffect = pduel->game_field->core.reason_effect; - if(lua_gettop(L) > 1) { - check_param(L, PARAM_TYPE_EFFECT, 2); - peffect = *(effect**) lua_touserdata(L, 2); - } - lua_pushboolean(L, pcard->is_capable_be_effect_target(peffect, pduel->game_field->core.reason_player)); - return 1; -} -int32 scriptlib::card_is_can_be_battle_target(lua_State *L) { - check_param_count(L, 2); - check_param(L, PARAM_TYPE_CARD, 1); - check_param(L, PARAM_TYPE_CARD, 2); - card* pcard = *(card**) lua_touserdata(L, 1); - card* bcard = *(card**) lua_touserdata(L, 2); - lua_pushboolean(L, pcard->is_capable_be_battle_target(bcard)); - return 1; -} -int32 scriptlib::card_add_trap_monster_attribute(lua_State *L) { - check_param_count(L, 7); - check_param(L, PARAM_TYPE_CARD, 1); - int32 extra_type = lua_tointeger(L, 2); - int32 attribute = lua_tointeger(L, 3); - int32 race = lua_tointeger(L, 4); - int32 level = lua_tointeger(L, 5); - int32 atk = lua_tointeger(L, 6); - int32 def = lua_tointeger(L, 7); - card* pcard = *(card**) lua_touserdata(L, 1); - duel* pduel = pcard->pduel; - //type - effect* peffect = pduel->new_effect(); - peffect->owner = pcard; - peffect->type = EFFECT_TYPE_SINGLE; - peffect->code = EFFECT_ADD_TYPE; - peffect->flag = EFFECT_FLAG_CANNOT_DISABLE; - peffect->reset_flag = RESET_EVENT + 0x47e0000; - peffect->value = TYPE_MONSTER | TYPE_TRAPMONSTER | extra_type; - pcard->add_effect(peffect); - //attribute - peffect = pduel->new_effect(); - peffect->owner = pcard; - peffect->type = EFFECT_TYPE_SINGLE; - peffect->code = EFFECT_ADD_ATTRIBUTE; - peffect->flag = EFFECT_FLAG_CANNOT_DISABLE; - peffect->reset_flag = RESET_EVENT + 0x47e0000; - peffect->value = attribute; - pcard->add_effect(peffect); - //race - peffect = pduel->new_effect(); - peffect->owner = pcard; - peffect->type = EFFECT_TYPE_SINGLE; - peffect->code = EFFECT_ADD_RACE; - peffect->flag = EFFECT_FLAG_CANNOT_DISABLE; - peffect->reset_flag = RESET_EVENT + 0x47e0000; - peffect->value = race; - pcard->add_effect(peffect); - //level - peffect = pduel->new_effect(); - peffect->owner = pcard; - peffect->type = EFFECT_TYPE_SINGLE; - peffect->code = EFFECT_CHANGE_LEVEL; - peffect->flag = EFFECT_FLAG_CANNOT_DISABLE; - peffect->reset_flag = RESET_EVENT + 0x47e0000; - peffect->value = level; - pcard->add_effect(peffect); - //atk - peffect = pduel->new_effect(); - peffect->owner = pcard; - peffect->type = EFFECT_TYPE_SINGLE; - peffect->code = EFFECT_SET_BASE_ATTACK; - peffect->flag = EFFECT_FLAG_CANNOT_DISABLE; - peffect->reset_flag = RESET_EVENT + 0x47e0000; - peffect->value = atk; - pcard->add_effect(peffect); - //def - peffect = pduel->new_effect(); - peffect->owner = pcard; - peffect->type = EFFECT_TYPE_SINGLE; - peffect->code = EFFECT_SET_BASE_DEFENCE; - peffect->flag = EFFECT_FLAG_CANNOT_DISABLE; - peffect->reset_flag = RESET_EVENT + 0x47e0000; - peffect->value = def; - pcard->add_effect(peffect); - pcard->set_status(STATUS_NO_LEVEL, FALSE); - return 0; -} -int32 scriptlib::card_trap_monster_block(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - duel* pduel = pcard->pduel; - //extra block - effect* peffect = pduel->new_effect(); - peffect->owner = pcard; - peffect->type = EFFECT_TYPE_FIELD; - peffect->range = LOCATION_MZONE; - peffect->code = EFFECT_USE_EXTRA_SZONE; - peffect->flag = EFFECT_FLAG_CANNOT_DISABLE; - peffect->reset_flag = RESET_EVENT + 0x5fe0000; - peffect->value = 1 + (0x10000 << pcard->previous.sequence); - pcard->add_effect(peffect); - return 0; -} -int32 scriptlib::card_cancel_to_grave(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - bool cancel = true; - if(lua_gettop(L) > 1) - cancel = lua_toboolean(L, 2) != 0; - if(cancel) - pcard->set_status(STATUS_LEAVE_CONFIRMED, FALSE); - else { - pcard->pduel->game_field->core.leave_confirmed.insert(pcard); - pcard->set_status(STATUS_LEAVE_CONFIRMED, TRUE); - } - return 0; -} -int32 scriptlib::card_get_tribute_requirement(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - int32 rcount = pcard->get_summon_tribute_count(); - lua_pushinteger(L, rcount & 0xffff); - lua_pushinteger(L, (rcount >> 16) & 0xffff); - return 2; -} -int32 scriptlib::card_get_battle_target(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - duel* pduel = pcard->pduel; - if(pduel->game_field->core.attacker == pcard) - interpreter::card2value(L, pduel->game_field->core.attack_target); - else if(pduel->game_field->core.attack_target == pcard) - interpreter::card2value(L, pduel->game_field->core.attacker); - else lua_pushnil(L); - return 1; -} -int32 scriptlib::card_get_attackable_target(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - duel* pduel = pcard->pduel; - field::card_vector targets; - pduel->game_field->get_attack_target(pcard, &targets); - group* newgroup = pduel->new_group(); - newgroup->container.insert(targets.begin(), targets.end()); - interpreter::group2value(L, newgroup); - lua_pushboolean(L, pcard->operation_param); - return 2; -} -int32 scriptlib::card_set_hint(lua_State *L) { - check_param_count(L, 3); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - duel* pduel = pcard->pduel; - uint32 type = lua_tointeger(L, 2); - uint32 value = lua_tointeger(L, 3); - if(type >= CHINT_DESC_ADD) - return 0; - pduel->write_buffer8(MSG_CARD_HINT); - pduel->write_buffer32(pcard->get_info_location()); - pduel->write_buffer8(type); - pduel->write_buffer32(value); - return 0; -} -int32 scriptlib::card_reverse_in_deck(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - if(pcard->current.location != LOCATION_DECK) - return 0; - pcard->current.position = POS_FACEUP_DEFENCE; - duel* pduel = pcard->pduel; - if(pcard->current.sequence == pduel->game_field->player[pcard->current.controler].list_main.size() - 1) { - pduel->write_buffer8(MSG_DECK_TOP); - pduel->write_buffer8(pcard->current.controler); - pduel->write_buffer8(0); - pduel->write_buffer32(pcard->data.code | 0x80000000); - } - return 0; -} -int32 scriptlib::card_set_unique_onfield(lua_State *L) { - check_param_count(L, 4); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - pcard->unique_pos[0] = lua_tointeger(L, 2); - pcard->unique_pos[1] = lua_tointeger(L, 3); - pcard->unique_code = lua_tointeger(L, 4); - effect* peffect = pcard->pduel->new_effect(); - peffect->owner = pcard; - peffect->type = EFFECT_TYPE_SINGLE; - peffect->code = EFFECT_UNIQUE_CHECK; - peffect->flag = EFFECT_FLAG_COPY_INHERIT; - pcard->add_effect(peffect); - pcard->unique_effect = peffect; - if(pcard->current.location & LOCATION_ONFIELD) - pcard->pduel->game_field->add_unique_card(pcard); - return 0; -} -int32 scriptlib::card_check_unique_onfield(lua_State *L) { - check_param_count(L, 2); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - uint32 check_player = lua_tointeger(L, 2); - lua_pushboolean(L, pcard->pduel->game_field->check_unique_onfield(pcard, check_player) ? 0 : 1); - return 1; -} -int32 scriptlib::card_reset_negate_effect(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - int32 count = lua_gettop(L) - 1; - for(int32 i = 0; i < count; ++i) - pcard->reset(lua_tointeger(L, i + 2), RESET_CARD); - return 0; -} -int32 scriptlib::card_assume_prop(lua_State *L) { - check_param_count(L, 3); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - pcard->assume_type = lua_tointeger(L, 2); - pcard->assume_value = lua_tointeger(L, 3); - pcard->pduel->assumes.insert(pcard); - return 0; -} -int32 scriptlib::card_set_spsummon_once(lua_State *L) { - check_param_count(L, 2); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - if(pcard->status & STATUS_COPYING_EFFECT) - return 0; - pcard->spsummon_code = lua_tointeger(L, 2); - pcard->pduel->game_field->core.global_flag |= GLOBALFLAG_SPSUMMON_ONCE; - return 0; -} diff --git a/ocgcore/libdebug.cpp b/ocgcore/libdebug.cpp deleted file mode 100644 index 9789b8118b..0000000000 --- a/ocgcore/libdebug.cpp +++ /dev/null @@ -1,166 +0,0 @@ -/* - * libdebug.cpp - * - * Created on: 2012-2-8 - * Author: Argon - */ - -#include -#include "scriptlib.h" -#include "duel.h" -#include "field.h" -#include "card.h" -#include "effect.h" -#include "ocgapi.h" - -int32 scriptlib::debug_message(lua_State *L) { - duel* pduel = interpreter::get_duel_info(L); - lua_getglobal(L, "tostring"); - lua_pushvalue(L, -2); - lua_pcall(L, 1, 1, 0); - sprintf(pduel->strbuffer, "%s", lua_tostring(L, -1)); - handle_message(pduel, 2); - return 0; -} -int32 scriptlib::debug_add_card(lua_State *L) { - check_param_count(L, 6); - duel* pduel = interpreter::get_duel_info(L); - int32 code = lua_tointeger(L, 1); - int32 owner = lua_tointeger(L, 2); - int32 playerid = lua_tointeger(L, 3); - int32 location = lua_tointeger(L, 4); - int32 sequence = lua_tointeger(L, 5); - int32 position = lua_tointeger(L, 6); - int32 proc = lua_toboolean(L, 7); - if(owner != 0 && owner != 1) - return 0; - if(playerid != 0 && playerid != 1) - return 0; - if(pduel->game_field->is_location_useable(playerid, location, sequence)) { - card* pcard = pduel->new_card(code); - pcard->owner = owner; - pduel->game_field->add_card(playerid, pcard, location, sequence); - pcard->current.position = position; - if(!(location & LOCATION_ONFIELD) || (position & POS_FACEUP)) { - pcard->enable_field_effect(TRUE); - pduel->game_field->adjust_instant(); - } - if((pcard->data.type & TYPE_PENDULUM) && (location == LOCATION_EXTRA) && (position & POS_FACEUP)) - pduel->game_field->player[playerid].extra_p_count += 1; - if(proc) - pcard->set_status(STATUS_PROC_COMPLETE, TRUE); - interpreter::card2value(L, pcard); - return 1; - } else if(location == LOCATION_MZONE) { - card* pcard = pduel->new_card(code); - pcard->owner = owner; - card* fcard = pduel->game_field->get_field_card(playerid, location, sequence); - fcard->xyz_materials.push_back(pcard); - pcard->overlay_target = fcard; - pcard->current.controler = PLAYER_NONE; - pcard->current.location = LOCATION_OVERLAY; - pcard->current.sequence = fcard->xyz_materials.size() - 1; - interpreter::card2value(L, pcard); - return 1; - } - return 0; -} -int32 scriptlib::debug_set_player_info(lua_State *L) { - check_param_count(L, 4); - duel* pduel = interpreter::get_duel_info(L); - uint32 playerid = lua_tointeger(L, 1); - uint32 lp = lua_tointeger(L, 2); - uint32 startcount = lua_tointeger(L, 3); - uint32 drawcount = lua_tointeger(L, 4); - if(playerid != 0 && playerid != 1) - return 0; - pduel->game_field->player[playerid].lp = lp; - pduel->game_field->player[playerid].start_count = startcount; - pduel->game_field->player[playerid].draw_count = drawcount; - return 0; -} -int32 scriptlib::debug_pre_equip(lua_State *L) { - check_param_count(L, 2); - check_param(L, PARAM_TYPE_CARD, 1); - check_param(L, PARAM_TYPE_CARD, 2); - card* equip_card = *(card**) lua_touserdata(L, 1); - card* target = *(card**) lua_touserdata(L, 2); - if((equip_card->current.location != LOCATION_SZONE) - || (target->current.location != LOCATION_MZONE) - || (target->current.position & POS_FACEDOWN)) - lua_pushboolean(L, 0); - else { - equip_card->equip(target, FALSE); - equip_card->effect_target_cards.insert(target); - target->effect_target_owner.insert(equip_card); - lua_pushboolean(L, 1); - } - return 1; -} -int32 scriptlib::debug_pre_set_target(lua_State *L) { - check_param_count(L, 2); - check_param(L, PARAM_TYPE_CARD, 1); - check_param(L, PARAM_TYPE_CARD, 2); - card* t_card = *(card**) lua_touserdata(L, 1); - card* target = *(card**) lua_touserdata(L, 2); - t_card->add_card_target(target); - return 0; -} -int32 scriptlib::debug_pre_add_counter(lua_State *L) { - check_param_count(L, 2); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - uint32 ctype = lua_tointeger(L, 2); - uint32 ccount = lua_tointeger(L, 3); - pcard->counters[ctype] += ccount; - return 0; -} -int32 scriptlib::debug_reload_field_begin(lua_State *L) { - check_param_count(L, 1); - duel* pduel = interpreter::get_duel_info(L); - uint32 flag = lua_tointeger(L, 1); - pduel->clear(); - pduel->game_field->core.duel_options = flag; - return 0; -} -int32 scriptlib::debug_reload_field_end(lua_State *L) { - duel* pduel = interpreter::get_duel_info(L); - pduel->game_field->core.shuffle_hand_check[0] = FALSE; - pduel->game_field->core.shuffle_hand_check[1] = FALSE; - pduel->game_field->core.shuffle_deck_check[0] = FALSE; - pduel->game_field->core.shuffle_deck_check[1] = FALSE; - pduel->game_field->reload_field_info(); - return 0; -} -int32 scriptlib::debug_set_ai_name(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_STRING, 1); - duel* pduel = interpreter::get_duel_info(L); - pduel->write_buffer8(MSG_AI_NAME); - const char* pstr = lua_tostring(L, 1); - int len = strlen(pstr); - if(len > 100) - len = 100; - pduel->write_buffer16(len); - memcpy(pduel->bufferp, pstr, len); - pduel->bufferp += len; - pduel->bufferlen += len; - pduel->write_buffer8(0); - return 0; -} -int32 scriptlib::debug_show_hint(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_STRING, 1); - duel* pduel = interpreter::get_duel_info(L); - pduel->write_buffer8(MSG_SHOW_HINT); - const char* pstr = lua_tostring(L, 1); - int len = strlen(pstr); - if(len > 1024) - len = 1024; - pduel->write_buffer16(len); - memcpy(pduel->bufferp, pstr, len); - pduel->bufferp += len; - pduel->bufferlen += len; - pduel->write_buffer8(0); - return 0; -} diff --git a/ocgcore/libduel.cpp b/ocgcore/libduel.cpp deleted file mode 100644 index eff8c88c8f..0000000000 --- a/ocgcore/libduel.cpp +++ /dev/null @@ -1,3318 +0,0 @@ -/* - * libduel.cpp - * - * Created on: 2010-5-6 - * Author: Argon - */ - -#include "scriptlib.h" -#include "duel.h" -#include "field.h" -#include "card.h" -#include "effect.h" -#include "group.h" -#include "ocgapi.h" - -int32 scriptlib::duel_enable_global_flag(lua_State *L) { - check_param_count(L, 1); - int32 flag = lua_tointeger(L, 1); - duel* pduel = interpreter::get_duel_info(L); - pduel->game_field->core.global_flag |= flag; - return 0; -} - -int32 scriptlib::duel_get_lp(lua_State *L) { - check_param_count(L, 1); - int32 p = lua_tointeger(L, 1); - if(p != 0 && p != 1) - return 0; - duel* pduel = interpreter::get_duel_info(L); - lua_pushinteger(L, pduel->game_field->player[p].lp); - return 1; -} -int32 scriptlib::duel_set_lp(lua_State *L) { - check_param_count(L, 2); - int32 p = lua_tointeger(L, 1); - int32 lp = lua_tointeger(L, 2); - if(lp < 0) lp = 0; - if(p != 0 && p != 1) - return 0; - duel* pduel = interpreter::get_duel_info(L); - pduel->game_field->player[p].lp = lp; - pduel->write_buffer8(MSG_LPUPDATE); - pduel->write_buffer8(p); - pduel->write_buffer32(lp); - return 0; -} -int32 scriptlib::duel_get_turn_player(lua_State *L) { - duel* pduel = interpreter::get_duel_info(L); - lua_pushinteger(L, pduel->game_field->infos.turn_player); - return 1; -} -int32 scriptlib::duel_get_turn_count(lua_State *L) { - duel* pduel = interpreter::get_duel_info(L); - lua_pushinteger(L, pduel->game_field->infos.turn_id); - return 1; -} -int32 scriptlib::duel_get_draw_count(lua_State *L) { - check_param_count(L, 1); - duel* pduel = interpreter::get_duel_info(L); - int32 playerid = lua_tointeger(L, 1); - if(playerid != 0 && playerid != 1) - return 0; - lua_pushinteger(L, pduel->game_field->get_draw_count(playerid)); - return 1; -} -int32 scriptlib::duel_register_effect(lua_State *L) { - check_param_count(L, 2); - check_param(L, PARAM_TYPE_EFFECT, 1); - effect* peffect = *(effect**)lua_touserdata(L, 1); - uint32 playerid = lua_tointeger(L, 2); - if(playerid != 0 && playerid != 1) - return 0; - duel* pduel = peffect->pduel; - pduel->game_field->add_effect(peffect, playerid); - return 0; -} -int32 scriptlib::duel_register_flag_effect(lua_State *L) { - check_param_count(L, 5); - int32 playerid = lua_tointeger(L, 1); - if(playerid != 0 && playerid != 1) - return 0; - int32 code = (lua_tointeger(L, 2) & 0xfffffff) | 0x10000000; - int32 reset = lua_tointeger(L, 3); - int32 flag = lua_tointeger(L, 4); - int32 count = lua_tointeger(L, 5); - if(count == 0) - count = 1; - if(reset & (RESET_PHASE) && !(reset & (RESET_SELF_TURN | RESET_OPPO_TURN))) - reset |= (RESET_SELF_TURN | RESET_OPPO_TURN); - duel* pduel = interpreter::get_duel_info(L); - effect* peffect = pduel->new_effect(); - peffect->effect_owner = playerid; - peffect->owner = pduel->game_field->temp_card; - peffect->handler = 0; - peffect->type = EFFECT_TYPE_FIELD; - peffect->code = code; - peffect->reset_flag = reset; - peffect->flag = flag | EFFECT_FLAG_CANNOT_DISABLE | EFFECT_FLAG_PLAYER_TARGET | EFFECT_FLAG_FIELD_ONLY; - peffect->s_range = 1; - peffect->o_range = 0; - peffect->reset_count |= count & 0xff; - pduel->game_field->add_effect(peffect, playerid); - interpreter::effect2value(L, peffect); - return 1; -} -int32 scriptlib::duel_get_flag_effect(lua_State *L) { - check_param_count(L, 2); - int32 playerid = lua_tointeger(L, 1); - if(playerid != 0 && playerid != 1) - return 0; - int32 code = (lua_tointeger(L, 2) & 0xfffffff) | 0x10000000; - duel* pduel = interpreter::get_duel_info(L); - effect_set eset; - pduel->game_field->filter_player_effect(playerid, code, &eset); - lua_pushinteger(L, eset.size()); - return 1; -} -int32 scriptlib::duel_reset_flag_effect(lua_State *L) { - check_param_count(L, 2); - int32 playerid = lua_tointeger(L, 1); - if(playerid != 0 && playerid != 1) - return 0; - uint32 code = (lua_tointeger(L, 2) & 0xfffffff) | 0x10000000; - duel* pduel = interpreter::get_duel_info(L); - std::pair pr; - effect* peffect; - pr = pduel->game_field->effects.aura_effect.equal_range(code); - for(; pr.first != pr.second; ) { - auto rm = pr.first++; - peffect = rm->second; - if(peffect->code == code) - pduel->game_field->remove_effect(peffect); - } - return 0; -} -int32 scriptlib::duel_destroy(lua_State *L) { - check_action_permission(L); - check_param_count(L, 2); - card* pcard = 0; - group* pgroup = 0; - duel* pduel = 0; - if(check_param(L, PARAM_TYPE_CARD, 1, TRUE)) { - pcard = *(card**) lua_touserdata(L, 1); - pduel = pcard->pduel; - } else if(check_param(L, PARAM_TYPE_GROUP, 1, TRUE)) { - pgroup = *(group**) lua_touserdata(L, 1); - pduel = pgroup->pduel; - } else - luaL_error(L, "Parameter %d should be \"Card\" or \"Group\".", 1); - uint32 reason = lua_tointeger(L, 2); - uint32 dest = LOCATION_GRAVE; - if(lua_gettop(L) >= 3) - dest = lua_tointeger(L, 3); - if(pcard) - pduel->game_field->destroy(pcard, pduel->game_field->core.reason_effect, reason, pduel->game_field->core.reason_player, PLAYER_NONE, dest, 0); - else - pduel->game_field->destroy(&(pgroup->container), pduel->game_field->core.reason_effect, reason, pduel->game_field->core.reason_player, PLAYER_NONE, dest, 0); - pduel->game_field->core.subunits.begin()->type = PROCESSOR_DESTROY_S; - return lua_yield(L, 0); -} -int32 scriptlib::duel_remove(lua_State *L) { - check_action_permission(L); - check_param_count(L, 3); - card* pcard = 0; - group* pgroup = 0; - duel* pduel = 0; - if(check_param(L, PARAM_TYPE_CARD, 1, TRUE)) { - pcard = *(card**) lua_touserdata(L, 1); - pduel = pcard->pduel; - } else if(check_param(L, PARAM_TYPE_GROUP, 1, TRUE)) { - pgroup = *(group**) lua_touserdata(L, 1); - pduel = pgroup->pduel; - } else - luaL_error(L, "Parameter %d should be \"Card\" or \"Group\".", 1); - uint32 pos = lua_tointeger(L, 2); - uint32 reason = lua_tointeger(L, 3); - if(pcard) - pduel->game_field->send_to(pcard, pduel->game_field->core.reason_effect, reason, pduel->game_field->core.reason_player, PLAYER_NONE, LOCATION_REMOVED, 0, pos); - else - pduel->game_field->send_to(&(pgroup->container), pduel->game_field->core.reason_effect, reason, pduel->game_field->core.reason_player, PLAYER_NONE, LOCATION_REMOVED, 0, pos); - pduel->game_field->core.subunits.begin()->type = PROCESSOR_SENDTO_S; - return lua_yield(L, 0); -} -int32 scriptlib::duel_sendto_grave(lua_State *L) { - check_action_permission(L); - check_param_count(L, 2); - card* pcard = 0; - group* pgroup = 0; - duel* pduel = 0; - if(check_param(L, PARAM_TYPE_CARD, 1, TRUE)) { - pcard = *(card**) lua_touserdata(L, 1); - pduel = pcard->pduel; - } else if(check_param(L, PARAM_TYPE_GROUP, 1, TRUE)) { - pgroup = *(group**) lua_touserdata(L, 1); - pduel = pgroup->pduel; - } else - luaL_error(L, "Parameter %d should be \"Card\" or \"Group\".", 1); - uint32 reason = lua_tointeger(L, 2); - if(pcard) - pduel->game_field->send_to(pcard, pduel->game_field->core.reason_effect, reason, pduel->game_field->core.reason_player, PLAYER_NONE, LOCATION_GRAVE, 0, POS_FACEUP); - else - pduel->game_field->send_to(&(pgroup->container), pduel->game_field->core.reason_effect, reason, pduel->game_field->core.reason_player, PLAYER_NONE, LOCATION_GRAVE, 0, POS_FACEUP); - pduel->game_field->core.subunits.begin()->type = PROCESSOR_SENDTO_S; - return lua_yield(L, 0); -} -int32 scriptlib::duel_summon(lua_State *L) { - check_action_permission(L); - check_param_count(L, 4); - check_param(L, PARAM_TYPE_CARD, 2); - effect* peffect = 0; - if(!lua_isnil(L, 4)) { - check_param(L, PARAM_TYPE_EFFECT, 4); - peffect = *(effect**)lua_touserdata(L, 4); - } - uint32 playerid = lua_tointeger(L, 1); - if(playerid != 0 && playerid != 1) - return 0; - card* pcard = *(card**)lua_touserdata(L, 2); - uint32 ignore_count = lua_toboolean(L, 3); - uint32 min_tribute = 0; - if(lua_gettop(L) > 4) - min_tribute = lua_tointeger(L, 5); - duel * pduel = pcard->pduel; - pduel->game_field->core.summon_cancelable = FALSE; - pduel->game_field->summon(playerid, pcard, peffect, ignore_count, min_tribute); - return lua_yield(L, 0); -} -int32 scriptlib::duel_special_summon_rule(lua_State *L) { - check_action_permission(L); - check_param_count(L, 2); - check_param(L, PARAM_TYPE_CARD, 2); - uint32 playerid = lua_tointeger(L, 1); - if(playerid != 0 && playerid != 1) - return 0; - card* pcard = *(card**)lua_touserdata(L, 2); - duel * pduel = pcard->pduel; - pduel->game_field->core.summon_cancelable = FALSE; - pduel->game_field->special_summon_rule(playerid, pcard, 0); - return lua_yield(L, 0); -} -int32 scriptlib::duel_synchro_summon(lua_State *L) { - check_action_permission(L); - check_param_count(L, 3); - check_param(L, PARAM_TYPE_CARD, 2); - uint32 playerid = lua_tointeger(L, 1); - if(playerid != 0 && playerid != 1) - return 0; - card* pcard = *(card**)lua_touserdata(L, 2); - card* tuner = 0; - if(!lua_isnil(L, 3)) { - check_param(L, PARAM_TYPE_CARD, 3); - tuner = *(card**)lua_touserdata(L, 3); - } - group* mg = 0; - if(lua_gettop(L) >= 4) { - if(!lua_isnil(L, 4)) { - check_param(L, PARAM_TYPE_GROUP, 4); - mg = *(group**) lua_touserdata(L, 4); - } - } - duel * pduel = pcard->pduel; - pduel->game_field->core.limit_tuner = tuner; - pduel->game_field->core.limit_syn = mg; - pduel->game_field->core.summon_cancelable = FALSE; - pduel->game_field->special_summon_rule(playerid, pcard, SUMMON_TYPE_SYNCHRO); - return lua_yield(L, 0); -} -int32 scriptlib::duel_xyz_summon(lua_State *L) { - check_action_permission(L); - check_param_count(L, 3); - check_param(L, PARAM_TYPE_CARD, 2); - uint32 playerid = lua_tointeger(L, 1); - if(playerid != 0 && playerid != 1) - return 0; - card* pcard = *(card**)lua_touserdata(L, 2); - group* materials = 0; - if(!lua_isnil(L, 3)) { - check_param(L, PARAM_TYPE_GROUP, 3); - materials = *(group**)lua_touserdata(L, 3); - } - duel * pduel = pcard->pduel; - pduel->game_field->core.limit_xyz = materials; - pduel->game_field->core.summon_cancelable = FALSE; - pduel->game_field->special_summon_rule(playerid, pcard, SUMMON_TYPE_XYZ); - return lua_yield(L, 0); -} -int32 scriptlib::duel_setm(lua_State *L) { - check_action_permission(L); - check_param_count(L, 4); - check_param(L, PARAM_TYPE_CARD, 2); - effect* peffect = 0; - if(!lua_isnil(L, 4)) { - check_param(L, PARAM_TYPE_EFFECT, 4); - peffect = *(effect**)lua_touserdata(L, 4); - } - uint32 playerid = lua_tointeger(L, 1); - if(playerid != 0 && playerid != 1) - return 0; - card* pcard = *(card**)lua_touserdata(L, 2); - uint32 ignore_count = lua_toboolean(L, 3); - uint32 min_tribute = 0; - if(lua_gettop(L) > 4) - min_tribute = lua_tointeger(L, 5); - duel * pduel = pcard->pduel; - pduel->game_field->core.summon_cancelable = FALSE; - pduel->game_field->add_process(PROCESSOR_MSET, 0, peffect, (group*)pcard, playerid, ignore_count + (min_tribute << 8)); - return lua_yield(L, 0); -} -int32 scriptlib::duel_sets(lua_State *L) { - check_action_permission(L); - check_param_count(L, 2); - uint32 playerid = lua_tointeger(L, 1); - if(playerid != 0 && playerid != 1) - return 0; - uint32 toplayer = playerid; - if(lua_gettop(L) > 2) - toplayer = lua_tointeger(L, 3); - if(toplayer != 0 && toplayer != 1) - toplayer = playerid; - card* pcard = 0; - group* pgroup = 0; - duel* pduel = 0; - if(check_param(L, PARAM_TYPE_CARD, 2, TRUE)) { - pcard = *(card**) lua_touserdata(L, 2); - pduel = pcard->pduel; - } else if(check_param(L, PARAM_TYPE_GROUP, 2, TRUE)) { - pgroup = *(group**) lua_touserdata(L, 2); - pduel = pgroup->pduel; - } else - luaL_error(L, "Parameter %d should be \"Card\" or \"Group\".", 2); - if(pcard) - pduel->game_field->add_process(PROCESSOR_SSET, 0, 0, (group*)pcard, playerid, toplayer); - else - pduel->game_field->add_process(PROCESSOR_SSET_G, 0, 0, pgroup, playerid, toplayer); - return lua_yield(L, 0); -} -int32 scriptlib::duel_create_token(lua_State *L) { - check_action_permission(L); - check_param_count(L, 2); - int32 playerid = lua_tointeger(L, 1); - int32 code = lua_tointeger(L, 2); - if(playerid != 0 && playerid != 1) { - lua_pushboolean(L, 0); - return 1; - } - duel* pduel = interpreter::get_duel_info(L); - card* pcard = pduel->new_card(code); - pcard->owner = playerid; - pcard->current.location = 0; - pcard->current.controler = playerid; - interpreter::card2value(L, pcard); - return 1; -} -int32 scriptlib::duel_special_summon(lua_State *L) { - check_action_permission(L); - check_param_count(L, 7); - card* pcard = 0; - group* pgroup = 0; - duel* pduel = 0; - if(check_param(L, PARAM_TYPE_CARD, 1, TRUE)) { - pcard = *(card**) lua_touserdata(L, 1); - pduel = pcard->pduel; - } else if(check_param(L, PARAM_TYPE_GROUP, 1, TRUE)) { - pgroup = *(group**) lua_touserdata(L, 1); - pduel = pgroup->pduel; - } else - luaL_error(L, "Parameter %d should be \"Card\" or \"Group\".", 1); - uint32 sumtype = lua_tointeger(L, 2); - uint32 sumplayer = lua_tointeger(L, 3); - uint32 playerid = lua_tointeger(L, 4); - uint32 nocheck = lua_toboolean(L, 5); - uint32 nolimit = lua_toboolean(L, 6); - uint32 positions = lua_tointeger(L, 7); - if(pcard) { - field::card_set cset; - cset.insert(pcard); - pduel->game_field->special_summon(&cset, sumtype, sumplayer, playerid, nocheck, nolimit, positions); - } else - pduel->game_field->special_summon(&(pgroup->container), sumtype, sumplayer, playerid, nocheck, nolimit, positions); - pduel->game_field->core.subunits.begin()->type = PROCESSOR_SPSUMMON_S; - return lua_yield(L, 0); -} -int32 scriptlib::duel_special_summon_step(lua_State *L) { - check_action_permission(L); - check_param_count(L, 7); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - duel* pduel = pcard->pduel; - uint32 sumtype = lua_tointeger(L, 2); - uint32 sumplayer = lua_tointeger(L, 3); - uint32 playerid = lua_tointeger(L, 4); - uint32 nocheck = lua_toboolean(L, 5); - uint32 nolimit = lua_toboolean(L, 6); - uint32 positions = lua_tointeger(L, 7); - pduel->game_field->special_summon_step(pcard, sumtype, sumplayer, playerid, nocheck, nolimit, positions); - pduel->game_field->core.subunits.begin()->type = PROCESSOR_SPSUMMON_STEP_S; - return lua_yield(L, 0); -} -int32 scriptlib::duel_special_summon_complete(lua_State *L) { - check_action_permission(L); - duel* pduel = interpreter::get_duel_info(L); - pduel->game_field->special_summon_complete(pduel->game_field->core.reason_effect, pduel->game_field->core.reason_player); - return lua_yield(L, 0); -} -int32 scriptlib::duel_sendto_hand(lua_State *L) { - check_action_permission(L); - check_param_count(L, 3); - card* pcard = 0; - group* pgroup = 0; - duel* pduel = 0; - if(check_param(L, PARAM_TYPE_CARD, 1, TRUE)) { - pcard = *(card**) lua_touserdata(L, 1); - pduel = pcard->pduel; - } else if(check_param(L, PARAM_TYPE_GROUP, 1, TRUE)) { - pgroup = *(group**) lua_touserdata(L, 1); - pduel = pgroup->pduel; - } else - luaL_error(L, "Parameter %d should be \"Card\" or \"Group\".", 1); - uint32 playerid = lua_tointeger(L, 2); - if(lua_isnil(L, 2) || (playerid != 0 && playerid != 1)) - playerid = PLAYER_NONE; - uint32 reason = lua_tointeger(L, 3); - if(pcard) - pduel->game_field->send_to(pcard, pduel->game_field->core.reason_effect, reason, pduel->game_field->core.reason_player, playerid, LOCATION_HAND, 0, POS_FACEUP); - else - pduel->game_field->send_to(&(pgroup->container), pduel->game_field->core.reason_effect, reason, pduel->game_field->core.reason_player, playerid, LOCATION_HAND, 0, POS_FACEUP); - pduel->game_field->core.subunits.begin()->type = PROCESSOR_SENDTO_S; - return lua_yield(L, 0); -} -int32 scriptlib::duel_sendto_deck(lua_State *L) { - check_action_permission(L); - check_param_count(L, 4); - card* pcard = 0; - group* pgroup = 0; - duel* pduel = 0; - if(check_param(L, PARAM_TYPE_CARD, 1, TRUE)) { - pcard = *(card**) lua_touserdata(L, 1); - pduel = pcard->pduel; - } else if(check_param(L, PARAM_TYPE_GROUP, 1, TRUE)) { - pgroup = *(group**) lua_touserdata(L, 1); - pduel = pgroup->pduel; - } else - luaL_error(L, "Parameter %d should be \"Card\" or \"Group\".", 1); - uint32 playerid = lua_tointeger(L, 2); - if(lua_isnil(L, 2) || (playerid != 0 && playerid != 1)) - playerid = PLAYER_NONE; - uint32 sequence = lua_tointeger(L, 3); - uint32 reason = lua_tointeger(L, 4); - if(pcard) - pduel->game_field->send_to(pcard, pduel->game_field->core.reason_effect, reason, pduel->game_field->core.reason_player, playerid, LOCATION_DECK, sequence, POS_FACEUP); - else - pduel->game_field->send_to(&(pgroup->container), pduel->game_field->core.reason_effect, reason, pduel->game_field->core.reason_player, playerid, LOCATION_DECK, sequence, POS_FACEUP); - pduel->game_field->core.subunits.begin()->type = PROCESSOR_SENDTO_S; - return lua_yield(L, 0); -} -int32 scriptlib::duel_get_operated_group(lua_State *L) { - duel* pduel = interpreter::get_duel_info(L); - group* pgroup = pduel->new_group(pduel->game_field->core.operated_set); - interpreter::group2value(L, pgroup); - return 1; -} -int32 scriptlib::duel_remove_counter(lua_State *L) { - check_action_permission(L); - check_param_count(L, 6); - uint32 rplayer = lua_tointeger(L, 1); - if(rplayer != 0 && rplayer != 1) - return 0; - uint32 s = lua_tointeger(L, 2); - uint32 o = lua_tointeger(L, 3); - uint32 countertype = lua_tointeger(L, 4); - uint32 count = lua_tointeger(L, 5); - uint32 reason = lua_tointeger(L, 6); - duel* pduel = interpreter::get_duel_info(L); - pduel->game_field->remove_counter(reason, 0, rplayer, s, o, countertype, count); - return lua_yield(L, 0); -} -int32 scriptlib::duel_is_can_remove_counter(lua_State *L) { - check_param_count(L, 6); - uint32 rplayer = lua_tointeger(L, 1); - if(rplayer != 0 && rplayer != 1) - return 0; - uint32 s = lua_tointeger(L, 2); - uint32 o = lua_tointeger(L, 3); - uint32 countertype = lua_tointeger(L, 4); - uint32 count = lua_tointeger(L, 5); - uint32 reason = lua_tointeger(L, 6); - duel* pduel = interpreter::get_duel_info(L); - lua_pushboolean(L, pduel->game_field->is_player_can_remove_counter(rplayer, 0, s, o, countertype, count, reason)); - return 1; -} -int32 scriptlib::duel_get_counter(lua_State *L) { - check_param_count(L, 4); - uint32 playerid = lua_tointeger(L, 1); - if(playerid != 0 && playerid != 1) - return 0; - uint32 s = lua_tointeger(L, 2); - uint32 o = lua_tointeger(L, 3); - uint32 countertype = lua_tointeger(L, 4); - duel* pduel = interpreter::get_duel_info(L); - lua_pushinteger(L, pduel->game_field->get_field_counter(playerid, s, o, countertype)); - return 1; -} -int32 scriptlib::duel_change_form(lua_State *L) { - check_action_permission(L); - check_param_count(L, 2); - card* pcard = 0; - group* pgroup = 0; - duel* pduel = 0; - if(check_param(L, PARAM_TYPE_CARD, 1, TRUE)) { - pcard = *(card**) lua_touserdata(L, 1); - pduel = pcard->pduel; - } else if(check_param(L, PARAM_TYPE_GROUP, 1, TRUE)) { - pgroup = *(group**) lua_touserdata(L, 1); - pduel = pgroup->pduel; - } else - luaL_error(L, "Parameter %d should be \"Card\" or \"Group\".", 1); - uint32 au = lua_tointeger(L, 2); - uint32 ad = au, du = au, dd = au, noflip = 0; - uint32 top = lua_gettop(L); - if(top > 2) ad = lua_tointeger(L, 3); - if(top > 3) du = lua_tointeger(L, 4); - if(top > 4) dd = lua_tointeger(L, 5); - if(top > 5) noflip = lua_toboolean(L, 6); - if(pcard) { - field::card_set cset; - cset.insert(pcard); - pduel->game_field->change_position(&cset, pduel->game_field->core.reason_effect, pduel->game_field->core.reason_player, au, ad, du, dd, noflip, TRUE); - } else - pduel->game_field->change_position(&(pgroup->container), pduel->game_field->core.reason_effect, pduel->game_field->core.reason_player, au, ad, du, dd, noflip, TRUE); - pduel->game_field->core.subunits.begin()->type = PROCESSOR_CHANGEPOS_S; - return lua_yield(L, 0); -} -int32 scriptlib::duel_release(lua_State *L) { - check_action_permission(L); - check_param_count(L, 2); - card* pcard = 0; - group* pgroup = 0; - duel* pduel = 0; - if(check_param(L, PARAM_TYPE_CARD, 1, TRUE)) { - pcard = *(card**) lua_touserdata(L, 1); - pduel = pcard->pduel; - } else if(check_param(L, PARAM_TYPE_GROUP, 1, TRUE)) { - pgroup = *(group**) lua_touserdata(L, 1); - pduel = pgroup->pduel; - } else - luaL_error(L, "Parameter %d should be \"Card\" or \"Group\".", 1); - uint32 reason = lua_tointeger(L, 2); - if(pcard) - pduel->game_field->release(pcard, pduel->game_field->core.reason_effect, reason, pduel->game_field->core.reason_player); - else - pduel->game_field->release(&(pgroup->container), pduel->game_field->core.reason_effect, reason, pduel->game_field->core.reason_player); - pduel->game_field->core.subunits.begin()->type = PROCESSOR_RELEASE_S; - return lua_yield(L, 0); -} -int32 scriptlib::duel_move_to_field(lua_State *L) { - check_action_permission(L); - check_param_count(L, 6); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - uint32 move_player = lua_tointeger(L, 2); - uint32 playerid = lua_tointeger(L, 3); - if(playerid != 0 && playerid != 1) - return 0; - uint32 destination = lua_tointeger(L, 4); - uint32 positions = lua_tointeger(L, 5); - uint32 enable = lua_toboolean(L, 6); - duel* pduel = pcard->pduel; - pcard->enable_field_effect(FALSE); - pduel->game_field->adjust_instant(); - pduel->game_field->move_to_field(pcard, move_player, playerid, destination, positions, enable); - pduel->game_field->core.subunits.begin()->type = PROCESSOR_MOVETOFIELD_S; - return lua_yield(L, 0); -} -int32 scriptlib::duel_return_to_field(lua_State *L) { - check_action_permission(L); - check_param_count(L, 1); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - if(!(pcard->current.reason & REASON_TEMPORARY)) - return 0; - int32 pos = pcard->previous.position; - if(lua_gettop(L) > 1) - pos = lua_tointeger(L, 2); - duel* pduel = pcard->pduel; - pcard->enable_field_effect(FALSE); - pduel->game_field->adjust_instant(); - pduel->game_field->refresh_location_info_instant(); - pduel->game_field->move_to_field(pcard, pcard->previous.controler, pcard->previous.controler, pcard->previous.location, pos, TRUE, 1); - pduel->game_field->core.subunits.begin()->type = PROCESSOR_MOVETOFIELD_S; - return lua_yield(L, 0); -} -int32 scriptlib::duel_move_sequence(lua_State *L) { - check_param_count(L, 2); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - int32 seq = lua_tointeger(L, 2); - duel* pduel = pcard->pduel; - pduel->game_field->move_card(pcard->current.controler, pcard, pcard->current.location, seq); - return 0; -} -int32 scriptlib::duel_set_chain_limit(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_FUNCTION, 1); - duel* pduel = interpreter::get_duel_info(L); - if(pduel->game_field->core.chain_limit) - luaL_unref(L, LUA_REGISTRYINDEX, pduel->game_field->core.chain_limit); - int32 f = interpreter::get_function_handle(L, 1); - pduel->game_field->core.chain_limit = f; - pduel->game_field->core.chain_limp = pduel->game_field->core.reason_player; - return 0; -} -int32 scriptlib::duel_set_chain_limit_p(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_FUNCTION, 1); - duel* pduel = interpreter::get_duel_info(L); - if(pduel->game_field->core.chain_limit_p) - luaL_unref(L, LUA_REGISTRYINDEX, pduel->game_field->core.chain_limit_p); - int32 f = interpreter::get_function_handle(L, 1); - pduel->game_field->core.chain_limit_p = f; - pduel->game_field->core.chain_limp_p = pduel->game_field->core.reason_player; - return 0; -} -int32 scriptlib::duel_get_chain_material(lua_State *L) { - check_param_count(L, 1); - int32 playerid = lua_tointeger(L, 1); - if(playerid != 0 && playerid != 1) - return 0; - duel* pduel = interpreter::get_duel_info(L); - effect_set eset; - pduel->game_field->filter_player_effect(playerid, EFFECT_CHAIN_MATERIAL, &eset); - if(!eset.size()) - return 0; - interpreter::effect2value(L, eset[0]); - return 1; -} -int32 scriptlib::duel_confirm_decktop(lua_State *L) { - check_param_count(L, 2); - int32 playerid = lua_tointeger(L, 1); - if(playerid != 0 && playerid != 1) - return 0; - uint32 count = lua_tointeger(L, 2); - duel* pduel = interpreter::get_duel_info(L); - if(count >= pduel->game_field->player[playerid].list_main.size()) - count = pduel->game_field->player[playerid].list_main.size(); - else if(pduel->game_field->player[playerid].list_main.size() > count) { - if(pduel->game_field->core.global_flag & GLOBALFLAG_DECK_REVERSE_CHECK) { - card* pcard = *(pduel->game_field->player[playerid].list_main.rbegin() + count); - if(pduel->game_field->core.deck_reversed) { - pduel->write_buffer8(MSG_DECK_TOP); - pduel->write_buffer8(playerid); - pduel->write_buffer8(count); - if(pcard->current.position != POS_FACEUP_DEFENCE) - pduel->write_buffer32(pcard->data.code); - else - pduel->write_buffer32(pcard->data.code | 0x80000000); - } - } - } - auto cit = pduel->game_field->player[playerid].list_main.rbegin(); - pduel->write_buffer8(MSG_CONFIRM_DECKTOP); - pduel->write_buffer8(playerid); - pduel->write_buffer8(count); - for(uint32 i = 0; i < count && cit != pduel->game_field->player[playerid].list_main.rend(); ++i, ++cit) { - pduel->write_buffer32((*cit)->data.code); - pduel->write_buffer8((*cit)->current.controler); - pduel->write_buffer8((*cit)->current.location); - pduel->write_buffer8((*cit)->current.sequence); - } - pduel->game_field->add_process(PROCESSOR_WAIT, 0, 0, 0, 0, 0); - return lua_yield(L, 0); -} -int32 scriptlib::duel_confirm_cards(lua_State *L) { - check_param_count(L, 2); - int32 playerid = lua_tointeger(L, 1); - if(playerid != 0 && playerid != 1) - return 0; - card* pcard = 0; - group* pgroup = 0; - duel* pduel = 0; - if(check_param(L, PARAM_TYPE_CARD, 2, TRUE)) { - pcard = *(card**) lua_touserdata(L, 2); - pduel = pcard->pduel; - } else if(check_param(L, PARAM_TYPE_GROUP, 2, TRUE)) { - pgroup = *(group**) lua_touserdata(L, 2); - if(pgroup->container.size() == 0) - return 0; - pduel = pgroup->pduel; - } else - luaL_error(L, "Parameter %d should be \"Card\" or \"Group\".", 2); - pduel->write_buffer8(MSG_CONFIRM_CARDS); - pduel->write_buffer8(playerid); - if(pcard) { - pduel->write_buffer8(1); - pduel->write_buffer32(pcard->data.code); - pduel->write_buffer8(pcard->current.controler); - pduel->write_buffer8(pcard->current.location); - pduel->write_buffer8(pcard->current.sequence); - } else { - pduel->write_buffer8(pgroup->container.size()); - for(auto cit = pgroup->container.begin(); cit != pgroup->container.end(); ++cit) { - pduel->write_buffer32((*cit)->data.code); - pduel->write_buffer8((*cit)->current.controler); - pduel->write_buffer8((*cit)->current.location); - pduel->write_buffer8((*cit)->current.sequence); - } - } - pduel->game_field->add_process(PROCESSOR_WAIT, 0, 0, 0, 0, 0); - return lua_yield(L, 0); -} -int32 scriptlib::duel_sort_decktop(lua_State *L) { - check_action_permission(L); - check_param_count(L, 3); - uint32 sort_player = lua_tointeger(L, 1); - uint32 target_player = lua_tointeger(L, 2); - uint32 count = lua_tointeger(L, 3); - if(sort_player != 0 && sort_player != 1) - return 0; - if(target_player != 0 && target_player != 1) - return 0; - if(count < 1 || count > 16) - return 0; - duel* pduel = interpreter::get_duel_info(L); - pduel->game_field->add_process(PROCESSOR_SORT_DECK_S, 0, 0, 0, sort_player + (target_player << 16), count); - return lua_yield(L, 0); -} -int32 scriptlib::duel_check_event(lua_State *L) { - check_param_count(L, 1); - duel* pduel = interpreter::get_duel_info(L); - int32 ev = lua_tointeger(L, 1); - int32 get_info = lua_toboolean(L, 2); - if(!get_info) { - lua_pushboolean(L, pduel->game_field->check_event(ev)); - return 1; - } else { - tevent pe; - if(pduel->game_field->check_event(ev, &pe)) { - lua_pushboolean(L, 1); - interpreter::group2value(L, pe.event_cards); - lua_pushinteger(L, pe.event_player); - lua_pushinteger(L, pe.event_value); - interpreter::effect2value(L, pe.reason_effect); - lua_pushinteger(L, pe.reason); - lua_pushinteger(L, pe.reason_player); - return 7; - } else { - lua_pushboolean(L, 0); - return 1; - } - } -} -int32 scriptlib::duel_raise_event(lua_State *L) { - check_action_permission(L); - check_param_count(L, 7); - card* pcard = 0; - group* pgroup = 0; - duel* pduel; - if(check_param(L, PARAM_TYPE_CARD, 1, TRUE)) { - pcard = *(card**) lua_touserdata(L, 1); - pduel = pcard->pduel; - } else if(check_param(L, PARAM_TYPE_GROUP, 1, TRUE)) { - pgroup = *(group**) lua_touserdata(L, 1); - pduel = pgroup->pduel; - } else - return luaL_error(L, "Parameter %d should be \"Card\" or \"Group\".", 1); - check_param(L, PARAM_TYPE_EFFECT, 3); - uint32 code = lua_tointeger(L, 2); - effect* peffect = *(effect**) lua_touserdata(L, 3); - uint32 r = lua_tointeger(L, 4); - uint32 rp = lua_tointeger(L, 5); - uint32 ep = lua_tointeger(L, 6); - uint32 ev = lua_tointeger(L, 7); - if(pcard) - pduel->game_field->raise_event(pcard, code, peffect, r, rp, ep, ev); - else - pduel->game_field->raise_event(&pgroup->container, code, peffect, r, rp, ep, ev); - pduel->game_field->process_instant_event(); - return lua_yield(L, 0); -} -int32 scriptlib::duel_raise_single_event(lua_State *L) { - check_action_permission(L); - check_param_count(L, 7); - check_param(L, PARAM_TYPE_CARD, 1); - check_param(L, PARAM_TYPE_EFFECT, 3); - card* pcard = *(card**) lua_touserdata(L, 1); - uint32 code = lua_tointeger(L, 2); - effect* peffect = *(effect**) lua_touserdata(L, 3); - uint32 r = lua_tointeger(L, 4); - uint32 rp = lua_tointeger(L, 5); - uint32 ep = lua_tointeger(L, 6); - uint32 ev = lua_tointeger(L, 7); - duel* pduel = pcard->pduel; - pduel->game_field->raise_single_event(pcard, 0, code, peffect, r, rp, ep, ev); - pduel->game_field->process_single_event(); - return lua_yield(L, 0); -} -int32 scriptlib::duel_check_timing(lua_State *L) { - check_param_count(L, 1); - duel* pduel = interpreter::get_duel_info(L); - int32 tm = lua_tointeger(L, 1); - lua_pushboolean(L, (pduel->game_field->core.hint_timing[0]&tm) || (pduel->game_field->core.hint_timing[1]&tm)); - return 1; -} -int32 scriptlib::duel_get_environment(lua_State *L) { - duel* pduel = interpreter::get_duel_info(L); - effect_set eset; - card* pcard = pduel->game_field->player[0].list_szone[5]; - int32 code = 0; - int32 p = 2; - if(pcard == 0 || pcard->is_position(POS_FACEDOWN) || !pcard->get_status(STATUS_EFFECT_ENABLED)) - pcard = pduel->game_field->player[1].list_szone[5]; - if(pcard == 0 || pcard->is_position(POS_FACEDOWN) || !pcard->get_status(STATUS_EFFECT_ENABLED)) { - pduel->game_field->filter_field_effect(EFFECT_CHANGE_ENVIRONMENT, &eset); - if(eset.size()) { - effect* peffect = eset.get_last(); - code = peffect->get_value(); - p = peffect->get_handler_player(); - } - } else { - code = pcard->get_code(); - p = pcard->current.controler; - } - lua_pushinteger(L, code); - lua_pushinteger(L, p); - return 2; -} -int32 scriptlib::duel_is_environment(lua_State *L) { - check_param_count(L, 1); - uint32 code = lua_tointeger(L, 1); - uint32 playerid = PLAYER_ALL; - if(lua_gettop(L) >= 2) - playerid = lua_tointeger(L, 2); - if(playerid != 0 && playerid != 1 && playerid != PLAYER_ALL) - return 0; - duel* pduel = interpreter::get_duel_info(L); - int32 ret = 0, fc = 0; - card* pcard = pduel->game_field->player[0].list_szone[5]; - if(pcard && pcard->is_position(POS_FACEUP) && pcard->get_status(STATUS_EFFECT_ENABLED)) { - fc = 1; - if(code == pcard->get_code() && (playerid == 0 || playerid == PLAYER_ALL)) - ret = 1; - } - pcard = pduel->game_field->player[1].list_szone[5]; - if(pcard && pcard->is_position(POS_FACEUP) && pcard->get_status(STATUS_EFFECT_ENABLED)) { - fc = 1; - if(code == pcard->get_code() && (playerid == 1 || playerid == PLAYER_ALL)) - ret = 1; - } - if(!fc) { - effect_set eset; - pduel->game_field->filter_field_effect(EFFECT_CHANGE_ENVIRONMENT, &eset); - if(eset.size()) { - effect* peffect = eset.get_last(); - if(code == (uint32)peffect->get_value() && (playerid == peffect->get_handler_player() || playerid == PLAYER_ALL)) - ret = 1; - } - } - lua_pushboolean(L, ret); - return 1; -} -int32 scriptlib::duel_win(lua_State *L) { - check_param_count(L, 2); - uint32 playerid = lua_tointeger(L, 1); - uint32 reason = lua_tointeger(L, 2); - if(playerid != 0 && playerid != 1 && playerid != 2) - return 0; - duel* pduel = interpreter::get_duel_info(L); - if(pduel->game_field->core.win_player == 5) { - pduel->game_field->core.win_player = playerid; - pduel->game_field->core.win_reason = reason; - } - return 0; -} -int32 scriptlib::duel_draw(lua_State *L) { - check_action_permission(L); - check_param_count(L, 3); - uint32 playerid = lua_tointeger(L, 1); - if(playerid != 0 && playerid != 1) - return 0; - uint32 count = lua_tointeger(L, 2); - uint32 reason = lua_tointeger(L, 3); - duel* pduel = interpreter::get_duel_info(L); - pduel->game_field->draw(pduel->game_field->core.reason_effect, reason, pduel->game_field->core.reason_player, playerid, count); - pduel->game_field->core.subunits.begin()->type = PROCESSOR_DRAW_S; - return lua_yield(L, 0); -} -int32 scriptlib::duel_damage(lua_State *L) { - check_action_permission(L); - check_param_count(L, 3); - uint32 playerid = lua_tointeger(L, 1); - if(playerid != 0 && playerid != 1) - return 0; - int32 amount = lua_tointeger(L, 2); - if(amount < 0) - amount = 0; - uint32 reason = lua_tointeger(L, 3); - duel* pduel = interpreter::get_duel_info(L); - pduel->game_field->damage(pduel->game_field->core.reason_effect, reason, pduel->game_field->core.reason_player, 0, playerid, amount); - pduel->game_field->core.subunits.begin()->type = PROCESSOR_DAMAGE_S; - return lua_yield(L, 0); -} -int32 scriptlib::duel_recover(lua_State *L) { - check_action_permission(L); - check_param_count(L, 3); - uint32 playerid = lua_tointeger(L, 1); - if(playerid != 0 && playerid != 1) - return 0; - int32 amount = lua_tointeger(L, 2); - if(amount < 0) - amount = 0; - uint32 reason = lua_tointeger(L, 3); - duel* pduel = interpreter::get_duel_info(L); - pduel->game_field->recover(pduel->game_field->core.reason_effect, reason, pduel->game_field->core.reason_player, playerid, amount); - pduel->game_field->core.subunits.begin()->type = PROCESSOR_RECOVER_S; - return lua_yield(L, 0); -} -int32 scriptlib::duel_equip(lua_State *L) { - check_action_permission(L); - check_param_count(L, 3); - check_param(L, PARAM_TYPE_CARD, 2); - check_param(L, PARAM_TYPE_CARD, 3); - uint32 playerid = lua_tointeger(L, 1); - if(playerid != 0 && playerid != 1) - return 0; - card* equip_card = *(card**) lua_touserdata(L, 2); - card* target = *(card**) lua_touserdata(L, 3); - uint32 up = TRUE; - if(lua_gettop(L) > 3) - up = lua_toboolean(L, 4); - uint32 step = FALSE; - if(lua_gettop(L) > 4) - step = lua_toboolean(L, 5); - duel* pduel = target->pduel; - pduel->game_field->equip(playerid, equip_card, target, up, step); - pduel->game_field->core.subunits.begin()->type = PROCESSOR_EQUIP_S; - return lua_yield(L, 0); -} -int32 scriptlib::duel_equip_complete(lua_State *L) { - duel* pduel = interpreter::get_duel_info(L); - field::card_set etargets; - for(auto cit = pduel->game_field->core.equiping_cards.begin(); cit != pduel->game_field->core.equiping_cards.end(); ++cit) { - card* equip_card = *cit; - if(equip_card->is_position(POS_FACEUP)) - equip_card->enable_field_effect(TRUE); - etargets.insert(equip_card->equiping_target); - } - pduel->game_field->adjust_instant(); - for(auto cit = etargets.begin(); cit != etargets.end(); ++cit) - pduel->game_field->raise_single_event(*cit, &pduel->game_field->core.equiping_cards, EVENT_EQUIP, - pduel->game_field->core.reason_effect, 0, pduel->game_field->core.reason_player, PLAYER_NONE, 0); - pduel->game_field->raise_event(&pduel->game_field->core.equiping_cards, EVENT_EQUIP, - pduel->game_field->core.reason_effect, 0, pduel->game_field->core.reason_player, PLAYER_NONE, 0); - pduel->game_field->core.hint_timing[0] |= TIMING_EQUIP; - pduel->game_field->core.hint_timing[1] |= TIMING_EQUIP; - pduel->game_field->process_single_event(); - pduel->game_field->process_instant_event(); - return lua_yield(L, 0); -} -int32 scriptlib::duel_get_control(lua_State *L) { - check_action_permission(L); - check_param_count(L, 2); - check_param(L, PARAM_TYPE_CARD, 1); - card* target = *(card**) lua_touserdata(L, 1); - uint32 playerid = lua_tointeger(L, 2); - if(playerid != 0 && playerid != 1) - return 0; - uint32 reset_phase = 0; - uint32 reset_count = 0; - if(lua_gettop(L) > 2) { - reset_phase = lua_tointeger(L, 3) & 0x3ff; - reset_count = lua_tointeger(L, 4) & 0xff; - } - duel* pduel = target->pduel; - pduel->game_field->get_control(pduel->game_field->core.reason_effect, pduel->game_field->core.reason_player, target, playerid, reset_phase, reset_count); - pduel->game_field->core.subunits.begin()->type = PROCESSOR_GET_CONTROL_S; - return lua_yield(L, 0); -} -int32 scriptlib::duel_swap_control(lua_State *L) { - check_action_permission(L); - check_param_count(L, 2); - check_param(L, PARAM_TYPE_CARD, 1); - check_param(L, PARAM_TYPE_CARD, 2); - card* pcard1 = *(card**) lua_touserdata(L, 1); - card* pcard2 = *(card**) lua_touserdata(L, 2); - uint32 reset_phase = 0; - uint32 reset_count = 0; - if(lua_gettop(L) > 2) { - reset_phase = lua_tointeger(L, 3) & 0x3ff; - reset_count = lua_tointeger(L, 4) & 0xff; - } - duel* pduel = pcard1->pduel; - pduel->game_field->swap_control(pduel->game_field->core.reason_effect, pduel->game_field->core.reason_player, pcard1, pcard2, reset_phase, reset_count); - pduel->game_field->core.subunits.begin()->type = PROCESSOR_SWAP_CONTROL_S; - return lua_yield(L, 0); -} -int32 scriptlib::duel_check_lp_cost(lua_State *L) { - check_param_count(L, 2); - uint32 playerid = lua_tointeger(L, 1); - if(playerid != 0 && playerid != 1) - return 0; - uint32 cost = lua_tointeger(L, 2); - duel* pduel = interpreter::get_duel_info(L); - lua_pushboolean(L, pduel->game_field->check_lp_cost(playerid, cost)); - return 1; -} -int32 scriptlib::duel_pay_lp_cost(lua_State *L) { - check_action_permission(L); - check_param_count(L, 2); - uint32 playerid = lua_tointeger(L, 1); - if(playerid != 0 && playerid != 1) - return 0; - uint32 cost = lua_tointeger(L, 2); - duel* pduel = interpreter::get_duel_info(L); - pduel->game_field->add_process(PROCESSOR_PAY_LPCOST, 0, 0, 0, playerid, cost); - return lua_yield(L, 0); -} -int32 scriptlib::duel_discard_deck(lua_State *L) { - check_action_permission(L); - check_param_count(L, 3); - uint32 playerid = lua_tointeger(L, 1); - uint32 count = lua_tointeger(L, 2); - uint32 reason = lua_tointeger(L, 3); - duel* pduel = interpreter::get_duel_info(L); - pduel->game_field->add_process(PROCESSOR_DISCARD_DECK_S, 0, 0, 0, playerid + (count << 16), reason); - return lua_yield(L, 0); -} -int32 scriptlib::duel_discard_hand(lua_State *L) { - check_action_permission(L); - check_param_count(L, 5); - if(!lua_isnil(L, 2)) - check_param(L, PARAM_TYPE_FUNCTION, 2); - card* pexception = 0; - uint32 extraargs = 0; - if(lua_gettop(L) >= 6) { - if(!lua_isnil(L, 6)) { - check_param(L, PARAM_TYPE_CARD, 6); - pexception = *(card**) lua_touserdata(L, 6); - } - extraargs = lua_gettop(L) - 6; - } - duel* pduel = interpreter::get_duel_info(L); - uint32 playerid = lua_tointeger(L, 1); - uint32 min = lua_tointeger(L, 3); - uint32 max = lua_tointeger(L, 4); - uint32 reason = lua_tointeger(L, 5); - group* pgroup = pduel->new_group(); - pduel->game_field->filter_matching_card(2, playerid, LOCATION_HAND, 0, pgroup, pexception, extraargs); - pduel->game_field->core.select_cards.assign(pgroup->container.begin(), pgroup->container.end()); - if(pduel->game_field->core.select_cards.size() == 0) { - lua_pushinteger(L, 0); - return 1; - } - pduel->game_field->add_process(PROCESSOR_DISCARD_HAND_S, 0, 0, (group*)(size_t)reason, playerid, min + (max << 16)); - return lua_yield(L, 0); -} -int32 scriptlib::duel_disable_shuffle_check(lua_State *L) { - duel* pduel = interpreter::get_duel_info(L); - uint8 disable = TRUE; - if(lua_gettop(L) > 0) - disable = lua_toboolean(L, 1); - pduel->game_field->core.shuffle_check_disabled = disable; - return 0; -} -int32 scriptlib::duel_shuffle_deck(lua_State *L) { - check_param_count(L, 1); - uint32 playerid = lua_tointeger(L, 1); - if(playerid != 0 && playerid != 1) - return 0; - duel* pduel = interpreter::get_duel_info(L); - pduel->game_field->shuffle(playerid, LOCATION_DECK); - return 0; -} -int32 scriptlib::duel_shuffle_hand(lua_State *L) { - check_param_count(L, 1); - uint32 playerid = lua_tointeger(L, 1); - if(playerid != 0 && playerid != 1) - return 0; - duel* pduel = interpreter::get_duel_info(L); - pduel->game_field->shuffle(playerid, LOCATION_HAND); - return 0; -} -int32 scriptlib::duel_shuffle_setcard(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_GROUP, 1); - group* pgroup = *(group**)lua_touserdata(L, 1); - if(pgroup->container.size() <= 1) - return 0; - duel* pduel = pgroup->pduel; - group::card_set::iterator cit, rm; - card* ms[5]; - uint8 seq[5]; - uint8 tp = 2; - uint8 ct = 0; - card* pcard = 0; - for(cit = pgroup->container.begin(); cit != pgroup->container.end();) { - rm = cit++; - pcard = *rm; - if(pcard->current.location != LOCATION_MZONE || (pcard->current.position & POS_FACEUP) || (tp != 2 && (pcard->current.controler != tp))) - return 0; - tp = pcard->current.controler; - ms[ct] = pcard; - seq[ct] = pcard->current.sequence; - ct++; - } - for(uint32 p = 0; p < 2; ++p) { - for(uint32 i = 0; i < ct; ++i) { - uint8 s = pduel->get_next_integer(0, ct - 1); - pcard = ms[s]; - ms[s] = ms[i]; - ms[i] = pcard; - } - } - pduel->write_buffer8(MSG_SHUFFLE_SET_CARD); - pduel->write_buffer8(ct); - for(uint32 i = 0; i < ct; ++i) { - pduel->write_buffer32(ms[i]->get_info_location()); - pduel->game_field->player[tp].list_mzone[seq[i]] = ms[i]; - ms[i]->current.sequence = seq[i]; - } - for(uint32 i = 0; i < ct; ++i) { - if(ms[i]->xyz_materials.size()) - pduel->write_buffer32(ms[i]->get_info_location()); - else - pduel->write_buffer32(0); - } - return 0; -} -int32 scriptlib::duel_change_attacker(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_CARD, 1); - card* target = *(card**) lua_touserdata(L, 1); - duel* pduel = target->pduel; - card* attacker = pduel->game_field->core.attacker; - card* attack_target = pduel->game_field->core.attack_target; - attacker->announce_count++; - if(attack_target) { - attacker->announced_cards[attack_target->fieldid_r] = attack_target; - } else { - attacker->announced_cards[0] = 0; - } - pduel->game_field->core.sub_attacker = target; - return 0; -} -int32 scriptlib::duel_replace_attacker(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_CARD, 1); - card* target = *(card**) lua_touserdata(L, 1); - duel* pduel = target->pduel; - pduel->game_field->core.sub_attacker = target; - return 0; -} -int32 scriptlib::duel_change_attack_target(lua_State *L) { - check_param_count(L, 1); - if(lua_isnil(L, 1)) { - duel* pduel = interpreter::get_duel_info(L); - pduel->game_field->core.sub_attack_target = 0; - } else { - check_param(L, PARAM_TYPE_CARD, 1); - card* target = *(card**) lua_touserdata(L, 1); - duel* pduel = target->pduel; - pduel->game_field->core.sub_attack_target = target; - } - return 0; -} -int32 scriptlib::duel_replace_attack_target(lua_State *L) { - return 0; -} -int32 scriptlib::duel_calculate_damage(lua_State *L) { - check_action_permission(L); - check_param_count(L, 2); - check_param(L, PARAM_TYPE_CARD, 1); - check_param(L, PARAM_TYPE_CARD, 2); - card* attacker = *(card**)lua_touserdata(L, 1); - card* attack_target = *(card**)lua_touserdata(L, 2); - if(attacker == attack_target) - return 0; - attacker->pduel->game_field->add_process(PROCESSOR_DAMAGE_STEP, 0, (effect*)attacker, (group*)attack_target, 0, 0); - return lua_yield(L, 0); -} -int32 scriptlib::duel_get_battle_damage(lua_State *L) { - check_param_count(L, 1); - duel* pduel = interpreter::get_duel_info(L); - int32 playerid = lua_tointeger(L, 1); - if(playerid != 0 && playerid != 1) - return 0; - lua_pushinteger(L, pduel->game_field->core.battle_damage[playerid]); - return 1; -} -int32 scriptlib::duel_change_battle_damage(lua_State *L) { - check_param_count(L, 2); - duel* pduel = interpreter::get_duel_info(L); - int32 playerid = lua_tointeger(L, 1); - int32 dam = lua_tointeger(L, 2); - if(playerid != 0 && playerid != 1) - return 0; - int32 check = TRUE; - if(lua_gettop(L) >= 3) - check = lua_toboolean(L, 3); - if(check && pduel->game_field->core.battle_damage[playerid] == 0) - return 0; - pduel->game_field->core.battle_damage[playerid] = dam; - return 0; -} -int32 scriptlib::duel_change_target(lua_State *L) { - check_param_count(L, 2); - check_param(L, PARAM_TYPE_GROUP, 2); - uint32 count = lua_tointeger(L, 1); - group* pgroup = *(group**)lua_touserdata(L, 2); - duel* pduel = interpreter::get_duel_info(L); - pduel->game_field->change_target(count, pgroup); - return 0; -} -int32 scriptlib::duel_change_target_player(lua_State *L) { - check_param_count(L, 2); - uint32 count = lua_tointeger(L, 1); - uint32 playerid = lua_tointeger(L, 2); - if(playerid != 0 && playerid != 1) - return 0; - duel* pduel = interpreter::get_duel_info(L); - pduel->game_field->change_target_player(count, playerid); - return 0; -} -int32 scriptlib::duel_change_target_param(lua_State *L) { - check_param_count(L, 2); - uint32 count = lua_tointeger(L, 1); - uint32 param = lua_tointeger(L, 2); - duel* pduel = interpreter::get_duel_info(L); - pduel->game_field->change_target_param(count, param); - return 0; -} -int32 scriptlib::duel_break_effect(lua_State *L) { - check_action_permission(L); - duel* pduel = interpreter::get_duel_info(L); - pduel->game_field->break_effect(); - return lua_yield(L, 0); -} -int32 scriptlib::duel_change_effect(lua_State *L) { - check_param_count(L, 2); - check_param(L, PARAM_TYPE_FUNCTION, 2); - duel* pduel = interpreter::get_duel_info(L); - uint32 count = lua_tointeger(L, 1); - int32 pf = interpreter::get_function_handle(L, 2); - pduel->game_field->change_chain_effect(count, pf); - return 0; -} -int32 scriptlib::duel_negate_activate(lua_State *L) { - check_param_count(L, 1); - uint32 c = lua_tointeger(L, 1); - duel* pduel = interpreter::get_duel_info(L); - lua_pushboolean(L, pduel->game_field->negate_chain(c)); - return 1; -} -int32 scriptlib::duel_negate_effect(lua_State *L) { - check_param_count(L, 1); - uint32 c = lua_tointeger(L, 1); - duel* pduel = interpreter::get_duel_info(L); - lua_pushboolean(L, pduel->game_field->disable_chain(c)); - return 1; -} -int32 scriptlib::duel_negate_related_chain(lua_State *L) { - check_param_count(L, 2); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**)lua_touserdata(L, 1); - uint32 reset_flag = lua_tointeger(L, 2); - duel* pduel = pcard->pduel; - if(pduel->game_field->core.current_chain.size() < 2) - return FALSE; - if(!pcard->is_affect_by_effect(pduel->game_field->core.reason_effect)) - return 0; - effect* negeff = pduel->new_effect(); - negeff->owner = pduel->game_field->core.reason_effect->handler; - negeff->type = EFFECT_TYPE_SINGLE; - negeff->code = EFFECT_DISABLE_CHAIN; - negeff->reset_flag = RESET_CHAIN | RESET_EVENT | reset_flag; - pcard->add_effect(negeff); - return 0; -} -int32 scriptlib::duel_disable_summon(lua_State *L) { - check_param_count(L, 1); - card* pcard = 0; - group* pgroup = 0; - if(check_param(L, PARAM_TYPE_CARD, 1, TRUE)) - pcard = *(card**) lua_touserdata(L, 1); - else if(check_param(L, PARAM_TYPE_GROUP, 1, TRUE)) - pgroup = *(group**) lua_touserdata(L, 1); - else - luaL_error(L, "Parameter %d should be \"Card\" or \"Group\".", 1); - if(pcard) { - pcard->set_status(STATUS_SUMMONING, FALSE); - pcard->set_status(STATUS_SUMMON_DISABLED, TRUE); - if((pcard->summon_info & SUMMON_TYPE_PENDULUM) != SUMMON_TYPE_PENDULUM) - pcard->set_status(STATUS_PROC_COMPLETE, FALSE); - } else { - for(auto cit = pgroup->container.begin(); cit != pgroup->container.end(); ++cit) { - (*cit)->set_status(STATUS_SUMMONING, FALSE); - (*cit)->set_status(STATUS_SUMMON_DISABLED, TRUE); - if(((*cit)->summon_info & SUMMON_TYPE_PENDULUM) != SUMMON_TYPE_PENDULUM) - (*cit)->set_status(STATUS_PROC_COMPLETE, FALSE); - } - } - return 0; -} -int32 scriptlib::duel_increase_summon_count(lua_State *L) { - card* pcard = 0; - effect* pextra = 0; - if(lua_gettop(L) > 0) { - check_param(L, PARAM_TYPE_CARD, 1); - pcard = *(card**) lua_touserdata(L, 1); - } - duel* pduel = interpreter::get_duel_info(L); - uint32 playerid = pduel->game_field->core.reason_player; - if(pcard && (pextra = pcard->is_affected_by_effect(EFFECT_EXTRA_SUMMON_COUNT))) - pextra->get_value(pcard); - else - pduel->game_field->core.summon_count[playerid]++; - return 0; -} -int32 scriptlib::duel_check_summon_count(lua_State *L) { - card* pcard = 0; - if(lua_gettop(L) > 0) { - check_param(L, PARAM_TYPE_CARD, 1); - pcard = *(card**) lua_touserdata(L, 1); - } - duel* pduel = interpreter::get_duel_info(L); - uint32 playerid = pduel->game_field->core.reason_player; - if((pcard && pcard->is_affected_by_effect(EFFECT_EXTRA_SUMMON_COUNT)) - || pduel->game_field->core.summon_count[playerid] < pduel->game_field->get_summon_count_limit(playerid)) - lua_pushboolean(L, 1); - else - lua_pushboolean(L, 0); - return 1; -} -int32 scriptlib::duel_get_location_count(lua_State *L) { - check_param_count(L, 2); - uint32 playerid = lua_tointeger(L, 1); - uint32 location = lua_tointeger(L, 2); - if(playerid != 0 && playerid != 1) - return 0; - duel* pduel = interpreter::get_duel_info(L); - uint32 uplayer = pduel->game_field->core.reason_player; - uint32 reason = LOCATION_REASON_TOFIELD; - if(lua_gettop(L) > 2) - uplayer = lua_tointeger(L, 3); - if(lua_gettop(L) > 3) - reason = lua_tointeger(L, 4); - lua_pushinteger(L, pduel->game_field->get_useable_count(playerid, location, uplayer, reason)); - return 1; -} -int32 scriptlib::duel_get_field_card(lua_State *L) { - check_param_count(L, 3); - uint32 playerid = lua_tointeger(L, 1); - uint32 location = lua_tointeger(L, 2); - uint32 sequence = lua_tointeger(L, 3); - if(playerid != 0 && playerid != 1) - return 0; - duel* pduel = interpreter::get_duel_info(L); - card* pcard = pduel->game_field->get_field_card(playerid, location, sequence); - if(!pcard || pcard->is_status(STATUS_SUMMONING)) - return 0; - interpreter::card2value(L, pcard); - return 1; -} -int32 scriptlib::duel_check_location(lua_State *L) { - check_param_count(L, 3); - uint32 playerid = lua_tointeger(L, 1); - uint32 location = lua_tointeger(L, 2); - uint32 sequence = lua_tointeger(L, 3); - if(playerid != 0 && playerid != 1) - return 0; - duel* pduel = interpreter::get_duel_info(L); - lua_pushboolean(L, pduel->game_field->is_location_useable(playerid, location, sequence)); - return 1; -} -int32 scriptlib::duel_get_current_chain(lua_State *L) { - duel* pduel = interpreter::get_duel_info(L); - lua_pushinteger(L, pduel->game_field->core.current_chain.size()); - return 1; -} -int32 scriptlib::duel_get_chain_info(lua_State *L) { - check_param_count(L, 1); - uint32 c = lua_tointeger(L, 1); - uint32 flag; - uint32 args = lua_gettop(L) - 1; - duel* pduel = interpreter::get_duel_info(L); - chain* ch; - if(c == 0 && pduel->game_field->core.continuous_chain.size()) - ch = &pduel->game_field->core.continuous_chain.back(); - else { - if(c > pduel->game_field->core.current_chain.size() || c < 1) - c = pduel->game_field->core.current_chain.size(); - if(c == 0) - return 0; - ch = &pduel->game_field->core.current_chain[c - 1]; - } - for(uint32 i = 0; i < args; ++i) { - flag = lua_tointeger(L, 2 + i); - switch(flag) { - case CHAININFO_CHAIN_COUNT: - lua_pushinteger(L, ch->chain_count); - break; - case CHAININFO_TRIGGERING_EFFECT: - interpreter::effect2value(L, ch->triggering_effect); - break; - case CHAININFO_TRIGGERING_PLAYER: - lua_pushinteger(L, ch->triggering_player); - break; - case CHAININFO_TRIGGERING_CONTROLER: - lua_pushinteger(L, ch->triggering_controler); - break; - case CHAININFO_TRIGGERING_LOCATION: - lua_pushinteger(L, ch->triggering_location); - break; - case CHAININFO_TRIGGERING_SEQUENCE: - lua_pushinteger(L, ch->triggering_sequence); - break; - case CHAININFO_TARGET_CARDS: - interpreter::group2value(L, ch->target_cards); - break; - case CHAININFO_TARGET_PLAYER: - lua_pushinteger(L, ch->target_player); - break; - case CHAININFO_TARGET_PARAM: - lua_pushinteger(L, ch->target_param); - break; - case CHAININFO_DISABLE_REASON: - interpreter::effect2value(L, ch->disable_reason); - break; - case CHAININFO_DISABLE_PLAYER: - lua_pushinteger(L, ch->disable_player); - break; - case CHAININFO_CHAIN_ID: - lua_pushinteger(L, ch->chain_id); - break; - case CHAININFO_TYPE: - if((ch->triggering_effect->card_type & 0x7) == (TYPE_TRAP | TYPE_MONSTER)) - lua_pushinteger(L, TYPE_MONSTER); - else lua_pushinteger(L, (ch->triggering_effect->card_type & 0x7)); - break; - case CHAININFO_EXTTYPE: - lua_pushinteger(L, ch->triggering_effect->card_type); - break; - default: - lua_pushnil(L); - break; - } - } - return args; -} -int32 scriptlib::duel_get_first_target(lua_State *L) { - chain* ch; - duel* pduel = interpreter::get_duel_info(L); - if(pduel->game_field->core.continuous_chain.size()) - ch = &pduel->game_field->core.continuous_chain.back(); - else if(pduel->game_field->core.current_chain.size()) - ch = &pduel->game_field->core.current_chain.back(); - else return 0; - if(!ch->target_cards || ch->target_cards->container.size() == 0) - return 0; - for(auto iter = ch->target_cards->container.begin(); iter != ch->target_cards->container.end(); ++iter) - interpreter::card2value(L, *iter); - return ch->target_cards->container.size(); -} -int32 scriptlib::duel_get_current_phase(lua_State *L) { - duel* pduel = interpreter::get_duel_info(L); - lua_pushinteger(L, pduel->game_field->infos.phase); - return 1; -} -int32 scriptlib::duel_skip_phase(lua_State *L) { - check_param_count(L, 4); - uint32 playerid = lua_tointeger(L, 1); - if(playerid != 0 && playerid != 1) - return 0; - uint32 phase = lua_tointeger(L, 2); - uint32 reset = lua_tointeger(L, 3); - uint32 count = lua_tointeger(L, 4); - uint32 value = lua_tointeger(L, 5); - if(count <= 0) - count = 1; - duel* pduel = interpreter::get_duel_info(L); - int32 code = 0; - if(phase == PHASE_DRAW) - code = EFFECT_SKIP_DP; - else if(phase == PHASE_STANDBY) - code = EFFECT_SKIP_SP; - else if(phase == PHASE_MAIN1) - code = EFFECT_SKIP_M1; - else if(phase == PHASE_BATTLE) - code = EFFECT_SKIP_BP; - else if(phase == PHASE_MAIN2) - code = EFFECT_SKIP_M2; - else - return 0; - effect* peffect = pduel->new_effect(); - peffect->owner = pduel->game_field->temp_card; - peffect->effect_owner = playerid; - peffect->type = EFFECT_TYPE_FIELD; - peffect->code = code; - peffect->reset_flag = (reset & 0xff) | RESET_PHASE | RESET_SELF_TURN; - peffect->flag = EFFECT_FLAG_CANNOT_DISABLE | EFFECT_FLAG_PLAYER_TARGET; - peffect->s_range = 1; - peffect->o_range = 0; - peffect->reset_count |= count & 0xff; - peffect->value = value; - pduel->game_field->add_effect(peffect, playerid); - return 0; -} -int32 scriptlib::duel_is_damage_calculated(lua_State *L) { - duel* pduel = interpreter::get_duel_info(L); - lua_pushboolean(L, pduel->game_field->core.damage_calculated); - return 1; -} -int32 scriptlib::duel_get_attacker(lua_State *L) { - duel* pduel = interpreter::get_duel_info(L); - card* pcard = pduel->game_field->core.attacker; - interpreter::card2value(L, pcard); - return 1; -} -int32 scriptlib::duel_get_attack_target(lua_State *L) { - duel* pduel = interpreter::get_duel_info(L); - card* pcard = pduel->game_field->core.attack_target; - interpreter::card2value(L, pcard); - return 1; -} -int32 scriptlib::duel_disable_attack(lua_State *L) { - duel* pduel = interpreter::get_duel_info(L); - pduel->game_field->add_process(PROCESSOR_ATTACK_DISABLE, 0, 0, 0, 0, 0); - return lua_yield(L, 0); -} -int32 scriptlib::duel_chain_attack(lua_State *L) { - duel* pduel = interpreter::get_duel_info(L); - pduel->game_field->core.chain_attack = TRUE; - if(lua_gettop(L) > 0) { - check_param(L, PARAM_TYPE_CARD, 1); - pduel->game_field->core.chain_attack_target = *(card**) lua_touserdata(L, 1); - } - return 0; -} -int32 scriptlib::duel_readjust(lua_State *L) { - duel* pduel = interpreter::get_duel_info(L); - card* adjcard = pduel->game_field->core.reason_effect->handler; - pduel->game_field->core.readjust_map[adjcard]++; - if(pduel->game_field->core.readjust_map[adjcard] > 3) { - pduel->game_field->send_to(adjcard, 0, REASON_RULE, pduel->game_field->core.reason_player, PLAYER_NONE, LOCATION_GRAVE, 0, POS_FACEUP); - pduel->game_field->core.subunits.begin()->type = PROCESSOR_SENDTO_S; - return lua_yield(L, 0); - } - pduel->game_field->core.re_adjust = TRUE; - return 0; -} -int32 scriptlib::duel_adjust_instantly(lua_State *L) { - duel* pduel = interpreter::get_duel_info(L); - if(lua_gettop(L) > 0) { - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - pcard->filter_disable_related_cards(); - } - pduel->game_field->adjust_instant(); - return 0; -} -/** - * \brief Duel.GetFieldGroup - * \param playerid, location1, location2 - * \return Group - */ -int32 scriptlib::duel_get_field_group(lua_State *L) { - check_param_count(L, 3); - uint32 playerid = lua_tointeger(L, 1); - uint32 location1 = lua_tointeger(L, 2); - uint32 location2 = lua_tointeger(L, 3); - duel* pduel = interpreter::get_duel_info(L); - group* pgroup = pduel->new_group(); - pduel->game_field->filter_field_card(playerid, location1, location2, pgroup); - interpreter::group2value(L, pgroup); - return 1; -} -/** - * \brief Duel.GetFieldGroupCount - * \param playerid, location1, location2 - * \return Integer - */ -int32 scriptlib::duel_get_field_group_count(lua_State *L) { - check_param_count(L, 3); - uint32 playerid = lua_tointeger(L, 1); - uint32 location1 = lua_tointeger(L, 2); - uint32 location2 = lua_tointeger(L, 3); - duel* pduel = interpreter::get_duel_info(L); - uint32 count = pduel->game_field->filter_field_card(playerid, location1, location2, 0); - lua_pushinteger(L, count); - return 1; -} -/** - * \brief Duel.GetDeckTop - * \param playerid, count - * \return Group - */ -int32 scriptlib::duel_get_decktop_group(lua_State *L) { - check_param_count(L, 2); - uint32 playerid = lua_tointeger(L, 1); - uint32 count = lua_tointeger(L, 2); - duel* pduel = interpreter::get_duel_info(L); - group* pgroup = pduel->new_group(); - auto cit = pduel->game_field->player[playerid].list_main.rbegin(); - for(uint32 i = 0; i < count && cit != pduel->game_field->player[playerid].list_main.rend(); ++i, ++cit) - pgroup->container.insert(*cit); - interpreter::group2value(L, pgroup); - return 1; -} -/** -* \brief Duel.GetMatchingGroup -* \param filter_func, self, location1, location2, exception card, (extraargs...) -* \return Group -*/ -int32 scriptlib::duel_get_matching_group(lua_State *L) { - check_param_count(L, 5); - if(!lua_isnil(L, 1)) - check_param(L, PARAM_TYPE_FUNCTION, 1); - card* pexception = 0; - uint32 extraargs = 0; - if(!lua_isnil(L, 5)) { - check_param(L, PARAM_TYPE_CARD, 5); - pexception = *(card**) lua_touserdata(L, 5); - } - extraargs = lua_gettop(L) - 5; - duel* pduel = interpreter::get_duel_info(L); - uint32 self = lua_tointeger(L, 2); - uint32 location1 = lua_tointeger(L, 3); - uint32 location2 = lua_tointeger(L, 4); - group* pgroup = pduel->new_group(); - pduel->game_field->filter_matching_card(1, (uint8)self, location1, location2, pgroup, pexception, extraargs); - interpreter::group2value(L, pgroup); - return 1; -} -/** -* \brief Duel.GetMatchingGroupCount -* \param filter_func, self, location1, location2, exception card, (extraargs...) -* \return Integer -*/ -int32 scriptlib::duel_get_matching_count(lua_State *L) { - check_param_count(L, 5); - if(!lua_isnil(L, 1)) - check_param(L, PARAM_TYPE_FUNCTION, 1); - card* pexception = 0; - uint32 extraargs = 0; - if(!lua_isnil(L, 5)) { - check_param(L, PARAM_TYPE_CARD, 5); - pexception = *(card**) lua_touserdata(L, 5); - } - extraargs = lua_gettop(L) - 5; - duel* pduel = interpreter::get_duel_info(L); - uint32 self = lua_tointeger(L, 2); - uint32 location1 = lua_tointeger(L, 3); - uint32 location2 = lua_tointeger(L, 4); - group* pgroup = pduel->new_group(); - pduel->game_field->filter_matching_card(1, (uint8)self, location1, location2, pgroup, pexception, extraargs); - uint32 count = pgroup->container.size(); - lua_pushinteger(L, count); - return 1; -} -/** -* \brief Duel.GetFirstMatchingCard -* \param filter_func, self, location1, location2, exception card, (extraargs...) -* \return Card | nil -*/ -int32 scriptlib::duel_get_first_matching_card(lua_State *L) { - check_param_count(L, 5); - if(!lua_isnil(L, 1)) - check_param(L, PARAM_TYPE_FUNCTION, 1); - card* pexception = 0; - uint32 extraargs = 0; - if(!lua_isnil(L, 5)) { - check_param(L, PARAM_TYPE_CARD, 5); - pexception = *(card**) lua_touserdata(L, 5); - } - extraargs = lua_gettop(L) - 5; - duel* pduel = interpreter::get_duel_info(L); - uint32 self = lua_tointeger(L, 2); - uint32 location1 = lua_tointeger(L, 3); - uint32 location2 = lua_tointeger(L, 4); - card* pret = 0; - pduel->game_field->filter_matching_card(1, (uint8)self, location1, location2, 0, pexception, extraargs, &pret); - if(pret) - interpreter::card2value(L, pret); - else lua_pushnil(L); - return 1; -} -/** -* \brief Duel.IsExistingMatchingCard -* \param filter_func, self, location1, location2, count, exception card, (extraargs...) -* \return boolean -*/ -int32 scriptlib::duel_is_existing_matching_card(lua_State *L) { - check_param_count(L, 6); - if(!lua_isnil(L, 1)) - check_param(L, PARAM_TYPE_FUNCTION, 1); - card* pexception = 0; - uint32 extraargs = 0; - if(!lua_isnil(L, 6)) { - check_param(L, PARAM_TYPE_CARD, 6); - pexception = *(card**) lua_touserdata(L, 6); - } - extraargs = lua_gettop(L) - 6; - duel* pduel = interpreter::get_duel_info(L); - uint32 self = lua_tointeger(L, 2); - uint32 location1 = lua_tointeger(L, 3); - uint32 location2 = lua_tointeger(L, 4); - uint32 fcount = lua_tointeger(L, 5); - lua_pushboolean(L, pduel->game_field->filter_matching_card(1, (uint8)self, location1, location2, 0, pexception, extraargs, 0, fcount)); - return 1; -} -/** -* \brief Duel.SelectMatchingCards -* \param playerid, filter_func, self, location1, location2, min, max, exception card, (extraargs...) -* \return Group -*/ -int32 scriptlib::duel_select_matching_cards(lua_State *L) { - check_action_permission(L); - check_param_count(L, 8); - if(!lua_isnil(L, 2)) - check_param(L, PARAM_TYPE_FUNCTION, 2); - card* pexception = 0; - uint32 extraargs = 0; - if(!lua_isnil(L, 8)) { - check_param(L, PARAM_TYPE_CARD, 8); - pexception = *(card**) lua_touserdata(L, 8); - } - extraargs = lua_gettop(L) - 8; - uint32 playerid = lua_tointeger(L, 1); - if(playerid != 0 && playerid != 1) - return 0; - duel* pduel = interpreter::get_duel_info(L); - uint32 self = lua_tointeger(L, 3); - uint32 location1 = lua_tointeger(L, 4); - uint32 location2 = lua_tointeger(L, 5); - uint32 min = lua_tointeger(L, 6); - uint32 max = lua_tointeger(L, 7); - group* pgroup = pduel->new_group(); - pduel->game_field->filter_matching_card(2, (uint8)self, location1, location2, pgroup, pexception, extraargs); - pduel->game_field->core.select_cards.assign(pgroup->container.begin(), pgroup->container.end()); - pduel->game_field->add_process(PROCESSOR_SELECT_CARD_S, 0, 0, 0, playerid, min + (max << 16)); - return lua_yield(L, 0); -} -/** -* \brief Duel.GetReleaseGroup -* \param playerid -* \return Group -*/ -int32 scriptlib::duel_get_release_group(lua_State *L) { - check_param_count(L, 1); - uint32 playerid = lua_tointeger(L, 1); - if(playerid != 0 && playerid != 1) - return 0; - uint32 hand = FALSE; - if(lua_gettop(L) > 1) - hand = lua_toboolean(L, 2); - duel* pduel = interpreter::get_duel_info(L); - group* pgroup = pduel->new_group(); - pduel->game_field->get_release_list(playerid, &(pgroup->container), &(pgroup->container), FALSE, hand, 0, 0, 0); - interpreter::group2value(L, pgroup); - return 1; -} -/** -* \brief Duel.GetReleaseGroupCount -* \param playerid -* \return Integer -*/ -int32 scriptlib::duel_get_release_group_count(lua_State *L) { - check_param_count(L, 1); - uint32 playerid = lua_tointeger(L, 1); - if(playerid != 0 && playerid != 1) - return 0; - uint32 hand = FALSE; - if(lua_gettop(L) > 1) - hand = lua_toboolean(L, 2); - duel* pduel = interpreter::get_duel_info(L); - lua_pushinteger(L, pduel->game_field->get_release_list(playerid, 0, 0, FALSE, hand, 0, 0, 0)); - return 1; -} -int32 scriptlib::duel_check_release_group(lua_State *L) { - check_param_count(L, 4); - int32 playerid = lua_tointeger(L, 1); - if(playerid != 0 && playerid != 1) - return 0; - int32 use_con = FALSE; - if(!lua_isnil(L, 2)) { - check_param(L, PARAM_TYPE_FUNCTION, 2); - use_con = TRUE; - } - card* pexception = 0; - uint32 extraargs = 0; - if(!lua_isnil(L, 4)) { - check_param(L, PARAM_TYPE_CARD, 4); - pexception = *(card**) lua_touserdata(L, 4); - } - extraargs = lua_gettop(L) - 4; - duel* pduel = interpreter::get_duel_info(L); - uint32 fcount = lua_tointeger(L, 3); - lua_pushboolean(L, pduel->game_field->check_release_list(playerid, fcount, use_con, FALSE, 2, extraargs, pexception)); - return 1; -} -int32 scriptlib::duel_select_release_group(lua_State *L) { - check_action_permission(L); - check_param_count(L, 5); - int32 playerid = lua_tointeger(L, 1); - if(playerid != 0 && playerid != 1) - return 0; - int32 use_con = FALSE; - if(!lua_isnil(L, 2)) { - check_param(L, PARAM_TYPE_FUNCTION, 2); - use_con = TRUE; - } - card* pexception = 0; - uint32 extraargs = 0; - if(!lua_isnil(L, 5)) { - check_param(L, PARAM_TYPE_CARD, 5); - pexception = *(card**) lua_touserdata(L, 5); - } - extraargs = lua_gettop(L) - 5; - duel* pduel = interpreter::get_duel_info(L); - uint32 min = lua_tointeger(L, 3); - uint32 max = lua_tointeger(L, 4); - pduel->game_field->core.release_cards.clear(); - pduel->game_field->core.release_cards_ex.clear(); - pduel->game_field->get_release_list(playerid, &pduel->game_field->core.release_cards, &pduel->game_field->core.release_cards_ex, use_con, FALSE, 2, extraargs, pexception); - pduel->game_field->add_process(PROCESSOR_SELECT_RELEASE_S, 0, 0, 0, playerid, (max << 16) + min); - return lua_yield(L, 0); -} -int32 scriptlib::duel_check_release_group_ex(lua_State *L) { - check_param_count(L, 4); - int32 playerid = lua_tointeger(L, 1); - if(playerid != 0 && playerid != 1) - return 0; - int32 use_con = FALSE; - if(!lua_isnil(L, 2)) { - check_param(L, PARAM_TYPE_FUNCTION, 2); - use_con = TRUE; - } - card* pexception = 0; - uint32 extraargs = 0; - if(!lua_isnil(L, 4)) { - check_param(L, PARAM_TYPE_CARD, 4); - pexception = *(card**) lua_touserdata(L, 4); - } - extraargs = lua_gettop(L) - 4; - duel* pduel = interpreter::get_duel_info(L); - uint32 fcount = lua_tointeger(L, 3); - lua_pushboolean(L, pduel->game_field->check_release_list(playerid, fcount, use_con, TRUE, 2, extraargs, pexception)); - return 1; -} -int32 scriptlib::duel_select_release_group_ex(lua_State *L) { - check_action_permission(L); - check_param_count(L, 5); - int32 playerid = lua_tointeger(L, 1); - if(playerid != 0 && playerid != 1) - return 0; - int32 use_con = FALSE; - if(!lua_isnil(L, 2)) { - check_param(L, PARAM_TYPE_FUNCTION, 2); - use_con = TRUE; - } - card* pexception = 0; - uint32 extraargs = 0; - if(!lua_isnil(L, 5)) { - check_param(L, PARAM_TYPE_CARD, 5); - pexception = *(card**) lua_touserdata(L, 5); - } - extraargs = lua_gettop(L) - 5; - duel* pduel = interpreter::get_duel_info(L); - uint32 min = lua_tointeger(L, 3); - uint32 max = lua_tointeger(L, 4); - pduel->game_field->core.release_cards.clear(); - pduel->game_field->core.release_cards_ex.clear(); - pduel->game_field->get_release_list(playerid, &pduel->game_field->core.release_cards, &pduel->game_field->core.release_cards_ex, use_con, TRUE, 2, extraargs, pexception); - pduel->game_field->add_process(PROCESSOR_SELECT_RELEASE_S, 0, 0, 0, playerid, (max << 16) + min); - return lua_yield(L, 0); -} -/** -* \brief Duel.GetTributeGroup -* \param targetcard -* \return Group -*/ -int32 scriptlib::duel_get_tribute_group(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_CARD, 1); - card* target = *(card**) lua_touserdata(L, 1); - duel* pduel = interpreter::get_duel_info(L); - group* pgroup = pduel->new_group(); - pduel->game_field->get_summon_release_list(target, &(pgroup->container), &(pgroup->container), 0); - interpreter::group2value(L, pgroup); - return 1; -} -/** -* \brief Duel.GetTributeCount -* \param targetcard -* \return Integer -*/ -int32 scriptlib::duel_get_tribute_count(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_CARD, 1); - card* target = *(card**) lua_touserdata(L, 1); - group* mg = 0; - if(lua_gettop(L) >= 2 && !lua_isnil(L, 2)) { - check_param(L, PARAM_TYPE_GROUP, 2); - mg = *(group**) lua_touserdata(L, 2); - } - uint32 ex = 0; - if(lua_gettop(L) >= 3) - ex = lua_toboolean(L, 3); - duel* pduel = interpreter::get_duel_info(L); - lua_pushinteger(L, pduel->game_field->get_summon_release_list(target, 0, 0, 0, mg, ex)); - return 1; -} -int32 scriptlib::duel_select_tribute(lua_State *L) { - check_action_permission(L); - check_param_count(L, 4); - check_param(L, PARAM_TYPE_CARD, 2); - uint32 playerid = lua_tointeger(L, 1); - if(playerid != 0 && playerid != 1) - return 0; - card* target = *(card**) lua_touserdata(L, 2); - uint32 min = lua_tointeger(L, 3); - uint32 max = lua_tointeger(L, 4); - group* mg = 0; - if(lua_gettop(L) >= 5 && !lua_isnil(L, 5)) { - check_param(L, PARAM_TYPE_GROUP, 5); - mg = *(group**) lua_touserdata(L, 5); - } - uint32 ex = 0; - if(lua_gettop(L) >= 6) - ex = lua_toboolean(L, 6); - duel* pduel = interpreter::get_duel_info(L); - pduel->game_field->core.release_cards.clear(); - pduel->game_field->core.release_cards_ex.clear(); - pduel->game_field->core.release_cards_ex_sum.clear(); - pduel->game_field->get_summon_release_list(target, &pduel->game_field->core.release_cards, &pduel->game_field->core.release_cards_ex, &pduel->game_field->core.release_cards_ex_sum, mg, ex); - pduel->game_field->add_process(PROCESSOR_SELECT_TRIBUTE_S, 0, 0, 0, playerid, (max << 16) + min); - return lua_yield(L, 0); -} -/** -* \brief Duel.GetTargetCount -* \param filter_func, self, location1, location2, exception card, (extraargs...) -* \return Group -*/ -int32 scriptlib::duel_get_target_count(lua_State *L) { - check_param_count(L, 5); - if(!lua_isnil(L, 1)) - check_param(L, PARAM_TYPE_FUNCTION, 1); - card* pexception = 0; - uint32 extraargs = 0; - if(!lua_isnil(L, 5)) { - check_param(L, PARAM_TYPE_CARD, 5); - pexception = *(card**) lua_touserdata(L, 5); - } - extraargs = lua_gettop(L) - 5; - duel* pduel = interpreter::get_duel_info(L); - uint32 self = lua_tointeger(L, 2); - uint32 location1 = lua_tointeger(L, 3); - uint32 location2 = lua_tointeger(L, 4); - group* pgroup = pduel->new_group(); - uint32 count = 0; - pduel->game_field->filter_matching_card(1, (uint8)self, location1, location2, pgroup, pexception, extraargs, 0, 0, TRUE); - count = pgroup->container.size(); - lua_pushinteger(L, count); - return 1; -} -/** -* \brief Duel.IsExistingTarget -* \param filter_func, self, location1, location2, count, exception card, (extraargs...) -* \return boolean -*/ -int32 scriptlib::duel_is_existing_target(lua_State *L) { - check_param_count(L, 6); - if(!lua_isnil(L, 1)) - check_param(L, PARAM_TYPE_FUNCTION, 1); - card* pexception = 0; - uint32 extraargs = 0; - if(!lua_isnil(L, 6)) { - check_param(L, PARAM_TYPE_CARD, 6); - pexception = *(card**) lua_touserdata(L, 6); - } - extraargs = lua_gettop(L) - 6; - duel* pduel = interpreter::get_duel_info(L); - uint32 self = lua_tointeger(L, 2); - uint32 location1 = lua_tointeger(L, 3); - uint32 location2 = lua_tointeger(L, 4); - uint32 count = lua_tointeger(L, 5); - lua_pushboolean(L, pduel->game_field->filter_matching_card(1, (uint8)self, location1, location2, 0, pexception, extraargs, 0, count, TRUE)); - return 1; -} -/** -* \brief Duel.SelectTarget -* \param playerid, filter_func, self, location1, location2, min, max, exception card, (extraargs...) -* \return Group -*/ -int32 scriptlib::duel_select_target(lua_State *L) { - check_action_permission(L); - check_param_count(L, 8); - if(!lua_isnil(L, 2)) - check_param(L, PARAM_TYPE_FUNCTION, 2); - card* pexception = 0; - uint32 extraargs = 0; - if(!lua_isnil(L, 8)) { - check_param(L, PARAM_TYPE_CARD, 8); - pexception = *(card**) lua_touserdata(L, 8); - } - extraargs = lua_gettop(L) - 8; - uint32 playerid = lua_tointeger(L, 1); - if(playerid != 0 && playerid != 1) - return 0; - duel* pduel = interpreter::get_duel_info(L); - uint32 self = lua_tointeger(L, 3); - uint32 location1 = lua_tointeger(L, 4); - uint32 location2 = lua_tointeger(L, 5); - uint32 min = lua_tointeger(L, 6); - uint32 max = lua_tointeger(L, 7); - if(pduel->game_field->core.current_chain.size() == 0) - return 0; - group* pgroup = pduel->new_group(); - pduel->game_field->filter_matching_card(2, (uint8)self, location1, location2, pgroup, pexception, extraargs, 0, 0, TRUE); - pduel->game_field->core.select_cards.assign(pgroup->container.begin(), pgroup->container.end()); - pduel->game_field->add_process(PROCESSOR_SELECT_TARGET, 0, 0, 0, playerid, min + (max << 16)); - return lua_yield(L, 0); -} -int32 scriptlib::duel_select_fusion_material(lua_State *L) { - check_action_permission(L); - check_param_count(L, 3); - int32 playerid = lua_tointeger(L, 1); - if(playerid != 0 && playerid != 1) - return 0; - check_param(L, PARAM_TYPE_CARD, 2); - check_param(L, PARAM_TYPE_GROUP, 3); - card* cg = 0; - int32 chkf = PLAYER_NONE; - if(lua_gettop(L) > 3 && !lua_isnil(L, 4)) { - check_param(L, PARAM_TYPE_CARD, 4); - cg = *(card**) lua_touserdata(L, 4); - } - if(lua_gettop(L) > 4) - chkf = lua_tointeger(L, 5); - card* pcard = *(card**) lua_touserdata(L, 2); - group* pgroup = *(group**) lua_touserdata(L, 3); - pcard->fusion_select(playerid, pgroup, cg, chkf); - return lua_yield(L, 0); -} -int32 scriptlib::duel_set_fusion_material(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_GROUP, 1); - group* pgroup = *(group**) lua_touserdata(L, 1); - duel* pduel = pgroup->pduel; - pduel->game_field->core.fusion_materials = pgroup->container; - return 0; -} -int32 scriptlib::duel_set_synchro_material(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_GROUP, 1); - group* pgroup = *(group**) lua_touserdata(L, 1); - duel* pduel = pgroup->pduel; - pduel->game_field->core.synchro_materials = pgroup->container; - return 0; -} -int32 scriptlib::duel_select_synchro_material(lua_State *L) { - check_param_count(L, 6); - check_param(L, PARAM_TYPE_CARD, 2); - int32 playerid = lua_tointeger(L, 1); - if(playerid != 0 && playerid != 1) - return 0; - card* pcard = *(card**) lua_touserdata(L, 2); - duel* pduel = pcard->pduel; - if(!lua_isnil(L, 3)) - check_param(L, PARAM_TYPE_FUNCTION, 3); - if(!lua_isnil(L, 4)) - check_param(L, PARAM_TYPE_FUNCTION, 4); - int32 min = lua_tointeger(L, 5); - int32 max = lua_tointeger(L, 6); - card* smat = 0; - group* mg = 0; - if(lua_gettop(L) >= 7 && !lua_isnil(L, 7)) { - check_param(L, PARAM_TYPE_CARD, 7); - smat = *(card**) lua_touserdata(L, 7); - } - if(lua_gettop(L) >= 8 && !lua_isnil(L, 8)) { - check_param(L, PARAM_TYPE_GROUP, 8); - mg = *(group**) lua_touserdata(L, 8); - } - if(mg) - pduel->game_field->add_process(PROCESSOR_SELECT_SYNCHRO, 0, (effect*)mg, (group*)pcard, playerid, min + (max << 16)); - else - pduel->game_field->add_process(PROCESSOR_SELECT_SYNCHRO, 0, (effect*)smat, (group*)pcard, playerid + 0x10000, min + (max << 16)); - lua_pushvalue(L, 3); - lua_pushvalue(L, 4); - return lua_yield(L, 2); -} -int32 scriptlib::duel_check_synchro_material(lua_State *L) { - check_param_count(L, 5); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - duel* pduel = pcard->pduel; - if(!lua_isnil(L, 2)) - check_param(L, PARAM_TYPE_FUNCTION, 2); - if(!lua_isnil(L, 3)) - check_param(L, PARAM_TYPE_FUNCTION, 3); - int32 min = lua_tointeger(L, 4); - int32 max = lua_tointeger(L, 5); - card* smat = 0; - group* mg = 0; - if(lua_gettop(L) >= 6 && !lua_isnil(L, 6)) { - check_param(L, PARAM_TYPE_CARD, 6); - smat = *(card**) lua_touserdata(L, 6); - } - if(lua_gettop(L) >= 7 && !lua_isnil(L, 7)) { - check_param(L, PARAM_TYPE_GROUP, 7); - mg = *(group**) lua_touserdata(L, 7); - } - lua_pushboolean(L, pduel->game_field->check_synchro_material(pcard, 2, 3, min, max, smat, mg)); - return 1; -} -int32 scriptlib::duel_select_tuner_material(lua_State *L) { - check_param_count(L, 7); - check_param(L, PARAM_TYPE_CARD, 2); - check_param(L, PARAM_TYPE_CARD, 3); - int32 playerid = lua_tointeger(L, 1); - if(playerid != 0 && playerid != 1) - return 0; - card* pcard = *(card**) lua_touserdata(L, 2); - card* tuner = *(card**) lua_touserdata(L, 3); - duel* pduel = pcard->pduel; - if(!lua_isnil(L, 4)) - check_param(L, PARAM_TYPE_FUNCTION, 4); - if(!lua_isnil(L, 5)) - check_param(L, PARAM_TYPE_FUNCTION, 5); - int32 min = lua_tointeger(L, 6); - int32 max = lua_tointeger(L, 7); - group* mg = 0; - if(lua_gettop(L) >= 8 && !lua_isnil(L, 8)) { - check_param(L, PARAM_TYPE_GROUP, 8); - mg = *(group**) lua_touserdata(L, 8); - } - if(!pduel->game_field->check_tuner_material(pcard, tuner, 4, 5, min, max, 0, mg)) - return 0; - pduel->game_field->core.select_cards.clear(); - pduel->game_field->core.select_cards.push_back(tuner); - pduel->game_field->returns.bvalue[1] = 0; - pduel->game_field->add_process(PROCESSOR_SELECT_SYNCHRO, 1, (effect*)mg, (group*)pcard, playerid, min + (max << 16)); - lua_pushvalue(L, 4); - lua_pushvalue(L, 5); - return lua_yield(L, 2); -} -int32 scriptlib::duel_check_tuner_material(lua_State *L) { - check_param_count(L, 6); - check_param(L, PARAM_TYPE_CARD, 1); - check_param(L, PARAM_TYPE_CARD, 2); - card* pcard = *(card**) lua_touserdata(L, 1); - card* tuner = *(card**) lua_touserdata(L, 2); - duel* pduel = pcard->pduel; - if(pduel->game_field->core.global_flag & GLOBALFLAG_MUST_BE_SMATERIAL) { - effect_set eset; - pduel->game_field->filter_player_effect(pcard->current.controler, EFFECT_MUST_BE_SMATERIAL, &eset); - if(eset.size() && eset[0]->handler != tuner) { - lua_pushboolean(L, false); - return 1; - } - } - if(!lua_isnil(L, 3)) - check_param(L, PARAM_TYPE_FUNCTION, 3); - if(!lua_isnil(L, 4)) - check_param(L, PARAM_TYPE_FUNCTION, 4); - int32 min = lua_tointeger(L, 5); - int32 max = lua_tointeger(L, 6); - group* mg = 0; - if(lua_gettop(L) >= 7 && !lua_isnil(L, 7)) { - check_param(L, PARAM_TYPE_GROUP, 7); - mg = *(group**) lua_touserdata(L, 7); - } - lua_pushboolean(L, pduel->game_field->check_tuner_material(pcard, tuner, 3, 4, min, max, 0, mg)); - return 1; -} -int32 scriptlib::duel_get_ritual_material(lua_State *L) { - check_param_count(L, 1); - int32 playerid = lua_tointeger(L, 1); - if(playerid != 0 && playerid != 1) - return 0; - duel* pduel = interpreter::get_duel_info(L); - group* pgroup = pduel->new_group(); - pduel->game_field->get_ritual_material(playerid, pduel->game_field->core.reason_effect, &pgroup->container); - interpreter::group2value(L, pgroup); - return 1; -} -int32 scriptlib::duel_release_ritual_material(lua_State *L) { - check_action_permission(L); - check_param_count(L, 1); - check_param(L, PARAM_TYPE_GROUP, 1); - group* pgroup = *(group**) lua_touserdata(L, 1); - pgroup->pduel->game_field->ritual_release(&pgroup->container); - return lua_yield(L, 0); -} -int32 scriptlib::duel_set_target_card(lua_State *L) { - check_action_permission(L); - check_param_count(L, 1); - card* pcard = 0; - group* pgroup = 0; - duel* pduel = 0; - if(check_param(L, PARAM_TYPE_CARD, 1, TRUE)) { - pcard = *(card**) lua_touserdata(L, 1); - pduel = pcard->pduel; - } else if(check_param(L, PARAM_TYPE_GROUP, 1, TRUE)) { - pgroup = *(group**) lua_touserdata(L, 1); - pduel = pgroup->pduel; - } else - luaL_error(L, "Parameter %d should be \"Card\" or \"Group\".", 1); - if(pduel->game_field->core.continuous_chain.size()) { - if(!pduel->game_field->core.continuous_chain.rbegin()->target_cards) { - pduel->game_field->core.continuous_chain.rbegin()->target_cards = pduel->new_group(); - pduel->game_field->core.continuous_chain.rbegin()->target_cards->is_readonly = TRUE; - } - if(pcard) - pduel->game_field->core.continuous_chain.rbegin()->target_cards->container.insert(pcard); - else - pduel->game_field->core.continuous_chain.rbegin()->target_cards->container = pgroup->container; - } else if(pduel->game_field->core.current_chain.size()) { - effect* peffect = pduel->game_field->core.current_chain.rbegin()->triggering_effect; - if(!pduel->game_field->core.current_chain.rbegin()->target_cards) { - pduel->game_field->core.current_chain.rbegin()->target_cards = pduel->new_group(); - pduel->game_field->core.current_chain.rbegin()->target_cards->is_readonly = TRUE; - } - group* targets = pduel->game_field->core.current_chain.rbegin()->target_cards; - if(pcard) { - targets->container.insert(pcard); - pcard->create_relation(peffect); - } else { - targets->container.insert(pgroup->container.begin(), pgroup->container.end()); - for(auto cit = pgroup->container.begin(); cit != pgroup->container.end(); ++cit) - (*cit)->create_relation(peffect); - } - if(peffect->flag & EFFECT_FLAG_CARD_TARGET) { - if(pcard) { - if(pcard->current.location & 0x30) - pduel->game_field->move_card(pcard->current.controler, pcard, pcard->current.location, 0); - pduel->write_buffer8(MSG_BECOME_TARGET); - pduel->write_buffer8(1); - pduel->write_buffer32(pcard->get_info_location()); - } else { - for(auto cit = pgroup->container.begin(); cit != pgroup->container.end(); ++cit) { - if((*cit)->current.location & 0x30) - pduel->game_field->move_card((*cit)->current.controler, (*cit), (*cit)->current.location, 0); - pduel->write_buffer8(MSG_BECOME_TARGET); - pduel->write_buffer8(1); - pduel->write_buffer32((*cit)->get_info_location()); - } - } - } - } - return 0; -} -int32 scriptlib::duel_clear_target_card(lua_State *L) { - duel* pduel = interpreter::get_duel_info(L); - if(pduel->game_field->core.continuous_chain.size()) { - if(pduel->game_field->core.continuous_chain.rbegin()->target_cards) - pduel->game_field->core.continuous_chain.rbegin()->target_cards->container.clear(); - } else if(pduel->game_field->core.current_chain.size()) { - if(pduel->game_field->core.current_chain.rbegin()->target_cards) - pduel->game_field->core.current_chain.rbegin()->target_cards->container.clear(); - } - return 0; -} -int32 scriptlib::duel_set_target_player(lua_State *L) { - check_action_permission(L); - check_param_count(L, 1); - uint32 playerid = lua_tointeger(L, 1); - duel* pduel = interpreter::get_duel_info(L); - if(pduel->game_field->core.continuous_chain.size()) { - pduel->game_field->core.continuous_chain.rbegin()->target_player = playerid; - } else if(pduel->game_field->core.current_chain.size()) { - pduel->game_field->core.current_chain.rbegin()->target_player = playerid; - } - return 0; -} -int32 scriptlib::duel_set_target_param(lua_State *L) { - check_action_permission(L); - check_param_count(L, 1); - uint32 param = lua_tointeger(L, 1); - duel* pduel = interpreter::get_duel_info(L); - if(pduel->game_field->core.continuous_chain.size()) { - pduel->game_field->core.continuous_chain.rbegin()->target_param = param; - } else if(pduel->game_field->core.current_chain.size()) { - pduel->game_field->core.current_chain.rbegin()->target_param = param; - } - return 0; -} -/** -* \brief Duel.SetOperationInfo -* \param target_group, target_count, target_player, targ -* \return N/A -*/ -int32 scriptlib::duel_set_operation_info(lua_State *L) { - check_action_permission(L); - check_param_count(L, 6); - group* pgroup = 0; - card* pcard = 0; - group* pg = 0; - uint32 ct = lua_tointeger(L, 1); - uint32 cate = lua_tointeger(L, 2); - uint32 count = lua_tointeger(L, 4); - uint32 playerid = lua_tointeger(L, 5); - uint32 param = lua_tointeger(L, 6); - duel* pduel; - if(check_param(L, PARAM_TYPE_CARD, 3, TRUE)) { - pcard = *(card**) lua_touserdata(L, 3); - pduel = pcard->pduel; - } else if(check_param(L, PARAM_TYPE_GROUP, 3, TRUE)) { - pgroup = *(group**) lua_touserdata(L, 3); - pduel = pgroup->pduel; - } else - pduel = interpreter::get_duel_info(L); - if(!pduel->game_field->core.continuous_chain.size() && !pduel->game_field->core.current_chain.size()) - return 0; - if( ct && !pduel->game_field->core.current_chain.size()) - return 0; - if(pgroup) { - pg = pduel->new_group(pgroup->container); - pg->is_readonly = TRUE; - } else if(pcard) { - pg = pduel->new_group(pcard); - pg->is_readonly = TRUE; - } else - pg = 0; - optarget opt; - opt.op_cards = pg; - opt.op_count = count; - opt.op_player = playerid; - opt.op_param = param; - if(ct == 0 && pduel->game_field->core.continuous_chain.size()) { - field::chain_list::reverse_iterator clit = pduel->game_field->core.continuous_chain.rbegin(); - chain::opmap::iterator omit = clit->opinfos.find(cate); - if(omit != clit->opinfos.end() && omit->second.op_cards) - pduel->delete_group(omit->second.op_cards); - clit->opinfos[cate] = opt; - } else { - if (pduel->game_field->core.current_chain.size() == 0) - return 0; - if(ct < 1 || ct > pduel->game_field->core.current_chain.size()) { - field::chain_array::reverse_iterator cait = pduel->game_field->core.current_chain.rbegin(); - chain::opmap::iterator omit = cait->opinfos.find(cate); - if(omit != cait->opinfos.end() && omit->second.op_cards) - pduel->delete_group(omit->second.op_cards); - cait->opinfos[cate] = opt; - } else { - chain* ch = &pduel->game_field->core.current_chain[ct - 1]; - chain::opmap::iterator omit = ch->opinfos.find(cate); - if(omit != ch->opinfos.end() && omit->second.op_cards) - pduel->delete_group(omit->second.op_cards); - ch->opinfos[cate] = opt; - } - } - return 0; -} -int32 scriptlib::duel_get_operation_info(lua_State *L) { - check_param_count(L, 2); - uint32 ct = lua_tointeger(L, 1); - uint32 cate = lua_tointeger(L, 2); - duel* pduel = interpreter::get_duel_info(L); - if(!pduel->game_field->core.continuous_chain.size() && !pduel->game_field->core.current_chain.size()) - return 0; - if( ct && !pduel->game_field->core.current_chain.size()) - return 0; - bool found = false; - chain::opmap::iterator oit; - optarget opt; - if(ct == 0 && pduel->game_field->core.continuous_chain.size()) { - if((oit = pduel->game_field->core.continuous_chain.rbegin()->opinfos.find(cate)) != pduel->game_field->core.continuous_chain.rbegin()->opinfos.end()) { - opt = oit->second; - found = true; - } - } else { - if(ct < 1 || ct > pduel->game_field->core.current_chain.size()) { - if((oit = pduel->game_field->core.current_chain.rbegin()->opinfos.find(cate)) != pduel->game_field->core.current_chain.rbegin()->opinfos.end()) { - opt = oit->second; - found = true; - } - } else { - if((oit = pduel->game_field->core.current_chain[ct - 1].opinfos.find(cate)) != pduel->game_field->core.current_chain[ct - 1].opinfos.end()) { - opt = oit->second; - found = true; - } - } - } - if(!found) { - lua_pushboolean(L, 0); - return 1; - } else { - lua_pushboolean(L, 1); - if(opt.op_cards) - interpreter::group2value(L, opt.op_cards); - else - lua_pushnil(L); - lua_pushinteger(L, opt.op_count); - lua_pushinteger(L, opt.op_player); - lua_pushinteger(L, opt.op_param); - return 5; - } -} -int32 scriptlib::duel_get_operation_count(lua_State *L) { - check_param_count(L, 1); - uint32 ct = lua_tointeger(L, 1); - duel* pduel = interpreter::get_duel_info(L); - if(!pduel->game_field->core.continuous_chain.size() && !pduel->game_field->core.current_chain.size()) - return 0; - if( ct && !pduel->game_field->core.current_chain.size()) - return 0; - if(ct == 0 && pduel->game_field->core.continuous_chain.size()) { - lua_pushinteger(L, pduel->game_field->core.continuous_chain.rbegin()->opinfos.size()); - } else { - if(ct < 1 || ct > pduel->game_field->core.current_chain.size()) - lua_pushinteger(L, pduel->game_field->core.current_chain.rbegin()->opinfos.size()); - else - lua_pushinteger(L, pduel->game_field->core.current_chain[ct - 1].opinfos.size()); - } - return 1; -} -int32 scriptlib::duel_check_xyz_material(lua_State *L) { - check_param_count(L, 6); - check_param(L, PARAM_TYPE_CARD, 1); - uint32 findex = 0; - if(!lua_isnil(L, 2)) { - check_param(L, PARAM_TYPE_FUNCTION, 2); - findex = 2; - } - card* scard = *(card**) lua_touserdata(L, 1); - uint32 lv = lua_tointeger(L, 3); - uint32 minc = lua_tointeger(L, 4); - uint32 maxc = lua_tointeger(L, 5); - group* mg = nullptr; - if(!lua_isnil(L, 6)) { - check_param(L, PARAM_TYPE_GROUP, 6); - mg = *(group**) lua_touserdata(L, 6); - } - lua_pushboolean(L, scard->pduel->game_field->check_xyz_material(scard, findex, lv, minc, maxc, mg)); - return 1; -} -int32 scriptlib::duel_select_xyz_material(lua_State *L) { - check_action_permission(L); - check_param_count(L, 6); - check_param(L, PARAM_TYPE_CARD, 2); - uint32 findex = 0; - if(!lua_isnil(L, 3)) { - check_param(L, PARAM_TYPE_FUNCTION, 3); - findex = 3; - } - card* scard = *(card**) lua_touserdata(L, 2); - uint32 playerid = lua_tointeger(L, 1); - uint32 lv = lua_tointeger(L, 4); - uint32 minc = lua_tointeger(L, 5); - uint32 maxc = lua_tointeger(L, 6); - duel* pduel = scard->pduel; - pduel->game_field->get_xyz_material(scard, findex, lv, maxc); - scard->pduel->game_field->add_process(PROCESSOR_SELECT_XMATERIAL, 0, 0, (group*)scard, playerid + (lv << 16), minc + (maxc << 16)); - return lua_yield(L, 0); -} -int32 scriptlib::duel_overlay(lua_State *L) { - check_action_permission(L); - check_param_count(L, 2); - check_param(L, PARAM_TYPE_CARD, 1); - card* target = *(card**) lua_touserdata(L, 1); - card* pcard = 0; - group* pgroup = 0; - if(check_param(L, PARAM_TYPE_CARD, 2, TRUE)) { - pcard = *(card**) lua_touserdata(L, 2); - } else if(check_param(L, PARAM_TYPE_GROUP, 2, TRUE)) { - pgroup = *(group**) lua_touserdata(L, 2); - } else - luaL_error(L, "Parameter %d should be \"Card\" or \"Group\".", 2); - if(pcard) { - card::card_set cset; - cset.insert(pcard); - target->xyz_overlay(&cset); - } else - target->xyz_overlay(&pgroup->container); - if(target->current.location == LOCATION_MZONE) - target->pduel->game_field->adjust_all(); - return lua_yield(L, 0); -} -int32 scriptlib::duel_get_overlay_group(lua_State *L) { - check_param_count(L, 3); - uint32 rplayer = lua_tointeger(L, 1); - if(rplayer != 0 && rplayer != 1) - return 0; - uint32 s = lua_tointeger(L, 2); - uint32 o = lua_tointeger(L, 3); - duel* pduel = interpreter::get_duel_info(L); - group* pgroup = pduel->new_group(); - pduel->game_field->get_overlay_group(rplayer, s, o, &pgroup->container); - interpreter::group2value(L, pgroup); - return 1; -} -int32 scriptlib::duel_get_overlay_count(lua_State *L) { - check_param_count(L, 3); - uint32 rplayer = lua_tointeger(L, 1); - if(rplayer != 0 && rplayer != 1) - return 0; - uint32 s = lua_tointeger(L, 2); - uint32 o = lua_tointeger(L, 3); - duel* pduel = interpreter::get_duel_info(L); - lua_pushinteger(L, pduel->game_field->get_overlay_count(rplayer, s, o)); - return 1; -} -int32 scriptlib::duel_check_remove_overlay_card(lua_State *L) { - check_param_count(L, 5); - int32 playerid = lua_tointeger(L, 1); - if(playerid != 0 && playerid != 1) - return 0; - uint32 s = lua_tointeger(L, 2); - uint32 o = lua_tointeger(L, 3); - int32 count = lua_tointeger(L, 4); - int32 reason = lua_tointeger(L, 5); - duel* pduel = interpreter::get_duel_info(L); - lua_pushboolean(L, pduel->game_field->is_player_can_remove_overlay_card(playerid, 0, s, o, count, reason)); - return 1; -} -int32 scriptlib::duel_remove_overlay_card(lua_State *L) { - check_action_permission(L); - check_param_count(L, 6); - int32 playerid = lua_tointeger(L, 1); - if(playerid != 0 && playerid != 1) - return 0; - uint32 s = lua_tointeger(L, 2); - uint32 o = lua_tointeger(L, 3); - int32 min = lua_tointeger(L, 4); - int32 max = lua_tointeger(L, 5); - int32 reason = lua_tointeger(L, 6); - duel* pduel = interpreter::get_duel_info(L); - pduel->game_field->remove_overlay_card(reason, 0, playerid, s, o, min, max); - return lua_yield(L, 0); -} -int32 scriptlib::duel_hint(lua_State * L) { - check_param_count(L, 3); - int32 htype = lua_tointeger(L, 1); - int32 playerid = lua_tointeger(L, 2); - if(playerid != 0 && playerid != 1) - return 0; - int32 desc = lua_tointeger(L, 3); - if(htype == HINT_OPSELECTED) - playerid = 1 - playerid; - duel* pduel = interpreter::get_duel_info(L); - pduel->write_buffer8(MSG_HINT); - pduel->write_buffer8(htype); - pduel->write_buffer8(playerid); - pduel->write_buffer32(desc); - return 0; -} -int32 scriptlib::duel_hint_selection(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_GROUP, 1); - group* pgroup = *(group**) lua_touserdata(L, 1); - duel* pduel = pgroup->pduel; - for(auto cit = pgroup->container.begin(); cit != pgroup->container.end(); ++cit) { - card* pcard = *cit; - if(pcard->current.location & 0x30) - pduel->game_field->move_card(pcard->current.controler, pcard, pcard->current.location, 0); - pduel->write_buffer8(MSG_BECOME_TARGET); - pduel->write_buffer8(1); - pduel->write_buffer32(pcard->get_info_location()); - } - return 0; -} -int32 scriptlib::duel_select_effect_yesno(lua_State * L) { - check_action_permission(L); - check_param_count(L, 2); - check_param(L, PARAM_TYPE_CARD, 2); - int32 playerid = lua_tointeger(L, 1); - if(playerid != 0 && playerid != 1) - return 0; - card* pcard = *(card**) lua_touserdata(L, 2); - duel* pduel = interpreter::get_duel_info(L); - pduel->game_field->add_process(PROCESSOR_SELECT_EFFECTYN_S, 0, 0, (group*)pcard, playerid, 0); - return lua_yield(L, 0); -} -int32 scriptlib::duel_select_yesno(lua_State * L) { - check_action_permission(L); - check_param_count(L, 2); - int32 playerid = lua_tointeger(L, 1); - if(playerid != 0 && playerid != 1) - return 0; - int32 desc = lua_tointeger(L, 2); - duel* pduel = interpreter::get_duel_info(L); - pduel->game_field->add_process(PROCESSOR_SELECT_YESNO_S, 0, 0, 0, playerid, desc); - return lua_yield(L, 0); -} -int32 scriptlib::duel_select_option(lua_State * L) { - check_action_permission(L); - check_param_count(L, 1); - uint32 count = lua_gettop(L) - 1; - int32 playerid = lua_tointeger(L, 1); - if(playerid != 0 && playerid != 1) - return 0; - duel* pduel = interpreter::get_duel_info(L); - pduel->game_field->core.select_options.clear(); - for(uint32 i = 0; i < count; ++i) - pduel->game_field->core.select_options.push_back(lua_tointeger(L, i + 2)); - pduel->game_field->add_process(PROCESSOR_SELECT_OPTION_S, 0, 0, 0, playerid, 0); - return lua_yield(L, 0); -} -int32 scriptlib::duel_select_sequence(lua_State * L) { - check_action_permission(L); - return 0; -} -int32 scriptlib::duel_select_position(lua_State * L) { - check_action_permission(L); - check_param_count(L, 3); - check_param(L, PARAM_TYPE_CARD, 2); - int32 playerid = lua_tointeger(L, 1); - card* pcard = *(card**) lua_touserdata(L, 2); - uint32 positions = lua_tointeger(L, 3); - duel* pduel = interpreter::get_duel_info(L); - pduel->game_field->add_process(PROCESSOR_SELECT_POSITION_S, 0, 0, 0, playerid + (positions << 16), pcard->data.code); - return lua_yield(L, 0); -} -int32 scriptlib::duel_select_disable_field(lua_State * L) { - check_action_permission(L); - check_param_count(L, 5); - int32 playerid = lua_tointeger(L, 1); - if(playerid != 0 && playerid != 1) - return 0; - uint32 count = lua_tointeger(L, 2); - uint32 location1 = lua_tointeger(L, 3); - uint32 location2 = lua_tointeger(L, 4); - uint32 filter = lua_tointeger(L, 5); - duel* pduel = interpreter::get_duel_info(L); - uint32 ct1 = 0, ct2 = 0, ct3 = 0, ct4 = 0, plist = 0, flag = 0xffffffff; - if(location1 & LOCATION_MZONE) { - ct1 = pduel->game_field->get_useable_count(playerid, LOCATION_MZONE, PLAYER_NONE, 0, &plist); - flag = (flag & 0xffffff00) | plist; - } - if(location1 & LOCATION_SZONE) { - ct2 = pduel->game_field->get_useable_count(playerid, LOCATION_SZONE, PLAYER_NONE, 0, &plist); - flag = (flag & 0xffff00ff) | (plist << 8); - } - if(location2 & LOCATION_MZONE) { - ct3 = pduel->game_field->get_useable_count(1 - playerid, LOCATION_MZONE, PLAYER_NONE, 0, &plist); - flag = (flag & 0xff00ffff) | (plist << 16); - } - if(location2 & LOCATION_SZONE) { - ct4 = pduel->game_field->get_useable_count(1 - playerid, LOCATION_SZONE, PLAYER_NONE, 0, &plist); - flag = (flag & 0xffffff) | (plist << 24); - } - flag |= filter | 0xe0e0e0e0; - if(count > ct1 + ct2 + ct3 + ct4) - count = ct1 + ct2 + ct3 + ct4; - if(count == 0) - return 0; - pduel->game_field->add_process(PROCESSOR_SELECT_DISFIELD_S, 0, 0, 0, playerid + (count << 16), flag); - return lua_yield(L, 0); -} -int32 scriptlib::duel_announce_race(lua_State * L) { - check_action_permission(L); - check_param_count(L, 3); - int32 playerid = lua_tointeger(L, 1); - int32 count = lua_tointeger(L, 2); - int32 available = lua_tointeger(L, 3); - duel* pduel = interpreter::get_duel_info(L); - pduel->game_field->add_process(PROCESSOR_ANNOUNCE_RACE, 0, 0, 0, playerid + (count << 16), available); - return lua_yield(L, 0); -} -int32 scriptlib::duel_announce_attribute(lua_State * L) { - check_action_permission(L); - check_param_count(L, 3); - int32 playerid = lua_tointeger(L, 1); - int32 count = lua_tointeger(L, 2); - int32 available = lua_tointeger(L, 3); - duel* pduel = interpreter::get_duel_info(L); - pduel->game_field->add_process(PROCESSOR_ANNOUNCE_ATTRIB, 0, 0, 0, playerid + (count << 16), available); - return lua_yield(L, 0); -} -int32 scriptlib::duel_announce_level(lua_State * L) { - check_action_permission(L); - check_param_count(L, 1); - int32 playerid = lua_tointeger(L, 1); - duel* pduel = interpreter::get_duel_info(L); - pduel->game_field->add_process(PROCESSOR_ANNOUNCE_NUMBER, 0, 0, 0, playerid + 0x10000, 0xc0001); - return lua_yield(L, 0); -} -int32 scriptlib::duel_announce_card(lua_State * L) { - check_action_permission(L); - check_param_count(L, 1); - int32 playerid = lua_tointeger(L, 1); - duel* pduel = interpreter::get_duel_info(L); - pduel->game_field->add_process(PROCESSOR_ANNOUNCE_CARD, 0, 0, 0, playerid, 0); - return lua_yield(L, 0); -} -int32 scriptlib::duel_announce_type(lua_State * L) { - check_action_permission(L); - check_param_count(L, 1); - duel* pduel = interpreter::get_duel_info(L); - int32 playerid = lua_tointeger(L, 1); - pduel->game_field->core.select_options.clear(); - pduel->game_field->core.select_options.push_back(70); - pduel->game_field->core.select_options.push_back(71); - pduel->game_field->core.select_options.push_back(72); - pduel->game_field->add_process(PROCESSOR_SELECT_OPTION_S, 0, 0, 0, playerid, 0); - return lua_yield(L, 0); -} -int32 scriptlib::duel_announce_number(lua_State * L) { - check_action_permission(L); - check_param_count(L, 2); - int32 playerid = lua_tointeger(L, 1); - duel* pduel = interpreter::get_duel_info(L); - pduel->game_field->core.select_options.clear(); - for(int32 i = 2; i <= lua_gettop(L); ++i) - pduel->game_field->core.select_options.push_back(lua_tointeger(L, i)); - pduel->game_field->add_process(PROCESSOR_ANNOUNCE_NUMBER, 0, 0, 0, playerid, 0); - return lua_yield(L, 0); -} -int32 scriptlib::duel_announce_coin(lua_State * L) { - check_action_permission(L); - check_param_count(L, 1); - duel* pduel = interpreter::get_duel_info(L); - int32 playerid = lua_tointeger(L, 1); - pduel->game_field->core.select_options.clear(); - pduel->game_field->core.select_options.push_back(60); - pduel->game_field->core.select_options.push_back(61); - pduel->game_field->add_process(PROCESSOR_SELECT_OPTION_S, 0, 0, 0, playerid, 0); - return lua_yield(L, 0); -} -int32 scriptlib::duel_toss_coin(lua_State * L) { - check_action_permission(L); - check_param_count(L, 2); - duel* pduel = interpreter::get_duel_info(L); - int32 playerid = lua_tointeger(L, 1); - int32 count = lua_tointeger(L, 2); - if((playerid != 0 && playerid != 1) || count <= 0) - return 0; - if(count > 5) - count = 5; - pduel->game_field->add_process(PROCESSOR_TOSS_COIN, 0, pduel->game_field->core.reason_effect, 0, (pduel->game_field->core.reason_player << 16) + playerid, count); - return lua_yield(L, 0); -} -int32 scriptlib::duel_toss_dice(lua_State * L) { - check_action_permission(L); - check_param_count(L, 2); - duel* pduel = interpreter::get_duel_info(L); - int32 playerid = lua_tointeger(L, 1); - int32 count1 = lua_tointeger(L, 2); - int32 count2 = 0; - if(lua_gettop(L) > 2) - count2 = lua_tointeger(L, 3); - if((playerid != 0 && playerid != 1) || count1 <= 0 || count2 < 0) - return 0; - if(count1 > 5) - count1 = 5; - if(count2 > 5 - count1) - count2 = 5 - count1; - pduel->game_field->add_process(PROCESSOR_TOSS_DICE, 0, pduel->game_field->core.reason_effect, 0, (pduel->game_field->core.reason_player << 16) + playerid, count1 + (count2 << 16)); - return lua_yield(L, 0); -} -int32 scriptlib::duel_get_coin_result(lua_State * L) { - duel* pduel = interpreter::get_duel_info(L); - for(int32 i = 0; i < 5; ++i) - lua_pushinteger(L, pduel->game_field->core.coin_result[i]); - return 5; -} -int32 scriptlib::duel_get_dice_result(lua_State * L) { - duel* pduel = interpreter::get_duel_info(L); - for(int32 i = 0; i < 5; ++i) - lua_pushinteger(L, pduel->game_field->core.dice_result[i]); - return 5; -} -int32 scriptlib::duel_set_coin_result(lua_State * L) { - duel* pduel = interpreter::get_duel_info(L); - int32 res; - for(int32 i = 0; i < 5; ++i) { - res = lua_tointeger(L, i + 1); - if(res != 0 && res != 1) - res = 0; - pduel->game_field->core.coin_result[i] = res; - } - return 0; -} -int32 scriptlib::duel_set_dice_result(lua_State * L) { - duel* pduel = interpreter::get_duel_info(L); - int32 res; - for(int32 i = 0; i < 5; ++i) { - res = lua_tointeger(L, i + 1); - if(res < 1 || res > 6) - res = 1; - pduel->game_field->core.dice_result[i] = res; - } - return 0; -} -int32 scriptlib::duel_is_player_affected_by_effect(lua_State *L) { - check_param_count(L, 2); - duel* pduel = interpreter::get_duel_info(L); - int32 playerid = lua_tointeger(L, 1); - if(playerid != 0 && playerid != 1) { - lua_pushnil(L); - return 1; - } - int32 code = lua_tointeger(L, 2); - effect* peffect = pduel->game_field->is_player_affected_by_effect(playerid, code); - interpreter::effect2value(L, peffect); - return 1; -} -int32 scriptlib::duel_is_player_can_draw(lua_State * L) { - check_param_count(L, 1); - int32 playerid = lua_tointeger(L, 1); - if(playerid != 0 && playerid != 1) { - lua_pushboolean(L, 0); - return 1; - } - uint32 count = 0; - if(lua_gettop(L) > 1) - count = lua_tointeger(L, 2); - duel* pduel = interpreter::get_duel_info(L); - if(count == 0) - lua_pushboolean(L, pduel->game_field->is_player_can_draw(playerid)); - else - lua_pushboolean(L, pduel->game_field->is_player_can_draw(playerid) - && (pduel->game_field->player[playerid].list_main.size() >= count)); - return 1; -} -int32 scriptlib::duel_is_player_can_discard_deck(lua_State * L) { - check_param_count(L, 2); - int32 playerid = lua_tointeger(L, 1); - int32 count = lua_tointeger(L, 2); - if(playerid != 0 && playerid != 1) { - lua_pushboolean(L, 0); - return 1; - } - duel* pduel = interpreter::get_duel_info(L); - lua_pushboolean(L, pduel->game_field->is_player_can_discard_deck(playerid, count)); - return 1; -} -int32 scriptlib::duel_is_player_can_discard_deck_as_cost(lua_State * L) { - check_param_count(L, 2); - int32 playerid = lua_tointeger(L, 1); - int32 count = lua_tointeger(L, 2); - if(playerid != 0 && playerid != 1) { - lua_pushboolean(L, 0); - return 1; - } - duel* pduel = interpreter::get_duel_info(L); - lua_pushboolean(L, pduel->game_field->is_player_can_discard_deck_as_cost(playerid, count)); - return 1; -} -int32 scriptlib::duel_is_player_can_summon(lua_State * L) { - check_param_count(L, 1); - int32 playerid = lua_tointeger(L, 1); - if(playerid != 0 && playerid != 1) { - lua_pushboolean(L, 0); - return 1; - } - duel* pduel = interpreter::get_duel_info(L); - if(lua_gettop(L) == 1) - lua_pushboolean(L, pduel->game_field->is_player_can_summon(playerid)); - else { - check_param_count(L, 3); - check_param(L, PARAM_TYPE_CARD, 3); - int32 sumtype = lua_tointeger(L, 2); - card* pcard = *(card**) lua_touserdata(L, 3); - lua_pushboolean(L, pduel->game_field->is_player_can_summon(sumtype, playerid, pcard)); - } - return 1; -} -int32 scriptlib::duel_is_player_can_spsummon(lua_State * L) { - check_param_count(L, 1); - int32 playerid = lua_tointeger(L, 1); - if(playerid != 0 && playerid != 1) { - lua_pushboolean(L, 0); - return 1; - } - duel* pduel = interpreter::get_duel_info(L); - if(lua_gettop(L) == 1) - lua_pushboolean(L, pduel->game_field->is_player_can_spsummon(playerid)); - else { - check_param_count(L, 5); - check_param(L, PARAM_TYPE_CARD, 5); - int32 sumtype = lua_tointeger(L, 2); - int32 sumpos = lua_tointeger(L, 3); - int32 toplayer = lua_tointeger(L, 4); - card* pcard = *(card**) lua_touserdata(L, 5); - lua_pushboolean(L, pduel->game_field->is_player_can_spsummon(pduel->game_field->core.reason_effect, sumtype, sumpos, playerid, toplayer, pcard)); - } - return 1; -} -int32 scriptlib::duel_is_player_can_flipsummon(lua_State * L) { - check_param_count(L, 2); - int32 playerid = lua_tointeger(L, 1); - check_param(L, PARAM_TYPE_CARD, 2); - card* pcard = *(card**) lua_touserdata(L, 2); - if(playerid != 0 && playerid != 1) { - lua_pushboolean(L, 0); - return 1; - } - duel* pduel = interpreter::get_duel_info(L); - lua_pushboolean(L, pduel->game_field->is_player_can_flipsummon(playerid, pcard)); - return 1; -} -int32 scriptlib::duel_is_player_can_spsummon_monster(lua_State * L) { - check_param_count(L, 9); - int32 playerid = lua_tointeger(L, 1); - if(playerid != 0 && playerid != 1) { - lua_pushboolean(L, 0); - return 1; - } - int32 code = lua_tointeger(L, 2); - card_data dat; - ::read_card(code, &dat); - dat.code = code; - dat.alias = 0; - if(!lua_isnil(L, 3)) - dat.setcode = lua_tointeger(L, 3); - if(!lua_isnil(L, 4)) - dat.type = lua_tointeger(L, 4); - if(!lua_isnil(L, 5)) - dat.attack = lua_tointeger(L, 5); - if(!lua_isnil(L, 6)) - dat.defence = lua_tointeger(L, 6); - if(!lua_isnil(L, 7)) - dat.level = lua_tointeger(L, 7); - if(!lua_isnil(L, 8)) - dat.race = lua_tointeger(L, 8); - if(!lua_isnil(L, 9)) - dat.attribute = lua_tointeger(L, 9); - int32 pos = POS_FACEUP; - int32 toplayer = playerid; - if(lua_gettop(L) >= 10) - pos = lua_tointeger(L, 10); - if(lua_gettop(L) >= 11) - toplayer = lua_tointeger(L, 11); - duel* pduel = interpreter::get_duel_info(L); - lua_pushboolean(L, pduel->game_field->is_player_can_spsummon_monster(playerid, toplayer, pos, &dat)); - return 1; -} -int32 scriptlib::duel_is_player_can_spsummon_count(lua_State * L) { - check_param_count(L, 2); - int32 playerid = lua_tointeger(L, 1); - int32 count = lua_tointeger(L, 2); - if(playerid != 0 && playerid != 1) { - lua_pushboolean(L, 0); - return 1; - } - duel* pduel = interpreter::get_duel_info(L); - lua_pushboolean(L, pduel->game_field->is_player_can_spsummon_count(playerid, count)); - return 1; -} -int32 scriptlib::duel_is_player_can_release(lua_State * L) { - check_param_count(L, 2); - int32 playerid = lua_tointeger(L, 1); - check_param(L, PARAM_TYPE_CARD, 2); - card* pcard = *(card**) lua_touserdata(L, 2); - if(playerid != 0 && playerid != 1) { - lua_pushboolean(L, 0); - return 1; - } - duel* pduel = interpreter::get_duel_info(L); - lua_pushboolean(L, pduel->game_field->is_player_can_release(playerid, pcard)); - return 1; -} -int32 scriptlib::duel_is_player_can_remove(lua_State * L) { - check_param_count(L, 2); - int32 playerid = lua_tointeger(L, 1); - check_param(L, PARAM_TYPE_CARD, 2); - card* pcard = *(card**) lua_touserdata(L, 2); - if(playerid != 0 && playerid != 1) { - lua_pushboolean(L, 0); - return 1; - } - duel* pduel = interpreter::get_duel_info(L); - lua_pushboolean(L, pduel->game_field->is_player_can_remove(playerid, pcard)); - return 1; -} -int32 scriptlib::duel_is_player_can_send_to_hand(lua_State * L) { - check_param_count(L, 2); - int32 playerid = lua_tointeger(L, 1); - check_param(L, PARAM_TYPE_CARD, 2); - card* pcard = *(card**) lua_touserdata(L, 2); - if(playerid != 0 && playerid != 1) { - lua_pushboolean(L, 0); - return 1; - } - duel* pduel = interpreter::get_duel_info(L); - lua_pushboolean(L, pduel->game_field->is_player_can_send_to_hand(playerid, pcard)); - return 1; -} -int32 scriptlib::duel_is_player_can_send_to_grave(lua_State * L) { - check_param_count(L, 2); - int32 playerid = lua_tointeger(L, 1); - check_param(L, PARAM_TYPE_CARD, 2); - card* pcard = *(card**) lua_touserdata(L, 2); - if(playerid != 0 && playerid != 1) { - lua_pushboolean(L, 0); - return 1; - } - duel* pduel = interpreter::get_duel_info(L); - lua_pushboolean(L, pduel->game_field->is_player_can_send_to_grave(playerid, pcard)); - return 1; -} -int32 scriptlib::duel_is_player_can_send_to_deck(lua_State * L) { - check_param_count(L, 2); - int32 playerid = lua_tointeger(L, 1); - check_param(L, PARAM_TYPE_CARD, 2); - card* pcard = *(card**) lua_touserdata(L, 2); - if(playerid != 0 && playerid != 1) { - lua_pushboolean(L, 0); - return 1; - } - duel* pduel = interpreter::get_duel_info(L); - lua_pushboolean(L, pduel->game_field->is_player_can_send_to_deck(playerid, pcard)); - return 1; -} -int32 scriptlib::duel_is_chain_negatable(lua_State * L) { - check_param_count(L, 1); - int32 chaincount = lua_tointeger(L, 1); - duel* pduel = interpreter::get_duel_info(L); - lua_pushboolean(L, pduel->game_field->is_chain_negatable(chaincount, TRUE)); - return 1; -} -int32 scriptlib::duel_is_chain_disablable(lua_State * L) { - check_param_count(L, 1); - int32 chaincount = lua_tointeger(L, 1); - duel* pduel = interpreter::get_duel_info(L); - lua_pushboolean(L, pduel->game_field->is_chain_disablable(chaincount, TRUE)); - return 1; -} -int32 scriptlib::duel_check_chain_target(lua_State *L) { - check_param_count(L, 2); - check_param(L, PARAM_TYPE_CARD, 2); - int32 chaincount = lua_tointeger(L, 1); - card* pcard = *(card**) lua_touserdata(L, 2); - lua_pushboolean(L, pcard->pduel->game_field->check_chain_target(chaincount, pcard)); - return 1; -} -int32 scriptlib::duel_check_chain_uniqueness(lua_State *L) { - duel* pduel = interpreter::get_duel_info(L); - if(pduel->game_field->core.current_chain.size() == 0) { - lua_pushboolean(L, 1); - return 1; - } - std::set er; - for(auto cait = pduel->game_field->core.current_chain.begin(); cait != pduel->game_field->core.current_chain.end(); ++cait) - er.insert(cait->triggering_effect->handler->get_code()); - if(er.size() == pduel->game_field->core.current_chain.size()) - lua_pushboolean(L, 1); - else - lua_pushboolean(L, 0); - return 1; -} -int32 scriptlib::duel_get_activity_count(lua_State *L) { - check_param_count(L, 2); - int32 playerid = lua_tointeger(L, 1); - if(playerid != 0 && playerid != 1) - return 0; - duel* pduel = interpreter::get_duel_info(L); - int32 retct = lua_gettop(L) - 1; - for(int32 i = 0; i < retct; ++i) { - int32 activity_type = lua_tointeger(L, 2 + i); - switch(activity_type) { - case 1: - lua_pushinteger(L, pduel->game_field->core.summon_state_count[playerid]); - break; - case 2: - lua_pushinteger(L, pduel->game_field->core.normalsummon_state_count[playerid]); - break; - case 3: - lua_pushinteger(L, pduel->game_field->core.spsummon_state_count[playerid]); - break; - case 4: - lua_pushinteger(L, pduel->game_field->core.flipsummon_state_count[playerid]); - break; - case 5: - lua_pushinteger(L, pduel->game_field->core.attack_state_count[playerid]); - break; - case 6: - lua_pushinteger(L, pduel->game_field->core.battle_phase_count[playerid]); - break; - default: - lua_pushinteger(L, 0); - break; - } - } - return retct; -} -int32 scriptlib::duel_check_phase_activity(lua_State *L) { - duel* pduel = interpreter::get_duel_info(L); - lua_pushboolean(L, pduel->game_field->core.phase_action); - return 1; -} -int32 scriptlib::duel_add_custom_activity_counter(lua_State *L) { - check_param_count(L, 3); - check_param(L, PARAM_TYPE_FUNCTION, 3); - int32 counter_id = lua_tointeger(L, 1); - int32 activity_type = lua_tointeger(L, 2); - int32 counter_filter = interpreter::get_function_handle(L, 3); - duel* pduel = interpreter::get_duel_info(L); - switch(activity_type) { - case 1: { - auto iter = pduel->game_field->core.summon_counter.find(counter_id); - if(iter != pduel->game_field->core.summon_counter.end()) - break; - pduel->game_field->core.summon_counter[counter_id] = std::make_pair(counter_filter, 0); - break; - } - case 2: { - auto iter = pduel->game_field->core.normalsummon_counter.find(counter_id); - if(iter != pduel->game_field->core.normalsummon_counter.end()) - break; - pduel->game_field->core.normalsummon_counter[counter_id] = std::make_pair(counter_filter, 0); - break; - } - case 3: { - auto iter = pduel->game_field->core.spsummon_counter.find(counter_id); - if(iter != pduel->game_field->core.spsummon_counter.end()) - break; - pduel->game_field->core.spsummon_counter[counter_id] = std::make_pair(counter_filter, 0); - break; - } - case 4: { - auto iter = pduel->game_field->core.flipsummon_counter.find(counter_id); - if(iter != pduel->game_field->core.flipsummon_counter.end()) - break; - pduel->game_field->core.flipsummon_counter[counter_id] = std::make_pair(counter_filter, 0); - break; - } - case 5: { - auto iter = pduel->game_field->core.attack_counter.find(counter_id); - if(iter != pduel->game_field->core.attack_counter.end()) - break; - pduel->game_field->core.attack_counter[counter_id] = std::make_pair(counter_filter, 0); - break; - } - case 6: break; - case 7: { - auto iter = pduel->game_field->core.chain_counter.find(counter_id); - if(iter != pduel->game_field->core.chain_counter.end()) - break; - pduel->game_field->core.chain_counter[counter_id] = std::make_pair(counter_filter, 0); - break; - } - default: - break; - } - return 0; -} -int32 scriptlib::duel_get_custom_activity_count(lua_State *L) { - check_param_count(L, 3); - int32 counter_id = lua_tointeger(L, 1); - int32 playerid = lua_tointeger(L, 2); - int32 activity_type = lua_tointeger(L, 3); - duel* pduel = interpreter::get_duel_info(L); - int32 val = 0; - switch(activity_type) { - case 1: { - auto iter = pduel->game_field->core.summon_counter.find(counter_id); - if(iter != pduel->game_field->core.summon_counter.end()) - val = iter->second.second; - break; - } - case 2: { - auto iter = pduel->game_field->core.normalsummon_counter.find(counter_id); - if(iter != pduel->game_field->core.normalsummon_counter.end()) - val = iter->second.second; - break; - } - case 3: { - auto iter = pduel->game_field->core.spsummon_counter.find(counter_id); - if(iter != pduel->game_field->core.spsummon_counter.end()) - val = iter->second.second; - break; - } - case 4: { - auto iter = pduel->game_field->core.flipsummon_counter.find(counter_id); - if(iter != pduel->game_field->core.flipsummon_counter.end()) - val = iter->second.second; - break; - } - case 5: { - auto iter = pduel->game_field->core.attack_counter.find(counter_id); - if(iter != pduel->game_field->core.attack_counter.end()) - val = iter->second.second; - break; - } - case 6: - break; - case 7: { - auto iter = pduel->game_field->core.chain_counter.find(counter_id); - if(iter != pduel->game_field->core.chain_counter.end()) - val = iter->second.second; - break; - } - default: - break; - } - if(playerid == 0) - lua_pushinteger(L, val & 0xffff); - else - lua_pushinteger(L, (val >> 16) & 0xffff); - return 1; -} -int32 scriptlib::duel_is_able_to_enter_bp(lua_State *L) { - duel* pduel = interpreter::get_duel_info(L); - lua_pushboolean(L, pduel->game_field->is_able_to_enter_bp()); - return 1; -} -int32 scriptlib::duel_venom_swamp_check(lua_State *L) { - check_param_count(L, 2); - check_param(L, PARAM_TYPE_CARD, 2); - card* pcard = *(card**) lua_touserdata(L, 2); - if(pcard->get_counter(0x9) == 0 || pcard->is_affected_by_effect(EFFECT_SWAP_AD) || pcard->is_affected_by_effect(EFFECT_REVERSE_UPDATE)) { - lua_pushboolean(L, 0); - return 1; - } - uint32 base = pcard->get_base_attack(); - pcard->temp.base_attack = base; - pcard->temp.attack = base; - int32 up = 0, upc = 0; - effect_set eset; - effect* peffect = 0; - pcard->filter_effect(EFFECT_UPDATE_ATTACK, &eset, FALSE); - pcard->filter_effect(EFFECT_SET_ATTACK, &eset, FALSE); - pcard->filter_effect(EFFECT_SET_ATTACK_FINAL, &eset); - for (int32 i = 0; i < eset.size(); ++i) { - switch (eset[i]->code) { - case EFFECT_UPDATE_ATTACK: { - if (eset[i]->type & EFFECT_TYPE_SINGLE && !(eset[i]->flag & EFFECT_FLAG_SINGLE_RANGE)) - up += eset[i]->get_value(pcard); - else - upc += eset[i]->get_value(pcard); - if(pcard->temp.attack > 0) - peffect = eset[i]; - break; - } - case EFFECT_SET_ATTACK: - base = eset[i]->get_value(pcard); - if (eset[i]->type & EFFECT_TYPE_SINGLE && !(eset[i]->flag & EFFECT_FLAG_SINGLE_RANGE)) - up = 0; - break; - case EFFECT_SET_ATTACK_FINAL: - if (eset[i]->type & EFFECT_TYPE_SINGLE && !(eset[i]->flag & EFFECT_FLAG_SINGLE_RANGE)) { - base = eset[i]->get_value(pcard); - up = 0; - upc = 0; - peffect = 0; - } - break; - } - pcard->temp.attack = base + up + upc; - } - int32 atk = pcard->temp.attack; - pcard->temp.base_attack = 0xffffffff; - pcard->temp.attack = 0xffffffff; - if((atk <= 0) && peffect && (peffect->handler->get_code() == 54306223)) - lua_pushboolean(L, 1); - else - lua_pushboolean(L, 0); - return 1; -} -int32 scriptlib::duel_swap_deck_and_grave(lua_State *L) { - check_action_permission(L); - check_param_count(L, 1); - int32 playerid = lua_tointeger(L, 1); - if(playerid != 0 && playerid != 1) - return 0; - duel* pduel = interpreter::get_duel_info(L); - pduel->game_field->swap_deck_and_grave(playerid); - return 0; -} -int32 scriptlib::duel_majestic_copy(lua_State *L) { - check_param_count(L, 2); - check_param(L, PARAM_TYPE_CARD, 1); - check_param(L, PARAM_TYPE_CARD, 2); - card* pcard = *(card**) lua_touserdata(L, 1); - card* ccard = *(card**) lua_touserdata(L, 2); - duel* pduel = pcard->pduel; - card::effect_container::iterator eit; - for(eit = ccard->single_effect.begin(); eit != ccard->field_effect.end(); ++eit) { - if(eit == ccard->single_effect.end()) { - eit = ccard->field_effect.begin(); - if(eit == ccard->field_effect.end()) - break; - } - effect* peffect = eit->second; - if(!(peffect->type & 0x7c)) continue; - if(!(peffect->flag & EFFECT_FLAG_INITIAL)) continue; - effect* ceffect = pduel->new_effect(); - int32 ref = ceffect->ref_handle; - *ceffect = *peffect; - ceffect->ref_handle = ref; - ceffect->owner = pcard; - ceffect->handler = 0; - ceffect->flag &= ~EFFECT_FLAG_INITIAL; - ceffect->effect_owner = PLAYER_NONE; - if(peffect->condition) { - lua_rawgeti(L, LUA_REGISTRYINDEX, peffect->condition); - ceffect->condition = luaL_ref(L, LUA_REGISTRYINDEX); - } - if(peffect->cost) { - lua_rawgeti(L, LUA_REGISTRYINDEX, peffect->cost); - ceffect->cost = luaL_ref(L, LUA_REGISTRYINDEX); - } - if(peffect->target) { - lua_rawgeti(L, LUA_REGISTRYINDEX, peffect->target); - ceffect->target = luaL_ref(L, LUA_REGISTRYINDEX); - } - if(peffect->operation) { - lua_rawgeti(L, LUA_REGISTRYINDEX, peffect->operation); - ceffect->operation = luaL_ref(L, LUA_REGISTRYINDEX); - } - ceffect->reset_flag = RESET_EVENT + 0x1fe0000 + RESET_PHASE + PHASE_END + RESET_SELF_TURN + RESET_OPPO_TURN; - ceffect->reset_count = (ceffect->reset_count & 0xff00) | 0x1; - ceffect->recharge(); - if(ceffect->type & EFFECT_TYPE_TRIGGER_F) { - ceffect->type &= ~EFFECT_TYPE_TRIGGER_F; - ceffect->type |= EFFECT_TYPE_TRIGGER_O; - ceffect->flag |= EFFECT_FLAG_DELAY; - } - if(ceffect->type & EFFECT_TYPE_QUICK_F) { - ceffect->type &= ~EFFECT_TYPE_QUICK_F; - ceffect->type |= EFFECT_TYPE_QUICK_O; - } - pcard->add_effect(ceffect); - } - return 0; -} diff --git a/ocgcore/libeffect.cpp b/ocgcore/libeffect.cpp deleted file mode 100644 index c05d500f8f..0000000000 --- a/ocgcore/libeffect.cpp +++ /dev/null @@ -1,543 +0,0 @@ -/* - * libeffect.cpp - * - * Created on: 2010-7-20 - * Author: Argon - */ - -#include "scriptlib.h" -#include "duel.h" -#include "field.h" -#include "card.h" -#include "effect.h" - -int32 scriptlib::effect_new(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_CARD, 1); - card* pcard = *(card**) lua_touserdata(L, 1); - duel* pduel = pcard->pduel; - effect* peffect = pduel->new_effect(); - peffect->effect_owner = pduel->game_field->core.reason_player; - peffect->owner = pcard; - interpreter::effect2value(L, peffect); - return 1; -} -int32 scriptlib::effect_newex(lua_State *L) { - duel* pduel = interpreter::get_duel_info(L); - effect* peffect = pduel->new_effect(); - peffect->effect_owner = 0; - peffect->owner = pduel->game_field->temp_card; - interpreter::effect2value(L, peffect); - return 1; -} -int32 scriptlib::effect_clone(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_EFFECT, 1); - effect* peffect = *(effect**) lua_touserdata(L, 1); - duel* pduel = peffect->pduel; - effect* ceffect = pduel->new_effect(); - int32 ref = ceffect->ref_handle; - *ceffect = *peffect; - ceffect->ref_handle = ref; - ceffect->handler = 0; - ceffect->effect_owner = peffect->effect_owner; - if(peffect->condition) { - lua_rawgeti(L, LUA_REGISTRYINDEX, peffect->condition); - ceffect->condition = luaL_ref(L, LUA_REGISTRYINDEX); - } - if(peffect->cost) { - lua_rawgeti(L, LUA_REGISTRYINDEX, peffect->cost); - ceffect->cost = luaL_ref(L, LUA_REGISTRYINDEX); - } - if(peffect->target) { - lua_rawgeti(L, LUA_REGISTRYINDEX, peffect->target); - ceffect->target = luaL_ref(L, LUA_REGISTRYINDEX); - } - if(peffect->operation) { - lua_rawgeti(L, LUA_REGISTRYINDEX, peffect->operation); - ceffect->operation = luaL_ref(L, LUA_REGISTRYINDEX); - } - if(peffect->value && (peffect->flag & EFFECT_FLAG_FUNC_VALUE)) { - lua_rawgeti(L, LUA_REGISTRYINDEX, peffect->value); - ceffect->value = luaL_ref(L, LUA_REGISTRYINDEX); - } - interpreter::effect2value(L, ceffect); - return 1; -} -int32 scriptlib::effect_reset(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_EFFECT, 1); - effect* peffect = *(effect**) lua_touserdata(L, 1); - if(peffect->owner == 0) - return 0; - if(peffect->flag & EFFECT_FLAG_FIELD_ONLY) - peffect->pduel->game_field->remove_effect(peffect); - else - peffect->handler->remove_effect(peffect); - return 0; -} -int32 scriptlib::effect_get_field_id(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_EFFECT, 1); - effect* peffect = *(effect**) lua_touserdata(L, 1); - lua_pushinteger(L, peffect->id); - return 1; -} -int32 scriptlib::effect_set_description(lua_State *L) { - check_param_count(L, 2); - check_param(L, PARAM_TYPE_EFFECT, 1); - effect* peffect = *(effect**) lua_touserdata(L, 1); - int32 v = lua_tointeger(L, 2); - peffect->description = v; - return 0; -} -int32 scriptlib::effect_set_code(lua_State *L) { - check_param_count(L, 2); - check_param(L, PARAM_TYPE_EFFECT, 1); - effect* peffect = *(effect**) lua_touserdata(L, 1); - int32 v = lua_tointeger(L, 2); - peffect->code = v; - return 0; -} -int32 scriptlib::effect_set_range(lua_State *L) { - check_param_count(L, 2); - check_param(L, PARAM_TYPE_EFFECT, 1); - effect* peffect = *(effect**) lua_touserdata(L, 1); - int32 v = lua_tointeger(L, 2); - peffect->range = v; - return 0; -} -int32 scriptlib::effect_set_target_range(lua_State *L) { - check_param_count(L, 3); - check_param(L, PARAM_TYPE_EFFECT, 1); - effect* peffect = *(effect**) lua_touserdata(L, 1); - int32 s = lua_tointeger(L, 2); - int32 o = lua_tointeger(L, 3); - peffect->s_range = s; - peffect->o_range = o; - peffect->flag &= ~EFFECT_FLAG_ABSOLUTE_TARGET; - return 0; -} -int32 scriptlib::effect_set_absolute_range(lua_State *L) { - check_param_count(L, 4); - check_param(L, PARAM_TYPE_EFFECT, 1); - effect* peffect = *(effect**) lua_touserdata(L, 1); - int32 playerid = lua_tointeger(L, 2); - int32 s = lua_tointeger(L, 3); - int32 o = lua_tointeger(L, 4); - if(playerid == 0) { - peffect->s_range = s; - peffect->o_range = o; - } else { - peffect->s_range = o; - peffect->o_range = s; - } - peffect->flag |= EFFECT_FLAG_ABSOLUTE_TARGET; - return 0; -} -int32 scriptlib::effect_set_count_limit(lua_State *L) { - check_param_count(L, 2); - check_param(L, PARAM_TYPE_EFFECT, 1); - effect* peffect = *(effect**) lua_touserdata(L, 1); - int32 v = lua_tointeger(L, 2); - uint32 code = 0; - if(lua_gettop(L) >= 3) - code = lua_tointeger(L, 3); - if(v == 0) - v = 1; - peffect->flag |= EFFECT_FLAG_COUNT_LIMIT; - peffect->reset_count |= ((v << 12) & 0xf000) | ((v << 8) & 0xf00); - peffect->count_code = code; - return 0; -} -int32 scriptlib::effect_set_reset(lua_State *L) { - check_param_count(L, 2); - check_param(L, PARAM_TYPE_EFFECT, 1); - effect* peffect = *(effect**) lua_touserdata(L, 1); - int32 v = lua_tointeger(L, 2); - int32 c = lua_tointeger(L, 3); - if(c == 0) - c = 1; - if(v & (RESET_PHASE) && !(v & (RESET_SELF_TURN | RESET_OPPO_TURN))) - v |= (RESET_SELF_TURN | RESET_OPPO_TURN); - peffect->reset_flag = v; - peffect->reset_count = (peffect->reset_count & 0xff00) | (c & 0xff); - return 0; -} -int32 scriptlib::effect_set_type(lua_State *L) { - check_param_count(L, 2); - check_param(L, PARAM_TYPE_EFFECT, 1); - effect* peffect = *(effect**) lua_touserdata(L, 1); - int32 v = lua_tointeger(L, 2); - if (v & 0x0ff0) - v |= EFFECT_TYPE_ACTIONS; - else - v &= ~EFFECT_TYPE_ACTIONS; - if(v & 0x550) - v |= EFFECT_TYPE_FIELD; - if(v & EFFECT_TYPE_ACTIVATE) - peffect->range = LOCATION_SZONE + LOCATION_FZONE + LOCATION_HAND; - if(v & EFFECT_TYPE_FLIP) { - peffect->code = EVENT_FLIP; - if(!(v & EFFECT_TYPE_TRIGGER_O)) - v |= EFFECT_TYPE_TRIGGER_F; - } - peffect->type = v; - return 0; -} -int32 scriptlib::effect_set_property(lua_State *L) { - check_param_count(L, 2); - check_param(L, PARAM_TYPE_EFFECT, 1); - effect* peffect = *(effect**) lua_touserdata(L, 1); - uint32 v = lua_tounsigned(L, 2); - peffect->flag = (peffect->flag & 0x4f) | (v & ~0x4f); - return 0; -} -int32 scriptlib::effect_set_label(lua_State *L) { - check_param_count(L, 2); - check_param(L, PARAM_TYPE_EFFECT, 1); - effect* peffect = *(effect**) lua_touserdata(L, 1); - int32 v = lua_tointeger(L, 2); - peffect->label = v; - return 0; -} -int32 scriptlib::effect_set_label_object(lua_State *L) { - check_param_count(L, 2); - check_param(L, PARAM_TYPE_EFFECT, 1); - effect* peffect = *(effect**) lua_touserdata(L, 1); - if(lua_isnil(L, 2)) { - peffect->label_object = 0; - return 0; - } - if(!lua_isuserdata(L, 2)) - luaL_error(L, "Parameter 2 should be \"Card\" or \"Effect\" or \"Group\"."); - void* p = *(void**)lua_touserdata(L, 2); - peffect->label_object = p; - return 0; -} -int32 scriptlib::effect_set_category(lua_State *L) { - check_param_count(L, 2); - check_param(L, PARAM_TYPE_EFFECT, 1); - effect* peffect = *(effect**) lua_touserdata(L, 1); - int32 v = lua_tointeger(L, 2); - peffect->category = v; - return 0; -} -int32 scriptlib::effect_set_hint_timing(lua_State *L) { - check_param_count(L, 2); - check_param(L, PARAM_TYPE_EFFECT, 1); - effect* peffect = *(effect**) lua_touserdata(L, 1); - int32 vs = lua_tointeger(L, 2); - int32 vo = vs; - if(lua_gettop(L) >= 3) - vo = lua_tointeger(L, 3); - peffect->hint_timing[0] = vs; - peffect->hint_timing[1] = vo; - return 0; -} -int32 scriptlib::effect_set_condition(lua_State *L) { - check_param_count(L, 2); - check_param(L, PARAM_TYPE_EFFECT, 1); - check_param(L, PARAM_TYPE_FUNCTION, 2); - effect* peffect = *(effect**) lua_touserdata(L, 1); - if(peffect->condition) - luaL_unref(L, LUA_REGISTRYINDEX, peffect->condition); - peffect->condition = interpreter::get_function_handle(L, 2); - return 0; -} -int32 scriptlib::effect_set_target(lua_State *L) { - check_param_count(L, 2); - check_param(L, PARAM_TYPE_EFFECT, 1); - check_param(L, PARAM_TYPE_FUNCTION, 2); - effect* peffect = *(effect**) lua_touserdata(L, 1); - if(peffect->target) - luaL_unref(L, LUA_REGISTRYINDEX, peffect->target); - peffect->target = interpreter::get_function_handle(L, 2); - return 0; -} -int32 scriptlib::effect_set_cost(lua_State *L) { - check_param_count(L, 2); - check_param(L, PARAM_TYPE_EFFECT, 1); - check_param(L, PARAM_TYPE_FUNCTION, 2); - effect* peffect = *(effect**) lua_touserdata(L, 1); - if(peffect->cost) - luaL_unref(L, LUA_REGISTRYINDEX, peffect->cost); - peffect->cost = interpreter::get_function_handle(L, 2); - return 0; -} -int32 scriptlib::effect_set_value(lua_State *L) { - check_param_count(L, 2); - check_param(L, PARAM_TYPE_EFFECT, 1); - effect* peffect = *(effect**) lua_touserdata(L, 1); - if(peffect->value && (peffect->flag & EFFECT_FLAG_FUNC_VALUE)) - luaL_unref(L, LUA_REGISTRYINDEX, peffect->value); - if (lua_isfunction(L, 2)) { - peffect->value = interpreter::get_function_handle(L, 2); - peffect->flag |= EFFECT_FLAG_FUNC_VALUE; - } else { - peffect->flag &= ~EFFECT_FLAG_FUNC_VALUE; - if(lua_isboolean(L, 2)) - peffect->value = lua_toboolean(L, 2); - else - peffect->value = lua_tointeger(L, 2); - } - return 0; -} -int32 scriptlib::effect_set_operation(lua_State *L) { - check_param_count(L, 2); - check_param(L, PARAM_TYPE_EFFECT, 1); - effect* peffect = *(effect**) lua_touserdata(L, 1); - if(peffect->operation) - luaL_unref(L, LUA_REGISTRYINDEX, peffect->operation); - if(!lua_isnil(L, 2)) { - check_param(L, PARAM_TYPE_FUNCTION, 2); - peffect->operation = interpreter::get_function_handle(L, 2); - } else - peffect->operation = 0; - return 0; -} -int32 scriptlib::effect_set_owner_player(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_EFFECT, 1); - effect* peffect = *(effect**) lua_touserdata(L, 1); - int32 p = lua_tointeger(L, 2); - if(p != 0 && p != 1) - return 0; - peffect->effect_owner = p; - return 0; -} -int32 scriptlib::effect_get_description(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_EFFECT, 1); - effect* peffect = *(effect**) lua_touserdata(L, 1); - if (peffect) { - lua_pushinteger(L, peffect->description); - return 1; - } - return 0; -} -int32 scriptlib::effect_get_code(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_EFFECT, 1); - effect* peffect = *(effect**) lua_touserdata(L, 1); - if (peffect) { - lua_pushinteger(L, peffect->code); - return 1; - } - return 0; -} -int32 scriptlib::effect_get_type(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_EFFECT, 1); - effect* peffect = *(effect**) lua_touserdata(L, 1); - if (peffect) { - lua_pushinteger(L, peffect->type); - return 1; - } - return 0; -} -int32 scriptlib::effect_get_property(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_EFFECT, 1); - effect* peffect = *(effect**) lua_touserdata(L, 1); - if (peffect) { - lua_pushunsigned(L, peffect->flag); - return 1; - } - return 0; -} -int32 scriptlib::effect_get_label(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_EFFECT, 1); - effect* peffect = *(effect**) lua_touserdata(L, 1); - if (peffect) { - lua_pushinteger(L, peffect->label); - return 1; - } - return 0; -} -int32 scriptlib::effect_get_label_object(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_EFFECT, 1); - effect* peffect = *(effect**) lua_touserdata(L, 1); - if (!peffect->label_object) { - lua_pushnil(L); - return 1; - } - int32 type = *(int32*)peffect->label_object; - if(type == 1) - interpreter::card2value(L, (card*)peffect->label_object); - else if(type == 2) - interpreter::group2value(L, (group*)peffect->label_object); - else if(type == 3) - interpreter::effect2value(L, (effect*)peffect->label_object); - else lua_pushnil(L); - return 1; -} -int32 scriptlib::effect_get_category(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_EFFECT, 1); - effect* peffect = *(effect**) lua_touserdata(L, 1); - if (peffect) { - lua_pushinteger(L, peffect->category); - return 1; - } - return 0; -} -int32 scriptlib::effect_get_owner(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_EFFECT, 1); - effect* peffect = *(effect**) lua_touserdata(L, 1); - interpreter::card2value(L, peffect->owner); - return 1; -} -int32 scriptlib::effect_get_handler(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_EFFECT, 1); - effect* peffect = *(effect**) lua_touserdata(L, 1); - interpreter::card2value(L, peffect->handler); - return 1; -} -int32 scriptlib::effect_get_owner_player(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_EFFECT, 1); - effect* peffect = *(effect**) lua_touserdata(L, 1); - lua_pushinteger(L, peffect->get_owner_player()); - return 1; -} -int32 scriptlib::effect_get_handler_player(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_EFFECT, 1); - effect* peffect = *(effect**) lua_touserdata(L, 1); - lua_pushinteger(L, peffect->get_handler_player()); - return 1; -} -int32 scriptlib::effect_get_condition(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_EFFECT, 1); - effect* peffect = *(effect**) lua_touserdata(L, 1); - interpreter::function2value(L, peffect->condition); - return 1; -} -int32 scriptlib::effect_get_target(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_EFFECT, 1); - effect* peffect = *(effect**) lua_touserdata(L, 1); - interpreter::function2value(L, peffect->target); - return 1; -} -int32 scriptlib::effect_get_cost(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_EFFECT, 1); - effect* peffect = *(effect**) lua_touserdata(L, 1); - interpreter::function2value(L, peffect->cost); - return 1; -} -int32 scriptlib::effect_get_value(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_EFFECT, 1); - effect* peffect = *(effect**) lua_touserdata(L, 1); - if(peffect->flag & EFFECT_FLAG_FUNC_VALUE) - interpreter::function2value(L, peffect->value); - else - lua_pushinteger(L, (int32)peffect->value); - return 1; -} -int32 scriptlib::effect_get_operation(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_EFFECT, 1); - effect* peffect = *(effect**) lua_touserdata(L, 1); - interpreter::function2value(L, peffect->operation); - return 1; -} -int32 scriptlib::effect_get_active_type(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_EFFECT, 1); - effect* peffect = *(effect**) lua_touserdata(L, 1); - uint32 atype; - if(peffect->type & 0x7f0) { - if(peffect->active_type) - atype = peffect->active_type; - else if((peffect->type & EFFECT_TYPE_ACTIVATE) && (peffect->handler->data.type & TYPE_PENDULUM)) - atype = TYPE_PENDULUM + TYPE_SPELL; - else - atype = peffect->handler->get_type(); - } else - atype = peffect->owner->get_type(); - lua_pushinteger(L, atype); - return 1; -} -int32 scriptlib::effect_is_active_type(lua_State *L) { - check_param_count(L, 2); - check_param(L, PARAM_TYPE_EFFECT, 1); - effect* peffect = *(effect**) lua_touserdata(L, 1); - uint32 tpe = lua_tointeger(L, 2); - uint32 atype; - if(peffect->type & 0x7f0) { - if(peffect->active_type) - atype = peffect->active_type; - else if((peffect->type & EFFECT_TYPE_ACTIVATE) && (peffect->handler->data.type & TYPE_PENDULUM)) - atype = TYPE_PENDULUM + TYPE_SPELL; - else - atype = peffect->handler->get_type(); - } else - atype = peffect->owner->get_type(); - lua_pushboolean(L, atype & tpe); - return 1; -} -int32 scriptlib::effect_is_has_property(lua_State *L) { - check_param_count(L, 2); - check_param(L, PARAM_TYPE_EFFECT, 1); - effect* peffect = *(effect**) lua_touserdata(L, 1); - uint32 tflag = lua_tounsigned(L, 2); - if (peffect && (peffect->flag & tflag)) - lua_pushboolean(L, 1); - else - lua_pushboolean(L, 0); - return 1; -} -int32 scriptlib::effect_is_has_category(lua_State *L) { - check_param_count(L, 2); - check_param(L, PARAM_TYPE_EFFECT, 1); - effect* peffect = *(effect**) lua_touserdata(L, 1); - uint32 tcate = lua_tointeger(L, 2); - if (peffect && (peffect->category & tcate)) - lua_pushboolean(L, 1); - else - lua_pushboolean(L, 0); - return 1; -} -int32 scriptlib::effect_is_has_type(lua_State *L) { - check_param_count(L, 2); - check_param(L, PARAM_TYPE_EFFECT, 1); - effect* peffect = *(effect**) lua_touserdata(L, 1); - uint32 ttype = lua_tointeger(L, 2); - if (peffect && (peffect->type & ttype)) - lua_pushboolean(L, 1); - else - lua_pushboolean(L, 0); - return 1; -} -int32 scriptlib::effect_is_activatable(lua_State *L) { - check_param_count(L, 2); - check_param(L, PARAM_TYPE_EFFECT, 1); - uint32 playerid = lua_tointeger(L, 2); - effect* peffect = *(effect**) lua_touserdata(L, 1); - lua_pushboolean(L, peffect->is_activateable(playerid, peffect->pduel->game_field->nil_event)); - return 1; -} -int32 scriptlib::effect_is_activated(lua_State * L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_EFFECT, 1); - effect* peffect = *(effect**) lua_touserdata(L, 1); - lua_pushboolean(L, (peffect->status & EFFECT_STATUS_ACTIVATED)); - return 1; -} - -int32 scriptlib::effect_get_activate_location(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_EFFECT, 1); - effect* peffect = *(effect**) lua_touserdata(L, 1); - lua_pushinteger(L, peffect->s_range); - return 1; -} \ No newline at end of file diff --git a/ocgcore/libgroup.cpp b/ocgcore/libgroup.cpp deleted file mode 100644 index 4d7ac3a16b..0000000000 --- a/ocgcore/libgroup.cpp +++ /dev/null @@ -1,558 +0,0 @@ -/* - * libgroup.cpp - * - * Created on: 2010-5-6 - * Author: Argon - */ - -#include "scriptlib.h" -#include "group.h" -#include "card.h" -#include "effect.h" -#include "duel.h" - -int32 scriptlib::group_new(lua_State *L) { - duel* pduel = interpreter::get_duel_info(L); - group* pgroup = pduel->new_group(); - interpreter::group2value(L, pgroup); - return 1; -} -int32 scriptlib::group_clone(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_GROUP, 1); - group* pgroup = *(group**) lua_touserdata(L, 1); - duel* pduel = pgroup->pduel; - group* newgroup = pduel->new_group(pgroup->container); - interpreter::group2value(L, newgroup); - return 1; -} -int32 scriptlib::group_from_cards(lua_State *L) { - duel* pduel = interpreter::get_duel_info(L); - group* pgroup = pduel->new_group(); - card* pcard; - void* p; - for(int32 i = 0; i < lua_gettop(L); ++i) { - p = lua_touserdata(L, i + 1); - if(p) { - pcard = *(card**)p; - pgroup->container.insert(pcard); - } - } - interpreter::group2value(L, pgroup); - return 1; -} -int32 scriptlib::group_delete(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_GROUP, 1); - duel* pduel = interpreter::get_duel_info(L); - group* pgroup = *(group**) lua_touserdata(L, 1); - if(pgroup->is_readonly != 2) - return 0; - pgroup->is_readonly = 0; - pduel->sgroups.insert(pgroup); - return 0; -} -int32 scriptlib::group_keep_alive(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_GROUP, 1); - duel* pduel = interpreter::get_duel_info(L); - group* pgroup = *(group**) lua_touserdata(L, 1); - if(pgroup->is_readonly == 1) - return 0; - pgroup->is_readonly = 2; - pduel->sgroups.erase(pgroup); - return 0; -} -int32 scriptlib::group_clear(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_GROUP, 1); - group* pgroup = *(group**) lua_touserdata(L, 1); - if (pgroup->is_readonly != 1) { - pgroup->container.clear(); - } - return 0; -} -int32 scriptlib::group_add_card(lua_State *L) { - check_param_count(L, 2); - check_param(L, PARAM_TYPE_GROUP, 1); - check_param(L, PARAM_TYPE_CARD, 2); - group* pgroup = *(group**) lua_touserdata(L, 1); - card* pcard = *(card**) lua_touserdata(L, 2); - if (pgroup->is_readonly != 1) { - pgroup->container.insert(pcard); - } - return 0; -} -int32 scriptlib::group_remove_card(lua_State *L) { - check_param_count(L, 2); - check_param(L, PARAM_TYPE_GROUP, 1); - check_param(L, PARAM_TYPE_CARD, 2); - group* pgroup = *(group**) lua_touserdata(L, 1); - card* pcard = *(card**) lua_touserdata(L, 2); - if (pgroup->is_readonly != 1) { - pgroup->container.erase(pcard); - } - return 0; -} -int32 scriptlib::group_get_next(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_GROUP, 1); - group* pgroup = *(group**) lua_touserdata(L, 1); - if(pgroup->it == pgroup->container.end()) - lua_pushnil(L); - else { - ++pgroup->it; - if (pgroup->it == pgroup->container.end()) - lua_pushnil(L); - else - interpreter::card2value(L, (*(pgroup->it))); - } - return 1; -} -int32 scriptlib::group_get_first(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_GROUP, 1); - group* pgroup = *(group**) lua_touserdata(L, 1); - if (pgroup->container.size()) { - pgroup->it = pgroup->container.begin(); - interpreter::card2value(L, (*(pgroup->it))); - } else - lua_pushnil(L); - return 1; -} -int32 scriptlib::group_get_count(lua_State *L) { - check_param_count(L, 1); - check_param(L, PARAM_TYPE_GROUP, 1); - group* pgroup = *(group**) lua_touserdata(L, 1); - lua_pushinteger(L, pgroup->container.size()); - return 1; -} -int32 scriptlib::group_for_each(lua_State *L) { - check_param_count(L, 2); - check_param(L, PARAM_TYPE_GROUP, 1); - check_param(L, PARAM_TYPE_FUNCTION, 2); - duel* pduel = interpreter::get_duel_info(L); - group* pgroup = *(group**) lua_touserdata(L, 1); - int32 f = interpreter::get_function_handle(L, 2); - group::card_set::iterator it; - for (it = pgroup->container.begin(); it != pgroup->container.end(); ++it) { - pduel->lua->add_param((*it), PARAM_TYPE_CARD); - pduel->lua->call_function(f, 1, 0); - } - return 0; -} -int32 scriptlib::group_filter(lua_State *L) { - check_param_count(L, 3); - check_param(L, PARAM_TYPE_GROUP, 1); - check_param(L, PARAM_TYPE_FUNCTION, 2); - card* pexception = 0; - if(!lua_isnil(L, 3)) { - check_param(L, PARAM_TYPE_CARD, 3); - pexception = *(card**) lua_touserdata(L, 3); - } - group* pgroup = *(group**) lua_touserdata(L, 1); - duel* pduel = pgroup->pduel; - group* new_group = pduel->new_group(); - uint32 extraargs = lua_gettop(L) - 3; - group::card_set::iterator it; - for (it = pgroup->container.begin(); it != pgroup->container.end(); ++it) { - if((*it) != pexception && pduel->lua->check_matching(*it, 2, extraargs)) { - new_group->container.insert(*it); - } - } - interpreter::group2value(L, new_group); - return 1; -} -int32 scriptlib::group_filter_count(lua_State *L) { - check_param_count(L, 3); - check_param(L, PARAM_TYPE_GROUP, 1); - check_param(L, PARAM_TYPE_FUNCTION, 2); - card* pexception = 0; - if(!lua_isnil(L, 3)) { - check_param(L, PARAM_TYPE_CARD, 3); - pexception = *(card**) lua_touserdata(L, 3); - } - group* pgroup = *(group**) lua_touserdata(L, 1); - duel* pduel = pgroup->pduel; - uint32 extraargs = lua_gettop(L) - 3; - uint32 count = 0; - group::card_set::iterator it; - for (it = pgroup->container.begin(); it != pgroup->container.end(); ++it) { - if((*it) != pexception && pduel->lua->check_matching(*it, 2, extraargs)) - count++; - } - lua_pushinteger(L, count); - return 1; -} -int32 scriptlib::group_filter_select(lua_State *L) { - check_action_permission(L); - check_param_count(L, 6); - check_param(L, PARAM_TYPE_GROUP, 1); - check_param(L, PARAM_TYPE_FUNCTION, 3); - card* pexception = 0; - if(!lua_isnil(L, 6)) { - check_param(L, PARAM_TYPE_CARD, 6); - pexception = *(card**) lua_touserdata(L, 6); - } - group* pgroup = *(group**) lua_touserdata(L, 1); - duel* pduel = pgroup->pduel; - uint32 playerid = lua_tointeger(L, 2); - if(playerid != 0 && playerid != 1) - return 0; - uint32 min = lua_tointeger(L, 4); - uint32 max = lua_tointeger(L, 5); - uint32 extraargs = lua_gettop(L) - 6; - pduel->game_field->core.select_cards.clear(); - group::card_set::iterator it; - for (it = pgroup->container.begin(); it != pgroup->container.end(); ++it) { - if((*it) != pexception && pduel->lua->check_matching(*it, 3, extraargs)) - pduel->game_field->core.select_cards.push_back(*it); - } - pduel->game_field->add_process(PROCESSOR_SELECT_CARD_S, 0, 0, 0, playerid, min + (max << 16)); - return lua_yield(L, 0); -} -int32 scriptlib::group_select(lua_State *L) { - check_action_permission(L); - check_param_count(L, 5); - check_param(L, PARAM_TYPE_GROUP, 1); - card* pexception = 0; - if(!lua_isnil(L, 5)) { - check_param(L, PARAM_TYPE_CARD, 5); - pexception = *(card**) lua_touserdata(L, 5); - } - group* pgroup = *(group**) lua_touserdata(L, 1); - duel* pduel = pgroup->pduel; - uint32 playerid = lua_tointeger(L, 2); - if(playerid != 0 && playerid != 1) - return 0; - uint32 min = lua_tointeger(L, 3); - uint32 max = lua_tointeger(L, 4); - pduel->game_field->core.select_cards.clear(); - group::card_set::iterator it; - for (it = pgroup->container.begin(); it != pgroup->container.end(); ++it) { - if((*it) != pexception) - pduel->game_field->core.select_cards.push_back(*it); - } - pduel->game_field->add_process(PROCESSOR_SELECT_CARD_S, 0, 0, 0, playerid, min + (max << 16)); - return lua_yield(L, 0); -} -int32 scriptlib::group_random_select(lua_State *L) { - check_param_count(L, 3); - check_param(L, PARAM_TYPE_GROUP, 1); - group* pgroup = *(group**) lua_touserdata(L, 1); - int32 playerid = lua_tointeger(L, 2); - int32 count = lua_tointeger(L, 3); - pgroup->pduel->game_field->add_process(PROCESSOR_RANDOM_SELECT_S, 0, 0, pgroup, playerid, count); - return lua_yield(L, 0); -} -int32 scriptlib::group_is_exists(lua_State *L) { - check_param_count(L, 4); - check_param(L, PARAM_TYPE_GROUP, 1); - check_param(L, PARAM_TYPE_FUNCTION, 2); - card* pcard = 0; - if(!lua_isnil(L, 4)) { - check_param(L, PARAM_TYPE_CARD, 4); - pcard = *(card**) lua_touserdata(L, 4); - } - group* pgroup = *(group**) lua_touserdata(L, 1); - duel* pduel = pgroup->pduel; - uint32 count = lua_tointeger(L, 3); - uint32 extraargs = lua_gettop(L) - 4; - uint32 fcount = 0; - uint32 result = FALSE; - for (auto it = pgroup->container.begin(); it != pgroup->container.end(); ++it) { - if((*it) != pcard && pduel->lua->check_matching(*it, 2, extraargs)) { - fcount++; - if(fcount >= count) { - result = TRUE; - break; - } - } - } - lua_pushboolean(L, result); - return 1; -} -int32 scriptlib::group_check_with_sum_equal(lua_State *L) { - check_param_count(L, 5); - check_param(L, PARAM_TYPE_GROUP, 1); - check_param(L, PARAM_TYPE_FUNCTION, 2); - group* pgroup = *(group**) lua_touserdata(L, 1); - duel* pduel = pgroup->pduel; - int32 acc = lua_tointeger(L, 3); - int32 min = lua_tointeger(L, 4); - int32 max = lua_tointeger(L, 5); - if(min <= 0) - min = 1; - if(max < min) - max = min; - int32 extraargs = lua_gettop(L) - 5; - field::card_vector cv; - for(auto cit = pgroup->container.begin(); cit != pgroup->container.end(); ++cit) { - (*cit)->operation_param = pduel->lua->get_operation_value(*cit, 2, extraargs); - cv.push_back(*cit); - } - lua_pushboolean(L, pduel->game_field->check_with_sum_limit(&cv, acc, 0, 1, min, max)); - return 1; -} -int32 scriptlib::group_select_with_sum_equal(lua_State *L) { - check_action_permission(L); - check_param_count(L, 6); - check_param(L, PARAM_TYPE_GROUP, 1); - check_param(L, PARAM_TYPE_FUNCTION, 3); - group* pgroup = *(group**) lua_touserdata(L, 1); - duel* pduel = pgroup->pduel; - int32 playerid = lua_tointeger(L, 2); - if(playerid != 0 && playerid != 1) - return 0; - int32 acc = lua_tointeger(L, 4); - int32 min = lua_tointeger(L, 5); - int32 max = lua_tointeger(L, 6); - if(min <= 0) - min = 1; - if(max < min) - max = min; - int32 extraargs = lua_gettop(L) - 6; - pduel->game_field->core.select_cards.clear(); - for(auto cit = pgroup->container.begin(); cit != pgroup->container.end(); ++cit) { - (*cit)->operation_param = pduel->lua->get_operation_value(*cit, 3, extraargs); - pduel->game_field->core.select_cards.push_back(*cit); - } - if(!pduel->game_field->check_with_sum_limit(&pduel->game_field->core.select_cards, acc, 0, 1, min, max)) - return 0; - pduel->game_field->add_process(PROCESSOR_SELECT_SUM_S, 0, 0, 0, acc, playerid + (min << 16) + (max << 24)); - return lua_yield(L, 0); -} -int32 scriptlib::group_check_with_sum_greater(lua_State *L) { - check_param_count(L, 3); - check_param(L, PARAM_TYPE_GROUP, 1); - check_param(L, PARAM_TYPE_FUNCTION, 2); - group* pgroup = *(group**) lua_touserdata(L, 1); - duel* pduel = pgroup->pduel; - int32 acc = lua_tointeger(L, 3); - int32 extraargs = lua_gettop(L) - 3; - int32 sum = 0, op, op1, op2; - group::card_set::iterator cit; - for(cit = pgroup->container.begin(); cit != pgroup->container.end(); ++cit) { - op = pduel->lua->get_operation_value(*cit, 2, extraargs); - op1 = op & 0xffff; - op2 = op >> 16; - sum += op1 > op2 ? op1 : op2; - } - if(sum >= acc) - lua_pushboolean(L, 1); - else - lua_pushboolean(L, 0); - return 1; -} -int32 scriptlib::group_select_with_sum_greater(lua_State *L) { - check_action_permission(L); - check_param_count(L, 4); - check_param(L, PARAM_TYPE_GROUP, 1); - check_param(L, PARAM_TYPE_FUNCTION, 3); - group* pgroup = *(group**) lua_touserdata(L, 1); - duel* pduel = pgroup->pduel; - int32 playerid = lua_tointeger(L, 2); - if(playerid != 0 && playerid != 1) - return 0; - int32 acc = lua_tointeger(L, 4); - int32 extraargs = lua_gettop(L) - 4; - field::card_set::iterator cit; - pduel->game_field->core.select_cards.clear(); - int32 sum = 0, op, op1, op2; - for(cit = pgroup->container.begin(); cit != pgroup->container.end(); ++cit) { - op = pduel->lua->get_operation_value(*cit, 3, extraargs); - op1 = op & 0xffff; - op2 = op >> 16; - sum += op1 > op2 ? op1 : op2; - (*cit)->operation_param = op; - pduel->game_field->core.select_cards.push_back(*cit); - } - if(sum < acc) - return 0; - pduel->game_field->add_process(PROCESSOR_SELECT_SUM_S, 0, 0, 0, acc, playerid); - return lua_yield(L, 0); -} -int32 scriptlib::group_get_min_group(lua_State *L) { - check_param_count(L, 2); - check_param(L, PARAM_TYPE_GROUP, 1); - check_param(L, PARAM_TYPE_FUNCTION, 2); - group* pgroup = *(group**) lua_touserdata(L, 1); - duel* pduel = pgroup->pduel; - if(pgroup->container.size() == 0) - return 0; - group* newgroup = pduel->new_group(); - int32 min, op; - int32 extraargs = lua_gettop(L) - 2; - field::card_set::iterator cit = pgroup->container.begin(); - min = pduel->lua->get_operation_value(*cit, 2, extraargs); - newgroup->container.insert(*cit); - ++cit; - for(; cit != pgroup->container.end(); ++cit) { - op = pduel->lua->get_operation_value(*cit, 2, extraargs); - if(op == min) - newgroup->container.insert(*cit); - else if(op < min) { - newgroup->container.clear(); - newgroup->container.insert(*cit); - min = op; - } - } - interpreter::group2value(L, newgroup); - lua_pushinteger(L, min); - return 2; -} -int32 scriptlib::group_get_max_group(lua_State *L) { - check_param_count(L, 2); - check_param(L, PARAM_TYPE_GROUP, 1); - check_param(L, PARAM_TYPE_FUNCTION, 2); - group* pgroup = *(group**) lua_touserdata(L, 1); - duel* pduel = pgroup->pduel; - if(pgroup->container.size() == 0) - return 0; - group* newgroup = pduel->new_group(); - int32 max, op; - int32 extraargs = lua_gettop(L) - 2; - field::card_set::iterator cit = pgroup->container.begin(); - max = pduel->lua->get_operation_value(*cit, 2, extraargs); - newgroup->container.insert(*cit); - ++cit; - for(; cit != pgroup->container.end(); ++cit) { - op = pduel->lua->get_operation_value(*cit, 2, extraargs); - if(op == max) - newgroup->container.insert(*cit); - else if(op > max) { - newgroup->container.clear(); - newgroup->container.insert(*cit); - max = op; - } - } - interpreter::group2value(L, newgroup); - lua_pushinteger(L, max); - return 2; -} -int32 scriptlib::group_get_sum(lua_State *L) { - check_param_count(L, 2); - check_param(L, PARAM_TYPE_GROUP, 1); - check_param(L, PARAM_TYPE_FUNCTION, 2); - group* pgroup = *(group**) lua_touserdata(L, 1); - duel* pduel = pgroup->pduel; - int32 extraargs = lua_gettop(L) - 2; - int32 sum = 0; - field::card_set::iterator cit = pgroup->container.begin(); - for(; cit != pgroup->container.end(); ++cit) { - sum += pduel->lua->get_operation_value(*cit, 2, extraargs); - } - lua_pushinteger(L, sum); - return 1; -} -int32 scriptlib::group_get_class_count(lua_State *L) { - check_param_count(L, 2); - check_param(L, PARAM_TYPE_GROUP, 1); - check_param(L, PARAM_TYPE_FUNCTION, 2); - group* pgroup = *(group**) lua_touserdata(L, 1); - duel* pduel = pgroup->pduel; - int32 extraargs = lua_gettop(L) - 2; - std::set er; - field::card_set::iterator cit = pgroup->container.begin(); - for(; cit != pgroup->container.end(); ++cit) { - er.insert(pduel->lua->get_operation_value(*cit, 2, extraargs)); - } - lua_pushinteger(L, er.size()); - return 1; -} -int32 scriptlib::group_remove(lua_State *L) { - check_param_count(L, 3); - check_param(L, PARAM_TYPE_GROUP, 1); - check_param(L, PARAM_TYPE_FUNCTION, 2); - card* pexception = 0; - if(!lua_isnil(L, 3)) { - check_param(L, PARAM_TYPE_CARD, 3); - pexception = *(card**) lua_touserdata(L, 3); - } - group* pgroup = *(group**) lua_touserdata(L, 1); - duel* pduel = pgroup->pduel; - uint32 extraargs = lua_gettop(L) - 3; - if(pgroup->is_readonly == 1) - return 0; - group::card_set::iterator cit, rm; - for (cit = pgroup->container.begin(); cit != pgroup->container.end();) { - rm = cit++; - if((*rm) != pexception && pduel->lua->check_matching(*rm, 2, extraargs)) { - pgroup->container.erase(rm); - } - } - return 0; -} -int32 scriptlib::group_merge(lua_State *L) { - check_param_count(L, 2); - check_param(L, PARAM_TYPE_GROUP, 1); - check_param(L, PARAM_TYPE_GROUP, 2); - group* pgroup = *(group**) lua_touserdata(L, 1); - group* mgroup = *(group**) lua_touserdata(L, 2); - if(pgroup->is_readonly == 1) - return 0; - pgroup->container.insert(mgroup->container.begin(), mgroup->container.end()); - return 0; -} -int32 scriptlib::group_sub(lua_State *L) { - check_param_count(L, 2); - check_param(L, PARAM_TYPE_GROUP, 1); - check_param(L, PARAM_TYPE_GROUP, 2); - group* pgroup = *(group**) lua_touserdata(L, 1); - group* sgroup = *(group**) lua_touserdata(L, 2); - if(pgroup->is_readonly == 1) - return 0; - group::card_set::iterator cit; - for (cit = sgroup->container.begin(); cit != sgroup->container.end(); ++cit) { - pgroup->container.erase(*cit); - } - return 0; -} -int32 scriptlib::group_equal(lua_State *L) { - check_param_count(L, 2); - check_param(L, PARAM_TYPE_GROUP, 1); - check_param(L, PARAM_TYPE_GROUP, 2); - group* pgroup = *(group**) lua_touserdata(L, 1); - group* sgroup = *(group**) lua_touserdata(L, 2); - if(pgroup->container.size() != sgroup->container.size()) { - lua_pushboolean(L, 0); - return 1; - } - auto pit = pgroup->container.begin(); - auto sit = sgroup->container.begin(); - for (; pit != pgroup->container.end(); ++pit, ++sit) { - if((*pit) != (*sit)) { - lua_pushboolean(L, 0); - return 1; - } - } - lua_pushboolean(L, 1); - return 1; -} -int32 scriptlib::group_is_contains(lua_State *L) { - check_param_count(L, 2); - check_param(L, PARAM_TYPE_GROUP, 1); - check_param(L, PARAM_TYPE_CARD, 2); - group* pgroup = *(group**) lua_touserdata(L, 1); - card* pcard = *(card**) lua_touserdata(L, 2); - if(pgroup->container.find(pcard) != pgroup->container.end()) - lua_pushboolean(L, 1); - else - lua_pushboolean(L, 0); - return 1; -} -int32 scriptlib::group_search_card(lua_State *L) { - check_param_count(L, 2); - check_param(L, PARAM_TYPE_GROUP, 1); - check_param(L, PARAM_TYPE_FUNCTION, 2); - group* pgroup = *(group**) lua_touserdata(L, 1); - duel* pduel = pgroup->pduel; - uint32 extraargs = lua_gettop(L) - 2; - field::card_set::iterator cit; - for(cit = pgroup->container.begin(); cit != pgroup->container.end(); ++cit) - if(pduel->lua->check_matching(*cit, 2, extraargs)) { - interpreter::card2value(L, *cit); - return 1; - } - return 0; -} diff --git a/ocgcore/mem.cpp b/ocgcore/mem.cpp deleted file mode 100644 index 704e55a8d2..0000000000 --- a/ocgcore/mem.cpp +++ /dev/null @@ -1,39 +0,0 @@ -/* - * mem.cpp - * - * Created on: 2011-9-8 - * Author: argon - */ -//#define USE_TCMALLOC - -#ifdef USE_TCMALLOC - -#define PERFTOOLS_DLL_DECL -#include - -void* operator new(size_t size) { - return tc_malloc(size); -} -void* operator new[](size_t size) { - return tc_malloc(size); -} -void* operator new(size_t size, const std::nothrow_t& nt) { - return tc_malloc(size); -} -void* operator new[](size_t size, const std::nothrow_t& nt) { - return tc_malloc(size); -} -void operator delete(void* p) { - return tc_free(p); -} -void operator delete[](void* p) { - return tc_free(p); -} -void operator delete(void* p, const std::nothrow_t& nt) { - return tc_free(p); -} -void operator delete[](void* p, const std::nothrow_t& nt) { - return tc_free(p); -} - -#endif //USE_TCMALLOC diff --git a/ocgcore/mtrandom.h b/ocgcore/mtrandom.h deleted file mode 100644 index 6cac16839c..0000000000 --- a/ocgcore/mtrandom.h +++ /dev/null @@ -1,106 +0,0 @@ -/* - * mtrandom.h - * - * Created on: 2009-10-18 - * Author: Argon.Sun - */ - -#ifndef MTRANDOM_H_ -#define MTRANDOM_H_ - -//Mersenne Twister -class mtrandom { -public: - mtrandom() : - left(1) { - init(); - } - explicit mtrandom(unsigned int seed) : - left(1) { - init(seed); - } - mtrandom(unsigned int* init_key, int key_length) : - left(1) { - int i = 1, j = 0; - int k = N > key_length ? N : key_length; - init(); - for (; k; --k) { - state[i] = (state[i] ^ ((state[i - 1] ^ (state[i - 1] >> 30)) - * 1664525UL)) + init_key[j] + j; // non linear - state[i] &= 4294967295UL; - ++i; - ++j; - if (i >= N) { - state[0] = state[N - 1]; - i = 1; - } - if (j >= key_length) - j = 0; - } - for (k = N - 1; k; --k) { - state[i] = (state[i] ^ ((state[i - 1] ^ (state[i - 1] >> 30)) - * 1566083941UL)) - i; - state[i] &= 4294967295UL; - ++i; - if (i >= N) { - state[0] = state[N - 1]; - i = 1; - } - } - state[0] = 2147483648UL; - } - void reset(unsigned int rs) { - init(rs); - next_state(); - } - unsigned int rand() { - unsigned int y; - if (0 == --left) - next_state(); - y = *next++; - y ^= (y >> 11); - y ^= (y << 7) & 0x9d2c5680UL; - y ^= (y << 15) & 0xefc60000UL; - y ^= (y >> 18); - return y; - } - double real() { - return (double) rand() / 0xffffffffUL; - } - double res53() { - unsigned int a = rand() >> 5, b = rand() >> 6; - return (a * 67108864.0 + b) / 9007199254740992.0; - } - void init(unsigned int seed = 19650218UL) { - state[0] = seed & 4294967295UL; - for (int j = 1; j < N; ++j) { - state[j] = (1812433253UL * (state[j - 1] ^ (state[j - 1] >> 30)) - + j); - state[j] &= 4294967295UL; // for >32 bit machines - } - } -private: - void next_state() { - unsigned int* p = state; - int i; - for (i = N - M + 1; --i; ++p) - *p = (p[M] ^ twist(p[0], p[1])); - for (i = M; --i; ++p) - *p = (p[M - N] ^ twist(p[0], p[1])); - *p = p[M - N] ^ twist(p[0], state[0]); - left = N; - next = state; - } - unsigned int mixbits(unsigned int u, unsigned int v) const { - return (u & 2147483648UL) | (v & 2147483647UL); - } - unsigned int twist(unsigned int u, unsigned int v) const { - return ((mixbits(u, v) >> 1) ^ (v & 1UL ? 2567483615UL : 0UL)); - } - static const int N = 624, M = 397; - unsigned int state[N]; - unsigned int left; - unsigned int* next; -}; - -#endif /* MTRANDOM_H_ */ diff --git a/ocgcore/ocgapi.cpp b/ocgcore/ocgapi.cpp deleted file mode 100644 index 94468a96c1..0000000000 --- a/ocgcore/ocgapi.cpp +++ /dev/null @@ -1,342 +0,0 @@ -/* - * interface.cpp - * - * Created on: 2010-5-2 - * Author: Argon - */ -#include -#include -#include "ocgapi.h" -#include "duel.h" -#include "card.h" -#include "group.h" -#include "effect.h" -#include "field.h" -#include "interpreter.h" -#include - -script_reader sreader = default_script_reader; -card_reader creader = default_card_reader; -message_handler mhandler = default_message_handler; -byte buffer[0x10000]; -std::set duel_set; - -extern "C" DECL_DLLEXPORT void set_script_reader(script_reader f) { - sreader = f; -} -extern "C" DECL_DLLEXPORT void set_card_reader(card_reader f) { - creader = f; -} -extern "C" DECL_DLLEXPORT void set_message_handler(message_handler f) { - mhandler = f; -} -byte* read_script(const char* script_name, int* len) { - return sreader(script_name, len); -} -uint32 read_card(uint32 code, card_data* data) { - return creader(code, data); -} -uint32 handle_message(void* pduel, uint32 msg_type) { - return mhandler(pduel, msg_type); -} -byte* default_script_reader(const char* script_name, int* slen) { - FILE *fp; - fp = fopen(script_name, "rb"); - if (!fp) - return 0; - fseek(fp, 0, SEEK_END); - uint32 len = ftell(fp); - if (len > 0x10000) { - fclose(fp); - return 0; - } - fseek(fp, 0, SEEK_SET); - fread(buffer, len, 1, fp); - fclose(fp); - *slen = len; - return buffer; -} -uint32 default_card_reader(uint32 code, card_data* data) { - return 0; -} -uint32 default_message_handler(void* pduel, uint32 message_type) { - return 0; -} -extern "C" DECL_DLLEXPORT ptr create_duel(uint32 seed) { - duel* pduel = new duel(); - duel_set.insert(pduel); - pduel->random.reset(seed); - return (ptr)pduel; -} -extern "C" DECL_DLLEXPORT void start_duel(ptr pduel, int options) { - duel* pd = (duel*)pduel; - pd->game_field->core.duel_options |= options; - pd->game_field->core.shuffle_hand_check[0] = FALSE; - pd->game_field->core.shuffle_hand_check[1] = FALSE; - pd->game_field->core.shuffle_deck_check[0] = FALSE; - pd->game_field->core.shuffle_deck_check[1] = FALSE; - if(pd->game_field->player[0].start_count > 0) - pd->game_field->draw(0, REASON_RULE, PLAYER_NONE, 0, pd->game_field->player[0].start_count); - if(pd->game_field->player[1].start_count > 0) - pd->game_field->draw(0, REASON_RULE, PLAYER_NONE, 1, pd->game_field->player[1].start_count); - if(options & DUEL_TAG_MODE) { - for(int i = 0; i < pd->game_field->player[0].start_count && pd->game_field->player[0].tag_list_main.size(); ++i) { - card* pcard = *pd->game_field->player[0].tag_list_main.rbegin(); - pd->game_field->player[0].tag_list_main.pop_back(); - pd->game_field->player[0].tag_list_hand.push_back(pcard); - pcard->current.controler = 0; - pcard->current.location = LOCATION_HAND; - pcard->current.sequence = pd->game_field->player[0].tag_list_hand.size() - 1; - } - for(int i = 0; i < pd->game_field->player[1].start_count && pd->game_field->player[1].tag_list_main.size(); ++i) { - card* pcard = *pd->game_field->player[1].tag_list_main.rbegin(); - pd->game_field->player[1].tag_list_main.pop_back(); - pd->game_field->player[1].tag_list_hand.push_back(pcard); - pcard->current.controler = 1; - pcard->current.location = LOCATION_HAND; - pcard->current.sequence = pd->game_field->player[1].tag_list_hand.size() - 1; - } - } - pd->game_field->add_process(PROCESSOR_TURN, 0, 0, 0, 0, 0); -} -extern "C" DECL_DLLEXPORT void end_duel(ptr pduel) { - duel* pd = (duel*)pduel; - if(duel_set.count(pd)) { - duel_set.erase(pd); - delete pd; - } -} -extern "C" DECL_DLLEXPORT void set_player_info(ptr pduel, int32 playerid, int32 lp, int32 startcount, int32 drawcount) { - duel* pd = (duel*)pduel; - if(lp > 0) - pd->game_field->player[playerid].lp = lp; - if(startcount >= 0) - pd->game_field->player[playerid].start_count = startcount; - if(drawcount >= 0) - pd->game_field->player[playerid].draw_count = drawcount; -} -extern "C" DECL_DLLEXPORT void get_log_message(ptr pduel, byte* buf) { - strcpy((char*)buf, ((duel*)pduel)->strbuffer); -} -extern "C" DECL_DLLEXPORT int32 get_message(ptr pduel, byte* buf) { - int32 len = ((duel*)pduel)->read_buffer(buf); - ((duel*)pduel)->clear_buffer(); - return len; -} -extern "C" DECL_DLLEXPORT int32 process(ptr pduel) { - duel* pd = (duel*)pduel; - int result = pd->game_field->process(); - while((result & 0xffff) == 0 && (result & 0xf0000) == 0) - result = pd->game_field->process(); - return result; -} -extern "C" DECL_DLLEXPORT void new_card(ptr pduel, uint32 code, uint8 owner, uint8 playerid, uint8 location, uint8 sequence, uint8 position) { - duel* ptduel = (duel*)pduel; - if(ptduel->game_field->is_location_useable(playerid, location, sequence)) { - card* pcard = ptduel->new_card(code); - pcard->owner = owner; - ptduel->game_field->add_card(playerid, pcard, location, sequence); - pcard->current.position = position; - if(!(location & LOCATION_ONFIELD) || (position & POS_FACEUP)) { - pcard->enable_field_effect(TRUE); - ptduel->game_field->adjust_instant(); - } - if(location & LOCATION_ONFIELD) { - if(location == LOCATION_MZONE) - pcard->set_status(STATUS_PROC_COMPLETE, TRUE); - } - } -} -extern "C" DECL_DLLEXPORT void new_tag_card(ptr pduel, uint32 code, uint8 owner, uint8 location) { - duel* ptduel = (duel*)pduel; - if(owner > 1 || !(location & 0x41)) - return; - card* pcard = ptduel->new_card(code); - switch(location) { - case LOCATION_DECK: - ptduel->game_field->player[owner].tag_list_main.push_back(pcard); - pcard->owner = owner; - pcard->current.controler = owner; - pcard->current.location = LOCATION_DECK; - pcard->current.sequence = ptduel->game_field->player[owner].tag_list_main.size() - 1; - break; - case LOCATION_EXTRA: - ptduel->game_field->player[owner].tag_list_extra.push_back(pcard); - pcard->owner = owner; - pcard->current.controler = owner; - pcard->current.location = LOCATION_EXTRA; - pcard->current.sequence = ptduel->game_field->player[owner].tag_list_extra.size() - 1; - break; - } -} -extern "C" DECL_DLLEXPORT int32 query_card(ptr pduel, uint8 playerid, uint8 location, uint8 sequence, int32 query_flag, byte* buf, int32 use_cache) { - if(playerid != 0 && playerid != 1) - return 0; - duel* ptduel = (duel*)pduel; - card* pcard = 0; - location &= 0x7f; - if(location & LOCATION_ONFIELD) - pcard = ptduel->game_field->get_field_card(playerid, location, sequence); - else { - field::card_vector* lst = 0; - if(location == LOCATION_HAND ) - lst = &ptduel->game_field->player[playerid].list_hand; - else if(location == LOCATION_GRAVE ) - lst = &ptduel->game_field->player[playerid].list_grave; - else if(location == LOCATION_REMOVED ) - lst = &ptduel->game_field->player[playerid].list_remove; - else if(location == LOCATION_EXTRA ) - lst = &ptduel->game_field->player[playerid].list_extra; - else if(location == LOCATION_DECK ) - lst = &ptduel->game_field->player[playerid].list_main; - if(!lst || sequence > lst->size()) - pcard = 0; - else { - auto cit = lst->begin(); - for(uint32 i = 0; i < sequence; ++i, ++cit); - pcard = *cit; - } - } - if(pcard) - return pcard->get_infos(buf, query_flag, use_cache); - else { - *((int32*)buf) = 4; - return 4; - } -} -extern "C" DECL_DLLEXPORT int32 query_field_count(ptr pduel, uint8 playerid, uint8 location) { - duel* ptduel = (duel*)pduel; - if(playerid != 0 && playerid != 1) - return 0; - if(location == LOCATION_HAND) - return ptduel->game_field->player[playerid].list_hand.size(); - if(location == LOCATION_GRAVE) - return ptduel->game_field->player[playerid].list_grave.size(); - if(location == LOCATION_REMOVED) - return ptduel->game_field->player[playerid].list_remove.size(); - if(location == LOCATION_EXTRA) - return ptduel->game_field->player[playerid].list_extra.size(); - if(location == LOCATION_DECK) - return ptduel->game_field->player[playerid].list_main.size(); - if(location == LOCATION_MZONE) { - uint32 count = 0; - for(uint32 i = 0; i < 5; ++i) - if(ptduel->game_field->player[playerid].list_mzone[i]) count++; - return count; - } - if(location == LOCATION_SZONE) { - uint32 count = 0; - for(uint32 i = 0; i < 8; ++i) - if(ptduel->game_field->player[playerid].list_szone[i]) count++; - return count; - } - return 0; -} -extern "C" DECL_DLLEXPORT int32 query_field_card(ptr pduel, uint8 playerid, uint8 location, int32 query_flag, byte* buf, int32 use_cache) { - if(playerid != 0 && playerid != 1) - return 0; - duel* ptduel = (duel*)pduel; - card* pcard; - uint32 ct = 0, clen; - byte* p = buf; - if(location == LOCATION_MZONE) { - for(uint32 i = 0; i < 5; ++i) { - pcard = ptduel->game_field->player[playerid].list_mzone[i]; - if(pcard) { - ct += clen = pcard->get_infos(p, query_flag, use_cache); - p += clen; - } else { - *((int32*)p) = 4; - ct += 4; - p += 4; - } - } - } else if(location == LOCATION_SZONE) { - for(uint32 i = 0; i < 8; ++i) { - pcard = ptduel->game_field->player[playerid].list_szone[i]; - if(pcard) { - ct += clen = pcard->get_infos(p, query_flag, use_cache); - p += clen; - } else { - *((int32*)p) = 4; - ct += 4; - p += 4; - } - - } - } else { - field::card_vector* lst; - field::card_vector::iterator cit; - if(location == LOCATION_HAND ) - lst = &ptduel->game_field->player[playerid].list_hand; - else if(location == LOCATION_GRAVE ) - lst = &ptduel->game_field->player[playerid].list_grave; - else if(location == LOCATION_REMOVED ) - lst = &ptduel->game_field->player[playerid].list_remove; - else if(location == LOCATION_EXTRA ) - lst = &ptduel->game_field->player[playerid].list_extra; - else if(location == LOCATION_DECK ) - lst = &ptduel->game_field->player[playerid].list_main; - for(cit = lst->begin(); cit != lst->end(); ++cit) { - ct += clen = (*cit)->get_infos(p, query_flag, use_cache); - p += clen; - } - } - return ct; -} -extern "C" DECL_DLLEXPORT int32 query_field_info(ptr pduel, byte* buf) { - duel* ptduel = (duel*)pduel; - *buf++ = MSG_RELOAD_FIELD; - card* pcard; - for(int playerid = 0; playerid < 2; ++playerid) { - *((int*)(buf)) = ptduel->game_field->player[playerid].lp; - buf += 4; - for(uint32 i = 0; i < 5; ++i) { - pcard = ptduel->game_field->player[playerid].list_mzone[i]; - if(pcard) { - *buf++ = 1; - *buf++ = pcard->current.position; - *buf++ = pcard->xyz_materials.size(); - } else { - *buf++ = 0; - } - } - for(uint32 i = 0; i < 8; ++i) { - pcard = ptduel->game_field->player[playerid].list_szone[i]; - if(pcard) { - *buf++ = 1; - *buf++ = pcard->current.position; - } else { - *buf++ = 0; - } - } - *buf++ = ptduel->game_field->player[playerid].list_main.size(); - *buf++ = ptduel->game_field->player[playerid].list_hand.size(); - *buf++ = ptduel->game_field->player[playerid].list_grave.size(); - *buf++ = ptduel->game_field->player[playerid].list_remove.size(); - *buf++ = ptduel->game_field->player[playerid].list_extra.size(); - } - *buf++ = ptduel->game_field->core.current_chain.size(); - for(auto chit = ptduel->game_field->core.current_chain.begin(); chit != ptduel->game_field->core.current_chain.end(); ++chit) { - effect* peffect = chit->triggering_effect; - *((int*)(buf)) = peffect->handler->data.code; - buf += 4; - *((int*)(buf)) = peffect->handler->get_info_location(); - buf += 4; - *buf++ = chit->triggering_controler; - *buf++ = chit->triggering_location; - *buf++ = chit->triggering_sequence; - *((int*)(buf)) = peffect->description; - buf += 4; - } - return 0; -} -extern "C" DECL_DLLEXPORT void set_responsei(ptr pduel, int32 value) { - ((duel*)pduel)->set_responsei(value); -} -extern "C" DECL_DLLEXPORT void set_responseb(ptr pduel, byte* buf) { - ((duel*)pduel)->set_responseb(buf); -} -extern "C" DECL_DLLEXPORT int32 preload_script(ptr pduel, char* script, int32 len) { - return ((duel*)pduel)->lua->load_script(script); -} diff --git a/ocgcore/ocgapi.h b/ocgcore/ocgapi.h deleted file mode 100644 index 4e989319a2..0000000000 --- a/ocgcore/ocgapi.h +++ /dev/null @@ -1,58 +0,0 @@ -/* - * interface.h - * - * Created on: 2010-4-28 - * Author: Argon - */ - -#ifndef OCGAPI_H_ -#define OCGAPI_H_ - -#include "common.h" -#ifdef WIN32 -#include -#define DECL_DLLEXPORT __declspec(dllexport) -#else -#define DECL_DLLEXPORT -#endif - -class card; -struct card_data; -struct card_info; -class group; -class effect; -class interpreter; - -typedef byte* (*script_reader)(const char*, int*); -typedef uint32 (*card_reader)(uint32, card_data*); -typedef uint32 (*message_handler)(void*, uint32); - -extern "C" DECL_DLLEXPORT void set_script_reader(script_reader f); -extern "C" DECL_DLLEXPORT void set_card_reader(card_reader f); -extern "C" DECL_DLLEXPORT void set_message_handler(message_handler f); - -byte* read_script(const char* script_name, int* len); -uint32 read_card(uint32 code, card_data* data); -uint32 handle_message(void* pduel, uint32 message_type); - -extern "C" DECL_DLLEXPORT ptr create_duel(uint32 seed); -extern "C" DECL_DLLEXPORT void start_duel(ptr pduel, int32 options); -extern "C" DECL_DLLEXPORT void end_duel(ptr pduel); -extern "C" DECL_DLLEXPORT void set_player_info(ptr pduel, int32 playerid, int32 lp, int32 startcount, int32 drawcount); -extern "C" DECL_DLLEXPORT void get_log_message(ptr pduel, byte* buf); -extern "C" DECL_DLLEXPORT int32 get_message(ptr pduel, byte* buf); -extern "C" DECL_DLLEXPORT int32 process(ptr pduel); -extern "C" DECL_DLLEXPORT void new_card(ptr pduel, uint32 code, uint8 owner, uint8 playerid, uint8 location, uint8 sequence, uint8 position); -extern "C" DECL_DLLEXPORT void new_tag_card(ptr pduel, uint32 code, uint8 owner, uint8 location); -extern "C" DECL_DLLEXPORT int32 query_card(ptr pduel, uint8 playerid, uint8 location, uint8 sequence, int32 query_flag, byte* buf, int32 use_cache); -extern "C" DECL_DLLEXPORT int32 query_field_count(ptr pduel, uint8 playerid, uint8 location); -extern "C" DECL_DLLEXPORT int32 query_field_card(ptr pduel, uint8 playerid, uint8 location, int32 query_flag, byte* buf, int32 use_cache); -extern "C" DECL_DLLEXPORT int32 query_field_info(ptr pduel, byte* buf); -extern "C" DECL_DLLEXPORT void set_responsei(ptr pduel, int32 value); -extern "C" DECL_DLLEXPORT void set_responseb(ptr pduel, byte* buf); -extern "C" DECL_DLLEXPORT int32 preload_script(ptr pduel, char* script, int32 len); -byte* default_script_reader(const char* script_name, int* len); -uint32 default_card_reader(uint32 code, card_data* data); -uint32 default_message_handler(void* pduel, uint32 msg_type); - -#endif /* OCGAPI_H_ */ diff --git a/ocgcore/operations.cpp b/ocgcore/operations.cpp deleted file mode 100644 index 44bf9d7e0c..0000000000 --- a/ocgcore/operations.cpp +++ /dev/null @@ -1,4783 +0,0 @@ -/* - * operations.cpp - * - * Created on: 2010-9-18 - * Author: Argon - */ -#include "field.h" -#include "duel.h" -#include "card.h" -#include "effect.h" -#include "group.h" -#include "interpreter.h" -#include - -int32 field::negate_chain(uint8 chaincount) { - if(core.current_chain.size() == 0) - return FALSE; - if(chaincount > core.current_chain.size() || chaincount < 1) - chaincount = core.current_chain.size(); - chain& pchain = core.current_chain[chaincount - 1]; - if(!(pchain.flag & CHAIN_DISABLE_ACTIVATE) && is_chain_negatable(pchain.chain_count) - && pchain.triggering_effect->handler->is_affect_by_effect(core.reason_effect) ) { - pchain.flag |= CHAIN_DISABLE_ACTIVATE; - pchain.disable_reason = core.reason_effect; - pchain.disable_player = core.reason_player; - if((pchain.triggering_effect->type & EFFECT_TYPE_ACTIVATE) && (pchain.triggering_effect->handler->current.location == LOCATION_SZONE)) { - pchain.triggering_effect->handler->set_status(STATUS_LEAVE_CONFIRMED, TRUE); - pchain.triggering_effect->handler->set_status(STATUS_ACTIVATE_DISABLED, TRUE); - } - pduel->write_buffer8(MSG_CHAIN_NEGATED); - pduel->write_buffer8(chaincount); - if(pchain.triggering_effect->flag & EFFECT_FLAG_NAGA) - return FALSE; - return TRUE; - } - return FALSE; -} -int32 field::disable_chain(uint8 chaincount) { - if(core.current_chain.size() == 0) - return FALSE; - if(chaincount > core.current_chain.size() || chaincount < 1) - chaincount = core.current_chain.size(); - chain& pchain = core.current_chain[chaincount - 1]; - if(!(pchain.flag & CHAIN_DISABLE_EFFECT) && is_chain_disablable(pchain.chain_count) - && pchain.triggering_effect->handler->is_affect_by_effect(core.reason_effect)) { - core.current_chain[chaincount - 1].flag |= CHAIN_DISABLE_EFFECT; - core.current_chain[chaincount - 1].disable_reason = core.reason_effect; - core.current_chain[chaincount - 1].disable_player = core.reason_player; - pduel->write_buffer8(MSG_CHAIN_DISABLED); - pduel->write_buffer8(chaincount); - if(pchain.triggering_effect->flag & EFFECT_FLAG_NAGA) - return FALSE; - return TRUE; - } - return FALSE; -} -void field::change_chain_effect(uint8 chaincount, int32 rep_op) { - if(core.current_chain.size() == 0) - return; - if(chaincount > core.current_chain.size() || chaincount < 1) - chaincount = core.current_chain.size(); - core.current_chain[chaincount - 1].replace_op = rep_op; -} -void field::change_target(uint8 chaincount, group* targets) { - if(core.current_chain.size() == 0) - return; - if(chaincount > core.current_chain.size() || chaincount < 1) - chaincount = core.current_chain.size(); - group* ot = core.current_chain[chaincount - 1].target_cards; - effect* te = core.current_chain[chaincount - 1].triggering_effect; - if(ot) { - for(auto cit = ot->container.begin(); cit != ot->container.end(); ++cit) - (*cit)->release_relation(te); - ot->container = targets->container; - for(auto cit = ot->container.begin(); cit != ot->container.end(); ++cit) - (*cit)->create_relation(te); - if(te->flag & EFFECT_FLAG_CARD_TARGET) { - for(auto cit = ot->container.begin(); cit != ot->container.end(); ++cit) { - if((*cit)->current.location & 0x30) - move_card((*cit)->current.controler, (*cit), (*cit)->current.location, 0); - pduel->write_buffer8(MSG_BECOME_TARGET); - pduel->write_buffer8(1); - pduel->write_buffer32((*cit)->get_info_location()); - } - } - } -} -void field::change_target_player(uint8 chaincount, uint8 playerid) { - if(core.current_chain.size() == 0) - return; - if(chaincount > core.current_chain.size() || chaincount < 1) - chaincount = core.current_chain.size(); - core.current_chain[chaincount - 1].target_player = playerid; -} -void field::change_target_param(uint8 chaincount, int32 param) { - if(core.current_chain.size() == 0) - return; - if(chaincount > core.current_chain.size() || chaincount < 1) - chaincount = core.current_chain.size(); - core.current_chain[chaincount - 1].target_param = param; -} -void field::remove_counter(uint32 reason, card* pcard, uint32 rplayer, uint32 s, uint32 o, uint32 countertype, uint32 count) { - add_process(PROCESSOR_REMOVE_COUNTER, 0, (effect*)(size_t) reason, (group*)pcard, (rplayer << 16) + (s << 8) + o, countertype + (count << 16)); -} -void field::remove_overlay_card(uint32 reason, card* pcard, uint32 rplayer, uint32 s, uint32 o, uint16 min, uint16 max) { - add_process(PROCESSOR_REMOVEOL_S, 0, (effect*)(size_t) reason, (group*)pcard, (rplayer << 16) + (s << 8) + o, (max << 16) + min); -} -void field::get_control(effect* reason_effect, uint32 reason_player, card* pcard, uint32 playerid, uint32 reset_phase, uint32 reset_count) { - add_process(PROCESSOR_GET_CONTROL, 0, reason_effect, (group*)pcard, 0, (reason_player << 28) + (playerid << 24) + (reset_phase << 8) + reset_count); -} -void field::swap_control(effect* reason_effect, uint32 reason_player, card* pcard1, card* pcard2, uint32 reset_phase, uint32 reset_count) { - add_process(PROCESSOR_SWAP_CONTROL, 0, reason_effect, (group*)pcard1, (ptr)pcard2, (reason_player << 28) + (reset_phase << 8) + reset_count); -} -void field::equip(uint32 equip_player, card* equip_card, card* target, uint32 up, uint32 is_step) { - add_process(PROCESSOR_EQUIP, 0, 0, (group*)target, (ptr)equip_card, equip_player + (up << 16) + (is_step << 24)); -} -void field::draw(effect* reason_effect, uint32 reason, uint32 reason_player, uint32 playerid, uint32 count) { - add_process(PROCESSOR_DRAW, 0, reason_effect, 0, reason, (reason_player << 28) + (playerid << 24) + (count & 0xffffff)); -} -void field::damage(effect* reason_effect, uint32 reason, uint32 reason_player, card* pcard, uint32 playerid, uint32 amount) { - if(reason & REASON_BATTLE) - add_process(PROCESSOR_DAMAGE, 0, (effect*)pcard, 0, reason, (reason_player << 28) + (playerid << 24) + (amount & 0xffffff)); - else - add_process(PROCESSOR_DAMAGE, 0, reason_effect, 0, reason, (reason_player << 28) + (playerid << 24) + (amount & 0xffffff)); -} -void field::recover(effect* reason_effect, uint32 reason, uint32 reason_player, uint32 playerid, uint32 amount) { - add_process(PROCESSOR_RECOVER, 0, reason_effect, 0, reason, (reason_player << 28) + (playerid << 24) + (amount & 0xffffff)); -} -void field::summon(uint32 sumplayer, card* target, effect* proc, uint32 ignore_count, uint32 min_tribute) { - add_process(PROCESSOR_SUMMON_RULE, 0, proc, (group*)target, sumplayer, ignore_count + (min_tribute << 8)); -} -void field::special_summon_rule(uint32 sumplayer, card* target, uint32 summon_type) { - add_process(PROCESSOR_SPSUMMON_RULE, 0, 0, (group*)target, sumplayer, summon_type); -} -void field::special_summon(card_set* target, uint32 sumtype, uint32 sumplayer, uint32 playerid, uint32 nocheck, uint32 nolimit, uint32 positions) { - if((positions & POS_FACEDOWN) && is_player_affected_by_effect(sumplayer, EFFECT_DEVINE_LIGHT)) - positions = (positions & POS_FACEUP) | (positions >> 1); - for(auto cit = target->begin(); cit != target->end(); ++cit) { - card* pcard = *cit; - pcard->temp.reason = pcard->current.reason; - pcard->temp.reason_effect = pcard->current.reason_effect; - pcard->temp.reason_player = pcard->current.reason_player; - pcard->summon_info = (sumtype & 0xf00ffff) | SUMMON_TYPE_SPECIAL | ((uint32)pcard->current.location << 16); - pcard->summon_player = sumplayer; - pcard->current.reason = REASON_SPSUMMON; - pcard->current.reason_effect = core.reason_effect; - pcard->current.reason_player = core.reason_player; - pcard->operation_param = (playerid << 24) + (nocheck << 16) + (nolimit << 8) + positions; - } - group* pgroup = pduel->new_group(*target); - pgroup->is_readonly = TRUE; - add_process(PROCESSOR_SPSUMMON, 0, core.reason_effect, pgroup, core.reason_player, 0); -} -void field::special_summon_step(card* target, uint32 sumtype, uint32 sumplayer, uint32 playerid, uint32 nocheck, uint32 nolimit, uint32 positions) { - if((positions & POS_FACEDOWN) && is_player_affected_by_effect(sumplayer, EFFECT_DEVINE_LIGHT)) - positions = (positions & POS_FACEUP) | (positions >> 1); - target->temp.reason = target->current.reason; - target->temp.reason_effect = target->current.reason_effect; - target->temp.reason_player = target->current.reason_player; - target->summon_info = (sumtype & 0xf00ffff) | SUMMON_TYPE_SPECIAL | ((uint32)target->current.location << 16); - target->summon_player = sumplayer; - target->current.reason = REASON_SPSUMMON; - target->current.reason_effect = core.reason_effect; - target->current.reason_player = core.reason_player; - target->operation_param = (playerid << 24) + (nocheck << 16) + (nolimit << 8) + positions; - add_process(PROCESSOR_SPSUMMON_STEP, 0, core.reason_effect, 0, 0, (ptr)target); -} -void field::special_summon_complete(effect* reason_effect, uint8 reason_player) { - if(core.special_summoning.size() == 0) - return; - group* ng = pduel->new_group(); - ng->container.swap(core.special_summoning); - ng->is_readonly = TRUE; - //core.special_summoning.clear(); - add_process(PROCESSOR_SPSUMMON_COMP_S, 0, reason_effect, ng, reason_player, 0); -} -void field::destroy(card_set* targets, effect* reason_effect, uint32 reason, uint32 reason_player, uint32 playerid, uint32 destination, uint32 sequence) { - uint32 p; - for(auto cit = targets->begin(); cit != targets->end();) { - card* pcard = *cit; - if(pcard->is_status(STATUS_DESTROY_CONFIRMED)) { - targets->erase(cit++); - continue; - } - pcard->temp.reason = pcard->current.reason; - pcard->temp.reason_effect = pcard->current.reason_effect; - pcard->temp.reason_player = pcard->current.reason_player; - pcard->current.reason = reason; - if(reason_effect) - pcard->current.reason_effect = reason_effect; - if(reason_player != 5) - pcard->current.reason_player = reason_player; - p = playerid; - if(!(destination & (LOCATION_HAND + LOCATION_DECK + LOCATION_REMOVED))) - destination = LOCATION_GRAVE; - if(destination && p == PLAYER_NONE) - p = pcard->owner; - if(destination & (LOCATION_GRAVE + LOCATION_REMOVED)) - p = pcard->owner; - pcard->set_status(STATUS_DESTROY_CONFIRMED, TRUE); - pcard->operation_param = (POS_FACEUP << 24) + (p << 16) + (destination << 8) + sequence; - ++cit; - } - group* ng = pduel->new_group(*targets); - ng->is_readonly = TRUE; - add_process(PROCESSOR_DESTROY, 0, reason_effect, ng, reason, reason_player); -} -void field::destroy(card* target, effect* reason_effect, uint32 reason, uint32 reason_player, uint32 playerid, uint32 destination, uint32 sequence) { - card_set tset; - tset.insert(target); - destroy(&tset, reason_effect, reason, reason_player, playerid, destination, sequence); -} -void field::release(card_set* targets, effect* reason_effect, uint32 reason, uint32 reason_player) { - for(auto cit = targets->begin(); cit != targets->end(); ++cit) { - card* pcard = *cit; - pcard->temp.reason = pcard->current.reason; - pcard->temp.reason_effect = pcard->current.reason_effect; - pcard->temp.reason_player = pcard->current.reason_player; - pcard->current.reason = reason; - pcard->current.reason_effect = reason_effect; - pcard->current.reason_player = reason_player; - pcard->operation_param = (POS_FACEUP << 24) + ((uint32)(pcard->owner) << 16) + (LOCATION_GRAVE << 8); - } - group* ng = pduel->new_group(*targets); - ng->is_readonly = TRUE; - add_process(PROCESSOR_RELEASE, 0, reason_effect, ng, reason, reason_player); -} -void field::release(card* target, effect* reason_effect, uint32 reason, uint32 reason_player) { - card_set tset; - tset.insert(target); - release(&tset, reason_effect, reason, reason_player); -} -void field::send_to(card_set* targets, effect* reason_effect, uint32 reason, uint32 reason_player, uint32 playerid, uint32 destination, uint32 sequence, uint32 position) { - if(!(destination & (LOCATION_HAND + LOCATION_DECK + LOCATION_GRAVE + LOCATION_REMOVED))) - return; - uint32 p, pos; - for(auto cit = targets->begin(); cit != targets->end(); ++cit) { - card* pcard = *cit; - pcard->temp.reason = pcard->current.reason; - pcard->temp.reason_effect = pcard->current.reason_effect; - pcard->temp.reason_player = pcard->current.reason_player; - pcard->current.reason = reason; - pcard->current.reason_effect = reason_effect; - pcard->current.reason_player = reason_player; - p = playerid; - // send to hand from deck & playerid not given => send to the hand of controler - if(p == PLAYER_NONE && (destination & LOCATION_HAND) && (pcard->current.location & LOCATION_DECK) && pcard->current.controler == reason_player) - p = reason_player; - if(destination & (LOCATION_GRAVE + LOCATION_REMOVED) || p == PLAYER_NONE) - p = pcard->owner; - if(destination != LOCATION_REMOVED) - pos = POS_FACEUP; - else if(position == 0) - pos = pcard->current.position; - else pos = position; - pcard->operation_param = (pos << 24) + (p << 16) + (destination << 8) + (sequence); - } - group* ng = pduel->new_group(*targets); - ng->is_readonly = TRUE; - add_process(PROCESSOR_SENDTO, 0, reason_effect, ng, reason, reason_player); -} -void field::send_to(card* target, effect* reason_effect, uint32 reason, uint32 reason_player, uint32 playerid, uint32 destination, uint32 sequence, uint32 position) { - card_set tset; - tset.insert(target); - send_to(&tset, reason_effect, reason, reason_player, playerid, destination, sequence, position); -} -void field::move_to_field(card* target, uint32 move_player, uint32 playerid, uint32 destination, uint32 positions, uint32 enable, uint32 ret, uint32 is_equip) { - if(!(destination & (LOCATION_MZONE + LOCATION_SZONE)) || !positions) - return; - if(destination == target->current.location && playerid == target->current.controler) - return; - target->operation_param = (move_player << 24) + (playerid << 16) + (destination << 8) + positions; - add_process(PROCESSOR_MOVETOFIELD, 0, 0, (group*)target, enable, ret + (is_equip << 8)); -} -void field::change_position(card_set* targets, effect* reason_effect, uint32 reason_player, uint32 au, uint32 ad, uint32 du, uint32 dd, uint32 noflip, uint32 enable) { - group* ng = pduel->new_group(*targets); - ng->is_readonly = TRUE; - for(auto cit = targets->begin(); cit != targets->end(); ++cit) { - card* pcard = *cit; - if(pcard->current.position == POS_FACEUP_ATTACK) pcard->operation_param = au; - else if(pcard->current.position == POS_FACEDOWN_DEFENCE) pcard->operation_param = dd; - else if(pcard->current.position == POS_FACEUP_DEFENCE) pcard->operation_param = du; - else pcard->operation_param = ad; - if(noflip) - pcard->operation_param |= NO_FLIP_EFFECT; - } - add_process(PROCESSOR_CHANGEPOS, 0, reason_effect, ng, reason_player, enable); -} -void field::change_position(card* target, effect* reason_effect, uint32 reason_player, uint32 npos, uint32 noflip, uint32 enable) { - group* ng = pduel->new_group(target); - ng->is_readonly = TRUE; - target->operation_param = npos; - if(noflip) - target->operation_param |= NO_FLIP_EFFECT; - add_process(PROCESSOR_CHANGEPOS, 0, reason_effect, ng, reason_player, enable); -} -int32 field::draw(uint16 step, effect* reason_effect, uint32 reason, uint8 reason_player, uint8 playerid, uint32 count) { - switch(step) { - case 0: { - card* pcard; - card_vector cv; - uint32 drawed = 0; - uint32 public_count = 0; - if(!(reason & REASON_RULE) && !is_player_can_draw(playerid)) { - returns.ivalue[0] = 0; - return TRUE; - } - core.overdraw[playerid] = FALSE; - for(uint32 i = 0; i < count; ++i) { - if(player[playerid].list_main.size() == 0) { - core.overdraw[playerid] = TRUE; - break; - } - drawed++; - pcard = *(player[playerid].list_main.rbegin()); - pcard->enable_field_effect(FALSE); - pcard->cancel_field_effect(); - player[playerid].list_main.pop_back(); - pcard->previous.controler = pcard->current.controler; - pcard->previous.location = pcard->current.location; - pcard->previous.sequence = pcard->current.sequence; - pcard->previous.position = pcard->current.position; - pcard->current.controler = PLAYER_NONE; - pcard->current.reason_effect = reason_effect; - pcard->current.reason_player = reason_player; - pcard->current.reason = reason | REASON_DRAW; - pcard->current.location = 0; - add_card(playerid, pcard, LOCATION_HAND, 0); - pcard->enable_field_effect(TRUE); - if((pcard->current.position == POS_FACEUP_ATTACK) || pcard->is_affected_by_effect(EFFECT_PUBLIC)) { - public_count++; - if(pcard->current.position != POS_FACEUP_ATTACK) - pcard->set_status(STATUS_IS_PUBLIC, TRUE); - } - cv.push_back(pcard); - pcard->reset(RESET_TOHAND, RESET_EVENT); - } - core.hint_timing[playerid] |= TIMING_DRAW + TIMING_TOHAND; - adjust_instant(); - core.units.begin()->arg2 = (core.units.begin()->arg2 & 0xff000000) + drawed; - card_set* drawed_set = new card_set; - core.units.begin()->ptarget = (group*)drawed_set; - drawed_set->insert(cv.begin(), cv.end()); - if(drawed) { - if(core.global_flag & GLOBALFLAG_DECK_REVERSE_CHECK) { - if(player[playerid].list_main.size()) { - card* ptop = *player[playerid].list_main.rbegin(); - if(core.deck_reversed || (ptop->current.position == POS_FACEUP_DEFENCE)) { - pduel->write_buffer8(MSG_DECK_TOP); - pduel->write_buffer8(playerid); - pduel->write_buffer8(drawed); - if(ptop->current.position != POS_FACEUP_DEFENCE) - pduel->write_buffer32(ptop->data.code); - else - pduel->write_buffer32(ptop->data.code | 0x80000000); - } - } - } - pduel->write_buffer8(MSG_DRAW); - pduel->write_buffer8(playerid); - pduel->write_buffer8(drawed); - for(uint32 i = 0; i < drawed; ++i) - pduel->write_buffer32(cv[i]->data.code | (cv[i]->is_status(STATUS_IS_PUBLIC) ? 0x80000000 : 0)); - if(core.deck_reversed && (public_count < drawed)) { - pduel->write_buffer8(MSG_CONFIRM_CARDS); - pduel->write_buffer8(1 - playerid); - pduel->write_buffer8(drawed_set->size()); - for(auto cit = drawed_set->begin(); cit != drawed_set->end(); ++cit) { - pduel->write_buffer32((*cit)->data.code); - pduel->write_buffer8((*cit)->current.controler); - pduel->write_buffer8((*cit)->current.location); - pduel->write_buffer8((*cit)->current.sequence); - } - shuffle(playerid, LOCATION_HAND); - } - for(auto cit = drawed_set->begin(); cit != drawed_set->end(); ++cit) - raise_single_event((*cit), 0, EVENT_TO_HAND, reason_effect, reason, reason_player, playerid, 0); - process_single_event(); - raise_event(drawed_set, EVENT_DRAW, reason_effect, reason, reason_player, playerid, drawed); - raise_event(drawed_set, EVENT_TO_HAND, reason_effect, reason, reason_player, playerid, drawed); - process_instant_event(); - } - return FALSE; - } - case 1: { - card_set* drawed_set = (card_set*)core.units.begin()->ptarget; - core.operated_set.swap(*drawed_set); - delete drawed_set; - returns.ivalue[0] = count; - return TRUE; - } - } - return TRUE; -} -int32 field::damage(uint16 step, effect* reason_effect, uint32 reason, uint8 reason_player, card* reason_card, uint8 playerid, uint32 amount) { - switch(step) { - case 0: { - effect_set eset; - returns.ivalue[0] = amount; - if(amount <= 0) - return TRUE; - if(!(reason & REASON_RDAMAGE)) { - filter_player_effect(playerid, EFFECT_REVERSE_DAMAGE, &eset); - for(int32 i = 0; i < eset.size(); ++i) { - pduel->lua->add_param(reason_effect, PARAM_TYPE_EFFECT); - pduel->lua->add_param(reason, PARAM_TYPE_INT); - pduel->lua->add_param(reason_player, PARAM_TYPE_INT); - pduel->lua->add_param(reason_card, PARAM_TYPE_CARD); - if(eset[i]->check_value_condition(4)) { - recover(reason_effect, (reason & 0x18000) | 0x8040, reason_player, playerid, amount); - core.units.begin()->step = 1; - return FALSE; - } - } - } - uint32 val = amount; - eset.clear(); - filter_player_effect(playerid, EFFECT_CHANGE_DAMAGE, &eset); - for(int32 i = 0; i < eset.size(); ++i) { - pduel->lua->add_param(reason_effect, PARAM_TYPE_EFFECT); - pduel->lua->add_param(amount, PARAM_TYPE_INT); - pduel->lua->add_param(reason, PARAM_TYPE_INT); - pduel->lua->add_param(reason_player, PARAM_TYPE_INT); - pduel->lua->add_param(reason_card, PARAM_TYPE_CARD); - val = eset[i]->get_value(5); - returns.ivalue[0] = val; - if(val == 0) - return TRUE; - } - eset.clear(); - filter_player_effect(playerid, EFFECT_REFLECT_DAMAGE, &eset); - for(int32 i = 0; i < eset.size(); ++i) { - pduel->lua->add_param(reason_effect, PARAM_TYPE_EFFECT); - pduel->lua->add_param(val, PARAM_TYPE_INT); - pduel->lua->add_param(reason, PARAM_TYPE_INT); - pduel->lua->add_param(reason_player, PARAM_TYPE_INT); - pduel->lua->add_param(reason_card, PARAM_TYPE_CARD); - if(eset[i]->check_value_condition(5)) { - playerid = 1 - playerid; - core.units.begin()->step = 1; - break; - } - } - core.hint_timing[playerid] |= TIMING_DAMAGE; - player[playerid].lp -= val; - pduel->write_buffer8(MSG_DAMAGE); - pduel->write_buffer8(playerid); - pduel->write_buffer32(val); - core.units.begin()->arg2 = (core.units.begin()->arg2 & 0xff000000) + (val & 0xffffff); - raise_event(reason_card, EVENT_DAMAGE, reason_effect, reason, reason_player, playerid, val); - if(reason == REASON_BATTLE && reason_card) { - if((player[playerid].lp <= 0) && (core.attack_target == 0) && reason_card->is_affected_by_effect(EFFECT_MATCH_KILL)) { - pduel->write_buffer8(MSG_MATCH_KILL); - pduel->write_buffer32(reason_card->data.code); - } - raise_single_event(reason_card, 0, EVENT_BATTLE_DAMAGE, 0, 0, reason_player, playerid, val); - raise_event(reason_card, EVENT_BATTLE_DAMAGE, 0, 0, reason_player, playerid, val); - } - process_instant_event(); - return FALSE; - } - case 1: { - returns.ivalue[0] = amount; - return TRUE; - } - case 2: { - returns.ivalue[0] = 0; - return TRUE; - } - } - return TRUE; -} -int32 field::recover(uint16 step, effect* reason_effect, uint32 reason, uint8 reason_player, uint8 playerid, uint32 amount) { - switch(step) { - case 0: { - effect_set eset; - returns.ivalue[0] = amount; - if(amount <= 0) - return TRUE; - if(!(reason & REASON_RRECOVER)) { - filter_player_effect(playerid, EFFECT_REVERSE_RECOVER, &eset); - for(int32 i = 0; i < eset.size(); ++i) { - pduel->lua->add_param(reason_effect, PARAM_TYPE_EFFECT); - pduel->lua->add_param(reason, PARAM_TYPE_INT); - pduel->lua->add_param(reason_player, PARAM_TYPE_INT); - if(eset[i]->check_value_condition(3)) { - damage(reason_effect, (reason & 0x18000) | 0x10040, reason_player, 0, playerid, amount); - core.units.begin()->step = 1; - return FALSE; - } - } - } - core.hint_timing[playerid] |= TIMING_RECOVER; - player[playerid].lp += amount; - pduel->write_buffer8(MSG_RECOVER); - pduel->write_buffer8(playerid); - pduel->write_buffer32(amount); - raise_event((card*)0, EVENT_RECOVER, reason_effect, reason, reason_player, playerid, amount); - process_instant_event(); - return FALSE; - } - case 1: { - returns.ivalue[0] = amount; - return TRUE; - } - case 2: { - returns.ivalue[0] = 0; - return TRUE; - } - } - return TRUE; -} -int32 field::pay_lp_cost(uint32 step, uint8 playerid, uint32 cost) { - switch(step) { - case 0: { - effect_set eset; - int32 val = cost; - if(cost == 0) { - raise_event((card*)0, EVENT_PAY_LPCOST, core.reason_effect, 0, playerid, playerid, cost); - process_instant_event(); - return TRUE; - } - filter_player_effect(playerid, EFFECT_LPCOST_CHANGE, &eset); - for(int32 i = 0; i < eset.size(); ++i) { - pduel->lua->add_param(core.reason_effect, PARAM_TYPE_EFFECT); - pduel->lua->add_param(playerid, PARAM_TYPE_INT); - pduel->lua->add_param(val, PARAM_TYPE_INT); - val = eset[i]->get_value(3); - if(val <= 0) - return TRUE; - } - core.units.begin()->arg2 = val; - tevent e; - e.event_cards = 0; - e.event_player = playerid; - e.event_value = val; - e.reason = 0; - e.reason_effect = core.reason_effect; - e.reason_player = playerid; - core.select_options.clear(); - core.select_effects.clear(); - if(val <= player[playerid].lp) { - core.select_options.push_back(11); - core.select_effects.push_back(0); - } - auto pr = effects.continuous_effect.equal_range(EFFECT_LPCOST_REPLACE); - for (; pr.first != pr.second; ++pr.first) { - effect* peffect = pr.first->second; - if(peffect->is_activateable(peffect->get_handler_player(), e)) { - core.select_options.push_back(peffect->description); - core.select_effects.push_back(peffect); - } - } - if(core.select_options.size() == 0) - return TRUE; - if(core.select_options.size() == 1) - returns.ivalue[0] = 0; - else if(core.select_effects[0] == 0 && core.select_effects.size() == 2) - add_process(PROCESSOR_SELECT_EFFECTYN, 0, 0, (group*)core.select_effects[1]->handler, playerid, 0); - else - add_process(PROCESSOR_SELECT_OPTION, 0, 0, 0, playerid, 0); - return FALSE; - } - case 1: { - effect* peffect = core.select_effects[returns.ivalue[0]]; - if(!peffect) { - player[playerid].lp -= cost; - pduel->write_buffer8(MSG_PAY_LPCOST); - pduel->write_buffer8(playerid); - pduel->write_buffer32(cost); - raise_event((card*)0, EVENT_PAY_LPCOST, core.reason_effect, 0, playerid, playerid, cost); - process_instant_event(); - return TRUE; - } - tevent e; - e.event_cards = 0; - e.event_player = playerid; - e.event_value = cost; - e.reason = 0; - e.reason_effect = core.reason_effect; - e.reason_player = playerid; - core.sub_solving_event.push_back(e); - add_process(PROCESSOR_SOLVE_CONTINUOUS, 0, peffect, 0, playerid, 0); - return TRUE; - } - } - return TRUE; -} -int32 field::remove_counter(uint16 step, uint32 reason, card* pcard, uint8 rplayer, uint8 s, uint8 o, uint16 countertype, uint16 count) { - switch(step) { - case 0: { - core.select_options.clear(); - core.select_effects.clear(); - if((pcard && pcard->get_counter(countertype) >= count) || (!pcard && get_field_counter(rplayer, s, o, countertype))) { - core.select_options.push_back(10); - core.select_effects.push_back(0); - } - pair pr; - pr = effects.continuous_effect.equal_range(EFFECT_RCOUNTER_REPLACE + countertype); - effect* peffect; - tevent e; - e.event_cards = 0; - e.event_player = rplayer; - e.event_value = count; - e.reason = reason; - e.reason_effect = core.reason_effect; - e.reason_player = rplayer; - for (; pr.first != pr.second; ++pr.first) { - peffect = pr.first->second; - if(peffect->is_activateable(peffect->get_handler_player(), e)) { - core.select_options.push_back(peffect->description); - core.select_effects.push_back(peffect); - } - } - returns.ivalue[0] = 0; - if(core.select_options.size() == 0) - return TRUE; - if(core.select_options.size() == 1) - returns.ivalue[0] = 0; - else if(core.select_effects[0] == 0 && core.select_effects.size() == 2) - add_process(PROCESSOR_SELECT_EFFECTYN, 0, 0, (group*)core.select_effects[1]->handler, rplayer, 0); - else - add_process(PROCESSOR_SELECT_OPTION, 0, 0, 0, rplayer, 0); - return FALSE; - } - case 1: { - effect* peffect = core.select_effects[returns.ivalue[0]]; - if(peffect) { - tevent e; - e.event_cards = 0; - e.event_player = rplayer; - e.event_value = count; - e.reason = reason; - e.reason_effect = core.reason_effect; - e.reason_player = rplayer; - core.sub_solving_event.push_back(e); - add_process(PROCESSOR_SOLVE_CONTINUOUS, 0, peffect, 0, rplayer, 0); - core.units.begin()->step = 3; - return FALSE; - } - if(pcard) { - returns.ivalue[0] = pcard->remove_counter(countertype, count); - core.units.begin()->step = 2; - return FALSE; - } - card* pcard; - core.select_cards.clear(); - uint8 fc = s; - uint8 fp = rplayer; - for(int p = 0; p < 2; ++p) { - if(fc) { - for(uint32 j = 0; j < 5; ++j) { - pcard = player[fp].list_mzone[j]; - if(pcard && pcard->get_counter(countertype)) { - core.select_cards.push_back(pcard); - pcard->operation_param = pcard->get_counter(countertype); - } - } - for(uint32 j = 0; j < 8; ++j) { - pcard = player[fp].list_szone[j]; - if(pcard && pcard->get_counter(countertype)) { - core.select_cards.push_back(pcard); - pcard->operation_param = pcard->get_counter(countertype); - } - } - } - fp = 1 - fp; - fc = o; - } - add_process(PROCESSOR_SELECT_COUNTER, 0, 0, 0, rplayer, countertype + (((uint32)count) << 16)); - return FALSE; - } - case 2: { - for(uint32 i = 0; i < core.select_cards.size(); ++i) - if(returns.bvalue[i] > 0) - core.select_cards[i]->remove_counter(countertype, returns.bvalue[i]); - return FALSE; - } - case 3: { - raise_event((card*)0, EVENT_REMOVE_COUNTER + countertype, core.reason_effect, reason, rplayer, rplayer, count); - process_instant_event(); - return FALSE; - } - case 4: { - returns.ivalue[0] = 1; - return TRUE; - } - } - return TRUE; -} -int32 field::remove_overlay_card(uint16 step, uint32 reason, card* pcard, uint8 rplayer, uint8 s, uint8 o, uint16 min, uint16 max) { - switch(step) { - case 0: { - core.select_options.clear(); - core.select_effects.clear(); - if((pcard && pcard->xyz_materials.size() >= min) || (!pcard && get_overlay_count(rplayer, s, o) >= min)) { - core.select_options.push_back(12); - core.select_effects.push_back(0); - } - auto pr = effects.continuous_effect.equal_range(EFFECT_OVERLAY_REMOVE_REPLACE); - effect* peffect; - tevent e; - e.event_cards = 0; - e.event_player = rplayer; - e.event_value = min; - e.reason = reason; - e.reason_effect = core.reason_effect; - e.reason_player = rplayer; - for (; pr.first != pr.second; ++pr.first) { - peffect = pr.first->second; - if(peffect->is_activateable(peffect->get_handler_player(), e)) { - core.select_options.push_back(peffect->description); - core.select_effects.push_back(peffect); - } - } - returns.ivalue[0] = 0; - if(core.select_options.size() == 0) - return TRUE; - if(core.select_options.size() == 1) - returns.ivalue[0] = 0; - else if(core.select_effects[0] == 0 && core.select_effects.size() == 2) - add_process(PROCESSOR_SELECT_EFFECTYN, 0, 0, (group*)core.select_effects[1]->handler, rplayer, 0); - else - add_process(PROCESSOR_SELECT_OPTION, 0, 0, 0, rplayer, 0); - return FALSE; - } - case 1: { - effect* peffect = core.select_effects[returns.ivalue[0]]; - if(peffect) { - tevent e; - e.event_cards = 0; - e.event_player = rplayer; - e.event_value = min + (max << 16); - e.reason = reason; - e.reason_effect = core.reason_effect; - e.reason_player = rplayer; - core.sub_solving_event.push_back(e); - add_process(PROCESSOR_SOLVE_CONTINUOUS, 0, peffect, 0, rplayer, 0); - core.units.begin()->step = 3; - return FALSE; - } - core.select_cards.clear(); - if(pcard) { - for(auto cit = pcard->xyz_materials.begin(); cit != pcard->xyz_materials.end(); ++cit) - core.select_cards.push_back(*cit); - } else { - card_set cset; - get_overlay_group(rplayer, s, o, &cset); - for(auto cit = cset.begin(); cit != cset.end(); ++cit) - core.select_cards.push_back(*cit); - } - pduel->write_buffer8(MSG_HINT); - pduel->write_buffer8(HINT_SELECTMSG); - pduel->write_buffer8(rplayer); - pduel->write_buffer32(519); - add_process(PROCESSOR_SELECT_CARD, 0, 0, 0, rplayer, min + (max << 16)); - return FALSE; - } - case 2: { - card_set cset; - for(int32 i = 0; i < returns.bvalue[0]; ++i) - cset.insert(core.select_cards[returns.bvalue[i + 1]]); - send_to(&cset, core.reason_effect, reason, rplayer, PLAYER_NONE, LOCATION_GRAVE, 0, POS_FACEUP); - return FALSE; - } - case 3: { - return FALSE; - } - case 4: { - returns.ivalue[0] = 1; - return TRUE; - } - } - return TRUE; -} -int32 field::get_control(uint16 step, effect * reason_effect, uint8 reason_player, card * pcard, uint8 playerid, uint16 reset_phase, uint8 reset_count) { - switch(step) { - case 0: { - if(pcard->current.controler == playerid) { - returns.ivalue[0] = 1; - return TRUE; - } - returns.ivalue[0] = 0; - if(pcard->overlay_target) - return TRUE; - if(pcard->current.controler == PLAYER_NONE) - return TRUE; - if(pcard->current.location != LOCATION_MZONE) - return TRUE; - if(get_useable_count(playerid, LOCATION_MZONE, playerid, LOCATION_REASON_CONTROL) <= 0) - return TRUE; - if(pcard->data.type & TYPE_TRAPMONSTER && get_useable_count(playerid, LOCATION_SZONE, playerid, LOCATION_REASON_CONTROL) <= 0) - return TRUE; - if(!pcard->is_capable_change_control()) - return TRUE; - if(!pcard->is_affect_by_effect(reason_effect)) - return TRUE; - pcard->filter_disable_related_cards(); - if(pcard->unique_code) - remove_unique_card(pcard); - move_to_field(pcard, playerid, playerid, LOCATION_MZONE, pcard->current.position); - pcard->set_status(STATUS_ATTACK_CANCELED, TRUE); - return FALSE; - } - case 1: { - if(pcard->unique_code) - add_unique_card(pcard); - set_control(pcard, playerid, reset_phase, reset_count); - pcard->reset(RESET_CONTROL, RESET_EVENT); - pcard->filter_disable_related_cards(); - adjust_instant(); - return FALSE; - } - case 2: { - raise_single_event(pcard, 0, EVENT_CONTROL_CHANGED, reason_effect, REASON_EFFECT, reason_player, playerid, 0); - process_single_event(); - raise_event(pcard, EVENT_CONTROL_CHANGED, reason_effect, REASON_EFFECT, reason_player, playerid, 0); - process_instant_event(); - return FALSE; - } - case 3: { - returns.ivalue[0] = 1; - return TRUE; - } - } - return TRUE; -} -int32 field::swap_control(uint16 step, effect * reason_effect, uint8 reason_player, card * pcard1, card * pcard2, uint16 reset_phase, uint8 reset_count) { - switch(step) { - case 0: { - uint8 p1 = pcard1->current.controler, p2 = pcard2->current.controler; - uint8 l1 = pcard1->current.location, l2 = pcard2->current.location; - uint8 s1 = pcard1->current.sequence, s2 = pcard2->current.sequence; - returns.ivalue[0] = 0; - if(pcard1->overlay_target || pcard2->overlay_target) - return TRUE; - if(p1 == p2 || p1 == PLAYER_NONE || p2 == PLAYER_NONE) - return TRUE; - if(l1 != LOCATION_MZONE || l2 != LOCATION_MZONE) - return TRUE; - if(!pcard1->is_capable_change_control() || !pcard2->is_capable_change_control()) - return TRUE; - if(!pcard1->is_affect_by_effect(reason_effect) || !pcard2->is_affect_by_effect(reason_effect)) - return TRUE; - pcard1->filter_disable_related_cards(); - pcard2->filter_disable_related_cards(); - if(pcard1->unique_code) - remove_unique_card(pcard1); - if(pcard2->unique_code) - remove_unique_card(pcard2); - remove_card(pcard1); - remove_card(pcard2); - add_card(p2, pcard1, l2, s2); - add_card(p1, pcard2, l1, s1); - if(pcard1->unique_code) - add_unique_card(pcard1); - if(pcard2->unique_code) - add_unique_card(pcard2); - set_control(pcard1, p2, reset_phase, reset_count); - set_control(pcard2, p1, reset_phase, reset_count); - pcard1->reset(RESET_CONTROL, RESET_EVENT); - pcard2->reset(RESET_CONTROL, RESET_EVENT); - pcard1->filter_disable_related_cards(); - pcard2->filter_disable_related_cards(); - pcard1->set_status(STATUS_ATTACK_CANCELED, TRUE); - pcard2->set_status(STATUS_ATTACK_CANCELED, TRUE); - adjust_instant(); - return FALSE; - } - case 1: { - pduel->write_buffer8(MSG_SWAP); - pduel->write_buffer32(pcard1->data.code); - pduel->write_buffer8(pcard2->current.controler); - pduel->write_buffer8(pcard2->current.location); - pduel->write_buffer8(pcard2->current.sequence); - pduel->write_buffer8(pcard2->current.position); - pduel->write_buffer32(pcard2->data.code); - pduel->write_buffer8(pcard1->current.controler); - pduel->write_buffer8(pcard1->current.location); - pduel->write_buffer8(pcard1->current.sequence); - pduel->write_buffer8(pcard1->current.position); - raise_single_event(pcard1, 0, EVENT_CONTROL_CHANGED, reason_effect, REASON_EFFECT, reason_player, pcard1->current.controler, 0); - raise_single_event(pcard2, 0, EVENT_CONTROL_CHANGED, reason_effect, REASON_EFFECT, reason_player, pcard2->current.controler, 0); - process_single_event(); - card_set cset; - cset.insert(pcard1); - cset.insert(pcard2); - raise_event(&cset, EVENT_CONTROL_CHANGED, reason_effect, REASON_EFFECT, reason_player, 0, 0); - process_instant_event(); - return FALSE; - } - case 2: { - returns.ivalue[0] = 1; - return TRUE; - } - } - return TRUE; -} -int32 field::control_adjust(uint16 step) { - switch(step) { - case 0: { - core.destroy_set.clear(); - core.operated_set.clear(); - uint32 b0 = get_useable_count(0, LOCATION_MZONE, PLAYER_NONE, 0); - uint32 b1 = get_useable_count(1, LOCATION_MZONE, PLAYER_NONE, 0); - for(auto cit = core.control_adjust_set[0].begin(); cit != core.control_adjust_set[0].end(); ++cit) - (*cit)->filter_disable_related_cards(); - for(auto cit = core.control_adjust_set[1].begin(); cit != core.control_adjust_set[1].end(); ++cit) - (*cit)->filter_disable_related_cards(); - if(core.control_adjust_set[0].size() > core.control_adjust_set[1].size()) { - if(core.control_adjust_set[0].size() - core.control_adjust_set[1].size() > b1) { - if(core.control_adjust_set[1].size() == 0 && b1 == 0) { - core.destroy_set = core.control_adjust_set[0]; - core.control_adjust_set[0].clear(); - core.units.begin()->step = 4; - } else { - core.temp_var[0] = 0; - uint32 count = core.control_adjust_set[0].size() - core.control_adjust_set[1].size() - b1; - core.select_cards.clear(); - for(auto cit = core.control_adjust_set[0].begin(); cit != core.control_adjust_set[0].end(); ++cit) - core.select_cards.push_back(*cit); - pduel->write_buffer8(MSG_HINT); - pduel->write_buffer8(HINT_SELECTMSG); - pduel->write_buffer8(infos.turn_player); - pduel->write_buffer32(504); - add_process(PROCESSOR_SELECT_CARD, 0, 0, 0, 1, count + (count << 16)); - } - } else - core.units.begin()->step = 1; - } else if (core.control_adjust_set[0].size() < core.control_adjust_set[1].size()) { - if(core.control_adjust_set[1].size() - core.control_adjust_set[0].size() > b0) { - if(core.control_adjust_set[0].size() == 0 && b0 == 0) { - core.destroy_set = core.control_adjust_set[1]; - core.control_adjust_set[1].clear(); - core.units.begin()->step = 4; - } else { - core.temp_var[0] = 1; - uint32 count = core.control_adjust_set[1].size() - core.control_adjust_set[0].size() - b0; - core.select_cards.clear(); - for(auto cit = core.control_adjust_set[1].begin(); cit != core.control_adjust_set[1].end(); ++cit) - core.select_cards.push_back(*cit); - pduel->write_buffer8(MSG_HINT); - pduel->write_buffer8(HINT_SELECTMSG); - pduel->write_buffer8(infos.turn_player); - pduel->write_buffer32(504); - add_process(PROCESSOR_SELECT_CARD, 0, 0, 0, 0, count + (count << 16)); - } - } else - core.units.begin()->step = 1; - } else - core.units.begin()->step = 1; - return FALSE; - } - case 1: { - uint8 adjp = core.temp_var[0]; - for(int32 i = 0; i < returns.bvalue[0]; ++i) { - card* pcard = core.select_cards[returns.bvalue[i + 1]]; - core.destroy_set.insert(pcard); - core.control_adjust_set[adjp].erase(pcard); - } - return FALSE; - } - case 2: { - for(auto cit = core.control_adjust_set[0].begin(); cit != core.control_adjust_set[0].end(); ++cit) { - if((*cit)->unique_code) - remove_unique_card(*cit); - } - for(auto cit = core.control_adjust_set[1].begin(); cit != core.control_adjust_set[1].end(); ++cit) { - if((*cit)->unique_code) - remove_unique_card(*cit); - } - auto cit1 = core.control_adjust_set[0].begin(); - auto cit2 = core.control_adjust_set[1].begin(); - while(cit1 != core.control_adjust_set[0].end() && cit2 != core.control_adjust_set[1].end()) { - card* pcard1 = *cit1++; - card* pcard2 = *cit2++; - uint8 p1 = pcard1->current.controler, p2 = pcard2->current.controler; - uint8 l1 = pcard1->current.location, l2 = pcard2->current.location; - uint8 s1 = pcard1->current.sequence, s2 = pcard2->current.sequence; - remove_card(pcard1); - remove_card(pcard2); - add_card(p2, pcard1, l2, s2); - add_card(p1, pcard2, l1, s1); - pcard1->reset(RESET_CONTROL, RESET_EVENT); - pcard2->reset(RESET_CONTROL, RESET_EVENT); - pduel->write_buffer8(MSG_SWAP); - pduel->write_buffer32(pcard1->data.code); - pduel->write_buffer8(pcard2->current.controler); - pduel->write_buffer8(pcard2->current.location); - pduel->write_buffer8(pcard2->current.sequence); - pduel->write_buffer8(pcard2->current.position); - pduel->write_buffer32(pcard2->data.code); - pduel->write_buffer8(pcard1->current.controler); - pduel->write_buffer8(pcard1->current.location); - pduel->write_buffer8(pcard1->current.sequence); - pduel->write_buffer8(pcard1->current.position); - } - card_set* adjust_set = new card_set; - core.units.begin()->ptarget = (group*)adjust_set; - adjust_set->insert(cit1, core.control_adjust_set[0].end()); - adjust_set->insert(cit2, core.control_adjust_set[1].end()); - return FALSE; - } - case 3: { - card_set* adjust_set = (card_set*)core.units.begin()->ptarget; - if(adjust_set->empty()) - return FALSE; - auto cit = adjust_set->begin(); - card* pcard = *cit; - adjust_set->erase(cit); - pcard->reset(RESET_CONTROL, RESET_EVENT); - move_to_field(pcard, 1 - pcard->current.controler, 1 - pcard->current.controler, LOCATION_MZONE, pcard->current.position); - core.units.begin()->step = 2; - return FALSE; - } - case 4: { - card_set* adjust_set = (card_set*)core.units.begin()->ptarget; - delete adjust_set; - core.control_adjust_set[0].insert(core.control_adjust_set[1].begin(), core.control_adjust_set[1].end()); - for(auto cit = core.control_adjust_set[0].begin(); cit != core.control_adjust_set[0].end(); ) { - card* pcard = *cit++; - if(!(pcard->current.location & LOCATION_ONFIELD)) { - core.control_adjust_set[0].erase(pcard); - continue; - } - pcard->filter_disable_related_cards(); - if(pcard->unique_code) - add_unique_card(pcard); - raise_single_event(pcard, 0, EVENT_CONTROL_CHANGED, 0, REASON_RULE, 0, 0, 0); - } - if(core.control_adjust_set[0].size()) - raise_event(&core.control_adjust_set[0], EVENT_CONTROL_CHANGED, 0, 0, 0, 0, 0); - process_single_event(); - process_instant_event(); - return FALSE; - }; - case 5: { - if(core.destroy_set.size()) - destroy(&core.destroy_set, 0, REASON_RULE, PLAYER_NONE); - return TRUE; - } - } - return TRUE; -} -int32 field::self_destroy(uint16 step) { - switch(step) { - case 0: { - if(!core.self_destroy_set.empty()) - destroy(&core.self_destroy_set, 0, REASON_EFFECT, 5); - else - returns.ivalue[0] = 0; - return FALSE; - } - case 1: { - core.self_destroy_set.clear(); - core.operated_set.clear(); - if(!(core.global_flag & GLOBALFLAG_SELF_TOGRAVE)) - return TRUE; - core.units.begin()->arg1 = returns.ivalue[0]; - if(!core.self_tograve_set.empty()) - send_to(&core.self_tograve_set, 0, REASON_EFFECT, PLAYER_NONE, PLAYER_NONE, LOCATION_GRAVE, 0, POS_FACEUP); - else - return TRUE; - return FALSE; - } - case 2: { - core.self_tograve_set.clear(); - core.operated_set.clear(); - returns.ivalue[0] += core.units.begin()->arg1; - return TRUE; - } - } - return TRUE; -} -int32 field::equip(uint16 step, uint8 equip_player, card * equip_card, card * target, uint32 up, uint32 is_step) { - switch(step) { - case 0: { - returns.ivalue[0] = FALSE; - if(!equip_card->is_affect_by_effect(core.reason_effect)) - return TRUE; - if(equip_card == target || target->current.location != LOCATION_MZONE) - return TRUE; - if(equip_card->equiping_target) { - equip_card->unequip(); - equip_card->enable_field_effect(FALSE); - return FALSE; - } - if(equip_card->current.location == LOCATION_SZONE) { - if(up && equip_card->is_position(POS_FACEDOWN)) - change_position(equip_card, 0, equip_player, POS_FACEUP, 0); - return FALSE; - } - if(get_useable_count(equip_player, LOCATION_SZONE, equip_player, LOCATION_REASON_TOFIELD) <= 0) - return TRUE; - equip_card->enable_field_effect(FALSE); - move_to_field(equip_card, equip_player, equip_player, LOCATION_SZONE, (up || equip_card->is_position(POS_FACEUP)) ? POS_FACEUP : POS_FACEDOWN, FALSE, FALSE, TRUE); - return FALSE; - } - case 1: { - equip_card->equip(target); - if(!(equip_card->data.type & TYPE_EQUIP)) { - effect* peffect = pduel->new_effect(); - peffect->owner = equip_card; - peffect->handler = equip_card; - peffect->type = EFFECT_TYPE_SINGLE; - peffect->code = EFFECT_CHANGE_TYPE; - if(equip_card->data.type & TYPE_TRAP) - peffect->value = TYPE_EQUIP + equip_card->data.type; - else if(equip_card->data.type & TYPE_UNION) - peffect->value = TYPE_EQUIP + TYPE_SPELL + TYPE_UNION; - else - peffect->value = TYPE_EQUIP + TYPE_SPELL; - peffect->flag = EFFECT_FLAG_CANNOT_DISABLE; - peffect->reset_flag = RESET_EVENT + 0x17e0000; - equip_card->add_effect(peffect); - } - equip_card->effect_target_cards.insert(target); - target->effect_target_owner.insert(equip_card); - if(!is_step) { - if(equip_card->is_position(POS_FACEUP)) - equip_card->enable_field_effect(TRUE); - adjust_instant(); - card_set cset; - cset.insert(equip_card); - raise_single_event(target, &cset, EVENT_EQUIP, core.reason_effect, 0, core.reason_player, PLAYER_NONE, 0); - raise_event(&cset, EVENT_EQUIP, core.reason_effect, 0, core.reason_player, PLAYER_NONE, 0); - core.hint_timing[target->current.controler] |= TIMING_EQUIP; - process_single_event(); - process_instant_event(); - return FALSE; - } else { - core.equiping_cards.insert(equip_card); - returns.ivalue[0] = TRUE; - return TRUE; - } - } - case 2: { - returns.ivalue[0] = TRUE; - return TRUE; - } - } - return TRUE; -} -int32 field::summon(uint16 step, uint8 sumplayer, card * target, effect * proc, uint8 ignore_count, uint8 min_tribute) { - switch(step) { - case 0: { - if(!(target->data.type & TYPE_MONSTER)) - return TRUE; - if(target->current.location == LOCATION_MZONE) { - if(target->is_position(POS_FACEDOWN)) - return TRUE; - if(!ignore_count && (core.extra_summon[sumplayer] || !target->is_affected_by_effect(EFFECT_EXTRA_SUMMON_COUNT)) - && (core.summon_count[sumplayer] >= get_summon_count_limit(sumplayer))) - return TRUE; - if(!target->is_affected_by_effect(EFFECT_DUAL_SUMMONABLE)) - return TRUE; - if(target->is_affected_by_effect(EFFECT_DUAL_STATUS)) - return TRUE; - if(!is_player_can_summon(SUMMON_TYPE_DUAL, sumplayer, target)) - return TRUE; - } else { - if(!ignore_count && !core.extra_summon[sumplayer] && core.summon_count[sumplayer] >= get_summon_count_limit(sumplayer)) { - effect* pextra = target->is_affected_by_effect(EFFECT_EXTRA_SUMMON_COUNT); - if(pextra && !(pextra->flag & EFFECT_FLAG_FUNC_VALUE)) { - int32 count = pextra->get_value(); - if(min_tribute < count) { - min_tribute = count; - core.units.begin()->arg2 = ignore_count + (min_tribute << 8); - } - } - } - effect_set eset; - int32 res = target->filter_summon_procedure(sumplayer, &eset, ignore_count, min_tribute); - if((proc && res < 0) || res == -2) - return TRUE; - } - if(check_unique_onfield(target, sumplayer)) - return TRUE; - if(target->is_affected_by_effect(EFFECT_CANNOT_SUMMON)) - return TRUE; - if(core.summon_depth) - core.summon_cancelable = FALSE; - core.summon_depth++; - target->material_cards.clear(); - if(target->current.location == LOCATION_MZONE) - core.units.begin()->step = 3; - return FALSE; - } - case 1: { - if(proc) { - core.units.begin()->step = 3; - return FALSE; - } - effect_set eset; - int32 res = target->filter_summon_procedure(sumplayer, &eset, ignore_count, min_tribute); - core.select_effects.clear(); - core.select_options.clear(); - if(res > 0) { - core.select_effects.push_back(0); - core.select_options.push_back(1); - } - for(int32 i = 0; i < eset.size(); ++i) { - core.select_effects.push_back(eset[i]); - core.select_options.push_back(eset[i]->description); - } - if(core.select_options.size() == 1) - returns.ivalue[0] = 0; - else - add_process(PROCESSOR_SELECT_OPTION, 0, 0, 0, sumplayer, 0); - return FALSE; - } - case 2: { - effect* peffect = core.select_effects[returns.ivalue[0]]; - if(peffect) { - core.units.begin()->peffect = peffect; - core.units.begin()->step = 3; - return FALSE; - } - core.select_cards.clear(); - int32 required = target->get_summon_tribute_count(); - int32 min = required & 0xffff; - int32 max = required >> 16; - if(min < min_tribute) { - min = min_tribute; - required = min + (max << 16); - } - uint32 adv = is_player_can_summon(SUMMON_TYPE_ADVANCE, sumplayer, target); - if(max == 0 || !adv) { - returns.bvalue[0] = 0; - core.units.begin()->step = 3; - } else { - core.release_cards.clear(); - core.release_cards_ex.clear(); - core.release_cards_ex_sum.clear(); - int32 rcount = get_summon_release_list(target, &core.release_cards, &core.release_cards_ex, &core.release_cards_ex_sum); - if(rcount == 0) { - returns.bvalue[0] = 0; - core.units.begin()->step = 3; - } else { - int32 fcount = get_useable_count(sumplayer, LOCATION_MZONE, sumplayer, LOCATION_REASON_TOFIELD); - if(min == 0 && (fcount > 0)) { - add_process(PROCESSOR_SELECT_YESNO, 0, 0, 0, sumplayer, 90); - core.temp_var[0] = required; - core.temp_var[1] = fcount; - } else { - if(min < -fcount + 1) { - min = -fcount + 1; - required = min + (max << 16); - } - add_process(PROCESSOR_SELECT_TRIBUTE, 0, 0, 0, sumplayer + ((uint32)core.summon_cancelable << 16), required); - core.units.begin()->step = 3; - } - } - } - return FALSE; - } - case 3: { - if(returns.ivalue[0]) - returns.bvalue[0] = 0; - else { - int32 min = 1; - int32 max = core.temp_var[0] >> 16; - if(min < -core.temp_var[1] + 1) { - min = -core.temp_var[1] + 1; - } - core.temp_var[0] = min + (max << 16); - add_process(PROCESSOR_SELECT_TRIBUTE, 0, 0, 0, sumplayer + ((uint32)core.summon_cancelable << 16), core.temp_var[0]); - } - return FALSE; - } - case 4: { - if(target->current.location == LOCATION_MZONE) - core.units.begin()->step = 8; - else if(proc) - core.units.begin()->step = 5; - else { - if(returns.ivalue[0] == -1) { - core.summon_depth--; - return TRUE; - } - if(returns.bvalue[0]) { - card_set* tributes = new card_set; - for(int32 i = 0; i < returns.bvalue[0]; ++i) - tributes->insert(core.select_cards[returns.bvalue[i + 1]]); - core.units.begin()->peffect = (effect*)tributes; - } - } - effect_set eset; - target->filter_effect(EFFECT_SUMMON_COST, &eset); - for(int32 i = 0; i < eset.size(); ++i) { - if(eset[i]->operation) { - core.sub_solving_event.push_back(nil_event); - add_process(PROCESSOR_EXECUTE_OPERATION, 0, eset[i], 0, sumplayer, 0); - } - } - return FALSE; - } - case 5: { - card_set* tributes = (card_set*)proc; - int32 min = 0; - int32 level = target->get_level(); - if(level < 5) - min = 0; - else if(level < 7) - min = 1; - else - min = 2; - if(tributes) - min -= tributes->size(); - if(min > 0) { - effect_set eset; - target->filter_effect(EFFECT_DECREASE_TRIBUTE, &eset); - int32 minul = 0; - effect* pdec = 0; - for(int32 i = 0; i < eset.size(); ++i) { - if(!(eset[i]->flag & EFFECT_FLAG_COUNT_LIMIT)) { - int32 dec = eset[i]->get_value(target); - if(minul < (dec & 0xffff)) { - minul = dec & 0xffff; - pdec = eset[i]; - } - } - } - if(pdec) { - min -= minul; - pduel->write_buffer8(MSG_HINT); - pduel->write_buffer8(HINT_CARD); - pduel->write_buffer8(0); - pduel->write_buffer32(pdec->handler->data.code); - } - for(int32 i = 0; i < eset.size() && min > 0; ++i) { - if((eset[i]->flag & EFFECT_FLAG_COUNT_LIMIT) && (eset[i]->reset_count & 0xf00) > 0 && eset[i]->target) { - int32 dec = eset[i]->get_value(target); - min -= dec & 0xffff; - eset[i]->dec_count(); - pduel->write_buffer8(MSG_HINT); - pduel->write_buffer8(HINT_CARD); - pduel->write_buffer8(0); - pduel->write_buffer32(eset[i]->handler->data.code); - } - } - for(int32 i = 0; i < eset.size() && min > 0; ++i) { - if((eset[i]->flag & EFFECT_FLAG_COUNT_LIMIT) && (eset[i]->reset_count & 0xf00) > 0 && !eset[i]->target) { - int32 dec = eset[i]->get_value(target); - min -= dec & 0xffff; - eset[i]->dec_count(); - pduel->write_buffer8(MSG_HINT); - pduel->write_buffer8(HINT_CARD); - pduel->write_buffer8(0); - pduel->write_buffer32(eset[i]->handler->data.code); - } - } - } - effect* pextra = 0; - if(!ignore_count && !core.extra_summon[sumplayer]) - pextra = target->is_affected_by_effect(EFFECT_EXTRA_SUMMON_COUNT); - if(tributes) { - for(auto cit = tributes->begin(); cit != tributes->end(); ++cit) - (*cit)->current.reason_card = target; - target->set_material(tributes); - release(tributes, 0, REASON_SUMMON | REASON_MATERIAL, sumplayer); - target->summon_info = SUMMON_TYPE_NORMAL | SUMMON_TYPE_ADVANCE | (LOCATION_HAND << 16); - delete tributes; - core.units.begin()->peffect = 0; - adjust_all(); - } else - target->summon_info = SUMMON_TYPE_NORMAL | (LOCATION_HAND << 16); - target->current.reason_effect = 0; - target->current.reason_player = sumplayer; - core.units.begin()->step = 6; - core.temp_var[0] = (ptr)pextra; - return FALSE; - } - case 6: { - effect* pextra = 0; - if(!ignore_count && !core.extra_summon[sumplayer]) - pextra = target->is_affected_by_effect(EFFECT_EXTRA_SUMMON_COUNT); - target->summon_info = (proc->get_value(target) & 0xfffffff) | SUMMON_TYPE_NORMAL | (LOCATION_HAND << 16); - target->current.reason_effect = proc; - target->current.reason_player = sumplayer; - if(proc->operation) { - pduel->lua->add_param(target, PARAM_TYPE_CARD); - core.sub_solving_event.push_back(nil_event); - add_process(PROCESSOR_EXECUTE_OPERATION, 0, proc, 0, sumplayer, 0); - } - proc->dec_count(sumplayer); - core.temp_var[0] = (ptr)pextra; - return FALSE; - } - case 7: { - core.summon_depth--; - if(core.summon_depth) - return TRUE; - break_effect(); - if(!ignore_count) { - returns.ivalue[0] = FALSE; - effect* pextra = (effect*)core.temp_var[0]; - if(pextra) { - if((pextra->flag & EFFECT_FLAG_FUNC_VALUE) && (core.summon_count[sumplayer] < get_summon_count_limit(sumplayer))) - add_process(PROCESSOR_SELECT_YESNO, 0, 0, 0, sumplayer, 91); - else if(!(pextra->flag & EFFECT_FLAG_FUNC_VALUE) && ((int32)target->material_cards.size() < pextra->get_value())) - core.temp_var[0] = 0; - else - returns.ivalue[0] = TRUE; - } - } else - returns.ivalue[0] = TRUE; - return FALSE; - } - case 8: { - if(!returns.ivalue[0]) - core.summon_count[sumplayer]++; - else if(core.temp_var[0]) { - core.extra_summon[sumplayer] = TRUE; - effect* pextra = (effect*)core.temp_var[0]; - pextra->get_value(target); - pduel->write_buffer8(MSG_HINT); - pduel->write_buffer8(HINT_CARD); - pduel->write_buffer8(0); - pduel->write_buffer32(pextra->handler->data.code); - } - uint8 targetplayer = sumplayer; - uint8 positions = POS_FACEUP_ATTACK; - if(is_player_affected_by_effect(sumplayer, EFFECT_DEVINE_LIGHT)) - positions = POS_FACEUP; - if(proc && (proc->flag & EFFECT_FLAG_SPSUM_PARAM)) { - positions = proc->s_range; - if(proc->o_range) - targetplayer = 1 - sumplayer; - } - target->enable_field_effect(FALSE); - move_to_field(target, sumplayer, targetplayer, LOCATION_MZONE, positions); - core.summoning_card = target; - core.units.begin()->step = 10; - return FALSE; - } - case 9: { - core.summon_depth--; - if(core.summon_depth) - return TRUE; - target->enable_field_effect(FALSE); - target->current.reason_effect = 0; - target->current.reason_player = sumplayer; - effect* deffect = pduel->new_effect(); - deffect->owner = target; - deffect->code = EFFECT_DUAL_STATUS; - deffect->type = EFFECT_TYPE_SINGLE; - deffect->flag = EFFECT_FLAG_CANNOT_DISABLE | EFFECT_FLAG_CLIENT_HINT; - deffect->description = 64; - deffect->reset_flag = RESET_EVENT + 0x1fe0000; - target->add_effect(deffect); - core.temp_var[0] = 0; - if(!ignore_count) { - returns.ivalue[0] = FALSE; - effect* pextra = core.extra_summon[sumplayer] ? 0 : target->is_affected_by_effect(EFFECT_EXTRA_SUMMON_COUNT); - if(pextra) { - core.temp_var[0] = (ptr)pextra; - if((pextra->flag & EFFECT_FLAG_FUNC_VALUE) && (core.summon_count[sumplayer] < get_summon_count_limit(sumplayer))) - add_process(PROCESSOR_SELECT_YESNO, 0, 0, 0, sumplayer, 91); - else - returns.ivalue[0] = TRUE; - } - } else - returns.ivalue[0] = TRUE; - return FALSE; - } - case 10: { - if(!returns.ivalue[0]) - core.summon_count[sumplayer]++; - else if(core.temp_var[0]) { - core.extra_summon[sumplayer] = TRUE; - effect* pextra = (effect*)core.temp_var[0]; - pextra->get_value(target); - pduel->write_buffer8(MSG_HINT); - pduel->write_buffer8(HINT_CARD); - pduel->write_buffer8(0); - pduel->write_buffer32(pextra->handler->data.code); - } - core.summoning_card = target; - return FALSE; - } - case 11: { - uint8 targetplayer = target->current.controler; - if(target->owner != targetplayer) - set_control(target, targetplayer, 0, 0); - core.phase_action = TRUE; - target->current.reason = REASON_SUMMON; - target->summon_player = sumplayer; - pduel->write_buffer8(MSG_SUMMONING); - pduel->write_buffer32(target->data.code); - pduel->write_buffer8(target->current.controler); - pduel->write_buffer8(target->current.location); - pduel->write_buffer8(target->current.sequence); - pduel->write_buffer8(target->current.position); - core.summon_state_count[sumplayer]++; - core.normalsummon_state_count[sumplayer]++; - check_card_counter(target, 1, sumplayer); - check_card_counter(target, 2, sumplayer); - if (target->material_cards.size()) { - for (auto mit = target->material_cards.begin(); mit != target->material_cards.end(); ++mit) - raise_single_event(*mit, 0, EVENT_BE_PRE_MATERIAL, proc, REASON_SUMMON, sumplayer, sumplayer, 0); - raise_event(&target->material_cards, EVENT_BE_PRE_MATERIAL, proc, REASON_SUMMON, sumplayer, sumplayer, 0); - } - process_single_event(); - process_instant_event(); - return FALSE; - } - case 12: { - if(core.current_chain.size() == 0) { - if(target->is_affected_by_effect(EFFECT_CANNOT_DISABLE_SUMMON)) - core.units.begin()->step = 14; - return FALSE; - } else if(core.current_chain.size() > 1) { - core.units.begin()->step = 14; - return FALSE; - } else { - if(target->is_affected_by_effect(EFFECT_CANNOT_DISABLE_SUMMON)) - core.units.begin()->step = 15; - else - core.units.begin()->step = 13; - core.reserved = core.units.front(); - return TRUE; - } - return FALSE; - } - case 13: { - target->set_status(STATUS_SUMMONING, TRUE); - target->set_status(STATUS_SUMMON_DISABLED, FALSE); - core.summoning_card = 0; - raise_event(target, EVENT_SUMMON, proc, 0, sumplayer, sumplayer, 0); - process_instant_event(); - add_process(PROCESSOR_POINT_EVENT, 0, 0, 0, 0x101, TRUE); - return FALSE; - } - case 14: { - if(target->is_status(STATUS_SUMMONING)) { - core.units.begin()->step = 14; - return FALSE; - } - if(proc) - remove_oath_effect(proc); - if(target->current.location == LOCATION_MZONE) - send_to(target, 0, REASON_RULE, sumplayer, sumplayer, LOCATION_GRAVE, 0, 0); - adjust_instant(); - add_process(PROCESSOR_POINT_EVENT, 0, 0, 0, FALSE, 0); - return TRUE; - } - case 15: { - if(proc) { - for(auto oeit = effects.oath.begin(); oeit != effects.oath.end(); ++oeit) - if(oeit->second == proc) - oeit->second = 0; - } - target->set_status(STATUS_SUMMONING, FALSE); - target->set_status(STATUS_SUMMON_TURN, TRUE); - target->enable_field_effect(TRUE); - if(target->is_status(STATUS_DISABLED)) - target->reset(RESET_DISABLE, RESET_EVENT); - core.summoning_card = 0; - return FALSE; - } - case 16: { - pduel->write_buffer8(MSG_SUMMONED); - adjust_instant(); - if(target->material_cards.size()) { - for(auto mit = target->material_cards.begin(); mit != target->material_cards.end(); ++mit) - raise_single_event(*mit, 0, EVENT_BE_MATERIAL, proc, REASON_SUMMON, sumplayer, sumplayer, 0); - raise_event(&target->material_cards, EVENT_BE_MATERIAL, proc, REASON_SUMMON, sumplayer, sumplayer, 0); - } - process_single_event(); - process_instant_event(); - return false; - } - case 17: { - raise_single_event(target, 0, EVENT_SUMMON_SUCCESS, proc, 0, sumplayer, sumplayer, 0); - process_single_event(); - raise_event(target, EVENT_SUMMON_SUCCESS, proc, 0, sumplayer, sumplayer, 0); - process_instant_event(); - if(core.current_chain.size() == 0) { - adjust_all(); - core.hint_timing[sumplayer] |= TIMING_SUMMON; - add_process(PROCESSOR_POINT_EVENT, 0, 0, 0, FALSE, 0); - } - return TRUE; - } - } - return TRUE; -} -int32 field::flip_summon(uint16 step, uint8 sumplayer, card * target) { - switch(step) { - case 0: { - if(target->current.location != LOCATION_MZONE) - return TRUE; - if(!(target->current.position & POS_FACEDOWN)) - return TRUE; - if(check_unique_onfield(target, sumplayer)) - return TRUE; - effect_set eset; - target->filter_effect(EFFECT_FLIPSUMMON_COST, &eset); - for(int32 i = 0; i < eset.size(); ++i) { - if(eset[i]->operation) { - core.sub_solving_event.push_back(nil_event); - add_process(PROCESSOR_EXECUTE_OPERATION, 0, eset[i], 0, sumplayer, 0); - } - } - return FALSE; - } - case 1: { - target->previous.position = target->current.position; - target->current.position = POS_FACEUP_ATTACK; - target->fieldid = infos.field_id++; - core.phase_action = TRUE; - core.flipsummon_state_count[sumplayer]++; - check_card_counter(target, 4, sumplayer); - pduel->write_buffer8(MSG_FLIPSUMMONING); - pduel->write_buffer32(target->data.code); - pduel->write_buffer8(target->current.controler); - pduel->write_buffer8(target->current.location); - pduel->write_buffer8(target->current.sequence); - pduel->write_buffer8(target->current.position); - if(target->is_affected_by_effect(EFFECT_CANNOT_DISABLE_FLIP_SUMMON)) - core.units.begin()->step = 2; - else { - target->set_status(STATUS_SUMMONING, TRUE); - target->set_status(STATUS_SUMMON_DISABLED, FALSE); - raise_event(target, EVENT_FLIP_SUMMON, 0, 0, sumplayer, sumplayer, 0); - process_instant_event(); - add_process(PROCESSOR_POINT_EVENT, 0, 0, 0, 0x101, TRUE); - } - return FALSE; - } - case 2: { - if(target->is_status(STATUS_SUMMONING)) - return FALSE; - if(target->current.location == LOCATION_MZONE) - send_to(target, 0, REASON_RULE, sumplayer, sumplayer, LOCATION_GRAVE, 0, 0); - add_process(PROCESSOR_POINT_EVENT, 0, 0, 0, FALSE, 0); - return TRUE; - } - case 3: { - target->set_status(STATUS_SUMMONING, FALSE); - target->enable_field_effect(TRUE); - if(target->is_status(STATUS_DISABLED)) - target->reset(RESET_DISABLE, RESET_EVENT); - target->set_status(STATUS_FLIP_SUMMON_TURN, TRUE); - return FALSE; - } - case 4: { - pduel->write_buffer8(MSG_FLIPSUMMONED); - adjust_instant(); - raise_single_event(target, 0, EVENT_FLIP, 0, 0, sumplayer, sumplayer, 0); - raise_single_event(target, 0, EVENT_FLIP_SUMMON_SUCCESS, 0, 0, sumplayer, sumplayer, 0); - raise_single_event(target, 0, EVENT_CHANGE_POS, 0, 0, sumplayer, sumplayer, 0); - process_single_event(); - raise_event(target, EVENT_FLIP, 0, 0, sumplayer, sumplayer, 0); - raise_event(target, EVENT_FLIP_SUMMON_SUCCESS, 0, 0, sumplayer, sumplayer, 0); - raise_event(target, EVENT_CHANGE_POS, 0, 0, sumplayer, sumplayer, 0); - process_instant_event(); - adjust_all(); - if(core.current_chain.size() == 0) { - core.hint_timing[sumplayer] |= TIMING_FLIPSUMMON; - add_process(PROCESSOR_POINT_EVENT, 0, 0, 0, FALSE, 0); - } - return TRUE; - } - } - return TRUE; -} -int32 field::mset(uint16 step, uint8 setplayer, card * target, effect * proc, uint8 ignore_count, uint8 min_tribute) { - switch(step) { - case 0: { - if(target->is_affected_by_effect(EFFECT_UNSUMMONABLE_CARD)) - return TRUE; - if(target->current.location != LOCATION_HAND) - return TRUE; - if(!(target->data.type & TYPE_MONSTER)) - return TRUE; - if(target->is_affected_by_effect(EFFECT_CANNOT_MSET)) - return TRUE; - if(!ignore_count && (core.extra_summon[setplayer] || !target->is_affected_by_effect(EFFECT_EXTRA_SET_COUNT)) - && core.summon_count[setplayer] >= get_summon_count_limit(setplayer)) - return TRUE; - if(!ignore_count && !core.extra_summon[setplayer] && core.summon_count[setplayer] >= get_summon_count_limit(setplayer)) { - effect* pextra = target->is_affected_by_effect(EFFECT_EXTRA_SET_COUNT); - if(pextra && !(pextra->flag & EFFECT_FLAG_FUNC_VALUE)) { - int32 count = pextra->get_value(); - if(min_tribute < count) { - min_tribute = count; - core.units.begin()->arg2 = ignore_count + (min_tribute << 8); - } - } - } - target->material_cards.clear(); - effect_set eset; - int32 res = target->filter_set_procedure(setplayer, &eset, ignore_count, min_tribute); - if((proc && res < 0) || res == -2) - return TRUE; - return FALSE; - } - case 1: { - if(proc) { - core.units.begin()->step = 3; - return FALSE; - } - effect_set eset; - int32 res = target->filter_set_procedure(setplayer, &eset, ignore_count, min_tribute); - core.select_effects.clear(); - core.select_options.clear(); - if(res > 0) { - core.select_effects.push_back(0); - core.select_options.push_back(1); - } - for(int32 i = 0; i < eset.size(); ++i) { - core.select_effects.push_back(eset[i]); - core.select_options.push_back(eset[i]->description); - } - if(core.select_options.size() == 1) - returns.ivalue[0] = 0; - else - add_process(PROCESSOR_SELECT_OPTION, 0, 0, 0, setplayer, 0); - return FALSE; - } - case 2: { - effect* peffect = core.select_effects[returns.ivalue[0]]; - if(peffect) { - core.units.begin()->peffect = peffect; - core.units.begin()->step = 3; - return FALSE; - } - core.select_cards.clear(); - int32 required = target->get_set_tribute_count(); - int32 min = required & 0xffff; - int32 max = required >> 16; - if(min < min_tribute) { - min = min_tribute; - required = min + (max << 16); - } - uint32 adv = is_player_can_mset(SUMMON_TYPE_ADVANCE, setplayer, target); - if(max == 0 || !adv) { - returns.bvalue[0] = 0; - core.units.begin()->step = 3; - } else { - core.release_cards.clear(); - core.release_cards_ex.clear(); - core.release_cards_ex_sum.clear(); - int32 rcount = get_summon_release_list(target, &core.release_cards, &core.release_cards_ex, &core.release_cards_ex_sum); - if(rcount == 0) { - returns.bvalue[0] = 0; - core.units.begin()->step = 3; - } else { - int32 fcount = get_useable_count(setplayer, LOCATION_MZONE, setplayer, LOCATION_REASON_TOFIELD); - if(min == 0 && fcount > 0) { - add_process(PROCESSOR_SELECT_YESNO, 0, 0, 0, setplayer, 90); - core.temp_var[0] = required; - core.temp_var[1] = fcount; - } else { - if(min < -fcount + 1) { - min = -fcount + 1; - required = min + (max << 16); - } - add_process(PROCESSOR_SELECT_TRIBUTE, 0, 0, 0, setplayer + ((uint32)core.summon_cancelable << 16), required); - core.units.begin()->step = 3; - } - } - } - return FALSE; - } - case 3: { - if(returns.ivalue[0]) - returns.bvalue[0] = 0; - else { - int32 min = 1; - int32 max = core.temp_var[0] >> 16; - if(min < -core.temp_var[1] + 1) { - min = -core.temp_var[1] + 1; - } - core.temp_var[0] = min + (max << 16); - add_process(PROCESSOR_SELECT_TRIBUTE, 0, 0, 0, setplayer + ((uint32)core.summon_cancelable << 16), core.temp_var[0]); - } - return FALSE; - } - case 4: { - if(proc) - core.units.begin()->step = 5; - else { - if(returns.ivalue[0] == -1) { - return TRUE; - } - if(returns.bvalue[0]) { - card_set* tributes = new card_set; - for(int32 i = 0; i < returns.bvalue[0]; ++i) - tributes->insert(core.select_cards[returns.bvalue[i + 1]]); - core.units.begin()->peffect = (effect*)tributes; - } - } - effect_set eset; - target->filter_effect(EFFECT_MSET_COST, &eset); - for(int32 i = 0; i < eset.size(); ++i) { - if(eset[i]->operation) { - core.sub_solving_event.push_back(nil_event); - add_process(PROCESSOR_EXECUTE_OPERATION, 0, eset[i], 0, setplayer, 0); - } - } - return FALSE; - } - case 5: { - card_set* tributes = (card_set*)proc; - effect* pextra = 0; - if(!ignore_count && !core.extra_summon[setplayer]) - pextra = target->is_affected_by_effect(EFFECT_EXTRA_SET_COUNT); - if(tributes) { - for(auto cit = tributes->begin(); cit != tributes->end(); ++cit) - (*cit)->current.reason_card = target; - target->set_material(tributes); - release(tributes, 0, REASON_SUMMON | REASON_MATERIAL, setplayer); - target->summon_info = SUMMON_TYPE_NORMAL | SUMMON_TYPE_ADVANCE | (LOCATION_HAND << 16); - delete tributes; - core.units.begin()->peffect = 0; - adjust_all(); - } else - target->summon_info = SUMMON_TYPE_NORMAL | (LOCATION_HAND << 16); - target->summon_player = setplayer; - target->current.reason_effect = 0; - target->current.reason_player = setplayer; - core.units.begin()->step = 6; - core.temp_var[0] = (ptr)pextra; - return FALSE; - } - case 6: { - effect* pextra = 0; - if(!ignore_count && !core.extra_summon[setplayer]) - pextra = target->is_affected_by_effect(EFFECT_EXTRA_SET_COUNT); - target->summon_info = (proc->get_value(target) & 0xfffffff) | SUMMON_TYPE_NORMAL | (LOCATION_HAND << 16); - target->current.reason_effect = proc; - target->current.reason_player = setplayer; - pduel->lua->add_param(target, PARAM_TYPE_CARD); - core.sub_solving_event.push_back(nil_event); - add_process(PROCESSOR_EXECUTE_OPERATION, 0, proc, 0, setplayer, 0); - proc->dec_count(setplayer); - core.temp_var[0] = (ptr)pextra; - return FALSE; - } - case 7: { - break_effect(); - if(!ignore_count) { - returns.ivalue[0] = FALSE; - effect* pextra = (effect*)core.temp_var[0]; - if(pextra) { - if((pextra->flag & EFFECT_FLAG_FUNC_VALUE) && (core.summon_count[setplayer] < get_summon_count_limit(setplayer))) - add_process(PROCESSOR_SELECT_YESNO, 0, 0, 0, setplayer, 91); - else if(!(pextra->flag & EFFECT_FLAG_FUNC_VALUE) && ((int32)target->material_cards.size() < pextra->get_value())) - core.temp_var[0] = 0; - else - returns.ivalue[0] = TRUE; - } - } else - returns.ivalue[0] = TRUE; - return FALSE; - } - case 8: { - if(!returns.ivalue[0]) - core.summon_count[setplayer]++; - else if(core.temp_var[0]) { - core.extra_summon[setplayer] = TRUE; - effect* pextra = (effect*)core.temp_var[0]; - pextra->get_value(target); - pduel->write_buffer8(MSG_HINT); - pduel->write_buffer8(HINT_CARD); - pduel->write_buffer8(0); - pduel->write_buffer32(pextra->handler->data.code); - } - uint8 targetplayer = setplayer; - uint8 positions = POS_FACEDOWN_DEFENCE; - if(proc && (proc->flag & EFFECT_FLAG_SPSUM_PARAM)) { - positions = proc->s_range; - if(proc->o_range) - targetplayer = 1 - setplayer; - } - target->enable_field_effect(FALSE); - move_to_field(target, setplayer, targetplayer, LOCATION_MZONE, positions); - return FALSE; - } - case 9: { - uint8 targetplayer = target->current.controler; - if(target->owner != targetplayer) - set_control(target, targetplayer, 0, 0); - core.phase_action = TRUE; - core.normalsummon_state_count[setplayer]++; - check_card_counter(target, 2, setplayer); - target->set_status(STATUS_SUMMON_TURN, TRUE); - pduel->write_buffer8(MSG_SET); - pduel->write_buffer32(target->data.code); - pduel->write_buffer8(target->current.controler); - pduel->write_buffer8(target->current.location); - pduel->write_buffer8(target->current.sequence); - pduel->write_buffer8(target->current.position); - adjust_instant(); - raise_event(target, EVENT_MSET, proc, 0, setplayer, setplayer, 0); - process_instant_event(); - if(core.current_chain.size() == 0) { - adjust_all(); - core.hint_timing[setplayer] |= TIMING_MSET; - add_process(PROCESSOR_POINT_EVENT, 0, 0, 0, FALSE, FALSE); - } - return TRUE; - } - } - return TRUE; -} -int32 field::sset(uint16 step, uint8 setplayer, uint8 toplayer, card * target) { - switch(step) { - case 0: { - if(!(target->data.type & TYPE_FIELD) && get_useable_count(toplayer, LOCATION_SZONE, setplayer, LOCATION_REASON_TOFIELD) <= 0) - return TRUE; - if(target->data.type & TYPE_MONSTER && !target->is_affected_by_effect(EFFECT_MONSTER_SSET)) - return TRUE; - if(target->current.location == LOCATION_SZONE) - return TRUE; - if(!is_player_can_sset(setplayer, target)) - return TRUE; - if(target->is_affected_by_effect(EFFECT_CANNOT_SSET)) - return TRUE; - effect_set eset; - target->filter_effect(EFFECT_SSET_COST, &eset); - for(int32 i = 0; i < eset.size(); ++i) { - if(eset[i]->operation) { - core.sub_solving_event.push_back(nil_event); - add_process(PROCESSOR_EXECUTE_OPERATION, 0, eset[i], 0, setplayer, 0); - } - } - return FALSE; - } - case 1: { - target->enable_field_effect(FALSE); - move_to_field(target, setplayer, toplayer, LOCATION_SZONE, POS_FACEDOWN); - return FALSE; - } - case 2: { - core.phase_action = TRUE; - target->set_status(STATUS_SET_TURN, TRUE); - if(target->data.type & TYPE_MONSTER) { - effect* peffect = target->is_affected_by_effect(EFFECT_MONSTER_SSET); - int32 type_val = peffect->get_value(); - peffect = pduel->new_effect(); - peffect->owner = target; - peffect->type = EFFECT_TYPE_SINGLE; - peffect->code = EFFECT_CHANGE_TYPE; - peffect->reset_flag = RESET_EVENT + 0x1fe0000; - peffect->value = type_val; - target->add_effect(peffect); - } - pduel->write_buffer8(MSG_SET); - pduel->write_buffer32(target->data.code); - pduel->write_buffer8(target->current.controler); - pduel->write_buffer8(target->current.location); - pduel->write_buffer8(target->current.sequence); - pduel->write_buffer8(target->current.position); - adjust_instant(); - raise_event(target, EVENT_SSET, 0, 0, setplayer, setplayer, 0); - process_instant_event(); - if(core.current_chain.size() == 0) { - adjust_all(); - core.hint_timing[setplayer] |= TIMING_SSET; - add_process(PROCESSOR_POINT_EVENT, 0, 0, 0, FALSE, FALSE); - } - } - } - return TRUE; -} -int32 field::sset_g(uint16 step, uint8 setplayer, uint8 toplayer, group* ptarget) { - switch(step) { - case 0: { - card_set* set_cards = new card_set; - core.operated_set.clear(); - for(auto cit = ptarget->container.begin(); cit != ptarget->container.end(); ++cit) { - card* target = *cit; - if((!(target->data.type & TYPE_FIELD) && get_useable_count(toplayer, LOCATION_SZONE, setplayer, LOCATION_REASON_TOFIELD) <= 0) - || (target->data.type & TYPE_MONSTER && !target->is_affected_by_effect(EFFECT_MONSTER_SSET)) - || (target->current.location == LOCATION_SZONE) - || (!is_player_can_sset(setplayer, target)) - || (target->is_affected_by_effect(EFFECT_CANNOT_SSET))) { - continue; - } - set_cards->insert(target); - } - if(set_cards->empty()) { - delete set_cards; - returns.ivalue[0] = 0; - return TRUE; - } - core.phase_action = TRUE; - core.units.begin()->ptarget = (group*)set_cards; - return FALSE; - } - case 1: { - card_set* set_cards = (card_set*)ptarget; - card* target = *set_cards->begin(); - target->enable_field_effect(FALSE); - move_to_field(target, setplayer, toplayer, LOCATION_SZONE, POS_FACEDOWN, FALSE); - return FALSE; - } - case 2: { - card_set* set_cards = (card_set*)ptarget; - card* target = *set_cards->begin(); - target->set_status(STATUS_SET_TURN, TRUE); - if(target->data.type & TYPE_MONSTER) { - effect* peffect = target->is_affected_by_effect(EFFECT_MONSTER_SSET); - int32 type_val = peffect->get_value(); - peffect = pduel->new_effect(); - peffect->owner = target; - peffect->type = EFFECT_TYPE_SINGLE; - peffect->code = EFFECT_CHANGE_TYPE; - peffect->reset_flag = RESET_EVENT + 0x1fe0000; - peffect->value = type_val; - target->add_effect(peffect); - } - pduel->write_buffer8(MSG_SET); - pduel->write_buffer32(target->data.code); - pduel->write_buffer8(target->current.controler); - pduel->write_buffer8(target->current.location); - pduel->write_buffer8(target->current.sequence); - pduel->write_buffer8(target->current.position); - core.operated_set.insert(target); - set_cards->erase(target); - if(!set_cards->empty()) - core.units.begin()->step = 0; - else - delete set_cards; - return FALSE; - } - case 3: { - returns.ivalue[0] = core.operated_set.size(); - adjust_instant(); - raise_event(&core.operated_set, EVENT_SSET, 0, 0, setplayer, setplayer, 0); - process_instant_event(); - if(core.current_chain.size() == 0) { - adjust_all(); - core.hint_timing[setplayer] |= TIMING_SSET; - add_process(PROCESSOR_POINT_EVENT, 0, 0, 0, FALSE, FALSE); - } - return TRUE; - } - } - return TRUE; -} -int32 field::special_summon_rule(uint16 step, uint8 sumplayer, card * target, uint32 summon_type) { - switch(step) { - case 0: { - effect_set eset; - card* tuner = core.limit_tuner; - group* materials = core.limit_xyz; - group* syn = core.limit_syn; - target->filter_spsummon_procedure(sumplayer, &eset, summon_type); - target->filter_spsummon_procedure_g(sumplayer, &eset); - core.limit_tuner = tuner; - core.limit_xyz = materials; - core.limit_syn = syn; - if(!eset.size()) - return TRUE; - core.select_effects.clear(); - core.select_options.clear(); - for(int32 i = 0; i < eset.size(); ++i) { - core.select_effects.push_back(eset[i]); - core.select_options.push_back(eset[i]->description); - } - if(core.select_options.size() == 1) - returns.ivalue[0] = 0; - else - add_process(PROCESSOR_SELECT_OPTION, 0, 0, 0, sumplayer, 0); - return FALSE; - } - case 1: { - effect* peffect = core.select_effects[returns.ivalue[0]]; - core.units.begin()->peffect = peffect; - if(peffect->code == EFFECT_SPSUMMON_PROC_G) { - core.units.begin()->step = 19; - return FALSE; - } - returns.ivalue[0] = TRUE; - if(peffect->target) { - pduel->lua->add_param(target, PARAM_TYPE_CARD); - if(core.limit_tuner || core.limit_syn) { - pduel->lua->add_param(core.limit_tuner, PARAM_TYPE_CARD); - pduel->lua->add_param(core.limit_syn, PARAM_TYPE_GROUP); - } else if(core.limit_xyz) { - pduel->lua->add_param(core.limit_xyz, PARAM_TYPE_GROUP); - } - core.sub_solving_event.push_back(nil_event); - add_process(PROCESSOR_EXECUTE_TARGET, 0, peffect, 0, sumplayer, 0); - } - return FALSE; - } - case 2: { - if(!returns.ivalue[0]) - return TRUE; - effect_set eset; - target->filter_effect(EFFECT_SPSUMMON_COST, &eset); - for(int32 i = 0; i < eset.size(); ++i) { - if(eset[i]->operation) { - core.sub_solving_event.push_back(nil_event); - add_process(PROCESSOR_EXECUTE_OPERATION, 0, eset[i], 0, sumplayer, 0); - } - } - return FALSE; - } - case 3: { - effect* peffect = core.units.begin()->peffect; - target->material_cards.clear(); - target->summon_info = (peffect->get_value(target) & 0xf00ffff) | SUMMON_TYPE_SPECIAL | ((uint32)target->current.location << 16); - if(peffect->operation) { - pduel->lua->add_param(target, PARAM_TYPE_CARD); - if(core.limit_tuner || core.limit_syn) { - pduel->lua->add_param(core.limit_tuner, PARAM_TYPE_CARD); - pduel->lua->add_param(core.limit_syn, PARAM_TYPE_GROUP); - core.limit_tuner = 0; - core.limit_syn = 0; - } - if(core.limit_xyz) { - pduel->lua->add_param(core.limit_xyz, PARAM_TYPE_GROUP); - core.limit_xyz = 0; - } - core.sub_solving_event.push_back(nil_event); - add_process(PROCESSOR_EXECUTE_OPERATION, 0, peffect, 0, sumplayer, 0); - } - peffect->dec_count(sumplayer); - return FALSE; - } - case 4: { - effect* peffect = core.units.begin()->peffect; - uint8 targetplayer = sumplayer; - uint8 positions = POS_FACEUP; - if(peffect->flag & EFFECT_FLAG_SPSUM_PARAM) { - positions = peffect->s_range; - if(peffect->o_range == 0) - targetplayer = sumplayer; - else - targetplayer = 1 - sumplayer; - } - if(positions == 0) - positions = POS_FACEUP_ATTACK; - target->enable_field_effect(FALSE); - move_to_field(target, sumplayer, targetplayer, LOCATION_MZONE, positions); - target->current.reason = REASON_SPSUMMON; - target->current.reason_effect = peffect; - target->current.reason_player = sumplayer; - target->summon_player = sumplayer; - set_spsummon_counter(sumplayer); - check_card_counter(target, 3, sumplayer); - if(target->spsummon_code) - core.spsummon_once_map[sumplayer][target->spsummon_code]++; - break_effect(); - return FALSE; - } - case 5: { - uint8 targetplayer = target->current.controler; - if(target->owner != targetplayer) - set_control(target, targetplayer, 0, 0); - core.phase_action = TRUE; - target->current.reason_effect = core.units.begin()->peffect; - core.summoning_card = target; - pduel->write_buffer8(MSG_SPSUMMONING); - pduel->write_buffer32(target->data.code); - pduel->write_buffer8(target->current.controler); - pduel->write_buffer8(target->current.location); - pduel->write_buffer8(target->current.sequence); - pduel->write_buffer8(target->current.position); - return FALSE; - } - case 6: { - effect* proc = core.units.begin()->peffect; - int32 matreason = proc->value == SUMMON_TYPE_SYNCHRO ? REASON_SYNCHRO : proc->value == SUMMON_TYPE_XYZ ? REASON_XYZ : REASON_SPSUMMON; - if (target->material_cards.size()) { - for (auto mit = target->material_cards.begin(); mit != target->material_cards.end(); ++mit) - raise_single_event(*mit, 0, EVENT_BE_PRE_MATERIAL, proc, matreason, sumplayer, sumplayer, 0); - } - raise_event(&target->material_cards, EVENT_BE_PRE_MATERIAL, proc, matreason, sumplayer, sumplayer, 0); - process_single_event(); - process_instant_event(); - return FALSE; - } - case 7: { - if (core.current_chain.size() == 0) { - if (target->is_affected_by_effect(EFFECT_CANNOT_DISABLE_SPSUMMON)) - core.units.begin()->step = 14; - else - core.units.begin()->step = 9; - return FALSE; - } else if (core.current_chain.size() > 1) { - core.units.begin()->step = 14; - return FALSE; - } else { - if (target->is_affected_by_effect(EFFECT_CANNOT_DISABLE_SPSUMMON)) - core.units.begin()->step = 15; - else - core.units.begin()->step = 10; - core.reserved = core.units.front(); - return TRUE; - } - return FALSE; - } - case 10: { - core.summoning_card = 0; - target->set_status(STATUS_SUMMONING, TRUE); - target->set_status(STATUS_SUMMON_DISABLED, FALSE); - raise_event(target, EVENT_SPSUMMON, core.units.begin()->peffect, 0, sumplayer, sumplayer, 0); - process_instant_event(); - add_process(PROCESSOR_POINT_EVENT, 0, 0, 0, 0x101, TRUE); - return FALSE; - } - case 11: { - if(target->is_status(STATUS_SUMMONING)) { - core.units.begin()->step = 14; - return FALSE; - } - remove_oath_effect(core.units.begin()->peffect); - if(target->current.location == LOCATION_MZONE) - send_to(target, 0, REASON_RULE, sumplayer, sumplayer, LOCATION_GRAVE, 0, 0); - adjust_instant(); - add_process(PROCESSOR_POINT_EVENT, 0, 0, 0, FALSE, 0); - return TRUE; - } - case 15: { - for(auto oeit = effects.oath.begin(); oeit != effects.oath.end(); ++oeit) - if(oeit->second == core.units.begin()->peffect) - oeit->second = 0; - target->set_status(STATUS_SUMMONING, FALSE); - target->set_status(STATUS_PROC_COMPLETE | STATUS_SPSUMMON_TURN, TRUE); - target->enable_field_effect(TRUE); - if(target->is_status(STATUS_DISABLED)) - target->reset(RESET_DISABLE, RESET_EVENT); - core.summoning_card = 0; - return FALSE; - } - case 16: { - pduel->write_buffer8(MSG_SPSUMMONED); - adjust_instant(); - effect* proc = core.units.begin()->peffect; - int32 matreason = proc->value == SUMMON_TYPE_SYNCHRO ? REASON_SYNCHRO : proc->value == SUMMON_TYPE_XYZ ? REASON_XYZ : REASON_SPSUMMON; - if(target->material_cards.size()) { - for(auto mit = target->material_cards.begin(); mit != target->material_cards.end(); ++mit) - raise_single_event(*mit, 0, EVENT_BE_MATERIAL, proc, matreason, sumplayer, sumplayer, 0); - } - raise_event(&target->material_cards, EVENT_BE_MATERIAL, proc, matreason, sumplayer, sumplayer, 0); - process_single_event(); - process_instant_event(); - return FALSE; - } - case 17: { - raise_single_event(target, 0, EVENT_SPSUMMON_SUCCESS, core.units.begin()->peffect, 0, sumplayer, sumplayer, 0); - process_single_event(); - raise_event(target, EVENT_SPSUMMON_SUCCESS, core.units.begin()->peffect, 0, sumplayer, sumplayer, 0); - process_instant_event(); - if(core.current_chain.size() == 0) { - adjust_all(); - core.hint_timing[sumplayer] |= TIMING_SPSUMMON; - add_process(PROCESSOR_POINT_EVENT, 0, 0, 0, FALSE, 0); - } - return TRUE; - } - case 20: { - effect* peffect = core.units.begin()->peffect; - core.units.begin()->ptarget = pduel->new_group(); - if(peffect->operation) { - core.sub_solving_event.push_back(nil_event); - pduel->lua->add_param(target, PARAM_TYPE_CARD); - pduel->lua->add_param(core.units.begin()->ptarget, PARAM_TYPE_GROUP); - add_process(PROCESSOR_EXECUTE_OPERATION, 0, peffect, 0, sumplayer, 0); - } - peffect->dec_count(sumplayer); - return FALSE; - } - case 21: { - group* pgroup = core.units.begin()->ptarget; - for(auto cit = pgroup->container.begin(); cit != pgroup->container.end(); ) { - card* pcard = *cit++; - if(!(pcard->data.type & TYPE_MONSTER) - || (pcard->current.location == LOCATION_MZONE) - || check_unique_onfield(pcard, sumplayer) - || pcard->is_affected_by_effect(EFFECT_CANNOT_SPECIAL_SUMMON)) { - pgroup->container.erase(pcard); - continue; - } - effect_set eset; - pcard->filter_effect(EFFECT_SPSUMMON_COST, &eset); - for(int32 i = 0; i < eset.size(); ++i) { - if(eset[i]->operation) { - core.sub_solving_event.push_back(nil_event); - add_process(PROCESSOR_EXECUTE_OPERATION, 0, eset[i], 0, sumplayer, 0); - } - } - } - return FALSE; - } - case 22: { - group* pgroup = core.units.begin()->ptarget; - if(pgroup->container.size() == 0) - return TRUE; - core.phase_action = TRUE; - pgroup->it = pgroup->container.begin(); - return FALSE; - } - case 23: { - effect* peffect = core.units.begin()->peffect; - card* pcard = *core.units.begin()->ptarget->it; - pcard->enable_field_effect(FALSE); - pcard->current.reason = REASON_SPSUMMON; - pcard->current.reason_effect = peffect; - pcard->current.reason_player = sumplayer; - pcard->summon_player = sumplayer; - pcard->summon_info = (peffect->get_value(pcard) & 0xff00ffff) | SUMMON_TYPE_SPECIAL | ((uint32)pcard->current.location << 16); - check_card_counter(pcard, 3, sumplayer); - move_to_field(pcard, sumplayer, sumplayer, LOCATION_MZONE, POS_FACEUP); - return FALSE; - } - case 24: { - group* pgroup = core.units.begin()->ptarget; - card* pcard = *pgroup->it++; - pduel->write_buffer8(MSG_SPSUMMONING); - pduel->write_buffer32(pcard->data.code); - pduel->write_buffer8(pcard->current.controler); - pduel->write_buffer8(pcard->current.location); - pduel->write_buffer8(pcard->current.sequence); - pduel->write_buffer8(pcard->current.position); - if(pcard->owner != pcard->current.controler) - set_control(pcard, pcard->current.controler, 0, 0); - if(pgroup->it != pgroup->container.end()) - core.units.begin()->step = 22; - return FALSE; - } - case 25: { - group* pgroup = core.units.begin()->ptarget; - set_spsummon_counter(sumplayer); - std::set spsummon_once_set; - for(auto cit = pgroup->container.begin(); cit != pgroup->container.end(); ++cit) { - if((*cit)->spsummon_code) - spsummon_once_set.insert((*cit)->spsummon_code); - } - for(auto cit = spsummon_once_set.begin(); cit != spsummon_once_set.end(); ++cit) - core.spsummon_once_map[sumplayer][*cit]++; - card_set cset; - for(auto cit = pgroup->container.begin(); cit != pgroup->container.end(); ++cit) { - if(!(*cit)->is_affected_by_effect(EFFECT_CANNOT_DISABLE_SPSUMMON)) { - raise_single_event(*cit, 0, EVENT_SPSUMMON, (*cit)->current.reason_effect, 0, (*cit)->summon_player, (*cit)->summon_player, 0); - cset.insert(*cit); - } - (*cit)->set_status(STATUS_SUMMONING, TRUE); - } - if(cset.size()) - raise_event(&cset, EVENT_SPSUMMON, core.units.begin()->peffect, 0, sumplayer, sumplayer, 0); - process_single_event(); - process_instant_event(); - add_process(PROCESSOR_POINT_EVENT, 0, 0, 0, 0x101, TRUE); - return FALSE; - } - case 26: { - group* pgroup = core.units.begin()->ptarget; - card_set cset; - for(auto cit = pgroup->container.begin(); cit != pgroup->container.end(); ) { - card* pcard = *cit++; - if(!pcard->is_status(STATUS_SUMMONING)) { - pgroup->container.erase(pcard); - if(pcard->current.location == LOCATION_MZONE) - cset.insert(pcard); - } - } - if(cset.size()) { - send_to(&cset, 0, REASON_RULE, sumplayer, sumplayer, LOCATION_GRAVE, 0, 0); - adjust_instant(); - } - if(pgroup->container.size() == 0) { - add_process(PROCESSOR_POINT_EVENT, 0, 0, 0, FALSE, 0); - return TRUE; - } - return FALSE; - } - case 27: { - group* pgroup = core.units.begin()->ptarget; - for(auto oeit = effects.oath.begin(); oeit != effects.oath.end(); ++oeit) - if(oeit->second == core.units.begin()->peffect) - oeit->second = 0; - for(auto cit = pgroup->container.begin(); cit != pgroup->container.end(); ++cit) { - (*cit)->set_status(STATUS_SUMMONING, FALSE); - (*cit)->set_status(STATUS_SPSUMMON_TURN, TRUE); - (*cit)->enable_field_effect(TRUE); - if((*cit)->is_status(STATUS_DISABLED)) - (*cit)->reset(RESET_DISABLE, RESET_EVENT); - } - return FALSE; - } - case 28: { - group* pgroup = core.units.begin()->ptarget; - pduel->write_buffer8(MSG_SPSUMMONED); - for(auto cit = pgroup->container.begin(); cit != pgroup->container.end(); ++cit) - raise_single_event(*cit, 0, EVENT_SPSUMMON_SUCCESS, (*cit)->current.reason_effect, 0, (*cit)->current.reason_player, (*cit)->summon_player, 0); - process_single_event(); - raise_event(&pgroup->container, EVENT_SPSUMMON_SUCCESS, core.units.begin()->peffect, 0, sumplayer, sumplayer, 0); - process_instant_event(); - if(core.current_chain.size() == 0) { - adjust_all(); - core.hint_timing[sumplayer] |= TIMING_SPSUMMON; - add_process(PROCESSOR_POINT_EVENT, 0, 0, 0, FALSE, 0); - } - return TRUE; - } - } - return TRUE; -} -int32 field::special_summon_step(uint16 step, group * targets, card * target) { - uint8 playerid = (target->operation_param >> 24) & 0xf; - uint8 nocheck = (target->operation_param >> 16) & 0xff; - uint8 nolimit = (target->operation_param >> 8) & 0xff; - uint8 positions = target->operation_param & 0xff; - switch(step) { - case 0: { - returns.ivalue[0] = FALSE; - uint32 result = TRUE; - effect_set eset; - if(target->is_affected_by_effect(EFFECT_REVIVE_LIMIT) && !target->is_status(STATUS_PROC_COMPLETE)) { - if((!nolimit && (target->current.location & 0x38)) || (!nocheck && !nolimit && (target->current.location & 0x3))) - result = FALSE; - } - if(!result || (target->current.location == LOCATION_MZONE) - || check_unique_onfield(target, playerid) - || !is_player_can_spsummon(core.reason_effect, target->summon_info & 0xff00ffff, positions, target->summon_player, playerid, target) - || get_useable_count(playerid, LOCATION_MZONE, target->summon_player, LOCATION_REASON_TOFIELD) <= 0 - || (!nocheck && !(target->data.type & TYPE_MONSTER))) - result = FALSE; - if(result && !nocheck) { - target->filter_effect(EFFECT_SPSUMMON_CONDITION, &eset); - for(int32 i = 0; i < eset.size(); ++i) { - pduel->lua->add_param(core.reason_effect, PARAM_TYPE_EFFECT); - pduel->lua->add_param(target->summon_player, PARAM_TYPE_INT); - pduel->lua->add_param(target->summon_info & 0xff00ffff, PARAM_TYPE_INT); - pduel->lua->add_param(positions, PARAM_TYPE_INT); - pduel->lua->add_param(playerid, PARAM_TYPE_INT); - if(!eset[i]->check_value_condition(5)) { - result = FALSE; - break; - } - } - } - if(!result) { - target->current.reason = target->temp.reason; - target->current.reason_effect = target->temp.reason_effect; - target->current.reason_player = target->temp.reason_player; - if(targets) - targets->container.erase(target); - return TRUE; - } - eset.clear(); - target->filter_effect(EFFECT_SPSUMMON_COST, &eset); - for(int32 i = 0; i < eset.size(); ++i) { - if(eset[i]->operation) { - core.sub_solving_event.push_back(nil_event); - add_process(PROCESSOR_EXECUTE_OPERATION, 0, eset[i], 0, target->summon_player, 0); - } - } - return FALSE; - } - case 1: { - if(!targets) - core.special_summoning.insert(target); - target->enable_field_effect(FALSE); - check_card_counter(target, 3, target->summon_player); - move_to_field(target, target->summon_player, playerid, LOCATION_MZONE, positions); - return FALSE; - } - case 2: { - pduel->write_buffer8(MSG_SPSUMMONING); - pduel->write_buffer32(target->data.code); - pduel->write_buffer8(target->current.controler); - pduel->write_buffer8(target->current.location); - pduel->write_buffer8(target->current.sequence); - pduel->write_buffer8(target->current.position); - return FALSE; - } - case 3: { - returns.ivalue[0] = TRUE; - if(target->owner != target->current.controler) - set_control(target, target->current.controler, 0, 0); - target->set_status(STATUS_SPSUMMON_STEP, TRUE); - return TRUE; - } - } - return TRUE; -} -int32 field::special_summon(uint16 step, effect * reason_effect, uint8 reason_player, group * targets) { - switch(step) { - case 0: { - card_vector cvs, cvo; - for(auto iter = targets->container.begin(); iter != targets->container.end(); ++iter) { - auto pcard = *iter; - if(pcard->summon_player == infos.turn_player) - cvs.push_back(pcard); - else - cvo.push_back(pcard); - } - if(!cvs.empty()) { - if(cvs.size() > 1) - std::sort(cvs.begin(), cvs.end(), card::card_operation_sort); - core.hint_timing[infos.turn_player] |= TIMING_SPSUMMON; - for(auto cvit = cvs.begin(); cvit != cvs.end(); ++cvit) - add_process(PROCESSOR_SPSUMMON_STEP, 0, 0, targets, 0, (ptr)(*cvit)); - } - if(!cvo.empty()) { - if(cvo.size() > 1) - std::sort(cvo.begin(), cvo.end(), card::card_operation_sort); - core.hint_timing[1 - infos.turn_player] |= TIMING_SPSUMMON; - for(auto cvit = cvo.begin(); cvit != cvo.end(); ++cvit) - add_process(PROCESSOR_SPSUMMON_STEP, 0, 0, targets, 0, (ptr)(*cvit)); - } - return FALSE; - } - case 1: { - if(targets->container.size() == 0) { - returns.ivalue[0] = 0; - core.operated_set.clear(); - pduel->delete_group(targets); - return TRUE; - } - bool tp = false, ntp = false; - std::set spsummon_once_set[2]; - for(auto cit = targets->container.begin(); cit != targets->container.end(); ++cit) { - if((*cit)->summon_player == infos.turn_player) - tp = true; - else - ntp = true; - if((*cit)->spsummon_code) - spsummon_once_set[(*cit)->summon_player].insert((*cit)->spsummon_code); - } - if(tp) - set_spsummon_counter(infos.turn_player); - if(ntp) - set_spsummon_counter(1 - infos.turn_player); - for(auto cit = spsummon_once_set[0].begin(); cit != spsummon_once_set[0].end(); ++cit) - core.spsummon_once_map[0][*cit]++; - for(auto cit = spsummon_once_set[1].begin(); cit != spsummon_once_set[1].end(); ++cit) - core.spsummon_once_map[1][*cit]++; - for(auto cit = targets->container.begin(); cit != targets->container.end(); ++cit) { - (*cit)->set_status(STATUS_SPSUMMON_STEP, FALSE); - (*cit)->set_status(STATUS_SPSUMMON_TURN, TRUE); - if((*cit)->is_position(POS_FACEUP)) - (*cit)->enable_field_effect(TRUE); - } - adjust_instant(); - return FALSE; - } - case 2: { - pduel->write_buffer8(MSG_SPSUMMONED); - for(auto cit = targets->container.begin(); cit != targets->container.end(); ++cit) { - if(!((*cit)->current.position & POS_FACEDOWN)) - raise_single_event(*cit, 0, EVENT_SPSUMMON_SUCCESS, (*cit)->current.reason_effect, 0, (*cit)->current.reason_player, (*cit)->summon_player, 0); - int32 summontype = (*cit)->summon_info & 0xff000000; - if(summontype && (*cit)->material_cards.size()) { - int32 matreason = (summontype == SUMMON_TYPE_FUSION) ? REASON_FUSION : (summontype == SUMMON_TYPE_RITUAL) ? REASON_RITUAL : (summontype == SUMMON_TYPE_XYZ) ? REASON_XYZ : 0; - for(auto mit = (*cit)->material_cards.begin(); mit != (*cit)->material_cards.end(); ++mit) - raise_single_event(*mit, &targets->container, EVENT_BE_MATERIAL, core.reason_effect, matreason, core.reason_player, (*cit)->summon_player, 0); - raise_event(&((*cit)->material_cards), EVENT_BE_MATERIAL, core.reason_effect, matreason, core.reason_player, (*cit)->summon_player, 0); - } - } - process_single_event(); - process_instant_event(); - return FALSE; - } - case 3: { - raise_event(&targets->container, EVENT_SPSUMMON_SUCCESS, reason_effect, 0, reason_player, PLAYER_NONE, 0); - process_instant_event(); - return FALSE; - } - case 4: { - core.operated_set.clear(); - core.operated_set = targets->container; - returns.ivalue[0] = targets->container.size(); - pduel->delete_group(targets); - return TRUE; - } - } - return TRUE; -} -int32 field::destroy(uint16 step, group * targets, card * target, uint8 battle) { - if(target->current.location & (LOCATION_GRAVE | LOCATION_REMOVED)) { - target->current.reason = target->temp.reason; - target->current.reason_effect = target->temp.reason_effect; - target->current.reason_player = target->temp.reason_player; - target->set_status(STATUS_DESTROY_CONFIRMED, FALSE); - targets->container.erase(target); - return TRUE; - } - if(targets->container.find(target) == targets->container.end()) - return TRUE; - returns.ivalue[0] = FALSE; - effect_set eset; - target->filter_single_continuous_effect(EFFECT_DESTROY_REPLACE, &eset); - if(!battle) - for (int32 i = 0; i < eset.size(); ++i) - add_process(PROCESSOR_OPERATION_REPLACE, 0, eset[i], targets, (ptr)target, 1); - else - for (int32 i = 0; i < eset.size(); ++i) - add_process(PROCESSOR_OPERATION_REPLACE, 10, eset[i], targets, (ptr)target, 1); - return TRUE; -} -// PROCESSOR_DESTROY goes here -int32 field::destroy(uint16 step, group * targets, effect * reason_effect, uint32 reason, uint8 reason_player) { - switch (step) { - case 0: { - card_set extra; - effect_set eset; - card_set indestructable_set; - std::set indestructable_effect_set; - for (auto cit = targets->container.begin(); cit != targets->container.end();) { - auto rm = cit++; - card* pcard = *rm; - if (!(pcard->current.reason & REASON_RULE)) { - int32 is_destructable = true; - if (pcard->is_destructable() && pcard->is_affect_by_effect(pcard->current.reason_effect)) { - effect* indestructable_effect = pcard->check_indestructable_by_effect(pcard->current.reason_effect, reason_player); - if (indestructable_effect) { - if(reason_player != 5) - indestructable_effect_set.insert(indestructable_effect); - is_destructable = false; - } - } else - is_destructable = false; - if (!is_destructable) { - indestructable_set.insert(pcard); - continue; - } - } - eset.clear(); - pcard->filter_effect(EFFECT_INDESTRUCTABLE_COUNT, &eset); - if (eset.size()) { - bool is_destructable = true; - for (int32 i = 0; i < eset.size(); ++i) { - if(!(eset[i]->flag & EFFECT_FLAG_COUNT_LIMIT) || (eset[i]->reset_count & 0xf00) == 0) - continue; - pduel->lua->add_param(pcard->current.reason_effect, PARAM_TYPE_EFFECT); - pduel->lua->add_param(pcard->current.reason, PARAM_TYPE_INT); - pduel->lua->add_param(pcard->current.reason_player, PARAM_TYPE_INT); - if(eset[i]->check_value_condition(3)) { - eset[i]->dec_count(); - if(reason_player != 5) - indestructable_effect_set.insert(eset[i]); - is_destructable = false; - break; - } - } - if(!is_destructable) { - indestructable_set.insert(pcard); - continue; - } - } - eset.clear(); - pcard->filter_effect(EFFECT_DESTROY_SUBSTITUTE, &eset); - if (eset.size()) { - bool sub = false; - for (int32 i = 0; i < eset.size(); ++i) { - pduel->lua->add_param(pcard->current.reason_effect, PARAM_TYPE_EFFECT); - pduel->lua->add_param(pcard->current.reason, PARAM_TYPE_INT); - pduel->lua->add_param(pcard->current.reason_player, PARAM_TYPE_INT); - if(eset[i]->check_value_condition(3)) { - extra.insert(eset[i]->handler); - sub = true; - break; - } - } - if(sub) { - pcard->current.reason = pcard->temp.reason; - pcard->current.reason_effect = pcard->temp.reason_effect; - pcard->current.reason_player = pcard->temp.reason_player; - core.destroy_canceled.insert(pcard); - targets->container.erase(pcard); - } - } - } - for (auto cit = extra.begin(); cit != extra.end(); ++cit) { - card* rep = *cit; - if(targets->container.count(rep) == 0) { - rep->temp.reason = rep->current.reason; - rep->temp.reason_effect = rep->current.reason_effect; - rep->temp.reason_player = rep->current.reason_player; - rep->current.reason = REASON_EFFECT | REASON_DESTROY | REASON_REPLACE; - rep->current.reason_effect = 0; - rep->current.reason_player = rep->current.controler; - rep->operation_param = (POS_FACEUP << 24) + (((int32)rep->owner) << 16) + (LOCATION_GRAVE << 8); - targets->container.insert(rep); - } - } - for (auto cit = indestructable_set.begin(); cit != indestructable_set.end(); ++cit) { - (*cit)->current.reason = (*cit)->temp.reason; - (*cit)->current.reason_effect = (*cit)->temp.reason_effect; - (*cit)->current.reason_player = (*cit)->temp.reason_player; - (*cit)->set_status(STATUS_DESTROY_CONFIRMED, FALSE); - targets->container.erase(*cit); - } - for (auto eit = indestructable_effect_set.begin(); eit != indestructable_effect_set.end(); ++eit) { - pduel->write_buffer8(MSG_HINT); - pduel->write_buffer8(HINT_CARD); - pduel->write_buffer8(0); - pduel->write_buffer32((*eit)->owner->data.code); - } - auto pr = effects.continuous_effect.equal_range(EFFECT_DESTROY_REPLACE); - for (; pr.first != pr.second; ++pr.first) - add_process(PROCESSOR_OPERATION_REPLACE, 5, pr.first->second, targets, 0, 1); - return FALSE; - } - case 1: { - for (auto cit = targets->container.begin(); cit != targets->container.end(); ++cit) { - add_process(PROCESSOR_DESTROY_STEP, 0, 0, targets, (ptr) (*cit), 0); - } - return FALSE; - } - case 2: { - for (auto cit = core.destroy_canceled.begin(); cit != core.destroy_canceled.end(); ++cit) - (*cit)->set_status(STATUS_DESTROY_CONFIRMED, FALSE); - core.destroy_canceled.clear(); - return FALSE; - } - case 3: { - if(!targets->container.size()) { - returns.ivalue[0] = 0; - core.operated_set.clear(); - pduel->delete_group(targets); - return TRUE; - } - card_vector cv(targets->container.begin(), targets->container.end()); - if(cv.size() > 1) - std::sort(cv.begin(), cv.end(), card::card_operation_sort); - for (auto cvit = cv.begin(); cvit != cv.end(); ++cvit) { - card* pcard = *cvit; - if(pcard->current.location & (LOCATION_GRAVE | LOCATION_REMOVED)) { - pcard->current.reason = pcard->temp.reason; - pcard->current.reason_effect = pcard->temp.reason_effect; - pcard->current.reason_player = pcard->temp.reason_player; - targets->container.erase(pcard); - continue; - } - pcard->current.reason |= REASON_DESTROY; - core.hint_timing[pcard->current.controler] |= TIMING_DESTROY; - raise_single_event(pcard, 0, EVENT_DESTROY, pcard->current.reason_effect, pcard->current.reason, pcard->current.reason_player, 0, 0); - } - adjust_instant(); - process_single_event(); - raise_event(&targets->container, EVENT_DESTROY, reason_effect, reason, reason_player, 0, 0); - process_instant_event(); - return FALSE; - } - case 4: { - group* sendtargets = pduel->new_group(targets->container); - sendtargets->is_readonly = TRUE; - uint32 dest; - for(auto cit = sendtargets->container.begin(); cit != sendtargets->container.end(); ++cit) { - (*cit)->set_status(STATUS_DESTROY_CONFIRMED, FALSE); - dest = ((*cit)->operation_param >> 8) & 0xff; - if(!dest) - dest = LOCATION_GRAVE; - if((dest == LOCATION_HAND && !(*cit)->is_capable_send_to_hand(reason_player)) - || (dest == LOCATION_DECK && !(*cit)->is_capable_send_to_deck(reason_player)) - || (dest == LOCATION_REMOVED && !(*cit)->is_removeable(reason_player))) - dest = LOCATION_GRAVE; - (*cit)->operation_param = ((*cit)->operation_param & 0xffff00ff) + (dest << 8); - } - auto pr = effects.continuous_effect.equal_range(EFFECT_SEND_REPLACE); - for (; pr.first != pr.second; ++pr.first) - add_process(PROCESSOR_OPERATION_REPLACE, 5, pr.first->second, sendtargets, 0, 0); - add_process(PROCESSOR_SENDTO, 1, reason_effect, sendtargets, reason | REASON_DESTROY, reason_player); - return FALSE; - } - case 5: { - core.operated_set.clear(); - core.operated_set = targets->container; - for(auto cit = core.operated_set.begin(); cit != core.operated_set.end();) { - if((*cit)->current.reason & REASON_REPLACE) - core.operated_set.erase(cit++); - else - cit++; - } - returns.ivalue[0] = core.operated_set.size(); - pduel->delete_group(targets); - return TRUE; - } - case 10: { - effect_set eset; - for (auto cit = targets->container.begin(); cit != targets->container.end();) { - auto rm = cit++; - card* pcard = *rm; - if (!(pcard->current.reason & REASON_RULE)) { - if (!pcard->is_destructable()) { - pcard->current.reason = pcard->temp.reason; - pcard->current.reason_effect = pcard->temp.reason_effect; - pcard->current.reason_player = pcard->temp.reason_player; - pcard->set_status(STATUS_DESTROY_CONFIRMED, FALSE); - targets->container.erase(pcard); - continue; - } - } - eset.clear(); - pcard->filter_effect(EFFECT_INDESTRUCTABLE_COUNT, &eset); - if (eset.size()) { - bool indes = false; - for (int32 i = 0; i < eset.size(); ++i) { - if(!(eset[i]->flag & EFFECT_FLAG_COUNT_LIMIT) || (eset[i]->reset_count & 0xf00) == 0) - continue; - pduel->lua->add_param(pcard->current.reason_effect, PARAM_TYPE_EFFECT); - pduel->lua->add_param(pcard->current.reason, PARAM_TYPE_INT); - pduel->lua->add_param(pcard->current.reason_player, PARAM_TYPE_INT); - if(eset[i]->check_value_condition(3)) { - eset[i]->dec_count(); - pduel->write_buffer8(MSG_HINT); - pduel->write_buffer8(HINT_CARD); - pduel->write_buffer8(0); - pduel->write_buffer32(eset[i]->owner->data.code); - indes = true; - break; - } - } - if(indes) { - pcard->current.reason = pcard->temp.reason; - pcard->current.reason_effect = pcard->temp.reason_effect; - pcard->current.reason_player = pcard->temp.reason_player; - pcard->set_status(STATUS_DESTROY_CONFIRMED, FALSE); - targets->container.erase(pcard); - continue; - } - } - eset.clear(); - pcard->filter_effect(EFFECT_DESTROY_SUBSTITUTE, &eset); - if (eset.size()) { - bool sub = false; - for (int32 i = 0; i < eset.size(); ++i) { - pduel->lua->add_param(pcard->current.reason_effect, PARAM_TYPE_EFFECT); - pduel->lua->add_param(pcard->current.reason, PARAM_TYPE_INT); - pduel->lua->add_param(pcard->current.reason_player, PARAM_TYPE_INT); - if(eset[i]->check_value_condition(3)) { - core.battle_destroy_rep.insert(eset[i]->handler); - sub = true; - } - } - if(sub) { - pcard->current.reason = pcard->temp.reason; - pcard->current.reason_effect = pcard->temp.reason_effect; - pcard->current.reason_player = pcard->temp.reason_player; - core.destroy_canceled.insert(pcard); - targets->container.erase(pcard); - } - } - } - auto pr = effects.continuous_effect.equal_range(EFFECT_DESTROY_REPLACE); - for (; pr.first != pr.second; ++pr.first) - add_process(PROCESSOR_OPERATION_REPLACE, 12, pr.first->second, targets, 0, 1); - return FALSE; - } - case 11: { - for (auto cit = targets->container.begin(); cit != targets->container.end(); ++cit) { - add_process(PROCESSOR_DESTROY_STEP, 0, 0, targets, (ptr) (*cit), TRUE); - } - return FALSE; - } - case 12: { - for (auto cit = core.destroy_canceled.begin(); cit != core.destroy_canceled.end(); ++cit) - (*cit)->set_status(STATUS_DESTROY_CONFIRMED, FALSE); - core.destroy_canceled.clear(); - return TRUE; - } - } - return TRUE; -} -int32 field::release(uint16 step, group * targets, card * target) { - if(!(target->current.location & (LOCATION_ONFIELD | LOCATION_HAND))) { - target->current.reason = target->temp.reason; - target->current.reason_effect = target->temp.reason_effect; - target->current.reason_player = target->temp.reason_player; - targets->container.erase(target); - return TRUE; - } - if(targets->container.find(target) == targets->container.end()) - return TRUE; - if(!(target->current.reason & REASON_RULE)) { - returns.ivalue[0] = FALSE; - effect_set eset; - target->filter_single_continuous_effect(EFFECT_RELEASE_REPLACE, &eset); - for (int32 i = 0; i < eset.size(); ++i) - add_process(PROCESSOR_OPERATION_REPLACE, 0, eset[i], targets, (ptr)target, 0); - } - return TRUE; -} -int32 field::release(uint16 step, group * targets, effect * reason_effect, uint32 reason, uint8 reason_player) { - switch (step) { - case 0: { - //card_set extra; - for (auto cit = targets->container.begin(); cit != targets->container.end();) { - auto rm = cit++; - card* pcard = *rm; - if (pcard->is_status(STATUS_SUMMONING) - || ((reason & REASON_SUMMON) && !pcard->is_releasable_by_summon(reason_player, pcard->current.reason_card)) - || (!(pcard->current.reason & (REASON_RULE | REASON_SUMMON | REASON_COST)) - && (!pcard->is_affect_by_effect(pcard->current.reason_effect) || !pcard->is_releasable_by_nonsummon(reason_player)))) { - pcard->current.reason = pcard->temp.reason; - pcard->current.reason_effect = pcard->temp.reason_effect; - pcard->current.reason_player = pcard->temp.reason_player; - targets->container.erase(rm); - continue; - } - } - if(reason & REASON_RULE) - return FALSE; - auto pr = effects.continuous_effect.equal_range(EFFECT_RELEASE_REPLACE); - for (; pr.first != pr.second; ++pr.first) - add_process(PROCESSOR_OPERATION_REPLACE, 5, pr.first->second, targets, 0, 0); - return FALSE; - } - case 1: { - for (auto cit = targets->container.begin(); cit != targets->container.end(); ++cit) { - add_process(PROCESSOR_RELEASE_STEP, 0, 0, targets, (ptr) (*cit), 0); - } - return FALSE; - } - case 2: { - if(!targets->container.size()) { - returns.ivalue[0] = 0; - core.operated_set.clear(); - pduel->delete_group(targets); - return TRUE; - } - card_vector cv(targets->container.begin(), targets->container.end()); - if(cv.size() > 1) - std::sort(cv.begin(), cv.end(), card::card_operation_sort); - for (auto cvit = cv.begin(); cvit != cv.end(); ++cvit) { - card* pcard = *cvit; - if(!(pcard->current.location & (LOCATION_ONFIELD | LOCATION_HAND))) { - pcard->current.reason = pcard->temp.reason; - pcard->current.reason_effect = pcard->temp.reason_effect; - pcard->current.reason_player = pcard->temp.reason_player; - targets->container.erase(pcard); - continue; - } - pcard->current.reason |= REASON_RELEASE; - } - adjust_instant(); - return FALSE; - } - case 3: { - group* sendtargets = pduel->new_group(targets->container); - sendtargets->is_readonly = TRUE; - auto pr = effects.continuous_effect.equal_range(EFFECT_SEND_REPLACE); - for (; pr.first != pr.second; ++pr.first) - add_process(PROCESSOR_OPERATION_REPLACE, 5, pr.first->second, sendtargets, 0, 0); - add_process(PROCESSOR_SENDTO, 1, reason_effect, sendtargets, reason | REASON_RELEASE, reason_player); - return FALSE; - } - case 4: { - core.operated_set.clear(); - core.operated_set = targets->container; - returns.ivalue[0] = targets->container.size(); - pduel->delete_group(targets); - return TRUE; - } - } - return TRUE; -} -// PROCESSOR_SENDTO_STEP goes here -int32 field::send_to(uint16 step, group * targets, card * target) { - uint8 playerid = (target->operation_param >> 16) & 0xff; - uint8 dest = (target->operation_param >> 8) & 0xff; - //uint8 seq = (target->operation_param) & 0xff; - if(targets->container.find(target) == targets->container.end()) - return TRUE; - if(target->current.location == dest && target->current.controler == playerid) { - target->current.reason = target->temp.reason; - target->current.reason_effect = target->temp.reason_effect; - target->current.reason_player = target->temp.reason_player; - targets->container.erase(target); - return TRUE; - } - if(!(target->current.reason & REASON_RULE)) { - returns.ivalue[0] = FALSE; - effect_set eset; - target->filter_single_continuous_effect(EFFECT_SEND_REPLACE, &eset); - for (int32 i = 0; i < eset.size(); ++i) - add_process(PROCESSOR_OPERATION_REPLACE, 0, eset[i], targets, (ptr)target, 0); - } - return TRUE; -} -// PROCESSOR_SENDTO goes here -int32 field::send_to(uint16 step, group * targets, effect * reason_effect, uint32 reason, uint8 reason_player) { - struct exargs { - group* targets; - card_set leave, discard, detach; - bool show_decktop[2]; - card_vector cv; - card_vector::iterator cvit; - effect* predirect; - } ; - switch(step) { - case 0: { - uint8 dest; - for(auto cit = targets->container.begin(); cit != targets->container.end();) { - auto rm = cit++; - card* pcard = *rm; - dest = (pcard->operation_param >> 8) & 0xff; - if(!(reason & REASON_RULE) && - (pcard->is_status(STATUS_SUMMONING) - || (!(pcard->current.reason & REASON_COST) && !pcard->is_affect_by_effect(pcard->current.reason_effect)) - || (dest == LOCATION_HAND && !pcard->is_capable_send_to_hand(core.reason_player)) - || (dest == LOCATION_DECK && !pcard->is_capable_send_to_deck(core.reason_player)) - || (dest == LOCATION_REMOVED && !pcard->is_removeable(core.reason_player)) - || (dest == LOCATION_GRAVE && !pcard->is_capable_send_to_grave(core.reason_player)))) { - pcard->current.reason = pcard->temp.reason; - pcard->current.reason_player = pcard->temp.reason_player; - pcard->current.reason_effect = pcard->temp.reason_effect; - targets->container.erase(rm); - continue; - } - } - if(reason & REASON_RULE) - return FALSE; - auto pr = effects.continuous_effect.equal_range(EFFECT_SEND_REPLACE); - for (; pr.first != pr.second; ++pr.first) - add_process(PROCESSOR_OPERATION_REPLACE, 5, pr.first->second, targets, 0, 0); - return FALSE; - } - case 1: { - for(auto cit = targets->container.begin(); cit != targets->container.end(); ++cit) { - add_process(PROCESSOR_SENDTO_STEP, 0, 0, targets, (ptr)(*cit), 0); - } - return FALSE; - } - case 2: { - if(!targets->container.size()) { - returns.ivalue[0] = 0; - core.operated_set.clear(); - pduel->delete_group(targets); - return TRUE; - } - card_set leave_p, destroying; - for(auto cit = targets->container.begin(); cit != targets->container.end(); ++cit) { - card* pcard = *cit; - if((pcard->current.location == LOCATION_MZONE) && pcard->is_status(STATUS_BATTLE_DESTROYED) - && !(pcard->current.reason & REASON_RULE) - && (pcard->current.reason & (REASON_DESTROY | REASON_EFFECT)) != (REASON_DESTROY | REASON_EFFECT)) { - pcard->current.reason |= REASON_DESTROY | REASON_BATTLE; - raise_single_event(pcard, 0, EVENT_DESTROY, pcard->current.reason_effect, pcard->current.reason, pcard->current.reason_player, 0, 0); - destroying.insert(pcard); - } - if((pcard->current.location & LOCATION_ONFIELD) && !pcard->is_status(STATUS_SUMMON_DISABLED)) { - raise_single_event(pcard, 0, EVENT_LEAVE_FIELD_P, pcard->current.reason_effect, pcard->current.reason, pcard->current.reason_player, 0, 0); - leave_p.insert(pcard); - } - if((pcard->current.location & LOCATION_ONFIELD)) { - if(pcard->current.position & POS_FACEUP) { - pcard->previous.code = pcard->get_code(); - pcard->previous.code2 = pcard->get_another_code(); - pcard->previous.type = pcard->get_type(); - if(pcard->current.location & LOCATION_MZONE) { - pcard->previous.level = pcard->get_level(); - pcard->previous.rank = pcard->get_rank(); - pcard->previous.attribute = pcard->get_attribute(); - pcard->previous.race = pcard->get_race(); - pcard->previous.attack = pcard->get_attack(); - pcard->previous.defence = pcard->get_defence(); - } - } else { - effect_set eset; - pcard->filter_effect(EFFECT_ADD_CODE, &eset); - if(pcard->data.alias && !eset.size()) - pcard->previous.code = pcard->data.alias; - else - pcard->previous.code = pcard->data.code; - if(eset.size()) - pcard->previous.code2 = eset.get_last()->get_value(pcard); - else - pcard->previous.code2 = 0; - pcard->previous.type = pcard->data.type; - pcard->previous.level = pcard->data.level; - pcard->previous.rank = pcard->data.level; - pcard->previous.attribute = pcard->data.attribute; - pcard->previous.race = pcard->data.race; - pcard->previous.attack = pcard->data.attack; - pcard->previous.defence = pcard->data.defence; - } - } - } - if(leave_p.size()) - raise_event(&leave_p, EVENT_LEAVE_FIELD_P, reason_effect, reason, reason_player, 0, 0); - if(destroying.size()) - raise_event(&destroying, EVENT_DESTROY, reason_effect, reason, reason_player, 0, 0); - process_single_event(); - process_instant_event(); - return FALSE; - } - case 3: { - uint32 dest, redirect, redirect_seq, check_cb; - for(auto cit = targets->container.begin(); cit != targets->container.end(); ++cit) - (*cit)->enable_field_effect(FALSE); - adjust_instant(); - for(auto cit = targets->container.begin(); cit != targets->container.end(); ++cit) { - card* pcard = *cit; - dest = (pcard->operation_param >> 8) & 0xff; - redirect = 0; - redirect_seq = 0; - check_cb = 0; - if((dest & LOCATION_GRAVE) && pcard->is_affected_by_effect(EFFECT_TO_GRAVE_REDIRECT_CB)) - check_cb = 1; - if((pcard->current.location & LOCATION_ONFIELD) && !pcard->is_status(STATUS_SUMMON_DISABLED)) { - redirect = pcard->leave_field_redirect(pcard->current.reason); - redirect_seq = redirect >> 16; - redirect &= 0xffff; - } - if(redirect) { - pcard->current.reason &= ~REASON_TEMPORARY; - pcard->current.reason |= REASON_REDIRECT; - pcard->operation_param = (pcard->operation_param & 0xffff0000) | (redirect << 8) | redirect_seq; - dest = redirect; - } - redirect = pcard->destination_redirect(dest, pcard->current.reason); - if(redirect) { - redirect_seq = redirect >> 16; - redirect &= 0xffff; - } - if(redirect && (pcard->current.location != redirect)) { - pcard->current.reason |= REASON_REDIRECT; - pcard->operation_param = (pcard->operation_param & 0xffff0000) | (redirect << 8) | redirect_seq; - } - if(check_cb) - pcard->operation_param = (pcard->operation_param & 0xff0fffff) | (1 << 20); - } - return FALSE; - } - case 4: { - exargs* param = new exargs; - core.units.begin()->ptarget = (group*)param; - param->targets = targets; - param->show_decktop[0] = false; - param->show_decktop[1] = false; - param->cv.assign(targets->container.begin(), targets->container.end()); - if(param->cv.size() > 1) - std::sort(param->cv.begin(), param->cv.end(), card::card_operation_sort); - if(core.global_flag & GLOBALFLAG_DECK_REVERSE_CHECK) { - int32 d0 = player[0].list_main.size() - 1, s0 = d0; - int32 d1 = player[1].list_main.size() - 1, s1 = d1; - for(uint32 i = 0; i < param->cv.size(); ++i) { - card* pcard = param->cv[i]; - if(pcard->current.location != LOCATION_DECK) - continue; - if((pcard->current.controler == 0) && (pcard->current.sequence == s0)) - s0--; - if((pcard->current.controler == 1) && (pcard->current.sequence == s1)) - s1--; - } - if((s0 != d0) && (s0 > 0)) { - card* ptop = player[0].list_main[s0]; - if(core.deck_reversed || (ptop->current.position == POS_FACEUP_DEFENCE)) { - pduel->write_buffer8(MSG_DECK_TOP); - pduel->write_buffer8(0); - pduel->write_buffer8(d0 - s0); - if(ptop->current.position != POS_FACEUP_DEFENCE) - pduel->write_buffer32(ptop->data.code); - else - pduel->write_buffer32(ptop->data.code | 0x80000000); - } - } - if((s1 != d1) && (s1 > 0)) { - card* ptop = player[1].list_main[s1]; - if(core.deck_reversed || (ptop->current.position == POS_FACEUP_DEFENCE)) { - pduel->write_buffer8(MSG_DECK_TOP); - pduel->write_buffer8(1); - pduel->write_buffer8(d1 - s1); - if(ptop->current.position != POS_FACEUP_DEFENCE) - pduel->write_buffer32(ptop->data.code); - else - pduel->write_buffer32(ptop->data.code | 0x80000000); - } - } - } - param->cvit = param->cv.begin(); - return FALSE; - } - case 5: { - exargs* param = (exargs*)targets; - if(param->cvit == param->cv.end()) { - core.units.begin()->step = 8; - return FALSE; - } - card* pcard = *param->cvit; - param->predirect = 0; - uint32 check_cb = (pcard->operation_param >> 20) & 0xf; - if(check_cb) - param->predirect = pcard->is_affected_by_effect(EFFECT_TO_GRAVE_REDIRECT_CB); - pcard->enable_field_effect(FALSE); - if(pcard->data.type & TYPE_TOKEN) { - pduel->write_buffer8(MSG_MOVE); - pduel->write_buffer32(pcard->data.code); - pduel->write_buffer8(pcard->current.controler); - pduel->write_buffer8(pcard->current.location); - pduel->write_buffer8(pcard->current.sequence); - pduel->write_buffer8(pcard->current.position); - pduel->write_buffer8(0); - pduel->write_buffer8(0); - pduel->write_buffer8(0); - pduel->write_buffer8(0); - pduel->write_buffer32(pcard->current.reason); - pcard->previous.controler = pcard->current.controler; - pcard->previous.location = pcard->current.location; - pcard->previous.sequence = pcard->current.sequence; - pcard->previous.position = pcard->current.position; - pcard->current.reason &= ~REASON_TEMPORARY; - pcard->fieldid = infos.field_id++; - pcard->reset(RESET_LEAVE, RESET_EVENT); - pcard->relate_effect.clear(); - remove_card(pcard); - param->leave.insert(pcard); - ++param->cvit; - core.units.begin()->step = 4; - return FALSE; - } - if(param->predirect && get_useable_count(pcard->current.controler, LOCATION_SZONE, pcard->current.controler, LOCATION_REASON_TOFIELD) > 0) - add_process(PROCESSOR_SELECT_EFFECTYN, 0, 0, (group*)pcard, pcard->current.controler, 0); - else - returns.ivalue[0] = 0; - return FALSE; - } - case 6: { - if(returns.ivalue[0]) - return FALSE; - exargs* param = (exargs*)targets; - card* pcard = *param->cvit; - uint8 oloc = pcard->current.location; - uint8 playerid = (pcard->operation_param >> 16) & 0xf; - uint8 dest = (pcard->operation_param >> 8) & 0xff; - uint8 seq = (pcard->operation_param) & 0xff; - if(dest == LOCATION_GRAVE) { - core.hint_timing[pcard->current.controler] |= TIMING_TOGRAVE; - } else if(dest == LOCATION_HAND) { - pcard->set_status(STATUS_PROC_COMPLETE, FALSE); - core.hint_timing[pcard->current.controler] |= TIMING_TOHAND; - } else if(dest == LOCATION_DECK) { - pcard->set_status(STATUS_PROC_COMPLETE, FALSE); - core.hint_timing[pcard->current.controler] |= TIMING_TODECK; - } else if(dest == LOCATION_REMOVED) { - core.hint_timing[pcard->current.controler] |= TIMING_REMOVE; - } - //move card - if(pcard->current.controler != playerid || pcard->current.location != dest) { - pduel->write_buffer8(MSG_MOVE); - pduel->write_buffer32(pcard->data.code); - pduel->write_buffer32(pcard->get_info_location()); - if(pcard->overlay_target) { - param->detach.insert(pcard->overlay_target); - pcard->overlay_target->xyz_remove(pcard); - } - move_card(playerid, pcard, dest, seq); - pcard->current.position = (pcard->operation_param >> 24); - pduel->write_buffer32(pcard->get_info_location()); - pduel->write_buffer32(pcard->current.reason); - } - if((core.deck_reversed && pcard->current.location == LOCATION_DECK) || (pcard->current.position == POS_FACEUP_DEFENCE)) - param->show_decktop[pcard->current.controler] = true; - pcard->set_status(STATUS_LEAVE_CONFIRMED, FALSE); - if(pcard->status & (STATUS_SUMMON_DISABLED | STATUS_ACTIVATE_DISABLED)) { - pcard->set_status(STATUS_SUMMON_DISABLED | STATUS_ACTIVATE_DISABLED, FALSE); - pcard->previous.location = 0; - } else if(oloc & LOCATION_ONFIELD) { - pcard->reset(RESET_LEAVE, RESET_EVENT); - param->leave.insert(pcard); - } - if(pcard->current.reason & REASON_DISCARD) - param->discard.insert(pcard); - ++param->cvit; - core.units.begin()->step = 4; - return FALSE; - } - case 7: { - exargs* param = (exargs*)targets; - card* pcard = *param->cvit; - uint32 flag; - get_useable_count(pcard->current.controler, LOCATION_SZONE, pcard->current.controler, LOCATION_REASON_TOFIELD, &flag); - flag = ((flag << 8) & 0xff00) | 0xffffe0ff; - add_process(PROCESSOR_SELECT_PLACE, 0, 0, 0, 0x10000 + pcard->current.controler, flag); - return FALSE; - } - case 8: { - exargs* param = (exargs*)targets; - card* pcard = *param->cvit; - uint8 oloc = pcard->current.location; - uint8 seq = returns.bvalue[2]; - pduel->write_buffer8(MSG_MOVE); - pduel->write_buffer32(pcard->data.code); - pduel->write_buffer32(pcard->get_info_location()); - if(pcard->overlay_target) { - param->detach.insert(pcard->overlay_target); - pcard->overlay_target->xyz_remove(pcard); - } - move_card(pcard->current.controler, pcard, LOCATION_SZONE, seq); - pcard->current.position = POS_FACEUP; - pduel->write_buffer32(pcard->get_info_location()); - pduel->write_buffer32(pcard->current.reason); - pcard->set_status(STATUS_LEAVE_CONFIRMED, FALSE); - if(pcard->status & (STATUS_SUMMON_DISABLED | STATUS_ACTIVATE_DISABLED)) { - pcard->set_status(STATUS_SUMMON_DISABLED | STATUS_ACTIVATE_DISABLED, FALSE); - pcard->previous.location = 0; - } else if(oloc & LOCATION_ONFIELD) { - pcard->reset(RESET_LEAVE + RESET_MSCHANGE, RESET_EVENT); - param->leave.insert(pcard); - } - if(pcard->current.reason & REASON_DISCARD) - param->discard.insert(pcard); - if(param->predirect->operation) { - tevent e; - e.event_cards = targets; - e.event_player = pcard->current.controler; - e.event_value = 0; - e.reason = pcard->current.reason; - e.reason_effect = reason_effect; - e.reason_player = pcard->current.controler; - core.sub_solving_event.push_back(e); - add_process(PROCESSOR_EXECUTE_OPERATION, 0, param->predirect, 0, pcard->current.controler, 0); - } - ++param->cvit; - core.units.begin()->step = 4; - return FALSE; - } - case 9: { - exargs* param = (exargs*)targets; - if(core.global_flag & GLOBALFLAG_DECK_REVERSE_CHECK) { - if(param->show_decktop[0]) { - card* ptop = *player[0].list_main.rbegin(); - pduel->write_buffer8(MSG_DECK_TOP); - pduel->write_buffer8(0); - pduel->write_buffer8(0); - if(ptop->current.position != POS_FACEUP_DEFENCE) - pduel->write_buffer32(ptop->data.code); - else - pduel->write_buffer32(ptop->data.code | 0x80000000); - } - if(param->show_decktop[1]) { - card* ptop = *player[1].list_main.rbegin(); - pduel->write_buffer8(MSG_DECK_TOP); - pduel->write_buffer8(1); - pduel->write_buffer8(0); - if(ptop->current.position != POS_FACEUP_DEFENCE) - pduel->write_buffer32(ptop->data.code); - else - pduel->write_buffer32(ptop->data.code | 0x80000000); - } - } - for(auto iter = param->leave.begin(); iter != param->leave.end(); ++iter) - raise_single_event(*iter, 0, EVENT_LEAVE_FIELD, (*iter)->current.reason_effect, (*iter)->current.reason, (*iter)->current.reason_player, 0, 0); - for(auto iter = param->discard.begin(); iter != param->discard.end(); ++iter) - raise_single_event(*iter, 0, EVENT_DISCARD, (*iter)->current.reason_effect, (*iter)->current.reason, (*iter)->current.reason_player, 0, 0); - if((core.global_flag & GLOBALFLAG_DETACH_EVENT) && param->detach.size()) { - for(auto iter = param->detach.begin(); iter != param->detach.end(); ++iter) { - if((*iter)->current.location & LOCATION_MZONE) - raise_single_event(*iter, 0, EVENT_DETACH_MATERIAL, reason_effect, reason, reason_player, 0, 0); - } - } - adjust_instant(); - process_single_event(); - if(param->leave.size()) - raise_event(¶m->leave, EVENT_LEAVE_FIELD, reason_effect, reason, reason_player, 0, 0); - if(param->discard.size()) - raise_event(¶m->discard, EVENT_DISCARD, reason_effect, reason, reason_player, 0, 0); - if((core.global_flag & GLOBALFLAG_DETACH_EVENT) && param->detach.size()) - raise_event(¶m->detach, EVENT_DETACH_MATERIAL, reason_effect, reason, reason_player, 0, 0); - process_instant_event(); - return FALSE; - } - case 10: { - exargs* param = (exargs*)targets; - core.units.begin()->ptarget = param->targets; - targets = param->targets; - delete param; - uint8 nloc; - card_set tohand, todeck, tograve, remove, released, destroyed, retgrave; - card_set equipings, overlays; - for(auto cit = targets->container.begin(); cit != targets->container.end(); ++cit) { - card* pcard = *cit; - nloc = pcard->current.location; - if(pcard->equiping_target) - pcard->unequip(); - if(pcard->equiping_cards.size()) { - for(auto csit = pcard->equiping_cards.begin(); csit != pcard->equiping_cards.end();) { - card* equipc = *(csit++); - equipc->unequip(); - if(equipc->current.location == LOCATION_SZONE) - equipings.insert(equipc); - } - } - if(!(pcard->data.type & TYPE_TOKEN)) { - pcard->enable_field_effect(TRUE); - if(nloc == LOCATION_HAND) { - tohand.insert(pcard); - pcard->reset(RESET_TOHAND, RESET_EVENT); - raise_single_event(pcard, 0, EVENT_TO_HAND, pcard->current.reason_effect, pcard->current.reason, pcard->current.reason_player, 0, 0); - } else if(nloc == LOCATION_DECK || nloc == LOCATION_EXTRA) { - todeck.insert(pcard); - pcard->reset(RESET_TODECK, RESET_EVENT); - raise_single_event(pcard, 0, EVENT_TO_DECK, pcard->current.reason_effect, pcard->current.reason, pcard->current.reason_player, 0, 0); - } else if(nloc == LOCATION_GRAVE) { - pcard->reset(RESET_TOGRAVE, RESET_EVENT); - if(pcard->current.reason & REASON_RETURN) { - retgrave.insert(pcard); - raise_single_event(pcard, 0, EVENT_RETURN_TO_GRAVE, pcard->current.reason_effect, pcard->current.reason, pcard->current.reason_player, 0, 0); - } - else { - tograve.insert(pcard); - raise_single_event(pcard, 0, EVENT_TO_GRAVE, pcard->current.reason_effect, pcard->current.reason, pcard->current.reason_player, 0, 0); - } - } - } - if(nloc == LOCATION_REMOVED || ((pcard->data.type & TYPE_TOKEN) && ((pcard->operation_param >> 8) & 0xff) == LOCATION_REMOVED)) { - remove.insert(pcard); - if(pcard->current.reason & REASON_TEMPORARY) - pcard->reset(RESET_TEMP_REMOVE, RESET_EVENT); - else - pcard->reset(RESET_REMOVE, RESET_EVENT); - raise_single_event(pcard, 0, EVENT_REMOVE, pcard->current.reason_effect, pcard->current.reason, pcard->current.reason_player, 0, 0); - } - if(pcard->current.reason & REASON_RELEASE) { - released.insert(pcard); - raise_single_event(pcard, 0, EVENT_RELEASE, pcard->current.reason_effect, pcard->current.reason, pcard->current.reason_player, 0, 0); - } - if(pcard->current.reason & REASON_DESTROY && !pcard->is_status(STATUS_BATTLE_DESTROYED)) { - destroyed.insert(pcard); - raise_single_event(pcard, 0, EVENT_DESTROYED, pcard->current.reason_effect, pcard->current.reason, pcard->current.reason_player, 0, 0); - } - if(pcard->xyz_materials.size()) { - for(auto clit = pcard->xyz_materials.begin(); clit != pcard->xyz_materials.end(); ++clit) - overlays.insert(*clit); - } - } - if(tohand.size()) - raise_event(&tohand, EVENT_TO_HAND, reason_effect, reason, reason_player, 0, 0); - if(todeck.size()) - raise_event(&todeck, EVENT_TO_DECK, reason_effect, reason, reason_player, 0, 0); - if(tograve.size()) - raise_event(&tograve, EVENT_TO_GRAVE, reason_effect, reason, reason_player, 0, 0); - if(remove.size()) - raise_event(&remove, EVENT_REMOVE, reason_effect, reason, reason_player, 0, 0); - if(released.size()) - raise_event(&released, EVENT_RELEASE, reason_effect, reason, reason_player, 0, 0); - if(destroyed.size()) - raise_event(&destroyed, EVENT_DESTROYED, reason_effect, reason, reason_player, 0, 0); - if(retgrave.size()) - raise_event(&retgrave, EVENT_RETURN_TO_GRAVE, reason_effect, reason, reason_player, 0, 0); - process_single_event(); - process_instant_event(); - if(equipings.size()) - destroy(&equipings, 0, REASON_RULE + REASON_LOST_TARGET, PLAYER_NONE); - if(overlays.size()) - send_to(&overlays, 0, REASON_RULE + REASON_LOST_TARGET, PLAYER_NONE, PLAYER_NONE, LOCATION_GRAVE, 0, POS_FACEUP); - adjust_instant(); - return FALSE; - } - case 11: { - core.operated_set.clear(); - core.operated_set = targets->container; - returns.ivalue[0] = targets->container.size(); - pduel->delete_group(targets); - return TRUE; - } - } - return TRUE; -} -int32 field::discard_deck(uint16 step, uint8 playerid, uint8 count, uint32 reason) { - switch(step) { - case 0: { - if(is_player_affected_by_effect(playerid, EFFECT_CANNOT_DISCARD_DECK)) { - core.operated_set.clear(); - returns.ivalue[0] = 0; - return TRUE; - } - uint32 redirect, dest; - int32 i = 0; - for(auto cit = player[playerid].list_main.rbegin(); i < count && cit != player[playerid].list_main.rend(); ++cit, ++i) { - dest = LOCATION_GRAVE; - (*cit)->operation_param = LOCATION_GRAVE; - (*cit)->current.reason_effect = core.reason_effect; - (*cit)->current.reason_player = core.reason_player; - (*cit)->current.reason = reason; - redirect = (*cit)->destination_redirect(dest, reason) & 0xffff; - if(redirect) { - (*cit)->operation_param = redirect; - dest = redirect; - } - } - if(core.global_flag & GLOBALFLAG_DECK_REVERSE_CHECK) { - if(player[playerid].list_main.size() > count) { - card* ptop = *(player[playerid].list_main.rbegin() + count); - if(core.deck_reversed || (ptop->current.position == POS_FACEUP_DEFENCE)) { - pduel->write_buffer8(MSG_DECK_TOP); - pduel->write_buffer8(playerid); - pduel->write_buffer8(count); - if(ptop->current.position != POS_FACEUP_DEFENCE) - pduel->write_buffer32(ptop->data.code); - else - pduel->write_buffer32(ptop->data.code | 0x80000000); - } - } - } - return FALSE; - } - case 1: { - uint8 dest; - card* pcard; - card_set tohand, todeck, tograve, remove; - core.discarded_set.clear(); - for (int32 i = 0; i < count; ++i) { - if(player[playerid].list_main.size() == 0) - break; - pcard = player[playerid].list_main.back(); - dest = pcard->operation_param; - if(dest == LOCATION_GRAVE) - pcard->reset(RESET_TOGRAVE, RESET_EVENT); - else if(dest == LOCATION_HAND) { - pcard->reset(RESET_TOHAND, RESET_EVENT); - pcard->set_status(STATUS_PROC_COMPLETE, FALSE); - } else if(dest == LOCATION_DECK) { - pcard->reset(RESET_TODECK, RESET_EVENT); - pcard->set_status(STATUS_PROC_COMPLETE, FALSE); - } else if(dest == LOCATION_REMOVED) { - if(pcard->current.reason & REASON_TEMPORARY) - pcard->reset(RESET_TEMP_REMOVE, RESET_EVENT); - else - pcard->reset(RESET_REMOVE, RESET_EVENT); - } - pduel->write_buffer8(MSG_MOVE); - pduel->write_buffer32(pcard->data.code); - pduel->write_buffer8(pcard->current.controler); - pduel->write_buffer8(pcard->current.location); - pduel->write_buffer8(pcard->current.sequence); - pduel->write_buffer8(pcard->current.position); - pcard->enable_field_effect(FALSE); - pcard->cancel_field_effect(); - player[playerid].list_main.pop_back(); - pcard->previous.controler = pcard->current.controler; - pcard->previous.location = pcard->current.location; - pcard->previous.sequence = pcard->current.sequence; - pcard->previous.position = pcard->current.position; - pcard->current.controler = PLAYER_NONE; - pcard->current.location = 0; - add_card(pcard->owner, pcard, dest, 0); - pcard->enable_field_effect(TRUE); - pcard->current.position = POS_FACEUP; - pduel->write_buffer8(pcard->current.controler); - pduel->write_buffer8(pcard->current.location); - pduel->write_buffer8(pcard->current.sequence); - pduel->write_buffer8(pcard->current.position); - pduel->write_buffer32(pcard->current.reason); - if(dest == LOCATION_HAND) { - tohand.insert(pcard); - raise_single_event(pcard, 0, EVENT_TO_HAND, pcard->current.reason_effect, pcard->current.reason, pcard->current.reason_player, 0, 0); - } else if(dest == LOCATION_DECK || dest == LOCATION_EXTRA) { - todeck.insert(pcard); - raise_single_event(pcard, 0, EVENT_TO_DECK, pcard->current.reason_effect, pcard->current.reason, pcard->current.reason_player, 0, 0); - } else if(dest == LOCATION_GRAVE) { - tograve.insert(pcard); - raise_single_event(pcard, 0, EVENT_TO_GRAVE, pcard->current.reason_effect, pcard->current.reason, pcard->current.reason_player, 0, 0); - } else if(dest == LOCATION_REMOVED) { - remove.insert(pcard); - raise_single_event(pcard, 0, EVENT_REMOVE, pcard->current.reason_effect, pcard->current.reason, pcard->current.reason_player, 0, 0); - } - core.discarded_set.insert(pcard); - } - if(tohand.size()) - raise_event(&tohand, EVENT_TO_HAND, core.reason_effect, reason, core.reason_player, 0, 0); - if(todeck.size()) - raise_event(&todeck, EVENT_TO_DECK, core.reason_effect, reason, core.reason_player, 0, 0); - if(tograve.size()) - raise_event(&tograve, EVENT_TO_GRAVE, core.reason_effect, reason, core.reason_player, 0, 0); - if(remove.size()) - raise_event(&remove, EVENT_REMOVE, core.reason_effect, reason, core.reason_player, 0, 0); - process_single_event(); - process_instant_event(); - adjust_instant(); - return FALSE; - } - case 2: { - core.operated_set.clear(); - core.operated_set = core.discarded_set; - returns.ivalue[0] = core.discarded_set.size(); - core.discarded_set.clear(); - return TRUE; - } - } - return TRUE; -} -int32 field::move_to_field(uint16 step, card * target, uint32 enable, uint32 ret, uint32 is_equip) { - uint32 move_player = (target->operation_param >> 24) & 0xff; - uint32 playerid = (target->operation_param >> 16) & 0xff; - uint32 location = (target->operation_param >> 8) & 0xff; - uint32 positions = (target->operation_param) & 0xff; - switch(step) { - case 0: { - returns.ivalue[0] = FALSE; - if((ret == 1) && (!(target->current.reason & REASON_TEMPORARY) || (target->current.reason_effect->owner != core.reason_effect->owner))) - return TRUE; - if(!is_equip && location == LOCATION_SZONE && (target->data.type & TYPE_FIELD) && (target->data.type & TYPE_SPELL)) { - card* pcard = get_field_card(playerid, LOCATION_SZONE, 5); - if(pcard) { - if(core.duel_options & DUEL_OBSOLETE_RULING) - destroy(pcard, 0, REASON_RULE, pcard->current.controler); - else // new ruling - send_to(pcard, 0, REASON_RULE, pcard->current.controler, PLAYER_NONE, LOCATION_GRAVE, 0, 0); - adjust_all(); - } - } else if(!is_equip && location == LOCATION_SZONE && (target->data.type & TYPE_PENDULUM)) { - uint32 flag = 0; - if(!get_field_card(playerid, LOCATION_SZONE, 6)) - flag |= 1 << 14; - if(!get_field_card(playerid, LOCATION_SZONE, 7)) - flag |= 1 << 15; - pduel->write_buffer8(MSG_SELECT_PLACE); - pduel->write_buffer8(playerid); - pduel->write_buffer8(1); - pduel->write_buffer32(~flag); - } else { - uint32 flag; - uint32 lreason = (target->current.location == LOCATION_MZONE) ? LOCATION_REASON_CONTROL : LOCATION_REASON_TOFIELD; - uint32 ct = get_useable_count(playerid, location, move_player, lreason, &flag); - if((ret == 1) && (ct <= 0 || !(target->data.type & TYPE_MONSTER))) { - core.units.begin()->step = 3; - send_to(target, core.reason_effect, REASON_EFFECT, core.reason_player, PLAYER_NONE, LOCATION_GRAVE, 0, 0); - return FALSE; - } - if(!ct) - return TRUE; - if(ret && is_location_useable(playerid, location, target->previous.sequence)) { - returns.bvalue[2] = target->previous.sequence; - return FALSE; - } - if(move_player == playerid) { - if(location == LOCATION_SZONE) - flag = ((flag << 8) & 0xff00) | 0xffff00ff; - else - flag = (flag & 0xff) | 0xffffff00; - } else { - if(location == LOCATION_SZONE) - flag = ((flag << 24) & 0xff000000) | 0xffffff; - else - flag = ((flag << 16) & 0xff0000) | 0xff00ffff; - } - flag |= 0xe0e0e0e0; - add_process(PROCESSOR_SELECT_PLACE, 0, 0, 0, 0x10000 + move_player, flag); - } - return FALSE; - } - case 1: { - uint32 seq = returns.bvalue[2]; - if(!is_equip && location == LOCATION_SZONE && (target->data.type & TYPE_FIELD) && (target->data.type & TYPE_SPELL)) - seq = 5; - if(ret != 1) { - if(location != target->current.location) { - uint32 resetflag = 0; - if(location & LOCATION_ONFIELD) - resetflag |= RESET_TOFIELD; - if(target->current.location & LOCATION_ONFIELD) - resetflag |= RESET_LEAVE; - if((location & LOCATION_ONFIELD) && (target->current.location & LOCATION_ONFIELD)) - resetflag |= RESET_MSCHANGE; - target->reset(resetflag, RESET_EVENT); - } - if(!(target->current.location & LOCATION_ONFIELD)) - target->relate_effect.clear(); - } else { - if(target->turnid != infos.turn_id) { - target->set_status(STATUS_SUMMON_TURN, FALSE); - target->set_status(STATUS_FLIP_SUMMON_TURN, FALSE); - target->set_status(STATUS_SPSUMMON_TURN, FALSE); - target->set_status(STATUS_SET_TURN, FALSE); - target->set_status(STATUS_FORM_CHANGED, FALSE); - } - } - target->temp.sequence = seq; - if(location != LOCATION_MZONE) { - returns.ivalue[0] = positions; - return FALSE; - } - add_process(PROCESSOR_SELECT_POSITION, 0, 0, 0, (positions << 16) + move_player, target->data.code); - return FALSE; - } - case 2: { - if(core.global_flag & GLOBALFLAG_DECK_REVERSE_CHECK) { - if(target->current.location == LOCATION_DECK) { - uint32 curp = target->current.controler; - uint32 curs = target->current.sequence; - if(curs > 0 && (curs == player[curp].list_main.size() - 1)) { - card* ptop = player[curp].list_main[curs - 1]; - if(core.deck_reversed || (ptop->current.position == POS_FACEUP_DEFENCE)) { - pduel->write_buffer8(MSG_DECK_TOP); - pduel->write_buffer8(curp); - pduel->write_buffer8(1); - if(ptop->current.position != POS_FACEUP_DEFENCE) - pduel->write_buffer32(ptop->data.code); - else - pduel->write_buffer32(ptop->data.code | 0x80000000); - } - } - } - } - pduel->write_buffer8(MSG_MOVE); - pduel->write_buffer32(target->data.code); - pduel->write_buffer32(target->get_info_location()); - if(target->overlay_target) - target->overlay_target->xyz_remove(target); - move_card(playerid, target, location, target->temp.sequence); - target->current.position = returns.ivalue[0]; - if((target->previous.location & LOCATION_ONFIELD) && (location & LOCATION_ONFIELD)) - target->set_status(STATUS_LEAVE_CONFIRMED, FALSE); - else - target->set_status(STATUS_LEAVE_CONFIRMED | STATUS_ACTIVATED, FALSE); - pduel->write_buffer32(target->get_info_location()); - pduel->write_buffer32(target->current.reason); - if((target->current.location != LOCATION_MZONE)) { - if(target->equiping_cards.size()) { - destroy(&target->equiping_cards, 0, REASON_LOST_TARGET + REASON_RULE, PLAYER_NONE); - for(auto csit = target->equiping_cards.begin(); csit != target->equiping_cards.end();) { - auto rm = csit++; - (*rm)->unequip(); - } - } - if(target->xyz_materials.size()) { - card_set overlays; - overlays.insert(target->xyz_materials.begin(), target->xyz_materials.end()); - send_to(&overlays, 0, REASON_LOST_TARGET + REASON_RULE, PLAYER_NONE, PLAYER_NONE, LOCATION_GRAVE, 0, POS_FACEUP); - } - } - if((target->previous.location == LOCATION_SZONE) && target->equiping_target) - target->unequip(); - if(enable || ((ret == 1) && target->is_position(POS_FACEUP))) - target->enable_field_effect(TRUE); - adjust_disable_check_list(); - return FALSE; - } - case 3: { - returns.ivalue[0] = TRUE; - return TRUE; - } - case 4: { - returns.ivalue[0] = FALSE; - return TRUE; - } - } - return TRUE; -} -int32 field::change_position(uint16 step, group * targets, effect * reason_effect, uint8 reason_player, uint32 enable) { - switch(step) { - case 0: { - card_set equipings; - card_set flips; - card_set ssets; - card_set pos_changed; - uint8 npos, opos, noflip; - card_vector cv(targets->container.begin(), targets->container.end()); - if(cv.size() > 1) - std::sort(cv.begin(), cv.end(), card::card_operation_sort); - for(auto cvit = cv.begin(); cvit != cv.end(); ++cvit) { - card* pcard = *cvit; - npos = pcard->operation_param & 0xff; - opos = pcard->current.position; - noflip = pcard->operation_param >> 16; - if(pcard->is_status(STATUS_SUMMONING) || pcard->overlay_target || !(pcard->current.location & LOCATION_ONFIELD) - || !pcard->is_affect_by_effect(reason_effect) || npos == opos - || (!(pcard->data.type & TYPE_TOKEN) && (opos & POS_FACEUP) && (npos & POS_FACEDOWN) && !pcard->is_capable_turn_set(reason_player)) - || (reason_effect && pcard->is_affected_by_effect(EFFECT_CANNOT_CHANGE_POS_E))) { - targets->container.erase(pcard); - } else { - if((pcard->data.type & TYPE_TOKEN) && (npos & POS_FACEDOWN)) - npos = POS_FACEUP_DEFENCE; - pcard->previous.position = opos; - pcard->current.position = npos; - if(npos & POS_DEFENCE) - pcard->set_status(STATUS_ATTACK_CANCELED, TRUE); - pcard->set_status(STATUS_JUST_POS, TRUE); - pduel->write_buffer8(MSG_POS_CHANGE); - pduel->write_buffer32(pcard->data.code); - pduel->write_buffer8(pcard->current.controler); - pduel->write_buffer8(pcard->current.location); - pduel->write_buffer8(pcard->current.sequence); - pduel->write_buffer8(pcard->previous.position); - pduel->write_buffer8(pcard->current.position); - core.hint_timing[pcard->current.controler] |= TIMING_POS_CHANGE; - if((opos & POS_FACEDOWN) && (npos & POS_FACEUP)) { - pcard->fieldid = infos.field_id++; - if(pcard->current.location == LOCATION_MZONE) { - raise_single_event(pcard, 0, EVENT_FLIP, reason_effect, 0, reason_player, 0, noflip); - flips.insert(pcard); - } - if(enable) { - if(!reason_effect || !(reason_effect->type & 0x7f0) || pcard->current.location != LOCATION_MZONE) - pcard->enable_field_effect(TRUE); - else - core.delayed_enable_set.insert(pcard); - } else - pcard->refresh_disable_status(); - } - if(pcard->current.location == LOCATION_MZONE) { - raise_single_event(pcard, 0, EVENT_CHANGE_POS, reason_effect, 0, reason_player, 0, 0); - pos_changed.insert(pcard); - } - bool trapmonster = false; - if((opos & POS_FACEUP) && (npos & POS_FACEDOWN)) { - if(pcard->get_type() & TYPE_TRAPMONSTER) - trapmonster = true; - pcard->reset(RESET_TURN_SET, RESET_EVENT); - pcard->set_status(STATUS_SET_TURN, TRUE); - pcard->enable_field_effect(FALSE); - pcard->summon_info &= 0xdf00ffff; - if(pcard->summon_info & SUMMON_TYPE_PENDULUM) - pcard->summon_info &= 0xf000ffff; - pcard->spsummon_counter[0] = pcard->spsummon_counter[1] = 0; - pcard->spsummon_counter_rst[0] = pcard->spsummon_counter_rst[1] = 0; - } - if((npos & POS_FACEDOWN) && pcard->equiping_cards.size()) { - for(auto csit = pcard->equiping_cards.begin(); csit != pcard->equiping_cards.end();) { - auto erm = csit++; - equipings.insert(*erm); - (*erm)->unequip(); - } - } - if((npos & POS_FACEDOWN) && pcard->equiping_target) - pcard->unequip(); - if(trapmonster) { - refresh_location_info_instant(); - move_to_field(pcard, pcard->current.controler, pcard->current.controler, LOCATION_SZONE, POS_FACEDOWN, FALSE, 2); - raise_single_event(pcard, 0, EVENT_SSET, reason_effect, 0, reason_player, 0, 0); - ssets.insert(pcard); - } - } - } - adjust_instant(); - process_single_event(); - if(flips.size()) - raise_event(&flips, EVENT_FLIP, reason_effect, 0, reason_player, 0, 0); - if(ssets.size()) - raise_event(&ssets, EVENT_SSET, reason_effect, 0, reason_player, 0, 0); - if(pos_changed.size()) - raise_event(&pos_changed, EVENT_CHANGE_POS, reason_effect, 0, reason_player, 0, 0); - process_instant_event(); - if(equipings.size()) - destroy(&equipings, 0, REASON_LOST_TARGET + REASON_RULE, PLAYER_NONE); - return FALSE; - } - case 1: { - core.operated_set.clear(); - core.operated_set = targets->container; - returns.ivalue[0] = targets->container.size(); - pduel->delete_group(targets); - return TRUE; - } - } - return TRUE; -} -int32 field::operation_replace(uint16 step, effect * replace_effect, group * targets, ptr arg1, ptr arg2) { - switch (step) { - case 0: { - if(returns.ivalue[0]) - return TRUE; - if(!replace_effect->target) - return TRUE; - card* target = (card*)arg1; - tevent e; - e.event_cards = targets; - e.event_player = replace_effect->get_handler_player(); - e.event_value = 0; - e.reason = target->current.reason; - e.reason_effect = target->current.reason_effect; - e.reason_player = target->current.reason_player; - if(!replace_effect->is_activateable(replace_effect->get_handler_player(), e)) - return TRUE; - chain newchain; - newchain.chain_id = 0; - newchain.chain_count = 0; - newchain.triggering_effect = replace_effect; - newchain.triggering_player = e.event_player; - newchain.evt = e; - newchain.target_cards = 0; - newchain.target_player = PLAYER_NONE; - newchain.target_param = 0; - newchain.disable_player = PLAYER_NONE; - newchain.disable_reason = 0; - newchain.flag = 0; - core.solving_event.push_front(e); - core.sub_solving_event.push_back(e); - core.continuous_chain.push_back(newchain); - add_process(PROCESSOR_EXECUTE_TARGET, 0, replace_effect, 0, replace_effect->get_handler_player(), 0); - return FALSE; - } - case 1: { - card* target = (card*)arg1; - if (returns.ivalue[0]) { - targets->container.erase(target); - target->current.reason = target->temp.reason; - target->current.reason_effect = target->temp.reason_effect; - target->current.reason_player = target->temp.reason_player; - if(arg2) - core.destroy_canceled.insert(target); - replace_effect->dec_count(); - } else - core.units.begin()->step = 2; - return FALSE; - } - case 2: { - if(!replace_effect->operation) - return FALSE; - core.sub_solving_event.push_back(*core.solving_event.begin()); - add_process(PROCESSOR_EXECUTE_OPERATION, 0, replace_effect, 0, replace_effect->get_handler_player(), 0); - return FALSE; - } - case 3: { - if(core.continuous_chain.rbegin()->target_cards) - pduel->delete_group(core.continuous_chain.rbegin()->target_cards); - chain::opmap::iterator oit; - for(oit = core.continuous_chain.rbegin()->opinfos.begin(); oit != core.continuous_chain.rbegin()->opinfos.end(); ++oit) { - if(oit->second.op_cards) - pduel->delete_group(oit->second.op_cards); - } - core.continuous_chain.pop_back(); - core.solving_event.pop_front(); - return TRUE; - } - case 5: { - tevent e; - e.event_cards = targets; - e.event_player = replace_effect->get_handler_player(); - e.event_value = 0; - if(targets->container.size() == 0) - return TRUE; - card* pc = *targets->container.begin(); - e.reason = pc->current.reason; - e.reason_effect = pc->current.reason_effect; - e.reason_player = pc->current.reason_player; - if(!replace_effect->is_activateable(replace_effect->get_handler_player(), e) || !replace_effect->value) - return TRUE; - chain newchain; - newchain.chain_id = 0; - newchain.chain_count = 0; - newchain.triggering_effect = replace_effect; - newchain.triggering_player = e.event_player; - newchain.evt = e; - newchain.target_cards = 0; - newchain.target_player = PLAYER_NONE; - newchain.target_param = 0; - newchain.disable_player = PLAYER_NONE; - newchain.disable_reason = 0; - newchain.flag = 0; - core.solving_event.push_front(e); - core.sub_solving_event.push_back(e); - core.continuous_chain.push_back(newchain); - add_process(PROCESSOR_EXECUTE_TARGET, 0, replace_effect, 0, replace_effect->get_handler_player(), 0); - return FALSE; - } - case 6: { - if (returns.ivalue[0]) { - card_set::iterator cit, rm; - uint32 is_destroy = arg2; - for (cit = targets->container.begin(); cit != targets->container.end();) { - rm = cit++; - if (replace_effect->get_value(*rm)) { - (*rm)->current.reason = (*rm)->temp.reason; - (*rm)->current.reason_effect = (*rm)->temp.reason_effect; - (*rm)->current.reason_player = (*rm)->temp.reason_player; - if(is_destroy) - core.destroy_canceled.insert(*rm); - targets->container.erase(rm); - } - } - replace_effect->dec_count(); - } else - core.units.begin()->step = 7; - return FALSE; - } - case 7: { - if(!replace_effect->operation) - return FALSE; - core.sub_solving_event.push_back(*core.solving_event.begin()); - add_process(PROCESSOR_EXECUTE_OPERATION, 0, replace_effect, 0, replace_effect->get_handler_player(), 0); - return FALSE; - } - case 8: { - if(core.continuous_chain.rbegin()->target_cards) - pduel->delete_group(core.continuous_chain.rbegin()->target_cards); - chain::opmap::iterator oit; - for(oit = core.continuous_chain.rbegin()->opinfos.begin(); oit != core.continuous_chain.rbegin()->opinfos.end(); ++oit) { - if(oit->second.op_cards) - pduel->delete_group(oit->second.op_cards); - } - core.continuous_chain.pop_back(); - core.solving_event.pop_front(); - return TRUE; - } - case 10: { - if(returns.ivalue[0]) - return TRUE; - if(!replace_effect->target) - return TRUE; - card* target = (card*)arg1; - tevent e; - e.event_cards = targets; - e.event_player = replace_effect->get_handler_player(); - e.event_value = 0; - e.reason = target->current.reason; - e.reason_effect = target->current.reason_effect; - e.reason_player = target->current.reason_player; - if(!replace_effect->is_activateable(replace_effect->get_handler_player(), e)) - return TRUE; - chain newchain; - newchain.chain_id = 0; - newchain.chain_count = 0; - newchain.triggering_effect = replace_effect; - newchain.triggering_player = e.event_player; - newchain.evt = e; - newchain.target_cards = 0; - newchain.target_player = PLAYER_NONE; - newchain.target_param = 0; - newchain.disable_player = PLAYER_NONE; - newchain.disable_reason = 0; - newchain.flag = 0; - core.sub_solving_event.push_back(e); - core.continuous_chain.push_back(newchain); - add_process(PROCESSOR_EXECUTE_TARGET, 0, replace_effect, 0, replace_effect->get_handler_player(), 0); - return FALSE; - } - case 11: { - card* target = (card*)arg1; - if (returns.ivalue[0]) { - targets->container.erase(target); - target->current.reason = target->temp.reason; - target->current.reason_effect = target->temp.reason_effect; - target->current.reason_player = target->temp.reason_player; - if(arg2) - core.destroy_canceled.insert(target); - replace_effect->dec_count(); - core.desrep_chain.push_back(core.continuous_chain.front()); - } - core.continuous_chain.pop_front(); - return TRUE; - } - case 12: { - tevent e; - e.event_cards = targets; - e.event_player = replace_effect->get_handler_player(); - e.event_value = 0; - if(targets->container.size() == 0) - return TRUE; - card* pc = *targets->container.begin(); - e.reason = pc->current.reason; - e.reason_effect = pc->current.reason_effect; - e.reason_player = pc->current.reason_player; - if(!replace_effect->is_activateable(replace_effect->get_handler_player(), e) || !replace_effect->value) - return TRUE; - chain newchain; - newchain.chain_id = 0; - newchain.chain_count = 0; - newchain.triggering_effect = replace_effect; - newchain.triggering_player = e.event_player; - newchain.evt = e; - newchain.target_cards = 0; - newchain.target_player = PLAYER_NONE; - newchain.target_param = 0; - newchain.disable_player = PLAYER_NONE; - newchain.disable_reason = 0; - newchain.flag = 0; - core.continuous_chain.push_back(newchain); - core.sub_solving_event.push_back(e); - add_process(PROCESSOR_EXECUTE_TARGET, 0, replace_effect, 0, replace_effect->get_handler_player(), 0); - return FALSE; - } - case 13: { - if (returns.ivalue[0]) { - card_set::iterator cit, rm; - uint32 is_destroy = arg2; - for (cit = targets->container.begin(); cit != targets->container.end();) { - rm = cit++; - if (replace_effect->get_value(*rm)) { - (*rm)->current.reason = (*rm)->temp.reason; - (*rm)->current.reason_effect = (*rm)->temp.reason_effect; - (*rm)->current.reason_player = (*rm)->temp.reason_player; - if(is_destroy) - core.destroy_canceled.insert(*rm); - targets->container.erase(rm); - } - } - replace_effect->dec_count(); - core.desrep_chain.push_back(core.continuous_chain.front()); - } - core.continuous_chain.pop_front(); - return TRUE; - } - case 15: { - if(core.desrep_chain.size() == 0) - return TRUE; - core.continuous_chain.push_back(core.desrep_chain.front()); - core.desrep_chain.pop_front(); - effect* reffect = core.continuous_chain.back().triggering_effect; - if(!reffect->operation) - return FALSE; - core.sub_solving_event.push_back(core.continuous_chain.back().evt); - add_process(PROCESSOR_EXECUTE_OPERATION, 0, reffect, 0, reffect->get_handler_player(), 0); - return FALSE; - } - case 16: { - if(core.continuous_chain.rbegin()->target_cards) - pduel->delete_group(core.continuous_chain.rbegin()->target_cards); - for(auto oit = core.continuous_chain.rbegin()->opinfos.begin(); oit != core.continuous_chain.rbegin()->opinfos.end(); ++oit) { - if(oit->second.op_cards) - pduel->delete_group(oit->second.op_cards); - } - core.continuous_chain.pop_back(); - core.units.begin()->step = 14; - return FALSE; - } - } - return TRUE; -} -int32 field::select_synchro_material(int16 step, uint8 playerid, card* pcard, int32 min, int32 max, card* smat, group* mg) { - switch(step) { - case 0: { - core.select_cards.clear(); - if(core.global_flag & GLOBALFLAG_MUST_BE_SMATERIAL) { - effect_set eset; - filter_player_effect(pcard->current.controler, EFFECT_MUST_BE_SMATERIAL, &eset); - if(eset.size() && (!mg || mg->has_card(eset[0]->handler))) { - core.select_cards.push_back(eset[0]->handler); - pduel->restore_assumes(); - pduel->write_buffer8(MSG_HINT); - pduel->write_buffer8(HINT_SELECTMSG); - pduel->write_buffer8(playerid); - pduel->write_buffer32(512); - add_process(PROCESSOR_SELECT_CARD, 0, 0, 0, playerid + ((uint32)core.summon_cancelable << 16), 0x10001); - return FALSE; - } - } - if(mg) { - for(auto cit = mg->container.begin(); cit != mg->container.end(); ++cit) { - if(check_tuner_material(pcard, *cit, -2, -1, min, max, smat, mg)) - core.select_cards.push_back(*cit); - } - } else { - for(uint8 p = 0; p < 2; ++p) { - for(int32 i = 0; i < 5; ++i) { - card* tuner = player[p].list_mzone[i]; - if(check_tuner_material(pcard, tuner, -2, -1, min, max, smat, mg)) - core.select_cards.push_back(tuner); - } - } - } - if(core.select_cards.size() == 0) - return TRUE; - pduel->write_buffer8(MSG_HINT); - pduel->write_buffer8(HINT_SELECTMSG); - pduel->write_buffer8(playerid); - pduel->write_buffer32(512); - add_process(PROCESSOR_SELECT_CARD, 0, 0, 0, playerid + ((uint32)core.summon_cancelable << 16), 0x10001); - return FALSE; - } - case 1: { - if(returns.ivalue[0] == -1) { - lua_pop(pduel->lua->current_state, 2); - pduel->lua->add_param((void*)0, PARAM_TYPE_GROUP); - core.limit_tuner = 0; - return TRUE; - } - card* tuner = core.select_cards[returns.bvalue[1]]; - effect* pcheck = tuner->is_affected_by_effect(EFFECT_SYNCHRO_CHECK); - if(pcheck) - pcheck->get_value(tuner); - core.limit_tuner = tuner; - effect* peffect; - if((peffect = tuner->is_affected_by_effect(EFFECT_SYNCHRO_MATERIAL_CUSTOM, pcard))) { - if(!peffect->operation) - return FALSE; - core.synchro_materials.clear(); - pduel->lua->add_param(pcard, PARAM_TYPE_CARD); - pduel->lua->add_param(-1, PARAM_TYPE_INDEX); - pduel->lua->add_param(min, PARAM_TYPE_INT); - pduel->lua->add_param(max, PARAM_TYPE_INT); - core.sub_solving_event.push_back(nil_event); - add_process(PROCESSOR_EXECUTE_OPERATION, 0, peffect, 0, playerid, 0); - } else { - core.units.begin()->step = 2; - } - return FALSE; - } - case 2: { - lua_pop(pduel->lua->current_state, 2); - group* pgroup = pduel->new_group(core.synchro_materials); - pgroup->container.insert(core.limit_tuner); - pduel->lua->add_param(pgroup, PARAM_TYPE_GROUP); - pduel->restore_assumes(); - core.limit_tuner = 0; - return TRUE; - } - case 3: { - if(!smat) - return FALSE; - card* tuner = core.limit_tuner; - int32 l = tuner->get_synchro_level(pcard); - int32 l1 = l & 0xffff; - //int32 l2 = l >> 16; - int32 lv = pcard->get_level(); - lv -= l1; - l = smat->get_synchro_level(pcard); - l1 = l & 0xffff; - lv -= l1; - if(lv == 0) - core.units.begin()->step = 5; - return FALSE; - } - case 4: { - card* tuner = core.limit_tuner; - effect* pcheck = tuner->is_affected_by_effect(EFFECT_SYNCHRO_CHECK); - int32 l = tuner->get_synchro_level(pcard); - int32 l1 = l & 0xffff; - //int32 l2 = l >> 16; - int32 lv = pcard->get_level(); - lv -= l1; - if(smat) { - l = smat->get_synchro_level(pcard); - l1 = l & 0xffff; - lv -= l1; - min--; - max--; - } - core.select_cards.clear(); - if(mg) { - for(auto cit = mg->container.begin(); cit != mg->container.end(); ++cit) { - card* pm = *cit; - if(pm != tuner && pm != smat && pm->is_can_be_synchro_material(pcard, tuner)) { - if(pcheck) - pcheck->get_value(pm); - if(pm->current.location == LOCATION_MZONE && !pm->is_position(POS_FACEUP)) - continue; - if(!pduel->lua->check_matching(pm, -1, 0)) - continue; - core.select_cards.push_back(pm); - pm->operation_param = pm->get_synchro_level(pcard); - } - } - } else { - for(uint8 np = 0; np < 2; ++np) { - for(int32 i = 0; i < 5; ++i) { - card* pm = player[np].list_mzone[i]; - if(pm && pm != tuner && pm != smat && pm->is_position(POS_FACEUP) && pm->is_can_be_synchro_material(pcard, tuner)) { - if(pcheck) - pcheck->get_value(pm); - if(!pduel->lua->check_matching(pm, -1, 0)) - continue; - core.select_cards.push_back(pm); - pm->operation_param = pm->get_synchro_level(pcard); - } - } - } - } - if(core.global_flag & GLOBALFLAG_SCRAP_CHIMERA) { - effect* peffect = 0; - for(auto cit = core.select_cards.begin(); cit != core.select_cards.end(); ++cit) { - peffect = (*cit)->is_affected_by_effect(EFFECT_SCRAP_CHIMERA); - if(peffect) - break; - } - if(peffect) { - card_vector nsyn_filtered; - for(auto cit = core.select_cards.begin(); cit != core.select_cards.end(); ++cit) { - if(!peffect->get_value(*cit)) - nsyn_filtered.push_back(*cit); - } - if(nsyn_filtered.size() < core.select_cards.size()) { - card_vector nsyn_removed; - for(auto cit = core.select_cards.begin(); cit != core.select_cards.end(); ++cit) { - if(!(*cit)->is_affected_by_effect(EFFECT_SCRAP_CHIMERA)) - nsyn_removed.push_back(*cit); - } - if(check_with_sum_limit(&nsyn_filtered, lv, 0, 1, min, max)) { - if(check_with_sum_limit(&nsyn_removed, lv, 0, 1, min, max)) { - add_process(PROCESSOR_SELECT_YESNO, 0, 0, 0, playerid, peffect->description); - core.units.begin()->step = 6; - return FALSE; - } else - core.select_cards.swap(nsyn_filtered); - } else - core.select_cards.swap(nsyn_removed); - } - } - } - pduel->write_buffer8(MSG_HINT); - pduel->write_buffer8(HINT_SELECTMSG); - pduel->write_buffer8(playerid); - pduel->write_buffer32(512); - add_process(PROCESSOR_SELECT_SUM, 0, 0, 0, lv, playerid + (min << 16) + (max << 24)); - return FALSE; - } - case 5: { - lua_pop(pduel->lua->current_state, 2); - group* pgroup = pduel->new_group(); - card* pcard; - for(int32 i = 0; i < returns.bvalue[0]; ++i) { - pcard = core.select_cards[returns.bvalue[i + 1]]; - pgroup->container.insert(pcard); - } - pgroup->container.insert(core.limit_tuner); - if(smat) - pgroup->container.insert(smat); - pduel->lua->add_param(pgroup, PARAM_TYPE_GROUP); - pduel->restore_assumes(); - core.limit_tuner = 0; - return TRUE; - } - case 6: { - lua_pop(pduel->lua->current_state, 2); - group* pgroup = pduel->new_group(); - pgroup->container.insert(core.limit_tuner); - pgroup->container.insert(smat); - pduel->lua->add_param(pgroup, PARAM_TYPE_GROUP); - pduel->restore_assumes(); - core.limit_tuner = 0; - return TRUE; - } - case 7: { - card* tuner = core.limit_tuner; - int32 l = tuner->get_synchro_level(pcard); - int32 l1 = l & 0xffff; - //int32 l2 = l >> 16; - int32 lv = pcard->get_level(); - lv -= l1; - if(smat) { - l = smat->get_synchro_level(pcard); - l1 = l & 0xffff; - lv -= l1; - min--; - max--; - } - if(returns.ivalue[0]) { - effect* peffect = 0; - for(auto cit = core.select_cards.begin(); cit != core.select_cards.end(); ++cit) { - peffect = (*cit)->is_affected_by_effect(EFFECT_SCRAP_CHIMERA); - if(peffect) - break; - } - card_vector nsyn_filtered; - for(auto cit = core.select_cards.begin(); cit != core.select_cards.end(); ++cit) { - if(!peffect->get_value(*cit)) - nsyn_filtered.push_back(*cit); - } - core.select_cards.swap(nsyn_filtered); - } else { - card_vector nsyn_removed; - for(auto cit = core.select_cards.begin(); cit != core.select_cards.end(); ++cit) { - if(!(*cit)->is_affected_by_effect(EFFECT_SCRAP_CHIMERA)) - nsyn_removed.push_back(*cit); - } - core.select_cards.swap(nsyn_removed); - } - pduel->write_buffer8(MSG_HINT); - pduel->write_buffer8(HINT_SELECTMSG); - pduel->write_buffer8(playerid); - pduel->write_buffer32(512); - add_process(PROCESSOR_SELECT_SUM, 0, 0, 0, lv, playerid + (min << 16) + (max << 24)); - core.units.begin()->step = 4; - return FALSE; - } - } - return TRUE; -} -int32 field::select_xyz_material(int16 step, uint8 playerid, uint32 lv, card* scard, int32 min, int32 max) { - switch(step) { - case 0: { - int maxv = 0; - if(core.xmaterial_lst.size()) - maxv = core.xmaterial_lst.begin()->first; - if(min >= maxv) { - core.select_cards.clear(); - for(auto iter = core.xmaterial_lst.begin(); iter != core.xmaterial_lst.end(); ++iter) - core.select_cards.push_back(iter->second); - pduel->write_buffer8(MSG_HINT); - pduel->write_buffer8(HINT_SELECTMSG); - pduel->write_buffer8(playerid); - pduel->write_buffer32(513); - add_process(PROCESSOR_SELECT_CARD, 0, 0, 0, playerid + ((uint32)core.summon_cancelable << 16), min + (max << 16)); - } else - core.units.begin()->step = 1; - return FALSE; - } - case 1: { - if(returns.ivalue[0] == -1) { - pduel->lua->add_param((void*)0, PARAM_TYPE_GROUP); - return TRUE; - } - group* pgroup = pduel->new_group(); - for(int32 i = 0; i < returns.bvalue[0]; ++i) { - card* pcard = core.select_cards[returns.bvalue[i + 1]]; - pgroup->container.insert(pcard); - } - pduel->lua->add_param(pgroup, PARAM_TYPE_GROUP); - return TRUE; - } - case 2: { - core.operated_set.clear(); - core.select_cards.clear(); - for(auto iter = core.xmaterial_lst.begin(); iter != core.xmaterial_lst.end(); ++iter) - core.select_cards.push_back(iter->second); - pduel->write_buffer8(MSG_HINT); - pduel->write_buffer8(HINT_SELECTMSG); - pduel->write_buffer8(playerid); - pduel->write_buffer32(513); - add_process(PROCESSOR_SELECT_CARD, 0, 0, 0, playerid + ((uint32)core.summon_cancelable << 16), min + (min << 16)); - return FALSE; - } - case 3: { - if(returns.ivalue[0] == -1) { - pduel->lua->add_param((void*)0, PARAM_TYPE_GROUP); - return TRUE; - } - int32 pv = 0; - for(int32 i = 0; i < returns.bvalue[0]; ++i) { - card* pcard = core.select_cards[returns.bvalue[i + 1]]; - core.operated_set.insert(pcard); - for(auto iter = core.xmaterial_lst.begin(); iter != core.xmaterial_lst.end(); ++iter) { - if(iter->second == pcard) { - if(pv < iter->first) - pv = iter->first; - core.xmaterial_lst.erase(iter); - break; - } - } - } - max -= returns.bvalue[0]; - if(max == 0 || core.xmaterial_lst.size() == 0) { - group* pgroup = pduel->new_group(core.operated_set); - pduel->lua->add_param(pgroup, PARAM_TYPE_GROUP); - return TRUE; - } - min = 0; - if((int32)core.operated_set.size() < pv) - min = pv - core.operated_set.size(); - core.units.begin()->arg2 = min + (max << 16); - if(min == 0) { - add_process(PROCESSOR_SELECT_YESNO, 0, 0, 0, playerid, 93); - return FALSE; - } - returns.ivalue[0] = 1; - return FALSE; - } - case 4: { - if(!returns.ivalue[0]) { - group* pgroup = pduel->new_group(core.operated_set); - pduel->lua->add_param(pgroup, PARAM_TYPE_GROUP); - return TRUE; - } - core.select_cards.clear(); - for(auto iter = core.xmaterial_lst.begin(); iter != core.xmaterial_lst.end(); ++iter) - core.select_cards.push_back(iter->second); - int maxv = core.xmaterial_lst.begin()->first; - pduel->write_buffer8(MSG_HINT); - pduel->write_buffer8(HINT_SELECTMSG); - pduel->write_buffer8(playerid); - pduel->write_buffer32(513); - if(min == 0) - min = 1; - if(min + (int32)core.operated_set.size() >= maxv) - add_process(PROCESSOR_SELECT_CARD, 0, 0, 0, playerid, min + (max << 16)); - else { - add_process(PROCESSOR_SELECT_CARD, 0, 0, 0, playerid, min + (min << 16)); - core.units.begin()->step = 2; - } - return FALSE; - } - case 5: { - group* pgroup = pduel->new_group(core.operated_set); - for(int32 i = 0; i < returns.bvalue[0]; ++i) { - card* pcard = core.select_cards[returns.bvalue[i + 1]]; - pgroup->container.insert(pcard); - } - pduel->lua->add_param(pgroup, PARAM_TYPE_GROUP); - return TRUE; - } - } - return TRUE; -} -int32 field::select_release_cards(int16 step, uint8 playerid, uint8 check_field, uint8 cancelable, int32 min, int32 max) { - switch(step) { - case 0: { - if(core.release_cards_ex.size() == 0 || (check_field && get_useable_count(playerid, LOCATION_MZONE, playerid, LOCATION_REASON_TOFIELD) <= 0)) { - core.select_cards.clear(); - for(auto cit = core.release_cards.begin(); cit != core.release_cards.end(); ++cit) - core.select_cards.push_back(*cit); - pduel->write_buffer8(MSG_HINT); - pduel->write_buffer8(HINT_SELECTMSG); - pduel->write_buffer8(playerid); - pduel->write_buffer32(500); - add_process(PROCESSOR_SELECT_CARD, 0, 0, 0, ((uint32)cancelable << 16) + playerid, (max << 16) + min); - return TRUE; - } - if(core.release_cards_ex.size() >= (uint32)min) { - core.select_cards.clear(); - for(auto cit = core.release_cards_ex.begin(); cit != core.release_cards_ex.end(); ++cit) - core.select_cards.push_back(*cit); - pduel->write_buffer8(MSG_HINT); - pduel->write_buffer8(HINT_SELECTMSG); - pduel->write_buffer8(playerid); - pduel->write_buffer32(500); - add_process(PROCESSOR_SELECT_CARD, 0, 0, 0, ((uint32)cancelable << 16) + playerid, (max << 16) + min); - return TRUE; - } - core.operated_set.clear(); - core.select_cards.clear(); - for(auto cit = core.release_cards_ex.begin(); cit != core.release_cards_ex.end(); ++cit) - core.select_cards.push_back(*cit); - pduel->write_buffer8(MSG_HINT); - pduel->write_buffer8(HINT_SELECTMSG); - pduel->write_buffer8(playerid); - pduel->write_buffer32(500); - add_process(PROCESSOR_SELECT_CARD, 0, 0, 0, ((uint32)cancelable << 16) + playerid, (core.release_cards_ex.size() << 16) + core.release_cards_ex.size()); - min -= core.release_cards_ex.size(); - max -= core.release_cards_ex.size(); - core.units.begin()->arg2 = (max << 16) + min; - return FALSE; - } - case 1: { - for(int32 i = 0; i < returns.bvalue[0]; ++i) - core.operated_set.insert(core.select_cards[returns.bvalue[i + 1]]); - core.select_cards.clear(); - for(auto cit = core.release_cards.begin(); cit != core.release_cards.end(); ++cit) - core.select_cards.push_back(*cit); - pduel->write_buffer8(MSG_HINT); - pduel->write_buffer8(HINT_SELECTMSG); - pduel->write_buffer8(playerid); - pduel->write_buffer32(500); - add_process(PROCESSOR_SELECT_CARD, 0, 0, 0, ((uint32)cancelable << 16) + playerid, (max << 16) + min); - return FALSE; - } - case 2: { - for(int32 i = 0; i < returns.bvalue[0]; ++i) - core.operated_set.insert(core.select_cards[returns.bvalue[i + 1]]); - core.select_cards.clear(); - returns.bvalue[0] = core.operated_set.size(); - int32 i = 0; - for(auto cit = core.operated_set.begin(); cit != core.operated_set.end(); ++cit, ++i) { - core.select_cards.push_back(*cit); - returns.bvalue[i + 1] = i; - } - return TRUE; - } - } - return TRUE; -} -int32 field::select_tribute_cards(int16 step, uint8 playerid, uint8 cancelable, int32 min, int32 max) { - switch(step) { - case 0: { - if(core.release_cards_ex.size() + core.release_cards_ex_sum.size() == 0 - || (get_useable_count(playerid, LOCATION_MZONE, playerid, LOCATION_REASON_TOFIELD) <= 0 && min < 2)) { - core.select_cards.clear(); - for(auto cit = core.release_cards.begin(); cit != core.release_cards.end(); ++cit) - core.select_cards.push_back(*cit); - pduel->write_buffer8(MSG_HINT); - pduel->write_buffer8(HINT_SELECTMSG); - pduel->write_buffer8(playerid); - pduel->write_buffer32(500); - add_process(PROCESSOR_SELECT_TRIBUTE_P, 0, 0, 0, ((uint32)cancelable << 16) + playerid, (max << 16) + min); - return TRUE; - } - if(core.release_cards_ex.size() >= (uint32)max) { - core.select_cards.clear(); - for(auto cit = core.release_cards_ex.begin(); cit != core.release_cards_ex.end(); ++cit) - core.select_cards.push_back(*cit); - pduel->write_buffer8(MSG_HINT); - pduel->write_buffer8(HINT_SELECTMSG); - pduel->write_buffer8(playerid); - pduel->write_buffer32(500); - add_process(PROCESSOR_SELECT_TRIBUTE_P, 0, 0, 0, ((uint32)cancelable << 16) + playerid, (max << 16) + min); - return TRUE; - } - core.operated_set.clear(); - core.select_cards.clear(); - int32 rmax = 0; - for(auto cit = core.release_cards.begin(); cit != core.release_cards.end(); ++cit) - rmax += (*cit)->operation_param; - for(auto cit = core.release_cards_ex.begin(); cit != core.release_cards_ex.end(); ++cit) - rmax += (*cit)->operation_param; - core.temp_var[0] = 0; - if(rmax < min) { - returns.ivalue[0] = TRUE; - if(rmax == 0 && min == 2) - core.temp_var[0] = 1; - } else if(!core.release_cards_ex_sum.empty()) - add_process(PROCESSOR_SELECT_YESNO, 0, 0, 0, playerid, 92); - else - core.units.begin()->step = 2; - return FALSE; - } - case 1: { - if(!returns.ivalue[0]) { - core.units.begin()->step = 2; - return FALSE; - } - if(core.temp_var[0] == 0) - for(auto cit = core.release_cards_ex_sum.begin(); cit != core.release_cards_ex_sum.end(); ++cit) - core.select_cards.push_back(*cit); - else - for(auto cit = core.release_cards_ex_sum.begin(); cit != core.release_cards_ex_sum.end(); ++cit) - if((*cit)->operation_param == 2) - core.select_cards.push_back(*cit); - pduel->write_buffer8(MSG_HINT); - pduel->write_buffer8(HINT_SELECTMSG); - pduel->write_buffer8(playerid); - pduel->write_buffer32(500); - add_process(PROCESSOR_SELECT_CARD, 0, 0, 0, ((uint32)cancelable << 16) + playerid, 0x10001); - return FALSE; - } - case 2: { - if(returns.ivalue[0] == -1) - return TRUE; - for(int32 i = 0; i < returns.bvalue[0]; ++i) { - card* pcard = core.select_cards[returns.bvalue[i + 1]]; - core.operated_set.insert(pcard); - effect* peffect = pcard->is_affected_by_effect(EFFECT_EXTRA_RELEASE_SUM); - peffect->dec_count(); - } - return FALSE; - } - case 3: { - for(auto cit = core.release_cards_ex.begin(); cit != core.release_cards_ex.end(); ++cit) - core.select_cards.push_back(*cit); - pduel->write_buffer8(MSG_HINT); - pduel->write_buffer8(HINT_SELECTMSG); - pduel->write_buffer8(playerid); - pduel->write_buffer32(500); - add_process(PROCESSOR_SELECT_CARD, 0, 0, 0, ((uint32)cancelable << 16) + playerid, (core.release_cards_ex.size() << 16) + core.release_cards_ex.size()); - return FALSE; - } - case 4: { - if(returns.ivalue[0] == -1) - return TRUE; - for(int32 i = 0; i < returns.bvalue[0]; ++i) - core.operated_set.insert(core.select_cards[returns.bvalue[i + 1]]); - uint32 rmin = core.operated_set.size(); - uint32 rmax = 0; - for(auto cit = core.operated_set.begin(); cit != core.operated_set.end(); ++cit) - rmax += (*cit)->operation_param; - min -= rmax; - max -= rmin; - core.units.begin()->arg2 = (max << 16) + min; - if(min <= 0) { - if(max > 0 && !core.release_cards.empty()) - add_process(PROCESSOR_SELECT_YESNO, 0, 0, 0, playerid, 210); - else - core.units.begin()->step = 6; - } else - returns.ivalue[0] = TRUE; - return FALSE; - } - case 5: { - if(!returns.ivalue[0]) { - core.units.begin()->step = 6; - return FALSE; - } - core.select_cards.clear(); - for(auto cit = core.release_cards.begin(); cit != core.release_cards.end(); ++cit) - core.select_cards.push_back(*cit); - pduel->write_buffer8(MSG_HINT); - pduel->write_buffer8(HINT_SELECTMSG); - pduel->write_buffer8(playerid); - pduel->write_buffer32(500); - add_process(PROCESSOR_SELECT_TRIBUTE_P, 0, 0, 0, ((uint32)cancelable << 16) + playerid, (max << 16) + min); - return FALSE; - } - case 6: { - if(returns.ivalue[0] == -1) - return TRUE; - for(int32 i = 0; i < returns.bvalue[0]; ++i) - core.operated_set.insert(core.select_cards[returns.bvalue[i + 1]]); - return FALSE; - } - case 7: { - core.select_cards.clear(); - returns.bvalue[0] = core.operated_set.size(); - int32 i = 0; - for(auto cit = core.operated_set.begin(); cit != core.operated_set.end(); ++cit, ++i) { - core.select_cards.push_back(*cit); - returns.bvalue[i + 1] = i; - } - return TRUE; - } - } - return TRUE; -} -int32 field::toss_coin(uint16 step, effect * reason_effect, uint8 reason_player, uint8 playerid, uint8 count) { - switch(step) { - case 0: { - effect_set eset; - effect* peffect = 0; - tevent e; - e.event_cards = 0; - e.reason_effect = core.reason_effect; - e.reason_player = core.reason_player; - e.event_player = playerid; - e.event_value = count; - for(uint8 i = 0; i < 5; ++i) - core.coin_result[i] = 0; - filter_field_effect(EFFECT_TOSS_COIN_REPLACE, &eset); - for(int32 i = eset.size() - 1; i >= 0; --i) { - if(eset[i]->is_activateable(eset[i]->get_handler_player(), e)) { - peffect = eset[i]; - break; - } - } - if(!peffect) { - pduel->write_buffer8(MSG_TOSS_COIN); - pduel->write_buffer8(playerid); - pduel->write_buffer8(count); - for(int32 i = 0; i < count; ++i) { - core.coin_result[i] = pduel->get_next_integer(0, 1); - pduel->write_buffer8(core.coin_result[i]); - } - raise_event((card*)0, EVENT_TOSS_COIN_NEGATE, reason_effect, 0, reason_player, playerid, count); - process_instant_event(); - return FALSE; - } else { - core.sub_solving_event.push_back(e); - add_process(PROCESSOR_SOLVE_CONTINUOUS, 0, peffect, 0, peffect->get_handler_player(), 0); - return TRUE; - } - } - case 1: { - raise_event((card*)0, EVENT_TOSS_COIN, reason_effect, 0, reason_player, playerid, count); - process_instant_event(); - return TRUE; - } - } - return TRUE; -} -int32 field::toss_dice(uint16 step, effect * reason_effect, uint8 reason_player, uint8 playerid, uint8 count1, uint8 count2) { - switch(step) { - case 0: { - effect_set eset; - effect* peffect = 0; - tevent e; - e.event_cards = 0; - e.reason_effect = core.reason_effect; - e.reason_player = core.reason_player; - e.event_player = playerid; - e.event_value = count1 + (count2 << 16); - for(int32 i = 0; i < 5; ++i) - core.dice_result[i] = 0; - filter_field_effect(EFFECT_TOSS_DICE_REPLACE, &eset); - for(int32 i = eset.size() - 1; i >= 0; --i) { - if(eset[i]->is_activateable(eset[i]->get_handler_player(), e)) { - peffect = eset[i]; - break; - } - } - if(!peffect) { - pduel->write_buffer8(MSG_TOSS_DICE); - pduel->write_buffer8(playerid); - pduel->write_buffer8(count1); - for(int32 i = 0; i < count1; ++i) { - core.dice_result[i] = pduel->get_next_integer(1, 6); - pduel->write_buffer8(core.dice_result[i]); - } - if(count2 > 0) { - pduel->write_buffer8(MSG_TOSS_DICE); - pduel->write_buffer8(1 - playerid); - pduel->write_buffer8(count2); - for(int32 i = 0; i < count2; ++i) { - core.dice_result[count1 + i] = pduel->get_next_integer(1, 6); - pduel->write_buffer8(core.dice_result[count1 + i]); - } - } - raise_event((card*)0, EVENT_TOSS_DICE_NEGATE, reason_effect, 0, reason_player, playerid, count1 + (count2 << 16)); - process_instant_event(); - return FALSE; - } else { - core.sub_solving_event.push_back(e); - add_process(PROCESSOR_SOLVE_CONTINUOUS, 0, peffect, 0, peffect->get_handler_player(), 0); - return TRUE; - } - } - case 1: { - raise_event((card*)0, EVENT_TOSS_DICE, reason_effect, 0, reason_player, playerid, count1 + (count2 << 16)); - process_instant_event(); - return TRUE; - } - } - return TRUE; -} diff --git a/ocgcore/playerop.cpp b/ocgcore/playerop.cpp deleted file mode 100644 index e65e10d8fe..0000000000 --- a/ocgcore/playerop.cpp +++ /dev/null @@ -1,757 +0,0 @@ -/* - * playerop.cpp - * - * Created on: 2010-12-22 - * Author: Argon - */ - -#include "field.h" -#include "duel.h" -#include "effect.h" -#include "card.h" - -#include -#include - -int32 field::select_battle_command(uint16 step, uint8 playerid) { - if(step == 0) { - pduel->write_buffer8(MSG_SELECT_BATTLECMD); - pduel->write_buffer8(playerid); - uint32 i; - card* pcard; - effect* peffect; - //Activatable - pduel->write_buffer8(core.select_chains.size()); - std::sort(core.select_chains.begin(), core.select_chains.end(), chain::chain_operation_sort); - for(i = 0; i < core.select_chains.size(); ++i) { - peffect = core.select_chains[i].triggering_effect; - pcard = peffect->handler; - pduel->write_buffer32(pcard->data.code); - pduel->write_buffer8(pcard->current.controler); - pduel->write_buffer8(pcard->current.location); - pduel->write_buffer8(pcard->current.sequence); - pduel->write_buffer32(peffect->description); - } - //Attackable - pduel->write_buffer8(core.attackable_cards.size()); - for(i = 0; i < core.attackable_cards.size(); ++i) { - pcard = core.attackable_cards[i]; - pduel->write_buffer32(pcard->data.code); - pduel->write_buffer8(pcard->current.controler); - pduel->write_buffer8(pcard->current.location); - pduel->write_buffer8(pcard->current.sequence); - pduel->write_buffer8(pcard->operation_param); - } - //M2, EP - if(core.to_m2) - pduel->write_buffer8(1); - else - pduel->write_buffer8(0); - if(core.to_ep) - pduel->write_buffer8(1); - else - pduel->write_buffer8(0); - return FALSE; - } else { - uint32 t = returns.ivalue[0] & 0xffff; - uint32 s = returns.ivalue[0] >> 16; - if(t < 0 || t > 3 || s < 0 - || (t == 0 && s >= core.select_chains.size()) - || (t == 1 && s >= core.attackable_cards.size()) - || (t == 2 && !core.to_m2) - || (t == 3 && !core.to_ep)) { - pduel->write_buffer8(MSG_RETRY); - return FALSE; - } - return TRUE; - } -} -int32 field::select_idle_command(uint16 step, uint8 playerid) { - if(step == 0) { - uint32 i; - card* pcard; - effect* peffect; - pduel->write_buffer8(MSG_SELECT_IDLECMD); - pduel->write_buffer8(playerid); - //idle summon - pduel->write_buffer8(core.summonable_cards.size()); - for(i = 0; i < core.summonable_cards.size(); ++i) { - pcard = core.summonable_cards[i]; - pduel->write_buffer32(pcard->data.code); - pduel->write_buffer8(pcard->current.controler); - pduel->write_buffer8(pcard->current.location); - pduel->write_buffer8(pcard->current.sequence); - } - //idle spsummon - pduel->write_buffer8(core.spsummonable_cards.size()); - for(i = 0; i < core.spsummonable_cards.size(); ++i) { - pcard = core.spsummonable_cards[i]; - pduel->write_buffer32(pcard->data.code); - pduel->write_buffer8(pcard->current.controler); - pduel->write_buffer8(pcard->current.location); - pduel->write_buffer8(pcard->current.sequence); - } - //idle pos change - pduel->write_buffer8(core.repositionable_cards.size()); - for(i = 0; i < core.repositionable_cards.size(); ++i) { - pcard = core.repositionable_cards[i]; - pduel->write_buffer32(pcard->data.code); - pduel->write_buffer8(pcard->current.controler); - pduel->write_buffer8(pcard->current.location); - pduel->write_buffer8(pcard->current.sequence); - } - //idle mset - pduel->write_buffer8(core.msetable_cards.size()); - for(i = 0; i < core.msetable_cards.size(); ++i) { - pcard = core.msetable_cards[i]; - pduel->write_buffer32(pcard->data.code); - pduel->write_buffer8(pcard->current.controler); - pduel->write_buffer8(pcard->current.location); - pduel->write_buffer8(pcard->current.sequence); - } - //idle sset - pduel->write_buffer8(core.ssetable_cards.size()); - for(i = 0; i < core.ssetable_cards.size(); ++i) { - pcard = core.ssetable_cards[i]; - pduel->write_buffer32(pcard->data.code); - pduel->write_buffer8(pcard->current.controler); - pduel->write_buffer8(pcard->current.location); - pduel->write_buffer8(pcard->current.sequence); - } - //idle activate - pduel->write_buffer8(core.select_chains.size()); - std::sort(core.select_chains.begin(), core.select_chains.end(), chain::chain_operation_sort); - for(i = 0; i < core.select_chains.size(); ++i) { - peffect = core.select_chains[i].triggering_effect; - pcard = peffect->handler; - pduel->write_buffer32(pcard->data.code); - pduel->write_buffer8(pcard->current.controler); - pduel->write_buffer8(pcard->current.location); - pduel->write_buffer8(pcard->current.sequence); - pduel->write_buffer32(peffect->description); - } - //To BP - if(infos.phase == PHASE_MAIN1 && core.to_bp) - pduel->write_buffer8(1); - else - pduel->write_buffer8(0); - if(core.to_ep) - pduel->write_buffer8(1); - else - pduel->write_buffer8(0); - if(infos.can_shuffle && player[playerid].list_hand.size() > 1) - pduel->write_buffer8(1); - else - pduel->write_buffer8(0); - return FALSE; - } else { - uint32 t = returns.ivalue[0] & 0xffff; - uint32 s = returns.ivalue[0] >> 16; - if(t < 0 || t > 8 || s < 0 - || (t == 0 && s >= core.summonable_cards.size()) - || (t == 1 && s >= core.spsummonable_cards.size()) - || (t == 2 && s >= core.repositionable_cards.size()) - || (t == 3 && s >= core.msetable_cards.size()) - || (t == 4 && s >= core.ssetable_cards.size()) - || (t == 5 && s >= core.select_chains.size()) - || (t == 6 && (infos.phase != PHASE_MAIN1 || !core.to_bp)) - || (t == 7 && !core.to_ep) - || (t == 8 && !(infos.can_shuffle && player[playerid].list_hand.size() > 1))) { - pduel->write_buffer8(MSG_RETRY); - return FALSE; - } - return TRUE; - } -} -int32 field::select_effect_yes_no(uint16 step, uint8 playerid, card* pcard) { - if(step == 0) { - if((playerid == 1) && (core.duel_options & DUEL_SIMPLE_AI)) { - returns.ivalue[0] = 1; - return TRUE; - } - pduel->write_buffer8(MSG_SELECT_EFFECTYN); - pduel->write_buffer8(playerid); - pduel->write_buffer32(pcard->data.code); - pduel->write_buffer32(pcard->get_info_location()); - returns.ivalue[0] = -1; - return FALSE; - } else { - if(returns.ivalue[0] != 0 && returns.ivalue[0] != 1) { - pduel->write_buffer8(MSG_RETRY); - return FALSE; - } - return TRUE; - } -} -int32 field::select_yes_no(uint16 step, uint8 playerid, uint32 description) { - if(step == 0) { - if((playerid == 1) && (core.duel_options & DUEL_SIMPLE_AI)) { - returns.ivalue[0] = 1; - return TRUE; - } - pduel->write_buffer8(MSG_SELECT_YESNO); - pduel->write_buffer8(playerid); - pduel->write_buffer32(description); - returns.ivalue[0] = -1; - return FALSE; - } else { - if(returns.ivalue[0] != 0 && returns.ivalue[0] != 1) { - pduel->write_buffer8(MSG_RETRY); - return FALSE; - } - return TRUE; - } -} -int32 field::select_option(uint16 step, uint8 playerid) { - if(step == 0) { - returns.ivalue[0] = -1; - if(core.select_options.size() == 0) - return TRUE; - if((playerid == 1) && (core.duel_options & DUEL_SIMPLE_AI)) { - returns.ivalue[0] = 0; - return TRUE; - } - pduel->write_buffer8(MSG_SELECT_OPTION); - pduel->write_buffer8(playerid); - pduel->write_buffer8(core.select_options.size()); - for(uint32 i = 0; i < core.select_options.size(); ++i) - pduel->write_buffer32(core.select_options[i]); - return FALSE; - } else { - if(returns.ivalue[0] < 0 || returns.ivalue[0] >= (int32)core.select_options.size()) { - pduel->write_buffer8(MSG_RETRY); - return FALSE; - } - return TRUE; - } -} -int32 field::select_card(uint16 step, uint8 playerid, uint8 cancelable, uint8 min, uint8 max) { - if(step == 0) { - returns.bvalue[0] = 0; - if(max == 0 || core.select_cards.empty()) - return TRUE; - if(max > 63) - max = 63; - if(max > core.select_cards.size()) - max = core.select_cards.size(); - if(min > max) - min = max; - if((playerid == 1) && (core.duel_options & DUEL_SIMPLE_AI)) { - returns.bvalue[0] = min; - for(uint8 i = 0; i < min; ++i) - returns.bvalue[i + 1] = i; - return TRUE; - } - core.units.begin()->arg2 = ((uint32)min) + (((uint32)max) << 16); - pduel->write_buffer8(MSG_SELECT_CARD); - pduel->write_buffer8(playerid); - pduel->write_buffer8(cancelable); - pduel->write_buffer8(min); - pduel->write_buffer8(max); - pduel->write_buffer8(core.select_cards.size()); - card* pcard; - std::sort(core.select_cards.begin(), core.select_cards.end(), card::card_operation_sort); - for(uint32 i = 0; i < core.select_cards.size(); ++i) { - pcard = core.select_cards[i]; - pduel->write_buffer32(pcard->data.code); - pduel->write_buffer32(pcard->get_info_location()); - } - return FALSE; - } else { - if(cancelable && returns.ivalue[0] == -1) - return TRUE; - byte c[64]; - memset(c, 0, 64); - if(returns.bvalue[0] < min || returns.bvalue[0] > max) { - pduel->write_buffer8(MSG_RETRY); - return FALSE; - } - uint8 m = core.select_cards.size(), v = 0; - for(int32 i = 0; i < returns.bvalue[0]; ++i) { - v = returns.bvalue[i + 1]; - if(v < 0 || v >= m || v >= 63 || c[v]) { - pduel->write_buffer8(MSG_RETRY); - return FALSE; - } - c[v] = 1; - } - return TRUE; - } -} -int32 field::select_chain(uint16 step, uint8 playerid, uint8 spe_count, uint8 forced) { - if(step == 0) { - returns.ivalue[0] = -1; - if((playerid == 1) && (core.duel_options & DUEL_SIMPLE_AI)) { - if(core.select_chains.size() == 0) - returns.ivalue[0] = -1; - else { - bool act = true; - for(auto chit = core.current_chain.begin(); chit != core.current_chain.end(); ++chit) - if(chit->triggering_player == 1) - act = false; - if(act) - returns.ivalue[0] = 0; - else - returns.ivalue[0] = -1; - } - return TRUE; - } - pduel->write_buffer8(MSG_SELECT_CHAIN); - pduel->write_buffer8(playerid); - pduel->write_buffer8(core.select_chains.size()); - pduel->write_buffer8(spe_count); - pduel->write_buffer8(forced); - pduel->write_buffer32(pduel->game_field->core.hint_timing[playerid]); - pduel->write_buffer32(pduel->game_field->core.hint_timing[1 - playerid]); - std::sort(core.select_chains.begin(), core.select_chains.end(), chain::chain_operation_sort); - for(uint32 i = 0; i < core.select_chains.size(); ++i) { - effect* peffect = core.select_chains[i].triggering_effect; - card* pcard = peffect->handler; - if(!(peffect->type & EFFECT_TYPE_ACTIONS)) - pcard = peffect->owner; - if(peffect->flag & EFFECT_FLAG_FIELD_ONLY) - pduel->write_buffer32(1000000000 + pcard->data.code); - else - pduel->write_buffer32(pcard->data.code); - pduel->write_buffer32(pcard->get_info_location()); - pduel->write_buffer32(peffect->description); - } - return FALSE; - } else { - if((returns.ivalue[0] < 0 && forced) || returns.ivalue[0] >= (int32)core.select_chains.size()) { - pduel->write_buffer8(MSG_RETRY); - return FALSE; - } - return TRUE; - } -} -int32 field::select_place(uint16 step, uint8 playerid, uint32 flag, uint8 count) { - if(step == 0) { - if(count == 0) - return TRUE; - if((playerid == 1) && (core.duel_options & DUEL_SIMPLE_AI)) { - returns.bvalue[0] = 1; - flag = ~flag; - if(flag & 0x1f) { - returns.bvalue[1] = LOCATION_MZONE; - if(flag & 0x4) returns.bvalue[2] = 2; - else if(flag & 0x2) returns.bvalue[2] = 1; - else if(flag & 0x8) returns.bvalue[2] = 3; - else if(flag & 0x1) returns.bvalue[2] = 0; - else returns.bvalue[2] = 4; - } else { - returns.bvalue[1] = LOCATION_SZONE; - if(flag & 0x400) returns.bvalue[2] = 2; - else if(flag & 0x200) returns.bvalue[2] = 1; - else if(flag & 0x800) returns.bvalue[2] = 3; - else if(flag & 0x100) returns.bvalue[2] = 0; - else returns.bvalue[2] = 4; - } - return true; - } - if(core.units.begin()->type == PROCESSOR_SELECT_PLACE) - pduel->write_buffer8(MSG_SELECT_PLACE); - else - pduel->write_buffer8(MSG_SELECT_DISFIELD); - pduel->write_buffer8(playerid); - pduel->write_buffer8(count); - pduel->write_buffer32(flag); - returns.bvalue[0] = 0; - return FALSE; - } else { - uint8 pt = 0, p, l, s; - for(int8 i = 0; i < count; ++i) { - p = returns.bvalue[pt]; - l = returns.bvalue[pt + 1]; - s = returns.bvalue[pt + 2]; - if((p != 0 && p != 1) || ((l != LOCATION_MZONE) && (l != LOCATION_SZONE)) || s >= 5 - || ((1 << s) & (flag >> (((p == playerid) ? 0 : 16) + ((l == LOCATION_MZONE) ? 0 : 8))))) { - pduel->write_buffer8(MSG_RETRY); - return FALSE; - } - pt += 3; - } - return TRUE; - } -} -int32 field::select_position(uint16 step, uint8 playerid, uint32 code, uint8 positions) { - if(step == 0) { - if(positions == 0) { - returns.ivalue[0] = POS_FACEUP_ATTACK; - return TRUE; - } - positions &= 0xf; - if(positions == 0x1 || positions == 0x2 || positions == 0x4 || positions == 0x8) { - returns.ivalue[0] = positions; - return TRUE; - } - if((playerid == 1) && (core.duel_options & DUEL_SIMPLE_AI)) { - if(positions & 0x4) - returns.ivalue[0] = 0x4; - else if(positions & 0x1) - returns.ivalue[0] = 0x1; - else if(positions & 0x8) - returns.ivalue[0] = 0x8; - else - returns.ivalue[0] = 0x2; - return TRUE; - } - pduel->write_buffer8(MSG_SELECT_POSITION); - pduel->write_buffer8(playerid); - pduel->write_buffer32(code); - pduel->write_buffer8(positions); - returns.ivalue[0] = 0; - return FALSE; - } else { - uint32 pos = returns.ivalue[0]; - if(pos != 0x1 && pos != 0x2 && pos != 0x4 && pos != 0x8 && !(pos & positions)) { - pduel->write_buffer8(MSG_RETRY); - return FALSE; - } - return TRUE; - } -} -int32 field::select_tribute(uint16 step, uint8 playerid, uint8 cancelable, uint8 min, uint8 max) { - if(step == 0) { - returns.bvalue[0] = 0; - if(max == 0 || core.select_cards.empty()) - return TRUE; - uint8 tm = 0; - for(uint32 i = 0; i < core.select_cards.size(); ++i) - tm += core.select_cards[i]->operation_param; - if(max > 5) - max = 5; - if(max > tm) - max = tm; - if(min > max) - min = max; - core.units.begin()->arg2 = ((uint32)min) + (((uint32)max) << 16); - pduel->write_buffer8(MSG_SELECT_TRIBUTE); - pduel->write_buffer8(playerid); - pduel->write_buffer8(cancelable); - pduel->write_buffer8(min); - pduel->write_buffer8(max); - pduel->write_buffer8(core.select_cards.size()); - card* pcard; - std::sort(core.select_cards.begin(), core.select_cards.end(), card::card_operation_sort); - for(uint32 i = 0; i < core.select_cards.size(); ++i) { - pcard = core.select_cards[i]; - pduel->write_buffer32(pcard->data.code); - pduel->write_buffer8(pcard->current.controler); - pduel->write_buffer8(pcard->current.location); - pduel->write_buffer8(pcard->current.sequence); - pduel->write_buffer8(pcard->operation_param); - } - return FALSE; - } else { - if(cancelable && returns.ivalue[0] == -1) - return TRUE; - byte c[64]; - memset(c, 0, 64); - if(returns.bvalue[0] > max) { - pduel->write_buffer8(MSG_RETRY); - return FALSE; - } - uint8 m = core.select_cards.size(), v = 0, tt = 0; - for(int32 i = 0; i < returns.bvalue[0]; ++i) { - v = returns.bvalue[i + 1]; - if(v < 0 || v >= m || v >= 6 || c[v]) { - pduel->write_buffer8(MSG_RETRY); - return FALSE; - } - c[v] = 1; - tt += core.select_cards[v]->operation_param; - } - if(tt < min) { - pduel->write_buffer8(MSG_RETRY); - return FALSE; - } - return TRUE; - } -} -int32 field::select_counter(uint16 step, uint8 playerid, uint16 countertype, uint16 count) { - if(step == 0) { - if(core.select_cards.empty() || count == 0) - return TRUE; - uint8 tm = 0; - for(uint32 i = 0; i < core.select_cards.size(); ++i) - tm += core.select_cards[i]->operation_param; - if(count > tm) { - count = tm; - core.units.begin()->arg2 = countertype + (((uint32)count) << 16); - } - pduel->write_buffer8(MSG_SELECT_COUNTER); - pduel->write_buffer8(playerid); - pduel->write_buffer16(countertype); - pduel->write_buffer8((uint8)count); - pduel->write_buffer8(core.select_cards.size()); - card* pcard; - std::sort(core.select_cards.begin(), core.select_cards.end(), card::card_operation_sort); - for(uint32 i = 0; i < core.select_cards.size(); ++i) { - pcard = core.select_cards[i]; - pduel->write_buffer32(pcard->data.code); - pduel->write_buffer8(pcard->current.controler); - pduel->write_buffer8(pcard->current.location); - pduel->write_buffer8(pcard->current.sequence); - pduel->write_buffer8(pcard->operation_param); - } - return FALSE; - } else { - uint16 ct = 0; - for(uint32 i = 0; i < core.select_cards.size(); ++i) { - if(core.select_cards[i]->operation_param < (uint32)returns.bvalue[i]) { - pduel->write_buffer8(MSG_RETRY); - return FALSE; - } - ct += returns.bvalue[i]; - } - if(ct != count) { - pduel->write_buffer8(MSG_RETRY); - return FALSE; - } - } - return TRUE; -} -int32 select_sum_check1(int32* oparam, int32 size, int32 index, int32 count, int32 acc, int32 min) { - if(acc == 0 || index == size) - return FALSE; - int32 o1 = oparam[index] & 0xffff; - int32 o2 = oparam[index] >> 16; - if((o1 == acc || o2 == acc) && index == size - 1 && count >= min) - return TRUE; - return (acc > o1 && select_sum_check1(oparam, size, index + 1, count + 1, acc - o1, min)) - || (o2 > 0 && acc > o2 && select_sum_check1(oparam, size, index + 1, count + 1, acc - o2, min)); -} -int32 field::select_with_sum_limit(int16 step, uint8 playerid, int32 acc, int32 min, int32 max) { - if(step == 0) { - returns.bvalue[0] = 0; - if(core.select_cards.empty()) - return TRUE; - pduel->write_buffer8(MSG_SELECT_SUM); - if(max) - pduel->write_buffer8(0); - else - pduel->write_buffer8(1); - if(max < min) - max = min; - pduel->write_buffer8(playerid); - pduel->write_buffer32(acc & 0xffff); - pduel->write_buffer8(min); - pduel->write_buffer8(max); - pduel->write_buffer8(core.select_cards.size()); - card* pcard; - std::sort(core.select_cards.begin(), core.select_cards.end(), card::card_operation_sort); - for(uint32 i = 0; i < core.select_cards.size(); ++i) { - pcard = core.select_cards[i]; - pduel->write_buffer32(pcard->data.code); - pduel->write_buffer8(pcard->current.controler); - pduel->write_buffer8(pcard->current.location); - pduel->write_buffer8(pcard->current.sequence); - pduel->write_buffer32(pcard->operation_param); - } - return FALSE; - } else { - byte c[64]; - memset(c, 0, 64); - if(min) { - int32 oparam[16]; - if(returns.bvalue[0] < min || returns.bvalue[0] > max) { - pduel->write_buffer8(MSG_RETRY); - return FALSE; - } - uint8 m = core.select_cards.size(), v = 0; - for(int32 i = 0; i < returns.bvalue[0]; ++i) { - v = returns.bvalue[i + 1]; - if(v < 0 || v >= m || c[v]) { - pduel->write_buffer8(MSG_RETRY); - return FALSE; - } - c[v] = 1; - oparam[i] = core.select_cards[v]->operation_param; - } - if(!select_sum_check1(oparam, returns.bvalue[0], 0, 1, acc, min)) { - pduel->write_buffer8(MSG_RETRY); - return FALSE; - } - return TRUE; - } else { - uint8 m = core.select_cards.size(), v = 0; - int32 op, o1, o2, sum = 0, mx = 0, mn = 0x7fffffff; - int16 ms[16]; - for(int32 i = 0; i < returns.bvalue[0]; ++i) { - v = returns.bvalue[i + 1]; - if(v < 0 || v >= m || c[v]) { - pduel->write_buffer8(MSG_RETRY); - return FALSE; - } - c[v] = 1; - op = core.select_cards[v]->operation_param; - o1 = op & 0xffff; - o2 = op >> 16; - sum += ms[i] = (o2 && o2 < o1) ? o2 : o1; - mx += (o2 > o1) ? o2 : o1; - if(ms[i] < mn) - mn = ms[i]; - } - if(mx < acc || sum - mn >= acc) { - pduel->write_buffer8(MSG_RETRY); - return FALSE; - } - return TRUE; - } - } - return TRUE; -} -int32 field::sort_card(int16 step, uint8 playerid, uint8 is_chain) { - if(step == 0) { - returns.bvalue[0] = 0; - if((playerid == 1) && (core.duel_options & DUEL_SIMPLE_AI)) { - returns.ivalue[0] = -1; - return TRUE; - } - if(core.select_cards.empty()) - return TRUE; - if(is_chain) - pduel->write_buffer8(MSG_SORT_CHAIN); - else - pduel->write_buffer8(MSG_SORT_CARD); - pduel->write_buffer8(playerid); - pduel->write_buffer8(core.select_cards.size()); - card* pcard; - for(uint32 i = 0; i < core.select_cards.size(); ++i) { - pcard = core.select_cards[i]; - pduel->write_buffer32(pcard->data.code); - pduel->write_buffer8(pcard->current.controler); - pduel->write_buffer8(pcard->current.location); - pduel->write_buffer8(pcard->current.sequence); - } - return FALSE; - } else { - if(returns.bvalue[0] == -1) - return TRUE; - uint8 seq[64]; - memset(seq, 0, 64); - for(uint32 i = 0; i < core.select_cards.size(); ++i) { - if(returns.bvalue[i] < 0 || returns.bvalue[i] >= (int32)core.select_cards.size() || seq[(int32)returns.bvalue[i]]) { - pduel->write_buffer8(MSG_RETRY); - return FALSE; - } - seq[(int32)returns.bvalue[i]] = 1; - } - return TRUE; - } - return TRUE; -} -int32 field::announce_race(int16 step, uint8 playerid, int32 count, int32 available) { - if(step == 0) { - int32 scount = 0; - for(int32 ft = 0x1; ft != 0x1000000; ft <<= 1) { - if(ft & available) - scount++; - } - if(scount <= count) { - count = scount; - core.units.begin()->arg1 = (count << 16) + playerid; - } - pduel->write_buffer8(MSG_ANNOUNCE_RACE); - pduel->write_buffer8(playerid); - pduel->write_buffer8(count); - pduel->write_buffer32(available); - return FALSE; - } else { - int32 rc = returns.ivalue[0]; - int32 sel = 0; - for(int32 ft = 0x1; ft != 0x1000000; ft <<= 1) { - if(!(ft & rc)) continue; - if(!(ft & available)) { - pduel->write_buffer8(MSG_RETRY); - return FALSE; - } - sel++; - } - if(sel != count) { - pduel->write_buffer8(MSG_RETRY); - return FALSE; - } - pduel->write_buffer8(MSG_HINT); - pduel->write_buffer8(HINT_RACE); - pduel->write_buffer8(playerid); - pduel->write_buffer32(returns.ivalue[0]); - return TRUE; - } - return TRUE; -} -int32 field::announce_attribute(int16 step, uint8 playerid, int32 count, int32 available) { - if(step == 0) { - int32 scount = 0; - for(int32 ft = 0x1; ft != 0x80; ft <<= 1) { - if(ft & available) - scount++; - } - if(scount <= count) { - count = scount; - core.units.begin()->arg1 = (count << 16) + playerid; - } - pduel->write_buffer8(MSG_ANNOUNCE_ATTRIB); - pduel->write_buffer8(playerid); - pduel->write_buffer8(count); - pduel->write_buffer32(available); - return FALSE; - } else { - int32 rc = returns.ivalue[0]; - int32 sel = 0; - for(int32 ft = 0x1; ft != 0x80; ft <<= 1) { - if(!(ft & rc)) continue; - if(!(ft & available)) { - pduel->write_buffer8(MSG_RETRY); - return FALSE; - } - sel++; - } - if(sel != count) { - pduel->write_buffer8(MSG_RETRY); - return FALSE; - } - pduel->write_buffer8(MSG_HINT); - pduel->write_buffer8(HINT_ATTRIB); - pduel->write_buffer8(playerid); - pduel->write_buffer32(returns.ivalue[0]); - return TRUE; - } - return TRUE; -} -int32 field::announce_card(int16 step, uint8 playerid) { - if(step == 0) { - pduel->write_buffer8(MSG_ANNOUNCE_CARD); - pduel->write_buffer8(playerid); - return FALSE; - } else { - pduel->write_buffer8(MSG_HINT); - pduel->write_buffer8(HINT_CODE); - pduel->write_buffer8(playerid); - pduel->write_buffer32(returns.ivalue[0]); - return TRUE; - } - return TRUE; -} -int32 field::announce_number(int16 step, uint8 playerid) { - if(step == 0) { - pduel->write_buffer8(MSG_ANNOUNCE_NUMBER); - pduel->write_buffer8(playerid); - pduel->write_buffer8(core.select_options.size()); - for(uint32 i = 0; i < core.select_options.size(); ++i) - pduel->write_buffer32(core.select_options[i]); - return FALSE; - } else { - int32 ret = returns.ivalue[0]; - if(ret < 0 || ret >= (int32)core.select_options.size() || ret >= 63) { - pduel->write_buffer8(MSG_RETRY); - return FALSE; - } - pduel->write_buffer8(MSG_HINT); - pduel->write_buffer8(HINT_NUMBER); - pduel->write_buffer8(playerid); - pduel->write_buffer32(core.select_options[returns.ivalue[0]]); - return TRUE; - } -} diff --git a/ocgcore/premake4.lua b/ocgcore/premake4.lua deleted file mode 100644 index 99f56b5ce8..0000000000 --- a/ocgcore/premake4.lua +++ /dev/null @@ -1,10 +0,0 @@ -project "ocgcore" - kind "StaticLib" - - files { "**.cc", "**.cpp", "**.c", "**.h" } - configuration "windows" - includedirs { ".." } - configuration "not vs*" - buildoptions { "-std=gnu++0x" } - configuration "not windows" - includedirs { "/usr/include/lua", "/usr/include/lua5.2", "/usr/include/lua/5.2" } diff --git a/ocgcore/processor.cpp b/ocgcore/processor.cpp deleted file mode 100644 index ea5bffd23b..0000000000 --- a/ocgcore/processor.cpp +++ /dev/null @@ -1,5323 +0,0 @@ -/* - * processor.cpp - * - * Created on: 2010-8-3 - * Author: Argon - */ - -#include "field.h" -#include "duel.h" -#include "card.h" -#include "group.h" -#include "effect.h" -#include "interpreter.h" -#include "ocgapi.h" -#include - -void field::add_process(uint16 type, uint16 step, effect* peffect, group* target, ptr arg1, ptr arg2) { - processor_unit new_unit; - new_unit.type = type; - new_unit.step = step; - new_unit.peffect = peffect; - new_unit.ptarget = target; - new_unit.arg1 = arg1; - new_unit.arg2 = arg2; - core.subunits.push_back(new_unit); -} -int32 field::process() { - if (core.subunits.size()) - core.units.splice(core.units.begin(), core.subunits); - if (core.units.size() == 0) - return PROCESSOR_END + pduel->bufferlen; - processor_list::iterator it = core.units.begin(); - switch (it->type) { - case PROCESSOR_ADJUST: { - if (adjust_step(it->step)) - core.units.pop_front(); - else { - it->step++; - } - return pduel->bufferlen; - } - case PROCESSOR_TURN: { - if (process_turn(it->step, it->arg1)) - core.units.pop_front(); - else - it->step++; - return pduel->bufferlen; - } - case PROCESSOR_WAIT: { - core.units.pop_front(); - return PROCESSOR_WAITING + pduel->bufferlen; - } - case PROCESSOR_REFRESH_LOC: { - if (refresh_location_info(it->step)) - core.units.pop_front(); - else - it->step++; - return pduel->bufferlen; - } - case PROCESSOR_SELECT_BATTLECMD: { - if (select_battle_command(it->step, it->arg1)) { - core.units.pop_front(); - return pduel->bufferlen; - } else { - it->step = 1; - return PROCESSOR_WAITING + pduel->bufferlen; - } - } - case PROCESSOR_SELECT_IDLECMD: { - if (select_idle_command(it->step, it->arg1)) { - core.units.pop_front(); - return pduel->bufferlen; - } else { - it->step = 1; - return PROCESSOR_WAITING + pduel->bufferlen; - } - } - case PROCESSOR_SELECT_EFFECTYN: { - if (select_effect_yes_no(it->step, it->arg1, (card*)it->ptarget)) { - core.units.pop_front(); - return pduel->bufferlen; - } else { - it->step = 1; - return PROCESSOR_WAITING + pduel->bufferlen; - } - } - case PROCESSOR_SELECT_YESNO: { - if (select_yes_no(it->step, it->arg1, it->arg2)) { - core.units.pop_front(); - return pduel->bufferlen; - } else { - it->step = 1; - return PROCESSOR_WAITING + pduel->bufferlen; - } - } - case PROCESSOR_SELECT_OPTION: { - if (select_option(it->step, it->arg1)) { - core.units.pop_front(); - return pduel->bufferlen; - } else { - it->step = 1; - return PROCESSOR_WAITING + pduel->bufferlen; - } - } - case PROCESSOR_SELECT_CARD: { - if (select_card(it->step, it->arg1 & 0xff, (it->arg1 >> 16) & 0xff, (it->arg2) & 0xff, (it->arg2 >> 16) & 0xff)) { - core.units.pop_front(); - return pduel->bufferlen; - } else { - it->step = 1; - return PROCESSOR_WAITING + pduel->bufferlen; - } - } - case PROCESSOR_SELECT_CHAIN: { - if (select_chain(it->step, it->arg1, (it->arg2 & 0xffff), it->arg2 >> 16)) { - core.units.pop_front(); - return pduel->bufferlen; - } else { - it->step = 1; - return PROCESSOR_WAITING + pduel->bufferlen; - } - } - case PROCESSOR_SELECT_DISFIELD: - case PROCESSOR_SELECT_PLACE: { - if (select_place(it->step, it->arg1 & 0xffff, it->arg2, (it->arg1 >> 16) & 0xffff)) { - core.units.pop_front(); - return pduel->bufferlen; - } else { - it->step = 1; - return PROCESSOR_WAITING + pduel->bufferlen; - } - } - case PROCESSOR_SELECT_POSITION: { - if (select_position(it->step, it->arg1 & 0xffff, it->arg2, (it->arg1 >> 16) & 0xffff)) { - core.units.pop_front(); - return pduel->bufferlen; - } else { - it->step = 1; - return PROCESSOR_WAITING + pduel->bufferlen; - } - } - case PROCESSOR_SELECT_TRIBUTE_P: { - if (select_tribute(it->step, it->arg1 & 0xff, (it->arg1 >> 16) & 0xff, (it->arg2) & 0xff, (it->arg2 >> 16) & 0xff)) { - core.units.pop_front(); - return pduel->bufferlen; - } else { - it->step = 1; - return PROCESSOR_WAITING + pduel->bufferlen; - } - } - case PROCESSOR_SORT_CHAIN: { - if (sort_chain(it->step, it->arg1)) { - core.units.pop_front(); - } else { - it->step++; - } - return pduel->bufferlen; - } - case PROCESSOR_SELECT_COUNTER: { - if (select_counter(it->step, it->arg1, (it->arg2) & 0xffff, (it->arg2 >> 16) & 0xffff)) { - core.units.pop_front(); - return pduel->bufferlen; - } else { - it->step = 1; - return PROCESSOR_WAITING + pduel->bufferlen; - } - } - case PROCESSOR_SELECT_SUM: { - if (select_with_sum_limit(it->step, it->arg2 & 0xffff, it->arg1, (it->arg2 >> 16) & 0xff, (it->arg2 >> 24) & 0xff)) { - core.units.pop_front(); - return pduel->bufferlen; - } else { - it->step = 1; - return PROCESSOR_WAITING + pduel->bufferlen; - } - } - case PROCESSOR_SORT_CARD: { - if (sort_card(it->step, it->arg1, it->arg2)) { - core.units.pop_front(); - return pduel->bufferlen; - } else { - it->step = 1; - return PROCESSOR_WAITING + pduel->bufferlen; - } - } - case PROCESSOR_SELECT_RELEASE: { - if (select_release_cards(it->step, it->arg1 & 0xff, (it->arg1 >> 16) & 0xff, (it->arg1 >> 24) & 0xff, (it->arg2) & 0xff, (it->arg2 >> 16) & 0xff)) - core.units.pop_front(); - else - it->step++; - return pduel->bufferlen; - } - case PROCESSOR_SELECT_TRIBUTE: { - if (select_tribute_cards(it->step, it->arg1 & 0xff, (it->arg1 >> 16) & 0xff, (it->arg2) & 0xff, (it->arg2 >> 16) & 0xff)) - core.units.pop_front(); - else - it->step++; - return pduel->bufferlen; - } - case PROCESSOR_POINT_EVENT: { - if(process_point_event(it->step, it->arg1 & 0xff, (it->arg1 >> 8) & 0xff, it->arg2)) - core.units.pop_front(); - else - it->step++; - return pduel->bufferlen; - } - case PROCESSOR_QUICK_EFFECT: { - if(process_quick_effect(it->step, it->arg1, it->arg2)) - core.units.pop_front(); - else - it->step++; - return pduel->bufferlen; - } - case PROCESSOR_IDLE_COMMAND: { - if(process_idle_command(it->step)) - core.units.pop_front(); - else - it->step++; - return pduel->bufferlen; - } - case PROCESSOR_PHASE_EVENT: { - if(process_phase_event(it->step, it->arg1)) - core.units.pop_front(); - else - it->step++; - return pduel->bufferlen; - } - case PROCESSOR_BATTLE_COMMAND: { - if(process_battle_command(it->step)) - core.units.pop_front(); - else - it->step++; - return pduel->bufferlen; - } - case PROCESSOR_DAMAGE_STEP: { - if(process_damage_step(it->step)) - core.units.pop_front(); - else - it->step++; - return pduel->bufferlen; - } - case PROCESSOR_ADD_CHAIN: { - if (add_chain(it->step)) - core.units.pop_front(); - else - it->step++; - return pduel->bufferlen; - } - case PROCESSOR_SOLVE_CHAIN: { - if (solve_chain(it->step, it->arg1, it->arg2)) - core.units.pop_front(); - else - it->step++; - return pduel->bufferlen; - } - case PROCESSOR_SOLVE_CONTINUOUS: { - if (solve_continuous(it->step, it->peffect, it->arg1)) - core.units.pop_front(); - else - it->step++; - return pduel->bufferlen; - } - case PROCESSOR_EXECUTE_COST: { - if (execute_cost(it->step, it->peffect, it->arg1)) { - core.units.pop_front(); - core.solving_event.pop_front(); - } else - it->step++; - return pduel->bufferlen; - } - case PROCESSOR_EXECUTE_OPERATION: { - if (execute_operation(it->step, it->peffect, it->arg1)) { - core.units.pop_front(); - core.solving_event.pop_front(); - } else - it->step++; - return pduel->bufferlen; - } - case PROCESSOR_EXECUTE_TARGET: { - if (execute_target(it->step, it->peffect, it->arg1)) { - core.units.pop_front(); - core.solving_event.pop_front(); - } else - it->step++; - return pduel->bufferlen; - } - case PROCESSOR_DESTROY: { - if (destroy(it->step, it->ptarget, it->peffect, it->arg1, it->arg2)) - core.units.pop_front(); - else - it->step++; - return pduel->bufferlen; - } - case PROCESSOR_RELEASE: { - if (release(it->step, it->ptarget, it->peffect, it->arg1, it->arg2)) - core.units.pop_front(); - else - it->step++; - return pduel->bufferlen; - } - case PROCESSOR_SENDTO: { - if (send_to(it->step, it->ptarget, it->peffect, it->arg1, it->arg2)) - core.units.pop_front(); - else - it->step++; - return pduel->bufferlen; - } - case PROCESSOR_DESTROY_STEP: { - if(destroy(it->step, it->ptarget, (card*)it->arg1, it->arg2)) - core.units.pop_front(); - else - it->step++; - return pduel->bufferlen; - } - case PROCESSOR_RELEASE_STEP: { - if (release(it->step, it->ptarget, (card*)it->arg1)) - core.units.pop_front(); - else - it->step++; - return pduel->bufferlen; - } - case PROCESSOR_SENDTO_STEP: { - if (send_to(it->step, it->ptarget, (card*)it->arg1)) - core.units.pop_front(); - else - it->step++; - return pduel->bufferlen; - } - case PROCESSOR_MOVETOFIELD: { - if (move_to_field(it->step, (card*)it->ptarget, it->arg1, it->arg2 & 0xff, (it->arg2 >> 8) & 0xff)) - core.units.pop_front(); - else - it->step++; - return pduel->bufferlen; - } - case PROCESSOR_CHANGEPOS: { - if (change_position(it->step, it->ptarget, it->peffect, it->arg1, it->arg2)) - core.units.pop_front(); - else - it->step++; - return pduel->bufferlen; - } - case PROCESSOR_OPERATION_REPLACE: { - if (operation_replace(it->step, it->peffect, it->ptarget, it->arg1, it->arg2)) - core.units.pop_front(); - else - it->step++; - return pduel->bufferlen; - } - case PROCESSOR_SUMMON_RULE: { - if (summon(it->step, it->arg1, (card*)it->ptarget, it->peffect, it->arg2 & 0xff, (it->arg2 >> 8) & 0xff)) - core.units.pop_front(); - else - it->step++; - return pduel->bufferlen; - } - case PROCESSOR_SPSUMMON_RULE: { - if (special_summon_rule(it->step, it->arg1, (card*)it->ptarget, it->arg2)) - core.units.pop_front(); - else - it->step++; - return pduel->bufferlen; - } - case PROCESSOR_SPSUMMON: { - if (special_summon(it->step, it->peffect, it->arg1, it->ptarget)) - core.units.pop_front(); - else - it->step++; - return pduel->bufferlen; - } - case PROCESSOR_FLIP_SUMMON: { - if (flip_summon(it->step, it->arg1, (card*)(it->ptarget))) - core.units.pop_front(); - else - it->step++; - return pduel->bufferlen; - } - case PROCESSOR_MSET: { - if (mset(it->step, it->arg1, (card*)(it->ptarget), it->peffect, it->arg2 & 0xff, (it->arg2 >> 8) & 0xff)) - core.units.pop_front(); - else - it->step++; - return pduel->bufferlen; - } - case PROCESSOR_SSET: { - if (sset(it->step, it->arg1, it->arg2, (card*)(it->ptarget))) - core.units.pop_front(); - else - it->step++; - return pduel->bufferlen; - } - case PROCESSOR_SPSUMMON_STEP: { - if (special_summon_step(it->step, it->ptarget, (card*)(it->arg2))) - core.units.pop_front(); - else - it->step++; - return pduel->bufferlen; - } - case PROCESSOR_SSET_G: { - if (sset_g(it->step, it->arg1, it->arg2, it->ptarget)) { - pduel->lua->add_param(returns.ivalue[0], PARAM_TYPE_INT); - core.units.pop_front(); - } else - it->step++; - return pduel->bufferlen; - } - case PROCESSOR_DRAW : { - if (draw(it->step, it->peffect, it->arg1, (it->arg2 >> 28) & 0xf, (it->arg2 >> 24) & 0xf, it->arg2 & 0xffffff)) - core.units.pop_front(); - else - it->step++; - return pduel->bufferlen; - } - case PROCESSOR_DAMAGE: { - int32 reason = it->arg1; - effect* peffect = 0; - card* pcard = 0; - if(reason & REASON_BATTLE) - pcard = (card*)it->peffect; - else - peffect = it->peffect; - if (damage(it->step, peffect, reason, (it->arg2 >> 28) & 0xf, pcard, (it->arg2 >> 24) & 0xf, it->arg2 & 0xffffff)) - core.units.pop_front(); - else - it->step++; - return pduel->bufferlen; - } - case PROCESSOR_RECOVER: { - if (recover(it->step, it->peffect, it->arg1, (it->arg2 >> 28) & 0xf, (it->arg2 >> 24) & 0xf, it->arg2 & 0xffffff)) - core.units.pop_front(); - else - it->step++; - return pduel->bufferlen; - } - case PROCESSOR_EQUIP: { - if (equip(it->step, it->arg2 & 0xffff, (card*)it->arg1, (card*)it->ptarget, (it->arg2 >> 16) & 0xff, (it->arg2 >> 24) & 0xff)) - core.units.pop_front(); - else - it->step++; - return pduel->bufferlen; - } - case PROCESSOR_GET_CONTROL: { - if (get_control(it->step, it->peffect, (it->arg2 >> 28) & 0xf, (card*)it->ptarget, (it->arg2 >> 24) & 0xf, (it->arg2 >> 8) & 0x3ff, it->arg2 & 0xff)) { - core.units.pop_front(); - } else - it->step++; - return pduel->bufferlen; - } - case PROCESSOR_SWAP_CONTROL: { - if (swap_control(it->step, it->peffect, (it->arg2 >> 28) & 0xf, (card*)it->ptarget, (card*)it->arg1, (it->arg2 >> 8) & 0x3ff, it->arg2 & 0xff)) { - core.units.pop_front(); - } else - it->step++; - return pduel->bufferlen; - } - case PROCESSOR_CONTROL_ADJUST: { - if (control_adjust(it->step)) { - core.units.pop_front(); - } else - it->step++; - return pduel->bufferlen; - } - case PROCESSOR_SELF_DESTROY: { - if (self_destroy(it->step)) { - core.units.pop_front(); - } else - it->step++; - return pduel->bufferlen; - } - case PROCESSOR_PAY_LPCOST: { - if (pay_lp_cost(it->step, it->arg1, it->arg2)) - core.units.pop_front(); - else - it->step++; - return pduel->bufferlen; - } - case PROCESSOR_REMOVE_COUNTER: { - if (remove_counter(it->step, (ptr)it->peffect, (card*)it->ptarget, (it->arg1 >> 16) & 0xff, (it->arg1 >> 8) & 0xff, it->arg1 & 0xff, it->arg2 & 0xffff, it->arg2 >> 16)) { - pduel->lua->add_param(returns.ivalue[0], PARAM_TYPE_BOOLEAN); - core.units.pop_front(); - } else - it->step++; - return pduel->bufferlen; - } - case PROCESSOR_ATTACK_DISABLE: { - if(it->step == 0) { - card* attacker = core.attacker; - if(!attacker - || (attacker->fieldid_r != core.pre_field[0]) - || (attacker->current.location != LOCATION_MZONE) - || !attacker->is_capable_attack() - || !attacker->is_affect_by_effect(core.reason_effect)) { - returns.ivalue[0] = 0; - pduel->lua->add_param(returns.ivalue[0], PARAM_TYPE_BOOLEAN); - core.units.pop_front(); - } else { - effect* peffect = pduel->new_effect(); - peffect->code = EFFECT_ATTACK_DISABLED; - peffect->type = EFFECT_TYPE_SINGLE; - attacker->add_effect(peffect); - attacker->set_status(STATUS_ATTACK_CANCELED, TRUE); - raise_event(attacker, EVENT_ATTACK_DISABLED, core.reason_effect, 0, core.reason_player, PLAYER_NONE, 0); - process_instant_event(); - it->step++; - } - } else { - returns.ivalue[0] = 1; - pduel->lua->add_param(returns.ivalue[0], PARAM_TYPE_BOOLEAN); - core.units.pop_front(); - } - return pduel->bufferlen; - } - case PROCESSOR_DESTROY_S: { - if(it->step == 0) { - add_process(PROCESSOR_DESTROY, 0, it->peffect, it->ptarget, it->arg1, it->arg2); - it->step++; - } else { - pduel->lua->add_param(returns.ivalue[0], PARAM_TYPE_INT); - core.units.pop_front(); - } - return pduel->bufferlen; - } - case PROCESSOR_RELEASE_S: { - if(it->step == 0) { - add_process(PROCESSOR_RELEASE, 0, it->peffect, it->ptarget, it->arg1, it->arg2); - it->step++; - } else { - pduel->lua->add_param(returns.ivalue[0], PARAM_TYPE_INT); - core.units.pop_front(); - } - return pduel->bufferlen; - } - case PROCESSOR_SENDTO_S: { - if(it->step == 0) { - add_process(PROCESSOR_SENDTO, 0, it->peffect, it->ptarget, it->arg1, it->arg2); - it->step++; - } else { - pduel->lua->add_param(returns.ivalue[0], PARAM_TYPE_INT); - core.units.pop_front(); - } - return pduel->bufferlen; - } - case PROCESSOR_CHANGEPOS_S: { - if(it->step == 0) { - add_process(PROCESSOR_CHANGEPOS, 0, it->peffect, it->ptarget, it->arg1, it->arg2); - it->step++; - } else { - pduel->lua->add_param(returns.ivalue[0], PARAM_TYPE_INT); - core.units.pop_front(); - } - return pduel->bufferlen; - } - case PROCESSOR_ANNOUNCE_RACE: { - if(announce_race(it->step, it->arg1 & 0xffff, it->arg1 >> 16, it->arg2)) { - pduel->lua->add_param(returns.ivalue[0], PARAM_TYPE_INT); - core.units.pop_front(); - } else { - it->step++; - } - return PROCESSOR_WAITING + pduel->bufferlen; - } - case PROCESSOR_ANNOUNCE_ATTRIB: { - if(announce_attribute(it->step, it->arg1 & 0xffff, it->arg1 >> 16, it->arg2)) { - pduel->lua->add_param(returns.ivalue[0], PARAM_TYPE_INT); - core.units.pop_front(); - } else { - it->step++; - } - return PROCESSOR_WAITING + pduel->bufferlen; - } - case PROCESSOR_ANNOUNCE_CARD: { - if(announce_card(it->step, it->arg1)) { - pduel->lua->add_param(returns.ivalue[0], PARAM_TYPE_INT); - core.units.pop_front(); - } else { - it->step++; - } - return PROCESSOR_WAITING + pduel->bufferlen; - } - case PROCESSOR_ANNOUNCE_NUMBER: { - if(announce_number(it->step, it->arg1)) { - pduel->lua->add_param(core.select_options[returns.ivalue[0]], PARAM_TYPE_INT); - pduel->lua->add_param(returns.ivalue[0], PARAM_TYPE_INT); - core.units.pop_front(); - } else { - it->step++; - } - return PROCESSOR_WAITING + pduel->bufferlen; - } - case PROCESSOR_TOSS_DICE: { - if(toss_dice(it->step, it->peffect, it->arg1 >> 16, it->arg1 & 0xff, it->arg2 & 0xff, it->arg2 >> 16)) { - for(int32 i = 0; i < (it->arg2 & 0xff) + (it->arg2 >> 16); ++i) - pduel->lua->add_param(core.dice_result[i], PARAM_TYPE_INT); - core.units.pop_front(); - } else - it->step++; - return pduel->bufferlen; - } - case PROCESSOR_TOSS_COIN: { - if (toss_coin(it->step, it->peffect, (it->arg1 >> 16), it->arg1 & 0xff, it->arg2)) { - for(int32 i = 0; i < it->arg2; ++i) - pduel->lua->add_param(core.coin_result[i], PARAM_TYPE_INT); - core.units.pop_front(); - } else - it->step++; - return pduel->bufferlen; - } - case PROCESSOR_SELECT_EFFECTYN_S: { - if(it->step == 0) { - add_process(PROCESSOR_SELECT_EFFECTYN, 0, it->peffect, it->ptarget, it->arg1, it->arg2); - it->step++; - } else { - pduel->lua->add_param(returns.ivalue[0], PARAM_TYPE_BOOLEAN); - core.units.pop_front(); - } - return pduel->bufferlen; - } - case PROCESSOR_SELECT_YESNO_S: { - if(it->step == 0) { - add_process(PROCESSOR_SELECT_YESNO, 0, it->peffect, it->ptarget, it->arg1, it->arg2); - it->step++; - } else { - pduel->lua->add_param(returns.ivalue[0], PARAM_TYPE_BOOLEAN); - core.units.pop_front(); - } - return pduel->bufferlen; - } - case PROCESSOR_SELECT_OPTION_S: { - if(it->step == 0) { - add_process(PROCESSOR_SELECT_OPTION, 0, it->peffect, it->ptarget, it->arg1, it->arg2); - it->step++; - } else { - pduel->lua->add_param(returns.ivalue[0], PARAM_TYPE_INT); - pduel->write_buffer8(MSG_HINT); - pduel->write_buffer8(HINT_OPSELECTED); - pduel->write_buffer8(it->arg1); - pduel->write_buffer32(core.select_options[returns.ivalue[0]]); - core.units.pop_front(); - } - return pduel->bufferlen; - } - case PROCESSOR_SELECT_CARD_S: { - if(it->step == 0) { - add_process(PROCESSOR_SELECT_CARD, 0, it->peffect, it->ptarget, it->arg1, it->arg2); - it->step++; - } else { - group* pgroup = pduel->new_group(); - card* pcard; - for(int32 i = 0; i < returns.bvalue[0]; ++i) { - pcard = core.select_cards[returns.bvalue[i + 1]]; - pgroup->container.insert(pcard); - } - pduel->lua->add_param(pgroup, PARAM_TYPE_GROUP); - core.units.pop_front(); - } - return pduel->bufferlen; - } - case PROCESSOR_SELECT_PLACE_S: - break; - case PROCESSOR_SELECT_POSITION_S: { - if(it->step == 0) { - add_process(PROCESSOR_SELECT_POSITION, 0, it->peffect, it->ptarget, it->arg1, it->arg2); - it->step++; - } else { - pduel->lua->add_param(returns.ivalue[0], PARAM_TYPE_INT); - core.units.pop_front(); - } - return pduel->bufferlen; - } - case PROCESSOR_SELECT_RELEASE_S: { - if(it->step == 0) { - add_process(PROCESSOR_SELECT_RELEASE, 0, it->peffect, it->ptarget, it->arg1, it->arg2); - it->step++; - } else { - group* pgroup = pduel->new_group(); - card* pcard; - for(int32 i = 0; i < returns.bvalue[0]; ++i) { - pcard = core.select_cards[returns.bvalue[i + 1]]; - pgroup->container.insert(pcard); - } - pduel->lua->add_param(pgroup, PARAM_TYPE_GROUP); - core.units.pop_front(); - } - return pduel->bufferlen; - } - case PROCESSOR_SELECT_TRIBUTE_S: { - if(it->step == 0) { - add_process(PROCESSOR_SELECT_TRIBUTE, 0, it->peffect, it->ptarget, it->arg1, it->arg2); - it->step++; - } else { - group* pgroup = pduel->new_group(); - card* pcard; - for(int32 i = 0; i < returns.bvalue[0]; ++i) { - pcard = core.select_cards[returns.bvalue[i + 1]]; - pgroup->container.insert(pcard); - } - pduel->lua->add_param(pgroup, PARAM_TYPE_GROUP); - core.units.pop_front(); - } - return pduel->bufferlen; - } - case PROCESSOR_SORT_CARDS_S: - core.units.pop_front(); - break; - case PROCESSOR_SELECT_TARGET: { - if(it->step == 0) { - add_process(PROCESSOR_SELECT_CARD, 0, it->peffect, it->ptarget, it->arg1, it->arg2); - it->step++; - } else { - if(core.continuous_chain.size()) { - if(!core.continuous_chain.rbegin()->target_cards) { - core.continuous_chain.rbegin()->target_cards = pduel->new_group(); - core.continuous_chain.rbegin()->target_cards->is_readonly = TRUE; - } - for(int32 i = 0; i < returns.bvalue[0]; ++i) - core.continuous_chain.rbegin()->target_cards->container.insert(core.select_cards[returns.bvalue[i + 1]]); - pduel->lua->add_param(core.continuous_chain.rbegin()->target_cards, PARAM_TYPE_GROUP); - } else if(core.current_chain.size()) { - effect* peffect = core.current_chain.rbegin()->triggering_effect; - if(!core.current_chain.rbegin()->target_cards) { - core.current_chain.rbegin()->target_cards = pduel->new_group(); - core.current_chain.rbegin()->target_cards->is_readonly = TRUE; - } - group* tg = core.current_chain.rbegin()->target_cards; - group* pret = pduel->new_group(); - for(int32 i = 0; i < returns.bvalue[0]; ++i) { - tg->container.insert(core.select_cards[returns.bvalue[i + 1]]); - pret->container.insert(core.select_cards[returns.bvalue[i + 1]]); - } - if((returns.bvalue[0] > 0) && (peffect->flag & EFFECT_FLAG_CARD_TARGET)) { - for(int32 i = 0; i < returns.bvalue[0]; ++i) { - card* pcard = core.select_cards[returns.bvalue[i + 1]]; - if(pcard->current.location & 0x30) - move_card(pcard->current.controler, pcard, pcard->current.location, 0); - pduel->write_buffer8(MSG_BECOME_TARGET); - pduel->write_buffer8(1); - pduel->write_buffer32(pcard->get_info_location()); - } - } - for(auto cit = pret->container.begin(); cit != pret->container.end(); ++cit) - (*cit)->create_relation(peffect); - pduel->lua->add_param(pret, PARAM_TYPE_GROUP); - } - core.units.pop_front(); - } - return pduel->bufferlen; - } - case PROCESSOR_SELECT_FUSION: { - if(it->step == 0) { - tevent e; - e.event_cards = it->ptarget; - e.reason_effect = it->peffect; - e.reason_player = it->arg1; - core.fusion_materials.clear(); - if(!it->peffect) { - core.units.pop_front(); - return pduel->bufferlen; - } - core.sub_solving_event.push_back(e); - pduel->lua->add_param(it->arg2, PARAM_TYPE_CARD); - pduel->lua->add_param(it->arg1 >> 16, PARAM_TYPE_INT); - add_process(PROCESSOR_EXECUTE_OPERATION, 0, it->peffect, 0, it->arg1 & 0xffff, 0); - it->step++; - } else { - group* pgroup = pduel->new_group(core.fusion_materials); - if(it->arg2) - pgroup->container.insert((card*)it->arg2); - pduel->lua->add_param(pgroup, PARAM_TYPE_GROUP); - core.units.pop_front(); - } - return pduel->bufferlen; - } - case PROCESSOR_SELECT_SYNCHRO: { - int32 ret = TRUE; - if(!(it->arg1 >> 16)) - ret = select_synchro_material(it->step, it->arg1 & 0xffff, (card*)it->ptarget, it->arg2 & 0xffff, it->arg2 >> 16, 0, (group*)it->peffect); - else - ret = select_synchro_material(it->step, it->arg1 & 0xffff, (card*)it->ptarget, it->arg2 & 0xffff, it->arg2 >> 16, (card*)it->peffect, 0); - if(ret) - core.units.pop_front(); - else - it->step++; - return pduel->bufferlen; - } - case PROCESSOR_SELECT_SUM_S: { - if(it->step == 0) { - add_process(PROCESSOR_SELECT_SUM, 0, it->peffect, it->ptarget, it->arg1, it->arg2); - it->step++; - } else { - group* pgroup = pduel->new_group(); - card* pcard; - for(int32 i = 0; i < returns.bvalue[0]; ++i) { - pcard = core.select_cards[returns.bvalue[i + 1]]; - pgroup->container.insert(pcard); - } - pduel->lua->add_param(pgroup, PARAM_TYPE_GROUP); - core.units.pop_front(); - } - return pduel->bufferlen; - } - case PROCESSOR_SELECT_DISFIELD_S: { - if(it->step == 0) { - add_process(PROCESSOR_SELECT_DISFIELD, 0, it->peffect, it->ptarget, it->arg1, it->arg2); - it->step++; - } else { - int32 playerid = it->arg1 & 0xffff; - int32 count = (it->arg1) >> 16; - int32 dfflag = 0; - uint8 p, l, s, pa = 0; - for(int32 i = 0; i < count; ++i) { - p = returns.bvalue[pa]; - l = returns.bvalue[pa + 1]; - s = returns.bvalue[pa + 2]; - dfflag |= 1 << (s + (p == playerid ? 0 : 16) + (l == LOCATION_MZONE ? 0 : 8)); - pa += 3; - } - pduel->lua->add_param(dfflag, PARAM_TYPE_INT); - core.units.pop_front(); - } - return pduel->bufferlen; - } - case PROCESSOR_SPSUMMON_S: { - if(it->step == 0) { - add_process(PROCESSOR_SPSUMMON, 0, it->peffect, it->ptarget, it->arg1, it->arg2); - it->step++; - } else { - pduel->lua->add_param(returns.ivalue[0], PARAM_TYPE_INT); - core.units.pop_front(); - } - return pduel->bufferlen; - } - case PROCESSOR_SPSUMMON_STEP_S: { - if(it->step == 0) { - add_process(PROCESSOR_SPSUMMON_STEP, 0, it->peffect, it->ptarget, it->arg1, it->arg2); - it->step++; - } else { - pduel->lua->add_param(returns.ivalue[0], PARAM_TYPE_BOOLEAN); - core.units.pop_front(); - } - return pduel->bufferlen; - } - case PROCESSOR_SPSUMMON_COMP_S: { - if(it->step == 0) { - add_process(PROCESSOR_SPSUMMON, 1, it->peffect, it->ptarget, it->arg1, it->arg2); - it->step++; - } else { - pduel->lua->add_param(returns.ivalue[0], PARAM_TYPE_INT); - core.units.pop_front(); - } - return pduel->bufferlen; - } - case PROCESSOR_RANDOM_SELECT_S: { - uint32 count = it->arg2; - group* pgroup = it->ptarget; - group* newgroup = pduel->new_group(); - if(count > pgroup->container.size()) - count = pgroup->container.size(); - if(count == 0) { - pduel->lua->add_param(newgroup, PARAM_TYPE_GROUP); - core.units.pop_front(); - return pduel->bufferlen; - } - duel* pduel = pgroup->pduel; - if(count == pgroup->container.size()) - newgroup->container = pgroup->container; - else { - while(newgroup->container.size() < count) { - int32 i = pduel->get_next_integer(0, pgroup->container.size() - 1); - auto cit = pgroup->container.begin(); - std::advance(cit, i); - newgroup->container.insert(*cit); - } - } - pduel->lua->add_param(newgroup, PARAM_TYPE_GROUP); - pduel->write_buffer8(MSG_RANDOM_SELECTED); - pduel->write_buffer8(it->arg1); - pduel->write_buffer8(count); - for(auto cit = newgroup->container.begin(); cit != newgroup->container.end(); ++cit) { - pduel->write_buffer32((*cit)->get_info_location()); - } - core.units.pop_front(); - return pduel->bufferlen; - } - case PROCESSOR_SELECT_XMATERIAL: { - if (select_xyz_material(it->step, it->arg1 & 0xffff, it->arg1 >> 16, (card*)it->ptarget, it->arg2 & 0xffff, it->arg2 >> 16)) - core.units.pop_front(); - else - it->step++; - return pduel->bufferlen; - } - case PROCESSOR_DRAW_S: { - if(it->step == 0) { - add_process(PROCESSOR_DRAW, 0, it->peffect, it->ptarget, it->arg1, it->arg2); - it->step++; - } else { - pduel->lua->add_param(returns.ivalue[0], PARAM_TYPE_INT); - core.units.pop_front(); - } - return pduel->bufferlen; - } - case PROCESSOR_DAMAGE_S: { - if(it->step == 0) { - add_process(PROCESSOR_DAMAGE, 0, it->peffect, it->ptarget, it->arg1, it->arg2); - it->step++; - } else { - pduel->lua->add_param(returns.ivalue[0], PARAM_TYPE_INT); - core.units.pop_front(); - } - return pduel->bufferlen; - } - case PROCESSOR_RECOVER_S: { - if(it->step == 0) { - add_process(PROCESSOR_RECOVER, 0, it->peffect, it->ptarget, it->arg1, it->arg2); - it->step++; - } else { - pduel->lua->add_param(returns.ivalue[0], PARAM_TYPE_INT); - core.units.pop_front(); - } - return pduel->bufferlen; - } - case PROCESSOR_EQUIP_S: { - if(it->step == 0) { - add_process(PROCESSOR_EQUIP, 0, it->peffect, it->ptarget, it->arg1, it->arg2); - it->step++; - } else { - pduel->lua->add_param(returns.ivalue[0], PARAM_TYPE_BOOLEAN); - core.units.pop_front(); - } - return pduel->bufferlen; - } - case PROCESSOR_GET_CONTROL_S: { - if(it->step == 0) { - add_process(PROCESSOR_GET_CONTROL, 0, it->peffect, it->ptarget, it->arg1, it->arg2); - it->step++; - } else { - pduel->lua->add_param(returns.ivalue[0], PARAM_TYPE_BOOLEAN); - core.units.pop_front(); - } - return pduel->bufferlen; - } - case PROCESSOR_SWAP_CONTROL_S: { - if(it->step == 0) { - add_process(PROCESSOR_SWAP_CONTROL, 0, it->peffect, it->ptarget, it->arg1, it->arg2); - it->step++; - } else { - pduel->lua->add_param(returns.ivalue[0], PARAM_TYPE_BOOLEAN); - core.units.pop_front(); - } - return pduel->bufferlen; - } - case PROCESSOR_DISCARD_HAND_S: { - if(it->step == 0) { - pduel->write_buffer8(MSG_HINT); - pduel->write_buffer8(HINT_SELECTMSG); - pduel->write_buffer8(it->arg1); - if(((ptr)it->ptarget) & REASON_DISCARD) - pduel->write_buffer32(501); - else - pduel->write_buffer32(504); - add_process(PROCESSOR_SELECT_CARD, 0, 0, 0, it->arg1, it->arg2); - it->step++; - } else if(it->step == 1) { - card_set cset; - card* pcard; - for(int32 i = 0; i < returns.bvalue[0]; ++i) { - pcard = core.select_cards[returns.bvalue[i + 1]]; - cset.insert(pcard); - } - if(cset.size()) - send_to(&cset, core.reason_effect, (ptr)(it->ptarget), core.reason_player, it->arg1, LOCATION_GRAVE, 0, POS_FACEUP); - else - returns.ivalue[0] = 0; - it->step++; - } else { - pduel->lua->add_param(returns.ivalue[0], PARAM_TYPE_INT); - core.units.pop_front(); - } - return pduel->bufferlen; - } - case PROCESSOR_DISCARD_DECK_S: { - if(discard_deck(it->step, it->arg1 & 0xff, it->arg1 >> 16, it->arg2)) { - pduel->lua->add_param(returns.ivalue[0], PARAM_TYPE_INT); - core.units.pop_front(); - } else { - it->step++; - } - return pduel->bufferlen; - } - case PROCESSOR_SORT_DECK_S: { - uint8 sort_player = it->arg1 & 0xffff; - uint8 target_player = it->arg1 >> 16; - uint8 count = it->arg2, i = 0; - if(count > player[target_player].list_main.size()) - count = player[target_player].list_main.size(); - if(it->step == 0) { - core.select_cards.clear(); - for(auto clit = player[target_player].list_main.rbegin(); i < count; ++i, ++clit) - core.select_cards.push_back(*clit); - add_process(PROCESSOR_SORT_CARD, 0, 0, 0, sort_player, 0); - it->step++; - } else { - if(returns.bvalue[0] != -1) { - card* tc[16]; - for(i = 0; i < count; ++i) - player[target_player].list_main.pop_back(); - for(i = 0; i < count; ++i) - tc[(int32)returns.bvalue[i]] = core.select_cards[i]; - for(i = 0; i < count; ++i) { - player[target_player].list_main.push_back(tc[count - i - 1]); - tc[count - i - 1]->current.sequence = player[target_player].list_main.size() - 1; - } - } - if(core.global_flag & GLOBALFLAG_DECK_REVERSE_CHECK) { - if(count > 0) { - card* ptop = player[target_player].list_main.back(); - if(core.deck_reversed || (ptop->current.position == POS_FACEUP_DEFENCE)) { - pduel->write_buffer8(MSG_DECK_TOP); - pduel->write_buffer8(target_player); - pduel->write_buffer8(0); - if(ptop->current.position != POS_FACEUP_DEFENCE) - pduel->write_buffer32(ptop->data.code); - else - pduel->write_buffer32(ptop->data.code | 0x80000000); - } - } - } - core.units.pop_front(); - } - return pduel->bufferlen; - } - case PROCESSOR_REMOVEOL_S: { - if(remove_overlay_card(it->step, (ptr)(it->peffect), (card*)(it->ptarget), it->arg1 >> 16, - (it->arg1 >> 8) & 0xff, it->arg1 & 0xff, it->arg2 & 0xffff, it->arg2 >> 16)) { - pduel->lua->add_param(returns.ivalue[0], PARAM_TYPE_BOOLEAN); - core.units.pop_front(); - } else { - it->step++; - } - return pduel->bufferlen; - } - case PROCESSOR_MOVETOFIELD_S: { - if (move_to_field(it->step, (card*)it->ptarget, it->arg1, it->arg2 & 0xff, (it->arg2 >> 8) & 0xff)) { - pduel->lua->add_param(returns.ivalue[0], PARAM_TYPE_BOOLEAN); - core.units.pop_front(); - } else - it->step++; - return pduel->bufferlen; - } - } - return pduel->bufferlen; -} -int32 field::execute_cost(uint16 step, effect * triggering_effect, uint8 triggering_player) { - if(!triggering_effect->cost) { - core.solving_event.splice(core.solving_event.begin(), core.sub_solving_event); - pduel->lua->params.clear(); - return TRUE; - } - if (step == 0) { - core.solving_event.splice(core.solving_event.begin(), core.sub_solving_event); - const tevent& e = core.solving_event.front(); - pduel->lua->add_param(1, PARAM_TYPE_INT, true); - pduel->lua->add_param(e.reason_player, PARAM_TYPE_INT, true); - pduel->lua->add_param(e.reason, PARAM_TYPE_INT, true); - pduel->lua->add_param(e.reason_effect , PARAM_TYPE_EFFECT, true); - pduel->lua->add_param(e.event_value, PARAM_TYPE_INT, true); - pduel->lua->add_param(e.event_player, PARAM_TYPE_INT, true); - pduel->lua->add_param(e.event_cards , PARAM_TYPE_GROUP, true); - pduel->lua->add_param(triggering_player, PARAM_TYPE_INT, true); - pduel->lua->add_param(triggering_effect, PARAM_TYPE_EFFECT, true); - if(core.check_level == 0) { - core.shuffle_deck_check[0] = FALSE; - core.shuffle_deck_check[1] = FALSE; - core.shuffle_hand_check[0] = FALSE; - core.shuffle_hand_check[1] = FALSE; - } - core.shuffle_check_disabled = FALSE; - core.check_level++; - } - core.reason_effect = triggering_effect; - core.reason_player = triggering_player; - uint32 count = pduel->lua->params.size(); - uint32 yield_value = 0; - int32 result = pduel->lua->call_coroutine(triggering_effect->cost, count, &yield_value, step); - returns.ivalue[0] = yield_value; - if (result == COROUTINE_FINISH || result == COROUTINE_ERROR || result == OPERATION_FAIL) { - core.reason_effect = 0; - core.reason_player = PLAYER_NONE; - core.check_level--; - if(core.check_level == 0) { - if(core.shuffle_hand_check[0]) - shuffle(0, LOCATION_HAND); - if(core.shuffle_hand_check[1]) - shuffle(1, LOCATION_HAND); - if(core.shuffle_deck_check[0]) - shuffle(0, LOCATION_DECK); - if(core.shuffle_deck_check[1]) - shuffle(1, LOCATION_DECK); - } - core.shuffle_check_disabled = FALSE; - return TRUE; - } - return FALSE; -} -int32 field::execute_operation(uint16 step, effect * triggering_effect, uint8 triggering_player) { - if(!triggering_effect->operation) { - core.solving_event.splice(core.solving_event.begin(), core.sub_solving_event); - pduel->lua->params.clear(); - return TRUE; - } - if (step == 0) { - core.solving_event.splice(core.solving_event.begin(), core.sub_solving_event); - const tevent& e = core.solving_event.front(); - pduel->lua->add_param(e.reason_player, PARAM_TYPE_INT, true); - pduel->lua->add_param(e.reason, PARAM_TYPE_INT, true); - pduel->lua->add_param(e.reason_effect , PARAM_TYPE_EFFECT, true); - pduel->lua->add_param(e.event_value, PARAM_TYPE_INT, true); - pduel->lua->add_param(e.event_player, PARAM_TYPE_INT, true); - pduel->lua->add_param(e.event_cards , PARAM_TYPE_GROUP, true); - pduel->lua->add_param(triggering_player, PARAM_TYPE_INT, true); - pduel->lua->add_param(triggering_effect, PARAM_TYPE_EFFECT, true); - if(core.check_level == 0) { - core.shuffle_deck_check[0] = FALSE; - core.shuffle_deck_check[1] = FALSE; - core.shuffle_hand_check[0] = FALSE; - core.shuffle_hand_check[1] = FALSE; - } - core.shuffle_check_disabled = FALSE; - core.check_level++; - } - core.reason_effect = triggering_effect; - core.reason_player = triggering_player; - uint32 count = pduel->lua->params.size(); - uint32 yield_value = 0; - int32 result = pduel->lua->call_coroutine(triggering_effect->operation, count, &yield_value, step); - returns.ivalue[0] = yield_value; - if (result == COROUTINE_FINISH || result == COROUTINE_ERROR || result == OPERATION_FAIL) { - core.reason_effect = 0; - core.reason_player = PLAYER_NONE; - core.check_level--; - if(core.check_level == 0) { - if(core.shuffle_hand_check[0]) - shuffle(0, LOCATION_HAND); - if(core.shuffle_hand_check[1]) - shuffle(1, LOCATION_HAND); - if(core.shuffle_deck_check[0]) - shuffle(0, LOCATION_DECK); - if(core.shuffle_deck_check[1]) - shuffle(1, LOCATION_DECK); - cost[0].count = 0; - cost[1].count = 0; - cost[0].amount = 0; - cost[1].amount = 0; - } - core.shuffle_check_disabled = FALSE; - return TRUE; - } - return FALSE; -} -int32 field::execute_target(uint16 step, effect * triggering_effect, uint8 triggering_player) { - if(!triggering_effect->target) { - core.solving_event.splice(core.solving_event.begin(), core.sub_solving_event); - pduel->lua->params.clear(); - return TRUE; - } - if (step == 0) { - core.solving_event.splice(core.solving_event.begin(), core.sub_solving_event); - const tevent& e = core.solving_event.front(); - pduel->lua->add_param(1, PARAM_TYPE_INT, true); - pduel->lua->add_param(e.reason_player, PARAM_TYPE_INT, true); - pduel->lua->add_param(e.reason, PARAM_TYPE_INT, true); - pduel->lua->add_param(e.reason_effect , PARAM_TYPE_EFFECT, true); - pduel->lua->add_param(e.event_value, PARAM_TYPE_INT, true); - pduel->lua->add_param(e.event_player, PARAM_TYPE_INT, true); - pduel->lua->add_param(e.event_cards , PARAM_TYPE_GROUP, true); - pduel->lua->add_param(triggering_player, PARAM_TYPE_INT, true); - pduel->lua->add_param(triggering_effect, PARAM_TYPE_EFFECT, true); - if(core.check_level == 0) { - core.shuffle_deck_check[0] = FALSE; - core.shuffle_deck_check[1] = FALSE; - core.shuffle_hand_check[0] = FALSE; - core.shuffle_hand_check[1] = FALSE; - } - core.shuffle_check_disabled = FALSE; - core.check_level++; - } - core.reason_effect = triggering_effect; - core.reason_player = triggering_player; - uint32 count = pduel->lua->params.size(); - uint32 yield_value = 0; - int32 result = pduel->lua->call_coroutine(triggering_effect->target, count, &yield_value, step); - returns.ivalue[0] = yield_value; - if (result == COROUTINE_FINISH || result == COROUTINE_ERROR || result == OPERATION_FAIL) { - core.reason_effect = 0; - core.reason_player = PLAYER_NONE; - core.check_level--; - if(core.check_level == 0) { - if(core.shuffle_hand_check[0]) - shuffle(0, LOCATION_HAND); - if(core.shuffle_hand_check[1]) - shuffle(1, LOCATION_HAND); - if(core.shuffle_deck_check[0]) - shuffle(0, LOCATION_DECK); - if(core.shuffle_deck_check[1]) - shuffle(1, LOCATION_DECK); - } - core.shuffle_check_disabled = FALSE; - return TRUE; - } - return FALSE; -} -void field::raise_event(card* event_card, uint32 event_code, effect* reason_effect, uint32 reason, uint8 reason_player, uint8 event_player, uint32 event_value) { - tevent new_event; - new_event.trigger_card = 0; - if (event_card) { - group* pgroup = pduel->new_group(event_card); - pgroup->is_readonly = TRUE; - new_event.event_cards = pgroup; - } else - new_event.event_cards = 0; - new_event.event_code = event_code; - new_event.reason_effect = reason_effect; - new_event.reason = reason; - new_event.reason_player = reason_player; - new_event.event_player = event_player; - new_event.event_value = event_value; - core.queue_event.push_back(new_event); -} -void field::raise_event(card_set* event_cards, uint32 event_code, effect* reason_effect, uint32 reason, uint8 reason_player, uint8 event_player, uint32 event_value) { - tevent new_event; - new_event.trigger_card = 0; - if (event_cards) { - group* pgroup = pduel->new_group(*event_cards); - pgroup->is_readonly = TRUE; - new_event.event_cards = pgroup; - } else - new_event.event_cards = 0; - new_event.event_code = event_code; - new_event.reason_effect = reason_effect; - new_event.reason = reason; - new_event.reason_player = reason_player; - new_event.event_player = event_player; - new_event.event_value = event_value; - core.queue_event.push_back(new_event); -} -void field::raise_single_event(card* trigger_card, card_set* event_cards, uint32 event_code, effect * reason_effect, uint32 reason, uint8 reason_player, uint8 event_player, uint32 event_value) { - tevent new_event; - new_event.trigger_card = trigger_card; - if (event_cards) { - group* pgroup = pduel->new_group(*event_cards); - pgroup->is_readonly = TRUE; - new_event.event_cards = pgroup; - } else - new_event.event_cards = 0; - new_event.event_code = event_code; - new_event.reason_effect = reason_effect; - new_event.reason = reason; - new_event.reason_player = reason_player; - new_event.event_player = event_player; - new_event.event_value = event_value; - core.single_event.push_back(new_event); -} -int32 field::check_event(uint32 code, tevent * pe) { - for(auto eit = core.point_event.begin(); eit != core.point_event.end(); ++eit) { - if(eit->event_code == code) { - if(pe) - *pe = *eit; - return TRUE; - } - } - for(auto eit = core.instant_event.begin(); eit != core.instant_event.end(); ++eit) { - if(eit->event_code == code) { - if(pe) - *pe = *eit; - return TRUE; - } - } - return FALSE; -} -int32 field::check_event_c(effect* peffect, uint8 playerid, int32 neglect_con, int32 neglect_cost, int32 copy_info, tevent* pe) { - if(peffect->code == EVENT_FREE_CHAIN) { - return peffect->is_activate_ready(playerid, nil_event, neglect_con, neglect_cost, FALSE); - } - for(auto eit = core.point_event.begin(); eit != core.point_event.end(); ++eit) { - if(eit->event_code == peffect->code && - peffect->is_activate_ready(playerid, *eit, neglect_con, neglect_cost, FALSE)) { - if(pe) - *pe = *eit; - if(copy_info && !pduel->lua->no_action && core.current_chain.size()) { - core.current_chain.back().evt = *eit; - } - return TRUE; - } - } - for(auto eit = core.instant_event.begin(); eit != core.instant_event.end(); ++eit) { - if(eit->event_code == peffect->code && - peffect->is_activate_ready(playerid, *eit, neglect_con, neglect_cost, FALSE)) { - if(pe) - *pe = *eit; - if(copy_info && !pduel->lua->no_action && core.current_chain.size()) { - core.current_chain.back().evt = *eit; - } - return TRUE; - } - } - return FALSE; -} -int32 field::check_hint_timing(effect* peffect) { - int32 p = peffect->get_handler_player(); - if(p == 0) - return (peffect->hint_timing[0] & core.hint_timing[0]) || (peffect->hint_timing[1] & core.hint_timing[1]); - else - return (peffect->hint_timing[0] & core.hint_timing[1]) || (peffect->hint_timing[1] & core.hint_timing[0]); -} -int32 field::process_phase_event(int16 step, int32 phase) { - switch(step) { - case 0: { - if((phase == PHASE_DRAW && is_player_affected_by_effect(infos.turn_player, EFFECT_SKIP_DP)) - || (phase == PHASE_STANDBY && is_player_affected_by_effect(infos.turn_player, EFFECT_SKIP_SP))) { - core.units.begin()->step = 24; - return FALSE; - } - int32 phase_event = EVENT_PHASE + phase; - effect* peffect; - nil_event.event_code = phase_event; - nil_event.event_player = infos.turn_player; - int32 check_player = infos.turn_player; - if(core.units.begin()->arg2 & 0x2) - check_player = 1 - infos.turn_player; - chain newchain; - core.select_chains.clear(); - int32 tf_count = 0, to_count = 0, fc_count = 0, cn_count = 0; - auto pr = effects.trigger_f_effect.equal_range(phase_event); - for(; pr.first != pr.second; ++pr.first) { - peffect = pr.first->second; - peffect->s_range = peffect->handler->current.location; - peffect->o_range = peffect->handler->current.sequence; - if(!peffect->is_activateable(check_player, nil_event)) - continue; - peffect->id = infos.field_id++; - newchain.triggering_effect = peffect; - core.select_chains.push_back(newchain); - tf_count++; - } - pr = effects.continuous_effect.equal_range(phase_event); - for(; pr.first != pr.second;) { - peffect = pr.first->second; - ++pr.first; - if(peffect->get_handler_player() != check_player || !peffect->is_activateable(check_player, nil_event)) - continue; - peffect->id = infos.field_id++; - newchain.triggering_effect = peffect; - core.select_chains.push_back(newchain); - cn_count++; - } - for(auto eit = effects.pheff.begin(); eit != effects.pheff.end(); ++eit) { - peffect = *eit; - if(peffect->code != EFFECT_SET_CONTROL) - continue; - if(peffect->get_owner_player() != check_player) - continue; - if(!(peffect->reset_flag & phase)) - continue; - uint8 pid = peffect->get_handler_player(); - uint8 tp = infos.turn_player; - if(!(((peffect->reset_flag & RESET_SELF_TURN) && pid == tp) || ((peffect->reset_flag & RESET_OPPO_TURN) && pid != tp))) - continue; - if((peffect->reset_count & 0xff) != 1) - continue; - newchain.triggering_effect = peffect; - core.select_chains.push_back(newchain); - cn_count++; - } - core.spe_effect[check_player] = 0; - if(!core.hand_adjusted) { - pr = effects.trigger_o_effect.equal_range(phase_event); - for(; pr.first != pr.second; ++pr.first) { - peffect = pr.first->second; - peffect->s_range = peffect->handler->current.location; - peffect->o_range = peffect->handler->current.sequence; - if(!peffect->is_activateable(check_player, nil_event)) - continue; - peffect->id = infos.field_id++; - newchain.triggering_effect = peffect; - core.select_chains.push_back(newchain); - to_count++; - core.spe_effect[check_player]++; - } - if(phase == PHASE_DRAW) - core.hint_timing[infos.turn_player] = TIMING_DRAW_PHASE; - else if(phase == PHASE_STANDBY) - core.hint_timing[infos.turn_player] = TIMING_STANDBY_PHASE; - else if(phase == PHASE_BATTLE) - core.hint_timing[infos.turn_player] = TIMING_BATTLE_END; - else core.hint_timing[infos.turn_player] = TIMING_END_PHASE; - pr = effects.activate_effect.equal_range(EVENT_FREE_CHAIN); - for(; pr.first != pr.second; ++pr.first) { - peffect = pr.first->second; - peffect->s_range = peffect->handler->current.location; - peffect->o_range = peffect->handler->current.sequence; - if(!peffect->is_chainable(check_player) || !peffect->is_activateable(check_player, nil_event)) - continue; - peffect->id = infos.field_id++; - newchain.triggering_effect = peffect; - if(check_hint_timing(peffect)) - core.spe_effect[check_player]++; - core.select_chains.push_back(newchain); - fc_count++; - } - pr = effects.quick_o_effect.equal_range(EVENT_FREE_CHAIN); - for(; pr.first != pr.second; ++pr.first) { - peffect = pr.first->second; - peffect->s_range = peffect->handler->current.location; - peffect->o_range = peffect->handler->current.sequence; - if(!peffect->is_chainable(check_player) || !peffect->is_activateable(check_player, nil_event)) - continue; - peffect->id = infos.field_id++; - newchain.triggering_effect = peffect; - if(check_hint_timing(peffect)) - core.spe_effect[check_player]++; - core.select_chains.push_back(newchain); - fc_count++; - } - } - if(core.select_chains.size() == 0) { - returns.ivalue[0] = -1; - core.units.begin()->step = 1; - return FALSE; - } else if(tf_count == 0 && cn_count == 1 && to_count == 0 && fc_count == 0) { - returns.ivalue[0] = 0; - core.units.begin()->step = 1; - return FALSE; - } else if(tf_count == 0 && to_count == 1 && fc_count == 0 && cn_count == 0) { - add_process(PROCESSOR_SELECT_EFFECTYN, 0, 0, (group*)core.select_chains[0].triggering_effect->handler, check_player, 0); - return FALSE; - } else { - pduel->write_buffer8(MSG_HINT); - pduel->write_buffer8(HINT_EVENT); - pduel->write_buffer8(check_player); - if(infos.phase == PHASE_DRAW) - pduel->write_buffer32(20); - else if(infos.phase == PHASE_STANDBY) - pduel->write_buffer32(21); - else if(infos.phase == PHASE_BATTLE) - pduel->write_buffer32(25); - else - pduel->write_buffer32(26); - add_process(PROCESSOR_SELECT_CHAIN, 0, 0, 0, check_player, core.spe_effect[check_player] | (tf_count + cn_count ? 0x10000 : 0)); - core.units.begin()->step = 1; - return FALSE; - } - return FALSE; - } - case 1: { - returns.ivalue[0]--; - return FALSE; - } - case 2: { - int32 priority_passed = core.units.begin()->arg2 & 0x1; - int32 is_opponent = core.units.begin()->arg2 & 0x2; - if(returns.ivalue[0] == -1) { - if(priority_passed) - core.units.begin()->step = 19; - else { - priority_passed = 1; - is_opponent ^= 0x2; - core.units.begin()->arg2 = is_opponent | priority_passed; - core.units.begin()->step = -1; - } - return FALSE; - } - priority_passed = 0; - core.units.begin()->arg2 = is_opponent | priority_passed; - chain newchain = core.select_chains[returns.ivalue[0]]; - effect* peffect = newchain.triggering_effect; - if(!(peffect->type & EFFECT_TYPE_ACTIONS)) { - if(peffect->flag & EFFECT_FLAG_FIELD_ONLY) - remove_effect(peffect); - else - peffect->handler->remove_effect(peffect); - adjust_all(); - core.units.begin()->step = 3; - } else if(!(peffect->type & EFFECT_TYPE_CONTINUOUS)) { - int32 check_player = infos.turn_player; - if(is_opponent) - check_player = 1 - infos.turn_player; - newchain.flag = 0; - newchain.chain_id = infos.field_id++; - newchain.evt = nil_event; - newchain.triggering_controler = peffect->handler->current.controler; - newchain.triggering_location = peffect->handler->current.location; - newchain.triggering_sequence = peffect->handler->current.sequence; - newchain.triggering_player = check_player; - core.new_chains.push_back(newchain); - peffect->handler->set_status(STATUS_CHAINING, TRUE); - peffect->dec_count(check_player); - core.select_chains.clear(); - add_process(PROCESSOR_ADD_CHAIN, 0, 0, 0, 0, 0); - add_process(PROCESSOR_QUICK_EFFECT, 0, 0, 0, FALSE, 1 - check_player); - infos.priorities[0] = 0; - infos.priorities[1] = 0; - } else { - core.select_chains.clear(); - core.sub_solving_event.push_back(nil_event); - add_process(PROCESSOR_SOLVE_CONTINUOUS, 0, peffect, 0, peffect->get_handler_player(), 0); - core.units.begin()->step = 3; - } - return FALSE; - } - case 3: { - if(core.chain_limit) { - luaL_unref(pduel->lua->lua_state, LUA_REGISTRYINDEX, core.chain_limit); - core.chain_limit = 0; - } - for(auto cait = core.current_chain.begin(); cait != core.current_chain.end(); ++cait) - cait->triggering_effect->handler->set_status(STATUS_CHAINING, FALSE); - add_process(PROCESSOR_SOLVE_CHAIN, 0, 0, 0, FALSE, 0); - core.units.begin()->step = -1; - return FALSE; - } - case 4: { - add_process(PROCESSOR_POINT_EVENT, 0, 0, 0, 0, 0); - core.units.begin()->step = -1; - return FALSE; - } - case 20: { - if(phase != PHASE_END) { - core.units.begin()->step = 24; - return FALSE; - } - int32 limit = 6; - effect_set eset; - filter_player_effect(infos.turn_player, EFFECT_HAND_LIMIT, &eset); - if(eset.size()) - limit = eset.get_last()->get_value(); - int32 hd = player[infos.turn_player].list_hand.size(); - if(hd <= limit) { - core.units.begin()->step = 24; - return FALSE; - } - core.select_cards.clear(); - for(auto cit = player[infos.turn_player].list_hand.begin(); cit != player[infos.turn_player].list_hand.end(); ++cit) - core.select_cards.push_back(*cit); - pduel->write_buffer8(MSG_HINT); - pduel->write_buffer8(HINT_SELECTMSG); - pduel->write_buffer8(infos.turn_player); - pduel->write_buffer32(501); - add_process(PROCESSOR_SELECT_CARD, 0, 0, 0, infos.turn_player, hd - limit + ((hd - limit) << 16)); - return FALSE; - } - case 21: { - card_set cset; - for(int32 i = 0; i < returns.bvalue[0]; ++i) - cset.insert(core.select_cards[returns.bvalue[i + 1]]); - send_to(&cset, 0, REASON_RULE + REASON_DISCARD + REASON_ADJUST, infos.turn_player, PLAYER_NONE, LOCATION_GRAVE, 0, POS_FACEUP); - return FALSE; - } - case 22: { - core.hand_adjusted = TRUE; - add_process(PROCESSOR_POINT_EVENT, 0, 0, 0, 0, 0); - core.units.begin()->step = -1; - core.units.begin()->arg2 = 0; - return FALSE; - } - case 25: { - core.hint_timing[infos.turn_player] = 0; - reset_phase(phase); - adjust_all(); - return FALSE; - } - case 26: { - core.quick_f_chain.clear(); - core.instant_event.clear(); - core.point_event.clear(); - return TRUE; - } - } - return TRUE; -} -int32 field::process_point_event(int16 step, int32 skip_trigger, int32 skip_freechain, int32 skip_new) { - switch(step) { - case 0: { - core.select_chains.clear(); - core.point_event.splice(core.point_event.end(), core.instant_event); - if(skip_trigger) { - core.units.begin()->step = 7; - return FALSE; - } - core.new_fchain_s.splice(core.new_fchain_s.begin(), core.new_fchain); - core.new_ochain_s.splice(core.new_ochain_s.begin(), core.new_ochain); - core.tpchain.clear(); - core.ntpchain.clear(); - core.delayed_quick.clear(); - core.delayed_quick_break.swap(core.delayed_quick); - core.current_player = infos.turn_player; - core.units.begin()->step = 1; - return FALSE; - } - case 1: { - return FALSE; - } - case 2: { - //forced trigger - for (auto clit = core.new_fchain_s.begin(); clit != core.new_fchain_s.end(); ++clit) { - effect* peffect = clit->triggering_effect; - if(!(peffect->flag & (EFFECT_FLAG_EVENT_PLAYER | EFFECT_FLAG_BOTH_SIDE)) && peffect->handler->is_has_relation(peffect)) { - clit->triggering_player = peffect->handler->current.controler; - clit->triggering_controler = peffect->handler->current.controler; - clit->triggering_location = peffect->handler->current.location; - clit->triggering_sequence = peffect->handler->current.sequence; - } - uint8 tp = clit->triggering_player; - bool act = true; - if(peffect->is_chainable(tp) && peffect->is_activateable(tp, clit->evt, TRUE) - && (peffect->code == EVENT_FLIP && infos.phase == PHASE_DAMAGE || (clit->triggering_location & 0x3) - || !(peffect->handler->current.location & 0x3) || peffect->handler->is_status(STATUS_IS_PUBLIC))) { - if(peffect->flag & EFFECT_FLAG_CHAIN_UNIQUE) { - if(tp == infos.turn_player) { - for(auto tpit = core.tpchain.begin(); tpit != core.tpchain.end(); ++tpit) { - if(tpit->triggering_effect->handler->data.code == peffect->handler->data.code) { - act = false; - break; - } - } - } else { - for(auto ntpit = core.ntpchain.begin(); ntpit != core.ntpchain.end(); ++ntpit) { - if(ntpit->triggering_effect->handler->data.code == peffect->handler->data.code) { - act = false; - break; - } - } - } - } - } else - act = false; - if(act) { - if(tp == infos.turn_player) - core.tpchain.push_back(*clit); - else - core.ntpchain.push_back(*clit); - peffect->handler->set_status(STATUS_CHAINING, TRUE); - peffect->dec_count(tp); - } - } - core.new_fchain_s.clear(); - if(core.current_player == infos.turn_player) { - if(core.tpchain.size() > 1) - add_process(PROCESSOR_SORT_CHAIN, 0, 0, 0, 1, infos.turn_player); - } else { - if(core.ntpchain.size() > 1) - add_process(PROCESSOR_SORT_CHAIN, 0, 0, 0, 0, infos.turn_player); - } - return FALSE; - } - case 3: { - if(core.current_player == infos.turn_player) { - core.new_chains.splice(core.new_chains.end(), core.tpchain); - if(core.new_chains.size()) - add_process(PROCESSOR_ADD_CHAIN, 0, 0, 0, 0, 0); - core.current_player = 1 - infos.turn_player; - core.units.begin()->step = 1; - } else { - core.new_chains.splice(core.new_chains.end(), core.ntpchain); - if(core.new_chains.size()) - add_process(PROCESSOR_ADD_CHAIN, 0, 0, 0, 0, 0); - } - return FALSE; - } - case 4: { - //optional trigger - if(core.new_ochain_s.size() == 0) { - core.units.begin()->step = 6; - return FALSE; - } - for (auto clit = core.new_ochain_s.begin(); clit != core.new_ochain_s.end(); ++clit) { - effect* peffect = clit->triggering_effect; - if((!(peffect->flag & (EFFECT_FLAG_EVENT_PLAYER | EFFECT_FLAG_BOTH_SIDE)) && peffect->handler->is_has_relation(peffect)) - || (!(peffect->flag & EFFECT_FLAG_FIELD_ONLY) && (peffect->type & EFFECT_TYPE_FIELD) - && (peffect->range & LOCATION_HAND) && peffect->handler->current.location == LOCATION_HAND)) { - if(!peffect->handler->is_has_relation(peffect)) - peffect->handler->create_relation(peffect); - clit->triggering_player = peffect->handler->current.controler; - clit->triggering_controler = peffect->handler->current.controler; - clit->triggering_location = peffect->handler->current.location; - clit->triggering_sequence = peffect->handler->current.sequence; - } - if(clit->triggering_player == infos.turn_player) - core.tpchain.push_back(*clit); - else - core.ntpchain.push_back(*clit); - } - core.new_ochain_s.clear(); - core.new_ochain_s.splice(core.new_ochain_s.end(), core.tpchain); - core.new_ochain_s.splice(core.new_ochain_s.end(), core.ntpchain); - core.new_ochain_h.clear(); - core.tmp_chain.clear(); - core.current_player = infos.turn_player; - return FALSE; - } - case 5: { - if(core.new_ochain_s.size() == 0) { - if(core.current_player == infos.turn_player) { - if(core.tpchain.size() > 1) - add_process(PROCESSOR_SORT_CHAIN, 0, 0, 0, 1, infos.turn_player); - core.new_ochain_s.splice(core.new_ochain_s.end(), core.tmp_chain); - } else { - if(core.ntpchain.size() > 1) - add_process(PROCESSOR_SORT_CHAIN, 0, 0, 0, 0, infos.turn_player); - } - core.units.begin()->step = 6; - return FALSE; - } - auto clit = core.new_ochain_s.begin(); - effect* peffect = clit->triggering_effect; - uint8 tp = clit->triggering_player; - bool act = true; - if(peffect->is_chainable(tp) && peffect->is_activateable(tp, clit->evt, TRUE) - && (peffect->code == EVENT_FLIP && infos.phase == PHASE_DAMAGE || (clit->triggering_location & 0x3) - || !(peffect->handler->current.location & 0x3) || peffect->handler->is_status(STATUS_IS_PUBLIC))) { - if(!(peffect->flag & EFFECT_FLAG_FIELD_ONLY) && clit->triggering_location == LOCATION_HAND - && (((peffect->type & EFFECT_TYPE_SINGLE) && !(peffect->flag & EFFECT_FLAG_SINGLE_RANGE) && peffect->handler->is_has_relation(peffect)) - || (peffect->range & LOCATION_HAND))) { - core.new_ochain_h.push_back(*clit); - act = false; - } else if((peffect->flag & EFFECT_FLAG_FIELD_ONLY) || !(peffect->type & EFFECT_TYPE_FIELD) - || peffect->in_range(clit->triggering_location, clit->triggering_sequence)) { - if(peffect->flag & EFFECT_FLAG_CHAIN_UNIQUE) { - if(tp == infos.turn_player) { - for(auto tpit = core.tpchain.begin(); tpit != core.tpchain.end(); ++tpit) { - if(tpit->triggering_effect->handler->data.code == peffect->handler->data.code) { - act = false; - break; - } - } - } else { - for(auto ntpit = core.ntpchain.begin(); ntpit != core.ntpchain.end(); ++ntpit) { - if(ntpit->triggering_effect->handler->data.code == peffect->handler->data.code) { - act = false; - break; - } - } - } - } - } else - act = false; - } else act = false; - if(act) { - if(tp == core.current_player) - add_process(PROCESSOR_SELECT_EFFECTYN, 0, 0, (group*)peffect->handler, tp, 0); - else { - core.tmp_chain.push_back(*clit); - returns.ivalue[0] = FALSE; - } - } else returns.ivalue[0] = FALSE; - return FALSE; - } - case 6: { - if(!returns.ivalue[0]) { - core.new_ochain_s.pop_front(); - core.units.begin()->step = 4; - return FALSE; - } - auto clit = core.new_ochain_s.begin(); - effect* peffect = clit->triggering_effect; - card* pcard = peffect->handler; - uint8 tp = clit->triggering_player; - core.select_effects.clear(); - core.select_options.clear(); - uintptr_t index = 0; - core.select_effects.push_back((effect*)index); - core.select_options.push_back(peffect->description); - while(++clit != core.new_ochain_s.end()) { - ++index; - peffect = clit->triggering_effect; - if(pcard != peffect->handler) - continue; - bool act = true; - if(peffect->is_chainable(tp) && peffect->is_activateable(tp, clit->evt, TRUE) - && (peffect->code == EVENT_FLIP && infos.phase == PHASE_DAMAGE || (clit->triggering_location & 0x3) - || !(peffect->handler->current.location & 0x3) || peffect->handler->is_status(STATUS_IS_PUBLIC))) { - if(!(peffect->flag & EFFECT_FLAG_FIELD_ONLY) && clit->triggering_location == LOCATION_HAND - && (((peffect->type & EFFECT_TYPE_SINGLE) && !(peffect->flag & EFFECT_FLAG_SINGLE_RANGE) && peffect->handler->is_has_relation(peffect)) - || (peffect->range & LOCATION_HAND))) { - continue; - } else if((peffect->flag & EFFECT_FLAG_FIELD_ONLY) || !(peffect->type & EFFECT_TYPE_FIELD) - || peffect->in_range(clit->triggering_location, clit->triggering_sequence)) { - if(peffect->flag & EFFECT_FLAG_CHAIN_UNIQUE) { - if(tp == infos.turn_player) { - for(auto tpit = core.tpchain.begin(); tpit != core.tpchain.end(); ++tpit) { - if(tpit->triggering_effect->handler->data.code == peffect->handler->data.code) { - act = false; - break; - } - } - } else { - for(auto ntpit = core.ntpchain.begin(); ntpit != core.ntpchain.end(); ++ntpit) { - if(ntpit->triggering_effect->handler->data.code == peffect->handler->data.code) { - act = false; - break; - } - } - } - } - } else - continue; - } else continue; - if(act) { - core.select_effects.push_back((effect*)index); - core.select_options.push_back(peffect->description); - } - } - if(core.select_options.size() > 1) { - add_process(PROCESSOR_SELECT_OPTION, 0, 0, 0, tp, 0); - core.units.begin()->step = 19; - return FALSE; - } - clit = core.new_ochain_s.begin(); - peffect = clit->triggering_effect; - peffect->handler->set_status(STATUS_CHAINING, TRUE); - peffect->dec_count(tp); - if(tp == infos.turn_player) - core.tpchain.push_back(*clit); - else - core.ntpchain.push_back(*clit); - if(peffect->flag & EFFECT_FLAG_CVAL_CHECK) - peffect->get_value(); - core.new_ochain_s.pop_front(); - core.units.begin()->step = 4; - return FALSE; - } - case 7: { - if(core.current_player == infos.turn_player) { - core.new_chains.splice(core.new_chains.end(), core.tpchain); - if(core.new_chains.size()) - add_process(PROCESSOR_ADD_CHAIN, 0, 0, 0, 0, 0); - core.current_player = 1 - infos.turn_player; - core.units.begin()->step = 4; - } else { - core.new_chains.splice(core.new_chains.end(), core.ntpchain); - if(core.new_chains.size()) - add_process(PROCESSOR_ADD_CHAIN, 0, 0, 0, 0, 0); - } - return FALSE; - } - case 8: { - if(!(core.duel_options & DUEL_OBSOLETE_RULING) || (infos.phase != PHASE_MAIN1 && infos.phase != PHASE_MAIN2)) - return FALSE; - // Obsolete ignition effect ruling - tevent e; - if(core.current_chain.size() == 0 && - (check_event(EVENT_SUMMON_SUCCESS, &e) || check_event(EVENT_SPSUMMON_SUCCESS, &e) || check_event(EVENT_FLIP_SUMMON_SUCCESS, &e)) - && e.reason_player == infos.turn_player) { - chain newchain; - tevent e; - e.event_cards = 0; - e.event_value = 0; - e.event_player = PLAYER_NONE; - e.reason_effect = 0; - e.reason = 0; - e.reason_player = PLAYER_NONE; - for(auto eit = effects.ignition_effect.begin(); eit != effects.ignition_effect.end(); ++eit) { - effect* peffect = eit->second; - e.event_code = peffect->code; - if(peffect->handler->current.location == LOCATION_MZONE && peffect->is_chainable(infos.turn_player) - && peffect->is_activateable(infos.turn_player, e)) { - newchain.flag = 0; - newchain.chain_id = infos.field_id++; - newchain.evt = e; - newchain.triggering_controler = peffect->handler->current.controler; - newchain.triggering_effect = peffect; - newchain.triggering_location = peffect->handler->current.location; - newchain.triggering_sequence = peffect->handler->current.sequence; - newchain.triggering_player = infos.turn_player; - core.select_chains.push_back(newchain); - } - } - } - return FALSE; - } - case 9: { - infos.priorities[0] = 0; - infos.priorities[1] = 0; - if(core.current_chain.size() == 0) { - if(!core.hand_adjusted) - add_process(PROCESSOR_QUICK_EFFECT, 0, 0, 0, skip_freechain, infos.turn_player); - } else - add_process(PROCESSOR_QUICK_EFFECT, 0, 0, 0, skip_freechain, 1 - core.current_chain.back().triggering_player); - return FALSE; - } - case 10: { - core.new_ochain_h.clear(); - if(core.chain_limit) { - luaL_unref(pduel->lua->lua_state, LUA_REGISTRYINDEX, core.chain_limit); - core.chain_limit = 0; - } - if(core.current_chain.size()) { - for(auto cait = core.current_chain.begin(); cait != core.current_chain.end(); ++cait) - cait->triggering_effect->handler->set_status(STATUS_CHAINING, FALSE); - add_process(PROCESSOR_SOLVE_CHAIN, 0, 0, 0, skip_trigger | ((skip_freechain | skip_new) << 8), skip_new); - } else { - core.used_event.splice(core.used_event.end(), core.point_event); - if(core.chain_limit_p) { - luaL_unref(pduel->lua->lua_state, LUA_REGISTRYINDEX, core.chain_limit_p); - core.chain_limit_p = 0; - } - reset_chain(); - returns.ivalue[0] = FALSE; - } - return TRUE; - } - case 20: { - uintptr_t index = (uintptr_t)core.select_effects[returns.ivalue[0]]; - auto clit = core.new_ochain_s.begin(); - std::advance(clit, index); - effect* peffect = clit->triggering_effect; - uint8 tp = clit->triggering_player; - peffect->handler->set_status(STATUS_CHAINING, TRUE); - peffect->dec_count(tp); - if(tp == infos.turn_player) - core.tpchain.push_back(*clit); - else - core.ntpchain.push_back(*clit); - if(peffect->flag & EFFECT_FLAG_CVAL_CHECK) - peffect->get_value(); - core.new_ochain_s.erase(clit); - core.units.begin()->step = 4; - return FALSE; - } - } - return TRUE; -} -int32 field::process_quick_effect(int16 step, int32 skip_freechain, uint8 priority) { - pair pr; - event_list::iterator evit; - effect* peffect; - switch(step) { - case 0: { - core.tpchain.clear(); - core.ntpchain.clear(); - if(!core.quick_f_chain.size()) - return FALSE; - bool act = true; - for(auto ifit = core.quick_f_chain.begin(); ifit != core.quick_f_chain.end(); ++ifit) { - peffect = ifit->first; - if(peffect->is_chainable(ifit->second.triggering_player) && peffect->check_count_limit(ifit->second.triggering_player) - && peffect->handler->is_has_relation(peffect)) { - if(ifit->second.triggering_player == infos.turn_player) { - act = true; - if(peffect->flag & EFFECT_FLAG_CHAIN_UNIQUE) { - for (auto cait = core.tpchain.begin(); cait != core.tpchain.end(); ++cait) { - if (cait->triggering_effect->handler->data.code == peffect->handler->data.code) { - act = false; - break; - } - } - for (auto cait = core.current_chain.begin(); cait != core.current_chain.end(); ++cait) { - if ((cait->triggering_effect->handler->data.code == peffect->handler->data.code) - && (cait->triggering_player == infos.turn_player)) { - act = false; - break; - } - } - } - if(act) { - core.tpchain.push_back(ifit->second); - peffect->handler->set_status(STATUS_CHAINING, TRUE); - peffect->dec_count(infos.turn_player); - } - } else { - act = true; - if(peffect->flag & EFFECT_FLAG_CHAIN_UNIQUE) { - for (auto cait = core.ntpchain.begin(); cait != core.ntpchain.end(); ++cait) { - if (cait->triggering_effect->handler->data.code == peffect->handler->data.code) { - act = false; - break; - } - } - for (auto cait = core.current_chain.begin(); cait != core.current_chain.end(); ++cait) { - if ((cait->triggering_effect->handler->data.code == peffect->handler->data.code) - && (cait->triggering_player != infos.turn_player)) { - act = false; - break; - } - } - } - if(act) { - core.ntpchain.push_back(ifit->second); - peffect->handler->set_status(STATUS_CHAINING, TRUE); - peffect->dec_count(1 - infos.turn_player); - } - } - } - } - core.quick_f_chain.clear(); - if(core.tpchain.size() > 1) - add_process(PROCESSOR_SORT_CHAIN, 0, 0, 0, 1, infos.turn_player); - if(core.ntpchain.size() > 1) - add_process(PROCESSOR_SORT_CHAIN, 0, 0, 0, 0, infos.turn_player); - return FALSE; - } - case 1: { - if(core.tpchain.size() == 0 && core.ntpchain.size() == 0) { - chain newchain; - evit = core.point_event.begin(); - bool pev = true; - if(evit == core.point_event.end()) { - evit = core.instant_event.begin(); - pev = false; - } - while(pev || (evit != core.instant_event.end())) { - pr = effects.activate_effect.equal_range(evit->event_code); - for(; pr.first != pr.second; ++pr.first) { - peffect = pr.first->second; - peffect->s_range = peffect->handler->current.location; - peffect->o_range = peffect->handler->current.sequence; - if(peffect->is_chainable(priority) && peffect->is_activateable(priority, *evit)) { - newchain.flag = 0; - newchain.chain_id = infos.field_id++; - newchain.evt = *evit; - newchain.triggering_controler = peffect->handler->current.controler; - newchain.triggering_effect = peffect; - newchain.triggering_location = peffect->handler->current.location; - newchain.triggering_sequence = peffect->handler->current.sequence; - newchain.triggering_player = priority; - core.select_chains.push_back(newchain); - core.delayed_quick_tmp.erase(make_pair(peffect, *evit)); - core.delayed_quick_break.erase(make_pair(peffect, *evit)); - } - } - pr = effects.quick_o_effect.equal_range(evit->event_code); - for(; pr.first != pr.second; ++pr.first) { - peffect = pr.first->second; - peffect->s_range = peffect->handler->current.location; - peffect->o_range = peffect->handler->current.sequence; - if(peffect->is_chainable(priority) && peffect->is_activateable(priority, *evit)) { - newchain.flag = 0; - newchain.chain_id = infos.field_id++; - newchain.evt = *evit; - newchain.triggering_controler = peffect->handler->current.controler; - newchain.triggering_effect = peffect; - newchain.triggering_location = peffect->handler->current.location; - newchain.triggering_sequence = peffect->handler->current.sequence; - newchain.triggering_player = priority; - core.select_chains.push_back(newchain); - core.delayed_quick_tmp.erase(make_pair(peffect, *evit)); - core.delayed_quick_break.erase(make_pair(peffect, *evit)); - } - } - ++evit; - if(pev && evit == core.point_event.end()) { - evit = core.instant_event.begin(); - pev = false; - } - } - for(auto clit = core.new_ochain_h.begin(); clit != core.new_ochain_h.end(); ++clit) { - peffect = clit->triggering_effect; - bool act = true; - if(clit->triggering_player == priority && !peffect->handler->is_status(STATUS_CHAINING) && peffect->handler->is_has_relation(peffect) - && peffect->is_chainable(priority) && peffect->is_activateable(priority, clit->evt, TRUE)) { - for(auto cait = core.current_chain.begin(); cait != core.current_chain.end(); ++cait) { - if(cait->triggering_player == priority) { - effect* pchaineff = cait->triggering_effect; - if(!(pchaineff->flag & EFFECT_FLAG_FIELD_ONLY) && (pchaineff->type & EFFECT_TYPE_TRIGGER_O) - && (!(pchaineff->type & EFFECT_TYPE_SINGLE) || (pchaineff->flag & EFFECT_FLAG_SINGLE_RANGE)) - && (pchaineff->range & LOCATION_HAND)) { - act = false; - break; - } - if((peffect->flag & EFFECT_FLAG_CHAIN_UNIQUE) && (cait->triggering_effect->handler->data.code == peffect->handler->data.code)) { - act = false; - break; - } - } - } - } else - act = false; - if(act) - core.select_chains.push_back(*clit); - } - if(core.global_flag & GLOBALFLAG_DELAYED_QUICKEFFECT) { - for(auto eit = core.delayed_quick.begin(); eit != core.delayed_quick.end(); ++eit) { - peffect = eit->first; - peffect->s_range = peffect->handler->current.location; - peffect->o_range = peffect->handler->current.sequence; - const tevent& evt = eit->second; - if(peffect->is_chainable(priority) && peffect->is_activateable(priority, evt, TRUE, FALSE, FALSE)) { - newchain.flag = 0; - newchain.chain_id = infos.field_id++; - newchain.evt = evt; - newchain.triggering_controler = peffect->handler->current.controler; - newchain.triggering_effect = peffect; - newchain.triggering_location = peffect->handler->current.location; - newchain.triggering_sequence = peffect->handler->current.sequence; - newchain.triggering_player = priority; - core.select_chains.push_back(newchain); - } - } - } - core.spe_effect[priority] = core.select_chains.size(); - if(!skip_freechain) { - nil_event.event_code = EVENT_FREE_CHAIN; - pr = effects.activate_effect.equal_range(EVENT_FREE_CHAIN); - for(; pr.first != pr.second; ++pr.first) { - peffect = pr.first->second; - peffect->s_range = peffect->handler->current.location; - peffect->o_range = peffect->handler->current.sequence; - if(peffect->is_chainable(priority) && peffect->is_activateable(priority, nil_event)) { - newchain.flag = 0; - newchain.chain_id = infos.field_id++; - newchain.evt = nil_event; - newchain.triggering_controler = peffect->handler->current.controler; - newchain.triggering_effect = peffect; - newchain.triggering_location = peffect->handler->current.location; - newchain.triggering_sequence = peffect->handler->current.sequence; - newchain.triggering_player = priority; - core.select_chains.push_back(newchain); - if(check_hint_timing(peffect)) - core.spe_effect[priority]++; - } - } - pr = effects.quick_o_effect.equal_range(EVENT_FREE_CHAIN); - for(; pr.first != pr.second; ++pr.first) { - peffect = pr.first->second; - peffect->s_range = peffect->handler->current.location; - peffect->o_range = peffect->handler->current.sequence; - if(peffect->is_chainable(priority) && peffect->is_activateable(priority, nil_event)) { - newchain.flag = 0; - newchain.chain_id = infos.field_id++; - newchain.evt = nil_event; - newchain.triggering_controler = peffect->handler->current.controler; - newchain.triggering_effect = peffect; - newchain.triggering_location = peffect->handler->current.location; - newchain.triggering_sequence = peffect->handler->current.sequence; - newchain.triggering_player = priority; - core.select_chains.push_back(newchain); - if(check_hint_timing(peffect)) - core.spe_effect[priority]++; - } - } - } - if(core.current_chain.size() || (core.hint_timing[0] & TIMING_ATTACK) || (core.hint_timing[1] & TIMING_ATTACK)) - core.spe_effect[priority] = core.select_chains.size(); - if(!(core.duel_options & DUEL_NO_CHAIN_HINT) || core.select_chains.size()) - add_process(PROCESSOR_SELECT_CHAIN, 0, 0, 0, priority, core.spe_effect[priority]); - } else { - core.new_chains.splice(core.new_chains.end(), core.tpchain); - core.new_chains.splice(core.new_chains.end(), core.ntpchain); - add_process(PROCESSOR_ADD_CHAIN, 0, 0, 0, 0, 0); - add_process(PROCESSOR_QUICK_EFFECT, 0, 0, 0, FALSE, 1 - core.new_chains.back().triggering_player); - infos.priorities[0] = 0; - infos.priorities[1] = 0; - return TRUE; - } - return FALSE; - } - case 2: { - if(core.select_chains.size() && returns.ivalue[0] != -1) { - chain newchain = core.select_chains[returns.ivalue[0]]; - core.new_chains.push_back(newchain); - effect* peffect = newchain.triggering_effect; - core.delayed_quick.erase(make_pair(peffect, newchain.evt)); - peffect->handler->set_status(STATUS_CHAINING, TRUE); - peffect->dec_count(priority); - add_process(PROCESSOR_ADD_CHAIN, 0, 0, 0, 0, 0); - add_process(PROCESSOR_QUICK_EFFECT, 0, 0, 0, FALSE, 1 - priority); - infos.priorities[0] = 0; - infos.priorities[1] = 0; - } else { - infos.priorities[priority] = 1; - if(!infos.priorities[0] || !infos.priorities[1]) - add_process(PROCESSOR_QUICK_EFFECT, 1, 0, 0, skip_freechain, 1 - priority); - else { - core.hint_timing[0] &= TIMING_DAMAGE_STEP | TIMING_DAMAGE_CAL; - core.hint_timing[1] &= TIMING_DAMAGE_STEP | TIMING_DAMAGE_CAL; - core.delayed_quick.clear(); - } - } - core.select_chains.clear(); - return TRUE; - } - } - return TRUE; -} - -int32 field::process_instant_event() { - if (core.queue_event.size() == 0) - return TRUE; - effect* peffect; - chain newchain; - effect_vector tp; - effect_vector ntp; - event_list tev; - event_list ntev; - effect_vector::iterator eit; - event_list::iterator evit; - for(auto elit = core.queue_event.begin(); elit != core.queue_event.end(); ++elit) { - //continuous events - auto pr = effects.continuous_effect.equal_range(elit->event_code); - for(; pr.first != pr.second; ++pr.first) { - peffect = pr.first->second; - uint8 owner_player = peffect->get_handler_player(); - if(peffect->is_activateable(owner_player, *elit)) { - if((peffect->flag & EFFECT_FLAG_DELAY) && (core.chain_solving || core.conti_solving)) { - if(owner_player == infos.turn_player) { - core.delayed_tp.push_back(peffect); - core.delayed_tev.push_back(*elit); - } else { - core.delayed_ntp.push_back(peffect); - core.delayed_ntev.push_back(*elit); - } - } else { - if(owner_player == infos.turn_player) { - tp.push_back(peffect); - tev.push_back(*elit); - } else { - ntp.push_back(peffect); - ntev.push_back(*elit); - } - } - } - } - if(elit->event_code == EVENT_ADJUST || (((elit->event_code & 0xf000) == EVENT_PHASE_START) && (elit->event_code & 0xff) != PHASE_BATTLE)) - continue; - //triggers - pr = effects.trigger_f_effect.equal_range(elit->event_code); - for(; pr.first != pr.second; ++pr.first) { - peffect = pr.first->second; - if(!peffect->is_condition_check(peffect->handler->current.controler, *elit)) - continue; - peffect->handler->create_relation(peffect); - peffect->s_range = peffect->handler->current.location; - peffect->o_range = peffect->handler->current.sequence; - newchain.flag = 0; - newchain.chain_id = infos.field_id++; - newchain.evt = *elit; - newchain.triggering_effect = peffect; - newchain.triggering_controler = peffect->handler->current.controler; - newchain.triggering_location = peffect->handler->current.location; - newchain.triggering_sequence = peffect->handler->current.sequence; - if((peffect->flag & EFFECT_FLAG_EVENT_PLAYER) && (elit->event_player == 0 || elit->event_player == 1)) - newchain.triggering_player = elit->event_player; - else newchain.triggering_player = peffect->handler->current.controler; - core.new_fchain.push_back(newchain); - } - pr = effects.trigger_o_effect.equal_range(elit->event_code); - for(; pr.first != pr.second; ++pr.first) { - peffect = pr.first->second; - if(!peffect->is_condition_check(peffect->handler->current.controler, *elit)) - continue; - if((peffect->flag & EFFECT_FLAG_FIELD_ONLY) - || ((peffect->type & EFFECT_TYPE_SINGLE) && !(peffect->flag & EFFECT_FLAG_SINGLE_RANGE)) - || !(peffect->range & LOCATION_HAND) || (peffect->range & peffect->handler->current.location)) - peffect->handler->create_relation(peffect); - peffect->s_range = peffect->handler->current.location; - peffect->o_range = peffect->handler->current.sequence; - newchain.flag = 0; - newchain.chain_id = infos.field_id++; - newchain.evt = *elit; - newchain.triggering_effect = peffect; - newchain.triggering_controler = peffect->handler->current.controler; - newchain.triggering_location = peffect->handler->current.location; - newchain.triggering_sequence = peffect->handler->current.sequence; - if((peffect->flag & EFFECT_FLAG_EVENT_PLAYER) && (elit->event_player == 0 || elit->event_player == 1)) - newchain.triggering_player = elit->event_player; - else newchain.triggering_player = peffect->handler->current.controler; - core.new_ochain.push_back(newchain); - } - //instant_f - pr = effects.quick_f_effect.equal_range(elit->event_code); - for(; pr.first != pr.second; ++pr.first) { - peffect = pr.first->second; - peffect->s_range = peffect->handler->current.location; - peffect->o_range = peffect->handler->current.sequence; - if(peffect->is_activateable(peffect->handler->current.controler, *elit)) { - peffect->handler->create_relation(peffect); - newchain.flag = 0; - newchain.chain_id = infos.field_id++; - newchain.evt = *elit; - newchain.triggering_effect = peffect; - newchain.triggering_controler = peffect->handler->current.controler; - newchain.triggering_location = peffect->handler->current.location; - newchain.triggering_sequence = peffect->handler->current.sequence; - if((peffect->flag & EFFECT_FLAG_EVENT_PLAYER) && (elit->event_player == 0 || elit->event_player == 1)) - newchain.triggering_player = elit->event_player; - else newchain.triggering_player = peffect->handler->current.controler; - core.quick_f_chain[peffect] = newchain; - } - } - if(!(core.global_flag & GLOBALFLAG_DELAYED_QUICKEFFECT)) - continue; - //delayed quick effect - pr = effects.activate_effect.equal_range(elit->event_code); - for(; pr.first != pr.second; ++pr.first) { - peffect = pr.first->second; - if((peffect->flag & EFFECT_FLAG_DELAY) && peffect->is_condition_check(peffect->handler->current.controler, *elit)) - core.delayed_quick_tmp.insert(make_pair(peffect, *elit)); - } - pr = effects.quick_o_effect.equal_range(elit->event_code); - for(; pr.first != pr.second; ++pr.first) { - peffect = pr.first->second; - if((peffect->flag & EFFECT_FLAG_DELAY) && peffect->is_condition_check(peffect->handler->current.controler, *elit)) - core.delayed_quick_tmp.insert(make_pair(peffect, *elit)); - } - } - for(eit = tp.begin(), evit = tev.begin(); eit != tp.end(); ++eit, ++evit) { - core.sub_solving_event.push_back(*evit); - add_process(PROCESSOR_SOLVE_CONTINUOUS, 0, (*eit), 0, (*eit)->get_handler_player(), 0); - } - for(eit = ntp.begin(), evit = ntev.begin(); eit != ntp.end(); ++eit, ++evit) { - core.sub_solving_event.push_back(*evit); - add_process(PROCESSOR_SOLVE_CONTINUOUS, 0, (*eit), 0, (*eit)->get_handler_player(), 0); - } - core.instant_event.splice(core.instant_event.end(), core.queue_event); - return TRUE; -} -int32 field::process_single_event() { - if(core.single_event.size() == 0) - return TRUE; - card* starget; - uint32 ev; - effect_set eset; - effect* peffect; - effect_vector tp; - effect_vector ntp; - event_list tev; - event_list ntev; - effect_vector::iterator eit; - event_list::iterator evit; - for(auto elit = core.single_event.begin(); elit != core.single_event.end(); ++elit) { - starget = elit->trigger_card; - ev = elit->event_code; - auto pr = starget->single_effect.equal_range(ev); - const tevent& e = *elit; - for(; pr.first != pr.second; ++pr.first) { - peffect = pr.first->second; - if(!(peffect->type & EFFECT_TYPE_ACTIONS)) - continue; - if((peffect->type & EFFECT_TYPE_FLIP) && e.event_value) - continue; - //continuous & trigger (single) - if(peffect->type & EFFECT_TYPE_CONTINUOUS) { - uint8 owner_player = peffect->get_handler_player(); - if(peffect->is_activateable(owner_player, e)) { - if((peffect->flag & EFFECT_FLAG_DELAY) && (core.chain_solving || core.conti_solving)) { - if(owner_player == infos.turn_player) { - core.delayed_tp.push_back(peffect); - core.delayed_tev.push_back(e); - } else { - core.delayed_ntp.push_back(peffect); - core.delayed_ntev.push_back(e); - } - } else { - if(owner_player == infos.turn_player) { - tp.push_back(peffect); - tev.push_back(e); - } else { - ntp.push_back(peffect); - ntev.push_back(e); - } - } - } - } else { - if(!peffect->is_condition_check(peffect->handler->current.controler, e)) - continue; - peffect->handler->create_relation(peffect); - peffect->s_range = peffect->handler->current.location; - peffect->o_range = peffect->handler->current.sequence; - chain newchain; - newchain.flag = 0; - newchain.chain_id = infos.field_id++; - newchain.evt = e; - newchain.triggering_effect = peffect; - newchain.triggering_controler = peffect->handler->current.controler; - newchain.triggering_location = peffect->handler->current.location; - newchain.triggering_sequence = peffect->handler->current.sequence; - if((peffect->flag & EFFECT_FLAG_EVENT_PLAYER) && (elit->event_player == 0 || elit->event_player == 1)) - newchain.triggering_player = elit->event_player; - else { - if(peffect->handler->current.reason & REASON_TEMPORARY) - newchain.triggering_player = peffect->handler->previous.controler; - else - newchain.triggering_player = newchain.triggering_controler; - } - if(core.flip_delayed && ev == EVENT_FLIP) { - if (peffect->type & EFFECT_TYPE_TRIGGER_O) - core.new_ochain_b.push_back(newchain); - else - core.new_fchain_b.push_back(newchain); - } else { - if (peffect->type & EFFECT_TYPE_TRIGGER_O) - core.new_ochain.push_back(newchain); - else - core.new_fchain.push_back(newchain); - } - } - } - } - for(eit = tp.begin(), evit = tev.begin(); eit != tp.end(); ++eit, ++evit) { - core.sub_solving_event.push_back(*evit); - add_process(PROCESSOR_SOLVE_CONTINUOUS, 0, (*eit), 0, (*eit)->get_handler_player(), 0); - } - for(eit = ntp.begin(), evit = ntev.begin(); eit != ntp.end(); ++eit, ++evit) { - core.sub_solving_event.push_back(*evit); - add_process(PROCESSOR_SOLVE_CONTINUOUS, 0, (*eit), 0, (*eit)->get_handler_player(), 0); - } - core.single_event.clear(); - return TRUE; -} -int32 field::process_idle_command(uint16 step) { - switch(step) { - case 0: { - card* pcard; - effect* peffect; - core.select_chains.clear(); - chain newchain; - nil_event.event_code = EVENT_FREE_CHAIN; - core.to_bp = TRUE; - core.to_ep = TRUE; - if((!(core.duel_options & DUEL_ATTACK_FIRST_TURN) && infos.turn_id == 1) || infos.phase == PHASE_MAIN2 || is_player_affected_by_effect(infos.turn_player, EFFECT_CANNOT_BP)) - core.to_bp = FALSE; - if(core.to_bp && infos.phase == PHASE_MAIN1 && is_player_affected_by_effect(infos.turn_player, EFFECT_CANNOT_EP)) - core.to_ep = FALSE; - if((infos.phase == PHASE_MAIN1 && is_player_affected_by_effect(infos.turn_player, EFFECT_SKIP_M1)) - || (infos.phase == PHASE_MAIN2 && is_player_affected_by_effect(infos.turn_player, EFFECT_SKIP_M2))) { - if(core.to_bp && core.to_ep) { - core.select_options.clear(); - core.select_options.push_back(80); - core.select_options.push_back(81); - add_process(PROCESSOR_SELECT_OPTION, 0, 0, 0, infos.turn_player, 0); - core.units.begin()->step = 11; - } else if(core.to_bp) { - core.units.begin()->arg1 = 6; - core.units.begin()->step = 10; - reset_phase(infos.phase); - adjust_all(); - } else { - core.units.begin()->arg1 = 7; - core.units.begin()->step = 10; - reset_phase(infos.phase); - adjust_all(); - } - return FALSE; - } - if((infos.phase == PHASE_MAIN2) && core.skip_m2) { - core.skip_m2 = FALSE; - returns.ivalue[0] = 7; - return FALSE; - } - auto pr = effects.activate_effect.equal_range(EVENT_FREE_CHAIN); - for(; pr.first != pr.second; ++pr.first) { - peffect = pr.first->second; - peffect->s_range = peffect->handler->current.location; - peffect->o_range = peffect->handler->current.sequence; - newchain.triggering_effect = peffect; - if(peffect->is_activateable(infos.turn_player, nil_event)) - core.select_chains.push_back(newchain); - } - pr = effects.quick_o_effect.equal_range(EVENT_FREE_CHAIN); - for(; pr.first != pr.second; ++pr.first) { - peffect = pr.first->second; - peffect->s_range = peffect->handler->current.location; - peffect->o_range = peffect->handler->current.sequence; - newchain.triggering_effect = peffect; - if(peffect->is_activateable(infos.turn_player, nil_event)) - core.select_chains.push_back(newchain); - } - for(auto eit = effects.ignition_effect.begin(); eit != effects.ignition_effect.end(); ++eit) { - peffect = eit->second; - peffect->s_range = peffect->handler->current.location; - peffect->o_range = peffect->handler->current.sequence; - newchain.triggering_effect = peffect; - if(peffect->is_activateable(infos.turn_player, nil_event)) - core.select_chains.push_back(newchain); - } - core.summonable_cards.clear(); - for(auto clit = player[infos.turn_player].list_hand.begin(); clit != player[infos.turn_player].list_hand.end(); ++clit) - if((*clit)->is_can_be_summoned(infos.turn_player, FALSE, 0, 0)) - core.summonable_cards.push_back(*clit); - for(int i = 0; i < 5; ++i) { - if(player[infos.turn_player].list_mzone[i] && player[infos.turn_player].list_mzone[i]->is_can_be_summoned(infos.turn_player, FALSE, 0, 0)) - core.summonable_cards.push_back(player[infos.turn_player].list_mzone[i]); - } - core.spsummonable_cards.clear(); - effect_set eset; - filter_field_effect(EFFECT_SPSUMMON_PROC, &eset); - for(int32 i = 0; i < eset.size(); ++i) { - pcard = eset[i]->handler; - if(!eset[i]->check_count_limit(pcard->current.controler)) - continue; - if(pcard->current.controler == infos.turn_player && pcard->is_special_summonable(infos.turn_player, 0)) - core.spsummonable_cards.push_back(pcard); - } - eset.clear(); - filter_field_effect(EFFECT_SPSUMMON_PROC_G, &eset); - for(int32 i = 0; i < eset.size(); ++i) { - pcard = eset[i]->handler; - if(!eset[i]->check_count_limit(infos.turn_player)) - continue; - if(pcard->current.controler != infos.turn_player && !(eset[i]->flag & EFFECT_FLAG_BOTH_SIDE)) - continue; - effect* oreason = core.reason_effect; - uint8 op = core.reason_player; - core.reason_effect = eset[i]; - core.reason_player = pcard->current.controler; - save_lp_cost(); - pduel->lua->add_param(eset[i], PARAM_TYPE_EFFECT); - pduel->lua->add_param(pcard, PARAM_TYPE_CARD); - if(pduel->lua->check_condition(eset[i]->condition, 2)) - core.spsummonable_cards.push_back(pcard); - restore_lp_cost(); - core.reason_effect = oreason; - core.reason_player = op; - } - core.repositionable_cards.clear(); - for(int i = 0; i < 5; ++i) { - pcard = player[infos.turn_player].list_mzone[i]; - if(pcard && ((pcard->is_position(POS_FACEUP | POS_FACEDOWN_ATTACK) && pcard->is_capable_change_position(infos.turn_player)) - || (pcard->is_position(POS_FACEDOWN) && pcard->is_can_be_flip_summoned(infos.turn_player)))) - core.repositionable_cards.push_back(player[infos.turn_player].list_mzone[i]); - } - core.msetable_cards.clear(); - core.ssetable_cards.clear(); - for(auto clit = player[infos.turn_player].list_hand.begin(); clit != player[infos.turn_player].list_hand.end(); ++clit) { - if((*clit)->is_setable_mzone(infos.turn_player, FALSE, 0, 0)) - core.msetable_cards.push_back(*clit); - if((*clit)->is_setable_szone(infos.turn_player)) - core.ssetable_cards.push_back(*clit); - } - add_process(PROCESSOR_SELECT_IDLECMD, 0, 0, 0, infos.turn_player, 0); - return FALSE; - } - case 1: { - uint32 ctype = returns.ivalue[0] & 0xffff; - uint32 sel = returns.ivalue[0] >> 16; - if(ctype == 5) { - chain newchain = core.select_chains[sel]; - effect* peffect = newchain.triggering_effect; - newchain.flag = 0; - newchain.chain_id = infos.field_id++; - newchain.evt.event_code = peffect->code; - newchain.evt.event_player = PLAYER_NONE; - newchain.evt.event_value = 0; - newchain.evt.event_cards = 0; - newchain.evt.reason = 0; - newchain.evt.reason_effect = 0; - newchain.evt.reason_player = PLAYER_NONE; - newchain.triggering_controler = peffect->handler->current.controler; - newchain.triggering_location = peffect->handler->current.location; - newchain.triggering_sequence = peffect->handler->current.sequence; - newchain.triggering_player = infos.turn_player; - core.new_chains.push_back(newchain); - peffect->handler->set_status(STATUS_CHAINING, TRUE); - peffect->dec_count(infos.turn_player); - core.select_chains.clear(); - add_process(PROCESSOR_ADD_CHAIN, 0, 0, 0, 0, 0); - add_process(PROCESSOR_QUICK_EFFECT, 0, 0, 0, FALSE, 1 - infos.turn_player); - infos.priorities[0] = 0; - infos.priorities[1] = 0; - core.select_chains.clear(); - return FALSE; - } else if(ctype == 0) { - core.units.begin()->step = 4; - return FALSE; - } else if(ctype == 1) { - core.units.begin()->step = 5; - return FALSE; - } else if(ctype == 2) { - core.units.begin()->step = 6; - return FALSE; - } else if(ctype == 3) { - core.units.begin()->step = 7; - return FALSE; - } else if(ctype == 4) { - core.units.begin()->step = 8; - return FALSE; - } else if (ctype == 8) { - core.units.begin()->step = -1; - shuffle(infos.turn_player, LOCATION_HAND); - infos.can_shuffle = FALSE; - return FALSE; - } else { - core.units.begin()->step = 9; - pduel->write_buffer8(MSG_HINT); - pduel->write_buffer8(HINT_EVENT); - pduel->write_buffer8(1 - infos.turn_player); - pduel->write_buffer32(23); - core.select_chains.clear(); - core.hint_timing[infos.turn_player] = TIMING_MAIN_END; - add_process(PROCESSOR_QUICK_EFFECT, 0, 0, 0, FALSE, 1 - infos.turn_player); - infos.priorities[infos.turn_player] = 1; - infos.priorities[1 - infos.turn_player] = 0; - core.units.begin()->arg1 = ctype; - return FALSE; - } - return TRUE; - } - case 2: { - if(core.chain_limit) { - luaL_unref(pduel->lua->lua_state, LUA_REGISTRYINDEX, core.chain_limit); - core.chain_limit = 0; - } - chain_array::iterator cait; - for(cait = core.current_chain.begin(); cait != core.current_chain.end(); ++cait) - cait->triggering_effect->handler->set_status(STATUS_CHAINING, FALSE); - add_process(PROCESSOR_SOLVE_CHAIN, 0, 0, 0, FALSE, 0); - core.units.begin()->step = -1; - return FALSE; - } - case 5: { - card* target = core.summonable_cards[returns.ivalue[0] >> 16]; - core.summon_cancelable = TRUE; - summon(infos.turn_player, target, 0, FALSE, 0); - core.units.begin()->step = -1; - return FALSE; - } - case 6: { - card* target = core.spsummonable_cards[returns.ivalue[0] >> 16]; - core.summon_cancelable = TRUE; - special_summon_rule(infos.turn_player, target, 0); - core.units.begin()->step = -1; - return FALSE; - } - case 7: { - card* target = core.repositionable_cards[returns.ivalue[0] >> 16]; - if(target->is_position(POS_FACEUP_ATTACK)) { - core.phase_action = TRUE; - change_position(target, 0, infos.turn_player, POS_FACEUP_DEFENCE, FALSE); - adjust_all(); - add_process(PROCESSOR_POINT_EVENT, 0, 0, 0, FALSE, 0); - } else if(target->is_position(POS_FACEUP_DEFENCE)) { - core.phase_action = TRUE; - change_position(target, 0, infos.turn_player, POS_FACEUP_ATTACK, FALSE); - adjust_all(); - add_process(PROCESSOR_POINT_EVENT, 0, 0, 0, FALSE, 0); - } else if(target->is_position(POS_FACEDOWN_ATTACK)) { - core.units.begin()->ptarget = (group*)target; - int32 positions = 0; - if(target->is_capable_change_position(infos.turn_player)) - positions |= POS_FACEDOWN_DEFENCE; - if(target->is_can_be_flip_summoned(infos.turn_player)) - positions |= POS_FACEUP_ATTACK; - add_process(PROCESSOR_SELECT_POSITION, 0, 0, 0, infos.turn_player + (positions << 16), target->data.code); - core.units.begin()->step = 12; - return FALSE; - } else - add_process(PROCESSOR_FLIP_SUMMON, 0, 0, (group*)target, target->current.controler, 0); - target->set_status(STATUS_FORM_CHANGED, TRUE); - core.units.begin()->step = -1; - return FALSE; - } - case 8: { - card* target = core.msetable_cards[returns.ivalue[0] >> 16]; - core.summon_cancelable = TRUE; - add_process(PROCESSOR_MSET, 0, 0, (group*)target, target->current.controler, 0); - core.units.begin()->step = -1; - return FALSE; - } - case 9: { - card* target = core.ssetable_cards[returns.ivalue[0] >> 16]; - add_process(PROCESSOR_SSET, 0, 0, (group*)target, target->current.controler, target->current.controler); - core.units.begin()->step = -1; - return FALSE; - } - case 10: { - //end announce - if(core.chain_limit) { - luaL_unref(pduel->lua->lua_state, LUA_REGISTRYINDEX, core.chain_limit); - core.chain_limit = 0; - } - if(core.current_chain.size()) { - for(auto cait = core.current_chain.begin(); cait != core.current_chain.end(); ++cait) - cait->triggering_effect->handler->set_status(STATUS_CHAINING, FALSE); - add_process(PROCESSOR_SOLVE_CHAIN, 0, 0, 0, FALSE, 0); - core.units.begin()->step = -1; - return FALSE; - } - reset_phase(infos.phase); - adjust_all(); - return FALSE; - } - case 11: { - returns.ivalue[0] = core.units.begin()->arg1; - infos.can_shuffle = TRUE; - return TRUE; - } - case 12: { - if(returns.ivalue[0] == 0) - core.units.begin()->arg1 = 6; - else - core.units.begin()->arg1 = 7; - reset_phase(infos.phase); - adjust_all(); - core.units.begin()->step = 10; - return FALSE; - } - case 13: { - card* target = (card*)core.units.begin()->ptarget; - if(returns.ivalue[0] == POS_FACEUP_ATTACK) - add_process(PROCESSOR_FLIP_SUMMON, 0, 0, (group*)target, target->current.controler, 0); - else { - core.phase_action = TRUE; - change_position(target, 0, infos.turn_player, POS_FACEDOWN_DEFENCE, FALSE); - adjust_all(); - add_process(PROCESSOR_POINT_EVENT, 0, 0, 0, FALSE, 0); - } - target->set_status(STATUS_FORM_CHANGED, TRUE); - core.units.begin()->step = -1; - return FALSE; - } - } - return TRUE; -} -int32 field::process_battle_command(uint16 step) { - switch(step) { - case 0: { - effect* peffect = 0; - card* pcard = 0; - core.select_chains.clear(); - chain newchain; - nil_event.event_code = EVENT_FREE_CHAIN; - if(!core.chain_attack) - core.chain_attack_target = 0; - core.attacker = 0; - core.attack_target = 0; - if((peffect = is_player_affected_by_effect(infos.turn_player, EFFECT_SKIP_BP))) { - core.units.begin()->step = 39; - if(core.phase_action || core.battle_phase_action) - core.units.begin()->arg1 = 2; - else core.units.begin()->arg1 = 3; - if(is_player_affected_by_effect(infos.turn_player, EFFECT_BP_TWICE)) - core.units.begin()->arg2 = 1; - else core.units.begin()->arg2 = 0; - if(!peffect->value) - add_process(PROCESSOR_PHASE_EVENT, 0, 0, 0, PHASE_BATTLE, 0); - else { - core.hint_timing[infos.turn_player] = 0; - reset_phase(PHASE_BATTLE); - adjust_all(); - } - return FALSE; - } - core.battle_phase_action = TRUE; - auto pr = effects.activate_effect.equal_range(EVENT_FREE_CHAIN); - for(; pr.first != pr.second; ++pr.first) { - peffect = pr.first->second; - peffect->s_range = peffect->handler->current.location; - peffect->o_range = peffect->handler->current.sequence; - newchain.triggering_effect = peffect; - if(peffect->is_activateable(infos.turn_player, nil_event) && peffect->get_speed() > 1) - core.select_chains.push_back(newchain); - } - pr = effects.quick_o_effect.equal_range(EVENT_FREE_CHAIN); - for(; pr.first != pr.second; ++pr.first) { - peffect = pr.first->second; - peffect->s_range = peffect->handler->current.location; - peffect->o_range = peffect->handler->current.sequence; - newchain.triggering_effect = peffect; - if(peffect->is_activateable(infos.turn_player, nil_event)) - core.select_chains.push_back(newchain); - } - core.attackable_cards.clear(); - card_vector first_attack; - card_vector must_attack; - if(!is_player_affected_by_effect(infos.turn_player, EFFECT_CANNOT_ATTACK_ANNOUNCE)) { - for(uint32 i = 0; i < 5; ++i) { - pcard = player[infos.turn_player].list_mzone[i]; - if(!pcard) - continue; - if(!pcard->is_capable_attack_announce(infos.turn_player)) - continue; - core.select_cards.clear(); - uint8 chain_attack = FALSE; - if(core.chain_attack && core.pre_field[0] == pcard->fieldid_r) - chain_attack = TRUE; - get_attack_target(pcard, &core.select_cards, chain_attack); - if(core.select_cards.size() == 0 && pcard->operation_param == 0) - continue; - core.attackable_cards.push_back(pcard); - if(pcard->is_affected_by_effect(EFFECT_FIRST_ATTACK)) - first_attack.push_back(pcard); - if(pcard->is_affected_by_effect(EFFECT_MUST_ATTACK)) - must_attack.push_back(pcard); - } - if(first_attack.size()) - core.attackable_cards = first_attack; - } - core.to_m2 = TRUE; - core.to_ep = TRUE; - if(must_attack.size() || is_player_affected_by_effect(infos.turn_player, EFFECT_CANNOT_M2)) - core.to_m2 = FALSE; - if(must_attack.size()) - core.to_ep = FALSE; - core.attack_cancelable = TRUE; - add_process(PROCESSOR_SELECT_BATTLECMD, 0, 0, 0, infos.turn_player, 0); - return FALSE; - } - case 1: { - int32 ctype = returns.ivalue[0] & 0xffff; - int32 sel = returns.ivalue[0] >> 16; - if(ctype == 0) { - chain newchain = core.select_chains[sel]; - effect* peffect = newchain.triggering_effect; - newchain.flag = 0; - newchain.chain_id = infos.field_id++; - newchain.evt.event_code = peffect->code; - newchain.evt.event_player = PLAYER_NONE; - newchain.evt.event_value = 0; - newchain.evt.event_cards = 0; - newchain.evt.reason = 0; - newchain.evt.reason_effect = 0; - newchain.evt.reason_player = PLAYER_NONE; - newchain.triggering_controler = peffect->handler->current.controler; - newchain.triggering_location = peffect->handler->current.location; - newchain.triggering_sequence = peffect->handler->current.sequence; - newchain.triggering_player = infos.turn_player; - core.new_chains.push_back(newchain); - peffect->handler->set_status(STATUS_CHAINING, TRUE); - peffect->dec_count(infos.turn_player); - core.select_chains.clear(); - add_process(PROCESSOR_ADD_CHAIN, 0, 0, 0, 0, 0); - add_process(PROCESSOR_QUICK_EFFECT, 0, 0, 0, FALSE, 1 - infos.turn_player); - infos.priorities[0] = 0; - infos.priorities[1] = 0; - core.select_chains.clear(); - return FALSE; - } else if(ctype == 1) { - core.units.begin()->step = 2; - card* attacker = core.attackable_cards[sel]; - if(core.chain_attack && core.pre_field[0] != attacker->fieldid_r) { - core.chain_attack = FALSE; - core.chain_attack_target = 0; - } - core.attacker = attacker; - core.attacker->set_status(STATUS_ATTACK_CANCELED, FALSE); - core.pre_field[0] = core.attacker->fieldid_r; - core.phase_action = TRUE; - effect_set eset; - filter_player_effect(infos.turn_player, EFFECT_ATTACK_COST, &eset, FALSE); - core.attacker->filter_effect(EFFECT_ATTACK_COST, &eset); - for(int32 i = 0; i < eset.size(); ++i) { - if(eset[i]->operation) { - core.attack_cancelable = FALSE; - core.sub_solving_event.push_back(nil_event); - add_process(PROCESSOR_EXECUTE_OPERATION, 0, eset[i], 0, infos.turn_player, 0); - } - } - return FALSE; - } else { - core.units.begin()->step = 39; - core.units.begin()->arg1 = ctype; - if(is_player_affected_by_effect(infos.turn_player, EFFECT_BP_TWICE)) - core.units.begin()->arg2 = 1; - else core.units.begin()->arg2 = 0; - add_process(PROCESSOR_PHASE_EVENT, 0, 0, 0, PHASE_BATTLE, 0); - adjust_all(); - return FALSE; - } - return TRUE; - } - case 2: { - if(core.chain_limit) { - luaL_unref(pduel->lua->lua_state, LUA_REGISTRYINDEX, core.chain_limit); - core.chain_limit = 0; - } - for(auto cait = core.current_chain.begin(); cait != core.current_chain.end(); ++cait) - cait->triggering_effect->handler->set_status(STATUS_CHAINING, FALSE); - add_process(PROCESSOR_SOLVE_CHAIN, 0, 0, 0, FALSE, 0); - core.units.begin()->step = -1; - return FALSE; - } - case 3: { - //Filter Targers - if(core.attacker->current.location != LOCATION_MZONE || core.attacker->fieldid_r != core.pre_field[0]) { - core.units.begin()->step = -1; - return FALSE; - } - core.select_cards.clear(); - core.units.begin()->arg1 = FALSE; - core.units.begin()->arg2 = get_attack_target(core.attacker, &core.select_cards, core.chain_attack); - return FALSE; - } - case 4: { - //confirm attack_target - card_vector auto_be_attack; - card* atarget; - for(uint32 i = 0; i < 5; ++i) { - atarget = player[1 - infos.turn_player].list_mzone[i]; - if(atarget && atarget->is_affected_by_effect(EFFECT_AUTO_BE_ATTACKED)) - auto_be_attack.push_back(atarget); - } - if(auto_be_attack.size()) { - core.select_cards = auto_be_attack; - if(core.select_cards.size() == 1) - returns.bvalue[1] = 0; - else - add_process(PROCESSOR_SELECT_CARD, 0, 0, 0, 1 - infos.turn_player + (core.attack_cancelable ? 0x20000 : 0), 0x10001); - core.units.begin()->step = 5; - return FALSE; - } - if(core.attacker->operation_param) { - if(core.select_cards.size() == 0) { - returns.ivalue[0] = -2; - core.units.begin()->step = 5; - return FALSE; - } - for(int32 i = 0; i < 5; ++i) { - if(player[1 - infos.turn_player].list_mzone[i]) { - add_process(PROCESSOR_SELECT_YESNO, 0, 0, 0, infos.turn_player, 31); - return FALSE; - } - } - returns.ivalue[0] = -2; - core.units.begin()->step = 5; - return FALSE; - } - if(core.units.begin()->arg2) { - if(core.select_cards.size() == 1) - returns.bvalue[1] = 0; - else - add_process(PROCESSOR_SELECT_CARD, 0, 0, 0, 1 - infos.turn_player + (core.attack_cancelable ? 0x20000 : 0), 0x10001); - core.units.begin()->step = 5; - return FALSE; - } - if(core.select_cards.size() == 0) { - if(!core.attack_cancelable) { - core.attacker->announce_count++; - core.attacker->announced_cards[0] = 0; - } - core.units.begin()->step = -1; - return FALSE; - } - add_process(PROCESSOR_SELECT_CARD, 0, 0, 0, infos.turn_player + (core.attack_cancelable ? 0x20000 : 0), 0x10001); - core.units.begin()->step = 5; - return FALSE; - } - case 5: { - if(returns.ivalue[0]) { - returns.ivalue[0] = -2; - return FALSE; - } else { - if(core.select_cards.size()) - add_process(PROCESSOR_SELECT_CARD, 0, 0, 0, infos.turn_player + (core.attack_cancelable ? 0x20000 : 0), 0x10001); - else - core.units.begin()->step = -1; - } - return FALSE; - } - case 6: { - if(returns.ivalue[0] == -1) { - //rollback - if(core.units.begin()->arg1) { - core.attacker->announce_count++; - if(core.attack_target) - core.attacker->announced_cards[core.attack_target->fieldid_r] = core.attack_target; - else - core.attacker->announced_cards[0] = 0; - } - core.units.begin()->step = -1; - return FALSE; - } - if(returns.ivalue[0] == -2) - core.attack_target = 0; - else - core.attack_target = core.select_cards[returns.bvalue[1]]; - if(core.attack_target) - core.pre_field[1] = core.attack_target->fieldid_r; - else - core.pre_field[1] = 0; - return FALSE; - } - case 7: { - core.attack_cancelable = TRUE; - core.sub_attacker = 0; - core.sub_attack_target = (card*)0xffffffff; - core.attack_state_count[infos.turn_player]++; - check_card_counter(core.attacker, 5, infos.turn_player); - pduel->write_buffer8(MSG_ATTACK); - pduel->write_buffer32(core.attacker->get_info_location()); - if(core.attack_target) { - raise_single_event(core.attack_target, 0, EVENT_BE_BATTLE_TARGET, 0, 0, 0, 1 - infos.turn_player, 0); - raise_event(core.attack_target, EVENT_BE_BATTLE_TARGET, 0, 0, 0, 1 - infos.turn_player, 0); - pduel->write_buffer32(core.attack_target->get_info_location()); - } else - pduel->write_buffer32(0); - if(core.attacker->current.location != LOCATION_MZONE) { - core.units.begin()->step = -1; - return FALSE; - } - core.attack_rollback = FALSE; - for(uint32 i = 0; i < 5; ++i) { - if(player[1 - infos.turn_player].list_mzone[i]) - core.opp_mzone[i] = player[1 - infos.turn_player].list_mzone[i]->fieldid_r; - else - core.opp_mzone[i] = 0; - } - //core.units.begin()->arg1 ---> is rollbacked - if(!core.units.begin()->arg1) { - raise_single_event(core.attacker, 0, EVENT_ATTACK_ANNOUNCE, 0, 0, 0, infos.turn_player, 0); - raise_event(core.attacker, EVENT_ATTACK_ANNOUNCE, 0, 0, 0, infos.turn_player, 0); - } - core.units.begin()->arg2 = (core.attacker->current.controler << 16) + core.attacker->fieldid_r; - process_single_event(); - process_instant_event(); - core.hint_timing[infos.turn_player] = TIMING_ATTACK; - add_process(PROCESSOR_POINT_EVENT, 0, 0, 0, 0, 0); - return FALSE; - } - case 8: { - if(is_player_affected_by_effect(infos.turn_player, EFFECT_SKIP_BP) || core.attack_rollback) { - core.units.begin()->step = 9; - return FALSE; - } - pduel->write_buffer8(MSG_HINT); - pduel->write_buffer8(HINT_EVENT); - pduel->write_buffer8(0); - pduel->write_buffer32(24); - pduel->write_buffer8(MSG_HINT); - pduel->write_buffer8(HINT_EVENT); - pduel->write_buffer8(1); - pduel->write_buffer32(24); - core.hint_timing[0] = TIMING_BATTLE_PHASE; - core.hint_timing[1] = TIMING_BATTLE_PHASE; - add_process(PROCESSOR_POINT_EVENT, 0, 0, 0, 0, 0); - return FALSE; - } - case 9: { - if(returns.ivalue[0]) - core.units.begin()->step = 7; - else - adjust_all(); - return FALSE; - } - case 10: { - uint8 rollback = core.attack_rollback; - bool atk_disabled = false; - uint32 acon = core.units.begin()->arg2 >> 16; - uint32 afid = core.units.begin()->arg2 & 0xffff; - if(core.attacker->is_affected_by_effect(EFFECT_ATTACK_DISABLED)) { - core.attacker->reset(EFFECT_ATTACK_DISABLED, RESET_CODE); - atk_disabled = true; - pduel->write_buffer8(MSG_ATTACK_DISABLED); - core.attacker->set_status(STATUS_ATTACK_CANCELED, TRUE); - } - effect* peffect; - if((peffect = is_player_affected_by_effect(infos.turn_player, EFFECT_SKIP_BP))) { - core.units.begin()->step = 39; - core.units.begin()->arg1 = 2; - if(is_player_affected_by_effect(infos.turn_player, EFFECT_BP_TWICE)) - core.units.begin()->arg2 = 1; - else core.units.begin()->arg2 = 0; - reset_phase(PHASE_DAMAGE); - if(core.attacker->fieldid_r == afid) { - if(!atk_disabled) { - if(core.attack_target) - core.attacker->attacked_cards[core.attack_target->fieldid_r] = core.attack_target; - else - core.attacker->attacked_cards[0] = 0; - } - core.attacker->announce_count++; - attack_all_target_check(); - } - if(!peffect->value) - add_process(PROCESSOR_PHASE_EVENT, 0, 0, 0, PHASE_BATTLE, 0); - else { - core.hint_timing[infos.turn_player] = 0; - reset_phase(PHASE_BATTLE); - adjust_all(); - } - return FALSE; - } - if(atk_disabled || !core.attacker->is_capable_attack() || core.attacker->is_status(STATUS_ATTACK_CANCELED) - || core.attacker->current.controler != acon || core.attacker->fieldid_r != afid) { - if(core.attacker->fieldid_r == afid) { - if(core.attack_target) - core.attacker->announced_cards[core.attack_target->fieldid_r] = core.attack_target; - else - core.attacker->announced_cards[0] = 0; - core.attacker->announce_count++; - attack_all_target_check(); - if(!core.attacker->is_status(STATUS_ATTACK_CANCELED)) { - if(core.attack_target) - core.attacker->attacked_cards[core.attack_target->fieldid_r] = core.attack_target; - else - core.attacker->attacked_cards[0] = 0; - } - } - core.units.begin()->step = -1; - reset_phase(PHASE_DAMAGE); - adjust_all(); - return FALSE; - } - if((core.sub_attacker && core.sub_attacker->is_position(POS_FACEUP) && core.sub_attacker->current.location == LOCATION_MZONE) - || ((core.sub_attack_target != (card*)0xffffffff) && (!core.sub_attack_target || core.sub_attack_target->current.location == LOCATION_MZONE))) { - if(core.sub_attacker) - core.attacker = core.sub_attacker; - if(core.sub_attack_target != (card*)0xffffffff) { - core.attack_target = core.sub_attack_target; - if(core.attack_target) { - raise_single_event(core.attack_target, 0, EVENT_BE_BATTLE_TARGET, 0, REASON_REPLACE, 0, 1 - infos.turn_player, 0); - raise_event(core.attack_target, EVENT_BE_BATTLE_TARGET, 0, REASON_REPLACE, 0, 1 - infos.turn_player, 0); - process_single_event(); - process_instant_event(); - add_process(PROCESSOR_POINT_EVENT, 0, 0, 0, 0, 0); - } - } - core.sub_attacker = 0; - core.sub_attack_target = (card*)0xffffffff; - core.attacker->announce_count++; - attack_all_target_check(); - pduel->write_buffer8(MSG_ATTACK); - pduel->write_buffer32(core.attacker->get_info_location()); - if(core.attack_target) { - core.attacker->announced_cards[core.attack_target->fieldid_r] = core.attack_target; - core.attacker->attacked_cards[core.attack_target->fieldid_r] = core.attack_target; - pduel->write_buffer32(core.attack_target->get_info_location()); - } else { - core.attacker->announced_cards[0] = 0; - core.attacker->attacked_cards[0] = 0; - pduel->write_buffer32(0); - } - core.units.begin()->step = 19; - return FALSE; - } - core.select_cards.clear(); - core.units.begin()->arg2 = get_attack_target(core.attacker, &core.select_cards, core.chain_attack); - for(uint32 i = 0; i < 5; ++i) { - if(player[1 - infos.turn_player].list_mzone[i]) { - if(!core.opp_mzone[i] || core.opp_mzone[i] != player[1 - infos.turn_player].list_mzone[i]->fieldid_r) { - rollback = true; - break; - } - } else { - if(core.opp_mzone[i]) { - rollback = true; - break; - } - } - } - if(!core.attack_target && !core.attacker->operation_param) - rollback = true; - if(!rollback) { - core.attacker->announce_count++; - attack_all_target_check(); - if(core.attack_target) { - core.attacker->announced_cards[core.attack_target->fieldid_r] = core.attack_target; - core.attacker->attacked_cards[core.attack_target->fieldid_r] = core.attack_target; - } else { - core.attacker->announced_cards[0] = 0; - core.attacker->attacked_cards[0] = 0; - } - core.units.begin()->step = 19; - adjust_instant(); - adjust_all(); - return FALSE; - } - if(!core.select_cards.size() && !core.attacker->operation_param) { - core.attacker->announce_count++; - attack_all_target_check(); - core.units.begin()->step = -1; - reset_phase(PHASE_DAMAGE); - adjust_instant(); - adjust_all(); - return FALSE; - } - if(!core.attacker->is_affected_by_effect(EFFECT_MUST_ATTACK)) - add_process(PROCESSOR_SELECT_YESNO, 0, 0, 0, infos.turn_player, 30); - else { - returns.ivalue[0] = TRUE; - core.attack_cancelable = FALSE; - } - return FALSE; - } - case 11: { - if(returns.ivalue[0]) { - core.units.begin()->arg1 = TRUE; - core.units.begin()->step = 3; - return FALSE; - } - core.attacker->announce_count++; - if(core.attack_target) - core.attacker->announced_cards[core.attack_target->fieldid_r] = core.attack_target; - else - core.attacker->announced_cards[0] = 0; - attack_all_target_check(); - core.units.begin()->step = -1; - reset_phase(PHASE_DAMAGE); - adjust_instant(); - adjust_all(); - return FALSE; - } - case 20: { - infos.phase = PHASE_DAMAGE; - core.chain_attack = FALSE; - pduel->write_buffer8(MSG_DAMAGE_STEP_START); - core.units.begin()->arg1 = FALSE; - core.damage_calculated = FALSE; - core.selfdes_disabled = TRUE; - core.flip_delayed = TRUE; - if(core.sub_attacker) - core.attacker = core.sub_attacker; - if(core.sub_attack_target != (card*)0xffffffff) - core.attack_target = core.sub_attack_target; - core.pre_field[0] = core.attacker->fieldid_r; - if(core.attack_target) - core.pre_field[1] = core.attack_target->fieldid_r; - else - core.pre_field[1] = 0; - core.attacker->attacked_count++; - raise_single_event(core.attacker, 0, EVENT_BATTLE_START, 0, 0, 0, 0, 0); - if(core.attack_target) - raise_single_event(core.attack_target, 0, EVENT_BATTLE_START, 0, 0, 0, 0, 1); - raise_event((card*)0, EVENT_BATTLE_START, 0, 0, 0, 0, 0); - process_single_event(); - process_instant_event(); - pduel->write_buffer8(MSG_HINT); - pduel->write_buffer8(HINT_EVENT); - pduel->write_buffer8(0); - pduel->write_buffer32(40); - pduel->write_buffer8(MSG_HINT); - pduel->write_buffer8(HINT_EVENT); - pduel->write_buffer8(1); - pduel->write_buffer32(40); - add_process(PROCESSOR_POINT_EVENT, 0, 0, 0, 0, TRUE); - core.temp_var[2] = 0; - return FALSE; - } - case 21: { - if(core.attacker->current.location != LOCATION_MZONE || core.attacker->fieldid_r != core.pre_field[0] - || (core.attack_target && (core.attack_target->current.location != LOCATION_MZONE || core.attack_target->fieldid_r != core.pre_field[1]))) { - core.units.begin()->step = 37; - return FALSE; - } - if(!core.attack_target) { - return FALSE; - } - core.sub_attacker = 0; - core.sub_attack_target = (card*)0xffffffff; - core.attacker->temp.position = core.attacker->current.position; - core.attack_target->temp.position = core.attack_target->current.position; - if(core.attack_target->is_position(POS_FACEDOWN)) { - change_position(core.attack_target, 0, PLAYER_NONE, core.attack_target->current.position >> 1, 0, TRUE); - adjust_all(); - } - return FALSE; - } - case 22: { - int32 r = core.temp_var[2] == 0 ? 0 : REASON_REPLACE; - raise_single_event(core.attacker, 0, EVENT_BATTLE_CONFIRM, 0, r, 0, 0, 0); - if(core.attack_target) { - if(core.attack_target->temp.position & POS_FACEDOWN) - core.pre_field[1] = core.attack_target->fieldid_r; - raise_single_event(core.attack_target, 0, EVENT_BATTLE_CONFIRM, 0, r, 0, 0, 1); - } - raise_event((card*)0, EVENT_BATTLE_CONFIRM, 0, 0, 0, 0, 0); - process_single_event(); - process_instant_event(); - pduel->write_buffer8(MSG_HINT); - pduel->write_buffer8(HINT_EVENT); - pduel->write_buffer8(0); - pduel->write_buffer32(41); - pduel->write_buffer8(MSG_HINT); - pduel->write_buffer8(HINT_EVENT); - pduel->write_buffer8(1); - pduel->write_buffer32(41); - core.hint_timing[infos.turn_player] = TIMING_DAMAGE_STEP; - add_process(PROCESSOR_POINT_EVENT, 0, 0, 0, 0, 0); - return FALSE; - } - case 23: { - if((core.sub_attack_target != (card*)0xffffffff) || core.sub_attacker) { - if(core.sub_attacker) - core.attacker = core.sub_attacker; - if(core.sub_attack_target != (card*)0xffffffff) - core.attack_target = core.sub_attack_target; - core.units.begin()->step = 20; - core.pre_field[0] = core.attacker->fieldid_r; - if(core.attack_target) - core.pre_field[1] = core.attack_target->fieldid_r; - else - core.pre_field[1] = 0; - core.temp_var[2] = 1; - return FALSE; - } - if(core.attacker->current.location != LOCATION_MZONE || core.attacker->fieldid_r != core.pre_field[0] - || ((core.attacker->current.position & POS_DEFENCE) && !(core.attacker->is_affected_by_effect(EFFECT_DEFENCE_ATTACK))) - || (core.attack_target && (core.attack_target->current.location != LOCATION_MZONE || core.attack_target->fieldid_r != core.pre_field[1]))) { - core.units.begin()->step = 37; - return FALSE; - } - return FALSE; - } - case 24: { - infos.phase = PHASE_DAMAGE_CAL; - calculate_battle_damage(0, 0, 0); - raise_single_event(core.attacker, 0, EVENT_PRE_DAMAGE_CALCULATE, 0, 0, 0, 0, 0); - if(core.attack_target) - raise_single_event(core.attack_target, 0, EVENT_PRE_DAMAGE_CALCULATE, 0, 0, 0, 0, 1); - raise_event((card*)0, EVENT_PRE_DAMAGE_CALCULATE, 0, 0, 0, 0, 0); - process_single_event(); - process_instant_event(); - pduel->write_buffer8(MSG_HINT); - pduel->write_buffer8(HINT_EVENT); - pduel->write_buffer8(0); - pduel->write_buffer32(42); - pduel->write_buffer8(MSG_HINT); - pduel->write_buffer8(HINT_EVENT); - pduel->write_buffer8(1); - pduel->write_buffer32(42); - core.hint_timing[infos.turn_player] = TIMING_DAMAGE_CAL; - add_process(PROCESSOR_POINT_EVENT, 0, 0, 0, 0, TRUE); - return FALSE; - } - case 25: { - if(core.attacker->current.location != LOCATION_MZONE || core.attacker->fieldid_r != core.pre_field[0] - || (core.attack_target && (core.attack_target->current.location != LOCATION_MZONE || core.attack_target->fieldid_r != core.pre_field[1]))) { - core.units.begin()->step = 37; - return FALSE; - } - raise_single_event(core.attacker, 0, EVENT_DAMAGE_CALCULATING, 0, 0, 0, 0, 0); - if(core.attack_target) - raise_single_event(core.attack_target, 0, EVENT_DAMAGE_CALCULATING, 0, 0, 0, 0, 1); - raise_event((card*)0, EVENT_DAMAGE_CALCULATING, 0, 0, 0, 0, 0); - process_single_event(); - process_instant_event(); - //this timing does not exist in Master Rule 3 - core.new_ochain.clear(); - core.new_fchain.clear(); - return FALSE; - } - case 26: { - uint32 aa = core.attacker->get_attack(), ad = core.attacker->get_defence(); - uint32 da = 0, dd = 0; - uint8 pa = core.attacker->current.controler, pd; - core.attacker->q_cache.attack = aa; - core.attacker->q_cache.defence = ad; - core.attacker->set_status(STATUS_BATTLE_DESTROYED, FALSE); - if(core.attack_target) { - da = core.attack_target->get_attack(); - dd = core.attack_target->get_defence(); - core.attack_target->q_cache.attack = da; - core.attack_target->q_cache.defence = dd; - core.attack_target->set_status(STATUS_BATTLE_DESTROYED, FALSE); - pd = core.attack_target->current.controler; - if(pa != pd) { - core.attacker->set_status(STATUS_OPPO_BATTLE, TRUE); - core.attack_target->set_status(STATUS_OPPO_BATTLE, TRUE); - } - } - effect* damchange = 0; - card* reason_card = 0; - uint8 bd[2]; - calculate_battle_damage(&damchange, &reason_card, bd); - if(bd[0]) { - effect* indestructable_effect = core.attacker->is_affected_by_effect(EFFECT_INDESTRUCTABLE_BATTLE, core.attack_target); - if(indestructable_effect) { - pduel->write_buffer8(MSG_HINT); - pduel->write_buffer8(HINT_CARD); - pduel->write_buffer8(0); - pduel->write_buffer32(indestructable_effect->owner->data.code); - bd[0] = FALSE; - } else - core.attacker->set_status(STATUS_BATTLE_DESTROYED, TRUE); - } - if(bd[1]) { - effect* indestructable_effect = core.attack_target->is_affected_by_effect(EFFECT_INDESTRUCTABLE_BATTLE, core.attacker); - if(indestructable_effect) { - pduel->write_buffer8(MSG_HINT); - pduel->write_buffer8(HINT_CARD); - pduel->write_buffer8(0); - pduel->write_buffer32(indestructable_effect->owner->data.code); - bd[1] = FALSE; - } else - core.attack_target->set_status(STATUS_BATTLE_DESTROYED, TRUE); - } - pduel->write_buffer8(MSG_BATTLE); - pduel->write_buffer32(core.attacker->get_info_location()); - pduel->write_buffer32(aa); - pduel->write_buffer32(ad); - pduel->write_buffer8(bd[0]); - if(core.attack_target) { - pduel->write_buffer32(core.attack_target->get_info_location()); - pduel->write_buffer32(da); - pduel->write_buffer32(dd); - pduel->write_buffer8(bd[1]); - } else { - pduel->write_buffer32(0); - pduel->write_buffer32(0); - pduel->write_buffer32(0); - pduel->write_buffer8(0); - } - core.units.begin()->peffect = damchange; - if(reason_card) - core.temp_var[0] = reason_card->current.controler; - if(!reason_card) - core.temp_var[1] = 0; - else if(reason_card == core.attacker) - core.temp_var[1] = 1; - else core.temp_var[1] = 2; - if(!damchange) { - if(core.battle_damage[infos.turn_player]) { - raise_single_event(core.attacker, 0, EVENT_PRE_BATTLE_DAMAGE, 0, 0, reason_card->current.controler, infos.turn_player, core.battle_damage[infos.turn_player]); - if(core.attack_target) - raise_single_event(core.attack_target, 0, EVENT_PRE_BATTLE_DAMAGE, 0, 0, reason_card->current.controler, infos.turn_player, core.battle_damage[infos.turn_player]); - raise_event(reason_card, EVENT_PRE_BATTLE_DAMAGE, 0, 0, reason_card->current.controler, infos.turn_player, core.battle_damage[infos.turn_player]); - } - if(core.battle_damage[1 - infos.turn_player]) { - raise_single_event(core.attacker, 0, EVENT_PRE_BATTLE_DAMAGE, 0, 0, reason_card->current.controler, 1 - infos.turn_player, core.battle_damage[1 - infos.turn_player]); - if(core.attack_target) - raise_single_event(core.attack_target, 0, EVENT_PRE_BATTLE_DAMAGE, 0, 0, reason_card->current.controler, 1 - infos.turn_player, core.battle_damage[1 - infos.turn_player]); - raise_event(reason_card, EVENT_PRE_BATTLE_DAMAGE, 0, 0, reason_card->current.controler, 1 - infos.turn_player, core.battle_damage[1 - infos.turn_player]); - } - } - process_single_event(); - process_instant_event(); - //this timing does not exist in Master Rule 3 - core.damage_calculated = TRUE; - if(core.effect_damage_step) - return TRUE; - return FALSE; - } - case 27: { - infos.phase = PHASE_DAMAGE; - core.hint_timing[infos.turn_player] = 0; - core.chain_attack = FALSE; - if(core.attack_target) { - core.attacker->battled_cards[core.attack_target->fieldid_r] = core.attack_target; - core.attack_target->battled_cards[core.attacker->fieldid_r] = core.attacker; - } else - core.attacker->battled_cards[0] = 0; - uint8 reason_player = core.temp_var[0]; - card* reason_card = 0; - if(core.temp_var[1] == 1) - reason_card = core.attacker; - else if(core.temp_var[1] == 2) - reason_card = core.attack_target; - effect* damchange = core.units.begin()->peffect; - if(!damchange) { - if(core.battle_damage[0]) - damage(0, REASON_BATTLE, reason_player, reason_card, 0, core.battle_damage[0]); - if(core.battle_damage[1]) - damage(0, REASON_BATTLE, reason_player, reason_card, 1, core.battle_damage[1]); - } else { - if(core.battle_damage[0]) - damage(damchange, REASON_EFFECT, reason_player, reason_card, 0, core.battle_damage[0]); - if(core.battle_damage[1]) - damage(damchange, REASON_EFFECT, reason_player, reason_card, 1, core.battle_damage[1]); - } - reset_phase(PHASE_DAMAGE_CAL); - adjust_all(); - return FALSE; - } - case 28: { - card_set des; - effect* peffect; - uint32 dest, seq; - if(core.attacker->is_status(STATUS_BATTLE_DESTROYED) - && core.attacker->current.location == LOCATION_MZONE && core.attacker->fieldid_r == core.pre_field[0]) { - des.insert(core.attacker); - core.attacker->temp.reason = core.attacker->current.reason; - core.attacker->temp.reason_card = core.attacker->current.reason_card; - core.attacker->temp.reason_effect = core.attacker->current.reason_effect; - core.attacker->temp.reason_player = core.attacker->current.reason_player; - core.attacker->current.reason_effect = 0; - core.attacker->current.reason = REASON_BATTLE; - core.attacker->current.reason_card = core.attack_target; - core.attacker->current.reason_player = core.attack_target->current.controler; - dest = LOCATION_GRAVE; - seq = 0; - if((peffect = core.attack_target->is_affected_by_effect(EFFECT_BATTLE_DESTROY_REDIRECT)) && (core.attacker->data.type & TYPE_MONSTER)) { - dest = peffect->get_value(core.attacker); - seq = dest >> 16; - dest &= 0xffff; - } - core.attacker->operation_param = (POS_FACEUP << 24) + (((uint32)core.attacker->owner) << 16) + (dest << 8) + seq; - } - if(core.attack_target && core.attack_target->is_status(STATUS_BATTLE_DESTROYED) - && core.attack_target->current.location == LOCATION_MZONE && core.attack_target->fieldid_r == core.pre_field[1]) { - des.insert(core.attack_target); - core.attack_target->temp.reason = core.attack_target->current.reason; - core.attack_target->temp.reason_card = core.attack_target->current.reason_card; - core.attack_target->temp.reason_effect = core.attack_target->current.reason_effect; - core.attack_target->temp.reason_player = core.attack_target->current.reason_player; - core.attack_target->current.reason_effect = 0; - core.attack_target->current.reason = REASON_BATTLE; - core.attack_target->current.reason_card = core.attacker; - core.attack_target->current.reason_player = core.attacker->current.controler; - dest = LOCATION_GRAVE; - seq = 0; - if((peffect = core.attacker->is_affected_by_effect(EFFECT_BATTLE_DESTROY_REDIRECT)) && (core.attack_target->data.type & TYPE_MONSTER)) { - dest = peffect->get_value(core.attack_target); - seq = dest >> 16; - dest &= 0xffff; - } - core.attack_target->operation_param = (POS_FACEUP << 24) + (((uint32)core.attack_target->owner) << 16) + (dest << 8) + seq; - } - core.attacker->set_status(STATUS_BATTLE_DESTROYED, FALSE); - if(core.attack_target) - core.attack_target->set_status(STATUS_BATTLE_DESTROYED, FALSE); - core.battle_destroy_rep.clear(); - core.desrep_chain.clear(); - if(des.size()) { - group* ng = pduel->new_group(); - ng->container.swap(des); - ng->is_readonly = TRUE; - add_process(PROCESSOR_DESTROY, 10, 0, ng, REASON_BATTLE, PLAYER_NONE); - core.units.begin()->ptarget = ng; - } - return FALSE; - } - case 29: { - core.selfdes_disabled = FALSE; - group* des = core.units.begin()->ptarget; - if(des && des->container.size()) { - for(auto cit = des->container.begin(); cit != des->container.end(); ++cit) { - (*cit)->set_status(STATUS_BATTLE_DESTROYED, TRUE); - (*cit)->filter_disable_related_cards(); - } - } - adjust_all(); - return FALSE; - } - case 30: { - //EVENT_BATTLE_END was here, but this timing does not exist in Master Rule 3 - core.units.begin()->arg1 = 1; - return FALSE; - } - case 31: { - core.flip_delayed = FALSE; - core.new_fchain.splice(core.new_fchain.begin(), core.new_fchain_b); - core.new_ochain.splice(core.new_ochain.begin(), core.new_ochain_b); - raise_single_event(core.attacker, 0, EVENT_BATTLED, 0, 0, PLAYER_NONE, 0, 0); - if(core.attack_target) - raise_single_event(core.attack_target, 0, EVENT_BATTLED, 0, 0, PLAYER_NONE, 0, 1); - raise_event((card*)0, EVENT_BATTLED, 0, 0, PLAYER_NONE, 0, 0); - process_single_event(); - process_instant_event(); - pduel->write_buffer8(MSG_HINT); - pduel->write_buffer8(HINT_EVENT); - pduel->write_buffer8(0); - pduel->write_buffer32(43); - pduel->write_buffer8(MSG_HINT); - pduel->write_buffer8(HINT_EVENT); - pduel->write_buffer8(1); - pduel->write_buffer32(43); - add_process(PROCESSOR_POINT_EVENT, 0, 0, 0, 0, TRUE); - return FALSE; - } - case 32: { - group* des = core.units.begin()->ptarget; - if(core.battle_destroy_rep.size()) - destroy(&core.battle_destroy_rep, 0, REASON_EFFECT, PLAYER_NONE); - if(core.desrep_chain.size()) - add_process(PROCESSOR_OPERATION_REPLACE, 15, 0, 0, 0, 0); - if(des) { - card_set::iterator cit, rm; - for(cit = des->container.begin(); cit != des->container.end();) { - rm = cit++; - if((*rm)->current.location != LOCATION_MZONE || ((*rm)->fieldid_r != core.pre_field[0] && (*rm)->fieldid_r != core.pre_field[1])) - des->container.erase(rm); - } - add_process(PROCESSOR_DESTROY, 3, 0, des, REASON_BATTLE, PLAYER_NONE); - } - adjust_all(); - return FALSE; - } - case 33: { - core.units.begin()->ptarget = 0; - card_set ing; - card_set ed; - if(core.attacker->is_status(STATUS_BATTLE_DESTROYED) - && !(core.attacker->current.reason & REASON_RULE) - && !((core.attacker->current.reason & REASON_EFFECT + REASON_DESTROY) == REASON_EFFECT + REASON_DESTROY)) { - raise_single_event(core.attack_target, 0, EVENT_BATTLE_DESTROYING, 0, core.attacker->current.reason, core.attack_target->current.controler, 0, 1); - raise_single_event(core.attacker, 0, EVENT_BATTLE_DESTROYED, 0, core.attacker->current.reason, core.attack_target->current.controler, 0, 0); - raise_single_event(core.attacker, 0, EVENT_DESTROYED, 0, core.attacker->current.reason, core.attack_target->current.controler, 0, 0); - ing.insert(core.attack_target); - ed.insert(core.attacker); - } - if(core.attack_target && core.attack_target->is_status(STATUS_BATTLE_DESTROYED) - && !(core.attack_target->current.reason & REASON_RULE) - && !((core.attack_target->current.reason & REASON_EFFECT + REASON_DESTROY) == REASON_EFFECT + REASON_DESTROY)) { - raise_single_event(core.attacker, 0, EVENT_BATTLE_DESTROYING, 0, core.attack_target->current.reason, core.attacker->current.controler, 0, 0); - raise_single_event(core.attack_target, 0, EVENT_BATTLE_DESTROYED, 0, core.attack_target->current.reason, core.attacker->current.controler, 0, 1); - raise_single_event(core.attack_target, 0, EVENT_DESTROYED, 0, core.attack_target->current.reason, core.attacker->current.controler, 0, 1); - ing.insert(core.attacker); - ed.insert(core.attack_target); - } - if(ing.size()) - raise_event(&ing, EVENT_BATTLE_DESTROYING, 0, 0, 0, 0, 0); - if(ed.size()) { - raise_event(&ed, EVENT_BATTLE_DESTROYED, 0, 0, 0, 0, 0); - raise_event(&ed, EVENT_DESTROYED, 0, 0, 0, 0, 0); - } - raise_single_event(core.attacker, 0, EVENT_DAMAGE_STEP_END, 0, 0, 0, 0, 0); - if(core.attack_target) - raise_single_event(core.attack_target, 0, EVENT_DAMAGE_STEP_END, 0, 0, 0, 0, 1); - raise_event((card*)0, EVENT_DAMAGE_STEP_END, 0, 0, 0, 0, 0); - process_single_event(); - process_instant_event(); - core.attacker->set_status(STATUS_BATTLE_DESTROYED, FALSE); - core.attacker->set_status(STATUS_OPPO_BATTLE, FALSE); - if(core.attack_target) { - core.attack_target->set_status(STATUS_BATTLE_DESTROYED, FALSE); - core.attack_target->set_status(STATUS_OPPO_BATTLE, FALSE); - } - pduel->write_buffer8(MSG_HINT); - pduel->write_buffer8(HINT_EVENT); - pduel->write_buffer8(0); - pduel->write_buffer32(44); - pduel->write_buffer8(MSG_HINT); - pduel->write_buffer8(HINT_EVENT); - pduel->write_buffer8(1); - pduel->write_buffer32(44); - add_process(PROCESSOR_POINT_EVENT, 0, 0, 0, 0, TRUE); - core.units.begin()->step = 38; - return FALSE; - } - case 38: { - core.units.begin()->arg1 = 0; - core.damage_calculated = TRUE; - core.selfdes_disabled = FALSE; - core.flip_delayed = FALSE; - core.new_fchain.splice(core.new_fchain.begin(), core.new_fchain_b); - core.new_ochain.splice(core.new_ochain.begin(), core.new_ochain_b); - if(core.new_fchain.size() || core.new_ochain.size()) - add_process(PROCESSOR_POINT_EVENT, 0, 0, 0, 0, 0); - return FALSE; - } - case 39: { - //end of damage step - core.units.begin()->step = -1; - infos.phase = PHASE_BATTLE; - pduel->write_buffer8(MSG_DAMAGE_STEP_END); - reset_phase(PHASE_DAMAGE); - adjust_all(); - if(core.effect_damage_step) - return TRUE; - return FALSE; - } - case 40: { - core.attacker = 0; - core.attack_target = 0; - returns.ivalue[0] = core.units.begin()->arg1; - returns.ivalue[1] = core.units.begin()->arg2; - return TRUE; - } - } - return TRUE; -} -int32 field::process_damage_step(uint16 step) { - switch(step) { - case 0: { - core.effect_damage_step = 1; - card* tmp = core.attacker; - core.attacker = (card*)core.units.begin()->peffect; - core.units.begin()->peffect = (effect*)tmp; - tmp = core.attack_target; - core.attack_target = (card*)core.units.begin()->ptarget; - core.units.begin()->ptarget = (group*)tmp; - core.units.begin()->arg1 = infos.phase; - if(core.attacker->current.location != LOCATION_MZONE || core.attack_target->current.location != LOCATION_MZONE) { - core.units.begin()->step = 2; - return FALSE; - } - pduel->write_buffer8(MSG_ATTACK); - pduel->write_buffer32(core.attacker->get_info_location()); - pduel->write_buffer32(core.attack_target->get_info_location()); - infos.phase = PHASE_DAMAGE; - pduel->write_buffer8(MSG_DAMAGE_STEP_START); - core.pre_field[0] = core.attacker->fieldid_r; - core.attacker->attacked_count++; - if(core.attack_target) - core.pre_field[1] = core.attack_target->fieldid_r; - else - core.pre_field[1] = 0; - if(core.attack_target->is_position(POS_FACEDOWN)) { - change_position(core.attack_target, 0, PLAYER_NONE, core.attack_target->current.position >> 1, 0, TRUE); - adjust_all(); - } - return FALSE; - } - case 1: { - infos.phase = PHASE_DAMAGE_CAL; - raise_single_event(core.attacker, 0, EVENT_DAMAGE_CALCULATING, 0, 0, 0, 0, 0); - if(core.attack_target) - raise_single_event(core.attack_target, 0, EVENT_DAMAGE_CALCULATING, 0, 0, 0, 0, 1); - raise_event((card*)0, EVENT_DAMAGE_CALCULATING, 0, 0, 0, 0, 0); - process_single_event(); - process_instant_event(); - add_process(PROCESSOR_BATTLE_COMMAND, 26, 0, 0, 0, 0); - core.units.begin()->step = 2; - core.reserved = core.units.front(); - return TRUE; - } - case 2: { - core.effect_damage_step = 2; - add_process(PROCESSOR_BATTLE_COMMAND, 27, 0, 0, 0, 0); - return FALSE; - } - case 3: { - core.attacker = (card*)core.units.begin()->peffect; - core.attack_target = (card*)core.units.begin()->ptarget; - if(core.attacker) - core.attacker->set_status(STATUS_ATTACK_CANCELED, TRUE); - if(core.attack_target) - core.attack_target->set_status(STATUS_ATTACK_CANCELED, TRUE); - core.effect_damage_step = 0; - infos.phase = core.units.begin()->arg1; - return TRUE; - } - } - return TRUE; -} -void field::calculate_battle_damage(effect** pdamchange, card** preason_card, uint8* battle_destroyed) -{ - uint32 aa = core.attacker->get_attack(), ad = core.attacker->get_defence(); - uint32 da = 0, dd = 0, a = aa, d; - uint8 pa = core.attacker->current.controler, pd; - uint8 damp = 0; - effect* damchange = 0; - card* reason_card = 0; - uint8 bd[2] = {FALSE, FALSE}; - core.battle_damage[0] = core.battle_damage[1] = 0; - if(core.attacker->is_position(POS_FACEUP_DEFENCE)) { - effect* defattack = core.attacker->is_affected_by_effect(EFFECT_DEFENCE_ATTACK); - if(defattack && defattack->get_value(core.attacker)) - a = ad; - } - if(core.attack_target) { - da = core.attack_target->get_attack(); - dd = core.attack_target->get_defence(); - pd = core.attack_target->current.controler; - if(core.attack_target->is_position(POS_ATTACK)) { - d = da; - if(a > d) { - damchange = core.attacker->is_affected_by_effect(EFFECT_BATTLE_DAMAGE_TO_EFFECT); - if(damchange) { - damp = pd; - core.battle_damage[damp] = a - d; - reason_card = core.attacker; - } else if(!core.attacker->is_affected_by_effect(EFFECT_NO_BATTLE_DAMAGE) - && !core.attack_target->is_affected_by_effect(EFFECT_AVOID_BATTLE_DAMAGE, core.attacker) - && !is_player_affected_by_effect(pd, EFFECT_AVOID_BATTLE_DAMAGE)) { - if(core.attack_target->is_affected_by_effect(EFFECT_REFLECT_BATTLE_DAMAGE, core.attacker)) - damp = 1 - pd; - else damp = pd; - if(is_player_affected_by_effect(damp, EFFECT_REFLECT_BATTLE_DAMAGE)) - damp = 1 - damp; - if(damp == pd || (!core.attacker->is_affected_by_effect(EFFECT_AVOID_BATTLE_DAMAGE, core.attack_target) - && !is_player_affected_by_effect(damp, EFFECT_AVOID_BATTLE_DAMAGE))) { - core.battle_damage[damp] = a - d; - reason_card = core.attacker; - } - } - bd[1] = TRUE; - } else if (a < d) { - damchange = core.attack_target->is_affected_by_effect(EFFECT_BATTLE_DAMAGE_TO_EFFECT); - if(damchange) { - damp = pa; - core.battle_damage[damp] = d - a; - reason_card = core.attack_target; - } else if(!core.attack_target->is_affected_by_effect(EFFECT_NO_BATTLE_DAMAGE) - && !core.attacker->is_affected_by_effect(EFFECT_AVOID_BATTLE_DAMAGE, core.attack_target) - && !is_player_affected_by_effect(pa, EFFECT_AVOID_BATTLE_DAMAGE)) { - if(core.attacker->is_affected_by_effect(EFFECT_REFLECT_BATTLE_DAMAGE, core.attack_target)) - damp = 1 - pa; - else damp = pa; - if(is_player_affected_by_effect(damp, EFFECT_REFLECT_BATTLE_DAMAGE)) - damp = 1 - damp; - if(damp == pa || (!core.attack_target->is_affected_by_effect(EFFECT_AVOID_BATTLE_DAMAGE, core.attacker) - && !is_player_affected_by_effect(damp, EFFECT_AVOID_BATTLE_DAMAGE))) { - core.battle_damage[damp] = d - a; - reason_card = core.attack_target; - } - } - bd[0] = TRUE; - } else { - if(a != 0) { - bd[0] = TRUE; - bd[1] = TRUE; - } - } - } else { - d = dd; - if(a > d) { - effect_set eset; - uint8 dp[2]; - dp[0] = dp[1] = 0; - core.attacker->filter_effect(EFFECT_PIERCE, &eset); - if(eset.size() && !core.attacker->is_affected_by_effect(EFFECT_NO_BATTLE_DAMAGE) - && !core.attack_target->is_affected_by_effect(EFFECT_AVOID_BATTLE_DAMAGE, core.attacker)) { - for(int32 i = 0; i < eset.size(); ++i) - dp[1 - eset[i]->get_handler_player()] = 1; - if(dp[0] && is_player_affected_by_effect(0, EFFECT_AVOID_BATTLE_DAMAGE)) - dp[0] = 0; - if(dp[1] && is_player_affected_by_effect(1, EFFECT_AVOID_BATTLE_DAMAGE)) - dp[1] = 0; - if(dp[pd] && core.attack_target->is_affected_by_effect(EFFECT_REFLECT_BATTLE_DAMAGE, core.attacker)) { - dp[pd] = 0; - dp[1 - pd] = 1; - } - if(dp[pd] && is_player_affected_by_effect(pd, EFFECT_REFLECT_BATTLE_DAMAGE)) { - dp[pd] = 0; - dp[1 - pd] = 1; - } - if(dp[1 - pd] && is_player_affected_by_effect(1 - pd, EFFECT_REFLECT_BATTLE_DAMAGE)) { - dp[pd] = 1; - dp[1 - pd] = 0; - } - if(dp[pd] && !core.attack_target->is_affected_by_effect(EFFECT_AVOID_BATTLE_DAMAGE, core.attacker) - && !is_player_affected_by_effect(pd, EFFECT_AVOID_BATTLE_DAMAGE)) - core.battle_damage[pd] = a - d; - if(dp[1 - pd] && !core.attacker->is_affected_by_effect(EFFECT_AVOID_BATTLE_DAMAGE, core.attack_target) - && !is_player_affected_by_effect(1 - pd, EFFECT_AVOID_BATTLE_DAMAGE)) - core.battle_damage[1 - pd] = a - d; - reason_card = core.attacker; - } - bd[1] = TRUE; - } else if (a < d) { - damchange = core.attack_target->is_affected_by_effect(EFFECT_BATTLE_DAMAGE_TO_EFFECT); - if(damchange) { - damp = pa; - core.battle_damage[damp] = d - a; - reason_card = core.attack_target; - } else if(!core.attack_target->is_affected_by_effect(EFFECT_NO_BATTLE_DAMAGE) - && !core.attacker->is_affected_by_effect(EFFECT_AVOID_BATTLE_DAMAGE, core.attack_target) - && !is_player_affected_by_effect(pa, EFFECT_AVOID_BATTLE_DAMAGE)) { - if(core.attacker->is_affected_by_effect(EFFECT_REFLECT_BATTLE_DAMAGE, core.attack_target)) - damp = 1 - pa; - else damp = pa; - if(is_player_affected_by_effect(damp, EFFECT_REFLECT_BATTLE_DAMAGE)) - damp = 1 - damp; - if(damp == pa || (!core.attack_target->is_affected_by_effect(EFFECT_AVOID_BATTLE_DAMAGE, core.attacker) - && !is_player_affected_by_effect(damp, EFFECT_AVOID_BATTLE_DAMAGE))) { - core.battle_damage[damp] = d - a; - reason_card = core.attack_target; - } - } - } - } - } else { - damchange = core.attacker->is_affected_by_effect(EFFECT_BATTLE_DAMAGE_TO_EFFECT); - if(damchange) { - damp = 1 - pa; - core.battle_damage[damp] = a; - reason_card = core.attacker; - } else if(!core.attacker->is_affected_by_effect(EFFECT_NO_BATTLE_DAMAGE) - && !is_player_affected_by_effect(1 - pa, EFFECT_AVOID_BATTLE_DAMAGE)) { - damp = 1 - pa; - if(is_player_affected_by_effect(damp, EFFECT_REFLECT_BATTLE_DAMAGE)) - damp = 1 - damp; - if(!is_player_affected_by_effect(damp, EFFECT_AVOID_BATTLE_DAMAGE)) { - core.battle_damage[damp] = a; - reason_card = core.attacker; - } - } - } - if(pdamchange) - *pdamchange = damchange; - if(preason_card) - *preason_card = reason_card; - if(battle_destroyed) { - battle_destroyed[0] = bd[0]; - battle_destroyed[1] = bd[1]; - } -} -int32 field::process_turn(uint16 step, uint8 turn_player) { - switch(step) { - case 0: { - //Pre Draw - card* pcard; - for(auto elit = core.used_event.begin(); elit != core.used_event.end(); ++elit) { - if(elit->event_cards) - pduel->delete_group(elit->event_cards); - } - core.used_event.clear(); - for(auto eit = core.reseted_effects.begin(); eit != core.reseted_effects.end(); ++eit) { - pduel->delete_effect(*eit); - } - core.reseted_effects.clear(); - core.effect_count_code.clear(); - for(uint8 p = 0; p < 2; ++p) { - for(uint8 i = 0; i < 5; ++i) { - pcard = player[p].list_mzone[i]; - if(!pcard) - continue; - pcard->set_status(STATUS_SUMMON_TURN, FALSE); - pcard->set_status(STATUS_FLIP_SUMMON_TURN, FALSE); - pcard->set_status(STATUS_SPSUMMON_TURN, FALSE); - pcard->set_status(STATUS_SET_TURN, FALSE); - pcard->set_status(STATUS_FORM_CHANGED, FALSE); - pcard->announce_count = 0; - pcard->attacked_count = 0; - pcard->announced_cards.clear(); - pcard->attacked_cards.clear(); - pcard->battled_cards.clear(); - pcard->attack_all_target = TRUE; - } - for(uint8 i = 0; i < 8; ++i) { - pcard = player[p].list_szone[i]; - if(!pcard) - continue; - pcard->set_status(STATUS_SET_TURN, FALSE); - } - core.summon_state_count[p] = 0; - core.normalsummon_state_count[p] = 0; - core.flipsummon_state_count[p] = 0; - core.spsummon_state_count[p] = 0; - core.spsummon_state_count_rst[p] = 0; - core.attack_state_count[p] = 0; - core.battle_phase_count[p] = 0; - core.summon_count[p] = 0; - core.extra_summon[p] = 0; - core.spsummon_once_map[p].clear(); - core.spsummon_once_map_rst[p].clear(); - } - core.spsummon_rst = false; - for(auto rit = effects.rechargeable.begin(); rit != effects.rechargeable.end(); ++rit) - if(!((*rit)->flag & EFFECT_FLAG_NO_TURN_RESET)) - (*rit)->recharge(); - for(auto iter = core.summon_counter.begin(); iter != core.summon_counter.end(); ++iter) - iter->second.second = 0; - for(auto iter = core.normalsummon_counter.begin(); iter != core.normalsummon_counter.end(); ++iter) - iter->second.second = 0; - for(auto iter = core.spsummon_counter.begin(); iter != core.spsummon_counter.end(); ++iter) - iter->second.second = 0; - for(auto iter = core.flipsummon_counter.begin(); iter != core.flipsummon_counter.end(); ++iter) - iter->second.second = 0; - for(auto iter = core.attack_counter.begin(); iter != core.attack_counter.end(); ++iter) - iter->second.second = 0; - for(auto iter = core.chain_counter.begin(); iter != core.chain_counter.end(); ++iter) - iter->second.second = 0; - if(core.global_flag & GLOBALFLAG_SPSUMMON_COUNT) { - for(auto iter = effects.spsummon_count_eff.begin(); iter != effects.spsummon_count_eff.end(); ++iter) { - effect* peffect = *iter; - card* pcard = peffect->handler; - if(!(peffect->flag & EFFECT_FLAG_NO_TURN_RESET)) { - pcard->spsummon_counter[0] = pcard->spsummon_counter[1] = 0; - pcard->spsummon_counter_rst[0] = pcard->spsummon_counter_rst[1] = 0; - } - } - } - infos.turn_id++; - infos.turn_player = turn_player; - pduel->write_buffer8(MSG_NEW_TURN); - pduel->write_buffer8(turn_player); - if((core.duel_options & DUEL_TAG_MODE) && infos.turn_id != 1) - tag_swap(turn_player); - if(is_player_affected_by_effect(infos.turn_player, EFFECT_SKIP_TURN)) { - core.units.begin()->step = 17; - reset_phase(PHASE_DRAW); - reset_phase(PHASE_STANDBY); - reset_phase(PHASE_END); - adjust_all(); - return FALSE; - } - infos.phase = PHASE_DRAW; - core.phase_action = FALSE; - core.hand_adjusted = FALSE; - raise_event((card*)0, EVENT_PHASE_START + PHASE_DRAW, 0, 0, 0, turn_player, 0); - process_instant_event(); - adjust_all(); - return FALSE; - } - case 1: { - core.new_fchain.clear(); - core.new_ochain.clear(); - core.quick_f_chain.clear(); - core.delayed_quick_tmp.clear(); - if(is_player_affected_by_effect(infos.turn_player, EFFECT_SKIP_DP)) { - core.units.begin()->step = 2; - reset_phase(PHASE_DRAW); - adjust_all(); - return FALSE; - } - pduel->write_buffer8(MSG_NEW_PHASE); - pduel->write_buffer8(infos.phase); - raise_event((card*)0, EVENT_PREDRAW, 0, 0, 0, turn_player, 0); - process_instant_event(); - if(core.new_fchain.size() || core.new_ochain.size()) - add_process(PROCESSOR_POINT_EVENT, 0, 0, 0, 0, 0); - return FALSE; - } - case 2: { - // Draw, new ruling - if((core.duel_options & DUEL_OBSOLETE_RULING) || (infos.turn_id > 1)) { - int32 count = get_draw_count(infos.turn_player); - if(count > 0) { - draw(0, REASON_RULE, turn_player, turn_player, count); - add_process(PROCESSOR_POINT_EVENT, 0, 0, 0, 0, 0); - } - } - add_process(PROCESSOR_PHASE_EVENT, 0, 0, 0, PHASE_DRAW, 0); - return FALSE; - } - case 3: { - //Standby Phase - infos.phase = PHASE_STANDBY; - core.phase_action = FALSE; - raise_event((card*)0, EVENT_PHASE_PRESTART + PHASE_STANDBY, 0, 0, 0, turn_player, 0); - process_instant_event(); - adjust_all(); - return FALSE; - } - case 4: { - core.new_fchain.clear(); - core.new_ochain.clear(); - core.quick_f_chain.clear(); - core.delayed_quick_tmp.clear(); - if(is_player_affected_by_effect(infos.turn_player, EFFECT_SKIP_SP)) { - core.units.begin()->step = 5; - reset_phase(PHASE_STANDBY); - adjust_all(); - return FALSE; - } - pduel->write_buffer8(MSG_NEW_PHASE); - pduel->write_buffer8(infos.phase); - raise_event((card*)0, EVENT_PHASE_START + PHASE_STANDBY, 0, 0, 0, turn_player, 0); - process_instant_event(); - return FALSE; - } - case 5: { - if(core.new_fchain.size() || core.new_ochain.size() || core.instant_event.back().event_code != EVENT_PHASE_START + PHASE_STANDBY) - add_process(PROCESSOR_POINT_EVENT, 0, 0, 0, 0, 0); - add_process(PROCESSOR_PHASE_EVENT, 0, 0, 0, PHASE_STANDBY, 0); - return FALSE; - } - case 6: { - //Main1 - infos.phase = PHASE_MAIN1; - core.phase_action = FALSE; - raise_event((card*)0, EVENT_PHASE_START + PHASE_MAIN1, 0, 0, 0, turn_player, 0); - process_instant_event(); - adjust_all(); - return FALSE; - } - case 7: { - if(core.new_fchain.size() || core.new_ochain.size()) - add_process(PROCESSOR_POINT_EVENT, 0, 0, 0, 0, 0); - return FALSE; - } - case 8: { - core.new_fchain.clear(); - core.new_ochain.clear(); - core.quick_f_chain.clear(); - core.delayed_quick_tmp.clear(); - pduel->write_buffer8(MSG_NEW_PHASE); - pduel->write_buffer8(infos.phase); - - add_process(PROCESSOR_IDLE_COMMAND, 0, 0, 0, 0, 0); - return FALSE; - } - case 9: { - if(returns.ivalue[0] == 7) { // End Phase - core.units.begin()->step = 14; - return FALSE; - } - infos.phase = PHASE_BATTLE; - core.phase_action = FALSE; - core.battle_phase_action = FALSE; - core.battle_phase_count[infos.turn_player]++; - pduel->write_buffer8(MSG_NEW_PHASE); - pduel->write_buffer8(infos.phase); - pduel->write_buffer8(MSG_HINT); - pduel->write_buffer8(HINT_EVENT); - pduel->write_buffer8(infos.turn_player); - pduel->write_buffer32(28); - pduel->write_buffer8(MSG_HINT); - pduel->write_buffer8(HINT_EVENT); - pduel->write_buffer8(1 - infos.turn_player); - pduel->write_buffer32(28); - raise_event((card*)0, EVENT_PHASE_START + PHASE_BATTLE, 0, 0, 0, turn_player, 0); - process_instant_event(); - adjust_all(); - return FALSE; - } - case 10: { - core.hint_timing[infos.turn_player] = TIMING_BATTLE_START; - add_process(PROCESSOR_POINT_EVENT, 0, 0, 0, 0, 0); - return FALSE; - } - case 11: { - core.new_fchain.clear(); - core.new_ochain.clear(); - core.quick_f_chain.clear(); - core.delayed_quick_tmp.clear(); - core.chain_attack = FALSE; - add_process(PROCESSOR_BATTLE_COMMAND, 0, 0, 0, 0, 0); - return FALSE; - } - case 12: { - if(core.units.begin()->arg2 == 0 && returns.ivalue[1]) { - core.units.begin()->arg2 = 1; - core.units.begin()->step = 8; - for(uint8 p = 0; p < 2; ++p) { - for(uint8 i = 0; i < 5; ++i) { - card* pcard = player[p].list_mzone[i]; - if(!pcard) - continue; - pcard->announce_count = 0; - pcard->attacked_count = 0; - pcard->announced_cards.clear(); - pcard->attacked_cards.clear(); - pcard->battled_cards.clear(); - } - } - return FALSE; - } - core.skip_m2 = FALSE; - if(returns.ivalue[0] == 3) { // End Phase - core.skip_m2 = TRUE; - } - //Main2 - infos.phase = PHASE_MAIN2; - core.phase_action = FALSE; - raise_event((card*)0, EVENT_PHASE_START + PHASE_MAIN2, 0, 0, 0, turn_player, 0); - process_instant_event(); - adjust_all(); - return FALSE; - } - case 13: { - if(core.new_fchain.size() || core.new_ochain.size()) - add_process(PROCESSOR_POINT_EVENT, 0, 0, 0, 0, 0); - return FALSE; - } - case 14: { - core.new_fchain.clear(); - core.new_ochain.clear(); - core.quick_f_chain.clear(); - core.delayed_quick_tmp.clear(); - pduel->write_buffer8(MSG_NEW_PHASE); - pduel->write_buffer8(infos.phase); - infos.can_shuffle = TRUE; - add_process(PROCESSOR_IDLE_COMMAND, 0, 0, 0, 0, 0); - return FALSE; - } - case 15: { - //End Phase - infos.phase = PHASE_END; - core.phase_action = FALSE; - pduel->write_buffer8(MSG_NEW_PHASE); - pduel->write_buffer8(infos.phase); - raise_event((card*)0, EVENT_PHASE_START + PHASE_END, 0, 0, 0, turn_player, 0); - process_instant_event(); - adjust_all(); - return FALSE; - } - case 16: { - if(core.new_fchain.size() || core.new_ochain.size()) - add_process(PROCESSOR_POINT_EVENT, 0, 0, 0, 0, 0); - return FALSE; - } - case 17: { - core.new_fchain.clear(); - core.new_ochain.clear(); - core.quick_f_chain.clear(); - core.delayed_quick_tmp.clear(); - add_process(PROCESSOR_PHASE_EVENT, 0, 0, 0, PHASE_END, 0); - return FALSE; - } - case 18: { - raise_event((card*)0, EVENT_TURN_END, 0, 0, 0, turn_player, 0); - process_instant_event(); - adjust_all(); - return FALSE; - } - case 19: { - core.new_fchain.clear(); - core.new_ochain.clear(); - core.quick_f_chain.clear(); - core.delayed_quick_tmp.clear(); - core.units.begin()->step = -1; - core.units.begin()->arg1 = 1 - core.units.begin()->arg1; - return FALSE; - } - } - return TRUE; -} -int32 field::add_chain(uint16 step) { - switch (step) { - case 0: { - auto& clit = core.new_chains.front(); - effect* peffect = clit.triggering_effect; - if (!core.new_chains.size()) - return TRUE; - effect_set eset; - filter_player_effect(clit.triggering_player, EFFECT_ACTIVATE_COST, &eset); - for(int32 i = 0; i < eset.size(); ++i) { - pduel->lua->add_param(eset[i], PARAM_TYPE_EFFECT); - pduel->lua->add_param(clit.triggering_effect, PARAM_TYPE_EFFECT); - pduel->lua->add_param(clit.triggering_player, PARAM_TYPE_INT); - if(!pduel->lua->check_condition(eset[i]->target, 3)) - continue; - if(eset[i]->operation) { - core.sub_solving_event.push_back(clit.evt); - add_process(PROCESSOR_EXECUTE_OPERATION, 0, eset[i], 0, clit.triggering_player, 0); - } - } - if(peffect->type & EFFECT_TYPE_ACTIVATE) { - break_effect(); - int32 ecode = 0; - if(peffect->handler->current.location == LOCATION_HAND) { - if(peffect->handler->data.type & TYPE_TRAP) - ecode = EFFECT_TRAP_ACT_IN_HAND; - else if((peffect->handler->data.type & TYPE_SPELL) && (peffect->handler->data.type & TYPE_QUICKPLAY) - && infos.turn_player != peffect->handler->current.controler) - ecode = EFFECT_QP_ACT_IN_NTPHAND; - } else if(peffect->handler->current.location == LOCATION_SZONE) { - if((peffect->handler->data.type & TYPE_TRAP) && peffect->handler->get_status(STATUS_SET_TURN)) - ecode = EFFECT_TRAP_ACT_IN_SET_TURN; - } - if(ecode) { - eset.clear(); - peffect->handler->filter_effect(ecode, &eset); - effect* pactin = 0; - for(int32 i = 0; i < eset.size(); ++i) { - if(!(eset[i]->flag & EFFECT_FLAG_COUNT_LIMIT)) { - pactin = eset[i]; - break; - } - } - if(!pactin) { - for(int32 i = 0; i < eset.size(); ++i) { - if(eset[i]->check_count_limit(peffect->handler->current.controler)) { - eset[i]->dec_count(peffect->handler->current.controler); - break; - } - } - } - } - if(peffect->handler->current.location == LOCATION_HAND) { - peffect->handler->enable_field_effect(FALSE); - peffect->handler->set_status(STATUS_ACT_FROM_HAND, TRUE); - move_to_field(peffect->handler, peffect->handler->current.controler, peffect->handler->current.controler, LOCATION_SZONE, POS_FACEUP); - } else { - peffect->handler->set_status(STATUS_ACT_FROM_HAND, FALSE); - change_position(peffect->handler, 0, peffect->handler->current.controler, POS_FACEUP, 0); - } - } - if(peffect->handler->current.location & 0x30) - move_card(peffect->handler->current.controler, peffect->handler, peffect->handler->current.location, 0); - return FALSE; - } - case 1: { - auto& clit = core.new_chains.front(); - effect* peffect = clit.triggering_effect; - card* phandler = peffect->handler; - if(peffect->type & EFFECT_TYPE_ACTIVATE) { - clit.triggering_controler = phandler->current.controler; - clit.triggering_location = phandler->current.location; - clit.triggering_sequence = phandler->current.sequence; - } - pduel->write_buffer8(MSG_CHAINING); - pduel->write_buffer32(phandler->data.code); - pduel->write_buffer32(phandler->get_info_location()); - pduel->write_buffer8(clit.triggering_controler); - pduel->write_buffer8(clit.triggering_location); - pduel->write_buffer8(clit.triggering_sequence); - pduel->write_buffer32(peffect->description); - pduel->write_buffer8(core.current_chain.size() + 1); - break_effect(); - if(core.chain_limit) { - luaL_unref(pduel->lua->lua_state, LUA_REGISTRYINDEX, core.chain_limit); - core.chain_limit = 0; - } - effect* deffect; - if(!(peffect->flag & EFFECT_FLAG_FIELD_ONLY) && (deffect = phandler->is_affected_by_effect(EFFECT_DISABLE_EFFECT))) { - effect* negeff = pduel->new_effect(); - negeff->owner = deffect->owner; - negeff->type = EFFECT_TYPE_SINGLE; - negeff->code = EFFECT_DISABLE_CHAIN; - negeff->reset_flag = RESET_CHAIN | RESET_EVENT | deffect->get_value(); - phandler->add_effect(negeff); - } - peffect->card_type = peffect->handler->get_type(); - if((peffect->card_type & 0x5) == 0x5) - peffect->card_type -= TYPE_TRAP; - peffect->active_type = peffect->card_type; - clit.chain_count = core.current_chain.size() + 1; - clit.target_cards = 0; - clit.target_player = PLAYER_NONE; - clit.target_param = 0; - clit.disable_reason = 0; - clit.disable_player = PLAYER_NONE; - clit.replace_op = 0; - if(phandler->current.location == LOCATION_HAND) - clit.flag |= CHAIN_HAND_EFFECT; - core.current_chain.push_back(clit); - check_chain_counter(peffect, clit.triggering_player, clit.chain_count); - // triggered events which are not caused by RaiseEvent create relation with the handler - if(!(peffect->flag & EFFECT_FLAG_FIELD_ONLY) && (!(peffect->type & 0x2a0) || (peffect->code & EVENT_PHASE) == EVENT_PHASE)) { - peffect->handler->create_relation(peffect); - } - peffect->effect_owner = clit.triggering_player; - if(peffect->cost) { - core.sub_solving_event.push_back(clit.evt); - add_process(PROCESSOR_EXECUTE_COST, 0, peffect, 0, clit.triggering_player, 0); - } - core.new_chains.pop_front(); - return FALSE; - } - case 2: { - auto& clit = core.current_chain.back(); - effect* peffect = clit.triggering_effect; - if(peffect->target) { - core.sub_solving_event.push_back(clit.evt); - add_process(PROCESSOR_EXECUTE_TARGET, 0, peffect, 0, clit.triggering_player, 0); - } - return FALSE; - } - case 3: { - break_effect(); - auto& clit = core.current_chain.back(); - effect* peffect = clit.triggering_effect; - if(clit.target_cards && clit.target_cards->container.size()) { - if(peffect->flag & EFFECT_FLAG_CARD_TARGET) { - for(auto cit = clit.target_cards->container.begin(); cit != clit.target_cards->container.end(); ++cit) - raise_single_event(*cit, 0, EVENT_BECOME_TARGET, peffect, 0, clit.triggering_player, 0, clit.chain_count); - process_single_event(); - if(clit.target_cards->container.size()) - raise_event(&clit.target_cards->container, EVENT_BECOME_TARGET, peffect, 0, clit.triggering_player, clit.triggering_player, clit.chain_count); - } - } - if(peffect->type & EFFECT_TYPE_ACTIVATE) { - core.leave_confirmed.insert(peffect->handler); - if(!(peffect->handler->data.type & (TYPE_CONTINUOUS + TYPE_FIELD + TYPE_EQUIP + TYPE_PENDULUM)) - && !peffect->handler->is_affected_by_effect(EFFECT_REMAIN_FIELD)) - peffect->handler->set_status(STATUS_LEAVE_CONFIRMED, TRUE); - } - core.phase_action = TRUE; - if(clit.opinfos.count(0x200)) { - core.spsummon_rst = true; - set_spsummon_counter(clit.triggering_player, true, true); - if(clit.opinfos[0x200].op_player == PLAYER_ALL) - set_spsummon_counter(1 - clit.triggering_player, true, true); - if((core.global_flag & GLOBALFLAG_SPSUMMON_ONCE) && (peffect->flag & EFFECT_FLAG_CARD_TARGET)) { - auto& optarget = clit.opinfos[0x200]; - if(optarget.op_cards) { - if(optarget.op_player == PLAYER_ALL) { - auto opit = optarget.op_cards->container.begin(); - uint32 sumplayer = optarget.op_param; - if((*opit)->spsummon_code) { - core.spsummon_once_map[sumplayer][(*opit)->spsummon_code]++; - core.spsummon_once_map_rst[sumplayer][(*opit)->spsummon_code]++; - } - ++opit; - if((*opit)->spsummon_code) { - core.spsummon_once_map[1 - sumplayer][(*opit)->spsummon_code]++; - core.spsummon_once_map_rst[1 - sumplayer][(*opit)->spsummon_code]++; - } - } else { - uint32 sumplayer = clit.triggering_player; - if(optarget.op_player == 1) - sumplayer = 1 - sumplayer; - for(auto opit = optarget.op_cards->container.begin(); opit != optarget.op_cards->container.end(); ++opit) { - if((*opit)->spsummon_code) { - core.spsummon_once_map[sumplayer][(*opit)->spsummon_code]++; - core.spsummon_once_map_rst[sumplayer][(*opit)->spsummon_code]++; - } - } - } - } - } - } - pduel->write_buffer8(MSG_CHAINED); - pduel->write_buffer8(clit.chain_count); - raise_event(peffect->handler, EVENT_CHAINING, peffect, 0, clit.triggering_player, clit.triggering_player, clit.chain_count); - process_instant_event(); - if(core.new_chains.size()) - add_process(PROCESSOR_ADD_CHAIN, 0, 0, 0, 0, 0); - adjust_all(); - return TRUE; - } - } - return TRUE; -} -int32 field::sort_chain(uint16 step, uint8 tp) { - switch(step) { - case 0: { - core.select_cards.clear(); - if(tp) - for(auto clit = core.tpchain.begin(); clit != core.tpchain.end(); ++clit) - core.select_cards.push_back(clit->triggering_effect->handler); - else - for(auto clit = core.ntpchain.begin(); clit != core.ntpchain.end(); ++clit) - core.select_cards.push_back(clit->triggering_effect->handler); - add_process(PROCESSOR_SORT_CARD, 0, 0, 0, tp ? infos.turn_player : (1 - infos.turn_player), 1); - return FALSE; - } - case 1: { - if(returns.bvalue[0] == -1) - return TRUE; - chain_list::iterator clit; - int32 i = 0, count; - chain_array ch(8); - if(tp) { - count = core.tpchain.size(); - for(i = 0, clit = core.tpchain.begin(); i < count; ++clit, ++i) - ch[returns.bvalue[i]] = *clit; - core.tpchain.clear(); - for(i = 0; i < count; ++i) - core.tpchain.push_back(ch[i]); - } else { - count = core.ntpchain.size(); - for(i = 0, clit = core.ntpchain.begin(); i < count; ++clit, ++i) - ch[returns.bvalue[i]] = *clit; - core.ntpchain.clear(); - for(i = 0; i < count; ++i) - core.ntpchain.push_back(ch[i]); - } - return TRUE; - } - } - return TRUE; -} -int32 field::solve_continuous(uint16 step, effect * peffect, uint8 triggering_player) { - switch(step) { - case 0: { - core.solving_event.splice(core.solving_event.begin(), core.sub_solving_event); - if(!peffect->check_count_limit(triggering_player)) { - core.solving_event.pop_front(); - return TRUE; - } - chain newchain; - newchain.chain_id = 0; - newchain.chain_count = 0; - newchain.triggering_effect = peffect; - newchain.triggering_player = triggering_player; - newchain.evt = core.solving_event.front(); - newchain.target_cards = 0; - newchain.target_player = PLAYER_NONE; - newchain.target_param = 0; - newchain.disable_player = PLAYER_NONE; - newchain.disable_reason = 0; - newchain.flag = 0; - core.continuous_chain.push_back(newchain); - if(peffect->flag & EFFECT_FLAG_DELAY) - core.conti_solving = TRUE; - if(!peffect->target) - return FALSE; - core.sub_solving_event.push_back(core.solving_event.front()); - add_process(PROCESSOR_EXECUTE_TARGET, 0, peffect, 0, triggering_player, 0); - return FALSE; - } - case 1: { - return FALSE; - } - case 2: { - if(!peffect->operation) - return FALSE; - peffect->dec_count(triggering_player); - core.sub_solving_event.push_back(core.solving_event.front()); - add_process(PROCESSOR_EXECUTE_OPERATION, 0, peffect, 0, triggering_player, 0); - return FALSE; - } - case 3: { - if(core.continuous_chain.back().target_cards) - pduel->delete_group(core.continuous_chain.back().target_cards); - for(auto oit = core.continuous_chain.back().opinfos.begin(); oit != core.continuous_chain.back().opinfos.end(); ++oit) { - if(oit->second.op_cards) - pduel->delete_group(oit->second.op_cards); - } - core.continuous_chain.pop_back(); - core.solving_event.pop_front(); - if(peffect->flag & EFFECT_FLAG_DELAY) { - core.conti_solving = FALSE; - adjust_all(); - if(core.conti_player == infos.turn_player) { - if(core.delayed_tp.size()) { - core.sub_solving_event.push_back(core.delayed_tev.front()); - add_process(PROCESSOR_SOLVE_CONTINUOUS, 0, core.delayed_tp.front(), 0, infos.turn_player, 0); - core.delayed_tp.pop_front(); - core.delayed_tev.pop_front(); - } - else - core.conti_player = 1 - infos.turn_player; - } - if(core.conti_player == 1 - infos.turn_player) { - if(core.delayed_ntp.size()) { - core.sub_solving_event.push_back(core.delayed_ntev.front()); - add_process(PROCESSOR_SOLVE_CONTINUOUS, 0, core.delayed_ntp.front(), 0, 1 - infos.turn_player, 0); - core.delayed_ntp.pop_front(); - core.delayed_ntev.pop_front(); - } - else if(core.delayed_tp.size()) { - core.conti_player = infos.turn_player; - core.sub_solving_event.push_back(core.delayed_tev.front()); - add_process(PROCESSOR_SOLVE_CONTINUOUS, 0, core.delayed_tp.front(), 0, infos.turn_player, 0); - core.delayed_tp.pop_front(); - core.delayed_tev.pop_front(); - } - else - core.conti_player = PLAYER_NONE; - } - } - return TRUE; - } - } - return TRUE; -} -int32 field::solve_chain(uint16 step, uint32 chainend_arg1, uint32 chainend_arg2) { - if(core.current_chain.size() == 0 && step == 0) - return TRUE; - chain_array::reverse_iterator cait = core.current_chain.rbegin(); - switch(step) { - case 0: { - if(core.spsummon_rst) { - set_spsummon_counter(0, false, true); - set_spsummon_counter(1, false, true); - for(int plr = 0; plr < 2; ++plr) { - for(auto iter = core.spsummon_once_map[plr].begin(); iter != core.spsummon_once_map[plr].end(); ++iter) { - auto spcode = iter->first; - core.spsummon_once_map[plr][spcode] -= core.spsummon_once_map_rst[plr][spcode]; - core.spsummon_once_map_rst[plr][spcode] = 0; - } - } - core.spsummon_rst = false; - } - pduel->write_buffer8(MSG_CHAIN_SOLVING); - pduel->write_buffer8(cait->chain_count); - add_to_disable_check_list(cait->triggering_effect->handler); - adjust_instant(); - raise_event((card*)0, EVENT_CHAIN_ACTIVATING, cait->triggering_effect, 0, cait->triggering_player, cait->triggering_player, cait->chain_count); - process_instant_event(); - return FALSE; - } - case 1: { - effect* peffect = cait->triggering_effect; - if(cait->flag & CHAIN_DISABLE_ACTIVATE && is_chain_negatable(cait->chain_count)) { - remove_oath_effect(peffect); - if((peffect->flag & EFFECT_FLAG_COUNT_LIMIT) && (peffect->count_code & EFFECT_COUNT_CODE_OATH)) { - dec_effect_code(peffect->count_code, cait->triggering_player); - } - check_chain_counter(peffect, cait->triggering_player, cait->chain_count, true); - raise_event((card*)0, EVENT_CHAIN_NEGATED, peffect, 0, cait->triggering_player, cait->triggering_player, cait->chain_count); - process_instant_event(); - core.units.begin()->step = 9; - return FALSE; - } - for(auto oeit = effects.oath.begin(); oeit != effects.oath.end(); ++oeit) - if(oeit->second == peffect) - oeit->second = 0; - break_effect(); - core.chain_solving = TRUE; - card* pcard = peffect->handler; - if((peffect->type & EFFECT_TYPE_ACTIVATE) && pcard->is_has_relation(peffect)) { - pcard->set_status(STATUS_ACTIVATED, TRUE); - pcard->enable_field_effect(TRUE); - if(core.duel_options & DUEL_OBSOLETE_RULING) { - if(pcard->data.type & TYPE_FIELD) { - card* fscard = player[1 - pcard->current.controler].list_szone[5]; - if(fscard && fscard->is_position(POS_FACEUP)) - fscard->enable_field_effect(FALSE); - } - } - adjust_instant(); - } - raise_event((card*)0, EVENT_CHAIN_SOLVING, peffect, 0, cait->triggering_player, cait->triggering_player, cait->chain_count); - process_instant_event(); - return FALSE; - } - case 2: { - core.spsummon_state_count_tmp[0] = core.spsummon_state_count[0]; - core.spsummon_state_count_tmp[1] = core.spsummon_state_count[1]; - card* pcard = cait->triggering_effect->handler; - if(is_chain_disablable(cait->chain_count)) { - if((cait->flag & CHAIN_DISABLE_EFFECT) || pcard->is_affected_by_effect(EFFECT_DISABLE_CHAIN) - || (pcard->is_status(STATUS_DISABLED) && pcard->is_has_relation(cait->triggering_effect))) { - if(!(cait->flag & CHAIN_DISABLE_EFFECT)) { - pduel->write_buffer8(MSG_CHAIN_DISABLED); - pduel->write_buffer8(cait->chain_count); - } - raise_event((card*)0, EVENT_CHAIN_DISABLED, cait->triggering_effect, 0, cait->triggering_player, cait->triggering_player, cait->chain_count); - process_instant_event(); - core.units.begin()->step = 3; - return FALSE; - } - } - if(cait->replace_op) { - core.units.begin()->peffect = (effect*)(size_t)cait->triggering_effect->operation; - cait->triggering_effect->operation = cait->replace_op; - } else - core.units.begin()->peffect = 0; - if(cait->triggering_effect->operation) { - core.sub_solving_event.push_back(cait->evt); - add_process(PROCESSOR_EXECUTE_OPERATION, 0, cait->triggering_effect, 0, cait->triggering_player, 0); - } - return FALSE; - } - case 3: { - effect* peffect = cait->triggering_effect; - if(core.units.begin()->peffect) { - peffect->operation = (ptr)core.units.begin()->peffect; - } - core.special_summoning.clear(); - core.equiping_cards.clear(); - return FALSE; - } - case 4: { - if(core.units.begin()->peffect == 0) { - if(cait->opinfos.count(0x200)) { - if(core.spsummon_state_count_tmp[cait->triggering_player] == core.spsummon_state_count[cait->triggering_player]) - set_spsummon_counter(cait->triggering_player); - if(cait->opinfos[0x200].op_player == PLAYER_ALL && core.spsummon_state_count_tmp[1 - cait->triggering_player] == core.spsummon_state_count[1 - cait->triggering_player]) - set_spsummon_counter(1 - cait->triggering_player); - //sometimes it may add twice, only works for once per turn - if(cait->triggering_effect->flag & EFFECT_FLAG_CARD_TARGET) { - auto& optarget = cait->opinfos[0x200]; - if(optarget.op_cards) { - if(optarget.op_player == PLAYER_ALL) { - uint32 sumplayer = optarget.op_param; - if(core.global_flag & GLOBALFLAG_SPSUMMON_ONCE) { - auto opit = optarget.op_cards->container.begin(); - if((*opit)->spsummon_code) - core.spsummon_once_map[sumplayer][(*opit)->spsummon_code]++; - ++opit; - if((*opit)->spsummon_code) - core.spsummon_once_map[1 - sumplayer][(*opit)->spsummon_code]++; - } - auto opit = optarget.op_cards->container.begin(); - check_card_counter(*opit, 3, sumplayer); - ++opit; - check_card_counter(*opit, 3, 1 - sumplayer); - } else { - uint32 sumplayer = cait->triggering_player; - if(optarget.op_player == 1) - sumplayer = 1 - sumplayer; - for(auto opit = optarget.op_cards->container.begin(); opit != optarget.op_cards->container.end(); ++opit) { - if((core.global_flag & GLOBALFLAG_SPSUMMON_ONCE) && (*opit)->spsummon_code) - core.spsummon_once_map[sumplayer][(*opit)->spsummon_code]++; - check_card_counter(*opit, 3, sumplayer); - } - } - } - } - } - } - core.spsummon_state_count_tmp[0] = 0; - core.spsummon_state_count_tmp[1] = 0; - core.chain_solving = FALSE; - effect_vector::iterator eit; - event_list::iterator evit; - if(core.delayed_tp.size()) { - core.conti_player = infos.turn_player; - core.sub_solving_event.push_back(core.delayed_tev.front()); - add_process(PROCESSOR_SOLVE_CONTINUOUS, 0, core.delayed_tp.front(), 0, infos.turn_player, 0); - core.delayed_tp.pop_front(); - core.delayed_tev.pop_front(); - } - else if(core.delayed_ntp.size()) { - core.conti_player = 1 - infos.turn_player; - core.sub_solving_event.push_back(core.delayed_ntev.front()); - add_process(PROCESSOR_SOLVE_CONTINUOUS, 0, core.delayed_ntp.front(), 0, 1 - infos.turn_player, 0); - core.delayed_ntp.pop_front(); - core.delayed_ntev.pop_front(); - } - else - core.conti_player = PLAYER_NONE; - pduel->write_buffer8(MSG_CHAIN_SOLVED); - pduel->write_buffer8(cait->chain_count); - raise_event((card*)0, EVENT_CHAIN_SOLVED, cait->triggering_effect, 0, cait->triggering_player, cait->triggering_player, cait->chain_count); - adjust_instant(); - process_instant_event(); - core.units.begin()->step = 9; - return FALSE; - } - case 10: { - effect* peffect = cait->triggering_effect; - card* pcard = peffect->handler; - if((cait->flag & CHAIN_HAND_EFFECT) && !pcard->is_status(STATUS_IS_PUBLIC) && (pcard->current.location == LOCATION_HAND)) - shuffle(pcard->current.controler, LOCATION_HAND); - if(cait->target_cards && cait->target_cards->container.size()) { - for(auto cit = cait->target_cards->container.begin(); cit != cait->target_cards->container.end(); ++cit) - (*cit)->release_relation(peffect); - } - if((pcard->data.type & TYPE_EQUIP) && (peffect->type & EFFECT_TYPE_ACTIVATE) - && !pcard->equiping_target && (pcard->current.location == LOCATION_SZONE)) - pcard->set_status(STATUS_LEAVE_CONFIRMED, TRUE); - if(core.duel_options & DUEL_OBSOLETE_RULING) { - if((pcard->data.type & TYPE_FIELD) && (peffect->type & EFFECT_TYPE_ACTIVATE) - && !pcard->is_status(STATUS_LEAVE_CONFIRMED) && pcard->is_has_relation(peffect)) { - card* fscard = player[1 - pcard->current.controler].list_szone[5]; - if(fscard && fscard->is_position(POS_FACEUP)) - destroy(fscard, 0, REASON_RULE, 1 - pcard->current.controler); - } - } - peffect->active_type = 0; - pcard->release_relation(peffect); - if(cait->target_cards) - pduel->delete_group(cait->target_cards); - for(auto oit = cait->opinfos.begin(); oit != cait->opinfos.end(); ++oit) { - if(oit->second.op_cards) - pduel->delete_group(oit->second.op_cards); - } - for(auto cit = core.delayed_enable_set.begin(); cit != core.delayed_enable_set.end(); ++cit) { - if((*cit)->current.location == LOCATION_MZONE) - (*cit)->enable_field_effect(TRUE); - } - core.delayed_enable_set.clear(); - adjust_all(); - core.current_chain.pop_back(); - if(!core.current_chain.size()) { - if(core.chain_limit) { - luaL_unref(pduel->lua->lua_state, LUA_REGISTRYINDEX, core.chain_limit); - core.chain_limit = 0; - } - return FALSE; - } - core.units.begin()->step = -1; - return FALSE; - } - case 11: { - for(auto cit = core.leave_confirmed.begin(); cit != core.leave_confirmed.end();) { - auto rm = cit++; - if(!(*rm)->is_status(STATUS_LEAVE_CONFIRMED)) - core.leave_confirmed.erase(rm); - } - if(core.leave_confirmed.size()) - send_to(&core.leave_confirmed, 0, REASON_RULE, PLAYER_NONE, PLAYER_NONE, LOCATION_GRAVE, 0, POS_FACEUP); - return FALSE; - } - case 12: { - core.used_event.splice(core.used_event.end(), core.point_event); - pduel->write_buffer8(MSG_CHAIN_END); - if(core.chain_limit_p) { - luaL_unref(pduel->lua->lua_state, LUA_REGISTRYINDEX, core.chain_limit_p); - core.chain_limit_p = 0; - } - reset_chain(); - if(core.summoning_card || core.effect_damage_step == 1) - core.subunits.push_back(core.reserved); - return FALSE; - } - case 13: { - raise_event((card*)0, EVENT_CHAIN_END, 0, 0, 0, 0, 0); - process_instant_event(); - core.hint_timing[0] |= TIMING_CHAIN_END; - core.hint_timing[1] |= TIMING_CHAIN_END; - add_process(PROCESSOR_POINT_EVENT, 0, 0, 0, chainend_arg1, chainend_arg2); - returns.ivalue[0] = TRUE; - return TRUE; - } - } - return TRUE; -} -int32 field::break_effect() { - core.hint_timing[0] &= TIMING_DAMAGE_STEP | TIMING_DAMAGE_CAL; - core.hint_timing[1] &= TIMING_DAMAGE_STEP | TIMING_DAMAGE_CAL; - for (auto chit = core.new_ochain.begin(); chit != core.new_ochain.end();) { - auto rm = chit++; - effect* peffect = rm->triggering_effect; - if (!(peffect->flag & EFFECT_FLAG_DELAY)) { - if ((peffect->flag & EFFECT_FLAG_FIELD_ONLY) - || !(peffect->type & EFFECT_TYPE_FIELD) || peffect->in_range(rm->triggering_location, rm->triggering_sequence)) { - pduel->write_buffer8(MSG_MISSED_EFFECT); - pduel->write_buffer32(peffect->handler->get_info_location()); - pduel->write_buffer32(peffect->handler->data.code); - } - core.new_ochain.erase(rm); - } - } - if(core.global_flag & GLOBALFLAG_DELAYED_QUICKEFFECT) { - core.delayed_quick_break.insert(core.delayed_quick_tmp.begin(), core.delayed_quick_tmp.end()); - core.delayed_quick_tmp.clear(); - } - core.used_event.splice(core.used_event.end(), core.instant_event); - adjust_instant(); - return 0; -} -void field::adjust_instant() { - adjust_disable_check_list(); - adjust_self_destroy_set(); -} -// this includes adjust_instant() -void field::adjust_all() { - core.readjust_map.clear(); - add_process(PROCESSOR_ADJUST, 0, 0, 0, 0, 0); -} -void field::refresh_location_info_instant() { - effect_set eset; - uint32 value, p; - int32 dis1 = player[0].disabled_location | (player[1].disabled_location << 16); - player[0].disabled_location = 0; - player[1].disabled_location = 0; - filter_field_effect(EFFECT_DISABLE_FIELD, &eset); - for (int32 i = 0; i < eset.size(); ++i) { - value = eset[i]->get_value(); - player[0].disabled_location |= value & 0x1f1f; - player[1].disabled_location |= (value >> 16) & 0x1f1f; - } - eset.clear(); - filter_field_effect(EFFECT_USE_EXTRA_MZONE, &eset); - for (int32 i = 0; i < eset.size(); ++i) { - p = eset[i]->get_handler_player(); - value = eset[i]->get_value(); - player[p].disabled_location |= (value >> 16) & 0x1f; - } - eset.clear(); - filter_field_effect(EFFECT_USE_EXTRA_SZONE, &eset); - for (int32 i = 0; i < eset.size(); ++i) { - p = eset[i]->get_handler_player(); - value = eset[i]->get_value(); - player[p].disabled_location |= (value >> 8) & 0x1f00; - } - int32 dis2 = player[0].disabled_location | (player[1].disabled_location << 16); - if(dis1 != dis2) { - pduel->write_buffer8(MSG_FIELD_DISABLED); - pduel->write_buffer32(dis2); - } -} -int32 field::refresh_location_info(uint16 step) { - switch(step) { - case 0: { - effect_set eset; - uint32 value; - int32 p; - core.units.begin()->arg2 = player[0].disabled_location | (player[1].disabled_location << 16); - player[0].disabled_location = 0; - player[1].disabled_location = 0; - core.disfield_effects.clear(); - core.extraz_effects.clear(); - core.extraz_effects_e.clear(); - filter_field_effect(EFFECT_DISABLE_FIELD, &eset); - for (int32 i = 0; i < eset.size(); ++i) { - value = eset[i]->get_value(); - if(value) { - player[0].disabled_location |= value & 0x1f1f; - player[1].disabled_location |= (value >> 16) & 0x1f1f; - } else - core.disfield_effects.add_item(eset[i]); - } - eset.clear(); - filter_field_effect(EFFECT_USE_EXTRA_MZONE, &eset); - for (int32 i = 0; i < eset.size(); ++i) { - p = eset[i]->get_handler_player(); - value = eset[i]->get_value(); - player[p].disabled_location |= (value >> 16) & 0x1f; - if(field_used_count[(value >> 16) & 0x1f] == 0) - core.extraz_effects_e.add_item(eset[i]); - else if((uint32)field_used_count[(value >> 16) & 0x1f] < (value & 0xffff)) - core.extraz_effects.add_item(eset[i]); - } - eset.clear(); - filter_field_effect(EFFECT_USE_EXTRA_SZONE, &eset); - for (int32 i = 0; i < eset.size(); ++i) { - p = eset[i]->get_handler_player(); - value = eset[i]->get_value(); - player[p].disabled_location |= (value >> 8) & 0x1f00; - if(field_used_count[(value >> 16) & 0x1f] == 0) - core.extraz_effects_e.add_item(eset[i]); - else if((uint32)field_used_count[(value >> 16) & 0x1f] < (value & 0xffff)) - core.extraz_effects.add_item(eset[i]); - } - return FALSE; - } - case 1: { - if(core.disfield_effects.count == 0) { - core.units.begin()->step = 2; - return FALSE; - } - effect* peffect = core.disfield_effects[0]; - core.units.begin()->peffect = peffect; - core.disfield_effects.remove_item(0); - if(!peffect->operation) { - peffect->value = 0x80; - core.units.begin()->step = 0; - return FALSE; - } - core.sub_solving_event.push_back(nil_event); - add_process(PROCESSOR_EXECUTE_OPERATION, 0, peffect, 0, peffect->get_handler_player(), 0); - return FALSE; - } - case 2: { - returns.ivalue[0] &= 0x1f1f1f1f; - if(returns.ivalue[0] == 0) - returns.ivalue[0] = 0x80; - if(core.units.begin()->peffect->get_handler_player() == 0) { - core.units.begin()->peffect->value = returns.ivalue[0]; - player[0].disabled_location |= returns.ivalue[0] & 0x1f1f; - player[1].disabled_location |= (returns.ivalue[0] >> 16) & 0x1f1f; - } else { - core.units.begin()->peffect->value = ((returns.ivalue[0] << 16) | (returns.ivalue[0] >> 16)); - player[1].disabled_location |= returns.ivalue[0] & 0x1f1f; - player[0].disabled_location |= (returns.ivalue[0] >> 16) & 0x1f1f; - } - core.units.begin()->step = 0; - return FALSE; - } - case 3: { - if(core.extraz_effects.count == 0) { - core.units.begin()->step = 4; - return FALSE; - } - effect* peffect = core.extraz_effects[0]; - core.units.begin()->peffect = peffect; - core.extraz_effects.remove_item(0); - int32 p = peffect->get_handler_player(); - int32 loc = (peffect->code == EFFECT_USE_EXTRA_MZONE) ? LOCATION_MZONE : LOCATION_SZONE; - if((loc == LOCATION_MZONE && ((player[p].disabled_location & 0x1f) == 0x1f)) - || (loc == LOCATION_SZONE && ((player[p].disabled_location & 0x1f00) == 0x1f00))) { - core.units.begin()->step = 2; - return FALSE; - } - int32 val = peffect->get_value(); - int32 count1 = (val & 0xffff) - field_used_count[(val >> 16) & 0x1f]; - uint32 flag = 0; - int32 count2 = get_useable_count(p, loc, PLAYER_NONE, 0, &flag); - if(count1 > count2) - count1 = count2; - if(count1 == 0) { - core.units.begin()->step = 4; - return FALSE; - } - core.units.begin()->arg1 = count1; - if(loc == LOCATION_SZONE) - flag = ((flag << 8) & 0xff00) | 0xffff00ff; - else - flag = (flag & 0xff) | 0xffffff00; - flag |= 0xe0e0e0e0; - add_process(PROCESSOR_SELECT_DISFIELD, 0, 0, 0, p + (count1 << 16), flag); - return FALSE; - } - case 4: { - uint32 count1 = core.units.begin()->arg1; - uint32 selflag = 0; - uint8 s, pt = 0; - for(uint32 i = 0; i < count1; ++i) { - s = returns.bvalue[pt + 2]; - selflag |= 1 << s; - pt += 3; - } - effect* peffect = core.units.begin()->peffect; - if(peffect->code == EFFECT_USE_EXTRA_MZONE) - player[peffect->get_handler_player()].disabled_location |= selflag; - else - player[peffect->get_handler_player()].disabled_location |= selflag << 8; - peffect->value = ((int32)peffect->value) | (selflag << 16); - core.units.begin()->step = 2; - return FALSE; - } - case 5: { - if(core.extraz_effects_e.count == 0) { - core.units.begin()->step = 6; - return FALSE; - } - effect* peffect = core.extraz_effects_e[0]; - core.units.begin()->peffect = peffect; - core.extraz_effects_e.remove_item(0); - int32 p = peffect->get_handler_player(); - int32 loc = (peffect->code == EFFECT_USE_EXTRA_MZONE) ? LOCATION_MZONE : LOCATION_SZONE; - if(((loc == LOCATION_MZONE) && ((player[p].disabled_location & 0x1f) == 0x1f)) - || ((loc == LOCATION_SZONE) && ((player[p].disabled_location & 0x1f00) == 0x1f00))) { - core.units.begin()->step = 4; - return FALSE; - } - int32 val = peffect->get_value(); - int32 count1 = (val & 0xffff) - field_used_count[(val >> 16) & 0x1f]; - uint32 flag = 0; - int32 count2 = get_useable_count(p, loc, PLAYER_NONE, 0, &flag); - if(count1 > count2) - count1 = count2; - if(count1 == 0) { - core.units.begin()->step = 6; - return FALSE; - } - core.units.begin()->arg1 = count1; - if(loc == LOCATION_SZONE) - flag = ((flag << 8) & 0xff00) | 0xffff00ff; - else - flag = (flag & 0xff) | 0xffffff00; - flag |= 0xe0e0e0e0; - add_process(PROCESSOR_SELECT_DISFIELD, 0, 0, 0, p + (count1 << 16), flag); - return FALSE; - } - case 6: { - uint32 count1 = core.units.begin()->arg1; - uint32 selflag = 0; - uint8 s, pt = 0; - for(uint32 i = 0; i < count1; ++i) { - s = returns.bvalue[pt + 2]; - selflag |= 1 << s; - pt += 3; - } - effect* peffect = core.units.begin()->peffect; - if(peffect->code == EFFECT_USE_EXTRA_MZONE) - player[peffect->get_handler_player()].disabled_location |= selflag; - else - player[peffect->get_handler_player()].disabled_location |= selflag << 8; - peffect->value = ((int32)peffect->value) | (selflag << 16); - core.units.begin()->step = 4; - return FALSE; - } - case 7: { - uint32 dis = player[0].disabled_location | (player[1].disabled_location << 16); - if(dis != (uint32)core.units.begin()->arg2) { - pduel->write_buffer8(MSG_FIELD_DISABLED); - pduel->write_buffer32(dis); - } - return TRUE; - } - } - return TRUE; -} -int32 field::adjust_step(uint16 step) { - //win, isable, control, self_des, equip, position, trap_monster - switch(step) { - case 0: { - core.re_adjust = FALSE; - return FALSE; - } - case 1: { - //win check - uint32 winp = 5, rea = 1; - if(player[0].lp <= 0 && player[1].lp > 0) { - winp = 1; - rea = 1; - } - if(core.overdraw[0] && !core.overdraw[1]) { - winp = 1; - rea = 2; - } - if(player[1].lp <= 0 && player[0].lp > 0) { - winp = 0; - rea = 1; - } - if(core.overdraw[1] && !core.overdraw[0]) { - winp = 0; - rea = 2; - } - if(player[1].lp <= 0 && player[0].lp <= 0) { - winp = PLAYER_NONE; - rea = 1; - } - if(core.overdraw[1] && core.overdraw[0]) { - winp = PLAYER_NONE; - rea = 2; - } - if(winp != 5) { - pduel->write_buffer8(MSG_WIN); - pduel->write_buffer8(winp); - pduel->write_buffer8(rea); - core.overdraw[0] = core.overdraw[1] = FALSE; - core.win_player = 5; - core.win_reason = 0; - } else if(core.win_player != 5) { - pduel->write_buffer8(MSG_WIN); - pduel->write_buffer8(core.win_player); - pduel->write_buffer8(core.win_reason); - core.win_player = 5; - core.win_reason = 0; - core.overdraw[0] = core.overdraw[1] = FALSE; - } - return FALSE; - } - case 2: { - //disable check - uint8 tp = infos.turn_player; - card* pcard; - for(uint8 p = 0; p < 2; ++p) { - for(uint8 i = 0; i < 5; ++i) { - pcard = player[tp].list_mzone[i]; - if(pcard) - add_to_disable_check_list(pcard); - } - for(uint8 i = 0; i < 8; ++i) { - pcard = player[tp].list_szone[i]; - if(pcard) - add_to_disable_check_list(pcard); - } - tp = 1 - tp; - } - adjust_disable_check_list(); - add_process(PROCESSOR_REFRESH_LOC, 0, 0, 0, 0, 0); - return FALSE; - } - case 3: { - //trap monster - card* pcard; - uint8 tp = infos.turn_player; - for(uint8 p = 0; p < 2; ++p) { - for(uint8 i = 0; i < 5; ++i) { - pcard = player[tp].list_mzone[i]; - if(!pcard) continue; - if((pcard->get_type()&TYPE_TRAPMONSTER) && pcard->is_affected_by_effect(EFFECT_DISABLE_TRAPMONSTER)) { - pcard->reset(RESET_TURN_SET, RESET_EVENT); - refresh_location_info_instant(); - move_to_field(pcard, tp, tp, LOCATION_SZONE, pcard->current.position); - core.re_adjust = TRUE; - } - } - tp = 1 - tp; - } - return FALSE; - } - case 4: { - //remove brainwashing - effect_set eset; - uint32 res = 0; - if(core.global_flag & GLOBALFLAG_BRAINWASHING_CHECK) { - filter_field_effect(EFFECT_REMOVE_BRAINWASHING, &eset, FALSE); - res = eset.size() ? TRUE : FALSE; - if(res) { - card* pcard; - for(uint8 p = 0; p < 2; ++p) { - for(uint8 i = 0; i < 5; ++i) { - pcard = player[p].list_mzone[i]; - // remove EFFECT_SET_CONTROL - if(pcard && pcard->is_affected_by_effect(EFFECT_REMOVE_BRAINWASHING)) - pcard->reset(EFFECT_SET_CONTROL, RESET_CODE); - } - } - } - core.remove_brainwashing = res; - } - return FALSE; - } - case 5: { - //1-5 control - card* pcard; - uint8 cur, ref; - core.control_adjust_set[0].clear(); - core.control_adjust_set[1].clear(); - for(uint8 p = 0; p < 2; ++p) { - for(uint8 i = 0; i < 5; ++i) { - pcard = player[p].list_mzone[i]; - if(!pcard) continue; - cur = pcard->current.controler; - ref = pcard->refresh_control_status(); - if(cur != ref && pcard->is_capable_change_control()) { - core.control_adjust_set[p].insert(pcard); - pcard->operation_param = ref; - } - } - } - if(core.control_adjust_set[0].size() || core.control_adjust_set[1].size()) { - core.re_adjust = TRUE; - add_process(PROCESSOR_CONTROL_ADJUST, 0, 0, 0, 0, 0); - } - core.units.begin()->step = 7; - return FALSE; - } - case 6: { - return FALSE; - } - case 7: { - return FALSE; - } - case 8: { - if(core.selfdes_disabled) { - core.units.begin()->step = 10; - return FALSE; - } - //self destroy - adjust_self_destroy_set(); - return FALSE; - } - case 9: { - return FALSE; - } - case 10: { - //equip check - uint8 tp = infos.turn_player; - card* pcard; - core.destroy_set.clear(); - for(uint8 p = 0; p < 2; ++p) { - for(uint8 i = 0; i < 5; ++i) { - pcard = player[tp].list_szone[i]; - if(pcard && pcard->equiping_target && !pcard->is_affected_by_effect(EFFECT_EQUIP_LIMIT, pcard->equiping_target)) - core.destroy_set.insert(pcard); - } - tp = 1 - tp; - } - if(core.destroy_set.size()) { - core.re_adjust = TRUE; - destroy(&core.destroy_set, 0, REASON_RULE, PLAYER_NONE); - } - return FALSE; - } - case 11: { - //position - uint32 tp = infos.turn_player, pos; - card* pcard; - card_set pos_adjust; - effect_set eset; - for(uint8 p = 0; p < 2; ++p) { - for(uint8 i = 0; i < 5; ++i) { - pcard = player[tp].list_mzone[i]; - if(!pcard || pcard->is_affected_by_effect(EFFECT_CANNOT_CHANGE_POS_E)) - continue; - eset.clear(); - pcard->filter_effect(EFFECT_SET_POSITION, &eset); - if(eset.size()) { - pos = eset.get_last()->get_value(); - if((pos & 0xff) != pcard->current.position) { - pos_adjust.insert(pcard); - pcard->operation_param = pos; - if(pcard->is_status(STATUS_JUST_POS)) - pcard->set_status(STATUS_CONTINUOUS_POS, TRUE); - else - pcard->set_status(STATUS_CONTINUOUS_POS, FALSE); - } else - pcard->set_status(STATUS_CONTINUOUS_POS, FALSE); - pcard->set_status(STATUS_JUST_POS, FALSE); - } - } - tp = 1 - tp; - } - if(pos_adjust.size()) { - core.re_adjust = TRUE; - group* ng = pduel->new_group(); - ng->container.swap(pos_adjust); - ng->is_readonly = TRUE; - add_process(PROCESSOR_CHANGEPOS, 0, 0, ng, PLAYER_NONE, TRUE); - } - return FALSE; - } - case 12: { - //shuffle check - for(uint32 i = 0; i < player[0].list_hand.size(); ++i) { - card* pcard = player[0].list_hand[i]; - int32 pub = pcard->is_affected_by_effect(EFFECT_PUBLIC) ? TRUE : FALSE; - if(!pub && (pcard->status & STATUS_IS_PUBLIC)) - core.shuffle_hand_check[0] = TRUE; - pcard->set_status(STATUS_IS_PUBLIC, pub); - } - for(uint32 i = 0; i < player[1].list_hand.size(); ++i) { - card* pcard = player[1].list_hand[i]; - int32 pub = pcard->is_affected_by_effect(EFFECT_PUBLIC) ? TRUE : FALSE; - if(!pub && (pcard->status & STATUS_IS_PUBLIC)) - core.shuffle_hand_check[1] = TRUE; - pcard->set_status(STATUS_IS_PUBLIC, pub); - } - if(core.shuffle_hand_check[infos.turn_player]) - shuffle(infos.turn_player, LOCATION_HAND); - if(core.shuffle_hand_check[1 - infos.turn_player]) - shuffle(1 - infos.turn_player, LOCATION_HAND); - return FALSE; - } - case 13: { - //reverse_deck - effect_set eset; - uint32 res = 0; - if(core.global_flag & GLOBALFLAG_DECK_REVERSE_CHECK) { - filter_field_effect(EFFECT_REVERSE_DECK, &eset, FALSE); - res = eset.size() ? TRUE : FALSE; - if(core.deck_reversed ^ res) { - reverse_deck(0); - reverse_deck(1); - pduel->write_buffer8(MSG_REVERSE_DECK); - if(res) { - if(player[0].list_main.size()) { - card* ptop = player[0].list_main.back(); - pduel->write_buffer8(MSG_DECK_TOP); - pduel->write_buffer8(0); - pduel->write_buffer8(0); - if(ptop->current.position != POS_FACEUP_DEFENCE) - pduel->write_buffer32(ptop->data.code); - else - pduel->write_buffer32(ptop->data.code | 0x80000000); - } - if(player[1].list_main.size()) { - card* ptop = player[1].list_main.back(); - pduel->write_buffer8(MSG_DECK_TOP); - pduel->write_buffer8(1); - pduel->write_buffer8(0); - if(ptop->current.position != POS_FACEUP_DEFENCE) - pduel->write_buffer32(ptop->data.code); - else - pduel->write_buffer32(ptop->data.code | 0x80000000); - } - } - } - core.deck_reversed = res; - } - return FALSE; - } - case 14: { - //attack cancel - card* attacker = core.attacker; - if(!attacker) - return FALSE; - if(attacker->is_affected_by_effect(EFFECT_CANNOT_ATTACK)) - attacker->set_status(STATUS_ATTACK_CANCELED, TRUE); - if(core.attack_rollback) - return FALSE; - for(uint32 i = 0; i < 5; ++i) { - card* pcard = player[1 - infos.turn_player].list_mzone[i]; - if(pcard) { - if(!core.opp_mzone[i] || core.opp_mzone[i] != pcard->fieldid_r) { - core.attack_rollback = TRUE; - break; - } - } else { - if(core.opp_mzone[i]) { - core.attack_rollback = TRUE; - break; - } - } - } - return FALSE; - } - case 15: { - raise_event((card*)0, EVENT_ADJUST, 0, 0, PLAYER_NONE, PLAYER_NONE, 0); - process_instant_event(); - return FALSE; - } - case 16: { - if(core.re_adjust) { - core.units.begin()->step = -1; - return FALSE; - } - if(core.shuffle_hand_check[0]) - shuffle(0, LOCATION_HAND); - if(core.shuffle_hand_check[1]) - shuffle(1, LOCATION_HAND); - if(core.shuffle_deck_check[0]) - shuffle(0, LOCATION_DECK); - if(core.shuffle_deck_check[1]) - shuffle(1, LOCATION_DECK); - return TRUE; - } - } - return TRUE; -} diff --git a/ocgcore/scriptlib.cpp b/ocgcore/scriptlib.cpp deleted file mode 100644 index b641ef364c..0000000000 --- a/ocgcore/scriptlib.cpp +++ /dev/null @@ -1,71 +0,0 @@ -/* - * scriptlib.cpp - * - * Created on: 2010-7-29 - * Author: Argon - */ -#include "scriptlib.h" -#include "duel.h" - -int32 scriptlib::check_param(lua_State* L, int32 param_type, int32 index, int32 retfalse) { - int32 result; - switch (param_type) { - case PARAM_TYPE_CARD: - if (lua_isuserdata(L, index)) { - result = **(int32**)lua_touserdata(L, index); - if(result == 1) - return TRUE; - } - if(retfalse) - return FALSE; - luaL_error(L, "Parameter %d should be \"Card\".", index); - break; - case PARAM_TYPE_GROUP: - if (lua_isuserdata(L, index)) { - result = **(int32**)lua_touserdata(L, index); - if(result == 2) - return TRUE; - } - if(retfalse) - return FALSE; - luaL_error(L, "Parameter %d should be \"Group\".", index); - break; - case PARAM_TYPE_EFFECT: - if (lua_isuserdata(L, index)) { - result = **(int32**)lua_touserdata(L, index); - if(result == 3) - return TRUE; - } - if(retfalse) - return FALSE; - luaL_error(L, "Parameter %d should be \"Effect\".", index); - break; - case PARAM_TYPE_FUNCTION: - if (lua_isfunction(L, index)) - return TRUE; - if(retfalse) - return FALSE; - luaL_error(L, "Parameter %d should be \"Function\".", index); - break; - case PARAM_TYPE_STRING: - if (lua_isstring(L, index)) - return TRUE; - if(retfalse) - return FALSE; - luaL_error(L, "Parameter %d should be \"String\".", index); - break; - } - return FALSE; -} - -int32 scriptlib::check_param_count(lua_State* L, int32 count) { - if (lua_gettop(L) < count) - luaL_error(L, "%d Parameters are needed.", count); - return TRUE; -} -int32 scriptlib::check_action_permission(lua_State* L) { - duel* pduel = interpreter::get_duel_info(L); - if(pduel->lua->no_action) - luaL_error(L, "Action is not allowed here."); - return TRUE; -} diff --git a/ocgcore/scriptlib.h b/ocgcore/scriptlib.h deleted file mode 100644 index a4b65d6909..0000000000 --- a/ocgcore/scriptlib.h +++ /dev/null @@ -1,511 +0,0 @@ -/* - * scriptlib.h - * - * Created on: 2009-1-20 - * Author: Argon.Sun - */ - -#ifndef SCRIPTLIB_H_ -#define SCRIPTLIB_H_ - -#include "common.h" -#include "interpreter.h" - -class scriptlib { -public: - static int32 check_param(lua_State* L, int32 param_type, int32 index, BOOL retfalse = FALSE); - static int32 check_param_count(lua_State* L, int32 count); - static int32 check_action_permission(lua_State* L); - - //card lib - static int32 card_get_code(lua_State *L); - static int32 card_get_origin_code(lua_State *L); - static int32 card_get_origin_code_rule(lua_State *L); - static int32 card_is_set_card(lua_State *L); - static int32 card_is_pre_set_card(lua_State *L); - static int32 card_get_type(lua_State *L); - static int32 card_get_origin_type(lua_State *L); - static int32 card_get_level(lua_State *L); - static int32 card_get_rank(lua_State *L); - static int32 card_get_synchro_level(lua_State *L); - static int32 card_get_ritual_level(lua_State *L); - static int32 card_get_origin_level(lua_State *L); - static int32 card_get_origin_rank(lua_State *L); - static int32 card_is_xyz_level(lua_State *L); - static int32 card_get_lscale(lua_State *L); - static int32 card_get_origin_lscale(lua_State *L); - static int32 card_get_rscale(lua_State *L); - static int32 card_get_origin_rscale(lua_State *L); - static int32 card_get_attribute(lua_State *L); - static int32 card_get_origin_attribute(lua_State *L); - static int32 card_get_race(lua_State *L); - static int32 card_get_origin_race(lua_State *L); - static int32 card_get_attack(lua_State *L); - static int32 card_get_origin_attack(lua_State *L); - static int32 card_get_text_attack(lua_State *L); - static int32 card_get_defence(lua_State *L); - static int32 card_get_origin_defence(lua_State *L); - static int32 card_get_text_defence(lua_State *L); - static int32 card_get_previous_code_onfield(lua_State *L); - static int32 card_get_previous_type_onfield(lua_State *L); - static int32 card_get_previous_level_onfield(lua_State *L); - static int32 card_get_previous_rank_onfield(lua_State *L); - static int32 card_get_previous_attribute_onfield(lua_State *L); - static int32 card_get_previous_race_onfield(lua_State *L); - static int32 card_get_previous_attack_onfield(lua_State *L); - static int32 card_get_previous_defence_onfield(lua_State *L); - static int32 card_get_owner(lua_State *L); - static int32 card_get_controler(lua_State *L); - static int32 card_get_previous_controler(lua_State *L); - static int32 card_get_reason(lua_State *L); - static int32 card_get_reason_card(lua_State *L); - static int32 card_get_reason_player(lua_State *L); - static int32 card_get_reason_effect(lua_State *L); - static int32 card_get_position(lua_State *L); - static int32 card_get_previous_position(lua_State *L); - static int32 card_get_battle_position(lua_State *L); - static int32 card_get_location(lua_State *L); - static int32 card_get_previous_location(lua_State *L); - static int32 card_get_sequence(lua_State *L); - static int32 card_get_previous_sequence(lua_State *L); - static int32 card_get_summon_type(lua_State *L); - static int32 card_get_summon_location(lua_State *L); - static int32 card_get_summon_player(lua_State *L); - static int32 card_get_destination(lua_State *L); - static int32 card_get_leave_field_dest(lua_State *L); - static int32 card_get_turnid(lua_State *L); - static int32 card_get_fieldid(lua_State *L); - static int32 card_get_fieldidr(lua_State *L); - static int32 card_is_code(lua_State *L); - static int32 card_is_type(lua_State *L); - static int32 card_is_race(lua_State *L); - static int32 card_is_attribute(lua_State *L); - static int32 card_is_reason(lua_State *L); - static int32 card_is_status(lua_State *L); - static int32 card_is_not_tuner(lua_State *L); - static int32 card_set_status(lua_State *L); - static int32 card_is_dual_state(lua_State *L); - static int32 card_enable_dual_state(lua_State *L); - static int32 card_set_turn_counter(lua_State *L); - static int32 card_get_turn_counter(lua_State *L); - static int32 card_set_material(lua_State *L); - static int32 card_get_material(lua_State *L); - static int32 card_get_material_count(lua_State *L); - static int32 card_get_equip_group(lua_State *L); - static int32 card_get_equip_count(lua_State *L); - static int32 card_get_equip_target(lua_State *L); - static int32 card_get_pre_equip_target(lua_State *L); - static int32 card_check_equip_target(lua_State *L); - static int32 card_get_union_count(lua_State *L); - static int32 card_get_overlay_group(lua_State *L); - static int32 card_get_overlay_count(lua_State *L); - static int32 card_get_overlay_target(lua_State *L); - static int32 card_check_remove_overlay_card(lua_State *L); - static int32 card_remove_overlay_card(lua_State *L); - static int32 card_get_attacked_group(lua_State *L); - static int32 card_get_attacked_group_count(lua_State *L); - static int32 card_get_attacked_count(lua_State *L); - static int32 card_get_battled_group(lua_State *L); - static int32 card_get_battled_group_count(lua_State *L); - static int32 card_get_attack_announced_count(lua_State *L); - static int32 card_is_direct_attacked(lua_State *L); - static int32 card_set_card_target(lua_State *L); - static int32 card_get_card_target(lua_State *L); - static int32 card_get_first_card_target(lua_State *L); - static int32 card_get_card_target_count(lua_State *L); - static int32 card_is_has_card_target(lua_State *L); - static int32 card_cancel_card_target(lua_State *L); - static int32 card_get_owner_target(lua_State *L); - static int32 card_get_owner_target_count(lua_State *L); - static int32 card_get_activate_effect(lua_State *L); - static int32 card_check_activate_effect(lua_State *L); - static int32 card_register_effect(lua_State *L); - static int32 card_is_has_effect(lua_State *L); - static int32 card_reset_effect(lua_State *L); - static int32 card_get_effect_count(lua_State *L); - static int32 card_register_flag_effect(lua_State *L); - static int32 card_get_flag_effect(lua_State *L); - static int32 card_reset_flag_effect(lua_State *L); - static int32 card_set_flag_effect_label(lua_State *L); - static int32 card_get_flag_effect_label(lua_State *L); - static int32 card_create_relation(lua_State *L); - static int32 card_release_relation(lua_State *L); - static int32 card_create_effect_relation(lua_State *L); - static int32 card_release_effect_relation(lua_State *L); - static int32 card_clear_effect_relation(lua_State *L); - static int32 card_is_relate_to_effect(lua_State *L); - static int32 card_is_relate_to_card(lua_State *L); - static int32 card_is_relate_to_battle(lua_State *L); - static int32 card_copy_effect(lua_State *L); - static int32 card_enable_unsummonable(lua_State *L); - static int32 card_enable_revive_limit(lua_State *L); - static int32 card_complete_procedure(lua_State *L); - static int32 card_is_disabled(lua_State *L); - static int32 card_is_destructable(lua_State *L); - static int32 card_is_summonable(lua_State *L); - static int32 card_is_msetable(lua_State *L); - static int32 card_is_ssetable(lua_State *L); - static int32 card_is_special_summonable(lua_State *L); - static int32 card_is_synchro_summonable(lua_State *L); - static int32 card_is_xyz_summonable(lua_State *L); - static int32 card_is_can_be_summoned(lua_State *L); - static int32 card_is_can_be_special_summoned(lua_State *L); - static int32 card_is_able_to_hand(lua_State *L); - static int32 card_is_able_to_grave(lua_State *L); - static int32 card_is_able_to_deck(lua_State *L); - static int32 card_is_able_to_extra(lua_State *L); - static int32 card_is_able_to_remove(lua_State *L); - static int32 card_is_able_to_hand_as_cost(lua_State *L); - static int32 card_is_able_to_grave_as_cost(lua_State *L); - static int32 card_is_able_to_deck_as_cost(lua_State *L); - static int32 card_is_able_to_extra_as_cost(lua_State *L); - static int32 card_is_able_to_deck_or_extra_as_cost(lua_State *L); - static int32 card_is_able_to_remove_as_cost(lua_State *L); - static int32 card_is_releasable(lua_State *L); - static int32 card_is_releasable_by_effect(lua_State *L); - static int32 card_is_discardable(lua_State *L); - static int32 card_is_attackable(lua_State *L); - static int32 card_is_chain_attackable(lua_State *L); - static int32 card_is_faceup(lua_State *L); - static int32 card_is_attack_pos(lua_State *L); - static int32 card_is_facedown(lua_State *L); - static int32 card_is_defence_pos(lua_State *L); - static int32 card_is_position(lua_State *L); - static int32 card_is_pre_position(lua_State *L); - static int32 card_is_controler(lua_State *L); - static int32 card_is_onfield(lua_State *L); - static int32 card_is_location(lua_State *L); - static int32 card_is_pre_location(lua_State *L); - static int32 card_is_level_below(lua_State *L); - static int32 card_is_level_above(lua_State *L); - static int32 card_is_rank_below(lua_State *L); - static int32 card_is_rank_above(lua_State *L); - static int32 card_is_attack_below(lua_State *L); - static int32 card_is_attack_above(lua_State *L); - static int32 card_is_defence_below(lua_State *L); - static int32 card_is_defence_above(lua_State *L); - static int32 card_is_public(lua_State *L); - static int32 card_is_forbidden(lua_State *L); - static int32 card_is_able_to_change_controler(lua_State *L); - static int32 card_is_controler_can_be_changed(lua_State *L); - static int32 card_add_counter(lua_State *L); - static int32 card_remove_counter(lua_State *L); - static int32 card_get_counter(lua_State *L); - static int32 card_enable_counter_permit(lua_State *L); - static int32 card_set_counter_limit(lua_State *L); - static int32 card_is_can_turn_set(lua_State *L); - static int32 card_is_can_add_counter(lua_State *L); - static int32 card_is_can_remove_counter(lua_State *L); - static int32 card_is_can_be_fusion_material(lua_State *L); - static int32 card_is_can_be_synchro_material(lua_State *L); - static int32 card_is_can_be_ritual_material(lua_State *L); - static int32 card_is_can_be_xyz_material(lua_State *L); - static int32 card_check_fusion_material(lua_State *L); - static int32 card_is_immune_to_effect(lua_State *L); - static int32 card_is_can_be_effect_target(lua_State *L); - static int32 card_is_can_be_battle_target(lua_State *L); - static int32 card_add_trap_monster_attribute(lua_State *L); - static int32 card_trap_monster_block(lua_State *L); - static int32 card_cancel_to_grave(lua_State *L); - static int32 card_get_tribute_requirement(lua_State *L); - static int32 card_get_battle_target(lua_State *L); - static int32 card_get_attackable_target(lua_State *L); - static int32 card_set_hint(lua_State *L); - static int32 card_reverse_in_deck(lua_State *L); - static int32 card_set_unique_onfield(lua_State *L); - static int32 card_check_unique_onfield(lua_State *L); - static int32 card_reset_negate_effect(lua_State *L); - static int32 card_assume_prop(lua_State *L); - static int32 card_set_spsummon_once(lua_State *L); - - //Effect functions - static int32 effect_new(lua_State *L); - static int32 effect_newex(lua_State *L); - static int32 effect_clone(lua_State *L); - static int32 effect_reset(lua_State *L); - static int32 effect_get_field_id(lua_State *L); - static int32 effect_set_description(lua_State *L); - static int32 effect_set_code(lua_State *L); - static int32 effect_set_range(lua_State *L); - static int32 effect_set_target_range(lua_State *L); - static int32 effect_set_absolute_range(lua_State *L); - static int32 effect_set_count_limit(lua_State *L); - static int32 effect_set_reset(lua_State *L); - static int32 effect_set_type(lua_State *L); - static int32 effect_set_property(lua_State *L); - static int32 effect_set_label(lua_State *L); - static int32 effect_set_label_object(lua_State *L); - static int32 effect_set_category(lua_State *L); - static int32 effect_set_hint_timing(lua_State *L); - static int32 effect_set_condition(lua_State *L); - static int32 effect_set_target(lua_State *L); - static int32 effect_set_cost(lua_State *L); - static int32 effect_set_value(lua_State *L); - static int32 effect_set_operation(lua_State *L); - static int32 effect_set_owner_player(lua_State *L); - static int32 effect_get_description(lua_State *L); - static int32 effect_get_code(lua_State *L); - static int32 effect_get_type(lua_State *L); - static int32 effect_get_property(lua_State *L); - static int32 effect_get_label(lua_State *L); - static int32 effect_get_label_object(lua_State *L); - static int32 effect_get_category(lua_State *L); - static int32 effect_get_owner(lua_State *L); - static int32 effect_get_handler(lua_State *L); - static int32 effect_get_owner_player(lua_State *L); - static int32 effect_get_handler_player(lua_State *L); - static int32 effect_get_condition(lua_State *L); - static int32 effect_get_target(lua_State *L); - static int32 effect_get_cost(lua_State *L); - static int32 effect_get_value(lua_State *L); - static int32 effect_get_operation(lua_State *L); - static int32 effect_get_active_type(lua_State *L); - static int32 effect_is_active_type(lua_State *L); - static int32 effect_is_has_property(lua_State *L); - static int32 effect_is_has_category(lua_State *L); - static int32 effect_is_has_type(lua_State *L); - static int32 effect_is_activatable(lua_State *L); - static int32 effect_is_activated(lua_State *L); - static int32 effect_get_activate_location(lua_State *L); - - //Group functions - static int32 group_new(lua_State *L); - static int32 group_clone(lua_State *L); - static int32 group_from_cards(lua_State *L); - static int32 group_delete(lua_State *L); - static int32 group_keep_alive(lua_State *L); - static int32 group_clear(lua_State *L); - static int32 group_add_card(lua_State *L); - static int32 group_remove_card(lua_State *L); - static int32 group_get_next(lua_State *L); - static int32 group_get_first(lua_State *L); - static int32 group_get_count(lua_State *L); - static int32 group_for_each(lua_State *L); - static int32 group_filter(lua_State *L); - static int32 group_filter_count(lua_State *L); - static int32 group_filter_select(lua_State *L); - static int32 group_select(lua_State *L); - static int32 group_random_select(lua_State *L); - static int32 group_is_exists(lua_State *L); - static int32 group_check_with_sum_equal(lua_State *L); - static int32 group_select_with_sum_equal(lua_State *L); - static int32 group_check_with_sum_greater(lua_State *L); - static int32 group_select_with_sum_greater(lua_State *L); - static int32 group_get_min_group(lua_State *L); - static int32 group_get_max_group(lua_State *L); - static int32 group_get_sum(lua_State *L); - static int32 group_get_class_count(lua_State *L); - static int32 group_remove(lua_State *L); - static int32 group_merge(lua_State *L); - static int32 group_sub(lua_State *L); - static int32 group_equal(lua_State *L); - static int32 group_is_contains(lua_State *L); - static int32 group_search_card(lua_State *L); - - //Duel functions - static int32 duel_enable_global_flag(lua_State *L); - static int32 duel_get_lp(lua_State *L); - static int32 duel_set_lp(lua_State *L); - static int32 duel_get_turn_player(lua_State *L); - static int32 duel_get_turn_count(lua_State *L); - static int32 duel_get_draw_count(lua_State *L); - static int32 duel_register_effect(lua_State *L); - static int32 duel_register_flag_effect(lua_State *L); - static int32 duel_reset_flag_effect(lua_State *L); - static int32 duel_get_flag_effect(lua_State *L); - static int32 duel_destroy(lua_State *L); - static int32 duel_remove(lua_State *L); - static int32 duel_sendto_grave(lua_State *L); - static int32 duel_summon(lua_State *L); - static int32 duel_special_summon_rule(lua_State *L); - static int32 duel_synchro_summon(lua_State *L); - static int32 duel_xyz_summon(lua_State *L); - static int32 duel_setm(lua_State *L); - static int32 duel_sets(lua_State *L); - static int32 duel_create_token(lua_State *L); - static int32 duel_special_summon(lua_State *L); - static int32 duel_special_summon_step(lua_State *L); - static int32 duel_special_summon_complete(lua_State *L); - static int32 duel_sendto_hand(lua_State *L); - static int32 duel_sendto_deck(lua_State *L); - static int32 duel_get_operated_group(lua_State *L); - static int32 duel_remove_counter(lua_State *L); - static int32 duel_is_can_remove_counter(lua_State *L); - static int32 duel_get_counter(lua_State *L); - static int32 duel_change_form(lua_State *L); - static int32 duel_release(lua_State *L); - static int32 duel_move_to_field(lua_State *L); - static int32 duel_return_to_field(lua_State *L); - static int32 duel_move_sequence(lua_State *L); - static int32 duel_set_chain_limit(lua_State *L); - static int32 duel_set_chain_limit_p(lua_State *L); - static int32 duel_get_chain_material(lua_State *L); - static int32 duel_confirm_decktop(lua_State *L); - static int32 duel_confirm_cards(lua_State *L); - static int32 duel_sort_decktop(lua_State *L); - static int32 duel_check_event(lua_State *L); - static int32 duel_raise_event(lua_State *L); - static int32 duel_raise_single_event(lua_State *L); - static int32 duel_check_timing(lua_State *L); - static int32 duel_get_environment(lua_State *L); - static int32 duel_is_environment(lua_State *L); - - static int32 duel_win(lua_State *L); - static int32 duel_draw(lua_State *L); - static int32 duel_damage(lua_State *L); - static int32 duel_recover(lua_State *L); - static int32 duel_equip(lua_State *L); - static int32 duel_equip_complete(lua_State *L); - static int32 duel_get_control(lua_State *L); - static int32 duel_swap_control(lua_State *L); - static int32 duel_check_lp_cost(lua_State *L); - static int32 duel_pay_lp_cost(lua_State *L); - static int32 duel_discard_deck(lua_State *L); - static int32 duel_discard_hand(lua_State *L); - static int32 duel_disable_shuffle_check(lua_State *L); - static int32 duel_shuffle_deck(lua_State *L); - static int32 duel_shuffle_hand(lua_State *L); - static int32 duel_shuffle_setcard(lua_State *L); - static int32 duel_change_attacker(lua_State *L); - static int32 duel_replace_attacker(lua_State *L); - static int32 duel_change_attack_target(lua_State *L); - static int32 duel_replace_attack_target(lua_State *L); - static int32 duel_calculate_damage(lua_State *L); - static int32 duel_get_battle_damage(lua_State *L); - static int32 duel_change_battle_damage(lua_State *L); - static int32 duel_change_target(lua_State *L); - static int32 duel_change_target_player(lua_State *L); - static int32 duel_change_target_param(lua_State *L); - static int32 duel_break_effect(lua_State *L); - static int32 duel_change_effect(lua_State *L); - static int32 duel_negate_activate(lua_State *L); - static int32 duel_negate_effect(lua_State *L); - static int32 duel_negate_related_chain(lua_State *L); - static int32 duel_disable_summon(lua_State *L); - static int32 duel_increase_summon_count(lua_State *L); - static int32 duel_check_summon_count(lua_State *L); - static int32 duel_get_location_count(lua_State *L); - static int32 duel_get_field_card(lua_State *L); - static int32 duel_check_location(lua_State *L); - static int32 duel_get_current_chain(lua_State *L); - static int32 duel_get_chain_info(lua_State *L); - static int32 duel_get_first_target(lua_State *L); - static int32 duel_get_current_phase(lua_State *L); - static int32 duel_skip_phase(lua_State *L); - static int32 duel_is_damage_calculated(lua_State *L); - static int32 duel_get_attacker(lua_State *L); - static int32 duel_get_attack_target(lua_State *L); - static int32 duel_disable_attack(lua_State *L); - static int32 duel_chain_attack(lua_State *L); - static int32 duel_readjust(lua_State *L); - static int32 duel_adjust_instantly(lua_State *L); - - static int32 duel_get_field_group(lua_State *L); - static int32 duel_get_field_group_count(lua_State *L); - static int32 duel_get_decktop_group(lua_State *L); - static int32 duel_get_matching_group(lua_State *L); - static int32 duel_get_matching_count(lua_State *L); - static int32 duel_get_first_matching_card(lua_State *L); - static int32 duel_is_existing_matching_card(lua_State *L); - static int32 duel_select_matching_cards(lua_State *L); - static int32 duel_get_release_group(lua_State *L); - static int32 duel_get_release_group_count(lua_State *L); - static int32 duel_check_release_group(lua_State *L); - static int32 duel_select_release_group(lua_State *L); - static int32 duel_check_release_group_ex(lua_State *L); - static int32 duel_select_release_group_ex(lua_State *L); - static int32 duel_get_tribute_group(lua_State *L); - static int32 duel_get_tribute_count(lua_State *L); - static int32 duel_select_tribute(lua_State *L); - static int32 duel_get_target_count(lua_State *L); - static int32 duel_is_existing_target(lua_State *L); - static int32 duel_select_target(lua_State *L); - static int32 duel_select_fusion_material(lua_State *L); - static int32 duel_set_fusion_material(lua_State *L); - static int32 duel_set_synchro_material(lua_State *L); - static int32 duel_select_synchro_material(lua_State *L); - static int32 duel_check_synchro_material(lua_State *L); - static int32 duel_select_tuner_material(lua_State *L); - static int32 duel_check_tuner_material(lua_State *L); - static int32 duel_get_ritual_material(lua_State *L); - static int32 duel_release_ritual_material(lua_State *L); - static int32 duel_set_target_card(lua_State *L); - static int32 duel_clear_target_card(lua_State *L); - static int32 duel_set_target_player(lua_State *L); - static int32 duel_set_target_param(lua_State *L); - static int32 duel_set_operation_info(lua_State *L); - static int32 duel_get_operation_info(lua_State *L); - static int32 duel_get_operation_count(lua_State *L); - static int32 duel_check_xyz_material(lua_State *L); - static int32 duel_select_xyz_material(lua_State *L); - static int32 duel_overlay(lua_State *L); - static int32 duel_get_overlay_group(lua_State *L); - static int32 duel_get_overlay_count(lua_State *L); - static int32 duel_check_remove_overlay_card(lua_State *L); - static int32 duel_remove_overlay_card(lua_State *L); - - static int32 duel_hint(lua_State *L); - static int32 duel_hint_selection(lua_State *L); - static int32 duel_select_effect_yesno(lua_State *L); - static int32 duel_select_yesno(lua_State *L); - static int32 duel_select_option(lua_State *L); - static int32 duel_select_sequence(lua_State *L); - static int32 duel_select_position(lua_State *L); - static int32 duel_select_disable_field(lua_State *L); - static int32 duel_announce_race(lua_State *L); - static int32 duel_announce_attribute(lua_State *L); - static int32 duel_announce_level(lua_State *L); - static int32 duel_announce_card(lua_State *L); - static int32 duel_announce_type(lua_State *L); - static int32 duel_announce_number(lua_State *L); - static int32 duel_announce_coin(lua_State *L); - static int32 duel_toss_coin(lua_State *L); - static int32 duel_toss_dice(lua_State *L); - static int32 duel_get_coin_result(lua_State *L); - static int32 duel_get_dice_result(lua_State *L); - static int32 duel_set_coin_result(lua_State *L); - static int32 duel_set_dice_result(lua_State *L); - - static int32 duel_is_player_affected_by_effect(lua_State *L); - static int32 duel_is_player_can_draw(lua_State *L); - static int32 duel_is_player_can_discard_deck(lua_State *L); - static int32 duel_is_player_can_discard_deck_as_cost(lua_State *L); - static int32 duel_is_player_can_summon(lua_State *L); - static int32 duel_is_player_can_spsummon(lua_State *L); - static int32 duel_is_player_can_flipsummon(lua_State *L); - static int32 duel_is_player_can_spsummon_monster(lua_State *L); - static int32 duel_is_player_can_spsummon_count(lua_State *L); - static int32 duel_is_player_can_release(lua_State *L); - static int32 duel_is_player_can_remove(lua_State *L); - static int32 duel_is_player_can_send_to_hand(lua_State *L); - static int32 duel_is_player_can_send_to_grave(lua_State *L); - static int32 duel_is_player_can_send_to_deck(lua_State *L); - static int32 duel_is_chain_negatable(lua_State *L); - static int32 duel_is_chain_disablable(lua_State *L); - static int32 duel_check_chain_target(lua_State *L); - static int32 duel_check_chain_uniqueness(lua_State *L); - static int32 duel_get_activity_count(lua_State *L); - static int32 duel_check_phase_activity(lua_State *L); - static int32 duel_add_custom_activity_counter(lua_State *L); - static int32 duel_get_custom_activity_count(lua_State *L); - static int32 duel_is_able_to_enter_bp(lua_State *L); - - //specific card functions - static int32 duel_venom_swamp_check(lua_State *L); - static int32 duel_swap_deck_and_grave(lua_State *L); - static int32 duel_majestic_copy(lua_State *L); - - //preload - static int32 debug_message(lua_State *L); - static int32 debug_add_card(lua_State *L); - static int32 debug_set_player_info(lua_State *L); - static int32 debug_pre_equip(lua_State *L); - static int32 debug_pre_set_target(lua_State *L); - static int32 debug_pre_add_counter(lua_State *L); - static int32 debug_reload_field_begin(lua_State *L); - static int32 debug_reload_field_end(lua_State *L); - static int32 debug_set_ai_name(lua_State *L); - static int32 debug_show_hint(lua_State *L); -}; - -#endif /* SCRIPTLIB_H_ */ diff --git a/premake/event/premake5.lua b/premake/event/premake5.lua new file mode 100644 index 0000000000..1ee127bb3a --- /dev/null +++ b/premake/event/premake5.lua @@ -0,0 +1,40 @@ +project "event" + kind "StaticLib" + + local EVENT_VERSION = (io.readfile("configure") or ""):match("NUMERIC_VERSION%s+(0x%x+)") + if not EVENT_VERSION then + print("Warning: Could not determine libevent version from the configure file, assuming 2.1.12.") + EVENT_VERSION = "0x02010c00" -- 2.1.12 + end + EVENT_VERSION = tonumber(EVENT_VERSION) + if EVENT_VERSION>=0x02020000 then + print("Warning: Using libevent version 2.2.x is not supported, please use 2.1.x, otherwise you may encounter issues.") + end + + includedirs { "include", "compat" } + + files { "event.c", "evthread.c", "buffer.c", "bufferevent.c", "bufferevent_sock.c", + "bufferevent_filter.c", "bufferevent_pair.c", "listener.c", "bufferevent_ratelim.c", + "evmap.c", "log.c", "evutil.c", "evutil_rand.c", "strlcpy.c", "signal.c", + "event_tagging.c", "http.c", "evdns.c", "evrpc.c" } + + if EVENT_VERSION>=0x02010000 then + files { "evutil_time.c" } + end + + filter "system:windows" + prebuildcommands { "xcopy /E /Y $(ProjectDir)..\\event\\WIN32-Code $(ProjectDir)..\\event\\include" } + files { "win32select.c", "evthread_win32.c", "buffer_iocp.c", "event_iocp.c", "bufferevent_async.c" } + if EVENT_VERSION>=0x02010000 then + prebuildcommands { "xcopy /E /Y $(ProjectDir)..\\event\\WIN32-Code\\nmake $(ProjectDir)..\\event\\include" } + defines { "UINT32_MAX=0xffffffffU" } -- quirk of libevent 2.1 + end + if EVENT_VERSION<0x02010000 then + defines { "WIN32" } -- quirk of old libevent + end + + filter "system:linux" + files { "evthread_pthread.c", "epoll.c", "epoll_sub.c", "poll.c", "select.c" } + + filter "system:macosx" + files { "evthread_pthread.c", "kqueue.c", "poll.c", "select.c" } diff --git a/premake/freetype/custom/ft2build.h b/premake/freetype/custom/ft2build.h new file mode 100644 index 0000000000..2970642bb2 --- /dev/null +++ b/premake/freetype/custom/ft2build.h @@ -0,0 +1,20 @@ +/**************************************************************************** + * + * ft2build.h + * + * FreeType 2 build and setup macros. + * + * Use custom/ft2build.h instead of the default include/freetype/ft2build.h + * to customize the FreeType 2 build of YGOPro. + * + */ + +#ifndef FT2_BUILD_MY_PLATFORM_H_ +#define FT2_BUILD_MY_PLATFORM_H_ + +#define FT_CONFIG_OPTIONS_H +#define FT_CONFIG_MODULES_H + +#include + +#endif /* FT2_BUILD_MY_PLATFORM_H_ */ diff --git a/premake/freetype/custom/ygopro/ftmodule.h b/premake/freetype/custom/ygopro/ftmodule.h new file mode 100644 index 0000000000..19d0e370f7 --- /dev/null +++ b/premake/freetype/custom/ygopro/ftmodule.h @@ -0,0 +1,16 @@ +/* + * This file registers the FreeType modules compiled into the library. + * + * YGOPro only uses modules that are needed for TrueType and OpenType fonts. + * + */ + +FT_USE_MODULE( FT_Driver_ClassRec, tt_driver_class ) +FT_USE_MODULE( FT_Driver_ClassRec, cff_driver_class ) +FT_USE_MODULE( FT_Module_Class, psaux_module_class ) +FT_USE_MODULE( FT_Module_Class, psnames_module_class ) +FT_USE_MODULE( FT_Module_Class, pshinter_module_class ) +FT_USE_MODULE( FT_Module_Class, sfnt_module_class ) +FT_USE_MODULE( FT_Renderer_Class, ft_smooth_renderer_class ) + +/* EOF */ diff --git a/premake/freetype/custom/ygopro/ftoption.h b/premake/freetype/custom/ygopro/ftoption.h new file mode 100644 index 0000000000..c01dc84764 --- /dev/null +++ b/premake/freetype/custom/ygopro/ftoption.h @@ -0,0 +1,99 @@ +/**************************************************************************** + * + * ftoption.h + * + * User-selectable configuration macros (specification only). + * + * This file is customized for YGOPro to include only the necessary + * configuration options for the TrueType and OpenType font driver. + * + * See the original FreeType source code for more information. + * /include/freetype/config/ftoption.h + * + */ + +#ifndef FTOPTION_H_ +#define FTOPTION_H_ + + +#include + + +FT_BEGIN_HEADER + +#define FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES + +#undef FT_CONFIG_OPTION_FORCE_INT64 + +#define FT_CONFIG_OPTION_INLINE_MULFIX + +#define FT_CONFIG_OPTION_POSTSCRIPT_NAMES + +#define FT_CONFIG_OPTION_INCREMENTAL + +#define FT_RENDER_POOL_SIZE 16384L + +#define FT_MAX_MODULES 32 + +#undef FT_CONFIG_OPTION_USE_MODULE_ERRORS + +#define TT_CONFIG_OPTION_EMBEDDED_BITMAPS + +#define TT_CONFIG_OPTION_COLOR_LAYERS + +#define TT_CONFIG_OPTION_POSTSCRIPT_NAMES + +#define TT_CONFIG_CMAP_FORMAT_0 +#define TT_CONFIG_CMAP_FORMAT_2 +#define TT_CONFIG_CMAP_FORMAT_4 +#define TT_CONFIG_CMAP_FORMAT_6 +#define TT_CONFIG_CMAP_FORMAT_8 +#define TT_CONFIG_CMAP_FORMAT_10 +#define TT_CONFIG_CMAP_FORMAT_12 +#define TT_CONFIG_CMAP_FORMAT_13 +#define TT_CONFIG_CMAP_FORMAT_14 + +#define TT_CONFIG_OPTION_BYTECODE_INTERPRETER + +#define TT_CONFIG_OPTION_SUBPIXEL_HINTING + +#undef TT_CONFIG_OPTION_COMPONENT_OFFSET_SCALED + +#ifndef TT_CONFIG_OPTION_MAX_RUNNABLE_OPCODES +#define TT_CONFIG_OPTION_MAX_RUNNABLE_OPCODES 1000000L +#endif + +#define T1_MAX_SUBRS_CALLS 16 + +#define T1_MAX_CHARSTRINGS_OPERANDS 256 + +#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_X1 500 +#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y1 400 + +#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_X2 1000 +#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y2 275 + +#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_X3 1667 +#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y3 275 + +#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_X4 2333 +#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y4 0 + + +#ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER +#define TT_USE_BYTECODE_INTERPRETER +#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING +#define TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL +#endif +#endif + +#ifdef TT_CONFIG_OPTION_COLOR_LAYERS +#define TT_SUPPORT_COLRV1 +#endif + +FT_END_HEADER + +#endif /* FTOPTION_H_ */ + + +/* END */ diff --git a/premake/freetype/premake5.lua b/premake/freetype/premake5.lua new file mode 100644 index 0000000000..7f8e51e460 --- /dev/null +++ b/premake/freetype/premake5.lua @@ -0,0 +1,26 @@ +project "freetype" + kind "StaticLib" + + includedirs { "custom", "include" } + defines { "FT2_BUILD_LIBRARY" } + + files { + "src/base/ftinit.c", + "src/base/ftbase.c", + "src/base/ftbitmap.c", + "src/cff/cff.c", + "src/psaux/psaux.c", + "src/pshinter/pshinter.c", + "src/psnames/psnames.c", + "src/sfnt/sfnt.c", + "src/smooth/smooth.c", + "src/truetype/truetype.c", + } + + filter "system:windows" + files { "builds/windows/ftsystem.c", + "builds/windows/ftdebug.c" } + + filter "not system:windows" + files { "src/base/ftsystem.c", + "src/base/ftdebug.c" } diff --git a/premake/irrlicht/premake5.lua b/premake/irrlicht/premake5.lua new file mode 100644 index 0000000000..4517162b59 --- /dev/null +++ b/premake/irrlicht/premake5.lua @@ -0,0 +1,174 @@ +project "irrlicht" + kind "StaticLib" + + includedirs { + "include", + "source/Irrlicht", + "source/Irrlicht/jpeglib", + "source/Irrlicht/libpng", + "source/Irrlicht/zlib" + } + + exceptionhandling "Off" + rtti "Off" + + defines { + "_IRR_STATIC_LIB_", + "NO_IRR_USE_NON_SYSTEM_BZLIB_", + "NO_IRR_COMPILE_WITH_BZIP2_", + "NO_IRR_COMPILE_WITH_LZMA_", + "NO_IRR_COMPILE_WITH_CONSOLE_DEVICE_", + "NO_IRR_COMPILE_WITH_DIRECT3D_8_", + "NO_IRR_COMPILE_WITH_DIRECTINPUT_JOYSTICK_", + "NO_IRR_COMPILE_WITH_JOYSTICK_EVENTS_", + "NO_IRR_COMPILE_WITH_SOFTWARE_", + "NO_IRR_COMPILE_WITH_BURNINGSVIDEO_", + "NO_IRR_COMPILE_WITH_IRR_SCENE_LOADER_", + "NO_IRR_COMPILE_WITH_SKINNED_MESH_SUPPORT_", + "NO_IRR_COMPILE_WITH_IRR_MESH_LOADER_", + "NO_IRR_COMPILE_WITH_HALFLIFE_LOADER_", + "NO_IRR_COMPILE_WITH_MD2_LOADER_", + "NO_IRR_COMPILE_WITH_MD3_LOADER_", + "NO_IRR_COMPILE_WITH_3DS_LOADER_", + "NO_IRR_COMPILE_WITH_COLLADA_LOADER_", + "NO_IRR_COMPILE_WITH_CSM_LOADER_", + "NO_IRR_COMPILE_WITH_BSP_LOADER_", + "NO_IRR_COMPILE_WITH_DMF_LOADER_", + "NO_IRR_COMPILE_WITH_LMTS_LOADER_", + "NO_IRR_COMPILE_WITH_MY3D_LOADER_", + "NO_IRR_COMPILE_WITH_OBJ_LOADER_", + "NO_IRR_COMPILE_WITH_OCT_LOADER_", + "NO_IRR_COMPILE_WITH_LWO_LOADER_", + "NO_IRR_COMPILE_WITH_STL_LOADER_", + "NO_IRR_COMPILE_WITH_PLY_LOADER_", + "NO_IRR_COMPILE_WITH_SMF_LOADER_", + "NO_IRR_COMPILE_WITH_IRR_WRITER_", + "NO_IRR_COMPILE_WITH_COLLADA_WRITER_", + "NO_IRR_COMPILE_WITH_STL_WRITER_", + "NO_IRR_COMPILE_WITH_OBJ_WRITER_", + "NO_IRR_COMPILE_WITH_PLY_WRITER_", + "NO_IRR_COMPILE_WITH_PCX_LOADER_", + "NO_IRR_COMPILE_WITH_PPM_LOADER_", + "NO_IRR_COMPILE_WITH_PSD_LOADER_", + "NO_IRR_COMPILE_WITH_TGA_LOADER_", + "NO_IRR_COMPILE_WITH_WAL_LOADER_", + "NO_IRR_COMPILE_WITH_LMP_LOADER_", + "NO_IRR_COMPILE_WITH_RGB_LOADER_", + "NO_IRR_COMPILE_WITH_PCX_WRITER_", + "NO_IRR_COMPILE_WITH_PPM_WRITER_", + "NO_IRR_COMPILE_WITH_PSD_WRITER_", + "NO_IRR_COMPILE_WITH_TGA_WRITER_", + "NO__IRR_COMPILE_WITH_PAK_ARCHIVE_LOADER_", + "NO__IRR_COMPILE_WITH_NPK_ARCHIVE_LOADER_", + "NO__IRR_COMPILE_WITH_WAD_ARCHIVE_LOADER_", + "NO_IRR_COMPILE_WITH_ZIP_ENCRYPTION_", + "PNG_INTEL_SSE", + "PNG_ARM_NEON_OPT=0", + "PNG_ARM_NEON_IMPLEMENTATION=0", + } + + files { + "include/*.h", + "source/Irrlicht/*.cpp", + "source/Irrlicht/zlib/zlib.h", + "source/Irrlicht/zlib/adler32.c", + "source/Irrlicht/zlib/compress.c", + "source/Irrlicht/zlib/crc32.h", + "source/Irrlicht/zlib/crc32.c", + "source/Irrlicht/zlib/deflate.h", + "source/Irrlicht/zlib/deflate.c", + "source/Irrlicht/zlib/inffast.h", + "source/Irrlicht/zlib/inffast.c", + "source/Irrlicht/zlib/inflate.h", + "source/Irrlicht/zlib/inflate.c", + "source/Irrlicht/zlib/inftrees.h", + "source/Irrlicht/zlib/inftrees.c", + "source/Irrlicht/zlib/trees.h", + "source/Irrlicht/zlib/trees.c", + "source/Irrlicht/zlib/uncompr.c", + "source/Irrlicht/zlib/zutil.h", + "source/Irrlicht/zlib/zutil.c", + "source/Irrlicht/jpeglib/jaricom.c", + "source/Irrlicht/jpeglib/jcapimin.c", + "source/Irrlicht/jpeglib/jcapistd.c", + "source/Irrlicht/jpeglib/jcarith.c", + "source/Irrlicht/jpeglib/jccoefct.c", + "source/Irrlicht/jpeglib/jccolor.c", + "source/Irrlicht/jpeglib/jcdctmgr.c", + "source/Irrlicht/jpeglib/jchuff.c", + "source/Irrlicht/jpeglib/jcinit.c", + "source/Irrlicht/jpeglib/jcmainct.c", + "source/Irrlicht/jpeglib/jcmarker.c", + "source/Irrlicht/jpeglib/jcmaster.c", + "source/Irrlicht/jpeglib/jcomapi.c", + "source/Irrlicht/jpeglib/jcparam.c", + "source/Irrlicht/jpeglib/jcprepct.c", + "source/Irrlicht/jpeglib/jcsample.c", + "source/Irrlicht/jpeglib/jctrans.c", + "source/Irrlicht/jpeglib/jdapimin.c", + "source/Irrlicht/jpeglib/jdapistd.c", + "source/Irrlicht/jpeglib/jdarith.c", + "source/Irrlicht/jpeglib/jdatadst.c", + "source/Irrlicht/jpeglib/jdatasrc.c", + "source/Irrlicht/jpeglib/jdcoefct.c", + "source/Irrlicht/jpeglib/jdcolor.c", + "source/Irrlicht/jpeglib/jddctmgr.c", + "source/Irrlicht/jpeglib/jdhuff.c", + "source/Irrlicht/jpeglib/jdinput.c", + "source/Irrlicht/jpeglib/jdmainct.c", + "source/Irrlicht/jpeglib/jdmarker.c", + "source/Irrlicht/jpeglib/jdmaster.c", + "source/Irrlicht/jpeglib/jdmerge.c", + "source/Irrlicht/jpeglib/jdpostct.c", + "source/Irrlicht/jpeglib/jdsample.c", + "source/Irrlicht/jpeglib/jdtrans.c", + "source/Irrlicht/jpeglib/jerror.c", + "source/Irrlicht/jpeglib/jfdctflt.c", + "source/Irrlicht/jpeglib/jfdctfst.c", + "source/Irrlicht/jpeglib/jfdctint.c", + "source/Irrlicht/jpeglib/jidctflt.c", + "source/Irrlicht/jpeglib/jidctfst.c", + "source/Irrlicht/jpeglib/jidctint.c", + "source/Irrlicht/jpeglib/jmemmgr.c", + "source/Irrlicht/jpeglib/jmemnobs.c", + "source/Irrlicht/jpeglib/jquant1.c", + "source/Irrlicht/jpeglib/jquant2.c", + "source/Irrlicht/jpeglib/jutils.c", + "source/Irrlicht/libpng/png.c", + "source/Irrlicht/libpng/pngerror.c", + "source/Irrlicht/libpng/pngget.c", + "source/Irrlicht/libpng/pngmem.c", + "source/Irrlicht/libpng/pngpread.c", + "source/Irrlicht/libpng/pngread.c", + "source/Irrlicht/libpng/pngrio.c", + "source/Irrlicht/libpng/pngrtran.c", + "source/Irrlicht/libpng/pngrutil.c", + "source/Irrlicht/libpng/pngset.c", + "source/Irrlicht/libpng/pngtrans.c", + "source/Irrlicht/libpng/pngwio.c", + "source/Irrlicht/libpng/pngwrite.c", + "source/Irrlicht/libpng/pngwtran.c", + "source/Irrlicht/libpng/pngwutil.c", + "source/Irrlicht/libpng/intel/intel_init.c", + "source/Irrlicht/libpng/intel/filter_sse2_intrinsics.c", + } + + filter { "system:windows" } + defines { "_IRR_WCHAR_FILESYSTEM" } + if USE_DXSDK then + includedirs { "$(DXSDK_DIR)Include" } + else + defines { "NO_IRR_COMPILE_WITH_DIRECT3D_9_" } + end + + filter { "system:macosx" } + cppdialect "gnu++14" + defines { "GL_SILENCE_DEPRECATION" } + undefines { "NO_IRR_COMPILE_WITH_JOYSTICK_EVENTS_" } + files { + "source/Irrlicht/MacOSX/*.mm", + "source/Irrlicht/MacOSX/*.h", + } + + filter { "system:macosx", "files:source/Irrlicht/Irrlicht.cpp or source/Irrlicht/COpenGLDriver.cpp" } + compileas "Objective-C++" diff --git a/premake/lua/premake5.lua b/premake/lua/premake5.lua new file mode 100644 index 0000000000..afbd4dba2e --- /dev/null +++ b/premake/lua/premake5.lua @@ -0,0 +1,18 @@ +project "lua" + kind "StaticLib" + compileas "C++" + + files { "src/*.c", "src/*.h" } + removefiles { "src/lua.c", "src/luac.c", "src/linit.c", "src/onelua.c" } + + filter "configurations:Debug" + defines { "LUA_USE_APICHECK" } + + filter "system:bsd" + defines { "LUA_USE_POSIX" } + + filter "system:macosx" + defines { "LUA_USE_MACOSX" } + + filter "system:linux" + defines { "LUA_USE_LINUX" } diff --git a/premake/miniaudio/premake5.lua b/premake/miniaudio/premake5.lua new file mode 100644 index 0000000000..13835dbe1b --- /dev/null +++ b/premake/miniaudio/premake5.lua @@ -0,0 +1,140 @@ +project "miniaudio" + kind "StaticLib" + files { "miniaudio.c", "miniaudio.h" } + defines { "MA_NO_ENCODING", "MA_NO_GENERATION", "MA_NO_NEON" } + + if MINIAUDIO_SUPPORT_OPUS_VORBIS then + files { "extras/decoders/libopus/*", "extras/decoders/libvorbis/*" } + if MINIAUDIO_BUILD_OPUS_VORBIS then + files { + "external/ogg/src/bitwise.c", + "external/ogg/src/framing.c", + + "external/opus/src/opus.c", + "external/opus/src/opus_decoder.c", + "external/opus/src/opus_multistream.c", + "external/opus/src/opus_multistream_decoder.c", + + "external/opus/celt/bands.c", + "external/opus/celt/celt.c", + "external/opus/celt/celt_decoder.c", + "external/opus/celt/celt_lpc.c", + "external/opus/celt/cwrs.c", + "external/opus/celt/entcode.c", + "external/opus/celt/entdec.c", + "external/opus/celt/entenc.c", + "external/opus/celt/kiss_fft.c", + "external/opus/celt/laplace.c", + "external/opus/celt/mathops.c", + "external/opus/celt/mdct.c", + "external/opus/celt/modes.c", + "external/opus/celt/pitch.c", + "external/opus/celt/quant_bands.c", + "external/opus/celt/rate.c", + "external/opus/celt/vq.c", + + "external/opus/silk/bwexpander.c", + "external/opus/silk/bwexpander_32.c", + "external/opus/silk/CNG.c", + "external/opus/silk/code_signs.c", + "external/opus/silk/dec_API.c", + "external/opus/silk/decode_core.c", + "external/opus/silk/decode_frame.c", + "external/opus/silk/decode_indices.c", + "external/opus/silk/decode_parameters.c", + "external/opus/silk/decode_pitch.c", + "external/opus/silk/decode_pulses.c", + "external/opus/silk/decoder_set_fs.c", + "external/opus/silk/gain_quant.c", + "external/opus/silk/init_decoder.c", + "external/opus/silk/lin2log.c", + "external/opus/silk/log2lin.c", + "external/opus/silk/LPC_analysis_filter.c", + "external/opus/silk/LPC_fit.c", + "external/opus/silk/LPC_inv_pred_gain.c", + "external/opus/silk/NLSF_decode.c", + "external/opus/silk/NLSF_stabilize.c", + "external/opus/silk/NLSF_unpack.c", + "external/opus/silk/NLSF2A.c", + "external/opus/silk/pitch_est_tables.c", + "external/opus/silk/PLC.c", + "external/opus/silk/resampler.c", + "external/opus/silk/resampler_private_AR2.c", + "external/opus/silk/resampler_private_down_FIR.c", + "external/opus/silk/resampler_private_IIR_FIR.c", + "external/opus/silk/resampler_private_up2_HQ.c", + "external/opus/silk/resampler_rom.c", + "external/opus/silk/shell_coder.c", + "external/opus/silk/sort.c", + "external/opus/silk/stereo_decode_pred.c", + "external/opus/silk/stereo_MS_to_LR.c", + "external/opus/silk/sum_sqr_shift.c", + "external/opus/silk/table_LSF_cos.c", + "external/opus/silk/tables_gain.c", + "external/opus/silk/tables_LTP.c", + "external/opus/silk/tables_NLSF_CB_NB_MB.c", + "external/opus/silk/tables_NLSF_CB_WB.c", + "external/opus/silk/tables_other.c", + "external/opus/silk/tables_pitch_lag.c", + "external/opus/silk/tables_pulses_per_block.c", + + "external/opusfile/src/info.c", + "external/opusfile/src/internal.c", + "external/opusfile/src/opusfile.c", + "external/opusfile/src/stream.c", + + "external/vorbis/lib/bitrate.c", + "external/vorbis/lib/block.c", + "external/vorbis/lib/codebook.c", + "external/vorbis/lib/envelope.c", + "external/vorbis/lib/floor0.c", + "external/vorbis/lib/floor1.c", + "external/vorbis/lib/info.c", + "external/vorbis/lib/lpc.c", + "external/vorbis/lib/lsp.c", + "external/vorbis/lib/mapping0.c", + "external/vorbis/lib/mdct.c", + "external/vorbis/lib/psy.c", + "external/vorbis/lib/registry.c", + "external/vorbis/lib/res0.c", + "external/vorbis/lib/sharedbook.c", + "external/vorbis/lib/smallft.c", + "external/vorbis/lib/synthesis.c", + "external/vorbis/lib/vorbisfile.c", + "external/vorbis/lib/window.c", + } + includedirs { + "external/ogg/include", + "external/opus/include", + "external/opus/celt", + "external/opus/silk", + "external/opusfile/include", + "external/vorbis/include", + } + defines { + "OPUS_BUILD", + "USE_ALLOCA", + "HAVE_LRINTF", + "OP_HAVE_LRINTF", + } + if not TARGET_MAC_ARM then + files { + "external/opus/celt/x86/pitch_avx.c", + "external/opus/celt/x86/pitch_sse.c", + "external/opus/celt/x86/vq_sse2.c", + "external/opus/celt/x86/x86_celt_map.c", + "external/opus/celt/x86/x86cpu.c", + } + defines { + "OPUS_HAVE_RTCD", "CPU_INFO_BY_ASM", + "OPUS_X86_PRESUME_SSE", "OPUS_X86_PRESUME_SSE2", + "OPUS_X86_MAY_HAVE_SSE", "OPUS_X86_MAY_HAVE_SSE4_1", "OPUS_X86_MAY_HAVE_AVX2", + } + filter "system:linux" + buildoptions { "-mavx", "-mfma" } + filter {} + end + else + includedirs { OPUS_INCLUDE_DIR, OPUSFILE_INCLUDE_DIR, VORBIS_INCLUDE_DIR, OGG_INCLUDE_DIR } + end + end diff --git a/premake/sqlite3/premake5.lua b/premake/sqlite3/premake5.lua new file mode 100644 index 0000000000..95df9c633a --- /dev/null +++ b/premake/sqlite3/premake5.lua @@ -0,0 +1,14 @@ +project "sqlite3" + kind "StaticLib" + + files { "sqlite3.c", "sqlite3.h" } + defines { + "SQLITE_DQS=0", + "SQLITE_DEFAULT_MEMSTATUS=0", + "SQLITE_MAX_EXPR_DEPTH=0", + "SQLITE_OMIT_DECLTYPE", + "SQLITE_OMIT_DEPRECATED", + "SQLITE_OMIT_PROGRESS_CALLBACK", + "SQLITE_OMIT_SHARED_CACHE", + "SQLITE_TRUSTED_SCHEMA=0", + } diff --git a/premake4.lua b/premake4.lua deleted file mode 100644 index c0892d85c0..0000000000 --- a/premake4.lua +++ /dev/null @@ -1,59 +0,0 @@ -solution "ygo" - location "build" - language "C++" - objdir "obj" - - configurations { "Debug", "Release" } - - configuration "windows" - defines { "WIN32", "_WIN32" } - - configuration "bsd" - defines { "LUA_USE_POSIX" } - includedirs { "/usr/local/include" } - libdirs { "/usr/local/lib" } - - configuration "macosx" - defines { "LUA_USE_MACOSX" } - includedirs { "/opt/local/include" } - libdirs { "/opt/local/lib" } - - configuration "linux" - defines { "LUA_USE_LINUX" } - - configuration "vs*" - flags "EnableSSE2" - buildoptions { "-wd4996" } - defines { "_CRT_SECURE_NO_WARNINGS" } - - configuration "not vs*" - buildoptions { "-fno-strict-aliasing", "-Wno-multichar" } - configuration {"not vs*", "windows"} - buildoptions { "-static-libgcc" } - - configuration "Debug" - flags "Symbols" - defines "_DEBUG" - targetdir "bin/debug" - - configuration { "Release", "not vs*" } - flags "Symbols" - defines "NDEBUG" - buildoptions "-march=native" - - configuration { "Debug", "vs*" } - defines { "_ITERATOR_DEBUG_LEVEL=0" } - - configuration "Release" - flags { "OptimizeSpeed" } - targetdir "bin/release" - - include "ocgcore" - include "gframe" - if os.is("windows") then - include "event" - include "freetype" - include "irrlicht" - include "lua" - include "sqlite3" - end diff --git a/premake5.lua b/premake5.lua new file mode 100644 index 0000000000..0655a780cb --- /dev/null +++ b/premake5.lua @@ -0,0 +1,353 @@ +-- Supported systems: Windows, Linux, MacOS + +-- Global settings + +-- Default: Build Lua, Irrlicht from source on all systems. +-- Don't build event, freetype, sqlite, opus, vorbis on Linux or MacOS, use apt or homebrew, +-- but build them on Windows, due to the lack of package manager on Windows. + +BUILD_LUA = true +LUA_LIB_NAME = "lua" -- change this if you don't build Lua + +BUILD_EVENT = os.istarget("windows") + +BUILD_FREETYPE = os.istarget("windows") + +BUILD_SQLITE = os.istarget("windows") + +BUILD_IRRLICHT = true -- modified Irrlicht is required, can't use the official one +USE_DXSDK = true + +USE_AUDIO = true +AUDIO_LIB = "miniaudio" -- can be "miniaudio" or "irrklang" +-- BUILD_MINIAUDIO is always true +MINIAUDIO_SUPPORT_OPUS_VORBIS = true +MINIAUDIO_BUILD_OPUS_VORBIS = os.istarget("windows") +-- BUILD_IRRKLANG is impossible because irrKlang is not open source +IRRKLANG_PRO = false +IRRKLANG_PRO_BUILD_IKPMP3 = false + +-- Read settings from command line or environment variables + +newoption { trigger = "build-lua", category = "YGOPro - lua", description = "" } +newoption { trigger = "no-build-lua", category = "YGOPro - lua", description = "" } +newoption { trigger = "lua-include-dir", category = "YGOPro - lua", description = "", value = "PATH" } +newoption { trigger = "lua-lib-dir", category = "YGOPro - lua", description = "", value = "PATH" } +newoption { trigger = "lua-lib-name", category = "YGOPro - lua", description = "", value = "NAME", default = LUA_LIB_NAME } + +newoption { trigger = "build-event", category = "YGOPro - event", description = "" } +newoption { trigger = "no-build-event", category = "YGOPro - event", description = "" } +newoption { trigger = "event-include-dir", category = "YGOPro - event", description = "", value = "PATH" } +newoption { trigger = "event-lib-dir", category = "YGOPro - event", description = "", value = "PATH" } + +newoption { trigger = "build-freetype", category = "YGOPro - freetype", description = "" } +newoption { trigger = "no-build-freetype", category = "YGOPro - freetype", description = "" } +newoption { trigger = "freetype-include-dir", category = "YGOPro - freetype", description = "", value = "PATH" } +newoption { trigger = "freetype-lib-dir", category = "YGOPro - freetype", description = "", value = "PATH" } + +newoption { trigger = "build-sqlite", category = "YGOPro - sqlite", description = "" } +newoption { trigger = "no-build-sqlite", category = "YGOPro - sqlite", description = "" } +newoption { trigger = "sqlite-include-dir", category = "YGOPro - sqlite", description = "", value = "PATH" } +newoption { trigger = "sqlite-lib-dir", category = "YGOPro - sqlite", description = "", value = "PATH" } + +newoption { trigger = "build-irrlicht", category = "YGOPro - irrlicht", description = "" } +newoption { trigger = "no-build-irrlicht", category = "YGOPro - irrlicht", description = "" } +newoption { trigger = "irrlicht-include-dir", category = "YGOPro - irrlicht", description = "", value = "PATH" } +newoption { trigger = "irrlicht-lib-dir", category = "YGOPro - irrlicht", description = "", value = "PATH" } +newoption { trigger = "no-dxsdk", category = "YGOPro - irrlicht", description = "" } + +newoption { trigger = "no-audio", category = "YGOPro", description = "" } +newoption { trigger = "audio-lib", category = "YGOPro", description = "", value = "miniaudio, irrklang", default = AUDIO_LIB } + +newoption { trigger = "miniaudio-support-opus-vorbis", category = "YGOPro - miniaudio", description = "" } +newoption { trigger = "no-miniaudio-support-opus-vorbis", category = "YGOPro - miniaudio", description = "" } +newoption { trigger = "build-opus-vorbis", category = "YGOPro - miniaudio", description = "" } +newoption { trigger = "no-build-opus-vorbis", category = "YGOPro - miniaudio", description = "" } +newoption { trigger = "opus-include-dir", category = "YGOPro - miniaudio", description = "", value = "PATH" } +newoption { trigger = "opus-lib-dir", category = "YGOPro - miniaudio", description = "", value = "PATH" } +newoption { trigger = "opusfile-include-dir", category = "YGOPro - miniaudio", description = "", value = "PATH" } +newoption { trigger = "opusfile-lib-dir", category = "YGOPro - miniaudio", description = "", value = "PATH" } +newoption { trigger = "vorbis-include-dir", category = "YGOPro - miniaudio", description = "", value = "PATH" } +newoption { trigger = "vorbis-lib-dir", category = "YGOPro - miniaudio", description = "", value = "PATH" } +newoption { trigger = "ogg-include-dir", category = "YGOPro - miniaudio", description = "", value = "PATH" } +newoption { trigger = "ogg-lib-dir", category = "YGOPro - miniaudio", description = "", value = "PATH" } + +newoption { trigger = "use-irrklang", category = "YGOPro - irrklang", description = "Deprecated, use audio-lib=irrklang" } +newoption { trigger = "no-use-irrklang", category = "YGOPro - irrklang", description = "Deprecated, use no-audio" } +newoption { trigger = "irrklang-include-dir", category = "YGOPro - irrklang", description = "", value = "PATH" } +newoption { trigger = "irrklang-lib-dir", category = "YGOPro - irrklang", description = "", value = "PATH" } + +newoption { trigger = "irrklang-pro", category = "YGOPro - irrklang - pro", description = "" } +newoption { trigger = "no-irrklang-pro", category = "YGOPro - irrklang - pro", description = "" } +newoption { trigger = "irrklang-pro-release-lib-dir", category = "YGOPro - irrklang - pro", description = "", value = "PATH" } +newoption { trigger = "irrklang-pro-debug-lib-dir", category = "YGOPro - irrklang - pro", description = "", value = "PATH" } +newoption { trigger = 'build-ikpmp3', category = "YGOPro - irrklang - ikpmp3", description = "" } + +newoption { trigger = "mac-arm", category = "YGOPro", description = "Compile for Apple Silicon Mac" } +newoption { trigger = "mac-intel", category = "YGOPro", description = "Compile for Intel Mac" } + +function GetParam(param) + return _OPTIONS[param] or os.getenv(string.upper(string.gsub(param,"-","_"))) +end + +function FindHeaderWithSubDir(header, subdir) + local result = os.findheader(header) + if result and subdir then + result = path.join(result, subdir) + end + return result +end + +if GetParam("build-lua") then + BUILD_LUA = true +elseif GetParam("no-build-lua") then + BUILD_LUA = false +end +if not BUILD_LUA then + -- at most times you need to change those if you change BUILD_LUA to false + -- make sure your lua lib is built with C++ and version >= 5.3 + LUA_LIB_NAME = GetParam("lua-lib-name") or LUA_LIB_NAME + LUA_INCLUDE_DIR = GetParam("lua-include-dir") or os.findheader("lua.h") + LUA_LIB_DIR = GetParam("lua-lib-dir") or os.findlib(LUA_LIB_NAME) +end + +if GetParam("build-event") then + BUILD_EVENT = true +elseif GetParam("no-build-event") then + BUILD_EVENT = false +end +if not BUILD_EVENT then + EVENT_INCLUDE_DIR = GetParam("event-include-dir") or os.findheader("event2/event.h") + EVENT_LIB_DIR = GetParam("event-lib-dir") or os.findlib("event") +end + +if GetParam("build-freetype") then + BUILD_FREETYPE = true +elseif GetParam("no-build-freetype") then + BUILD_FREETYPE = false +end +if not BUILD_FREETYPE then + FREETYPE_INCLUDE_DIR = GetParam("freetype-include-dir") or FindHeaderWithSubDir("freetype2/ft2build.h", "freetype2") + FREETYPE_LIB_DIR = GetParam("freetype-lib-dir") or os.findlib("freetype") +end + +if GetParam("build-sqlite") then + BUILD_SQLITE = true +elseif GetParam("no-build-sqlite") then + BUILD_SQLITE = false +end +if not BUILD_SQLITE then + SQLITE_INCLUDE_DIR = GetParam("sqlite-include-dir") or os.findheader("sqlite3.h") + SQLITE_LIB_DIR = GetParam("sqlite-lib-dir") or os.findlib("sqlite3") +end + +if GetParam("build-irrlicht") then + BUILD_IRRLICHT = true +elseif GetParam("no-build-irrlicht") then + BUILD_IRRLICHT = false +end +if not BUILD_IRRLICHT then + IRRLICHT_INCLUDE_DIR = GetParam("irrlicht-include-dir") or os.findheader("irrlicht.h") + IRRLICHT_LIB_DIR = GetParam("irrlicht-lib-dir") or os.findlib("irrlicht") +end + +if GetParam("no-dxsdk") then + USE_DXSDK = false +end +if USE_DXSDK and os.istarget("windows") then + if not os.getenv("DXSDK_DIR") then + print("Warning: DXSDK_DIR environment variable not set, it seems you don't have the DirectX SDK installed. DirectX mode will be disabled.") + USE_DXSDK = false + end +end + +if GetParam("no-audio") then + USE_AUDIO = false +elseif GetParam("no-use-miniaudio") then + print("Warning: --no-use-miniaudio is deprecated, use --no-audio") + USE_AUDIO = false +elseif GetParam("use-miniaudio") then + print("Warning: --use-miniaudio is deprecated, use --audio-lib=miniaudio") + USE_AUDIO = true + AUDIO_LIB = "miniaudio" +elseif GetParam("no-use-irrklang") then + print("Warning: --no-use-irrklang is deprecated, use --no-audio") + USE_AUDIO = false +elseif GetParam("use-irrklang") then + print("Warning: --use-irrklang is deprecated, use --audio-lib=irrklang") + USE_AUDIO = true + AUDIO_LIB = "irrklang" +end + +if USE_AUDIO then + AUDIO_LIB = GetParam("audio-lib") or AUDIO_LIB + if AUDIO_LIB == "miniaudio" then + if GetParam("miniaudio-support-opus-vorbis") then + MINIAUDIO_SUPPORT_OPUS_VORBIS = true + elseif GetParam("no-miniaudio-support-opus-vorbis") then + MINIAUDIO_SUPPORT_OPUS_VORBIS = false + end + if MINIAUDIO_SUPPORT_OPUS_VORBIS then + if GetParam("no-build-opus-vorbis") then + MINIAUDIO_BUILD_OPUS_VORBIS = false + elseif GetParam("build-opus-vorbis") then + MINIAUDIO_BUILD_OPUS_VORBIS = true + end + if not MINIAUDIO_BUILD_OPUS_VORBIS then + OPUS_INCLUDE_DIR = GetParam("opus-include-dir") or FindHeaderWithSubDir("opus/opus.h", "opus") + OPUS_LIB_DIR = GetParam("opus-lib-dir") or os.findlib("opus") + OPUSFILE_INCLUDE_DIR = GetParam("opusfile-include-dir") or FindHeaderWithSubDir("opus/opusfile.h", "opus") + OPUSFILE_LIB_DIR = GetParam("opusfile-lib-dir") or os.findlib("opusfile") + VORBIS_INCLUDE_DIR = GetParam("vorbis-include-dir") or os.findheader("vorbis/vorbisfile.h") + VORBIS_LIB_DIR = GetParam("vorbis-lib-dir") or os.findlib("vorbis") + OGG_INCLUDE_DIR = GetParam("ogg-include-dir") or os.findheader("ogg/ogg.h") + OGG_LIB_DIR = GetParam("ogg-lib-dir") or os.findlib("ogg") + end + end + elseif AUDIO_LIB == "irrklang" then + print("Warning: irrKlang is deprecated and may be removed in future, please consider switching to miniaudio") + IRRKLANG_INCLUDE_DIR = GetParam("irrklang-include-dir") or "../irrklang/include" + if os.istarget("windows") then + IRRKLANG_LIB_DIR = "../irrklang/lib/Win32-visualStudio" + elseif os.istarget("linux") then + IRRKLANG_LIB_DIR = "../irrklang/bin/linux-gcc-64" + IRRKLANG_LINK_RPATH = "-Wl,-rpath=./irrklang/bin/linux-gcc-64/" + elseif os.istarget("macosx") then + IRRKLANG_LIB_DIR = "../irrklang/bin/macosx-gcc" + end + IRRKLANG_LIB_DIR = GetParam("irrklang-lib-dir") or IRRKLANG_LIB_DIR + if GetParam("irrklang-pro") and os.istarget("windows") then + IRRKLANG_PRO = true + elseif GetParam("no-irrklang-pro") then + IRRKLANG_PRO = false + end + if IRRKLANG_PRO then + -- irrklang pro can't use the pro lib to debug + IRRKLANG_PRO_RELEASE_LIB_DIR = GetParam("irrklang-pro-release-lib-dir") or "../irrklang/lib/Win32-vs2019" + IRRKLANG_PRO_DEBUG_LIB_DIR = GetParam("irrklang-pro-debug-lib-dir") or "../irrklang/lib/Win32-visualStudio-debug" + end + IRRKLANG_PRO_BUILD_IKPMP3 = GetParam("build-ikpmp3") or IRRKLANG_PRO + else + error("Unknown audio library: " .. AUDIO_LIB) + end +end + +if os.istarget("macosx") then + if GetParam("mac-arm") then + MAC_ARM = true + end + if GetParam("mac-intel") then + MAC_INTEL = true + end + if MAC_ARM or (not MAC_INTEL and os.hostarch() == "ARM64") then + -- building on ARM CPU will target ARM automatically + TARGET_MAC_ARM = true + end +end + +workspace "YGOPro" + location "build" + language "C++" + objdir "obj" + + configurations { "Release", "Debug" } + + filter "system:windows" + systemversion "latest" + startproject "YGOPro" + defines { "WINVER=0x0601" } -- WIN7 + platforms { "Win32", "x64" } + + filter { "system:windows", "platforms:Win32" } + architecture "x86" + + filter { "system:windows", "platforms:x64" } + architecture "x86_64" + + filter "system:macosx" + libdirs { "/usr/local/lib" } + if MAC_ARM then + buildoptions { "-arch arm64" } + end + if MAC_INTEL then + buildoptions { "-arch x86_64", "-mavx", "-mfma" } + end + if MAC_ARM and MAC_INTEL then + architecture "universal" + end + + filter "system:linux" + buildoptions { "-U_FORTIFY_SOURCE" } + + filter "configurations:Release" + optimize "Speed" + targetdir "bin/release" + + filter "configurations:Debug" + symbols "On" + defines "_DEBUG" + targetdir "bin/debug" + + filter { "system:windows", "platforms:Win32", "configurations:Release" } + targetdir "bin/release/x86" + + filter { "system:windows", "platforms:Win32", "configurations:Debug" } + targetdir "bin/debug/x86" + + filter { "system:windows", "platforms:x64", "configurations:Release" } + targetdir "bin/release/x64" + + filter { "system:windows", "platforms:x64", "configurations:Debug" } + targetdir "bin/debug/x64" + + filter { "configurations:Release", "action:vs*" } + linktimeoptimization "On" + staticruntime "On" + disablewarnings { "4244", "4267", "4838", "4996", "6011", "6031", "6054", "6262" } + + filter { "configurations:Release", "not action:vs*" } + defines "NDEBUG" + + filter { "configurations:Debug", "action:vs*" } + disablewarnings { "6011", "6031", "6054", "6262" } + + filter "action:vs*" + cdialect "C11" + conformancemode "On" + vectorextensions "SSE2" + buildoptions { "/utf-8" } + defines { "_CRT_SECURE_NO_WARNINGS" } + + filter "not action:vs*" + buildoptions { "-fno-strict-aliasing", "-Wno-multichar", "-Wno-format-security" } + if not MAC_ARM and not MAC_INTEL then + buildoptions "-march=native" + end + + filter {} + + include "ocgcore" + include "gframe" + if BUILD_LUA then + include "lua" + end + if BUILD_EVENT then + include "event" + end + if BUILD_FREETYPE then + include "freetype" + end + if BUILD_IRRLICHT then + include "irrlicht" + end + if BUILD_SQLITE then + include "sqlite3" + end + if USE_AUDIO then + if AUDIO_LIB=="miniaudio" then + include "miniaudio" + end + if IRRKLANG_PRO_BUILD_IKPMP3 then + include "ikpmp3" + end + end diff --git a/resource/gframe/ygopro.ico b/resource/gframe/ygopro.ico new file mode 100644 index 0000000000..921ad2cf70 Binary files /dev/null and b/resource/gframe/ygopro.ico differ diff --git a/resource/gframe/ygopro.rc b/resource/gframe/ygopro.rc new file mode 100644 index 0000000000..5c61534982 --- /dev/null +++ b/resource/gframe/ygopro.rc @@ -0,0 +1,27 @@ +1 ICON "ygopro.ico" + +1 VERSIONINFO +FILEVERSION 1, 0, 36, 2 +PRODUCTVERSION 1, 0, 36, 2 +FILEOS 0x4 +FILETYPE 0x1 + +BEGIN +BLOCK "StringFileInfo" +BEGIN +BLOCK "080404b0" +BEGIN +VALUE "FileDescription", "YGOPro" +VALUE "InternalName", "YGOPro" +VALUE "LegalCopyright", "Copyright (C) 2025 Fluorohydride" +VALUE "OriginalFilename", "YGOPro.exe" +VALUE "ProductName", "YGOPro" +VALUE "FileVersion", "1.036.2" +VALUE "ProductVersion", "1.036.2" +END +END +BLOCK "VarFileInfo" +BEGIN +VALUE "Translation", 0x804, 1200 +END +END diff --git a/script b/script new file mode 160000 index 0000000000..cfbb14cdbf --- /dev/null +++ b/script @@ -0,0 +1 @@ +Subproject commit cfbb14cdbf7b2095db543f2620eb2e88b0fb9220 diff --git a/script/c10000000.lua b/script/c10000000.lua deleted file mode 100644 index ad445585c7..0000000000 --- a/script/c10000000.lua +++ /dev/null @@ -1,108 +0,0 @@ ---オベリスクの巨神兵 -function c10000000.initial_effect(c) - --summon with 3 tribute - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_LIMIT_SUMMON_PROC) - e1:SetCondition(c10000000.ttcon) - e1:SetOperation(c10000000.ttop) - e1:SetValue(SUMMON_TYPE_ADVANCE) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_LIMIT_SET_PROC) - e2:SetCondition(c10000000.setcon) - c:RegisterEffect(e2) - --summon - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_CANNOT_DISABLE_SUMMON) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - c:RegisterEffect(e3) - --summon success - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e4:SetCode(EVENT_SUMMON_SUCCESS) - e4:SetOperation(c10000000.sumsuc) - c:RegisterEffect(e4) - --cannot be target - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_SINGLE) - e5:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) - e5:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e5:SetRange(LOCATION_MZONE) - e5:SetValue(aux.tgval) - c:RegisterEffect(e5) - --to grave - local e6=Effect.CreateEffect(c) - e6:SetDescription(aux.Stringid(10000000,0)) - e6:SetCategory(CATEGORY_TOGRAVE) - e6:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e6:SetRange(LOCATION_MZONE) - e6:SetCountLimit(1) - e6:SetCode(EVENT_PHASE+PHASE_END) - e6:SetCondition(c10000000.tgcon) - e6:SetTarget(c10000000.tgtg) - e6:SetOperation(c10000000.tgop) - c:RegisterEffect(e6) - --destroy - local e7=Effect.CreateEffect(c) - e7:SetDescription(aux.Stringid(10000000,1)) - e7:SetCategory(CATEGORY_DESTROY) - e7:SetType(EFFECT_TYPE_IGNITION) - e7:SetRange(LOCATION_MZONE) - e7:SetCost(c10000000.descost) - e7:SetTarget(c10000000.destg) - e7:SetOperation(c10000000.desop) - c:RegisterEffect(e7) -end -function c10000000.ttcon(e,c) - if c==nil then return true end - return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-3 and Duel.GetTributeCount(c)>=3 -end -function c10000000.ttop(e,tp,eg,ep,ev,re,r,rp,c) - local g=Duel.SelectTribute(tp,c,3,3) - c:SetMaterial(g) - Duel.Release(g,REASON_SUMMON+REASON_MATERIAL) -end -function c10000000.setcon(e,c) - if not c then return true end - return false -end -function c10000000.sumsuc(e,tp,eg,ep,ev,re,r,rp) - Duel.SetChainLimitTillChainEnd(aux.FALSE) -end -function c10000000.tgcon(e,tp,eg,ep,ev,re,r,rp) - return bit.band(e:GetHandler():GetSummonType(),SUMMON_TYPE_SPECIAL)==SUMMON_TYPE_SPECIAL -end -function c10000000.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,e:GetHandler(),1,0,0) -end -function c10000000.tgop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - Duel.SendtoGrave(c,REASON_EFFECT) - end -end -function c10000000.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():GetAttackAnnouncedCount()==0 and Duel.CheckReleaseGroup(tp,nil,2,nil) end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_OATH) - e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e:GetHandler():RegisterEffect(e1) - local g=Duel.SelectReleaseGroup(tp,nil,2,2,nil) - Duel.Release(g,REASON_COST) -end -function c10000000.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDestructable,tp,0,LOCATION_MZONE,1,nil) end - local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,0,LOCATION_MZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c10000000.desop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,0,LOCATION_MZONE,nil) - Duel.Destroy(g,REASON_EFFECT) -end diff --git a/script/c10000010.lua b/script/c10000010.lua deleted file mode 100644 index 19aeb1a747..0000000000 --- a/script/c10000010.lua +++ /dev/null @@ -1,115 +0,0 @@ ---ラーの翼神竜 -function c10000010.initial_effect(c) - --summon with 3 tribute - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_LIMIT_SUMMON_PROC) - e1:SetCondition(c10000010.ttcon) - e1:SetOperation(c10000010.ttop) - e1:SetValue(SUMMON_TYPE_ADVANCE) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_LIMIT_SET_PROC) - e2:SetCondition(c10000010.setcon) - c:RegisterEffect(e2) - --summon - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_CANNOT_DISABLE_SUMMON) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - c:RegisterEffect(e3) - --summon success - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e4:SetCode(EVENT_SUMMON_SUCCESS) - e4:SetOperation(c10000010.sumsuc) - c:RegisterEffect(e4) - --cannot special summon - local e5=Effect.CreateEffect(c) - e5:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e5:SetType(EFFECT_TYPE_SINGLE) - e5:SetCode(EFFECT_SPSUMMON_CONDITION) - c:RegisterEffect(e5) - --One Turn Kill - local e6=Effect.CreateEffect(c) - e6:SetDescription(aux.Stringid(10000010,0)) - e6:SetCategory(CATEGORY_ATKCHANGE) - e6:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE) - e6:SetCode(EVENT_SUMMON_SUCCESS) - e6:SetCost(c10000010.atkcost) - e6:SetOperation(c10000010.atkop) - c:RegisterEffect(e6) - --destroy - local e7=Effect.CreateEffect(c) - e7:SetDescription(aux.Stringid(10000010,1)) - e7:SetCategory(CATEGORY_DESTROY) - e7:SetType(EFFECT_TYPE_IGNITION) - e7:SetProperty(EFFECT_FLAG_CARD_TARGET) - e7:SetRange(LOCATION_MZONE) - e7:SetCost(c10000010.descost) - e7:SetTarget(c10000010.destg) - e7:SetOperation(c10000010.desop) - c:RegisterEffect(e7) -end -function c10000010.ttcon(e,c) - if c==nil then return true end - return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-3 and Duel.GetTributeCount(c)>=3 -end -function c10000010.ttop(e,tp,eg,ep,ev,re,r,rp,c) - local g=Duel.SelectTribute(tp,c,3,3) - c:SetMaterial(g) - Duel.Release(g,REASON_SUMMON+REASON_MATERIAL) -end -function c10000010.setcon(e,c) - if not c then return true end - return false -end -function c10000010.genchainlm(c) - return function (e,rp,tp) - return e:GetHandler()==c - end -end -function c10000010.sumsuc(e,tp,eg,ep,ev,re,r,rp) - Duel.SetChainLimitTillChainEnd(c10000010.genchainlm(e:GetHandler())) -end -function c10000010.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLP(tp)>100 end - local lp=Duel.GetLP(tp) - e:SetLabel(lp-100) - Duel.PayLPCost(tp,lp-100) -end -function c10000010.atkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFaceup() and c:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(e:GetLabel()) - e1:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_UPDATE_DEFENCE) - c:RegisterEffect(e2) - end -end -function c10000010.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,1000) end - Duel.PayLPCost(tp,1000) -end -function c10000010.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsDestructable() end - if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c10000010.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c10000020.lua b/script/c10000020.lua deleted file mode 100644 index d1270aa90e..0000000000 --- a/script/c10000020.lua +++ /dev/null @@ -1,126 +0,0 @@ ---オシリスの天空竜 -function c10000020.initial_effect(c) - --summon with 3 tribute - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_LIMIT_SUMMON_PROC) - e1:SetCondition(c10000020.ttcon) - e1:SetOperation(c10000020.ttop) - e1:SetValue(SUMMON_TYPE_ADVANCE) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_LIMIT_SET_PROC) - e2:SetCondition(c10000020.setcon) - c:RegisterEffect(e2) - --summon - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_CANNOT_DISABLE_SUMMON) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - c:RegisterEffect(e3) - --summon success - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e4:SetCode(EVENT_SUMMON_SUCCESS) - e4:SetOperation(c10000020.sumsuc) - c:RegisterEffect(e4) - --to grave - local e5=Effect.CreateEffect(c) - e5:SetDescription(aux.Stringid(10000020,0)) - e5:SetCategory(CATEGORY_TOGRAVE) - e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e5:SetRange(LOCATION_MZONE) - e5:SetCountLimit(1) - e5:SetCode(EVENT_PHASE+PHASE_END) - e5:SetCondition(c10000020.tgcon) - e5:SetTarget(c10000020.tgtg) - e5:SetOperation(c10000020.tgop) - c:RegisterEffect(e5) - --atk/def - local e6=Effect.CreateEffect(c) - e6:SetType(EFFECT_TYPE_SINGLE) - e6:SetCode(EFFECT_UPDATE_ATTACK) - e6:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e6:SetRange(LOCATION_MZONE) - e6:SetValue(c10000020.adval) - c:RegisterEffect(e6) - local e7=e6:Clone() - e7:SetCode(EFFECT_UPDATE_DEFENCE) - c:RegisterEffect(e7) - --atkdown - local e8=Effect.CreateEffect(c) - e8:SetDescription(aux.Stringid(10000020,1)) - e8:SetCategory(CATEGORY_ATKCHANGE) - e8:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e8:SetRange(LOCATION_MZONE) - e8:SetCode(EVENT_SUMMON_SUCCESS) - e8:SetCondition(c10000020.atkcon) - e8:SetTarget(c10000020.atktg) - e8:SetOperation(c10000020.atkop) - c:RegisterEffect(e8) - local e9=e8:Clone() - e9:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e9) -end -function c10000020.ttcon(e,c) - if c==nil then return true end - return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-3 and Duel.GetTributeCount(c)>=3 -end -function c10000020.ttop(e,tp,eg,ep,ev,re,r,rp,c) - local g=Duel.SelectTribute(tp,c,3,3) - c:SetMaterial(g) - Duel.Release(g,REASON_SUMMON+REASON_MATERIAL) -end -function c10000020.setcon(e,c) - if not c then return true end - return false -end -function c10000020.sumsuc(e,tp,eg,ep,ev,re,r,rp) - Duel.SetChainLimitTillChainEnd(aux.FALSE) -end -function c10000020.tgcon(e,tp,eg,ep,ev,re,r,rp) - return bit.band(e:GetHandler():GetSummonType(),SUMMON_TYPE_SPECIAL)==SUMMON_TYPE_SPECIAL -end -function c10000020.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,e:GetHandler(),1,0,0) -end -function c10000020.tgop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - Duel.SendtoGrave(c,REASON_EFFECT) - end -end -function c10000020.adval(e,c) - return Duel.GetFieldGroupCount(c:GetControler(),LOCATION_HAND,0)*1000 -end -function c10000020.atkfilter(c,e,tp) - return c:IsControler(tp) and c:IsPosition(POS_FACEUP_ATTACK) and (not e or c:IsRelateToEffect(e)) -end -function c10000020.atkcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c10000020.atkfilter,1,nil,nil,1-tp) -end -function c10000020.atktg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsRelateToEffect(e) end - Duel.SetTargetCard(eg) -end -function c10000020.atkop(e,tp,eg,ep,ev,re,r,rp) - local g=eg:Filter(c10000020.atkfilter,nil,e,1-tp) - local dg=Group.CreateGroup() - local c=e:GetHandler() - local tc=g:GetFirst() - while tc do - local preatk=tc:GetAttack() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(-2000) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - if preatk~=0 and tc:GetAttack()==0 then dg:AddCard(tc) end - tc=g:GetNext() - end - Duel.Destroy(dg,REASON_EFFECT) -end diff --git a/script/c10000030.lua b/script/c10000030.lua deleted file mode 100644 index dae6f179b6..0000000000 --- a/script/c10000030.lua +++ /dev/null @@ -1,73 +0,0 @@ ---マジマジ☆マジシャンギャル -function c10000030.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsRace,RACE_SPELLCASTER),6,2) - c:EnableReviveLimit() - --effect - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(10000030,1)) - e1:SetCategory(CATEGORY_CONTROL) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE) - e1:SetCost(c10000030.cost) - e1:SetTarget(c10000030.target1) - e1:SetOperation(c10000030.operation1) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(10000030,2)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE) - e2:SetCost(c10000030.cost) - e2:SetTarget(c10000030.target2) - e2:SetOperation(c10000030.operation2) - c:RegisterEffect(e2) -end -function c10000030.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) - and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_HAND,0,1,nil) end - Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local rg=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_HAND,0,1,1,nil) - Duel.Remove(rg,POS_FACEUP,REASON_COST) -end -function c10000030.filter1(c) - return c:IsControlerCanBeChanged() -end -function c10000030.filter2(c,e,tp) - return c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c10000030.target1(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c10000030.filter1(chkc) end - if chk==0 then return Duel.IsExistingTarget(c10000030.filter1,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) - local g=Duel.SelectTarget(tp,c10000030.filter1,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0) -end -function c10000030.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(1-tp) and c10000030.filter2(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingTarget(c10000030.filter2,tp,0,LOCATION_GRAVE,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c10000030.filter2,tp,0,LOCATION_GRAVE,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c10000030.operation1(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and not Duel.GetControl(tc,tp,PHASE_END,1) then - if not tc:IsImmuneToEffect(e) and tc:IsAbleToChangeControler() then - Duel.Destroy(tc,REASON_EFFECT) - end - end -end -function c10000030.operation2(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c10000040.lua b/script/c10000040.lua deleted file mode 100644 index 4582b64f73..0000000000 --- a/script/c10000040.lua +++ /dev/null @@ -1,47 +0,0 @@ ---光の創造神 ホルアクティ -function c10000040.initial_effect(c) - c:EnableReviveLimit() - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c10000040.spcon) - e1:SetOperation(c10000040.spop) - c:RegisterEffect(e1) - --spsummon condition - local e2=Effect.CreateEffect(c) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_SPSUMMON_CONDITION) - c:RegisterEffect(e2) - --spsummon - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_CANNOT_DISABLE_SPSUMMON) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - c:RegisterEffect(e3) -end -function c10000040.spfilter(c,code) - local code1,code2=c:GetOriginalCodeRule() - return code1==code or code2==code -end -function c10000040.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.GetLocationCount(tp,LOCATION_MZONE)>-3 - and Duel.CheckReleaseGroup(tp,c10000040.spfilter,1,nil,10000000) - and Duel.CheckReleaseGroup(tp,c10000040.spfilter,1,nil,10000010) - and Duel.CheckReleaseGroup(tp,c10000040.spfilter,1,nil,10000020) -end -function c10000040.spop(e,tp,eg,ep,ev,re,r,rp,c) - local g1=Duel.SelectReleaseGroup(tp,c10000040.spfilter,1,1,nil,10000000) - local g2=Duel.SelectReleaseGroup(tp,c10000040.spfilter,1,1,nil,10000010) - local g3=Duel.SelectReleaseGroup(tp,c10000040.spfilter,1,1,nil,10000020) - g1:Merge(g2) - g1:Merge(g3) - Duel.Release(g1,REASON_COST) - local WIN_REASON_CREATORGOD = 0x13 - Duel.Win(tp,WIN_REASON_CREATORGOD) -end diff --git a/script/c10000080.lua b/script/c10000080.lua deleted file mode 100644 index 43bad9d0cb..0000000000 --- a/script/c10000080.lua +++ /dev/null @@ -1,150 +0,0 @@ ---ラーの翼神竜-球体形 -function c10000080.initial_effect(c) - --summon with 3 tribute - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(10000080,0)) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_LIMIT_SUMMON_PROC) - e1:SetCondition(c10000080.ttcon1) - e1:SetOperation(c10000080.ttop1) - e1:SetValue(SUMMON_TYPE_ADVANCE) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(10000080,1)) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_SPSUM_PARAM) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_LIMIT_SUMMON_PROC) - e2:SetTargetRange(POS_FACEUP_ATTACK,1) - e2:SetCondition(c10000080.ttcon2) - e2:SetOperation(c10000080.ttop2) - e2:SetValue(SUMMON_TYPE_ADVANCE) - c:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_LIMIT_SET_PROC) - e3:SetCondition(c10000080.setcon) - c:RegisterEffect(e3) - --cannot special summon - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetCode(EFFECT_SPSUMMON_CONDITION) - e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - c:RegisterEffect(e4) - --control return - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e5:SetCode(EVENT_SUMMON_SUCCESS) - e5:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e5:SetOperation(c10000080.retreg) - c:RegisterEffect(e5) - --attack limit - local e6=Effect.CreateEffect(c) - e6:SetType(EFFECT_TYPE_SINGLE) - e6:SetCode(EFFECT_CANNOT_ATTACK) - c:RegisterEffect(e6) - --cannot be target - local e7=Effect.CreateEffect(c) - e7:SetType(EFFECT_TYPE_SINGLE) - e7:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e7:SetCode(EFFECT_CANNOT_BE_BATTLE_TARGET) - e7:SetRange(LOCATION_MZONE) - e7:SetValue(aux.imval1) - c:RegisterEffect(e7) - local e8=e7:Clone() - e8:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) - e8:SetValue(aux.tgoval) - c:RegisterEffect(e8) - --spsummon - local e9=Effect.CreateEffect(c) - e9:SetDescription(aux.Stringid(10000080,2)) - e9:SetCategory(CATEGORY_SPECIAL_SUMMON) - e9:SetType(EFFECT_TYPE_IGNITION) - e9:SetRange(LOCATION_MZONE) - e9:SetCost(c10000080.spcost) - e9:SetTarget(c10000080.sptg) - e9:SetOperation(c10000080.spop) - c:RegisterEffect(e9) -end -function c10000080.ttcon1(e,c) - if c==nil then return true end - return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-3 and Duel.GetTributeCount(c)>=3 -end -function c10000080.ttop1(e,tp,eg,ep,ev,re,r,rp,c) - local g=Duel.SelectTribute(tp,c,3,3) - c:SetMaterial(g) - Duel.Release(g,REASON_SUMMON+REASON_MATERIAL) -end -function c10000080.ttcon2(e,c) - if c==nil then return true end - local tp=c:GetControler() - local mg=Duel.GetFieldGroup(tp,0,LOCATION_MZONE) - return Duel.GetLocationCount(1-tp,LOCATION_MZONE)>-3 and Duel.GetTributeCount(c,mg,true)>=3 -end -function c10000080.ttop2(e,tp,eg,ep,ev,re,r,rp,c) - local mg=Duel.GetFieldGroup(tp,0,LOCATION_MZONE) - local g=Duel.SelectTribute(tp,c,3,3,mg,true) - c:SetMaterial(g) - Duel.Release(g,REASON_SUMMON+REASON_MATERIAL) -end -function c10000080.setcon(e,c) - if not c then return true end - return false -end -function c10000080.retreg(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - c:RegisterFlagEffect(10000080,RESET_EVENT+0x1fc0000+RESET_PHASE+RESET_END,0,2) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e1:SetLabel(Duel.GetTurnCount()+1) - e1:SetCountLimit(1) - e1:SetCondition(c10000080.retcon) - e1:SetOperation(c10000080.retop) - e1:SetReset(RESET_PHASE+RESET_END,2) - Duel.RegisterEffect(e1,tp) -end -function c10000080.retcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnCount()==e:GetLabel() and e:GetOwner():GetFlagEffect(10000080)~=0 -end -function c10000080.retop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetOwner() - c:ResetEffect(EFFECT_SET_CONTROL,RESET_CODE) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_CONTROL) - e1:SetValue(c:GetOwner()) - e1:SetReset(RESET_EVENT+0xec0000) - c:RegisterEffect(e1) -end -function c10000080.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end -function c10000080.filter(c,e,tp) - return c:IsCode(10000010) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) -end -function c10000080.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsExistingMatchingCard(c10000080.filter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) -end -function c10000080.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c10000080.filter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp) - local tc=g:GetFirst() - if tc and Duel.SpecialSummonStep(tc,0,tp,tp,true,false,POS_FACEUP) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK) - e1:SetValue(4000) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_SET_DEFENCE) - tc:RegisterEffect(e2) - Duel.SpecialSummonComplete() - end -end diff --git a/script/c10002346.lua b/script/c10002346.lua deleted file mode 100644 index c60e3aac2a..0000000000 --- a/script/c10002346.lua +++ /dev/null @@ -1,36 +0,0 @@ ---ガチガチガンテツ -function c10002346.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,2,2) - c:EnableReviveLimit() - --atk,def - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetValue(c10002346.val) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_UPDATE_DEFENCE) - c:RegisterEffect(e2) - --destroy replace - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE) - e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e3:SetCode(EFFECT_DESTROY_REPLACE) - e3:SetRange(LOCATION_MZONE) - e3:SetTarget(c10002346.reptg) - e3:SetOperation(c10002346.repop) - c:RegisterEffect(e3) -end -function c10002346.val(e,c) - return e:GetHandler():GetOverlayCount()*200 -end -function c10002346.reptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_EFFECT) end - return Duel.SelectYesNo(tp,aux.Stringid(10002346,0)) -end -function c10002346.repop(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_EFFECT) -end diff --git a/script/c10004783.lua b/script/c10004783.lua deleted file mode 100644 index d33798cac4..0000000000 --- a/script/c10004783.lua +++ /dev/null @@ -1,78 +0,0 @@ ---宝玉の解放 -function c10004783.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c10004783.target) - e1:SetOperation(c10004783.operation) - c:RegisterEffect(e1) - --Atk up - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(800) - c:RegisterEffect(e2) - --Equip limit - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_EQUIP_LIMIT) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e3:SetValue(c10004783.eqlimit) - c:RegisterEffect(e3) - --to field - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(10004783,0)) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e4:SetCode(EVENT_TO_GRAVE) - e4:SetCondition(c10004783.tfcon) - e4:SetTarget(c10004783.tftg) - e4:SetOperation(c10004783.tfop) - c:RegisterEffect(e4) -end -function c10004783.eqlimit(e,c) - return c:IsSetCard(0x1034) -end -function c10004783.filter(c) - return c:IsFaceup() and c:IsSetCard(0x1034) -end -function c10004783.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:GetLocation()==LOCATION_MZONE and c10004783.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c10004783.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c10004783.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c10004783.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,e:GetHandler(),tc) - end -end -function c10004783.tfcon(e,tp,eg,ep,ev,re,r,rp) - return bit.band(e:GetHandler():GetPreviousLocation(),LOCATION_ONFIELD)~=0 -end -function c10004783.tftg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_DECK,0,1,nil,0x1034) end -end -function c10004783.tfop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) - local g=Duel.SelectMatchingCard(tp,Card.IsSetCard,tp,LOCATION_DECK,0,1,1,nil,0x1034) - if g:GetCount()>0 then - local tc=g:GetFirst() - Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) - local e1=Effect.CreateEffect(tc) - e1:SetCode(EFFECT_CHANGE_TYPE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS) - tc:RegisterEffect(e1) - Duel.RaiseEvent(tc,47408488,e,0,tp,0,0) - end -end diff --git a/script/c10012614.lua b/script/c10012614.lua deleted file mode 100644 index 37fe2e8325..0000000000 --- a/script/c10012614.lua +++ /dev/null @@ -1,22 +0,0 @@ ---勇気の旗印 -function c10012614.initial_effect(c) - --activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --Atk up - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(LOCATION_MZONE,0) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetCondition(c10012614.con) - e2:SetValue(200) - c:RegisterEffect(e2) -end -function c10012614.con(e) - local ph=Duel.GetCurrentPhase() - local tp=Duel.GetTurnPlayer() - return tp==e:GetHandlerPlayer() and (ph==PHASE_BATTLE or ph==PHASE_DAMAGE or ph==PHASE_DAMAGE_CAL) -end diff --git a/script/c10026986.lua b/script/c10026986.lua deleted file mode 100644 index 9287a770ec..0000000000 --- a/script/c10026986.lua +++ /dev/null @@ -1,57 +0,0 @@ ---ワーム・キング -function c10026986.initial_effect(c) - --summon with 1 tribute - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(10026986,0)) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SUMMON_PROC) - e1:SetCondition(c10026986.otcon) - e1:SetOperation(c10026986.otop) - e1:SetValue(SUMMON_TYPE_ADVANCE) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(10026986,1)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetRange(LOCATION_MZONE) - e2:SetCost(c10026986.descost) - e2:SetTarget(c10026986.destg) - e2:SetOperation(c10026986.desop) - c:RegisterEffect(e2) -end -function c10026986.cfilter(c,tp) - return c:IsSetCard(0x3e) and c:IsRace(RACE_REPTILE) and (c:IsControler(tp) or c:IsFaceup()) -end -function c10026986.otcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - local mg=Duel.GetMatchingGroup(c10026986.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp) - return c:GetLevel()>6 and Duel.GetTributeCount(c,mg)>0 -end -function c10026986.otop(e,tp,eg,ep,ev,re,r,rp,c) - local mg=Duel.GetMatchingGroup(c10026986.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp) - local sg=Duel.SelectTribute(tp,c,1,1,mg) - c:SetMaterial(sg) - Duel.Release(sg,REASON_SUMMON+REASON_MATERIAL) -end -function c10026986.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,c10026986.cfilter,1,nil,tp) end - local sg=Duel.SelectReleaseGroup(tp,c10026986.cfilter,1,1,nil,tp) - Duel.Release(sg,REASON_COST) -end -function c10026986.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() and chkc:IsDestructable() end - if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,0,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,0,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c10026986.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c10028593.lua b/script/c10028593.lua deleted file mode 100644 index 90b07dd34a..0000000000 --- a/script/c10028593.lua +++ /dev/null @@ -1,30 +0,0 @@ ---輪廻天狗 -function c10028593.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(10028593,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_LEAVE_FIELD) - e1:SetCondition(c10028593.spcon) - e1:SetTarget(c10028593.sptg) - e1:SetOperation(c10028593.spop) - c:RegisterEffect(e1) -end -function c10028593.spcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsPreviousPosition(POS_FACEUP) and not c:IsLocation(LOCATION_DECK) -end -function c10028593.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c10028593.spfilter(c,e,tp) - return c:IsCode(10028593) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c10028593.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstMatchingCard(c10028593.spfilter,tp,LOCATION_DECK,0,nil,e,tp) - if tc then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c1003028.lua b/script/c1003028.lua deleted file mode 100644 index ce824fd1a7..0000000000 --- a/script/c1003028.lua +++ /dev/null @@ -1,34 +0,0 @@ ---トラブル・ダイバー -function c1003028.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(1,1003028) - e1:SetCondition(c1003028.spcon) - c:RegisterEffect(e1) - --xyzlimit - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e2:SetValue(c1003028.xyzlimit) - c:RegisterEffect(e2) -end -function c1003028.cfilter(c) - return c:IsFaceup() and c:GetLevel()~=4 -end -function c1003028.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)>0 - and Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0 - and not Duel.IsExistingMatchingCard(c1003028.cfilter,tp,LOCATION_MZONE,0,1,nil) -end -function c1003028.xyzlimit(e,c) - if not c then return false end - return not c:IsRace(RACE_WARRIOR) -end diff --git a/script/c10032958.lua b/script/c10032958.lua deleted file mode 100644 index 241b41b91f..0000000000 --- a/script/c10032958.lua +++ /dev/null @@ -1,89 +0,0 @@ ---神竜-エクセリオン -function c10032958.initial_effect(c) - --to defence - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(10032958,0)) - e1:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_SINGLE) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetOperation(c10032958.effop) - c:RegisterEffect(e1) -end -function c10032958.effop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local ct=Duel.GetMatchingGroupCount(Card.IsCode,tp,LOCATION_GRAVE,0,nil,10032958) - if ct>3 then ct=3 end - if ct>0 and c:IsFaceup() and c:IsRelateToEffect(e) then - local opt1=Duel.SelectOption(tp,aux.Stringid(10032958,1),aux.Stringid(10032958,2),aux.Stringid(10032958,3)) - local opt2=0 - local opt3=0 - c10032958.reg(c,opt1) - if ct<2 then return end - if opt1==0 then opt2=Duel.SelectOption(tp,aux.Stringid(10032958,2),aux.Stringid(10032958,3))+1 - elseif opt1==2 then opt2=Duel.SelectOption(tp,aux.Stringid(10032958,1),aux.Stringid(10032958,2)) - else - opt2=Duel.SelectOption(tp,aux.Stringid(10032958,1),aux.Stringid(10032958,3)) - if opt2==1 then opt2=2 end - end - c10032958.reg(c,opt2) - if ct<3 then return end - if opt1~=0 and opt2~=0 then opt3=Duel.SelectOption(tp,aux.Stringid(10032958,1)) - elseif opt1~=1 and opt2~=1 then opt3=Duel.SelectOption(tp,aux.Stringid(10032958,2))+1 - else opt3=Duel.SelectOption(tp,aux.Stringid(10032958,3))+2 end - c10032958.reg(c,opt3) - end -end -function c10032958.reg(c,opt) - if opt==0 then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(1000) - e1:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e1) - elseif opt==1 then - --chain attack - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(10032958,2)) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_BATTLED) - e1:SetCondition(c10032958.atcon) - e1:SetOperation(c10032958.atop) - e1:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e1) - else - --damage - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(10032958,3)) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_BATTLE_DESTROYING) - e1:SetCondition(aux.bdgcon) - e1:SetTarget(c10032958.damtg) - e1:SetOperation(c10032958.damop) - e1:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e1) - end -end -function c10032958.atcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local bc=c:GetBattleTarget() - return bc and bc:IsStatus(STATUS_BATTLE_DESTROYED) and c:IsChainAttackable() and c:IsStatus(STATUS_OPPO_BATTLE) -end -function c10032958.atop(e,tp,eg,ep,ev,re,r,rp) - Duel.ChainAttack() -end -function c10032958.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local c=e:GetHandler() - local bc=c:GetBattleTarget() - local dam=bc:GetAttack() - if dam<0 then dam=0 end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(dam) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,dam) -end -function c10032958.damop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c10035717.lua b/script/c10035717.lua deleted file mode 100644 index d53631e8e4..0000000000 --- a/script/c10035717.lua +++ /dev/null @@ -1,57 +0,0 @@ ---ウェポンチェンジ -function c10035717.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - -- - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(10035717,0)) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetRange(LOCATION_SZONE) - e2:SetCountLimit(1) - e2:SetCondition(c10035717.adcon) - e2:SetCost(c10035717.adcost) - e2:SetTarget(c10035717.adtg) - e2:SetOperation(c10035717.adop) - c:RegisterEffect(e2) -end -function c10035717.adcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c10035717.adcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,700) end - Duel.PayLPCost(tp,700) -end -function c10035717.filter(c) - return c:IsFaceup() and c:IsRace(RACE_MACHINE+RACE_WARRIOR) -end -function c10035717.adtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c10035717.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c10035717.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c10035717.filter,tp,LOCATION_MZONE,0,1,1,nil) -end -function c10035717.adop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - local atk=tc:GetAttack() - local def=tc:GetDefence() - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetValue(def) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,2) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_SET_DEFENCE_FINAL) - e2:SetValue(atk) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,2) - tc:RegisterEffect(e2) - end -end diff --git a/script/c1003840.lua b/script/c1003840.lua deleted file mode 100644 index aaff6e9aa6..0000000000 --- a/script/c1003840.lua +++ /dev/null @@ -1,77 +0,0 @@ ---スターライト・ジャンクション -function c1003840.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(1003840,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_FZONE) - e2:SetCountLimit(1,1003840) - e2:SetCost(c1003840.spcost) - e2:SetTarget(c1003840.sptg) - e2:SetOperation(c1003840.spop) - c:RegisterEffect(e2) - --todeck - local e3=Effect.CreateEffect(c) - e3:SetCategory(CATEGORY_TODECK) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetRange(LOCATION_FZONE) - e3:SetCountLimit(1,1003841) - e3:SetCondition(c1003840.thcon) - e3:SetTarget(c1003840.thtg) - e3:SetOperation(c1003840.thop) - c:RegisterEffect(e3) -end -function c1003840.cfilter(c,e,tp) - local lv=c:GetLevel() - return lv>0 and c:IsType(TYPE_TUNER) - and Duel.IsExistingMatchingCard(c1003840.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp,lv) -end -function c1003840.spfilter(c,e,tp,lv) - return c:IsSetCard(0x17) and c:GetLevel()~=lv and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c1003840.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,c1003840.cfilter,1,nil,e,tp) end - local g=Duel.SelectReleaseGroup(tp,c1003840.cfilter,1,1,nil,e,tp) - e:SetLabel(g:GetFirst():GetLevel()) - Duel.Release(g,REASON_COST) -end -function c1003840.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c1003840.spop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) or Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local lv=e:GetLabel() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c1003840.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,lv) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end -function c1003840.thcon(e,tp,eg,ep,ev,re,r,rp) - local ec=eg:GetFirst() - return Duel.GetTurnPlayer()~=tp - and ec:IsPreviousLocation(LOCATION_EXTRA) and ec:GetPreviousControler()==tp and ec:IsType(TYPE_SYNCHRO) -end -function c1003840.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_ONFIELD) and chkc:IsAbleToDeck() end - if chk==0 then return e:GetHandler():IsRelateToEffect(e) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectTarget(tp,Card.IsAbleToDeck,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0) -end -function c1003840.thop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.SendtoDeck(tc,nil,2,REASON_EFFECT) - end -end diff --git a/script/c1005587.lua b/script/c1005587.lua deleted file mode 100644 index e6b6cae9d5..0000000000 --- a/script/c1005587.lua +++ /dev/null @@ -1,44 +0,0 @@ ---煉獄の落とし穴 -function c1005587.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetTarget(c1005587.target) - e1:SetOperation(c1005587.activate) - c:RegisterEffect(e1) -end -function c1005587.filter(c,tp) - return c:IsFaceup() and c:IsType(TYPE_EFFECT) and c:IsAttackAbove(2000) and c:GetSummonPlayer()==tp and c:IsDestructable() and not c:IsDisabled() -end -function c1005587.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - if chk==0 then return eg:IsExists(c1005587.filter,1,nil,1-tp) end - Duel.SetTargetCard(eg) - local g=eg:Filter(c1005587.filter,nil,1-tp) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c1005587.filter2(c,e,tp) - return c:IsFaceup() and c:IsType(TYPE_EFFECT) and c:IsAttackAbove(2000) - and c:GetSummonPlayer()==tp and c:IsDestructable() and c:IsRelateToEffect(e) -end -function c1005587.activate(e,tp,eg,ep,ev,re,r,rp) - local g=eg:Filter(c1005587.filter2,nil,e,1-tp) - local tc=g:GetFirst() - if not tc then return end - if g:GetCount()>1 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - tc=g:Select(tp,1,1,nil):GetFirst() - end - if not tc:IsDisabled() then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - Duel.AdjustInstantly() - Duel.NegateRelatedChain(tc,RESET_TURN_SET) - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c10060427.lua b/script/c10060427.lua deleted file mode 100644 index 5871597fdb..0000000000 --- a/script/c10060427.lua +++ /dev/null @@ -1,110 +0,0 @@ ---コアキメイル・ルークロード -function c10060427.initial_effect(c) - --cost - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c10060427.mtcon) - e1:SetOperation(c10060427.mtop) - c:RegisterEffect(e1) - --summon with 1 tribute - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(10060427,3)) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_SUMMON_PROC) - e2:SetCondition(c10060427.otcon) - e2:SetOperation(c10060427.otop) - e2:SetValue(SUMMON_TYPE_ADVANCE) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EFFECT_SET_PROC) - c:RegisterEffect(e3) - --summon success - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(10060427,4)) - e3:SetCategory(CATEGORY_DESTROY) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_SUMMON_SUCCESS) - e3:SetCost(c10060427.descost) - e3:SetTarget(c10060427.destg) - e3:SetOperation(c10060427.desop) - c:RegisterEffect(e3) -end -function c10060427.mtcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c10060427.cfilter1(c) - return c:IsCode(36623431) and c:IsAbleToGraveAsCost() -end -function c10060427.cfilter2(c) - return c:IsType(TYPE_MONSTER) and c:IsRace(RACE_WARRIOR) and not c:IsPublic() -end -function c10060427.mtop(e,tp,eg,ep,ev,re,r,rp) - local g1=Duel.GetMatchingGroup(c10060427.cfilter1,tp,LOCATION_HAND,0,nil) - local g2=Duel.GetMatchingGroup(c10060427.cfilter2,tp,LOCATION_HAND,0,nil) - local select=2 - if g1:GetCount()>0 and g2:GetCount()>0 then - select=Duel.SelectOption(tp,aux.Stringid(10060427,0),aux.Stringid(10060427,1),aux.Stringid(10060427,2)) - elseif g1:GetCount()>0 then - select=Duel.SelectOption(tp,aux.Stringid(10060427,0),aux.Stringid(10060427,2)) - if select==1 then select=2 end - elseif g2:GetCount()>0 then - select=Duel.SelectOption(tp,aux.Stringid(10060427,1),aux.Stringid(10060427,2)) - select=select+1 - end - if select==0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=g1:Select(tp,1,1,nil) - Duel.SendtoGrave(g,REASON_COST) - elseif select==1 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) - local g=g2:Select(tp,1,1,nil) - Duel.ConfirmCards(1-tp,g) - Duel.ShuffleHand(tp) - else - Duel.Destroy(e:GetHandler(),REASON_RULE) - end -end -function c10060427.otfilter(c,tp) - return c:IsSetCard(0x1d) and (c:IsControler(tp) or c:IsFaceup()) -end -function c10060427.otcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - local mg=Duel.GetMatchingGroup(c10060427.otfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp) - return c:GetLevel()>6 and Duel.GetTributeCount(c,mg)>0 -end -function c10060427.otop(e,tp,eg,ep,ev,re,r,rp,c) - local mg=Duel.GetMatchingGroup(c10060427.otfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp) - local sg=Duel.SelectTribute(tp,c,1,1,mg) - c:SetMaterial(sg) - Duel.Release(sg,REASON_SUMMON+REASON_MATERIAL) -end -function c10060427.dfilter(c) - return c:IsSetCard(0x1d) and c:IsAbleToRemoveAsCost() -end -function c10060427.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c10060427.dfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c10060427.dfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c10060427.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and chkc:IsDestructable() end - if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,0,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,0,LOCATION_ONFIELD,1,2,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c10060427.desop(e,tp,eg,ep,ev,re,r,rp) - local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local g=tg:Filter(Card.IsRelateToEffect,nil,e) - if g:GetCount()>0 then - Duel.Destroy(g,REASON_EFFECT) - end -end diff --git a/script/c10069180.lua b/script/c10069180.lua deleted file mode 100644 index 3c0521f55c..0000000000 --- a/script/c10069180.lua +++ /dev/null @@ -1,28 +0,0 @@ ---魔力終了宣告 -function c10069180.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_CHAINING) - e1:SetCondition(c10069180.condition) - e1:SetTarget(c10069180.target) - e1:SetOperation(c10069180.activate) - c:RegisterEffect(e1) -end -function c10069180.condition(e,tp,eg,ep,ev,re,r,rp) - return rp~=tp and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:GetActiveType()==TYPE_SPELL+TYPE_CONTINUOUS and Duel.IsChainNegatable(ev) -end -function c10069180.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) - end -end -function c10069180.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateActivation(ev) - if re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(eg,REASON_EFFECT) - end -end diff --git a/script/c10080320.lua b/script/c10080320.lua deleted file mode 100644 index 2f635f1787..0000000000 --- a/script/c10080320.lua +++ /dev/null @@ -1,26 +0,0 @@ ---ジュラシックワールド -function c10080320.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --Atk - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e2:SetTarget(aux.TargetBoolFunction(Card.IsRace,RACE_DINOSAUR)) - e2:SetValue(300) - c:RegisterEffect(e2) - --Def - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetCode(EFFECT_UPDATE_DEFENCE) - e3:SetRange(LOCATION_SZONE) - e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e3:SetTarget(aux.TargetBoolFunction(Card.IsRace,RACE_DINOSAUR)) - e3:SetValue(300) - c:RegisterEffect(e3) -end diff --git a/script/c10097168.lua b/script/c10097168.lua deleted file mode 100644 index df341c2662..0000000000 --- a/script/c10097168.lua +++ /dev/null @@ -1,52 +0,0 @@ ---タイガードラゴン -function c10097168.initial_effect(c) - --summon success - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(10097168,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetCondition(c10097168.condition) - e1:SetTarget(c10097168.target) - e1:SetOperation(c10097168.operation) - c:RegisterEffect(e1) - --tribute check - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_MATERIAL_CHECK) - e2:SetValue(c10097168.valcheck) - e2:SetLabelObject(e1) - c:RegisterEffect(e2) -end -function c10097168.valcheck(e,c) - local g=c:GetMaterial() - if g:IsExists(Card.IsRace,1,nil,RACE_DRAGON) then - e:GetLabelObject():SetLabel(1) - else - e:GetLabelObject():SetLabel(0) - end -end -function c10097168.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_ADVANCE and e:GetLabel()==1 -end -function c10097168.filter(c) - return c:IsFacedown() and c:GetSequence()~=5 and c:IsDestructable() -end -function c10097168.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_SZONE) and chkc:IsControler(1-tp) and chkc:IsDestructable() end - if chk==0 then return Duel.IsExistingTarget(c10097168.filter,tp,0,LOCATION_SZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c10097168.filter,tp,0,LOCATION_SZONE,1,2,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c10097168.dfilter(c,e) - return c:IsRelateToEffect(e) and c:IsFacedown() -end -function c10097168.operation(e,tp,eg,ep,ev,re,r,rp) - local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local g=tg:Filter(c10097168.dfilter,nil,e) - if g:GetCount()>0 then - Duel.Destroy(g,REASON_EFFECT) - end -end diff --git a/script/c10110717.lua b/script/c10110717.lua deleted file mode 100644 index ff60506efc..0000000000 --- a/script/c10110717.lua +++ /dev/null @@ -1,56 +0,0 @@ ---メカウサー -function c10110717.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(10110717,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetCondition(c10110717.condition) - e1:SetTarget(c10110717.target) - e1:SetOperation(c10110717.operation) - c:RegisterEffect(e1) - --damage - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(10110717,1)) - e2:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_SINGLE) - e2:SetCategory(CATEGORY_DAMAGE) - e2:SetCode(EVENT_FLIP) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetTarget(c10110717.damtg) - e2:SetOperation(c10110717.damop) - c:RegisterEffect(e2) -end -function c10110717.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) -end -function c10110717.filter(c,e,tp) - return c:IsCode(10110717) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENCE) -end -function c10110717.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c10110717.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c10110717.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c10110717.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEDOWN_DEFENCE) - Duel.ConfirmCards(1-tp,g) - end -end -function c10110717.damtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - local g=Duel.SelectTarget(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,g:GetFirst():GetControler(),500) -end -function c10110717.damop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.Damage(tc:GetControler(),500,REASON_EFFECT) - end -end diff --git a/script/c10117149.lua b/script/c10117149.lua deleted file mode 100644 index a4a6286665..0000000000 --- a/script/c10117149.lua +++ /dev/null @@ -1,97 +0,0 @@ ---ブンボーグ005 -function c10117149.initial_effect(c) - --pendulum summon - aux.AddPendulumProcedure(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --splimit - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetRange(LOCATION_PZONE) - e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE) - e2:SetTargetRange(1,0) - e2:SetCondition(aux.nfbdncon) - e2:SetTarget(c10117149.splimit) - c:RegisterEffect(e2) - --destroy - local e3=Effect.CreateEffect(c) - e3:SetCategory(CATEGORY_DESTROY) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_SUMMON_SUCCESS) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e3:SetTarget(c10117149.destg) - e3:SetOperation(c10117149.desop) - c:RegisterEffect(e3) - local e4=e3:Clone() - e4:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e4) - --atk up - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_SINGLE) - e5:SetCode(EFFECT_UPDATE_ATTACK) - e5:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e5:SetRange(LOCATION_MZONE) - e5:SetValue(c10117149.atkval) - c:RegisterEffect(e5) - --spsummon - local e6=Effect.CreateEffect(c) - e6:SetCategory(CATEGORY_SPECIAL_SUMMON) - e6:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e6:SetCode(EVENT_DESTROYED) - e6:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e6:SetCountLimit(1,10117149) - e6:SetCondition(c10117149.spcon) - e6:SetTarget(c10117149.sptg) - e6:SetOperation(c10117149.spop) - c:RegisterEffect(e6) -end -function c10117149.splimit(e,c,tp,sumtp,sumpos) - return not c:IsSetCard(0xab) and bit.band(sumtp,SUMMON_TYPE_PENDULUM)==SUMMON_TYPE_PENDULUM -end -function c10117149.desfilter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable() -end -function c10117149.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and c10117149.desfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c10117149.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c10117149.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c10117149.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end -function c10117149.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0xab) -end -function c10117149.atkval(e,c) - return Duel.GetMatchingGroupCount(c10117149.cfilter,c:GetControler(),LOCATION_EXTRA,0,nil)*500 -end -function c10117149.spcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsPreviousLocation(LOCATION_SZONE) and (c:GetPreviousSequence()==6 or c:GetPreviousSequence()==7) -end -function c10117149.spfilter(c,e,tp) - return c:IsSetCard(0xab) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c10117149.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c10117149.spfilter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c10117149.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c10117149.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c10117149.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c10118318.lua b/script/c10118318.lua deleted file mode 100644 index 59e4c625a2..0000000000 --- a/script/c10118318.lua +++ /dev/null @@ -1,40 +0,0 @@ ---トゥルース・リインフォース -function c10118318.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_END_PHASE) - e1:SetCost(c10118318.cost) - e1:SetTarget(c10118318.target) - e1:SetOperation(c10118318.activate) - c:RegisterEffect(e1) -end -function c10118318.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_BATTLE_PHASE)==0 end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_BP) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) - e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function c10118318.filter(c,e,tp) - return c:IsLevelBelow(2) and c:IsRace(RACE_WARRIOR) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c10118318.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c10118318.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,LOCATION_DECK) -end -function c10118318.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c10118318.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - local tc=g:GetFirst() - if tc then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c10132124.lua b/script/c10132124.lua deleted file mode 100644 index 2b2d05b42c..0000000000 --- a/script/c10132124.lua +++ /dev/null @@ -1,32 +0,0 @@ ---ウイングトータス -function c10132124.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(10132124,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetRange(LOCATION_HAND+LOCATION_GRAVE) - e1:SetProperty(EFFECT_FLAG_CHAIN_UNIQUE) - e1:SetCode(EVENT_REMOVE) - e1:SetCondition(c10132124.spcon) - e1:SetTarget(c10132124.sptg) - e1:SetOperation(c10132124.spop) - c:RegisterEffect(e1) -end -function c10132124.spfilter(c,tp) - return c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousLocation(LOCATION_MZONE) - and c:GetPreviousControler()==tp and c:IsRace(RACE_FISH+RACE_SEASERPENT+RACE_AQUA) -end -function c10132124.spcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c10132124.spfilter,1,nil,tp) -end -function c10132124.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c10132124.spop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c10178757.lua b/script/c10178757.lua deleted file mode 100644 index 41c523c0a9..0000000000 --- a/script/c10178757.lua +++ /dev/null @@ -1,40 +0,0 @@ ---レアル・ジェネクス・オラクル -function c10178757.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(10178757,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DELAY) - e1:SetCode(EVENT_TO_HAND) - e1:SetCondition(c10178757.condition) - e1:SetTarget(c10178757.target) - e1:SetOperation(c10178757.operation) - c:RegisterEffect(e1) - --synchro limit - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e2:SetValue(c10178757.synlimit) - c:RegisterEffect(e2) -end -function c10178757.synlimit(e,c) - if not c then return false end - return not c:IsSetCard(0x2) -end -function c10178757.condition(e,tp,eg,ep,ev,re,r,rp) - return bit.band(r,REASON_EFFECT)>0 and re:GetHandler():IsSetCard(0x2) - and e:GetHandler():GetPreviousLocation()==LOCATION_DECK -end -function c10178757.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c10178757.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c10189126.lua b/script/c10189126.lua deleted file mode 100644 index 73221b2560..0000000000 --- a/script/c10189126.lua +++ /dev/null @@ -1,27 +0,0 @@ ---仮面魔道士 -function c10189126.initial_effect(c) - --draw - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(10189126,0)) - e1:SetCategory(CATEGORY_DRAW) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_BATTLE_DAMAGE) - e1:SetCondition(c10189126.condition) - e1:SetTarget(c10189126.target) - e1:SetOperation(c10189126.operation) - c:RegisterEffect(e1) -end -function c10189126.condition(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp -end -function c10189126.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(1) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c10189126.operation(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end diff --git a/script/c10209545.lua b/script/c10209545.lua deleted file mode 100644 index 0aa770f44f..0000000000 --- a/script/c10209545.lua +++ /dev/null @@ -1,51 +0,0 @@ ---朽ち果てた武将 -function c10209545.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(10209545,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c10209545.sptg) - e1:SetOperation(c10209545.spop) - c:RegisterEffect(e1) - --handes - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(10209545,1)) - e2:SetCategory(CATEGORY_HANDES) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_BATTLE_DAMAGE) - e2:SetCondition(c10209545.hdcon) - e2:SetTarget(c10209545.hdtg) - e2:SetOperation(c10209545.hdop) - c:RegisterEffect(e2) -end -function c10209545.filter(c,e,tp) - return c:IsCode(47693640) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c10209545.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c10209545.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c10209545.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c10209545.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end -function c10209545.hdcon(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp and Duel.GetAttackTarget()==nil -end -function c10209545.hdtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_HANDES,0,0,1-tp,1) -end -function c10209545.hdop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND) - if g:GetCount()==0 then return end - local sg=g:RandomSelect(1-tp,1) - Duel.SendtoGrave(sg,REASON_DISCARD+REASON_EFFECT) -end diff --git a/script/c10236520.lua b/script/c10236520.lua deleted file mode 100644 index 8e49882f60..0000000000 --- a/script/c10236520.lua +++ /dev/null @@ -1,26 +0,0 @@ ---忍者義賊ゴエゴエ -function c10236520.initial_effect(c) - --handes - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(10236520,0)) - e1:SetCategory(CATEGORY_HANDES) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_BATTLE_DAMAGE) - e1:SetCondition(c10236520.condition) - e1:SetTarget(c10236520.target) - e1:SetOperation(c10236520.operation) - c:RegisterEffect(e1) -end -function c10236520.condition(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp and Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>=5 -end -function c10236520.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,1-tp,2) -end -function c10236520.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetFieldGroup(ep,LOCATION_HAND,0) - if g:GetCount()<5 then return end - local sg=g:RandomSelect(1-tp,2) - Duel.SendtoGrave(sg,REASON_EFFECT+REASON_DISCARD) -end diff --git a/script/c102380.lua b/script/c102380.lua deleted file mode 100644 index 7b2d8cb276..0000000000 --- a/script/c102380.lua +++ /dev/null @@ -1,74 +0,0 @@ ---溶岩魔神ラヴァ・ゴーレム -function c102380.initial_effect(c) - c:EnableReviveLimit() - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(102380,0)) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_SPSUM_PARAM) - e1:SetRange(LOCATION_HAND) - e1:SetTargetRange(POS_FACEUP,1) - e1:SetCondition(c102380.spcon) - e1:SetOperation(c102380.spop) - c:RegisterEffect(e1) - --damage - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetDescription(aux.Stringid(102380,1)) - e2:SetCategory(CATEGORY_DAMAGE) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCondition(c102380.damcon) - e2:SetTarget(c102380.damtg) - e2:SetOperation(c102380.damop) - c:RegisterEffect(e2) - --spsummon cost - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_SPSUMMON_COST) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e3:SetCost(c102380.spcost) - e3:SetOperation(c102380.spcop) - c:RegisterEffect(e3) -end -function c102380.spcon(e,c) - if c==nil then return true end - return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-2 - and Duel.IsExistingMatchingCard(Card.IsReleasable,c:GetControler(),0,LOCATION_MZONE,2,nil) -end -function c102380.spop(e,tp,eg,ep,ev,re,r,rp,c) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) - local g=Duel.SelectMatchingCard(tp,Card.IsReleasable,tp,0,LOCATION_MZONE,2,2,nil) - Duel.Release(g,REASON_COST) -end -function c102380.damcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c102380.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(1000) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,0,0,tp,1000) -end -function c102380.damop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end -function c102380.spcost(e,c,tp) - return Duel.GetActivityCount(tp,ACTIVITY_NORMALSUMMON)==0 -end -function c102380.spcop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_SUMMON) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetReset(RESET_PHASE+RESET_END) - e1:SetTargetRange(1,0) - Duel.RegisterEffect(e1,tp) - local e2=e1:Clone() - e2:SetCode(EFFECT_CANNOT_MSET) - Duel.RegisterEffect(e2,tp) -end diff --git a/script/c10239627.lua b/script/c10239627.lua deleted file mode 100644 index 76ff0a2694..0000000000 --- a/script/c10239627.lua +++ /dev/null @@ -1,91 +0,0 @@ ---マジカル・アブダクター -function c10239627.initial_effect(c) - c:EnableCounterPermit(0x3001,LOCATION_PZONE+LOCATION_MZONE) - --pendulum summon - aux.AddPendulumProcedure(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --add counter - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetCode(EVENT_CHAINING) - e2:SetRange(LOCATION_PZONE+LOCATION_MZONE) - e2:SetOperation(aux.chainreg) - c:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e3:SetCode(EVENT_CHAIN_SOLVED) - e3:SetRange(LOCATION_PZONE+LOCATION_MZONE) - e3:SetOperation(c10239627.acop) - c:RegisterEffect(e3) - --to hand - local e4=Effect.CreateEffect(c) - e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e4:SetType(EFFECT_TYPE_IGNITION) - e4:SetRange(LOCATION_PZONE) - e4:SetCountLimit(1) - e4:SetCost(c10239627.thcost) - e4:SetTarget(c10239627.thtg1) - e4:SetOperation(c10239627.thop1) - c:RegisterEffect(e4) - local e5=e4:Clone() - e5:SetRange(LOCATION_MZONE) - e5:SetTarget(c10239627.thtg2) - e5:SetOperation(c10239627.thop2) - c:RegisterEffect(e5) - --atk up - local e6=Effect.CreateEffect(c) - e6:SetType(EFFECT_TYPE_SINGLE) - e6:SetCode(EFFECT_UPDATE_ATTACK) - e6:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e6:SetRange(LOCATION_MZONE) - e6:SetValue(c10239627.atkval) - c:RegisterEffect(e6) -end -function c10239627.acop(e,tp,eg,ep,ev,re,r,rp) - if re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL) and e:GetHandler():GetFlagEffect(1)>0 then - e:GetHandler():AddCounter(0x3001,1) - end -end -function c10239627.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsCanRemoveCounter(tp,0x3001,3,REASON_COST) end - e:GetHandler():RemoveCounter(tp,0x3001,3,REASON_COST) -end -function c10239627.thfilter1(c) - return c:IsType(TYPE_PENDULUM) and c:IsAbleToHand() -end -function c10239627.thtg1(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c10239627.thfilter1,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c10239627.thop1(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c10239627.thfilter1,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end -function c10239627.thfilter2(c) - return c:IsRace(RACE_SPELLCASTER) and c:GetLevel()==1 and c:IsAbleToHand() -end -function c10239627.thtg2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c10239627.thfilter2,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c10239627.thop2(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c10239627.thfilter2,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end -function c10239627.atkval(e,c) - return e:GetHandler():GetCounter(0x3001)*100 -end diff --git a/script/c10248192.lua b/script/c10248192.lua deleted file mode 100644 index 4517118da2..0000000000 --- a/script/c10248192.lua +++ /dev/null @@ -1,30 +0,0 @@ ---ヒエログリフの石版 -function c10248192.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCost(c10248192.cost) - e1:SetTarget(c10248192.target) - e1:SetOperation(c10248192.activate) - c:RegisterEffect(e1) -end -function c10248192.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,1000) end - Duel.PayLPCost(tp,1000) -end -function c10248192.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(tp) -end -function c10248192.activate(e,tp,eg,ep,ev,re,r,rp) - local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_HAND_LIMIT) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetTargetRange(1,0) - e1:SetValue(7) - Duel.RegisterEffect(e1,p) -end diff --git a/script/c10248389.lua b/script/c10248389.lua deleted file mode 100644 index 1c4eeda3b7..0000000000 --- a/script/c10248389.lua +++ /dev/null @@ -1,56 +0,0 @@ ---サイバー・ブレイダー -function c10248389.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcCode2(c,97023549,11460577,false,false) - --indes - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e1:SetCondition(c10248389.indcon) - e1:SetValue(1) - c:RegisterEffect(e1) - --atkup - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EFFECT_SET_ATTACK_FINAL) - e2:SetCondition(c10248389.atkcon) - e2:SetValue(c10248389.atkval) - c:RegisterEffect(e2) - --disable - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetCode(EFFECT_DISABLE) - e3:SetRange(LOCATION_MZONE) - e3:SetTargetRange(0,LOCATION_ONFIELD) - e3:SetCondition(c10248389.discon) - c:RegisterEffect(e3) - --disable effect - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e4:SetCode(EVENT_CHAIN_SOLVING) - e4:SetRange(LOCATION_MZONE) - e4:SetCondition(c10248389.discon) - e4:SetOperation(c10248389.disop) - c:RegisterEffect(e4) -end -function c10248389.indcon(e) - return Duel.GetFieldGroupCount(e:GetHandlerPlayer(),0,LOCATION_MZONE)==1 -end -function c10248389.atkcon(e) - return Duel.GetFieldGroupCount(e:GetHandlerPlayer(),0,LOCATION_MZONE)==2 -end -function c10248389.discon(e) - return Duel.GetFieldGroupCount(e:GetHandlerPlayer(),0,LOCATION_MZONE)==3 -end -function c10248389.atkval(e,c) - return c:GetAttack()*2 -end -function c10248389.disop(e,tp,eg,ep,ev,re,r,rp) - local tl=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION) - if rp~=tp and (tl==LOCATION_MZONE or tl==LOCATION_SZONE) then - Duel.NegateEffect(ev) - end -end diff --git a/script/c10275411.lua b/script/c10275411.lua deleted file mode 100644 index cc5c821fec..0000000000 --- a/script/c10275411.lua +++ /dev/null @@ -1,45 +0,0 @@ ---エクシーズ・リベンジ -function c10275411.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_END_PHASE) - e1:SetCountLimit(1,10275411+EFFECT_COUNT_CODE_OATH) - e1:SetCondition(c10275411.condition) - e1:SetTarget(c10275411.target) - e1:SetOperation(c10275411.activate) - c:RegisterEffect(e1) -end -function c10275411.cfilter(c) - return c:IsFaceup() and c:GetOverlayCount()>0 -end -function c10275411.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c10275411.cfilter,tp,0,LOCATION_MZONE,1,nil) -end -function c10275411.filter(c,e,tp) - return c:IsType(TYPE_XYZ) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c10275411.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c10275411.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c10275411.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c10275411.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c10275411.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)~=0 then - local g1=Duel.GetOverlayGroup(tp,0,1) - if g1:GetCount()==0 then return end - Duel.BreakEffect() - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(10275411,0)) - local mg=g1:Select(tp,1,1,nil) - local oc=mg:GetFirst():GetOverlayTarget() - Duel.Overlay(tc,mg) - Duel.RaiseSingleEvent(oc,EVENT_DETACH_MATERIAL,e,0,0,0,0) - end -end diff --git a/script/c10282757.lua b/script/c10282757.lua deleted file mode 100644 index 5f11a33b27..0000000000 --- a/script/c10282757.lua +++ /dev/null @@ -1,36 +0,0 @@ ---プランクスケール -function c10282757.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetOperation(c10282757.activate) - c:RegisterEffect(e1) -end -function c10282757.activate(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e1:SetValue(500) - e1:SetTarget(c10282757.filter1) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) - local e2=e1:Clone() - e2:SetCode(EFFECT_UPDATE_DEFENCE) - Duel.RegisterEffect(e2,tp) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetCode(EFFECT_CANNOT_ATTACK) - e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e3:SetReset(RESET_PHASE+PHASE_END) - e3:SetTarget(c10282757.filter2) - Duel.RegisterEffect(e3,tp) -end -function c10282757.filter1(e,c) - return c:IsType(TYPE_XYZ) and c:IsRankBelow(3) -end -function c10282757.filter2(e,c) - return c:IsType(TYPE_XYZ) and c:IsRankAbove(4) -end diff --git a/script/c10321588.lua b/script/c10321588.lua deleted file mode 100644 index 386022d334..0000000000 --- a/script/c10321588.lua +++ /dev/null @@ -1,28 +0,0 @@ ---サンライト・ユニコーン -function c10321588.initial_effect(c) - -- - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(10321588,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_MZONE) - e1:SetTarget(c10321588.target) - e1:SetOperation(c10321588.operation) - c:RegisterEffect(e1) -end -function c10321588.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0 end -end -function c10321588.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)==0 then return end - Duel.ConfirmDecktop(tp,1) - local g=Duel.GetDecktopGroup(tp,1) - local tc=g:GetFirst() - if tc:IsType(TYPE_EQUIP) and tc:IsAbleToHand() then - Duel.DisableShuffleCheck() - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ShuffleHand(tp) - else - Duel.MoveSequence(tc,1) - end -end diff --git a/script/c1033312.lua b/script/c1033312.lua deleted file mode 100644 index c464e2435a..0000000000 --- a/script/c1033312.lua +++ /dev/null @@ -1,37 +0,0 @@ ---苦渋の決断 -function c1033312.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOGRAVE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,1033312+EFFECT_COUNT_CODE_OATH) - e1:SetTarget(c1033312.target) - e1:SetOperation(c1033312.activate) - c:RegisterEffect(e1) -end -function c1033312.tgfilter(c,tp) - return c:IsLevelBelow(4) and c:IsType(TYPE_NORMAL) and c:IsAbleToGrave() - and Duel.IsExistingMatchingCard(c1033312.thfilter,tp,LOCATION_DECK,0,1,c,c:GetCode()) -end -function c1033312.thfilter(c,code) - return c:IsCode(code) and c:IsAbleToHand() -end -function c1033312.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c1033312.tgfilter,tp,LOCATION_DECK,0,1,nil,tp) end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c1033312.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c1033312.tgfilter,tp,LOCATION_DECK,0,1,1,nil,tp) - local tc=g:GetFirst() - if tc and Duel.SendtoGrave(tc,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_GRAVE) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local sg=Duel.SelectMatchingCard(tp,c1033312.thfilter,tp,LOCATION_DECK,0,1,1,nil,tc:GetCode()) - if sg:GetCount()>0 then - Duel.SendtoHand(sg,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,sg) - end - end -end diff --git a/script/c10352095.lua b/script/c10352095.lua deleted file mode 100644 index c99689cddb..0000000000 --- a/script/c10352095.lua +++ /dev/null @@ -1,46 +0,0 @@ ---幻惑の巻物 -function c10352095.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c10352095.target) - e1:SetOperation(c10352095.operation) - c:RegisterEffect(e1) - --ATTRIBUTE - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_CHANGE_ATTRIBUTE) - e2:SetValue(c10352095.value) - c:RegisterEffect(e2) - e1:SetLabelObject(e2) - --Equip limit - local e4=Effect.CreateEffect(c) - e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetCode(EFFECT_EQUIP_LIMIT) - e4:SetValue(1) - c:RegisterEffect(e4) -end -function c10352095.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.Hint(HINT_SELECTMSG,tp,563) - local rc=Duel.AnnounceAttribute(tp,1,0xffffff) - e:GetLabelObject():SetLabel(rc) - e:GetHandler():SetHint(CHINT_ATTRIBUTE,rc) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c10352095.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,e:GetHandler(),tc) - end -end -function c10352095.value(e,c) - return e:GetLabel() -end diff --git a/script/c10365322.lua b/script/c10365322.lua deleted file mode 100644 index 8210347f42..0000000000 --- a/script/c10365322.lua +++ /dev/null @@ -1,47 +0,0 @@ ---起爆獣ヴァルカノン -function c10365322.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcFun2(c,aux.FilterBoolFunction(Card.IsRace,RACE_MACHINE),aux.FilterBoolFunction(Card.IsRace,RACE_PYRO),true) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(10365322,0)) - e2:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetCondition(c10365322.descon) - e2:SetTarget(c10365322.destg) - e2:SetOperation(c10365322.desop) - c:RegisterEffect(e2) -end -function c10365322.descon(e,tp,eg,ep,ev,re,r,rp) - return bit.band(e:GetHandler():GetSummonType(),SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION -end -function c10365322.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsDestructable() end - if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,0,LOCATION_MZONE,1,1,nil) - g:AddCard(e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,0) -end -function c10365322.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - local c=e:GetHandler() - if not tc:IsRelateToEffect(e) and not c:IsRelateToEffect(e) then return end - if not tc:IsRelateToEffect(e) then - Duel.Destroy(c,REASON_EFFECT) - elseif not c:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - else - local dg=Group.FromCards(c,tc) - if Duel.Destroy(dg,REASON_EFFECT)==2 and tc:IsLocation(LOCATION_GRAVE) and c:IsLocation(LOCATION_GRAVE) then - Duel.BreakEffect() - local d=tc:GetAttack() - if d<0 then d=0 end - Duel.Damage(1-tp,d,REASON_EFFECT) - end - end -end diff --git a/script/c1036974.lua b/script/c1036974.lua deleted file mode 100644 index 73488f466d..0000000000 --- a/script/c1036974.lua +++ /dev/null @@ -1,35 +0,0 @@ ---ミスフォーチュン -function c1036974.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c1036974.cost) - e1:SetTarget(c1036974.target) - e1:SetOperation(c1036974.activate) - c:RegisterEffect(e1) -end -function c1036974.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_ATTACK)==0 end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_OATH) - e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetReset(RESET_PHASE+RESET_END) - Duel.RegisterEffect(e1,tp) -end -function c1036974.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,0) -end -function c1036974.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - Duel.Damage(1-tp,tc:GetBaseAttack()/2,REASON_EFFECT) - end -end diff --git a/script/c10375182.lua b/script/c10375182.lua deleted file mode 100644 index 15378ad4f7..0000000000 --- a/script/c10375182.lua +++ /dev/null @@ -1,24 +0,0 @@ ---コマンド・ナイト -function c10375182.initial_effect(c) - --cannot be battle target - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_CANNOT_BE_BATTLE_TARGET) - e1:SetCondition(c10375182.ccon) - e1:SetValue(aux.imval1) - c:RegisterEffect(e1) - --atk - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetRange(LOCATION_MZONE) - e2:SetTargetRange(LOCATION_MZONE,0) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetTarget(aux.TargetBoolFunction(Card.IsRace,RACE_WARRIOR)) - e2:SetValue(400) - c:RegisterEffect(e2) -end -function c10375182.ccon(e) - return Duel.GetFieldGroupCount(e:GetHandlerPlayer(),LOCATION_MZONE,0)>1 -end diff --git a/script/c10383554.lua b/script/c10383554.lua deleted file mode 100644 index 84a71fe2f6..0000000000 --- a/script/c10383554.lua +++ /dev/null @@ -1,56 +0,0 @@ ---デストーイ・ホイールソウ・ライオ -function c10383554.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcCodeFun(c,34688023,aux.FilterBoolFunction(Card.IsSetCard,0xa9),1,true,false) - --spsummon condition - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(aux.fuslimit) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCountLimit(1,10383554) - e2:SetRange(LOCATION_MZONE) - e2:SetCost(c10383554.cost) - e2:SetTarget(c10383554.target) - e2:SetOperation(c10383554.operation) - c:RegisterEffect(e2) -end -function c10383554.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return not e:GetHandler():IsDirectAttacked() end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_OATH) - e1:SetCode(EFFECT_CANNOT_DIRECT_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - e:GetHandler():RegisterEffect(e1) -end -function c10383554.filter(c) - return c:IsFaceup() and c:IsDestructable() -end -function c10383554.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c10383554.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c10383554.filter,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c10383554.filter,tp,0,LOCATION_MZONE,1,1,nil) - local atk=g:GetFirst():GetTextAttack() - if atk<0 then atk=0 end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,atk) -end -function c10383554.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - local atk=tc:GetTextAttack() - if atk<0 then atk=0 end - if Duel.Destroy(tc,REASON_EFFECT)~=0 then - Duel.Damage(1-tp,atk,REASON_EFFECT) - end - end -end diff --git a/script/c10389142.lua b/script/c10389142.lua deleted file mode 100644 index e86f0664ae..0000000000 --- a/script/c10389142.lua +++ /dev/null @@ -1,79 +0,0 @@ ---No.42 スターシップ・ギャラクシー・トマホーク -function c10389142.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,7,2) - c:EnableReviveLimit() - --token - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN) - e1:SetDescription(aux.Stringid(10389142,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c10389142.spcost) - e1:SetTarget(c10389142.sptg) - e1:SetOperation(c10389142.spop) - c:RegisterEffect(e1) -end -c10389142.xyz_number=42 -function c10389142.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,2,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,2,2,REASON_COST) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_AVOID_BATTLE_DAMAGE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetTargetRange(0,1) - e1:SetValue(1) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function c10389142.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsPlayerCanSpecialSummonMonster(tp,10389143,0,0x4011,2000,0,6,RACE_MACHINE,ATTRIBUTE_WIND) end - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,ft,0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,ft,0,0) -end -function c10389142.spop(e,tp,eg,ep,ev,re,r,rp) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ft<=0 or not Duel.IsPlayerCanSpecialSummonMonster(tp,10389143,0,0x4011,2000,0,6,RACE_MACHINE,ATTRIBUTE_WIND) then return end - local fid=e:GetHandler():GetFieldID() - local g=Group.CreateGroup() - for i=1,ft do - local token=Duel.CreateToken(tp,10389143) - Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP) - token:RegisterFlagEffect(10389142,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1,fid) - g:AddCard(token) - end - Duel.SpecialSummonComplete() - g:KeepAlive() - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e1:SetReset(RESET_PHASE+PHASE_END) - e1:SetCountLimit(1) - e1:SetLabel(fid) - e1:SetLabelObject(g) - e1:SetCondition(c10389142.descon) - e1:SetOperation(c10389142.desop) - Duel.RegisterEffect(e1,tp) -end -function c10389142.desfilter(c,fid) - return c:GetFlagEffectLabel(10389142)==fid -end -function c10389142.descon(e,tp,eg,ep,ev,re,r,rp) - local g=e:GetLabelObject() - if not g:IsExists(c10389142.desfilter,1,nil,e:GetLabel()) then - g:DeleteGroup() - e:Reset() - return false - else return true end -end -function c10389142.desop(e,tp,eg,ep,ev,re,r,rp) - local g=e:GetLabelObject() - local tg=g:Filter(c10389142.desfilter,nil,e:GetLabel()) - g:DeleteGroup() - Duel.Destroy(tg,REASON_EFFECT) -end diff --git a/script/c10389794.lua b/script/c10389794.lua deleted file mode 100644 index efd7111acb..0000000000 --- a/script/c10389794.lua +++ /dev/null @@ -1,23 +0,0 @@ ---デス・ドーナツ -function c10389794.initial_effect(c) - --flip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(10389794,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP) - e1:SetTarget(c10389794.target) - e1:SetOperation(c10389794.operation) - c:RegisterEffect(e1) -end -function c10389794.filter(c) - return c:IsFaceup() and c:IsDestructable() and (c:GetBaseAttack()==0 or c:GetBaseDefence()==0) -end -function c10389794.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local g=Duel.GetMatchingGroup(c10389794.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c10389794.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c10389794.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - Duel.Destroy(g,REASON_EFFECT) -end diff --git a/script/c10406322.lua b/script/c10406322.lua deleted file mode 100644 index c3b5d9a4c8..0000000000 --- a/script/c10406322.lua +++ /dev/null @@ -1,78 +0,0 @@ ---森羅の守神 アルセイ -function c10406322.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,8,2) - c:EnableReviveLimit() - --announce - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(10406322,0)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetTarget(c10406322.target) - e1:SetOperation(c10406322.operation) - c:RegisterEffect(e1) - --to deck - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(10406322,1)) - e2:SetCategory(CATEGORY_TODECK) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,10406322) - e2:SetCondition(c10406322.tdcon) - e2:SetCost(c10406322.tdcost) - e2:SetTarget(c10406322.tdtg) - e2:SetOperation(c10406322.tdop) - c:RegisterEffect(e2) -end -function c10406322.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,1) end - Duel.Hint(HINT_SELECTMSG,tp,0) - local ac=Duel.AnnounceCard(tp) - e:SetLabel(ac) -end -function c10406322.operation(e,tp,eg,ep,ev,re,r,rp) - if not Duel.IsPlayerCanDiscardDeck(tp,1) then return end - Duel.ConfirmDecktop(tp,1) - local g=Duel.GetDecktopGroup(tp,1) - local tc=g:GetFirst() - if tc:GetCode()==e:GetLabel() and tc:IsAbleToHand() then - Duel.DisableShuffleCheck() - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ShuffleHand(tp) - else - Duel.DisableShuffleCheck() - Duel.SendtoGrave(tc,REASON_EFFECT+REASON_REVEAL) - end -end -function c10406322.cfilter(c,tp) - return c:IsReason(REASON_EFFECT) and c:IsPreviousLocation(LOCATION_DECK) and c:GetPreviousControler()==tp -end -function c10406322.tdcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c10406322.cfilter,1,nil,tp) -end -function c10406322.tdcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c10406322.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsAbleToDeck() end - if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToDeck,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectTarget(tp,Card.IsAbleToDeck,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0) -end -function c10406322.tdop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - if tc:IsType(TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ) - or Duel.SelectOption(tp,aux.Stringid(10406322,2),aux.Stringid(10406322,3))==0 then - Duel.SendtoDeck(tc,nil,0,REASON_EFFECT) - else - Duel.SendtoDeck(tc,nil,1,REASON_EFFECT) - end - end -end diff --git a/script/c10443957.lua b/script/c10443957.lua deleted file mode 100644 index e2697d9d70..0000000000 --- a/script/c10443957.lua +++ /dev/null @@ -1,91 +0,0 @@ ---サイバー・ドラゴン・インフィニティ -function c10443957.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,c10443957.mfilter,6,3,c10443957.ovfilter,aux.Stringid(10443957,0),3,c10443957.xyzop) - c:EnableReviveLimit() - --atk - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetValue(c10443957.atkval) - c:RegisterEffect(e1) - --material - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetTarget(c10443957.target) - e2:SetOperation(c10443957.operation) - c:RegisterEffect(e2) - --negate - local e3=Effect.CreateEffect(c) - e3:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) - e3:SetType(EFFECT_TYPE_QUICK_O) - e3:SetCode(EVENT_CHAINING) - e3:SetCountLimit(1) - e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) - e3:SetRange(LOCATION_MZONE) - e3:SetCondition(c10443957.discon) - e3:SetCost(c10443957.discost) - e3:SetTarget(c10443957.distg) - e3:SetOperation(c10443957.disop) - c:RegisterEffect(e3) -end -function c10443957.mfilter(c) - return c:IsRace(RACE_MACHINE) and c:IsAttribute(ATTRIBUTE_LIGHT) -end -function c10443957.ovfilter(c) - return c:IsFaceup() and c:IsCode(58069384) -end -function c10443957.xyzop(e,tp,chk) - if chk==0 then return Duel.GetFlagEffect(tp,10443957)==0 end - Duel.RegisterFlagEffect(tp,10443957,RESET_PHASE+PHASE_END,0,1) -end -function c10443957.atkval(e,c) - return c:GetOverlayCount()*200 -end -function c10443957.filter(c,tp) - return c:IsPosition(POS_FACEUP_ATTACK) and not c:IsType(TYPE_TOKEN) - and (c:IsControler(tp) or c:IsAbleToChangeControler()) -end -function c10443957.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c10443957.filter(chkc,tp) and chkc~=e:GetHandler() end - if chk==0 then return e:GetHandler():IsType(TYPE_XYZ) - and Duel.IsExistingTarget(c10443957.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,e:GetHandler(),tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - Duel.SelectTarget(tp,c10443957.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,e:GetHandler(),tp) -end -function c10443957.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then - local og=tc:GetOverlayGroup() - if og:GetCount()>0 then - Duel.SendtoGrave(og,REASON_RULE) - end - Duel.Overlay(c,Group.FromCards(tc)) - end -end -function c10443957.discon(e,tp,eg,ep,ev,re,r,rp) - return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev) -end -function c10443957.discost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c10443957.distg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) - end -end -function c10443957.disop(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateActivation(ev) - if re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(eg,REASON_EFFECT) - end -end diff --git a/script/c10449150.lua b/script/c10449150.lua deleted file mode 100644 index 8c5b6ea296..0000000000 --- a/script/c10449150.lua +++ /dev/null @@ -1,71 +0,0 @@ ---シャトルロイド -function c10449150.initial_effect(c) - --remove - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(10449150,0)) - e1:SetCategory(CATEGORY_REMOVE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_BE_BATTLE_TARGET) - e1:SetTarget(c10449150.rmtg) - e1:SetOperation(c10449150.rmop) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(10449150,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) - e2:SetRange(LOCATION_REMOVED) - e2:SetCondition(c10449150.spcon) - e2:SetTarget(c10449150.sptg) - e2:SetOperation(c10449150.spop) - c:RegisterEffect(e2) - --damage - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(10449150,2)) - e3:SetCategory(CATEGORY_DAMAGE) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - e3:SetCondition(c10449150.damcon) - e3:SetTarget(c10449150.damtg) - e3:SetOperation(c10449150.damop) - c:RegisterEffect(e3) -end -function c10449150.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemove() end - Duel.SetOperationInfo(0,CATEGORY_REMOVE,e:GetHandler(),1,0,0) -end -function c10449150.rmop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.Remove(c,POS_FACEUP,REASON_EFFECT)~=0 then - c:RegisterFlagEffect(10449150,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,0,1) - end -end -function c10449150.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c10449150.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():GetFlagEffect(10449150)~=0 end - e:GetHandler():ResetFlagEffect(10449150) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,1000) -end -function c10449150.spop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - Duel.SpecialSummon(e:GetHandler(),1,tp,tp,false,false,POS_FACEUP) - end -end -function c10449150.damcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+1 -end -function c10449150.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(1000) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,1000) -end -function c10449150.damop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c1045143.lua b/script/c1045143.lua deleted file mode 100644 index c2466afb45..0000000000 --- a/script/c1045143.lua +++ /dev/null @@ -1,32 +0,0 @@ ---ギアギアーノ Mk-II -function c1045143.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(1045143,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c1045143.sptg) - e1:SetOperation(c1045143.spop) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - c:RegisterEffect(e2) -end -function c1045143.filter(c,e,tp) - return c:IsSetCard(0x72) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) - and not c:IsHasEffect(EFFECT_NECRO_VALLEY) -end -function c1045143.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c1045143.filter,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_HAND) -end -function c1045143.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c1045143.filter,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENCE) - end -end diff --git a/script/c10456559.lua b/script/c10456559.lua deleted file mode 100644 index 8c6a95ed01..0000000000 --- a/script/c10456559.lua +++ /dev/null @@ -1,29 +0,0 @@ ---悪魂邪苦止 -function c10456559.initial_effect(c) - --add - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetDescription(aux.Stringid(10456559,0)) - e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetCondition(c10456559.condition) - e1:SetTarget(c10456559.target) - e1:SetOperation(c10456559.operation) - c:RegisterEffect(e1) -end -function c10456559.condition(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsLocation(LOCATION_GRAVE) and tp==c:GetPreviousControler() and c:IsReason(REASON_BATTLE) -end -function c10456559.filter(c) - return c:IsCode(10456559) and c:IsAbleToHand() -end -function c10456559.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c10456559.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c10456559.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c10456559.filter,tp,LOCATION_DECK,0,1,3,nil) - Duel.SendtoHand(g,nil,REASON_EFFECT) -end diff --git a/script/c10485110.lua b/script/c10485110.lua deleted file mode 100644 index 274563cd38..0000000000 --- a/script/c10485110.lua +++ /dev/null @@ -1,56 +0,0 @@ ---海竜神-ネオダイダロス -function c10485110.initial_effect(c) - c:EnableReviveLimit() - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(aux.FALSE) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_SPSUMMON_PROC) - e2:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e2:SetRange(LOCATION_HAND) - e2:SetCondition(c10485110.spcon) - e2:SetOperation(c10485110.spop) - c:RegisterEffect(e2) - --tograve - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(10485110,0)) - e3:SetCategory(CATEGORY_TOGRAVE) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_MZONE) - e3:SetCost(c10485110.cost) - e3:SetTarget(c10485110.target) - e3:SetOperation(c10485110.operation) - c:RegisterEffect(e3) -end -function c10485110.spcon(e,c) - if c==nil then return true end - return Duel.CheckReleaseGroup(c:GetControler(),Card.IsCode,1,nil,37721209) -end -function c10485110.spop(e,tp,eg,ep,ev,re,r,rp,c) - local g=Duel.SelectReleaseGroup(tp,Card.IsCode,1,1,nil,37721209) - Duel.Release(g,REASON_COST) -end -function c10485110.cfilter(c) - return c:IsFaceup() and c:IsCode(22702055) and c:IsAbleToGraveAsCost() -end -function c10485110.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c10485110.cfilter,tp,LOCATION_ONFIELD,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c10485110.cfilter,tp,LOCATION_ONFIELD,0,1,1,nil) - Duel.SendtoGrave(g,REASON_COST) -end -function c10485110.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,0xe,0xe,1,e:GetHandler()) end - local g=Duel.GetMatchingGroup(aux.TRUE,tp,0xe,0xe,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,g:GetCount(),0,0) -end -function c10485110.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(aux.TRUE,tp,0xe,0xe,e:GetHandler()) - Duel.SendtoGrave(g,REASON_EFFECT) -end diff --git a/script/c10489311.lua b/script/c10489311.lua deleted file mode 100644 index d5964d2d10..0000000000 --- a/script/c10489311.lua +++ /dev/null @@ -1,30 +0,0 @@ ---ヒーロー・メダル -function c10489311.initial_effect(c) - --draw - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(10489311,0)) - e1:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCondition(c10489311.drcon) - e1:SetTarget(c10489311.drtg) - e1:SetOperation(c10489311.drop) - c:RegisterEffect(e1) -end -function c10489311.drcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return bit.band(r,0x41)==0x41 and rp~=tp and c:GetPreviousControler()==tp - and c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousPosition(POS_FACEDOWN) -end -function c10489311.drtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c10489311.drop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.SendtoDeck(c,nil,2,REASON_EFFECT)~=0 and c:IsLocation(LOCATION_DECK) then - Duel.ShuffleDeck(tp) - Duel.Draw(tp,1,REASON_EFFECT) - end -end diff --git a/script/c1050186.lua b/script/c1050186.lua deleted file mode 100644 index 543884094d..0000000000 --- a/script/c1050186.lua +++ /dev/null @@ -1,34 +0,0 @@ ---星因士 ウヌク -function c1050186.initial_effect(c) - --tograve - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(1050186,0)) - e1:SetCategory(CATEGORY_TOGRAVE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e1:SetCountLimit(1,1050186) - e1:SetTarget(c1050186.target) - e1:SetOperation(c1050186.operation) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - c:RegisterEffect(e2) - local e3=e1:Clone() - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e3) -end -function c1050186.filter(c) - return c:IsSetCard(0x9c) and not c:IsCode(1050186) and c:IsAbleToGrave() -end -function c1050186.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c1050186.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) -end -function c1050186.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c1050186.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoGrave(g,REASON_EFFECT) - end -end diff --git a/script/c1050684.lua b/script/c1050684.lua deleted file mode 100644 index b7dbf04e62..0000000000 --- a/script/c1050684.lua +++ /dev/null @@ -1,26 +0,0 @@ ---スクラップ・エリア -function c1050684.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c1050684.target) - e1:SetOperation(c1050684.activate) - c:RegisterEffect(e1) -end -function c1050684.filter(c) - return c:IsSetCard(0x24) and c:IsType(TYPE_TUNER) and c:IsAbleToHand() -end -function c1050684.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c1050684.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c1050684.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c1050684.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c10509340.lua b/script/c10509340.lua deleted file mode 100644 index 2bc9485ea4..0000000000 --- a/script/c10509340.lua +++ /dev/null @@ -1,50 +0,0 @@ ---古代の機械獣 -function c10509340.initial_effect(c) - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - c:RegisterEffect(e1) - --disable - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_BATTLED) - e2:SetOperation(c10509340.disop) - c:RegisterEffect(e2) - --actlimit - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e3:SetCode(EVENT_ATTACK_ANNOUNCE) - e3:SetOperation(c10509340.atkop) - c:RegisterEffect(e3) -end -function c10509340.disop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local d=Duel.GetAttackTarget() - if d==c then d=Duel.GetAttacker() end - if not d or c:IsStatus(STATUS_BATTLE_DESTROYED) or not d:IsStatus(STATUS_BATTLE_DESTROYED) then return end - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0x17a0000) - d:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+0x17a0000) - d:RegisterEffect(e2) -end -function c10509340.atkop(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EFFECT_CANNOT_ACTIVATE) - e1:SetTargetRange(0,1) - e1:SetValue(c10509340.aclimit) - e1:SetReset(RESET_PHASE+PHASE_DAMAGE) - Duel.RegisterEffect(e1,tp) -end -function c10509340.aclimit(e,re,tp) - return re:IsHasType(EFFECT_TYPE_ACTIVATE) -end diff --git a/script/c10526791.lua b/script/c10526791.lua deleted file mode 100644 index 5ca3883a30..0000000000 --- a/script/c10526791.lua +++ /dev/null @@ -1,19 +0,0 @@ ---E・HERO ワイルドジャギーマン -function c10526791.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcCode2(c,86188410,59793705,true,true) - --spsummon condition - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(aux.fuslimit) - c:RegisterEffect(e1) - --attackall - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_ATTACK_ALL) - e2:SetValue(1) - c:RegisterEffect(e2) -end diff --git a/script/c10530913.lua b/script/c10530913.lua deleted file mode 100644 index ae5cdda692..0000000000 --- a/script/c10530913.lua +++ /dev/null @@ -1,87 +0,0 @@ ---森羅の賢樹 シャーマン -function c10530913.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(10530913,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c10530913.spcon) - e1:SetTarget(c10530913.sptg) - e1:SetOperation(c10530913.spop) - c:RegisterEffect(e1) - --deck check - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(10530913,1)) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetTarget(c10530913.target) - e2:SetOperation(c10530913.operation) - c:RegisterEffect(e2) - --tohand - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(10530913,2)) - e3:SetCategory(CATEGORY_TOHAND) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) - e3:SetCode(EVENT_TO_GRAVE) - e3:SetCondition(c10530913.thcon) - e3:SetTarget(c10530913.thtg) - e3:SetOperation(c10530913.thop) - c:RegisterEffect(e3) -end -function c10530913.cfilter(c) - return c:IsSetCard(0x90) and c:IsType(TYPE_MONSTER) -end -function c10530913.spcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c10530913.cfilter,1,nil) -end -function c10530913.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c10530913.spop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP) - end -end -function c10530913.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,1) end -end -function c10530913.operation(e,tp,eg,ep,ev,re,r,rp) - if not Duel.IsPlayerCanDiscardDeck(tp,1) then return end - Duel.ConfirmDecktop(tp,1) - local g=Duel.GetDecktopGroup(tp,1) - local tc=g:GetFirst() - if tc:IsRace(RACE_PLANT) then - Duel.DisableShuffleCheck() - Duel.SendtoGrave(g,REASON_EFFECT+REASON_REVEAL) - else - Duel.MoveSequence(tc,1) - end -end -function c10530913.thcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsPreviousLocation(LOCATION_DECK) and - (c:IsReason(REASON_REVEAL) or c:GetPreviousPosition()==POS_FACEUP_DEFENCE or Duel.IsPlayerAffectedByEffect(tp,EFFECT_REVERSE_DECK)) -end -function c10530913.thfilter(c) - return c:IsSetCard(0x90) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand() -end -function c10530913.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c10530913.thfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c10530913.thfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c10530913.thfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c10530913.thop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end diff --git a/script/c10532969.lua b/script/c10532969.lua deleted file mode 100644 index aab884e14a..0000000000 --- a/script/c10532969.lua +++ /dev/null @@ -1,33 +0,0 @@ ---エンシェント・シャーク ハイパー・メガロドン -function c10532969.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(10532969,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_BATTLE_DAMAGE) - e1:SetCondition(c10532969.condition) - e1:SetTarget(c10532969.target) - e1:SetOperation(c10532969.operation) - c:RegisterEffect(e1) -end -function c10532969.condition(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp -end -function c10532969.filter(c) - return c:IsDestructable() -end -function c10532969.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and c10532969.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c10532969.filter,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c10532969.filter,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c10532969.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c10537981.lua b/script/c10537981.lua deleted file mode 100644 index 19acb3b381..0000000000 --- a/script/c10537981.lua +++ /dev/null @@ -1,35 +0,0 @@ ---リターンソウル -function c10537981.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TODECK) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(TIMING_END_PHASE) - e1:SetCondition(c10537981.condition) - e1:SetTarget(c10537981.target) - e1:SetOperation(c10537981.activate) - c:RegisterEffect(e1) -end -function c10537981.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()==PHASE_END -end -function c10537981.filter(c,tid) - return c:IsReason(REASON_DESTROY) and c:IsType(TYPE_MONSTER) and c:GetTurnID()==tid - and c:IsAbleToDeck() -end -function c10537981.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and c10537981.filter(chkc,Duel.GetTurnCount()) end - if chk==0 then return Duel.IsExistingTarget(c10537981.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil,Duel.GetTurnCount()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectTarget(tp,c10537981.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,3,nil,Duel.GetTurnCount()) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0) -end -function c10537981.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local sg=g:Filter(Card.IsRelateToEffect,nil,e) - if sg:GetCount()>0 then - Duel.SendtoDeck(sg,nil,2,REASON_EFFECT) - end -end diff --git a/script/c10560119.lua b/script/c10560119.lua deleted file mode 100644 index 4ec41974ea..0000000000 --- a/script/c10560119.lua +++ /dev/null @@ -1,49 +0,0 @@ ---フィッシュボーグ-ドクター -function c10560119.initial_effect(c) - -- - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_SELF_DESTROY) - e1:SetCondition(c10560119.sdcon) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(10560119,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_GRAVE) - e2:SetCountLimit(1,10560119) - e2:SetCondition(c10560119.spcon) - e2:SetTarget(c10560119.sptg) - e2:SetOperation(c10560119.spop) - c:RegisterEffect(e2) -end -function c10560119.cfilter(c) - return c:IsFacedown() or not c:IsSetCard(0x96) -end -function c10560119.sdcon(e) - return Duel.IsExistingMatchingCard(c10560119.cfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) -end -function c10560119.spcon(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetFieldGroup(tp,LOCATION_MZONE,0) - return g:GetCount()>0 and not g:IsExists(c10560119.cfilter,1,nil) -end -function c10560119.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c10560119.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+0x47e0000) - e1:SetValue(LOCATION_REMOVED) - c:RegisterEffect(e1,true) - end -end diff --git a/script/c10591919.lua b/script/c10591919.lua deleted file mode 100644 index bb216e2831..0000000000 --- a/script/c10591919.lua +++ /dev/null @@ -1,56 +0,0 @@ ---D・スコープン -function c10591919.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(10591919,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c10591919.cona) - e1:SetTarget(c10591919.tga) - e1:SetOperation(c10591919.opa) - c:RegisterEffect(e1) - --level - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EFFECT_CHANGE_LEVEL) - e2:SetCondition(c10591919.cond) - e2:SetValue(4) - c:RegisterEffect(e2) -end -function c10591919.filter(c,e,tp) - return c:IsSetCard(0x26) and c:GetLevel()==4 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c10591919.cona(e,tp,eg,ep,ev,re,r,rp) - return not e:GetHandler():IsDisabled() and e:GetHandler():IsAttackPos() -end -function c10591919.tga(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c10591919.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c10591919.opa(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c10591919.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - local tc=g:GetFirst() - if not tc then return end - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetOperation(c10591919.desop) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e1:SetCountLimit(1) - tc:RegisterEffect(e1) -end -function c10591919.desop(e,tp,eg,ep,ev,re,r,rp) - Duel.Destroy(e:GetHandler(),REASON_EFFECT) -end -function c10591919.cond(e) - return e:GetHandler():IsDefencePos() -end diff --git a/script/c10613952.lua b/script/c10613952.lua deleted file mode 100644 index 0864f56c96..0000000000 --- a/script/c10613952.lua +++ /dev/null @@ -1,119 +0,0 @@ ---神聖騎士王アルトリウス -function c10613952.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0x107a),5,2) - c:EnableReviveLimit() - --equip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(10613952,0)) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(c10613952.condition) - e1:SetTarget(c10613952.target) - e1:SetOperation(c10613952.operation) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(10613952,1)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCost(c10613952.descost) - e2:SetTarget(c10613952.destg) - e2:SetOperation(c10613952.desop) - c:RegisterEffect(e2) - --spsummon - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(10613952,2)) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) - e3:SetCode(EVENT_TO_GRAVE) - e3:SetCondition(c10613952.spcon) - e3:SetTarget(c10613952.sptg) - e3:SetOperation(c10613952.spop) - c:RegisterEffect(e3) -end -function c10613952.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_XYZ -end -function c10613952.filter(c,e,tp,ec) - return c:IsSetCard(0x207a) and c:IsCanBeEffectTarget(e) and c:CheckUniqueOnField(tp) and c:CheckEquipTarget(ec) -end -function c10613952.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c10613952.filter(chkc,e,tp,e:GetHandler()) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingMatchingCard(c10613952.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp,e:GetHandler()) end - local ft=Duel.GetLocationCount(tp,LOCATION_SZONE) - local g=Duel.GetMatchingGroup(c10613952.filter,tp,LOCATION_GRAVE,0,nil,e,tp,e:GetHandler()) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local g1=g:Select(tp,1,1,nil) - g:Remove(Card.IsCode,nil,g1:GetFirst():GetCode()) - if ft>1 and g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(10613952,3)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local g2=g:Select(tp,1,1,nil) - g:Remove(Card.IsCode,nil,g2:GetFirst():GetCode()) - g1:Merge(g2) - if ft>2 and g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(10613952,3)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - g2=g:Select(tp,1,1,nil) - g1:Merge(g2) - end - end - Duel.SetTargetCard(g1) - Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g1,g1:GetCount(),0,0) -end -function c10613952.operation(e,tp,eg,ep,ev,re,r,rp) - local ft=Duel.GetLocationCount(tp,LOCATION_SZONE) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) - if ft0 - and Duel.IsExistingTarget(c10613952.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c10613952.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c10613952.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c10651797.lua b/script/c10651797.lua deleted file mode 100644 index d0127828f7..0000000000 --- a/script/c10651797.lua +++ /dev/null @@ -1,28 +0,0 @@ ---ツバメ返し -function c10651797.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_CHAINING) - e1:SetCondition(c10651797.condition) - e1:SetTarget(c10651797.target) - e1:SetOperation(c10651797.activate) - c:RegisterEffect(e1) -end -function c10651797.condition(e,tp,eg,ep,ev,re,r,rp) - return re:IsActiveType(TYPE_MONSTER) and re:GetCode()==EVENT_SPSUMMON_SUCCESS and Duel.IsChainNegatable(ev) -end -function c10651797.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) - end -end -function c10651797.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateActivation(ev) - if re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(eg,REASON_EFFECT) - end -end diff --git a/script/c10667321.lua b/script/c10667321.lua deleted file mode 100644 index 8d163f21e2..0000000000 --- a/script/c10667321.lua +++ /dev/null @@ -1,27 +0,0 @@ ---古のルール -function c10667321.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c10667321.target) - e1:SetOperation(c10667321.activate) - c:RegisterEffect(e1) -end -function c10667321.filter(c,e,tp) - return c:IsLevelAbove(5) and c:IsType(TYPE_NORMAL) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c10667321.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c10667321.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c10667321.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c10667321.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c10691144.lua b/script/c10691144.lua deleted file mode 100644 index 4e9b2b39a3..0000000000 --- a/script/c10691144.lua +++ /dev/null @@ -1,64 +0,0 @@ ---氷結界の鏡 -function c10691144.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetOperation(c10691144.activate) - c:RegisterEffect(e1) -end -function c10691144.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetFlagEffect(tp,10691144)~=0 then return end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetProperty(EFFECT_FLAG_DELAY) - e1:SetCode(EVENT_REMOVE) - e1:SetReset(RESET_PHASE+PHASE_END) - e1:SetCondition(c10691144.rmcon) - e1:SetOperation(c10691144.rmop) - Duel.RegisterEffect(e1,tp) - Duel.RegisterFlagEffect(tp,10691144,RESET_PHASE+PHASE_END,0,1) -end -function c10691144.rmcon(e,tp,eg,ep,ev,re,r,rp) - if not (re:GetOwnerPlayer()==1-tp and re:IsActiveType(TYPE_MONSTER) and re:IsActivated()) then - return false - end - local flag=0 - local tc=eg:GetFirst() - while tc do - local ploc=tc:GetPreviousLocation() - if tc:GetPreviousControler()==tp and bit.band(ploc,0x1e)~=0 then - flag=bit.bor(flag,ploc) - end - tc=eg:GetNext() - end - e:SetLabel(flag) - return flag~=0 -end -function c10691144.rmop(e,tp,eg,ep,ev,re,r,rp) - local g=Group.CreateGroup() - local flag=e:GetLabel() - if bit.band(flag,LOCATION_HAND)~=0 then - local rg=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_HAND,nil) - if rg:GetCount()>0 then - local ct=1 - if rg:GetCount()>1 then ct=Duel.SelectOption(tp,aux.Stringid(10691144,3),aux.Stringid(10691144,4))+1 end - g:Merge(rg:RandomSelect(tp,ct)) - end - end - if bit.band(flag,LOCATION_ONFIELD)~=0 then - local rg=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,nil) - if rg:GetCount()>0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - g:Merge(rg:Select(tp,1,2,nil)) - end - end - if bit.band(flag,LOCATION_GRAVE)~=0 then - local rg=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,nil) - if rg:GetCount()>0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - g:Merge(rg:Select(tp,1,2,nil)) - end - end - Duel.Remove(g,POS_FACEUP,REASON_EFFECT) -end diff --git a/script/c10712320.lua b/script/c10712320.lua deleted file mode 100644 index 752be289dd..0000000000 --- a/script/c10712320.lua +++ /dev/null @@ -1,45 +0,0 @@ ---ヴァイロン・スティグマ -function c10712320.initial_effect(c) - --equip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(10712320,0)) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_MZONE) - e1:SetTarget(c10712320.eqtg) - e1:SetOperation(c10712320.eqop) - c:RegisterEffect(e1) -end -function c10712320.filter1(c,tp) - return c:IsFaceup() and c:IsSetCard(0x30) and c:GetEquipTarget() - and Duel.IsExistingTarget(c10712320.filter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,c:GetEquipTarget(),c) -end -function c10712320.filter2(c,eqc) - return c:IsFaceup() and eqc:CheckEquipTarget(c) -end -function c10712320.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - if chk==0 then return Duel.IsExistingTarget(c10712320.filter1,tp,LOCATION_SZONE,0,1,nil,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - local g1=Duel.SelectTarget(tp,c10712320.filter1,tp,LOCATION_SZONE,0,1,1,nil,tp) - local eqc=g1:GetFirst() - e:SetLabelObject(eqc) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local g2=Duel.SelectTarget(tp,c10712320.filter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,eqc:GetEquipTarget(),eqc) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,g1,1,0,0) -end -function c10712320.eqop(e,tp,eg,ep,ev,re,r,rp) - local eqc=e:GetLabelObject() - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local tc=g:GetFirst() - if tc==eqc then tc=g:GetNext() end - if not eqc:IsRelateToEffect(e) then return end - if tc:IsFacedown() or not tc:IsRelateToEffect(e) then - Duel.SendtoGrave(eqc,REASON_EFFECT) - return - end - Duel.Equip(tp,eqc,tc) -end diff --git a/script/c10719350.lua b/script/c10719350.lua deleted file mode 100644 index 71698f40be..0000000000 --- a/script/c10719350.lua +++ /dev/null @@ -1,24 +0,0 @@ ---炎舞-「天枢」 -function c10719350.initial_effect(c) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --extra summon - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(LOCATION_HAND+LOCATION_MZONE,0) - e2:SetCode(EFFECT_EXTRA_SUMMON_COUNT) - e2:SetTarget(aux.TargetBoolFunction(Card.IsRace,RACE_BEASTWARRIOR)) - c:RegisterEffect(e2) - -- - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetRange(LOCATION_SZONE) - e3:SetTargetRange(LOCATION_MZONE,0) - e3:SetCode(EFFECT_UPDATE_ATTACK) - e3:SetTarget(aux.TargetBoolFunction(Card.IsRace,RACE_BEASTWARRIOR)) - e3:SetValue(100) - c:RegisterEffect(e3) -end diff --git a/script/c10736540.lua b/script/c10736540.lua deleted file mode 100644 index b50d1d32e0..0000000000 --- a/script/c10736540.lua +++ /dev/null @@ -1,87 +0,0 @@ ---湖の乙女ヴィヴィアン -function c10736540.initial_effect(c) - --synchro limit - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetValue(c10736540.synlimit) - c:RegisterEffect(e1) - --synchro material - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_TO_GRAVE_REDIRECT) - e2:SetValue(LOCATION_REMOVED) - e2:SetCondition(c10736540.rmcon) - c:RegisterEffect(e2) - --spsummon - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(10736540,0)) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_SUMMON_SUCCESS) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetTarget(c10736540.target) - e3:SetOperation(c10736540.operation) - c:RegisterEffect(e3) - --spsummon - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(10736540,1)) - e4:SetCategory(CATEGORY_SPECIAL_SUMMON) - e4:SetType(EFFECT_TYPE_IGNITION) - e4:SetProperty(EFFECT_FLAG_CARD_TARGET) - e4:SetRange(LOCATION_GRAVE) - e4:SetTarget(c10736540.sptg) - e4:SetOperation(c10736540.spop) - c:RegisterEffect(e4) -end -function c10736540.synlimit(e,c) - if not c then return false end - return not c:IsRace(RACE_WARRIOR) -end -function c10736540.rmcon(e) - return bit.band(e:GetHandler():GetReason(),REASON_MATERIAL+REASON_SYNCHRO)==REASON_MATERIAL+REASON_SYNCHRO -end -function c10736540.filter(c,e,tp) - return c:IsSetCard(0x107a) and c:IsType(TYPE_NORMAL) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c10736540.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c10736540.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c10736540.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c10736540.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c10736540.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end -function c10736540.spfilter(c) - return c:IsFaceup() and c:IsSetCard(0x107a) and c:GetLevel()==5 -end -function c10736540.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c10736540.spfilter(chkc) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) - and Duel.IsExistingTarget(c10736540.spfilter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(10736540,2)) - Duel.SelectTarget(tp,c10736540.spfilter,tp,LOCATION_MZONE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c10736540.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsFacedown() or not tc:IsRelateToEffect(e) or tc:IsImmuneToEffect(e) or tc:GetLevel()<2 then return end - local c=e:GetHandler() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_LEVEL) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(-1) - tc:RegisterEffect(e1) - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c1073952.lua b/script/c1073952.lua deleted file mode 100644 index b5a745b621..0000000000 --- a/script/c1073952.lua +++ /dev/null @@ -1,32 +0,0 @@ ---マジック・プランター -function c1073952.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c1073952.cost) - e1:SetTarget(c1073952.target) - e1:SetOperation(c1073952.activate) - c:RegisterEffect(e1) -end -function c1073952.filter(c) - return c:IsFaceup() and bit.band(c:GetType(),0x20004)==0x20004 and c:IsAbleToGraveAsCost() -end -function c1073952.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c1073952.filter,tp,LOCATION_ONFIELD,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c1073952.filter,tp,LOCATION_ONFIELD,0,1,1,nil) - Duel.SendtoGrave(g,REASON_COST) -end -function c1073952.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp,2) end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(2) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2) -end -function c1073952.activate(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end diff --git a/script/c10753491.lua b/script/c10753491.lua deleted file mode 100644 index 8593b2dfb5..0000000000 --- a/script/c10753491.lua +++ /dev/null @@ -1,73 +0,0 @@ ---森羅の神芽 スプラウト -function c10753491.initial_effect(c) - --deck check - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(10753491,0)) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetTarget(c10753491.target) - e1:SetOperation(c10753491.operation) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(10753491,2)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetCountLimit(1,10753491) - e2:SetCondition(c10753491.spcon) - e2:SetTarget(c10753491.sptg) - e2:SetOperation(c10753491.spop) - c:RegisterEffect(e2) -end -function c10753491.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,1) end -end -function c10753491.operation(e,tp,eg,ep,ev,re,r,rp) - if not Duel.IsPlayerCanDiscardDeck(tp,1) then return end - local ct=Duel.GetFieldGroupCount(tp,LOCATION_DECK,0) - if ct==0 then return end - local ac=1 - if ct>1 then - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(10753491,1)) - ac=Duel.AnnounceNumber(tp,1,2) - end - Duel.ConfirmDecktop(tp,ac) - local g=Duel.GetDecktopGroup(tp,ac) - local sg=g:Filter(Card.IsRace,nil,RACE_PLANT) - if sg:GetCount()>0 then - Duel.DisableShuffleCheck() - Duel.SendtoGrave(sg,REASON_EFFECT+REASON_REVEAL) - end - ac=ac-sg:GetCount() - if ac>0 then - Duel.SortDecktop(tp,tp,ac) - for i=1,ac do - local mg=Duel.GetDecktopGroup(tp,1) - Duel.MoveSequence(mg:GetFirst(),1) - end - end -end -function c10753491.spcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsPreviousLocation(LOCATION_DECK) and - (c:IsReason(REASON_REVEAL) or c:GetPreviousPosition()==POS_FACEUP_DEFENCE or Duel.IsPlayerAffectedByEffect(tp,EFFECT_REVERSE_DECK)) -end -function c10753491.filter(c,e,tp) - return c:GetLevel()==1 and c:IsRace(RACE_PLANT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c10753491.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c10753491.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c10753491.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c10753491.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c10755153.lua b/script/c10755153.lua deleted file mode 100644 index eb03c4a6a1..0000000000 --- a/script/c10755153.lua +++ /dev/null @@ -1,58 +0,0 @@ ---ガーディアン・シール -function c10755153.initial_effect(c) - --sum limit - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_SUMMON) - e1:SetCondition(c10755153.sumlimit) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_CANNOT_FLIP_SUMMON) - c:RegisterEffect(e2) - local e3=e1:Clone() - e3:SetCode(EFFECT_SPSUMMON_CONDITION) - c:RegisterEffect(e3) - --destroy - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(10755153,0)) - e4:SetCategory(CATEGORY_DESTROY) - e4:SetType(EFFECT_TYPE_IGNITION) - e4:SetRange(LOCATION_MZONE) - e4:SetProperty(EFFECT_FLAG_CARD_TARGET) - e4:SetCost(c10755153.descost) - e4:SetTarget(c10755153.destg) - e4:SetOperation(c10755153.desop) - c:RegisterEffect(e4) -end -function c10755153.cfilter(c) - return c:IsFaceup() and c:IsCode(95638658) -end -function c10755153.sumlimit(e) - return not Duel.IsExistingMatchingCard(c10755153.cfilter,e:GetHandlerPlayer(),LOCATION_ONFIELD,0,1,nil) -end -function c10755153.costfilter(c,ec) - return c:IsFaceup() and c:GetEquipTarget()==ec and c:IsAbleToGraveAsCost() -end -function c10755153.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c10755153.costfilter,tp,LOCATION_SZONE,0,1,nil,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c10755153.costfilter,tp,LOCATION_SZONE,0,1,1,nil,e:GetHandler()) - Duel.SendtoGrave(g,REASON_COST) -end -function c10755153.desfilter(c) - return c:IsDestructable() -end -function c10755153.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c10755153.desfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c10755153.desfilter,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c10755153.desfilter,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c10755153.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c10755984.lua b/script/c10755984.lua deleted file mode 100644 index 3603c84227..0000000000 --- a/script/c10755984.lua +++ /dev/null @@ -1,48 +0,0 @@ ---ダイガスタ・イグルス -function c10755984.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,nil,aux.NonTuner(Card.IsSetCard,0x10),1) - c:EnableReviveLimit() - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(10755984,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCondition(c10755984.condition) - e1:SetCost(c10755984.cost) - e1:SetTarget(c10755984.target) - e1:SetOperation(c10755984.operation) - c:RegisterEffect(e1) -end -function c10755984.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c10755984.costfilter(c) - return c:IsAttribute(ATTRIBUTE_WIND) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost() -end -function c10755984.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c10755984.costfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c10755984.costfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c10755984.filter(c) - return c:IsFacedown() and c:IsDestructable() -end -function c10755984.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and c10755984.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c10755984.filter,tp,0,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c10755984.filter,tp,0,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c10755984.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsFacedown() and tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c10759529.lua b/script/c10759529.lua deleted file mode 100644 index cac5ff9c9e..0000000000 --- a/script/c10759529.lua +++ /dev/null @@ -1,36 +0,0 @@ ---キッズ・ガード -function c10759529.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetCondition(c10759529.condition) - e1:SetCost(c10759529.cost) - e1:SetTarget(c10759529.target) - e1:SetOperation(c10759529.activate) - c:RegisterEffect(e1) -end -function c10759529.condition(e,tp,eg,ep,ev,re,r,rp) - return tp~=Duel.GetTurnPlayer() -end -function c10759529.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsCode,1,nil,32679370) end - local g=Duel.SelectReleaseGroup(tp,Card.IsCode,1,1,nil,32679370) - Duel.Release(g,REASON_COST) -end -function c10759529.filter(c) - return c:IsSetCard(0x3008) and c:IsAbleToHand() -end -function c10759529.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c10759529.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c10759529.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateAttack() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c10759529.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c10789972.lua b/script/c10789972.lua deleted file mode 100644 index 2e9eced76c..0000000000 --- a/script/c10789972.lua +++ /dev/null @@ -1,36 +0,0 @@ ---覚醒戦士 クーフーリン -function c10789972.initial_effect(c) - c:EnableReviveLimit() - --atkup - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(10789972,0)) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCost(c10789972.cost) - e1:SetOperation(c10789972.operation) - c:RegisterEffect(e1) -end -function c10789972.cfilter(c) - return c:IsType(TYPE_NORMAL) and c:IsAbleToRemoveAsCost() -end -function c10789972.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c10789972.cfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c10789972.cfilter,tp,LOCATION_GRAVE,0,1,1,nil) - e:SetLabel(g:GetFirst():GetAttack()) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c10789972.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if e:GetLabel()~=0 and c:IsFaceup() and c:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetProperty(EFFECT_FLAG_COPY_INHERIT) - e1:SetValue(e:GetLabel()) - e1:SetReset(RESET_EVENT+0x1ff0000+RESET_PHASE+PHASE_STANDBY,2) - c:RegisterEffect(e1) - end -end diff --git a/script/c10802915.lua b/script/c10802915.lua deleted file mode 100644 index fdf67247af..0000000000 --- a/script/c10802915.lua +++ /dev/null @@ -1,46 +0,0 @@ ---魔界発現世行きデスガイド -function c10802915.initial_effect(c) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(10802915,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_SUMMON_SUCCESS) - e2:SetTarget(c10802915.sptg) - e2:SetOperation(c10802915.spop) - c:RegisterEffect(e2) -end -function c10802915.filter(c,e,tp) - return c:GetLevel()==3 and c:IsRace(RACE_FIEND) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c10802915.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c10802915.filter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) -end -function c10802915.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c10802915.filter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp) - local tc=g:GetFirst() - if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1,true) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e2,true) - local e3=Effect.CreateEffect(e:GetHandler()) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL) - e3:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e3:SetValue(1) - e3:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e3,true) - Duel.SpecialSummonComplete() - end -end diff --git a/script/c10809984.lua b/script/c10809984.lua deleted file mode 100644 index 0a978f5ae0..0000000000 --- a/script/c10809984.lua +++ /dev/null @@ -1,33 +0,0 @@ ---世紀の大泥棒 -function c10809984.initial_effect(c) - --handes - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(10809984,0)) - e1:SetCategory(CATEGORY_HANDES) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_BATTLE_DAMAGE) - e1:SetCondition(c10809984.drcon) - e1:SetTarget(c10809984.drtg) - e1:SetOperation(c10809984.drop) - c:RegisterEffect(e1) -end -function c10809984.drcon(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp -end -function c10809984.drtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,564) - local ac=Duel.AnnounceCard(tp) - e:SetLabel(ac) - e:GetHandler():SetHint(CHINT_CARD,ac) -end -function c10809984.drop(e,tp,eg,ep,ev,re,r,rp) - local ac=e:GetLabel() - local g=Duel.GetMatchingGroup(Card.IsCode,tp,0,LOCATION_HAND,nil,ac) - local hg=Duel.GetFieldGroup(tp,0,LOCATION_HAND) - Duel.ConfirmCards(tp,hg) - if g:GetCount()>0 then - Duel.SendtoGrave(g,REASON_EFFECT+REASON_DISCARD) - end - Duel.ShuffleHand(1-tp) -end diff --git a/script/c10817524.lua b/script/c10817524.lua deleted file mode 100644 index 2911909689..0000000000 --- a/script/c10817524.lua +++ /dev/null @@ -1,34 +0,0 @@ ---始祖竜ワイアーム -function c10817524.initial_effect(c) - c:SetUniqueOnField(1,0,10817524) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcFunRep(c,aux.FilterBoolFunction(Card.IsType,TYPE_NORMAL),2,false) - --spsummon condition - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(aux.fuslimit) - c:RegisterEffect(e1) - --indes - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e2:SetValue(c10817524.indval) - c:RegisterEffect(e2) - --immune - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e3:SetRange(LOCATION_MZONE) - e3:SetCode(EFFECT_IMMUNE_EFFECT) - e3:SetValue(c10817524.efilter) - c:RegisterEffect(e3) -end -function c10817524.indval(e,c) - return not c:IsType(TYPE_NORMAL) -end -function c10817524.efilter(e,te) - return te:IsActiveType(TYPE_MONSTER) and te:GetOwner()~=e:GetOwner() -end diff --git a/script/c1082946.lua b/script/c1082946.lua deleted file mode 100644 index 8acbfed34d..0000000000 --- a/script/c1082946.lua +++ /dev/null @@ -1,24 +0,0 @@ ---運命の火時計 -function c1082946.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c1082946.target) - e1:SetOperation(c1082946.activate) - c:RegisterEffect(e1) -end -function c1082946.filter(c) - return c:GetFlagEffect(1082946)~=0 -end -function c1082946.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c1082946.filter,tp,0x3f,0x3f,1,nil) end -end -function c1082946.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(1082946,0)) - local g=Duel.SelectMatchingCard(tp,c1082946.filter,tp,0x3f,0x3f,1,1,nil) - local tc=g:GetFirst() - local turne=tc[tc] - local op=turne:GetOperation() - op(turne,turne:GetOwnerPlayer(),nil,0,0,0,0,0) -end diff --git a/script/c10860121.lua b/script/c10860121.lua deleted file mode 100644 index f8372c3c6b..0000000000 --- a/script/c10860121.lua +++ /dev/null @@ -1,44 +0,0 @@ ---武神器-イオツミ -function c10860121.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(10860121,1)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e1:SetRange(LOCATION_HAND) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCountLimit(1,10860121) - e1:SetCondition(c10860121.condition) - e1:SetCost(c10860121.cost) - e1:SetTarget(c10860121.target) - e1:SetOperation(c10860121.operation) - c:RegisterEffect(e1) -end -function c10860121.cfilter(c,tp) - return c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_MZONE) - and c:IsSetCard(0x88) and c:IsRace(RACE_BEASTWARRIOR) and c:IsReason(REASON_BATTLE) -end -function c10860121.condition(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c10860121.cfilter,1,nil,tp) -end -function c10860121.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end -function c10860121.filter(c,e,tp) - return c:IsSetCard(0x88) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c10860121.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c10860121.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,LOCATION_DECK) -end -function c10860121.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c10860121.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c10875327.lua b/script/c10875327.lua deleted file mode 100644 index f53b35587b..0000000000 --- a/script/c10875327.lua +++ /dev/null @@ -1,66 +0,0 @@ ---地縛神 Aslla piscu -function c10875327.initial_effect(c) - c:SetUniqueOnField(1,1,10000000) - -- - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e4:SetRange(LOCATION_MZONE) - e4:SetCode(EFFECT_SELF_DESTROY) - e4:SetCondition(c10875327.sdcon) - c:RegisterEffect(e4) - --battle target - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_SINGLE) - e5:SetCode(EFFECT_CANNOT_BE_BATTLE_TARGET) - e5:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e5:SetRange(LOCATION_MZONE) - e5:SetValue(aux.imval1) - c:RegisterEffect(e5) - --direct atk - local e6=Effect.CreateEffect(c) - e6:SetType(EFFECT_TYPE_SINGLE) - e6:SetCode(EFFECT_DIRECT_ATTACK) - c:RegisterEffect(e6) - --destroy - local e7=Effect.CreateEffect(c) - e7:SetDescription(aux.Stringid(10875327,0)) - e7:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE) - e7:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e7:SetCode(EVENT_LEAVE_FIELD) - e7:SetCondition(c10875327.descon) - e7:SetTarget(c10875327.destg) - e7:SetOperation(c10875327.desop) - c:RegisterEffect(e7) -end -function c10875327.sdcon(e) - local c=e:GetHandler() - if c:IsStatus(STATUS_BATTLE_DESTROYED) then return false end - local f1=Duel.GetFieldCard(0,LOCATION_SZONE,5) - local f2=Duel.GetFieldCard(1,LOCATION_SZONE,5) - return ((f1==nil or not f1:IsFaceup()) and (f2==nil or not f2:IsFaceup())) -end -function c10875327.descon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsPreviousPosition(POS_FACEUP) and not c:IsLocation(LOCATION_DECK) - and (not re or re:GetHandler()~=c) -end -function c10875327.desfilter(c) - return c:IsFaceup() and c:IsDestructable() -end -function c10875327.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local g=Duel.GetMatchingGroup(c10875327.desfilter,tp,0,LOCATION_MZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) - if g:GetCount()~=0 then - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,g:GetCount()*800) - end -end -function c10875327.desop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c10875327.desfilter,tp,0,LOCATION_MZONE,nil) - local ct=Duel.Destroy(g,REASON_EFFECT) - if ct~=0 then - Duel.BreakEffect() - Duel.Damage(1-tp,ct*800,REASON_EFFECT) - end -end diff --git a/script/c10920352.lua b/script/c10920352.lua deleted file mode 100644 index 7dba6f94fe..0000000000 --- a/script/c10920352.lua +++ /dev/null @@ -1,19 +0,0 @@ ---M・HERO ヴェイパー -function c10920352.initial_effect(c) - c:EnableReviveLimit() - --spsummon condition - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(aux.FALSE) - c:RegisterEffect(e1) - --indes - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - e2:SetValue(1) - c:RegisterEffect(e2) -end diff --git a/script/c10925955.lua b/script/c10925955.lua deleted file mode 100644 index e1bbb98daf..0000000000 --- a/script/c10925955.lua +++ /dev/null @@ -1,57 +0,0 @@ ---儀水鏡との交信 -function c10925955.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c10925955.condition) - e1:SetTarget(c10925955.target) - e1:SetOperation(c10925955.activate) - c:RegisterEffect(e1) -end -function c10925955.cfilter(c,rit) - return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_WATER) and (not rit or c:IsType(TYPE_RITUAL)) -end -function c10925955.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c10925955.cfilter,tp,LOCATION_MZONE,0,1,nil) -end -function c10925955.filter(c) - return c:IsFacedown() and c:GetSequence()~=5 -end -function c10925955.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>1 - or Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)>1 - or Duel.IsExistingMatchingCard(c10925955.filter,tp,0,LOCATION_SZONE,1,nil) end - local sel=0 - local ac=0 - if Duel.IsExistingMatchingCard(c10925955.filter,tp,0,LOCATION_SZONE,1,nil) then sel=sel+1 end - if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>1 or Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)>1 then sel=sel+2 end - if sel==1 then - ac=Duel.SelectOption(tp,aux.Stringid(10925955,0)) - elseif sel==2 then - ac=Duel.SelectOption(tp,aux.Stringid(10925955,1))+1 - elseif Duel.IsExistingMatchingCard(c10925955.cfilter,tp,LOCATION_MZONE,0,1,nil,true) then - ac=Duel.SelectOption(tp,aux.Stringid(10925955,0),aux.Stringid(10925955,1),aux.Stringid(10925955,2)) - else - ac=Duel.SelectOption(tp,aux.Stringid(10925955,0),aux.Stringid(10925955,1)) - end - e:SetLabel(ac) -end -function c10925955.activate(e,tp,eg,ep,ev,re,r,rp) - local ac=e:GetLabel() - if ac==0 or ac==2 then - local g=Duel.GetMatchingGroup(c10925955.filter,tp,0,LOCATION_SZONE,nil) - Duel.ConfirmCards(tp,g) - end - if ac==1 or ac==2 then - if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>1 and Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)>1 then - local st=Duel.SelectOption(tp,aux.Stringid(10925955,3),aux.Stringid(10925955,4)) - if st==0 then Duel.SortDecktop(tp,tp,2) - else Duel.SortDecktop(tp,1-tp,2) end - elseif Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>1 then - Duel.SortDecktop(tp,tp,2) - elseif Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)>1 then - Duel.SortDecktop(tp,1-tp,2) - end - end -end diff --git a/script/c10960419.lua b/script/c10960419.lua deleted file mode 100644 index e771c94500..0000000000 --- a/script/c10960419.lua +++ /dev/null @@ -1,127 +0,0 @@ ---タイムマジック・ハンマー -function c10960419.initial_effect(c) - c:EnableReviveLimit() - --spsummon condition - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - c:RegisterEffect(e1) - --equip - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_EQUIP) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetTarget(c10960419.eqtg) - e2:SetOperation(c10960419.eqop) - c:RegisterEffect(e2) -end -c10960419.material_race=RACE_SPELLCASTER -function c10960419.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() and chkc~=e:GetHandler() end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,e:GetHandler()) -end -function c10960419.eqop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if not tc then return end - local c=e:GetHandler() - if not c:IsRelateToEffect(e) or c:IsLocation(LOCATION_SZONE) or c:IsFacedown() then return end - if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or tc:IsFacedown() or not tc:IsRelateToEffect(e) then - Duel.SendtoGrave(c,REASON_EFFECT) - return - end - Duel.Equip(tp,c,tc) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetValue(c10960419.eqlimit) - e1:SetLabelObject(tc) - e1:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e1) - --remove - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_REMOVE+CATEGORY_DICE) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_BATTLE_START) - e2:SetRange(LOCATION_SZONE) - e2:SetCondition(c10960419.rmcon) - e2:SetTarget(c10960419.rmtg) - e2:SetOperation(c10960419.rmop) - e2:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e2) -end -function c10960419.eqlimit(e,c) - return c==e:GetLabelObject() -end -function c10960419.rmcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetEquipTarget() -end -function c10960419.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) - local ec=e:GetHandler():GetEquipTarget() - local tc=ec:GetBattleTarget() - if chk==0 then return tc and tc:IsAbleToRemove() end - Duel.SetOperationInfo(0,CATEGORY_REMOVE,tc,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_DICE,nil,0,tp,1) -end -function c10960419.rmop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local ec=e:GetHandler():GetEquipTarget() - local tc=ec:GetBattleTarget() - if tc:IsRelateToBattle() then - local ct=Duel.TossDice(tp,1) - if Duel.Remove(tc,0,REASON_EFFECT+REASON_TEMPORARY)~=0 then - tc:SetTurnCounter(0) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE_START+PHASE_DRAW) - e1:SetReset(RESET_PHASE+RESET_STANDBY,ct) - e1:SetLabel(ct) - e1:SetLabelObject(tc) - e1:SetCountLimit(1) - e1:SetCondition(c10960419.turncon) - e1:SetOperation(c10960419.turnop) - Duel.RegisterEffect(e1,tp) - local e2=e1:Clone() - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) - e2:SetCondition(c10960419.retcon) - e2:SetOperation(c10960419.retop) - Duel.RegisterEffect(e2,tp) - tc:RegisterFlagEffect(1082946,RESET_PHASE+RESET_STANDBY,0,ct) - local mt=_G["c"..tc:GetCode()] - mt[tc]=e1 - end - end -end -function c10960419.turncon(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetLabelObject() - return tc:GetFlagEffect(1082946)~=0 -end -function c10960419.turnop(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetLabelObject() - local ct=tc:GetTurnCounter() - ct=ct+1 - tc:SetTurnCounter(ct) - if ct>e:GetLabel() then - tc:ResetFlagEffect(1082946) - e:Reset() - end -end -function c10960419.retcon(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetLabelObject() - local ct=tc:GetTurnCounter() - if ct==e:GetLabel() then - return true - end - if ct>e:GetLabel() then - e:Reset() - end - return false -end -function c10960419.retop(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetLabelObject() - Duel.ReturnToField(tc) -end diff --git a/script/c10963799.lua b/script/c10963799.lua deleted file mode 100644 index 9a686d6c2e..0000000000 --- a/script/c10963799.lua +++ /dev/null @@ -1,15 +0,0 @@ ---豪雨の結界像 -function c10963799.initial_effect(c) - --disable spsummon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetTargetRange(1,1) - e1:SetTarget(c10963799.sumlimit) - c:RegisterEffect(e1) -end -function c10963799.sumlimit(e,c,sump,sumtype,sumpos,targetp) - return c:GetAttribute()~=ATTRIBUTE_WATER -end diff --git a/script/c10979723.lua b/script/c10979723.lua deleted file mode 100644 index 6f1e4c76f4..0000000000 --- a/script/c10979723.lua +++ /dev/null @@ -1,29 +0,0 @@ ---アマゾネスペット虎 -function c10979723.initial_effect(c) - c:SetUniqueOnField(1,0,10979723) - --atkup - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetRange(LOCATION_MZONE) - e1:SetValue(c10979723.val) - c:RegisterEffect(e1) - --at limit - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetRange(LOCATION_MZONE) - e2:SetTargetRange(0,LOCATION_MZONE) - e2:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET) - e2:SetValue(c10979723.atlimit) - c:RegisterEffect(e2) -end -function c10979723.val(e,c) - return Duel.GetMatchingGroupCount(c10979723.filter,c:GetControler(),LOCATION_MZONE,0,nil)*400 -end -function c10979723.filter(c) - return c:IsFaceup() and c:IsSetCard(0x4) -end -function c10979723.atlimit(e,c) - return c:IsFaceup() and c:IsSetCard(0x4) and c~=e:GetHandler() -end diff --git a/script/c11012887.lua b/script/c11012887.lua deleted file mode 100644 index 359f5247ec..0000000000 --- a/script/c11012887.lua +++ /dev/null @@ -1,34 +0,0 @@ ---ジュラック・グアイバ -function c11012887.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(11012887,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_BATTLE_DESTROYING) - e1:SetCondition(aux.bdocon) - e1:SetTarget(c11012887.target) - e1:SetOperation(c11012887.operation) - c:RegisterEffect(e1) -end -function c11012887.filter(c,e,tp) - return c:IsSetCard(0x22) and c:IsAttackBelow(1700) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c11012887.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c11012887.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c11012887.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c11012887.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - local tc=g:GetFirst() - if tc and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)~=0 then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - end -end diff --git a/script/c11021521.lua b/script/c11021521.lua deleted file mode 100644 index 312214cfa4..0000000000 --- a/script/c11021521.lua +++ /dev/null @@ -1,30 +0,0 @@ ---ネコマネキング -function c11021521.initial_effect(c) - --end turn - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(11021521,0)) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCondition(c11021521.condition) - e1:SetOperation(c11021521.operation) - c:RegisterEffect(e1) -end -function c11021521.condition(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return Duel.GetTurnPlayer()~=tp and c:GetPreviousControler()==tp - and c:IsReason(REASON_EFFECT) and c:GetReasonPlayer()==1-tp -end -function c11021521.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.SkipPhase(1-tp,PHASE_DRAW,RESET_PHASE+PHASE_END,1) - Duel.SkipPhase(1-tp,PHASE_STANDBY,RESET_PHASE+PHASE_END,1) - Duel.SkipPhase(1-tp,PHASE_MAIN1,RESET_PHASE+PHASE_END,1) - Duel.SkipPhase(1-tp,PHASE_BATTLE,RESET_PHASE+PHASE_END,1,1) - Duel.SkipPhase(1-tp,PHASE_MAIN2,RESET_PHASE+PHASE_END,1) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_BP) - e1:SetTargetRange(0,1) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) -end diff --git a/script/c1102515.lua b/script/c1102515.lua deleted file mode 100644 index fda6989f32..0000000000 --- a/script/c1102515.lua +++ /dev/null @@ -1,31 +0,0 @@ ---暗黒のミミック LV3 -function c1102515.initial_effect(c) - --draw - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(1102515,0)) - e1:SetCategory(CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetCondition(c1102515.condition) - e1:SetTarget(c1102515.target) - e1:SetOperation(c1102515.operation) - c:RegisterEffect(e1) -end -c1102515.lvdncount=1 -c1102515.lvdn={74713516} -function c1102515.condition(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+1 then e:SetLabel(2) - else e:SetLabel(1) end - return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) -end -function c1102515.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(e:GetLabel()) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,e:GetLabel()) -end -function c1102515.operation(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end diff --git a/script/c11039171.lua b/script/c11039171.lua deleted file mode 100644 index bcc0f95870..0000000000 --- a/script/c11039171.lua +++ /dev/null @@ -1,55 +0,0 @@ ---デストーイ・シザー・ウルフ -function c11039171.initial_effect(c) - --fusion material - c:EnableReviveLimit() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_FUSION_MATERIAL) - e1:SetCondition(c11039171.fscon) - e1:SetOperation(c11039171.fsop) - c:RegisterEffect(e1) - --spsummon condition - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e2:SetCode(EFFECT_SPSUMMON_CONDITION) - e2:SetValue(c11039171.splimit) - c:RegisterEffect(e2) - --multi - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - e3:SetOperation(c11039171.atkop) - c:RegisterEffect(e3) -end -c11039171.material_count=1 -c11039171.material={30068120} -function c11039171.splimit(e,se,sp,st) - return bit.band(st,SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION -end -function c11039171.mfilter(c,mg) - return c:IsCode(30068120) and mg:IsExists(Card.IsSetCard,1,c,0xa9) -end -function c11039171.fscon(e,mg,gc) - if mg==nil then return false end - if gc then return false end - return mg:IsExists(c11039171.mfilter,1,nil,mg) -end -function c11039171.fsop(e,tp,eg,ep,ev,re,r,rp,gc) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL) - local g1=eg:FilterSelect(tp,c11039171.mfilter,1,1,nil,eg) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL) - local g2=eg:FilterSelect(tp,Card.IsSetCard,1,63,g1:GetFirst(),0xa9) - g1:Merge(g2) - Duel.SetFusionMaterial(g1) -end -function c11039171.atkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_EXTRA_ATTACK) - e1:SetValue(c:GetMaterialCount()-1) - e1:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e1) -end diff --git a/script/c11047543.lua b/script/c11047543.lua deleted file mode 100644 index 3471c1f1f2..0000000000 --- a/script/c11047543.lua +++ /dev/null @@ -1,50 +0,0 @@ ---サイコ・フィール・ゾーン -function c11047543.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(11047543,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOGRAVE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c11047543.target) - e1:SetOperation(c11047543.operation) - c:RegisterEffect(e1) -end -function c11047543.filter1(c,e,tp) - return c:IsFaceup() and c:IsRace(RACE_PSYCHO) and c:IsType(TYPE_TUNER) - and Duel.IsExistingTarget(c11047543.filter2,tp,LOCATION_REMOVED,0,1,nil,e,tp,c:GetLevel()) -end -function c11047543.filter2(c,e,tp,lv) - local clv=c:GetLevel() - return clv>0 and c:IsFaceup() and c:IsRace(RACE_PSYCHO) and not c:IsType(TYPE_TUNER) - and Duel.IsExistingMatchingCard(c11047543.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,lv+clv) -end -function c11047543.spfilter(c,e,tp,lv) - return c:IsRace(RACE_PSYCHO) and c:IsType(TYPE_SYNCHRO) and c:GetLevel()==lv and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c11047543.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c11047543.filter1,tp,LOCATION_REMOVED,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g1=Duel.SelectTarget(tp,c11047543.filter1,tp,LOCATION_REMOVED,0,1,1,nil,e,tp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g2=Duel.SelectTarget(tp,c11047543.filter2,tp,LOCATION_REMOVED,0,1,1,nil,e,tp,g1:GetFirst():GetLevel()) - g1:Merge(g2) - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g1,2,0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function c11047543.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local tc1=g:GetFirst() - local tc2=g:GetNext() - if not tc1:IsRelateToEffect(e) or not tc2:IsRelateToEffect(e) then return end - local sg=Duel.GetMatchingGroup(c11047543.spfilter,tp,LOCATION_EXTRA,0,nil,e,tp,tc1:GetLevel()+tc2:GetLevel()) - if sg:GetCount()==0 then return end - Duel.SendtoGrave(g,REASON_EFFECT+REASON_RETURN) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local ssg=sg:Select(tp,1,1,nil) - Duel.SpecialSummon(ssg,0,tp,tp,false,false,POS_FACEUP_DEFENCE) -end diff --git a/script/c11052544.lua b/script/c11052544.lua deleted file mode 100644 index 1cb3f494eb..0000000000 --- a/script/c11052544.lua +++ /dev/null @@ -1,38 +0,0 @@ ---セイバー・スラッシュ -function c11052544.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c11052544.target) - e1:SetOperation(c11052544.activate) - c:RegisterEffect(e1) -end -function c11052544.filter(c) - return c:IsFaceup() and c:IsDestructable() -end -function c11052544.cfilter(c) - return c:IsFaceup() and c:IsAttackPos() and c:IsSetCard(0x100d) -end -function c11052544.target(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then - local ct=Duel.GetMatchingGroupCount(c11052544.cfilter,tp,LOCATION_MZONE,0,nil) - e:SetLabel(ct) - return Duel.IsExistingMatchingCard(c11052544.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,ct,c) - end - local ct=e:GetLabel() - local sg=Duel.GetMatchingGroup(c11052544.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,c) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,ct,0,0) -end -function c11052544.activate(e,tp,eg,ep,ev,re,r,rp) - local ct=Duel.GetMatchingGroupCount(c11052544.cfilter,tp,LOCATION_MZONE,0,nil) - local g=Duel.GetMatchingGroup(c11052544.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler()) - if g:GetCount()>=ct then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local sg=g:Select(tp,ct,ct,nil) - Duel.HintSelection(sg) - Duel.Destroy(sg,REASON_EFFECT) - end -end diff --git a/script/c11082056.lua b/script/c11082056.lua deleted file mode 100644 index f654db9403..0000000000 --- a/script/c11082056.lua +++ /dev/null @@ -1,49 +0,0 @@ ---クリティウスの牙 -function c11082056.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,11082056+EFFECT_COUNT_CODE_OATH) - e1:SetTarget(c11082056.target) - e1:SetOperation(c11082056.activate) - c:RegisterEffect(e1) - --add code - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_ADD_CODE) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e2:SetValue(10000060) - c:RegisterEffect(e2) -end -function c11082056.tgfilter(c,e,tp) - return c:IsType(TYPE_TRAP) and Duel.IsExistingMatchingCard(c11082056.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c:GetCode()) -end -function c11082056.spfilter(c,e,tp,code) - return c:IsType(TYPE_FUSION) and c.material_trap and c:IsCanBeSpecialSummoned(e,0,tp,true,false) and code==c.material_trap -end -function c11082056.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c11082056.tgfilter,tp,LOCATION_HAND+LOCATION_SZONE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function c11082056.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL) - local g=Duel.SelectMatchingCard(tp,c11082056.tgfilter,tp,LOCATION_HAND+LOCATION_SZONE,0,1,1,nil,e,tp) - local tc=g:GetFirst() - if tc and not tc:IsImmuneToEffect(e) then - if tc:IsFacedown() then Duel.ConfirmCards(1-tp,tc) end - Duel.SendtoGrave(tc,REASON_EFFECT) - if not tc:IsLocation(LOCATION_GRAVE) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=Duel.SelectMatchingCard(tp,c11082056.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc:GetCode()) - local sc=sg:GetFirst() - if sc then - Duel.BreakEffect() - Duel.SpecialSummon(sc,0,tp,tp,true,false,POS_FACEUP) - sc:CompleteProcedure() - end - end -end diff --git a/script/c11102908.lua b/script/c11102908.lua deleted file mode 100644 index 4cd3522a7b..0000000000 --- a/script/c11102908.lua +++ /dev/null @@ -1,26 +0,0 @@ ---紫炎の霞城 -function c11102908.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --atk down - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_DAMAGE_CALCULATING) - e2:SetRange(LOCATION_SZONE) - e2:SetOperation(c11102908.atkup) - c:RegisterEffect(e2) -end -function c11102908.atkup(e,tp,eg,ep,ev,re,r,rp,chk) - local a=Duel.GetAttacker() - local d=Duel.GetAttackTarget() - if not d or not d:IsSetCard(0x3d) then return end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_PHASE+RESET_DAMAGE_CAL) - e1:SetValue(-500) - a:RegisterEffect(e1) -end diff --git a/script/c11109820.lua b/script/c11109820.lua deleted file mode 100644 index 2b4995d8ff..0000000000 --- a/script/c11109820.lua +++ /dev/null @@ -1,79 +0,0 @@ ---エクシーズ・ユニバース -function c11109820.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(11109820,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOGRAVE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c11109820.target) - e1:SetOperation(c11109820.operation) - c:RegisterEffect(e1) -end -function c11109820.filter1(c,e,tp,ft) - if c:IsControler(tp) then ft=ft+1 end - return c:IsFaceup() and c:IsType(TYPE_XYZ) - and Duel.IsExistingTarget(c11109820.filter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,c,e,tp,c:GetRank(),ft) -end -function c11109820.filter2(c,e,tp,rk,ft) - if c:IsControler(tp) then ft=ft+1 end - return c:IsFaceup() and c:IsType(TYPE_XYZ) - and ft>0 and Duel.IsExistingMatchingCard(c11109820.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,rk+c:GetRank()) -end -function c11109820.spfilter(c,e,tp,rk) - local crk=c:GetRank() - return (crk==rk or crk==rk-1) and not c:IsSetCard(0x48) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c11109820.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if chk==0 then return Duel.IsExistingTarget(c11109820.filter1,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,e,tp,ft) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g1=Duel.SelectTarget(tp,c11109820.filter1,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,e,tp,ft) - local tc=g1:GetFirst() - if tc:IsControler(tp) then ft=ft+1 end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g2=Duel.SelectTarget(tp,c11109820.filter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,tc,e,tp,tc:GetRank(),ft) - g1:Merge(g2) - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g1,2,0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function c11109820.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local tc1=g:GetFirst() - local tc2=g:GetNext() - if not tc1:IsRelateToEffect(e) or not tc2:IsRelateToEffect(e) then return end - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if tc1:IsControler(tp) then ft=ft+1 end - if tc2:IsControler(tp) then ft=ft+1 end - if ft<=0 then return end - Duel.SendtoGrave(g,REASON_EFFECT) - local og=Duel.GetOperatedGroup() - if og:FilterCount(Card.IsLocation,nil,LOCATION_GRAVE)<2 then return end - local sg=Duel.GetMatchingGroup(c11109820.spfilter,tp,LOCATION_EXTRA,0,nil,e,tp,tc1:GetRank()+tc2:GetRank()) - if sg:GetCount()==0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local ssg=sg:Select(tp,1,1,nil) - local sc=ssg:GetFirst() - if sc then - Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP) - if c:IsRelateToEffect(e) then - c:CancelToGrave() - Duel.Overlay(sc,Group.FromCards(c)) - end - end - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CHANGE_DAMAGE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetTargetRange(0,1) - e1:SetValue(0) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) - local e2=e1:Clone() - e2:SetCode(EFFECT_NO_EFFECT_DAMAGE) - e2:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e2,tp) -end diff --git a/script/c11125718.lua b/script/c11125718.lua deleted file mode 100644 index 1c46fb2109..0000000000 --- a/script/c11125718.lua +++ /dev/null @@ -1,8 +0,0 @@ ---ランサー・ドラゴニュート -function c11125718.initial_effect(c) - --pierce - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_PIERCE) - c:RegisterEffect(e1) -end diff --git a/script/c11136371.lua b/script/c11136371.lua deleted file mode 100644 index 84f3bef4ae..0000000000 --- a/script/c11136371.lua +++ /dev/null @@ -1,62 +0,0 @@ ---カウンター・ジェム -function c11136371.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c11136371.plcost) - e1:SetTarget(c11136371.pltg) - e1:SetOperation(c11136371.plop) - c:RegisterEffect(e1) -end -function c11136371.plfilter(c) - return c:GetSequence()<5 and c:IsAbleToGraveAsCost() -end -function c11136371.plcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c11136371.plfilter,tp,LOCATION_SZONE,0,1,e:GetHandler()) end - local g=Duel.GetMatchingGroup(c11136371.plfilter,tp,LOCATION_SZONE,0,e:GetHandler()) - Duel.SendtoGrave(g,REASON_COST) -end -function c11136371.pltg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_GRAVE,0,1,nil,0x1034) end - Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,nil,1,tp,LOCATION_GRAVE) -end -function c11136371.plop(e,tp,eg,ep,ev,re,r,rp) - local ft=Duel.GetLocationCount(tp,LOCATION_SZONE) - if ft<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) - local g=Duel.SelectMatchingCard(tp,Card.IsSetCard,tp,LOCATION_GRAVE,0,ft,ft,nil,0x1034) - if g:GetCount()>0 then - local tc=g:GetFirst() - while tc do - Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetCode(EFFECT_CHANGE_TYPE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fc0000) - e1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS) - tc:RegisterEffect(e1) - tc=g:GetNext() - end - Duel.RaiseEvent(g,47408488,e,0,tp,0,0) - end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetCountLimit(1) - e1:SetReset(RESET_PHASE+PHASE_END) - e1:SetCondition(c11136371.descon) - e1:SetOperation(c11136371.desop) - Duel.RegisterEffect(e1,tp) -end -function c11136371.desfilter(c) - return c:IsFaceup() and c:IsSetCard(0x1034) -end -function c11136371.descon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c11136371.desfilter,tp,LOCATION_ONFIELD,0,1,nil) -end -function c11136371.desop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c11136371.desfilter,tp,LOCATION_ONFIELD,0,nil) - Duel.Destroy(g,REASON_EFFECT) -end diff --git a/script/c11159464.lua b/script/c11159464.lua deleted file mode 100644 index 29e86a748d..0000000000 --- a/script/c11159464.lua +++ /dev/null @@ -1,40 +0,0 @@ ---ワーム・ホープ -function c11159464.initial_effect(c) - --flip - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FLIP+EFFECT_TYPE_SINGLE) - e1:SetCategory(CATEGORY_DRAW) - e1:SetTarget(c11159464.drtg) - e1:SetOperation(c11159464.drop) - c:RegisterEffect(e1) - --discard - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(11159464,0)) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetCondition(c11159464.tgcon) - e2:SetTarget(c11159464.tgtg) - e2:SetOperation(c11159464.tgop) - c:RegisterEffect(e2) -end -function c11159464.drtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - if Duel.GetCurrentPhase()==PHASE_DAMAGE and e:GetHandler()==Duel.GetAttackTarget() then - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) - end -end -function c11159464.drop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetCurrentPhase()==PHASE_DAMAGE and e:GetHandler()==Duel.GetAttackTarget() then - Duel.Draw(tp,1,REASON_EFFECT) - end -end -function c11159464.tgcon(e,tp,eg,ep,ev,re,r,rp) - return bit.band(e:GetHandler():GetPreviousLocation(),LOCATION_ONFIELD)~=0 -end -function c11159464.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_HAND) -end -function c11159464.tgop(e,tp,eg,ep,ev,re,r,rp) - Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT,nil) -end diff --git a/script/c11221418.lua b/script/c11221418.lua deleted file mode 100644 index 0e605409a6..0000000000 --- a/script/c11221418.lua +++ /dev/null @@ -1,120 +0,0 @@ ---武神隠 -function c11221418.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_REMOVE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c11221418.target) - e1:SetOperation(c11221418.activate) - c:RegisterEffect(e1) -end -function c11221418.filter(c) - return c:IsFaceup() and c:IsSetCard(0x88) and c:IsType(TYPE_XYZ) and c:IsAbleToRemove() - and Duel.IsExistingMatchingCard(Card.IsAbleToHand,0,LOCATION_MZONE,LOCATION_MZONE,1,c) -end -function c11221418.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c11221418.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c11221418.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,c11221418.filter,tp,LOCATION_MZONE,0,1,1,nil) - local tg=Duel.GetMatchingGroup(Card.IsAbleToHand,tp,LOCATION_MZONE,LOCATION_MZONE,g:GetFirst()) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,tg,tg:GetCount(),0,0) -end -function c11221418.activate(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)~=0 then - tc:RegisterFlagEffect(11221418,RESET_EVENT+0x1fe0000,0,0) - local g=Duel.GetMatchingGroup(Card.IsAbleToHand,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - if g:GetCount()==0 then return end - Duel.SendtoHand(g,nil,REASON_EFFECT) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE_START+PHASE_END) - e1:SetOperation(c11221418.countop) - if Duel.GetTurnPlayer()==tp and Duel.GetCurrentPhase()==PHASE_END then - e1:SetLabel(1) - else - e1:SetLabel(0) - end - e1:SetReset(RESET_PHASE+PHASE_END+RESET_SELF_TURN,2) - e1:SetLabelObject(tc) - Duel.RegisterEffect(e1,tp) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_CANNOT_SUMMON) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetTargetRange(1,1) - e2:SetCondition(c11221418.limcon) - e2:SetLabelObject(e1) - e2:SetReset(RESET_PHASE+PHASE_END+RESET_SELF_TURN,2) - Duel.RegisterEffect(e2,tp) - local e3=e2:Clone() - e3:SetCode(EFFECT_CANNOT_FLIP_SUMMON) - Duel.RegisterEffect(e3,tp) - local e4=e3:Clone() - e4:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - Duel.RegisterEffect(e4,tp) - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_FIELD) - e5:SetCode(EFFECT_CHANGE_DAMAGE) - e5:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e5:SetTargetRange(1,1) - e5:SetValue(0) - e5:SetLabelObject(e1) - e5:SetReset(RESET_PHASE+PHASE_END+RESET_SELF_TURN,2) - Duel.RegisterEffect(e5,tp) - local e6=e5:Clone() - e6:SetCode(EFFECT_NO_EFFECT_DAMAGE) - e6:SetReset(RESET_PHASE+PHASE_END+RESET_SELF_TURN,2) - Duel.RegisterEffect(e6,tp) - local e7=Effect.CreateEffect(c) - e7:SetCategory(CATEGORY_SPECIAL_SUMMON) - e7:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e7:SetCode(EVENT_PHASE+PHASE_END) - e7:SetProperty(EFFECT_FLAG_CARD_TARGET) - e7:SetCountLimit(1) - e7:SetCondition(c11221418.spcon) - e7:SetTarget(c11221418.sptg) - e7:SetOperation(c11221418.spop) - e7:SetLabelObject(e1) - e7:SetReset(RESET_PHASE+PHASE_END+RESET_SELF_TURN,2) - Duel.RegisterEffect(e7,tp) - end -end -function c11221418.limcon(e) - return e:GetLabelObject():GetLabel()<3 -end -function c11221418.countop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetTurnPlayer()~=tp then return end - local ct=e:GetLabel() - e:SetLabel(ct+1) -end -function c11221418.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp and e:GetLabelObject():GetLabel()==2 -end -function c11221418.mfilter(c) - return c:IsSetCard(0x88) and c:IsType(TYPE_MONSTER) -end -function c11221418.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c11221418.mfilter(chkc) end - local tc=e:GetLabelObject():GetLabelObject() - if chk==0 then return tc:GetFlagEffect(11221418)~=0 end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL) - local g=Duel.SelectTarget(tp,c11221418.mfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g,g:GetCount(),0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,tc,1,0,0) - e:GetLabelObject():SetLabel(3) -end -function c11221418.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetLabelObject():GetLabelObject() - local mc=Duel.GetFirstTarget() - if mc and tc:GetFlagEffect(11221418)~=0 and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)~=0 then - if mc:IsRelateToEffect(e) then - Duel.Overlay(tc,Group.FromCards(mc)) - end - end -end diff --git a/script/c11224103.lua b/script/c11224103.lua deleted file mode 100644 index eb6facb703..0000000000 --- a/script/c11224103.lua +++ /dev/null @@ -1,65 +0,0 @@ ---ホルスの黒炎竜 LV6 -function c11224103.initial_effect(c) - --battle destroy - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_BATTLE_DESTROYING) - e1:SetCondition(aux.bdcon) - e1:SetOperation(c11224103.bdop) - c:RegisterEffect(e1) - --immune spell - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_IMMUNE_EFFECT) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetValue(c11224103.efilter) - c:RegisterEffect(e2) - --special summon - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(11224103,0)) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetRange(LOCATION_MZONE) - e3:SetCode(EVENT_PHASE+PHASE_END) - e3:SetCondition(c11224103.spcon) - e3:SetCost(c11224103.spcost) - e3:SetTarget(c11224103.sptg) - e3:SetOperation(c11224103.spop) - c:RegisterEffect(e3) -end -c11224103.lvupcount=1 -c11224103.lvup={48229808} -c11224103.lvdncount=1 -c11224103.lvdn={75830094} -function c11224103.bdop(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():RegisterFlagEffect(11224103,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) -end -function c11224103.efilter(e,te) - return te:IsActiveType(TYPE_SPELL) -end -function c11224103.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetFlagEffect(11224103)>0 -end -function c11224103.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end -function c11224103.spfilter(c,e,tp) - return c:IsCode(48229808) and c:IsCanBeSpecialSummoned(e,0,tp,true,true) -end -function c11224103.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsExistingMatchingCard(c11224103.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) -end -function c11224103.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c11224103.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp) - local tc=g:GetFirst() - if tc then - Duel.SpecialSummon(tc,0,tp,tp,true,true,POS_FACEUP) - tc:CompleteProcedure() - end -end diff --git a/script/c11224934.lua b/script/c11224934.lua deleted file mode 100644 index a4c911b688..0000000000 --- a/script/c11224934.lua +++ /dev/null @@ -1,36 +0,0 @@ ---強化空間 -function c11224934.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetCondition(c11224934.condition) - e1:SetTarget(c11224934.target) - e1:SetOperation(c11224934.activate) - c:RegisterEffect(e1) -end -function c11224934.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end -function c11224934.filter(c) - return c:IsFaceup() and c:GetOverlayCount()~=0 -end -function c11224934.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c11224934.filter,tp,LOCATION_MZONE,0,1,nil) end -end -function c11224934.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c11224934.filter,tp,LOCATION_MZONE,0,nil) - local tc=g:GetFirst() - while tc do - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - e1:SetValue(tc:GetOverlayCount()*300) - tc:RegisterEffect(e1) - tc=g:GetNext() - end -end diff --git a/script/c11228035.lua b/script/c11228035.lua deleted file mode 100644 index e52329a2e2..0000000000 --- a/script/c11228035.lua +++ /dev/null @@ -1,49 +0,0 @@ ---エクシーズ・ソウル -function c11228035.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetCondition(c11228035.condition) - e1:SetTarget(c11228035.target) - e1:SetOperation(c11228035.activate) - c:RegisterEffect(e1) -end -function c11228035.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end -function c11228035.filter(c) - return c:IsType(TYPE_XYZ) -end -function c11228035.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and c11228035.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c11228035.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil) - and Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - Duel.SelectTarget(tp,c11228035.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil) -end -function c11228035.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil) - if g:GetCount()>0 and tc:IsRelateToEffect(e) then - local atk=tc:GetRank()*200 - local sc=g:GetFirst() - while sc do - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - e1:SetValue(atk) - sc:RegisterEffect(e1) - sc=g:GetNext() - end - if tc:IsAbleToDeck() and not tc:IsHasEffect(EFFECT_NECRO_VALLEY) - and Duel.SelectYesNo(tp,aux.Stringid(11228035,0)) then - Duel.BreakEffect() - Duel.SendtoDeck(tc,nil,2,REASON_EFFECT) - end - end -end diff --git a/script/c11232355.lua b/script/c11232355.lua deleted file mode 100644 index 90a583a0de..0000000000 --- a/script/c11232355.lua +++ /dev/null @@ -1,62 +0,0 @@ ---ディストラクター -function c11232355.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(11232355,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCost(c11232355.descost) - e1:SetTarget(c11232355.destg) - e1:SetOperation(c11232355.desop) - c:RegisterEffect(e1) - --self destroy - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(11232355,1)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_PHASE+PHASE_END) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCondition(c11232355.sdcon) - e2:SetTarget(c11232355.sdtg) - e2:SetOperation(c11232355.sdop) - c:RegisterEffect(e2) -end -function c11232355.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,1000) end - Duel.PayLPCost(tp,1000) -end -function c11232355.filter(c) - return c:IsFacedown() and c:IsDestructable() -end -function c11232355.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_SZONE) and chkc:IsControler(1-tp) and c11232355.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c11232355.filter,tp,0,LOCATION_SZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c11232355.filter,tp,0,LOCATION_SZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c11232355.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsFacedown() and tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end -function c11232355.cfilter(c) - return c:IsFaceup() and c:IsRace(RACE_PSYCHO) -end -function c11232355.sdcon(e,tp,eg,ep,ev,re,r,rp) - return not Duel.IsExistingMatchingCard(c11232355.cfilter,tp,LOCATION_MZONE,0,1,e:GetHandler()) -end -function c11232355.sdtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0) -end -function c11232355.sdop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFaceup() and c:IsRelateToEffect(e) then - Duel.Destroy(c,REASON_EFFECT) - end -end diff --git a/script/c11260714.lua b/script/c11260714.lua deleted file mode 100644 index 649d8668d2..0000000000 --- a/script/c11260714.lua +++ /dev/null @@ -1,34 +0,0 @@ ---堕天使スペルビア -function c11260714.initial_effect(c) - --spsum success - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(11260714,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(c11260714.spcon) - e1:SetTarget(c11260714.sptg) - e1:SetOperation(c11260714.spop) - c:RegisterEffect(e1) -end -function c11260714.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_GRAVE) -end -function c11260714.filter(c,e,sp) - return c:IsRace(RACE_FAIRY) and c:GetCode()~=11260714 and c:IsCanBeSpecialSummoned(e,0,sp,false,false) -end -function c11260714.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c11260714.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c11260714.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c11260714.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c11260714.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c11264180.lua b/script/c11264180.lua deleted file mode 100644 index 5c9aaf0712..0000000000 --- a/script/c11264180.lua +++ /dev/null @@ -1,51 +0,0 @@ ---TGX1-HL -function c11264180.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetCondition(c11264180.condition) - e1:SetTarget(c11264180.target) - e1:SetOperation(c11264180.activate) - c:RegisterEffect(e1) -end -function c11264180.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end -function c11264180.filter(c) - return c:IsFaceup() and c:IsSetCard(0x27) -end -function c11264180.dfilter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable() -end -function c11264180.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c11264180.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c11264180.filter,tp,LOCATION_MZONE,0,1,nil) - and Duel.IsExistingMatchingCard(c11264180.dfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c11264180.filter,tp,LOCATION_MZONE,0,1,1,nil) - local dg=Duel.GetMatchingGroup(c11264180.dfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,dg,1,0,0) -end -function c11264180.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if not tc:IsRelateToEffect(e) or tc:IsFacedown() then return end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(tc:GetAttack()/2) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_SET_DEFENCE_FINAL) - e2:SetReset(RESET_EVENT+0x1fe0000) - e2:SetValue(tc:GetDefence()/2) - tc:RegisterEffect(e2) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local dg=Duel.SelectMatchingCard(tp,c11264180.dfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,e:GetHandler()) - Duel.Destroy(dg,REASON_EFFECT) -end diff --git a/script/c1127737.lua b/script/c1127737.lua deleted file mode 100644 index b368e6c380..0000000000 --- a/script/c1127737.lua +++ /dev/null @@ -1,57 +0,0 @@ ---異次元の古戦場-サルガッソ -function c1127737.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --damage - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(1127737,0)) - e2:SetCategory(CATEGORY_DAMAGE) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetRange(LOCATION_SZONE) - e2:SetCondition(c1127737.damcon1) - e2:SetTarget(c1127737.damtg1) - e2:SetOperation(c1127737.damop1) - c:RegisterEffect(e2) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_PHASE+PHASE_END) - e2:SetRange(LOCATION_SZONE) - e2:SetCountLimit(1) - e2:SetCondition(c1127737.damcon2) - e2:SetOperation(c1127737.damop2) - c:RegisterEffect(e2) -end -function c1127737.damcon1(e,tp,eg,ep,ev,re,r,rp) - return eg:GetFirst():GetSummonType()==SUMMON_TYPE_XYZ -end -function c1127737.damtg1(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(eg:GetFirst():GetSummonPlayer()) - Duel.SetTargetParam(500) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,0,0,eg:GetFirst():GetSummonPlayer(),500) -end -function c1127737.damop1(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - if not Duel.IsPlayerAffectedByEffect(p,37511832) then - Duel.Damage(p,d,REASON_EFFECT) - end - end -end -function c1127737.cfilter(c) - return c:IsFaceup() and c:IsType(TYPE_XYZ) -end -function c1127737.damcon2(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c1127737.cfilter,Duel.GetTurnPlayer(),LOCATION_MZONE,0,1,nil) -end -function c1127737.damop2(e,tp,eg,ep,ev,re,r,rp) - local p=Duel.GetTurnPlayer() - if not Duel.IsPlayerAffectedByEffect(p,37511832) then - Duel.Hint(HINT_CARD,0,1127737) - Duel.Damage(p,500,REASON_EFFECT) - end -end diff --git a/script/c11287364.lua b/script/c11287364.lua deleted file mode 100644 index d1b3b15392..0000000000 --- a/script/c11287364.lua +++ /dev/null @@ -1,34 +0,0 @@ ---クイック・スパナイト -function c11287364.initial_effect(c) - --atk change - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(11287364,0)) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_BE_MATERIAL) - e1:SetCondition(c11287364.atkcon) - e1:SetTarget(c11287364.atktg) - e1:SetOperation(c11287364.atkop) - c:RegisterEffect(e1) -end -function c11287364.atkcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsLocation(LOCATION_GRAVE) and r==REASON_SYNCHRO -end -function c11287364.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsFaceup() end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil) -end -function c11287364.atkop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) and tc:IsFaceup() then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(-500) - tc:RegisterEffect(e1) - end -end diff --git a/script/c11324436.lua b/script/c11324436.lua deleted file mode 100644 index a6a4b5ad3a..0000000000 --- a/script/c11324436.lua +++ /dev/null @@ -1,27 +0,0 @@ ---エレクトリック・スネーク -function c11324436.initial_effect(c) - --draw - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(11324436,0)) - e1:SetCategory(CATEGORY_DRAW) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCondition(c11324436.drcon) - e1:SetTarget(c11324436.drtg) - e1:SetOperation(c11324436.drop) - c:RegisterEffect(e1) -end -function c11324436.drcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_HAND) and bit.band(r,0x4040)==0x4040 and rp==1-tp -end -function c11324436.drtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(2) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2) -end -function c11324436.drop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end diff --git a/script/c11366199.lua b/script/c11366199.lua deleted file mode 100644 index 98e9f4e1a6..0000000000 --- a/script/c11366199.lua +++ /dev/null @@ -1,81 +0,0 @@ ---ダーク・シムルグ -function c11366199.initial_effect(c) - --Attribute Dark - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetCode(EFFECT_ADD_ATTRIBUTE) - e1:SetRange(LOCATION_MZONE) - e1:SetValue(ATTRIBUTE_WIND) - c:RegisterEffect(e1) - --special summon(hand) - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(11366199,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_HAND) - e2:SetCost(c11366199.spcost1) - e2:SetTarget(c11366199.sptg) - e2:SetOperation(c11366199.spop) - c:RegisterEffect(e2) - --special summon(grave) - local e3=e2:Clone() - e3:SetRange(LOCATION_GRAVE) - e3:SetCost(c11366199.spcost2) - c:RegisterEffect(e3) - --cannot set - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_FIELD) - e4:SetCode(EFFECT_CANNOT_MSET) - e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e4:SetRange(LOCATION_MZONE) - e4:SetTargetRange(0,1) - e4:SetTarget(aux.TRUE) - c:RegisterEffect(e4) - local e5=e4:Clone() - e5:SetCode(EFFECT_CANNOT_SSET) - c:RegisterEffect(e5) - local e6=e4:Clone() - e6:SetCode(EFFECT_CANNOT_TURN_SET) - c:RegisterEffect(e6) - local e7=e4:Clone() - e7:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e7:SetTarget(c11366199.sumlimit) - c:RegisterEffect(e7) -end -function c11366199.sumlimit(e,c,sump,sumtype,sumpos,targetp) - return bit.band(sumpos,POS_FACEDOWN)>0 -end -function c11366199.spfilter(c,att) - return c:IsAttribute(att) and c:IsAbleToRemoveAsCost() -end -function c11366199.spcost1(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c11366199.spfilter,tp,LOCATION_GRAVE,0,1,nil,ATTRIBUTE_WIND) - and Duel.IsExistingMatchingCard(c11366199.spfilter,tp,LOCATION_GRAVE,0,1,nil,ATTRIBUTE_DARK) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g1=Duel.SelectMatchingCard(tp,c11366199.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,ATTRIBUTE_WIND) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g2=Duel.SelectMatchingCard(tp,c11366199.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,ATTRIBUTE_DARK) - g1:Merge(g2) - Duel.Remove(g1,POS_FACEUP,REASON_COST) -end -function c11366199.spcost2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c11366199.spfilter,tp,LOCATION_HAND,0,1,nil,ATTRIBUTE_WIND) - and Duel.IsExistingMatchingCard(c11366199.spfilter,tp,LOCATION_HAND,0,1,nil,ATTRIBUTE_DARK) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g1=Duel.SelectMatchingCard(tp,c11366199.spfilter,tp,LOCATION_HAND,0,1,1,nil,ATTRIBUTE_WIND) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g2=Duel.SelectMatchingCard(tp,c11366199.spfilter,tp,LOCATION_HAND,0,1,1,nil,ATTRIBUTE_DARK) - g1:Merge(g2) - Duel.Remove(g1,POS_FACEUP,REASON_COST) -end -function c11366199.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c11366199.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 or not c:IsRelateToEffect(e) then return end - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) -end diff --git a/script/c11373345.lua b/script/c11373345.lua deleted file mode 100644 index ab78ffbecc..0000000000 --- a/script/c11373345.lua +++ /dev/null @@ -1,42 +0,0 @@ ---無力の証明 -function c11373345.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,0x1c0) - e1:SetCondition(c11373345.condition) - e1:SetCost(c11373345.cost) - e1:SetTarget(c11373345.target) - e1:SetOperation(c11373345.activate) - c:RegisterEffect(e1) -end -function c11373345.cfilter(c) - return c:IsFaceup() and c:IsLevelAbove(7) -end -function c11373345.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c11373345.cfilter,tp,LOCATION_MZONE,0,1,nil) -end -function c11373345.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_ATTACK)==0 end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) - e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+RESET_END) - Duel.RegisterEffect(e1,tp) -end -function c11373345.filter(c) - return c:IsFaceup() and c:IsLevelBelow(5) and c:IsDestructable() -end -function c11373345.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c11373345.filter,tp,0,LOCATION_MZONE,1,nil) end - local sg=Duel.GetMatchingGroup(c11373345.filter,tp,0,LOCATION_MZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,sg:GetCount(),0,0) -end -function c11373345.activate(e,tp,eg,ep,ev,re,r,rp) - local sg=Duel.GetMatchingGroup(c11373345.filter,tp,0,LOCATION_MZONE,nil) - Duel.Destroy(sg,REASON_EFFECT) -end diff --git a/script/c11384280.lua b/script/c11384280.lua deleted file mode 100644 index c0d72d0f7d..0000000000 --- a/script/c11384280.lua +++ /dev/null @@ -1,29 +0,0 @@ ---キャノン・ソルジャー -function c11384280.initial_effect(c) - --damage - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(11384280,0)) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c11384280.cost) - e1:SetTarget(c11384280.target) - e1:SetOperation(c11384280.operation) - c:RegisterEffect(e1) -end -function c11384280.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,nil,1,nil) end - local sg=Duel.SelectReleaseGroup(tp,nil,1,1,nil) - Duel.Release(sg,REASON_COST) -end -function c11384280.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(500) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,500) -end -function c11384280.operation(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c11390349.lua b/script/c11390349.lua deleted file mode 100644 index e015c194af..0000000000 --- a/script/c11390349.lua +++ /dev/null @@ -1,49 +0,0 @@ ---ナチュル・フライトフライ -function c11390349.initial_effect(c) - --atk,def - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(0,LOCATION_MZONE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(c11390349.val) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_UPDATE_DEFENCE) - c:RegisterEffect(e2) - --control - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(11390349,0)) - e3:SetCategory(CATEGORY_CONTROL) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1) - e3:SetTarget(c11390349.ctltg) - e3:SetOperation(c11390349.ctlop) - c:RegisterEffect(e3) -end -function c11390349.vfilter(c) - return c:IsFaceup() and c:IsSetCard(0x2a) -end -function c11390349.val(e,c) - return Duel.GetMatchingGroupCount(c11390349.vfilter,e:GetOwnerPlayer(),LOCATION_MZONE,0,nil)*-300 -end -function c11390349.filter(c) - return c:IsFaceup() and c:GetDefence()==0 and c:IsControlerCanBeChanged() -end -function c11390349.ctltg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c11390349.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c11390349.filter,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) - local g=Duel.SelectTarget(tp,c11390349.filter,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0) -end -function c11390349.ctlop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:GetDefence()==0 and not Duel.GetControl(tc,tp,PHASE_END,1) then - if not tc:IsImmuneToEffect(e) and tc:IsAbleToChangeControler() then - Duel.Destroy(tc,REASON_EFFECT) - end - end -end diff --git a/script/c11398059.lua b/script/c11398059.lua deleted file mode 100644 index 37ffe40003..0000000000 --- a/script/c11398059.lua +++ /dev/null @@ -1,35 +0,0 @@ ---キングレムリン -function c11398059.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,4,2) - c:EnableReviveLimit() - --search - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(11398059,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c11398059.cost) - e1:SetTarget(c11398059.target) - e1:SetOperation(c11398059.operation) - c:RegisterEffect(e1) -end -function c11398059.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c11398059.filter(c) - return c:IsRace(RACE_REPTILE) and c:IsAbleToHand() -end -function c11398059.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c11398059.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c11398059.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c11398059.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c11411223.lua b/script/c11411223.lua deleted file mode 100644 index b64ec9f2db..0000000000 --- a/script/c11411223.lua +++ /dev/null @@ -1,36 +0,0 @@ ---No.10 白輝士イルミネーター -function c11411223.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,4,3) - c:EnableReviveLimit() - --attack up - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_DRAW) - e1:SetDescription(aux.Stringid(11411223,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c11411223.cost) - e1:SetTarget(c11411223.target) - e1:SetOperation(c11411223.operation) - c:RegisterEffect(e1) -end -c11411223.xyz_number=10 -function c11411223.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c11411223.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)>0 and Duel.IsPlayerCanDraw(tp,1) end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_HAND) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c11411223.operation(e,tp,eg,ep,ev,re,r,rp,chk) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_HAND,0,1,1,nil) - if g:GetCount()==0 then return end - Duel.SendtoGrave(g,REASON_EFFECT) - if g:GetFirst():IsLocation(LOCATION_GRAVE) then - Duel.Draw(tp,1,REASON_EFFECT) - end -end diff --git a/script/c11448373.lua b/script/c11448373.lua deleted file mode 100644 index e4c2af6578..0000000000 --- a/script/c11448373.lua +++ /dev/null @@ -1,15 +0,0 @@ ---グレイヴ・キーパー -function c11448373.initial_effect(c) - --todeck - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_TO_GRAVE_REDIRECT) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e1:SetTarget(c11448373.rmtarget) - e1:SetValue(LOCATION_DECKSHF) - c:RegisterEffect(e1) -end -function c11448373.rmtarget(e,c) - return c:IsReason(REASON_BATTLE) -end diff --git a/script/c11458071.lua b/script/c11458071.lua deleted file mode 100644 index 181cb7adaf..0000000000 --- a/script/c11458071.lua +++ /dev/null @@ -1,74 +0,0 @@ ---天魔神 エンライズ -function c11458071.initial_effect(c) - c:EnableReviveLimit() - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_SPSUMMON_PROC) - e2:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e2:SetRange(LOCATION_HAND) - e2:SetCondition(c11458071.spcon) - e2:SetOperation(c11458071.spop) - c:RegisterEffect(e2) - --remove - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(11458071,0)) - e3:SetCategory(CATEGORY_REMOVE) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetCountLimit(1) - e3:SetRange(LOCATION_MZONE) - e3:SetCost(c11458071.rmcost) - e3:SetTarget(c11458071.rmtg) - e3:SetOperation(c11458071.rmop) - c:RegisterEffect(e3) -end -function c11458071.spfilter(c,rac,att) - return c:IsRace(rac) and c:IsAttribute(att) and c:IsAbleToRemoveAsCost() -end -function c11458071.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c11458071.spfilter,tp,LOCATION_GRAVE,0,3,nil,RACE_FAIRY,ATTRIBUTE_LIGHT) - and Duel.IsExistingMatchingCard(c11458071.spfilter,tp,LOCATION_GRAVE,0,1,nil,RACE_FIEND,ATTRIBUTE_DARK) -end -function c11458071.spop(e,tp,eg,ep,ev,re,r,rp,c) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g1=Duel.SelectMatchingCard(tp,c11458071.spfilter,tp,LOCATION_GRAVE,0,3,3,nil,RACE_FAIRY,ATTRIBUTE_LIGHT) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g2=Duel.SelectMatchingCard(tp,c11458071.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,RACE_FIEND,ATTRIBUTE_DARK) - g1:Merge(g2) - Duel.Remove(g1,POS_FACEUP,REASON_COST) -end -function c11458071.rmcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():GetAttackAnnouncedCount()==0 end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_OATH) - e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e:GetHandler():RegisterEffect(e1,true) -end -function c11458071.tgfilter(c) - return c:IsFaceup() and c:IsAbleToRemove() -end -function c11458071.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c11458071.tgfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c11458071.tgfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,c11458071.tgfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) -end -function c11458071.rmop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) - end -end diff --git a/script/c11460577.lua b/script/c11460577.lua deleted file mode 100644 index 26b174bfbd..0000000000 --- a/script/c11460577.lua +++ /dev/null @@ -1,16 +0,0 @@ ---エトワール・サイバー -function c11460577.initial_effect(c) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetCondition(c11460577.condtion) - e1:SetValue(500) - c:RegisterEffect(e1) -end -function c11460577.condtion(e) - local ph=Duel.GetCurrentPhase() - return (ph==PHASE_DAMAGE or ph==PHASE_DAMAGE_CAL) - and Duel.GetAttacker()==e:GetHandler() and Duel.GetAttackTarget()==nil -end diff --git a/script/c11471117.lua b/script/c11471117.lua deleted file mode 100644 index 13936d1469..0000000000 --- a/script/c11471117.lua +++ /dev/null @@ -1,67 +0,0 @@ ---ライトイレイザー -function c11471117.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c11471117.target) - e1:SetOperation(c11471117.operation) - c:RegisterEffect(e1) - --Equip limit - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_EQUIP_LIMIT) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetValue(c11471117.eqlimit) - c:RegisterEffect(e2) - --remove - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(11471117,0)) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e3:SetCategory(CATEGORY_REMOVE) - e3:SetCode(EVENT_BATTLED) - e3:SetRange(LOCATION_SZONE) - e3:SetCondition(c11471117.rmcon) - e3:SetTarget(c11471117.rmtg) - e3:SetOperation(c11471117.rmop) - c:RegisterEffect(e3) -end -function c11471117.eqlimit(e,c) - return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_WARRIOR) -end -function c11471117.filter(c) - return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_WARRIOR) -end -function c11471117.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c11471117.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c11471117.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c11471117.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c11471117.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,e:GetHandler(),tc) - end -end -function c11471117.rmcon(e,tp,eg,ep,ev,re,r,rp) - local a=Duel.GetAttacker() - local d=Duel.GetAttackTarget() - local c=e:GetHandler():GetEquipTarget() - return d and (a==c or d==c) -end -function c11471117.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local tc=e:GetHandler():GetEquipTarget():GetBattleTarget() - Duel.SetTargetCard(tc) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,tc,1,0,0) -end -function c11471117.rmop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) - end -end diff --git a/script/c11475049.lua b/script/c11475049.lua deleted file mode 100644 index 0081fc05ae..0000000000 --- a/script/c11475049.lua +++ /dev/null @@ -1,56 +0,0 @@ ---アーティファクト-アキレウス -function c11475049.initial_effect(c) - --set - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_MONSTER_SSET) - e1:SetValue(TYPE_SPELL) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(11475049,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetCondition(c11475049.spcon) - e2:SetTarget(c11475049.sptg) - e2:SetOperation(c11475049.spop) - c:RegisterEffect(e2) - --cannot be battle target - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(11475049,1)) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - e3:SetCondition(c11475049.atcon) - e3:SetOperation(c11475049.atop) - c:RegisterEffect(e3) -end -function c11475049.spcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsPreviousLocation(LOCATION_SZONE) and c:IsPreviousPosition(POS_FACEDOWN) - and c:IsReason(REASON_DESTROY) and Duel.GetTurnPlayer()~=tp -end -function c11475049.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c11475049.spop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP) - end -end -function c11475049.atcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp -end -function c11475049.atop(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET) - e1:SetTargetRange(0,LOCATION_MZONE) - e1:SetValue(c11475049.atlimit) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function c11475049.atlimit(e,c) - return c:IsFaceup() and c:IsSetCard(0x97) -end diff --git a/script/c1149109.lua b/script/c1149109.lua deleted file mode 100644 index 6347b3178e..0000000000 --- a/script/c1149109.lua +++ /dev/null @@ -1,51 +0,0 @@ ---デッキロック -function c1149109.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c1149109.target) - c:RegisterEffect(e1) - --disable search - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_CANNOT_TO_HAND) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(LOCATION_DECK,LOCATION_DECK) - c:RegisterEffect(e2) - --disable spsummon - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetRange(LOCATION_SZONE) - e3:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e3:SetTargetRange(LOCATION_DECK,LOCATION_DECK) - c:RegisterEffect(e3) -end -function c1149109.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local c=e:GetHandler() - c:SetTurnCounter(0) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_SZONE) - e1:SetCondition(c1149109.descon) - e1:SetOperation(c1149109.desop) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,2) - c:RegisterEffect(e1) -end -function c1149109.descon(e,tp,eg,ep,ev,re,r,rp) - return tp==Duel.GetTurnPlayer() -end -function c1149109.desop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local ct=c:GetTurnCounter() - ct=ct+1 - c:SetTurnCounter(ct) - if ct==2 then - Duel.Destroy(c,REASON_RULE) - end -end diff --git a/script/c114932.lua b/script/c114932.lua deleted file mode 100644 index 39edf7aecb..0000000000 --- a/script/c114932.lua +++ /dev/null @@ -1,34 +0,0 @@ ---プレートクラッシャー -function c114932.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(114932,0)) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(2) - e1:SetCost(c114932.descost) - e1:SetTarget(c114932.destg) - e1:SetOperation(c114932.desop) - c:RegisterEffect(e1) -end -function c114932.cfilter(c) - return c:IsFaceup() and c:IsType(TYPE_CONTINUOUS) and c:IsAbleToGraveAsCost() -end -function c114932.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c114932.cfilter,tp,LOCATION_SZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c114932.cfilter,tp,LOCATION_SZONE,0,1,1,nil) - Duel.SendtoGrave(g,REASON_COST) -end -function c114932.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(500) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,500) -end -function c114932.desop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c11501629.lua b/script/c11501629.lua deleted file mode 100644 index 6acd9d5416..0000000000 --- a/script/c11501629.lua +++ /dev/null @@ -1,63 +0,0 @@ ---キックファイア -function c11501629.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --add counter - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetProperty(EFFECT_FLAG_DELAY) - e2:SetRange(LOCATION_SZONE) - e2:SetCountLimit(1) - e2:SetCode(EVENT_DESTROY) - e2:SetCondition(c11501629.ctcon) - e2:SetOperation(c11501629.ctop) - c:RegisterEffect(e2) - --damage - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(11501629,0)) - e3:SetCategory(CATEGORY_DAMAGE) - e3:SetType(EFFECT_TYPE_QUICK_O) - e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e3:SetRange(LOCATION_SZONE) - e3:SetCode(EVENT_FREE_CHAIN) - e3:SetHintTiming(TIMING_STANDBY_PHASE) - e3:SetCondition(c11501629.damcon) - e3:SetCost(c11501629.damcost) - e3:SetTarget(c11501629.damtg) - e3:SetOperation(c11501629.damop) - c:RegisterEffect(e3) -end -function c11501629.ctfilter(c,tp) - return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) and c:IsAttribute(ATTRIBUTE_FIRE) and c:IsReason(REASON_EFFECT) -end -function c11501629.ctcon(e,tp,eg,ep,ev,re,r,rp) - local ct=eg:FilterCount(c11501629.ctfilter,nil,tp) - e:SetLabel(ct) - return ct>0 -end -function c11501629.ctop(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():AddCounter(0x2d,e:GetLabel()) -end -function c11501629.damcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()==PHASE_STANDBY -end -function c11501629.damcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - e:SetLabel(e:GetHandler():GetCounter(0x2d)) - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end -function c11501629.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:GetCounter(0x2d)>0 end - local dam=e:GetLabel()*1000 - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(dam) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,dam) -end -function c11501629.damop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c11502550.lua b/script/c11502550.lua deleted file mode 100644 index 086dc02a5b..0000000000 --- a/script/c11502550.lua +++ /dev/null @@ -1,111 +0,0 @@ ---E・HERO エアー・ネオス -function c11502550.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcCode2(c,89943723,54959865,false,false) - --spsummon condition - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(c11502550.splimit) - c:RegisterEffect(e1) - --special summon rule - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_SPSUMMON_PROC) - e2:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e2:SetRange(LOCATION_EXTRA) - e2:SetCondition(c11502550.spcon) - e2:SetOperation(c11502550.spop) - c:RegisterEffect(e2) - --return - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(11502550,0)) - e3:SetCategory(CATEGORY_TODECK) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e3:SetCode(EVENT_PHASE+PHASE_END) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1) - e3:SetCondition(c11502550.retcon1) - e3:SetTarget(c11502550.rettg) - e3:SetOperation(c11502550.retop) - c:RegisterEffect(e3) - local e4=e3:Clone() - e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e4:SetProperty(0) - e4:SetCondition(c11502550.retcon2) - c:RegisterEffect(e4) - --atkup - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_SINGLE) - e5:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e5:SetCode(EFFECT_UPDATE_ATTACK) - e5:SetRange(LOCATION_MZONE) - e5:SetValue(c11502550.atkval) - c:RegisterEffect(e5) -end -function c11502550.splimit(e,se,sp,st) - return not e:GetHandler():IsLocation(LOCATION_EXTRA) -end -function c11502550.spfilter(c,code) - return c:IsAbleToDeckOrExtraAsCost() and c:GetCode()==code -end -function c11502550.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ft<-1 then return false end - local g1=Duel.GetMatchingGroup(c11502550.spfilter,tp,LOCATION_ONFIELD,0,nil,89943723) - local g2=Duel.GetMatchingGroup(c11502550.spfilter,tp,LOCATION_ONFIELD,0,nil,54959865) - if g1:GetCount()==0 or g2:GetCount()==0 then return false end - if ft>0 then return true end - local f1=g1:FilterCount(Card.IsLocation,nil,LOCATION_MZONE) - local f2=g2:FilterCount(Card.IsLocation,nil,LOCATION_MZONE) - if ft==-1 then return f1>0 and f2>0 - else return f1>0 or f2>0 end -end -function c11502550.spop(e,tp,eg,ep,ev,re,r,rp,c) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - local g1=Duel.GetMatchingGroup(c11502550.spfilter,tp,LOCATION_ONFIELD,0,nil,89943723) - local g2=Duel.GetMatchingGroup(c11502550.spfilter,tp,LOCATION_ONFIELD,0,nil,54959865) - g1:Merge(g2) - local g=Group.CreateGroup() - local tc=nil - for i=1,2 do - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - if ft<=0 then - tc=g1:FilterSelect(tp,Card.IsLocation,1,1,nil,LOCATION_MZONE):GetFirst() - else - tc=g1:Select(tp,1,1,nil):GetFirst() - end - g:AddCard(tc) - g1:Remove(Card.IsCode,nil,tc:GetCode()) - ft=ft+1 - end - local cg=g:Filter(Card.IsFacedown,nil) - if cg:GetCount()>0 then - Duel.ConfirmCards(1-tp,cg) - end - Duel.SendtoDeck(g,nil,2,REASON_COST) -end -function c11502550.retcon1(e,tp,eg,ep,ev,re,r,rp,chk) - return not e:GetHandler():IsHasEffect(42015635) -end -function c11502550.retcon2(e,tp,eg,ep,ev,re,r,rp,chk) - return e:GetHandler():IsHasEffect(42015635) -end -function c11502550.rettg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToExtra() end - Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0) -end -function c11502550.retop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) or e:GetHandler():IsFacedown() then return end - Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_EFFECT) -end -function c11502550.atkval(e,c) - local lps=Duel.GetLP(c:GetControler()) - local lpo=Duel.GetLP(1-c:GetControler()) - if lps>=lpo then return 0 - else return lpo-lps end -end diff --git a/script/c11508758.lua b/script/c11508758.lua deleted file mode 100644 index d934796f2b..0000000000 --- a/script/c11508758.lua +++ /dev/null @@ -1,41 +0,0 @@ ---ミュータント・ハイブレイン -function c11508758.initial_effect(c) - --control - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(11508758,0)) - e1:SetCategory(CATEGORY_CONTROL) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetCondition(c11508758.ctlcon) - e1:SetTarget(c11508758.ctltg) - e1:SetOperation(c11508758.ctlop) - c:RegisterEffect(e1) -end -function c11508758.ctlcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetAttackTarget()~=nil -end -function c11508758.filter(c) - return c:IsPosition(POS_FACEUP_ATTACK) and c:IsControlerCanBeChanged() -end -function c11508758.ctltg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc~=Duel.GetAttackTarget() and c11508758.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c11508758.filter,tp,0,LOCATION_MZONE,1,Duel.GetAttackTarget()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) - local g=Duel.SelectTarget(tp,c11508758.filter,tp,0,LOCATION_MZONE,1,1,Duel.GetAttackTarget()) - Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0) -end -function c11508758.ctlop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - if not Duel.GetControl(tc,tp,PHASE_BATTLE,1) then - if not tc:IsImmuneToEffect(e) and tc:IsAbleToChangeControler() then - Duel.Destroy(tc,REASON_EFFECT) - end - else - if tc:IsAttackPos() then - Duel.ChangeAttacker(tc) - end - end - end -end diff --git a/script/c11522979.lua b/script/c11522979.lua deleted file mode 100644 index 97580ede56..0000000000 --- a/script/c11522979.lua +++ /dev/null @@ -1,81 +0,0 @@ ---CNo.69 紋章死神カオス・オブ・アームズ -function c11522979.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,5,4) - c:EnableReviveLimit() - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(11522979,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c11522979.descon) - e1:SetTarget(c11522979.destg) - e1:SetOperation(c11522979.desop) - c:RegisterEffect(e1) - --effect - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(11522979,1)) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCondition(c11522979.condition) - e2:SetCost(c11522979.cost) - e2:SetTarget(c11522979.target) - e2:SetOperation(c11522979.operation) - c:RegisterEffect(e2) -end -c11522979.xyz_number=69 -function c11522979.descon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetAttacker():IsControler(1-tp) -end -function c11522979.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDestructable,tp,0,LOCATION_ONFIELD,1,nil) end - local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,0,LOCATION_ONFIELD,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c11522979.desop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,0,LOCATION_ONFIELD,nil) - Duel.Destroy(g,REASON_EFFECT) -end -function c11522979.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetOverlayGroup():IsExists(Card.IsCode,1,nil,2407234) -end -function c11522979.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c11522979.filter(c) - return c:IsFaceup() and c:IsType(TYPE_XYZ) -end -function c11522979.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c11522979.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c11522979.filter,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c11522979.filter,tp,0,LOCATION_MZONE,1,1,nil) -end -function c11522979.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsFaceup() and c:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsRelateToEffect(e) then - local code=tc:GetOriginalCode() - local atk=tc:GetBaseAttack() - if atk<0 then atk=0 end - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_CHANGE_CODE) - e1:SetValue(code) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(atk) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - c:RegisterEffect(e2) - c:CopyEffect(code,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,1) - end -end diff --git a/script/c11548522.lua b/script/c11548522.lua deleted file mode 100644 index bf9c664e20..0000000000 --- a/script/c11548522.lua +++ /dev/null @@ -1,21 +0,0 @@ ---迷犬マロン -function c11548522.initial_effect(c) - --to deck - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(11548522,0)) - e1:SetCategory(CATEGORY_TODECK) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetTarget(c11548522.target) - e1:SetOperation(c11548522.operation) - c:RegisterEffect(e1) -end -function c11548522.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0) -end -function c11548522.operation(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_EFFECT) - end -end diff --git a/script/c11556339.lua b/script/c11556339.lua deleted file mode 100644 index b327f099b0..0000000000 --- a/script/c11556339.lua +++ /dev/null @@ -1,34 +0,0 @@ ---霊獣の連契 -function c11556339.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,0x1c0) - e1:SetCondition(c11556339.condition) - e1:SetTarget(c11556339.target) - e1:SetOperation(c11556339.activate) - c:RegisterEffect(e1) -end -function c11556339.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0xb5) -end -function c11556339.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c11556339.cfilter,tp,LOCATION_MZONE,0,1,nil) -end -function c11556339.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDestructable,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c11556339.activate(e,tp,eg,ep,ev,re,r,rp) - local ct=Duel.GetMatchingGroupCount(c11556339.cfilter,tp,LOCATION_MZONE,0,nil) - if ct==0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectMatchingCard(tp,Card.IsDestructable,tp,LOCATION_MZONE,LOCATION_MZONE,1,ct,nil) - if g:GetCount()>0 then - Duel.HintSelection(g) - Duel.Destroy(g,REASON_EFFECT) - end -end diff --git a/script/c11593137.lua b/script/c11593137.lua deleted file mode 100644 index eb5d0ec714..0000000000 --- a/script/c11593137.lua +++ /dev/null @@ -1,40 +0,0 @@ ---混沌の落とし穴 -function c11593137.initial_effect(c) - --Activate(summon) - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DISABLE_SUMMON+CATEGORY_REMOVE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_SUMMON) - e1:SetCondition(c11593137.condition) - e1:SetCost(c11593137.cost) - e1:SetTarget(c11593137.target) - e1:SetOperation(c11593137.activate) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_FLIP_SUMMON) - c:RegisterEffect(e2) - local e3=e1:Clone() - e3:SetCode(EVENT_SPSUMMON) - c:RegisterEffect(e3) -end -function c11593137.filter(c) - return c:IsAttribute(0x30) and c:IsAbleToRemove() -end -function c11593137.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentChain()==0 and eg:IsExists(c11593137.filter,1,nil) -end -function c11593137.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,2000) end - Duel.PayLPCost(tp,2000) -end -function c11593137.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local g=eg:Filter(c11593137.filter,nil) - Duel.SetOperationInfo(0,CATEGORY_DISABLE_SUMMON,g,g:GetCount(),0,0) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,0) -end -function c11593137.activate(e,tp,eg,ep,ev,re,r,rp) - local g=eg:Filter(c11593137.filter,nil) - Duel.NegateSummon(g) - Duel.Remove(g,POS_FACEUP,REASON_EFFECT) -end diff --git a/script/c11596936.lua b/script/c11596936.lua deleted file mode 100644 index a13c6c4061..0000000000 --- a/script/c11596936.lua +++ /dev/null @@ -1,35 +0,0 @@ ---レクリスパワー -function c11596936.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_END_PHASE) - e1:SetCost(c11596936.cost) - e1:SetTarget(c11596936.target) - e1:SetOperation(c11596936.activate) - c:RegisterEffect(e1) -end -function c11596936.cfilter(c) - return c:IsCode(36623431) and not c:IsPublic() -end -function c11596936.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c11596936.cfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) - local g=Duel.SelectMatchingCard(tp,c11596936.cfilter,tp,LOCATION_HAND,0,1,1,nil) - Duel.ConfirmCards(1-tp,g) - Duel.ShuffleHand(tp) -end -function c11596936.filter(c) - return c:IsFacedown() and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable() -end -function c11596936.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c11596936.filter,tp,0,LOCATION_ONFIELD,1,nil) end - local sg=Duel.GetMatchingGroup(c11596936.filter,tp,0,LOCATION_ONFIELD,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,sg:GetCount(),0,0) -end -function c11596936.activate(e,tp,eg,ep,ev,re,r,rp) - local sg=Duel.GetMatchingGroup(c11596936.filter,tp,0,LOCATION_ONFIELD,e:GetHandler()) - Duel.Destroy(sg,REASON_EFFECT) -end diff --git a/script/c11609969.lua b/script/c11609969.lua deleted file mode 100644 index c7f334c809..0000000000 --- a/script/c11609969.lua +++ /dev/null @@ -1,123 +0,0 @@ ---DD魔導賢者ケプラー -function c11609969.initial_effect(c) - --pendulum summon - aux.AddPendulumProcedure(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --splimit - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetRange(LOCATION_PZONE) - e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE) - e2:SetTargetRange(1,0) - e2:SetCondition(aux.nfbdncon) - e2:SetTarget(c11609969.splimit) - c:RegisterEffect(e2) - --scale change - local e3=Effect.CreateEffect(c) - e3:SetCategory(CATEGORY_DESTROY) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e3:SetRange(LOCATION_PZONE) - e3:SetCode(EVENT_PHASE+PHASE_STANDBY) - e3:SetCountLimit(1) - e3:SetCondition(c11609969.sccon) - e3:SetTarget(c11609969.sctg) - e3:SetOperation(c11609969.scop) - c:RegisterEffect(e3) - --tohand - local e4=Effect.CreateEffect(c) - e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e4:SetCode(EVENT_SUMMON_SUCCESS) - e4:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e4:SetCountLimit(1,11609969) - e4:SetTarget(c11609969.thtg) - e4:SetOperation(c11609969.thop) - c:RegisterEffect(e4) - local e5=e4:Clone() - e5:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e5) -end -function c11609969.splimit(e,c,tp,sumtp,sumpos) - return not c:IsSetCard(0xaf) and bit.band(sumtp,SUMMON_TYPE_PENDULUM)==SUMMON_TYPE_PENDULUM -end -function c11609969.sccon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c11609969.filter(c,lv) - return c:IsFaceup() and not c:IsSetCard(0xaf) and c:IsLevelAbove(lv) and c:IsDestructable() -end -function c11609969.sctg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local scl=math.max(1,e:GetHandler():GetLeftScale()-2) - local g=Duel.GetMatchingGroup(c11609969.filter,tp,LOCATION_MZONE,0,nil,scl) - if e:GetHandler():GetLeftScale()>1 then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) - end -end -function c11609969.scop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) or c:GetLeftScale()==1 then return end - local scl=2 - if c:GetLeftScale()==2 then scl=1 end - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_LSCALE) - e1:SetValue(-scl) - e1:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_UPDATE_RSCALE) - c:RegisterEffect(e2) - local g=Duel.GetMatchingGroup(c11609969.filter,tp,LOCATION_MZONE,0,nil,c:GetLeftScale()) - if g:GetCount()>0 then - Duel.BreakEffect() - Duel.Destroy(g,REASON_EFFECT) - end -end -function c11609969.filter1(c) - return c:IsFaceup() and c:IsSetCard(0xaf) and c:IsAbleToHand() -end -function c11609969.filter2(c) - return c:IsSetCard(0xae) and c:IsAbleToHand() -end -function c11609969.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and c11609969.filter1(chkc) and chkc~=e:GetHandler() end - local b1=Duel.IsExistingTarget(c11609969.filter1,tp,LOCATION_ONFIELD,0,1,e:GetHandler()) - local b2=Duel.IsExistingMatchingCard(c11609969.filter2,tp,LOCATION_DECK,0,1,nil) - if chk==0 then return b1 or b2 end - local op=0 - if b1 and b2 then op=Duel.SelectOption(tp,aux.Stringid(11609969,0),aux.Stringid(11609969,1)) - elseif b1 then op=Duel.SelectOption(tp,aux.Stringid(11609969,0)) - else op=Duel.SelectOption(tp,aux.Stringid(11609969,1))+1 end - e:SetLabel(op) - if op==0 then - e:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g=Duel.SelectTarget(tp,c11609969.filter1,tp,LOCATION_ONFIELD,0,1,1,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) - else - e:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) - end -end -function c11609969.thop(e,tp,eg,ep,ev,re,r,rp) - if e:GetLabel()==0 then - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end - else - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c11609969.filter2,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end - end -end diff --git a/script/c11613567.lua b/script/c11613567.lua deleted file mode 100644 index a1ffe494a5..0000000000 --- a/script/c11613567.lua +++ /dev/null @@ -1,42 +0,0 @@ ---BF-漆黒のエルフェン -function c11613567.initial_effect(c) - --summon with no tribute - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(11613567,0)) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SUMMON_PROC) - e1:SetCondition(c11613567.ntcon) - c:RegisterEffect(e1) - --position - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(11613567,1)) - e2:SetCategory(CATEGORY_POSITION) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_SUMMON_SUCCESS) - e2:SetTarget(c11613567.target) - e2:SetOperation(c11613567.operation) - c:RegisterEffect(e2) -end -function c11613567.ntfilter(c) - return c:IsFaceup() and c:IsSetCard(0x33) -end -function c11613567.ntcon(e,c,minc) - if c==nil then return true end - return minc==0 and c:GetLevel()>4 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c11613567.ntfilter,c:GetControler(),LOCATION_MZONE,0,1,nil) -end -function c11613567.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:GetLocation()==LOCATION_MZONE and chkc:IsControler(1-tp) end - if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE) - local g=Duel.SelectTarget(tp,aux.TRUE,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0) -end -function c11613567.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.ChangePosition(tc,POS_FACEUP_DEFENCE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK) - end -end diff --git a/script/c11662742.lua b/script/c11662742.lua deleted file mode 100644 index 273b5ce852..0000000000 --- a/script/c11662742.lua +++ /dev/null @@ -1,83 +0,0 @@ ---ジェルエンデュオ -function c11662742.initial_effect(c) - --battle indestructable - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e1:SetValue(1) - c:RegisterEffect(e1) - --double tribute - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DOUBLE_TRIBUTE) - e2:SetValue(c11662742.dtcon) - c:RegisterEffect(e2) - --selfdes - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e3:SetRange(LOCATION_MZONE) - e3:SetCode(EVENT_DAMAGE) - e3:SetOperation(c11662742.dmop) - c:RegisterEffect(e3) - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(11662742,0)) - e4:SetCategory(CATEGORY_DESTROY) - e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e4:SetCode(EVENT_BATTLED) - e4:SetRange(LOCATION_MZONE) - e4:SetCondition(c11662742.descon) - e4:SetTarget(c11662742.destg) - e4:SetOperation(c11662742.desop) - c:RegisterEffect(e4) - local e5=Effect.CreateEffect(c) - e5:SetDescription(aux.Stringid(11662742,0)) - e5:SetCategory(CATEGORY_DESTROY) - e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e5:SetCode(EVENT_BATTLED) - e5:SetRange(LOCATION_MZONE) - e5:SetCondition(c11662742.descon2) - e5:SetTarget(c11662742.destg) - e5:SetOperation(c11662742.desop) - c:RegisterEffect(e5) - local e6=Effect.CreateEffect(c) - e6:SetDescription(aux.Stringid(11662742,0)) - e6:SetCategory(CATEGORY_DESTROY) - e6:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e6:SetRange(LOCATION_MZONE) - e6:SetCode(EVENT_DAMAGE) - e6:SetCondition(c11662742.descon3) - e6:SetTarget(c11662742.destg) - e6:SetOperation(c11662742.desop) - c:RegisterEffect(e6) -end -function c11662742.dtcon(e,c) - return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_FAIRY) -end -function c11662742.dmop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:GetControler()~=ep then return end - if bit.band(r,REASON_BATTLE)~=0 then - c:RegisterFlagEffect(11662742,RESET_PHASE+RESET_DAMAGE,0,1) - elseif Duel.GetCurrentPhase()==PHASE_DAMAGE and not Duel.IsDamageCalculated() then - c:RegisterFlagEffect(11662743,RESET_PHASE+RESET_DAMAGE,0,1) - end -end -function c11662742.descon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetFlagEffect(11662742)>0 -end -function c11662742.descon2(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetFlagEffect(11662743)>0 -end -function c11662742.descon3(e,tp,eg,ep,ev,re,r,rp) - return bit.band(r,REASON_EFFECT)~=0 and e:GetHandler():GetControler()==ep - and (Duel.GetCurrentPhase()~=PHASE_DAMAGE or Duel.IsDamageCalculated()) -end -function c11662742.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0) -end -function c11662742.desop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - Duel.Destroy(e:GetHandler(),REASON_EFFECT) - end -end diff --git a/script/c11678191.lua b/script/c11678191.lua deleted file mode 100644 index 4bbe00eaa2..0000000000 --- a/script/c11678191.lua +++ /dev/null @@ -1,105 +0,0 @@ ---守護霊 アイリン -function c11678191.initial_effect(c) - --equip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(11678191,0)) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetTarget(c11678191.eqtg) - e1:SetOperation(c11678191.eqop) - c:RegisterEffect(e1) - --unequip - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(11678191,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_SZONE) - e2:SetCondition(c11678191.uncon) - e2:SetTarget(c11678191.sptg) - e2:SetOperation(c11678191.spop) - c:RegisterEffect(e2) - --pos change - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(11678191,2)) - e3:SetCategory(CATEGORY_POSITION) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_SZONE) - e3:SetCountLimit(1) - e3:SetCondition(c11678191.uncon) - e3:SetTarget(c11678191.postg) - e3:SetOperation(c11678191.posop) - c:RegisterEffect(e3) - --destroy sub - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_EQUIP) - e5:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e5:SetCode(EFFECT_DESTROY_SUBSTITUTE) - e5:SetCondition(c11678191.uncon) - e5:SetValue(c11678191.repval) - c:RegisterEffect(e5) - --eqlimit - local e6=Effect.CreateEffect(c) - e6:SetType(EFFECT_TYPE_SINGLE) - e6:SetCode(EFFECT_EQUIP_LIMIT) - e6:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e6:SetValue(c11678191.eqlimit) - c:RegisterEffect(e6) -end -function c11678191.uncon(e) - return e:GetHandler():IsStatus(STATUS_UNION) -end -function c11678191.repval(e,re,r,rp) - return bit.band(r,REASON_BATTLE)~=0 -end -function c11678191.eqlimit(e,c) - return c:IsCode(84173492) -end -function c11678191.filter(c) - return c:IsFaceup() and c:IsCode(84173492) and c:GetUnionCount()==0 -end -function c11678191.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c11678191.filter(chkc) end - if chk==0 then return e:GetHandler():GetFlagEffect(11678191)==0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingTarget(c11678191.filter,tp,LOCATION_MZONE,0,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local g=Duel.SelectTarget(tp,c11678191.filter,tp,LOCATION_MZONE,0,1,1,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0) - e:GetHandler():RegisterFlagEffect(11678191,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1) -end -function c11678191.eqop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if not c:IsRelateToEffect(e) or c:IsFacedown() then return end - if not tc:IsRelateToEffect(e) or not c11678191.filter(tc) then - Duel.SendtoGrave(c,REASON_EFFECT) - return - end - if not Duel.Equip(tp,c,tc,false) then return end - c:SetStatus(STATUS_UNION,true) -end -function c11678191.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():GetFlagEffect(11678191)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,false) end - Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) - e:GetHandler():RegisterFlagEffect(11678191,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1) -end -function c11678191.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP_ATTACK) - end -end -function c11678191.postg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) - Duel.SetOperationInfo(0,CATEGORY_POSITION,e:GetHandler():GetEquipTarget(),1,0,0) -end -function c11678191.posop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.ChangePosition(c:GetEquipTarget(),POS_FACEUP_DEFENCE,0,POS_FACEUP_ATTACK,0) - end -end diff --git a/script/c11682713.lua b/script/c11682713.lua deleted file mode 100644 index b9347072e6..0000000000 --- a/script/c11682713.lua +++ /dev/null @@ -1,52 +0,0 @@ ---森羅の葉心棒 ブレイド -function c11682713.initial_effect(c) - --deck check - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(11682713,0)) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_BATTLE_DESTROYING) - e1:SetCondition(aux.bdogcon) - e1:SetTarget(c11682713.target) - e1:SetOperation(c11682713.operation) - c:RegisterEffect(e1) - --to hand - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(11682713,1)) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e2:SetCondition(c11682713.tdcon) - e2:SetTarget(c11682713.tdtg) - e2:SetOperation(c11682713.tdop) - c:RegisterEffect(e2) -end -function c11682713.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,1) end -end -function c11682713.operation(e,tp,eg,ep,ev,re,r,rp) - if not Duel.IsPlayerCanDiscardDeck(tp,1) then return end - Duel.ConfirmDecktop(tp,1) - local g=Duel.GetDecktopGroup(tp,1) - local tc=g:GetFirst() - if tc:IsRace(RACE_PLANT) then - Duel.DisableShuffleCheck() - Duel.SendtoGrave(g,REASON_EFFECT+REASON_REVEAL) - else - Duel.MoveSequence(tc,1) - end -end -function c11682713.tdcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsPreviousLocation(LOCATION_DECK) and - (c:IsReason(REASON_REVEAL) or c:GetPreviousPosition()==POS_FACEUP_DEFENCE or Duel.IsPlayerAffectedByEffect(tp,EFFECT_REVERSE_DECK)) -end -function c11682713.tdtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToHand() end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0) -end -function c11682713.tdop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,e:GetHandler()) - end -end diff --git a/script/c11685347.lua b/script/c11685347.lua deleted file mode 100644 index 0d74e352f8..0000000000 --- a/script/c11685347.lua +++ /dev/null @@ -1,45 +0,0 @@ ---連爆魔人 -function c11685347.initial_effect(c) - --chain - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EVENT_CHAINING) - e1:SetRange(LOCATION_MZONE) - e1:SetOperation(c11685347.chop) - c:RegisterEffect(e1) - --damage - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(11685347,0)) - e2:SetCategory(CATEGORY_DAMAGE) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_CHAIN_END) - e2:SetRange(LOCATION_MZONE) - e2:SetCondition(c11685347.damcon) - e2:SetTarget(c11685347.damtg) - e2:SetOperation(c11685347.damop) - e2:SetLabelObject(e1) - c:RegisterEffect(e2) -end -function c11685347.chop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetCurrentChain()==1 then - e:SetLabel(0) - elseif re:IsHasType(EFFECT_TYPE_ACTIVATE) then - e:SetLabel(1) - end -end -function c11685347.damcon(e,tp,eg,ep,ev,re,r,rp) - local res=e:GetLabelObject():GetLabel() - e:GetLabelObject():SetLabel(0) - return res==1 -end -function c11685347.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(500) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,500) -end -function c11685347.damop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c11705261.lua b/script/c11705261.lua deleted file mode 100644 index 77e8763e32..0000000000 --- a/script/c11705261.lua +++ /dev/null @@ -1,43 +0,0 @@ ---エクシーズ・チェンジ・タクティクス -function c11705261.initial_effect(c) - c:SetUniqueOnField(1,0,11705261) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --draw - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(11705261,0)) - e2:SetCategory(CATEGORY_DRAW) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetRange(LOCATION_SZONE) - e2:SetCondition(c11705261.condition) - e2:SetCost(c11705261.cost) - e2:SetTarget(c11705261.target) - e2:SetOperation(c11705261.operation) - c:RegisterEffect(e2) -end -function c11705261.filter(c,tp) - return c:IsSetCard(0x7f) and c:IsControler(tp) and c:GetSummonType()==SUMMON_TYPE_XYZ -end -function c11705261.condition(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c11705261.filter,1,nil,tp) -end -function c11705261.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,500) end - Duel.PayLPCost(tp,500) -end -function c11705261.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(1) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c11705261.operation(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end diff --git a/script/c11722335.lua b/script/c11722335.lua deleted file mode 100644 index 2282408bbd..0000000000 --- a/script/c11722335.lua +++ /dev/null @@ -1,40 +0,0 @@ ---ワーム・ゼクス -function c11722335.initial_effect(c) - --send to grave - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(11722335,0)) - e1:SetCategory(CATEGORY_TOGRAVE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c11722335.target) - e1:SetOperation(c11722335.operation) - c:RegisterEffect(e1) - --indes - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e2:SetCondition(c11722335.indcon) - e2:SetValue(1) - c:RegisterEffect(e2) -end -function c11722335.tgfilter(c) - return c:IsSetCard(0x3e) and c:IsRace(RACE_REPTILE) and c:IsAbleToGrave() -end -function c11722335.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c11722335.tgfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) -end -function c11722335.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c11722335.tgfilter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoGrave(g,REASON_EFFECT) - end -end -function c11722335.indfilter(c) - return c:IsFaceup() and c:IsCode(47111934) -end -function c11722335.indcon(e) - return Duel.IsExistingMatchingCard(c11722335.indfilter,e:GetOwnerPlayer(),LOCATION_MZONE,0,1,nil) -end diff --git a/script/c11741041.lua b/script/c11741041.lua deleted file mode 100644 index 1fcf25557e..0000000000 --- a/script/c11741041.lua +++ /dev/null @@ -1,48 +0,0 @@ ---サンダー・ボトル -function c11741041.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --counter - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_ATTACK_ANNOUNCE) - e2:SetRange(LOCATION_SZONE) - e2:SetOperation(c11741041.ctop) - c:RegisterEffect(e2) - --destroy - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(11741041,0)) - e3:SetCategory(CATEGORY_DESTROY) - e3:SetType(EFFECT_TYPE_QUICK_O) - e3:SetCode(EVENT_FREE_CHAIN) - e3:SetRange(LOCATION_SZONE) - e3:SetCondition(c11741041.descon) - e3:SetCost(c11741041.descost) - e3:SetTarget(c11741041.destg) - e3:SetOperation(c11741041.desop) - c:RegisterEffect(e3) -end -function c11741041.ctop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetAttacker():IsControler(tp) then - e:GetHandler():AddCounter(0xc,1) - end -end -function c11741041.descon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetCounter(0xc)>=4 -end -function c11741041.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end -function c11741041.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDestructable,tp,0,LOCATION_MZONE,1,nil) end - local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,0,LOCATION_MZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c11741041.desop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,0,LOCATION_MZONE,nil) - Duel.Destroy(g,REASON_EFFECT) -end diff --git a/script/c11743119.lua b/script/c11743119.lua deleted file mode 100644 index 9bd7b93b87..0000000000 --- a/script/c11743119.lua +++ /dev/null @@ -1,53 +0,0 @@ ---ユニオン・ライダー -function c11743119.initial_effect(c) - --equip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(11743119,0)) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCondition(c11743119.eqcon) - e1:SetTarget(c11743119.eqtg) - e1:SetOperation(c11743119.eqop) - c:RegisterEffect(e1) -end -function c11743119.eqcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local ec=e:GetLabelObject() - return ec==nil or ec:GetFlagEffect(11743119)==0 -end -function c11743119.filter(c) - return c:IsType(TYPE_UNION) and c:IsAbleToChangeControler() -end -function c11743119.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c11743119.filter(chkc) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingTarget(c11743119.filter,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local g=Duel.SelectTarget(tp,c11743119.filter,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0) -end -function c11743119.eqlimit(e,c) - return e:GetOwner()==c -end -function c11743119.eqop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - if c:IsFaceup() and c:IsRelateToEffect(e) then - if not Duel.Equip(tp,tc,c,false) then return end - --Add Equip limit - tc:RegisterFlagEffect(11743119,RESET_EVENT+0x1fe0000,0,0) - e:SetLabelObject(tc) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetProperty(EFFECT_FLAG_COPY_INHERIT+EFFECT_FLAG_OWNER_RELATE) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(c11743119.eqlimit) - tc:RegisterEffect(e1) - else Duel.SendtoGrave(tc,REASON_EFFECT) end - end -end diff --git a/script/c11747708.lua b/script/c11747708.lua deleted file mode 100644 index ae41567cf4..0000000000 --- a/script/c11747708.lua +++ /dev/null @@ -1,41 +0,0 @@ ---スポーア -function c11747708.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(11747708,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_GRAVE) - e1:SetCountLimit(1,11747708+EFFECT_COUNT_CODE_DUEL) - e1:SetCost(c11747708.cost) - e1:SetTarget(c11747708.target) - e1:SetOperation(c11747708.operation) - c:RegisterEffect(e1) -end -function c11747708.costfilter(c) - return c:IsRace(RACE_PLANT) and c:GetLevel()>0 and c:IsAbleToRemoveAsCost() -end -function c11747708.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c11747708.costfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c11747708.costfilter,tp,LOCATION_GRAVE,0,1,1,e:GetHandler()) - Duel.Remove(g,POS_FACEUP,REASON_COST) - e:SetLabel(g:GetFirst():GetLevel()) -end -function c11747708.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c11747708.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) then return end - if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)==1 then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_LEVEL) - e1:SetValue(e:GetLabel()) - e1:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e1) - end -end diff --git a/script/c11760174.lua b/script/c11760174.lua deleted file mode 100644 index 2737ebc795..0000000000 --- a/script/c11760174.lua +++ /dev/null @@ -1,33 +0,0 @@ ---言語道断侍 -function c11760174.initial_effect(c) - --act limit - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(11760174,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c11760174.cost) - e1:SetTarget(c11760174.target) - e1:SetOperation(c11760174.operation) - c:RegisterEffect(e1) -end -function c11760174.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,800) end - Duel.PayLPCost(tp,800) -end -function c11760174.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetFlagEffect(tp,11760174)==0 end -end -function c11760174.operation(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EFFECT_CANNOT_ACTIVATE) - e1:SetTargetRange(1,1) - e1:SetValue(c11760174.aclimit) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) - Duel.RegisterFlagEffect(tp,11760174,RESET_PHASE+RESET_END,0,1) -end -function c11760174.aclimit(e,re,tp) - return re:IsActiveType(TYPE_SPELL+TYPE_TRAP) -end diff --git a/script/c11813722.lua b/script/c11813722.lua deleted file mode 100644 index cfa205b69d..0000000000 --- a/script/c11813722.lua +++ /dev/null @@ -1,29 +0,0 @@ ---パルキオンのうろこ -function c11813722.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c11813722.condition) - e1:SetOperation(c11813722.operation) - c:RegisterEffect(e1) -end -function c11813722.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x2a) -end -function c11813722.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c11813722.cfilter,tp,LOCATION_MZONE,0,1,nil) -end -function c11813722.operation(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EFFECT_CANNOT_ACTIVATE) - e1:SetTargetRange(0,1) - e1:SetValue(c11813722.aclimit) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function c11813722.aclimit(e,re,tp) - return re:GetHandler():IsType(TYPE_TRAP) and re:IsHasType(EFFECT_TYPE_ACTIVATE) -end diff --git a/script/c11819616.lua b/script/c11819616.lua deleted file mode 100644 index 05fa21c514..0000000000 --- a/script/c11819616.lua +++ /dev/null @@ -1,43 +0,0 @@ ---椿姫ティタニアル -function c11819616.initial_effect(c) - --negate - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(11819616,0)) - e2:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_CHAINING) - e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) - e2:SetRange(LOCATION_MZONE) - e2:SetCondition(c11819616.discon) - e2:SetCost(c11819616.discost) - e2:SetTarget(c11819616.distg) - e2:SetOperation(c11819616.disop) - c:RegisterEffect(e2) -end -function c11819616.discon(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) then return false end - if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end - local tg=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) - return tg and tg:IsExists(Card.IsOnField,1,nil) and Duel.IsChainNegatable(ev) -end -function c11819616.costfilter(c) - return c:IsFaceup() and c:IsRace(RACE_PLANT) and not c:IsStatus(STATUS_BATTLE_DESTROYED) -end -function c11819616.discost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,c11819616.costfilter,1,nil) end - local sg=Duel.SelectReleaseGroup(tp,c11819616.costfilter,1,1,nil) - Duel.Release(sg,REASON_COST) -end -function c11819616.distg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) - end -end -function c11819616.disop(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateActivation(ev) - if re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(eg,REASON_EFFECT) - end -end diff --git a/script/c11830996.lua b/script/c11830996.lua deleted file mode 100644 index 229244175f..0000000000 --- a/script/c11830996.lua +++ /dev/null @@ -1,31 +0,0 @@ ---エンシェント・リーフ -function c11830996.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c11830996.condition) - e1:SetCost(c11830996.cost) - e1:SetTarget(c11830996.target) - e1:SetOperation(c11830996.activate) - c:RegisterEffect(e1) -end -function c11830996.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetLP(tp)>=9000 -end -function c11830996.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.PayLPCost(tp,2000) -end -function c11830996.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp,2) end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(2) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2) -end -function c11830996.activate(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end diff --git a/script/c11834972.lua b/script/c11834972.lua deleted file mode 100644 index 8967c5647a..0000000000 --- a/script/c11834972.lua +++ /dev/null @@ -1,42 +0,0 @@ ---ラヴァル・ガンナー -function c11834972.initial_effect(c) - --atkup - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(11834972,0)) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetCondition(c11834972.condition) - e1:SetCost(c11834972.cost) - e1:SetOperation(c11834972.operation) - c:RegisterEffect(e1) -end -function c11834972.cfilter(c) - return c:IsSetCard(0x39) and c:GetCode()~=11834972 -end -function c11834972.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c11834972.cfilter,tp,LOCATION_GRAVE,0,1,nil) -end -function c11834972.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDiscardDeckAsCost(tp,1) end - local ct=Duel.GetFieldGroupCount(tp,LOCATION_DECK,0) - if ct>5 then ct=5 end - local t={} - for i=1,ct do t[i]=i end - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(11834972,1)) - local ac=Duel.AnnounceNumber(tp,table.unpack(t)) - Duel.DiscardDeck(tp,ac,REASON_COST) - local g=Duel.GetOperatedGroup() - e:SetLabel(g:FilterCount(Card.IsSetCard,nil,0x39)*200) -end -function c11834972.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFaceup() and c:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+0x1ff0000) - e1:SetValue(e:GetLabel()) - c:RegisterEffect(e1) - end -end diff --git a/script/c11868731.lua b/script/c11868731.lua deleted file mode 100644 index a661705d23..0000000000 --- a/script/c11868731.lua +++ /dev/null @@ -1,53 +0,0 @@ ---マドルチェ・マジョレーヌ -function c11868731.initial_effect(c) - --to deck - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(11868731,0)) - e1:SetCategory(CATEGORY_TODECK) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCondition(c11868731.retcon) - e1:SetTarget(c11868731.rettg) - e1:SetOperation(c11868731.retop) - c:RegisterEffect(e1) - --search - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(11868731,1)) - e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_SUMMON_SUCCESS) - e2:SetTarget(c11868731.shtg) - e2:SetOperation(c11868731.shop) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - c:RegisterEffect(e3) -end -function c11868731.retcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsReason(REASON_DESTROY) and e:GetHandler():GetReasonPlayer()~=tp - and e:GetHandler():GetPreviousControler()==tp -end -function c11868731.rettg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0) -end -function c11868731.retop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_EFFECT) - end -end -function c11868731.filter(c) - return c:IsSetCard(0x71) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() -end -function c11868731.shtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c11868731.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c11868731.shop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c11868731.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c11868825.lua b/script/c11868825.lua deleted file mode 100644 index 5dab0fc7b7..0000000000 --- a/script/c11868825.lua +++ /dev/null @@ -1,22 +0,0 @@ ---ゴブリンの秘薬 -function c11868825.initial_effect(c) - --recover - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCategory(CATEGORY_RECOVER) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c11868825.rectg) - e1:SetOperation(c11868825.recop) - c:RegisterEffect(e1) -end -function c11868825.rectg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(600) - Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,600) -end -function c11868825.recop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Recover(p,d,REASON_EFFECT) -end diff --git a/script/c11877465.lua b/script/c11877465.lua deleted file mode 100644 index c9d1f3a159..0000000000 --- a/script/c11877465.lua +++ /dev/null @@ -1,30 +0,0 @@ ---イビリチュア・マインドオーガス -function c11877465.initial_effect(c) - c:EnableReviveLimit() - --return to deck - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(11877465,0)) - e1:SetCategory(CATEGORY_TODECK) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCondition(c11877465.condition) - e1:SetTarget(c11877465.target) - e1:SetOperation(c11877465.operation) - c:RegisterEffect(e1) -end -function c11877465.condition(e,tp,eg,ep,ev,re,r,rp) - return bit.band(e:GetHandler():GetSummonType(),SUMMON_TYPE_RITUAL)==SUMMON_TYPE_RITUAL -end -function c11877465.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsAbleToDeck() end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectTarget(tp,Card.IsAbleToDeck,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,5,nil) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0) -end -function c11877465.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local sg=g:Filter(Card.IsRelateToEffect,nil,e) - Duel.SendtoDeck(sg,nil,2,REASON_EFFECT) -end diff --git a/script/c11901678.lua b/script/c11901678.lua deleted file mode 100644 index 9fde1cfb74..0000000000 --- a/script/c11901678.lua +++ /dev/null @@ -1,6 +0,0 @@ ---ブラック・デーモンズ・ドラゴン -function c11901678.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcCode2(c,70781052,74677422,true,true) -end diff --git a/script/c11913700.lua b/script/c11913700.lua deleted file mode 100644 index f11ef2cfe0..0000000000 --- a/script/c11913700.lua +++ /dev/null @@ -1,74 +0,0 @@ ---インスタント・ネオスペース -function c11913700.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c11913700.target) - e1:SetOperation(c11913700.operation) - c:RegisterEffect(e1) - --Equip limit - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_EQUIP_LIMIT) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetValue(c11913700.eqlimit) - c:RegisterEffect(e2) - --equip effect - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_EQUIP) - e3:SetCode(42015635) - c:RegisterEffect(e3) - --spsummon - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(11913700,0)) - e4:SetCategory(CATEGORY_SPECIAL_SUMMON) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e4:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP) - e4:SetCode(EVENT_LEAVE_FIELD) - e4:SetCondition(c11913700.spcon) - e4:SetTarget(c11913700.sptg) - e4:SetOperation(c11913700.spop) - c:RegisterEffect(e4) -end -function c11913700.eqlimit(e,c) - return c:IsSetCard(0x9) and c:IsType(TYPE_FUSION) and not c:IsCode(31111109) -end -function c11913700.filter(c) - return c:IsFaceup() and c:IsSetCard(0x9) and c:IsType(TYPE_FUSION) and not c:IsCode(31111109) -end -function c11913700.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c11913700.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c11913700.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c11913700.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c11913700.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,e:GetHandler(),tc) - end -end -function c11913700.spcon(e,tp,eg,ep,ev,re,r,rp) - local ec=e:GetHandler():GetPreviousEquipTarget() - return e:GetHandler():IsReason(REASON_LOST_TARGET) and not ec:IsLocation(LOCATION_ONFIELD+LOCATION_OVERLAY) -end -function c11913700.spfilter(c,e,tp) - return c:IsCode(89943723) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsHasEffect(EFFECT_NECRO_VALLEY) -end -function c11913700.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c11913700.spfilter,tp,0x13,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,0x13) -end -function c11913700.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c11913700.spfilter,tp,0x13,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c11925569.lua b/script/c11925569.lua deleted file mode 100644 index c99903a044..0000000000 --- a/script/c11925569.lua +++ /dev/null @@ -1,31 +0,0 @@ ---狩猟本能 -function c11925569.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(c11925569.condition) - e1:SetTarget(c11925569.target) - e1:SetOperation(c11925569.activate) - c:RegisterEffect(e1) -end -function c11925569.condition(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(Card.IsControler,1,nil,1-tp) -end -function c11925569.filter(c,e,tp) - return c:IsRace(RACE_DINOSAUR) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c11925569.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c11925569.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c11925569.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c11925569.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c11954712.lua b/script/c11954712.lua deleted file mode 100644 index a7038de784..0000000000 --- a/script/c11954712.lua +++ /dev/null @@ -1,57 +0,0 @@ ---フライファング -function c11954712.initial_effect(c) - --reg - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_BATTLE_DAMAGE) - e1:SetOperation(c11954712.regop) - c:RegisterEffect(e1) - --pierce - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_PIERCE) - c:RegisterEffect(e2) - --remove - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(11954712,0)) - e3:SetCategory(CATEGORY_REMOVE) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e3:SetRange(LOCATION_MZONE) - e3:SetCode(EVENT_PHASE+PHASE_BATTLE) - e3:SetCountLimit(1) - e3:SetCondition(c11954712.rmcon) - e3:SetTarget(c11954712.rmtg) - e3:SetOperation(c11954712.rmop) - c:RegisterEffect(e3) -end -function c11954712.regop(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():RegisterFlagEffect(11954712,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_BATTLE,0,1) -end -function c11954712.rmcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetFlagEffect(11954712)~=0 -end -function c11954712.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_REMOVE,e:GetHandler(),1,0,0) -end -function c11954712.rmop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - if Duel.Remove(c,0,REASON_EFFECT+REASON_TEMPORARY)==0 then return end - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) - e1:SetCountLimit(1) - e1:SetLabelObject(c) - e1:SetCondition(c11954712.retcon) - e1:SetOperation(c11954712.retop) - e1:SetReset(RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN) - Duel.RegisterEffect(e1,tp) - end -end -function c11954712.retcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c11954712.retop(e,tp,eg,ep,ev,re,r,rp) - Duel.ReturnToField(e:GetLabelObject()) -end diff --git a/script/c11958188.lua b/script/c11958188.lua deleted file mode 100644 index f6703804f9..0000000000 --- a/script/c11958188.lua +++ /dev/null @@ -1,39 +0,0 @@ ---武神器-マフツ -function c11958188.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(11958188,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c11958188.descon) - e1:SetCost(c11958188.descost) - e1:SetTarget(c11958188.destg) - e1:SetOperation(c11958188.desop) - c:RegisterEffect(e1) -end -function c11958188.cfilter(c,tp) - return c:IsSetCard(0x88) and c:IsControler(tp) and c:GetPreviousControler()==tp - and c:IsLocation(LOCATION_GRAVE) and c:IsReason(REASON_BATTLE) -end -function c11958188.descon(e,tp,eg,ep,ev,re,r,rp) - local g=eg:Filter(c11958188.cfilter,nil,tp) - e:SetLabelObject(g:GetFirst()) - return g:GetCount()>0 -end -function c11958188.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end -function c11958188.destg(e,tp,eg,ep,ev,re,r,rp,chk) - local tc=e:GetLabelObject():GetReasonCard() - if chk==0 then return tc:IsRelateToBattle() and tc:IsDestructable() end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,tc,1,0,0) -end -function c11958188.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetLabelObject():GetReasonCard() - if tc:IsRelateToBattle() then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c11961740.lua b/script/c11961740.lua deleted file mode 100644 index e769d4dd38..0000000000 --- a/script/c11961740.lua +++ /dev/null @@ -1,53 +0,0 @@ ---タイムカプセル -function c11961740.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_REMOVE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c11961740.target) - e1:SetOperation(c11961740.activate) - c:RegisterEffect(e1) -end -function c11961740.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_DECK) -end -function c11961740.activate(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_DECK,0,1,1,nil) - local tc=g:GetFirst() - if tc then - Duel.Remove(tc,POS_FACEDOWN,REASON_EFFECT) - tc:RegisterFlagEffect(11961740,RESET_EVENT+0x1fe0000,0,1) - c:CancelToGrave() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetRange(LOCATION_SZONE) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) - e1:SetCountLimit(1) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,2) - e1:SetCondition(c11961740.thcon) - e1:SetOperation(c11961740.thop) - e1:SetLabel(0) - e1:SetLabelObject(tc) - c:RegisterEffect(e1) - end - end -end -function c11961740.thcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c11961740.thop(e,tp,eg,ep,ev,re,r,rp) - local ct=e:GetLabel() - e:GetHandler():SetTurnCounter(ct+1) - if ct==1 then - Duel.Destroy(e:GetHandler(),REASON_RULE) - local tc=e:GetLabelObject() - if tc:GetFlagEffect(11961740)~=0 then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - end - else e:SetLabel(1) end -end diff --git a/script/c11975962.lua b/script/c11975962.lua deleted file mode 100644 index 577d2a092a..0000000000 --- a/script/c11975962.lua +++ /dev/null @@ -1,32 +0,0 @@ ---抹殺の聖刻印 -function c11975962.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_REMOVE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,0x1e0) - e1:SetCost(c11975962.cost) - e1:SetTarget(c11975962.target) - e1:SetOperation(c11975962.activate) - c:RegisterEffect(e1) -end -function c11975962.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsSetCard,1,nil,0x69) end - local g=Duel.SelectReleaseGroup(tp,Card.IsSetCard,1,1,nil,0x69) - Duel.Release(g,REASON_COST) -end -function c11975962.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and chkc:IsAbleToRemove() end - if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) -end -function c11975962.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) - end -end diff --git a/script/c1200843.lua b/script/c1200843.lua deleted file mode 100644 index a34ec86997..0000000000 --- a/script/c1200843.lua +++ /dev/null @@ -1,54 +0,0 @@ ---八汰鏡 -function c1200843.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c1200843.target) - e1:SetOperation(c1200843.operation) - c:RegisterEffect(e1) - --spirit may not return - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_SPIRIT_MAYNOT_RETURN) - e2:SetRange(LOCATION_SZONE) - c:RegisterEffect(e2) - --Equip limit - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_EQUIP_LIMIT) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e3:SetValue(c1200843.eqlimit) - c:RegisterEffect(e3) - --destroy sub - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_EQUIP) - e4:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e4:SetCode(EFFECT_DESTROY_SUBSTITUTE) - e4:SetValue(c1200843.desval) - c:RegisterEffect(e4) -end -function c1200843.eqlimit(e,c) - return c:IsType(TYPE_SPIRIT) -end -function c1200843.filter(c) - return c:IsFaceup() and c:IsType(TYPE_SPIRIT) -end -function c1200843.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c1200843.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c1200843.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c1200843.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) -end -function c1200843.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,c,tc) - end -end -function c1200843.desval(e,re,r,rp) - return bit.band(r,REASON_BATTLE)~=0 -end diff --git a/script/c12014404.lua b/script/c12014404.lua deleted file mode 100644 index 20d4f4307c..0000000000 --- a/script/c12014404.lua +++ /dev/null @@ -1,64 +0,0 @@ ---ガガガガンマン -function c12014404.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,4,2) - c:EnableReviveLimit() - --effect - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DAMAGE) - e1:SetDescription(aux.Stringid(12014404,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c12014404.cost) - e1:SetTarget(c12014404.target) - e1:SetOperation(c12014404.operation) - c:RegisterEffect(e1) -end -function c12014404.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c12014404.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - if e:GetHandler():IsDefencePos() then - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,800) - end -end -function c12014404.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) then return end - if c:IsDefencePos() then - Duel.Damage(1-tp,800,REASON_EFFECT) - elseif c:IsPosition(POS_FACEUP_ATTACK) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EVENT_BATTLE_START) - e1:SetOperation(c12014404.atkop) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - c:RegisterEffect(e1) - end -end -function c12014404.atkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local bc=c:GetBattleTarget() - if bc then - if c:GetFlagEffect(12014404)~=0 then return end - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(1000) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_DAMAGE) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(-500) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_DAMAGE) - bc:RegisterEffect(e2) - c:RegisterFlagEffect(12014404,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_DAMAGE,0,1) - end -end diff --git a/script/c12071500.lua b/script/c12071500.lua deleted file mode 100644 index c05b5d7a54..0000000000 --- a/script/c12071500.lua +++ /dev/null @@ -1,85 +0,0 @@ ---ダーク・コーリング -function c12071500.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c12071500.target) - e1:SetOperation(c12071500.activate) - c:RegisterEffect(e1) -end -function c12071500.filter0(c) - return c:IsCanBeFusionMaterial() and c:IsAbleToRemove() -end -function c12071500.filter1(c,e) - return c:IsCanBeFusionMaterial() and c:IsAbleToRemove() and not c:IsImmuneToEffect(e) -end -function c12071500.filter2(c,e,tp,m,f,chkf) - return c:IsType(TYPE_FUSION) and c:IsSetCard(0x102) and (not f or f(c)) - and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION+0x10,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf) -end -function c12071500.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp - local mg1=Duel.GetMatchingGroup(c12071500.filter0,tp,LOCATION_HAND+LOCATION_GRAVE,0,nil) - local res=Duel.IsExistingMatchingCard(c12071500.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf) - if not res then - local ce=Duel.GetChainMaterial(tp) - if ce~=nil then - local fgroup=ce:GetTarget() - local mg2=fgroup(ce,e,tp) - local mf=ce:GetValue() - res=Duel.IsExistingMatchingCard(c12071500.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,chkf) - end - end - return res - end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function c12071500.activate(e,tp,eg,ep,ev,re,r,rp) - local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp - local mg1=Duel.GetMatchingGroup(c12071500.filter1,tp,LOCATION_GRAVE+LOCATION_HAND,0,nil,e) - local sg1=Duel.GetMatchingGroup(c12071500.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf) - local mg2=nil - local sg2=nil - local ce=Duel.GetChainMaterial(tp) - if ce~=nil then - local fgroup=ce:GetTarget() - mg2=fgroup(ce,e,tp) - local mf=ce:GetValue() - sg2=Duel.GetMatchingGroup(c12071500.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,mf,chkf) - end - if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then - local sg=sg1:Clone() - if sg2 then sg:Merge(sg2) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local tg=sg:Select(tp,1,1,nil) - local tc=tg:GetFirst() - if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then - local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf) - tc:SetMaterial(mat1) - Duel.Remove(mat1,POS_FACEUP,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION) - Duel.BreakEffect() - Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION+0x10,tp,tp,false,false,POS_FACEUP) - else - local mat2=Duel.SelectFusionMaterial(tp,tc,mg2,nil,chkf) - local fop=ce:GetOperation() - fop(ce,e,tp,tc,mat2,SUMMON_TYPE_FUSION+0x10) - end - tc:CompleteProcedure() - else - local cg1=Duel.GetFieldGroup(tp,LOCATION_HAND,0) - local cg2=Duel.GetFieldGroup(tp,LOCATION_EXTRA,0) - local ct=cg1:GetCount() - if not Duel.IsPlayerAffectedByEffect(tp,30459350) then - ct=ct+Duel.GetMatchingGroupCount(Card.IsType,tp,LOCATION_GRAVE,0,nil,TYPE_MONSTER) - end - if ct>1 and cg2:IsExists(Card.IsFacedown,1,nil) - and Duel.IsPlayerCanSpecialSummon(tp) and not Duel.IsPlayerAffectedByEffect(tp,27581098) then - Duel.ConfirmCards(1-tp,cg1) - Duel.ConfirmCards(1-tp,cg2) - Duel.ShuffleHand(tp) - end - end -end diff --git a/script/c12076263.lua b/script/c12076263.lua deleted file mode 100644 index df44429c2a..0000000000 --- a/script/c12076263.lua +++ /dev/null @@ -1,30 +0,0 @@ ---ゼンマイドッグ -function c12076263.initial_effect(c) - --atk/lv up - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(12076263,0)) - e1:SetProperty(EFFECT_FLAG_NO_TURN_RESET) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetOperation(c12076263.operation) - c:RegisterEffect(e1) -end -function c12076263.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFaceup() and c:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+0x1ff0000+RESET_PHASE+PHASE_END) - e1:SetValue(600) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_UPDATE_LEVEL) - e2:SetReset(RESET_EVENT+0x1ff0000+RESET_PHASE+PHASE_END) - e2:SetValue(2) - c:RegisterEffect(e2) - end -end diff --git a/script/c12079734.lua b/script/c12079734.lua deleted file mode 100644 index 6c7928fe82..0000000000 --- a/script/c12079734.lua +++ /dev/null @@ -1,64 +0,0 @@ ---デルタトライ -function c12079734.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(12079734,0)) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_BATTLE_DESTROYING) - e1:SetCondition(aux.bdocon) - e1:SetTarget(c12079734.target) - e1:SetOperation(c12079734.operation) - c:RegisterEffect(e1) -end -function c12079734.filter1(c,ec) - return c:IsType(TYPE_UNION) and c:CheckEquipTarget(ec) -end -function c12079734.filter2(c) - return c:IsFaceup() and c:IsRace(RACE_MACHINE) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsAbleToDeck() -end -function c12079734.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local c=e:GetHandler() - if chkc then - if e:GetLabel()==0 then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c12079734.filter1(chkc,c) - else return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c12079734.filter2(chkc) end - end - local b1=Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and c:GetUnionCount()==0 - and Duel.IsExistingTarget(c12079734.filter1,tp,LOCATION_GRAVE,0,1,nil,c) - local b2=Duel.IsExistingTarget(c12079734.filter2,tp,LOCATION_MZONE,0,1,nil) and Duel.IsPlayerCanDraw(tp,1) - if chk==0 then return b1 or b2 end - local op=0 - if b1 and b2 then - op=Duel.SelectOption(tp,aux.Stringid(12079734,1),aux.Stringid(12079734,2)) - elseif b1 then - op=Duel.SelectOption(tp,aux.Stringid(12079734,1)) - else op=Duel.SelectOption(tp,aux.Stringid(12079734,2))+1 end - e:SetLabel(op) - if op==0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local g=Duel.SelectTarget(tp,c12079734.filter1,tp,LOCATION_GRAVE,0,1,1,nil,c) - Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g,1,0,0) - else - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectTarget(tp,c12079734.filter2,tp,LOCATION_MZONE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) - end -end -function c12079734.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if e:GetLabel()==0 then - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() and c:GetUnionCount()==0 - and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and tc:IsRelateToEffect(e) then - Duel.Equip(tp,tc,c,false) - tc:SetStatus(STATUS_UNION,true) - end - else - if tc:IsRelateToEffect(e) and Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)~=0 then - Duel.ShuffleDeck(tp) - Duel.BreakEffect() - Duel.Draw(tp,1,REASON_EFFECT) - end - end -end diff --git a/script/c12117532.lua b/script/c12117532.lua deleted file mode 100644 index d05e3afd24..0000000000 --- a/script/c12117532.lua +++ /dev/null @@ -1,80 +0,0 @@ ---罅割れゆく斧 -function c12117532.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DISABLE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_END_PHASE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c12117532.target) - e1:SetOperation(c12117532.operation) - c:RegisterEffect(e1) - --Destroy - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e2:SetRange(LOCATION_SZONE) - e2:SetCode(EVENT_LEAVE_FIELD) - e2:SetCondition(c12117532.descon) - e2:SetOperation(c12117532.desop) - c:RegisterEffect(e2) - --atkdown - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(12117532,0)) - e3:SetCategory(CATEGORY_ATKCHANGE) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e3:SetCode(EVENT_PHASE+PHASE_STANDBY) - e3:SetRange(LOCATION_SZONE) - e3:SetCountLimit(1) - e3:SetCondition(c12117532.atkcon) - e3:SetOperation(c12117532.atkop) - c:RegisterEffect(e3) -end -function c12117532.filter(c) - return c:IsFaceup() -end -function c12117532.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c12117532.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c12117532.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - local g=Duel.SelectTarget(tp,c12117532.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0) -end -function c12117532.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsRelateToEffect(e) then - c:SetCardTarget(tc) - end -end -function c12117532.descon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsStatus(STATUS_DESTROY_CONFIRMED) then return false end - local tc=c:GetFirstCardTarget() - return tc and eg:IsContains(tc) and tc:IsReason(REASON_DESTROY) -end -function c12117532.desop(e,tp,eg,ep,ev,re,r,rp) - Duel.Destroy(e:GetHandler(),REASON_EFFECT) -end -function c12117532.atkcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp and e:GetHandler():GetFirstCardTarget()~=nil -end -function c12117532.atkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) then return end - local tc=c:GetFirstCardTarget() - if tc then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_OWNER_RELATE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(-500) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetCondition(c12117532.rcon) - tc:RegisterEffect(e1,true) - end -end -function c12117532.rcon(e) - return e:GetOwner():IsHasCardTarget(e:GetHandler()) -end diff --git a/script/c12152769.lua b/script/c12152769.lua deleted file mode 100644 index c9b8422bbd..0000000000 --- a/script/c12152769.lua +++ /dev/null @@ -1,41 +0,0 @@ ---おねだりゴブリン -function c12152769.initial_effect(c) - --search - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(12152769,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_BATTLE_DAMAGE) - e1:SetCondition(c12152769.condition) - e1:SetTarget(c12152769.target) - e1:SetOperation(c12152769.operation) - c:RegisterEffect(e1) -end -function c12152769.condition(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp -end -function c12152769.filter(c) - return c:IsSetCard(0xac) and c:IsAbleToHand() -end -function c12152769.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c12152769.operation(e,tp,eg,ep,ev,re,r,rp) - local hg=Duel.GetFieldGroup(1-tp,LOCATION_HAND,0) - if hg:GetCount()>0 and Duel.SelectYesNo(1-tp,aux.Stringid(12152769,1)) then - Duel.Hint(HINT_SELECTMSG,1-tp,aux.Stringid(12152769,2)) - local sg=hg:Select(1-tp,1,1,nil) - Duel.SendtoHand(sg,tp,REASON_EFFECT) - if Duel.IsChainDisablable(0) then - Duel.NegateEffect(0) - return - end - end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c12152769.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c12160911.lua b/script/c12160911.lua deleted file mode 100644 index 807cd6a647..0000000000 --- a/script/c12160911.lua +++ /dev/null @@ -1,27 +0,0 @@ ---恵災いの像 -function c12160911.initial_effect(c) - --damage - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(12160911,0)) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCondition(c12160911.condition) - e1:SetTarget(c12160911.target) - e1:SetOperation(c12160911.operation) - c:RegisterEffect(e1) -end -function c12160911.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_HAND) and rp~=tp and bit.band(r,REASON_EFFECT)==REASON_EFFECT -end -function c12160911.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(2000) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,2000) -end -function c12160911.operation(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c12171659.lua b/script/c12171659.lua deleted file mode 100644 index a431f762ac..0000000000 --- a/script/c12171659.lua +++ /dev/null @@ -1,43 +0,0 @@ ---天空の使者 ゼラディアス -function c12171659.initial_effect(c) - --search - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(12171659,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND) - e1:SetCost(c12171659.cost) - e1:SetTarget(c12171659.target) - e1:SetOperation(c12171659.operation) - c:RegisterEffect(e1) - --self destroy - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EFFECT_SELF_DESTROY) - e2:SetCondition(c12171659.descon) - c:RegisterEffect(e2) -end -function c12171659.cost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToGraveAsCost() and c:IsDiscardable() end - Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD) -end -function c12171659.filter(c) - return c:GetCode()==56433456 and c:IsAbleToHand() -end -function c12171659.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chk==0 then return Duel.IsExistingMatchingCard(c12171659.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c12171659.operation(e,tp,eg,ep,ev,re,r,rp,chk) - local tg=Duel.GetFirstMatchingCard(c12171659.filter,tp,LOCATION_DECK,0,nil) - if tg then - Duel.SendtoHand(tg,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tg) - end -end -function c12171659.descon(e) - return not Duel.IsEnvironment(56433456) -end diff --git a/script/c12174035.lua b/script/c12174035.lua deleted file mode 100644 index 358ad58f33..0000000000 --- a/script/c12174035.lua +++ /dev/null @@ -1,64 +0,0 @@ ---ハイドロプレッシャーカノン -function c12174035.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c12174035.target) - e1:SetOperation(c12174035.operation) - c:RegisterEffect(e1) - --Equip limit - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_EQUIP_LIMIT) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetValue(c12174035.eqlimit) - c:RegisterEffect(e2) - --handes - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(12174035,0)) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e3:SetRange(LOCATION_SZONE) - e3:SetCategory(CATEGORY_TOGRAVE) - e3:SetCode(EVENT_BATTLE_DESTROYING) - e3:SetCondition(c12174035.hdcon) - e3:SetTarget(c12174035.hdtg) - e3:SetOperation(c12174035.hdop) - c:RegisterEffect(e3) -end -function c12174035.eqlimit(e,c) - return c:IsLevelBelow(3) and c:IsAttribute(ATTRIBUTE_WATER) -end -function c12174035.filter(c) - return c:IsFaceup() and c:IsLevelBelow(3) and c:IsAttribute(ATTRIBUTE_WATER) -end -function c12174035.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c12174035.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c12174035.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c12174035.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c12174035.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,c,tc) - end -end -function c12174035.hdcon(e,tp,eg,ep,ev,re,r,rp) - return eg:GetFirst()==e:GetHandler():GetEquipTarget() and eg:GetFirst():IsStatus(STATUS_OPPO_BATTLE) -end -function c12174035.hdtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,1-tp,LOCATION_HAND) -end -function c12174035.hdop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND) - if g:GetCount()==0 then return end - local sg=g:RandomSelect(tp,1) - Duel.SendtoGrave(sg,REASON_EFFECT) -end diff --git a/script/c12181376.lua b/script/c12181376.lua deleted file mode 100644 index 0ac743ffc9..0000000000 --- a/script/c12181376.lua +++ /dev/null @@ -1,62 +0,0 @@ ---トライアングル・X・スパーク -function c12181376.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c12181376.target) - e1:SetOperation(c12181376.activate) - c:RegisterEffect(e1) -end -function c12181376.filter(c) - return c:IsFaceup() and c:IsCode(12206212) -end -function c12181376.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c12181376.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end -end -function c12181376.activate(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local g=Duel.GetMatchingGroup(c12181376.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - local tc=g:GetFirst() - while tc do - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetValue(2700) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - tc=g:GetNext() - end - --cannot activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EFFECT_CANNOT_ACTIVATE) - e1:SetTargetRange(0,1) - e1:SetValue(c12181376.aclimit) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) - --disable - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_DISABLE) - e2:SetTargetRange(0,LOCATION_SZONE) - e2:SetTarget(c12181376.distg) - e2:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e2,tp) - --disable trap monster - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetCode(EFFECT_DISABLE_TRAPMONSTER) - e3:SetTargetRange(0,LOCATION_MZONE) - e3:SetTarget(c12181376.distg) - e3:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e3,tp) -end -function c12181376.aclimit(e,re,tp) - return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_TRAP) -end -function c12181376.distg(e,c) - return c:IsType(TYPE_TRAP) -end diff --git a/script/c12183332.lua b/script/c12183332.lua deleted file mode 100644 index b3d17c79fa..0000000000 --- a/script/c12183332.lua +++ /dev/null @@ -1,30 +0,0 @@ ---ショット・ガン・シャッフル -function c12183332.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - -- - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(12183332,0)) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_SZONE) - e2:SetCountLimit(1) - e2:SetCost(c12183332.cost) - e2:SetOperation(c12183332.operation) - c:RegisterEffect(e2) -end -function c12183332.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,300) end - Duel.PayLPCost(tp,300) -end -function c12183332.operation(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local opt=Duel.SelectOption(tp,aux.Stringid(12183332,1),aux.Stringid(12183332,2)) - if opt==0 then - Duel.ShuffleDeck(tp) - else - Duel.ShuffleDeck(1-tp) - end -end diff --git a/script/c12197543.lua b/script/c12197543.lua deleted file mode 100644 index 14c1674e23..0000000000 --- a/script/c12197543.lua +++ /dev/null @@ -1,41 +0,0 @@ ---剣の采配 -function c12197543.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCategory(CATEGORY_HANDES+CATEGORY_DESTROY) - e1:SetCode(EVENT_DRAW) - e1:SetCondition(c12197543.condition) - e1:SetOperation(c12197543.activate) - c:RegisterEffect(e1) -end -function c12197543.condition(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp and r==REASON_RULE -end -function c12197543.dfilter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable() -end -function c12197543.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=eg:GetFirst() - if tc:IsLocation(LOCATION_HAND) then - Duel.ConfirmCards(tp,tc) - if tc:IsType(TYPE_SPELL+TYPE_TRAP) then - local g=Duel.GetMatchingGroup(c12197543.dfilter,tp,0,LOCATION_ONFIELD,nil) - local opt=0 - if g:GetCount()==0 then - opt=Duel.SelectOption(tp,aux.Stringid(12197543,0)) - else - opt=Duel.SelectOption(tp,aux.Stringid(12197543,0),aux.Stringid(12197543,1)) - end - if opt==0 then Duel.SendtoGrave(tc,REASON_EFFECT+REASON_DISCARD) - else - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local dg=g:Select(tp,1,1,nil) - Duel.Destroy(dg,REASON_EFFECT) - Duel.ShuffleHand(1-tp) - end - end - else - Duel.ShuffleHand(1-tp) - end -end diff --git a/script/c12206212.lua b/script/c12206212.lua deleted file mode 100644 index 559a28d3a1..0000000000 --- a/script/c12206212.lua +++ /dev/null @@ -1,4 +0,0 @@ ---ハーピィ・レディ三姉妹 -function c12206212.initial_effect(c) - c:EnableReviveLimit() -end diff --git a/script/c12216615.lua b/script/c12216615.lua deleted file mode 100644 index 25e0d168b9..0000000000 --- a/script/c12216615.lua +++ /dev/null @@ -1,29 +0,0 @@ ---コアキメイルの障壁 -function c12216615.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetCondition(c12216615.condition) - e1:SetTarget(c12216615.target) - e1:SetOperation(c12216615.activate) - c:RegisterEffect(e1) -end -function c12216615.condition(e,tp,eg,ep,ev,re,r,rp) - return tp~=Duel.GetTurnPlayer() and Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_GRAVE,0,2,nil,36623431) -end -function c12216615.filter(c) - return c:IsPosition(POS_FACEUP_ATTACK) and c:IsDestructable() -end -function c12216615.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c12216615.filter,tp,0,LOCATION_MZONE,1,nil) end - local g=Duel.GetMatchingGroup(c12216615.filter,tp,0,LOCATION_MZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c12216615.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c12216615.filter,tp,0,LOCATION_MZONE,nil) - if g:GetCount()>0 then - Duel.Destroy(g,REASON_EFFECT) - end -end diff --git a/script/c12235475.lua b/script/c12235475.lua deleted file mode 100644 index 943c426820..0000000000 --- a/script/c12235475.lua +++ /dev/null @@ -1,34 +0,0 @@ ---魔轟神アシェンヴェイル -function c12235475.initial_effect(c) - --attack up - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(12235475,0)) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_QUICK_O+EFFECT_TYPE_FIELD) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EVENT_PRE_DAMAGE_CALCULATE) - e1:SetCondition(c12235475.con) - e1:SetCost(c12235475.cost) - e1:SetOperation(c12235475.op) - c:RegisterEffect(e1) -end -function c12235475.con(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:GetFlagEffect(12235475)==0 and (Duel.GetAttacker()==c or Duel.GetAttackTarget()==c) -end -function c12235475.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,1,1,nil) - Duel.SendtoGrave(g,REASON_COST) - e:GetHandler():RegisterFlagEffect(12235475,RESET_PHASE+RESET_DAMAGE_CAL,0,1) -end -function c12235475.op(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_PHASE+RESET_DAMAGE_CAL) - e1:SetValue(600) - c:RegisterEffect(e1) -end diff --git a/script/c12247206.lua b/script/c12247206.lua deleted file mode 100644 index 9318decfa3..0000000000 --- a/script/c12247206.lua +++ /dev/null @@ -1,82 +0,0 @@ ---地獄の暴走召喚 -function c12247206.initial_effect(c) - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(c12247206.condition) - e1:SetTarget(c12247206.target) - e1:SetOperation(c12247206.activate) - c:RegisterEffect(e1) -end -function c12247206.condition(e,tp,eg,ep,ev,re,r,rp) - local tc=eg:GetFirst() - return eg:GetCount()==1 and tc:IsLocation(LOCATION_MZONE) and tc:IsControler(tp) and tc:IsAttackBelow(1500) - and Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) -end -function c12247206.nfilter(c,tc) - return c:IsCode(tc:GetCode()) -end -function c12247206.target(e,tp,eg,ep,ev,re,r,rp,chk) - local tc=eg:GetFirst() - if chk==0 then - local g=Duel.GetMatchingGroup(c12247206.nfilter,tp,0x13,0,nil,tc) - return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and g:GetCount()>0 and g:GetCount()==g:FilterCount(Card.IsCanBeSpecialSummoned,nil,e,0,tp,false,false) - end - tc:CreateEffectRelation(e) - local g=Duel.GetMatchingGroup(c12247206.filter,tp,0x13,0,nil,tc,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,g:GetCount(),PLAYER_ALL,0) -end -function c12247206.filter(c,tc,e,tp) - return c12247206.nfilter(c,tc) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c12247206.selfilter(c,e,tp) - return c:IsFaceup() and Duel.IsExistingMatchingCard(c12247206.filter,tp,0x13,0,1,nil,c,e,tp) -end -function c12247206.rmfilter(c) - return c:IsLocation(LOCATION_MZONE+LOCATION_GRAVE) -end -function c12247206.sp(g,tp,pos) - local sc=g:GetFirst() - while sc do - Duel.SpecialSummonStep(sc,0,tp,tp,false,false,pos) - sc=g:GetNext() - end -end -function c12247206.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=eg:GetFirst() - local ft1=Duel.GetLocationCount(tp,LOCATION_MZONE) - local gg=Group.CreateGroup() - local g=Duel.GetMatchingGroup(c12247206.filter,tp,0x13,0,nil,tc,e,tp) - if g:IsExists(Card.IsHasEffect,1,nil,EFFECT_NECRO_VALLEY) then return end - if ft1>0 and tc:IsFaceup() and tc:IsRelateToEffect(e) then - if g:GetCount()<=ft1 then c12247206.sp(g,tp,POS_FACEUP_ATTACK) - else - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local fg=g:Select(tp,ft1,ft1,nil) - c12247206.sp(fg,tp,POS_FACEUP_ATTACK) - g:Remove(c12247206.rmfilter,nil) - gg:Merge(g) - end - end - local ft2=Duel.GetLocationCount(1-tp,LOCATION_MZONE) - Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_FACEUP) - local sg=Duel.SelectMatchingCard(1-tp,c12247206.selfilter,1-tp,LOCATION_MZONE,0,1,1,nil,e,1-tp) - if ft2>0 and sg:GetCount()>0 then - local g2=Duel.GetMatchingGroup(c12247206.filter,1-tp,0x13,0,nil,sg:GetFirst(),e,1-tp) - if not g2:IsExists(Card.IsHasEffect,1,nil,EFFECT_NECRO_VALLEY) then - if g2:GetCount()<=ft2 then - c12247206.sp(g2,1-tp,POS_FACEUP) - else - Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_SPSUMMON) - local fg=g2:Select(1-tp,ft2,ft2,nil) - c12247206.sp(fg,1-tp,POS_FACEUP) - g2:Remove(c12247206.rmfilter,nil) - gg:Merge(g2) - end - end - end - Duel.SpecialSummonComplete() - Duel.SendtoGrave(gg,REASON_EFFECT) -end diff --git a/script/c1224927.lua b/script/c1224927.lua deleted file mode 100644 index 31132e7536..0000000000 --- a/script/c1224927.lua +++ /dev/null @@ -1,28 +0,0 @@ ---邪神の大災害 -function c1224927.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetCondition(c1224927.condition) - e1:SetTarget(c1224927.target) - e1:SetOperation(c1224927.activate) - c:RegisterEffect(e1) -end -function c1224927.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp -end -function c1224927.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable() -end -function c1224927.target(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return Duel.IsExistingMatchingCard(c1224927.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c) end - local sg=Duel.GetMatchingGroup(c1224927.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,c) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,sg:GetCount(),0,0) -end -function c1224927.activate(e,tp,eg,ep,ev,re,r,rp) - local sg=Duel.GetMatchingGroup(c1224927.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler()) - Duel.Destroy(sg,REASON_EFFECT) -end diff --git a/script/c12253117.lua b/script/c12253117.lua deleted file mode 100644 index 98d7e9e7b6..0000000000 --- a/script/c12253117.lua +++ /dev/null @@ -1,27 +0,0 @@ ---世界の平定 -function c12253117.initial_effect(c) - --activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_CHAINING) - e1:SetCondition(c12253117.condition) - e1:SetOperation(c12253117.activate) - c:RegisterEffect(e1) -end -function c12253117.condition(e,tp,eg,ep,ev,re,r,rp) - return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_FIELD) -end -function c12253117.activate(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - --disable - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_DISABLE) - e1:SetTargetRange(LOCATION_SZONE,LOCATION_SZONE) - e1:SetTarget(c12253117.distarget) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function c12253117.distarget(e,c) - return c:IsType(TYPE_FIELD) -end diff --git a/script/c12275533.lua b/script/c12275533.lua deleted file mode 100644 index b04f19f4b4..0000000000 --- a/script/c12275533.lua +++ /dev/null @@ -1,80 +0,0 @@ ---機動要犀 トリケライナー -function c12275533.initial_effect(c) - --summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(12275533,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,0x1e0) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c12275533.condition) - e1:SetTarget(c12275533.target) - e1:SetOperation(c12275533.operation) - c:RegisterEffect(e1) - --count - if not c12275533.global_check then - c12275533.global_check=true - local ge1=Effect.CreateEffect(c) - ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - ge1:SetCode(EVENT_SPSUMMON_SUCCESS) - ge1:SetOperation(c12275533.checkop) - Duel.RegisterEffect(ge1,0) - local ge2=ge1:Clone() - ge2:SetCode(EVENT_SUMMON_SUCCESS) - Duel.RegisterEffect(ge2,0) - local ge3=ge1:Clone() - ge3:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - Duel.RegisterEffect(ge3,0) - end -end -function c12275533.checkop(e,tp,eg,ep,ev,re,r,rp) - local tc=eg:GetFirst() - while tc do - Duel.RegisterFlagEffect(tc:GetSummonPlayer(),12275533,RESET_PHASE+PHASE_END,0,1) - tc=eg:GetNext() - end -end -function c12275533.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetFlagEffect(1-tp,12275533)>=3 -end -function c12275533.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return not e:GetHandler():IsStatus(STATUS_CHAINING) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c12275533.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_IMMUNE_EFFECT) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(c12275533.efilter) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) - e2:SetReset(RESET_EVENT+0x1fe0000) - e2:SetOperation(c12275533.adjustop) - c:RegisterEffect(e2) - end -end -function c12275533.efilter(e,te) - return te:GetOwner()~=e:GetOwner() -end -function c12275533.adjustop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_COPY_INHERIT) - e1:SetReset(RESET_EVENT+0x1ff0000) - e1:SetCode(EFFECT_UPDATE_DEFENCE) - e1:SetValue(-500) - c:RegisterEffect(e1) -end diff --git a/script/c12296376.lua b/script/c12296376.lua deleted file mode 100644 index 06230c3a87..0000000000 --- a/script/c12296376.lua +++ /dev/null @@ -1,26 +0,0 @@ ---エレキツツキ -function c12296376.initial_effect(c) - --multi attack - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_EXTRA_ATTACK) - e1:SetValue(1) - c:RegisterEffect(e1) - -- - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetCode(EVENT_BATTLED) - e2:SetOperation(c12296376.operation) - c:RegisterEffect(e2) -end -function c12296376.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local bc=c:GetBattleTarget() - if not bc then return end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_CHANGE_POSITION) - e1:SetReset(RESET_EVENT+0x1fe0000) - bc:RegisterEffect(e1) -end diff --git a/script/c12298909.lua b/script/c12298909.lua deleted file mode 100644 index 0daf161e61..0000000000 --- a/script/c12298909.lua +++ /dev/null @@ -1,53 +0,0 @@ ---マテリアルドラゴン -function c12298909.initial_effect(c) - --Negate - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(12298909,0)) - e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_CHAINING) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c12298909.condition) - e1:SetCost(c12298909.cost) - e1:SetTarget(c12298909.target) - e1:SetOperation(c12298909.operation) - c:RegisterEffect(e1) - --damage conversion - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetCode(EFFECT_REVERSE_DAMAGE) - e2:SetRange(LOCATION_MZONE) - e2:SetTargetRange(1,1) - e2:SetValue(c12298909.rev) - c:RegisterEffect(e2) -end -function c12298909.rev(e,re,r,rp,rc) - return bit.band(r,REASON_EFFECT)>0 -end -function c12298909.filter(c) - return c:IsOnField() and c:IsType(TYPE_MONSTER) -end -function c12298909.condition(e,tp,eg,ep,ev,re,r,rp) - if e==re or e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) or not Duel.IsChainNegatable(ev) then return false end - local ex,tg,tc=Duel.GetOperationInfo(ev,CATEGORY_DESTROY) - return ex and tg~=nil and tc+tg:FilterCount(c12298909.filter,nil)-tg:GetCount()>0 -end -function c12298909.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,Card.IsAbleToGraveAsCost,1,1,REASON_COST) -end -function c12298909.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) - end -end -function c12298909.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateActivation(ev) - if re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(eg,REASON_EFFECT) - end -end diff --git a/script/c12299841.lua b/script/c12299841.lua deleted file mode 100644 index 1933d62a83..0000000000 --- a/script/c12299841.lua +++ /dev/null @@ -1,30 +0,0 @@ ---ゼンマイソルジャー -function c12299841.initial_effect(c) - --atk/lv up - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(12299841,0)) - e1:SetProperty(EFFECT_FLAG_NO_TURN_RESET) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetOperation(c12299841.operation) - c:RegisterEffect(e1) -end -function c12299841.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFaceup() and c:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+0x1ff0000+RESET_PHASE+PHASE_END) - e1:SetValue(400) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_UPDATE_LEVEL) - e2:SetReset(RESET_EVENT+0x1ff0000+RESET_PHASE+PHASE_END) - e2:SetValue(1) - c:RegisterEffect(e2) - end -end diff --git a/script/c12324546.lua b/script/c12324546.lua deleted file mode 100644 index e80043c7c4..0000000000 --- a/script/c12324546.lua +++ /dev/null @@ -1,56 +0,0 @@ ---漆黒の名馬 -function c12324546.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c12324546.target) - e1:SetOperation(c12324546.operation) - c:RegisterEffect(e1) - --Atk,def up - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(200) - c:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_EQUIP) - e3:SetCode(EFFECT_UPDATE_DEFENCE) - e3:SetValue(200) - c:RegisterEffect(e3) - --destroy sub - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_EQUIP) - e4:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e4:SetCode(EFFECT_DESTROY_SUBSTITUTE) - e4:SetValue(1) - c:RegisterEffect(e4) - --Equip limit - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_SINGLE) - e5:SetCode(EFFECT_EQUIP_LIMIT) - e5:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e5:SetValue(c12324546.eqlimit) - c:RegisterEffect(e5) -end -function c12324546.eqlimit(e,c) - return c:IsSetCard(0x3d) -end -function c12324546.filter(c) - return c:IsFaceup() and c:IsSetCard(0x3d) -end -function c12324546.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:GetLocation()==LOCATION_MZONE and c12324546.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c12324546.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c12324546.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c12324546.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,e:GetHandler(),tc) - end -end diff --git a/script/c12338068.lua b/script/c12338068.lua deleted file mode 100644 index 9428e2faaf..0000000000 --- a/script/c12338068.lua +++ /dev/null @@ -1,50 +0,0 @@ ---真魔獣 ガーゼット -function c12338068.initial_effect(c) - c:EnableReviveLimit() - --spsummon condition - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_SPSUMMON_PROC) - e2:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e2:SetRange(LOCATION_HAND) - e2:SetCondition(c12338068.spcon) - e2:SetOperation(c12338068.spop) - c:RegisterEffect(e2) - --pierce - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_PIERCE) - c:RegisterEffect(e3) -end -function c12338068.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - local g=Duel.GetFieldGroup(tp,LOCATION_MZONE,0) - local rg=Duel.GetReleaseGroup(tp) - return (g:GetCount()>0 or rg:GetCount()>0) and g:FilterCount(Card.IsReleasable,nil)==g:GetCount() -end -function c12338068.spop(e,tp,eg,ep,ev,re,r,rp,c) - local g=Duel.GetReleaseGroup(tp) - Duel.Release(g,REASON_COST) - local atk=0 - local tc=g:GetFirst() - while tc do - local batk=tc:GetTextAttack() - if batk>0 then - atk=atk+batk - end - tc=g:GetNext() - end - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK) - e1:SetValue(atk) - e1:SetReset(RESET_EVENT+0xff0000) - c:RegisterEffect(e1) -end diff --git a/script/c123709.lua b/script/c123709.lua deleted file mode 100644 index ac077e4665..0000000000 --- a/script/c123709.lua +++ /dev/null @@ -1,76 +0,0 @@ ---ラヴァル・ランスロッド -function c123709.initial_effect(c) - --summon with no tribute - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(123709,0)) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SUMMON_PROC) - e1:SetCondition(c123709.ntcon) - e1:SetOperation(c123709.ntop) - c:RegisterEffect(e1) - --to grave - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(123709,2)) - e2:SetCategory(CATEGORY_TOHAND) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetCondition(c123709.condition) - e2:SetTarget(c123709.target) - e2:SetOperation(c123709.operation) - c:RegisterEffect(e2) -end -function c123709.ntcon(e,c,minc) - if c==nil then return true end - return minc==0 and c:GetLevel()>4 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 -end -function c123709.ntop(e,tp,eg,ep,ev,re,r,rp,c) - --to grave - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(123709,1)) - e1:SetCategory(CATEGORY_TOGRAVE) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetCondition(c123709.tgcon) - e1:SetTarget(c123709.tgtg) - e1:SetOperation(c123709.tgop) - e1:SetReset(RESET_EVENT+0xee0000) - c:RegisterEffect(e1) -end -function c123709.tgcon(e,tp,eg,ep,ev,re,r,rp) - return tp==Duel.GetTurnPlayer() -end -function c123709.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,e:GetHandler(),1,0,0) -end -function c123709.tgop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - Duel.SendtoGrave(c,REASON_EFFECT) - end -end -function c123709.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsReason(REASON_DESTROY) - and bit.band(e:GetHandler():GetPreviousLocation(),LOCATION_ONFIELD)~=0 -end -function c123709.filter(c) - return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_FIRE) and c:IsAbleToHand() -end -function c123709.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and c123709.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c123709.filter,tp,LOCATION_REMOVED,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c123709.filter,tp,LOCATION_REMOVED,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c123709.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end diff --git a/script/c12398280.lua b/script/c12398280.lua deleted file mode 100644 index 58927c1c8f..0000000000 --- a/script/c12398280.lua +++ /dev/null @@ -1,34 +0,0 @@ ---勝利の導き手フレイヤ -function c12398280.initial_effect(c) - --atk def - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetTarget(c12398280.tg) - e1:SetValue(400) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_UPDATE_DEFENCE) - c:RegisterEffect(e2) - --cannot be battle target - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_CANNOT_BE_BATTLE_TARGET) - e1:SetCondition(c12398280.con) - e1:SetValue(aux.imval1) - c:RegisterEffect(e1) -end -function c12398280.tg(e,c) - return c:IsRace(RACE_FAIRY) -end -function c12398280.filter(c) - return c:IsFaceup() and c:IsRace(RACE_FAIRY) and not c:IsCode(12398280) -end -function c12398280.con(e) - local c=e:GetHandler() - return Duel.IsExistingMatchingCard(c12398280.filter,c:GetControler(),LOCATION_MZONE,0,1,c) -end diff --git a/script/c12423762.lua b/script/c12423762.lua deleted file mode 100644 index 61f966decc..0000000000 --- a/script/c12423762.lua +++ /dev/null @@ -1,53 +0,0 @@ ---ガガガガードナー -function c12423762.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(12423762,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c12423762.spcon) - e1:SetTarget(c12423762.sptg) - e1:SetOperation(c12423762.spop) - c:RegisterEffect(e1) - -- - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(12423762,1)) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_BE_BATTLE_TARGET) - e2:SetCost(c12423762.indcost) - e2:SetOperation(c12423762.indop) - c:RegisterEffect(e2) -end -function c12423762.spcon(e,tp,eg,ep,ev,re,r,rp) - local at=Duel.GetAttacker() - return at:GetControler()~=tp and Duel.GetAttackTarget()==nil -end -function c12423762.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0) -end -function c12423762.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) - end -end -function c12423762.indcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) -end -function c12423762.indop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e1:SetValue(1) - e1:SetReset(RESET_PHASE+PHASE_DAMAGE) - c:RegisterEffect(e1) - end -end diff --git a/script/c12435193.lua b/script/c12435193.lua deleted file mode 100644 index 2fd2cabf48..0000000000 --- a/script/c12435193.lua +++ /dev/null @@ -1,60 +0,0 @@ ---コアキメイル・ドラゴ -function c12435193.initial_effect(c) - --cost - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c12435193.mtcon) - e1:SetOperation(c12435193.mtop) - c:RegisterEffect(e1) - --disable spsummon - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetTargetRange(1,1) - e2:SetTarget(c12435193.disspsum) - c:RegisterEffect(e2) -end -function c12435193.mtcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c12435193.cfilter1(c) - return c:IsCode(36623431) and c:IsAbleToGraveAsCost() -end -function c12435193.cfilter2(c) - return c:IsType(TYPE_MONSTER) and c:IsRace(RACE_DRAGON) and not c:IsPublic() -end -function c12435193.mtop(e,tp,eg,ep,ev,re,r,rp) - local g1=Duel.GetMatchingGroup(c12435193.cfilter1,tp,LOCATION_HAND,0,nil) - local g2=Duel.GetMatchingGroup(c12435193.cfilter2,tp,LOCATION_HAND,0,nil) - local select=2 - if g1:GetCount()>0 and g2:GetCount()>0 then - select=Duel.SelectOption(tp,aux.Stringid(12435193,0),aux.Stringid(12435193,1),aux.Stringid(12435193,2)) - elseif g1:GetCount()>0 then - select=Duel.SelectOption(tp,aux.Stringid(12435193,0),aux.Stringid(12435193,2)) - if select==1 then select=2 end - elseif g2:GetCount()>0 then - select=Duel.SelectOption(tp,aux.Stringid(12435193,1),aux.Stringid(12435193,2)) - select=select+1 - end - if select==0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=g1:Select(tp,1,1,nil) - Duel.SendtoGrave(g,REASON_COST) - elseif select==1 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) - local g=g2:Select(tp,1,1,nil) - Duel.ConfirmCards(1-tp,g) - Duel.ShuffleHand(tp) - else - Duel.Destroy(e:GetHandler(),REASON_RULE) - end -end -function c12435193.disspsum(e,c) - return c:IsAttribute(ATTRIBUTE_DARK+ATTRIBUTE_LIGHT) -end diff --git a/script/c12444060.lua b/script/c12444060.lua deleted file mode 100644 index 448c3f8e92..0000000000 --- a/script/c12444060.lua +++ /dev/null @@ -1,68 +0,0 @@ ---アーティファクトの神智 -function c12444060.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(12444060,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,0x11e8) - e1:SetCountLimit(1,12444060+EFFECT_COUNT_CODE_OATH) - e1:SetCost(c12444060.cost) - e1:SetTarget(c12444060.target) - e1:SetOperation(c12444060.activate) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(12444060,1)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_DESTROYED) - e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) - e2:SetCondition(c12444060.descon) - e2:SetTarget(c12444060.destg) - e2:SetOperation(c12444060.desop) - c:RegisterEffect(e2) -end -function c12444060.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_BATTLE_PHASE)==0 end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_BP) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) - e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function c12444060.filter(c,e,tp) - return c:IsSetCard(0x97) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c12444060.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c12444060.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,LOCATION_DECK) -end -function c12444060.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c12444060.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end -function c12444060.descon(e,tp,eg,ep,ev,re,r,rp) - return rp~=tp and e:GetHandler():GetPreviousControler()==tp -end -function c12444060.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsDestructable() end - if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c12444060.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c12451640.lua b/script/c12451640.lua deleted file mode 100644 index 2acccacd44..0000000000 --- a/script/c12451640.lua +++ /dev/null @@ -1,78 +0,0 @@ ---フロント・オブザーバー -function c12451640.initial_effect(c) - --tohand - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetOperation(c12451640.regop) - c:RegisterEffect(e1) -end -function c12451640.regop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(12451640,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetTarget(c12451640.thtg1) - e1:SetOperation(c12451640.thop1) - e1:SetReset(RESET_EVENT+0x1fc0000+RESET_PHASE+RESET_END) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(12451640,1)) - e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_PHASE+PHASE_END) - e2:SetRange(LOCATION_MZONE) - e2:SetCondition(c12451640.thcon) - e2:SetCost(c12451640.thcost) - e2:SetTarget(c12451640.thtg2) - e2:SetOperation(c12451640.thop2) - e2:SetLabel(Duel.GetTurnCount()) - if Duel.GetTurnPlayer()==tp then - e2:SetReset(RESET_EVENT+0x1fc0000+RESET_PHASE+RESET_END+RESET_SELF_TURN,2) - else - e2:SetReset(RESET_EVENT+0x1fc0000+RESET_PHASE+RESET_END+RESET_SELF_TURN) - end - c:RegisterEffect(e2) -end -function c12451640.filter1(c) - return c:IsType(TYPE_PENDULUM) and c:IsAttribute(ATTRIBUTE_EARTH) and c:IsAbleToHand() -end -function c12451640.thtg1(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c12451640.filter1,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c12451640.thop1(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c12451640.filter1,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end -function c12451640.thcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp and Duel.GetTurnCount()~=e:GetLabel() -end -function c12451640.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end -function c12451640.filter2(c) - return c:IsAttribute(ATTRIBUTE_EARTH) and c:IsAbleToHand() -end -function c12451640.thtg2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c12451640.filter2,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c12451640.thop2(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c12451640.filter2,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c12467005.lua b/script/c12467005.lua deleted file mode 100644 index c86931e1a9..0000000000 --- a/script/c12467005.lua +++ /dev/null @@ -1,60 +0,0 @@ ---タックルセイダー -function c12467005.initial_effect(c) - -- - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(12467005,0)) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetTarget(c12467005.target) - e1:SetOperation(c12467005.operation) - c:RegisterEffect(e1) -end -function c12467005.filter1(c) - return c:IsFaceup() and c:IsCanTurnSet() -end -function c12467005.filter2(c) - return c:IsFaceup() and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand() -end -function c12467005.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - local b1=Duel.IsExistingTarget(c12467005.filter1,tp,0,LOCATION_MZONE,1,nil) - local b2=Duel.IsExistingTarget(c12467005.filter2,tp,0,LOCATION_ONFIELD,1,nil) - if chk==0 then return b1 or b2 end - local op=0 - if b1 and b2 then op=Duel.SelectOption(tp,aux.Stringid(12467005,1),aux.Stringid(12467005,2)) - elseif b1 then op=Duel.SelectOption(tp,aux.Stringid(12467005,1)) - else op=Duel.SelectOption(tp,aux.Stringid(12467005,2))+1 end - e:SetLabel(op) - if op==0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE) - local g=Duel.SelectTarget(tp,c12467005.filter1,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0) - else - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g=Duel.SelectTarget(tp,c12467005.filter2,tp,0,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) - end -end -function c12467005.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if not tc:IsRelateToEffect(e) then return end - if e:GetLabel()==0 then - Duel.ChangePosition(tc,POS_FACEDOWN_DEFENCE) - else - local code=tc:GetCode() - Duel.SendtoHand(tc,nil,REASON_EFFECT) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EFFECT_CANNOT_ACTIVATE) - e1:SetTargetRange(0,1) - e1:SetValue(c12467005.aclimit) - e1:SetLabel(code) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) - end -end -function c12467005.aclimit(e,re,tp) - return re:GetHandler():IsCode(e:GetLabel()) -end diff --git a/script/c12469386.lua b/script/c12469386.lua deleted file mode 100644 index 31c1e7b110..0000000000 --- a/script/c12469386.lua +++ /dev/null @@ -1,33 +0,0 @@ ---返り咲く薔薇の大輪 -function c12469386.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(12469386,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetRange(LOCATION_GRAVE) - e1:SetProperty(EFFECT_FLAG_DELAY) - e1:SetCode(EVENT_DESTROYED) - e1:SetCondition(c12469386.spcon) - e1:SetTarget(c12469386.sptg) - e1:SetOperation(c12469386.spop) - c:RegisterEffect(e1) -end -function c12469386.filter(c,tp) - return c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP) - and c:GetPreviousLevelOnField()>=5 and bit.band(c:GetPreviousRaceOnField(),RACE_PLANT)~=0 -end -function c12469386.spcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c12469386.filter,1,e:GetHandler(),tp) -end -function c12469386.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c12469386.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c12470447.lua b/script/c12470447.lua deleted file mode 100644 index 8a6a96befe..0000000000 --- a/script/c12470447.lua +++ /dev/null @@ -1,35 +0,0 @@ ---邪悪な儀式 -function c12470447.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_POSITION) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_COF) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(TIMING_STANDBY_PHASE) - e1:SetCondition(c12470447.condition) - e1:SetTarget(c12470447.target) - e1:SetOperation(c12470447.activate) - c:RegisterEffect(e1) -end -function c12470447.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp and Duel.GetCurrentPhase()==PHASE_STANDBY and e:GetHandler():IsLocation(LOCATION_SZONE) -end -function c12470447.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,LOCATION_MZONE)>0 end - local g=Duel.GetFieldGroup(tp,LOCATION_MZONE,LOCATION_MZONE) - Duel.SetOperationInfo(0,CATEGORY_POSITION,g,g:GetCount(),0,0) -end -function c12470447.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetFieldGroup(tp,LOCATION_MZONE,LOCATION_MZONE) - if g:GetCount()>0 then - Duel.ChangePosition(g,POS_FACEUP_DEFENCE,POS_FACEDOWN_DEFENCE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK) - end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE) - e1:SetCode(EFFECT_CANNOT_CHANGE_POSITION) - e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) -end diff --git a/script/c12472242.lua b/script/c12472242.lua deleted file mode 100644 index 650fc6369e..0000000000 --- a/script/c12472242.lua +++ /dev/null @@ -1,8 +0,0 @@ ---レッグル -function c12472242.initial_effect(c) - --direct attack - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DIRECT_ATTACK) - c:RegisterEffect(e1) -end diff --git a/script/c1248895.lua b/script/c1248895.lua deleted file mode 100644 index 1e1c4e5000..0000000000 --- a/script/c1248895.lua +++ /dev/null @@ -1,39 +0,0 @@ ---連鎖破壊 -function c1248895.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c1248895.target) - e1:SetOperation(c1248895.activate) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - c:RegisterEffect(e2) - local e3=e1:Clone() - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e3) -end -function c1248895.filter(c,e) - return c:IsFaceup() and c:IsAttackBelow(2000) and c:IsCanBeEffectTarget(e) -end -function c1248895.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return eg:IsContains(chkc) end - if chk==0 then return eg:IsExists(c1248895.filter,1,nil,e) end - if eg:GetCount()==1 then - Duel.SetTargetCard(eg) - else - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - local g=eg:FilterSelect(tp,c1248895.filter,1,1,nil,e) - Duel.SetTargetCard(g) - end -end -function c1248895.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - local tpe=tc:GetType() - if bit.band(tpe,TYPE_TOKEN)~=0 then return end - local dg=Duel.GetMatchingGroup(Card.IsCode,tc:GetControler(),LOCATION_DECK+LOCATION_HAND,0,nil,tc:GetCode()) - Duel.Destroy(dg,REASON_EFFECT) -end diff --git a/script/c1249315.lua b/script/c1249315.lua deleted file mode 100644 index b5cb38d2a2..0000000000 --- a/script/c1249315.lua +++ /dev/null @@ -1,40 +0,0 @@ ---聖光の宣告者 -function c1249315.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,2,2) - c:EnableReviveLimit() - --to hand - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(1249315,0)) - e2:SetCategory(CATEGORY_TOHAND) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,1249315) - e2:SetCost(c1249315.thcost) - e2:SetTarget(c1249315.thtg) - e2:SetOperation(c1249315.thop) - c:RegisterEffect(e2) -end -function c1249315.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c1249315.thfilter(c) - return c:IsType(TYPE_MONSTER) and c:IsAbleToHand() -end -function c1249315.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c1249315.thfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c1249315.thfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g=Duel.SelectTarget(tp,c1249315.thfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c1249315.thop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.SendtoHand(tc,nil,REASON_EFFECT)>0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.GetFieldGroup(tp,LOCATION_HAND,0):Select(tp,1,1,nil) - Duel.SendtoDeck(g,nil,2,REASON_EFFECT) - end -end diff --git a/script/c12503902.lua b/script/c12503902.lua deleted file mode 100644 index 658934745e..0000000000 --- a/script/c12503902.lua +++ /dev/null @@ -1,102 +0,0 @@ ---レアメタル化・魔法反射装甲 -function c12503902.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DISABLE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_DAMAGE_STEP) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCondition(c12503902.condition) - e1:SetTarget(c12503902.target) - e1:SetOperation(c12503902.operation) - c:RegisterEffect(e1) - --Destroy - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e3:SetRange(LOCATION_SZONE) - e3:SetCode(EVENT_LEAVE_FIELD) - e3:SetCondition(c12503902.descon2) - e3:SetOperation(c12503902.desop2) - c:RegisterEffect(e3) -end -function c12503902.descon2(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetHandler():GetFirstCardTarget() - return tc and eg:IsContains(tc) -end -function c12503902.desop2(e,tp,eg,ep,ev,re,r,rp) - Duel.Destroy(e:GetHandler(),REASON_EFFECT) -end -function c12503902.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end -function c12503902.filter(c) - return c:IsFaceup() and c:IsRace(RACE_MACHINE) -end -function c12503902.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c12503902.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c12503902.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - Duel.SelectTarget(tp,c12503902.filter,tp,LOCATION_MZONE,0,1,1,nil) -end -function c12503902.tfilter1(c,tc) - return c:IsType(TYPE_SPELL) and c:IsHasCardTarget(tc) -end -function c12503902.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and c12503902.filter(tc) and tc:IsRelateToEffect(e) then - c:SetCardTarget(tc) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_OWNER_RELATE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetCondition(c12503902.rcon) - e1:SetValue(500) - tc:RegisterEffect(e1,true) - local g=Duel.GetMatchingGroup(c12503902.tfilter1,tp,LOCATION_SZONE,LOCATION_SZONE,nil,tc) - if g:GetCount()>0 then - local sg,fid=g:GetMaxGroup(Card.GetFieldID) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetRange(LOCATION_SZONE) - e1:SetTargetRange(LOCATION_SZONE,LOCATION_SZONE) - e1:SetCode(EFFECT_DISABLE) - e1:SetCondition(c12503902.discon) - e1:SetTarget(c12503902.distg) - e1:SetLabel(fid) - e1:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e1,true) - else - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetRange(LOCATION_SZONE) - e1:SetCode(EVENT_CHAIN_SOLVING) - e1:SetCondition(c12503902.discon2) - e1:SetOperation(c12503902.disop2) - e1:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e1,true) - end - end -end -function c12503902.rcon(e) - return e:GetOwner():IsHasCardTarget(e:GetHandler()) -end -function c12503902.discon(e) - return e:GetHandler():GetCardTargetCount()>0 -end -function c12503902.distg(e,c) - return c:GetFieldID()<=e:GetLabel() and c:IsHasCardTarget(e:GetHandler():GetFirstCardTarget()) and c:IsType(TYPE_SPELL) -end -function c12503902.discon2(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetHandler():GetFirstCardTarget() - if not tc or not re:IsActiveType(TYPE_SPELL) or not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end - local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) - return g:IsContains(tc) -end -function c12503902.disop2(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateEffect(ev) - e:Reset() -end diff --git a/script/c12510878.lua b/script/c12510878.lua deleted file mode 100644 index def4a52285..0000000000 --- a/script/c12510878.lua +++ /dev/null @@ -1,65 +0,0 @@ ---天空勇士ネオパーシアス -function c12510878.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c12510878.spcon) - e1:SetOperation(c12510878.spop) - c:RegisterEffect(e1) - --draw - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(12510878,0)) - e2:SetCategory(CATEGORY_DRAW) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_BATTLE_DAMAGE) - e2:SetCondition(c12510878.condition) - e2:SetTarget(c12510878.target) - e2:SetOperation(c12510878.operation) - c:RegisterEffect(e2) - --pierce - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_PIERCE) - c:RegisterEffect(e3) - --update atk,def - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetCode(EFFECT_UPDATE_ATTACK) - e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e4:SetRange(LOCATION_MZONE) - e4:SetValue(c12510878.val) - c:RegisterEffect(e4) - local e5=e4:Clone() - e5:SetCode(EFFECT_UPDATE_DEFENCE) - c:RegisterEffect(e5) -end -function c12510878.spcon(e,c) - if c==nil then return true end - return Duel.CheckReleaseGroup(c:GetControler(),Card.IsCode,1,nil,18036057) -end -function c12510878.spop(e,tp,eg,ep,ev,re,r,rp,c) - local g=Duel.SelectReleaseGroup(c:GetControler(),Card.IsCode,1,1,nil,18036057) - Duel.Release(g,REASON_COST) -end -function c12510878.condition(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp -end -function c12510878.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(1) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c12510878.operation(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end -function c12510878.val(e,c) - if not Duel.IsEnvironment(56433456) then return 0 end - local v=Duel.GetLP(c:GetControler())-Duel.GetLP(1-c:GetControler()) - if v>0 then return v else return 0 end -end diff --git a/script/c12525049.lua b/script/c12525049.lua deleted file mode 100644 index fdc29d9c94..0000000000 --- a/script/c12525049.lua +++ /dev/null @@ -1,69 +0,0 @@ ---音響戦士ギータス -function c12525049.initial_effect(c) - --pendulum summon - aux.AddPendulumProcedure(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(12525049,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_PZONE) - e2:SetCountLimit(1,12525049) - e2:SetCost(c12525049.spcost) - e2:SetTarget(c12525049.sptg) - e2:SetOperation(c12525049.spop) - c:RegisterEffect(e2) - --spsummon - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(12525049,1)) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_SUMMON_SUCCESS) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e3:SetTarget(c12525049.target) - e3:SetOperation(c12525049.operation) - c:RegisterEffect(e3) -end -function c12525049.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) -end -function c12525049.spfilter(c,e,tp) - return c:IsSetCard(0x1066) and not c:IsCode(12525049) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c12525049.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c12525049.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c12525049.spop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c12525049.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end -function c12525049.filter(c,e,tp) - return c:IsSetCard(0x1066) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c12525049.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c12525049.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c12525049.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c12525049.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c12525049.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c12533811.lua b/script/c12533811.lua deleted file mode 100644 index c2a8ba73e9..0000000000 --- a/script/c12533811.lua +++ /dev/null @@ -1,43 +0,0 @@ ---ベビー・トラゴン -function c12533811.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,1,3) - c:EnableReviveLimit() - --attack up - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(12533811,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c12533811.condition) - e1:SetCost(c12533811.cost) - e1:SetTarget(c12533811.target) - e1:SetOperation(c12533811.operation) - c:RegisterEffect(e1) -end -function c12533811.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()==PHASE_MAIN1 -end -function c12533811.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c12533811.filter(c) - return c:IsFaceup() and c:GetLevel()==1 and c:GetEffectCount(EFFECT_DIRECT_ATTACK)==0 -end -function c12533811.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c12533811.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c12533811.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c12533811.filter,tp,LOCATION_MZONE,0,1,1,nil) -end -function c12533811.operation(e,tp,eg,ep,ev,re,r,rp,chk) - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DIRECT_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - end -end diff --git a/script/c12538374.lua b/script/c12538374.lua deleted file mode 100644 index ad0d5a4a44..0000000000 --- a/script/c12538374.lua +++ /dev/null @@ -1,31 +0,0 @@ ---黄泉ガエル -function c12538374.initial_effect(c) - --Special Summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(12538374,0)) - e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_FIELD) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) - e1:SetRange(LOCATION_GRAVE) - e1:SetCountLimit(1) - e1:SetCondition(c12538374.condition) - e1:SetTarget(c12538374.target) - e1:SetOperation(c12538374.operation) - c:RegisterEffect(e1) -end -function c12538374.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) or (c:GetCode()==12538374 and c:IsFaceup()) -end -function c12538374.condition(e,tp,eg,ep,ev,re,r,rp) - return tp==Duel.GetTurnPlayer() and not Duel.IsExistingMatchingCard(c12538374.filter,tp,LOCATION_ONFIELD,0,1,nil) -end -function c12538374.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c12538374.operation(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) and not Duel.IsExistingMatchingCard(c12538374.filter,tp,LOCATION_ONFIELD,0,1,nil) then - Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c12580477.lua b/script/c12580477.lua deleted file mode 100644 index 60c3a296d1..0000000000 --- a/script/c12580477.lua +++ /dev/null @@ -1,20 +0,0 @@ ---サンダー・ボルト -function c12580477.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c12580477.target) - e1:SetOperation(c12580477.activate) - c:RegisterEffect(e1) -end -function c12580477.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDestructable,tp,0,LOCATION_MZONE,1,nil) end - local sg=Duel.GetMatchingGroup(Card.IsDestructable,tp,0,LOCATION_MZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,sg:GetCount(),0,0) -end -function c12580477.activate(e,tp,eg,ep,ev,re,r,rp) - local sg=Duel.GetMatchingGroup(Card.IsDestructable,tp,0,LOCATION_MZONE,nil) - Duel.Destroy(sg,REASON_EFFECT) -end diff --git a/script/c12600382.lua b/script/c12600382.lua deleted file mode 100644 index 8c348ff35b..0000000000 --- a/script/c12600382.lua +++ /dev/null @@ -1,72 +0,0 @@ ---エクゾディア・ネクロス -function c12600382.initial_effect(c) - c:EnableReviveLimit() - --cannot destroy - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetValue(1) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetValue(c12600382.efdes) - c:RegisterEffect(e2) - --spsummon limit - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e3:SetCode(EFFECT_SPSUMMON_CONDITION) - e3:SetValue(c12600382.splimit) - c:RegisterEffect(e3) - --atkup - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(12600382,0)) - e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e4:SetCategory(CATEGORY_ATKCHANGE) - e4:SetCode(EVENT_PHASE+PHASE_STANDBY) - e4:SetRange(LOCATION_MZONE) - e4:SetCountLimit(1) - e4:SetCondition(c12600382.atkcon) - e4:SetOperation(c12600382.atkop) - c:RegisterEffect(e4) - --selfdes - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_SINGLE) - e5:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e5:SetRange(LOCATION_MZONE) - e5:SetCode(EFFECT_SELF_DESTROY) - e5:SetCondition(c12600382.descon) - c:RegisterEffect(e5) -end -function c12600382.efdes(e,re) - return not re:GetHandler():IsType(TYPE_MONSTER) -end -function c12600382.splimit(e,se,sp,st) - return st==(SUMMON_TYPE_SPECIAL+332449) -end -function c12600382.atkcon(e,tp,eg,ep,ev,re,r,rp) - return tp==Duel.GetTurnPlayer() -end -function c12600382.atkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetProperty(EFFECT_FLAG_COPY_INHERIT) - e1:SetReset(RESET_EVENT+0x1ff0000) - e1:SetValue(500) - c:RegisterEffect(e1) -end -function c12600382.descon(e) - local p=e:GetHandlerPlayer() - return not Duel.IsExistingMatchingCard(Card.IsCode,p,LOCATION_GRAVE,0,1,nil,8124921) - or not Duel.IsExistingMatchingCard(Card.IsCode,p,LOCATION_GRAVE,0,1,nil,44519536) - or not Duel.IsExistingMatchingCard(Card.IsCode,p,LOCATION_GRAVE,0,1,nil,70903634) - or not Duel.IsExistingMatchingCard(Card.IsCode,p,LOCATION_GRAVE,0,1,nil,7902349) - or not Duel.IsExistingMatchingCard(Card.IsCode,p,LOCATION_GRAVE,0,1,nil,33396948) -end diff --git a/script/c12607053.lua b/script/c12607053.lua deleted file mode 100644 index 391df5a3f8..0000000000 --- a/script/c12607053.lua +++ /dev/null @@ -1,27 +0,0 @@ ---和睦の使者 -function c12607053.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetOperation(c12607053.activate) - c:RegisterEffect(e1) -end -function c12607053.activate(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_AVOID_BATTLE_DAMAGE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetTargetRange(1,0) - e1:SetValue(1) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e2:SetTargetRange(LOCATION_MZONE,0) - e2:SetReset(RESET_PHASE+PHASE_END) - e2:SetValue(1) - Duel.RegisterEffect(e2,tp) -end diff --git a/script/c126218.lua b/script/c126218.lua deleted file mode 100644 index ef9794e65d..0000000000 --- a/script/c126218.lua +++ /dev/null @@ -1,39 +0,0 @@ ---悪魔のサイコロ -function c126218.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetCondition(c126218.condition) - e1:SetTarget(c126218.target) - e1:SetOperation(c126218.activate) - c:RegisterEffect(e1) -end -function c126218.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end -function c126218.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end -end -function c126218.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil) - if g:GetCount()>0 then - local d=Duel.TossDice(tp,1)*100 - local sc=g:GetFirst() - while sc do - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - e1:SetValue(-d) - sc:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_UPDATE_DEFENCE) - sc:RegisterEffect(e2) - sc=g:GetNext() - end - end -end \ No newline at end of file diff --git a/script/c12624008.lua b/script/c12624008.lua deleted file mode 100644 index 8d2f487028..0000000000 --- a/script/c12624008.lua +++ /dev/null @@ -1,28 +0,0 @@ ---シャインスピリッツ -function c12624008.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(12624008,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetCondition(c12624008.condition) - e1:SetTarget(c12624008.target) - e1:SetOperation(c12624008.operation) - c:RegisterEffect(e1) -end -function c12624008.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) -end -function c12624008.filter(c) - return (c:IsFacedown() or c:GetAttribute()~=ATTRIBUTE_LIGHT) and c:IsDestructable() -end -function c12624008.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local g=Duel.GetMatchingGroup(c12624008.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c12624008.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c12624008.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - Duel.Destroy(g,REASON_EFFECT) -end diff --git a/script/c1264319.lua b/script/c1264319.lua deleted file mode 100644 index 4220aa1e93..0000000000 --- a/script/c1264319.lua +++ /dev/null @@ -1,108 +0,0 @@ ---ジェムナイト・フュージョン -function c1264319.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c1264319.target) - e1:SetOperation(c1264319.activate) - c:RegisterEffect(e1) - --salvage - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_TOHAND) - e2:SetDescription(aux.Stringid(1264319,0)) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_GRAVE) - e2:SetCost(c1264319.thcost) - e2:SetTarget(c1264319.thtg) - e2:SetOperation(c1264319.thop) - c:RegisterEffect(e2) -end -function c1264319.filter1(c,e) - return c:IsCanBeFusionMaterial() and not c:IsImmuneToEffect(e) -end -function c1264319.filter2(c,e,tp,m,f,chkf) - return c:IsType(TYPE_FUSION) and c:IsSetCard(0x1047) and (not f or f(c)) - and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf) -end -function c1264319.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp - local mg1=Duel.GetMatchingGroup(Card.IsCanBeFusionMaterial,tp,LOCATION_HAND+LOCATION_MZONE,0,nil) - local res=Duel.IsExistingMatchingCard(c1264319.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf) - if not res then - local ce=Duel.GetChainMaterial(tp) - if ce~=nil then - local fgroup=ce:GetTarget() - local mg2=fgroup(ce,e,tp) - local mf=ce:GetValue() - res=Duel.IsExistingMatchingCard(c1264319.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,chkf) - end - end - return res - end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function c1264319.activate(e,tp,eg,ep,ev,re,r,rp) - local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp - local mg1=Duel.GetMatchingGroup(c1264319.filter1,tp,LOCATION_HAND+LOCATION_MZONE,0,nil,e) - local sg1=Duel.GetMatchingGroup(c1264319.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf) - local mg2=nil - local sg2=nil - local ce=Duel.GetChainMaterial(tp) - if ce~=nil then - local fgroup=ce:GetTarget() - mg2=fgroup(ce,e,tp) - local mf=ce:GetValue() - sg2=Duel.GetMatchingGroup(c1264319.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,mf,chkf) - end - if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then - local sg=sg1:Clone() - if sg2 then sg:Merge(sg2) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local tg=sg:Select(tp,1,1,nil) - local tc=tg:GetFirst() - if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then - local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf) - tc:SetMaterial(mat1) - Duel.SendtoGrave(mat1,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION) - Duel.BreakEffect() - Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP) - else - local mat2=Duel.SelectFusionMaterial(tp,tc,mg2,nil,chkf) - local fop=ce:GetOperation() - fop(ce,e,tp,tc,mat2) - end - tc:CompleteProcedure() - else - local cg1=Duel.GetFieldGroup(tp,LOCATION_HAND+LOCATION_MZONE,0) - local cg2=Duel.GetFieldGroup(tp,LOCATION_EXTRA,0) - if cg1:GetCount()>1 and cg2:IsExists(Card.IsFacedown,1,nil) - and Duel.IsPlayerCanSpecialSummon(tp) and not Duel.IsPlayerAffectedByEffect(tp,27581098) then - Duel.ConfirmCards(1-tp,cg1) - Duel.ConfirmCards(1-tp,cg2) - Duel.ShuffleHand(tp) - end - end -end -function c1264319.thfilter(c) - return c:IsSetCard(0x1047) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost() -end -function c1264319.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c1264319.thfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c1264319.thfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c1264319.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToHand() end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0) -end -function c1264319.thop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SendtoHand(c,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,c) - end -end diff --git a/script/c12644061.lua b/script/c12644061.lua deleted file mode 100644 index 2d023aa84b..0000000000 --- a/script/c12644061.lua +++ /dev/null @@ -1,83 +0,0 @@ ---アドバンスド・ダーク -function c12644061.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --attribute - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetRange(LOCATION_FZONE) - e2:SetTargetRange(LOCATION_MZONE+LOCATION_GRAVE,LOCATION_MZONE+LOCATION_GRAVE) - e2:SetCode(EFFECT_CHANGE_ATTRIBUTE) - e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x1034)) - e2:SetValue(ATTRIBUTE_DARK) - c:RegisterEffect(e2) - --negate - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e3:SetCode(EVENT_ATTACK_ANNOUNCE) - e3:SetRange(LOCATION_FZONE) - e3:SetCondition(c12644061.discon) - e3:SetOperation(c12644061.disop) - c:RegisterEffect(e3) - -- - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(12644061,0)) - e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e4:SetCode(EVENT_PRE_DAMAGE_CALCULATE) - e4:SetRange(LOCATION_FZONE) - e4:SetCondition(c12644061.damcon) - e4:SetCost(c12644061.damcost) - e4:SetOperation(c12644061.damop) - c:RegisterEffect(e4) -end -function c12644061.discon(e,tp,eg,ep,ev,re,r,rp) - local a=Duel.GetAttacker() - local code=a:GetCode() - local at=Duel.GetAttackTarget() - return at and (code==79856792 or code==79407975) -end -function c12644061.disop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetAttackTarget() - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_BATTLE) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_BATTLE) - tc:RegisterEffect(e2) -end -function c12644061.damcon(e,tp,eg,ep,ev,re,r,rp) - local a=Duel.GetAttacker() - local at=Duel.GetAttackTarget() - return Duel.GetBattleDamage(tp)>0 - and ((a:IsControler(tp) and a:IsSetCard(0x1034)) or (at and at:IsControler(tp) and at:IsSetCard(0x1034))) -end -function c12644061.dfilter(c) - return c:IsSetCard(0x1034) and c:IsAbleToGraveAsCost() -end -function c12644061.damcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c12644061.dfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c12644061.dfilter,tp,LOCATION_DECK,0,1,1,nil) - Duel.SendtoGrave(g,REASON_COST) -end -function c12644061.damop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) then return end - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PRE_BATTLE_DAMAGE) - e1:SetRange(LOCATION_FZONE) - e1:SetOperation(c12644061.dop) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_DAMAGE) - c:RegisterEffect(e1) -end -function c12644061.dop(e,tp,eg,ep,ev,re,r,rp) - Duel.ChangeBattleDamage(tp,0) -end diff --git a/script/c12652643.lua b/script/c12652643.lua deleted file mode 100644 index ac209b0513..0000000000 --- a/script/c12652643.lua +++ /dev/null @@ -1,64 +0,0 @@ ---古代の機械究極巨人 -function c12652643.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcCodeFun(c,83104731,aux.FilterBoolFunction(Card.IsSetCard,0x7),2,true,true) - --spsummon condition - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(aux.fuslimit) - c:RegisterEffect(e1) - --pierce - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_PIERCE) - c:RegisterEffect(e2) - --actlimit - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e3:SetCode(EVENT_ATTACK_ANNOUNCE) - e3:SetOperation(c12652643.atkop) - c:RegisterEffect(e3) - --Special summon - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(12652643,0)) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e4:SetCategory(CATEGORY_SPECIAL_SUMMON) - e4:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP) - e4:SetCode(EVENT_DESTROYED) - e4:SetTarget(c12652643.sptg) - e4:SetOperation(c12652643.spop) - c:RegisterEffect(e4) -end -function c12652643.atkop(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EFFECT_CANNOT_ACTIVATE) - e1:SetTargetRange(0,1) - e1:SetValue(c12652643.aclimit) - e1:SetReset(RESET_PHASE+PHASE_DAMAGE) - Duel.RegisterEffect(e1,tp) -end -function c12652643.aclimit(e,re,tp) - return re:IsHasType(EFFECT_TYPE_ACTIVATE) -end -function c12652643.spfilter(c,e,tp) - return c:IsCode(83104731) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) -end -function c12652643.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c12652643.spfilter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c12652643.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c12652643.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c12652643.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,true,false,POS_FACEUP) - end -end diff --git a/script/c12670770.lua b/script/c12670770.lua deleted file mode 100644 index fa95084296..0000000000 --- a/script/c12670770.lua +++ /dev/null @@ -1,132 +0,0 @@ ---サイバー・ネットワーク -function c12670770.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,0x1e0) - e1:SetTarget(c12670770.target1) - e1:SetOperation(c12670770.operation) - c:RegisterEffect(e1) - --remove - local e2=Effect.CreateEffect(c) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetRange(LOCATION_SZONE) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetHintTiming(0,TIMING_END_PHASE) - e2:SetCondition(c12670770.condition) - e2:SetTarget(c12670770.target2) - e2:SetOperation(c12670770.operation) - c:RegisterEffect(e2) - --spsummon - local e3=Effect.CreateEffect(c) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e3:SetCode(EVENT_TO_GRAVE) - e3:SetCondition(c12670770.spcon) - e3:SetCost(c12670770.spcost) - e3:SetTarget(c12670770.sptg) - e3:SetOperation(c12670770.spop) - c:RegisterEffect(e3) -end -function c12670770.filter1(c) - return c:IsFaceup() and c:IsCode(70095154) -end -function c12670770.filter2(c) - return c:IsRace(RACE_MACHINE) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsAbleToRemove() -end -function c12670770.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c12670770.filter1,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) -end -function c12670770.target1(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local c=e:GetHandler() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_IGNORE_IMMUNE) - e1:SetRange(LOCATION_SZONE) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) - e1:SetCountLimit(1) - e1:SetCondition(c12670770.sdescon) - e1:SetOperation(c12670770.sdesop) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,3) - c:RegisterEffect(e1) - c:SetTurnCounter(0) - if Duel.IsExistingMatchingCard(c12670770.filter1,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) - and Duel.IsExistingMatchingCard(c12670770.filter2,tp,LOCATION_DECK,0,1,nil) - and Duel.SelectYesNo(tp,aux.Stringid(12670770,0)) then - Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_DECK) - c:RegisterFlagEffect(12670770,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) - c:RegisterFlagEffect(0,RESET_CHAIN,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(12670770,1)) - end -end -function c12670770.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chk==0 then return e:GetHandler():GetFlagEffect(12670770)==0 - and Duel.IsExistingMatchingCard(c12670770.filter2,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_DECK) - e:GetHandler():RegisterFlagEffect(12670770,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) -end -function c12670770.operation(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():GetFlagEffect(12670770)==0 or not e:GetHandler():IsRelateToEffect(e) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c12670770.filter2,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.Remove(g,POS_FACEUP,REASON_EFFECT) - end -end -function c12670770.sdescon(e,tp,eg,ep,ev,re,r,rp) - return tp==Duel.GetTurnPlayer() -end -function c12670770.sdesop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local ct=c:GetTurnCounter() - ct=ct+1 - c:SetTurnCounter(ct) - if ct==3 then - Duel.Destroy(c,REASON_RULE) - end -end -function c12670770.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) -end -function c12670770.spfilter(c,e,tp) - return c:IsFaceup() and c:IsRace(RACE_MACHINE) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c12670770.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_BATTLE_PHASE)==0 end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_BP) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) - e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function c12670770.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_REMOVED) -end -function c12670770.desfilter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable() -end -function c12670770.spop(e,tp,eg,ep,ev,re,r,rp) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ft<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c12670770.spfilter,tp,LOCATION_REMOVED,0,ft,ft,nil,e,tp) - if g:GetCount()==0 then return end - local tc=g:GetFirst() - while tc do - Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_TRIGGER) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - tc=g:GetNext() - end - Duel.SpecialSummonComplete() - local dg=Duel.GetMatchingGroup(c12670770.desfilter,tp,LOCATION_ONFIELD,0,nil) - Duel.Destroy(dg,REASON_EFFECT) -end diff --git a/script/c12678870.lua b/script/c12678870.lua deleted file mode 100644 index 83f586ca50..0000000000 --- a/script/c12678870.lua +++ /dev/null @@ -1,100 +0,0 @@ ---聖霊獣騎 ペトルフィン -function c12678870.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcFun2(c,aux.FilterBoolFunction(Card.IsSetCard,0x10b5),aux.FilterBoolFunction(Card.IsSetCard,0x20b5),true) - --spsummon condition - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - c:RegisterEffect(e1) - --special summon rule - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_SPSUMMON_PROC) - e2:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e2:SetRange(LOCATION_EXTRA) - e2:SetCondition(c12678870.sprcon) - e2:SetOperation(c12678870.sprop) - c:RegisterEffect(e2) - --indes - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e3:SetRange(LOCATION_MZONE) - e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - e3:SetValue(1) - c:RegisterEffect(e3) - --spsummon - local e4=Effect.CreateEffect(c) - e4:SetCategory(CATEGORY_SPECIAL_SUMMON) - e4:SetProperty(EFFECT_FLAG_CARD_TARGET) - e4:SetType(EFFECT_TYPE_QUICK_O) - e4:SetCode(EVENT_FREE_CHAIN) - e4:SetHintTiming(0,TIMING_END_PHASE) - e4:SetRange(LOCATION_MZONE) - e4:SetCost(c12678870.spcost) - e4:SetTarget(c12678870.sptg) - e4:SetOperation(c12678870.spop) - c:RegisterEffect(e4) -end -function c12678870.spfilter1(c,tp) - return c:IsSetCard(0x10b5) and c:IsAbleToRemoveAsCost() and c:IsCanBeFusionMaterial() - and Duel.IsExistingMatchingCard(c12678870.spfilter2,tp,LOCATION_MZONE,0,1,c) -end -function c12678870.spfilter2(c) - return c:IsSetCard(0x20b5) and c:IsAbleToRemoveAsCost() and c:IsCanBeFusionMaterial() -end -function c12678870.sprcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.GetLocationCount(tp,LOCATION_MZONE)>-2 - and Duel.IsExistingMatchingCard(c12678870.spfilter1,tp,LOCATION_MZONE,0,1,nil,tp) -end -function c12678870.sprop(e,tp,eg,ep,ev,re,r,rp,c) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g1=Duel.SelectMatchingCard(tp,c12678870.spfilter1,tp,LOCATION_MZONE,0,1,1,nil,tp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g2=Duel.SelectMatchingCard(tp,c12678870.spfilter2,tp,LOCATION_MZONE,0,1,1,g1:GetFirst()) - g1:Merge(g2) - c:SetMaterial(g1) - Duel.Remove(g1,POS_FACEUP,REASON_COST) -end -function c12678870.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToExtraAsCost() end - Duel.SendtoDeck(e:GetHandler(),nil,0,REASON_COST) -end -function c12678870.filter1(c,e,tp) - return c:IsFaceup() and c:IsSetCard(0x10b5) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) - and Duel.IsExistingTarget(c12678870.filter2,tp,LOCATION_REMOVED,0,1,c,e,tp) -end -function c12678870.filter2(c,e,tp) - return c:IsFaceup() and c:IsSetCard(0x20b5) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c12678870.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c12678870.filter1,tp,LOCATION_REMOVED,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g1=Duel.SelectTarget(tp,c12678870.filter1,tp,LOCATION_REMOVED,0,1,1,nil,e,tp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g2=Duel.SelectTarget(tp,c12678870.filter2,tp,LOCATION_REMOVED,0,1,1,g1:GetFirst(),e,tp) - g1:Merge(g2) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g1,2,0,0) -end -function c12678870.spop(e,tp,eg,ep,ev,re,r,rp) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ft<=0 then return end - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) - if g:GetCount()==0 then return end - if g:GetCount()<=ft then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENCE) - else - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=g:Select(tp,ft,ft,nil) - Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP_DEFENCE) - g:Sub(sg) - Duel.SendtoGrave(g,REASON_EFFECT) - end -end diff --git a/script/c12694768.lua b/script/c12694768.lua deleted file mode 100644 index 2dce82bd33..0000000000 --- a/script/c12694768.lua +++ /dev/null @@ -1,24 +0,0 @@ ---暴鬼 -function c12694768.initial_effect(c) - --battle destroyed - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(12694768,0)) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetCondition(c12694768.condition) - e1:SetTarget(c12694768.target) - e1:SetOperation(c12694768.operation) - c:RegisterEffect(e1) -end -function c12694768.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) -end -function c12694768.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,PLAYER_ALL,500) -end -function c12694768.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.Damage(tp,500,REASON_EFFECT) - Duel.Damage(1-tp,500,REASON_EFFECT) -end diff --git a/script/c12697630.lua b/script/c12697630.lua deleted file mode 100644 index a1191c0da0..0000000000 --- a/script/c12697630.lua +++ /dev/null @@ -1,65 +0,0 @@ ---アーティファクト-ベガルタ -function c12697630.initial_effect(c) - --set - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_MONSTER_SSET) - e1:SetValue(TYPE_SPELL) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(12697630,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetCondition(c12697630.spcon) - e2:SetTarget(c12697630.sptg) - e2:SetOperation(c12697630.spop) - c:RegisterEffect(e2) - --destroy - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(12697630,1)) - e3:SetCategory(CATEGORY_DESTROY) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - e3:SetCountLimit(1,12697630) - e3:SetCondition(c12697630.descon) - e3:SetTarget(c12697630.destg) - e3:SetOperation(c12697630.desop) - c:RegisterEffect(e3) -end -function c12697630.spcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsPreviousLocation(LOCATION_SZONE) and c:IsPreviousPosition(POS_FACEDOWN) - and c:IsReason(REASON_DESTROY) and Duel.GetTurnPlayer()~=tp -end -function c12697630.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c12697630.spop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP) - end -end -function c12697630.descon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp -end -function c12697630.filter(c) - return c:IsFacedown() and c:IsDestructable() -end -function c12697630.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local g=Duel.GetMatchingGroup(c12697630.filter,tp,LOCATION_ONFIELD,0,nil) - if g:GetCount()>0 then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) - end -end -function c12697630.desop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c12697630.filter,tp,LOCATION_ONFIELD,0,nil) - if g:GetCount()>0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local sg=g:Select(tp,1,2,nil) - Duel.Destroy(sg,REASON_EFFECT) - end -end diff --git a/script/c12735388.lua b/script/c12735388.lua deleted file mode 100644 index 590235b164..0000000000 --- a/script/c12735388.lua +++ /dev/null @@ -1,73 +0,0 @@ ---レインボー・ヴェール -function c12735388.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c12735388.target) - e1:SetOperation(c12735388.operation) - c:RegisterEffect(e1) - --Equip limit - local e2=Effect.CreateEffect(c) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_EQUIP_LIMIT) - e2:SetValue(1) - c:RegisterEffect(e2) - --disable - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e3:SetCode(EVENT_BE_BATTLE_TARGET) - e3:SetRange(LOCATION_SZONE) - e3:SetCondition(c12735388.discon1) - e3:SetOperation(c12735388.disop1) - c:RegisterEffect(e3) -end -function c12735388.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c12735388.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,e:GetHandler(),tc) - end -end -function c12735388.discon1(e,tp,eg,ep,ev,re,r,rp) - local ec=e:GetHandler():GetEquipTarget() - return ec and (ec==Duel.GetAttacker() or ec==Duel.GetAttackTarget()) and ec:GetBattleTarget() -end -function c12735388.disop1(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=c:GetEquipTarget():GetBattleTarget() - c:CreateRelation(tc,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_BATTLE) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DISABLE) - e1:SetProperty(EFFECT_FLAG_OWNER_RELATE) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_BATTLE) - e1:SetCondition(c12735388.discon2) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_CHAIN_SOLVING) - e2:SetRange(LOCATION_SZONE) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_BATTLE) - e2:SetOperation(c12735388.disop2) - e2:SetLabelObject(tc) - c:RegisterEffect(e2) -end -function c12735388.discon2(e) - return e:GetOwner():IsRelateToCard(e:GetHandler()) -end -function c12735388.disop2(e,tp,eg,ep,ev,re,r,rp) - local loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION) - if loc==LOCATION_MZONE and re:GetHandler()==e:GetLabelObject() then - Duel.NegateEffect(ev) - end -end diff --git a/script/c12744567.lua b/script/c12744567.lua deleted file mode 100644 index 61f01f906e..0000000000 --- a/script/c12744567.lua +++ /dev/null @@ -1,78 +0,0 @@ ---CNo.101 S・H・Dark Knight -function c12744567.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,5,3) - c:EnableReviveLimit() - --material - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(12744567,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetTarget(c12744567.target) - e1:SetOperation(c12744567.operation) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(12744567,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_RECOVER) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetCondition(c12744567.spcon) - e2:SetTarget(c12744567.sptg) - e2:SetOperation(c12744567.spop) - c:RegisterEffect(e2) -end -c12744567.xyz_number=101 -function c12744567.filter(c) - return not c:IsType(TYPE_TOKEN) and c:IsAbleToChangeControler() - and bit.band(c:GetSummonType(),SUMMON_TYPE_SPECIAL)==SUMMON_TYPE_SPECIAL -end -function c12744567.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c12744567.filter(chkc) end - if chk==0 then return e:GetHandler():IsType(TYPE_XYZ) and Duel.IsExistingTarget(c12744567.filter,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - Duel.SelectTarget(tp,c12744567.filter,tp,0,LOCATION_MZONE,1,1,nil) -end -function c12744567.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then - local og=tc:GetOverlayGroup() - if og:GetCount()>0 then - Duel.SendtoGrave(og,REASON_RULE) - end - Duel.Overlay(c,Group.FromCards(tc)) - end -end -function c12744567.spcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsReason(REASON_DESTROY) and c:IsPreviousLocation(LOCATION_MZONE) and c:GetOverlayCount()>0 -end -function c12744567.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) - and Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_GRAVE,0,1,nil,48739166) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) - local rec=e:GetHandler():GetBaseAttack() - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(rec) - Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,rec) -end -function c12744567.spop(e,tp,eg,ep,ev,re,r,rp) - if not Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_GRAVE,0,1,nil,48739166) then return end - local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - c:RegisterEffect(e1) - Duel.BreakEffect() - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Recover(p,d,REASON_EFFECT) - end -end diff --git a/script/c12755462.lua b/script/c12755462.lua deleted file mode 100644 index 0a40ca6b14..0000000000 --- a/script/c12755462.lua +++ /dev/null @@ -1,49 +0,0 @@ ---ゴブリン穴埋め部隊 -function c12755462.initial_effect(c) - --summon success - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetOperation(c12755462.sumsuc) - c:RegisterEffect(e1) - --activate limit - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetOperation(c12755462.cedop) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EVENT_SUMMON_SUCCESS) - e3:SetCondition(c12755462.cedcon) - c:RegisterEffect(e3) - local e4=e2:Clone() - e4:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - c:RegisterEffect(e4) - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e5:SetRange(LOCATION_MZONE) - e5:SetCode(EVENT_CHAIN_END) - e5:SetOperation(c12755462.cedop2) - c:RegisterEffect(e5) -end -function c12755462.sumsuc(e,tp,eg,ep,ev,re,r,rp) - Duel.SetChainLimitTillChainEnd(c12755462.chlimit1) -end -function c12755462.chlimit1(re,rp,tp) - return not re:GetHandler():IsType(TYPE_TRAP) or not re:IsHasType(EFFECT_TYPE_ACTIVATE) -end -function c12755462.cedcon(e,tp,eg,ep,ev,re,r,rp) - return eg:GetFirst()~=e:GetHandler() -end -function c12755462.cedop(e,tp,eg,ep,ev,re,r,rp) - Duel.SetChainLimitTillChainEnd(c12755462.chlimit2) -end -function c12755462.cedop2(e,tp,eg,ep,ev,re,r,rp) - if Duel.CheckEvent(EVENT_SPSUMMON_SUCCESS) then - Duel.SetChainLimitTillChainEnd(c12755462.chlimit2) - end -end -function c12755462.chlimit2(re,rp,tp) - return not re:GetHandler():IsType(TYPE_TRAP) or not re:IsHasType(EFFECT_TYPE_ACTIVATE) or not re:GetHandler():IsSetCard(0x4c) -end diff --git a/script/c12800777.lua b/script/c12800777.lua deleted file mode 100644 index 93b520c92c..0000000000 --- a/script/c12800777.lua +++ /dev/null @@ -1,55 +0,0 @@ ---風の精霊 ガルーダ -function c12800777.initial_effect(c) - c:EnableReviveLimit() - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c12800777.spcon) - e1:SetOperation(c12800777.spop) - c:RegisterEffect(e1) - --atk - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(12800777,0)) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCode(EVENT_PHASE+PHASE_END) - e2:SetCondition(c12800777.poscon) - e2:SetTarget(c12800777.postg) - e2:SetOperation(c12800777.posop) - c:RegisterEffect(e2) -end -function c12800777.spfilter(c) - return c:IsAttribute(ATTRIBUTE_WIND) and c:IsAbleToRemoveAsCost() -end -function c12800777.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c12800777.spfilter,tp,LOCATION_GRAVE,0,1,nil) -end -function c12800777.spop(e,tp,eg,ep,ev,re,r,rp,c) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c12800777.spfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c12800777.poscon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp -end -function c12800777.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE) - local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_POSITION,g,g:GetCount(),0,0) -end -function c12800777.posop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.ChangePosition(tc,POS_FACEUP_DEFENCE,0,POS_FACEUP_ATTACK,0) - end -end diff --git a/script/c1281505.lua b/script/c1281505.lua deleted file mode 100644 index 5dc369c56d..0000000000 --- a/script/c1281505.lua +++ /dev/null @@ -1,63 +0,0 @@ ---ヴァイロン・テトラ -function c1281505.initial_effect(c) - --equip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(1281505,0)) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCondition(c1281505.eqcon) - e1:SetCost(c1281505.eqcost) - e1:SetTarget(c1281505.eqtg) - e1:SetOperation(c1281505.eqop) - c:RegisterEffect(e1) - --destroy sub - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_EQUIP+EFFECT_TYPE_CONTINUOUS) - e3:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e3:SetCode(EFFECT_DESTROY_REPLACE) - e3:SetTarget(c1281505.reptg) - e3:SetOperation(c1281505.repop) - c:RegisterEffect(e3) -end -function c1281505.eqcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:GetPreviousLocation()==LOCATION_MZONE -end -function c1281505.eqcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,500) end - Duel.PayLPCost(tp,500) -end -function c1281505.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:IsFaceup() end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,nil) -end -function c1281505.eqop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsRelateToEffect(e) then - Duel.Equip(tp,c,tc) - --equip limit - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetValue(c1281505.eqlimit) - e1:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e1) - end -end -function c1281505.eqlimit(e,c) - return c:GetControler()==e:GetHandlerPlayer() or e:GetHandler():GetEquipTarget()==c -end -function c1281505.reptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - return Duel.SelectYesNo(tp,aux.Stringid(1281505,1)) -end -function c1281505.repop(e,tp,eg,ep,ev,re,r,rp) - Duel.Destroy(e:GetHandler(),REASON_EFFECT+REASON_REPLACE) -end diff --git a/script/c12817939.lua b/script/c12817939.lua deleted file mode 100644 index a3d97ad788..0000000000 --- a/script/c12817939.lua +++ /dev/null @@ -1,66 +0,0 @@ ---漆黒の魔王 LV6 -function c12817939.initial_effect(c) - --disable - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_BATTLED) - e1:SetRange(LOCATION_MZONE) - e1:SetOperation(c12817939.disop) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(12817939,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) - e2:SetCondition(c12817939.spcon) - e2:SetCost(c12817939.spcost) - e2:SetTarget(c12817939.sptg) - e2:SetOperation(c12817939.spop) - c:RegisterEffect(e2) -end -c12817939.lvupcount=2 -c12817939.lvup={85313220,58206034} -c12817939.lvdncount=1 -c12817939.lvdn={85313220} -function c12817939.disop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local d=Duel.GetAttackTarget() - if d==c then d=Duel.GetAttacker() end - if d and d:IsStatus(STATUS_BATTLE_DESTROYED) and d:IsType(TYPE_EFFECT) - and c:GetFlagEffect(85313220)~=0 and not c:IsStatus(STATUS_BATTLE_DESTROYED) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0x17a0000) - d:RegisterEffect(e1) - c:RegisterFlagEffect(12817939,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END+RESET_SELF_TURN,0,2) - end -end -function c12817939.spcon(e,tp,eg,ep,ev,re,r,rp) - return tp==Duel.GetTurnPlayer() and e:GetHandler():GetFlagEffect(12817939)~=0 -end -function c12817939.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end -function c12817939.spfilter(c,e,tp) - return c:IsCode(58206034) and c:IsCanBeSpecialSummoned(e,0,tp,true,true) -end -function c12817939.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsExistingMatchingCard(c12817939.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) -end -function c12817939.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c12817939.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp) - local tc=g:GetFirst() - if tc then - Duel.SpecialSummon(tc,0,tp,tp,true,true,POS_FACEUP) - tc:RegisterFlagEffect(12817939,RESET_EVENT+0x16e0000,0,0) - tc:CompleteProcedure() - end -end diff --git a/script/c12822541.lua b/script/c12822541.lua deleted file mode 100644 index 99829c55ff..0000000000 --- a/script/c12822541.lua +++ /dev/null @@ -1,58 +0,0 @@ ---DDリリス -function c12822541.initial_effect(c) - --tohand - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e1:SetCountLimit(1,12822541) - e1:SetTarget(c12822541.thtg) - e1:SetOperation(c12822541.thop) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e2) -end -function c12822541.filter1(c) - return c:IsSetCard(0xaf) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() -end -function c12822541.filter2(c) - return c:IsFaceup() and c:IsSetCard(0xaf) and c:IsType(TYPE_PENDULUM) and c:IsAbleToHand() -end -function c12822541.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c12822541.filter1(chkc) end - local b1=Duel.IsExistingTarget(c12822541.filter1,tp,LOCATION_GRAVE,0,1,nil) - local b2=Duel.IsExistingMatchingCard(c12822541.filter2,tp,LOCATION_EXTRA,0,1,nil) - if chk==0 then return b1 or b2 end - local op=0 - if b1 and b2 then op=Duel.SelectOption(tp,aux.Stringid(12822541,0),aux.Stringid(12822541,1)) - elseif b1 then op=Duel.SelectOption(tp,aux.Stringid(12822541,0)) - else op=Duel.SelectOption(tp,aux.Stringid(12822541,1))+1 end - e:SetLabel(op) - if op==0 then - e:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c12822541.filter1,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) - else - e:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) - end -end -function c12822541.thop(e,tp,eg,ep,ev,re,r,rp) - if e:GetLabel()==0 then - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end - else - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c12822541.filter2,tp,LOCATION_EXTRA,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end - end -end diff --git a/script/c12836042.lua b/script/c12836042.lua deleted file mode 100644 index a26c88cbdc..0000000000 --- a/script/c12836042.lua +++ /dev/null @@ -1,49 +0,0 @@ ---はぐれ者傭兵部隊 -function c12836042.initial_effect(c) - --control - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(12836042,0)) - e1:SetCategory(CATEGORY_CONTROL) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c12836042.condition) - e1:SetCost(c12836042.cost) - e1:SetTarget(c12836042.target) - e1:SetOperation(c12836042.operation) - c:RegisterEffect(e1) -end -function c12836042.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)<=1 -end -function c12836042.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_BATTLE_PHASE)==0 - and Duel.GetActivityCount(tp,ACTIVITY_SPSUMMON)==0 - and e:GetHandler():IsReleasable() end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) - local e2=e1:Clone() - e2:SetCode(EFFECT_CANNOT_BP) - Duel.RegisterEffect(e2,tp) - Duel.Release(e:GetHandler(),REASON_COST) -end -function c12836042.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsControlerCanBeChanged() end - if chk==0 then return Duel.IsExistingTarget(Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) - local g=Duel.SelectTarget(tp,Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0) -end -function c12836042.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and not Duel.GetControl(tc,tp,PHASE_END,1) then - if not tc:IsImmuneToEffect(e) and tc:IsAbleToChangeControler() then - Duel.Destroy(tc,REASON_EFFECT) - end - end -end \ No newline at end of file diff --git a/script/c128454.lua b/script/c128454.lua deleted file mode 100644 index 1e35205e1c..0000000000 --- a/script/c128454.lua +++ /dev/null @@ -1,36 +0,0 @@ ---EMスプリングース -function c128454.initial_effect(c) - --tohand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(128454,0)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_GRAVE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCountLimit(1,128454) - e1:SetCost(c128454.thcost) - e1:SetTarget(c128454.thtg) - e1:SetOperation(c128454.thop) - c:RegisterEffect(e1) -end -function c128454.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) -end -function c128454.thfilter(c) - return ((c:IsLocation(LOCATION_SZONE) and (c:GetSequence()==6 or c:GetSequence()==7) and (c:IsSetCard(0x9f) or c:IsSetCard(0x98))) - or (c:IsFaceup() and c:IsLocation(LOCATION_MZONE) and c:IsType(TYPE_PENDULUM))) and c:IsAbleToHand() -end -function c128454.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsControler(tp) and c128454.thfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c128454.thfilter,tp,LOCATION_ONFIELD,0,2,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g=Duel.SelectTarget(tp,c128454.thfilter,tp,LOCATION_ONFIELD,0,2,2,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,2,0,0) -end -function c128454.thop(e,tp,eg,ep,ev,re,r,rp) - local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) - if tg:GetCount()==2 then - Duel.SendtoHand(tg,nil,REASON_EFFECT) - end -end diff --git a/script/c12863633.lua b/script/c12863633.lua deleted file mode 100644 index e00c8df4da..0000000000 --- a/script/c12863633.lua +++ /dev/null @@ -1,42 +0,0 @@ ---五稜星の呪縛 -function c12863633.initial_effect(c) - --remove - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_REMOVE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,0x1c0) - e1:SetTarget(c12863633.target) - e1:SetOperation(c12863633.operation) - c:RegisterEffect(e1) -end -function c12863633.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) end - if chk==0 then return Duel.IsExistingTarget(nil,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - Duel.SelectTarget(tp,nil,tp,0,LOCATION_MZONE,1,1,nil) -end -function c12863633.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UNRELEASABLE_SUM) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(1) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_UNRELEASABLE_NONSUM) - e2:SetReset(RESET_EVENT+0x1fe0000) - e2:SetValue(1) - tc:RegisterEffect(e2) - local e3=Effect.CreateEffect(e:GetHandler()) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL) - e3:SetReset(RESET_EVENT+0x1fe0000) - e3:SetValue(1) - tc:RegisterEffect(e3) - end -end diff --git a/script/c1287123.lua b/script/c1287123.lua deleted file mode 100644 index 743f700935..0000000000 --- a/script/c1287123.lua +++ /dev/null @@ -1,42 +0,0 @@ ---マテリアルファルコ -function c1287123.initial_effect(c) - --Negate - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(1287123,0)) - e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_CHAINING) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c1287123.condition) - e1:SetCost(c1287123.cost) - e1:SetTarget(c1287123.target) - e1:SetOperation(c1287123.operation) - c:RegisterEffect(e1) -end -function c1287123.filter(c) - return c:IsOnField() and c:IsType(TYPE_SPELL+TYPE_TRAP) -end -function c1287123.condition(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) or not Duel.IsChainNegatable(ev) then return false end - if not re:IsActiveType(TYPE_MONSTER) or re:IsHasCategory(CATEGORY_NEGATE) then return false end - local ex,tg,tc=Duel.GetOperationInfo(ev,CATEGORY_DESTROY) - return ex and tg~=nil and tc+tg:FilterCount(c1287123.filter,nil)-tg:GetCount()>0 -end -function c1287123.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,Card.IsAbleToGraveAsCost,1,1,REASON_COST) -end -function c1287123.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) - end -end -function c1287123.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateActivation(ev) - if re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(eg,REASON_EFFECT) - end -end diff --git a/script/c12923641.lua b/script/c12923641.lua deleted file mode 100644 index 911a388797..0000000000 --- a/script/c12923641.lua +++ /dev/null @@ -1,56 +0,0 @@ ---闇の護封剣 -function c12923641.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_POSITION) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c12923641.target) - e1:SetOperation(c12923641.activate) - c:RegisterEffect(e1) - --cannot change position - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetRange(LOCATION_SZONE) - e1:SetCode(EFFECT_CANNOT_CHANGE_POSITION) - e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE) - e1:SetTargetRange(0,LOCATION_MZONE) - c:RegisterEffect(e1) -end -function c12923641.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local c=e:GetHandler() - c:SetTurnCounter(0) - local g=Duel.GetMatchingGroup(Card.IsCanTurnSet,tp,0,LOCATION_MZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_POSITION,g,g:GetCount(),0,0) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) - e2:SetCountLimit(1) - e2:SetRange(LOCATION_SZONE) - e2:SetCondition(c12923641.descon) - e2:SetOperation(c12923641.desop) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,2) - c:RegisterEffect(e2) -end -function c12923641.activate(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local g=Duel.GetMatchingGroup(Card.IsCanTurnSet,tp,0,LOCATION_MZONE,nil) - if g:GetCount()>0 then - Duel.ChangePosition(g,POS_FACEDOWN_DEFENCE) - end -end -function c12923641.descon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c12923641.desop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local ct=c:GetTurnCounter() - ct=ct+1 - c:SetTurnCounter(ct) - if ct==2 then - Duel.Destroy(c,REASON_RULE) - end -end diff --git a/script/c12927849.lua b/script/c12927849.lua deleted file mode 100644 index 9eac20271c..0000000000 --- a/script/c12927849.lua +++ /dev/null @@ -1,104 +0,0 @@ ---SZW-天聖輝狼剣 -function c12927849.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(12927849,0)) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c12927849.sptg) - e1:SetOperation(c12927849.spop) - c:RegisterEffect(e1) - --equip - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(12927849,1)) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCategory(CATEGORY_EQUIP) - e2:SetRange(LOCATION_HAND) - e2:SetTarget(c12927849.eqtg) - e2:SetOperation(c12927849.eqop) - c:RegisterEffect(e2) - --salvage - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(12927849,2)) - e3:SetCategory(CATEGORY_TOHAND) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_BATTLE_DESTROYING) - e3:SetRange(LOCATION_SZONE) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetCondition(c12927849.thcon) - e3:SetTarget(c12927849.thtg) - e3:SetOperation(c12927849.thop) - c:RegisterEffect(e3) -end -function c12927849.filter(c,e,tp) - return c:IsFaceup() and c:IsSetCard(0x7e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c12927849.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_SZONE) and chkc:IsControler(tp) and c12927849.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c12927849.filter,tp,LOCATION_SZONE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c12927849.filter,tp,LOCATION_SZONE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c12927849.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENCE) - end -end -function c12927849.eqfilter(c) - return c:IsFaceup() and c:IsSetCard(0x7f) -end -function c12927849.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c12927849.eqfilter(chkc) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingTarget(c12927849.eqfilter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c12927849.eqfilter,tp,LOCATION_MZONE,0,1,1,nil) -end -function c12927849.eqop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) then return end - local tc=Duel.GetFirstTarget() - if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or tc:GetControler()~=tp or tc:IsFacedown() or not tc:IsRelateToEffect(e) then - Duel.SendtoGrave(c,REASON_EFFECT) - return - end - Duel.Equip(tp,c,tc,true) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(c12927849.eqlimit) - e1:SetLabelObject(tc) - c:RegisterEffect(e1) -end -function c12927849.eqlimit(e,c) - return c==e:GetLabelObject() -end -function c12927849.thcon(e,tp,eg,ep,ev,re,r,rp) - local ec=eg:GetFirst() - local bc=ec:GetBattleTarget() - return ec==e:GetHandler():GetEquipTarget() and ec:IsStatus(STATUS_OPPO_BATTLE) and bc:IsLocation(LOCATION_GRAVE) and bc:IsType(TYPE_MONSTER) -end -function c12927849.thfilter(c) - return c:IsSetCard(0x7e) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() -end -function c12927849.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c12927849.thfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c12927849.thfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c12927849.thfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c12927849.thop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end diff --git a/script/c12940613.lua b/script/c12940613.lua deleted file mode 100644 index a9800e3f38..0000000000 --- a/script/c12940613.lua +++ /dev/null @@ -1,61 +0,0 @@ ---マドルチェ・マナー -function c12940613.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_TODECK) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetCondition(c12940613.condition) - e1:SetTarget(c12940613.target) - e1:SetOperation(c12940613.activate) - c:RegisterEffect(e1) -end -function c12940613.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end -function c12940613.filter(c) - return c:IsFaceup() and c:IsSetCard(0x71) -end -function c12940613.tdfilter1(c) - return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x71) and c:IsAbleToDeck() -end -function c12940613.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c12940613.tdfilter1(chkc) end - if chk==0 then return Duel.IsExistingMatchingCard(c12940613.filter,tp,LOCATION_MZONE,0,1,nil) - and Duel.IsExistingTarget(c12940613.tdfilter1,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectTarget(tp,c12940613.tdfilter1,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0) -end -function c12940613.tdfilter2(c) - return c:IsType(TYPE_MONSTER) and c:IsAbleToDeck() and not c:IsHasEffect(EFFECT_NECRO_VALLEY) -end -function c12940613.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoDeck(tc,nil,2,REASON_EFFECT) - end - local g=Duel.GetMatchingGroup(c12940613.filter,tp,LOCATION_MZONE,0,nil) - tc=g:GetFirst() - if not tc then return end - while tc do - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(800) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_UPDATE_DEFENCE) - tc:RegisterEffect(e2) - tc=g:GetNext() - end - local dg=Duel.GetMatchingGroup(c12940613.tdfilter2,tp,LOCATION_GRAVE,0,nil) - if dg:GetCount()~=0 and Duel.SelectYesNo(tp,aux.Stringid(12940613,0)) then - Duel.BreakEffect() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - Duel.SendtoDeck(dg:Select(tp,1,1,nil),nil,2,REASON_EFFECT) - end -end diff --git a/script/c12948099.lua b/script/c12948099.lua deleted file mode 100644 index d3f6ad620d..0000000000 --- a/script/c12948099.lua +++ /dev/null @@ -1,94 +0,0 @@ ---古神クトグア -function c12948099.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1) - c:EnableReviveLimit() - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(12948099,0)) - e1:SetCategory(CATEGORY_TODECK) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DELAY) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(c12948099.tdcon) - e1:SetTarget(c12948099.tdtg) - e1:SetOperation(c12948099.tdop) - c:RegisterEffect(e1) - --draw - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(12948099,1)) - e2:SetCategory(CATEGORY_DRAW) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_BE_MATERIAL) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetCondition(c12948099.drcon) - e2:SetTarget(c12948099.drtg) - e2:SetOperation(c12948099.drop) - c:RegisterEffect(e2) - --effect gain - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e3:SetCode(EVENT_BE_MATERIAL) - e3:SetCondition(c12948099.efcon) - e3:SetOperation(c12948099.efop) - c:RegisterEffect(e3) -end -function c12948099.tdcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_SYNCHRO -end -function c12948099.filter(c) - return c:IsType(TYPE_XYZ) and c:GetRank()==4 and c:IsAbleToExtra() -end -function c12948099.tdtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c12948099.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - local g=Duel.GetMatchingGroup(c12948099.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0) -end -function c12948099.tdop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c12948099.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - if g:GetCount()>0 then - Duel.SendtoDeck(g,nil,0,REASON_EFFECT) - end -end -function c12948099.drcon(e,tp,eg,ep,ev,re,r,rp) - return r==REASON_FUSION -end -function c12948099.drtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(1) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c12948099.drop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end -function c12948099.efcon(e,tp,eg,ep,ev,re,r,rp) - return r==REASON_XYZ -end -function c12948099.efop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local rc=c:GetReasonCard() - local e1=Effect.CreateEffect(rc) - e1:SetDescription(aux.Stringid(12948099,2)) - e1:SetCategory(CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(c12948099.drcon2) - e1:SetTarget(c12948099.drtg) - e1:SetOperation(c12948099.drop) - e1:SetReset(RESET_EVENT+0x1fe0000) - rc:RegisterEffect(e1,true) - if not rc:IsType(TYPE_EFFECT) then - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_ADD_TYPE) - e2:SetValue(TYPE_EFFECT) - e2:SetReset(RESET_EVENT+0x1fe0000) - rc:RegisterEffect(e2,true) - end -end -function c12948099.drcon2(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_XYZ -end diff --git a/script/c12953226.lua b/script/c12953226.lua deleted file mode 100644 index c45d310bc8..0000000000 --- a/script/c12953226.lua +++ /dev/null @@ -1,24 +0,0 @@ ---女邪神ヌヴィア -function c12953226.initial_effect(c) - --self destroy - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetOperation(c12953226.desop) - c:RegisterEffect(e1) - --atk down - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(c12953226.val) - c:RegisterEffect(e2) -end -function c12953226.desop(e,tp,eg,ep,ev,re,r,rp) - Duel.Destroy(e:GetHandler(),REASON_EFFECT) -end -function c12953226.val(e,c) - local tp=c:GetControler() - return Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)*-200 -end diff --git a/script/c12958919.lua b/script/c12958919.lua deleted file mode 100644 index 7053122091..0000000000 --- a/script/c12958919.lua +++ /dev/null @@ -1,92 +0,0 @@ ---幻銃士 -function c12958919.initial_effect(c) - --token - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(12958919,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c12958919.sptg) - e1:SetOperation(c12958919.spop) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - c:RegisterEffect(e2) - --damage - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(12958919,1)) - e2:SetCategory(CATEGORY_DAMAGE) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCondition(c12958919.damcon) - e2:SetCost(c12958919.damcost) - e2:SetTarget(c12958919.damtg) - e2:SetOperation(c12958919.damop) - c:RegisterEffect(e2) - if not c12958919.global_check then - c12958919.global_check=true - local ge1=Effect.CreateEffect(c) - ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - ge1:SetCode(EVENT_ATTACK_ANNOUNCE) - ge1:SetOperation(c12958919.checkop) - Duel.RegisterEffect(ge1,0) - end -end -function c12958919.checkop(e,tp,eg,ep,ev,re,r,rp) - local tc=eg:GetFirst() - if tc:IsSetCard(0x49) then - Duel.RegisterFlagEffect(tc:GetControler(),12958919,RESET_PHASE+PHASE_END,0,1) - end -end -function c12958919.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsPlayerCanSpecialSummonMonster(tp,12958920,0x49,0x4011,500,500,4,RACE_FIEND,ATTRIBUTE_DARK) end - Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0) -end -function c12958919.spop(e,tp,eg,ep,ev,re,r,rp) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - local ct=Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0) - if ft>ct then ft=ct end - if ft<=0 then return end - if not Duel.IsPlayerCanSpecialSummonMonster(tp,12958920,0x49,0x4011,500,500,4,RACE_FIEND,ATTRIBUTE_DARK) then return end - local ctn=true - while ft>0 and ctn do - local token=Duel.CreateToken(tp,12958920) - Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP) - ft=ft-1 - if ft<=0 or not Duel.SelectYesNo(tp,aux.Stringid(12958919,2)) then ctn=false end - end - Duel.SpecialSummonComplete() -end -function c12958919.damcon(e,tp,eg,ep,ev,re,r,rp) - return tp==Duel.GetTurnPlayer() -end -function c12958919.damcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetFlagEffect(tp,12958919)==0 end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE) - e1:SetProperty(EFFECT_FLAG_OATH) - e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x49)) - e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetReset(RESET_PHASE+RESET_END) - Duel.RegisterEffect(e1,tp) -end -function c12958919.damfilter(c) - return c:IsFaceup() and c:IsSetCard(0x49) -end -function c12958919.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local ct=Duel.GetMatchingGroupCount(c12958919.damfilter,tp,LOCATION_MZONE,0,nil) - Duel.SetTargetPlayer(1-tp) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,ct*300) -end -function c12958919.damop(e,tp,eg,ep,ev,re,r,rp) - local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) - local ct=Duel.GetMatchingGroupCount(c12958919.damfilter,tp,LOCATION_MZONE,0,nil) - Duel.Damage(p,ct*300,REASON_EFFECT) -end diff --git a/script/c12965761.lua b/script/c12965761.lua deleted file mode 100644 index 88e39a3a10..0000000000 --- a/script/c12965761.lua +++ /dev/null @@ -1,109 +0,0 @@ ---デス・デンドル -function c12965761.initial_effect(c) - --equip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(12965761,0)) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetTarget(c12965761.eqtg) - e1:SetOperation(c12965761.eqop) - c:RegisterEffect(e1) - --unequip - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(12965761,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_SZONE) - e2:SetCondition(c12965761.uncon) - e2:SetTarget(c12965761.sptg) - e2:SetOperation(c12965761.spop) - c:RegisterEffect(e2) - --token - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(12965761,2)) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e3:SetRange(LOCATION_SZONE) - e3:SetCode(EVENT_BATTLE_DESTROYING) - e3:SetCondition(c12965761.tkcon) - e3:SetTarget(c12965761.tktg) - e3:SetOperation(c12965761.tkop) - c:RegisterEffect(e3) - --destroy sub - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_EQUIP) - e4:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e4:SetCode(EFFECT_DESTROY_SUBSTITUTE) - e4:SetCondition(c12965761.uncon) - e4:SetValue(c12965761.repval) - c:RegisterEffect(e4) - --eqlimit - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_SINGLE) - e5:SetCode(EFFECT_EQUIP_LIMIT) - e5:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e5:SetValue(c12965761.eqlimit) - c:RegisterEffect(e5) -end -function c12965761.uncon(e) - return e:GetHandler():IsStatus(STATUS_UNION) -end -function c12965761.repval(e,re,r,rp) - return bit.band(r,REASON_BATTLE)~=0 -end -function c12965761.eqlimit(e,c) - return c:IsCode(46571052) -end -function c12965761.filter(c) - return c:IsFaceup() and c:IsCode(46571052) and c:GetUnionCount()==0 -end -function c12965761.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c12965761.filter(chkc) end - if chk==0 then return e:GetHandler():GetFlagEffect(12965761)==0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingTarget(c12965761.filter,tp,LOCATION_MZONE,0,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local g=Duel.SelectTarget(tp,c12965761.filter,tp,LOCATION_MZONE,0,1,1,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0) - e:GetHandler():RegisterFlagEffect(12965761,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1) -end -function c12965761.eqop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if not c:IsRelateToEffect(e) or c:IsFacedown() then return end - if not tc:IsRelateToEffect(e) or not c12965761.filter(tc) then - Duel.SendtoGrave(c,REASON_EFFECT) - return - end - if not Duel.Equip(tp,c,tc,false) then return end - c:SetStatus(STATUS_UNION,true) -end -function c12965761.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():GetFlagEffect(12965761)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,false) end - Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) - e:GetHandler():RegisterFlagEffect(12965761,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1) -end -function c12965761.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP_ATTACK) - end -end -function c12965761.tkcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsStatus(STATUS_UNION) and eg:GetFirst()==e:GetHandler():GetEquipTarget() -end -function c12965761.tktg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0) -end -function c12965761.tkop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - if Duel.IsPlayerCanSpecialSummonMonster(tp,12965762,0,0x4011,800,800,1,RACE_PLANT,ATTRIBUTE_EARTH) then - local token=Duel.CreateToken(tp,12965762) - Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c12980373.lua b/script/c12980373.lua deleted file mode 100644 index a8a6a00ec2..0000000000 --- a/script/c12980373.lua +++ /dev/null @@ -1,51 +0,0 @@ ---マドルチェ・ミィルフィーヤ -function c12980373.initial_effect(c) - --to deck - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(12980373,0)) - e1:SetCategory(CATEGORY_TODECK) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCondition(c12980373.retcon) - e1:SetTarget(c12980373.rettg) - e1:SetOperation(c12980373.retop) - c:RegisterEffect(e1) - --summon success - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(12980373,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_SUMMON_SUCCESS) - e2:SetTarget(c12980373.sptg) - e2:SetOperation(c12980373.spop) - c:RegisterEffect(e2) -end -function c12980373.retcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsReason(REASON_DESTROY) and e:GetHandler():GetReasonPlayer()~=tp - and e:GetHandler():GetPreviousControler()==tp -end -function c12980373.rettg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0) -end -function c12980373.retop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_EFFECT) - end -end -function c12980373.filter(c,e,tp) - return c:IsSetCard(0x71) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c12980373.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c12980373.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c12980373.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c12980373.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c12986778.lua b/script/c12986778.lua deleted file mode 100644 index 659f512d22..0000000000 --- a/script/c12986778.lua +++ /dev/null @@ -1,38 +0,0 @@ ---機皇帝の賜与 -function c12986778.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c12986778.condition) - e1:SetCost(c12986778.cost) - e1:SetTarget(c12986778.target) - e1:SetOperation(c12986778.activate) - c:RegisterEffect(e1) -end -function c12986778.condition(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - return g:GetCount()==2 and g:GetFirst():IsSetCard(0x13) and g:GetNext():IsSetCard(0x13) -end -function c12986778.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetCurrentPhase()==PHASE_MAIN1 end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_BP) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) - e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function c12986778.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp,2) end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(2) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2) -end -function c12986778.activate(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end diff --git a/script/c12986807.lua b/script/c12986807.lua deleted file mode 100644 index f68f22146e..0000000000 --- a/script/c12986807.lua +++ /dev/null @@ -1,50 +0,0 @@ ---ラヴァル・グレイター -function c12986807.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,nil,aux.NonTuner(Card.IsAttribute,ATTRIBUTE_FIRE),1) - c:EnableReviveLimit() - --to hand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(12986807,0)) - e1:SetCategory(CATEGORY_TOGRAVE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(c12986807.condition) - e1:SetTarget(c12986807.target) - e1:SetOperation(c12986807.operation) - c:RegisterEffect(e1) - --Destroy replace - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EFFECT_DESTROY_REPLACE) - e2:SetTarget(c12986807.desreptg) - c:RegisterEffect(e2) -end -function c12986807.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_SYNCHRO -end -function c12986807.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_HAND) -end -function c12986807.operation(e,tp,eg,ep,ev,re,r,rp,chk) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_HAND,0,1,1,nil) - Duel.SendtoGrave(g,REASON_EFFECT) -end -function c12986807.repfilter(c) - return c:IsSetCard(0x39) and c:IsAbleToRemoveAsCost() -end -function c12986807.desreptg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return not c:IsReason(REASON_REPLACE) and c:IsReason(REASON_EFFECT) - and Duel.IsExistingMatchingCard(c12986807.repfilter,tp,LOCATION_GRAVE,0,1,nil) end - if Duel.SelectYesNo(tp,aux.Stringid(12986807,1)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c12986807.repfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) - return true - else return false end -end diff --git a/script/c13002461.lua b/script/c13002461.lua deleted file mode 100644 index 9f9090ec33..0000000000 --- a/script/c13002461.lua +++ /dev/null @@ -1,53 +0,0 @@ ---魔導戦士 フォルス -function c13002461.initial_effect(c) - --atk/lv up - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(13002461,0)) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCost(c13002461.cost) - e1:SetTarget(c13002461.target) - e1:SetOperation(c13002461.operation) - c:RegisterEffect(e1) -end -function c13002461.cfilter(c) - return c:IsSetCard(0x106e) and c:IsType(TYPE_SPELL) and c:IsAbleToDeckAsCost() -end -function c13002461.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c13002461.cfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectMatchingCard(tp,c13002461.cfilter,tp,LOCATION_GRAVE,0,1,1,e:GetHandler()) - Duel.SendtoDeck(g,nil,2,REASON_COST) -end -function c13002461.filter(c) - return c:IsFaceup() and c:IsRace(RACE_SPELLCASTER) and c:IsLevelAbove(1) -end -function c13002461.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c13002461.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c13002461.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c13002461.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) -end -function c13002461.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(500) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_UPDATE_LEVEL) - e2:SetReset(RESET_EVENT+0x1fe0000) - e2:SetValue(1) - tc:RegisterEffect(e2) - end -end diff --git a/script/c13026402.lua b/script/c13026402.lua deleted file mode 100644 index 39d0f6c578..0000000000 --- a/script/c13026402.lua +++ /dev/null @@ -1,36 +0,0 @@ ---トラップ処理班 Aチーム -function c13026402.initial_effect(c) - --Negate - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(13026402,0)) - e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EVENT_CHAINING) - e1:SetCondition(c13026402.condition) - e1:SetCost(c13026402.cost) - e1:SetTarget(c13026402.target) - e1:SetOperation(c13026402.activate) - c:RegisterEffect(e1) -end -function c13026402.condition(e,tp,eg,ep,ev,re,r,rp) - return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and rp~=tp - and re:IsActiveType(TYPE_TRAP) and re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev) -end -function c13026402.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end -function c13026402.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) - end -end -function c13026402.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateActivation(ev) - if re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(eg,REASON_EFFECT) - end -end diff --git a/script/c13030280.lua b/script/c13030280.lua deleted file mode 100644 index 1b76d760e4..0000000000 --- a/script/c13030280.lua +++ /dev/null @@ -1,52 +0,0 @@ ---CX-CH レジェンド・アーサー -function c13030280.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,5,3) - c:EnableReviveLimit() - --battle indes - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_INDESTRUCTABLE_COUNT) - e1:SetCountLimit(1) - e1:SetValue(c13030280.valcon) - c:RegisterEffect(e1) - --damage - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(13030280,0)) - e2:SetCategory(CATEGORY_DAMAGE) - e2:SetCode(EVENT_BATTLE_DESTROYING) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCondition(c13030280.damcon) - e2:SetCost(c13030280.damcost) - e2:SetTarget(c13030280.damtg) - e2:SetOperation(c13030280.damop) - c:RegisterEffect(e2) -end -function c13030280.valcon(e,re,r,rp) - return bit.band(r,REASON_BATTLE)~=0 -end -function c13030280.damcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local bc=c:GetBattleTarget() - return c:GetOverlayGroup():IsExists(Card.IsCode,1,nil,77631175) - and c:IsRelateToBattle() and bc:IsLocation(LOCATION_GRAVE) and bc:IsType(TYPE_MONSTER) -end -function c13030280.damcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c13030280.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - local bc=e:GetHandler():GetBattleTarget() - if chk==0 then return bc:IsAbleToRemove() end - Duel.SetTargetCard(bc) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,bc,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,bc:GetBaseAttack()) -end -function c13030280.damop(e,tp,eg,ep,ev,re,r,rp) - local bc=Duel.GetFirstTarget() - if bc:IsRelateToEffect(e) and Duel.Remove(bc,POS_FACEUP,REASON_EFFECT)>0 then - Duel.Damage(1-tp,bc:GetBaseAttack(),REASON_EFFECT) - end -end diff --git a/script/c13032689.lua b/script/c13032689.lua deleted file mode 100644 index 9452b9642c..0000000000 --- a/script/c13032689.lua +++ /dev/null @@ -1,69 +0,0 @@ ---エクシーズ・ユニット -function c13032689.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c13032689.target) - e1:SetOperation(c13032689.operation) - c:RegisterEffect(e1) - --Atk up - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(c13032689.atkval) - c:RegisterEffect(e2) - --Equip limit - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_EQUIP_LIMIT) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e3:SetValue(c13032689.eqlimit) - c:RegisterEffect(e3) - --remove overlay replace - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(13032689,0)) - e4:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e4:SetCode(EFFECT_OVERLAY_REMOVE_REPLACE) - e4:SetRange(LOCATION_SZONE) - e4:SetCondition(c13032689.rcon) - e4:SetOperation(c13032689.rop) - c:RegisterEffect(e4) -end -function c13032689.eqlimit(e,c) - return c:IsType(TYPE_XYZ) -end -function c13032689.filter(c) - return c:IsFaceup() and c:IsType(TYPE_XYZ) -end -function c13032689.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c13032689.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c13032689.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c13032689.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c13032689.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,e:GetHandler(),tc) - end -end -function c13032689.atkval(e,c) - return c:GetRank()*200 -end -function c13032689.rcon(e,tp,eg,ep,ev,re,r,rp) - return bit.band(r,REASON_COST)~=0 and re:IsHasType(0x7e0) and re:IsActiveType(TYPE_XYZ) - and ep==e:GetOwnerPlayer() and e:GetHandler():GetEquipTarget()==re:GetHandler() and re:GetHandler():GetOverlayCount()>=ev-1 -end -function c13032689.rop(e,tp,eg,ep,ev,re,r,rp) - local ct=bit.band(ev,0xffff) - if ct==1 then - Duel.SendtoGrave(e:GetHandler(),REASON_COST) - else - Duel.SendtoGrave(e:GetHandler(),REASON_COST) - re:GetHandler():RemoveOverlayCard(tp,ct-1,ct-1,REASON_COST) - end -end diff --git a/script/c13073850.lua b/script/c13073850.lua deleted file mode 100644 index 1594def951..0000000000 --- a/script/c13073850.lua +++ /dev/null @@ -1,159 +0,0 @@ ---クリフォート・エイリアス -function c13073850.initial_effect(c) - --pendulum summon - aux.AddPendulumProcedure(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --splimit - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE) - e2:SetRange(LOCATION_PZONE) - e2:SetTargetRange(1,0) - e2:SetCondition(c13073850.splimcon) - e2:SetTarget(c13073850.splimit) - c:RegisterEffect(e2) - --atk up - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetRange(LOCATION_PZONE) - e3:SetCode(EFFECT_UPDATE_ATTACK) - e3:SetTargetRange(LOCATION_MZONE,0) - e3:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0xaa)) - e3:SetValue(300) - c:RegisterEffect(e3) - --summon with no tribute - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(13073850,0)) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e4:SetCode(EFFECT_SUMMON_PROC) - e4:SetCondition(c13073850.ntcon) - c:RegisterEffect(e4) - --change level - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_SINGLE) - e5:SetCode(EFFECT_SUMMON_COST) - e5:SetOperation(c13073850.lvop) - c:RegisterEffect(e5) - local e6=Effect.CreateEffect(c) - e6:SetType(EFFECT_TYPE_SINGLE) - e6:SetCode(EFFECT_SPSUMMON_COST) - e6:SetOperation(c13073850.lvop2) - c:RegisterEffect(e6) - --immune - local e7=Effect.CreateEffect(c) - e7:SetType(EFFECT_TYPE_SINGLE) - e7:SetCode(EFFECT_IMMUNE_EFFECT) - e7:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_UNCOPYABLE) - e7:SetRange(LOCATION_MZONE) - e7:SetCondition(c13073850.immcon) - e7:SetValue(aux.qlifilter) - c:RegisterEffect(e7) - --tohand - local e8=Effect.CreateEffect(c) - e8:SetDescription(aux.Stringid(13073850,1)) - e8:SetCategory(CATEGORY_TOHAND) - e8:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e8:SetCode(EVENT_SUMMON_SUCCESS) - e8:SetProperty(EFFECT_FLAG_CARD_TARGET) - e8:SetCondition(c13073850.thcon) - e8:SetTarget(c13073850.thtg) - e8:SetOperation(c13073850.thop) - c:RegisterEffect(e8) - --tribute check - local e9=Effect.CreateEffect(c) - e9:SetType(EFFECT_TYPE_SINGLE) - e9:SetCode(EFFECT_MATERIAL_CHECK) - e9:SetValue(c13073850.valcheck) - e9:SetLabelObject(e8) - c:RegisterEffect(e9) -end -function c13073850.splimcon(e) - return not e:GetHandler():IsForbidden() -end -function c13073850.splimit(e,c) - return not c:IsSetCard(0xaa) -end -function c13073850.ntcon(e,c,minc) - if c==nil then return true end - return minc==0 and c:GetLevel()>4 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 -end -function c13073850.lvcon(e) - return e:GetHandler():GetMaterialCount()==0 -end -function c13073850.lvop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CHANGE_LEVEL) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c13073850.lvcon) - e1:SetValue(4) - e1:SetReset(RESET_EVENT+0xff0000) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_SET_BASE_ATTACK) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetCondition(c13073850.lvcon) - e2:SetValue(1800) - e2:SetReset(RESET_EVENT+0xff0000) - c:RegisterEffect(e2) -end -function c13073850.lvop2(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CHANGE_LEVEL) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetValue(4) - e1:SetReset(RESET_EVENT+0xff0000) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_SET_BASE_ATTACK) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetValue(1800) - e2:SetReset(RESET_EVENT+0xff0000) - c:RegisterEffect(e2) -end -function c13073850.immcon(e) - return bit.band(e:GetHandler():GetSummonType(),SUMMON_TYPE_NORMAL)==SUMMON_TYPE_NORMAL -end -function c13073850.thcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_ADVANCE and e:GetLabel()==1 -end -function c13073850.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsAbleToHand() end - if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g=Duel.SelectTarget(tp,Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) - Duel.SetChainLimit(c13073850.chlimit) -end -function c13073850.chlimit(e,ep,tp) - return tp==ep -end -function c13073850.thop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - end -end -function c13073850.valcheck(e,c) - local g=c:GetMaterial() - if g:IsExists(Card.IsSetCard,1,nil,0xaa) then - e:GetLabelObject():SetLabel(1) - else - e:GetLabelObject():SetLabel(0) - end -end diff --git a/script/c13093792.lua b/script/c13093792.lua deleted file mode 100644 index b37f6cf8b6..0000000000 --- a/script/c13093792.lua +++ /dev/null @@ -1,62 +0,0 @@ ---D-HERO ダイヤモンドガイ -function c13093792.initial_effect(c) - -- - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(13093792,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_MZONE) - e1:SetTarget(c13093792.target) - e1:SetOperation(c13093792.operation) - c:RegisterEffect(e1) -end -function c13093792.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0 end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,0,0) -end -function c13093792.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)==0 then return end - Duel.ConfirmDecktop(tp,1) - local g=Duel.GetDecktopGroup(tp,1) - local tc=g:GetFirst() - if tc:GetType()==TYPE_SPELL then - Duel.DisableShuffleCheck() - Duel.SendtoGrave(g,REASON_EFFECT) - local ae=tc:GetActivateEffect() - if tc:GetLocation()==LOCATION_GRAVE and ae then - local e1=Effect.CreateEffect(tc) - e1:SetDescription(ae:GetDescription()) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_GRAVE) - e1:SetReset(RESET_EVENT+0x2fe0000+RESET_PHASE+PHASE_END+RESET_SELF_TURN,2) - e1:SetCondition(c13093792.spellcon) - e1:SetTarget(c13093792.spelltg) - e1:SetOperation(c13093792.spellop) - tc:RegisterEffect(e1) - end - else - Duel.MoveSequence(tc,1) - end -end -function c13093792.spellcon(e,tp,eg,ep,ev,re,r,rp,chk) - return e:GetHandler():GetTurnID()~=Duel.GetTurnCount() -end -function c13093792.spelltg(e,tp,eg,ep,ev,re,r,rp,chk) - local ae=e:GetHandler():GetActivateEffect() - local ftg=ae:GetTarget() - if chk==0 then - return not ftg or ftg(e,tp,eg,ep,ev,re,r,rp,chk) - end - if ae:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then - e:SetProperty(EFFECT_FLAG_CARD_TARGET) - else e:SetProperty(0) end - if ftg then - ftg(e,tp,eg,ep,ev,re,r,rp,chk) - end -end -function c13093792.spellop(e,tp,eg,ep,ev,re,r,rp) - local ae=e:GetHandler():GetActivateEffect() - local fop=ae:GetOperation() - fop(e,tp,eg,ep,ev,re,r,rp) -end diff --git a/script/c13108445.lua b/script/c13108445.lua deleted file mode 100644 index 2eb4c9d09d..0000000000 --- a/script/c13108445.lua +++ /dev/null @@ -1,61 +0,0 @@ ---ジェムナイト・アクアマリナ -function c13108445.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcCodeFun(c,27126980,aux.FilterBoolFunction(Card.IsSetCard,0x1047),1,false,false) - --spsummon condition - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e2:SetCode(EFFECT_SPSUMMON_CONDITION) - e2:SetValue(c13108445.splimit) - c:RegisterEffect(e2) - --to hand - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(13108445,0)) - e3:SetCategory(CATEGORY_TOHAND) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetCode(EVENT_TO_GRAVE) - e3:SetCondition(c13108445.thcon) - e3:SetTarget(c13108445.thtg) - e3:SetOperation(c13108445.thop) - c:RegisterEffect(e3) - --to defence - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e4:SetCode(EVENT_PHASE+PHASE_BATTLE) - e4:SetRange(LOCATION_MZONE) - e4:SetCountLimit(1) - e4:SetCondition(c13108445.poscon) - e4:SetOperation(c13108445.posop) - c:RegisterEffect(e4) -end -function c13108445.splimit(e,se,sp,st) - return not e:GetHandler():IsLocation(LOCATION_EXTRA) or bit.band(st,SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION -end -function c13108445.thcon(e,tp,eg,ep,ev,re,r,rp) - return bit.band(e:GetHandler():GetPreviousLocation(),LOCATION_ONFIELD)~=0 -end -function c13108445.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and chkc:IsAbleToHand() end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g=Duel.SelectTarget(tp,Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0) -end -function c13108445.thop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - end -end -function c13108445.poscon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetAttackedCount()>0 -end -function c13108445.posop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsAttackPos() then - Duel.ChangePosition(c,POS_FACEUP_DEFENCE) - end -end diff --git a/script/c131182.lua b/script/c131182.lua deleted file mode 100644 index 625233c066..0000000000 --- a/script/c131182.lua +++ /dev/null @@ -1,98 +0,0 @@ ---ミラクル・フリッパー -function c131182.initial_effect(c) - --sumlimit - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_SUMMON) - e1:SetCondition(c131182.excon) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_CANNOT_FLIP_SUMMON) - c:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e3:SetCode(EFFECT_SPSUMMON_CONDITION) - e3:SetValue(c131182.splimit) - c:RegisterEffect(e3) - --cannot be battle target - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_FIELD) - e4:SetRange(LOCATION_MZONE) - e4:SetTargetRange(0,LOCATION_MZONE) - e4:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET) - e4:SetValue(c131182.atlimit) - c:RegisterEffect(e4) - --spsummon - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e5:SetCode(EVENT_BATTLE_DESTROYED) - e5:SetOperation(c131182.battleop) - c:RegisterEffect(e5) - local e6=Effect.CreateEffect(c) - e6:SetDescription(aux.Stringid(131182,0)) - e6:SetCategory(CATEGORY_SPECIAL_SUMMON) - e6:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e6:SetRange(0xff) - e6:SetCode(EVENT_PHASE+PHASE_BATTLE) - e6:SetCountLimit(1) - e6:SetCondition(c131182.spcon) - e6:SetTarget(c131182.sptg) - e6:SetOperation(c131182.spop) - c:RegisterEffect(e6) - --destroy - local e7=Effect.CreateEffect(c) - e7:SetDescription(aux.Stringid(131182,1)) - e7:SetCategory(CATEGORY_DESTROY) - e7:SetProperty(EFFECT_FLAG_CARD_TARGET) - e7:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e7:SetCode(EVENT_DESTROYED) - e7:SetCondition(c131182.descon) - e7:SetTarget(c131182.destg) - e7:SetOperation(c131182.desop) - c:RegisterEffect(e7) -end -function c131182.exfilter(c) - return c:IsFaceup() and c:GetCode()==131182 -end -function c131182.excon(e) - local c=e:GetHandler() - return Duel.IsExistingMatchingCard(c131182.exfilter,c:GetControler(),LOCATION_ONFIELD,0,1,nil) -end -function c131182.splimit(e,se,sp,st,spos,tgp) - return not Duel.IsExistingMatchingCard(c131182.exfilter,tgp,LOCATION_ONFIELD,0,1,nil) -end -function c131182.atlimit(e,c) - return c:IsFaceup() and c~=e:GetHandler() -end -function c131182.battleop(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():RegisterFlagEffect(131182,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_BATTLE,0,1) -end -function c131182.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetFlagEffect(131182)~=0 -end -function c131182.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c131182.spop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - Duel.SpecialSummon(e:GetHandler(),0,tp,1-tp,false,false,POS_FACEUP) - end -end -function c131182.descon(e,tp,eg,ep,ev,re,r,rp) - return bit.band(r,REASON_EFFECT)~=0 and re:IsActiveType(TYPE_SPELL+TYPE_TRAP) -end -function c131182.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsDestructable() end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c131182.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c1315120.lua b/script/c1315120.lua deleted file mode 100644 index 9f96b27190..0000000000 --- a/script/c1315120.lua +++ /dev/null @@ -1,54 +0,0 @@ ---TG ストライカー -function c1315120.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c1315120.spcon) - c:RegisterEffect(e1) - --to grave - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetOperation(c1315120.regop) - c:RegisterEffect(e2) -end -function c1315120.spcon(e,c) - if c==nil then return true end - return Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0)==0 - and Duel.GetFieldGroupCount(c:GetControler(),0,LOCATION_MZONE)>0 - and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 -end -function c1315120.regop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if bit.band(c:GetPreviousLocation(),LOCATION_ONFIELD)~=0 and c:IsReason(REASON_DESTROY) then - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(1315120,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_GRAVE) - e1:SetTarget(c1315120.thtg) - e1:SetOperation(c1315120.thop) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - c:RegisterEffect(e1) - end -end -function c1315120.filter(c) - return c:IsSetCard(0x27) and c:GetCode()~=1315120 and c:IsAbleToHand() -end -function c1315120.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c1315120.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c1315120.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c1315120.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c13166204.lua b/script/c13166204.lua deleted file mode 100644 index 7b82c1a8c0..0000000000 --- a/script/c13166204.lua +++ /dev/null @@ -1,37 +0,0 @@ ---ガガガラッシュ -function c13166204.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DAMAGE+CATEGORY_NEGATE+CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_BECOME_TARGET) - e1:SetCondition(c13166204.condition) - e1:SetTarget(c13166204.target) - e1:SetOperation(c13166204.activate) - c:RegisterEffect(e1) -end -function c13166204.filter(c,tp) - return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) and c:IsSetCard(0x54) -end -function c13166204.condition(e,tp,eg,ep,ev,re,r,rp) - return rp~=tp and re:IsActiveType(TYPE_MONSTER) and eg:IsExists(c13166204.filter,1,nil,tp) and Duel.IsChainDisablable(ev) -end -function c13166204.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0) - if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,re:GetHandler(),1,0,0) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,0) - end -end -function c13166204.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateEffect(ev) - if re:GetHandler():IsRelateToEffect(re) and Duel.Destroy(re:GetHandler(),REASON_EFFECT)~=0 then - Duel.BreakEffect() - local a=re:GetHandler():GetAttack() - local b=re:GetHandler():GetDefence() - if b>a then a=b end - if a<0 then a=0 end - if a>0 then Duel.Damage(1-tp,a,REASON_EFFECT) end - end -end diff --git a/script/c13166648.lua b/script/c13166648.lua deleted file mode 100644 index e38cc15fbf..0000000000 --- a/script/c13166648.lua +++ /dev/null @@ -1,54 +0,0 @@ ---双龍降臨 -function c13166648.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetCountLimit(1,13166648+EFFECT_COUNT_CODE_OATH) - e1:SetCondition(c13166648.condition) - e1:SetTarget(c13166648.target) - e1:SetOperation(c13166648.activate) - c:RegisterEffect(e1) -end -function c13166648.condition(e,tp,eg,ep,ev,re,r,rp) - local tc=eg:GetFirst() - return tc:IsType(TYPE_XYZ) and tc:IsControler(1-tp) and Duel.GetAttackTarget()==nil -end -function c13166648.filter(c,e,tp) - return c:IsRace(RACE_DRAGON) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsType(TYPE_XYZ) - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c13166648.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c13166648.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function c13166648.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c13166648.filter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp) - local tc=g:GetFirst() - if tc and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_ATTACK)~=0 then - local a=Duel.GetAttacker() - if a:IsRelateToBattle() and a:IsFaceup() then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK) - e1:SetValue(a:GetAttack()) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE) - e2:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e2,true) - local e3=Effect.CreateEffect(e:GetHandler()) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_DISABLE_EFFECT) - e3:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e3,true) - Duel.CalculateDamage(a,tc) - end - end -end diff --git a/script/c13183454.lua b/script/c13183454.lua deleted file mode 100644 index 416b58ceec..0000000000 --- a/script/c13183454.lua +++ /dev/null @@ -1,41 +0,0 @@ ---零鳥姫リオート・ハルピュイア -function c13183454.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsRace,RACE_WINDBEAST),5,2) - c:EnableReviveLimit() - --atkdown - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(13183454,0)) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c13183454.cost) - e1:SetTarget(c13183454.target) - e1:SetOperation(c13183454.operation) - c:RegisterEffect(e1) -end -function c13183454.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c13183454.filter(c) - return c:IsFaceup() and c:GetAttack()>0 -end -function c13183454.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and c13183454.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c13183454.filter,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c13183454.filter,tp,0,LOCATION_MZONE,1,1,nil) -end -function c13183454.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) and tc:GetAttack()>0 then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetValue(0) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - end -end diff --git a/script/c13210191.lua b/script/c13210191.lua deleted file mode 100644 index 9292762f47..0000000000 --- a/script/c13210191.lua +++ /dev/null @@ -1,38 +0,0 @@ ---嵐 -function c13210191.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c13210191.target) - e1:SetOperation(c13210191.activate) - c:RegisterEffect(e1) -end -function c13210191.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable() -end -function c13210191.target(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return Duel.IsExistingMatchingCard(c13210191.filter,tp,LOCATION_ONFIELD,0,1,c) end - local g1=Duel.GetMatchingGroup(c13210191.filter,tp,LOCATION_ONFIELD,0,c) - local g2=Duel.GetMatchingGroup(c13210191.filter,tp,0,LOCATION_ONFIELD,nil) - local ct1=g1:GetCount() - local ct2=g2:GetCount() - g1:Merge(g2) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g1,ct1+((ct1>ct2) and ct2 or ct1),0,0) -end -function c13210191.activate(e,tp,eg,ep,ev,re,r,rp) - local g1=Duel.GetMatchingGroup(c13210191.filter,tp,LOCATION_ONFIELD,0,e:GetHandler()) - local ct1=Duel.Destroy(g1,REASON_EFFECT) - if ct1==0 then return end - local g2=Duel.GetMatchingGroup(c13210191.filter,tp,0,LOCATION_ONFIELD,nil) - if g2:GetCount()<=ct1 then - Duel.Destroy(g2,REASON_EFFECT) - else - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g3=g2:Select(tp,ct1,ct1,nil) - Duel.HintSelection(g3) - Duel.Destroy(g3,REASON_EFFECT) - end -end diff --git a/script/c13215230.lua b/script/c13215230.lua deleted file mode 100644 index dcc1dacc0a..0000000000 --- a/script/c13215230.lua +++ /dev/null @@ -1,31 +0,0 @@ ---ドリーム・ピエロ -function c13215230.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(13215230,0)) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_CHANGE_POS) - e1:SetCondition(c13215230.condition) - e1:SetTarget(c13215230.target) - e1:SetOperation(c13215230.operation) - c:RegisterEffect(e1) -end -function c13215230.condition(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return bit.band(c:GetPreviousPosition(),POS_ATTACK)~=0 and c:IsFaceup() and c:IsDefencePos() -end -function c13215230.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsDestructable() end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c13215230.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c13220032.lua b/script/c13220032.lua deleted file mode 100644 index 71789149d0..0000000000 --- a/script/c13220032.lua +++ /dev/null @@ -1,15 +0,0 @@ ---ヴァイロン・チャージャー -function c13220032.initial_effect(c) - --draw - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetTarget(aux.TargetBoolFunction(Card.IsAttribute,ATTRIBUTE_LIGHT)) - e1:SetValue(c13220032.atkval) - c:RegisterEffect(e1) -end -function c13220032.atkval(e,c) - return e:GetHandler():GetEquipCount()*300 -end diff --git a/script/c13250922.lua b/script/c13250922.lua deleted file mode 100644 index 97c754a120..0000000000 --- a/script/c13250922.lua +++ /dev/null @@ -1,69 +0,0 @@ ---オオアリクイクイアリ -function c13250922.initial_effect(c) - c:EnableReviveLimit() - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - c:RegisterEffect(e1) - --spsummon proc - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_SPSUMMON_PROC) - e2:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e2:SetRange(LOCATION_HAND) - e2:SetCondition(c13250922.spcon) - e2:SetOperation(c13250922.spop) - c:RegisterEffect(e2) - --destroy - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(13250922,0)) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetCategory(CATEGORY_DESTROY) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1) - e3:SetCost(c13250922.descost) - e3:SetTarget(c13250922.destg) - e3:SetOperation(c13250922.desop) - c:RegisterEffect(e3) -end -function c13250922.spfilter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToGraveAsCost() -end -function c13250922.spcon(e,c) - if c==nil then return true end - return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c13250922.spfilter,c:GetControler(),LOCATION_ONFIELD,0,2,nil) -end -function c13250922.spop(e,tp,eg,ep,ev,re,r,rp,c) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c13250922.spfilter,tp,LOCATION_ONFIELD,0,2,2,nil) - Duel.SendtoGrave(g,REASON_COST) -end -function c13250922.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable() -end -function c13250922.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():GetAttackAnnouncedCount()==0 end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_OATH) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e:GetHandler():RegisterEffect(e1) -end -function c13250922.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and c13250922.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c13250922.filter,tp,0,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c13250922.filter,tp,0,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c13250922.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c13293158.lua b/script/c13293158.lua deleted file mode 100644 index 29de17e059..0000000000 --- a/script/c13293158.lua +++ /dev/null @@ -1,60 +0,0 @@ ---E-HERO ワイルド・サイクロン -function c13293158.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcCode2(c,21844576,86188410,true,true) - --spsummon condition - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(c13293158.splimit) - c:RegisterEffect(e1) - --actlimit - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_ATTACK_ANNOUNCE) - e2:SetOperation(c13293158.atkop) - c:RegisterEffect(e2) - --destroy - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(13293158,0)) - e3:SetCategory(CATEGORY_DESTROY) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e3:SetCode(EVENT_BATTLE_DAMAGE) - e3:SetCondition(c13293158.condition) - e3:SetTarget(c13293158.target) - e3:SetOperation(c13293158.activate) - c:RegisterEffect(e3) -end -function c13293158.splimit(e,se,sp,st) - return st==SUMMON_TYPE_FUSION+0x10 -end -function c13293158.atkop(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EFFECT_CANNOT_ACTIVATE) - e1:SetTargetRange(0,1) - e1:SetValue(c13293158.aclimit) - e1:SetReset(RESET_PHASE+PHASE_DAMAGE) - Duel.RegisterEffect(e1,tp) -end -function c13293158.aclimit(e,re,tp) - return re:IsHasType(EFFECT_TYPE_ACTIVATE) -end -function c13293158.condition(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp -end -function c13293158.filter(c) - return c:IsFacedown() and c:IsDestructable() -end -function c13293158.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local g=Duel.GetMatchingGroup(c13293158.filter,tp,0,LOCATION_SZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c13293158.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c13293158.filter,tp,0,LOCATION_SZONE,nil) - Duel.Destroy(g,REASON_EFFECT) -end diff --git a/script/c13313278.lua b/script/c13313278.lua deleted file mode 100644 index e635d0739c..0000000000 --- a/script/c13313278.lua +++ /dev/null @@ -1,29 +0,0 @@ ---BK ベイル -function c13313278.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(13313278,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_RECOVER) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetRange(LOCATION_HAND) - e1:SetCode(EVENT_BATTLE_DAMAGE) - e1:SetCondition(c13313278.spcon) - e1:SetTarget(c13313278.sptg) - e1:SetOperation(c13313278.spop) - c:RegisterEffect(e1) -end -function c13313278.spcon(e,tp,eg,ep,ev,re,r,rp) - return ep==tp -end -function c13313278.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) - Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,ev) -end -function c13313278.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then - Duel.Recover(tp,ev,REASON_EFFECT) - end -end diff --git a/script/c13314457.lua b/script/c13314457.lua deleted file mode 100644 index 7972905fc0..0000000000 --- a/script/c13314457.lua +++ /dev/null @@ -1,32 +0,0 @@ ---深海の大ウナギ -function c13314457.initial_effect(c) - --to grave - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(13314457,0)) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCondition(c13314457.condition) - e1:SetOperation(c13314457.operation) - c:RegisterEffect(e1) -end -function c13314457.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) -end -function c13314457.filter(c) - return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_WATER) -end -function c13314457.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local g=Duel.GetMatchingGroup(c13314457.filter,tp,LOCATION_MZONE,0,nil) - local tc=g:GetFirst() - while tc do - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(500) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - tc=g:GetNext() - end -end diff --git a/script/c13316346.lua b/script/c13316346.lua deleted file mode 100644 index 596e4ac2b3..0000000000 --- a/script/c13316346.lua +++ /dev/null @@ -1,18 +0,0 @@ ---起動兵士デッドリボルバー -function c13316346.initial_effect(c) - --spsummon condition - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetCondition(c13316346.atkcon) - e1:SetValue(2000) - c:RegisterEffect(e1) -end -function c13316346.filter(c) - return c:IsFaceup() and c:IsSetCard(0x51) -end -function c13316346.atkcon(e) - return Duel.IsExistingMatchingCard(c13316346.filter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) -end diff --git a/script/c13317419.lua b/script/c13317419.lua deleted file mode 100644 index 90e958d5d0..0000000000 --- a/script/c13317419.lua +++ /dev/null @@ -1,102 +0,0 @@ ---ロケットハンド -function c13317419.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCountLimit(1,13317419) - e1:SetCondition(c13317419.condition) - e1:SetTarget(c13317419.target) - e1:SetOperation(c13317419.operation) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_DESTROY+CATEGORY_ATKCHANGE) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetRange(LOCATION_SZONE) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCountLimit(1,13317419) - e2:SetCondition(c13317419.descon) - e2:SetCost(c13317419.descost) - e2:SetTarget(c13317419.destg) - e2:SetOperation(c13317419.desop) - c:RegisterEffect(e2) -end -function c13317419.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end -function c13317419.filter(c) - return c:IsPosition(POS_FACEUP_ATTACK) and c:IsAttackAbove(800) -end -function c13317419.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c13317419.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c13317419.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c13317419.filter,tp,LOCATION_MZONE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c13317419.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsLocation(LOCATION_SZONE) then return end - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsControler(tp) then - Duel.Equip(tp,c,tc) - c:CancelToGrave() - --Atkup - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_EQUIP) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(800) - e1:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e1) - --Equip limit - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_EQUIP_LIMIT) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetValue(1) - e2:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e2) - end -end -function c13317419.descon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetEquipTarget() -end -function c13317419.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - e:SetLabelObject(e:GetHandler():GetEquipTarget()) - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end -function c13317419.desfilter(c) - return c:IsFaceup() and c:IsDestructable() -end -function c13317419.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and c13317419.desfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c13317419.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c13317419.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c13317419.desop(e,tp,eg,ep,ev,re,r,rp) - local ec=e:GetLabelObject() - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)~=0 - and ec and ec:IsFaceup() and ec:IsLocation(LOCATION_MZONE) then - Duel.BreakEffect() - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetValue(0) - e1:SetReset(RESET_EVENT+0x1fe0000) - ec:RegisterEffect(e1) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_CANNOT_CHANGE_POSITION) - e2:SetReset(RESET_EVENT+0x1fe0000) - ec:RegisterEffect(e2) - end -end diff --git a/script/c13361027.lua b/script/c13361027.lua deleted file mode 100644 index a0d1e2a762..0000000000 --- a/script/c13361027.lua +++ /dev/null @@ -1,40 +0,0 @@ ---ドラグニティ-ブラックスピア -function c13361027.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(13361027,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c13361027.cost) - e1:SetTarget(c13361027.target) - e1:SetOperation(c13361027.operation) - c:RegisterEffect(e1) -end -function c13361027.cfilter(c) - return c:IsSetCard(0x29) and c:IsRace(RACE_DRAGON) -end -function c13361027.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,c13361027.cfilter,1,nil) end - local rg=Duel.SelectReleaseGroup(tp,c13361027.cfilter,1,1,nil) - Duel.Release(rg,REASON_COST) -end -function c13361027.filter(c,e,sp) - return c:IsLevelBelow(4) and c:IsRace(RACE_WINDBEAST) and c:IsCanBeSpecialSummoned(e,0,sp,false,false) -end -function c13361027.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c13361027.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsExistingTarget(c13361027.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c13361027.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c13361027.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c13386503.lua b/script/c13386503.lua deleted file mode 100644 index d59cdc28a3..0000000000 --- a/script/c13386503.lua +++ /dev/null @@ -1,26 +0,0 @@ ---ジャッカルの霊騎士 -function c13386503.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(13386503,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetCode(EVENT_BATTLE_DESTROYING) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCondition(aux.bdogcon) - e1:SetTarget(c13386503.sptg) - e1:SetOperation(c13386503.spop) - c:RegisterEffect(e1) -end -function c13386503.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - local bc=e:GetHandler():GetBattleTarget() - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and bc:IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetTargetCard(bc) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,bc,1,0,LOCATION_GRAVE) -end -function c13386503.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENCE) - end -end \ No newline at end of file diff --git a/script/c13391185.lua b/script/c13391185.lua deleted file mode 100644 index e9102aba24..0000000000 --- a/script/c13391185.lua +++ /dev/null @@ -1,61 +0,0 @@ ---聖騎士ガラハド -function c13391185.initial_effect(c) - --Normal monster - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetCode(EFFECT_ADD_TYPE) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c13391185.eqcon1) - e1:SetValue(TYPE_NORMAL) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_REMOVE_TYPE) - e2:SetValue(TYPE_EFFECT) - c:RegisterEffect(e2) - --tohand - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(13391185,0)) - e3:SetCategory(CATEGORY_TOHAND) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1,13391185) - e3:SetCondition(c13391185.thcon) - e3:SetTarget(c13391185.thtg) - e3:SetOperation(c13391185.thop) - c:RegisterEffect(e3) -end -function c13391185.eqcon1(e) - local eg=e:GetHandler():GetEquipGroup() - return not eg or not eg:IsExists(Card.IsSetCard,1,nil,0x207a) -end -function c13391185.eqcon2(e) - local eg=e:GetHandler():GetEquipGroup() - return eg and eg:IsExists(Card.IsSetCard,1,nil,0x207a) -end -function c13391185.thcon(e,tp,eg,ep,ev,re,r,rp) - return c13391185.eqcon2(e) -end -function c13391185.thfilter(c) - return c:IsSetCard(0x107a) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() -end -function c13391185.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c13391185.thfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c13391185.thfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c13391185.thfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c13391185.desfilter(c) - return c:IsFaceup() and c:IsSetCard(0x207a) and c:IsType(TYPE_EQUIP) and c:IsDestructable() -end -function c13391185.thop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.SendtoHand(tc,nil,REASON_EFFECT)>0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local dg=Duel.SelectMatchingCard(tp,c13391185.desfilter,tp,LOCATION_SZONE,0,1,1,nil) - Duel.BreakEffect() - Duel.Destroy(dg,REASON_EFFECT) - end -end diff --git a/script/c13409151.lua b/script/c13409151.lua deleted file mode 100644 index 4fd78e9e29..0000000000 --- a/script/c13409151.lua +++ /dev/null @@ -1,28 +0,0 @@ ---砂バク -function c13409151.initial_effect(c) - --flip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(13409151,0)) - e1:SetCategory(CATEGORY_POSITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP) - e1:SetTarget(c13409151.postg) - e1:SetOperation(c13409151.posop) - c:RegisterEffect(e1) -end -function c13409151.filter(c) - return c:IsFaceup() and c:GetCode()~=13409151 and c:IsCanTurnSet() -end -function c13409151.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c13409151.filter(chkc) end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - local g=Duel.SelectTarget(tp,c13409151.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_POSITION,g,g:GetCount(),0,0) -end -function c13409151.posop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.ChangePosition(tc,POS_FACEDOWN_DEFENCE) - end -end diff --git a/script/c13438207.lua b/script/c13438207.lua deleted file mode 100644 index 846ec8fab2..0000000000 --- a/script/c13438207.lua +++ /dev/null @@ -1,31 +0,0 @@ ---ブロッサム・ボンバー -function c13438207.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_BATTLE_DESTROYING) - e1:SetCondition(c13438207.condition) - e1:SetTarget(c13438207.target) - e1:SetOperation(c13438207.activate) - c:RegisterEffect(e1) -end -function c13438207.condition(e,tp,eg,ep,ev,re,r,rp) - local tc=eg:GetFirst() - local bc=tc:GetBattleTarget() - return tc:IsRelateToBattle() and tc:IsStatus(STATUS_OPPO_BATTLE) and tc:IsControler(tp) and tc:IsRace(RACE_PLANT) - and bc:IsLocation(LOCATION_GRAVE) and bc:IsReason(REASON_BATTLE) -end -function c13438207.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - local atk=eg:GetFirst():GetBattleTarget():GetAttack() - if atk<0 then atk=0 end - Duel.SetTargetParam(atk) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,atk) -end -function c13438207.activate(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c13455953.lua b/script/c13455953.lua deleted file mode 100644 index 9d81ad7042..0000000000 --- a/script/c13455953.lua +++ /dev/null @@ -1,52 +0,0 @@ ---極星霊ドヴェルグ -function c13455953.initial_effect(c) - --extra summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetOperation(c13455953.sumop) - c:RegisterEffect(e1) - --salvage - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(13455953,0)) - e2:SetCategory(CATEGORY_TOHAND) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetCondition(c13455953.thcon) - e2:SetTarget(c13455953.thtg) - e2:SetOperation(c13455953.thop) - c:RegisterEffect(e2) -end -function c13455953.sumop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetFlagEffect(tp,13455953)~=0 then return end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetTargetRange(LOCATION_HAND+LOCATION_MZONE,0) - e1:SetCode(EFFECT_EXTRA_SUMMON_COUNT) - e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x42)) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) - Duel.RegisterFlagEffect(tp,13455953,RESET_PHASE+PHASE_END,0,1) -end -function c13455953.thcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousPosition(POS_FACEUP) -end -function c13455953.filter(c) - return c:IsSetCard(0x5042) and c:IsAbleToHand() -end -function c13455953.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c13455953.filter(chkc) end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c13455953.filter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0) -end -function c13455953.thop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end diff --git a/script/c13474291.lua b/script/c13474291.lua deleted file mode 100644 index b56f34f6c6..0000000000 --- a/script/c13474291.lua +++ /dev/null @@ -1,66 +0,0 @@ ---雲魔物-ストーム・ドラゴン -function c13474291.initial_effect(c) - c:EnableReviveLimit() - --battle indestructable - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e1:SetValue(1) - c:RegisterEffect(e1) - --selfdes - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EFFECT_SELF_DESTROY) - e2:SetCondition(c13474291.sdcon) - c:RegisterEffect(e2) - --spsummon proc - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetCode(EFFECT_SPSUMMON_PROC) - e3:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e3:SetRange(LOCATION_HAND) - e3:SetCondition(c13474291.spcon) - e3:SetOperation(c13474291.spop) - c:RegisterEffect(e3) - --counter - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(13474291,0)) - e4:SetType(EFFECT_TYPE_IGNITION) - e4:SetProperty(EFFECT_FLAG_CARD_TARGET) - e4:SetRange(LOCATION_MZONE) - e4:SetCountLimit(1) - e4:SetTarget(c13474291.cttg) - e4:SetOperation(c13474291.ctop) - c:RegisterEffect(e4) -end -function c13474291.sdcon(e) - return e:GetHandler():IsPosition(POS_FACEUP_DEFENCE) -end -function c13474291.cfilter(c) - return c:IsSetCard(0x18) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost() -end -function c13474291.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c13474291.cfilter,tp,LOCATION_GRAVE,0,1,nil) -end -function c13474291.spop(e,tp,eg,ep,ev,re,r,rp,c) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c13474291.cfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c13474291.cttg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) -end -function c13474291.ctop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - tc:AddCounter(0x19,1) - end -end diff --git a/script/c13478040.lua b/script/c13478040.lua deleted file mode 100644 index 80ae63ffaa..0000000000 --- a/script/c13478040.lua +++ /dev/null @@ -1,46 +0,0 @@ ---ドングリス -function c13478040.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetOperation(c13478040.ctop) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(13478040,0)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCost(c13478040.descost) - e2:SetTarget(c13478040.destg) - e2:SetOperation(c13478040.desop) - c:RegisterEffect(e2) -end -function c13478040.cfilter(c,tp) - return c:GetSummonPlayer()==tp -end -function c13478040.ctop(e,tp,eg,ep,ev,re,r,rp) - if eg:IsExists(c13478040.cfilter,1,nil,1-tp) then - e:GetHandler():AddCounter(0x17,1) - end -end -function c13478040.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsCanRemoveCounter(tp,0x17,1,REASON_COST) end - e:GetHandler():RemoveCounter(tp,0x17,1,REASON_COST) -end -function c13478040.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsDestructable() end - if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c13478040.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/script/c1347977.lua b/script/c1347977.lua deleted file mode 100644 index 99277839d4..0000000000 --- a/script/c1347977.lua +++ /dev/null @@ -1,47 +0,0 @@ ---聖なる守り手 -function c1347977.initial_effect(c) - --todeck - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(1347977,0)) - e1:SetCategory(CATEGORY_TODECK) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c1347977.target) - e1:SetOperation(c1347977.activate) - c:RegisterEffect(e1) -end -function c1347977.filter1(c) - return c:IsFaceup() and c:IsType(TYPE_MONSTER) and c:IsAbleToDeck() -end -function c1347977.filter2(c) - return c:IsFaceup() and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() -end -function c1347977.filter3(c) - return c:IsFaceup() and c:IsRace(RACE_WARRIOR) -end -function c1347977.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g1=Duel.SelectTarget(tp,c1347977.filter1,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - if g1:GetCount()==0 then return end - Duel.SetOperationInfo(0,CATEGORY_TODECK,g1,1,0,0) - if Duel.IsExistingMatchingCard(c1347977.filter3,tp,LOCATION_MZONE,0,1,nil) - and Duel.IsExistingTarget(c1347977.filter2,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,g1:GetFirst()) - and Duel.SelectYesNo(tp,aux.Stringid(1347977,1)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g2=Duel.SelectTarget(tp,c1347977.filter2,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,g1:GetFirst()) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g2,1,0,0) - end -end -function c1347977.activate(e,tp,eg,ep,ev,re,r,rp) - local ex,g1=Duel.GetOperationInfo(0,CATEGORY_TODECK) - local ex,g2=Duel.GetOperationInfo(0,CATEGORY_TOHAND) - local tc1=g1:GetFirst() - if tc1 and tc1:IsRelateToEffect(e) then - Duel.SendtoDeck(g1,nil,0,REASON_EFFECT) - end - if g2 and g2:GetFirst():IsRelateToEffect(e) then - Duel.SendtoHand(g2,nil,REASON_EFFECT) - end -end diff --git a/script/c13492423.lua b/script/c13492423.lua deleted file mode 100644 index 74f8f2ae82..0000000000 --- a/script/c13492423.lua +++ /dev/null @@ -1,31 +0,0 @@ ---フォトン・カイザー -function c13492423.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(13492423,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c13492423.sptg) - e1:SetOperation(c13492423.spop) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - c:RegisterEffect(e2) -end -function c13492423.filter(c,e,tp) - return c:IsCode(13492423) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c13492423.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c13492423.filter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_HAND) -end -function c13492423.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c13492423.filter,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c13504844.lua b/script/c13504844.lua deleted file mode 100644 index f2305757d9..0000000000 --- a/script/c13504844.lua +++ /dev/null @@ -1,38 +0,0 @@ ---ガトムズの緊急指令 -function c13504844.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_END_PHASE) - e1:SetCondition(c13504844.condition) - e1:SetTarget(c13504844.target) - e1:SetOperation(c13504844.activate) - c:RegisterEffect(e1) -end -function c13504844.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x100d) -end -function c13504844.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c13504844.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) -end -function c13504844.filter(c,e,tp) - return c:IsSetCard(0x100d) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c13504844.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:GetControler()==tp and chkc:GetLocation()==LOCATION_GRAVE and c13504844.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>1 - and Duel.IsExistingTarget(c13504844.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,2,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c13504844.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,2,2,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,2,0,0) -end -function c13504844.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 then return end - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local sg=g:Filter(Card.IsRelateToEffect,nil,e) - if sg:GetCount()~=2 then return end - Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) -end diff --git a/script/c13513663.lua b/script/c13513663.lua deleted file mode 100644 index bab61f1786..0000000000 --- a/script/c13513663.lua +++ /dev/null @@ -1,110 +0,0 @@ ---竜魂の城 -function c13513663.initial_effect(c) - c:SetUniqueOnField(1,0,13513663) - --activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetTarget(c13513663.target1) - e1:SetOperation(c13513663.operation) - c:RegisterEffect(e1) - --atkup - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(13513663,0)) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetRange(LOCATION_SZONE) - e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_CARD_TARGET) - e2:SetHintTiming(TIMING_DAMAGE_STEP) - e2:SetCost(c13513663.cost2) - e2:SetTarget(c13513663.target2) - e2:SetOperation(c13513663.operation) - c:RegisterEffect(e2) - --spsummon - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(13513663,1)) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_TO_GRAVE) - e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_CARD_TARGET) - e3:SetCondition(c13513663.spcon) - e3:SetTarget(c13513663.sptg) - e3:SetOperation(c13513663.spop) - c:RegisterEffect(e3) -end -function c13513663.cfilter(c) - return c:IsRace(RACE_DRAGON) and c:IsAbleToRemoveAsCost() -end -function c13513663.target1(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end - if chk==0 then - if Duel.GetCurrentPhase()==PHASE_DAMAGE then - return Duel.IsExistingMatchingCard(c13513663.cfilter,tp,LOCATION_GRAVE,0,1,nil) - and Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) - end - return true - end - if Duel.GetCurrentPhase()==PHASE_DAMAGE or ( - e:GetHandler():GetFlagEffect(13513663)==0 - and Duel.IsExistingMatchingCard(c13513663.cfilter,tp,LOCATION_GRAVE,0,1,nil) - and Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) - and Duel.SelectYesNo(tp,aux.Stringid(13513663,2))) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local rg=Duel.SelectMatchingCard(tp,c13513663.cfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.Remove(rg,POS_FACEUP,REASON_COST) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,nil) - e:GetHandler():RegisterFlagEffect(13513663,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) - e:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_CARD_TARGET) - else - e:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - end -end -function c13513663.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end - if chk==0 then return e:GetHandler():GetFlagEffect(13513663)==0 - and Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,nil) -end -function c13513663.cost2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c13513663.cfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local rg=Duel.SelectMatchingCard(tp,c13513663.cfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.Remove(rg,POS_FACEUP,REASON_COST) - e:GetHandler():RegisterFlagEffect(13513663,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) -end -function c13513663.operation(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) and tc:IsFaceup() then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(700) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - end -end -function c13513663.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) and e:GetHandler():IsPreviousPosition(POS_FACEUP) -end -function c13513663.spfilter(c,e,tp) - return c:IsFaceup() and c:IsRace(RACE_DRAGON) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c13513663.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_REMOVED) and c13513663.spfilter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c13513663.spfilter,tp,LOCATION_REMOVED,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c13513663.spfilter,tp,LOCATION_REMOVED,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c13513663.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c13521194.lua b/script/c13521194.lua deleted file mode 100644 index f0a116868d..0000000000 --- a/script/c13521194.lua +++ /dev/null @@ -1,59 +0,0 @@ ---ヘルウェイ・パトロール -function c13521194.initial_effect(c) - --damage - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(13521194,0)) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetCode(EVENT_BATTLE_DESTROYING) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCondition(aux.bdgcon) - e1:SetTarget(c13521194.damtarget) - e1:SetOperation(c13521194.damoperation) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetDescription(aux.Stringid(13521194,1)) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_GRAVE) - e2:SetCost(c13521194.spcost) - e2:SetTarget(c13521194.sptarget) - e2:SetOperation(c13521194.spoperation) - c:RegisterEffect(e2) -end -function c13521194.damtarget(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local a=Duel.GetAttacker() - local d=Duel.GetAttackTarget() - local m=0 - if a==e:GetHandler() then m=d:GetLevel()*100 - else m=a:GetLevel()*100 end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(m) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,m) -end -function c13521194.damoperation(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end -function c13521194.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) -end -function c13521194.filter(c,e,tp) - local atk=c:GetAttack() - return atk>=0 and atk<=2000 and c:IsRace(RACE_FIEND) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c13521194.sptarget(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c13521194.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c13521194.spoperation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c13521194.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c13522325.lua b/script/c13522325.lua deleted file mode 100644 index 42569ae4e4..0000000000 --- a/script/c13522325.lua +++ /dev/null @@ -1,41 +0,0 @@ ---炎の精霊 イフリート -function c13522325.initial_effect(c) - c:EnableReviveLimit() - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c13522325.spcon) - e1:SetOperation(c13522325.spop) - c:RegisterEffect(e1) - --atk - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetCondition(c13522325.atkcon) - e2:SetValue(300) - c:RegisterEffect(e2) -end -function c13522325.atkcon(e) - local ph=Duel.GetCurrentPhase() - local tp=Duel.GetTurnPlayer() - return tp==e:GetHandler():GetControler() and (ph==PHASE_BATTLE or ph==PHASE_DAMAGE or ph==PHASE_DAMAGE_CAL) -end -function c13522325.spfilter(c) - return c:IsAttribute(ATTRIBUTE_FIRE) and c:IsAbleToRemoveAsCost() -end -function c13522325.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c13522325.spfilter,tp,LOCATION_GRAVE,0,1,nil) -end -function c13522325.spop(e,tp,eg,ep,ev,re,r,rp,c) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c13522325.spfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end diff --git a/script/c13532663.lua b/script/c13532663.lua deleted file mode 100644 index d6836aacdb..0000000000 --- a/script/c13532663.lua +++ /dev/null @@ -1,25 +0,0 @@ ---ダミー・ゴーレム -function c13532663.initial_effect(c) - --flip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(13532663,0)) - e1:SetCategory(CATEGORY_CONTROL) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP) - e1:SetTarget(c13532663.target) - e1:SetOperation(c13532663.operation) - c:RegisterEffect(e1) -end -function c13532663.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_CONTROL,nil,0,0,0) -end -function c13532663.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsStatus(STATUS_BATTLE_DESTROYED) or not c:IsRelateToEffect(e) or not c:IsAbleToChangeControler() - or not Duel.IsExistingMatchingCard(Card.IsAbleToChangeControler,tp,0,LOCATION_MZONE,1,nil) then - return - end - Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_CONTROL) - local g=Duel.SelectMatchingCard(1-tp,Card.IsAbleToChangeControler,1-tp,LOCATION_MZONE,0,1,1,nil) - Duel.SwapControl(c,g:GetFirst(),0,0) -end diff --git a/script/c1353770.lua b/script/c1353770.lua deleted file mode 100644 index c26768d367..0000000000 --- a/script/c1353770.lua +++ /dev/null @@ -1,40 +0,0 @@ ---神の居城-ヴァルハラ -function c1353770.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(1353770,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_SZONE) - e1:SetCondition(c1353770.condition) - e1:SetTarget(c1353770.target) - e1:SetOperation(c1353770.operation) - c:RegisterEffect(e1) -end -function c1353770.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 -end -function c1353770.filter(c,e,sp) - return c:IsRace(RACE_FAIRY) and c:IsCanBeSpecialSummoned(e,0,sp,false,false) -end -function c1353770.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c1353770.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c1353770.operation(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - if Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)>0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c1353770.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c135598.lua b/script/c135598.lua deleted file mode 100644 index 2166e67a4d..0000000000 --- a/script/c135598.lua +++ /dev/null @@ -1,31 +0,0 @@ ---キーマウス -function c135598.initial_effect(c) - --search - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(135598,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetCondition(c135598.condition) - e1:SetTarget(c135598.target) - e1:SetOperation(c135598.operation) - c:RegisterEffect(e1) -end -function c135598.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) -end -function c135598.filter(c) - return c:IsLevelBelow(3) and c:IsRace(RACE_BEAST) and c:IsAbleToHand() -end -function c135598.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c135598.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c135598.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c135598.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c1357146.lua b/script/c1357146.lua deleted file mode 100644 index b0eb68a94a..0000000000 --- a/script/c1357146.lua +++ /dev/null @@ -1,48 +0,0 @@ ---粋カエル -function c1357146.initial_effect(c) - --change code - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_CHANGE_CODE) - e1:SetValue(84451804) - c:RegisterEffect(e1) - --draw - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(1357146,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_GRAVE) - e2:SetCost(c1357146.cost) - e2:SetTarget(c1357146.target) - e2:SetOperation(c1357146.operation) - c:RegisterEffect(e2) - --synchro limit - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e3:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL) - e3:SetValue(1) - c:RegisterEffect(e3) -end -function c1357146.costfilter(c) - return c:IsSetCard(0x12) and c:IsAbleToRemoveAsCost() -end -function c1357146.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c1357146.costfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c1357146.costfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c1357146.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c1357146.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c13574687.lua b/script/c13574687.lua deleted file mode 100644 index a26d76a542..0000000000 --- a/script/c13574687.lua +++ /dev/null @@ -1,38 +0,0 @@ ---ワンショット・キャノン -function c13574687.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure2(c,aux.FilterBoolFunction(Card.IsCode,6142213),aux.NonTuner(nil)) - c:EnableReviveLimit() - --destroy & damage - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(13574687,0)) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetTarget(c13574687.target) - e1:SetOperation(c13574687.operation) - c:RegisterEffect(e1) -end -function c13574687.filter(c) - return c:IsFaceup() and c:IsDestructable() -end -function c13574687.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c13574687.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c13574687.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c13574687.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,g:GetFirst():GetControler(),g:GetFirst():GetAttack()/2) -end -function c13574687.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) then - local dam=tc:GetAttack()/2 - local p=tc:GetControler() - if Duel.Destroy(tc,REASON_EFFECT)~=0 then - Duel.Damage(p,dam,REASON_EFFECT) - end - end -end diff --git a/script/c13582837.lua b/script/c13582837.lua deleted file mode 100644 index 85c4d6ea99..0000000000 --- a/script/c13582837.lua +++ /dev/null @@ -1,37 +0,0 @@ ---インフェルニティ・リローダー -function c13582837.initial_effect(c) - --draw - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(13582837,0)) - e1:SetCategory(CATEGORY_DRAW+CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c13582837.spcon) - e1:SetTarget(c13582837.sptg) - e1:SetOperation(c13582837.spop) - c:RegisterEffect(e1) -end -function c13582837.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)==0 -end -function c13582837.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,1,tp,1) -end -function c13582837.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)~=0 then return end - local g=Duel.GetDecktopGroup(tp,1) - local tc=g:GetFirst() - Duel.Draw(tp,1,REASON_EFFECT) - if tc then - Duel.ConfirmCards(1-tp,tc) - Duel.BreakEffect() - if tc:IsType(TYPE_MONSTER) then - Duel.Damage(1-tp,tc:GetLevel()*200,REASON_EFFECT) - else - Duel.Damage(tp,500,REASON_EFFECT) - end - Duel.ShuffleHand(tp) - end -end diff --git a/script/c13599884.lua b/script/c13599884.lua deleted file mode 100644 index 6e184c2e8a..0000000000 --- a/script/c13599884.lua +++ /dev/null @@ -1,44 +0,0 @@ ---鉄のサソリ -function c13599884.initial_effect(c) - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(13599884,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_DAMAGE_STEP_END) - e1:SetCondition(c13599884.condition) - e1:SetOperation(c13599884.operation) - c:RegisterEffect(e1) -end -function c13599884.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler()==Duel.GetAttackTarget() and not Duel.GetAttacker():IsRace(RACE_MACHINE) -end -function c13599884.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetAttacker() - if tc:IsRelateToBattle() then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_MZONE) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetCondition(c13599884.descon) - e1:SetOperation(c13599884.desop) - e1:SetLabel(0) - e1:SetOwnerPlayer(tp) - tc:RegisterEffect(e1) - end -end -function c13599884.descon(e,tp,eg,ep,ev,re,r,rp) - return e:GetOwnerPlayer()~=Duel.GetTurnPlayer() -end -function c13599884.desop(e,tp,eg,ep,ev,re,r,rp) - local ct=e:GetLabel() - ct=ct+1 - e:SetLabel(ct) - e:GetOwner():SetTurnCounter(ct) - if ct==3 then - Duel.Destroy(e:GetHandler(),REASON_EFFECT) - end -end diff --git a/script/c13604200.lua b/script/c13604200.lua deleted file mode 100644 index 27f47fc6a9..0000000000 --- a/script/c13604200.lua +++ /dev/null @@ -1,34 +0,0 @@ ---賢者の宝石 -function c13604200.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c13604200.condition) - e1:SetTarget(c13604200.target) - e1:SetOperation(c13604200.activate) - c:RegisterEffect(e1) -end -function c13604200.cfilter(c) - return c:IsFaceup() and c:IsCode(38033121) -end -function c13604200.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c13604200.cfilter,tp,LOCATION_ONFIELD,0,1,nil) -end -function c13604200.filter(c,e,tp) - return c:IsCode(46986414) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c13604200.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c13604200.filter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_HAND) -end -function c13604200.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c13604200.filter,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c1362589.lua b/script/c1362589.lua deleted file mode 100644 index 9228ea6176..0000000000 --- a/script/c1362589.lua +++ /dev/null @@ -1,19 +0,0 @@ ---フォトン・クラッシャー -function c1362589.initial_effect(c) - --to defence - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_DAMAGE_STEP_END) - e1:SetCondition(c1362589.poscon) - e1:SetOperation(c1362589.posop) - c:RegisterEffect(e1) -end -function c1362589.poscon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler()==Duel.GetAttacker() and e:GetHandler():IsRelateToBattle() -end -function c1362589.posop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsAttackPos() then - Duel.ChangePosition(c,POS_FACEUP_DEFENCE) - end -end diff --git a/script/c13626450.lua b/script/c13626450.lua deleted file mode 100644 index 98fd5410e9..0000000000 --- a/script/c13626450.lua +++ /dev/null @@ -1,28 +0,0 @@ ---邪気退散 -function c13626450.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c13626450.cost) - e1:SetTarget(c13626450.target) - e1:SetOperation(c13626450.activate) - c:RegisterEffect(e1) -end -function c13626450.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) -end -function c13626450.filter(c) - return c:IsFaceup() and c:GetType()==TYPE_TRAP+TYPE_CONTINUOUS and c:IsDestructable() -end -function c13626450.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c13626450.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end - local g=Duel.GetMatchingGroup(c13626450.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c13626450.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c13626450.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) - Duel.Destroy(g,REASON_EFFECT) -end diff --git a/script/c13629812.lua b/script/c13629812.lua deleted file mode 100644 index 6dbe9346a7..0000000000 --- a/script/c13629812.lua +++ /dev/null @@ -1,78 +0,0 @@ ---忍法 影縫いの術 -function c13629812.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_REMOVE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,0x1c0) - e1:SetCost(c13629812.cost) - e1:SetTarget(c13629812.target) - e1:SetOperation(c13629812.operation) - c:RegisterEffect(e1) - --return - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(13629812,0)) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_LEAVE_FIELD) - e2:SetCondition(c13629812.retcon) - e2:SetOperation(c13629812.retop) - c:RegisterEffect(e2) -end -function c13629812.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsSetCard,1,nil,0x2b) end - local g=Duel.SelectReleaseGroup(tp,Card.IsSetCard,1,1,nil,0x2b) - Duel.Release(g,REASON_COST) -end -function c13629812.filter(c) - return c:IsAbleToRemove() -end -function c13629812.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c13629812.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c13629812.filter,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,c13629812.filter,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) -end -function c13629812.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) then return end - local tc=Duel.GetFirstTarget() - local seq=tc:GetSequence() - if tc:IsControler(1-tp) then seq=seq+16 end - if tc:IsRelateToEffect(e) and Duel.Remove(tc,0,REASON_EFFECT+REASON_TEMPORARY)~=0 then - c:SetCardTarget(tc) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_DISABLE_FIELD) - e1:SetRange(LOCATION_SZONE) - e1:SetLabel(seq) - e1:SetCondition(c13629812.discon) - e1:SetOperation(c13629812.disop) - e1:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e1) - end -end -function c13629812.discon(e) - return e:GetHandler():GetCardTargetCount()>0 -end -function c13629812.disop(e,tp) - return bit.lshift(0x1,e:GetLabel()) -end -function c13629812.retcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=c:GetFirstCardTarget() - if tc and tc:IsLocation(LOCATION_REMOVED) and tc:IsFaceup() and not c:IsLocation(LOCATION_DECK) then - e:SetLabelObject(tc) - tc:CreateEffectRelation(e) - return true - else return false end -end -function c13629812.retop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=e:GetLabelObject() - if tc:IsRelateToEffect(e) then - Duel.ReturnToField(tc) - end -end diff --git a/script/c13647631.lua b/script/c13647631.lua deleted file mode 100644 index 5de330c5a8..0000000000 --- a/script/c13647631.lua +++ /dev/null @@ -1,78 +0,0 @@ ---重機貨列車デリックレーン -function c13647631.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(13647631,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetRange(LOCATION_HAND) - e1:SetProperty(EFFECT_FLAG_DELAY) - e1:SetCountLimit(1,13647631) - e1:SetCondition(c13647631.spcon) - e1:SetTarget(c13647631.sptg) - e1:SetOperation(c13647631.spop) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e2) - --destroy - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(13647631,1)) - e3:SetCategory(CATEGORY_DESTROY) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_TO_GRAVE) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e3:SetCondition(c13647631.descon) - e3:SetTarget(c13647631.destg) - e3:SetOperation(c13647631.desop) - c:RegisterEffect(e3) -end -function c13647631.spfilter(c,tp) - return c:IsFaceup() and c:IsControler(tp) and c:IsRace(RACE_MACHINE) and c:IsAttribute(ATTRIBUTE_EARTH) -end -function c13647631.spcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c13647631.spfilter,1,nil,tp) -end -function c13647631.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c13647631.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.SpecialSummonStep(c,0,tp,tp,false,false,POS_FACEUP) then - local atk=c:GetBaseAttack() - local def=c:GetBaseDefence() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_BASE_ATTACK) - e1:SetValue(atk/2) - e1:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_SET_BASE_DEFENCE) - e2:SetValue(def/2) - c:RegisterEffect(e2) - Duel.SpecialSummonComplete() - end -end -function c13647631.descon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsReason(REASON_COST) and re:IsHasType(0x7e0) and re:IsActiveType(TYPE_MONSTER) - and c:IsPreviousLocation(LOCATION_OVERLAY) -end -function c13647631.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() and chkc:IsDestructable() end - if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,0,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,0,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c13647631.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c13683298.lua b/script/c13683298.lua deleted file mode 100644 index 36009b7f13..0000000000 --- a/script/c13683298.lua +++ /dev/null @@ -1,39 +0,0 @@ ---大狼雷鳴 -function c13683298.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(c13683298.condition) - e1:SetCost(c13683298.cost) - e1:SetTarget(c13683298.target) - e1:SetOperation(c13683298.operation) - c:RegisterEffect(e1) -end -function c13683298.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_GRAVE) -end -function c13683298.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_BATTLE_PHASE)==0 end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_BP) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) - e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function c13683298.filter(c) - return c:IsFaceup() and c:IsDestructable() -end -function c13683298.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c13683298.filter,tp,0,LOCATION_MZONE,1,nil) end - local g=Duel.GetMatchingGroup(c13683298.filter,tp,0,LOCATION_MZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c13683298.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c13683298.filter,tp,0,LOCATION_MZONE,nil) - Duel.Destroy(g,REASON_EFFECT) -end diff --git a/script/c13685271.lua b/script/c13685271.lua deleted file mode 100644 index f2bc442bf4..0000000000 --- a/script/c13685271.lua +++ /dev/null @@ -1,58 +0,0 @@ ---同姓同名同盟条約 -function c13685271.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,0x11e0) - e1:SetCondition(c13685271.condition) - e1:SetTarget(c13685271.target) - e1:SetOperation(c13685271.activate) - c:RegisterEffect(e1) -end -function c13685271.cfilter(c) - return c:IsFaceup() and not c:IsType(TYPE_TOKEN) -end -function c13685271.get_count(g) - if g:GetCount()==0 then return 0 end - local ret=0 - repeat - local tc=g:GetFirst() - g:RemoveCard(tc) - local ct1=g:GetCount() - g:Remove(Card.IsCode,nil,tc:GetCode()) - local ct2=g:GetCount() - local c=ct1-ct2+1 - if c>ret then ret=c end - until g:GetCount()==0 or g:GetCount()<=ret - return ret -end -function c13685271.condition(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c13685271.cfilter,tp,LOCATION_MZONE,0,nil) - local ct=c13685271.get_count(g) - e:SetLabel(ct) - return ct==2 or ct==3 -end -function c13685271.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable() -end -function c13685271.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c13685271.filter,tp,0,LOCATION_ONFIELD,1,nil) end - local g=Duel.GetMatchingGroup(c13685271.filter,tp,0,LOCATION_ONFIELD,nil) - if e:GetLabel()==2 then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) - else Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) end -end -function c13685271.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c13685271.cfilter,tp,LOCATION_MZONE,0,nil) - local ct=c13685271.get_count(g) - if ct==2 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectMatchingCard(tp,c13685271.filter,tp,0,LOCATION_ONFIELD,1,1,nil) - Duel.Destroy(g,REASON_EFFECT) - elseif ct==3 then - local g=Duel.GetMatchingGroup(c13685271.filter,tp,0,LOCATION_ONFIELD,nil) - Duel.Destroy(g,REASON_EFFECT) - end -end diff --git a/script/c13708425.lua b/script/c13708425.lua deleted file mode 100644 index e72dc147b8..0000000000 --- a/script/c13708425.lua +++ /dev/null @@ -1,23 +0,0 @@ ---フレア・リゾネーター -function c13708425.initial_effect(c) - --atkup - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_BE_MATERIAL) - e1:SetCondition(c13708425.atkcon) - e1:SetOperation(c13708425.atkop) - c:RegisterEffect(e1) -end -function c13708425.atkcon(e,tp,eg,ep,ev,re,r,rp) - return r==REASON_SYNCHRO -end -function c13708425.atkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local sync=c:GetReasonCard() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(300) - e1:SetReset(RESET_EVENT+0x1fe0000) - sync:RegisterEffect(e1) -end diff --git a/script/c1371589.lua b/script/c1371589.lua deleted file mode 100644 index 2c13f5ed70..0000000000 --- a/script/c1371589.lua +++ /dev/null @@ -1,27 +0,0 @@ ---吸血コアラ -function c1371589.initial_effect(c) - --recover - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(1371589,0)) - e1:SetCategory(CATEGORY_RECOVER) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_BATTLE_DAMAGE) - e1:SetCondition(c1371589.condition) - e1:SetTarget(c1371589.target) - e1:SetOperation(c1371589.operation) - c:RegisterEffect(e1) -end -function c1371589.condition(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp and Duel.GetAttackTarget()~=nil -end -function c1371589.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(ev) - Duel.SetOperationInfo(0,CATEGORY_RECOVER,0,0,tp,ev) -end -function c1371589.operation(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Recover(p,d,REASON_EFFECT) -end diff --git a/script/c13722870.lua b/script/c13722870.lua deleted file mode 100644 index 8f32526675..0000000000 --- a/script/c13722870.lua +++ /dev/null @@ -1,40 +0,0 @@ ---黒炎の騎士-ブラック・フレア・ナイト- -function c13722870.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcCode2(c,46986414,45231177,true,true) - --Special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(13722870,0)) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetCondition(c13722870.spcon) - e1:SetTarget(c13722870.sptg) - e1:SetOperation(c13722870.spop) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_AVOID_BATTLE_DAMAGE) - e2:SetValue(1) - c:RegisterEffect(e2) -end -function c13722870.spfilter(c,e,tp) - return c:IsCode(49217579) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) -end -function c13722870.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) -end -function c13722870.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) -end -function c13722870.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c13722870.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP) - g:GetFirst():CompleteProcedure() - end -end diff --git a/script/c1372887.lua b/script/c1372887.lua deleted file mode 100644 index 0c6ff966f8..0000000000 --- a/script/c1372887.lua +++ /dev/null @@ -1,61 +0,0 @@ ---相乗り -function c1372887.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,1372887+EFFECT_COUNT_CODE_OATH) - e1:SetOperation(c1372887.activate) - c:RegisterEffect(e1) -end -function c1372887.activate(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_DELAY) - e1:SetCode(EVENT_TO_HAND) - e1:SetCondition(c1372887.drcon1) - e1:SetOperation(c1372887.drop1) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e2:SetCode(EVENT_TO_HAND) - e2:SetCondition(c1372887.regcon) - e2:SetOperation(c1372887.regop) - e2:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e2,tp) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e3:SetCode(EVENT_CHAIN_SOLVED) - e3:SetCondition(c1372887.drcon2) - e3:SetOperation(c1372887.drop2) - e3:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e3,tp) -end -function c1372887.cfilter(c,tp) - return c:IsControler(1-tp) and not c:IsReason(REASON_DRAW) and c:IsPreviousLocation(LOCATION_DECK+LOCATION_GRAVE) -end -function c1372887.drcon1(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c1372887.cfilter,1,nil,tp) - and (not re:IsHasType(EFFECT_TYPE_ACTIONS) or re:IsHasType(EFFECT_TYPE_CONTINUOUS)) -end -function c1372887.drop1(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_CARD,0,1372887) - Duel.Draw(tp,1,REASON_EFFECT) -end -function c1372887.regcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c1372887.cfilter,1,nil,tp) and Duel.GetFlagEffect(tp,1372887)==0 - and re:IsHasType(EFFECT_TYPE_ACTIONS) and not re:IsHasType(EFFECT_TYPE_CONTINUOUS) -end -function c1372887.regop(e,tp,eg,ep,ev,re,r,rp) - Duel.RegisterFlagEffect(tp,1372887,RESET_CHAIN,0,1) -end -function c1372887.drcon2(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetFlagEffect(tp,1372887)>0 -end -function c1372887.drop2(e,tp,eg,ep,ev,re,r,rp) - Duel.ResetFlagEffect(tp,1372887) - Duel.Hint(HINT_CARD,0,1372887) - Duel.Draw(tp,1,REASON_EFFECT) -end diff --git a/script/c13756293.lua b/script/c13756293.lua deleted file mode 100644 index 9a241b882e..0000000000 --- a/script/c13756293.lua +++ /dev/null @@ -1,44 +0,0 @@ ---竜魔人 キングドラグーン -function c13756293.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcCode2(c,17985575,62113340,true,true) - --cannot be target - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_SELECT_EFFECT_TARGET) - e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(0,0xff) - e1:SetValue(c13756293.etarget) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(13756293,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetCountLimit(1) - e2:SetRange(LOCATION_MZONE) - e2:SetTarget(c13756293.sptg) - e2:SetOperation(c13756293.spop) - c:RegisterEffect(e2) -end -function c13756293.etarget(e,re,c) - return c:IsLocation(LOCATION_MZONE) and c:IsFaceup() and c:IsRace(RACE_DRAGON) -end -function c13756293.filter(c,e,tp) - return c:IsRace(RACE_DRAGON) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c13756293.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c13756293.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c13756293.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c13756293.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c13760677.lua b/script/c13760677.lua deleted file mode 100644 index f12c449e54..0000000000 --- a/script/c13760677.lua +++ /dev/null @@ -1,81 +0,0 @@ ---P・M・キャプチャー -function c13760677.initial_effect(c) - --pendulum summon - aux.AddPendulumProcedure(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --indes - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(13760677,0)) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetRange(LOCATION_PZONE) - e2:SetCondition(c13760677.indcon) - e2:SetTarget(c13760677.indtg) - e2:SetOperation(c13760677.indop) - c:RegisterEffect(e2) - --tohand - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(13760677,1)) - e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetCode(EVENT_BATTLE_DESTROYING) - e3:SetCondition(c13760677.thcon) - e3:SetTarget(c13760677.thtg) - e3:SetOperation(c13760677.thop) - c:RegisterEffect(e3) -end -function c13760677.cfilter(c,e,tp) - return c:IsRace(RACE_ZOMBIE) and c:GetSummonPlayer()==tp and c:GetSummonType()==SUMMON_TYPE_PENDULUM - and (not e or c:IsRelateToEffect(e)) -end -function c13760677.indcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c13760677.cfilter,1,nil,nil,tp) -end -function c13760677.indtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetCard(eg) -end -function c13760677.indop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) then return end - local g=eg:Filter(c13760677.cfilter,nil,e,tp) - local tc=g:GetFirst() - while tc do - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e1:SetValue(1) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - tc:RegisterEffect(e2) - tc=g:GetNext() - end -end -function c13760677.thcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsRelateToBattle() and c:GetBattleTarget():IsType(TYPE_MONSTER) -end -function c13760677.filter(c) - return c:IsType(TYPE_PENDULUM) and c:IsAbleToHand() -end -function c13760677.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c13760677.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c13760677.filter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c13760677.filter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c13760677.thop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end diff --git a/script/c13761956.lua b/script/c13761956.lua deleted file mode 100644 index 756d281e29..0000000000 --- a/script/c13761956.lua +++ /dev/null @@ -1,38 +0,0 @@ ---フレムベル・ベビー -function c13761956.initial_effect(c) - --atkup - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(13761956,0)) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_HAND) - e1:SetCost(c13761956.atcost) - e1:SetTarget(c13761956.attg) - e1:SetOperation(c13761956.atop) - c:RegisterEffect(e1) -end -function c13761956.atcost(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end -function c13761956.filter(c) - return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_FIRE) -end -function c13761956.attg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c13761956.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c13761956.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - local g=Duel.SelectTarget(tp,c13761956.filter,tp,LOCATION_MZONE,0,1,1,nil) -end -function c13761956.atop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(400) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - end -end diff --git a/script/c13764881.lua b/script/c13764881.lua deleted file mode 100644 index 0579acd5ef..0000000000 --- a/script/c13764881.lua +++ /dev/null @@ -1,35 +0,0 @@ ---チェーン・リゾネーター -function c13764881.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(13764881,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetCondition(c13764881.spcon) - e1:SetTarget(c13764881.sptg) - e1:SetOperation(c13764881.spop) - c:RegisterEffect(e1) -end -function c13764881.cfilter(c) - return c:IsFaceup() and c:IsType(TYPE_SYNCHRO) -end -function c13764881.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c13764881.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) -end -function c13764881.filter(c,e,tp) - return c:IsSetCard(0x57) and not c:IsCode(13764881) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c13764881.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c13764881.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c13764881.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c13764881.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c13803864.lua b/script/c13803864.lua deleted file mode 100644 index 1efa37d1b8..0000000000 --- a/script/c13803864.lua +++ /dev/null @@ -1,43 +0,0 @@ ---キング・もけもけ -function c13803864.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcCodeRep(c,27288416,3,true,true) - --Special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(13803864,0)) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCondition(c13803864.spcon) - e1:SetTarget(c13803864.sptg) - e1:SetOperation(c13803864.spop) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_REMOVE) - c:RegisterEffect(e2) - local e3=e1:Clone() - e3:SetCode(EVENT_TO_DECK) - c:RegisterEffect(e3) -end -function c13803864.spfilter(c,e,tp) - return c:IsCode(27288416) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c13803864.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousPosition(POS_FACEUP) and e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) -end -function c13803864.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c13803864.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE) -end -function c13803864.spop(e,tp,eg,ep,ev,re,r,rp) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ft<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c13803864.spfilter,tp,LOCATION_GRAVE,0,ft,ft,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c13821299.lua b/script/c13821299.lua deleted file mode 100644 index 913113e4a2..0000000000 --- a/script/c13821299.lua +++ /dev/null @@ -1,32 +0,0 @@ ---トラップ・イーター -function c13821299.initial_effect(c) - c:EnableReviveLimit() - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - c:RegisterEffect(e1) - --spsummon proc - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_SPSUMMON_PROC) - e2:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e2:SetRange(LOCATION_HAND) - e2:SetCondition(c13821299.spcon) - e2:SetOperation(c13821299.spop) - c:RegisterEffect(e2) -end -function c13821299.spfilter(c) - return c:IsFaceup() and c:IsType(TYPE_TRAP) and c:IsAbleToGraveAsCost() -end -function c13821299.spcon(e,c) - if c==nil then return true end - return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c13821299.spfilter,c:GetControler(),0,LOCATION_ONFIELD,1,nil) -end -function c13821299.spop(e,tp,eg,ep,ev,re,r,rp,c) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c13821299.spfilter,tp,0,LOCATION_ONFIELD,1,1,nil) - Duel.SendtoGrave(g,REASON_COST) -end diff --git a/script/c13839120.lua b/script/c13839120.lua deleted file mode 100644 index 10bc59ccb9..0000000000 --- a/script/c13839120.lua +++ /dev/null @@ -1,30 +0,0 @@ ---イエロー・ガジェット -function c13839120.initial_effect(c) - --search - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(13839120,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c13839120.tg) - e1:SetOperation(c13839120.op) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e2) -end -function c13839120.filter(c) - return c:IsCode(41172955) and c:IsAbleToHand() -end -function c13839120.tg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c13839120.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c13839120.op(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstMatchingCard(c13839120.filter,tp,LOCATION_DECK,0,nil) - if tc then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end diff --git a/script/c13846680.lua b/script/c13846680.lua deleted file mode 100644 index e468923077..0000000000 --- a/script/c13846680.lua +++ /dev/null @@ -1,28 +0,0 @@ ---ヘルプロミネンス -function c13846680.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(13846680,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetCondition(c13846680.condition) - e1:SetTarget(c13846680.target) - e1:SetOperation(c13846680.operation) - c:RegisterEffect(e1) -end -function c13846680.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) -end -function c13846680.filter(c) - return (c:IsFacedown() or c:GetAttribute()~=ATTRIBUTE_FIRE) and c:IsDestructable() -end -function c13846680.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local g=Duel.GetMatchingGroup(c13846680.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c13846680.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c13846680.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - Duel.Destroy(g,REASON_EFFECT) -end diff --git a/script/c13851202.lua b/script/c13851202.lua deleted file mode 100644 index 1cb4707f16..0000000000 --- a/script/c13851202.lua +++ /dev/null @@ -1,50 +0,0 @@ ---星因士 リゲル -function c13851202.initial_effect(c) - --atk up - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e1:SetCountLimit(1,13851202) - e1:SetTarget(c13851202.target) - e1:SetOperation(c13851202.operation) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - c:RegisterEffect(e2) - local e3=e1:Clone() - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e3) -end -function c13851202.filter(c) - return c:IsFaceup() and c:IsSetCard(0x9c) -end -function c13851202.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c13851202.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c13851202.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c13851202.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) -end -function c13851202.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(500) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_PHASE+PHASE_END) - e2:SetRange(LOCATION_MZONE) - e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e2:SetCountLimit(1) - e2:SetOperation(c13851202.tgop) - e2:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e2) - end -end -function c13851202.tgop(e,tp,eg,ep,ev,re,r,rp) - Duel.SendtoGrave(e:GetHandler(),REASON_EFFECT) -end diff --git a/script/c13857930.lua b/script/c13857930.lua deleted file mode 100644 index 3947b18aa0..0000000000 --- a/script/c13857930.lua +++ /dev/null @@ -1,55 +0,0 @@ ---N・ティンクル・モス -function c13857930.initial_effect(c) - c:EnableReviveLimit() - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - c:RegisterEffect(e1) - --Activate - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(13857930,0)) - e3:SetCategory(CATEGORY_DRAW) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e3:SetCode(EVENT_ATTACK_ANNOUNCE) - e3:SetRange(LOCATION_MZONE) - e3:SetCondition(c13857930.condition) - e3:SetTarget(c13857930.target) - e3:SetOperation(c13857930.activate) - c:RegisterEffect(e3) - --add code - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e4:SetCode(EFFECT_ADD_CODE) - e4:SetValue(17732278) - c:RegisterEffect(e4) -end -function c13857930.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler()==Duel.GetAttacker() or e:GetHandler()==Duel.GetAttackTarget() -end -function c13857930.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():GetFlagEffect(13857930)==0 end - e:GetHandler():RegisterFlagEffect(13857930,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_DAMAGE,0,1) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c13857930.activate(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if Duel.Draw(tp,1,REASON_EFFECT)==0 then return end - local tc=Duel.GetOperatedGroup():GetFirst() - Duel.ConfirmCards(1-tp,tc) - if tc:IsType(TYPE_MONSTER) then - Duel.SkipPhase(Duel.GetTurnPlayer(),PHASE_BATTLE,RESET_PHASE+PHASE_BATTLE,1) - elseif tc:IsType(TYPE_SPELL) then - if c==Duel.GetAttacker() and not c:IsHasEffect(EFFECT_CANNOT_DIRECT_ATTACK) - and c:IsRelateToEffect(e) and c:IsFaceup() and Duel.SelectYesNo(tp,aux.Stringid(13857930,1)) then - Duel.ChangeAttackTarget(nil) - end - else - if c:IsRelateToEffect(e) and c:IsFaceup() then - Duel.ChangePosition(c,POS_FACEUP_DEFENCE) - end - end - Duel.ShuffleHand(tp) -end diff --git a/script/c13890468.lua b/script/c13890468.lua deleted file mode 100644 index 145e5bb884..0000000000 --- a/script/c13890468.lua +++ /dev/null @@ -1,37 +0,0 @@ ---精霊獣 ペトルフィン -function c13890468.initial_effect(c) - c:SetSPSummonOnce(13890468) - --tohand - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetCountLimit(1) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c13890468.cost) - e1:SetTarget(c13890468.target) - e1:SetOperation(c13890468.operation) - c:RegisterEffect(e1) -end -function c13890468.filter(c) - return c:IsSetCard(0xb5) and c:IsAbleToRemoveAsCost() -end -function c13890468.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c13890468.filter,tp,LOCATION_HAND,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c13890468.filter,tp,LOCATION_HAND,0,1,1,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c13890468.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and chkc:IsAbleToHand() end - if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g=Duel.SelectTarget(tp,Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c13890468.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - end -end diff --git a/script/c13893596.lua b/script/c13893596.lua deleted file mode 100644 index b0c9f0fec8..0000000000 --- a/script/c13893596.lua +++ /dev/null @@ -1,99 +0,0 @@ ---究極封印神エクゾディオス -function c13893596.initial_effect(c) - c:EnableReviveLimit() - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_SPSUMMON_PROC) - e2:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e2:SetRange(LOCATION_HAND) - e2:SetCondition(c13893596.spcon) - e2:SetOperation(c13893596.spop) - c:RegisterEffect(e2) - --to grave - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(13893596,0)) - e3:SetCategory(CATEGORY_TOGRAVE) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e3:SetCode(EVENT_ATTACK_ANNOUNCE) - e3:SetTarget(c13893596.tgtg) - e3:SetOperation(c13893596.tgop) - c:RegisterEffect(e3) - --atkup - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e4:SetRange(LOCATION_MZONE) - e4:SetCode(EFFECT_UPDATE_ATTACK) - e4:SetValue(c13893596.atkval) - c:RegisterEffect(e4) - --redirect - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_SINGLE) - e5:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) - e5:SetCondition(c13893596.recon) - e5:SetValue(LOCATION_REMOVED) - c:RegisterEffect(e5) -end -function c13893596.cfilter(c) - return not c:IsAbleToDeckOrExtraAsCost() -end -function c13893596.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - local g=Duel.GetMatchingGroup(Card.IsType,tp,LOCATION_GRAVE,0,nil,TYPE_MONSTER) - return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and g:GetCount()>0 - and not g:IsExists(c13893596.cfilter,1,nil) -end -function c13893596.spop(e,tp,eg,ep,ev,re,r,rp,c) - local g=Duel.GetMatchingGroup(Card.IsType,tp,LOCATION_GRAVE,0,nil,TYPE_MONSTER) - Duel.SendtoDeck(g,nil,2,REASON_COST) -end -function c13893596.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) -end -function c13893596.tgfilter(c) - return c:IsType(TYPE_MONSTER) and c:IsAbleToGrave() -end -function c13893596.filter(c,rc,code) - return c:IsRelateToCard(rc) and c:GetCode()==code -end -function c13893596.tgop(e,tp,eg,ep,ev,re,r,rp) - local WIN_REASON_EXODIUS = 0x14 - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local c=e:GetHandler() - local g=Duel.SelectMatchingCard(tp,c13893596.tgfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil) - local tc=g:GetFirst() - if tc and Duel.SendtoGrave(tc,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_GRAVE) - and c:IsRelateToEffect(e) and c:IsFaceup() then - tc:CreateRelation(c,RESET_EVENT+0x1fe0000) - local a1=false local a2=false local a3=false local a4=false local a5=false - local g=Duel.GetFieldGroup(tp,LOCATION_GRAVE,0) - local gc=g:GetFirst() - while gc do - if c13893596.filter(gc,c,8124921) then a1=true - elseif c13893596.filter(gc,c,44519536) then a2=true - elseif c13893596.filter(gc,c,70903634) then a3=true - elseif c13893596.filter(gc,c,7902349) then a4=true - elseif c13893596.filter(gc,c,33396948) then a5=true - end - gc=g:GetNext() - end - if a1 and a2 and a3 and a4 and a5 then - Duel.Win(tp,WIN_REASON_EXODIUS) - end - end -end -function c13893596.atkval(e,c) - return Duel.GetMatchingGroupCount(Card.IsType,c:GetControler(),LOCATION_GRAVE,0,nil,TYPE_NORMAL)*1000 -end -function c13893596.recon(e) - return e:GetHandler():IsFaceup() -end diff --git a/script/c13944422.lua b/script/c13944422.lua deleted file mode 100644 index d0c3ae6b2c..0000000000 --- a/script/c13944422.lua +++ /dev/null @@ -1,53 +0,0 @@ ---グラナドラ -function c13944422.initial_effect(c) - --recover - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(13944422,0)) - e1:SetCategory(CATEGORY_RECOVER) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c13944422.rectg) - e1:SetOperation(c13944422.recop) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e2) - local e3=e1:Clone() - e3:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - c:RegisterEffect(e3) - --damage - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(13944422,1)) - e4:SetCategory(CATEGORY_DAMAGE) - e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e4:SetCode(EVENT_TO_GRAVE) - e4:SetCondition(c13944422.damcon) - e4:SetTarget(c13944422.damtg) - e4:SetOperation(c13944422.damop) - c:RegisterEffect(e4) -end -function c13944422.rectg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(1000) - Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,1000) -end -function c13944422.recop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Recover(p,d,REASON_EFFECT) -end -function c13944422.damcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsReason(REASON_DESTROY) -end -function c13944422.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(2000) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,tp,2000) -end -function c13944422.damop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end \ No newline at end of file diff --git a/script/c13945283.lua b/script/c13945283.lua deleted file mode 100644 index d24557d042..0000000000 --- a/script/c13945283.lua +++ /dev/null @@ -1,25 +0,0 @@ ---幻影の壁 -function c13945283.initial_effect(c) - --to hand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(13945283,0)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_BATTLED) - e1:SetCondition(c13945283.condition) - e1:SetTarget(c13945283.target) - e1:SetOperation(c13945283.operation) - c:RegisterEffect(e1) -end -function c13945283.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetAttackTarget()==e:GetHandler() and not Duel.GetAttacker():IsStatus(STATUS_BATTLE_DESTROYED) -end -function c13945283.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,Duel.GetAttacker(),1,0,0) -end -function c13945283.operation(e,tp,eg,ep,ev,re,r,rp) - local a=Duel.GetAttacker() - if not a:IsRelateToBattle() then return end - Duel.SendtoHand(a,nil,REASON_EFFECT) -end diff --git a/script/c13955608.lua b/script/c13955608.lua deleted file mode 100644 index b55e9ab149..0000000000 --- a/script/c13955608.lua +++ /dev/null @@ -1,50 +0,0 @@ ---機動砦 ストロング・ホールド -function c13955608.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c13955608.target) - e1:SetOperation(c13955608.activate) - c:RegisterEffect(e1) -end -function c13955608.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and - Duel.IsPlayerCanSpecialSummonMonster(tp,13955608,0,0x21,0,2000,4,RACE_MACHINE,ATTRIBUTE_EARTH) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c13955608.activate(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) then return end - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 - or not Duel.IsPlayerCanSpecialSummonMonster(tp,13955608,0,0x21,0,2000,4,RACE_MACHINE,ATTRIBUTE_EARTH) then return end - c:AddTrapMonsterAttribute(TYPE_EFFECT,ATTRIBUTE_EARTH,RACE_MACHINE,4,0,2000) - Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP_DEFENCE) - c:TrapMonsterBlock() - --cannot attack - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(3000) - e1:SetCondition(c13955608.atkcon) - e1:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e1) -end -function c13955608.atkcon(e) - local con=0 - for i=0,4 do - local tc=Duel.GetFieldCard(e:GetHandlerPlayer(),LOCATION_MZONE,i) - if tc and tc:IsFaceup() then - local code=tc:GetCode() - if code==13839120 then con=bit.bor(con,1) - elseif code==86445415 then con=bit.bor(con,2) - elseif code==41172955 then con=bit.bor(con,4) - end - if con==7 then return true end - end - end - return false -end diff --git a/script/c13959634.lua b/script/c13959634.lua deleted file mode 100644 index 5316c48f57..0000000000 --- a/script/c13959634.lua +++ /dev/null @@ -1,67 +0,0 @@ ---氷霊神ムーラングレイス -function c13959634.initial_effect(c) - c:EnableReviveLimit() - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_SPSUMMON_PROC) - e2:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e2:SetRange(LOCATION_HAND) - e2:SetCondition(c13959634.spcon) - c:RegisterEffect(e2) - --handes - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(13959634,0)) - e3:SetCategory(CATEGORY_HANDES) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - e3:SetCountLimit(1,13959634) - e3:SetTarget(c13959634.hdtg) - e3:SetOperation(c13959634.hdop) - c:RegisterEffect(e3) - --leave - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e4:SetCode(EVENT_LEAVE_FIELD_P) - e4:SetOperation(c13959634.leaveop) - c:RegisterEffect(e4) -end -function c13959634.spcon(e,c) - if c==nil then return true end - return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and - Duel.GetMatchingGroupCount(Card.IsAttribute,c:GetControler(),LOCATION_GRAVE,0,nil,ATTRIBUTE_WATER)==5 -end -function c13959634.hdtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,1-tp,2) -end -function c13959634.hdop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND):RandomSelect(tp,2) - Duel.SendtoGrave(g,REASON_EFFECT+REASON_DISCARD) -end -function c13959634.leaveop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsFacedown() then return end - local effp=e:GetHandler():GetControler() - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SKIP_BP) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetTargetRange(1,0) - if Duel.GetTurnPlayer()==effp then - e1:SetLabel(Duel.GetTurnCount()) - e1:SetCondition(c13959634.skipcon) - e1:SetReset(RESET_PHASE+PHASE_END+RESET_SELF_TURN,2) - else - e1:SetReset(RESET_PHASE+PHASE_END+RESET_SELF_TURN,1) - end - Duel.RegisterEffect(e1,effp) -end -function c13959634.skipcon(e) - return Duel.GetTurnCount()~=e:GetLabel() -end diff --git a/script/c13972452.lua b/script/c13972452.lua deleted file mode 100644 index fdd0b3bbbf..0000000000 --- a/script/c13972452.lua +++ /dev/null @@ -1,34 +0,0 @@ ---マジェスペクター・ストーム -function c13972452.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TODECK) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c13972452.cost) - e1:SetTarget(c13972452.target) - e1:SetOperation(c13972452.activate) - c:RegisterEffect(e1) -end -function c13972452.cfilter(c) - return c:IsRace(RACE_SPELLCASTER) and c:IsAttribute(ATTRIBUTE_WIND) -end -function c13972452.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,c13972452.cfilter,1,nil) end - local g=Duel.SelectReleaseGroup(tp,c13972452.cfilter,1,1,nil) - Duel.Release(g,REASON_COST) -end -function c13972452.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsAbleToDeck() end - if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToDeck,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectTarget(tp,Card.IsAbleToDeck,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0) -end -function c13972452.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoDeck(tc,nil,2,REASON_EFFECT) - end -end diff --git a/script/c13974207.lua b/script/c13974207.lua deleted file mode 100644 index 9f5207e14a..0000000000 --- a/script/c13974207.lua +++ /dev/null @@ -1,34 +0,0 @@ ---電光-雪花- -function c13974207.initial_effect(c) - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - c:RegisterEffect(e1) - --cannot set - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_CANNOT_SSET) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetRange(LOCATION_MZONE) - e2:SetTargetRange(1,1) - e2:SetCondition(c13974207.effcon) - c:RegisterEffect(e2) - --cannot trigger - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetCode(EFFECT_CANNOT_TRIGGER) - e3:SetProperty(EFFECT_FLAG_SET_AVAILABLE) - e3:SetRange(LOCATION_MZONE) - e3:SetTargetRange(LOCATION_SZONE,LOCATION_SZONE) - e3:SetTarget(c13974207.distg) - e3:SetCondition(c13974207.effcon) - c:RegisterEffect(e3) -end -function c13974207.effcon(e) - return not Duel.IsExistingMatchingCard(Card.IsFacedown,e:GetHandlerPlayer(),LOCATION_SZONE,0,1,nil) -end -function c13974207.distg(e,c) - return c:IsFacedown() -end diff --git a/script/c13995824.lua b/script/c13995824.lua deleted file mode 100644 index 34f0285706..0000000000 --- a/script/c13995824.lua +++ /dev/null @@ -1,27 +0,0 @@ ---ボルテック・バイコーン -function c13995824.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsRace,RACE_BEAST),aux.NonTuner(nil),1) - c:EnableReviveLimit() - --deckdes - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(13995824,0)) - e1:SetCategory(CATEGORY_DECKDES) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_DESTROYED) - e1:SetCondition(c13995824.ddcon) - e1:SetTarget(c13995824.ddtg) - e1:SetOperation(c13995824.ddop) - c:RegisterEffect(e1) -end -function c13995824.ddcon(e,tp,eg,ep,ev,re,r,rp) - return rp~=tp and e:GetHandler():GetPreviousControler()==tp -end -function c13995824.ddtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DECKDES,0,0,PLAYER_ALL,7) -end -function c13995824.ddop(e,tp,eg,ep,ev,re,r,rp) - Duel.DiscardDeck(tp,7,REASON_EFFECT) - Duel.DiscardDeck(1-tp,7,REASON_EFFECT) -end diff --git a/script/c13997673.lua b/script/c13997673.lua deleted file mode 100644 index ee9be9357a..0000000000 --- a/script/c13997673.lua +++ /dev/null @@ -1,40 +0,0 @@ ---コア濃度圧縮 -function c13997673.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c13997673.cost) - e1:SetTarget(c13997673.target) - e1:SetOperation(c13997673.activate) - c:RegisterEffect(e1) -end -function c13997673.cfilter1(c) - return c:IsCode(36623431) and not c:IsPublic() -end -function c13997673.cfilter2(c) - return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x1d) and c:IsDiscardable() -end -function c13997673.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c13997673.cfilter1,tp,LOCATION_HAND,0,1,nil) - and Duel.IsExistingMatchingCard(c13997673.cfilter2,tp,LOCATION_HAND,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) - local g1=Duel.SelectMatchingCard(tp,c13997673.cfilter1,tp,LOCATION_HAND,0,1,1,nil) - Duel.ConfirmCards(1-tp,g1) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) - local g2=Duel.SelectMatchingCard(tp,c13997673.cfilter2,tp,LOCATION_HAND,0,1,1,nil) - Duel.SendtoGrave(g2,REASON_COST+REASON_DISCARD) - Duel.ShuffleHand(tp) -end -function c13997673.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp,2) end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(2) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2) -end -function c13997673.activate(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end diff --git a/script/c14001430.lua b/script/c14001430.lua deleted file mode 100644 index 9c76879ac2..0000000000 --- a/script/c14001430.lua +++ /dev/null @@ -1,97 +0,0 @@ ---マドルチェ・シャトー -function c14001430.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TODECK) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c14001430.target) - e1:SetOperation(c14001430.activate) - c:RegisterEffect(e1) - --atkup - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x71)) - e2:SetValue(500) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EFFECT_UPDATE_DEFENCE) - c:RegisterEffect(e3) - --destroy - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e4:SetRange(LOCATION_SZONE) - e4:SetCode(EFFECT_SEND_REPLACE) - e4:SetTarget(c14001430.reptg) - e4:SetValue(c14001430.repval) - c:RegisterEffect(e4) -end -function c14001430.tdfilter(c) - return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x71) and c:IsAbleToDeck() -end -function c14001430.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local g=Duel.GetMatchingGroup(c14001430.tdfilter,tp,LOCATION_GRAVE,0,nil) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0) -end -function c14001430.activate(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local g=Duel.GetMatchingGroup(c14001430.tdfilter,tp,LOCATION_GRAVE,0,nil) - if g:GetCount()>0 then - Duel.SendtoDeck(g,nil,2,REASON_EFFECT) - end -end -function c14001430.repfilter(c,tp) - return c:IsControler(tp) and c:IsLocation(LOCATION_GRAVE) and c:GetDestination()==LOCATION_DECK and c:IsType(TYPE_MONSTER) - and c:IsAbleToHand() -end -function c14001430.reptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return bit.band(r,REASON_EFFECT)~=0 and re and re:IsActiveType(TYPE_MONSTER) - and re:GetHandler():IsSetCard(0x71) and eg:IsExists(c14001430.repfilter,1,nil,tp) end - if Duel.SelectYesNo(tp,aux.Stringid(14001430,0)) then - local g=eg:Filter(c14001430.repfilter,nil,tp) - local ct=g:GetCount() - if ct>1 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - g=g:Select(tp,1,ct,nil) - end - local tc=g:GetFirst() - while tc do - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_TO_DECK_REDIRECT) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetValue(LOCATION_HAND) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - tc:RegisterFlagEffect(14001430,RESET_EVENT+0x1de0000+RESET_PHASE+PHASE_END,0,1) - tc=g:GetNext() - end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e1:SetCode(EVENT_TO_HAND) - e1:SetCountLimit(1) - e1:SetCondition(c14001430.thcon) - e1:SetOperation(c14001430.thop) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) - return true - else return false end -end -function c14001430.repval(e,c) - return false -end -function c14001430.thfilter(c) - return c:GetFlagEffect(14001430)~=0 -end -function c14001430.thcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c14001430.thfilter,1,nil) -end -function c14001430.thop(e,tp,eg,ep,ev,re,r,rp) - local g=eg:Filter(c14001430.thfilter,nil) - Duel.ConfirmCards(1-tp,g) - Duel.ShuffleHand(tp) -end diff --git a/script/c14005031.lua b/script/c14005031.lua deleted file mode 100644 index 804c6b1daf..0000000000 --- a/script/c14005031.lua +++ /dev/null @@ -1,78 +0,0 @@ ---ムーンダンスの儀式 -function c14005031.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,0x1e0) - e1:SetTarget(c14005031.target) - e1:SetOperation(c14005031.activate) - c:RegisterEffect(e1) - --disable - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e2:SetTarget(c14005031.disable) - e2:SetCondition(c14005031.discon) - e2:SetCode(EFFECT_DISABLE) - c:RegisterEffect(e2) - --destroy - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e3:SetRange(LOCATION_SZONE) - e3:SetCode(EVENT_LEAVE_FIELD) - e3:SetCondition(c14005031.descon) - e3:SetOperation(c14005031.desop) - c:RegisterEffect(e3) -end -function c14005031.filter(c) - return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:GetOverlayCount()==0 and c:IsAttribute(ATTRIBUTE_WIND) -end -function c14005031.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c14005031.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c14005031.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - Duel.SelectTarget(tp,c14005031.filter,tp,LOCATION_MZONE,0,1,1,nil) -end -function c14005031.activate(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then - c:SetCardTarget(tc) - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(14005031,0)) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetRange(LOCATION_SZONE) - e1:SetCountLimit(1) - e1:SetCondition(c14005031.matcon) - e1:SetOperation(c14005031.matop) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - c:RegisterEffect(e1) - end -end -function c14005031.disable(e,c) - return c:IsType(TYPE_EFFECT) -end -function c14005031.discon(e) - return e:GetHandler():GetFirstCardTarget()~=nil -end -function c14005031.descon(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetHandler():GetFirstCardTarget() - return tc and eg:IsContains(tc) -end -function c14005031.desop(e,tp,eg,ep,ev,re,r,rp) - Duel.Destroy(e:GetHandler(),REASON_EFFECT) -end -function c14005031.matcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetFirstCardTarget()~=nil -end -function c14005031.matop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=c:GetFirstCardTarget() - if tc then - Duel.Overlay(tc,Group.FromCards(c)) - end -end diff --git a/script/c14017402.lua b/script/c14017402.lua deleted file mode 100644 index 1462d3febd..0000000000 --- a/script/c14017402.lua +++ /dev/null @@ -1,72 +0,0 @@ ---波動竜騎士 ドラゴエクィテス -function c14017402.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcFun2(c,c14017402.ffilter,aux.FilterBoolFunction(Card.IsRace,RACE_WARRIOR),true) - --copy - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(14017402,0)) - e2:SetCategory(CATEGORY_REMOVE) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCountLimit(1) - e2:SetRange(LOCATION_MZONE) - e2:SetTarget(c14017402.target) - e2:SetOperation(c14017402.operation) - c:RegisterEffect(e2) - --reflect damage - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetCode(EFFECT_REFLECT_DAMAGE) - e3:SetRange(LOCATION_MZONE) - e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e3:SetTargetRange(1,0) - e3:SetValue(c14017402.refcon) - c:RegisterEffect(e3) - --spsummon condition - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e4:SetCode(EFFECT_SPSUMMON_CONDITION) - e4:SetValue(c14017402.splimit) - c:RegisterEffect(e4) -end -function c14017402.splimit(e,se,sp,st) - if e:GetHandler():IsLocation(LOCATION_EXTRA) then - return bit.band(st,SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION - end - return true -end -function c14017402.refcon(e,re,val,r,rp,rc) - return bit.band(r,REASON_EFFECT)~=0 and rp~=e:GetHandler():GetControler() and e:GetHandler():IsAttackPos() -end -function c14017402.ffilter(c) - return c:IsRace(RACE_DRAGON) and c:IsType(TYPE_SYNCHRO) -end -function c14017402.cpfilter(c) - return c:IsRace(RACE_DRAGON) and c:IsType(TYPE_SYNCHRO) and c:IsAbleToRemove() -end -function c14017402.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:GetLocation()==LOCATION_GRAVE and c14017402.cpfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c14017402.cpfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,c14017402.cpfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) -end -function c14017402.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and c:IsFaceup() and tc:IsRelateToEffect(e) then - if Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)~=1 then return end - local code=tc:GetOriginalCode() - local reset_flag=RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END - c:CopyEffect(code, reset_flag, 1) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(reset_flag) - e1:SetCode(EFFECT_CHANGE_CODE) - e1:SetValue(code) - c:RegisterEffect(e1) - end -end diff --git a/script/c14047624.lua b/script/c14047624.lua deleted file mode 100644 index 4f8aaba4c7..0000000000 --- a/script/c14047624.lua +++ /dev/null @@ -1,46 +0,0 @@ ---ラヴァルロード・ジャッジメント -function c14047624.initial_effect(c) - --damage - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(14047624,0)) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCost(c14047624.damcost) - e1:SetTarget(c14047624.damtg) - e1:SetOperation(c14047624.damop) - c:RegisterEffect(e1) -end -function c14047624.cfilter(c) - return c:IsSetCard(0x39) and c:IsAbleToRemoveAsCost() -end -function c14047624.cfilter2(c) - return c:IsCode(14047624) and c:GetAttackAnnouncedCount()>0 -end -function c14047624.damcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c14047624.cfilter,tp,LOCATION_GRAVE,0,1,nil) - and not Duel.IsExistingMatchingCard(c14047624.cfilter2,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c14047624.cfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE) - e1:SetProperty(EFFECT_FLAG_OATH) - e1:SetTarget(aux.TargetBoolFunction(Card.IsCode,14047624)) - e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e1:SetReset(RESET_PHASE+RESET_END) - Duel.RegisterEffect(e1,tp) -end -function c14047624.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(1000) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,1000) -end -function c14047624.damop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c14057297.lua b/script/c14057297.lua deleted file mode 100644 index 2dc79a5ca0..0000000000 --- a/script/c14057297.lua +++ /dev/null @@ -1,49 +0,0 @@ ---死なばもろとも -function c14057297.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,14057297+EFFECT_COUNT_CODE_OATH) - e1:SetCondition(c14057297.condition) - e1:SetTarget(c14057297.target) - e1:SetOperation(c14057297.activate) - c:RegisterEffect(e1) -end -function c14057297.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)>=3 and Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>=3 -end -function c14057297.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp,5) and Duel.IsPlayerCanDraw(1-tp,5) end - local g=Duel.GetFieldGroup(tp,LOCATION_HAND,LOCATION_HAND) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,PLAYER_ALL,5) -end -function c14057297.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetFieldGroupCount(tp,LOCATION_HAND,LOCATION_HAND)==0 then return end - local p=tp - local st=0 - for i=1,2 do - local sg=Duel.GetFieldGroup(p,LOCATION_HAND,0) - Duel.SendtoDeck(sg,nil,0,REASON_EFFECT) - local og=Duel.GetOperatedGroup() - local ct=og:FilterCount(Card.IsLocation,nil,LOCATION_DECK) - if ct>0 then - st=st+ct - Duel.SortDecktop(p,p,ct) - for j=1,ct do - local mg=Duel.GetDecktopGroup(p,1) - Duel.MoveSequence(mg:GetFirst(),1) - end - end - p=1-p - end - local lp=Duel.GetLP(tp) - Duel.SetLP(tp,lp-st*300) - if Duel.GetLP(tp)>0 then - Duel.BreakEffect() - Duel.Draw(tp,5,REASON_EFFECT) - Duel.Draw(1-tp,5,REASON_EFFECT) - end -end diff --git a/script/c14087893.lua b/script/c14087893.lua deleted file mode 100644 index 93dca53db8..0000000000 --- a/script/c14087893.lua +++ /dev/null @@ -1,29 +0,0 @@ ---月の書 -function c14087893.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_POSITION) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(TIMING_BATTLE_PHASE,0x1c0+TIMING_BATTLE_PHASE) - e1:SetTarget(c14087893.target) - e1:SetOperation(c14087893.activate) - c:RegisterEffect(e1) -end -function c14087893.filter(c) - return c:IsFaceup() and c:IsCanTurnSet() -end -function c14087893.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c14087893.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c14087893.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - local g=Duel.SelectTarget(tp,c14087893.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0) -end -function c14087893.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.ChangePosition(tc,POS_FACEDOWN_DEFENCE) - end -end diff --git a/script/c14089428.lua b/script/c14089428.lua deleted file mode 100644 index c32f590907..0000000000 --- a/script/c14089428.lua +++ /dev/null @@ -1,30 +0,0 @@ ---ブルーサンダーT45 -function c14089428.initial_effect(c) - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(14089428,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_BATTLE_DESTROYING) - e1:SetCondition(aux.bdocon) - e1:SetTarget(c14089428.target) - e1:SetOperation(c14089428.operation) - c:RegisterEffect(e1) -end -function c14089428.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0) -end -function c14089428.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 - or not Duel.IsPlayerCanSpecialSummonMonster(tp,14089429,0,0x4011,1500,1500,4,RACE_MACHINE,ATTRIBUTE_LIGHT) then return end - local token=Duel.CreateToken(tp,14089429) - Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UNRELEASABLE_SUM) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetValue(1) - e1:SetReset(RESET_EVENT+0x1fe0000) - token:RegisterEffect(e1) -end diff --git a/script/c14094090.lua b/script/c14094090.lua deleted file mode 100644 index 8adb20e1dd..0000000000 --- a/script/c14094090.lua +++ /dev/null @@ -1,49 +0,0 @@ ---超戦士の儀式 -function c14094090.initial_effect(c) - aux.AddRitualProcEqual(c,c14094090.ritual_filter) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_GRAVE) - e1:SetCountLimit(1,14094090) - e1:SetCondition(aux.exccon) - e1:SetCost(c14094090.spcost) - e1:SetTarget(c14094090.sptg) - e1:SetOperation(c14094090.spop) - c:RegisterEffect(e1) -end -function c14094090.ritual_filter(c) - return c:IsType(TYPE_RITUAL) and c:IsSetCard(0xcf) -end -function c14094090.cfilter(c,att) - return c:IsAttribute(att) and c:IsAbleToRemoveAsCost() -end -function c14094090.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() - and Duel.IsExistingMatchingCard(c14094090.cfilter,tp,LOCATION_GRAVE,0,1,nil,ATTRIBUTE_LIGHT) - and Duel.IsExistingMatchingCard(c14094090.cfilter,tp,LOCATION_GRAVE,0,1,nil,ATTRIBUTE_DARK) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g1=Duel.SelectMatchingCard(tp,c14094090.cfilter,tp,LOCATION_GRAVE,0,1,1,nil,ATTRIBUTE_LIGHT) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g2=Duel.SelectMatchingCard(tp,c14094090.cfilter,tp,LOCATION_GRAVE,0,1,1,nil,ATTRIBUTE_DARK) - g1:Merge(g2) - g1:AddCard(e:GetHandler()) - Duel.Remove(g1,POS_FACEUP,REASON_COST) -end -function c14094090.spfilter(c,e,tp) - return c:IsSetCard(0xcf) and c:IsType(TYPE_RITUAL) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) -end -function c14094090.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c14094090.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c14094090.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c14094090.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP) - end -end diff --git a/script/c1409474.lua b/script/c1409474.lua deleted file mode 100644 index c1bbf1f061..0000000000 --- a/script/c1409474.lua +++ /dev/null @@ -1,45 +0,0 @@ ---陽炎獣 スピンクス -function c1409474.initial_effect(c) - --cannot be target - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetValue(aux.tgoval) - c:RegisterEffect(e1) - --guess - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(1409474,0)) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetCountLimit(1,1409474) - e2:SetRange(LOCATION_MZONE) - e2:SetTarget(c1409474.target) - e2:SetOperation(c1409474.operation) - c:RegisterEffect(e2) -end -function c1409474.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,1) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CARDTYPE) - Duel.SetTargetParam(Duel.SelectOption(tp,70,71,72)) -end -function c1409474.spfilter(c,e,tp) - return c:IsAttribute(ATTRIBUTE_FIRE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsHasEffect(EFFECT_NECRO_VALLEY) -end -function c1409474.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)==0 then return end - Duel.DiscardDeck(tp,1,REASON_EFFECT) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local tc=Duel.GetOperatedGroup():GetFirst() - if not tc then return end - local opt=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM) - if (opt==0 and tc:IsType(TYPE_MONSTER)) or (opt==1 and tc:IsType(TYPE_SPELL)) or (opt==2 and tc:IsType(TYPE_TRAP)) then - local g=Duel.GetMatchingGroup(c1409474.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,nil,e,tp) - if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(1409474,1)) then - Duel.BreakEffect() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=g:Select(tp,1,1,nil) - Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) - end - end -end diff --git a/script/c1412158.lua b/script/c1412158.lua deleted file mode 100644 index bbf17bc065..0000000000 --- a/script/c1412158.lua +++ /dev/null @@ -1,56 +0,0 @@ ---レアメタル・ナイト -function c1412158.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcCode2(c,92421852,38916461,true,true) - --atk up - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(1412158,0)) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c1412158.atkcon) - e1:SetValue(1000) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(1412158,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCondition(c1412158.spcon) - e2:SetTarget(c1412158.sptg) - e2:SetOperation(c1412158.spop) - c:RegisterEffect(e2) -end -function c1412158.atkcon(e) - local ph=Duel.GetCurrentPhase() - if not (ph==PHASE_DAMAGE or ph==PHASE_DAMAGE_CAL) then return false end - local a=Duel.GetAttacker() - local d=Duel.GetAttackTarget() - return a==e:GetHandler() and d~=nil -end -function c1412158.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetTurnID()~=Duel.GetTurnCount() -end -function c1412158.spfilter(c,e,tp) - return c:IsCode(75923050) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c1412158.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and e:GetHandler():IsAbleToExtra() - and Duel.IsExistingMatchingCard(c1412158.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function c1412158.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if Duel.GetLocationCount(tp,LOCATION_MZONE)<0 then return end - if c:IsRelateToEffect(e) and c:IsFaceup() and Duel.SendtoDeck(c,nil,2,REASON_EFFECT)~=0 then - local tc=Duel.GetFirstMatchingCard(c1412158.spfilter,tp,LOCATION_EXTRA,0,nil,e,tp) - if tc then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end - end -end diff --git a/script/c14141448.lua b/script/c14141448.lua deleted file mode 100644 index 09402cba38..0000000000 --- a/script/c14141448.lua +++ /dev/null @@ -1,28 +0,0 @@ ---グレート・モス -function c14141448.initial_effect(c) - c:EnableReviveLimit() - --special summon - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_SPSUMMON_PROC) - e2:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e2:SetRange(LOCATION_HAND) - e2:SetCondition(c14141448.spcon) - e2:SetOperation(c14141448.spop) - c:RegisterEffect(e2) -end -function c14141448.eqfilter(c) - return c:IsCode(40240595) and c:GetTurnCounter()>=4 -end -function c14141448.rfilter(c) - return c:IsCode(58192742) and c:GetEquipGroup():IsExists(c14141448.eqfilter,1,nil) -end -function c14141448.spcon(e,c) - if c==nil then return true end - return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-1 - and Duel.CheckReleaseGroup(c:GetControler(),c14141448.rfilter,1,nil) -end -function c14141448.spop(e,tp,eg,ep,ev,re,r,rp,c) - local g=Duel.SelectReleaseGroup(c:GetControler(),c14141448.rfilter,1,1,nil) - Duel.Release(g,REASON_COST) -end diff --git a/script/c14148099.lua b/script/c14148099.lua deleted file mode 100644 index 44f364a145..0000000000 --- a/script/c14148099.lua +++ /dev/null @@ -1,67 +0,0 @@ ---巨大戦艦 ビッグ・コア -function c14148099.initial_effect(c) - --summon success - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(14148099,0)) - e1:SetCategory(CATEGORY_COUNTER) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c14148099.addct) - e1:SetOperation(c14148099.addc) - c:RegisterEffect(e1) - --battle indestructable - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e2:SetValue(1) - c:RegisterEffect(e2) - --remove counter - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(14148099,1)) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e3:SetCode(EVENT_DAMAGE_STEP_END) - e3:SetCondition(c14148099.rctcon) - e3:SetOperation(c14148099.rctop) - c:RegisterEffect(e3) - --destroy - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(14148099,2)) - e4:SetCategory(CATEGORY_DESTROY) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e4:SetCode(EVENT_DAMAGE_STEP_END) - e4:SetCondition(c14148099.descon) - e4:SetTarget(c14148099.destg) - e4:SetOperation(c14148099.desop) - c:RegisterEffect(e4) -end -function c14148099.addct(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,3,0,0x1f) -end -function c14148099.addc(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - e:GetHandler():AddCounter(0x1f,3) - end -end -function c14148099.rctcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetCounter(0x1f)~=0 -end -function c14148099.rctop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFaceup() and c:IsRelateToEffect(e) then - c:RemoveCounter(tp,0x1f,1,REASON_EFFECT) - end -end -function c14148099.descon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetCounter(0x1f)==0 -end -function c14148099.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0) -end -function c14148099.desop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFaceup() and c:IsRelateToEffect(e) then - Duel.Destroy(c,REASON_EFFECT) - end -end diff --git a/script/c14152862.lua b/script/c14152862.lua deleted file mode 100644 index 8bb3e35efb..0000000000 --- a/script/c14152862.lua +++ /dev/null @@ -1,41 +0,0 @@ ---風紀宮司ノリト -function c14152862.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsRace,RACE_SPELLCASTER),6,2) - c:EnableReviveLimit() - -- - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(14152862,0)) - e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) - e1:SetCode(EVENT_CHAINING) - e1:SetCondition(c14152862.discon) - e1:SetCost(c14152862.discost) - e1:SetTarget(c14152862.distg) - e1:SetOperation(c14152862.disop) - c:RegisterEffect(e1) -end -function c14152862.discon(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) then return false end - return rp~=tp and re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev) -end -function c14152862.discost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c14152862.distg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) - end -end -function c14152862.disop(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateActivation(ev) - if re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(eg,REASON_EFFECT) - end -end diff --git a/script/c14154221.lua b/script/c14154221.lua deleted file mode 100644 index 98bdbc39db..0000000000 --- a/script/c14154221.lua +++ /dev/null @@ -1,43 +0,0 @@ ---進化の代償 -function c14154221.initial_effect(c) - --activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(14154221,0)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) - e2:SetRange(LOCATION_SZONE) - e2:SetCountLimit(1) - e2:SetCondition(c14154221.condition) - e2:SetTarget(c14154221.target) - e2:SetOperation(c14154221.operation) - c:RegisterEffect(e2) -end -function c14154221.cfilter(c) - local st=c:GetSummonType() - return st>=(SUMMON_TYPE_SPECIAL+150) and st<(SUMMON_TYPE_SPECIAL+180) -end -function c14154221.condition(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c14154221.cfilter,1,nil) -end -function c14154221.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsDestructable() end - if chk==0 then return e:GetHandler():IsRelateToEffect(e) and not e:GetHandler():IsStatus(STATUS_CHAINING) - and Duel.IsExistingTarget(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c14154221.operation(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c14198496.lua b/script/c14198496.lua deleted file mode 100644 index 44d9848d39..0000000000 --- a/script/c14198496.lua +++ /dev/null @@ -1,32 +0,0 @@ ---ミスティック・パイパー -function c14198496.initial_effect(c) - --draw - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(14198496,0)) - e1:SetCategory(CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1,14198496) - e1:SetCost(c14198496.cost) - e1:SetTarget(c14198496.target) - e1:SetOperation(c14198496.operation) - c:RegisterEffect(e1) -end -function c14198496.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end -function c14198496.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c14198496.operation(e,tp,eg,ep,ev,re,r,rp) - local ct=Duel.Draw(tp,1,REASON_EFFECT) - if ct==0 then return end - local dc=Duel.GetOperatedGroup():GetFirst() - Duel.ConfirmCards(1-tp,dc) - if dc:GetLevel()==1 then - Duel.Draw(tp,1,REASON_EFFECT) - end - Duel.ShuffleHand(tp) -end diff --git a/script/c14212201.lua b/script/c14212201.lua deleted file mode 100644 index eb562e0976..0000000000 --- a/script/c14212201.lua +++ /dev/null @@ -1,49 +0,0 @@ ---シャドウ・ヴァンパイア -function c14212201.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(14212201,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c14212201.sptg) - e1:SetOperation(c14212201.spop) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE) - e2:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL) - e2:SetValue(c14212201.xyzlimit) - c:RegisterEffect(e2) -end -function c14212201.filter(c,e,tp) - return c:GetCode()~=14212201 and c:IsSetCard(0x8e) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c14212201.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c14212201.filter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) -end -function c14212201.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c14212201.filter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp) - local tc=g:GetFirst() - if tc and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)>0 then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetTarget(c14212201.ftarget) - e1:SetLabel(tc:GetFieldID()) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) - end -end -function c14212201.ftarget(e,c) - return e:GetLabel()~=c:GetFieldID() -end -function c14212201.xyzlimit(e,c) - if not c then return false end - return not c:IsAttribute(ATTRIBUTE_DARK) -end diff --git a/script/c14225239.lua b/script/c14225239.lua deleted file mode 100644 index 5e27e033f9..0000000000 --- a/script/c14225239.lua +++ /dev/null @@ -1,25 +0,0 @@ ---E・HERO セイラーマン -function c14225239.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcCode2(c,79979666,21844576,true,true) - --spsummon condition - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(aux.fuslimit) - c:RegisterEffect(e1) - --direct attack - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DIRECT_ATTACK) - e2:SetCondition(c14225239.dacon) - c:RegisterEffect(e2) -end -function c14225239.filter(c) - return c:IsFacedown() and c:GetSequence()~=5 -end -function c14225239.dacon(e) - return Duel.IsExistingMatchingCard(c14225239.filter,e:GetHandlerPlayer(),LOCATION_SZONE,0,1,nil) -end diff --git a/script/c14235211.lua b/script/c14235211.lua deleted file mode 100644 index 158df05b24..0000000000 --- a/script/c14235211.lua +++ /dev/null @@ -1,56 +0,0 @@ ---暴風竜の防人 -function c14235211.initial_effect(c) - --equip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(14235211,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetRange(LOCATION_HAND+LOCATION_MZONE) - e1:SetTarget(c14235211.eqtg) - e1:SetOperation(c14235211.eqop) - c:RegisterEffect(e1) - -- - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_PIERCE) - c:RegisterEffect(e2) - --destroy sub - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_EQUIP) - e3:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e3:SetCode(EFFECT_DESTROY_SUBSTITUTE) - e3:SetValue(1) - c:RegisterEffect(e3) -end -function c14235211.filter(c) - return c:IsFaceup() and c:IsRace(RACE_DRAGON) and c:IsType(TYPE_NORMAL) -end -function c14235211.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c14235211.filter(chkc) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingTarget(c14235211.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c14235211.filter,tp,LOCATION_MZONE,0,1,1,nil) -end -function c14235211.eqop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) then return end - if c:IsLocation(LOCATION_MZONE) and c:IsFacedown() then return end - local tc=Duel.GetFirstTarget() - if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or tc:GetControler()~=tp or tc:IsFacedown() or not tc:IsRelateToEffect(e) then - Duel.SendtoGrave(c,REASON_EFFECT) - return - end - Duel.Equip(tp,c,tc,true) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(c14235211.eqlimit) - e1:SetLabelObject(tc) - c:RegisterEffect(e1) -end -function c14235211.eqlimit(e,c) - return c==e:GetLabelObject() -end diff --git a/script/c14255590.lua b/script/c14255590.lua deleted file mode 100644 index b73bdc815a..0000000000 --- a/script/c14255590.lua +++ /dev/null @@ -1,30 +0,0 @@ ---増幅する悪意 -function c14255590.initial_effect(c) - --discard deck - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(14255590,0)) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetCategory(CATEGORY_DECKDES) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCondition(c14255590.discon) - e1:SetTarget(c14255590.distg) - e1:SetOperation(c14255590.disop) - c:RegisterEffect(e1) -end -function c14255590.discon(e,tp,eg,ep,ev,re,r,rp) - return tp~=Duel.GetTurnPlayer() -end -function c14255590.distg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,3) -end -function c14255590.disop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:GetControler()~=tp or not c:IsRelateToEffect(e) or c:IsFacedown() then return end - local ct=Duel.GetMatchingGroupCount(Card.IsCode,tp,LOCATION_GRAVE,0,nil,14255590) - if ct>0 then - Duel.DiscardDeck(1-tp,ct,REASON_EFFECT) - end -end diff --git a/script/c14258627.lua b/script/c14258627.lua deleted file mode 100644 index cdfb3a50f7..0000000000 --- a/script/c14258627.lua +++ /dev/null @@ -1,75 +0,0 @@ ---地球巨人 ガイア・プレート -function c14258627.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c14258627.spcon) - e1:SetOperation(c14258627.spop) - c:RegisterEffect(e1) - --atk/def down - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_DAMAGE_CALCULATING) - e2:SetCondition(c14258627.adcon) - e2:SetOperation(c14258627.addown) - c:RegisterEffect(e2) - --maintain - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e3:SetCode(EVENT_PHASE+PHASE_STANDBY) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1) - e3:SetCondition(c14258627.mtcon) - e3:SetOperation(c14258627.mtop) - c:RegisterEffect(e3) -end -function c14258627.filter(c) - return c:IsRace(RACE_ROCK) and c:IsAbleToRemoveAsCost() -end -function c14258627.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c14258627.filter,tp,LOCATION_GRAVE,0,2,nil) -end -function c14258627.spop(e,tp,eg,ep,ev,re,r,rp,c) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c14258627.filter,tp,LOCATION_GRAVE,0,2,2,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c14258627.adcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetAttackTarget()~=nil -end -function c14258627.addown(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetHandler():GetBattleTarget() - if tc==nil then return end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetReset(RESET_PHASE+RESET_DAMAGE_CAL) - e1:SetValue(tc:GetAttack()/2) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_SET_DEFENCE_FINAL) - e2:SetReset(RESET_PHASE+RESET_DAMAGE_CAL) - e2:SetValue(tc:GetDefence()/2) - tc:RegisterEffect(e2) -end -function c14258627.mtcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c14258627.mtop(e,tp,eg,ep,ev,re,r,rp) - if Duel.IsExistingMatchingCard(c14258627.filter,tp,LOCATION_GRAVE,0,1,nil) - and Duel.SelectYesNo(tp,aux.Stringid(14258627,0)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c14258627.filter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) - else - Duel.SendtoGrave(e:GetHandler(),REASON_RULE) - end -end diff --git a/script/c14261867.lua b/script/c14261867.lua deleted file mode 100644 index 7be0314bc1..0000000000 --- a/script/c14261867.lua +++ /dev/null @@ -1,49 +0,0 @@ ---八つ手サソリ -function c14261867.initial_effect(c) - --turn set - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(14261867,0)) - e1:SetCategory(CATEGORY_POSITION) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetTarget(c14261867.target) - e1:SetOperation(c14261867.operation) - c:RegisterEffect(e1) - --atk up - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(14261867,1)) - e2:SetCategory(CATEGORY_ATKCHANGE) - e2:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_SINGLE) - e2:SetCode(EVENT_PRE_DAMAGE_CALCULATE) - e2:SetCondition(c14261867.atkcon) - e2:SetOperation(c14261867.atkop) - c:RegisterEffect(e2) -end -function c14261867.target(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsCanTurnSet() and c:GetFlagEffect(14261867)==0 end - c:RegisterFlagEffect(14261867,RESET_EVENT+0x1fc0000+RESET_PHASE+PHASE_END,0,1) - Duel.SetOperationInfo(0,CATEGORY_POSITION,c,1,0,0) -end -function c14261867.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - Duel.ChangePosition(c,POS_FACEDOWN_DEFENCE) - end -end -function c14261867.atkcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local bc=c:GetBattleTarget() - return c==Duel.GetAttacker() and bc and bc:GetBattlePosition()==POS_FACEDOWN_DEFENCE -end -function c14261867.atkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetReset(RESET_PHASE+RESET_DAMAGE_CAL) - e1:SetValue(2400) - c:RegisterEffect(e1) - end -end diff --git a/script/c1426714.lua b/script/c1426714.lua deleted file mode 100644 index 8fabf46fc0..0000000000 --- a/script/c1426714.lua +++ /dev/null @@ -1,62 +0,0 @@ ---No.48 シャドー・リッチ -function c1426714.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,3,2) - c:EnableReviveLimit() - --token - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(1426714,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c1426714.spcon) - e1:SetCost(c1426714.spcost) - e1:SetTarget(c1426714.sptg) - e1:SetOperation(c1426714.spop) - c:RegisterEffect(e1) - --cannot be battle target - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EFFECT_CANNOT_BE_BATTLE_TARGET) - e2:SetCondition(c1426714.atkcon) - e2:SetValue(aux.imval1) - c:RegisterEffect(e2) - --atk - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e3:SetCode(EFFECT_UPDATE_ATTACK) - e3:SetRange(LOCATION_MZONE) - e3:SetValue(c1426714.atkval) - c:RegisterEffect(e3) -end -c1426714.xyz_number=48 -function c1426714.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp -end -function c1426714.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c1426714.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsPlayerCanSpecialSummonMonster(tp,1426715,0,0x4011,500,500,1,RACE_FIEND,ATTRIBUTE_DARK) end - Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0) -end -function c1426714.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 - or not Duel.IsPlayerCanSpecialSummonMonster(tp,1426715,0,0x4011,500,500,1,RACE_FIEND,ATTRIBUTE_DARK) then return end - local token=Duel.CreateToken(tp,1426715) - Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP) -end -function c1426714.atkcon(e) - return Duel.IsExistingMatchingCard(Card.IsCode,e:GetHandlerPlayer(),LOCATION_ONFIELD,0,1,nil,1426715) -end -function c1426714.atkval(e,c) - return Duel.GetMatchingGroupCount(Card.IsCode,c:GetControler(),LOCATION_ONFIELD,0,nil,1426715)*500 -end diff --git a/script/c14289852.lua b/script/c14289852.lua deleted file mode 100644 index 0224a48b5c..0000000000 --- a/script/c14289852.lua +++ /dev/null @@ -1,37 +0,0 @@ ---岩投げエリア -function c14289852.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --destroy replace - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_DESTROY_REPLACE) - e2:SetRange(LOCATION_SZONE) - e2:SetCountLimit(1) - e2:SetTarget(c14289852.destg) - e2:SetValue(c14289852.value) - e2:SetOperation(c14289852.desop) - c:RegisterEffect(e2) -end -function c14289852.dfilter(c,tp) - return c:IsControler(tp) and c:IsReason(REASON_BATTLE) -end -function c14289852.repfilter(c) - return c:IsRace(RACE_ROCK) and c:IsAbleToGrave() -end -function c14289852.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return eg:IsExists(c14289852.dfilter,1,nil,tp) - and Duel.IsExistingMatchingCard(c14289852.repfilter,tp,LOCATION_DECK,0,1,nil) end - return Duel.SelectYesNo(tp,aux.Stringid(14289852,0)) -end -function c14289852.value(e,c) - return c:IsControler(e:GetHandlerPlayer()) and c:IsReason(REASON_BATTLE) -end -function c14289852.desop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c14289852.repfilter,tp,LOCATION_DECK,0,1,1,nil) - Duel.SendtoGrave(g,REASON_EFFECT) -end diff --git a/script/c14291024.lua b/script/c14291024.lua deleted file mode 100644 index 37c8dc57e6..0000000000 --- a/script/c14291024.lua +++ /dev/null @@ -1,83 +0,0 @@ ---オプション -function c14291024.initial_effect(c) - c:EnableReviveLimit() - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c14291024.spcon) - c:RegisterEffect(e1) - --spsummon con - local e2=Effect.CreateEffect(c) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_SPSUMMON_CONDITION) - e2:SetValue(c14291024.splimit) - c:RegisterEffect(e2) - --set target - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e3:SetOperation(c14291024.tgop) - c:RegisterEffect(e3) - --atk.def - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetCode(EFFECT_SET_ATTACK_FINAL) - e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e4:SetRange(LOCATION_MZONE) - e4:SetCondition(c14291024.adcon) - e4:SetValue(c14291024.atkval) - c:RegisterEffect(e4) - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_SINGLE) - e5:SetCode(EFFECT_SET_DEFENCE_FINAL) - e5:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e5:SetRange(LOCATION_MZONE) - e5:SetCondition(c14291024.adcon) - e5:SetValue(c14291024.defval) - c:RegisterEffect(e5) - --destroy - local e6=Effect.CreateEffect(c) - e6:SetType(EFFECT_TYPE_SINGLE) - e6:SetCode(EFFECT_SELF_DESTROY) - e6:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e6:SetRange(LOCATION_MZONE) - e6:SetCondition(c14291024.sdcon) - c:RegisterEffect(e6) -end -function c14291024.filter(c) - return c:IsFaceup() and c:IsCode(10992251) -end -function c14291024.spcon(e,c) - if c==nil then return true end - return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c14291024.filter,c:GetControler(),LOCATION_MZONE,0,1,nil) -end -function c14291024.splimit(e,se,sp,st,pos,top) - if bit.band(pos,POS_FACEDOWN)~=0 then return false end - return Duel.IsExistingMatchingCard(c14291024.filter,top,LOCATION_MZONE,0,1,nil) -end -function c14291024.tgop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(14291024,0)) - local g=Duel.SelectMatchingCard(tp,c14291024.filter,tp,LOCATION_MZONE,0,1,1,nil) - Duel.HintSelection(g) - c:SetCardTarget(g:GetFirst()) - c:RegisterFlagEffect(14291024,RESET_EVENT+0x1ff0000,0,1) -end -function c14291024.adcon(e) - return e:GetHandler():GetFirstCardTarget()~=nil -end -function c14291024.atkval(e,c) - return c:GetFirstCardTarget():GetAttack() -end -function c14291024.defval(e,c) - return c:GetFirstCardTarget():GetDefence() -end -function c14291024.sdcon(e) - return e:GetHandler():GetFirstCardTarget()==nil and e:GetHandler():GetFlagEffect(14291024)~=0 -end diff --git a/script/c14306092.lua b/script/c14306092.lua deleted file mode 100644 index 0b9a4af1c3..0000000000 --- a/script/c14306092.lua +++ /dev/null @@ -1,42 +0,0 @@ ---牙鮫帝シャーク・カイゼル -function c14306092.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,3,3,nil,nil,5) - c:EnableReviveLimit() - --counter - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(14306092,0)) - e1:SetCategory(CATEGORY_COUNTER) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCost(c14306092.ctcost) - e1:SetOperation(c14306092.ctop) - c:RegisterEffect(e1) - --atkup - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetCondition(c14306092.atkcon) - e2:SetValue(c14306092.atkval) - c:RegisterEffect(e2) -end -function c14306092.ctcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c14306092.ctop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - c:AddCounter(0x2e,1) - end -end -function c14306092.atkcon(e) - local ph=Duel.GetCurrentPhase() - return (ph==PHASE_DAMAGE or ph==PHASE_DAMAGE_CAL) and (Duel.GetAttacker()==e:GetHandler() or Duel.GetAttackTarget()==e:GetHandler()) -end -function c14306092.atkval(e,c) - return c:GetCounter(0x2e)*1000 -end diff --git a/script/c14309486.lua b/script/c14309486.lua deleted file mode 100644 index 7218b05b69..0000000000 --- a/script/c14309486.lua +++ /dev/null @@ -1,82 +0,0 @@ ---コアキメイル・オーバードーズ -function c14309486.initial_effect(c) - --cost - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c14309486.mtcon) - e1:SetOperation(c14309486.mtop) - c:RegisterEffect(e1) - --disable spsummon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(14309486,3)) - e2:SetCategory(CATEGORY_DISABLE_SUMMON+CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EVENT_SUMMON) - e2:SetCondition(c14309486.condition) - e2:SetCost(c14309486.cost) - e2:SetTarget(c14309486.target) - e2:SetOperation(c14309486.operation) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EVENT_FLIP_SUMMON) - c:RegisterEffect(e3) - local e4=e2:Clone() - e4:SetCode(EVENT_SPSUMMON) - c:RegisterEffect(e4) -end -function c14309486.mtcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c14309486.cfilter1(c) - return c:IsCode(36623431) and c:IsAbleToGraveAsCost() -end -function c14309486.cfilter2(c) - return c:IsType(TYPE_MONSTER) and c:IsRace(RACE_ROCK) and not c:IsPublic() -end -function c14309486.mtop(e,tp) - local g1=Duel.GetMatchingGroup(c14309486.cfilter1,tp,LOCATION_HAND,0,nil) - local g2=Duel.GetMatchingGroup(c14309486.cfilter2,tp,LOCATION_HAND,0,nil) - local select=2 - if g1:GetCount()>0 and g2:GetCount()>0 then - select=Duel.SelectOption(tp,aux.Stringid(14309486,0),aux.Stringid(14309486,1),aux.Stringid(14309486,2)) - elseif g1:GetCount()>0 then - select=Duel.SelectOption(tp,aux.Stringid(14309486,0),aux.Stringid(14309486,2)) - if select==1 then select=2 end - elseif g2:GetCount()>0 then - select=Duel.SelectOption(tp,aux.Stringid(14309486,1),aux.Stringid(14309486,2)) - select=select+1 - end - if select==0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=g1:Select(tp,1,1,nil) - Duel.SendtoGrave(g,REASON_COST) - elseif select==1 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) - local g=g2:Select(tp,1,1,nil) - Duel.ConfirmCards(1-tp,g) - Duel.ShuffleHand(tp) - else - Duel.Destroy(e:GetHandler(),REASON_RULE) - end -end -function c14309486.condition(e,tp,eg,ep,ev,re,r,rp) - return tp~=ep and Duel.GetCurrentChain()==0 -end -function c14309486.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end -function c14309486.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DISABLE_SUMMON,eg,eg:GetCount(),0,0) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,eg:GetCount(),0,0) -end -function c14309486.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateSummon(eg) - Duel.Destroy(eg,REASON_EFFECT) -end diff --git a/script/c14315573.lua b/script/c14315573.lua deleted file mode 100644 index 4a28a06427..0000000000 --- a/script/c14315573.lua +++ /dev/null @@ -1,27 +0,0 @@ ---攻撃の無力化 -function c14315573.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetCondition(c14315573.condition) - e1:SetTarget(c14315573.target) - e1:SetOperation(c14315573.activate) - c:RegisterEffect(e1) -end -function c14315573.condition(e,tp,eg,ep,ev,re,r,rp) - return tp~=Duel.GetTurnPlayer() -end -function c14315573.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local tg=Duel.GetAttacker() - if chkc then return chkc==tg end - if chk==0 then return tg:IsOnField() and tg:IsCanBeEffectTarget(e) end - Duel.SetTargetCard(tg) -end -function c14315573.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetAttacker() - if tc:IsRelateToEffect(e) and Duel.NegateAttack() then - Duel.SkipPhase(1-tp,PHASE_BATTLE,RESET_PHASE+PHASE_BATTLE,1) - end -end diff --git a/script/c14318794.lua b/script/c14318794.lua deleted file mode 100644 index 245d71b175..0000000000 --- a/script/c14318794.lua +++ /dev/null @@ -1,60 +0,0 @@ ---生命吸収装置 -function c14318794.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(TIMING_STANDBY_PHASE,0) - c:RegisterEffect(e1) - --recover - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(14318794,0)) - e2:SetCategory(CATEGORY_RECOVER) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetRange(LOCATION_SZONE) - e2:SetCountLimit(1) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) - e2:SetCondition(c14318794.reccon) - e2:SetTarget(c14318794.rectg) - e2:SetOperation(c14318794.recop) - c:RegisterEffect(e2) - if not c14318794.global_check then - c14318794.global_check=true - c14318794[0]=0 - c14318794[1]=0 - local ge1=Effect.CreateEffect(c) - ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - ge1:SetCode(EVENT_PAY_LPCOST) - ge1:SetOperation(c14318794.checkop) - Duel.RegisterEffect(ge1,0) - local ge2=Effect.CreateEffect(c) - ge2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - ge2:SetCode(EVENT_PHASE_START+PHASE_DRAW) - ge2:SetOperation(c14318794.clear) - Duel.RegisterEffect(ge2,0) - end -end -function c14318794.checkop(e,tp,eg,ep,ev,re,r,rp) - if ep==Duel.GetTurnPlayer() then - c14318794[ep]=c14318794[ep]+ev - end -end -function c14318794.clear(e,tp,eg,ep,ev,re,r,rp) - c14318794[2]=c14318794[Duel.GetTurnPlayer()] - c14318794[Duel.GetTurnPlayer()]=0 -end -function c14318794.reccon(e,tp,eg,ep,ev,re,r,rp) - return tp==Duel.GetTurnPlayer() -end -function c14318794.rectg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(c14318794[2]/2) - Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,c14318794[2]/2) -end -function c14318794.recop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Recover(p,d,REASON_EFFECT) -end diff --git a/script/c14342283.lua b/script/c14342283.lua deleted file mode 100644 index 52bb8b69c2..0000000000 --- a/script/c14342283.lua +++ /dev/null @@ -1,31 +0,0 @@ ---暴走闘君 -function c14342283.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --atk up - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e2:SetTarget(c14342283.tg) - e2:SetValue(1000) - c:RegisterEffect(e2) - --indes - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e3:SetRange(LOCATION_SZONE) - e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e3:SetTarget(c14342283.tg) - e3:SetValue(1) - c:RegisterEffect(e3) -end -function c14342283.tg(e,c) - return c:IsType(TYPE_TOKEN) and c:IsAttackPos() -end diff --git a/script/c1434352.lua b/script/c1434352.lua deleted file mode 100644 index 49eb80fe1d..0000000000 --- a/script/c1434352.lua +++ /dev/null @@ -1,14 +0,0 @@ ---カオス・ネクロマンサー -function c1434352.initial_effect(c) - --attack - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetValue(c1434352.atkval) - c:RegisterEffect(e1) -end -function c1434352.atkval(e,c) - return Duel.GetMatchingGroupCount(Card.IsType,c:GetControler(),LOCATION_GRAVE,0,nil,TYPE_MONSTER)*300 -end diff --git a/script/c14344682.lua b/script/c14344682.lua deleted file mode 100644 index f3026c1c4b..0000000000 --- a/script/c14344682.lua +++ /dev/null @@ -1,27 +0,0 @@ ---サムライソード・バロン -function c14344682.initial_effect(c) - --pos change - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(14344682,0)) - e1:SetCategory(CATEGORY_POSITION) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetTarget(c14344682.target) - e1:SetOperation(c14344682.operation) - c:RegisterEffect(e1) -end -function c14344682.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsDefencePos() end - if chk==0 then return Duel.IsExistingTarget(Card.IsDefencePos,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DEFENCE) - local g=Duel.SelectTarget(tp,Card.IsDefencePos,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0) -end -function c14344682.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsDefencePos() then - Duel.ChangePosition(tc,POS_FACEUP_ATTACK) - end -end diff --git a/script/c1435851.lua b/script/c1435851.lua deleted file mode 100644 index ae64b9b65e..0000000000 --- a/script/c1435851.lua +++ /dev/null @@ -1,50 +0,0 @@ ---ドラゴンの秘宝 -function c1435851.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c1435851.target) - e1:SetOperation(c1435851.operation) - c:RegisterEffect(e1) - --atk up - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(300) - c:RegisterEffect(e2) - --def up - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_EQUIP) - e3:SetCode(EFFECT_UPDATE_DEFENCE) - e3:SetValue(300) - c:RegisterEffect(e3) - --equip limit - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetCode(EFFECT_EQUIP_LIMIT) - e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e4:SetValue(c1435851.eqlimit) - c:RegisterEffect(e4) -end -function c1435851.eqlimit(e,c) - return c:IsRace(RACE_DRAGON) -end -function c1435851.filter(c) - return c:IsFaceup() and c:IsRace(RACE_DRAGON) -end -function c1435851.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c1435851.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c1435851.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c1435851.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c1435851.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,e:GetHandler(),tc) - end -end diff --git a/script/c14391920.lua b/script/c14391920.lua deleted file mode 100644 index ecabc1d219..0000000000 --- a/script/c14391920.lua +++ /dev/null @@ -1,27 +0,0 @@ ---ヘル・テンペスト -function c14391920.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_REMOVE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_BATTLE_DAMAGE) - e1:SetCondition(c14391920.condition) - e1:SetTarget(c14391920.target) - e1:SetOperation(c14391920.activate) - c:RegisterEffect(e1) -end -function c14391920.condition(e,tp,eg,ep,ev,re,r,rp) - return ep==tp and ev>=3000 -end -function c14391920.filter(c) - return c:IsType(TYPE_MONSTER) and c:IsAbleToRemove() -end -function c14391920.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c14391920.filter,tp,LOCATION_DECK+LOCATION_GRAVE,LOCATION_DECK+LOCATION_GRAVE,1,nil) end - local sg=Duel.GetMatchingGroup(c14391920.filter,tp,LOCATION_DECK+LOCATION_GRAVE,LOCATION_DECK+LOCATION_GRAVE,nil) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,sg,sg:GetCount(),0,0) -end -function c14391920.activate(e,tp,eg,ep,ev,re,r,rp) - local sg=Duel.GetMatchingGroup(c14391920.filter,tp,LOCATION_DECK+LOCATION_GRAVE,LOCATION_DECK+LOCATION_GRAVE,nil) - Duel.Remove(sg,POS_FACEUP,REASON_EFFECT) -end diff --git a/script/c14430063.lua b/script/c14430063.lua deleted file mode 100644 index a2c2ac1840..0000000000 --- a/script/c14430063.lua +++ /dev/null @@ -1,31 +0,0 @@ ---インターセプト・デーモン -function c14430063.initial_effect(c) - --damage - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(14430063,0)) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c14430063.damcon) - e1:SetTarget(c14430063.damtg) - e1:SetOperation(c14430063.damop) - c:RegisterEffect(e1) -end -function c14430063.damcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPosition(POS_FACEUP_ATTACK) and Duel.GetTurnPlayer()~=tp -end -function c14430063.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsRelateToEffect(e) end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(500) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,500) -end -function c14430063.damop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsPosition(POS_FACEUP_ATTACK) and c:IsRelateToEffect(e) then - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) - end -end diff --git a/script/c14462257.lua b/script/c14462257.lua deleted file mode 100644 index 0a71221c48..0000000000 --- a/script/c14462257.lua +++ /dev/null @@ -1,45 +0,0 @@ ---氷の女王 -function c14462257.initial_effect(c) - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_GRAVE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(aux.FALSE) - c:RegisterEffect(e1) - --salvage - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(14462257,0)) - e2:SetCategory(CATEGORY_TOHAND) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetCondition(c14462257.condition) - e2:SetTarget(c14462257.target) - e2:SetOperation(c14462257.operation) - c:RegisterEffect(e2) -end -function c14462257.condition(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsReason(REASON_DESTROY) and c:IsPreviousLocation(LOCATION_ONFIELD) - and c:IsPreviousPosition(POS_FACEUP) and c:GetPreviousControler()==tp - and Duel.IsExistingMatchingCard(Card.IsRace,tp,LOCATION_GRAVE,0,3,nil,RACE_SPELLCASTER) -end -function c14462257.filter(c) - return c:IsType(TYPE_SPELL) and c:IsAbleToHand() -end -function c14462257.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c14462257.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c14462257.filter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c14462257.filter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c14462257.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end diff --git a/script/c14464864.lua b/script/c14464864.lua deleted file mode 100644 index 3831e97df6..0000000000 --- a/script/c14464864.lua +++ /dev/null @@ -1,27 +0,0 @@ ---神の桎梏グレイプニル -function c14464864.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetHintTiming(0,TIMING_END_PHASE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c14464864.target) - e1:SetOperation(c14464864.activate) - c:RegisterEffect(e1) -end -function c14464864.filter(c) - return c:IsSetCard(0x42) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() -end -function c14464864.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c14464864.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c14464864.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c14464864.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c14466224.lua b/script/c14466224.lua deleted file mode 100644 index 241295da4a..0000000000 --- a/script/c14466224.lua +++ /dev/null @@ -1,103 +0,0 @@ ---The アトモスフィア -function c14466224.initial_effect(c) - c:EnableReviveLimit() - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c14466224.spcon) - e1:SetOperation(c14466224.spop) - c:RegisterEffect(e1) - --equip - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(14466224,0)) - e2:SetCategory(CATEGORY_EQUIP) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCondition(c14466224.eqcon) - e2:SetTarget(c14466224.eqtg) - e2:SetOperation(c14466224.eqop) - c:RegisterEffect(e2) -end -function c14466224.gfilter(c) - return c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost() -end -function c14466224.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.GetLocationCount(tp,LOCATION_MZONE)>-2 - and Duel.IsExistingMatchingCard(Card.IsAbleToRemoveAsCost,tp,LOCATION_MZONE,0,2,nil) - and Duel.IsExistingMatchingCard(c14466224.gfilter,tp,LOCATION_GRAVE,0,1,nil) -end -function c14466224.spop(e,tp,eg,ep,ev,re,r,rp,c) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g1=Duel.SelectMatchingCard(tp,Card.IsAbleToRemoveAsCost,tp,LOCATION_MZONE,0,2,2,nil) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g2=Duel.SelectMatchingCard(tp,c14466224.gfilter,tp,LOCATION_GRAVE,0,1,1,nil) - g1:Merge(g2) - Duel.Remove(g1,POS_FACEUP,REASON_COST) -end -function c14466224.eqcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local ec=e:GetLabelObject() - return ec==nil or ec:GetFlagEffect(14466224)==0 -end -function c14466224.filter(c) - return c:IsFaceup() and c:IsAbleToChangeControler() -end -function c14466224.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c14466224.filter(chkc) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingTarget(c14466224.filter,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local g=Duel.SelectTarget(tp,c14466224.filter,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0) -end -function c14466224.eqlimit(e,c) - return e:GetOwner()==c -end -function c14466224.eqop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - if c:IsFaceup() and c:IsRelateToEffect(e) then - local atk=tc:GetTextAttack() - local def=tc:GetTextDefence() - if atk<0 then atk=0 end - if def<0 then def=0 end - if not Duel.Equip(tp,tc,c,false) then return end - --Add Equip limit - tc:RegisterFlagEffect(14466224,RESET_EVENT+0x1fe0000,0,0) - e:SetLabelObject(tc) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_COPY_INHERIT+EFFECT_FLAG_OWNER_RELATE) - e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(c14466224.eqlimit) - tc:RegisterEffect(e1) - if atk>0 then - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_OWNER_RELATE) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetReset(RESET_EVENT+0x1fe0000) - e2:SetValue(atk) - tc:RegisterEffect(e2) - end - if def>0 then - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_EQUIP) - e3:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_OWNER_RELATE) - e3:SetCode(EFFECT_UPDATE_DEFENCE) - e3:SetReset(RESET_EVENT+0x1fe0000) - e3:SetValue(def) - tc:RegisterEffect(e3) - end - else Duel.SendtoGrave(tc,REASON_EFFECT) end - end -end diff --git a/script/c14469229.lua b/script/c14469229.lua deleted file mode 100644 index 8c1311ef07..0000000000 --- a/script/c14469229.lua +++ /dev/null @@ -1,80 +0,0 @@ ---宝玉の守護者 -function c14469229.initial_effect(c) - --pendulum summon - aux.AddPendulumProcedure(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --replace - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EFFECT_DESTROY_REPLACE) - e2:SetRange(LOCATION_PZONE) - e2:SetCountLimit(1) - e2:SetTarget(c14469229.indtg) - e2:SetValue(c14469229.indval) - c:RegisterEffect(e2) - --double - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(14469229,0)) - e3:SetType(EFFECT_TYPE_QUICK_O) - e3:SetCode(EVENT_PRE_DAMAGE_CALCULATE) - e3:SetRange(LOCATION_MZONE+LOCATION_HAND) - e3:SetCost(c14469229.cost) - e3:SetTarget(c14469229.target) - e3:SetOperation(c14469229.operation) - c:RegisterEffect(e3) -end -function c14469229.indfilter(c,tp) - return c:IsFaceup() and c:IsControler(tp) and c:IsOnField() and c:IsReason(REASON_EFFECT) - and (c:IsSetCard(0x1034) or (c:IsLocation(LOCATION_MZONE) and (c:IsCode(79407975) or c:IsCode(79856792)))) -end -function c14469229.indtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return eg:IsExists(c14469229.indfilter,1,nil,tp) end - return true -end -function c14469229.indval(e,c) - return c14469229.indfilter(c,e:GetHandlerPlayer()) -end -function c14469229.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end -function c14469229.target(e,tp,eg,ep,ev,re,r,rp,chk) - local a=Duel.GetAttacker() - local d=Duel.GetAttackTarget() - if a:IsControler(1-tp) then a=d end - if chk==0 then return d and a:IsSetCard(0x1034) end - e:SetLabelObject(a) -end -function c14469229.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetLabelObject() - if tc:IsRelateToBattle() and tc:IsFaceup() then - local atk=tc:GetBaseAttack() - local def=tc:GetBaseDefence() - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetValue(atk*2) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_DAMAGE_CAL) - tc:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_SET_DEFENCE_FINAL) - e2:SetValue(def*2) - tc:RegisterEffect(e2) - local e3=Effect.CreateEffect(e:GetHandler()) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e3:SetCode(EVENT_DAMAGE_STEP_END) - e3:SetOperation(c14469229.desop) - e3:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_DAMAGE) - tc:RegisterEffect(e3) - end -end -function c14469229.desop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToBattle() and c:IsFaceup() then - Duel.Destroy(c,REASON_EFFECT) - end -end diff --git a/script/c14472500.lua b/script/c14472500.lua deleted file mode 100644 index d95b628847..0000000000 --- a/script/c14472500.lua +++ /dev/null @@ -1,31 +0,0 @@ ---ゴキポン -function c14472500.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(14472500,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetCondition(c14472500.condition) - e1:SetTarget(c14472500.target) - e1:SetOperation(c14472500.operation) - c:RegisterEffect(e1) -end -function c14472500.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) -end -function c14472500.filter(c) - return c:IsAttackBelow(1500) and c:IsRace(RACE_INSECT) and c:IsAbleToHand() -end -function c14472500.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c14472500.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c14472500.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c14472500.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c14506878.lua b/script/c14506878.lua deleted file mode 100644 index ef3fbea12d..0000000000 --- a/script/c14506878.lua +++ /dev/null @@ -1,29 +0,0 @@ ---ダッカー -function c14506878.initial_effect(c) - --flip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(14506878,0)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP) - e1:SetTarget(c14506878.thtg) - e1:SetOperation(c14506878.thop) - c:RegisterEffect(e1) -end -function c14506878.filter(c) - return c:GetLevel()==4 and c:IsAbleToHand() -end -function c14506878.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c14506878.filter(chkc) end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c14506878.filter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0) -end -function c14506878.thop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end diff --git a/script/c14507213.lua b/script/c14507213.lua deleted file mode 100644 index 6e3e1d8c33..0000000000 --- a/script/c14507213.lua +++ /dev/null @@ -1,41 +0,0 @@ ---シンクロ・マテリアル -function c14507213.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c14507213.cost) - e1:SetTarget(c14507213.target) - e1:SetOperation(c14507213.activate) - c:RegisterEffect(e1) -end -function c14507213.filter(c) - return c:IsFaceup() and c:IsCanBeSynchroMaterial() -end -function c14507213.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_BATTLE_PHASE)==0 end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_BP) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) - e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function c14507213.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c14507213.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c14507213.filter,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c14507213.filter,tp,0,LOCATION_MZONE,1,1,nil) -end -function c14507213.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SYNCHRO_MATERIAL) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - end -end diff --git a/script/c14513016.lua b/script/c14513016.lua deleted file mode 100644 index f8c17620b0..0000000000 --- a/script/c14513016.lua +++ /dev/null @@ -1,21 +0,0 @@ ---霊獣使いの長老 -function c14513016.initial_effect(c) - c:SetSPSummonOnce(14513016) - --extra summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetOperation(c14513016.sumop) - c:RegisterEffect(e1) -end -function c14513016.sumop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetFlagEffect(tp,14513016)~=0 then return end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetTargetRange(LOCATION_HAND+LOCATION_MZONE,0) - e1:SetCode(EFFECT_EXTRA_SUMMON_COUNT) - e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0xb5)) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) - Duel.RegisterFlagEffect(tp,14513016,RESET_PHASE+PHASE_END,0,1) -end diff --git a/script/c14536035.lua b/script/c14536035.lua deleted file mode 100644 index 10eec1b400..0000000000 --- a/script/c14536035.lua +++ /dev/null @@ -1,59 +0,0 @@ ---ダーク・グレファー -function c14536035.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(14536035,0)) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c14536035.spcon) - e1:SetOperation(c14536035.spop) - c:RegisterEffect(e1) - --to grave - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(14536035,1)) - e2:SetCategory(CATEGORY_TOGRAVE) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetCountLimit(1) - e2:SetRange(LOCATION_MZONE) - e2:SetCost(c14536035.sgcost) - e2:SetTarget(c14536035.sgtg) - e2:SetOperation(c14536035.sgop) - c:RegisterEffect(e2) -end -function c14536035.spfilter(c) - return c:GetLevel()>=5 and c:IsAttribute(ATTRIBUTE_DARK) -end -function c14536035.spcon(e,c) - if c==nil then return true end - return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and - Duel.IsExistingMatchingCard(c14536035.spfilter,c:GetControler(),LOCATION_HAND,0,1,c) -end -function c14536035.spop(e,tp,eg,ep,ev,re,r,rp,c) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) - local g=Duel.SelectMatchingCard(tp,c14536035.spfilter,tp,LOCATION_HAND,0,1,1,c) - Duel.SendtoGrave(g,REASON_DISCARD+REASON_COST) -end -function c14536035.costfilter(c) - return c:IsAttribute(ATTRIBUTE_DARK) and c:IsDiscardable() -end -function c14536035.sgcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c14536035.costfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,c14536035.costfilter,1,1,REASON_COST+REASON_DISCARD) -end -function c14536035.filter(c) - return c:IsAttribute(ATTRIBUTE_DARK) and c:IsAbleToGrave() -end -function c14536035.sgtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local c=e:GetHandler() - if chk==0 then return Duel.IsExistingMatchingCard(c14536035.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) -end -function c14536035.sgop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c14536035.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoGrave(g,REASON_EFFECT) - end -end diff --git a/script/c14550855.lua b/script/c14550855.lua deleted file mode 100644 index c5bb48f8a1..0000000000 --- a/script/c14550855.lua +++ /dev/null @@ -1,31 +0,0 @@ ---インフェルニティ・インフェルノ -function c14550855.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_HANDES+CATEGORY_TOGRAVE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c14550855.target) - e1:SetOperation(c14550855.activate) - c:RegisterEffect(e1) -end -function c14550855.filter(c) - return c:IsSetCard(0xb) and c:IsAbleToGrave() -end -function c14550855.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)>0 - and Duel.IsExistingMatchingCard(c14550855.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1) - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) -end -function c14550855.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)==0 then return end - local ac=Duel.GetMatchingGroupCount(c14550855.filter,tp,LOCATION_DECK,0,nil) - if ac==0 then return end - if ac>2 then ac=2 end - local ct=Duel.DiscardHand(tp,aux.TRUE,1,ac,REASON_DISCARD+REASON_EFFECT) - Duel.BreakEffect() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c14550855.filter,tp,LOCATION_DECK,0,1,ct,nil) - Duel.SendtoGrave(g,REASON_EFFECT) -end diff --git a/script/c14553285.lua b/script/c14553285.lua deleted file mode 100644 index 78650e2c56..0000000000 --- a/script/c14553285.lua +++ /dev/null @@ -1,93 +0,0 @@ ---アーカナイト・マジシャン/バスター -function c14553285.initial_effect(c) - c:EnableReviveLimit() - c:EnableCounterPermit(0x3001) - --Cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(aux.FALSE) - c:RegisterEffect(e1) - --counter - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(14553285,0)) - e2:SetCategory(CATEGORY_COUNTER) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetTarget(c14553285.addct) - e2:SetOperation(c14553285.addc) - c:RegisterEffect(e2) - --attackup - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_UPDATE_ATTACK) - e3:SetValue(c14553285.attackup) - c:RegisterEffect(e3) - --destroy - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(14553285,1)) - e4:SetCategory(CATEGORY_DESTROY) - e4:SetType(EFFECT_TYPE_IGNITION) - e4:SetRange(LOCATION_MZONE) - e4:SetCost(c14553285.descost) - e4:SetTarget(c14553285.destg) - e4:SetOperation(c14553285.desop) - c:RegisterEffect(e4) - --Special summon - local e5=Effect.CreateEffect(c) - e5:SetDescription(aux.Stringid(14553285,2)) - e5:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE) - e5:SetCategory(CATEGORY_SPECIAL_SUMMON) - e5:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e5:SetCode(EVENT_LEAVE_FIELD) - e5:SetCondition(c14553285.spcon) - e5:SetTarget(c14553285.sptg) - e5:SetOperation(c14553285.spop) - c:RegisterEffect(e5) -end -function c14553285.addct(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,2,0,0x3001) -end -function c14553285.addc(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - e:GetHandler():AddCounter(0x3001,2) - end -end -function c14553285.attackup(e,c) - return c:GetCounter(0x3001)*1000 -end -function c14553285.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsCanRemoveCounter(tp,0x3001,2,REASON_COST) end - e:GetHandler():RemoveCounter(tp,0x3001,2,REASON_COST) -end -function c14553285.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDestructable,tp,0,LOCATION_ONFIELD,1,nil) end - local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,0,LOCATION_ONFIELD,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c14553285.desop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,0,LOCATION_ONFIELD,nil) - Duel.Destroy(g,REASON_EFFECT) -end -function c14553285.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsReason(REASON_DESTROY) -end -function c14553285.spfilter(c,e,tp) - return c:IsCode(31924889) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c14553285.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c14553285.spfilter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c14553285.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c14553285.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c14553285.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c14568951.lua b/script/c14568951.lua deleted file mode 100644 index 4ffd19808b..0000000000 --- a/script/c14568951.lua +++ /dev/null @@ -1,64 +0,0 @@ ---青竜の忍者 -function c14568951.initial_effect(c) - --negate - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(14568951,0)) - e1:SetCategory(CATEGORY_DISABLE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,0x1c0) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCost(c14568951.cost) - e1:SetTarget(c14568951.target) - e1:SetOperation(c14568951.operation) - c:RegisterEffect(e1) -end -function c14568951.cfilter1(c) - return c:IsSetCard(0x2b) and c:IsType(TYPE_MONSTER) and c:IsDiscardable() -end -function c14568951.cfilter2(c) - return c:IsSetCard(0x61) and c:IsDiscardable() -end -function c14568951.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c14568951.cfilter1,tp,LOCATION_HAND,0,1,nil) - and Duel.IsExistingMatchingCard(c14568951.cfilter2,tp,LOCATION_HAND,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) - local g1=Duel.SelectMatchingCard(tp,c14568951.cfilter1,tp,LOCATION_HAND,0,1,1,nil) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) - local g2=Duel.SelectMatchingCard(tp,c14568951.cfilter2,tp,LOCATION_HAND,0,1,1,nil) - g1:Merge(g2) - Duel.SendtoGrave(g1,REASON_COST+REASON_DISCARD) -end -function c14568951.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end - if chk==0 then return e:GetHandler():IsAttackPos() - and Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0) -end -function c14568951.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - Duel.NegateRelatedChain(tc,RESET_TURN_SET) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetValue(RESET_TURN_SET) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - tc:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_CANNOT_ATTACK) - e3:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - tc:RegisterEffect(e3) - end -end diff --git a/script/c14613029.lua b/script/c14613029.lua deleted file mode 100644 index 297cee1e28..0000000000 --- a/script/c14613029.lua +++ /dev/null @@ -1,38 +0,0 @@ ---ブレンD -function c14613029.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCondition(c14613029.condition) - e1:SetTarget(c14613029.target) - e1:SetOperation(c14613029.operation) - c:RegisterEffect(e1) -end -function c14613029.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x26) -end -function c14613029.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c14613029.cfilter,tp,LOCATION_MZONE,0,2,nil) -end -function c14613029.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and chkc:IsDestructable() end - if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,0,LOCATION_ONFIELD,2,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPPO) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,0,LOCATION_ONFIELD,2,2,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c14613029.operation(e,tp,eg,ep,ev,re,r,rp,chk) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local sg=g:Filter(Card.IsRelateToEffect,nil,e) - if sg:GetCount()==0 then return - elseif sg:GetCount()==1 then - Duel.Destroy(sg,REASON_EFFECT) - else - Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_DESTROY) - local dg=sg:Select(1-tp,1,1,nil) - Duel.Destroy(dg,REASON_EFFECT) - end -end diff --git a/script/c14618326.lua b/script/c14618326.lua deleted file mode 100644 index 5a70d15b3c..0000000000 --- a/script/c14618326.lua +++ /dev/null @@ -1,31 +0,0 @@ ---赤い忍者 -function c14618326.initial_effect(c) - --flip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(14618326,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP) - e1:SetTarget(c14618326.target) - e1:SetOperation(c14618326.operation) - c:RegisterEffect(e1) -end -function c14618326.filter(c) - return c:IsType(TYPE_TRAP) or (c:IsFacedown() and c:IsLocation(LOCATION_SZONE) and c:GetSequence()~=5) -end -function c14618326.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and c14618326.filter(chkc) end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c14618326.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - if g:GetCount()>0 and g:GetFirst():IsFaceup() then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) - end -end -function c14618326.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - if tc:IsFacedown() then Duel.ConfirmCards(tp,tc) end - if tc:IsType(TYPE_TRAP) then Duel.Destroy(tc,REASON_EFFECT) end - end -end \ No newline at end of file diff --git a/script/c14624296.lua b/script/c14624296.lua deleted file mode 100644 index 9751645926..0000000000 --- a/script/c14624296.lua +++ /dev/null @@ -1,72 +0,0 @@ ---超重武者装留ダブル・ホーン -function c14624296.initial_effect(c) - --equip - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_HAND+LOCATION_MZONE) - e1:SetTarget(c14624296.eqtg) - e1:SetOperation(c14624296.eqop) - c:RegisterEffect(e1) -end -function c14624296.eqfilter(c) - return c:IsFaceup() and c:IsSetCard(0x9a) -end -function c14624296.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c14624296.eqfilter(chkc) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingTarget(c14624296.eqfilter,tp,LOCATION_MZONE,0,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c14624296.eqfilter,tp,LOCATION_MZONE,0,1,1,e:GetHandler()) -end -function c14624296.eqop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) then return end - if c:IsLocation(LOCATION_MZONE) and c:IsFacedown() then return end - local tc=Duel.GetFirstTarget() - if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or tc:GetControler()~=tp or tc:IsFacedown() or not tc:IsRelateToEffect(e) then - Duel.SendtoGrave(c,REASON_EFFECT) - return - end - Duel.Equip(tp,c,tc,true) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(c14624296.eqlimit) - e1:SetLabelObject(tc) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_EXTRA_ATTACK) - e2:SetReset(RESET_EVENT+0x1fe0000) - e2:SetValue(1) - c:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_SZONE) - e3:SetCountLimit(1,14624296) - e3:SetTarget(c14624296.sptg) - e3:SetOperation(c14624296.spop) - e3:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e3) -end -function c14624296.eqlimit(e,c) - return c==e:GetLabelObject() -end -function c14624296.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c14624296.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) then return end - if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then - elseif Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then - Duel.SendtoGrave(c,REASON_EFFECT) - end -end diff --git a/script/c14644902.lua b/script/c14644902.lua deleted file mode 100644 index 03801b3b33..0000000000 --- a/script/c14644902.lua +++ /dev/null @@ -1,47 +0,0 @@ ---幻想召喚師 -function c14644902.initial_effect(c) - --flip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(14644902,0)) - e1:SetCategory(CATEGORY_RELEASE+CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP) - e1:SetTarget(c14644902.target) - e1:SetOperation(c14644902.operation) - c:RegisterEffect(e1) -end -function c14644902.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function c14644902.rfilter(c,e) - return c:IsReleasableByEffect() and not c:IsImmuneToEffect(e) -end -function c14644902.filter(c,e,tp) - return c:IsType(TYPE_FUSION) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c14644902.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local rg=Duel.SelectReleaseGroup(tp,c14644902.rfilter,1,1,e:GetHandler(),e) - if Duel.Release(rg,REASON_EFFECT)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=Duel.SelectMatchingCard(tp,c14644902.filter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp) - if sg:GetCount()>0 then - Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetCondition(c14644902.descon) - e1:SetOperation(c14644902.desop) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e1:SetCountLimit(1) - sg:GetFirst():RegisterEffect(e1) - end - end -end -function c14644902.descon(e,tp,eg,ep,ev,re,r,rp) - return not e:GetHandler():IsHasEffect(66235877) -end -function c14644902.desop(e,tp,eg,ep,ev,re,r,rp) - Duel.Destroy(e:GetHandler(),REASON_EFFECT) -end diff --git a/script/c14677495.lua b/script/c14677495.lua deleted file mode 100644 index 1bb7751ba5..0000000000 --- a/script/c14677495.lua +++ /dev/null @@ -1,61 +0,0 @@ ---極星獣タングニョースト -function c14677495.initial_effect(c) - --special summon(hand) - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(14677495,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetRange(LOCATION_HAND) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetCondition(c14677495.spcon1) - e1:SetTarget(c14677495.sptg1) - e1:SetOperation(c14677495.spop1) - c:RegisterEffect(e1) - --spsummon2 - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(14677495,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e2:SetCode(EVENT_CHANGE_POS) - e2:SetCountLimit(1) - e2:SetCondition(c14677495.spcon2) - e2:SetTarget(c14677495.sptg2) - e2:SetOperation(c14677495.spop2) - c:RegisterEffect(e2) -end -function c14677495.cfilter(c,tp) - return c:IsLocation(LOCATION_GRAVE) and c:IsReason(REASON_BATTLE) and c:GetPreviousControler()==tp -end -function c14677495.spcon1(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c14677495.cfilter,1,nil,tp) -end -function c14677495.sptg1(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c14677495.spop1(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP) - end -end -function c14677495.spcon2(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetPosition()==POS_FACEUP_ATTACK and e:GetHandler():GetPreviousPosition()>0x3 -end -function c14677495.filter(c,e,tp) - return c:IsSetCard(0x6042) and c:GetCode()~=14677495 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c14677495.sptg2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c14677495.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c14677495.spop2(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c14677495.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENCE) - end -end diff --git a/script/c14702066.lua b/script/c14702066.lua deleted file mode 100644 index 6a8fc6bd06..0000000000 --- a/script/c14702066.lua +++ /dev/null @@ -1,29 +0,0 @@ ---メガキャノン・ソルジャー -function c14702066.initial_effect(c) - --damage - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(14702066,0)) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c14702066.cost) - e1:SetTarget(c14702066.target) - e1:SetOperation(c14702066.operation) - c:RegisterEffect(e1) -end -function c14702066.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,nil,2,nil) end - local sg=Duel.SelectReleaseGroup(tp,nil,2,2,nil) - Duel.Release(sg,REASON_COST) -end -function c14702066.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(1500) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,1500) -end -function c14702066.operation(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c14729426.lua b/script/c14729426.lua deleted file mode 100644 index 4889b0b9d2..0000000000 --- a/script/c14729426.lua +++ /dev/null @@ -1,43 +0,0 @@ ---惑星からの物体A -function c14729426.initial_effect(c) - --return to hand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(14729426,0)) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_BATTLE_START) - e1:SetOperation(c14729426.operation) - c:RegisterEffect(e1) -end -function c14729426.operation(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler()==Duel.GetAttackTarget() and e:GetHandler():IsAttackPos() then - local a=Duel.GetAttacker() - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetDescription(aux.Stringid(14729426,0)) - e1:SetCategory(CATEGORY_CONTROL) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_PHASE+PHASE_BATTLE) - e1:SetCountLimit(1) - e1:SetTarget(c14729426.cttg) - e1:SetOperation(c14729426.ctop) - e1:SetLabelObject(a) - e1:SetLabel(a:GetRealFieldID()) - e1:SetReset(RESET_PHASE+PHASE_BATTLE) - Duel.RegisterEffect(e1,tp) - end -end -function c14729426.cttg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local a=e:GetLabelObject() - if a:IsControler(1-tp) and a:GetRealFieldID()==e:GetLabel() then - Duel.SetTargetCard(a) - Duel.SetOperationInfo(0,CATEGORY_CONTROL,a,1,0,0) - end -end -function c14729426.ctop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) and not Duel.GetControl(tc,tp) then - if not tc:IsImmuneToEffect(e) and tc:IsAbleToChangeControler() then - Duel.Destroy(tc,REASON_EFFECT) - end - end -end diff --git a/script/c14730606.lua b/script/c14730606.lua deleted file mode 100644 index ff94b4643c..0000000000 --- a/script/c14730606.lua +++ /dev/null @@ -1,44 +0,0 @@ ---アイヴィ・シャックル -function c14730606.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --race - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(0,LOCATION_MZONE) - e2:SetCode(EFFECT_CHANGE_RACE) - e2:SetCondition(c14730606.raccon) - e2:SetValue(RACE_PLANT) - c:RegisterEffect(e2) - --draw - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(14730606,0)) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e3:SetCode(EVENT_TO_GRAVE) - e3:SetCondition(c14730606.drcon) - e3:SetTarget(c14730606.drtg) - e3:SetOperation(c14730606.drop) - c:RegisterEffect(e3) -end -function c14730606.raccon(e) - return Duel.GetTurnPlayer()==e:GetHandlerPlayer() -end -function c14730606.drcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousPosition(POS_FACEUP) - and c:GetPreviousControler()==tp and c:IsReason(REASON_DESTROY) and rp~=tp and c:IsStatus(STATUS_ACTIVATED) -end -function c14730606.drtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(1) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c14730606.drop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end diff --git a/script/c14731897.lua b/script/c14731897.lua deleted file mode 100644 index 7e37b0f84d..0000000000 --- a/script/c14731897.lua +++ /dev/null @@ -1,43 +0,0 @@ ---結束 UNITY -function c14731897.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DEFCHANGE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetCondition(c14731897.condition) - e1:SetTarget(c14731897.target) - e1:SetOperation(c14731897.activate) - c:RegisterEffect(e1) -end -function c14731897.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end -function c14731897.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,nil) -end -function c14731897.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil) - local def=0 - local sc=g:GetFirst() - while sc do - local cdef=sc:GetBaseDefence() - if cdef<0 then cdef=0 end - def=def+cdef - sc=g:GetNext() - end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_DEFENCE) - e1:SetValue(def) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - tc:RegisterEffect(e1) - end -end diff --git a/script/c14735698.lua b/script/c14735698.lua deleted file mode 100644 index 9493b1a3c6..0000000000 --- a/script/c14735698.lua +++ /dev/null @@ -1,100 +0,0 @@ ---影霊衣の降魔鏡 -function c14735698.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,14735698) - e1:SetTarget(c14735698.target) - e1:SetOperation(c14735698.activate) - c:RegisterEffect(e1) - --search - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_GRAVE) - e2:SetCondition(c14735698.thcon) - e2:SetCost(c14735698.thcost) - e2:SetTarget(c14735698.thtg) - e2:SetOperation(c14735698.thop) - c:RegisterEffect(e2) -end -function c14735698.filter(c,e,tp,m1,m2) - if not c:IsSetCard(0xb4) or bit.band(c:GetType(),0x81)~=0x81 - or not c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true) then return false end - local mg=m1:Filter(Card.IsCanBeRitualMaterial,c,c) - mg:Merge(m2) - if c:IsCode(21105106) then return c:ritual_custom_condition(mg) end - if c.mat_filter then - mg=mg:Filter(c.mat_filter,nil) - end - return mg:CheckWithSumEqual(Card.GetRitualLevel,c:GetLevel(),1,99,c) -end -function c14735698.mfilter(c) - return c:IsSetCard(0xb4) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemove() -end -function c14735698.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local mg1=Duel.GetRitualMaterial(tp) - local mg2=Duel.GetMatchingGroup(c14735698.mfilter,tp,LOCATION_GRAVE,0,nil) - return Duel.IsExistingMatchingCard(c14735698.filter,tp,LOCATION_HAND,0,1,nil,e,tp,mg1,mg2) - end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c14735698.activate(e,tp,eg,ep,ev,re,r,rp) - local mg1=Duel.GetRitualMaterial(tp) - local mg2=Duel.GetMatchingGroup(c14735698.mfilter,tp,LOCATION_GRAVE,0,nil) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local tg=Duel.SelectMatchingCard(tp,c14735698.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp,mg1,mg2) - local tc=tg:GetFirst() - if tc then - local mg=mg1:Filter(Card.IsCanBeRitualMaterial,tc,tc) - mg:Merge(mg2) - if tc:IsCode(21105106) then - tc:ritual_custom_operation(mg) - local mat=tc:GetMaterial() - Duel.ReleaseRitualMaterial(mat) - else - if tc.mat_filter then - mg=mg:Filter(tc.mat_filter,nil) - end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) - local mat=mg:SelectWithSumEqual(tp,Card.GetRitualLevel,tc:GetLevel(),1,99,tc) - tc:SetMaterial(mat) - Duel.ReleaseRitualMaterial(mat) - end - Duel.BreakEffect() - Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP) - tc:CompleteProcedure() - end -end -function c14735698.thcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 -end -function c14735698.cfilter(c) - return c:IsSetCard(0xb4) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost() -end -function c14735698.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() - and Duel.IsExistingMatchingCard(c14735698.cfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c14735698.cfilter,tp,LOCATION_GRAVE,0,1,1,nil) - g:AddCard(e:GetHandler()) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c14735698.thfilter(c) - return c:IsSetCard(0xb4) and c:IsType(TYPE_SPELL) and c:IsAbleToHand() -end -function c14735698.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c14735698.thfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c14735698.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c14735698.thfilter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c14745409.lua b/script/c14745409.lua deleted file mode 100644 index 8b4b245b46..0000000000 --- a/script/c14745409.lua +++ /dev/null @@ -1,104 +0,0 @@ ---聖剣ガラティーン -function c14745409.initial_effect(c) - c:SetUniqueOnField(1,0,14745409) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c14745409.target) - e1:SetOperation(c14745409.operation) - c:RegisterEffect(e1) - --Atk up - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(1000) - c:RegisterEffect(e2) - --Equip limit - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_EQUIP_LIMIT) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e3:SetValue(c14745409.eqlimit) - c:RegisterEffect(e3) - --atkdown - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e4:SetCode(EVENT_PHASE+PHASE_STANDBY) - e4:SetRange(LOCATION_SZONE) - e4:SetCountLimit(1) - e4:SetCondition(c14745409.atkcon) - e4:SetOperation(c14745409.atkop) - c:RegisterEffect(e4) - --equip - local e5=Effect.CreateEffect(c) - e5:SetDescription(aux.Stringid(14745409,0)) - e5:SetCategory(CATEGORY_EQUIP) - e5:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e5:SetCode(EVENT_TO_GRAVE) - e5:SetCountLimit(1,14745409) - e5:SetCondition(c14745409.eqcon) - e5:SetTarget(c14745409.eqtg) - e5:SetOperation(c14745409.operation) - c:RegisterEffect(e5) -end -function c14745409.eqlimit(e,c) - return c:IsRace(RACE_WARRIOR) -end -function c14745409.eqfilter1(c) - return c:IsFaceup() and c:IsRace(RACE_WARRIOR) -end -function c14745409.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c14745409.eqfilter1(chkc) end - if chk==0 then return Duel.IsExistingTarget(c14745409.eqfilter1,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c14745409.eqfilter1,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c14745409.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc and tc:IsRelateToEffect(e) and tc:IsFaceup() and c:CheckUniqueOnField(tp) then - Duel.Equip(tp,c,tc) - end -end -function c14745409.atkcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c14745409.atkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:GetFlagEffect(14745409)==0 then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_EQUIP) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(-200) - e1:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e1) - c:RegisterFlagEffect(14745409,RESET_EVENT+0x1fe0000,0,0) - e:SetLabelObject(e1) - e:SetLabel(2) - else - local pe=e:GetLabelObject() - local ct=e:GetLabel() - e:SetLabel(ct+1) - pe:SetValue(ct*-200) - end -end -function c14745409.eqcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousPosition(POS_FACEUP) and c:IsReason(REASON_DESTROY) and c:CheckUniqueOnField(tp) -end -function c14745409.eqfilter2(c) - return c:IsFaceup() and c:IsSetCard(0x107a) and c:IsRace(RACE_WARRIOR) -end -function c14745409.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c14745409.eqfilter2(chkc) end - if chk==0 then return e:GetHandler():IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingTarget(c14745409.eqfilter2,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c14745409.eqfilter2,tp,LOCATION_MZONE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end diff --git a/script/c1474910.lua b/script/c1474910.lua deleted file mode 100644 index b5046f7ba7..0000000000 --- a/script/c1474910.lua +++ /dev/null @@ -1,31 +0,0 @@ ---ハチビー -function c1474910.initial_effect(c) - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(1474910,0)) - e1:SetCategory(CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c1474910.cost) - e1:SetTarget(c1474910.target) - e1:SetOperation(c1474910.operation) - c:RegisterEffect(e1) -end -function c1474910.cfilter(c) - return c:IsFaceup() and c:IsRace(RACE_INSECT) and not c:IsCode(1474910) -end -function c1474910.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() and Duel.CheckReleaseGroup(tp,c1474910.cfilter,1,nil) end - local g=Duel.SelectReleaseGroup(tp,c1474910.cfilter,1,1,nil) - g:AddCard(e:GetHandler()) - Duel.Release(g,REASON_COST) -end -function c1474910.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp,2) end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(2) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2) -end -function c1474910.operation(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end diff --git a/script/c1475311.lua b/script/c1475311.lua deleted file mode 100644 index fcfb15d83f..0000000000 --- a/script/c1475311.lua +++ /dev/null @@ -1,35 +0,0 @@ ---闇の誘惑 -function c1475311.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c1475311.target) - e1:SetOperation(c1475311.activate) - c:RegisterEffect(e1) -end -function c1475311.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,30459350) and Duel.IsPlayerCanDraw(tp,2) end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(2) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2) -end -function c1475311.activate(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) - Duel.BreakEffect() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(p,Card.IsAttribute,p,LOCATION_HAND,0,1,1,nil,ATTRIBUTE_DARK) - local tg=g:GetFirst() - if tg then - if Duel.Remove(tg,POS_FACEUP,REASON_EFFECT)==0 then - Duel.ConfirmCards(1-p,tg) - Duel.ShuffleHand(p) - end - else - local sg=Duel.GetFieldGroup(p,LOCATION_HAND,0) - Duel.SendtoGrave(sg,REASON_EFFECT) - end -end diff --git a/script/c14756848.lua b/script/c14756848.lua deleted file mode 100644 index 1fb72d7efc..0000000000 --- a/script/c14756848.lua +++ /dev/null @@ -1,121 +0,0 @@ ---超重武者ヌス-10 -function c14756848.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(14756848,0)) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c14756848.hspcon) - e1:SetValue(1) - c:RegisterEffect(e1) - --spsummon limit - local e2=Effect.CreateEffect(c) - e2:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetCondition(c14756848.hspcon2) - e2:SetOperation(c14756848.hspop) - c:RegisterEffect(e2) - --destroy - local e3=Effect.CreateEffect(c) - e3:SetCategory(CATEGORY_DESTROY) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_MZONE) - e3:SetCost(c14756848.descost) - e3:SetTarget(c14756848.destg) - e3:SetOperation(c14756848.desop) - c:RegisterEffect(e3) -end -function c14756848.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) -end -function c14756848.hspcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and not Duel.IsExistingMatchingCard(c14756848.filter,tp,LOCATION_GRAVE,0,1,nil) -end -function c14756848.hspcon2(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+1 -end -function c14756848.hspop(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetTargetRange(1,0) - e1:SetTarget(c14756848.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function c14756848.splimit(e,c,sump,sumtype,sumpos,targetp,se) - return not c:IsSetCard(0x9a) -end -function c14756848.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end -function c14756848.desfilter1(c) - return c:GetSequence()<5 and c:IsDestructable() -end -function c14756848.desfilter2(c) - return (c:GetSequence()==6 or c:GetSequence()==7) and c:IsDestructable() -end -function c14756848.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local sel=0 - if Duel.IsExistingMatchingCard(c14756848.desfilter1,tp,0,LOCATION_SZONE,1,nil) then sel=sel+1 end - if Duel.IsExistingMatchingCard(c14756848.desfilter2,tp,0,LOCATION_SZONE,1,nil) then sel=sel+2 end - e:SetLabel(sel) - return sel~=0 - end - local sel=e:GetLabel() - if sel==3 then - sel=Duel.SelectOption(tp,aux.Stringid(14756848,1),aux.Stringid(14756848,2))+1 - elseif sel==1 then - Duel.SelectOption(tp,aux.Stringid(14756848,1)) - else - Duel.SelectOption(tp,aux.Stringid(14756848,2)) - end - e:SetLabel(sel) - if sel==1 then - local g=Duel.GetMatchingGroup(c14756848.desfilter1,tp,0,LOCATION_SZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) - else - local g=Duel.GetMatchingGroup(c14756848.desfilter2,tp,0,LOCATION_SZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) - end -end -function c14756848.desop(e,tp,eg,ep,ev,re,r,rp) - local sel=e:GetLabel() - if sel==1 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectMatchingCard(tp,c14756848.desfilter1,tp,0,LOCATION_SZONE,1,1,nil) - local tc=g:GetFirst() - if not tc then return end - Duel.HintSelection(g) - if Duel.Destroy(g,REASON_EFFECT)~=0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and not tc:IsLocation(LOCATION_HAND+LOCATION_DECK) - and tc:IsType(TYPE_SPELL+TYPE_TRAP) and tc:IsSSetable() - and Duel.SelectYesNo(tp,aux.Stringid(14756848,3)) then - Duel.BreakEffect() - Duel.SSet(tp,tc) - Duel.ConfirmCards(1-tp,tc) - end - else - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectMatchingCard(tp,c14756848.desfilter2,tp,0,LOCATION_SZONE,1,1,nil) - local tc=g:GetFirst() - if not tc then return end - Duel.HintSelection(g) - if Duel.Destroy(g,REASON_EFFECT)~=0 - and (Duel.CheckLocation(tp,LOCATION_SZONE,6) or Duel.CheckLocation(tp,LOCATION_SZONE,7)) - and not tc:IsLocation(LOCATION_HAND+LOCATION_DECK) - and Duel.SelectYesNo(tp,aux.Stringid(14756848,4)) then - Duel.BreakEffect() - Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) - end - end -end diff --git a/script/c14759024.lua b/script/c14759024.lua deleted file mode 100644 index 933dc5cdc7..0000000000 --- a/script/c14759024.lua +++ /dev/null @@ -1,31 +0,0 @@ ---セイクリッド・エスカ -function c14759024.initial_effect(c) - --search - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(14759024,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c14759024.tg) - e1:SetOperation(c14759024.op) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - c:RegisterEffect(e2) -end -function c14759024.filter(c) - return c:IsSetCard(0x53) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() -end -function c14759024.tg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c14759024.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c14759024.op(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c14759024.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c14771222.lua b/script/c14771222.lua deleted file mode 100644 index 44afdda2f5..0000000000 --- a/script/c14771222.lua +++ /dev/null @@ -1,31 +0,0 @@ ---絶海の騎士 -function c14771222.initial_effect(c) - --send to grave - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(14771222,0)) - e1:SetCategory(CATEGORY_TOGRAVE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_CHANGE_POS) - e1:SetCountLimit(1) - e1:SetCondition(c14771222.condition) - e1:SetTarget(c14771222.target) - e1:SetOperation(c14771222.operation) - c:RegisterEffect(e1) -end -function c14771222.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousPosition(POS_FACEUP) -end -function c14771222.tgfilter(c) - return c:IsType(TYPE_MONSTER) and c:IsAttribute(ATTRIBUTE_WATER) and c:IsAbleToGrave() -end -function c14771222.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return not e:GetHandler():IsStatus(STATUS_CHAINING) end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) -end -function c14771222.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c14771222.tgfilter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoGrave(g,REASON_EFFECT) - end -end diff --git a/script/c14772491.lua b/script/c14772491.lua deleted file mode 100644 index 39c4eadd7a..0000000000 --- a/script/c14772491.lua +++ /dev/null @@ -1,71 +0,0 @@ ---魂の共有-コモンソウル -function c14772491.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c14772491.target) - e1:SetOperation(c14772491.operation) - c:RegisterEffect(e1) - --tohand - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE) - e2:SetCode(EVENT_LEAVE_FIELD) - e2:SetCondition(c14772491.thcon) - e2:SetOperation(c14772491.thop) - c:RegisterEffect(e2) - e1:SetLabelObject(e2) -end -function c14772491.spfilter(c,e,tp) - return c:IsSetCard(0x1f) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c14772491.filter(c) - return c:IsFaceup() and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 -end -function c14772491.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c14772491.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c14772491.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) - and Duel.IsExistingMatchingCard(c14772491.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c14772491.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c14772491.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - local cp=tc:GetControler() - if c:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsRelateToEffect(e) then - if Duel.GetLocationCount(cp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c14772491.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - if g:GetCount()==0 then return end - local sc=g:GetFirst() - Duel.SpecialSummon(sc,0,tp,cp,false,false,POS_FACEUP) - c:SetCardTarget(tc) - c:SetCardTarget(sc) - e:GetLabelObject():SetLabelObject(sc) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_OWNER_RELATE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetCondition(c14772491.rcon) - e1:SetValue(sc:GetAttack()) - e1:SetLabelObject(sc) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1,true) - end -end -function c14772491.rcon(e) - return e:GetOwner():IsHasCardTarget(e:GetHandler()) - and e:GetOwner():IsHasCardTarget(e:GetLabelObject()) -end -function c14772491.thcon(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetLabelObject() - return tc and tc:IsOnField() and e:GetHandler():IsHasCardTarget(tc) -end -function c14772491.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.SendtoHand(e:GetLabelObject(),nil,REASON_EFFECT) -end diff --git a/script/c14778250.lua b/script/c14778250.lua deleted file mode 100644 index 1f1038a901..0000000000 --- a/script/c14778250.lua +++ /dev/null @@ -1,23 +0,0 @@ ---THE トリッキー -function c14778250.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c14778250.spcon) - e1:SetOperation(c14778250.spop) - c:RegisterEffect(e1) -end -function c14778250.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_HAND,0,1,c) -end -function c14778250.spop(e,tp,eg,ep,ev,re,r,rp,c) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) - local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_HAND,0,1,1,c) - Duel.SendtoGrave(g,REASON_COST+REASON_DISCARD) -end diff --git a/script/c14785765.lua b/script/c14785765.lua deleted file mode 100644 index 0e8182c623..0000000000 --- a/script/c14785765.lua +++ /dev/null @@ -1,47 +0,0 @@ ---BF-精鋭のゼピュロス -function c14785765.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(14785765,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_GRAVE) - e1:SetCountLimit(1,14785765+EFFECT_COUNT_CODE_DUEL) - e1:SetCost(c14785765.cost) - e1:SetTarget(c14785765.target) - e1:SetOperation(c14785765.operation) - c:RegisterEffect(e1) -end -function c14785765.costfilter(c) - return c:IsFaceup() and c:IsAbleToHandAsCost() -end -function c14785765.cost(e,tp,eg,ep,ev,re,r,rp,chk) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if chk==0 then - if ft<0 then return false end - if ft==0 then - return Duel.IsExistingMatchingCard(c14785765.costfilter,tp,LOCATION_MZONE,0,1,nil) - else - return Duel.IsExistingMatchingCard(c14785765.costfilter,tp,LOCATION_ONFIELD,0,1,nil) - end - end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - if ft==0 then - local g=Duel.SelectMatchingCard(tp,c14785765.costfilter,tp,LOCATION_MZONE,0,1,1,nil) - Duel.SendtoHand(g,nil,REASON_COST) - else - local g=Duel.SelectMatchingCard(tp,c14785765.costfilter,tp,LOCATION_ONFIELD,0,1,1,nil) - Duel.SendtoHand(g,nil,REASON_COST) - end -end -function c14785765.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,tp,400) -end -function c14785765.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then - Duel.Damage(tp,400,REASON_EFFECT) - end -end diff --git a/script/c14799437.lua b/script/c14799437.lua deleted file mode 100644 index dfba73ebc9..0000000000 --- a/script/c14799437.lua +++ /dev/null @@ -1,130 +0,0 @@ ---インフェルノイド・ネヘモス -function c14799437.initial_effect(c) - c:EnableReviveLimit() - --special summon condition - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_SPSUMMON_PROC) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e2:SetRange(LOCATION_HAND+LOCATION_GRAVE) - e2:SetCondition(c14799437.spcon) - e2:SetOperation(c14799437.spop) - c:RegisterEffect(e2) - --destroy - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(14799437,0)) - e3:SetCategory(CATEGORY_DESTROY) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - e3:SetTarget(c14799437.destg) - e3:SetOperation(c14799437.desop) - c:RegisterEffect(e3) - --negate - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(14799437,1)) - e4:SetCategory(CATEGORY_NEGATE+CATEGORY_REMOVE) - e4:SetCode(EVENT_CHAINING) - e4:SetType(EFFECT_TYPE_QUICK_O) - e4:SetRange(LOCATION_MZONE) - e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) - e4:SetCountLimit(1) - e4:SetCondition(c14799437.negcon) - e4:SetCost(c14799437.negcost) - e4:SetTarget(c14799437.negtg) - e4:SetOperation(c14799437.negop) - c:RegisterEffect(e4) -end -function c14799437.spfilter(c) - return c:IsSetCard(0xbb) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost() -end -function c14799437.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - local sum=0 - for i=0,4 do - local tc=Duel.GetFieldCard(tp,LOCATION_MZONE,i) - if tc and tc:IsFaceup() and tc:IsType(TYPE_EFFECT) then - if tc:IsType(TYPE_XYZ) then sum=sum+tc:GetRank() - else sum=sum+tc:GetLevel() end - end - end - if sum>8 then return false end - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ft<-2 then return false end - if c:IsHasEffect(34822850) then - if ft>0 then - return Duel.IsExistingMatchingCard(c14799437.spfilter,tp,LOCATION_MZONE+LOCATION_GRAVE+LOCATION_HAND,0,3,c) - else - local ct=-ft+1 - return Duel.IsExistingMatchingCard(c14799437.spfilter,tp,LOCATION_MZONE,0,ct,nil) - and Duel.IsExistingMatchingCard(c14799437.spfilter,tp,LOCATION_MZONE+LOCATION_GRAVE+LOCATION_HAND,0,3,c) - end - else - return ft>0 and Duel.IsExistingMatchingCard(c14799437.spfilter,tp,LOCATION_GRAVE+LOCATION_HAND,0,3,c) - end -end -function c14799437.spop(e,tp,eg,ep,ev,re,r,rp,c) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - local g=nil - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - if c:IsHasEffect(34822850) then - if ft>0 then - g=Duel.SelectMatchingCard(tp,c14799437.spfilter,tp,LOCATION_MZONE+LOCATION_GRAVE+LOCATION_HAND,0,3,3,c) - else - local sg=Duel.GetMatchingGroup(c14799437.spfilter,tp,LOCATION_MZONE+LOCATION_GRAVE+LOCATION_HAND,0,c) - local ct=-ft+1 - g=sg:FilterSelect(tp,Card.IsLocation,ct,ct,nil,LOCATION_MZONE) - if ct<3 then - sg:Sub(g) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g2=sg:Select(tp,3-ct,3-ct,nil) - g:Merge(g2) - end - end - else - g=Duel.SelectMatchingCard(tp,c14799437.spfilter,tp,LOCATION_GRAVE+LOCATION_HAND,0,3,3,c) - end - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c14799437.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDestructable,tp,LOCATION_MZONE,LOCATION_MZONE,1,e:GetHandler()) end - local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,LOCATION_MZONE,LOCATION_MZONE,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c14799437.desop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,LOCATION_MZONE,LOCATION_MZONE,e:GetHandler()) - if g:GetCount()>0 then - Duel.Destroy(g,REASON_EFFECT) - end -end -function c14799437.negcon(e,tp,eg,ep,ev,re,r,rp) - return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) - and re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and Duel.IsChainNegatable(ev) -end -function c14799437.cfilter(c) - return not c:IsStatus(STATUS_BATTLE_DESTROYED) -end -function c14799437.negcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,c14799437.cfilter,1,nil) end - local g=Duel.SelectReleaseGroup(tp,c14799437.cfilter,1,1,nil) - Duel.Release(g,REASON_COST) -end -function c14799437.negtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - if re:GetHandler():IsAbleToRemove() and re:GetHandler():IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_REMOVE,eg,1,0,0) - end -end -function c14799437.negop(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateActivation(ev) - if re:GetHandler():IsRelateToEffect(re) then - Duel.Remove(eg,POS_FACEUP,REASON_EFFECT) - end -end diff --git a/script/c14812659.lua b/script/c14812659.lua deleted file mode 100644 index e10822229d..0000000000 --- a/script/c14812659.lua +++ /dev/null @@ -1,37 +0,0 @@ ---覚星師ライズベルト -function c14812659.initial_effect(c) - --lv up - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(14812659,0)) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetHintTiming(0x1c0) - e1:SetTarget(c14812659.target) - e1:SetOperation(c14812659.operation) - c:RegisterEffect(e1) -end -function c14812659.filter(c) - return c:IsFaceup() and c:IsLevelAbove(1) -end -function c14812659.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c14812659.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c14812659.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c14812659.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) -end -function c14812659.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_LEVEL) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(1) - tc:RegisterEffect(e1) - end -end diff --git a/script/c14816688.lua b/script/c14816688.lua deleted file mode 100644 index 357664d268..0000000000 --- a/script/c14816688.lua +++ /dev/null @@ -1,104 +0,0 @@ ---シャッフル・リボーン -function c14816688.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(14816688,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCondition(c14816688.condition) - e1:SetTarget(c14816688.target) - e1:SetOperation(c14816688.activate) - c:RegisterEffect(e1) - --todeck - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(14816688,1)) - e2:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_GRAVE) - e2:SetCountLimit(1,14816688) - e2:SetCost(c14816688.tdcost) - e2:SetTarget(c14816688.tdtg) - e2:SetOperation(c14816688.tdop) - c:RegisterEffect(e2) -end -function c14816688.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 -end -function c14816688.filter(c,e,tp) - return c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c14816688.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c14816688.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c14816688.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c14816688.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c14816688.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then - local c=e:GetHandler() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e3:SetRange(LOCATION_MZONE) - e3:SetCode(EVENT_PHASE+PHASE_END) - e3:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e3:SetCountLimit(1) - e3:SetOperation(c14816688.rmop1) - e3:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e3,true) - Duel.SpecialSummonComplete() - end -end -function c14816688.rmop1(e,tp,eg,ep,ev,re,r,rp) - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) -end -function c14816688.tdcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) -end -function c14816688.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsControler(tp) and chkc:IsAbleToHand() end - if chk==0 then return Duel.IsPlayerCanDraw(tp,1) - and Duel.IsExistingTarget(Card.IsAbleToHand,tp,LOCATION_ONFIELD,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectTarget(tp,Card.IsAbleToDeck,tp,LOCATION_ONFIELD,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c14816688.tdop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.SendtoDeck(tc,nil,0,REASON_EFFECT)~=0 - and tc:IsLocation(LOCATION_DECK+LOCATION_EXTRA) then - Duel.ShuffleDeck(tc:GetControler()) - Duel.BreakEffect() - Duel.Draw(tp,1,REASON_EFFECT) - end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetCountLimit(1) - e1:SetOperation(c14816688.rmop2) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function c14816688.rmop2(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_HAND,0,1,1,nil) - Duel.Remove(g,POS_FACEUP,REASON_EFFECT) -end diff --git a/script/c14824019.lua b/script/c14824019.lua deleted file mode 100644 index 8868bf5bae..0000000000 --- a/script/c14824019.lua +++ /dev/null @@ -1,30 +0,0 @@ ---魔導書士 バテル -function c14824019.initial_effect(c) - --search - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(14824019,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c14824019.shtg) - e1:SetOperation(c14824019.shop) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_FLIP) - c:RegisterEffect(e2) -end -function c14824019.filter(c) - return c:IsSetCard(0x106e) and c:IsType(TYPE_SPELL) and c:IsAbleToHand() -end -function c14824019.shtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c14824019.shop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c14824019.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c14878871.lua b/script/c14878871.lua deleted file mode 100644 index a0c6a3e45b..0000000000 --- a/script/c14878871.lua +++ /dev/null @@ -1,66 +0,0 @@ ---レスキューキャット -function c14878871.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(14878871,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c14878871.spcost) - e1:SetTarget(c14878871.sptg) - e1:SetOperation(c14878871.spop) - c:RegisterEffect(e1) -end -function c14878871.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end -function c14878871.filter(c,e,tp) - return c:IsLevelBelow(3) and c:IsRace(RACE_BEAST) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c14878871.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c14878871.filter,tp,LOCATION_DECK,0,2,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_DECK) -end -function c14878871.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 then return end - local g=Duel.GetMatchingGroup(c14878871.filter,tp,LOCATION_DECK,0,nil,e,tp) - if g:GetCount()>=2 then - local fid=e:GetHandler():GetFieldID() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=g:Select(tp,2,2,nil) - Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) - local tc=sg:GetFirst() - tc:RegisterFlagEffect(14878871,RESET_EVENT+0x1fe0000,0,1,fid) - tc=sg:GetNext() - tc:RegisterFlagEffect(14878871,RESET_EVENT+0x1fe0000,0,1,fid) - sg:KeepAlive() - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e1:SetCountLimit(1) - e1:SetLabel(fid) - e1:SetLabelObject(sg) - e1:SetCondition(c14878871.descon) - e1:SetOperation(c14878871.desop) - Duel.RegisterEffect(e1,tp) - end -end -function c14878871.desfilter(c,fid) - return c:GetFlagEffectLabel(14878871)==fid -end -function c14878871.descon(e,tp,eg,ep,ev,re,r,rp) - local g=e:GetLabelObject() - if not g:IsExists(c14878871.desfilter,1,nil,e:GetLabel()) then - g:DeleteGroup() - e:Reset() - return false - else return true end -end -function c14878871.desop(e,tp,eg,ep,ev,re,r,rp) - local g=e:GetLabelObject() - local tg=g:Filter(c14878871.desfilter,nil,e:GetLabel()) - Duel.Destroy(tg,REASON_EFFECT) -end diff --git a/script/c14882493.lua b/script/c14882493.lua deleted file mode 100644 index de46786a82..0000000000 --- a/script/c14882493.lua +++ /dev/null @@ -1,76 +0,0 @@ ---極夜の騎士ガイア -function c14882493.initial_effect(c) - --search - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(14882493,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_HANDES) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1,14882493) - e1:SetCost(c14882493.thcost) - e1:SetTarget(c14882493.thtg) - e1:SetOperation(c14882493.thop) - c:RegisterEffect(e1) - --atk - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(14882493,1)) - e2:SetCategory(CATEGORY_ATKCHANGE) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,14882494) - e2:SetCost(c14882493.atkcost) - e2:SetTarget(c14882493.atktg) - e2:SetOperation(c14882493.atkop) - c:RegisterEffect(e2) -end -function c14882493.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsAttribute,1,e:GetHandler(),ATTRIBUTE_DARK) end - local g=Duel.SelectReleaseGroup(tp,Card.IsAttribute,1,1,e:GetHandler(),ATTRIBUTE_DARK) - Duel.Release(g,REASON_COST) -end -function c14882493.filter(c) - return c:GetLevel()==4 and c:IsRace(RACE_WARRIOR) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsAbleToHand() -end -function c14882493.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c14882493.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) - Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,1,tp,1) -end -function c14882493.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c14882493.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - Duel.ShuffleHand(tp) - Duel.BreakEffect() - Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT) - end -end -function c14882493.cfilter(c) - return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsAbleToRemoveAsCost() -end -function c14882493.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c14882493.cfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c14882493.cfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c14882493.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,nil) -end -function c14882493.atkop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,2) - e1:SetValue(500) - tc:RegisterEffect(e1) - end -end diff --git a/script/c14883228.lua b/script/c14883228.lua deleted file mode 100644 index 52f9197b0c..0000000000 --- a/script/c14883228.lua +++ /dev/null @@ -1,43 +0,0 @@ ---タイフーン -function c14883228.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_END_PHASE) - e1:SetTarget(c14883228.target) - e1:SetOperation(c14883228.activate) - c:RegisterEffect(e1) - --act in hand - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_TRAP_ACT_IN_HAND) - e2:SetCondition(c14883228.handcon) - c:RegisterEffect(e2) -end -function c14883228.cfilter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) -end -function c14883228.handcon(e) - local tp=e:GetHandlerPlayer() - return not Duel.IsExistingMatchingCard(c14883228.cfilter,tp,LOCATION_ONFIELD,0,1,nil) - and Duel.IsExistingMatchingCard(c14883228.cfilter,tp,0,LOCATION_ONFIELD,2,nil) -end -function c14883228.filter(c) - return c:IsFaceup() and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable() -end -function c14883228.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and c14883228.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c14883228.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c14883228.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c14883228.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c14886469.lua b/script/c14886469.lua deleted file mode 100644 index 7316e58d10..0000000000 --- a/script/c14886469.lua +++ /dev/null @@ -1,38 +0,0 @@ ---レッド・スプリンター -function c14886469.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(14886469,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetCountLimit(1,14886469) - e1:SetCondition(c14886469.spcon) - e1:SetTarget(c14886469.sptg) - e1:SetOperation(c14886469.spop) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e2) -end -function c14886469.spcon(e,tp,eg,ep,ev,re,r,rp) - return not Duel.IsExistingMatchingCard(nil,tp,LOCATION_MZONE,0,1,e:GetHandler()) -end -function c14886469.filter(c,e,tp) - return c:IsLevelBelow(3) and c:IsRace(RACE_FIEND) and c:IsType(TYPE_TUNER) - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsHasEffect(EFFECT_NECRO_VALLEY) -end -function c14886469.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c14886469.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE) -end -function c14886469.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c14886469.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c14920218.lua b/script/c14920218.lua deleted file mode 100644 index c8f6536edf..0000000000 --- a/script/c14920218.lua +++ /dev/null @@ -1,73 +0,0 @@ ---賤竜の魔術師 -function c14920218.initial_effect(c) - --pendulum summon - aux.AddPendulumProcedure(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --to hand - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(14920218,0)) - e2:SetCategory(CATEGORY_TOHAND) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_PZONE) - e2:SetCountLimit(1,14920218) - e2:SetCondition(c14920218.pcon) - e2:SetTarget(c14920218.ptg) - e2:SetOperation(c14920218.pop) - c:RegisterEffect(e2) - --to hand - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(14920218,1)) - e3:SetCategory(CATEGORY_TOHAND) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_SUMMON_SUCCESS) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e3:SetCountLimit(1,14920219) - e3:SetTarget(c14920218.thtg) - e3:SetOperation(c14920218.thop) - c:RegisterEffect(e3) - local e4=e3:Clone() - e4:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e4) -end -function c14920218.pcon(e,tp,eg,ep,ev,re,r,rp) - local seq=e:GetHandler():GetSequence() - local tc=Duel.GetFieldCard(tp,LOCATION_SZONE,13-seq) - return tc and tc:IsSetCard(0x98) -end -function c14920218.pfilter(c) - return c:IsFaceup() and c:IsType(TYPE_PENDULUM) and (c:IsSetCard(0x98) or c:IsSetCard(0x99)) and not c:IsCode(14920218) and c:IsAbleToHand() -end -function c14920218.ptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c14920218.pfilter,tp,LOCATION_EXTRA,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_EXTRA) -end -function c14920218.pop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c14920218.pfilter,tp,LOCATION_EXTRA,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end -function c14920218.thfilter(c) - return c:IsType(TYPE_MONSTER) and ((c:IsSetCard(0x98) and c:IsType(TYPE_PENDULUM)) or c:IsSetCard(0x99)) and not c:IsCode(14920218) and c:IsAbleToHand() -end -function c14920218.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c14920218.thfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c14920218.thfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c14920218.thfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c14920218.thop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end diff --git a/script/c14936691.lua b/script/c14936691.lua deleted file mode 100644 index ce1bad586c..0000000000 --- a/script/c14936691.lua +++ /dev/null @@ -1,36 +0,0 @@ ---ワーム・イーロキン -function c14936691.initial_effect(c) - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - c:RegisterEffect(e1) - --position - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(14936691,0)) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetCategory(CATEGORY_POSITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetTarget(c14936691.postg) - e2:SetOperation(c14936691.posop) - c:RegisterEffect(e2) -end -function c14936691.filter(c) - return c:IsFaceup() and c:IsSetCard(0x3e) and c:IsRace(RACE_REPTILE) -end -function c14936691.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c14936691.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c14936691.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE) - local g=Duel.SelectTarget(tp,c14936691.filter,tp,LOCATION_MZONE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_POSITION,g,g:GetCount(),0,0) -end -function c14936691.posop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) then - Duel.ChangePosition(tc,POS_FACEDOWN_DEFENCE,0,POS_FACEDOWN_DEFENCE,0) - end -end diff --git a/script/c14943837.lua b/script/c14943837.lua deleted file mode 100644 index 7bf7fdd625..0000000000 --- a/script/c14943837.lua +++ /dev/null @@ -1,81 +0,0 @@ ---デブリ・ドラゴン -function c14943837.initial_effect(c) - --synchro custom - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SYNCHRO_MATERIAL_CUSTOM) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetTarget(c14943837.syntg) - e1:SetValue(1) - e1:SetOperation(c14943837.synop) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e2:SetValue(c14943837.synlimit) - c:RegisterEffect(e2) - --summon success - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(14943837,0)) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_SUMMON_SUCCESS) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetTarget(c14943837.sumtg) - e3:SetOperation(c14943837.sumop) - c:RegisterEffect(e3) -end -function c14943837.synlimit(e,c) - if not c then return false end - return not c:IsRace(RACE_DRAGON) -end -function c14943837.tuner_filter(c) - return c:GetLevel()~=4 -end -function c14943837.synfilter(c,syncard,tuner,f) - return c:IsFaceup() and c:IsNotTuner() and c:IsCanBeSynchroMaterial(syncard,tuner) and c:GetLevel()~=4 and (f==nil or f(c)) -end -function c14943837.syntg(e,syncard,f,minc,maxc) - local c=e:GetHandler() - local lv=syncard:GetLevel()-c:GetLevel() - if lv<=0 then return false end - local g=Duel.GetMatchingGroup(c14943837.synfilter,syncard:GetControler(),LOCATION_MZONE,LOCATION_MZONE,c,syncard,c,f) - return g:CheckWithSumEqual(Card.GetSynchroLevel,lv,minc,maxc,syncard) -end -function c14943837.synop(e,tp,eg,ep,ev,re,r,rp,syncard,f,minc,maxc) - local c=e:GetHandler() - local lv=syncard:GetLevel()-c:GetLevel() - local g=Duel.GetMatchingGroup(c14943837.synfilter,syncard:GetControler(),LOCATION_MZONE,LOCATION_MZONE,c,syncard,c,f) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SMATERIAL) - local sg=g:SelectWithSumEqual(tp,Card.GetSynchroLevel,lv,minc,maxc,syncard) - Duel.SetSynchroMaterial(sg) -end -function c14943837.filter2(c,e,sp) - return c:IsAttackBelow(500) and c:IsCanBeSpecialSummoned(e,0,sp,false,false) -end -function c14943837.sumtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c14943837.filter2(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c14943837.filter2,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c14943837.filter2,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c14943837.sumop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP_ATTACK) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1,true) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e2,true) - Duel.SpecialSummonComplete() - end -end diff --git a/script/c1498130.lua b/script/c1498130.lua deleted file mode 100644 index 76a5c67b39..0000000000 --- a/script/c1498130.lua +++ /dev/null @@ -1,31 +0,0 @@ ---六武衆の影武者 -function c1498130.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(1498130,0)) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_CHAINING) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c1498130.tgcon) - e1:SetOperation(c1498130.tgop) - c:RegisterEffect(e1) -end -function c1498130.tgcon(e,tp,eg,ep,ev,re,r,rp) - if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end - local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) - if not g or g:GetCount()~=1 then return false end - local tc=g:GetFirst() - local c=e:GetHandler() - if tc==c or tc:GetControler()~=tp or tc:IsFacedown() or not tc:IsLocation(LOCATION_MZONE) or not tc:IsSetCard(0x3d) then return false end - local tf=re:GetTarget() - local res,ceg,cep,cev,cre,cr,crp=Duel.CheckEvent(re:GetCode(),true) - return tf(re,rp,ceg,cep,cev,cre,cr,crp,0,c) -end -function c1498130.tgop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - local g=Group.CreateGroup() - g:AddCard(c) - Duel.ChangeTargetCard(ev,g) - end -end diff --git a/script/c14983497.lua b/script/c14983497.lua deleted file mode 100644 index 80b908a6a4..0000000000 --- a/script/c14983497.lua +++ /dev/null @@ -1,26 +0,0 @@ ---霞の谷の幼怪鳥 -function c14983497.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(14983497,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCondition(c14983497.spcon) - e1:SetTarget(c14983497.sptg) - e1:SetOperation(c14983497.spop) - c:RegisterEffect(e1) -end -function c14983497.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetPreviousLocation()==LOCATION_HAND -end -function c14983497.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c14983497.spop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c14989021.lua b/script/c14989021.lua deleted file mode 100644 index 975225b66d..0000000000 --- a/script/c14989021.lua +++ /dev/null @@ -1,47 +0,0 @@ ---神鳥シムルグ -function c14989021.initial_effect(c) - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - c:RegisterEffect(e1) - --tribute limit - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_TRIBUTE_LIMIT) - e2:SetValue(c14989021.tlimit) - c:RegisterEffect(e2) - --damage - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(14989021,0)) - e3:SetCategory(CATEGORY_DAMAGE) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e3:SetCode(EVENT_PHASE+PHASE_END) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1) - e3:SetTarget(c14989021.damtg) - e3:SetOperation(c14989021.damop) - c:RegisterEffect(e3) -end -function c14989021.tlimit(e,c) - return not c:IsAttribute(ATTRIBUTE_WIND) -end -function c14989021.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) -end -function c14989021.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,PLAYER_ALL,0) -end -function c14989021.damop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local c1=Duel.GetMatchingGroupCount(c14989021.filter,tp,LOCATION_ONFIELD,0,nil) - if c1<2 then - Duel.Damage(tp,1000-c1*500,REASON_EFFECT) - end - local c2=Duel.GetMatchingGroupCount(c14989021.filter,1-tp,LOCATION_ONFIELD,0,nil) - if c2<2 then - Duel.Damage(1-tp,1000-c2*500,REASON_EFFECT) - end -end diff --git a/script/c15013468.lua b/script/c15013468.lua deleted file mode 100644 index bb01396d59..0000000000 --- a/script/c15013468.lua +++ /dev/null @@ -1,74 +0,0 @@ ---アンドロ・スフィンクス -function c15013468.initial_effect(c) - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_GRAVE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_SPSUMMON_PROC) - e2:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e2:SetRange(LOCATION_HAND) - e2:SetCondition(c15013468.spcon) - e2:SetOperation(c15013468.spop) - c:RegisterEffect(e2) - --damage - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(15013468,0)) - e3:SetCategory(CATEGORY_DAMAGE) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e3:SetCode(EVENT_BATTLE_DESTROYING) - e3:SetCondition(c15013468.damcon) - e3:SetTarget(c15013468.damtg) - e3:SetOperation(c15013468.damop) - c:RegisterEffect(e3) - --cannot attack - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e4:SetCode(EVENT_SUMMON_SUCCESS) - e4:SetOperation(c15013468.atklimit) - c:RegisterEffect(e4) - local e5=e4:Clone() - e5:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e5) -end -function c15013468.atklimit(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e:GetHandler():RegisterEffect(e1) -end -function c15013468.cfilter(c) - return c:IsFaceup() and c:IsCode(53569894) -end -function c15013468.spcon(e,c) - if c==nil then return true end - return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and Duel.CheckLPCost(c:GetControler(),500) - and Duel.IsExistingMatchingCard(c15013468.cfilter,0,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) -end -function c15013468.spop(e,tp,eg,ep,ev,re,r,rp,c) - Duel.PayLPCost(tp,500) -end -function c15013468.damcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local bc=c:GetBattleTarget() - return c:IsRelateToBattle() and bit.band(bc:GetBattlePosition(),POS_DEFENCE)~=0 -end -function c15013468.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local dam=e:GetHandler():GetBattleTarget():GetBaseAttack()/2 - if dam<0 then dam=0 end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(dam) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,dam) -end -function c15013468.damop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c15028680.lua b/script/c15028680.lua deleted file mode 100644 index 90ebc0df4c..0000000000 --- a/script/c15028680.lua +++ /dev/null @@ -1,35 +0,0 @@ ---超念導体ビヒーマス -function c15028680.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1) - c:EnableReviveLimit() - --remove - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(15028680,0)) - e1:SetCategory(CATEGORY_REMOVE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_BATTLED) - e1:SetTarget(c15028680.target) - e1:SetOperation(c15028680.operation) - c:RegisterEffect(e1) -end -function c15028680.target(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - local a=Duel.GetAttacker() - local t=Duel.GetAttackTarget() - if chk==0 then - return (t==c and a:IsAbleToRemove()) - or (a==c and t~=nil and t:IsAbleToRemove()) - end - local g=Group.CreateGroup() - if a:IsRelateToBattle() then g:AddCard(a) end - if t~=nil and t:IsRelateToBattle() then g:AddCard(t) end - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,0) -end -function c15028680.operation(e,tp,eg,ep,ev,re,r,rp) - local a=Duel.GetAttacker() - local d=Duel.GetAttackTarget() - local g=Group.FromCards(a,d) - local rg=g:Filter(Card.IsRelateToBattle,nil) - Duel.Remove(rg,POS_FACEUP,REASON_EFFECT) -end diff --git a/script/c15052462.lua b/script/c15052462.lua deleted file mode 100644 index 2500ad5cdd..0000000000 --- a/script/c15052462.lua +++ /dev/null @@ -1,50 +0,0 @@ ---紫水晶 -function c15052462.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c15052462.target) - e1:SetOperation(c15052462.operation) - c:RegisterEffect(e1) - --atk up - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(300) - c:RegisterEffect(e2) - --def up - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_EQUIP) - e3:SetCode(EFFECT_UPDATE_DEFENCE) - e3:SetValue(300) - c:RegisterEffect(e3) - --equip limit - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetCode(EFFECT_EQUIP_LIMIT) - e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e4:SetValue(c15052462.eqlimit) - c:RegisterEffect(e4) -end -function c15052462.eqlimit(e,c) - return c:IsRace(RACE_ZOMBIE) -end -function c15052462.filter(c) - return c:IsFaceup() and c:IsRace(RACE_ZOMBIE) -end -function c15052462.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c15052462.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c15052462.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c15052462.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c15052462.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,e:GetHandler(),tc) - end -end diff --git a/script/c15083728.lua b/script/c15083728.lua deleted file mode 100644 index d24b1a6c3e..0000000000 --- a/script/c15083728.lua +++ /dev/null @@ -1,29 +0,0 @@ ---粘着テープの家 -function c15083728.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c15083728.target) - e1:SetOperation(c15083728.activate) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - c:RegisterEffect(e2) -end -function c15083728.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local tc=eg:GetFirst() - if chkc then return chkc==tc end - if chk==0 then return ep~=tp and tc:IsFaceup() and tc:GetDefence()<=500 and tc:IsOnField() - and tc:IsCanBeEffectTarget(e) and tc:IsDestructable() end - Duel.SetTargetCard(eg) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,tc,1,0,0) -end -function c15083728.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=eg:GetFirst() - if tc:IsFaceup() and tc:IsRelateToEffect(e) and tc:GetDefence()<=500 then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c15090429.lua b/script/c15090429.lua deleted file mode 100644 index 463a3b0885..0000000000 --- a/script/c15090429.lua +++ /dev/null @@ -1,12 +0,0 @@ ---暴風小僧 -function c15090429.initial_effect(c) - --double tribute - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DOUBLE_TRIBUTE) - e1:SetValue(c15090429.condition) - c:RegisterEffect(e1) -end -function c15090429.condition(e,c) - return c:IsAttribute(ATTRIBUTE_WIND) -end diff --git a/script/c15103313.lua b/script/c15103313.lua deleted file mode 100644 index ad730731cc..0000000000 --- a/script/c15103313.lua +++ /dev/null @@ -1,25 +0,0 @@ ---即神仏 -function c15103313.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOGRAVE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c15103313.target) - e1:SetOperation(c15103313.activate) - c:RegisterEffect(e1) -end -function c15103313.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) end - if chk==0 then return Duel.IsExistingTarget(nil,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectTarget(tp,nil,tp,LOCATION_MZONE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,0,0) -end -function c15103313.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsControler(tp) then - Duel.SendtoGrave(tc,REASON_EFFECT) - end -end diff --git a/script/c15146890.lua b/script/c15146890.lua deleted file mode 100644 index 25ca14ac62..0000000000 --- a/script/c15146890.lua +++ /dev/null @@ -1,52 +0,0 @@ ---竜脈の魔術師 -function c15146890.initial_effect(c) - --pendulum summon - aux.AddPendulumProcedure(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(15146890,0)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_PZONE) - e2:SetCountLimit(1) - e2:SetCondition(c15146890.condition) - e2:SetCost(c15146890.cost) - e2:SetTarget(c15146890.target) - e2:SetOperation(c15146890.operation) - c:RegisterEffect(e2) -end -function c15146890.condition(e,tp,eg,ep,ev,re,r,rp) - local seq=e:GetHandler():GetSequence() - local tc=Duel.GetFieldCard(tp,LOCATION_SZONE,13-seq) - return tc and tc:IsSetCard(0x98) -end -function c15146890.cfilter(c) - return c:IsType(TYPE_PENDULUM) and c:IsDiscardable() -end -function c15146890.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c15146890.cfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,c15146890.cfilter,1,1,REASON_COST+REASON_DISCARD) -end -function c15146890.filter(c) - return c:IsFaceup() and c:IsDestructable() -end -function c15146890.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c15146890.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c15146890.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c15146890.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c15146890.operation(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c15150365.lua b/script/c15150365.lua deleted file mode 100644 index 31ff10f908..0000000000 --- a/script/c15150365.lua +++ /dev/null @@ -1,25 +0,0 @@ ---白い泥棒 -function c15150365.initial_effect(c) - --handes - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(15150365,0)) - e1:SetCategory(CATEGORY_HANDES) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_BATTLE_DAMAGE) - e1:SetCondition(c15150365.condition) - e1:SetTarget(c15150365.target) - e1:SetOperation(c15150365.operation) - c:RegisterEffect(e1) -end -function c15150365.condition(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp -end -function c15150365.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_HANDES,0,0,1-tp,1) -end -function c15150365.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetFieldGroup(ep,LOCATION_HAND,0) - local sg=g:RandomSelect(ep,1) - Duel.SendtoGrave(sg,REASON_DISCARD+REASON_EFFECT) -end diff --git a/script/c1516510.lua b/script/c1516510.lua deleted file mode 100644 index 676031f412..0000000000 --- a/script/c1516510.lua +++ /dev/null @@ -1,102 +0,0 @@ ---ルーンアイズ・ペンデュラム・ドラゴン -function c1516510.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcCodeFun(c,16178681,aux.FilterBoolFunction(Card.IsRace,RACE_SPELLCASTER),1,true,false) - --multi attack - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(c1516510.condition) - e1:SetOperation(c1516510.operation) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_MATERIAL_CHECK) - e2:SetValue(c1516510.valcheck) - e2:SetLabelObject(e1) - c:RegisterEffect(e2) -end -function c1516510.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_FUSION -end -function c1516510.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local flag=e:GetLabel() - if bit.band(flag,0x3)~=0 then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_EXTRA_ATTACK) - e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) - if bit.band(flag,0x1)~=0 then - e1:SetDescription(aux.Stringid(1516510,0)) - e1:SetValue(1) - else - e1:SetDescription(aux.Stringid(1516510,1)) - e1:SetValue(2) - end - e1:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e1) - end - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_CANNOT_DIRECT_ATTACK) - e2:SetCondition(c1516510.dircon) - e2:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EFFECT_CANNOT_ATTACK) - e3:SetCondition(c1516510.atkcon) - c:RegisterEffect(e3) - if bit.band(flag,0x4)~=0 then - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetCode(EFFECT_IMMUNE_EFFECT) - e4:SetValue(c1516510.efilter) - e4:SetOwnerPlayer(tp) - e4:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - c:RegisterEffect(e4) - end -end -function c1516510.dircon(e) - return e:GetHandler():GetAttackAnnouncedCount()>0 -end -function c1516510.atkcon(e) - return e:GetHandler():IsDirectAttacked() -end -function c1516510.efilter(e,re) - return e:GetOwnerPlayer()~=re:GetOwnerPlayer() -end -function c1516510.lvfilter(c) - return c:IsCode(16178681) or c:IsHasEffect(EFFECT_FUSION_SUBSTITUTE) -end -function c1516510.imfilter(c) - return c:IsLocation(LOCATION_MZONE) and c:GetSummonType()==SUMMON_TYPE_PENDULUM -end -function c1516510.valcheck(e,c) - local g=c:GetMaterial() - local flag=0 - if g:GetCount()==2 then - local lv=0 - local lg1=g:Filter(c1516510.lvfilter,nil) - local lg2=g:Filter(Card.IsRace,nil,RACE_SPELLCASTER) - if lg1:GetCount()==2 then - lv=lg2:GetFirst():GetOriginalLevel() - local lc=lg2:GetNext() - if lc then lv=math.max(lv,lc:GetOriginalLevel()) end - else - local lc=g:GetFirst() - if lc==lg1:GetFirst() then lc=g:GetNext() end - lv=lc:GetOriginalLevel() - end - if lv>4 then - flag=0x2 - elseif lv>0 then - flag=0x1 - end - end - if g:IsExists(c1516510.imfilter,1,nil) then - flag=flag+0x4 - end - e:GetLabelObject():SetLabel(flag) -end diff --git a/script/c15169262.lua b/script/c15169262.lua deleted file mode 100644 index 64c143b538..0000000000 --- a/script/c15169262.lua +++ /dev/null @@ -1,34 +0,0 @@ ---ラヴァル炎樹海の妖女 -function c15169262.initial_effect(c) - --to grave - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(15169262,0)) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCondition(c15169262.condition) - e1:SetOperation(c15169262.operation) - c:RegisterEffect(e1) -end -function c15169262.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) -end -function c15169262.filter(c) - return c:IsFaceup() and c:IsSetCard(0x39) -end -function c15169262.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c15169262.filter,tp,LOCATION_MZONE,0,nil) - local tc=g:GetFirst() - if not tc then return end - local c=e:GetHandler() - local atk=Duel.GetMatchingGroupCount(Card.IsSetCard,tp,LOCATION_GRAVE,0,nil,0x39)*200 - while tc do - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(atk) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - tc=g:GetNext() - end -end diff --git a/script/c15175429.lua b/script/c15175429.lua deleted file mode 100644 index f67638cc48..0000000000 --- a/script/c15175429.lua +++ /dev/null @@ -1,30 +0,0 @@ ---マジック・リアクター・AID -function c15175429.initial_effect(c) - --destroy&damage - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(15175429,0)) - e1:SetCategory(CATEGORY_DAMAGE+CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_QUICK_O) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) - e1:SetCode(EVENT_CHAINING) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCondition(c15175429.condition) - e1:SetTarget(c15175429.target) - e1:SetOperation(c15175429.operation) - c:RegisterEffect(e1) -end -function c15175429.condition(e,tp,eg,ep,ev,re,r,rp) - return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and ep~=tp - and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL) -end -function c15175429.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return re:GetHandler():IsDestructable() end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,800) -end -function c15175429.operation(e,tp,eg,ep,ev,re,r,rp) - if re:GetHandler():IsRelateToEffect(re) and Duel.Destroy(eg,REASON_EFFECT)~=0 then - Duel.Damage(1-tp,800,REASON_EFFECT) - end -end diff --git a/script/c15187079.lua b/script/c15187079.lua deleted file mode 100644 index 12b47d3db1..0000000000 --- a/script/c15187079.lua +++ /dev/null @@ -1,67 +0,0 @@ ---地縛神 Uru -function c15187079.initial_effect(c) - c:SetUniqueOnField(1,1,10000000) - -- - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e4:SetRange(LOCATION_MZONE) - e4:SetCode(EFFECT_SELF_DESTROY) - e4:SetCondition(c15187079.sdcon) - c:RegisterEffect(e4) - --battle target - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_SINGLE) - e5:SetCode(EFFECT_CANNOT_BE_BATTLE_TARGET) - e5:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e5:SetRange(LOCATION_MZONE) - e5:SetValue(aux.imval1) - c:RegisterEffect(e5) - --direct atk - local e6=Effect.CreateEffect(c) - e6:SetType(EFFECT_TYPE_SINGLE) - e6:SetCode(EFFECT_DIRECT_ATTACK) - c:RegisterEffect(e6) - --damage - local e7=Effect.CreateEffect(c) - e7:SetDescription(aux.Stringid(15187079,0)) - e7:SetCategory(CATEGORY_CONTROL) - e7:SetType(EFFECT_TYPE_IGNITION) - e7:SetProperty(EFFECT_FLAG_CARD_TARGET) - e7:SetRange(LOCATION_MZONE) - e7:SetCountLimit(1) - e7:SetCost(c15187079.ctcost) - e7:SetTarget(c15187079.cttg) - e7:SetOperation(c15187079.ctop) - c:RegisterEffect(e7) -end -function c15187079.sdcon(e) - local c=e:GetHandler() - if c:IsStatus(STATUS_BATTLE_DESTROYED) then return false end - local f1=Duel.GetFieldCard(0,LOCATION_SZONE,5) - local f2=Duel.GetFieldCard(1,LOCATION_SZONE,5) - return ((f1==nil or not f1:IsFaceup()) and (f2==nil or not f2:IsFaceup())) -end -function c15187079.ctcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,nil,1,e:GetHandler()) end - local g=Duel.SelectReleaseGroup(tp,nil,1,1,e:GetHandler()) - Duel.Release(g,REASON_COST) -end -function c15187079.filter(c) - return c:IsFaceup() and c:IsAbleToChangeControler() -end -function c15187079.cttg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c15187079.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c15187079.filter,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) - local g=Duel.SelectTarget(tp,c15187079.filter,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0) -end -function c15187079.ctop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() and not Duel.GetControl(tc,tp,PHASE_END,1) then - if not tc:IsImmuneToEffect(e) and tc:IsAbleToChangeControler() then - Duel.Destroy(tc,REASON_EFFECT) - end - end -end diff --git a/script/c15237615.lua b/script/c15237615.lua deleted file mode 100644 index 6e2bc53741..0000000000 --- a/script/c15237615.lua +++ /dev/null @@ -1,6 +0,0 @@ ---裁きを下す女帝 -function c15237615.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcCode2(c,5901497,64501875,true,true) -end diff --git a/script/c15240238.lua b/script/c15240238.lua deleted file mode 100644 index 28bc3052b1..0000000000 --- a/script/c15240238.lua +++ /dev/null @@ -1,50 +0,0 @@ ---霞鳥クラウソラス -function c15240238.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1) - c:EnableReviveLimit() - --negate - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(15240238,0)) - e1:SetCategory(CATEGORY_DISABLE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetTarget(c15240238.target) - e1:SetOperation(c15240238.operation) - c:RegisterEffect(e1) -end -function c15240238.filter(c) - return c:IsFaceup() and c:GetAttack()>0 -end -function c15240238.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and c15240238.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c15240238.filter,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - local g=Duel.SelectTarget(tp,c15240238.filter,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0) -end -function c15240238.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) and tc:GetAttack()>0 then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetValue(0) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_DISABLE_EFFECT) - e3:SetValue(RESET_TURN_SET) - e3:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e3) - end -end diff --git a/script/c15248873.lua b/script/c15248873.lua deleted file mode 100644 index 1b4a75cd98..0000000000 --- a/script/c15248873.lua +++ /dev/null @@ -1,38 +0,0 @@ ---ポップルアップ -function c15248873.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,15248873+EFFECT_COUNT_CODE_OATH) - e1:SetCondition(c15248873.condition) - e1:SetTarget(c15248873.target) - e1:SetOperation(c15248873.operation) - c:RegisterEffect(e1) -end -function c15248873.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetFieldCard(tp,LOCATION_SZONE,5)==nil and Duel.GetFieldCard(1-tp,LOCATION_SZONE,5)~=nil -end -function c15248873.filter(c,tp) - return c:IsType(TYPE_FIELD) and c:GetActivateEffect():IsActivatable(tp) -end -function c15248873.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c15248873.filter,tp,LOCATION_DECK,0,1,nil,tp) end -end -function c15248873.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(15248873,0)) - local tc=Duel.SelectMatchingCard(tp,c15248873.filter,tp,LOCATION_DECK,0,1,1,nil,tp):GetFirst() - if tc then - local fc=Duel.GetFieldCard(tp,LOCATION_SZONE,5) - if fc then - Duel.SendtoGrave(fc,REASON_RULE) - Duel.BreakEffect() - end - Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) - local te=tc:GetActivateEffect() - local tep=tc:GetControler() - local cost=te:GetCost() - if cost then cost(te,tep,eg,ep,ev,re,r,rp,1) end - Duel.RaiseEvent(tc,EVENT_CHAIN_SOLVED,tc:GetActivateEffect(),0,tp,tp,Duel.GetCurrentChain()) - end -end diff --git a/script/c1525329.lua b/script/c1525329.lua deleted file mode 100644 index 7370dbcb4f..0000000000 --- a/script/c1525329.lua +++ /dev/null @@ -1,53 +0,0 @@ ---7つの武器を持つハンター -function c1525329.initial_effect(c) - --arm - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(1525329,0)) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetRange(LOCATION_MZONE) - e1:SetTarget(c1525329.armtg) - e1:SetOperation(c1525329.armop) - c:RegisterEffect(e1) -end -function c1525329.armtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,563) - local rc=Duel.AnnounceRace(tp,1,0xffffff) - e:SetLabel(rc) -end -function c1525329.armop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - local rc=e:GetLabel() - e:GetHandler():SetHint(CHINT_RACE,rc) - --atk up - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(1525329,1)) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_PRE_DAMAGE_CALCULATE) - e1:SetCondition(c1525329.upcon) - e1:SetOperation(c1525329.upop) - e1:SetLabel(rc) - e1:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e1) - end -end -function c1525329.upcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local bc=c:GetBattleTarget() - return bc and bc:IsRace(e:GetLabel()) -end -function c1525329.upop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_PHASE+RESET_DAMAGE_CAL) - e1:SetValue(1000) - c:RegisterEffect(e1) - end -end diff --git a/script/c15259703.lua b/script/c15259703.lua deleted file mode 100644 index 334dbfecb0..0000000000 --- a/script/c15259703.lua +++ /dev/null @@ -1,13 +0,0 @@ ---トゥーン・ワールド -function c15259703.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c15259703.cost) - c:RegisterEffect(e1) -end -function c15259703.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,1000) end - Duel.PayLPCost(tp,1000) -end diff --git a/script/c15270885.lua b/script/c15270885.lua deleted file mode 100644 index 70f41d83a2..0000000000 --- a/script/c15270885.lua +++ /dev/null @@ -1,79 +0,0 @@ ---トゥーン・ゴブリン突撃部隊 -function c15270885.initial_effect(c) - --cannot attack - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetOperation(c15270885.atklimit) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e2) - local e3=e1:Clone() - e3:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - c:RegisterEffect(e3) - --destroy - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e4:SetRange(LOCATION_MZONE) - e4:SetCode(EVENT_LEAVE_FIELD) - e4:SetCondition(c15270885.sdescon) - e4:SetOperation(c15270885.sdesop) - c:RegisterEffect(e4) - --direct attack - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_SINGLE) - e5:SetCode(EFFECT_DIRECT_ATTACK) - e5:SetCondition(c15270885.dircon) - c:RegisterEffect(e5) - --to defence - local e6=Effect.CreateEffect(c) - e6:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e6:SetCode(EVENT_PHASE+PHASE_BATTLE) - e6:SetRange(LOCATION_MZONE) - e6:SetCountLimit(1) - e6:SetCondition(c15270885.poscon) - e6:SetOperation(c15270885.posop) - c:RegisterEffect(e6) -end -function c15270885.atklimit(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e:GetHandler():RegisterEffect(e1) -end -function c15270885.sfilter(c) - return c:IsReason(REASON_DESTROY) and c:IsPreviousPosition(POS_FACEUP) and c:GetPreviousCodeOnField()==15259703 and c:IsPreviousLocation(LOCATION_ONFIELD) -end -function c15270885.sdescon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c15270885.sfilter,1,nil) -end -function c15270885.sdesop(e,tp,eg,ep,ev,re,r,rp) - Duel.Destroy(e:GetHandler(),REASON_EFFECT) -end -function c15270885.dirfilter1(c) - return c:IsFaceup() and c:IsCode(15259703) -end -function c15270885.dirfilter2(c) - return c:IsFaceup() and c:IsType(TYPE_TOON) -end -function c15270885.dircon(e) - return Duel.IsExistingMatchingCard(c15270885.dirfilter1,e:GetHandlerPlayer(),LOCATION_ONFIELD,0,1,nil) - and not Duel.IsExistingMatchingCard(c15270885.dirfilter2,e:GetHandlerPlayer(),0,LOCATION_MZONE,1,nil) -end -function c15270885.poscon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetAttackedCount()>0 -end -function c15270885.posop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsAttackPos() then - Duel.ChangePosition(c,POS_FACEUP_DEFENCE) - end - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_CHANGE_POSITION) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_COPY_INHERIT) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,3) - c:RegisterEffect(e1) -end diff --git a/script/c15286412.lua b/script/c15286412.lua deleted file mode 100644 index 936d0e40a3..0000000000 --- a/script/c15286412.lua +++ /dev/null @@ -1,58 +0,0 @@ ---極星宝グングニル -function c15286412.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c15286412.cost) - e1:SetTarget(c15286412.target) - e1:SetOperation(c15286412.activate) - c:RegisterEffect(e1) -end -function c15286412.cfilter(c) - return c:IsFaceup() and (c:IsSetCard(0x42) or c:IsSetCard(0x4b)) and c:IsAbleToRemoveAsCost() -end -function c15286412.cost(e,tp,eg,ep,ev,re,r,rp,chk) - e:SetLabel(1) - if chk==0 then return Duel.IsExistingMatchingCard(c15286412.cfilter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c15286412.cfilter,tp,LOCATION_MZONE,0,1,1,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST+REASON_TEMPORARY) - e:SetLabelObject(g:GetFirst()) -end -function c15286412.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_ONFIELD) and chkc:IsDestructable() end - if chk==0 then - e:SetLabel(0) - return Duel.IsExistingTarget(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) - end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c15286412.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)~=0 and e:GetLabel()==1 then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetCountLimit(1) - e1:SetCondition(c15286412.retcon) - e1:SetOperation(c15286412.retop) - e1:SetLabel(2) - e1:SetLabelObject(e:GetLabelObject()) - e1:SetReset(RESET_PHASE+PHASE_END+RESET_SELF_TURN,2) - Duel.RegisterEffect(e1,tp) - end -end -function c15286412.retcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c15286412.retop(e,tp,eg,ep,ev,re,r,rp) - local ct=e:GetLabel() - ct=ct-1 - e:SetLabel(ct) - if ct==0 then Duel.ReturnToField(e:GetLabelObject(),POS_FACEUP_ATTACK) end -end diff --git a/script/c15294090.lua b/script/c15294090.lua deleted file mode 100644 index 2fd75e6f60..0000000000 --- a/script/c15294090.lua +++ /dev/null @@ -1,36 +0,0 @@ ---デステニー・ミラージュ -function c15294090.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCondition(c15294090.condition) - e1:SetTarget(c15294090.target) - e1:SetOperation(c15294090.operation) - c:RegisterEffect(e1) -end -function c15294090.cfilter(c,tp) - return c:IsSetCard(0xc008) and c:IsPreviousLocation(LOCATION_ONFIELD) and c:GetPreviousControler()==tp -end -function c15294090.condition(e,tp,eg,ep,ev,re,r,rp) - return bit.band(r,REASON_EFFECT)~=0 and rp~=tp and eg:IsExists(c15294090.cfilter,1,nil,tp) -end -function c15294090.spfilter(c,e,tp) - return c:IsReason(REASON_DESTROY) and c:GetTurnID()==Duel.GetTurnCount() and c:IsSetCard(0xc008) - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c15294090.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c15294090.spfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,PLAYER_ALL,LOCATION_GRAVE) -end -function c15294090.operation(e,tp,eg,ep,ev,re,r,rp) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ft<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c15294090.spfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,ft,nil,e,tp) - if g:GetCount()~=0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c15305240.lua b/script/c15305240.lua deleted file mode 100644 index 7bde42916d..0000000000 --- a/script/c15305240.lua +++ /dev/null @@ -1,33 +0,0 @@ ---鹵獲装置 -function c15305240.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_CONTROL) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c15305240.target) - e1:SetOperation(c15305240.activate) - c:RegisterEffect(e1) -end -function c15305240.filter(c) - return c:IsFaceup() and c:IsType(TYPE_NORMAL) and c:IsAbleToChangeControler() -end -function c15305240.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c15305240.filter,tp,LOCATION_MZONE,0,1,nil) - and Duel.IsExistingMatchingCard(Card.IsAbleToChangeControler,tp,0,LOCATION_MZONE,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_CONTROL,nil,0,0,0) -end -function c15305240.activate(e,tp,eg,ep,ev,re,r,rp) - if not Duel.IsExistingMatchingCard(c15305240.filter,tp,LOCATION_MZONE,0,1,nil) - or not Duel.IsExistingMatchingCard(Card.IsAbleToChangeControler,tp,0,LOCATION_MZONE,1,nil) - then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) - local g1=Duel.SelectMatchingCard(tp,c15305240.filter,tp,LOCATION_MZONE,0,1,1,nil) - Duel.HintSelection(g1) - Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_CONTROL) - local g2=Duel.SelectMatchingCard(1-tp,Card.IsAbleToChangeControler,1-tp,LOCATION_MZONE,0,1,1,nil) - Duel.HintSelection(g2) - local c1=g1:GetFirst() - local c2=g2:GetFirst() - Duel.SwapControl(c1,c2,0,0) -end diff --git a/script/c15310033.lua b/script/c15310033.lua deleted file mode 100644 index 843050cbcd..0000000000 --- a/script/c15310033.lua +++ /dev/null @@ -1,19 +0,0 @@ ---アンノウン・シンクロン -function c15310033.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(1,15310033+EFFECT_COUNT_CODE_DUEL) - e1:SetCondition(c15310033.spcon) - c:RegisterEffect(e1) -end -function c15310033.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0,nil)==0 - and Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE,nil)>0 - and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 -end diff --git a/script/c15313433.lua b/script/c15313433.lua deleted file mode 100644 index e0e9c4cd2d..0000000000 --- a/script/c15313433.lua +++ /dev/null @@ -1,38 +0,0 @@ ---インフェルニティ・リフレクター -function c15313433.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCost(c15313433.cost) - e1:SetTarget(c15313433.target) - e1:SetOperation(c15313433.activate) - c:RegisterEffect(e1) -end -function c15313433.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end - local g=Duel.GetFieldGroup(tp,LOCATION_HAND,0) - Duel.SendtoGrave(g,REASON_COST+REASON_DISCARD) -end -function c15313433.filter(c,e,tp) - return c:IsSetCard(0xb) and c:IsLocation(LOCATION_GRAVE) and c:GetPreviousControler()==tp and c:IsReason(REASON_BATTLE) - and c:IsCanBeEffectTarget(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c15313433.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return eg:IsContains(chkc) and c15313433.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and eg:IsExists(c15313433.filter,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=eg:FilterSelect(tp,c15313433.filter,1,1,nil,e,tp) - Duel.SetTargetCard(g) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,1,1-tp,1000) -end -function c15313433.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end - Duel.Damage(1-tp,1000,REASON_EFFECT) -end diff --git a/script/c15317640.lua b/script/c15317640.lua deleted file mode 100644 index c0097d6000..0000000000 --- a/script/c15317640.lua +++ /dev/null @@ -1,73 +0,0 @@ ---巨大戦艦 カバード・コア -function c15317640.initial_effect(c) - --summon success - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(15317640,0)) - e1:SetCategory(CATEGORY_COUNTER) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c15317640.addct) - e1:SetOperation(c15317640.addc) - c:RegisterEffect(e1) - --battle indestructable - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e2:SetValue(1) - c:RegisterEffect(e2) - --remove counter - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(15317640,1)) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e3:SetCode(EVENT_DAMAGE_STEP_END) - e3:SetCondition(c15317640.rctcon) - e3:SetTarget(c15317640.rcttg) - e3:SetOperation(c15317640.rctop) - c:RegisterEffect(e3) - --destroy - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(15317640,2)) - e4:SetCategory(CATEGORY_DESTROY) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e4:SetCode(EVENT_DAMAGE_STEP_END) - e4:SetCondition(c15317640.descon) - e4:SetTarget(c15317640.destg) - e4:SetOperation(c15317640.desop) - c:RegisterEffect(e4) -end -function c15317640.addct(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,2,0,0x1f) -end -function c15317640.addc(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - e:GetHandler():AddCounter(0x1f,2) - end -end -function c15317640.rctcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetCounter(0x1f)~=0 -end -function c15317640.rcttg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_COIN,nil,0,tp,1) -end -function c15317640.rctop(e,tp,eg,ep,ev,re,r,rp) - local coin=Duel.SelectOption(tp,60,61) - local res=Duel.TossCoin(tp,1) - if coin==res then - e:GetHandler():RemoveCounter(tp,0x1f,1,REASON_EFFECT) - end -end -function c15317640.descon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetCounter(0x1f)==0 -end -function c15317640.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0) -end -function c15317640.desop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFaceup() and c:IsRelateToEffect(e) then - Duel.Destroy(c,REASON_EFFECT) - end -end diff --git a/script/c1533292.lua b/script/c1533292.lua deleted file mode 100644 index 4fa6d7f500..0000000000 --- a/script/c1533292.lua +++ /dev/null @@ -1,28 +0,0 @@ ---レアル・ジェネクス・マグナ -function c1533292.initial_effect(c) - --search - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(1533292,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c1533292.target) - e1:SetOperation(c1533292.operation) - c:RegisterEffect(e1) -end -function c1533292.filter(c) - return c:GetLevel()==2 and c:IsSetCard(0x1002) and c:IsAbleToHand() -end -function c1533292.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c1533292.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c1533292.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c1533292.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c15335853.lua b/script/c15335853.lua deleted file mode 100644 index aecf55bcc5..0000000000 --- a/script/c15335853.lua +++ /dev/null @@ -1,84 +0,0 @@ ---幻獣機サーバルホーク -function c15335853.initial_effect(c) - --level - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_UPDATE_LEVEL) - e1:SetValue(c15335853.lvval) - c:RegisterEffect(e1) - -- - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e2:SetCondition(c15335853.indcon) - e2:SetValue(1) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - c:RegisterEffect(e3) - --banish - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(15335853,0)) - e4:SetCategory(CATEGORY_REMOVE) - e4:SetType(EFFECT_TYPE_IGNITION) - e4:SetRange(LOCATION_MZONE) - e4:SetCountLimit(1) - e4:SetProperty(EFFECT_FLAG_CARD_TARGET) - e4:SetCost(c15335853.rmcost) - e4:SetTarget(c15335853.rmtg) - e4:SetOperation(c15335853.rmop) - c:RegisterEffect(e4) - --atklimit - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_SINGLE) - e5:SetCode(EFFECT_CANNOT_DIRECT_ATTACK) - c:RegisterEffect(e5) - local e6=Effect.CreateEffect(c) - e6:SetType(EFFECT_TYPE_SINGLE) - e6:SetCode(EFFECT_CANNOT_ATTACK) - e6:SetCondition(c15335853.atcon) - c:RegisterEffect(e6) -end -function c15335853.lvval(e,c) - local tp=c:GetControler() - local lv=0 - for i=0,4 do - local tc=Duel.GetFieldCard(tp,LOCATION_MZONE,i) - if tc and tc:IsCode(31533705) then lv=lv+tc:GetLevel() end - end - return lv -end -function c15335853.indcon(e) - return Duel.IsExistingMatchingCard(Card.IsType,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil,TYPE_TOKEN) -end -function c15335853.rmcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsType,1,nil,TYPE_TOKEN) end - local g=Duel.SelectReleaseGroup(tp,Card.IsType,1,1,nil,TYPE_TOKEN) - Duel.Release(g,REASON_COST) -end -function c15335853.rmfilter(c) - return c:IsAbleToRemove() -end -function c15335853.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and c15335853.rmfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c15335853.rmfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,c15335853.rmfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) -end -function c15335853.rmop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) - end -end -function c15335853.atfilter(c) - return not c:IsSetCard(0x101b) and c:IsType(TYPE_MONSTER) -end -function c15335853.atcon(e) - return Duel.IsExistingMatchingCard(c15335853.atfilter,e:GetHandlerPlayer(),LOCATION_GRAVE,0,1,nil) -end diff --git a/script/c15341821.lua b/script/c15341821.lua deleted file mode 100644 index ef4fd1b2f4..0000000000 --- a/script/c15341821.lua +++ /dev/null @@ -1,33 +0,0 @@ ---ダンディライオン -function c15341821.initial_effect(c) - --token - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(15341821,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetTarget(c15341821.target) - e1:SetOperation(c15341821.operation) - c:RegisterEffect(e1) -end -function c15341821.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,2,0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,0,0) -end -function c15341821.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 then return end - if not Duel.IsPlayerCanSpecialSummonMonster(tp,15341822,0,0x4011,0,0,1,RACE_PLANT,ATTRIBUTE_WIND) then return end - for i=1,2 do - local token=Duel.CreateToken(tp,15341821+i) - Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP_DEFENCE) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UNRELEASABLE_SUM) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - e1:SetValue(1) - token:RegisterEffect(e1,true) - end - Duel.SpecialSummonComplete() -end diff --git a/script/c15381252.lua b/script/c15381252.lua deleted file mode 100644 index 05dd9eeb02..0000000000 --- a/script/c15381252.lua +++ /dev/null @@ -1,47 +0,0 @@ ---狂戦士の魂 -function c15381252.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_BATTLE_DAMAGE) - e1:SetCountLimit(1,15381252+EFFECT_COUNT_CODE_OATH) - e1:SetCondition(c15381252.condition) - e1:SetCost(c15381252.cost) - e1:SetTarget(c15381252.target) - e1:SetOperation(c15381252.activate) - c:RegisterEffect(e1) -end -function c15381252.condition(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp and eg:GetFirst():GetControler()==tp and ev<=1500 and Duel.GetAttackTarget()==nil -end -function c15381252.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local g=Duel.GetFieldGroup(tp,LOCATION_HAND,0) - g:RemoveCard(e:GetHandler()) - return g:GetCount()>0 and g:FilterCount(Card.IsDiscardable,nil)==g:GetCount() - end - local g=Duel.GetFieldGroup(tp,LOCATION_HAND,0) - Duel.SendtoGrave(g,REASON_COST+REASON_DISCARD) -end -function c15381252.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,1) end -end -function c15381252.activate(e,tp,eg,ep,ev,re,r,rp) - local count=8 - while count>0 and Duel.IsPlayerCanDiscardDeck(tp,1) and Duel.GetLP(1-tp)>0 do - if count<8 then Duel.BreakEffect() end - Duel.ConfirmDecktop(tp,1) - local g=Duel.GetDecktopGroup(tp,1) - local tc=g:GetFirst() - if tc:IsType(TYPE_MONSTER) then - Duel.DisableShuffleCheck() - Duel.SendtoGrave(tc,REASON_EFFECT+REASON_REVEAL) - if tc:IsLocation(LOCATION_GRAVE) then - Duel.Damage(1-tp,500,REASON_EFFECT) - count=count-1 - else count=0 end - else - count=0 - end - end -end diff --git a/script/c15383415.lua b/script/c15383415.lua deleted file mode 100644 index ea2cde5938..0000000000 --- a/script/c15383415.lua +++ /dev/null @@ -1,47 +0,0 @@ ---スカラベの大群 -function c15383415.initial_effect(c) - --turn set - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(15383415,0)) - e1:SetCategory(CATEGORY_POSITION) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetTarget(c15383415.target) - e1:SetOperation(c15383415.operation) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(15383415,1)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - e2:SetTarget(c15383415.destg) - e2:SetOperation(c15383415.desop) - c:RegisterEffect(e2) -end -function c15383415.target(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsCanTurnSet() and c:GetFlagEffect(15383415)==0 end - c:RegisterFlagEffect(15383415,RESET_EVENT+0x1fc0000+RESET_PHASE+PHASE_END,0,1) - Duel.SetOperationInfo(0,CATEGORY_POSITION,c,1,0,0) -end -function c15383415.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - Duel.ChangePosition(c,POS_FACEDOWN_DEFENCE) - end -end -function c15383415.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsDestructable() end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c15383415.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c1539051.lua b/script/c1539051.lua deleted file mode 100644 index 97c808979d..0000000000 --- a/script/c1539051.lua +++ /dev/null @@ -1,47 +0,0 @@ ---スペーシア・ギフト -function c1539051.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c1539051.target) - e1:SetOperation(c1539051.activate) - c:RegisterEffect(e1) -end -function c1539051.gfilter(c) - return c:IsFaceup() and c:IsSetCard(0x1f) -end -function c1539051.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local g=Duel.GetMatchingGroup(c1539051.gfilter,tp,LOCATION_MZONE,0,nil) - local ct=c1539051.count_unique_code(g) - e:SetLabel(ct) - return ct>0 and Duel.IsPlayerCanDraw(tp,ct) - end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(e:GetLabel()) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,e:GetLabel()) -end -function c1539051.activate(e,tp,eg,ep,ev,re,r,rp) - local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) - local g=Duel.GetMatchingGroup(c1539051.gfilter,tp,LOCATION_MZONE,0,nil) - local ct=c1539051.count_unique_code(g) - Duel.Draw(p,ct,REASON_EFFECT) -end -function c1539051.count_unique_code(g) - local check={} - local count=0 - local tc=g:GetFirst() - while tc do - for i,code in ipairs({tc:GetCode()}) do - if not check[code] then - check[code]=true - count=count+1 - end - end - tc=g:GetNext() - end - return count -end diff --git a/script/c15394083.lua b/script/c15394083.lua deleted file mode 100644 index 6367381b2c..0000000000 --- a/script/c15394083.lua +++ /dev/null @@ -1,30 +0,0 @@ ---極星獣タングリスニ -function c15394083.initial_effect(c) - --token - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(15394083,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetCondition(c15394083.condition) - e1:SetTarget(c15394083.target) - e1:SetOperation(c15394083.operation) - c:RegisterEffect(e1) -end -function c15394083.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) -end -function c15394083.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,2,0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,0,0) -end -function c15394083.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 then return end - if not Duel.IsPlayerCanSpecialSummonMonster(tp,15394084,0x6042,0x4011,0,0,3,RACE_BEAST,ATTRIBUTE_EARTH) then return end - for i=1,2 do - local token=Duel.CreateToken(tp,15394084) - Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP) - end - Duel.SpecialSummonComplete() -end diff --git a/script/c15452043.lua b/script/c15452043.lua deleted file mode 100644 index f21b95e350..0000000000 --- a/script/c15452043.lua +++ /dev/null @@ -1,44 +0,0 @@ ---EMソード・フィッシュ -function c15452043.initial_effect(c) - --addown - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(15452043,0)) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetOperation(c15452043.operation) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e2) - --addown - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(15452043,1)) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - e3:SetRange(LOCATION_MZONE) - e3:SetCondition(c15452043.condition) - e3:SetOperation(c15452043.operation) - c:RegisterEffect(e3) -end -function c15452043.cfilter(c,tp) - return c:GetSummonPlayer()==tp -end -function c15452043.condition(e,tp,eg,ep,ev,re,r,rp) - return not eg:IsContains(e:GetHandler()) and eg:IsExists(c15452043.cfilter,1,nil,tp) -end -function c15452043.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil) - local tc=g:GetFirst() - while tc do - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(-600) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_UPDATE_DEFENCE) - tc:RegisterEffect(e2) - tc=g:GetNext() - end -end diff --git a/script/c15458892.lua b/script/c15458892.lua deleted file mode 100644 index 35badc7404..0000000000 --- a/script/c15458892.lua +++ /dev/null @@ -1,50 +0,0 @@ ---スターシップ・スパイ・プレーン -function c15458892.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c15458892.spcon) - c:RegisterEffect(e1) - --return to hand - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(15458892,0)) - e2:SetCategory(CATEGORY_TOHAND) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetCondition(c15458892.thcon) - e2:SetTarget(c15458892.thtg) - e2:SetOperation(c15458892.thop) - c:RegisterEffect(e2) -end -function c15458892.cfilter(c) - return c:IsFaceup() and c:IsType(TYPE_XYZ) -end -function c15458892.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c15458892.cfilter,tp,0,LOCATION_MZONE,1,nil) -end -function c15458892.thcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_HAND) -end -function c15458892.thfilter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand() -end -function c15458892.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() and c15458892.thfilter(chkc) end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g=Duel.SelectTarget(tp,c15458892.thfilter,tp,0,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0) -end -function c15458892.thop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - end -end diff --git a/script/c1546123.lua b/script/c1546123.lua deleted file mode 100644 index afa20a5ade..0000000000 --- a/script/c1546123.lua +++ /dev/null @@ -1,11 +0,0 @@ ---サイバー・エンド・ドラゴン -function c1546123.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcCodeRep(c,70095154,3,false,true) - --pierce - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_PIERCE) - c:RegisterEffect(e2) -end diff --git a/script/c15471265.lua b/script/c15471265.lua deleted file mode 100644 index 975ea2d4e2..0000000000 --- a/script/c15471265.lua +++ /dev/null @@ -1,55 +0,0 @@ ---バーサーカークラッシュ -function c15471265.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetCondition(c15471265.condition) - e1:SetCost(c15471265.cost) - e1:SetTarget(c15471265.target) - e1:SetOperation(c15471265.activate) - c:RegisterEffect(e1) -end -function c15471265.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end -function c15471265.cfilter(c) - return c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost() -end -function c15471265.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c15471265.cfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c15471265.cfilter,tp,LOCATION_GRAVE,0,1,1,nil) - e:SetLabelObject(g:GetFirst()) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c15471265.filter(c) - return c:IsFaceup() and c:IsCode(57116033) -end -function c15471265.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c15471265.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c15471265.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - local g=Duel.SelectTarget(tp,c15471265.filter,tp,LOCATION_MZONE,0,1,1,nil) -end -function c15471265.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - local rc=e:GetLabelObject() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - e1:SetValue(rc:GetTextAttack()) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_SET_DEFENCE_FINAL) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - e2:SetValue(rc:GetTextDefence()) - tc:RegisterEffect(e2) - end -end diff --git a/script/c15475415.lua b/script/c15475415.lua deleted file mode 100644 index c27b3dd3f8..0000000000 --- a/script/c15475415.lua +++ /dev/null @@ -1,48 +0,0 @@ ---エーリアン・ドッグ -function c15475415.initial_effect(c) - --summon success - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(15475415,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c15475415.spcon) - e1:SetTarget(c15475415.sptg) - e1:SetOperation(c15475415.spop) - c:RegisterEffect(e1) - --counter - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(15475415,1)) - e2:SetCategory(CATEGORY_COUNTER) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetCondition(c15475415.ctcon) - e2:SetOperation(c15475415.ctop) - c:RegisterEffect(e2) -end -function c15475415.spcon(e,tp,eg,ep,ev,re,r,rp) - return ep==tp and eg:GetFirst():IsSetCard(0xc) -end -function c15475415.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,1,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c15475415.spop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - Duel.SpecialSummon(e:GetHandler(),1,tp,tp,false,false,POS_FACEUP) - end -end -function c15475415.ctcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+1 -end -function c15475415.ctop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil) - if g:GetCount()==0 then return end - for i=1,2 do - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - local sg=g:Select(tp,1,1,nil) - sg:GetFirst():AddCounter(0xe,1) - end -end diff --git a/script/c15521027.lua b/script/c15521027.lua deleted file mode 100644 index 65c2290021..0000000000 --- a/script/c15521027.lua +++ /dev/null @@ -1,93 +0,0 @@ ---D・スマホン -function c15521027.initial_effect(c) - c:EnableReviveLimit() - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(15521027,0)) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c15521027.spcon) - e1:SetOperation(c15521027.spop) - c:RegisterEffect(e1) - --tohand - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(15521027,1)) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCondition(c15521027.cona) - e2:SetTarget(c15521027.tga) - e2:SetOperation(c15521027.opa) - c:RegisterEffect(e2) - --sort deck - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(15521027,2)) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1) - e3:SetCondition(c15521027.cond) - e3:SetTarget(c15521027.tgd) - e3:SetOperation(c15521027.opd) - c:RegisterEffect(e3) -end -function c15521027.spfilter(c) - return c:IsSetCard(0x26) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost() -end -function c15521027.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c15521027.spfilter,tp,LOCATION_GRAVE,0,1,nil) -end -function c15521027.spop(e,tp,eg,ep,ev,re,r,rp,c) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c15521027.spfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c15521027.cona(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsAttackPos() -end -function c15521027.tga(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0 end - Duel.SetOperationInfo(0,CATEGORY_DICE,nil,0,tp,1) -end -function c15521027.filter(c) - return c:IsSetCard(0x26) and c:IsAbleToHand() -end -function c15521027.opa(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)==0 then return end - local dc=Duel.TossDice(tp,1) - Duel.ConfirmDecktop(tp,dc) - local dg=Duel.GetDecktopGroup(tp,dc) - local g=dg:Filter(c15521027.filter,nil) - if g:GetCount()>0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local sg=g:Select(tp,1,1,nil) - Duel.SendtoHand(sg,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,sg) - end - Duel.ShuffleDeck(tp) -end -function c15521027.cond(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsDefencePos() -end -function c15521027.tgd(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0 end - Duel.SetOperationInfo(0,CATEGORY_DICE,nil,0,tp,1) -end -function c15521027.opd(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)==0 then return end - local dc=Duel.TossDice(tp,1) - local g=Duel.GetDecktopGroup(tp,dc) - local ct=g:GetCount() - Duel.ConfirmCards(tp,g) - local op=Duel.SelectOption(tp,aux.Stringid(15521027,3),aux.Stringid(15521027,4)) - Duel.SortDecktop(tp,tp,ct) - if op==0 then return end - for i=1,ct do - local tg=Duel.GetDecktopGroup(tp,1) - Duel.MoveSequence(tg:GetFirst(),1) - end -end diff --git a/script/c15545291.lua b/script/c15545291.lua deleted file mode 100644 index 8bc1f2e38d..0000000000 --- a/script/c15545291.lua +++ /dev/null @@ -1,84 +0,0 @@ ---剛地帝グランマーグ -function c15545291.initial_effect(c) - --summon with 1 tribute - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(15545291,0)) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SUMMON_PROC) - e1:SetCondition(c15545291.otcon) - e1:SetOperation(c15545291.otop) - e1:SetValue(SUMMON_TYPE_ADVANCE) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_SET_PROC) - c:RegisterEffect(e2) - --destroy - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(15545291,1)) - e3:SetCategory(CATEGORY_DESTROY+CATEGORY_DRAW) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetCode(EVENT_SUMMON_SUCCESS) - e3:SetCondition(c15545291.descon) - e3:SetTarget(c15545291.destg) - e3:SetOperation(c15545291.desop) - c:RegisterEffect(e3) - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetCode(EFFECT_MATERIAL_CHECK) - e4:SetValue(c15545291.valcheck) - e4:SetLabelObject(e3) - c:RegisterEffect(e4) -end -function c15545291.otfilter(c) - return bit.band(c:GetSummonType(),SUMMON_TYPE_ADVANCE)==SUMMON_TYPE_ADVANCE -end -function c15545291.otcon(e,c) - if c==nil then return true end - local mg=Duel.GetMatchingGroup(c15545291.otfilter,0,LOCATION_MZONE,LOCATION_MZONE,nil) - return c:GetLevel()>6 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-1 - and Duel.GetTributeCount(c,mg)>0 -end -function c15545291.otop(e,tp,eg,ep,ev,re,r,rp,c) - local mg=Duel.GetMatchingGroup(c15545291.otfilter,0,LOCATION_MZONE,LOCATION_MZONE,nil) - local sg=Duel.SelectTribute(tp,c,1,1,mg) - c:SetMaterial(sg) - Duel.Release(sg,REASON_SUMMON+REASON_MATERIAL) -end -function c15545291.descon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_ADVANCE -end -function c15545291.desfilter(c) - return c:IsFacedown() and c:IsDestructable() -end -function c15545291.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and c15545291.desfilter(chkc) end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c15545291.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,2,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) - if e:GetLabel()==1 then - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) - end -end -function c15545291.dfilter(c,e) - return c:IsFacedown() and c:IsRelateToEffect(e) -end -function c15545291.desop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(c15545291.dfilter,nil,e) - if g:GetCount()>0 then - Duel.Destroy(g,REASON_EFFECT) - end - if e:GetLabel()==1 then - Duel.Draw(tp,1,REASON_EFFECT) - end -end -function c15545291.valcheck(e,c) - local g=c:GetMaterial() - if g:IsExists(Card.IsAttribute,1,nil,ATTRIBUTE_EARTH) then - e:GetLabelObject():SetLabel(1) - else - e:GetLabelObject():SetLabel(0) - end -end diff --git a/script/c15552258.lua b/script/c15552258.lua deleted file mode 100644 index ef7daea487..0000000000 --- a/script/c15552258.lua +++ /dev/null @@ -1,37 +0,0 @@ ---ハーフorストップ -function c15552258.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_BATTLE_START) - e1:SetCondition(c15552258.condition) - e1:SetOperation(c15552258.activate) - c:RegisterEffect(e1) -end -function c15552258.condition(e,tp,eg,ep,ev,re,r,rp) - return tp~=Duel.GetTurnPlayer() and Duel.GetCurrentPhase()==PHASE_BATTLE -end -function c15552258.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil) - local opt=0 - if g:GetCount()==0 then - opt=Duel.SelectOption(1-tp,aux.Stringid(15552258,1))+1 - else - opt=Duel.SelectOption(1-tp,aux.Stringid(15552258,0),aux.Stringid(15552258,1)) - end - if opt==1 then - Duel.SkipPhase(1-tp,PHASE_BATTLE,RESET_PHASE+PHASE_BATTLE,1) - return - end - local tc=g:GetFirst() - while tc do - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetValue(tc:GetAttack()/2) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_BATTLE) - tc:RegisterEffect(e1) - tc=g:GetNext() - end -end diff --git a/script/c15561463.lua b/script/c15561463.lua deleted file mode 100644 index 335dede5c6..0000000000 --- a/script/c15561463.lua +++ /dev/null @@ -1,37 +0,0 @@ ---ガントレット・シューター -function c15561463.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,6,2) - c:EnableReviveLimit() - --destroy - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetDescription(aux.Stringid(15561463,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c15561463.descost) - e1:SetTarget(c15561463.destg) - e1:SetOperation(c15561463.desop) - c:RegisterEffect(e1) -end -function c15561463.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c15561463.filter(c) - return c:IsDestructable() -end -function c15561463.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c15561463.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c15561463.filter,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c15561463.filter,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c15561463.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c1557341.lua b/script/c1557341.lua deleted file mode 100644 index 85e7b97a04..0000000000 --- a/script/c1557341.lua +++ /dev/null @@ -1,27 +0,0 @@ ---復讐の女戦士ローズ -function c1557341.initial_effect(c) - --damage - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(1557341,0)) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_BATTLE_DAMAGE) - e1:SetCondition(c1557341.condition) - e1:SetTarget(c1557341.target) - e1:SetOperation(c1557341.operation) - c:RegisterEffect(e1) -end -function c1557341.condition(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp -end -function c1557341.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(300) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,300) -end -function c1557341.operation(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c15574615.lua b/script/c15574615.lua deleted file mode 100644 index 15cb334455..0000000000 --- a/script/c15574615.lua +++ /dev/null @@ -1,83 +0,0 @@ ---異次元ジェット・アイアン号 -function c15574615.initial_effect(c) - c:EnableReviveLimit() - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c15574615.spcon) - e1:SetOperation(c15574615.spop) - c:RegisterEffect(e1) - --atk - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(15574615,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCost(c15574615.cost) - e2:SetTarget(c15574615.target) - e2:SetOperation(c15574615.operation) - c:RegisterEffect(e2) -end -function c15574615.spfilter(c,code) - return (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) and c:IsCode(code) and c:IsAbleToGraveAsCost() -end -function c15574615.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.GetLocationCount(tp,LOCATION_MZONE,0)~=0 - and Duel.IsExistingMatchingCard(c15574615.spfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,nil,80208158) - and Duel.IsExistingMatchingCard(c15574615.spfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,nil,16796157) - and Duel.IsExistingMatchingCard(c15574615.spfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,nil,43791861) - and Duel.IsExistingMatchingCard(c15574615.spfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,nil,79185500) -end -function c15574615.spop(e,tp,eg,ep,ev,re,r,rp,c) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g1=Duel.SelectMatchingCard(tp,c15574615.spfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,nil,80208158) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g2=Duel.SelectMatchingCard(tp,c15574615.spfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,nil,16796157) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g3=Duel.SelectMatchingCard(tp,c15574615.spfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,nil,43791861) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g4=Duel.SelectMatchingCard(tp,c15574615.spfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,nil,79185500) - g1:Merge(g2) - g1:Merge(g3) - g1:Merge(g4) - Duel.SendtoGrave(g1,REASON_COST) -end -function c15574615.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end -function c15574615.spfilter2(c,e,tp,code) - return c:IsCode(code) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c15574615.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>=3 - and Duel.IsExistingTarget(c15574615.spfilter2,tp,LOCATION_GRAVE,0,1,nil,e,tp,80208158) - and Duel.IsExistingTarget(c15574615.spfilter2,tp,LOCATION_GRAVE,0,1,nil,e,tp,16796157) - and Duel.IsExistingTarget(c15574615.spfilter2,tp,LOCATION_GRAVE,0,1,nil,e,tp,43791861) - and Duel.IsExistingTarget(c15574615.spfilter2,tp,LOCATION_GRAVE,0,1,nil,e,tp,79185500) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g1=Duel.SelectTarget(tp,c15574615.spfilter2,tp,LOCATION_GRAVE,0,1,1,nil,e,tp,80208158) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g2=Duel.SelectTarget(tp,c15574615.spfilter2,tp,LOCATION_GRAVE,0,1,1,nil,e,tp,16796157) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g3=Duel.SelectTarget(tp,c15574615.spfilter2,tp,LOCATION_GRAVE,0,1,1,nil,e,tp,43791861) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g4=Duel.SelectTarget(tp,c15574615.spfilter2,tp,LOCATION_GRAVE,0,1,1,nil,e,tp,79185500) - g1:Merge(g2) - g1:Merge(g3) - g1:Merge(g4) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g1,4,0,0) -end -function c15574615.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if g:GetCount()>ft then return end - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) -end diff --git a/script/c1557499.lua b/script/c1557499.lua deleted file mode 100644 index 577e2a2db9..0000000000 --- a/script/c1557499.lua +++ /dev/null @@ -1,50 +0,0 @@ ---銀の弓矢 -function c1557499.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c1557499.target) - e1:SetOperation(c1557499.operation) - c:RegisterEffect(e1) - --atk up - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(300) - c:RegisterEffect(e2) - --def up - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_EQUIP) - e3:SetCode(EFFECT_UPDATE_DEFENCE) - e3:SetValue(300) - c:RegisterEffect(e3) - --equip limit - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetCode(EFFECT_EQUIP_LIMIT) - e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e4:SetValue(c1557499.eqlimit) - c:RegisterEffect(e4) -end -function c1557499.eqlimit(e,c) - return c:IsRace(RACE_FAIRY) -end -function c1557499.filter(c) - return c:IsFaceup() and c:IsRace(RACE_FAIRY) -end -function c1557499.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c1557499.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c1557499.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c1557499.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c1557499.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,e:GetHandler(),tc) - end -end diff --git a/script/c15576074.lua b/script/c15576074.lua deleted file mode 100644 index 37490b8b3c..0000000000 --- a/script/c15576074.lua +++ /dev/null @@ -1,39 +0,0 @@ ---リゾネーター・エンジン -function c15576074.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TODECK+CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c15576074.target) - e1:SetOperation(c15576074.activate) - c:RegisterEffect(e1) -end -function c15576074.filter(c) - return c:IsSetCard(0x57) and c:IsType(TYPE_MONSTER) and c:IsAbleToDeck() -end -function c15576074.filter2(c) - return c:GetLevel()==4 and c:IsAbleToHand() -end -function c15576074.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c15576074.filter(chkc) end - if chk==0 then return Duel.IsExistingMatchingCard(c15576074.filter2,tp,LOCATION_DECK,0,1,nil) - and Duel.IsExistingTarget(c15576074.filter,tp,LOCATION_GRAVE,0,2,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectTarget(tp,c15576074.filter,tp,LOCATION_GRAVE,0,2,2,nil) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c15576074.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c15576074.filter2,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) - if g:GetCount()~=0 then - Duel.SendtoDeck(g,nil,0,REASON_EFFECT) - end -end diff --git a/script/c15582767.lua b/script/c15582767.lua deleted file mode 100644 index f3353a2016..0000000000 --- a/script/c15582767.lua +++ /dev/null @@ -1,68 +0,0 @@ ---連成する振動 -function c15582767.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c15582767.target1) - e1:SetOperation(c15582767.operation) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(15582767,0)) - e2:SetCategory(CATEGORY_DESTROY+CATEGORY_DRAW) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetRange(LOCATION_SZONE) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCountLimit(1,15582767) - e2:SetCost(c15582767.cost) - e2:SetTarget(c15582767.target2) - e2:SetOperation(c15582767.operation) - e2:SetLabel(1) - c:RegisterEffect(e2) -end -function c15582767.filter(c) - return (c:GetSequence()==6 or c:GetSequence()==7) and c:IsDestructable() -end -function c15582767.target1(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_SZONE) and chkc:IsControler(tp) and c15582767.filter(chkc) end - if chk==0 then return true end - if Duel.GetFlagEffect(tp,15582767)==0 and Duel.IsPlayerCanDraw(tp,1) - and Duel.IsExistingTarget(c15582767.filter,tp,LOCATION_SZONE,0,1,nil) - and Duel.SelectYesNo(tp,94) then - e:SetCategory(CATEGORY_DESTROY+CATEGORY_DRAW) - e:SetProperty(EFFECT_FLAG_CARD_TARGET) - Duel.RegisterFlagEffect(tp,15582767,RESET_PHASE+PHASE_END,0,1) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c15582767.filter,tp,LOCATION_SZONE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) - e:SetLabel(1) - else - e:SetCategory(0) - e:SetProperty(0) - e:SetLabel(0) - end -end -function c15582767.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetFlagEffect(tp,15582767)==0 end - Duel.RegisterFlagEffect(tp,15582767,RESET_PHASE+PHASE_END,0,1) -end -function c15582767.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_SZONE) and chkc:IsControler(tp) and c15582767.filter(chkc) end - if chk==0 then return Duel.IsPlayerCanDraw(tp,1) - and Duel.IsExistingTarget(c15582767.filter,tp,LOCATION_SZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c15582767.filter,tp,LOCATION_SZONE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c15582767.operation(e,tp,eg,ep,ev,re,r,rp) - if e:GetLabel()==0 or not e:GetHandler():IsRelateToEffect(e) then return end - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)~=0 then - Duel.BreakEffect() - Duel.Draw(tp,1,REASON_EFFECT) - end -end diff --git a/script/c15595052.lua b/script/c15595052.lua deleted file mode 100644 index f6ef2845ca..0000000000 --- a/script/c15595052.lua +++ /dev/null @@ -1,48 +0,0 @@ ---封魔の伝承者 -function c15595052.initial_effect(c) - --to defence - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(15595052,0)) - e1:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_SINGLE) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetOperation(c15595052.ancop) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - c:RegisterEffect(e2) - local e3=e1:Clone() - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e3) -end -function c15595052.ancop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local ct=Duel.GetMatchingGroupCount(Card.IsCode,tp,LOCATION_GRAVE,0,nil,15595052) - if ct>0 and c:IsFaceup() and c:IsRelateToEffect(e) then - Duel.Hint(HINT_SELECTMSG,tp,562) - local att=Duel.AnnounceAttribute(tp,ct,0xffff) - e:GetHandler():SetHint(CHINT_ATTRIBUTE,att) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(15595052,1)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_BATTLE_START) - e1:SetTarget(c15595052.destg) - e1:SetOperation(c15595052.desop) - e1:SetLabel(att) - e1:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e1) - end -end -function c15595052.destg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - local bc=Duel.GetAttackTarget() - if chk==0 then return c==Duel.GetAttacker() and bc and bc:IsFaceup() and bc:IsAttribute(e:GetLabel()) end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,bc,1,0,0) -end -function c15595052.desop(e,tp,eg,ep,ev,re,r,rp) - local bc=Duel.GetAttackTarget() - if bc:IsRelateToBattle() and bc:IsFaceup() then - Duel.Destroy(bc,REASON_EFFECT) - end -end diff --git a/script/c15605085.lua b/script/c15605085.lua deleted file mode 100644 index e39f03fada..0000000000 --- a/script/c15605085.lua +++ /dev/null @@ -1,57 +0,0 @@ ---ソーラー・ジェネクス -function c15605085.initial_effect(c) - --summon with 1 tribute - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(15605085,0)) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SUMMON_PROC) - e1:SetCondition(c15605085.otcon) - e1:SetOperation(c15605085.otop) - e1:SetValue(SUMMON_TYPE_ADVANCE) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(15605085,1)) - e2:SetCategory(CATEGORY_DAMAGE) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetRange(LOCATION_MZONE) - e2:SetCondition(c15605085.damcon) - e2:SetTarget(c15605085.damtg) - e2:SetOperation(c15605085.damop) - c:RegisterEffect(e2) -end -function c15605085.otfilter(c,tp) - return c:IsSetCard(0x2) and (c:IsControler(tp) or c:IsFaceup()) -end -function c15605085.otcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - local mg=Duel.GetMatchingGroup(c15605085.otfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp) - return c:GetLevel()>6 and Duel.GetTributeCount(c,mg)>0 -end -function c15605085.otop(e,tp,eg,ep,ev,re,r,rp,c) - local mg=Duel.GetMatchingGroup(c15605085.otfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp) - local sg=Duel.SelectTribute(tp,c,1,1,mg) - c:SetMaterial(sg) - Duel.Release(sg, REASON_SUMMON+REASON_MATERIAL) -end -function c15605085.cfilter(c,tp) - return c:IsSetCard(0x2) and c:GetPreviousControler()==tp and c:GetPreviousLocation()==LOCATION_MZONE - and c:IsPreviousPosition(POS_FACEUP) -end -function c15605085.damcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c15605085.cfilter,1,nil,tp) -end -function c15605085.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(500) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,500) -end -function c15605085.damop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c15609017.lua b/script/c15609017.lua deleted file mode 100644 index 88a7008a54..0000000000 --- a/script/c15609017.lua +++ /dev/null @@ -1,45 +0,0 @@ ---ヒドゥン・ショット -function c15609017.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c15609017.cost) - e1:SetTarget(c15609017.target) - e1:SetOperation(c15609017.activate) - c:RegisterEffect(e1) -end -function c15609017.cost(e,tp,eg,ep,ev,re,r,rp,chk) - e:SetLabel(1) - return true -end -function c15609017.costfilter(c) - return c:IsSetCard(0x2016) and c:IsAbleToRemoveAsCost() -end -function c15609017.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsDestructable() end - if chk==0 then - if e:GetLabel()==1 then - e:SetLabel(0) - return Duel.IsExistingMatchingCard(c15609017.costfilter,tp,LOCATION_GRAVE,0,1,nil) - and Duel.IsExistingTarget(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) - else return false end - end - e:SetLabel(0) - local rt=Duel.GetTargetCount(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler()) - if rt>2 then rt=2 end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local cg=Duel.SelectMatchingCard(tp,c15609017.costfilter,tp,LOCATION_GRAVE,0,1,rt,nil) - local ct=cg:GetCount() - Duel.Remove(cg,POS_FACEUP,REASON_COST) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,ct,ct,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c15609017.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local sg=g:Filter(Card.IsRelateToEffect,nil,e) - Duel.Destroy(sg,REASON_EFFECT) -end diff --git a/script/c15629801.lua b/script/c15629801.lua deleted file mode 100644 index 3672076e5c..0000000000 --- a/script/c15629801.lua +++ /dev/null @@ -1,65 +0,0 @@ ---武闘円舞 -function c15629801.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c15629801.target) - e1:SetOperation(c15629801.activate) - c:RegisterEffect(e1) -end -function c15629801.filter(c,e,tp) - return c:IsFaceup() and c:IsType(TYPE_SYNCHRO) - and Duel.IsPlayerCanSpecialSummonMonster(tp,15629802,0,0x4011,c:GetAttack(),c:GetDefence(),c:GetLevel(),c:GetRace(),c:GetAttribute()) -end -function c15629801.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c15629801.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c15629801.filter,tp,LOCATION_MZONE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - local g=Duel.SelectTarget(tp,c15629801.filter,tp,LOCATION_MZONE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0) -end -function c15629801.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local tc=Duel.GetFirstTarget() - if tc:IsFacedown() or not tc:IsRelateToEffect(e) then return end - if not Duel.IsPlayerCanSpecialSummonMonster(tp,15629802,0,0x4011,tc:GetAttack(),tc:GetDefence(),tc:GetLevel(),tc:GetRace(),tc:GetAttribute()) then return end - local token=Duel.CreateToken(tp,15629802) - Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_BASE_ATTACK) - e1:SetValue(tc:GetAttack()) - e1:SetReset(RESET_EVENT+0x1fe0000) - token:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_SET_BASE_DEFENCE) - e2:SetValue(tc:GetDefence()) - token:RegisterEffect(e2) - local e3=e1:Clone() - e3:SetCode(EFFECT_CHANGE_LEVEL) - e3:SetValue(tc:GetLevel()) - token:RegisterEffect(e3) - local e4=e1:Clone() - e4:SetCode(EFFECT_CHANGE_RACE) - e4:SetValue(tc:GetRace()) - token:RegisterEffect(e4) - local e5=e1:Clone() - e5:SetCode(EFFECT_CHANGE_ATTRIBUTE) - e5:SetValue(tc:GetAttribute()) - token:RegisterEffect(e5) - local e6=Effect.CreateEffect(e:GetHandler()) - e6:SetType(EFFECT_TYPE_SINGLE) - e6:SetCode(EFFECT_NO_BATTLE_DAMAGE) - e6:SetValue(1) - e6:SetReset(RESET_EVENT+0x1fe0000) - token:RegisterEffect(e6) - local e7=e6:Clone() - e7:SetCode(EFFECT_AVOID_BATTLE_DAMAGE) - token:RegisterEffect(e7) - Duel.SpecialSummonComplete() -end diff --git a/script/c15653824.lua b/script/c15653824.lua deleted file mode 100644 index a2e2177fbe..0000000000 --- a/script/c15653824.lua +++ /dev/null @@ -1,33 +0,0 @@ ---スカル・ナイト -function c15653824.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(15653824,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_BE_MATERIAL) - e1:SetCondition(c15653824.spcon) - e1:SetTarget(c15653824.sptg) - e1:SetOperation(c15653824.spop) - c:RegisterEffect(e1) -end -function c15653824.spcon(e,tp,eg,ep,ev,re,r,rp) - if r~=REASON_SUMMON then return false end - local rc=e:GetHandler():GetReasonCard() - return rc:IsFaceup() and rc:IsRace(RACE_FIEND) -end -function c15653824.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c15653824.spfilter(c,e,tp) - return c:IsCode(15653824) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c15653824.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local tc=Duel.GetFirstMatchingCard(c15653824.spfilter,tp,LOCATION_DECK,0,nil,e,tp) - if tc then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c15658249.lua b/script/c15658249.lua deleted file mode 100644 index fb6c6c73b3..0000000000 --- a/script/c15658249.lua +++ /dev/null @@ -1,26 +0,0 @@ ---ワーム・バルサス -function c15658249.initial_effect(c) - --position - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(15658249,0)) - e1:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_SINGLE) - e1:SetCategory(CATEGORY_POSITION) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c15658249.postg) - e1:SetOperation(c15658249.posop) - c:RegisterEffect(e1) -end -function c15658249.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsDefencePos() end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE) - local g=Duel.SelectTarget(tp,Card.IsDefencePos,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_POSITION,g,g:GetCount(),0,0) -end -function c15658249.posop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsDefencePos() and tc:IsRelateToEffect(e) then - Duel.ChangePosition(tc,0,0,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK) - end -end diff --git a/script/c15667446.lua b/script/c15667446.lua deleted file mode 100644 index 67dd8392bc..0000000000 --- a/script/c15667446.lua +++ /dev/null @@ -1,46 +0,0 @@ ---暗黒界の闘神 ラチナ -function c15667446.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(15667446,0)) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCondition(c15667446.spcon) - e1:SetTarget(c15667446.sptg) - e1:SetOperation(c15667446.spop) - c:RegisterEffect(e1) -end -function c15667446.spcon(e,tp,eg,ep,ev,re,r,rp) - e:SetLabel(e:GetHandler():GetPreviousControler()) - return e:GetHandler():IsPreviousLocation(LOCATION_HAND) and bit.band(r,0x4040)==0x4040 -end -function c15667446.atfilter(c) - return c:IsFaceup() and c:IsRace(RACE_FIEND) -end -function c15667446.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c15667446.atfilter(chkc) end - if chk==0 then return true end - if rp~=tp and tp==e:GetLabel() then - e:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_ATKCHANGE) - e:SetProperty(EFFECT_FLAG_CARD_TARGET) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c15667446.atfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - else - e:SetCategory(CATEGORY_SPECIAL_SUMMON) - end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c15667446.spop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) and Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP)>0 then - local tc=Duel.GetFirstTarget() - if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) then - Duel.BreakEffect() - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(500) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - end - end -end diff --git a/script/c15684835.lua b/script/c15684835.lua deleted file mode 100644 index d68ea678a4..0000000000 --- a/script/c15684835.lua +++ /dev/null @@ -1,78 +0,0 @@ ---イービル・ブラスト -function c15684835.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c15684835.target) - e1:SetOperation(c15684835.operation) - c:RegisterEffect(e1) -end -function c15684835.filter(c,e,tp) - return c:IsFaceup() and c:IsControler(1-tp) and c:IsCanBeEffectTarget(e) -end -function c15684835.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return eg:IsContains(chkc) and c15684835.filter(chkc,e,tp) end - if chk==0 then return eg:IsExists(c15684835.filter,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local g=eg:FilterSelect(tp,c15684835.filter,1,1,nil,e,tp) - Duel.SetTargetCard(g) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c15684835.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsLocation(LOCATION_SZONE) then return end - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,c,tc) - c:CancelToGrave() - --damage - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(15684835,0)) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) - e1:SetRange(LOCATION_SZONE) - e1:SetCountLimit(1) - e1:SetCondition(c15684835.damcon) - e1:SetTarget(c15684835.damtg) - e1:SetOperation(c15684835.damop) - e1:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e1) - --Atkup - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(500) - e2:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e2) - --Equip limit - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_EQUIP_LIMIT) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e3:SetValue(c15684835.eqlimit) - e3:SetLabelObject(tc) - e3:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e3) - end -end -function c15684835.eqlimit(e,c) - return c==e:GetLabelObject() -end -function c15684835.damcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp -end -function c15684835.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(500) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,500) -end -function c15684835.damop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c15717011.lua b/script/c15717011.lua deleted file mode 100644 index c8869dea61..0000000000 --- a/script/c15717011.lua +++ /dev/null @@ -1,59 +0,0 @@ ---融合呪印生物-光 -function c15717011.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetDescription(aux.Stringid(15717011,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetLabel(0) - e1:SetCost(c15717011.cost) - e1:SetTarget(c15717011.target) - e1:SetOperation(c15717011.operation) - c:RegisterEffect(e1) - --fusion substitute - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_FUSION_SUBSTITUTE) - e2:SetCondition(c15717011.subcon) - c:RegisterEffect(e2) -end -function c15717011.subcon(e) - return e:GetHandler():IsLocation(0x1e) -end -function c15717011.filter(c,e,tp,m,gc) - return c:IsType(TYPE_FUSION) and c:IsAttribute(ATTRIBUTE_LIGHT) - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:CheckFusionMaterial(m,gc) -end -function c15717011.cost(e,tp,eg,ep,ev,re,r,rp,chk) - e:SetLabel(1) - return true -end -function c15717011.target(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then - if e:GetLabel()==0 then return false end - e:SetLabel(0) - local mg=Duel.GetMatchingGroup(Card.IsCanBeFusionMaterial,tp,LOCATION_MZONE,0,nil) - return Duel.IsExistingMatchingCard(c15717011.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg,c) - end - e:SetLabel(0) - local mg=Duel.GetMatchingGroup(Card.IsCanBeFusionMaterial,tp,LOCATION_MZONE,0,nil) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c15717011.filter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,mg,c) - local mat=Duel.SelectFusionMaterial(tp,g:GetFirst(),mg,c) - Duel.Release(mat,REASON_COST) - e:SetLabelObject(g:GetFirst()) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function c15717011.filter2(c,e,tp,code) - return c:IsCode(code) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c15717011.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local code=e:GetLabelObject():GetCode() - local tc=Duel.GetFirstMatchingCard(c15717011.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,code) - if tc then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c1571945.lua b/script/c1571945.lua deleted file mode 100644 index ab88f50fb4..0000000000 --- a/script/c1571945.lua +++ /dev/null @@ -1,28 +0,0 @@ ---白い忍者 -function c1571945.initial_effect(c) - --flip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(1571945,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP) - e1:SetTarget(c1571945.target) - e1:SetOperation(c1571945.operation) - c:RegisterEffect(e1) -end -function c1571945.filter(c) - return c:IsDefencePos() and c:IsDestructable() -end -function c1571945.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c1571945.filter(chkc) end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c1571945.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c1571945.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsDefencePos() and tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c15721123.lua b/script/c15721123.lua deleted file mode 100644 index 45a210efc2..0000000000 --- a/script/c15721123.lua +++ /dev/null @@ -1,45 +0,0 @@ ---対峙するG -function c15721123.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(15721123,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetRange(LOCATION_HAND) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(c15721123.spcon) - e1:SetTarget(c15721123.sptg) - e1:SetOperation(c15721123.spop) - c:RegisterEffect(e1) -end -function c15721123.cfilter(c,tp) - return c:GetSummonPlayer()==tp and c:IsPreviousLocation(LOCATION_EXTRA) -end -function c15721123.spcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c15721123.cfilter,1,nil,1-tp) -end -function c15721123.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c15721123.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_IMMUNE_EFFECT) - e1:SetValue(c15721123.efilter) - e1:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e1) - end -end -function c15721123.efilter(e,te) - if not te:IsActiveType(TYPE_MONSTER) then return false end - local c=e:GetHandler() - local ec=te:GetHandler() - if ec:IsHasCardTarget(c) then return true end - return te:IsHasType(EFFECT_TYPE_ACTIONS) and te:IsHasProperty(EFFECT_FLAG_CARD_TARGET) and c:IsRelateToEffect(te) -end diff --git a/script/c15767889.lua b/script/c15767889.lua deleted file mode 100644 index 404aa589fb..0000000000 --- a/script/c15767889.lua +++ /dev/null @@ -1,37 +0,0 @@ ---騎士デイ・グレファー -function c15767889.initial_effect(c) - aux.EnableDualAttribute(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(15767889,0)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1,15767889) - e1:SetCondition(c15767889.thcon) - e1:SetTarget(c15767889.thtg) - e1:SetOperation(c15767889.thop) - c:RegisterEffect(e1) -end -function c15767889.thcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsDualState() and Duel.GetTurnPlayer()==tp -end -function c15767889.filter(c) - return c:IsType(TYPE_EQUIP) and c:IsAbleToHand() -end -function c15767889.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c15767889.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c15767889.filter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g=Duel.SelectTarget(tp,c15767889.filter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c15767889.thop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end diff --git a/script/c15800838.lua b/script/c15800838.lua deleted file mode 100644 index 0f6cdf9387..0000000000 --- a/script/c15800838.lua +++ /dev/null @@ -1,35 +0,0 @@ ---マインドクラッシュ -function c15800838.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_TOHAND) - e1:SetCategory(CATEGORY_HANDES) - e1:SetTarget(c15800838.target) - e1:SetOperation(c15800838.operation) - c:RegisterEffect(e1) -end -function c15800838.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0 - and Duel.IsExistingMatchingCard(nil,tp,LOCATION_HAND,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,564) - local ac=Duel.AnnounceCard(tp) - e:SetLabel(ac) - e:GetHandler():SetHint(CHINT_CARD,ac) -end -function c15800838.operation(e,tp,eg,ep,ev,re,r,rp) - local ac=e:GetLabel() - local g=Duel.GetMatchingGroup(Card.IsCode,tp,0,LOCATION_HAND,nil,ac) - local hg=Duel.GetFieldGroup(tp,0,LOCATION_HAND) - Duel.ConfirmCards(tp,hg) - if g:GetCount()>0 then - Duel.SendtoGrave(g,REASON_EFFECT+REASON_DISCARD) - Duel.ShuffleHand(1-tp) - else - local sg=Duel.GetFieldGroup(tp,LOCATION_HAND,0) - local dg=sg:RandomSelect(tp,1) - Duel.SendtoGrave(dg,REASON_EFFECT+REASON_DISCARD) - Duel.ShuffleHand(1-tp) - end -end diff --git a/script/c15839054.lua b/script/c15839054.lua deleted file mode 100644 index 4311ec4dd8..0000000000 --- a/script/c15839054.lua +++ /dev/null @@ -1,32 +0,0 @@ ---シンクロ・フュージョニスト -function c15839054.initial_effect(c) - --search - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(15839054,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DELAY) - e1:SetCode(EVENT_BE_MATERIAL) - e1:SetCondition(c15839054.condition) - e1:SetTarget(c15839054.target) - e1:SetOperation(c15839054.operation) - c:RegisterEffect(e1) -end -function c15839054.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsLocation(LOCATION_GRAVE) and r==REASON_SYNCHRO -end -function c15839054.filter(c) - return c:IsSetCard(0x46) and c:IsType(TYPE_SPELL) and c:IsAbleToHand() -end -function c15839054.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c15839054.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c15839054.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c15839054.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c15854426.lua b/script/c15854426.lua deleted file mode 100644 index 1260120341..0000000000 --- a/script/c15854426.lua +++ /dev/null @@ -1,48 +0,0 @@ ---霞の谷の神風 -function c15854426.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(15854426,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY) - e2:SetRange(LOCATION_SZONE) - e2:SetCode(EVENT_TO_HAND) - e2:SetCountLimit(1) - e2:SetCondition(c15854426.condition) - e2:SetTarget(c15854426.target) - e2:SetOperation(c15854426.operation) - c:RegisterEffect(e2) -end -function c15854426.cfilter(c,tp) - return c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_MZONE) - and bit.band(c:GetPreviousAttributeOnField(),ATTRIBUTE_WIND)~=0 - and c:IsPreviousPosition(POS_FACEUP) -end -function c15854426.condition(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c15854426.cfilter,1,nil,tp) -end -function c15854426.filter(c,e,tp) - return c:IsLevelBelow(4) and c:IsAttribute(ATTRIBUTE_WIND) - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c15854426.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and not e:GetHandler():IsStatus(STATUS_CHAINING) - and Duel.IsExistingMatchingCard(c15854426.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c15854426.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - if not e:GetHandler():IsRelateToEffect(e) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c15854426.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c1586457.lua b/script/c1586457.lua deleted file mode 100644 index 687ab7df1e..0000000000 --- a/script/c1586457.lua +++ /dev/null @@ -1,26 +0,0 @@ ---ディープ・スペース・クルーザー・ナイン -function c1586457.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c1586457.spcon) - e1:SetOperation(c1586457.spop) - c:RegisterEffect(e1) -end -function c1586457.filter(c) - return c:IsRace(RACE_MACHINE) and c:IsAbleToGraveAsCost() -end -function c1586457.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c1586457.filter,tp,LOCATION_HAND,0,1,c) -end -function c1586457.spop(e,tp,eg,ep,ev,re,r,rp,c) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c1586457.filter,tp,LOCATION_HAND,0,1,1,c) - Duel.SendtoGrave(g,REASON_COST) -end diff --git a/script/c15866454.lua b/script/c15866454.lua deleted file mode 100644 index bad563cc3a..0000000000 --- a/script/c15866454.lua +++ /dev/null @@ -1,28 +0,0 @@ ---ポルターガイスト -function c15866454.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_CANNOT_DISABLE) - e1:SetTarget(c15866454.target) - e1:SetOperation(c15866454.activate) - c:RegisterEffect(e1) -end -function c15866454.filter(c) - return c:IsAbleToHand() and c:IsType(TYPE_SPELL+TYPE_TRAP) -end -function c15866454.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and c15866454.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c15866454.filter,tp,0,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g=Duel.SelectTarget(tp,c15866454.filter,tp,0,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c15866454.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - end -end diff --git a/script/c15871676.lua b/script/c15871676.lua deleted file mode 100644 index 5dd577a44c..0000000000 --- a/script/c15871676.lua +++ /dev/null @@ -1,28 +0,0 @@ ---セイクリッド・ダバラン -function c15871676.initial_effect(c) - --summon success - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(15871676,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_SUMMON_SUCCESS) - e2:SetTarget(c15871676.sptg) - e2:SetOperation(c15871676.spop) - c:RegisterEffect(e2) -end -function c15871676.filter(c,e,tp) - return c:IsSetCard(0x53) and c:GetLevel()==3 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c15871676.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c15871676.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c15871676.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c15871676.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c15893860.lua b/script/c15893860.lua deleted file mode 100644 index 10a7002454..0000000000 --- a/script/c15893860.lua +++ /dev/null @@ -1,43 +0,0 @@ ---スノーマン・クリエイター -function c15893860.initial_effect(c) - --counter - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(15893860,0)) - e1:SetCategory(CATEGORY_COUNTER+CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c15893860.target) - e1:SetOperation(c15893860.operation) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - c:RegisterEffect(e2) - local e3=e1:Clone() - e3:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - c:RegisterEffect(e3) -end -function c15893860.ctfilter(c) - return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_WATER) -end -function c15893860.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c15893860.ctfilter,tp,LOCATION_MZONE,0,1,nil) - and Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end -end -function c15893860.operation(e,tp,eg,ep,ev,re,r,rp) - local ct=Duel.GetMatchingGroupCount(c15893860.ctfilter,tp,LOCATION_MZONE,0,nil) - if ct==0 then return end - local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil) - if g:GetCount()==0 then return end - for i=1,ct do - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(15893860,1)) - local tc=g:Select(tp,1,1,nil):GetFirst() - tc:AddCounter(0x15,1) - end - if ct>=3 and Duel.SelectYesNo(tp,aux.Stringid(15893860,2)) then - Duel.BreakEffect() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local dg=Duel.SelectMatchingCard(tp,Card.IsDestructable,tp,0,LOCATION_ONFIELD,1,1,nil) - Duel.Destroy(dg,REASON_EFFECT) - end -end diff --git a/script/c15894048.lua b/script/c15894048.lua deleted file mode 100644 index c429becb48..0000000000 --- a/script/c15894048.lua +++ /dev/null @@ -1,53 +0,0 @@ ---究極恐獣 -function c15894048.initial_effect(c) - --attack - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_FIRST_ATTACK) - e1:SetCondition(c15894048.facon) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_MUST_ATTACK) - e2:SetCondition(c15894048.facon) - c:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_ATTACK_ALL) - e3:SetCondition(c15894048.facon) - e3:SetValue(1) - c:RegisterEffect(e3) - if not c15894048.global_check then - c15894048.global_check=true - c15894048[0]=0 - c15894048[1]=0 - local ge1=Effect.CreateEffect(c) - ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - ge1:SetCode(EVENT_ATTACK_ANNOUNCE) - ge1:SetOperation(c15894048.checkop) - Duel.RegisterEffect(ge1,0) - local ge2=Effect.CreateEffect(c) - ge2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - ge2:SetCode(EVENT_PHASE_START+PHASE_BATTLE) - ge2:SetOperation(c15894048.clear) - Duel.RegisterEffect(ge2,0) - end -end -function c15894048.checkop(e,tp,eg,ep,ev,re,r,rp) - local tc=eg:GetFirst() - if c15894048[tc:GetControler()]==0 then - c15894048[tc:GetControler()]=1 - tc:RegisterFlagEffect(15894048,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_BATTLE,0,1) - elseif tc:GetFlagEffect(15894048)==0 then - c15894048[tc:GetControler()]=2 - end -end -function c15894048.clear(e,tp,eg,ep,ev,re,r,rp) - c15894048[0]=0 - c15894048[1]=0 -end -function c15894048.facon(e) - local tp=e:GetHandlerPlayer() - return Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0 - and c15894048[tp]==e:GetHandler():GetFlagEffect(15894048) -end diff --git a/script/c15914410.lua b/script/c15914410.lua deleted file mode 100644 index 60333572a9..0000000000 --- a/script/c15914410.lua +++ /dev/null @@ -1,44 +0,0 @@ ---機装天使エンジネル -function c15914410.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,3,2) - c:EnableReviveLimit() - -- - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(15914410,0)) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCost(c15914410.poscost) - e1:SetTarget(c15914410.postg) - e1:SetOperation(c15914410.posop) - c:RegisterEffect(e1) -end -function c15914410.poscost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c15914410.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsPosition(POS_FACEUP_ATTACK) end - if chk==0 then return Duel.IsExistingTarget(Card.IsPosition,tp,LOCATION_MZONE,0,1,nil,POS_FACEUP_ATTACK) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUPATTACK) - Duel.SelectTarget(tp,Card.IsPosition,tp,LOCATION_MZONE,0,1,1,nil,POS_FACEUP_ATTACK) -end -function c15914410.posop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.ChangePosition(tc,POS_FACEUP_DEFENCE) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetValue(1) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - tc:RegisterEffect(e2) - end -end diff --git a/script/c15935204.lua b/script/c15935204.lua deleted file mode 100644 index 95d8ebb59b..0000000000 --- a/script/c15935204.lua +++ /dev/null @@ -1,68 +0,0 @@ ---ストーム・サモナー -function c15935204.initial_effect(c) - --to deck - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EVENT_BATTLED) - e1:SetOperation(c15935204.operation) - c:RegisterEffect(e1) - --damage - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(15935204,0)) - e2:SetCategory(CATEGORY_DAMAGE) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_DESTROYED) - e2:SetCondition(c15935204.dmcon) - e2:SetTarget(c15935204.dmtg) - e2:SetOperation(c15935204.dmop) - c:RegisterEffect(e2) -end -function c15935204.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local a=Duel.GetAttacker() - local d=Duel.GetAttackTarget() - local b1=not a:IsType(TYPE_TOKEN) and a:IsStatus(STATUS_BATTLE_DESTROYED) and a:IsControler(1-tp) and d and d~=c and d:IsRace(RACE_PSYCHO) - local b2=d and not d:IsType(TYPE_TOKEN) and d:IsStatus(STATUS_BATTLE_DESTROYED) and d:IsControler(1-tp) and a~=c and a:IsRace(RACE_PSYCHO) - if (not b1 and not b2) or not Duel.SelectYesNo(tp,aux.Stringid(15935204,1)) then return end - if b1 then - local e1=Effect.CreateEffect(c) - e1:SetCode(EFFECT_SEND_REPLACE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetTarget(c15935204.reptg) - e1:SetOperation(c15935204.repop) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_DAMAGE) - a:RegisterEffect(e1) - end - if b2 then - local e1=Effect.CreateEffect(c) - e1:SetCode(EFFECT_SEND_REPLACE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetTarget(c15935204.reptg) - e1:SetOperation(c15935204.repop) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_DAMAGE) - d:RegisterEffect(e1) - end -end -function c15935204.reptg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:GetDestination()==LOCATION_GRAVE and c:IsReason(REASON_BATTLE) end - return true -end -function c15935204.repop(e,tp,eg,ep,ev,re,r,rp) - Duel.SendtoDeck(e:GetHandler(),nil,0,REASON_EFFECT) -end -function c15935204.dmcon(e,tp,eg,ep,ev,re,r,rp) - return not e:GetHandler():IsReason(REASON_BATTLE) -end -function c15935204.dmtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local c=e:GetHandler() - Duel.SetTargetPlayer(c:GetPreviousControler()) - Duel.SetTargetParam(c:GetAttack()) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,c:GetPreviousControler(),c:GetAttack()) -end -function c15935204.dmop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c15939229.lua b/script/c15939229.lua deleted file mode 100644 index 176f3ea2c9..0000000000 --- a/script/c15939229.lua +++ /dev/null @@ -1,93 +0,0 @@ ---DDD双暁王カリ・ユガ -function c15939229.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0xaf),8,2) - c:EnableReviveLimit() - --summon success - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetOperation(c15939229.sumsuc) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(15939229,0)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetCountLimit(1) - e2:SetCost(c15939229.cost) - e2:SetTarget(c15939229.destg) - e2:SetOperation(c15939229.desop) - c:RegisterEffect(e2) - --set - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(15939229,1)) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetRange(LOCATION_MZONE) - e3:SetCost(c15939229.cost) - e3:SetTarget(c15939229.settg) - e3:SetOperation(c15939229.setop) - c:RegisterEffect(e3) -end -function c15939229.sumsuc(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:GetSummonType()~=SUMMON_TYPE_XYZ then return end - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetTargetRange(1,1) - e1:SetValue(c15939229.aclimit) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_DISABLE) - e2:SetTargetRange(LOCATION_ONFIELD,LOCATION_ONFIELD) - e2:SetTarget(c15939229.disable) - e2:SetReset(RESET_PHASE+RESET_END) - Duel.RegisterEffect(e2,tp) -end -function c15939229.aclimit(e,re,tp) - return re:GetHandler():IsOnField() and e:GetHandler()~=re:GetHandler() -end -function c15939229.disable(e,c) - return c~=e:GetHandler() and (not c:IsType(TYPE_MONSTER) or (c:IsType(TYPE_EFFECT) or bit.band(c:GetOriginalType(),TYPE_EFFECT)==TYPE_EFFECT)) -end -function c15939229.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c15939229.desfilter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable() -end -function c15939229.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c15939229.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end - local g=Duel.GetMatchingGroup(c15939229.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c15939229.desop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c15939229.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) - Duel.Destroy(g,REASON_EFFECT) -end -function c15939229.setfilter(c) - return c:IsSetCard(0xae) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSSetable() -end -function c15939229.settg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c15939229.setfilter(chkc) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingTarget(c15939229.setfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) - local g=Duel.SelectTarget(tp,c15939229.setfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g,1,0,0) -end -function c15939229.setop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsSSetable() then - Duel.SSet(tp,tc) - Duel.ConfirmCards(1-tp,tc) - end -end diff --git a/script/c15939448.lua b/script/c15939448.lua deleted file mode 100644 index 2cf94888b0..0000000000 --- a/script/c15939448.lua +++ /dev/null @@ -1,38 +0,0 @@ ---シールド・ワーム -function c15939448.initial_effect(c) - --deckdes - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(15939448,0)) - e1:SetCategory(CATEGORY_POSITION+CATEGORY_DECKDES) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetCondition(c15939448.condition) - e1:SetTarget(c15939448.target) - e1:SetOperation(c15939448.operation) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - c:RegisterEffect(e2) - local e3=e1:Clone() - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e3) -end -function c15939448.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPosition(POS_FACEUP_ATTACK) -end -function c15939448.filter(c) - return c:IsFaceup() and c:IsRace(RACE_INSECT) -end -function c15939448.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local ct=Duel.GetMatchingGroupCount(c15939448.filter,tp,LOCATION_MZONE,0,nil) - Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,1-tp,ct) -end -function c15939448.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsPosition(POS_FACEUP_ATTACK) then - Duel.ChangePosition(c,POS_FACEUP_DEFENCE) - local ct=Duel.GetMatchingGroupCount(c15939448.filter,tp,LOCATION_MZONE,0,nil) - Duel.DiscardDeck(1-tp,ct,REASON_EFFECT) - end -end diff --git a/script/c15941690.lua b/script/c15941690.lua deleted file mode 100644 index d22b2b2bf1..0000000000 --- a/script/c15941690.lua +++ /dev/null @@ -1,48 +0,0 @@ ---先史遺産クリスタル・ボーン -function c15941690.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c15941690.hspcon) - e1:SetValue(1) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(15941690,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetCondition(c15941690.spcon) - e2:SetTarget(c15941690.sptg) - e2:SetOperation(c15941690.spop) - c:RegisterEffect(e2) -end -function c15941690.hspcon(e,c) - if c==nil then return true end - return Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0)==0 - and Duel.GetFieldGroupCount(c:GetControler(),0,LOCATION_MZONE)>0 - and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 -end -function c15941690.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+1 -end -function c15941690.filter(c,e,tp) - return c:IsSetCard(0x70) and c:GetCode()~=15941690 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) - and not c:IsHasEffect(EFFECT_NECRO_VALLEY) -end -function c15941690.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c15941690.filter,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_HAND) -end -function c15941690.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c15941690.filter,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c15951532.lua b/script/c15951532.lua deleted file mode 100644 index 5d4a0aabe5..0000000000 --- a/script/c15951532.lua +++ /dev/null @@ -1,12 +0,0 @@ ---アマゾネス女王 -function c15951532.initial_effect(c) - --indes - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x4)) - e1:SetValue(1) - c:RegisterEffect(e1) -end diff --git a/script/c15960641.lua b/script/c15960641.lua deleted file mode 100644 index 643d330cc6..0000000000 --- a/script/c15960641.lua +++ /dev/null @@ -1,20 +0,0 @@ ---ミラージュ・ドラゴン -function c15960641.initial_effect(c) - --act limit - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EFFECT_CANNOT_ACTIVATE) - e1:SetCondition(c15960641.con) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(0,1) - e1:SetValue(c15960641.aclimit) - c:RegisterEffect(e1) -end -function c15960641.con(e) - local ph=Duel.GetCurrentPhase() - return ph==PHASE_BATTLE or ph==PHASE_DAMAGE or ph==PHASE_DAMAGE_CAL -end -function c15960641.aclimit(e,re,tp) - return re:GetHandler():IsType(TYPE_TRAP) and re:IsHasType(EFFECT_TYPE_ACTIVATE) -end \ No newline at end of file diff --git a/script/c1596508.lua b/script/c1596508.lua deleted file mode 100644 index 039e867889..0000000000 --- a/script/c1596508.lua +++ /dev/null @@ -1,18 +0,0 @@ ---次元要塞兵器 -function c1596508.initial_effect(c) - -- - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_TO_GRAVE) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(LOCATION_DECK,LOCATION_DECK) - c:RegisterEffect(e1) - -- - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetCode(EFFECT_CANNOT_DISCARD_DECK) - e2:SetRange(LOCATION_MZONE) - e2:SetTargetRange(1,1) - c:RegisterEffect(e2) -end diff --git a/script/c15978426.lua b/script/c15978426.lua deleted file mode 100644 index ab639052b0..0000000000 --- a/script/c15978426.lua +++ /dev/null @@ -1,40 +0,0 @@ ---EMセカンドンキー -function c15978426.initial_effect(c) - --tograve - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(15978426,0)) - e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_SEARCH+CATEGORY_TOHAND) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c15978426.tgtg) - e1:SetOperation(c15978426.tgop) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e2) -end -function c15978426.filter(c,tohand) - return c:IsSetCard(0x9f) and not c:IsCode(15978426) and c:IsType(TYPE_MONSTER) - and (c:IsAbleToGrave() or (tohand and c:IsAbleToHand())) -end -function c15978426.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local tohand=Duel.GetFieldCard(tp,LOCATION_SZONE,6) and Duel.GetFieldCard(tp,LOCATION_SZONE,7) - return Duel.IsExistingMatchingCard(c15978426.filter,tp,LOCATION_DECK,0,1,nil,tohand) - end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) -end -function c15978426.tgop(e,tp,eg,ep,ev,re,r,rp) - local tohand=Duel.GetFieldCard(tp,LOCATION_SZONE,6) and Duel.GetFieldCard(tp,LOCATION_SZONE,7) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c15978426.filter,tp,LOCATION_DECK,0,1,1,nil,tohand) - local tc=g:GetFirst() - if not tc then return end - if tohand and tc:IsAbleToHand() and (not tc:IsAbleToGrave() or Duel.SelectYesNo(tp,aux.Stringid(15978426,1))) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - else - Duel.SendtoGrave(tc,REASON_EFFECT) - end -end diff --git a/script/c15981690.lua b/script/c15981690.lua deleted file mode 100644 index a608fdaef3..0000000000 --- a/script/c15981690.lua +++ /dev/null @@ -1,59 +0,0 @@ ---カーボネドン -function c15981690.initial_effect(c) - --atk up - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(15981690,0)) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_PRE_DAMAGE_CALCULATE) - e1:SetCondition(c15981690.upcon) - e1:SetOperation(c15981690.upop) - c:RegisterEffect(e1) - --special - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(15981690,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_GRAVE) - e2:SetCountLimit(1,15981690) - e2:SetCost(c15981690.spcost) - e2:SetTarget(c15981690.sptg) - e2:SetOperation(c15981690.spop) - c:RegisterEffect(e2) -end -function c15981690.upcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local bc=c:GetBattleTarget() - return bc and bc:IsAttribute(ATTRIBUTE_FIRE) -end -function c15981690.upop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_PHASE+RESET_DAMAGE_CAL) - e1:SetValue(1000) - c:RegisterEffect(e1) - end -end -function c15981690.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) -end -function c15981690.spfilter(c,e,tp) - return c:IsType(TYPE_NORMAL) and c:IsLevelBelow(7) and c:IsRace(RACE_DRAGON) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c15981690.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c15981690.spfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_HAND) -end -function c15981690.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c15981690.spfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENCE) - end -end diff --git a/script/c16008155.lua b/script/c16008155.lua deleted file mode 100644 index 006f24b8ea..0000000000 --- a/script/c16008155.lua +++ /dev/null @@ -1,70 +0,0 @@ ---レプティレス・サーヴァント -function c16008155.initial_effect(c) - --self destroy - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_SELF_DESTROY) - e1:SetCondition(c16008155.sdcon) - c:RegisterEffect(e1) - --be target - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetCode(EVENT_BECOME_TARGET) - e2:SetOperation(c16008155.desop1) - c:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e3:SetRange(LOCATION_MZONE) - e3:SetCode(EVENT_CHAIN_SOLVED) - e3:SetOperation(c16008155.desop2) - e3:SetLabelObject(e2) - c:RegisterEffect(e3) - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e4:SetRange(LOCATION_MZONE) - e4:SetCode(EVENT_BATTLED) - e4:SetOperation(c16008155.desop3) - e4:SetLabelObject(e2) - c:RegisterEffect(e4) - --cannot summon - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_FIELD) - e5:SetCode(EFFECT_CANNOT_SUMMON) - e5:SetRange(LOCATION_MZONE) - e5:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e5:SetTargetRange(1,1) - e5:SetValue(1) - c:RegisterEffect(e5) -end -function c16008155.sdcon(e) - return e:GetHandler():GetOwnerTargetCount()>0 - or Duel.IsExistingMatchingCard(Card.IsFaceup,0,LOCATION_MZONE,LOCATION_MZONE,1,e:GetHandler()) -end -function c16008155.desop1(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if re:GetHandler():IsType(TYPE_SPELL+TYPE_TRAP) and c:IsLocation(LOCATION_MZONE) and c:IsFaceup() then - e:SetLabelObject(re) - e:SetLabel(0) - end -end -function c16008155.desop2(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if re==e:GetLabelObject():GetLabelObject() and c:IsRelateToEffect(re) then - if Duel.GetCurrentPhase()==PHASE_DAMAGE and not Duel.IsDamageCalculated() then - e:GetLabelObject():SetLabel(1) - else - if not c:IsDisabled() then Duel.Destroy(c,REASON_EFFECT) end - end - end -end -function c16008155.desop3(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local des=e:GetLabelObject():GetLabel() - e:GetLabelObject():SetLabel(0) - if des==1 and not c:IsDisabled() then - Duel.Destroy(c,REASON_EFFECT) - end -end diff --git a/script/c16021142.lua b/script/c16021142.lua deleted file mode 100644 index a1b0818a58..0000000000 --- a/script/c16021142.lua +++ /dev/null @@ -1,48 +0,0 @@ ---幻奏の音女カノン -function c16021142.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(1,16021142) - e1:SetCondition(c16021142.spcon) - c:RegisterEffect(e1) - --pos - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(16021142,0)) - e2:SetCategory(CATEGORY_POSITION) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCountLimit(1) - e2:SetTarget(c16021142.postg) - e2:SetOperation(c16021142.posop) - c:RegisterEffect(e2) -end -function c16021142.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x9b) -end -function c16021142.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c16021142.cfilter,tp,LOCATION_MZONE,0,1,nil) -end -function c16021142.filter(c) - return c:IsFaceup() and c:IsSetCard(0x9b) -end -function c16021142.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c16021142.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c16021142.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE) - local g=Duel.SelectTarget(tp,c16021142.filter,tp,LOCATION_MZONE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0) -end -function c16021142.posop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.ChangePosition(tc,POS_FACEUP_DEFENCE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK) - end -end diff --git a/script/c16037007.lua b/script/c16037007.lua deleted file mode 100644 index 2d3036a4ab..0000000000 --- a/script/c16037007.lua +++ /dev/null @@ -1,49 +0,0 @@ ---No.74 マジカル・クラウン-ミッシング・ソード -function c16037007.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,7,2) - c:EnableReviveLimit() - -- - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(16037007,0)) - e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetRange(LOCATION_MZONE) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) - e1:SetCode(EVENT_CHAINING) - e1:SetCondition(c16037007.discon) - e1:SetCost(c16037007.discost) - e1:SetTarget(c16037007.distg) - e1:SetOperation(c16037007.disop) - c:RegisterEffect(e1) -end -c16037007.xyz_number=74 -function c16037007.discon(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) then return false end - if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end - local tg=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) - return tg and tg:IsContains(e:GetHandler()) and Duel.IsChainNegatable(ev) -end -function c16037007.discost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c16037007.distg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) - end -end -function c16037007.disop(e,tp,eg,ep,ev,re,r,rp) - if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) and Duel.Destroy(eg,REASON_EFFECT)>0 then - if Duel.IsExistingMatchingCard(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) - and Duel.SelectYesNo(tp,aux.Stringid(16037007,1)) then - Duel.BreakEffect() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectMatchingCard(tp,Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - Duel.HintSelection(g) - Duel.Destroy(g,REASON_EFFECT) - end - end -end diff --git a/script/c16051717.lua b/script/c16051717.lua deleted file mode 100644 index 44574c2125..0000000000 --- a/script/c16051717.lua +++ /dev/null @@ -1,69 +0,0 @@ ---A BF-驟雨のライキリ -function c16051717.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1) - c:EnableReviveLimit() - --add type - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(c16051717.tncon) - e1:SetOperation(c16051717.tnop) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_MATERIAL_CHECK) - e2:SetValue(c16051717.valcheck) - e2:SetLabelObject(e1) - c:RegisterEffect(e2) - --destroy - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetCategory(CATEGORY_DESTROY) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1) - e3:SetTarget(c16051717.destg) - e3:SetOperation(c16051717.desop) - c:RegisterEffect(e3) -end -function c16051717.valcheck(e,c) - local g=c:GetMaterial() - if g:IsExists(Card.IsSetCard,1,nil,0x33) then - e:GetLabelObject():SetLabel(1) - else - e:GetLabelObject():SetLabel(0) - end -end -function c16051717.tncon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_SYNCHRO and e:GetLabel()==1 -end -function c16051717.tnop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_ADD_TYPE) - e1:SetValue(TYPE_TUNER) - e1:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e1) -end -function c16051717.filter(c) - return c:IsFaceup() and c:IsSetCard(0x33) -end -function c16051717.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and chkc:IsDestructable() end - if chk==0 then return Duel.IsExistingMatchingCard(c16051717.filter,tp,LOCATION_MZONE,0,1,e:GetHandler()) - and Duel.IsExistingTarget(Card.IsDestructable,tp,0,LOCATION_ONFIELD,1,nil) end - local ct=Duel.GetMatchingGroupCount(c16051717.filter,tp,LOCATION_MZONE,0,e:GetHandler()) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,0,LOCATION_ONFIELD,1,ct,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c16051717.desop(e,tp,eg,ep,ev,re,r,rp) - local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local g=tg:Filter(Card.IsRelateToEffect,nil,e) - if g:GetCount()>0 then - Duel.Destroy(g,REASON_EFFECT) - end -end diff --git a/script/c16067089.lua b/script/c16067089.lua deleted file mode 100644 index 31d2e8daac..0000000000 --- a/script/c16067089.lua +++ /dev/null @@ -1,37 +0,0 @@ ---蛇神降臨 -function c16067089.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_DESTROYED) - e1:SetCondition(c16067089.condition) - e1:SetTarget(c16067089.target) - e1:SetOperation(c16067089.activate) - c:RegisterEffect(e1) -end -function c16067089.cfilter(c,tp) - return c:IsCode(72677437) and c:GetPreviousControler()==tp - and c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousPosition(POS_FACEUP) -end -function c16067089.condition(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c16067089.cfilter,1,nil,tp) -end -function c16067089.filter(c,e,tp) - return c:IsCode(8062132) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) -end -function c16067089.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c16067089.filter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,LOCATION_DECK+LOCATION_HAND) -end -function c16067089.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c16067089.filter,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil,e,tp) - local tc=g:GetFirst() - if tc then - Duel.SpecialSummon(tc,0,tp,tp,true,false,POS_FACEUP) - tc:CompleteProcedure() - end -end diff --git a/script/c16111820.lua b/script/c16111820.lua deleted file mode 100644 index b1b6277ec3..0000000000 --- a/script/c16111820.lua +++ /dev/null @@ -1,32 +0,0 @@ ---ジュラック・ヘレラ -function c16111820.initial_effect(c) - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(16111820,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetRange(LOCATION_HAND+LOCATION_GRAVE) - e1:SetProperty(EFFECT_FLAG_CHAIN_UNIQUE) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetCondition(c16111820.condition) - e1:SetTarget(c16111820.target) - e1:SetOperation(c16111820.operation) - c:RegisterEffect(e1) -end -function c16111820.filter(c,tp) - return c:GetPreviousControler()==tp and c:IsPreviousPosition(POS_DEFENCE) and c:IsReason(REASON_BATTLE) and c:IsLocation(LOCATION_GRAVE) - and c:IsSetCard(0x22) and c:GetCode()~=16111820 -end -function c16111820.condition(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c16111820.filter,1,nil,tp) -end -function c16111820.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c16111820.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c16114248.lua b/script/c16114248.lua deleted file mode 100644 index 1bd5eb72c9..0000000000 --- a/script/c16114248.lua +++ /dev/null @@ -1,36 +0,0 @@ ---ペア・サイクロイド -function c16114248.initial_effect(c) - c:EnableReviveLimit() - --fusion material - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_FUSION_MATERIAL) - e1:SetCondition(c16114248.fscondition) - e1:SetOperation(c16114248.fsoperation) - c:RegisterEffect(e1) - --direct attack - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DIRECT_ATTACK) - c:RegisterEffect(e2) -end -function c16114248.spfilter(c,mg) - return c:IsRace(RACE_MACHINE) and mg:IsExists(c16114248.spfilter2,1,c,c:GetCode()) -end -function c16114248.spfilter2(c,code) - return c:IsRace(RACE_MACHINE) and c:IsCode(code) -end -function c16114248.fscondition(e,mg,gc) - if mg==nil then return true end - if gc then return false end - return mg:IsExists(c16114248.spfilter,1,nil,mg) -end -function c16114248.fsoperation(e,tp,eg,ep,ev,re,r,rp,gc) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL) - local g1=eg:FilterSelect(tp,c16114248.spfilter,1,1,nil,eg) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL) - local g2=eg:FilterSelect(tp,c16114248.spfilter2,1,1,g1:GetFirst(),g1:GetFirst():GetCode()) - g1:Merge(g2) - Duel.SetFusionMaterial(g1) -end \ No newline at end of file diff --git a/script/c16135253.lua b/script/c16135253.lua deleted file mode 100644 index b604509ed7..0000000000 --- a/script/c16135253.lua +++ /dev/null @@ -1,34 +0,0 @@ ---アギド -function c16135253.initial_effect(c) - --dice - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(16135253,0)) - e1:SetCategory(CATEGORY_DICE+CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetCondition(c16135253.condition) - e1:SetTarget(c16135253.target) - e1:SetOperation(c16135253.operation) - c:RegisterEffect(e1) -end -function c16135253.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) -end -function c16135253.filter(c,e,tp,lv) - if (lv<6 and c:GetLevel()~=lv) or (lv==6 and c:GetLevel()<6) then return false end - return c:IsRace(RACE_FAIRY) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsHasEffect(EFFECT_NECRO_VALLEY) -end -function c16135253.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DICE,nil,0,tp,1) -end -function c16135253.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local dc=Duel.TossDice(tp,1) - local g=Duel.GetMatchingGroup(c16135253.filter,tp,LOCATION_GRAVE,0,nil,e,tp,dc) - if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(16135253,1)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=g:Select(tp,1,1,nil) - Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c16157341.lua b/script/c16157341.lua deleted file mode 100644 index 5b824ed425..0000000000 --- a/script/c16157341.lua +++ /dev/null @@ -1,40 +0,0 @@ ---武神器-オハバリ -function c16157341.initial_effect(c) - --pierce - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(16157341,0)) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c16157341.condition) - e1:SetCost(c16157341.cost) - e1:SetTarget(c16157341.target) - e1:SetOperation(c16157341.operation) - c:RegisterEffect(e1) -end -function c16157341.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsAbleToEnterBP() -end -function c16157341.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end -function c16157341.filter(c) - return c:IsFaceup() and c:IsSetCard(0x88) and not c:IsHasEffect(EFFECT_PIERCE) -end -function c16157341.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c16157341.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c16157341.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - Duel.SelectTarget(tp,c16157341.filter,tp,LOCATION_MZONE,0,1,1,nil) -end -function c16157341.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_PIERCE) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - end -end diff --git a/script/c16178681.lua b/script/c16178681.lua deleted file mode 100644 index 18f7c54a40..0000000000 --- a/script/c16178681.lua +++ /dev/null @@ -1,77 +0,0 @@ ---オッドアイズ・ペンデュラム・ドラゴン -function c16178681.initial_effect(c) - --pendulum summon - aux.AddPendulumProcedure(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --reduce - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(16178681,0)) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_PRE_BATTLE_DAMAGE) - e2:SetRange(LOCATION_PZONE) - e2:SetCountLimit(1,16178681) - e2:SetCondition(c16178681.rdcon) - e2:SetOperation(c16178681.rdop) - c:RegisterEffect(e2) - --tohand - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(16178681,1)) - e3:SetCategory(CATEGORY_DESTROY+CATEGORY_TOHAND+CATEGORY_SEARCH) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_PHASE+PHASE_END) - e3:SetRange(LOCATION_PZONE) - e3:SetCountLimit(1,16178682) - e3:SetCondition(c16178681.thcon) - e3:SetTarget(c16178681.thtg) - e3:SetOperation(c16178681.thop) - c:RegisterEffect(e3) - --double - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e4:SetCode(EVENT_PRE_BATTLE_DAMAGE) - e4:SetCondition(c16178681.damcon) - e4:SetOperation(c16178681.damop) - c:RegisterEffect(e4) -end -function c16178681.rdcon(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetAttacker() - if tc:IsControler(1-tp) then tc=Duel.GetAttackTarget() end - return ep==tp and tc and tc:IsType(TYPE_PENDULUM) -end -function c16178681.rdop(e,tp,eg,ep,ev,re,r,rp) - if Duel.SelectYesNo(tp,aux.Stringid(16178681,2)) then - Duel.ChangeBattleDamage(tp,0) - end -end -function c16178681.thcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c16178681.filter(c) - return c:IsType(TYPE_PENDULUM) and c:IsAttackBelow(1500) and c:IsAbleToHand() -end -function c16178681.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsDestructable() - and Duel.IsExistingMatchingCard(c16178681.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c16178681.thop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) or Duel.Destroy(c,REASON_EFFECT)==0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c16178681.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end -function c16178681.damcon(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp and e:GetHandler():GetBattleTarget()~=nil -end -function c16178681.damop(e,tp,eg,ep,ev,re,r,rp) - Duel.ChangeBattleDamage(ep,ev*2) -end diff --git a/script/c16191953.lua b/script/c16191953.lua deleted file mode 100644 index d15bb85c59..0000000000 --- a/script/c16191953.lua +++ /dev/null @@ -1,36 +0,0 @@ ---マスター・ジーグ -function c16191953.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(16191953,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCost(c16191953.cost) - e1:SetTarget(c16191953.target) - e1:SetOperation(c16191953.operation) - c:RegisterEffect(e1) -end -function c16191953.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,1000) end - Duel.PayLPCost(tp,1000) -end -function c16191953.filter(c) - return c:IsFaceup() and c:IsRace(RACE_PSYCHO) -end -function c16191953.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetMatchingGroupCount(c16191953.filter,tp,LOCATION_MZONE,0,nil)<=Duel.GetMatchingGroupCount(Card.IsDestructable,tp,0,LOCATION_MZONE,nil) end - local ct=Duel.GetMatchingGroupCount(c16191953.filter,tp,LOCATION_MZONE,0,nil) - local dg=Duel.GetMatchingGroup(Card.IsDestructable,tp,0,LOCATION_MZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,dg,ct,0,0) -end -function c16191953.operation(e,tp,eg,ep,ev,re,r,rp) - local ct=Duel.GetMatchingGroupCount(c16191953.filter,tp,LOCATION_MZONE,0,nil) - local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,0,LOCATION_MZONE,nil) - if ct>g:GetCount() then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local dg=g:Select(tp,ct,ct,nil) - Duel.HintSelection(dg) - Duel.Destroy(dg,REASON_EFFECT) -end diff --git a/script/c16195942.lua b/script/c16195942.lua deleted file mode 100644 index fe62929d7f..0000000000 --- a/script/c16195942.lua +++ /dev/null @@ -1,48 +0,0 @@ ---ダーク・リベリオン・エクシーズ・ドラゴン -function c16195942.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,4,2) - c:EnableReviveLimit() - --atk - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(16195942,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c16195942.cost) - e1:SetTarget(c16195942.target) - e1:SetOperation(c16195942.operation) - c:RegisterEffect(e1) -end -function c16195942.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,2,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,2,2,REASON_COST) -end -function c16195942.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil) -end -function c16195942.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then - local atk=tc:GetAttack() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(math.ceil(atk/2)) - tc:RegisterEffect(e1) - if c:IsRelateToEffect(e) and c:IsFaceup() then - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetReset(RESET_EVENT+0x1fe0000) - e2:SetValue(math.ceil(atk/2)) - c:RegisterEffect(e2) - end - end -end diff --git a/script/c16197610.lua b/script/c16197610.lua deleted file mode 100644 index 2bf1ec6727..0000000000 --- a/script/c16197610.lua +++ /dev/null @@ -1,68 +0,0 @@ ---雲魔物-タービュランス -function c16197610.initial_effect(c) - --battle indestructable - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e1:SetValue(1) - c:RegisterEffect(e1) - --selfdes - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EFFECT_SELF_DESTROY) - e2:SetCondition(c16197610.sdcon) - c:RegisterEffect(e2) - --counter - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(16197610,0)) - e3:SetCategory(CATEGORY_COUNTER) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e3:SetCode(EVENT_SUMMON_SUCCESS) - e3:SetOperation(c16197610.addc) - c:RegisterEffect(e3) - --destroy - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(16197610,1)) - e4:SetCategory(CATEGORY_SPECIAL_SUMMON) - e4:SetType(EFFECT_TYPE_IGNITION) - e4:SetRange(LOCATION_MZONE) - e4:SetCost(c16197610.spcost) - e4:SetTarget(c16197610.sptg) - e4:SetOperation(c16197610.spop) - c:RegisterEffect(e4) -end -function c16197610.sdcon(e) - return e:GetHandler():IsPosition(POS_FACEUP_DEFENCE) -end -function c16197610.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x18) -end -function c16197610.addc(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - local ct=Duel.GetMatchingGroupCount(c16197610.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - e:GetHandler():AddCounter(0x19,ct) - end -end -function c16197610.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsCanRemoveCounter(tp,0x19,1,REASON_COST) end - e:GetHandler():RemoveCounter(tp,0x19,1,REASON_COST) -end -function c16197610.spfilter(c,e,tp) - return c:IsCode(80825553) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) - and not c:IsHasEffect(EFFECT_NECRO_VALLEY) -end -function c16197610.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c16197610.spfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE) -end -function c16197610.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c16197610.spfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp) - if g:GetCount()~=0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c16222645.lua b/script/c16222645.lua deleted file mode 100644 index 6f783f8205..0000000000 --- a/script/c16222645.lua +++ /dev/null @@ -1,27 +0,0 @@ ---一刀両断侍 -function c16222645.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(16222645,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_BATTLE_START) - e1:SetCondition(c16222645.descon) - e1:SetTarget(c16222645.destg) - e1:SetOperation(c16222645.desop) - c:RegisterEffect(e1) -end -function c16222645.descon(e,tp,eg,ep,ev,re,r,rp) - local d=Duel.GetAttackTarget() - return e:GetHandler()==Duel.GetAttacker() and d and d:IsFacedown() and d:IsDefencePos() -end -function c16222645.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,Duel.GetAttackTarget(),1,0,0) -end -function c16222645.desop(e,tp,eg,ep,ev,re,r,rp) - local d=Duel.GetAttackTarget() - if d:IsRelateToBattle() then - Duel.Destroy(d,REASON_EFFECT) - end -end diff --git a/script/c16226786.lua b/script/c16226786.lua deleted file mode 100644 index 8638def646..0000000000 --- a/script/c16226786.lua +++ /dev/null @@ -1,56 +0,0 @@ ---深淵の暗殺者 -function c16226786.initial_effect(c) - --flip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(16226786,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP) - e1:SetTarget(c16226786.target) - e1:SetOperation(c16226786.operation) - c:RegisterEffect(e1) - --salvage - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(16226786,1)) - e2:SetCategory(CATEGORY_TOHAND) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetCondition(c16226786.thcon) - e2:SetTarget(c16226786.thtg) - e2:SetOperation(c16226786.thop) - c:RegisterEffect(e2) -end -function c16226786.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsDestructable() end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c16226786.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end -function c16226786.thcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetPreviousLocation()==LOCATION_HAND -end -function c16226786.thfilter(c) - return c:IsType(TYPE_FLIP) and c:IsAbleToHand() -end -function c16226786.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c16226786.thfilter(chkc) end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c16226786.thfilter,tp,LOCATION_GRAVE,0,1,1,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0) -end -function c16226786.thop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end diff --git a/script/c16227556.lua b/script/c16227556.lua deleted file mode 100644 index e9b0bea121..0000000000 --- a/script/c16227556.lua +++ /dev/null @@ -1,33 +0,0 @@ ---検閲 -function c16227556.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - -- - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(16227556,0)) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) - e2:SetRange(LOCATION_SZONE) - e2:SetCondition(c16227556.cfcon) - e2:SetCost(c16227556.cfcost) - e2:SetOperation(c16227556.cfop) - c:RegisterEffect(e2) -end -function c16227556.cfcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp and Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)~=0 -end -function c16227556.cfcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,500) end - Duel.PayLPCost(tp,500) -end -function c16227556.cfop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND):RandomSelect(tp,1) - if g:GetCount()~=0 then - Duel.ConfirmCards(tp,g) - Duel.ShuffleHand(1-tp) - end -end diff --git a/script/c16229315.lua b/script/c16229315.lua deleted file mode 100644 index 1ffa3f196b..0000000000 --- a/script/c16229315.lua +++ /dev/null @@ -1,28 +0,0 @@ ---ゲール・ドグラ -function c16229315.initial_effect(c) - --to grave - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOGRAVE) - e1:SetDescription(aux.Stringid(16229315,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c16229315.cost) - e1:SetTarget(c16229315.target) - e1:SetOperation(c16229315.operation) - c:RegisterEffect(e1) -end -function c16229315.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,3000) end - Duel.PayLPCost(tp,3000) -end -function c16229315.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_EXTRA,0)~=0 end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_EXTRA) -end -function c16229315.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_EXTRA,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoGrave(g,REASON_EFFECT) - end -end diff --git a/script/c16241441.lua b/script/c16241441.lua deleted file mode 100644 index 4306b94ffb..0000000000 --- a/script/c16241441.lua +++ /dev/null @@ -1,38 +0,0 @@ ---C・ラーバ -function c16241441.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(16241441,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c16241441.spcon) - e1:SetCost(c16241441.spcost) - e1:SetTarget(c16241441.sptg) - e1:SetOperation(c16241441.spop) - c:RegisterEffect(e1) -end -function c16241441.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsEnvironment(42015635) -end -function c16241441.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end -function c16241441.spfilter(c,e,tp) - return c:IsCode(89621922) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c16241441.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsExistingMatchingCard(c16241441.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) -end -function c16241441.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - if not Duel.IsEnvironment(42015635) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c16241441.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c16255442.lua b/script/c16255442.lua deleted file mode 100644 index 109fad2eb3..0000000000 --- a/script/c16255442.lua +++ /dev/null @@ -1,37 +0,0 @@ ---光の召集 -function c16255442.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_HANDES+CATEGORY_TOHAND) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c16255442.target) - e1:SetOperation(c16255442.operation) - c:RegisterEffect(e1) -end -function c16255442.filter(c) - return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsAbleToHand() -end -function c16255442.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local hd=Duel.GetFieldGroupCount(tp,LOCATION_HAND,0) - if e:GetHandler():IsLocation(LOCATION_HAND) then hd=hd-1 end - return hd>0 and Duel.IsExistingMatchingCard(c16255442.filter,tp,LOCATION_GRAVE,0,hd,nil) - end - local sg=Duel.GetFieldGroup(tp,LOCATION_HAND,0) - local tg=Duel.GetMatchingGroup(c16255442.filter,tp,LOCATION_GRAVE,0,nil) - Duel.SetOperationInfo(0,CATEGORY_HANDES,sg,sg:GetCount(),0,0) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,tg,sg:GetCount(),0,0) -end -function c16255442.operation(e,tp,eg,ep,ev,re,r,rp) - local sg=Duel.GetFieldGroup(tp,LOCATION_HAND,0) - local sct=sg:GetCount() - Duel.SendtoGrave(sg,REASON_EFFECT+REASON_DISCARD) - local tg=Duel.GetMatchingGroup(c16255442.filter,tp,LOCATION_GRAVE,0,nil) - if tg:GetCount()>=sct then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local sel=tg:Select(tp,sct,sct,nil) - Duel.SendtoHand(sel,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,sel) - end -end diff --git a/script/c16259549.lua b/script/c16259549.lua deleted file mode 100644 index 69ac47342d..0000000000 --- a/script/c16259549.lua +++ /dev/null @@ -1,96 +0,0 @@ ---No.49 秘鳥フォーチュンチュン -function c16259549.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,3,2) - c:EnableReviveLimit() - --lpup - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(16259549,0)) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetCategory(CATEGORY_RECOVER) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCondition(c16259549.reccon) - e1:SetTarget(c16259549.rectg) - e1:SetOperation(c16259549.recop) - c:RegisterEffect(e1) - -- - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) - e2:SetRange(LOCATION_MZONE) - e2:SetValue(aux.tgval) - c:RegisterEffect(e2) - --destroy replace - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE) - e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e3:SetCode(EFFECT_DESTROY_REPLACE) - e3:SetRange(LOCATION_MZONE) - e3:SetTarget(c16259549.reptg) - c:RegisterEffect(e3) - --todeck - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(16259549,1)) - e4:SetCategory(CATEGORY_TODECK) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e4:SetCode(EVENT_TO_GRAVE) - e4:SetCountLimit(1,16259549) - e4:SetProperty(EFFECT_FLAG_CARD_TARGET) - e4:SetCondition(c16259549.tdcon) - e4:SetTarget(c16259549.tdtg) - e4:SetOperation(c16259549.tdop) - c:RegisterEffect(e4) -end -c16259549.xyz_number=49 -function c16259549.reccon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c16259549.rectg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(500) - Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,500) -end -function c16259549.recop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Recover(p,d,REASON_EFFECT) -end -function c16259549.reptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_EFFECT) end - if Duel.SelectYesNo(tp,aux.Stringid(16259549,2)) then - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_EFFECT) - return true - else return false end -end -function c16259549.tdcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) -end -function c16259549.filter(c,e) - return c:GetLevel()==3 and c:IsCanBeEffectTarget(e) and c:IsAbleToDeck() -end -function c16259549.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c16259549.filter(chkc,e) end - if chk==0 then return true end - local g=Duel.GetMatchingGroup(c16259549.filter,tp,LOCATION_GRAVE,0,nil,e) - if g:GetCount()>=2 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local sg=g:Select(tp,2,2,nil) - Duel.SetTargetCard(sg) - Duel.SetOperationInfo(0,CATEGORY_TODECK,sg,2,0,0) - end -end -function c16259549.tdop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - if not g then return end - local tg=g:Filter(Card.IsRelateToEffect,nil,e) - if tg:GetCount()~=2 then return end - Duel.SendtoDeck(tg,nil,2,REASON_EFFECT) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SendtoDeck(c,nil,2,REASON_EFFECT) - end -end diff --git a/script/c16268841.lua b/script/c16268841.lua deleted file mode 100644 index 09c2d93523..0000000000 --- a/script/c16268841.lua +++ /dev/null @@ -1,28 +0,0 @@ ---ゾルガ -function c16268841.initial_effect(c) - --recover - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(16268841,0)) - e1:SetCategory(CATEGORY_RECOVER) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_RELEASE) - e1:SetCondition(c16268841.reccon) - e1:SetTarget(c16268841.rectg) - e1:SetOperation(c16268841.recop) - c:RegisterEffect(e1) -end -function c16268841.reccon(e,tp,eg,ep,ev,re,r,rp) - e:SetLabel(e:GetHandler():GetPreviousControler()) - return e:GetHandler():IsReason(REASON_SUMMON) -end -function c16268841.rectg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckEvent(EVENT_SUMMON_SUCCESS) or Duel.CheckEvent(EVENT_MSET) end - Duel.SetTargetPlayer(e:GetLabel()) - Duel.SetTargetParam(2000) - Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,e:GetLabel(),2000) -end -function c16268841.recop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Recover(p,d,REASON_EFFECT) -end diff --git a/script/c16272453.lua b/script/c16272453.lua deleted file mode 100644 index 2e55090fcf..0000000000 --- a/script/c16272453.lua +++ /dev/null @@ -1,35 +0,0 @@ ---機甲忍法ゴールド・コンバージョン -function c16272453.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DRAW+CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c16272453.condition) - e1:SetTarget(c16272453.target) - e1:SetOperation(c16272453.activate) - c:RegisterEffect(e1) -end -function c16272453.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x61) -end -function c16272453.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c16272453.cfilter,tp,LOCATION_ONFIELD,0,1,nil) -end -function c16272453.dfilter(c) - return c:IsFaceup() and c:IsSetCard(0x61) and c:IsDestructable() -end -function c16272453.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp,2) end - local g=Duel.GetMatchingGroup(c16272453.dfilter,tp,LOCATION_ONFIELD,0,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2) -end -function c16272453.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c16272453.dfilter,tp,LOCATION_ONFIELD,0,e:GetHandler()) - local ct=Duel.Destroy(g,REASON_EFFECT) - if ct>0 then - Duel.BreakEffect() - Duel.Draw(tp,2,REASON_EFFECT) - end -end diff --git a/script/c16279989.lua b/script/c16279989.lua deleted file mode 100644 index 243f75e3ed..0000000000 --- a/script/c16279989.lua +++ /dev/null @@ -1,65 +0,0 @@ ---ゴーストリック・シュタイン -function c16279989.initial_effect(c) - --summon limit - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_SUMMON) - e1:SetCondition(c16279989.sumcon) - c:RegisterEffect(e1) - --turn set - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(16279989,0)) - e2:SetCategory(CATEGORY_POSITION) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetTarget(c16279989.postg) - e2:SetOperation(c16279989.posop) - c:RegisterEffect(e2) - --search - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(16279989,1)) - e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_BATTLE_DAMAGE) - e3:SetCountLimit(1,16279989) - e3:SetCondition(c16279989.thcon) - e3:SetTarget(c16279989.thtg) - e3:SetOperation(c16279989.thop) - c:RegisterEffect(e3) -end -function c16279989.sfilter(c) - return c:IsFaceup() and c:IsSetCard(0x8d) -end -function c16279989.sumcon(e) - return not Duel.IsExistingMatchingCard(c16279989.sfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) -end -function c16279989.postg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsCanTurnSet() and c:GetFlagEffect(16279989)==0 end - c:RegisterFlagEffect(16279989,RESET_EVENT+0x1fc0000+RESET_PHASE+PHASE_END,0,1) - Duel.SetOperationInfo(0,CATEGORY_POSITION,c,1,0,0) -end -function c16279989.posop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - Duel.ChangePosition(c,POS_FACEDOWN_DEFENCE) - end -end -function c16279989.thcon(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp -end -function c16279989.filter(c) - return c:IsSetCard(0x8d) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand() -end -function c16279989.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c16279989.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c16279989.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c16279989.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c16304628.lua b/script/c16304628.lua deleted file mode 100644 index 5312a87798..0000000000 --- a/script/c16304628.lua +++ /dev/null @@ -1,56 +0,0 @@ ---E・HERO ガイア -function c16304628.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcFun2(c,aux.FilterBoolFunction(Card.IsSetCard,0x3008),aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_EARTH),true) - --atk up - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(16304628,0)) - e2:SetCategory(CATEGORY_ATKCHANGE) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetCondition(c16304628.atkcon) - e2:SetTarget(c16304628.atktg) - e2:SetOperation(c16304628.atkop) - c:RegisterEffect(e2) - --spsummon condition - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e3:SetCode(EFFECT_SPSUMMON_CONDITION) - e3:SetValue(aux.fuslimit) - c:RegisterEffect(e3) -end -function c16304628.atkcon(e,tp,eg,ep,ev,re,r,rp) - return bit.band(e:GetHandler():GetSummonType(),SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION -end -function c16304628.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,g,g:GetCount(),0,0) -end -function c16304628.atkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) and tc:IsFaceup() and not tc:IsImmuneToEffect(e) then - local atk=tc:GetAttack() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetValue(atk/2) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - if c:IsRelateToEffect(e) and c:IsFaceup() then - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetValue(atk/2) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - c:RegisterEffect(e2) - end - end -end diff --git a/script/c16308000.lua b/script/c16308000.lua deleted file mode 100644 index 7d1915167b..0000000000 --- a/script/c16308000.lua +++ /dev/null @@ -1,61 +0,0 @@ ---神の威光 -function c16308000.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0x1c0,0x1c1) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c16308000.target) - e1:SetOperation(c16308000.operation) - c:RegisterEffect(e1) -end -function c16308000.filter(c) - return c:IsFaceup() and c:IsSetCard(0x4b) -end -function c16308000.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c16308000.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c16308000.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c16308000.filter,tp,LOCATION_MZONE,0,1,1,nil) -end -function c16308000.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsRelateToEffect(e) then - c:SetCardTarget(tc) - e:SetLabelObject(tc) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetCondition(c16308000.rcon) - e1:SetValue(aux.tgval) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) - e2:SetRange(LOCATION_SZONE) - e2:SetCountLimit(1) - e2:SetLabel(2) - e2:SetLabelObject(tc) - e2:SetCondition(c16308000.tgcon) - e2:SetOperation(c16308000.tgop) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,2) - c:RegisterEffect(e2) - end -end -function c16308000.rcon(e) - return e:GetOwner():IsHasCardTarget(e:GetHandler()) -end -function c16308000.tgcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c16308000.tgop(e,tp,eg,ep,ev,re,r,rp) - local ct=e:GetLabel() - ct=ct-1 - e:SetLabel(ct) - if ct==0 and e:GetHandler():IsHasCardTarget(e:GetLabelObject()) then - Duel.SendtoGrave(e:GetHandler(),REASON_EFFECT) - end -end diff --git a/script/c16366810.lua b/script/c16366810.lua deleted file mode 100644 index b90651ff4d..0000000000 --- a/script/c16366810.lua +++ /dev/null @@ -1,59 +0,0 @@ ---イエロー・ダストン -function c16366810.initial_effect(c) - c:SetUniqueOnField(1,0,16366810) - --cannot release - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_UNRELEASABLE_SUM) - e1:SetValue(1) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_UNRELEASABLE_NONSUM) - c:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e3:SetCode(EFFECT_CANNOT_BE_FUSION_MATERIAL) - e3:SetValue(1) - c:RegisterEffect(e3) - local e4=e3:Clone() - e4:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL) - c:RegisterEffect(e4) - local e5=e3:Clone() - e5:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL) - c:RegisterEffect(e5) - --todeck - local e6=Effect.CreateEffect(c) - e6:SetDescription(aux.Stringid(16366810,0)) - e6:SetCategory(CATEGORY_TODECK) - e6:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e6:SetProperty(EFFECT_FLAG_CARD_TARGET) - e6:SetCode(EVENT_DESTROYED) - e6:SetCondition(c16366810.retcon) - e6:SetTarget(c16366810.rettg) - e6:SetOperation(c16366810.retop) - c:RegisterEffect(e6) -end -function c16366810.retcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsReason(REASON_DESTROY) and c:IsPreviousLocation(LOCATION_ONFIELD) -end -function c16366810.filter(c) - return c:IsType(TYPE_MONSTER) and c:IsAbleToDeck() -end -function c16366810.rettg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local prec=e:GetHandler():GetPreviousControler() - if chkc then return chkc:IsControler(prec) and chkc:IsLocation(LOCATION_GRAVE) and c16366810.filter(chkc) end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectTarget(prec,c16366810.filter,prec,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0) -end -function c16366810.retop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.SendtoDeck(tc,nil,2,REASON_EFFECT) - end -end diff --git a/script/c16366944.lua b/script/c16366944.lua deleted file mode 100644 index 80291cb12a..0000000000 --- a/script/c16366944.lua +++ /dev/null @@ -1,33 +0,0 @@ ---月光蝶 -function c16366944.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(16366944,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCondition(c16366944.condition) - e1:SetTarget(c16366944.target) - e1:SetOperation(c16366944.operation) - c:RegisterEffect(e1) -end -function c16366944.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) -end -function c16366944.filter(c,e,tp) - return c:IsLevelBelow(4) and c:IsSetCard(0x6a) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c16366944.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c16366944.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c16366944.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c16366944.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c1637760.lua b/script/c1637760.lua deleted file mode 100644 index d7f37c1f2a..0000000000 --- a/script/c1637760.lua +++ /dev/null @@ -1,28 +0,0 @@ ---昇天の剛角笛 -function c1637760.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DISABLE_SUMMON+CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_SPSUMMON) - e1:SetCondition(c1637760.condition) - e1:SetTarget(c1637760.target) - e1:SetOperation(c1637760.activate) - c:RegisterEffect(e1) -end -function c1637760.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentChain()==0 and Duel.GetTurnPlayer()~=tp and rp~=tp - and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2) -end -function c1637760.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(1-tp,1) end - Duel.SetOperationInfo(0,CATEGORY_DISABLE_SUMMON,eg,eg:GetCount(),0,0) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,eg:GetCount(),0,0) -end -function c1637760.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateSummon(eg) - Duel.Destroy(eg,REASON_EFFECT) - Duel.BreakEffect() - Duel.Draw(1-tp,1,REASON_EFFECT) - Duel.SkipPhase(1-tp,Duel.GetCurrentPhase(),RESET_PHASE+PHASE_END,1) -end diff --git a/script/c16392422.lua b/script/c16392422.lua deleted file mode 100644 index e86c37f653..0000000000 --- a/script/c16392422.lua +++ /dev/null @@ -1,79 +0,0 @@ ---トゥーン・仮面魔道士 -function c16392422.initial_effect(c) - --cannot attack - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetOperation(c16392422.atklimit) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e2) - local e3=e1:Clone() - e3:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - c:RegisterEffect(e3) - --destroy - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e4:SetRange(LOCATION_MZONE) - e4:SetCode(EVENT_LEAVE_FIELD) - e4:SetCondition(c16392422.sdescon) - e4:SetOperation(c16392422.sdesop) - c:RegisterEffect(e4) - --direct attack - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_SINGLE) - e5:SetCode(EFFECT_DIRECT_ATTACK) - e5:SetCondition(c16392422.dircon) - c:RegisterEffect(e5) - --draw - local e6=Effect.CreateEffect(c) - e6:SetDescription(aux.Stringid(16392422,0)) - e6:SetCategory(CATEGORY_DRAW) - e6:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e6:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e6:SetCode(EVENT_BATTLE_DAMAGE) - e6:SetCondition(c16392422.condition) - e6:SetTarget(c16392422.target) - e6:SetOperation(c16392422.operation) - c:RegisterEffect(e6) -end -function c16392422.atklimit(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e:GetHandler():RegisterEffect(e1) -end -function c16392422.sfilter(c) - return c:IsReason(REASON_DESTROY) and c:IsPreviousPosition(POS_FACEUP) and c:GetPreviousCodeOnField()==15259703 and c:IsPreviousLocation(LOCATION_ONFIELD) -end -function c16392422.sdescon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c16392422.sfilter,1,nil) -end -function c16392422.sdesop(e,tp,eg,ep,ev,re,r,rp) - Duel.Destroy(e:GetHandler(),REASON_EFFECT) -end -function c16392422.dirfilter1(c) - return c:IsFaceup() and c:IsCode(15259703) -end -function c16392422.dirfilter2(c) - return c:IsFaceup() and c:IsType(TYPE_TOON) -end -function c16392422.dircon(e) - return Duel.IsExistingMatchingCard(c16392422.dirfilter1,e:GetHandlerPlayer(),LOCATION_ONFIELD,0,1,nil) - and not Duel.IsExistingMatchingCard(c16392422.dirfilter2,e:GetHandlerPlayer(),0,LOCATION_MZONE,1,nil) -end -function c16392422.condition(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp -end -function c16392422.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(1) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c16392422.operation(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end diff --git a/script/c1639384.lua b/script/c1639384.lua deleted file mode 100644 index 2ac6ef48bf..0000000000 --- a/script/c1639384.lua +++ /dev/null @@ -1,62 +0,0 @@ ---神竜騎士フェルグラント -function c1639384.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,8,2) - c:EnableReviveLimit() - --negate - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(1639384,0)) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCost(c1639384.cost) - e1:SetTarget(c1639384.target) - e1:SetOperation(c1639384.operation) - c:RegisterEffect(e1) -end -function c1639384.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c1639384.filter(c) - return c:IsFaceup() -end -function c1639384.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c1639384.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c1639384.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c1639384.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) -end -function c1639384.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - Duel.NegateRelatedChain(tc,RESET_TURN_SET) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetValue(RESET_TURN_SET) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - tc:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE) - e3:SetRange(LOCATION_MZONE) - e3:SetCode(EFFECT_IMMUNE_EFFECT) - e3:SetValue(c1639384.efilter) - e3:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e3) - end -end -function c1639384.efilter(e,te) - return te:GetOwner()~=e:GetOwner() -end diff --git a/script/c16404809.lua b/script/c16404809.lua deleted file mode 100644 index 99f8d6e3f7..0000000000 --- a/script/c16404809.lua +++ /dev/null @@ -1,55 +0,0 @@ ---クリバンデット -function c16404809.initial_effect(c) - --mill - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetOperation(c16404809.sumsuc) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(16404809,0)) - e2:SetCategory(CATEGORY_TOHAND+CATEGORY_DECKDES) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EVENT_PHASE+PHASE_END) - e2:SetCountLimit(1) - e2:SetCondition(c16404809.condition) - e2:SetCost(c16404809.cost) - e2:SetTarget(c16404809.target) - e2:SetOperation(c16404809.operation) - c:RegisterEffect(e2) -end -function c16404809.sumsuc(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():RegisterFlagEffect(16404809,RESET_EVENT+0x1ec0000+RESET_PHASE+PHASE_END,0,1) -end -function c16404809.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetFlagEffect(16404809)~=0 -end -function c16404809.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end -function c16404809.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,5) end -end -function c16404809.filter(c) - return c:IsAbleToHand() and c:IsType(TYPE_SPELL+TYPE_TRAP) -end -function c16404809.operation(e,tp,eg,ep,ev,re,r,rp) - if not Duel.IsPlayerCanDiscardDeck(tp,5) then return end - Duel.ConfirmDecktop(tp,5) - local g=Duel.GetDecktopGroup(tp,5) - if g:GetCount()>0 then - Duel.DisableShuffleCheck() - if g:IsExists(c16404809.filter,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(16404809,1)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local sg=g:FilterSelect(tp,c16404809.filter,1,1,nil) - Duel.SendtoHand(sg,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,sg) - Duel.ShuffleHand(tp) - g:Sub(sg) - end - Duel.SendtoGrave(g,REASON_EFFECT+REASON_REVEAL) - end -end diff --git a/script/c1641882.lua b/script/c1641882.lua deleted file mode 100644 index b55f1a6a3b..0000000000 --- a/script/c1641882.lua +++ /dev/null @@ -1,6 +0,0 @@ ---フュージョニスト -function c1641882.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcCode2(c,38142739,83464209,true,true) -end diff --git a/script/c16430187.lua b/script/c16430187.lua deleted file mode 100644 index 550fcb8eb0..0000000000 --- a/script/c16430187.lua +++ /dev/null @@ -1,34 +0,0 @@ ---頼もしき守護者 -function c16430187.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DEFCHANGE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetCondition(c16430187.condition) - e1:SetTarget(c16430187.target) - e1:SetOperation(c16430187.activate) - c:RegisterEffect(e1) -end -function c16430187.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end -function c16430187.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) -end -function c16430187.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_DEFENCE) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - e1:SetValue(700) - tc:RegisterEffect(e1) - end -end diff --git a/script/c16435215.lua b/script/c16435215.lua deleted file mode 100644 index 7348d9dee8..0000000000 --- a/script/c16435215.lua +++ /dev/null @@ -1,41 +0,0 @@ ---墓穴の道連れ -function c16435215.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_HANDES) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c16435215.condition) - e1:SetTarget(c16435215.target) - e1:SetOperation(c16435215.activate) - c:RegisterEffect(e1) -end -function c16435215.condition(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsLocation(LOCATION_HAND) then - return Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0 and Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)>1 - else - return Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0 and Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)>0 - end -end -function c16435215.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,PLAYER_ALL,1) -end -function c16435215.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)==0 or Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)==0 then return end - local g1=Duel.GetFieldGroup(tp,0,LOCATION_HAND) - local g2=Duel.GetFieldGroup(tp,LOCATION_HAND,0) - Duel.ConfirmCards(tp,g1) - Duel.ConfirmCards(1-tp,g2) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) - local sg1=g1:Select(tp,1,1,nil) - Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_DISCARD) - local sg2=g2:Select(1-tp,1,1,nil) - sg1:Merge(sg2) - Duel.SendtoGrave(sg1,REASON_EFFECT+REASON_DISCARD) - Duel.ShuffleHand(tp) - Duel.ShuffleHand(1-tp) - Duel.BreakEffect() - Duel.Draw(tp,1,REASON_EFFECT) - Duel.Draw(1-tp,1,REASON_EFFECT) -end diff --git a/script/c16437822.lua b/script/c16437822.lua deleted file mode 100644 index fbda4fff73..0000000000 --- a/script/c16437822.lua +++ /dev/null @@ -1,50 +0,0 @@ ---フリント・アタック -function c16437822.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c16437822.target) - e1:SetOperation(c16437822.activate) - c:RegisterEffect(e1) - --todeck - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(16437822,0)) - e2:SetCategory(CATEGORY_TODECK) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetCondition(c16437822.retcon) - e2:SetTarget(c16437822.rettg) - e2:SetOperation(c16437822.retop) - c:RegisterEffect(e2) -end -function c16437822.filter(c) - return c:GetEquipCount()~=0 and c:GetEquipGroup():IsExists(Card.IsCode,1,nil,75560629) and c:IsDestructable() -end -function c16437822.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c16437822.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c16437822.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c16437822.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c16437822.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end -function c16437822.retcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsStatus(STATUS_ACTIVATED) -end -function c16437822.rettg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToDeck() end - Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0) -end -function c16437822.retop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_EFFECT) - end -end diff --git a/script/c1644289.lua b/script/c1644289.lua deleted file mode 100644 index b8cfa1cdb6..0000000000 --- a/script/c1644289.lua +++ /dev/null @@ -1,78 +0,0 @@ ---ヴァイロン・セグメント -function c1644289.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c1644289.target) - e1:SetOperation(c1644289.operation) - c:RegisterEffect(e1) - --Untargetable - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) - e2:SetValue(c1644289.tglimit) - c:RegisterEffect(e2) - --Equip limit - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_EQUIP_LIMIT) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e3:SetValue(c1644289.eqlimit) - c:RegisterEffect(e3) - --Search - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(1644289,0)) - e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e4:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP) - e4:SetCode(EVENT_TO_GRAVE) - e4:SetCondition(c1644289.thcon) - e4:SetTarget(c1644289.thtg) - e4:SetOperation(c1644289.thop) - c:RegisterEffect(e4) -end -function c1644289.eqlimit(e,c) - return c:IsSetCard(0x30) -end -function c1644289.tglimit(e,re,rp) - return aux.tgoval(e,re,rp) and re:IsActiveType(TYPE_TRAP+TYPE_MONSTER) -end -function c1644289.filter(c) - return c:IsFaceup() and c:IsSetCard(0x30) -end -function c1644289.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:GetLocation()==LOCATION_MZONE and c1644289.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c1644289.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c1644289.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c1644289.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,c,tc) - end -end -function c1644289.thcon(e,tp,eg,ep,ev,re,r,rp) - return bit.band(e:GetHandler():GetPreviousPosition(),POS_FACEUP)~=0 - and bit.band(e:GetHandler():GetPreviousLocation(),LOCATION_ONFIELD)~=0 -end -function c1644289.thfilter(c) - return c:IsSetCard(0x30) and c:IsType(TYPE_SPELL) and c:IsAbleToHand() -end -function c1644289.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c1644289.thfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c1644289.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c1644289.thfilter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c16469012.lua b/script/c16469012.lua deleted file mode 100644 index 0285e1c713..0000000000 --- a/script/c16469012.lua +++ /dev/null @@ -1,22 +0,0 @@ ---テーヴァ -function c16469012.initial_effect(c) - --to deck - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(16469012,0)) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetCondition(c16469012.condition) - e1:SetOperation(c16469012.operation) - c:RegisterEffect(e1) -end -function c16469012.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_ADVANCE -end -function c16469012.operation(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetTargetRange(0,LOCATION_MZONE) - e1:SetReset(RESET_PHASE+PHASE_END,2) - Duel.RegisterEffect(e1,tp) -end diff --git a/script/c164710.lua b/script/c164710.lua deleted file mode 100644 index a4aec76663..0000000000 --- a/script/c164710.lua +++ /dev/null @@ -1,56 +0,0 @@ ---小人のいたずら -function c164710.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,0x1c0) - e1:SetOperation(c164710.lvop) - c:RegisterEffect(e1) - --lv - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetRange(LOCATION_GRAVE) - e2:SetHintTiming(0,0x1c0) - e2:SetCost(c164710.lvcost) - e2:SetOperation(c164710.lvop) - c:RegisterEffect(e2) -end -function c164710.lvcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) -end -function c164710.lvop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local hg=Duel.GetMatchingGroup(Card.IsLevelAbove,tp,LOCATION_HAND,LOCATION_HAND,nil,1) - local tc=hg:GetFirst() - while tc do - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_LEVEL) - e1:SetValue(-1) - e1:SetReset(RESET_EVENT+0xfe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - tc=hg:GetNext() - end - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_TO_HAND) - e2:SetReset(RESET_PHASE+PHASE_END) - e2:SetOperation(c164710.hlvop) - Duel.RegisterEffect(e2,tp) -end -function c164710.hlvop(e,tp,eg,ep,ev,re,r,rp) - local hg=eg:Filter(Card.IsLevelAbove,nil,1) - local tc=hg:GetFirst() - while tc do - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_LEVEL) - e1:SetValue(-1) - e1:SetReset(RESET_EVENT+0xfe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - tc=hg:GetNext() - end -end diff --git a/script/c16475472.lua b/script/c16475472.lua deleted file mode 100644 index da799c804a..0000000000 --- a/script/c16475472.lua +++ /dev/null @@ -1,11 +0,0 @@ ---レッサー・デーモン -function c16475472.initial_effect(c) - --redirect - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_BATTLE_DESTROY_REDIRECT) - e1:SetValue(LOCATION_REMOVED) - c:RegisterEffect(e1) -end diff --git a/script/c16480084.lua b/script/c16480084.lua deleted file mode 100644 index 422382738e..0000000000 --- a/script/c16480084.lua +++ /dev/null @@ -1,41 +0,0 @@ ---エヴォルダー・ペルタ -function c16480084.initial_effect(c) -end -function c16480084.evolreg(c) - --defup - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_DEFENCE) - e1:SetValue(500) - e1:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e1) - --search - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(16480084,0)) - e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_BATTLE_DESTROYED) - e2:SetCondition(c16480084.schcon) - e2:SetTarget(c16480084.schtg) - e2:SetOperation(c16480084.schop) - e2:SetReset(RESET_EVENT+0x7b0000) - c:RegisterEffect(e2) -end -function c16480084.schcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) -end -function c16480084.sfilter(c) - return c:IsSetCard(0x304e) and c:IsAbleToHand() -end -function c16480084.schtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c16480084.sfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c16480084.schop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c16480084.sfilter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c16507828.lua b/script/c16507828.lua deleted file mode 100644 index 989fe7f41f..0000000000 --- a/script/c16507828.lua +++ /dev/null @@ -1,6 +0,0 @@ ---ブラキオレイドス -function c16507828.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcCode2(c,94119974,38289717,true,true) -end diff --git a/script/c16509093.lua b/script/c16509093.lua deleted file mode 100644 index 79024543e0..0000000000 --- a/script/c16509093.lua +++ /dev/null @@ -1,45 +0,0 @@ ---王族親衛隊 -function c16509093.initial_effect(c) - --turn set - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(16509093,0)) - e1:SetCategory(CATEGORY_POSITION) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetTarget(c16509093.target) - e1:SetOperation(c16509093.operation) - c:RegisterEffect(e1) - --adup - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(16509093,1)) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_FLIP) - e2:SetOperation(c16509093.adop) - c:RegisterEffect(e2) -end -function c16509093.target(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsCanTurnSet() and c:GetFlagEffect(16509093)==0 end - c:RegisterFlagEffect(16509093,RESET_EVENT+0x1fc0000+RESET_PHASE+PHASE_END,0,1) - Duel.SetOperationInfo(0,CATEGORY_POSITION,c,1,0,0) -end -function c16509093.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - Duel.ChangePosition(c,POS_FACEDOWN_DEFENCE) - end -end -function c16509093.adop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(300) - e1:SetReset(RESET_EVENT+0x1ff0000+RESET_PHASE+PHASE_END) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_UPDATE_DEFENCE) - c:RegisterEffect(e2) - end -end diff --git a/script/c16516630.lua b/script/c16516630.lua deleted file mode 100644 index 298f62fcad..0000000000 --- a/script/c16516630.lua +++ /dev/null @@ -1,54 +0,0 @@ ---BF-尖鋭のボーラ -function c16516630.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(16516630,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_GRAVE) - e1:SetCondition(c16516630.condition) - e1:SetCost(c16516630.cost) - e1:SetTarget(c16516630.target) - e1:SetOperation(c16516630.operation) - c:RegisterEffect(e1) -end -function c16516630.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()==PHASE_MAIN1 -end -function c16516630.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) -end -function c16516630.filter(c) - return c:IsFaceup() and c:IsSetCard(0x33) -end -function c16516630.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c16516630.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c16516630.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c16516630.filter,tp,LOCATION_MZONE,0,1,1,nil) -end -function c16516630.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsFacedown() or not tc:IsRelateToEffect(e) then return end - local c=e:GetHandler() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e1:SetValue(1) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_AVOID_BATTLE_DAMAGE) - tc:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e3:SetCode(EVENT_BATTLED) - e3:SetOperation(c16516630.desop) - e3:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e3) -end -function c16516630.desop(e,tp,eg,ep,ev,re,r,rp) - local d=Duel.GetAttackTarget() - if d and d~=e:GetHandler() then Duel.Destroy(d,REASON_EFFECT) end -end diff --git a/script/c16527176.lua b/script/c16527176.lua deleted file mode 100644 index 1b7e2d2ece..0000000000 --- a/script/c16527176.lua +++ /dev/null @@ -1,9 +0,0 @@ ---ナチュル・ガオドレイク -function c16527176.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,c16527176.synfilter,aux.NonTuner(c16527176.synfilter),1) - c:EnableReviveLimit() -end -function c16527176.synfilter(c) - return c:IsAttribute(ATTRIBUTE_EARTH) -end diff --git a/script/c16550875.lua b/script/c16550875.lua deleted file mode 100644 index 22a152c9cf..0000000000 --- a/script/c16550875.lua +++ /dev/null @@ -1,80 +0,0 @@ ---甲虫装機の魔剣 ゼクトキャリバー -function c16550875.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c16550875.target) - e1:SetOperation(c16550875.operation) - c:RegisterEffect(e1) - --Atk - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(800) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EFFECT_UPDATE_DEFENCE) - c:RegisterEffect(e3) - --Equip limit - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_EQUIP_LIMIT) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e3:SetValue(c16550875.eqlimit) - c:RegisterEffect(e3) - --Search - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(16550875,0)) - e4:SetCategory(CATEGORY_TOHAND) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e4:SetProperty(EFFECT_FLAG_CARD_TARGET) - e4:SetCode(EVENT_TO_GRAVE) - e4:SetCondition(c16550875.thcon) - e4:SetTarget(c16550875.thtg) - e4:SetOperation(c16550875.thop) - c:RegisterEffect(e4) -end -function c16550875.eqlimit(e,c) - return c:IsSetCard(0x56) -end -function c16550875.filter(c) - return c:IsFaceup() and c:IsSetCard(0x56) -end -function c16550875.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c16550875.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c16550875.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c16550875.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c16550875.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,c,tc) - end -end -function c16550875.thcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousPosition(POS_FACEUP) - and e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) -end -function c16550875.thfilter(c) - return c:IsSetCard(0x56) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() -end -function c16550875.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c16550875.thfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c16550875.thfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c16550875.thfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0) -end -function c16550875.thop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end diff --git a/script/c16556849.lua b/script/c16556849.lua deleted file mode 100644 index f8624a9502..0000000000 --- a/script/c16556849.lua +++ /dev/null @@ -1,41 +0,0 @@ ---放浪の勇者 フリード -function c16556849.initial_effect(c) - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(16556849,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCost(c16556849.cost) - e1:SetTarget(c16556849.tg) - e1:SetOperation(c16556849.op) - c:RegisterEffect(e1) -end -function c16556849.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c16556849.costfilter,tp,LOCATION_GRAVE,0,2,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c16556849.costfilter,tp,LOCATION_GRAVE,0,2,2,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c16556849.costfilter(co) - return co:IsAttribute(ATTRIBUTE_LIGHT) and co:IsAbleToRemoveAsCost() -end -function c16556849.filter(c,atk) - return c:IsFaceup() and c:GetAttack()>atk and c:IsDestructable() -end -function c16556849.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c16556849.filter(chkc,e:GetHandler():GetAttack()) end - if chk==0 then return Duel.IsExistingTarget(c16556849.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,e:GetHandler():GetAttack()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c16556849.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,e:GetHandler():GetAttack()) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c16556849.op(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and c:IsFaceup() and tc:IsFaceup() and tc:IsRelateToEffect(e) - and tc:GetAttack()>c:GetAttack() then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c16589042.lua b/script/c16589042.lua deleted file mode 100644 index b050446202..0000000000 --- a/script/c16589042.lua +++ /dev/null @@ -1,16 +0,0 @@ ---疾風の暗黒騎士ガイア -function c16589042.initial_effect(c) - --summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(16589042,0)) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SUMMON_PROC) - e1:SetCondition(c16589042.ntcon) - c:RegisterEffect(e1) -end -function c16589042.ntcon(e,c,minc) - if c==nil then return true end - return minc==0 and c:GetLevel()>4 and Duel.GetFieldGroupCount(c:GetControler(),LOCATION_HAND,0)==1 - and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 -end diff --git a/script/c16616620.lua b/script/c16616620.lua deleted file mode 100644 index 10df65a062..0000000000 --- a/script/c16616620.lua +++ /dev/null @@ -1,45 +0,0 @@ ---コンタクト -function c16616620.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c16616620.target) - e1:SetOperation(c16616620.activate) - c:RegisterEffect(e1) -end -c16616620.list={[42682609]=17955766,[43751755]=43237273,[17363041]=54959865, - [29246354]=17732278,[16241441]=89621922,[42239546]=80344569} -function c16616620.filter1(c,e,tp) - local code=c:GetCode() - local tcode=c16616620.list[code] - return tcode and Duel.IsExistingMatchingCard(c16616620.filter2,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,tcode,e,tp) -end -function c16616620.filter2(c,tcode,e,tp) - return c:IsCode(tcode) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) -end -function c16616620.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsExistingMatchingCard(c16616620.filter1,tp,LOCATION_MZONE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) -end -function c16616620.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsSetCard,tp,LOCATION_MZONE,0,nil,0x1e) - if g:GetCount()==0 then return end - Duel.SendtoGrave(g,REASON_EFFECT) - local sg=Group.CreateGroup() - local tc=g:GetFirst() - while tc do - local code=tc:GetCode() - local tcode=c16616620.list[code] - local tg=Duel.GetMatchingGroup(c16616620.filter2,tp,LOCATION_HAND+LOCATION_DECK,0,nil,tcode,e,tp) - sg:Merge(tg) - tc=g:GetNext() - end - if sg:GetCount()>0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local spg=sg:Select(tp,1,1,nil) - Duel.SpecialSummon(spg,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c1662004.lua b/script/c1662004.lua deleted file mode 100644 index bc84efc374..0000000000 --- a/script/c1662004.lua +++ /dev/null @@ -1,52 +0,0 @@ ---炎星師-チョウテン -function c1662004.initial_effect(c) - --synchro limit - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetValue(c1662004.synlimit) - c:RegisterEffect(e1) - --summon success - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(1662004,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_SUMMON_SUCCESS) - e2:SetCountLimit(1,1662004) - e2:SetTarget(c1662004.sptg) - e2:SetOperation(c1662004.spop) - c:RegisterEffect(e2) -end -function c1662004.synlimit(e,c) - if not c then return false end - return not c:IsRace(RACE_BEASTWARRIOR) -end -function c1662004.spfilter(c,e,tp) - return c:IsDefenceBelow(200) and c:IsAttribute(ATTRIBUTE_FIRE) and c:GetLevel()==3 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c1662004.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c1662004.spfilter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c1662004.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c1662004.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c1662004.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENCE)>0 then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetTarget(c1662004.atktg) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) - end -end -function c1662004.atktg(e,c) - return not c:IsRace(RACE_BEASTWARRIOR) -end diff --git a/script/c16638212.lua b/script/c16638212.lua deleted file mode 100644 index 8b7f813cd9..0000000000 --- a/script/c16638212.lua +++ /dev/null @@ -1,41 +0,0 @@ ---異次元の精霊 -function c16638212.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c16638212.spcon) - e1:SetOperation(c16638212.spop) - c:RegisterEffect(e1) -end -function c16638212.spfilter(c) - return c:IsFaceup() and c:IsAbleToRemoveAsCost() -end -function c16638212.spcon(e,c) - if c==nil then return true end - return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-1 - and Duel.IsExistingMatchingCard(c16638212.spfilter,c:GetControler(),LOCATION_MZONE,0,1,nil) -end -function c16638212.spop(e,tp,eg,ep,ev,re,r,rp,c) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c16638212.spfilter,tp,LOCATION_MZONE,0,1,1,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST+REASON_TEMPORARY) - g:GetFirst():RegisterFlagEffect(16638212,RESET_EVENT+0x1fe0000,0,0) - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(16638212,0)) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) - e1:SetCountLimit(1) - e1:SetReset(RESET_EVENT+0xff0000+RESET_PHASE+PHASE_STANDBY) - e1:SetOperation(c16638212.retop) - e1:SetLabelObject(g:GetFirst()) - c:RegisterEffect(e1) -end -function c16638212.retop(e,tp,eg,ep,ev,re,r,rp) - if e:GetLabelObject():GetFlagEffect(16638212)~=0 then - Duel.ReturnToField(e:GetLabelObject()) - end -end diff --git a/script/c16674846.lua b/script/c16674846.lua deleted file mode 100644 index aadbad7503..0000000000 --- a/script/c16674846.lua +++ /dev/null @@ -1,35 +0,0 @@ ---スピリット・フォース -function c16674846.initial_effect(c) - --no damage - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_PRE_DAMAGE_CALCULATE) - e1:SetCondition(c16674846.condition) - e1:SetOperation(c16674846.operation) - c:RegisterEffect(e1) -end -function c16674846.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp and Duel.GetBattleDamage(tp)>0 -end -function c16674846.filter(c) - return c:IsDefenceBelow(1500) and c:IsType(TYPE_TUNER) and c:IsRace(RACE_WARRIOR) - and c:IsAbleToHand() and not c:IsHasEffect(EFFECT_NECRO_VALLEY) -end -function c16674846.operation(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PRE_BATTLE_DAMAGE) - e1:SetOperation(c16674846.damop) - e1:SetReset(RESET_PHASE+PHASE_DAMAGE) - Duel.RegisterEffect(e1,tp) - local g=Duel.GetMatchingGroup(c16674846.filter,tp,LOCATION_GRAVE,0,nil) - if g:GetCount()~=0 and Duel.SelectYesNo(tp,aux.Stringid(16674846,0)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local sg=g:Select(tp,1,1,nil) - Duel.SendtoHand(sg,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,sg) - end -end -function c16674846.damop(e,tp,eg,ep,ev,re,r,rp) - Duel.ChangeBattleDamage(tp,0) -end diff --git a/script/c16678947.lua b/script/c16678947.lua deleted file mode 100644 index 8018820e56..0000000000 --- a/script/c16678947.lua +++ /dev/null @@ -1,39 +0,0 @@ ---カース・サイキック -function c16678947.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetCondition(c16678947.condition) - e1:SetTarget(c16678947.target) - e1:SetOperation(c16678947.activate) - c:RegisterEffect(e1) -end -function c16678947.condition(e,tp,eg,ep,ev,re,r,rp,chk) - local tc=eg:GetFirst() - local bc=tc:GetBattleTarget() - return tc:GetPreviousControler()==tp and tc:IsLocation(LOCATION_GRAVE) and tc:IsRace(RACE_PSYCHO) - and bit.band(tc:GetBattlePosition(),POS_FACEUP)~=0 - and bc:IsRelateToBattle() and bc:IsControler(1-tp) and bc==Duel.GetAttacker() -end -function c16678947.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - local tc=eg:GetFirst() - local bc=Duel.GetAttacker() - if chk==0 then return bc:IsCanBeEffectTarget(e) and bc:IsDestructable() end - local lv=tc:GetLevel() - e:SetLabel(lv) - Duel.SetTargetCard(bc) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,bc,1,0,0) - if lv~=0 then - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,lv*300) - end -end -function c16678947.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)~=0 then - Duel.Damage(1-tp,e:GetLabel()*300,REASON_EFFECT) - end -end diff --git a/script/c16691074.lua b/script/c16691074.lua deleted file mode 100644 index c85e27e4fd..0000000000 --- a/script/c16691074.lua +++ /dev/null @@ -1,68 +0,0 @@ ---オッドアイズ・アブソリュート・ドラゴン -function c16691074.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,7,2) - c:EnableReviveLimit() - --disable attack - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(16691074,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetCountLimit(1,16691074) - e1:SetCost(c16691074.atkcost) - e1:SetOperation(c16691074.atkop) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(16691074,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e2:SetCountLimit(1,16691075) - e2:SetCondition(c16691074.spcon) - e2:SetTarget(c16691074.sptg) - e2:SetOperation(c16691074.spop) - c:RegisterEffect(e2) -end -function c16691074.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c16691074.spfilter1(c,e,tp) - return c:IsSetCard(0x99) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) - and not c:IsHasEffect(EFFECT_NECRO_VALLEY) -end -function c16691074.atkop(e,tp,eg,ep,ev,re,r,rp) - if Duel.NegateAttack() then - local g1=Duel.GetMatchingGroup(c16691074.spfilter1,tp,LOCATION_HAND+LOCATION_GRAVE,0,nil,e,tp) - if g1:GetCount()>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.SelectYesNo(tp,aux.Stringid(16691074,2)) then - Duel.BreakEffect() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g2=g1:Select(tp,1,1,nil) - Duel.SpecialSummon(g2,0,tp,tp,false,false,POS_FACEUP) - end - end -end -function c16691074.spcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsPreviousLocation(LOCATION_ONFIELD) and bit.band(c:GetSummonType(),SUMMON_TYPE_XYZ)==SUMMON_TYPE_XYZ -end -function c16691074.spfilter2(c,e,tp) - return c:IsSetCard(0x99) and not c:IsCode(16691074) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c16691074.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c16691074.spfilter2,tp,LOCATION_EXTRA,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function c16691074.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c16691074.spfilter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c16693254.lua b/script/c16693254.lua deleted file mode 100644 index df6bdba52c..0000000000 --- a/script/c16693254.lua +++ /dev/null @@ -1,29 +0,0 @@ ---リチュア・アバンス -function c16693254.initial_effect(c) - --search - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(16693254,0)) - e1:SetCategory(CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_MZONE) - e1:SetTarget(c16693254.target) - e1:SetOperation(c16693254.operation) - c:RegisterEffect(e1) -end -function c16693254.filter(c) - return c:IsSetCard(0x3a) and c:IsType(TYPE_MONSTER) -end -function c16693254.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c16693254.filter,tp,LOCATION_DECK,0,1,nil) end -end -function c16693254.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(16693254,1)) - local g=Duel.SelectMatchingCard(tp,c16693254.filter,tp,LOCATION_DECK,0,1,1,nil) - local tc=g:GetFirst() - if tc then - Duel.ShuffleDeck(tp) - Duel.MoveSequence(tc,0) - Duel.ConfirmDecktop(tp,1) - end -end diff --git a/script/c1669772.lua b/script/c1669772.lua deleted file mode 100644 index 7ec39743ba..0000000000 --- a/script/c1669772.lua +++ /dev/null @@ -1,28 +0,0 @@ ---魔力浄化 -function c1669772.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c1669772.cost) - e1:SetTarget(c1669772.target) - e1:SetOperation(c1669772.activate) - c:RegisterEffect(e1) -end -function c1669772.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) -end -function c1669772.filter(c) - return c:IsFaceup() and c:GetType()==TYPE_SPELL+TYPE_CONTINUOUS and c:IsDestructable() -end -function c1669772.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c1669772.filter,tp,LOCATION_SZONE,LOCATION_SZONE,1,nil) end - local g=Duel.GetMatchingGroup(c1669772.filter,tp,LOCATION_SZONE,LOCATION_SZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c1669772.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c1669772.filter,tp,LOCATION_SZONE,LOCATION_SZONE,nil) - Duel.Destroy(g,REASON_EFFECT) -end diff --git a/script/c16708652.lua b/script/c16708652.lua deleted file mode 100644 index 3c983542a8..0000000000 --- a/script/c16708652.lua +++ /dev/null @@ -1,45 +0,0 @@ ---カラクリ粉 -function c16708652.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetCondition(c16708652.condition) - e1:SetTarget(c16708652.target) - e1:SetOperation(c16708652.activate) - c:RegisterEffect(e1) -end -function c16708652.condition(e,tp,eg,ep,ev,re,r,rp) - local ph=Duel.GetCurrentPhase() - return ph==PHASE_BATTLE or (ph==PHASE_DAMAGE and not Duel.IsDamageCalculated()) -end -function c16708652.filter(c) - return c:IsPosition(POS_FACEUP_ATTACK) and c:IsSetCard(0x11) -end -function c16708652.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - if chk==0 then return Duel.IsExistingTarget(c16708652.filter,tp,LOCATION_MZONE,LOCATION_MZONE,2,nil) end - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(16708652,0)) - local g1=Duel.SelectTarget(tp,c16708652.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(16708652,1)) - local g2=Duel.SelectTarget(tp,c16708652.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,g1:GetFirst()) - e:SetLabelObject(g1:GetFirst()) -end -function c16708652.activate(e,tp,eg,ep,ev,re,r,rp) - local tc1=e:GetLabelObject() - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local tc2=g:GetFirst() - if tc1==tc2 then tc2=g:GetNext() end - if tc1:IsRelateToEffect(e) and tc1:IsPosition(POS_FACEUP_ATTACK) and tc2:IsRelateToEffect(e) then - Duel.ChangePosition(tc1,POS_FACEUP_DEFENCE) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - e1:SetValue(tc1:GetAttack()) - tc2:RegisterEffect(e1) - end -end diff --git a/script/c16719802.lua b/script/c16719802.lua deleted file mode 100644 index 1f2fc54a2c..0000000000 --- a/script/c16719802.lua +++ /dev/null @@ -1,32 +0,0 @@ ---スター・ブライト・ドラゴン -function c16719802.initial_effect(c) - --lv up - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(16719802,0)) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c16719802.tg) - e1:SetOperation(c16719802.op) - c:RegisterEffect(e1) -end -function c16719802.filter(c) - return c:IsFaceup() and c:GetLevel()>0 -end -function c16719802.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c16719802.filter(chkc) and chkc~=e:GetHandler() end - if chk==0 then return Duel.IsExistingTarget(c16719802.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c16719802.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,e:GetHandler()) -end -function c16719802.op(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_LEVEL) - e1:SetValue(2) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - end -end diff --git a/script/c16725505.lua b/script/c16725505.lua deleted file mode 100644 index c1141dd015..0000000000 --- a/script/c16725505.lua +++ /dev/null @@ -1,45 +0,0 @@ ---SR赤目のダイス -function c16725505.initial_effect(c) - --lv change - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(16725505,0)) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c16725505.tg) - e1:SetOperation(c16725505.op) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e2) -end -function c16725505.filter(c) - return c:IsFaceup() and c:IsSetCard(0x2016) and not c:IsCode(16725505) and c:GetLevel()>0 -end -function c16725505.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c16725505.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c16725505.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - local g=Duel.SelectTarget(tp,c16725505.filter,tp,LOCATION_MZONE,0,1,1,nil) - local t={} - local i=1 - local p=1 - local lv=g:GetFirst():GetLevel() - for i=1,6 do - if lv~=i then t[p]=i p=p+1 end - end - t[p]=nil - Duel.Hint(HINT_SELECTMSG,tp,567) - e:SetLabel(Duel.AnnounceNumber(tp,table.unpack(t))) -end -function c16725505.op(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CHANGE_LEVEL) - e1:SetValue(e:GetLabel()) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - end -end diff --git a/script/c16751086.lua b/script/c16751086.lua deleted file mode 100644 index fb0eed7219..0000000000 --- a/script/c16751086.lua +++ /dev/null @@ -1,19 +0,0 @@ ---ウォーム・ワーム -function c16751086.initial_effect(c) - --deckdes - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(16751086,0)) - e1:SetCategory(CATEGORY_DECKDES) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_DESTROYED) - e1:SetTarget(c16751086.target) - e1:SetOperation(c16751086.operation) - c:RegisterEffect(e1) -end -function c16751086.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,1-tp,3) -end -function c16751086.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.DiscardDeck(1-tp,3,REASON_EFFECT) -end diff --git a/script/c16762927.lua b/script/c16762927.lua deleted file mode 100644 index dbf6f39816..0000000000 --- a/script/c16762927.lua +++ /dev/null @@ -1,33 +0,0 @@ ---墓守の使い魔 -function c16762927.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --attack cost - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_ATTACK_COST) - e2:SetRange(LOCATION_SZONE) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetTargetRange(0,1) - e2:SetCost(c16762927.atcost) - e2:SetOperation(c16762927.atop) - c:RegisterEffect(e2) - --accumulate - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetCode(0x10000000+16762927) - e3:SetRange(LOCATION_SZONE) - e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e3:SetTargetRange(0,1) - c:RegisterEffect(e3) -end -function c16762927.atcost(e,c,tp) - local ct=Duel.GetFlagEffect(tp,16762927) - return Duel.IsPlayerCanDiscardDeckAsCost(tp,ct) -end -function c16762927.atop(e,tp,eg,ep,ev,re,r,rp) - Duel.DiscardDeck(tp,1,REASON_COST) -end diff --git a/script/c16768387.lua b/script/c16768387.lua deleted file mode 100644 index 71fe577018..0000000000 --- a/script/c16768387.lua +++ /dev/null @@ -1,12 +0,0 @@ ---大王目玉 -function c16768387.initial_effect(c) - --flip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(16768387,0)) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP) - e1:SetOperation(c16768387.operation) - c:RegisterEffect(e1) -end -function c16768387.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.SortDecktop(tp,tp,5) -end diff --git a/script/c16796157.lua b/script/c16796157.lua deleted file mode 100644 index c0a9f7267f..0000000000 --- a/script/c16796157.lua +++ /dev/null @@ -1,32 +0,0 @@ ---野獣戦士ピューマン -function c16796157.initial_effect(c) - --salvage - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(16796157,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c16796157.thcost) - e1:SetTarget(c16796157.thtg) - e1:SetOperation(c16796157.thop) - c:RegisterEffect(e1) -end -function c16796157.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end -function c16796157.filter(c) - return c:IsCode(80208158) and c:IsAbleToHand() and not c:IsHasEffect(EFFECT_NECRO_VALLEY) -end -function c16796157.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c16796157.filter,tp,LOCATION_GRAVE+LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE+LOCATION_DECK) -end -function c16796157.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c16796157.filter,tp,LOCATION_GRAVE+LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c16825874.lua b/script/c16825874.lua deleted file mode 100644 index 8929c80eb9..0000000000 --- a/script/c16825874.lua +++ /dev/null @@ -1,62 +0,0 @@ ---エキセントリック・ボーイ -function c16825874.initial_effect(c) - --synchro custom - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SYNCHRO_MATERIAL_CUSTOM) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetTarget(c16825874.target) - e1:SetValue(1) - e1:SetOperation(c16825874.operation) - c:RegisterEffect(e1) - --be material - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_BE_MATERIAL) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetCondition(c16825874.ccon) - e2:SetOperation(c16825874.cop) - c:RegisterEffect(e2) -end -c16825874.tuner_filter=aux.FALSE -function c16825874.filter(c,syncard,tuner,f,lv) - return c:IsNotTuner() and c:IsCanBeSynchroMaterial(syncard,tuner) and (f==nil or f(c)) and c:GetLevel()==lv -end -function c16825874.target(e,syncard,f,minc,maxc) - if minc>1 then return false end - local lv=syncard:GetLevel()-e:GetHandler():GetLevel() - if lv<=0 then return false end - return Duel.IsExistingMatchingCard(c16825874.filter,syncard:GetControler(),LOCATION_HAND,0,1,nil,syncard,e:GetHandler(),f,lv) -end -function c16825874.operation(e,tp,eg,ep,ev,re,r,rp,syncard,f,minc,maxc) - local lv=syncard:GetLevel()-e:GetHandler():GetLevel() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SMATERIAL) - local g=Duel.SelectMatchingCard(tp,c16825874.filter,tp,LOCATION_HAND,0,1,1,nil,syncard,e:GetHandler(),f,lv) - Duel.SetSynchroMaterial(g) -end -function c16825874.ccon(e,tp,eg,ep,ev,re,r,rp) - return r==REASON_SYNCHRO -end -function c16825874.cop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local rc=c:GetReasonCard() - --leave redirect - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) - e1:SetValue(LOCATION_REMOVED) - e1:SetReset(RESET_EVENT+0x7e0000) - rc:RegisterEffect(e1) - --cannot trigger - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_CANNOT_TRIGGER) - e2:SetReset(RESET_EVENT+0x1fe0000) - rc:RegisterEffect(e2) - --disable - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_DISABLE) - e3:SetReset(RESET_EVENT+0x1fe0000) - rc:RegisterEffect(e3) -end diff --git a/script/c16828633.lua b/script/c16828633.lua deleted file mode 100644 index c7c0202f2b..0000000000 --- a/script/c16828633.lua +++ /dev/null @@ -1,29 +0,0 @@ ---スペア・ジェネクス -function c16828633.initial_effect(c) - --cos - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(16828633,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c16828633.condition) - e1:SetOperation(c16828633.operation) - c:RegisterEffect(e1) -end -function c16828633.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x2) -end -function c16828633.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c16828633.cfilter,tp,LOCATION_MZONE,0,1,e:GetHandler()) -end -function c16828633.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) or c:IsFacedown() then return end - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CHANGE_CODE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e1:SetValue(68505803) - c:RegisterEffect(e1) -end diff --git a/script/c1686814.lua b/script/c1686814.lua deleted file mode 100644 index 25894907f6..0000000000 --- a/script/c1686814.lua +++ /dev/null @@ -1,91 +0,0 @@ ---アルティマヤ・ツィオルキン -function c1686814.initial_effect(c) - c:EnableReviveLimit() - --spsummon condition - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - c:RegisterEffect(e1) - --special summon rule - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_SPSUMMON_PROC) - e2:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e2:SetRange(LOCATION_EXTRA) - e2:SetCondition(c1686814.sprcon) - e2:SetOperation(c1686814.sprop) - c:RegisterEffect(e2) - --special summon - local e3=Effect.CreateEffect(c) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_SSET) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1) - e3:SetCondition(c1686814.spcon) - e3:SetTarget(c1686814.sptg) - e3:SetOperation(c1686814.spop) - c:RegisterEffect(e3) - --cannot be target - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e4:SetCode(EFFECT_CANNOT_BE_BATTLE_TARGET) - e4:SetRange(LOCATION_MZONE) - e4:SetCondition(c1686814.tgcon) - e4:SetValue(aux.imval1) - c:RegisterEffect(e4) - local e5=e4:Clone() - e5:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) - e5:SetValue(aux.tgval) - c:RegisterEffect(e5) -end -function c1686814.sprfilter1(c,tp) - local lv=c:GetLevel() - return lv>4 and c:IsFaceup() and c:IsType(TYPE_TUNER) and c:IsAbleToGraveAsCost() - and Duel.IsExistingMatchingCard(c1686814.sprfilter2,tp,LOCATION_MZONE,0,1,nil,lv) -end -function c1686814.sprfilter2(c,lv) - return c:IsFaceup() and c:GetLevel()==lv and not c:IsType(TYPE_TUNER) and c:IsAbleToGraveAsCost() -end -function c1686814.sprcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.GetLocationCount(tp,LOCATION_MZONE)>-2 - and Duel.IsExistingMatchingCard(c1686814.sprfilter1,tp,LOCATION_MZONE,0,1,nil,tp) -end -function c1686814.sprop(e,tp,eg,ep,ev,re,r,rp,c) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g1=Duel.SelectMatchingCard(tp,c1686814.sprfilter1,tp,LOCATION_MZONE,0,1,1,nil,tp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g2=Duel.SelectMatchingCard(tp,c1686814.sprfilter2,tp,LOCATION_MZONE,0,1,1,nil,g1:GetFirst():GetLevel()) - g1:Merge(g2) - Duel.SendtoGrave(g1,REASON_COST) -end -function c1686814.spcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(Card.IsControler,1,nil,tp) -end -function c1686814.spfilter(c,e,tp) - return (c:IsSetCard(0xc2) or ((c:GetLevel()==7 or c:GetLevel()==8) and c:IsRace(RACE_DRAGON))) - and c:IsType(TYPE_SYNCHRO) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c1686814.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c1686814.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function c1686814.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c1686814.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end -function c1686814.tgfilter(c) - return c:IsFaceup() and c:IsType(TYPE_SYNCHRO) -end -function c1686814.tgcon(e) - return Duel.IsExistingMatchingCard(c1686814.tgfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,e:GetHandler()) -end diff --git a/script/c16886617.lua b/script/c16886617.lua deleted file mode 100644 index 3572b9f23a..0000000000 --- a/script/c16886617.lua +++ /dev/null @@ -1,77 +0,0 @@ ---レプティレス・ヴァースキ -function c16886617.initial_effect(c) - c:EnableReviveLimit() - c:SetUniqueOnField(1,1,16886617) - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(0) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_SPSUMMON_PROC) - e2:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e2:SetRange(LOCATION_HAND) - e2:SetCondition(c16886617.spcon) - e2:SetOperation(c16886617.spop) - c:RegisterEffect(e2) - --destroy - local e5=Effect.CreateEffect(c) - e5:SetDescription(aux.Stringid(16886617,0)) - e5:SetCategory(CATEGORY_DESTROY) - e5:SetType(EFFECT_TYPE_IGNITION) - e5:SetProperty(EFFECT_FLAG_CARD_TARGET) - e5:SetRange(LOCATION_MZONE) - e5:SetCountLimit(1) - e5:SetTarget(c16886617.destg) - e5:SetOperation(c16886617.desop) - c:RegisterEffect(e5) -end -function c16886617.rfilter(c) - return c:IsFaceup() and c:GetAttack()==0 and c:IsReleasable() -end -function c16886617.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - local ct=-ft+1 - if ct>2 then return false end - if ct>0 and not Duel.IsExistingMatchingCard(c16886617.rfilter,tp,LOCATION_MZONE,0,ct,nil) then return false end - return Duel.IsExistingMatchingCard(c16886617.rfilter,tp,LOCATION_MZONE,LOCATION_MZONE,2,nil) -end -function c16886617.spop(e,tp,eg,ep,ev,re,r,rp,c) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - local ct=-ft+1 - if ct<0 then ct=0 end - local g=Group.CreateGroup() - if ct>0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) - local sg=Duel.SelectMatchingCard(tp,c16886617.rfilter,tp,LOCATION_MZONE,0,ct,ct,nil) - g:Merge(sg) - end - if ct<2 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) - local sg=Duel.SelectMatchingCard(tp,c16886617.rfilter,tp,LOCATION_MZONE,LOCATION_MZONE,2-ct,2-ct,g:GetFirst()) - g:Merge(sg) - end - Duel.Release(g,REASON_COST) -end -function c16886617.desfilter(c) - return c:IsFaceup() and c:IsDestructable() -end -function c16886617.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c16886617.desfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c16886617.desfilter,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c16886617.desfilter,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c16886617.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c16889337.lua b/script/c16889337.lua deleted file mode 100644 index 215aaad02c..0000000000 --- a/script/c16889337.lua +++ /dev/null @@ -1,84 +0,0 @@ ---荒魂 -function c16889337.initial_effect(c) - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(aux.FALSE) - c:RegisterEffect(e1) - --summon,flip - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetCode(EVENT_SUMMON_SUCCESS) - e2:SetOperation(c16889337.retreg) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EVENT_FLIP) - c:RegisterEffect(e3) - --search - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(16889337,0)) - e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e4:SetCode(EVENT_SUMMON_SUCCESS) - e4:SetTarget(c16889337.thtg) - e4:SetOperation(c16889337.thop) - c:RegisterEffect(e4) - local e5=e4:Clone() - e5:SetCode(EVENT_FLIP) - c:RegisterEffect(e5) -end -function c16889337.filter(c) - return c:IsType(TYPE_SPIRIT) and c:GetCode()~=16889337 and c:IsAbleToHand() -end -function c16889337.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c16889337.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c16889337.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c16889337.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end -function c16889337.retreg(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - --to hand - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetDescription(aux.Stringid(16889337,0)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetReset(RESET_EVENT+0x1ee0000+RESET_PHASE+PHASE_END) - e1:SetCondition(c16889337.retcon) - e1:SetTarget(c16889337.rettg) - e1:SetOperation(c16889337.retop) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - c:RegisterEffect(e2) -end -function c16889337.retcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsHasEffect(EFFECT_SPIRIT_DONOT_RETURN) then return false end - if e:IsHasType(EFFECT_TYPE_TRIGGER_F) then - return not c:IsHasEffect(EFFECT_SPIRIT_MAYNOT_RETURN) - else return c:IsHasEffect(EFFECT_SPIRIT_MAYNOT_RETURN) end -end -function c16889337.rettg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0) -end -function c16889337.retop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - Duel.SendtoHand(c,nil,REASON_EFFECT) - end -end diff --git a/script/c168917.lua b/script/c168917.lua deleted file mode 100644 index a7dd8593e8..0000000000 --- a/script/c168917.lua +++ /dev/null @@ -1,36 +0,0 @@ ---ヴァイロン・ハプト -function c168917.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(168917,0)) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_MZONE) - e1:SetTarget(c168917.sptg) - e1:SetOperation(c168917.spop) - c:RegisterEffect(e1) -end -function c168917.filter(c,e,tp) - return c:IsFaceup() and c:IsSetCard(0x30) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c168917.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_SZONE) and chkc:IsControler(tp) and c168917.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c168917.filter,tp,LOCATION_SZONE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c168917.filter,tp,LOCATION_SZONE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c168917.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENCE)~=0 then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) - e1:SetReset(RESET_EVENT+0x47e0000) - e1:SetValue(LOCATION_REMOVED) - tc:RegisterEffect(e1,true) - end -end diff --git a/script/c1689516.lua b/script/c1689516.lua deleted file mode 100644 index 577a8f9054..0000000000 --- a/script/c1689516.lua +++ /dev/null @@ -1,38 +0,0 @@ ---百獣大行進 -function c1689516.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetCondition(c1689516.condition) - e1:SetTarget(c1689516.target) - e1:SetOperation(c1689516.activate) - c:RegisterEffect(e1) -end -function c1689516.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end -function c1689516.filter(c) - return c:IsFaceup() and c:IsRace(RACE_BEAST) -end -function c1689516.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c1689516.filter,tp,LOCATION_MZONE,0,1,nil) end -end -function c1689516.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c1689516.filter,tp,LOCATION_MZONE,0,nil) - local atk=g:GetCount()*200 - local c=e:GetHandler() - local tc=g:GetFirst() - while tc do - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(atk) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - tc:RegisterEffect(e1) - tc=g:GetNext() - end -end diff --git a/script/c16898077.lua b/script/c16898077.lua deleted file mode 100644 index cf62fe4744..0000000000 --- a/script/c16898077.lua +++ /dev/null @@ -1,134 +0,0 @@ ---ジャイアント・ボマー・エアレイド -function c16898077.initial_effect(c) - c:EnableReviveLimit() - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(16898077,0)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCost(c16898077.descost) - e2:SetTarget(c16898077.destg) - e2:SetOperation(c16898077.desop) - c:RegisterEffect(e2) - --destroy & damage - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(16898077,1)) - e3:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_SUMMON_SUCCESS) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE) - e3:SetCondition(c16898077.damcon) - e3:SetTarget(c16898077.damtg) - e3:SetOperation(c16898077.damop) - c:RegisterEffect(e3) - local e4=e3:Clone() - e4:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e4) - local e5=Effect.CreateEffect(c) - e5:SetDescription(aux.Stringid(16898077,2)) - e5:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE) - e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e5:SetCode(EVENT_MSET) - e5:SetRange(LOCATION_MZONE) - e5:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE) - e5:SetCondition(c16898077.damcon2) - e5:SetTarget(c16898077.damtg2) - e5:SetOperation(c16898077.damop2) - c:RegisterEffect(e5) - local e6=e5:Clone() - e6:SetCode(EVENT_SSET) - c:RegisterEffect(e6) - local e7=Effect.CreateEffect(c) - e7:SetDescription(aux.Stringid(16898077,2)) - e7:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE) - e7:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e7:SetCode(EVENT_CHANGE_POS) - e7:SetRange(LOCATION_MZONE) - e7:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE) - e7:SetCondition(c16898077.damcon3) - e7:SetTarget(c16898077.damtg3) - e7:SetOperation(c16898077.damop3) - c:RegisterEffect(e7) -end -function c16898077.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,1,1,nil) - Duel.SendtoGrave(g,REASON_COST) -end -function c16898077.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and chkc:IsDestructable() end - if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,0,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,0,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c16898077.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end -function c16898077.damcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp -end -function c16898077.dfilter(c,e,sp) - return c:GetSummonPlayer()==sp and c:IsDestructable() and (not e or c:IsRelateToEffect(e)) -end -function c16898077.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return eg:IsExists(c16898077.dfilter,1,nil,nil,1-tp) end - local g=eg:Filter(c16898077.dfilter,nil,nil,1-tp) - Duel.SetTargetCard(eg) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,800) -end -function c16898077.damop(e,tp,eg,ep,ev,re,r,rp) - local g=eg:Filter(c16898077.dfilter,nil,e,1-tp) - if e:GetHandler():IsRelateToEffect(e) and g:GetCount()~=0 and Duel.Destroy(g,REASON_EFFECT)~=0 then - Duel.Damage(1-tp,800,REASON_EFFECT) - end -end -function c16898077.damcon2(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp and rp~=tp -end -function c16898077.damtg2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetCard(eg) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,eg:GetCount(),0,0) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,800) -end -function c16898077.damop2(e,tp,eg,ep,ev,re,r,rp) - local tc=eg:GetFirst() - if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)~=0 then - Duel.Damage(1-tp,800,REASON_EFFECT) - end -end -function c16898077.damcon3(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp and rp~=tp -end -function c16898077.sfilter(c,e) - return c:IsFacedown() and c:IsDestructable() and (not e or c:IsRelateToEffect(e)) -end -function c16898077.damtg3(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return eg:IsExists(c16898077.sfilter,1,nil) end - local g=eg:Filter(c16898077.sfilter,nil) - Duel.SetTargetCard(eg) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,800) -end -function c16898077.damop3(e,tp,eg,ep,ev,re,r,rp) - local g=eg:Filter(c16898077.sfilter,nil,e) - if e:GetHandler():IsRelateToEffect(e) and g:GetCount()~=0 and Duel.Destroy(g,REASON_EFFECT)~=0 then - Duel.Damage(1-tp,800,REASON_EFFECT) - end -end diff --git a/script/c16906241.lua b/script/c16906241.lua deleted file mode 100644 index 0d0462ad9e..0000000000 --- a/script/c16906241.lua +++ /dev/null @@ -1,28 +0,0 @@ ---セイクリッド・レスカ -function c16906241.initial_effect(c) - --summon success - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(16906241,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_SUMMON_SUCCESS) - e2:SetTarget(c16906241.sptg) - e2:SetOperation(c16906241.spop) - c:RegisterEffect(e2) -end -function c16906241.filter(c,e,tp) - return c:IsSetCard(0x53) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c16906241.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c16906241.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c16906241.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c16906241.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENCE) - end -end diff --git a/script/c16909657.lua b/script/c16909657.lua deleted file mode 100644 index 1004e7acac..0000000000 --- a/script/c16909657.lua +++ /dev/null @@ -1,40 +0,0 @@ ---レプティレス・スキュラ -function c16909657.initial_effect(c) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(16909657,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetCode(EVENT_BATTLE_DESTROYING) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCondition(c16909657.spcon) - e2:SetTarget(c16909657.sptg) - e2:SetOperation(c16909657.spop) - c:RegisterEffect(e2) -end -function c16909657.spcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local bc=c:GetBattleTarget() - return c:IsRelateToBattle() and bc:GetPreviousAttackOnField()==0 -end -function c16909657.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - local tc=e:GetHandler():GetBattleTarget() - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and tc:IsLocation(LOCATION_GRAVE) and tc:IsCanBeSpecialSummoned(e,0,tp,false,false) end - tc:CreateEffectRelation(e) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,tc,1,0,LOCATION_GRAVE) -end -function c16909657.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetHandler():GetBattleTarget() - if tc:IsRelateToEffect(e) and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENCE)~=0 then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e2) - end -end diff --git a/script/c16923472.lua b/script/c16923472.lua deleted file mode 100644 index f5fe0adad1..0000000000 --- a/script/c16923472.lua +++ /dev/null @@ -1,33 +0,0 @@ ---ゼンマイハンター -function c16923472.initial_effect(c) - --handes - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(16923472,0)) - e1:SetCategory(CATEGORY_TOGRAVE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_NO_TURN_RESET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCost(c16923472.cost) - e1:SetTarget(c16923472.target) - e1:SetOperation(c16923472.operation) - c:RegisterEffect(e1) -end -function c16923472.costfilter(c) - return c:IsFaceup() and c:IsSetCard(0x58) and c:GetCode()~=16923472 -end -function c16923472.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,c16923472.costfilter,1,nil) end - local sg=Duel.SelectReleaseGroup(tp,c16923472.costfilter,1,1,nil) - Duel.Release(sg,REASON_COST) -end -function c16923472.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetFieldGroupCount(1-tp,LOCATION_HAND,0)~=0 end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,1-tp,LOCATION_HAND) -end -function c16923472.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetFieldGroup(1-tp,LOCATION_HAND,0) - if g:GetCount()==0 then return end - local sg=g:RandomSelect(1-tp,1) - Duel.SendtoGrave(sg,REASON_EFFECT) -end diff --git a/script/c16940215.lua b/script/c16940215.lua deleted file mode 100644 index 483f2ce63f..0000000000 --- a/script/c16940215.lua +++ /dev/null @@ -1,42 +0,0 @@ ---ナチュル・ナーブ -function c16940215.initial_effect(c) - --Negate - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(16940215,0)) - e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_CHAINING) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c16940215.discon) - e1:SetCost(c16940215.discost) - e1:SetTarget(c16940215.distg) - e1:SetOperation(c16940215.disop) - c:RegisterEffect(e1) -end -function c16940215.discon(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp and re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev) -end -function c16940215.cfilter(c) - return c:IsSetCard(0x2a) and not c:IsStatus(STATUS_BATTLE_DESTROYED) -end -function c16940215.discost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsReleasable() and not c:IsStatus(STATUS_BATTLE_DESTROYED) and Duel.CheckReleaseGroup(tp,c16940215.cfilter,1,c) end - local g=Duel.SelectReleaseGroup(tp,c16940215.cfilter,1,1,c) - g:AddCard(c) - Duel.Release(g,REASON_COST) -end -function c16940215.distg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) - end -end -function c16940215.disop(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateActivation(ev) - if re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(eg,REASON_EFFECT) - end -end diff --git a/script/c16943770.lua b/script/c16943770.lua deleted file mode 100644 index f130874003..0000000000 --- a/script/c16943770.lua +++ /dev/null @@ -1,68 +0,0 @@ ---幻獣機エアロスバード -function c16943770.initial_effect(c) - --level - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_UPDATE_LEVEL) - e1:SetValue(c16943770.lvval) - c:RegisterEffect(e1) - -- - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e2:SetCondition(c16943770.indcon) - e2:SetValue(1) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - c:RegisterEffect(e3) - --token - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(16943770,0)) - e4:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN) - e4:SetType(EFFECT_TYPE_IGNITION) - e4:SetRange(LOCATION_MZONE) - e4:SetCountLimit(1) - e4:SetCost(c16943770.spcost) - e4:SetTarget(c16943770.sptg) - e4:SetOperation(c16943770.spop) - c:RegisterEffect(e4) -end -function c16943770.lvval(e,c) - local tp=c:GetControler() - local lv=0 - for i=0,4 do - local tc=Duel.GetFieldCard(tp,LOCATION_MZONE,i) - if tc and tc:IsCode(31533705) then lv=lv+tc:GetLevel() end - end - return lv -end -function c16943770.indcon(e) - return Duel.IsExistingMatchingCard(Card.IsType,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil,TYPE_TOKEN) -end -function c16943770.cfilter(c) - return c:IsSetCard(0x101b) and not c:IsCode(16943770) and c:IsAbleToRemoveAsCost() -end -function c16943770.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c16943770.cfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c16943770.cfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c16943770.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsPlayerCanSpecialSummonMonster(tp,31533705,0x101b,0x4011,0,0,3,RACE_MACHINE,ATTRIBUTE_WIND) end - Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0) -end -function c16943770.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - if Duel.IsPlayerCanSpecialSummonMonster(tp,31533705,0x101b,0x4011,0,0,3,RACE_MACHINE,ATTRIBUTE_WIND) then - local token=Duel.CreateToken(tp,16943771) - Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c16946849.lua b/script/c16946849.lua deleted file mode 100644 index 33a36983d7..0000000000 --- a/script/c16946849.lua +++ /dev/null @@ -1,24 +0,0 @@ ---人造天使 -function c16946849.initial_effect(c) - --activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --token - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetRange(LOCATION_SZONE) - e2:SetCode(EVENT_CHAIN_SOLVED) - e2:SetCondition(c16946849.tokencon) - e2:SetOperation(c16946849.tokenop) - c:RegisterEffect(e2) -end -function c16946849.tokencon(e,tp,eg,ep,ev,re,r,rp) - return re:IsActiveType(TYPE_COUNTER) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsPlayerCanSpecialSummonMonster(tp,16946850,0,0x4011,300,300,1,RACE_FAIRY,ATTRIBUTE_LIGHT) -end -function c16946849.tokenop(e,tp,eg,ep,ev,re,r,rp) - local token=Duel.CreateToken(tp,16946850) - Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP) -end diff --git a/script/c16947147.lua b/script/c16947147.lua deleted file mode 100644 index 5e00a9297d..0000000000 --- a/script/c16947147.lua +++ /dev/null @@ -1,31 +0,0 @@ ---SRメンコート -function c16947147.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(16947147,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_POSITION) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c16947147.spcon) - e1:SetTarget(c16947147.sptg) - e1:SetOperation(c16947147.spop) - c:RegisterEffect(e1) -end -function c16947147.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetAttacker():GetControler()~=tp and Duel.GetAttackTarget()==nil -end -function c16947147.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsPosition,tp,0,LOCATION_MZONE,1,nil,POS_FACEUP_ATTACK) - and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) end - local g=Duel.GetMatchingGroup(Card.IsPosition,tp,0,LOCATION_MZONE,nil,POS_FACEUP_ATTACK) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) - Duel.SetOperationInfo(0,CATEGORY_POSITION,g,g:GetCount(),0,0) -end -function c16947147.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP_ATTACK)>0 then - local g=Duel.GetMatchingGroup(Card.IsPosition,tp,0,LOCATION_MZONE,nil,POS_FACEUP_ATTACK) - Duel.ChangePosition(g,POS_FACEUP_DEFENCE) - end -end diff --git a/script/c16956455.lua b/script/c16956455.lua deleted file mode 100644 index a5e3082611..0000000000 --- a/script/c16956455.lua +++ /dev/null @@ -1,38 +0,0 @@ ---賢者ケイローン -function c16956455.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(16956455,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c16956455.descost) - e1:SetTarget(c16956455.destg) - e1:SetOperation(c16956455.desop) - c:RegisterEffect(e1) -end -function c16956455.cfilter(c) - return c:IsType(TYPE_SPELL) and c:IsDiscardable() -end -function c16956455.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c16956455.cfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,c16956455.cfilter,1,1,REASON_COST+REASON_DISCARD) -end -function c16956455.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable() -end -function c16956455.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and c16956455.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c16956455.filter,tp,0,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c16956455.filter,tp,0,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c16956455.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c16960351.lua b/script/c16960351.lua deleted file mode 100644 index 30460ee4c8..0000000000 --- a/script/c16960351.lua +++ /dev/null @@ -1,54 +0,0 @@ ---幻界突破 -function c16960351.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(16960351,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_SZONE) - e2:SetCountLimit(1) - e2:SetCost(c16960351.spcost) - e2:SetTarget(c16960351.sptg) - e2:SetOperation(c16960351.spop) - c:RegisterEffect(e2) -end -function c16960351.rfilter(c,e,tp) - local lv=c:GetOriginalLevel() - return lv>0 and c:IsRace(RACE_DRAGON) and c:IsReleasable() - and Duel.IsExistingMatchingCard(c16960351.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp,lv) -end -function c16960351.spfilter(c,e,tp,lv) - return c:GetLevel()==lv and c:IsRace(RACE_WYRM) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c16960351.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,c16960351.rfilter,1,nil,e,tp) end - local g=Duel.SelectReleaseGroup(tp,c16960351.rfilter,1,1,nil,e,tp) - local tc=g:GetFirst() - e:SetLabel(tc:GetOriginalLevel()) - Duel.Release(g,REASON_COST) -end -function c16960351.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c16960351.spop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local lv=e:GetLabel() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c16960351.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,lv) - local tc=g:GetFirst() - if tc then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_BATTLE_DESTROY_REDIRECT) - e1:SetValue(LOCATION_DECKSHF) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - end -end diff --git a/script/c16970158.lua b/script/c16970158.lua deleted file mode 100644 index f08a3f5e85..0000000000 --- a/script/c16970158.lua +++ /dev/null @@ -1,22 +0,0 @@ ---墓場からの呼び声 -function c16970158.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DISABLE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_CHAINING) - e1:SetCondition(c16970158.condition) - e1:SetTarget(c16970158.target) - e1:SetOperation(c16970158.activate) - c:RegisterEffect(e1) -end -function c16970158.condition(e,tp,eg,ep,ev,re,r,rp) - return rp~=tp and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:GetHandler():IsCode(83764718) and Duel.IsChainDisablable(ev) -end -function c16970158.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0) -end -function c16970158.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateEffect(ev) -end diff --git a/script/c1697104.lua b/script/c1697104.lua deleted file mode 100644 index 7cdab24155..0000000000 --- a/script/c1697104.lua +++ /dev/null @@ -1,88 +0,0 @@ ---PSYフレームギア・ε -function c1697104.initial_effect(c) - c:EnableUnsummonable() - --splimit - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(c1697104.splimit) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(1697104,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_NEGATE+CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_QUICK_O) - e2:SetRange(LOCATION_HAND) - e2:SetCode(EVENT_CHAINING) - e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) - e2:SetCondition(c1697104.condition) - e2:SetTarget(c1697104.target) - e2:SetOperation(c1697104.operation) - c:RegisterEffect(e2) -end -function c1697104.splimit(e,se,sp,st) - return se:IsHasType(EFFECT_TYPE_ACTIONS) -end -function c1697104.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 and ep~=tp and re:IsActiveType(TYPE_TRAP) and re:IsHasType(EFFECT_TYPE_ACTIVATE) - and Duel.IsChainNegatable(ev) -end -function c1697104.spfilter(c,e,tp) - return c:IsCode(49036338) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c1697104.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return not e:GetHandler():IsStatus(STATUS_CHAINING) and Duel.GetLocationCount(tp,LOCATION_MZONE)>1 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) - and Duel.IsExistingMatchingCard(c1697104.spfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE) - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) - end -end -function c1697104.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 or not e:GetHandler():IsRelateToEffect(e) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c1697104.spfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp) - if g:FilterCount(aux.nvfilter,nil)==0 then return end - local tc=g:GetFirst() - local c=e:GetHandler() - local fid=c:GetFieldID() - Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) - Duel.SpecialSummonStep(c,0,tp,tp,false,false,POS_FACEUP) - tc:RegisterFlagEffect(1697104,RESET_EVENT+0x1fe0000,0,1,fid) - c:RegisterFlagEffect(1697104,RESET_EVENT+0x1fe0000,0,1,fid) - Duel.SpecialSummonComplete() - g:AddCard(c) - g:KeepAlive() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetCountLimit(1) - e1:SetLabel(fid) - e1:SetLabelObject(g) - e1:SetCondition(c1697104.rmcon) - e1:SetOperation(c1697104.rmop) - Duel.RegisterEffect(e1,tp) - Duel.NegateActivation(ev) - if re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(eg,REASON_EFFECT) - end -end -function c1697104.rmfilter(c,fid) - return c:GetFlagEffectLabel(1697104)==fid -end -function c1697104.rmcon(e,tp,eg,ep,ev,re,r,rp) - local g=e:GetLabelObject() - if not g:IsExists(c1697104.rmfilter,1,nil,e:GetLabel()) then - g:DeleteGroup() - e:Reset() - return false - else return true end -end -function c1697104.rmop(e,tp,eg,ep,ev,re,r,rp) - local g=e:GetLabelObject() - local tg=g:Filter(c1697104.rmfilter,nil,e:GetLabel()) - Duel.Remove(tg,POS_FACEUP,REASON_EFFECT) -end diff --git a/script/c16984449.lua b/script/c16984449.lua deleted file mode 100644 index 51ea52bcdb..0000000000 --- a/script/c16984449.lua +++ /dev/null @@ -1,37 +0,0 @@ ---炎妖蝶ウィルプス -function c16984449.initial_effect(c) - aux.EnableDualAttribute(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetDescription(aux.Stringid(16984449,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(aux.IsDualState) - e1:SetCost(c16984449.cost) - e1:SetTarget(c16984449.target) - e1:SetOperation(c16984449.operation) - c:RegisterEffect(e1) -end -function c16984449.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end -function c16984449.filter(c,e,sp) - return c:IsType(TYPE_DUAL) and c:GetCode()~=16984449 and c:IsCanBeSpecialSummoned(e,0,sp,false,false) -end -function c16984449.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c16984449.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsExistingTarget(c16984449.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c16984449.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c16984449.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)==1 then - tc:EnableDualState() - end -end diff --git a/script/c17016362.lua b/script/c17016362.lua deleted file mode 100644 index 02cb160c4b..0000000000 --- a/script/c17016362.lua +++ /dev/null @@ -1,104 +0,0 @@ ---Emトラピーズ・マジシャン -function c17016362.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsRace,RACE_SPELLCASTER),4,2) - c:EnableReviveLimit() - --avoid damage - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CHANGE_DAMAGE) - e1:SetRange(LOCATION_MZONE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_AVAILABLE_BD) - e1:SetTargetRange(1,0) - e1:SetValue(c17016362.damval) - c:RegisterEffect(e1) - --multi attack - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetRange(LOCATION_MZONE) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCountLimit(1) - e2:SetHintTiming(0,TIMING_MAIN_END) - e2:SetCondition(c17016362.mtcon) - e2:SetCost(c17016362.mtcost) - e2:SetTarget(c17016362.mttg) - e2:SetOperation(c17016362.mtop) - c:RegisterEffect(e2) - --spsummon - local e3=Effect.CreateEffect(c) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_TO_GRAVE) - e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e3:SetCondition(c17016362.spcon) - e3:SetTarget(c17016362.sptg) - e3:SetOperation(c17016362.spop) - c:RegisterEffect(e3) -end -function c17016362.damval(e,re,val,r,rp,rc) - local atk=e:GetHandler():GetAttack() - if val<=atk then return 0 else return val end -end -function c17016362.mtcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()==PHASE_MAIN1 and Duel.IsAbleToEnterBP() -end -function c17016362.mtcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c17016362.mtfilter(c) - return c:IsPosition(POS_FACEUP_ATTACK) and c:IsDestructable() and not c:IsHasEffect(EFFECT_EXTRA_ATTACK) -end -function c17016362.mttg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local turnp=Duel.GetTurnPlayer() - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(turnp) and c17016362.mtfilter(chkc) and chkc~=e:GetHandler() end - if chk==0 then return Duel.IsExistingTarget(c17016362.mtfilter,turnp,LOCATION_MZONE,0,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - Duel.SelectTarget(tp,c17016362.mtfilter,turnp,LOCATION_MZONE,0,1,1,e:GetHandler()) -end -function c17016362.mtop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_EXTRA_ATTACK) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetValue(1) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_PHASE+PHASE_BATTLE) - e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetOperation(c17016362.desop) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - tc:RegisterEffect(e2) - end -end -function c17016362.desop(e,tp,eg,ep,ev,re,r,rp) - Duel.Destroy(e:GetHandler(),REASON_EFFECT) -end -function c17016362.spcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsReason(REASON_BATTLE) - or (rp~=tp and c:IsReason(REASON_DESTROY) and c:GetPreviousControler()==tp) -end -function c17016362.spfilter(c,e,tp) - return c:IsSetCard(0xc6) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c17016362.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c17016362.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c17016362.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c17016362.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c17021204.lua b/script/c17021204.lua deleted file mode 100644 index 4d583ba347..0000000000 --- a/script/c17021204.lua +++ /dev/null @@ -1,33 +0,0 @@ ---マザー・スパイダー -function c17021204.initial_effect(c) - --spsummon proc - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c17021204.spcon) - e1:SetOperation(c17021204.spop) - c:RegisterEffect(e1) -end -function c17021204.spfilter(c) - return c:IsPosition(POS_FACEUP_DEFENCE) and c:IsAbleToGraveAsCost() -end -function c17021204.cfilter(c) - return c:GetRace()~=RACE_INSECT -end -function c17021204.check(tp) - local g=Duel.GetMatchingGroup(Card.IsType,tp,LOCATION_GRAVE,0,nil,TYPE_MONSTER) - return g:GetCount()~=0 and not g:IsExists(c17021204.cfilter,1,nil) -end -function c17021204.spcon(e,c) - if c==nil then return true end - return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c17021204.spfilter,c:GetControler(),0,LOCATION_MZONE,2,nil) - and c17021204.check(c:GetControler()) -end -function c17021204.spop(e,tp,eg,ep,ev,re,r,rp,c) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c17021204.spfilter,tp,0,LOCATION_MZONE,2,2,nil) - Duel.SendtoGrave(g,REASON_COST) -end diff --git a/script/c17032740.lua b/script/c17032740.lua deleted file mode 100644 index 6282adbf71..0000000000 --- a/script/c17032740.lua +++ /dev/null @@ -1,150 +0,0 @@ ---E・HERO カオス・ネオス -function c17032740.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcCode3(c,89943723,43237273,17732278,false,false) - --spsummon condition - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(c17032740.splimit) - c:RegisterEffect(e1) - --special summon rule - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_SPSUMMON_PROC) - e2:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e2:SetRange(LOCATION_EXTRA) - e2:SetCondition(c17032740.spcon) - e2:SetOperation(c17032740.spop) - c:RegisterEffect(e2) - --return - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(17032740,0)) - e3:SetCategory(CATEGORY_TODECK) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e3:SetCode(EVENT_PHASE+PHASE_END) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1) - e3:SetCondition(c17032740.retcon1) - e3:SetTarget(c17032740.rettg) - e3:SetOperation(c17032740.retop) - c:RegisterEffect(e3) - local e4=e3:Clone() - e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e4:SetProperty(0) - e4:SetCondition(c17032740.retcon2) - c:RegisterEffect(e4) - --coin - local e5=Effect.CreateEffect(c) - e5:SetDescription(aux.Stringid(17032740,1)) - e5:SetCategory(CATEGORY_COIN+CATEGORY_DESTROY+CATEGORY_TOHAND) - e5:SetType(EFFECT_TYPE_IGNITION) - e5:SetRange(LOCATION_MZONE) - e5:SetCountLimit(1) - e5:SetCondition(c17032740.coincon) - e5:SetTarget(c17032740.cointg) - e5:SetOperation(c17032740.coinop) - c:RegisterEffect(e5) -end -function c17032740.splimit(e,se,sp,st) - return not e:GetHandler():IsLocation(LOCATION_EXTRA) -end -function c17032740.spfilter(c,code) - return c:IsAbleToDeckOrExtraAsCost() and c:GetCode()==code -end -function c17032740.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ft<-2 then return false end - local g1=Duel.GetMatchingGroup(c17032740.spfilter,tp,LOCATION_ONFIELD,0,nil,89943723) - local g2=Duel.GetMatchingGroup(c17032740.spfilter,tp,LOCATION_ONFIELD,0,nil,43237273) - local g3=Duel.GetMatchingGroup(c17032740.spfilter,tp,LOCATION_ONFIELD,0,nil,17732278) - if g1:GetCount()==0 or g2:GetCount()==0 or g3:GetCount()==0 then return false end - if ft>0 then return true end - local f1=g1:FilterCount(Card.IsLocation,nil,LOCATION_MZONE)>0 and 1 or 0 - local f2=g2:FilterCount(Card.IsLocation,nil,LOCATION_MZONE)>0 and 1 or 0 - local f3=g3:FilterCount(Card.IsLocation,nil,LOCATION_MZONE)>0 and 1 or 0 - if ft==-2 then return f1+f2+f3==3 - elseif ft==-1 then return f1+f2+f3>=2 - else return f1+f2+f3>=1 end -end -function c17032740.spop(e,tp,eg,ep,ev,re,r,rp,c) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - local g1=Duel.GetMatchingGroup(c17032740.spfilter,tp,LOCATION_ONFIELD,0,nil,89943723) - local g2=Duel.GetMatchingGroup(c17032740.spfilter,tp,LOCATION_ONFIELD,0,nil,43237273) - local g3=Duel.GetMatchingGroup(c17032740.spfilter,tp,LOCATION_ONFIELD,0,nil,17732278) - g1:Merge(g2) - g1:Merge(g3) - local g=Group.CreateGroup() - local tc=nil - for i=1,3 do - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - if ft<=0 then - tc=g1:FilterSelect(tp,Card.IsLocation,1,1,nil,LOCATION_MZONE):GetFirst() - else - tc=g1:Select(tp,1,1,nil):GetFirst() - end - g:AddCard(tc) - g1:Remove(Card.IsCode,nil,tc:GetCode()) - ft=ft+1 - end - local cg=g:Filter(Card.IsFacedown,nil) - if cg:GetCount()>0 then - Duel.ConfirmCards(1-tp,cg) - end - Duel.SendtoDeck(g,nil,2,REASON_COST) -end -function c17032740.retcon1(e,tp,eg,ep,ev,re,r,rp,chk) - return not e:GetHandler():IsHasEffect(42015635) -end -function c17032740.retcon2(e,tp,eg,ep,ev,re,r,rp,chk) - return e:GetHandler():IsHasEffect(42015635) -end -function c17032740.rettg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToExtra() end - Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0) -end -function c17032740.retop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) or c:IsFacedown() then return end - Duel.SendtoDeck(c,nil,2,REASON_EFFECT) - local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - Duel.ChangePosition(g,POS_FACEDOWN_DEFENCE) -end -function c17032740.coincon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()==PHASE_MAIN1 -end -function c17032740.cointg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_COIN,nil,0,tp,3) -end -function c17032740.coinop(e,tp,eg,ep,ev,re,r,rp) - local c1,c2,c3=Duel.TossCoin(tp,3) - if c1+c2+c3==3 then - local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,0,LOCATION_MZONE,nil) - Duel.Destroy(g,REASON_EFFECT) - elseif c1+c2+c3==2 then - local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil) - local c=e:GetHandler() - local tc=g:GetFirst() - while tc do - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e2) - tc=g:GetNext() - end - elseif c1+c2+c3==1 then - local g=Duel.GetMatchingGroup(Card.IsAbleToHand,tp,LOCATION_MZONE,0,nil) - Duel.SendtoHand(g,nil,REASON_EFFECT) - end -end diff --git a/script/c17045014.lua b/script/c17045014.lua deleted file mode 100644 index 12d3c796b6..0000000000 --- a/script/c17045014.lua +++ /dev/null @@ -1,34 +0,0 @@ ---エヴォルダー・ディプロドクス -function c17045014.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(17045014,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(c17045014.descon) - e1:SetTarget(c17045014.destg) - e1:SetOperation(c17045014.desop) - c:RegisterEffect(e1) -end -function c17045014.descon(e,tp,eg,ep,ev,re,r,rp) - local st=e:GetHandler():GetSummonType() - return st>=(SUMMON_TYPE_SPECIAL+150) and st<(SUMMON_TYPE_SPECIAL+180) -end -function c17045014.desfilter(c) - return c:IsDestructable() and c:IsType(TYPE_SPELL+TYPE_TRAP) -end -function c17045014.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and c17045014.desfilter(chkc) end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c17045014.desfilter,tp,0,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c17045014.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c17052477.lua b/script/c17052477.lua deleted file mode 100644 index 5f943c2bba..0000000000 --- a/script/c17052477.lua +++ /dev/null @@ -1,36 +0,0 @@ ---守護神の宝札 -function c17052477.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c17052477.cost) - e1:SetTarget(c17052477.target) - e1:SetOperation(c17052477.operation) - c:RegisterEffect(e1) - --Effect Draw - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_DRAW_COUNT) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(1,0) - e2:SetValue(2) - c:RegisterEffect(e2) -end -function c17052477.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,5,e:GetHandler()) end - Duel.DiscardHand(tp,Card.IsDiscardable,5,5,REASON_COST+REASON_DISCARD) -end -function c17052477.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp,2) end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(2) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2) -end -function c17052477.operation(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end diff --git a/script/c17078030.lua b/script/c17078030.lua deleted file mode 100644 index 313013cca3..0000000000 --- a/script/c17078030.lua +++ /dev/null @@ -1,37 +0,0 @@ ---光の護封壁 -function c17078030.initial_effect(c) - --activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c17078030.cost) - c:RegisterEffect(e1) - --cannot attack - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_CANNOT_ATTACK) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(0,LOCATION_MZONE) - e2:SetTarget(c17078030.atktarget) - c:RegisterEffect(e2) - e1:SetLabelObject(e2) -end -function c17078030.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,1000) end - local lp=Duel.GetLP(tp) - local t={} - local f=math.floor((lp)/1000) - local l=1 - while l<=f and l<=20 do - t[l]=l*1000 - l=l+1 - end - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(17078030,0)) - local announce=Duel.AnnounceNumber(tp,table.unpack(t)) - Duel.PayLPCost(tp,announce) - e:GetLabelObject():SetLabel(announce) - e:GetHandler():SetHint(CHINT_NUMBER,announce) -end -function c17078030.atktarget(e,c) - return c:GetAttack()<=e:GetLabel() -end diff --git a/script/c17086528.lua b/script/c17086528.lua deleted file mode 100644 index 459ad13d65..0000000000 --- a/script/c17086528.lua +++ /dev/null @@ -1,105 +0,0 @@ ---相生の魔術師 -function c17086528.initial_effect(c) - --pendulum summon - aux.AddPendulumProcedure(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --rank - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_PZONE) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCountLimit(1) - e2:SetTarget(c17086528.rktg) - e2:SetOperation(c17086528.rkop) - c:RegisterEffect(e2) - --scale - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_CHANGE_LSCALE) - e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e3:SetRange(LOCATION_PZONE) - e3:SetCondition(c17086528.slcon) - e3:SetValue(4) - c:RegisterEffect(e3) - local e4=e3:Clone() - e4:SetCode(EFFECT_CHANGE_RSCALE) - c:RegisterEffect(e4) - --damage 0 - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_SINGLE) - e5:SetCode(EFFECT_NO_BATTLE_DAMAGE) - c:RegisterEffect(e5) - --atk - local e6=Effect.CreateEffect(c) - e6:SetCategory(CATEGORY_ATKCHANGE) - e6:SetType(EFFECT_TYPE_IGNITION) - e6:SetRange(LOCATION_MZONE) - e6:SetProperty(EFFECT_FLAG_CARD_TARGET) - e6:SetCountLimit(1) - e6:SetTarget(c17086528.atktg) - e6:SetOperation(c17086528.atkop) - c:RegisterEffect(e6) -end -function c17086528.rkfilter(c,tp) - return c:IsFaceup() and c:IsType(TYPE_XYZ) - and Duel.IsExistingTarget(c17086528.lvfilter,tp,LOCATION_MZONE,0,1,c,c:GetRank()) -end -function c17086528.lvfilter(c,rk) - return c:IsFaceup() and c:IsLevelAbove(5) and c:GetLevel()~=rk -end -function c17086528.rktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - if chk==0 then return Duel.IsExistingTarget(c17086528.rkfilter,tp,LOCATION_MZONE,0,1,nil,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - local g=Duel.SelectTarget(tp,c17086528.rkfilter,tp,LOCATION_MZONE,0,1,1,nil,tp) - e:SetLabelObject(g:GetFirst()) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - Duel.SelectTarget(tp,c17086528.lvfilter,tp,LOCATION_MZONE,0,1,1,g:GetFirst(),g:GetFirst():GetRank()) -end -function c17086528.rkop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local tc=e:GetLabelObject() - local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local lc=tg:GetFirst() - if lc==tc then lc=tg:GetNext() end - if tc:IsRelateToEffect(e) and tc:IsFaceup() and lc:IsRelateToEffect(e) and lc:IsFaceup() and lc:IsLevelAbove(5) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CHANGE_RANK) - e1:SetValue(lc:GetLevel()) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - tc:RegisterEffect(e1) - end -end -function c17086528.slcon(e) - local tp=e:GetHandlerPlayer() - return Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,0)>Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD) -end -function c17086528.atkfilter(c,atk) - return c:IsFaceup() and c:GetAttack()~=atk -end -function c17086528.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local c=e:GetHandler() - local atk=c:GetAttack() - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc~=c and c17086528.atkfilter(chkc,atk) end - if chk==0 then return Duel.IsExistingTarget(c17086528.atkfilter,tp,LOCATION_MZONE,0,1,c,atk) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - Duel.SelectTarget(tp,c17086528.atkfilter,tp,LOCATION_MZONE,0,1,1,c,atk) -end -function c17086528.atkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - local atk=tc:GetAttack() - if tc:IsRelateToEffect(e) and tc:IsFaceup() and c:IsRelateToEffect(e) and c:IsFaceup() then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetValue(atk) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - c:RegisterEffect(e1) - end -end diff --git a/script/c17092736.lua b/script/c17092736.lua deleted file mode 100644 index 71cbf0287a..0000000000 --- a/script/c17092736.lua +++ /dev/null @@ -1,22 +0,0 @@ ---古代の遠眼鏡 -function c17092736.initial_effect(c) - --confirm - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c17092736.cftg) - e1:SetOperation(c17092736.cfop) - c:RegisterEffect(e1) -end -function c17092736.cftg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)>=5 end - Duel.SetTargetPlayer(tp) -end -function c17092736.cfop(e,tp,eg,ep,ev,re,r,rp) - local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) - local g=Duel.GetDecktopGroup(1-p,5) - if g:GetCount()>0 then - Duel.ConfirmCards(p,g) - end -end diff --git a/script/c1710476.lua b/script/c1710476.lua deleted file mode 100644 index b43f7bf0e2..0000000000 --- a/script/c1710476.lua +++ /dev/null @@ -1,99 +0,0 @@ ---Sin サイバー・エンド・ドラゴン -function c1710476.initial_effect(c) - c:EnableReviveLimit() - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c1710476.spcon) - e1:SetOperation(c1710476.spop) - c:RegisterEffect(e1) - --only 1 can exists - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_CANNOT_FLIP_SUMMON) - e2:SetCondition(c1710476.excon) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - c:RegisterEffect(e3) - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_FIELD) - e4:SetRange(LOCATION_MZONE) - e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e4:SetTargetRange(1,1) - e4:SetCode(EFFECT_CANNOT_SUMMON) - e4:SetTarget(c1710476.sumlimit) - c:RegisterEffect(e4) - local e5=e4:Clone() - e5:SetCode(EFFECT_CANNOT_FLIP_SUMMON) - c:RegisterEffect(e5) - local e6=e4:Clone() - e6:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - c:RegisterEffect(e6) - --selfdes - local e7=Effect.CreateEffect(c) - e7:SetType(EFFECT_TYPE_SINGLE) - e7:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e7:SetRange(LOCATION_MZONE) - e7:SetCode(EFFECT_SELF_DESTROY) - e7:SetCondition(c1710476.descon) - c:RegisterEffect(e7) - local e8=Effect.CreateEffect(c) - e8:SetType(EFFECT_TYPE_FIELD) - e8:SetCode(EFFECT_SELF_DESTROY) - e8:SetRange(LOCATION_MZONE) - e8:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e8:SetTarget(c1710476.destarget) - c:RegisterEffect(e8) - --cannot announce - local e8=Effect.CreateEffect(c) - e8:SetType(EFFECT_TYPE_FIELD) - e8:SetRange(LOCATION_MZONE) - e8:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE) - e8:SetTargetRange(LOCATION_MZONE,0) - e8:SetTarget(c1710476.antarget) - c:RegisterEffect(e8) - --spson - local e9=Effect.CreateEffect(c) - e9:SetType(EFFECT_TYPE_SINGLE) - e9:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e9:SetCode(EFFECT_SPSUMMON_CONDITION) - e9:SetValue(aux.FALSE) - c:RegisterEffect(e9) -end -function c1710476.sumlimit(e,c) - return c:IsSetCard(0x23) -end -function c1710476.exfilter(c) - return c:IsFaceup() and c:IsSetCard(0x23) -end -function c1710476.excon(e) - return Duel.IsExistingMatchingCard(c1710476.exfilter,0,LOCATION_MZONE,LOCATION_MZONE,1,nil) -end -function c1710476.spfilter(c) - return c:IsCode(1546123) and c:IsAbleToRemoveAsCost() -end -function c1710476.spcon(e,c) - if c==nil then return true end - return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c1710476.spfilter,c:GetControler(),LOCATION_EXTRA,0,1,nil) - and not Duel.IsExistingMatchingCard(c1710476.exfilter,0,LOCATION_MZONE,LOCATION_MZONE,1,nil) -end -function c1710476.spop(e,tp,eg,ep,ev,re,r,rp,c) - local tc=Duel.GetFirstMatchingCard(c1710476.spfilter,tp,LOCATION_EXTRA,0,nil) - Duel.Remove(tc,POS_FACEUP,REASON_COST) -end -function c1710476.descon(e) - local f1=Duel.GetFieldCard(0,LOCATION_SZONE,5) - local f2=Duel.GetFieldCard(1,LOCATION_SZONE,5) - return (f1==nil or f1:IsFacedown()) and (f2==nil or f2:IsFacedown()) -end -function c1710476.destarget(e,c) - return c:IsSetCard(0x23) and c:GetFieldID()>e:GetHandler():GetFieldID() -end -function c1710476.antarget(e,c) - return c~=e:GetHandler() -end diff --git a/script/c17129783.lua b/script/c17129783.lua deleted file mode 100644 index 6ad759c446..0000000000 --- a/script/c17129783.lua +++ /dev/null @@ -1,11 +0,0 @@ ---セイクリッド・レオニス -function c17129783.initial_effect(c) - --extra summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetTargetRange(LOCATION_HAND+LOCATION_MZONE,0) - e1:SetCode(EFFECT_EXTRA_SUMMON_COUNT) - e1:SetRange(LOCATION_MZONE) - e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x53)) - c:RegisterEffect(e1) -end diff --git a/script/c17132130.lua b/script/c17132130.lua deleted file mode 100644 index 33d91febbe..0000000000 --- a/script/c17132130.lua +++ /dev/null @@ -1,68 +0,0 @@ ---D-HERO ドグマガイ -function c17132130.initial_effect(c) - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(aux.FALSE) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(17132130,0)) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_SPSUMMON_PROC) - e2:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e2:SetRange(LOCATION_HAND) - e2:SetValue(1) - e2:SetCondition(c17132130.spcon) - e2:SetOperation(c17132130.spop) - c:RegisterEffect(e2) - --special summon success - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - e3:SetCondition(c17132130.lp) - e3:SetOperation(c17132130.lpop) - c:RegisterEffect(e3) - c:EnableReviveLimit() -end -function c17132130.spcon(e,c) - if c==nil then return true end - local g=Duel.GetReleaseGroup(c:GetControler()) - local d=g:FilterCount(Card.IsSetCard,nil,0xc008) - local ct=g:GetCount() - return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-3 and d>0 and ct>2 -end -function c17132130.spop(e,tp,eg,ep,ev,re,r,rp,c) - local g=Duel.GetReleaseGroup(c:GetControler()) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) - local sg1=g:FilterSelect(tp,Card.IsSetCard,1,1,nil,0xc008) - g:RemoveCard(sg1:GetFirst()) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) - local sg2=g:Select(tp,2,2,nil) - sg2:Merge(sg1) - Duel.Release(sg2,REASON_COST) -end -function c17132130.lp(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+1 -end -function c17132130.lpop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(17132130,1)) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetReset(RESET_EVENT+0x2fe0000+RESET_PHASE+PHASE_STANDBY) - e1:SetCondition(c17132130.lpc) - e1:SetOperation(c17132130.lpcop) - c:RegisterEffect(e1) -end -function c17132130.lpc(e,tp,eg,ep,ev,re,r,rp) - return tp~=Duel.GetTurnPlayer() -end -function c17132130.lpcop(e,tp,eg,ep,ev,re,r,rp) - Duel.SetLP(1-tp,Duel.GetLP(1-tp)/2) -end diff --git a/script/c17178486.lua b/script/c17178486.lua deleted file mode 100644 index 4fefe167ef..0000000000 --- a/script/c17178486.lua +++ /dev/null @@ -1,17 +0,0 @@ ---ライフチェンジャー -function c17178486.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c17178486.condition) - e1:SetOperation(c17178486.activate) - c:RegisterEffect(e1) -end -function c17178486.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetLP(tp)-Duel.GetLP(1-tp)>=8000 or Duel.GetLP(1-tp)-Duel.GetLP(tp)>=8000 -end -function c17178486.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.SetLP(tp,3000) - Duel.SetLP(1-tp,3000) -end diff --git a/script/c17183908.lua b/script/c17183908.lua deleted file mode 100644 index bc43ee80ea..0000000000 --- a/script/c17183908.lua +++ /dev/null @@ -1,37 +0,0 @@ ---竜星の輝跡 -function c17183908.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCountLimit(1,17183908+EFFECT_COUNT_CODE_OATH) - e1:SetTarget(c17183908.target) - e1:SetOperation(c17183908.operation) - c:RegisterEffect(e1) -end -function c17183908.filter(c) - return c:IsSetCard(0x9e) and c:IsType(TYPE_MONSTER) and c:IsAbleToDeck() -end -function c17183908.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c17183908.filter(chkc) end - if chk==0 then return Duel.IsPlayerCanDraw(tp,2) - and Duel.IsExistingTarget(c17183908.filter,tp,LOCATION_GRAVE,0,3,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectTarget(tp,c17183908.filter,tp,LOCATION_GRAVE,0,3,3,nil) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,3,0,0) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2) -end -function c17183908.operation(e,tp,eg,ep,ev,re,r,rp) - local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - if not tg or tg:FilterCount(Card.IsRelateToEffect,nil,e)~=3 then return end - Duel.SendtoDeck(tg,nil,0,REASON_EFFECT) - local g=Duel.GetOperatedGroup() - local ct=g:FilterCount(Card.IsLocation,nil,LOCATION_DECK+LOCATION_EXTRA) - if ct==3 then - Duel.ShuffleDeck(tp) - Duel.BreakEffect() - Duel.Draw(tp,2,REASON_EFFECT) - end -end diff --git a/script/c17185260.lua b/script/c17185260.lua deleted file mode 100644 index 09674000c1..0000000000 --- a/script/c17185260.lua +++ /dev/null @@ -1,30 +0,0 @@ ---インフェルノ・ハンマー -function c17185260.initial_effect(c) - --pos - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(17185260,0)) - e1:SetCategory(CATEGORY_POSITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_BATTLE_DESTROYING) - e1:SetCondition(aux.bdogcon) - e1:SetTarget(c17185260.postg) - e1:SetOperation(c17185260.posop) - c:RegisterEffect(e1) -end -function c17185260.filter(c) - return c:IsFaceup() and c:IsCanTurnSet() -end -function c17185260.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c17185260.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c17185260.filter,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - local g=Duel.SelectTarget(tp,c17185260.filter,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_POSITION,g,g:GetCount(),0,0) -end -function c17185260.posop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.ChangePosition(tc,POS_FACEDOWN_DEFENCE) - end -end diff --git a/script/c17189532.lua b/script/c17189532.lua deleted file mode 100644 index 337cc7763d..0000000000 --- a/script/c17189532.lua +++ /dev/null @@ -1,32 +0,0 @@ ---ファントム・バウンサー -function c17189532.initial_effect(c) - --search - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(17189532,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCondition(c17189532.condition) - e1:SetTarget(c17189532.target) - e1:SetOperation(c17189532.operation) - c:RegisterEffect(e1) -end -function c17189532.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) and e:GetHandler():IsReason(REASON_DESTROY) -end -function c17189532.filter(c) - return c:IsSetCard(0x6b) and c:IsAbleToHand() -end -function c17189532.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c17189532.filter,tp,LOCATION_DECK,0,2,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,2,tp,LOCATION_DECK) -end -function c17189532.operation(e,tp,eg,ep,ev,re,r,rp) - local sg=Duel.GetMatchingGroup(c17189532.filter,tp,LOCATION_DECK,0,nil) - if sg:GetCount()<2 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=sg:Select(tp,2,2,nil) - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) -end diff --git a/script/c17189677.lua b/script/c17189677.lua deleted file mode 100644 index 26cd297dd0..0000000000 --- a/script/c17189677.lua +++ /dev/null @@ -1,31 +0,0 @@ ---スネーク・レイン -function c17189677.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOGRAVE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c17189677.cost) - e1:SetTarget(c17189677.target) - e1:SetOperation(c17189677.activate) - c:RegisterEffect(e1) -end -function c17189677.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) -end -function c17189677.tgfilter(c) - return c:IsRace(RACE_REPTILE) and c:IsType(TYPE_MONSTER) and c:IsAbleToGrave() -end -function c17189677.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c17189677.tgfilter,tp,LOCATION_DECK,0,4,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,4,tp,LOCATION_DECK) -end -function c17189677.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c17189677.tgfilter,tp,LOCATION_DECK,0,nil) - if g:GetCount()>=4 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local sg=g:Select(tp,4,4,nil) - Duel.SendtoGrave(sg,REASON_EFFECT) - end -end diff --git a/script/c17194258.lua b/script/c17194258.lua deleted file mode 100644 index a2cbe00191..0000000000 --- a/script/c17194258.lua +++ /dev/null @@ -1,63 +0,0 @@ ---融合徴兵 -function c17194258.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,17194258+EFFECT_COUNT_CODE_OATH) - e1:SetTarget(c17194258.target) - e1:SetOperation(c17194258.activate) - c:RegisterEffect(e1) -end -function c17194258.filter1(c,tp) - return c.material_count and Duel.IsExistingMatchingCard(c17194258.filter2,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,c) -end -function c17194258.filter2(c,fc) - if c:IsForbidden() or not c:IsAbleToHand() or c:IsHasEffect(EFFECT_NECRO_VALLEY) then return false end - for i=1,fc.material_count do - if c:IsCode(fc.material[i]) then return true end - end - return false -end -function c17194258.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c17194258.filter1,tp,LOCATION_EXTRA,0,1,nil,tp) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE) -end -function c17194258.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) - local cg=Duel.SelectMatchingCard(tp,c17194258.filter1,tp,LOCATION_EXTRA,0,1,1,nil,tp) - if cg:GetCount()==0 then return end - Duel.ConfirmCards(1-tp,cg) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c17194258.filter2,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,cg:GetFirst()) - local tc=g:GetFirst() - if tc and Duel.SendtoHand(tc,nil,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_HAND) then - Duel.ConfirmCards(1-tp,tc) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_SUMMON) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetTargetRange(1,0) - e1:SetTarget(c17194258.sumlimit) - e1:SetLabel(tc:GetCode()) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) - local e2=e1:Clone() - e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - Duel.RegisterEffect(e2,tp) - local e3=e1:Clone() - e3:SetCode(EFFECT_CANNOT_MSET) - Duel.RegisterEffect(e3,tp) - local e4=e1:Clone() - e4:SetCode(EFFECT_CANNOT_ACTIVATE) - e4:SetValue(c17194258.aclimit) - Duel.RegisterEffect(e4,tp) - end -end -function c17194258.sumlimit(e,c) - return c:IsCode(e:GetLabel()) -end -function c17194258.aclimit(e,re,tp) - return re:GetHandler():IsCode(e:GetLabel()) and re:IsActiveType(TYPE_MONSTER) and not re:GetHandler():IsImmuneToEffect(e) -end diff --git a/script/c17201174.lua b/script/c17201174.lua deleted file mode 100644 index cf7a30dacb..0000000000 --- a/script/c17201174.lua +++ /dev/null @@ -1,37 +0,0 @@ ---ハンマー・シャーク -function c17201174.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(17201174,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetTarget(c17201174.sptg) - e1:SetOperation(c17201174.spop) - c:RegisterEffect(e1) -end -function c17201174.filter(c,e,tp) - return c:IsLevelBelow(3) and c:IsAttribute(ATTRIBUTE_WATER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c17201174.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsLevelAbove(2) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c17201174.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c17201174.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFacedown() or not c:IsRelateToEffect(e) then return end - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_LEVEL) - e1:SetValue(-1) - e1:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e1) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c17201174.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c17214465.lua b/script/c17214465.lua deleted file mode 100644 index c36acb4e25..0000000000 --- a/script/c17214465.lua +++ /dev/null @@ -1,10 +0,0 @@ ---海神の巫女 -function c17214465.initial_effect(c) - --field - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_CHANGE_ENVIRONMENT) - e1:SetValue(22702055) - c:RegisterEffect(e1) -end diff --git a/script/c17236839.lua b/script/c17236839.lua deleted file mode 100644 index 9fbce7076a..0000000000 --- a/script/c17236839.lua +++ /dev/null @@ -1,82 +0,0 @@ ---瞬間融合 -function c17236839.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,0x1e0) - e1:SetTarget(c17236839.target) - e1:SetOperation(c17236839.activate) - c:RegisterEffect(e1) -end -function c17236839.filter1(c,e) - return c:IsCanBeFusionMaterial() and not c:IsImmuneToEffect(e) -end -function c17236839.filter2(c,e,tp,m,f,chkf) - return c:IsType(TYPE_FUSION) and (not f or f(c)) - and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf) -end -function c17236839.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp - local mg1=Duel.GetMatchingGroup(Card.IsCanBeFusionMaterial,tp,LOCATION_MZONE,0,nil) - local res=Duel.IsExistingMatchingCard(c17236839.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf) - if not res then - local ce=Duel.GetChainMaterial(tp) - if ce~=nil then - local fgroup=ce:GetTarget() - local mg2=fgroup(ce,e,tp) - local mf=ce:GetValue() - res=Duel.IsExistingMatchingCard(c17236839.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,chkf) - end - end - return res - end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function c17236839.activate(e,tp,eg,ep,ev,re,r,rp) - local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp - local mg1=Duel.GetMatchingGroup(c17236839.filter1,tp,LOCATION_MZONE,0,nil,e) - local sg1=Duel.GetMatchingGroup(c17236839.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf) - local mg2=nil - local sg2=nil - local ce=Duel.GetChainMaterial(tp) - if ce~=nil then - local fgroup=ce:GetTarget() - mg2=fgroup(ce,e,tp) - local mf=ce:GetValue() - sg2=Duel.GetMatchingGroup(c17236839.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,mf,chkf) - end - if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then - local sg=sg1:Clone() - if sg2 then sg:Merge(sg2) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local tg=sg:Select(tp,1,1,nil) - local tc=tg:GetFirst() - if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then - local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf) - tc:SetMaterial(mat1) - Duel.SendtoGrave(mat1,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION) - Duel.BreakEffect() - Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP) - else - local mat2=Duel.SelectFusionMaterial(tp,tc,mg2,nil,chkf) - local fop=ce:GetOperation() - fop(ce,e,tp,tc,mat2) - end - tc:CompleteProcedure() - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_MZONE) - e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetOperation(c17236839.desop) - tc:RegisterEffect(e1,true) - end -end -function c17236839.desop(e,tp,eg,ep,ev,re,r,rp) - Duel.Destroy(e:GetHandler(),REASON_EFFECT) -end diff --git a/script/c17241370.lua b/script/c17241370.lua deleted file mode 100644 index ec761eaaa3..0000000000 --- a/script/c17241370.lua +++ /dev/null @@ -1,85 +0,0 @@ ---リチュア・ナタリア -function c17241370.initial_effect(c) - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(aux.FALSE) - c:RegisterEffect(e1) - --summon,flip - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetCode(EVENT_SUMMON_SUCCESS) - e2:SetOperation(c17241370.retreg) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EVENT_FLIP) - c:RegisterEffect(e3) - --to deck - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(17241370,1)) - e4:SetCategory(CATEGORY_TODECK) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e4:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e4:SetCode(EVENT_SUMMON_SUCCESS) - e4:SetTarget(c17241370.tdtg) - e4:SetOperation(c17241370.tdop) - c:RegisterEffect(e4) - local e5=e4:Clone() - e5:SetCode(EVENT_FLIP) - c:RegisterEffect(e5) -end -function c17241370.filter(c) - return c:IsSetCard(0x3a) and c:IsType(TYPE_MONSTER) and c:IsAbleToDeck() -end -function c17241370.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c17241370.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c17241370.filter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectTarget(tp,c17241370.filter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0) -end -function c17241370.tdop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoDeck(tc,nil,0,REASON_EFFECT) - end -end -function c17241370.retreg(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - --to hand - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetDescription(aux.Stringid(17241370,0)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetReset(RESET_EVENT+0x1ee0000+RESET_PHASE+PHASE_END) - e1:SetCondition(c17241370.retcon) - e1:SetTarget(c17241370.rettg) - e1:SetOperation(c17241370.retop) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - c:RegisterEffect(e2) -end -function c17241370.retcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsHasEffect(EFFECT_SPIRIT_DONOT_RETURN) then return false end - if e:IsHasType(EFFECT_TYPE_TRIGGER_F) then - return not c:IsHasEffect(EFFECT_SPIRIT_MAYNOT_RETURN) - else return c:IsHasEffect(EFFECT_SPIRIT_MAYNOT_RETURN) end -end -function c17241370.rettg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0) -end -function c17241370.retop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - Duel.SendtoHand(c,nil,REASON_EFFECT) - end -end diff --git a/script/c17243896.lua b/script/c17243896.lua deleted file mode 100644 index c61aef8e65..0000000000 --- a/script/c17243896.lua +++ /dev/null @@ -1,33 +0,0 @@ ---グランド・スパイダー -function c17243896.initial_effect(c) - --pos - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(17243896,0)) - e1:SetCategory(CATEGORY_POSITION) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE) - e1:SetCondition(c17243896.condition) - e1:SetTarget(c17243896.target) - e1:SetOperation(c17243896.operation) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e2) -end -function c17243896.filter(c,e,tp) - return c:IsPosition(POS_FACEUP_ATTACK) and c:GetSummonPlayer()==1-tp and (not e or c:IsRelateToEffect(e)) -end -function c17243896.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPosition(POS_FACEUP_DEFENCE) -end -function c17243896.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return eg:IsExists(c17243896.filter,1,nil,nil,tp) end - Duel.SetTargetCard(eg) - Duel.SetOperationInfo(0,CATEGORY_POSITION,eg,eg:GetCount(),0,0) -end -function c17243896.operation(e,tp,eg,ep,ev,re,r,rp) - local g=eg:Filter(c17243896.filter,nil,e,tp) - Duel.ChangePosition(g,POS_FACEUP_DEFENCE) -end diff --git a/script/c17259470.lua b/script/c17259470.lua deleted file mode 100644 index 4dabf61555..0000000000 --- a/script/c17259470.lua +++ /dev/null @@ -1,42 +0,0 @@ ---ゾンビ・マスター -function c17259470.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(17259470,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c17259470.spcost) - e1:SetTarget(c17259470.sptg) - e1:SetOperation(c17259470.spop) - c:RegisterEffect(e1) -end -function c17259470.costfilter(c) - return c:IsType(TYPE_MONSTER) and c:IsAbleToGraveAsCost() -end -function c17259470.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c17259470.costfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c17259470.costfilter,tp,LOCATION_HAND,0,1,1,nil) - Duel.SendtoGrave(g,REASON_COST) -end -function c17259470.filter(c,e,tp) - return c:IsLevelBelow(4) and c:IsRace(RACE_ZOMBIE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c17259470.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and c17259470.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c17259470.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c17259470.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c17259470.spop(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsFaceup() and c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsRace(RACE_ZOMBIE) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c17264592.lua b/script/c17264592.lua deleted file mode 100644 index 8d67a1f397..0000000000 --- a/script/c17264592.lua +++ /dev/null @@ -1,60 +0,0 @@ ---U.A.コリバルリバウンダー -function c17264592.initial_effect(c) - --special summon rule - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetRange(LOCATION_HAND) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetCountLimit(1,17264592) - e1:SetCondition(c17264592.sprcon) - e1:SetOperation(c17264592.sprop) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_SUMMON_SUCCESS) - e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e2:SetCountLimit(1,17264593) - e2:SetTarget(c17264592.sptg) - e2:SetOperation(c17264592.spop) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - e3:SetCondition(c17264592.spcon) - c:RegisterEffect(e3) -end -function c17264592.thfilter(c) - return c:IsFaceup() and c:IsSetCard(0xb2) and not c:IsCode(17264592) and c:IsAbleToHandAsCost() -end -function c17264592.sprcon(e,c) - if c==nil then return true end - return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-1 - and Duel.IsExistingMatchingCard(c17264592.thfilter,c:GetControler(),LOCATION_MZONE,0,1,nil) -end -function c17264592.sprop(e,tp,eg,ep,ev,re,r,rp,c) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g=Duel.SelectMatchingCard(tp,c17264592.thfilter,tp,LOCATION_MZONE,0,1,1,nil) - Duel.SendtoHand(g,nil,REASON_COST) -end -function c17264592.spfilter(c,e,tp) - return c:IsSetCard(0xb2) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsCode(17264592) - and not c:IsHasEffect(EFFECT_NECRO_VALLEY) -end -function c17264592.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c17264592.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE) -end -function c17264592.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c17264592.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end -function c17264592.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp -end diff --git a/script/c17266660.lua b/script/c17266660.lua deleted file mode 100644 index d72a91232f..0000000000 --- a/script/c17266660.lua +++ /dev/null @@ -1,44 +0,0 @@ ---朱光の宣告者 -function c17266660.initial_effect(c) - --Negate - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(17266660,0)) - e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_CHAINING) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c17266660.discon) - e1:SetCost(c17266660.discost) - e1:SetTarget(c17266660.distg) - e1:SetOperation(c17266660.disop) - c:RegisterEffect(e1) -end -function c17266660.discon(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainNegatable(ev) -end -function c17266660.costfilter(c) - return c:IsRace(RACE_FAIRY) and c:IsAbleToGraveAsCost() -end -function c17266660.discost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToGraveAsCost() and - Duel.IsExistingMatchingCard(c17266660.costfilter,tp,LOCATION_HAND,0,1,c) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c17266660.costfilter,tp,LOCATION_HAND,0,1,1,c) - g:AddCard(c) - Duel.SendtoGrave(g,REASON_COST) -end -function c17266660.distg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) - end -end -function c17266660.disop(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateActivation(ev) - if re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(eg,REASON_EFFECT) - end -end diff --git a/script/c17285476.lua b/script/c17285476.lua deleted file mode 100644 index 4712eea4e7..0000000000 --- a/script/c17285476.lua +++ /dev/null @@ -1,30 +0,0 @@ ---ナチュル・モスキート -function c17285476.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_CANNOT_BE_BATTLE_TARGET) - e1:SetCondition(c17285476.atcon) - e1:SetValue(aux.imval1) - c:RegisterEffect(e1) - --reflect - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_REFLECT_BATTLE_DAMAGE) - e2:SetRange(LOCATION_MZONE) - e2:SetTargetRange(LOCATION_MZONE,0) - e2:SetTarget(c17285476.reftg) - e2:SetValue(1) - c:RegisterEffect(e2) -end -function c17285476.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x2a) -end -function c17285476.atcon(e) - return Duel.IsExistingMatchingCard(c17285476.cfilter,e:GetOwnerPlayer(),LOCATION_MZONE,0,1,e:GetHandler()) -end -function c17285476.reftg(e,c) - return c~=e:GetHandler() and c:IsFaceup() and c:IsSetCard(0x2a) -end diff --git a/script/c17286057.lua b/script/c17286057.lua deleted file mode 100644 index 60cedc017b..0000000000 --- a/script/c17286057.lua +++ /dev/null @@ -1,85 +0,0 @@ ---ヘリオス・トリス・メギストス -function c17286057.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c17286057.hspcon) - e1:SetOperation(c17286057.hspop) - c:RegisterEffect(e1) - --atk/def - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EFFECT_SET_ATTACK) - e2:SetValue(c17286057.value) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EFFECT_SET_DEFENCE) - c:RegisterEffect(e3) - --spsummon - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(17286057,0)) - e4:SetCategory(CATEGORY_SPECIAL_SUMMON) - e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e4:SetCode(EVENT_PHASE+PHASE_END) - e4:SetRange(LOCATION_GRAVE) - e4:SetCountLimit(1) - e4:SetCondition(c17286057.spcon) - e4:SetTarget(c17286057.sptg) - e4:SetOperation(c17286057.spop) - c:RegisterEffect(e4) - --chain attack - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_SINGLE) - e5:SetCode(EFFECT_EXTRA_ATTACK) - e5:SetValue(1) - e5:SetCondition(c17286057.atcon) - c:RegisterEffect(e5) -end -function c17286057.hspcon(e,c) - if c==nil then return true end - return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-1 - and Duel.CheckReleaseGroup(c:GetControler(),Card.IsCode,1,nil,80887952) -end -function c17286057.hspop(e,tp,eg,ep,ev,re,r,rp,c) - local g=Duel.SelectReleaseGroup(tp,Card.IsCode,1,1,nil,80887952) - Duel.Release(g,REASON_COST) -end -function c17286057.filter(c) - return c:IsFaceup() and c:IsType(TYPE_MONSTER) -end -function c17286057.value(e,c) - return Duel.GetMatchingGroupCount(c17286057.filter,c:GetControler(),LOCATION_REMOVED,LOCATION_REMOVED,nil)*300 -end -function c17286057.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsReason(REASON_BATTLE) and e:GetHandler():GetTurnID()==Duel.GetTurnCount() -end -function c17286057.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c17286057.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.SpecialSummonStep(c,0,tp,tp,false,false,POS_FACEUP) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(500) - e1:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_UPDATE_DEFENCE) - c:RegisterEffect(e2) - end - Duel.SpecialSummonComplete() -end -function c17286057.atcon(e) - return Duel.GetFieldGroupCount(e:GetHandlerPlayer(),0,LOCATION_MZONE)>0 -end diff --git a/script/c17313545.lua b/script/c17313545.lua deleted file mode 100644 index d42fbf56dc..0000000000 --- a/script/c17313545.lua +++ /dev/null @@ -1,31 +0,0 @@ ---ゴーレム -function c17313545.initial_effect(c) - --disable - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_DISABLE) - e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e1:SetTarget(c17313545.distg) - c:RegisterEffect(e1) - --chain attack - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(17313545,0)) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_BATTLED) - e2:SetCondition(c17313545.atcon) - e2:SetOperation(c17313545.atop) - c:RegisterEffect(e2) -end -function c17313545.distg(e,c) - return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsType(TYPE_EFFECT) -end -function c17313545.atcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local bc=c:GetBattleTarget() - return bc and bc:IsStatus(STATUS_BATTLE_DESTROYED) and c:IsChainAttackable() - and bc:IsAttribute(ATTRIBUTE_LIGHT) -end -function c17313545.atop(e,tp,eg,ep,ev,re,r,rp) - Duel.ChainAttack() -end diff --git a/script/c17363041.lua b/script/c17363041.lua deleted file mode 100644 index 6f2e8efbdb..0000000000 --- a/script/c17363041.lua +++ /dev/null @@ -1,38 +0,0 @@ ---C・チッキー -function c17363041.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(17363041,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c17363041.spcon) - e1:SetCost(c17363041.spcost) - e1:SetTarget(c17363041.sptg) - e1:SetOperation(c17363041.spop) - c:RegisterEffect(e1) -end -function c17363041.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsEnvironment(42015635) -end -function c17363041.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end -function c17363041.spfilter(c,e,tp) - return c:IsCode(54959865) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c17363041.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsExistingMatchingCard(c17363041.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) -end -function c17363041.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - if not Duel.IsEnvironment(42015635) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c17363041.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c17375316.lua b/script/c17375316.lua deleted file mode 100644 index 25325eb8cc..0000000000 --- a/script/c17375316.lua +++ /dev/null @@ -1,33 +0,0 @@ ---押収 -function c17375316.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_HANDES) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c17375316.cost) - e1:SetTarget(c17375316.target) - e1:SetOperation(c17375316.activate) - c:RegisterEffect(e1) -end -function c17375316.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,1000) end - Duel.PayLPCost(tp,1000) -end -function c17375316.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0 end - Duel.SetTargetPlayer(tp) - Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,1-tp,1) -end -function c17375316.activate(e,tp,eg,ep,ev,re,r,rp) - local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) - local g=Duel.GetFieldGroup(p,0,LOCATION_HAND) - if g:GetCount()>0 then - Duel.ConfirmCards(p,g) - Duel.Hint(HINT_SELECTMSG,p,HINTMSG_DISCARD) - local sg=g:Select(p,1,1,nil) - Duel.SendtoGrave(sg,REASON_EFFECT+REASON_DISCARD) - Duel.ShuffleHand(1-p) - end -end diff --git a/script/c17377751.lua b/script/c17377751.lua deleted file mode 100644 index b72c537aeb..0000000000 --- a/script/c17377751.lua +++ /dev/null @@ -1,54 +0,0 @@ ---BF-煌星のグラム -function c17377751.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1) - c:EnableReviveLimit() - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_SINGLE_RANGE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetRange(LOCATION_EXTRA) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(aux.synlimit) - c:RegisterEffect(e1) - --Special Summon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(17377751,0)) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetCondition(c17377751.spcon) - e2:SetTarget(c17377751.sptg) - e2:SetOperation(c17377751.spop) - c:RegisterEffect(e2) -end -function c17377751.spcon(e,tp,eg,ep,ev,re,r,rp,chk) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_SYNCHRO -end -function c17377751.filter(c,e,tp) - return not c:IsType(TYPE_TUNER) and c:IsLevelBelow(4) and c:IsSetCard(0x33) and c:IsCanBeSpecialSummoned(e,0,tp,false,true) -end -function c17377751.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c17377751.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c17377751.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c17377751.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - local tc=g:GetFirst() - if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,true,POS_FACEUP) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1,true) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e2,true) - Duel.SpecialSummonComplete() - end -end diff --git a/script/c17390179.lua b/script/c17390179.lua deleted file mode 100644 index 8c97c52881..0000000000 --- a/script/c17390179.lua +++ /dev/null @@ -1,10 +0,0 @@ ---閃光の騎士 -function c17390179.initial_effect(c) - --pendulum summon - aux.AddPendulumProcedure(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) -end diff --git a/script/c17393207.lua b/script/c17393207.lua deleted file mode 100644 index adeeee71ca..0000000000 --- a/script/c17393207.lua +++ /dev/null @@ -1,32 +0,0 @@ ---墓守の司令官 -function c17393207.initial_effect(c) - --search - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(17393207,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND) - e1:SetCost(c17393207.cost) - e1:SetTarget(c17393207.target) - e1:SetOperation(c17393207.operation) - c:RegisterEffect(e1) -end -function c17393207.cost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToGraveAsCost() and c:IsDiscardable() end - Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD) -end -function c17393207.filter(c) - return c:GetCode()==47355498 and c:IsAbleToHand() -end -function c17393207.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chk==0 then return Duel.IsExistingMatchingCard(c17393207.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c17393207.operation(e,tp,eg,ep,ev,re,r,rp,chk) - local tg=Duel.GetFirstMatchingCard(c17393207.filter,tp,LOCATION_DECK,0,nil) - if tg then - Duel.SendtoHand(tg,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tg) - end -end diff --git a/script/c17412721.lua b/script/c17412721.lua deleted file mode 100644 index 4a760ac574..0000000000 --- a/script/c17412721.lua +++ /dev/null @@ -1,67 +0,0 @@ ---旧神ノーデン -function c17412721.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcFun2(c,c17412721.ffilter,c17412721.ffilter,true) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(17412721,1)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetTarget(c17412721.sptg) - e1:SetOperation(c17412721.spop) - c:RegisterEffect(e1) - --leave field - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_LEAVE_FIELD) - e2:SetOperation(c17412721.leave) - c:RegisterEffect(e2) - e1:SetLabelObject(e2) -end -function c17412721.ffilter(c) - return c:IsType(TYPE_XYZ+TYPE_SYNCHRO) -end -function c17412721.filter(c,e,tp) - return c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c17412721.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c17412721.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c17412721.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c17412721.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c17412721.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1,true) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e2,true) - Duel.SpecialSummonComplete() - if c:IsRelateToEffect(e) then - c:SetCardTarget(tc) - e:GetLabelObject():SetLabelObject(tc) - c:CreateRelation(tc,RESET_EVENT+0x5020000) - tc:CreateRelation(c,RESET_EVENT+0x5fe0000) - end - end -end -function c17412721.leave(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=e:GetLabelObject() - if tc and c:IsRelateToCard(tc) and tc:IsRelateToCard(c) then - Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) - end -end diff --git a/script/c17415895.lua b/script/c17415895.lua deleted file mode 100644 index 0901abc19a..0000000000 --- a/script/c17415895.lua +++ /dev/null @@ -1,33 +0,0 @@ ---ヴォルカニック・エッジ -function c17415895.initial_effect(c) - --damage - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(17415895,0)) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c17415895.cost) - e1:SetTarget(c17415895.target) - e1:SetOperation(c17415895.operation) - c:RegisterEffect(e1) -end -function c17415895.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():GetAttackAnnouncedCount()==0 end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_OATH) - e1:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - e:GetHandler():RegisterEffect(e1) -end -function c17415895.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(500) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,500) -end -function c17415895.operation(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c17418744.lua b/script/c17418744.lua deleted file mode 100644 index b9558d119e..0000000000 --- a/script/c17418744.lua +++ /dev/null @@ -1,69 +0,0 @@ ---フォトン・サンクチュアリ -function c17418744.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c17418744.cost) - e1:SetTarget(c17418744.target) - e1:SetOperation(c17418744.activate) - c:RegisterEffect(e1) - Duel.AddCustomActivityCounter(17418744,ACTIVITY_SUMMON,c17418744.counterfilter) - Duel.AddCustomActivityCounter(17418744,ACTIVITY_SPSUMMON,c17418744.counterfilter) - Duel.AddCustomActivityCounter(17418744,ACTIVITY_FLIPSUMMON,c17418744.counterfilter) -end -function c17418744.counterfilter(c) - return c:IsAttribute(ATTRIBUTE_LIGHT) -end -function c17418744.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetCustomActivityCount(17418744,tp,ACTIVITY_SUMMON)==0 - and Duel.GetCustomActivityCount(17418744,tp,ACTIVITY_SPSUMMON)==0 - and Duel.GetCustomActivityCount(17418744,tp,ACTIVITY_FLIPSUMMON)==0 end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) - e1:SetTargetRange(1,0) - e1:SetTarget(c17418744.sumlimit) - Duel.RegisterEffect(e1,tp) - local e2=e1:Clone() - e2:SetCode(EFFECT_CANNOT_SUMMON) - Duel.RegisterEffect(e2,tp) - local e3=e1:Clone() - e3:SetCode(EFFECT_CANNOT_FLIP_SUMMON) - Duel.RegisterEffect(e3,tp) -end -function c17418744.sumlimit(e,c,sump,sumtype,sumpos,targetp,se) - return c:IsAttribute(0x6f) -end -function c17418744.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>1 - and Duel.IsPlayerCanSpecialSummonMonster(tp,17418745,0x55,0x4011,2000,0,4,RACE_THUNDER,ATTRIBUTE_LIGHT) end - Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,2,0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,0,0) -end -function c17418744.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)>1 - and Duel.IsPlayerCanSpecialSummonMonster(tp,17418745,0x55,0x4011,2000,0,4,RACE_THUNDER,ATTRIBUTE_LIGHT) then - for i=1,2 do - local token=Duel.CreateToken(tp,17418745) - Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP_DEFENCE) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000) - token:RegisterEffect(e1,true) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e2:SetValue(1) - e2:SetReset(RESET_EVENT+0x1fe0000) - token:RegisterEffect(e2,true) - end - Duel.SpecialSummonComplete() - end -end diff --git a/script/c17444133.lua b/script/c17444133.lua deleted file mode 100644 index 2d90237664..0000000000 --- a/script/c17444133.lua +++ /dev/null @@ -1,12 +0,0 @@ ---カイザー・シーホース -function c17444133.initial_effect(c) - --double tribute - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DOUBLE_TRIBUTE) - e1:SetValue(c17444133.condition) - c:RegisterEffect(e1) -end -function c17444133.condition(e,c) - return c:IsAttribute(ATTRIBUTE_LIGHT) -end diff --git a/script/c17449108.lua b/script/c17449108.lua deleted file mode 100644 index d950f6be3a..0000000000 --- a/script/c17449108.lua +++ /dev/null @@ -1,40 +0,0 @@ ---撲滅の使徒 -function c17449108.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_REMOVE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c17449108.target) - e1:SetOperation(c17449108.activate) - c:RegisterEffect(e1) -end -function c17449108.filter(c) - return c:IsFacedown() and c:IsDestructable() and c:IsAbleToRemove() -end -function c17449108.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:GetLocation()==LOCATION_SZONE and c17449108.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c17449108.filter,tp,LOCATION_SZONE,LOCATION_SZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c17449108.filter,tp,LOCATION_SZONE,LOCATION_SZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) -end -function c17449108.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsFacedown() and tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT,LOCATION_REMOVED) - if tc:IsType(TYPE_TRAP) then - local code=tc:GetCode() - local g=Duel.GetMatchingGroup(Card.IsCode,tp,LOCATION_DECK,LOCATION_DECK,nil,code) - Duel.Remove(g,POS_FACEUP,REASON_EFFECT) - g=Duel.GetFieldGroup(tp,0,LOCATION_DECK) - Duel.ConfirmCards(tp,g) - g=Duel.GetFieldGroup(tp,LOCATION_DECK,0) - Duel.ConfirmCards(1-tp,g) - Duel.ShuffleDeck(tp) - Duel.ShuffleDeck(1-tp) - end - end -end diff --git a/script/c17475251.lua b/script/c17475251.lua deleted file mode 100644 index 8108ef3523..0000000000 --- a/script/c17475251.lua +++ /dev/null @@ -1,50 +0,0 @@ ---英炎星-ホークエイ -function c17475251.initial_effect(c) - --set - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(17475251,0)) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_DESTROYED) - e1:SetCondition(c17475251.setcon) - e1:SetTarget(c17475251.settg) - e1:SetOperation(c17475251.setop) - c:RegisterEffect(e1) - --atk/def - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetRange(LOCATION_MZONE) - e2:SetTargetRange(LOCATION_MZONE,0) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetCondition(c17475251.atkcon) - e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x79)) - e2:SetValue(500) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EFFECT_UPDATE_DEFENCE) - c:RegisterEffect(e3) -end -function c17475251.setcon(e,tp,eg,ep,ev,re,r,rp) - return rp~=tp and e:GetHandler():GetPreviousControler()==tp -end -function c17475251.filter(c) - return c:IsSetCard(0x7c) and c:IsType(TYPE_SPELL) and c:IsSSetable() -end -function c17475251.settg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingMatchingCard(c17475251.filter,tp,LOCATION_DECK,0,1,nil) end -end -function c17475251.setop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) - local g=Duel.SelectMatchingCard(tp,c17475251.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SSet(tp,g:GetFirst()) - Duel.ConfirmCards(1-tp,g) - end -end -function c17475251.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x7c) and c:IsType(TYPE_SPELL+TYPE_TRAP) -end -function c17475251.atkcon(e) - return Duel.IsExistingMatchingCard(c17475251.cfilter,e:GetHandlerPlayer(),LOCATION_ONFIELD,0,1,nil) -end diff --git a/script/c17484499.lua b/script/c17484499.lua deleted file mode 100644 index 209a571136..0000000000 --- a/script/c17484499.lua +++ /dev/null @@ -1,25 +0,0 @@ ---現世と冥界の逆転 -function c17484499.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_DRAW_PHASE) - e1:SetCountLimit(1,17484499+EFFECT_COUNT_CODE_DUEL) - e1:SetCondition(c17484499.condition) - e1:SetCost(c17484499.cost) - e1:SetOperation(c17484499.activate) - c:RegisterEffect(e1) -end -function c17484499.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetFieldGroupCount(tp,LOCATION_GRAVE,0)>=15 - and Duel.GetFieldGroupCount(tp,0,LOCATION_GRAVE)>=15 -end -function c17484499.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,1000) end - Duel.PayLPCost(tp,1000) -end -function c17484499.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.SwapDeckAndGrave(tp) - Duel.SwapDeckAndGrave(1-tp) -end diff --git a/script/c17490535.lua b/script/c17490535.lua deleted file mode 100644 index c29133fc56..0000000000 --- a/script/c17490535.lua +++ /dev/null @@ -1,39 +0,0 @@ ---エーリアン・ブレイン -function c17490535.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_CONTROL) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetCondition(c17490535.condition) - e1:SetTarget(c17490535.target) - e1:SetOperation(c17490535.activate) - c:RegisterEffect(e1) -end -function c17490535.condition(e,tp,eg,ep,ev,re,r,rp) - local ec=eg:GetFirst() - return eg:GetCount()==1 and ec:GetPreviousControler()==tp and ec:IsRace(RACE_REPTILE) - and bit.band(ec:GetPreviousRaceOnField(),RACE_REPTILE)~=0 - and ec==Duel.GetAttackTarget() and ec:IsLocation(LOCATION_GRAVE) and ec:IsReason(REASON_BATTLE) -end -function c17490535.target(e,tp,eg,ep,ev,re,r,rp,chk) - local tc=eg:GetFirst():GetReasonCard() - if chk==0 then return tc:IsControler(1-tp) and tc:IsRelateToBattle() and tc:IsControlerCanBeChanged() end - Duel.SetTargetCard(tc) - Duel.SetOperationInfo(0,CATEGORY_CONTROL,tc,1,0,0) -end -function c17490535.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - if Duel.GetControl(tc,tp) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CHANGE_RACE) - e1:SetValue(RACE_REPTILE) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - elseif not tc:IsImmuneToEffect(e) and tc:IsAbleToChangeControler() then - Duel.Destroy(tc,REASON_EFFECT) - end - end -end diff --git a/script/c17494901.lua b/script/c17494901.lua deleted file mode 100644 index 3362d864dd..0000000000 --- a/script/c17494901.lua +++ /dev/null @@ -1,32 +0,0 @@ ---ガガガボルト -function c17494901.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c17494901.condition) - e1:SetTarget(c17494901.target) - e1:SetOperation(c17494901.activate) - c:RegisterEffect(e1) -end -function c17494901.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x54) -end -function c17494901.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c17494901.cfilter,tp,LOCATION_MZONE,0,1,nil) -end -function c17494901.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsDestructable() and chkc~=e:GetHandler() end - if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c17494901.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c17502671.lua b/script/c17502671.lua deleted file mode 100644 index 044c602a83..0000000000 --- a/script/c17502671.lua +++ /dev/null @@ -1,56 +0,0 @@ ---インフェルニティ・ジェネラル -function c17502671.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(17502671,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_GRAVE) - e1:SetCondition(c17502671.spcon) - e1:SetCost(c17502671.spcost) - e1:SetTarget(c17502671.sptg) - e1:SetOperation(c17502671.spop) - c:RegisterEffect(e1) -end -function c17502671.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)==0 -end -function c17502671.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) -end -function c17502671.filter(c,e,tp) - return c:IsSetCard(0xb) and c:IsLevelBelow(3) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c17502671.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c17502671.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>1 - and Duel.IsExistingTarget(c17502671.filter,tp,LOCATION_GRAVE,0,2,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c17502671.filter,tp,LOCATION_GRAVE,0,2,2,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,g:GetCount(),0,0) -end -function c17502671.spop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local sg=g:Filter(Card.IsRelateToEffect,nil,e) - if Duel.GetLocationCount(tp,LOCATION_MZONE)0 - and Duel.IsExistingMatchingCard(c17536995.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c17536995.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c17536995.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - if g:GetCount()>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)>0 then - Duel.BreakEffect() - Duel.SkipPhase(1-tp,PHASE_BATTLE,RESET_PHASE+PHASE_BATTLE,1) - end -end diff --git a/script/c17548456.lua b/script/c17548456.lua deleted file mode 100644 index 0d90f55473..0000000000 --- a/script/c17548456.lua +++ /dev/null @@ -1,40 +0,0 @@ ---ジュラック・メテオ -function c17548456.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0x22),aux.NonTuner(Card.IsRace,RACE_DINOSAUR),2) - c:EnableReviveLimit() - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(17548456,0)) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(c17548456.descon) - e1:SetTarget(c17548456.destg) - e1:SetOperation(c17548456.desop) - c:RegisterEffect(e1) -end -function c17548456.descon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_SYNCHRO -end -function c17548456.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c17548456.spfilter(c,e,tp) - return c:IsType(TYPE_TUNER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsHasEffect(EFFECT_NECRO_VALLEY) -end -function c17548456.desop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) - if g:GetCount()>0 then - Duel.Destroy(g,REASON_EFFECT) - end - local sg=Duel.GetMatchingGroup(c17548456.spfilter,tp,LOCATION_GRAVE,0,nil,e,tp) - if sg:GetCount()~=0 and Duel.SelectYesNo(tp,aux.Stringid(17548456,1)) then - Duel.BreakEffect() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sp=sg:Select(tp,1,1,nil) - Duel.SpecialSummon(sp,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c17559367.lua b/script/c17559367.lua deleted file mode 100644 index 4941f1b5eb..0000000000 --- a/script/c17559367.lua +++ /dev/null @@ -1,34 +0,0 @@ ---ディープ・ダイバー -function c17559367.initial_effect(c) - --search - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetOperation(c17559367.regop) - c:RegisterEffect(e1) -end -function c17559367.regop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsLocation(LOCATION_GRAVE) and c:IsReason(REASON_BATTLE) then - --search - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(17559367,0)) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetRange(LOCATION_GRAVE) - e1:SetCode(EVENT_PHASE+PHASE_BATTLE) - e1:SetCountLimit(1) - e1:SetOperation(c17559367.operation) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_BATTLE) - c:RegisterEffect(e1) - end -end -function c17559367.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(17559367,1)) - local g=Duel.SelectMatchingCard(tp,Card.IsType,tp,LOCATION_DECK,0,1,1,nil,TYPE_MONSTER) - local tc=g:GetFirst() - if tc then - Duel.ShuffleDeck(tp) - Duel.MoveSequence(tc,0) - Duel.ConfirmDecktop(tp,1) - end -end diff --git a/script/c17573739.lua b/script/c17573739.lua deleted file mode 100644 index 2298bd02ef..0000000000 --- a/script/c17573739.lua +++ /dev/null @@ -1,63 +0,0 @@ ---神禽王アレクトール -function c17573739.initial_effect(c) - c:SetUniqueOnField(1,1,17573739) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c17573739.spcon) - c:RegisterEffect(e1) - --negate - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(17573739,0)) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetTarget(c17573739.distg) - e2:SetOperation(c17573739.disop) - c:RegisterEffect(e2) -end -function c17573739.spfilter1(c,tp) - return c:IsFaceup() and Duel.IsExistingMatchingCard(c17573739.spfilter2,tp,0,LOCATION_MZONE,1,c,c:GetAttribute()) -end -function c17573739.spfilter2(c,att) - return c:IsFaceup() and c:IsAttribute(att) -end -function c17573739.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c17573739.spfilter1,tp,0,LOCATION_MZONE,1,nil,tp) -end -function c17573739.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) -end -function c17573739.disop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e2) - if tc:IsType(TYPE_TRAPMONSTER) then - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_DISABLE_TRAPMONSTER) - e3:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e3) - end - end -end diff --git a/script/c17589298.lua b/script/c17589298.lua deleted file mode 100644 index 7b0e6892f9..0000000000 --- a/script/c17589298.lua +++ /dev/null @@ -1,71 +0,0 @@ ---サクリファイス・ソード -function c17589298.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c17589298.target) - e1:SetOperation(c17589298.operation) - c:RegisterEffect(e1) - -- - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(400) - c:RegisterEffect(e2) - --Equip limit - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_EQUIP_LIMIT) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e3:SetValue(c17589298.eqlimit) - c:RegisterEffect(e3) - --tohand - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e4:SetCategory(CATEGORY_TOHAND) - e4:SetDescription(aux.Stringid(17589298,0)) - e4:SetCode(EVENT_TO_GRAVE) - e4:SetCondition(c17589298.retcon) - e4:SetTarget(c17589298.rettg) - e4:SetOperation(c17589298.retop) - c:RegisterEffect(e4) -end -function c17589298.eqlimit(e,c) - return c:IsAttribute(ATTRIBUTE_DARK) -end -function c17589298.filter(c) - return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_DARK) -end -function c17589298.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c17589298.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c17589298.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c17589298.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c17589298.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,c,tc) - end -end -function c17589298.retcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local ec=c:GetPreviousEquipTarget() - return c:IsReason(REASON_LOST_TARGET) and ec:IsReason(REASON_RELEASE) -end -function c17589298.rettg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToHand() end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0) -end -function c17589298.retop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SendtoHand(c,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,c) - end -end diff --git a/script/c17597059.lua b/script/c17597059.lua deleted file mode 100644 index f9dad4ae29..0000000000 --- a/script/c17597059.lua +++ /dev/null @@ -1,30 +0,0 @@ ---バイサー・ショック -function c17597059.initial_effect(c) - --to hand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(17597059,0)) - e1:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_SINGLE) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c17597059.target) - e1:SetOperation(c17597059.operation) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e2) - local e3=e1:Clone() - e3:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - c:RegisterEffect(e3) -end -function c17597059.filter(c) - return c:IsFacedown() and c:IsAbleToHand() -end -function c17597059.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local g=Duel.GetMatchingGroup(c17597059.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0) -end -function c17597059.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c17597059.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) - Duel.SendtoHand(g,nil,REASON_EFFECT) -end diff --git a/script/c17601919.lua b/script/c17601919.lua deleted file mode 100644 index 321edc3ccd..0000000000 --- a/script/c17601919.lua +++ /dev/null @@ -1,65 +0,0 @@ ---ゴースト姫-パンプリンセス- -function c17601919.initial_effect(c) - --send replace - local e1=Effect.CreateEffect(c) - e1:SetCode(EFFECT_SEND_REPLACE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_MZONE) - e1:SetTarget(c17601919.reptg) - e1:SetOperation(c17601919.repop) - c:RegisterEffect(e1) -end -function c17601919.reptg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:GetDestination()==LOCATION_GRAVE and c:IsReason(REASON_DESTROY) end - if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return false end - return Duel.SelectYesNo(tp,aux.Stringid(17601919,0)) -end -function c17601919.repop(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,true) - local e1=Effect.CreateEffect(c) - e1:SetCode(EFFECT_CHANGE_TYPE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fc0000) - e1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS) - c:RegisterEffect(e1) - --counter - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(17601919,1)) - e2:SetCategory(CATEGORY_COUNTER) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetRange(LOCATION_SZONE) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) - e2:SetCountLimit(1) - e2:SetTarget(c17601919.addct) - e2:SetOperation(c17601919.addc) - e2:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e2) - --addown - local e3=Effect.CreateEffect(c) - e3:SetCode(EFFECT_UPDATE_ATTACK) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetRange(LOCATION_SZONE) - e3:SetTargetRange(0,LOCATION_MZONE) - e3:SetValue(c17601919.adval) - e3:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e3) - local e4=e3:Clone() - e4:SetCode(EFFECT_UPDATE_DEFENCE) - c:RegisterEffect(e4) -end -function c17601919.addct(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,1,0,0x2f) -end -function c17601919.addc(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - e:GetHandler():AddCounter(0x2f,1) - end -end -function c17601919.adval(e,c) - return e:GetHandler():GetCounter(0x2f)*-100 -end diff --git a/script/c17626381.lua b/script/c17626381.lua deleted file mode 100644 index 27c904e7ae..0000000000 --- a/script/c17626381.lua +++ /dev/null @@ -1,37 +0,0 @@ ---補給部隊 -function c17626381.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --draw - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(17626381,0)) - e2:SetCategory(CATEGORY_DRAW) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetRange(LOCATION_SZONE) - e2:SetCode(EVENT_DESTROYED) - e2:SetCountLimit(1) - e2:SetCondition(c17626381.drcon) - e2:SetTarget(c17626381.drtg) - e2:SetOperation(c17626381.drop) - c:RegisterEffect(e2) -end -function c17626381.cfilter(c,tp) - return c:IsReason(REASON_BATTLE+REASON_EFFECT) and c:IsPreviousLocation(LOCATION_MZONE) and c:GetPreviousControler()==tp -end -function c17626381.drcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c17626381.cfilter,1,nil,tp) -end -function c17626381.drtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(1) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c17626381.drop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end diff --git a/script/c17639150.lua b/script/c17639150.lua deleted file mode 100644 index f29609de25..0000000000 --- a/script/c17639150.lua +++ /dev/null @@ -1,86 +0,0 @@ ---機殻の生贄 -function c17639150.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c17639150.eqtg) - e1:SetOperation(c17639150.eqop) - c:RegisterEffect(e1) - --Equip limit - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_EQUIP_LIMIT) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetValue(c17639150.effcon) - c:RegisterEffect(e2) - --Atk up - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_EQUIP) - e3:SetCode(EFFECT_UPDATE_ATTACK) - e3:SetValue(300) - c:RegisterEffect(e3) - --battle indestructable - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_EQUIP) - e4:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e4:SetValue(1) - c:RegisterEffect(e4) - --double tribute - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_EQUIP) - e5:SetCode(EFFECT_DOUBLE_TRIBUTE) - e5:SetValue(c17639150.effcon) - c:RegisterEffect(e5) - --search - local e6=Effect.CreateEffect(c) - e6:SetDescription(aux.Stringid(17639150,0)) - e6:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e6:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e6:SetCode(EVENT_TO_GRAVE) - e6:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e6:SetCondition(c17639150.thcon) - e6:SetTarget(c17639150.thtg) - e6:SetOperation(c17639150.thop) - c:RegisterEffect(e6) -end -function c17639150.effcon(e,c) - return c:IsSetCard(0xaa) -end -function c17639150.eqfilter(c) - return c:IsFaceup() and c:IsSetCard(0xaa) -end -function c17639150.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c17639150.eqfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c17639150.eqfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c17639150.eqfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c17639150.eqop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,c,tc) - end -end -function c17639150.thcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) -end -function c17639150.thfilter(c) - return c:IsSetCard(0xaa) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() -end -function c17639150.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c17639150.thfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c17639150.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c17639150.thfilter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c176392.lua b/script/c176392.lua deleted file mode 100644 index 697f8df39c..0000000000 --- a/script/c176392.lua +++ /dev/null @@ -1,57 +0,0 @@ ---コアキメイル・テストベッド -function c176392.initial_effect(c) - --destroy replace - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_DESTROY_REPLACE) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c176392.descon) - e1:SetTarget(c176392.destg) - e1:SetValue(c176392.repval) - c:RegisterEffect(e1) - --token - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(176392,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EVENT_DESTROYED) - e2:SetCondition(c176392.spcon) - e2:SetTarget(c176392.sptg) - e2:SetOperation(c176392.spop) - c:RegisterEffect(e2) -end -function c176392.descon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()==PHASE_END -end -function c176392.rfilter(c) - return c:IsFaceup() and c:IsLocation(LOCATION_MZONE) and c:IsSetCard(0x1d) -end -function c176392.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return eg:IsExists(c176392.rfilter,1,e:GetHandler()) end - if Duel.SelectYesNo(tp,aux.Stringid(176392,0)) then - Duel.Destroy(e:GetHandler(),REASON_EFFECT+REASON_REPLACE) - return true - else return false end -end -function c176392.repval(e,c) - return c:IsFaceup() and c:IsSetCard(0x1d) and c~=e:GetHandler() -end -function c176392.spfilter(c) - return c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousSetCard(0x1d) -end -function c176392.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()==PHASE_END and eg:IsExists(c176392.spfilter,1,nil) -end -function c176392.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsPlayerCanSpecialSummonMonster(tp,176393,0x1d,0x4011,1800,1800,4,RACE_ROCK,ATTRIBUTE_EARTH) end - Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0) -end -function c176392.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - if not Duel.IsPlayerCanSpecialSummonMonster(tp,176393,0x1d,0x4011,1800,1800,4,RACE_ROCK,ATTRIBUTE_EARTH) then return end - local token=Duel.CreateToken(tp,176393) - Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP) -end diff --git a/script/c17643265.lua b/script/c17643265.lua deleted file mode 100644 index 3fd00ec626..0000000000 --- a/script/c17643265.lua +++ /dev/null @@ -1,37 +0,0 @@ ---ツーヘッド・シャーク -function c17643265.initial_effect(c) - --lvup - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(17643265,0)) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c17643265.lvtg) - e1:SetOperation(c17643265.lvop) - c:RegisterEffect(e1) - --attack twice - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_EXTRA_ATTACK) - e2:SetValue(1) - c:RegisterEffect(e2) -end -function c17643265.filter(c) - return c:IsFaceup() and c:GetLevel()==4 and c:IsRace(RACE_FISH) -end -function c17643265.lvtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c17643265.filter,tp,LOCATION_MZONE,0,1,nil) end -end -function c17643265.lvop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c17643265.filter,tp,LOCATION_MZONE,0,nil) - local tc=g:GetFirst() - while tc do - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_LEVEL) - e1:SetValue(-1) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - tc=g:GetNext() - end -end diff --git a/script/c1764972.lua b/script/c1764972.lua deleted file mode 100644 index 6724843cd4..0000000000 --- a/script/c1764972.lua +++ /dev/null @@ -1,121 +0,0 @@ ---デスカイザー・ドラゴン/バスター -function c1764972.initial_effect(c) - c:EnableReviveLimit() - --Cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(aux.FALSE) - c:RegisterEffect(e1) - --Special summon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(1764972,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetTarget(c1764972.sptg1) - e2:SetOperation(c1764972.spop1) - c:RegisterEffect(e2) - --Special summon2 - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(1764972,1)) - e3:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e3:SetCode(EVENT_LEAVE_FIELD) - e3:SetCondition(c1764972.spcon2) - e3:SetTarget(c1764972.sptg2) - e3:SetOperation(c1764972.spop2) - c:RegisterEffect(e3) -end -function c1764972.filter1(c,e,tp) - return c:IsRace(RACE_ZOMBIE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c1764972.sptg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and c1764972.filter1(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c1764972.filter1,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil,e,tp) end - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c1764972.filter1,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,ft,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,g:GetCount(),0,0) -end -function c1764972.sfilter(c,e,tp) - return c:IsRelateToEffect(e) and c:IsRace(RACE_ZOMBIE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c1764972.spop1(e,tp,eg,ep,ev,re,r,rp) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ft<=0 then return end - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(c1764972.sfilter,nil,e,tp) - if g:GetCount()==0 or g:GetCount()>ft then return false end - local c=e:GetHandler() - local fid=c:GetFieldID() - local tc=g:GetFirst() - while tc do - Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1,true) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e2,true) - tc:RegisterFlagEffect(1764972,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1,fid) - tc=g:GetNext() - end - Duel.SpecialSummonComplete() - g:KeepAlive() - local de=Effect.CreateEffect(c) - de:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - de:SetCode(EVENT_PHASE+PHASE_END) - de:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - de:SetCountLimit(1) - de:SetReset(RESET_PHASE+PHASE_END) - de:SetLabel(fid) - de:SetLabelObject(g) - de:SetCondition(c1764972.descon) - de:SetOperation(c1764972.desop) - Duel.RegisterEffect(de,tp) -end -function c1764972.desfilter(c,fid) - return c:GetFlagEffectLabel(1764972)==fid -end -function c1764972.descon(e,tp,eg,ep,ev,re,r,rp) - local g=e:GetLabelObject() - if not g:IsExists(c1764972.desfilter,1,nil,e:GetLabel()) then - g:DeleteGroup() - e:Reset() - return false - else return true end -end -function c1764972.desop(e,tp,eg,ep,ev,re,r,rp) - local g=e:GetLabelObject() - local dg=g:Filter(c1764972.desfilter,nil,e:GetLabel()) - g:DeleteGroup() - Duel.Destroy(dg,REASON_EFFECT) -end -function c1764972.spcon2(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsReason(REASON_DESTROY) -end -function c1764972.spfilter2(c,e,tp) - return c:IsCode(6021033) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c1764972.sptg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c1764972.spfilter2(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c1764972.spfilter2,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c1764972.spfilter2,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c1764972.spop2(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c17649753.lua b/script/c17649753.lua deleted file mode 100644 index 52e0ee2f34..0000000000 --- a/script/c17649753.lua +++ /dev/null @@ -1,38 +0,0 @@ ---ワーム・ルクイエ -function c17649753.initial_effect(c) - --attack limit - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_FLIP) - e1:SetOperation(c17649753.flipop) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE) - e2:SetCondition(c17649753.atkcon) - c:RegisterEffect(e2) - --to defence - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e3:SetCode(EVENT_PHASE+PHASE_BATTLE) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1) - e3:SetCondition(c17649753.poscon) - e3:SetOperation(c17649753.posop) - c:RegisterEffect(e3) -end -function c17649753.flipop(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():RegisterFlagEffect(17649753,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) -end -function c17649753.atkcon(e) - return e:GetHandler():GetFlagEffect(17649753)==0 -end -function c17649753.poscon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetAttackedCount()>0 -end -function c17649753.posop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFaceup() then - Duel.ChangePosition(c,POS_FACEDOWN_DEFENCE) - end -end diff --git a/script/c17653779.lua b/script/c17653779.lua deleted file mode 100644 index 4a1e2a1397..0000000000 --- a/script/c17653779.lua +++ /dev/null @@ -1,38 +0,0 @@ ---天使の手鏡 -function c17653779.initial_effect(c) - --activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_CHAINING) - e1:SetCondition(c17653779.tgcon) - e1:SetTarget(c17653779.tgtg) - e1:SetOperation(c17653779.tgop) - c:RegisterEffect(e1) -end -function c17653779.tgcon(e,tp,eg,ep,ev,re,r,rp) - if rp==tp or not re:IsHasType(EFFECT_TYPE_ACTIVATE) or not re:IsActiveType(TYPE_SPELL) - or not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end - local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) - if not g or g:GetCount()~=1 then return false end - local tc=g:GetFirst() - e:SetLabelObject(tc) - return tc:IsLocation(LOCATION_MZONE) -end -function c17653779.filter(c,re,rp,tf,ceg,cep,cev,cre,cr,crp) - return tf(re,rp,ceg,cep,cev,cre,cr,crp,0,c) -end -function c17653779.tgtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local tf=re:GetTarget() - local res,ceg,cep,cev,cre,cr,crp=Duel.CheckEvent(re:GetCode(),true) - if chkc then return chkc~=e:GetLabelObject() and chkc:IsLocation(LOCATION_MZONE) and tf(re,rp,ceg,cep,cev,cre,cr,crp,0,chkc) end - if chk==0 then return Duel.IsExistingTarget(c17653779.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,e:GetLabelObject(),re,rp,tf,ceg,cep,cev,cre,cr,crp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - Duel.SelectTarget(tp,c17653779.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,e:GetLabelObject(),re,rp,tf,ceg,cep,cev,cre,cr,crp) -end -function c17653779.tgop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - if g:GetFirst():IsRelateToEffect(e) then - Duel.ChangeTargetCard(ev,g) - end -end diff --git a/script/c17655904.lua b/script/c17655904.lua deleted file mode 100644 index 29058caa94..0000000000 --- a/script/c17655904.lua +++ /dev/null @@ -1,43 +0,0 @@ ---滅びの爆裂疾風弾 -function c17655904.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c17655904.condition) - e1:SetCost(c17655904.cost) - e1:SetTarget(c17655904.target) - e1:SetOperation(c17655904.activate) - c:RegisterEffect(e1) - Duel.AddCustomActivityCounter(17655904,ACTIVITY_ATTACK,c17655904.counterfilter) -end -function c17655904.counterfilter(c) - return not c:IsCode(89631139) -end -function c17655904.cfilter(c) - return c:IsFaceup() and c:IsCode(89631139) -end -function c17655904.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c17655904.cfilter,tp,LOCATION_ONFIELD,0,1,nil) -end -function c17655904.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetCustomActivityCount(17655904,tp,ACTIVITY_ATTACK)==0 end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE) - e1:SetProperty(EFFECT_FLAG_OATH+EFFECT_FLAG_IGNORE_IMMUNE) - e1:SetTarget(aux.TargetBoolFunction(Card.IsCode,89631139)) - e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e1:SetReset(RESET_PHASE+RESET_END) - Duel.RegisterEffect(e1,tp) -end -function c17655904.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDestructable,tp,0,LOCATION_MZONE,1,nil) end - local sg=Duel.GetMatchingGroup(Card.IsDestructable,tp,0,LOCATION_MZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,sg:GetCount(),0,0) -end -function c17655904.activate(e,tp,eg,ep,ev,re,r,rp) - local sg=Duel.GetMatchingGroup(Card.IsDestructable,tp,0,LOCATION_MZONE,nil) - Duel.Destroy(sg,REASON_EFFECT) -end diff --git a/script/c17706537.lua b/script/c17706537.lua deleted file mode 100644 index 760331a887..0000000000 --- a/script/c17706537.lua +++ /dev/null @@ -1,23 +0,0 @@ ---マンモ・フォッシル -function c17706537.initial_effect(c) - --damage - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(17706537,0)) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetCode(EVENT_BATTLE_DESTROYING) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCondition(aux.bdogcon) - e1:SetTarget(c17706537.damtg) - e1:SetOperation(c17706537.damop) - c:RegisterEffect(e1) -end -function c17706537.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(400) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,400) -end -function c17706537.damop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c17720747.lua b/script/c17720747.lua deleted file mode 100644 index 6c855587e5..0000000000 --- a/script/c17720747.lua +++ /dev/null @@ -1,42 +0,0 @@ ---黒薔薇の魔女 -function c17720747.initial_effect(c) - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - c:RegisterEffect(e1) - --Draw - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(17720747,0)) - e2:SetCategory(CATEGORY_DRAW) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_SUMMON_SUCCESS) - e2:SetCondition(c17720747.condition) - e2:SetTarget(c17720747.target) - e2:SetOperation(c17720747.operation) - c:RegisterEffect(e2) -end -function c17720747.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,0)<=1 -end -function c17720747.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c17720747.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetDecktopGroup(tp,1) - local tc=g:GetFirst() - Duel.Draw(tp,1,REASON_EFFECT) - if tc then - Duel.ConfirmCards(1-tp,tc) - if not tc:IsType(TYPE_MONSTER) then - Duel.BreakEffect() - Duel.SendtoGrave(tc,REASON_EFFECT) - if e:GetHandler():IsRelateToEffect(e) then - Duel.Destroy(e:GetHandler(),REASON_EFFECT) - end - end - Duel.ShuffleHand(tp) - end -end diff --git a/script/c17732278.lua b/script/c17732278.lua deleted file mode 100644 index 6cb5635f4c..0000000000 --- a/script/c17732278.lua +++ /dev/null @@ -1,41 +0,0 @@ ---N・グロー・モス -function c17732278.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(17732278,0)) - e1:SetCategory(CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c17732278.condition) - e1:SetTarget(c17732278.target) - e1:SetOperation(c17732278.activate) - c:RegisterEffect(e1) -end -function c17732278.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler()==Duel.GetAttacker() or e:GetHandler()==Duel.GetAttackTarget() -end -function c17732278.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():GetFlagEffect(17732278)==0 end - e:GetHandler():RegisterFlagEffect(17732278,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_DAMAGE,0,1) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,1-tp,1) -end -function c17732278.activate(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if Duel.Draw(1-tp,1,REASON_EFFECT)==0 then return end - local tc=Duel.GetOperatedGroup():GetFirst() - Duel.ConfirmCards(tp,tc) - if tc:IsType(TYPE_MONSTER) then - Duel.SkipPhase(Duel.GetTurnPlayer(),PHASE_BATTLE,RESET_PHASE+PHASE_BATTLE,1) - elseif tc:IsType(TYPE_SPELL) then - if c==Duel.GetAttacker() and not c:IsHasEffect(EFFECT_CANNOT_DIRECT_ATTACK) - and c:IsRelateToEffect(e) and c:IsFaceup() and Duel.SelectYesNo(tp,aux.Stringid(17732278,1)) then - Duel.ChangeAttackTarget(nil) - end - else - if c:IsRelateToEffect(e) and c:IsFaceup() then - Duel.ChangePosition(c,POS_FACEUP_DEFENCE) - end - end - Duel.ShuffleHand(1-tp) -end diff --git a/script/c17760003.lua b/script/c17760003.lua deleted file mode 100644 index 4a35151540..0000000000 --- a/script/c17760003.lua +++ /dev/null @@ -1,130 +0,0 @@ ---A・ジェネクス・トライアーム -function c17760003.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsCode,68505803),aux.NonTuner(nil),1) - c:EnableReviveLimit() - --mat check - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_MATERIAL_CHECK) - e1:SetValue(c17760003.valcheck) - c:RegisterEffect(e1) - --synchro success - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetCondition(c17760003.regcon) - e2:SetOperation(c17760003.regop) - c:RegisterEffect(e2) - e2:SetLabelObject(e1) -end -function c17760003.valcheck(e,c) - local g=c:GetMaterial() - local att=0 - local tc=g:GetFirst() - while tc do - if not tc:IsCode(68505803) or not tc:IsType(TYPE_TUNER) then - att=bit.bor(att,tc:GetAttribute()) - end - tc=g:GetNext() - end - att=bit.band(att,0x2a) - e:SetLabel(att) -end -function c17760003.regcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_SYNCHRO - and e:GetLabelObject():GetLabel()~=0 -end -function c17760003.regop(e,tp,eg,ep,ev,re,r,rp) - local att=e:GetLabelObject():GetLabel() - local c=e:GetHandler() - if bit.band(att,ATTRIBUTE_WIND)~=0 then - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(17760003,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE) - e1:SetCost(c17760003.cost) - e1:SetTarget(c17760003.target1) - e1:SetOperation(c17760003.operation1) - e1:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e1) - end - if bit.band(att,ATTRIBUTE_WATER)~=0 then - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(17760003,1)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE) - e1:SetCost(c17760003.cost) - e1:SetTarget(c17760003.target2) - e1:SetOperation(c17760003.operation2) - e1:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e1) - end - if bit.band(att,ATTRIBUTE_DARK)~=0 then - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(17760003,2)) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE) - e1:SetCost(c17760003.cost) - e1:SetTarget(c17760003.target3) - e1:SetOperation(c17760003.operation3) - e1:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e1) - end -end -function c17760003.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) -end -function c17760003.target1(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0 end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,1-tp,LOCATION_HAND) -end -function c17760003.operation1(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND) - if g:GetCount()==0 then return end - local sg=g:RandomSelect(tp,1) - Duel.SendtoGrave(sg,REASON_EFFECT) -end -function c17760003.filter2(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable() -end -function c17760003.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and c17760003.filter2(chkc) end - if chk==0 then return Duel.IsExistingTarget(c17760003.filter2,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c17760003.filter2,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c17760003.operation2(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end -function c17760003.filter3(c) - return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsDestructable() -end -function c17760003.target3(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c17760003.filter2(chkc) end - if chk==0 then return Duel.IsPlayerCanDraw(tp,1) - and Duel.IsExistingTarget(c17760003.filter3,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c17760003.filter3,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c17760003.operation3(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Destroy(tc,REASON_EFFECT) - Duel.Draw(tp,1,REASON_EFFECT) - end -end diff --git a/script/c17810268.lua b/script/c17810268.lua deleted file mode 100644 index cf0c875385..0000000000 --- a/script/c17810268.lua +++ /dev/null @@ -1,68 +0,0 @@ ---雲魔物-アシッド・クラウド -function c17810268.initial_effect(c) - --battle indestructable - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e1:SetValue(1) - c:RegisterEffect(e1) - --selfdes - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EFFECT_SELF_DESTROY) - e2:SetCondition(c17810268.sdcon) - c:RegisterEffect(e2) - --counter - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(17810268,0)) - e3:SetCategory(CATEGORY_COUNTER) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e3:SetCode(EVENT_SUMMON_SUCCESS) - e3:SetOperation(c17810268.addc) - c:RegisterEffect(e3) - --destroy - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(17810268,1)) - e4:SetProperty(EFFECT_FLAG_CARD_TARGET) - e4:SetCategory(CATEGORY_DESTROY) - e4:SetType(EFFECT_TYPE_IGNITION) - e4:SetRange(LOCATION_MZONE) - e4:SetCost(c17810268.descost) - e4:SetTarget(c17810268.destg) - e4:SetOperation(c17810268.desop) - c:RegisterEffect(e4) -end -function c17810268.sdcon(e) - return e:GetHandler():IsPosition(POS_FACEUP_DEFENCE) -end -function c17810268.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x18) -end -function c17810268.addc(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - local ct=Duel.GetMatchingGroupCount(c17810268.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - e:GetHandler():AddCounter(0x19,ct) - end -end -function c17810268.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsCanRemoveCounter(tp,0x19,2,REASON_COST) end - e:GetHandler():RemoveCounter(tp,0x19,2,REASON_COST) -end -function c17810268.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable() -end -function c17810268.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and c17810268.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c17810268.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c17810268.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c17810268.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c1781310.lua b/script/c1781310.lua deleted file mode 100644 index 6374ee51df..0000000000 --- a/script/c1781310.lua +++ /dev/null @@ -1,73 +0,0 @@ ---風林火山 -function c1781310.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_HANDES+CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,0x1e0+TIMING_TOHAND) - e1:SetCondition(c1781310.condition) - e1:SetTarget(c1781310.target) - e1:SetOperation(c1781310.activate) - c:RegisterEffect(e1) -end -function c1781310.cfilter(c,att) - return c:IsFaceup() and c:IsAttribute(att) -end -function c1781310.dfilter1(c) - return c:IsDestructable() -end -function c1781310.dfilter2(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable() -end -function c1781310.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c1781310.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,ATTRIBUTE_WIND) - and Duel.IsExistingMatchingCard(c1781310.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,ATTRIBUTE_WATER) - and Duel.IsExistingMatchingCard(c1781310.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,ATTRIBUTE_FIRE) - and Duel.IsExistingMatchingCard(c1781310.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,ATTRIBUTE_EARTH) -end -function c1781310.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c1781310.dfilter1,tp,0,LOCATION_MZONE,1,nil) - or Duel.IsExistingMatchingCard(c1781310.dfilter2,tp,0,LOCATION_ONFIELD,1,nil) - or Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>=2 - or Duel.IsPlayerCanDraw(tp,2) end -end -function c1781310.activate(e,tp,eg,ep,ev,re,r,rp) - local off=1 - local ops={} - local opval={} - if Duel.IsExistingMatchingCard(c1781310.dfilter1,tp,0,LOCATION_MZONE,1,nil) then - ops[off]=aux.Stringid(1781310,0) - opval[off-1]=1 - off=off+1 - end - if Duel.IsExistingMatchingCard(c1781310.dfilter2,tp,0,LOCATION_ONFIELD,1,nil) then - ops[off]=aux.Stringid(1781310,1) - opval[off-1]=2 - off=off+1 - end - if Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>=2 then - ops[off]=aux.Stringid(1781310,2) - opval[off-1]=3 - off=off+1 - end - if Duel.IsPlayerCanDraw(tp,2) then - ops[off]=aux.Stringid(1781310,3) - opval[off-1]=4 - off=off+1 - end - if off==1 then return end - local op=Duel.SelectOption(tp,table.unpack(ops)) - if opval[op]==1 then - local g=Duel.GetMatchingGroup(c1781310.dfilter1,tp,0,LOCATION_MZONE,nil) - Duel.Destroy(g,REASON_EFFECT) - elseif opval[op]==2 then - local g=Duel.GetMatchingGroup(c1781310.dfilter2,tp,0,LOCATION_ONFIELD,nil) - Duel.Destroy(g,REASON_EFFECT) - elseif opval[op]==3 then - local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND):RandomSelect(1-tp,2) - Duel.SendtoGrave(g,REASON_EFFECT+REASON_DISCARD) - elseif opval[op]==4 then - Duel.Draw(tp,2,REASON_EFFECT) - end -end diff --git a/script/c17814387.lua b/script/c17814387.lua deleted file mode 100644 index 5f1c88b588..0000000000 --- a/script/c17814387.lua +++ /dev/null @@ -1,34 +0,0 @@ ---援軍 -function c17814387.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetCondition(c17814387.condition) - e1:SetTarget(c17814387.target) - e1:SetOperation(c17814387.activate) - c:RegisterEffect(e1) -end -function c17814387.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end -function c17814387.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:GetLocation()==LOCATION_MZONE and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) -end -function c17814387.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - e1:SetValue(500) - tc:RegisterEffect(e1) - end -end diff --git a/script/c17841097.lua b/script/c17841097.lua deleted file mode 100644 index e0b757b1d2..0000000000 --- a/script/c17841097.lua +++ /dev/null @@ -1,21 +0,0 @@ ---ニードル・ガンナー -function c17841097.initial_effect(c) - --pierce - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_BE_MATERIAL) - e1:SetCondition(c17841097.pscon) - e1:SetOperation(c17841097.psop) - c:RegisterEffect(e1) -end -function c17841097.pscon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsLocation(LOCATION_GRAVE) and r==REASON_SYNCHRO -end -function c17841097.psop(e,tp,eg,ep,ev,re,r,rp) - local rc=e:GetHandler():GetReasonCard() - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_PIERCE) - e1:SetReset(RESET_EVENT+0x1fe0000) - rc:RegisterEffect(e1) -end diff --git a/script/c1784686.lua b/script/c1784686.lua deleted file mode 100644 index 92be87d364..0000000000 --- a/script/c1784686.lua +++ /dev/null @@ -1,60 +0,0 @@ ---ティマイオスの眼 -function c1784686.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,1784686+EFFECT_COUNT_CODE_OATH) - e1:SetTarget(c1784686.target) - e1:SetOperation(c1784686.activate) - c:RegisterEffect(e1) - --add code - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e2:SetCode(EFFECT_ADD_CODE) - e2:SetValue(10000050) - c:RegisterEffect(e2) -end -function c1784686.tgfilter0(c,e,tp) - return c:IsFaceup() and c:IsSetCard(0xa2) - and c:IsCanBeFusionMaterial() and Duel.IsExistingMatchingCard(c1784686.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c:GetCode()) -end -function c1784686.tgfilter(c,e,tp) - return c:IsFaceup() and c:IsSetCard(0xa2) - and c:IsCanBeFusionMaterial() and not c:IsImmuneToEffect(e) - and Duel.IsExistingMatchingCard(c1784686.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c:GetCode()) -end -function c1784686.spfilter(c,e,tp,code) - if not c.material_count or not c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) then return false end - for i=1,c.material_count do - if code==c.material[i] then return true end - end - return false -end -function c1784686.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc==0 then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c1784686.tgfilter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsExistingTarget(c1784686.tgfilter0,tp,LOCATION_MZONE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - Duel.SelectTarget(tp,c1784686.tgfilter,tp,LOCATION_MZONE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function c1784686.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<0 then return end - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsCanBeFusionMaterial() and not tc:IsImmuneToEffect(e) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=Duel.SelectMatchingCard(tp,c1784686.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc:GetCode()) - local sc=sg:GetFirst() - if sc then - sc:SetMaterial(Group.FromCards(tc)) - Duel.SendtoGrave(tc,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION) - Duel.BreakEffect() - Duel.SpecialSummon(sc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP) - sc:CompleteProcedure() - end - end -end diff --git a/script/c17857780.lua b/script/c17857780.lua deleted file mode 100644 index b228a2e2a7..0000000000 --- a/script/c17857780.lua +++ /dev/null @@ -1,60 +0,0 @@ ---EMチアモール -function c17857780.initial_effect(c) - --pendulum summon - aux.AddPendulumProcedure(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --atk - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetRange(LOCATION_PZONE) - e2:SetTargetRange(LOCATION_MZONE,0) - e2:SetTarget(c17857780.atktg) - e2:SetValue(300) - c:RegisterEffect(e2) - --atk - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(17857780,0)) - e3:SetCategory(CATEGORY_ATKCHANGE) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1,17857780) - e3:SetTarget(c17857780.target) - e3:SetOperation(c17857780.operation) - c:RegisterEffect(e3) -end -function c17857780.atktg(e,c) - return c:IsType(TYPE_PENDULUM) -end -function c17857780.filter(c) - return c:IsFaceup() and c:GetAttack()~=c:GetBaseAttack() -end -function c17857780.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c17857780.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c17857780.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c17857780.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) -end -function c17857780.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - local atk=tc:GetAttack() - local batk=tc:GetBaseAttack() - if atk==batk then return end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - if atk>batk then - e1:SetValue(1000) - else - e1:SetValue(-1000) - end - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - end -end diff --git a/script/c17874674.lua b/script/c17874674.lua deleted file mode 100644 index 51a047b0dd..0000000000 --- a/script/c17874674.lua +++ /dev/null @@ -1,105 +0,0 @@ ---破邪の刻印 -function c17874674.initial_effect(c) - --activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_DRAW_PHASE) - e1:SetTarget(c17874674.target1) - e1:SetOperation(c17874674.operation) - c:RegisterEffect(e1) - --confirm - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(17874674,0)) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) - e2:SetRange(LOCATION_SZONE) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCondition(c17874674.condition) - e2:SetTarget(c17874674.target2) - e2:SetOperation(c17874674.operation) - c:RegisterEffect(e2) - --cancel target - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e3:SetCode(EVENT_TURN_END) - e3:SetRange(LOCATION_SZONE) - e3:SetCountLimit(1) - e3:SetCondition(c17874674.condition) - e3:SetOperation(c17874674.ctarget) - c:RegisterEffect(e3) - -- - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e4:SetRange(LOCATION_SZONE) - e4:SetCode(EVENT_PHASE+PHASE_STANDBY) - e4:SetCountLimit(1) - e4:SetCondition(c17874674.costcon) - e4:SetOperation(c17874674.costop) - c:RegisterEffect(e4) -end -function c17874674.target1(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and aux.disfilter1(chkc) end - if chk==0 then return true end - if Duel.GetTurnPlayer()~=tp and Duel.GetCurrentPhase()==PHASE_STANDBY - and Duel.IsExistingTarget(aux.disfilter1,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) - and Duel.SelectYesNo(tp,aux.Stringid(17874674,2)) then - e:SetProperty(EFFECT_FLAG_CARD_TARGET) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,aux.disfilter1,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - e:GetHandler():RegisterFlagEffect(17874674,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) - else - e:SetProperty(0) - end -end -function c17874674.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp -end -function c17874674.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and aux.disfilter1(chkc) end - if chk==0 then return e:GetHandler():GetFlagEffect(17874674)==0 end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,aux.disfilter1,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - e:GetHandler():RegisterFlagEffect(17874674,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) -end -function c17874674.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:GetFlagEffect(17874674)==0 or not c:IsRelateToEffect(e) then return end - local tc=Duel.GetFirstTarget() - if tc and ((tc:IsFaceup() and not tc:IsDisabled()) or tc:IsType(TYPE_TRAPMONSTER)) and tc:IsRelateToEffect(e) then - c:SetCardTarget(tc) - e:SetLabelObject(tc) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_OWNER_RELATE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e1:SetCondition(c17874674.rcon) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_OWNER_RELATE) - e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e2:SetCondition(c17874674.rcon) - tc:RegisterEffect(e2) - end -end -function c17874674.rcon(e) - return e:GetOwner():IsHasCardTarget(e:GetHandler()) -end -function c17874674.ctarget(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetHandler():GetFirstCardTarget() - if tc then e:GetHandler():CancelCardTarget(tc) end -end -function c17874674.costcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c17874674.costop(e,tp,eg,ep,ev,re,r,rp) - if Duel.CheckLPCost(tp,500) and Duel.SelectYesNo(tp,aux.Stringid(17874674,1)) then - Duel.PayLPCost(tp,500) - else - Duel.Destroy(e:GetHandler(),REASON_RULE) - end -end diff --git a/script/c17881964.lua b/script/c17881964.lua deleted file mode 100644 index e092de7d75..0000000000 --- a/script/c17881964.lua +++ /dev/null @@ -1,6 +0,0 @@ ---暗黒火炎龍 -function c17881964.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcCode2(c,53293545,75356564,true,true) -end diff --git a/script/c17896384.lua b/script/c17896384.lua deleted file mode 100644 index 08f3a1db3f..0000000000 --- a/script/c17896384.lua +++ /dev/null @@ -1,60 +0,0 @@ ---魔法族の結界 -function c17896384.initial_effect(c) - c:EnableCounterPermit(0x3001) - c:SetCounterLimit(0x3001,4) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --add counter - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetRange(LOCATION_SZONE) - e2:SetCode(EVENT_DESTROYED) - e2:SetCondition(c17896384.ctcon) - e2:SetOperation(c17896384.ctop) - c:RegisterEffect(e2) - --draw - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(17896384,0)) - e3:SetCategory(CATEGORY_DRAW) - e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_SZONE) - e3:SetCost(c17896384.drcost) - e3:SetTarget(c17896384.drtg) - e3:SetOperation(c17896384.drop) - c:RegisterEffect(e3) -end -function c17896384.ctfilter(c) - return c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP) and bit.band(c:GetPreviousRaceOnField(),RACE_SPELLCASTER)~=0 -end -function c17896384.ctcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c17896384.ctfilter,1,nil) -end -function c17896384.ctop(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():AddCounter(0x3001,1) -end -function c17896384.cfilter(c) - return c:IsFaceup() and c:IsRace(RACE_SPELLCASTER) and c:IsAbleToGraveAsCost() -end -function c17896384.drcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() - and Duel.IsExistingMatchingCard(c17896384.cfilter,tp,LOCATION_MZONE,0,1,nil) end - e:SetLabel(e:GetHandler():GetCounter(0x3001)) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c17896384.cfilter,tp,LOCATION_MZONE,0,1,1,nil) - g:AddCard(e:GetHandler()) - Duel.SendtoGrave(g,REASON_COST) -end -function c17896384.drtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():GetCounter(0x3001)>0 end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(e:GetLabel()) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,e:GetLabel()) -end -function c17896384.drop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end diff --git a/script/c17932494.lua b/script/c17932494.lua deleted file mode 100644 index d895bebdfb..0000000000 --- a/script/c17932494.lua +++ /dev/null @@ -1,27 +0,0 @@ ---ソニック・ウォリアー -function c17932494.initial_effect(c) - --to grave - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(17932494,0)) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetOperation(c17932494.operation) - c:RegisterEffect(e1) -end -function c17932494.filter(c) - return c:IsFaceup() and c:IsLevelBelow(2) -end -function c17932494.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c17932494.filter,tp,LOCATION_MZONE,0,nil) - local tc=g:GetFirst() - while tc do - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(500) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - tc=g:GetNext() - end -end diff --git a/script/c17948378.lua b/script/c17948378.lua deleted file mode 100644 index 22f039301d..0000000000 --- a/script/c17948378.lua +++ /dev/null @@ -1,45 +0,0 @@ ---ジュラック・デイノ -function c17948378.initial_effect(c) - --reg - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_BATTLE_DESTROYING) - e1:SetCondition(aux.bdocon) - e1:SetOperation(c17948378.regop) - c:RegisterEffect(e1) - --draw - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(17948378,0)) - e2:SetCategory(CATEGORY_DRAW) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_FIELD) - e2:SetCode(EVENT_PHASE+PHASE_END) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCondition(c17948378.drcon) - e2:SetCost(c17948378.drcost) - e2:SetTarget(c17948378.drtg) - e2:SetOperation(c17948378.drop) - c:RegisterEffect(e2) -end -function c17948378.regop(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():RegisterFlagEffect(17948378,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) -end -function c17948378.drcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetFlagEffect(17948378)~=0 -end -function c17948378.drcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsSetCard,1,nil,0x22) end - local g=Duel.SelectReleaseGroup(tp,Card.IsSetCard,1,1,nil,0x22) - Duel.Release(g,REASON_COST) -end -function c17948378.drtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp,2) end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(2) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2) -end -function c17948378.drop(e,tp,eg,ep,ev,re,r,rp,chk) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end diff --git a/script/c17955766.lua b/script/c17955766.lua deleted file mode 100644 index 946623ebd6..0000000000 --- a/script/c17955766.lua +++ /dev/null @@ -1,42 +0,0 @@ ---N・アクア・ドルフィン -function c17955766.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(17955766,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCost(c17955766.cost) - e1:SetTarget(c17955766.target) - e1:SetOperation(c17955766.activate) - c:RegisterEffect(e1) -end -function c17955766.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) -end -function c17955766.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0 end -end -function c17955766.filter(c,atk) - return c:IsFaceup() and c:IsAttackAbove(atk) -end -function c17955766.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND) - if g:GetCount()>0 then - Duel.ConfirmCards(tp,g) - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(17955766,1)) - local tg=g:FilterSelect(tp,Card.IsType,1,1,nil,TYPE_MONSTER) - local tc=tg:GetFirst() - if tc then - local atk=tc:GetAttack() - if atk>=0 and Duel.IsExistingMatchingCard(c17955766.filter,tp,LOCATION_MZONE,0,1,nil,atk) then - Duel.Destroy(tc,REASON_EFFECT) - Duel.Damage(1-tp,500,REASON_EFFECT) - else - Duel.Damage(tp,500,REASON_EFFECT) - end - end - Duel.ShuffleHand(1-tp) - end -end diff --git a/script/c17979378.lua b/script/c17979378.lua deleted file mode 100644 index b95c300172..0000000000 --- a/script/c17979378.lua +++ /dev/null @@ -1,83 +0,0 @@ ---DDプラウド・シュバリエ -function c17979378.initial_effect(c) - --pendulum summon - aux.AddPendulumProcedure(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --atk - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(17979378,0)) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_PZONE) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCountLimit(1) - e2:SetCost(c17979378.atkcost) - e2:SetTarget(c17979378.atktg) - e2:SetOperation(c17979378.atkop) - c:RegisterEffect(e2) - --scale - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e3:SetCode(EFFECT_CHANGE_LSCALE) - e3:SetRange(LOCATION_PZONE) - e3:SetCondition(c17979378.sccon) - e3:SetValue(5) - c:RegisterEffect(e3) - local e4=e3:Clone() - e4:SetCode(EFFECT_CHANGE_RSCALE) - c:RegisterEffect(e4) - --to hand - local e5=Effect.CreateEffect(c) - e5:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e5:SetCode(EVENT_SUMMON_SUCCESS) - e5:SetTarget(c17979378.thtg) - e5:SetOperation(c17979378.thop) - c:RegisterEffect(e5) -end -function c17979378.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,500) end - Duel.PayLPCost(tp,500) -end -function c17979378.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil) -end -function c17979378.atkop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(-500) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - end -end -function c17979378.sccon(e) - local seq=e:GetHandler():GetSequence() - local tc=Duel.GetFieldCard(e:GetHandlerPlayer(),LOCATION_SZONE,13-seq) - return not tc or not tc:IsSetCard(0xaf) -end -function c17979378.filter(c) - return c:IsFaceup() and c:IsType(TYPE_PENDULUM) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsAbleToHand() -end -function c17979378.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c17979378.filter,tp,LOCATION_EXTRA,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_EXTRA) -end -function c17979378.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c17979378.filter,tp,LOCATION_EXTRA,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c17985575.lua b/script/c17985575.lua deleted file mode 100644 index 399c62db61..0000000000 --- a/script/c17985575.lua +++ /dev/null @@ -1,15 +0,0 @@ ---ロード・オブ・ドラゴン-ドラゴンの支配者- -function c17985575.initial_effect(c) - --cannot be target - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e1:SetTarget(c17985575.etarget) - e1:SetValue(aux.tgval) - c:RegisterEffect(e1) -end -function c17985575.etarget(e,c) - return c:IsRace(RACE_DRAGON) -end diff --git a/script/c1801154.lua b/script/c1801154.lua deleted file mode 100644 index 835a687515..0000000000 --- a/script/c1801154.lua +++ /dev/null @@ -1,44 +0,0 @@ ---遠心分離フィールド -function c1801154.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(1801154,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetRange(LOCATION_SZONE) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetTarget(c1801154.sptg) - e2:SetOperation(c1801154.spop) - c:RegisterEffect(e2) -end -function c1801154.filter2(c,code) - if not c.material_count or not c:IsReason(REASON_DESTROY) or not c:IsReason(REASON_EFFECT) then return false end - for i=1,c.material_count do - if code==c.material[i] then return true end - end - return false -end -function c1801154.filter1(c,e,tp,eg) - if not c:IsCanBeSpecialSummoned(e,0,tp,false,false) then return false end - return eg:IsExists(c1801154.filter2,1,nil,c:GetCode()) -end -function c1801154.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c1801154.filter1,tp,LOCATION_GRAVE,0,1,nil,e,tp,eg) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c1801154.filter1,tp,LOCATION_GRAVE,0,1,1,nil,e,tp,eg) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c1801154.spop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c18013090.lua b/script/c18013090.lua deleted file mode 100644 index ea411281ca..0000000000 --- a/script/c18013090.lua +++ /dev/null @@ -1,75 +0,0 @@ ---ニトロ・ウォリアー -function c18013090.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,c18013090.tfilter,aux.NonTuner(nil),1) - c:EnableReviveLimit() - --atkup - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_CHAINING) - e1:SetRange(LOCATION_MZONE) - e1:SetOperation(c18013090.atop1) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_DAMAGE_CALCULATING) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCondition(c18013090.atcon2) - e2:SetOperation(c18013090.atop2) - c:RegisterEffect(e2) - --chain attack - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(18013090,0)) - e3:SetCategory(CATEGORY_POSITION) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_BATTLED) - e3:SetCondition(c18013090.cacon) - e3:SetTarget(c18013090.catg) - e3:SetOperation(c18013090.caop) - c:RegisterEffect(e3) -end -function c18013090.tfilter(c) - return c:IsCode(96182448) or c:IsHasEffect(20932152) -end -function c18013090.atop1(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetTurnPlayer()~=tp or ep~=tp then return end - if not re:IsHasType(EFFECT_TYPE_ACTIVATE) or not re:IsActiveType(TYPE_SPELL) then return end - e:GetHandler():RegisterFlagEffect(18013090,RESET_EVENT+0x2fe0000+RESET_PHASE+PHASE_END,0,1) -end -function c18013090.atcon2(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c==Duel.GetAttacker() and c:GetFlagEffect(18013090)~=0 -end -function c18013090.atop2(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_PHASE+RESET_DAMAGE_CAL) - e1:SetValue(1000) - c:RegisterEffect(e1) -end -function c18013090.cacon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local bc=c:GetBattleTarget() - return bc and bc:IsStatus(STATUS_BATTLE_DESTROYED) and c:IsChainAttackable() -end -function c18013090.filter(c) - return c:IsFaceup() and c:IsDefencePos() and not c:IsStatus(STATUS_BATTLE_DESTROYED) -end -function c18013090.catg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and c18013090.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c18013090.filter,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE) - local g=Duel.SelectTarget(tp,c18013090.filter,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0) -end -function c18013090.caop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.ChangePosition(tc,POS_FACEUP_ATTACK) - Duel.ChainAttack(tc) - end -end diff --git a/script/c1802450.lua b/script/c1802450.lua deleted file mode 100644 index 9bbbd02fbd..0000000000 --- a/script/c1802450.lua +++ /dev/null @@ -1,61 +0,0 @@ ---木遁封印式 -function c1802450.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_END_PHASE) - e1:SetTarget(c1802450.target1) - e1:SetOperation(c1802450.operation) - c:RegisterEffect(e1) - --remove - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(1802450,1)) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetRange(LOCATION_SZONE) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetHintTiming(0,TIMING_END_PHASE) - e2:SetCost(c1802450.cost2) - e2:SetTarget(c1802450.target2) - e2:SetOperation(c1802450.operation) - c:RegisterEffect(e2) -end -function c1802450.cfilter(c) - return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_EARTH) -end -function c1802450.target1(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(1-tp) and chkc:IsAbleToRemove() end - if chk==0 then return true end - if Duel.CheckReleaseGroup(tp,c1802450.cfilter,1,nil) - and Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(1802450,0)) then - e:SetProperty(EFFECT_FLAG_CARD_TARGET) - local cg=Duel.SelectReleaseGroup(tp,c1802450.cfilter,1,1,nil) - Duel.Release(cg,REASON_COST) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,2,nil) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,0) - e:GetHandler():RegisterFlagEffect(1802450,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) - else e:SetProperty(0) end -end -function c1802450.cost2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,c1802450.cfilter,1,nil) end - local cg=Duel.SelectReleaseGroup(tp,c1802450.cfilter,1,1,nil) - Duel.Release(cg,REASON_COST) -end -function c1802450.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(1-tp) and chkc:IsAbleToRemove() end - if chk==0 then return e:GetHandler():GetFlagEffect(1802450)==0 - and Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,2,nil) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,0) - e:GetHandler():RegisterFlagEffect(1802450,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) -end -function c1802450.operation(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - if not g then return end - g=g:Filter(Card.IsRelateToEffect,nil,e) - Duel.Remove(g,POS_FACEUP,REASON_EFFECT) -end diff --git a/script/c18027138.lua b/script/c18027138.lua deleted file mode 100644 index a80d32b9aa..0000000000 --- a/script/c18027138.lua +++ /dev/null @@ -1,61 +0,0 @@ ---カバーカーニバル -function c18027138.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_END_PHASE) - e1:SetTarget(c18027138.target) - e1:SetOperation(c18027138.activate) - c:RegisterEffect(e1) -end -function c18027138.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>2 - and Duel.IsPlayerCanSpecialSummonMonster(tp,18027139,0,0x4011,0,0,1,RACE_BEAST,ATTRIBUTE_EARTH) end - Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,3,0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,3,0,0) -end -function c18027138.activate(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if Duel.GetLocationCount(tp,LOCATION_MZONE)>2 - and Duel.IsPlayerCanSpecialSummonMonster(tp,18027139,0,0x4011,0,0,1,RACE_BEAST,ATTRIBUTE_EARTH) then - for i=1,3 do - local token=Duel.CreateToken(tp,18027139) - Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UNRELEASABLE_SUM) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetValue(1) - e1:SetReset(RESET_EVENT+0x1fe0000) - token:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_UNRELEASABLE_NONSUM) - token:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e3:SetRange(LOCATION_MZONE) - e3:SetAbsoluteRange(tp,1,0) - e3:SetTarget(c18027138.splimit) - e3:SetReset(RESET_EVENT+0x1fe0000) - token:RegisterEffect(e3) - end - Duel.SpecialSummonComplete() - end - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET) - e1:SetTargetRange(0,LOCATION_MZONE) - e1:SetValue(c18027138.atlimit) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function c18027138.splimit(e,c) - return c:IsLocation(LOCATION_EXTRA) -end -function c18027138.atlimit(e,c) - return not c:IsCode(18027139) -end diff --git a/script/c18036057.lua b/script/c18036057.lua deleted file mode 100644 index 76b6931661..0000000000 --- a/script/c18036057.lua +++ /dev/null @@ -1,32 +0,0 @@ ---天空騎士パーシアス -function c18036057.initial_effect(c) - --draw - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(18036057,0)) - e1:SetCategory(CATEGORY_DRAW) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_BATTLE_DAMAGE) - e1:SetCondition(c18036057.condition) - e1:SetTarget(c18036057.target) - e1:SetOperation(c18036057.operation) - c:RegisterEffect(e1) - --pierce - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_PIERCE) - c:RegisterEffect(e2) -end -function c18036057.condition(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp -end -function c18036057.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(1) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c18036057.operation(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end diff --git a/script/c1804528.lua b/script/c1804528.lua deleted file mode 100644 index 93abe9bf55..0000000000 --- a/script/c1804528.lua +++ /dev/null @@ -1,37 +0,0 @@ ---呪われた棺 -function c1804528.initial_effect(c) - --Destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(1804528,0)) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_HANDES) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCondition(c1804528.descon) - e1:SetOperation(c1804528.desop) - c:RegisterEffect(e1) -end -function c1804528.descon(e,tp,eg,ep,ev,re,r,rp) - return bit.band(r,REASON_DESTROY)~=0 - and e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) - and e:GetHandler():IsPreviousPosition(POS_FACEDOWN) -end -function c1804528.desop(e,tp,eg,ep,ev,re,r,rp) - local g1=Duel.GetFieldGroup(tp,0,LOCATION_HAND) - local g2=Duel.GetMatchingGroup(Card.IsDestructable,tp,0,LOCATION_MZONE,nil) - local opt=0 - if g1:GetCount()>0 and g2:GetCount()>0 then - opt=Duel.SelectOption(1-tp,aux.Stringid(1804528,1),aux.Stringid(1804528,2)) - elseif g1:GetCount()>0 then - opt=Duel.SelectOption(1-tp,aux.Stringid(1804528,1)) - elseif g2:GetCount()>0 then - opt=Duel.SelectOption(1-tp,aux.Stringid(1804528,2))+1 - else return end - if opt==0 then - local dg=g1:RandomSelect(1-tp,1) - Duel.SendtoGrave(dg,REASON_EFFECT+REASON_DISCARD) - else - Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_DESTROY) - local dg=g2:Select(1-tp,1,1,nil) - Duel.Destroy(dg,REASON_EFFECT) - end -end diff --git a/script/c18060565.lua b/script/c18060565.lua deleted file mode 100644 index f3beeb6419..0000000000 --- a/script/c18060565.lua +++ /dev/null @@ -1,50 +0,0 @@ ---ドラグニティ-プリムス・ピルス -function c18060565.initial_effect(c) - --equip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(18060565,0)) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c18060565.eqtg) - e1:SetOperation(c18060565.eqop) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e2) -end -function c18060565.filter(c) - return c:IsFaceup() and c:IsSetCard(0x29) and c:IsRace(RACE_WINDBEAST) -end -function c18060565.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c18060565.filter(chkc) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingTarget(c18060565.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c18060565.filter,tp,LOCATION_MZONE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_DECK) -end -function c18060565.eqfilter(c) - return c:IsSetCard(0x29) and c:IsRace(RACE_DRAGON) and c:IsLevelBelow(3) -end -function c18060565.eqop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end - local tc=Duel.GetFirstTarget() - if not tc:IsRelateToEffect(e) or tc:IsFacedown() then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local eq=Duel.SelectMatchingCard(tp,c18060565.eqfilter,tp,LOCATION_DECK,0,1,1,nil) - local eqc=eq:GetFirst() - if eqc and Duel.Equip(tp,eqc,tc,true) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(c18060565.eqlimit) - e1:SetLabelObject(tc) - eqc:RegisterEffect(e1) - end -end -function c18060565.eqlimit(e,c) - return c==e:GetLabelObject() -end diff --git a/script/c18063928.lua b/script/c18063928.lua deleted file mode 100644 index 4208afb518..0000000000 --- a/script/c18063928.lua +++ /dev/null @@ -1,28 +0,0 @@ ---ブリキンギョ -function c18063928.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(18063928,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c18063928.sptg) - e1:SetOperation(c18063928.spop) - c:RegisterEffect(e1) -end -function c18063928.filter(c,e,tp) - return c:GetLevel()==4 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c18063928.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c18063928.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c18063928.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c18063928.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c18096222.lua b/script/c18096222.lua deleted file mode 100644 index 72a7db2ddb..0000000000 --- a/script/c18096222.lua +++ /dev/null @@ -1,86 +0,0 @@ ---デュアル・ブースター -function c18096222.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCondition(c18096222.condition) - e1:SetTarget(c18096222.target) - e1:SetOperation(c18096222.operation) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(18096222,0)) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_LEAVE_FIELD) - e2:SetCondition(c18096222.dacon) - e2:SetTarget(c18096222.datg) - e2:SetOperation(c18096222.daop) - c:RegisterEffect(e2) -end -function c18096222.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end -function c18096222.filter(c) - return c:IsFaceup() and c:IsType(TYPE_DUAL) -end -function c18096222.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c18096222.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c18096222.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c18096222.filter,tp,LOCATION_MZONE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c18096222.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsLocation(LOCATION_SZONE) then return end - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,c,tc) - c:CancelToGrave() - --Atkup - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_EQUIP) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(700) - e1:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e1) - --Equip limit - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_EQUIP_LIMIT) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetValue(c18096222.eqlimit) - e2:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e2) - end -end -function c18096222.eqlimit(e,c) - return c:GetControler()==e:GetOwnerPlayer() and c:IsType(TYPE_DUAL) -end -function c18096222.dacon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local ec=c:GetEquipTarget() - if c:IsReason(REASON_LOST_TARGET) then - ec=c:GetPreviousEquipTarget() - end - return c:IsLocation(LOCATION_GRAVE) and c:IsReason(REASON_DESTROY) and ec~=nil -end -function c18096222.dafilter(c) - return c:IsFaceup() and c:IsType(TYPE_DUAL) and not c:IsDualState() -end -function c18096222.datg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c18096222.dafilter(chkc) end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c18096222.dafilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) -end -function c18096222.daop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) and c18096222.dafilter(tc) then - tc:EnableDualState() - end -end diff --git a/script/c18114794.lua b/script/c18114794.lua deleted file mode 100644 index 7b3c82b639..0000000000 --- a/script/c18114794.lua +++ /dev/null @@ -1,73 +0,0 @@ ---サモンブレーカー -function c18114794.initial_effect(c) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - -- - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(18114794,0)) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetRange(LOCATION_SZONE) - e2:SetCode(18114794) - e2:SetCondition(c18114794.condition) - e2:SetOperation(c18114794.operation) - c:RegisterEffect(e2) - if not c18114794.global_check then - c18114794.global_check=true - c18114794[0]=0 - c18114794[1]=0 - local ge1=Effect.CreateEffect(c) - ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - ge1:SetCode(EVENT_SUMMON_SUCCESS) - ge1:SetOperation(c18114794.checkop) - Duel.RegisterEffect(ge1,0) - local ge2=Effect.CreateEffect(c) - ge2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - ge2:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - ge2:SetOperation(c18114794.checkop) - Duel.RegisterEffect(ge2,0) - local ge3=Effect.CreateEffect(c) - ge3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - ge3:SetCode(EVENT_SPSUMMON_SUCCESS) - ge3:SetOperation(c18114794.checkop) - Duel.RegisterEffect(ge3,0) - end -end -function c18114794.checkop(e,tp,eg,ep,ev,re,r,rp) - local turnp=Duel.GetTurnPlayer() - if Duel.GetTurnCount()~=c18114794[2] then - c18114794[0]=0 - c18114794[1]=0 - c18114794[2]=Duel.GetTurnCount() - end - local tc=eg:GetFirst() - local p1=false - while tc do - if tc:GetSummonPlayer()==turnp then p1=true end - tc=eg:GetNext() - end - if p1 then - c18114794[turnp]=c18114794[turnp]+1 - if c18114794[turnp]==3 then - Duel.RaiseEvent(e:GetHandler(),18114794,e,0,0,0,0) - end - end -end -function c18114794.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()==PHASE_MAIN1 -end -function c18114794.operation(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local turnp=Duel.GetTurnPlayer() - Duel.SkipPhase(turnp,PHASE_MAIN1,RESET_PHASE+PHASE_END,1) - Duel.SkipPhase(turnp,PHASE_BATTLE,RESET_PHASE+PHASE_END,1,1) - Duel.SkipPhase(turnp,PHASE_MAIN2,RESET_PHASE+PHASE_END,1) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_BP) - e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,turnp) -end diff --git a/script/c18144506.lua b/script/c18144506.lua deleted file mode 100644 index cda847f66a..0000000000 --- a/script/c18144506.lua +++ /dev/null @@ -1,24 +0,0 @@ ---ハーピィの羽根帚 -function c18144506.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c18144506.target) - e1:SetOperation(c18144506.activate) - c:RegisterEffect(e1) -end -function c18144506.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable() -end -function c18144506.target(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return Duel.IsExistingMatchingCard(c18144506.filter,tp,0,LOCATION_ONFIELD,1,c) end - local sg=Duel.GetMatchingGroup(c18144506.filter,tp,0,LOCATION_ONFIELD,c) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,sg:GetCount(),0,0) -end -function c18144506.activate(e,tp,eg,ep,ev,re,r,rp) - local sg=Duel.GetMatchingGroup(c18144506.filter,tp,0,LOCATION_ONFIELD,e:GetHandler()) - Duel.Destroy(sg,REASON_EFFECT) -end diff --git a/script/c18158397.lua b/script/c18158397.lua deleted file mode 100644 index d990c0d178..0000000000 --- a/script/c18158397.lua +++ /dev/null @@ -1,36 +0,0 @@ ---ナチュラル・ディザスター -function c18158397.initial_effect(c) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --damage - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(18158397,0)) - e2:SetCategory(CATEGORY_DAMAGE) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetRange(LOCATION_SZONE) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetCondition(c18158397.condition) - e2:SetTarget(c18158397.target) - e2:SetOperation(c18158397.operation) - c:RegisterEffect(e2) -end -function c18158397.cfilter(c,tp) - return c:IsControler(tp) and c:GetPreviousControler()==tp -end -function c18158397.condition(e,tp,eg,ep,ev,re,r,rp) - return bit.band(r,0x41)==0x41 and re and re:GetHandler():IsSetCard(0x18) - and eg:IsExists(c18158397.cfilter,1,nil,1-tp) -end -function c18158397.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsRelateToEffect(e) end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(500) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,500) -end -function c18158397.operation(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c18161786.lua b/script/c18161786.lua deleted file mode 100644 index 82feda74d9..0000000000 --- a/script/c18161786.lua +++ /dev/null @@ -1,29 +0,0 @@ ---ダークゾーン -function c18161786.initial_effect(c) - --activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --Atk up - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetTarget(c18161786.filter) - e2:SetValue(500) - c:RegisterEffect(e2) - --Def down - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetRange(LOCATION_SZONE) - e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e3:SetCode(EFFECT_UPDATE_DEFENCE) - e3:SetTarget(c18161786.filter) - e3:SetValue(-400) - c:RegisterEffect(e3) -end -function c18161786.filter(e,c) - return c:IsAttribute(ATTRIBUTE_DARK) -end diff --git a/script/c18175965.lua b/script/c18175965.lua deleted file mode 100644 index 728befcdf9..0000000000 --- a/script/c18175965.lua +++ /dev/null @@ -1,111 +0,0 @@ ---ガーディアン・デスサイス -function c18175965.initial_effect(c) - c:EnableReviveLimit() - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - c:RegisterEffect(e1) - --summon limit - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_CANNOT_SUMMON) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EFFECT_CANNOT_MSET) - c:RegisterEffect(e3) - --special summon - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(18175965,0)) - e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e4:SetCategory(CATEGORY_SPECIAL_SUMMON) - e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e4:SetCode(EVENT_TO_GRAVE) - e4:SetRange(LOCATION_HAND) - e4:SetCondition(c18175965.spcon) - e4:SetTarget(c18175965.sptg) - e4:SetOperation(c18175965.spop) - c:RegisterEffect(e4) - --equip - local e5=Effect.CreateEffect(c) - e5:SetDescription(aux.Stringid(18175965,1)) - e5:SetCategory(CATEGORY_EQUIP) - e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e5:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e5:SetCode(EVENT_SPSUMMON_SUCCESS) - e5:SetTarget(c18175965.eqtg) - e5:SetOperation(c18175965.eqop) - c:RegisterEffect(e5) - --disable summon - local e6=Effect.CreateEffect(c) - e6:SetType(EFFECT_TYPE_FIELD) - e6:SetRange(LOCATION_MZONE) - e6:SetCode(EFFECT_CANNOT_SUMMON) - e6:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e6:SetTargetRange(1,0) - c:RegisterEffect(e6) - local e7=e6:Clone() - e7:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - c:RegisterEffect(e7) - --special summon 2 - local e8=Effect.CreateEffect(c) - e8:SetDescription(aux.Stringid(18175965,2)) - e8:SetCategory(CATEGORY_SPECIAL_SUMMON) - e8:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e8:SetCode(EVENT_TO_GRAVE) - e8:SetCondition(c18175965.spcon2) - e8:SetTarget(c18175965.sptg2) - e8:SetOperation(c18175965.spop2) - c:RegisterEffect(e8) -end -function c18175965.cfilter(c,tp) - return c:IsFaceup() and c:IsControler(tp) and c:GetPreviousControler()==tp - and c:IsReason(REASON_DESTROY) and c:IsCode(34022290) -end -function c18175965.spcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c18175965.cfilter,1,nil,tp) -end -function c18175965.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c18175965.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP)>0 then - c:CompleteProcedure() - end -end -function c18175965.filter(c,ec) - return c:IsCode(81954378) and c:CheckEquipTarget(ec) -end -function c18175965.eqtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingMatchingCard(c18175965.filter,tp,LOCATION_DECK,0,1,nil,e:GetHandler()) end - Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_DECK) -end -function c18175965.eqop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or c:IsFacedown() or not c:IsRelateToEffect(e) then return end - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(18175965,3)) - local g=Duel.SelectMatchingCard(tp,c18175965.filter,tp,LOCATION_DECK,0,1,1,nil,c) - if g:GetCount()>0 then - Duel.Equip(tp,g:GetFirst(),c) - end -end -function c18175965.spcon2(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) -end -function c18175965.sptg2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsStatus(STATUS_PROC_COMPLETE) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) - Duel.SetOperationInfo(0,CATEGORY_HANDES,0,0,tp,1) -end -function c18175965.spop2(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT)==0 then return end - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,true,true,POS_FACEUP) - end -end diff --git a/script/c18190572.lua b/script/c18190572.lua deleted file mode 100644 index b1e721ff76..0000000000 --- a/script/c18190572.lua +++ /dev/null @@ -1,34 +0,0 @@ ---ミクロ光線 -function c18190572.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DEFCHANGE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c18190572.condition) - e1:SetTarget(c18190572.target) - e1:SetOperation(c18190572.activate) - c:RegisterEffect(e1) -end -function c18190572.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end -function c18190572.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) -end -function c18190572.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_DEFENCE_FINAL) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e1:SetValue(0) - tc:RegisterEffect(e1) - end -end diff --git a/script/c18205590.lua b/script/c18205590.lua deleted file mode 100644 index a30f8ef81a..0000000000 --- a/script/c18205590.lua +++ /dev/null @@ -1,53 +0,0 @@ ---天架ける星因士 -function c18205590.initial_effect(c) - -- - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TODECK) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCountLimit(1,18205590+EFFECT_COUNT_CODE_OATH) - e1:SetTarget(c18205590.target) - e1:SetOperation(c18205590.operation) - c:RegisterEffect(e1) -end -function c18205590.filter(c,e,tp) - return c:IsFaceup() and c:IsSetCard(0x9c) and c:IsAbleToDeck() - and Duel.IsExistingMatchingCard(c18205590.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp,c:GetCode()) -end -function c18205590.spfilter(c,e,tp,code) - return c:IsSetCard(0x9c) and not c:IsCode(code) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c18205590.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c18205590.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c18205590.filter,tp,LOCATION_MZONE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectTarget(tp,c18205590.filter,tp,LOCATION_MZONE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c18205590.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local tc=Duel.GetFirstTarget() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c18205590.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,tc:GetCode()) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.SendtoDeck(tc,nil,2,REASON_EFFECT) - end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetAbsoluteRange(tp,1,0) - e1:SetTarget(c18205590.splimit) - e1:SetReset(RESET_EVENT+0x1fe0000) - g:GetFirst():RegisterEffect(e1,true) - end -end -function c18205590.splimit(e,c) - return not c:IsSetCard(0x9c) -end diff --git a/script/c18235309.lua b/script/c18235309.lua deleted file mode 100644 index 58e71a0ecf..0000000000 --- a/script/c18235309.lua +++ /dev/null @@ -1,72 +0,0 @@ ---連撃の帝王 -function c18235309.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c18235309.cost1) - e1:SetTarget(c18235309.target1) - e1:SetOperation(c18235309.activate) - c:RegisterEffect(e1) - --instant - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(18235309,0)) - e3:SetCategory(CATEGORY_SUMMON) - e3:SetType(EFFECT_TYPE_QUICK_O) - e3:SetRange(LOCATION_SZONE) - e3:SetCode(EVENT_FREE_CHAIN) - e3:SetCountLimit(1) - e3:SetCondition(c18235309.condition2) - e3:SetTarget(c18235309.target2) - e3:SetOperation(c18235309.activate) - e3:SetLabel(1) - c:RegisterEffect(e3) -end -function c18235309.filter(c) - return c:IsSummonable(true,nil,1) or c:IsMSetable(true,nil,1) -end -function c18235309.cost1(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - e:SetLabel(0) - local tn=Duel.GetTurnPlayer() - local ph=Duel.GetCurrentPhase() - if (tn~=tp and (ph==PHASE_MAIN1 or ph==PHASE_MAIN2 or ph==PHASE_BATTLE)) - and Duel.IsExistingMatchingCard(c18235309.filter,tp,LOCATION_HAND,0,1,nil) - and Duel.SelectYesNo(tp,94) then - e:SetLabel(1) - end -end -function c18235309.target1(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - if e:GetLabel()~=1 then return end - e:GetHandler():RegisterFlagEffect(18235309,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) - e:GetHandler():RegisterFlagEffect(0,RESET_CHAIN,EFFECT_FLAG_CLIENT_HINT,1,0,65) - Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,0,0) -end -function c18235309.activate(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - if e:GetLabel()~=1 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON) - local g=Duel.SelectMatchingCard(tp,c18235309.filter,tp,LOCATION_HAND,0,1,1,nil) - local tc=g:GetFirst() - if tc then - local s1=tc:IsSummonable(true,nil,1) - local s2=tc:IsMSetable(true,nil,1) - if (s1 and s2 and Duel.SelectPosition(tp,tc,POS_FACEUP_ATTACK+POS_FACEDOWN_DEFENCE)==POS_FACEUP_ATTACK) or not s2 then - Duel.Summon(tp,tc,true,nil,1) - else - Duel.MSet(tp,tc,true,nil,1) - end - end -end -function c18235309.condition2(e,tp,eg,ep,ev,re,r,rp) - local tn=Duel.GetTurnPlayer() - local ph=Duel.GetCurrentPhase() - return tn~=tp and (ph==PHASE_MAIN1 or ph==PHASE_MAIN2 or ph==PHASE_BATTLE) -end -function c18235309.target2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():GetFlagEffect(18235309)==0 - and Duel.IsExistingMatchingCard(c18235309.filter,tp,LOCATION_HAND,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,0,0) -end diff --git a/script/c18235577.lua b/script/c18235577.lua deleted file mode 100644 index e471cff868..0000000000 --- a/script/c18235577.lua +++ /dev/null @@ -1,37 +0,0 @@ ---寂々虫 -function c18235577.initial_effect(c) - --lvup - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(18235577,0)) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND) - e1:SetCost(c18235577.lvcost) - e1:SetTarget(c18235577.lvtg) - e1:SetOperation(c18235577.lvop) - c:RegisterEffect(e1) -end -function c18235577.lvcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end -function c18235577.lvfilter(c) - return c:IsFaceup() and not c:IsType(TYPE_XYZ) -end -function c18235577.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c18235577.lvfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c18235577.lvfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c18235577.lvfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) -end -function c18235577.lvop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_LEVEL) - e1:SetValue(-1) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - end -end diff --git a/script/c18239909.lua b/script/c18239909.lua deleted file mode 100644 index 4f3c9f6380..0000000000 --- a/script/c18239909.lua +++ /dev/null @@ -1,80 +0,0 @@ ---爆竜剣士イグニスターP -function c18239909.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,nil,aux.NonTuner(Card.IsType,TYPE_PENDULUM),1) - c:EnableReviveLimit() - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(18239909,0)) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_TODECK) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCountLimit(1) - e1:SetTarget(c18239909.destg) - e1:SetOperation(c18239909.desop) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(18239909,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetTarget(c18239909.sptg) - e2:SetOperation(c18239909.spop) - c:RegisterEffect(e2) -end -function c18239909.tgfilter(c) - if c:IsLocation(LOCATION_MZONE) then - return c:IsFaceup() and c:IsType(TYPE_PENDULUM) - else - return c:GetSequence()==6 or c:GetSequence()==7 - end -end -function c18239909.desfilter(c) - return c18239909.tgfilter(c) and c:IsDestructable() - and Duel.IsExistingMatchingCard(Card.IsAbleToDeck,0,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c) -end -function c18239909.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and c18239909.desfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c18239909.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c18239909.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,0,LOCATION_ONFIELD) -end -function c18239909.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)~=0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - if g:GetCount()>0 then - Duel.HintSelection(g) - Duel.SendtoDeck(g,nil,2,REASON_EFFECT) - end - end -end -function c18239909.spfilter(c,e,tp) - return c:IsSetCard(0xc7) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c18239909.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c18239909.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c18239909.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c18239909.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - local tc=g:GetFirst() - if tc then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENCE) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(1) - tc:RegisterEffect(e1) - end -end diff --git a/script/c18252559.lua b/script/c18252559.lua deleted file mode 100644 index dfdf7785cc..0000000000 --- a/script/c18252559.lua +++ /dev/null @@ -1,48 +0,0 @@ ---仕込み爆弾 -function c18252559.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c18252559.target) - e1:SetOperation(c18252559.activate) - c:RegisterEffect(e1) - --damage - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_DAMAGE) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetCondition(c18252559.damcon) - e2:SetTarget(c18252559.damtg) - e2:SetOperation(c18252559.damop) - c:RegisterEffect(e2) -end -function c18252559.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetFieldGroupCount(1-tp,LOCATION_ONFIELD,0)>0 end - Duel.SetTargetPlayer(1-tp) - local dam=Duel.GetFieldGroupCount(1-tp,LOCATION_ONFIELD,0)*300 - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,dam) -end -function c18252559.activate(e,tp,eg,ep,ev,re,r,rp) - local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) - local dam=Duel.GetFieldGroupCount(1-tp,LOCATION_ONFIELD,0)*300 - Duel.Damage(p,dam,REASON_EFFECT) -end -function c18252559.damcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return rp~=tp and c:IsReason(REASON_DESTROY) - and c:IsPreviousLocation(LOCATION_ONFIELD) and c:GetPreviousControler()==tp -end -function c18252559.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(1000) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,1000) -end -function c18252559.damop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c1826676.lua b/script/c1826676.lua deleted file mode 100644 index 51fe0e2a75..0000000000 --- a/script/c1826676.lua +++ /dev/null @@ -1,53 +0,0 @@ ---トイナイト -function c1826676.initial_effect(c) - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_DECK) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_SPSUMMON_PROC) - e2:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e2:SetRange(LOCATION_HAND) - e2:SetCondition(c1826676.spcon) - c:RegisterEffect(e2) - --spsummon - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(1826676,0)) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e3:SetCode(EVENT_SUMMON_SUCCESS) - e3:SetTarget(c1826676.sptg) - e3:SetOperation(c1826676.spop) - c:RegisterEffect(e3) - local e4=e3:Clone() - e4:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e4) -end -function c1826676.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)0 - and Duel.IsExistingMatchingCard(c1826676.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c1826676.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c1826676.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c18271561.lua b/script/c18271561.lua deleted file mode 100644 index 16bd4701f9..0000000000 --- a/script/c18271561.lua +++ /dev/null @@ -1,41 +0,0 @@ ---ヘル・ブラスト -function c18271561.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e1:SetCondition(c18271561.condition) - e1:SetTarget(c18271561.target) - e1:SetOperation(c18271561.operation) - c:RegisterEffect(e1) -end -function c18271561.filter(c,tp) - return c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP) - and c:GetPreviousControler()==tp and c:IsReason(REASON_DESTROY) -end -function c18271561.condition(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c18271561.filter,1,nil,tp) -end -function c18271561.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - local dg=g:GetMinGroup(Card.GetAttack) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,dg,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,PLAYER_ALL,0) -end -function c18271561.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - if g:GetCount()==0 then return end - local dg=g:GetMinGroup(Card.GetAttack) - if dg:GetCount()>1 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - dg=dg:Select(tp,1,1,nil) - end - local atk=dg:GetFirst():GetAttack()/2 - if Duel.Destroy(dg,REASON_EFFECT)>0 then - Duel.Damage(tp,atk,REASON_EFFECT) - Duel.Damage(1-tp,atk,REASON_EFFECT) - end -end diff --git a/script/c18282103.lua b/script/c18282103.lua deleted file mode 100644 index c2d40c23da..0000000000 --- a/script/c18282103.lua +++ /dev/null @@ -1,39 +0,0 @@ ---魔轟神獣ガナシア -function c18282103.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(18282103,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCondition(c18282103.spcon) - e1:SetTarget(c18282103.sptg) - e1:SetOperation(c18282103.spop) - c:RegisterEffect(e1) -end -function c18282103.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetPreviousLocation()==LOCATION_HAND and bit.band(r,REASON_DISCARD)~=0 -end -function c18282103.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c18282103.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(200) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetReset(RESET_EVENT+0x47e0000) - e2:SetValue(LOCATION_REMOVED) - c:RegisterEffect(e2,true) - end -end diff --git a/script/c1828513.lua b/script/c1828513.lua deleted file mode 100644 index f096e82577..0000000000 --- a/script/c1828513.lua +++ /dev/null @@ -1,45 +0,0 @@ ---六武衆の影-紫炎 -function c1828513.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0x3d),4,2) - c:EnableReviveLimit() - --attack up - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetDescription(aux.Stringid(1828513,0)) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetCost(c1828513.cost) - e1:SetTarget(c1828513.target) - e1:SetOperation(c1828513.operation) - c:RegisterEffect(e1) -end -function c1828513.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c1828513.filter(c) - return c:IsFaceup() and c:IsSetCard(0x3d) and c:IsAttackBelow(2000) -end -function c1828513.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c1828513.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c1828513.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c1828513.filter,tp,LOCATION_MZONE,0,1,1,nil) -end -function c1828513.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and c1828513.filter(tc) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_SET_BASE_ATTACK) - e1:SetValue(2000) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - end -end diff --git a/script/c18302224.lua b/script/c18302224.lua deleted file mode 100644 index 926201a6b8..0000000000 --- a/script/c18302224.lua +++ /dev/null @@ -1,54 +0,0 @@ ---リバース・オブ・ネオス -function c18302224.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_DESTROYED) - e1:SetCondition(c18302224.condition) - e1:SetTarget(c18302224.target) - e1:SetOperation(c18302224.activate) - c:RegisterEffect(e1) -end -function c18302224.cfilter(c,tp) - return c:IsPreviousLocation(LOCATION_MZONE) and c:GetPreviousControler()==tp - and c:IsPreviousPosition(POS_FACEUP) and c:IsSetCard(0x9) and c:IsType(TYPE_FUSION) -end -function c18302224.condition(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c18302224.cfilter,1,nil,tp) -end -function c18302224.filter(c,e,tp) - return c:IsCode(89943723) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c18302224.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c18302224.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c18302224.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c18302224.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - local tc=g:GetFirst() - if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP_ATTACK) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(1000) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EVENT_PHASE+PHASE_END) - e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e2:SetOperation(c18302224.desop) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e2:SetCountLimit(1) - tc:RegisterEffect(e2,true) - Duel.SpecialSummonComplete() - end -end -function c18302224.desop(e,tp,eg,ep,ev,re,r,rp) - Duel.Destroy(e:GetHandler(),REASON_EFFECT) -end diff --git a/script/c18318842.lua b/script/c18318842.lua deleted file mode 100644 index e6101e67b4..0000000000 --- a/script/c18318842.lua +++ /dev/null @@ -1,35 +0,0 @@ ---アビス・ソルジャー -function c18318842.initial_effect(c) - --to hand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(18318842,0)) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCost(c18318842.cost) - e1:SetTarget(c18318842.target) - e1:SetOperation(c18318842.operation) - c:RegisterEffect(e1) -end -function c18318842.filter(c) - return c:IsAttribute(ATTRIBUTE_WATER) and c:IsDiscardable() and c:IsAbleToGraveAsCost() -end -function c18318842.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c18318842.filter,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,c18318842.filter,1,1,REASON_COST+REASON_DISCARD) -end -function c18318842.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsAbleToHand() end - if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g=Duel.SelectTarget(tp,Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c18318842.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - end -end diff --git a/script/c18322364.lua b/script/c18322364.lua deleted file mode 100644 index 43284aa4e0..0000000000 --- a/script/c18322364.lua +++ /dev/null @@ -1,52 +0,0 @@ ---ビッグ・ホエール -function c18322364.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(18322364,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetCondition(c18322364.condition) - e1:SetCost(c18322364.cost) - e1:SetTarget(c18322364.target) - e1:SetOperation(c18322364.operation) - c:RegisterEffect(e1) -end -function c18322364.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_ADVANCE -end -function c18322364.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end -function c18322364.spfilter(c,e,tp) - return c:GetLevel()==3 and c:IsAttribute(ATTRIBUTE_WATER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c18322364.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>1 - and Duel.IsExistingMatchingCard(c18322364.spfilter,tp,LOCATION_DECK,0,3,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,3,tp,LOCATION_DECK) -end -function c18322364.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<3 then return end - local g=Duel.GetMatchingGroup(c18322364.spfilter,tp,LOCATION_DECK,0,nil,e,tp) - if g:GetCount()<3 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=g:Select(tp,3,3,nil) - local tc=sg:GetFirst() - while tc do - Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1,true) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e2,true) - tc=sg:GetNext() - end - Duel.SpecialSummonComplete() -end diff --git a/script/c18325492.lua b/script/c18325492.lua deleted file mode 100644 index 4bd80fb867..0000000000 --- a/script/c18325492.lua +++ /dev/null @@ -1,15 +0,0 @@ ---ジャイロイド -function c18325492.initial_effect(c) - --battle indes - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_INDESTRUCTABLE_COUNT) - e1:SetCountLimit(1) - e1:SetValue(c18325492.valcon) - c:RegisterEffect(e1) -end -function c18325492.valcon(e,re,r,rp) - return bit.band(r,REASON_BATTLE)~=0 -end diff --git a/script/c18326736.lua b/script/c18326736.lua deleted file mode 100644 index c11ca86ec3..0000000000 --- a/script/c18326736.lua +++ /dev/null @@ -1,106 +0,0 @@ ---星守の騎士 プトレマイオス -function c18326736.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,4,2,nil,nil,5) - c:EnableReviveLimit() - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(18326736,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c18326736.spcost) - e1:SetTarget(c18326736.sptg) - e1:SetOperation(c18326736.spop) - e1:SetHintTiming(0,TIMING_END_PHASE) - c:RegisterEffect(e1) - --turn skip - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(18326736,1)) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCost(c18326736.skipcost) - e2:SetTarget(c18326736.skiptg) - e2:SetOperation(c18326736.skipop) - c:RegisterEffect(e2) - --material - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(18326736,2)) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_PHASE+PHASE_END) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1) - e3:SetTarget(c18326736.mttg) - e3:SetOperation(c18326736.mtop) - c:RegisterEffect(e3) -end -function c18326736.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:CheckRemoveOverlayCard(tp,3,REASON_COST) and c:GetFlagEffect(18326736)==0 end - c:RemoveOverlayCard(tp,3,3,REASON_COST) - c:RegisterFlagEffect(18326736,RESET_CHAIN,0,1) -end -function c18326736.filter(c,e,tp,rk) - return c:GetRank()==rk+1 and not c:IsSetCard(0x48) and e:GetHandler():IsCanBeXyzMaterial(c) - and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) -end -function c18326736.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsExistingMatchingCard(c18326736.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp,e:GetHandler():GetRank()) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function c18326736.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<0 then return end - local c=e:GetHandler() - if c:IsFacedown() or not c:IsRelateToEffect(e) or c:IsControler(1-tp) or c:IsImmuneToEffect(e) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c18326736.filter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,c:GetRank()) - local sc=g:GetFirst() - if sc then - local mg=c:GetOverlayGroup() - if mg:GetCount()~=0 then - Duel.Overlay(sc,mg) - end - sc:SetMaterial(Group.FromCards(c)) - Duel.Overlay(sc,Group.FromCards(c)) - Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP) - sc:CompleteProcedure() - end -end -function c18326736.skipcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:CheckRemoveOverlayCard(tp,7,REASON_COST) end - c:RemoveOverlayCard(tp,7,7,REASON_COST) -end -function c18326736.skiptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return not Duel.IsPlayerAffectedByEffect(1-tp,EFFECT_SKIP_TURN) end -end -function c18326736.skipop(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EFFECT_SKIP_TURN) - e1:SetTargetRange(0,1) - e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN) - e1:SetCondition(c18326736.skipcon) - Duel.RegisterEffect(e1,tp) -end -function c18326736.skipcon(e) - return Duel.GetTurnPlayer()~=e:GetHandlerPlayer() -end -function c18326736.mtfilter(c) - return c:IsSetCard(0x109c) -end -function c18326736.mttg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c18326736.mtfilter,tp,LOCATION_EXTRA,0,1,nil) end -end -function c18326736.mtop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL) - local g=Duel.SelectMatchingCard(tp,c18326736.mtfilter,tp,LOCATION_EXTRA,0,1,1,nil) - if g:GetCount()>0 then - Duel.Overlay(c,g) - end -end diff --git a/script/c1833916.lua b/script/c1833916.lua deleted file mode 100644 index ea9ce79963..0000000000 --- a/script/c1833916.lua +++ /dev/null @@ -1,83 +0,0 @@ ---H・C サウザンド・ブレード -function c1833916.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(1833916,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCondition(c1833916.spcon) - e1:SetCost(c1833916.spcost) - e1:SetTarget(c1833916.sptg) - e1:SetOperation(c1833916.spop) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(1833916,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetRange(LOCATION_GRAVE) - e2:SetCode(EVENT_DAMAGE) - e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) - e2:SetCountLimit(1,1833916) - e2:SetCondition(c1833916.spcon2) - e2:SetTarget(c1833916.sptg2) - e2:SetOperation(c1833916.spop2) - c:RegisterEffect(e2) -end -function c1833916.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsAttackPos() -end -function c1833916.cfilter(c) - return c:IsSetCard(0x6f) and c:IsDiscardable() -end -function c1833916.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c1833916.cfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,c1833916.cfilter,1,1,REASON_COST+REASON_DISCARD) -end -function c1833916.filter(c,e,tp) - return c:IsSetCard(0x6f) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c1833916.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c1833916.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c1833916.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local c=e:GetHandler() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c1833916.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - if c:IsRelateToEffect(e) then - Duel.ChangePosition(c,POS_FACEUP_DEFENCE) - end - end - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetTargetRange(1,0) - e1:SetTarget(c1833916.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function c1833916.splimit(e,c) - return not c:IsSetCard(0x6f) -end -function c1833916.spcon2(e,tp,eg,ep,ev,re,r,rp) - return ep==tp -end -function c1833916.sptg2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c1833916.spop2(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP_ATTACK) - end -end diff --git a/script/c1834107.lua b/script/c1834107.lua deleted file mode 100644 index 21888c82eb..0000000000 --- a/script/c1834107.lua +++ /dev/null @@ -1,36 +0,0 @@ ---エレキュア -function c1834107.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --recover - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(1834107,0)) - e2:SetCategory(CATEGORY_RECOVER) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetRange(LOCATION_SZONE) - e2:SetCode(EVENT_BATTLE_DAMAGE) - e2:SetCondition(c1834107.reccon) - e2:SetTarget(c1834107.rectg) - e2:SetOperation(c1834107.recop) - c:RegisterEffect(e2) -end -function c1834107.reccon(e,tp,eg,ep,ev,re,r,rp) - if ep==tp then return false end - local rc=eg:GetFirst() - return rc:IsControler(tp) and rc:IsRace(RACE_THUNDER) -end -function c1834107.rectg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(ev) - Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,ev) -end -function c1834107.recop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Recover(p,d,REASON_EFFECT) -end diff --git a/script/c1834753.lua b/script/c1834753.lua deleted file mode 100644 index ba606e41f9..0000000000 --- a/script/c1834753.lua +++ /dev/null @@ -1,43 +0,0 @@ ---マックス・テレポーター -function c1834753.initial_effect(c) - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(aux.FALSE) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(1834753,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetProperty(EFFECT_FLAG_NO_TURN_RESET) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCost(c1834753.spcost) - e2:SetTarget(c1834753.sptg) - e2:SetOperation(c1834753.spop) - c:RegisterEffect(e2) -end -function c1834753.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,2000) end - Duel.PayLPCost(tp,2000) -end -function c1834753.filter(c,e,tp) - return c:GetLevel()==3 and c:IsRace(RACE_PSYCHO) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c1834753.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>1 - and Duel.IsExistingMatchingCard(c1834753.filter,tp,LOCATION_DECK,0,2,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_DECK) -end -function c1834753.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 then return end - local g=Duel.GetMatchingGroup(c1834753.filter,tp,LOCATION_DECK,0,nil,e,tp) - if g:GetCount()>=2 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=g:Select(tp,2,2,nil) - Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c18372968.lua b/script/c18372968.lua deleted file mode 100644 index e398694c96..0000000000 --- a/script/c18372968.lua +++ /dev/null @@ -1,32 +0,0 @@ ---カミソーリトカゲ -function c18372968.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(18372968,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_BATTLE_START) - e1:SetCondition(c18372968.descon) - e1:SetTarget(c18372968.destg) - e1:SetOperation(c18372968.desop) - c:RegisterEffect(e1) -end -function c18372968.cfilter(c) - return c:IsFaceup() and c:IsRace(RACE_REPTILE) -end -function c18372968.descon(e,tp,eg,ep,ev,re,r,rp) - local d=Duel.GetAttackTarget() - return e:GetHandler()==Duel.GetAttacker() and d and d:IsPosition(POS_FACEDOWN_DEFENCE) - and Duel.IsExistingMatchingCard(c18372968.cfilter,tp,LOCATION_MZONE,0,1,e:GetHandler()) -end -function c18372968.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,Duel.GetAttackTarget(),1,0,0) -end -function c18372968.desop(e,tp,eg,ep,ev,re,r,rp) - local d=Duel.GetAttackTarget() - if d:IsRelateToBattle() and d:IsPosition(POS_FACEDOWN_DEFENCE) - and Duel.IsExistingMatchingCard(c18372968.cfilter,tp,LOCATION_MZONE,0,1,e:GetHandler()) then - Duel.Destroy(d,REASON_EFFECT) - end -end diff --git a/script/c18378582.lua b/script/c18378582.lua deleted file mode 100644 index e73ce31685..0000000000 --- a/script/c18378582.lua +++ /dev/null @@ -1,58 +0,0 @@ ---大天使ゼラート -function c18378582.initial_effect(c) - c:EnableReviveLimit() - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_SPSUMMON_PROC) - e2:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE) - e2:SetRange(LOCATION_HAND) - e2:SetCondition(c18378582.spcon) - e2:SetOperation(c18378582.spop) - c:RegisterEffect(e2) - --destroy - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(18378582,0)) - e3:SetCategory(CATEGORY_DESTROY) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_MZONE) - e3:SetCost(c18378582.descost) - e3:SetTarget(c18378582.destg) - e3:SetOperation(c18378582.desop) - c:RegisterEffect(e3) -end -function c18378582.rfilter(c,code) - return c:IsFaceup() and c:IsCode(code) -end -function c18378582.spcon(e,c) - if c==nil then return Duel.IsEnvironment(56433456) end - return Duel.CheckReleaseGroup(c:GetControler(),c18378582.rfilter,1,nil,66073051) -end -function c18378582.spop(e,tp,eg,ep,ev,re,r,rp,c) - local g=Duel.SelectReleaseGroup(tp,c18378582.rfilter,1,1,nil,66073051) - Duel.Release(g,REASON_COST) -end -function c18378582.cfilter(c) - return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsDiscardable() and c:IsAbleToGraveAsCost() -end -function c18378582.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c18378582.cfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,c18378582.cfilter,1,1,REASON_COST+REASON_DISCARD) -end -function c18378582.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDestructable,tp,0,LOCATION_MZONE,1,nil) end - local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,0,LOCATION_MZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c18378582.desop(e,tp,eg,ep,ev,re,r,rp) - if Duel.IsEnvironment(56433456) then - local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,0,LOCATION_MZONE,nil) - Duel.Destroy(g,REASON_EFFECT) - end -end diff --git a/script/c18386170.lua b/script/c18386170.lua deleted file mode 100644 index 35081a79df..0000000000 --- a/script/c18386170.lua +++ /dev/null @@ -1,123 +0,0 @@ ---彼岸の巡礼者 ダンテ -function c18386170.initial_effect(c) - c:EnableReviveLimit() - --fusion material - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_FUSION_MATERIAL) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCondition(c18386170.fscon) - e1:SetOperation(c18386170.fsop) - c:RegisterEffect(e1) - --special summon condition - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_SPSUMMON_CONDITION) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e2:SetValue(aux.fuslimit) - c:RegisterEffect(e2) - --cannot be target - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) - e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e3:SetRange(LOCATION_MZONE) - e3:SetValue(c18386170.tgval) - c:RegisterEffect(e3) - --draw - local e4=Effect.CreateEffect(c) - e4:SetCategory(CATEGORY_DRAW) - e4:SetType(EFFECT_TYPE_QUICK_O) - e4:SetCode(EVENT_FREE_CHAIN) - e4:SetRange(LOCATION_MZONE) - e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e4:SetCountLimit(1) - e4:SetCost(c18386170.drcost) - e4:SetTarget(c18386170.drtg) - e4:SetOperation(c18386170.drop) - c:RegisterEffect(e4) - --handes - local e5=Effect.CreateEffect(c) - e5:SetCategory(CATEGORY_HANDES) - e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e5:SetCode(EVENT_TO_GRAVE) - e5:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e5:SetCondition(c18386170.hdcon) - e5:SetTarget(c18386170.hdtg) - e5:SetOperation(c18386170.hdop) - c:RegisterEffect(e5) -end -function c18386170.tgval(e,re,rp) - return rp~=e:GetHandlerPlayer() and not re:GetHandler():IsImmuneToEffect(e) -end -function c18386170.cfilter(c) - return c:IsSetCard(0xb1) and c:IsAbleToGraveAsCost() -end -function c18386170.drcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c18386170.cfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,c18386170.cfilter,1,1,REASON_COST,nil) -end -function c18386170.drtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(1) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c18386170.drop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end -function c18386170.hdcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return (rp~=tp and c:IsReason(REASON_EFFECT) and c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_ONFIELD)) or c:IsReason(REASON_BATTLE) -end -function c18386170.hdtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0 end - Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,1-tp,1) -end -function c18386170.hdop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND) - if g:GetCount()==0 then return end - local sg=g:RandomSelect(tp,1) - Duel.SendtoGrave(sg,REASON_EFFECT) -end -function c18386170.fscon(e,g,gc,chkf) - if g==nil then return true end - if gc then - local mg=g:Filter(Card.IsSetCard,nil,0xb1) - mg:AddCard(gc) - return gc:IsSetCard(0xb1) and mg:GetClassCount(Card.GetCode)>=3 - end - local fs=false - local mg=g:Filter(Card.IsSetCard,nil,0xb1) - if mg:IsExists(aux.FConditionCheckF,1,nil,chkf) then fs=true end - return mg:GetClassCount(Card.GetCode)>=3 and (fs or chkf==PLAYER_NONE) -end -function c18386170.fsop(e,tp,eg,ep,ev,re,r,rp,gc,chkf) - if gc then - local sg=eg:Filter(Card.IsSetCard,gc,0xb1) - sg:Remove(Card.IsCode,nil,gc:GetCode()) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL) - local g1=sg:Select(tp,1,1,nil) - sg:Remove(Card.IsCode,nil,g1:GetFirst():GetCode()) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL) - local g2=sg:Select(tp,1,1,nil) - g1:Merge(g2) - Duel.SetFusionMaterial(g1) - return - end - local sg=eg:Filter(Card.IsSetCard,nil,0xb1) - local g1=nil - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL) - if chkf~=PLAYER_NONE then g1=sg:FilterSelect(tp,aux.FConditionCheckF,1,1,nil,chkf) - else g1=sg:Select(tp,1,1,nil) end - sg:Remove(Card.IsCode,nil,g1:GetFirst():GetCode()) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL) - local g2=sg:Select(tp,1,1,nil) - sg:Remove(Card.IsCode,nil,g2:GetFirst():GetCode()) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL) - local g3=sg:Select(tp,1,1,nil) - g1:Merge(g2) - g1:Merge(g3) - Duel.SetFusionMaterial(g1) -end diff --git a/script/c18407024.lua b/script/c18407024.lua deleted file mode 100644 index 4421d7e701..0000000000 --- a/script/c18407024.lua +++ /dev/null @@ -1,27 +0,0 @@ ---エレキンギョ -function c18407024.initial_effect(c) - --handes - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(18407024,0)) - e1:SetCategory(CATEGORY_HANDES) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_BATTLE_DAMAGE) - e1:SetCondition(c18407024.condition) - e1:SetTarget(c18407024.target) - e1:SetOperation(c18407024.operation) - c:RegisterEffect(e1) -end -function c18407024.condition(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp and Duel.GetAttackTarget()==nil -end -function c18407024.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_HANDES,0,0,1-tp,1) -end -function c18407024.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetFieldGroup(ep,LOCATION_HAND,0,nil) - if g:GetCount()==0 then return end - Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_DISCARD) - local sg=g:Select(1-tp,1,1,nil) - Duel.SendtoGrave(sg,REASON_DISCARD+REASON_EFFECT) -end diff --git a/script/c18426196.lua b/script/c18426196.lua deleted file mode 100644 index a668f0173e..0000000000 --- a/script/c18426196.lua +++ /dev/null @@ -1,61 +0,0 @@ ---聖騎士ジャンヌ -function c18426196.initial_effect(c) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetCondition(c18426196.condtion) - e1:SetValue(-300) - c:RegisterEffect(e1) - --salvage - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(18426196,0)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY+EFFECT_FLAG_CVAL_CHECK) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCondition(c18426196.thcon) - e1:SetCost(c18426196.thcost) - e1:SetTarget(c18426196.thtg) - e1:SetOperation(c18426196.thop) - e1:SetValue(c18426196.valcheck) - c:RegisterEffect(e1) -end -function c18426196.condtion(e) - local ph=Duel.GetCurrentPhase() - return (ph==PHASE_DAMAGE or ph==PHASE_DAMAGE_CAL) - and Duel.GetAttacker()==e:GetHandler() -end -function c18426196.thcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsReason(REASON_DESTROY) and e:GetHandler():GetReasonPlayer()==1-tp -end -function c18426196.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - if Duel.GetFlagEffect(tp,18426196)==0 then - Duel.RegisterFlagEffect(tp,18426196,RESET_CHAIN,0,1) - c18426196[0]=Duel.GetMatchingGroupCount(Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,nil) - c18426196[1]=0 - end - return c18426196[0]-c18426196[1]>=1 - end - Duel.DiscardHand(tp,Card.IsAbleToGraveAsCost,1,1,REASON_COST) -end -function c18426196.filter(c) - return c:IsLevelBelow(4) and c:IsRace(RACE_WARRIOR) and c:IsAbleToHand() -end -function c18426196.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c18426196.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c18426196.filter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c18426196.filter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0) -end -function c18426196.thop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end -function c18426196.valcheck(e) - c18426196[1]=c18426196[1]+1 -end diff --git a/script/c18430390.lua b/script/c18430390.lua deleted file mode 100644 index 12477db9b2..0000000000 --- a/script/c18430390.lua +++ /dev/null @@ -1,26 +0,0 @@ ---ウィングド・ライノ -function c18430390.initial_effect(c) - --to hand - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetDescription(aux.Stringid(18430390,0)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetCode(EVENT_CHAINING) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c18430390.condition) - e1:SetTarget(c18430390.target) - e1:SetOperation(c18430390.operation) - c:RegisterEffect(e1) -end -function c18430390.condition(e,tp,eg,ep,ev,re,r,rp) - return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:GetOwner():IsType(TYPE_TRAP) -end -function c18430390.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToHand() end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0) -end -function c18430390.operation(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT) - end -end diff --git a/script/c18444902.lua b/script/c18444902.lua deleted file mode 100644 index 3aea26450e..0000000000 --- a/script/c18444902.lua +++ /dev/null @@ -1,35 +0,0 @@ ---タタカワナイト -function c18444902.initial_effect(c) - --damage - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(18444902,0)) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_CHAIN_NEGATED) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c18444902.damcon) - e1:SetCost(c18444902.damcost) - e1:SetTarget(c18444902.damtg) - e1:SetOperation(c18444902.damop) - c:RegisterEffect(e1) -end -function c18444902.damcon(e,tp,eg,ep,ev,re,r,rp) - local de,dp=Duel.GetChainInfo(ev,CHAININFO_DISABLE_REASON,CHAININFO_DISABLE_PLAYER) - return de and dp~=tp and re:IsHasType(EFFECT_TYPE_ACTIVATE) and rp==tp -end -function c18444902.damcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsRelateToEffect(e) - and e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end -function c18444902.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(1500) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,1500) -end -function c18444902.damop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c18446701.lua b/script/c18446701.lua deleted file mode 100644 index 8096cb34a7..0000000000 --- a/script/c18446701.lua +++ /dev/null @@ -1,50 +0,0 @@ ---ガガガシールド -function c18446701.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c18446701.target) - e1:SetOperation(c18446701.operation) - c:RegisterEffect(e1) -end -function c18446701.filter(c) - return c:IsFaceup() and c:IsRace(RACE_SPELLCASTER) -end -function c18446701.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c18446701.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c18446701.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local g=Duel.SelectTarget(tp,c18446701.filter,tp,LOCATION_MZONE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c18446701.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsLocation(LOCATION_SZONE) then return end - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:GetControler()==c:GetControler() then - Duel.Equip(tp,c,tc) - c:CancelToGrave() - --draw - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_EQUIP) - e1:SetCode(EFFECT_INDESTRUCTABLE_COUNT) - e1:SetCountLimit(2) - e1:SetValue(1) - e1:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e1) - --Equip limit - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_EQUIP_LIMIT) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetValue(c18446701.eqlimit) - e2:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e2) - end -end -function c18446701.eqlimit(e,c) - return c:GetControler()==e:GetOwnerPlayer() and c:IsRace(RACE_SPELLCASTER) -end diff --git a/script/c1845204.lua b/script/c1845204.lua deleted file mode 100644 index eaa271431c..0000000000 --- a/script/c1845204.lua +++ /dev/null @@ -1,66 +0,0 @@ ---簡易融合 -function c1845204.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,1845204+EFFECT_COUNT_CODE_OATH) - e1:SetCost(c1845204.cost) - e1:SetTarget(c1845204.target) - e1:SetOperation(c1845204.activate) - c:RegisterEffect(e1) -end -function c1845204.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,1000) end - Duel.PayLPCost(tp,1000) -end -function c1845204.filter(c,e,tp) - return c:IsType(TYPE_FUSION) and c:GetLevel()<=5 - and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial() -end -function c1845204.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c1845204.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function c1845204.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c1845204.filter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp) - local tc=g:GetFirst() - if not tc then return end - tc:SetMaterial(nil) - if Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)~=0 then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1,true) - tc:RegisterFlagEffect(1845204,RESET_EVENT+0x1fe0000,0,1) - tc:CompleteProcedure() - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_PHASE+PHASE_END) - e2:SetCountLimit(1) - e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e2:SetLabelObject(tc) - e2:SetCondition(c1845204.descon) - e2:SetOperation(c1845204.desop) - Duel.RegisterEffect(e2,tp) - end -end -function c1845204.descon(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetLabelObject() - if tc:GetFlagEffect(1845204)~=0 then - return true - else - e:Reset() - return false - end -end -function c1845204.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetLabelObject() - Duel.Destroy(tc,REASON_EFFECT) -end diff --git a/script/c18482591.lua b/script/c18482591.lua deleted file mode 100644 index 33f1c9fb9f..0000000000 --- a/script/c18482591.lua +++ /dev/null @@ -1,38 +0,0 @@ ---氷結界の破術師 -function c18482591.initial_effect(c) - --cannot activate - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetCode(EFFECT_CANNOT_ACTIVATE) - e2:SetRange(LOCATION_MZONE) - e2:SetTargetRange(1,1) - e2:SetCondition(c18482591.con) - e2:SetValue(c18482591.aclimit) - c:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e3:SetCode(EVENT_SSET) - e3:SetRange(LOCATION_MZONE) - e3:SetCondition(c18482591.con) - e3:SetOperation(c18482591.aclimset) - c:RegisterEffect(e3) -end -function c18482591.filter(c) - return c:IsFaceup() and c:IsSetCard(0x2f) -end -function c18482591.con(e) - return Duel.IsExistingMatchingCard(c18482591.filter,e:GetHandler():GetControler(),LOCATION_MZONE,0,1,e:GetHandler()) -end -function c18482591.aclimit(e,re,tp) - if not re:IsHasType(EFFECT_TYPE_ACTIVATE) or not re:IsActiveType(TYPE_SPELL) then return false end - local c=re:GetHandler() - return not c:IsLocation(LOCATION_SZONE) or c:GetFlagEffect(18482591)>0 -end -function c18482591.aclimset(e,tp,eg,ep,ev,re,r,rp) - local tc=eg:GetFirst() - while tc do - tc:RegisterFlagEffect(18482591,RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END+RESET_OPPO_TURN,0,1) - tc=eg:GetNext() - end -end diff --git a/script/c18489208.lua b/script/c18489208.lua deleted file mode 100644 index c17cb73fd9..0000000000 --- a/script/c18489208.lua +++ /dev/null @@ -1,44 +0,0 @@ ---カースド・フィグ -function c18489208.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(18489208,0)) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetCondition(c18489208.con) - e1:SetTarget(c18489208.tg) - e1:SetOperation(c18489208.op) - c:RegisterEffect(e1) -end -function c18489208.con(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) -end -function c18489208.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_SZONE) and chkc:IsFacedown() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFacedown,tp,LOCATION_SZONE,LOCATION_SZONE,2,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEDOWN) - Duel.SelectTarget(tp,Card.IsFacedown,tp,LOCATION_SZONE,LOCATION_SZONE,2,2,nil) -end -function c18489208.op(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsLocation(LOCATION_GRAVE) then return end - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local tc=g:GetFirst() - while tc do - if c:IsRelateToEffect(e) and tc:IsFacedown() and tc:IsRelateToEffect(e) then - c:SetCardTarget(tc) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_TRIGGER) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetCondition(c18489208.rcon) - e1:SetValue(1) - tc:RegisterEffect(e1) - end - tc=g:GetNext() - end -end -function c18489208.rcon(e) - return e:GetOwner():IsHasCardTarget(e:GetHandler()) -end diff --git a/script/c18511384.lua b/script/c18511384.lua deleted file mode 100644 index cbf05da9ea..0000000000 --- a/script/c18511384.lua +++ /dev/null @@ -1,37 +0,0 @@ ---融合回収 -function c18511384.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c18511384.target) - e1:SetOperation(c18511384.activate) - c:RegisterEffect(e1) -end -function c18511384.filter1(c) - return c:IsCode(24094653) and c:IsAbleToHand() -end -function c18511384.filter2(c) - return bit.band(c:GetReason(),0x40008)==0x40008 and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() -end -function c18511384.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - if chk==0 then return Duel.IsExistingTarget(c18511384.filter1,tp,LOCATION_GRAVE,0,1,nil) - and Duel.IsExistingTarget(c18511384.filter2,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g1=Duel.SelectTarget(tp,c18511384.filter1,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g2=Duel.SelectTarget(tp,c18511384.filter2,tp,LOCATION_GRAVE,0,1,1,nil) - g1:Merge(g2) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g1,2,0,0) -end -function c18511384.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local sg=g:Filter(Card.IsRelateToEffect,nil,e) - if sg:GetCount()>0 then - Duel.SendtoHand(sg,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,sg) - end -end diff --git a/script/c18511599.lua b/script/c18511599.lua deleted file mode 100644 index 9befaca04e..0000000000 --- a/script/c18511599.lua +++ /dev/null @@ -1,46 +0,0 @@ ---エヴォルカイザー・ソルデ -function c18511599.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsRace,RACE_DINOSAUR),6,2) - c:EnableReviveLimit() - --indes - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c18511599.indcon) - e1:SetValue(1) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(18511599,0)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetRange(LOCATION_MZONE) - e2:SetCost(c18511599.cost) - e2:SetTarget(c18511599.target) - e2:SetOperation(c18511599.operation) - c:RegisterEffect(e2) -end -function c18511599.indcon(e) - return e:GetHandler():GetOverlayCount()~=0 -end -function c18511599.filter(c,e,tp) - return c:GetSummonPlayer()==1-tp and c:IsDestructable() and (not e or c:IsRelateToEffect(e)) -end -function c18511599.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c18511599.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return eg:IsExists(c18511599.filter,1,nil,nil,tp) end - local g=eg:Filter(c18511599.filter,nil,nil,tp) - Duel.SetTargetCard(eg) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c18511599.operation(e,tp,eg,ep,ev,re,r,rp) - local g=eg:Filter(c18511599.filter,nil,e,tp) - Duel.Destroy(g,REASON_EFFECT) -end diff --git a/script/c18517177.lua b/script/c18517177.lua deleted file mode 100644 index e67207d64b..0000000000 --- a/script/c18517177.lua +++ /dev/null @@ -1,43 +0,0 @@ ---コア・ブラスト -function c18517177.initial_effect(c) - --activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_END_PHASE) - c:RegisterEffect(e1) - --maintain - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(18517177,0)) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) - e2:SetRange(LOCATION_SZONE) - e2:SetCountLimit(1) - e2:SetCondition(c18517177.descon) - e2:SetTarget(c18517177.destg) - e2:SetOperation(c18517177.desop) - c:RegisterEffect(e2) -end -function c18517177.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x1d) -end -function c18517177.descon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp - and Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)0 then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(ct*100) - e1:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e1) - end - end -end -function c1855932.repfilter(c,tp) - return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) and c:IsSetCard(0x88) and c:IsRace(RACE_BEASTWARRIOR) -end -function c1855932.reptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return eg:IsExists(c1855932.repfilter,1,nil,tp) end - if e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_EFFECT) and Duel.SelectYesNo(tp,aux.Stringid(1855932,1)) then - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_EFFECT) - local g=eg:Filter(c1855932.repfilter,nil,tp) - if g:GetCount()==1 then - e:SetLabelObject(g:GetFirst()) - else - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESREPLACE) - local cg=g:Select(tp,1,1,nil) - e:SetLabelObject(cg:GetFirst()) - end - return true - else return false end -end -function c1855932.repval(e,c) - return c==e:GetLabelObject() -end diff --git a/script/c18590133.lua b/script/c18590133.lua deleted file mode 100644 index 4a14ae5b77..0000000000 --- a/script/c18590133.lua +++ /dev/null @@ -1,33 +0,0 @@ ---キングゴブリン -function c18590133.initial_effect(c) - --cannot be battle target - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_CANNOT_BE_BATTLE_TARGET) - e1:SetCondition(c18590133.ccon) - e1:SetValue(aux.imval1) - c:RegisterEffect(e1) - --atk,def - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetTargetRange(LOCATION_MZONE,0) - e2:SetCode(EFFECT_SET_BASE_ATTACK) - e2:SetValue(c18590133.val) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EFFECT_SET_BASE_DEFENCE) - c:RegisterEffect(e3) -end -function c18590133.filter(c) - return c:IsFaceup() and c:IsRace(RACE_FIEND) -end -function c18590133.ccon(e) - return Duel.IsExistingMatchingCard(c18590133.filter,e:GetHandler():GetControler(),LOCATION_MZONE,0,1,e:GetHandler()) -end -function c18590133.val(e,c) - return Duel.GetMatchingGroupCount(c18590133.filter,c:GetControler(),LOCATION_MZONE,LOCATION_MZONE,c)*1000 -end diff --git a/script/c18591904.lua b/script/c18591904.lua deleted file mode 100644 index a00c8281d0..0000000000 --- a/script/c18591904.lua +++ /dev/null @@ -1,25 +0,0 @@ ---最終戦争 -function c18591904.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c18591904.cost) - e1:SetTarget(c18591904.target) - e1:SetOperation(c18591904.activate) - c:RegisterEffect(e1) -end -function c18591904.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,5,e:GetHandler()) end - Duel.DiscardHand(tp,Card.IsDiscardable,5,5,REASON_COST+REASON_DISCARD) -end -function c18591904.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end - local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c18591904.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler()) - Duel.Destroy(g,REASON_EFFECT) -end diff --git a/script/c18605135.lua b/script/c18605135.lua deleted file mode 100644 index c84114cb93..0000000000 --- a/script/c18605135.lua +++ /dev/null @@ -1,43 +0,0 @@ ---竜巻海流壁 -function c18605135.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c18605135.actcon) - c:RegisterEffect(e1) - --avoid battle damage - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_AVOID_BATTLE_DAMAGE) - e2:SetRange(LOCATION_SZONE) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetTargetRange(1,0) - e2:SetCondition(c18605135.abdcon) - c:RegisterEffect(e2) - --self destroy - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e3:SetRange(LOCATION_SZONE) - e3:SetCode(EFFECT_SELF_DESTROY) - e3:SetCondition(c18605135.sdcon) - c:RegisterEffect(e3) -end -function c18605135.filter(c) - return c:IsFaceup() and c:IsCode(22702055) -end -function c18605135.check() - return Duel.IsExistingMatchingCard(c18605135.filter,0,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) - or Duel.IsEnvironment(22702055) -end -function c18605135.actcon(e,tp,eg,ep,ev,re,r,rp) - return c18605135.check() -end -function c18605135.abdcon(e) - local at=Duel.GetAttackTarget() - return c18605135.check() and (at==nil or at:IsAttackPos() or Duel.GetAttacker():GetAttack()>at:GetDefence()) -end -function c18605135.sdcon(e) - return not c18605135.check() -end diff --git a/script/c18631392.lua b/script/c18631392.lua deleted file mode 100644 index 467777924c..0000000000 --- a/script/c18631392.lua +++ /dev/null @@ -1,93 +0,0 @@ ---マアト -function c18631392.initial_effect(c) - c:EnableReviveLimit() - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(aux.FALSE) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_SPSUMMON_PROC) - e2:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e2:SetRange(LOCATION_HAND) - e2:SetCondition(c18631392.spcon) - e2:SetOperation(c18631392.spop) - c:RegisterEffect(e2) - --announce 3 cards - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(18631392,0)) - e3:SetCategory(CATEGORY_TOHAND+CATEGORY_TOGRAVE+CATEGORY_ATKCHANGE) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1) - e3:SetTarget(c18631392.anctg) - c:RegisterEffect(e3) -end -function c18631392.spfilter(c,rac) - return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(rac) and c:IsAbleToGraveAsCost() -end -function c18631392.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.GetLocationCount(tp,LOCATION_MZONE)>-2 - and Duel.IsExistingMatchingCard(c18631392.spfilter,tp,LOCATION_MZONE,0,1,nil,RACE_FAIRY) - and Duel.IsExistingMatchingCard(c18631392.spfilter,tp,LOCATION_MZONE,0,1,nil,RACE_DRAGON) -end -function c18631392.spop(e,tp,eg,ep,ev,re,r,rp,c) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g1=Duel.SelectMatchingCard(tp,c18631392.spfilter,tp,LOCATION_MZONE,0,1,1,nil,RACE_FAIRY) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g2=Duel.SelectMatchingCard(tp,c18631392.spfilter,tp,LOCATION_MZONE,0,1,1,nil,RACE_DRAGON) - g1:Merge(g2) - Duel.SendtoGrave(g1,REASON_COST) -end -function c18631392.anctg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,3) end - Duel.Hint(HINT_SELECTMSG,tp,0) - local ac1=Duel.AnnounceCard(tp) - Duel.Hint(HINT_SELECTMSG,tp,0) - local ac2=Duel.AnnounceCard(tp) - Duel.Hint(HINT_SELECTMSG,tp,0) - local ac3=Duel.AnnounceCard(tp) - e:SetOperation(c18631392.retop(ac1,ac2,ac3)) -end -function c18631392.hfilter(c,code1,code2,code3) - local code=c:GetCode() - return (code==code1 or code==code2 or code==code3) and c:IsAbleToHand() -end -function c18631392.retop(code1,code2,code3) - return - function (e,tp,eg,ep,ev,re,r,rp) - if not Duel.IsPlayerCanDiscardDeck(tp,3) then return end - local c=e:GetHandler() - Duel.ConfirmDecktop(tp,3) - local g=Duel.GetDecktopGroup(tp,3) - local hg=g:Filter(c18631392.hfilter,nil,code1,code2,code3) - g:Sub(hg) - if hg:GetCount()~=0 then - Duel.DisableShuffleCheck() - Duel.SendtoHand(hg,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,hg) - Duel.ShuffleHand(tp) - end - if g:GetCount()~=0 then - Duel.DisableShuffleCheck() - Duel.SendtoGrave(g,REASON_EFFECT+REASON_REVEAL) - end - if c:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetValue(hg:GetCount()*1000) - e1:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_SET_DEFENCE_FINAL) - c:RegisterEffect(e2) - end - end -end diff --git a/script/c18634367.lua b/script/c18634367.lua deleted file mode 100644 index cd46ca075a..0000000000 --- a/script/c18634367.lua +++ /dev/null @@ -1,98 +0,0 @@ ---スクリーン・オブ・レッド -function c18634367.initial_effect(c) - --activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,0x28) - e1:SetTarget(c18634367.target) - e1:SetOperation(c18634367.spop) - c:RegisterEffect(e1) - --cannot attack - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(0,LOCATION_MZONE) - c:RegisterEffect(e2) - --maintain - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e3:SetCode(EVENT_PHASE+PHASE_END) - e3:SetRange(LOCATION_SZONE) - e3:SetCountLimit(1) - e3:SetCondition(c18634367.mtcon) - e3:SetOperation(c18634367.mtop) - c:RegisterEffect(e3) - --spsummon - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(18634367,0)) - e4:SetCategory(CATEGORY_SPECIAL_SUMMON) - e4:SetProperty(EFFECT_FLAG_CARD_TARGET) - e4:SetType(EFFECT_TYPE_QUICK_O) - e4:SetCode(EVENT_FREE_CHAIN) - e4:SetHintTiming(0,TIMING_END_PHASE) - e4:SetRange(LOCATION_SZONE) - e4:SetCondition(c18634367.spcon) - e4:SetTarget(c18634367.sptg) - e4:SetOperation(c18634367.spop) - e4:SetLabel(1) - c:RegisterEffect(e4) -end -function c18634367.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c18634367.filter(chkc,e,tp) end - if chk==0 then return true end - if Duel.IsExistingMatchingCard(c18634367.cfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) - and e:GetHandler():IsDestructable() and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c18634367.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) and Duel.SelectYesNo(tp,aux.Stringid(18634367,1)) then - e:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON) - e:SetProperty(EFFECT_FLAG_CARD_TARGET) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c18634367.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) - e:SetLabel(1) - else - e:SetCategory(0) - e:SetProperty(0) - e:SetLabel(0) - end -end -function c18634367.mtcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c18634367.mtop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLP(tp)>=1000 then - Duel.PayLPCost(tp,1000) - else - Duel.Destroy(e:GetHandler(),REASON_RULE) - end -end -function c18634367.cfilter(c) - return c:IsFaceup() and c:IsCode(70902743) -end -function c18634367.spcon(e,tp,eg,ep,ev,re,r,rp) - return not e:GetHandler():IsStatus(STATUS_CHAINING) - and Duel.IsExistingMatchingCard(c18634367.cfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) -end -function c18634367.filter(c,e,tp) - return c:GetLevel()==1 and c:IsType(TYPE_TUNER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c18634367.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c18634367.filter(chkc,e,tp) end - if chk==0 then return e:GetHandler():IsDestructable() and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c18634367.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c18634367.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c18634367.spop(e,tp,eg,ep,ev,re,r,rp) - if e:GetLabel()~=1 or not Duel.IsExistingMatchingCard(c18634367.cfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) then return end - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and Duel.Destroy(c,REASON_EFFECT)~=0 and tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c18654201.lua b/script/c18654201.lua deleted file mode 100644 index f49f02f24a..0000000000 --- a/script/c18654201.lua +++ /dev/null @@ -1,47 +0,0 @@ ---クリオスフィンクス -function c18654201.initial_effect(c) - --reg - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EVENT_TO_HAND) - e1:SetOperation(c18654201.regop) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(18654201,0)) - e2:SetCategory(CATEGORY_TOGRAVE) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(18654201) - e2:SetTarget(c18654201.hdtg) - e2:SetOperation(c18654201.hdop) - c:RegisterEffect(e2) -end -function c18654201.filter(c,tp) - return c:IsControler(tp) and c:IsPreviousLocation(LOCATION_MZONE) -end -function c18654201.regop(e,tp,eg,ep,ev,re,r,rp) - local p1=false local p2=false - if eg:IsExists(c18654201.filter,1,nil,0) then p1=true end - if eg:IsExists(c18654201.filter,1,nil,1) then p2=true end - local c=e:GetHandler() - if p1 and p2 then - Duel.RaiseSingleEvent(c,18654201,re,r,rp,PLAYER_ALL,0) - elseif p1 then - Duel.RaiseSingleEvent(c,18654201,re,r,rp,0,0) - elseif p2 then - Duel.RaiseSingleEvent(c,18654201,re,r,rp,1,0) - end -end -function c18654201.hdtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsRelateToEffect(e) end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,ep,LOCATION_HAND) -end -function c18654201.hdop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - if ep==PLAYER_ALL then - Duel.DiscardHand(0,nil,1,1,REASON_EFFECT) - Duel.DiscardHand(1,nil,1,1,REASON_EFFECT) - else - Duel.DiscardHand(ep,nil,1,1,REASON_EFFECT) - end -end diff --git a/script/c18658572.lua b/script/c18658572.lua deleted file mode 100644 index 704a6f30ab..0000000000 --- a/script/c18658572.lua +++ /dev/null @@ -1,33 +0,0 @@ ---見世物ゴブリン -function c18658572.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - -- - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(18658572,0)) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_PHASE+PHASE_END) - e2:SetRange(LOCATION_SZONE) - e2:SetCountLimit(1) - e2:SetCondition(c18658572.cfcon) - e2:SetOperation(c18658572.cfop) - c:RegisterEffect(e2) -end -function c18658572.cfcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)~=0 -end -function c18658572.cfop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local g=Duel.GetFieldGroup(tp,LOCATION_DECK,0) - if g:GetCount()==0 then return end - local tc=g:GetMinGroup(Card.GetSequence):GetFirst() - Duel.MoveSequence(tc,0) - Duel.ConfirmDecktop(tp,1) - if tc:IsAbleToRemove() and Duel.SelectYesNo(tp,aux.Stringid(18658572,1)) then - Duel.DisableShuffleCheck() - Duel.Remove(tc,POS_FACEDOWN,REASON_EFFECT) - end -end diff --git a/script/c18698739.lua b/script/c18698739.lua deleted file mode 100644 index 4930f59f92..0000000000 --- a/script/c18698739.lua +++ /dev/null @@ -1,32 +0,0 @@ ---ガーベージ・オーガ -function c18698739.initial_effect(c) - --search - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(18698739,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(1,18698739) - e1:SetCost(c18698739.cost) - e1:SetTarget(c18698739.target) - e1:SetOperation(c18698739.operation) - c:RegisterEffect(e1) -end -function c18698739.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end -function c18698739.filter(c) - return c:GetCode()==44682448 and c:IsAbleToHand() -end -function c18698739.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c18698739.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c18698739.operation(e,tp,eg,ep,ev,re,r,rp,chk) - local tc=Duel.GetFirstMatchingCard(c18698739.filter,tp,LOCATION_DECK,0,nil) - if tc then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end diff --git a/script/c18712704.lua b/script/c18712704.lua deleted file mode 100644 index 8b26f1d0f6..0000000000 --- a/script/c18712704.lua +++ /dev/null @@ -1,45 +0,0 @@ ---インフェルニティ・フォース -function c18712704.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_BE_BATTLE_TARGET) - e1:SetCondition(c18712704.condition) - e1:SetTarget(c18712704.target) - e1:SetOperation(c18712704.activate) - c:RegisterEffect(e1) -end -function c18712704.condition(e,tp,eg,ep,ev,re,r,rp) - local att=eg:GetFirst() - return Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)==0 and att:IsFaceup() and att:IsSetCard(0xb) -end -function c18712704.filter(c,e,tp) - return c:IsSetCard(0xb) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c18712704.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local tg=Duel.GetAttacker() - if chkc then return false end - if chk==0 then return tg:IsOnField() and tg:IsDestructable() and tg:IsCanBeEffectTarget(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c18712704.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetTargetCard(tg) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c18712704.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,tg,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c18712704.activate(e,tp,eg,ep,ev,re,r,rp) - local ex,sg=Duel.GetOperationInfo(0,CATEGORY_SPECIAL_SUMMON) - local ex,dg=Duel.GetOperationInfo(0,CATEGORY_DESTROY) - local sc=sg:GetFirst() - local dc=dg:GetFirst() - if dc:IsRelateToEffect(e) and dc:IsAttackPos() then - Duel.Destroy(dg,REASON_EFFECT) - if sc:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and sc:IsCanBeSpecialSummoned(e,0,tp,false,false) then - Duel.BreakEffect() - Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP) - end - end -end diff --git a/script/c18724123.lua b/script/c18724123.lua deleted file mode 100644 index 662eb140f4..0000000000 --- a/script/c18724123.lua +++ /dev/null @@ -1,12 +0,0 @@ ---インフェルニティ・アーチャー -function c18724123.initial_effect(c) - --direct attack - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DIRECT_ATTACK) - e1:SetCondition(c18724123.con) - c:RegisterEffect(e1) -end -function c18724123.con(e) - return Duel.GetFieldGroupCount(e:GetHandlerPlayer(),LOCATION_HAND,0)==0 -end diff --git a/script/c18739764.lua b/script/c18739764.lua deleted file mode 100644 index 49aaeaac3e..0000000000 --- a/script/c18739764.lua +++ /dev/null @@ -1,34 +0,0 @@ ---デストラクト・ポーション -function c18739764.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_RECOVER) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c18739764.target) - e1:SetOperation(c18739764.activate) - c:RegisterEffect(e1) -end -function c18739764.filter(c) - return c:IsDestructable() -end -function c18739764.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c18739764.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c18739764.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c18739764.filter,tp,LOCATION_MZONE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) - if g:GetFirst():IsFaceup() then - Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,g:GetFirst():GetAttack()) - end -end -function c18739764.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - local atk=tc:IsFaceup() and tc:GetAttack() or 0 - if Duel.Destroy(tc,REASON_EFFECT)>0 and atk~=0 then - Duel.Recover(tp,atk,REASON_EFFECT) - end - end -end diff --git a/script/c18752707.lua b/script/c18752707.lua deleted file mode 100644 index aa25389a33..0000000000 --- a/script/c18752707.lua +++ /dev/null @@ -1,36 +0,0 @@ ---マジカル・スター・イリュージョン -function c18752707.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c18752707.condition) - e1:SetTarget(c18752707.target) - e1:SetOperation(c18752707.activate) - c:RegisterEffect(e1) -end -function c18752707.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)<=Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE) -end -function c18752707.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end -end -function c18752707.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - local tc=g:GetFirst() - local val1=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil):GetSum(Card.GetLevel)*100 - local val2=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil):GetSum(Card.GetLevel)*100 - while tc do - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - if tc:IsControler(tp) then - e1:SetValue(val1) - else - e1:SetValue(val2) - end - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - tc=g:GetNext() - end -end diff --git a/script/c18752938.lua b/script/c18752938.lua deleted file mode 100644 index e06cb3e8cb..0000000000 --- a/script/c18752938.lua +++ /dev/null @@ -1,27 +0,0 @@ ---偽りの種 -function c18752938.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c18752938.target) - e1:SetOperation(c18752938.activate) - c:RegisterEffect(e1) -end -function c18752938.filter(c,e,tp) - return c:IsLevelBelow(2) and c:IsRace(RACE_PLANT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c18752938.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c18752938.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c18752938.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c18752938.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c18756904.lua b/script/c18756904.lua deleted file mode 100644 index ba9b6c50d6..0000000000 --- a/script/c18756904.lua +++ /dev/null @@ -1,32 +0,0 @@ ---馬の骨の対価 -function c18756904.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c18756904.cost) - e1:SetTarget(c18756904.target) - e1:SetOperation(c18756904.activate) - c:RegisterEffect(e1) -end -function c18756904.filter(c) - return c:IsFaceup() and not c:IsType(TYPE_EFFECT) and c:IsAbleToGraveAsCost() -end -function c18756904.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c18756904.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c18756904.filter,tp,LOCATION_MZONE,0,1,1,nil) - Duel.SendtoGrave(g,REASON_COST) -end -function c18756904.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp,2) end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(2) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2) -end -function c18756904.activate(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end diff --git a/script/c18803791.lua b/script/c18803791.lua deleted file mode 100644 index ddc0544914..0000000000 --- a/script/c18803791.lua +++ /dev/null @@ -1,33 +0,0 @@ ---黒竜降臨 -function c18803791.initial_effect(c) - aux.AddRitualProcGreater(c,aux.FilterBoolFunction(Card.IsCode,71408082)) - --to hand - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_GRAVE) - e1:SetCondition(aux.exccon) - e1:SetCost(c18803791.thcost) - e1:SetTarget(c18803791.thtg) - e1:SetOperation(c18803791.thop) - c:RegisterEffect(e1) -end -function c18803791.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) -end -function c18803791.thfilter(c) - return c:IsSetCard(0x3b) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand() -end -function c18803791.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c18803791.thfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c18803791.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c18803791.thfilter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c18807108.lua b/script/c18807108.lua deleted file mode 100644 index f775768f70..0000000000 --- a/script/c18807108.lua +++ /dev/null @@ -1,58 +0,0 @@ ---六芒星の呪縛 -function c18807108.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_POSITION) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c18807108.target) - e1:SetOperation(c18807108.operation) - c:RegisterEffect(e1) - --Destroy - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e2:SetRange(LOCATION_SZONE) - e2:SetCode(EVENT_LEAVE_FIELD) - e2:SetCondition(c18807108.descon) - e2:SetOperation(c18807108.desop) - c:RegisterEffect(e2) - e1:SetLabelObject(e2) -end -function c18807108.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) end - if chk==0 then return Duel.IsExistingTarget(nil,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - Duel.SelectTarget(tp,nil,tp,0,LOCATION_MZONE,1,1,nil) -end -function c18807108.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then - c:SetCardTarget(tc) - c:CreateRelation(tc,RESET_EVENT+0x1fe0000) - e:GetLabelObject():SetLabelObject(tc) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_OWNER_RELATE) - e1:SetCode(EFFECT_CANNOT_CHANGE_POSITION) - e1:SetReset(RESET_EVENT+0x1fc0000) - e1:SetCondition(c18807108.rcon) - tc:RegisterEffect(e1,true) - local e2=e1:Clone() - e2:SetCode(EFFECT_CANNOT_ATTACK) - tc:RegisterEffect(e2,true) - end -end -function c18807108.rcon(e) - return not e:GetHandler():IsImmuneToEffect(e) and e:GetOwner():IsRelateToCard(e:GetHandler()) -end -function c18807108.descon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsStatus(STATUS_DESTROY_CONFIRMED) then return false end - local tc=e:GetLabelObject() - return tc and eg:IsContains(tc) and tc:IsReason(REASON_DESTROY) and c:IsRelateToCard(tc) -end -function c18807108.desop(e,tp,eg,ep,ev,re,r,rp) - Duel.Destroy(e:GetHandler(),REASON_EFFECT) -end diff --git a/script/c18816758.lua b/script/c18816758.lua deleted file mode 100644 index 82a36fe24b..0000000000 --- a/script/c18816758.lua +++ /dev/null @@ -1,36 +0,0 @@ ---侵略の波動 -function c18816758.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCost(c18816758.cost) - e1:SetTarget(c18816758.target) - e1:SetOperation(c18816758.activate) - c:RegisterEffect(e1) -end -function c18816758.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x100a) - and bit.band(c:GetSummonType(),SUMMON_TYPE_ADVANCE)==SUMMON_TYPE_ADVANCE and c:IsAbleToHandAsCost() -end -function c18816758.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c18816758.cfilter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g=Duel.SelectMatchingCard(tp,c18816758.cfilter,tp,LOCATION_MZONE,0,1,1,nil) - Duel.SendtoHand(g,nil,REASON_COST) -end -function c18816758.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() and chkc:IsDestructable() end - if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,0,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,0,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c18816758.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c18828179.lua b/script/c18828179.lua deleted file mode 100644 index db788b19d8..0000000000 --- a/script/c18828179.lua +++ /dev/null @@ -1,58 +0,0 @@ ---マザー・ブレイン -function c18828179.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c18828179.spcon) - e1:SetOperation(c18828179.spop) - c:RegisterEffect(e1) - --to hand - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(18828179,0)) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCost(c18828179.descost) - e2:SetTarget(c18828179.destg) - e2:SetOperation(c18828179.desop) - c:RegisterEffect(e2) -end -function c18828179.rfilter(c) - return c:IsCode(45045866) -end -function c18828179.spcon(e,c) - if c==nil then return true end - return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-1 - and Duel.CheckReleaseGroup(c:GetControler(),c18828179.rfilter,1,nil) -end -function c18828179.spop(e,tp,eg,ep,ev,re,r,rp,c) - local g=Duel.SelectReleaseGroup(c:GetControler(),c18828179.rfilter,1,1,nil) - Duel.Release(g,REASON_COST) -end -function c18828179.cfilter(c) - return c:IsAttribute(ATTRIBUTE_WATER) and c:IsDiscardable() and c:IsAbleToGraveAsCost() -end -function c18828179.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c18828179.cfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,c18828179.cfilter,1,1,REASON_COST+REASON_DISCARD) -end -function c18828179.filter(c) - return c:IsFacedown() and c:IsDestructable() -end -function c18828179.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and c18828179.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c18828179.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c18828179.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c18828179.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsFacedown() and tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c18842395.lua b/script/c18842395.lua deleted file mode 100644 index 0f7dd9a312..0000000000 --- a/script/c18842395.lua +++ /dev/null @@ -1,16 +0,0 @@ ---パワー・インベーダー -function c18842395.initial_effect(c) - --summon with no tribute - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(18842395,0)) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SUMMON_PROC) - e1:SetCondition(c18842395.ntcon) - c:RegisterEffect(e1) -end -function c18842395.ntcon(e,c,minc) - if c==nil then return true end - return minc==0 and c:GetLevel()>4 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 - and Duel.GetFieldGroupCount(c:GetControler(),0,LOCATION_MZONE)>=2 -end diff --git a/script/c18865703.lua b/script/c18865703.lua deleted file mode 100644 index b6be93d3c5..0000000000 --- a/script/c18865703.lua +++ /dev/null @@ -1,85 +0,0 @@ ---ZW-玄武絶対聖盾 -function c18865703.initial_effect(c) - c:SetUniqueOnField(1,0,18865703) - --equip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(18865703,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c18865703.eqcon) - e1:SetTarget(c18865703.eqtg) - e1:SetOperation(c18865703.eqop) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(18865703,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_SUMMON_SUCCESS) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e2:SetTarget(c18865703.sptg) - e2:SetOperation(c18865703.spop) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e3) -end -function c18865703.eqcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():CheckUniqueOnField(tp) -end -function c18865703.filter(c) - return c:IsFaceup() and c:IsSetCard(0x7f) -end -function c18865703.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c18865703.filter(chkc) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingTarget(c18865703.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c18865703.filter,tp,LOCATION_MZONE,0,1,1,nil) -end -function c18865703.eqop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) or c:IsFacedown() then return end - local tc=Duel.GetFirstTarget() - if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or tc:GetControler()~=tp or tc:IsFacedown() or not tc:IsRelateToEffect(e) or not c:CheckUniqueOnField(tp) then - Duel.SendtoGrave(c,REASON_EFFECT) - return - end - Duel.Equip(tp,c,tc,true) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(c18865703.eqlimit) - e1:SetLabelObject(tc) - c:RegisterEffect(e1) - --atkup - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_UPDATE_DEFENCE) - e2:SetValue(2000) - e2:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e2) -end -function c18865703.eqlimit(e,c) - return c==e:GetLabelObject() -end -function c18865703.spfilter(c,e,tp) - return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c18865703.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and c18865703.spfilter(chkc,e,tp) end - if chk==0 then return Duel.IsExistingTarget(c18865703.spfilter,tp,LOCATION_REMOVED,0,1,nil,e,tp) - and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c18865703.spfilter,tp,LOCATION_REMOVED,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c18865703.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENCE) - end -end diff --git a/script/c18891691.lua b/script/c18891691.lua deleted file mode 100644 index 0ea3aac105..0000000000 --- a/script/c18891691.lua +++ /dev/null @@ -1,17 +0,0 @@ ---パーフェクト機械王 -function c18891691.initial_effect(c) - --atkup - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetRange(LOCATION_MZONE) - e1:SetValue(c18891691.val) - c:RegisterEffect(e1) -end -function c18891691.val(e,c) - return Duel.GetMatchingGroupCount(c18891691.filter,c:GetControler(),LOCATION_MZONE,LOCATION_MZONE,e:GetHandler())*500 -end -function c18891691.filter(c) - return c:IsFaceup() and c:IsRace(RACE_MACHINE) -end diff --git a/script/c18895832.lua b/script/c18895832.lua deleted file mode 100644 index 2f00b7f372..0000000000 --- a/script/c18895832.lua +++ /dev/null @@ -1,34 +0,0 @@ ---システム・ダウン -function c18895832.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_REMOVE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c18895832.cost) - e1:SetTarget(c18895832.target) - e1:SetOperation(c18895832.activate) - c:RegisterEffect(e1) -end -function c18895832.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,1000) end - Duel.PayLPCost(tp,1000) -end -function c18895832.filter(c) - return c:IsFaceup() and c:IsRace(RACE_MACHINE) -end -function c18895832.tfilter(c) - return not c:IsAbleToRemove() -end -function c18895832.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local g=Duel.GetMatchingGroup(c18895832.filter,tp,0,LOCATION_MZONE+LOCATION_GRAVE,nil) - return g:GetCount()>0 and not g:IsExists(c18895832.tfilter,1,nil) - end - local g=Duel.GetMatchingGroup(c18895832.filter,tp,0,LOCATION_MZONE+LOCATION_GRAVE,nil) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,0) -end -function c18895832.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c18895832.filter,tp,0,LOCATION_MZONE+LOCATION_GRAVE,nil) - Duel.Remove(g,POS_FACEUP,REASON_EFFECT) -end diff --git a/script/c18937875.lua b/script/c18937875.lua deleted file mode 100644 index 57a0cbae3b..0000000000 --- a/script/c18937875.lua +++ /dev/null @@ -1,50 +0,0 @@ ---灼熱の槍 -function c18937875.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c18937875.target) - e1:SetOperation(c18937875.operation) - c:RegisterEffect(e1) - --atk up - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(400) - c:RegisterEffect(e2) - --def down - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_EQUIP) - e3:SetCode(EFFECT_UPDATE_DEFENCE) - e3:SetValue(-200) - c:RegisterEffect(e3) - --equip limit - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetCode(EFFECT_EQUIP_LIMIT) - e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e4:SetValue(c18937875.eqlimit) - c:RegisterEffect(e4) -end -function c18937875.eqlimit(e,c) - return c:IsAttribute(ATTRIBUTE_FIRE) -end -function c18937875.filter(c) - return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_FIRE) -end -function c18937875.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c18937875.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c18937875.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c18937875.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c18937875.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,e:GetHandler(),tc) - end -end diff --git a/script/c18960169.lua b/script/c18960169.lua deleted file mode 100644 index 7b27704c35..0000000000 --- a/script/c18960169.lua +++ /dev/null @@ -1,51 +0,0 @@ ---ゴブリン陽動部隊 -function c18960169.initial_effect(c) - --draw - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(18960169,0)) - e1:SetCategory(CATEGORY_DRAW) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_BATTLE_DAMAGE) - e1:SetCondition(c18960169.condition) - e1:SetTarget(c18960169.target) - e1:SetOperation(c18960169.operation) - c:RegisterEffect(e1) - --to defence - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_PHASE+PHASE_BATTLE) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCondition(c18960169.poscon) - e2:SetOperation(c18960169.posop) - c:RegisterEffect(e2) -end -function c18960169.condition(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp -end -function c18960169.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(1) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c18960169.operation(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end -function c18960169.poscon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetAttackedCount()>0 -end -function c18960169.posop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsAttackPos() then - Duel.ChangePosition(c,POS_FACEUP_DEFENCE) - end - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_CHANGE_POSITION) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_COPY_INHERIT) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,3) - c:RegisterEffect(e1) -end diff --git a/script/c1896112.lua b/script/c1896112.lua deleted file mode 100644 index 673c58d18d..0000000000 --- a/script/c1896112.lua +++ /dev/null @@ -1,63 +0,0 @@ ---次元誘爆 -function c1896112.initial_effect(c) - --activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c1896112.cost) - e1:SetTarget(c1896112.target) - e1:SetOperation(c1896112.operation) - c:RegisterEffect(e1) -end -function c1896112.cfilter(c) - return c:IsFaceup() and c:IsType(TYPE_FUSION) and c:IsAbleToExtraAsCost() -end -function c1896112.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c1896112.cfilter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectMatchingCard(tp,c1896112.cfilter,tp,LOCATION_MZONE,0,1,1,nil) - Duel.SendtoDeck(g,nil,0,REASON_COST) -end -function c1896112.filter(c,e,tp) - return c:IsFaceup() and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c1896112.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 and Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c1896112.filter,tp,LOCATION_REMOVED,0,1,nil,e,tp) - and Duel.IsExistingTarget(c1896112.filter,1-tp,LOCATION_REMOVED,0,1,nil,e,1-tp) end - local ft1=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ft1>2 then ft1=2 end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g1=Duel.SelectTarget(tp,c1896112.filter,tp,LOCATION_REMOVED,0,1,ft1,nil,e,tp) - local ft2=Duel.GetLocationCount(1-tp,LOCATION_MZONE) - if ft2>2 then ft2=2 end - Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_SPSUMMON) - local g2=Duel.SelectTarget(1-tp,c1896112.filter,1-tp,LOCATION_REMOVED,0,1,ft2,nil,e,1-tp) - g1:Merge(g2) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g1,g1:GetCount(),0,0) -end -function c1896112.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) - local g1=g:Filter(Card.IsControler,nil,tp) - local g2=g:Filter(Card.IsControler,nil,1-tp) - local ft1=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ft1>=g1:GetCount() then - local tc=g1:GetFirst() - while tc do - Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) - tc=g1:GetNext() - end - end - local ft2=Duel.GetLocationCount(1-tp,LOCATION_MZONE) - if ft2>=g2:GetCount() then - local tc=g2:GetFirst() - while tc do - Duel.SpecialSummonStep(tc,0,1-tp,1-tp,false,false,POS_FACEUP) - tc=g2:GetNext() - end - end - Duel.SpecialSummonComplete() -end diff --git a/script/c18964575.lua b/script/c18964575.lua deleted file mode 100644 index fcf12d30b1..0000000000 --- a/script/c18964575.lua +++ /dev/null @@ -1,26 +0,0 @@ ---速攻のかかし -function c18964575.initial_effect(c) - --end battle phase - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(18964575,0)) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c18964575.condition) - e1:SetCost(c18964575.cost) - e1:SetOperation(c18964575.operation) - c:RegisterEffect(e1) -end -function c18964575.condition(e,tp,eg,ep,ev,re,r,rp) - local at=Duel.GetAttacker() - return at:GetControler()~=tp and Duel.GetAttackTarget()==nil -end -function c18964575.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsDiscardable() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD) -end -function c18964575.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.NegateAttack() then - Duel.SkipPhase(1-tp,PHASE_BATTLE,RESET_PHASE+PHASE_BATTLE,1) - end -end diff --git a/script/c18988391.lua b/script/c18988391.lua deleted file mode 100644 index 728f2888ed..0000000000 --- a/script/c18988391.lua +++ /dev/null @@ -1,26 +0,0 @@ ---アマリリース -function c18988391.initial_effect(c) - --decrease tribute - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(18988391,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_GRAVE) - e1:SetCountLimit(1,18988391) - e1:SetCost(c18988391.cost) - e1:SetOperation(c18988391.operation) - c:RegisterEffect(e1) -end -function c18988391.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) -end -function c18988391.operation(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_DECREASE_TRIBUTE) - e1:SetTargetRange(LOCATION_HAND,0) - e1:SetCountLimit(1) - e1:SetValue(0x1) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) -end diff --git a/script/c19012345.lua b/script/c19012345.lua deleted file mode 100644 index 6358c9352f..0000000000 --- a/script/c19012345.lua +++ /dev/null @@ -1,24 +0,0 @@ ---灰塵王 アッシュ・ガッシュ -function c19012345.initial_effect(c) - --lvup - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(19012345,0)) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_BATTLE_DAMAGE) - e1:SetCondition(c19012345.condition) - e1:SetOperation(c19012345.operation) - c:RegisterEffect(e1) -end -function c19012345.condition(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp and e:GetHandler():GetLevel()<12 -end -function c19012345.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) or c:IsFacedown() then return end - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_LEVEL) - e1:SetValue(1) - e1:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e1) -end diff --git a/script/c19019586.lua b/script/c19019586.lua deleted file mode 100644 index 5b36384f7d..0000000000 --- a/script/c19019586.lua +++ /dev/null @@ -1,57 +0,0 @@ ---ジェムエレファント -function c19019586.initial_effect(c) - --to hand - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetDescription(aux.Stringid(19019586,0)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetRange(LOCATION_MZONE) - e1:SetTarget(c19019586.thtg) - e1:SetOperation(c19019586.thop) - c:RegisterEffect(e1) - --defup - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(19019586,1)) - e2:SetCategory(CATEGORY_DEFCHANGE) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_PRE_DAMAGE_CALCULATE) - e2:SetRange(LOCATION_MZONE) - e2:SetCondition(c19019586.defcon) - e2:SetCost(c19019586.defcost) - e2:SetOperation(c19019586.defop) - c:RegisterEffect(e2) -end -function c19019586.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToHand() end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0) -end -function c19019586.thop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFaceup() and c:IsRelateToEffect(e) then - Duel.SendtoHand(c,nil,REASON_EFFECT) - end -end -function c19019586.cfilter(c) - return c:IsType(TYPE_NORMAL) and c:IsAbleToGraveAsCost() -end -function c19019586.defcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c==Duel.GetAttacker() or c==Duel.GetAttackTarget() -end -function c19019586.defcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():GetFlagEffect(19019586)==0 - and Duel.IsExistingMatchingCard(c19019586.cfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c19019586.cfilter,tp,LOCATION_HAND,0,1,1,nil) - Duel.SendtoGrave(g,REASON_COST) - e:GetHandler():RegisterFlagEffect(19019586,RESET_PHASE+RESET_DAMAGE_CAL,0,1) -end -function c19019586.defop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_DEFENCE) - e1:SetReset(RESET_PHASE+RESET_DAMAGE_CAL) - e1:SetValue(1000) - c:RegisterEffect(e1) -end diff --git a/script/c19024706.lua b/script/c19024706.lua deleted file mode 100644 index 9d3a828b2e..0000000000 --- a/script/c19024706.lua +++ /dev/null @@ -1,39 +0,0 @@ ---ヒーロー逆襲 -function c19024706.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetCondition(c19024706.condition) - e1:SetTarget(c19024706.target) - e1:SetOperation(c19024706.activate) - c:RegisterEffect(e1) -end -function c19024706.cfilter(c,tp) - return c:IsSetCard(0x3008) and c:GetPreviousControler()==tp -end -function c19024706.condition(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c19024706.cfilter,1,nil,tp) -end -function c19024706.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_HAND,0,1,nil,0x3008) end -end -function c19024706.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetFieldGroup(tp,LOCATION_HAND,0) - local sg=g:RandomSelect(1-tp,1) - local tc=sg:GetFirst() - if tc then - Duel.ConfirmCards(1-tp,tc) - if tc:IsSetCard(0x3008) and tc:IsType(TYPE_MONSTER) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local dg=Duel.SelectMatchingCard(tp,Card.IsDestructable,tp,0,LOCATION_MZONE,1,1,nil) - Duel.Destroy(dg,REASON_EFFECT) - if Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)==0 then - Duel.ShuffleHand(tp) - end - else - Duel.ShuffleHand(tp) - end - end -end diff --git a/script/c19025379.lua b/script/c19025379.lua deleted file mode 100644 index a36dbb942f..0000000000 --- a/script/c19025379.lua +++ /dev/null @@ -1,57 +0,0 @@ ---ロード・オブ・ザ・レッド -function c19025379.initial_effect(c) - c:EnableReviveLimit() - --destroy monster - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(19025379,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_CHAINING) - e1:SetRange(LOCATION_MZONE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCountLimit(1) - e1:SetCondition(c19025379.descon) - e1:SetTarget(c19025379.destg1) - e1:SetOperation(c19025379.desop1) - c:RegisterEffect(e1) - --destroy spell & trap - local e2=e1:Clone() - e2:SetDescription(aux.Stringid(19025379,1)) - e2:SetTarget(c19025379.destg2) - e2:SetOperation(c19025379.desop2) - c:RegisterEffect(e2) -end -function c19025379.descon(e,tp,eg,ep,ev,re,r,rp) - return not re:GetHandler():IsCode(19025379) and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) -end -function c19025379.destg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsDestructable() end - if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c19025379.desfilter2(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable() -end -function c19025379.destg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and c19025379.desfilter2(chkc) end - if chk==0 then return Duel.IsExistingTarget(c19025379.desfilter2,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c19025379.desfilter2,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c19025379.desop1(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsType(TYPE_MONSTER) then - Duel.Destroy(tc,REASON_EFFECT) - end -end -function c19025379.desop2(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c19028307.lua b/script/c19028307.lua deleted file mode 100644 index 7268e95988..0000000000 --- a/script/c19028307.lua +++ /dev/null @@ -1,52 +0,0 @@ ---獣神機王バルバロスUr -function c19028307.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c19028307.spcon) - e1:SetOperation(c19028307.spop) - c:RegisterEffect(e1) - --no battle damage - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_NO_BATTLE_DAMAGE) - c:RegisterEffect(e2) -end -function c19028307.spfilter(c,rac) - return c:IsRace(rac) and c:IsAbleToRemoveAsCost() and (not c:IsLocation(LOCATION_MZONE) or c:IsFaceup()) -end -function c19028307.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - local n=0 - if Duel.IsExistingMatchingCard(c19028307.spfilter,tp,LOCATION_MZONE,0,1,c,RACE_BEASTWARRIOR) then n=n-1 end - if Duel.IsExistingMatchingCard(c19028307.spfilter,tp,LOCATION_MZONE,0,1,c,RACE_MACHINE) then n=n-1 end - return Duel.GetLocationCount(tp,LOCATION_MZONE)>n - and Duel.IsExistingMatchingCard(c19028307.spfilter,tp,0x16,0,1,c,RACE_BEASTWARRIOR) - and Duel.IsExistingMatchingCard(c19028307.spfilter,tp,0x16,0,1,c,RACE_MACHINE) -end -function c19028307.spop(e,tp,eg,ep,ev,re,r,rp,c) - local g1=nil - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ft~=0 then - local loc=0x16 - if ft<0 then loc=LOCATION_MZONE end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - g1=Duel.SelectMatchingCard(tp,c19028307.spfilter,tp,loc,0,1,1,c,RACE_BEASTWARRIOR) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g2=Duel.SelectMatchingCard(tp,c19028307.spfilter,tp,loc,0,1,1,c,RACE_MACHINE) - g1:Merge(g2) - else - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - g1=Duel.SelectMatchingCard(tp,c19028307.spfilter,tp,LOCATION_MZONE,0,1,1,c,RACE_BEASTWARRIOR+RACE_MACHINE) - local rc=RACE_BEASTWARRIOR - if g1:GetFirst():IsRace(RACE_BEASTWARRIOR) then rc=RACE_MACHINE end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g2=Duel.SelectMatchingCard(tp,c19028307.spfilter,tp,0x16,0,1,1,c,rc) - g1:Merge(g2) - end - Duel.Remove(g1,POS_FACEUP,REASON_COST) -end diff --git a/script/c19041767.lua b/script/c19041767.lua deleted file mode 100644 index d02aed4ff4..0000000000 --- a/script/c19041767.lua +++ /dev/null @@ -1,56 +0,0 @@ ---デュアル・サモナー -function c19041767.initial_effect(c) - --battle indes - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_INDESTRUCTABLE_COUNT) - e1:SetCountLimit(1) - e1:SetValue(c19041767.valcon) - c:RegisterEffect(e1) - --instant - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(19041767,0)) - e2:SetCategory(CATEGORY_SUMMON) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EVENT_PHASE+PHASE_END) - e2:SetCountLimit(1) - e2:SetCondition(c19041767.condition) - e2:SetCost(c19041767.cost) - e2:SetTarget(c19041767.target) - e2:SetOperation(c19041767.operation) - c:RegisterEffect(e2) -end -function c19041767.valcon(e,re,r,rp) - return bit.band(r,REASON_BATTLE)~=0 -end -function c19041767.filter(c) - return c:IsType(TYPE_DUAL) and (c:IsSummonable(true,nil) or c:IsMSetable(true,nil)) -end -function c19041767.condition(e,tp,eg,ep,ev,re,r,rp) - return tp~=Duel.GetTurnPlayer() -end -function c19041767.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,500) end - Duel.PayLPCost(tp,500) -end -function c19041767.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c19041767.filter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,0,0) -end -function c19041767.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON) - local g=Duel.SelectMatchingCard(tp,c19041767.filter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil) - local tc=g:GetFirst() - if tc then - local s1=tc:IsSummonable(true,nil) - local s2=tc:IsMSetable(true,nil) - if (s1 and s2 and Duel.SelectPosition(tp,tc,POS_FACEUP_ATTACK+POS_FACEDOWN_DEFENCE)==POS_FACEUP_ATTACK) or not s2 then - Duel.Summon(tp,tc,true,nil) - else - Duel.MSet(tp,tc,true,nil) - end - end -end diff --git a/script/c19048328.lua b/script/c19048328.lua deleted file mode 100644 index e439b3014f..0000000000 --- a/script/c19048328.lua +++ /dev/null @@ -1,117 +0,0 @@ ---幻竜星-チョウホウ -function c19048328.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1) - c:EnableReviveLimit() - --mat check - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_MATERIAL_CHECK) - e1:SetValue(c19048328.matcheck) - c:RegisterEffect(e1) - --act limit - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetCode(EFFECT_CANNOT_ACTIVATE) - e2:SetRange(LOCATION_MZONE) - e2:SetTargetRange(0,1) - e2:SetCondition(c19048328.condition) - e2:SetValue(c19048328.aclimit) - e2:SetLabelObject(e1) - c:RegisterEffect(e2) - --search - local e3=Effect.CreateEffect(c) - e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e3:SetCode(EVENT_TO_GRAVE) - e3:SetCondition(c19048328.thcon) - e3:SetTarget(c19048328.thtg) - e3:SetOperation(c19048328.thop) - c:RegisterEffect(e3) - --spsummon - local e4=Effect.CreateEffect(c) - e4:SetCategory(CATEGORY_SPECIAL_SUMMON) - e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e4:SetCode(EVENT_DESTROYED) - e4:SetRange(LOCATION_MZONE) - e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e4:SetCountLimit(1) - e4:SetCondition(c19048328.spcon) - e4:SetTarget(c19048328.sptg) - e4:SetOperation(c19048328.spop) - c:RegisterEffect(e4) -end -function c19048328.matcheck(e,c) - local g=c:GetMaterial():Filter(Card.IsSetCard,nil,0x9e) - local att=0 - local tc=g:GetFirst() - while tc do - att=bit.bor(att,tc:GetOriginalAttribute()) - tc=g:GetNext() - end - e:SetLabel(att) -end -function c19048328.condition(e) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_SYNCHRO -end -function c19048328.aclimit(e,re,tp) - local att=e:GetLabelObject():GetLabel() - return re:IsActiveType(TYPE_MONSTER) and bit.band(att,re:GetHandler():GetOriginalAttribute())~=0 - and not re:GetHandler():IsImmuneToEffect(e) -end -function c19048328.thcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE+REASON_EFFECT) - and c:GetSummonType()==SUMMON_TYPE_SYNCHRO -end -function c19048328.thfilter(c) - return c:IsType(TYPE_TUNER) and c:IsAbleToHand() -end -function c19048328.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c19048328.thfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c19048328.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c19048328.thfilter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end -function c19048328.cfilter(c,p) - return c:IsReason(REASON_BATTLE+REASON_EFFECT) and c:GetOriginalAttribute()~=0 - and c:IsPreviousLocation(LOCATION_MZONE) and c:GetPreviousControler()==p -end -function c19048328.spcon(e,tp,eg,ep,ev,re,r,rp) - local g=eg:Filter(c19048328.cfilter,nil,1-tp) - if g:GetCount()>0 then - local att=0 - local tc=g:GetFirst() - while tc do - att=bit.bor(att,tc:GetOriginalAttribute()) - tc=g:GetNext() - end - e:SetLabel(att) - return true - else return false end -end -function c19048328.spfilter(c,e,tp,att) - return c:IsRace(RACE_WYRM) and bit.band(att,c:GetOriginalAttribute())~=0 - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c19048328.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c19048328.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp,e:GetLabel()) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c19048328.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c19048328.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,e:GetLabel()) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENCE) - end -end diff --git a/script/c19059929.lua b/script/c19059929.lua deleted file mode 100644 index e905556f1e..0000000000 --- a/script/c19059929.lua +++ /dev/null @@ -1,51 +0,0 @@ ---炎舞-「玉衝」 -function c19059929.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c19059929.target) - e1:SetOperation(c19059929.operation) - c:RegisterEffect(e1) - --atkup - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(LOCATION_MZONE,0) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetTarget(aux.TargetBoolFunction(Card.IsRace,RACE_BEASTWARRIOR)) - e2:SetValue(100) - c:RegisterEffect(e2) -end -function c19059929.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_SZONE) and chkc:IsFacedown() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFacedown,tp,0,LOCATION_SZONE,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(19059929,0)) - local g=Duel.SelectTarget(tp,Card.IsFacedown,tp,0,LOCATION_SZONE,1,1,e:GetHandler()) - Duel.SetChainLimit(c19059929.limit(g:GetFirst())) -end -function c19059929.limit(c) - return function (e,lp,tp) - return e:GetHandler()~=c - end -end -function c19059929.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsFacedown() and tc:IsRelateToEffect(e) then - c:SetCardTarget(tc) - e:SetLabelObject(tc) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_OWNER_RELATE) - e1:SetCode(EFFECT_CANNOT_TRIGGER) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetCondition(c19059929.rcon) - e1:SetValue(1) - tc:RegisterEffect(e1) - end -end -function c19059929.rcon(e) - return e:GetOwner():IsHasCardTarget(e:GetHandler()) -end diff --git a/script/c19066538.lua b/script/c19066538.lua deleted file mode 100644 index 9a07d1676b..0000000000 --- a/script/c19066538.lua +++ /dev/null @@ -1,6 +0,0 @@ ---轟きの大海蛇 -function c19066538.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcCode2(c,98049915,2118022,true,true) -end diff --git a/script/c19086954.lua b/script/c19086954.lua deleted file mode 100644 index bcc082a8cb..0000000000 --- a/script/c19086954.lua +++ /dev/null @@ -1,105 +0,0 @@ ---セコンド・ゴブリン -function c19086954.initial_effect(c) - --equip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(19086954,0)) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetTarget(c19086954.eqtg) - e1:SetOperation(c19086954.eqop) - c:RegisterEffect(e1) - --unequip - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(19086954,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_SZONE) - e2:SetCondition(c19086954.uncon) - e2:SetTarget(c19086954.sptg) - e2:SetOperation(c19086954.spop) - c:RegisterEffect(e2) - --pos change - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(19086954,2)) - e3:SetCategory(CATEGORY_POSITION) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_SZONE) - e3:SetCountLimit(1) - e3:SetCondition(c19086954.uncon) - e3:SetTarget(c19086954.postg) - e3:SetOperation(c19086954.posop) - c:RegisterEffect(e3) - --destroy sub - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_EQUIP) - e5:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e5:SetCode(EFFECT_DESTROY_SUBSTITUTE) - e5:SetCondition(c19086954.uncon) - e5:SetValue(c19086954.repval) - c:RegisterEffect(e5) - --eqlimit - local e6=Effect.CreateEffect(c) - e6:SetType(EFFECT_TYPE_SINGLE) - e6:SetCode(EFFECT_EQUIP_LIMIT) - e6:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e6:SetValue(c19086954.eqlimit) - c:RegisterEffect(e6) -end -function c19086954.uncon(e) - return e:GetHandler():IsStatus(STATUS_UNION) -end -function c19086954.repval(e,re,r,rp) - return bit.band(r,REASON_BATTLE)~=0 -end -function c19086954.eqlimit(e,c) - return c:IsCode(73698349) -end -function c19086954.filter(c) - return c:IsFaceup() and c:IsCode(73698349) and c:GetUnionCount()==0 -end -function c19086954.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c19086954.filter(chkc) end - if chk==0 then return e:GetHandler():GetFlagEffect(19086954)==0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingTarget(c19086954.filter,tp,LOCATION_MZONE,0,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local g=Duel.SelectTarget(tp,c19086954.filter,tp,LOCATION_MZONE,0,1,1,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0) - e:GetHandler():RegisterFlagEffect(19086954,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1) -end -function c19086954.eqop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if not c:IsRelateToEffect(e) or c:IsFacedown() then return end - if not tc:IsRelateToEffect(e) or not c19086954.filter(tc) then - Duel.SendtoGrave(c,REASON_EFFECT) - return - end - if not Duel.Equip(tp,c,tc,false) then return end - c:SetStatus(STATUS_UNION,true) -end -function c19086954.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():GetFlagEffect(19086954)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,false) end - Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) - e:GetHandler():RegisterFlagEffect(19086954,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1) -end -function c19086954.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP_ATTACK) - end -end -function c19086954.postg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) - Duel.SetOperationInfo(0,CATEGORY_POSITION,e:GetHandler():GetEquipTarget(),1,0,0) -end -function c19086954.posop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.ChangePosition(c:GetEquipTarget(),POS_FACEUP_DEFENCE,0,POS_FACEUP_ATTACK,0) - end -end diff --git a/script/c19113101.lua b/script/c19113101.lua deleted file mode 100644 index 1f59a7e7d0..0000000000 --- a/script/c19113101.lua +++ /dev/null @@ -1,38 +0,0 @@ ---プリベントマト -function c19113101.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(19113101,0)) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetRange(LOCATION_GRAVE) - e1:SetCondition(c19113101.condition) - e1:SetCost(c19113101.cost) - e1:SetOperation(c19113101.operation) - c:RegisterEffect(e1) -end -function c19113101.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp -end -function c19113101.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) -end -function c19113101.operation(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CHANGE_DAMAGE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetTargetRange(1,0) - e1:SetValue(c19113101.damval) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) - local e2=e1:Clone() - e2:SetCode(EFFECT_NO_EFFECT_DAMAGE) - e2:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e2,tp) -end -function c19113101.damval(e,re,val,r,rp,rc) - if bit.band(r,REASON_EFFECT)~=0 then return 0 - else return val end -end diff --git a/script/c19139516.lua b/script/c19139516.lua deleted file mode 100644 index d8dc177493..0000000000 --- a/script/c19139516.lua +++ /dev/null @@ -1,66 +0,0 @@ ---スクラップ・ビースト -function c19139516.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EVENT_BE_BATTLE_TARGET) - e1:SetOperation(c19139516.regop) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(19139516,0)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EVENT_PHASE+PHASE_BATTLE) - e2:SetCountLimit(1) - e2:SetTarget(c19139516.destg) - e2:SetOperation(c19139516.desop) - c:RegisterEffect(e2) - --search - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(19139516,1)) - e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_TO_GRAVE) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e3:SetCondition(c19139516.thcon) - e3:SetTarget(c19139516.thtg) - e3:SetOperation(c19139516.thop) - c:RegisterEffect(e3) -end -function c19139516.regop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsDefencePos() and e:GetHandler():IsFaceup() then - e:GetHandler():RegisterFlagEffect(19139516,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_BATTLE,0,1) - end -end -function c19139516.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():GetFlagEffect(19139516)~=0 end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0) -end -function c19139516.desop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - Duel.Destroy(e:GetHandler(),REASON_EFFECT) - end -end -function c19139516.thcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return bit.band(c:GetReason(),0x41)==0x41 and re:GetOwner():IsSetCard(0x24) -end -function c19139516.filter(c) - return c:IsSetCard(0x24) and c:IsType(TYPE_MONSTER) and c:GetCode()~=19139516 and c:IsAbleToHand() -end -function c19139516.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c19139516.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c19139516.filter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c19139516.filter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c19139516.thop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end diff --git a/script/c19153634.lua b/script/c19153634.lua deleted file mode 100644 index 2a9db23c33..0000000000 --- a/script/c19153634.lua +++ /dev/null @@ -1,26 +0,0 @@ ---ノーブル・ド・ノワール -function c19153634.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetCondition(c19153634.condition) - e1:SetOperation(c19153634.operation) - c:RegisterEffect(e1) -end -function c19153634.condition(e,tp,eg,ep,ev,re,r,rp) - return tp~=Duel.GetTurnPlayer() -end -function c19153634.operation(e,tp,eg,ep,ev,re,r,rp) - local ats=eg:GetFirst():GetAttackableTarget() - local at=Duel.GetAttackTarget() - if ats:GetCount()==0 or (at and ats:GetCount()==1) then return end - if Duel.SelectYesNo(tp,aux.Stringid(19153634,0)) then - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(19153634,1)) - local g=ats:Select(tp,1,1,at) - Duel.Hint(HINT_CARD,0,19153634) - Duel.HintSelection(g) - Duel.ChangeAttackTarget(g:GetFirst()) - end -end diff --git a/script/c19159413.lua b/script/c19159413.lua deleted file mode 100644 index 5689e454ee..0000000000 --- a/script/c19159413.lua +++ /dev/null @@ -1,31 +0,0 @@ ---魔法除去 -function c19159413.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c19159413.target) - e1:SetOperation(c19159413.activate) - c:RegisterEffect(e1) -end -function c19159413.filter(c) - return c:IsFacedown() or c:IsType(TYPE_SPELL) -end -function c19159413.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_SZONE) and c19159413.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c19159413.filter,tp,LOCATION_SZONE,LOCATION_SZONE,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c19159413.filter,tp,LOCATION_SZONE,LOCATION_SZONE,1,1,e:GetHandler()) - if g:GetFirst():IsFaceup() then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) - end -end -function c19159413.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - if tc:IsFacedown() then Duel.ConfirmCards(tp,tc) end - if tc:IsType(TYPE_SPELL) then Duel.Destroy(tc,REASON_EFFECT) end - end -end diff --git a/script/c19163116.lua b/script/c19163116.lua deleted file mode 100644 index 11ac05b101..0000000000 --- a/script/c19163116.lua +++ /dev/null @@ -1,35 +0,0 @@ ---ジェムナイト・オブシディア -function c19163116.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(19163116,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCondition(c19163116.spcon) - e1:SetTarget(c19163116.sptg) - e1:SetOperation(c19163116.spop) - c:RegisterEffect(e1) -end -function c19163116.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetPreviousLocation()==LOCATION_HAND -end -function c19163116.filter(c,e,tp) - return c:IsLevelBelow(4) and c:IsType(TYPE_NORMAL) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c19163116.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c19163116.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c19163116.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c19163116.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,g:GetCount(),0,0) -end -function c19163116.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c191749.lua b/script/c191749.lua deleted file mode 100644 index b15b44ad11..0000000000 --- a/script/c191749.lua +++ /dev/null @@ -1,57 +0,0 @@ ---ヒーローフラッシュ!! -function c191749.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c191749.cost) - e1:SetTarget(c191749.target) - e1:SetOperation(c191749.activate) - c:RegisterEffect(e1) -end -function c191749.cfilter(c,code) - return c:IsCode(code) and c:IsAbleToRemoveAsCost() -end -function c191749.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c191749.cfilter,tp,LOCATION_GRAVE,0,1,nil,74825788) - and Duel.IsExistingMatchingCard(c191749.cfilter,tp,LOCATION_GRAVE,0,1,nil,213326) - and Duel.IsExistingMatchingCard(c191749.cfilter,tp,LOCATION_GRAVE,0,1,nil,37318031) - and Duel.IsExistingMatchingCard(c191749.cfilter,tp,LOCATION_GRAVE,0,1,nil,63703130) end - local tc1=Duel.GetFirstMatchingCard(c191749.cfilter,tp,LOCATION_GRAVE,0,nil,74825788) - local tc2=Duel.GetFirstMatchingCard(c191749.cfilter,tp,LOCATION_GRAVE,0,nil,213326) - local tc3=Duel.GetFirstMatchingCard(c191749.cfilter,tp,LOCATION_GRAVE,0,nil,37318031) - local tc4=Duel.GetFirstMatchingCard(c191749.cfilter,tp,LOCATION_GRAVE,0,nil,63703130) - local g=Group.FromCards(tc1,tc2,tc3,tc4) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c191749.filter(c,e,tp) - return c:IsSetCard(0x3008) and c:IsType(TYPE_NORMAL) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c191749.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c191749.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c191749.dfilter(c) - return c:IsFaceup() and c:IsType(TYPE_NORMAL) and c:IsSetCard(0x3008) -end -function c191749.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c191749.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end - end - local dg=Duel.GetMatchingGroup(c191749.dfilter,tp,LOCATION_MZONE,0,nil) - local tc=dg:GetFirst() - while tc do - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DIRECT_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - tc=dg:GetNext() - end -end diff --git a/script/c1918087.lua b/script/c1918087.lua deleted file mode 100644 index 62dba14083..0000000000 --- a/script/c1918087.lua +++ /dev/null @@ -1,39 +0,0 @@ ---ゴブリンの小役人 -function c1918087.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_DRAW_PHASE) - e1:SetCondition(c1918087.actcon) - c:RegisterEffect(e1) - --damage - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(1918087,0)) - e2:SetCategory(CATEGORY_DAMAGE) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetRange(LOCATION_SZONE) - e2:SetCountLimit(1) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) - e2:SetCondition(c1918087.damcon) - e2:SetTarget(c1918087.damtg) - e2:SetOperation(c1918087.damop) - c:RegisterEffect(e2) -end -function c1918087.actcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetLP(1-tp)<=3000 -end -function c1918087.damcon(e,tp,eg,ep,ev,re,r,rp) - return tp~=Duel.GetTurnPlayer() -end -function c1918087.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(500) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,500) -end -function c1918087.damop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c19182751.lua b/script/c19182751.lua deleted file mode 100644 index f42216c0e3..0000000000 --- a/script/c19182751.lua +++ /dev/null @@ -1,38 +0,0 @@ ---ジェネクス・ニュートロン -function c19182751.initial_effect(c) - --search - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetOperation(c19182751.regop) - c:RegisterEffect(e1) -end -function c19182751.regop(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetDescription(aux.Stringid(19182751,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetCountLimit(1) - e1:SetTarget(c19182751.target) - e1:SetOperation(c19182751.operation) - e1:SetReset(RESET_EVENT+0x16c0000+RESET_PHASE+PHASE_END) - e:GetHandler():RegisterEffect(e1) -end -function c19182751.filter(c) - return c:IsRace(RACE_MACHINE) and c:IsType(TYPE_TUNER) and c:IsAbleToHand() -end -function c19182751.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c19182751.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c19182751.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c19182751.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c19204398.lua b/script/c19204398.lua deleted file mode 100644 index b06be9f76e..0000000000 --- a/script/c19204398.lua +++ /dev/null @@ -1,17 +0,0 @@ ---A・O・J ライト・ゲイザー -function c19204398.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1) - c:EnableReviveLimit() - --atk - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetValue(c19204398.val) - c:RegisterEffect(e1) -end -function c19204398.val(e,c) - return Duel.GetMatchingGroupCount(Card.IsAttribute,c:GetControler(),0,LOCATION_GRAVE,nil,ATTRIBUTE_LIGHT)*200 -end diff --git a/script/c19221310.lua b/script/c19221310.lua deleted file mode 100644 index 7b45c56f18..0000000000 --- a/script/c19221310.lua +++ /dev/null @@ -1,60 +0,0 @@ ---オッドアイズ・セイバー・ドラゴン -function c19221310.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(19221310,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOGRAVE) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND) - e1:SetCost(c19221310.spcost) - e1:SetTarget(c19221310.sptg) - e1:SetOperation(c19221310.spop) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(19221310,1)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_BATTLE_DESTROYING) - e2:SetCondition(aux.bdgcon) - e2:SetTarget(c19221310.destg) - e2:SetOperation(c19221310.desop) - c:RegisterEffect(e2) -end -function c19221310.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsAttribute,1,nil,ATTRIBUTE_LIGHT) end - local g=Duel.SelectReleaseGroup(tp,Card.IsAttribute,1,1,nil,ATTRIBUTE_LIGHT) - Duel.Release(g,REASON_COST) -end -function c19221310.filter(c) - return c:IsCode(53025096) and c:IsAbleToGrave() -end -function c19221310.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c19221310.filter,tp,LOCATION_ONFIELD+LOCATION_HAND+LOCATION_DECK,0,1,nil) - and Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_ONFIELD+LOCATION_HAND+LOCATION_DECK) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c19221310.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c19221310.filter,tp,LOCATION_ONFIELD+LOCATION_HAND+LOCATION_DECK,0,1,1,nil) - local tc=g:GetFirst() - if Duel.SendtoGrave(tc,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_GRAVE) and c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) - end -end -function c19221310.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDestructable,tp,0,LOCATION_MZONE,1,nil) end - local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,0,LOCATION_MZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c19221310.desop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectMatchingCard(tp,Card.IsDestructable,tp,0,LOCATION_MZONE,1,1,nil) - if g:GetCount()>0 then - Duel.HintSelection(g) - Duel.Destroy(g,REASON_EFFECT) - end -end diff --git a/script/c19230407.lua b/script/c19230407.lua deleted file mode 100644 index 1e361c7995..0000000000 --- a/script/c19230407.lua +++ /dev/null @@ -1,35 +0,0 @@ ---死者への供物 -function c19230407.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c19230407.target) - e1:SetOperation(c19230407.activate) - c:RegisterEffect(e1) -end -function c19230407.filter(c) - return c:IsFaceup() and c:IsDestructable() -end -function c19230407.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c19230407.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c19230407.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c19230407.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c19230407.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EFFECT_SKIP_DP) - e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_END,3) - Duel.RegisterEffect(e1,tp) -end diff --git a/script/c19252988.lua b/script/c19252988.lua deleted file mode 100644 index fa903792c6..0000000000 --- a/script/c19252988.lua +++ /dev/null @@ -1,30 +0,0 @@ ---トラップ・ジャマー -function c19252988.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_CHAINING) - e1:SetCondition(c19252988.condition) - e1:SetTarget(c19252988.target) - e1:SetOperation(c19252988.activate) - c:RegisterEffect(e1) -end -function c19252988.condition(e,tp,eg,ep,ev,re,r,rp) - local ph=Duel.GetCurrentPhase() - return ph>=0x08 and ph<=0x20 and tp~=ep and re:IsActiveType(TYPE_TRAP) - and re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev) -end -function c19252988.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) - end -end -function c19252988.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateActivation(ev) - if re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(eg,REASON_EFFECT) - end -end diff --git a/script/c19261966.lua b/script/c19261966.lua deleted file mode 100644 index d2d8f4e147..0000000000 --- a/script/c19261966.lua +++ /dev/null @@ -1,171 +0,0 @@ ---エルシャドール・アノマリリス -function c19261966.initial_effect(c) - c:EnableReviveLimit() - --fusion material - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_FUSION_MATERIAL) - e1:SetCondition(c19261966.fuscon) - e1:SetOperation(c19261966.fusop) - c:RegisterEffect(e1) - --splimit - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e2:SetCode(EFFECT_SPSUMMON_CONDITION) - e2:SetRange(LOCATION_EXTRA) - e2:SetValue(c19261966.splimit) - c:RegisterEffect(e2) - --spsummon limit - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetRange(LOCATION_MZONE) - e3:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) - e3:SetTargetRange(1,1) - e3:SetTarget(c19261966.sumlimit) - c:RegisterEffect(e3) - --tohand - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(19261966,0)) - e4:SetCategory(CATEGORY_TOHAND) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e4:SetCode(EVENT_TO_GRAVE) - e4:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e4:SetTarget(c19261966.thtg) - e4:SetOperation(c19261966.thop) - c:RegisterEffect(e4) -end -function c19261966.ffilter1(c) - return c:IsSetCard(0x9d) -end -function c19261966.ffilter2(c) - return c:IsAttribute(ATTRIBUTE_WATER) or c:IsHasEffect(4904633) -end -function c19261966.exfilter(c,g) - return c:IsFaceup() and c:IsCanBeFusionMaterial() and not g:IsContains(c) -end -function c19261966.fuscon(e,g,gc,chkf) - if g==nil then return true end - local tp=e:GetHandlerPlayer() - local fc=Duel.GetFieldCard(tp,LOCATION_SZONE,5) - local exg=Group.CreateGroup() - if fc and fc:IsHasEffect(81788994) and fc:IsCanRemoveCounter(tp,0x16,3,REASON_EFFECT) then - local sg=Duel.GetMatchingGroup(c19261966.exfilter,tp,0,LOCATION_MZONE,nil,g) - exg:Merge(sg) - end - if gc then return (c19261966.ffilter1(gc) and (g:IsExists(c19261966.ffilter2,1,gc) or exg:IsExists(c19261966.ffilter2,1,gc))) - or (c19261966.ffilter2(gc) and (g:IsExists(c19261966.ffilter1,1,gc) or exg:IsExists(c19261966.ffilter1,1,gc))) end - local g1=Group.CreateGroup() - local g2=Group.CreateGroup() - local g3=Group.CreateGroup() - local g4=Group.CreateGroup() - local tc=g:GetFirst() - while tc do - if c19261966.ffilter1(tc) then - g1:AddCard(tc) - if aux.FConditionCheckF(tc,chkf) then g3:AddCard(tc) end - end - if c19261966.ffilter2(tc) then - g2:AddCard(tc) - if aux.FConditionCheckF(tc,chkf) then g4:AddCard(tc) end - end - tc=g:GetNext() - end - local exg1=exg:Filter(c19261966.ffilter1,nil) - local exg2=exg:Filter(c19261966.ffilter2,nil) - if chkf~=PLAYER_NONE then - return (g3:IsExists(aux.FConditionFilterF2,1,nil,g2) - or g3:IsExists(aux.FConditionFilterF2,1,nil,exg2) - or g4:IsExists(aux.FConditionFilterF2,1,nil,g1) - or g4:IsExists(aux.FConditionFilterF2,1,nil,exg1)) - else - return (g1:IsExists(aux.FConditionFilterF2,1,nil,g2) - or g1:IsExists(aux.FConditionFilterF2,1,nil,exg2) - or g2:IsExists(aux.FConditionFilterF2,1,nil,exg1)) - end -end -function c19261966.fusop(e,tp,eg,ep,ev,re,r,rp,gc,chkf) - local fc=Duel.GetFieldCard(tp,LOCATION_SZONE,5) - local exg=Group.CreateGroup() - if fc and fc:IsHasEffect(81788994) and fc:IsCanRemoveCounter(tp,0x16,3,REASON_EFFECT) then - local sg=Duel.GetMatchingGroup(c19261966.exfilter,tp,0,LOCATION_MZONE,nil,eg) - exg:Merge(sg) - end - if gc then - local sg1=Group.CreateGroup() - local sg2=Group.CreateGroup() - if c19261966.ffilter1(gc) then - sg1:Merge(eg:Filter(c19261966.ffilter2,gc)) - sg2:Merge(exg:Filter(c19261966.ffilter2,gc)) - end - if c19261966.ffilter2(gc) then - sg1:Merge(eg:Filter(c19261966.ffilter1,gc)) - sg2:Merge(exg:Filter(c19261966.ffilter1,gc)) - end - local g1=nil - if sg1:GetCount()==0 or (sg2:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(81788994,0))) then - fc:RemoveCounter(tp,0x16,3,REASON_EFFECT) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL) - g1=sg2:Select(tp,1,1,nil) - else - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL) - g1=sg1:Select(tp,1,1,nil) - end - Duel.SetFusionMaterial(g1) - return - end - local sg=eg:Filter(aux.FConditionFilterF2c,nil,c19261966.ffilter1,c19261966.ffilter2) - local g1=nil - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL) - if chkf~=PLAYER_NONE then - g1=sg:FilterSelect(tp,aux.FConditionCheckF,1,1,nil,chkf) - else g1=sg:Select(tp,1,1,nil) end - local tc1=g1:GetFirst() - local sg1=Group.CreateGroup() - local sg2=Group.CreateGroup() - if c19261966.ffilter1(tc1) then - sg1:Merge(sg:Filter(c19261966.ffilter2,tc1)) - sg2:Merge(exg:Filter(c19261966.ffilter2,tc1)) - end - if c19261966.ffilter2(tc1) then - sg1:Merge(sg:Filter(c19261966.ffilter1,tc1)) - sg2:Merge(exg:Filter(c19261966.ffilter1,tc1)) - end - local g2=nil - if sg1:GetCount()==0 or (sg2:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(81788994,0))) then - fc:RemoveCounter(tp,0x16,3,REASON_EFFECT) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL) - g2=sg2:Select(tp,1,1,nil) - else - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL) - g2=sg1:Select(tp,1,1,nil) - end - g1:Merge(g2) - Duel.SetFusionMaterial(g1) -end -function c19261966.splimit(e,se,sp,st) - return bit.band(st,SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION -end -function c19261966.sumlimit(e,c,sump,sumtype,sumpos,targetp,se) - return se:IsActiveType(TYPE_SPELL+TYPE_TRAP) and se:IsHasType(EFFECT_TYPE_ACTIONS) - and c:IsLocation(LOCATION_GRAVE+LOCATION_HAND) -end -function c19261966.thfilter(c) - return c:IsSetCard(0x9d) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand() -end -function c19261966.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c19261966.thfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c19261966.thfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c19261966.thfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c19261966.thop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end diff --git a/script/c19310321.lua b/script/c19310321.lua deleted file mode 100644 index b4dece5074..0000000000 --- a/script/c19310321.lua +++ /dev/null @@ -1,43 +0,0 @@ ---紋章獣ツインヘッド・イーグル -function c19310321.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(19310321,0)) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_GRAVE) - e1:SetCountLimit(1,19310321) - e1:SetCost(c19310321.cost) - e1:SetTarget(c19310321.target) - e1:SetOperation(c19310321.activate) - c:RegisterEffect(e1) -end -function c19310321.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) -end -function c19310321.filter1(c) - return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:GetOverlayCount()==0 -end -function c19310321.filter2(c) - return c:IsSetCard(0x76) -end -function c19310321.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - if chk==0 then return Duel.IsExistingTarget(c19310321.filter1,tp,LOCATION_MZONE,0,1,nil) - and Duel.IsExistingTarget(c19310321.filter2,tp,LOCATION_GRAVE,0,2,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(19310321,1)) - local g1=Duel.SelectTarget(tp,c19310321.filter1,tp,LOCATION_MZONE,0,1,1,nil) - e:SetLabelObject(g1:GetFirst()) - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(19310321,2)) - local g2=Duel.SelectTarget(tp,c19310321.filter2,tp,LOCATION_GRAVE,0,2,2,nil) - Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g2,2,0,0) -end -function c19310321.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetLabelObject() - if tc:IsFacedown() or not tc:IsRelateToEffect(e) or tc:IsImmuneToEffect(e) then return end - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,tc,e) - if g:GetCount()>0 then - Duel.Overlay(tc,g) - end -end diff --git a/script/c19312169.lua b/script/c19312169.lua deleted file mode 100644 index 9aa901d083..0000000000 --- a/script/c19312169.lua +++ /dev/null @@ -1,67 +0,0 @@ ---罠封印の呪符 -function c19312169.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c19312169.actcon) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_SZONE) - e2:SetCode(EFFECT_SELF_DESTROY) - e2:SetCondition(c19312169.descon) - c:RegisterEffect(e2) - --cannot trigger - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetCode(EFFECT_CANNOT_TRIGGER) - e3:SetProperty(EFFECT_FLAG_SET_AVAILABLE) - e3:SetRange(LOCATION_SZONE) - e3:SetTargetRange(0xa,0xa) - e3:SetTarget(c19312169.distg) - c:RegisterEffect(e3) - --disable - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_FIELD) - e4:SetCode(EFFECT_DISABLE) - e4:SetRange(LOCATION_SZONE) - e4:SetTargetRange(LOCATION_SZONE,LOCATION_SZONE) - e4:SetTarget(c19312169.distg) - c:RegisterEffect(e4) - --disable effect - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e5:SetCode(EVENT_CHAIN_SOLVING) - e5:SetRange(LOCATION_SZONE) - e5:SetOperation(c19312169.disop) - c:RegisterEffect(e5) - --disable trap monster - local e6=Effect.CreateEffect(c) - e6:SetType(EFFECT_TYPE_FIELD) - e6:SetCode(EFFECT_DISABLE_TRAPMONSTER) - e6:SetRange(LOCATION_SZONE) - e6:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e6:SetTarget(c19312169.distg) - c:RegisterEffect(e6) -end -function c19312169.filter(c) - return c:IsFaceup() and c:IsCode(2468169) -end -function c19312169.actcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c19312169.filter,tp,LOCATION_MZONE,0,1,nil) -end -function c19312169.descon(e) - return not Duel.IsExistingMatchingCard(c19312169.filter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) -end -function c19312169.distg(e,c) - return c:IsType(TYPE_TRAP) -end -function c19312169.disop(e,tp,eg,ep,ev,re,r,rp) - local tl=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION) - if tl==LOCATION_SZONE and re:IsActiveType(TYPE_TRAP) then - Duel.NegateEffect(ev) - end -end diff --git a/script/c19327348.lua b/script/c19327348.lua deleted file mode 100644 index 588b7501f7..0000000000 --- a/script/c19327348.lua +++ /dev/null @@ -1,46 +0,0 @@ ---闇霊使いダルク -function c19327348.initial_effect(c) - --flip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(19327348,0)) - e1:SetCategory(CATEGORY_CONTROL) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP) - e1:SetTarget(c19327348.target) - e1:SetOperation(c19327348.operation) - c:RegisterEffect(e1) -end -function c19327348.filter(c) - return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_DARK) and c:IsControlerCanBeChanged() -end -function c19327348.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c19327348.filter(chkc) end - if chk==0 then return true end - if not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) - local g=Duel.SelectTarget(tp,c19327348.filter,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,g:GetCount(),0,0) - end -end -function c19327348.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and c:IsFaceup() and tc and tc:IsRelateToEffect(e) and c19327348.filter(tc) then - c:SetCardTarget(tc) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_CONTROL) - e1:SetProperty(EFFECT_FLAG_OWNER_RELATE+EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetValue(tp) - e1:SetLabel(0) - e1:SetReset(RESET_EVENT+0x1fc0000) - e1:SetCondition(c19327348.ctcon) - tc:RegisterEffect(e1) - end -end -function c19327348.ctcon(e) - local c=e:GetOwner() - local h=e:GetHandler() - return h:IsAttribute(ATTRIBUTE_DARK) and c:IsHasCardTarget(h) -end diff --git a/script/c19333131.lua b/script/c19333131.lua deleted file mode 100644 index ae694cb214..0000000000 --- a/script/c19333131.lua +++ /dev/null @@ -1,38 +0,0 @@ ---No.12 機甲忍者クリムゾン・シャドー -function c19333131.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,5,2) - c:EnableReviveLimit() - --attack up - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(19333131,0)) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c19333131.cost) - e1:SetOperation(c19333131.operation) - c:RegisterEffect(e1) -end -c19333131.xyz_number=12 -function c19333131.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c19333131.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetTarget(c19333131.etarget) - e1:SetValue(1) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) - local e2=e1:Clone() - e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - Duel.RegisterEffect(e2,tp) -end -function c19333131.etarget(e,c) - return c:IsFaceup() and c:IsSetCard(0x2b) -end diff --git a/script/c19337371.lua b/script/c19337371.lua deleted file mode 100644 index 6dcf258dea..0000000000 --- a/script/c19337371.lua +++ /dev/null @@ -1,81 +0,0 @@ ---ヒステリック・サイン -function c19337371.initial_effect(c) - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c19337371.cost) - e1:SetTarget(c19337371.target) - e1:SetOperation(c19337371.activate) - c:RegisterEffect(e1) - -- - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetCondition(c19337371.regcon) - e2:SetOperation(c19337371.regop) - c:RegisterEffect(e2) -end -function c19337371.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetFlagEffect(tp,19337371)==0 end - Duel.RegisterFlagEffect(tp,19337371,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1) -end -function c19337371.filter(c) - return c:IsCode(90219263) and c:IsAbleToHand() and not c:IsHasEffect(EFFECT_NECRO_VALLEY) -end -function c19337371.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c19337371.filter,tp,LOCATION_GRAVE+LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE+LOCATION_DECK) -end -function c19337371.activate(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c19337371.filter,tp,LOCATION_GRAVE+LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end -function c19337371.regcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_HAND+LOCATION_ONFIELD) -end -function c19337371.regop(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetDescription(aux.Stringid(19337371,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetRange(LOCATION_GRAVE) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetCountLimit(1) - e1:SetTarget(c19337371.thtg) - e1:SetOperation(c19337371.thop) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e:GetHandler():RegisterEffect(e1) -end -function c19337371.thfilter(c) - return c:IsSetCard(0x64) and c:IsAbleToHand() -end -function c19337371.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetFlagEffect(tp,19337371)==0 end - Duel.RegisterFlagEffect(tp,19337371,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c19337371.thop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c19337371.thfilter,tp,LOCATION_DECK,0,nil) - if g:GetCount()==0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g1=g:Select(tp,1,1,nil) - g:Remove(Card.IsCode,nil,g1:GetFirst():GetCode()) - if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(19337371,1)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g2=g:Select(tp,1,1,nil) - g:Remove(Card.IsCode,nil,g2:GetFirst():GetCode()) - g1:Merge(g2) - if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(19337371,1)) then - g2=g:Select(tp,1,1,nil) - g1:Merge(g2) - end - end - Duel.SendtoHand(g1,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g1) -end diff --git a/script/c19353570.lua b/script/c19353570.lua deleted file mode 100644 index bd6ef75091..0000000000 --- a/script/c19353570.lua +++ /dev/null @@ -1,35 +0,0 @@ ---影無茶ナイト -function c19353570.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(19353570,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetRange(LOCATION_HAND) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetCondition(c19353570.spcon) - e1:SetTarget(c19353570.sptg) - e1:SetOperation(c19353570.spop) - c:RegisterEffect(e1) - --unsynchroable - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e2:SetValue(1) - c:RegisterEffect(e2) -end -function c19353570.spcon(e,tp,eg,ep,ev,re,r,rp) - return rp==tp and eg:GetFirst():GetLevel()==3 -end -function c19353570.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c19353570.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c19355597.lua b/script/c19355597.lua deleted file mode 100644 index 32e3ec259f..0000000000 --- a/script/c19355597.lua +++ /dev/null @@ -1,48 +0,0 @@ ---ジェムナイトレディ・ブリリアント・ダイヤ -function c19355597.initial_effect(c) - c:SetSPSummonOnce(19355597) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcFunRep(c,aux.FilterBoolFunction(Card.IsSetCard,0x1047),3,false) - --spsummon condition - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(c19355597.splimit) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOGRAVE) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetTarget(c19355597.sptg) - e2:SetOperation(c19355597.spop) - c:RegisterEffect(e2) -end -function c19355597.splimit(e,se,sp,st) - return not e:GetHandler():IsLocation(LOCATION_EXTRA) or bit.band(st,SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION -end -function c19355597.tgfilter(c) - return c:IsFaceup() and c:IsSetCard(0x1047) -end -function c19355597.spfilter(c,e,tp) - return c:IsSetCard(0x1047) and c:IsType(TYPE_FUSION) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) -end -function c19355597.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsExistingMatchingCard(c19355597.tgfilter,tp,LOCATION_MZONE,0,1,nil) - and Duel.IsExistingMatchingCard(c19355597.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function c19355597.spop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local tg=Duel.SelectMatchingCard(tp,c19355597.tgfilter,tp,LOCATION_MZONE,0,1,1,nil) - local tc=tg:GetFirst() - if tc and Duel.SendtoGrave(tc,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_GRAVE) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c19355597.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp) - Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP) - end -end diff --git a/script/c19357125.lua b/script/c19357125.lua deleted file mode 100644 index 13be932a1d..0000000000 --- a/script/c19357125.lua +++ /dev/null @@ -1,47 +0,0 @@ ---ダーク・アサシン -function c19357125.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetValue(c19357125.atkval) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(19357125,0)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCondition(c19357125.condition) - e2:SetCost(c19357125.cost) - e2:SetTarget(c19357125.target) - e2:SetOperation(c19357125.operation) - c:RegisterEffect(e2) -end -function c19357125.atkval(e,c) - local ct=Duel.GetMatchingGroupCount(Card.IsAttribute,c:GetControler(),LOCATION_GRAVE,0,nil,ATTRIBUTE_DARK) - if ct<=1 then return -400 - elseif ct<=4 then return 400 - else return 0 end -end -function c19357125.condition(e,tp,eg,ep,ev,re,r,rp) - return not e:GetHandler():IsDisabled() and Duel.IsExistingMatchingCard(Card.IsAttribute,tp,LOCATION_GRAVE,0,5,nil,ATTRIBUTE_DARK) -end -function c19357125.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end -function c19357125.filter(c) - return c:IsFacedown() and c:IsDestructable() -end -function c19357125.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c19357125.filter,tp,0,LOCATION_MZONE,1,nil) end - local g=Duel.GetMatchingGroup(c19357125.filter,tp,0,LOCATION_MZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c19357125.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c19357125.filter,tp,0,LOCATION_MZONE,nil) - Duel.Destroy(g,REASON_EFFECT) -end diff --git a/script/c19384334.lua b/script/c19384334.lua deleted file mode 100644 index 387d0dd595..0000000000 --- a/script/c19384334.lua +++ /dev/null @@ -1,29 +0,0 @@ ---バーニングブラッド -function c19384334.initial_effect(c) - --activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --Atk up - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetTarget(c19384334.filter) - e2:SetValue(500) - c:RegisterEffect(e2) - --Def down - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetRange(LOCATION_SZONE) - e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e3:SetCode(EFFECT_UPDATE_DEFENCE) - e3:SetTarget(c19384334.filter) - e3:SetValue(-400) - c:RegisterEffect(e3) -end -function c19384334.filter(e,c) - return c:IsAttribute(ATTRIBUTE_FIRE) -end diff --git a/script/c19394153.lua b/script/c19394153.lua deleted file mode 100644 index 5571f66cc8..0000000000 --- a/script/c19394153.lua +++ /dev/null @@ -1,55 +0,0 @@ ---フェザー・ショット -function c19394153.initial_effect(c) - --multi atk - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c19394153.condition) - e1:SetTarget(c19394153.target) - e1:SetOperation(c19394153.operation) - c:RegisterEffect(e1) -end -function c19394153.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsAbleToEnterBP() -end -function c19394153.filter(c) - return c:IsFaceup() and c:IsCode(21844576) -end -function c19394153.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c19394153.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c19394153.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - local g=Duel.SelectTarget(tp,c19394153.filter,tp,LOCATION_MZONE,0,1,1,nil) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetProperty(EFFECT_FLAG_OATH) - e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetTarget(c19394153.ftarget) - e1:SetLabel(g:GetFirst():GetFieldID()) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function c19394153.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - local ct=Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0) - if ct>1 then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_EXTRA_ATTACK) - e1:SetValue(ct-1) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_CANNOT_DIRECT_ATTACK) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e2) - end - end -end -function c19394153.ftarget(e,c) - return e:GetLabel()~=c:GetFieldID() -end diff --git a/script/c19406822.lua b/script/c19406822.lua deleted file mode 100644 index 85b9596821..0000000000 --- a/script/c19406822.lua +++ /dev/null @@ -1,40 +0,0 @@ ---コトダマ -function c19406822.initial_effect(c) - --adjust - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e1:SetCode(EVENT_ADJUST) - e1:SetRange(LOCATION_MZONE) - e1:SetOperation(c19406822.adjustop) - c:RegisterEffect(e1) - local g=Group.CreateGroup() - g:KeepAlive() - e1:SetLabelObject(g) -end -function c19406822.filter(c,g,pg) - if pg:IsContains(c) then return false end - local code=c:GetCode() - return g:IsExists(Card.IsCode,1,c,code) or pg:IsExists(Card.IsCode,1,c,code) -end -function c19406822.adjustop(e,tp,eg,ep,ev,re,r,rp) - local phase=Duel.GetCurrentPhase() - if (phase==PHASE_DAMAGE and not Duel.IsDamageCalculated()) or phase==PHASE_DAMAGE_CAL then return end - local c=e:GetHandler() - local pg=e:GetLabelObject() - if c:GetFlagEffect(19406822)==0 then - c:RegisterFlagEffect(19406822,RESET_EVENT+0x1ff0000,0,1) - pg:Clear() - end - local g=Duel.GetMatchingGroup(Card.IsFaceup,0,LOCATION_MZONE,LOCATION_MZONE,nil) - local dg=g:Filter(c19406822.filter,nil,g,e:GetLabelObject()) - if dg:GetCount()==0 or Duel.Destroy(dg,REASON_EFFECT)==0 then - pg:Clear() - pg:Merge(g) - else - g=Duel.GetMatchingGroup(Card.IsFaceup,0,LOCATION_MZONE,LOCATION_MZONE,nil) - pg:Clear() - pg:Merge(g) - Duel.Readjust() - end -end diff --git a/script/c19439119.lua b/script/c19439119.lua deleted file mode 100644 index 0aa8635065..0000000000 --- a/script/c19439119.lua +++ /dev/null @@ -1,33 +0,0 @@ ---魔轟神クルス -function c19439119.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(19439119,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCondition(c19439119.spcon) - e1:SetTarget(c19439119.sptg) - e1:SetOperation(c19439119.spop) - c:RegisterEffect(e1) -end -function c19439119.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetPreviousLocation()==LOCATION_HAND and bit.band(r,REASON_DISCARD)~=0 -end -function c19439119.filter(c,e,tp) - return c:IsLevelBelow(4) and c:IsSetCard(0x35) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c19439119.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c19439119.filter(chkc,e,tp) and chkc~=e:GetHandler() end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c19439119.filter,tp,LOCATION_GRAVE,0,1,1,e:GetHandler(),e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,g:GetCount(),0,0) -end -function c19439119.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c19441018.lua b/script/c19441018.lua deleted file mode 100644 index 24c04f18d2..0000000000 --- a/script/c19441018.lua +++ /dev/null @@ -1,76 +0,0 @@ ---電池メン-業務用 -function c19441018.initial_effect(c) - c:EnableReviveLimit() - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c19441018.spcon) - e1:SetOperation(c19441018.spop) - c:RegisterEffect(e1) - --cannot special summon - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e2:SetCode(EFFECT_SPSUMMON_CONDITION) - e2:SetValue(aux.FALSE) - c:RegisterEffect(e2) - --destroy - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(19441018,0)) - e3:SetCategory(CATEGORY_DESTROY) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetCountLimit(1) - e3:SetRange(LOCATION_MZONE) - e3:SetCost(c19441018.descost) - e3:SetTarget(c19441018.destg) - e3:SetOperation(c19441018.desop) - c:RegisterEffect(e3) -end -function c19441018.spfilter(c) - return c:IsSetCard(0x28) and c:IsAbleToRemoveAsCost() -end -function c19441018.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c19441018.spfilter,tp,LOCATION_GRAVE,0,2,nil) -end -function c19441018.spop(e,tp,eg,ep,ev,re,r,rp,c) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c19441018.spfilter,tp,LOCATION_GRAVE,0,2,2,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c19441018.costfilter(c) - return c:IsRace(RACE_THUNDER) and c:IsAbleToRemoveAsCost() -end -function c19441018.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c19441018.costfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c19441018.costfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c19441018.filter1(c) - return c:IsDestructable() and Duel.IsExistingTarget(c19441018.filter2,0,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c) -end -function c19441018.filter2(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable() -end -function c19441018.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - if chk==0 then return Duel.IsExistingTarget(c19441018.filter1,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g1=Duel.SelectTarget(tp,c19441018.filter1,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g2=Duel.SelectTarget(tp,c19441018.filter2,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,g1:GetFirst()) - g1:Merge(g2) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g1,2,0,0) -end -function c19441018.desop(e) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local dg=g:Filter(Card.IsRelateToEffect,nil,e) - Duel.Destroy(dg,REASON_EFFECT) -end diff --git a/script/c19451302.lua b/script/c19451302.lua deleted file mode 100644 index f18ecaac0b..0000000000 --- a/script/c19451302.lua +++ /dev/null @@ -1,20 +0,0 @@ ---スネーク・チョーク -function c19451302.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --Battle indestructable - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(0,LOCATION_MZONE) - e2:SetTarget(c19451302.indtg) - e2:SetValue(aux.TargetBoolFunction(Card.IsSetCard,0x3c)) - c:RegisterEffect(e2) -end -function c19451302.indtg(e,c) - return c:GetAttack()==0 and c:IsAttackPos() -end diff --git a/script/c1945387.lua b/script/c1945387.lua deleted file mode 100644 index 72c7ef2310..0000000000 --- a/script/c1945387.lua +++ /dev/null @@ -1,34 +0,0 @@ ---E・HERO ノヴァマスター -function c1945387.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcFun2(c,aux.FilterBoolFunction(Card.IsSetCard,0x3008),aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_FIRE),true) - --spsummon condition - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(aux.fuslimit) - c:RegisterEffect(e1) - --draw - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(1945387,0)) - e2:SetCategory(CATEGORY_DRAW) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetCode(EVENT_BATTLE_DESTROYING) - e2:SetCondition(aux.bdocon) - e2:SetTarget(c1945387.drtg) - e2:SetOperation(c1945387.drop) - c:RegisterEffect(e2) -end -function c1945387.drtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(1) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c1945387.drop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end diff --git a/script/c19474136.lua b/script/c19474136.lua deleted file mode 100644 index 1423f9251d..0000000000 --- a/script/c19474136.lua +++ /dev/null @@ -1,10 +0,0 @@ ---マンドラゴン -function c19474136.initial_effect(c) - --pendulum summon - aux.AddPendulumProcedure(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) -end diff --git a/script/c19505896.lua b/script/c19505896.lua deleted file mode 100644 index c8b06b3260..0000000000 --- a/script/c19505896.lua +++ /dev/null @@ -1,32 +0,0 @@ ---ウィード -function c19505896.initial_effect(c) - --Destroy replace - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DESTROY_REPLACE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetTarget(c19505896.desreptg) - e1:SetOperation(c19505896.desrepop) - c:RegisterEffect(e1) -end -function c19505896.repfilter(c) - return c:IsFaceup() and c:IsRace(RACE_PLANT) and not c:IsStatus(STATUS_DESTROY_CONFIRMED) -end -function c19505896.desreptg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return not c:IsReason(REASON_REPLACE) - and Duel.IsExistingMatchingCard(c19505896.repfilter,tp,LOCATION_MZONE,0,1,c) end - if Duel.SelectYesNo(tp,aux.Stringid(19505896,0)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESREPLACE) - local g=Duel.SelectMatchingCard(tp,c19505896.repfilter,tp,LOCATION_MZONE,0,1,1,c) - e:SetLabelObject(g:GetFirst()) - g:GetFirst():SetStatus(STATUS_DESTROY_CONFIRMED,true) - return true - else return false end -end -function c19505896.desrepop(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetLabelObject() - tc:SetStatus(STATUS_DESTROY_CONFIRMED,false) - Duel.Destroy(tc,REASON_EFFECT+REASON_REPLACE) -end diff --git a/script/c19508728.lua b/script/c19508728.lua deleted file mode 100644 index 5f16ecfd90..0000000000 --- a/script/c19508728.lua +++ /dev/null @@ -1,97 +0,0 @@ ---月鏡の盾 -function c19508728.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c19508728.target) - e1:SetOperation(c19508728.activate) - c:RegisterEffect(e1) - --equip limit - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_EQUIP_LIMIT) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetValue(1) - c:RegisterEffect(e2) - --atk - local e3=Effect.CreateEffect(c) - e3:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e3:SetCode(EVENT_PRE_DAMAGE_CALCULATE) - e3:SetRange(LOCATION_SZONE) - e3:SetCondition(c19508728.atkcon) - e3:SetOperation(c19508728.atkop) - c:RegisterEffect(e3) - --to deck - local e4=Effect.CreateEffect(c) - e4:SetCategory(CATEGORY_TODECK) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e4:SetCode(EVENT_TO_GRAVE) - e4:SetCondition(c19508728.tdcon) - e4:SetCost(c19508728.tdcost) - e4:SetTarget(c19508728.tdtg) - e4:SetOperation(c19508728.tdop) - c:RegisterEffect(e4) -end -function c19508728.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c19508728.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,e:GetHandler(),tc) - end -end -function c19508728.atkcon(e,tp,eg,ep,ev,re,r,rp) - local ec=e:GetHandler():GetEquipTarget() - local tc=ec:GetBattleTarget() - return ec and tc and tc:IsFaceup() -end -function c19508728.atkop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local ec=e:GetHandler():GetEquipTarget() - local tc=ec:GetBattleTarget() - if ec and tc and ec:IsFaceup() and tc:IsFaceup() then - local atk=tc:GetAttack() - local def=tc:GetDefence() - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - if atk>=def then - e1:SetValue(atk+100) - else - e1:SetValue(def+100) - end - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_DAMAGE_CAL) - ec:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_SET_DEFENCE_FINAL) - ec:RegisterEffect(e2) - end -end -function c19508728.tdcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousLocation(LOCATION_ONFIELD) -end -function c19508728.tdcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,500) end - Duel.PayLPCost(tp,500) -end -function c19508728.tdtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local opt=Duel.SelectOption(tp,aux.Stringid(19508728,0),aux.Stringid(19508728,1)) - e:SetLabel(opt) - Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0) -end -function c19508728.tdop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - Duel.SendtoDeck(e:GetHandler(),nil,e:GetLabel(),REASON_EFFECT) - end -end diff --git a/script/c19523799.lua b/script/c19523799.lua deleted file mode 100644 index 7a35887dc3..0000000000 --- a/script/c19523799.lua +++ /dev/null @@ -1,22 +0,0 @@ ---昼夜の大火事 -function c19523799.initial_effect(c) - --damage - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c19523799.damtg) - e1:SetOperation(c19523799.damop) - c:RegisterEffect(e1) -end -function c19523799.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(800) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,800) -end -function c19523799.damop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c1953925.lua b/script/c1953925.lua deleted file mode 100644 index ea79270001..0000000000 --- a/script/c1953925.lua +++ /dev/null @@ -1,86 +0,0 @@ ---古代の機械工兵 -function c1953925.initial_effect(c) - --disable&destroy - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_DISABLE) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(LOCATION_SZONE,LOCATION_SZONE) - e1:SetTarget(c1953925.distg) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_SELF_DESTROY) - c:RegisterEffect(e2) - --disable effect - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e3:SetCode(EVENT_CHAIN_SOLVING) - e3:SetRange(LOCATION_MZONE) - e3:SetOperation(c1953925.disop) - c:RegisterEffect(e3) - --actlimit - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e4:SetCode(EVENT_ATTACK_ANNOUNCE) - e4:SetOperation(c1953925.atkop) - c:RegisterEffect(e4) - --destroy - local e5=Effect.CreateEffect(c) - e5:SetDescription(aux.Stringid(1953925,0)) - e5:SetCategory(CATEGORY_DESTROY) - e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e5:SetProperty(EFFECT_FLAG_CARD_TARGET) - e5:SetCode(EVENT_DAMAGE_STEP_END) - e5:SetCondition(c1953925.descon) - e5:SetTarget(c1953925.destg) - e5:SetOperation(c1953925.desop) - c:RegisterEffect(e5) -end -function c1953925.distg(e,c) - if not c:IsType(TYPE_TRAP) or c:GetCardTargetCount()==0 then return false end - return c:GetCardTarget():IsContains(e:GetHandler()) -end -function c1953925.disop(e,tp,eg,ep,ev,re,r,rp) - local rc=re:GetHandler() - if not rc:IsType(TYPE_TRAP) then return end - if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return end - local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) - if g and g:IsContains(e:GetHandler()) then - Duel.NegateEffect(ev) - if rc:IsRelateToEffect(re) then - Duel.Destroy(rc,REASON_EFFECT) - end - end -end -function c1953925.atkop(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EFFECT_CANNOT_ACTIVATE) - e1:SetTargetRange(0,1) - e1:SetValue(c1953925.aclimit) - e1:SetReset(RESET_PHASE+PHASE_DAMAGE) - Duel.RegisterEffect(e1,tp) -end -function c1953925.aclimit(e,re,tp) - return re:IsHasType(EFFECT_TYPE_ACTIVATE) -end -function c1953925.descon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler()==Duel.GetAttacker() and e:GetHandler():IsRelateToBattle() -end -function c1953925.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable() -end -function c1953925.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() and c1953925.filter(chkc) end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c1953925.filter,tp,0,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c1953925.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c19578592.lua b/script/c19578592.lua deleted file mode 100644 index 9ec0fd6900..0000000000 --- a/script/c19578592.lua +++ /dev/null @@ -1,71 +0,0 @@ ---愚鈍の斧 -function c19578592.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c19578592.target) - e1:SetOperation(c19578592.operation) - c:RegisterEffect(e1) - --atkup - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(1000) - c:RegisterEffect(e2) - --negate - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_EQUIP) - e3:SetCode(EFFECT_DISABLE) - c:RegisterEffect(e3) - --equip limit - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetCode(EFFECT_EQUIP_LIMIT) - e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e4:SetValue(1) - c:RegisterEffect(e4) - --damage - local e5=Effect.CreateEffect(c) - e5:SetDescription(aux.Stringid(19578592,0)) - e5:SetCategory(CATEGORY_DAMAGE) - e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e5:SetCode(EVENT_PHASE+PHASE_STANDBY) - e5:SetRange(LOCATION_SZONE) - e5:SetCountLimit(1) - e5:SetCondition(c19578592.damcon) - e5:SetTarget(c19578592.damtg) - e5:SetOperation(c19578592.damop) - c:RegisterEffect(e5) -end -function c19578592.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c19578592.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,e:GetHandler(),tc) - end -end -function c19578592.damcon(e,tp,eg,ep,ev,re,r,rp) - return tp==Duel.GetTurnPlayer() -end -function c19578592.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local p=e:GetHandler():GetEquipTarget():GetControler() - Duel.SetTargetPlayer(p) - Duel.SetTargetParam(500) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,p,500) -end -function c19578592.damop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local p=e:GetHandler():GetEquipTarget():GetControler() - local d=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c19594506.lua b/script/c19594506.lua deleted file mode 100644 index 2ac152ea5e..0000000000 --- a/script/c19594506.lua +++ /dev/null @@ -1,33 +0,0 @@ ---ネオスペース・コンダクター -function c19594506.initial_effect(c) - --search - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(19594506,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND) - e1:SetCost(c19594506.cost) - e1:SetTarget(c19594506.target) - e1:SetOperation(c19594506.operation) - c:RegisterEffect(e1) -end -function c19594506.cost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToGraveAsCost() and c:IsDiscardable() end - Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD) -end -function c19594506.filter(c) - return c:GetCode()==42015635 and c:IsAbleToHand() and not c:IsHasEffect(EFFECT_NECRO_VALLEY) -end -function c19594506.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chk==0 then return Duel.IsExistingMatchingCard(c19594506.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE) -end -function c19594506.operation(e,tp,eg,ep,ev,re,r,rp,chk) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local tc=Duel.SelectMatchingCard(tp,c19594506.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil) - if tc then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end diff --git a/script/c19596712.lua b/script/c19596712.lua deleted file mode 100644 index ec48ea8164..0000000000 --- a/script/c19596712.lua +++ /dev/null @@ -1,60 +0,0 @@ ---アビスケイル-ケートス -function c19596712.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c19596712.target) - e1:SetOperation(c19596712.operation) - c:RegisterEffect(e1) - --Atk up - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(800) - c:RegisterEffect(e2) - --Equip limit - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_EQUIP_LIMIT) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e3:SetValue(c19596712.eqlimit) - c:RegisterEffect(e3) - --negate - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e4:SetCode(EVENT_CHAIN_SOLVING) - e4:SetRange(LOCATION_SZONE) - e4:SetCondition(c19596712.negcon) - e4:SetOperation(c19596712.negop) - c:RegisterEffect(e4) -end -function c19596712.eqlimit(e,c) - return c:IsSetCard(0x74) -end -function c19596712.filter(c) - return c:IsFaceup() and c:IsSetCard(0x74) -end -function c19596712.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c19596712.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c19596712.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c19596712.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c19596712.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,e:GetHandler(),tc) - end -end -function c19596712.negcon(e,tp,eg,ep,ev,re,r,rp) - return rp~=tp and Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)==LOCATION_SZONE - and re:IsActiveType(TYPE_TRAP) and Duel.IsChainDisablable(ev) -end -function c19596712.negop(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateEffect(ev) - Duel.SendtoGrave(e:GetHandler(),REASON_EFFECT) -end diff --git a/script/c19605133.lua b/script/c19605133.lua deleted file mode 100644 index 1f16393820..0000000000 --- a/script/c19605133.lua +++ /dev/null @@ -1,63 +0,0 @@ ---ナチュル・レディバグ -function c19605133.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(19605133,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetRange(LOCATION_GRAVE) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(c19605133.spcon) - e1:SetTarget(c19605133.sptg) - e1:SetOperation(c19605133.spop) - c:RegisterEffect(e1) - --atkup - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(19605133,1)) - e2:SetCategory(CATEGORY_ATKCHANGE) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetRange(LOCATION_MZONE) - e2:SetCost(c19605133.atcost) - e2:SetTarget(c19605133.attg) - e2:SetOperation(c19605133.atop) - c:RegisterEffect(e2) -end -function c19605133.spcon(e,tp,eg,ep,ev,re,r,rp) - local ec=eg:GetFirst() - return ec:IsSetCard(0x2a) and ec:GetSummonType()==SUMMON_TYPE_SYNCHRO and ec:GetSummonPlayer()==tp -end -function c19605133.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c19605133.spop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP) - end -end -function c19605133.atcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end -function c19605133.filter(c) - return c:IsFaceup() and c:IsSetCard(0x2a) -end -function c19605133.attg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c19605133.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c19605133.filter,tp,LOCATION_MZONE,0,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - local g=Duel.SelectTarget(tp,c19605133.filter,tp,LOCATION_MZONE,0,1,1,nil) -end -function c19605133.atop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(1000) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - end -end diff --git a/script/c19612721.lua b/script/c19612721.lua deleted file mode 100644 index 74e074c3d2..0000000000 --- a/script/c19612721.lua +++ /dev/null @@ -1,23 +0,0 @@ ---円盤闘士 -function c19612721.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(19612721,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_BATTLE_CONFIRM) - e1:SetTarget(c19612721.destg) - e1:SetOperation(c19612721.desop) - c:RegisterEffect(e1) -end -function c19612721.destg(e,tp,eg,ep,ev,re,r,rp,chk) - local t=Duel.GetAttackTarget() - if chk==0 then return Duel.GetAttacker()==e:GetHandler() and t~=nil and t:IsDefencePos() and t:IsDefenceAbove(2000) end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,t,1,0,0) -end -function c19612721.desop(e,tp,eg,ep,ev,re,r,rp) - local t=Duel.GetAttackTarget() - if t~=nil and t:IsRelateToBattle() and not t:IsAttackPos() then - Duel.Destroy(t,REASON_EFFECT) - end -end diff --git a/script/c19613556.lua b/script/c19613556.lua deleted file mode 100644 index a340dee3f1..0000000000 --- a/script/c19613556.lua +++ /dev/null @@ -1,24 +0,0 @@ ---大嵐 -function c19613556.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c19613556.target) - e1:SetOperation(c19613556.activate) - c:RegisterEffect(e1) -end -function c19613556.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable() -end -function c19613556.target(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return Duel.IsExistingMatchingCard(c19613556.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c) end - local sg=Duel.GetMatchingGroup(c19613556.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,c) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,sg:GetCount(),0,0) -end -function c19613556.activate(e,tp,eg,ep,ev,re,r,rp) - local sg=Duel.GetMatchingGroup(c19613556.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler()) - Duel.Destroy(sg,REASON_EFFECT) -end diff --git a/script/c19642774.lua b/script/c19642774.lua deleted file mode 100644 index 4ddff74c41..0000000000 --- a/script/c19642774.lua +++ /dev/null @@ -1,32 +0,0 @@ ---フルール・シンクロン -function c19642774.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(19642774,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_BE_MATERIAL) - e1:SetCondition(c19642774.con) - e1:SetTarget(c19642774.tg) - e1:SetOperation(c19642774.op) - c:RegisterEffect(e1) -end -function c19642774.con(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsLocation(LOCATION_GRAVE) and r==REASON_SYNCHRO -end -function c19642774.filter(c,e,tp) - return c:IsLevelBelow(2) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c19642774.tg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c19642774.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c19642774.op(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c19642774.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c19642889.lua b/script/c19642889.lua deleted file mode 100644 index f3755f79c5..0000000000 --- a/script/c19642889.lua +++ /dev/null @@ -1,89 +0,0 @@ ---コアキメイル・パワーハンド -function c19642889.initial_effect(c) - --cost - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c19642889.mtcon) - e1:SetOperation(c19642889.mtop) - c:RegisterEffect(e1) - --negate - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_ATTACK_ANNOUNCE) - e2:SetOperation(c19642889.negop1) - c:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e3:SetCode(EVENT_BE_BATTLE_TARGET) - e3:SetOperation(c19642889.negop2) - c:RegisterEffect(e3) -end -function c19642889.mtcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c19642889.cfilter1(c) - return c:IsCode(36623431) and c:IsAbleToGraveAsCost() -end -function c19642889.cfilter2(c) - return c:GetType()==TYPE_TRAP and not c:IsPublic() -end -function c19642889.mtop(e,tp,eg,ep,ev,re,r,rp) - local g1=Duel.GetMatchingGroup(c19642889.cfilter1,tp,LOCATION_HAND,0,nil) - local g2=Duel.GetMatchingGroup(c19642889.cfilter2,tp,LOCATION_HAND,0,nil) - local select=2 - if g1:GetCount()>0 and g2:GetCount()>0 then - select=Duel.SelectOption(tp,aux.Stringid(19642889,0),aux.Stringid(19642889,1),aux.Stringid(19642889,2)) - elseif g1:GetCount()>0 then - select=Duel.SelectOption(tp,aux.Stringid(19642889,0),aux.Stringid(19642889,2)) - if select==1 then select=2 end - elseif g2:GetCount()>0 then - select=Duel.SelectOption(tp,aux.Stringid(19642889,1),aux.Stringid(19642889,2)) - select=select+1 - end - if select==0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=g1:Select(tp,1,1,nil) - Duel.SendtoGrave(g,REASON_COST) - elseif select==1 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) - local g=g2:Select(tp,1,1,nil) - Duel.ConfirmCards(1-tp,g) - Duel.ShuffleHand(tp) - else - Duel.Destroy(e:GetHandler(),REASON_RULE) - end -end -function c19642889.negop1(e,tp,eg,ep,ev,re,r,rp) - local d=Duel.GetAttackTarget() - if d and d:IsAttribute(ATTRIBUTE_LIGHT+ATTRIBUTE_DARK) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_BATTLE) - d:RegisterEffect(e1) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_BATTLE) - d:RegisterEffect(e2) - end -end -function c19642889.negop2(e,tp,eg,ep,ev,re,r,rp) - local a=Duel.GetAttacker() - if a and a:IsAttribute(ATTRIBUTE_LIGHT+ATTRIBUTE_DARK) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_BATTLE) - a:RegisterEffect(e1) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_BATTLE) - a:RegisterEffect(e2) - end -end diff --git a/script/c1965724.lua b/script/c1965724.lua deleted file mode 100644 index 66f2417710..0000000000 --- a/script/c1965724.lua +++ /dev/null @@ -1,46 +0,0 @@ ---怒れるもけもけ -function c1965724.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --reg - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetRange(LOCATION_SZONE) - e2:SetCode(EVENT_DESTROYED) - e2:SetCondition(c1965724.regcon) - e2:SetOperation(c1965724.regop) - c:RegisterEffect(e2) - --atk - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetCode(EFFECT_SET_ATTACK) - e3:SetRange(LOCATION_SZONE) - e3:SetTargetRange(LOCATION_MZONE,0) - e3:SetTarget(c1965724.atktg) - e3:SetCondition(c1965724.atkcon) - e3:SetValue(3000) - c:RegisterEffect(e3) -end -function c1965724.cfilter(c,tp) - return c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP) - and c:GetPreviousControler()==tp and c:IsRace(RACE_FAIRY) -end -function c1965724.cfilter2(c) - return c:IsFaceup() and c:IsCode(27288416) -end -function c1965724.regcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetFlagEffect(1965724)==0 and eg:IsExists(c1965724.cfilter,1,nil,tp) - and Duel.IsExistingMatchingCard(c1965724.cfilter2,tp,LOCATION_MZONE,0,1,nil) -end -function c1965724.regop(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():RegisterFlagEffect(1965724,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) -end -function c1965724.atkcon(e) - return e:GetHandler():GetFlagEffect(1965724)~=0 -end -function c1965724.atktg(e,c) - return c:IsFaceup() and c:IsCode(27288416) -end diff --git a/script/c19665973.lua b/script/c19665973.lua deleted file mode 100644 index cb35b975ff..0000000000 --- a/script/c19665973.lua +++ /dev/null @@ -1,39 +0,0 @@ ---バトルフェーダー -function c19665973.initial_effect(c) - --end battle phase - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(19665973,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c19665973.condition) - e1:SetTarget(c19665973.target) - e1:SetOperation(c19665973.operation) - c:RegisterEffect(e1) -end -function c19665973.condition(e,tp,eg,ep,ev,re,r,rp) - local at=Duel.GetAttacker() - return at:GetControler()~=tp and Duel.GetAttackTarget()==nil -end -function c19665973.target(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then - return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) - end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0) -end -function c19665973.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then - Duel.BreakEffect() - Duel.SkipPhase(1-tp,PHASE_BATTLE,RESET_PHASE+PHASE_BATTLE,1) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+0xfe0000) - e1:SetValue(LOCATION_REMOVED) - c:RegisterEffect(e1) - end -end diff --git a/script/c19667590.lua b/script/c19667590.lua deleted file mode 100644 index 229092b8be..0000000000 --- a/script/c19667590.lua +++ /dev/null @@ -1,44 +0,0 @@ ---ゴゴゴギガース -function c19667590.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(19667590,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetRange(LOCATION_GRAVE) - e1:SetCountLimit(1,19667590) - e1:SetProperty(EFFECT_FLAG_DELAY) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(c19667590.spcon) - e1:SetCost(c19667590.spcost) - e1:SetTarget(c19667590.sptg) - e1:SetOperation(c19667590.spop) - c:RegisterEffect(e1) -end -function c19667590.cfilter(c,tp) - return c:IsFaceup() and c:GetSummonPlayer()==tp and c:IsSetCard(0x59) -end -function c19667590.spcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c19667590.cfilter,1,nil,tp) -end -function c19667590.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_BATTLE_PHASE)==0 end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_BP) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) - e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function c19667590.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c19667590.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP_DEFENCE) - end -end diff --git a/script/c19680539.lua b/script/c19680539.lua deleted file mode 100644 index 3459af8a85..0000000000 --- a/script/c19680539.lua +++ /dev/null @@ -1,20 +0,0 @@ ---聖騎士ガウェイン -function c19680539.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_SPSUM_PARAM) - e1:SetTargetRange(POS_FACEUP_DEFENCE,0) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c19680539.spcon) - c:RegisterEffect(e1) -end -function c19680539.filter(c) - return c:IsFaceup() and c:IsType(TYPE_NORMAL) and c:IsAttribute(ATTRIBUTE_LIGHT) -end -function c19680539.spcon(e,c) - if c==nil then return true end - return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and - Duel.IsExistingMatchingCard(c19680539.filter,c:GetControler(),LOCATION_MZONE,0,1,nil) -end diff --git a/script/c19684740.lua b/script/c19684740.lua deleted file mode 100644 index a2f84d5be9..0000000000 --- a/script/c19684740.lua +++ /dev/null @@ -1,34 +0,0 @@ ---妖精騎士イングナル -function c19684740.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,6,3) - c:EnableReviveLimit() - --tohand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(19684740,0)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCost(c19684740.thcost) - e1:SetTarget(c19684740.thtg) - e1:SetOperation(c19684740.thop) - c:RegisterEffect(e1) -end -function c19684740.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,2,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,2,2,REASON_COST) -end -function c19684740.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end - local g=Duel.GetMatchingGroup(Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0) - Duel.SetChainLimit(c19684740.chlimit) -end -function c19684740.chlimit(e,ep,tp) - return tp==ep -end -function c19684740.thop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler()) - Duel.SendtoHand(g,nil,REASON_EFFECT) -end diff --git a/script/c1969506.lua b/script/c1969506.lua deleted file mode 100644 index d0ce053ec0..0000000000 --- a/script/c1969506.lua +++ /dev/null @@ -1,49 +0,0 @@ ---傀儡儀式-パペット・リチューアル -function c1969506.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,1969506+EFFECT_COUNT_CODE_OATH) - e1:SetCondition(c1969506.spcon) - e1:SetCost(c1969506.spcost) - e1:SetTarget(c1969506.sptg) - e1:SetOperation(c1969506.spop) - c:RegisterEffect(e1) -end -function c1969506.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetLP(tp)<=Duel.GetLP(1-tp)-2000 -end -function c1969506.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetCurrentPhase()~=PHASE_MAIN2 end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_BP) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function c1969506.filter(c,e,tp) - return c:IsSetCard(0x83) and c:GetLevel()==8 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c1969506.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c1969506.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>1 - and Duel.IsExistingTarget(c1969506.filter,tp,LOCATION_GRAVE,0,2,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c1969506.filter,tp,LOCATION_GRAVE,0,2,2,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,g:GetCount(),0,0) -end -function c1969506.spop(e,tp,eg,ep,ev,re,r,rp) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ft<=0 then return end - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local sg=g:Filter(Card.IsRelateToEffect,nil,e) - if sg:GetCount()==0 then return end - if ft>=sg:GetCount() then - Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c19700943.lua b/script/c19700943.lua deleted file mode 100644 index 08a9dbf84f..0000000000 --- a/script/c19700943.lua +++ /dev/null @@ -1,33 +0,0 @@ ---ドドドボット -function c19700943.initial_effect(c) - --summon limit - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_LIMIT_SUMMON_PROC) - e1:SetCondition(c19700943.sumcon) - c:RegisterEffect(e1) - --immune - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_ATTACK_ANNOUNCE) - e2:SetOperation(c19700943.atkop) - c:RegisterEffect(e2) -end -function c19700943.sumcon(e,c) - if not c then return true end - return false -end -function c19700943.atkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_IMMUNE_EFFECT) - e1:SetValue(c19700943.efilter) - e1:SetReset(RESET_PHASE+PHASE_DAMAGE) - c:RegisterEffect(e1) -end -function c19700943.efilter(e,te) - return te:GetOwner()~=e:GetOwner() -end diff --git a/script/c19733961.lua b/script/c19733961.lua deleted file mode 100644 index e36c45acf5..0000000000 --- a/script/c19733961.lua +++ /dev/null @@ -1,29 +0,0 @@ ---電池メン-単二型 -function c19733961.initial_effect(c) - --atk,def - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetTarget(aux.TargetBoolFunction(Card.IsRace,RACE_MACHINE)) - e1:SetValue(c19733961.atkval) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_UPDATE_DEFENCE) - e2:SetValue(c19733961.defval) - c:RegisterEffect(e2) -end -function c19733961.filter(c) - return c:IsFaceup() and c:IsCode(19733961) -end -function c19733961.atkval(e,c) - local g=Duel.GetMatchingGroup(c19733961.filter,c:GetControler(),LOCATION_MZONE,0,nil) - if g:IsExists(Card.IsDefencePos,1,nil) then return 0 end - return 500 -end -function c19733961.defval(e,c) - local g=Duel.GetMatchingGroup(c19733961.filter,c:GetControler(),LOCATION_MZONE,0,nil) - if g:IsExists(Card.IsAttackPos,1,nil) then return 0 end - return 500 -end diff --git a/script/c19740112.lua b/script/c19740112.lua deleted file mode 100644 index e4f72d8d22..0000000000 --- a/script/c19740112.lua +++ /dev/null @@ -1,15 +0,0 @@ ---干ばつの結界像 -function c19740112.initial_effect(c) - --disable spsummon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetTargetRange(1,1) - e1:SetTarget(c19740112.sumlimit) - c:RegisterEffect(e1) -end -function c19740112.sumlimit(e,c,sump,sumtype,sumpos,targetp) - return c:GetAttribute()~=ATTRIBUTE_EARTH -end diff --git a/script/c19747827.lua b/script/c19747827.lua deleted file mode 100644 index e6ddd8b6cb..0000000000 --- a/script/c19747827.lua +++ /dev/null @@ -1,69 +0,0 @@ ---真紅眼の黒竜剣 -function c19747827.initial_effect(c) - c:EnableReviveLimit() - --spsummon condition - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - c:RegisterEffect(e1) - --equip - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_EQUIP) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetTarget(c19747827.eqtg) - e2:SetOperation(c19747827.eqop) - c:RegisterEffect(e2) -end -c19747827.material_race=RACE_DRAGON -function c19747827.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() and chkc~=e:GetHandler() end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,e:GetHandler()) -end -function c19747827.eqop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if not tc then return end - local c=e:GetHandler() - if not c:IsRelateToEffect(e) or c:IsLocation(LOCATION_SZONE) or c:IsFacedown() then return end - if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or tc:IsFacedown() or not tc:IsRelateToEffect(e) then - Duel.SendtoGrave(c,REASON_EFFECT) - return - end - Duel.Equip(tp,c,tc) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetValue(c19747827.eqlimit) - e1:SetLabelObject(tc) - e1:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(1000) - e2:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_EQUIP) - e3:SetCode(EFFECT_UPDATE_ATTACK) - e3:SetValue(c19747827.atkval) - e3:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e3) - local e4=e3:Clone() - e4:SetCode(EFFECT_UPDATE_DEFENCE) - c:RegisterEffect(e4) -end -function c19747827.eqlimit(e,c) - return c==e:GetLabelObject() -end -function c19747827.cfilter(c) - return c:IsFaceup() and c:IsRace(RACE_DRAGON) -end -function c19747827.atkval(e,c) - return Duel.GetMatchingGroupCount(c19747827.cfilter,0,LOCATION_MZONE+LOCATION_GRAVE,LOCATION_MZONE+LOCATION_GRAVE,nil)*500 -end diff --git a/script/c19748583.lua b/script/c19748583.lua deleted file mode 100644 index 49ab0947f7..0000000000 --- a/script/c19748583.lua +++ /dev/null @@ -1,95 +0,0 @@ ---聖剣を抱く王妃ギネヴィア -function c19748583.initial_effect(c) - --equip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(19748583,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetRange(LOCATION_HAND+LOCATION_GRAVE) - e1:SetCountLimit(1,19748583) - e1:SetTarget(c19748583.eqtg) - e1:SetOperation(c19748583.eqop) - c:RegisterEffect(e1) - --atkup - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(300) - c:RegisterEffect(e2) - --destroy sub - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_EQUIP+EFFECT_TYPE_CONTINUOUS) - e3:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e3:SetCode(EFFECT_DESTROY_REPLACE) - e3:SetTarget(c19748583.reptg) - e3:SetOperation(c19748583.repop) - c:RegisterEffect(e3) - --destroy - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e4:SetCategory(CATEGORY_DESTROY) - e4:SetCode(EVENT_BATTLE_START) - e4:SetRange(LOCATION_SZONE) - e4:SetCondition(c19748583.descon) - e4:SetTarget(c19748583.destg) - e4:SetOperation(c19748583.desop) - c:RegisterEffect(e4) -end -function c19748583.filter(c) - return c:IsFaceup() and c:IsSetCard(0x107a) -end -function c19748583.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c19748583.filter(chkc) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingTarget(c19748583.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c19748583.filter,tp,LOCATION_MZONE,0,1,1,nil) -end -function c19748583.eqop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) then return end - local tc=Duel.GetFirstTarget() - if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or tc:GetControler()~=tp or tc:IsFacedown() or not tc:IsRelateToEffect(e) then - Duel.SendtoGrave(c,REASON_EFFECT) - return - end - Duel.Equip(tp,c,tc,true) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(c19748583.eqlimit) - c:RegisterEffect(e1) -end -function c19748583.eqlimit(e,c) - return c:IsSetCard(0x107a) -end -function c19748583.reptg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return bit.band(r,REASON_EFFECT)~=0 and c:GetEquipTarget():IsAttribute(ATTRIBUTE_LIGHT) - and not e:GetHandler():IsStatus(STATUS_DESTROY_CONFIRMED) end - return Duel.SelectYesNo(e:GetOwnerPlayer(),aux.Stringid(19748583,1)) -end -function c19748583.repop(e,tp,eg,ep,ev,re,r,rp) - Duel.Destroy(e:GetHandler(),REASON_EFFECT+REASON_REPLACE) -end -function c19748583.descon(e,tp,eg,ep,ev,re,r,rp) - local tg=e:GetHandler():GetEquipTarget() - return tg and tg:IsAttribute(ATTRIBUTE_DARK) and (Duel.GetAttacker()==tg or Duel.GetAttackTarget()==tg) -end -function c19748583.destg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - local tc=c:GetEquipTarget():GetBattleTarget() - if chk==0 then return tc and tc:IsControler(1-tp) end - local g=Group.FromCards(tc,c) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c19748583.desop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=c:GetEquipTarget():GetBattleTarget() - if tc:IsRelateToBattle() and Duel.Destroy(tc,REASON_EFFECT)~=0 then - Duel.BreakEffect() - Duel.Destroy(c,REASON_EFFECT) - end -end diff --git a/script/c19763315.lua b/script/c19763315.lua deleted file mode 100644 index 21a3b2b0d8..0000000000 --- a/script/c19763315.lua +++ /dev/null @@ -1,27 +0,0 @@ ---不運なリポート -function c19763315.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetOperation(c19763315.activate) - c:RegisterEffect(e1) -end -function c19763315.activate(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_BP_TWICE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetTargetRange(0,1) - if Duel.GetTurnPlayer()~=tp and Duel.GetCurrentPhase()==PHASE_BATTLE then - e1:SetLabel(Duel.GetTurnCount()) - e1:SetCondition(c19763315.bpcon) - e1:SetReset(RESET_PHASE+PHASE_BATTLE+RESET_OPPO_TURN,2) - else - e1:SetReset(RESET_PHASE+PHASE_BATTLE+RESET_OPPO_TURN,1) - end - Duel.RegisterEffect(e1,tp) -end -function c19763315.bpcon(e) - return Duel.GetTurnCount()~=e:GetLabel() -end diff --git a/script/c19808608.lua b/script/c19808608.lua deleted file mode 100644 index feb5bc24ca..0000000000 --- a/script/c19808608.lua +++ /dev/null @@ -1,52 +0,0 @@ ---DDバフォメット -function c19808608.initial_effect(c) - --lv change - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_MZONE) - e1:SetTarget(c19808608.lvtg) - e1:SetOperation(c19808608.lvop) - c:RegisterEffect(e1) -end -function c19808608.filter(c) - return c:IsFaceup() and c:IsSetCard(0xaf) and not c:IsCode(19808608) and c:GetLevel()>0 -end -function c19808608.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c19808608.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c19808608.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - local g=Duel.SelectTarget(tp,c19808608.filter,tp,LOCATION_MZONE,0,1,1,nil) - local t={} - local i=1 - local p=1 - local lv=g:GetFirst():GetLevel() - for i=1,8 do - if lv~=i then t[p]=i p=p+1 end - end - t[p]=nil - Duel.Hint(HINT_SELECTMSG,tp,567) - e:SetLabel(Duel.AnnounceNumber(tp,table.unpack(t))) -end -function c19808608.lvop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CHANGE_LEVEL) - e1:SetValue(e:GetLabel()) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - end - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetTargetRange(1,0) - e2:SetTarget(c19808608.splimit) - e2:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e2,tp) -end -function c19808608.splimit(e,c) - return not c:IsSetCard(0xaf) -end diff --git a/script/c19814508.lua b/script/c19814508.lua deleted file mode 100644 index 0af9a4c6d7..0000000000 --- a/script/c19814508.lua +++ /dev/null @@ -1,70 +0,0 @@ ---U.A.スタジアム -function c19814508.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --search - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(19814508,0)) - e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY) - e2:SetRange(LOCATION_FZONE) - e2:SetCode(EVENT_SUMMON_SUCCESS) - e2:SetTarget(c19814508.target) - e2:SetOperation(c19814508.operation) - c:RegisterEffect(e2) - --atkup - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(19814508,1)) - e3:SetCategory(CATEGORY_ATKCHANGE) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e3:SetProperty(EFFECT_FLAG_DELAY) - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - e3:SetRange(LOCATION_FZONE) - e3:SetCountLimit(1) - e3:SetCondition(c19814508.atkcon) - e3:SetOperation(c19814508.atkop) - c:RegisterEffect(e3) -end -function c19814508.filter(c) - return c:IsSetCard(0xb2) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() -end -function c19814508.target(e,tp,eg,ep,ev,re,r,rp,chk) - local tc=eg:GetFirst() - if chk==0 then return tc:IsSetCard(0xb2) and tc:IsControler(tp) - and Duel.IsExistingMatchingCard(c19814508.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c19814508.operation(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c19814508.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end -function c19814508.cfilter(c,tp) - return c:IsFaceup() and c:IsSetCard(0xb2) and c:IsControler(tp) -end -function c19814508.atkcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c19814508.cfilter,1,nil,tp) -end -function c19814508.atkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) then return end - local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil) - local tc=g:GetFirst() - while tc do - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_UPDATE_ATTACK) - e3:SetReset(RESET_EVENT+0x1fe0000) - e3:SetValue(500) - tc:RegisterEffect(e3) - tc=g:GetNext() - end -end diff --git a/script/c19827717.lua b/script/c19827717.lua deleted file mode 100644 index c62b25bf54..0000000000 --- a/script/c19827717.lua +++ /dev/null @@ -1,52 +0,0 @@ ---死者の生還 -function c19827717.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c19827717.cost) - e1:SetOperation(c19827717.activate) - c:RegisterEffect(e1) -end -function c19827717.costfilter(c) - return c:IsDiscardable() and c:IsAbleToGraveAsCost() and c:IsType(TYPE_MONSTER) -end -function c19827717.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c19827717.costfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,c19827717.costfilter,1,1,REASON_COST+REASON_DISCARD) -end -function c19827717.activate(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetDescription(aux.Stringid(19827717,0)) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCountLimit(1) - e1:SetCondition(c19827717.retcon) - e1:SetTarget(c19827717.rettg) - e1:SetOperation(c19827717.retop) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function c19827717.filter(c,tid) - return c:IsAbleToHand() and c:IsType(TYPE_MONSTER) and c:GetTurnID()==tid and c:IsReason(REASON_BATTLE) -end -function c19827717.retcon(e,tp,eg,ep,ev,re,r,rp) - local tid=Duel.GetTurnCount() - return Duel.IsExistingMatchingCard(c19827717.filter,tp,LOCATION_GRAVE,0,1,nil,tid) -end -function c19827717.rettg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local tid=Duel.GetTurnCount() - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c19827717.filter(chkc,tid) end - if chk==0 then return Duel.IsExistingTarget(c19827717.filter,tp,LOCATION_GRAVE,0,1,nil,tid) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c19827717.filter,tp,LOCATION_GRAVE,0,1,1,nil,tid) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c19827717.retop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end diff --git a/script/c19844995.lua b/script/c19844995.lua deleted file mode 100644 index d9fabcc48e..0000000000 --- a/script/c19844995.lua +++ /dev/null @@ -1,19 +0,0 @@ ---召喚制限-パワーフィルター -function c19844995.initial_effect(c) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --disable spsummon - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetRange(LOCATION_SZONE) - e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetTargetRange(1,1) - e2:SetTarget(c19844995.sumlimit) - c:RegisterEffect(e2) -end -function c19844995.sumlimit(e,c,sump,sumtype,sumpos,targetp) - return c:IsAttackBelow(1000) -end diff --git a/script/c19847532.lua b/script/c19847532.lua deleted file mode 100644 index 44ebeec1c0..0000000000 --- a/script/c19847532.lua +++ /dev/null @@ -1,47 +0,0 @@ ---ヘルフレイムエンペラー -function c19847532.initial_effect(c) - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(19847532,0)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_SUMMON_SUCCESS) - e2:SetCondition(c19847532.condition) - e2:SetTarget(c19847532.target) - e2:SetOperation(c19847532.operation) - c:RegisterEffect(e2) -end -function c19847532.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_ADVANCE -end -function c19847532.desfilter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable() -end -function c19847532.cfilter(c) - return c:IsAttribute(ATTRIBUTE_FIRE) and c:IsAbleToRemoveAsCost() -end -function c19847532.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c19847532.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) - and Duel.IsExistingMatchingCard(c19847532.cfilter,tp,LOCATION_GRAVE,0,1,nil) end - local dg=Duel.GetMatchingGroup(c19847532.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) - local ct=dg:GetCount() - if ct>5 then ct=5 end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local rg=Duel.SelectMatchingCard(tp,c19847532.cfilter,tp,LOCATION_GRAVE,0,1,ct,nil) - Duel.Remove(rg,POS_FACEUP,REASON_COST) - Duel.SetTargetParam(rg:GetCount()) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,dg,rg:GetCount(),0,0) -end -function c19847532.operation(e,tp,eg,ep,ev,re,r,rp) - local ct=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectMatchingCard(tp,c19847532.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,ct,ct,nil) - Duel.HintSelection(g) - Duel.Destroy(g,REASON_EFFECT) -end diff --git a/script/c19870120.lua b/script/c19870120.lua deleted file mode 100644 index d44329492a..0000000000 --- a/script/c19870120.lua +++ /dev/null @@ -1,42 +0,0 @@ ---進撃の帝王 -function c19870120.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --spsummon limit - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetRange(LOCATION_SZONE) - e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetTargetRange(1,0) - e2:SetTarget(c19870120.sumlimit) - c:RegisterEffect(e2) - --cannot be target - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) - e3:SetProperty(EFFECT_FLAG_SET_AVAILABLE) - e3:SetRange(LOCATION_SZONE) - e3:SetTargetRange(LOCATION_MZONE,0) - e3:SetTarget(c19870120.target) - e3:SetValue(aux.tgval) - c:RegisterEffect(e3) - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_FIELD) - e4:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - e4:SetProperty(EFFECT_FLAG_SET_AVAILABLE) - e4:SetRange(LOCATION_SZONE) - e4:SetTargetRange(LOCATION_MZONE,0) - e4:SetTarget(c19870120.target) - e4:SetValue(1) - c:RegisterEffect(e4) -end -function c19870120.sumlimit(e,c,sump,sumtype,sumpos,targetp) - return c:IsLocation(LOCATION_EXTRA) -end -function c19870120.target(e,c) - return bit.band(c:GetSummonType(),SUMMON_TYPE_ADVANCE)==SUMMON_TYPE_ADVANCE -end diff --git a/script/c19877898.lua b/script/c19877898.lua deleted file mode 100644 index 6d258a2492..0000000000 --- a/script/c19877898.lua +++ /dev/null @@ -1,22 +0,0 @@ ---アルティメット・インセクト LV7 -function c19877898.initial_effect(c) - --atk,def down - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(0,LOCATION_MZONE) - e1:SetCondition(c19877898.con) - e1:SetValue(-700) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_UPDATE_DEFENCE) - c:RegisterEffect(e2) -end -c19877898.lvupcount=1 -c19877898.lvup={34830502} -c19877898.lvdncount=3 -c19877898.lvdn={49441499,34088136,34830502} -function c19877898.con(e) - return e:GetHandler():GetFlagEffect(19877898)~=0 -end diff --git a/script/c19891310.lua b/script/c19891310.lua deleted file mode 100644 index 5e28d56795..0000000000 --- a/script/c19891310.lua +++ /dev/null @@ -1,83 +0,0 @@ ---ギアギアギア XG -function c19891310.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,3,3) - c:EnableReviveLimit() - --disable - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(TIMING_BATTLE_PHASE) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c19891310.condition) - e1:SetCost(c19891310.cost) - e1:SetOperation(c19891310.operation) - c:RegisterEffect(e1) - --tohand - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_TOHAND) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetCondition(c19891310.thcon) - e2:SetTarget(c19891310.thtg) - e2:SetOperation(c19891310.thop) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EVENT_REMOVE) - c:RegisterEffect(e3) - local e4=e2:Clone() - e4:SetCode(EVENT_TO_DECK) - c:RegisterEffect(e4) -end -function c19891310.condition(e,tp,eg,ep,ev,re,r,rp) - local bt=Duel.GetAttacker() - if bt and bt:IsControler(tp) then return bt:IsRace(RACE_MACHINE) end - bt=Duel.GetAttackTarget() - return bt and bt:IsControler(tp) and bt:IsRace(RACE_MACHINE) -end -function c19891310.cost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:CheckRemoveOverlayCard(tp,1,REASON_COST) and c:GetFlagEffect(19891310)==0 end - c:RemoveOverlayCard(tp,1,1,REASON_COST) - c:RegisterFlagEffect(19891310,RESET_CHAIN,0,1) -end -function c19891310.operation(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_DISABLE) - e1:SetTargetRange(0,LOCATION_ONFIELD) - e1:SetReset(RESET_PHASE+PHASE_DAMAGE) - Duel.RegisterEffect(e1,tp) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetCode(EFFECT_CANNOT_ACTIVATE) - e2:SetTargetRange(0,1) - e2:SetValue(c19891310.aclimit) - e2:SetReset(RESET_PHASE+PHASE_DAMAGE) - Duel.RegisterEffect(e2,tp) -end -function c19891310.aclimit(e,re,tp) - return re:IsHasType(EFFECT_TYPE_ACTIVATE) or re:IsActiveType(TYPE_MONSTER) -end -function c19891310.thcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousPosition(POS_FACEUP) and e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) -end -function c19891310.thfilter(c) - return c:IsSetCard(0x72) and c:IsAbleToHand() -end -function c19891310.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c19891310.thfilter(chkc) and chkc~=e:GetHandler() end - if chk==0 then return Duel.IsExistingTarget(c19891310.thfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c19891310.thfilter,tp,LOCATION_GRAVE,0,1,1,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c19891310.thop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end diff --git a/script/c1992816.lua b/script/c1992816.lua deleted file mode 100644 index 5e87bf9da9..0000000000 --- a/script/c1992816.lua +++ /dev/null @@ -1,90 +0,0 @@ ---No.9 天蓋星ダイソン・スフィア -function c1992816.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,9,2) - c:EnableReviveLimit() - --negate attack - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(1992816,0)) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetRange(LOCATION_MZONE) - e1:SetHintTiming(0,TIMING_BATTLE_PHASE) - e1:SetCondition(c1992816.atkcon) - e1:SetCost(c1992816.atkcost) - e1:SetOperation(c1992816.atkop) - c:RegisterEffect(e1) - --material - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(1992816,1)) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_BE_BATTLE_TARGET) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCondition(c1992816.olcon) - e2:SetTarget(c1992816.oltg) - e2:SetOperation(c1992816.olop) - c:RegisterEffect(e2) - --direct attack - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(1992816,0)) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1) - e3:SetCondition(c1992816.dacon) - e3:SetCost(c1992816.dacost) - e3:SetOperation(c1992816.daop) - c:RegisterEffect(e3) -end -c1992816.xyz_number=9 -function c1992816.atkcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler()==Duel.GetAttackTarget() and e:GetHandler():GetOverlayCount()~=0 -end -function c1992816.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():GetFlagEffect(1992816)==0 end - e:GetHandler():RegisterFlagEffect(1992816,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_DAMAGE,0,1) -end -function c1992816.atkop(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateAttack() -end -function c1992816.olcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetOverlayCount()==0 and e:GetHandler():IsType(TYPE_XYZ) -end -function c1992816.oltg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and chkc:IsType(TYPE_MONSTER) end - if chk==0 then return Duel.IsExistingTarget(Card.IsType,tp,LOCATION_GRAVE,0,2,nil,TYPE_MONSTER) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - local g=Duel.SelectTarget(tp,Card.IsType,tp,LOCATION_GRAVE,0,2,2,nil,TYPE_MONSTER) - Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g,2,0,0) -end -function c1992816.olop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) - if g:GetCount()>0 then - Duel.Overlay(c,g) - end - end -end -function c1992816.dafilter(c,atk) - return c:IsFaceup() and c:GetAttack()>atk -end -function c1992816.dacon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()==PHASE_MAIN1 - and Duel.IsExistingMatchingCard(c1992816.dafilter,tp,0,LOCATION_MZONE,1,nil,e:GetHandler():GetAttack()) -end -function c1992816.dacost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c1992816.daop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFaceup() and c:IsRelateToEffect(e) - and Duel.IsExistingMatchingCard(c1992816.dafilter,tp,0,LOCATION_MZONE,1,nil,c:GetAttack()) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_DIRECT_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - c:RegisterEffect(e1) - end -end diff --git a/script/c19932396.lua b/script/c19932396.lua deleted file mode 100644 index e90db8879a..0000000000 --- a/script/c19932396.lua +++ /dev/null @@ -1,32 +0,0 @@ ---侵略の一手 -function c19932396.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c19932396.cost) - e1:SetTarget(c19932396.target) - e1:SetOperation(c19932396.activate) - c:RegisterEffect(e1) -end -function c19932396.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x100a) - and bit.band(c:GetSummonType(),SUMMON_TYPE_ADVANCE)==SUMMON_TYPE_ADVANCE and c:IsAbleToHandAsCost() -end -function c19932396.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c19932396.cfilter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g=Duel.SelectMatchingCard(tp,c19932396.cfilter,tp,LOCATION_MZONE,0,1,1,nil) - Duel.SendtoHand(g,nil,REASON_COST) -end -function c19932396.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(1) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c19932396.activate(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end diff --git a/script/c19959742.lua b/script/c19959742.lua deleted file mode 100644 index 345a90c9aa..0000000000 --- a/script/c19959742.lua +++ /dev/null @@ -1,24 +0,0 @@ ---リチュア・シェルフィッシュ -function c19959742.initial_effect(c) - --confirm - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(19959742,0)) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCondition(c19959742.condition) - e1:SetOperation(c19959742.operation) - c:RegisterEffect(e1) -end -function c19959742.condition(e,tp,eg,ep,ev,re,r,rp) - return bit.band(r,REASON_EFFECT)~=0 and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>=3 -end -function c19959742.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)<3 then return end - Duel.SortDecktop(tp,tp,3) - if Duel.SelectOption(tp,aux.Stringid(19959742,1),aux.Stringid(19959742,2))==1 then - for i=1,3 do - local mg=Duel.GetDecktopGroup(tp,1) - Duel.MoveSequence(mg:GetFirst(),1) - end - end -end diff --git a/script/c1995985.lua b/script/c1995985.lua deleted file mode 100644 index b314a31610..0000000000 --- a/script/c1995985.lua +++ /dev/null @@ -1,72 +0,0 @@ ---サイレント・ソードマン LV3 -function c1995985.initial_effect(c) - --disable effect - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_CHAIN_SOLVING) - e1:SetRange(LOCATION_MZONE) - e1:SetOperation(c1995985.disop) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(1995985,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) - e2:SetCondition(c1995985.spcon) - e2:SetCost(c1995985.spcost) - e2:SetTarget(c1995985.sptg) - e2:SetOperation(c1995985.spop) - c:RegisterEffect(e2) - --reg - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e3:SetCode(EVENT_SUMMON_SUCCESS) - e3:SetOperation(c1995985.regop) - c:RegisterEffect(e3) - local e4=e3:Clone() - e4:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e4) - local e5=e3:Clone() - e5:SetCode(EVENT_FLIP) - c:RegisterEffect(e5) -end -c1995985.lvupcount=1 -c1995985.lvup={74388798} -function c1995985.disop(e,tp,eg,ep,ev,re,r,rp) - if not re:GetHandler():IsType(TYPE_SPELL) or rp==tp then return end - if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return end - local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) - if g and g:IsContains(e:GetHandler()) then - Duel.NegateEffect(ev) - end -end -function c1995985.regop(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():RegisterFlagEffect(1995985,RESET_EVENT+0x1ec0000+RESET_PHASE+RESET_END,0,1) -end -function c1995985.spcon(e,tp,eg,ep,ev,re,r,rp) - return tp==Duel.GetTurnPlayer() and e:GetHandler():GetFlagEffect(1995985)==0 -end -function c1995985.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end -function c1995985.spfilter(c,e,tp) - return c:IsCode(74388798) and c:IsCanBeSpecialSummoned(e,0,tp,true,true) -end -function c1995985.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsExistingMatchingCard(c1995985.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) -end -function c1995985.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c1995985.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp) - local tc=g:GetFirst() - if tc then - Duel.SpecialSummon(tc,0,tp,tp,true,true,POS_FACEUP) - tc:CompleteProcedure() - end -end diff --git a/script/c19974580.lua b/script/c19974580.lua deleted file mode 100644 index e64443784c..0000000000 --- a/script/c19974580.lua +++ /dev/null @@ -1,57 +0,0 @@ ---C・ドラゴン -function c19974580.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1) - c:EnableReviveLimit() - --atkup - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_REMOVE+CATEGORY_ATKCHANGE) - e1:SetDescription(aux.Stringid(19974580,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetRange(LOCATION_MZONE) - e1:SetTarget(c19974580.attg) - e1:SetOperation(c19974580.atop) - c:RegisterEffect(e1) - --discard deck - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(19974580,1)) - e2:SetCategory(CATEGORY_DECKDES) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_BATTLE_DAMAGE) - e2:SetCondition(c19974580.ddcon) - e2:SetTarget(c19974580.ddtg) - e2:SetOperation(c19974580.ddop) - c:RegisterEffect(e2) -end -function c19974580.rfilter(c) - return c:IsSetCard(0x25) and c:IsAbleToRemove() -end -function c19974580.attg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c19974580.rfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_GRAVE) -end -function c19974580.atop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) or c:IsFacedown() then return end - local g=Duel.GetMatchingGroup(c19974580.rfilter,tp,LOCATION_GRAVE,0,nil) - local ct=Duel.Remove(g,POS_FACEUP,REASON_EFFECT) - if ct>0 then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(ct*200) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - c:RegisterEffect(e1) - end -end -function c19974580.ddcon(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp -end -function c19974580.ddtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DECKDES,0,0,1-tp,3) -end -function c19974580.ddop(e,tp,eg,ep,ev,re,r,rp) - Duel.DiscardDeck(1-tp,3,REASON_EFFECT) -end diff --git a/script/c19980975.lua b/script/c19980975.lua deleted file mode 100644 index 0c11287e95..0000000000 --- a/script/c19980975.lua +++ /dev/null @@ -1,32 +0,0 @@ ---ダイヤモンドダスト・サイクロン -function c19980975.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c19980975.target) - e1:SetOperation(c19980975.activate) - c:RegisterEffect(e1) -end -function c19980975.filter(c) - return c:GetCounter(0x19)>=4 and c:IsDestructable() -end -function c19980975.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c19980975.filter(chkc) end - if chk==0 then return Duel.IsPlayerCanDraw(tp) - and Duel.IsExistingTarget(c19980975.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c19980975.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c19980975.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - local ct=math.floor(tc:GetCounter(0x19)/4) - if Duel.Destroy(tc,REASON_EFFECT)~=0 and ct~=0 then - Duel.Draw(tp,ct,REASON_EFFECT) - end - end -end diff --git a/script/c20003527.lua b/script/c20003527.lua deleted file mode 100644 index 7a58f6eeb8..0000000000 --- a/script/c20003527.lua +++ /dev/null @@ -1,84 +0,0 @@ ---雲魔物-ニンバスマン -function c20003527.initial_effect(c) - --battle indestructable - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e1:SetValue(1) - c:RegisterEffect(e1) - --selfdes - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EFFECT_SELF_DESTROY) - e2:SetCondition(c20003527.sdcon) - c:RegisterEffect(e2) - --summon proc - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(20003527,0)) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_SUMMON_PROC) - e3:SetCondition(c20003527.sumcon) - e3:SetOperation(c20003527.sumop) - e3:SetValue(SUMMON_TYPE_ADVANCE) - c:RegisterEffect(e3) - --tribute check - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetCode(EFFECT_MATERIAL_CHECK) - e4:SetValue(c20003527.valcheck) - c:RegisterEffect(e4) - --add counter - local e5=Effect.CreateEffect(c) - e5:SetDescription(aux.Stringid(20003527,0)) - e5:SetCategory(CATEGORY_COUNTER) - e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e5:SetCode(EVENT_SUMMON_SUCCESS) - e5:SetCondition(c20003527.addcon) - e5:SetOperation(c20003527.addc) - e5:SetLabelObject(e4) - c:RegisterEffect(e5) - --atk - local e6=Effect.CreateEffect(c) - e6:SetType(EFFECT_TYPE_SINGLE) - e6:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e6:SetRange(LOCATION_MZONE) - e6:SetCode(EFFECT_UPDATE_ATTACK) - e6:SetValue(c20003527.atkval) - c:RegisterEffect(e6) -end -function c20003527.sdcon(e) - return e:GetHandler():IsPosition(POS_FACEUP_DEFENCE) -end -function c20003527.cfilter(c,tp) - return c:IsAttribute(ATTRIBUTE_WATER) and (c:IsControler(tp) or c:IsFaceup()) -end -function c20003527.sumcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - local mg=Duel.GetMatchingGroup(c20003527.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp) - return c:GetLevel()>4 and Duel.GetTributeCount(c,mg)>0 -end -function c20003527.sumop(e,tp,eg,ep,ev,re,r,rp,c) - local mg=Duel.GetMatchingGroup(c20003527.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp) - local sg=Duel.SelectTribute(tp,c,1,10,mg) - c:SetMaterial(sg) - Duel.Release(sg,REASON_SUMMON+REASON_MATERIAL) -end -function c20003527.valcheck(e,c) - local g=c:GetMaterial() - e:SetLabel(g:FilterCount(Card.IsAttribute,nil,ATTRIBUTE_WATER)) -end -function c20003527.addcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_ADVANCE -end -function c20003527.addc(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - e:GetHandler():AddCounter(0x19,e:GetLabelObject():GetLabel()) - end -end -function c20003527.atkval(e,c) - return Duel.GetCounter(0,1,1,0x19)*500 -end diff --git a/script/c20032555.lua b/script/c20032555.lua deleted file mode 100644 index 5f2ff40cbd..0000000000 --- a/script/c20032555.lua +++ /dev/null @@ -1,42 +0,0 @@ ---ギミック・パペット-ボム・エッグ -function c20032555.initial_effect(c) - --effects - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetDescription(aux.Stringid(20032555,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1,20032555) - e1:SetTarget(c20032555.efftg) - e1:SetOperation(c20032555.effop) - c:RegisterEffect(e1) -end -function c20032555.cfilter(c) - return c:IsSetCard(0x83) and c:IsType(TYPE_MONSTER) and c:IsDiscardable() -end -function c20032555.efftg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c20032555.cfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,c20032555.cfilter,1,1,REASON_COST+REASON_DISCARD) - local opt=0 - if e:GetHandler():GetLevel()==8 then - opt=Duel.SelectOption(tp,aux.Stringid(20032555,1)) - else - opt=Duel.SelectOption(tp,aux.Stringid(20032555,1),aux.Stringid(20032555,2)) - end - e:SetLabel(opt) - if opt==0 then - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,800) - end -end -function c20032555.effop(e,tp,eg,ep,ev,re,r,rp) - if e:GetLabel()==0 then - Duel.Damage(1-tp,800,REASON_EFFECT) - else - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CHANGE_LEVEL) - e1:SetValue(8) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e:GetHandler():RegisterEffect(e1) - end -end diff --git a/script/c20036055.lua b/script/c20036055.lua deleted file mode 100644 index d63259040b..0000000000 --- a/script/c20036055.lua +++ /dev/null @@ -1,37 +0,0 @@ ---旅人の到彼岸 -function c20036055.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_END_PHASE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCountLimit(1,20036055+EFFECT_COUNT_CODE_OATH) - e1:SetTarget(c20036055.sptg) - e1:SetOperation(c20036055.spop) - c:RegisterEffect(e1) -end -function c20036055.filter(c,e,tp,id) - return c:IsSetCard(0xb1) and c:GetTurnID()==id and not c:IsReason(REASON_RETURN) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c20036055.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c20036055.filter(chkc,e,tp,Duel.GetTurnCount()) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c20036055.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp,Duel.GetTurnCount()) end - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c20036055.filter,tp,LOCATION_GRAVE,0,1,ft,nil,e,tp,Duel.GetTurnCount()) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,g:GetCount(),0,0) -end -function c20036055.spop(e,tp,eg,ep,ev,re,r,rp) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ft<=0 then return end - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local sg=g:Filter(Card.IsRelateToEffect,nil,e) - if sg:GetCount()>ft then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - sg=sg:Select(tp,ft,ft,nil) - end - Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP_DEFENCE) -end diff --git a/script/c20056760.lua b/script/c20056760.lua deleted file mode 100644 index 15de0cca93..0000000000 --- a/script/c20056760.lua +++ /dev/null @@ -1,77 +0,0 @@ ---グレイドル・スライム -function c20056760.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND+LOCATION_GRAVE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCountLimit(1,20056760) - e1:SetTarget(c20056760.sptg1) - e1:SetOperation(c20056760.spop1) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCondition(c20056760.spcon2) - e2:SetTarget(c20056760.sptg2) - e2:SetOperation(c20056760.spop2) - c:RegisterEffect(e2) -end -function c20056760.filter(c) - return c:IsFaceup() and c:IsSetCard(0xd1) and c:IsDestructable() -end -function c20056760.sptg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsControler(tp) and c20056760.filter(chkc) end - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if chk==0 then - if ft<-1 then return false end - return e:GetHandler():IsCanBeSpecialSummoned(e,1,tp,false,false) - and Duel.IsExistingTarget(c20056760.filter,tp,LOCATION_ONFIELD,0,2,nil) - and (ft>0 or Duel.IsExistingTarget(c20056760.filter,tp,LOCATION_MZONE,0,-ft+1,nil)) - end - local g=nil - if ft~=0 then - local loc=LOCATION_ONFIELD - if ft<0 then loc=LOCATION_MZONE end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - g=Duel.SelectTarget(tp,c20056760.filter,tp,loc,0,2,2,nil) - else - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - g=Duel.SelectTarget(tp,c20056760.filter,tp,LOCATION_MZONE,0,1,1,nil) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g2=Duel.SelectTarget(tp,c20056760.filter,tp,LOCATION_ONFIELD,0,1,1,g:GetFirst()) - g:Merge(g2) - end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,2,0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c20056760.spop1(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) - if Duel.Destroy(g,REASON_EFFECT)~=0 then - Duel.SpecialSummon(e:GetHandler(),1,tp,tp,false,false,POS_FACEUP) - end -end -function c20056760.spcon2(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+1 -end -function c20056760.spfilter(c,e,tp) - return c:IsSetCard(0xd1) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c20056760.sptg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c20056760.spfilter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c20056760.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c20056760.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c20056760.spop2(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENCE) - end -end diff --git a/script/c20057949.lua b/script/c20057949.lua deleted file mode 100644 index 98aa2c10bc..0000000000 --- a/script/c20057949.lua +++ /dev/null @@ -1,92 +0,0 @@ ---フォーチュン・インハーリット -function c20057949.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_END_PHASE) - e1:SetCondition(c20057949.condition) - e1:SetOperation(c20057949.activate) - c:RegisterEffect(e1) - if not c20057949.global_check then - c20057949.global_check=true - c20057949[0]=false - c20057949[1]=false - local ge1=Effect.CreateEffect(c) - ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - ge1:SetCode(EVENT_DESTROYED) - ge1:SetOperation(c20057949.checkop1) - Duel.RegisterEffect(ge1,0) - local ge2=Effect.CreateEffect(c) - ge2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - ge2:SetCode(EVENT_PHASE_START+PHASE_DRAW) - ge2:SetOperation(c20057949.clear) - Duel.RegisterEffect(ge2,0) - end -end -function c20057949.checkop1(e,tp,eg,ep,ev,re,r,rp) - local tc=eg:GetFirst() - while tc do - if tc:IsPreviousLocation(LOCATION_MZONE) and tc:IsPreviousPosition(POS_FACEUP) and tc:IsPreviousSetCard(0x31) then - c20057949[tc:GetPreviousControler()]=true - end - tc=eg:GetNext() - end -end -function c20057949.clear(e,tp,eg,ep,ev,re,r,rp) - c20057949[0]=false - c20057949[1]=false -end -function c20057949.condition(e,tp,eg,ep,ev,re,r,rp) - return c20057949[tp] -end -function c20057949.activate(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) - e1:SetCountLimit(1) - e1:SetLabel(Duel.GetTurnCount()) - e1:SetCondition(c20057949.spcon1) - e1:SetOperation(c20057949.spop1) - if Duel.GetTurnPlayer()==tp then - e1:SetReset(RESET_PHASE+PHASE_END+RESET_SELF_TURN,2) - else - e1:SetReset(RESET_PHASE+PHASE_END+RESET_SELF_TURN,1) - end - Duel.RegisterEffect(e1,tp) -end -function c20057949.spcon1(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnCount()~=e:GetLabel() and Duel.GetTurnPlayer()==tp -end -function c20057949.filter(c,e,tp) - return c:IsSetCard(0x31) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c20057949.spop1(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c20057949.filter,tp,LOCATION_HAND,0,1,nil,e,tp) - and Duel.SelectYesNo(tp,aux.Stringid(20057949,0)) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetDescription(aux.Stringid(20057949,1)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) - e1:SetCountLimit(1) - e1:SetTarget(c20057949.sptg2) - e1:SetOperation(c20057949.spop2) - e1:SetReset(RESET_PHASE+PHASE_STANDBY) - Duel.RegisterEffect(e1,tp) - end -end -function c20057949.sptg2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c20057949.spop2(e,tp,eg,ep,ev,re,r,rp) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ft<=0 then return end - if ft>2 then ft=2 end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c20057949.filter,tp,LOCATION_HAND,0,1,ft,nil,e,tp) - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) -end diff --git a/script/c20065322.lua b/script/c20065322.lua deleted file mode 100644 index ce38de39a0..0000000000 --- a/script/c20065322.lua +++ /dev/null @@ -1,41 +0,0 @@ ---クリボーを呼ぶ笛 -function c20065322.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c20065322.target) - e1:SetOperation(c20065322.activate) - c:RegisterEffect(e1) -end -function c20065322.filter(c,ft,e,tp) - local code=c:GetCode() - return (code==40640057 or code==57116033) - and (c:IsAbleToHand() or (ft>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false))) -end -function c20065322.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - return Duel.IsExistingMatchingCard(c20065322.filter,tp,LOCATION_DECK,0,1,nil,ft,e,tp) - end -end -function c20065322.activate(e,tp,eg,ep,ev,re,r,rp) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - Duel.Hint(HINT_SELECTMSG,tp,0) - local g=Duel.SelectMatchingCard(tp,c20065322.filter,tp,LOCATION_DECK,0,1,1,nil,ft,e,tp) - if g:GetCount()>0 then - local th=g:GetFirst():IsAbleToHand() - local sp=ft>0 and g:GetFirst():IsCanBeSpecialSummoned(e,0,tp,false,false) - local op=0 - if th and sp then op=Duel.SelectOption(tp,aux.Stringid(20065322,0),aux.Stringid(20065322,1)) - elseif th then op=0 - else op=1 end - if op==0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - else - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end - end -end diff --git a/script/c20065549.lua b/script/c20065549.lua deleted file mode 100644 index c7397ba8fc..0000000000 --- a/script/c20065549.lua +++ /dev/null @@ -1,23 +0,0 @@ ---絶対魔法禁止区域 -function c20065549.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --immune - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_IMMUNE_EFFECT) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e2:SetTarget(c20065549.etarget) - e2:SetValue(c20065549.efilter) - c:RegisterEffect(e2) -end -function c20065549.etarget(e,c) - return not c:IsType(TYPE_EFFECT) -end -function c20065549.efilter(e,re) - return re:IsActiveType(TYPE_SPELL) -end diff --git a/script/c2009101.lua b/script/c2009101.lua deleted file mode 100644 index 965f53c13a..0000000000 --- a/script/c2009101.lua +++ /dev/null @@ -1,53 +0,0 @@ ---BF-疾風のゲイル -function c2009101.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c2009101.spcon) - c:RegisterEffect(e1) - --atk def down - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(2009101,0)) - e2:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetTarget(c2009101.target) - e2:SetOperation(c2009101.operation) - c:RegisterEffect(e2) -end -function c2009101.filter(c) - return c:IsFaceup() and c:IsSetCard(0x33) and c:GetCode()~=2009101 -end -function c2009101.spcon(e,c) - if c==nil then return true end - return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and - Duel.IsExistingMatchingCard(c2009101.filter,c:GetControler(),LOCATION_MZONE,0,1,nil) -end -function c2009101.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil) -end -function c2009101.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(tc:GetAttack()/2) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_SET_DEFENCE_FINAL) - e2:SetReset(RESET_EVENT+0x1fe0000) - e2:SetValue(tc:GetDefence()/2) - tc:RegisterEffect(e2) - end -end diff --git a/script/c20101223.lua b/script/c20101223.lua deleted file mode 100644 index 4621de8035..0000000000 --- a/script/c20101223.lua +++ /dev/null @@ -1,23 +0,0 @@ ---神の息吹 -function c20101223.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c20101223.target) - e1:SetOperation(c20101223.activate) - c:RegisterEffect(e1) -end -function c20101223.filter(c) - return c:IsRace(RACE_ROCK) and c:IsFaceup() and c:IsDestructable() -end -function c20101223.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c20101223.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - local sg=Duel.GetMatchingGroup(c20101223.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,sg:GetCount(),0,0) -end -function c20101223.activate(e,tp,eg,ep,ev,re,r,rp) - local sg=Duel.GetMatchingGroup(c20101223.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - Duel.Destroy(sg,REASON_EFFECT) -end diff --git a/script/c20127343.lua b/script/c20127343.lua deleted file mode 100644 index ed80b3a58d..0000000000 --- a/script/c20127343.lua +++ /dev/null @@ -1,34 +0,0 @@ ---A・ジェネクス・チェンジャー -function c20127343.initial_effect(c) - --att change - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(20127343,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetTarget(c20127343.costg) - e1:SetOperation(c20127343.cosop) - c:RegisterEffect(e1) -end -function c20127343.costg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.Hint(HINT_SELECTMSG,tp,0) - local att=Duel.AnnounceAttribute(tp,1,0x7f) - e:SetLabel(att) -end -function c20127343.cosop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CHANGE_ATTRIBUTE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetValue(e:GetLabel()) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - end -end diff --git a/script/c20138923.lua b/script/c20138923.lua deleted file mode 100644 index d781978e3d..0000000000 --- a/script/c20138923.lua +++ /dev/null @@ -1,29 +0,0 @@ ---反魔鏡 -function c20138923.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_CHAINING) - e1:SetCondition(c20138923.condition) - e1:SetTarget(c20138923.target) - e1:SetOperation(c20138923.activate) - c:RegisterEffect(e1) -end -function c20138923.condition(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp and re:IsActiveType(TYPE_QUICKPLAY) -end -function c20138923.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsDestructable() and chkc~=e:GetHandler() end - if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c20138923.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c20140382.lua b/script/c20140382.lua deleted file mode 100644 index 5fe8fc5a40..0000000000 --- a/script/c20140382.lua +++ /dev/null @@ -1,33 +0,0 @@ ---オーバーウェルム -function c20140382.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_CHAINING) - e1:SetCondition(c20140382.condition) - e1:SetTarget(c20140382.target) - e1:SetOperation(c20140382.activate) - c:RegisterEffect(e1) -end -function c20140382.cfilter(c) - return c:IsFaceup() and c:IsLevelAbove(7) and bit.band(c:GetSummonType(),SUMMON_TYPE_ADVANCE)==SUMMON_TYPE_ADVANCE -end -function c20140382.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c20140382.cfilter,tp,LOCATION_MZONE,0,1,nil) - and Duel.IsChainNegatable(ev) - and (re:IsActiveType(TYPE_MONSTER) or (re:IsActiveType(TYPE_TRAP) and re:IsHasType(EFFECT_TYPE_ACTIVATE))) -end -function c20140382.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) - end -end -function c20140382.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateActivation(ev) - if re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(eg,REASON_EFFECT) - end -end diff --git a/script/c20154092.lua b/script/c20154092.lua deleted file mode 100644 index e8f4211cb5..0000000000 --- a/script/c20154092.lua +++ /dev/null @@ -1,37 +0,0 @@ ---先史遺産カブレラの投石機 -function c20154092.initial_effect(c) - --atk - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(20154092,0)) - e2:SetCategory(CATEGORY_ATKCHANGE) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCost(c20154092.cost) - e2:SetTarget(c20154092.target) - e2:SetOperation(c20154092.operation) - c:RegisterEffect(e2) -end -function c20154092.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsSetCard,1,e:GetHandler(),0x70) end - local g=Duel.SelectReleaseGroup(tp,Card.IsSetCard,1,1,e:GetHandler(),0x70) - Duel.Release(g,REASON_COST) -end -function c20154092.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil) -end -function c20154092.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetValue(0) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - end -end diff --git a/script/c20174189.lua b/script/c20174189.lua deleted file mode 100644 index 8c122d2c09..0000000000 --- a/script/c20174189.lua +++ /dev/null @@ -1,42 +0,0 @@ ---ナチュル・バンブーシュート -function c20174189.initial_effect(c) - --mat check - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_MATERIAL_CHECK) - e1:SetValue(c20174189.valcheck) - c:RegisterEffect(e1) - --summon success - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetCode(EVENT_SUMMON_SUCCESS) - e2:SetCondition(c20174189.regcon) - e2:SetOperation(c20174189.regop) - c:RegisterEffect(e2) - e2:SetLabelObject(e1) -end -function c20174189.valcheck(e,c) - local g=c:GetMaterial() - local flag=0 - if g:IsExists(Card.IsSetCard,1,nil,0x2a) then flag=1 end - e:SetLabel(flag) -end -function c20174189.regcon(e,tp,eg,ep,ev,re,r,rp) - return bit.band(e:GetHandler():GetSummonType(),SUMMON_TYPE_ADVANCE)==SUMMON_TYPE_ADVANCE - and e:GetLabelObject():GetLabel()~=0 -end -function c20174189.regop(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_CANNOT_ACTIVATE) - e1:SetTargetRange(0,1) - e1:SetValue(c20174189.aclimit) - e1:SetReset(RESET_EVENT+0x1fe0000) - e:GetHandler():RegisterEffect(e1) -end -function c20174189.aclimit(e,re,tp) - return re:IsHasType(EFFECT_TYPE_ACTIVATE) -end diff --git a/script/c20188127.lua b/script/c20188127.lua deleted file mode 100644 index ea3ce81c62..0000000000 --- a/script/c20188127.lua +++ /dev/null @@ -1,34 +0,0 @@ ---泉の精霊 -function c20188127.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c20188127.target) - e1:SetOperation(c20188127.activate) - c:RegisterEffect(e1) -end -function c20188127.tgfilter(c) - return c:IsType(TYPE_EQUIP) and c:IsAbleToHand() -end -function c20188127.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c20188127.tgfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c20188127.tgfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local sg=Duel.SelectTarget(tp,c20188127.tgfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,sg,sg:GetCount(),0,0) -end -function c20188127.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_TRIGGER) - e1:SetReset(RESET_EVENT+0xfe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - end -end diff --git a/script/c20193924.lua b/script/c20193924.lua deleted file mode 100644 index 73074ae94c..0000000000 --- a/script/c20193924.lua +++ /dev/null @@ -1,37 +0,0 @@ ---白夜の女王 -function c20193924.initial_effect(c) - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(aux.FALSE) - c:RegisterEffect(e1) - --destroy - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(20193924,0)) - e3:SetCategory(CATEGORY_DESTROY) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetCountLimit(1) - e3:SetRange(LOCATION_MZONE) - e3:SetTarget(c20193924.target) - e3:SetOperation(c20193924.activate) - c:RegisterEffect(e3) -end -function c20193924.filter(c) - return c:IsFacedown() and c:IsDestructable() -end -function c20193924.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and c20193924.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c20193924.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c20193924.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c20193924.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsFacedown() and tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c20210570.lua b/script/c20210570.lua deleted file mode 100644 index 9a3f263d8d..0000000000 --- a/script/c20210570.lua +++ /dev/null @@ -1,30 +0,0 @@ ---レグルス -function c20210570.initial_effect(c) - --salvage - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(20210570,0)) - e1:SetCategory(CATEGORY_TODECK) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetTarget(c20210570.target) - e1:SetOperation(c20210570.operation) - c:RegisterEffect(e1) -end -function c20210570.filter(c) - return c:IsType(TYPE_FIELD) and c:IsAbleToDeck() -end -function c20210570.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c20210570.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c20210570.filter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectTarget(tp,c20210570.filter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0) -end -function c20210570.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.SendtoDeck(tc,nil,2,REASON_EFFECT) - end -end diff --git a/script/c20228463.lua b/script/c20228463.lua deleted file mode 100644 index d46b92ba46..0000000000 --- a/script/c20228463.lua +++ /dev/null @@ -1,9 +0,0 @@ ---セレモニーベル -function c20228463.initial_effect(c) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_PUBLIC) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(LOCATION_HAND,LOCATION_HAND) - c:RegisterEffect(e1) -end diff --git a/script/c20264508.lua b/script/c20264508.lua deleted file mode 100644 index e7c4f52593..0000000000 --- a/script/c20264508.lua +++ /dev/null @@ -1,24 +0,0 @@ ---サンダー・ショート -function c20264508.initial_effect(c) - --damage - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetTarget(c20264508.target) - e1:SetOperation(c20264508.operation) - c:RegisterEffect(e1) -end -function c20264508.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)~=0 end - Duel.SetTargetPlayer(1-tp) - local dam=Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)*400 - Duel.SetTargetParam(dam) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,dam) -end -function c20264508.operation(e,tp,eg,ep,ev,re,r,rp) - local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) - local dam=Duel.GetFieldGroupCount(p,LOCATION_MZONE,0)*400 - Duel.Damage(p,dam,REASON_EFFECT) -end diff --git a/script/c20277376.lua b/script/c20277376.lua deleted file mode 100644 index 9a3e7f58fe..0000000000 --- a/script/c20277376.lua +++ /dev/null @@ -1,36 +0,0 @@ ---神竜 アポカリプス -function c20277376.initial_effect(c) - --salvage - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(20277376,0)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c20277376.thcost) - e1:SetTarget(c20277376.thtg) - e1:SetOperation(c20277376.thop) - c:RegisterEffect(e1) -end -function c20277376.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) -end -function c20277376.filter(c) - return c:IsRace(RACE_DRAGON) and c:IsAbleToHand() -end -function c20277376.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:GetLocation()==LOCATION_GRAVE and chkc:GetControler()==tp and c20277376.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c20277376.filter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c20277376.filter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c20277376.thop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end diff --git a/script/c20292186.lua b/script/c20292186.lua deleted file mode 100644 index a6a843c8b3..0000000000 --- a/script/c20292186.lua +++ /dev/null @@ -1,57 +0,0 @@ ---アーティファクト-デスサイズ -function c20292186.initial_effect(c) - --set - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_MONSTER_SSET) - e1:SetValue(TYPE_SPELL) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(20292186,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetCondition(c20292186.spcon) - e2:SetTarget(c20292186.sptg) - e2:SetOperation(c20292186.spop) - c:RegisterEffect(e2) - --cannot spsummon - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(20292186,1)) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - e3:SetCondition(c20292186.dcon) - e3:SetOperation(c20292186.dop) - c:RegisterEffect(e3) -end -function c20292186.spcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsPreviousLocation(LOCATION_SZONE) and c:IsPreviousPosition(POS_FACEDOWN) - and c:IsReason(REASON_DESTROY) and Duel.GetTurnPlayer()~=tp -end -function c20292186.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c20292186.spop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP) - end -end -function c20292186.dcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp -end -function c20292186.dop(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) - e1:SetTargetRange(0,1) - e1:SetTarget(c20292186.sumlimit) - Duel.RegisterEffect(e1,tp) -end -function c20292186.sumlimit(e,c,sump,sumtype,sumpos,targetp,se) - return c:IsLocation(LOCATION_EXTRA) -end diff --git a/script/c20349913.lua b/script/c20349913.lua deleted file mode 100644 index 42d245c14a..0000000000 --- a/script/c20349913.lua +++ /dev/null @@ -1,46 +0,0 @@ ---銀河の施し -function c20349913.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,20349913+EFFECT_COUNT_CODE_OATH) - e1:SetCondition(c20349913.condition) - e1:SetCost(c20349913.cost) - e1:SetTarget(c20349913.target) - e1:SetOperation(c20349913.activate) - c:RegisterEffect(e1) -end -function c20349913.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x7b) and c:IsType(TYPE_XYZ) -end -function c20349913.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c20349913.cfilter,tp,LOCATION_MZONE,0,1,nil) -end -function c20349913.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD,nil) -end -function c20349913.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp,2) end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(2) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2) -end -function c20349913.activate(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CHANGE_DAMAGE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetTargetRange(0,1) - e1:SetValue(c20349913.damval) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function c20349913.damval(e,re,val,r,rp,rc) - return val/2 -end diff --git a/script/c20351153.lua b/script/c20351153.lua deleted file mode 100644 index 2c7c61a82b..0000000000 --- a/script/c20351153.lua +++ /dev/null @@ -1,33 +0,0 @@ ---幻角獣フュプノコーン -function c20351153.initial_effect(c) - --destroy - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(20351153,0)) - e3:SetCategory(CATEGORY_DESTROY) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_SUMMON_SUCCESS) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetCondition(c20351153.descon) - e3:SetTarget(c20351153.destg) - e3:SetOperation(c20351153.desop) - c:RegisterEffect(e3) -end -function c20351153.descon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)<=1 and Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0 -end -function c20351153.filter(c) - return c:IsFacedown() and c:IsDestructable() -end -function c20351153.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_SZONE) and c20351153.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c20351153.filter,tp,LOCATION_SZONE,LOCATION_SZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c20351153.filter,tp,LOCATION_SZONE,LOCATION_SZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c20351153.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsFacedown() and tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c20358953.lua b/script/c20358953.lua deleted file mode 100644 index 582c602739..0000000000 --- a/script/c20358953.lua +++ /dev/null @@ -1,37 +0,0 @@ ---シャーク・ザ・クルー -function c20358953.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(20358953,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_LEAVE_FIELD) - e1:SetCondition(c20358953.spcon) - e1:SetTarget(c20358953.sptg) - e1:SetOperation(c20358953.spop) - c:RegisterEffect(e1) -end -function c20358953.spcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsReason(REASON_DESTROY) and c:IsReason(REASON_EFFECT) and not c:IsLocation(LOCATION_DECK) - and c:GetPreviousControler()==tp and c:IsPreviousPosition(POS_FACEUP) and c:GetReasonPlayer()==1-tp -end -function c20358953.filter(c,e,tp) - return c:IsLevelBelow(4) and c:IsAttribute(ATTRIBUTE_WATER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c20358953.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c20358953.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_DECK) -end -function c20358953.spop(e,tp,eg,ep,ev,re,r,rp) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ft<=0 then return end - if ft>2 then ft=2 end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c20358953.filter,tp,LOCATION_DECK,0,1,ft,nil,e,tp) - if g:GetCount()~=0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c20366274.lua b/script/c20366274.lua deleted file mode 100644 index 7ca76253da..0000000000 --- a/script/c20366274.lua +++ /dev/null @@ -1,207 +0,0 @@ ---エルシャドール・ネフィリム -function c20366274.initial_effect(c) - c:EnableReviveLimit() - --fusion material - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_FUSION_MATERIAL) - e1:SetCondition(c20366274.fuscon) - e1:SetOperation(c20366274.fusop) - c:RegisterEffect(e1) - --cannot spsummon - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e2:SetCode(EFFECT_SPSUMMON_CONDITION) - e2:SetRange(LOCATION_EXTRA) - e2:SetValue(c20366274.splimit) - c:RegisterEffect(e2) - --tograve - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(20366274,0)) - e3:SetCategory(CATEGORY_TOGRAVE) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e3:SetTarget(c20366274.tgtg) - e3:SetOperation(c20366274.tgop) - c:RegisterEffect(e3) - --destroy - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(20366274,1)) - e4:SetCategory(CATEGORY_DESTROY) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e4:SetCode(EVENT_BATTLE_START) - e4:SetCondition(c20366274.descon) - e4:SetTarget(c20366274.destg) - e4:SetOperation(c20366274.desop) - c:RegisterEffect(e4) - --tohand - local e5=Effect.CreateEffect(c) - e5:SetDescription(aux.Stringid(20366274,2)) - e5:SetCategory(CATEGORY_TOHAND) - e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e5:SetCode(EVENT_TO_GRAVE) - e5:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) - e5:SetTarget(c20366274.thtg) - e5:SetOperation(c20366274.thop) - c:RegisterEffect(e5) -end -function c20366274.ffilter1(c) - return c:IsSetCard(0x9d) -end -function c20366274.ffilter2(c) - return c:IsAttribute(ATTRIBUTE_LIGHT) or c:IsHasEffect(4904633) -end -function c20366274.exfilter(c,g) - return c:IsFaceup() and c:IsCanBeFusionMaterial() and not g:IsContains(c) -end -function c20366274.fuscon(e,g,gc,chkf) - if g==nil then return true end - local tp=e:GetHandlerPlayer() - local fc=Duel.GetFieldCard(tp,LOCATION_SZONE,5) - local exg=Group.CreateGroup() - if fc and fc:IsHasEffect(81788994) and fc:IsCanRemoveCounter(tp,0x16,3,REASON_EFFECT) then - local sg=Duel.GetMatchingGroup(c20366274.exfilter,tp,0,LOCATION_MZONE,nil,g) - exg:Merge(sg) - end - if gc then return (c20366274.ffilter1(gc) and (g:IsExists(c20366274.ffilter2,1,gc) or exg:IsExists(c20366274.ffilter2,1,gc))) - or (c20366274.ffilter2(gc) and (g:IsExists(c20366274.ffilter1,1,gc) or exg:IsExists(c20366274.ffilter1,1,gc))) end - local g1=Group.CreateGroup() - local g2=Group.CreateGroup() - local g3=Group.CreateGroup() - local g4=Group.CreateGroup() - local tc=g:GetFirst() - while tc do - if c20366274.ffilter1(tc) then - g1:AddCard(tc) - if aux.FConditionCheckF(tc,chkf) then g3:AddCard(tc) end - end - if c20366274.ffilter2(tc) then - g2:AddCard(tc) - if aux.FConditionCheckF(tc,chkf) then g4:AddCard(tc) end - end - tc=g:GetNext() - end - local exg1=exg:Filter(c20366274.ffilter1,nil) - local exg2=exg:Filter(c20366274.ffilter2,nil) - if chkf~=PLAYER_NONE then - return (g3:IsExists(aux.FConditionFilterF2,1,nil,g2) - or g3:IsExists(aux.FConditionFilterF2,1,nil,exg2) - or g4:IsExists(aux.FConditionFilterF2,1,nil,g1) - or g4:IsExists(aux.FConditionFilterF2,1,nil,exg1)) - else - return (g1:IsExists(aux.FConditionFilterF2,1,nil,g2) - or g1:IsExists(aux.FConditionFilterF2,1,nil,exg2) - or g2:IsExists(aux.FConditionFilterF2,1,nil,exg1)) - end -end -function c20366274.fusop(e,tp,eg,ep,ev,re,r,rp,gc,chkf) - local fc=Duel.GetFieldCard(tp,LOCATION_SZONE,5) - local exg=Group.CreateGroup() - if fc and fc:IsHasEffect(81788994) and fc:IsCanRemoveCounter(tp,0x16,3,REASON_EFFECT) then - local sg=Duel.GetMatchingGroup(c20366274.exfilter,tp,0,LOCATION_MZONE,nil,eg) - exg:Merge(sg) - end - if gc then - local sg1=Group.CreateGroup() - local sg2=Group.CreateGroup() - if c20366274.ffilter1(gc) then - sg1:Merge(eg:Filter(c20366274.ffilter2,gc)) - sg2:Merge(exg:Filter(c20366274.ffilter2,gc)) - end - if c20366274.ffilter2(gc) then - sg1:Merge(eg:Filter(c20366274.ffilter1,gc)) - sg2:Merge(exg:Filter(c20366274.ffilter1,gc)) - end - local g1=nil - if sg1:GetCount()==0 or (sg2:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(81788994,0))) then - fc:RemoveCounter(tp,0x16,3,REASON_EFFECT) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL) - g1=sg2:Select(tp,1,1,nil) - else - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL) - g1=sg1:Select(tp,1,1,nil) - end - Duel.SetFusionMaterial(g1) - return - end - local sg=eg:Filter(aux.FConditionFilterF2c,nil,c20366274.ffilter1,c20366274.ffilter2) - local g1=nil - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL) - if chkf~=PLAYER_NONE then - g1=sg:FilterSelect(tp,aux.FConditionCheckF,1,1,nil,chkf) - else g1=sg:Select(tp,1,1,nil) end - local tc1=g1:GetFirst() - local sg1=Group.CreateGroup() - local sg2=Group.CreateGroup() - if c20366274.ffilter1(tc1) then - sg1:Merge(sg:Filter(c20366274.ffilter2,tc1)) - sg2:Merge(exg:Filter(c20366274.ffilter2,tc1)) - end - if c20366274.ffilter2(tc1) then - sg1:Merge(sg:Filter(c20366274.ffilter1,tc1)) - sg2:Merge(exg:Filter(c20366274.ffilter1,tc1)) - end - local g2=nil - if sg1:GetCount()==0 or (sg2:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(81788994,0))) then - fc:RemoveCounter(tp,0x16,3,REASON_EFFECT) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL) - g2=sg2:Select(tp,1,1,nil) - else - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL) - g2=sg1:Select(tp,1,1,nil) - end - g1:Merge(g2) - Duel.SetFusionMaterial(g1) -end -function c20366274.splimit(e,se,sp,st) - return bit.band(st,SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION -end -function c20366274.tgfilter(c) - return c:IsSetCard(0x9d) and c:IsAbleToGrave() -end -function c20366274.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c20366274.tgfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) -end -function c20366274.tgop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c20366274.tgfilter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoGrave(g,REASON_EFFECT) - end -end -function c20366274.descon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local bc=c:GetBattleTarget() - return bc and bit.band(bc:GetSummonType(),SUMMON_TYPE_SPECIAL)==SUMMON_TYPE_SPECIAL -end -function c20366274.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler():GetBattleTarget(),1,0,0) -end -function c20366274.desop(e,tp,eg,ep,ev,re,r,rp) - local bc=e:GetHandler():GetBattleTarget() - if bc:IsRelateToBattle() then - Duel.Destroy(bc,REASON_EFFECT) - end -end -function c20366274.thfilter(c) - return c:IsSetCard(0x9d) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand() -end -function c20366274.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c20366274.thfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c20366274.thfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c20366274.thfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c20366274.thop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end diff --git a/script/c20368763.lua b/script/c20368763.lua deleted file mode 100644 index cc02d98600..0000000000 --- a/script/c20368763.lua +++ /dev/null @@ -1,98 +0,0 @@ ---幻獣機ハリアード -function c20368763.initial_effect(c) - --level - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_UPDATE_LEVEL) - e1:SetValue(c20368763.lvval) - c:RegisterEffect(e1) - -- - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e2:SetCondition(c20368763.indcon) - e2:SetValue(1) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - c:RegisterEffect(e3) - --token - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(20368763,0)) - e4:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN) - e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) - e4:SetCode(EVENT_RELEASE) - e4:SetRange(LOCATION_MZONE) - e4:SetCountLimit(1) - e4:SetCondition(c20368763.spcon) - e4:SetTarget(c20368763.sptg) - e4:SetOperation(c20368763.spop) - c:RegisterEffect(e4) - --destroy - local e5=Effect.CreateEffect(c) - e5:SetDescription(aux.Stringid(20368763,1)) - e5:SetCategory(CATEGORY_SPECIAL_SUMMON) - e5:SetType(EFFECT_TYPE_IGNITION) - e5:SetRange(LOCATION_MZONE) - e5:SetCountLimit(1) - e5:SetCost(c20368763.spcost2) - e5:SetTarget(c20368763.sptg2) - e5:SetOperation(c20368763.spop2) - c:RegisterEffect(e5) -end -function c20368763.lvval(e,c) - local tp=c:GetControler() - local lv=0 - for i=0,4 do - local tc=Duel.GetFieldCard(tp,LOCATION_MZONE,i) - if tc and tc:IsCode(31533705) then lv=lv+tc:GetLevel() end - end - return lv -end -function c20368763.indcon(e) - return Duel.IsExistingMatchingCard(Card.IsType,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil,TYPE_TOKEN) -end -function c20368763.cfilter(c,tp) - return c:IsPreviousLocation(LOCATION_MZONE) and c:GetPreviousControler()==tp and c:IsReason(REASON_COST) -end -function c20368763.spcon(e,tp,eg,ep,ev,re,r,rp) - return re and re:GetHandler()~=e:GetHandler() and re:IsHasType(0x7f0) and eg:IsExists(c20368763.cfilter,1,nil,tp) -end -function c20368763.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsRelateToEffect(e) end - Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0) -end -function c20368763.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - if Duel.IsPlayerCanSpecialSummonMonster(tp,31533705,0x101b,0x4011,0,0,3,RACE_MACHINE,ATTRIBUTE_WIND) then - local token=Duel.CreateToken(tp,20368764) - Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP) - end -end -function c20368763.spcost2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsType,1,nil,TYPE_TOKEN) end - local g=Duel.SelectReleaseGroup(tp,Card.IsType,1,1,nil,TYPE_TOKEN) - Duel.Release(g,REASON_COST) -end -function c20368763.spfilter(c,e,tp) - return c:IsSetCard(0x101b) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c20368763.sptg2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsExistingMatchingCard(c20368763.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c20368763.spop2(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c20368763.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c20374351.lua b/script/c20374351.lua deleted file mode 100644 index 3630dc3243..0000000000 --- a/script/c20374351.lua +++ /dev/null @@ -1,70 +0,0 @@ ---ラヴァル・ステライド -function c20374351.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,nil,aux.NonTuner(Card.IsAttribute,ATTRIBUTE_FIRE),1) - c:EnableReviveLimit() - --to grave - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(20374351,0)) - e1:SetCategory(CATEGORY_TOGRAVE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(c20374351.condition) - e1:SetTarget(c20374351.target) - e1:SetOperation(c20374351.operation) - c:RegisterEffect(e1) - --negate - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(20374351,1)) - e2:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_CHAINING) - e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) - e2:SetRange(LOCATION_MZONE) - e2:SetCondition(c20374351.discon) - e2:SetCost(c20374351.discost) - e2:SetTarget(c20374351.distg) - e2:SetOperation(c20374351.disop) - c:RegisterEffect(e2) -end -function c20374351.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_SYNCHRO -end -function c20374351.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_HAND) -end -function c20374351.operation(e,tp,eg,ep,ev,re,r,rp,chk) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_HAND,0,1,1,nil) - Duel.SendtoGrave(g,REASON_EFFECT) -end -function c20374351.discon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsStatus(STATUS_BATTLE_DESTROYED) then return false end - if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end - local tg=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) - return tg and tg:IsContains(c) and Duel.IsChainNegatable(ev) -end -function c20374351.cfilter(c) - return c:IsSetCard(0x39) and c:IsAbleToRemoveAsCost() -end -function c20374351.discost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c20374351.cfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c20374351.cfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c20374351.distg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) - end -end -function c20374351.disop(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateActivation(ev) - if re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(eg,REASON_EFFECT) - end -end diff --git a/script/c20374520.lua b/script/c20374520.lua deleted file mode 100644 index 68fc020df1..0000000000 --- a/script/c20374520.lua +++ /dev/null @@ -1,30 +0,0 @@ ---門前払い -function c20374520.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --return - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(20374520,0)) - e2:SetCategory(CATEGORY_TOHAND) - e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetRange(LOCATION_SZONE) - e2:SetCode(EVENT_BATTLE_DAMAGE) - e2:SetTarget(c20374520.target) - e2:SetOperation(c20374520.operation) - c:RegisterEffect(e2) -end -function c20374520.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetCard(eg) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,eg,1,0,0) -end -function c20374520.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=eg:GetFirst() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - end -end diff --git a/script/c20394040.lua b/script/c20394040.lua deleted file mode 100644 index adef08ef22..0000000000 --- a/script/c20394040.lua +++ /dev/null @@ -1,16 +0,0 @@ ---バーバリアン1号 -function c20394040.initial_effect(c) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(c20394040.value) - c:RegisterEffect(e1) -end -function c20394040.filter(c) - return c:IsFaceup() and c:IsCode(40453765) -end -function c20394040.value(e,c) - return Duel.GetMatchingGroupCount(c20394040.filter,c:GetControler(),LOCATION_MZONE,0,nil)*500 -end diff --git a/script/c20409757.lua b/script/c20409757.lua deleted file mode 100644 index 15e69fe9ff..0000000000 --- a/script/c20409757.lua +++ /dev/null @@ -1,80 +0,0 @@ ---時読みの魔術師 -function c20409757.initial_effect(c) - --pendulum summon - aux.AddPendulumProcedure(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c20409757.condition) - c:RegisterEffect(e1) - --actlimit - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_ATTACK_ANNOUNCE) - e2:SetRange(LOCATION_PZONE) - e2:SetCondition(c20409757.actcon) - e2:SetOperation(c20409757.actop) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EVENT_BE_BATTLE_TARGET) - c:RegisterEffect(e3) - --scale - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetCode(EFFECT_CHANGE_LSCALE) - e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e4:SetRange(LOCATION_PZONE) - e4:SetCondition(c20409757.slcon) - e4:SetValue(4) - c:RegisterEffect(e4) - local e5=e4:Clone() - e5:SetCode(EFFECT_CHANGE_RSCALE) - c:RegisterEffect(e5) - -- - local e6=Effect.CreateEffect(c) - e6:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e6:SetCode(EFFECT_DESTROY_REPLACE) - e6:SetRange(LOCATION_MZONE) - e6:SetCountLimit(1) - e6:SetTarget(c20409757.indtg) - e6:SetValue(c20409757.indval) - c:RegisterEffect(e6) -end -function c20409757.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 -end -function c20409757.actcon(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetAttacker() - if tc:IsControler(1-tp) then tc=Duel.GetAttackTarget() end - return tc and tc:IsControler(tp) and tc:IsType(TYPE_PENDULUM) -end -function c20409757.actop(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EFFECT_CANNOT_ACTIVATE) - e1:SetTargetRange(0,1) - e1:SetValue(c20409757.aclimit) - e1:SetReset(RESET_PHASE+PHASE_DAMAGE) - Duel.RegisterEffect(e1,tp) -end -function c20409757.aclimit(e,re,tp) - return re:IsActiveType(TYPE_TRAP) and re:IsHasType(EFFECT_TYPE_ACTIVATE) -end -function c20409757.slcon(e) - local seq=e:GetHandler():GetSequence() - local tc=Duel.GetFieldCard(e:GetHandlerPlayer(),LOCATION_SZONE,13-seq) - return not tc or (not tc:IsSetCard(0x98) and not tc:IsSetCard(0x99)) -end -function c20409757.filter(c,tp) - return c:IsControler(tp) and c:IsLocation(LOCATION_SZONE) and (c:GetSequence()==6 or c:GetSequence()==7) - and c:IsReason(REASON_EFFECT) and c:GetReasonPlayer()==1-tp -end -function c20409757.indtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return eg:IsExists(c20409757.filter,1,nil,tp) end - return true -end -function c20409757.indval(e,c) - return c20409757.filter(c,e:GetHandlerPlayer()) -end diff --git a/script/c20426907.lua b/script/c20426907.lua deleted file mode 100644 index fc9d535308..0000000000 --- a/script/c20426907.lua +++ /dev/null @@ -1,126 +0,0 @@ ---機殻の再星 -function c20426907.initial_effect(c) - Duel.EnableGlobalFlag(GLOBALFLAG_SELF_TOGRAVE) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_SUMMON+TIMING_SPSUMMON) - e1:SetTarget(c20426907.distg1) - e1:SetOperation(c20426907.disop) - c:RegisterEffect(e1) - --disable - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_DISABLE) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_SUMMON_SUCCESS) - e2:SetRange(LOCATION_SZONE) - e2:SetTarget(c20426907.distg2) - e2:SetOperation(c20426907.disop) - e2:SetLabel(1) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - c:RegisterEffect(e3) - local e4=Effect.CreateEffect(c) - e4:SetCategory(CATEGORY_DISABLE) - e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e4:SetCode(EVENT_SPSUMMON_SUCCESS) - e4:SetRange(LOCATION_SZONE) - e4:SetTarget(c20426907.distg3) - e4:SetOperation(c20426907.disop) - e4:SetLabel(2) - c:RegisterEffect(e4) - --tograve - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_SINGLE) - e5:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e5:SetRange(LOCATION_SZONE) - e5:SetCode(EFFECT_SELF_TOGRAVE) - e5:SetCondition(c20426907.sdcon) - c:RegisterEffect(e5) -end -function c20426907.filter(c) - return c:IsFaceup() and c:IsLevelAbove(5) and not c:IsType(TYPE_NORMAL) -end -function c20426907.distg1(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - e:SetLabel(0) - local res,teg,tep,tev,tre,tr,trp=Duel.CheckEvent(EVENT_SUMMON_SUCCESS,true) - if not res then - res,teg,tep,tev,tre,tr,trp=Duel.CheckEvent(EVENT_FLIP_SUMMON_SUCCESS,true) - end - if res then - local tc=teg:GetFirst() - if tc:IsLevelBelow(4) and not tc:IsType(TYPE_NORMAL) - and Duel.SelectYesNo(tp,94) then - e:SetLabel(1) - Duel.SetTargetCard(teg) - Duel.SetOperationInfo(0,CATEGORY_DISABLE,teg,1,0,0) - e:GetHandler():RegisterFlagEffect(0,RESET_CHAIN,EFFECT_FLAG_CLIENT_HINT,1,0,65) - end - return - end - res,teg,tep,tev,tre,tr,trp=Duel.CheckEvent(EVENT_SPSUMMON_SUCCESS,true) - if res then - local g=teg:Filter(c20426907.filter,nil) - if g:GetCount()>0 and Duel.SelectYesNo(tp,94) then - e:SetLabel(2) - Duel.SetTargetCard(g) - Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,g:GetCount(),0,0) - e:GetHandler():RegisterFlagEffect(0,RESET_CHAIN,EFFECT_FLAG_CLIENT_HINT,1,0,65) - end - end -end -function c20426907.distg2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return eg:GetFirst():IsLevelBelow(4) end - Duel.SetTargetCard(eg) - Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0) -end -function c20426907.filter3(c) - return c:IsFaceup() and c:IsLevelAbove(5) -end -function c20426907.distg3(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return eg:IsExists(c20426907.filter3,1,nil) end - local g=eg:Filter(c20426907.filter3,nil) - Duel.SetTargetCard(g) - Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,g:GetCount(),0,0) -end -function c20426907.disfilter(c,e) - return c:IsFaceup() and c:IsRelateToEffect(e) -end -function c20426907.disop(e,tp,eg,ep,ev,re,r,rp) - if e:GetLabel()==0 or not e:GetHandler():IsRelateToEffect(e) then return end - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(c20426907.disfilter,nil,e) - local tc=g:GetFirst() - while tc do - Duel.NegateRelatedChain(tc,RESET_TURN_SET) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetValue(RESET_TURN_SET) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - tc:RegisterEffect(e2) - if e:GetLabel()==2 then - local e3=Effect.CreateEffect(e:GetHandler()) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e3:SetReset(RESET_EVENT+0x47e0000) - e3:SetValue(LOCATION_REMOVED) - tc:RegisterEffect(e3) - end - tc=g:GetNext() - end -end -function c20426907.sdfilter(c) - return c:IsFaceup() and c:IsSetCard(0xaa) and not c:IsCode(20426907) -end -function c20426907.sdcon(e) - return not Duel.IsExistingMatchingCard(c20426907.sdfilter,e:GetHandlerPlayer(),LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) -end diff --git a/script/c20436034.lua b/script/c20436034.lua deleted file mode 100644 index ed26101ba5..0000000000 --- a/script/c20436034.lua +++ /dev/null @@ -1,49 +0,0 @@ ---磁力の指輪 -function c20436034.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c20436034.target) - e1:SetOperation(c20436034.operation) - c:RegisterEffect(e1) - --atk/def down - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(-500) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EFFECT_UPDATE_DEFENCE) - c:RegisterEffect(e3) - -- - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_EQUIP) - e4:SetCode(EFFECT_AUTO_BE_ATTACKED) - c:RegisterEffect(e4) - --equip limit - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_SINGLE) - e5:SetCode(EFFECT_EQUIP_LIMIT) - e5:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e5:SetValue(c20436034.eqlimit) - c:RegisterEffect(e5) -end -function c20436034.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c20436034.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsControler(tp) then - Duel.Equip(tp,e:GetHandler(),tc) - end -end -function c20436034.eqlimit(e,c) - return e:GetHandlerPlayer()==c:GetControler() -end diff --git a/script/c20438745.lua b/script/c20438745.lua deleted file mode 100644 index 6860765d1d..0000000000 --- a/script/c20438745.lua +++ /dev/null @@ -1,26 +0,0 @@ ---灼熱王パイロン -function c20438745.initial_effect(c) - aux.EnableDualAttribute(c) - --damage - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(20438745,0)) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCondition(aux.IsDualState) - e1:SetTarget(c20438745.target) - e1:SetOperation(c20438745.operation) - c:RegisterEffect(e1) -end -function c20438745.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(1000) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,1000) -end -function c20438745.operation(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c20450925.lua b/script/c20450925.lua deleted file mode 100644 index 8a78ee7e6e..0000000000 --- a/script/c20450925.lua +++ /dev/null @@ -1,34 +0,0 @@ ---ハネワタ -function c20450925.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(20450925,0)) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetRange(LOCATION_HAND) - e1:SetCost(c20450925.cost) - e1:SetOperation(c20450925.operation) - c:RegisterEffect(e1) -end -function c20450925.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsDiscardable() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD) -end -function c20450925.operation(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CHANGE_DAMAGE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetTargetRange(1,0) - e1:SetValue(c20450925.damval) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) - local e2=e1:Clone() - e2:SetCode(EFFECT_NO_EFFECT_DAMAGE) - e2:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e2,tp) -end -function c20450925.damval(e,re,val,r,rp,rc) - if bit.band(r,REASON_EFFECT)~=0 then return 0 - else return val end -end diff --git a/script/c20457551.lua b/script/c20457551.lua deleted file mode 100644 index eeb02457e0..0000000000 --- a/script/c20457551.lua +++ /dev/null @@ -1,73 +0,0 @@ ---鋼核収納 -function c20457551.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c20457551.target) - e1:SetOperation(c20457551.operation) - c:RegisterEffect(e1) - --Equip limit - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_EQUIP_LIMIT) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetValue(c20457551.eqlimit) - c:RegisterEffect(e2) - --atk down - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e3:SetCode(EVENT_DAMAGE_CALCULATING) - e3:SetRange(LOCATION_SZONE) - e3:SetOperation(c20457551.atkdown) - c:RegisterEffect(e3) - --destroy sub - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_EQUIP+EFFECT_TYPE_CONTINUOUS) - e4:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e4:SetCode(EFFECT_DESTROY_REPLACE) - e4:SetTarget(c20457551.desreptg) - c:RegisterEffect(e4) -end -function c20457551.eqlimit(e,c) - return c:IsSetCard(0x1d) -end -function c20457551.filter(c) - return c:IsFaceup() and c:IsSetCard(0x1d) -end -function c20457551.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c20457551.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c20457551.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c20457551.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c20457551.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,c,tc) - end -end -function c20457551.atkdown(e,tp,eg,ep,ev,re,r,rp) - local eqc=e:GetHandler():GetEquipTarget() - if Duel.GetAttacker()~=eqc and Duel.GetAttackTarget()~=eqc then return end - local tc=eqc:GetBattleTarget() - if tc then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_PHASE+RESET_DAMAGE_CAL) - e1:SetValue(-eqc:GetLevel()*100) - tc:RegisterEffect(e1) - end -end -function c20457551.desreptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetCurrentPhase()==PHASE_END end - if Duel.SelectYesNo(tp,aux.Stringid(20457551,0)) then - Duel.SendtoGrave(e:GetHandler(),REASON_EFFECT) - return true - else return false end -end diff --git a/script/c20470500.lua b/script/c20470500.lua deleted file mode 100644 index b7b6a81526..0000000000 --- a/script/c20470500.lua +++ /dev/null @@ -1,62 +0,0 @@ ---アームズ・シーハンター -function c20470500.initial_effect(c) - --Disable - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(20470500,0)) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_BATTLED) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c20470500.condition) - e1:SetOperation(c20470500.operation) - c:RegisterEffect(e1) - --Destroy replace - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DESTROY_REPLACE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetTarget(c20470500.desreptg) - e2:SetOperation(c20470500.desrepop) - c:RegisterEffect(e2) -end -function c20470500.cfilter(c) - return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_WATER) -end -function c20470500.condition(e,tp,eg,ep,ev,re,r,rp) - local bc=e:GetHandler():GetBattleTarget() - return bc and bc:IsType(TYPE_EFFECT) and Duel.IsExistingMatchingCard(c20470500.cfilter,tp,LOCATION_MZONE,0,1,e:GetHandler()) -end -function c20470500.operation(e,tp,eg,ep,ev,re,r,rp) - local bc=e:GetHandler():GetBattleTarget() - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0x57a0000) - bc:RegisterEffect(e1) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+0x57a0000) - bc:RegisterEffect(e2) -end -function c20470500.repfilter(c) - return c:IsFaceup() and c:IsLevelBelow(3) and c:IsAttribute(ATTRIBUTE_WATER) - and not c:IsStatus(STATUS_DESTROY_CONFIRMED) -end -function c20470500.desreptg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return not c:IsReason(REASON_REPLACE) - and Duel.IsExistingMatchingCard(c20470500.repfilter,tp,LOCATION_MZONE,0,1,c) end - if Duel.SelectYesNo(tp,aux.Stringid(20470500,1)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESREPLACE) - local g=Duel.SelectMatchingCard(tp,c20470500.repfilter,tp,LOCATION_MZONE,0,1,1,c) - e:SetLabelObject(g:GetFirst()) - g:GetFirst():SetStatus(STATUS_DESTROY_CONFIRMED,true) - return true - else return false end -end -function c20470500.desrepop(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetLabelObject() - tc:SetStatus(STATUS_DESTROY_CONFIRMED,false) - Duel.Destroy(tc,REASON_EFFECT+REASON_REPLACE) -end diff --git a/script/c20474741.lua b/script/c20474741.lua deleted file mode 100644 index e83226baa1..0000000000 --- a/script/c20474741.lua +++ /dev/null @@ -1,28 +0,0 @@ ---トライデント・ウォリアー -function c20474741.initial_effect(c) - --summon success - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(20474741,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_SUMMON_SUCCESS) - e2:SetTarget(c20474741.sumtg) - e2:SetOperation(c20474741.sumop) - c:RegisterEffect(e2) -end -function c20474741.filter(c,e,tp) - return c:GetLevel()==3 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c20474741.sumtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c20474741.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c20474741.sumop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c20474741.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c2047519.lua b/script/c2047519.lua deleted file mode 100644 index 9dcdc14221..0000000000 --- a/script/c2047519.lua +++ /dev/null @@ -1,39 +0,0 @@ ---隠れ兵 -function c2047519.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetCondition(c2047519.condition) - e1:SetTarget(c2047519.target) - e1:SetOperation(c2047519.activate) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_ACTIVATE) - e2:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - e2:SetCondition(c2047519.condition) - e2:SetTarget(c2047519.target) - e2:SetOperation(c2047519.activate) - c:RegisterEffect(e2) -end -function c2047519.condition(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp -end -function c2047519.filter(c,e,tp) - return c:IsLevelBelow(4) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c2047519.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c2047519.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c2047519.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c2047519.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c20522190.lua b/script/c20522190.lua deleted file mode 100644 index 56eae3f850..0000000000 --- a/script/c20522190.lua +++ /dev/null @@ -1,29 +0,0 @@ ---邪悪なるバリア -ダーク・フォース- -function c20522190.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_REMOVE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetCondition(c20522190.condition) - e1:SetTarget(c20522190.target) - e1:SetOperation(c20522190.activate) - c:RegisterEffect(e1) -end -function c20522190.condition(e,tp,eg,ep,ev,re,r,rp) - return tp~=Duel.GetTurnPlayer() -end -function c20522190.filter(c) - return c:IsDefencePos() and c:IsAbleToRemove() -end -function c20522190.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c20522190.filter,tp,0,LOCATION_MZONE,1,nil) end - local g=Duel.GetMatchingGroup(c20522190.filter,tp,0,LOCATION_MZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,0) -end -function c20522190.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c20522190.filter,tp,0,LOCATION_MZONE,nil) - if g:GetCount()>0 then - Duel.Remove(g,POS_FACEUP,REASON_EFFECT) - end -end diff --git a/script/c20529766.lua b/script/c20529766.lua deleted file mode 100644 index 98007bf5bf..0000000000 --- a/script/c20529766.lua +++ /dev/null @@ -1,71 +0,0 @@ ---超電磁稼動ボルテック・ドラゴン -function c20529766.initial_effect(c) - --summon success - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetCondition(c20529766.condition) - e1:SetOperation(c20529766.operation) - c:RegisterEffect(e1) - --tribute check - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_MATERIAL_CHECK) - e2:SetValue(c20529766.valcheck) - e2:SetLabelObject(e1) - c:RegisterEffect(e2) -end -function c20529766.valcheck(e,c) - local g=c:GetMaterial() - local flag=0 - local tc=g:GetFirst() - while tc do - local code=tc:GetCode() - if code==55401221 then flag=bit.bor(flag,0x1) - elseif code==19733961 then flag=bit.bor(flag,0x2) - elseif code==63142001 then flag=bit.bor(flag,0x4) - end - tc=g:GetNext() - end - e:GetLabelObject():SetLabel(flag) -end -function c20529766.condition(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:GetSummonType()==SUMMON_TYPE_ADVANCE and e:GetLabel()~=0 -end -function c20529766.operation(e,tp,eg,ep,ev,re,r,rp) - local flag=e:GetLabel() - local c=e:GetHandler() - if bit.band(flag,0x1)~=0 then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_CHAIN_SOLVING) - e1:SetRange(LOCATION_MZONE) - e1:SetOperation(c20529766.disop) - e1:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e1) - end - if bit.band(flag,0x2)~=0 then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_PIERCE) - e1:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e1) - end - if bit.band(flag,0x4)~=0 then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(1000) - e1:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e1) - end -end -function c20529766.disop(e,tp,eg,ep,ev,re,r,rp) - if re:IsActiveType(TYPE_MONSTER) then return end - if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return end - local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) - if g:GetCount()==1 and g:GetFirst()==e:GetHandler() then - Duel.NegateEffect(ev) - end -end diff --git a/script/c20546916.lua b/script/c20546916.lua deleted file mode 100644 index 8e735e7481..0000000000 --- a/script/c20546916.lua +++ /dev/null @@ -1,24 +0,0 @@ ---ボタニカル・ライオ -function c20546916.initial_effect(c) - --atk - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(c20546916.val) - c:RegisterEffect(e1) - --control - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EFFECT_CANNOT_CHANGE_CONTROL) - c:RegisterEffect(e2) -end -function c20546916.filter(c) - return c:IsFaceup() and c:IsRace(RACE_PLANT) -end -function c20546916.val(e,c) - return Duel.GetMatchingGroupCount(c20546916.filter,c:GetControler(),LOCATION_MZONE,0,nil)*300 -end diff --git a/script/c2055403.lua b/script/c2055403.lua deleted file mode 100644 index ce1922e869..0000000000 --- a/script/c2055403.lua +++ /dev/null @@ -1,34 +0,0 @@ ---時空の落とし穴 -function c2055403.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TODECK) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetTarget(c2055403.target) - e1:SetOperation(c2055403.activate) - c:RegisterEffect(e1) -end -function c2055403.filter(c,tp) - return c:GetSummonPlayer()~=tp and bit.band(c:GetSummonLocation(),LOCATION_HAND+LOCATION_EXTRA)~=0 - and c:IsAbleToDeck() and c:IsLocation(LOCATION_MZONE) -end -function c2055403.target(e,tp,eg,ep,ev,re,r,rp,chk) - local g=eg:Filter(c2055403.filter,nil,tp) - local ct=g:GetCount() - if chk==0 then return ct>0 end - Duel.SetTargetCard(eg) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,ct,0,0) -end -function c2055403.activate(e,tp,eg,ep,ev,re,r,rp) - local g=eg:Filter(c2055403.filter,nil,tp):Filter(Card.IsRelateToEffect,nil,e) - if g:GetCount()>0 then - local ct=Duel.SendtoDeck(g,nil,2,REASON_EFFECT) - Duel.BreakEffect() - if Duel.GetLP(tp)>=ct*1000 then - Duel.SetLP(tp,Duel.GetLP(tp)-ct*1000) - else - Duel.SetLP(tp,0) - end - end -end diff --git a/script/c20563387.lua b/script/c20563387.lua deleted file mode 100644 index 373873bc77..0000000000 --- a/script/c20563387.lua +++ /dev/null @@ -1,94 +0,0 @@ ---CNo.80 葬装覇王レクイエム・イン・バーサーク -function c20563387.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,5,3) - c:EnableReviveLimit() - --equip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(20563387,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetRange(LOCATION_MZONE) - e1:SetTarget(c20563387.eqtg) - e1:SetOperation(c20563387.eqop) - c:RegisterEffect(e1) - --remove - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(20563387,1)) - e2:SetCategory(CATEGORY_REMOVE) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetRange(LOCATION_MZONE) - e2:SetCondition(c20563387.rmcon) - e2:SetCost(c20563387.rmcost) - e2:SetTarget(c20563387.rmtg) - e2:SetOperation(c20563387.rmop) - c:RegisterEffect(e2) -end -c20563387.xyz_number=80 -function c20563387.filter(c) - return c:IsFaceup() and c:IsType(TYPE_XYZ) -end -function c20563387.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c20563387.filter(chkc) and chkc~=e:GetHandler() end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingTarget(c20563387.filter,tp,LOCATION_MZONE,0,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c20563387.filter,tp,LOCATION_MZONE,0,1,1,e:GetHandler()) -end -function c20563387.eqop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) or c:IsFacedown() then return end - local tc=Duel.GetFirstTarget() - if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or tc:GetControler()~=tp or tc:IsFacedown() or not tc:IsRelateToEffect(e) then - Duel.SendtoGrave(c,REASON_EFFECT) - return - end - Duel.Equip(tp,c,tc,true) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(c20563387.eqlimit) - e1:SetLabelObject(tc) - c:RegisterEffect(e1) - --atkup - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(2000) - e2:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e2) - --destroy sub - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_EQUIP) - e3:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e3:SetCode(EFFECT_DESTROY_SUBSTITUTE) - e3:SetValue(1) - e3:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e3) -end -function c20563387.eqlimit(e,c) - return c==e:GetLabelObject() -end -function c20563387.rmcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetOverlayGroup():IsExists(Card.IsCode,1,nil,93568288) -end -function c20563387.rmcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c20563387.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsAbleToRemove() end - if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) -end -function c20563387.rmop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) - end -end diff --git a/script/c20579538.lua b/script/c20579538.lua deleted file mode 100644 index caeff5e12b..0000000000 --- a/script/c20579538.lua +++ /dev/null @@ -1,77 +0,0 @@ ---森羅の姫芽君 スプラウト -function c20579538.initial_effect(c) - --deck check - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(20579538,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1,20579538) - e1:SetCost(c20579538.cost) - e1:SetTarget(c20579538.target) - e1:SetOperation(c20579538.operation) - c:RegisterEffect(e1) - --tohand - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(20579538,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetCountLimit(1,20579539) - e2:SetCondition(c20579538.spcon) - e2:SetTarget(c20579538.sptg) - e2:SetOperation(c20579538.spop) - c:RegisterEffect(e2) -end -function c20579538.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end -function c20579538.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,1) end -end -function c20579538.tdfilter(c) - return c:IsSetCard(0xa6) and c:IsType(TYPE_MONSTER) and c:IsAbleToDeck() and not c:IsHasEffect(EFFECT_NECRO_VALLEY) -end -function c20579538.operation(e,tp,eg,ep,ev,re,r,rp) - if not Duel.IsPlayerCanDiscardDeck(tp,1) then return end - Duel.ConfirmDecktop(tp,1) - local g=Duel.GetDecktopGroup(tp,1) - Duel.DisableShuffleCheck() - if Duel.SendtoGrave(g,REASON_EFFECT+REASON_REVEAL)==0 then return end - local dg=Duel.GetMatchingGroup(c20579538.tdfilter,tp,LOCATION_GRAVE,0,nil) - if dg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(20579538,2)) then - Duel.BreakEffect() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local tg=dg:Select(tp,1,1,nil) - Duel.HintSelection(tg) - Duel.SendtoDeck(tg,nil,0,REASON_EFFECT) - end -end -function c20579538.spcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsPreviousLocation(LOCATION_DECK) and - (c:IsReason(REASON_REVEAL) or c:GetPreviousPosition()==POS_FACEUP_DEFENCE or Duel.IsPlayerAffectedByEffect(tp,EFFECT_REVERSE_DECK)) -end -function c20579538.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - local t={} - local i=1 - for i=1,8 do t[i]=i end - Duel.Hint(HINT_SELECTMSG,tp,567) - local lv=Duel.AnnounceNumber(tp,table.unpack(t)) - e:SetLabel(lv) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c20579538.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CHANGE_LEVEL) - e1:SetValue(e:GetLabel()) - e1:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e1) - end -end diff --git a/script/c20586572.lua b/script/c20586572.lua deleted file mode 100644 index f050aabbf8..0000000000 --- a/script/c20586572.lua +++ /dev/null @@ -1,45 +0,0 @@ ---ボマー・ドラゴン -function c20586572.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(20586572,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetCondition(c20586572.condition) - e1:SetTarget(c20586572.target) - e1:SetOperation(c20586572.operation) - c:RegisterEffect(e1) - --damage val - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_NO_BATTLE_DAMAGE) - e2:SetCondition(c20586572.damcon) - e2:SetValue(1) - c:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_AVOID_BATTLE_DAMAGE) - e3:SetCondition(c20586572.damcon) - e3:SetValue(1) - c:RegisterEffect(e3) -end -function c20586572.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) - and e:GetHandler():GetReasonCard():IsRelateToBattle() -end -function c20586572.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local rc=e:GetHandler():GetReasonCard() - rc:CreateEffectRelation(e) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,rc,1,0,0) -end -function c20586572.operation(e,tp,eg,ep,ev,re,r,rp) - local rc=e:GetHandler():GetReasonCard() - if rc:IsRelateToEffect(e) then - Duel.Destroy(rc,REASON_EFFECT) - end -end -function c20586572.damcon(e) - return Duel.GetAttacker()==e:GetHandler() -end diff --git a/script/c20590784.lua b/script/c20590784.lua deleted file mode 100644 index 3225348faa..0000000000 --- a/script/c20590784.lua +++ /dev/null @@ -1,38 +0,0 @@ ---星墜つる地に立つ閃珖 -function c20590784.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetCountLimit(1,20590784+EFFECT_COUNT_CODE_OATH) - e1:SetCondition(c20590784.condition) - e1:SetTarget(c20590784.target) - e1:SetOperation(c20590784.activate) - c:RegisterEffect(e1) -end -function c20590784.condition(e,tp,eg,ep,ev,re,r,rp) - local at=Duel.GetAttacker() - return at:GetControler()~=tp and Duel.GetAttackTarget()==nil -end -function c20590784.target(e,tp,eg,ep,ev,re,r,rp,chk) - local at=Duel.GetAttacker() - if chk==0 then return Duel.IsPlayerCanDraw(tp,1) - and at:IsOnField() and at:GetAttack()>=Duel.GetLP(tp) - and bit.band(at:GetSummonType(),SUMMON_TYPE_SPECIAL)==SUMMON_TYPE_SPECIAL end -end -function c20590784.filter(c,e,tp) - return c:IsSetCard(0xa3) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsHasEffect(EFFECT_NECRO_VALLEY) -end -function c20590784.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.NegateAttack() and Duel.Draw(tp,1,REASON_EFFECT)~=0 then - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local g=Duel.GetMatchingGroup(c20590784.filter,tp,LOCATION_EXTRA+LOCATION_GRAVE,0,nil,e,tp) - if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(20590784,0)) then - Duel.BreakEffect() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=g:Select(tp,1,1,nil) - Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) - end - end -end diff --git a/script/c2061963.lua b/script/c2061963.lua deleted file mode 100644 index 725fe07b5d..0000000000 --- a/script/c2061963.lua +++ /dev/null @@ -1,59 +0,0 @@ ---No.104 仮面魔踏士シャイニング -function c2061963.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,4,3) - c:EnableReviveLimit() - --negate activate - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(2061963,0)) - e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DAMAGE) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EVENT_CHAINING) - e1:SetCondition(c2061963.condition) - e1:SetCost(c2061963.cost) - e1:SetTarget(c2061963.target) - e1:SetOperation(c2061963.operation) - c:RegisterEffect(e1) - -- - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(2061963,1)) - e2:SetCategory(CATEGORY_DECKDES) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetCountLimit(1) - e2:SetRange(LOCATION_MZONE) - e2:SetTarget(c2061963.decktg) - e2:SetOperation(c2061963.deckop) - c:RegisterEffect(e2) -end -c2061963.xyz_number=104 -function c2061963.condition(e,tp,eg,ep,ev,re,r,rp,chk) - local ph=Duel.GetCurrentPhase() - return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and ep~=tp - and (ph>PHASE_MAIN1 and ph0 then - e:GetHandler():AddCounter(0x16,1) - end -end -function c20630765.defup(e,c) - return c:GetCounter(0x16)*300 -end -function c20630765.rmcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsCanRemoveCounter(tp,1,0,0x16,1,REASON_COST) end - Duel.RemoveCounter(tp,1,0,0x16,1,REASON_COST) -end -function c20630765.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(1-tp) and chkc:IsAbleToRemove() end - if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) -end -function c20630765.rmop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) - end -end diff --git a/script/c20638610.lua b/script/c20638610.lua deleted file mode 100644 index 733687f11e..0000000000 --- a/script/c20638610.lua +++ /dev/null @@ -1,40 +0,0 @@ ---竜の転生 -function c20638610.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_REMOVE+CATEGORY_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_END_PHASE) - e1:SetTarget(c20638610.target) - e1:SetOperation(c20638610.operation) - c:RegisterEffect(e1) -end -function c20638610.rmfilter(c) - return c:IsFaceup() and c:IsRace(RACE_DRAGON) and c:IsAbleToRemove() -end -function c20638610.spfilter(c,e,tp) - return c:IsRace(RACE_DRAGON) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsHasEffect(EFFECT_NECRO_VALLEY) -end -function c20638610.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c20638610.rmfilter(chkc) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsExistingTarget(c20638610.rmfilter,tp,LOCATION_MZONE,0,1,nil) - and Duel.IsExistingMatchingCard(c20638610.spfilter,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,c20638610.rmfilter,tp,LOCATION_MZONE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_HAND) -end -function c20638610.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsControler(tp) and tc:IsRelateToEffect(e) and Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)~=0 then - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c20638610.spfilter,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end - end -end diff --git a/script/c20644748.lua b/script/c20644748.lua deleted file mode 100644 index 5bd877461c..0000000000 --- a/script/c20644748.lua +++ /dev/null @@ -1,98 +0,0 @@ ---宇宙の収縮 -function c20644748.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c20644748.condition) - e1:SetHintTiming(0,TIMING_DRAW_PHASE) - c:RegisterEffect(e1) - --adjust - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e2:SetCode(EVENT_ADJUST) - e2:SetRange(LOCATION_SZONE) - e2:SetOperation(c20644748.adjustop) - c:RegisterEffect(e2) - -- - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetRange(LOCATION_SZONE) - e3:SetCode(EFFECT_MAX_MZONE) - e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e3:SetTargetRange(1,1) - e3:SetValue(c20644748.mvalue) - c:RegisterEffect(e3) - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_FIELD) - e4:SetRange(LOCATION_SZONE) - e4:SetCode(EFFECT_MAX_SZONE) - e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e4:SetTargetRange(1,1) - e4:SetValue(c20644748.svalue) - c:RegisterEffect(e4) - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_FIELD) - e5:SetRange(LOCATION_SZONE) - e5:SetCode(EFFECT_CANNOT_ACTIVATE) - e5:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e5:SetTargetRange(1,1) - e5:SetValue(c20644748.aclimit) - c:RegisterEffect(e5) - local e6=Effect.CreateEffect(c) - e6:SetType(EFFECT_TYPE_FIELD) - e6:SetRange(LOCATION_SZONE) - e6:SetCode(EFFECT_CANNOT_SSET) - e6:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e6:SetTargetRange(1,1) - e6:SetTarget(c20644748.setlimit) - c:RegisterEffect(e6) -end -function c20644748.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,0)<=5 - and Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD)<=5 -end -function c20644748.adjustop(e,tp,eg,ep,ev,re,r,rp) - local phase=Duel.GetCurrentPhase() - if (phase==PHASE_DAMAGE and not Duel.IsDamageCalculated()) or phase==PHASE_DAMAGE_CAL then return end - local c1=Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,0) - local c2=Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD) - if c1>5 or c2>5 then - local g=Group.CreateGroup() - if c1>5 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g1=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_ONFIELD,0,c1-5,c1-5,nil) - g:Merge(g1) - end - if c2>5 then - Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_TOGRAVE) - local g2=Duel.SelectMatchingCard(1-tp,nil,1-tp,LOCATION_ONFIELD,0,c2-5,c2-5,nil) - g:Merge(g2) - end - Duel.SendtoGrave(g,REASON_EFFECT) - Duel.Readjust() - end -end -function c20644748.mvalue(e,fp,rp,r) - return 5-Duel.GetFieldGroupCount(fp,LOCATION_SZONE,0) -end -function c20644748.svalue(e,fp,rp,r) - local ct=5 - for i=5,7 do - if Duel.GetFieldCard(fp,LOCATION_SZONE,i) then ct=ct-1 end - end - return ct-Duel.GetFieldGroupCount(fp,LOCATION_MZONE,0) -end -function c20644748.aclimit(e,re,tp) - if not re:IsHasType(EFFECT_TYPE_ACTIVATE) then return false end - if re:IsActiveType(TYPE_FIELD) then - return not Duel.GetFieldCard(tp,LOCATION_SZONE,5) and Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,0)>4 - elseif re:IsActiveType(TYPE_PENDULUM) then - return Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,0)>4 - end - return false -end -function c20644748.setlimit(e,c,tp) - return c:IsType(TYPE_FIELD) and not Duel.GetFieldCard(tp,LOCATION_SZONE,5) and Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,0)>4 -end diff --git a/script/c20663556.lua b/script/c20663556.lua deleted file mode 100644 index cf20af39f9..0000000000 --- a/script/c20663556.lua +++ /dev/null @@ -1,44 +0,0 @@ ---イレカエル -function c20663556.initial_effect(c) - --Special Summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(20663556,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c20663556.cost) - e1:SetTarget(c20663556.target) - e1:SetOperation(c20663556.operation) - c:RegisterEffect(e1) - --battle indestructable - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e2:SetRange(LOCATION_MZONE) - e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e2:SetTarget(c20663556.indes) - e2:SetValue(1) - c:RegisterEffect(e2) -end -function c20663556.indes(e,c) - return c:IsSetCard(0x12) -end -function c20663556.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,nil,1,nil) end - local g=Duel.SelectReleaseGroup(tp,nil,1,1,nil) - Duel.Release(g,REASON_COST) -end -function c20663556.filter(c,e,tp) - return c:IsSetCard(0x12) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c20663556.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsExistingMatchingCard(c20663556.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c20663556.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c20663556.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) -end diff --git a/script/c2067935.lua b/script/c2067935.lua deleted file mode 100644 index 4391c58a63..0000000000 --- a/script/c2067935.lua +++ /dev/null @@ -1,100 +0,0 @@ ---剣闘獣ラニスタ -function c2067935.initial_effect(c) - --tohand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(2067935,0)) - e1:SetCategory(CATEGORY_REMOVE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(c2067935.rmcon) - e1:SetTarget(c2067935.rmtg) - e1:SetOperation(c2067935.rmop) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(2067935,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_PHASE+PHASE_BATTLE) - e2:SetRange(LOCATION_MZONE) - e2:SetCondition(c2067935.spcon) - e2:SetCost(c2067935.spcost) - e2:SetTarget(c2067935.sptg) - e2:SetOperation(c2067935.spop) - c:RegisterEffect(e2) -end -function c2067935.rmcon(e,tp,eg,ep,ev,re,r,rp) - local st=e:GetHandler():GetSummonType() - return st>=(SUMMON_TYPE_SPECIAL+100) and st<(SUMMON_TYPE_SPECIAL+150) -end -function c2067935.rmfilter(c) - return c:IsSetCard(0x19) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemove() -end -function c2067935.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c2067935.rmfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c2067935.rmfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,c2067935.rmfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) -end -function c2067935.rmop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - local code=tc:GetOriginalCode() - Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) - if c:IsFacedown() or not c:IsRelateToEffect(e) then return end - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_CHANGE_CODE) - e1:SetValue(code) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(2067935,2)) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_PHASE+PHASE_END) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e2:SetCountLimit(1) - e2:SetRange(LOCATION_MZONE) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e2:SetLabelObject(e1) - e2:SetOperation(c2067935.rstop) - c:RegisterEffect(e2) - end -end -function c2067935.rstop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local e1=e:GetLabelObject() - e1:Reset() - Duel.HintSelection(Group.FromCards(c)) - Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) -end -function c2067935.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetBattledGroupCount()>0 -end -function c2067935.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToDeckAsCost() end - Duel.SendtoDeck(c,nil,2,REASON_COST) -end -function c2067935.filter(c,e,tp) - return not c:IsCode(2067935) and c:IsSetCard(0x19) and c:IsCanBeSpecialSummoned(e,112,tp,false,false) -end -function c2067935.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsExistingMatchingCard(c2067935.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c2067935.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c2067935.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - local tc=g:GetFirst() - if tc then - Duel.SpecialSummon(tc,112,tp,tp,false,false,POS_FACEUP) - tc:RegisterFlagEffect(tc:GetOriginalCode(),RESET_EVENT+0x1ff0000,0,0) - end -end diff --git a/script/c20686759.lua b/script/c20686759.lua deleted file mode 100644 index deecc59570..0000000000 --- a/script/c20686759.lua +++ /dev/null @@ -1,63 +0,0 @@ ---D・レトロエンジン -function c20686759.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c20686759.target) - e1:SetOperation(c20686759.operation) - c:RegisterEffect(e1) - --Equip limit - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_EQUIP_LIMIT) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetValue(c20686759.eqlimit) - c:RegisterEffect(e2) - --damage - local e3=Effect.CreateEffect(c) - e3:SetCategory(CATEGORY_DAMAGE) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e3:SetCode(EVENT_LEAVE_FIELD) - e3:SetCondition(c20686759.damcon) - e3:SetTarget(c20686759.damtg) - e3:SetOperation(c20686759.damop) - c:RegisterEffect(e3) -end -function c20686759.eqlimit(e,c) - return c:IsSetCard(0x26) -end -function c20686759.filter(c) - return c:IsFaceup() and c:IsSetCard(0x26) -end -function c20686759.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c20686759.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c20686759.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c20686759.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c20686759.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,e:GetHandler(),tc) - end -end -function c20686759.damcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local ec=c:GetPreviousEquipTarget() - return c:IsReason(REASON_LOST_TARGET) and ec and ec:IsReason(REASON_DESTROY) -end -function c20686759.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local dam=e:GetHandler():GetPreviousEquipTarget():GetBaseAttack() - if dam<0 then dam=0 end - e:SetLabel(dam) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,PLAYER_ALL,dam) -end -function c20686759.damop(e,tp,eg,ep,ev,re,r,rp) - Duel.Damage(1-tp,e:GetLabel(),REASON_EFFECT) - Duel.Damage(tp,e:GetLabel(),REASON_EFFECT) -end diff --git a/script/c20700531.lua b/script/c20700531.lua deleted file mode 100644 index a955eeb1f5..0000000000 --- a/script/c20700531.lua +++ /dev/null @@ -1,12 +0,0 @@ ---氷結界の修験者 -function c20700531.initial_effect(c) - --indes - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e1:SetValue(c20700531.indes) - c:RegisterEffect(e1) -end -function c20700531.indes(e,c) - return c:GetAttack()>=1900 -end diff --git a/script/c20721759.lua b/script/c20721759.lua deleted file mode 100644 index a6ddfcbe7c..0000000000 --- a/script/c20721759.lua +++ /dev/null @@ -1,35 +0,0 @@ ---ヘイト・クレバス -function c20721759.initial_effect(c) - --tograve - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCondition(c20721759.condition) - e1:SetTarget(c20721759.target) - e1:SetOperation(c20721759.operation) - c:RegisterEffect(e1) -end -function c20721759.condition(e,tp,eg,ep,ev,re,r,rp) - local ec=eg:GetFirst() - return rp~=tp and eg:GetCount()==1 and ec:IsPreviousLocation(LOCATION_MZONE) and ec:GetPreviousControler()==tp - and ec:IsReason(REASON_DESTROY) and ec:IsReason(REASON_EFFECT) -end -function c20721759.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) end - if chk==0 then return Duel.IsExistingTarget(nil,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectTarget(tp,nil,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,g:GetFirst():GetBaseAttack()) -end -function c20721759.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if not tc:IsRelateToEffect(e) then return end - Duel.SendtoGrave(tc,REASON_EFFECT) - if not tc:IsLocation(LOCATION_GRAVE) then return end - local atk=tc:GetBaseAttack() - if atk<0 then atk=0 end - Duel.Damage(1-tp,atk,REASON_EFFECT) -end diff --git a/script/c20727787.lua b/script/c20727787.lua deleted file mode 100644 index b9b473bdcf..0000000000 --- a/script/c20727787.lua +++ /dev/null @@ -1,25 +0,0 @@ ---武装解除 -function c20727787.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_EQUIP) - e1:SetTarget(c20727787.target) - e1:SetOperation(c20727787.activate) - c:RegisterEffect(e1) -end -function c20727787.filter(c) - return c:IsType(TYPE_EQUIP) and c:IsDestructable() -end -function c20727787.target(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return Duel.IsExistingMatchingCard(c20727787.filter,tp,LOCATION_SZONE,LOCATION_SZONE,1,c) end - local g=Duel.GetMatchingGroup(c20727787.filter,tp,LOCATION_SZONE,LOCATION_SZONE,c) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c20727787.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c20727787.filter,tp,LOCATION_SZONE,LOCATION_SZONE,e:GetHandler()) - Duel.Destroy(g,REASON_EFFECT) -end diff --git a/script/c20758643.lua b/script/c20758643.lua deleted file mode 100644 index a17e3dad82..0000000000 --- a/script/c20758643.lua +++ /dev/null @@ -1,71 +0,0 @@ ---彼岸の悪鬼 グラバースニッチ -function c20758643.initial_effect(c) - --self destroy - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_SELF_DESTROY) - e1:SetCondition(c20758643.sdcon) - c:RegisterEffect(e1) - --Special Summon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(20758643,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_HAND) - e2:SetCountLimit(1,20758643) - e2:SetCondition(c20758643.sscon) - e2:SetTarget(c20758643.sstg) - e2:SetOperation(c20758643.ssop) - c:RegisterEffect(e2) - --spsummon - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(20758643,1)) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e3:SetCode(EVENT_TO_GRAVE) - e3:SetCountLimit(1,20758643) - e3:SetTarget(c20758643.sptg) - e3:SetOperation(c20758643.spop) - c:RegisterEffect(e3) -end -function c20758643.sdfilter(c) - return not c:IsFaceup() or not c:IsSetCard(0xb1) -end -function c20758643.sdcon(e) - return Duel.IsExistingMatchingCard(c20758643.sdfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) -end -function c20758643.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) -end -function c20758643.sscon(e,tp,eg,ep,ev,re,r,rp) - return not Duel.IsExistingMatchingCard(c20758643.filter,tp,LOCATION_ONFIELD,0,1,nil) -end -function c20758643.sstg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c20758643.ssop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP) - end -end -function c20758643.spfilter(c,e,tp) - return c:IsSetCard(0xb1) and not c:IsCode(20758643) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c20758643.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c20758643.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c20758643.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c20758643.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c20765952.lua b/script/c20765952.lua deleted file mode 100644 index 14a9de2610..0000000000 --- a/script/c20765952.lua +++ /dev/null @@ -1,73 +0,0 @@ ---魔力無力化の仮面 -function c20765952.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c20765952.target) - e1:SetOperation(c20765952.operation) - c:RegisterEffect(e1) - --damage - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(20765952,0)) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) - e2:SetRange(LOCATION_SZONE) - e2:SetCountLimit(1) - e2:SetCondition(c20765952.damcon) - e2:SetTarget(c20765952.damtg) - e2:SetOperation(c20765952.damop) - c:RegisterEffect(e2) - --Destroy - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e3:SetRange(LOCATION_SZONE) - e3:SetCode(EVENT_LEAVE_FIELD) - e3:SetCondition(c20765952.descon) - e3:SetOperation(c20765952.desop) - c:RegisterEffect(e3) -end -function c20765952.filter(c) - return c:IsFaceup() and c:IsType(TYPE_SPELL) -end -function c20765952.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local c=e:GetHandler() - if chkc then return chkc:IsLocation(LOCATION_SZONE) and c20765952.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c20765952.filter,tp,LOCATION_SZONE,LOCATION_SZONE,1,c) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - Duel.SelectTarget(tp,c20765952.filter,tp,LOCATION_SZONE,LOCATION_SZONE,1,1,c) -end -function c20765952.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - c:SetCardTarget(tc) - end -end -function c20765952.damcon(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetHandler():GetFirstCardTarget() - return tc and Duel.GetTurnPlayer()==tc:GetControler() -end -function c20765952.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(Duel.GetTurnPlayer()) - Duel.SetTargetParam(500) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,Duel.GetTurnPlayer(),500) -end -function c20765952.damop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end -function c20765952.descon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsStatus(STATUS_DESTROY_CONFIRMED) then return false end - local tc=c:GetFirstCardTarget() - return tc and eg:IsContains(tc) -end -function c20765952.desop(e,tp,eg,ep,ev,re,r,rp) - Duel.Destroy(e:GetHandler(), REASON_EFFECT) -end diff --git a/script/c20773176.lua b/script/c20773176.lua deleted file mode 100644 index f98590cd78..0000000000 --- a/script/c20773176.lua +++ /dev/null @@ -1,57 +0,0 @@ ---炎獣の影霊衣-セフィラエグザ -function c20773176.initial_effect(c) - --pendulum summon - aux.AddPendulumProcedure(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --splimit - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetRange(LOCATION_PZONE) - e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE) - e2:SetTargetRange(1,0) - e2:SetTarget(c20773176.splimit) - e2:SetCondition(aux.nfbdncon) - c:RegisterEffect(e2) - --spsummon - local e3=Effect.CreateEffect(c) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e3:SetRange(LOCATION_HAND+LOCATION_GRAVE) - e3:SetCode(EVENT_DESTROYED) - e3:SetCountLimit(1,20773176) - e3:SetCondition(c20773176.condition) - e3:SetTarget(c20773176.target) - e3:SetOperation(c20773176.operation) - c:RegisterEffect(e3) -end -function c20773176.splimit(e,c,sump,sumtype,sumpos,targetp) - if c:IsSetCard(0xb4) or c:IsSetCard(0xc4) then return false end - return bit.band(sumtype,SUMMON_TYPE_PENDULUM)==SUMMON_TYPE_PENDULUM -end -function c20773176.filter(c,tp) - return c:IsReason(REASON_BATTLE+REASON_EFFECT) - and (c:IsSetCard(0xb4) or c:IsSetCard(0xc4)) and not c:IsCode(20773176) - and c:GetPreviousControler()==tp - and ((c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP)) - or (c:IsPreviousLocation(LOCATION_SZONE) and (c:GetPreviousSequence()==6 or c:GetPreviousSequence()==7))) -end -function c20773176.condition(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c20773176.filter,1,nil,tp) -end -function c20773176.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c20773176.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP) - end -end diff --git a/script/c20781762.lua b/script/c20781762.lua deleted file mode 100644 index ff8c12dff8..0000000000 --- a/script/c20781762.lua +++ /dev/null @@ -1,33 +0,0 @@ ---岩投げアタック -function c20781762.initial_effect(c) - --send to grave - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(20781762,0)) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_END_PHASE) - e1:SetCost(c20781762.cost) - e1:SetTarget(c20781762.target) - e1:SetOperation(c20781762.operation) - c:RegisterEffect(e1) -end -function c20781762.cfilter(c) - return c:IsRace(RACE_ROCK) and c:IsAbleToGraveAsCost() -end -function c20781762.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c20781762.cfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c20781762.cfilter,tp,LOCATION_DECK,0,1,1,nil) - Duel.SendtoGrave(g,REASON_COST) -end -function c20781762.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(500) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,500) -end -function c20781762.operation(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c20785975.lua b/script/c20785975.lua deleted file mode 100644 index 50cf150729..0000000000 --- a/script/c20785975.lua +++ /dev/null @@ -1,71 +0,0 @@ ---CNo.103 神葬零嬢ラグナ・インフィニティ -function c20785975.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,5,3) - c:EnableReviveLimit() - -- - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(20785975,0)) - e1:SetCategory(CATEGORY_REMOVE+CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCost(c20785975.cost) - e1:SetTarget(c20785975.target) - e1:SetOperation(c20785975.operation) - c:RegisterEffect(e1) - -- - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(20785975,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetCondition(c20785975.spcon) - e2:SetTarget(c20785975.sptg) - e2:SetOperation(c20785975.spop) - c:RegisterEffect(e2) -end -c20785975.xyz_number=103 -function c20785975.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c20785975.filter(c) - return c:IsFaceup() and c:GetAttack()~=c:GetBaseAttack() and c:IsAbleToRemove() -end -function c20785975.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and c20785975.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c20785975.filter,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,c20785975.filter,tp,0,LOCATION_MZONE,1,1,nil) - local tc=g:GetFirst() - local atk=math.abs(tc:GetAttack()-tc:GetBaseAttack()) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,1,1-tp,atk) -end -function c20785975.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - local atk=math.abs(tc:GetAttack()-tc:GetBaseAttack()) - if tc:IsRelateToEffect(e) and tc:IsFaceup() and Duel.Damage(1-tp,atk,REASON_EFFECT)~=0 then - Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) - end -end -function c20785975.spcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsReason(REASON_DESTROY) and c:IsPreviousLocation(LOCATION_MZONE) and c:GetOverlayCount()>0 -end -function c20785975.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) - and Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_GRAVE,0,1,nil,94380860) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c20785975.spop(e,tp,eg,ep,ev,re,r,rp) - if not Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_GRAVE,0,1,nil,94380860) then return end - if e:GetHandler():IsRelateToEffect(e) then - Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c20797524.lua b/script/c20797524.lua deleted file mode 100644 index e6b6b82c2c..0000000000 --- a/script/c20797524.lua +++ /dev/null @@ -1,32 +0,0 @@ ---ヴィークラー -function c20797524.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(20797524,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetCondition(c20797524.condition) - e1:SetTarget(c20797524.target) - e1:SetOperation(c20797524.operation) - c:RegisterEffect(e1) -end -function c20797524.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) -end -function c20797524.filter(c,e,tp) - return c:IsCode(83392426) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c20797524.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c20797524.filter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) -end -function c20797524.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c20797524.filter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c20802187.lua b/script/c20802187.lua deleted file mode 100644 index a9ef6b7faf..0000000000 --- a/script/c20802187.lua +++ /dev/null @@ -1,84 +0,0 @@ ---スピリット変換装置 -function c20802187.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --material - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(20802187,0)) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_SZONE) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCountLimit(1) - e2:SetTarget(c20802187.mattg) - e2:SetOperation(c20802187.matop) - c:RegisterEffect(e2) - --salvage - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(20802187,1)) - e3:SetCategory(CATEGORY_TOHAND) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e3:SetCode(EVENT_TO_GRAVE) - e3:SetCondition(c20802187.thcon) - e3:SetTarget(c20802187.thtg) - e3:SetOperation(c20802187.thop) - c:RegisterEffect(e3) -end -function c20802187.xyzfilter(c) - return c:IsFaceup() and c:IsType(TYPE_XYZ) -end -function c20802187.matfilter(c) - return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_LIGHT) and c:GetLevel()==4 and not c:IsType(TYPE_TOKEN) -end -function c20802187.mattg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c20802187.xyzfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c20802187.xyzfilter,tp,LOCATION_MZONE,0,1,nil) - and Duel.IsExistingMatchingCard(c20802187.matfilter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c20802187.xyzfilter,tp,LOCATION_MZONE,0,1,1,nil) -end -function c20802187.matop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - local g=Duel.SelectMatchingCard(tp,c20802187.matfilter,tp,LOCATION_MZONE,0,1,1,nil) - if g:GetCount()>0 then - Duel.Overlay(tc,g) - end - end -end -function c20802187.thcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) -end -function c20802187.thfilter(c,e) - return c:IsRace(RACE_THUNDER) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:GetLevel()==4 and c:IsCanBeEffectTarget(e) -end -function c20802187.thfilter2(c,g) - return g:IsExists(Card.IsCode,1,c,c:GetCode()) -end -function c20802187.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c20802187.thfilter(chkc,e) end - local g=Duel.GetMatchingGroup(c20802187.thfilter,tp,LOCATION_GRAVE,0,nil,e) - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g1=g:FilterSelect(tp,c20802187.thfilter2,1,1,nil,g) - if g1:GetCount()>0 then - local g2=g:FilterSelect(tp,Card.IsCode,1,1,g1:GetFirst(),g1:GetFirst():GetCode()) - g1:Merge(g2) - Duel.SetTargetCard(g1) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g1,2,0,0) - end -end -function c20802187.thop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - if not g then return end - local sg=g:Filter(Card.IsRelateToEffect,nil,e) - if sg:GetCount()>0 then - Duel.SendtoHand(sg,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,sg) - end -end diff --git a/script/c20822520.lua b/script/c20822520.lua deleted file mode 100644 index e778ee9199..0000000000 --- a/script/c20822520.lua +++ /dev/null @@ -1,79 +0,0 @@ ---魔導書庫ソレイン -function c20822520.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,20822520+EFFECT_COUNT_CODE_OATH) - e1:SetCondition(c20822520.condition) - e1:SetCost(c20822520.cost) - e1:SetTarget(c20822520.target) - e1:SetOperation(c20822520.activate) - c:RegisterEffect(e1) - if not c20822520.global_check then - c20822520.global_check=true - local ge1=Effect.CreateEffect(c) - ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - ge1:SetCode(EVENT_CHAINING) - ge1:SetOperation(c20822520.checkop) - Duel.RegisterEffect(ge1,0) - end -end -function c20822520.checkop(e,tp,eg,ep,ev,re,r,rp) - if re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL) and not re:GetHandler():IsSetCard(0x106e) then - Duel.RegisterFlagEffect(rp,20822521,RESET_PHASE+PHASE_END,0,1) - end -end -function c20822520.cfilter(c) - return c:IsType(TYPE_SPELL) and c:IsSetCard(0x106e) -end -function c20822520.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c20822520.cfilter,tp,LOCATION_GRAVE,0,5,nil) -end -function c20822520.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetFlagEffect(tp,20822521)==0 end - --oath effects - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) - e1:SetCode(EFFECT_CANNOT_ACTIVATE) - e1:SetTargetRange(1,0) - e1:SetValue(c20822520.aclimit) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function c20822520.aclimit(e,re,tp) - return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL) and not re:GetHandler():IsSetCard(0x106e) -end -function c20822520.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)<2 then return false end - local g=Duel.GetDecktopGroup(tp,2) - return g:FilterCount(Card.IsAbleToHand,nil)>0 - end - Duel.SetTargetPlayer(tp) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,LOCATION_DECK) -end -function c20822520.filter(c) - return c:IsType(TYPE_SPELL) and c:IsSetCard(0x106e) -end -function c20822520.activate(e,tp,eg,ep,ev,re,r,rp) - local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) - Duel.ConfirmDecktop(p,2) - local g=Duel.GetDecktopGroup(p,2) - if g:GetCount()>0 then - local sg=g:Filter(c20822520.filter,nil) - if sg:GetCount()>0 then - if sg:GetFirst():IsAbleToHand() then - Duel.SendtoHand(sg,nil,REASON_EFFECT) - Duel.ConfirmCards(1-p,sg) - Duel.ShuffleHand(p) - else - Duel.SendtoGrave(sg,REASON_EFFECT) - end - end - Duel.ShuffleDeck(p) - end -end diff --git a/script/c20838380.lua b/script/c20838380.lua deleted file mode 100644 index fe88a970d7..0000000000 --- a/script/c20838380.lua +++ /dev/null @@ -1,41 +0,0 @@ ---シャーク・サッカー -function c20838380.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(20838380,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetRange(LOCATION_HAND) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(c20838380.spcon) - e1:SetTarget(c20838380.sptg) - e1:SetOperation(c20838380.spop) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_SUMMON_SUCCESS) - c:RegisterEffect(e2) - -- - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e3:SetValue(1) - c:RegisterEffect(e3) -end -function c20838380.cfilter(c,tp) - return c:IsFaceup() and c:IsControler(tp) and c:IsRace(RACE_FISH+RACE_SEASERPENT+RACE_AQUA) -end -function c20838380.spcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c20838380.cfilter,1,nil,tp) -end -function c20838380.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c20838380.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c2084239.lua b/script/c2084239.lua deleted file mode 100644 index 098f69f357..0000000000 --- a/script/c2084239.lua +++ /dev/null @@ -1,21 +0,0 @@ ---湿地草原 -function c2084239.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --Atk - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e2:SetTarget(c2084239.tg) - e2:SetValue(1200) - c:RegisterEffect(e2) -end -function c2084239.tg(e,c) - local lv=c:GetLevel() - return lv>0 and lv<=2 and c:IsAttribute(ATTRIBUTE_WATER) and c:IsRace(RACE_AQUA) -end diff --git a/script/c20849090.lua b/script/c20849090.lua deleted file mode 100644 index b17cd58e92..0000000000 --- a/script/c20849090.lua +++ /dev/null @@ -1,71 +0,0 @@ ---Kozmo Forerunner -function c20849090.initial_effect(c) - --cannot be targeted - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetValue(aux.tgoval) - c:RegisterEffect(e1) - --recover - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_RECOVER) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) - e2:SetRange(LOCATION_MZONE) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetCountLimit(1) - e2:SetCondition(c20849090.reccon) - e2:SetTarget(c20849090.rectg) - e2:SetOperation(c20849090.recop) - c:RegisterEffect(e2) - --spsummon - local e3=Effect.CreateEffect(c) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_TO_GRAVE) - e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e3:SetCondition(c20849090.spcon) - e3:SetCost(c20849090.spcost) - e3:SetTarget(c20849090.sptg) - e3:SetOperation(c20849090.spop) - c:RegisterEffect(e3) -end -function c20849090.reccon(e,tp,eg,ep,ev,re,r,rp) - return tp==Duel.GetTurnPlayer() -end -function c20849090.rectg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(1000) - Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,1000) -end -function c20849090.recop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Recover(p,d,REASON_EFFECT) -end -function c20849090.spcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE+REASON_EFFECT) -end -function c20849090.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) -end -function c20849090.spfilter(c,e,tp) - return c:IsSetCard(0xd2) and c:IsLevelBelow(6) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c20849090.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c20849090.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c20849090.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c20849090.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c20855340.lua b/script/c20855340.lua deleted file mode 100644 index 549f9522ce..0000000000 --- a/script/c20855340.lua +++ /dev/null @@ -1,37 +0,0 @@ ---エヴォルド・プレウロス -function c20855340.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(20855340,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCondition(c20855340.condition) - e1:SetTarget(c20855340.target) - e1:SetOperation(c20855340.operation) - c:RegisterEffect(e1) -end -function c20855340.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) and e:GetHandler():GetPreviousControler()==tp - and e:GetHandler():IsReason(REASON_DESTROY) -end -function c20855340.filter(c,e,tp) - return c:IsSetCard(0x604e) and c:IsCanBeSpecialSummoned(e,153,tp,false,false) -end -function c20855340.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c20855340.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c20855340.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c20855340.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - local tc=g:GetFirst() - if tc then - Duel.SpecialSummon(tc,153,tp,tp,false,false,POS_FACEUP) - local rf=tc.evolreg - if rf then rf(tc) end - end -end diff --git a/script/c20858318.lua b/script/c20858318.lua deleted file mode 100644 index 9edd2ac79c..0000000000 --- a/script/c20858318.lua +++ /dev/null @@ -1,57 +0,0 @@ ---必殺!黒蠍コンビネーション -function c20858318.initial_effect(c) - --activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c20858318.con) - e1:SetTarget(c20858318.tg) - e1:SetOperation(c20858318.op) - c:RegisterEffect(e1) -end -function c20858318.cfilter(c,code) - return c:IsFaceup() and c:IsCode(code) -end -function c20858318.con(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c20858318.cfilter,tp,LOCATION_MZONE,0,1,nil,76922029) - and Duel.IsExistingMatchingCard(c20858318.cfilter,tp,LOCATION_MZONE,0,1,nil,6967870) - and Duel.IsExistingMatchingCard(c20858318.cfilter,tp,LOCATION_MZONE,0,1,nil,61587183) - and Duel.IsExistingMatchingCard(c20858318.cfilter,tp,LOCATION_MZONE,0,1,nil,48768179) - and Duel.IsExistingMatchingCard(c20858318.cfilter,tp,LOCATION_MZONE,0,1,nil,74153887) -end -function c20858318.tg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local g=Duel.GetFieldGroup(tp,LOCATION_MZONE,0) - Duel.SetTargetCard(g) -end -function c20858318.op(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) - local tc=g:GetFirst() - while tc do - tc:RegisterFlagEffect(20858318,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) - tc=g:GetNext() - end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_DIRECT_ATTACK) - e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetTarget(c20858318.affected) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e2:SetCode(EVENT_PRE_BATTLE_DAMAGE) - e2:SetCondition(c20858318.rdcon) - e2:SetOperation(c20858318.rdop) - e2:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e2,tp) -end -function c20858318.affected(e,c) - return c:GetFlagEffect(20858318)~=0 -end -function c20858318.rdcon(e,tp,eg,ep,ev,re,r,rp) - return eg:GetFirst():GetFlagEffect(20858318)~=0 -end -function c20858318.rdop(e,tp,eg,ep,ev,re,r,rp) - Duel.ChangeBattleDamage(ep,400) -end diff --git a/script/c20871001.lua b/script/c20871001.lua deleted file mode 100644 index b6d802e5a3..0000000000 --- a/script/c20871001.lua +++ /dev/null @@ -1,22 +0,0 @@ ---ブルー・ポーション -function c20871001.initial_effect(c) - --recover - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCategory(CATEGORY_RECOVER) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c20871001.rectg) - e1:SetOperation(c20871001.recop) - c:RegisterEffect(e1) -end -function c20871001.rectg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(400) - Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,400) -end -function c20871001.recop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Recover(p,d,REASON_EFFECT) -end diff --git a/script/c2088870.lua b/script/c2088870.lua deleted file mode 100644 index 49e520ee9b..0000000000 --- a/script/c2088870.lua +++ /dev/null @@ -1,36 +0,0 @@ ---ワーム・ヴィクトリー -function c2088870.initial_effect(c) - --flip - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FLIP+EFFECT_TYPE_SINGLE) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetTarget(c2088870.destg) - e1:SetOperation(c2088870.desop) - c:RegisterEffect(e1) - --atkup - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetValue(c2088870.atkval) - c:RegisterEffect(e2) -end -function c2088870.filter(c) - return c:IsFaceup() and not (c:IsSetCard(0x3e) and c:IsRace(RACE_REPTILE)) -end -function c2088870.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local g=Duel.GetMatchingGroup(c2088870.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c2088870.desop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c2088870.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - Duel.Destroy(g,REASON_EFFECT) -end -function c2088870.vfilter(c) - return c:IsSetCard(0x3e) and c:IsRace(RACE_REPTILE) -end -function c2088870.atkval(e,c) - return Duel.GetMatchingGroupCount(c2088870.vfilter,c:GetControler(),LOCATION_GRAVE,0,nil)*500 -end diff --git a/script/c2091298.lua b/script/c2091298.lua deleted file mode 100644 index 0d22891610..0000000000 --- a/script/c2091298.lua +++ /dev/null @@ -1,43 +0,0 @@ ---セイクリッド・ビーハイブ -function c2091298.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0x53),4,2) - c:EnableReviveLimit() - --attack up - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(2091298,0)) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c2091298.condition) - e1:SetCost(c2091298.cost) - e1:SetOperation(c2091298.operation) - c:RegisterEffect(e1) -end -function c2091298.condition(e,tp,eg,ep,ev,re,r,rp) - local phase=Duel.GetCurrentPhase() - if phase~=PHASE_DAMAGE or Duel.IsDamageCalculated() then return false end - local tc=Duel.GetAttacker() - if tc:IsControler(1-tp) then tc=Duel.GetAttackTarget() end - e:SetLabelObject(tc) - return tc and tc:IsFaceup() and tc:IsSetCard(0x53) and tc:IsRelateToBattle() -end -function c2091298.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c2091298.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetLabelObject() - if not tc:IsRelateToBattle() or tc:IsFacedown() then return end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e1:SetValue(1000) - tc:RegisterEffect(e1) -end diff --git a/script/c20932152.lua b/script/c20932152.lua deleted file mode 100644 index 9ab927b42d..0000000000 --- a/script/c20932152.lua +++ /dev/null @@ -1,43 +0,0 @@ ---クイック・シンクロン -function c20932152.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c20932152.spcon) - e1:SetOperation(c20932152.spop) - c:RegisterEffect(e1) - -- - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e2:SetValue(c20932152.synlimit) - c:RegisterEffect(e2) - -- - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e3:SetCode(20932152) - c:RegisterEffect(e3) -end -function c20932152.synlimit(e,c) - if not c then return false end - return not c:IsSetCard(0x100) -end -function c20932152.spfilter(c) - return c:IsType(TYPE_MONSTER) and c:IsAbleToGraveAsCost() -end -function c20932152.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c20932152.spfilter,tp,LOCATION_HAND,0,1,c) -end -function c20932152.spop(e,tp,eg,ep,ev,re,r,rp,c) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c20932152.spfilter,tp,LOCATION_HAND,0,1,1,c) - Duel.SendtoGrave(g,REASON_COST) -end diff --git a/script/c20939559.lua b/script/c20939559.lua deleted file mode 100644 index 274c49f83b..0000000000 --- a/script/c20939559.lua +++ /dev/null @@ -1,12 +0,0 @@ ---闇の住人シャドウキラー -function c20939559.initial_effect(c) - --direct attack - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DIRECT_ATTACK) - e1:SetCondition(c20939559.con) - c:RegisterEffect(e1) -end -function c20939559.con(e) - return not Duel.IsExistingMatchingCard(Card.IsAttackPos,e:GetHandler():GetControler(),0,LOCATION_MZONE,1,nil) -end diff --git a/script/c20951752.lua b/script/c20951752.lua deleted file mode 100644 index bc77ccf7cc..0000000000 --- a/script/c20951752.lua +++ /dev/null @@ -1,84 +0,0 @@ ---裁きを下す者-ボルテニス -function c20951752.initial_effect(c) - --counter - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_CHAINING) - e1:SetRange(LOCATION_HAND) - e1:SetOperation(c20951752.chop1) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_CHAIN_SOLVED) - e2:SetRange(LOCATION_HAND) - e2:SetOperation(c20951752.chop2) - c:RegisterEffect(e2) - --special summon - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(20951752,0)) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_DELAY) - e3:SetCode(EVENT_CHAIN_END) - e3:SetRange(LOCATION_HAND) - e3:SetCondition(c20951752.sumcon) - e3:SetCost(c20951752.sumcost) - e3:SetTarget(c20951752.sumtg) - e3:SetOperation(c20951752.sumop) - c:RegisterEffect(e3) - e1:SetLabelObject(e3) - e2:SetLabelObject(e3) - --destroy - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(20951752,0)) - e4:SetCategory(CATEGORY_DESTROY) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e4:SetCode(EVENT_SPSUMMON_SUCCESS) - e4:SetCondition(c20951752.descon) - e4:SetTarget(c20951752.destg) - e4:SetOperation(c20951752.desop) - c:RegisterEffect(e4) - e3:SetLabelObject(e4) -end -function c20951752.chop1(e,tp,eg,ep,ev,re,r,rp) - e:GetLabelObject():SetLabel(0) -end -function c20951752.chop2(e,tp,eg,ep,ev,re,r,rp) - if rp~=tp or not re:IsActiveType(TYPE_COUNTER) then return end - e:GetLabelObject():SetLabel(1) -end -function c20951752.sumcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetLabel()==1 -end -function c20951752.sumcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,nil,1,nil) end - local g=Duel.GetReleaseGroup(tp) - local ct=g:FilterCount(Card.IsRace,nil,RACE_FAIRY) - Duel.Release(g,REASON_COST) - e:GetLabelObject():SetLabel(ct) -end -function c20951752.sumtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c20951752.sumop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,1,tp,tp,false,false,POS_FACEUP) - end -end -function c20951752.descon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+1 -end -function c20951752.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDestructable,tp,0,LOCATION_ONFIELD,1,nil) and e:GetLabel()>0 end - local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,0,LOCATION_ONFIELD,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c20951752.desop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,0,LOCATION_ONFIELD,nil) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local dg=g:Select(tp,1,e:GetLabel(),nil) - Duel.HintSelection(dg) - Duel.Destroy(dg,REASON_EFFECT) -end diff --git a/script/c2095764.lua b/script/c2095764.lua deleted file mode 100644 index 904a85fcbe..0000000000 --- a/script/c2095764.lua +++ /dev/null @@ -1,95 +0,0 @@ ---水竜星-ビシキ -function c2095764.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(2095764,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCountLimit(1,2095764) - e1:SetCondition(c2095764.condition) - e1:SetTarget(c2095764.target) - e1:SetOperation(c2095764.operation) - c:RegisterEffect(e1) - --synchro effect - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetRange(LOCATION_MZONE) - e2:SetHintTiming(0,TIMING_BATTLE_START+TIMING_BATTLE_END) - e2:SetCountLimit(1) - e2:SetCondition(c2095764.sccon) - e2:SetTarget(c2095764.sctg) - e2:SetOperation(c2095764.scop) - c:RegisterEffect(e2) - -- - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e3:SetCode(EVENT_BE_MATERIAL) - e3:SetCondition(c2095764.immcon) - e3:SetOperation(c2095764.immop) - c:RegisterEffect(e3) -end -function c2095764.condition(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE+REASON_EFFECT) - and c:IsPreviousLocation(LOCATION_ONFIELD) and c:GetPreviousControler()==tp -end -function c2095764.filter(c,e,tp) - return c:IsSetCard(0x9e) and not c:IsCode(2095764) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c2095764.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c2095764.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c2095764.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c2095764.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_ATTACK) -end -function c2095764.sccon(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetTurnPlayer()==tp then return false end - local ph=Duel.GetCurrentPhase() - return ph==PHASE_MAIN1 or ph==PHASE_BATTLE or ph==PHASE_MAIN2 -end -function c2095764.mfilter(c) - return c:IsSetCard(0x9e) -end -function c2095764.sctg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local mg=Duel.GetMatchingGroup(c2095764.mfilter,tp,LOCATION_MZONE,0,nil) - return Duel.IsExistingMatchingCard(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,1,nil,nil,mg) - end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function c2095764.scop(e,tp,eg,ep,ev,re,r,rp) - local mg=Duel.GetMatchingGroup(c2095764.mfilter,tp,LOCATION_MZONE,0,nil) - local g=Duel.GetMatchingGroup(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,nil,nil,mg) - if g:GetCount()>0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=g:Select(tp,1,1,nil) - Duel.SynchroSummon(tp,sg:GetFirst(),nil,mg) - end -end -function c2095764.immcon(e,tp,eg,ep,ev,re,r,rp) - return r==REASON_SYNCHRO -end -function c2095764.immop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local rc=c:GetReasonCard() - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(2095764,1)) - e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_IMMUNE_EFFECT) - e1:SetValue(c2095764.efilter) - e1:SetReset(RESET_EVENT+0x1fe0000) - rc:RegisterEffect(e1) -end -function c2095764.efilter(e,te) - return te:IsActiveType(TYPE_TRAP) -end diff --git a/script/c20985997.lua b/script/c20985997.lua deleted file mode 100644 index b1c076fe62..0000000000 --- a/script/c20985997.lua +++ /dev/null @@ -1,32 +0,0 @@ ---デストラクト・サークル-A -function c20985997.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c20985997.target) - e1:SetOperation(c20985997.activate) - c:RegisterEffect(e1) -end -function c20985997.filter(c) - return c:GetCounter(0xe)>0 and c:IsDestructable() -end -function c20985997.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c20985997.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c20985997.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c20985997.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,PLAYER_ALL,1000) -end -function c20985997.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:GetCounter(0xe)>0 and tc:IsRelateToEffect(e) then - if Duel.Destroy(tc,REASON_EFFECT)>0 then - Duel.Damage(1-tp,1000,REASON_EFFECT) - Duel.Damage(tp,1000,REASON_EFFECT) - end - end -end diff --git a/script/c21007444.lua b/script/c21007444.lua deleted file mode 100644 index 8d08643435..0000000000 --- a/script/c21007444.lua +++ /dev/null @@ -1,85 +0,0 @@ ---諸刃の活人剣術 -function c21007444.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c21007444.target) - e1:SetOperation(c21007444.activate) - c:RegisterEffect(e1) -end -function c21007444.filter(c,e,tp) - return c:IsSetCard(0x3d) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c21007444.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:GetControler()==tp and chkc:GetLocation()==LOCATION_GRAVE and c21007444.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>1 - and Duel.IsExistingTarget(c21007444.filter,tp,LOCATION_GRAVE,0,2,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c21007444.filter,tp,LOCATION_GRAVE,0,2,2,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,2,0,0) -end -function c21007444.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local sg=g:Filter(Card.IsRelateToEffect,nil,e) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if sg:GetCount()==0 or ft<=0 then return end - if ft0 then - local tc=sg:GetFirst() - local fid=e:GetHandler():GetFieldID() - while tc do - if Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP_ATTACK) then - tc:RegisterFlagEffect(21007444,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1,fid) - end - tc=sg:GetNext() - end - Duel.SpecialSummonComplete() - sg:KeepAlive() - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetReset(RESET_PHASE+PHASE_END) - e1:SetCountLimit(1) - e1:SetCondition(c21007444.descon) - e1:SetOperation(c21007444.desop) - e1:SetLabel(fid) - e1:SetLabelObject(sg) - Duel.RegisterEffect(e1,tp) - end -end -function c21007444.desfilter(c,fid) - return c:GetFlagEffectLabel(21007444)==fid -end -function c21007444.descon(e,tp,eg,ep,ev,re,r,rp) - local g=e:GetLabelObject() - if not g:IsExists(c21007444.desfilter,1,nil,e:GetLabel()) then - g:DeleteGroup() - e:Reset() - return false - else return true end -end -function c21007444.desop(e,tp,eg,ep,ev,re,r,rp) - local sg=e:GetLabelObject() - local dg=sg:Filter(c21007444.desfilter,nil,e:GetLabel()) - sg:DeleteGroup() - if dg:GetCount()>0 then - local tg1=dg:GetFirst() - local at1=tg1:GetAttack() - local tg2=dg:GetNext() - local at2=0 - local dam=0 - if tg2 then at2=tg2:GetAttack() end - Duel.Destroy(dg,REASON_EFFECT) - local og=Duel.GetOperatedGroup() - if og:IsContains(tg1) then dam=dam+at1 end - if tg2 and og:IsContains(tg2) then dam=dam+at2 end - if dam~=0 then Duel.Damage(tp,dam,REASON_EFFECT) end - end -end diff --git a/script/c21015833.lua b/script/c21015833.lua deleted file mode 100644 index 4410d2bf33..0000000000 --- a/script/c21015833.lua +++ /dev/null @@ -1,9 +0,0 @@ ---隼の騎士 -function c21015833.initial_effect(c) - --double attack - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_EXTRA_ATTACK) - e1:SetValue(1) - c:RegisterEffect(e1) -end diff --git a/script/c21044178.lua b/script/c21044178.lua deleted file mode 100644 index 0b6b95cb5d..0000000000 --- a/script/c21044178.lua +++ /dev/null @@ -1,48 +0,0 @@ ---深淵に潜む者 -function c21044178.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,4,2) - c:EnableReviveLimit() - --atkup - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetCondition(c21044178.atkcon) - e1:SetTarget(aux.TargetBoolFunction(Card.IsAttribute,ATTRIBUTE_WATER)) - e1:SetValue(500) - c:RegisterEffect(e1) - --activate limit - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(21044178,0)) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetHintTiming(0,TIMING_DRAW_PHASE) - e2:SetCountLimit(1) - e2:SetRange(LOCATION_MZONE) - e2:SetCost(c21044178.cost) - e2:SetOperation(c21044178.operation) - c:RegisterEffect(e2) -end -function c21044178.atkcon(e) - return e:GetHandler():GetOverlayGroup():IsExists(Card.IsAttribute,1,nil,ATTRIBUTE_WATER) -end -function c21044178.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c21044178.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EFFECT_CANNOT_ACTIVATE) - e1:SetTargetRange(0,1) - e1:SetValue(c21044178.aclimit) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function c21044178.aclimit(e,re,tp) - return re:GetActivateLocation()==LOCATION_GRAVE -end diff --git a/script/c21051146.lua b/script/c21051146.lua deleted file mode 100644 index 3ee3f2c836..0000000000 --- a/script/c21051146.lua +++ /dev/null @@ -1,54 +0,0 @@ ---ブラッド・マジシャン-煉獄の魔術師- -function c21051146.initial_effect(c) - c:EnableCounterPermit(0x3001) - --add counter - local e0=Effect.CreateEffect(c) - e0:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e0:SetCode(EVENT_CHAINING) - e0:SetRange(LOCATION_MZONE) - e0:SetOperation(aux.chainreg) - c:RegisterEffect(e0) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e1:SetCode(EVENT_CHAIN_SOLVED) - e1:SetRange(LOCATION_MZONE) - e1:SetOperation(c21051146.acop) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(21051146,0)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetTarget(c21051146.destg) - e2:SetOperation(c21051146.desop) - c:RegisterEffect(e2) -end -function c21051146.acop(e,tp,eg,ep,ev,re,r,rp) - if re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL) and e:GetHandler():GetFlagEffect(1)>0 then - e:GetHandler():AddCounter(0x3001,1) - end -end -function c21051146.filter(c,cc,tp) - local ct=math.ceil(c:GetAttack()/700) - if ct==0 then ct=1 end - return c:IsFaceup() and c:IsDestructable() and cc:IsCanRemoveCounter(tp,0x3001,ct,REASON_COST) -end -function c21051146.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c21051146.filter(chkc,e:GetHandler(),tp) end - if chk==0 then return Duel.IsExistingTarget(c21051146.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,e:GetHandler(),tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c21051146.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,e:GetHandler(),tp) - local ct=math.ceil(g:GetFirst():GetAttack()/700) - if ct==0 then ct=1 end - e:GetHandler():RemoveCounter(tp,0x3001,ct,REASON_COST) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c21051146.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c21051977.lua b/script/c21051977.lua deleted file mode 100644 index 76a8ea4c0f..0000000000 --- a/script/c21051977.lua +++ /dev/null @@ -1,28 +0,0 @@ ---コロボックリ -function c21051977.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(21051977,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND) - e1:SetTarget(c21051977.sptg) - e1:SetOperation(c21051977.spop) - c:RegisterEffect(e1) -end -function c21051977.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_HAND,0,1,nil,67445676) - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) - end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c21051977.spop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,Card.IsCode,tp,LOCATION_HAND,0,1,1,nil,67445676) - if g:GetCount()==0 then return end - Duel.SendtoGrave(g,REASON_EFFECT) - if e:GetHandler():IsRelateToEffect(e) then - Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c21070956.lua b/script/c21070956.lua deleted file mode 100644 index fa7db234ae..0000000000 --- a/script/c21070956.lua +++ /dev/null @@ -1,38 +0,0 @@ ---生贄の祭壇 -function c21070956.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_RECOVER) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c21070956.cost) - e1:SetTarget(c21070956.target) - e1:SetOperation(c21070956.activate) - c:RegisterEffect(e1) -end -function c21070956.cost(e,tp,eg,ep,ev,re,r,rp,chk) - e:SetLabel(1) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,Card.IsAbleToGraveAsCost,tp,LOCATION_MZONE,0,1,1,nil); - local atk=g:GetFirst():GetTextAttack() - if atk<0 then atk=0 end - e:SetLabel(atk) - Duel.SendtoGrave(g,REASON_COST) -end -function c21070956.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local res=e:GetLabel()~=0 - e:SetLabel(0) - return res - end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(e:GetLabel()) - Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,e:GetLabel()) - e:SetLabel(0) -end -function c21070956.activate(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Recover(p,d,REASON_EFFECT) -end diff --git a/script/c21074344.lua b/script/c21074344.lua deleted file mode 100644 index bbbba39076..0000000000 --- a/script/c21074344.lua +++ /dev/null @@ -1,45 +0,0 @@ ---緑光の宣告者 -function c21074344.initial_effect(c) - --Negate - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(21074344,0)) - e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_CHAINING) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c21074344.discon) - e1:SetCost(c21074344.discost) - e1:SetTarget(c21074344.distg) - e1:SetOperation(c21074344.disop) - c:RegisterEffect(e1) -end -function c21074344.discon(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp and re:IsActiveType(TYPE_SPELL) and re:IsHasType(EFFECT_TYPE_ACTIVATE) - and Duel.IsChainNegatable(ev) -end -function c21074344.costfilter(c) - return c:IsRace(RACE_FAIRY) and c:IsAbleToGraveAsCost() -end -function c21074344.discost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToGraveAsCost() and - Duel.IsExistingMatchingCard(c21074344.costfilter,tp,LOCATION_HAND,0,1,c) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c21074344.costfilter,tp,LOCATION_HAND,0,1,1,c) - g:AddCard(c) - Duel.SendtoGrave(g,REASON_COST) -end -function c21074344.distg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) - end -end -function c21074344.disop(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateActivation(ev) - if re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(eg,REASON_EFFECT) - end -end diff --git a/script/c21088856.lua b/script/c21088856.lua deleted file mode 100644 index 32160d95b5..0000000000 --- a/script/c21088856.lua +++ /dev/null @@ -1,30 +0,0 @@ ---華麗なる密偵-C -function c21088856.initial_effect(c) - -- - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(21088856,0)) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetOperation(c21088856.operation) - c:RegisterEffect(e1) -end -function c21088856.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetFieldGroup(1-tp,LOCATION_EXTRA,0) - if g:GetCount()==0 then return end - local tc=g:RandomSelect(tp,1):GetFirst() - Duel.ConfirmCards(tp,tc) - local atk=tc:GetAttack() - if atk<0 then atk=0 end - if atk>=2000 then - local c=e:GetHandler() - if not c:IsRelateToEffect(e) or c:IsFacedown() then return end - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(1000) - e1:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e1) - else - Duel.Recover(tp,atk,REASON_EFFECT) - end -end diff --git a/script/c21105106.lua b/script/c21105106.lua deleted file mode 100644 index a40dc5c40a..0000000000 --- a/script/c21105106.lua +++ /dev/null @@ -1,138 +0,0 @@ ---sophiaの影霊衣 -function c21105106.initial_effect(c) - c:EnableReviveLimit() - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(c21105106.splimit) - c:RegisterEffect(e1) - --cannot spsummon - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetRange(LOCATION_HAND) - e2:SetCondition(c21105106.discon) - e2:SetCost(c21105106.discost) - e2:SetOperation(c21105106.disop) - c:RegisterEffect(e2) - --remove - local e3=Effect.CreateEffect(c) - e3:SetCategory(CATEGORY_REMOVE) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - e3:SetCondition(c21105106.rmcon) - e3:SetCost(c21105106.rmcost) - e3:SetTarget(c21105106.rmtg) - e3:SetOperation(c21105106.rmop) - c:RegisterEffect(e3) -end -function c21105106.splimit(e,se,sp,st) - return e:GetHandler():IsLocation(LOCATION_HAND) and bit.band(st,SUMMON_TYPE_RITUAL)==SUMMON_TYPE_RITUAL -end -function c21105106.mat_filter(c) - return false -end -function c21105106.discon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()==PHASE_MAIN1 -end -function c21105106.cfilter(c) - return c:IsSetCard(0xb4) and c:IsType(TYPE_SPELL) and c:IsDiscardable() -end -function c21105106.discost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsDiscardable() - and Duel.IsExistingMatchingCard(c21105106.cfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) - local g=Duel.SelectMatchingCard(tp,c21105106.cfilter,tp,LOCATION_HAND,0,1,1,nil) - g:AddCard(e:GetHandler()) - Duel.SendtoGrave(g,REASON_DISCARD+REASON_COST) -end -function c21105106.disop(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_MAIN1) - e1:SetTargetRange(0,1) - e1:SetTarget(c21105106.sumlimit) - Duel.RegisterEffect(e1,tp) -end -function c21105106.sumlimit(e,c,sump,sumtype,sumpos,targetp,se) - return c:IsLocation(LOCATION_EXTRA) -end -function c21105106.rmcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_RITUAL -end -function c21105106.rmcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_NORMALSUMMON)==0 - and Duel.GetActivityCount(tp,ACTIVITY_SPSUMMON)==1 end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) - e1:SetTargetRange(1,0) - Duel.RegisterEffect(e1,tp) - local e2=e1:Clone() - e2:SetCode(EFFECT_CANNOT_SUMMON) - Duel.RegisterEffect(e2,tp) - local e3=e1:Clone() - e3:SetCode(EFFECT_CANNOT_MSET) - Duel.RegisterEffect(e3,tp) -end -function c21105106.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_ONFIELD+LOCATION_GRAVE,LOCATION_ONFIELD+LOCATION_GRAVE,1,e:GetHandler()) end - local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_ONFIELD+LOCATION_GRAVE,LOCATION_ONFIELD+LOCATION_GRAVE,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,0) -end -function c21105106.rmop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_ONFIELD+LOCATION_GRAVE,LOCATION_ONFIELD+LOCATION_GRAVE,e:GetHandler()) - Duel.Remove(g,POS_FACEUP,REASON_EFFECT) -end -function c21105106.filter(c,tp) - return c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) -end -function c21105106.ritual_custom_condition(c,mg) - local tp=c:GetControler() - local g=mg:Filter(c21105106.filter,c,tp) - return g:IsExists(c21105106.ritfilter1,1,nil,c:GetLevel(),g) -end -function c21105106.ritfilter1(c,lv,mg) - lv=lv-c:GetLevel() - if lv<2 then return false end - local mg2=mg:Clone() - mg2:Remove(Card.IsRace,nil,c:GetRace()) - return mg2:IsExists(c21105106.ritfilter2,1,nil,lv,mg2) -end -function c21105106.ritfilter2(c,lv,mg) - local clv=c:GetLevel() - lv=lv-clv - if lv<1 then return false end - local mg2=mg:Clone() - mg2:Remove(Card.IsRace,nil,c:GetRace()) - return mg2:IsExists(c21105106.ritfilter3,1,nil,lv) -end -function c21105106.ritfilter3(c,lv) - return c:GetLevel()==lv -end -function c21105106.ritual_custom_operation(c,mg) - local tp=c:GetControler() - local lv=c:GetLevel() - local g=mg:Filter(c21105106.filter,c,tp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) - local g1=g:FilterSelect(tp,c21105106.ritfilter1,1,1,nil,lv,g) - local tc1=g1:GetFirst() - lv=lv-tc1:GetLevel() - g:Remove(Card.IsRace,nil,tc1:GetRace()) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) - local g2=g:FilterSelect(tp,c21105106.ritfilter2,1,1,nil,lv,g) - local tc2=g2:GetFirst() - lv=lv-tc2:GetLevel() - g:Remove(Card.IsRace,nil,tc2:GetRace()) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) - local g3=g:FilterSelect(tp,c21105106.ritfilter3,1,1,nil,lv) - g1:Merge(g2) - g1:Merge(g3) - c:SetMaterial(g1) -end diff --git a/script/c21113684.lua b/script/c21113684.lua deleted file mode 100644 index 6eb0d5cb14..0000000000 --- a/script/c21113684.lua +++ /dev/null @@ -1,106 +0,0 @@ ---覇魔導士アーカナイト・マジシャン -function c21113684.initial_effect(c) - c:EnableCounterPermit(0x3001) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcFun2(c,c21113684.ffilter,aux.FilterBoolFunction(Card.IsRace,RACE_SPELLCASTER),true) - --attackup - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(c21113684.attackup) - c:RegisterEffect(e2) - --fusion success - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(21113684,0)) - e3:SetCategory(CATEGORY_COUNTER) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - e3:SetCondition(c21113684.addcc) - e3:SetTarget(c21113684.addct) - e3:SetOperation(c21113684.addc) - c:RegisterEffect(e3) - --destroy - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(21113684,1)) - e4:SetCategory(CATEGORY_DESTROY) - e4:SetType(EFFECT_TYPE_IGNITION) - e4:SetRange(LOCATION_MZONE) - e4:SetProperty(EFFECT_FLAG_CARD_TARGET) - e4:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE) - e4:SetCost(c21113684.cost) - e4:SetTarget(c21113684.destg) - e4:SetOperation(c21113684.desop) - c:RegisterEffect(e4) - --draw - local e5=Effect.CreateEffect(c) - e5:SetDescription(aux.Stringid(21113684,2)) - e5:SetCategory(CATEGORY_DRAW) - e5:SetType(EFFECT_TYPE_IGNITION) - e5:SetRange(LOCATION_MZONE) - e5:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e5:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE) - e5:SetCost(c21113684.cost) - e5:SetTarget(c21113684.drtg) - e5:SetOperation(c21113684.drop) - c:RegisterEffect(e5) - --spsummon condition - local e6=Effect.CreateEffect(c) - e6:SetType(EFFECT_TYPE_SINGLE) - e6:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e6:SetCode(EFFECT_SPSUMMON_CONDITION) - e6:SetValue(c21113684.splimit) - c:RegisterEffect(e6) -end -function c21113684.splimit(e,se,sp,st) - if e:GetHandler():IsLocation(LOCATION_EXTRA) then - return bit.band(st,SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION - end - return true -end -function c21113684.ffilter(c) - return c:IsType(TYPE_SYNCHRO) and c:IsRace(RACE_SPELLCASTER) -end -function c21113684.attackup(e,c) - return c:GetCounter(0x3001)*1000 -end -function c21113684.addcc(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_FUSION -end -function c21113684.addct(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,2,0,0x3001) -end -function c21113684.addc(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - e:GetHandler():AddCounter(0x3001,2) - end -end -function c21113684.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsCanRemoveCounter(tp,1,0,0x3001,1,REASON_COST) end - Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) - Duel.RemoveCounter(tp,1,0,0x3001,1,REASON_COST) -end -function c21113684.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsDestructable() end - if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c21113684.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end -function c21113684.drtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(1) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c21113684.drop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end diff --git a/script/c2111707.lua b/script/c2111707.lua deleted file mode 100644 index d456b76bf0..0000000000 --- a/script/c2111707.lua +++ /dev/null @@ -1,93 +0,0 @@ ---XY-ドラゴン・キャノン -function c2111707.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcCode2(c,62651957,65622692,true,true) - --spsummon condition - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(c2111707.splimit) - c:RegisterEffect(e1) - --special summon rule - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_SPSUMMON_PROC) - e2:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e2:SetRange(LOCATION_EXTRA) - e2:SetCondition(c2111707.spcon) - e2:SetOperation(c2111707.spop) - c:RegisterEffect(e2) - --destroy - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(2111707,0)) - e3:SetCategory(CATEGORY_DESTROY) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetRange(LOCATION_MZONE) - e3:SetCost(c2111707.descost) - e3:SetTarget(c2111707.destg) - e3:SetOperation(c2111707.desop) - c:RegisterEffect(e3) -end -function c2111707.splimit(e,se,sp,st) - return not e:GetHandler():IsLocation(LOCATION_EXTRA+LOCATION_GRAVE) -end -function c2111707.spfilter(c,code) - return c:IsCode(code) and c:IsAbleToRemoveAsCost() -end -function c2111707.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ft<-1 then return false end - local g1=Duel.GetMatchingGroup(c2111707.spfilter,tp,LOCATION_ONFIELD,0,nil,62651957) - local g2=Duel.GetMatchingGroup(c2111707.spfilter,tp,LOCATION_ONFIELD,0,nil,65622692) - if g1:GetCount()==0 or g2:GetCount()==0 then return false end - if ft>0 then return true end - local f1=g1:FilterCount(Card.IsLocation,nil,LOCATION_MZONE) - local f2=g2:FilterCount(Card.IsLocation,nil,LOCATION_MZONE) - if ft==-1 then return f1>0 and f2>0 - else return f1>0 or f2>0 end -end -function c2111707.spop(e,tp,eg,ep,ev,re,r,rp,c) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - local g1=Duel.GetMatchingGroup(c2111707.spfilter,tp,LOCATION_ONFIELD,0,nil,62651957) - local g2=Duel.GetMatchingGroup(c2111707.spfilter,tp,LOCATION_ONFIELD,0,nil,65622692) - g1:Merge(g2) - local g=Group.CreateGroup() - local tc=nil - for i=1,2 do - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - if ft<=0 then - tc=g1:FilterSelect(tp,Card.IsLocation,1,1,nil,LOCATION_MZONE):GetFirst() - else - tc=g1:Select(tp,1,1,nil):GetFirst() - end - g:AddCard(tc) - g1:Remove(Card.IsCode,nil,tc:GetCode()) - ft=ft+1 - end - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c2111707.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) -end -function c2111707.filter(c) - return c:IsFaceup() and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable() -end -function c2111707.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and c2111707.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c2111707.filter,tp,0,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c2111707.filter,tp,0,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c2111707.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c21143940.lua b/script/c21143940.lua deleted file mode 100644 index f4bc7d8780..0000000000 --- a/script/c21143940.lua +++ /dev/null @@ -1,45 +0,0 @@ ---マスク・チェンジ -function c21143940.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_END_PHASE) - e1:SetTarget(c21143940.target) - e1:SetOperation(c21143940.activate) - c:RegisterEffect(e1) -end -function c21143940.tfilter(c,att,e,tp) - return c:IsSetCard(0xa008) and c:IsAttribute(att) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) -end -function c21143940.filter(c,e,tp) - return c:IsFaceup() and c:IsSetCard(0x8) - and Duel.IsExistingMatchingCard(c21143940.tfilter,tp,LOCATION_EXTRA,0,1,nil,c:GetAttribute(),e,tp) -end -function c21143940.chkfilter(c,att) - return c:IsFaceup() and c:IsSetCard(0x8) and c:IsAttribute(att) -end -function c21143940.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c21143940.chkfilter(chkc,e:GetLabel()) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsExistingTarget(c21143940.filter,tp,LOCATION_MZONE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectTarget(tp,c21143940.filter,tp,LOCATION_MZONE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) - e:SetLabel(g:GetFirst():GetAttribute()) -end -function c21143940.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if not tc:IsRelateToEffect(e) then return end - local att=tc:GetAttribute() - if Duel.SendtoGrave(tc,REASON_EFFECT)==0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=Duel.SelectMatchingCard(tp,c21143940.tfilter,tp,LOCATION_EXTRA,0,1,1,nil,att,e,tp) - if sg:GetCount()>0 then - Duel.BreakEffect() - Duel.SpecialSummon(sg,0,tp,tp,true,false,POS_FACEUP) - sg:GetFirst():CompleteProcedure() - end -end diff --git a/script/c21155323.lua b/script/c21155323.lua deleted file mode 100644 index fadcf7b56b..0000000000 --- a/script/c21155323.lua +++ /dev/null @@ -1,13 +0,0 @@ ---巨人ゴーグル -function c21155323.initial_effect(c) - aux.EnableDualAttribute(c) - --change base attack - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(aux.IsDualState) - e1:SetCode(EFFECT_SET_BASE_ATTACK) - e1:SetValue(2100) - c:RegisterEffect(e1) -end diff --git a/script/c21159309.lua b/script/c21159309.lua deleted file mode 100644 index c8bb62a20b..0000000000 --- a/script/c21159309.lua +++ /dev/null @@ -1,13 +0,0 @@ ---救世竜 セイヴァー・ドラゴン -function c21159309.initial_effect(c) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e2:SetValue(c21159309.synlimit) - c:RegisterEffect(e2) -end -function c21159309.synlimit(e,c) - if not c then return false end - return not c:IsSetCard(0x3f) -end diff --git a/script/c21175632.lua b/script/c21175632.lua deleted file mode 100644 index a5d0eb1687..0000000000 --- a/script/c21175632.lua +++ /dev/null @@ -1,6 +0,0 @@ ---聖女ジャンヌ -function c21175632.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcCode2(c,84080938,57579381,true,true) -end diff --git a/script/c21179143.lua b/script/c21179143.lua deleted file mode 100644 index c6e2089ed2..0000000000 --- a/script/c21179143.lua +++ /dev/null @@ -1,36 +0,0 @@ ---レプティレス・スポーン -function c21179143.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c21179143.cost) - e1:SetTarget(c21179143.target) - e1:SetOperation(c21179143.activate) - c:RegisterEffect(e1) -end -function c21179143.cfilter(c) - return c:IsSetCard(0x3c) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost() -end -function c21179143.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c21179143.cfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c21179143.cfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c21179143.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>1 - and Duel.IsPlayerCanSpecialSummonMonster(tp,21179144,0x3c,0x4011,0,0,1,RACE_REPTILE,ATTRIBUTE_EARTH) end - Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,2,0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,0,0) -end -function c21179143.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 then return end - if not Duel.IsPlayerCanSpecialSummonMonster(tp,21179144,0x3c,0x4011,0,0,1,RACE_REPTILE,ATTRIBUTE_EARTH) then return end - for i=1,2 do - local token=Duel.CreateToken(tp,21179144) - Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP) - end - Duel.SpecialSummonComplete() -end diff --git a/script/c21208154.lua b/script/c21208154.lua deleted file mode 100644 index 6e5a0bae73..0000000000 --- a/script/c21208154.lua +++ /dev/null @@ -1,72 +0,0 @@ ---邪神アバター -function c21208154.initial_effect(c) - --summon with 3 tribute - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_LIMIT_SUMMON_PROC) - e1:SetCondition(c21208154.ttcon) - e1:SetOperation(c21208154.ttop) - e1:SetValue(SUMMON_TYPE_ADVANCE) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_LIMIT_SET_PROC) - c:RegisterEffect(e2) - --cannot special summon - local e3=Effect.CreateEffect(c) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_SPSUMMON_CONDITION) - c:RegisterEffect(e3) - --atk - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetCode(EFFECT_SET_ATTACK_FINAL) - e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e4:SetRange(LOCATION_MZONE) - e4:SetValue(c21208154.adval) - c:RegisterEffect(e4) - local e5=e4:Clone() - e5:SetCode(EFFECT_SET_DEFENCE_FINAL) - c:RegisterEffect(e5) - --aclimit - local e6=Effect.CreateEffect(c) - e6:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e6:SetCode(EVENT_SUMMON_SUCCESS) - e6:SetOperation(c21208154.regop) - c:RegisterEffect(e6) -end -function c21208154.ttcon(e,c) - if c==nil then return true end - return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-3 and Duel.GetTributeCount(c)>=3 -end -function c21208154.ttop(e,tp,eg,ep,ev,re,r,rp,c) - local g=Duel.SelectTribute(tp,c,3,3) - c:SetMaterial(g) - Duel.Release(g,REASON_SUMMON+REASON_MATERIAL) -end -function c21208154.filter(c) - return c:IsFaceup() and c:GetCode()~=21208154 -end -function c21208154.adval(e,c) - local g=Duel.GetMatchingGroup(c21208154.filter,0,LOCATION_MZONE,LOCATION_MZONE,nil) - if g:GetCount()==0 then - return 100 - else - local tg,val=g:GetMaxGroup(Card.GetAttack) - return val+100 - end -end -function c21208154.regop(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EFFECT_CANNOT_ACTIVATE) - e1:SetTargetRange(0,1) - e1:SetValue(c21208154.aclimit) - e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN,2) - Duel.RegisterEffect(e1,tp) -end -function c21208154.aclimit(e,re,tp) - return re:IsHasType(EFFECT_TYPE_ACTIVATE) -end diff --git a/script/c21219755.lua b/script/c21219755.lua deleted file mode 100644 index bca428ad20..0000000000 --- a/script/c21219755.lua +++ /dev/null @@ -1,32 +0,0 @@ ---破壊指輪 -function c21219755.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c21219755.target) - e1:SetOperation(c21219755.activate) - c:RegisterEffect(e1) -end -function c21219755.filter(c) - return c:IsFaceup() and c:IsDestructable() -end -function c21219755.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c21219755.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c21219755.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c21219755.filter,tp,LOCATION_MZONE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,PLAYER_ALL,1000) -end -function c21219755.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - if Duel.Destroy(tc,REASON_EFFECT)>0 then - Duel.Damage(1-tp,1000,REASON_EFFECT) - Duel.Damage(tp,1000,REASON_EFFECT) - end - end -end diff --git a/script/c21223277.lua b/script/c21223277.lua deleted file mode 100644 index 38e272d94a..0000000000 --- a/script/c21223277.lua +++ /dev/null @@ -1,96 +0,0 @@ ---聖騎士王アルトリウス -function c21223277.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0x107a),4,2) - c:EnableReviveLimit() - --equip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(21223277,0)) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(c21223277.condition) - e1:SetTarget(c21223277.target) - e1:SetOperation(c21223277.operation) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(21223277,1)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCost(c21223277.descost) - e2:SetTarget(c21223277.destg) - e2:SetOperation(c21223277.desop) - c:RegisterEffect(e2) -end -function c21223277.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_XYZ -end -function c21223277.filter(c,e,tp,ec) - return c:IsSetCard(0x207a) and c:IsCanBeEffectTarget(e) and c:CheckUniqueOnField(tp) and c:CheckEquipTarget(ec) -end -function c21223277.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c21223277.filter(chkc,e,tp,e:GetHandler()) end - if chk==0 then - if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return false end - return Duel.IsExistingMatchingCard(c21223277.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp,e:GetHandler()) - end - local ft=Duel.GetLocationCount(tp,LOCATION_SZONE) - local g=Duel.GetMatchingGroup(c21223277.filter,tp,LOCATION_GRAVE,0,nil,e,tp,e:GetHandler()) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local g1=g:Select(tp,1,1,nil) - g:Remove(Card.IsCode,nil,g1:GetFirst():GetCode()) - if ft>1 and g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(21223277,2)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local g2=g:Select(tp,1,1,nil) - g:Remove(Card.IsCode,nil,g2:GetFirst():GetCode()) - g1:Merge(g2) - if ft>2 and g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(21223277,2)) then - g2=g:Select(tp,1,1,nil) - g1:Merge(g2) - end - end - Duel.SetTargetCard(g1) - Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g1,g1:GetCount(),0,0) -end -function c21223277.operation(e,tp,eg,ep,ev,re,r,rp) - local ft=Duel.GetLocationCount(tp,LOCATION_SZONE) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) - if ft0 then - Duel.Destroy(g,REASON_EFFECT) - end -end diff --git a/script/c2122975.lua b/script/c2122975.lua deleted file mode 100644 index a5ebdb6e2c..0000000000 --- a/script/c2122975.lua +++ /dev/null @@ -1,33 +0,0 @@ ---トラップ・キャプチャー -function c2122975.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_CHAINING) - e1:SetCondition(c2122975.condition) - e1:SetCost(c2122975.cost) - e1:SetOperation(c2122975.activate) - c:RegisterEffect(e1) -end -function c2122975.condition(e,tp,eg,ep,ev,re,r,rp) - return rp==tp and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_TRAP) -end -function c2122975.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD,nil) -end -function c2122975.activate(e,tp,eg,ep,ev,re,r,rp) - if re:GetHandler():IsRelateToEffect(re) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetOperation(c2122975.thop) - e1:SetReset(RESET_EVENT+0x17a0000) - re:GetHandler():RegisterEffect(e1) - end -end -function c2122975.thop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsHasEffect(EFFECT_NECRO_VALLEY) then - Duel.SendtoHand(e:GetHandler(),tp,REASON_EFFECT) - end -end diff --git a/script/c21237481.lua b/script/c21237481.lua deleted file mode 100644 index 82d7a5c97d..0000000000 --- a/script/c21237481.lua +++ /dev/null @@ -1,65 +0,0 @@ ---零式魔導粉砕機 -function c21237481.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c21237481.target1) - e1:SetOperation(c21237481.operation) - c:RegisterEffect(e1) - --damage - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(21237481,0)) - e2:SetCategory(CATEGORY_DAMAGE) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetRange(LOCATION_SZONE) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetHintTiming(0,0x1e0) - e2:SetCost(c21237481.cost2) - e2:SetTarget(c21237481.target2) - e2:SetOperation(c21237481.operation) - c:RegisterEffect(e2) -end -function c21237481.costfilter(c) - return c:IsType(TYPE_SPELL) and c:IsDiscardable() -end -function c21237481.target1(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - if Duel.IsExistingMatchingCard(c21237481.costfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) and - Duel.SelectYesNo(tp,aux.Stringid(21237481,1)) then - e:SetCategory(CATEGORY_DAMAGE) - e:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) - local cg=Duel.SelectMatchingCard(tp,c21237481.costfilter,tp,LOCATION_HAND,0,1,60,nil) - Duel.SendtoGrave(cg,REASON_COST+REASON_DISCARD) - local dam=cg:GetCount()*500 - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(dam) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,dam) - e:SetLabel(dam) - else - e:SetCategory(0) - e:SetProperty(0) - e:SetLabel(0) - end -end -function c21237481.cost2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c21237481.costfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) - local cg=Duel.SelectMatchingCard(tp,c21237481.costfilter,tp,LOCATION_HAND,0,1,60,nil) - Duel.SendtoGrave(cg,REASON_COST+REASON_DISCARD) - e:SetLabel(cg:GetCount()) -end -function c21237481.target2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local dam=e:GetLabel()*500 - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(dam) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,dam) -end -function c21237481.operation(e,tp,eg,ep,ev,re,r,rp) - if e:GetLabel()==0 or not e:GetHandler():IsRelateToEffect(e) then return end - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c21249921.lua b/script/c21249921.lua deleted file mode 100644 index 3b019416c6..0000000000 --- a/script/c21249921.lua +++ /dev/null @@ -1,78 +0,0 @@ ---ドラグニティナイト-ヴァジュランダ -function c21249921.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsRace,RACE_DRAGON),aux.NonTuner(Card.IsRace,RACE_WINDBEAST),1) - c:EnableReviveLimit() - --equip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(21249921,0)) - e1:SetCategory(CATEGORY_LEAVE_GRAVE+CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCondition(c21249921.eqcon) - e1:SetTarget(c21249921.eqtg) - e1:SetOperation(c21249921.eqop) - c:RegisterEffect(e1) - --atk - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(21249921,1)) - e2:SetCategory(CATEGORY_ATKCHANGE) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetCountLimit(1) - e2:SetRange(LOCATION_MZONE) - e2:SetCost(c21249921.atkcost) - e2:SetOperation(c21249921.atkop) - c:RegisterEffect(e2) -end -function c21249921.eqcon(e,tp,eg,ep,ev,re,r,rp) - return bit.band(e:GetHandler():GetSummonType(),SUMMON_TYPE_SYNCHRO)==SUMMON_TYPE_SYNCHRO -end -function c21249921.filter(c) - return c:IsLevelBelow(3) and c:IsSetCard(0x29) and c:IsRace(RACE_DRAGON) -end -function c21249921.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c21249921.filter(chkc) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingTarget(c21249921.filter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local g=Duel.SelectTarget(tp,c21249921.filter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0) -end -function c21249921.eqop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsFaceup() and c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then - if not Duel.Equip(tp,tc,c,false) then return end - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_OWNER_RELATE) - e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(c21249921.eqlimit) - tc:RegisterEffect(e1) - end -end -function c21249921.eqlimit(e,c) - return e:GetOwner()==c -end -function c21249921.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:GetEquipGroup():IsExists(Card.IsAbleToGraveAsCost,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=c:GetEquipGroup():FilterSelect(tp,Card.IsAbleToGraveAsCost,1,1,nil) - Duel.SendtoGrave(g,REASON_COST) -end -function c21249921.atkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFaceup() and c:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetValue(c:GetAttack()*2) - e1:SetReset(RESET_EVENT+0x1ff0000+RESET_PHASE+PHASE_END) - c:RegisterEffect(e1) - end -end diff --git a/script/c21296383.lua b/script/c21296383.lua deleted file mode 100644 index 62ffff079a..0000000000 --- a/script/c21296383.lua +++ /dev/null @@ -1,46 +0,0 @@ ---ユニバード -function c21296383.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(21296383,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetTarget(c21296383.target) - e1:SetOperation(c21296383.operation) - c:RegisterEffect(e1) -end -function c21296383.spfilter(c,e,tp) - return c:IsType(TYPE_SYNCHRO) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) - and c:IsCanBeEffectTarget(e) -end -function c21296383.cfilter(c,lv) - return c:IsFaceup() and c:IsAbleToRemoveAsCost() and c:GetOriginalLevel()>=lv -end -function c21296383.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local sg=Duel.GetMatchingGroup(c21296383.spfilter,tp,LOCATION_GRAVE,0,nil,e,tp) - if chkc then return sg:IsContains(chkc) and chkc:IsLevelBelow(e:GetLabel()) end - if sg:GetCount()==0 then return false end - local mg,mlv=sg:GetMinGroup(Card.GetLevel) - local elv=e:GetHandler():GetOriginalLevel() - local lv=(elv>=mlv) and 1 or (mlv-elv) - if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() - and Duel.IsExistingMatchingCard(c21296383.cfilter,tp,LOCATION_MZONE,0,1,e:GetHandler(),lv) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c21296383.cfilter,tp,LOCATION_MZONE,0,1,1,e:GetHandler(),lv) - local slv=elv+g:GetFirst():GetLevel() - g:AddCard(e:GetHandler()) - Duel.Remove(g,POS_FACEUP,REASON_COST) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - e:SetLabel(slv) - local g=sg:FilterSelect(tp,Card.IsLevelBelow,1,1,nil,slv) - Duel.SetTargetCard(g) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c21296383.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c21297224.lua b/script/c21297224.lua deleted file mode 100644 index e2358fb45a..0000000000 --- a/script/c21297224.lua +++ /dev/null @@ -1,29 +0,0 @@ ---ヒステリック天使 -function c21297224.initial_effect(c) - --flip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(21297224,0)) - e1:SetCategory(CATEGORY_RECOVER) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c21297224.cost) - e1:SetTarget(c21297224.target) - e1:SetOperation(c21297224.operation) - c:RegisterEffect(e1) -end -function c21297224.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,nil,2,nil) end - local g=Duel.SelectReleaseGroup(tp,nil,2,2,nil) - Duel.Release(g,REASON_COST) -end -function c21297224.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(1000) - Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,1000) -end -function c21297224.operation(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Recover(p,d,REASON_EFFECT) -end diff --git a/script/c2130625.lua b/script/c2130625.lua deleted file mode 100644 index a3ae010944..0000000000 --- a/script/c2130625.lua +++ /dev/null @@ -1,30 +0,0 @@ ---白衣の天使 -function c2130625.initial_effect(c) - --recover - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCategory(CATEGORY_RECOVER) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_DAMAGE) - e1:SetCondition(c2130625.reccon) - e1:SetTarget(c2130625.rectg) - e1:SetOperation(c2130625.recop) - c:RegisterEffect(e1) -end -function c2130625.reccon(e,tp,eg,ep,ev,re,r,rp) - return ep==tp -end -function c2130625.rectg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(1000) - Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,1000) -end -function c2130625.recop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Recover(p,d,REASON_EFFECT) - local gc=Duel.GetMatchingGroupCount(Card.IsCode,p,LOCATION_GRAVE,0,nil,2130625) - if gc>0 then - Duel.Recover(p,500*gc,REASON_EFFECT) - end -end diff --git a/script/c21313376.lua b/script/c21313376.lua deleted file mode 100644 index baffc50339..0000000000 --- a/script/c21313376.lua +++ /dev/null @@ -1,47 +0,0 @@ ---No.14 強欲のサラメーヤ -function c21313376.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,5,2) - c:EnableReviveLimit() - --reflect damage - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_REFLECT_DAMAGE) - e1:SetRange(LOCATION_MZONE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetTargetRange(1,0) - e1:SetValue(c21313376.refcon) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_BATTLE_DESTROYING) - e2:SetCondition(aux.bdogcon) - e2:SetCost(c21313376.descost) - e2:SetTarget(c21313376.destg) - e2:SetOperation(c21313376.desop) - c:RegisterEffect(e2) -end -c21313376.xyz_number=14 -function c21313376.refcon(e,re,val,r,rp,rc) - return bit.band(r,REASON_EFFECT)~=0 and rp~=e:GetHandlerPlayer() -end -function c21313376.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c21313376.filter(c,atk) - return c:IsFaceup() and c:IsAttackBelow(atk) and c:IsDestructable() -end -function c21313376.destg(e,tp,eg,ep,ev,re,r,rp,chk) - local atk=e:GetHandler():GetBattleTarget():GetBaseAttack() - if chk==0 then return Duel.IsExistingMatchingCard(c21313376.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,atk) end - local g=Duel.GetMatchingGroup(c21313376.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,atk) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c21313376.desop(e,tp,eg,ep,ev,re,r,rp) - local atk=e:GetHandler():GetBattleTarget():GetBaseAttack() - local g=Duel.GetMatchingGroup(c21313376.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,atk) - Duel.Destroy(g,REASON_EFFECT) -end diff --git a/script/c21323861.lua b/script/c21323861.lua deleted file mode 100644 index c622cd72e3..0000000000 --- a/script/c21323861.lua +++ /dev/null @@ -1,23 +0,0 @@ ---酸の嵐 -function c21323861.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c21323861.target) - e1:SetOperation(c21323861.activate) - c:RegisterEffect(e1) -end -function c21323861.filter(c) - return c:IsRace(RACE_MACHINE) and c:IsFaceup() and c:IsDestructable() -end -function c21323861.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c21323861.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - local sg=Duel.GetMatchingGroup(c21323861.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,sg:GetCount(),0,0) -end -function c21323861.activate(e,tp,eg,ep,ev,re,r,rp) - local sg=Duel.GetMatchingGroup(c21323861.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - Duel.Destroy(sg,REASON_EFFECT) -end diff --git a/script/c213326.lua b/script/c213326.lua deleted file mode 100644 index 94b4e6a8b3..0000000000 --- a/script/c213326.lua +++ /dev/null @@ -1,26 +0,0 @@ ---E-エマージェンシーコール -function c213326.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c213326.target) - e1:SetOperation(c213326.activate) - c:RegisterEffect(e1) -end -function c213326.filter(c) - return c:IsSetCard(0x3008) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() -end -function c213326.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c213326.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c213326.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c213326.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c21340051.lua b/script/c21340051.lua deleted file mode 100644 index 225b4d5c1a..0000000000 --- a/script/c21340051.lua +++ /dev/null @@ -1,24 +0,0 @@ ---ボアソルジャー -function c21340051.initial_effect(c) - --self destroy - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetOperation(c21340051.desop) - c:RegisterEffect(e1) - --atk down - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetCondition(c21340051.con) - e2:SetValue(-1000) - c:RegisterEffect(e2) -end -function c21340051.desop(e,tp,eg,ep,ev,re,r,rp) - Duel.Destroy(e:GetHandler(),REASON_EFFECT) -end -function c21340051.con(e) - return Duel.GetFieldGroupCount(e:GetHandlerPlayer(),0,LOCATION_MZONE)>0 -end diff --git a/script/c2134346.lua b/script/c2134346.lua deleted file mode 100644 index 5e8ce597d5..0000000000 --- a/script/c2134346.lua +++ /dev/null @@ -1,62 +0,0 @@ ---阿修羅 -function c2134346.initial_effect(c) - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(aux.FALSE) - c:RegisterEffect(e1) - --summon,flip - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetCode(EVENT_SUMMON_SUCCESS) - e2:SetOperation(c2134346.retreg) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EVENT_FLIP) - c:RegisterEffect(e3) - --attack all - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetCode(EFFECT_ATTACK_ALL) - e4:SetValue(1) - c:RegisterEffect(e4) -end -function c2134346.retreg(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - --to hand - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetDescription(aux.Stringid(2134346,0)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e1:SetCondition(c2134346.retcon) - e1:SetTarget(c2134346.rettg) - e1:SetOperation(c2134346.retop) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - c:RegisterEffect(e2) -end -function c2134346.retcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsHasEffect(EFFECT_SPIRIT_DONOT_RETURN) then return false end - if e:IsHasType(EFFECT_TYPE_TRIGGER_F) then - return not c:IsHasEffect(EFFECT_SPIRIT_MAYNOT_RETURN) - else return c:IsHasEffect(EFFECT_SPIRIT_MAYNOT_RETURN) end -end -function c2134346.rettg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0) -end -function c2134346.retop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SendtoHand(c,nil,REASON_EFFECT) - end -end diff --git a/script/c21347810.lua b/script/c21347810.lua deleted file mode 100644 index a593b119f5..0000000000 --- a/script/c21347810.lua +++ /dev/null @@ -1,8 +0,0 @@ ---レインボー・フラワー -function c21347810.initial_effect(c) - --direct attack - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DIRECT_ATTACK) - c:RegisterEffect(e1) -end diff --git a/script/c21350571.lua b/script/c21350571.lua deleted file mode 100644 index ad925ec31c..0000000000 --- a/script/c21350571.lua +++ /dev/null @@ -1,84 +0,0 @@ ---幻獣の角 -function c21350571.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCondition(c21350571.condition) - e1:SetTarget(c21350571.target) - e1:SetOperation(c21350571.operation) - c:RegisterEffect(e1) -end -function c21350571.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end -function c21350571.filter(c) - return c:IsFaceup() and c:IsRace(RACE_BEAST+RACE_BEASTWARRIOR) -end -function c21350571.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c21350571.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c21350571.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local g=Duel.SelectTarget(tp,c21350571.filter,tp,LOCATION_MZONE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c21350571.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsLocation(LOCATION_SZONE) then return end - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,c,tc) - c:CancelToGrave() - --draw - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetCategory(CATEGORY_DRAW) - e1:SetDescription(aux.Stringid(21350571,0)) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetRange(LOCATION_SZONE) - e1:SetCondition(c21350571.drcon) - e1:SetTarget(c21350571.drtg) - e1:SetOperation(c21350571.drop) - e1:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e1) - --Atkup - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(800) - e2:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e2) - --Equip limit - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_EQUIP_LIMIT) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e3:SetValue(c21350571.eqlimit) - e3:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e3) - end -end -function c21350571.eqlimit(e,c) - return c:IsRace(RACE_BEAST+RACE_BEASTWARRIOR) -end -function c21350571.drfilter(c,rc) - return c:IsLocation(LOCATION_GRAVE) and c:IsReason(REASON_BATTLE) and c:GetReasonCard()==rc -end -function c21350571.drcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c21350571.drfilter,1,nil,e:GetHandler():GetEquipTarget()) -end -function c21350571.drtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(1) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c21350571.drop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end diff --git a/script/c21362970.lua b/script/c21362970.lua deleted file mode 100644 index 14d48c5660..0000000000 --- a/script/c21362970.lua +++ /dev/null @@ -1,34 +0,0 @@ ---ビーストライカー -function c21362970.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(21362970,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCost(c21362970.spcost) - e1:SetTarget(c21362970.sptg) - e1:SetOperation(c21362970.spop) - c:RegisterEffect(e1) -end -function c21362970.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) -end -function c21362970.filter(c,e,tp) - return c:IsCode(94878265) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c21362970.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c21362970.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c21362970.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c21362970.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c2137678.lua b/script/c2137678.lua deleted file mode 100644 index 69c4e0ffe3..0000000000 --- a/script/c2137678.lua +++ /dev/null @@ -1,44 +0,0 @@ ---機皇兵グランエル・アイン -function c2137678.initial_effect(c) - --atkup - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(c2137678.val) - c:RegisterEffect(e1) - --atk down - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(2137678,0)) - e2:SetCategory(CATEGORY_ATKCHANGE) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_SUMMON_SUCCESS) - e2:SetTarget(c2137678.target) - e2:SetOperation(c2137678.operation) - c:RegisterEffect(e2) -end -function c2137678.atkfilter(c) - return c:IsFaceup() and c:IsSetCard(0x13) -end -function c2137678.val(e,c) - return Duel.GetMatchingGroupCount(c2137678.atkfilter,0,LOCATION_MZONE,LOCATION_MZONE,c)*100 -end -function c2137678.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsFaceup() and chkc:IsLocation(LOCATION_MZONE) end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil) -end -function c2137678.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e1:SetValue(tc:GetAttack()/2) - tc:RegisterEffect(e1) - end -end diff --git a/script/c21390858.lua b/script/c21390858.lua deleted file mode 100644 index 2b822249d6..0000000000 --- a/script/c21390858.lua +++ /dev/null @@ -1,70 +0,0 @@ ---凭依装着-达克 -function c21390858.initial_effect(c) - --spsummon proc - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND+LOCATION_DECK) - e1:SetCondition(c21390858.spcon) - e1:SetOperation(c21390858.spop) - e1:SetValue(1) - c:RegisterEffect(e1) - --search - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(21390858,0)) - e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e2:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetCondition(c21390858.condition) - e2:SetTarget(c21390858.target) - e2:SetOperation(c21390858.operation) - c:RegisterEffect(e2) -end -function c21390858.spfilter1(c,tp) - return c:IsFaceup() and c:IsCode(19327348) and c:IsAbleToGraveAsCost() - and Duel.IsExistingMatchingCard(c21390858.spfilter2,tp,LOCATION_MZONE,0,1,c) -end -function c21390858.spfilter2(c) - return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_DARK) and c:IsAbleToGraveAsCost() -end -function c21390858.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.GetLocationCount(tp,LOCATION_MZONE)>-2 - and Duel.IsExistingMatchingCard(c21390858.spfilter1,tp,LOCATION_MZONE,0,1,nil,tp) -end -function c21390858.spop(e,tp,eg,ep,ev,re,r,rp,c) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g1=Duel.SelectMatchingCard(tp,c21390858.spfilter1,tp,LOCATION_MZONE,0,1,1,nil,tp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g2=Duel.SelectMatchingCard(tp,c21390858.spfilter2,tp,LOCATION_MZONE,0,1,1,g1:GetFirst()) - g1:Merge(g2) - Duel.SendtoGrave(g1,REASON_COST) - Duel.ShuffleDeck(tp) - --pierce - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_PIERCE) - e1:SetReset(RESET_EVENT+0xff0000) - c:RegisterEffect(e1) -end -function c21390858.tfilter(c) - local lv=c:GetLevel() - return (lv==3 or lv==4) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_SPELLCASTER) and c:IsAbleToHand() -end -function c21390858.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+1 -end -function c21390858.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c21390858.tfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c21390858.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c21390858.tfilter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c21414674.lua b/script/c21414674.lua deleted file mode 100644 index d47fcfc336..0000000000 --- a/script/c21414674.lua +++ /dev/null @@ -1,19 +0,0 @@ ---プロミネンス・ハンド -function c21414674.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c21414674.spcon) - c:RegisterEffect(e1) -end -function c21414674.filter(c) - return c:IsFaceup() and (c:IsCode(22530212) or c:IsCode(68535320) or c:IsCode(95929069)) -end -function c21414674.spcon(e,c) - if c==nil then return true end - return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c21414674.filter,c:GetControler(),LOCATION_MZONE,0,1,nil) -end diff --git a/script/c21417692.lua b/script/c21417692.lua deleted file mode 100644 index 500fc8f41a..0000000000 --- a/script/c21417692.lua +++ /dev/null @@ -1,16 +0,0 @@ ---ダーク・エルフ -function c21417692.initial_effect(c) - --attack cost - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_ATTACK_COST) - e1:SetCost(c21417692.atcost) - e1:SetOperation(c21417692.atop) - c:RegisterEffect(e1) -end -function c21417692.atcost(e,c,tp) - return Duel.CheckLPCost(tp,1000) -end -function c21417692.atop(e,tp,eg,ep,ev,re,r,rp) - Duel.PayLPCost(tp,1000) -end diff --git a/script/c21420702.lua b/script/c21420702.lua deleted file mode 100644 index 04c4987731..0000000000 --- a/script/c21420702.lua +++ /dev/null @@ -1,64 +0,0 @@ ---ブレイズ・キャノン-トライデント -function c21420702.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c21420702.cost) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(21420702,0)) - e2:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_SZONE) - e2:SetCost(c21420702.descost) - e2:SetTarget(c21420702.destg) - e2:SetOperation(c21420702.desop) - c:RegisterEffect(e2) -end -function c21420702.costfilter(c) - return c:IsFaceup() and c:IsCode(69537999) and c:IsAbleToGraveAsCost() -end -function c21420702.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c21420702.costfilter,tp,LOCATION_SZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c21420702.costfilter,tp,LOCATION_SZONE,0,1,1,nil) - Duel.SendtoGrave(g,REASON_COST) -end -function c21420702.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_ATTACK)==0 end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) - e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+RESET_END) - Duel.RegisterEffect(e1,tp) -end -function c21420702.disfilter(c) - return c:IsRace(RACE_PYRO) -end -function c21420702.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsDestructable() end - if chk==0 then return Duel.IsExistingMatchingCard(c21420702.disfilter,tp,LOCATION_HAND,0,1,nil) - and Duel.IsExistingTarget(Card.IsDestructable,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,500) - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_HAND) -end -function c21420702.desop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c21420702.disfilter,tp,LOCATION_HAND,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoGrave(g,REASON_EFFECT) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)~=0 then - Duel.Damage(1-tp,500,REASON_EFFECT) - end - end -end diff --git a/script/c21435914.lua b/script/c21435914.lua deleted file mode 100644 index 3011f7ce51..0000000000 --- a/script/c21435914.lua +++ /dev/null @@ -1,71 +0,0 @@ ---冥界濁龍 ドラゴキュートス -function c21435914.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure2(c,aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_DARK),aux.NonTuner(Card.IsRace,RACE_DRAGON)) - c:EnableReviveLimit() - --battle indestructable - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e1:SetValue(1) - c:RegisterEffect(e1) - --chain attack - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_BATTLE_DESTROYING) - e2:SetCondition(c21435914.atcon) - e2:SetOperation(c21435914.atop) - c:RegisterEffect(e2) - --damage - local e3=Effect.CreateEffect(c) - e3:SetCategory(CATEGORY_DAMAGE) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetRange(LOCATION_MZONE) - e3:SetCode(EVENT_PHASE+PHASE_STANDBY) - e3:SetCountLimit(1) - e3:SetCondition(c21435914.damcon) - e3:SetTarget(c21435914.damtg) - e3:SetOperation(c21435914.damop) - c:RegisterEffect(e3) -end -function c21435914.atcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local bc=c:GetBattleTarget() - return bc:IsLocation(LOCATION_GRAVE) and bc:IsType(TYPE_MONSTER) and c:IsChainAttackable(2,true) and c:IsStatus(STATUS_OPPO_BATTLE) -end -function c21435914.atop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToBattle() then return end - Duel.ChainAttack() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_DIRECT_ATTACK) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_BATTLE) - c:RegisterEffect(e1) -end -function c21435914.damcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c21435914.damtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil) - local atk=g:GetFirst():GetAttack() - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,atk/2) -end -function c21435914.damop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then - local atk=tc:GetAttack() - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(atk/2) - tc:RegisterEffect(e1) - Duel.Damage(1-tp,atk/2,REASON_EFFECT) - end -end diff --git a/script/c21452275.lua b/script/c21452275.lua deleted file mode 100644 index b87c8485d1..0000000000 --- a/script/c21452275.lua +++ /dev/null @@ -1,48 +0,0 @@ ---アロマポット -function c21452275.initial_effect(c) - --flip - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_FLIP) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetOperation(c21452275.flipop) - c:RegisterEffect(e1) - --indes - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e2:SetCondition(c21452275.indcon) - e2:SetValue(1) - c:RegisterEffect(e2) - --Recover - local e3=Effect.CreateEffect(c) - e3:SetCategory(CATEGORY_RECOVER) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e3:SetCode(EVENT_PHASE+PHASE_END) - e3:SetRange(LOCATION_MZONE) - e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e3:SetCountLimit(1) - e3:SetCondition(c21452275.reccon) - e3:SetTarget(c21452275.rectg) - e3:SetOperation(c21452275.recop) - c:RegisterEffect(e3) -end -function c21452275.flipop(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():RegisterFlagEffect(21452275,RESET_EVENT+0x1fe0000,0,1) -end -function c21452275.indcon(e) - return e:GetHandler():GetFlagEffect(21452275)~=0 -end -function c21452275.reccon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetFlagEffect(21452275)~=0 -end -function c21452275.rectg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(500) - Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,500) -end -function c21452275.recop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Recover(p,d,REASON_EFFECT) -end diff --git a/script/c21454943.lua b/script/c21454943.lua deleted file mode 100644 index 38ce0a6ada..0000000000 --- a/script/c21454943.lua +++ /dev/null @@ -1,70 +0,0 @@ ---サイコ・コマンダー -function c21454943.initial_effect(c) - --atkdown - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetDescription(aux.Stringid(21454943,0)) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c21454943.condition) - e1:SetCost(c21454943.cost) - e1:SetTarget(c21454943.target) - e1:SetOperation(c21454943.operation) - c:RegisterEffect(e1) -end -function c21454943.condition(e,tp,eg,ep,ev,re,r,rp) - local phase=Duel.GetCurrentPhase() - if phase~=PHASE_DAMAGE or Duel.IsDamageCalculated() then return false end - local a=Duel.GetAttacker() - local d=Duel.GetAttackTarget() - if a:IsControler(tp) then - e:SetLabelObject(d) - return a:IsFaceup() and a:IsRace(RACE_PSYCHO) and a:IsRelateToBattle() and d and d:IsFaceup() and d:IsRelateToBattle() - else - e:SetLabelObject(a) - return d:IsFaceup() and d:IsRace(RACE_PSYCHO) and d:IsRelateToBattle() and a and a:IsFaceup() and a:IsRelateToBattle() - end -end -function c21454943.cost(e,tp,eg,ep,ev,re,r,rp,chk) - local bc=e:GetLabelObject() - if chk==0 then return Duel.CheckLPCost(tp,100) and e:GetHandler():GetFlagEffect(21454943)==0 - and (bc:IsAttackAbove(100) or bc:IsDefenceAbove(100)) end - local lp=Duel.GetLP(tp)-1 - local alp=100 - local maxpay=bc:GetAttack() - local def=bc:GetDefence() - if maxpay=500 then alp=Duel.AnnounceNumber(tp,100,200,300,400,500) - elseif lp>=400 then alp=Duel.AnnounceNumber(tp,100,200,300,400) - elseif lp>=300 then alp=Duel.AnnounceNumber(tp,100,200,300) - elseif lp>=200 then alp=Duel.AnnounceNumber(tp,100,200) - end - Duel.PayLPCost(tp,alp) - e:SetLabel(-alp) - e:GetHandler():RegisterFlagEffect(21454943,RESET_PHASE+RESET_DAMAGE,0,1) -end -function c21454943.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local tc=e:GetLabelObject() - if chkc then return chkc==tc end - if chk==0 then return tc:IsCanBeEffectTarget(e) end - Duel.SetTargetCard(tc) -end -function c21454943.operation(e,tp,eg,ep,ev,re,r,rp,chk) - local tc=Duel.GetFirstTarget() - local c=e:GetHandler() - if not tc or not tc:IsRelateToEffect(e) or not tc:IsControler(1-tp) then return end - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e1:SetValue(e:GetLabel()) - tc:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_UPDATE_DEFENCE) - tc:RegisterEffect(e2) -end diff --git a/script/c21466326.lua b/script/c21466326.lua deleted file mode 100644 index ec5a279545..0000000000 --- a/script/c21466326.lua +++ /dev/null @@ -1,27 +0,0 @@ ---残骸爆破 -function c21466326.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_DRAW_PHASE) - e1:SetCondition(c21466326.condition) - e1:SetTarget(c21466326.target) - e1:SetOperation(c21466326.activate) - c:RegisterEffect(e1) -end -function c21466326.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetFieldGroupCount(tp,LOCATION_GRAVE,0)>=30 -end -function c21466326.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(3000) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,3000) -end -function c21466326.activate(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c21481146.lua b/script/c21481146.lua deleted file mode 100644 index f10da28eb4..0000000000 --- a/script/c21481146.lua +++ /dev/null @@ -1,29 +0,0 @@ ---閃光のバリア-シャイニング・フォース- -function c21481146.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetCondition(c21481146.condition) - e1:SetTarget(c21481146.target) - e1:SetOperation(c21481146.activate) - c:RegisterEffect(e1) -end -function c21481146.condition(e,tp,eg,ep,ev,re,r,rp) - return tp~=Duel.GetTurnPlayer() and Duel.IsExistingMatchingCard(Card.IsPosition,tp,0,LOCATION_MZONE,3,nil,POS_FACEUP_ATTACK) -end -function c21481146.filter(c) - return c:IsAttackPos() and c:IsDestructable() -end -function c21481146.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c21481146.filter,tp,0,LOCATION_MZONE,1,nil) end - local g=Duel.GetMatchingGroup(c21481146.filter,tp,0,LOCATION_MZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c21481146.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c21481146.filter,tp,0,LOCATION_MZONE,nil) - if g:GetCount()>0 then - Duel.Destroy(g,REASON_EFFECT) - end -end diff --git a/script/c21488686.lua b/script/c21488686.lua deleted file mode 100644 index 9a5f218e1a..0000000000 --- a/script/c21488686.lua +++ /dev/null @@ -1,27 +0,0 @@ ---サイコ・ヒーリング -function c21488686.initial_effect(c) - --recover - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCategory(CATEGORY_RECOVER) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c21488686.target) - e1:SetOperation(c21488686.operation) - c:RegisterEffect(e1) -end -function c21488686.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c21488686.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.SetTargetPlayer(tp) - local rec=Duel.GetMatchingGroupCount(c21488686.filter,tp,LOCATION_MZONE,0,nil)*1000 - Duel.SetTargetParam(rec) - Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,rec) -end -function c21488686.filter(c) - return c:IsFaceup() and c:IsRace(RACE_PSYCHO) -end -function c21488686.operation(e,tp,eg,ep,ev,re,r,rp) - local rec=Duel.GetMatchingGroupCount(c21488686.filter,tp,LOCATION_MZONE,0,nil)*1000 - local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) - Duel.Recover(p,rec,REASON_EFFECT) -end diff --git a/script/c2148918.lua b/script/c2148918.lua deleted file mode 100644 index 8121229bc9..0000000000 --- a/script/c2148918.lua +++ /dev/null @@ -1,46 +0,0 @@ ---機甲忍法ラスト・ミスト -function c2148918.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --atk change - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(2148918,0)) - e2:SetCategory(CATEGORY_ATKCHANGE) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetRange(LOCATION_SZONE) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetCondition(c2148918.spcon) - e2:SetTarget(c2148918.sptg) - e2:SetOperation(c2148918.spop) - c:RegisterEffect(e2) -end -function c2148918.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x2b) -end -function c2148918.tgfilter(c,e,tp) - return c:IsFaceup() and c:IsControler(tp) and (not e or c:IsRelateToEffect(e)) -end -function c2148918.spcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c2148918.tgfilter,1,nil,nil,1-tp) and Duel.IsExistingMatchingCard(c2148918.cfilter,tp,LOCATION_MZONE,0,1,nil) -end -function c2148918.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetCard(eg) -end -function c2148918.spop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local g=eg:Filter(c2148918.tgfilter,nil,e,1-tp) - local tc=g:GetFirst() - while tc do - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetValue(tc:GetAttack()/2) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - tc=g:GetNext() - end -end diff --git a/script/c21495657.lua b/script/c21495657.lua deleted file mode 100644 index 511150e6a9..0000000000 --- a/script/c21495657.lua +++ /dev/null @@ -1,67 +0,0 @@ ---宝竜星-セフィラフウシ -function c21495657.initial_effect(c) - --pendulum summon - aux.AddPendulumProcedure(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --splimit - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetRange(LOCATION_PZONE) - e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE) - e2:SetTargetRange(1,0) - e2:SetTarget(c21495657.splimit) - e2:SetCondition(aux.nfbdncon) - c:RegisterEffect(e2) - --spsummon success - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - e3:SetCountLimit(1,21495657) - e3:SetCondition(c21495657.condition) - e3:SetTarget(c21495657.target) - e3:SetOperation(c21495657.operation) - c:RegisterEffect(e3) -end -function c21495657.splimit(e,c,sump,sumtype,sumpos,targetp) - if c:IsSetCard(0x9e) or c:IsSetCard(0xc4) then return false end - return bit.band(sumtype,SUMMON_TYPE_PENDULUM)==SUMMON_TYPE_PENDULUM -end -function c21495657.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_PENDULUM or e:GetHandler():IsPreviousLocation(LOCATION_DECK) -end -function c21495657.filter(c) - return c:IsFaceup() and (c:IsSetCard(0x9e) or c:IsSetCard(0xc4)) and not c:IsType(TYPE_TUNER) and not c:IsCode(21495657) -end -function c21495657.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c21495657.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c21495657.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c21495657.filter,tp,LOCATION_MZONE,0,1,1,nil) -end -function c21495657.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_ADD_TYPE) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - e1:SetValue(TYPE_TUNER) - tc:RegisterEffect(e1) - end - if c:IsRelateToEffect(e) then - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetReset(RESET_EVENT+0x47e0000) - e2:SetValue(LOCATION_DECKBOT) - c:RegisterEffect(e2) - end -end diff --git a/script/c21496848.lua b/script/c21496848.lua deleted file mode 100644 index 5e7d482985..0000000000 --- a/script/c21496848.lua +++ /dev/null @@ -1,37 +0,0 @@ ---イビリチュア・テトラオーグル -function c21496848.initial_effect(c) - c:EnableReviveLimit() - --send to grave - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(21496848,0)) - e1:SetCategory(CATEGORY_TOGRAVE) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetTarget(c21496848.target) - e1:SetOperation(c21496848.operation) - c:RegisterEffect(e1) -end -function c21496848.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0 and Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)>0 end - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(21496848,5)) - local ac=Duel.SelectOption(tp,aux.Stringid(21496848,1),aux.Stringid(21496848,2),aux.Stringid(21496848,3)) - e:SetLabel(ac) - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,PLAYER_ALL,LOCATION_DECK) -end -function c21496848.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0 and Duel.IsChainDisablable(0) - and Duel.SelectYesNo(1-tp,aux.Stringid(21496848,4)) then - Duel.DiscardHand(1-tp,aux.TRUE,1,1,REASON_EFFECT+REASON_DISCARD) - return - end - local ty=TYPE_MONSTER - if e:GetLabel()==1 then ty=TYPE_SPELL - elseif e:GetLabel()==2 then ty=TYPE_TRAP end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g1=Duel.SelectMatchingCard(tp,Card.IsType,tp,LOCATION_DECK,0,1,1,nil,ty) - Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_TOGRAVE) - local g2=Duel.SelectMatchingCard(1-tp,Card.IsType,1-tp,LOCATION_DECK,0,1,1,nil,ty) - g1:Merge(g2) - Duel.SendtoGrave(g1,REASON_EFFECT) -end diff --git a/script/c21501505.lua b/script/c21501505.lua deleted file mode 100644 index 548017e547..0000000000 --- a/script/c21501505.lua +++ /dev/null @@ -1,47 +0,0 @@ ---暗遷士 カンゴルゴーム -function c21501505.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,4,2) - c:EnableReviveLimit() - --replace - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(21501505,0)) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_QUICK_O) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_CHAINING) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c21501505.condition) - e1:SetCost(c21501505.cost) - e1:SetTarget(c21501505.target) - e1:SetOperation(c21501505.operation) - c:RegisterEffect(e1) -end -function c21501505.condition(e,tp,eg,ep,ev,re,r,rp) - if e==re or not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end - local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) - if not g or g:GetCount()~=1 then return false end - local tc=g:GetFirst() - e:SetLabelObject(tc) - return tc:IsOnField() -end -function c21501505.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c21501505.filter(c,re,rp,tf,ceg,cep,cev,cre,cr,crp) - return tf(re,rp,ceg,cep,cev,cre,cr,crp,0,c) -end -function c21501505.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local tf=re:GetTarget() - local res,ceg,cep,cev,cre,cr,crp=Duel.CheckEvent(re:GetCode(),true) - if chkc then return chkc:IsOnField() and c21501505.filter(chkc,re,rp,tf,ceg,cep,cev,cre,cr,crp) end - if chk==0 then return Duel.IsExistingTarget(c21501505.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetLabelObject(),re,rp,tf,ceg,cep,cev,cre,cr,crp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - Duel.SelectTarget(tp,c21501505.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,e:GetLabelObject(),re,rp,tf,ceg,cep,cev,cre,cr,crp) -end -function c21501505.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.ChangeTargetCard(ev,Group.FromCards(tc)) - end -end diff --git a/script/c21502796.lua b/script/c21502796.lua deleted file mode 100644 index bf22014803..0000000000 --- a/script/c21502796.lua +++ /dev/null @@ -1,31 +0,0 @@ ---ライトロード・ハンター ライコウ -function c21502796.initial_effect(c) - --flip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(21502796,0)) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCategory(CATEGORY_DECKDES+CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP) - e1:SetTarget(c21502796.target) - e1:SetOperation(c21502796.operation) - c:RegisterEffect(e1) -end -function c21502796.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsDestructable() end - if chk==0 then return true end - if Duel.IsExistingTarget(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) - and Duel.SelectYesNo(tp,aux.Stringid(21502796,1)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) - end - Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,3) -end -function c21502796.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - Duel.BreakEffect() - end - Duel.DiscardDeck(tp,3,REASON_EFFECT) -end diff --git a/script/c21507589.lua b/script/c21507589.lua deleted file mode 100644 index 83956e44cb..0000000000 --- a/script/c21507589.lua +++ /dev/null @@ -1,35 +0,0 @@ ---フィッシュアンドバックス -function c21507589.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c21507589.cost) - e1:SetTarget(c21507589.target) - e1:SetOperation(c21507589.activate) - c:RegisterEffect(e1) -end -function c21507589.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) -end -function c21507589.filter(c) - return c:IsFaceup() and c:IsRace(RACE_FISH+RACE_AQUA+RACE_SEASERPENT) and c:IsAbleToHand() -end -function c21507589.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_REMOVED) and c21507589.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c21507589.filter,tp,LOCATION_REMOVED,0,2,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c21507589.filter,tp,LOCATION_REMOVED,0,2,2,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,2,0,0) -end -function c21507589.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local sg=g:Filter(Card.IsRelateToEffect,nil,e) - if sg:GetCount()>0 then - Duel.SendtoHand(sg,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,sg) - end -end diff --git a/script/c21521304.lua b/script/c21521304.lua deleted file mode 100644 index 7bc96b066c..0000000000 --- a/script/c21521304.lua +++ /dev/null @@ -1,85 +0,0 @@ ---No.39 希望皇ビヨンド・ザ・ホープ -function c21521304.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,6,2) - c:EnableReviveLimit() - --atk - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(21521304,0)) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(c21521304.atkcon) - e1:SetOperation(c21521304.atkop) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(21521304,1)) - e2:SetCategory(CATEGORY_REMOVE+CATEGORY_SPECIAL_SUMMON+CATEGORY_RECOVER) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetRange(LOCATION_MZONE) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCountLimit(1) - e2:SetCost(c21521304.spcost) - e2:SetTarget(c21521304.sptg) - e2:SetOperation(c21521304.spop) - c:RegisterEffect(e2) - --add setcode - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e3:SetCode(EFFECT_ADD_SETCODE) - e3:SetValue(0x7f) - c:RegisterEffect(e3) -end -c21521304.xyz_number=39 -function c21521304.atkcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_XYZ -end -function c21521304.atkop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil) - local tc=g:GetFirst() - while tc do - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetValue(0) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - tc=g:GetNext() - end -end -function c21521304.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c21521304.rmfilter(c) - return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:IsAbleToRemove() -end -function c21521304.spfilter(c,e,tp) - return c:IsSetCard(0x7f) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c21521304.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsExistingTarget(c21521304.rmfilter,tp,LOCATION_MZONE,0,1,nil) - and Duel.IsExistingTarget(c21521304.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g1=Duel.SelectTarget(tp,c21521304.rmfilter,tp,LOCATION_MZONE,0,1,1,nil) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g2=Duel.SelectTarget(tp,c21521304.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g1,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g2,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_RECOVER,0,0,tp,1250) -end -function c21521304.spop(e,tp,eg,ep,ev,re,r,rp) - local ex,g1=Duel.GetOperationInfo(0,CATEGORY_REMOVE) - local ex,g2=Duel.GetOperationInfo(0,CATEGORY_SPECIAL_SUMMON) - local tc1=g1:GetFirst() - if not tc1:IsRelateToEffect(e) or Duel.Remove(tc1,POS_FACEUP,REASON_EFFECT)==0 then return end - local tc2=g2:GetFirst() - if not tc2:IsRelateToEffect(e) or Duel.SpecialSummon(tc2,0,tp,tp,false,false,POS_FACEUP)==0 then return end - Duel.BreakEffect() - Duel.Recover(tp,1250,REASON_EFFECT) -end diff --git a/script/c21524779.lua b/script/c21524779.lua deleted file mode 100644 index e60e10e0f1..0000000000 --- a/script/c21524779.lua +++ /dev/null @@ -1,30 +0,0 @@ ---OKaサンダー -function c21524779.initial_effect(c) - --summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(21524779,0)) - e1:SetCategory(CATEGORY_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetTarget(c21524779.target) - e1:SetOperation(c21524779.operation) - c:RegisterEffect(e1) -end -function c21524779.filter(c) - return c:IsRace(RACE_THUNDER) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:GetLevel()==4 - and c:GetCode()~=21524779 and c:IsSummonable(true,nil) -end -function c21524779.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c21524779.filter,tp,LOCATION_HAND,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,0,0) -end -function c21524779.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON) - local g=Duel.SelectMatchingCard(tp,c21524779.filter,tp,LOCATION_HAND,0,1,1,nil) - local tc=g:GetFirst() - if tc then - Duel.Summon(tp,tc,true,nil) - end -end diff --git a/script/c21558682.lua b/script/c21558682.lua deleted file mode 100644 index 96fabe913b..0000000000 --- a/script/c21558682.lua +++ /dev/null @@ -1,55 +0,0 @@ ---ディフェンド・スライム -function c21558682.initial_effect(c) - --activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_BATTLE_START) - e1:SetTarget(c21558682.atktg1) - e1:SetOperation(c21558682.atkop) - c:RegisterEffect(e1) - --change target - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(21558682,0)) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_ATTACK_ANNOUNCE) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetRange(LOCATION_SZONE) - e2:SetCondition(c21558682.atkcon) - e2:SetTarget(c21558682.atktg2) - e2:SetOperation(c21558682.atkop) - c:RegisterEffect(e2) -end -function c21558682.atkcon(e,tp,eg,ep,ev,re,r,rp) - return tp~=Duel.GetTurnPlayer() and Duel.GetAttackTarget()~=nil -end -function c21558682.filter(c) - return c:IsFaceup() and c:IsCode(31709826) -end -function c21558682.atktg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c21558682.filter(chkc) end - if chk==0 then return true end - e:SetProperty(0) - if Duel.CheckEvent(EVENT_ATTACK_ANNOUNCE) and tp~=Duel.GetTurnPlayer() then - local at=Duel.GetAttackTarget() - if at and Duel.IsExistingTarget(c21558682.filter,tp,LOCATION_MZONE,0,1,at) and Duel.SelectYesNo(tp,aux.Stringid(21558682,1)) then - e:SetProperty(EFFECT_FLAG_CARD_TARGET) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - Duel.SelectTarget(tp,c21558682.filter,tp,LOCATION_MZONE,0,1,1,at) - end - end -end -function c21558682.atktg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c21558682.filter(chkc) end - local at=Duel.GetAttackTarget() - if chk==0 then return Duel.IsExistingTarget(c21558682.filter,tp,LOCATION_MZONE,0,1,at) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - Duel.SelectTarget(tp,c21558682.filter,tp,LOCATION_MZONE,0,1,1,at) -end -function c21558682.atkop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local tc=Duel.GetFirstTarget() - if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) then - Duel.ChangeAttackTarget(tc) - end -end diff --git a/script/c21565445.lua b/script/c21565445.lua deleted file mode 100644 index 47af39d888..0000000000 --- a/script/c21565445.lua +++ /dev/null @@ -1,71 +0,0 @@ ---海皇子 ネプトアビス -function c21565445.initial_effect(c) - --search - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(21565445,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetCountLimit(1,21565445) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c21565445.cost) - e1:SetTarget(c21565445.target) - e1:SetOperation(c21565445.operation) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(21565445,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetCountLimit(1,21565446) - e2:SetCondition(c21565445.spcon) - e2:SetTarget(c21565445.sptg) - e2:SetOperation(c21565445.spop) - c:RegisterEffect(e2) -end -function c21565445.cfilter(c,tp) - return c:IsSetCard(0x77) and c:IsType(TYPE_MONSTER) and not c:IsCode(21565445) and c:IsAbleToGraveAsCost() - and Duel.IsExistingMatchingCard(c21565445.filter,tp,LOCATION_DECK,0,1,c) -end -function c21565445.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c21565445.cfilter,tp,LOCATION_DECK,0,1,nil,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c21565445.cfilter,tp,LOCATION_DECK,0,1,1,nil,tp) - Duel.SendtoGrave(g,REASON_COST) -end -function c21565445.filter(c) - return c:IsSetCard(0x77) and not c:IsCode(21565445) and c:IsAbleToHand() -end -function c21565445.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c21565445.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c21565445.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end -function c21565445.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsReason(REASON_COST) and re:IsHasType(0x7e0) and re:IsActiveType(TYPE_MONSTER) - and re:GetHandler():IsAttribute(ATTRIBUTE_WATER) -end -function c21565445.spfilter(c,e,tp) - return c:IsSetCard(0x77) and not c:IsCode(21565445) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c21565445.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c21565445.spfilter(chkc,e,tp) end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c21565445.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,g:GetCount(),0,0) -end -function c21565445.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c2158562.lua b/script/c2158562.lua deleted file mode 100644 index 95c26ff268..0000000000 --- a/script/c2158562.lua +++ /dev/null @@ -1,28 +0,0 @@ ---サイバー・プリマ -function c2158562.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(2158562,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetCondition(c2158562.descon) - e1:SetTarget(c2158562.destg) - e1:SetOperation(c2158562.desop) - c:RegisterEffect(e1) -end -function c2158562.descon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_ADVANCE -end -function c2158562.filter(c) - return c:IsFaceup() and c:IsType(TYPE_SPELL) and c:IsDestructable() -end -function c2158562.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local g=Duel.GetMatchingGroup(c2158562.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0,nil) -end -function c2158562.desop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c2158562.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) - Duel.Destroy(g,REASON_EFFECT) -end diff --git a/script/c21593977.lua b/script/c21593977.lua deleted file mode 100644 index a119cac76c..0000000000 --- a/script/c21593977.lua +++ /dev/null @@ -1,18 +0,0 @@ ---処刑人-マキュラ -function c21593977.initial_effect(c) - --activate trap in hand - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetOperation(c21593977.operation) - c:RegisterEffect(e1) -end -function c21593977.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_TRAP_ACT_IN_HAND) - e1:SetTargetRange(LOCATION_HAND,0) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) -end diff --git a/script/c21597117.lua b/script/c21597117.lua deleted file mode 100644 index 83882432f8..0000000000 --- a/script/c21597117.lua +++ /dev/null @@ -1,36 +0,0 @@ ---ヒーロー見参 -function c21597117.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetCondition(c21597117.condition) - e1:SetTarget(c21597117.target) - e1:SetOperation(c21597117.activate) - c:RegisterEffect(e1) -end -function c21597117.condition(e,tp,eg,ep,ev,re,r,rp) - return tp~=Duel.GetTurnPlayer() -end -function c21597117.spfilter(c,e,tp) - return c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c21597117.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c21597117.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end -end -function c21597117.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local g=Duel.GetFieldGroup(tp,LOCATION_HAND,0) - local sg=g:RandomSelect(1-tp,1) - local tc=sg:GetFirst() - if tc then - Duel.ConfirmCards(1-tp,tc) - if tc:IsCanBeSpecialSummoned(e,0,tp,false,false) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - else - Duel.SendtoGrave(tc,REASON_EFFECT) - end - end -end diff --git a/script/c21598948.lua b/script/c21598948.lua deleted file mode 100644 index 4658bc1aa5..0000000000 --- a/script/c21598948.lua +++ /dev/null @@ -1,76 +0,0 @@ ---モンスターBOX -function c21598948.initial_effect(c) - --activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_MAIN_END) - e1:SetTarget(c21598948.atktg1) - e1:SetOperation(c21598948.atkop) - c:RegisterEffect(e1) - --atk change - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(21598948,0)) - e2:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_COIN) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_ATTACK_ANNOUNCE) - e2:SetRange(LOCATION_SZONE) - e2:SetCondition(c21598948.atkcon) - e2:SetTarget(c21598948.atktg2) - e2:SetOperation(c21598948.atkop) - c:RegisterEffect(e2) - --maintain - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e3:SetCode(EVENT_PHASE+PHASE_STANDBY) - e3:SetRange(LOCATION_SZONE) - e3:SetCountLimit(1) - e3:SetCondition(c21598948.mtcon) - e3:SetOperation(c21598948.mtop) - c:RegisterEffect(e3) -end -function c21598948.atkcon(e,tp,eg,ep,ev,re,r,rp) - return tp~=Duel.GetTurnPlayer() -end -function c21598948.atktg1(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - e:SetLabel(0) - if Duel.CheckEvent(EVENT_ATTACK_ANNOUNCE) and tp~=Duel.GetTurnPlayer() then - e:SetLabel(1) - Duel.SetTargetCard(Duel.GetAttacker()) - Duel.SetOperationInfo(0,CATEGORY_COIN,nil,0,tp,1) - end -end -function c21598948.atktg2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - e:SetLabel(1) - Duel.SetTargetCard(Duel.GetAttacker()) - Duel.SetOperationInfo(0,CATEGORY_COIN,nil,0,tp,1) -end -function c21598948.atkop(e,tp,eg,ep,ev,re,r,rp) - if e:GetLabel()==0 or not e:GetHandler():IsRelateToEffect(e) then return end - local a=Duel.GetAttacker() - if not a:IsRelateToEffect(e) then return end - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(21598948,4)) - local coin=Duel.SelectOption(tp,aux.Stringid(21598948,2),aux.Stringid(21598948,3)) - local res=Duel.TossCoin(tp,1) - if coin~=res then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetValue(0) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_BATTLE) - a:RegisterEffect(e1) - end -end -function c21598948.mtcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c21598948.mtop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLP(tp)>500 and Duel.SelectYesNo(tp,aux.Stringid(21598948,1)) then - Duel.PayLPCost(tp,500) - else - Duel.Destroy(e:GetHandler(),REASON_RULE) - end -end diff --git a/script/c21620076.lua b/script/c21620076.lua deleted file mode 100644 index 7cf2d4ee63..0000000000 --- a/script/c21620076.lua +++ /dev/null @@ -1,58 +0,0 @@ ---ペインペインター -function c21620076.initial_effect(c) - --alias - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_CHANGE_CODE) - e1:SetValue(33420078) - c:RegisterEffect(e1) - --lvchange - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(21620076,0)) - e2:SetCategory(CATEGORY_LVCHANGE) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetTarget(c21620076.lvtg) - e2:SetOperation(c21620076.lvop) - c:RegisterEffect(e2) -end -function c21620076.lvfilter(c) - local lv=c:GetLevel() - return c:IsFaceup() and c:IsRace(RACE_ZOMBIE) and lv>0 and lv~=2 -end -function c21620076.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c21620076.lvfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c21620076.lvfilter,tp,LOCATION_MZONE,0,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c21620076.lvfilter,tp,LOCATION_MZONE,0,1,2,e:GetHandler()) -end -function c21620076.lvop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) - local tc=g:GetFirst() - while tc do - if tc:IsFaceup() then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CHANGE_LEVEL) - e1:SetValue(2) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL) - e2:SetValue(c21620076.synlimit) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e2) - end - tc=g:GetNext() - end -end -function c21620076.synlimit(e,c) - if not c then return false end - return not c:IsRace(RACE_ZOMBIE) -end diff --git a/script/c21636650.lua b/script/c21636650.lua deleted file mode 100644 index 51cf26305e..0000000000 --- a/script/c21636650.lua +++ /dev/null @@ -1,32 +0,0 @@ ---奇跡の残照 -function c21636650.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,0x1e0) - e1:SetTarget(c21636650.sptg) - e1:SetOperation(c21636650.spop) - c:RegisterEffect(e1) -end -function c21636650.filter(c,e,tp,tid) - return c:GetTurnID()==tid and bit.band(c:GetReason(),REASON_BATTLE)~=0 - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c21636650.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local tid=Duel.GetTurnCount() - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c21636650.filter(chkc,e,tp,tid) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c21636650.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp,tid) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c21636650.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp,tid) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c21636650.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c21648584.lua b/script/c21648584.lua deleted file mode 100644 index 8c322973fc..0000000000 --- a/script/c21648584.lua +++ /dev/null @@ -1,55 +0,0 @@ ---RR-レディネス -function c21648584.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetOperation(c21648584.activate) - c:RegisterEffect(e1) - --no damage - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetRange(LOCATION_GRAVE) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetCondition(c21648584.damcon) - e2:SetCost(c21648584.damcost) - e2:SetOperation(c21648584.damop) - c:RegisterEffect(e2) -end -function c21648584.activate(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetTarget(c21648584.indtg) - e1:SetReset(RESET_PHASE+PHASE_END) - e1:SetValue(1) - Duel.RegisterEffect(e1,tp) -end -function c21648584.indtg(e,c) - return c:IsSetCard(0xba) -end -function c21648584.cfilter(c) - return c:IsSetCard(0xba) and c:IsType(TYPE_MONSTER) -end -function c21648584.damcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c21648584.cfilter,tp,LOCATION_GRAVE,0,1,nil) -end -function c21648584.damcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) -end -function c21648584.damop(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CHANGE_DAMAGE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetTargetRange(1,0) - e1:SetValue(0) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) - local e2=e1:Clone() - e2:SetCode(EFFECT_NO_EFFECT_DAMAGE) - e2:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e2,tp) -end diff --git a/script/c21672573.lua b/script/c21672573.lua deleted file mode 100644 index 247d7fbdd4..0000000000 --- a/script/c21672573.lua +++ /dev/null @@ -1,43 +0,0 @@ ---エンペラー・ストゥム -function c21672573.initial_effect(c) - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(21672573,0)) - e1:SetCategory(CATEGORY_TODECK) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetCondition(c21672573.tdcon1) - e1:SetTarget(c21672573.tdtg) - e1:SetOperation(c21672573.tdop) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_MSET) - e2:SetCondition(c21672573.tdcon2) - c:RegisterEffect(e2) -end -function c21672573.tdcon1(e,tp,eg,ep,ev,re,r,rp) - return eg:GetFirst()~=e:GetHandler() and ep==tp - and bit.band(eg:GetFirst():GetSummonType(),SUMMON_TYPE_ADVANCE)==SUMMON_TYPE_ADVANCE -end -function c21672573.tdcon2(e,tp,eg,ep,ev,re,r,rp) - return eg:GetFirst():GetMaterialCount()~=0 and ep==tp -end -function c21672573.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToDeck,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g1=Duel.SelectTarget(tp,Card.IsAbleToDeck,tp,LOCATION_GRAVE,0,1,1,nil) - if Duel.IsExistingTarget(Card.IsAbleToDeck,tp,0,LOCATION_GRAVE,1,nil) - and Duel.SelectYesNo(1-tp,aux.Stringid(21672573,1)) then - Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_TODECK) - local g2=Duel.SelectTarget(1-tp,Card.IsAbleToDeck,1-tp,LOCATION_GRAVE,0,1,1,nil) - g1:Merge(g2) - end - Duel.SetOperationInfo(0,CATEGORY_TODECK,g1,g1:GetCount(),0,0) -end -function c21672573.tdop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) or e:GetHandler():IsFacedown() then return end - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) - Duel.SendtoDeck(g,nil,0,REASON_EFFECT) -end diff --git a/script/c21698716.lua b/script/c21698716.lua deleted file mode 100644 index cbb7207510..0000000000 --- a/script/c21698716.lua +++ /dev/null @@ -1,53 +0,0 @@ ---宝玉獣 コバルト・イーグル -function c21698716.initial_effect(c) - --send replace - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_TO_GRAVE_REDIRECT_CB) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetCondition(c21698716.repcon) - e1:SetOperation(c21698716.repop) - c:RegisterEffect(e1) - --return deck - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(21698716,1)) - e2:SetCategory(CATEGORY_TODECK) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetTarget(c21698716.target) - e2:SetOperation(c21698716.operation) - c:RegisterEffect(e2) -end -function c21698716.repcon(e) - local c=e:GetHandler() - return c:IsFaceup() and c:IsLocation(LOCATION_MZONE) and c:IsReason(REASON_DESTROY) -end -function c21698716.repop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local e1=Effect.CreateEffect(c) - e1:SetCode(EFFECT_CHANGE_TYPE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fc0000) - e1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS) - c:RegisterEffect(e1) - Duel.RaiseEvent(c,47408488,e,0,tp,0,0) -end -function c21698716.filter(c) - return c:IsSetCard(0x1034) and c:IsAbleToDeck() and c:IsFaceup() -end -function c21698716.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsControler(tp) and c21698716.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c21698716.filter,tp,LOCATION_ONFIELD,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectTarget(tp,c21698716.filter,tp,LOCATION_ONFIELD,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0) -end -function c21698716.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - Duel.SendtoDeck(tc,nil,0,REASON_EFFECT) - end -end diff --git a/script/c21702241.lua b/script/c21702241.lua deleted file mode 100644 index 1968f2692a..0000000000 --- a/script/c21702241.lua +++ /dev/null @@ -1,60 +0,0 @@ ---反目の従者 -function c21702241.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c21702241.target) - e1:SetOperation(c21702241.operation) - c:RegisterEffect(e1) - --Equip limit - local e2=Effect.CreateEffect(c) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_EQUIP_LIMIT) - e2:SetValue(1) - c:RegisterEffect(e2) - --damage - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(21702241,0)) - e3:SetCategory(CATEGORY_DAMAGE) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e3:SetRange(LOCATION_SZONE) - e3:SetCode(EVENT_CONTROL_CHANGED) - e3:SetCondition(c21702241.damcon) - e3:SetTarget(c21702241.damtg) - e3:SetOperation(c21702241.damop) - c:RegisterEffect(e3) -end -function c21702241.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c21702241.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,e:GetHandler(),tc) - end -end -function c21702241.damcon(e,tp,eg,ep,ev,re,r,rp) - local tg=e:GetHandler():GetEquipTarget() - return tg and eg:IsContains(tg) -end -function c21702241.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsRelateToEffect(e) - and not e:GetHandler():IsStatus(STATUS_CHAINING) end - local ec=e:GetHandler():GetEquipTarget() - if not ec then return false end - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,ec:GetControler(),ec:GetBaseAttack()) -end -function c21702241.damop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) then return end - local ec=c:GetEquipTarget() - Duel.Damage(ec:GetControler(),ec:GetBaseAttack(),REASON_EFFECT) -end diff --git a/script/c21715135.lua b/script/c21715135.lua deleted file mode 100644 index be7ee73294..0000000000 --- a/script/c21715135.lua +++ /dev/null @@ -1,52 +0,0 @@ ---ガガガ学園の緊急連絡網 -function c21715135.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,21715135+EFFECT_COUNT_CODE_OATH) - e1:SetCondition(c21715135.condition) - e1:SetCost(c21715135.cost) - e1:SetTarget(c21715135.target) - e1:SetOperation(c21715135.activate) - c:RegisterEffect(e1) - Duel.AddCustomActivityCounter(21715135,ACTIVITY_SPSUMMON,c21715135.counterfilter) -end -function c21715135.counterfilter(c) - return c:GetSummonType()==SUMMON_TYPE_XYZ -end -function c21715135.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0 and Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 -end -function c21715135.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetCustomActivityCount(21715135,tp,ACTIVITY_SPSUMMON)==0 end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) - e1:SetTargetRange(1,0) - e1:SetLabelObject(e) - e1:SetTarget(c21715135.splimit) - Duel.RegisterEffect(e1,tp) -end -function c21715135.splimit(e,c,sump,sumtype,sumpos,targetp,se) - return sumtype~=SUMMON_TYPE_XYZ and e:GetLabelObject()~=se -end -function c21715135.filter(c,e,tp) - return c:IsSetCard(0x54) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c21715135.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c21715135.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c21715135.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c21715135.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c21767650.lua b/script/c21767650.lua deleted file mode 100644 index 75ca914180..0000000000 --- a/script/c21767650.lua +++ /dev/null @@ -1,38 +0,0 @@ ---水精鱗-アビスマンダー -function c21767650.initial_effect(c) - --lvup - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(21767650,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_GRAVE) - e1:SetCost(c21767650.lvcost) - e1:SetTarget(c21767650.lvtg) - e1:SetOperation(c21767650.lvop) - c:RegisterEffect(e1) -end -function c21767650.filter(c) - return c:IsFaceup() and c:IsSetCard(0x74) and not c:IsType(TYPE_XYZ) -end -function c21767650.lvcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) -end -function c21767650.lvtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c21767650.filter,tp,LOCATION_MZONE,0,1,nil) end - local opt=Duel.SelectOption(tp,aux.Stringid(21767650,1),aux.Stringid(21767650,2)) - e:SetLabel(opt) -end -function c21767650.lvop(e,tp,eg,ep,ev,re,r,rp) - local opt=e:GetLabel() - local g=Duel.GetMatchingGroup(c21767650.filter,tp,LOCATION_MZONE,0,nil) - local tc=g:GetFirst() - while tc do - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_LEVEL) - e1:SetValue(opt+1) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - tc=g:GetNext() - end -end diff --git a/script/c21768554.lua b/script/c21768554.lua deleted file mode 100644 index 1bdc4476d0..0000000000 --- a/script/c21768554.lua +++ /dev/null @@ -1,81 +0,0 @@ ---集団催眠 -function c21768554.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_CONTROL) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCondition(c21768554.condition) - e1:SetTarget(c21768554.target) - e1:SetOperation(c21768554.operation) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(21768554,0)) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_PHASE+PHASE_END) - e2:SetRange(LOCATION_SZONE) - e2:SetCountLimit(1) - e2:SetCondition(c21768554.descon) - e2:SetTarget(c21768554.destg) - e2:SetOperation(c21768554.desop) - c:RegisterEffect(e2) -end -function c21768554.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0xc) -end -function c21768554.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c21768554.cfilter,tp,LOCATION_MZONE,0,1,nil) -end -function c21768554.filter(c) - return c:GetCounter(0xe)>0 and c:IsControlerCanBeChanged() -end -function c21768554.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c21768554.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c21768554.filter,tp,0,LOCATION_MZONE,1,nil) end - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE,1-tp,LOCATION_REASON_CONTROL) - if ft>3 then ft=3 end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) - local g=Duel.SelectTarget(tp,c21768554.filter,tp,0,LOCATION_MZONE,1,ft,nil) - Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,g:GetCount(),0,0) -end -function c21768554.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) then return end - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - if g:GetCount()>Duel.GetLocationCount(tp,LOCATION_MZONE) then return end - local tc=g:GetFirst() - while tc do - if tc:IsFaceup() and tc:GetCounter(0xe)>0 and tc:IsRelateToEffect(e) then - c:SetCardTarget(tc) - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_CONTROL) - e1:SetValue(tp) - e1:SetReset(RESET_EVENT+0x1fc0000) - e1:SetCondition(c21768554.con) - tc:RegisterEffect(e1) - end - tc=g:GetNext() - end - c:RegisterFlagEffect(21768554,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) -end -function c21768554.con(e) - local c=e:GetOwner() - local h=e:GetHandler() - return c:IsHasCardTarget(h) and not c:IsDisabled() and h:GetCounter(0xe)>0 -end -function c21768554.descon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetFlagEffect(21768554)~=0 -end -function c21768554.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0) -end -function c21768554.desop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - Duel.Destroy(e:GetHandler(),REASON_EFFECT) - end -end diff --git a/script/c21770260.lua b/script/c21770260.lua deleted file mode 100644 index 77d76a7287..0000000000 --- a/script/c21770260.lua +++ /dev/null @@ -1,58 +0,0 @@ ---スライム増殖炉 -function c21770260.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --token - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(21770260,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) - e2:SetRange(LOCATION_SZONE) - e2:SetCountLimit(1) - e2:SetCondition(c21770260.spcon) - e2:SetTarget(c21770260.sptg) - e2:SetOperation(c21770260.spop) - c:RegisterEffect(e2) - --sum limit - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetRange(LOCATION_SZONE) - e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e3:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e3:SetTargetRange(1,0) - e3:SetTarget(c21770260.sumlimit) - c:RegisterEffect(e3) - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_FIELD) - e4:SetRange(LOCATION_SZONE) - e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e4:SetCode(EFFECT_CANNOT_SUMMON) - e4:SetTargetRange(1,0) - c:RegisterEffect(e4) - local e5=e4:Clone() - e5:SetCode(EFFECT_CANNOT_FLIP_SUMMON) - c:RegisterEffect(e5) -end -function c21770260.sumlimit(e,c,sump,sumtype,sumpos,targetp,se) - return c:GetCode()~=21770261 -end -function c21770260.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c21770260.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0) -end -function c21770260.spop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsPlayerCanSpecialSummonMonster(tp,21770261,0,0x4011,500,500,1,RACE_AQUA,ATTRIBUTE_WATER) then - local token=Duel.CreateToken(tp,21770261) - Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP_ATTACK) - end -end diff --git a/script/c21785144.lua b/script/c21785144.lua deleted file mode 100644 index 651cac3a19..0000000000 --- a/script/c21785144.lua +++ /dev/null @@ -1,53 +0,0 @@ ---ライトロード・ドラゴン グラゴニス -function c21785144.initial_effect(c) - --atk def - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(c21785144.value) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EFFECT_UPDATE_DEFENCE) - e2:SetValue(c21785144.value) - c:RegisterEffect(e2) - --pierce - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_PIERCE) - c:RegisterEffect(e3) - --discard deck - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e4:SetDescription(aux.Stringid(21785144,0)) - e4:SetCategory(CATEGORY_DECKDES) - e4:SetCode(EVENT_PHASE+PHASE_END) - e4:SetRange(LOCATION_MZONE) - e4:SetCountLimit(1) - e4:SetCondition(c21785144.discon) - e4:SetTarget(c21785144.distg) - e4:SetOperation(c21785144.disop) - c:RegisterEffect(e4) -end -function c21785144.filter(c) - return c:IsSetCard(0x38) and c:IsType(TYPE_MONSTER) -end -function c21785144.value(e,c) - local g=Duel.GetMatchingGroup(c21785144.filter,c:GetControler(),LOCATION_GRAVE,0,nil) - local ct=g:GetClassCount(Card.GetCode) - return ct*300 -end -function c21785144.discon(e,tp,eg,ep,ev,re,r,rp) - return tp==Duel.GetTurnPlayer() -end -function c21785144.distg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,3) -end -function c21785144.disop(e,tp,eg,ep,ev,re,r,rp) - Duel.DiscardDeck(tp,3,REASON_EFFECT) -end diff --git a/script/c21790410.lua b/script/c21790410.lua deleted file mode 100644 index c7d5d53181..0000000000 --- a/script/c21790410.lua +++ /dev/null @@ -1,82 +0,0 @@ ---甲虫装機 センチピード -function c21790410.initial_effect(c) - --equip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(21790410,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetTarget(c21790410.eqtg) - e1:SetOperation(c21790410.eqop) - c:RegisterEffect(e1) - --equip effect - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_UPDATE_LEVEL) - e2:SetValue(3) - c:RegisterEffect(e2) - --search - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(21790410,1)) - e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_LEAVE_FIELD) - e3:SetProperty(EFFECT_FLAG_DELAY) - e3:SetRange(LOCATION_MZONE) - e3:SetCondition(c21790410.shcon) - e3:SetTarget(c21790410.shtg) - e3:SetOperation(c21790410.shop) - c:RegisterEffect(e3) -end -function c21790410.filter(c) - return c:IsSetCard(0x56) and c:IsType(TYPE_MONSTER) and not c:IsHasEffect(EFFECT_NECRO_VALLEY) -end -function c21790410.eqtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingMatchingCard(c21790410.filter,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,nil,1,tp,LOCATION_GRAVE+LOCATION_HAND) -end -function c21790410.eqop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end - if c:IsFacedown() or not c:IsRelateToEffect(e) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local g=Duel.SelectMatchingCard(tp,c21790410.filter,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,1,nil) - local tc=g:GetFirst() - if tc then - if not Duel.Equip(tp,tc,c,true) then return end - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_COPY_INHERIT+EFFECT_FLAG_OWNER_RELATE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(c21790410.eqlimit) - tc:RegisterEffect(e1) - end -end -function c21790410.eqlimit(e,c) - return e:GetOwner()==c -end -function c21790410.cfilter(c,ec,tp) - return c:IsLocation(LOCATION_GRAVE) and c:IsControler(tp) and c:GetEquipTarget()==ec -end -function c21790410.shcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c21790410.cfilter,1,nil,e:GetHandler(),tp) -end -function c21790410.tgfilter(c) - return c:IsSetCard(0x56) and c:IsAbleToHand() -end -function c21790410.shtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsRelateToEffect(e) and e:GetHandler():IsFaceup() - and Duel.IsExistingMatchingCard(c21790410.tgfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c21790410.shop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c21790410.tgfilter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c21831848.lua b/script/c21831848.lua deleted file mode 100644 index f0ddb01f55..0000000000 --- a/script/c21831848.lua +++ /dev/null @@ -1,32 +0,0 @@ ---ガガガドロー -function c21831848.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c21831848.cost) - e1:SetTarget(c21831848.target) - e1:SetOperation(c21831848.activate) - c:RegisterEffect(e1) -end -function c21831848.filter(c) - return c:IsSetCard(0x54) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost() -end -function c21831848.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c21831848.filter,tp,LOCATION_GRAVE,0,3,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c21831848.filter,tp,LOCATION_GRAVE,0,3,3,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c21831848.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp,2) end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(2) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2) -end -function c21831848.activate(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end diff --git a/script/c21840375.lua b/script/c21840375.lua deleted file mode 100644 index cecb73721c..0000000000 --- a/script/c21840375.lua +++ /dev/null @@ -1,31 +0,0 @@ ---隠された魔導書 -function c21840375.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TODECK) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c21840375.condition) - e1:SetTarget(c21840375.target) - e1:SetOperation(c21840375.activate) - c:RegisterEffect(e1) -end -function c21840375.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c21840375.filter(c) - return c:IsType(TYPE_SPELL) and c:IsAbleToDeck() -end -function c21840375.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(1-tp) and c21840375.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c21840375.filter,tp,LOCATION_GRAVE,0,2,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectTarget(tp,c21840375.filter,tp,LOCATION_GRAVE,0,2,2,nil) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,2,0,0) -end -function c21840375.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local sg=g:Filter(Card.IsRelateToEffect,nil,e) - Duel.SendtoDeck(sg,nil,2,REASON_EFFECT) -end diff --git a/script/c21843307.lua b/script/c21843307.lua deleted file mode 100644 index 3bdc21a4c5..0000000000 --- a/script/c21843307.lua +++ /dev/null @@ -1,41 +0,0 @@ ---コピー・ナイト -function c21843307.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetCondition(c21843307.condition) - e1:SetTarget(c21843307.target) - e1:SetOperation(c21843307.activate) - c:RegisterEffect(e1) -end -function c21843307.condition(e,tp,eg,ep,ev,re,r,rp) - local ec=eg:GetFirst() - return ep==tp and ec:IsLevelBelow(4) and ec:IsRace(RACE_WARRIOR) -end -function c21843307.target(e,tp,eg,ep,ev,re,r,rp,chk) - local ec=eg:GetFirst() - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and - Duel.IsPlayerCanSpecialSummonMonster(tp,ec:GetCode(),0,0x11,0,0,ec:GetLevel(),RACE_WARRIOR,ATTRIBUTE_LIGHT) end - ec:CreateEffectRelation(e) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c21843307.activate(e,tp,eg,ep,ev,re,r,rp) - local ec=eg:GetFirst() - if not ec:IsRelateToEffect(e) then return end - local c=e:GetHandler() - if not c:IsRelateToEffect(e) then return end - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 - or not Duel.IsPlayerCanSpecialSummonMonster(tp,ec:GetCode(),0,0x11,0,0,ec:GetLevel(),RACE_WARRIOR,ATTRIBUTE_LIGHT) then return end - c:AddTrapMonsterAttribute(TYPE_NORMAL,ATTRIBUTE_LIGHT,RACE_WARRIOR,ec:GetLevel(),0,0) - Duel.SpecialSummonStep(c,0,tp,tp,true,false,POS_FACEUP) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CHANGE_CODE) - e1:SetValue(ec:GetCode()) - e1:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e1) - Duel.SpecialSummonComplete() - c:TrapMonsterBlock() -end diff --git a/script/c218704.lua b/script/c218704.lua deleted file mode 100644 index b1813ee5e3..0000000000 --- a/script/c218704.lua +++ /dev/null @@ -1,44 +0,0 @@ ---フェンリル -function c218704.initial_effect(c) - c:EnableReviveLimit() - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c218704.spcon) - e1:SetOperation(c218704.spop) - c:RegisterEffect(e1) - --skip draw - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(218704,0)) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_BATTLE_DESTROYING) - e2:SetCondition(aux.bdocon) - e2:SetOperation(c218704.skipop) - c:RegisterEffect(e2) -end -function c218704.spfilter(c) - return c:IsAttribute(ATTRIBUTE_WATER) and c:IsAbleToRemoveAsCost() -end -function c218704.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c218704.spfilter,tp,LOCATION_GRAVE,0,2,nil) -end -function c218704.spop(e,tp,eg,ep,ev,re,r,rp,c) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c218704.spfilter,tp,LOCATION_GRAVE,0,2,2,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c218704.skipop(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetTargetRange(0,1) - e1:SetCode(EFFECT_SKIP_DP) - e1:SetReset(RESET_PHASE+PHASE_DRAW+RESET_OPPO_TURN) - Duel.RegisterEffect(e1,tp) -end diff --git a/script/c21879581.lua b/script/c21879581.lua deleted file mode 100644 index 2042ffc82b..0000000000 --- a/script/c21879581.lua +++ /dev/null @@ -1,29 +0,0 @@ ---シンクロ・バリアー -function c21879581.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c21879581.cost) - e1:SetOperation(c21879581.activate) - c:RegisterEffect(e1) -end -function c21879581.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsType,1,nil,TYPE_SYNCHRO) end - local g=Duel.SelectReleaseGroup(tp,Card.IsType,1,1,nil,TYPE_SYNCHRO) - Duel.Release(g,REASON_COST) -end -function c21879581.activate(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CHANGE_DAMAGE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetTargetRange(1,0) - e1:SetValue(0) - e1:SetReset(RESET_PHASE+PHASE_END,2) - Duel.RegisterEffect(e1,tp) - local e2=e1:Clone() - e2:SetCode(EFFECT_NO_EFFECT_DAMAGE) - e2:SetReset(RESET_PHASE+PHASE_END,2) - Duel.RegisterEffect(e2,tp) -end diff --git a/script/c21887179.lua b/script/c21887179.lua deleted file mode 100644 index dcd265a1e5..0000000000 --- a/script/c21887179.lua +++ /dev/null @@ -1,28 +0,0 @@ ---月風魔 -function c21887179.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(21887179,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_DAMAGE_STEP_END) - e1:SetCondition(c21887179.descon) - e1:SetTarget(c21887179.destg) - e1:SetOperation(c21887179.desop) - c:RegisterEffect(e1) -end -function c21887179.descon(e,tp,eg,ep,ev,re,r,rp) - local t=e:GetHandler():GetBattleTarget() - e:SetLabelObject(t) - return t and t:IsRace(RACE_FIEND+RACE_ZOMBIE) and t:IsRelateToBattle() -end -function c21887179.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetLabelObject(),1,0,0) -end -function c21887179.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetLabelObject() - if tc:IsRelateToBattle() then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c21888494.lua b/script/c21888494.lua deleted file mode 100644 index 022aeb4fd8..0000000000 --- a/script/c21888494.lua +++ /dev/null @@ -1,41 +0,0 @@ ---選ばれし者 -function c21888494.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c21888494.target) - e1:SetOperation(c21888494.activate) - c:RegisterEffect(e1) -end -function c21888494.spfilter(c,e,tp) - return c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c21888494.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_HAND,0,2,e:GetHandler(),TYPE_SPELL+TYPE_TRAP) - and Duel.IsExistingMatchingCard(c21888494.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end -end -function c21888494.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local g1=Duel.GetMatchingGroup(c21888494.spfilter,tp,LOCATION_HAND,0,nil,e,tp) - local g2=Duel.GetMatchingGroup(Card.IsType,tp,LOCATION_HAND,0,nil,TYPE_SPELL+TYPE_TRAP) - if g1:GetCount()==0 or g2:GetCount()<2 then return end - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(21888494,0)) - local sg1=g1:Select(tp,1,1,nil) - local sc=sg1:GetFirst() - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(21888494,1)) - local sg2=g2:Select(tp,2,2,nil) - sg1:Merge(sg2) - Duel.ConfirmCards(1-tp,sg1) - Duel.ShuffleHand(tp) - local rg=sg1:Select(1-tp,1,1,nil) - local tc=rg:GetFirst() - if tc:IsCanBeSpecialSummoned(e,0,tp,false,false) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - Duel.SendtoGrave(sg2,REASON_EFFECT) - else - Duel.SendtoGrave(sg1,REASON_EFFECT) - end -end diff --git a/script/c21900719.lua b/script/c21900719.lua deleted file mode 100644 index dd77b65624..0000000000 --- a/script/c21900719.lua +++ /dev/null @@ -1,49 +0,0 @@ ---閃光の双剣-トライス -function c21900719.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCost(c21900719.cost) - e1:SetTarget(c21900719.target) - e1:SetOperation(c21900719.operation) - c:RegisterEffect(e1) - --Atk down - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(-500) - c:RegisterEffect(e2) - --Double Attack - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_EQUIP) - e3:SetCode(EFFECT_EXTRA_ATTACK) - e3:SetValue(1) - c:RegisterEffect(e3) - --Equip limit - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetCode(EFFECT_EQUIP_LIMIT) - e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e4:SetValue(1) - c:RegisterEffect(e4) -end -function c21900719.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,Card.IsAbleToGraveAsCost,1,1,REASON_COST) -end -function c21900719.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c21900719.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,e:GetHandler(),tc) - end -end diff --git a/script/c21908319.lua b/script/c21908319.lua deleted file mode 100644 index 8ffbb35374..0000000000 --- a/script/c21908319.lua +++ /dev/null @@ -1,26 +0,0 @@ ---コザッキーの自爆装置 -function c21908319.initial_effect(c) - --damage - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(21908319,0)) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_DESTROYED) - e1:SetCondition(c21908319.damcon) - e1:SetTarget(c21908319.damtg) - e1:SetOperation(c21908319.damop) - c:RegisterEffect(e1) -end -function c21908319.damcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_SZONE) and e:GetHandler():IsPreviousPosition(POS_FACEDOWN) -end -function c21908319.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(rp) - Duel.SetTargetParam(1000) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,rp,1000) -end -function c21908319.damop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c2191144.lua b/script/c2191144.lua deleted file mode 100644 index ccd833512a..0000000000 --- a/script/c2191144.lua +++ /dev/null @@ -1,38 +0,0 @@ ---ナイト・バタフライ・アサシン -function c2191144.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,4,3) - c:EnableReviveLimit() - --atkup - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(2191144,0)) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCost(c2191144.atkcost) - e1:SetTarget(c2191144.atktg) - e1:SetOperation(c2191144.atkop) - c:RegisterEffect(e1) -end -function c2191144.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c2191144.atktg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetOverlayCount(tp,1,1)>1 end -end -function c2191144.atkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFaceup() and c:IsRelateToEffect(e) then - local ct=Duel.GetOverlayCount(tp,1,1) - if ct>0 then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(ct*300) - e1:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e1) - end - end -end diff --git a/script/c21924381.lua b/script/c21924381.lua deleted file mode 100644 index 6f08468d5a..0000000000 --- a/script/c21924381.lua +++ /dev/null @@ -1,48 +0,0 @@ ---ヒロイック・アドバンス -function c21924381.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_BE_BATTLE_TARGET) - e1:SetCondition(c21924381.condition) - e1:SetTarget(c21924381.target) - e1:SetOperation(c21924381.activate) - c:RegisterEffect(e1) -end -function c21924381.condition(e,tp,eg,ep,ev,re,r,rp) - local d=Duel.GetAttackTarget() - return d:IsFaceup() and d:IsControler(tp) and d:IsSetCard(0x6f) -end -function c21924381.filter(c) - return c:IsFaceup() and c:IsLevelBelow(4) and c:IsSetCard(0x6f) -end -function c21924381.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c21924381.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c21924381.filter,tp,LOCATION_MZONE,0,1,Duel.GetAttackTarget()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - Duel.SelectTarget(tp,c21924381.filter,tp,LOCATION_MZONE,0,1,1,Duel.GetAttackTarget()) - Duel.GetAttacker():CreateEffectRelation(e) -end -function c21924381.activate(e,tp,eg,ep,ev,re,r,rp) - local a=Duel.GetAttacker() - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) - and a:IsAttackable() and a:IsRelateToEffect(e) and not a:IsImmuneToEffect(e)then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetValue(tc:GetAttack()*2) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_BATTLE) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e2:SetValue(1) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_DAMAGE) - tc:RegisterEffect(e2) - local e3=e2:Clone() - a:RegisterEffect(e3) - Duel.CalculateDamage(a,tc) - end -end diff --git a/script/c21947653.lua b/script/c21947653.lua deleted file mode 100644 index 99f8e8c7bb..0000000000 --- a/script/c21947653.lua +++ /dev/null @@ -1,40 +0,0 @@ ---E-HERO ライトニング・ゴーレム -function c21947653.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcCode2(c,20721928,84327329,true,true) - --spsummon condition - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(c21947653.splimit) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(21947653,0)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetCountLimit(1) - e2:SetRange(LOCATION_MZONE) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetTarget(c21947653.target) - e2:SetOperation(c21947653.operation) - c:RegisterEffect(e2) -end -function c21947653.splimit(e,se,sp,st) - return st==SUMMON_TYPE_FUSION+0x10 -end -function c21947653.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsDestructable() end - if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c21947653.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/script/c21954587.lua b/script/c21954587.lua deleted file mode 100644 index 809605680a..0000000000 --- a/script/c21954587.lua +++ /dev/null @@ -1,96 +0,0 @@ ---水精鱗-メガロアビス -function c21954587.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(21954587,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND) - e1:SetCost(c21954587.spcost) - e1:SetTarget(c21954587.sptg) - e1:SetOperation(c21954587.spop) - c:RegisterEffect(e1) - --search - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(21954587,1)) - e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetCondition(c21954587.thcon) - e2:SetTarget(c21954587.thtg) - e2:SetOperation(c21954587.thop) - c:RegisterEffect(e2) - --multiatk - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(21954587,2)) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_MZONE) - e3:SetCondition(c21954587.atkcon) - e3:SetCost(c21954587.atkcost) - e3:SetTarget(c21954587.atktg) - e3:SetOperation(c21954587.atkop) - c:RegisterEffect(e3) -end -function c21954587.cfilter(c) - return c:IsAttribute(ATTRIBUTE_WATER) and c:IsDiscardable() and c:IsAbleToGraveAsCost() -end -function c21954587.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c21954587.cfilter,tp,LOCATION_HAND,0,2,e:GetHandler()) end - Duel.DiscardHand(tp,c21954587.cfilter,2,2,REASON_COST+REASON_DISCARD,e:GetHandler()) -end -function c21954587.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c21954587.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,1,tp,tp,false,false,POS_FACEUP) - end -end -function c21954587.thcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+1 -end -function c21954587.thfilter(c) - return c:IsSetCard(0x75) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand() -end -function c21954587.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c21954587.thfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c21954587.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c21954587.thfilter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end -function c21954587.atkcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsAbleToEnterBP() -end -function c21954587.rfilter(c) - return c:IsPosition(POS_FACEUP_ATTACK) and c:IsAttribute(ATTRIBUTE_WATER) -end -function c21954587.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,c21954587.rfilter,1,e:GetHandler()) end - local g=Duel.SelectReleaseGroup(tp,c21954587.rfilter,1,1,e:GetHandler()) - Duel.Release(g,REASON_COST) -end -function c21954587.atktg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():GetEffectCount(EFFECT_EXTRA_ATTACK)==0 end -end -function c21954587.atkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_EXTRA_ATTACK) - e1:SetValue(1) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - c:RegisterEffect(e1) - end -end diff --git a/script/c2196767.lua b/script/c2196767.lua deleted file mode 100644 index 088fbd8924..0000000000 --- a/script/c2196767.lua +++ /dev/null @@ -1,34 +0,0 @@ ---伝説の賭博師 -function c2196767.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(2196767,0)) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_HANDES+CATEGORY_COIN) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetTarget(c2196767.destg) - e1:SetOperation(c2196767.desop) - c:RegisterEffect(e1) -end -function c2196767.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_COIN,nil,0,tp,3) -end -function c2196767.desop(e,tp,eg,ep,ev,re,r,rp) - local c1,c2,c3=Duel.TossCoin(tp,3) - if c1+c2+c3==3 then - local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,0,LOCATION_MZONE,nil) - Duel.Destroy(g,REASON_EFFECT) - elseif c1+c2+c3==2 then - local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND):RandomSelect(tp,1) - Duel.SendtoGrave(g,REASON_EFFECT+REASON_DISCARD) - elseif c1+c2+c3==1 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectMatchingCard(tp,Card.IsDestructable,tp,LOCATION_ONFIELD,0,1,1,nil) - Duel.Destroy(g,REASON_EFFECT) - else - local g=Duel.GetFieldGroup(tp,LOCATION_HAND,0) - Duel.SendtoGrave(g,REASON_EFFECT+REASON_DISCARD) - end -end diff --git a/script/c21970285.lua b/script/c21970285.lua deleted file mode 100644 index 41fea0dc54..0000000000 --- a/script/c21970285.lua +++ /dev/null @@ -1,32 +0,0 @@ ---竜角の狩猟者 -function c21970285.initial_effect(c) - --pendulum summon - aux.AddPendulumProcedure(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --atk - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetRange(LOCATION_PZONE) - e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e2:SetTarget(c21970285.efilter) - e2:SetValue(200) - c:RegisterEffect(e2) - --avoid battle damage - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetCode(EFFECT_AVOID_BATTLE_DAMAGE) - e3:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e3:SetRange(LOCATION_PZONE) - e3:SetTargetRange(LOCATION_MZONE,0) - e3:SetTarget(c21970285.efilter) - e3:SetValue(1) - c:RegisterEffect(e3) -end -function c21970285.efilter(e,c) - return c:IsType(TYPE_NORMAL) -end diff --git a/script/c21977828.lua b/script/c21977828.lua deleted file mode 100644 index 9a7c9fad8d..0000000000 --- a/script/c21977828.lua +++ /dev/null @@ -1,82 +0,0 @@ ---甲虫装機 ギガウィービル -function c21977828.initial_effect(c) - --equip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(21977828,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetRange(LOCATION_HAND) - e1:SetTarget(c21977828.eqtg) - e1:SetOperation(c21977828.eqop) - c:RegisterEffect(e1) - --equip effect - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_SET_BASE_DEFENCE) - e2:SetValue(2600) - c:RegisterEffect(e2) - --special summon - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(21977828,1)) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) - e3:SetCode(EVENT_TO_GRAVE) - e3:SetCountLimit(1,21977828) - e3:SetCondition(c21977828.spcon) - e3:SetTarget(c21977828.sptg) - e3:SetOperation(c21977828.spop) - c:RegisterEffect(e3) -end -function c21977828.filter(c) - return c:IsFaceup() and c:IsSetCard(0x56) -end -function c21977828.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c21977828.filter(chkc) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingTarget(c21977828.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c21977828.filter,tp,LOCATION_MZONE,0,1,1,nil) -end -function c21977828.eqop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) then return end - local tc=Duel.GetFirstTarget() - if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or tc:IsFacedown() or not tc:IsRelateToEffect(e) or not tc:IsControler(tp) then - Duel.SendtoGrave(c,REASON_EFFECT) - return - end - Duel.Equip(tp,c,tc,true) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(c21977828.eqlimit) - e1:SetLabelObject(tc) - c:RegisterEffect(e1) -end -function c21977828.eqlimit(e,c) - return c==e:GetLabelObject() -end -function c21977828.spcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:GetPreviousLocation()==LOCATION_SZONE and not c:IsReason(REASON_LOST_TARGET) -end -function c21977828.spfilter(c,e,tp) - return c:IsSetCard(0x56) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c21977828.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c21977828.spfilter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c21977828.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c21977828.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c21977828.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c22009013.lua b/script/c22009013.lua deleted file mode 100644 index ddaa930bca..0000000000 --- a/script/c22009013.lua +++ /dev/null @@ -1,48 +0,0 @@ ---インヴェルズ・モース -function c22009013.initial_effect(c) - --summon success - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(22009013,0)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetCondition(c22009013.condition) - e1:SetCost(c22009013.cost) - e1:SetTarget(c22009013.target) - e1:SetOperation(c22009013.operation) - c:RegisterEffect(e1) - --tribute check - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_MATERIAL_CHECK) - e2:SetValue(c22009013.valcheck) - e2:SetLabelObject(e1) - c:RegisterEffect(e2) -end -function c22009013.valcheck(e,c) - local g=c:GetMaterial() - if g:IsExists(Card.IsSetCard,1,nil,0x100a) then - e:GetLabelObject():SetLabel(1) - else - e:GetLabelObject():SetLabel(0) - end -end -function c22009013.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_ADVANCE and e:GetLabel()==1 -end -function c22009013.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,1000) end - Duel.PayLPCost(tp,1000) -end -function c22009013.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and chkc:IsAbleToHand() end - if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g=Duel.SelectTarget(tp,Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,1,2,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0) -end -function c22009013.operation(e,tp,eg,ep,ev,re,r,rp) - local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) - Duel.SendtoHand(tg,nil,REASON_EFFECT) -end diff --git a/script/c22020907.lua b/script/c22020907.lua deleted file mode 100644 index d975b2d37f..0000000000 --- a/script/c22020907.lua +++ /dev/null @@ -1,34 +0,0 @@ ---ヒーロー・シグナル -function c22020907.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetCondition(c22020907.condition) - e1:SetTarget(c22020907.target) - e1:SetOperation(c22020907.operation) - c:RegisterEffect(e1) -end -function c22020907.cfilter(c,tp) - return c:IsReason(REASON_BATTLE) and c:IsLocation(LOCATION_GRAVE) and c:GetPreviousControler()==tp -end -function c22020907.condition(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c22020907.cfilter,1,nil,tp) -end -function c22020907.spfilter(c,e,tp) - return c:IsLevelBelow(4) and c:IsSetCard(0x3008) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c22020907.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c22020907.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) -end -function c22020907.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c22020907.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()~=0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c2203790.lua b/script/c2203790.lua deleted file mode 100644 index d515de15e7..0000000000 --- a/script/c2203790.lua +++ /dev/null @@ -1,35 +0,0 @@ ---XX-セイバー ヒュンレイ -function c2203790.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,nil,aux.NonTuner(Card.IsSetCard,0x100d),1) - c:EnableReviveLimit() - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(2203790,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(c2203790.descon) - e1:SetTarget(c2203790.destg) - e1:SetOperation(c2203790.desop) - c:RegisterEffect(e1) -end -function c2203790.descon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_SYNCHRO -end -function c2203790.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable() -end -function c2203790.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and c2203790.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c2203790.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c2203790.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,3,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c2203790.desop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local sg=g:Filter(Card.IsRelateToEffect,nil,e) - Duel.Destroy(sg,REASON_EFFECT) -end diff --git a/script/c2204140.lua b/script/c2204140.lua deleted file mode 100644 index 361a750f35..0000000000 --- a/script/c2204140.lua +++ /dev/null @@ -1,40 +0,0 @@ ---生者の書-禁断の呪術- -function c2204140.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_REMOVE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c2204140.target) - e1:SetOperation(c2204140.activate) - c:RegisterEffect(e1) -end -function c2204140.spfilter(c,e,tp) - return c:IsRace(RACE_ZOMBIE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c2204140.rmfilter(c) - return c:IsType(TYPE_MONSTER) and c:IsAbleToRemove() -end -function c2204140.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c2204140.rmfilter,tp,0,LOCATION_GRAVE,1,nil) - and Duel.IsExistingTarget(c2204140.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g1=Duel.SelectTarget(tp,c2204140.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g1,1,0,0) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g2=Duel.SelectTarget(tp,c2204140.rmfilter,tp,0,LOCATION_GRAVE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g2,1,0,0) -end -function c2204140.activate(e,tp,eg,ep,ev,re,r,rp) - local ex1,tg1=Duel.GetOperationInfo(0,CATEGORY_SPECIAL_SUMMON) - local ex2,tg2=Duel.GetOperationInfo(0,CATEGORY_REMOVE) - if tg1:GetFirst():IsRelateToEffect(e) and tg1:GetFirst():IsRace(RACE_ZOMBIE) then - Duel.SpecialSummon(tg1,0,tp,tp,false,false,POS_FACEUP) - end - if tg2:GetFirst():IsRelateToEffect(e) then - Duel.Remove(tg2,POS_FACEUP,REASON_EFFECT) - end -end diff --git a/script/c22046459.lua b/script/c22046459.lua deleted file mode 100644 index 96404f3f46..0000000000 --- a/script/c22046459.lua +++ /dev/null @@ -1,50 +0,0 @@ ---巨大化 -function c22046459.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c22046459.target) - e1:SetOperation(c22046459.operation) - c:RegisterEffect(e1) - --Atk Change - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_SET_ATTACK) - e2:SetCondition(c22046459.condition) - e2:SetValue(c22046459.value) - c:RegisterEffect(e2) - --Equip limit - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_EQUIP_LIMIT) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e3:SetValue(1) - c:RegisterEffect(e3) -end -function c22046459.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c22046459.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,e:GetHandler(),tc) - end -end -function c22046459.condition(e) - return Duel.GetLP(0)~=Duel.GetLP(1) -end -function c22046459.value(e,c) - local p=e:GetHandler():GetControler() - if Duel.GetLP(p)Duel.GetLP(1-p) then - return c:GetBaseAttack()/2 - end -end diff --git a/script/c22047978.lua b/script/c22047978.lua deleted file mode 100644 index fca2f55287..0000000000 --- a/script/c22047978.lua +++ /dev/null @@ -1,45 +0,0 @@ ---バトル・ブレイク -function c22047978.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetCondition(c22047978.condition) - e1:SetTarget(c22047978.target) - e1:SetOperation(c22047978.activate) - c:RegisterEffect(e1) -end -function c22047978.condition(e,tp,eg,ep,ev,re,r,rp) - return tp~=Duel.GetTurnPlayer() -end -function c22047978.target(e,tp,eg,ep,ev,re,r,rp,chk) - local tg=Duel.GetAttacker() - if chk==0 then return tg:IsOnField() and tg:IsDestructable() end - Duel.SetTargetCard(tg) - if Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)==0 then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,tg,1,0,0) - end -end -function c22047978.cfilter(c) - return c:IsType(TYPE_MONSTER) and not c:IsPublic() -end -function c22047978.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsAttackable() and not tc:IsStatus(STATUS_ATTACK_CANCELED) then - local g=Duel.GetMatchingGroup(c22047978.cfilter,1-tp,LOCATION_HAND,0,nil) - if g:GetCount()>0 and Duel.SelectYesNo(1-tp,aux.Stringid(22047978,0)) then - Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_CONFIRM) - local cg=g:Select(1-tp,1,1,nil) - Duel.ConfirmCards(tp,cg) - Duel.ShuffleHand(1-tp) - if Duel.IsChainDisablable(0) then - Duel.NegateEffect(0) - return - end - end - if Duel.Destroy(tc,REASON_EFFECT)>0 then - Duel.SkipPhase(1-tp,PHASE_BATTLE,RESET_PHASE+PHASE_BATTLE,1) - end - end -end diff --git a/script/c22056710.lua b/script/c22056710.lua deleted file mode 100644 index 38bc95f70b..0000000000 --- a/script/c22056710.lua +++ /dev/null @@ -1,66 +0,0 @@ ---ヴァンパイアジェネシス -function c22056710.initial_effect(c) - c:EnableReviveLimit() - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - c:RegisterEffect(e1) - --spsummon proc - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_SPSUMMON_PROC) - e2:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e2:SetRange(LOCATION_HAND) - e2:SetCondition(c22056710.hspcon) - e2:SetOperation(c22056710.hspop) - c:RegisterEffect(e2) - --spsummon - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(22056710,0)) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetCountLimit(1) - e3:SetRange(LOCATION_MZONE) - e3:SetTarget(c22056710.sptg) - e3:SetOperation(c22056710.spop) - c:RegisterEffect(e3) -end -function c22056710.hspfilter(c) - return c:IsFaceup() and c:IsCode(53839837) and c:IsAbleToRemoveAsCost() -end -function c22056710.hspcon(e,c) - if c==nil then return true end - return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-1 - and Duel.IsExistingMatchingCard(c22056710.hspfilter,c:GetControler(),LOCATION_MZONE,0,1,nil) -end -function c22056710.hspop(e,tp,eg,ep,ev,re,r,rp,c) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c22056710.hspfilter,c:GetControler(),LOCATION_MZONE,0,1,1,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c22056710.cfilter(c,e,tp) - return c:IsRace(RACE_ZOMBIE) and c:IsDiscardable() - and Duel.IsExistingTarget(c22056710.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp,c:GetOriginalLevel()) -end -function c22056710.spfilter(c,e,tp,lv) - local clv=c:GetLevel() - return clv>0 and clv0 - and Duel.IsExistingMatchingCard(c22056710.cfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) - local g1=Duel.SelectMatchingCard(tp,c22056710.cfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - Duel.SendtoGrave(g1,REASON_COST+REASON_DISCARD) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g2=Duel.SelectTarget(tp,c22056710.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp,g1:GetFirst():GetOriginalLevel()) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g2,1,0,0) -end -function c22056710.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c22061412.lua b/script/c22061412.lua deleted file mode 100644 index fe48ee28ca..0000000000 --- a/script/c22061412.lua +++ /dev/null @@ -1,56 +0,0 @@ ---E・HERO The シャイニング -function c22061412.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcFun2(c,aux.FilterBoolFunction(Card.IsSetCard,0x3008),aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_LIGHT),true) - --tohand - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(22061412,0)) - e2:SetCategory(CATEGORY_TOHAND) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetCondition(c22061412.thcon) - e2:SetTarget(c22061412.thtg) - e2:SetOperation(c22061412.thop) - c:RegisterEffect(e2) - --atkup - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e3:SetRange(LOCATION_MZONE) - e3:SetCode(EFFECT_UPDATE_ATTACK) - e3:SetValue(c22061412.atkup) - c:RegisterEffect(e3) - --spsummon condition - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e4:SetCode(EFFECT_SPSUMMON_CONDITION) - e4:SetValue(aux.fuslimit) - c:RegisterEffect(e4) -end -function c22061412.atkfilter(c) - return c:IsFaceup() and c:IsSetCard(0x3008) -end -function c22061412.atkup(e,c) - return Duel.GetMatchingGroupCount(c22061412.atkfilter,c:GetControler(),LOCATION_REMOVED,0,nil)*300 -end -function c22061412.thcon(e,tp,eg,ep,ev,re,r,rp) - return bit.band(e:GetHandler():GetPreviousLocation(),LOCATION_ONFIELD)>0 -end -function c22061412.filter(c) - return c:IsFaceup() and c:IsSetCard(0x3008) and c:IsAbleToHand() -end -function c22061412.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:GetControler()==tp and chkc:IsLocation(LOCATION_REMOVED) and c22061412.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c22061412.filter,tp,LOCATION_REMOVED,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c22061412.filter,tp,LOCATION_REMOVED,0,1,2,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0) -end -function c22061412.thop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local sg=g:Filter(Card.IsRelateToEffect,nil,e) - Duel.SendtoHand(sg,nil,REASON_EFFECT) -end diff --git a/script/c22076135.lua b/script/c22076135.lua deleted file mode 100644 index aabbb2ff5c..0000000000 --- a/script/c22076135.lua +++ /dev/null @@ -1,42 +0,0 @@ ---水精鱗-アビスタージ -function c22076135.initial_effect(c) - --salvage - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(22076135,0)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetCountLimit(1,22076135) - e1:SetCost(c22076135.thcost) - e1:SetTarget(c22076135.thtg) - e1:SetOperation(c22076135.thop) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e2) -end -function c22076135.cfilter(c) - return c:IsAttribute(ATTRIBUTE_WATER) and c:IsDiscardable() and c:IsAbleToGraveAsCost() -end -function c22076135.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c22076135.cfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,c22076135.cfilter,1,1,REASON_COST+REASON_DISCARD) -end -function c22076135.filter(c) - return c:IsLevelBelow(3) and c:IsAttribute(ATTRIBUTE_WATER) and c:IsAbleToHand() -end -function c22076135.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c22076135.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c22076135.filter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c22076135.filter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c22076135.thop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end diff --git a/script/c22082163.lua b/script/c22082163.lua deleted file mode 100644 index 6baaa23060..0000000000 --- a/script/c22082163.lua +++ /dev/null @@ -1,87 +0,0 @@ ---アマゾネスの意地 -function c22082163.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_END_PHASE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c22082163.target) - e1:SetOperation(c22082163.operation) - c:RegisterEffect(e1) - --Destroy - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE) - e2:SetCode(EVENT_LEAVE_FIELD) - e2:SetOperation(c22082163.desop) - c:RegisterEffect(e2) - --Destroy2 - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e3:SetRange(LOCATION_SZONE) - e3:SetCode(EVENT_LEAVE_FIELD) - e3:SetCondition(c22082163.descon2) - e3:SetOperation(c22082163.desop2) - c:RegisterEffect(e3) - --cannot bp - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_FIELD) - e4:SetCode(EFFECT_CANNOT_EP) - e4:SetRange(LOCATION_SZONE) - e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e4:SetTargetRange(1,0) - e4:SetCondition(c22082163.becon) - c:RegisterEffect(e4) -end -function c22082163.filter(c,e,tp) - return c:IsSetCard(0x4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c22082163.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:GetControler()==tp and c22082163.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c22082163.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c22082163.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c22082163.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then - if Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_ATTACK)==0 then return end - c:SetCardTarget(tc) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_CHANGE_POSITION) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetCondition(c22082163.cpcon) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_MUST_ATTACK) - e2:SetReset(RESET_EVENT+0x1fe0000) - e2:SetCondition(c22082163.cpcon) - tc:RegisterEffect(e2) - end -end -function c22082163.cpcon(e) - return e:GetOwner():IsHasCardTarget(e:GetHandler()) -end -function c22082163.becon(e) - local tc=e:GetHandler():GetFirstCardTarget() - return tc and tc:IsAttackable() -end -function c22082163.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetHandler():GetFirstCardTarget() - if tc and tc:IsLocation(LOCATION_MZONE) then - Duel.Destroy(tc,REASON_EFFECT) - end -end -function c22082163.descon2(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetHandler():GetFirstCardTarget() - return tc and eg:IsContains(tc) and tc:IsReason(REASON_DESTROY) -end -function c22082163.desop2(e,tp,eg,ep,ev,re,r,rp) - Duel.Destroy(e:GetHandler(),REASON_EFFECT) -end diff --git a/script/c22091345.lua b/script/c22091345.lua deleted file mode 100644 index f97b12dab3..0000000000 --- a/script/c22091345.lua +++ /dev/null @@ -1,36 +0,0 @@ ---EMスパイク・イーグル -function c22091345.initial_effect(c) - --pierce - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(22091345,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCountLimit(1) - e1:SetCondition(c22091345.condition) - e1:SetTarget(c22091345.target) - e1:SetOperation(c22091345.operation) - c:RegisterEffect(e1) -end -function c22091345.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsAbleToEnterBP() -end -function c22091345.filter(c) - return c:IsFaceup() and not c:IsHasEffect(EFFECT_PIERCE) -end -function c22091345.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(c22091345.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c22091345.filter,tp,LOCATION_MZONE,0,1,1,nil) -end -function c22091345.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_PIERCE) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - tc:RegisterEffect(e1) - end -end diff --git a/script/c22093873.lua b/script/c22093873.lua deleted file mode 100644 index 0aa62fc457..0000000000 --- a/script/c22093873.lua +++ /dev/null @@ -1,67 +0,0 @@ ---M・HERO カミカゼ -function c22093873.initial_effect(c) - c:EnableReviveLimit() - --spsummon condition - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - c:RegisterEffect(e1) - --battle indestructable - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e2:SetValue(1) - c:RegisterEffect(e2) - --cannot attack - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE) - e3:SetRange(LOCATION_MZONE) - e3:SetTargetRange(0,LOCATION_MZONE) - e3:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e3:SetCondition(c22093873.atkcon) - e3:SetTarget(c22093873.atktg) - c:RegisterEffect(e3) - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e4:SetCode(EVENT_ATTACK_ANNOUNCE) - e4:SetRange(LOCATION_MZONE) - e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e4:SetOperation(c22093873.checkop) - e4:SetLabelObject(e3) - c:RegisterEffect(e4) - --draw - local e5=Effect.CreateEffect(c) - e5:SetDescription(aux.Stringid(22093873,0)) - e5:SetCategory(CATEGORY_DRAW) - e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e5:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e5:SetCode(EVENT_BATTLE_DESTROYING) - e5:SetCondition(aux.bdogcon) - e5:SetTarget(c22093873.drtg) - e5:SetOperation(c22093873.drop) - c:RegisterEffect(e5) -end -function c22093873.atkcon(e) - return e:GetHandler():GetFlagEffect(22093873)~=0 -end -function c22093873.atktg(e,c) - return c:GetFieldID()~=e:GetLabel() -end -function c22093873.checkop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():GetFlagEffect(22093873)~=0 then return end - local fid=eg:GetFirst():GetFieldID() - e:GetHandler():RegisterFlagEffect(22093873,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) - e:GetLabelObject():SetLabel(fid) -end -function c22093873.drtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(1) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c22093873.drop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end diff --git a/script/c22110647.lua b/script/c22110647.lua deleted file mode 100644 index ee07591092..0000000000 --- a/script/c22110647.lua +++ /dev/null @@ -1,93 +0,0 @@ ---幻獣機ドラゴサック -function c22110647.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,7,2) - c:EnableReviveLimit() - -- - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e2:SetCondition(c22110647.indcon) - e2:SetValue(1) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - c:RegisterEffect(e3) - --token - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(22110647,0)) - e4:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN) - e4:SetType(EFFECT_TYPE_IGNITION) - e4:SetRange(LOCATION_MZONE) - e4:SetCountLimit(1) - e4:SetCost(c22110647.spcost) - e4:SetTarget(c22110647.sptg) - e4:SetOperation(c22110647.spop) - c:RegisterEffect(e4) - --destroy - local e5=Effect.CreateEffect(c) - e5:SetDescription(aux.Stringid(22110647,1)) - e5:SetCategory(CATEGORY_DESTROY) - e5:SetType(EFFECT_TYPE_IGNITION) - e5:SetRange(LOCATION_MZONE) - e5:SetProperty(EFFECT_FLAG_CARD_TARGET) - e5:SetCountLimit(1) - e5:SetCost(c22110647.descost) - e5:SetTarget(c22110647.destg) - e5:SetOperation(c22110647.desop) - c:RegisterEffect(e5) -end -function c22110647.indcon(e) - return Duel.IsExistingMatchingCard(Card.IsType,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil,TYPE_TOKEN) -end -function c22110647.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c22110647.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>1 - and Duel.IsPlayerCanSpecialSummonMonster(tp,31533705,0x101b,0x4011,0,0,3,RACE_MACHINE,ATTRIBUTE_WIND) end - Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,2,0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,0,0) -end -function c22110647.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=1 then return end - if Duel.IsPlayerCanSpecialSummonMonster(tp,31533705,0x101b,0x4011,0,0,3,RACE_MACHINE,ATTRIBUTE_WIND) then - local token1=Duel.CreateToken(tp,22110648) - Duel.SpecialSummonStep(token1,0,tp,tp,false,false,POS_FACEUP) - local token2=Duel.CreateToken(tp,22110648) - Duel.SpecialSummonStep(token2,0,tp,tp,false,false,POS_FACEUP) - Duel.SpecialSummonComplete() - end -end -function c22110647.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():GetAttackAnnouncedCount()==0 - and Duel.CheckReleaseGroup(tp,Card.IsSetCard,1,nil,0x101b) end - local g=Duel.SelectReleaseGroup(tp,Card.IsSetCard,1,1,nil,0x101b) - Duel.Release(g,REASON_COST) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_OATH) - e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e:GetHandler():RegisterEffect(e1) -end -function c22110647.filter(c) - return c:IsDestructable() -end -function c22110647.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and c22110647.filter(chkc) end - if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,LOCATION_ONFIELD)>1 - and Duel.IsExistingTarget(c22110647.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c22110647.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c22110647.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c22123627.lua b/script/c22123627.lua deleted file mode 100644 index 5f69ee8d38..0000000000 --- a/script/c22123627.lua +++ /dev/null @@ -1,39 +0,0 @@ ---強欲なウツボ -function c22123627.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c22123627.target) - e1:SetOperation(c22123627.activate) - c:RegisterEffect(e1) -end -function c22123627.filter(c) - return c:IsAttribute(ATTRIBUTE_WATER) and c:IsAbleToDeck() -end -function c22123627.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp,3) - and Duel.IsExistingMatchingCard(c22123627.filter,tp,LOCATION_HAND,0,2,e:GetHandler()) end - Duel.SetTargetPlayer(tp) - Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,2,tp,LOCATION_HAND) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,3) -end -function c22123627.activate(e,tp,eg,ep,ev,re,r,rp) - local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) - local g=Duel.GetMatchingGroup(c22123627.filter,p,LOCATION_HAND,0,nil) - if g:GetCount()<2 then - local hg=Duel.GetFieldGroup(p,LOCATION_HAND,0) - Duel.ConfirmCards(1-p,hg) - Duel.ShuffleHand(p) - else - Duel.Hint(HINT_SELECTMSG,p,HINTMSG_TODECK) - local sg=g:Select(p,2,2,nil) - Duel.ConfirmCards(1-p,sg) - Duel.SendtoDeck(sg,nil,2,REASON_EFFECT) - Duel.ShuffleDeck(p) - Duel.BreakEffect() - Duel.Draw(p,3,REASON_EFFECT) - end -end diff --git a/script/c22134079.lua b/script/c22134079.lua deleted file mode 100644 index 8c429ef420..0000000000 --- a/script/c22134079.lua +++ /dev/null @@ -1,71 +0,0 @@ ---墓守の伏兵 -function c22134079.initial_effect(c) - --return to deck - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(22134079,0)) - e1:SetCategory(CATEGORY_TODECK) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_FLIP) - e1:SetTarget(c22134079.tdtg) - e1:SetOperation(c22134079.tdop) - c:RegisterEffect(e1) - --salvage - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetCode(EVENT_FLIP) - e2:SetOperation(c22134079.flipop) - c:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(22134079,1)) - e3:SetCategory(CATEGORY_TOHAND) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_TO_GRAVE) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e3:SetCondition(c22134079.thcon) - e3:SetTarget(c22134079.thtg) - e3:SetOperation(c22134079.thop) - c:RegisterEffect(e3) - --immune to necro valley - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetCode(EFFECT_NECRO_VALLEY_IM) - c:RegisterEffect(e4) -end -function c22134079.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_GRAVE) and chkc:IsAbleToDeck() end - if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToDeck,tp,0,LOCATION_GRAVE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectTarget(tp,Card.IsAbleToDeck,tp,0,LOCATION_GRAVE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0) -end -function c22134079.tdop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoDeck(tc,nil,1,REASON_EFFECT) - end -end -function c22134079.flipop(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():RegisterFlagEffect(22134079,RESET_EVENT+0x57a0000,0,0) -end -function c22134079.thcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetFlagEffect(22134079)~=0 -end -function c22134079.filter(c) - return c:IsSetCard(0x91) and c:IsAbleToHand() -end -function c22134079.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c22134079.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c22134079.filter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c22134079.filter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c22134079.thop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end diff --git a/script/c22147147.lua b/script/c22147147.lua deleted file mode 100644 index e29f9abd77..0000000000 --- a/script/c22147147.lua +++ /dev/null @@ -1,70 +0,0 @@ ---旋風剣 -function c22147147.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c22147147.target) - e1:SetOperation(c22147147.operation) - c:RegisterEffect(e1) - --Equip limit - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_EQUIP_LIMIT) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetValue(c22147147.eqlimit) - c:RegisterEffect(e2) - --destroy - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(22147147,0)) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e3:SetCategory(CATEGORY_DESTROY) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetCode(EVENT_DAMAGE_STEP_END) - e3:SetRange(LOCATION_SZONE) - e3:SetCondition(c22147147.descon) - e3:SetTarget(c22147147.destg) - e3:SetOperation(c22147147.desop) - c:RegisterEffect(e3) -end -function c22147147.eqlimit(e,c) - return c:IsSetCard(0xc008) -end -function c22147147.filter(c) - return c:IsFaceup() and c:IsSetCard(0xc008) -end -function c22147147.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c22147147.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c22147147.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c22147147.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c22147147.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,e:GetHandler(),tc) - end -end -function c22147147.descon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetAttacker()==e:GetHandler():GetEquipTarget() -end -function c22147147.desfilter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable() -end -function c22147147.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and c22147147.desfilter(chkc) end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c22147147.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c22147147.desop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c22160245.lua b/script/c22160245.lua deleted file mode 100644 index 24a421a7b8..0000000000 --- a/script/c22160245.lua +++ /dev/null @@ -1,47 +0,0 @@ ---E-HERO インフェルノ・ウィング -function c22160245.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcCode2(c,58932615,21844576,true,true) - --spsummon condition - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(c22160245.splimit) - c:RegisterEffect(e1) - --damage - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(22160245,0)) - e2:SetCategory(CATEGORY_DAMAGE) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetCode(EVENT_BATTLE_DESTROYING) - e2:SetCondition(aux.bdgcon) - e2:SetTarget(c22160245.damtg) - e2:SetOperation(c22160245.damop) - c:RegisterEffect(e2) - --pierce - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_PIERCE) - c:RegisterEffect(e3) -end -function c22160245.splimit(e,se,sp,st) - return st==SUMMON_TYPE_FUSION+0x10 -end -function c22160245.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local c=e:GetHandler() - local bc=c:GetBattleTarget() - local dam=bc:GetAttack() - if bc:GetAttack() < bc:GetDefence() then dam=bc:GetDefence() end - if dam<0 then dam=0 end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(dam) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,dam) -end -function c22160245.damop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c22171591.lua b/script/c22171591.lua deleted file mode 100644 index 1faac9563e..0000000000 --- a/script/c22171591.lua +++ /dev/null @@ -1,36 +0,0 @@ ---カバリスト -function c22171591.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(22171591,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetCondition(c22171591.condition) - e1:SetCost(c22171591.cost) - e1:SetTarget(c22171591.target) - e1:SetOperation(c22171591.operation) - c:RegisterEffect(e1) -end -function c22171591.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) -end -function c22171591.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,800) end - Duel.PayLPCost(tp,800) -end -function c22171591.filter(c) - return c:IsRace(RACE_PSYCHO) and c:IsAbleToHand() -end -function c22171591.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c22171591.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c22171591.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c22171591.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c22174866.lua b/script/c22174866.lua deleted file mode 100644 index 3534b2baef..0000000000 --- a/script/c22174866.lua +++ /dev/null @@ -1,50 +0,0 @@ ---アロマージ-カナンガ -function c22174866.initial_effect(c) - --atk & def - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(0,LOCATION_MZONE) - e1:SetCondition(c22174866.adcon) - e1:SetValue(-500) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_UPDATE_DEFENCE) - c:RegisterEffect(e2) - --to hand - local e3=Effect.CreateEffect(c) - e3:SetCategory(CATEGORY_TOHAND) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e3:SetCode(EVENT_RECOVER) - e3:SetRange(LOCATION_MZONE) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetCountLimit(1) - e3:SetCondition(c22174866.thcon) - e3:SetTarget(c22174866.thtg) - e3:SetOperation(c22174866.thop) - c:RegisterEffect(e3) -end -function c22174866.adcon(e) - local tp=e:GetHandlerPlayer() - return Duel.GetLP(tp)>Duel.GetLP(1-tp) -end -function c22174866.thcon(e,tp,eg,ep,ev,re,r,rp) - return ep==tp -end -function c22174866.thfilter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand() -end -function c22174866.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and c22174866.thfilter(chkc) end - if chk==0 then return ep==tp and e:GetHandler():IsRelateToEffect(e) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g=Duel.SelectTarget(tp,c22174866.thfilter,tp,0,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0) -end -function c22174866.thop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - end -end diff --git a/script/c22200403.lua b/script/c22200403.lua deleted file mode 100644 index e71f9e61d5..0000000000 --- a/script/c22200403.lua +++ /dev/null @@ -1,117 +0,0 @@ ---ヒュプノシスター -function c22200403.initial_effect(c) - --atk/def - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(800) - e1:SetCondition(c22200403.effcon) - e1:SetLabel(1) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_UPDATE_DEFENCE) - c:RegisterEffect(e2) - --destroy - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(22200403,0)) - e3:SetCategory(CATEGORY_DESTROY) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e3:SetCode(EVENT_BATTLE_START) - e3:SetCondition(c22200403.effcon) - e3:SetTarget(c22200403.destg) - e3:SetOperation(c22200403.desop) - e3:SetLabel(2) - c:RegisterEffect(e3) - --must attack - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_FIELD) - e4:SetCode(EFFECT_MUST_ATTACK) - e4:SetRange(LOCATION_MZONE) - e4:SetTargetRange(0,LOCATION_MZONE) - e4:SetCondition(c22200403.effcon) - e4:SetLabel(3) - c:RegisterEffect(e4) - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_SINGLE) - e5:SetCode(EFFECT_MUST_BE_ATTACKED) - e5:SetCondition(c22200403.effcon) - e5:SetValue(aux.imval1) - e5:SetLabel(3) - c:RegisterEffect(e5) - local e6=Effect.CreateEffect(c) - e6:SetType(EFFECT_TYPE_FIELD) - e6:SetCode(EFFECT_CANNOT_EP) - e6:SetRange(LOCATION_MZONE) - e6:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e6:SetTargetRange(0,1) - e6:SetCondition(c22200403.atcon) - e6:SetLabel(3) - c:RegisterEffect(e6) - --draw - local e7=Effect.CreateEffect(c) - e7:SetDescription(aux.Stringid(22200403,1)) - e7:SetCategory(CATEGORY_DRAW) - e7:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e7:SetCode(EVENT_BATTLE_DESTROYING) - e7:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e7:SetCondition(c22200403.drcon1) - e7:SetTarget(c22200403.drtg) - e7:SetOperation(c22200403.drop) - e7:SetLabel(4) - c:RegisterEffect(e7) - local e8=Effect.CreateEffect(c) - e8:SetDescription(aux.Stringid(22200403,1)) - e8:SetCategory(CATEGORY_DRAW) - e8:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e8:SetCode(EVENT_DESTROYED) - e8:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e8:SetRange(LOCATION_MZONE) - e8:SetCondition(c22200403.drcon2) - e8:SetTarget(c22200403.drtg) - e8:SetOperation(c22200403.drop) - e8:SetLabel(4) - c:RegisterEffect(e8) -end -function c22200403.effcon(e) - local ct=0 - if Duel.GetFieldCard(0,LOCATION_SZONE,6) then ct=ct+1 end - if Duel.GetFieldCard(0,LOCATION_SZONE,7) then ct=ct+1 end - if Duel.GetFieldCard(1,LOCATION_SZONE,6) then ct=ct+1 end - if Duel.GetFieldCard(1,LOCATION_SZONE,7) then ct=ct+1 end - return ct>=e:GetLabel() -end -function c22200403.destg(e,tp,eg,ep,ev,re,r,rp,chk) - local tc=e:GetHandler():GetBattleTarget() - if chk==0 then return tc and tc:IsFaceup() and tc:GetSummonType()==SUMMON_TYPE_PENDULUM end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,tc,1,0,0) -end -function c22200403.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetHandler():GetBattleTarget() - if tc:IsRelateToBattle() then - Duel.Destroy(tc,REASON_EFFECT) - end -end -function c22200403.atcon(e) - return c22200403.effcon(e) - and Duel.IsExistingMatchingCard(Card.IsAttackable,e:GetHandlerPlayer(),0,LOCATION_MZONE,1,nil) -end -function c22200403.drcon1(e,tp,eg,ep,ev,re,r,rp) - return c22200403.effcon(e) - and e:GetHandler():IsRelateToBattle() -end -function c22200403.drtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(1) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c22200403.drop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end -function c22200403.drcon2(e,tp,eg,ep,ev,re,r,rp) - return c22200403.effcon(e) - and bit.band(r,REASON_EFFECT)~=0 and re:GetHandler()==e:GetHandler() -end diff --git a/script/c22201234.lua b/script/c22201234.lua deleted file mode 100644 index 6e161a6ade..0000000000 --- a/script/c22201234.lua +++ /dev/null @@ -1,64 +0,0 @@ ---ライトロード・バリア -function c22201234.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c22201234.atg) - e1:SetOperation(c22201234.aop) - c:RegisterEffect(e1) - --quick - local e2=Effect.CreateEffect(c) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetDescription(aux.Stringid(22201234,1)) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetRange(LOCATION_SZONE) - e2:SetCode(EVENT_BE_BATTLE_TARGET) - e2:SetCondition(c22201234.qcon) - e2:SetCost(c22201234.qcost) - e2:SetTarget(c22201234.qtg) - e2:SetOperation(c22201234.qop) - c:RegisterEffect(e2) -end -function c22201234.atg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc==Duel.GetAttacker() end - if chk==0 then return true end - if Duel.CheckEvent(EVENT_BE_BATTLE_TARGET) then - local a=Duel.GetAttacker() - local d=Duel.GetAttackTarget() - if d:IsFaceup() and d:IsSetCard(0x38) and d:IsControler(tp) and Duel.IsPlayerCanDiscardDeckAsCost(tp,2) - and a:IsOnField() and a:IsCanBeEffectTarget(e) and Duel.SelectYesNo(tp,aux.Stringid(22201234,0)) then - e:SetProperty(EFFECT_FLAG_CARD_TARGET) - e:SetLabel(1) - Duel.DiscardDeck(tp,2,REASON_COST) - Duel.SetTargetCard(a) - end - else - e:SetProperty(0) - e:SetLabel(0) - end -end -function c22201234.aop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - if e:GetLabel()==1 then - Duel.NegateAttack() - end -end -function c22201234.qcon(e,tp,eg,ep,ev,re,r,rp) - local d=Duel.GetAttackTarget() - return d:IsFaceup() and d:IsSetCard(0x38) and d:IsControler(tp) and not e:GetHandler():IsStatus(STATUS_CHAINING) -end -function c22201234.qcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDiscardDeckAsCost(tp,2) end - Duel.DiscardDeck(tp,2,REASON_COST) -end -function c22201234.qtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local tg=Duel.GetAttacker() - if chkc then return chkc==tg end - if chk==0 then return tg:IsOnField() and tg:IsCanBeEffectTarget(e) end - Duel.SetTargetCard(tg) -end -function c22201234.qop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - Duel.NegateAttack() -end diff --git a/script/c22205600.lua b/script/c22205600.lua deleted file mode 100644 index 1f2db5764a..0000000000 --- a/script/c22205600.lua +++ /dev/null @@ -1,33 +0,0 @@ ---連鎖旋風 -function c22205600.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_LEAVE_FIELD) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCondition(c22205600.condition) - e1:SetTarget(c22205600.target) - e1:SetOperation(c22205600.activate) - c:RegisterEffect(e1) -end -function c22205600.cfilter(c) - return c:IsReason(REASON_DESTROY) and c:IsReason(REASON_EFFECT) and c:IsPreviousLocation(LOCATION_ONFIELD) -end -function c22205600.condition(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c22205600.cfilter,1,nil) -end -function c22205600.filter(c) - return c:IsDestructable() and c:IsType(TYPE_SPELL+TYPE_TRAP) -end -function c22205600.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and c22205600.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c22205600.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,2,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c22205600.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,2,2,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,2,0,0) -end -function c22205600.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) - Duel.Destroy(g,REASON_EFFECT) -end diff --git a/script/c22227683.lua b/script/c22227683.lua deleted file mode 100644 index 0e7ce61f9d..0000000000 --- a/script/c22227683.lua +++ /dev/null @@ -1,87 +0,0 @@ ---ブンボーグ004 -function c22227683.initial_effect(c) - --atk/def up - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_PRE_DAMAGE_CALCULATE) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c22227683.condition) - e1:SetTarget(c22227683.target) - e1:SetOperation(c22227683.operation) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_BATTLE_DESTROYING) - e2:SetCondition(aux.bdocon) - e2:SetTarget(c22227683.sptg) - e2:SetOperation(c22227683.spop) - c:RegisterEffect(e2) -end -function c22227683.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetBattleTarget()~=nil -end -function c22227683.tgfilter(c) - return c:IsSetCard(0xab) and c:IsType(TYPE_MONSTER) and not c:IsCode(22227683) and c:IsAbleToGrave() -end -function c22227683.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():GetFlagEffect(22227683)==0 - and Duel.IsExistingMatchingCard(c22227683.tgfilter,tp,LOCATION_DECK,0,1,nil) end - e:GetHandler():RegisterFlagEffect(22227683,RESET_CHAIN,0,1) - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) -end -function c22227683.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c22227683.tgfilter,tp,LOCATION_DECK,0,1,1,nil) - local tc=g:GetFirst() - if tc and Duel.SendtoGrave(tc,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_GRAVE) - and c:IsRelateToBattle() and c:IsFaceup() then - local lv=tc:GetLevel() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(lv*500) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_DAMAGE_CAL) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_UPDATE_DEFENCE) - c:RegisterEffect(e2) - end - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetCode(EFFECT_AVOID_BATTLE_DAMAGE) - e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e3:SetTargetRange(0,1) - e3:SetValue(1) - e3:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e3,tp) -end -function c22227683.spfilter1(c,e,tp) - return c:IsSetCard(0xab) and c:IsType(TYPE_MONSTER) - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsHasEffect(EFFECT_NECRO_VALLEY) - and Duel.IsExistingMatchingCard(c22227683.spfilter2,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,c,e,tp,c:GetLevel()) -end -function c22227683.spfilter2(c,e,tp,lv) - return c:IsSetCard(0xab) and c:IsType(TYPE_MONSTER) and c:GetLevel()~=lv - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsHasEffect(EFFECT_NECRO_VALLEY) -end -function c22227683.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>1 - and Duel.IsExistingMatchingCard(c22227683.spfilter1,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_GRAVE+LOCATION_HAND) -end -function c22227683.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g1=Duel.SelectMatchingCard(tp,c22227683.spfilter1,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,1,nil,e,tp) - if g1:GetCount()>0 then - local tc=g1:GetFirst() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g2=Duel.SelectMatchingCard(tp,c22227683.spfilter2,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,1,tc,e,tp,tc:GetLevel()) - g1:Merge(g2) - Duel.SpecialSummon(g1,0,tp,tp,false,false,POS_FACEUP_DEFENCE) - end -end diff --git a/script/c22318971.lua b/script/c22318971.lua deleted file mode 100644 index f521447481..0000000000 --- a/script/c22318971.lua +++ /dev/null @@ -1,55 +0,0 @@ ---一角獣の使い魔 -function c22318971.initial_effect(c) - --remove - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(22318971,0)) - e1:SetCategory(CATEGORY_REMOVE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_BE_BATTLE_TARGET) - e1:SetCondition(c22318971.condition) - e1:SetCost(c22318971.cost) - e1:SetTarget(c22318971.target) - e1:SetOperation(c22318971.operation) - c:RegisterEffect(e1) -end -function c22318971.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPosition(POS_FACEUP_DEFENCE) -end -function c22318971.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_MZONE,0,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_MZONE,0,1,1,e:GetHandler()) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c22318971.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemove() end - Duel.SetTargetCard(Duel.GetAttacker()) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,e:GetHandler(),1,0,0) -end -function c22318971.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() and Duel.Remove(c,0,REASON_EFFECT+REASON_TEMPORARY)~=0 then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) - e1:SetReset(RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN) - e1:SetCountLimit(1) - e1:SetCondition(c22318971.retcon) - e1:SetOperation(c22318971.retop) - Duel.RegisterEffect(e1,tp) - local ac=Duel.GetFirstTarget() - if ac:IsRelateToEffect(e) and ac:IsFaceup() then - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_MUST_ATTACK) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - ac:RegisterEffect(e2) - end - end -end -function c22318971.retcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c22318971.retop(e,tp,eg,ep,ev,re,r,rp) - Duel.ReturnToField(e:GetOwner()) -end diff --git a/script/c22339232.lua b/script/c22339232.lua deleted file mode 100644 index 82d167a5ed..0000000000 --- a/script/c22339232.lua +++ /dev/null @@ -1,72 +0,0 @@ ---ワイトメア -function c22339232.initial_effect(c) - --change code - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_GRAVE) - e1:SetCode(EFFECT_CHANGE_CODE) - e1:SetValue(32274490) - c:RegisterEffect(e1) - --to grave - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(22339232,0)) - e2:SetCategory(CATEGORY_TOGRAVE) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_HAND) - e2:SetCost(c22339232.cost) - e2:SetTarget(c22339232.tgtg) - e2:SetOperation(c22339232.tgop) - c:RegisterEffect(e2) - --special summon - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(22339232,1)) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_HAND) - e3:SetCost(c22339232.cost) - e3:SetTarget(c22339232.sptg) - e3:SetOperation(c22339232.spop) - c:RegisterEffect(e3) -end -function c22339232.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsDiscardable() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD) -end -function c22339232.tgfilter(c) - local code=c:GetCode() - return c:IsFaceup() and (code==32274490 or code==22339232) -end -function c22339232.tgtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and c22339232.tgfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c22339232.tgfilter,tp,LOCATION_REMOVED,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectTarget(tp,c22339232.tgfilter,tp,LOCATION_REMOVED,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,0,0) -end -function c22339232.tgop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoGrave(tc,REASON_EFFECT+REASON_RETURN) - end -end -function c22339232.spfilter(c,e,tp) - local code=c:GetCode() - return c:IsFaceup() and (code==36021814 or code==40991587) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c22339232.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and c22339232.spfilter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c22339232.spfilter,tp,LOCATION_REMOVED,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c22339232.spfilter,tp,LOCATION_REMOVED,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c22339232.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c22346472.lua b/script/c22346472.lua deleted file mode 100644 index ed8477c36e..0000000000 --- a/script/c22346472.lua +++ /dev/null @@ -1,32 +0,0 @@ ---破天荒な風 -function c22346472.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c22346472.target) - e1:SetOperation(c22346472.activate) - c:RegisterEffect(e1) -end -function c22346472.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,nil) -end -function c22346472.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_STANDBY+RESET_SELF_TURN) - e1:SetValue(1000) - tc:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_UPDATE_DEFENCE) - tc:RegisterEffect(e2) - end -end diff --git a/script/c22359980.lua b/script/c22359980.lua deleted file mode 100644 index 6c1f46e908..0000000000 --- a/script/c22359980.lua +++ /dev/null @@ -1,76 +0,0 @@ ---銀幕の鏡壁 -function c22359980.initial_effect(c) - --activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_DAMAGE_STEP) - e1:SetCondition(c22359980.condition) - e1:SetTarget(c22359980.target) - e1:SetOperation(c22359980.operation) - c:RegisterEffect(e1) - -- - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_ATTACK_ANNOUNCE) - e2:SetRange(LOCATION_SZONE) - e2:SetOperation(c22359980.operation) - c:RegisterEffect(e2) - --atkchange - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetCode(EFFECT_SET_ATTACK_FINAL) - e3:SetRange(LOCATION_SZONE) - e3:SetTargetRange(0,LOCATION_MZONE) - e3:SetTarget(c22359980.atktg) - e3:SetValue(c22359980.atkval) - c:RegisterEffect(e3) - local g=Group.CreateGroup() - g:KeepAlive() - e1:SetLabelObject(g) - e2:SetLabelObject(g) - e3:SetLabelObject(g) - --maintain - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e4:SetCode(EVENT_PHASE+PHASE_STANDBY) - e4:SetRange(LOCATION_SZONE) - e4:SetCountLimit(1) - e4:SetCondition(c22359980.mtcon) - e4:SetOperation(c22359980.mtop) - c:RegisterEffect(e4) -end -function c22359980.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end -function c22359980.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - e:GetLabelObject():Clear() -end -function c22359980.operation(e,tp,eg,ep,ev,re,r,rp) - local a=Duel.GetAttacker() - if a and a:IsControler(1-tp) and a:IsFaceup() and a:IsLocation(LOCATION_MZONE) then - e:GetLabelObject():AddCard(a) - if a:GetFlagEffect(22359980)==0 then - a:RegisterFlagEffect(22359980,RESET_EVENT+0x1fe0000,0,1) - end - end -end -function c22359980.atktg(e,c) - return c:GetFlagEffect(22359980)~=0 and e:GetLabelObject():IsContains(c) -end -function c22359980.atkval(e,c) - return c:GetAttack()/2 -end -function c22359980.mtcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c22359980.mtop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLP(tp)>2000 and Duel.SelectYesNo(tp,aux.Stringid(22359980,0)) then - Duel.PayLPCost(tp,2000) - else - Duel.Destroy(e:GetHandler(),REASON_RULE) - end -end diff --git a/script/c22371016.lua b/script/c22371016.lua deleted file mode 100644 index 1751c44ba5..0000000000 --- a/script/c22371016.lua +++ /dev/null @@ -1,28 +0,0 @@ ---A・O・J アンノウン・クラッシャー -function c22371016.initial_effect(c) - --remove - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(22371016,0)) - e1:SetCategory(CATEGORY_REMOVE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_BATTLED) - e1:SetTarget(c22371016.rmtg) - e1:SetOperation(c22371016.rmop) - c:RegisterEffect(e1) -end -function c22371016.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local c=e:GetHandler() - local a=Duel.GetAttacker() - if a==c then a=Duel.GetAttackTarget() end - e:SetLabelObject(a) - return a and a:IsAttribute(ATTRIBUTE_LIGHT) - end - Duel.SetOperationInfo(0,CATEGORY_REMOVE,e:GetLabelObject(),1,0,0) -end -function c22371016.rmop(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetLabelObject() - if tc:IsRelateToBattle() then - Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) - end -end diff --git a/script/c22377815.lua b/script/c22377815.lua deleted file mode 100644 index 26d9cfc435..0000000000 --- a/script/c22377815.lua +++ /dev/null @@ -1,28 +0,0 @@ ---水面のアレサ -function c22377815.initial_effect(c) - aux.EnableDualAttribute(c) - --handes - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(22377815,0)) - e1:SetCategory(CATEGORY_HANDES) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_BATTLE_DESTROYING) - e1:SetCondition(c22377815.con) - e1:SetTarget(c22377815.tg) - e1:SetOperation(c22377815.op) - c:RegisterEffect(e1) -end -function c22377815.con(e,tp,eg,ep,ev,re,r,rp) - return aux.IsDualState(e) and aux.bdogcon(e,tp,eg,ep,ev,re,r,rp) -end -function c22377815.tg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_HANDES,0,0,1-tp,1) -end -function c22377815.op(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND) - if g:GetCount()==0 then return end - local sg=g:RandomSelect(1-tp,1) - Duel.SendtoGrave(sg,REASON_DISCARD+REASON_EFFECT) -end diff --git a/script/c22382087.lua b/script/c22382087.lua deleted file mode 100644 index 86be7016d7..0000000000 --- a/script/c22382087.lua +++ /dev/null @@ -1,73 +0,0 @@ ---風帝家臣ガルーム -function c22382087.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(1,22382087) - e1:SetCost(c22382087.spcost) - e1:SetTarget(c22382087.sptg) - e1:SetOperation(c22382087.spop) - c:RegisterEffect(e1) - --search - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_RELEASE) - e2:SetCountLimit(1,22382088) - e2:SetCondition(c22382087.thcon) - e2:SetTarget(c22382087.thtg) - e2:SetOperation(c22382087.thop) - c:RegisterEffect(e2) -end -function c22382087.cfilter(c) - return bit.band(c:GetSummonType(),SUMMON_TYPE_ADVANCE)==SUMMON_TYPE_ADVANCE and c:IsAbleToHandAsCost() -end -function c22382087.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c22382087.cfilter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g=Duel.SelectMatchingCard(tp,c22382087.cfilter,tp,LOCATION_MZONE,0,1,1,nil) - Duel.SendtoHand(g,nil,REASON_COST) -end -function c22382087.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c22382087.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) - end - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) - e1:SetTargetRange(1,0) - e1:SetTarget(c22382087.splimit) - Duel.RegisterEffect(e1,tp) -end -function c22382087.splimit(e,c,sump,sumtype,sumpos,targetp,se) - return c:IsLocation(LOCATION_EXTRA) -end -function c22382087.thcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsReason(REASON_SUMMON) -end -function c22382087.filter(c) - return c:GetAttack()==800 and c:GetDefence()==1000 and not c:IsCode(22382087) and c:IsAbleToHand() -end -function c22382087.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c22382087.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c22382087.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c22382087.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c22386234.lua b/script/c22386234.lua deleted file mode 100644 index 5f0d094695..0000000000 --- a/script/c22386234.lua +++ /dev/null @@ -1,31 +0,0 @@ ---オーロラ・アンギラス -function c22386234.initial_effect(c) - --disable spsummon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetTargetRange(1,1) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(22386234,0)) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetRange(LOCATION_MZONE) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetCode(EVENT_SUMMON_SUCCESS) - e2:SetTarget(c22386234.destg) - e2:SetOperation(c22386234.desop) - c:RegisterEffect(e2) -end -function c22386234.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return eg:GetFirst()~=e:GetHandler() end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0) -end -function c22386234.desop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFaceup() and c:IsRelateToEffect(e) then - Duel.Destroy(c,REASON_EFFECT) - end -end diff --git a/script/c22404675.lua b/script/c22404675.lua deleted file mode 100644 index 065d2d4e26..0000000000 --- a/script/c22404675.lua +++ /dev/null @@ -1,77 +0,0 @@ ---雷帝家臣ミスラ -function c22404675.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(1,22404675) - e1:SetTarget(c22404675.sptg) - e1:SetOperation(c22404675.spop) - c:RegisterEffect(e1) - --search - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_RELEASE) - e2:SetCountLimit(1,22404676) - e2:SetCondition(c22404675.sumcon) - e2:SetTarget(c22404675.sumtg) - e2:SetOperation(c22404675.sumop) - c:RegisterEffect(e2) -end -function c22404675.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) - and Duel.IsPlayerCanSpecialSummonMonster(tp,22404676,0,0x4011,800,1000,1,RACE_THUNDER,ATTRIBUTE_LIGHT) end - Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,0,0) -end -function c22404675.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then - Duel.SpecialSummonStep(c,0,tp,tp,false,false,POS_FACEUP) - else - Duel.SendtoGrave(c,REASON_EFFECT) - end - if Duel.GetLocationCount(1-tp,LOCATION_MZONE,tp)>0 - and Duel.IsPlayerCanSpecialSummonMonster(tp,22404676,0,0x4011,800,1000,1,RACE_THUNDER,ATTRIBUTE_LIGHT) then - local token=Duel.CreateToken(tp,22404676) - Duel.SpecialSummonStep(token,0,tp,1-tp,false,false,POS_FACEUP_DEFENCE) - end - Duel.SpecialSummonComplete() - end - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) - e1:SetTargetRange(1,0) - e1:SetTarget(c22404675.splimit) - Duel.RegisterEffect(e1,tp) -end -function c22404675.splimit(e,c,sump,sumtype,sumpos,targetp,se) - return c:IsLocation(LOCATION_EXTRA) -end -function c22404675.sumcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsReason(REASON_SUMMON) and Duel.GetTurnPlayer()==tp -end -function c22404675.sumtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanSummon(tp) end -end -function c22404675.sumop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetFlagEffect(tp,22404675)~=0 then return end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetTargetRange(LOCATION_HAND,0) - e1:SetCode(EFFECT_EXTRA_SUMMON_COUNT) - e1:SetValue(0x1) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) - local e2=e1:Clone() - e2:SetCode(EFFECT_EXTRA_SET_COUNT) - Duel.RegisterEffect(e2,tp) - Duel.RegisterFlagEffect(tp,22404675,RESET_PHASE+PHASE_END,0,1) -end diff --git a/script/c22419772.lua b/script/c22419772.lua deleted file mode 100644 index 056d195732..0000000000 --- a/script/c22419772.lua +++ /dev/null @@ -1,35 +0,0 @@ ---ピクシーガーディアン -function c22419772.initial_effect(c) - --to deck - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(22419772,0)) - e1:SetCategory(CATEGORY_TODECK) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c22419772.cost) - e1:SetTarget(c22419772.target) - e1:SetOperation(c22419772.operation) - c:RegisterEffect(e1) -end -function c22419772.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end -function c22419772.filter(c,tp,tid) - return c:IsAbleToDeck() and c:IsType(TYPE_SPELL) and c:GetTurnID()==tid and c:GetReasonPlayer()==1-tp -end -function c22419772.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local tid=Duel.GetTurnCount() - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c22419772.filter(chkc,tp,tid) end - if chk==0 then return Duel.IsExistingTarget(c22419772.filter,tp,LOCATION_GRAVE,0,1,nil,tp,tid) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectTarget(tp,c22419772.filter,tp,LOCATION_GRAVE,0,1,1,nil,tp,tid) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0) -end -function c22419772.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoDeck(tc,nil,1,REASON_EFFECT) - end -end diff --git a/script/c22431243.lua b/script/c22431243.lua deleted file mode 100644 index 14ac42d568..0000000000 --- a/script/c22431243.lua +++ /dev/null @@ -1,33 +0,0 @@ ---超進化薬 -function c22431243.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c22431243.cost) - e1:SetTarget(c22431243.target) - e1:SetOperation(c22431243.activate) - c:RegisterEffect(e1) -end -function c22431243.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsRace,1,nil,RACE_REPTILE) end - local g=Duel.SelectReleaseGroup(tp,Card.IsRace,1,1,nil,RACE_REPTILE) - Duel.Release(g,REASON_COST) -end -function c22431243.filter(c,e,tp) - return c:IsRace(RACE_DINOSAUR) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c22431243.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsExistingMatchingCard(c22431243.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c22431243.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c22431243.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c22446869.lua b/script/c22446869.lua deleted file mode 100644 index c187ad133e..0000000000 --- a/script/c22446869.lua +++ /dev/null @@ -1,61 +0,0 @@ ---水精鱗-ディニクアビス -function c22446869.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(22446869,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND) - e1:SetCost(c22446869.spcost) - e1:SetTarget(c22446869.sptg) - e1:SetOperation(c22446869.spop) - c:RegisterEffect(e1) - --search - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(22446869,1)) - e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetCountLimit(1,22446869) - e2:SetCondition(c22446869.thcon) - e2:SetTarget(c22446869.thtg) - e2:SetOperation(c22446869.thop) - c:RegisterEffect(e2) -end -function c22446869.cfilter(c) - return c:IsAttribute(ATTRIBUTE_WATER) and c:IsDiscardable() and c:IsAbleToGraveAsCost() -end -function c22446869.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c22446869.cfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,c22446869.cfilter,1,1,REASON_COST+REASON_DISCARD,e:GetHandler()) -end -function c22446869.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c22446869.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,1,tp,tp,false,false,POS_FACEUP) - end -end -function c22446869.thcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+1 -end -function c22446869.thfilter(c) - return c:IsSetCard(0x74) and c:IsLevelBelow(4) and c:IsAbleToHand() -end -function c22446869.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c22446869.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c22446869.thfilter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c22479888.lua b/script/c22479888.lua deleted file mode 100644 index 9c3fa40770..0000000000 --- a/script/c22479888.lua +++ /dev/null @@ -1,38 +0,0 @@ ---クレイ・チャージ -function c22479888.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_BE_BATTLE_TARGET) - e1:SetCondition(c22479888.condition) - e1:SetTarget(c22479888.target) - e1:SetOperation(c22479888.activate) - c:RegisterEffect(e1) -end -function c22479888.condition(e,tp,eg,ep,ev,re,r,rp) - local at=Duel.GetAttackTarget() - return at:IsControler(tp) and at:IsCode(84327329) -end -function c22479888.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local a=Duel.GetAttacker() - local at=Duel.GetAttackTarget() - if chkc then return false end - if chk==0 then return a:IsOnField() and a:IsDestructable() and a:IsCanBeEffectTarget(e) - and at:IsOnField() and at:IsDestructable() and at:IsCanBeEffectTarget(e) end - if at:IsFacedown() then - Duel.ConfirmCards(1-tp,at) - end - local g=Group.FromCards(a,at) - Duel.SetTargetCard(g) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,2,0,0) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,800) -end -function c22479888.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) - if g:GetCount()==2 then - Duel.Destroy(g,REASON_EFFECT) - Duel.Damage(1-tp,800,REASON_EFFECT) - end -end diff --git a/script/c22493811.lua b/script/c22493811.lua deleted file mode 100644 index 840aee2b95..0000000000 --- a/script/c22493811.lua +++ /dev/null @@ -1,40 +0,0 @@ ---アリの増殖 -function c22493811.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c22493811.cost) - e1:SetTarget(c22493811.target) - e1:SetOperation(c22493811.activate) - c:RegisterEffect(e1) -end -function c22493811.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsRace,1,nil,RACE_INSECT) end - local g=Duel.SelectReleaseGroup(tp,Card.IsRace,1,1,nil,RACE_INSECT) - Duel.Release(g,REASON_COST) -end -function c22493811.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsPlayerCanSpecialSummonMonster(tp,22493812,0,0x4011,500,1200,4,RACE_INSECT,ATTRIBUTE_EARTH) end - Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,2,0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,0,0) -end -function c22493811.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)>1 - and Duel.IsPlayerCanSpecialSummonMonster(tp,22493812,0,0x4011,500,1200,4,RACE_INSECT,ATTRIBUTE_EARTH) then - for i=1,2 do - local token=Duel.CreateToken(tp,22493812) - Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UNRELEASABLE_SUM) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetValue(1) - e1:SetReset(RESET_EVENT+0x1fe0000) - token:RegisterEffect(e1,true) - end - Duel.SpecialSummonComplete() - end -end diff --git a/script/c2250266.lua b/script/c2250266.lua deleted file mode 100644 index 51fa465cfa..0000000000 --- a/script/c2250266.lua +++ /dev/null @@ -1,90 +0,0 @@ ---D・ステープラン -function c2250266.initial_effect(c) - --atk - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EVENT_LEAVE_FIELD_P) - e1:SetOperation(c2250266.check) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(2250266,0)) - e2:SetCategory(CATEGORY_ATKCHANGE) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_BATTLE_DESTROYED) - e2:SetCondition(c2250266.cona) - e2:SetOperation(c2250266.opa) - e2:SetLabelObject(e1) - c:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetRange(LOCATION_MZONE) - e3:SetTargetRange(0,LOCATION_MZONE) - e3:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET) - e3:SetCondition(c2250266.cona2) - e3:SetValue(c2250266.atlimit) - c:RegisterEffect(e3) - --def - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e4:SetCondition(c2250266.cond) - e4:SetValue(1) - c:RegisterEffect(e4) - local e5=Effect.CreateEffect(c) - e5:SetDescription(aux.Stringid(2250266,1)) - e5:SetCategory(CATEGORY_POSITION) - e5:SetProperty(EFFECT_FLAG_CARD_TARGET) - e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e5:SetCode(EVENT_BATTLED) - e5:SetCondition(c2250266.cond) - e5:SetTarget(c2250266.tgd2) - e5:SetOperation(c2250266.opd2) - c:RegisterEffect(e5) -end -function c2250266.check(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsDisabled() and c:IsAttackPos() then e:SetLabel(1) - else e:SetLabel(0) end -end -function c2250266.cona(e,tp,eg,ep,ev,re,r,rp) - return e:GetLabelObject():GetLabel()==1 -end -function c2250266.opa(e,tp,eg,ep,ev,re,r,rp) - local rc=e:GetHandler():GetReasonCard() - if rc:IsRelateToBattle() then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(-300) - e1:SetReset(RESET_EVENT+0x1fe0000) - rc:RegisterEffect(e1) - end -end -function c2250266.cona2(e) - return e:GetHandler():IsAttackPos() -end -function c2250266.atlimit(e,c) - return c~=e:GetHandler() -end -function c2250266.cond(e) - return not e:GetHandler():IsDisabled() and e:GetHandler():IsDefencePos() -end -function c2250266.filter(c) - return c:IsFaceup() and c:IsAttackPos() -end -function c2250266.tgd2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c2250266.filter(chkc) end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATTACK) - local g=Duel.SelectTarget(tp,c2250266.filter,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_POSITION,g,g:GetCount(),0,0) -end -function c2250266.opd2(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - local c=e:GetHandler() - if tc and tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsAttackPos() - and Duel.ChangePosition(tc,POS_FACEUP_DEFENCE)~=0 and c:IsRelateToBattle() then - Duel.ChangePosition(e:GetHandler(),POS_FACEUP_ATTACK,0,POS_FACEUP_ATTACK,0) - end -end diff --git a/script/c22512237.lua b/script/c22512237.lua deleted file mode 100644 index 7141344e13..0000000000 --- a/script/c22512237.lua +++ /dev/null @@ -1,19 +0,0 @@ ---メカニカル・ハウンド -function c22512237.initial_effect(c) - --act limit - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EFFECT_CANNOT_ACTIVATE) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(0,1) - e1:SetValue(c22512237.aclimit) - e1:SetCondition(c22512237.condition) - c:RegisterEffect(e1) -end -function c22512237.condition(e) - return Duel.GetFieldGroupCount(e:GetHandlerPlayer(),LOCATION_HAND,0)==0 -end -function c22512237.aclimit(e,re,tp) - return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL) -end diff --git a/script/c22512406.lua b/script/c22512406.lua deleted file mode 100644 index a485f95d78..0000000000 --- a/script/c22512406.lua +++ /dev/null @@ -1,51 +0,0 @@ ---覆面忍者ヱビス -function c22512406.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(22512406,0)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCondition(c22512406.thcon) - e1:SetTarget(c22512406.thtg) - e1:SetOperation(c22512406.thop) - c:RegisterEffect(e1) -end -function c22512406.cfilter1(c) - return c:IsFaceup() and c:IsSetCard(0x2b) and c:GetCode()~=22512406 -end -function c22512406.cfilter2(c) - return c:IsFaceup() and c:IsSetCard(0x2b) -end -function c22512406.thcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c22512406.cfilter1,tp,LOCATION_MZONE,0,1,nil) -end -function c22512406.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand() -end -function c22512406.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local ct=Duel.GetMatchingGroupCount(c22512406.cfilter2,tp,LOCATION_MZONE,0,nil) - local dt=Duel.GetMatchingGroupCount(c22512406.filter,tp,0,LOCATION_ONFIELD,nil) - e:SetLabel(ct) - return dt>=ct - end - local g=Duel.GetMatchingGroup(c22512406.filter,tp,0,LOCATION_ONFIELD,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,e:GetLabel(),0,0) -end -function c22512406.thop(e,tp,eg,ep,ev,re,r,rp) - local ct=Duel.GetMatchingGroupCount(c22512406.cfilter2,tp,LOCATION_MZONE,0,nil) - local g=Duel.GetMatchingGroup(c22512406.filter,tp,0,LOCATION_ONFIELD,nil) - if ct>g:GetCount() then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local sg=g:Select(tp,ct,ct,nil) - Duel.SendtoHand(sg,nil,REASON_EFFECT) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_DIRECT_ATTACK) - e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetTarget(aux.TargetBoolFunction(Card.IsCode,10236520)) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) -end diff --git a/script/c22530212.lua b/script/c22530212.lua deleted file mode 100644 index 14495485f1..0000000000 --- a/script/c22530212.lua +++ /dev/null @@ -1,37 +0,0 @@ ---マジック・ハンド -function c22530212.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_NO_TURN_RESET) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EVENT_TO_HAND) - e1:SetCountLimit(1) - e1:SetCondition(c22530212.condition) - e1:SetTarget(c22530212.target) - e1:SetOperation(c22530212.activate) - c:RegisterEffect(e1) -end -function c22530212.cfilter(c,tp) - return c:IsControler(tp) and c:IsPreviousLocation(LOCATION_DECK) and not c:IsReason(REASON_DRAW) -end -function c22530212.condition(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c22530212.cfilter,1,nil,1-tp) -end -function c22530212.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local g=eg:Filter(c22530212.cfilter,nil,1-tp) - Duel.SetTargetCard(g) - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,g:GetCount(),0,0) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,800) -end -function c22530212.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) - if g:GetCount()~=0 then - Duel.SendtoGrave(g,REASON_EFFECT) - if g:IsExists(Card.IsLocation,1,nil,LOCATION_GRAVE) then - Duel.Damage(1-tp,800,REASON_EFFECT) - end - end -end diff --git a/script/c22537443.lua b/script/c22537443.lua deleted file mode 100644 index 3370d91b3c..0000000000 --- a/script/c22537443.lua +++ /dev/null @@ -1,26 +0,0 @@ ---セベクの祝福 -function c22537443.initial_effect(c) - --recover - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCategory(CATEGORY_RECOVER) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_BATTLE_DAMAGE) - e1:SetCondition(c22537443.reccon) - e1:SetTarget(c22537443.rectg) - e1:SetOperation(c22537443.recop) - c:RegisterEffect(e1) -end -function c22537443.reccon(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp and Duel.GetAttackTarget()==nil -end -function c22537443.rectg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(ev) - Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,ev) -end -function c22537443.recop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Recover(p,d,REASON_EFFECT) -end diff --git a/script/c22539270.lua b/script/c22539270.lua deleted file mode 100644 index 8400e6af62..0000000000 --- a/script/c22539270.lua +++ /dev/null @@ -1,79 +0,0 @@ ---スクラップ・オイルゾーン -function c22539270.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCost(c22539270.cost) - e1:SetTarget(c22539270.target) - e1:SetOperation(c22539270.operation) - c:RegisterEffect(e1) - --Destroy - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE) - e2:SetCode(EVENT_LEAVE_FIELD) - e2:SetOperation(c22539270.desop) - c:RegisterEffect(e2) - --Destroy2 - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e3:SetRange(LOCATION_SZONE) - e3:SetCode(EVENT_LEAVE_FIELD) - e3:SetCondition(c22539270.descon2) - e3:SetOperation(c22539270.desop2) - c:RegisterEffect(e3) -end -function c22539270.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetCurrentPhase()==PHASE_MAIN1 end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_BP) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) - e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function c22539270.filter(c,e,tp) - return c:IsSetCard(0x24) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c22539270.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c22539270.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c22539270.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c22539270.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c22539270.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then - if Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)==0 then return end - c:SetCardTarget(tc) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e2) - end -end -function c22539270.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetHandler():GetFirstCardTarget() - if tc and tc:IsLocation(LOCATION_MZONE) then - Duel.Destroy(tc,REASON_EFFECT) - end -end -function c22539270.descon2(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetHandler():GetFirstCardTarget() - return tc and eg:IsContains(tc) -end -function c22539270.desop2(e,tp,eg,ep,ev,re,r,rp) - Duel.Destroy(e:GetHandler(),REASON_EFFECT) -end diff --git a/script/c22567609.lua b/script/c22567609.lua deleted file mode 100644 index 7f2135e86f..0000000000 --- a/script/c22567609.lua +++ /dev/null @@ -1,38 +0,0 @@ ---素早いモモンガ -function c22567609.initial_effect(c) - --battle destroyed - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(22567609,0)) - e1:SetCategory(CATEGORY_RECOVER+CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetCondition(c22567609.condition) - e1:SetTarget(c22567609.target) - e1:SetOperation(c22567609.operation) - c:RegisterEffect(e1) -end -function c22567609.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsLocation(LOCATION_GRAVE) - and bit.band(e:GetHandler():GetReason(),REASON_BATTLE)~=0 -end -function c22567609.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,1000) -end -function c22567609.filter(c,e,tp) - return c:IsCode(22567609) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN) -end -function c22567609.operation(e,tp,eg,ep,ev,re,r,rp) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - Duel.Recover(tp,1000,REASON_EFFECT) - if ft<=0 then return end - local g=Duel.GetMatchingGroup(c22567609.filter,tp,LOCATION_DECK,0,nil,e,tp) - if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(22567609,1)) then - Duel.BreakEffect() - Duel.SpecialSummonStep(g:GetFirst(),0,tp,tp,false,false,POS_FACEDOWN_DEFENCE) - if ft>1 and g:GetCount()>1 and Duel.SelectYesNo(tp,aux.Stringid(22567609,1)) then - Duel.SpecialSummonStep(g:GetNext(),0,tp,tp,false,false,POS_FACEDOWN_DEFENCE) - end - Duel.SpecialSummonComplete() - end -end diff --git a/script/c22587018.lua b/script/c22587018.lua deleted file mode 100644 index 12b0b415f3..0000000000 --- a/script/c22587018.lua +++ /dev/null @@ -1,28 +0,0 @@ ---ハイドロゲドン -function c22587018.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(22587018,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetCode(EVENT_BATTLE_DESTROYING) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCondition(aux.bdogcon) - e1:SetTarget(c22587018.sptg) - e1:SetOperation(c22587018.spop) - c:RegisterEffect(e1) -end -function c22587018.filter(c,e,tp) - return c:IsCode(22587018) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c22587018.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c22587018.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c22587018.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local tc=Duel.GetFirstMatchingCard(c22587018.filter,tp,LOCATION_DECK,0,nil,e,tp) - if tc then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c22589918.lua b/script/c22589918.lua deleted file mode 100644 index a5087df576..0000000000 --- a/script/c22589918.lua +++ /dev/null @@ -1,28 +0,0 @@ ---リロード -function c22589918.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c22589918.target) - e1:SetOperation(c22589918.activate) - c:RegisterEffect(e1) -end -function c22589918.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp) - and Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.SetTargetPlayer(tp) - Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_HAND) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c22589918.activate(e,tp,eg,ep,ev,re,r,rp) - local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) - local g=Duel.GetFieldGroup(p,LOCATION_HAND,0) - if g:GetCount()==0 then return end - Duel.SendtoDeck(g,nil,2,REASON_EFFECT) - Duel.ShuffleDeck(p) - Duel.BreakEffect() - Duel.Draw(p,g:GetCount(),REASON_EFFECT) -end diff --git a/script/c22609617.lua b/script/c22609617.lua deleted file mode 100644 index fcbd925415..0000000000 --- a/script/c22609617.lua +++ /dev/null @@ -1,16 +0,0 @@ ---不意打ち又佐 -function c22609617.initial_effect(c) - --control - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_CANNOT_CHANGE_CONTROL) - c:RegisterEffect(e1) - --double attack - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_EXTRA_ATTACK) - e2:SetValue(1) - c:RegisterEffect(e2) -end diff --git a/script/c22610082.lua b/script/c22610082.lua deleted file mode 100644 index a11a682340..0000000000 --- a/script/c22610082.lua +++ /dev/null @@ -1,32 +0,0 @@ ---遺言の仮面 -function c22610082.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TODECK) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c22610082.cost) - e1:SetTarget(c22610082.target) - e1:SetOperation(c22610082.activate) - c:RegisterEffect(e1) -end -function c22610082.cost(e,tp,eg,ep,ev,re,r,rp,chk) - e:SetLabel(1) - return true -end -function c22610082.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - if e:GetLabel()==0 then return false end - e:SetLabel(0) - return e:GetHandler():IsAbleToDeck() - end - e:SetLabel(0) - Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0) -end -function c22610082.activate(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - c:CancelToGrave() - Duel.SendtoDeck(c,nil,2,REASON_EFFECT) - end -end diff --git a/script/c22617205.lua b/script/c22617205.lua deleted file mode 100644 index 1e4ea96591..0000000000 --- a/script/c22617205.lua +++ /dev/null @@ -1,69 +0,0 @@ ---覚星輝士-セフィラビュート -function c22617205.initial_effect(c) - --pendulum summon - aux.AddPendulumProcedure(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --splimit - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetRange(LOCATION_PZONE) - e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE) - e2:SetTargetRange(1,0) - e2:SetTarget(c22617205.splimit) - e2:SetCondition(aux.nfbdncon) - c:RegisterEffect(e2) - --destroy - local e3=Effect.CreateEffect(c) - e3:SetCategory(CATEGORY_DESTROY) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e3:SetCode(EVENT_SUMMON_SUCCESS) - e3:SetCountLimit(1,22617205) - e3:SetTarget(c22617205.target) - e3:SetOperation(c22617205.operation) - c:RegisterEffect(e3) - local e4=e3:Clone() - e4:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - c:RegisterEffect(e4) - local e5=e3:Clone() - e5:SetCode(EVENT_SPSUMMON_SUCCESS) - e5:SetCondition(c22617205.condition) - c:RegisterEffect(e5) -end -function c22617205.splimit(e,c,sump,sumtype,sumpos,targetp) - if c:IsSetCard(0x9c) or c:IsSetCard(0xc4) then return false end - return bit.band(sumtype,SUMMON_TYPE_PENDULUM)==SUMMON_TYPE_PENDULUM -end -function c22617205.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_PENDULUM -end -function c22617205.filter1(c) - return ((c:IsLocation(LOCATION_MZONE) and c:IsFaceup()) - or (c:IsLocation(LOCATION_SZONE) and (c:GetSequence()==6 or c:GetSequence()==7))) - and (c:IsSetCard(0x9c) or c:IsSetCard(0xc4)) and c:IsDestructable() -end -function c22617205.filter2(c) - return c:IsFacedown() and c:IsDestructable() -end -function c22617205.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - if chk==0 then return Duel.IsExistingTarget(c22617205.filter1,tp,LOCATION_ONFIELD,0,1,e:GetHandler()) - and Duel.IsExistingTarget(c22617205.filter2,tp,0,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g1=Duel.SelectTarget(tp,c22617205.filter1,tp,LOCATION_ONFIELD,0,1,1,e:GetHandler()) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g2=Duel.SelectTarget(tp,c22617205.filter2,tp,0,LOCATION_ONFIELD,1,1,nil) - g1:Merge(g2) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g1,2,0,0) -end -function c22617205.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) - if g:GetCount()>0 then - Duel.Destroy(g,REASON_EFFECT) - end -end diff --git a/script/c22624373.lua b/script/c22624373.lua deleted file mode 100644 index 439aae787d..0000000000 --- a/script/c22624373.lua +++ /dev/null @@ -1,65 +0,0 @@ ---ライトロード・マジシャン ライラ -function c22624373.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(22624373,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c22624373.descon) - e1:SetTarget(c22624373.destg) - e1:SetOperation(c22624373.desop) - c:RegisterEffect(e1) - --discard deck - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetCategory(CATEGORY_DECKDES) - e2:SetDescription(aux.Stringid(22624373,1)) - e2:SetCode(EVENT_PHASE+PHASE_END) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCondition(c22624373.discon) - e2:SetTarget(c22624373.distg) - e2:SetOperation(c22624373.disop) - c:RegisterEffect(e2) -end -function c22624373.descon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPosition(POS_FACEUP_ATTACK) -end -function c22624373.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable() -end -function c22624373.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and c22624373.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c22624373.filter,tp,0,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c22624373.filter,tp,0,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c22624373.desop(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and c:IsPosition(POS_FACEUP_ATTACK) then - Duel.ChangePosition(c,POS_FACEUP_DEFENCE) - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_CHANGE_POSITION) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_COPY_INHERIT) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END+RESET_SELF_TURN,2) - c:RegisterEffect(e1) - end -end -function c22624373.discon(e,tp,eg,ep,ev,re,r,rp) - return tp==Duel.GetTurnPlayer() -end -function c22624373.distg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,3) -end -function c22624373.disop(e,tp,eg,ep,ev,re,r,rp) - Duel.DiscardDeck(tp,3,REASON_EFFECT) -end diff --git a/script/c22628574.lua b/script/c22628574.lua deleted file mode 100644 index efb48dff68..0000000000 --- a/script/c22628574.lua +++ /dev/null @@ -1,50 +0,0 @@ ---フェイク・フェザー -function c22628574.initial_effect(c) - --copy trap - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0x1e1,0x1e1) - e1:SetCost(c22628574.cost) - e1:SetTarget(c22628574.target) - e1:SetOperation(c22628574.operation) - c:RegisterEffect(e1) -end -function c22628574.cfilter(c) - return c:IsSetCard(0x33) and c:IsType(TYPE_MONSTER) and c:IsAbleToGraveAsCost() -end -function c22628574.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c22628574.cfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c22628574.cfilter,tp,LOCATION_HAND,0,1,1,nil) - Duel.SendtoGrave(g,REASON_COST) -end -function c22628574.filter(c) - return c:GetType()==0x4 and not c:IsCode(22628574) and c:CheckActivateEffect(false,true,false)~=nil -end -function c22628574.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then - local te=e:GetLabelObject() - local tg=te:GetTarget() - return tg and tg(e,tp,eg,ep,ev,re,r,rp,1,true) - end - if chk==0 then return Duel.IsExistingTarget(c22628574.filter,tp,0,LOCATION_GRAVE,1,nil) end - e:SetProperty(EFFECT_FLAG_CARD_TARGET) - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(22628574,0)) - local g=Duel.SelectTarget(tp,c22628574.filter,tp,0,LOCATION_GRAVE,1,1,nil) - if not g then return false end - local te,eg,ep,ev,re,r,rp=g:GetFirst():CheckActivateEffect(false,true,true) - e:SetLabelObject(te) - Duel.ClearTargetCard() - local tg=te:GetTarget() - e:SetCategory(te:GetCategory()) - e:SetProperty(te:GetProperty()) - if tg then tg(e,tp,eg,ep,ev,re,r,rp,1) end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,0,0,0) -end -function c22628574.operation(e,tp,eg,ep,ev,re,r,rp) - local te=e:GetLabelObject() - if not te then return end - local op=te:GetOperation() - if op then op(e,tp,eg,ep,ev,re,r,rp) end -end diff --git a/script/c22653490.lua b/script/c22653490.lua deleted file mode 100644 index 754c6436db..0000000000 --- a/script/c22653490.lua +++ /dev/null @@ -1,67 +0,0 @@ ---電光千鳥 -function c22653490.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_WIND),4,2) - c:EnableReviveLimit() - --return to deck - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(22653490,0)) - e1:SetCategory(CATEGORY_TODECK) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(c22653490.tdcon1) - e1:SetTarget(c22653490.tdtg1) - e1:SetOperation(c22653490.tdop1) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(22653490,1)) - e2:SetCategory(CATEGORY_TODECK) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCountLimit(1) - e2:SetRange(LOCATION_MZONE) - e2:SetCost(c22653490.tdcost2) - e2:SetTarget(c22653490.tdtg2) - e2:SetOperation(c22653490.tdop2) - c:RegisterEffect(e2) -end -function c22653490.tdcon1(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_XYZ -end -function c22653490.tdfilter1(c) - return c:IsFacedown() and c:IsAbleToDeck() -end -function c22653490.tdtg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() and c22653490.tdfilter1(chkc) end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectTarget(tp,Card.IsFacedown,tp,0,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0) -end -function c22653490.tdop1(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) and tc:IsControler(1-tp) and tc:IsFacedown() then - Duel.SendtoDeck(tc,nil,1,REASON_EFFECT) - end -end -function c22653490.tdcost2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c22653490.tdfilter2(c) - return c:IsFaceup() and c:IsAbleToDeck() -end -function c22653490.tdtg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() and c22653490.tdfilter2(chkc) end - if chk==0 then return Duel.IsExistingTarget(c22653490.tdfilter2,tp,0,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectTarget(tp,c22653490.tdfilter2,tp,0,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0) -end -function c22653490.tdop2(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsControler(1-tp) and tc:IsFaceup() then - Duel.SendtoDeck(tc,nil,0,REASON_EFFECT) - end -end diff --git a/script/c22657402.lua b/script/c22657402.lua deleted file mode 100644 index 12eb07abc3..0000000000 --- a/script/c22657402.lua +++ /dev/null @@ -1,84 +0,0 @@ ---冥界の麗人イゾルデ -function c22657402.initial_effect(c) - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_SPSUMMON_PROC) - e2:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e2:SetRange(LOCATION_HAND) - e2:SetCondition(c22657402.spcon) - c:RegisterEffect(e2) - --lv change - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_MZONE) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetCountLimit(1,22657402) - e3:SetTarget(c22657402.target) - e3:SetOperation(c22657402.operation) - c:RegisterEffect(e3) -end -function c22657402.spfilter(c) - return c:IsFaceup() and c:IsCode(96163807) -end -function c22657402.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c22657402.spfilter,tp,LOCATION_ONFIELD,0,1,nil) -end -function c22657402.filter(c) - return c:IsFaceup() and c:GetLevel()>0 and c:IsRace(RACE_ZOMBIE) -end -function c22657402.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c22657402.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c22657402.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - local g=Duel.SelectTarget(tp,c22657402.filter,tp,LOCATION_MZONE,0,1,2,nil) - local t={} - local p=1 - local lv1=g:GetFirst():GetLevel() - local lv2=0 - local tc2=g:GetNext() - if tc2 then lv2=tc2:GetLevel() end - for i=5,8 do - if lv1~=i and lv2~=i then t[p]=i p=p+1 end - end - Duel.Hint(HINT_SELECTMSG,tp,567) - local lv=Duel.AnnounceNumber(tp,table.unpack(t)) - e:SetLabel(lv) -end -function c22657402.lvfilter(c,e) - return c:IsFaceup() and c:IsRelateToEffect(e) -end -function c22657402.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(c22657402.lvfilter,nil,e) - local tc=g:GetFirst() - while tc do - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CHANGE_LEVEL) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetValue(e:GetLabel()) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - tc=g:GetNext() - end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetTargetRange(1,0) - e1:SetTarget(c22657402.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function c22657402.splimit(e,c) - return c:GetRace()~=RACE_ZOMBIE -end diff --git a/script/c22666164.lua b/script/c22666164.lua deleted file mode 100644 index 44f914ed8f..0000000000 --- a/script/c22666164.lua +++ /dev/null @@ -1,46 +0,0 @@ ---督戦官コヴィントン -function c22666164.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(22666164,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c22666164.cost) - e1:SetTarget(c22666164.target) - e1:SetOperation(c22666164.operation) - c:RegisterEffect(e1) -end -function c22666164.cfilter(c,code) - return c:IsFaceup() and c:IsCode(code) and c:IsAbleToGraveAsCost() -end -function c22666164.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c22666164.cfilter,tp,LOCATION_ONFIELD,0,1,nil,60999392) - and Duel.IsExistingMatchingCard(c22666164.cfilter,tp,LOCATION_ONFIELD,0,1,nil,23782705) - and Duel.IsExistingMatchingCard(c22666164.cfilter,tp,LOCATION_ONFIELD,0,1,nil,96384007) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g1=Duel.SelectMatchingCard(tp,c22666164.cfilter,tp,LOCATION_ONFIELD,0,1,1,nil,60999392) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g2=Duel.SelectMatchingCard(tp,c22666164.cfilter,tp,LOCATION_ONFIELD,0,1,1,nil,23782705) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g3=Duel.SelectMatchingCard(tp,c22666164.cfilter,tp,LOCATION_ONFIELD,0,1,1,nil,96384007) - g1:Merge(g2) - g1:Merge(g3) - Duel.SendtoGrave(g1,REASON_COST) -end -function c22666164.filter(c,e,tp) - return c:IsCode(58054262) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) -end -function c22666164.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-3 - and Duel.IsExistingMatchingCard(c22666164.filter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) -end -function c22666164.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c22666164.filter,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP) - end -end diff --git a/script/c22702055.lua b/script/c22702055.lua deleted file mode 100644 index d807e564fd..0000000000 --- a/script/c22702055.lua +++ /dev/null @@ -1,30 +0,0 @@ ---海 -function c22702055.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --Atk - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e2:SetValue(c22702055.val) - c:RegisterEffect(e2) - --Def - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetCode(EFFECT_UPDATE_DEFENCE) - e3:SetRange(LOCATION_SZONE) - e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e3:SetValue(c22702055.val) - c:RegisterEffect(e3) -end -function c22702055.val(e,c) - local r=c:GetRace() - if bit.band(r,RACE_FISH+RACE_SEASERPENT+RACE_THUNDER+RACE_AQUA)>0 then return 200 - elseif bit.band(r,RACE_MACHINE+RACE_PYRO)>0 then return -200 - else return 0 end -end diff --git a/script/c2273734.lua b/script/c2273734.lua deleted file mode 100644 index 6b9ec643b1..0000000000 --- a/script/c2273734.lua +++ /dev/null @@ -1,47 +0,0 @@ ---星因士 アルタイル -function c2273734.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(2273734,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) - e1:SetCountLimit(1,2273734) - e1:SetTarget(c2273734.sptg) - e1:SetOperation(c2273734.spop) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - c:RegisterEffect(e2) - local e3=e1:Clone() - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e3) -end -function c2273734.filter(c,e,tp) - return c:IsSetCard(0x9c) and not c:IsCode(2273734) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c2273734.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c2273734.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c2273734.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c2273734.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c2273734.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENCE) - end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetTarget(c2273734.atktg) - e1:SetReset(RESET_PHASE+RESET_END) - Duel.RegisterEffect(e1,tp) -end -function c2273734.atktg(e,c) - return not c:IsSetCard(0x9c) -end diff --git a/script/c22747316.lua b/script/c22747316.lua deleted file mode 100644 index 5eeecffeb9..0000000000 --- a/script/c22747316.lua +++ /dev/null @@ -1,41 +0,0 @@ ---しっぺ返し -function c22747316.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY+CATEGORY_TOHAND) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_CHAINING) - e1:SetCondition(c22747316.condition) - e1:SetTarget(c22747316.target) - e1:SetOperation(c22747316.activate) - c:RegisterEffect(e1) -end -function c22747316.condition(e,tp,eg,ep,ev,re,r,rp) - return rp~=tp and re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev) - and Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_GRAVE,0,1,nil,re:GetHandler():GetCode()) -end -function c22747316.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - if re:GetHandler():IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) - end -end -function c22747316.filter(c,code) - return c:IsCode(code) and c:IsAbleToHand() and not c:IsHasEffect(EFFECT_NECRO_VALLEY) -end -function c22747316.activate(e,tp,eg,ep,ev,re,r,rp) - local code=re:GetHandler():GetCode() - Duel.NegateActivation(ev) - if re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(eg,REASON_EFFECT) - end - local g=Duel.GetMatchingGroup(c22747316.filter,tp,LOCATION_GRAVE,0,nil,code) - if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(22747316,0)) then - Duel.BreakEffect() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local sg=g:Select(tp,1,1,nil) - Duel.SendtoHand(sg,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,sg) - end -end diff --git a/script/c22751868.lua b/script/c22751868.lua deleted file mode 100644 index 59d3553b9c..0000000000 --- a/script/c22751868.lua +++ /dev/null @@ -1,66 +0,0 @@ ---風雲カラクリ城 -function c22751868.initial_effect(c) - --activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --pos - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(22751868,0)) - e2:SetCategory(CATEGORY_POSITION) - e2:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_FIELD) - e2:SetRange(LOCATION_SZONE) - e2:SetCode(EVENT_BE_BATTLE_TARGET) - e2:SetCondition(c22751868.poscon) - e2:SetTarget(c22751868.postg) - e2:SetOperation(c22751868.posop) - c:RegisterEffect(e2) - --special summon - local e3=Effect.CreateEffect(c) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetDescription(aux.Stringid(22751868,1)) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e3:SetCode(EVENT_TO_GRAVE) - e3:SetCondition(c22751868.spcon) - e3:SetTarget(c22751868.sptg) - e3:SetOperation(c22751868.spop) - c:RegisterEffect(e3) -end -function c22751868.poscon(e,tp,eg,ep,ev,re,r,rp) - local a=Duel.GetAttacker() - local d=Duel.GetAttackTarget() - return a:IsControler(tp) and a:IsSetCard(0x11) and d:IsFaceup() -end -function c22751868.postg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.GetAttackTarget():CreateEffectRelation(e) -end -function c22751868.posop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetAttackTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - Duel.ChangePosition(tc,POS_FACEUP_DEFENCE,0,POS_FACEUP_ATTACK,0) - end -end -function c22751868.spcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsReason(REASON_DESTROY) and c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousPosition(POS_FACEUP) -end -function c22751868.filter(c,e,tp) - return c:IsLevelAbove(4) and c:IsSetCard(0x11) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c22751868.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c22751868.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c22751868.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c22751868.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c22751868.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c22754505.lua b/script/c22754505.lua deleted file mode 100644 index 4678c77d49..0000000000 --- a/script/c22754505.lua +++ /dev/null @@ -1,52 +0,0 @@ ---スモール・ピース・ゴーレム -function c22754505.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(22754505,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetCondition(c22754505.spcon) - e1:SetTarget(c22754505.sptg) - e1:SetOperation(c22754505.spop) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e2) - local e3=e1:Clone() - e3:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - c:RegisterEffect(e3) -end -function c22754505.cfilter(c) - return c:IsFaceup() and c:IsCode(25247218) -end -function c22754505.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c22754505.cfilter,tp,LOCATION_ONFIELD,0,1,nil) -end -function c22754505.filter(c,e,tp) - return c:IsCode(58843503) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c22754505.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c22754505.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c22754505.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c22754505.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - local tc=g:GetFirst() - if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1,true) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e2,true) - Duel.SpecialSummonComplete() - end -end diff --git a/script/c22765132.lua b/script/c22765132.lua deleted file mode 100644 index 35990097d7..0000000000 --- a/script/c22765132.lua +++ /dev/null @@ -1,61 +0,0 @@ ---EMコール -function c22765132.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCondition(c22765132.condition) - e1:SetTarget(c22765132.target) - e1:SetOperation(c22765132.activate) - c:RegisterEffect(e1) -end -function c22765132.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetAttacker():IsControler(1-tp) and Duel.GetAttackTarget()==nil -end -function c22765132.filter(c,def) - return c:IsSetCard(0x9f) and c:IsDefenceBelow(def) and c:IsAbleToHand() -end -function c22765132.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local at=Duel.GetAttacker() - if chkc then return chkc==at end - if chk==0 then return at:IsOnField() and at:IsCanBeEffectTarget(e) - and Duel.IsExistingMatchingCard(c22765132.filter,tp,LOCATION_DECK,0,1,nil,at:GetAttack()) end - Duel.SetTargetCard(at) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c22765132.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if Duel.NegateAttack() then - local val=tc:GetAttack() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g1=Duel.SelectMatchingCard(tp,c22765132.filter,tp,LOCATION_DECK,0,1,1,nil,val) - local sc=g1:GetFirst() - if sc then - val=val-sc:GetDefence() - if Duel.IsExistingMatchingCard(c22765132.filter,tp,LOCATION_DECK,0,1,sc,val) - and Duel.SelectYesNo(tp,aux.Stringid(22765132,0)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g2=Duel.SelectMatchingCard(tp,c22765132.filter,tp,LOCATION_DECK,0,1,1,sc,val) - g1:Merge(g2) - end - Duel.SendtoHand(g1,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g1) - end - end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetTargetRange(1,0) - e1:SetTarget(c22765132.sumlimit) - if Duel.GetTurnPlayer()==tp then - e1:SetReset(RESET_PHASE+PHASE_END+RESET_SELF_TURN,2) - else - e1:SetReset(RESET_PHASE+PHASE_END+RESET_SELF_TURN) - end - Duel.RegisterEffect(e1,tp) -end -function c22765132.sumlimit(e,c,sump,sumtype,sumpos,targetp,se) - return c:IsLocation(LOCATION_EXTRA) -end diff --git a/script/c22790789.lua b/script/c22790789.lua deleted file mode 100644 index c944dc6e41..0000000000 --- a/script/c22790789.lua +++ /dev/null @@ -1,91 +0,0 @@ ---巨大戦艦 クリスタル・コア -function c22790789.initial_effect(c) - --summon success - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(22790789,0)) - e1:SetCategory(CATEGORY_COUNTER) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c22790789.addct) - e1:SetOperation(c22790789.addc) - c:RegisterEffect(e1) - --battle indestructable - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e2:SetValue(1) - c:RegisterEffect(e2) - --remove counter - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(22790789,1)) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e3:SetCode(EVENT_DAMAGE_STEP_END) - e3:SetCondition(c22790789.rctcon) - e3:SetOperation(c22790789.rctop) - c:RegisterEffect(e3) - --destroy - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(22790789,2)) - e4:SetCategory(CATEGORY_DESTROY) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e4:SetCode(EVENT_DAMAGE_STEP_END) - e4:SetCondition(c22790789.descon) - e4:SetTarget(c22790789.destg) - e4:SetOperation(c22790789.desop) - c:RegisterEffect(e4) - --pos - local e5=Effect.CreateEffect(c) - e5:SetDescription(aux.Stringid(22790789,3)) - e5:SetCategory(CATEGORY_POSITION) - e5:SetProperty(EFFECT_FLAG_CARD_TARGET) - e5:SetType(EFFECT_TYPE_IGNITION) - e5:SetRange(LOCATION_MZONE) - e5:SetCountLimit(1) - e5:SetTarget(c22790789.postg) - e5:SetOperation(c22790789.posop) - c:RegisterEffect(e5) -end -function c22790789.addct(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,3,0,0x1f) -end -function c22790789.addc(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - e:GetHandler():AddCounter(0x1f,3) - end -end -function c22790789.rctcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetCounter(0x1f)~=0 -end -function c22790789.rctop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFaceup() and c:IsRelateToEffect(e) then - c:RemoveCounter(tp,0x1f,1,REASON_EFFECT) - end -end -function c22790789.descon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetCounter(0x1f)==0 -end -function c22790789.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0) -end -function c22790789.desop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFaceup() and c:IsRelateToEffect(e) then - Duel.Destroy(c,REASON_EFFECT) - end -end -function c22790789.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsPosition(POS_FACEUP_ATTACK) end - if chk==0 then return Duel.IsExistingTarget(Card.IsPosition,tp,0,LOCATION_MZONE,1,nil,POS_FACEUP_ATTACK) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE) - local g=Duel.SelectTarget(tp,Card.IsPosition,tp,0,LOCATION_MZONE,1,1,nil,POS_FACEUP_ATTACK) - Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0) -end -function c22790789.posop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsPosition(POS_FACEUP_ATTACK) and tc:IsRelateToEffect(e) then - Duel.ChangePosition(tc,POS_FACEUP_DEFENCE) - end -end diff --git a/script/c22796548.lua b/script/c22796548.lua deleted file mode 100644 index bd46342a1d..0000000000 --- a/script/c22796548.lua +++ /dev/null @@ -1,43 +0,0 @@ ---デーモンの宣告 -function c22796548.initial_effect(c) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --announce - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(22796548,0)) - e2:SetCategory(CATEGORY_TOHAND) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_SZONE) - e2:SetCountLimit(1) - e2:SetCost(c22796548.cost) - e2:SetTarget(c22796548.target) - e2:SetOperation(c22796548.operation) - c:RegisterEffect(e2) -end -function c22796548.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,500) end - Duel.PayLPCost(tp,500) -end -function c22796548.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,1) - and Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,LOCATION_DECK,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,0) - local ac=Duel.AnnounceCard(tp) - e:SetLabel(ac) -end -function c22796548.operation(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) or not Duel.IsPlayerCanDiscardDeck(tp,1) then return end - Duel.ConfirmDecktop(tp,1) - local g=Duel.GetDecktopGroup(tp,1) - local tc=g:GetFirst() - if tc:GetCode()==e:GetLabel() and tc:IsAbleToHand() then - Duel.DisableShuffleCheck() - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ShuffleHand(tp) - else - Duel.DisableShuffleCheck() - Duel.SendtoGrave(tc,REASON_EFFECT+REASON_REVEAL) - end -end diff --git a/script/c22804644.lua b/script/c22804644.lua deleted file mode 100644 index 69911734d1..0000000000 --- a/script/c22804644.lua +++ /dev/null @@ -1,79 +0,0 @@ ---デス・ウイルス・ドラゴン -function c22804644.initial_effect(c) - c:EnableReviveLimit() - --spsummon condition - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - c:RegisterEffect(e1) - -- - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetTarget(c22804644.target) - e2:SetOperation(c22804644.operation) - c:RegisterEffect(e2) -end -c22804644.material_trap=57728570 -function c22804644.tgfilter(c) - return c:IsFaceup() and c:GetAttack()>=1500 and c:IsDestructable() -end -function c22804644.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local g=Duel.GetMatchingGroup(c22804644.tgfilter,tp,0,LOCATION_MZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c22804644.filter(c) - return c:IsType(TYPE_MONSTER) and c:IsAttackAbove(1500) -end -function c22804644.operation(e,tp,eg,ep,ev,re,r,rp) - local conf=Duel.GetFieldGroup(tp,0,LOCATION_MZONE+LOCATION_HAND) - if conf:GetCount()>0 then - Duel.ConfirmCards(tp,conf) - local dg=conf:Filter(c22804644.filter,nil) - Duel.Destroy(dg,REASON_EFFECT) - Duel.ShuffleHand(1-tp) - end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetProperty(EFFECT_FLAG_DELAY) - e1:SetCode(EVENT_DRAW) - e1:SetOperation(c22804644.desop) - e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN,3) - Duel.RegisterEffect(e1,tp) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_PHASE+PHASE_END) - e2:SetCountLimit(1) - e2:SetCondition(c22804644.turncon) - e2:SetOperation(c22804644.turnop) - e2:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN,3) - Duel.RegisterEffect(e2,tp) - e2:SetLabelObject(e1) - e:GetHandler():RegisterFlagEffect(1082946,RESET_PHASE+PHASE_END+RESET_OPPO_TURN,0,3) - c22804644[e:GetHandler()]=e2 -end -function c22804644.desop(e,tp,eg,ep,ev,re,r,rp) - if ep==e:GetOwnerPlayer() then return end - local hg=eg:Filter(Card.IsLocation,nil,LOCATION_HAND) - if hg:GetCount()==0 then return end - Duel.ConfirmCards(1-ep,hg) - local dg=hg:Filter(c22804644.filter,nil) - Duel.Destroy(dg,REASON_EFFECT) - Duel.ShuffleHand(ep) -end -function c22804644.turncon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp -end -function c22804644.turnop(e,tp,eg,ep,ev,re,r,rp) - local ct=e:GetLabel() - ct=ct+1 - e:SetLabel(ct) - e:GetHandler():SetTurnCounter(ct) - if ct==3 then - e:GetLabelObject():Reset() - e:GetOwner():ResetFlagEffect(1082946) - end -end diff --git a/script/c22812068.lua b/script/c22812068.lua deleted file mode 100644 index 587e4bc036..0000000000 --- a/script/c22812068.lua +++ /dev/null @@ -1,17 +0,0 @@ ---機甲忍者アース -function c22812068.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c22812068.spcon) - c:RegisterEffect(e1) -end -function c22812068.spcon(e,c) - if c==nil then return true end - return Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0,nil)==0 - and Duel.GetFieldGroupCount(c:GetControler(),0,LOCATION_MZONE,nil)>0 - and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 -end diff --git a/script/c22835145.lua b/script/c22835145.lua deleted file mode 100644 index a4bf7f9261..0000000000 --- a/script/c22835145.lua +++ /dev/null @@ -1,38 +0,0 @@ ---BF-極北のブリザード -function c22835145.initial_effect(c) - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(aux.FALSE) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(22835145,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_SUMMON_SUCCESS) - e2:SetTarget(c22835145.target) - e2:SetOperation(c22835145.operation) - c:RegisterEffect(e2) -end -function c22835145.filter(c,e,tp) - return c:IsLevelBelow(4) and c:IsSetCard(0x33) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c22835145.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:GetControler()==tp and chkc:GetLocation()==LOCATION_GRAVE and c22835145.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c22835145.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c22835145.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,g:GetCount(),0,0) -end -function c22835145.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENCE) - end -end diff --git a/script/c22837504.lua b/script/c22837504.lua deleted file mode 100644 index 0b098b7ec3..0000000000 --- a/script/c22837504.lua +++ /dev/null @@ -1,30 +0,0 @@ ---霞の谷の戦士 -function c22837504.initial_effect(c) - --return hand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(22837504,0)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_DAMAGE_STEP_END) - e1:SetCondition(c22837504.retcon) - e1:SetTarget(c22837504.rettg) - e1:SetOperation(c22837504.retop) - c:RegisterEffect(e1) -end -function c22837504.retcon(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToBattle() then return false end - local t=nil - if ev==0 then t=Duel.GetAttackTarget() - else t=Duel.GetAttacker() end - e:SetLabelObject(t) - return t and t:IsRelateToBattle() -end -function c22837504.rettg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetLabelObject(),1,0,0) -end -function c22837504.retop(e,tp,eg,ep,ev,re,r,rp) - if e:GetLabelObject():IsRelateToBattle() then - Duel.SendtoHand(e:GetLabelObject(),nil,REASON_EFFECT) - end -end diff --git a/script/c22842126.lua b/script/c22842126.lua deleted file mode 100644 index 2949b916d2..0000000000 --- a/script/c22842126.lua +++ /dev/null @@ -1,65 +0,0 @@ ---汎神の帝王 -function c22842126.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(22842126,0)) - e1:SetCategory(CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCost(c22842126.cost) - e1:SetTarget(c22842126.target) - e1:SetOperation(c22842126.activate) - c:RegisterEffect(e1) - --to hand - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(22842126,1)) - e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_GRAVE) - e2:SetCountLimit(1,22842126) - e2:SetCost(c22842126.thcost) - e2:SetTarget(c22842126.thtg) - e2:SetOperation(c22842126.thop) - c:RegisterEffect(e2) -end -function c22842126.cfilter(c) - return c:IsSetCard(0xbe) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToGraveAsCost() -end -function c22842126.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c22842126.cfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,c22842126.cfilter,1,1,REASON_COST,nil) -end -function c22842126.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp,2) end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(2) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2) -end -function c22842126.activate(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end -function c22842126.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) -end -function c22842126.thfilter(c) - return c:IsSetCard(0xbe) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand() -end -function c22842126.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c22842126.thfilter,tp,LOCATION_DECK,0,3,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c22842126.thop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c22842126.thfilter,tp,LOCATION_DECK,0,nil) - if g:GetCount()>=3 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local sg=g:Select(tp,3,3,nil) - Duel.ConfirmCards(1-tp,sg) - Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_ATOHAND) - local tg=sg:Select(1-tp,1,1,nil) - Duel.SendtoHand(tg,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tg) - end -end diff --git a/script/c22842214.lua b/script/c22842214.lua deleted file mode 100644 index 3b5a37e8db..0000000000 --- a/script/c22842214.lua +++ /dev/null @@ -1,103 +0,0 @@ ---シー・ランサー -function c22842214.initial_effect(c) - --equip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(22842214,0)) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_NO_TURN_RESET+EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetTarget(c22842214.eqtg) - e1:SetOperation(c22842214.eqop) - c:RegisterEffect(e1) - --Destroy replace - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EFFECT_DESTROY_REPLACE) - e2:SetTarget(c22842214.desreptg) - e2:SetOperation(c22842214.desrepop) - c:RegisterEffect(e2) - --atkup - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e3:SetRange(LOCATION_MZONE) - e3:SetCode(EFFECT_UPDATE_ATTACK) - e3:SetCondition(c22842214.atcon) - e3:SetValue(1000) - c:RegisterEffect(e3) -end -function c22842214.filter(c) - return c:IsFaceup() and c:IsRace(RACE_FISH+RACE_AQUA+RACE_SEASERPENT) -end -function c22842214.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and c22842214.filter(chkc) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingTarget(c22842214.filter,tp,LOCATION_REMOVED,0,1,nil) end - local fc=Duel.GetLocationCount(tp,LOCATION_SZONE) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local g=Duel.SelectTarget(tp,c22842214.filter,tp,LOCATION_REMOVED,0,1,fc,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,g:GetCount(),0,0) -end -function c22842214.eqlimit(e,c) - return e:GetOwner()==c -end -function c22842214.eqop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) - local tg0=g:Filter(Card.IsRelateToEffect,nil,e) - local ft=Duel.GetLocationCount(tp,LOCATION_SZONE) - if tg0:GetCount()==0 or ft<=0 then return end - if c:IsFaceup() and c:IsRelateToEffect(e) then - local tg=nil - if ft0 then - local tc=tg:GetFirst() - while tc do - Duel.Equip(tp,tc,c,false,true) - tc:RegisterFlagEffect(22842214,RESET_EVENT+0x1fe0000,0,0) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetProperty(EFFECT_FLAG_COPY_INHERIT+EFFECT_FLAG_OWNER_RELATE) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(c22842214.eqlimit) - tc:RegisterEffect(e1) - tc=tg:GetNext() - end - Duel.EquipComplete() - end - else - Duel.SendtoGrave(tg0,REASON_EFFECT) - end -end -function c22842214.eqfilter(c,ec) - return c:GetFlagEffect(22842214)~=0 and c:IsHasCardTarget(ec) and not c:IsStatus(STATUS_DESTROY_CONFIRMED) -end -function c22842214.desreptg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return not c:IsReason(REASON_REPLACE) and Duel.IsExistingMatchingCard(c22842214.eqfilter,tp,LOCATION_SZONE,LOCATION_SZONE,1,nil,c) end - if Duel.SelectYesNo(tp,aux.Stringid(22842214,1)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESREPLACE) - local tc=Duel.SelectMatchingCard(tp,c22842214.eqfilter,tp,LOCATION_SZONE,LOCATION_SZONE,1,1,nil,c):GetFirst() - e:SetLabelObject(tc) - tc:SetStatus(STATUS_DESTROY_CONFIRMED,true) - return true - else return false end -end -function c22842214.desrepop(e,tp,eg,ep,ev,re,r,rp) - local g=e:GetLabelObject() - g:SetStatus(STATUS_DESTROY_CONFIRMED,false) - Duel.Destroy(g,REASON_EFFECT+REASON_REPLACE) -end -function c22842214.atcon(e) - return Duel.IsExistingMatchingCard(c22842214.eqfilter,e:GetHandlerPlayer(),LOCATION_SZONE,LOCATION_SZONE,1,nil,e:GetHandler()) -end diff --git a/script/c22858242.lua b/script/c22858242.lua deleted file mode 100644 index a22b0956ea..0000000000 --- a/script/c22858242.lua +++ /dev/null @@ -1,58 +0,0 @@ ---猿魔王ゼーマン -function c22858242.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure2(c,aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_DARK),aux.NonTuner(Card.IsRace,RACE_BEAST)) - c:EnableReviveLimit() - --actlimit - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetOperation(c22858242.lmop) - c:RegisterEffect(e1) - --negate attack - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(22858242,0)) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_ATTACK_ANNOUNCE) - e2:SetRange(LOCATION_MZONE) - e2:SetCondition(c22858242.condition) - e2:SetCost(c22858242.cost) - e2:SetTarget(c22858242.target) - e2:SetOperation(c22858242.activate) - c:RegisterEffect(e2) -end -function c22858242.lmop(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EFFECT_CANNOT_ACTIVATE) - e1:SetTargetRange(0,1) - e1:SetValue(c22858242.aclimit) - e1:SetReset(RESET_PHASE+PHASE_DAMAGE) - Duel.RegisterEffect(e1,tp) -end -function c22858242.aclimit(e,re,tp) - return re:IsHasType(EFFECT_TYPE_ACTIVATE) -end -function c22858242.condition(e,tp,eg,ep,ev,re,r,rp) - return eg:GetFirst():IsControler(1-tp) -end -function c22858242.cfilter(c) - return c:IsType(TYPE_MONSTER) and c:IsAbleToGraveAsCost() -end -function c22858242.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c22858242.cfilter,tp,LOCATION_MZONE+LOCATION_HAND,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c22858242.cfilter,tp,LOCATION_MZONE+LOCATION_HAND,0,1,1,nil) - Duel.SendtoGrave(g,REASON_COST) -end -function c22858242.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local tg=Duel.GetAttacker() - if chkc then return chkc==tg end - if chk==0 then return tg:IsOnField() and tg:IsCanBeEffectTarget(e) end - Duel.SetTargetCard(tg) -end -function c22858242.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateAttack() -end diff --git a/script/c22869904.lua b/script/c22869904.lua deleted file mode 100644 index 64af3533b5..0000000000 --- a/script/c22869904.lua +++ /dev/null @@ -1,37 +0,0 @@ ---魔力誘爆 -function c22869904.initial_effect(c) - Duel.EnableGlobalFlag(GLOBALFLAG_DELAYED_QUICKEFFECT) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCondition(c22869904.condition) - e1:SetTarget(c22869904.target) - e1:SetOperation(c22869904.activate) - c:RegisterEffect(e1) -end -function c22869904.cfilter(c,tp) - return c:IsType(TYPE_SPELL) and c:IsPreviousLocation(LOCATION_SZONE) and c:IsPreviousPosition(POS_FACEUP) - and c:GetPreviousControler()==1-tp and c:GetPreviousSequence()~=5 -end -function c22869904.condition(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c22869904.cfilter,1,nil,tp) -end -function c22869904.filter(c) - return c:IsFaceup() and c:IsDestructable() -end -function c22869904.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c22869904.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c22869904.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c22869904.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c22869904.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c22873798.lua b/script/c22873798.lua deleted file mode 100644 index 85c5577467..0000000000 --- a/script/c22873798.lua +++ /dev/null @@ -1,33 +0,0 @@ ---ハイエナ -function c22873798.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(22873798,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetCondition(c22873798.condition) - e1:SetTarget(c22873798.target) - e1:SetOperation(c22873798.operation) - c:RegisterEffect(e1) -end -function c22873798.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) -end -function c22873798.filter(c,e,tp) - return c:IsCode(22873798) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c22873798.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c22873798.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c22873798.operation(e,tp,eg,ep,ev,re,r,rp) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ft<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c22873798.filter,tp,LOCATION_DECK,0,1,ft,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c22888900.lua b/script/c22888900.lua deleted file mode 100644 index 074d7587f3..0000000000 --- a/script/c22888900.lua +++ /dev/null @@ -1,56 +0,0 @@ ---グリザイユの牢獄 -function c22888900.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_DRAW_PHASE) - e1:SetCondition(c22888900.condition) - e1:SetOperation(c22888900.operation) - c:RegisterEffect(e1) -end -function c22888900.cfilter(c) - local sumtype=c:GetSummonType() - return c:IsFaceup() and (bit.band(sumtype,SUMMON_TYPE_ADVANCE)==SUMMON_TYPE_ADVANCE - or bit.band(sumtype,SUMMON_TYPE_RITUAL)==SUMMON_TYPE_RITUAL - or bit.band(sumtype,SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION) -end -function c22888900.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c22888900.cfilter,tp,LOCATION_MZONE,0,1,nil) -end -function c22888900.operation(e,tp,eg,ep,ev,re,r,rp) - -- - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e1:SetTarget(c22888900.tg) - e1:SetCode(EFFECT_DISABLE) - if Duel.GetTurnPlayer()~=tp then - e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN,2) - else - e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN) - end - Duel.RegisterEffect(e1,tp) - local e2=e1:Clone() - e2:SetCode(EFFECT_CANNOT_ATTACK) - Duel.RegisterEffect(e2,tp) - -- - local e3=Effect.CreateEffect(e:GetHandler()) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e3:SetTargetRange(1,1) - e3:SetTarget(c22888900.splimit) - if Duel.GetTurnPlayer()~=tp then - e3:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN,2) - else - e3:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN) - end - Duel.RegisterEffect(e3,tp) -end -function c22888900.tg(e,c) - return c:IsType(TYPE_SYNCHRO+TYPE_XYZ) -end -function c22888900.splimit(e,c,tp,sumtp,sumpos) - return bit.band(sumtp,SUMMON_TYPE_SYNCHRO)==SUMMON_TYPE_SYNCHRO or bit.band(sumtp,SUMMON_TYPE_XYZ)==SUMMON_TYPE_XYZ -end diff --git a/script/c22900598.lua b/script/c22900598.lua deleted file mode 100644 index 10e7f7dd18..0000000000 --- a/script/c22900598.lua +++ /dev/null @@ -1,46 +0,0 @@ ---ヴァンパイア・シフト -function c22900598.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,22900598+EFFECT_COUNT_CODE_OATH) - e1:SetCondition(c22900598.condition) - e1:SetTarget(c22900598.target) - e1:SetOperation(c22900598.activate) - c:RegisterEffect(e1) -end -function c22900598.condition(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetFieldCard(tp,LOCATION_SZONE,5)~=nil then return false end - local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil) - return g:GetCount()>0 and g:FilterCount(Card.IsRace,nil,RACE_ZOMBIE)==g:GetCount() -end -function c22900598.filter(c,tp) - return c:IsCode(62188962) and c:GetActivateEffect():IsActivatable(tp) -end -function c22900598.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c22900598.filter,tp,LOCATION_DECK,0,1,nil,tp) end -end -function c22900598.spfilter(c,e,tp) - return c:IsSetCard(0x8e) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsHasEffect(EFFECT_NECRO_VALLEY) -end -function c22900598.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstMatchingCard(c22900598.filter,tp,LOCATION_DECK,0,nil,tp) - if tc then - Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) - local te=tc:GetActivateEffect() - local tep=tc:GetControler() - local cost=te:GetCost() - if cost then cost(te,tep,eg,ep,ev,re,r,rp,1) end - Duel.RaiseEvent(tc,EVENT_CHAIN_SOLVED,tc:GetActivateEffect(),0,tp,tp,Duel.GetCurrentChain()) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local sg=Duel.GetMatchingGroup(c22900598.spfilter,tp,LOCATION_GRAVE,0,nil,e,tp) - if sg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(22900598,0)) then - Duel.BreakEffect() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=sg:Select(tp,1,1,nil) - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENCE) - end - end -end diff --git a/script/c22923081.lua b/script/c22923081.lua deleted file mode 100644 index 01e15cc742..0000000000 --- a/script/c22923081.lua +++ /dev/null @@ -1,80 +0,0 @@ ---黒魔導戦士 ブレイカー -function c22923081.initial_effect(c) - c:EnableCounterPermit(0x3001) - --summon success - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(22923081,0)) - e1:SetCategory(CATEGORY_COUNTER) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c22923081.addtg) - e1:SetOperation(c22923081.addop) - e1:SetLabel(2) - c:RegisterEffect(e1) - --spsummon success - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(22923081,1)) - e2:SetCategory(CATEGORY_COUNTER) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetCondition(c22923081.addcon) - e2:SetTarget(c22923081.addtg) - e2:SetOperation(c22923081.addop) - e2:SetLabel(3) - c:RegisterEffect(e2) - --atk - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e3:SetRange(LOCATION_MZONE) - e3:SetCode(EFFECT_UPDATE_ATTACK) - e3:SetValue(c22923081.atkval) - c:RegisterEffect(e3) - --destroy - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(22923081,2)) - e4:SetCategory(CATEGORY_DESTROY) - e4:SetType(EFFECT_TYPE_IGNITION) - e4:SetRange(LOCATION_MZONE) - e4:SetProperty(EFFECT_FLAG_CARD_TARGET) - e4:SetCountLimit(1,22923081) - e4:SetCost(c22923081.descost) - e4:SetTarget(c22923081.destg) - e4:SetOperation(c22923081.desop) - c:RegisterEffect(e4) -end -function c22923081.addtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,e:GetLabel(),0,0x3001) -end -function c22923081.addop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - e:GetHandler():AddCounter(0x3001,e:GetLabel()) - end -end -function c22923081.addcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_PENDULUM -end -function c22923081.atkval(e,c) - return c:GetCounter(0x3001)*400 -end -function c22923081.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsCanRemoveCounter(tp,0x3001,1,REASON_COST) end - e:GetHandler():RemoveCounter(tp,0x3001,1,REASON_COST) -end -function c22923081.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable() -end -function c22923081.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and c22923081.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c22923081.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c22923081.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c22923081.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c2295440.lua b/script/c2295440.lua deleted file mode 100644 index aec45fda4b..0000000000 --- a/script/c2295440.lua +++ /dev/null @@ -1,47 +0,0 @@ ---ワン・フォー・ワン -function c2295440.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c2295440.cost) - e1:SetTarget(c2295440.target) - e1:SetOperation(c2295440.activate) - c:RegisterEffect(e1) -end -function c2295440.costfilter(c,e,tp) - return c:IsType(TYPE_MONSTER) and c:IsAbleToGraveAsCost() - and Duel.IsExistingMatchingCard(c2295440.filter,tp,LOCATION_HAND+LOCATION_DECK,0,1,c,e,tp) -end -function c2295440.filter(c,e,tp) - return c:GetLevel()==1 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c2295440.cost(e,tp,eg,ep,ev,re,r,rp,chk) - e:SetLabel(1) - return true -end -function c2295440.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return false end - if e:GetLabel()~=0 then - e:SetLabel(0) - return Duel.IsExistingMatchingCard(c2295440.costfilter,tp,LOCATION_HAND,0,1,nil,e,tp) - else - return Duel.IsExistingMatchingCard(c2295440.filter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) - end - end - if e:GetLabel()~=0 then - e:SetLabel(0) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c2295440.costfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - Duel.SendtoGrave(g,REASON_COST) - end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) -end -function c2295440.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c2295440.filter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp) - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) -end diff --git a/script/c2295831.lua b/script/c2295831.lua deleted file mode 100644 index 4aa6b94018..0000000000 --- a/script/c2295831.lua +++ /dev/null @@ -1,53 +0,0 @@ ---ピースの輪 -function c2295831.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_TO_HAND) - e1:SetCondition(c2295831.regcon) - e1:SetOperation(c2295831.regop) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e2:SetType(EFFECT_TYPE_ACTIVATE) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetCondition(c2295831.condition) - e2:SetCost(c2295831.cost) - e2:SetTarget(c2295831.target) - e2:SetOperation(c2295831.activate) - c:RegisterEffect(e2) -end -function c2295831.regcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,0)==0 and Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>=3 - and Duel.GetCurrentPhase()==PHASE_DRAW and c:IsReason(REASON_DRAW) and c:IsReason(REASON_RULE) -end -function c2295831.regop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if Duel.SelectYesNo(tp,aux.Stringid(2295831,0)) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_PUBLIC) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_MAIN1) - c:RegisterEffect(e1) - c:RegisterFlagEffect(2295831,RESET_PHASE+PHASE_MAIN1,0,1) - end -end -function c2295831.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()==PHASE_MAIN1 -end -function c2295831.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():GetFlagEffect(2295831)~=0 end -end -function c2295831.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c2295831.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,Card.IsAbleToHand,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c22959079.lua b/script/c22959079.lua deleted file mode 100644 index 106bdbea80..0000000000 --- a/script/c22959079.lua +++ /dev/null @@ -1,61 +0,0 @@ ---ワーム・ホール -function c22959079.initial_effect(c) - --remove - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_REMOVE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c22959079.target) - e1:SetOperation(c22959079.operation) - c:RegisterEffect(e1) -end -function c22959079.filter(c) - return c:IsAbleToRemove() -end -function c22959079.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c22959079.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c22959079.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,c22959079.filter,tp,LOCATION_MZONE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) -end -function c22959079.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - local seq=tc:GetSequence() - if tc:IsControler(1-tp) then seq=seq+16 end - if tc:IsRelateToEffect(e) and Duel.Remove(tc,0,REASON_EFFECT+REASON_TEMPORARY)~=0 then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) - e1:SetReset(RESET_PHASE+PHASE_STANDBY,2) - e1:SetLabelObject(tc) - e1:SetCountLimit(1) - e1:SetCondition(c22959079.rtcon) - e1:SetOperation(c22959079.retop) - Duel.RegisterEffect(e1,tp) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_DISABLE_FIELD) - e2:SetReset(RESET_PHASE+PHASE_DRAW,2) - e2:SetLabel(seq) - e2:SetLabelObject(tc) - e2:SetCondition(c22959079.discon) - e2:SetOperation(c22959079.disop) - Duel.RegisterEffect(e2,tp) - end -end -function c22959079.rtcon(e,tp,eg,ep,ev,re,r,rp) - return tp==Duel.GetTurnPlayer() -end -function c22959079.retop(e,tp,eg,ep,ev,re,r,rp) - Duel.ReturnToField(e:GetLabelObject()) -end -function c22959079.discon(e,c) - if e:GetLabelObject():IsLocation(LOCATION_REMOVED) then return true end - return false -end -function c22959079.disop(e,tp) - local dis1=bit.lshift(0x1,e:GetLabel()) - return dis1 -end diff --git a/script/c22991179.lua b/script/c22991179.lua deleted file mode 100644 index e63becd779..0000000000 --- a/script/c22991179.lua +++ /dev/null @@ -1,41 +0,0 @@ ---無視加護 -function c22991179.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --negate attack - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(22991179,0)) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetRange(LOCATION_SZONE) - e2:SetCode(EVENT_ATTACK_ANNOUNCE) - e2:SetCondition(c22991179.condition) - e2:SetCost(c22991179.cost) - e2:SetTarget(c22991179.target) - e2:SetOperation(c22991179.activate) - c:RegisterEffect(e2) -end -function c22991179.condition(e,tp,eg,ep,ev,re,r,rp) - return tp~=Duel.GetTurnPlayer() -end -function c22991179.cfilter(c) - return c:IsRace(RACE_INSECT) and c:IsAbleToRemoveAsCost() -end -function c22991179.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c22991179.cfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c22991179.cfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c22991179.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local tg=Duel.GetAttacker() - if chkc then return chkc==tg end - if chk==0 then return tg:IsOnField() and tg:IsCanBeEffectTarget(e) end - Duel.SetTargetCard(tg) -end -function c22991179.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateAttack() -end diff --git a/script/c22993208.lua b/script/c22993208.lua deleted file mode 100644 index b30e97fa57..0000000000 --- a/script/c22993208.lua +++ /dev/null @@ -1,70 +0,0 @@ ---炎王の急襲 -function c22993208.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,22993208+EFFECT_COUNT_CODE_OATH) - e1:SetCondition(c22993208.condition) - e1:SetTarget(c22993208.target) - e1:SetOperation(c22993208.activate) - c:RegisterEffect(e1) -end -function c22993208.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0 - and Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 -end -function c22993208.spfilter(c,e,tp) - return c:IsAttribute(ATTRIBUTE_FIRE) and c:IsRace(RACE_BEAST+RACE_BEASTWARRIOR+RACE_WINDBEAST) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c22993208.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c22993208.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c22993208.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c22993208.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - local tc=g:GetFirst() - local c=e:GetHandler() - if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1,true) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e2,true) - tc:RegisterFlagEffect(22993208,RESET_EVENT+0x1fe0000,0,1) - local e3=Effect.CreateEffect(e:GetHandler()) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e3:SetCode(EVENT_PHASE+PHASE_END) - e3:SetCountLimit(1) - e3:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e3:SetLabelObject(tc) - e3:SetCondition(c22993208.descon) - e3:SetOperation(c22993208.desop) - Duel.RegisterEffect(e3,tp) - end - Duel.SpecialSummonComplete() -end -function c22993208.descon(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetLabelObject() - if tc:GetFlagEffect(22993208)~=0 then - return true - else - e:Reset() - return false - end -end -function c22993208.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetLabelObject() - Duel.Destroy(tc,REASON_EFFECT) -end diff --git a/script/c22996376.lua b/script/c22996376.lua deleted file mode 100644 index b3cf7298ac..0000000000 --- a/script/c22996376.lua +++ /dev/null @@ -1,64 +0,0 @@ ---百獣王 ベヒーモス -function c22996376.initial_effect(c) - --summon/set with 1 tribute - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(22996376,0)) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SUMMON_PROC) - e1:SetCondition(c22996376.otcon) - e1:SetOperation(c22996376.otop) - e1:SetValue(SUMMON_TYPE_ADVANCE) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_SET_PROC) - c:RegisterEffect(e2) - --salvage - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(22996376,1)) - e3:SetCategory(CATEGORY_TOHAND) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetCode(EVENT_SUMMON_SUCCESS) - e3:SetCondition(c22996376.thcon) - e3:SetTarget(c22996376.thtg) - e3:SetOperation(c22996376.thop) - c:RegisterEffect(e3) -end -function c22996376.otcon(e,c) - if c==nil then return true end - return c:GetLevel()>6 and Duel.GetTributeCount(c)>0 -end -function c22996376.otop(e,tp,eg,ep,ev,re,r,rp,c) - local g=Duel.SelectTribute(tp,c,1,1) - c:SetMaterial(g) - Duel.Release(g,REASON_SUMMON+REASON_MATERIAL) - --change base attack - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetReset(RESET_EVENT+0xff0000) - e1:SetCode(EFFECT_SET_BASE_ATTACK) - e1:SetValue(2000) - c:RegisterEffect(e1) -end -function c22996376.thcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_ADVANCE -end -function c22996376.filter(c) - return c:IsRace(RACE_BEAST) and c:IsAbleToHand() -end -function c22996376.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c22996376.filter(chkc) end - local ct=e:GetHandler():GetMaterialCount() - if chk==0 then return ct>0 and Duel.IsExistingTarget(c22996376.filter,tp,LOCATION_GRAVE,0,ct,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g=Duel.SelectTarget(tp,c22996376.filter,tp,LOCATION_GRAVE,0,ct,ct,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,ct,0,0) -end -function c22996376.thop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local sg=g:Filter(Card.IsRelateToEffect,nil,e) - Duel.SendtoHand(sg,nil,REASON_EFFECT) -end diff --git a/script/c23008320.lua b/script/c23008320.lua deleted file mode 100644 index 03b76c5410..0000000000 --- a/script/c23008320.lua +++ /dev/null @@ -1,26 +0,0 @@ ---コール・リゾネーター -function c23008320.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c23008320.target) - e1:SetOperation(c23008320.activate) - c:RegisterEffect(e1) -end -function c23008320.filter(c) - return c:IsSetCard(0x57) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() -end -function c23008320.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c23008320.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c23008320.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c23008320.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c23015896.lua b/script/c23015896.lua deleted file mode 100644 index 3d89be0962..0000000000 --- a/script/c23015896.lua +++ /dev/null @@ -1,100 +0,0 @@ ---炎王神獣 ガルドニクス -function c23015896.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetOperation(c23015896.spreg) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(23015896,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetRange(LOCATION_GRAVE) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) - e2:SetCondition(c23015896.spcon) - e2:SetTarget(c23015896.sptg) - e2:SetOperation(c23015896.spop) - e2:SetLabelObject(e1) - c:RegisterEffect(e2) - --destroy - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(23015896,1)) - e3:SetCategory(CATEGORY_DESTROY) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - e3:SetCondition(c23015896.descon) - e3:SetTarget(c23015896.destg) - e3:SetOperation(c23015896.desop) - c:RegisterEffect(e3) - --spsummon2 - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(23015896,2)) - e4:SetCategory(CATEGORY_SPECIAL_SUMMON) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e4:SetCode(EVENT_BATTLE_DESTROYED) - e4:SetCondition(c23015896.spcon2) - e4:SetTarget(c23015896.sptg2) - e4:SetOperation(c23015896.spop2) - c:RegisterEffect(e4) -end -function c23015896.spreg(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if bit.band(r,0x41)~=0x41 then return end - if Duel.GetCurrentPhase()==PHASE_STANDBY then - e:SetLabel(Duel.GetTurnCount()) - c:RegisterFlagEffect(23015896,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_STANDBY,0,2) - else - e:SetLabel(0) - c:RegisterFlagEffect(23015896,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_STANDBY,0,1) - end -end -function c23015896.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetLabelObject():GetLabel()~=Duel.GetTurnCount() and e:GetHandler():GetFlagEffect(23015896)>0 -end -function c23015896.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local c=e:GetHandler() - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0) - c:ResetFlagEffect(23015896) -end -function c23015896.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,1,tp,tp,false,false,POS_FACEUP) - end -end -function c23015896.descon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+1 -end -function c23015896.desfilter(c) - return c:IsDestructable() -end -function c23015896.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local g=Duel.GetMatchingGroup(c23015896.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c23015896.desop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c23015896.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,e:GetHandler()) - Duel.Destroy(g,REASON_EFFECT) -end -function c23015896.spcon2(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) -end -function c23015896.spfilter(c,e,tp) - return c:IsSetCard(0x81) and c:GetCode()~=23015896 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c23015896.sptg2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c23015896.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c23015896.spop2(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c23015896.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c23051413.lua b/script/c23051413.lua deleted file mode 100644 index 2cd20ca5cb..0000000000 --- a/script/c23051413.lua +++ /dev/null @@ -1,36 +0,0 @@ ---ナチュル・スタッグ -function c23051413.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(23051413,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCode(EVENT_CHAINING) - e1:SetCondition(c23051413.spcon) - e1:SetTarget(c23051413.sptg) - e1:SetOperation(c23051413.spop) - c:RegisterEffect(e1) -end -function c23051413.spcon(e,tp,eg,ep,ev,re,r,rp) - return rp~=tp and e:GetHandler()==Duel.GetAttacker() -end -function c23051413.filter(c,e,tp) - return c:IsSetCard(0x2a) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c23051413.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c23051413.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c23051413.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c23051413.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c23051413.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c23064604.lua b/script/c23064604.lua deleted file mode 100644 index 8de742a717..0000000000 --- a/script/c23064604.lua +++ /dev/null @@ -1,123 +0,0 @@ ---冥帝エレボス -function c23064604.initial_effect(c) - --summon with 1 tribute - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(23064604,0)) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SUMMON_PROC) - e1:SetCondition(c23064604.otcon) - e1:SetOperation(c23064604.otop) - e1:SetValue(SUMMON_TYPE_ADVANCE) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_SET_PROC) - c:RegisterEffect(e2) - --to grave - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(23064604,1)) - e3:SetCategory(CATEGORY_TOGRAVE+CATEGORY_TODECK) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_SUMMON_SUCCESS) - e3:SetProperty(EFFECT_FLAG_DELAY) - e3:SetCondition(c23064604.tdcon) - e3:SetTarget(c23064604.tdtg) - e3:SetOperation(c23064604.tdop) - c:RegisterEffect(e3) - --tohand - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(23064604,2)) - e4:SetCategory(CATEGORY_TOHAND) - e4:SetType(EFFECT_TYPE_QUICK_O) - e4:SetRange(LOCATION_GRAVE) - e4:SetProperty(EFFECT_FLAG_CARD_TARGET) - e4:SetCode(EVENT_FREE_CHAIN) - e4:SetCountLimit(1) - e4:SetCondition(c23064604.thcon) - e4:SetCost(c23064604.thcost) - e4:SetTarget(c23064604.thtg) - e4:SetOperation(c23064604.thop) - c:RegisterEffect(e4) -end -function c23064604.otfilter(c) - return bit.band(c:GetSummonType(),SUMMON_TYPE_ADVANCE)==SUMMON_TYPE_ADVANCE -end -function c23064604.otcon(e,c) - if c==nil then return true end - local mg=Duel.GetMatchingGroup(c23064604.otfilter,0,LOCATION_MZONE,LOCATION_MZONE,nil) - return c:GetLevel()>6 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-1 - and Duel.GetTributeCount(c,mg)>0 -end -function c23064604.otop(e,tp,eg,ep,ev,re,r,rp,c) - local mg=Duel.GetMatchingGroup(c23064604.otfilter,0,LOCATION_MZONE,LOCATION_MZONE,nil) - local sg=Duel.SelectTribute(tp,c,1,1,mg) - c:SetMaterial(sg) - Duel.Release(sg,REASON_SUMMON+REASON_MATERIAL) -end -function c23064604.tdcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_ADVANCE -end -function c23064604.tgfilter(c) - return c:IsSetCard(0xbe) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToGrave() -end -function c23064604.tdtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local g=Duel.GetMatchingGroup(c23064604.tgfilter,tp,LOCATION_HAND+LOCATION_DECK,0,nil) - return g:GetClassCount(Card.GetCode)>1 - and Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,0,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE,1,nil) - end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,2,tp,LOCATION_DECK) - Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,1-tp,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE) -end -function c23064604.tdop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c23064604.tgfilter,tp,LOCATION_HAND+LOCATION_DECK,0,nil) - if g:GetClassCount(Card.GetCode)<2 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local tg1=g:Select(tp,1,1,nil) - g:Remove(Card.IsCode,nil,tg1:GetFirst():GetCode()) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local tg2=g:Select(tp,1,1,nil) - tg1:Merge(tg2) - if Duel.SendtoGrave(tg1,REASON_EFFECT)~=0 then - local sg=nil - local tg=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,0,LOCATION_HAND,nil) - if tg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(23064604,3)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - sg=tg:RandomSelect(tp,1) - else - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - sg=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,1,1,nil) - end - if sg:GetCount()>0 then - Duel.SendtoDeck(sg,nil,2,REASON_EFFECT) - end - end -end -function c23064604.thcon(e,tp,eg,ep,ev,re,r,rp) - local ph=Duel.GetCurrentPhase() - return ph==PHASE_MAIN1 or ph==PHASE_MAIN2 -end -function c23064604.cfilter(c) - return c:IsSetCard(0xbe) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDiscardable() -end -function c23064604.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c23064604.cfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,c23064604.cfilter,1,1,REASON_COST+REASON_DISCARD) -end -function c23064604.thfilter(c) - return c:IsAttackAbove(2400) and c:GetDefence()==1000 and c:IsAbleToHand() -end -function c23064604.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c23064604.thfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c23064604.thfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c23064604.thfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c23064604.thop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end diff --git a/script/c23087070.lua b/script/c23087070.lua deleted file mode 100644 index 5349bd6ae7..0000000000 --- a/script/c23087070.lua +++ /dev/null @@ -1,12 +0,0 @@ ---ローズ・ウィッチ -function c23087070.initial_effect(c) - --double tribute - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DOUBLE_TRIBUTE) - e1:SetValue(c23087070.condition) - c:RegisterEffect(e1) -end -function c23087070.condition(e,c) - return c:IsRace(RACE_PLANT) -end diff --git a/script/c23093604.lua b/script/c23093604.lua deleted file mode 100644 index 3120d4cd80..0000000000 --- a/script/c23093604.lua +++ /dev/null @@ -1,36 +0,0 @@ ---X-セイバー パシウル -function c23093604.initial_effect(c) - --damage - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(23093604,0)) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCondition(c23093604.condition) - e1:SetTarget(c23093604.target) - e1:SetOperation(c23093604.operation) - c:RegisterEffect(e1) - --battle indestructable - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e2:SetValue(1) - c:RegisterEffect(e2) -end -function c23093604.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsFaceup() and e:GetHandler():IsDefencePos() and Duel.GetTurnPlayer()~=tp -end -function c23093604.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(1000) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,0,0,tp,1000) -end -function c23093604.operation(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) or e:GetHandler():IsFacedown() then return end - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c23116808.lua b/script/c23116808.lua deleted file mode 100644 index ed438f173a..0000000000 --- a/script/c23116808.lua +++ /dev/null @@ -1,101 +0,0 @@ ---怨念の魂 業火 -function c23116808.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c23116808.spcon) - e1:SetValue(1) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(23116808,0)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetCondition(c23116808.descon) - e2:SetTarget(c23116808.destg) - e2:SetOperation(c23116808.desop) - c:RegisterEffect(e2) - --token - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(23116808,1)) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e3:SetCode(EVENT_PHASE+PHASE_STANDBY) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1) - e3:SetCondition(c23116808.tkcon) - e3:SetTarget(c23116808.tktg) - e3:SetOperation(c23116808.tkop) - c:RegisterEffect(e3) - --token - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(23116808,2)) - e4:SetCategory(CATEGORY_ATKCHANGE) - e4:SetType(EFFECT_TYPE_IGNITION) - e4:SetRange(LOCATION_MZONE) - e4:SetCost(c23116808.atkcost) - e4:SetOperation(c23116808.atkop) - c:RegisterEffect(e4) -end -function c23116808.spfilter(c) - return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_FIRE) -end -function c23116808.spcon(e,c) - if c==nil then return true end - return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c23116808.spfilter,c:GetControler(),LOCATION_MZONE,0,1,nil) -end -function c23116808.descon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+1 -end -function c23116808.desfilter(c) - return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_FIRE) and c:IsDestructable() -end -function c23116808.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c23116808.desfilter(chkc) end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c23116808.desfilter,tp,LOCATION_MZONE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c23116808.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end -function c23116808.tkcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c23116808.tktg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0) -end -function c23116808.tkop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 then return end - if not Duel.IsPlayerCanSpecialSummonMonster(tp,23116809,0,0x4011,100,100,1,RACE_PYRO,ATTRIBUTE_FIRE) then return end - local token=Duel.CreateToken(tp,23116809) - Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP_DEFENCE) -end -function c23116808.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsAttribute,1,e:GetHandler(),ATTRIBUTE_FIRE) end - local g=Duel.SelectReleaseGroup(tp,Card.IsAttribute,1,1,e:GetHandler(),ATTRIBUTE_FIRE) - Duel.Release(g,REASON_COST) -end -function c23116808.atkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFaceup() and c:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e1:SetValue(500) - c:RegisterEffect(e1) - end -end diff --git a/script/c23118924.lua b/script/c23118924.lua deleted file mode 100644 index c791a02a7f..0000000000 --- a/script/c23118924.lua +++ /dev/null @@ -1,50 +0,0 @@ ---エレメント・デビル -function c23118924.initial_effect(c) - --disable - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_BATTLED) - e1:SetCondition(c23118924.discon) - e1:SetOperation(c23118924.disop) - c:RegisterEffect(e1) - --chain attack - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(23118924,0)) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_BATTLED) - e2:SetCondition(c23118924.atcon) - e2:SetOperation(c23118924.atop) - c:RegisterEffect(e2) -end -function c23118924.filter(c,att) - return c:IsFaceup() and c:IsAttribute(att) -end -function c23118924.discon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local bc=c:GetBattleTarget() - return bc and bc:IsStatus(STATUS_BATTLE_DESTROYED) and not c:IsStatus(STATUS_BATTLE_DESTROYED) - and Duel.IsExistingMatchingCard(c23118924.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,ATTRIBUTE_EARTH) -end -function c23118924.disop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local bc=c:GetBattleTarget() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0x17a0000) - bc:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+0x17a0000) - bc:RegisterEffect(e2) -end -function c23118924.atcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local bc=c:GetBattleTarget() - return bc and bc:IsStatus(STATUS_BATTLE_DESTROYED) and c:IsChainAttackable() and c:IsStatus(STATUS_OPPO_BATTLE) - and not c:IsDisabled() and Duel.IsExistingMatchingCard(c23118924.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,ATTRIBUTE_WIND) -end -function c23118924.atop(e,tp,eg,ep,ev,re,r,rp) - Duel.ChainAttack() -end diff --git a/script/c23122036.lua b/script/c23122036.lua deleted file mode 100644 index 631b98523e..0000000000 --- a/script/c23122036.lua +++ /dev/null @@ -1,56 +0,0 @@ ---陰謀の盾 -function c23122036.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c23122036.target) - e1:SetOperation(c23122036.operation) - c:RegisterEffect(e1) -end -function c23122036.filter(c) - return c:IsFaceup() -end -function c23122036.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c23122036.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c23122036.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local g=Duel.SelectTarget(tp,c23122036.filter,tp,LOCATION_MZONE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c23122036.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsLocation(LOCATION_SZONE) then return end - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:GetControler()==c:GetControler() then - Duel.Equip(tp,c,tc) - c:CancelToGrave() - --indes - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_EQUIP) - e1:SetCode(EFFECT_INDESTRUCTABLE_COUNT) - e1:SetCountLimit(1) - e1:SetValue(c23122036.valcon) - e1:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_AVOID_BATTLE_DAMAGE) - e2:SetValue(1) - e2:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e2) - --Equip limit - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_EQUIP_LIMIT) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e3:SetValue(1) - e3:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e3) - end -end -function c23122036.valcon(e,re,r,rp) - return bit.band(r,REASON_BATTLE)~=0 and e:GetHandler():GetEquipTarget():IsPosition(POS_FACEUP_ATTACK) -end diff --git a/script/c2314238.lua b/script/c2314238.lua deleted file mode 100644 index b691270d84..0000000000 --- a/script/c2314238.lua +++ /dev/null @@ -1,31 +0,0 @@ ---黒・魔・導 -function c2314238.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c2314238.condition) - e1:SetTarget(c2314238.target) - e1:SetOperation(c2314238.activate) - c:RegisterEffect(e1) -end -function c2314238.cfilter(c) - return c:IsFaceup() and c:IsCode(46986414) -end -function c2314238.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c2314238.cfilter,tp,LOCATION_ONFIELD,0,1,nil) -end -function c2314238.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable() -end -function c2314238.target(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return Duel.IsExistingMatchingCard(c2314238.filter,tp,0,LOCATION_ONFIELD,1,c) end - local sg=Duel.GetMatchingGroup(c2314238.filter,tp,0,LOCATION_ONFIELD,c) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,sg:GetCount(),0,0) -end -function c2314238.activate(e,tp,eg,ep,ev,re,r,rp) - local sg=Duel.GetMatchingGroup(c2314238.filter,tp,0,LOCATION_ONFIELD,e:GetHandler()) - Duel.Destroy(sg,REASON_EFFECT) -end diff --git a/script/c2316186.lua b/script/c2316186.lua deleted file mode 100644 index 11dcd74e07..0000000000 --- a/script/c2316186.lua +++ /dev/null @@ -1,37 +0,0 @@ ---魔法の国の王女-クラン -function c2316186.initial_effect(c) - c:EnableReviveLimit() - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - c:RegisterEffect(e1) - --damage - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(2316186,0)) - e2:SetCategory(CATEGORY_DAMAGE) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCondition(c2316186.condition) - e2:SetTarget(c2316186.target) - e2:SetOperation(c2316186.operation) - c:RegisterEffect(e2) -end -function c2316186.condition(e,tp,eg,ep,ev,re,r,rp) - return tp==Duel.GetTurnPlayer() -end -function c2316186.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local ct=Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE) - Duel.SetTargetPlayer(1-tp) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,ct*600) -end -function c2316186.operation(e,tp,eg,ep,ev,re,r,rp) - local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) - local ct=Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE) - Duel.Damage(p,ct*600,REASON_EFFECT) -end diff --git a/script/c23166823.lua b/script/c23166823.lua deleted file mode 100644 index 4e3b598766..0000000000 --- a/script/c23166823.lua +++ /dev/null @@ -1,55 +0,0 @@ ---影霊獣使い-セフィラウェンディ -function c23166823.initial_effect(c) - c:SetSPSummonOnce(23166823) - --pendulum summon - aux.AddPendulumProcedure(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --splimit - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetRange(LOCATION_PZONE) - e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE) - e2:SetTargetRange(1,0) - e2:SetTarget(c23166823.splimit) - e2:SetCondition(aux.nfbdncon) - c:RegisterEffect(e2) - --to hand - local e3=Effect.CreateEffect(c) - e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_SUMMON_SUCCESS) - e3:SetTarget(c23166823.thtg) - e3:SetOperation(c23166823.thop) - c:RegisterEffect(e3) - local e4=e3:Clone() - e4:SetCode(EVENT_SPSUMMON_SUCCESS) - e4:SetCondition(c23166823.condition) - c:RegisterEffect(e4) -end -function c23166823.splimit(e,c,sump,sumtype,sumpos,targetp) - if c:IsSetCard(0xb5) or c:IsSetCard(0xc4) then return false end - return bit.band(sumtype,SUMMON_TYPE_PENDULUM)==SUMMON_TYPE_PENDULUM -end -function c23166823.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_PENDULUM -end -function c23166823.filter(c) - return c:IsFaceup() and c:IsSetCard(0xc4) and c:IsType(TYPE_PENDULUM) and not c:IsCode(23166823) and c:IsAbleToHand() -end -function c23166823.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c23166823.filter,tp,LOCATION_EXTRA,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_EXTRA) -end -function c23166823.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c23166823.filter,tp,LOCATION_EXTRA,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c23168060.lua b/script/c23168060.lua deleted file mode 100644 index 6803cf727c..0000000000 --- a/script/c23168060.lua +++ /dev/null @@ -1,27 +0,0 @@ ---鍵戦士キーマン -function c23168060.initial_effect(c) - --lv change - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(23168060,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCondition(c23168060.condition) - e1:SetOperation(c23168060.operation) - c:RegisterEffect(e1) -end -function c23168060.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetLevel()~=3 -end -function c23168060.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CHANGE_LEVEL) - e1:SetValue(3) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - c:RegisterEffect(e1) - end -end diff --git a/script/c23171610.lua b/script/c23171610.lua deleted file mode 100644 index eff62a68f7..0000000000 --- a/script/c23171610.lua +++ /dev/null @@ -1,73 +0,0 @@ ---リミッター解除 -function c23171610.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetCondition(c23171610.condition) - e1:SetTarget(c23171610.target) - e1:SetOperation(c23171610.activate) - c:RegisterEffect(e1) -end -function c23171610.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end -function c23171610.filter(c) - return c:IsFaceup() and c:IsRace(RACE_MACHINE) -end -function c23171610.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c23171610.filter,tp,LOCATION_MZONE,0,1,nil) end - local g=Duel.GetMatchingGroup(c23171610.filter,tp,LOCATION_MZONE,0,nil) - Duel.SetTargetCard(g) -end -function c23171610.filter2(c,e) - return c:IsFaceup() and c:IsRace(RACE_MACHINE) and c:IsRelateToEffect(e) and not c:IsImmuneToEffect(e) -end -function c23171610.activate(e,tp,eg,ep,ev,re,r,rp) - local sg=Duel.GetMatchingGroup(c23171610.filter2,tp,LOCATION_MZONE,0,nil,e) - local c=e:GetHandler() - local fid=c:GetFieldID() - local tc=sg:GetFirst() - while tc do - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - e1:SetValue(tc:GetAttack()*2) - tc:RegisterEffect(e1) - tc:RegisterFlagEffect(23171610,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1,fid) - tc=sg:GetNext() - end - sg:KeepAlive() - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e2:SetCode(EVENT_PHASE+PHASE_END) - e2:SetReset(RESET_PHASE+PHASE_END) - e2:SetCountLimit(1) - e2:SetLabel(fid) - e2:SetLabelObject(sg) - e2:SetCondition(c23171610.descon) - e2:SetOperation(c23171610.desop) - Duel.RegisterEffect(e2,tp) -end -function c23171610.desfilter(c,fid) - return c:GetFlagEffectLabel(23171610)==fid -end -function c23171610.descon(e,tp,eg,ep,ev,re,r,rp) - local g=e:GetLabelObject() - if not g:IsExists(c23171610.desfilter,1,nil,e:GetLabel()) then - g:DeleteGroup() - e:Reset() - return false - else return true end -end -function c23171610.desop(e,tp,eg,ep,ev,re,r,rp) - local g=e:GetLabelObject() - local dg=g:Filter(c23171610.desfilter,nil,e:GetLabel()) - g:DeleteGroup() - Duel.Destroy(dg,REASON_EFFECT) -end diff --git a/script/c23187256.lua b/script/c23187256.lua deleted file mode 100644 index 0e2345ae86..0000000000 --- a/script/c23187256.lua +++ /dev/null @@ -1,141 +0,0 @@ ---No.93 希望皇ホープ・カイザー -function c23187256.initial_effect(c) - --xyz summon - c:EnableReviveLimit() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetRange(LOCATION_EXTRA) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetCondition(c23187256.xyzcon) - e1:SetOperation(c23187256.xyzop) - e1:SetValue(SUMMON_TYPE_XYZ) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(23187256,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetTarget(c23187256.target) - e2:SetOperation(c23187256.operation) - c:RegisterEffect(e2) - --indestructable - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e3:SetRange(LOCATION_MZONE) - e3:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e3:SetCondition(c23187256.indcon) - e3:SetValue(1) - c:RegisterEffect(e3) - local e4=e3:Clone() - e4:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - c:RegisterEffect(e4) -end -c23187256.xyz_number=93 -function c23187256.mfilter(c,xyzc) - return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:IsSetCard(0x48) and c:GetOverlayCount()>0 and c:IsCanBeXyzMaterial(xyzc) -end -function c23187256.xyzfilter1(c,g,ct) - return g:IsExists(c23187256.xyzfilter2,ct,c,c:GetRank()) -end -function c23187256.xyzfilter2(c,rk) - return c:GetRank()==rk -end -function c23187256.xyzcon(e,c,og) - if c==nil then return true end - local tp=c:GetControler() - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - local ct=math.max(1,-ft) - local mg=Duel.GetMatchingGroup(c23187256.mfilter,tp,LOCATION_MZONE,0,nil,c) - return mg:IsExists(c23187256.xyzfilter1,1,nil,mg,ct) -end -function c23187256.xyzop(e,tp,eg,ep,ev,re,r,rp,c,og) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - local ct=math.max(1,-ft) - local mg=Duel.GetMatchingGroup(c23187256.mfilter,tp,LOCATION_MZONE,0,nil,c) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL) - local g1=mg:FilterSelect(tp,c23187256.xyzfilter1,1,1,nil,mg,ct) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL) - local g2=mg:FilterSelect(tp,c23187256.xyzfilter2,ct,63,g1:GetFirst(),g1:GetFirst():GetRank()) - g1:Merge(g2) - local sg=Group.CreateGroup() - local tc=g1:GetFirst() - while tc do - sg:Merge(tc:GetOverlayGroup()) - tc=g1:GetNext() - end - Duel.SendtoGrave(sg,REASON_RULE) - c:SetMaterial(g1) - Duel.Overlay(c,g1) -end -function c23187256.filter(c,e,tp) - return c:IsRankBelow(9) and c:IsAttackBelow(3000) and c:IsSetCard(0x48) - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c23187256.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c23187256.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function c23187256.gfilter(c,rank) - return c:GetRank()==rank -end -function c23187256.operation(e,tp,eg,ep,ev,re,r,rp) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - local c=e:GetHandler() - local g1=Duel.GetMatchingGroup(c23187256.filter,tp,LOCATION_EXTRA,0,nil,e,tp) - local ct=c:GetOverlayGroup():GetClassCount(Card.GetCode) - if ct>ft then ct=ft end - if g1:GetCount()>0 and ct>0 then - repeat - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g2=g1:Select(tp,1,1,nil) - local tc=g2:GetFirst() - Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e2) - g1:Remove(c23187256.gfilter,nil,tc:GetRank()) - ct=ct-1 - until g1:GetCount()==0 or ct==0 or not Duel.SelectYesNo(tp,aux.Stringid(23187256,1)) - Duel.SpecialSummonComplete() - Duel.BreakEffect() - c:RemoveOverlayCard(tp,1,1,REASON_EFFECT) - end - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetCode(EFFECT_CHANGE_DAMAGE) - e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e3:SetTargetRange(0,1) - e3:SetValue(c23187256.val) - e3:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e3,tp) - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_FIELD) - e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e4:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e4:SetReset(RESET_PHASE+PHASE_END) - e4:SetTargetRange(1,0) - Duel.RegisterEffect(e4,tp) -end -function c23187256.val(e,re,dam,r,rp,rc) - if bit.band(r,REASON_BATTLE)~=0 then - return dam/2 - else return dam end -end -function c23187256.indfilter(c) - return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:IsSetCard(0x48) -end -function c23187256.indcon(e) - return Duel.IsExistingMatchingCard(c23187256.indfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,e:GetHandler()) -end diff --git a/script/c23204029.lua b/script/c23204029.lua deleted file mode 100644 index 823b638ba5..0000000000 --- a/script/c23204029.lua +++ /dev/null @@ -1,76 +0,0 @@ ---C・HERO カオス -function c23204029.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcFunRep(c,aux.FilterBoolFunction(Card.IsSetCard,0xa008),2,true) - --spsummon condition - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(aux.fuslimit) - c:RegisterEffect(e1) - --attribute - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EFFECT_ADD_ATTRIBUTE) - e2:SetValue(ATTRIBUTE_LIGHT) - c:RegisterEffect(e2) - --negate - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(23204029,0)) - e3:SetCategory(CATEGORY_DISABLE) - e3:SetType(EFFECT_TYPE_QUICK_O) - e3:SetCode(EVENT_FREE_CHAIN) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetRange(LOCATION_MZONE) - e3:SetHintTiming(0,0x1c0) - e3:SetCountLimit(1) - e3:SetTarget(c23204029.target) - e3:SetOperation(c23204029.operation) - c:RegisterEffect(e3) - --add setcode - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e4:SetCode(EFFECT_ADD_SETCODE) - e4:SetValue(0x3008) - c:RegisterEffect(e4) -end -function c23204029.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and aux.disfilter1(chkc) end - if chk==0 then return Duel.IsExistingTarget(aux.disfilter1,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - local g=Duel.SelectTarget(tp,aux.disfilter1,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0) -end -function c23204029.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if ((tc:IsFaceup() and not tc:IsDisabled()) or tc:IsType(TYPE_TRAPMONSTER)) and tc:IsRelateToEffect(e) then - Duel.NegateRelatedChain(tc,RESET_TURN_SET) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetValue(RESET_TURN_SET) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - tc:RegisterEffect(e2) - if tc:IsType(TYPE_TRAPMONSTER) then - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e3:SetCode(EFFECT_DISABLE_TRAPMONSTER) - e3:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - tc:RegisterEffect(e3) - end - end -end diff --git a/script/c23205979.lua b/script/c23205979.lua deleted file mode 100644 index 77aa5c5923..0000000000 --- a/script/c23205979.lua +++ /dev/null @@ -1,91 +0,0 @@ ---魂を削る死霊 -function c23205979.initial_effect(c) - --battle indestructable - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e1:SetValue(1) - c:RegisterEffect(e1) - --handes - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(23205979,0)) - e2:SetCategory(CATEGORY_HANDES) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_BATTLE_DAMAGE) - e2:SetCondition(c23205979.condition) - e2:SetTarget(c23205979.target) - e2:SetOperation(c23205979.operation) - c:RegisterEffect(e2) - --self des - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e3:SetRange(LOCATION_MZONE) - e3:SetCode(EFFECT_SELF_DESTROY) - e3:SetCondition(c23205979.sdcon) - c:RegisterEffect(e3) - --be target - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e4:SetCode(EVENT_BECOME_TARGET) - e4:SetOperation(c23205979.desop1) - c:RegisterEffect(e4) - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e5:SetRange(LOCATION_MZONE) - e5:SetCode(EVENT_CHAIN_SOLVED) - e5:SetOperation(c23205979.desop2) - e5:SetLabelObject(e4) - c:RegisterEffect(e5) - local e6=Effect.CreateEffect(c) - e6:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e6:SetRange(LOCATION_MZONE) - e6:SetCode(EVENT_BATTLED) - e6:SetOperation(c23205979.desop3) - e6:SetLabelObject(e4) - c:RegisterEffect(e6) -end -function c23205979.condition(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp and Duel.GetAttackTarget()==nil -end -function c23205979.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_HANDES,0,0,1-tp,1) -end -function c23205979.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetFieldGroup(ep,LOCATION_HAND,0) - if g:GetCount()==0 then return end - local sg=g:RandomSelect(1-tp,1) - Duel.SendtoGrave(sg,REASON_DISCARD+REASON_EFFECT) -end -function c23205979.sdcon(e) - return e:GetHandler():GetOwnerTargetCount()>0 -end -function c23205979.desop1(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsLocation(LOCATION_MZONE) and c:IsFaceup() then - e:SetLabelObject(re) - e:SetLabel(0) - end -end -function c23205979.desop2(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if re==e:GetLabelObject():GetLabelObject() and c:IsRelateToEffect(re) then - if Duel.GetCurrentPhase()==PHASE_DAMAGE and not Duel.IsDamageCalculated() then - e:GetLabelObject():SetLabel(1) - else - if c:IsHasEffect(EFFECT_DISABLE) then return end - if not c:IsDisabled() then Duel.Destroy(c,REASON_EFFECT) end - end - end -end -function c23205979.desop3(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local des=e:GetLabelObject():GetLabel() - e:GetLabelObject():SetLabel(0) - if c:IsHasEffect(EFFECT_DISABLE) then return end - if des==1 and not c:IsDisabled() then - Duel.Destroy(c,REASON_EFFECT) - end -end diff --git a/script/c23212990.lua b/script/c23212990.lua deleted file mode 100644 index 65a7e5243e..0000000000 --- a/script/c23212990.lua +++ /dev/null @@ -1,50 +0,0 @@ ---六武式風雷斬 -function c23212990.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_TOHAND) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,0x1e0) - e1:SetCost(c23212990.cost) - e1:SetTarget(c23212990.target) - e1:SetOperation(c23212990.activate) - c:RegisterEffect(e1) -end -function c23212990.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsCanRemoveCounter(tp,1,0,0x3003,1,REASON_COST) end - Duel.RemoveCounter(tp,1,0,0x3003,1,REASON_COST) -end -function c23212990.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsDestructable() end - if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,0,LOCATION_MZONE,1,nil) - or Duel.IsExistingTarget(Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,1,nil) end - local b1=Duel.IsExistingTarget(Card.IsDestructable,tp,0,LOCATION_MZONE,1,nil) - local b2=Duel.IsExistingTarget(Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,1,nil) - local op=0 - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EFFECT) - if b1 and b2 then op=Duel.SelectOption(tp,aux.Stringid(23212990,0),aux.Stringid(23212990,1)) - elseif b1 then op=Duel.SelectOption(tp,aux.Stringid(23212990,0)) - else op=Duel.SelectOption(tp,aux.Stringid(23212990,1))+1 end - e:SetLabel(op) - if op==0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) - else - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g=Duel.SelectTarget(tp,Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) - end -end -function c23212990.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - if e:GetLabel()==0 then - Duel.Destroy(tc,REASON_EFFECT) - else - Duel.SendtoHand(tc,nil,REASON_EFFECT) - end - end -end diff --git a/script/c2322421.lua b/script/c2322421.lua deleted file mode 100644 index 0fb37f1bf7..0000000000 --- a/script/c2322421.lua +++ /dev/null @@ -1,35 +0,0 @@ ---ロード・ウォリアー -function c2322421.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,c2322421.tfilter,aux.NonTuner(nil),2) - c:EnableReviveLimit() - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(2322421,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_MZONE) - e1:SetTarget(c2322421.tg) - e1:SetOperation(c2322421.op) - c:RegisterEffect(e1) -end -function c2322421.tfilter(c) - return c:IsCode(71971554) or c:IsHasEffect(20932152) -end -function c2322421.filter(c,e,tp) - return c:IsLevelBelow(2) and c:IsRace(RACE_WARRIOR+RACE_MACHINE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c2322421.tg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c2322421.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c2322421.op(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c2322421.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c23232295.lua b/script/c23232295.lua deleted file mode 100644 index 1f27d0ef89..0000000000 --- a/script/c23232295.lua +++ /dev/null @@ -1,60 +0,0 @@ ---BK 拘束蛮兵リードブロー -function c23232295.initial_effect(c) - Duel.EnableGlobalFlag(GLOBALFLAG_DETACH_EVENT) - --xyz summon - aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0x84),4,2) - c:EnableReviveLimit() - --destroy replace - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EFFECT_DESTROY_REPLACE) - e1:SetRange(LOCATION_MZONE) - e1:SetTarget(c23232295.reptg) - e1:SetValue(c23232295.repval) - c:RegisterEffect(e1) - --attack up - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(23232295,0)) - e2:SetCategory(CATEGORY_ATKCHANGE) - e2:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_SINGLE) - e2:SetCode(EVENT_DETACH_MATERIAL) - e2:SetTarget(c23232295.atktg) - e2:SetOperation(c23232295.atkop) - c:RegisterEffect(e2) -end -function c23232295.repfilter(c,tp) - return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) and c:IsSetCard(0x84) -end -function c23232295.reptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return eg:IsExists(c23232295.repfilter,1,nil,tp) end - if e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_EFFECT) and Duel.SelectYesNo(tp,aux.Stringid(23232295,1)) then - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_EFFECT) - local g=eg:Filter(c23232295.repfilter,nil,tp) - if g:GetCount()==1 then - e:SetLabelObject(g:GetFirst()) - else - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESREPLACE) - local cg=g:Select(tp,1,1,nil) - e:SetLabelObject(cg:GetFirst()) - end - return true - else return false end -end -function c23232295.repval(e,c) - return c==e:GetLabelObject() -end -function c23232295.atktg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsRelateToEffect(e) end -end -function c23232295.atkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_COPY_INHERIT) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+0x1ff0000) - e1:SetValue(800) - c:RegisterEffect(e1) - end -end diff --git a/script/c23234094.lua b/script/c23234094.lua deleted file mode 100644 index 8a1b8ea283..0000000000 --- a/script/c23234094.lua +++ /dev/null @@ -1,35 +0,0 @@ ---エヴォルダー・エリアス -function c23234094.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(23234094,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(c23234094.spcon) - e1:SetTarget(c23234094.sptg) - e1:SetOperation(c23234094.spop) - c:RegisterEffect(e1) -end -function c23234094.spcon(e,tp,eg,ep,ev,re,r,rp) - local st=e:GetHandler():GetSummonType() - return st>=(SUMMON_TYPE_SPECIAL+150) and st<(SUMMON_TYPE_SPECIAL+180) -end -function c23234094.filter(c,e,tp) - return c:IsLevelBelow(6) and c:IsRace(RACE_DINOSAUR) and c:IsAttribute(ATTRIBUTE_FIRE) - and c:IsCanBeSpecialSummoned(e,181,tp,false,false) -end -function c23234094.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c23234094.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c23234094.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c23234094.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,181,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c23265313.lua b/script/c23265313.lua deleted file mode 100644 index 22c2282269..0000000000 --- a/script/c23265313.lua +++ /dev/null @@ -1,50 +0,0 @@ ---コストダウン -function c23265313.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c23265313.cost) - e1:SetOperation(c23265313.activate) - c:RegisterEffect(e1) -end -function c23265313.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) -end -function c23265313.activate(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local hg=Duel.GetFieldGroup(tp,LOCATION_HAND,0):Filter(Card.IsLevelAbove,nil,1) - local tc=hg:GetFirst() - while tc do - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_LEVEL) - e1:SetValue(-2) - e1:SetReset(RESET_EVENT+0xfe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - tc=hg:GetNext() - end - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_TO_HAND) - e2:SetReset(RESET_PHASE+PHASE_END) - e2:SetOperation(c23265313.hlvop) - Duel.RegisterEffect(e2,tp) -end -function c23265313.hlvfilter(c,tp) - return c:IsLevelAbove(1) and c:IsControler(tp) -end -function c23265313.hlvop(e,tp,eg,ep,ev,re,r,rp) - local hg=eg:Filter(c23265313.hlvfilter,nil,tp) - local tc=hg:GetFirst() - while tc do - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_LEVEL) - e1:SetValue(-2) - e1:SetReset(RESET_EVENT+0xfe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - tc=hg:GetNext() - end -end diff --git a/script/c23265594.lua b/script/c23265594.lua deleted file mode 100644 index 6e7f507749..0000000000 --- a/script/c23265594.lua +++ /dev/null @@ -1,93 +0,0 @@ ---強化支援メカ・ヘビーウェポン -function c23265594.initial_effect(c) - --equip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(23265594,0)) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetTarget(c23265594.eqtg) - e1:SetOperation(c23265594.eqop) - c:RegisterEffect(e1) - --unequip - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(23265594,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_SZONE) - e2:SetCondition(c23265594.uncon) - e2:SetTarget(c23265594.sptg) - e2:SetOperation(c23265594.spop) - c:RegisterEffect(e2) - --Atk up - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_EQUIP) - e3:SetCode(EFFECT_UPDATE_ATTACK) - e3:SetValue(500) - e3:SetCondition(c23265594.uncon) - c:RegisterEffect(e3) - --Def up - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_EQUIP) - e4:SetCode(EFFECT_UPDATE_DEFENCE) - e4:SetValue(500) - e4:SetCondition(c23265594.uncon) - c:RegisterEffect(e4) - --destroy sub - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_EQUIP) - e5:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e5:SetCode(EFFECT_DESTROY_SUBSTITUTE) - e5:SetCondition(c23265594.uncon) - e5:SetValue(1) - c:RegisterEffect(e5) - --eqlimit - local e6=Effect.CreateEffect(c) - e6:SetType(EFFECT_TYPE_SINGLE) - e6:SetCode(EFFECT_EQUIP_LIMIT) - e6:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e6:SetValue(c23265594.eqlimit) - c:RegisterEffect(e6) -end -function c23265594.uncon(e) - return e:GetHandler():IsStatus(STATUS_UNION) -end -function c23265594.eqlimit(e,c) - return c:IsRace(RACE_MACHINE) -end -function c23265594.filter(c) - return c:IsFaceup() and c:IsRace(RACE_MACHINE) and c:GetUnionCount()==0 -end -function c23265594.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c23265594.filter(chkc) end - if chk==0 then return e:GetHandler():GetFlagEffect(23265594)==0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingTarget(c23265594.filter,tp,LOCATION_MZONE,0,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local g=Duel.SelectTarget(tp,c23265594.filter,tp,LOCATION_MZONE,0,1,1,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0) - e:GetHandler():RegisterFlagEffect(23265594,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1) -end -function c23265594.eqop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if not c:IsRelateToEffect(e) or c:IsFacedown() then return end - if not tc:IsRelateToEffect(e) or not c23265594.filter(tc) then - Duel.SendtoGrave(c,REASON_EFFECT) - return - end - if not Duel.Equip(tp,c,tc,false) then return end - c:SetStatus(STATUS_UNION,true) -end -function c23265594.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():GetFlagEffect(23265594)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) - e:GetHandler():RegisterFlagEffect(23265594,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1) -end -function c23265594.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP_ATTACK) - end -end diff --git a/script/c2326738.lua b/script/c2326738.lua deleted file mode 100644 index c416550d07..0000000000 --- a/script/c2326738.lua +++ /dev/null @@ -1,44 +0,0 @@ ---デス・ラクーダ -function c2326738.initial_effect(c) - --turn set - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(2326738,0)) - e1:SetCategory(CATEGORY_POSITION) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetTarget(c2326738.target) - e1:SetOperation(c2326738.operation) - c:RegisterEffect(e1) - --draw - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(2326738,1)) - e2:SetCategory(CATEGORY_DRAW) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - e2:SetTarget(c2326738.drtg) - e2:SetOperation(c2326738.drop) - c:RegisterEffect(e2) -end -function c2326738.target(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsCanTurnSet() and c:GetFlagEffect(2326738)==0 end - c:RegisterFlagEffect(2326738,RESET_EVENT+0x1fc0000+RESET_PHASE+PHASE_END,0,1) - Duel.SetOperationInfo(0,CATEGORY_POSITION,c,1,0,0) -end -function c2326738.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - Duel.ChangePosition(c,POS_FACEDOWN_DEFENCE) - end -end -function c2326738.drtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(1) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c2326738.drop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end diff --git a/script/c23269426.lua b/script/c23269426.lua deleted file mode 100644 index 242101c11f..0000000000 --- a/script/c23269426.lua +++ /dev/null @@ -1,58 +0,0 @@ ---最期の同調 -function c23269426.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c23269426.target) - e1:SetOperation(c23269426.activate) - c:RegisterEffect(e1) -end -function c23269426.spfilter(c,e,tp,code) - return c:IsCode(code) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsHasEffect(EFFECT_NECRO_VALLEY) -end -function c23269426.filter(c,e,tp) - return c:IsFaceup() and c:GetLevel()==3 - and Duel.IsExistingMatchingCard(c23269426.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp,c:GetCode()) -end -function c23269426.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c23269426.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c23269426.filter,tp,LOCATION_MZONE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - local g=Duel.SelectTarget(tp,c23269426.filter,tp,LOCATION_MZONE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE) -end -function c23269426.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local tc=Duel.GetFirstTarget() - if not tc:IsRelateToEffect(e) or tc:IsFacedown() then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=Duel.SelectMatchingCard(tp,c23269426.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp,tc:GetCode()) - if sg:GetCount()>0 and Duel.SpecialSummonStep(sg:GetFirst(),0,tp,tp,false,false,POS_FACEUP) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000) - sg:GetFirst():RegisterEffect(e1,true) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+0x1fe0000) - sg:GetFirst():RegisterEffect(e2,true) - Duel.SpecialSummonComplete() - end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetOperation(c23269426.desop) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e1:SetCountLimit(1) - tc:RegisterEffect(e1) -end -function c23269426.desop(e,tp,eg,ep,ev,re,r,rp) - Duel.Destroy(e:GetHandler(),REASON_EFFECT) -end diff --git a/script/c23274061.lua b/script/c23274061.lua deleted file mode 100644 index 0066e726a3..0000000000 --- a/script/c23274061.lua +++ /dev/null @@ -1,38 +0,0 @@ ---エレキタリス -function c23274061.initial_effect(c) - --Extra attack - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_EXTRA_ATTACK) - e1:SetValue(1) - c:RegisterEffect(e1) - --Disable - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(23274061,0)) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_BATTLED) - e2:SetCondition(c23274061.condition) - e2:SetOperation(c23274061.operation) - c:RegisterEffect(e2) -end -function c23274061.condition(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local a=Duel.GetAttacker() - if a==c then a=Duel.GetAttackTarget() end - e:SetLabelObject(a) - return a and a:IsType(TYPE_EFFECT) and a:IsRelateToBattle() -end -function c23274061.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetLabelObject() - if tc:IsFacedown() or not tc:IsRelateToBattle() then return end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0x57a0000) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+0x57a0000) - tc:RegisterEffect(e2) -end diff --git a/script/c23282832.lua b/script/c23282832.lua deleted file mode 100644 index 98b33d8691..0000000000 --- a/script/c23282832.lua +++ /dev/null @@ -1,35 +0,0 @@ ---オーバーリミット -function c23282832.initial_effect(c) - --activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_END_PHASE) - e1:SetCost(c23282832.cost) - e1:SetTarget(c23282832.tg) - e1:SetOperation(c23282832.op) - c:RegisterEffect(e1) -end -function c23282832.filter(c,e,tp,tid) - return c:GetTurnID()==tid and c:IsReason(REASON_BATTLE) and c:IsType(TYPE_NORMAL) - and c:IsAttackBelow(1000) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c23282832.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,500) end - Duel.PayLPCost(tp,500) -end -function c23282832.tg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c23282832.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil,e,tp,Duel.GetTurnCount()) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,PLAYER_ALL,LOCATION_GRAVE) -end -function c23282832.op(e,tp,eg,ep,ev,re,r,rp) - local ft1=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ft1<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c23282832.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,ft1,ft1,nil,e,tp,Duel.GetTurnCount()) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c23289281.lua b/script/c23289281.lua deleted file mode 100644 index 221214b5fa..0000000000 --- a/script/c23289281.lua +++ /dev/null @@ -1,41 +0,0 @@ ---カラテマン -function c23289281.initial_effect(c) - --atk - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(23289281,0)) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetOperation(c23289281.operaion) - c:RegisterEffect(e1) -end -function c23289281.operaion(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFacedown() or not c:IsRelateToEffect(e) then return end - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetValue(c:GetBaseAttack()*2) - e1:SetReset(RESET_EVENT+0x1ff0000+RESET_PHASE+PHASE_END) - c:RegisterEffect(e1,true) - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(23289281,1)) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_PHASE+PHASE_END) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetTarget(c23289281.destg) - e2:SetOperation(c23289281.desop) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - c:RegisterEffect(e2) -end -function c23289281.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0) -end -function c23289281.desop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - Duel.Destroy(e:GetHandler(),REASON_EFFECT) - end -end diff --git a/script/c23296404.lua b/script/c23296404.lua deleted file mode 100644 index 24bfccaf20..0000000000 --- a/script/c23296404.lua +++ /dev/null @@ -1,83 +0,0 @@ ---イグナイト・アヴェンジャー -function c23296404.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c23296404.sptg) - e1:SetOperation(c23296404.spop) - c:RegisterEffect(e1) - --todeck - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_TOHAND+CATEGORY_TODECK) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCountLimit(1) - e2:SetTarget(c23296404.tdtg) - e2:SetOperation(c23296404.tdop) - c:RegisterEffect(e2) -end -function c23296404.desfilter(c) - return c:IsFaceup() and c:IsSetCard(0xc8) and c:IsDestructable() -end -function c23296404.desfilter2(c,e) - return c23296404.desfilter(c) and c:IsCanBeEffectTarget(e) -end -function c23296404.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsControler(tp) and c23296404.desfilter(chkc) end - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - local ct=-ft+1 - if chk==0 then return ct<=3 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) - and Duel.IsExistingTarget(c23296404.desfilter,tp,LOCATION_ONFIELD,0,3,nil) - and (ct<=0 or Duel.IsExistingTarget(c23296404.desfilter,tp,LOCATION_MZONE,0,ct,nil)) end - local g=nil - if ct>0 then - local tg=Duel.GetMatchingGroup(c23296404.desfilter2,tp,LOCATION_ONFIELD,0,nil,e) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - g=tg:FilterSelect(tp,Card.IsLocation,ct,ct,nil,LOCATION_MZONE) - if ct<3 then - tg:Sub(g) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g2=tg:Select(tp,3-ct,3-ct,nil) - g:Merge(g2) - end - Duel.SetTargetCard(g) - else - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - g=Duel.SelectTarget(tp,c23296404.desfilter,tp,LOCATION_ONFIELD,0,3,3,nil) - end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,3,0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c23296404.spop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) - if Duel.Destroy(g,REASON_EFFECT)~=0 then - Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP) - end -end -function c23296404.thfilter(c) - return c:IsFaceup() and c:IsSetCard(0xc8) and c:IsAbleToHand() -end -function c23296404.tdfilter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToDeck() -end -function c23296404.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c23296404.thfilter(chkc) and chkc~=e:GetHandler() end - if chk==0 then return Duel.IsExistingTarget(c23296404.thfilter,tp,LOCATION_MZONE,0,1,e:GetHandler()) - and Duel.IsExistingMatchingCard(c23296404.tdfilter,tp,0,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c23296404.thfilter,tp,LOCATION_MZONE,0,1,1,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,1-tp,LOCATION_ONFIELD) -end -function c23296404.tdop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.SendtoHand(tc,nil,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_HAND) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectMatchingCard(tp,c23296404.tdfilter,tp,0,LOCATION_ONFIELD,1,1,nil) - Duel.SendtoDeck(g,nil,1,REASON_EFFECT) - end -end diff --git a/script/c23297235.lua b/script/c23297235.lua deleted file mode 100644 index 9575d0f83b..0000000000 --- a/script/c23297235.lua +++ /dev/null @@ -1,30 +0,0 @@ ---フレムベル・ヘルドッグ -function c23297235.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(23297235,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_BATTLE_DESTROYING) - e1:SetCondition(aux.bdogcon) - e1:SetTarget(c23297235.sptg) - e1:SetOperation(c23297235.spop) - c:RegisterEffect(e1) -end -function c23297235.filter(c,e,tp) - return c:IsDefenceBelow(200) and c:IsAttribute(ATTRIBUTE_FIRE) and c:GetCode()~=23297235 - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c23297235.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c23297235.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c23297235.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c23297235.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c23299957.lua b/script/c23299957.lua deleted file mode 100644 index b0e7165ac8..0000000000 --- a/script/c23299957.lua +++ /dev/null @@ -1,95 +0,0 @@ ---ビークロイド・コネクション・ゾーン -function c23299957.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c23299957.target) - e1:SetOperation(c23299957.activate) - c:RegisterEffect(e1) -end -function c23299957.filter1(c,e) - return c:IsCanBeFusionMaterial() and not c:IsImmuneToEffect(e) -end -function c23299957.filter2(c,e,tp,m,f,chkf) - return c:IsType(TYPE_FUSION) and c:IsSetCard(0x1016) and (not f or f(c)) - and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf) -end -function c23299957.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp - local mg1=Duel.GetMatchingGroup(Card.IsCanBeFusionMaterial,tp,LOCATION_HAND+LOCATION_MZONE,0,nil) - local res=Duel.IsExistingMatchingCard(c23299957.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf) - if not res then - local ce=Duel.GetChainMaterial(tp) - if ce~=nil then - local fgroup=ce:GetTarget() - local mg2=fgroup(ce,e,tp) - local mf=ce:GetValue() - res=Duel.IsExistingMatchingCard(c23299957.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,chkf) - end - end - return res - end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function c23299957.activate(e,tp,eg,ep,ev,re,r,rp) - local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp - local mg1=Duel.GetMatchingGroup(c23299957.filter1,tp,LOCATION_HAND+LOCATION_MZONE,0,nil,e) - local sg1=Duel.GetMatchingGroup(c23299957.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf) - local mg2=nil - local sg2=nil - local ce=Duel.GetChainMaterial(tp) - if ce~=nil then - local fgroup=ce:GetTarget() - mg2=fgroup(ce,e,tp) - local mf=ce:GetValue() - sg2=Duel.GetMatchingGroup(c23299957.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,mf,chkf) - end - if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then - local sg=sg1:Clone() - if sg2 then sg:Merge(sg2) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local tg=sg:Select(tp,1,1,nil) - local tc=tg:GetFirst() - if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then - local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf) - tc:SetMaterial(mat1) - Duel.SendtoGrave(mat1,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION) - Duel.BreakEffect() - Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP) - else - local mat2=Duel.SelectFusionMaterial(tp,tc,mg2,nil,chkf) - local fop=ce:GetOperation() - fop(ce,e,tp,tc,mat2) - end - tc:CompleteProcedure() - local c=e:GetHandler() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - e1:SetValue(1) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1,true) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_CANNOT_DISABLE) - e2:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e2,true) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_CANNOT_DISEFFECT) - e3:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e3,true) - else - local cg1=Duel.GetFieldGroup(tp,LOCATION_HAND+LOCATION_MZONE,0) - local cg2=Duel.GetFieldGroup(tp,LOCATION_EXTRA,0) - if cg1:GetCount()>1 and cg2:IsExists(Card.IsFacedown,1,nil) - and Duel.IsPlayerCanSpecialSummon(tp) and not Duel.IsPlayerAffectedByEffect(tp,27581098) then - Duel.ConfirmCards(1-tp,cg1) - Duel.ConfirmCards(1-tp,cg2) - Duel.ShuffleHand(tp) - end - end -end diff --git a/script/c23303072.lua b/script/c23303072.lua deleted file mode 100644 index 4e4b2c6a39..0000000000 --- a/script/c23303072.lua +++ /dev/null @@ -1,46 +0,0 @@ ---モンタージュ・ドラゴン -function c23303072.initial_effect(c) - c:EnableReviveLimit() - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(23303072,1)) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_SPSUMMON_PROC) - e2:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e2:SetRange(LOCATION_HAND) - e2:SetCondition(c23303072.spcon) - e2:SetOperation(c23303072.spop) - c:RegisterEffect(e2) -end -function c23303072.filter(c) - return c:IsType(TYPE_MONSTER) and c:IsAbleToGraveAsCost() -end -function c23303072.spcon(e,c) - if c==nil then return true end - return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c23303072.filter,c:GetControler(),LOCATION_HAND,0,3,e:GetHandler()) -end -function c23303072.spop(e,tp,eg,ep,ev,re,r,rp,c) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c23303072.filter,tp,LOCATION_HAND,0,3,3,c) - Duel.SendtoGrave(g,REASON_COST) - local sum=0 - local tc=g:GetFirst() - while tc do - local lv=tc:GetLevel() - sum=sum+lv - tc=g:GetNext() - end - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK) - e1:SetValue(sum*300) - e1:SetReset(RESET_EVENT+0xff0000) - c:RegisterEffect(e1) -end diff --git a/script/c23309606.lua b/script/c23309606.lua deleted file mode 100644 index 2e07633aa5..0000000000 --- a/script/c23309606.lua +++ /dev/null @@ -1,50 +0,0 @@ ---炎獄魔人ヘル・バーナー -function c23309606.initial_effect(c) - --summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(23309606,0)) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_LIMIT_SUMMON_PROC) - e1:SetCondition(c23309606.otcon) - e1:SetOperation(c23309606.otop) - e1:SetValue(SUMMON_TYPE_ADVANCE) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_LIMIT_SET_PROC) - c:RegisterEffect(e2) - --atk - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e3:SetRange(LOCATION_MZONE) - e3:SetCode(EFFECT_UPDATE_ATTACK) - e3:SetValue(c23309606.val) - c:RegisterEffect(e3) -end -function c23309606.otfilter(c,tp) - return c:IsAttackAbove(2000) and (c:IsControler(tp) or c:IsFaceup()) -end -function c23309606.otcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - local hg=Duel.GetFieldGroup(tp,LOCATION_HAND,0) - hg:RemoveCard(c) - local mg=Duel.GetMatchingGroup(c23309606.otfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp) - return hg:GetCount()>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.GetTributeCount(c,mg)>0 - and hg:FilterCount(Card.IsAbleToGraveAsCost,nil)==hg:GetCount() -end -function c23309606.otop(e,tp,eg,ep,ev,re,r,rp,c) - local hg=Duel.GetFieldGroup(tp,LOCATION_HAND,0) - hg:RemoveCard(c) - Duel.SendtoGrave(hg,REASON_COST+REASON_DISCARD) - local mg=Duel.GetMatchingGroup(c23309606.otfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp) - local sg=Duel.SelectTribute(tp,c,1,1,mg) - c:SetMaterial(sg) - Duel.Release(sg,REASON_SUMMON+REASON_MATERIAL) -end -function c23309606.val(e,c) - local tp=c:GetControler() - return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)*-500+500+Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)*200 -end diff --git a/script/c23323812.lua b/script/c23323812.lua deleted file mode 100644 index b1c2e23621..0000000000 --- a/script/c23323812.lua +++ /dev/null @@ -1,38 +0,0 @@ ---念導力 -function c23323812.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_RECOVER) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetCondition(c23323812.condition) - e1:SetTarget(c23323812.target) - e1:SetOperation(c23323812.activate) - c:RegisterEffect(e1) -end -function c23323812.filter(c,tp) - return c:GetPreviousControler()==tp and c:IsPreviousPosition(POS_FACEUP) - and c==Duel.GetAttackTarget() and c:IsRace(RACE_PSYCHO) -end -function c23323812.condition(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c23323812.filter,1,nil,tp) -end -function c23323812.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local at=Duel.GetAttacker() - if chkc then return chkc==at end - if chk==0 then return at:IsControler(1-tp) and at:IsRelateToBattle() and at:IsCanBeEffectTarget(e) and at:IsDestructable() end - Duel.SetTargetCard(at) - local atk=at:GetAttack() - Duel.SetOperationInfo(0,CATEGORY_DESTROY,at,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,atk) -end -function c23323812.activate(e,tp,eg,ep,ev,re,r,rp) - local a=Duel.GetFirstTarget() - if a:IsRelateToEffect(e) then - local atk=a:GetAttack() - if Duel.Destroy(a,REASON_EFFECT)~=0 then - Duel.Recover(tp,atk,REASON_EFFECT) - end - end -end diff --git a/script/c23327298.lua b/script/c23327298.lua deleted file mode 100644 index ab94309629..0000000000 --- a/script/c23327298.lua +++ /dev/null @@ -1,36 +0,0 @@ ---パラレル・セレクト -function c23327298.initial_effect(c) - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCondition(c23327298.condition) - e1:SetTarget(c23327298.target) - e1:SetOperation(c23327298.operation) - c:RegisterEffect(e1) -end -function c23327298.cfilter(c,tp) - return c:IsType(TYPE_SYNCHRO) and c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousPosition(POS_FACEUP) - and c:IsControler(tp) and c:GetPreviousControler()==tp and c:GetReasonPlayer()~=tp -end -function c23327298.condition(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c23327298.cfilter,1,nil,tp) -end -function c23327298.filter(c) - return c:IsFaceup() and c:IsType(TYPE_SPELL) and c:IsAbleToHand() -end -function c23327298.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and c23327298.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c23327298.filter,tp,LOCATION_REMOVED,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c23327298.filter,tp,LOCATION_REMOVED,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0) -end -function c23327298.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end diff --git a/script/c2333365.lua b/script/c2333365.lua deleted file mode 100644 index bc176cce7f..0000000000 --- a/script/c2333365.lua +++ /dev/null @@ -1,28 +0,0 @@ ---極星將テュール -function c2333365.initial_effect(c) - --self destroy - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_SELF_DESTROY) - e1:SetCondition(c2333365.descon) - c:RegisterEffect(e1) - --battle target - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetRange(LOCATION_MZONE) - e2:SetTargetRange(0,LOCATION_MZONE) - e2:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET) - e2:SetValue(c2333365.atlimit) - c:RegisterEffect(e2) -end -function c2333365.filter(c) - return c:IsFaceup() and c:IsSetCard(0x42) -end -function c2333365.descon(e) - return not Duel.IsExistingMatchingCard(c2333365.filter,0,LOCATION_MZONE,LOCATION_MZONE,1,e:GetHandler()) -end -function c2333365.atlimit(e,c) - return c:IsFaceup() and c:GetCode()~=2333365 and c:IsSetCard(0x42) -end diff --git a/script/c23379054.lua b/script/c23379054.lua deleted file mode 100644 index 4548369012..0000000000 --- a/script/c23379054.lua +++ /dev/null @@ -1,69 +0,0 @@ ---劫火の舟守 ゴースト・カロン -function c23379054.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1,23379054) - e1:SetCondition(c23379054.condition) - e1:SetCost(c23379054.cost) - e1:SetTarget(c23379054.target) - e1:SetOperation(c23379054.operation) - c:RegisterEffect(e1) - Duel.AddCustomActivityCounter(23379054,ACTIVITY_SPSUMMON,c23379054.counterfilter) -end -function c23379054.counterfilter(c) - return c:IsRace(RACE_DRAGON) -end -function c23379054.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0 - and Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==1 -end -function c23379054.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetCustomActivityCount(23379054,tp,ACTIVITY_SPSUMMON)==0 end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) - e1:SetTargetRange(1,0) - e1:SetTarget(c23379054.splimit) - Duel.RegisterEffect(e1,tp) -end -function c23379054.splimit(e,c,sump,sumtype,sumpos,targetp,se) - return c:GetRace()~=RACE_DRAGON -end -function c23379054.filter1(c,e,tp,lv) - return c:IsType(TYPE_FUSION) and c:IsAbleToRemove() - and Duel.IsExistingMatchingCard(c23379054.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,lv+c:GetLevel()) -end -function c23379054.filter2(c,e,tp,lv) - return c:GetLevel()==lv and c:IsRace(RACE_DRAGON) and c:IsType(TYPE_SYNCHRO) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c23379054.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c23379054.filter1(chkc,e,tp,e:GetHandler():GetLevel()) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 and e:GetHandler():IsAbleToRemove() - and Duel.IsExistingTarget(c23379054.filter1,tp,LOCATION_GRAVE,0,1,nil,e,tp,e:GetHandler():GetLevel()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,c23379054.filter1,tp,LOCATION_GRAVE,0,1,1,nil,e,tp,e:GetHandler():GetLevel()) - g:AddCard(e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,2,0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function c23379054.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if not c:IsRelateToEffect(e) or not tc:IsRelateToEffect(e) then return end - local lv=c:GetLevel()+tc:GetLevel() - local g=Group.FromCards(c,tc) - if Duel.Remove(g,POS_FACEUP,REASON_EFFECT)==2 then - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=Duel.SelectMatchingCard(tp,c23379054.filter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,lv) - if sg:GetCount()>0 then - Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) - end - end -end diff --git a/script/c23401839.lua b/script/c23401839.lua deleted file mode 100644 index 45312b0ea9..0000000000 --- a/script/c23401839.lua +++ /dev/null @@ -1,30 +0,0 @@ ---センジュ・ゴッド -function c23401839.initial_effect(c) - --effect - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(23401839,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c23401839.tg) - e1:SetOperation(c23401839.op) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - c:RegisterEffect(e2) -end -function c23401839.filter(c) - return bit.band(c:GetType(),0x81)==0x81 and c:IsAbleToHand() -end -function c23401839.tg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c23401839.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c23401839.op(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c23401839.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c23408872.lua b/script/c23408872.lua deleted file mode 100644 index dc1461a9ee..0000000000 --- a/script/c23408872.lua +++ /dev/null @@ -1,37 +0,0 @@ ---サシカエル -function c23408872.initial_effect(c) - --Special Summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(23408872,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c23408872.cost) - e1:SetTarget(c23408872.target) - e1:SetOperation(c23408872.operation) - c:RegisterEffect(e1) -end -function c23408872.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsRace,1,nil,RACE_AQUA) end - local g=Duel.SelectReleaseGroup(tp,Card.IsRace,1,1,nil,RACE_AQUA) - Duel.Release(g,REASON_COST) -end -function c23408872.filter(c,e,tp) - return c:IsSetCard(0x12) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c23408872.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c23408872.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsExistingTarget(c23408872.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c23408872.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c23408872.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c23421244.lua b/script/c23421244.lua deleted file mode 100644 index 69d41d0e4b..0000000000 --- a/script/c23421244.lua +++ /dev/null @@ -1,15 +0,0 @@ ---リボーン・ゾンビ -function c23421244.initial_effect(c) - --cannot destroy - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c23421244.condition) - e1:SetValue(1) - c:RegisterEffect(e1) -end -function c23421244.condition(e) - return e:GetHandler():IsAttackPos() and Duel.GetFieldGroupCount(e:GetHandlerPlayer(),LOCATION_HAND,0)==0 -end diff --git a/script/c23424603.lua b/script/c23424603.lua deleted file mode 100644 index 2d0351676a..0000000000 --- a/script/c23424603.lua +++ /dev/null @@ -1,29 +0,0 @@ ---荒野 -function c23424603.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --Atk - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e2:SetTarget(c23424603.tg) - e2:SetValue(200) - c:RegisterEffect(e2) - --Def - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetCode(EFFECT_UPDATE_DEFENCE) - e3:SetRange(LOCATION_SZONE) - e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e3:SetTarget(c23424603.tg) - e3:SetValue(200) - c:RegisterEffect(e3) -end -function c23424603.tg(e,c) - return c:IsRace(RACE_DINOSAUR+RACE_ZOMBIE+RACE_ROCK) -end diff --git a/script/c23434538.lua b/script/c23434538.lua deleted file mode 100644 index c0a5365baa..0000000000 --- a/script/c23434538.lua +++ /dev/null @@ -1,69 +0,0 @@ ---増殖するG -function c23434538.initial_effect(c) - --draw - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(23434538,0)) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_STANDBY_PHASE+0x1c0) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(1,23434538) - e1:SetCost(c23434538.cost) - e1:SetOperation(c23434538.operation) - c:RegisterEffect(e1) -end -function c23434538.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end -function c23434538.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_DELAY) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(c23434538.drcon1) - e1:SetOperation(c23434538.drop1) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) - --sp_summon effect - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetCondition(c23434538.regcon) - e2:SetOperation(c23434538.regop) - e2:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e2,tp) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e3:SetCode(EVENT_CHAIN_SOLVED) - e3:SetCondition(c23434538.drcon2) - e3:SetOperation(c23434538.drop2) - e3:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e3,tp) -end -function c23434538.filter(c,sp) - return c:GetSummonPlayer()==sp -end -function c23434538.drcon1(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c23434538.filter,1,nil,1-tp) - and (not re:IsHasType(EFFECT_TYPE_ACTIONS) or re:IsHasType(EFFECT_TYPE_CONTINUOUS)) -end -function c23434538.drop1(e,tp,eg,ep,ev,re,r,rp) - Duel.Draw(tp,1,REASON_EFFECT) -end -function c23434538.regcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c23434538.filter,1,nil,1-tp) - and re:IsHasType(EFFECT_TYPE_ACTIONS) and not re:IsHasType(EFFECT_TYPE_CONTINUOUS) -end -function c23434538.regop(e,tp,eg,ep,ev,re,r,rp) - Duel.RegisterFlagEffect(tp,23434538,RESET_CHAIN,0,1) -end -function c23434538.drcon2(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetFlagEffect(tp,23434538)>0 -end -function c23434538.drop2(e,tp,eg,ep,ev,re,r,rp) - local n=Duel.GetFlagEffect(tp,23434538) - Duel.ResetFlagEffect(tp,23434538) - Duel.Draw(tp,n,REASON_EFFECT) -end diff --git a/script/c23440062.lua b/script/c23440062.lua deleted file mode 100644 index 6f56e3e7df..0000000000 --- a/script/c23440062.lua +++ /dev/null @@ -1,78 +0,0 @@ ---ウィキッド・リボーン -function c23440062.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_END_PHASE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCost(c23440062.cost) - e1:SetTarget(c23440062.target) - e1:SetOperation(c23440062.operation) - c:RegisterEffect(e1) - --Destroy - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE) - e2:SetCode(EVENT_LEAVE_FIELD) - e2:SetOperation(c23440062.desop) - c:RegisterEffect(e2) - --Destroy2 - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e3:SetRange(LOCATION_SZONE) - e3:SetCode(EVENT_LEAVE_FIELD) - e3:SetCondition(c23440062.descon2) - e3:SetOperation(c23440062.desop2) - c:RegisterEffect(e3) -end -function c23440062.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,800) end - Duel.PayLPCost(tp,800) -end -function c23440062.filter(c,e,tp) - return c:IsType(TYPE_SYNCHRO) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c23440062.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c23440062.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c23440062.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c23440062.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c23440062.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP_ATTACK) then - c:SetCardTarget(tc) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_OWNER_RELATE) - e1:SetRange(LOCATION_ONFIELD) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1,true) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_OWNER_RELATE) - e2:SetRange(LOCATION_ONFIELD) - e2:SetCode(EFFECT_CANNOT_ATTACK) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e2,true) - Duel.SpecialSummonComplete() - end -end -function c23440062.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetHandler():GetFirstCardTarget() - if tc and tc:IsLocation(LOCATION_MZONE) then - Duel.Destroy(tc,REASON_EFFECT) - end -end -function c23440062.descon2(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetHandler():GetFirstCardTarget() - return tc and eg:IsContains(tc) and tc:IsReason(REASON_DESTROY) -end -function c23440062.desop2(e,tp,eg,ep,ev,re,r,rp) - Duel.Destroy(e:GetHandler(),REASON_EFFECT) -end diff --git a/script/c23440231.lua b/script/c23440231.lua deleted file mode 100644 index b4123260f1..0000000000 --- a/script/c23440231.lua +++ /dev/null @@ -1,131 +0,0 @@ ---インフェルノイド・リリス -function c23440231.initial_effect(c) - c:EnableReviveLimit() - --special summon condition - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_SPSUMMON_PROC) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e2:SetRange(LOCATION_HAND+LOCATION_GRAVE) - e2:SetCondition(c23440231.spcon) - e2:SetOperation(c23440231.spop) - c:RegisterEffect(e2) - --destroy - local e3=Effect.CreateEffect(c) - e3:SetCategory(CATEGORY_DESTROY) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - e3:SetTarget(c23440231.destg) - e3:SetOperation(c23440231.desop) - c:RegisterEffect(e3) - --negate - local e4=Effect.CreateEffect(c) - e4:SetCategory(CATEGORY_NEGATE+CATEGORY_REMOVE) - e4:SetCode(EVENT_CHAINING) - e4:SetType(EFFECT_TYPE_QUICK_O) - e4:SetRange(LOCATION_MZONE) - e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) - e4:SetCountLimit(1) - e4:SetCondition(c23440231.negcon) - e4:SetCost(c23440231.negcost) - e4:SetTarget(c23440231.negtg) - e4:SetOperation(c23440231.negop) - c:RegisterEffect(e4) -end -function c23440231.spfilter(c) - return c:IsSetCard(0xbb) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost() -end -function c23440231.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - local sum=0 - for i=0,4 do - local tc=Duel.GetFieldCard(tp,LOCATION_MZONE,i) - if tc and tc:IsFaceup() and tc:IsType(TYPE_EFFECT) then - if tc:IsType(TYPE_XYZ) then sum=sum+tc:GetRank() - else sum=sum+tc:GetLevel() end - end - end - if sum>8 then return false end - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ft<-2 then return false end - if c:IsHasEffect(34822850) then - if ft>0 then - return Duel.IsExistingMatchingCard(c23440231.spfilter,tp,LOCATION_MZONE+LOCATION_GRAVE+LOCATION_HAND,0,3,c) - else - local ct=-ft+1 - return Duel.IsExistingMatchingCard(c23440231.spfilter,tp,LOCATION_MZONE,0,ct,nil) - and Duel.IsExistingMatchingCard(c23440231.spfilter,tp,LOCATION_MZONE+LOCATION_GRAVE+LOCATION_HAND,0,3,c) - end - else - return ft>0 and Duel.IsExistingMatchingCard(c23440231.spfilter,tp,LOCATION_GRAVE+LOCATION_HAND,0,3,c) - end -end -function c23440231.spop(e,tp,eg,ep,ev,re,r,rp,c) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - local g=nil - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - if c:IsHasEffect(34822850) then - if ft>0 then - g=Duel.SelectMatchingCard(tp,c23440231.spfilter,tp,LOCATION_MZONE+LOCATION_GRAVE+LOCATION_HAND,0,3,3,c) - else - local sg=Duel.GetMatchingGroup(c23440231.spfilter,tp,LOCATION_MZONE+LOCATION_GRAVE+LOCATION_HAND,0,c) - local ct=-ft+1 - g=sg:FilterSelect(tp,Card.IsLocation,ct,ct,nil,LOCATION_MZONE) - if ct<3 then - sg:Sub(g) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g2=sg:Select(tp,3-ct,3-ct,nil) - g:Merge(g2) - end - end - else - g=Duel.SelectMatchingCard(tp,c23440231.spfilter,tp,LOCATION_GRAVE+LOCATION_HAND,0,3,3,c) - end - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c23440231.desfilter(c) - return (c:IsFacedown() or not c:IsSetCard(0xc5)) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable() -end -function c23440231.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c23440231.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end - local g=Duel.GetMatchingGroup(c23440231.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c23440231.desop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c23440231.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) - if g:GetCount()>0 then - Duel.Destroy(g,REASON_EFFECT) - end -end -function c23440231.negcon(e,tp,eg,ep,ev,re,r,rp) - return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and re:GetHandler()~=e:GetHandler() - and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainNegatable(ev) -end -function c23440231.cfilter(c) - return not c:IsStatus(STATUS_BATTLE_DESTROYED) -end -function c23440231.negcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,c23440231.cfilter,1,nil) end - local g=Duel.SelectReleaseGroup(tp,c23440231.cfilter,1,1,nil) - Duel.Release(g,REASON_COST) -end -function c23440231.negtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - if re:GetHandler():IsAbleToRemove() and re:GetHandler():IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_REMOVE,eg,1,0,0) - end -end -function c23440231.negop(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateActivation(ev) - if re:GetHandler():IsRelateToEffect(re) then - Duel.Remove(eg,POS_FACEUP,REASON_EFFECT) - end -end diff --git a/script/c23454876.lua b/script/c23454876.lua deleted file mode 100644 index 6ad4ae5124..0000000000 --- a/script/c23454876.lua +++ /dev/null @@ -1,61 +0,0 @@ ---CXダーク・フェアリー・チア・ガール -function c23454876.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,5,3) - c:EnableReviveLimit() - --draw - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DRAW) - e1:SetDescription(aux.Stringid(23454876,0)) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCondition(c23454876.drcon) - e1:SetTarget(c23454876.drtg) - e1:SetOperation(c23454876.drop) - c:RegisterEffect(e1) - --damage - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_DAMAGE) - e2:SetDescription(aux.Stringid(23454876,1)) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_BATTLE_DESTROYING) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetCondition(c23454876.damcon) - e2:SetCost(c23454876.damcost) - e2:SetTarget(c23454876.damtg) - e2:SetOperation(c23454876.damop) - c:RegisterEffect(e2) -end -function c23454876.drcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) -end -function c23454876.drtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(1) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c23454876.drop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end -function c23454876.damcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetOverlayGroup():IsExists(Card.IsCode,1,nil,51960178) and aux.bdocon(e,tp,eg,ep,ev,re,r,rp) -end -function c23454876.damcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c23454876.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - local dam=Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)*400 - Duel.SetTargetParam(dam) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,dam) -end -function c23454876.damop(e,tp,eg,ep,ev,re,r,rp) - local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) - local dam=Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)*400 - Duel.Damage(p,dam,REASON_EFFECT) -end diff --git a/script/c23471572.lua b/script/c23471572.lua deleted file mode 100644 index 3fbcb008a9..0000000000 --- a/script/c23471572.lua +++ /dev/null @@ -1,28 +0,0 @@ ---ソロモンの律法書 -function c23471572.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_END_PHASE) - e1:SetOperation(c23471572.activate) - c:RegisterEffect(e1) -end -function c23471572.activate(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetTargetRange(1,0) - e1:SetCode(EFFECT_SKIP_SP) - if Duel.GetTurnPlayer()==tp and Duel.GetCurrentPhase()==PHASE_STANDBY then - e1:SetCondition(c23471572.skipcon) - e1:SetLabel(Duel.GetTurnCount()) - e1:SetReset(RESET_PHASE+RESET_STANDBY+RESET_SELF_TURN,2) - else - e1:SetReset(RESET_PHASE+RESET_STANDBY+RESET_SELF_TURN) - end - Duel.RegisterEffect(e1,tp) -end -function c23471572.skipcon(e) - return Duel.GetTurnCount()~=e:GetLabel() -end diff --git a/script/c23516703.lua b/script/c23516703.lua deleted file mode 100644 index 759009219f..0000000000 --- a/script/c23516703.lua +++ /dev/null @@ -1,40 +0,0 @@ ---サモンリミッター -function c23516703.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --summon count limit - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetRange(LOCATION_SZONE) - e2:SetCode(EFFECT_CANNOT_SUMMON) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetTargetRange(1,1) - e2:SetTarget(c23516703.limittg) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EFFECT_CANNOT_FLIP_SUMMON) - c:RegisterEffect(e3) - local e4=e2:Clone() - e4:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - c:RegisterEffect(e4) - --counter - local et=Effect.CreateEffect(c) - et:SetType(EFFECT_TYPE_FIELD) - et:SetCode(EFFECT_LEFT_SPSUMMON_COUNT) - et:SetRange(LOCATION_SZONE) - et:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - et:SetTargetRange(1,1) - et:SetValue(c23516703.countval) - c:RegisterEffect(et) -end -function c23516703.limittg(e,c,tp) - local t1,t2,t3=Duel.GetActivityCount(tp,ACTIVITY_SUMMON,ACTIVITY_FLIPSUMMON,ACTIVITY_SPSUMMON) - return t1+t2+t3>=2 -end -function c23516703.countval(e,tp) - local t1,t2,t3=Duel.GetActivityCount(tp,ACTIVITY_SUMMON,ACTIVITY_FLIPSUMMON,ACTIVITY_SPSUMMON) - if t1+t2+t2>=2 then return 0 else return 2-t1-t2-t3 end -end diff --git a/script/c23535429.lua b/script/c23535429.lua deleted file mode 100644 index d2cdeb4fd2..0000000000 --- a/script/c23535429.lua +++ /dev/null @@ -1,36 +0,0 @@ ---牙城のガーディアン -function c23535429.initial_effect(c) - --defup - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(23535429,0)) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetRange(LOCATION_HAND) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e1:SetCondition(c23535429.condition) - e1:SetCost(c23535429.cost) - e1:SetOperation(c23535429.operation) - c:RegisterEffect(e1) -end -function c23535429.condition(e,tp,eg,ep,ev,re,r,rp) - local phase=Duel.GetCurrentPhase() - if phase~=PHASE_DAMAGE or Duel.IsDamageCalculated() then return false end - local d=Duel.GetAttackTarget() - return d and d:IsControler(tp) and d:IsDefencePos() -end -function c23535429.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end -function c23535429.operation(e,tp,eg,ep,ev,re,r,rp) - local d=Duel.GetAttackTarget() - if not d:IsRelateToBattle() then return end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_DEFENCE) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e1:SetValue(1500) - d:RegisterEffect(e1) -end diff --git a/script/c23536866.lua b/script/c23536866.lua deleted file mode 100644 index 98da514f82..0000000000 --- a/script/c23536866.lua +++ /dev/null @@ -1,83 +0,0 @@ ---ゲイザー・シャーク -function c23536866.initial_effect(c) - --xyz - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(23536866,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_GRAVE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCountLimit(1,23536866) - e1:SetCost(c23536866.cost) - e1:SetTarget(c23536866.target) - e1:SetOperation(c23536866.operation) - c:RegisterEffect(e1) -end -function c23536866.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) -end -function c23536866.filter(c,e,tp) - return c:GetLevel()==5 and c:IsAttribute(ATTRIBUTE_WATER) and not c:IsCode(23536866) - and c:IsCanBeEffectTarget(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c23536866.xyzfilter(c,mg) - if c.xyz_count~=2 then return false end - return c:IsAttribute(ATTRIBUTE_WATER) and c:IsXyzSummonable(mg) -end -function c23536866.mfilter1(c,exg) - return exg:IsExists(c23536866.mfilter2,1,nil,c) -end -function c23536866.mfilter2(c,mc) - return c.xyz_filter(mc) -end -function c23536866.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - local mg=Duel.GetMatchingGroup(c23536866.filter,tp,LOCATION_GRAVE,0,nil,e,tp) - if chk==0 then return Duel.IsPlayerCanSpecialSummonCount(tp,2) - and Duel.GetLocationCount(tp,LOCATION_MZONE)>1 and mg:GetCount()>1 - and Duel.IsExistingMatchingCard(c23536866.xyzfilter,tp,LOCATION_EXTRA,0,1,nil,mg) end - local exg=Duel.GetMatchingGroup(c23536866.xyzfilter,tp,LOCATION_EXTRA,0,nil,mg) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg1=mg:FilterSelect(tp,c23536866.mfilter1,1,1,nil,exg) - local tc1=sg1:GetFirst() - local exg2=exg:Filter(c23536866.mfilter2,nil,tc1) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg2=mg:FilterSelect(tp,c23536866.mfilter1,1,1,tc1,exg2) - sg1:Merge(sg2) - Duel.SetTargetCard(sg1) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,sg1,2,0,0) -end -function c23536866.filter2(c,e,tp) - return c:IsRelateToEffect(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c23536866.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 then return end - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(c23536866.filter2,nil,e,tp) - if g:GetCount()<2 then return end - local tc1=g:GetFirst() - local tc2=g:GetNext() - Duel.SpecialSummonStep(tc1,0,tp,tp,false,false,POS_FACEUP) - Duel.SpecialSummonStep(tc2,0,tp,tp,false,false,POS_FACEUP) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc1:RegisterEffect(e1) - local e2=e1:Clone() - tc2:RegisterEffect(e2) - local e3=Effect.CreateEffect(e:GetHandler()) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_DISABLE_EFFECT) - e3:SetReset(RESET_EVENT+0x1fe0000) - tc1:RegisterEffect(e3) - local e4=e3:Clone() - tc2:RegisterEffect(e4) - Duel.SpecialSummonComplete() - Duel.BreakEffect() - local xyzg=Duel.GetMatchingGroup(c23536866.xyzfilter,tp,LOCATION_EXTRA,0,nil,g) - if xyzg:GetCount()>0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local xyz=xyzg:Select(tp,1,1,nil):GetFirst() - Duel.XyzSummon(tp,xyz,g) - end -end diff --git a/script/c23557835.lua b/script/c23557835.lua deleted file mode 100644 index a598ee7ae7..0000000000 --- a/script/c23557835.lua +++ /dev/null @@ -1,56 +0,0 @@ ---次元融合 -function c23557835.initial_effect(c) - --activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c23557835.cost) - e1:SetTarget(c23557835.tg) - e1:SetOperation(c23557835.op) - c:RegisterEffect(e1) -end -function c23557835.filter(c,e,tp) - return c:IsFaceup() and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c23557835.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,2000) end - Duel.PayLPCost(tp,2000) -end -function c23557835.tg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return - (Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c23557835.filter,tp,LOCATION_REMOVED,0,1,nil,e,tp)) or - (Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c23557835.filter,tp,0,LOCATION_REMOVED,1,nil,e,1-tp)) - end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,2,LOCATION_REMOVED) -end -function c23557835.op(e,tp,eg,ep,ev,re,r,rp) - local count=0 - local ft1=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ft1>0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c23557835.filter,tp,LOCATION_REMOVED,0,ft1,ft1,nil,e,tp) - if g:GetCount()>0 then - local tc=g:GetFirst() - while tc do - Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) - tc=g:GetNext() - count=count+1 - end - end - end - local ft2=Duel.GetLocationCount(1-tp,LOCATION_MZONE) - if ft2>0 then - Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(1-tp,c23557835.filter,tp,0,LOCATION_REMOVED,ft2,ft2,nil,e,1-tp) - if g:GetCount()>0 then - local tc=g:GetFirst() - while tc do - Duel.SpecialSummonStep(tc,0,1-tp,1-tp,false,false,POS_FACEUP) - tc=g:GetNext() - count=count+1 - end - end - end - if count>0 then Duel.SpecialSummonComplete() end -end diff --git a/script/c23558733.lua b/script/c23558733.lua deleted file mode 100644 index 380d8100fc..0000000000 --- a/script/c23558733.lua +++ /dev/null @@ -1,81 +0,0 @@ ---フェニキシアン・クラスター・アマリリス -function c23558733.initial_effect(c) - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(aux.FALSE) - c:RegisterEffect(e1) - --damage - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_BATTLED) - e2:SetOperation(c23558733.desop) - c:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(23558733,0)) - e3:SetCategory(CATEGORY_DAMAGE) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e3:SetCode(EVENT_TO_GRAVE) - e3:SetCondition(c23558733.damcon) - e3:SetTarget(c23558733.damtg) - e3:SetOperation(c23558733.damop) - c:RegisterEffect(e3) - --Special Summon - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(23558733,1)) - e4:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_FIELD) - e4:SetCategory(CATEGORY_SPECIAL_SUMMON) - e4:SetCode(EVENT_PHASE+PHASE_END) - e4:SetRange(LOCATION_GRAVE) - e4:SetCountLimit(1) - e4:SetCondition(c23558733.spcon) - e4:SetCost(c23558733.spcost) - e4:SetTarget(c23558733.sptg) - e4:SetOperation(c23558733.spop) - c:RegisterEffect(e4) -end -function c23558733.desop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c==Duel.GetAttacker() and not c:IsStatus(STATUS_BATTLE_DESTROYED) then - Duel.Destroy(c,REASON_EFFECT) - end -end -function c23558733.damcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetPreviousControler()==tp and bit.band(r,REASON_DESTROY)~=0 - and bit.band(e:GetHandler():GetPreviousLocation(),LOCATION_ONFIELD)>0 -end -function c23558733.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(800) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,800) -end -function c23558733.damop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end -function c23558733.cfilter(c) - return c:IsRace(RACE_PLANT) and c:IsAbleToRemoveAsCost() -end -function c23558733.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c23558733.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c23558733.cfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c23558733.cfilter,tp,LOCATION_GRAVE,0,1,1,e:GetHandler()) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c23558733.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c23558733.spop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - Duel.SpecialSummon(e:GetHandler(),0,tp,tp,true,false,POS_FACEUP_DEFENCE) - end -end diff --git a/script/c23562407.lua b/script/c23562407.lua deleted file mode 100644 index 0efc6e2d2a..0000000000 --- a/script/c23562407.lua +++ /dev/null @@ -1,94 +0,0 @@ ---聖剣カリバーン -function c23562407.initial_effect(c) - c:SetUniqueOnField(1,0,23562407) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c23562407.target) - e1:SetOperation(c23562407.operation) - c:RegisterEffect(e1) - --Atk up - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(500) - c:RegisterEffect(e2) - --Equip limit - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_EQUIP_LIMIT) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e3:SetValue(c23562407.eqlimit) - c:RegisterEffect(e3) - --lp - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(23562407,0)) - e4:SetCategory(CATEGORY_RECOVER) - e4:SetType(EFFECT_TYPE_IGNITION) - e4:SetRange(LOCATION_SZONE) - e4:SetCountLimit(1) - e4:SetTarget(c23562407.lptg) - e4:SetOperation(c23562407.lpop) - c:RegisterEffect(e4) - --equip - local e5=Effect.CreateEffect(c) - e5:SetDescription(aux.Stringid(23562407,1)) - e5:SetCategory(CATEGORY_EQUIP) - e5:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e5:SetCode(EVENT_TO_GRAVE) - e5:SetCountLimit(1,23562407) - e5:SetCondition(c23562407.eqcon) - e5:SetTarget(c23562407.eqtg) - e5:SetOperation(c23562407.operation) - c:RegisterEffect(e5) -end -function c23562407.eqlimit(e,c) - return c:IsRace(RACE_WARRIOR) -end -function c23562407.eqfilter1(c) - return c:IsFaceup() and c:IsRace(RACE_WARRIOR) -end -function c23562407.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c23562407.eqfilter1(chkc) end - if chk==0 then return Duel.IsExistingTarget(c23562407.eqfilter1,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c23562407.eqfilter1,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c23562407.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() and c:CheckUniqueOnField(tp) then - Duel.Equip(tp,c,tc) - end -end -function c23562407.lptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(500) - Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,500) -end -function c23562407.lpop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Recover(p,d,REASON_EFFECT) -end -function c23562407.eqcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousPosition(POS_FACEUP) and c:IsReason(REASON_DESTROY) and c:CheckUniqueOnField(tp) -end -function c23562407.eqfilter2(c) - return c:IsFaceup() and c:IsSetCard(0x107a) and c:IsRace(RACE_WARRIOR) -end -function c23562407.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c23562407.eqfilter2(chkc) end - if chk==0 then return e:GetHandler():IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingTarget(c23562407.eqfilter2,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c23562407.eqfilter2,tp,LOCATION_MZONE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end diff --git a/script/c2356994.lua b/script/c2356994.lua deleted file mode 100644 index 38dd445e7f..0000000000 --- a/script/c2356994.lua +++ /dev/null @@ -1,84 +0,0 @@ ---偉大天狗 -function c2356994.initial_effect(c) - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - c:RegisterEffect(e1) - --summon,flip - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetCode(EVENT_SUMMON_SUCCESS) - e2:SetOperation(c2356994.retreg) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EVENT_FLIP) - c:RegisterEffect(e3) - --skip BP - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(2356994,1)) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e4:SetCode(EVENT_BATTLE_DAMAGE) - e4:SetCondition(c2356994.skipcon) - e4:SetOperation(c2356994.skipop) - c:RegisterEffect(e4) -end -function c2356994.skipcon(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp -end -function c2356994.skipop(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SKIP_BP) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetTargetRange(0,1) - if Duel.GetTurnPlayer()~=tp then - e1:SetLabel(Duel.GetTurnCount()) - e1:SetCondition(c2356994.bpcon) - e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN,2) - else - e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN,1) - end - Duel.RegisterEffect(e1,tp) -end -function c2356994.bpcon(e) - return Duel.GetTurnCount()~=e:GetLabel() -end -function c2356994.retreg(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - --to hand - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetDescription(aux.Stringid(2356994,0)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e1:SetCondition(c2356994.retcon) - e1:SetTarget(c2356994.rettg) - e1:SetOperation(c2356994.retop) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - c:RegisterEffect(e2) -end -function c2356994.retcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsHasEffect(EFFECT_SPIRIT_DONOT_RETURN) then return false end - if e:IsHasType(EFFECT_TYPE_TRIGGER_F) then - return not c:IsHasEffect(EFFECT_SPIRIT_MAYNOT_RETURN) - else return c:IsHasEffect(EFFECT_SPIRIT_MAYNOT_RETURN) end -end -function c2356994.rettg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0) -end -function c2356994.retop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SendtoHand(c,nil,REASON_EFFECT) - end -end diff --git a/script/c23571046.lua b/script/c23571046.lua deleted file mode 100644 index 5aed6d2eb4..0000000000 --- a/script/c23571046.lua +++ /dev/null @@ -1,37 +0,0 @@ ---ボルト・ヘッジホッグ -function c23571046.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(23571046,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_GRAVE) - e1:SetCondition(c23571046.condition) - e1:SetTarget(c23571046.target) - e1:SetOperation(c23571046.operation) - c:RegisterEffect(e1) -end -function c23571046.cfilter(c) - return c:IsFaceup() and c:IsType(TYPE_TUNER) -end -function c23571046.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c23571046.cfilter,tp,LOCATION_MZONE,0,1,nil) -end -function c23571046.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c23571046.operation(e,tp,eg,ep,ev,re,r,rp) - if not Duel.IsExistingMatchingCard(c23571046.cfilter,tp,LOCATION_MZONE,0,1,nil) then return end - local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+0x47e0000) - e1:SetValue(LOCATION_REMOVED) - c:RegisterEffect(e1,true) - end -end diff --git a/script/c23587624.lua b/script/c23587624.lua deleted file mode 100644 index 137101ceea..0000000000 --- a/script/c23587624.lua +++ /dev/null @@ -1,87 +0,0 @@ ---青天の霹靂 -function c23587624.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c23587624.condition) - e1:SetTarget(c23587624.target) - e1:SetOperation(c23587624.activate) - c:RegisterEffect(e1) -end -function c23587624.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0 and Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 -end -function c23587624.spfilter(c,e,tp) - return c:GetOriginalLevel()<=10 and not c:IsSummonableCard() and c:IsType(TYPE_MONSTER) - and c:IsCanBeSpecialSummoned(e,0,tp,true,false) -end -function c23587624.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c23587624.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c23587624.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local c=e:GetHandler() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c23587624.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - local tc=g:GetFirst() - if tc and Duel.SpecialSummonStep(tc,0,tp,tp,true,false,POS_FACEUP) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_IMMUNE_EFFECT) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(c23587624.efilter) - e1:SetOwnerPlayer(tp) - tc:RegisterEffect(e1,true) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_PHASE+PHASE_END) - e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCondition(c23587624.tdcon) - e2:SetOperation(c23587624.tdop) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END+RESET_OPPO_TURN) - tc:RegisterEffect(e2,true) - end - Duel.SpecialSummonComplete() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_SUMMON) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetReset(RESET_PHASE+RESET_END) - e1:SetTargetRange(1,0) - Duel.RegisterEffect(e1,tp) - local e2=e1:Clone() - e2:SetCode(EFFECT_CANNOT_MSET) - Duel.RegisterEffect(e2,tp) - local e3=e1:Clone() - e3:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - Duel.RegisterEffect(e3,tp) - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_FIELD) - e4:SetCode(EFFECT_CHANGE_DAMAGE) - e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e4:SetTargetRange(0,1) - e4:SetValue(0) - e4:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e4,tp) - local e5=e4:Clone() - e5:SetCode(EFFECT_NO_EFFECT_DAMAGE) - e5:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e5,tp) -end -function c23587624.efilter(e,re) - return e:GetOwnerPlayer()==re:GetOwnerPlayer() and e:GetHandler()~=re:GetHandler() -end -function c23587624.tdcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp -end -function c23587624.tdop(e,tp,eg,ep,ev,re,r,rp) - Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_EFFECT) -end diff --git a/script/c2359348.lua b/script/c2359348.lua deleted file mode 100644 index 78fa8afc61..0000000000 --- a/script/c2359348.lua +++ /dev/null @@ -1,49 +0,0 @@ ---ペンデュラム・エリア -function c2359348.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCondition(c2359348.condition) - e1:SetTarget(c2359348.target) - e1:SetOperation(c2359348.activate) - c:RegisterEffect(e1) -end -function c2359348.cfilter(c) - return c:IsFaceup() and c:IsType(TYPE_PENDULUM) -end -function c2359348.condition(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetFieldGroup(tp,LOCATION_MZONE,0) - return g:GetCount()>0 and g:FilterCount(c2359348.cfilter,nil)==g:GetCount() -end -function c2359348.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - local tc1=Duel.GetFieldCard(tp,LOCATION_SZONE,6) - local tc2=Duel.GetFieldCard(tp,LOCATION_SZONE,7) - if chk==0 then return tc1 and tc2 - and tc1:IsCanBeEffectTarget(e) and tc2:IsCanBeEffectTarget(e) - and tc1:IsDestructable() and tc2:IsDestructable() end - local g=Group.FromCards(tc1,tc2) - Duel.SetTargetCard(g) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,2,0,0) -end -function c2359348.activate(e,tp,eg,ep,ev,re,r,rp) - local tc1=Duel.GetFieldCard(tp,LOCATION_SZONE,6) - local tc2=Duel.GetFieldCard(tp,LOCATION_SZONE,7) - local g=Group.FromCards(tc1,tc2) - if tc1:IsRelateToEffect(e) and tc2:IsRelateToEffect(e) - and Duel.Destroy(g,REASON_EFFECT)==2 then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) - e1:SetTargetRange(1,1) - e1:SetTarget(c2359348.splimit) - Duel.RegisterEffect(e1,tp) - end -end -function c2359348.splimit(e,c,sump,sumtype,sumpos,targetp,se) - return bit.band(sumtype,SUMMON_TYPE_PENDULUM)~=SUMMON_TYPE_PENDULUM -end diff --git a/script/c23615409.lua b/script/c23615409.lua deleted file mode 100644 index fabc2d3b3c..0000000000 --- a/script/c23615409.lua +++ /dev/null @@ -1,19 +0,0 @@ ---虫除けバリアー -function c23615409.initial_effect(c) - --activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --cannot attack - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(0,LOCATION_MZONE) - e2:SetTarget(c23615409.atktarget) - c:RegisterEffect(e2) -end -function c23615409.atktarget(e,c) - return c:IsRace(RACE_INSECT) -end diff --git a/script/c23626223.lua b/script/c23626223.lua deleted file mode 100644 index 4d6e42782b..0000000000 --- a/script/c23626223.lua +++ /dev/null @@ -1,71 +0,0 @@ ---苦紋様の土像 -function c23626223.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c23626223.target) - e1:SetOperation(c23626223.activate) - c:RegisterEffect(e1) -end -function c23626223.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsPlayerCanSpecialSummonMonster(tp,23626223,0,0x21,0,2500,7,RACE_ROCK,ATTRIBUTE_EARTH) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c23626223.activate(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) then return end - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 - or not Duel.IsPlayerCanSpecialSummonMonster(tp,23626223,0,0x21,0,2500,7,RACE_ROCK,ATTRIBUTE_EARTH) then return end - c:AddTrapMonsterAttribute(TYPE_EFFECT,ATTRIBUTE_EARTH,RACE_ROCK,7,0,2500) - Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP) - c:TrapMonsterBlock() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c23626223.tgcon) - e1:SetValue(aux.tgoval) - e1:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(23626223,0)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) - e2:SetRange(LOCATION_MZONE) - e2:SetCondition(c23626223.descon) - e2:SetTarget(c23626223.destg) - e2:SetOperation(c23626223.desop) - e2:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e2) -end -function c23626223.tgfilter(c) - return c:IsFaceup() and bit.band(c:GetOriginalType(),TYPE_TRAP)~=0 and c:IsType(TYPE_MONSTER) -end -function c23626223.tgcon(e) - return Duel.IsExistingMatchingCard(c23626223.tgfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,e:GetHandler()) -end -function c23626223.cfilter(c,tp) - return c:IsPreviousLocation(LOCATION_SZONE) and c:GetPreviousControler()==tp -end -function c23626223.descon(e,tp,eg,ep,ev,re,r,rp) - return not eg:IsContains(e:GetHandler()) and eg:IsExists(c23626223.cfilter,1,nil,tp) -end -function c23626223.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsDestructable() end - if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c23626223.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c2362787.lua b/script/c2362787.lua deleted file mode 100644 index bfa4af8ffe..0000000000 --- a/script/c2362787.lua +++ /dev/null @@ -1,34 +0,0 @@ ---救援光 -function c2362787.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c2362787.cost) - e1:SetTarget(c2362787.target) - e1:SetOperation(c2362787.activate) - c:RegisterEffect(e1) -end -function c2362787.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,800) end - Duel.PayLPCost(tp,800) -end -function c2362787.filter(c) - return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsAbleToHand() -end -function c2362787.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_REMOVED) and c2362787.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c2362787.filter,tp,LOCATION_REMOVED,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c2362787.filter,tp,LOCATION_REMOVED,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c2362787.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end diff --git a/script/c23639291.lua b/script/c23639291.lua deleted file mode 100644 index 91a814788f..0000000000 --- a/script/c23639291.lua +++ /dev/null @@ -1,36 +0,0 @@ ---アグレッシブ・クラウディアン -function c23639291.initial_effect(c) - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCondition(c23639291.condition) - e1:SetTarget(c23639291.target) - e1:SetOperation(c23639291.operation) - c:RegisterEffect(e1) -end -function c23639291.condition(e,tp,eg,ep,ev,re,r,rp) - local tc=eg:GetFirst() - return eg:GetCount()==1 and tc:IsControler(tp) and tc:GetPreviousControler()==tp and tc:IsReason(REASON_DESTROY) - and tc:GetReasonEffect() and tc:GetReasonEffect():GetHandler()==tc -end -function c23639291.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc==eg:GetFirst() end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and eg:GetFirst():IsCanBeSpecialSummoned(e,0,tp,false,false) and eg:GetFirst():IsCanBeEffectTarget(e) end - Duel.SetTargetCard(eg:GetFirst()) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,eg:GetFirst(),1,0,0) -end -function c23639291.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP_ATTACK) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_CHANGE_POS_E) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - Duel.SpecialSummonComplete() - tc:AddCounter(0x19,1) - end -end diff --git a/script/c23649496.lua b/script/c23649496.lua deleted file mode 100644 index 9eb5662a32..0000000000 --- a/script/c23649496.lua +++ /dev/null @@ -1,90 +0,0 @@ ---No.18 紋章祖プレイン・コート -function c23649496.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,4,2) - c:EnableReviveLimit() - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(23649496,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,0x1c0) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c23649496.cost) - e1:SetTarget(c23649496.target) - e1:SetOperation(c23649496.operation) - c:RegisterEffect(e1) - --to grave - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(23649496,2)) - e2:SetCategory(CATEGORY_TOGRAVE) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetTarget(c23649496.tgtg) - e2:SetOperation(c23649496.tgop) - c:RegisterEffect(e2) -end -c23649496.xyz_number=18 -function c23649496.cost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:CheckRemoveOverlayCard(tp,1,REASON_COST) and c:GetFlagEffect(23649496)==0 end - c:RemoveOverlayCard(tp,1,1,REASON_COST) - c:RegisterFlagEffect(23649496,RESET_CHAIN,0,1) -end -function c23649496.cfilter(c) - return c:IsFaceup() and Duel.IsExistingMatchingCard(c23649496.filter,0,LOCATION_MZONE,LOCATION_MZONE,1,c,c:GetCode()) -end -function c23649496.filter(c,code) - return c:IsFaceup() and c:IsCode(code) and c:IsDestructable() -end -function c23649496.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c23649496.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - local g=Duel.GetMatchingGroup(c23649496.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c23649496.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(23649496,1)) - local g=Duel.SelectMatchingCard(tp,c23649496.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - local tc=g:GetFirst() - if tc then - local dg=Duel.GetMatchingGroup(c23649496.filter,tp,LOCATION_MZONE,LOCATION_MZONE,tc,tc:GetCode()) - Duel.Destroy(dg,REASON_EFFECT) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetRange(LOCATION_MZONE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetTargetRange(0,1) - e1:SetTarget(c23649496.splimit) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetLabel(tc:GetCode()) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_CANNOT_SUMMON) - c:RegisterEffect(e2) - local e3=e1:Clone() - e3:SetCode(EFFECT_CANNOT_FLIP_SUMMON) - c:RegisterEffect(e3) - end -end -function c23649496.splimit(e,c,sump,sumtype,sumpos,targetp,se) - return c:IsCode(e:GetLabel()) -end -function c23649496.tgfilter(c) - return c:IsSetCard(0x76) and c:IsAbleToGrave() -end -function c23649496.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c23649496.tgfilter,tp,LOCATION_DECK,0,2,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,2,tp,LOCATION_DECK) -end -function c23649496.tgop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c23649496.tgfilter,tp,LOCATION_DECK,0,nil) - if g:GetCount()>1 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local sg=g:Select(tp,2,2,nil) - Duel.SendtoGrave(sg,REASON_EFFECT) - end -end diff --git a/script/c23681456.lua b/script/c23681456.lua deleted file mode 100644 index 99147194f9..0000000000 --- a/script/c23681456.lua +++ /dev/null @@ -1,62 +0,0 @@ ---マドルチェ・ハッピーフェスタ -function c23681456.initial_effect(c) - --activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c23681456.target) - e1:SetOperation(c23681456.operation) - c:RegisterEffect(e1) -end -function c23681456.filter(c,e,tp) - return c:IsSetCard(0x71) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c23681456.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c23681456.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c23681456.operation(e,tp,eg,ep,ev,re,r,rp) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ft<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c23681456.filter,tp,LOCATION_HAND,0,1,ft,nil,e,tp) - if g:GetCount()>0 then - local fid=e:GetHandler():GetFieldID() - local tc=g:GetFirst() - while tc do - Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) - tc:RegisterFlagEffect(23681456,RESET_EVENT+0x1fe0000,0,1,fid) - tc=g:GetNext() - end - Duel.SpecialSummonComplete() - g:KeepAlive() - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e1:SetCountLimit(1) - e1:SetLabel(fid) - e1:SetLabelObject(g) - e1:SetCondition(c23681456.retcon) - e1:SetOperation(c23681456.retop) - Duel.RegisterEffect(e1,tp) - end -end -function c23681456.retfilter(c,fid) - return c:GetFlagEffectLabel(23681456)==fid -end -function c23681456.retcon(e,tp,eg,ep,ev,re,r,rp) - local g=e:GetLabelObject() - if not g:IsExists(c23681456.retfilter,1,nil,e:GetLabel()) then - g:DeleteGroup() - e:Reset() - return false - else return true end -end -function c23681456.retop(e,tp,eg,ep,ev,re,r,rp) - local g=e:GetLabelObject() - local tg=g:Filter(c23681456.retfilter,nil,e:GetLabel()) - Duel.SendtoDeck(tg,nil,2,REASON_EFFECT) -end diff --git a/script/c23689697.lua b/script/c23689697.lua deleted file mode 100644 index 8d11b729f3..0000000000 --- a/script/c23689697.lua +++ /dev/null @@ -1,81 +0,0 @@ ---凍氷帝メビウス -function c23689697.initial_effect(c) - --summon with 1 tribute - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(23689697,0)) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SUMMON_PROC) - e1:SetCondition(c23689697.otcon) - e1:SetOperation(c23689697.otop) - e1:SetValue(SUMMON_TYPE_ADVANCE) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_SET_PROC) - c:RegisterEffect(e2) - --destroy - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(23689697,1)) - e3:SetCategory(CATEGORY_DESTROY) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetCode(EVENT_SUMMON_SUCCESS) - e3:SetCondition(c23689697.descon) - e3:SetTarget(c23689697.destg) - e3:SetOperation(c23689697.desop) - c:RegisterEffect(e3) - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetCode(EFFECT_MATERIAL_CHECK) - e4:SetValue(c23689697.valcheck) - e4:SetLabelObject(e3) - c:RegisterEffect(e4) -end -function c23689697.otfilter(c) - return bit.band(c:GetSummonType(),SUMMON_TYPE_ADVANCE)==SUMMON_TYPE_ADVANCE -end -function c23689697.otcon(e,c) - if c==nil then return true end - local mg=Duel.GetMatchingGroup(c23689697.otfilter,0,LOCATION_MZONE,LOCATION_MZONE,nil) - return c:GetLevel()>6 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-1 - and Duel.GetTributeCount(c,mg)>0 -end -function c23689697.otop(e,tp,eg,ep,ev,re,r,rp,c) - local mg=Duel.GetMatchingGroup(c23689697.otfilter,0,LOCATION_MZONE,LOCATION_MZONE,nil) - local sg=Duel.SelectTribute(tp,c,1,1,mg) - c:SetMaterial(sg) - Duel.Release(sg,REASON_SUMMON+REASON_MATERIAL) -end -function c23689697.descon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_ADVANCE -end -function c23689697.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable() -end -function c23689697.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and c23689697.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c23689697.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c23689697.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,3,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) - if e:GetLabel()==1 then - Duel.SetChainLimit(c23689697.chlimit) - end -end -function c23689697.chlimit(e,ep,tp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - return tp==ep or not g:IsContains(e:GetHandler()) -end -function c23689697.desop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local sg=g:Filter(Card.IsRelateToEffect,nil,e) - Duel.Destroy(sg,REASON_EFFECT) -end -function c23689697.valcheck(e,c) - local g=c:GetMaterial() - if g:IsExists(Card.IsAttribute,1,nil,ATTRIBUTE_WATER) then - e:GetLabelObject():SetLabel(1) - else - e:GetLabelObject():SetLabel(0) - end -end diff --git a/script/c23693634.lua b/script/c23693634.lua deleted file mode 100644 index 6169064bda..0000000000 --- a/script/c23693634.lua +++ /dev/null @@ -1,49 +0,0 @@ ---ギガンテック・ファイター -function c23693634.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1) - c:EnableReviveLimit() - --Atk up - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetValue(c23693634.atkval) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(23693634,0)) - e2:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetCode(EVENT_BATTLE_DESTROYED) - e2:SetCondition(c23693634.sumcon) - e2:SetTarget(c23693634.sumtg) - e2:SetOperation(c23693634.sumop) - c:RegisterEffect(e2) -end -function c23693634.atkval(e,c) - return Duel.GetMatchingGroupCount(Card.IsRace,c:GetControler(),LOCATION_GRAVE,LOCATION_GRAVE,nil,RACE_WARRIOR)*100 -end -function c23693634.sumcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetLocation()==LOCATION_GRAVE - and bit.band(e:GetHandler():GetReason(),REASON_BATTLE)~=0 -end -function c23693634.filter(c,e,tp) - return c:IsRace(RACE_WARRIOR) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c23693634.sumtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and c23693634.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c23693634.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c23693634.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c23693634.sumop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c2370081.lua b/script/c2370081.lua deleted file mode 100644 index 07d0f72cc9..0000000000 --- a/script/c2370081.lua +++ /dev/null @@ -1,50 +0,0 @@ ---はがねの甲羅 -function c2370081.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c2370081.target) - e1:SetOperation(c2370081.operation) - c:RegisterEffect(e1) - --atk up - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(400) - c:RegisterEffect(e2) - --def down - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_EQUIP) - e3:SetCode(EFFECT_UPDATE_DEFENCE) - e3:SetValue(-200) - c:RegisterEffect(e3) - --equip limit - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetCode(EFFECT_EQUIP_LIMIT) - e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e4:SetValue(c2370081.eqlimit) - c:RegisterEffect(e4) -end -function c2370081.eqlimit(e,c) - return c:IsAttribute(ATTRIBUTE_WATER) -end -function c2370081.filter(c) - return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_WATER) -end -function c2370081.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c2370081.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c2370081.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c2370081.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c2370081.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,e:GetHandler(),tc) - end -end diff --git a/script/c23701465.lua b/script/c23701465.lua deleted file mode 100644 index 66d519f48e..0000000000 --- a/script/c23701465.lua +++ /dev/null @@ -1,35 +0,0 @@ ---原初の種 -function c23701465.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c23701465.condition) - e1:SetTarget(c23701465.target) - e1:SetOperation(c23701465.activate) - c:RegisterEffect(e1) -end -function c23701465.cfilter(c) - local code=c:GetCode() - return c:IsFaceup() and (code==72989439 or code==82301904) -end -function c23701465.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c23701465.cfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) -end -function c23701465.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_REMOVED) and chkc:IsAbleToHand()end - if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToHand,tp,LOCATION_REMOVED,0,2,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,Card.IsAbleToHand,tp,LOCATION_REMOVED,0,2,2,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,2,0,0) -end -function c23701465.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local sg=g:Filter(Card.IsRelateToEffect,nil,e) - if sg:GetCount()>0 then - Duel.SendtoHand(sg,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,sg) - end -end diff --git a/script/c2371506.lua b/script/c2371506.lua deleted file mode 100644 index 6aca1d5497..0000000000 --- a/script/c2371506.lua +++ /dev/null @@ -1,37 +0,0 @@ ---エクシーズ・リフレクト -function c2371506.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY+CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_CHAINING) - e1:SetCondition(c2371506.condition) - e1:SetTarget(c2371506.target) - e1:SetOperation(c2371506.activate) - c:RegisterEffect(e1) -end -function c2371506.cfilter(c) - return c:IsLocation(LOCATION_MZONE) and c:IsFaceup() and c:IsType(TYPE_XYZ) -end -function c2371506.condition(e,tp,eg,ep,ev,re,r,rp) - if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return end - if not re:IsActiveType(TYPE_MONSTER) and not re:IsHasType(EFFECT_TYPE_ACTIVATE) then return false end - local tg=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) - return tg and tg:IsExists(c2371506.cfilter,1,nil) and Duel.IsChainNegatable(ev) -end -function c2371506.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) - end - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,800) -end -function c2371506.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateActivation(ev) - if re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(eg,REASON_EFFECT) - end - Duel.BreakEffect() - Duel.Damage(1-tp,800,REASON_EFFECT) -end diff --git a/script/c23740893.lua b/script/c23740893.lua deleted file mode 100644 index 7f24668242..0000000000 --- a/script/c23740893.lua +++ /dev/null @@ -1,60 +0,0 @@ ---妖仙獣 木魅 -function c23740893.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_COUNTER) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCountLimit(1,23740893) - e1:SetCost(c23740893.cost) - e1:SetTarget(c23740893.target) - e1:SetOperation(c23740893.activate) - c:RegisterEffect(e1) - --extra summon - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_GRAVE) - e2:SetCost(c23740893.sumcost) - e2:SetTarget(c23740893.sumtg) - e2:SetOperation(c23740893.sumop) - c:RegisterEffect(e2) -end -function c23740893.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end -function c23740893.filter(c) - return c:IsFaceup() and c:IsCode(27918963) and c:IsCanAddCounter(0x33,3) -end -function c23740893.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsOnField() and c23740893.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c23740893.filter,tp,LOCATION_ONFIELD,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(23740893,0)) - Duel.SelectTarget(tp,c23740893.filter,tp,LOCATION_ONFIELD,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,3,0,0x33) -end -function c23740893.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - tc:AddCounter(0x33,3) - end -end -function c23740893.sumcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) -end -function c23740893.sumtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanSummon(tp) end -end -function c23740893.sumop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetFlagEffect(tp,23740893)~=0 then return end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetTargetRange(LOCATION_HAND,0) - e1:SetCode(EFFECT_EXTRA_SUMMON_COUNT) - e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0xb3)) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) - Duel.RegisterFlagEffect(tp,23740893,RESET_PHASE+PHASE_END,0,1) -end diff --git a/script/c23756165.lua b/script/c23756165.lua deleted file mode 100644 index e2e9a8da6e..0000000000 --- a/script/c23756165.lua +++ /dev/null @@ -1,122 +0,0 @@ ---魅惑の女王 LV5 -function c23756165.initial_effect(c) - --equip - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetOperation(c23756165.regop) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(23756165,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) - e2:SetCondition(c23756165.spcon) - e2:SetCost(c23756165.spcost) - e2:SetTarget(c23756165.sptg) - e2:SetOperation(c23756165.spop) - e2:SetLabelObject(e1) - c:RegisterEffect(e2) -end -c23756165.lvupcount=2 -c23756165.lvup={50140163,87257460} -c23756165.lvdncount=1 -c23756165.lvdn={87257460} -function c23756165.regop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:GetSummonType()==SUMMON_TYPE_SPECIAL+1 then - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(23756165,0)) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCondition(c23756165.eqcon) - e1:SetTarget(c23756165.eqtg) - e1:SetOperation(c23756165.eqop) - e1:SetReset(RESET_EVENT+0x1ff0000) - e1:SetLabelObject(e) - c:RegisterEffect(e1) - end -end -function c23756165.eqcon(e,tp,eg,ep,ev,re,r,rp) - local ec=e:GetLabelObject():GetLabelObject() - return ec==nil or ec:GetFlagEffect(23756165)==0 -end -function c23756165.filter(c) - local lv=c:GetLevel() - return lv>0 and lv<=5 and c:IsFaceup() and c:IsAbleToChangeControler() -end -function c23756165.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c23756165.filter(chkc) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingTarget(c23756165.filter,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local g=Duel.SelectTarget(tp,c23756165.filter,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0) -end -function c23756165.eqlimit(e,c) - return e:GetOwner()==c and not c:IsDisabled() -end -function c23756165.eqop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - if c:IsFaceup() and c:IsRelateToEffect(e) then - local atk=tc:GetTextAttack() - local def=tc:GetTextDefence() - if atk<0 then atk=0 end - if def<0 then def=0 end - if not Duel.Equip(tp,tc,c,false) then return end - --Add Equip limit - tc:RegisterFlagEffect(23756165,RESET_EVENT+0x1fe0000,0,0) - e:GetLabelObject():SetLabelObject(tc) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_COPY_INHERIT+EFFECT_FLAG_OWNER_RELATE) - e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(c23756165.eqlimit) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_OWNER_RELATE) - e2:SetCode(EFFECT_DESTROY_SUBSTITUTE) - e2:SetReset(RESET_EVENT+0x1fe0000) - e2:SetValue(c23756165.repval) - tc:RegisterEffect(e2) - else Duel.SendtoGrave(tc,REASON_EFFECT) end - end -end -function c23756165.repval(e,re,r,rp) - return bit.band(r,REASON_BATTLE)~=0 -end -function c23756165.spcon(e,tp,eg,ep,ev,re,r,rp) - local ec=e:GetLabelObject():GetLabelObject() - return Duel.GetTurnPlayer()==tp and ec and ec:GetFlagEffect(23756165)~=0 -end -function c23756165.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end -function c23756165.spfilter(c,e,tp) - return c:IsCode(50140163) and c:IsCanBeSpecialSummoned(e,1,tp,true,false) -end -function c23756165.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsExistingMatchingCard(c23756165.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) -end -function c23756165.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c23756165.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp) - local tc=g:GetFirst() - if tc then - Duel.SpecialSummon(tc,1,tp,tp,true,false,POS_FACEUP) - tc:CompleteProcedure() - end -end diff --git a/script/c23770284.lua b/script/c23770284.lua deleted file mode 100644 index c80ca7577c..0000000000 --- a/script/c23770284.lua +++ /dev/null @@ -1,60 +0,0 @@ ---ストロング・ウィンド・ドラゴン -function c23770284.initial_effect(c) - --summon success - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(23770284,0)) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetCondition(c23770284.condition) - e1:SetOperation(c23770284.operation) - c:RegisterEffect(e1) - --tribute check - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_MATERIAL_CHECK) - e2:SetValue(c23770284.valcheck) - e2:SetLabelObject(e1) - c:RegisterEffect(e2) - --indes - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e3:SetValue(c23770284.indval) - c:RegisterEffect(e3) - --pierce - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetCode(EFFECT_PIERCE) - c:RegisterEffect(e4) -end -function c23770284.valcheck(e,c) - local g=c:GetMaterial() - local tc=g:GetFirst() - if tc:IsRace(RACE_DRAGON) then - e:GetLabelObject():SetLabel(1) - else - e:GetLabelObject():SetLabel(0) - end -end -function c23770284.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_ADVANCE and e:GetLabel()==1 -end -function c23770284.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFaceup() and c:IsRelateToEffect(e) then - local atk=c:GetMaterial():GetFirst():GetTextAttack() - if atk<0 then atk=0 end - if atk>0 then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(atk/2) - e1:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e1) - end - end -end -function c23770284.indval(e,c) - return c:GetAttack()==e:GetHandler():GetAttack() -end diff --git a/script/c2377034.lua b/script/c2377034.lua deleted file mode 100644 index 2eac8a81c5..0000000000 --- a/script/c2377034.lua +++ /dev/null @@ -1,58 +0,0 @@ ---ネオフレムベル・ヘッジホッグ -function c2377034.initial_effect(c) - --remove - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(2377034,0)) - e1:SetCategory(CATEGORY_REMOVE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetTarget(c2377034.rmtg) - e1:SetOperation(c2377034.rmop) - c:RegisterEffect(e1) - --destroyed - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(2377034,1)) - e2:SetCategory(CATEGORY_TOHAND) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_LEAVE_FIELD) - e2:SetCondition(c2377034.thcon) - e2:SetTarget(c2377034.thtg) - e2:SetOperation(c2377034.thop) - c:RegisterEffect(e2) -end -function c2377034.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(1-tp) and chkc:IsAbleToRemove() end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,0) -end -function c2377034.rmop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) - end -end -function c2377034.thcon(e,tp,eg,ep,ev,re,r,rp) - return bit.band(e:GetHandler():GetReason(),0x41)==0x41 -end -function c2377034.filter(c) - local def=c:GetDefence() - return def>=0 and def<=200 and c:IsAttribute(ATTRIBUTE_FIRE) and c:GetCode()~=2377034 and c:IsAbleToHand() -end -function c2377034.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c2377034.filter(chkc) end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c2377034.filter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0) -end -function c2377034.thop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end diff --git a/script/c23776077.lua b/script/c23776077.lua deleted file mode 100644 index c0a847a079..0000000000 --- a/script/c23776077.lua +++ /dev/null @@ -1,80 +0,0 @@ ---陽炎獣 バジリコック -function c23776077.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_FIRE),6,2,nil,nil,5) - c:EnableReviveLimit() - --remove - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(23776077,0)) - e1:SetCategory(CATEGORY_REMOVE) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCost(c23776077.rmcost) - e1:SetTarget(c23776077.rmtg) - e1:SetOperation(c23776077.rmop) - c:RegisterEffect(e1) - --atk/def - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetCondition(c23776077.adcon) - e2:SetValue(c23776077.adval) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EFFECT_UPDATE_DEFENCE) - c:RegisterEffect(e3) - --cannot be target - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) - e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e4:SetRange(LOCATION_MZONE) - e4:SetCondition(c23776077.tgcon) - e4:SetValue(aux.tgoval) - c:RegisterEffect(e4) - --cannot be destroyed - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_SINGLE) - e5:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - e5:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e5:SetRange(LOCATION_MZONE) - e5:SetCondition(c23776077.indcon) - e5:SetValue(1) - c:RegisterEffect(e5) -end -function c23776077.rmcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c23776077.rmfilter(c) - return c:IsType(TYPE_MONSTER) and c:IsAbleToRemove() -end -function c23776077.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE+LOCATION_GRAVE) and c23776077.rmfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c23776077.rmfilter,tp,0,LOCATION_MZONE+LOCATION_GRAVE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,c23776077.rmfilter,tp,0,LOCATION_MZONE+LOCATION_GRAVE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) -end -function c23776077.rmop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) - end -end -function c23776077.adcon(e) - return e:GetHandler():GetOverlayCount()>=3 -end -function c23776077.adval(e,c) - return e:GetHandler():GetOverlayCount()*200 -end -function c23776077.tgcon(e) - return e:GetHandler():GetOverlayCount()>=4 -end -function c23776077.indcon(e) - return e:GetHandler():GetOverlayCount()==5 -end diff --git a/script/c23782705.lua b/script/c23782705.lua deleted file mode 100644 index 377b542f8f..0000000000 --- a/script/c23782705.lua +++ /dev/null @@ -1,15 +0,0 @@ ---マシンナーズ・スナイパー -function c23782705.initial_effect(c) - --atk limit - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_BE_BATTLE_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e1:SetTarget(c23782705.tg) - e1:SetValue(aux.imval1) - c:RegisterEffect(e1) -end -function c23782705.tg(e,c) - return c:IsSetCard(0x36) and c:GetCode()~=23782705 -end diff --git a/script/c23842445.lua b/script/c23842445.lua deleted file mode 100644 index 0cabb71f03..0000000000 --- a/script/c23842445.lua +++ /dev/null @@ -1,60 +0,0 @@ ---ニトロユニット -function c23842445.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c23842445.target) - e1:SetOperation(c23842445.operation) - c:RegisterEffect(e1) - --Equip limit - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_EQUIP_LIMIT) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetValue(1) - c:RegisterEffect(e2) - --damage - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(23842445,0)) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e3:SetCategory(CATEGORY_DAMAGE) - e3:SetCode(EVENT_LEAVE_FIELD) - e3:SetCondition(c23842445.damcon) - e3:SetTarget(c23842445.damtg) - e3:SetOperation(c23842445.damop) - c:RegisterEffect(e3) -end -function c23842445.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c23842445.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,c,tc) - end -end -function c23842445.damcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local ec=c:GetPreviousEquipTarget() - return c:IsReason(REASON_LOST_TARGET) and ec:IsLocation(LOCATION_GRAVE) and ec:IsReason(REASON_BATTLE) -end -function c23842445.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local dam=e:GetHandler():GetPreviousEquipTarget():GetAttack() - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(dam) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,dam) -end -function c23842445.damop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c23846921.lua b/script/c23846921.lua deleted file mode 100644 index c4f3a718e6..0000000000 --- a/script/c23846921.lua +++ /dev/null @@ -1,98 +0,0 @@ ---アルカナフォースXXI-THE WORLD -function c23846921.initial_effect(c) - --coin - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(23846921,0)) - e1:SetCategory(CATEGORY_COIN) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c23846921.cointg) - e1:SetOperation(c23846921.coinop) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e2) - local e3=e1:Clone() - e3:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - c:RegisterEffect(e3) -end -function c23846921.cointg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_COIN,nil,0,tp,1) -end -function c23846921.coinop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) or c:IsFacedown() then return end - local res=0 - if c:IsHasEffect(73206827) then - res=1-Duel.SelectOption(tp,60,61) - else res=Duel.TossCoin(tp,1) end - c23846921.arcanareg(c,res) -end -function c23846921.arcanareg(c,coin) - --coin effect - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(23846921,1)) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetCountLimit(1) - e1:SetCondition(c23846921.skipcon) - e1:SetCost(c23846921.skipcost) - e1:SetTarget(c23846921.skiptg) - e1:SetOperation(c23846921.skipop) - e1:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e1) - -- - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(23846921,2)) - e2:SetCategory(CATEGORY_TOHAND) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_PHASE+PHASE_DRAW) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCondition(c23846921.thcon) - e2:SetTarget(c23846921.thtg) - e2:SetOperation(c23846921.thop) - e2:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e2) - c:RegisterFlagEffect(36690018,RESET_EVENT+0x1ff0000,EFFECT_FLAG_CLIENT_HINT,1,coin,63-coin) -end -function c23846921.skipcon(e,tp,eg,ep,ev,re,r,rp) - return ep==tp and e:GetHandler():GetFlagEffectLabel(36690018)==1 -end -function c23846921.skipcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_MZONE,0,2,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,Card.IsAbleToGraveAsCost,tp,LOCATION_MZONE,0,2,2,nil) - Duel.SendtoGrave(g,REASON_COST) -end -function c23846921.skiptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return not Duel.IsPlayerAffectedByEffect(1-tp,EFFECT_SKIP_TURN) end -end -function c23846921.skipop(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EFFECT_SKIP_TURN) - e1:SetTargetRange(0,1) - e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN) - Duel.RegisterEffect(e1,tp) -end -function c23846921.thcon(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp and e:GetHandler():GetFlagEffectLabel(36690018)==0 -end -function c23846921.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local tc=Duel.GetFieldCard(1-tp,LOCATION_GRAVE,Duel.GetFieldGroupCount(1-tp,LOCATION_GRAVE,0)-1) - if tc then - Duel.SetOperationInfo(0,CATEGORY_TOHAND,tc,1,0,0) - end -end -function c23846921.thop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFieldCard(1-tp,LOCATION_GRAVE,Duel.GetFieldGroupCount(1-tp,LOCATION_GRAVE,0)-1) - if tc then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(tp,tc) - end -end diff --git a/script/c23857661.lua b/script/c23857661.lua deleted file mode 100644 index 8b99ece014..0000000000 --- a/script/c23857661.lua +++ /dev/null @@ -1,35 +0,0 @@ ---武神器-オキツ -function c23857661.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(23857661,0)) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetRange(LOCATION_GRAVE) - e1:SetCost(c23857661.cost) - e1:SetOperation(c23857661.operation) - c:RegisterEffect(e1) -end -function c23857661.cfilter(c) - return c:IsSetCard(0x88) and c:IsType(TYPE_MONSTER) and c:IsAbleToGraveAsCost() -end -function c23857661.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() - and Duel.IsExistingMatchingCard(c23857661.cfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) - Duel.DiscardHand(tp,c23857661.cfilter,1,1,REASON_COST) -end -function c23857661.operation(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CHANGE_DAMAGE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetTargetRange(1,0) - e1:SetValue(0) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) - local e2=e1:Clone() - e2:SetCode(EFFECT_NO_EFFECT_DAMAGE) - e2:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e2,tp) -end diff --git a/script/c23869735.lua b/script/c23869735.lua deleted file mode 100644 index b76178e2c5..0000000000 --- a/script/c23869735.lua +++ /dev/null @@ -1,75 +0,0 @@ ---化石発掘 -function c23869735.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_END_PHASE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCost(c23869735.cost) - e1:SetTarget(c23869735.target) - e1:SetOperation(c23869735.operation) - c:RegisterEffect(e1) - --Destroy - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE) - e2:SetCode(EVENT_LEAVE_FIELD) - e2:SetOperation(c23869735.desop) - c:RegisterEffect(e2) - --Destroy2 - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e3:SetRange(LOCATION_SZONE) - e3:SetCode(EVENT_LEAVE_FIELD) - e3:SetCondition(c23869735.descon2) - e3:SetOperation(c23869735.desop2) - c:RegisterEffect(e3) -end -function c23869735.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) -end -function c23869735.filter(c,e,tp) - return c:IsRace(RACE_DINOSAUR) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c23869735.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c23869735.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c23869735.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c23869735.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c23869735.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then - if Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)==0 then return end - c:SetCardTarget(tc) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_OWNER_RELATE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetCondition(c23869735.rcon) - tc:RegisterEffect(e1,true) - end -end -function c23869735.rcon(e) - return e:GetOwner():IsHasCardTarget(e:GetHandler()) -end -function c23869735.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetHandler():GetFirstCardTarget() - if tc and tc:IsLocation(LOCATION_MZONE) then - Duel.Destroy(tc,REASON_EFFECT) - end -end -function c23869735.descon2(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetHandler():GetFirstCardTarget() - return tc and eg:IsContains(tc) and tc:IsReason(REASON_DESTROY) -end -function c23869735.desop2(e,tp,eg,ep,ev,re,r,rp) - Duel.Destroy(e:GetHandler(),REASON_EFFECT) -end diff --git a/script/c23874409.lua b/script/c23874409.lua deleted file mode 100644 index 3850a1f5f8..0000000000 --- a/script/c23874409.lua +++ /dev/null @@ -1,59 +0,0 @@ ---カラクリ将軍 無零 -function c23874409.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,nil,aux.NonTuner(Card.IsRace,RACE_MACHINE),1) - c:EnableReviveLimit() - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(23874409,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(c23874409.spcon) - e1:SetTarget(c23874409.sptg) - e1:SetOperation(c23874409.spop) - c:RegisterEffect(e1) - --pos - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(23874409,1)) - e2:SetCategory(CATEGORY_POSITION) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetTarget(c23874409.postg) - e2:SetOperation(c23874409.posop) - c:RegisterEffect(e2) -end -function c23874409.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_SYNCHRO -end -function c23874409.spfilter(c,e,tp) - return c:IsSetCard(0x11) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c23874409.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c23874409.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c23874409.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c23874409.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end -function c23874409.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) end - if chk==0 then return Duel.IsExistingTarget(nil,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DEFENCE) - local g=Duel.SelectTarget(tp,nil,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0) -end -function c23874409.posop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.ChangePosition(tc,POS_FACEUP_DEFENCE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK) - end -end diff --git a/script/c23893227.lua b/script/c23893227.lua deleted file mode 100644 index 2e68a8ea56..0000000000 --- a/script/c23893227.lua +++ /dev/null @@ -1,71 +0,0 @@ ---サイバー・ドラゴン・コア -function c23893227.initial_effect(c) - --search - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(23893227,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetCountLimit(1,23893227) - e1:SetTarget(c23893227.target) - e1:SetOperation(c23893227.operation) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(23893227,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_GRAVE) - e2:SetCountLimit(1,23893227) - e2:SetCondition(c23893227.spcon) - e2:SetCost(c23893227.spcost) - e2:SetTarget(c23893227.sptg) - e2:SetOperation(c23893227.spop) - c:RegisterEffect(e2) - --code - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_CHANGE_CODE) - e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e3:SetRange(LOCATION_MZONE+LOCATION_GRAVE) - e3:SetValue(70095154) - c:RegisterEffect(e3) -end -function c23893227.filter(c) - return (c:IsSetCard(0x93) or c:IsSetCard(0x94)) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand() -end -function c23893227.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c23893227.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c23893227.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end -function c23893227.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0 and Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 -end -function c23893227.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) -end -function c23893227.spfilter(c,e,tp) - return c:IsSetCard(0x1093) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c23893227.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c23893227.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c23893227.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c23893227.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c23899727.lua b/script/c23899727.lua deleted file mode 100644 index 56cc10d878..0000000000 --- a/script/c23899727.lua +++ /dev/null @@ -1,34 +0,0 @@ ---水精鱗-アビスリンデ -function c23899727.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(23899727,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCountLimit(1,23899727) - e1:SetCondition(c23899727.condition) - e1:SetTarget(c23899727.target) - e1:SetOperation(c23899727.operation) - c:RegisterEffect(e1) -end -function c23899727.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsReason(REASON_DESTROY) and e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) -end -function c23899727.filter(c,e,tp) - return c:IsSetCard(0x74) and c:GetCode()~=23899727 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c23899727.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c23899727.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c23899727.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c23899727.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c23915499.lua b/script/c23915499.lua deleted file mode 100644 index 4c7a7d74be..0000000000 --- a/script/c23915499.lua +++ /dev/null @@ -1,35 +0,0 @@ ---バグマンY -function c23915499.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(23915499,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetCondition(c23915499.condition) - e1:SetTarget(c23915499.target) - e1:SetOperation(c23915499.operation) - c:RegisterEffect(e1) -end -function c23915499.cfilter(c) - return c:IsFaceup() and c:IsCode(50319138) -end -function c23915499.spfilter(c,e,tp) - return c:IsCode(87526784) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c23915499.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c23915499.cfilter,tp,LOCATION_ONFIELD,0,1,nil) -end -function c23915499.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c23915499.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c23915499.operation(e,tp,eg,ep,ev,re,r,rp,chk) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - if not Duel.IsExistingMatchingCard(c23915499.cfilter,tp,LOCATION_ONFIELD,0,1,nil) then return end - local tc=Duel.GetFirstMatchingCard(c23915499.spfilter,tp,LOCATION_DECK,0,nil,e,tp) - if tc then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c23927545.lua b/script/c23927545.lua deleted file mode 100644 index 468535f8b1..0000000000 --- a/script/c23927545.lua +++ /dev/null @@ -1,13 +0,0 @@ ---ジュラック・プロトプス -function c23927545.initial_effect(c) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(c23927545.val) - c:RegisterEffect(e1) -end -function c23927545.val(e,c) - return Duel.GetFieldGroupCount(c:GetControler(),0,LOCATION_MZONE)*100 -end diff --git a/script/c23927567.lua b/script/c23927567.lua deleted file mode 100644 index 84f16a8ee4..0000000000 --- a/script/c23927567.lua +++ /dev/null @@ -1,23 +0,0 @@ ---幸運を告げるフクロウ -function c23927567.initial_effect(c) - --flip - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP) - e1:SetOperation(c23927567.operation) - c:RegisterEffect(e1) -end -function c23927567.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(23927567,1)) - local g=Duel.SelectMatchingCard(tp,Card.IsType,tp,LOCATION_DECK,0,1,1,nil,TYPE_FIELD) - local tc=g:GetFirst() - if tc then - if Duel.IsEnvironment(47355498) and tc:IsAbleToHand() and Duel.SelectYesNo(tp,aux.Stringid(23927567,0)) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - else - Duel.ShuffleDeck(tp) - Duel.MoveSequence(tc,0) - Duel.ConfirmDecktop(tp,1) - end - end -end diff --git a/script/c23950192.lua b/script/c23950192.lua deleted file mode 100644 index 738185c131..0000000000 --- a/script/c23950192.lua +++ /dev/null @@ -1,21 +0,0 @@ ---氷結界の術者 -function c23950192.initial_effect(c) - --cannot attack - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE) - e2:SetRange(LOCATION_MZONE) - e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e2:SetTarget(c23950192.tg) - e2:SetCondition(c23950192.con) - c:RegisterEffect(e2) -end -function c23950192.filter(c) - return c:IsFaceup() and c:IsSetCard(0x2f) -end -function c23950192.con(e) - return Duel.IsExistingMatchingCard(c23950192.filter,e:GetHandler():GetControler(),LOCATION_MZONE,0,1,e:GetHandler()) -end -function c23950192.tg(e,c) - return c:GetLevel()>=4 -end diff --git a/script/c23965037.lua b/script/c23965037.lua deleted file mode 100644 index c40859956d..0000000000 --- a/script/c23965037.lua +++ /dev/null @@ -1,4 +0,0 @@ ---ドリアードの祈り -function c23965037.initial_effect(c) - aux.AddRitualProcGreater(c,aux.FilterBoolFunction(Card.IsCode,99414168)) -end diff --git a/script/c23979249.lua b/script/c23979249.lua deleted file mode 100644 index 551d5d3f10..0000000000 --- a/script/c23979249.lua +++ /dev/null @@ -1,82 +0,0 @@ ---武神-アラスダ -function c23979249.initial_effect(c) - c:SetUniqueOnField(1,0,23979249) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(23979249,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_REMOVE) - e1:SetProperty(EFFECT_FLAG_DELAY) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c23979249.spcon) - e1:SetTarget(c23979249.sptg) - e1:SetOperation(c23979249.spop) - c:RegisterEffect(e1) - --draw - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetCode(EVENT_TO_HAND) - e2:SetRange(LOCATION_MZONE) - e2:SetCondition(c23979249.regcon) - e2:SetOperation(c23979249.regop) - c:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(23979249,1)) - e3:SetCategory(CATEGORY_DRAW+CATEGORY_HANDES) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_PHASE+PHASE_END) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1) - e3:SetCondition(c23979249.drcon) - e3:SetTarget(c23979249.drtg) - e3:SetOperation(c23979249.drop) - c:RegisterEffect(e3) -end -function c23979249.cfilter(c,tp) - return c:IsSetCard(0x88) and c:GetPreviousControler()==tp - and c:IsPreviousLocation(LOCATION_MZONE+LOCATION_GRAVE) -end -function c23979249.spcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c23979249.cfilter,1,nil,tp) -end -function c23979249.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsRelateToEffect(e) - and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c23979249.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP_DEFENCE) - end -end -function c23979249.regfilter(c,tp) - return c:IsSetCard(0x88) and c:IsControler(tp) and c:GetPreviousControler()==tp - and c:IsPreviousLocation(LOCATION_DECK) and not c:IsReason(REASON_DRAW) -end -function c23979249.regcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c23979249.regfilter,1,nil,tp) -end -function c23979249.regop(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():RegisterFlagEffect(23979249,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) -end -function c23979249.drcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetFlagEffect(23979249)>0 -end -function c23979249.drtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(1) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) - Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1) -end -function c23979249.drop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - if Duel.Draw(p,d,REASON_EFFECT)~=0 then - Duel.BreakEffect() - Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT+REASON_DISCARD) - end -end diff --git a/script/c23995346.lua b/script/c23995346.lua deleted file mode 100644 index 44aa64b373..0000000000 --- a/script/c23995346.lua +++ /dev/null @@ -1,6 +0,0 @@ ---青眼の究極竜 -function c23995346.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcCodeRep(c,89631139,3,true,true) -end diff --git a/script/c23998625.lua b/script/c23998625.lua deleted file mode 100644 index 9da2f25786..0000000000 --- a/script/c23998625.lua +++ /dev/null @@ -1,89 +0,0 @@ ---No.53 偽骸神 Heart-eartH -function c23998625.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,5,3) - c:EnableReviveLimit() - --atkup - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(23998625,0)) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_BE_BATTLE_TARGET) - e1:SetCountLimit(1) - e1:SetTarget(c23998625.atktg) - e1:SetOperation(c23998625.atkop) - c:RegisterEffect(e1) - --destroy replace - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetCode(EFFECT_DESTROY_REPLACE) - e2:SetRange(LOCATION_MZONE) - e2:SetTarget(c23998625.reptg) - c:RegisterEffect(e2) - --spsummon - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(23998625,1)) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e3:SetCode(EVENT_DESTROYED) - e3:SetCondition(c23998625.spcon) - e3:SetTarget(c23998625.sptg) - e3:SetOperation(c23998625.spop) - c:RegisterEffect(e3) -end -c23998625.xyz_number=53 -function c23998625.atktg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetCard(Duel.GetAttacker()) -end -function c23998625.atkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and c:IsFaceup() - and tc:IsRelateToEffect(e) and tc:IsAttackable() and not tc:IsStatus(STATUS_ATTACK_CANCELED) then - local atk=tc:GetBaseAttack() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(atk) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - c:RegisterEffect(e1) - end -end -function c23998625.reptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_EFFECT) end - if Duel.SelectYesNo(tp,aux.Stringid(23998625,2)) then - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_EFFECT) - return true - else return false end -end -function c23998625.spcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsPreviousLocation(LOCATION_MZONE) and c:IsReason(REASON_EFFECT) and c:GetOverlayCount()==0 - and c:IsLocation(LOCATION_GRAVE) -end -function c23998625.spfilter(c,e,tp) - return c:IsCode(97403510) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) -end -function c23998625.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c23998625.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function c23998625.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) or Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local tc=Duel.GetFirstMatchingCard(c23998625.spfilter,tp,LOCATION_EXTRA,0,nil,e,tp) - if tc then - local cg=Group.FromCards(c) - tc:SetMaterial(cg) - Duel.Overlay(tc,cg) - Duel.SpecialSummon(tc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP) - tc:CompleteProcedure() - else - local cg=Duel.GetFieldGroup(tp,LOCATION_EXTRA,0) - if cg:IsExists(Card.IsFacedown,1,nil) and Duel.IsPlayerCanSpecialSummon(tp) then - Duel.ConfirmCards(1-tp,cg) - end - end -end diff --git a/script/c24019092.lua b/script/c24019092.lua deleted file mode 100644 index f6273c83cc..0000000000 --- a/script/c24019092.lua +++ /dev/null @@ -1,50 +0,0 @@ ---イグナイト・マスケット -function c24019092.initial_effect(c) - --pendulum summon - aux.AddPendulumProcedure(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --tohand - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_DESTROY+CATEGORY_TOHAND+CATEGORY_SEARCH) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_PZONE) - e2:SetCondition(c24019092.thcon) - e2:SetTarget(c24019092.thtg) - e2:SetOperation(c24019092.thop) - c:RegisterEffect(e2) -end -function c24019092.thcon(e,tp,eg,ep,ev,re,r,rp) - local seq=e:GetHandler():GetSequence() - local pc=Duel.GetFieldCard(tp,LOCATION_SZONE,13-seq) - return pc and pc:IsSetCard(0xc8) -end -function c24019092.filter(c) - return c:IsRace(RACE_WARRIOR) and c:IsAttribute(ATTRIBUTE_FIRE) and c:IsAbleToHand() -end -function c24019092.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - local pc=Duel.GetFieldCard(tp,LOCATION_SZONE,13-c:GetSequence()) - if chk==0 then return c:IsDestructable() and pc:IsDestructable() - and Duel.IsExistingMatchingCard(c24019092.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end - local g=Group.FromCards(c,pc) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,2,0,0) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE) -end -function c24019092.thop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) then return end - local pc=Duel.GetFieldCard(tp,LOCATION_SZONE,13-c:GetSequence()) - if not pc then return end - local dg=Group.FromCards(c,pc) - if Duel.Destroy(dg,REASON_EFFECT)~=2 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c24019092.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil) - if g:GetCount()>0 and not g:GetFirst():IsHasEffect(EFFECT_NECRO_VALLEY) then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c24019261.lua b/script/c24019261.lua deleted file mode 100644 index 266f455033..0000000000 --- a/script/c24019261.lua +++ /dev/null @@ -1,35 +0,0 @@ ---救急救命 -function c24019261.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c24019261.condition) - e1:SetTarget(c24019261.target) - e1:SetOperation(c24019261.activate) - c:RegisterEffect(e1) -end -function c24019261.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()==PHASE_MAIN2 -end -function c24019261.filter(c,e,tp,tid) - return bit.band(c:GetReason(),0x41)==0x41 and c:GetTurnID()==tid - and c:GetLevel()==4 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c24019261.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local tid=Duel.GetTurnCount() - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c24019261.filter(chkc,e,tp,tid) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c24019261.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp,tid) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c24019261.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp,tid) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c24019261.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c24025620.lua b/script/c24025620.lua deleted file mode 100644 index 5be3784286..0000000000 --- a/script/c24025620.lua +++ /dev/null @@ -1,34 +0,0 @@ ---ダブル・プロテクター -function c24025620.initial_effect(c) - --atkdown - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(24025620,0)) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCondition(c24025620.atkcon) - e1:SetTarget(c24025620.atktg) - e1:SetOperation(c24025620.atkop) - c:RegisterEffect(e1) -end -function c24025620.atkcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsLocation(LOCATION_GRAVE) and c:IsReason(REASON_BATTLE) and c:GetPreviousControler()==tp -end -function c24025620.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil) -end -function c24025620.atkop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetValue(tc:GetAttack()/2) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - end -end diff --git a/script/c2403771.lua b/script/c2403771.lua deleted file mode 100644 index 80216dc170..0000000000 --- a/script/c2403771.lua +++ /dev/null @@ -1,67 +0,0 @@ ---パワー・ツール・ドラゴン -function c2403771.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1) - c:EnableReviveLimit() - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(2403771,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_MZONE) - e1:SetTarget(c2403771.thtg) - e1:SetOperation(c2403771.thop) - c:RegisterEffect(e1) - --Destroy replace - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EFFECT_DESTROY_REPLACE) - e2:SetTarget(c2403771.desreptg) - e2:SetOperation(c2403771.desrepop) - c:RegisterEffect(e2) -end -function c2403771.thfilter(c) - return c:IsType(TYPE_EQUIP) and c:IsAbleToHand() -end -function c2403771.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c2403771.thfilter,tp,LOCATION_DECK,0,3,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,LOCATION_DECK) -end -function c2403771.thop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsType,tp,LOCATION_DECK,0,nil,TYPE_EQUIP) - if g:GetCount()>=3 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local sg=g:Select(tp,3,3,nil) - Duel.ConfirmCards(1-tp,sg) - Duel.ShuffleDeck(tp) - Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_ATOHAND) - local tg=sg:Select(1-tp,1,1,nil) - local tc=tg:GetFirst() - if tc:IsAbleToHand() then Duel.SendtoHand(tc,nil,REASON_EFFECT) - else Duel.SendtoGrave(tc,REASON_EFFECT) end - end -end -function c2403771.repfilter(c) - return c:IsType(TYPE_SPELL) and c:IsLocation(LOCATION_SZONE) and not c:IsStatus(STATUS_DESTROY_CONFIRMED) -end -function c2403771.desreptg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then - local g=c:GetEquipGroup() - return not c:IsReason(REASON_REPLACE) and g:IsExists(c2403771.repfilter,1,nil) - end - if Duel.SelectYesNo(tp,aux.Stringid(2403771,1)) then - local g=c:GetEquipGroup() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local sg=g:FilterSelect(tp,c2403771.repfilter,1,1,nil) - Duel.SetTargetCard(sg) - return true - else return false end -end -function c2403771.desrepop(e,tp,eg,ep,ev,re,r,rp) - local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - Duel.SendtoGrave(tg,REASON_EFFECT+REASON_REPLACE) -end diff --git a/script/c24040093.lua b/script/c24040093.lua deleted file mode 100644 index 3142949d93..0000000000 --- a/script/c24040093.lua +++ /dev/null @@ -1,39 +0,0 @@ ---魔轟神グリムロ -function c24040093.initial_effect(c) - --search - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(24040093,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c24040093.con) - e1:SetCost(c24040093.cost) - e1:SetTarget(c24040093.tg) - e1:SetOperation(c24040093.op) - c:RegisterEffect(e1) -end -function c24040093.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x35) -end -function c24040093.con(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c24040093.cfilter,tp,LOCATION_MZONE,0,1,nil) -end -function c24040093.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end -function c24040093.filter(c) - return c:IsSetCard(0x35) and c:GetCode()~=24040093 and c:IsAbleToHand() -end -function c24040093.tg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c24040093.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c24040093.op(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c24040093.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c24062258.lua b/script/c24062258.lua deleted file mode 100644 index 29c91ef0a8..0000000000 --- a/script/c24062258.lua +++ /dev/null @@ -1,43 +0,0 @@ ---暗躍のドルイド・ドリュース -function c24062258.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(24062258,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCountLimit(1,24062258) - e1:SetTarget(c24062258.sptg) - e1:SetOperation(c24062258.spop) - c:RegisterEffect(e1) -end -function c24062258.filter(c,e,tp) - return c:GetCode()~=24062258 and c:GetLevel()==4 and c:IsAttribute(ATTRIBUTE_DARK) and (c:GetAttack()==0 or c:GetDefence()==0) - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c24062258.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c24062258.filter(chkc,e,tp) end - if chk==0 then return Duel.IsExistingTarget(c24062258.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) - and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c24062258.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c24062258.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP_DEFENCE) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e2) - end - Duel.SpecialSummonComplete() -end diff --git a/script/c24068492.lua b/script/c24068492.lua deleted file mode 100644 index 2c20c86f04..0000000000 --- a/script/c24068492.lua +++ /dev/null @@ -1,25 +0,0 @@ ---自業自得 -function c24068492.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,0x1c1) - e1:SetTarget(c24068492.target) - e1:SetOperation(c24068492.activate) - c:RegisterEffect(e1) -end -function c24068492.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_MZONE,1,nil) end - Duel.SetTargetPlayer(1-tp) - local dam=Duel.GetFieldGroupCount(1-tp,LOCATION_MZONE,0)*500 - Duel.SetTargetParam(dam) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,dam) -end -function c24068492.activate(e,tp,eg,ep,ev,re,r,rp) - local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) - local dam=Duel.GetFieldGroupCount(1-tp,LOCATION_MZONE,0)*500 - Duel.Damage(p,dam,REASON_EFFECT) -end diff --git a/script/c2407147.lua b/script/c2407147.lua deleted file mode 100644 index 416223bb3a..0000000000 --- a/script/c2407147.lua +++ /dev/null @@ -1,32 +0,0 @@ ---ラヴァル炎火山の侍女 -function c2407147.initial_effect(c) - --to grave - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(2407147,0)) - e1:SetCategory(CATEGORY_TOGRAVE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCondition(c2407147.condition) - e1:SetTarget(c2407147.target) - e1:SetOperation(c2407147.operation) - c:RegisterEffect(e1) -end -function c2407147.cfilter(c) - return c:IsSetCard(0x39) and c:GetCode()~=2407147 -end -function c2407147.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c2407147.cfilter,tp,LOCATION_GRAVE,0,1,nil) -end -function c2407147.filter(c) - return c:IsSetCard(0x39) and c:IsAbleToGrave() -end -function c2407147.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c2407147.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) -end -function c2407147.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c2407147.filter,tp,LOCATION_DECK,0,1,1,nil) - Duel.SendtoGrave(g,REASON_EFFECT) -end diff --git a/script/c2407234.lua b/script/c2407234.lua deleted file mode 100644 index 6cf7bb6410..0000000000 --- a/script/c2407234.lua +++ /dev/null @@ -1,69 +0,0 @@ ---No.69 紋章神コート・オブ・アームズ -function c2407234.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,4,3) - c:EnableReviveLimit() - --negate - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(2407234,0)) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetOperation(c2407234.negop) - c:RegisterEffect(e1) - --effect - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(2407234,1)) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,2407234) - e2:SetTarget(c2407234.target) - e2:SetOperation(c2407234.operation) - c:RegisterEffect(e2) -end -c2407234.xyz_number=69 -function c2407234.negfilter(c) - return c:IsFaceup() and c:IsType(TYPE_XYZ) and not c:IsDisabled() -end -function c2407234.negop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local g=Duel.GetMatchingGroup(c2407234.negfilter,tp,LOCATION_MZONE,LOCATION_MZONE,c) - local tc=g:GetFirst() - while tc do - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e2) - tc=g:GetNext() - end -end -function c2407234.filter(c) - return c:IsFaceup() and c:IsType(TYPE_XYZ) -end -function c2407234.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c2407234.filter(chkc) and chkc~=e:GetHandler() end - if chk==0 then return Duel.IsExistingTarget(c2407234.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c2407234.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,e:GetHandler()) -end -function c2407234.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc and c:IsRelateToEffect(e) and c:IsFaceup() and tc:IsFaceup() and tc:IsRelateToEffect(e) then - local code=tc:GetOriginalCode() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_CHANGE_CODE) - e1:SetValue(code) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - c:RegisterEffect(e1) - c:CopyEffect(code,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,1) - end -end diff --git a/script/c24082387.lua b/script/c24082387.lua deleted file mode 100644 index 756f08d5e3..0000000000 --- a/script/c24082387.lua +++ /dev/null @@ -1,54 +0,0 @@ ---ミステリーサークル -function c24082387.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_END_PHASE) - e1:SetLabel(0) - e1:SetCost(c24082387.cost) - e1:SetTarget(c24082387.target) - e1:SetOperation(c24082387.activate) - c:RegisterEffect(e1) -end -function c24082387.cost(e,tp,eg,ep,ev,re,r,rp,chk) - e:SetLabel(100) - return true -end -function c24082387.filter1(c,e,tp,cg,minc) - return c:IsSetCard(0xc) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) - and cg:CheckWithSumEqual(Card.GetLevel,c:GetLevel(),minc,99) -end -function c24082387.cgfilter(c) - return c:GetLevel()>0 and c:IsAbleToGraveAsCost() and bit.band(c:GetOriginalType(),TYPE_MONSTER)~=0 -end -function c24082387.target(e,tp,eg,ep,ev,re,r,rp,chk) - local cg=Duel.GetMatchingGroup(c24082387.cgfilter,tp,LOCATION_MZONE,0,nil) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - local minc=-ft+1 - if minc<=0 then minc=1 end - if chk==0 then - if e:GetLabel()~=100 then return false end - e:SetLabel(0) - return Duel.IsExistingMatchingCard(c24082387.filter1,tp,LOCATION_DECK,0,1,nil,e,tp,cg,minc) - end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local rg=Duel.SelectMatchingCard(tp,c24082387.filter1,tp,LOCATION_DECK,0,1,1,nil,e,tp,cg,minc) - e:SetLabel(rg:GetFirst():GetLevel()) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local sg=cg:SelectWithSumEqual(tp,Card.GetLevel,e:GetLabel(),minc,99) - Duel.SendtoGrave(sg,REASON_COST) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c24082387.filter2(c,e,tp,lv) - return c:IsSetCard(0xc) and c:GetLevel()==lv and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c24082387.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then Duel.Damage(tp,2000,REASON_EFFECT) return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c24082387.filter2,tp,LOCATION_DECK,0,1,1,nil,e,tp,e:GetLabel()) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - else Duel.Damage(tp,2000,REASON_EFFECT) end -end diff --git a/script/c24094653.lua b/script/c24094653.lua deleted file mode 100644 index 07cf60130e..0000000000 --- a/script/c24094653.lua +++ /dev/null @@ -1,78 +0,0 @@ ---融合 -function c24094653.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c24094653.target) - e1:SetOperation(c24094653.activate) - c:RegisterEffect(e1) -end -function c24094653.filter1(c,e) - return c:IsCanBeFusionMaterial() and not c:IsImmuneToEffect(e) -end -function c24094653.filter2(c,e,tp,m,f,chkf) - return c:IsType(TYPE_FUSION) and (not f or f(c)) - and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf) -end -function c24094653.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp - local mg1=Duel.GetMatchingGroup(Card.IsCanBeFusionMaterial,tp,LOCATION_HAND+LOCATION_MZONE,0,nil) - local res=Duel.IsExistingMatchingCard(c24094653.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf) - if not res then - local ce=Duel.GetChainMaterial(tp) - if ce~=nil then - local fgroup=ce:GetTarget() - local mg2=fgroup(ce,e,tp) - local mf=ce:GetValue() - res=Duel.IsExistingMatchingCard(c24094653.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,chkf) - end - end - return res - end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function c24094653.activate(e,tp,eg,ep,ev,re,r,rp) - local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp - local mg1=Duel.GetMatchingGroup(c24094653.filter1,tp,LOCATION_HAND+LOCATION_MZONE,0,nil,e) - local sg1=Duel.GetMatchingGroup(c24094653.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf) - local mg2=nil - local sg2=nil - local ce=Duel.GetChainMaterial(tp) - if ce~=nil then - local fgroup=ce:GetTarget() - mg2=fgroup(ce,e,tp) - local mf=ce:GetValue() - sg2=Duel.GetMatchingGroup(c24094653.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,mf,chkf) - end - if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then - local sg=sg1:Clone() - if sg2 then sg:Merge(sg2) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local tg=sg:Select(tp,1,1,nil) - local tc=tg:GetFirst() - if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then - local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf) - tc:SetMaterial(mat1) - Duel.SendtoGrave(mat1,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION) - Duel.BreakEffect() - Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP) - else - local mat2=Duel.SelectFusionMaterial(tp,tc,mg2,nil,chkf) - local fop=ce:GetOperation() - fop(ce,e,tp,tc,mat2) - end - tc:CompleteProcedure() - else - local cg1=Duel.GetFieldGroup(tp,LOCATION_HAND+LOCATION_MZONE,0) - local cg2=Duel.GetFieldGroup(tp,LOCATION_EXTRA,0) - if cg1:GetCount()>1 and cg2:IsExists(Card.IsFacedown,1,nil) - and Duel.IsPlayerCanSpecialSummon(tp) and not Duel.IsPlayerAffectedByEffect(tp,27581098) then - Duel.ConfirmCards(1-tp,cg1) - Duel.ConfirmCards(1-tp,cg2) - Duel.ShuffleHand(tp) - end - end -end diff --git a/script/c24096228.lua b/script/c24096228.lua deleted file mode 100644 index 1ccf1e4662..0000000000 --- a/script/c24096228.lua +++ /dev/null @@ -1,108 +0,0 @@ ---二重魔法 -function c24096228.initial_effect(c) - --copy spell - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCost(c24096228.cost) - e1:SetTarget(c24096228.target) - e1:SetOperation(c24096228.operation) - c:RegisterEffect(e1) -end -function c24096228.cfilter(c) - return c:IsDiscardable() and c:IsType(TYPE_SPELL) -end -function c24096228.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c24096228.cfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,c24096228.cfilter,1,1,REASON_COST+REASON_DISCARD) -end -function c24096228.filter1(c,e,tp,eg,ep,ev,re,r,rp) - local te=c:CheckActivateEffect(false,false,false) - if c:IsType(TYPE_SPELL) and te then - if c:IsSetCard(0x95) then - local tg=te:GetTarget() - return not tg or tg(e,tp,eg,ep,ev,re,r,rp,0) - else - return true - end - end - return false -end -function c24096228.filter2(c,e,tp,eg,ep,ev,re,r,rp) - local te=c:CheckActivateEffect(false,false,false) - if c:IsType(TYPE_SPELL) and not c:IsType(TYPE_EQUIP+TYPE_CONTINUOUS) and te then - if c:IsSetCard(0x95) then - local tg=te:GetTarget() - return not tg or tg(e,tp,eg,ep,ev,re,r,rp,0) - else - return true - end - end - return false -end -function c24096228.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - if chk==0 then - local b=e:GetHandler():IsLocation(LOCATION_HAND) - local ft=Duel.GetLocationCount(tp,LOCATION_SZONE) - if (b and ft>1) or (not b and ft>0) then - return Duel.IsExistingTarget(c24096228.filter1,tp,0,LOCATION_GRAVE,1,e:GetHandler(),e,tp,eg,ep,ev,re,r,rp) - else - return Duel.IsExistingTarget(c24096228.filter2,tp,0,LOCATION_GRAVE,1,e:GetHandler(),e,tp,eg,ep,ev,re,r,rp) - end - end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - if Duel.GetLocationCount(tp,LOCATION_SZONE)>0 then - Duel.SelectTarget(tp,c24096228.filter1,tp,0,LOCATION_GRAVE,1,1,nil,e,tp,eg,ep,ev,re,r,rp) - else - Duel.SelectTarget(tp,c24096228.filter2,tp,0,LOCATION_GRAVE,1,1,nil,e,tp,eg,ep,ev,re,r,rp) - end -end -function c24096228.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if not tc or not tc:IsRelateToEffect(e) then return end - local tpe=tc:GetType() - local te=tc:GetActivateEffect() - local tg=te:GetTarget() - local co=te:GetCost() - local op=te:GetOperation() - e:SetCategory(te:GetCategory()) - e:SetProperty(te:GetProperty()) - Duel.ClearTargetCard() - if bit.band(tpe,TYPE_EQUIP+TYPE_CONTINUOUS)~=0 or tc:IsHasEffect(EFFECT_REMAIN_FIELD) then - if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end - Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) - elseif bit.band(tpe,TYPE_FIELD)~=0 then - Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) - end - tc:CreateEffectRelation(te) - if co then co(te,tp,eg,ep,ev,re,r,rp,1) end - if tg then - if tc:IsSetCard(0x95) then - tg(e,tp,eg,ep,ev,re,r,rp,1) - else - tg(te,tp,eg,ep,ev,re,r,rp,1) - end - end - Duel.BreakEffect() - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local etc=g:GetFirst() - while etc do - etc:CreateEffectRelation(te) - etc=g:GetNext() - end - if op then - if tc:IsSetCard(0x95) then - op(e,tp,eg,ep,ev,re,r,rp) - else - op(te,tp,eg,ep,ev,re,r,rp) - end - end - tc:ReleaseEffectRelation(te) - etc=g:GetFirst() - while etc do - etc:ReleaseEffectRelation(te) - etc=g:GetNext() - end -end diff --git a/script/c24096499.lua b/script/c24096499.lua deleted file mode 100644 index c070c88646..0000000000 --- a/script/c24096499.lua +++ /dev/null @@ -1,41 +0,0 @@ ---森の聖獣 ヴァレリフォーン -function c24096499.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(24096499,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1,24096499) - e1:SetCost(c24096499.spcost) - e1:SetTarget(c24096499.sptg) - e1:SetOperation(c24096499.spop) - c:RegisterEffect(e1) -end -function c24096499.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) -end -function c24096499.filter(c,e,tp) - return c:IsLevelBelow(2) and c:IsRace(RACE_BEAST) and not c:IsCode(24096499) - and (c:IsCanBeSpecialSummoned(e,0,tp,false,false) or c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN)) -end -function c24096499.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c24096499.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c24096499.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c24096499.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c24096499.spop(e,tp,eg,ep,ev,re,r,rp,chk) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - local spos=0 - if tc:IsCanBeSpecialSummoned(e,0,tp,false,false) then spos=spos+POS_FACEUP_ATTACK end - if tc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN) then spos=spos+POS_FACEDOWN_DEFENCE end - if spos~=0 then Duel.SpecialSummon(tc,0,tp,tp,false,false,spos) end - end -end diff --git a/script/c24101897.lua b/script/c24101897.lua deleted file mode 100644 index b405a2ef94..0000000000 --- a/script/c24101897.lua +++ /dev/null @@ -1,67 +0,0 @@ ---ゴーストリックの猫娘 -function c24101897.initial_effect(c) - --summon limit - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_SUMMON) - e1:SetCondition(c24101897.sumcon) - c:RegisterEffect(e1) - --turn set - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(24101897,0)) - e2:SetCategory(CATEGORY_POSITION) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetTarget(c24101897.postg) - e2:SetOperation(c24101897.posop) - c:RegisterEffect(e2) - --change pos - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(24101897,1)) - e3:SetCategory(CATEGORY_POSITION) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - e3:SetRange(LOCATION_MZONE) - e3:SetCondition(c24101897.condition) - e3:SetTarget(c24101897.target) - e3:SetOperation(c24101897.operation) - c:RegisterEffect(e3) - local e4=e3:Clone() - e4:SetCode(EVENT_SUMMON_SUCCESS) - c:RegisterEffect(e4) -end -function c24101897.sfilter(c) - return c:IsFaceup() and c:IsSetCard(0x8d) -end -function c24101897.sumcon(e) - return not Duel.IsExistingMatchingCard(c24101897.sfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) -end -function c24101897.postg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsCanTurnSet() and c:GetFlagEffect(24101897)==0 end - c:RegisterFlagEffect(24101897,RESET_EVENT+0x1fc0000+RESET_PHASE+PHASE_END,0,1) - Duel.SetOperationInfo(0,CATEGORY_POSITION,c,1,0,0) -end -function c24101897.posop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - Duel.ChangePosition(c,POS_FACEDOWN_DEFENCE) - end -end -function c24101897.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c24101897.sfilter,tp,LOCATION_MZONE,0,1,e:GetHandler()) -end -function c24101897.filter(c,e) - return c:IsFaceup() and c:IsLevelAbove(4) and c:IsCanTurnSet() and (not e or c:IsRelateToEffect(e)) -end -function c24101897.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return eg:IsExists(c24101897.filter,1,nil) end - Duel.SetTargetCard(eg) - local g=eg:Filter(c24101897.filter,nil) - Duel.SetOperationInfo(0,CATEGORY_POSITION,g,g:GetCount(),0,0) -end -function c24101897.operation(e,tp,eg,ep,ev,re,r,rp) - if not Duel.IsExistingMatchingCard(c24101897.sfilter,tp,LOCATION_MZONE,0,1,e:GetHandler()) then return end - local g=eg:Filter(c24101897.filter,nil,e) - Duel.ChangePosition(g,POS_FACEDOWN_DEFENCE) -end diff --git a/script/c24103628.lua b/script/c24103628.lua deleted file mode 100644 index a3c2432b3f..0000000000 --- a/script/c24103628.lua +++ /dev/null @@ -1,32 +0,0 @@ ---幻影の魔術士 -function c24103628.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(24103628,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetCondition(c24103628.condition) - e1:SetTarget(c24103628.target) - e1:SetOperation(c24103628.operation) - c:RegisterEffect(e1) -end -function c24103628.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) -end -function c24103628.filter(c,e,tp) - return c:IsAttackBelow(1000) and c:IsSetCard(0x8) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c24103628.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c24103628.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c24103628.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c24103628.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENCE) - end -end diff --git a/script/c24104865.lua b/script/c24104865.lua deleted file mode 100644 index 8a485c8b11..0000000000 --- a/script/c24104865.lua +++ /dev/null @@ -1,100 +0,0 @@ ---エーリアン・マザー -function c24104865.initial_effect(c) - --check - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EVENT_BATTLED) - e1:SetOperation(c24104865.checkop) - c:RegisterEffect(e1) - local g=Group.CreateGroup() - e1:SetLabelObject(g) - g:KeepAlive() - --special summon - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetCode(EVENT_BATTLE_DESTROYING) - e2:SetOperation(c24104865.checkop2) - e2:SetLabelObject(e1) - c:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(24104865,0)) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e3:SetCode(EVENT_PHASE+PHASE_BATTLE) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1) - e3:SetCondition(c24104865.spcon) - e3:SetTarget(c24104865.sptg) - e3:SetOperation(c24104865.spop) - e3:SetLabelObject(e2) - c:RegisterEffect(e3) - --destroy - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e4:SetCode(EVENT_LEAVE_FIELD) - e4:SetOperation(c24104865.desop) - c:RegisterEffect(e4) -end -function c24104865.checkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local t=Duel.GetAttackTarget() - if t and t~=c and t:GetCounter(0xe)>0 then - e:SetLabel(1) - else e:SetLabel(0) end -end -function c24104865.checkop2(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if e:GetLabelObject():GetLabel()==0 then return end - local t=c:GetBattleTarget() - local g=e:GetLabelObject():GetLabelObject() - if c:GetFieldID()~=e:GetLabel() then - g:Clear() - e:SetLabel(c:GetFieldID()) - end - if aux.bdgcon(e,tp,eg,ep,ev,re,r,rp) then - g:AddCard(t) - t:RegisterFlagEffect(24104865,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_BATTLE,0,1) - end -end -function c24104865.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetFieldID()==e:GetLabelObject():GetLabel() -end -function c24104865.filter(c,e,tp) - return c:GetFlagEffect(24104865)~=0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c24104865.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - local g=e:GetLabelObject():GetLabelObject():GetLabelObject() - if chk==0 then return g:IsExists(c24104865.filter,1,nil,e,tp) end - local dg=g:Filter(c24104865.filter,nil,e,tp) - g:Clear() - Duel.SetTargetCard(dg) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,dg,dg:GetCount(),0,0) -end -function c24104865.sfilter(c,e,tp) - return c:IsRelateToEffect(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c24104865.spop(e,tp,eg,ep,ev,re,r,rp) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ft<=0 then return end - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local sg=g:Filter(c24104865.sfilter,nil,e,tp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - if sg:GetCount()>ft then sg=sg:Select(tp,ft,ft,nil) end - local tc=sg:GetFirst() - local c=e:GetHandler() - while tc do - Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) - tc:RegisterFlagEffect(24104865,RESET_EVENT+0x1fe0000,0,0) - c:CreateRelation(tc,RESET_EVENT+0x1020000) - tc=sg:GetNext() - end -end -function c24104865.desfilter(c,rc) - return c:GetFlagEffect(24104865)~=0 and rc:IsRelateToCard(c) -end -function c24104865.desop(e,tp,eg,ep,ev,re,r,rp) - local dg=Duel.GetMatchingGroup(c24104865.desfilter,tp,LOCATION_MZONE,0,nil,e:GetHandler()) - Duel.Destroy(dg,REASON_EFFECT) -end diff --git a/script/c24128274.lua b/script/c24128274.lua deleted file mode 100644 index f94678f76c..0000000000 --- a/script/c24128274.lua +++ /dev/null @@ -1,22 +0,0 @@ ---深海の戦士 -function c24128274.initial_effect(c) - --immune spell - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_IMMUNE_EFFECT) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c24128274.econ) - e1:SetValue(c24128274.efilter) - c:RegisterEffect(e1) -end -function c24128274.filter(c) - return c:IsFaceup() and c:IsCode(22702055) -end -function c24128274.econ(e) - return Duel.IsExistingMatchingCard(c24128274.filter,0,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) - or Duel.IsEnvironment(22702055) -end -function c24128274.efilter(e,te) - return te:IsActiveType(TYPE_SPELL) -end diff --git a/script/c24131534.lua b/script/c24131534.lua deleted file mode 100644 index 72917d43dc..0000000000 --- a/script/c24131534.lua +++ /dev/null @@ -1,50 +0,0 @@ ---イグナイト・マグナム -function c24131534.initial_effect(c) - --pendulum summon - aux.AddPendulumProcedure(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --tohand - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_DESTROY+CATEGORY_TOHAND+CATEGORY_SEARCH) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_PZONE) - e2:SetCondition(c24131534.thcon) - e2:SetTarget(c24131534.thtg) - e2:SetOperation(c24131534.thop) - c:RegisterEffect(e2) -end -function c24131534.thcon(e,tp,eg,ep,ev,re,r,rp) - local seq=e:GetHandler():GetSequence() - local pc=Duel.GetFieldCard(tp,LOCATION_SZONE,13-seq) - return pc and pc:IsSetCard(0xc8) -end -function c24131534.filter(c) - return c:IsRace(RACE_WARRIOR) and c:IsAttribute(ATTRIBUTE_FIRE) and c:IsAbleToHand() -end -function c24131534.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - local pc=Duel.GetFieldCard(tp,LOCATION_SZONE,13-c:GetSequence()) - if chk==0 then return c:IsDestructable() and pc:IsDestructable() - and Duel.IsExistingMatchingCard(c24131534.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end - local g=Group.FromCards(c,pc) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,2,0,0) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE) -end -function c24131534.thop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) then return end - local pc=Duel.GetFieldCard(tp,LOCATION_SZONE,13-c:GetSequence()) - if not pc then return end - local dg=Group.FromCards(c,pc) - if Duel.Destroy(dg,REASON_EFFECT)~=2 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c24131534.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil) - if g:GetCount()>0 and not g:GetFirst():IsHasEffect(EFFECT_NECRO_VALLEY) then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c24137081.lua b/script/c24137081.lua deleted file mode 100644 index f31ded97dc..0000000000 --- a/script/c24137081.lua +++ /dev/null @@ -1,32 +0,0 @@ ---ドリル・バーニカル -function c24137081.initial_effect(c) - --direct attack - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DIRECT_ATTACK) - c:RegisterEffect(e1) - --atkup - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(24137081,0)) - e2:SetCategory(CATEGORY_ATKCHANGE) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_BATTLE_DAMAGE) - e2:SetCondition(c24137081.atkcon) - e2:SetOperation(c24137081.atkop) - c:RegisterEffect(e2) -end -function c24137081.atkcon(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp and Duel.GetAttackTarget()==nil -end -function c24137081.atkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetProperty(EFFECT_FLAG_COPY_INHERIT) - e1:SetValue(1000) - e1:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e1) - end -end diff --git a/script/c24140059.lua b/script/c24140059.lua deleted file mode 100644 index e4673cf7a3..0000000000 --- a/script/c24140059.lua +++ /dev/null @@ -1,23 +0,0 @@ ---不幸を告げる黒猫 -function c24140059.initial_effect(c) - --flip - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP) - e1:SetOperation(c24140059.operation) - c:RegisterEffect(e1) -end -function c24140059.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(24140059,1)) - local g=Duel.SelectMatchingCard(tp,Card.IsType,tp,LOCATION_DECK,0,1,1,nil,TYPE_TRAP) - local tc=g:GetFirst() - if tc then - if Duel.IsEnvironment(47355498) and tc:IsAbleToHand() and Duel.SelectYesNo(tp,aux.Stringid(24140059,0)) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - else - Duel.ShuffleDeck(tp) - Duel.MoveSequence(tc,0) - Duel.ConfirmDecktop(tp,1) - end - end -end diff --git a/script/c24150026.lua b/script/c24150026.lua deleted file mode 100644 index e9cd1dade2..0000000000 --- a/script/c24150026.lua +++ /dev/null @@ -1,55 +0,0 @@ ---カラクリ無双 八壱八 -function c24150026.initial_effect(c) - --must attack - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_MUST_ATTACK) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_CANNOT_EP) - e2:SetRange(LOCATION_MZONE) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetTargetRange(1,0) - e2:SetCondition(c24150026.becon) - c:RegisterEffect(e2) - --to defence - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(24150026,0)) - e3:SetCategory(CATEGORY_POSITION) - e3:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_SINGLE) - e3:SetCode(EVENT_BE_BATTLE_TARGET) - e3:SetCondition(c24150026.poscon) - e3:SetOperation(c24150026.posop) - c:RegisterEffect(e3) - --to defence - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e4:SetCode(EVENT_PHASE+PHASE_BATTLE) - e4:SetRange(LOCATION_MZONE) - e4:SetCountLimit(1) - e4:SetCondition(c24150026.bpcon) - e4:SetOperation(c24150026.bpop) - c:RegisterEffect(e4) -end -function c24150026.becon(e) - return e:GetHandler():IsAttackable() -end -function c24150026.poscon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsAttackPos() -end -function c24150026.posop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFaceup() and c:IsRelateToEffect(e) then - Duel.ChangePosition(c,POS_FACEUP_DEFENCE) - end -end -function c24150026.bpcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetAttackedCount()>0 -end -function c24150026.bpop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsAttackPos() then - Duel.ChangePosition(c,POS_FACEUP_DEFENCE) - end -end diff --git a/script/c24184846.lua b/script/c24184846.lua deleted file mode 100644 index e203134206..0000000000 --- a/script/c24184846.lua +++ /dev/null @@ -1,56 +0,0 @@ ---BK リベージ・ガードナー -function c24184846.initial_effect(c) - --remove - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(24184846,0)) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCategory(CATEGORY_REMOVE) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetRange(LOCATION_HAND+LOCATION_GRAVE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c24184846.rmcost) - e1:SetTarget(c24184846.rmtg) - e1:SetOperation(c24184846.rmop) - c:RegisterEffect(e1) -end -function c24184846.rmcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) -end -function c24184846.filter(c) - return c:IsFaceup() and c:IsSetCard(0x84) and c:IsAbleToRemove() -end -function c24184846.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c24184846.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c24184846.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,c24184846.filter,tp,LOCATION_MZONE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) -end -function c24184846.rmop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - if Duel.Remove(tc,0,REASON_EFFECT+REASON_TEMPORARY)==0 then return end - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) - e1:SetCountLimit(1) - e1:SetLabelObject(tc) - e1:SetCondition(c24184846.retcon) - e1:SetOperation(c24184846.retop) - if Duel.GetTurnPlayer()==tp and Duel.GetCurrentPhase()==PHASE_DRAW then - e1:SetLabel(0) - else - e1:SetLabel(Duel.GetTurnCount()) - end - Duel.RegisterEffect(e1,tp) - end -end -function c24184846.retcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp and Duel.GetTurnCount()~=e:GetLabel() -end -function c24184846.retop(e,tp,eg,ep,ev,re,r,rp) - Duel.ReturnToField(e:GetLabelObject()) - e:Reset() -end diff --git a/script/c2420921.lua b/script/c2420921.lua deleted file mode 100644 index 4f7c233ccc..0000000000 --- a/script/c2420921.lua +++ /dev/null @@ -1,43 +0,0 @@ ---ライトロード・スピリット シャイア -function c2420921.initial_effect(c) - --atk def - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(c2420921.value) - c:RegisterEffect(e1) - --discard deck - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetDescription(aux.Stringid(2420921,0)) - e2:SetCategory(CATEGORY_DECKDES) - e2:SetCode(EVENT_PHASE+PHASE_END) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCondition(c2420921.discon) - e2:SetTarget(c2420921.distg) - e2:SetOperation(c2420921.disop) - c:RegisterEffect(e2) -end -function c2420921.filter(c) - return c:IsSetCard(0x38) and c:IsType(TYPE_MONSTER) -end -function c2420921.value(e,c) - local g=Duel.GetMatchingGroup(c2420921.filter,c:GetControler(),LOCATION_GRAVE,0,nil) - local ct=g:GetClassCount(Card.GetCode) - return ct*300 -end -function c2420921.discon(e,tp,eg,ep,ev,re,r,rp) - return tp==Duel.GetTurnPlayer() -end -function c2420921.distg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,2) -end -function c2420921.disop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:GetControler()~=tp or not c:IsRelateToEffect(e) or c:IsFacedown() then return end - Duel.DiscardDeck(tp,2,REASON_EFFECT) -end diff --git a/script/c242146.lua b/script/c242146.lua deleted file mode 100644 index 5cee7870b0..0000000000 --- a/script/c242146.lua +++ /dev/null @@ -1,52 +0,0 @@ ---城壁壊しの大槍 -function c242146.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c242146.target) - e1:SetOperation(c242146.operation) - c:RegisterEffect(e1) - --atk up - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_DAMAGE_CALCULATING) - e2:SetRange(LOCATION_SZONE) - e2:SetOperation(c242146.atkup) - c:RegisterEffect(e2) - --Equip limit - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_EQUIP_LIMIT) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e3:SetValue(1) - c:RegisterEffect(e3) -end -function c242146.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c242146.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,e:GetHandler(),tc) - end -end -function c242146.atkup(e,tp,eg,ep,ev,re,r,rp) - local eqc=e:GetHandler():GetEquipTarget() - local a=Duel.GetAttacker() - local d=Duel.GetAttackTarget() - if d and a==eqc and d:GetBattlePosition()==POS_FACEDOWN_DEFENCE then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_PHASE+RESET_DAMAGE_CAL) - e1:SetValue(1500) - a:RegisterEffect(e1) - end -end diff --git a/script/c24218047.lua b/script/c24218047.lua deleted file mode 100644 index 7ecff8e2d5..0000000000 --- a/script/c24218047.lua +++ /dev/null @@ -1,33 +0,0 @@ ---破面竜 -function c24218047.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(24218047,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetCondition(c24218047.condition) - e1:SetTarget(c24218047.target) - e1:SetOperation(c24218047.operation) - c:RegisterEffect(e1) -end -function c24218047.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) -end -function c24218047.filter(c,e,tp) - return c:IsDefenceBelow(1500) and c:IsRace(RACE_WYRM) - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c24218047.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c24218047.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c24218047.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c24218047.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c24221739.lua b/script/c24221739.lua deleted file mode 100644 index 8d44dde335..0000000000 --- a/script/c24221739.lua +++ /dev/null @@ -1,15 +0,0 @@ ---神殿を守る者 -function c24221739.initial_effect(c) - --cannot draw - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EFFECT_CANNOT_DRAW) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(0,1) - e1:SetCondition(c24221739.con) - c:RegisterEffect(e1) -end -function c24221739.con(e) - return Duel.GetCurrentPhase()~=PHASE_DRAW -end diff --git a/script/c24221808.lua b/script/c24221808.lua deleted file mode 100644 index 44f72768b0..0000000000 --- a/script/c24221808.lua +++ /dev/null @@ -1,75 +0,0 @@ ---メンタルオーバー・デーモン -function c24221808.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsRace,RACE_PSYCHO),aux.NonTuner(Card.IsRace,RACE_PSYCHO),2) - c:EnableReviveLimit() - --remove - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(24221808,0)) - e1:SetCategory(CATEGORY_REMOVE) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetTarget(c24221808.rmtg) - e1:SetOperation(c24221808.rmop) - c:RegisterEffect(e1) - local sg=Group.CreateGroup() - sg:KeepAlive() - e1:SetLabelObject(sg) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(24221808,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetCondition(c24221808.spcon) - e2:SetTarget(c24221808.sptg) - e2:SetOperation(c24221808.spop) - e2:SetLabelObject(sg) - c:RegisterEffect(e2) -end -function c24221808.rmfilter(c) - return c:IsRace(RACE_PSYCHO) and c:IsAbleToRemove() -end -function c24221808.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c24221808.rmfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c24221808.rmfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,c24221808.rmfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) -end -function c24221808.rmop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) - if c:IsRelateToEffect(e) then - local sg=e:GetLabelObject() - if c:GetFlagEffect(24221808)==0 then - sg:Clear() - c:RegisterFlagEffect(24221808,RESET_EVENT+0x1680000,0,1) - end - sg:AddCard(tc) - tc:CreateRelation(c,RESET_EVENT+0x1fe0000) - end - end -end -function c24221808.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) and e:GetHandler():GetFlagEffect(24221808)~=0 -end -function c24221808.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_REMOVED) -end -function c24221808.spfilter(c,rc,e,tp) - return c:IsRelateToCard(rc) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c24221808.spop(e,tp,eg,ep,ev,re,r,rp) - local g=e:GetLabelObject() - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ft<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=g:FilterSelect(tp,c24221808.spfilter,ft,ft,nil,e:GetHandler(),e,tp) - Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) -end diff --git a/script/c24268052.lua b/script/c24268052.lua deleted file mode 100644 index 2344869205..0000000000 --- a/script/c24268052.lua +++ /dev/null @@ -1,30 +0,0 @@ ---ガード・ブロック -function c24268052.initial_effect(c) - -- - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_PRE_DAMAGE_CALCULATE) - e1:SetCondition(c24268052.condition) - e1:SetTarget(c24268052.target) - e1:SetOperation(c24268052.operation) - c:RegisterEffect(e1) -end -function c24268052.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp and Duel.GetBattleDamage(tp)>0 -end -function c24268052.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c24268052.operation(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PRE_BATTLE_DAMAGE) - e1:SetOperation(c24268052.damop) - e1:SetReset(RESET_PHASE+PHASE_DAMAGE) - Duel.RegisterEffect(e1,tp) - Duel.Draw(tp,1,REASON_EFFECT) -end -function c24268052.damop(e,tp,eg,ep,ev,re,r,rp) - Duel.ChangeBattleDamage(tp,0) -end diff --git a/script/c24285858.lua b/script/c24285858.lua deleted file mode 100644 index 7256586937..0000000000 --- a/script/c24285858.lua +++ /dev/null @@ -1,35 +0,0 @@ ---グラディアル・リターン -function c24285858.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c24285858.target) - e1:SetOperation(c24285858.activate) - c:RegisterEffect(e1) -end -function c24285858.filter(c) - return c:IsSetCard(0x19) and c:IsAbleToDeck() -end -function c24285858.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:GetLocation()==LOCATION_GRAVE and chkc:GetControler()==tp and c24285858.filter(chkc) end - if chk==0 then return Duel.IsPlayerCanDraw(tp,2) - and Duel.IsExistingTarget(c24285858.filter,tp,LOCATION_GRAVE,0,3,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectTarget(tp,c24285858.filter,tp,LOCATION_GRAVE,0,3,3,nil) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c24285858.tgfilter(c,e) - return not c:IsRelateToEffect(e) -end -function c24285858.activate(e,tp,eg,ep,ev,re,r,rp) - local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - if tg:IsExists(c24285858.tgfilter,1,nil,e) then return end - Duel.SendtoDeck(tg,nil,0,REASON_EFFECT) - Duel.ShuffleDeck(tp) - Duel.BreakEffect() - Duel.Draw(tp,1,REASON_EFFECT) -end diff --git a/script/c24291651.lua b/script/c24291651.lua deleted file mode 100644 index 7981cb49f8..0000000000 --- a/script/c24291651.lua +++ /dev/null @@ -1,21 +0,0 @@ ---ガンバラナイト -function c24291651.initial_effect(c) - --to defence - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(24291651,0)) - e1:SetCategory(CATEGORY_POSITION) - e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE) - e1:SetCode(EVENT_BE_BATTLE_TARGET) - e1:SetCondition(c24291651.poscon) - e1:SetOperation(c24291651.posop) - c:RegisterEffect(e1) -end -function c24291651.poscon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsAttackPos() -end -function c24291651.posop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFaceup() and c:IsRelateToEffect(e) then - Duel.ChangePosition(c,POS_FACEUP_DEFENCE) - end -end diff --git a/script/c24294108.lua b/script/c24294108.lua deleted file mode 100644 index 21b5b4da77..0000000000 --- a/script/c24294108.lua +++ /dev/null @@ -1,50 +0,0 @@ ---燃えさかる大地 -function c24294108.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c24294108.target) - e1:SetOperation(c24294108.activate) - c:RegisterEffect(e1) - --damage - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(24294108,0)) - e2:SetCategory(CATEGORY_DAMAGE) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetRange(LOCATION_SZONE) - e2:SetCountLimit(1) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) - e2:SetTarget(c24294108.damtg) - e2:SetOperation(c24294108.damop) - c:RegisterEffect(e2) -end -function c24294108.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local c1=Duel.GetFieldCard(0,LOCATION_SZONE,5) - local c2=Duel.GetFieldCard(1,LOCATION_SZONE,5) - local g=Group.FromCards(c1,c2) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c24294108.activate(e,tp,eg,ep,ev,re,r,rp) - local c1=Duel.GetFieldCard(0,LOCATION_SZONE,5) - local c2=Duel.GetFieldCard(1,LOCATION_SZONE,5) - local g=Group.FromCards(c1,c2) - if g:GetCount()>0 then - Duel.Destroy(g,REASON_EFFECT) - end -end -function c24294108.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local cp=Duel.GetTurnPlayer() - Duel.SetTargetPlayer(cp) - Duel.SetTargetParam(500) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,cp,500) -end -function c24294108.damop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c24311595.lua b/script/c24311595.lua deleted file mode 100644 index f18cfe2402..0000000000 --- a/script/c24311595.lua +++ /dev/null @@ -1,32 +0,0 @@ ---レスキューロイド -function c24311595.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(24311595,0)) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetRange(LOCATION_MZONE) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetTarget(c24311595.target) - e1:SetOperation(c24311595.activate) - c:RegisterEffect(e1) -end -function c24311595.filter(c,tp) - return c:IsLocation(LOCATION_GRAVE) and c:IsReason(REASON_BATTLE) and c:GetPreviousControler()==tp - and c:IsSetCard(0x16) and c:IsAbleToHand() -end -function c24311595.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local g=eg:Filter(c24311595.filter,nil,tp) - e:SetLabelObject(g:GetFirst()) - return g:GetCount()~=0 - end - Duel.SetTargetCard(e:GetLabelObject()) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetLabelObject(),1,0,0) -end -function c24311595.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - end -end diff --git a/script/c24317029.lua b/script/c24317029.lua deleted file mode 100644 index 08f76327e4..0000000000 --- a/script/c24317029.lua +++ /dev/null @@ -1,31 +0,0 @@ ---墓守の偵察者 -function c24317029.initial_effect(c) - --flip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(24317029,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP) - e1:SetTarget(c24317029.target) - e1:SetOperation(c24317029.operation) - c:RegisterEffect(e1) -end -function c24317029.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c24317029.filter(c,e,tp) - return c:IsAttackBelow(1500) and c:IsSetCard(0x2e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c24317029.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c24317029.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - elseif Duel.IsPlayerCanSpecialSummon(tp) then - local cg=Duel.GetFieldGroup(tp,LOCATION_DECK,0) - Duel.ConfirmCards(1-tp,cg) - Duel.ConfirmCards(tp,cg) - Duel.ShuffleDeck(tp) - end -end diff --git a/script/c24326617.lua b/script/c24326617.lua deleted file mode 100644 index b02baf1a71..0000000000 --- a/script/c24326617.lua +++ /dev/null @@ -1,20 +0,0 @@ ---氷帝家臣エッシャー -function c24326617.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c24326617.spcon) - c:RegisterEffect(e1) -end -function c24326617.filter(c) - return c:GetSequence()<5 -end -function c24326617.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c24326617.filter,tp,0,LOCATION_SZONE,2,nil) -end diff --git a/script/c24348804.lua b/script/c24348804.lua deleted file mode 100644 index 210538835a..0000000000 --- a/script/c24348804.lua +++ /dev/null @@ -1,69 +0,0 @@ ---一回休み -function c24348804.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(TIMING_SPSUMMON) - e1:SetCondition(c24348804.condition) - e1:SetTarget(c24348804.target1) - e1:SetOperation(c24348804.operation) - c:RegisterEffect(e1) - --pos - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_POSITION) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetRange(LOCATION_SZONE) - e2:SetTarget(c24348804.target2) - e2:SetOperation(c24348804.operation) - e2:SetLabel(1) - c:RegisterEffect(e2) - --disable - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetCode(EFFECT_DISABLE) - e3:SetRange(LOCATION_SZONE) - e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e3:SetTarget(c24348804.distg) - c:RegisterEffect(e3) -end -function c24348804.cfilter(c) - return bit.band(c:GetSummonType(),SUMMON_TYPE_SPECIAL)==SUMMON_TYPE_SPECIAL -end -function c24348804.condition(e,tp,eg,ep,ev,re,r,rp) - return not Duel.IsExistingMatchingCard(c24348804.cfilter,tp,LOCATION_MZONE,0,1,nil) -end -function c24348804.target1(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - e:SetLabel(0) - local res,teg,tep,tev,tre,tr,trp=Duel.CheckEvent(EVENT_SPSUMMON_SUCCESS,true) - if res then - local g=teg:Filter(c24348804.filter1,nil) - if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(24348804,0)) then - Duel.SetTargetCard(g) - Duel.SetOperationInfo(0,CATEGORY_POSITION,g,g:GetCount(),0,0) - e:SetLabel(1) - e:GetHandler():RegisterFlagEffect(0,RESET_CHAIN,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(24348804,1)) - end - end -end -function c24348804.filter1(c) - return c:IsPosition(POS_FACEUP_ATTACK) and c:IsType(TYPE_EFFECT) -end -function c24348804.target2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return eg:IsExists(c24348804.filter1,1,nil) end - local g=eg:Filter(c24348804.filter1,nil) - Duel.SetTargetCard(g) - Duel.SetOperationInfo(0,CATEGORY_POSITION,g,g:GetCount(),0,0) -end -function c24348804.operation(e,tp,eg,ep,ev,re,r,rp) - if e:GetLabel()==0 or not e:GetHandler():IsRelateToEffect(e) then return end - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) - if g:GetCount()>0 then - Duel.ChangePosition(g,POS_FACEUP_DEFENCE,POS_FACEDOWN_DEFENCE,POS_FACEUP_DEFENCE,POS_FACEDOWN_DEFENCE) - end -end -function c24348804.distg(e,c) - return c:IsStatus(STATUS_SPSUMMON_TURN) and bit.band(c:GetSummonType(),SUMMON_TYPE_SPECIAL)==SUMMON_TYPE_SPECIAL -end diff --git a/script/c24362891.lua b/script/c24362891.lua deleted file mode 100644 index 47c377c4c4..0000000000 --- a/script/c24362891.lua +++ /dev/null @@ -1,37 +0,0 @@ ---突然進化 -function c24362891.initial_effect(c) - --Special Summon - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_END_PHASE) - e1:SetCost(c24362891.cost) - e1:SetTarget(c24362891.target) - e1:SetOperation(c24362891.operation) - c:RegisterEffect(e1) -end -function c24362891.cost(e,tp,eg,ep,ev,re,r,rp,chk) - e:SetLabel(1) - if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsRace,1,nil,RACE_REPTILE) end - local g=Duel.SelectReleaseGroup(tp,Card.IsRace,1,1,nil,RACE_REPTILE) - Duel.Release(g,REASON_COST) -end -function c24362891.filter(c,e,tp) - return c:IsSetCard(0x604e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c24362891.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - if e:GetLabel()==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return false end - e:SetLabel(0) - return Duel.IsExistingMatchingCard(c24362891.filter,tp,LOCATION_DECK,0,1,nil,e,tp) - end - e:SetLabel(0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c24362891.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c24362891.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) -end diff --git a/script/c24384095.lua b/script/c24384095.lua deleted file mode 100644 index 71ac6fe4ec..0000000000 --- a/script/c24384095.lua +++ /dev/null @@ -1,34 +0,0 @@ ---九蛇孔雀 -function c24384095.initial_effect(c) - --search - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(24384095,0)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCountLimit(1,24384095) - e1:SetCondition(c24384095.thcon) - e1:SetTarget(c24384095.thtg) - e1:SetOperation(c24384095.thop) - c:RegisterEffect(e1) -end -function c24384095.thcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) and e:GetHandler():IsReason(REASON_RELEASE) -end -function c24384095.filter(c) - return c:IsLevelBelow(4) and c:IsAttribute(ATTRIBUTE_WIND) and c:GetCode()~=24384095 - and not c:IsHasEffect(EFFECT_NECRO_VALLEY) and c:IsAbleToHand() -end -function c24384095.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c24384095.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE) -end -function c24384095.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c24384095.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c24419823.lua b/script/c24419823.lua deleted file mode 100644 index c8388486ee..0000000000 --- a/script/c24419823.lua +++ /dev/null @@ -1,35 +0,0 @@ ---マインフィールド -function c24419823.initial_effect(c) - --salvage - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(24419823,0)) - e2:SetCategory(CATEGORY_TOHAND) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e2:SetCode(EVENT_LEAVE_FIELD) - e2:SetCondition(c24419823.thcon) - e2:SetTarget(c24419823.thtg) - e2:SetOperation(c24419823.thop) - c:RegisterEffect(e2) -end -function c24419823.thcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return not c:IsLocation(LOCATION_DECK) and c:IsPreviousPosition(POS_FACEUP) -end -function c24419823.filter(c) - return c:IsType(TYPE_FIELD) and c:IsAbleToHand() -end -function c24419823.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c24419823.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c24419823.filter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c24419823.filter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0) -end -function c24419823.thop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end diff --git a/script/c24432029.lua b/script/c24432029.lua deleted file mode 100644 index cdba80bf77..0000000000 --- a/script/c24432029.lua +++ /dev/null @@ -1,29 +0,0 @@ ---ジェネクス・ブラスト -function c24432029.initial_effect(c) - --search - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(24432029,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetTarget(c24432029.target) - e1:SetOperation(c24432029.operation) - c:RegisterEffect(e1) -end -function c24432029.filter(c) - return c:IsSetCard(0x2) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsAbleToHand() -end -function c24432029.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c24432029.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c24432029.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c24432029.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c24435369.lua b/script/c24435369.lua deleted file mode 100644 index 6c4d98d260..0000000000 --- a/script/c24435369.lua +++ /dev/null @@ -1,16 +0,0 @@ ---マーメイド・ナイト -function c24435369.initial_effect(c) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_EXTRA_ATTACK) - e1:SetCondition(c24435369.dircon) - e1:SetValue(1) - c:RegisterEffect(e1) -end -function c24435369.filter(c) - return c:IsFaceup() and c:IsCode(22702055) -end -function c24435369.dircon(e) - return Duel.IsExistingMatchingCard(c24435369.filter,0,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) - or Duel.IsEnvironment(22702055) -end diff --git a/script/c24449083.lua b/script/c24449083.lua deleted file mode 100644 index 32d1853d17..0000000000 --- a/script/c24449083.lua +++ /dev/null @@ -1,43 +0,0 @@ ---コート・オブ・ジャスティス -function c24449083.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(24449083,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_SZONE) - e2:SetCountLimit(1,24449083) - e2:SetCondition(c24449083.condition) - e2:SetTarget(c24449083.target) - e2:SetOperation(c24449083.operation) - c:RegisterEffect(e2) -end -function c24449083.cfilter(c) - return c:IsFaceup() and c:GetLevel()==1 and c:IsRace(RACE_FAIRY) -end -function c24449083.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c24449083.cfilter,tp,LOCATION_MZONE,0,1,nil) -end -function c24449083.filter(c,e,sp) - return c:IsRace(RACE_FAIRY) and c:IsCanBeSpecialSummoned(e,0,sp,false,false) -end -function c24449083.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c24449083.filter,tp,LOCATION_HAND,0,1,nil,e,tp) - and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c24449083.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - if not e:GetHandler():IsRelateToEffect(e) then return end - if not Duel.IsExistingMatchingCard(c24449083.cfilter,tp,LOCATION_MZONE,0,1,nil) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c24449083.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c24508238.lua b/script/c24508238.lua deleted file mode 100644 index 6b69729303..0000000000 --- a/script/c24508238.lua +++ /dev/null @@ -1,34 +0,0 @@ ---D.D.クロウ -function c24508238.initial_effect(c) - --remove - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(24508238,0)) - e1:SetCategory(CATEGORY_REMOVE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetHintTiming(0,0x11e0) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetRange(LOCATION_HAND) - e1:SetCost(c24508238.cost) - e1:SetTarget(c24508238.target) - e1:SetOperation(c24508238.operation) - c:RegisterEffect(e1) -end -function c24508238.cost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToGraveAsCost() and c:IsDiscardable() end - Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD) -end -function c24508238.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:GetControler()~=tp and chkc:GetLocation()==LOCATION_GRAVE and chkc:IsAbleToRemove() end - if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) -end -function c24508238.operation(e,tp,eg,ep,ev,re,r,rp,chk) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) - end -end diff --git a/script/c24545464.lua b/script/c24545464.lua deleted file mode 100644 index 8b0714c2dc..0000000000 --- a/script/c24545464.lua +++ /dev/null @@ -1,31 +0,0 @@ ---シンクロン・リフレクト -function c24545464.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_BE_BATTLE_TARGET) - e1:SetCondition(c24545464.condition) - e1:SetTarget(c24545464.target) - e1:SetOperation(c24545464.activate) - c:RegisterEffect(e1) -end -function c24545464.condition(e,tp,eg,ep,ev,re,r,rp) - local tc=eg:GetFirst() - return tc:IsControler(tp) and tc:IsFaceup() and tc:IsType(TYPE_SYNCHRO) -end -function c24545464.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsDestructable() end - if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c24545464.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateAttack() - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c24566654.lua b/script/c24566654.lua deleted file mode 100644 index b5e62186a2..0000000000 --- a/script/c24566654.lua +++ /dev/null @@ -1,50 +0,0 @@ ---クリムゾン・ヘルフレア -function c24566654.initial_effect(c) - --reflect - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_CHAINING) - e1:SetCondition(c24566654.condition) - e1:SetOperation(c24566654.operation) - c:RegisterEffect(e1) -end -function c24566654.cfilter(c) - return c:IsFaceup() and c:IsCode(70902743) -end -function c24566654.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c24566654.cfilter,tp,LOCATION_ONFIELD,0,1,nil) and ep~=tp and re:IsHasType(EFFECT_TYPE_ACTIVATE) - and aux.damcon1(e,tp,eg,ep,ev,re,r,rp) -end -function c24566654.operation(e,tp,eg,ep,ev,re,r,rp) - local cid=Duel.GetChainInfo(ev,CHAININFO_CHAIN_ID) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_REFLECT_DAMAGE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetTargetRange(1,0) - e1:SetLabel(cid) - e1:SetValue(c24566654.refcon) - e1:SetReset(RESET_CHAIN) - Duel.RegisterEffect(e1,tp) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_CHANGE_DAMAGE) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetTargetRange(1,0) - e2:SetLabel(cid) - e2:SetValue(c24566654.dammul) - e2:SetReset(RESET_CHAIN) - Duel.RegisterEffect(e2,tp) -end -function c24566654.refcon(e,re,val,r,rp,rc) - local cc=Duel.GetCurrentChain() - if cc==0 or bit.band(r,REASON_EFFECT)==0 then return end - local cid=Duel.GetChainInfo(0,CHAININFO_CHAIN_ID) - return cid==e:GetLabel() -end -function c24566654.dammul(e,re,val,r,rp,rc) - local cc=Duel.GetCurrentChain() - if cc==0 or bit.band(r,REASON_EFFECT)==0 then return end - local cid=Duel.GetChainInfo(0,CHAININFO_CHAIN_ID) - return cid==e:GetLabel() and val*2 or val -end diff --git a/script/c2460565.lua b/script/c2460565.lua deleted file mode 100644 index 87dcbb22ec..0000000000 --- a/script/c2460565.lua +++ /dev/null @@ -1,39 +0,0 @@ ---切り込み隊長 -function c2460565.initial_effect(c) - --cannot select battle target - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(0,LOCATION_MZONE) - e1:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET) - e1:SetValue(c2460565.atlimit) - c:RegisterEffect(e1) - --summon success - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(2460565,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_SUMMON_SUCCESS) - e2:SetTarget(c2460565.sumtg) - e2:SetOperation(c2460565.sumop) - c:RegisterEffect(e2) -end -function c2460565.atlimit(e,c) - return c~=e:GetHandler() and c:IsFaceup() and c:IsRace(RACE_WARRIOR) -end -function c2460565.filter(c,e,tp) - return c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c2460565.sumtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c2460565.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c2460565.sumop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c2460565.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c24610207.lua b/script/c24610207.lua deleted file mode 100644 index 4dc28bb1b1..0000000000 --- a/script/c24610207.lua +++ /dev/null @@ -1,60 +0,0 @@ ---アステル・ドローン -function c24610207.initial_effect(c) - --xyzlv - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_XYZ_LEVEL) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetValue(c24610207.xyzlv) - c:RegisterEffect(e1) - --effect gain - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_BE_MATERIAL) - e2:SetCondition(c24610207.efcon) - e2:SetOperation(c24610207.efop) - c:RegisterEffect(e2) -end -function c24610207.xyzlv(e,c,rc) - return 0x50000+e:GetHandler():GetLevel() -end -function c24610207.efcon(e,tp,eg,ep,ev,re,r,rp) - return r==REASON_XYZ -end -function c24610207.efop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local rc=c:GetReasonCard() - local e1=Effect.CreateEffect(rc) - e1:SetDescription(aux.Stringid(24610207,0)) - e1:SetCategory(CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(c24610207.drcon) - e1:SetTarget(c24610207.drtg) - e1:SetOperation(c24610207.drop) - e1:SetReset(RESET_EVENT+0x1fe0000) - rc:RegisterEffect(e1,true) - if not rc:IsType(TYPE_EFFECT) then - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_ADD_TYPE) - e2:SetValue(TYPE_EFFECT) - e2:SetReset(RESET_EVENT+0x1fe0000) - rc:RegisterEffect(e2,true) - end -end -function c24610207.drcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_XYZ -end -function c24610207.drtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(1) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c24610207.drop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end diff --git a/script/c2461031.lua b/script/c2461031.lua deleted file mode 100644 index 101d977b41..0000000000 --- a/script/c2461031.lua +++ /dev/null @@ -1,93 +0,0 @@ ---甲虫装機 グルフ -function c2461031.initial_effect(c) - --equip - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetDescription(aux.Stringid(2461031,0)) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetTarget(c2461031.eqtg) - e1:SetOperation(c2461031.eqop) - c:RegisterEffect(e1) - --equip effect - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(500) - c:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_EQUIP) - e3:SetCode(EFFECT_UPDATE_DEFENCE) - e3:SetValue(100) - c:RegisterEffect(e3) - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_EQUIP) - e4:SetCode(EFFECT_UPDATE_LEVEL) - e4:SetValue(2) - c:RegisterEffect(e4) - --lvup - local e5=Effect.CreateEffect(c) - e5:SetDescription(aux.Stringid(2461031,1)) - e5:SetProperty(EFFECT_FLAG_CARD_TARGET) - e5:SetType(EFFECT_TYPE_IGNITION) - e5:SetRange(LOCATION_SZONE) - e5:SetCost(c2461031.lvcost) - e5:SetTarget(c2461031.lvtg) - e5:SetOperation(c2461031.lvop) - c:RegisterEffect(e5) -end -function c2461031.filter(c) - return c:IsSetCard(0x56) and c:IsType(TYPE_MONSTER) and not c:IsHasEffect(EFFECT_NECRO_VALLEY) -end -function c2461031.eqtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingMatchingCard(c2461031.filter,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,nil,1,tp,LOCATION_GRAVE+LOCATION_HAND) -end -function c2461031.eqop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end - if c:IsFacedown() or not c:IsRelateToEffect(e) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local g=Duel.SelectMatchingCard(tp,c2461031.filter,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,1,nil) - local tc=g:GetFirst() - if tc then - if not Duel.Equip(tp,tc,c,true) then return end - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_COPY_INHERIT+EFFECT_FLAG_OWNER_RELATE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(c2461031.eqlimit) - tc:RegisterEffect(e1) - end -end -function c2461031.eqlimit(e,c) - return e:GetOwner()==c -end -function c2461031.lvcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end -function c2461031.lvfilter(c) - return c:IsFaceup() and not c:IsType(TYPE_XYZ) -end -function c2461031.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c2461031.lvfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c2461031.lvfilter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c2461031.lvfilter,tp,LOCATION_MZONE,0,1,1,nil) -end -function c2461031.lvop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - local opt=Duel.SelectOption(tp,aux.Stringid(2461031,2),aux.Stringid(2461031,3)) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_LEVEL) - e1:SetValue(opt+1) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - end -end diff --git a/script/c24621460.lua b/script/c24621460.lua deleted file mode 100644 index 6155f44e4c..0000000000 --- a/script/c24621460.lua +++ /dev/null @@ -1,41 +0,0 @@ ---カラクリ小町 弐弐四 -function c24621460.initial_effect(c) - --must attack - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_MUST_ATTACK) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_CANNOT_EP) - e2:SetRange(LOCATION_MZONE) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetTargetRange(1,0) - e2:SetCondition(c24621460.becon) - c:RegisterEffect(e2) - --pos change - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(24621460,0)) - e3:SetCategory(CATEGORY_POSITION) - e3:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_SINGLE) - e3:SetCode(EVENT_BE_BATTLE_TARGET) - e3:SetOperation(c24621460.posop) - c:RegisterEffect(e3) - --extra summon - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_FIELD) - e4:SetRange(LOCATION_MZONE) - e4:SetTargetRange(LOCATION_HAND+LOCATION_MZONE,0) - e4:SetCode(EFFECT_EXTRA_SUMMON_COUNT) - e4:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x11)) - c:RegisterEffect(e4) -end -function c24621460.becon(e) - return e:GetHandler():IsAttackable() -end -function c24621460.posop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFaceup() and c:IsRelateToEffect(e) then - Duel.ChangePosition(c,POS_FACEUP_DEFENCE,0,POS_FACEUP_ATTACK,0) - end -end diff --git a/script/c24623598.lua b/script/c24623598.lua deleted file mode 100644 index 858c4cb2ac..0000000000 --- a/script/c24623598.lua +++ /dev/null @@ -1,25 +0,0 @@ ---ロスト -function c24623598.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_REMOVE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c24623598.target) - e1:SetOperation(c24623598.activate) - c:RegisterEffect(e1) -end -function c24623598.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:GetControler()~=tp and chkc:IsLocation(LOCATION_GRAVE) and chkc:IsAbleToRemove() end - if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) -end -function c24623598.activate(e,tp,eg,ep,ev,re,r,rp,chk) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) - end -end diff --git a/script/c24643836.lua b/script/c24643836.lua deleted file mode 100644 index a902327f46..0000000000 --- a/script/c24643836.lua +++ /dev/null @@ -1,34 +0,0 @@ ---おジャマジック -function c24643836.initial_effect(c) - --search - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(24643836,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCondition(c24643836.thcon) - e1:SetTarget(c24643836.thtg) - e1:SetOperation(c24643836.thop) - c:RegisterEffect(e1) -end -function c24643836.thcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD+LOCATION_HAND) -end -function c24643836.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,3,tp,LOCATION_DECK) -end -function c24643836.filter(c,code) - return c:IsCode(code) and c:IsAbleToHand() -end -function c24643836.thop(e,tp,eg,ep,ev,re,r,rp) - local t1=Duel.GetFirstMatchingCard(c24643836.filter,tp,LOCATION_DECK,0,nil,12482652) - if not t1 then return end - local t2=Duel.GetFirstMatchingCard(c24643836.filter,tp,LOCATION_DECK,0,nil,42941100) - if not t2 then return end - local t3=Duel.GetFirstMatchingCard(c24643836.filter,tp,LOCATION_DECK,0,nil,79335209) - if not t3 then return end - local g=Group.FromCards(t1,t2,t3) - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) -end diff --git a/script/c24644634.lua b/script/c24644634.lua deleted file mode 100644 index 1a312d3ed7..0000000000 --- a/script/c24644634.lua +++ /dev/null @@ -1,81 +0,0 @@ ---ナチュル・ホワイトオーク -function c24644634.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(24644634,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_CHAINING) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c24644634.spcon) - e1:SetCost(c24644634.spcost) - e1:SetTarget(c24644634.sptg) - e1:SetOperation(c24644634.spop) - c:RegisterEffect(e1) -end -function c24644634.spcon(e,tp,eg,ep,ev,re,r,rp) - if rp==tp or not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return end - local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) - return g and g:IsContains(e:GetHandler()) -end -function c24644634.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end -function c24644634.filter(c,e,tp) - return c:IsLevelBelow(4) and c:IsSetCard(0x2a) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c24644634.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c24644634.filter,tp,LOCATION_DECK,0,2,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_DECK) -end -function c24644634.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 then return end - local g=Duel.GetMatchingGroup(c24644634.filter,tp,LOCATION_DECK,0,nil,e,tp) - if g:GetCount()>=2 then - local fid=e:GetHandler():GetFieldID() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=g:Select(tp,2,2,nil) - Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) - local tc=sg:GetFirst() - tc:RegisterFlagEffect(24644634,RESET_EVENT+0x1fe0000,0,0,fid) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - tc=sg:GetNext() - tc:RegisterFlagEffect(24644634,RESET_EVENT+0x1fe0000,0,0,fid) - local e2=e1:Clone() - tc:RegisterEffect(e2) - sg:KeepAlive() - local de=Effect.CreateEffect(e:GetHandler()) - de:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - de:SetCode(EVENT_PHASE+PHASE_END) - de:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - de:SetCountLimit(1) - de:SetLabel(fid) - de:SetLabelObject(sg) - de:SetCondition(c24644634.descon) - de:SetOperation(c24644634.desop) - Duel.RegisterEffect(de,tp) - end -end -function c24644634.desfilter(c,fid) - return c:GetFlagEffectLabel(25935625)==fid -end -function c24644634.descon(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetTurnPlayer()~=tp then return end - local g=e:GetLabelObject() - if not g:IsExists(c24644634.desfilter,1,nil,e:GetLabel()) then - g:DeleteGroup() - e:Reset() - return false - else return true end -end -function c24644634.desop(e,tp,eg,ep,ev,re,r,rp) - local g=e:GetLabelObject() - local tg=g:Filter(c24644634.desfilter,nil,e:GetLabel()) - Duel.Destroy(tg,REASON_EFFECT) -end diff --git a/script/c24658418.lua b/script/c24658418.lua deleted file mode 100644 index 620634f96f..0000000000 --- a/script/c24658418.lua +++ /dev/null @@ -1,65 +0,0 @@ ---銀河暴竜 -function c24658418.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(24658418,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_BE_BATTLE_TARGET) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c24658418.condition) - e1:SetTarget(c24658418.target) - e1:SetOperation(c24658418.operation) - c:RegisterEffect(e1) - --xyz - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(24658418,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetCondition(c24658418.spcon) - e2:SetTarget(c24658418.sptg) - e2:SetOperation(c24658418.spop) - c:RegisterEffect(e2) -end -function c24658418.condition(e,tp,eg,ep,ev,re,r,rp) - local at=Duel.GetAttackTarget() - return at:IsFaceup() and at:IsControler(tp) and at:IsSetCard(0x7b) -end -function c24658418.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c24658418.operation(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - Duel.SpecialSummon(e:GetHandler(),1,tp,tp,false,false,POS_FACEUP_DEFENCE) - end -end -function c24658418.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+1 -end -function c24658418.mfilter(c) - return c:IsFaceup() and c:IsSetCard(0x7b) and not c:IsType(TYPE_TOKEN+TYPE_XYZ) -end -function c24658418.xyzfilter(c,mg) - return c:IsSetCard(0x7b) and c:IsXyzSummonable(mg) -end -function c24658418.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local g=Duel.GetMatchingGroup(c24658418.mfilter,tp,LOCATION_MZONE,0,nil) - return Duel.IsExistingMatchingCard(c24658418.xyzfilter,tp,LOCATION_EXTRA,0,1,nil,g) - end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function c24658418.spop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c24658418.mfilter,tp,LOCATION_MZONE,0,nil) - local xyzg=Duel.GetMatchingGroup(c24658418.xyzfilter,tp,LOCATION_EXTRA,0,nil,g) - if xyzg:GetCount()>0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local xyz=xyzg:Select(tp,1,1,nil):GetFirst() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL) - local sg=g:FilterSelect(tp,xyz.xyz_filter,xyz.xyz_count,xyz.xyz_count,nil) - Duel.XyzSummon(tp,xyz,sg) - end -end diff --git a/script/c24661486.lua b/script/c24661486.lua deleted file mode 100644 index cd92a9df81..0000000000 --- a/script/c24661486.lua +++ /dev/null @@ -1,42 +0,0 @@ ---コールド・エンチャンター -function c24661486.initial_effect(c) - --add counter - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(24661486,0)) - e1:SetCategory(CATEGORY_COUNTER) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c24661486.cost) - e1:SetTarget(c24661486.target) - e1:SetOperation(c24661486.operation) - c:RegisterEffect(e1) - -- - local e2=Effect.CreateEffect(c) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetRange(LOCATION_MZONE) - e2:SetValue(c24661486.atkval) - c:RegisterEffect(e2) -end -function c24661486.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) -end -function c24661486.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsCanAddCounter(0x15,1) end - if chk==0 then return Duel.IsExistingTarget(Card.IsCanAddCounter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,0x15,1) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - local g=Duel.SelectTarget(tp,Card.IsCanAddCounter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,0x15,1) - Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,1,0,0) -end -function c24661486.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) and tc:IsCanAddCounter(0x15,1) then - tc:AddCounter(0x15,1) - end -end -function c24661486.atkval(e,c) - return Duel.GetCounter(0,1,1,0x15)*300 -end diff --git a/script/c24668830.lua b/script/c24668830.lua deleted file mode 100644 index 1dc21a5610..0000000000 --- a/script/c24668830.lua +++ /dev/null @@ -1,60 +0,0 @@ ---細菌感染 -function c24668830.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c24668830.target) - e1:SetOperation(c24668830.operation) - c:RegisterEffect(e1) - --atkdown - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) - e2:SetRange(LOCATION_SZONE) - e2:SetCountLimit(1) - e2:SetCondition(c24668830.atkcon) - e2:SetOperation(c24668830.atkop) - c:RegisterEffect(e2) - --equip limit - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_EQUIP_LIMIT) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e3:SetValue(c24668830.eqlimit) - c:RegisterEffect(e3) -end -function c24668830.eqlimit(e,c) - return not c:IsRace(RACE_MACHINE) -end -function c24668830.filter(c) - return c:IsFaceup() and not c:IsRace(RACE_MACHINE) -end -function c24668830.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c24668830.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c24668830.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c24668830.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c24668830.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,e:GetHandler(),tc) - end -end -function c24668830.atkcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c24668830.atkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local ec=c:GetEquipTarget() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(-300) - e1:SetReset(RESET_EVENT+0x1fe0000) - ec:RegisterEffect(e1) -end diff --git a/script/c24673894.lua b/script/c24673894.lua deleted file mode 100644 index 3840c7b1ae..0000000000 --- a/script/c24673894.lua +++ /dev/null @@ -1,35 +0,0 @@ ---チェンジ・デステニー -function c24673894.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetCondition(c24673894.condition) - e1:SetTarget(c24673894.target) - e1:SetOperation(c24673894.activate) - c:RegisterEffect(e1) -end -function c24673894.condition(e,tp,eg,ep,ev,re,r,rp) - return tp~=Duel.GetTurnPlayer() -end -function c24673894.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local tg=Duel.GetAttacker() - if chkc then return chkc==tg end - if chk==0 then return tg:IsOnField() and tg:IsCanBeEffectTarget(e) end - Duel.SetTargetCard(tg) -end -function c24673894.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetAttacker() - if tc:IsRelateToEffect(e) and Duel.NegateAttack() and Duel.ChangePosition(tc,POS_FACEUP_DEFENCE)~=0 then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_CHANGE_POSITION) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - local val=tc:GetAttack()/2 - local op=Duel.SelectOption(1-tp,aux.Stringid(24673894,0),aux.Stringid(24673894,1)) - if op==0 then Duel.Recover(1-tp,val,REASON_EFFECT) - else Duel.Damage(tp,val,REASON_EFFECT) end - end -end diff --git a/script/c24694698.lua b/script/c24694698.lua deleted file mode 100644 index 4aac54aaa2..0000000000 --- a/script/c24694698.lua +++ /dev/null @@ -1,58 +0,0 @@ ---ナチュル・マロン -function c24694698.initial_effect(c) - --send to grave - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(24694698,0)) - e1:SetCategory(CATEGORY_TOGRAVE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c24694698.target) - e1:SetOperation(c24694698.operation) - c:RegisterEffect(e1) - --draw - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(24694698,1)) - e2:SetCategory(CATEGORY_DRAW) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetTarget(c24694698.drtg) - e2:SetOperation(c24694698.drop) - c:RegisterEffect(e2) -end -function c24694698.tgfilter(c) - return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x2a) and c:IsAbleToGrave() -end -function c24694698.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c24694698.tgfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) -end -function c24694698.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c24694698.tgfilter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoGrave(g,REASON_EFFECT) - end -end -function c24694698.filter(c) - return c:IsSetCard(0x2a) and c:IsType(TYPE_MONSTER) and c:IsAbleToDeck() -end -function c24694698.drtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c24694698.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c24694698.filter,tp,LOCATION_GRAVE,0,2,nil) and Duel.IsPlayerCanDraw(tp,1) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectTarget(tp,c24694698.filter,tp,LOCATION_GRAVE,0,2,2,nil) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,2,0,0) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c24694698.drop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - if g:FilterCount(Card.IsRelateToEffect,nil,e)==2 then - Duel.SendtoDeck(g,nil,0,REASON_EFFECT) - Duel.ShuffleDeck(tp) - Duel.BreakEffect() - Duel.Draw(tp,1,REASON_EFFECT) - end -end diff --git a/script/c24696097.lua b/script/c24696097.lua deleted file mode 100644 index 47d976133b..0000000000 --- a/script/c24696097.lua +++ /dev/null @@ -1,114 +0,0 @@ ---シューティング・スター・ドラゴン -function c24696097.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure2(c,aux.FilterBoolFunction(Card.IsType,TYPE_SYNCHRO),aux.FilterBoolFunction(Card.IsCode,44508094)) - c:EnableReviveLimit() - --multi attack - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(24696097,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c24696097.mtcon) - e1:SetOperation(c24696097.mtop) - c:RegisterEffect(e1) - --negate - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(24696097,1)) - e2:SetCategory(CATEGORY_DISABLE+CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_CHAINING) - e2:SetCountLimit(1) - e2:SetRange(LOCATION_MZONE) - e2:SetCondition(c24696097.discon) - e2:SetTarget(c24696097.distg) - e2:SetOperation(c24696097.disop) - c:RegisterEffect(e2) - --disable attack - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(24696097,2)) - e3:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_FIELD) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetCode(EVENT_ATTACK_ANNOUNCE) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1) - e3:SetCondition(c24696097.dacon) - e3:SetTarget(c24696097.datg) - e3:SetOperation(c24696097.daop) - c:RegisterEffect(e3) - --Revive - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(24696097,3)) - e4:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_FIELD) - e4:SetCategory(CATEGORY_SPECIAL_SUMMON) - e4:SetCode(EVENT_PHASE+PHASE_END) - e4:SetRange(LOCATION_REMOVED) - e4:SetCountLimit(1) - e4:SetTarget(c24696097.sumtg) - e4:SetOperation(c24696097.sumop) - c:RegisterEffect(e4) -end -function c24696097.mtcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsAbleToEnterBP() and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>=5 -end -function c24696097.mtop(e,tp,eg,ep,ev,re,r,rp) - Duel.ConfirmDecktop(tp,5) - local g=Duel.GetDecktopGroup(tp,5) - local ct=g:FilterCount(Card.IsType,nil,TYPE_TUNER) - Duel.ShuffleDeck(tp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_EXTRA_ATTACK) - e1:SetReset(RESET_EVENT+0x1ff0000+RESET_PHASE+PHASE_END) - e1:SetValue(ct-1) - e:GetHandler():RegisterEffect(e1) -end -function c24696097.discon(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) or not Duel.IsChainNegatable(ev) then return false end - if re:IsHasCategory(CATEGORY_NEGATE) - and Duel.GetChainInfo(ev-1,CHAININFO_TRIGGERING_EFFECT):IsHasType(EFFECT_TYPE_ACTIVATE) then return false end - local ex,tg,tc=Duel.GetOperationInfo(ev,CATEGORY_DESTROY) - return ex and tg~=nil and tc+tg:FilterCount(Card.IsOnField,nil)-tg:GetCount()>0 -end -function c24696097.distg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0) - if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) - end -end -function c24696097.disop(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateEffect(ev) - if re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(eg,REASON_EFFECT) - end -end -function c24696097.dacon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetAttacker():GetControler()~=tp -end -function c24696097.datg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc==Duel.GetAttacker() end - if chk==0 then return e:GetHandler():IsAbleToRemove() and Duel.GetAttacker():IsCanBeEffectTarget(e) - and not e:GetHandler():IsStatus(STATUS_CHAINING) end - Duel.SetTargetCard(Duel.GetAttacker()) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,e:GetHandler(),1,0,0) -end -function c24696097.daop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.Remove(c,POS_FACEUP,REASON_EFFECT) - end - Duel.NegateAttack() - c:RegisterFlagEffect(24696097,RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END,0,0) -end -function c24696097.sumtg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:GetFlagEffect(24696097)>0 - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c24696097.sumop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c24701235.lua b/script/c24701235.lua deleted file mode 100644 index 395ef3b542..0000000000 --- a/script/c24701235.lua +++ /dev/null @@ -1,98 +0,0 @@ ---和魂 -function c24701235.initial_effect(c) - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - c:RegisterEffect(e1) - --summon,flip - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetCode(EVENT_SUMMON_SUCCESS) - e2:SetOperation(c24701235.retreg) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EVENT_FLIP) - c:RegisterEffect(e3) - --extra summon - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e4:SetCode(EVENT_SUMMON_SUCCESS) - e4:SetOperation(c24701235.sumop) - c:RegisterEffect(e4) - local e5=e4:Clone() - e5:SetCode(EVENT_FLIP) - c:RegisterEffect(e5) - --draw - local e6=Effect.CreateEffect(c) - e6:SetDescription(aux.Stringid(24701235,1)) - e6:SetCategory(CATEGORY_DRAW) - e6:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e6:SetCode(EVENT_TO_GRAVE) - e6:SetTarget(c24701235.target) - e6:SetOperation(c24701235.operation) - c:RegisterEffect(e6) -end -function c24701235.retreg(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - --to hand - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetDescription(aux.Stringid(24701235,0)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetReset(RESET_EVENT+0x1ee0000+RESET_PHASE+PHASE_END) - e1:SetCondition(c24701235.retcon) - e1:SetTarget(c24701235.rettg) - e1:SetOperation(c24701235.retop) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - c:RegisterEffect(e2) -end -function c24701235.retcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:GetFlagEffect(24701235)>0 or c:IsHasEffect(EFFECT_SPIRIT_DONOT_RETURN) then return false end - if e:IsHasType(EFFECT_TYPE_TRIGGER_F) then - return not c:IsHasEffect(EFFECT_SPIRIT_MAYNOT_RETURN) - else return c:IsHasEffect(EFFECT_SPIRIT_MAYNOT_RETURN) end -end -function c24701235.rettg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0) -end -function c24701235.retop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SendtoHand(c,nil,REASON_EFFECT) - end -end -function c24701235.sumop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetFlagEffect(tp,24701235)~=0 then return end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetTargetRange(LOCATION_HAND+LOCATION_MZONE,0) - e1:SetCode(EFFECT_EXTRA_SUMMON_COUNT) - e1:SetTarget(aux.TargetBoolFunction(Card.IsType,TYPE_SPIRIT)) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) - Duel.RegisterFlagEffect(tp,24701235,RESET_PHASE+PHASE_END,0,1) -end -function c24701235.cfilter(c) - return c:IsFaceup() and c:IsType(TYPE_SPIRIT) -end -function c24701235.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c24701235.cfilter,tp,LOCATION_MZONE,0,1,nil) end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(1) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c24701235.operation(e,tp,eg,ep,ev,re,r,rp) - if not Duel.IsExistingMatchingCard(c24701235.cfilter,tp,LOCATION_MZONE,0,1,nil) then return end - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end diff --git a/script/c24707869.lua b/script/c24707869.lua deleted file mode 100644 index e00abce933..0000000000 --- a/script/c24707869.lua +++ /dev/null @@ -1,30 +0,0 @@ ---ブライト・フューチャー -function c24707869.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_DRAW) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c24707869.target) - e1:SetOperation(c24707869.activate) - c:RegisterEffect(e1) -end -function c24707869.filter(c) - return c:IsFaceup() and c:IsRace(RACE_PSYCHO) and c:IsAbleToGrave() -end -function c24707869.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and c24707869.filter(chkc) end - if chk==0 then return Duel.IsPlayerCanDraw(tp,1) - and Duel.IsExistingTarget(c24707869.filter,tp,LOCATION_REMOVED,0,2,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectTarget(tp,c24707869.filter,tp,LOCATION_REMOVED,0,2,2,nil) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c24707869.activate(e,tp,eg,ep,ev,re,r,rp) - local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) - if tg:GetCount()~=2 then return end - Duel.SendtoGrave(tg,REASON_EFFECT+REASON_RETURN) - Duel.BreakEffect() - Duel.Draw(tp,1,REASON_EFFECT) -end diff --git a/script/c24725825.lua b/script/c24725825.lua deleted file mode 100644 index 42114ef005..0000000000 --- a/script/c24725825.lua +++ /dev/null @@ -1,36 +0,0 @@ ---エレクトリック・ワーム -function c24725825.initial_effect(c) - --control - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(24725825,0)) - e1:SetCategory(CATEGORY_CONTROL) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND) - e1:SetCost(c24725825.cost) - e1:SetTarget(c24725825.target) - e1:SetOperation(c24725825.operation) - c:RegisterEffect(e1) -end -function c24725825.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD) -end -function c24725825.filter(c) - return c:IsFaceup() and c:IsRace(RACE_MACHINE+RACE_DRAGON) and c:IsControlerCanBeChanged() -end -function c24725825.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c24725825.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c24725825.filter,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) - local g=Duel.SelectTarget(tp,c24725825.filter,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0) -end -function c24725825.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsRace(RACE_MACHINE+RACE_DRAGON) then - if not Duel.GetControl(tc,tp,PHASE_END,1) and not tc:IsImmuneToEffect(e) and tc:IsAbleToChangeControler() then - Duel.Destroy(tc,REASON_EFFECT) - end - end -end diff --git a/script/c24731453.lua b/script/c24731453.lua deleted file mode 100644 index 57d315369f..0000000000 --- a/script/c24731453.lua +++ /dev/null @@ -1,55 +0,0 @@ ---除雪機関車ハッスル・ラッセル -function c24731453.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(24731453,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DESTROY+CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c24731453.spcon) - e1:SetTarget(c24731453.sptg) - e1:SetOperation(c24731453.spop) - c:RegisterEffect(e1) - --cannot special summon - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetRange(LOCATION_MZONE) - e2:SetTargetRange(1,0) - e2:SetTarget(c24731453.splimit) - c:RegisterEffect(e2) -end -function c24731453.splimit(e,c) - return c:GetRace()~=RACE_MACHINE -end -function c24731453.cfilter(c) - return c:GetSequence()<5 -end -function c24731453.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetAttacker():IsControler(1-tp) and Duel.GetAttackTarget()==nil - and Duel.IsExistingMatchingCard(c24731453.cfilter,tp,LOCATION_SZONE,0,1,nil) -end -function c24731453.filter(c) - return c:GetSequence()<5 and c:IsDestructable() -end -function c24731453.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - local g=Duel.GetMatchingGroup(c24731453.filter,tp,LOCATION_SZONE,0,nil) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c24731453.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then - local g=Duel.GetMatchingGroup(c24731453.filter,tp,LOCATION_SZONE,0,nil) - if g:GetCount()>0 then - Duel.BreakEffect() - local ct=Duel.Destroy(g,REASON_EFFECT) - Duel.Damage(1-tp,ct*200,REASON_EFFECT) - end - end -end diff --git a/script/c24838456.lua b/script/c24838456.lua deleted file mode 100644 index 7aea796d8d..0000000000 --- a/script/c24838456.lua +++ /dev/null @@ -1,48 +0,0 @@ ---虚無を呼ぶ呪文 -function c24838456.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_CHAINING) - e1:SetCondition(c24838456.condition) - e1:SetCost(c24838456.cost) - e1:SetTarget(c24838456.target) - e1:SetOperation(c24838456.activate) - c:RegisterEffect(e1) -end -function c24838456.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentChain()>=3 -end -function c24838456.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.PayLPCost(tp,math.floor(Duel.GetLP(tp)/2)) -end -function c24838456.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local ng=Group.CreateGroup() - local dg=Group.CreateGroup() - for i=1,ev do - local te=Duel.GetChainInfo(i,CHAININFO_TRIGGERING_EFFECT) - local tc=te:GetHandler() - ng:AddCard(tc) - if tc:IsDestructable() and tc:IsRelateToEffect(te) then - dg:AddCard(tc) - end - end - Duel.SetTargetCard(dg) - Duel.SetOperationInfo(0,CATEGORY_NEGATE,ng,ng:GetCount(),0,0) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,dg,dg:GetCount(),0,0) -end -function c24838456.activate(e,tp,eg,ep,ev,re,r,rp) - local dg=Group.CreateGroup() - for i=1,ev do - Duel.NegateActivation(i) - local te=Duel.GetChainInfo(i,CHAININFO_TRIGGERING_EFFECT) - local tc=te:GetHandler() - if tc:IsRelateToEffect(e) and tc:IsRelateToEffect(te) then - dg:AddCard(tc) - end - end - Duel.Destroy(dg,REASON_EFFECT) -end diff --git a/script/c24845628.lua b/script/c24845628.lua deleted file mode 100644 index 94dc6ba5b2..0000000000 --- a/script/c24845628.lua +++ /dev/null @@ -1,80 +0,0 @@ ---ダストンのモップ -function c24845628.initial_effect(c) - c:SetUniqueOnField(1,0,24845628) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c24845628.target) - e1:SetOperation(c24845628.operation) - c:RegisterEffect(e1) - --Equip limit - local e2=Effect.CreateEffect(c) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_EQUIP_LIMIT) - e2:SetValue(1) - c:RegisterEffect(e2) - -- - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_EQUIP) - e3:SetCode(EFFECT_UNRELEASABLE_SUM) - e3:SetValue(1) - c:RegisterEffect(e3) - local e4=e3:Clone() - e4:SetCode(EFFECT_UNRELEASABLE_NONSUM) - c:RegisterEffect(e4) - local e5=e3:Clone() - e5:SetCode(EFFECT_CANNOT_BE_FUSION_MATERIAL) - c:RegisterEffect(e5) - local e6=e3:Clone() - e6:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL) - c:RegisterEffect(e6) - local e7=e3:Clone() - e7:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL) - c:RegisterEffect(e7) - --search - local e7=Effect.CreateEffect(c) - e7:SetDescription(aux.Stringid(24845628,0)) - e7:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e7:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e7:SetCode(EVENT_TO_GRAVE) - e7:SetCondition(c24845628.thcon) - e7:SetTarget(c24845628.thtg) - e7:SetOperation(c24845628.thop) - c:RegisterEffect(e7) -end -function c24845628.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c24845628.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,e:GetHandler(),tc) - end -end -function c24845628.thcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return re and rp~=tp and c:IsReason(REASON_DESTROY) and c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_ONFIELD) -end -function c24845628.filter(c) - return c:IsSetCard(0x80) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() -end -function c24845628.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c24845628.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c24845628.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c24845628.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c24857466.lua b/script/c24857466.lua deleted file mode 100644 index 29fa2f3487..0000000000 --- a/script/c24857466.lua +++ /dev/null @@ -1,142 +0,0 @@ ---冥王竜ヴァンダルギオン -function c24857466.initial_effect(c) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_CHAIN_NEGATED) - e2:SetRange(LOCATION_HAND) - e2:SetOperation(c24857466.chop) - c:RegisterEffect(e2) - --special summon - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(24857466,0)) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_DELAY) - e3:SetCode(EVENT_CHAIN_END) - e3:SetRange(LOCATION_HAND) - e3:SetCondition(c24857466.hspcon) - e3:SetTarget(c24857466.hsptg) - e3:SetOperation(c24857466.hspop) - c:RegisterEffect(e3) - --spell:damage - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(24857466,1)) - e4:SetCategory(CATEGORY_DAMAGE) - e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e4:SetCode(24857466) - e4:SetCondition(c24857466.damcon) - e4:SetTarget(c24857466.damtg) - e4:SetOperation(c24857466.damop) - c:RegisterEffect(e4) - --trap:Destroy - local e5=Effect.CreateEffect(c) - e5:SetDescription(aux.Stringid(24857466,2)) - e5:SetCategory(CATEGORY_DESTROY) - e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e5:SetProperty(EFFECT_FLAG_CARD_TARGET) - e5:SetCode(24857466) - e5:SetCondition(c24857466.descon) - e5:SetTarget(c24857466.destg) - e5:SetOperation(c24857466.desop) - c:RegisterEffect(e5) - --monster:spsummon - local e6=Effect.CreateEffect(c) - e6:SetDescription(aux.Stringid(24857466,3)) - e6:SetCategory(CATEGORY_SPECIAL_SUMMON) - e6:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e6:SetProperty(EFFECT_FLAG_CARD_TARGET) - e6:SetCode(24857466) - e6:SetCondition(c24857466.spcon) - e6:SetTarget(c24857466.sptg) - e6:SetOperation(c24857466.spop) - c:RegisterEffect(e6) -end -function c24857466.chop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if rp==tp then return end - local de,dp=Duel.GetChainInfo(ev,CHAININFO_DISABLE_REASON,CHAININFO_DISABLE_PLAYER) - if de and dp==tp and de:GetHandler():IsType(TYPE_COUNTER) then - local ty=re:GetActiveType() - local flag=c:GetFlagEffectLabel(24857466) - if not flag then - c:RegisterFlagEffect(24857466,RESET_EVENT+0x1fe0000,0,0,ty) - e:SetLabelObject(de) - elseif de~=e:GetLabelObject() then - e:SetLabelObject(de) - c:SetFlagEffectLabel(24857466,ty) - else - c:SetFlagEffectLabel(24857466,bit.bor(flag,ty)) - end - end -end -function c24857466.hspcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local label=c:GetFlagEffectLabel(24857466) - if label~=nil and label~=0 then - e:SetLabel(label) - c:SetFlagEffectLabel(24857466,0) - return true - else return false end -end -function c24857466.hsptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetTargetParam(e:GetLabel()) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c24857466.hspop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then - local tpe=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM) - Duel.RaiseSingleEvent(c,24857466,e,0,0,tp,tpe) - end -end -function c24857466.damcon(e,tp,eg,ep,ev,re,r,rp) - return bit.band(ev,TYPE_SPELL)~=0 -end -function c24857466.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(1500) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,1500) -end -function c24857466.damop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end -function c24857466.descon(e,tp,eg,ep,ev,re,r,rp) - return bit.band(ev,TYPE_TRAP)~=0 -end -function c24857466.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() and chkc:IsDestructable() end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,0,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c24857466.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end -function c24857466.spcon(e,tp,eg,ep,ev,re,r,rp) - return bit.band(ev,TYPE_MONSTER)~=0 -end -function c24857466.spfilter(c,e,tp) - return c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c24857466.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c24857466.spfilter(chkc,e,tp) end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c24857466.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,g:GetCount(),0,0) -end -function c24857466.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c24861088.lua b/script/c24861088.lua deleted file mode 100644 index 6d42a7bd41..0000000000 --- a/script/c24861088.lua +++ /dev/null @@ -1,76 +0,0 @@ ---先史遺産ネブラ・ディスク -function c24861088.initial_effect(c) - --search - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(24861088,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetCountLimit(1,24861088) - e1:SetTarget(c24861088.target) - e1:SetOperation(c24861088.operation) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(24861088,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_GRAVE) - e2:SetCountLimit(1,24861088) - e2:SetCondition(c24861088.spcon) - e2:SetCost(c24861088.spcost) - e2:SetTarget(c24861088.sptg) - e2:SetOperation(c24861088.spop) - c:RegisterEffect(e2) - Duel.AddCustomActivityCounter(24861088,ACTIVITY_CHAIN,c24861088.chainfilter) -end -function c24861088.chainfilter(re,tp,cid) - return re:GetHandler():IsSetCard(0x70) -end -function c24861088.filter(c) - return c:IsSetCard(0x70) and not c:IsCode(24861088) and c:IsAbleToHand() -end -function c24861088.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c24861088.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c24861088.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c24861088.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end -function c24861088.cfilter(c) - return c:IsFacedown() or not c:IsSetCard(0x70) -end -function c24861088.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)>0 - and not Duel.IsExistingMatchingCard(c24861088.cfilter,tp,LOCATION_MZONE,0,1,nil) -end -function c24861088.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetCustomActivityCount(24861088,tp,ACTIVITY_CHAIN)==0 end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EFFECT_CANNOT_ACTIVATE) - e1:SetTargetRange(1,0) - e1:SetValue(c24861088.aclimit) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function c24861088.aclimit(e,re,tp) - return not re:GetHandler():IsSetCard(0x70) -end -function c24861088.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c24861088.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP_DEFENCE) - end -end diff --git a/script/c24874630.lua b/script/c24874630.lua deleted file mode 100644 index a87f291712..0000000000 --- a/script/c24874630.lua +++ /dev/null @@ -1,56 +0,0 @@ ---デビルズ・サンクチュアリ -function c24874630.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c24874630.target) - e1:SetOperation(c24874630.activate) - c:RegisterEffect(e1) -end -function c24874630.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsPlayerCanSpecialSummonMonster(tp,24874631,0,0x4011,0,0,1,RACE_FIEND,ATTRIBUTE_DARK) end - Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0) -end -function c24874630.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 - or not Duel.IsPlayerCanSpecialSummonMonster(tp,24874631,0,0x4011,0,0,1,RACE_FIEND,ATTRIBUTE_DARK) then return end - local token=Duel.CreateToken(tp,24874631) - Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000) - token:RegisterEffect(e1,true) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_REFLECT_BATTLE_DAMAGE) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetValue(1) - e2:SetReset(RESET_EVENT+0x1fe0000) - token:RegisterEffect(e2,true) - local e3=Effect.CreateEffect(e:GetHandler()) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e3:SetRange(LOCATION_MZONE) - e3:SetCode(EVENT_PHASE+PHASE_STANDBY) - e3:SetCountLimit(1) - e3:SetCondition(c24874630.descon) - e3:SetOperation(c24874630.desop) - e3:SetReset(RESET_EVENT+0x1fe0000) - token:RegisterEffect(e3,true) -end -function c24874630.descon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c24874630.desop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLP(tp)>1000 and Duel.SelectYesNo(tp,aux.Stringid(24874630,0)) then - Duel.PayLPCost(tp,1000) - else - Duel.Destroy(e:GetHandler(),REASON_RULE) - end -end diff --git a/script/c24903843.lua b/script/c24903843.lua deleted file mode 100644 index 307eb3c937..0000000000 --- a/script/c24903843.lua +++ /dev/null @@ -1,79 +0,0 @@ ---버제스토마 피카이아 -function c24903843.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c24903843.target) - e1:SetOperation(c24903843.activate) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_CHAINING) - e2:SetRange(LOCATION_GRAVE) - e2:SetCondition(c24903843.spcon) - e2:SetTarget(c24903843.sptg) - e2:SetOperation(c24903843.spop) - c:RegisterEffect(e2) -end -function c24903843.filter(c) - return c:IsSetCard(0xd4) and c:IsDiscardable(REASON_EFFECT) -end -function c24903843.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp,2) - and Duel.IsExistingMatchingCard(c24903843.filter,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2) -end -function c24903843.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.DiscardHand(tp,c24903843.filter,1,1,REASON_EFFECT+REASON_DISCARD,nil)~=0 then - Duel.BreakEffect() - Duel.Draw(tp,2,REASON_EFFECT) - end -end -function c24903843.spcon(e,tp,eg,ep,ev,re,r,rp) - return re:IsActiveType(TYPE_TRAP) and re:IsHasType(EFFECT_TYPE_ACTIVATE) -end -function c24903843.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:GetFlagEffect(24903843)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsPlayerCanSpecialSummonMonster(tp,24903843,0xd4,0x11,1200,0,2,RACE_AQUA,ATTRIBUTE_WATER) end - c:RegisterFlagEffect(24903843,RESET_CHAIN,0,1) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0) -end -function c24903843.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local c=e:GetHandler() - if c:IsRelateToEffect(e) - and Duel.IsPlayerCanSpecialSummonMonster(tp,24903843,0xd4,0x11,1200,0,2,RACE_AQUA,ATTRIBUTE_WATER) then - c:SetStatus(STATUS_NO_LEVEL,false) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CHANGE_TYPE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetValue(TYPE_NORMAL+TYPE_MONSTER) - e1:SetReset(RESET_EVENT+0x47c0000) - c:RegisterEffect(e1,true) - Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_IMMUNE_EFFECT) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetValue(c24903843.efilter) - e2:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e3:SetReset(RESET_EVENT+0x47e0000) - e3:SetValue(LOCATION_REMOVED) - c:RegisterEffect(e3,true) - end -end -function c24903843.efilter(e,re) - return re:IsActiveType(TYPE_MONSTER) -end diff --git a/script/c24919805.lua b/script/c24919805.lua deleted file mode 100644 index 0fe670bac2..0000000000 --- a/script/c24919805.lua +++ /dev/null @@ -1,69 +0,0 @@ ---無頼特急バトレイン -function c24919805.initial_effect(c) - --damage - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(24919805,0)) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCost(c24919805.damcost) - e1:SetTarget(c24919805.damtg) - e1:SetOperation(c24919805.damop) - c:RegisterEffect(e1) - --to grave - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetOperation(c24919805.regop) - c:RegisterEffect(e2) -end -function c24919805.damcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetCurrentPhase()==PHASE_MAIN1 end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_BP) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) - e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function c24919805.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(500) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,500) -end -function c24919805.damop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end -function c24919805.regop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(24919805,1)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetRange(LOCATION_GRAVE) - e1:SetCountLimit(1,24919805) - e1:SetTarget(c24919805.thtg) - e1:SetOperation(c24919805.thop) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - c:RegisterEffect(e1) -end -function c24919805.filter(c) - return c:GetLevel()==10 and c:IsRace(RACE_MACHINE) and c:IsAttribute(ATTRIBUTE_EARTH) and c:IsAbleToHand() -end -function c24919805.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c24919805.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c24919805.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c24919805.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c24920410.lua b/script/c24920410.lua deleted file mode 100644 index 6fb3e10ad5..0000000000 --- a/script/c24920410.lua +++ /dev/null @@ -1,57 +0,0 @@ ---オーバー・レンチ -function c24920410.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,24920410+EFFECT_COUNT_CODE_OATH) - e1:SetCondition(c24920410.condition) - e1:SetTarget(c24920410.target) - e1:SetOperation(c24920410.activate) - c:RegisterEffect(e1) -end -function c24920410.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end -function c24920410.filter(c) - return c:IsFaceup() and c:IsSetCard(0x58) -end -function c24920410.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c24920410.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c24920410.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c24920410.filter,tp,LOCATION_MZONE,0,1,1,nil) -end -function c24920410.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - local atk=tc:GetAttack()*2 - local def=tc:GetDefence()*2 - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(atk) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_SET_DEFENCE_FINAL) - e2:SetReset(RESET_EVENT+0x1fe0000) - e2:SetValue(def) - tc:RegisterEffect(e2) - local e3=Effect.CreateEffect(e:GetHandler()) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e3:SetCode(EVENT_PHASE+PHASE_END) - e3:SetRange(LOCATION_MZONE) - e3:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - e3:SetCountLimit(1) - e3:SetOperation(c24920410.retop) - tc:RegisterEffect(e3) - end -end -function c24920410.retop(e,tp,eg,ep,ev,re,r,rp) - Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT) -end diff --git a/script/c24943456.lua b/script/c24943456.lua deleted file mode 100644 index 759a94d93b..0000000000 --- a/script/c24943456.lua +++ /dev/null @@ -1,35 +0,0 @@ ---TG パワー・グラディエイター -function c24943456.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,nil,aux.NonTuner(Card.IsSetCard,0x27),1) - c:EnableReviveLimit() - --pierce - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_PIERCE) - c:RegisterEffect(e1) - --draw - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(24943456,0)) - e2:SetCategory(CATEGORY_DRAW) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetCode(EVENT_LEAVE_FIELD) - e2:SetCondition(c24943456.drcon) - e2:SetTarget(c24943456.drtg) - e2:SetOperation(c24943456.drop) - c:RegisterEffect(e2) -end -function c24943456.drcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) and e:GetHandler():IsReason(REASON_DESTROY) -end -function c24943456.drtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(1) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c24943456.drop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end diff --git a/script/c24996659.lua b/script/c24996659.lua deleted file mode 100644 index 6bbd291649..0000000000 --- a/script/c24996659.lua +++ /dev/null @@ -1,15 +0,0 @@ ---エレキーウィ -function c24996659.initial_effect(c) - --indes - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetTarget(c24996659.indtg) - e1:SetValue(1) - c:RegisterEffect(e1) -end -function c24996659.indtg(e,c) - return c:IsSetCard(0xe) and c==Duel.GetAttacker() -end diff --git a/script/c25005816.lua b/script/c25005816.lua deleted file mode 100644 index 71d31012f7..0000000000 --- a/script/c25005816.lua +++ /dev/null @@ -1,34 +0,0 @@ ---鼓舞 -function c25005816.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetCondition(c25005816.condition) - e1:SetTarget(c25005816.target) - e1:SetOperation(c25005816.activate) - c:RegisterEffect(e1) -end -function c25005816.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end -function c25005816.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,nil) -end -function c25005816.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - e1:SetValue(700) - tc:RegisterEffect(e1) - end -end diff --git a/script/c25034083.lua b/script/c25034083.lua deleted file mode 100644 index bc92469a2e..0000000000 --- a/script/c25034083.lua +++ /dev/null @@ -1,14 +0,0 @@ ---デコイロイド -function c25034083.initial_effect(c) - --cannot be battle target - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(0,LOCATION_MZONE) - e1:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET) - e1:SetValue(c25034083.atlimit) - c:RegisterEffect(e1) -end -function c25034083.atlimit(e,c) - return not c:IsCode(25034083) and c:IsFaceup() -end diff --git a/script/c2504891.lua b/script/c2504891.lua deleted file mode 100644 index 2c3af877ac..0000000000 --- a/script/c2504891.lua +++ /dev/null @@ -1,6 +0,0 @@ ---スカルビショップ -function c2504891.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcCode2(c,28725004,42431843,true,true) -end diff --git a/script/c25050038.lua b/script/c25050038.lua deleted file mode 100644 index d04a87181b..0000000000 --- a/script/c25050038.lua +++ /dev/null @@ -1,32 +0,0 @@ ---チェーン・ヒーリング -function c25050038.initial_effect(c) - --recover - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCategory(CATEGORY_RECOVER) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c25050038.rectg) - e1:SetOperation(c25050038.recop) - c:RegisterEffect(e1) -end -function c25050038.rectg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(500) - Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,500) -end -function c25050038.recop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Recover(p,d,REASON_EFFECT) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) then return end - local ct=Duel.GetCurrentChain() - if ct>3 then - c:CancelToGrave() - Duel.SendtoHand(c,nil,REASON_EFFECT) - elseif ct>1 then - c:CancelToGrave() - Duel.SendtoDeck(c,nil,2,REASON_EFFECT) - end -end diff --git a/script/c25067275.lua b/script/c25067275.lua deleted file mode 100644 index 055ca7b499..0000000000 --- a/script/c25067275.lua +++ /dev/null @@ -1,66 +0,0 @@ ---旗鼓堂々 -function c25067275.initial_effect(c) - --effect - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,25067275+EFFECT_COUNT_CODE_OATH) - e1:SetCost(c25067275.cost) - e1:SetTarget(c25067275.target) - e1:SetOperation(c25067275.operation) - c:RegisterEffect(e1) -end -function c25067275.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - --oath effects - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) - e1:SetTargetRange(1,0) - Duel.RegisterEffect(e1,tp) -end -function c25067275.tcfilter(tc,ec) - return tc:IsFaceup() and ec:CheckEquipTarget(tc) -end -function c25067275.ecfilter(c) - return c:IsType(TYPE_EQUIP) and Duel.IsExistingTarget(c25067275.tcfilter,0,LOCATION_MZONE,LOCATION_MZONE,1,nil,c) -end -function c25067275.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingTarget(c25067275.ecfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(25067275,0)) - local g=Duel.SelectTarget(tp,c25067275.ecfilter,tp,LOCATION_GRAVE,0,1,1,nil) - local ec=g:GetFirst() - e:SetLabelObject(ec) - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(25067275,1)) - Duel.SelectTarget(tp,c25067275.tcfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,ec:GetEquipTarget(),ec) - Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,ec,1,0,0) -end -function c25067275.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end - local ec=e:GetLabelObject() - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local tc=g:GetFirst() - if tc==ec then tc=g:GetNext() end - if ec:IsFaceup() and ec:IsRelateToEffect(e) then - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - Duel.Equip(tp,ec,tc) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetRange(LOCATION_SZONE) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetCountLimit(1) - e1:SetOperation(c25067275.desop) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - ec:RegisterEffect(e1) - end - end -end -function c25067275.desop(e,tp,eg,ep,ev,re,r,rp) - Duel.Destroy(e:GetHandler(),REASON_EFFECT) -end diff --git a/script/c25090294.lua b/script/c25090294.lua deleted file mode 100644 index 71a3e4528a..0000000000 --- a/script/c25090294.lua +++ /dev/null @@ -1,34 +0,0 @@ ---ブルーメンブラット -function c25090294.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c25090294.cost) - e1:SetTarget(c25090294.target) - e1:SetOperation(c25090294.activate) - c:RegisterEffect(e1) -end -function c25090294.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsCode,1,nil,62107981) end - local g=Duel.SelectReleaseGroup(tp,Card.IsCode,1,1,nil,62107981) - Duel.Release(g,REASON_COST) -end -function c25090294.filter(c,e,tp) - return c:IsCode(51085303) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) -end -function c25090294.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsExistingMatchingCard(c25090294.filter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) -end -function c25090294.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c25090294.filter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP) - g:GetFirst():CompleteProcedure() - end -end diff --git a/script/c25109950.lua b/script/c25109950.lua deleted file mode 100644 index 53c69600df..0000000000 --- a/script/c25109950.lua +++ /dev/null @@ -1,28 +0,0 @@ ---陽アイルの小剣士 -function c25109950.initial_effect(c) - --atkup - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(25109950,0)) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c25109950.atkcost) - e1:SetOperation(c25109950.atkop) - c:RegisterEffect(e1) -end -function c25109950.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,nil,1,e:GetHandler()) end - local g=Duel.SelectReleaseGroup(tp,nil,1,1,e:GetHandler()) - Duel.Release(g,REASON_COST) -end -function c25109950.atkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFaceup() and c:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(700) - e1:SetReset(RESET_EVENT+0x1ff0000+RESET_PHASE+PHASE_END) - c:RegisterEffect(e1) - end -end diff --git a/script/c2511717.lua b/script/c2511717.lua deleted file mode 100644 index 929c6d9604..0000000000 --- a/script/c2511717.lua +++ /dev/null @@ -1,44 +0,0 @@ ---真六武衆-カゲキ -function c2511717.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(2511717,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c2511717.sptg) - e1:SetOperation(c2511717.spop) - c:RegisterEffect(e1) - --atk - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetCondition(c2511717.atkcon) - e2:SetValue(1500) - c:RegisterEffect(e2) -end -function c2511717.filter(c,e,tp) - return c:IsLevelBelow(4) and c:IsSetCard(0x3d) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c2511717.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c2511717.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c2511717.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c2511717.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end -function c2511717.atkfilter(c) - return c:IsFaceup() and c:IsSetCard(0x3d) and c:GetCode()~=2511717 -end -function c2511717.atkcon(e) - local c=e:GetHandler() - return Duel.IsExistingMatchingCard(c2511717.atkfilter,c:GetControler(),LOCATION_MZONE,0,1,nil) -end diff --git a/script/c25119460.lua b/script/c25119460.lua deleted file mode 100644 index c286f94ea7..0000000000 --- a/script/c25119460.lua +++ /dev/null @@ -1,93 +0,0 @@ ---YZ-キャタピラー・ドラゴン -function c25119460.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcCode2(c,65622692,64500000,true,true) - --spsummon condition - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(c25119460.splimit) - c:RegisterEffect(e1) - --special summon rule - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_SPSUMMON_PROC) - e2:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e2:SetRange(LOCATION_EXTRA) - e2:SetCondition(c25119460.spcon) - e2:SetOperation(c25119460.spop) - c:RegisterEffect(e2) - --destroy - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(25119460,0)) - e3:SetCategory(CATEGORY_DESTROY) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetRange(LOCATION_MZONE) - e3:SetCost(c25119460.descost) - e3:SetTarget(c25119460.destg) - e3:SetOperation(c25119460.desop) - c:RegisterEffect(e3) -end -function c25119460.splimit(e,se,sp,st) - return not e:GetHandler():IsLocation(LOCATION_EXTRA+LOCATION_GRAVE) -end -function c25119460.spfilter(c,code) - return c:IsCode(code) and c:IsAbleToRemoveAsCost() -end -function c25119460.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ft<-1 then return false end - local g1=Duel.GetMatchingGroup(c25119460.spfilter,tp,LOCATION_ONFIELD,0,nil,65622692) - local g2=Duel.GetMatchingGroup(c25119460.spfilter,tp,LOCATION_ONFIELD,0,nil,64500000) - if g1:GetCount()==0 or g2:GetCount()==0 then return false end - if ft>0 then return true end - local f1=g1:FilterCount(Card.IsLocation,nil,LOCATION_MZONE) - local f2=g2:FilterCount(Card.IsLocation,nil,LOCATION_MZONE) - if ft==-1 then return f1>0 and f2>0 - else return f1>0 or f2>0 end -end -function c25119460.spop(e,tp,eg,ep,ev,re,r,rp,c) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - local g1=Duel.GetMatchingGroup(c25119460.spfilter,tp,LOCATION_ONFIELD,0,nil,65622692) - local g2=Duel.GetMatchingGroup(c25119460.spfilter,tp,LOCATION_ONFIELD,0,nil,64500000) - g1:Merge(g2) - local g=Group.CreateGroup() - local tc=nil - for i=1,2 do - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - if ft<=0 then - tc=g1:FilterSelect(tp,Card.IsLocation,1,1,nil,LOCATION_MZONE):GetFirst() - else - tc=g1:Select(tp,1,1,nil):GetFirst() - end - g:AddCard(tc) - g1:Remove(Card.IsCode,nil,tc:GetCode()) - ft=ft+1 - end - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c25119460.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) -end -function c25119460.filter(c) - return c:IsFacedown() and c:IsDestructable() -end -function c25119460.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c25119460.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c25119460.filter,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c25119460.filter,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c25119460.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFacedown() then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c25123082.lua b/script/c25123082.lua deleted file mode 100644 index 6c5f3238c0..0000000000 --- a/script/c25123082.lua +++ /dev/null @@ -1,65 +0,0 @@ ---ヒュグロの魔導書 -function c25123082.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,25123082+EFFECT_COUNT_CODE_OATH) - e1:SetTarget(c25123082.target) - e1:SetOperation(c25123082.activate) - c:RegisterEffect(e1) -end -function c25123082.filter(c) - return c:IsFaceup() and c:IsRace(RACE_SPELLCASTER) -end -function c25123082.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c25123082.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c25123082.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c25123082.filter,tp,LOCATION_MZONE,0,1,1,nil) -end -function c25123082.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() and not tc:IsImmuneToEffect(e) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - e1:SetValue(1000) - tc:RegisterEffect(e1) - tc:RegisterFlagEffect(25123082,RESET_EVENT+0x1220000+RESET_PHASE+PHASE_END,0,1) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetDescription(aux.Stringid(25123082,0)) - e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_BATTLE_DESTROYING) - e2:SetProperty(EFFECT_FLAG_DELAY) - e2:SetLabelObject(tc) - e2:SetCondition(c25123082.shcon) - e2:SetTarget(c25123082.shtg) - e2:SetOperation(c25123082.shop) - e2:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e2,tp) - end -end -function c25123082.shcon(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetLabelObject() - return eg:IsContains(tc) and tc:GetFlagEffect(25123082)~=0 -end -function c25123082.shfilter(c) - return c:IsSetCard(0x106e) and c:IsType(TYPE_SPELL) and c:IsAbleToHand() -end -function c25123082.shtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c25123082.shfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c25123082.shop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c25123082.shfilter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c25132288.lua b/script/c25132288.lua deleted file mode 100644 index 634a3215a4..0000000000 --- a/script/c25132288.lua +++ /dev/null @@ -1,53 +0,0 @@ ---ライトエンド・ドラゴン -function c25132288.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,nil,aux.NonTuner(Card.IsAttribute,ATTRIBUTE_LIGHT),1) - c:EnableReviveLimit() - --addown - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(25132288,0)) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c25132288.condition) - e1:SetTarget(c25132288.target) - e1:SetOperation(c25132288.operation) - c:RegisterEffect(e1) -end -function c25132288.condition(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=c:GetBattleTarget() - e:SetLabelObject(tc) - return tc and c:GetAttack()>=500 and c:GetDefence()>=500 and tc:IsFaceup() and (tc:GetAttack()>0 or tc:GetDefence()>0) -end -function c25132288.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - e:GetLabelObject():CreateEffectRelation(e) -end -function c25132288.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=e:GetLabelObject() - if c:IsRelateToEffect(e) and c:IsFaceup() and tc:IsRelateToEffect(e) and tc:IsFaceup() - and c:GetAttack()>=500 and c:GetDefence()>=500 then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_COPY_INHERIT) - e1:SetReset(RESET_EVENT+0x1ff0000) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(-500) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_UPDATE_DEFENCE) - c:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e3:SetCode(EFFECT_UPDATE_ATTACK) - e3:SetValue(-1500) - tc:RegisterEffect(e3) - local e4=e3:Clone() - e4:SetCode(EFFECT_UPDATE_DEFENCE) - tc:RegisterEffect(e4) - end -end diff --git a/script/c25148255.lua b/script/c25148255.lua deleted file mode 100644 index db7c4387c7..0000000000 --- a/script/c25148255.lua +++ /dev/null @@ -1,65 +0,0 @@ ---ジャンク・アンカー -function c25148255.initial_effect(c) - --synchro - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(25148255,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCost(c25148255.sccost) - e1:SetTarget(c25148255.sctg) - e1:SetOperation(c25148255.scop) - c:RegisterEffect(e1) - -- - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e2:SetCode(20932152) - c:RegisterEffect(e2) -end -function c25148255.sccost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST) -end -function c25148255.mfilter(c,e,tp,mc) - local mg=Group.FromCards(c,mc) - return c:IsSetCard(0x43) and not c:IsType(TYPE_TUNER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) - and Duel.IsExistingMatchingCard(c25148255.scfilter,tp,LOCATION_EXTRA,0,1,nil,mg) -end -function c25148255.scfilter(c,mg) - return c:IsSetCard(0x100) and c:IsSynchroSummonable(nil,mg) -end -function c25148255.sctg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c25148255.mfilter(chkc,e,tp,e:GetHandler()) end - if chk==0 then return Duel.IsPlayerCanSpecialSummonCount(tp,2) - and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c25148255.mfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SMATERIAL) - Duel.SelectTarget(tp,c25148255.mfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function c25148255.scop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 then return end - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if not tc:IsRelateToEffect(e) or Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)==0 then return end - if not c:IsRelateToEffect(e) then return end - local mg=Group.FromCards(c,tc) - local g=Duel.GetMatchingGroup(c25148255.scfilter,tp,LOCATION_EXTRA,0,nil,mg) - if g:GetCount()>0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=g:Select(tp,1,1,nil) - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_IGNORE_IMMUNE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) - e1:SetValue(LOCATION_REMOVED) - e1:SetReset(RESET_EVENT+0x47e0000) - c:RegisterEffect(e1,true) - local e2=e1:Clone() - tc:RegisterEffect(e2,true) - Duel.SynchroSummon(tp,sg:GetFirst(),nil,mg) - end -end diff --git a/script/c25163248.lua b/script/c25163248.lua deleted file mode 100644 index 3b6f78f0ec..0000000000 --- a/script/c25163248.lua +++ /dev/null @@ -1,12 +0,0 @@ ---先史遺産マヤン・マシーン -function c25163248.initial_effect(c) - --double tribute - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DOUBLE_TRIBUTE) - e1:SetValue(c25163248.condition) - c:RegisterEffect(e1) -end -function c25163248.condition(e,c) - return c:IsRace(RACE_MACHINE) -end diff --git a/script/c25165047.lua b/script/c25165047.lua deleted file mode 100644 index 400f22268f..0000000000 --- a/script/c25165047.lua +++ /dev/null @@ -1,58 +0,0 @@ ---ライフ・ストリーム・ドラゴン -function c25165047.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure2(c,nil,aux.FilterBoolFunction(Card.IsCode,2403771)) - c:EnableReviveLimit() - --change lp - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(25165047,0)) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(c25165047.lpcon) - e1:SetOperation(c25165047.lpop) - c:RegisterEffect(e1) - --damage reduce - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_CHANGE_DAMAGE) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetRange(LOCATION_MZONE) - e2:SetTargetRange(1,0) - e2:SetValue(c25165047.damval) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EFFECT_NO_EFFECT_DAMAGE) - c:RegisterEffect(e3) - --Destroy replace - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE) - e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e4:SetRange(LOCATION_MZONE) - e4:SetCode(EFFECT_DESTROY_REPLACE) - e4:SetTarget(c25165047.desreptg) - c:RegisterEffect(e4) -end -function c25165047.lpcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_SYNCHRO -end -function c25165047.lpop(e,tp,eg,ep,ev,re,r,rp) - Duel.SetLP(tp,4000) -end -function c25165047.damval(e,re,val,r,rp,rc) - if bit.band(r,REASON_EFFECT)~=0 then return 0 end - return val -end -function c25165047.repfilter(c) - return c:IsType(TYPE_EQUIP) and c:IsAbleToRemoveAsCost() -end -function c25165047.desreptg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return not c:IsReason(REASON_REPLACE) - and Duel.IsExistingMatchingCard(c25165047.repfilter,tp,LOCATION_GRAVE,0,1,nil) end - if Duel.SelectYesNo(tp,aux.Stringid(25165047,1)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c25165047.repfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) - return true - else return false end -end diff --git a/script/c25171661.lua b/script/c25171661.lua deleted file mode 100644 index b9a3503aec..0000000000 --- a/script/c25171661.lua +++ /dev/null @@ -1,14 +0,0 @@ ---インフェルニティ・ドワーフ -function c25171661.initial_effect(c) - --pierce - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_PIERCE) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetCondition(c25171661.condition) - c:RegisterEffect(e1) -end -function c25171661.condition(e) - return Duel.GetFieldGroupCount(e:GetHandler():GetControler(),LOCATION_HAND,0)==0 -end diff --git a/script/c25173686.lua b/script/c25173686.lua deleted file mode 100644 index 686f302366..0000000000 --- a/script/c25173686.lua +++ /dev/null @@ -1,31 +0,0 @@ ---ストレートフラッシュ -function c25173686.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_END_PHASE) - e1:SetCondition(c25173686.condition) - e1:SetTarget(c25173686.target) - e1:SetOperation(c25173686.activate) - c:RegisterEffect(e1) -end -function c25173686.condition(e,tp,eg,ep,ev,re,r,rp) - for i=0,4 do - if Duel.GetFieldCard(1-tp,LOCATION_SZONE,i)==nil then return false end - end - return true -end -function c25173686.filter(c) - return c:GetSequence()<5 and c:IsDestructable() -end -function c25173686.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c25173686.filter,tp,0,LOCATION_SZONE,1,nil) end - local sg=Duel.GetMatchingGroup(c25173686.filter,tp,0,LOCATION_SZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,sg:GetCount(),0,0) -end -function c25173686.activate(e,tp,eg,ep,ev,re,r,rp) - local sg=Duel.GetMatchingGroup(c25173686.filter,tp,0,LOCATION_SZONE,nil) - Duel.Destroy(sg,REASON_EFFECT) -end diff --git a/script/c25206027.lua b/script/c25206027.lua deleted file mode 100644 index 79ad9bdac5..0000000000 --- a/script/c25206027.lua +++ /dev/null @@ -1,31 +0,0 @@ ---異界の棘紫竜 -function c25206027.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(25206027,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP) - e1:SetRange(LOCATION_HAND) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCondition(c25206027.spcon) - e1:SetTarget(c25206027.sptg) - e1:SetOperation(c25206027.spop) - c:RegisterEffect(e1) -end -function c25206027.spfilter(c,tp) - return c:IsReason(REASON_DESTROY) and c:IsPreviousLocation(LOCATION_MZONE) and c:GetPreviousControler()==tp and c:IsType(TYPE_MONSTER) -end -function c25206027.spcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c25206027.spfilter,1,nil,tp) -end -function c25206027.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c25206027.spop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c2521011.lua b/script/c2521011.lua deleted file mode 100644 index d2f1e5d458..0000000000 --- a/script/c2521011.lua +++ /dev/null @@ -1,62 +0,0 @@ ---威炎星-ヒエンシャク -function c2521011.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c2521011.spcon) - e1:SetOperation(c2521011.spop) - c:RegisterEffect(e1) - --set - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(2521011,0)) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_SUMMON_SUCCESS) - e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e2:SetCountLimit(1,2521011) - e2:SetTarget(c2521011.settg) - e2:SetOperation(c2521011.setop) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e3) - --cannot be target - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_FIELD) - e4:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) - e4:SetRange(LOCATION_MZONE) - e4:SetTargetRange(LOCATION_MZONE,0) - e4:SetTarget(aux.TargetBoolFunction(Card.IsRace,RACE_BEASTWARRIOR)) - e4:SetValue(aux.tgoval) - c:RegisterEffect(e4) -end -function c2521011.spfilter(c) - return c:IsFaceup() and c:IsSetCard(0x7c) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToGraveAsCost() -end -function c2521011.spcon(e,c) - if c==nil then return true end - return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c2521011.spfilter,c:GetControler(),LOCATION_ONFIELD,0,3,nil) -end -function c2521011.spop(e,tp,eg,ep,ev,re,r,rp,c) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c2521011.spfilter,tp,LOCATION_ONFIELD,0,3,3,nil) - Duel.SendtoGrave(g,REASON_COST) -end -function c2521011.filter(c) - return c:IsSetCard(0x7c) and c:IsType(TYPE_TRAP) and c:IsSSetable() -end -function c2521011.settg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingMatchingCard(c2521011.filter,tp,LOCATION_DECK,0,1,nil) end -end -function c2521011.setop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) - local g=Duel.SelectMatchingCard(tp,c2521011.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SSet(tp,g:GetFirst()) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c25231813.lua b/script/c25231813.lua deleted file mode 100644 index ad6601959d..0000000000 --- a/script/c25231813.lua +++ /dev/null @@ -1,68 +0,0 @@ ---白銀の翼 -function c25231813.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c25231813.target) - e1:SetOperation(c25231813.operation) - c:RegisterEffect(e1) - --Equip limit - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_EQUIP_LIMIT) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetValue(c25231813.eqlimit) - c:RegisterEffect(e2) - -- - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_EQUIP) - e3:SetCode(EFFECT_DESTROY_REPLACE) - e3:SetCountLimit(2) - e3:SetTarget(c25231813.reptg1) - c:RegisterEffect(e3) - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_EQUIP) - e4:SetCode(EFFECT_DESTROY_REPLACE) - e4:SetTarget(c25231813.reptg2) - e4:SetOperation(c25231813.repop2) - c:RegisterEffect(e4) -end -function c25231813.eqlimit(e,c) - return c:IsLevelAbove(8) and c:IsRace(RACE_DRAGON) and c:IsType(TYPE_SYNCHRO) -end -function c25231813.filter(c) - return c:IsFaceup() and c:IsLevelAbove(8) and c:IsRace(RACE_DRAGON) and c:IsType(TYPE_SYNCHRO) -end -function c25231813.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c25231813.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c25231813.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c25231813.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c25231813.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,c,tc) - end -end -function c25231813.reptg1(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():GetEquipTarget():IsReason(REASON_BATTLE) end - return true -end -function c25231813.reptg2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():GetEquipTarget():IsReason(REASON_EFFECT) - and not e:GetHandler():IsStatus(STATUS_DESTROY_CONFIRMED) end - if Duel.SelectYesNo(tp,aux.Stringid(25231813,0)) then - e:GetHandler():SetStatus(STATUS_DESTROY_CONFIRMED,true) - return true - else return false end -end -function c25231813.repop2(e,tp,eg,ep,ev,re,r,rp,chk) - e:GetHandler():SetStatus(STATUS_DESTROY_CONFIRMED,false) - Duel.Destroy(e:GetHandler(),REASON_EFFECT+REASON_REPLACE) -end diff --git a/script/c25236056.lua b/script/c25236056.lua deleted file mode 100644 index b2891e5caa..0000000000 --- a/script/c25236056.lua +++ /dev/null @@ -1,4 +0,0 @@ ---レアメタル・ドラゴン -function c25236056.initial_effect(c) - c:EnableUnsummonable() -end diff --git a/script/c25244515.lua b/script/c25244515.lua deleted file mode 100644 index 054a24d9a1..0000000000 --- a/script/c25244515.lua +++ /dev/null @@ -1,97 +0,0 @@ ---妖仙獣 辻斬風 -function c25244515.initial_effect(c) - --atk up - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetRange(LOCATION_HAND) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetCountLimit(1,25244515) - e1:SetCondition(c25244515.condition) - e1:SetCost(c25244515.cost) - e1:SetOperation(c25244515.operation) - c:RegisterEffect(e1) - --atk up - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCountLimit(1,25244516) - e2:SetTarget(c25244515.atktg) - e2:SetOperation(c25244515.atkop) - c:RegisterEffect(e2) - --return - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e3:SetCode(EVENT_SUMMON_SUCCESS) - e3:SetOperation(c25244515.regop) - c:RegisterEffect(e3) -end -function c25244515.condition(e,tp,eg,ep,ev,re,r,rp) - local phase=Duel.GetCurrentPhase() - if phase~=PHASE_DAMAGE or Duel.IsDamageCalculated() then return false end - local tc=Duel.GetAttacker() - if tc:IsControler(1-tp) then tc=Duel.GetAttackTarget() end - e:SetLabelObject(tc) - return tc and tc:IsSetCard(0xb3) and tc:IsRelateToBattle() and Duel.GetAttackTarget()~=nil -end -function c25244515.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsDiscardable() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD) -end -function c25244515.operation(e,tp,eg,ep,ev,re,r,rp,chk) - local tc=e:GetLabelObject() - if tc:IsRelateToBattle() and tc:IsFaceup() and tc:IsControler(tp) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(1000) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - end -end -function c25244515.filter(c) - return c:IsFaceup() and c:IsSetCard(0xb3) -end -function c25244515.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c25244515.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c25244515.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c25244515.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) -end -function c25244515.atkop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetValue(1000) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - end -end -function c25244515.regop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetTarget(c25244515.rettg) - e1:SetOperation(c25244515.retop) - e1:SetReset(RESET_EVENT+0x1ec0000+RESET_PHASE+PHASE_END) - c:RegisterEffect(e1) -end -function c25244515.rettg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0) -end -function c25244515.retop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SendtoHand(c,nil,REASON_EFFECT) - end -end diff --git a/script/c25247218.lua b/script/c25247218.lua deleted file mode 100644 index 0f1b72982e..0000000000 --- a/script/c25247218.lua +++ /dev/null @@ -1,17 +0,0 @@ ---ビッグ・ピース・ゴーレム -function c25247218.initial_effect(c) - --summon with no tribute - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(25247218,0)) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SUMMON_PROC) - e1:SetCondition(c25247218.ntcon) - c:RegisterEffect(e1) -end -function c25247218.ntcon(e,c,minc) - if c==nil then return true end - return minc==0 and c:GetLevel()>4 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 - and Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0)==0 - and Duel.GetFieldGroupCount(c:GetControler(),0,LOCATION_MZONE)>0 -end diff --git a/script/c2525268.lua b/script/c2525268.lua deleted file mode 100644 index 028f368fa5..0000000000 --- a/script/c2525268.lua +++ /dev/null @@ -1,51 +0,0 @@ ---魔導騎士 ディフェンダー -function c2525268.initial_effect(c) - c:EnableCounterPermit(0x3001) - c:SetCounterLimit(0x3001,1) - --summon success - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(2525268,0)) - e1:SetCategory(CATEGORY_COUNTER) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c2525268.addct) - e1:SetOperation(c2525268.addc) - c:RegisterEffect(e1) - --destroy replace - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_DESTROY_REPLACE) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetTarget(c2525268.destg) - e2:SetValue(c2525268.value) - e2:SetOperation(c2525268.desop) - c:RegisterEffect(e2) -end -function c2525268.addct(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,1,0,0x3001) -end -function c2525268.addc(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - e:GetHandler():AddCounter(0x3001,1) - end -end -function c2525268.dfilter(c) - return c:IsLocation(LOCATION_MZONE) and c:IsFaceup() and c:IsRace(RACE_SPELLCASTER) -end -function c2525268.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local count=eg:FilterCount(c2525268.dfilter,nil) - e:SetLabel(count) - return count>0 and Duel.IsCanRemoveCounter(tp,1,0,0x3001,count,REASON_COST) - end - return Duel.SelectYesNo(tp,aux.Stringid(2525268,1)) -end -function c2525268.value(e,c) - return c:IsFaceup() and c:GetLocation()==LOCATION_MZONE and c:IsRace(RACE_SPELLCASTER) -end -function c2525268.desop(e,tp,eg,ep,ev,re,r,rp) - local count=e:GetLabel() - Duel.RemoveCounter(tp,1,0,0x3001,count,REASON_COST) -end diff --git a/script/c25259669.lua b/script/c25259669.lua deleted file mode 100644 index e4a4bc49fd..0000000000 --- a/script/c25259669.lua +++ /dev/null @@ -1,34 +0,0 @@ ---ゴブリンドバーグ -function c25259669.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(25259669,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_POSITION) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c25259669.sumtg) - e1:SetOperation(c25259669.sumop) - c:RegisterEffect(e1) -end -function c25259669.filter(c,e,tp) - return c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c25259669.sumtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c25259669.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c25259669.sumop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c25259669.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end - end - if c:IsRelateToEffect(e) and c:IsPosition(POS_FACEUP_ATTACK) then - Duel.BreakEffect() - Duel.ChangePosition(c,POS_FACEUP_DEFENCE) - end -end diff --git a/script/c25262697.lua b/script/c25262697.lua deleted file mode 100644 index 12ad398f9c..0000000000 --- a/script/c25262697.lua +++ /dev/null @@ -1,30 +0,0 @@ ---墓守の暗殺者 -function c25262697.initial_effect(c) - --pos - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(25262697,0)) - e1:SetCategory(CATEGORY_POSITION) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetCondition(c25262697.poscon) - e1:SetTarget(c25262697.postg) - e1:SetOperation(c25262697.posop) - c:RegisterEffect(e1) -end -function c25262697.poscon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsEnvironment(47355498) -end -function c25262697.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE) - local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0) -end -function c25262697.posop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) then - Duel.ChangePosition(tc,POS_FACEUP_DEFENCE,0,POS_FACEUP_ATTACK,0) - end -end diff --git a/script/c25280974.lua b/script/c25280974.lua deleted file mode 100644 index 5d2503e562..0000000000 --- a/script/c25280974.lua +++ /dev/null @@ -1,42 +0,0 @@ ---魔道化リジョン -function c25280974.initial_effect(c) - --extra summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_EXTRA_SUMMON_COUNT) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(LOCATION_HAND,0) - e1:SetTarget(aux.TargetBoolFunction(Card.IsRace,RACE_SPELLCASTER)) - e1:SetValue(0x1) - c:RegisterEffect(e1) - --tohand - local e2=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(25280974,0)) - e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetCountLimit(1,25280974) - e2:SetCondition(c25280974.thcon) - e2:SetTarget(c25280974.thtg) - e2:SetOperation(c25280974.thop) - c:RegisterEffect(e2) -end -function c25280974.thcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) -end -function c25280974.filter(c) - return c:IsType(TYPE_NORMAL) and c:IsRace(RACE_SPELLCASTER) and c:IsAbleToHand() and not c:IsHasEffect(EFFECT_NECRO_VALLEY) -end -function c25280974.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c25280974.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE) -end -function c25280974.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c25280974.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c25290459.lua b/script/c25290459.lua deleted file mode 100644 index fe483b743f..0000000000 --- a/script/c25290459.lua +++ /dev/null @@ -1,50 +0,0 @@ ---レベルアップ! -function c25290459.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c25290459.cost) - e1:SetTarget(c25290459.target) - e1:SetOperation(c25290459.activate) - c:RegisterEffect(e1) -end -function c25290459.costfilter(c,e,tp) - if not c:IsSetCard(0x41) or not c:IsAbleToGraveAsCost() or not c:IsFaceup() then return false end - local code=c:GetCode() - local class=_G["c"..code] - if class==nil or class.lvupcount==nil then return false end - return Duel.IsExistingMatchingCard(c25290459.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,class,e,tp) -end -function c25290459.spfilter(c,class,e,tp) - local code=c:GetCode() - for i=1,class.lvupcount do - if code==class.lvup[i] then return c:IsCanBeSpecialSummoned(e,0,tp,true,true) end - end - return false -end -function c25290459.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c25290459.costfilter,tp,LOCATION_MZONE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c25290459.costfilter,tp,LOCATION_MZONE,0,1,1,nil,e,tp) - Duel.SendtoGrave(g,REASON_COST) - e:SetLabel(g:GetFirst():GetCode()) -end -function c25290459.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) -end -function c25290459.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local code=e:GetLabel() - local class=_G["c"..code] - if class==nil or class.lvupcount==nil then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c25290459.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,class,e,tp) - local tc=g:GetFirst() - if tc then - Duel.SpecialSummon(tc,0,tp,tp,true,true,POS_FACEUP) - if tc:GetPreviousLocation()==LOCATION_DECK then Duel.ShuffleDeck(tp) end - end -end diff --git a/script/c25341652.lua b/script/c25341652.lua deleted file mode 100644 index 2b900444a8..0000000000 --- a/script/c25341652.lua +++ /dev/null @@ -1,69 +0,0 @@ ---交響魔人マエストローク -function c25341652.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,4,2) - c:EnableReviveLimit() - --pos - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(25341652,0)) - e1:SetCategory(CATEGORY_POSITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCost(c25341652.poscost) - e1:SetTarget(c25341652.postg) - e1:SetOperation(c25341652.posop) - c:RegisterEffect(e1) - --destroy replace - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EFFECT_DESTROY_REPLACE) - e2:SetRange(LOCATION_MZONE) - e2:SetTarget(c25341652.reptg) - e2:SetValue(c25341652.repval) - e2:SetOperation(c25341652.repop) - c:RegisterEffect(e2) -end -function c25341652.poscost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c25341652.posfilter(c) - return c:IsPosition(POS_FACEUP_ATTACK) and c:IsCanTurnSet() -end -function c25341652.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and c25341652.posfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c25341652.posfilter,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUPATTACK) - local g=Duel.SelectTarget(tp,c25341652.posfilter,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0) -end -function c25341652.posop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - Duel.ChangePosition(tc,POS_FACEDOWN_DEFENCE) - end -end -function c25341652.repfilter(c,tp) - return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) and c:IsSetCard(0x6d) and c:CheckRemoveOverlayCard(tp,1,REASON_EFFECT) -end -function c25341652.reptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return eg:IsExists(c25341652.repfilter,1,nil,tp) end - if Duel.SelectYesNo(tp,aux.Stringid(25341652,1)) then - local g=eg:Filter(c25341652.repfilter,nil,tp) - Duel.SetTargetCard(g) - return true - else return false end -end -function c25341652.repval(e,c) - return c25341652.repfilter(c,e:GetHandlerPlayer()) -end -function c25341652.repop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local tc=g:GetFirst() - while tc do - tc:RemoveOverlayCard(tp,1,1,REASON_EFFECT) - tc=g:GetNext() - end -end diff --git a/script/c25343017.lua b/script/c25343017.lua deleted file mode 100644 index dec827d38e..0000000000 --- a/script/c25343017.lua +++ /dev/null @@ -1,109 +0,0 @@ ---寡黙なるサイコプリースト -function c25343017.initial_effect(c) - --to defence - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(25343017,0)) - e1:SetCategory(CATEGORY_POSITION) - e1:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_SINGLE) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c25343017.potg) - e1:SetOperation(c25343017.poop) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - c:RegisterEffect(e2) - --remove - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(25343017,1)) - e3:SetCategory(CATEGORY_REMOVE) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1) - e3:SetCost(c25343017.rmcost) - e3:SetTarget(c25343017.rmtg) - e3:SetOperation(c25343017.rmop) - c:RegisterEffect(e3) - --special summon - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(25343017,2)) - e4:SetCategory(CATEGORY_SPECIAL_SUMMON) - e4:SetProperty(EFFECT_FLAG_CARD_TARGET) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e4:SetCode(EVENT_TO_GRAVE) - e4:SetCondition(c25343017.spcon) - e4:SetTarget(c25343017.sptg) - e4:SetOperation(c25343017.spop) - c:RegisterEffect(e4) - local ng=Group.CreateGroup() - ng:KeepAlive() - e4:SetLabelObject(ng) - e3:SetLabelObject(e4) -end -function c25343017.potg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAttackPos() end - Duel.SetOperationInfo(0,CATEGORY_POSITION,e:GetHandler(),1,0,0) -end -function c25343017.poop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFaceup() and c:IsAttackPos() and c:IsRelateToEffect(e) then - Duel.ChangePosition(c,POS_FACEUP_DEFENCE) - end -end -function c25343017.rmcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,Card.IsAbleToGraveAsCost,1,1,REASON_COST) -end -function c25343017.filter(c) - return c:IsRace(RACE_PSYCHO) and c:IsAbleToRemove() -end -function c25343017.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c25343017.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c25343017.filter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,c25343017.filter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) -end -function c25343017.rmop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - local c=e:GetHandler() - if tc:IsRelateToEffect(e) and Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)~=0 and c:IsRelateToEffect(e) then - tc:RegisterFlagEffect(25343017,RESET_EVENT+0x1fe0000,0,0) - e:GetLabelObject():SetLabel(1) - if c:GetFlagEffect(25343017)==0 then - c:RegisterFlagEffect(25343017,RESET_EVENT+0x1680000,0,0) - e:GetLabelObject():GetLabelObject():Clear() - end - e:GetLabelObject():GetLabelObject():AddCard(tc) - end -end -function c25343017.spcon(e,tp,eg,ep,ev,re,r,rp) - local rg=e:GetLabelObject() - local act=e:GetLabel() - e:SetLabel(0) - if act==1 and e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) - and e:GetHandler():GetFlagEffect(25343017) then return true - else rg:Clear() return false end -end -function c25343017.spfilter(c,e,tp) - return c:GetFlagEffect(25343017)~=0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c25343017.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local rg=e:GetLabelObject() - if chkc then return rg:IsContains(chkc) and c25343017.spfilter(chkc,e,tp) end - if chk==0 then - if rg:IsExists(c25343017.spfilter,1,nil,e,tp) then return true - else rg:Clear() return false end - end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=rg:FilterSelect(tp,c25343017.spfilter,1,1,nil,e,tp) - Duel.SetTargetCard(sg) - rg:Clear() - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,sg,1,0,0) -end -function c25343017.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c25343280.lua b/script/c25343280.lua deleted file mode 100644 index 06f1fc4711..0000000000 --- a/script/c25343280.lua +++ /dev/null @@ -1,39 +0,0 @@ ---スピリッツ・オブ・ファラオ -function c25343280.initial_effect(c) - c:EnableReviveLimit() - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - c:RegisterEffect(e1) - --Negate - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(25343280,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetTarget(c25343280.target) - e2:SetOperation(c25343280.operation) - c:RegisterEffect(e2) -end -function c25343280.spfilter(c,e,tp) - return c:IsType(TYPE_NORMAL) and c:IsLevelBelow(2) and c:IsRace(RACE_ZOMBIE) - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c25343280.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c25343280.spfilter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c25343280.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ft>4 then ft=4 end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c25343280.spfilter,tp,LOCATION_GRAVE,0,1,ft,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c25343280.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) - if Duel.GetLocationCount(tp,LOCATION_MZONE)0 - and Duel.IsExistingMatchingCard(c25373678.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c25373678.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c25373678.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c25377819.lua b/script/c25377819.lua deleted file mode 100644 index 71c7243ea8..0000000000 --- a/script/c25377819.lua +++ /dev/null @@ -1,26 +0,0 @@ ---召集の聖刻印 -function c25377819.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c25377819.target) - e1:SetOperation(c25377819.activate) - c:RegisterEffect(e1) -end -function c25377819.filter(c) - return c:IsSetCard(0x69) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() -end -function c25377819.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c25377819.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c25377819.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c25377819.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c25401880.lua b/script/c25401880.lua deleted file mode 100644 index 999a8921e5..0000000000 --- a/script/c25401880.lua +++ /dev/null @@ -1,35 +0,0 @@ ---サイコパス -function c25401880.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c25401880.cost) - e1:SetTarget(c25401880.target) - e1:SetOperation(c25401880.activate) - c:RegisterEffect(e1) -end -function c25401880.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,800) end - Duel.PayLPCost(tp,800) -end -function c25401880.filter(c) - return c:IsFaceup() and c:IsRace(RACE_PSYCHO) and c:IsAbleToHand() -end -function c25401880.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_REMOVED) and c25401880.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c25401880.filter,tp,LOCATION_REMOVED,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c25401880.filter,tp,LOCATION_REMOVED,0,1,2,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0) -end -function c25401880.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local sg=g:Filter(Card.IsRelateToEffect,nil,e) - if sg:GetCount()>0 then - Duel.SendtoHand(sg,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,sg) - end -end diff --git a/script/c25407406.lua b/script/c25407406.lua deleted file mode 100644 index 8960b131f4..0000000000 --- a/script/c25407406.lua +++ /dev/null @@ -1,71 +0,0 @@ ---剣闘獣の闘器グラディウス -function c25407406.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c25407406.target) - e1:SetOperation(c25407406.operation) - c:RegisterEffect(e1) - -- - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(300) - c:RegisterEffect(e2) - --Equip limit - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_EQUIP_LIMIT) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e3:SetValue(c25407406.eqlimit) - c:RegisterEffect(e3) - --tohand - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e4:SetCategory(CATEGORY_TOHAND) - e4:SetDescription(aux.Stringid(25407406,0)) - e4:SetCode(EVENT_TO_GRAVE) - e4:SetCondition(c25407406.retcon) - e4:SetTarget(c25407406.rettg) - e4:SetOperation(c25407406.retop) - c:RegisterEffect(e4) -end -function c25407406.eqlimit(e,c) - return c:IsSetCard(0x19) -end -function c25407406.filter(c) - return c:IsFaceup() and c:IsSetCard(0x19) -end -function c25407406.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:GetLocation()==LOCATION_MZONE and c25407406.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c25407406.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c25407406.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c25407406.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,c,tc) - end -end -function c25407406.retcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local ec=c:GetPreviousEquipTarget() - return c:IsReason(REASON_LOST_TARGET) and (ec:GetLocation()==LOCATION_DECK or ec:GetLocation()==LOCATION_EXTRA) -end -function c25407406.rettg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToHand() end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0) -end -function c25407406.retop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SendtoHand(c,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,c) - end -end diff --git a/script/c25407643.lua b/script/c25407643.lua deleted file mode 100644 index 1f1ad262d4..0000000000 --- a/script/c25407643.lua +++ /dev/null @@ -1,72 +0,0 @@ ---魔法族の聖域 -function c25407643.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_SZONE) - e2:SetCode(EFFECT_SELF_DESTROY) - e2:SetCondition(c25407643.descon) - c:RegisterEffect(e2) - -- - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(25407643,0)) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_SUMMON_SUCCESS) - e2:SetRange(LOCATION_SZONE) - e2:SetCondition(c25407643.condition) - e2:SetTarget(c25407643.target) - e2:SetOperation(c25407643.operation) - c:RegisterEffect(e2) - local e4=e2:Clone() - e4:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e4) -end -function c25407643.filter(c) - return c:IsFaceup() and c:IsRace(RACE_SPELLCASTER) -end -function c25407643.descon(e) - return not Duel.IsExistingMatchingCard(c25407643.filter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) -end -function c25407643.cfilter1(c) - return c:IsFaceup() and c:IsType(TYPE_SPELL) -end -function c25407643.cfilter2(c,tp) - return c:IsFaceup() and not c:IsRace(RACE_SPELLCASTER) and c:IsControler(tp) -end -function c25407643.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c25407643.cfilter1,tp,LOCATION_SZONE,0,1,e:GetHandler()) - and not Duel.IsExistingMatchingCard(c25407643.cfilter1,tp,0,LOCATION_SZONE,1,nil) - and eg:IsExists(c25407643.cfilter2,1,nil,1-tp) -end -function c25407643.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsRelateToEffect(e) end - Duel.SetTargetCard(eg) -end -function c25407643.operation(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - if not Duel.IsExistingMatchingCard(c25407643.cfilter1,tp,LOCATION_SZONE,0,1,e:GetHandler()) - or Duel.IsExistingMatchingCard(c25407643.cfilter1,tp,0,LOCATION_SZONE,1,nil) then return end - local tc=eg:GetFirst() - local c=e:GetHandler() - while tc do - if tc:IsRelateToEffect(e) and c25407643.cfilter2(tc,1-tp) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_CANNOT_TRIGGER) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e2) - end - tc=eg:GetNext() - end -end diff --git a/script/c2542230.lua b/script/c2542230.lua deleted file mode 100644 index 88f065e7b6..0000000000 --- a/script/c2542230.lua +++ /dev/null @@ -1,96 +0,0 @@ ---スカーレッド・コクーン -function c2542230.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c2542230.target) - e1:SetOperation(c2542230.activate) - c:RegisterEffect(e1) - --to grave - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetOperation(c2542230.regop) - c:RegisterEffect(e2) -end -function c2542230.filter(c) - return c:IsFaceup() and c:IsRace(RACE_DRAGON) and c:IsType(TYPE_SYNCHRO) -end -function c2542230.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c2542230.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c2542230.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c2542230.filter,tp,LOCATION_MZONE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c2542230.activate(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsLocation(LOCATION_SZONE) then return end - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,c,tc) - c:CancelToGrave() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetValue(c2542230.eqlimit) - e1:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_DISABLE) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(0,LOCATION_MZONE) - e2:SetCondition(c2542230.discon) - e2:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e2) - end -end -function c2542230.eqlimit(e,c) - return c:GetControler()==e:GetHandlerPlayer() or e:GetHandler():GetEquipTarget()==c -end -function c2542230.discon(e) - local ec=e:GetHandler():GetEquipTarget() - return Duel.GetAttacker()==ec or Duel.GetAttackTarget()==ec -end -function c2542230.regop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(2542230,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetRange(LOCATION_GRAVE) - e1:SetHintTiming(TIMING_END_PHASE) - e1:SetCountLimit(1) - e1:SetCondition(c2542230.spcon) - e1:SetTarget(c2542230.sptg) - e1:SetOperation(c2542230.spop) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - c:RegisterEffect(e1) -end -function c2542230.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()==PHASE_END -end -function c2542230.spfilter(c,e,tp) - return c:IsCode(70902743) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c2542230.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c2542230.spfilter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c2542230.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c2542230.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c2542230.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c25435080.lua b/script/c25435080.lua deleted file mode 100644 index c31d975bb1..0000000000 --- a/script/c25435080.lua +++ /dev/null @@ -1,53 +0,0 @@ ---BF-アンカー -function c25435080.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetCondition(c25435080.condition) - e1:SetCost(c25435080.cost) - e1:SetTarget(c25435080.target) - e1:SetOperation(c25435080.activate) - e1:SetLabel(0) - c:RegisterEffect(e1) -end -function c25435080.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end -function c25435080.cfilter(c,tp) - return c:IsSetCard(0x33) and Duel.IsExistingTarget(c25435080.tfilter,tp,LOCATION_MZONE,0,1,c) -end -function c25435080.tfilter(c) - return c:IsFaceup() and c:IsType(TYPE_SYNCHRO) -end -function c25435080.cost(e,tp,eg,ep,ev,re,r,rp) - e:SetLabel(1) - return true -end -function c25435080.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c25435080.tfilter(chkc) end - if chk==0 then - if e:GetLabel()~=1 then return false end - e:SetLabel(0) - return Duel.CheckReleaseGroup(tp,c25435080.cfilter,1,nil,tp) - end - local rg=Duel.SelectReleaseGroup(tp,c25435080.cfilter,1,1,nil,tp) - e:SetLabel(rg:GetFirst():GetAttack()) - Duel.Release(rg,REASON_COST) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c25435080.tfilter,tp,LOCATION_MZONE,0,1,1,nil) -end -function c25435080.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(e:GetLabel()) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - end -end diff --git a/script/c25460258.lua b/script/c25460258.lua deleted file mode 100644 index f982c8162a..0000000000 --- a/script/c25460258.lua +++ /dev/null @@ -1,68 +0,0 @@ ---ダークフレア・ドラゴン -function c25460258.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c25460258.spcon) - e1:SetOperation(c25460258.spop) - c:RegisterEffect(e1) - --remove - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(25460258,0)) - e2:SetCategory(CATEGORY_REMOVE) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCost(c25460258.rmcost) - e2:SetTarget(c25460258.rmtg) - e2:SetOperation(c25460258.rmop) - c:RegisterEffect(e2) -end -function c25460258.spfilter(c,att) - return c:IsAttribute(att) and c:IsAbleToRemoveAsCost() -end -function c25460258.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c25460258.spfilter,tp,LOCATION_GRAVE,0,1,nil,ATTRIBUTE_LIGHT) - and Duel.IsExistingMatchingCard(c25460258.spfilter,tp,LOCATION_GRAVE,0,1,nil,ATTRIBUTE_DARK) -end -function c25460258.spop(e,tp,eg,ep,ev,re,r,rp,c) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g1=Duel.SelectMatchingCard(tp,c25460258.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,ATTRIBUTE_LIGHT) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g2=Duel.SelectMatchingCard(tp,c25460258.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,ATTRIBUTE_DARK) - g1:Merge(g2) - Duel.Remove(g1,POS_FACEUP,REASON_COST) -end -function c25460258.cfilter(c) - return c:IsRace(RACE_DRAGON) and c:IsAbleToGraveAsCost() -end -function c25460258.rmcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c25460258.cfilter,tp,LOCATION_HAND,0,1,nil) - and Duel.IsExistingMatchingCard(c25460258.cfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g1=Duel.SelectMatchingCard(tp,c25460258.cfilter,tp,LOCATION_HAND,0,1,1,nil) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g2=Duel.SelectMatchingCard(tp,c25460258.cfilter,tp,LOCATION_DECK,0,1,1,nil) - g1:Merge(g2) - Duel.SendtoGrave(g1,REASON_COST) -end -function c25460258.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsAbleToRemove() end - if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) -end -function c25460258.rmop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) - end -end diff --git a/script/c25484449.lua b/script/c25484449.lua deleted file mode 100644 index 82b5e2f586..0000000000 --- a/script/c25484449.lua +++ /dev/null @@ -1,64 +0,0 @@ ---ゼンマイシャーク -function c25484449.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(25484449,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetRange(LOCATION_HAND) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetCondition(c25484449.spcon) - e1:SetTarget(c25484449.sptg) - e1:SetOperation(c25484449.spop) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e2) - --lv change - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(25484449,1)) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1) - e3:SetTarget(c25484449.lvtg) - e3:SetOperation(c25484449.lvop) - c:RegisterEffect(e3) -end -function c25484449.cfilter(c,tp) - return c:IsFaceup() and c:IsControler(tp) and c:IsSetCard(0x58) -end -function c25484449.spcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c25484449.cfilter,1,nil,tp) -end -function c25484449.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c25484449.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) - end -end -function c25484449.lvtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,550) - local op=Duel.SelectOption(tp,aux.Stringid(25484449,2),aux.Stringid(25484449,3)) - e:SetLabel(op) -end -function c25484449.lvop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFaceup() and c:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_LEVEL) - if e:GetLabel()==0 then - e1:SetValue(1) - else - e1:SetValue(-1) - end - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - c:RegisterEffect(e1) - end -end diff --git a/script/c25518020.lua b/script/c25518020.lua deleted file mode 100644 index 447bb51518..0000000000 --- a/script/c25518020.lua +++ /dev/null @@ -1,68 +0,0 @@ ---マシン・デベロッパー -function c25518020.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --atk up - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e2:SetTarget(aux.TargetBoolFunction(Card.IsRace,RACE_MACHINE)) - e2:SetValue(200) - c:RegisterEffect(e2) - --add counter - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e3:SetProperty(EFFECT_FLAG_DELAY) - e3:SetRange(LOCATION_SZONE) - e3:SetCode(EVENT_DESTROYED) - e3:SetCondition(c25518020.ctcon) - e3:SetOperation(c25518020.ctop) - c:RegisterEffect(e3) - --special summon - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(25518020,0)) - e4:SetCategory(CATEGORY_SPECIAL_SUMMON) - e4:SetProperty(EFFECT_FLAG_CARD_TARGET) - e4:SetType(EFFECT_TYPE_IGNITION) - e4:SetRange(LOCATION_SZONE) - e4:SetCost(c25518020.spcost) - e4:SetTarget(c25518020.sptg) - e4:SetOperation(c25518020.spop) - c:RegisterEffect(e4) -end -function c25518020.ctfilter(c) - return c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP) and bit.band(c:GetPreviousRaceOnField(),RACE_MACHINE)~=0 -end -function c25518020.ctcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c25518020.ctfilter,1,nil) -end -function c25518020.ctop(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():AddCounter(0x1d,2) -end -function c25518020.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - e:SetLabel(e:GetHandler():GetCounter(0x1d)) - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end -function c25518020.filter(c,e,tp,lv) - return c:IsLevelBelow(lv) and c:IsRace(RACE_MACHINE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c25518020.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c25518020.filter(chkc,e,tp,e:GetLabel()) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c25518020.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp,e:GetHandler():GetCounter(0x1d)) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c25518020.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp,e:GetLabel()) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c25518020.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c25524823.lua b/script/c25524823.lua deleted file mode 100644 index b1f2cc6799..0000000000 --- a/script/c25524823.lua +++ /dev/null @@ -1,163 +0,0 @@ ---墓守の審神者 -function c25524823.initial_effect(c) - --summon with 3 tribute - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(25524823,0)) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SUMMON_PROC) - e1:SetCondition(c25524823.ttcon) - e1:SetOperation(c25524823.ttop) - e1:SetValue(SUMMON_TYPE_ADVANCE) - c:RegisterEffect(e1) - --summon with 1 tribute - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(25524823,1)) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_SUMMON_PROC) - e2:SetCondition(c25524823.otcon) - e2:SetOperation(c25524823.otop) - e2:SetValue(SUMMON_TYPE_ADVANCE) - c:RegisterEffect(e2) - --summon success - local e3=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(25524823,6)) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_SUMMON_SUCCESS) - e3:SetCondition(c25524823.condition) - e3:SetTarget(c25524823.target) - e3:SetOperation(c25524823.operation) - c:RegisterEffect(e3) - --tribute check - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetCode(EFFECT_MATERIAL_CHECK) - e4:SetValue(c25524823.valcheck) - c:RegisterEffect(e4) - e3:SetLabelObject(e4) - e4:SetLabelObject(e3) -end -function c25524823.ttcon(e,c) - if c==nil then return true end - return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-3 and Duel.GetTributeCount(c)>=3 -end -function c25524823.ttop(e,tp,eg,ep,ev,re,r,rp,c) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) - local g=Duel.SelectTribute(tp,c,3,3) - c:SetMaterial(g) - Duel.Release(g,REASON_SUMMON+REASON_MATERIAL) -end -function c25524823.otfilter(c,tp) - return c:IsSetCard(0x2e) and (c:IsControler(tp) or c:IsFaceup()) -end -function c25524823.otcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - local mg=Duel.GetMatchingGroup(c25524823.otfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp) - return c:GetLevel()>6 and Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.GetTributeCount(c,mg)>0 -end -function c25524823.otop(e,tp,eg,ep,ev,re,r,rp,c) - local mg=Duel.GetMatchingGroup(c25524823.otfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp) - local sg=Duel.SelectTribute(tp,c,1,1,mg) - c:SetMaterial(sg) - Duel.Release(sg,REASON_SUMMON+REASON_MATERIAL) -end -function c25524823.valcheck(e,c) - local g=c:GetMaterial() - local ct=g:FilterCount(Card.IsSetCard,nil,0x2e) - local lv=0 - local tc=g:GetFirst() - while tc do - lv=lv+tc:GetLevel() - tc=g:GetNext() - end - e:SetLabel(lv) - e:GetLabelObject():SetLabel(ct) -end -function c25524823.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_ADVANCE -end -function c25524823.filter(c) - return c:IsFacedown() and c:IsDestructable() -end -function c25524823.target(e,tp,eg,ep,ev,re,r,rp,chk) - local ct=e:GetLabel() - local b1=e:GetLabelObject():GetLabel()>0 - local b2=Duel.IsExistingMatchingCard(c25524823.filter,tp,0,LOCATION_MZONE,1,nil) - local b3=Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) - if chk==0 then return ct>0 and (b1 or b2 or b3) end - local sel=0 - local off=0 - repeat - local ops={} - local opval={} - off=1 - if b1 then - ops[off]=aux.Stringid(25524823,2) - opval[off-1]=1 - off=off+1 - end - if b2 then - ops[off]=aux.Stringid(25524823,3) - opval[off-1]=2 - off=off+1 - end - if b3 then - ops[off]=aux.Stringid(25524823,4) - opval[off-1]=3 - off=off+1 - end - local op=Duel.SelectOption(tp,table.unpack(ops)) - if opval[op]==1 then - sel=sel+1 - b1=false - elseif opval[op]==2 then - sel=sel+2 - b2=false - else - sel=sel+4 - b3=false - end - ct=ct-1 - until ct==0 or off<3 or not Duel.SelectYesNo(tp,aux.Stringid(25524823,5)) - e:SetLabel(sel) - if bit.band(sel,2)~=0 then - local g=Duel.GetMatchingGroup(c25524823.filter,tp,0,LOCATION_MZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) - end -end -function c25524823.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local sel=e:GetLabel() - if bit.band(sel,1)~=0 and c:IsFaceup() and c:IsRelateToEffect(e) then - local lv=e:GetLabelObject():GetLabel() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(lv*100) - e1:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e1) - end - if bit.band(sel,2)~=0 then - local g=Duel.GetMatchingGroup(c25524823.filter,tp,0,LOCATION_MZONE,nil) - Duel.Destroy(g,REASON_EFFECT) - end - if bit.band(sel,4)~=0 then - local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil) - local tc=g:GetFirst() - while tc do - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(-2000) - tc:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_UPDATE_DEFENCE) - tc:RegisterEffect(e2) - tc=g:GetNext() - end - end -end diff --git a/script/c25531465.lua b/script/c25531465.lua deleted file mode 100644 index 4186e5179c..0000000000 --- a/script/c25531465.lua +++ /dev/null @@ -1,34 +0,0 @@ ---マジキャット -function c25531465.initial_effect(c) - --todeck - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(25531465,0)) - e1:SetCategory(CATEGORY_TODECK) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_BE_MATERIAL) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) - e1:SetCondition(c25531465.tdcon) - e1:SetTarget(c25531465.tdtg) - e1:SetOperation(c25531465.tdop) - c:RegisterEffect(e1) -end -function c25531465.tdcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsLocation(LOCATION_GRAVE) and r==REASON_SYNCHRO - and e:GetHandler():GetReasonCard():IsRace(RACE_SPELLCASTER) -end -function c25531465.filter(c) - return c:IsType(TYPE_SPELL) and c:IsAbleToDeck() -end -function c25531465.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c25531465.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c25531465.filter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectTarget(tp,c25531465.filter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0) -end -function c25531465.tdop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoDeck(tc,nil,0,REASON_EFFECT) - end -end diff --git a/script/c25551951.lua b/script/c25551951.lua deleted file mode 100644 index 9a059d3663..0000000000 --- a/script/c25551951.lua +++ /dev/null @@ -1,29 +0,0 @@ ---ブローバック・ドラゴン -function c25551951.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(25551951,0)) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_COIN) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetTarget(c25551951.destg) - e1:SetOperation(c25551951.desop) - c:RegisterEffect(e1) -end -function c25551951.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and chkc:IsDestructable() end - if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,0,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,0,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_COIN,nil,0,tp,3) -end -function c25551951.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - local c1,c2,c3=Duel.TossCoin(tp,3) - if c1+c2+c3<2 then return end - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c25573054.lua b/script/c25573054.lua deleted file mode 100644 index 771dc5eac0..0000000000 --- a/script/c25573054.lua +++ /dev/null @@ -1,82 +0,0 @@ ---進化する翼 -function c25573054.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_BATTLE_START) - e1:SetCost(c25573054.cost) - e1:SetTarget(c25573054.target) - e1:SetOperation(c25573054.activate) - c:RegisterEffect(e1) -end -function c25573054.tgfilter(c) - return c:IsCode(57116033) and c:IsAbleToGraveAsCost() -end -function c25573054.spfilter(c,e,tp) - return c:IsCode(98585345) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) -end -function c25573054.cost(e,tp,eg,ep,ev,re,r,rp,chk) - local sg=Duel.GetMatchingGroup(c25573054.spfilter,tp,LOCATION_DECK+LOCATION_HAND,0,nil,e,tp) - local hg=Duel.GetMatchingGroup(Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,e:GetHandler()) - if chk==0 then - if sg:GetCount()==0 then return false end - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ft<-1 then return false end - if ft==0 then - if not Duel.IsExistingMatchingCard(c25573054.tgfilter,tp,LOCATION_MZONE,0,1,nil) then return false end - else - if not Duel.IsExistingMatchingCard(c25573054.tgfilter,tp,LOCATION_ONFIELD,0,1,nil) then return false end - end - if sg:IsExists(Card.IsLocation,1,nil,LOCATION_DECK) then - return hg:GetCount()>1 - else - return hg:GetCount()>2 - end - end - local cg=nil - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ft==0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - cg=Duel.SelectMatchingCard(tp,c25573054.tgfilter,tp,LOCATION_MZONE,0,1,1,nil) - else - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - cg=Duel.SelectMatchingCard(tp,c25573054.tgfilter,tp,LOCATION_ONFIELD,0,1,1,nil) - end - local ct=sg:GetCount() - if ct>2 or sg:IsExists(Card.IsLocation,1,nil,LOCATION_DECK) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=hg:Select(tp,2,2,nil) - cg:Merge(g) - elseif ct==1 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=hg:Select(tp,2,2,sg:GetFirst()) - cg:Merge(g) - else - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g1=hg:Select(tp,1,1,nil) - if sg:IsContains(g1:GetFirst()) then - hg:Sub(sg) - end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g2=hg:Select(tp,1,1,g1:GetFirst()) - cg:Merge(g1) - cg:Merge(g2) - end - Duel.SendtoGrave(cg,REASON_COST) -end -function c25573054.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,LOCATION_DECK+LOCATION_HAND) -end -function c25573054.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c25573054.spfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil,e,tp) - local tc=g:GetFirst() - if tc then - Duel.SpecialSummon(tc,0,tp,tp,true,false,POS_FACEUP) - tc:CompleteProcedure() - end -end diff --git a/script/c25578802.lua b/script/c25578802.lua deleted file mode 100644 index 168b41a4c7..0000000000 --- a/script/c25578802.lua +++ /dev/null @@ -1,40 +0,0 @@ ---ツーマンセルバトル -function c25578802.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --release - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(25578802,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetRange(LOCATION_SZONE) - e2:SetProperty(EFFECT_FLAG_BOTH_SIDE) - e2:SetCode(EVENT_PHASE+PHASE_END) - e2:SetCountLimit(1) - e2:SetCondition(c25578802.condition) - e2:SetTarget(c25578802.target) - e2:SetOperation(c25578802.operation) - c:RegisterEffect(e2) -end -function c25578802.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c25578802.spfilter(c,e,tp) - return c:IsType(TYPE_NORMAL) and c:GetLevel()==4 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c25578802.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c25578802.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c25578802.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c25578802.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c255998.lua b/script/c255998.lua deleted file mode 100644 index ba6e5e6939..0000000000 --- a/script/c255998.lua +++ /dev/null @@ -1,41 +0,0 @@ ---ラピッド・ウォリアー -function c255998.initial_effect(c) - --atkup - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(255998,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c255998.condition) - e1:SetCost(c255998.cost) - e1:SetOperation(c255998.operation) - c:RegisterEffect(e1) -end -function c255998.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsAbleToEnterBP() and not e:GetHandler():IsHasEffect(EFFECT_DIRECT_ATTACK) -end -function c255998.ftarget(e,c) - return e:GetLabel()~=c:GetFieldID() -end -function c255998.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetProperty(EFFECT_FLAG_OATH) - e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetTarget(c255998.ftarget) - e1:SetLabel(e:GetHandler():GetFieldID()) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function c255998.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFaceup() and c:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DIRECT_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - c:RegisterEffect(e1) - end -end diff --git a/script/c2561846.lua b/script/c2561846.lua deleted file mode 100644 index c8bdf2bd73..0000000000 --- a/script/c2561846.lua +++ /dev/null @@ -1,25 +0,0 @@ ---侵食細胞「A」 -function c2561846.initial_effect(c) - --counter - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_COUNTER) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c2561846.target) - e1:SetOperation(c2561846.operation) - c:RegisterEffect(e1) -end -function c2561846.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_COUNTER,g,1,0xe,1) -end -function c2561846.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - tc:AddCounter(0xe,1) - end -end diff --git a/script/c25642998.lua b/script/c25642998.lua deleted file mode 100644 index 40fa4e9721..0000000000 --- a/script/c25642998.lua +++ /dev/null @@ -1,38 +0,0 @@ ---ポセイドン・ウェーブ -function c25642998.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetCondition(c25642998.condition) - e1:SetTarget(c25642998.target) - e1:SetOperation(c25642998.activate) - c:RegisterEffect(e1) -end -function c25642998.condition(e,tp,eg,ep,ev,re,r,rp) - return tp~=Duel.GetTurnPlayer() -end -function c25642998.dfilter(c) - return c:IsFaceup() and c:IsRace(RACE_FISH+RACE_SEASERPENT+RACE_AQUA) -end -function c25642998.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local tg=Duel.GetAttacker() - if chkc then return chkc==tg end - if chk==0 then return tg:IsOnField() and tg:IsCanBeEffectTarget(e) end - Duel.SetTargetCard(tg) - local dam=Duel.GetMatchingGroupCount(c25642998.dfilter,tp,LOCATION_MZONE,0,nil)*800 - if dam>0 then - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,dam) - end -end -function c25642998.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.NegateAttack() then - local dam=Duel.GetMatchingGroupCount(c25642998.dfilter,tp,LOCATION_MZONE,0,nil)*800 - if dam>0 then - Duel.Damage(1-tp,dam,REASON_EFFECT) - end - end -end diff --git a/script/c25652655.lua b/script/c25652655.lua deleted file mode 100644 index 33047a6517..0000000000 --- a/script/c25652655.lua +++ /dev/null @@ -1,30 +0,0 @@ ---チェンジ・シンクロン -function c25652655.initial_effect(c) - --position - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(25652655,0)) - e1:SetCategory(CATEGORY_POSITION) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_BE_MATERIAL) - e1:SetCondition(c25652655.condition) - e1:SetTarget(c25652655.target) - e1:SetOperation(c25652655.operation) - c:RegisterEffect(e1) -end -function c25652655.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsLocation(LOCATION_GRAVE) and r==REASON_SYNCHRO -end -function c25652655.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE) - local g=Duel.SelectTarget(tp,nil,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_POSITION,g,g:GetCount(),0,0) -end -function c25652655.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.ChangePosition(tc,POS_FACEUP_DEFENCE,POS_FACEDOWN_DEFENCE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK) - end -end diff --git a/script/c25654671.lua b/script/c25654671.lua deleted file mode 100644 index c5d2f9b9ff..0000000000 --- a/script/c25654671.lua +++ /dev/null @@ -1,13 +0,0 @@ ---ナチュル・スパイダーファング -function c25654671.initial_effect(c) - --atk limit - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE) - e1:SetCondition(c25654671.atkcon) - c:RegisterEffect(e1) - Duel.AddCustomActivityCounter(25654671,ACTIVITY_CHAIN,aux.FALSE) -end -function c25654671.atkcon(e) - return Duel.GetCustomActivityCount(25654671,1-e:GetHandlerPlayer(),ACTIVITY_CHAIN)==0 -end diff --git a/script/c25655502.lua b/script/c25655502.lua deleted file mode 100644 index 8d5846cc40..0000000000 --- a/script/c25655502.lua +++ /dev/null @@ -1,6 +0,0 @@ ---デビル・ボックス -function c25655502.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcCode2(c,93889755,13215230,true,true) -end diff --git a/script/c25682811.lua b/script/c25682811.lua deleted file mode 100644 index 3ab02a1708..0000000000 --- a/script/c25682811.lua +++ /dev/null @@ -1,66 +0,0 @@ ---ドラグニティナイト-バルーチャ -function c25682811.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsRace,RACE_DRAGON),aux.NonTuner(Card.IsRace,RACE_WINDBEAST),1) - c:EnableReviveLimit() - --equip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(25682811,0)) - e1:SetCategory(CATEGORY_LEAVE_GRAVE+CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCondition(c25682811.eqcon) - e1:SetTarget(c25682811.eqtg) - e1:SetOperation(c25682811.eqop) - c:RegisterEffect(e1) - --atkup - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetValue(c25682811.atkval) - c:RegisterEffect(e2) -end -function c25682811.eqcon(e,tp,eg,ep,ev,re,r,rp) - return bit.band(e:GetHandler():GetSummonType(),SUMMON_TYPE_SYNCHRO)==SUMMON_TYPE_SYNCHRO -end -function c25682811.filter(c) - return c:IsSetCard(0x29) and c:IsRace(RACE_DRAGON) -end -function c25682811.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c25682811.filter(chkc) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingTarget(c25682811.filter,tp,LOCATION_GRAVE,0,1,nil) end - local ft=Duel.GetLocationCount(tp,LOCATION_SZONE) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local g=Duel.SelectTarget(tp,c25682811.filter,tp,LOCATION_GRAVE,0,1,ft,nil) - Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g,g:GetCount(),0,0) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,g:GetCount(),0,0) -end -function c25682811.eqop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local sg=g:Filter(Card.IsRelateToEffect,nil,e) - if Duel.GetLocationCount(tp,LOCATION_SZONE)0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c25704359.lua b/script/c25704359.lua deleted file mode 100644 index b5ac3a383e..0000000000 --- a/script/c25704359.lua +++ /dev/null @@ -1,94 +0,0 @@ ---憑依解放 -function c25704359.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetCondition(c25704359.condition) - c:RegisterEffect(e1) - --indestructable - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(LOCATION_MZONE,0) - e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0xbf)) - e2:SetValue(1) - c:RegisterEffect(e2) - --atk - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetCode(EFFECT_UPDATE_ATTACK) - e3:SetRange(LOCATION_SZONE) - e3:SetTargetRange(LOCATION_MZONE,0) - e3:SetTarget(c25704359.atktg) - e3:SetCondition(c25704359.atkcon) - e3:SetValue(800) - c:RegisterEffect(e3) - --spsummon - local e4=Effect.CreateEffect(c) - e4:SetCategory(CATEGORY_SPECIAL_SUMMON) - e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e4:SetCode(EVENT_DESTROYED) - e4:SetRange(LOCATION_SZONE) - e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e4:SetCountLimit(1,25704359) - e4:SetCondition(c25704359.spcon) - e4:SetTarget(c25704359.sptg) - e4:SetOperation(c25704359.spop) - c:RegisterEffect(e4) -end -function c25704359.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end -function c25704359.atktg(e,c) - return c:IsSetCard(0xc0) and Duel.GetAttacker()==c -end -function c25704359.atkcon(e) - return Duel.GetCurrentPhase()==PHASE_DAMAGE_CAL and Duel.GetAttackTarget()~=nil -end -function c25704359.cfilter(c,tp) - return c:IsReason(REASON_BATTLE+REASON_EFFECT) and c:GetOriginalAttribute()~=0 - and c:IsPreviousLocation(LOCATION_MZONE) and c:GetPreviousControler()==tp -end -function c25704359.spcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c25704359.cfilter,1,nil,tp) -end -function c25704359.spfilter(c,e,tp,att) - return c:IsRace(RACE_SPELLCASTER) and c:GetDefence()==1500 and c:IsAttribute(att) - and (c:IsCanBeSpecialSummoned(e,0,tp,false,false) or c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN)) -end -function c25704359.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return false end - local g=eg:Filter(c25704359.cfilter,nil,tp) - local att=0x7f - local tc=g:GetFirst() - while tc do - att=bit.band(att,tc:GetOriginalAttribute()) - tc=g:GetNext() - end - att=0x7f-att - e:SetLabel(att) - return Duel.IsExistingMatchingCard(c25704359.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp,att) - end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c25704359.spop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c25704359.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,e:GetLabel()) - local tc=g:GetFirst() - if tc then - local spos=0 - if tc:IsCanBeSpecialSummoned(e,0,tp,false,false) then spos=spos+POS_FACEUP_ATTACK end - if tc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN) then spos=spos+POS_FACEDOWN_DEFENCE end - Duel.SpecialSummon(tc,0,tp,tp,false,false,spos) - if tc:IsFacedown() then - Duel.ConfirmCards(1-tp,tc) - end - end -end diff --git a/script/c25716180.lua b/script/c25716180.lua deleted file mode 100644 index a41184d47d..0000000000 --- a/script/c25716180.lua +++ /dev/null @@ -1,27 +0,0 @@ ---ゼンマイニャンコ -function c25716180.initial_effect(c) - --to hand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(25716180,0)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_NO_TURN_RESET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetTarget(c25716180.target) - e1:SetOperation(c25716180.operation) - c:RegisterEffect(e1) -end -function c25716180.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsAbleToHand() end - if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToHand,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g=Duel.SelectTarget(tp,Card.IsAbleToHand,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c25716180.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - end -end diff --git a/script/c25727454.lua b/script/c25727454.lua deleted file mode 100644 index bd94cc9d59..0000000000 --- a/script/c25727454.lua +++ /dev/null @@ -1,38 +0,0 @@ ---名匠 ガミル -function c25727454.initial_effect(c) - --atkup - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(25727454,0)) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetRange(LOCATION_HAND) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e1:SetCondition(c25727454.condition) - e1:SetCost(c25727454.cost) - e1:SetOperation(c25727454.operation) - c:RegisterEffect(e1) -end -function c25727454.condition(e,tp,eg,ep,ev,re,r,rp) - local phase=Duel.GetCurrentPhase() - if phase~=PHASE_DAMAGE or Duel.IsDamageCalculated() then return false end - local a=Duel.GetAttacker() - local d=Duel.GetAttackTarget() - return (a:IsControler(tp) and a:IsRelateToBattle()) or (d and d:IsControler(tp) and d:IsRelateToBattle()) -end -function c25727454.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end -function c25727454.operation(e,tp,eg,ep,ev,re,r,rp) - local a=Duel.GetAttacker() - if Duel.GetTurnPlayer()~=tp then a=Duel.GetAttackTarget() end - if not a:IsRelateToBattle() or a:IsFacedown() then return end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e1:SetValue(300) - a:RegisterEffect(e1) -end diff --git a/script/c2572890.lua b/script/c2572890.lua deleted file mode 100644 index 969b8727b1..0000000000 --- a/script/c2572890.lua +++ /dev/null @@ -1,61 +0,0 @@ ---マジェスペクター・テンペスト -function c2572890.initial_effect(c) - --Activate(summon) - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DISABLE_SUMMON+CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_SPSUMMON) - e1:SetCondition(c2572890.condition1) - e1:SetCost(c2572890.cost) - e1:SetTarget(c2572890.target1) - e1:SetOperation(c2572890.activate1) - c:RegisterEffect(e1) - --Activate(effect) - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) - e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) - e2:SetType(EFFECT_TYPE_ACTIVATE) - e2:SetCode(EVENT_CHAINING) - e2:SetCondition(c2572890.condition2) - e2:SetCost(c2572890.cost) - e2:SetTarget(c2572890.target2) - e2:SetOperation(c2572890.activate2) - c:RegisterEffect(e2) -end -function c2572890.cfilter(c) - return c:IsRace(RACE_SPELLCASTER) and c:IsAttribute(ATTRIBUTE_WIND) - and not c:IsStatus(STATUS_BATTLE_DESTROYED) -end -function c2572890.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,c2572890.cfilter,1,nil) end - local g=Duel.SelectReleaseGroup(tp,c2572890.cfilter,1,1,nil) - Duel.Release(g,REASON_COST) -end -function c2572890.condition1(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentChain()==0 -end -function c2572890.target1(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DISABLE_SUMMON,eg,eg:GetCount(),0,0) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,eg:GetCount(),0,0) -end -function c2572890.activate1(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateSummon(eg) - Duel.Destroy(eg,REASON_EFFECT) -end -function c2572890.condition2(e,tp,eg,ep,ev,re,r,rp) - return re:IsActiveType(TYPE_MONSTER) and Duel.IsChainNegatable(ev) -end -function c2572890.target2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) - end -end -function c2572890.activate2(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateActivation(ev) - if re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(eg,REASON_EFFECT) - end -end diff --git a/script/c25769732.lua b/script/c25769732.lua deleted file mode 100644 index c5b8333edb..0000000000 --- a/script/c25769732.lua +++ /dev/null @@ -1,50 +0,0 @@ ---機械改造工場 -function c25769732.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c25769732.target) - e1:SetOperation(c25769732.operation) - c:RegisterEffect(e1) - --atk up - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(300) - c:RegisterEffect(e2) - --def up - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_EQUIP) - e3:SetCode(EFFECT_UPDATE_DEFENCE) - e3:SetValue(300) - c:RegisterEffect(e3) - --equip limit - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetCode(EFFECT_EQUIP_LIMIT) - e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e4:SetValue(c25769732.eqlimit) - c:RegisterEffect(e4) -end -function c25769732.eqlimit(e,c) - return c:IsRace(RACE_MACHINE) -end -function c25769732.filter(c) - return c:IsFaceup() and c:IsRace(RACE_MACHINE) -end -function c25769732.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c25769732.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c25769732.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c25769732.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c25769732.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,e:GetHandler(),tc) - end -end diff --git a/script/c25771826.lua b/script/c25771826.lua deleted file mode 100644 index a56c49adc9..0000000000 --- a/script/c25771826.lua +++ /dev/null @@ -1,17 +0,0 @@ ---A・O・J ガラドホルグ -function c25771826.initial_effect(c) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetCondition(c25771826.condtion) - e1:SetValue(200) - c:RegisterEffect(e1) -end -function c25771826.condtion(e) - local ph=Duel.GetCurrentPhase() - if not (ph==PHASE_DAMAGE or ph==PHASE_DAMAGE_CAL) then return false end - local a=Duel.GetAttacker() - local d=Duel.GetAttackTarget() - return (a==e:GetHandler() and d and d:IsFaceup() and d:IsAttribute(ATTRIBUTE_LIGHT)) - or (d==e:GetHandler() and a:IsAttribute(ATTRIBUTE_LIGHT)) -end diff --git a/script/c25773409.lua b/script/c25773409.lua deleted file mode 100644 index b4d5bb3dae..0000000000 --- a/script/c25773409.lua +++ /dev/null @@ -1,25 +0,0 @@ ---伝説の柔術家 -function c25773409.initial_effect(c) - --to deck - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(25773409,0)) - e1:SetCategory(CATEGORY_TODECK) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_DAMAGE_STEP_END) - e1:SetCondition(c25773409.condition) - e1:SetTarget(c25773409.target) - e1:SetOperation(c25773409.operation) - c:RegisterEffect(e1) -end -function c25773409.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetAttackTarget()==e:GetHandler() and bit.band(e:GetHandler():GetBattlePosition(),POS_DEFENCE)~=0 -end -function c25773409.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TODECK,Duel.GetAttacker(),1,0,0) -end -function c25773409.operation(e,tp,eg,ep,ev,re,r,rp) - local a=Duel.GetAttacker() - if not a:IsRelateToBattle() then return end - Duel.SendtoDeck(a,nil,0,REASON_EFFECT) -end diff --git a/script/c25774450.lua b/script/c25774450.lua deleted file mode 100644 index 038843a473..0000000000 --- a/script/c25774450.lua +++ /dev/null @@ -1,34 +0,0 @@ ---死のマジック・ボックス -function c25774450.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c25774450.target) - e1:SetOperation(c25774450.activate) - c:RegisterEffect(e1) -end -function c25774450.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,0,LOCATION_MZONE,1,nil) - and Duel.IsExistingTarget(Card.IsAbleToChangeControler,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g1=Duel.SelectTarget(tp,Card.IsDestructable,tp,0,LOCATION_MZONE,1,1,nil) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) - local g2=Duel.SelectTarget(tp,Card.IsAbleToChangeControler,tp,LOCATION_MZONE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g1,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_CONTROL,g2,1,0,0) -end -function c25774450.activate(e,tp,eg,ep,ev,re,r,rp) - local ex1,dg=Duel.GetOperationInfo(0,CATEGORY_DESTROY) - local ex2,cg=Duel.GetOperationInfo(0,CATEGORY_CONTROL) - local dc=dg:GetFirst() - local cc=cg:GetFirst() - if dc:IsRelateToEffect(e) and cc:IsRelateToEffect(e) and Duel.Destroy(dc,REASON_EFFECT)~=0 then - if not Duel.GetControl(cc,1-tp,0,0) and not cc:IsImmuneToEffect(e) and cc:IsAbleToChangeControler() then - Duel.Destroy(cc,REASON_EFFECT) - end - end -end diff --git a/script/c25788011.lua b/script/c25788011.lua deleted file mode 100644 index b94afa31c0..0000000000 --- a/script/c25788011.lua +++ /dev/null @@ -1,35 +0,0 @@ ---調星師ライズベルト -function c25788011.initial_effect(c) - --lv up - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(25788011,0)) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetTarget(c25788011.target) - e1:SetOperation(c25788011.operation) - c:RegisterEffect(e1) -end -function c25788011.filter(c) - return c:IsFaceup() and c:IsLevelAbove(1) -end -function c25788011.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c25788011.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c25788011.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c25788011.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) -end -function c25788011.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - local lv=Duel.SelectOption(tp,aux.Stringid(25788011,1),aux.Stringid(25788011,2),aux.Stringid(25788011,3)) - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_LEVEL) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e1:SetValue(lv+1) - tc:RegisterEffect(e1) - end -end diff --git a/script/c25789292.lua b/script/c25789292.lua deleted file mode 100644 index 7d6d3d1c01..0000000000 --- a/script/c25789292.lua +++ /dev/null @@ -1,48 +0,0 @@ ---禁じられた聖杯 -function c25789292.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DISABLE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP+0x1c0) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c25789292.condition) - e1:SetTarget(c25789292.target) - e1:SetOperation(c25789292.activate) - c:RegisterEffect(e1) -end -function c25789292.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end -function c25789292.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0) -end -function c25789292.activate(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.NegateRelatedChain(tc,RESET_TURN_SET) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - e1:SetValue(400) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - tc:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_DISABLE_EFFECT) - e3:SetValue(RESET_TURN_SET) - e3:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - tc:RegisterEffect(e3) - end -end diff --git a/script/c25796442.lua b/script/c25796442.lua deleted file mode 100644 index 5eb53a47fa..0000000000 --- a/script/c25796442.lua +++ /dev/null @@ -1,31 +0,0 @@ ---儀式の檻 -function c25796442.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - -- - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_AVOID_BATTLE_DAMAGE) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(LOCATION_MZONE,0) - e2:SetTarget(aux.TargetBoolFunction(Card.IsType,TYPE_RITUAL)) - e2:SetValue(1) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) - e3:SetValue(c25796442.tgval) - c:RegisterEffect(e3) - local e4=e2:Clone() - e4:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - e4:SetValue(c25796442.efilter) - c:RegisterEffect(e4) -end -function c25796442.tgval(e,re,rp) - return re:IsActiveType(TYPE_EFFECT) and aux.tgval(e,re,rp) -end -function c25796442.efilter(e,re) - return re:IsActiveType(TYPE_EFFECT) -end diff --git a/script/c25811989.lua b/script/c25811989.lua deleted file mode 100644 index 5a5f8b7f8c..0000000000 --- a/script/c25811989.lua +++ /dev/null @@ -1,124 +0,0 @@ ---インフェルノイド・アシュメダイ -function c25811989.initial_effect(c) - c:EnableReviveLimit() - --special summon condition - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_SPSUMMON_PROC) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e2:SetRange(LOCATION_HAND+LOCATION_GRAVE) - e2:SetCondition(c25811989.spcon) - e2:SetOperation(c25811989.spop) - c:RegisterEffect(e2) - --handes - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(25811989,0)) - e3:SetCategory(CATEGORY_HANDES) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_BATTLE_DAMAGE) - e3:SetCondition(c25811989.thcon) - e3:SetTarget(c25811989.thtg) - e3:SetOperation(c25811989.thop) - c:RegisterEffect(e3) - --remove - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(25811989,1)) - e4:SetCategory(CATEGORY_REMOVE) - e4:SetType(EFFECT_TYPE_QUICK_O) - e4:SetCode(EVENT_FREE_CHAIN) - e4:SetRange(LOCATION_MZONE) - e4:SetProperty(EFFECT_FLAG_CARD_TARGET) - e4:SetCountLimit(1) - e4:SetCost(c25811989.rmcost) - e4:SetTarget(c25811989.rmtg) - e4:SetOperation(c25811989.rmop) - c:RegisterEffect(e4) -end -function c25811989.spfilter(c) - return c:IsSetCard(0xbb) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost() -end -function c25811989.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - local sum=0 - for i=0,4 do - local tc=Duel.GetFieldCard(tp,LOCATION_MZONE,i) - if tc and tc:IsFaceup() and tc:IsType(TYPE_EFFECT) then - if tc:IsType(TYPE_XYZ) then sum=sum+tc:GetRank() - else sum=sum+tc:GetLevel() end - end - end - if sum>8 then return false end - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ft<-1 then return false end - if c:IsHasEffect(34822850) then - if ft>0 then - return Duel.IsExistingMatchingCard(c25811989.spfilter,tp,LOCATION_MZONE+LOCATION_GRAVE+LOCATION_HAND,0,2,c) - else - local ct=-ft+1 - return Duel.IsExistingMatchingCard(c25811989.spfilter,tp,LOCATION_MZONE,0,ct,nil) - and Duel.IsExistingMatchingCard(c25811989.spfilter,tp,LOCATION_MZONE+LOCATION_GRAVE+LOCATION_HAND,0,2,c) - end - else - return ft>0 and Duel.IsExistingMatchingCard(c25811989.spfilter,tp,LOCATION_GRAVE+LOCATION_HAND,0,2,c) - end -end -function c25811989.spop(e,tp,eg,ep,ev,re,r,rp,c) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - local g=nil - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - if c:IsHasEffect(34822850) then - if ft>0 then - g=Duel.SelectMatchingCard(tp,c25811989.spfilter,tp,LOCATION_MZONE+LOCATION_GRAVE+LOCATION_HAND,0,2,2,c) - else - local sg=Duel.GetMatchingGroup(c25811989.spfilter,tp,LOCATION_MZONE+LOCATION_GRAVE+LOCATION_HAND,0,c) - local ct=-ft+1 - g=sg:FilterSelect(tp,Card.IsLocation,ct,ct,nil,LOCATION_MZONE) - if ct<2 then - sg:Sub(g) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g2=sg:Select(tp,1,1,nil) - g:Merge(g2) - end - end - else - g=Duel.SelectMatchingCard(tp,c25811989.spfilter,tp,LOCATION_GRAVE+LOCATION_HAND,0,2,2,c) - end - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c25811989.thcon(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp and Duel.GetAttacker()==e:GetHandler() and Duel.GetAttackTarget()~=nil -end -function c25811989.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0 end - Duel.SetOperationInfo(0,CATEGORY_HANDES,0,0,1-tp,1) -end -function c25811989.thop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetFieldGroup(ep,LOCATION_HAND,0) - local sg=g:RandomSelect(ep,1) - Duel.SendtoGrave(sg,REASON_EFFECT) -end -function c25811989.rmcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsReleasable,1,nil) end - local g=Duel.SelectReleaseGroup(tp,Card.IsReleasable,1,1,nil) - Duel.Release(g,REASON_COST) -end -function c25811989.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(1-tp) and chkc:IsAbleToRemove() end - if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) -end -function c25811989.rmop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) - end -end diff --git a/script/c25824484.lua b/script/c25824484.lua deleted file mode 100644 index aa4df11fb6..0000000000 --- a/script/c25824484.lua +++ /dev/null @@ -1,52 +0,0 @@ ---森羅の仙樹 レギア -function c25824484.initial_effect(c) - --deck check - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(25824484,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetTarget(c25824484.target) - e1:SetOperation(c25824484.operation) - c:RegisterEffect(e1) - --sort decktop - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(25824484,1)) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetCondition(c25824484.sdcon) - e2:SetOperation(c25824484.sdop) - c:RegisterEffect(e2) -end -function c25824484.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,1) end -end -function c25824484.operation(e,tp,eg,ep,ev,re,r,rp) - if not Duel.IsPlayerCanDiscardDeck(tp,1) then return end - Duel.ConfirmDecktop(tp,1) - local g=Duel.GetDecktopGroup(tp,1) - local tc=g:GetFirst() - if tc:IsRace(RACE_PLANT) then - Duel.DisableShuffleCheck() - Duel.SendtoGrave(tc,REASON_EFFECT+REASON_REVEAL) - Duel.Draw(tp,1,REASON_EFFECT) - else - Duel.MoveSequence(tc,1) - end -end -function c25824484.sdcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsPreviousLocation(LOCATION_DECK) and - (c:IsReason(REASON_REVEAL) or c:GetPreviousPosition()==POS_FACEUP_DEFENCE or Duel.IsPlayerAffectedByEffect(tp,EFFECT_REVERSE_DECK)) -end -function c25824484.sdop(e,tp,eg,ep,ev,re,r,rp) - local ct=Duel.GetFieldGroupCount(tp,LOCATION_DECK,0) - if ct==0 then return end - local ac=1 - if ct>1 then - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(25824484,2)) - if ct==2 then ac=Duel.AnnounceNumber(tp,1,2) - else ac=Duel.AnnounceNumber(tp,1,2,3) end - end - Duel.SortDecktop(tp,tp,ac) -end diff --git a/script/c25833572.lua b/script/c25833572.lua deleted file mode 100644 index 186e5ad529..0000000000 --- a/script/c25833572.lua +++ /dev/null @@ -1,29 +0,0 @@ ---ゲート・ガーディアン -function c25833572.initial_effect(c) - c:EnableReviveLimit() - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c25833572.spcon) - e1:SetOperation(c25833572.spop) - c:RegisterEffect(e1) -end -function c25833572.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.GetLocationCount(tp,LOCATION_MZONE)>-3 - and Duel.CheckReleaseGroup(tp,Card.IsCode,1,nil,25955164) - and Duel.CheckReleaseGroup(tp,Card.IsCode,1,nil,62340868) - and Duel.CheckReleaseGroup(tp,Card.IsCode,1,nil,98434877) -end -function c25833572.spop(e,tp,eg,ep,ev,re,r,rp,c) - local g1=Duel.SelectReleaseGroup(tp,Card.IsCode,1,1,nil,25955164) - local g2=Duel.SelectReleaseGroup(tp,Card.IsCode,1,1,nil,62340868) - local g3=Duel.SelectReleaseGroup(tp,Card.IsCode,1,1,nil,98434877) - g1:Merge(g2) - g1:Merge(g3) - Duel.Release(g1,REASON_COST) -end diff --git a/script/c2584136.lua b/script/c2584136.lua deleted file mode 100644 index 36dd54e91c..0000000000 --- a/script/c2584136.lua +++ /dev/null @@ -1,48 +0,0 @@ ---シャクトパス -function c2584136.initial_effect(c) - --equip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(2584136,0)) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetCondition(c2584136.eqcon) - e1:SetOperation(c2584136.eqop) - c:RegisterEffect(e1) -end -function c2584136.eqcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local bc=c:GetBattleTarget() - return c:IsLocation(LOCATION_GRAVE) and c:IsReason(REASON_BATTLE) and rp~=tp - and bc:IsFaceup() and bc:IsRelateToBattle() -end -function c2584136.eqlimit(e,c) - return e:GetOwner()==c -end -function c2584136.eqop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end - local tc=c:GetBattleTarget() - if c:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsRelateToBattle() then - Duel.Equip(tp,c,tc,true) - --Add Equip limit - local e1=Effect.CreateEffect(tc) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(c2584136.eqlimit) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_SET_ATTACK) - e2:SetValue(0) - e2:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_EQUIP) - e3:SetCode(EFFECT_CANNOT_CHANGE_POSITION) - e3:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e3) - end -end diff --git a/script/c25847467.lua b/script/c25847467.lua deleted file mode 100644 index af0821723a..0000000000 --- a/script/c25847467.lua +++ /dev/null @@ -1,30 +0,0 @@ ---暗黒界の刺客 カーキ -function c25847467.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(25847467,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCondition(c25847467.descon) - e1:SetTarget(c25847467.destg) - e1:SetOperation(c25847467.desop) - c:RegisterEffect(e1) -end -function c25847467.descon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetPreviousLocation()==LOCATION_HAND and bit.band(r,0x4040)==0x4040 -end -function c25847467.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsDestructable() end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c25847467.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c25853045.lua b/script/c25853045.lua deleted file mode 100644 index a7e11c5c94..0000000000 --- a/script/c25853045.lua +++ /dev/null @@ -1,63 +0,0 @@ ---FA-ブラック・レイ・ランサー -function c25853045.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_WATER),4,3,c25853045.ovfilter,aux.Stringid(25853045,0)) - c:EnableReviveLimit() - --atk - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(c25853045.atkval) - c:RegisterEffect(e1) - --destroy replace - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetCode(EFFECT_DESTROY_REPLACE) - e2:SetRange(LOCATION_MZONE) - e2:SetTarget(c25853045.reptg) - c:RegisterEffect(e2) - --destroy - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(25853045,2)) - e3:SetCategory(CATEGORY_DESTROY) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetCode(EVENT_BATTLE_DESTROYING) - e3:SetCondition(aux.bdocon) - e3:SetTarget(c25853045.destg) - e3:SetOperation(c25853045.desop) - c:RegisterEffect(e3) -end -function c25853045.ovfilter(c) - return c:IsFaceup() and c:GetRank()==3 and c:IsAttribute(ATTRIBUTE_WATER) and c:GetOverlayCount()==0 -end -function c25853045.atkval(e,c) - return c:GetOverlayCount()*200 -end -function c25853045.reptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_EFFECT) end - if Duel.SelectYesNo(tp,aux.Stringid(25853045,1)) then - local g=e:GetHandler():GetOverlayGroup() - Duel.SendtoGrave(g,REASON_EFFECT) - return true - else return false end -end -function c25853045.filter(c) - return c:IsDestructable() and c:IsType(TYPE_SPELL+TYPE_TRAP) -end -function c25853045.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and c25853045.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c25853045.filter,tp,0,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c25853045.filter,tp,0,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c25853045.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c25857246.lua b/script/c25857246.lua deleted file mode 100644 index 1f6683d159..0000000000 --- a/script/c25857246.lua +++ /dev/null @@ -1,74 +0,0 @@ ---ヴァルキュルスの影霊衣 -function c25857246.initial_effect(c) - c:EnableReviveLimit() - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(aux.ritlimit) - c:RegisterEffect(e1) - --atk - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(25857246,0)) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_ATTACK_ANNOUNCE) - e2:SetRange(LOCATION_HAND) - e2:SetCountLimit(1,25857246) - e2:SetCondition(c25857246.atkcon) - e2:SetCost(c25857246.atkcost) - e2:SetOperation(c25857246.atkop) - c:RegisterEffect(e2) - --draw - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(25857246,1)) - e3:SetCategory(CATEGORY_DRAW) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1,25857247) - e3:SetTarget(c25857246.target) - e3:SetOperation(c25857246.operation) - c:RegisterEffect(e3) -end -function c25857246.mat_filter(c) - return c:GetLevel()~=8 -end -function c25857246.atkcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetAttacker():IsControler(1-tp) -end -function c25857246.cfilter(c) - return c:IsSetCard(0xb4) and c:IsAbleToRemoveAsCost() -end -function c25857246.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsDiscardable() - and Duel.IsExistingMatchingCard(c25857246.cfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c25857246.cfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) - Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD) -end -function c25857246.atkop(e,tp,eg,ep,ev,re,r,rp) - if Duel.NegateAttack() then - Duel.SkipPhase(1-tp,PHASE_BATTLE,RESET_PHASE+PHASE_BATTLE,1) - end -end -function c25857246.filter(c) - return c:IsType(TYPE_MONSTER) and c:IsReleasableByEffect() -end -function c25857246.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp,1) - and Duel.CheckReleaseGroupEx(tp,c25857246.filter,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c25857246.operation(e,tp,eg,ep,ev,re,r,rp) - if not Duel.IsPlayerCanDraw(tp) then return end - local ct=Duel.GetFieldGroupCount(tp,LOCATION_DECK,0) - if ct==0 then ct=1 end - if ct>2 then ct=2 end - local g=Duel.SelectReleaseGroupEx(tp,c25857246.filter,1,ct,nil) - if g:GetCount()>0 then - Duel.HintSelection(g) - local rct=Duel.Release(g,REASON_EFFECT) - Duel.Draw(tp,rct,REASON_EFFECT) - end -end diff --git a/script/c25862681.lua b/script/c25862681.lua deleted file mode 100644 index 71994f6933..0000000000 --- a/script/c25862681.lua +++ /dev/null @@ -1,93 +0,0 @@ ---エンシェント・フェアリー・ドラゴン -function c25862681.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1) - c:EnableReviveLimit() - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(25862681,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c25862681.sumcon) - e1:SetCost(c25862681.cost) - e1:SetTarget(c25862681.sumtg) - e1:SetOperation(c25862681.sumop) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(25862681,1)) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetCategory(CATEGORY_DESTROY+CATEGORY_RECOVER+CATEGORY_SEARCH) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCost(c25862681.cost) - e2:SetTarget(c25862681.destg) - e2:SetOperation(c25862681.desop) - c:RegisterEffect(e2) -end -function c25862681.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) -end -function c25862681.sumcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()==PHASE_MAIN1 -end -function c25862681.sumfilter(c,e,tp) - return c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c25862681.sumtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c25862681.sumfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,LOCATION_HAND) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_BP) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) - e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function c25862681.sumop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c25862681.sumfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end -function c25862681.destg(e,tp,eg,ep,ev,re,r,rp,chk) - local c1=Duel.GetFieldCard(0,LOCATION_SZONE,5) - local c2=Duel.GetFieldCard(1,LOCATION_SZONE,5) - if chk==0 then return (c1 and c1:IsDestructable()) or (c2 and c2:IsDestructable()) end - local g=Group.CreateGroup() - if c1 and c1:IsDestructable() then g:AddCard(c1) end - if c2 and c2:IsDestructable() then g:AddCard(c2) end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) - Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,1000) -end -function c25862681.ffilter(c) - return c:IsType(TYPE_FIELD) and c:IsAbleToHand() -end -function c25862681.desop(e,tp,eg,ep,ev,re,r,rp) - local c1=Duel.GetFieldCard(0,LOCATION_SZONE,5) - local c2=Duel.GetFieldCard(1,LOCATION_SZONE,5) - local g=Group.CreateGroup() - if c1 and c1:IsDestructable() then g:AddCard(c1) end - if c2 and c2:IsDestructable() then g:AddCard(c2) end - if g:GetCount()>0 then - local ct=Duel.Destroy(g,REASON_EFFECT) - if ct>0 then - Duel.Recover(tp,1000,REASON_EFFECT) - local fg=Duel.GetMatchingGroup(c25862681.ffilter,tp,LOCATION_DECK,0,nil) - if fg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(25862681,2)) then - Duel.BreakEffect() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local sg=fg:Select(tp,1,1,nil) - Duel.SendtoHand(sg,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,sg) - end - end - end -end diff --git a/script/c25866285.lua b/script/c25866285.lua deleted file mode 100644 index 44ecd5c2d8..0000000000 --- a/script/c25866285.lua +++ /dev/null @@ -1,26 +0,0 @@ ---ナチュル・スティンクバグ -function c25866285.initial_effect(c) - --negate attack - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(25866285,0)) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_BE_BATTLE_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c25866285.condition) - e1:SetCost(c25866285.cost) - e1:SetOperation(c25866285.operation) - c:RegisterEffect(e1) -end -function c25866285.condition(e,tp,eg,ep,ev,re,r,rp) - local ec=eg:GetFirst() - return ec:IsFaceup() and ec:IsControler(tp) and ec:IsSetCard(0x2a) -end -function c25866285.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end -function c25866285.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.NegateAttack() then - Duel.SkipPhase(1-tp,PHASE_BATTLE,RESET_PHASE+PHASE_BATTLE,1) - end -end diff --git a/script/c25880422.lua b/script/c25880422.lua deleted file mode 100644 index 46766719d7..0000000000 --- a/script/c25880422.lua +++ /dev/null @@ -1,28 +0,0 @@ ---『攻撃』封じ -function c25880422.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_POSITION) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c25880422.target) - e1:SetOperation(c25880422.activate) - c:RegisterEffect(e1) -end -function c25880422.filter(c) - return c:IsPosition(POS_FACEUP_ATTACK) -end -function c25880422.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c25880422.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c25880422.filter,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - local g=Duel.SelectTarget(tp,c25880422.filter,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0) -end -function c25880422.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsPosition(POS_FACEUP_ATTACK) then - Duel.ChangePosition(tc,POS_FACEUP_DEFENCE) - end -end diff --git a/script/c25920413.lua b/script/c25920413.lua deleted file mode 100644 index b55bcc2f5c..0000000000 --- a/script/c25920413.lua +++ /dev/null @@ -1,82 +0,0 @@ ---エーリアン・スカル -function c25920413.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_SPSUM_PARAM) - e1:SetRange(LOCATION_HAND) - e1:SetTargetRange(POS_FACEUP,1) - e1:SetCondition(c25920413.spcon) - e1:SetOperation(c25920413.spop) - e1:SetValue(1) - c:RegisterEffect(e1) - --counter - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(25920413,0)) - e2:SetCategory(CATEGORY_COUNTER) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetCondition(c25920413.ctcon) - e2:SetOperation(c25920413.ctop) - c:RegisterEffect(e2) - --atk def - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e3:SetCode(EVENT_DAMAGE_CALCULATING) - e3:SetRange(LOCATION_MZONE) - e3:SetOperation(c25920413.adval) - c:RegisterEffect(e3) -end -function c25920413.spfilter(c) - return c:IsLevelBelow(3) and c:IsFaceup() and c:IsReleasable() -end -function c25920413.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.GetActivityCount(tp,ACTIVITY_NORMALSUMMON)==0 - and Duel.IsExistingMatchingCard(c25920413.spfilter,tp,0,LOCATION_MZONE,1,nil) -end -function c25920413.spop(e,tp,eg,ep,ev,re,r,rp,c) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) - local g=Duel.SelectMatchingCard(c:GetControler(),c25920413.spfilter,c:GetControler(),0,LOCATION_MZONE,1,1,nil) - Duel.Release(g,REASON_COST) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_SUMMON) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetReset(RESET_PHASE+RESET_END) - e1:SetTargetRange(1,0) - Duel.RegisterEffect(e1,tp) - local e2=e1:Clone() - e2:SetCode(EFFECT_CANNOT_MSET) - Duel.RegisterEffect(e2,tp) -end -function c25920413.ctcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+1 -end -function c25920413.ctop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFaceup() and c:IsRelateToEffect(e) then - c:AddCounter(0xe,1) - end -end -function c25920413.addown(c,e) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_PHASE+RESET_DAMAGE_CAL) - e1:SetValue(c:GetCounter(0xe)*-300) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_UPDATE_DEFENCE) - c:RegisterEffect(e2) -end -function c25920413.adval(e,tp,eg,ep,ev,re,r,rp) - local a=Duel.GetAttacker() - local d=Duel.GetAttackTarget() - if not d then return end - if a:GetCounter(0xe)>0 and d:IsSetCard(0xc) then c25920413.addown(a,e) end - if d:GetCounter(0xe)>0 and a:IsSetCard(0xc) then c25920413.addown(d,e) end -end diff --git a/script/c25924653.lua b/script/c25924653.lua deleted file mode 100644 index d23469f376..0000000000 --- a/script/c25924653.lua +++ /dev/null @@ -1,111 +0,0 @@ ---剣闘獣ダリウス -function c25924653.initial_effect(c) - --grave special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(25924653,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(c25924653.spgcon) - e1:SetTarget(c25924653.spgtg) - e1:SetOperation(c25924653.spgop) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(25924653,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_PHASE+PHASE_BATTLE) - e2:SetRange(LOCATION_MZONE) - e2:SetCondition(c25924653.spcon) - e2:SetCost(c25924653.spcost) - e2:SetTarget(c25924653.sptg) - e2:SetOperation(c25924653.spop) - c:RegisterEffect(e2) - --leave field - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e3:SetCode(EVENT_LEAVE_FIELD) - e3:SetOperation(c25924653.leave) - c:RegisterEffect(e3) -end -function c25924653.spgcon(e,tp,eg,ep,ev,re,r,rp) - local st=e:GetHandler():GetSummonType() - return st>=(SUMMON_TYPE_SPECIAL+100) and st<(SUMMON_TYPE_SPECIAL+150) -end -function c25924653.spgfilter(c,e,tp) - return c:IsSetCard(0x19) and c:IsCanBeSpecialSummoned(e,104,tp,false,false) -end -function c25924653.spgtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c25924653.spgfilter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c25924653.spgfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c25924653.spgfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,g:GetCount(),0,0) -end -function c25924653.spgop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) and Duel.SpecialSummon(tc,104,tp,tp,false,false,POS_FACEUP)>0 - and c:IsFaceup() and c:IsRelateToEffect(e) then - c:SetCardTarget(tc) - tc:RegisterFlagEffect(25924654,RESET_EVENT+0x53e0000,0,1) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_OWNER_RELATE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetCondition(c25924653.discon) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_CHAIN_SOLVING) - e2:SetRange(LOCATION_MZONE) - e2:SetReset(RESET_EVENT+0x1fe0000) - e2:SetOperation(c25924653.disop) - c:RegisterEffect(e2) - end -end -function c25924653.discon(e) - return e:GetOwner():IsHasCardTarget(e:GetHandler()) -end -function c25924653.disop(e,tp,eg,ep,ev,re,r,rp) - if re:GetHandler():GetFlagEffect(25924654)~=0 then - Duel.NegateEffect(ev) - end -end -function c25924653.leave(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=c:GetFirstCardTarget() - if tc and tc:IsLocation(LOCATION_MZONE) and tc:GetFlagEffect(25924654)~=0 then - Duel.SendtoDeck(tc,nil,2,REASON_EFFECT) - end -end -function c25924653.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetBattledGroupCount()>0 -end -function c25924653.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToDeckAsCost() end - Duel.SendtoDeck(c,nil,2,REASON_COST) -end -function c25924653.filter(c,e,tp) - return not c:IsCode(25924653) and c:IsSetCard(0x19) and c:IsCanBeSpecialSummoned(e,104,tp,false,false) -end -function c25924653.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsExistingMatchingCard(c25924653.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c25924653.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c25924653.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - local tc=g:GetFirst() - if tc then - Duel.SpecialSummon(tc,104,tp,tp,false,false,POS_FACEUP) - tc:RegisterFlagEffect(tc:GetOriginalCode(),RESET_EVENT+0x1ff0000,0,0) - end -end diff --git a/script/c259314.lua b/script/c259314.lua deleted file mode 100644 index 15c78c7f4d..0000000000 --- a/script/c259314.lua +++ /dev/null @@ -1,63 +0,0 @@ ---甲虫装機の手甲 -function c259314.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCondition(c259314.condition) - e1:SetTarget(c259314.target) - e1:SetOperation(c259314.operation) - c:RegisterEffect(e1) -end -function c259314.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end -function c259314.filter(c) - return c:IsFaceup() and c:IsSetCard(0x56) -end -function c259314.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c259314.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c259314.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local g=Duel.SelectTarget(tp,c259314.filter,tp,LOCATION_MZONE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c259314.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsLocation(LOCATION_SZONE) then return end - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,c,tc) - c:CancelToGrave() - --Atk/def - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_EQUIP) - e1:SetCode(EFFECT_UPDATE_DEFENCE) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(1000) - c:RegisterEffect(e1) - --Equip limit - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_EQUIP_LIMIT) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetValue(c259314.eqlimit) - e2:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_EQUIP) - e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - e3:SetReset(RESET_EVENT+0x1fe0000) - e3:SetValue(c259314.efilter) - c:RegisterEffect(e3,true) - end -end -function c259314.eqlimit(e,c) - return c:IsSetCard(0x56) -end -function c259314.efilter(e,re,rp) - return e:GetHandlerPlayer()~=rp -end diff --git a/script/c25935625.lua b/script/c25935625.lua deleted file mode 100644 index 78e6338910..0000000000 --- a/script/c25935625.lua +++ /dev/null @@ -1,115 +0,0 @@ ---闇竜星-ジョクト -function c25935625.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(25935625,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCountLimit(1,25935625) - e1:SetCondition(c25935625.condition) - e1:SetTarget(c25935625.target) - e1:SetOperation(c25935625.operation) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(25935625,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,25935625) - e2:SetCondition(c25935625.spcon) - e2:SetCost(c25935625.spcost) - e2:SetTarget(c25935625.sptg) - e2:SetOperation(c25935625.spop) - c:RegisterEffect(e2) -end -function c25935625.condition(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE+REASON_EFFECT) - and c:IsPreviousLocation(LOCATION_ONFIELD) and c:GetPreviousControler()==tp -end -function c25935625.filter(c,e,tp) - return c:IsSetCard(0x9e) and not c:IsCode(25935625) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c25935625.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c25935625.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c25935625.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c25935625.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_ATTACK) - end -end -function c25935625.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==1 -end -function c25935625.cfilter(c) - return c:IsSetCard(0x9e) and c:IsAbleToGraveAsCost() -end -function c25935625.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c25935625.cfilter,tp,LOCATION_HAND,0,2,nil) end - Duel.DiscardHand(tp,c25935625.cfilter,2,2,REASON_COST) -end -function c25935625.spfilter1(c,e,tp) - return c:IsSetCard(0x9e) and c:GetAttack()==0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) - and Duel.IsExistingMatchingCard(c25935625.spfilter2,tp,LOCATION_DECK,0,1,c,e,tp) -end -function c25935625.spfilter2(c,e,tp) - return c:IsSetCard(0x9e) and c:GetDefence()==0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c25935625.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>2 - and Duel.IsExistingMatchingCard(c25935625.spfilter1,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_DECK) -end -function c25935625.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g1=Duel.SelectMatchingCard(tp,c25935625.spfilter1,tp,LOCATION_DECK,0,1,1,nil,e,tp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g2=Duel.SelectMatchingCard(tp,c25935625.spfilter2,tp,LOCATION_DECK,0,1,1,g1:GetFirst(),e,tp) - g1:Merge(g2) - if g1:GetCount()>0 then - local fid=e:GetHandler():GetFieldID() - local tc=g1:GetFirst() - while tc do - Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) - tc:RegisterFlagEffect(25935625,RESET_EVENT+0x1fe0000,0,1,fid) - tc=g1:GetNext() - end - Duel.SpecialSummonComplete() - g1:KeepAlive() - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e1:SetCountLimit(1) - e1:SetLabel(fid) - e1:SetLabelObject(g1) - e1:SetCondition(c25935625.rmcon) - e1:SetOperation(c25935625.rmop) - Duel.RegisterEffect(e1,tp) - end -end -function c25935625.rmfilter(c,fid) - return c:GetFlagEffectLabel(25935625)==fid -end -function c25935625.rmcon(e,tp,eg,ep,ev,re,r,rp) - local g=e:GetLabelObject() - if not g:IsExists(c25935625.rmfilter,1,nil,e:GetLabel()) then - g:DeleteGroup() - e:Reset() - return false - else return true end -end -function c25935625.rmop(e,tp,eg,ep,ev,re,r,rp) - local g=e:GetLabelObject() - local tg=g:Filter(c25935625.rmfilter,nil,e:GetLabel()) - Duel.Remove(tg,POS_FACEUP,REASON_EFFECT) -end diff --git a/script/c25955164.lua b/script/c25955164.lua deleted file mode 100644 index 04c8cd863a..0000000000 --- a/script/c25955164.lua +++ /dev/null @@ -1,34 +0,0 @@ ---雷魔神-サンガ -function c25955164.initial_effect(c) - --atkdown - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(25955164,0)) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_QUICK_O) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EVENT_PRE_DAMAGE_CALCULATE) - e1:SetProperty(EFFECT_FLAG_NO_TURN_RESET) - e1:SetCountLimit(1) - e1:SetCondition(c25955164.condition) - e1:SetTarget(c25955164.target) - e1:SetOperation(c25955164.operation) - c:RegisterEffect(e1) -end -function c25955164.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp and Duel.GetAttackTarget()==e:GetHandler() -end -function c25955164.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetAttacker():IsCanBeEffectTarget(e) end - Duel.SetTargetCard(Duel.GetAttacker()) -end -function c25955164.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetReset(RESET_PHASE+RESET_DAMAGE_CAL) - e1:SetValue(0) - tc:RegisterEffect(e1) - end -end diff --git a/script/c25958491.lua b/script/c25958491.lua deleted file mode 100644 index 1bbfdd835a..0000000000 --- a/script/c25958491.lua +++ /dev/null @@ -1,46 +0,0 @@ ---エンシェント・ホーリー・ワイバーン -function c25958491.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_LIGHT),aux.NonTuner(nil),1) - c:EnableReviveLimit() - --Atk update - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetValue(c25958491.atkval) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(25958491,0)) - e2:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetCode(EVENT_BATTLE_DESTROYED) - e2:SetCondition(c25958491.sumcon) - e2:SetCost(c25958491.sumcost) - e2:SetTarget(c25958491.sumtg) - e2:SetOperation(c25958491.sumop) - c:RegisterEffect(e2) -end -function c25958491.atkval(e,c) - local cont=c:GetControler() - return Duel.GetLP(cont)-Duel.GetLP(1-cont) -end -function c25958491.sumcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) -end -function c25958491.sumcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,1000) end - Duel.PayLPCost(tp,1000) -end -function c25958491.sumtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c25958491.sumop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 or not c:IsRelateToEffect(e) then return end - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) -end diff --git a/script/c25988873.lua b/script/c25988873.lua deleted file mode 100644 index 82f0bddb81..0000000000 --- a/script/c25988873.lua +++ /dev/null @@ -1,51 +0,0 @@ ---ドラグニティ-パルチザン -function c25988873.initial_effect(c) - --equip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(25988873,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c25988873.sptg) - e1:SetOperation(c25988873.spop) - c:RegisterEffect(e1) - --add type - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_ADD_TYPE) - e2:SetValue(TYPE_TUNER) - c:RegisterEffect(e2) -end -function c25988873.filter(c,e,tp) - return c:IsSetCard(0x29) and c:IsRace(RACE_WINDBEAST) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c25988873.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingMatchingCard(c25988873.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c25988873.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c25988873.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - local tc=g:GetFirst() - if not tc then return end - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - local c=e:GetHandler() - if c:IsFacedown() or not c:IsRelateToEffect(e) or c:IsControler(1-tp) - or Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end - Duel.BreakEffect() - if not Duel.Equip(tp,c,tc,false) then return end - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(c25988873.eqlimit) - e1:SetLabelObject(tc) - c:RegisterEffect(e1) -end -function c25988873.eqlimit(e,c) - return e:GetLabelObject()==c -end diff --git a/script/c26016357.lua b/script/c26016357.lua deleted file mode 100644 index 3daca95f72..0000000000 --- a/script/c26016357.lua +++ /dev/null @@ -1,53 +0,0 @@ ---マドルチェ・マーマメイド -function c26016357.initial_effect(c) - --to deck - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(26016357,0)) - e1:SetCategory(CATEGORY_TODECK) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCondition(c26016357.retcon) - e1:SetTarget(c26016357.rettg) - e1:SetOperation(c26016357.retop) - c:RegisterEffect(e1) - --tohand - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(26016357,1)) - e2:SetCategory(CATEGORY_TOHAND) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e2:SetCode(EVENT_FLIP) - e2:SetTarget(c26016357.thtg) - e2:SetOperation(c26016357.thop) - c:RegisterEffect(e2) -end -function c26016357.retcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsReason(REASON_DESTROY) and e:GetHandler():GetReasonPlayer()~=tp - and e:GetHandler():GetPreviousControler()==tp -end -function c26016357.rettg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0) -end -function c26016357.retop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_EFFECT) - end -end -function c26016357.filter(c) - return c:IsSetCard(0x71) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand() -end -function c26016357.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c26016357.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c26016357.filter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c26016357.filter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c26016357.thop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end diff --git a/script/c26022485.lua b/script/c26022485.lua deleted file mode 100644 index aa4afe2511..0000000000 --- a/script/c26022485.lua +++ /dev/null @@ -1,17 +0,0 @@ ---衰弱の霧 -function c26022485.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - -- - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_HAND_LIMIT) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(0,1) - e2:SetValue(5) - c:RegisterEffect(e2) -end diff --git a/script/c26034577.lua b/script/c26034577.lua deleted file mode 100644 index fa08a6de5f..0000000000 --- a/script/c26034577.lua +++ /dev/null @@ -1,122 +0,0 @@ ---インフェルノイド・ベルゼブル -function c26034577.initial_effect(c) - c:EnableReviveLimit() - --special summon condition - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_SPSUMMON_PROC) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e2:SetRange(LOCATION_HAND) - e2:SetCondition(c26034577.spcon) - e2:SetOperation(c26034577.spop) - c:RegisterEffect(e2) - --to hand - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(26034577,0)) - e3:SetCategory(CATEGORY_TOHAND) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_MZONE) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetCountLimit(1) - e3:SetTarget(c26034577.thtg) - e3:SetOperation(c26034577.thop) - c:RegisterEffect(e3) - --remove - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(26034577,1)) - e4:SetCategory(CATEGORY_REMOVE) - e4:SetType(EFFECT_TYPE_QUICK_O) - e4:SetCode(EVENT_FREE_CHAIN) - e4:SetRange(LOCATION_MZONE) - e4:SetProperty(EFFECT_FLAG_CARD_TARGET) - e4:SetCountLimit(1) - e4:SetCondition(c26034577.rmcon) - e4:SetCost(c26034577.rmcost) - e4:SetTarget(c26034577.rmtg) - e4:SetOperation(c26034577.rmop) - c:RegisterEffect(e4) -end -function c26034577.spfilter(c) - return c:IsSetCard(0xbb) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost() -end -function c26034577.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - local sum=0 - for i=0,4 do - local tc=Duel.GetFieldCard(tp,LOCATION_MZONE,i) - if tc and tc:IsFaceup() and tc:IsType(TYPE_EFFECT) then - if tc:IsType(TYPE_XYZ) then sum=sum+tc:GetRank() - else sum=sum+tc:GetLevel() end - end - end - if sum>8 then return false end - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ft<0 then return false end - if c:IsHasEffect(34822850) then - if ft>0 then - return Duel.IsExistingMatchingCard(c26034577.spfilter,tp,LOCATION_MZONE+LOCATION_GRAVE+LOCATION_HAND,0,1,c) - else - return Duel.IsExistingMatchingCard(c26034577.spfilter,tp,LOCATION_MZONE,0,1,nil) - end - else - return ft>0 and Duel.IsExistingMatchingCard(c26034577.spfilter,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,c) - end -end -function c26034577.spop(e,tp,eg,ep,ev,re,r,rp,c) - local g=nil - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - if c:IsHasEffect(34822850) then - if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then - g=Duel.SelectMatchingCard(tp,c26034577.spfilter,tp,LOCATION_MZONE+LOCATION_GRAVE+LOCATION_HAND,0,1,1,c) - else - g=Duel.SelectMatchingCard(tp,c26034577.spfilter,tp,LOCATION_MZONE,0,1,1,nil) - end - else - g=Duel.SelectMatchingCard(tp,c26034577.spfilter,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,1,c) - end - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c26034577.thfilter(c) - return c:IsFaceup() and c:IsAbleToHand() -end -function c26034577.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and c26034577.thfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c26034577.thfilter,tp,0,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g=Duel.SelectTarget(tp,c26034577.thfilter,tp,0,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c26034577.thop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - end -end -function c26034577.rmcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp -end -function c26034577.rmcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsReleasable,1,nil) end - local g=Duel.SelectReleaseGroup(tp,Card.IsReleasable,1,1,nil) - Duel.Release(g,REASON_COST) -end -function c26034577.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(1-tp) and chkc:IsAbleToRemove() end - if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) -end -function c26034577.rmop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) - end -end diff --git a/script/c26046205.lua b/script/c26046205.lua deleted file mode 100644 index 5936a782c4..0000000000 --- a/script/c26046205.lua +++ /dev/null @@ -1,23 +0,0 @@ ---悪シノビ -function c26046205.initial_effect(c) - --draw - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(26046205,0)) - e1:SetCategory(CATEGORY_DRAW) - e1:SetCode(EVENT_BE_BATTLE_TARGET) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCondition(c26046205.condition) - e1:SetTarget(c26046205.target) - e1:SetOperation(c26046205.operation) - c:RegisterEffect(e1) -end -function c26046205.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPosition(POS_FACEUP_ATTACK) -end -function c26046205.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c26046205.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.Draw(tp,1,REASON_EFFECT) -end diff --git a/script/c26057276.lua b/script/c26057276.lua deleted file mode 100644 index 4142484384..0000000000 --- a/script/c26057276.lua +++ /dev/null @@ -1,40 +0,0 @@ ---星因士 ベテルギウス -function c26057276.initial_effect(c) - --tohand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(26057276,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) - e1:SetCountLimit(1,26057276) - e1:SetTarget(c26057276.target) - e1:SetOperation(c26057276.operation) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - c:RegisterEffect(e2) - local e3=e1:Clone() - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e3) -end -function c26057276.filter(c) - return c:IsSetCard(0x9c) and not c:IsCode(26057276) and c:IsAbleToHand() -end -function c26057276.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c26057276.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c26057276.filter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c26057276.filter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c26057276.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.SendtoGrave(c,REASON_EFFECT)~=0 then - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end - end -end diff --git a/script/c26082117.lua b/script/c26082117.lua deleted file mode 100644 index 53311d256a..0000000000 --- a/script/c26082117.lua +++ /dev/null @@ -1,44 +0,0 @@ ---ガガガマジシャン -function c26082117.initial_effect(c) - c:SetUniqueOnField(1,0,26082117) - --lv change - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(26082117,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_MZONE) - e1:SetTarget(c26082117.tg) - e1:SetOperation(c26082117.op) - c:RegisterEffect(e1) - --unsynchroable - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e2:SetValue(1) - c:RegisterEffect(e2) -end -function c26082117.tg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local t={} - local i=1 - local p=1 - local lv=e:GetHandler():GetLevel() - for i=1,8 do - if lv~=i then t[p]=i p=p+1 end - end - t[p]=nil - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(26082117,1)) - e:SetLabel(Duel.AnnounceNumber(tp,table.unpack(t))) -end -function c26082117.op(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFaceup() and c:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CHANGE_LEVEL) - e1:SetValue(e:GetLabel()) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - c:RegisterEffect(e1) - end -end diff --git a/script/c26082229.lua b/script/c26082229.lua deleted file mode 100644 index 1bf3c99298..0000000000 --- a/script/c26082229.lua +++ /dev/null @@ -1,15 +0,0 @@ ---侵略の炎 -function c26082229.initial_effect(c) - --summon success - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetOperation(c26082229.sumsuc) - c:RegisterEffect(e1) -end -function c26082229.sumsuc(e,tp,eg,ep,ev,re,r,rp) - Duel.SetChainLimitTillChainEnd(c26082229.chlimit) -end -function c26082229.chlimit(re,rp,tp) - return not re:GetHandler():IsType(TYPE_TRAP) or not re:IsHasType(EFFECT_TYPE_ACTIVATE) -end diff --git a/script/c26084285.lua b/script/c26084285.lua deleted file mode 100644 index f169fb66dc..0000000000 --- a/script/c26084285.lua +++ /dev/null @@ -1,39 +0,0 @@ ---墓守の監視者 -function c26084285.initial_effect(c) - --Negate - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(26084285,0)) - e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_CHAINING) - e1:SetRange(LOCATION_HAND) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e1:SetCondition(c26084285.condition) - e1:SetCost(c26084285.cost) - e1:SetTarget(c26084285.target) - e1:SetOperation(c26084285.operation) - c:RegisterEffect(e1) -end -function c26084285.condition(e,tp,eg,ep,ev,re,r,rp) - if ep==tp or (not re:IsHasType(EFFECT_TYPE_ACTIVATE) and not re:IsActiveType(TYPE_MONSTER)) - or (not Duel.IsChainNegatable(ev)) then return false end - local ex,tg,tc,p=Duel.GetOperationInfo(ev,CATEGORY_HANDES) - return ex and (p==ep or p==PLAYER_ALL) -end -function c26084285.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end -function c26084285.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) - end -end -function c26084285.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateActivation(ev) - if re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(eg,REASON_EFFECT) - end -end diff --git a/script/c26099457.lua b/script/c26099457.lua deleted file mode 100644 index 5e64f418c6..0000000000 --- a/script/c26099457.lua +++ /dev/null @@ -1,35 +0,0 @@ ---下降潮流 -function c26099457.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c26099457.target) - e1:SetOperation(c26099457.activate) - c:RegisterEffect(e1) -end -function c26099457.filter(c) - return c:IsFaceup() and not c:IsType(TYPE_XYZ) -end -function c26099457.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c26099457.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c26099457.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c26099457.filter,tp,LOCATION_MZONE,0,1,1,nil) - Duel.Hint(HINT_SELECTMSG,tp,567) - local lv=Duel.AnnounceNumber(tp,1,2,3) - e:SetLabel(lv) -end -function c26099457.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CHANGE_LEVEL) - e1:SetValue(e:GetLabel()) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - end -end diff --git a/script/c26120084.lua b/script/c26120084.lua deleted file mode 100644 index 9ef587fdd4..0000000000 --- a/script/c26120084.lua +++ /dev/null @@ -1,37 +0,0 @@ ---スペシャル・デュアル・サモン -function c26120084.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c26120084.target) - e1:SetOperation(c26120084.operation) - c:RegisterEffect(e1) -end -function c26120084.filter(c) - return c:IsFaceup() and c:IsType(TYPE_DUAL) and not c:IsDualState() -end -function c26120084.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c26120084.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c26120084.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - local g=Duel.SelectTarget(tp,c26120084.filter,tp,LOCATION_MZONE,0,1,1,nil) -end -function c26120084.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) and c26120084.filter(tc) then - tc:EnableDualState() - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetOperation(c26120084.thop) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1,true) - end -end -function c26120084.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT) -end diff --git a/script/c26157485.lua b/script/c26157485.lua deleted file mode 100644 index 5503fab078..0000000000 --- a/script/c26157485.lua +++ /dev/null @@ -1,34 +0,0 @@ ---C・シューター -function c26157485.initial_effect(c) - --damage - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(26157485,0)) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCost(c26157485.damcost) - e1:SetTarget(c26157485.damtg) - e1:SetOperation(c26157485.damop) - c:RegisterEffect(e1) -end -function c26157485.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x25) and c:IsAbleToGraveAsCost() -end -function c26157485.damcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c26157485.cfilter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c26157485.cfilter,tp,LOCATION_MZONE,0,1,1,nil) - Duel.SendtoGrave(g,REASON_COST) -end -function c26157485.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(800) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,800) -end -function c26157485.damop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c2618045.lua b/script/c2618045.lua deleted file mode 100644 index 45c079c16b..0000000000 --- a/script/c2618045.lua +++ /dev/null @@ -1,33 +0,0 @@ ---フォトン・チャージマン -function c2618045.initial_effect(c) - --atk - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(2618045,0)) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCost(c2618045.cost) - e1:SetOperation(c2618045.operation) - c:RegisterEffect(e1) -end -function c2618045.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():GetAttackAnnouncedCount()==0 end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e:GetHandler():RegisterEffect(e1,true) -end -function c2618045.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetValue(c:GetBaseAttack()*2) - e1:SetReset(RESET_EVENT+0x1ff0000+RESET_PHASE+PHASE_STANDBY,2) - c:RegisterEffect(e1) - end -end diff --git a/script/c26185991.lua b/script/c26185991.lua deleted file mode 100644 index 6f03dcbcd4..0000000000 --- a/script/c26185991.lua +++ /dev/null @@ -1,35 +0,0 @@ ---代打バッター -function c26185991.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(26185991,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCondition(c26185991.condition) - e1:SetTarget(c26185991.target) - e1:SetOperation(c26185991.operation) - c:RegisterEffect(e1) -end -function c26185991.condition(e,tp,eg,ep,ev,re,r,rp) - local pp=e:GetHandler():GetPreviousControler() - local pl=e:GetHandler():GetPreviousLocation() - return pp==tp and (pl==LOCATION_MZONE or pl==LOCATION_SZONE) -end -function c26185991.filter(c,e,sp) - return c:IsRace(RACE_INSECT) and c:IsCanBeSpecialSummoned(e,0,sp,false,false) -end -function c26185991.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c26185991.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c26185991.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c26185991.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c2619149.lua b/script/c2619149.lua deleted file mode 100644 index ce8aa212da..0000000000 --- a/script/c2619149.lua +++ /dev/null @@ -1,70 +0,0 @@ ---剣闘獣サムニテ -function c2619149.initial_effect(c) - --search - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(2619149,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetCode(EVENT_BATTLE_DESTROYING) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCondition(c2619149.scon) - e1:SetTarget(c2619149.stg) - e1:SetOperation(c2619149.sop) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(2619149,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_PHASE+PHASE_BATTLE) - e2:SetRange(LOCATION_MZONE) - e2:SetCondition(c2619149.spcon) - e2:SetCost(c2619149.spcost) - e2:SetTarget(c2619149.sptg) - e2:SetOperation(c2619149.spop) - c:RegisterEffect(e2) -end -function c2619149.scon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:GetFlagEffect(2619149)>0 and aux.bdogcon(e,tp,eg,ep,ev,re,r,rp) -end -function c2619149.sfilter(c) - return c:IsSetCard(0x19) and c:IsAbleToHand() -end -function c2619149.stg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c2619149.sfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,0) -end -function c2619149.sop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c2619149.sfilter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end -function c2619149.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetBattledGroupCount()>0 -end -function c2619149.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToDeckAsCost() end - Duel.SendtoDeck(c,nil,2,REASON_COST) -end -function c2619149.filter(c,e,tp) - return not c:IsCode(2619149) and c:IsSetCard(0x19) and c:IsCanBeSpecialSummoned(e,108,tp,false,false) -end -function c2619149.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsExistingMatchingCard(c2619149.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c2619149.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c2619149.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - local tc=g:GetFirst() - if tc then - Duel.SpecialSummon(tc,108,tp,tp,false,false,POS_FACEUP) - tc:RegisterFlagEffect(tc:GetOriginalCode(),RESET_EVENT+0x1ff0000,0,0) - end -end diff --git a/script/c26202165.lua b/script/c26202165.lua deleted file mode 100644 index 9e6a51ce2a..0000000000 --- a/script/c26202165.lua +++ /dev/null @@ -1,31 +0,0 @@ ---クリッター -function c26202165.initial_effect(c) - --search - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(26202165,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCondition(c26202165.condition) - e1:SetTarget(c26202165.target) - e1:SetOperation(c26202165.operation) - c:RegisterEffect(e1) -end -function c26202165.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) -end -function c26202165.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c26202165.filter(c) - return c:IsAttackBelow(1500) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() -end -function c26202165.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c26202165.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c26205777.lua b/script/c26205777.lua deleted file mode 100644 index fd578bb345..0000000000 --- a/script/c26205777.lua +++ /dev/null @@ -1,31 +0,0 @@ ---炎帝テスタロス -function c26205777.initial_effect(c) - --handes - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(26205777,0)) - e1:SetCategory(CATEGORY_HANDES+CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetCondition(c26205777.condition) - e1:SetTarget(c26205777.target) - e1:SetOperation(c26205777.operation) - c:RegisterEffect(e1) -end -function c26205777.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_ADVANCE -end -function c26205777.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,1-tp,1) -end -function c26205777.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND) - if g:GetCount()>0 then - local sg=g:RandomSelect(1-tp,1) - Duel.SendtoGrave(sg,REASON_EFFECT+REASON_DISCARD) - local tc=sg:GetFirst() - if tc:IsType(TYPE_MONSTER) then - Duel.Damage(1-tp,tc:GetLevel()*100,REASON_EFFECT) - end - end -end diff --git a/script/c26211048.lua b/script/c26211048.lua deleted file mode 100644 index 544ce205dc..0000000000 --- a/script/c26211048.lua +++ /dev/null @@ -1,70 +0,0 @@ ---甲虫装機 エクサスタッグ -function c26211048.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsRace,RACE_INSECT),5,2) - c:EnableReviveLimit() - --equip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(26211048,0)) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCost(c26211048.eqcost) - e1:SetTarget(c26211048.eqtg) - e1:SetOperation(c26211048.eqop) - c:RegisterEffect(e1) -end -function c26211048.eqcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c26211048.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE+LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsType(TYPE_MONSTER) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingTarget(Card.IsType,tp,0,LOCATION_GRAVE+LOCATION_MZONE,1,nil,TYPE_MONSTER) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local g=Duel.SelectTarget(tp,Card.IsType,tp,0,LOCATION_GRAVE+LOCATION_MZONE,1,1,nil,TYPE_MONSTER) - if g:GetFirst():IsLocation(LOCATION_GRAVE) then - Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g,1,0,0) - end -end -function c26211048.eqop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if not tc:IsRelateToEffect(e) or not tc:IsType(TYPE_MONSTER) then return end - if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or c:IsFacedown() or not c:IsRelateToEffect(e) then - if tc:IsLocation(LOCATION_MZONE) then Duel.SendtoGrave(tc,REASON_EFFECT) end - return - end - Duel.Equip(tp,tc,c,false) - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_COPY_INHERIT+EFFECT_FLAG_OWNER_RELATE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(c26211048.eqlimit) - tc:RegisterEffect(e1) - if tc:IsFaceup() then - local atk=tc:GetTextAttack()/2 - if atk<0 then atk=0 end - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetReset(RESET_EVENT+0x1fe0000) - e2:SetValue(atk) - tc:RegisterEffect(e2) - local def=tc:GetTextDefence()/2 - if def<0 then def=0 end - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_EQUIP) - e3:SetCode(EFFECT_UPDATE_DEFENCE) - e3:SetReset(RESET_EVENT+0x1fe0000) - e3:SetValue(def) - tc:RegisterEffect(e3) - end -end -function c26211048.eqlimit(e,c) - return e:GetOwner()==c -end diff --git a/script/c26254876.lua b/script/c26254876.lua deleted file mode 100644 index 11fe6f18aa..0000000000 --- a/script/c26254876.lua +++ /dev/null @@ -1,10 +0,0 @@ ---デュアル・ランサー -function c26254876.initial_effect(c) - aux.EnableDualAttribute(c) - --pierce - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_PIERCE) - e1:SetCondition(aux.IsDualState) - c:RegisterEffect(e1) -end diff --git a/script/c26257572.lua b/script/c26257572.lua deleted file mode 100644 index 26400f91da..0000000000 --- a/script/c26257572.lua +++ /dev/null @@ -1,25 +0,0 @@ ---苦痛の回廊 -function c26257572.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --disable - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_CANNOT_TRIGGER) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e2:SetTarget(c26257572.target) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EFFECT_DISABLE) - c:RegisterEffect(e3) - local e4=e2:Clone() - e4:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE) - c:RegisterEffect(e4) -end -function c26257572.target(e,c) - return c:GetSummonLocation()==LOCATION_DECK -end diff --git a/script/c26268488.lua b/script/c26268488.lua deleted file mode 100644 index a016c33a53..0000000000 --- a/script/c26268488.lua +++ /dev/null @@ -1,104 +0,0 @@ ---聖珖神竜 スターダスト・シフル -function c26268488.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsType,TYPE_SYNCHRO),aux.NonTuner(Card.IsType,TYPE_SYNCHRO),2) - c:EnableReviveLimit() - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(aux.synlimit) - c:RegisterEffect(e1) - --indes - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EFFECT_DESTROY_REPLACE) - e2:SetRange(LOCATION_MZONE) - e2:SetTarget(c26268488.reptg) - e2:SetValue(c26268488.repval) - c:RegisterEffect(e2) - local g=Group.CreateGroup() - g:KeepAlive() - e2:SetLabelObject(g) - --disable - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(26268488,0)) - e3:SetCategory(CATEGORY_DESTROY+CATEGORY_DISABLE) - e3:SetType(EFFECT_TYPE_QUICK_O) - e3:SetCode(EVENT_CHAINING) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1) - e3:SetCondition(c26268488.discon) - e3:SetTarget(c26268488.distg) - e3:SetOperation(c26268488.disop) - c:RegisterEffect(e3) - --spsummon - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(26268488,1)) - e4:SetCategory(CATEGORY_SPECIAL_SUMMON) - e4:SetType(EFFECT_TYPE_IGNITION) - e4:SetRange(LOCATION_GRAVE) - e4:SetProperty(EFFECT_FLAG_CARD_TARGET) - e4:SetCost(c26268488.spcost) - e4:SetTarget(c26268488.sptg) - e4:SetOperation(c26268488.spop) - c:RegisterEffect(e4) -end -function c26268488.repfilter(c,tp) - return c:IsControler(tp) and c:IsOnField() and c:IsReason(REASON_BATTLE+REASON_EFFECT) and c:GetFlagEffect(26268488)==0 -end -function c26268488.reptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return eg:IsExists(c26268488.repfilter,1,nil,tp) end - local g=eg:Filter(c26268488.repfilter,nil,tp) - local tc=g:GetFirst() - while tc do - tc:RegisterFlagEffect(26268488,RESET_EVENT+0x1fc0000+RESET_PHASE+RESET_END,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(26268488,2)) - tc=g:GetNext() - end - e:GetLabelObject():Clear() - e:GetLabelObject():Merge(g) - return true -end -function c26268488.repval(e,c) - local g=e:GetLabelObject() - return g:IsContains(c) -end -function c26268488.discon(e,tp,eg,ep,ev,re,r,rp) - return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and rp~=tp and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainDisablable(ev) -end -function c26268488.distg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0) - local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c26268488.disop(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateEffect(ev) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectMatchingCard(tp,Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - if g:GetCount()>0 then - Duel.Destroy(g,REASON_EFFECT) - end -end -function c26268488.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) -end -function c26268488.spfilter(c,e,tp) - return c:IsSetCard(0xa3) and c:IsLevelBelow(8) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c26268488.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c26268488.spfilter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c26268488.spfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler(),e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c26268488.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c26268488.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c26270847.lua b/script/c26270847.lua deleted file mode 100644 index e8748b90dd..0000000000 --- a/script/c26270847.lua +++ /dev/null @@ -1,51 +0,0 @@ ---EMシルバー・クロウ -function c26270847.initial_effect(c) - --pendulum summon - aux.AddPendulumProcedure(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --atk - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetRange(LOCATION_PZONE) - e2:SetTargetRange(LOCATION_MZONE,0) - e2:SetTarget(c26270847.atktg) - e2:SetValue(300) - c:RegisterEffect(e2) - --atk - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(26270847,0)) - e3:SetCategory(CATEGORY_ATKCHANGE) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e3:SetCode(EVENT_ATTACK_ANNOUNCE) - e3:SetTarget(c26270847.target) - e3:SetOperation(c26270847.operation) - c:RegisterEffect(e3) -end -function c26270847.atktg(e,c) - return c:IsSetCard(0x9f) -end -function c26270847.filter(c) - return c:IsFaceup() and c:IsSetCard(0x9f) -end -function c26270847.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c26270847.filter,tp,LOCATION_MZONE,0,1,nil) end -end -function c26270847.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c26270847.filter,tp,LOCATION_MZONE,0,nil) - local tc=g:GetFirst() - while tc do - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(300) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_BATTLE) - tc:RegisterEffect(e1) - tc=g:GetNext() - end -end diff --git a/script/c26285788.lua b/script/c26285788.lua deleted file mode 100644 index 6cc6a163ca..0000000000 --- a/script/c26285788.lua +++ /dev/null @@ -1,70 +0,0 @@ ---招来の対価 -function c26285788.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,26285788+EFFECT_COUNT_CODE_OATH) - e1:SetOperation(c26285788.activate) - c:RegisterEffect(e1) - if c26285788.global_effect==nil then - c26285788.global_effect=true - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e1:SetCode(EVENT_RELEASE) - e1:SetOperation(c26285788.addcount) - Duel.RegisterEffect(e1,0) - end -end -function c26285788.addcount(e,tp,eg,ep,ev,re,r,rp) - local c=eg:GetFirst() - while c~=nil do - if not c:IsType(TYPE_TOKEN) then - local p=c:GetReasonPlayer() - Duel.RegisterFlagEffect(p,26285789,RESET_PHASE+PHASE_END,0,1) - end - c=eg:GetNext() - end -end -function c26285788.activate(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetReset(RESET_PHASE+PHASE_END) - e1:SetCountLimit(1) - e1:SetCondition(c26285788.effectcon) - e1:SetOperation(c26285788.effectop) - Duel.RegisterEffect(e1,tp) -end -function c26285788.effectcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetFlagEffect(tp,26285789)>0 -end -function c26285788.filter1(c) - return c:IsType(TYPE_MONSTER) and c:IsAbleToHand() and not c:IsHasEffect(EFFECT_NECRO_VALLEY) -end -function c26285788.filter2(c) - return c:IsFaceup() and c:IsDestructable() -end -function c26285788.effectop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_CARD,0,26285788) - local ct=Duel.GetFlagEffect(tp,26285789) - if ct==1 then - Duel.Draw(tp,1,REASON_EFFECT) - elseif ct==2 then - local g=Duel.GetMatchingGroup(c26285788.filter1,tp,LOCATION_GRAVE,0,nil) - if g:GetCount()>1 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local tg=g:Select(tp,2,2,nil) - Duel.SendtoHand(tg,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tg) - end - else - local g=Duel.GetMatchingGroup(c26285788.filter2,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) - if g:GetCount()>0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local tg=g:Select(tp,1,3,nil) - Duel.Destroy(tg,REASON_EFFECT) - end - end -end diff --git a/script/c26293219.lua b/script/c26293219.lua deleted file mode 100644 index f30a272d98..0000000000 --- a/script/c26293219.lua +++ /dev/null @@ -1,56 +0,0 @@ ---バーニング・スカルヘッド -function c26293219.initial_effect(c) - --damage - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(26293219,0)) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(c26293219.damcon) - e1:SetTarget(c26293219.damtg) - e1:SetOperation(c26293219.damop) - c:RegisterEffect(e1) - --return grave - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(26293219,1)) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCost(c26293219.rtgcost) - e2:SetTarget(c26293219.rtgtg) - e2:SetOperation(c26293219.rtgop) - c:RegisterEffect(e2) -end -function c26293219.damcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_HAND) -end -function c26293219.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(1000) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,1000) -end -function c26293219.damop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end -function c26293219.rtgcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) -end -function c26293219.filter(c) - return c:IsFaceup() and c:IsCode(99899504) -end -function c26293219.rtgtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_REMOVED) and c26293219.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c26293219.filter,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectTarget(tp,c26293219.filter,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,0,0) -end -function c26293219.rtgop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoGrave(tc,REASON_EFFECT+REASON_RETURN) - end -end diff --git a/script/c26302522.lua b/script/c26302522.lua deleted file mode 100644 index b3288140c0..0000000000 --- a/script/c26302522.lua +++ /dev/null @@ -1,70 +0,0 @@ ---スフィア・ボム球体時限爆弾 -function c26302522.initial_effect(c) - --equip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(26302522,0)) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_BATTLE_CONFIRM) - e1:SetCondition(c26302522.eqcon) - e1:SetOperation(c26302522.eqop) - c:RegisterEffect(e1) -end -function c26302522.eqcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetAttackTarget()==e:GetHandler() and e:GetHandler():GetBattlePosition()==POS_FACEDOWN_DEFENCE -end -function c26302522.eqop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetAttacker() - if not tc:IsRelateToBattle() or not c:IsRelateToBattle() then return end - if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or tc:IsFacedown() then - Duel.Destroy(c,REASON_EFFECT) - return - end - Duel.Equip(tp,c,tc) - local e1=Effect.CreateEffect(tc) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(c26302522.eqlimit) - c:RegisterEffect(e1) - --destroy&damage - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(26302522,1)) - e2:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) - e2:SetRange(LOCATION_SZONE) - e2:SetCountLimit(1) - e2:SetCondition(c26302522.descon) - e2:SetTarget(c26302522.destg) - e2:SetOperation(c26302522.desop) - e2:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e2) -end -function c26302522.eqlimit(e,c) - return e:GetOwner()==c -end -function c26302522.descon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp -end -function c26302522.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local ec=e:GetHandler():GetEquipTarget() - ec:CreateEffectRelation(e) - e:SetLabelObject(ec) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,ec,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,ec:GetAttack()) -end -function c26302522.desop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) then return end - local ec=e:GetLabelObject() - if ec:IsRelateToEffect(e) and ec:IsFaceup() then - local atk=ec:GetAttack() - if Duel.Destroy(ec,REASON_EFFECT)~=0 then - Duel.Damage(1-tp,atk,REASON_EFFECT) - else Duel.Destroy(c,REASON_EFFECT) end - end -end diff --git a/script/c26304459.lua b/script/c26304459.lua deleted file mode 100644 index 174d39f39e..0000000000 --- a/script/c26304459.lua +++ /dev/null @@ -1,40 +0,0 @@ ---エンシェント・ゴッド・フレムベル -function c26304459.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_FIRE),aux.NonTuner(Card.IsRace,RACE_PYRO),1) - c:EnableReviveLimit() - --remove - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(26304459,0)) - e1:SetCategory(CATEGORY_REMOVE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(c26304459.remcon) - e1:SetTarget(c26304459.remtg) - e1:SetOperation(c26304459.remop) - c:RegisterEffect(e1) -end -function c26304459.remcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_SYNCHRO -end -function c26304459.remtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,1-tp,LOCATION_GRAVE) -end -function c26304459.remop(e,tp,eg,ep,ev,re,r,rp) - local ht=Duel.GetFieldGroupCount(tp,0,LOCATION_HAND) - if ht==0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local rg=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,ht,nil) - local c=e:GetHandler() - if rg:GetCount()>0 then - Duel.Remove(rg,POS_FACEUP,REASON_EFFECT) - if c:IsFacedown() or not c:IsRelateToEffect(e) then return end - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(rg:GetCount()*200) - e1:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e1) - end -end diff --git a/script/c26329679.lua b/script/c26329679.lua deleted file mode 100644 index cb28ebc8d3..0000000000 --- a/script/c26329679.lua +++ /dev/null @@ -1,41 +0,0 @@ ---セイクリッド・オメガ -function c26329679.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_LIGHT),4,2) - c:EnableReviveLimit() - --immune - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(26329679,0)) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c26329679.cost) - e1:SetOperation(c26329679.operation) - c:RegisterEffect(e1) -end -function c26329679.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c26329679.filter(c) - return c:IsFaceup() and c:IsSetCard(0x53) -end -function c26329679.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c26329679.filter,tp,LOCATION_MZONE,0,nil) - local tc=g:GetFirst() - while tc do - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_IMMUNE_EFFECT) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - e1:SetValue(c26329679.efilter) - tc:RegisterEffect(e1) - tc=g:GetNext() - end -end -function c26329679.efilter(e,te) - return te:IsActiveType(TYPE_SPELL+TYPE_TRAP) -end diff --git a/script/c26345570.lua b/script/c26345570.lua deleted file mode 100644 index c25b084417..0000000000 --- a/script/c26345570.lua +++ /dev/null @@ -1,17 +0,0 @@ ---先史遺産-ピラミッド・アイ・タブレット -function c26345570.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --atk down - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(LOCATION_MZONE,0) - e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x70)) - e2:SetValue(800) - c:RegisterEffect(e2) -end diff --git a/script/c26376390.lua b/script/c26376390.lua deleted file mode 100644 index d1a3a752ad..0000000000 --- a/script/c26376390.lua +++ /dev/null @@ -1,43 +0,0 @@ ---ものマネ幻想師 -function c26376390.initial_effect(c) - --atk def - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(26376390,0)) - e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c26376390.target) - e1:SetOperation(c26376390.operation) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e2) - local e3=e1:Clone() - e3:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - c:RegisterEffect(e3) -end -function c26376390.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil) -end -function c26376390.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - local c=e:GetHandler() - if c:IsFaceup() and c:IsRelateToEffect(e) and tc and tc:IsFaceup() and tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetValue(tc:GetBaseAttack()) - e1:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_SET_DEFENCE_FINAL) - e2:SetValue(tc:GetBaseDefence()) - e2:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e2) - end -end diff --git a/script/c26381750.lua b/script/c26381750.lua deleted file mode 100644 index 5ed32aa9e0..0000000000 --- a/script/c26381750.lua +++ /dev/null @@ -1,35 +0,0 @@ ---紅蓮地帯を飛ぶ鷹 -function c26381750.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(26381750,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_BE_MATERIAL) - e1:SetCondition(c26381750.spcon) - e1:SetTarget(c26381750.sptg) - e1:SetOperation(c26381750.spop) - c:RegisterEffect(e1) -end -function c26381750.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsLocation(LOCATION_GRAVE) and r==REASON_SYNCHRO - and Duel.GetMatchingGroup(Card.IsSetCard,tp,LOCATION_GRAVE,0,nil,0x39):GetClassCount(Card.GetCode)>=3 -end -function c26381750.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c26381750.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetMatchingGroup(Card.IsSetCard,tp,LOCATION_GRAVE,0,nil,0x39):GetClassCount(Card.GetCode)<3 then return end - local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+0x47e0000) - e1:SetValue(LOCATION_REMOVED) - c:RegisterEffect(e1,true) - end -end diff --git a/script/c26400609.lua b/script/c26400609.lua deleted file mode 100644 index 2e70669020..0000000000 --- a/script/c26400609.lua +++ /dev/null @@ -1,122 +0,0 @@ ---瀑征竜-タイダル -function c26400609.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(26400609,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND+LOCATION_GRAVE) - e1:SetCountLimit(1,26400609) - e1:SetCost(c26400609.hspcost) - e1:SetTarget(c26400609.hsptg) - e1:SetOperation(c26400609.hspop) - c:RegisterEffect(e1) - --return - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(26400609,1)) - e2:SetCategory(CATEGORY_TOHAND) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,26400609) - e2:SetCode(EVENT_PHASE+PHASE_END) - e2:SetCondition(c26400609.retcon) - e2:SetTarget(c26400609.rettg) - e2:SetOperation(c26400609.retop) - c:RegisterEffect(e2) - --tograve - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(26400609,2)) - e3:SetCategory(CATEGORY_TOGRAVE) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_HAND) - e3:SetCountLimit(1,26400609) - e3:SetCost(c26400609.tgcost) - e3:SetTarget(c26400609.tgtg) - e3:SetOperation(c26400609.tgop) - c:RegisterEffect(e3) - --search - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(26400609,3)) - e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e4:SetCode(EVENT_REMOVE) - e4:SetCountLimit(1,26400609) - e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e4:SetTarget(c26400609.thtg) - e4:SetOperation(c26400609.thop) - c:RegisterEffect(e4) -end -function c26400609.rfilter(c) - return (c:IsRace(RACE_DRAGON) or c:IsAttribute(ATTRIBUTE_WATER)) and c:IsAbleToRemoveAsCost() -end -function c26400609.hspcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c26400609.rfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,2,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c26400609.rfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,2,2,e:GetHandler()) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c26400609.hsptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c26400609.hspop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) - end -end -function c26400609.retcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp - and bit.band(e:GetHandler():GetSummonType(),SUMMON_TYPE_SPECIAL)==SUMMON_TYPE_SPECIAL -end -function c26400609.rettg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,e:GetHandler(),1,0,0) -end -function c26400609.retop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - Duel.SendtoHand(c,nil,REASON_EFFECT) - end -end -function c26400609.dfilter(c) - return c:IsAttribute(ATTRIBUTE_WATER) and c:IsDiscardable() and c:IsAbleToGraveAsCost() -end -function c26400609.tgcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsDiscardable() and e:GetHandler():IsAbleToGraveAsCost() - and Duel.IsExistingMatchingCard(c26400609.dfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) - local g=Duel.SelectMatchingCard(tp,c26400609.dfilter,tp,LOCATION_HAND,0,1,1,e:GetHandler()) - g:AddCard(e:GetHandler()) - Duel.SendtoGrave(g,REASON_COST+REASON_DISCARD) -end -function c26400609.tgfilter(c) - return c:IsType(TYPE_MONSTER) and c:IsAbleToGrave() -end -function c26400609.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c26400609.tgfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) -end -function c26400609.tgop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c26400609.tgfilter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoGrave(g,REASON_EFFECT) - end -end -function c26400609.thfilter(c) - return c:IsRace(RACE_DRAGON) and c:IsAttribute(ATTRIBUTE_WATER) and c:IsAbleToHand() -end -function c26400609.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c26400609.thfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c26400609.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c26400609.thfilter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c26412047.lua b/script/c26412047.lua deleted file mode 100644 index 8b46f9b478..0000000000 --- a/script/c26412047.lua +++ /dev/null @@ -1,32 +0,0 @@ ---ハンマーシュート -function c26412047.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c26412047.target) - e1:SetOperation(c26412047.activate) - c:RegisterEffect(e1) -end -function c26412047.filter(c) - return c:IsPosition(POS_FACEUP_ATTACK) and c:IsDestructable() -end -function c26412047.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c26412047.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - local g=Duel.GetMatchingGroup(c26412047.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - local tg=g:GetMaxGroup(Card.GetAttack) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,tg,1,0,0) -end -function c26412047.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c26412047.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - if g:GetCount()>0 then - local tg=g:GetMaxGroup(Card.GetAttack) - if tg:GetCount()>1 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local sg=tg:Select(tp,1,1,nil) - Duel.HintSelection(sg) - Duel.Destroy(sg,REASON_EFFECT) - else Duel.Destroy(tg,REASON_EFFECT) end - end -end diff --git a/script/c26439287.lua b/script/c26439287.lua deleted file mode 100644 index 07be0a2911..0000000000 --- a/script/c26439287.lua +++ /dev/null @@ -1,11 +0,0 @@ ---プロト・サイバー・ドラゴン -function c26439287.initial_effect(c) - --code - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CHANGE_CODE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetValue(70095154) - c:RegisterEffect(e1) -end diff --git a/script/c2648201.lua b/script/c2648201.lua deleted file mode 100644 index 863492417d..0000000000 --- a/script/c2648201.lua +++ /dev/null @@ -1,89 +0,0 @@ ---ZW-極星神馬聖鎧 -function c2648201.initial_effect(c) - c:SetUniqueOnField(1,0,2648201) - --equip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(2648201,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetRange(LOCATION_HAND+LOCATION_MZONE) - e1:SetCondition(c2648201.eqcon) - e1:SetTarget(c2648201.eqtg) - e1:SetOperation(c2648201.eqop) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(2648201,1)) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetCondition(c2648201.spcon) - e2:SetTarget(c2648201.sptg) - e2:SetOperation(c2648201.spop) - c:RegisterEffect(e2) -end -function c2648201.eqcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():CheckUniqueOnField(tp) -end -function c2648201.filter(c) - return c:IsFaceup() and c:IsSetCard(0x7f) -end -function c2648201.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c2648201.filter(chkc) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingTarget(c2648201.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c2648201.filter,tp,LOCATION_MZONE,0,1,1,nil) -end -function c2648201.eqop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) then return end - if c:IsLocation(LOCATION_MZONE) and c:IsFacedown() then return end - local tc=Duel.GetFirstTarget() - if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or tc:GetControler()~=tp or tc:IsFacedown() or not tc:IsRelateToEffect(e) or not c:CheckUniqueOnField(tp) then - Duel.SendtoGrave(c,REASON_EFFECT) - return - end - Duel.Equip(tp,c,tc,true) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(c2648201.eqlimit) - e1:SetLabelObject(tc) - c:RegisterEffect(e1) - --atkup - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(1000) - e2:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e2) -end -function c2648201.eqlimit(e,c) - return c==e:GetLabelObject() -end -function c2648201.spcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local ec=c:GetPreviousEquipTarget() - return c:IsReason(REASON_LOST_TARGET) and c:GetPreviousControler()==tp and ec:IsReason(REASON_DESTROY) and ec:GetReasonPlayer()~=tp -end -function c2648201.spfilter(c,e,tp) - return c:IsSetCard(0x7f) and c:IsCanBeSpecialSummoned(e,0,tp,tp,false,false) -end -function c2648201.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c2648201.spfilter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c2648201.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c2648201.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c2648201.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c26493435.lua b/script/c26493435.lua deleted file mode 100644 index e3abb84d30..0000000000 --- a/script/c26493435.lua +++ /dev/null @@ -1,73 +0,0 @@ ---希望郷-オノマトピア- -function c26493435.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --add counter - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetProperty(EFFECT_FLAG_DELAY) - e2:SetRange(LOCATION_SZONE) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetCondition(c26493435.ctcon) - e2:SetOperation(c26493435.ctop) - c:RegisterEffect(e2) - --atk/def - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetCode(EFFECT_UPDATE_ATTACK) - e3:SetRange(LOCATION_SZONE) - e3:SetTargetRange(LOCATION_MZONE,0) - e3:SetValue(c26493435.val) - c:RegisterEffect(e3) - local e4=e3:Clone() - e4:SetCode(EFFECT_UPDATE_DEFENCE) - c:RegisterEffect(e4) - --special summon - local e5=Effect.CreateEffect(c) - e5:SetDescription(aux.Stringid(26493435,0)) - e5:SetCategory(CATEGORY_SPECIAL_SUMMON) - e5:SetType(EFFECT_TYPE_IGNITION) - e5:SetRange(LOCATION_SZONE) - e5:SetCountLimit(1) - e5:SetCost(c26493435.spcost) - e5:SetTarget(c26493435.sptg) - e5:SetOperation(c26493435.spop) - c:RegisterEffect(e5) -end -function c26493435.ctfilter(c,tp) - return c:IsFaceup() and c:IsSetCard(0x7f) and c:IsControler(tp) -end -function c26493435.ctcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c26493435.ctfilter,1,nil,tp) -end -function c26493435.ctop(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():AddCounter(0x30,1) -end -function c26493435.val(e,c) - return e:GetHandler():GetCounter(0x30)*200 -end -function c26493435.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsCanRemoveCounter(tp,0x30,2,REASON_COST) end - e:GetHandler():RemoveCounter(tp,0x30,2,REASON_COST) -end -function c26493435.filter(c,e,tp) - return (c:IsSetCard(0x8f) or c:IsSetCard(0x54) or c:IsSetCard(0x59) or c:IsSetCard(0x82)) - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c26493435.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c26493435.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c26493435.spop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c26493435.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c26495087.lua b/script/c26495087.lua deleted file mode 100644 index a45e4915e5..0000000000 --- a/script/c26495087.lua +++ /dev/null @@ -1,40 +0,0 @@ ---ヴァンパイア・レディ -function c26495087.initial_effect(c) - --to grave - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(26495087,0)) - e1:SetCategory(CATEGORY_TOGRAVE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_BATTLE_DAMAGE) - e1:SetCondition(c26495087.tgcon) - e1:SetTarget(c26495087.tgtg) - e1:SetOperation(c26495087.tgop) - c:RegisterEffect(e1) -end -function c26495087.tgcon(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp -end -function c26495087.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,555) - local op=Duel.SelectOption(tp,70,71,72) - e:SetLabel(op) - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,1-tp,LOCATION_DECK) -end -function c26495087.tgfilter(c,ty) - return c:IsType(ty) and c:IsAbleToGrave() -end -function c26495087.tgop(e,tp,eg,ep,ev,re,r,rp) - local g=nil - Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_TOGRAVE) - if e:GetLabel()==0 then g=Duel.SelectMatchingCard(1-tp,c26495087.tgfilter,1-tp,LOCATION_DECK,0,1,1,nil,TYPE_MONSTER) - elseif e:GetLabel()==1 then g=Duel.SelectMatchingCard(1-tp,c26495087.tgfilter,1-tp,LOCATION_DECK,0,1,1,nil,TYPE_SPELL) - else g=Duel.SelectMatchingCard(1-tp,c26495087.tgfilter,1-tp,LOCATION_DECK,0,1,1,nil,TYPE_TRAP) end - if g:GetCount()~=0 then - Duel.SendtoGrave(g,REASON_EFFECT) - else - local cg=Duel.GetFieldGroup(tp,0,LOCATION_DECK) - Duel.ConfirmCards(tp,cg) - Duel.ShuffleDeck(1-tp) - end -end diff --git a/script/c26509612.lua b/script/c26509612.lua deleted file mode 100644 index 0acfa1ae87..0000000000 --- a/script/c26509612.lua +++ /dev/null @@ -1,51 +0,0 @@ ---アース・グラビティ -function c26509612.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_BATTLE_START) - e1:SetCondition(c26509612.condition) - e1:SetTarget(c26509612.target) - e1:SetOperation(c26509612.activate) - c:RegisterEffect(e1) -end -function c26509612.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp and Duel.GetCurrentPhase()==PHASE_BATTLE -end -function c26509612.filter1(c) - return c:IsFaceup() and c:IsCode(74711057) -end -function c26509612.filter2(c) - return c:IsFaceup() and c:IsLevelBelow(4) -end -function c26509612.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c26509612.filter1,tp,LOCATION_MZONE,0,1,nil) - and Duel.IsExistingMatchingCard(c26509612.filter2,tp,0,LOCATION_MZONE,1,nil) end -end -function c26509612.activate(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_DIRECT_ATTACK) - e1:SetTargetRange(0,LOCATION_MZONE) - e1:SetTarget(c26509612.attg) - e1:SetReset(RESET_PHASE+PHASE_BATTLE) - Duel.RegisterEffect(e1,tp) - local e2=e1:Clone() - e2:SetCode(EFFECT_MUST_ATTACK) - Duel.RegisterEffect(e2,tp) - local e3=Effect.CreateEffect(e:GetHandler()) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetCode(EFFECT_MUST_BE_ATTACKED) - e3:SetTargetRange(LOCATION_MZONE,0) - e3:SetTarget(c26509612.attg2) - e3:SetValue(c26509612.attg) - e3:SetReset(RESET_PHASE+PHASE_BATTLE) - Duel.RegisterEffect(e3,tp) -end -function c26509612.attg(e,c) - return c:IsLevelBelow(4) and not c:IsImmuneToEffect(e) -end -function c26509612.attg2(e,c) - return c:IsCode(74711057) -end diff --git a/script/c26533075.lua b/script/c26533075.lua deleted file mode 100644 index ccd1a9593c..0000000000 --- a/script/c26533075.lua +++ /dev/null @@ -1,61 +0,0 @@ ---セキュリティー・ボール -function c26533075.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_POSITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetCondition(c26533075.condition) - e1:SetTarget(c26533075.target) - e1:SetOperation(c26533075.activate) - c:RegisterEffect(e1) - --Destroy - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(26533075,0)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetCondition(c26533075.descon) - e2:SetTarget(c26533075.destg) - e2:SetOperation(c26533075.desop) - c:RegisterEffect(e2) -end -function c26533075.condition(e,tp,eg,ep,ev,re,r,rp) - return tp~=Duel.GetTurnPlayer() -end -function c26533075.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local tg=Duel.GetAttacker() - if chkc then return chkc==tg end - if chk==0 then return tg:IsOnField() and tg:IsCanBeEffectTarget(e) end - Duel.SetTargetCard(tg) - Duel.SetOperationInfo(0,CATEGORY_POSITION,tg,1,0,0) -end -function c26533075.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsAttackable() and not tc:IsStatus(STATUS_ATTACK_CANCELED) then - Duel.ChangePosition(tc,POS_FACEUP_DEFENCE) - end -end -function c26533075.descon(e,tp,eg,ep,ev,re,r,rp) - return bit.band(r,REASON_DESTROY)~=0 and rp~=tp and re:IsActiveType(TYPE_SPELL+TYPE_TRAP) - and e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) - and e:GetHandler():IsPreviousPosition(POS_FACEDOWN) -end -function c26533075.desfilter(c) - return c:IsDestructable() -end -function c26533075.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c26533075.desfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c26533075.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c26533075.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c26533075.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c26563200.lua b/script/c26563200.lua deleted file mode 100644 index 0162d42830..0000000000 --- a/script/c26563200.lua +++ /dev/null @@ -1,42 +0,0 @@ ---弦魔人ムズムズリズム -function c26563200.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,3,2) - c:EnableReviveLimit() - --attack up - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(26563200,0)) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1,26563200) - e1:SetCondition(c26563200.atkcon) - e1:SetCost(c26563200.atkcost) - e1:SetOperation(c26563200.atkop) - c:RegisterEffect(e1) -end -function c26563200.atkcon(e,tp,eg,ep,ev,re,r,rp) - local ph=Duel.GetCurrentPhase() - if ph~=PHASE_DAMAGE or Duel.IsDamageCalculated() then return false end - local tc=Duel.GetAttacker() - return tc:IsControler(tp) and tc:IsRelateToBattle() and tc:IsSetCard(0x6d) and tc:IsType(TYPE_XYZ) and Duel.GetAttackTarget()~=nil -end -function c26563200.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c26563200.atkop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetAttacker() - if tc:IsRelateToBattle() and tc:IsFaceup() then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e1:SetValue(tc:GetAttack()*2) - tc:RegisterEffect(e1) - end -end diff --git a/script/c26570480.lua b/script/c26570480.lua deleted file mode 100644 index aa0502b4cd..0000000000 --- a/script/c26570480.lua +++ /dev/null @@ -1,80 +0,0 @@ ---マドルチェ・ピョコレート -function c26570480.initial_effect(c) - --to deck - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(26570480,0)) - e1:SetCategory(CATEGORY_TODECK) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCondition(c26570480.retcon) - e1:SetTarget(c26570480.rettg) - e1:SetOperation(c26570480.retop) - c:RegisterEffect(e1) - --pos - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(26570480,1)) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_CHANGE_POS) - e2:SetRange(LOCATION_MZONE) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCountLimit(1) - e2:SetCondition(c26570480.poscon) - e2:SetTarget(c26570480.postg) - e2:SetOperation(c26570480.posop) - c:RegisterEffect(e2) -end -function c26570480.retcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsReason(REASON_DESTROY) and e:GetHandler():GetReasonPlayer()~=tp - and e:GetHandler():GetPreviousControler()==tp -end -function c26570480.rettg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0) -end -function c26570480.retop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_EFFECT) - end -end -function c26570480.cfilter(c,tp) - local np=c:GetPosition() - local pp=c:GetPreviousPosition() - return ((np==POS_FACEUP_DEFENCE and pp==POS_FACEUP_ATTACK) or (bit.band(pp,POS_DEFENCE)~=0 and np==POS_FACEUP_ATTACK)) - and c:IsControler(tp) and c:IsSetCard(0x71) -end -function c26570480.poscon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c26570480.cfilter,1,nil,tp) -end -function c26570480.filter(c) - return not c:IsPosition(POS_FACEUP_DEFENCE) -end -function c26570480.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c26570480.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c26570480.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE) - Duel.SelectTarget(tp,c26570480.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) -end -function c26570480.posop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and not tc:IsPosition(POS_FACEUP_DEFENCE) then - Duel.ChangePosition(tc,POS_FACEUP_DEFENCE) - if not tc:IsSetCard(0x71) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE) - e2:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_DISABLE_EFFECT) - e3:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e3) - end - end -end diff --git a/script/c26586849.lua b/script/c26586849.lua deleted file mode 100644 index d424a08201..0000000000 --- a/script/c26586849.lua +++ /dev/null @@ -1,20 +0,0 @@ ---王宮の牢獄 -function c26586849.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --spsummon limit - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetRange(LOCATION_SZONE) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetTargetRange(1,1) - e1:SetTarget(c26586849.sumlimit) - c:RegisterEffect(e1) -end -function c26586849.sumlimit(e,c,sump,sumtype,sumpos,targetp) - return c:IsLocation(LOCATION_GRAVE) -end diff --git a/script/c26593852.lua b/script/c26593852.lua deleted file mode 100644 index c589966afe..0000000000 --- a/script/c26593852.lua +++ /dev/null @@ -1,28 +0,0 @@ ---A・O・J カタストル -function c26593852.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1) - c:EnableReviveLimit() - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(26593852,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_BATTLE_START) - e1:SetTarget(c26593852.destg) - e1:SetOperation(c26593852.desop) - c:RegisterEffect(e1) -end -function c26593852.destg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - local tc=Duel.GetAttacker() - if tc==c then tc=Duel.GetAttackTarget() end - if chk==0 then return tc and tc:IsFaceup() and tc:IsAttribute(0x5f) end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,tc,1,0,0) -end -function c26593852.desop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetAttacker() - if tc==c then tc=Duel.GetAttackTarget() end - if tc:IsRelateToBattle() then Duel.Destroy(tc,REASON_EFFECT) end -end diff --git a/script/c26640671.lua b/script/c26640671.lua deleted file mode 100644 index de49a3f98c..0000000000 --- a/script/c26640671.lua +++ /dev/null @@ -1,79 +0,0 @@ ---蜘蛛の領域 -function c26640671.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --target - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(26640671,0)) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetRange(LOCATION_SZONE) - e2:SetCountLimit(1) - e2:SetTarget(c26640671.target) - e2:SetOperation(c26640671.operation) - c:RegisterEffect(e2) - -- - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e3:SetRange(LOCATION_SZONE) - e3:SetCode(EVENT_BATTLED) - e3:SetOperation(c26640671.regop) - c:RegisterEffect(e3) - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e4:SetRange(LOCATION_SZONE) - e4:SetCode(EVENT_PHASE+PHASE_BATTLE) - e4:SetCountLimit(1) - e4:SetOperation(c26640671.posop) - c:RegisterEffect(e4) - --poschange - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_FIELD) - e5:SetRange(LOCATION_SZONE) - e5:SetCode(EFFECT_CANNOT_CHANGE_POSITION) - e5:SetTargetRange(0,LOCATION_MZONE) - e5:SetTarget(c26640671.postg) - c:RegisterEffect(e5) -end -function c26640671.filter(c,ec) - return c:IsFaceup() and not ec:IsHasCardTarget(c) and c:IsRace(RACE_INSECT) -end -function c26640671.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c26640671.filter(chkc,e:GetHandler()) end - if chk==0 then return Duel.IsExistingTarget(c26640671.filter,tp,LOCATION_MZONE,0,1,nil,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c26640671.filter,tp,LOCATION_MZONE,0,1,1,nil,e:GetHandler()) -end -function c26640671.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if not c:IsRelateToEffect(e) or not tc:IsRelateToEffect(e) or tc:IsFacedown() then return end - c:SetCardTarget(tc) -end -function c26640671.regop(e,tp,eg,ep,ev,re,r,rp) - local a=Duel.GetAttacker() - local d=Duel.GetAttackTarget() - if d and d:IsControler(1-tp) and e:GetHandler():IsHasCardTarget(a) then - d:RegisterFlagEffect(26640671,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) - elseif d and a:IsControler(1-tp) and e:GetHandler():IsHasCardTarget(d) then - a:RegisterFlagEffect(26640671,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) - end -end -function c26640671.pfilter(c) - return c:GetFlagEffect(26640671)~=0 and c:IsAttackPos() -end -function c26640671.posop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c26640671.pfilter,tp,0,LOCATION_MZONE,nil) - Duel.ChangePosition(g,POS_FACEUP_DEFENCE) - local tc=g:GetFirst() - while tc do - tc:RegisterFlagEffect(26640672,RESET_EVENT+0x1fe0000,0,1) - tc=g:GetNext() - end -end -function c26640671.postg(e,c) - return c:GetFlagEffect(26640672)~=0 -end diff --git a/script/c26647858.lua b/script/c26647858.lua deleted file mode 100644 index 8cd952d566..0000000000 --- a/script/c26647858.lua +++ /dev/null @@ -1,53 +0,0 @@ ---ヒーロー・ヘイロー -function c26647858.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_BATTLE_START) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c26647858.target) - e1:SetOperation(c26647858.operation) - c:RegisterEffect(e1) -end -function c26647858.filter(c) - return c:IsFaceup() and c:IsAttackBelow(1500) and c:IsRace(RACE_WARRIOR) -end -function c26647858.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c26647858.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c26647858.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local g=Duel.SelectTarget(tp,c26647858.filter,tp,LOCATION_MZONE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c26647858.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsLocation(LOCATION_SZONE) then return end - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,c,tc) - c:CancelToGrave() - --Atkup - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_EQUIP) - e1:SetCode(EFFECT_CANNOT_BE_BATTLE_TARGET) - e1:SetValue(c26647858.atval) - e1:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e1) - --Equip limit - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_EQUIP_LIMIT) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetValue(c26647858.eqlimit) - e2:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e2) - end -end -function c26647858.eqlimit(e,c) - return c:IsAttackBelow(1500) and c:IsRace(RACE_WARRIOR) -end -function c26647858.atval(e,c) - return c:IsAttackAbove(1900) and not c:IsImmuneToEffect(e) -end diff --git a/script/c26669055.lua b/script/c26669055.lua deleted file mode 100644 index ea7632126c..0000000000 --- a/script/c26669055.lua +++ /dev/null @@ -1,29 +0,0 @@ ---静寂の聖者 -function c26669055.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(26669055,0)) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_BATTLE_DESTROYING) - e1:SetCondition(aux.bdocon) - e1:SetOperation(c26669055.operation) - c:RegisterEffect(e1) -end -function c26669055.operation(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EFFECT_CANNOT_ACTIVATE) - e1:SetTargetRange(0,1) - e1:SetCondition(c26669055.accon) - e1:SetValue(c26669055.aclimit) - e1:SetLabel(Duel.GetTurnCount()) - e1:SetReset(RESET_PHASE+PHASE_END,2) - Duel.RegisterEffect(e1,tp) -end -function c26669055.accon(e) - return e:GetLabel()~=Duel.GetTurnCount() -end -function c26669055.aclimit(e,re,tp) - return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL) -end diff --git a/script/c26674724.lua b/script/c26674724.lua deleted file mode 100644 index 3fdddc43b2..0000000000 --- a/script/c26674724.lua +++ /dev/null @@ -1,71 +0,0 @@ ---ブリューナクの影霊衣 -function c26674724.initial_effect(c) - c:EnableReviveLimit() - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(aux.ritlimit) - c:RegisterEffect(e1) - --tohand - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(26674724,0)) - e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_HAND) - e2:SetCountLimit(1,26674724) - e2:SetCost(c26674724.thcost) - e2:SetTarget(c26674724.thtg) - e2:SetOperation(c26674724.thop) - c:RegisterEffect(e2) - --todeck - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(26674724,1)) - e3:SetCategory(CATEGORY_TODECK) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1,26674725) - e3:SetTarget(c26674724.tdtg) - e3:SetOperation(c26674724.tdop) - c:RegisterEffect(e3) -end -function c26674724.mat_filter(c) - return not c:IsCode(26674724) -end -function c26674724.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsDiscardable() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD) -end -function c26674724.thfilter(c) - return c:IsSetCard(0xb4) and not c:IsCode(26674724) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() -end -function c26674724.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c26674724.thfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c26674724.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c26674724.thfilter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end -function c26674724.tdfilter(c) - return c:GetSummonLocation()==LOCATION_EXTRA and c:IsAbleToDeck() -end -function c26674724.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c26674724.tdfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c26674724.tdfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectTarget(tp,c26674724.tdfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,2,nil) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0) -end -function c26674724.tdop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) - if g:GetCount()>0 then - Duel.SendtoDeck(g,nil,2,REASON_EFFECT) - end -end diff --git a/script/c26701483.lua b/script/c26701483.lua deleted file mode 100644 index 7b4a8c2da3..0000000000 --- a/script/c26701483.lua +++ /dev/null @@ -1,27 +0,0 @@ ---カードエクスクルーダー -function c26701483.initial_effect(c) - --remove - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(26701483,0)) - e1:SetCategory(CATEGORY_REMOVE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_MZONE) - e1:SetTarget(c26701483.rmtg) - e1:SetOperation(c26701483.rmop) - c:RegisterEffect(e1) -end -function c26701483.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:GetLocation()==LOCATION_GRAVE and chkc:GetControler()~=tp and chkc:IsAbleToRemove() end - if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) -end -function c26701483.rmop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) - end -end diff --git a/script/c26704411.lua b/script/c26704411.lua deleted file mode 100644 index ff8b443b59..0000000000 --- a/script/c26704411.lua +++ /dev/null @@ -1,32 +0,0 @@ ---魔轟神獣コカトル -function c26704411.initial_effect(c) - --draw - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(26704411,0)) - e1:SetCategory(CATEGORY_DRAW) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_BATTLE_DESTROYING) - e1:SetCondition(aux.bdogcon) - e1:SetCost(c26704411.cost) - e1:SetTarget(c26704411.tg) - e1:SetOperation(c26704411.op) - c:RegisterEffect(e1) -end -function c26704411.costfilter(c) - return c:IsSetCard(0x35) and c:IsDiscardable() -end -function c26704411.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c26704411.costfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,c26704411.costfilter,1,1,REASON_DISCARD+REASON_COST) -end -function c26704411.tg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(1) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c26704411.op(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end diff --git a/script/c26708437.lua b/script/c26708437.lua deleted file mode 100644 index 69c0f5f91b..0000000000 --- a/script/c26708437.lua +++ /dev/null @@ -1,32 +0,0 @@ ---エクシーズ・リボーン -function c26708437.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_END_PHASE) - e1:SetTarget(c26708437.target) - e1:SetOperation(c26708437.activate) - c:RegisterEffect(e1) -end -function c26708437.filter(c,e,tp) - return c:IsType(TYPE_XYZ) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c26708437.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c26708437.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c26708437.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c26708437.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c26708437.activate(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)~=0 and c:IsRelateToEffect(e) then - c:CancelToGrave() - Duel.Overlay(tc,Group.FromCards(c)) - end -end diff --git a/script/c2671330.lua b/script/c2671330.lua deleted file mode 100644 index ed1505d835..0000000000 --- a/script/c2671330.lua +++ /dev/null @@ -1,27 +0,0 @@ ---ハイパーハンマーヘッド -function c2671330.initial_effect(c) - --return hand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(2671330,0)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_DAMAGE_STEP_END) - e1:SetCondition(c2671330.retcon) - e1:SetTarget(c2671330.rettg) - e1:SetOperation(c2671330.retop) - c:RegisterEffect(e1) -end -function c2671330.retcon(e,tp,eg,ep,ev,re,r,rp) - local t=e:GetHandler():GetBattleTarget() - e:SetLabelObject(t) - return t and t:IsRelateToBattle() -end -function c2671330.rettg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetLabelObject(),1,0,0) -end -function c2671330.retop(e,tp,eg,ep,ev,re,r,rp) - if e:GetLabelObject():IsRelateToBattle() then - Duel.SendtoHand(e:GetLabelObject(),nil,REASON_EFFECT) - end -end diff --git a/script/c26722601.lua b/script/c26722601.lua deleted file mode 100644 index 8f81c47393..0000000000 --- a/script/c26722601.lua +++ /dev/null @@ -1,26 +0,0 @@ ---インヴェルズの門番 -function c26722601.initial_effect(c) - --extra summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetOperation(c26722601.sumop) - c:RegisterEffect(e1) -end -function c26722601.sumop(e,tp,eg,ep,ev,re,r,rp) - local ec=eg:GetFirst() - local c=e:GetHandler() - if ec~=e:GetHandler() and ec:IsSetCard(0x100a) and ec:GetSummonType()==SUMMON_TYPE_ADVANCE then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(LOCATION_HAND+LOCATION_MZONE,0) - e1:SetCode(EFFECT_EXTRA_SUMMON_COUNT) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_EXTRA_SET_COUNT) - c:RegisterEffect(e2) - end -end diff --git a/script/c26725158.lua b/script/c26725158.lua deleted file mode 100644 index 7442d1f46c..0000000000 --- a/script/c26725158.lua +++ /dev/null @@ -1,23 +0,0 @@ ---悪魔払い -function c26725158.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c26725158.target) - e1:SetOperation(c26725158.activate) - c:RegisterEffect(e1) -end -function c26725158.filter(c) - return c:IsRace(RACE_FIEND) and c:IsFaceup() and c:IsDestructable() -end -function c26725158.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c26725158.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - local sg=Duel.GetMatchingGroup(c26725158.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,sg:GetCount(),0,0) -end -function c26725158.activate(e,tp,eg,ep,ev,re,r,rp) - local sg=Duel.GetMatchingGroup(c26725158.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - Duel.Destroy(sg,REASON_EFFECT) -end diff --git a/script/c26732909.lua b/script/c26732909.lua deleted file mode 100644 index 8643de2b20..0000000000 --- a/script/c26732909.lua +++ /dev/null @@ -1,51 +0,0 @@ ---魔導教士 システィ -function c26732909.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(26732909,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1,26732909) - e1:SetCondition(c26732909.thcon) - e1:SetCost(c26732909.thcost) - e1:SetTarget(c26732909.thtg) - e1:SetOperation(c26732909.thop) - c:RegisterEffect(e1) - Duel.AddCustomActivityCounter(26732909,ACTIVITY_CHAIN,c26732909.chainfilter) -end -function c26732909.chainfilter(re,tp,cid) - return not (re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL) and re:GetHandler():IsSetCard(0x106e)) -end -function c26732909.thcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c26732909.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetCustomActivityCount(26732909,tp,ACTIVITY_CHAIN)>0 and e:GetHandler():IsAbleToRemoveAsCost() end - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) -end -function c26732909.filter1(c) - return c:IsLevelAbove(5) and c:IsAttribute(ATTRIBUTE_LIGHT+ATTRIBUTE_DARK) and c:IsRace(RACE_SPELLCASTER) and c:IsAbleToHand() -end -function c26732909.filter2(c) - return c:IsType(TYPE_SPELL) and c:IsSetCard(0x106e) and c:IsAbleToHand() -end -function c26732909.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c26732909.filter1,tp,LOCATION_DECK,0,1,nil) - and Duel.IsExistingMatchingCard(c26732909.filter2,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,2,tp,LOCATION_DECK) -end -function c26732909.thop(e,tp,eg,ep,ev,re,r,rp) - local g1=Duel.GetMatchingGroup(c26732909.filter1,tp,LOCATION_DECK,0,nil) - local g2=Duel.GetMatchingGroup(c26732909.filter2,tp,LOCATION_DECK,0,nil) - if g1:GetCount()>0 and g2:GetCount()>0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local sg1=g1:Select(tp,1,1,nil) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local sg2=g2:Select(tp,1,1,nil) - sg1:Merge(sg2) - Duel.SendtoHand(sg1,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,sg1) - end -end diff --git a/script/c26775203.lua b/script/c26775203.lua deleted file mode 100644 index fe809ddadc..0000000000 --- a/script/c26775203.lua +++ /dev/null @@ -1,48 +0,0 @@ ---BF-熱風のギブリ -function c26775203.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(26775203,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c26775203.condition) - e1:SetTarget(c26775203.target) - e1:SetOperation(c26775203.operation) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(26775203,1)) - e2:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetCountLimit(1) - e2:SetRange(LOCATION_MZONE) - e2:SetOperation(c26775203.adchange) - c:RegisterEffect(e2) -end -function c26775203.condition(e,tp,eg,ep,ev,re,r,rp) - local at=Duel.GetAttacker() - return at:GetControler()~=tp and Duel.GetAttackTarget()==nil -end -function c26775203.target(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then - return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) - end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0) -end -function c26775203.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) - end -end -function c26775203.adchange(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SWAP_BASE_AD) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - c:RegisterEffect(e1) -end diff --git a/script/c26822796.lua b/script/c26822796.lua deleted file mode 100644 index 3923c7f923..0000000000 --- a/script/c26822796.lua +++ /dev/null @@ -1,53 +0,0 @@ ---帝王の凍志 -function c26822796.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCondition(c26822796.condition) - e1:SetTarget(c26822796.target) - e1:SetOperation(c26822796.activate) - c:RegisterEffect(e1) -end -function c26822796.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetFieldGroupCount(tp,LOCATION_EXTRA,0)==0 -end -function c26822796.filter(c) - return c:IsFaceup() and bit.band(c:GetSummonType(),SUMMON_TYPE_ADVANCE)==SUMMON_TYPE_ADVANCE -end -function c26822796.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c26822796.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c26822796.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c26822796.filter,tp,LOCATION_MZONE,0,1,1,nil) -end -function c26822796.activate(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - Duel.NegateRelatedChain(tc,RESET_TURN_SET) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetValue(RESET_TURN_SET) - e2:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e3:SetRange(LOCATION_MZONE) - e3:SetCode(EFFECT_IMMUNE_EFFECT) - e3:SetValue(c26822796.efilter) - e3:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e3) - end -end -function c26822796.efilter(e,te) - return te:GetOwner()~=e:GetOwner() -end diff --git a/script/c26834022.lua b/script/c26834022.lua deleted file mode 100644 index e264b666a3..0000000000 --- a/script/c26834022.lua +++ /dev/null @@ -1,35 +0,0 @@ ---ディザーム -function c26834022.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY+CATEGORY_TODECK) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_CHAINING) - e1:SetCondition(c26834022.condition) - e1:SetTarget(c26834022.target) - e1:SetOperation(c26834022.activate) - c:RegisterEffect(e1) -end -function c26834022.filter(c) - return c:IsSetCard(0x19) and c:IsAbleToDeck() -end -function c26834022.condition(e,tp,eg,ep,ev,re,r,rp) - return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL) and Duel.IsChainNegatable(ev) -end -function c26834022.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c26834022.filter,tp,LOCATION_HAND,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) - end -end -function c26834022.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectMatchingCard(tp,c26834022.filter,tp,LOCATION_HAND,0,1,1,nil) - if g:GetCount()==0 then return end - Duel.SendtoDeck(g,nil,2,REASON_EFFECT) - Duel.NegateActivation(ev) - if re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(eg,REASON_EFFECT) - end -end diff --git a/script/c26842483.lua b/script/c26842483.lua deleted file mode 100644 index 9f68c59f68..0000000000 --- a/script/c26842483.lua +++ /dev/null @@ -1,28 +0,0 @@ ---ジャスティス・ブリンガー -function c26842483.initial_effect(c) - --negate - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(26842483,0)) - e1:SetCategory(CATEGORY_NEGATE) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCode(EVENT_CHAINING) - e1:SetCondition(c26842483.condition) - e1:SetTarget(c26842483.target) - e1:SetOperation(c26842483.operation) - c:RegisterEffect(e1) -end -function c26842483.condition(e,tp,eg,ep,ev,re,r,rp,chk) - local loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION) - return ep~=tp and loc==LOCATION_MZONE and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainNegatable(ev) - and bit.band(re:GetHandler():GetSummonType(),SUMMON_TYPE_SPECIAL)~=0 -end -function c26842483.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) -end -function c26842483.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateActivation(ev) -end diff --git a/script/c26864586.lua b/script/c26864586.lua deleted file mode 100644 index 91ad5e5b40..0000000000 --- a/script/c26864586.lua +++ /dev/null @@ -1,46 +0,0 @@ ---共振装置 -function c26864586.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c26864586.target) - e1:SetOperation(c26864586.activate) - c:RegisterEffect(e1) -end -function c26864586.filter1(c,tp) - local lv1=c:GetLevel() - return lv1>0 and c:IsFaceup() and Duel.IsExistingTarget(c26864586.filter2,tp,LOCATION_MZONE,0,1,c,c:GetRace(),c:GetAttribute(),lv1) -end -function c26864586.filter2(c,rc,at,lv1) - local lv2=c:GetLevel() - return lv2>0 and lv2~=lv1 and c:IsFaceup() and c:IsRace(rc) and c:IsAttribute(at) -end -function c26864586.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - if chk==0 then return Duel.IsExistingTarget(c26864586.filter1,tp,LOCATION_MZONE,0,1,nil,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - local g1=Duel.SelectTarget(tp,c26864586.filter1,tp,LOCATION_MZONE,0,1,1,nil,tp) - local tc1=g1:GetFirst() - e:SetLabelObject(tc1) - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(26864586,0)) - local g2=Duel.SelectTarget(tp,c26864586.filter2,tp,LOCATION_MZONE,0,1,1,tc1,tc1:GetRace(),tc1:GetAttribute(),tc1:GetLevel()) -end -function c26864586.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local tc1=e:GetLabelObject() - local tc2=g:GetFirst() - if tc1==tc2 then tc2=g:GetNext() end - local lv1=tc1:GetLevel() - local lv2=tc2:GetLevel() - if lv1==lv2 then return end - if tc1:IsFaceup() and tc1:IsRelateToEffect(e) and tc2:IsFaceup() and tc2:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CHANGE_LEVEL) - e1:SetValue(lv1) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc2:RegisterEffect(e1) - end -end diff --git a/script/c26885836.lua b/script/c26885836.lua deleted file mode 100644 index f8a9786c0a..0000000000 --- a/script/c26885836.lua +++ /dev/null @@ -1,60 +0,0 @@ ---H・C ウォー・ハンマー -function c26885836.initial_effect(c) - --equip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(26885836,0)) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetCode(EVENT_BATTLE_DESTROYING) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCondition(c26885836.eqcon) - e1:SetTarget(c26885836.eqtg) - e1:SetOperation(c26885836.eqop) - c:RegisterEffect(e1) -end -function c26885836.eqcon(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetHandler():GetBattleTarget() - e:SetLabelObject(tc) - return aux.bdogcon(e,tp,eg,ep,ev,re,r,rp) -end -function c26885836.eqtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return not e:GetHandler():IsHasEffect(26885836) - and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 end - local tc=e:GetLabelObject() - Duel.SetTargetCard(tc) - Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,tc,1,0,0) -end -function c26885836.eqop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and c:IsFaceup() and tc:IsRelateToEffect(e) then - local atk=tc:GetBaseAttack() - if atk<0 then atk=0 end - if not Duel.Equip(tp,tc,c,false) then return end - --Add Equip limit - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_COPY_INHERIT+EFFECT_FLAG_OWNER_RELATE) - e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(c26885836.eqlimit) - tc:RegisterEffect(e1) - if atk>0 then - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_OWNER_RELATE) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetReset(RESET_EVENT+0x1fe0000) - e2:SetValue(atk) - tc:RegisterEffect(e2) - end - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_EQUIP) - e3:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_CANNOT_DISABLE) - e3:SetCode(26885836) - e3:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e3) - end -end -function c26885836.eqlimit(e,c) - return e:GetOwner()==c -end \ No newline at end of file diff --git a/script/c269012.lua b/script/c269012.lua deleted file mode 100644 index f8843c47a6..0000000000 --- a/script/c269012.lua +++ /dev/null @@ -1,86 +0,0 @@ ---神縛りの塚 -function c269012.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --cannot be target - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e2:SetTarget(c269012.target) - e2:SetValue(aux.tgval) - c:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - e3:SetRange(LOCATION_SZONE) - e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e3:SetTarget(c269012.target) - e3:SetValue(1) - c:RegisterEffect(e3) - --damage - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(269012,0)) - e4:SetCategory(CATEGORY_DAMAGE) - e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e4:SetCode(EVENT_BATTLE_DESTROYED) - e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e4:SetRange(LOCATION_SZONE) - e4:SetCondition(c269012.damcon) - e4:SetTarget(c269012.damtg) - e4:SetOperation(c269012.damop) - c:RegisterEffect(e4) - --search - local e5=Effect.CreateEffect(c) - e5:SetDescription(aux.Stringid(269012,0)) - e5:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e5:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e5:SetCode(EVENT_TO_GRAVE) - e5:SetCondition(c269012.thcon) - e5:SetTarget(c269012.thtg) - e5:SetOperation(c269012.thop) - c:RegisterEffect(e5) -end -function c269012.target(e,c) - return c:IsLevelAbove(10) -end -function c269012.damcon(e,tp,eg,ep,ev,re,r,rp) - local des=eg:GetFirst() - local rc=des:GetReasonCard() - return des:IsLocation(LOCATION_GRAVE) and des:IsType(TYPE_MONSTER) and rc:IsRelateToBattle() and rc:IsLevelAbove(10) -end -function c269012.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local damp=eg:GetFirst():GetPreviousControler() - Duel.SetTargetPlayer(damp) - Duel.SetTargetParam(1000) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,damp,1000) -end -function c269012.damop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local p,v=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,v,REASON_EFFECT) -end -function c269012.thcon(e,tp,eg,ep,ev,re,r,rp) - return bit.band(r,0x41)==0x41 and e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) -end -function c269012.filter(c) - return c:IsAttribute(ATTRIBUTE_DEVINE) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() -end -function c269012.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c269012.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c269012.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c269012.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c26902560.lua b/script/c26902560.lua deleted file mode 100644 index 5d00bc417c..0000000000 --- a/script/c26902560.lua +++ /dev/null @@ -1,26 +0,0 @@ ---融合賢者 -function c26902560.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c26902560.target) - e1:SetOperation(c26902560.activate) - c:RegisterEffect(e1) -end -function c26902560.filter(c) - return c:IsCode(24094653) and c:IsAbleToHand() -end -function c26902560.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c26902560.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c26902560.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c26902560.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c26905245.lua b/script/c26905245.lua deleted file mode 100644 index 6e39e732d8..0000000000 --- a/script/c26905245.lua +++ /dev/null @@ -1,31 +0,0 @@ ---メタル・リフレクト・スライム -function c26905245.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c26905245.target) - e1:SetOperation(c26905245.activate) - c:RegisterEffect(e1) -end -function c26905245.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and - Duel.IsPlayerCanSpecialSummonMonster(tp,26905245,0,0x21,0,3000,10,RACE_AQUA,ATTRIBUTE_WATER) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c26905245.activate(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) then return end - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 - or not Duel.IsPlayerCanSpecialSummonMonster(tp,26905245,0,0x21,0,3000,10,RACE_AQUA,ATTRIBUTE_WATER) then return end - c:AddTrapMonsterAttribute(TYPE_EFFECT,ATTRIBUTE_WATER,RACE_AQUA,10,0,3000) - Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP_DEFENCE) - c:TrapMonsterBlock() - --cannot attack - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e1) -end diff --git a/script/c26920296.lua b/script/c26920296.lua deleted file mode 100644 index 91f69e4df2..0000000000 --- a/script/c26920296.lua +++ /dev/null @@ -1,119 +0,0 @@ ---幻夢境 -function c26920296.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,26920296) - c:RegisterEffect(e1) - --draw - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(26920296,0)) - e2:SetCategory(CATEGORY_DRAW) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetRange(LOCATION_FZONE) - e2:SetCountLimit(1) - e2:SetCondition(c26920296.drcon) - e2:SetTarget(c26920296.drtg) - e2:SetOperation(c26920296.drop) - c:RegisterEffect(e2) - --lv - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(26920296,1)) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_SUMMON_SUCCESS) - e3:SetRange(LOCATION_FZONE) - e3:SetCondition(c26920296.lvcon) - e3:SetTarget(c26920296.lvtg) - e3:SetOperation(c26920296.lvop) - c:RegisterEffect(e3) - local e4=e3:Clone() - e4:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e4) - --destroy - local e5=Effect.CreateEffect(c) - e5:SetDescription(aux.Stringid(26920296,2)) - e5:SetCategory(CATEGORY_DESTROY) - e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e5:SetRange(LOCATION_FZONE) - e5:SetCode(EVENT_PHASE+PHASE_END) - e5:SetCountLimit(1) - e5:SetCondition(c26920296.descon) - e5:SetTarget(c26920296.destg) - e5:SetOperation(c26920296.desop) - c:RegisterEffect(e5) -end -function c26920296.cfilter(c,type) - return c:IsFaceup() and c:IsType(type) -end -function c26920296.drcfilter(c,tp) - return c:IsPreviousLocation(LOCATION_HAND+LOCATION_MZONE) and c:IsType(TYPE_MONSTER) and c:IsReason(REASON_EFFECT) and c:GetPreviousControler()==tp -end -function c26920296.drcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c26920296.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,TYPE_FUSION) - and eg:IsExists(c26920296.drcfilter,1,nil,tp) -end -function c26920296.drtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(1) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) - Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) -end -function c26920296.drop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end -function c26920296.lvcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c26920296.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,TYPE_SYNCHRO) -end -function c26920296.lvfilter(c) - return c:IsFaceup() and c:GetLevel()>0 -end -function c26920296.lvtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return eg:IsExists(c26920296.lvfilter,1,nil) end - Duel.SetTargetCard(eg) - Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) -end -function c26920296.lvop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local g=eg:Filter(c26920296.lvfilter,nil):Filter(Card.IsRelateToEffect,nil,e) - local tc=g:GetFirst() - while tc do - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_LEVEL) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(1) - tc:RegisterEffect(e1) - tc=g:GetNext() - end -end -function c26920296.descon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c26920296.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,TYPE_XYZ) - and Duel.GetTurnPlayer()==tp -end -function c26920296.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) - local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - if g:GetCount()==0 then return end - local mg,lv=g:GetMaxGroup(Card.GetLevel) - if lv==0 then return end - local dg=mg:Filter(Card.IsDestructable,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,dg,dg:GetCount(),0,0) -end -function c26920296.desop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - if g:GetCount()==0 then return end - local mg,lv=g:GetMaxGroup(Card.GetLevel) - if lv==0 then return end - local dg=mg:Filter(Card.IsDestructable,nil) - if dg:GetCount()>0 then - Duel.Destroy(dg,REASON_EFFECT) - end -end diff --git a/script/c26931058.lua b/script/c26931058.lua deleted file mode 100644 index 891e29efd2..0000000000 --- a/script/c26931058.lua +++ /dev/null @@ -1,63 +0,0 @@ ---フォーメーション・ユニオン -function c26931058.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c26931058.eftg) - e1:SetOperation(c26931058.efop) - c:RegisterEffect(e1) -end -function c26931058.filter1(c,tp) - return c:IsFaceup() and c:IsType(TYPE_UNION) - and Duel.IsExistingTarget(c26931058.filter2,tp,LOCATION_MZONE,0,1,c,c) -end -function c26931058.filter2(c,ec) - return c:IsFaceup() and ec:CheckEquipTarget(c) -end -function c26931058.filter3(c,e,tp) - return c:IsFaceup() and c:IsStatus(STATUS_UNION) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c26931058.eftg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - local b1=Duel.IsExistingMatchingCard(c26931058.filter1,tp,LOCATION_MZONE,0,1,nil,tp) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - local b2=Duel.IsExistingMatchingCard(c26931058.filter3,tp,LOCATION_SZONE,0,1,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - if chk==0 then return b1 or b2 end - local op=0 - if b1 and b2 then - op=Duel.SelectOption(tp,aux.Stringid(26931058,0),aux.Stringid(26931058,1)) - elseif b1 then - op=Duel.SelectOption(tp,aux.Stringid(26931058,0)) - else op=Duel.SelectOption(tp,aux.Stringid(26931058,1))+1 end - e:SetLabel(op) - if op==0 then - e:SetCategory(CATEGORY_EQUIP) - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(26931058,2)) - local g1=Duel.SelectTarget(tp,c26931058.filter1,tp,LOCATION_MZONE,0,1,1,nil,tp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local g2=Duel.SelectTarget(tp,c26931058.filter2,tp,LOCATION_MZONE,0,1,1,g1:GetFirst(),g1:GetFirst()) - e:SetLabelObject(g1:GetFirst()) - else - e:SetCategory(CATEGORY_SPECIAL_SUMMON) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c26931058.filter3,tp,LOCATION_SZONE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) - end -end -function c26931058.efop(e,tp,eg,ep,ev,re,r,rp) - if e:GetLabel()==0 then - local tc1=e:GetLabelObject() - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local tc2=g:GetFirst() - if tc1==tc2 then tc2=g:GetNext() end - if tc1:IsFaceup() and tc2:IsFaceup() and tc1:IsRelateToEffect(e) and tc2:IsRelateToEffect(e) and Duel.Equip(tp,tc1,tc2,false) then - tc1:SetStatus(STATUS_UNION,true) - end - else - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_ATTACK) - end - end -end diff --git a/script/c26932788.lua b/script/c26932788.lua deleted file mode 100644 index 88bb7b9216..0000000000 --- a/script/c26932788.lua +++ /dev/null @@ -1,4 +0,0 @@ ---ジャベリンビートル -function c26932788.initial_effect(c) - c:EnableReviveLimit() -end diff --git a/script/c2694423.lua b/script/c2694423.lua deleted file mode 100644 index 99716ef388..0000000000 --- a/script/c2694423.lua +++ /dev/null @@ -1,47 +0,0 @@ ---メデューサ・ワーム -function c2694423.initial_effect(c) - --turn set - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(2694423,0)) - e1:SetCategory(CATEGORY_POSITION) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetTarget(c2694423.target) - e1:SetOperation(c2694423.operation) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(2694423,1)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - e2:SetTarget(c2694423.destg) - e2:SetOperation(c2694423.desop) - c:RegisterEffect(e2) -end -function c2694423.target(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsCanTurnSet() and c:GetFlagEffect(2694423)==0 end - c:RegisterFlagEffect(2694423,RESET_EVENT+0x1fc0000+RESET_PHASE+PHASE_END,0,1) - Duel.SetOperationInfo(0,CATEGORY_POSITION,c,1,0,0) -end -function c2694423.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - Duel.ChangePosition(c,POS_FACEDOWN_DEFENCE) - end -end -function c2694423.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsDestructable() end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c2694423.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/script/c26949946.lua b/script/c26949946.lua deleted file mode 100644 index 484743c1ed..0000000000 --- a/script/c26949946.lua +++ /dev/null @@ -1,82 +0,0 @@ ---幻獣機ヤクルスラーン -function c26949946.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0x101b),aux.NonTuner(Card.IsSetCard,0x101b),1) - c:EnableReviveLimit() - --handes - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(26949946,0)) - e1:SetCategory(CATEGORY_HANDES) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(c26949946.hdcon) - e1:SetCost(c26949946.hdcost) - e1:SetTarget(c26949946.hdtg) - e1:SetOperation(c26949946.hdop) - c:RegisterEffect(e1) - --indes - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e2:SetRange(LOCATION_MZONE) - e2:SetTargetRange(LOCATION_MZONE,0) - e2:SetTarget(c26949946.indtg) - e2:SetValue(1) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - c:RegisterEffect(e3) - --set - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(26949946,1)) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e4:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP) - e4:SetCode(EVENT_DESTROYED) - e4:SetCondition(c26949946.setcon) - e4:SetTarget(c26949946.settg) - e4:SetOperation(c26949946.setop) - c:RegisterEffect(e4) -end -function c26949946.hdcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_SYNCHRO -end -function c26949946.hdcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsCode,1,nil,31533705) - and Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0 end - local ct=Duel.GetFieldGroupCount(tp,0,LOCATION_HAND) - local g=Duel.SelectReleaseGroup(tp,Card.IsCode,1,ct,nil,31533705) - e:SetLabel(g:GetCount()) - Duel.Release(g,REASON_COST) -end -function c26949946.hdtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_HANDES,0,0,1-tp,e:GetLabel()) -end -function c26949946.hdop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND) - if g:GetCount()>0 then - local sg=g:RandomSelect(1-tp,e:GetLabel()) - Duel.SendtoGrave(sg,REASON_DISCARD+REASON_EFFECT) - end -end -function c26949946.indtg(e,c) - return c:IsSetCard(0x101b) and c~=e:GetHandler() -end -function c26949946.setcon(e,tp,eg,ep,ev,re,r,rp) - return rp~=tp and e:GetHandler():GetPreviousControler()==tp -end -function c26949946.filter(c) - return c:GetType()==TYPE_SPELL+TYPE_QUICKPLAY and c:IsSSetable() -end -function c26949946.settg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingMatchingCard(c26949946.filter,tp,LOCATION_DECK,0,1,nil) end -end -function c26949946.setop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) - local g=Duel.SelectMatchingCard(tp,c26949946.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SSet(tp,g:GetFirst()) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c26956670.lua b/script/c26956670.lua deleted file mode 100644 index 884a490360..0000000000 --- a/script/c26956670.lua +++ /dev/null @@ -1,59 +0,0 @@ ---化石岩の解放 -function c26956670.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_END_PHASE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c26956670.target) - e1:SetOperation(c26956670.operation) - c:RegisterEffect(e1) - --Destroy - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE) - e2:SetCode(EVENT_LEAVE_FIELD) - e2:SetOperation(c26956670.desop) - c:RegisterEffect(e2) - --Destroy2 - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e3:SetRange(LOCATION_SZONE) - e3:SetCode(EVENT_LEAVE_FIELD) - e3:SetCondition(c26956670.descon2) - e3:SetOperation(c26956670.desop2) - c:RegisterEffect(e3) -end -function c26956670.filter(c,e,tp) - return c:IsFaceup() and c:IsRace(RACE_ROCK) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c26956670.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:GetLocation()==LOCATION_REMOVED and chkc:GetControler()==tp and c26956670.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c26956670.filter,tp,LOCATION_REMOVED,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c26956670.filter,tp,LOCATION_REMOVED,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c26956670.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then - if Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)==0 then return end - c:SetCardTarget(tc) - end -end -function c26956670.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetHandler():GetFirstCardTarget() - if tc and tc:IsLocation(LOCATION_MZONE) then - Duel.Destroy(tc,REASON_EFFECT) - end -end -function c26956670.descon2(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetHandler():GetFirstCardTarget() - return tc and eg:IsContains(tc) and tc:IsReason(REASON_DESTROY) -end -function c26956670.desop2(e,tp,eg,ep,ev,re,r,rp) - Duel.Destroy(e:GetHandler(),REASON_EFFECT) -end diff --git a/script/c26993374.lua b/script/c26993374.lua deleted file mode 100644 index 25146beefd..0000000000 --- a/script/c26993374.lua +++ /dev/null @@ -1,35 +0,0 @@ ---X-セイバー ウルズ -function c26993374.initial_effect(c) - --to deck - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(26993374,0)) - e1:SetCategory(CATEGORY_TODECK) - e1:SetCode(EVENT_BATTLE_DESTROYING) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCondition(c26993374.tdcon) - e1:SetCost(c26993374.tdcost) - e1:SetTarget(c26993374.tdtg) - e1:SetOperation(c26993374.tdop) - c:RegisterEffect(e1) -end -function c26993374.tdcon(e,tp,eg,ep,ev,re,r,rp) - local t=e:GetHandler():GetBattleTarget() - e:SetLabelObject(t) - return aux.bdogcon(e,tp,eg,ep,ev,re,r,rp) -end -function c26993374.tdcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end -function c26993374.tdtg(e,tp,eg,ep,ev,re,r,rp,chk) - local t=e:GetLabelObject() - if chk==0 then return t:IsAbleToDeck() end - t:CreateEffectRelation(e) - Duel.SetOperationInfo(0,CATEGORY_TODECK,t,1,0,0) -end -function c26993374.tdop(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetLabelObject() - if tc:IsRelateToEffect(e) then - Duel.SendtoDeck(tc,nil,0,REASON_EFFECT) - end -end diff --git a/script/c27004302.lua b/script/c27004302.lua deleted file mode 100644 index a449419849..0000000000 --- a/script/c27004302.lua +++ /dev/null @@ -1,27 +0,0 @@ ---ジェムレシス -function c27004302.initial_effect(c) - --search - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(27004302,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c27004302.target) - e1:SetOperation(c27004302.operation) - c:RegisterEffect(e1) -end -function c27004302.filter(c) - return c:IsSetCard(0x1047) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() -end -function c27004302.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c27004302.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,LOCATION_DECK) -end -function c27004302.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c27004302.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c27053506.lua b/script/c27053506.lua deleted file mode 100644 index 792310b9de..0000000000 --- a/script/c27053506.lua +++ /dev/null @@ -1,25 +0,0 @@ ---仕込みマシンガン -function c27053506.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_DRAW_PHASE) - e1:SetTarget(c27053506.target) - e1:SetOperation(c27053506.activate) - c:RegisterEffect(e1) -end -function c27053506.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,0,0xe,1,nil) end - Duel.SetTargetPlayer(1-tp) - local dam=Duel.GetFieldGroupCount(1-tp,0xe,0)*200 - Duel.SetTargetParam(dam) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,dam) -end -function c27053506.activate(e,tp,eg,ep,ev,re,r,rp) - local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) - local dam=Duel.GetFieldGroupCount(1-tp,0xe,0)*200 - Duel.Damage(p,dam,REASON_EFFECT) -end diff --git a/script/c27062594.lua b/script/c27062594.lua deleted file mode 100644 index b76421ce5a..0000000000 --- a/script/c27062594.lua +++ /dev/null @@ -1,82 +0,0 @@ ---運命の扉 -function c27062594.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetCondition(c27062594.condition) - e1:SetTarget(c27062594.target) - e1:SetOperation(c27062594.activate) - c:RegisterEffect(e1) -end -function c27062594.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetAttacker():IsControler(1-tp) and Duel.GetAttackTarget()==nil -end -function c27062594.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsPlayerCanSpecialSummonMonster(tp,27062594,0,0x21,0,0,1,RACE_FIEND,ATTRIBUTE_LIGHT) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c27062594.activate(e,tp,eg,ep,ev,re,r,rp) - if not Duel.NegateAttack() then return end - Duel.BreakEffect() - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local c=e:GetHandler() - if not c:IsRelateToEffect(e) - or not Duel.IsPlayerCanSpecialSummonMonster(tp,27062594,0,0x21,0,0,1,RACE_FIEND,ATTRIBUTE_LIGHT) then return end - c:AddTrapMonsterAttribute(TYPE_EFFECT,ATTRIBUTE_LIGHT,RACE_FIEND,1,0,0) - Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP) - c:TrapMonsterBlock() - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(27062594,0)) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) - e1:SetCondition(c27062594.damcon) - e1:SetCost(c27062594.damcost) - e1:SetTarget(c27062594.damtg) - e1:SetOperation(c27062594.damop) - e1:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e1) -end -function c27062594.damcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c27062594.cfilter(c) - return c:IsSetCard(0x7f) and c:IsAbleToRemoveAsCost() -end -function c27062594.damcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c27062594.cfilter,tp,LOCATION_GRAVE,0,1,nil) end - local g=Duel.GetMatchingGroup(c27062594.cfilter,tp,LOCATION_GRAVE,0,nil) - local rg=Group.CreateGroup() - repeat - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local sg=g:Select(tp,1,1,nil) - g:Remove(Card.IsCode,nil,sg:GetFirst():GetCode()) - rg:Merge(sg) - until g:GetCount()==0 or not Duel.SelectYesNo(tp,aux.Stringid(27062594,1)) - local ct=Duel.Remove(rg,POS_FACEUP,REASON_COST) - e:SetLabel(ct) -end -function c27062594.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(e:GetLabel()*500) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,e:GetLabel()*500) -end -function c27062594.damop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - local val=Duel.Damage(p,d,REASON_EFFECT) - local c=e:GetHandler() - if c:IsFaceup() and c:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(val) - e1:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e1) - end -end diff --git a/script/c27068117.lua b/script/c27068117.lua deleted file mode 100644 index a7df21a40d..0000000000 --- a/script/c27068117.lua +++ /dev/null @@ -1,38 +0,0 @@ ---オーバーレイ・リジェネレート -function c27068117.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c27068117.cost) - e1:SetTarget(c27068117.target) - e1:SetOperation(c27068117.activate) - c:RegisterEffect(e1) -end -function c27068117.cost(e,tp,eg,ep,ev,re,r,rp,chk) - e:SetLabel(1) - return true -end -function c27068117.filter(c) - return c:IsFaceup() and c:IsType(TYPE_XYZ) -end -function c27068117.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c27068117.filter(chkc) end - if chk==0 then - if e:GetLabel()==0 then return false end - e:SetLabel(0) - return Duel.IsExistingTarget(c27068117.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) - end - e:SetLabel(0) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - Duel.SelectTarget(tp,c27068117.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) -end -function c27068117.activate(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() and not tc:IsImmuneToEffect(e) and c:IsRelateToEffect(e) then - c:CancelToGrave() - Duel.Overlay(tc,Group.FromCards(c)) - end -end diff --git a/script/c27132350.lua b/script/c27132350.lua deleted file mode 100644 index 2731fd1ff6..0000000000 --- a/script/c27132350.lua +++ /dev/null @@ -1,29 +0,0 @@ ---ファイヤーソーサラー -function c27132350.initial_effect(c) - --flip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(27132350,0)) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP) - e1:SetCost(c27132350.cost) - e1:SetTarget(c27132350.target) - e1:SetOperation(c27132350.operation) - c:RegisterEffect(e1) -end -function c27132350.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemoveAsCost,tp,LOCATION_HAND,0,2,nil) end - local g=Duel.GetMatchingGroup(Card.IsAbleToRemoveAsCost,tp,LOCATION_HAND,0,nil) - local rg=g:RandomSelect(tp,2) - Duel.Remove(rg,POS_FACEUP,REASON_COST) -end -function c27132350.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(800) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,800) -end -function c27132350.operation(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c27134689.lua b/script/c27134689.lua deleted file mode 100644 index f05b1cf708..0000000000 --- a/script/c27134689.lua +++ /dev/null @@ -1,6 +0,0 @@ ---マスター・オブ・OZ -function c27134689.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcCode2(c,42129512,78613627,true,true) -end diff --git a/script/c27143874.lua b/script/c27143874.lua deleted file mode 100644 index 702a19717d..0000000000 --- a/script/c27143874.lua +++ /dev/null @@ -1,45 +0,0 @@ ---ダイナソーイング -function c27143874.initial_effect(c) - --indes - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e1:SetValue(1) - c:RegisterEffect(e1) - --atk/def up - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(27143874,0)) - e2:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_BE_BATTLE_TARGET) - e2:SetOperation(c27143874.operation) - c:RegisterEffect(e2) - --atk clear - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(27143874,1)) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e3:SetCode(EVENT_BATTLED) - e3:SetCondition(c27143874.retcon) - e3:SetOperation(c27143874.retop) - c:RegisterEffect(e3) -end -function c27143874.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(1000) - e1:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_UPDATE_DEFENCE) - c:RegisterEffect(e2) - end -end -function c27143874.retcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetAttacker()==e:GetHandler() -end -function c27143874.retop(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():ResetEffect(RESET_DISABLE,RESET_EVENT) -end diff --git a/script/c27174286.lua b/script/c27174286.lua deleted file mode 100644 index 4539158fdd..0000000000 --- a/script/c27174286.lua +++ /dev/null @@ -1,67 +0,0 @@ ---異次元からの帰還 -function c27174286.initial_effect(c) - --activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c27174286.cost) - e1:SetTarget(c27174286.tg) - e1:SetOperation(c27174286.op) - c:RegisterEffect(e1) -end -function c27174286.filter(c,e,tp) - return c:IsFaceup() and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c27174286.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.PayLPCost(tp,math.floor(Duel.GetLP(tp)/2)) -end -function c27174286.tg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c27174286.filter,tp,LOCATION_REMOVED,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_REMOVED) -end -function c27174286.op(e,tp,eg,ep,ev,re,r,rp) - local ft1=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ft1<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c27174286.filter,tp,LOCATION_REMOVED,0,ft1,ft1,nil,e,tp) - if g:GetCount()>0 then - local fid=e:GetHandler():GetFieldID() - local tc=g:GetFirst() - while tc do - Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) - tc:RegisterFlagEffect(27174286,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1,fid) - tc=g:GetNext() - end - Duel.SpecialSummonComplete() - g:KeepAlive() - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e1:SetCountLimit(1) - e1:SetLabel(fid) - e1:SetLabelObject(g) - e1:SetCondition(c27174286.rmcon) - e1:SetOperation(c27174286.rmop) - Duel.RegisterEffect(e1,tp) - end -end -function c27174286.rmfilter(c,fid) - return c:GetFlagEffectLabel(27174286)==fid -end -function c27174286.rmcon(e,tp,eg,ep,ev,re,r,rp) - local g=e:GetLabelObject() - if not g:IsExists(c27174286.rmfilter,1,nil,e:GetLabel()) then - g:DeleteGroup() - e:Reset() - return false - else return true end -end -function c27174286.rmop(e,tp,eg,ep,ev,re,r,rp) - local g=e:GetLabelObject() - local tg=g:Filter(c27174286.rmfilter,nil,e:GetLabel()) - Duel.Remove(tg,POS_FACEUP,REASON_EFFECT) -end diff --git a/script/c27178262.lua b/script/c27178262.lua deleted file mode 100644 index 998b52a5c0..0000000000 --- a/script/c27178262.lua +++ /dev/null @@ -1,40 +0,0 @@ ---六武衆の理 -function c27178262.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c27178262.cost) - e1:SetTarget(c27178262.target) - e1:SetOperation(c27178262.activate) - c:RegisterEffect(e1) -end -function c27178262.costfilter(c) - return c:IsFaceup() and c:IsSetCard(0x3d) and c:IsAbleToGraveAsCost() -end -function c27178262.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c27178262.costfilter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c27178262.costfilter,tp,LOCATION_MZONE,0,1,1,nil) - Duel.SendtoGrave(g,REASON_COST) -end -function c27178262.filter(c,e,tp) - return c:IsSetCard(0x3d) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c27178262.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and c27178262.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsExistingTarget(c27178262.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c27178262.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c27178262.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c27189308.lua b/script/c27189308.lua deleted file mode 100644 index 47effbc7ca..0000000000 --- a/script/c27189308.lua +++ /dev/null @@ -1,28 +0,0 @@ ---ぴよコッコ -function c27189308.initial_effect(c) - --flip - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DELAY) - e1:SetTarget(c27189308.target) - e1:SetOperation(c27189308.operation) - c:RegisterEffect(e1) -end -function c27189308.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c27189308.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c27189308.filter(c,e,tp) - return c:IsLevelAbove(5) and c:IsType(TYPE_TUNER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c27189308.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local g=Duel.GetMatchingGroup(c27189308.filter,tp,LOCATION_DECK,0,nil,e,tp) - if g:GetCount()>0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=g:Select(tp,1,1,nil) - Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c27191436.lua b/script/c27191436.lua deleted file mode 100644 index c4c0d8499e..0000000000 --- a/script/c27191436.lua +++ /dev/null @@ -1,30 +0,0 @@ ---バースト・リターン -function c27191436.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c27191436.condition) - e1:SetTarget(c27191436.target) - e1:SetOperation(c27191436.activate) - c:RegisterEffect(e1) -end -function c27191436.cfilter(c) - return c:IsFaceup() and c:IsCode(58932615) -end -function c27191436.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c27191436.cfilter,tp,LOCATION_ONFIELD,0,1,nil) -end -function c27191436.filter(c) - return c:IsFaceup() and c:IsSetCard(0x3008) and not c:IsCode(58932615) and c:IsAbleToHand() -end -function c27191436.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c27191436.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - local g=Duel.GetMatchingGroup(c27191436.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0) -end -function c27191436.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c27191436.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - Duel.SendtoHand(g,nil,REASON_EFFECT) -end diff --git a/script/c27196937.lua b/script/c27196937.lua deleted file mode 100644 index 6ff0ded015..0000000000 --- a/script/c27196937.lua +++ /dev/null @@ -1,29 +0,0 @@ ---星屑の残光 -function c27196937.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c27196937.target) - e1:SetOperation(c27196937.activate) - c:RegisterEffect(e1) -end -function c27196937.filter(c,e,tp) - return c:IsSetCard(0xa3) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c27196937.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c27196937.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c27196937.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c27196937.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c27196937.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c27207573.lua b/script/c27207573.lua deleted file mode 100644 index 9974d8072d..0000000000 --- a/script/c27207573.lua +++ /dev/null @@ -1,47 +0,0 @@ ---侵略の手段 -function c27207573.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetCondition(c27207573.condition) - e1:SetCost(c27207573.cost) - e1:SetTarget(c27207573.target) - e1:SetOperation(c27207573.activate) - c:RegisterEffect(e1) -end -function c27207573.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end -function c27207573.cfilter(c) - return c:IsSetCard(0x100a) and c:IsType(TYPE_MONSTER) and c:IsAbleToGraveAsCost() -end -function c27207573.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c27207573.cfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c27207573.cfilter,tp,LOCATION_DECK,0,1,1,nil) - Duel.SendtoGrave(g,REASON_COST) -end -function c27207573.filter(c) - return c:IsFaceup() and c:IsSetCard(0x100a) -end -function c27207573.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c27207573.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c27207573.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c27207573.filter,tp,LOCATION_MZONE,0,1,1,nil) -end -function c27207573.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - e1:SetValue(800) - tc:RegisterEffect(e1) - end -end diff --git a/script/c27243130.lua b/script/c27243130.lua deleted file mode 100644 index a6ab192af6..0000000000 --- a/script/c27243130.lua +++ /dev/null @@ -1,46 +0,0 @@ ---禁じられた聖槍 -function c27243130.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c27243130.condition) - e1:SetTarget(c27243130.target) - e1:SetOperation(c27243130.activate) - c:RegisterEffect(e1) -end -function c27243130.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end -function c27243130.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) -end -function c27243130.activate(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e1:SetValue(-800) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EFFECT_IMMUNE_EFFECT) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e2:SetValue(c27243130.efilter) - tc:RegisterEffect(e2) - end -end -function c27243130.efilter(e,te) - return te:IsActiveType(TYPE_SPELL+TYPE_TRAP) and te:GetOwner()~=e:GetOwner() -end diff --git a/script/c27279764.lua b/script/c27279764.lua deleted file mode 100644 index 5d9a9c68a5..0000000000 --- a/script/c27279764.lua +++ /dev/null @@ -1,96 +0,0 @@ ---アポクリフォート・キラー -function c27279764.initial_effect(c) - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - c:RegisterEffect(e1) - --tribute limit - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_TRIBUTE_LIMIT) - e2:SetValue(c27279764.tlimit) - c:RegisterEffect(e2) - --summon with 3 tribute - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e3:SetCode(EFFECT_LIMIT_SUMMON_PROC) - e3:SetCondition(c27279764.ttcon) - e3:SetOperation(c27279764.ttop) - e3:SetValue(SUMMON_TYPE_ADVANCE) - c:RegisterEffect(e3) - local e4=e3:Clone() - e4:SetCode(EFFECT_LIMIT_SET_PROC) - c:RegisterEffect(e4) - --immune - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_SINGLE) - e5:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_UNCOPYABLE) - e5:SetRange(LOCATION_MZONE) - e5:SetCode(EFFECT_IMMUNE_EFFECT) - e5:SetCondition(c27279764.immcon) - e5:SetValue(c27279764.efilter) - c:RegisterEffect(e5) - --atk/def down - local e6=Effect.CreateEffect(c) - e6:SetType(EFFECT_TYPE_FIELD) - e6:SetCode(EFFECT_UPDATE_ATTACK) - e6:SetRange(LOCATION_MZONE) - e6:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e6:SetTarget(c27279764.adtg) - e6:SetValue(-500) - c:RegisterEffect(e6) - local e7=e6:Clone() - e7:SetCode(EFFECT_UPDATE_DEFENCE) - c:RegisterEffect(e7) - --to grave - local e8=Effect.CreateEffect(c) - e8:SetCategory(CATEGORY_TOGRAVE) - e8:SetType(EFFECT_TYPE_IGNITION) - e8:SetRange(LOCATION_MZONE) - e8:SetCountLimit(1) - e8:SetTarget(c27279764.tgtg) - e8:SetOperation(c27279764.tgop) - c:RegisterEffect(e8) -end -function c27279764.tlimit(e,c) - return not c:IsSetCard(0xaa) -end -function c27279764.ttcon(e,c) - if c==nil then return true end - return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-3 and Duel.GetTributeCount(c)>=3 -end -function c27279764.ttop(e,tp,eg,ep,ev,re,r,rp,c) - local g=Duel.SelectTribute(tp,c,3,3) - c:SetMaterial(g) - Duel.Release(g,REASON_SUMMON+REASON_MATERIAL) -end -function c27279764.immcon(e) - return bit.band(e:GetHandler():GetSummonType(),SUMMON_TYPE_NORMAL)==SUMMON_TYPE_NORMAL -end -function c27279764.efilter(e,te) - if te:IsActiveType(TYPE_SPELL+TYPE_TRAP) then return true - else return aux.qlifilter(e,te) end -end -function c27279764.adtg(e,c) - return bit.band(c:GetSummonType(),SUMMON_TYPE_SPECIAL)==SUMMON_TYPE_SPECIAL -end -function c27279764.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE+LOCATION_HAND)>0 end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,0,LOCATION_MZONE+LOCATION_HAND) -end -function c27279764.tgop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsType,1-tp,LOCATION_MZONE+LOCATION_HAND,0,nil,TYPE_MONSTER) - if g:GetCount()>0 then - Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_TOGRAVE) - local sg=g:Select(1-tp,1,1,nil) - Duel.HintSelection(sg) - Duel.SendtoGrave(sg,REASON_RULE) - else - local hg=Duel.GetFieldGroup(1-tp,LOCATION_HAND,0) - Duel.ConfirmCards(tp,hg) - Duel.ShuffleHand(1-tp) - end -end diff --git a/script/c2729285.lua b/script/c2729285.lua deleted file mode 100644 index dac6b8e3df..0000000000 --- a/script/c2729285.lua +++ /dev/null @@ -1,35 +0,0 @@ ---ファーニマル・キャット -function c2729285.initial_effect(c) - --tohand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(2729285,0)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) - e1:SetCode(EVENT_BE_MATERIAL) - e1:SetCountLimit(1,2729285) - e1:SetCondition(c2729285.condition) - e1:SetTarget(c2729285.target) - e1:SetOperation(c2729285.operation) - c:RegisterEffect(e1) -end -function c2729285.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsLocation(LOCATION_GRAVE) and r==REASON_FUSION -end -function c2729285.filter(c) - return c:IsCode(24094653) and c:IsAbleToHand() -end -function c2729285.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c2729285.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c2729285.filter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c2729285.filter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c2729285.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end diff --git a/script/c27315304.lua b/script/c27315304.lua deleted file mode 100644 index 28105cd947..0000000000 --- a/script/c27315304.lua +++ /dev/null @@ -1,34 +0,0 @@ ---ミスト・ウォーム -function c27315304.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),2) - c:EnableReviveLimit() - --return hand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(27315304,0)) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(c27315304.thcon) - e1:SetTarget(c27315304.thtg) - e1:SetOperation(c27315304.thop) - c:RegisterEffect(e1) -end -function c27315304.thcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_SYNCHRO -end -function c27315304.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and chkc:IsAbleToHand() end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g=Duel.SelectTarget(tp,Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,1,3,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0) -end -function c27315304.thop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local tg=g:Filter(Card.IsRelateToEffect,nil,e) - if tg:GetCount()>0 then - Duel.SendtoHand(tg,nil,REASON_EFFECT) - end -end diff --git a/script/c2732323.lua b/script/c2732323.lua deleted file mode 100644 index 2982fe64df..0000000000 --- a/script/c2732323.lua +++ /dev/null @@ -1,33 +0,0 @@ ---デコイドラゴン -function c2732323.initial_effect(c) - --change battle target - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(2732323,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_BE_BATTLE_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetTarget(c2732323.sptg) - e1:SetOperation(c2732323.spop) - c:RegisterEffect(e1) -end -function c2732323.spfilter(c,e,tp) - return c:IsLevelAbove(7) and c:IsRace(RACE_DRAGON) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c2732323.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c2732323.spfilter(chkc,e,tp) end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c2732323.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,g:GetCount(),0,0) -end -function c2732323.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)>0 then - local a=Duel.GetAttacker() - if a:IsAttackable() and not a:IsImmuneToEffect(e) then - Duel.CalculateDamage(a,tc) - end - end -end diff --git a/script/c27337596.lua b/script/c27337596.lua deleted file mode 100644 index f0373c39ec..0000000000 --- a/script/c27337596.lua +++ /dev/null @@ -1,54 +0,0 @@ ---聖刻龍王-アトゥムス -function c27337596.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsRace,RACE_DRAGON),6,2) - c:EnableReviveLimit() - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(27337596,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCost(c27337596.spcost) - e1:SetTarget(c27337596.sptg) - e1:SetOperation(c27337596.spop) - c:RegisterEffect(e1) -end -function c27337596.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():GetAttackAnnouncedCount()==0 - and e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_OATH) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e:GetHandler():RegisterEffect(e1) - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c27337596.spfilter(c,e,tp) - return c:IsRace(RACE_DRAGON) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c27337596.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c27337596.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c27337596.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c27337596.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - local tc=g:GetFirst() - if tc and Duel.SpecialSummonStep(g:GetFirst(),0,tp,tp,false,false,POS_FACEUP) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK) - e1:SetValue(0) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_SET_DEFENCE) - tc:RegisterEffect(e2) - Duel.SpecialSummonComplete() - end -end diff --git a/script/c27340877.lua b/script/c27340877.lua deleted file mode 100644 index 16032d33bd..0000000000 --- a/script/c27340877.lua +++ /dev/null @@ -1,35 +0,0 @@ ---DNA定期健診 -function c27340877.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c27340877.target) - e1:SetOperation(c27340877.activate) - c:RegisterEffect(e1) -end -function c27340877.filter(c) - return c:IsFacedown() and c:GetRace()~=0 -end -function c27340877.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c27340877.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c27340877.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEDOWN) - Duel.SelectTarget(tp,c27340877.filter,tp,LOCATION_MZONE,0,1,1,nil) - Duel.Hint(HINT_SELECTMSG,1-tp,562) - local rc=Duel.AnnounceAttribute(1-tp,2,0xffffff) - e:SetLabel(rc) -end -function c27340877.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFacedown() then - Duel.ConfirmCards(1-tp,tc) - if tc:IsAttribute(e:GetLabel()) then - Duel.Draw(1-tp,2,REASON_EFFECT) - else - Duel.Draw(tp,2,REASON_EFFECT) - end - end -end diff --git a/script/c27346636.lua b/script/c27346636.lua deleted file mode 100644 index 60b29098ed..0000000000 --- a/script/c27346636.lua +++ /dev/null @@ -1,88 +0,0 @@ ---剣闘獣ヘラクレイノス -function c27346636.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcCodeFun(c,78868776,aux.FilterBoolFunction(Card.IsSetCard,0x19),2,true,true) - --spsummon condition - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(c27346636.splimit) - c:RegisterEffect(e1) - --special summon rule - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(27346636,1)) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_SPSUMMON_PROC) - e2:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e2:SetRange(LOCATION_EXTRA) - e2:SetCondition(c27346636.sprcon) - e2:SetOperation(c27346636.sprop) - c:RegisterEffect(e2) - --negate - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(27346636,0)) - e3:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) - e3:SetType(EFFECT_TYPE_QUICK_O) - e3:SetRange(LOCATION_MZONE) - e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) - e3:SetCode(EVENT_CHAINING) - e3:SetCondition(c27346636.discon) - e3:SetCost(c27346636.discost) - e3:SetTarget(c27346636.distg) - e3:SetOperation(c27346636.disop) - c:RegisterEffect(e3) -end -function c27346636.splimit(e,se,sp,st) - return e:GetHandler():GetLocation()~=LOCATION_EXTRA -end -function c27346636.spfilter1(c,tp) - return c:IsCode(78868776) and c:IsAbleToDeckOrExtraAsCost() and c:IsCanBeFusionMaterial(true) - and Duel.IsExistingMatchingCard(c27346636.spfilter2,tp,LOCATION_MZONE,0,2,c) -end -function c27346636.spfilter2(c) - return c:IsSetCard(0x19) and c:IsCanBeFusionMaterial() and c:IsAbleToDeckOrExtraAsCost() -end -function c27346636.sprcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.GetLocationCount(tp,LOCATION_MZONE)>-3 - and Duel.IsExistingMatchingCard(c27346636.spfilter1,tp,LOCATION_ONFIELD,0,1,nil,tp) -end -function c27346636.sprop(e,tp,eg,ep,ev,re,r,rp,c) - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(27346636,2)) - local g1=Duel.SelectMatchingCard(tp,c27346636.spfilter1,tp,LOCATION_ONFIELD,0,1,1,nil,tp) - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(27346636,3)) - local g2=Duel.SelectMatchingCard(tp,c27346636.spfilter2,tp,LOCATION_MZONE,0,2,2,g1:GetFirst()) - g1:Merge(g2) - local tc=g1:GetFirst() - while tc do - if not tc:IsFaceup() then Duel.ConfirmCards(1-tp,tc) end - tc=g1:GetNext() - end - Duel.SendtoDeck(g1,nil,2,REASON_COST) -end -function c27346636.discon(e,tp,eg,ep,ev,re,r,rp) - return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) - and re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev) -end -function c27346636.discost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) -end -function c27346636.distg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) - end -end -function c27346636.disop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsFaceup() or not c:IsRelateToEffect(e) then return end - Duel.NegateActivation(ev) - if re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(eg,REASON_EFFECT) - end -end diff --git a/script/c27383110.lua b/script/c27383110.lua deleted file mode 100644 index 33adc16357..0000000000 --- a/script/c27383110.lua +++ /dev/null @@ -1,77 +0,0 @@ ---宣告者の預言 -function c27383110.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c27383110.target) - e1:SetOperation(c27383110.activate) - c:RegisterEffect(e1) - --salvage - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_TOHAND) - e2:SetDescription(aux.Stringid(27383110,0)) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(27383110) - e2:SetCost(c27383110.thcost) - e2:SetTarget(c27383110.thtg) - e2:SetOperation(c27383110.thop) - e2:SetLabelObject(e1) - c:RegisterEffect(e2) -end -function c27383110.filter(c,e,tp,m) - if not c:IsCode(44665365) or not c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true) then return false end - local mg=m:Filter(Card.IsCanBeRitualMaterial,c,c) - return mg:CheckWithSumEqual(Card.GetRitualLevel,6,1,99,c) -end -function c27383110.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local mg=Duel.GetRitualMaterial(tp) - return Duel.IsExistingMatchingCard(c27383110.filter,tp,LOCATION_HAND,0,1,nil,e,tp,mg) - end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c27383110.activate(e,tp,eg,ep,ev,re,r,rp) - local mg=Duel.GetRitualMaterial(tp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local tg=Duel.SelectMatchingCard(tp,c27383110.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp,mg) - local tc=tg:GetFirst() - if tc then - mg=mg:Filter(Card.IsCanBeRitualMaterial,tc,tc) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) - local mat=mg:SelectWithSumEqual(tp,Card.GetRitualLevel,6,1,99,tc) - tc:SetMaterial(mat) - Duel.ReleaseRitualMaterial(mat) - Duel.BreakEffect() - Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP) - tc:CompleteProcedure() - e:SetLabelObject(tc) - Duel.RaiseSingleEvent(e:GetHandler(),27383110,e,0,tp,tp,0) - end -end -function c27383110.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsAbleToRemove() end - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) -end -function c27383110.thfilter(c,e,tp) - return c:IsLocation(LOCATION_GRAVE) and c:IsControler(tp) and c:IsAbleToHand() and c:IsCanBeEffectTarget(e) -end -function c27383110.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local tc=e:GetLabelObject():GetLabelObject() - local mat=tc:GetMaterial() - if chkc then return mat:IsContains(chkc) and c27383110.thfilter(chkc,e,tp) end - if chk==0 then return mat:IsExists(c27383110.thfilter,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g=mat:FilterSelect(tp,c27383110.thfilter,1,1,nil,e,tp) - Duel.SetTargetCard(g) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0) -end -function c27383110.thop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end diff --git a/script/c27407330.lua b/script/c27407330.lua deleted file mode 100644 index c402bcefad..0000000000 --- a/script/c27407330.lua +++ /dev/null @@ -1,57 +0,0 @@ ---ライトレイ グレファー -function c27407330.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c27407330.spcon) - e1:SetOperation(c27407330.spop) - c:RegisterEffect(e1) - --remove - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(27407330,0)) - e2:SetCategory(CATEGORY_REMOVE) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetCountLimit(1) - e2:SetRange(LOCATION_MZONE) - e2:SetCost(c27407330.rmcost) - e2:SetTarget(c27407330.rmtg) - e2:SetOperation(c27407330.rmop) - c:RegisterEffect(e2) -end -function c27407330.spfilter(c) - return c:GetLevel()>=5 and c:IsAttribute(ATTRIBUTE_LIGHT) -end -function c27407330.spcon(e,c) - if c==nil then return true end - return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and - Duel.IsExistingMatchingCard(c27407330.spfilter,c:GetControler(),LOCATION_HAND,0,1,c) -end -function c27407330.spop(e,tp,eg,ep,ev,re,r,rp,c) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) - local g=Duel.SelectMatchingCard(tp,c27407330.spfilter,tp,LOCATION_HAND,0,1,1,c) - Duel.SendtoGrave(g,REASON_DISCARD+REASON_COST) -end -function c27407330.costfilter(c) - return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsDiscardable() -end -function c27407330.rmcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c27407330.costfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,c27407330.costfilter,1,1,REASON_COST+REASON_DISCARD) -end -function c27407330.filter(c) - return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsAbleToRemove() -end -function c27407330.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c27407330.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_DECK) -end -function c27407330.rmop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c27407330.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.Remove(g,POS_FACEUP,REASON_EFFECT) - end -end diff --git a/script/c27408609.lua b/script/c27408609.lua deleted file mode 100644 index 03b6def4a8..0000000000 --- a/script/c27408609.lua +++ /dev/null @@ -1,20 +0,0 @@ ---黄金のホムンクルス -function c27408609.initial_effect(c) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(c27408609.value) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EFFECT_UPDATE_DEFENCE) - e2:SetValue(c27408609.value) - c:RegisterEffect(e2) -end -function c27408609.value(e,c) - return Duel.GetFieldGroupCount(c:GetControler(),LOCATION_REMOVED,0)*300 -end diff --git a/script/c27415516.lua b/script/c27415516.lua deleted file mode 100644 index 9a019770b0..0000000000 --- a/script/c27415516.lua +++ /dev/null @@ -1,46 +0,0 @@ ---水征竜-ストリーム -function c27415516.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(27415516,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(1,27415516) - e1:SetCost(c27415516.spcost) - e1:SetTarget(c27415516.sptg) - e1:SetOperation(c27415516.spop) - c:RegisterEffect(e1) -end -function c27415516.costfilter(c) - return (c:IsRace(RACE_DRAGON) or c:IsAttribute(ATTRIBUTE_WATER)) and c:IsDiscardable() -end -function c27415516.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsDiscardable() - and Duel.IsExistingMatchingCard(c27415516.costfilter,tp,LOCATION_HAND,0,1,c) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) - local g=Duel.SelectMatchingCard(tp,c27415516.costfilter,tp,LOCATION_HAND,0,1,1,c) - g:AddCard(c) - Duel.SendtoGrave(g,REASON_COST+REASON_DISCARD) -end -function c27415516.spfilter(c,e,tp) - return c:IsCode(26400609) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c27415516.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c27415516.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c27415516.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local tc=Duel.GetFirstMatchingCard(c27415516.spfilter,tp,LOCATION_DECK,0,nil,e,tp) - if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - Duel.SpecialSummonComplete() - end -end diff --git a/script/c27416701.lua b/script/c27416701.lua deleted file mode 100644 index 0986b0b3dc..0000000000 --- a/script/c27416701.lua +++ /dev/null @@ -1,36 +0,0 @@ ---柴戦士タロ -function c27416701.initial_effect(c) - --battle indestructable - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e1:SetValue(1) - c:RegisterEffect(e1) - --damage - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(27416701,0)) - e2:SetCategory(CATEGORY_TOHAND) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_DESTROYED) - e2:SetRange(LOCATION_MZONE) - e2:SetCondition(c27416701.condition) - e2:SetTarget(c27416701.target) - e2:SetOperation(c27416701.operation) - c:RegisterEffect(e2) -end -function c27416701.filter(c) - return c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsReason(REASON_BATTLE+REASON_EFFECT) -end -function c27416701.condition(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c27416701.filter,1,nil) -end -function c27416701.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0) -end -function c27416701.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - Duel.SendtoHand(c,nil,REASON_EFFECT) - end -end diff --git a/script/c27450400.lua b/script/c27450400.lua deleted file mode 100644 index fb8ed668f7..0000000000 --- a/script/c27450400.lua +++ /dev/null @@ -1,33 +0,0 @@ ---クラスター・ペンデュラム -function c27450400.initial_effect(c) - --token - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(27450400,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c27450400.sptg) - e1:SetOperation(c27450400.spop) - c:RegisterEffect(e1) -end -function c27450400.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0 - and Duel.IsPlayerCanSpecialSummonMonster(tp,27450401,0,0x4011,0,0,1,RACE_MACHINE,ATTRIBUTE_EARTH) end - Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0) -end -function c27450400.spop(e,tp,eg,ep,ev,re,r,rp) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - local ct=Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE) - if ft>ct then ft=ct end - if ft<=0 then return end - if not Duel.IsPlayerCanSpecialSummonMonster(tp,27450401,0,0x4011,0,0,1,RACE_MACHINE,ATTRIBUTE_EARTH) then return end - local ctn=true - while ft>0 and ctn do - local token=Duel.CreateToken(tp,27450401) - Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP) - ft=ft-1 - if ft<=0 or not Duel.SelectYesNo(tp,aux.Stringid(27450400,1)) then ctn=false end - end - Duel.SpecialSummonComplete() -end diff --git a/script/c27491571.lua b/script/c27491571.lua deleted file mode 100644 index 2b3ec09856..0000000000 --- a/script/c27491571.lua +++ /dev/null @@ -1,63 +0,0 @@ ---ゴーストリックの魔女 -function c27491571.initial_effect(c) - --summon limit - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_SUMMON) - e1:SetCondition(c27491571.sumcon) - c:RegisterEffect(e1) - --turn set - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(27491571,0)) - e2:SetCategory(CATEGORY_POSITION) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetTarget(c27491571.postg) - e2:SetOperation(c27491571.posop) - c:RegisterEffect(e2) - --change pos - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(27491571,1)) - e3:SetCategory(CATEGORY_POSITION) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1) - e3:SetTarget(c27491571.postg2) - e3:SetOperation(c27491571.posop2) - c:RegisterEffect(e3) -end -function c27491571.sfilter(c) - return c:IsFaceup() and c:IsSetCard(0x8d) -end -function c27491571.sumcon(e) - return not Duel.IsExistingMatchingCard(c27491571.sfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) -end -function c27491571.postg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsCanTurnSet() and c:GetFlagEffect(27491571)==0 end - c:RegisterFlagEffect(27491571,RESET_EVENT+0x1fc0000+RESET_PHASE+PHASE_END,0,1) - Duel.SetOperationInfo(0,CATEGORY_POSITION,c,1,0,0) -end -function c27491571.posop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - Duel.ChangePosition(c,POS_FACEDOWN_DEFENCE) - end -end -function c27491571.filter(c) - return c:IsFaceup() and c:IsCanTurnSet() -end -function c27491571.postg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and c27491571.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c27491571.filter,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE) - local g=Duel.SelectTarget(tp,c27491571.filter,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0) -end -function c27491571.posop2(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - Duel.ChangePosition(tc,POS_FACEDOWN_DEFENCE) - end -end diff --git a/script/c27527047.lua b/script/c27527047.lua deleted file mode 100644 index e6ad37529e..0000000000 --- a/script/c27527047.lua +++ /dev/null @@ -1,16 +0,0 @@ ---氷結界の御庭番 -function c27527047.initial_effect(c) - --untargetable - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x2f)) - e1:SetValue(c27527047.tgval) - c:RegisterEffect(e1) -end -function c27527047.tgval(e,re,rp) - local tp=e:GetHandler():GetControler() - return tp~=rp and re:GetHandler():IsType(TYPE_MONSTER) and aux.tgval(e,re,rp) -end diff --git a/script/c27541267.lua b/script/c27541267.lua deleted file mode 100644 index 5a84d770e9..0000000000 --- a/script/c27541267.lua +++ /dev/null @@ -1,34 +0,0 @@ ---侵略の汎発感染 -function c27541267.initial_effect(c) - --immune - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c27541267.target) - e1:SetOperation(c27541267.operation) - c:RegisterEffect(e1) -end -function c27541267.filter(c) - return c:IsFaceup() and c:IsSetCard(0xa) -end -function c27541267.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c27541267.filter,tp,LOCATION_MZONE,0,1,nil) end -end -function c27541267.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c27541267.filter,tp,LOCATION_MZONE,0,nil) - local tc=g:GetFirst() - while tc do - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_IMMUNE_EFFECT) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - e1:SetValue(c27541267.efilter) - tc:RegisterEffect(e1) - tc=g:GetNext() - end -end -function c27541267.efilter(e,te) - return te:IsActiveType(TYPE_SPELL+TYPE_TRAP) and te:GetOwner()~=e:GetOwner() -end diff --git a/script/c27551.lua b/script/c27551.lua deleted file mode 100644 index 3306f173e3..0000000000 --- a/script/c27551.lua +++ /dev/null @@ -1,77 +0,0 @@ ---リミット・リバース -function c27551.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_END_PHASE+TIMING_ATTACK) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c27551.target) - e1:SetOperation(c27551.operation) - c:RegisterEffect(e1) - --Destroy - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE) - e2:SetCode(EVENT_LEAVE_FIELD) - e2:SetOperation(c27551.desop) - c:RegisterEffect(e2) - --Destroy2 - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e3:SetRange(LOCATION_SZONE) - e3:SetCode(EVENT_LEAVE_FIELD) - e3:SetCondition(c27551.descon2) - e3:SetOperation(c27551.desop2) - c:RegisterEffect(e3) - --Destroy3 - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e4:SetRange(LOCATION_SZONE) - e4:SetCode(EVENT_CHANGE_POS) - e4:SetCondition(c27551.descon3) - e4:SetOperation(c27551.desop3) - c:RegisterEffect(e4) -end -function c27551.filter(c,e,tp) - return c:IsAttackBelow(1000) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c27551.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c27551.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c27551.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c27551.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c27551.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then - if Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_ATTACK)==0 then return end - c:SetCardTarget(tc) - end -end -function c27551.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetHandler():GetFirstCardTarget() - if tc and tc:IsLocation(LOCATION_MZONE) then - Duel.Destroy(tc,REASON_EFFECT) - end -end -function c27551.descon2(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetHandler():GetFirstCardTarget() - return tc and eg:IsContains(tc) and tc:IsReason(REASON_DESTROY) -end -function c27551.desop2(e,tp,eg,ep,ev,re,r,rp) - Duel.Destroy(e:GetHandler(),REASON_EFFECT) -end -function c27551.descon3(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetHandler():GetFirstCardTarget() - return tc and eg:IsContains(tc) and tc:IsDefencePos() -end -function c27551.desop3(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=c:GetFirstCardTarget() - local g=Group.FromCards(tc,c) - Duel.Destroy(g,REASON_EFFECT) -end diff --git a/script/c27552504.lua b/script/c27552504.lua deleted file mode 100644 index 37d31d6d2d..0000000000 --- a/script/c27552504.lua +++ /dev/null @@ -1,72 +0,0 @@ ---永遠の淑女 ベアトリーチェ -function c27552504.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,6,2,c27552504.ovfilter,aux.Stringid(27552504,0),2,c27552504.xyzop) - c:EnableReviveLimit() - --to grave - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOGRAVE) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1) - e1:SetCost(c27552504.tgcost) - e1:SetTarget(c27552504.tgtg) - e1:SetOperation(c27552504.tgop) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetCondition(c27552504.spcon) - e2:SetTarget(c27552504.sptg) - e2:SetOperation(c27552504.spop) - c:RegisterEffect(e2) -end -function c27552504.cfilter(c) - return c:IsSetCard(0xb1) and c:IsType(TYPE_MONSTER) and c:IsAbleToGraveAsCost() -end -function c27552504.ovfilter(c) - return c:IsFaceup() and c:IsSetCard(0xd5) -end -function c27552504.xyzop(e,tp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c27552504.cfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,c27552504.cfilter,1,1,REASON_COST,nil) - e:GetHandler():RegisterFlagEffect(27552504,RESET_EVENT+0xfe0000+RESET_PHASE+PHASE_END,0,1) -end -function c27552504.tgcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c27552504.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():GetFlagEffect(27552504)==0 - and Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,0,1,tp,LOCATION_DECK) -end -function c27552504.tgop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,Card.IsAbleToGrave,tp,LOCATION_DECK,0,1,1,nil) - Duel.SendtoGrave(g,REASON_EFFECT) -end -function c27552504.spcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:GetPreviousControler()==tp and rp~=tp and c:IsReason(REASON_DESTROY) -end -function c27552504.spfilter(c,e,tp) - return c:IsSetCard(0xb1) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) -end -function c27552504.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c27552504.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function c27552504.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c27552504.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP) - end -end diff --git a/script/c27564031.lua b/script/c27564031.lua deleted file mode 100644 index 807515e46c..0000000000 --- a/script/c27564031.lua +++ /dev/null @@ -1,59 +0,0 @@ ---Sin World -function c27564031.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --search - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(27564031,0)) - e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_PREDRAW) - e2:SetRange(LOCATION_SZONE) - e2:SetCondition(c27564031.condition) - e2:SetTarget(c27564031.target) - e2:SetOperation(c27564031.operation) - c:RegisterEffect(e2) -end -function c27564031.condition(e,tp,eg,ep,ev,re,r,rp) - return tp==Duel.GetTurnPlayer() and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0 - and Duel.GetDrawCount(tp)>0 -end -function c27564031.filter(c) - return c:IsSetCard(0x23) and c:IsAbleToHand() -end -function c27564031.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c27564031.filter,tp,LOCATION_DECK,0,3,nil) end - local dt=Duel.GetDrawCount(tp) - if dt~=0 then - _replace_count=0 - _replace_max=dt - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EFFECT_DRAW_COUNT) - e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_DRAW) - e1:SetValue(0) - Duel.RegisterEffect(e1,tp) - end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,LOCATION_DECK) -end -function c27564031.operation(e,tp,eg,ep,ev,re,r,rp) - _replace_count=_replace_count+1 - if _replace_count>_replace_max or not e:GetHandler():IsRelateToEffect(e) then return end - local g=Duel.GetMatchingGroup(Card.IsSetCard,tp,LOCATION_DECK,0,nil,0x23) - if g:GetCount()>=3 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local sg=g:Select(tp,3,3,nil) - Duel.ConfirmCards(1-tp,sg) - Duel.ShuffleDeck(tp) - Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_ATOHAND) - local tg=sg:Select(1-tp,1,1,nil) - local tc=tg:GetFirst() - if tc:IsAbleToHand() then Duel.SendtoHand(tc,nil,REASON_EFFECT) - else Duel.SendtoGrave(tc,REASON_EFFECT) end - end -end diff --git a/script/c27581098.lua b/script/c27581098.lua deleted file mode 100644 index 78168aec98..0000000000 --- a/script/c27581098.lua +++ /dev/null @@ -1,29 +0,0 @@ ---融合禁止エリア -function c27581098.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_DRAW_PHASE) - c:RegisterEffect(e1) - --disable spsummon - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetRange(LOCATION_SZONE) - e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetTargetRange(1,1) - e2:SetTarget(c27581098.splimit) - c:RegisterEffect(e2) - -- - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetRange(LOCATION_SZONE) - e3:SetCode(27581098) - e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e3:SetTargetRange(1,1) - c:RegisterEffect(e3) -end -function c27581098.splimit(e,c,tp,sumtp,sumpos) - return bit.band(sumtp,SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION -end diff --git a/script/c2759860.lua b/script/c2759860.lua deleted file mode 100644 index 0c0854eae9..0000000000 --- a/script/c2759860.lua +++ /dev/null @@ -1,69 +0,0 @@ ---グレイドル・インパクト -function c2759860.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_SZONE) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCountLimit(1,2759860) - e2:SetTarget(c2759860.destg) - e2:SetOperation(c2759860.desop) - c:RegisterEffect(e2) - --tohand - local e3=Effect.CreateEffect(c) - e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_PHASE+PHASE_END) - e3:SetRange(LOCATION_SZONE) - e3:SetCountLimit(1,2759860) - e3:SetCondition(c2759860.thcon) - e3:SetTarget(c2759860.thtg) - e3:SetOperation(c2759860.thop) - c:RegisterEffect(e3) -end -function c2759860.desfilter(c) - return c:IsFaceup() and c:IsSetCard(0xd1) and c:IsDestructable() -end -function c2759860.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - if chk==0 then return Duel.IsExistingTarget(c2759860.desfilter,tp,LOCATION_ONFIELD,0,1,e:GetHandler()) - and Duel.IsExistingTarget(Card.IsDestructable,tp,0,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g1=Duel.SelectTarget(tp,c2759860.desfilter,tp,LOCATION_ONFIELD,0,1,1,e:GetHandler()) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g2=Duel.SelectTarget(tp,Card.IsDestructable,tp,0,LOCATION_ONFIELD,1,1,nil) - g1:Merge(g2) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g1,2,0,0) -end -function c2759860.desop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) - if g:GetCount()>0 then - Duel.Destroy(g,REASON_EFFECT) - end -end -function c2759860.thcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c2759860.filter(c) - return c:IsSetCard(0xd1) and c:IsAbleToHand() -end -function c2759860.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c2759860.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c2759860.thop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c2759860.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c27618634.lua b/script/c27618634.lua deleted file mode 100644 index 384d99c7cf..0000000000 --- a/script/c27618634.lua +++ /dev/null @@ -1,63 +0,0 @@ ---薄幸の乙女 -function c27618634.initial_effect(c) - --battle indestructable - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e1:SetValue(1) - e1:SetCondition(c27618634.indcon) - c:RegisterEffect(e1) - --battled - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_BATTLED) - e2:SetOperation(c27618634.atop) - c:RegisterEffect(e2) - local g=Group.CreateGroup() - g:KeepAlive() - e2:SetLabelObject(g) - --atk limit - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetCode(EFFECT_CANNOT_ATTACK) - e3:SetRange(LOCATION_MZONE) - e3:SetTargetRange(0,LOCATION_MZONE) - e3:SetCondition(c27618634.atlcon) - e3:SetTarget(c27618634.atltg) - e3:SetLabelObject(g) - c:RegisterEffect(e3) - local e4=e3:Clone() - e4:SetCode(EFFECT_CANNOT_CHANGE_POSITION) - e4:SetLabelObject(g) - c:RegisterEffect(e4) - -- - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e5:SetCode(EVENT_CHANGE_POS) - e5:SetOperation(c27618634.posop) - c:RegisterEffect(e5) -end -function c27618634.indcon(e) - return e:GetHandler():IsPosition(POS_FACEUP_ATTACK) -end -function c27618634.atop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local bc=c:GetBattleTarget() - if bc and c:IsPosition(POS_FACEUP_ATTACK) then - if c:GetFlagEffect(27618634)==0 then - c:RegisterFlagEffect(27618634,RESET_EVENT+0x1fe0000,0,1) - e:GetLabelObject():Clear() - end - e:GetLabelObject():AddCard(bc) - bc:RegisterFlagEffect(27618635,RESET_EVENT+0x1fe0000,0,1) - end -end -function c27618634.atlcon(e) - return e:GetHandler():GetFlagEffect(27618634)~=0 -end -function c27618634.atltg(e,c) - return e:GetLabelObject():IsContains(c) and c:GetFlagEffect(27618635)~=0 -end -function c27618634.posop(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():ResetFlagEffect(27618634) -end diff --git a/script/c27632240.lua b/script/c27632240.lua deleted file mode 100644 index 06617ea0c5..0000000000 --- a/script/c27632240.lua +++ /dev/null @@ -1,47 +0,0 @@ ---虚空の騎士 -function c27632240.initial_effect(c) - --send to grave - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(27632240,0)) - e1:SetCategory(CATEGORY_TOGRAVE) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE) - e1:SetCode(EVENT_TO_HAND) - e1:SetCondition(c27632240.tgcon1) - e1:SetTarget(c27632240.tgtg) - e1:SetOperation(c27632240.tgop) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_TO_DECK) - e2:SetCondition(c27632240.tgcon2) - c:RegisterEffect(e2) -end -function c27632240.cfilter1(c) - return c:IsPreviousLocation(LOCATION_MZONE) -end -function c27632240.tgcon1(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c27632240.cfilter1,1,nil) -end -function c27632240.cfilter2(c) - return c:IsPreviousLocation(LOCATION_MZONE) and c:IsLocation(LOCATION_DECK) -end -function c27632240.tgcon2(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c27632240.cfilter2,1,nil) -end -function c27632240.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) -end -function c27632240.tgfilter(c) - return c:IsType(TYPE_MONSTER) and c:IsAttribute(ATTRIBUTE_WIND) and c:IsAbleToGrave() -end -function c27632240.tgop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFacedown() or not c:IsRelateToEffect(e) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c27632240.tgfilter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoGrave(g,REASON_EFFECT) - end -end diff --git a/script/c27655513.lua b/script/c27655513.lua deleted file mode 100644 index 5dddac433c..0000000000 --- a/script/c27655513.lua +++ /dev/null @@ -1,36 +0,0 @@ ---スクリーチ -function c27655513.initial_effect(c) - --to grave - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(27655513,0)) - e1:SetCategory(CATEGORY_TOGRAVE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetCondition(c27655513.condition) - e1:SetTarget(c27655513.target) - e1:SetOperation(c27655513.operation) - c:RegisterEffect(e1) -end -function c27655513.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsReason(REASON_BATTLE) -end -function c27655513.filter(c) - return c:IsAttribute(ATTRIBUTE_WATER) and c:IsAbleToGrave() -end -function c27655513.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,2,tp,LOCATION_DECK) -end -function c27655513.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c27655513.filter,tp,LOCATION_DECK,0,nil) - if g:GetCount()>1 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local sg=g:Select(tp,2,2,nil) - Duel.SendtoGrave(sg,REASON_EFFECT) - elseif Duel.IsPlayerCanDiscardDeck(tp,2) then - local cg=Duel.GetFieldGroup(tp,LOCATION_DECK,0) - Duel.ConfirmCards(1-tp,cg) - Duel.ConfirmCards(tp,cg) - Duel.ShuffleDeck(tp) - end -end diff --git a/script/c27660735.lua b/script/c27660735.lua deleted file mode 100644 index a7fd958e5f..0000000000 --- a/script/c27660735.lua +++ /dev/null @@ -1,37 +0,0 @@ ---SR三つ目のダイス -function c27660735.initial_effect(c) - --disable attack - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(27660735,0)) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_ATTACK) - e1:SetRange(LOCATION_GRAVE) - e1:SetCondition(c27660735.condition) - e1:SetCost(c27660735.cost) - e1:SetOperation(c27660735.operation) - c:RegisterEffect(e1) -end -function c27660735.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp and (Duel.IsAbleToEnterBP() or Duel.GetCurrentPhase()==PHASE_BATTLE) -end -function c27660735.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) -end -function c27660735.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetAttacker() then Duel.NegateAttack() - else - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetReset(RESET_PHASE+PHASE_END) - e1:SetCountLimit(1) - e1:SetOperation(c27660735.disop) - Duel.RegisterEffect(e1,tp) - end -end -function c27660735.disop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_CARD,0,27660735) - Duel.NegateAttack() -end diff --git a/script/c2766877.lua b/script/c2766877.lua deleted file mode 100644 index 3a63366531..0000000000 --- a/script/c2766877.lua +++ /dev/null @@ -1,46 +0,0 @@ ---ダイガスタ・フェニクス -function c2766877.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,2,2) - c:EnableReviveLimit() - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(2766877,0)) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c2766877.condition) - e1:SetCost(c2766877.cost) - e1:SetTarget(c2766877.target) - e1:SetOperation(c2766877.operation) - c:RegisterEffect(e1) -end -function c2766877.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsAbleToEnterBP() -end -function c2766877.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c2766877.filter(c) - return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_WIND) and not c:IsHasEffect(EFFECT_EXTRA_ATTACK) -end -function c2766877.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c2766877.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c2766877.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c2766877.filter,tp,LOCATION_MZONE,0,1,1,nil) -end -function c2766877.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_EXTRA_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - e1:SetValue(1) - tc:RegisterEffect(e1) - end -end diff --git a/script/c2772236.lua b/script/c2772236.lua deleted file mode 100644 index e8bf7f57b4..0000000000 --- a/script/c2772236.lua +++ /dev/null @@ -1,34 +0,0 @@ ---エレキマイラ -function c2772236.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0xe),aux.NonTuner(Card.IsRace,RACE_THUNDER),1) - c:EnableReviveLimit() - --direct attack - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DIRECT_ATTACK) - c:RegisterEffect(e1) - --handes - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(2772236,0)) - e2:SetCategory(CATEGORY_TODECK) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_BATTLE_DAMAGE) - e2:SetCondition(c2772236.condition) - e2:SetTarget(c2772236.target) - e2:SetOperation(c2772236.operation) - c:RegisterEffect(e2) -end -function c2772236.condition(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp and Duel.GetAttackTarget()==nil -end -function c2772236.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,1-tp,LOCATION_HAND) -end -function c2772236.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetFieldGroup(ep,LOCATION_HAND,0,nil) - if g:GetCount()==0 then return end - local sg=g:RandomSelect(1-tp,1) - Duel.SendtoDeck(sg,nil,0,REASON_EFFECT) -end diff --git a/script/c27744077.lua b/script/c27744077.lua deleted file mode 100644 index 7f17ded909..0000000000 --- a/script/c27744077.lua +++ /dev/null @@ -1,23 +0,0 @@ ---絶体絶命 -function c27744077.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_BATTLE_START) - e1:SetCondition(c27744077.condition) - e1:SetOperation(c27744077.activate) - c:RegisterEffect(e1) -end -function c27744077.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp and Duel.GetCurrentPhase()0 - and Duel.IsExistingTarget(c27756115.filter,tp,LOCATION_MZONE,0,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c27756115.filter,tp,LOCATION_MZONE,0,1,1,e:GetHandler()) -end -function c27756115.eqop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) then return end - if c:IsLocation(LOCATION_MZONE) and c:IsFacedown() then return end - local tc=Duel.GetFirstTarget() - if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or tc:GetControler()~=tp or tc:IsFacedown() or not tc:IsRelateToEffect(e) then - Duel.SendtoGrave(c,REASON_EFFECT) - return - end - Duel.Equip(tp,c,tc,true) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(c27756115.eqlimit) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_INDESTRUCTABLE_COUNT) - e2:SetCountLimit(1) - e2:SetValue(c27756115.valcon) - e2:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e2) -end -function c27756115.eqlimit(e,c) - return c:IsSetCard(0x9a) -end -function c27756115.valcon(e,re,r,rp) - return bit.band(r,REASON_EFFECT)~=0 -end -function c27756115.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end -function c27756115.cfilter(c,e,tp) - return c:IsControler(tp) and c:IsLocation(LOCATION_GRAVE) and c:IsReason(REASON_BATTLE) - and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_DEFENCE) - and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) -end -function c27756115.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and eg:IsExists(c27756115.cfilter,1,nil,e,tp) end - local g=eg:Filter(c27756115.cfilter,nil,e,tp) - Duel.SetTargetCard(g) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,g:GetCount(),0,0) -end -function c27756115.spop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_ATTACK) - end -end diff --git a/script/c27762803.lua b/script/c27762803.lua deleted file mode 100644 index abf3f4ab74..0000000000 --- a/script/c27762803.lua +++ /dev/null @@ -1,34 +0,0 @@ ---ナチュル・ビートル -function c27762803.initial_effect(c) - --ad change - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EVENT_CHAIN_SOLVED) - e1:SetOperation(c27762803.adop) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetCode(EFFECT_SET_BASE_ATTACK) - e2:SetRange(LOCATION_MZONE) - e2:SetCondition(c27762803.con) - e2:SetValue(1800) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EFFECT_SET_BASE_DEFENCE) - e3:SetValue(400) - c:RegisterEffect(e3) -end -function c27762803.con(e) - return e:GetHandler():GetFlagEffect(27762803)~=0 -end -function c27762803.adop(e,tp,eg,ep,ev,re,r,rp) - if re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL) then - if e:GetHandler():GetFlagEffect(27762803)==0 then - e:GetHandler():RegisterFlagEffect(27762803,RESET_EVENT+0x1ff0000,0,0) - else - e:GetHandler():ResetFlagEffect(27762803) - end - end -end diff --git a/script/c27769400.lua b/script/c27769400.lua deleted file mode 100644 index b29834f08e..0000000000 --- a/script/c27769400.lua +++ /dev/null @@ -1,107 +0,0 @@ ---テュアラティン -function c27769400.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(27769400,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(27769400) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c27769400.spcon) - e1:SetTarget(c27769400.sptg) - e1:SetOperation(c27769400.spop) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(27769400,1)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetCondition(c27769400.descon) - e2:SetTarget(c27769400.destg) - e2:SetOperation(c27769400.desop) - c:RegisterEffect(e2) - if not c27769400.global_check then - c27769400.global_check=true - c27769400[0]=Group.CreateGroup() - c27769400[0]:KeepAlive() - c27769400[1]=0 - local ge1=Effect.GlobalEffect() - ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - ge1:SetCode(EVENT_PHASE_START+PHASE_BATTLE) - ge1:SetOperation(c27769400.checkop1) - Duel.RegisterEffect(ge1,0) - local ge2=Effect.GlobalEffect() - ge2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - ge2:SetCode(EVENT_BATTLE_DESTROYED) - ge2:SetOperation(c27769400.checkop2) - Duel.RegisterEffect(ge2,0) - end -end -function c27769400.checkop1(e,tp,eg,ep,ev,re,r,rp) - c27769400[0]:Clear() - c27769400[0]:Merge(Duel.GetFieldGroup(Duel.GetTurnPlayer(),0,LOCATION_MZONE)) - c27769400[1]=c27769400[0]:GetCount() -end -function c27769400.checkop2(e,tp,eg,ep,ev,re,r,rp) - if c27769400[1]<2 or c27769400[0]:GetCount()==0 then return end - local g=eg:Filter(Card.IsLocation,nil,LOCATION_GRAVE) - c27769400[0]:Sub(g) - if c27769400[0]:GetCount()==0 then - Duel.RaiseEvent(e:GetHandler(),27769400,e,0,0,0,0) - end -end -function c27769400.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp -end -function c27769400.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c27769400.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,1,tp,tp,false,false,POS_FACEUP) - end -end -function c27769400.descon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+1 -end -function c27769400.desfilter(c,att) - return c:IsFaceup() and c:IsAttribute(att) -end -function c27769400.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,563) - local rc=Duel.AnnounceAttribute(tp,1,0xff) - Duel.SetTargetParam(rc) - e:GetHandler():SetHint(CHINT_ATTRIBUTE,rc) - local g=Duel.GetMatchingGroup(c27769400.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,rc) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c27769400.desop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local rc=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM) - local g=Duel.GetMatchingGroup(c27769400.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,rc) - Duel.Destroy(g,REASON_EFFECT) - if c:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_CANNOT_SUMMON) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetTargetRange(0,1) - e1:SetTarget(c27769400.sumlimit) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetLabel(rc) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - c:RegisterEffect(e2) - end -end -function c27769400.sumlimit(e,c) - return c:IsAttribute(e:GetLabel()) -end diff --git a/script/c27770341.lua b/script/c27770341.lua deleted file mode 100644 index 6c7a85366c..0000000000 --- a/script/c27770341.lua +++ /dev/null @@ -1,62 +0,0 @@ ---超再生能力 -function c27770341.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(TIMING_END_PHASE) - e1:SetOperation(c27770341.activate) - c:RegisterEffect(e1) - if c27770341.counter==nil then - c27770341.counter=true - c27770341[0]=0 - c27770341[1]=0 - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e2:SetCode(EVENT_PHASE_START+PHASE_DRAW) - e2:SetOperation(c27770341.resetcount) - Duel.RegisterEffect(e2,0) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e3:SetCode(EVENT_RELEASE) - e3:SetOperation(c27770341.addcount) - Duel.RegisterEffect(e3,0) - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e4:SetCode(EVENT_DISCARD) - e4:SetOperation(c27770341.addcount) - Duel.RegisterEffect(e4,0) - end -end -function c27770341.resetcount(e,tp,eg,ep,ev,re,r,rp) - c27770341[0]=0 - c27770341[1]=0 -end -function c27770341.addcount(e,tp,eg,ep,ev,re,r,rp) - local tc=eg:GetFirst() - while tc do - local pl=tc:GetPreviousLocation() - if pl==LOCATION_MZONE and tc:GetPreviousRaceOnField()==RACE_DRAGON then - local p=tc:GetReasonPlayer() - c27770341[p]=c27770341[p]+1 - elseif pl==LOCATION_HAND and tc:GetOriginalRace()==RACE_DRAGON then - local p=tc:GetPreviousControler() - c27770341[p]=c27770341[p]+1 - end - tc=eg:GetNext() - end -end -function c27770341.activate(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetReset(RESET_PHASE+PHASE_END) - e1:SetCountLimit(1) - e1:SetOperation(c27770341.droperation) - Duel.RegisterEffect(e1,tp) -end -function c27770341.droperation(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_CARD,0,27770341) - Duel.Draw(tp,c27770341[tp],REASON_EFFECT) -end diff --git a/script/c27782503.lua b/script/c27782503.lua deleted file mode 100644 index 5aa2b54ee9..0000000000 --- a/script/c27782503.lua +++ /dev/null @@ -1,61 +0,0 @@ ---六武衆-イロウ -function c27782503.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(27782503,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_BATTLE_START) - e1:SetCondition(c27782503.descon) - e1:SetTarget(c27782503.destg) - e1:SetOperation(c27782503.desop) - c:RegisterEffect(e1) - --Destroy replace - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DESTROY_REPLACE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetTarget(c27782503.desreptg) - e2:SetOperation(c27782503.desrepop) - c:RegisterEffect(e2) -end -function c27782503.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x3d) and c:GetCode()~=27782503 -end -function c27782503.descon(e,tp,eg,ep,ev,re,r,rp) - local d=Duel.GetAttackTarget() - return e:GetHandler()==Duel.GetAttacker() and d and d:IsFacedown() and d:IsDefencePos() - and Duel.IsExistingMatchingCard(c27782503.cfilter,tp,LOCATION_MZONE,0,1,nil) -end -function c27782503.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetAttackTarget():IsDestructable() end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,Duel.GetAttackTarget(),1,0,0) -end -function c27782503.desop(e,tp,eg,ep,ev,re,r,rp) - local d=Duel.GetAttackTarget() - if d:IsRelateToBattle() then - Duel.Destroy(d,REASON_EFFECT) - end -end -function c27782503.repfilter(c) - return c:IsFaceup() and c:IsSetCard(0x3d) and not c:IsStatus(STATUS_DESTROY_CONFIRMED+STATUS_BATTLE_DESTROYED) -end -function c27782503.desreptg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return not c:IsReason(REASON_REPLACE) and c:IsOnField() and c:IsFaceup() - and Duel.IsExistingMatchingCard(c27782503.repfilter,tp,LOCATION_MZONE,0,1,c) end - if Duel.SelectYesNo(tp,aux.Stringid(27782503,1)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESREPLACE) - local g=Duel.SelectMatchingCard(tp,c27782503.repfilter,tp,LOCATION_MZONE,0,1,1,c) - e:SetLabelObject(g:GetFirst()) - Duel.HintSelection(g) - g:GetFirst():SetStatus(STATUS_DESTROY_CONFIRMED,true) - return true - else return false end -end -function c27782503.desrepop(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetLabelObject() - tc:SetStatus(STATUS_DESTROY_CONFIRMED,false) - Duel.Destroy(tc,REASON_EFFECT+REASON_REPLACE) -end diff --git a/script/c27796375.lua b/script/c27796375.lua deleted file mode 100644 index 512da84c62..0000000000 --- a/script/c27796375.lua +++ /dev/null @@ -1,64 +0,0 @@ ---影霊衣の大魔道士 -function c27796375.initial_effect(c) - --tohand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(27796375,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_RELEASE) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e1:SetCountLimit(1,27796375) - e1:SetCondition(c27796375.thcon) - e1:SetCost(c27796375.cost) - e1:SetTarget(c27796375.thtg) - e1:SetOperation(c27796375.thop) - c:RegisterEffect(e1) - --tograve - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(27796375,1)) - e2:SetCategory(CATEGORY_TOGRAVE) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_REMOVE) - e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e2:SetCountLimit(1,27796375) - e2:SetCost(c27796375.cost) - e2:SetTarget(c27796375.tgtg) - e2:SetOperation(c27796375.tgop) - c:RegisterEffect(e2) -end -function c27796375.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) -end -function c27796375.thcon(e,tp,eg,ep,ev,re,r,rp) - return bit.band(r,REASON_EFFECT)~=0 -end -function c27796375.thfilter(c) - return c:IsSetCard(0xb4) and c:IsType(TYPE_RITUAL) and c:IsRace(RACE_SPELLCASTER) and c:IsAbleToHand() -end -function c27796375.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c27796375.thfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c27796375.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c27796375.thfilter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end -function c27796375.tgfilter(c) - return c:IsSetCard(0xb4) and not c:IsCode(27796375) and c:IsType(TYPE_MONSTER) and c:IsAbleToGrave() -end -function c27796375.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c27796375.tgfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) -end -function c27796375.tgop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c27796375.tgfilter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoGrave(g,REASON_EFFECT) - end -end diff --git a/script/c2779999.lua b/script/c2779999.lua deleted file mode 100644 index 05e4fed62d..0000000000 --- a/script/c2779999.lua +++ /dev/null @@ -1,30 +0,0 @@ ---棘の壁 -function c2779999.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_BE_BATTLE_TARGET) - e1:SetCondition(c2779999.condition) - e1:SetTarget(c2779999.target) - e1:SetOperation(c2779999.activate) - c:RegisterEffect(e1) -end -function c2779999.condition(e,tp,eg,ep,ev,re,r,rp) - local tc=eg:GetFirst() - return tc:IsControler(tp) and tc:IsFaceup() and tc:IsRace(RACE_PLANT) -end -function c2779999.filter(c) - return c:IsAttackPos() and c:IsDestructable() -end -function c2779999.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c2779999.filter,tp,0,LOCATION_MZONE,1,nil) end - local g=Duel.GetMatchingGroup(c2779999.filter,tp,0,LOCATION_MZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c2779999.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c2779999.filter,tp,0,LOCATION_MZONE,nil) - if g:GetCount()>0 then - Duel.Destroy(g,REASON_EFFECT) - end -end diff --git a/script/c27813661.lua b/script/c27813661.lua deleted file mode 100644 index 5071039f7f..0000000000 --- a/script/c27813661.lua +++ /dev/null @@ -1,59 +0,0 @@ ---天空の虹彩 -function c27813661.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --cannot be target - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) - e2:SetRange(LOCATION_FZONE) - e2:SetTargetRange(LOCATION_SZONE,0) - e2:SetTarget(c27813661.tgtg) - e2:SetValue(aux.tgoval) - c:RegisterEffect(e2) - --destroy - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(27813661,0)) - e3:SetCategory(CATEGORY_DESTROY+CATEGORY_TOHAND+CATEGORY_SEARCH) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_FZONE) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetCountLimit(1,27813661) - e3:SetTarget(c27813661.destg) - e3:SetOperation(c27813661.desop) - c:RegisterEffect(e3) -end -function c27813661.tgtg(e,c) - return (c:IsSetCard(0x98) or c:IsSetCard(0x9f) or c:IsSetCard(0x99)) - and (c:GetSequence()==6 or c:GetSequence()==7) -end -function c27813661.desfilter(c) - return c:IsFaceup() and c:IsDestructable() -end -function c27813661.thfilter(c) - return c:IsSetCard(0x99) and c:IsAbleToHand() -end -function c27813661.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsControler(tp) and c27813661.desfilter(chkc) and chkc~=e:GetHandler() end - if chk==0 then return Duel.IsExistingTarget(c27813661.desfilter,tp,LOCATION_ONFIELD,0,1,e:GetHandler()) - and Duel.IsExistingMatchingCard(c27813661.thfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c27813661.desfilter,tp,LOCATION_ONFIELD,0,1,1,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c27813661.desop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)~=0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c27813661.thfilter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end - end -end diff --git a/script/c27821104.lua b/script/c27821104.lua deleted file mode 100644 index f9c388b75a..0000000000 --- a/script/c27821104.lua +++ /dev/null @@ -1,48 +0,0 @@ ---六武衆の荒行 -function c27821104.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c27821104.target) - e1:SetOperation(c27821104.activate) - c:RegisterEffect(e1) -end -function c27821104.tfilter(c,atk,code,e,tp) - return c:IsSetCard(0x3d) and not c:IsCode(code) and c:GetAttack()==atk and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c27821104.filter(c,e,tp) - return c:IsFaceup() and c:IsSetCard(0x3d) - and Duel.IsExistingMatchingCard(c27821104.tfilter,tp,LOCATION_DECK,0,1,nil,c:GetAttack(),c:GetCode(),e,tp) -end -function c27821104.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c27821104.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c27821104.filter,tp,LOCATION_MZONE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - local g=Duel.SelectTarget(tp,c27821104.filter,tp,LOCATION_MZONE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c27821104.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local tc=Duel.GetFirstTarget() - if not tc:IsRelateToEffect(e) or tc:IsFacedown() then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=Duel.SelectMatchingCard(tp,c27821104.tfilter,tp,LOCATION_DECK,0,1,1,nil,tc:GetAttack(),tc:GetCode(),e,tp) - if sg:GetCount()>0 then - Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) - end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetOperation(c27821104.desop) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e1:SetCountLimit(1) - tc:RegisterEffect(e1) -end -function c27821104.desop(e,tp,eg,ep,ev,re,r,rp) - Duel.Destroy(e:GetHandler(),REASON_EFFECT) -end diff --git a/script/c27827272.lua b/script/c27827272.lua deleted file mode 100644 index 07d2f09997..0000000000 --- a/script/c27827272.lua +++ /dev/null @@ -1,45 +0,0 @@ ---魔霧雨 -function c27827272.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c27827272.cost) - e1:SetTarget(c27827272.target) - e1:SetOperation(c27827272.activate) - c:RegisterEffect(e1) -end -function c27827272.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetCurrentPhase()==PHASE_MAIN1 end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_BP) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) - e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function c27827272.filter(c,tp) - return c:IsFaceup() and (c:IsCode(70781052) or c:IsRace(RACE_THUNDER)) - and Duel.IsExistingMatchingCard(c27827272.filter2,tp,0,LOCATION_MZONE,1,nil,c:GetAttack()) -end -function c27827272.filter2(c,atk) - return c:IsFaceup() and c:IsDefenceBelow(atk) and c:IsDestructable() -end -function c27827272.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c27827272.filter(chkc,tp) end - if chk==0 then return Duel.IsExistingTarget(c27827272.filter,tp,LOCATION_MZONE,0,1,nil,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - local g=Duel.SelectTarget(tp,c27827272.filter,tp,LOCATION_MZONE,0,1,1,nil,tp) - local dg=Duel.GetMatchingGroup(c27827272.filter2,tp,0,LOCATION_MZONE,nil,g:GetFirst():GetAttack()) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,dg,dg:GetCount(),0,0) -end -function c27827272.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - local dg=Duel.GetMatchingGroup(c27827272.filter2,tp,0,LOCATION_MZONE,nil,tc:GetAttack()) - Duel.Destroy(dg,REASON_EFFECT) - end -end diff --git a/script/c27827903.lua b/script/c27827903.lua deleted file mode 100644 index d1e1fd0206..0000000000 --- a/script/c27827903.lua +++ /dev/null @@ -1,33 +0,0 @@ ---A・ジェネクス・クラッシャー -function c27827903.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(27827903,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCondition(c27827903.descon) - e1:SetTarget(c27827903.destg) - e1:SetOperation(c27827903.desop) - c:RegisterEffect(e1) -end -function c27827903.descon(e,tp,eg,ep,ev,re,r,rp) - return eg:GetFirst()~=e:GetHandler() and eg:GetFirst():GetControler()==e:GetHandler():GetControler() - and eg:GetFirst():IsAttribute(e:GetHandler():GetAttribute()) -end -function c27827903.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and chkc:IsDestructable() end - if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,0,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,0,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c27827903.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c27863269.lua b/script/c27863269.lua deleted file mode 100644 index c42d6f2b59..0000000000 --- a/script/c27863269.lua +++ /dev/null @@ -1,68 +0,0 @@ ---ロケット・パイルダー -function c27863269.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c27863269.target) - e1:SetOperation(c27863269.operation) - c:RegisterEffect(e1) - --indes - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e2:SetCondition(c27863269.indcon) - e2:SetValue(1) - c:RegisterEffect(e2) - --Equip limit - local e3=Effect.CreateEffect(c) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_EQUIP_LIMIT) - e3:SetValue(1) - c:RegisterEffect(e3) - --atkdown - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(27863269,0)) - e4:SetCategory(CATEGORY_ATKCHANGE) - e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e4:SetRange(LOCATION_SZONE) - e4:SetCode(EVENT_DAMAGE_STEP_END) - e4:SetCondition(c27863269.atkcon) - e4:SetOperation(c27863269.atkop) - c:RegisterEffect(e4) -end -function c27863269.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c27863269.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,e:GetHandler(),tc) - end -end -function c27863269.indcon(e) - return Duel.GetAttacker()==e:GetHandler():GetEquipTarget() -end -function c27863269.atkcon(e,tp,eg,ep,ev,re,r,rp) - local at=Duel.GetAttackTarget() - return at and at:IsRelateToBattle() and at:IsFaceup() and Duel.GetAttacker()==e:GetHandler():GetEquipTarget() -end -function c27863269.atkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local at=Duel.GetAttackTarget() - if not c:IsRelateToEffect(e) or not at:IsRelateToBattle() or at:IsFacedown() then return end - local atk=c:GetEquipTarget():GetAttack() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(-atk) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - at:RegisterEffect(e1) -end diff --git a/script/c27869883.lua b/script/c27869883.lua deleted file mode 100644 index d0b63824f0..0000000000 --- a/script/c27869883.lua +++ /dev/null @@ -1,32 +0,0 @@ ---プリーステス・オーム -function c27869883.initial_effect(c) - --damage - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(27869883,0)) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c27869883.damcost) - e1:SetTarget(c27869883.damtg) - e1:SetOperation(c27869883.damop) - c:RegisterEffect(e1) -end -function c27869883.cfilter(c) - return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_DARK) -end -function c27869883.damcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,c27869883.cfilter,1,nil) end - local g=Duel.SelectReleaseGroup(tp,c27869883.cfilter,1,1,nil) - Duel.Release(g,REASON_COST) -end -function c27869883.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(800) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,0,0,1-tp,800) -end -function c27869883.damop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c27870033.lua b/script/c27870033.lua deleted file mode 100644 index bd379746a3..0000000000 --- a/script/c27870033.lua +++ /dev/null @@ -1,32 +0,0 @@ ---チェイス・スカッド -function c27870033.initial_effect(c) - --damage - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(27870033,0)) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_FIELD) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c27870033.damcon) - e1:SetTarget(c27870033.damtg) - e1:SetOperation(c27870033.damop) - c:RegisterEffect(e1) -end -function c27870033.cfilter(c) - return c:IsPreviousPosition(POS_DEFENCE) and c:IsLocation(LOCATION_GRAVE) - and c:IsReason(REASON_BATTLE) and c:IsType(TYPE_MONSTER) -end -function c27870033.damcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c27870033.cfilter,1,nil) -end -function c27870033.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsRelateToEffect(e) and e:GetHandler():IsFaceup() end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(500) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,500) -end -function c27870033.damop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c27873305.lua b/script/c27873305.lua deleted file mode 100644 index 9f1b36aa9b..0000000000 --- a/script/c27873305.lua +++ /dev/null @@ -1,72 +0,0 @@ ---DDD怒濤壊薙王カエサル・ラグナロク -function c27873305.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcFunRep(c,aux.FilterBoolFunction(Card.IsSetCard,0x10af),2,true) - --tohand - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCondition(c27873305.condition) - e1:SetTarget(c27873305.target) - e1:SetOperation(c27873305.operation) - c:RegisterEffect(e1) -end -function c27873305.condition(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return (Duel.GetAttacker()==c or Duel.GetAttackTarget()==c) -end -function c27873305.thfilter(c) - return c:IsFaceup() and (c:IsSetCard(0xaf) or c:IsSetCard(0xae)) and c:IsAbleToHand() -end -function c27873305.eqfilter(c) - return c:IsFaceup() and c:IsAbleToChangeControler() -end -function c27873305.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsControler(tp) and c27873305.thfilter(chkc) and chkc~=e:GetHandler() end - if chk==0 then return Duel.IsExistingTarget(c27873305.thfilter,tp,LOCATION_ONFIELD,0,1,e:GetHandler()) - and Duel.IsExistingMatchingCard(c27873305.eqfilter,tp,0,LOCATION_MZONE,1,e:GetHandler():GetBattleTarget()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g1=Duel.SelectTarget(tp,c27873305.thfilter,tp,LOCATION_ONFIELD,0,1,1,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g1,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,1-tp,LOCATION_MZONE) -end -function c27873305.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.SendtoHand(tc,nil,REASON_EFFECT)~=0 then - Duel.ConfirmCards(1-tp,tc) - local bc=c:GetBattleTarget() - if c:IsFaceup() and c:IsRelateToEffect(e) and bc:IsRelateToBattle() then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local g=Duel.SelectMatchingCard(tp,c27873305.eqfilter,tp,0,LOCATION_MZONE,1,1,bc) - local ec=g:GetFirst() - local atk=ec:GetTextAttack() - if atk<0 then atk=0 end - if not Duel.Equip(tp,ec,c,false) then return end - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_COPY_INHERIT+EFFECT_FLAG_OWNER_RELATE) - e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(c27873305.eqlimit) - ec:RegisterEffect(e1) - if atk>0 then - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_OWNER_RELATE) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetReset(RESET_EVENT+0x1fe0000) - e2:SetValue(atk) - ec:RegisterEffect(e2) - end - end - end -end -function c27873305.eqlimit(e,c) - return e:GetOwner()==c -end diff --git a/script/c27911549.lua b/script/c27911549.lua deleted file mode 100644 index 0b471d0814..0000000000 --- a/script/c27911549.lua +++ /dev/null @@ -1,59 +0,0 @@ ---寄生虫パラサイド -function c27911549.initial_effect(c) - Duel.EnableGlobalFlag(GLOBALFLAG_DECK_REVERSE_CHECK) - --to deck - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(27911549,0)) - e1:SetCategory(CATEGORY_TODECK) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP) - e1:SetTarget(c27911549.target) - e1:SetOperation(c27911549.operation) - c:RegisterEffect(e1) -end -function c27911549.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0) -end -function c27911549.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) or c:IsStatus(STATUS_BATTLE_DESTROYED) then return end - Duel.SendtoDeck(c,1-tp,2,REASON_EFFECT) - if not c:IsLocation(LOCATION_DECK) then return end - Duel.ShuffleDeck(1-tp) - c:ReverseInDeck() - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(27911549,1)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_TO_HAND) - e1:SetCondition(c27911549.spcon) - e1:SetTarget(c27911549.sptg) - e1:SetOperation(c27911549.spop) - e1:SetReset(RESET_EVENT+0x1de0000) - c:RegisterEffect(e1) -end -function c27911549.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsReason(REASON_DRAW) -end -function c27911549.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsRelateToEffect(e) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c27911549.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP_DEFENCE)>0 then - Duel.Damage(tp,1000,REASON_EFFECT) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CHANGE_RACE) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetValue(RACE_INSECT) - e1:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e1) - else - Duel.Destroy(c,REASON_RULE) - end - end -end diff --git a/script/c27918963.lua b/script/c27918963.lua deleted file mode 100644 index 105b9eae49..0000000000 --- a/script/c27918963.lua +++ /dev/null @@ -1,92 +0,0 @@ ---修験の妖社 -function c27918963.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --counter - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetProperty(EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_SUMMON_SUCCESS) - e2:SetRange(LOCATION_SZONE) - e2:SetCondition(c27918963.ctcon) - e2:SetOperation(c27918963.ctop) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e3) - --counter - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(27918963,0)) - e4:SetType(EFFECT_TYPE_IGNITION) - e4:SetRange(LOCATION_SZONE) - e4:SetCountLimit(1,27918963) - e4:SetTarget(c27918963.target) - e4:SetOperation(c27918963.operation) - c:RegisterEffect(e4) -end -function c27918963.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0xb3) -end -function c27918963.ctcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c27918963.cfilter,1,nil) -end -function c27918963.ctop(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():AddCounter(0x33,1) -end -function c27918963.filter1(c) - return c:IsFaceup() and c:IsSetCard(0xb3) -end -function c27918963.filter2(c) - return c:IsSetCard(0xb3) and c:IsAbleToHand() and not c:IsHasEffect(EFFECT_NECRO_VALLEY) -end -function c27918963.target(e,tp,eg,ep,ev,re,r,rp,chk) - local b1=e:GetHandler():IsCanRemoveCounter(tp,0x33,1,REASON_COST) - and Duel.IsExistingMatchingCard(c27918963.filter1,tp,LOCATION_MZONE,0,1,nil) - local b2=e:GetHandler():IsCanRemoveCounter(tp,0x33,3,REASON_COST) - and Duel.IsExistingMatchingCard(c27918963.filter2,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) - if chk==0 then return b1 or b2 end - local op=0 - if b1 and b2 then - op=Duel.SelectOption(tp,aux.Stringid(27918963,1),aux.Stringid(27918963,2)) - elseif b1 then - op=Duel.SelectOption(tp,aux.Stringid(27918963,1)) - else - op=Duel.SelectOption(tp,aux.Stringid(27918963,2))+1 - end - e:SetLabel(op) - if op==0 then - e:SetCategory(CATEGORY_ATKCHANGE) - e:GetHandler():RemoveCounter(tp,0x33,1,REASON_COST) - else - e:SetCategory(CATEGORY_TOHAND) - e:GetHandler():RemoveCounter(tp,0x33,3,REASON_COST) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE) - end -end -function c27918963.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) then return end - if e:GetLabel()==0 then - local g=Duel.GetMatchingGroup(c27918963.filter1,tp,LOCATION_MZONE,0,nil) - local tc=g:GetFirst() - while tc do - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(300) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - tc:RegisterEffect(e1) - tc=g:GetNext() - end - else - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c27918963.filter2,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end - end -end diff --git a/script/c2792265.lua b/script/c2792265.lua deleted file mode 100644 index af81e77990..0000000000 --- a/script/c2792265.lua +++ /dev/null @@ -1,8 +0,0 @@ ---異形の従者 -function c2792265.initial_effect(c) - --direct attack - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DIRECT_ATTACK) - c:RegisterEffect(e1) -end diff --git a/script/c27927359.lua b/script/c27927359.lua deleted file mode 100644 index 00be0b628c..0000000000 --- a/script/c27927359.lua +++ /dev/null @@ -1,26 +0,0 @@ ---ハーピィ・レディ2 -function c27927359.initial_effect(c) - --Disable - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_BATTLED) - e1:SetRange(LOCATION_MZONE) - e1:SetOperation(c27927359.operation) - c:RegisterEffect(e1) -end -function c27927359.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local bc=c:GetBattleTarget() - if bc and bc:IsStatus(STATUS_BATTLE_DESTROYED) and bc:IsType(TYPE_FLIP) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0x17a0000) - bc:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+0x17a0000) - bc:RegisterEffect(e2) - end -end diff --git a/script/c27944249.lua b/script/c27944249.lua deleted file mode 100644 index 14c8d2a01a..0000000000 --- a/script/c27944249.lua +++ /dev/null @@ -1,31 +0,0 @@ ---ガスタの賢者 ウィンダール -function c27944249.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(27944249,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_BATTLE_DESTROYING) - e1:SetCondition(aux.bdgcon) - e1:SetTarget(c27944249.target) - e1:SetOperation(c27944249.operation) - c:RegisterEffect(e1) -end -function c27944249.filter(c,e,tp) - return c:IsLevelBelow(3) and c:IsSetCard(0x10) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c27944249.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c27944249.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c27944249.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c27944249.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c27944249.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENCE) - end -end diff --git a/script/c27967615.lua b/script/c27967615.lua deleted file mode 100644 index a299d75f6a..0000000000 --- a/script/c27967615.lua +++ /dev/null @@ -1,50 +0,0 @@ ---フュージョン・ウェポン -function c27967615.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c27967615.target) - e1:SetOperation(c27967615.operation) - c:RegisterEffect(e1) - --atk up - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(1500) - c:RegisterEffect(e2) - --def up - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_EQUIP) - e3:SetCode(EFFECT_UPDATE_DEFENCE) - e3:SetValue(1500) - c:RegisterEffect(e3) - --Equip limit - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetCode(EFFECT_EQUIP_LIMIT) - e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e4:SetValue(c27967615.eqlimit) - c:RegisterEffect(e4) -end -function c27967615.eqlimit(e,c) - return c:IsType(TYPE_FUSION) and c:IsLevelBelow(6) -end -function c27967615.filter(c) - return c:IsFaceup() and c:IsType(TYPE_FUSION) and c:IsLevelBelow(6) -end -function c27967615.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c27967615.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c27967615.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c27967615.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c27967615.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,e:GetHandler(),tc) - end -end diff --git a/script/c27970830.lua b/script/c27970830.lua deleted file mode 100644 index 074f0ed686..0000000000 --- a/script/c27970830.lua +++ /dev/null @@ -1,131 +0,0 @@ ---六武の門 -function c27970830.initial_effect(c) - c:EnableCounterPermit(0x3003) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --add counter - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetRange(LOCATION_SZONE) - e2:SetCode(EVENT_SUMMON_SUCCESS) - e2:SetOperation(c27970830.ctop) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e3) - --atkup - local e4=Effect.CreateEffect(c) - e4:SetCategory(CATEGORY_ATKCHANGE) - e4:SetDescription(aux.Stringid(27970830,0)) - e4:SetProperty(EFFECT_FLAG_CARD_TARGET) - e4:SetType(EFFECT_TYPE_IGNITION) - e4:SetRange(LOCATION_SZONE) - e4:SetCost(c27970830.cost1) - e4:SetTarget(c27970830.tg1) - e4:SetOperation(c27970830.op1) - c:RegisterEffect(e4) - --search - local e5=Effect.CreateEffect(c) - e5:SetCategory(CATEGORY_TOHAND) - e5:SetDescription(aux.Stringid(27970830,1)) - e5:SetType(EFFECT_TYPE_IGNITION) - e5:SetRange(LOCATION_SZONE) - e5:SetCost(c27970830.cost2) - e5:SetTarget(c27970830.tg2) - e5:SetOperation(c27970830.op2) - c:RegisterEffect(e5) - --special summon - local e6=Effect.CreateEffect(c) - e6:SetCategory(CATEGORY_SPECIAL_SUMMON) - e6:SetDescription(aux.Stringid(27970830,2)) - e6:SetProperty(EFFECT_FLAG_CARD_TARGET) - e6:SetType(EFFECT_TYPE_IGNITION) - e6:SetRange(LOCATION_SZONE) - e6:SetCost(c27970830.cost3) - e6:SetTarget(c27970830.tg3) - e6:SetOperation(c27970830.op3) - c:RegisterEffect(e6) -end -function c27970830.ctfilter(c) - return c:IsFaceup() and c:IsSetCard(0x3d) -end -function c27970830.ctop(e,tp,eg,ep,ev,re,r,rp) - if eg:IsExists(c27970830.ctfilter,1,nil) then - e:GetHandler():AddCounter(0x3003,2) - end -end -function c27970830.cost1(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsCanRemoveCounter(tp,1,0,0x3003,2,REASON_COST) end - Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) - Duel.RemoveCounter(tp,1,0,0x3003,2,REASON_COST) -end -function c27970830.filter1(c) - return c:IsFaceup() and (c:IsSetCard(0x3d) or c:IsSetCard(0x20)) and c:IsType(TYPE_EFFECT) -end -function c27970830.tg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c27970830.filter1(chkc) end - if chk==0 then return Duel.IsExistingTarget(c27970830.filter1,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - local g=Duel.SelectTarget(tp,c27970830.filter1,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,g,1,0,500) -end -function c27970830.op1(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local tc=Duel.GetFirstTarget() - if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e1:SetValue(500) - tc:RegisterEffect(e1) - end -end -function c27970830.cost2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsCanRemoveCounter(tp,1,0,0x3003,4,REASON_COST) end - Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) - Duel.RemoveCounter(tp,1,0,0x3003,4,REASON_COST) -end -function c27970830.filter2(c) - return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x3d) and c:IsAbleToHand() and not c:IsHasEffect(EFFECT_NECRO_VALLEY) -end -function c27970830.tg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chk==0 then return Duel.IsExistingMatchingCard(c27970830.filter2,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE) -end -function c27970830.op2(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c27970830.filter2,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end -function c27970830.cost3(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsCanRemoveCounter(tp,1,0,0x3003,6,REASON_COST) end - Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) - Duel.RemoveCounter(tp,1,0,0x3003,6,REASON_COST) -end -function c27970830.filter3(c,e,tp) - return c:IsSetCard(0x20) and c:IsType(TYPE_EFFECT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c27970830.tg3(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c27970830.filter3(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c27970830.filter3,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c27970830.filter3,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c27970830.op3(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c27971137.lua b/script/c27971137.lua deleted file mode 100644 index b1ce634ab2..0000000000 --- a/script/c27971137.lua +++ /dev/null @@ -1,84 +0,0 @@ ---腐乱犬 -function c27971137.initial_effect(c) - --atkup - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetOperation(c27971137.atkop) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(27971137,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetCondition(c27971137.spcon) - e2:SetTarget(c27971137.sptg) - e2:SetOperation(c27971137.spop) - c:RegisterEffect(e2) -end -function c27971137.atkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(500) - e1:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e1) -end -function c27971137.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) and e:GetHandler():IsReason(REASON_DESTROY) -end -function c27971137.filter(c,e,tp) - return c:GetLevel()==1 and (c:GetAttack()==0 and c:GetDefence()==0) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c27971137.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c27971137.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c27971137.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c27971137.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - local tc=g:GetFirst() - if tc then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - tc:RegisterFlagEffect(27971137,RESET_EVENT+0x1fe0000,0,1) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e2) - local de=Effect.CreateEffect(e:GetHandler()) - de:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - de:SetCode(EVENT_PHASE+PHASE_END) - de:SetCountLimit(1) - de:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - de:SetLabelObject(tc) - de:SetCondition(c27971137.descon) - de:SetOperation(c27971137.desop) - if Duel.GetTurnPlayer()==tp and Duel.GetCurrentPhase()==PHASE_END then - de:SetLabel(Duel.GetTurnCount()) - de:SetReset(RESET_PHASE+PHASE_END+RESET_SELF_TURN,2) - else - de:SetLabel(0) - de:SetReset(RESET_PHASE+PHASE_END+RESET_SELF_TURN) - end - Duel.RegisterEffect(de,tp) - end -end -function c27971137.descon(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetLabelObject() - return Duel.GetTurnPlayer()==tp and Duel.GetTurnCount()~=e:GetLabel() and tc:GetFlagEffect(27971137)~=0 -end -function c27971137.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetLabelObject() - Duel.Destroy(tc,REASON_EFFECT) -end diff --git a/script/c27978707.lua b/script/c27978707.lua deleted file mode 100644 index f8d5549aab..0000000000 --- a/script/c27978707.lua +++ /dev/null @@ -1,73 +0,0 @@ ---超重武者カゲボウ-C -function c27978707.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(27978707,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1,27978707) - e1:SetCost(c27978707.spcost) - e1:SetTarget(c27978707.sptg) - e1:SetOperation(c27978707.spop) - c:RegisterEffect(e1) - --negate - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(27978707,1)) - e2:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_CHAINING) - e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) - e2:SetRange(LOCATION_GRAVE) - e2:SetCountLimit(1,27978708) - e2:SetCondition(c27978707.negcon) - e2:SetCost(c27978707.negcost) - e2:SetTarget(c27978707.negtg) - e2:SetOperation(c27978707.negop) - c:RegisterEffect(e2) -end -function c27978707.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end -function c27978707.filter(c,e,tp) - return c:IsSetCard(0x9a) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c27978707.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsExistingMatchingCard(c27978707.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c27978707.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c27978707.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end -function c27978707.negfilter(c,tp) - return c:IsFaceup() and c:IsSetCard(0x9a) and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) -end -function c27978707.negcon(e,tp,eg,ep,ev,re,r,rp) - if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end - local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) - return g and g:IsExists(c27978707.negfilter,1,nil,tp) and Duel.IsChainNegatable(ev) -end -function c27978707.negcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) -end -function c27978707.negtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) - end -end -function c27978707.negop(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateActivation(ev) - if re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(eg,REASON_EFFECT) - end -end diff --git a/script/c27980138.lua b/script/c27980138.lua deleted file mode 100644 index 80a8242da0..0000000000 --- a/script/c27980138.lua +++ /dev/null @@ -1,39 +0,0 @@ ---ガルドスの羽根ペン -function c27980138.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TODECK+CATEGORY_TOHAND) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c27980138.target) - e1:SetOperation(c27980138.activate) - c:RegisterEffect(e1) -end -function c27980138.filter1(c) - return c:IsAttribute(ATTRIBUTE_WIND) and c:IsType(TYPE_MONSTER) and c:IsAbleToDeck() -end -function c27980138.filter2(c) - return c:IsAbleToHand() -end -function c27980138.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - if chk==0 then return Duel.IsExistingTarget(c27980138.filter1,tp,LOCATION_GRAVE,0,2,nil) - and Duel.IsExistingTarget(c27980138.filter2,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g1=Duel.SelectTarget(tp,c27980138.filter1,tp,LOCATION_GRAVE,0,2,2,nil) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g2=Duel.SelectTarget(tp,c27980138.filter2,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g1,2,0,0) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g2,1,0,0) -end -function c27980138.activate(e,tp,eg,ep,ev,re,r,rp) - local ex,g1=Duel.GetOperationInfo(0,CATEGORY_TODECK) - local ex,g2=Duel.GetOperationInfo(0,CATEGORY_TOHAND) - if g1:GetFirst():IsRelateToEffect(e) and g1:GetNext():IsRelateToEffect(e) then - Duel.SendtoDeck(g1,nil,2,REASON_EFFECT) - if g2:GetFirst():IsRelateToEffect(e) then - Duel.SendtoHand(g2,nil,REASON_EFFECT) - end - end -end diff --git a/script/c27995943.lua b/script/c27995943.lua deleted file mode 100644 index 7b6f8b351c..0000000000 --- a/script/c27995943.lua +++ /dev/null @@ -1,43 +0,0 @@ ---Dr.フランゲ -function c27995943.initial_effect(c) - --tohand - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e1:SetCountLimit(1,27995943) - e1:SetCost(c27995943.cost) - e1:SetTarget(c27995943.target) - e1:SetOperation(c27995943.operation) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e2) -end -function c27995943.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,500) end - Duel.PayLPCost(tp,500) -end -function c27995943.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0 end -end -function c27995943.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetDecktopGroup(tp,1) - Duel.ConfirmCards(tp,g) - if not g:GetFirst():IsAbleToHand() or Duel.SelectYesNo(tp,aux.Stringid(27995943,0)) then - Duel.MoveSequence(g:GetFirst(),1) - else - Duel.DisableShuffleCheck() - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - Duel.ShuffleHand(tp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetTargetRange(1,0) - e1:SetCode(EFFECT_SKIP_DP) - e1:SetReset(RESET_PHASE+PHASE_DRAW+RESET_SELF_TURN) - Duel.RegisterEffect(e1,tp) - end -end diff --git a/script/c28002611.lua b/script/c28002611.lua deleted file mode 100644 index b711bcc586..0000000000 --- a/script/c28002611.lua +++ /dev/null @@ -1,33 +0,0 @@ ---ガジェット・トレーラー -function c28002611.initial_effect(c) - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(28002611,0)) - e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_MZONE) - e1:SetTarget(c28002611.tg) - e1:SetOperation(c28002611.op) - c:RegisterEffect(e1) -end -function c28002611.filter(c) - return c:IsSetCard(0x26) and c:IsType(TYPE_MONSTER) -end -function c28002611.tg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c28002611.filter,tp,LOCATION_HAND,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_HAND) -end -function c28002611.op(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFacedown() or not c:IsRelateToEffect(e) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c28002611.filter,tp,LOCATION_HAND,0,1,63,nil) - if g:GetCount()==0 then return end - Duel.SendtoGrave(g,REASON_EFFECT) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(g:GetCount()*800) - e1:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e1) -end diff --git a/script/c28062325.lua b/script/c28062325.lua deleted file mode 100644 index 1826a920a7..0000000000 --- a/script/c28062325.lua +++ /dev/null @@ -1,32 +0,0 @@ ---竹頭木屑 -function c28062325.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c28062325.cost) - e1:SetTarget(c28062325.target) - e1:SetOperation(c28062325.activate) - c:RegisterEffect(e1) -end -function c28062325.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsRace,1,nil,RACE_PLANT) end - local g=Duel.SelectReleaseGroup(tp,Card.IsRace,1,1,nil,RACE_PLANT) - Duel.Release(g,REASON_COST) -end -function c28062325.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(1-tp,LOCATION_MZONE)>1 - and Duel.IsPlayerCanSpecialSummonMonster(tp,28062326,0,0x4011,800,500,1,RACE_PLANT,ATTRIBUTE_EARTH,POS_FACEUP_DEFENCE,1-tp) end - Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,2,0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,0,0) -end -function c28062325.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(1-tp,LOCATION_MZONE)<2 then return end - if not Duel.IsPlayerCanSpecialSummonMonster(tp,28062326,0,0x4011,800,500,1,RACE_PLANT,ATTRIBUTE_EARTH,POS_FACEUP_DEFENCE,1-tp) then return end - for i=1,2 do - local token=Duel.CreateToken(tp,28062326) - Duel.SpecialSummonStep(token,0,tp,1-tp,false,false,POS_FACEUP_DEFENCE) - end - Duel.SpecialSummonComplete() -end diff --git a/script/c28066831.lua b/script/c28066831.lua deleted file mode 100644 index 5613c6bd27..0000000000 --- a/script/c28066831.lua +++ /dev/null @@ -1,52 +0,0 @@ ---ガスタ・サンボルト -function c28066831.initial_effect(c) - --destroyed - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetOperation(c28066831.flagop) - c:RegisterEffect(e1) -end -function c28066831.flagop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsLocation(LOCATION_GRAVE) or bit.band(c:GetReason(),REASON_BATTLE)==0 then return end - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(28066831,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_PHASE+PHASE_BATTLE) - e1:SetRange(LOCATION_GRAVE) - e1:SetCountLimit(1) - e1:SetCost(c28066831.cost) - e1:SetTarget(c28066831.target) - e1:SetOperation(c28066831.operation) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - c:RegisterEffect(e1) -end -function c28066831.costfilter(c) - return c:IsSetCard(0x10) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost() -end -function c28066831.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c28066831.costfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c28066831.costfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c28066831.filter(c,e,tp) - return c:IsDefenceBelow(1500) and c:IsRace(RACE_PSYCHO) and c:IsAttribute(ATTRIBUTE_WIND) - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c28066831.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c28066831.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c28066831.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c28066831.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c28106077.lua b/script/c28106077.lua deleted file mode 100644 index 1c478a764e..0000000000 --- a/script/c28106077.lua +++ /dev/null @@ -1,70 +0,0 @@ ---ダグラの剣 -function c28106077.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c28106077.target) - e1:SetOperation(c28106077.operation) - c:RegisterEffect(e1) - --recover - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetCategory(CATEGORY_RECOVER) - e2:SetDescription(aux.Stringid(28106077,0)) - e2:SetCode(EVENT_BATTLE_DAMAGE) - e2:SetRange(LOCATION_SZONE) - e2:SetCondition(c28106077.reccon) - e2:SetTarget(c28106077.rectg) - e2:SetOperation(c28106077.recop) - c:RegisterEffect(e2) - --Equip limit - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_EQUIP_LIMIT) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e3:SetValue(c28106077.eqlimit) - c:RegisterEffect(e3) - --Atk up - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_EQUIP) - e4:SetCode(EFFECT_UPDATE_ATTACK) - e4:SetValue(500) - c:RegisterEffect(e4) -end -function c28106077.eqlimit(e,c) - return c:IsRace(RACE_FAIRY) -end -function c28106077.filter(c) - return c:IsFaceup() and c:IsRace(RACE_FAIRY) -end -function c28106077.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:GetLocation()==LOCATION_MZONE and c28106077.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c28106077.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c28106077.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c28106077.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,c,tc) - end -end -function c28106077.reccon(e,tp,eg,ep,ev,re,r,rp) - local ec=e:GetHandler():GetEquipTarget() - return ec and eg:IsContains(ec) and ep~=tp -end -function c28106077.rectg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(ev) - Duel.SetOperationInfo(0,CATEGORY_RECOVER,0,0,tp,ev) -end -function c28106077.recop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Recover(p,d,REASON_EFFECT) -end diff --git a/script/c2810642.lua b/script/c2810642.lua deleted file mode 100644 index a7cead3bcf..0000000000 --- a/script/c2810642.lua +++ /dev/null @@ -1,86 +0,0 @@ ---PSYフレームギア・β -function c2810642.initial_effect(c) - c:EnableUnsummonable() - --splimit - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(c2810642.splimit) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(2810642,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetRange(LOCATION_HAND) - e2:SetCode(EVENT_ATTACK_ANNOUNCE) - e2:SetCondition(c2810642.condition) - e2:SetTarget(c2810642.target) - e2:SetOperation(c2810642.operation) - c:RegisterEffect(e2) -end -function c2810642.splimit(e,se,sp,st) - return se:IsHasType(EFFECT_TYPE_ACTIONS) -end -function c2810642.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 and Duel.GetAttacker():GetControler()~=tp -end -function c2810642.spfilter(c,e,tp) - return c:IsCode(49036338) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c2810642.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>1 - and Duel.GetAttacker():IsDestructable() - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) - and Duel.IsExistingMatchingCard(c2810642.spfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetTargetCard(Duel.GetAttacker()) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,Duel.GetAttacker(),1,0,0) -end -function c2810642.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 or not e:GetHandler():IsRelateToEffect(e) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c2810642.spfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp) - if g:FilterCount(aux.nvfilter,nil)==0 then return end - local tc=g:GetFirst() - local c=e:GetHandler() - local fid=c:GetFieldID() - Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) - Duel.SpecialSummonStep(c,0,tp,tp,false,false,POS_FACEUP) - tc:RegisterFlagEffect(2810642,RESET_EVENT+0x1fe0000,0,1,fid) - c:RegisterFlagEffect(2810642,RESET_EVENT+0x1fe0000,0,1,fid) - Duel.SpecialSummonComplete() - g:AddCard(c) - g:KeepAlive() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetCountLimit(1) - e1:SetLabel(fid) - e1:SetLabelObject(g) - e1:SetCondition(c2810642.rmcon) - e1:SetOperation(c2810642.rmop) - Duel.RegisterEffect(e1,tp) - local dc=Duel.GetFirstTarget() - if dc:IsRelateToEffect(e) and Duel.Destroy(dc,REASON_EFFECT)~=0 then - Duel.BreakEffect() - Duel.SkipPhase(1-tp,PHASE_BATTLE,RESET_PHASE+PHASE_BATTLE,1) - end -end -function c2810642.rmfilter(c,fid) - return c:GetFlagEffectLabel(2810642)==fid -end -function c2810642.rmcon(e,tp,eg,ep,ev,re,r,rp) - local g=e:GetLabelObject() - if not g:IsExists(c2810642.rmfilter,1,nil,e:GetLabel()) then - g:DeleteGroup() - e:Reset() - return false - else return true end -end -function c2810642.rmop(e,tp,eg,ep,ev,re,r,rp) - local g=e:GetLabelObject() - local tg=g:Filter(c2810642.rmfilter,nil,e:GetLabel()) - Duel.Remove(tg,POS_FACEUP,REASON_EFFECT) -end diff --git a/script/c28112535.lua b/script/c28112535.lua deleted file mode 100644 index c999a00804..0000000000 --- a/script/c28112535.lua +++ /dev/null @@ -1,64 +0,0 @@ ---トゥーン・リボルバー・ドラゴン -function c28112535.initial_effect(c) - --cannot attack - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetOperation(c28112535.atklimit) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - c:RegisterEffect(e2) - local e3=e1:Clone() - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e3) - --direct attack - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetCode(EFFECT_DIRECT_ATTACK) - e4:SetCondition(c28112535.dircon) - c:RegisterEffect(e4) - --destroy - local e5=Effect.CreateEffect(c) - e5:SetProperty(EFFECT_FLAG_CARD_TARGET) - e5:SetCategory(CATEGORY_DESTROY+CATEGORY_COIN) - e5:SetType(EFFECT_TYPE_IGNITION) - e5:SetRange(LOCATION_MZONE) - e5:SetCountLimit(1) - e5:SetTarget(c28112535.destg) - e5:SetOperation(c28112535.desop) - c:RegisterEffect(e5) -end -function c28112535.atklimit(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e:GetHandler():RegisterEffect(e1) -end -function c28112535.cfilter1(c) - return c:IsFaceup() and c:IsCode(15259703) -end -function c28112535.cfilter2(c) - return c:IsFaceup() and c:IsType(TYPE_TOON) -end -function c28112535.dircon(e) - local tp=e:GetHandlerPlayer() - return Duel.IsExistingMatchingCard(c28112535.cfilter1,tp,LOCATION_ONFIELD,0,1,nil) - and not Duel.IsExistingMatchingCard(c28112535.cfilter2,tp,0,LOCATION_MZONE,1,nil) -end -function c28112535.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsDestructable() end - if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - Duel.SelectTarget(tp,Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_COIN,nil,0,tp,3) -end -function c28112535.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - local c1,c2,c3=Duel.TossCoin(tp,3) - if c1+c2+c3<2 then return end - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c28118128.lua b/script/c28118128.lua deleted file mode 100644 index 80192755b5..0000000000 --- a/script/c28118128.lua +++ /dev/null @@ -1,27 +0,0 @@ ---子狸たんたん -function c28118128.initial_effect(c) - --flip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(28118128,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP) - e1:SetTarget(c28118128.target) - e1:SetOperation(c28118128.operation) - c:RegisterEffect(e1) -end -function c28118128.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c28118128.filter(c,e,tp) - return c:GetCode()~=28118128 and c:GetLevel()==2 and c:IsRace(RACE_BEAST) - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c28118128.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c28118128.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c28120197.lua b/script/c28120197.lua deleted file mode 100644 index faa1f5eac6..0000000000 --- a/script/c28120197.lua +++ /dev/null @@ -1,22 +0,0 @@ ---断層地帯 -function c28120197.initial_effect(c) - --activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --damage amp - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e2:SetRange(LOCATION_SZONE) - e2:SetCode(EVENT_PRE_BATTLE_DAMAGE) - e2:SetCondition(c28120197.dcon) - e2:SetOperation(c28120197.dop) - c:RegisterEffect(e2) -end -function c28120197.dcon(e,tp,eg,ep,ev,re,r,rp) - return eg:GetFirst():IsDefencePos() and eg:GetFirst():IsRace(RACE_ROCK) -end -function c28120197.dop(e,tp,eg,ep,ev,re,r,rp) - Duel.ChangeBattleDamage(ep,ev*2) -end diff --git a/script/c28121403.lua b/script/c28121403.lua deleted file mode 100644 index db5e72c4e6..0000000000 --- a/script/c28121403.lua +++ /dev/null @@ -1,24 +0,0 @@ ---大成仏 -function c28121403.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_EQUIP) - e1:SetTarget(c28121403.target) - e1:SetOperation(c28121403.activate) - c:RegisterEffect(e1) -end -function c28121403.filter(c) - return c:GetEquipCount()>0 and c:IsDestructable() -end -function c28121403.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c28121403.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - local g=Duel.GetMatchingGroup(c28121403.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c28121403.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c28121403.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - Duel.Destroy(g,REASON_EFFECT) -end diff --git a/script/c28124263.lua b/script/c28124263.lua deleted file mode 100644 index a8f6c82f14..0000000000 --- a/script/c28124263.lua +++ /dev/null @@ -1,56 +0,0 @@ ---D・キャメラン -function c28124263.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EVENT_LEAVE_FIELD_P) - e1:SetOperation(c28124263.check) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(28124263,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_BATTLE_DESTROYED) - e2:SetCondition(c28124263.cona) - e2:SetTarget(c28124263.tga) - e2:SetOperation(c28124263.opa) - e2:SetLabelObject(e1) - c:RegisterEffect(e2) - --untargetable - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) - e3:SetRange(LOCATION_MZONE) - e3:SetCondition(c28124263.cond) - e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e3:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x26)) - e3:SetValue(aux.tgval) - c:RegisterEffect(e3) -end -function c28124263.check(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsDisabled() and c:IsAttackPos() then e:SetLabel(1) - else e:SetLabel(0) end -end -function c28124263.cona(e,tp,eg,ep,ev,re,r,rp) - return e:GetLabelObject():GetLabel()==1 -end -function c28124263.filter(c,e,tp) - return c:IsLevelBelow(4) and c:IsSetCard(0x26) and c:GetCode()~=28124263 - and c:IsCanBeSpecialSummoned(e,0,tp,true,false) and not c:IsHasEffect(EFFECT_NECRO_VALLEY) -end -function c28124263.tga(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c28124263.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE) -end -function c28124263.opa(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c28124263.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) -end -function c28124263.cond(e) - return e:GetHandler():IsDefencePos() -end diff --git a/script/c28143906.lua b/script/c28143906.lua deleted file mode 100644 index a944ba5a75..0000000000 --- a/script/c28143906.lua +++ /dev/null @@ -1,25 +0,0 @@ ---霞の谷の大怪鳥 -function c28143906.initial_effect(c) - --to deck - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(28143906,0)) - e1:SetCategory(CATEGORY_TODECK) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCondition(c28143906.retcon) - e1:SetTarget(c28143906.rettg) - e1:SetOperation(c28143906.retop) - c:RegisterEffect(e1) -end -function c28143906.retcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetPreviousLocation()==LOCATION_HAND -end -function c28143906.rettg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0) -end -function c28143906.retop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_EFFECT) - end -end diff --git a/script/c28150174.lua b/script/c28150174.lua deleted file mode 100644 index 6320e782d5..0000000000 --- a/script/c28150174.lua +++ /dev/null @@ -1,43 +0,0 @@ ---フォトン・バタフライ・アサシン -function c28150174.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,4,2) - c:EnableReviveLimit() - --pos&atk - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(28150174,0)) - e1:SetCategory(CATEGORY_POSITION+CATEGORY_ATKCHANGE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c28150174.poscost) - e1:SetTarget(c28150174.postg) - e1:SetOperation(c28150174.posop) - c:RegisterEffect(e1) -end -function c28150174.poscost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c28150174.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsDefencePos() end - if chk==0 then return Duel.IsExistingTarget(Card.IsDefencePos,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DEFENCE) - local g=Duel.SelectTarget(tp,Card.IsDefencePos,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_POSITION,g,g:GetCount(),0,0) -end -function c28150174.posop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsDefencePos() and tc:IsRelateToEffect(e) then - Duel.ChangePosition(tc,POS_FACEUP_ATTACK) - if tc:IsPosition(POS_FACEUP_ATTACK) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(-600) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - end - end -end diff --git a/script/c28183605.lua b/script/c28183605.lua deleted file mode 100644 index f659d6cae0..0000000000 --- a/script/c28183605.lua +++ /dev/null @@ -1,57 +0,0 @@ ---ドラグニティ-ドゥクス -function c28183605.initial_effect(c) - --atk - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(c28183605.atkval) - c:RegisterEffect(e1) - --equip - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(28183605,0)) - e2:SetCategory(CATEGORY_LEAVE_GRAVE+CATEGORY_EQUIP) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_SUMMON_SUCCESS) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetTarget(c28183605.eqtg) - e2:SetOperation(c28183605.eqop) - c:RegisterEffect(e2) -end -function c28183605.atkfilter(c) - return c:IsFaceup() and c:IsSetCard(0x29) -end -function c28183605.atkval(e,c) - return Duel.GetMatchingGroupCount(c28183605.atkfilter,c:GetControler(),LOCATION_ONFIELD,0,nil)*200 -end -function c28183605.filter(c) - return c:IsLevelBelow(3) and c:IsSetCard(0x29) and c:IsRace(RACE_DRAGON) -end -function c28183605.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c28183605.filter(chkc) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingTarget(c28183605.filter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local g=Duel.SelectTarget(tp,c28183605.filter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0) -end -function c28183605.eqop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsFaceup() and c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then - if not Duel.Equip(tp,tc,c,false) then return end - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_OWNER_RELATE) - e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(c28183605.eqlimit) - tc:RegisterEffect(e1) - end -end -function c28183605.eqlimit(e,c) - return e:GetOwner()==c -end diff --git a/script/c28190303.lua b/script/c28190303.lua deleted file mode 100644 index e172b9a70a..0000000000 --- a/script/c28190303.lua +++ /dev/null @@ -1,31 +0,0 @@ ---BF-白夜のグラディウス -function c28190303.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c28190303.spcon) - c:RegisterEffect(e1) - --battle indes - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EFFECT_INDESTRUCTABLE_COUNT) - e2:SetCountLimit(1) - e2:SetValue(c28190303.valcon) - c:RegisterEffect(e2) -end -function c28190303.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return false end - local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil) - local tc=g:GetFirst() - return g:GetCount()==1 and tc:IsSetCard(0x33) and tc:GetCode()~=28190303 -end -function c28190303.valcon(e,re,r,rp) - return bit.band(r,REASON_BATTLE)~=0 -end diff --git a/script/c28194325.lua b/script/c28194325.lua deleted file mode 100644 index ec72bb44d2..0000000000 --- a/script/c28194325.lua +++ /dev/null @@ -1,32 +0,0 @@ ---H・C クラスプ・ナイフ -function c28194325.initial_effect(c) - --search - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(28194325,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCountLimit(1,28194325) - e1:SetCondition(c28194325.condition) - e1:SetTarget(c28194325.target) - e1:SetOperation(c28194325.operation) - c:RegisterEffect(e1) -end -function c28194325.condition(e,tp,eg,ep,ev,re,r,rp) - return re and re:GetHandler():IsSetCard(0x106f) -end -function c28194325.filter(c) - return c:IsSetCard(0x106f) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() -end -function c28194325.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c28194325.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c28194325.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c28194325.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c28201945.lua b/script/c28201945.lua deleted file mode 100644 index 669776dba5..0000000000 --- a/script/c28201945.lua +++ /dev/null @@ -1,56 +0,0 @@ ---カズーラの蟲惑魔 -function c28201945.initial_effect(c) - --immune - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_IMMUNE_EFFECT) - e1:SetValue(c28201945.efilter) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(28201945,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_CHAIN_SOLVING) - e2:SetProperty(EFFECT_FLAG_DELAY) - e2:SetCountLimit(1,28201945) - e2:SetRange(LOCATION_MZONE) - e2:SetCondition(c28201945.spcon) - e2:SetTarget(c28201945.sptg) - e2:SetOperation(c28201945.spop) - c:RegisterEffect(e2) -end -function c28201945.efilter(e,te) - local c=te:GetHandler() - return c:GetType()==TYPE_TRAP and (c:IsSetCard(0x4c) or c:IsSetCard(0x89)) -end -function c28201945.spcon(e,tp,eg,ep,ev,re,r,rp) - local c=re:GetHandler() - return rp==tp and re:IsHasType(EFFECT_TYPE_ACTIVATE) and c:GetType()==TYPE_TRAP and (c:IsSetCard(0x4c) or c:IsSetCard(0x89)) -end -function c28201945.filter(c,e,tp,ft) - return c:IsSetCard(0x108a) and c:GetCode()~=28201945 and (c:IsAbleToHand() or (ft>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false))) -end -function c28201945.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if chk==0 then return e:GetHandler():IsRelateToEffect(e) - and Duel.IsExistingMatchingCard(c28201945.filter,tp,LOCATION_DECK,0,1,nil,e,tp,ft) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c28201945.spop(e,tp,eg,ep,ev,re,r,rp) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c28201945.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp,ft) - local tc=g:GetFirst() - if tc then - if ft>0 and tc:IsCanBeSpecialSummoned(e,0,tp,false,false) - and (not tc:IsAbleToHand() or Duel.SelectYesNo(tp,aux.Stringid(28201945,1))) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - else - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end - end -end diff --git a/script/c28265983.lua b/script/c28265983.lua deleted file mode 100644 index 43d517c51c..0000000000 --- a/script/c28265983.lua +++ /dev/null @@ -1,128 +0,0 @@ ---渇きの風 -function c28265983.initial_effect(c) - --activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(TIMING_RECOVER,0) - e1:SetTarget(c28265983.target) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(28265983,1)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_RECOVER) - e2:SetRange(LOCATION_SZONE) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCountLimit(1,28265983) - e2:SetCondition(c28265983.descon1) - e2:SetTarget(c28265983.destg1) - e2:SetOperation(c28265983.desop1) - c:RegisterEffect(e2) - --destroy - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(28265983,2)) - e3:SetCategory(CATEGORY_DESTROY) - e3:SetType(EFFECT_TYPE_QUICK_O) - e3:SetCode(EVENT_FREE_CHAIN) - e3:SetRange(LOCATION_SZONE) - e3:SetCountLimit(1,28265984) - e3:SetCondition(c28265983.descon2) - e3:SetCost(c28265983.descost2) - e3:SetTarget(c28265983.destg2) - e3:SetOperation(c28265983.desop2) - c:RegisterEffect(e3) -end -function c28265983.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return c28265983.destg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end - if chk==0 then return true end - local res,teg,tep,tev,tre,tr,trp=Duel.CheckEvent(EVENT_RECOVER,true) - local b1=res and c28265983.descon1(e,tp,teg,tep,tev,tre,tr,trp) and c28265983.destg1(e,tp,teg,tep,tev,tre,tr,trp,0) - local b2=c28265983.descon2(e,tp,eg,ep,ev,re,r,rp) and c28265983.descost2(e,tp,eg,ep,ev,re,r,rp,0) and c28265983.destg2(e,tp,eg,ep,ev,re,r,rp,0) - if (b1 or b2) and Duel.SelectYesNo(tp,94) then - local opt=0 - if b1 and b2 then - opt=Duel.SelectOption(tp,aux.Stringid(28265983,1),aux.Stringid(28265983,2)) - elseif b1 then - opt=Duel.SelectOption(tp,aux.Stringid(28265983,1)) - else - opt=Duel.SelectOption(tp,aux.Stringid(28265983,2))+1 - end - if opt==0 then - e:SetCategory(CATEGORY_DESTROY) - e:SetProperty(EFFECT_FLAG_CARD_TARGET) - e:SetOperation(c28265983.desop1) - c28265983.destg1(e,tp,teg,tep,tev,tre,tr,trp,1) - else - e:SetCategory(CATEGORY_DESTROY) - e:SetProperty(0) - e:SetOperation(c28265983.desop2) - c28265983.descost2(e,tp,eg,ep,ev,re,r,rp,1) - c28265983.destg2(e,tp,eg,ep,ev,re,r,rp,1) - end - else - e:SetCategory(0) - e:SetProperty(0) - e:SetOperation(nil) - end -end -function c28265983.descon1(e,tp,eg,ep,ev,re,r,rp) - return ep==tp -end -function c28265983.desfilter1(c) - return c:IsFaceup() and c:IsDestructable() -end -function c28265983.destg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c28265983.desfilter1(chkc) end - if chk==0 then return Duel.GetFlagEffect(tp,28265983)==0 end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c28265983.desfilter1,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) - Duel.RegisterFlagEffect(tp,28265983,RESET_PHASE+RESET_END,0,1) -end -function c28265983.desop1(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end -function c28265983.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0xc9) -end -function c28265983.descon2(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c28265983.cfilter,tp,LOCATION_MZONE,0,1,nil) and Duel.GetLP(tp)-Duel.GetLP(1-tp)>=3000 -end -function c28265983.descost2(e,tp,eg,ep,ev,re,r,rp,chk) - local lp=Duel.GetLP(tp)-Duel.GetLP(1-tp) - if chk==0 then return Duel.CheckLPCost(tp,lp) and Duel.GetFlagEffect(tp,28265984)==0 end - Duel.PayLPCost(tp,lp) - e:SetLabel(lp) - Duel.RegisterFlagEffect(tp,28265984,RESET_PHASE+RESET_END,0,1) -end -function c28265983.desfilter2(c,num) - return c:IsFaceup() and c:IsAttackBelow(num) and c:IsDestructable() -end -function c28265983.destg2(e,tp,eg,ep,ev,re,r,rp,chk) - local lp=Duel.GetLP(tp)-Duel.GetLP(1-tp) - if chk==0 then return Duel.IsExistingMatchingCard(c28265983.desfilter2,tp,0,LOCATION_MZONE,1,nil,lp) end - local g=Duel.GetMatchingGroup(c28265983.desfilter2,tp,0,LOCATION_MZONE,nil,e:GetLabel()) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c28265983.desop2(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local num=e:GetLabel() - local g=Duel.GetMatchingGroup(c28265983.desfilter2,tp,0,LOCATION_MZONE,nil,num) - if g:GetCount()==0 then return end - local dg=Group.CreateGroup() - repeat - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local tg=g:FilterSelect(tp,c28265983.desfilter2,1,1,nil,num) - local tc=tg:GetFirst() - num=num-tc:GetAttack() - g:RemoveCard(tc) - dg:AddCard(tc) - until not g:IsExists(c28265983.desfilter2,1,nil,num) or not Duel.SelectYesNo(tp,aux.Stringid(28265983,3)) - Duel.Destroy(dg,REASON_EFFECT) -end diff --git a/script/c28284902.lua b/script/c28284902.lua deleted file mode 100644 index dea00afdc8..0000000000 --- a/script/c28284902.lua +++ /dev/null @@ -1,40 +0,0 @@ ---D・ゲイザー -function c28284902.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --pos - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(28284902,0)) - e2:SetCategory(CATEGORY_POSITION) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_SUMMON_SUCCESS) - e2:SetRange(LOCATION_SZONE) - e2:SetTarget(c28284902.target) - e2:SetOperation(c28284902.operation) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - c:RegisterEffect(e3) - local e4=e2:Clone() - e4:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e4) -end -function c28284902.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x26) and c:IsAttackPos() -end -function c28284902.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return eg:IsExists(c28284902.cfilter,1,nil) end - Duel.SetTargetCard(eg) - Duel.SetOperationInfo(0,CATEGORY_POSITION,eg,eg:GetCount(),0,0) -end -function c28284902.filter(c,e) - return c:IsFaceup() and c:IsSetCard(0x26) and c:IsAttackPos() and c:IsRelateToEffect(e) -end -function c28284902.operation(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local g=eg:Filter(c28284902.filter,nil,e) - Duel.ChangePosition(g,POS_FACEUP_DEFENCE) -end diff --git a/script/c282886.lua b/script/c282886.lua deleted file mode 100644 index 0feb78a88c..0000000000 --- a/script/c282886.lua +++ /dev/null @@ -1,38 +0,0 @@ ---水精鱗-アビスノーズ -function c282886.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(282886,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetCode(EVENT_BATTLE_DESTROYING) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCountLimit(1,282886) - e1:SetCondition(aux.bdogcon) - e1:SetCost(c282886.spcost) - e1:SetTarget(c282886.sptg) - e1:SetOperation(c282886.spop) - c:RegisterEffect(e1) -end -function c282886.cfilter(c) - return c:IsAttribute(ATTRIBUTE_WATER) and c:IsDiscardable() and c:IsAbleToGraveAsCost() -end -function c282886.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c282886.cfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,c282886.cfilter,1,1,REASON_COST+REASON_DISCARD) -end -function c282886.filter(c,e,tp) - return c:IsSetCard(0x74) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c282886.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c282886.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c282886.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c282886.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENCE) - end -end diff --git a/script/c28290705.lua b/script/c28290705.lua deleted file mode 100644 index 7b90097455..0000000000 --- a/script/c28290705.lua +++ /dev/null @@ -1,43 +0,0 @@ ---妖精王 アルヴェルド -function c28290705.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_EARTH),4,2) - c:EnableReviveLimit() - --addown - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(28290705,0)) - e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCost(c28290705.adcost) - e1:SetTarget(c28290705.adtg) - e1:SetOperation(c28290705.adop) - c:RegisterEffect(e1) -end -function c28290705.adcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c28290705.filter(c) - return c:IsFaceup() and c:GetAttribute()~=ATTRIBUTE_EARTH -end -function c28290705.adtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c28290705.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end -end -function c28290705.adop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c28290705.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - local tc=g:GetFirst() - while tc do - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(-500) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_UPDATE_DEFENCE) - tc:RegisterEffect(e2) - tc=g:GetNext() - end -end diff --git a/script/c28297833.lua b/script/c28297833.lua deleted file mode 100644 index 9fa12db2d9..0000000000 --- a/script/c28297833.lua +++ /dev/null @@ -1,58 +0,0 @@ ---ネクロフェイス -function c28297833.initial_effect(c) - --atkup - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(28297833,0)) - e1:SetCategory(CATEGORY_TODECK+CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c28297833.tdtg) - e1:SetOperation(c28297833.tdop) - c:RegisterEffect(e1) - --remove - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(28297833,1)) - e2:SetCategory(CATEGORY_REMOVE) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_REMOVE) - e2:SetTarget(c28297833.rmtg) - e2:SetOperation(c28297833.rmop) - c:RegisterEffect(e2) -end -function c28297833.tdtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,PLAYER_ALL,LOCATION_REMOVED) -end -function c28297833.tdop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local g=Duel.GetFieldGroup(tp,LOCATION_REMOVED,LOCATION_REMOVED) - Duel.SendtoDeck(g,nil,2,REASON_EFFECT) - if c:IsFaceup() and c:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+0x1ff0000) - e1:SetValue(g:GetCount()*100) - c:RegisterEffect(e1) - end -end -function c28297833.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,5,PLAYER_ALL,LOCATION_DECK) -end -function c28297833.rmop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local g1=Duel.GetDecktopGroup(tp,5) - local g2=Duel.GetDecktopGroup(1-tp,5) - g1:Merge(g2) - Duel.DisableShuffleCheck() - Duel.Remove(g1,POS_FACEUP,REASON_EFFECT) - if c:IsFaceup() and c:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e1:SetValue(500) - c:RegisterEffect(e1) - end -end \ No newline at end of file diff --git a/script/c2830693.lua b/script/c2830693.lua deleted file mode 100644 index e610852a7d..0000000000 --- a/script/c2830693.lua +++ /dev/null @@ -1,80 +0,0 @@ ---虹クリボー -function c2830693.initial_effect(c) - --equip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(2830693,0)) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(1,2830693) - e1:SetTarget(c2830693.eqtg) - e1:SetOperation(c2830693.eqop) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(2830693,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_ATTACK_ANNOUNCE) - e2:SetRange(LOCATION_GRAVE) - e2:SetCountLimit(1,2830694) - e2:SetCondition(c2830693.spcon) - e2:SetTarget(c2830693.sptg) - e2:SetOperation(c2830693.spop) - c:RegisterEffect(e2) -end -function c2830693.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local at=Duel.GetAttacker() - if chkc then return chkc==at end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and at:IsControler(1-tp) and at:IsRelateToBattle() and at:IsCanBeEffectTarget(e) end - Duel.SetTargetCard(at) -end -function c2830693.eqop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if not c:IsRelateToEffect(e) then return end - if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or tc:IsFacedown() or not tc:IsRelateToEffect(e) then - Duel.SendtoGrave(c,REASON_EFFECT) - else - Duel.Equip(tp,c,tc,true) - --Add Equip limit - local e1=Effect.CreateEffect(tc) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(c2830693.eqlimit) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_CANNOT_ATTACK) - e2:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e2) - end -end -function c2830693.eqlimit(e,c) - return e:GetOwner()==c -end -function c2830693.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetAttacker():IsControler(1-tp) and Duel.GetAttackTarget()==nil -end -function c2830693.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c2830693.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+0x47e0000) - e1:SetValue(LOCATION_REMOVED) - c:RegisterEffect(e1,true) - end -end diff --git a/script/c28325165.lua b/script/c28325165.lua deleted file mode 100644 index 827f483ac6..0000000000 --- a/script/c28325165.lua +++ /dev/null @@ -1,66 +0,0 @@ ---水物語-ウラシマ -function c28325165.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DISABLE+CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetCondition(c28325165.condition) - e1:SetTarget(c28325165.target) - e1:SetOperation(c28325165.activate) - c:RegisterEffect(e1) -end -function c28325165.cfilter(c) - return c:IsSetCard(0xcd) and c:IsType(TYPE_MONSTER) -end -function c28325165.condition(e,tp,eg,ep,ev,re,r,rp) - return (Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()) - and Duel.IsExistingMatchingCard(c28325165.cfilter,tp,LOCATION_GRAVE,0,1,nil) -end -function c28325165.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0) -end -function c28325165.activate(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.NegateRelatedChain(tc,RESET_TURN_SET) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetValue(RESET_TURN_SET) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - tc:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_SET_ATTACK_FINAL) - e3:SetValue(100) - e3:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - tc:RegisterEffect(e3) - local e4=e3:Clone() - e4:SetCode(EFFECT_SET_DEFENCE_FINAL) - tc:RegisterEffect(e4) - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_SINGLE) - e5:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e5:SetRange(LOCATION_MZONE) - e5:SetCode(EFFECT_IMMUNE_EFFECT) - e5:SetValue(c28325165.efilter) - e5:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e5) - end -end -function c28325165.efilter(e,te) - return te:GetOwnerPlayer()~=e:GetOwnerPlayer() -end diff --git a/script/c2833249.lua b/script/c2833249.lua deleted file mode 100644 index a739ed60d4..0000000000 --- a/script/c2833249.lua +++ /dev/null @@ -1,26 +0,0 @@ ---竜の血族 -function c2833249.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c2833249.target) - e1:SetOperation(c2833249.operation) - c:RegisterEffect(e1) -end -function c2833249.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end -end -function c2833249.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil) - local tc=g:GetFirst() - while tc do - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CHANGE_RACE) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e1:SetValue(RACE_DRAGON) - tc:RegisterEffect(e1) - tc=g:GetNext() - end -end diff --git a/script/c28332833.lua b/script/c28332833.lua deleted file mode 100644 index ff412ce9dc..0000000000 --- a/script/c28332833.lua +++ /dev/null @@ -1,32 +0,0 @@ ---フレムベル・パウン -function c28332833.initial_effect(c) - --search - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(28332833,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetCondition(c28332833.thcon) - e1:SetTarget(c28332833.thtg) - e1:SetOperation(c28332833.thop) - c:RegisterEffect(e1) -end -function c28332833.thcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsLocation(LOCATION_GRAVE) - and e:GetHandler():IsReason(REASON_BATTLE) -end -function c28332833.filter(c) - return c:GetDefence()==200 and c:IsAbleToHand() -end -function c28332833.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c28332833.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c28332833.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c28332833.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c28348537.lua b/script/c28348537.lua deleted file mode 100644 index 08000d9b2a..0000000000 --- a/script/c28348537.lua +++ /dev/null @@ -1,47 +0,0 @@ ---ブリザード・プリンセス -function c28348537.initial_effect(c) - --summon with 1 tribute - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(28348537,0)) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SUMMON_PROC) - e1:SetCondition(c28348537.otcon) - e1:SetOperation(c28348537.otop) - e1:SetValue(SUMMON_TYPE_ADVANCE) - c:RegisterEffect(e1) - --activate limit - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_SUMMON_SUCCESS) - e2:SetOperation(c28348537.actlimit) - c:RegisterEffect(e2) -end -function c28348537.otfilter(c,tp) - return c:IsRace(RACE_SPELLCASTER) and (c:IsControler(tp) or c:IsFaceup()) -end -function c28348537.otcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - local mg=Duel.GetMatchingGroup(c28348537.otfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp) - return c:GetLevel()>6 and Duel.GetTributeCount(c,mg)>0 -end -function c28348537.otop(e,tp,eg,ep,ev,re,r,rp,c) - local mg=Duel.GetMatchingGroup(c28348537.otfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp) - local sg=Duel.SelectTribute(tp,c,1,1,mg) - c:SetMaterial(sg) - Duel.Release(sg, REASON_SUMMON+REASON_MATERIAL) -end -function c28348537.actlimit(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetTargetRange(0,1) - e1:SetValue(c28348537.elimit) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function c28348537.elimit(e,te,tp) - return te:IsHasType(EFFECT_TYPE_ACTIVATE) -end diff --git a/script/c28348939.lua b/script/c28348939.lua deleted file mode 100644 index 65219a3336..0000000000 --- a/script/c28348939.lua +++ /dev/null @@ -1,39 +0,0 @@ ---白虎の召喚士 -function c28348939.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(28348939,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c28348939.sptg) - e1:SetOperation(c28348939.spop) - c:RegisterEffect(e1) - --boost - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetRange(LOCATION_MZONE) - e2:SetTargetRange(LOCATION_MZONE,0) - e2:SetValue(100) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EFFECT_UPDATE_DEFENCE) - c:RegisterEffect(e3) -end -function c28348939.filter(c,e,tp) - return c:IsLevelBelow(4) and c:IsType(TYPE_NORMAL) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c28348939.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c28348939.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c28348939.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c28348939.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c28355718.lua b/script/c28355718.lua deleted file mode 100644 index 21932aef7c..0000000000 --- a/script/c28355718.lua +++ /dev/null @@ -1,56 +0,0 @@ ---D-HERO ダブルガイ -function c28355718.initial_effect(c) - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - c:RegisterEffect(e1) - --multiattack - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_EXTRA_ATTACK) - e2:SetValue(1) - c:RegisterEffect(e2) - --token - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e3:SetCode(EVENT_TO_GRAVE) - e3:SetOperation(c28355718.regop) - c:RegisterEffect(e3) -end -function c28355718.regop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsReason(REASON_DESTROY) then - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(28355718,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetRange(LOCATION_GRAVE) - e1:SetCountLimit(1) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) - e1:SetCondition(c28355718.spcon) - e1:SetTarget(c28355718.sptg) - e1:SetOperation(c28355718.spop) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,1) - c:RegisterEffect(e1) - end -end -function c28355718.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c28355718.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>1 - and Duel.IsPlayerCanSpecialSummonMonster(tp,28355719,0,0x4011,1000,1000,4,RACE_WARRIOR,ATTRIBUTE_DARK) end - Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,2,0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,0,0) -end -function c28355718.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 then return end - if not Duel.IsPlayerCanSpecialSummonMonster(tp,28355719,0,0x4011,1000,1000,4,RACE_WARRIOR,ATTRIBUTE_DARK) then return end - for i=1,2 do - local token=Duel.CreateToken(tp,28355719) - Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP) - end - Duel.SpecialSummonComplete() -end diff --git a/script/c28357177.lua b/script/c28357177.lua deleted file mode 100644 index 1d510ebf7d..0000000000 --- a/script/c28357177.lua +++ /dev/null @@ -1,28 +0,0 @@ ---派手ハネ -function c28357177.initial_effect(c) - --flip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(28357177,0)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) - e1:SetTarget(c28357177.target) - e1:SetOperation(c28357177.operation) - c:RegisterEffect(e1) -end -function c28357177.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsAbleToHand() end - if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToHand,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g=Duel.SelectTarget(tp,Card.IsAbleToHand,tp,LOCATION_MZONE,LOCATION_MZONE,1,3,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0) -end -function c28357177.operation(e,tp,eg,ep,ev,re,r,rp) - local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - if tg then - local g=tg:Filter(Card.IsRelateToEffect,nil,e) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - end - end -end diff --git a/script/c28358902.lua b/script/c28358902.lua deleted file mode 100644 index 3e361ff6c8..0000000000 --- a/script/c28358902.lua +++ /dev/null @@ -1,34 +0,0 @@ ---紅蓮の女守護兵 -function c28358902.initial_effect(c) - --to deck - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TODECK) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c28358902.cost) - e1:SetTarget(c28358902.target) - e1:SetOperation(c28358902.operation) - c:RegisterEffect(e1) -end -function c28358902.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end -function c28358902.filter(c,tid) - return c:IsType(TYPE_MONSTER) and c:GetTurnID()==tid and c:IsReason(REASON_BATTLE) and c:IsAbleToDeck() -end -function c28358902.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local tid=Duel.GetTurnCount() - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c28358902.filter(chkc,tid) end - if chk==0 then return Duel.IsExistingTarget(c28358902.filter,tp,LOCATION_GRAVE,0,1,nil,tid) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectTarget(tp,c28358902.filter,tp,LOCATION_GRAVE,0,1,1,nil,tid) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0) -end -function c28358902.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoDeck(tc,nil,1,REASON_EFFECT) - end -end diff --git a/script/c28378427.lua b/script/c28378427.lua deleted file mode 100644 index c2ee632f3a..0000000000 --- a/script/c28378427.lua +++ /dev/null @@ -1,36 +0,0 @@ ---ダメージ・コンデンサー -function c28378427.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_BATTLE_DAMAGE) - e1:SetCondition(c28378427.condition) - e1:SetCost(c28378427.cost) - e1:SetTarget(c28378427.target) - e1:SetOperation(c28378427.activate) - c:RegisterEffect(e1) -end -function c28378427.condition(e,tp,eg,ep,ev,re,r,rp) - return ep==tp -end -function c28378427.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) -end -function c28378427.filter(c,e,tp,dam) - return c:IsAttackBelow(dam) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c28378427.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c28378427.filter,tp,LOCATION_DECK,0,1,nil,e,tp,ev) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c28378427.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c28378427.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp,ev) - if g:GetCount()~=0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_ATTACK) - end -end diff --git a/script/c28388296.lua b/script/c28388296.lua deleted file mode 100644 index 28dfea3e08..0000000000 --- a/script/c28388296.lua +++ /dev/null @@ -1,56 +0,0 @@ ---スクラップ・ファクトリー -function c28388296.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --boost - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x24)) - e2:SetValue(200) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EFFECT_UPDATE_DEFENCE) - c:RegisterEffect(e3) - --special summon - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(28388296,0)) - e4:SetCategory(CATEGORY_SPECIAL_SUMMON) - e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e4:SetRange(LOCATION_SZONE) - e4:SetCode(EVENT_TO_GRAVE) - e4:SetCountLimit(1,28388296) - e4:SetCondition(c28388296.condition) - e4:SetTarget(c28388296.target) - e4:SetOperation(c28388296.operation) - c:RegisterEffect(e4) -end -function c28388296.cfilter(c,tp) - return c:IsSetCard(0x24) and c:IsType(TYPE_MONSTER) and bit.band(c:GetReason(),0x41)==0x41 - and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP) -end -function c28388296.condition(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c28388296.cfilter,1,nil,tp) -end -function c28388296.spfilter(c,e,tp) - return c:IsSetCard(0x24) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c28388296.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c28388296.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c28388296.operation(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c28388296.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c28423537.lua b/script/c28423537.lua deleted file mode 100644 index 9e7169fbde..0000000000 --- a/script/c28423537.lua +++ /dev/null @@ -1,90 +0,0 @@ ---戦慄の凶皇-ジェネシス・デーモン -function c28423537.initial_effect(c) - --summon with no tribute - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(28423537,0)) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SUMMON_PROC) - e1:SetCondition(c28423537.ntcon) - e1:SetOperation(c28423537.ntop) - c:RegisterEffect(e1) - -- - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetTargetRange(1,0) - e2:SetTarget(c28423537.splimit) - c:RegisterEffect(e2) - --destroy - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(28423537,1)) - e3:SetCategory(CATEGORY_DESTROY) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1) - e3:SetCost(c28423537.descost) - e3:SetTarget(c28423537.destg) - e3:SetOperation(c28423537.desop) - c:RegisterEffect(e3) -end -function c28423537.ntcon(e,c,minc) - if c==nil then return true end - return minc==0 and c:GetLevel()>4 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 -end -function c28423537.ntop(e,tp,eg,ep,ev,re,r,rp,c) - --change base attack - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_SET_BASE_ATTACK) - e1:SetValue(1500) - e1:SetReset(RESET_EVENT+0xff0000) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_SET_BASE_DEFENCE) - e2:SetValue(1000) - c:RegisterEffect(e2) - -- - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1) - e3:SetCode(EVENT_PHASE+PHASE_END) - e3:SetOperation(c28423537.tgop) - e3:SetReset(RESET_EVENT+0xc6e0000) - c:RegisterEffect(e3) -end -function c28423537.splimit(e,c,tp,sumtp,sumpos) - return c:GetRace()~=RACE_FIEND -end -function c28423537.tgop(e,tp,eg,ep,ev,re,r,rp) - Duel.Destroy(e:GetHandler(),REASON_EFFECT) -end -function c28423537.rfilter(c) - return c:IsSetCard(0x45) and c:IsAbleToRemoveAsCost() -end -function c28423537.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c28423537.rfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c28423537.rfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c28423537.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsDestructable() end - if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c28423537.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c28429121.lua b/script/c28429121.lua deleted file mode 100644 index 5aff057148..0000000000 --- a/script/c28429121.lua +++ /dev/null @@ -1,68 +0,0 @@ ---リチュアに伝わりし禁断の秘術 -function c28429121.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c28429121.cost) - e1:SetTarget(c28429121.target) - e1:SetOperation(c28429121.activate) - c:RegisterEffect(e1) -end -function c28429121.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetCurrentPhase()~=PHASE_MAIN2 end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_BP) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) - e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function c28429121.mfilter(c,e) - return c:IsFaceup() and c:GetLevel()>0 and not c:IsImmuneToEffect(e) and c:IsReleasable() -end -function c28429121.filter(c,e,tp,m) - if bit.band(c:GetType(),0x81)~=0x81 or not c:IsSetCard(0x3a) - or not c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true) then return false end - local mg=m:Filter(Card.IsCanBeRitualMaterial,c,c) - return mg:CheckWithSumEqual(Card.GetRitualLevel,c:GetLevel(),1,99,c) -end -function c28429121.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return false end - local mg1=Duel.GetRitualMaterial(tp) - mg1:Remove(Card.IsLocation,nil,LOCATION_HAND) - local mg2=Duel.GetMatchingGroup(c28429121.mfilter,tp,0,LOCATION_MZONE,nil,e) - mg1:Merge(mg2) - return Duel.IsExistingMatchingCard(c28429121.filter,tp,LOCATION_HAND,0,1,nil,e,tp,mg1) - end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c28429121.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local mg1=Duel.GetRitualMaterial(tp) - mg1:Remove(Card.IsLocation,nil,LOCATION_HAND) - local mg2=Duel.GetMatchingGroup(c28429121.mfilter,tp,0,LOCATION_MZONE,nil,e) - mg1:Merge(mg2) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local tg=Duel.SelectMatchingCard(tp,c28429121.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp,mg1) - local tc=tg:GetFirst() - if tc then - local mg=mg1:Filter(Card.IsCanBeRitualMaterial,tc,tc) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) - local mat=mg:SelectWithSumEqual(tp,Card.GetRitualLevel,tc:GetLevel(),1,99,tc) - tc:SetMaterial(mat) - Duel.ReleaseRitualMaterial(mat) - Duel.BreakEffect() - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK) - e1:SetValue(tc:GetAttack()/2) - e1:SetReset(RESET_EVENT+0xfe0000) - tc:RegisterEffect(e1) - Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP) - tc:CompleteProcedure() - end -end diff --git a/script/c2843014.lua b/script/c2843014.lua deleted file mode 100644 index 9701e24ad6..0000000000 --- a/script/c2843014.lua +++ /dev/null @@ -1,39 +0,0 @@ ---素早いマンボウ -function c2843014.initial_effect(c) - --battle destroyed - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(2843014,0)) - e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetCondition(c2843014.condition) - e1:SetTarget(c2843014.target) - e1:SetOperation(c2843014.operation) - c:RegisterEffect(e1) -end -function c2843014.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) -end -function c2843014.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) -end -function c2843014.filter1(c) - return c:IsRace(RACE_FISH) and c:IsAbleToGrave() -end -function c2843014.filter2(c,e,tp) - return c:IsCode(2843014) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c2843014.operation(e,tp,eg,ep,ev,re,r,rp) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c2843014.filter1,tp,LOCATION_DECK,0,1,1,nil) - if Duel.SendtoGrave(g,REASON_EFFECT)~=0 then - if ft<=0 then return end - local tc=Duel.GetFirstMatchingCard(c2843014.filter2,tp,LOCATION_DECK,0,nil,e,tp) - if tc and Duel.SelectYesNo(tp,aux.Stringid(2843014,1)) then - Duel.BreakEffect() - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end - end -end diff --git a/script/c28465301.lua b/script/c28465301.lua deleted file mode 100644 index c5eb6da1b1..0000000000 --- a/script/c28465301.lua +++ /dev/null @@ -1,25 +0,0 @@ ---ワーム・オペラ -function c28465301.initial_effect(c) - --flip - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FLIP+EFFECT_TYPE_SINGLE) - e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE) - e1:SetOperation(c28465301.valop) - c:RegisterEffect(e1) -end -function c28465301.filter(c) - return c:IsFaceup() and not (c:IsSetCard(0x3e) and c:IsRace(RACE_REPTILE)) -end -function c28465301.valop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c28465301.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - local tc=g:GetFirst() - while tc do - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(-500) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - tc=g:GetNext() - end -end diff --git a/script/c28470714.lua b/script/c28470714.lua deleted file mode 100644 index 93dde6a889..0000000000 --- a/script/c28470714.lua +++ /dev/null @@ -1,21 +0,0 @@ ---ブレードフライ -function c28470714.initial_effect(c) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetTarget(c28470714.tg1) - e1:SetValue(500) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetTarget(c28470714.tg2) - e2:SetValue(-400) - c:RegisterEffect(e2) -end -function c28470714.tg1(e,c) - return c:IsAttribute(ATTRIBUTE_WIND) -end -function c28470714.tg2(e,c) - return c:IsAttribute(ATTRIBUTE_EARTH) -end diff --git a/script/c28493337.lua b/script/c28493337.lua deleted file mode 100644 index ed0c17055c..0000000000 --- a/script/c28493337.lua +++ /dev/null @@ -1,42 +0,0 @@ ---終焉の指名者 -function c28493337.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c28493337.cost) - e1:SetTarget(c28493337.target) - e1:SetOperation(c28493337.activate) - c:RegisterEffect(e1) -end -function c28493337.cfilter(c) - return c:IsAbleToRemoveAsCost() -end -function c28493337.cost(e,tp,eg,ep,ev,re,r,rp,chk) - e:SetLabel(1) - if chk==0 then return Duel.IsExistingMatchingCard(c28493337.cfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c28493337.cfilter,tp,LOCATION_HAND,0,1,1,nil) - e:SetLabel(g:GetFirst():GetCode()) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c28493337.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - if e:GetLabel()~=1 then return false end - e:SetLabel(0) - return true - end -end -function c28493337.activate(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EFFECT_CANNOT_ACTIVATE) - e1:SetTargetRange(1,1) - e1:SetValue(c28493337.aclimit) - e1:SetLabel(e:GetLabel()) - Duel.RegisterEffect(e1,tp) -end -function c28493337.aclimit(e,re,tp) - return re:GetHandler():IsCode(e:GetLabel()) and not re:GetHandler():IsImmuneToEffect(e) -end diff --git a/script/c28506708.lua b/script/c28506708.lua deleted file mode 100644 index 66389155f4..0000000000 --- a/script/c28506708.lua +++ /dev/null @@ -1,43 +0,0 @@ ---ワーム・コール -function c28506708.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(28506708,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_SZONE) - e1:SetCondition(c28506708.condition) - e1:SetTarget(c28506708.target) - e1:SetOperation(c28506708.operation) - c:RegisterEffect(e1) -end -function c28506708.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 - and Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)~=0 -end -function c28506708.filter(c,e,sp) - return c:IsSetCard(0x3e) and c:IsRace(RACE_REPTILE) and c:IsCanBeSpecialSummoned(e,0,sp,false,false,POS_FACEDOWN_DEFENCE) -end -function c28506708.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c28506708.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c28506708.operation(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - if Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)>0 - or Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)==0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c28506708.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEDOWN_DEFENCE) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c2851070.lua b/script/c2851070.lua deleted file mode 100644 index 1f441d5910..0000000000 --- a/script/c2851070.lua +++ /dev/null @@ -1,49 +0,0 @@ ---魔鏡導士リフレクト・バウンダー -function c2851070.initial_effect(c) - --damage - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(2851070,0)) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_BATTLE_CONFIRM) - e1:SetCondition(c2851070.damcon) - e1:SetTarget(c2851070.damtg) - e1:SetOperation(c2851070.damop) - c:RegisterEffect(e1) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(2851070,1)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_BATTLED) - e1:SetTarget(c2851070.destg) - e1:SetOperation(c2851070.desop) - c:RegisterEffect(e1) -end -function c2851070.damcon(e,tp,eg,ep,ev,re,r,rp) - local c=Duel.GetAttackTarget() - return c==e:GetHandler() and c:GetBattlePosition()==POS_FACEUP_ATTACK -end -function c2851070.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk ==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,0) -end -function c2851070.damop(e,tp,eg,ep,ev,re,r,rp) - local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) - local lp1=Duel.GetLP(p) - Duel.Damage(p,Duel.GetAttacker():GetAttack(),REASON_EFFECT) - local lp2=Duel.GetLP(p) - if lp20 and lv<=2 and c:IsRace(RACE_PLANT) - and Duel.IsExistingMatchingCard(c28529976.filter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,lv+3,e,tp) -end -function c28529976.filter(c,lv,e,tp) - return c:GetLevel()<=lv and c:IsRace(RACE_PLANT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c28529976.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.CheckReleaseGroup(tp,c28529976.cfilter,1,nil,e,tp) end - local rg=Duel.SelectReleaseGroup(tp,c28529976.cfilter,1,1,nil,e,tp) - e:SetLabel(rg:GetFirst():GetLevel()+3) - Duel.Release(rg,REASON_COST) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) -end -function c28529976.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local c=e:GetHandler() - if not c:IsRelateToEffect(e) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c28529976.filter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e:GetLabel(),e,tp) - local tc=g:GetFirst() - if tc then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - c:SetCardTarget(tc) - end -end -function c28529976.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetHandler():GetFirstCardTarget() - if tc and tc:IsLocation(LOCATION_MZONE) then - Duel.Destroy(tc,REASON_EFFECT) - end -end -function c28529976.descon2(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetHandler():GetFirstCardTarget() - return tc and eg:IsContains(tc) -end -function c28529976.desop2(e,tp,eg,ep,ev,re,r,rp) - Duel.Destroy(e:GetHandler(),REASON_EFFECT) -end diff --git a/script/c28553439.lua b/script/c28553439.lua deleted file mode 100644 index 2cb497a002..0000000000 --- a/script/c28553439.lua +++ /dev/null @@ -1,54 +0,0 @@ ---ディメンション・マジック -function c28553439.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,0x1c0) - e1:SetCondition(c28553439.condition) - e1:SetTarget(c28553439.target) - e1:SetOperation(c28553439.activate) - c:RegisterEffect(e1) -end -function c28553439.cfilter(c) - return c:IsFaceup() and c:IsRace(RACE_SPELLCASTER) -end -function c28553439.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c28553439.cfilter,tp,LOCATION_MZONE,0,1,nil) -end -function c28553439.filter(c,e,tp) - return c:IsRace(RACE_SPELLCASTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c28553439.rfilter(c,e) - return c:IsReleasableByEffect() and c:IsCanBeEffectTarget(e) -end -function c28553439.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c28553439.rfilter(chkc,e) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.CheckReleaseGroup(tp,c28553439.rfilter,1,nil,e) - and Duel.IsExistingMatchingCard(c28553439.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end - local g=Duel.SelectReleaseGroup(tp,c28553439.rfilter,1,1,nil,e) - Duel.SetTargetCard(g) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c28553439.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then - if Duel.Release(tc,REASON_EFFECT)==0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=Duel.SelectMatchingCard(tp,c28553439.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - if sg:GetCount()==0 then return end - Duel.BreakEffect() - Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) - local dg=Duel.GetMatchingGroup(Card.IsDestructable,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - if dg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(28553439,0)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local des=dg:Select(tp,1,1,nil) - Duel.HintSelection(des) - Duel.BreakEffect() - Duel.Destroy(des,REASON_EFFECT) - end - end -end diff --git a/script/c28563545.lua b/script/c28563545.lua deleted file mode 100644 index 83f186dd25..0000000000 --- a/script/c28563545.lua +++ /dev/null @@ -1,32 +0,0 @@ ---竜殺者 -function c28563545.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(28563545,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c28563545.target) - e1:SetOperation(c28563545.operation) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - c:RegisterEffect(e2) -end -function c28563545.filter(c) - return c:IsFaceup() and c:IsRace(RACE_DRAGON) and c:IsDestructable() -end -function c28563545.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c28563545.filter(chkc) end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c28563545.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c28563545.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) and c28563545.filter(tc) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c28565527.lua b/script/c28565527.lua deleted file mode 100644 index 08000c7c32..0000000000 --- a/script/c28565527.lua +++ /dev/null @@ -1,36 +0,0 @@ ---黄龍の召喚士 -function c28565527.initial_effect(c) - --tohand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(28565527,0)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCountLimit(1,28565527) - e1:SetCost(c28565527.cost) - e1:SetTarget(c28565527.target) - e1:SetOperation(c28565527.operation) - c:RegisterEffect(e1) -end -function c28565527.cfilter(c) - return Duel.IsExistingTarget(Card.IsAbleToHand,0,LOCATION_MZONE,LOCATION_MZONE,1,c) -end -function c28565527.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,c28565527.cfilter,1,nil) end - local g=Duel.SelectReleaseGroup(tp,c28565527.cfilter,1,1,nil) - Duel.Release(g,REASON_COST) -end -function c28565527.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsAbleToHand() end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g=Duel.SelectTarget(tp,Card.IsAbleToHand,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c28565527.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - end -end diff --git a/script/c28566710.lua b/script/c28566710.lua deleted file mode 100644 index 97630e31c7..0000000000 --- a/script/c28566710.lua +++ /dev/null @@ -1,64 +0,0 @@ ---ラストバトル! -function c28566710.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_STANDBY_PHASE) - e1:SetCondition(c28566710.condition) - e1:SetTarget(c28566710.target) - e1:SetOperation(c28566710.operation) - c:RegisterEffect(e1) -end -function c28566710.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetLP(tp)<=1000 and Duel.GetTurnPlayer()~=tp -end -function c28566710.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(nil,tp,LOCATION_MZONE,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,1-tp,LOCATION_DECK) -end -function c28566710.spfilter(c,e,tp) - return c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c28566710.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - local tg=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_MZONE,0,1,1,nil) - local tc=tg:GetFirst() - local hg=Duel.GetFieldGroup(tp,0xe,0xe) - if tc then hg:RemoveCard(tc) end - Duel.SendtoGrave(hg,REASON_EFFECT) - Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(1-tp,c28566710.spfilter,1-tp,LOCATION_DECK,0,1,1,nil,e,tp) - local sc=g:GetFirst() - if sc then - Duel.BreakEffect() - Duel.SpecialSummon(sc,0,1-tp,1-tp,false,false,POS_FACEUP_ATTACK) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EFFECT_AVOID_BATTLE_DAMAGE) - e1:SetTargetRange(1,1) - e1:SetReset(RESET_CHAIN) - Duel.RegisterEffect(e1,tp) - if tc then Duel.CalculateDamage(sc,tc) end - end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetCountLimit(1) - e1:SetReset(RESET_PHASE+PHASE_END) - e1:SetOperation(c28566710.checkop) - Duel.RegisterEffect(e1,tp) -end -function c28566710.checkop(e,tp,eg,ep,ev,re,r,rp) - local t1=Duel.GetFieldGroupCount(0,LOCATION_MZONE,0) - local t2=Duel.GetFieldGroupCount(1,LOCATION_MZONE,0) - if t1>0 and t2==0 then - Duel.Win(0,0x16) - elseif t2>0 and t1==0 then - Duel.Win(1,0x16) - else - Duel.Win(PLAYER_NONE,0x16) - end -end diff --git a/script/c28573958.lua b/script/c28573958.lua deleted file mode 100644 index 2a67b99e45..0000000000 --- a/script/c28573958.lua +++ /dev/null @@ -1,86 +0,0 @@ ---奇跡の代行者 ジュピター -function c28573958.initial_effect(c) - --atkup - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(28573958,0)) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c28573958.atcost) - e1:SetTarget(c28573958.attg) - e1:SetOperation(c28573958.atop) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(28573958,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCondition(c28573958.spcon) - e2:SetCost(c28573958.spcost) - e2:SetTarget(c28573958.sptg) - e2:SetOperation(c28573958.spop) - c:RegisterEffect(e2) -end -function c28573958.cfilter1(c) - return c:IsSetCard(0x44) and c:IsAbleToRemoveAsCost() -end -function c28573958.atcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c28573958.cfilter1,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c28573958.cfilter1,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c28573958.filter1(c) - return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_FAIRY) -end -function c28573958.attg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c28573958.filter1(chkc) end - if chk==0 then return Duel.IsExistingTarget(c28573958.filter1,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c28573958.filter1,tp,LOCATION_MZONE,0,1,1,nil) -end -function c28573958.atop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(800) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - end -end -function c28573958.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsEnvironment(56433456) -end -function c28573958.cfilter2(c) - return c:IsRace(RACE_FAIRY) and c:IsDiscardable() -end -function c28573958.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c28573958.cfilter2,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,c28573958.cfilter2,1,1,REASON_COST+REASON_DISCARD) -end -function c28573958.filter2(c,e,tp) - return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_FAIRY) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c28573958.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and c28573958.filter2(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c28573958.filter2,tp,LOCATION_REMOVED,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c28573958.filter2,tp,LOCATION_REMOVED,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c28573958.spop(e,tp,eg,ep,ev,re,r,rp) - if not Duel.IsEnvironment(56433456) then return end - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c28577986.lua b/script/c28577986.lua deleted file mode 100644 index fe3f147f11..0000000000 --- a/script/c28577986.lua +++ /dev/null @@ -1,53 +0,0 @@ ---水精鱗-オーケアビス -function c28577986.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetDescription(aux.Stringid(28577986,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1,28577986) - e1:SetTarget(c28577986.target) - e1:SetOperation(c28577986.operation) - c:RegisterEffect(e1) -end -function c28577986.cfilter(c,e,tp) - local lv=c:GetLevel() - return lv>0 and c:IsFaceup() and c:IsSetCard(0x74) - and Duel.IsExistingMatchingCard(c28577986.spfilter,tp,LOCATION_DECK,0,1,nil,lv,e,tp) -end -function c28577986.spfilter(c,lv,e,tp) - if lv>4 then lv=4 end - return c:IsLevelBelow(lv) and c:IsSetCard(0x74) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c28577986.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c28577986.cfilter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c28577986.cfilter,tp,LOCATION_MZONE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectTarget(tp,c28577986.cfilter,tp,LOCATION_MZONE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c28577986.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if not tc:IsRelateToEffect(e) then return end - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ft<=0 then return end - local slv=tc:GetLevel() - local sg=Duel.GetMatchingGroup(c28577986.spfilter,tp,LOCATION_DECK,0,nil,slv,e,tp) - if sg:GetCount()==0 then return end - repeat - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local tc=sg:Select(tp,1,1,nil):GetFirst() - sg:RemoveCard(tc) - slv=slv-tc:GetLevel() - Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) - sg:Remove(Card.IsLevelAbove,nil,slv+1) - ft=ft-1 - until ft<=0 or sg:GetCount()==0 or not Duel.SelectYesNo(tp,aux.Stringid(28577986,1)) - Duel.SpecialSummonComplete() - Duel.BreakEffect() - Duel.SendtoGrave(tc,REASON_EFFECT) -end diff --git a/script/c28593363.lua b/script/c28593363.lua deleted file mode 100644 index 4f21159ad4..0000000000 --- a/script/c28593363.lua +++ /dev/null @@ -1,6 +0,0 @@ ---深海に潜むサメ -function c28593363.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcCode2(c,81386177,69572024,true,true) -end diff --git a/script/c28596933.lua b/script/c28596933.lua deleted file mode 100644 index 1178152cb9..0000000000 --- a/script/c28596933.lua +++ /dev/null @@ -1,33 +0,0 @@ ---巨竜の羽ばたき -function c28596933.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c28596933.target) - e1:SetOperation(c28596933.activate) - c:RegisterEffect(e1) -end -function c28596933.filter(c) - return c:IsFaceup() and c:IsRace(RACE_DRAGON) and c:IsLevelAbove(5) and c:IsAbleToHand() -end -function c28596933.dfilter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable() -end -function c28596933.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c28596933.filter,tp,LOCATION_MZONE,0,1,nil) - and Duel.IsExistingMatchingCard(c28596933.dfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end - local sg=Duel.GetMatchingGroup(c28596933.dfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_MZONE) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,sg:GetCount(),0,0) -end -function c28596933.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g=Duel.SelectMatchingCard(tp,c28596933.filter,tp,LOCATION_MZONE,0,1,1,nil) - local tc=g:GetFirst() - if tc and Duel.SendtoHand(tc,nil,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_HAND) then - local sg=Duel.GetMatchingGroup(c28596933.dfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler()) - Duel.Destroy(sg,REASON_EFFECT) - end -end diff --git a/script/c28601770.lua b/script/c28601770.lua deleted file mode 100644 index 958b3a6193..0000000000 --- a/script/c28601770.lua +++ /dev/null @@ -1,41 +0,0 @@ ---ミストデーモン -function c28601770.initial_effect(c) - --summon with no tribute - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(28601770,0)) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SUMMON_PROC) - e1:SetCondition(c28601770.ntcon) - e1:SetOperation(c28601770.ntop) - c:RegisterEffect(e1) -end -function c28601770.ntcon(e,c,minc) - if c==nil then return true end - return minc==0 and c:IsLevelAbove(5) and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 -end -function c28601770.ntop(e,tp,eg,ep,ev,re,r,rp,c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(28601770,0)) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetTarget(c28601770.destg) - e1:SetOperation(c28601770.desop) - e1:SetReset(RESET_EVENT+0xee0000) - c:RegisterEffect(e1) -end -function c28601770.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,tp,1000) -end -function c28601770.desop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() and Duel.Destroy(c,REASON_EFFECT)~=0 then - Duel.Damage(tp,1000,REASON_EFFECT) - end -end diff --git a/script/c28604635.lua b/script/c28604635.lua deleted file mode 100644 index df05b75e2f..0000000000 --- a/script/c28604635.lua +++ /dev/null @@ -1,28 +0,0 @@ ---ふるい落とし -function c28604635.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c28604635.cost) - e1:SetTarget(c28604635.target) - e1:SetOperation(c28604635.activate) - c:RegisterEffect(e1) -end -function c28604635.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,500) end - Duel.PayLPCost(tp,500) -end -function c28604635.filter(c) - return c:IsPosition(POS_FACEUP_ATTACK) and c:GetLevel()==3 and c:IsDestructable() -end -function c28604635.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c28604635.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - local g=Duel.GetMatchingGroup(c28604635.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c28604635.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c28604635.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - Duel.Destroy(g,REASON_EFFECT) -end diff --git a/script/c28630501.lua b/script/c28630501.lua deleted file mode 100644 index 11c7ac9526..0000000000 --- a/script/c28630501.lua +++ /dev/null @@ -1,88 +0,0 @@ ---妖仙獣 鎌参太刀 -function c28630501.initial_effect(c) - --summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(28630501,0)) - e1:SetCategory(CATEGORY_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DELAY) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c28630501.sumtg) - e1:SetOperation(c28630501.sumop) - c:RegisterEffect(e1) - --search - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(28630501,1)) - e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_BATTLE_DAMAGE) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,28630501) - e2:SetCondition(c28630501.thcon) - e2:SetTarget(c28630501.thtg) - e2:SetOperation(c28630501.thop) - c:RegisterEffect(e2) - --return - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e3:SetCode(EVENT_SUMMON_SUCCESS) - e3:SetOperation(c28630501.regop) - c:RegisterEffect(e3) -end -function c28630501.filter(c) - return c:IsSetCard(0xb3) and not c:IsCode(28630501) and c:IsSummonable(true,nil) -end -function c28630501.sumtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c28630501.filter,tp,LOCATION_HAND,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,0,0) -end -function c28630501.sumop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON) - local g=Duel.SelectMatchingCard(tp,c28630501.filter,tp,LOCATION_HAND,0,1,1,nil) - if g:GetCount()>0 then - Duel.Summon(tp,g:GetFirst(),true,nil) - end -end -function c28630501.thcon(e,tp,eg,ep,ev,re,r,rp) - local tc=eg:GetFirst() - return ep~=tp and tc:IsControler(tp) and tc:IsSetCard(0xb3) and tc~=e:GetHandler() -end -function c28630501.thfilter(c) - return c:IsSetCard(0xb3) and not c:IsCode(28630501) and c:IsAbleToHand() -end -function c28630501.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c28630501.thfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c28630501.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c28630501.thfilter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end -function c28630501.regop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(28630501,2)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetTarget(c28630501.rettg) - e1:SetOperation(c28630501.retop) - e1:SetReset(RESET_EVENT+0x1ec0000+RESET_PHASE+PHASE_END) - c:RegisterEffect(e1) -end -function c28630501.rettg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0) -end -function c28630501.retop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SendtoHand(c,nil,REASON_EFFECT) - end -end diff --git a/script/c28637168.lua b/script/c28637168.lua deleted file mode 100644 index 8ba7fc2590..0000000000 --- a/script/c28637168.lua +++ /dev/null @@ -1,42 +0,0 @@ ---クレーンクレーン -function c28637168.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(28637168,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCountLimit(1,28637168) - e1:SetTarget(c28637168.sptg) - e1:SetOperation(c28637168.spop) - c:RegisterEffect(e1) -end -function c28637168.spfilter(c,e,tp) - return c:GetLevel()==3 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c28637168.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c28637168.spfilter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c28637168.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c28637168.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c28637168.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1,true) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e2,true) - Duel.SpecialSummonComplete() - end -end diff --git a/script/c286392.lua b/script/c286392.lua deleted file mode 100644 index b46c9ff602..0000000000 --- a/script/c286392.lua +++ /dev/null @@ -1,68 +0,0 @@ ---ジェット・ウォリアー -function c286392.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,c286392.tfilter,aux.NonTuner(nil),1) - c:EnableReviveLimit() - --tohand - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e1:SetCountLimit(1,286392) - e1:SetCondition(c286392.thcon) - e1:SetTarget(c286392.thtg) - e1:SetOperation(c286392.thop) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_GRAVE) - e2:SetCountLimit(1,286393) - e2:SetCost(c286392.spcost) - e2:SetTarget(c286392.sptg) - e2:SetOperation(c286392.spop) - c:RegisterEffect(e2) -end -function c286392.tfilter(c) - return c:IsCode(9742784) or c:IsHasEffect(20932152) -end -function c286392.thcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_SYNCHRO -end -function c286392.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and chkc:IsAbleToHand() end - if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g=Duel.SelectTarget(tp,Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c286392.thop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - end -end -function c286392.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsLevelBelow,1,nil,2) end - local g=Duel.SelectReleaseGroup(tp,Card.IsLevelBelow,1,1,nil,2) - Duel.Release(g,REASON_COST) -end -function c286392.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c286392.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP_DEFENCE)~=0 then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+0x47e0000) - e1:SetValue(LOCATION_REMOVED) - c:RegisterEffect(e1,true) - end -end diff --git a/script/c28643791.lua b/script/c28643791.lua deleted file mode 100644 index 6e12809967..0000000000 --- a/script/c28643791.lua +++ /dev/null @@ -1,45 +0,0 @@ ---最後の進軍 -function c28643791.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c28643791.target) - e1:SetOperation(c28643791.operation) - c:RegisterEffect(e1) -end -function c28643791.filter(c) - return c:IsFaceup() and c:IsSetCard(0x4b) -end -function c28643791.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c28643791.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c28643791.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - local g=Duel.SelectTarget(tp,c28643791.filter,tp,LOCATION_MZONE,0,1,1,nil) -end -function c28643791.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - local c=e:GetHandler() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_IMMUNE_EFFECT) - e3:SetValue(c28643791.imfilter) - e3:SetReset(RESET_EVENT+0x1ff0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e3) - end -end -function c28643791.imfilter(e,re) - return re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and re:GetOwner()~=e:GetOwner() -end diff --git a/script/c28649820.lua b/script/c28649820.lua deleted file mode 100644 index cb4a8f5034..0000000000 --- a/script/c28649820.lua +++ /dev/null @@ -1,30 +0,0 @@ ---アポピスの化神 -function c28649820.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetHintTiming(0,TIMING_MAIN_END) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c28649820.condition) - e1:SetTarget(c28649820.target) - e1:SetOperation(c28649820.activate) - c:RegisterEffect(e1) -end -function c28649820.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2 -end -function c28649820.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and - Duel.IsPlayerCanSpecialSummonMonster(tp,28649820,0,0x11,1600,1800,4,RACE_REPTILE,ATTRIBUTE_EARTH) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c28649820.activate(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) then return end - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 - or not Duel.IsPlayerCanSpecialSummonMonster(tp,28649820,0,0x11,1600,1800,4,RACE_REPTILE,ATTRIBUTE_EARTH) then return end - c:AddTrapMonsterAttribute(TYPE_NORMAL,ATTRIBUTE_EARTH,RACE_REPTILE,4,1600,1800) - Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP) - c:TrapMonsterBlock() -end diff --git a/script/c28654932.lua b/script/c28654932.lua deleted file mode 100644 index 211ea6eb8b..0000000000 --- a/script/c28654932.lua +++ /dev/null @@ -1,27 +0,0 @@ ---深黒の落とし穴 -function c28654932.initial_effect(c) - --Activate(summon) - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_REMOVE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetTarget(c28654932.target) - e1:SetOperation(c28654932.activate) - c:RegisterEffect(e1) -end -function c28654932.filter(c,e) - return c:IsFaceup() and c:IsType(TYPE_EFFECT) and c:GetLevel()>=5 - and (not e or c:IsRelateToEffect(e)) and c:IsAbleToRemove() -end -function c28654932.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return eg:IsExists(c28654932.filter,1,nil,nil) end - local g=eg:Filter(c28654932.filter,nil,nil) - Duel.SetTargetCard(eg) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,0) -end -function c28654932.activate(e,tp,eg,ep,ev,re,r,rp) - local g=eg:Filter(c28654932.filter,nil,e) - if g:GetCount()>0 then - Duel.Remove(g,POS_FACEUP,REASON_EFFECT) - end -end diff --git a/script/c28677304.lua b/script/c28677304.lua deleted file mode 100644 index 4c078f0a92..0000000000 --- a/script/c28677304.lua +++ /dev/null @@ -1,139 +0,0 @@ ---E・HERO ブラック・ネオス -function c28677304.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcCode2(c,89943723,43237273,false,false) - --spsummon condition - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(c28677304.splimit) - c:RegisterEffect(e1) - --special summon rule - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_SPSUMMON_PROC) - e2:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e2:SetRange(LOCATION_EXTRA) - e2:SetCondition(c28677304.spcon) - e2:SetOperation(c28677304.spop) - c:RegisterEffect(e2) - --return - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(28677304,0)) - e3:SetCategory(CATEGORY_TODECK) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e3:SetCode(EVENT_PHASE+PHASE_END) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1) - e3:SetCondition(c28677304.retcon1) - e3:SetTarget(c28677304.rettg) - e3:SetOperation(c28677304.retop) - c:RegisterEffect(e3) - local e4=e3:Clone() - e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e4:SetProperty(0) - e4:SetCondition(c28677304.retcon2) - c:RegisterEffect(e4) - --disable - local e5=Effect.CreateEffect(c) - e5:SetDescription(aux.Stringid(28677304,1)) - e5:SetCategory(CATEGORY_DISABLE) - e5:SetType(EFFECT_TYPE_IGNITION) - e5:SetRange(LOCATION_MZONE) - e5:SetProperty(EFFECT_FLAG_CARD_TARGET) - e5:SetCondition(c28677304.discon) - e5:SetTarget(c28677304.distg) - e5:SetOperation(c28677304.disop) - c:RegisterEffect(e5) -end -function c28677304.splimit(e,se,sp,st) - return not e:GetHandler():IsLocation(LOCATION_EXTRA) -end -function c28677304.spfilter(c,code) - return c:IsAbleToDeckOrExtraAsCost() and c:GetCode()==code -end -function c28677304.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ft<-1 then return false end - local g1=Duel.GetMatchingGroup(c28677304.spfilter,tp,LOCATION_ONFIELD,0,nil,89943723) - local g2=Duel.GetMatchingGroup(c28677304.spfilter,tp,LOCATION_ONFIELD,0,nil,43237273) - if g1:GetCount()==0 or g2:GetCount()==0 then return false end - if ft>0 then return true end - local f1=g1:FilterCount(Card.IsLocation,nil,LOCATION_MZONE) - local f2=g2:FilterCount(Card.IsLocation,nil,LOCATION_MZONE) - if ft==-1 then return f1>0 and f2>0 - else return f1>0 or f2>0 end -end -function c28677304.spop(e,tp,eg,ep,ev,re,r,rp,c) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - local g1=Duel.GetMatchingGroup(c28677304.spfilter,tp,LOCATION_ONFIELD,0,nil,89943723) - local g2=Duel.GetMatchingGroup(c28677304.spfilter,tp,LOCATION_ONFIELD,0,nil,43237273) - g1:Merge(g2) - local g=Group.CreateGroup() - local tc=nil - for i=1,2 do - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - if ft<=0 then - tc=g1:FilterSelect(tp,Card.IsLocation,1,1,nil,LOCATION_MZONE):GetFirst() - else - tc=g1:Select(tp,1,1,nil):GetFirst() - end - g:AddCard(tc) - g1:Remove(Card.IsCode,nil,tc:GetCode()) - ft=ft+1 - end - local cg=g:Filter(Card.IsFacedown,nil) - if cg:GetCount()>0 then - Duel.ConfirmCards(1-tp,cg) - end - Duel.SendtoDeck(g,nil,2,REASON_COST) -end -function c28677304.retcon1(e,tp,eg,ep,ev,re,r,rp,chk) - return not e:GetHandler():IsHasEffect(42015635) -end -function c28677304.retcon2(e,tp,eg,ep,ev,re,r,rp,chk) - return e:GetHandler():IsHasEffect(42015635) -end -function c28677304.rettg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToExtra() end - Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0) -end -function c28677304.retop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) or e:GetHandler():IsFacedown() then return end - Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_EFFECT) -end -function c28677304.discon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetCardTargetCount()==0 -end -function c28677304.filter(c) - return c:IsFaceup() and c:IsType(TYPE_EFFECT) -end -function c28677304.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c28677304.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c28677304.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - local g=Duel.SelectTarget(tp,c28677304.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0) -end -function c28677304.disop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsRelateToEffect(e) then - c:SetCardTarget(tc) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetCondition(c28677304.rcon) - tc:RegisterEffect(e1,true) - end -end -function c28677304.rcon(e) - return e:GetOwner():IsHasCardTarget(e:GetHandler()) -end diff --git a/script/c28725004.lua b/script/c28725004.lua deleted file mode 100644 index a64e2aff52..0000000000 --- a/script/c28725004.lua +++ /dev/null @@ -1,17 +0,0 @@ ---悪魔の知恵 -function c28725004.initial_effect(c) - --shuffle - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(28725004,0)) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_CHANGE_POS) - e1:SetCondition(c28725004.condition) - e1:SetOperation(c28725004.operation) - c:RegisterEffect(e1) -end -function c28725004.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousPosition(POS_ATTACK) and e:GetHandler():IsPosition(POS_DEFENCE) -end -function c28725004.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.ShuffleDeck(tp) -end diff --git a/script/c28741524.lua b/script/c28741524.lua deleted file mode 100644 index 3458008e1f..0000000000 --- a/script/c28741524.lua +++ /dev/null @@ -1,39 +0,0 @@ ---念動収集機 -function c28741524.initial_effect(c) - --activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_END_PHASE) - e1:SetTarget(c28741524.sptg) - e1:SetOperation(c28741524.spop) - c:RegisterEffect(e1) -end -function c28741524.filter(c,e,tp) - return c:IsLevelBelow(2) and c:IsRace(RACE_PSYCHO) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c28741524.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c28741524.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c28741524.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c28741524.filter,tp,LOCATION_GRAVE,0,1,ft,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,g:GetCount(),0,0) - local lv=g:GetSum(Card.GetLevel) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,tp,lv*300) -end -function c28741524.spop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ft0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - local og=Duel.GetOperatedGroup() - local lv=og:GetSum(Card.GetLevel) - Duel.BreakEffect() - Duel.Damage(tp,lv*300,REASON_EFFECT) - end -end diff --git a/script/c28754338.lua b/script/c28754338.lua deleted file mode 100644 index 9c4ae11c5d..0000000000 --- a/script/c28754338.lua +++ /dev/null @@ -1,48 +0,0 @@ ---真海皇 トライドン -function c28754338.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(28754338,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c28754338.spcost) - e1:SetTarget(c28754338.sptg) - e1:SetOperation(c28754338.spop) - c:RegisterEffect(e1) -end -function c28754338.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsReleasable() and Duel.CheckReleaseGroup(tp,Card.IsRace,1,c,RACE_SEASERPENT) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) - local rg=Duel.SelectReleaseGroup(tp,Card.IsRace,1,1,c,RACE_SEASERPENT) - rg:AddCard(c) - Duel.Release(rg,REASON_COST) -end -function c28754338.filter(c,e,tp) - return c:GetCode()==47826112 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c28754338.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-2 - and Duel.IsExistingMatchingCard(c28754338.filter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_HAND) -end -function c28754338.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c28754338.filter,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil,e,tp) - if g:GetCount()>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)>0 then - Duel.BreakEffect() - local tg=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil) - local tc=tg:GetFirst() - while tc do - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(-300) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - tc=tg:GetNext() - end - end -end diff --git a/script/c28859794.lua b/script/c28859794.lua deleted file mode 100644 index 5441f3373d..0000000000 --- a/script/c28859794.lua +++ /dev/null @@ -1,15 +0,0 @@ ---シールド・ウィング -function c28859794.initial_effect(c) - --battle indes - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_INDESTRUCTABLE_COUNT) - e1:SetCountLimit(2) - e1:SetValue(c28859794.valcon) - c:RegisterEffect(e1) -end -function c28859794.valcon(e,re,r,rp) - return bit.band(r,REASON_BATTLE)~=0 -end diff --git a/script/c28865322.lua b/script/c28865322.lua deleted file mode 100644 index 02517e9656..0000000000 --- a/script/c28865322.lua +++ /dev/null @@ -1,69 +0,0 @@ ---魔装邪龍 イーサルウェポン -function c28865322.initial_effect(c) - --pendulum summon - aux.AddPendulumProcedure(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_PZONE) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCountLimit(1) - e2:SetCost(c28865322.descost) - e2:SetTarget(c28865322.destg) - e2:SetOperation(c28865322.desop) - c:RegisterEffect(e2) - --remove - local e3=Effect.CreateEffect(c) - e3:SetCategory(CATEGORY_REMOVE) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_SUMMON_SUCCESS) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e3:SetTarget(c28865322.remtg) - e3:SetOperation(c28865322.remop) - c:RegisterEffect(e3) - local e4=e3:Clone() - e4:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e4) -end -function c28865322.cfilter(c) - return c:IsSetCard(0xca) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost() -end -function c28865322.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c28865322.cfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c28865322.cfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c28865322.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsDestructable() end - if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c28865322.desop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end -function c28865322.remtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsAbleToRemove() end - if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) -end -function c28865322.remop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) - end -end diff --git a/script/c28877100.lua b/script/c28877100.lua deleted file mode 100644 index abbe7e1262..0000000000 --- a/script/c28877100.lua +++ /dev/null @@ -1,38 +0,0 @@ ---ディフェンシブ・タクティクス -function c28877100.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_MAIN_END) - e1:SetCondition(c28877100.condition) - e1:SetOperation(c28877100.activate) - c:RegisterEffect(e1) -end -function c28877100.filter(c) - return c:IsFaceup() and c:IsSetCard(0x19) -end -function c28877100.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c28877100.filter,tp,LOCATION_MZONE,0,1,nil) -end -function c28877100.activate(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_AVOID_BATTLE_DAMAGE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetTargetRange(1,0) - e1:SetValue(1) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e2:SetTargetRange(LOCATION_MZONE,0) - e2:SetReset(RESET_PHASE+PHASE_END) - e2:SetValue(1) - Duel.RegisterEffect(e2,tp) - if e:GetHandler():IsRelateToEffect(e) then - e:GetHandler():CancelToGrave() - Duel.SendtoDeck(e:GetHandler(),nil,1,REASON_EFFECT) - end -end diff --git a/script/c28877602.lua b/script/c28877602.lua deleted file mode 100644 index 93c7762903..0000000000 --- a/script/c28877602.lua +++ /dev/null @@ -1,30 +0,0 @@ ---エヴォルド・オドケリス -function c28877602.initial_effect(c) - --summon success - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(28877602,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_SUMMON_SUCCESS) - e2:SetTarget(c28877602.sumtg) - e2:SetOperation(c28877602.sumop) - c:RegisterEffect(e2) -end -function c28877602.filter(c,e,tp) - return c:IsSetCard(0x604e) and c:IsCanBeSpecialSummoned(e,152,tp,false,false) -end -function c28877602.sumtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c28877602.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c28877602.sumop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c28877602.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,152,tp,tp,false,false,POS_FACEUP) - local rf=g:GetFirst().evolreg - if rf then rf(g:GetFirst()) end - end -end diff --git a/script/c28884172.lua b/script/c28884172.lua deleted file mode 100644 index 108245de24..0000000000 --- a/script/c28884172.lua +++ /dev/null @@ -1,77 +0,0 @@ ---ガガガマンサー -function c28884172.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(28884172,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCountLimit(1) - e1:SetTarget(c28884172.sptg) - e1:SetOperation(c28884172.spop) - c:RegisterEffect(e1) - --atkup - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(28884172,1)) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetCondition(c28884172.atkcon) - e2:SetTarget(c28884172.atktg) - e2:SetOperation(c28884172.atkop) - c:RegisterEffect(e2) -end -function c28884172.spfilter(c,e,tp) - return c:IsSetCard(0x54) and not c:IsCode(28884172) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c28884172.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c28884172.spfilter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c28884172.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c28884172.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c28884172.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetTargetRange(1,0) - e1:SetTarget(c28884172.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function c28884172.splimit(e,c) - return not c:IsSetCard(0x54) -end -function c28884172.atkcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsReason(REASON_COST) and re:IsHasType(0x7e0) and re:IsActiveType(TYPE_MONSTER) - and c:IsPreviousLocation(LOCATION_OVERLAY) -end -function c28884172.atkfilter(c) - return c:IsFaceup() and c:IsType(TYPE_XYZ) -end -function c28884172.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c28884172.atkfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c28884172.atkfilter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c28884172.atkfilter,tp,LOCATION_MZONE,0,1,1,nil) -end -function c28884172.atkop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e1:SetValue(500) - tc:RegisterEffect(e1) - end -end diff --git a/script/c28890974.lua b/script/c28890974.lua deleted file mode 100644 index 175ee98714..0000000000 --- a/script/c28890974.lua +++ /dev/null @@ -1,50 +0,0 @@ ---光神化 -function c28890974.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c28890974.target) - e1:SetOperation(c28890974.activate) - c:RegisterEffect(e1) -end -function c28890974.filter(c,e,tp) - return c:IsRace(RACE_FAIRY) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c28890974.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c28890974.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,LOCATION_HAND) -end -function c28890974.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c28890974.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - local tc=g:GetFirst() - if tc then - local atk=tc:GetAttack() - if Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e1:SetCode(EFFECT_SET_ATTACK) - e1:SetValue(atk/2) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1,true) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EVENT_PHASE+PHASE_END) - e2:SetOperation(c28890974.desop) - e2:SetReset(RESET_EVENT+0x1fe0000) - e2:SetCountLimit(1) - tc:RegisterEffect(e2,true) - Duel.SpecialSummonComplete() - end - end -end -function c28890974.desop(e,tp,eg,ep,ev,re,r,rp) - Duel.Destroy(e:GetHandler(),REASON_EFFECT) -end diff --git a/script/c28912357.lua b/script/c28912357.lua deleted file mode 100644 index 71f19c4ed6..0000000000 --- a/script/c28912357.lua +++ /dev/null @@ -1,75 +0,0 @@ ---ギアギガント X -function c28912357.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsRace,RACE_MACHINE),4,2) - c:EnableReviveLimit() - --search - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetDescription(aux.Stringid(28912357,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c28912357.cost) - e1:SetTarget(c28912357.target) - e1:SetOperation(c28912357.operation) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(28912357,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetCondition(c28912357.spcon) - e2:SetTarget(c28912357.sptg) - e2:SetOperation(c28912357.spop) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EVENT_REMOVE) - c:RegisterEffect(e3) - local e4=e2:Clone() - e4:SetCode(EVENT_TO_DECK) - c:RegisterEffect(e4) -end -function c28912357.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c28912357.filter(c) - return c:IsLevelBelow(4) and c:IsRace(RACE_MACHINE) and c:IsAbleToHand() - and not c:IsHasEffect(EFFECT_NECRO_VALLEY) -end -function c28912357.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c28912357.filter,tp,LOCATION_GRAVE+LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE+LOCATION_DECK) -end -function c28912357.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c28912357.filter,tp,LOCATION_GRAVE+LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - Duel.ShuffleDeck(tp) - end -end -function c28912357.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousPosition(POS_FACEUP) and e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) -end -function c28912357.spfilter(c,e,tp) - return c:IsLevelBelow(3) and c:IsSetCard(0x72) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c28912357.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c28912357.spfilter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c28912357.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c28912357.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c28912357.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c28933734.lua b/script/c28933734.lua deleted file mode 100644 index 4d038482fe..0000000000 --- a/script/c28933734.lua +++ /dev/null @@ -1,28 +0,0 @@ ---闇の仮面 -function c28933734.initial_effect(c) - --flip - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP) - e1:SetTarget(c28933734.target) - e1:SetOperation(c28933734.operation) - c:RegisterEffect(e1) -end -function c28933734.filter(c) - return c:IsType(TYPE_TRAP) and c:IsAbleToHand() -end -function c28933734.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:GetLocation()==LOCATION_GRAVE and chkc:GetControler()==tp and c28933734.filter(chkc) end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c28933734.filter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0) -end -function c28933734.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end diff --git a/script/c28966434.lua b/script/c28966434.lua deleted file mode 100644 index 78297171b5..0000000000 --- a/script/c28966434.lua +++ /dev/null @@ -1,46 +0,0 @@ ---ソリテア・マジカル -function c28966434.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(28966434,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c28966434.destg) - e1:SetOperation(c28966434.desop) - c:RegisterEffect(e1) -end -function c28966434.filter1(c) - return c:IsFaceup() and c:IsSetCard(0x31) and c:GetLevel()>3 -end -function c28966434.filter2(c) - return c:IsFaceup() and c:IsDestructable() -end -function c28966434.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - if chk==0 then return Duel.IsExistingTarget(c28966434.filter1,tp,LOCATION_MZONE,0,1,nil) - and Duel.IsExistingTarget(c28966434.filter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(28966434,1)) - local g1=Duel.SelectTarget(tp,c28966434.filter1,tp,LOCATION_MZONE,0,1,1,nil) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g2=Duel.SelectTarget(tp,c28966434.filter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,g1:GetFirst()) - e:SetLabelObject(g1:GetFirst()) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g2,1,0,0) -end -function c28966434.desop(e,tp,eg,ep,ev,re,r,rp) - local c1=e:GetLabelObject() - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local tc=g:GetFirst() - if tc==c1 then tc=g:GetNext() end - if c1:GetLevel()<=3 or c1:IsFacedown() or not c1:IsRelateToEffect(e) then return end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_LEVEL) - e1:SetValue(-3) - e1:SetReset(RESET_EVENT+0x1fe0000) - c1:RegisterEffect(e1) - if tc:IsFacedown() or not tc:IsRelateToEffect(e) then return end - Duel.Destroy(tc,REASON_EFFECT) -end diff --git a/script/c28985331.lua b/script/c28985331.lua deleted file mode 100644 index e6d727eaa8..0000000000 --- a/script/c28985331.lua +++ /dev/null @@ -1,33 +0,0 @@ ---終末の騎士 -function c28985331.initial_effect(c) - --send to grave - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(28985331,0)) - e1:SetCategory(CATEGORY_TOGRAVE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c28985331.target) - e1:SetOperation(c28985331.operation) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - c:RegisterEffect(e2) - local e3=e1:Clone() - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e3) -end -function c28985331.tgfilter(c) - return c:IsType(TYPE_MONSTER) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsAbleToGrave() -end -function c28985331.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c28985331.tgfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) -end -function c28985331.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c28985331.tgfilter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoGrave(g,REASON_EFFECT) - end -end diff --git a/script/c28990150.lua b/script/c28990150.lua deleted file mode 100644 index ef68b054d4..0000000000 --- a/script/c28990150.lua +++ /dev/null @@ -1,23 +0,0 @@ ---フォトン・ケルベロス -function c28990150.initial_effect(c) - --actlimit - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e3:SetCode(EVENT_SUMMON_SUCCESS) - e3:SetOperation(c28990150.atkop) - c:RegisterEffect(e3) -end -function c28990150.atkop(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EFFECT_CANNOT_ACTIVATE) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(1,1) - e1:SetValue(c28990150.aclimit) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e:GetHandler():RegisterEffect(e1) -end -function c28990150.aclimit(e,re,tp) - return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:GetHandler():IsType(TYPE_TRAP) -end diff --git a/script/c29013526.lua b/script/c29013526.lua deleted file mode 100644 index 58cb0e9d98..0000000000 --- a/script/c29013526.lua +++ /dev/null @@ -1,46 +0,0 @@ ---吹き荒れるウィン -function c29013526.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCost(c29013526.spcost) - e1:SetTarget(c29013526.sptg) - e1:SetOperation(c29013526.spop) - c:RegisterEffect(e1) -end -function c29013526.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsAttribute,1,e:GetHandler(),ATTRIBUTE_WIND) end - local g=Duel.SelectReleaseGroup(tp,Card.IsAttribute,1,1,e:GetHandler(),ATTRIBUTE_WIND) - Duel.Release(g,REASON_COST) -end -function c29013526.filter(c,e,tp) - return c:IsAttribute(ATTRIBUTE_WIND) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c29013526.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c29013526.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c29013526.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c29013526.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_LEAVE_FIELD) - e1:SetRange(LOCATION_MZONE) - e1:SetOperation(c29013526.desop) - e1:SetReset(RESET_EVENT+0x1fe0000) - g:GetFirst():RegisterEffect(e1) - end -end -function c29013526.desop(e,tp,eg,ep,ev,re,r,rp) - if eg:IsExists(Card.IsCode,1,nil,29013526) then - Duel.Destroy(e:GetHandler(),REASON_EFFECT) - end -end diff --git a/script/c2903036.lua b/script/c2903036.lua deleted file mode 100644 index 8b54373028..0000000000 --- a/script/c2903036.lua +++ /dev/null @@ -1,38 +0,0 @@ ---生け贄人形 -function c2903036.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c2903036.cost) - e1:SetTarget(c2903036.target) - e1:SetOperation(c2903036.activate) - c:RegisterEffect(e1) -end -function c2903036.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,nil,1,nil) end - local g=Duel.SelectReleaseGroup(tp,nil,1,1,nil) - Duel.Release(g,REASON_COST) -end -function c2903036.filter(c,e,tp) - return c:GetLevel()==7 and c:IsSummonableCard() and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c2903036.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsExistingMatchingCard(c2903036.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c2903036.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c2903036.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - if g:GetCount()>0 and Duel.SpecialSummonStep(g:GetFirst(),0,tp,tp,false,false,POS_FACEUP) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - g:GetFirst():RegisterEffect(e1,true) - Duel.SpecialSummonComplete() - end -end diff --git a/script/c29047353.lua b/script/c29047353.lua deleted file mode 100644 index 0a1a129307..0000000000 --- a/script/c29047353.lua +++ /dev/null @@ -1,73 +0,0 @@ ---水舞台 -function c29047353.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --indes - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(LOCATION_MZONE,0) - e2:SetTarget(aux.TargetBoolFunction(Card.IsAttribute,ATTRIBUTE_WATER)) - e2:SetValue(c29047353.indval) - c:RegisterEffect(e2) - --immune - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetCode(EFFECT_IMMUNE_EFFECT) - e3:SetRange(LOCATION_SZONE) - e3:SetTargetRange(LOCATION_MZONE,0) - e3:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0xcd)) - e3:SetValue(c29047353.efilter) - c:RegisterEffect(e3) - --spsummon - local e4=Effect.CreateEffect(c) - e4:SetCategory(CATEGORY_SPECIAL_SUMMON) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e4:SetCode(EVENT_TO_GRAVE) - e4:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e4:SetCondition(c29047353.spcon) - e4:SetTarget(c29047353.sptg) - e4:SetOperation(c29047353.spop) - c:RegisterEffect(e4) -end -function c29047353.indval(e,c) - return c:GetAttribute()~=ATTRIBUTE_WATER -end -function c29047353.efilter(e,te) - return te:GetOwnerPlayer()~=e:GetHandlerPlayer() and te:IsActiveType(TYPE_MONSTER) -end -function c29047353.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) -end -function c29047353.spfilter(c,e,tp) - return c:IsRace(RACE_AQUA) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c29047353.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c29047353.spfilter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c29047353.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c29047353.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c29047353.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetTargetRange(1,0) - e1:SetTarget(c29047353.splimit) - e1:SetReset(RESET_PHASE+RESET_END) - Duel.RegisterEffect(e1,tp) -end -function c29047353.splimit(e,c,sump,sumtype,sumpos,targetp,se) - return c:GetRace()~=RACE_AQUA -end diff --git a/script/c29071332.lua b/script/c29071332.lua deleted file mode 100644 index baf0e104d8..0000000000 --- a/script/c29071332.lua +++ /dev/null @@ -1,109 +0,0 @@ ---アームズ・エイド -function c29071332.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1) - c:EnableReviveLimit() - --equip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(29071332,0)) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetTarget(c29071332.eqtg) - e1:SetOperation(c29071332.eqop) - c:RegisterEffect(e1) -end -function c29071332.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() and chkc~=e:GetHandler() end - if chk==0 then return e:GetHandler():GetFlagEffect(29071332)==0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0) - e:GetHandler():RegisterFlagEffect(29071332,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1) -end -function c29071332.eqop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if not c:IsRelateToEffect(e) or c:IsFacedown() then return end - if not tc:IsRelateToEffect(e) or tc:IsFacedown() then - Duel.SendtoGrave(c,REASON_EFFECT) - return - end - if not Duel.Equip(tp,c,tc,false) then return end - --unequip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(29071332,1)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_SZONE) - e1:SetTarget(c29071332.sptg) - e1:SetOperation(c29071332.spop) - e1:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e1) - --Atk up - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(1000) - e2:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e2) - --damage - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(29071332,2)) - e3:SetCategory(CATEGORY_DAMAGE) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e3:SetCode(EVENT_BATTLE_DESTROYED) - e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e3:SetRange(LOCATION_SZONE) - e3:SetCondition(c29071332.damcon) - e3:SetTarget(c29071332.damtg) - e3:SetOperation(c29071332.damop) - e3:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e3) - --eqlimit - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetCode(EFFECT_EQUIP_LIMIT) - e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e4:SetValue(c29071332.eqlimit) - e4:SetReset(RESET_EVENT+0x1fe0000) - e4:SetLabelObject(tc) - c:RegisterEffect(e4) -end -function c29071332.eqlimit(e,c) - return c==e:GetLabelObject() -end -function c29071332.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():GetFlagEffect(29071332)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) - e:GetHandler():RegisterFlagEffect(29071332,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1) -end -function c29071332.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP_ATTACK) - end -end -function c29071332.damcon(e,tp,eg,ep,ev,re,r,rp) - local eqc=e:GetHandler():GetEquipTarget() - local des=eg:GetFirst() - return des:IsLocation(LOCATION_GRAVE) and des:GetReasonCard()==eqc and des:IsType(TYPE_MONSTER) -end -function c29071332.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - eg:GetFirst():CreateEffectRelation(e) - Duel.SetTargetPlayer(1-tp) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,0) -end -function c29071332.damop(e,tp,eg,ep,ev,re,r,rp) - local des=eg:GetFirst() - local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) - if des:IsRelateToEffect(e) then - local dam=des:GetAttack() - if dam<0 then dam=0 end - Duel.Damage(p,dam,REASON_EFFECT) - end -end diff --git a/script/c29087919.lua b/script/c29087919.lua deleted file mode 100644 index d8f4432be8..0000000000 --- a/script/c29087919.lua +++ /dev/null @@ -1,80 +0,0 @@ ---ギアギアチェンジ -function c29087919.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,29087919+EFFECT_COUNT_CODE_OATH) - e1:SetTarget(c29087919.target) - e1:SetOperation(c29087919.activate) - c:RegisterEffect(e1) -end -function c29087919.filter(c,e,tp) - return c:IsSetCard(0x1072) and c:IsCanBeEffectTarget(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c29087919.xyzfilter(c,mg,ct) - return c:IsXyzSummonable(mg) and c.xyz_count<=ct -end -function c29087919.mfilter1(c,exg) - return exg:IsExists(c29087919.mfilter2,1,nil,c) -end -function c29087919.mfilter2(c,mc) - return c.xyz_filter(mc) -end -function c29087919.xyzct(c) - return c.xyz_count -end -function c29087919.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - local mg=Duel.GetMatchingGroup(c29087919.filter,tp,LOCATION_GRAVE,0,nil,e,tp) - local mct=mg:GetClassCount(Card.GetCode) - local ct=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ct>mct then ct=mct end - local exg=Duel.GetMatchingGroup(c29087919.xyzfilter,tp,LOCATION_EXTRA,0,nil,mg,ct) - local maxg,maxc=exg:GetMaxGroup(c29087919.xyzct) - if maxc and ct>maxc then ct=maxc end - if chk==0 then return Duel.IsPlayerCanSpecialSummonCount(tp,2) - and ct>1 and Duel.IsExistingMatchingCard(c29087919.xyzfilter,tp,LOCATION_EXTRA,0,1,nil,mg,ct) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg1=mg:FilterSelect(tp,c29087919.mfilter1,1,1,nil,exg) - local tc1=sg1:GetFirst() - local exg2=exg:Filter(c29087919.mfilter2,nil,tc1) - mg:Remove(Card.IsCode,nil,tc1:GetCode()) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg2=mg:FilterSelect(tp,c29087919.mfilter1,1,1,nil,exg2) - sg1:Merge(sg2) - mg:Remove(Card.IsCode,nil,sg2:GetFirst():GetCode()) - ct=ct-2 - local minc=2 - local exg3=Duel.GetMatchingGroup(c29087919.spfilter,tp,LOCATION_EXTRA,0,nil,sg1,minc) - while mg:GetCount()>0 and ct>0 and (exg3:GetCount()==0 or Duel.SelectYesNo(tp,aux.Stringid(29087919,0))) do - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg3=mg:FilterSelect(tp,c29087919.mfilter1,1,1,nil,exg2) - sg1:Merge(sg3) - mg:Remove(Card.IsCode,nil,sg3:GetFirst():GetCode()) - ct=ct-1 - minc=minc+1 - exg3=Duel.GetMatchingGroup(c29087919.spfilter,tp,LOCATION_EXTRA,0,nil,sg1,minc) - end - Duel.SetTargetCard(sg1) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,sg1,sg1:GetCount(),0,0) -end -function c29087919.filter2(c,e,tp) - return c:IsRelateToEffect(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c29087919.spfilter(c,mg,ct) - return c:IsXyzSummonable(mg) and c.xyz_count==ct -end -function c29087919.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(c29087919.filter2,nil,e,tp) - local ct=Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - local xyzg=Duel.GetMatchingGroup(c29087919.spfilter,tp,LOCATION_EXTRA,0,nil,g,ct) - if ct>=2 and xyzg:GetCount()>0 then - Duel.BreakEffect() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local xyz=xyzg:Select(tp,1,1,nil):GetFirst() - Duel.XyzSummon(tp,xyz,g) - end -end diff --git a/script/c29088922.lua b/script/c29088922.lua deleted file mode 100644 index dbdb5a1f92..0000000000 --- a/script/c29088922.lua +++ /dev/null @@ -1,63 +0,0 @@ ---フォーチュンレディ・ウォーテリー -function c29088922.initial_effect(c) - --atk,def - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_SET_ATTACK) - e1:SetValue(c29088922.value) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_SET_DEFENCE) - c:RegisterEffect(e2) - --level up - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(29088922,0)) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1) - e3:SetCode(EVENT_PHASE+PHASE_STANDBY) - e3:SetCondition(c29088922.lvcon) - e3:SetOperation(c29088922.lvop) - c:RegisterEffect(e3) - --draw - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(29088922,1)) - e4:SetCategory(CATEGORY_DRAW) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e4:SetCode(EVENT_SPSUMMON_SUCCESS) - e4:SetTarget(c29088922.drtg) - e4:SetOperation(c29088922.drop) - c:RegisterEffect(e4) -end -function c29088922.value(e,c) - return c:GetLevel()*300 -end -function c29088922.lvcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp and e:GetHandler():IsLevelAbove(1) and e:GetHandler():IsLevelBelow(11) -end -function c29088922.lvop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFacedown() or not c:IsRelateToEffect(e) or c:IsLevelAbove(12) then return end - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_LEVEL) - e1:SetValue(1) - e1:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e1) -end -function c29088922.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x31) and c:GetCode()~=29088922 -end -function c29088922.drtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c29088922.cfilter,tp,LOCATION_MZONE,0,1,nil) end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(2) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2) -end -function c29088922.drop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end diff --git a/script/c29095552.lua b/script/c29095552.lua deleted file mode 100644 index e81863e1a7..0000000000 --- a/script/c29095552.lua +++ /dev/null @@ -1,45 +0,0 @@ ---M・HERO アシッド -function c29095552.initial_effect(c) - c:EnableReviveLimit() - --spsummon condition - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(aux.FALSE) - c:RegisterEffect(e1) - --destrroy & atkdown - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(29095552,0)) - e2:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_SINGLE) - e2:SetCategory(CATEGORY_DESTROY+CATEGORY_ATKCHANGE) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetTarget(c29095552.destg) - e2:SetOperation(c29095552.desop) - c:RegisterEffect(e2) -end -function c29095552.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable() -end -function c29095552.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local g=Duel.GetMatchingGroup(c29095552.filter,tp,0,LOCATION_ONFIELD,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c29095552.desop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local g=Duel.GetMatchingGroup(c29095552.filter,tp,0,LOCATION_ONFIELD,nil) - if Duel.Destroy(g,REASON_EFFECT)~=0 then - local mg=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil) - local tc=mg:GetFirst() - while tc do - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(-300) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - tc=mg:GetNext() - end - end -end diff --git a/script/c29116732.lua b/script/c29116732.lua deleted file mode 100644 index 2e70cfe2a3..0000000000 --- a/script/c29116732.lua +++ /dev/null @@ -1,28 +0,0 @@ ---デイブレーカー -function c29116732.initial_effect(c) - --spsummon success - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(29116732,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetTarget(c29116732.sumtg) - e2:SetOperation(c29116732.sumop) - c:RegisterEffect(e2) -end -function c29116732.filter(c,e,tp) - return c:IsCode(29116732) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c29116732.sumtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c29116732.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c29116732.sumop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c29116732.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c29139104.lua b/script/c29139104.lua deleted file mode 100644 index f6db25c484..0000000000 --- a/script/c29139104.lua +++ /dev/null @@ -1,46 +0,0 @@ ---荒ぶるアウス -function c29139104.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCost(c29139104.spcost) - e1:SetTarget(c29139104.sptg) - e1:SetOperation(c29139104.spop) - c:RegisterEffect(e1) -end -function c29139104.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsAttribute,1,e:GetHandler(),ATTRIBUTE_EARTH) end - local g=Duel.SelectReleaseGroup(tp,Card.IsAttribute,1,1,e:GetHandler(),ATTRIBUTE_EARTH) - Duel.Release(g,REASON_COST) -end -function c29139104.filter(c,e,tp) - return c:IsAttribute(ATTRIBUTE_EARTH) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c29139104.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c29139104.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c29139104.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c29139104.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_LEAVE_FIELD) - e1:SetRange(LOCATION_MZONE) - e1:SetOperation(c29139104.desop) - e1:SetReset(RESET_EVENT+0x1fe0000) - g:GetFirst():RegisterEffect(e1) - end -end -function c29139104.desop(e,tp,eg,ep,ev,re,r,rp) - if eg:IsExists(Card.IsCode,1,nil,29139104) then - Duel.Destroy(e:GetHandler(),REASON_EFFECT) - end -end diff --git a/script/c29143726.lua b/script/c29143726.lua deleted file mode 100644 index d659f28c21..0000000000 --- a/script/c29143726.lua +++ /dev/null @@ -1,46 +0,0 @@ ---転生竜 サンサーラ -function c29143726.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1) - c:EnableReviveLimit() - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(29143726,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e1:SetCountLimit(1,29143726) - e1:SetCondition(c29143726.spcon1) - e1:SetTarget(c29143726.sptg) - e1:SetOperation(c29143726.spop) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_BATTLE_DESTROYED) - e2:SetCondition(c29143726.spcon2) - c:RegisterEffect(e2) -end -function c29143726.spcon1(e,tp,eg,ep,ev,re,r,rp) - return rp~=tp and bit.band(r,REASON_EFFECT)~=0 and e:GetHandler():GetPreviousControler()==tp - and e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) -end -function c29143726.spcon2(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) -end -function c29143726.filter(c,e,tp) - return not c:IsCode(29143726) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c29143726.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and c29143726.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c29143726.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c29143726.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c29143726.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c29146185.lua b/script/c29146185.lua deleted file mode 100644 index f8f79a634e..0000000000 --- a/script/c29146185.lua +++ /dev/null @@ -1,85 +0,0 @@ ---魔導天士 トールモンド -function c29146185.initial_effect(c) - --ss success - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(29146185,0)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(c29146185.retcon) - e1:SetCost(c29146185.retcost) - e1:SetTarget(c29146185.rettg) - e1:SetOperation(c29146185.retop) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(29146185,1)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(29146185) - e2:SetCost(c29146185.descost) - e2:SetTarget(c29146185.destg) - e2:SetOperation(c29146185.desop) - c:RegisterEffect(e2) -end -function c29146185.retcon(e,tp,eg,ep,ev,re,r,rp) - if not re then return false end - local rc=re:GetHandler() - return rc:IsRace(RACE_SPELLCASTER) or (rc:IsSetCard(0x106e) and rc:IsType(TYPE_SPELL)) -end -function c29146185.retcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_SPSUMMON)==1 end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) - e1:SetTargetRange(1,0) - Duel.RegisterEffect(e1,tp) -end -function c29146185.filter(c) - return c:IsSetCard(0x106e) and c:IsType(TYPE_SPELL) and c:IsAbleToHand() -end -function c29146185.rettg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c29146185.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c29146185.filter,tp,LOCATION_GRAVE,0,2,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g=Duel.SelectTarget(tp,c29146185.filter,tp,LOCATION_GRAVE,0,2,2,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0) -end -function c29146185.retop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) - if Duel.SendtoHand(g,nil,REASON_EFFECT)>0 then - Duel.ConfirmCards(1-tp,g) - if c:IsFaceup() and c:IsRelateToEffect(e) then - Duel.RaiseSingleEvent(c,29146185,re,r,rp,0,0) - end - end -end -function c29146185.cffilter(c) - return c:IsSetCard(0x106e) and c:IsType(TYPE_SPELL) and not c:IsPublic() -end -function c29146185.descost(e,tp,eg,ep,ev,re,r,rp,chk) - local g=Duel.GetMatchingGroup(c29146185.cffilter,tp,LOCATION_HAND,0,nil) - if chk==0 then return g:GetClassCount(Card.GetCode)>=4 end - local cg=Group.CreateGroup() - for i=1,4 do - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) - local sg=g:Select(tp,1,1,nil) - g:Remove(Card.IsCode,nil,sg:GetFirst():GetCode()) - cg:Merge(sg) - end - Duel.ConfirmCards(1-tp,cg) - Duel.ShuffleHand(tp) -end -function c29146185.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end - local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c29146185.desop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler()) - Duel.Destroy(g,REASON_EFFECT) -end diff --git a/script/c29155212.lua b/script/c29155212.lua deleted file mode 100644 index 42690cdff5..0000000000 --- a/script/c29155212.lua +++ /dev/null @@ -1,40 +0,0 @@ ---ゴースト王-パンプキング- -function c29155212.initial_effect(c) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetValue(c29155212.adval) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_UPDATE_DEFENCE) - c:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(29155212,0)) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e3:SetCode(EVENT_PHASE+PHASE_STANDBY) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1) - e3:SetProperty(EFFECT_FLAG_NO_TURN_RESET) - e3:SetCondition(c29155212.atkcon) - e3:SetOperation(c29155212.atkop) - c:RegisterEffect(e3) -end -function c29155212.filter(c) - return c:IsFaceup() and c:IsCode(62121) -end -function c29155212.adval(e,c) - if Duel.IsExistingMatchingCard(c29155212.filter,0,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) then - return 100+c:GetFlagEffect(29155212)*100 - else - return c:GetFlagEffect(29155212)*100 - end -end -function c29155212.atkcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp and e:GetHandler():GetFlagEffect(29155212)<=4 -end -function c29155212.atkop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - e:GetHandler():RegisterFlagEffect(29155212,RESET_EVENT+0x1ff0000,0,1) -end diff --git a/script/c29216198.lua b/script/c29216198.lua deleted file mode 100644 index 87dc803492..0000000000 --- a/script/c29216198.lua +++ /dev/null @@ -1,22 +0,0 @@ ---グラビティ・ボール -function c29216198.initial_effect(c) - --flip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(29216198,0)) - e1:SetCategory(CATEGORY_POSITION) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP) - e1:SetTarget(c29216198.target) - e1:SetOperation(c29216198.operation) - c:RegisterEffect(e1) -end -function c29216198.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local sg=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_POSITION,sg,sg:GetCount(),0,0) -end -function c29216198.operation(e,tp,eg,ep,ev,re,r,rp) - local sg=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil) - if sg:GetCount()>0 then - Duel.ChangePosition(sg,POS_FACEUP_DEFENCE,0,POS_FACEUP_ATTACK,0) - end -end diff --git a/script/c29216967.lua b/script/c29216967.lua deleted file mode 100644 index 59a4774104..0000000000 --- a/script/c29216967.lua +++ /dev/null @@ -1,27 +0,0 @@ ---ギミック・パペット-シザー・アーム -function c29216967.initial_effect(c) - --send to grave - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(29216967,0)) - e1:SetCategory(CATEGORY_TOGRAVE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c29216967.target) - e1:SetOperation(c29216967.operation) - c:RegisterEffect(e1) -end -function c29216967.tgfilter(c) - return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x83) and c:IsAbleToGrave() -end -function c29216967.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c29216967.tgfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) -end -function c29216967.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c29216967.tgfilter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoGrave(g,REASON_EFFECT) - end -end diff --git a/script/c29223325.lua b/script/c29223325.lua deleted file mode 100644 index 933d8475da..0000000000 --- a/script/c29223325.lua +++ /dev/null @@ -1,88 +0,0 @@ ---アーティファクト・ムーブメント -function c29223325.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(29223325,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetHintTiming(0,TIMING_END_PHASE+TIMING_EQUIP) - e1:SetTarget(c29223325.target) - e1:SetOperation(c29223325.activate) - c:RegisterEffect(e1) - --skip - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(29223325,1)) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_DESTROYED) - e2:SetCondition(c29223325.descon) - e2:SetOperation(c29223325.desop) - c:RegisterEffect(e2) -end -function c29223325.filter(c) - return c:IsSetCard(0x97) and c:IsType(TYPE_MONSTER) and c:IsSSetable(true) -end -function c29223325.desfilter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable() -end -function c29223325.desfilter2(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable() and c:GetSequence()<5 -end -function c29223325.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and c29223325.desfilter(chkc) and chkc~=e:GetHandler() end - if chk==0 then - if not Duel.IsExistingMatchingCard(c29223325.filter,tp,LOCATION_DECK,0,1,nil) then return false end - local ft=Duel.GetLocationCount(tp,LOCATION_SZONE) - if e:GetHandler():IsLocation(LOCATION_HAND) then ft=ft-1 end - if ft<0 then return false - elseif ft>0 then - return Duel.IsExistingTarget(c29223325.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) - else - return Duel.IsExistingTarget(c29223325.desfilter2,tp,LOCATION_ONFIELD,0,1,e:GetHandler()) - end - end - local ft=Duel.GetLocationCount(tp,LOCATION_SZONE) - local g=nil - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - if ft>0 then - g=Duel.SelectTarget(tp,c29223325.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,e:GetHandler()) - else - g=Duel.SelectTarget(tp,c29223325.desfilter2,tp,LOCATION_ONFIELD,0,1,1,e:GetHandler()) - end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c29223325.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)~=0 then - if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) - local g=Duel.SelectMatchingCard(tp,c29223325.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SSet(tp,g:GetFirst()) - Duel.ConfirmCards(1-tp,g) - end - end -end -function c29223325.descon(e,tp,eg,ep,ev,re,r,rp) - return rp~=tp and e:GetHandler():GetPreviousControler()==tp -end -function c29223325.desop(e,tp,eg,ep,ev,re,r,rp) - local ph=Duel.GetCurrentPhase() - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SKIP_BP) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetTargetRange(0,1) - if Duel.GetTurnPlayer()~=tp and ph>PHASE_MAIN1 and ph-1 - and Duel.IsExistingMatchingCard(c29246354.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) -end -function c29246354.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - if not Duel.IsEnvironment(42015635) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c29246354.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c2926176.lua b/script/c2926176.lua deleted file mode 100644 index 85d4434989..0000000000 --- a/script/c2926176.lua +++ /dev/null @@ -1,33 +0,0 @@ ---王家の呪い -function c2926176.initial_effect(c) - --Negate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_CHAINING) - e1:SetCondition(c2926176.condition) - e1:SetTarget(c2926176.target) - e1:SetOperation(c2926176.operation) - c:RegisterEffect(e1) -end -function c2926176.cfilter(c) - return c:IsOnField() and c:IsType(TYPE_SPELL+TYPE_TRAP) -end -function c2926176.condition(e,tp,eg,ep,ev,re,r,rp) - if not re:IsHasType(EFFECT_TYPE_ACTIVATE) or not Duel.IsChainNegatable(ev) then return false end - local ex,tg,tc=Duel.GetOperationInfo(ev,CATEGORY_DESTROY) - return ex and tg~=nil and tc==1 and tg:FilterCount(c2926176.cfilter,nil)==tg:GetCount() -end -function c2926176.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) - end -end -function c2926176.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateActivation(ev) - if re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(eg,REASON_EFFECT) - end -end diff --git a/script/c29267084.lua b/script/c29267084.lua deleted file mode 100644 index f3f2bac209..0000000000 --- a/script/c29267084.lua +++ /dev/null @@ -1,65 +0,0 @@ ---闇の呪縛 -function c29267084.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_POSITION) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetCondition(c29267084.condition) - e1:SetTarget(c29267084.target) - e1:SetOperation(c29267084.operation) - c:RegisterEffect(e1) - --Destroy - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e2:SetRange(LOCATION_SZONE) - e2:SetCode(EVENT_LEAVE_FIELD) - e2:SetCondition(c29267084.descon) - e2:SetOperation(c29267084.desop) - c:RegisterEffect(e2) -end -function c29267084.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end -function c29267084.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil) -end -function c29267084.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsRelateToEffect(e) then - c:SetCardTarget(tc) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_OWNER_RELATE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_CANNOT_CHANGE_POSITION) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetCondition(c29267084.rcon) - tc:RegisterEffect(e1,true) - local e2=e1:Clone() - e2:SetCode(EFFECT_CANNOT_ATTACK) - tc:RegisterEffect(e2,true) - local e3=e1:Clone() - e3:SetCode(EFFECT_UPDATE_ATTACK) - e3:SetValue(-700) - tc:RegisterEffect(e3,true) - end -end -function c29267084.rcon(e) - return e:GetOwner():IsHasCardTarget(e:GetHandler()) -end -function c29267084.descon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsStatus(STATUS_DESTROY_CONFIRMED) then return false end - local tc=c:GetFirstCardTarget() - return tc and eg:IsContains(tc) -end -function c29267084.desop(e,tp,eg,ep,ev,re,r,rp) - Duel.Destroy(e:GetHandler(), REASON_EFFECT) -end diff --git a/script/c29307554.lua b/script/c29307554.lua deleted file mode 100644 index 5cf27602c3..0000000000 --- a/script/c29307554.lua +++ /dev/null @@ -1,58 +0,0 @@ ---破壊神の系譜 -function c29307554.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c29307554.condition) - e1:SetTarget(c29307554.target) - e1:SetOperation(c29307554.activate) - c:RegisterEffect(e1) - if not c29307554.global_check then - c29307554.global_check=true - local ge1=Effect.CreateEffect(c) - ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - ge1:SetCode(EVENT_DESTROYED) - ge1:SetOperation(c29307554.checkop) - Duel.RegisterEffect(ge1,0) - end -end -function c29307554.checkop(e,tp,eg,ep,ev,re,r,rp) - local tc=eg:GetFirst() - local p1=false - local p2=false - while tc do - if tc:IsPreviousLocation(LOCATION_MZONE) and tc:IsPreviousPosition(POS_DEFENCE) then - if tc:GetReasonPlayer()==0 and tc:GetPreviousControler()==1 then p1=true end - if tc:GetReasonPlayer()==1 and tc:GetPreviousControler()==0 then p2=true end - end - tc=eg:GetNext() - end - if p1 then Duel.RegisterFlagEffect(0,29307554,RESET_PHASE+PHASE_END,0,1) end - if p2 then Duel.RegisterFlagEffect(1,29307554,RESET_PHASE+PHASE_END,0,1) end -end -function c29307554.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetFlagEffect(tp,29307554)~=0 and Duel.GetTurnPlayer()==tp - and (Duel.IsAbleToEnterBP() or Duel.GetCurrentPhase()==PHASE_BATTLE) -end -function c29307554.filter(c) - return c:IsFaceup() and c:IsLevelAbove(8) and c:GetEffectCount(EFFECT_EXTRA_ATTACK)==0 -end -function c29307554.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c29307554.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c29307554.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c29307554.filter,tp,LOCATION_MZONE,0,1,1,nil) -end -function c29307554.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_EXTRA_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e1:SetValue(1) - tc:RegisterEffect(e1) - end -end diff --git a/script/c29330706.lua b/script/c29330706.lua deleted file mode 100644 index fa02e3476f..0000000000 --- a/script/c29330706.lua +++ /dev/null @@ -1,22 +0,0 @@ ---武装神竜プロテクト・ドラゴン -function c29330706.initial_effect(c) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - e1:SetTargetRange(LOCATION_SZONE,0) - e1:SetTarget(aux.TargetBoolFunction(Card.IsType,TYPE_EQUIP)) - e1:SetValue(1) - c:RegisterEffect(e1) - --atkup - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(c29330706.val) - c:RegisterEffect(e2) -end -function c29330706.val(e,c) - return c:GetEquipCount()*500 -end diff --git a/script/c29343734.lua b/script/c29343734.lua deleted file mode 100644 index a850b7a902..0000000000 --- a/script/c29343734.lua +++ /dev/null @@ -1,57 +0,0 @@ ---E・HERO エリクシーラー -function c29343734.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcCode4(c,21844576,58932615,84327329,79979666,true,true) - --spsummon condition - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e2:SetCode(EFFECT_SPSUMMON_CONDITION) - e2:SetValue(aux.fuslimit) - c:RegisterEffect(e2) - --attribute - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e3:SetRange(LOCATION_MZONE) - e3:SetCode(EFFECT_ADD_ATTRIBUTE) - e3:SetValue(0xf) - c:RegisterEffect(e3) - --return - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(29343734,0)) - e4:SetCategory(CATEGORY_TODECK) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e4:SetCode(EVENT_SPSUMMON_SUCCESS) - e4:SetCondition(c29343734.retcon) - e4:SetTarget(c29343734.rettg) - e4:SetOperation(c29343734.retop) - c:RegisterEffect(e4) - --atk - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_SINGLE) - e5:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e5:SetRange(LOCATION_MZONE) - e5:SetCode(EFFECT_UPDATE_ATTACK) - e5:SetValue(c29343734.val) - c:RegisterEffect(e5) -end -function c29343734.retcon(e,tp,eg,ep,ev,re,r,rp) - return bit.band(e:GetHandler():GetSummonType(),SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION -end -function c29343734.rettg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local g=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,LOCATION_REMOVED,LOCATION_REMOVED,nil) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0) -end -function c29343734.retop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(nil,tp,LOCATION_REMOVED,LOCATION_REMOVED,nil) - Duel.SendtoDeck(g,nil,2,REASON_EFFECT) -end -function c29343734.atkfilter(c,att) - return c:IsFaceup() and c:IsAttribute(att) -end -function c29343734.val(e,c) - return Duel.GetMatchingGroupCount(c29343734.atkfilter,c:GetControler(),0,LOCATION_MZONE,nil,c:GetAttribute())*300 -end diff --git a/script/c29353756.lua b/script/c29353756.lua deleted file mode 100644 index 2763512e35..0000000000 --- a/script/c29353756.lua +++ /dev/null @@ -1,86 +0,0 @@ ---ZW-荒鷲激神爪 -function c29353756.initial_effect(c) - c:SetUniqueOnField(1,0,29353756) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c29353756.spcon) - c:RegisterEffect(e1) - --equip - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(29353756,0)) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCategory(CATEGORY_EQUIP) - e2:SetRange(LOCATION_MZONE) - e2:SetCondition(c29353756.eqcon) - e2:SetTarget(c29353756.eqtg) - e2:SetOperation(c29353756.eqop) - c:RegisterEffect(e2) - --negate - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e3:SetCode(EVENT_CHAIN_SOLVING) - e3:SetRange(LOCATION_SZONE) - e3:SetCountLimit(1) - e3:SetCondition(c29353756.negcon) - e3:SetOperation(c29353756.negop) - c:RegisterEffect(e3) -end -function c29353756.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.GetLP(tp)<=Duel.GetLP(1-tp)-2000 - and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 -end -function c29353756.eqcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():CheckUniqueOnField(tp) -end -function c29353756.filter(c) - return c:IsFaceup() and c:IsSetCard(0x7f) -end -function c29353756.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c29353756.filter(chkc) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingTarget(c29353756.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c29353756.filter,tp,LOCATION_MZONE,0,1,1,nil) -end -function c29353756.eqop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) or c:IsFacedown() then return end - local tc=Duel.GetFirstTarget() - if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or tc:GetControler()~=tp or tc:IsFacedown() or not tc:IsRelateToEffect(e) or not c:CheckUniqueOnField(tp) then - Duel.SendtoGrave(c,REASON_EFFECT) - return - end - Duel.Equip(tp,c,tc,true) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(c29353756.eqlimit) - e1:SetLabelObject(tc) - c:RegisterEffect(e1) - --atkup - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(2000) - e2:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e2) -end -function c29353756.eqlimit(e,c) - return c==e:GetLabelObject() -end -function c29353756.negcon(e,tp,eg,ep,ev,re,r,rp) - return rp~=tp and Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)==LOCATION_SZONE - and re:IsActiveType(TYPE_TRAP) and Duel.IsChainDisablable(ev) -end -function c29353756.negop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_CARD,0,29353756) - Duel.NegateEffect(ev) -end diff --git a/script/c293542.lua b/script/c293542.lua deleted file mode 100644 index b896511e42..0000000000 --- a/script/c293542.lua +++ /dev/null @@ -1,68 +0,0 @@ ---TG ワーウルフ -function c293542.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(293542,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetRange(LOCATION_HAND) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(c293542.spcon) - e1:SetTarget(c293542.sptg) - e1:SetOperation(c293542.spop) - c:RegisterEffect(e1) - --to grave - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetOperation(c293542.regop) - c:RegisterEffect(e2) -end -function c293542.cfilter(c) - return c:IsFaceup() and c:IsLevelBelow(4) -end -function c293542.spcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c293542.cfilter,1,nil) -end -function c293542.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c293542.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) - end -end -function c293542.regop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if bit.band(c:GetPreviousLocation(),LOCATION_ONFIELD)~=0 and c:IsReason(REASON_DESTROY) then - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(293542,1)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_GRAVE) - e1:SetTarget(c293542.thtg) - e1:SetOperation(c293542.thop) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - c:RegisterEffect(e1) - end -end -function c293542.filter(c) - return c:IsSetCard(0x27) and c:GetCode()~=293542 and c:IsAbleToHand() -end -function c293542.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c293542.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c293542.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c293542.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c29357956.lua b/script/c29357956.lua deleted file mode 100644 index a002de826f..0000000000 --- a/script/c29357956.lua +++ /dev/null @@ -1,105 +0,0 @@ ---剣闘獣ネロキウス -function c29357956.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcFunRep(c,aux.FilterBoolFunction(Card.IsSetCard,0x19),3,true) - --spsummon condition - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(c29357956.splimit) - c:RegisterEffect(e1) - --special summon rule - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_SPSUMMON_PROC) - e2:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e2:SetRange(LOCATION_EXTRA) - e2:SetCondition(c29357956.sprcon) - e2:SetOperation(c29357956.sprop) - c:RegisterEffect(e2) - --battle indestructable - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e3:SetValue(1) - c:RegisterEffect(e3) - --actlimit - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_FIELD) - e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e4:SetCode(EFFECT_CANNOT_ACTIVATE) - e4:SetRange(LOCATION_MZONE) - e4:SetTargetRange(0,1) - e4:SetValue(1) - e4:SetCondition(c29357956.actcon) - c:RegisterEffect(e4) - --special summon - local e6=Effect.CreateEffect(c) - e6:SetDescription(aux.Stringid(29357956,1)) - e6:SetCategory(CATEGORY_SPECIAL_SUMMON) - e6:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e6:SetCode(EVENT_PHASE+PHASE_BATTLE) - e6:SetRange(LOCATION_MZONE) - e6:SetCondition(c29357956.spcon) - e6:SetCost(c29357956.spcost) - e6:SetTarget(c29357956.sptg) - e6:SetOperation(c29357956.spop) - c:RegisterEffect(e6) -end -function c29357956.splimit(e,se,sp,st) - return e:GetHandler():GetLocation()~=LOCATION_EXTRA -end -function c29357956.spfilter(c) - return c:IsSetCard(0x19) and c:IsCanBeFusionMaterial() and c:IsAbleToDeckOrExtraAsCost() -end -function c29357956.sprcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.GetLocationCount(tp,LOCATION_MZONE)>-3 - and Duel.IsExistingMatchingCard(c29357956.spfilter,tp,LOCATION_MZONE,0,3,nil) -end -function c29357956.sprop(e,tp,eg,ep,ev,re,r,rp,c) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectMatchingCard(tp,c29357956.spfilter,tp,LOCATION_MZONE,0,3,3,nil) - local cg=g:Filter(Card.IsFacedown,nil) - if cg:GetCount()>0 then - Duel.ConfirmCards(1-tp,cg) - end - Duel.SendtoDeck(g,nil,2,REASON_COST) -end -function c29357956.actcon(e) - return Duel.GetAttacker()==e:GetHandler() or Duel.GetAttackTarget()==e:GetHandler() -end -function c29357956.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetBattledGroupCount()>0 -end -function c29357956.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToExtraAsCost() end - Duel.SendtoDeck(c,nil,0,REASON_COST) -end -function c29357956.filter(c,e,tp) - return c:IsSetCard(0x19) and c:IsCanBeSpecialSummoned(e,122,tp,false,false) -end -function c29357956.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c29357956.filter,tp,LOCATION_DECK,0,2,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_DECK) -end -function c29357956.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 then return end - local g=Duel.GetMatchingGroup(c29357956.filter,tp,LOCATION_DECK,0,nil,e,tp) - if g:GetCount()>=2 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=g:Select(tp,2,2,nil) - local tc=sg:GetFirst() - Duel.SpecialSummonStep(tc,122,tp,tp,false,false,POS_FACEUP) - tc:RegisterFlagEffect(tc:GetOriginalCode(),RESET_EVENT+0x1ff0000,0,0) - tc=sg:GetNext() - Duel.SpecialSummonStep(tc,122,tp,tp,false,false,POS_FACEUP) - tc:RegisterFlagEffect(tc:GetOriginalCode(),RESET_EVENT+0x1ff0000,0,0) - Duel.SpecialSummonComplete() - end -end diff --git a/script/c29380133.lua b/script/c29380133.lua deleted file mode 100644 index 252cb70562..0000000000 --- a/script/c29380133.lua +++ /dev/null @@ -1,25 +0,0 @@ ---ヤドカリュー -function c29380133.initial_effect(c) - --todeck - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(29380133,0)) - e1:SetCategory(CATEGORY_TODECK) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_CHANGE_POS) - e1:SetCondition(c29380133.condition) - e1:SetTarget(c29380133.target) - e1:SetOperation(c29380133.operation) - c:RegisterEffect(e1) -end -function c29380133.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousPosition(POS_ATTACK) and e:GetHandler():IsPosition(POS_DEFENCE) -end -function c29380133.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,LOCATION_HAND,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_HAND) -end -function c29380133.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,LOCATION_HAND,0,1,99,nil) - Duel.SendtoDeck(g,nil,1,REASON_EFFECT) -end diff --git a/script/c29389368.lua b/script/c29389368.lua deleted file mode 100644 index c68a818c1d..0000000000 --- a/script/c29389368.lua +++ /dev/null @@ -1,22 +0,0 @@ ---体力増強剤スーパーZ -function c29389368.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCategory(CATEGORY_RECOVER) - e1:SetCode(EVENT_PRE_DAMAGE_CALCULATE) - e1:SetCondition(c29389368.condition) - e1:SetTarget(c29389368.target) - e1:SetOperation(c29389368.activate) - c:RegisterEffect(e1) -end -function c29389368.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetBattleDamage(tp)>=2000 -end -function c29389368.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,4000) -end -function c29389368.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.Recover(tp,4000,REASON_EFFECT) -end diff --git a/script/c29400787.lua b/script/c29400787.lua deleted file mode 100644 index 5a7660ea98..0000000000 --- a/script/c29400787.lua +++ /dev/null @@ -1,72 +0,0 @@ ---ゴーストリック・パレード -function c29400787.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --atklimit - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET) - e2:SetRange(LOCATION_FZONE) - e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e2:SetValue(c29400787.atlimit) - c:RegisterEffect(e2) - --direct attack - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetCode(EFFECT_DIRECT_ATTACK) - e3:SetRange(LOCATION_SZONE) - e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e3:SetTarget(c29400787.dirtg) - c:RegisterEffect(e3) - --tohand - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(29400787,0)) - e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e4:SetCode(EVENT_ATTACK_ANNOUNCE) - e4:SetRange(LOCATION_SZONE) - e4:SetCondition(c29400787.thcon) - e4:SetTarget(c29400787.thtg) - e4:SetOperation(c29400787.thop) - c:RegisterEffect(e4) - -- - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_FIELD) - e5:SetCode(EFFECT_CHANGE_DAMAGE) - e5:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e5:SetRange(LOCATION_SZONE) - e5:SetTargetRange(0,1) - e5:SetValue(0) - c:RegisterEffect(e5) - local e6=e5:Clone() - e6:SetCode(EFFECT_NO_EFFECT_DAMAGE) - c:RegisterEffect(e6) -end -function c29400787.atlimit(e,c) - return c:IsFacedown() -end -function c29400787.dirtg(e,c) - return not Duel.IsExistingMatchingCard(Card.IsFaceup,c:GetControler(),0,LOCATION_MZONE,1,nil) -end -function c29400787.thcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetAttacker():IsControler(1-tp) and Duel.GetAttackTarget()==nil -end -function c29400787.filter(c) - return c:IsSetCard(0x8d) and c:IsAbleToHand() -end -function c29400787.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c29400787.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c29400787.thop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c29400787.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c29401950.lua b/script/c29401950.lua deleted file mode 100644 index 019e7bcb84..0000000000 --- a/script/c29401950.lua +++ /dev/null @@ -1,63 +0,0 @@ ---奈落の落とし穴 -function c29401950.initial_effect(c) - --Activate(summon) - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_REMOVE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c29401950.target) - e1:SetOperation(c29401950.activate) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_DESTROY+CATEGORY_REMOVE) - e2:SetType(EFFECT_TYPE_ACTIVATE) - e2:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - e2:SetTarget(c29401950.target) - e2:SetOperation(c29401950.activate) - c:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetCategory(CATEGORY_DESTROY+CATEGORY_REMOVE) - e3:SetType(EFFECT_TYPE_ACTIVATE) - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - e3:SetTarget(c29401950.target2) - e3:SetOperation(c29401950.activate2) - c:RegisterEffect(e3) -end -function c29401950.filter(c,tp,ep) - return c:IsLocation(LOCATION_MZONE) and c:IsFaceup() and c:GetAttack()>=1500 - and ep~=tp and c:IsDestructable() and c:IsAbleToRemove() -end -function c29401950.target(e,tp,eg,ep,ev,re,r,rp,chk) - local tc=eg:GetFirst() - if chk==0 then return c29401950.filter(tc,tp,ep) end - Duel.SetTargetCard(eg) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,tc,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,tc,1,0,0) -end -function c29401950.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=eg:GetFirst() - if tc and tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:GetAttack()>=1500 then - Duel.Destroy(tc,REASON_EFFECT,LOCATION_REMOVED) - end -end -function c29401950.filter2(c,tp) - return c:IsLocation(LOCATION_MZONE) and c:IsFaceup() and c:GetAttack()>=1500 and c:GetSummonPlayer()~=tp - and c:IsDestructable() and c:IsAbleToRemove() -end -function c29401950.target2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return eg:IsExists(c29401950.filter2,1,nil,tp) end - local g=eg:Filter(c29401950.filter2,nil,tp) - Duel.SetTargetCard(eg) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,0) -end -function c29401950.filter3(c,e,tp) - return c:IsFaceup() and c:GetAttack()>=1500 and c:GetSummonPlayer()~=tp - and c:IsRelateToEffect(e) and c:IsLocation(LOCATION_MZONE) and c:IsDestructable() -end -function c29401950.activate2(e,tp,eg,ep,ev,re,r,rp) - local g=eg:Filter(c29401950.filter3,nil,e,tp) - if g:GetCount()>0 then - Duel.Destroy(g,REASON_EFFECT,LOCATION_REMOVED) - end -end diff --git a/script/c29417188.lua b/script/c29417188.lua deleted file mode 100644 index 6a6583ba99..0000000000 --- a/script/c29417188.lua +++ /dev/null @@ -1,42 +0,0 @@ ---サイキック・ブロッカー -function c29417188.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(29417188,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetTarget(c29417188.target) - e1:SetOperation(c29417188.operation) - c:RegisterEffect(e1) -end -function c29417188.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,564) - local ac=Duel.AnnounceCard(tp) - e:SetLabel(ac) - e:GetHandler():SetHint(CHINT_CARD,ac) -end -function c29417188.operation(e,tp,eg,ep,ev,re,r,rp) - --forbidden - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE) - e1:SetCode(EFFECT_FORBIDDEN) - e1:SetTargetRange(0x7f,0x7f) - e1:SetTarget(c29417188.bantg) - e1:SetLabel(e:GetLabel()) - e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN) - Duel.RegisterEffect(e1,tp) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_DISABLE) - e2:SetTargetRange(0x7f,0x7f) - e2:SetTarget(c29417188.bantg) - e2:SetLabel(e:GetLabel()) - e2:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN) - Duel.RegisterEffect(e2,tp) -end -function c29417188.bantg(e,c) - return c:IsCode(e:GetLabel()) -end diff --git a/script/c29424328.lua b/script/c29424328.lua deleted file mode 100644 index 6a71120104..0000000000 --- a/script/c29424328.lua +++ /dev/null @@ -1,47 +0,0 @@ ---魔王ディアボロス -function c29424328.initial_effect(c) - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - c:RegisterEffect(e1) - --tribute limit - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_TRIBUTE_LIMIT) - e2:SetValue(c29424328.tlimit) - c:RegisterEffect(e2) - --release limit - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e3:SetRange(LOCATION_MZONE) - e3:SetCode(EFFECT_UNRELEASABLE_EFFECT) - e3:SetValue(1) - c:RegisterEffect(e3) - --confirm deck - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(29424328,0)) - e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e4:SetRange(LOCATION_MZONE) - e4:SetCode(EVENT_PREDRAW) - e4:SetCondition(c29424328.cfcon) - e4:SetOperation(c29424328.cfop) - c:RegisterEffect(e4) -end -function c29424328.tlimit(e,c) - return not c:IsAttribute(ATTRIBUTE_DARK) -end -function c29424328.cfcon(e,tp,eg,ep,ev,re,r,rp) - return tp~=Duel.GetTurnPlayer() and Duel.GetFieldGroupCount(1-tp,LOCATION_DECK,0)>0 -end -function c29424328.cfop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetDecktopGroup(1-tp,1) - Duel.ConfirmCards(tp,g) - local tc=g:GetFirst() - local opt=Duel.SelectOption(tp,aux.Stringid(29424328,1),aux.Stringid(29424328,2)) - if opt==1 then - Duel.MoveSequence(tc,opt) - end -end diff --git a/script/c29436665.lua b/script/c29436665.lua deleted file mode 100644 index 5f1ac4a6a4..0000000000 --- a/script/c29436665.lua +++ /dev/null @@ -1,54 +0,0 @@ ---黒魔導の執行官 -function c29436665.initial_effect(c) - c:EnableReviveLimit() - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_SPSUMMON_PROC) - e2:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e2:SetRange(LOCATION_HAND) - e2:SetCondition(c29436665.spcon) - e2:SetOperation(c29436665.spop) - c:RegisterEffect(e2) - --damage - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e3:SetCode(EVENT_CHAINING) - e3:SetRange(LOCATION_MZONE) - e3:SetOperation(aux.chainreg) - c:RegisterEffect(e3) - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(29436665,0)) - e4:SetCategory(CATEGORY_DAMAGE) - e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e4:SetCode(EVENT_CHAIN_SOLVED) - e4:SetRange(LOCATION_MZONE) - e4:SetCondition(c29436665.dmgcon) - e4:SetOperation(c29436665.dmgop) - c:RegisterEffect(e4) -end -function c29436665.rfilter(c) - return c:IsCode(46986414) -end -function c29436665.spcon(e,c) - if c==nil then return true end - return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-1 - and Duel.CheckReleaseGroup(c:GetControler(),c29436665.rfilter,1,nil) -end -function c29436665.spop(e,tp,eg,ep,ev,re,r,rp,c) - local g=Duel.SelectReleaseGroup(c:GetControler(),c29436665.rfilter,1,1,nil) - Duel.Release(g,REASON_COST) -end -function c29436665.dmgcon(e,tp,eg,ep,ev,re,r,rp) - return re:GetActiveType()==TYPE_SPELL and re:IsHasType(EFFECT_TYPE_ACTIVATE) and e:GetHandler():GetFlagEffect(1)>0 -end -function c29436665.dmgop(e,tp,eg,ep,ev,re,r,rp) - Duel.Damage(1-tp,1000,REASON_EFFECT) -end diff --git a/script/c29455728.lua b/script/c29455728.lua deleted file mode 100644 index f722a74fec..0000000000 --- a/script/c29455728.lua +++ /dev/null @@ -1,39 +0,0 @@ ---ツイン・フォトン・リザード -function c29455728.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcFunRep(c,aux.FilterBoolFunction(Card.IsSetCard,0x55),2,true) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(29455728,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c29455728.cost) - e1:SetTarget(c29455728.target) - e1:SetOperation(c29455728.operation) - c:RegisterEffect(e1) -end -function c29455728.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end -function c29455728.mgfilter(c,e,tp,fusc) - return not c:IsControler(tp) or not c:IsLocation(LOCATION_GRAVE) - or bit.band(c:GetReason(),0x40008)~=0x40008 or c:GetReasonCard()~=fusc - or not c:IsCanBeSpecialSummoned(e,0,tp,false,false) or c:IsHasEffect(EFFECT_NECRO_VALLEY) -end -function c29455728.target(e,tp,eg,ep,ev,re,r,rp,chk) - local g=e:GetHandler():GetMaterial() - if chk==0 then return g:GetCount()>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)+1>=g:GetCount() - and bit.band(e:GetHandler():GetSummonType(),SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION - and not g:IsExists(c29455728.mgfilter,1,nil,e,tp,e:GetHandler()) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,g:GetCount(),0,0) -end -function c29455728.operation(e,tp,eg,ep,ev,re,r,rp) - local g=e:GetHandler():GetMaterial() - if Duel.GetLocationCount(tp,LOCATION_MZONE)>=g:GetCount() - and not g:IsExists(c29455728.mgfilter,1,nil,e,tp,e:GetHandler()) then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c2948263.lua b/script/c2948263.lua deleted file mode 100644 index a61bfdcaaa..0000000000 --- a/script/c2948263.lua +++ /dev/null @@ -1,85 +0,0 @@ ---ゴゴゴゴーレム-GF -function c2948263.initial_effect(c) - c:EnableReviveLimit() - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_SPSUMMON_PROC) - e2:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e2:SetRange(LOCATION_HAND) - e2:SetCondition(c2948263.spcon) - e2:SetOperation(c2948263.spop) - c:RegisterEffect(e2) - --reduce - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e3:SetCode(EVENT_PRE_BATTLE_DAMAGE) - e3:SetCondition(c2948263.rdcon) - e3:SetOperation(c2948263.rdop) - c:RegisterEffect(e3) - --disable - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(2948263,0)) - e4:SetCategory(CATEGORY_DISABLE) - e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_QUICK_F) - e4:SetCode(EVENT_CHAINING) - e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) - e4:SetRange(LOCATION_MZONE) - e4:SetCountLimit(1) - e4:SetCondition(c2948263.discon) - e4:SetTarget(c2948263.distg) - e4:SetOperation(c2948263.disop) - c:RegisterEffect(e4) -end -function c2948263.spcon(e,c) - if c==nil then return true end - return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-1 - and Duel.CheckReleaseGroup(c:GetControler(),Card.IsSetCard,1,nil,0x59) -end -function c2948263.spop(e,tp,eg,ep,ev,re,r,rp,c) - local g=Duel.SelectReleaseGroup(c:GetControler(),Card.IsSetCard,1,1,nil,0x59) - Duel.Release(g,REASON_COST) - local atk=g:GetFirst():GetBaseAttack() - if atk<0 then return end - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(atk*2) - e1:SetReset(RESET_EVENT+0xff0000) - c:RegisterEffect(e1) -end -function c2948263.rdcon(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp -end -function c2948263.rdop(e,tp,eg,ep,ev,re,r,rp) - Duel.ChangeBattleDamage(ep,ev/2) -end -function c2948263.discon(e,tp,eg,ep,ev,re,r,rp) - local tgp,loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_CONTROLER,CHAININFO_TRIGGERING_LOCATION) - return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainDisablable(ev) - and tgp~=tp and re:IsActiveType(TYPE_MONSTER) and loc==LOCATION_MZONE -end -function c2948263.distg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0) -end -function c2948263.disop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFacedown() or c:GetAttack()<1500 or not c:IsRelateToEffect(e) or Duel.GetCurrentChain()~=ev+1 or c:IsStatus(STATUS_BATTLE_DESTROYED) then - return - end - Duel.NegateEffect(ev) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_COPY_INHERIT) - e1:SetReset(RESET_EVENT+0x1ff0000) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(-1500) - c:RegisterEffect(e1) -end diff --git a/script/c29515122.lua b/script/c29515122.lua deleted file mode 100644 index e4d779d5f4..0000000000 --- a/script/c29515122.lua +++ /dev/null @@ -1,37 +0,0 @@ ---重機王ドボク・ザーク -function c29515122.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,5,3) - c:EnableReviveLimit() - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(29515122,0)) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_DECKDES) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCost(c29515122.cost) - e1:SetTarget(c29515122.target) - e1:SetOperation(c29515122.operation) - c:RegisterEffect(e1) -end -function c29515122.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c29515122.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDiscardDeck(1-tp,3) end - Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,1-tp,3) -end -function c29515122.cfilter(c) - return c:IsLocation(LOCATION_GRAVE) and c:IsType(TYPE_MONSTER) -end -function c29515122.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.DiscardDeck(1-tp,3,REASON_EFFECT) - local g=Duel.GetOperatedGroup() - local ct=g:FilterCount(c29515122.cfilter,nil) - if ct==0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local dg=Duel.SelectMatchingCard(tp,Card.IsDestructable,tp,0,LOCATION_ONFIELD,1,ct,nil) - Duel.Destroy(dg,REASON_EFFECT) -end diff --git a/script/c29549364.lua b/script/c29549364.lua deleted file mode 100644 index c168d7d5ea..0000000000 --- a/script/c29549364.lua +++ /dev/null @@ -1,17 +0,0 @@ ---生贄封じの仮面 -function c29549364.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_DRAW_PHASE) - c:RegisterEffect(e1) - --cannot release - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetRange(LOCATION_SZONE) - e2:SetCode(EFFECT_CANNOT_RELEASE) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetTargetRange(1,1) - c:RegisterEffect(e2) -end diff --git a/script/c295517.lua b/script/c295517.lua deleted file mode 100644 index a0a868a8b4..0000000000 --- a/script/c295517.lua +++ /dev/null @@ -1,38 +0,0 @@ ---伝説の都 アトランティス -function c295517.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --level - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_UPDATE_LEVEL) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(LOCATION_HAND+LOCATION_MZONE,LOCATION_HAND+LOCATION_MZONE) - e2:SetTarget(c295517.lvtg) - e2:SetValue(-1) - c:RegisterEffect(e2) - --Atk - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetCode(EFFECT_UPDATE_ATTACK) - e3:SetRange(LOCATION_SZONE) - e3:SetTarget(c295517.lvtg) - e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e3:SetValue(200) - c:RegisterEffect(e3) - --Def - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_FIELD) - e4:SetCode(EFFECT_UPDATE_DEFENCE) - e4:SetRange(LOCATION_SZONE) - e4:SetTarget(c295517.lvtg) - e4:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e4:SetValue(200) - c:RegisterEffect(e4) -end -function c295517.lvtg(e,c) - return c:IsAttribute(ATTRIBUTE_WATER) -end diff --git a/script/c29552709.lua b/script/c29552709.lua deleted file mode 100644 index c517e53acf..0000000000 --- a/script/c29552709.lua +++ /dev/null @@ -1,54 +0,0 @@ ---ダイガスタ・スフィアード -function c29552709.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,nil,aux.NonTuner(Card.IsSetCard,0x10),1) - c:EnableReviveLimit() - --to hand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(29552709,0)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(c29552709.condition) - e1:SetTarget(c29552709.target) - e1:SetOperation(c29552709.operation) - c:RegisterEffect(e1) - --reflect - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetRange(LOCATION_MZONE) - e2:SetTargetRange(LOCATION_MZONE,0) - e2:SetCode(EFFECT_REFLECT_BATTLE_DAMAGE) - e2:SetTarget(c29552709.reftg) - e2:SetValue(1) - c:RegisterEffect(e2) - --indes - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e3:SetValue(1) - c:RegisterEffect(e3) -end -function c29552709.reftg(e,c) - return c:IsSetCard(0x10) -end -function c29552709.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_SYNCHRO -end -function c29552709.filter(c) - return c:IsSetCard(0x10) and c:IsAbleToHand() -end -function c29552709.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c29552709.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c29552709.filter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c29552709.filter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c29552709.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - end -end diff --git a/script/c2956282.lua b/script/c2956282.lua deleted file mode 100644 index 2e37ef988c..0000000000 --- a/script/c2956282.lua +++ /dev/null @@ -1,47 +0,0 @@ ---ナチュル・パルキオン -function c2956282.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,c2956282.synfilter,aux.NonTuner(c2956282.synfilter),1) - c:EnableReviveLimit() - --negate - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(2956282,0)) - e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetRange(LOCATION_MZONE) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) - e1:SetCode(EVENT_CHAINING) - e1:SetCondition(c2956282.discon) - e1:SetCost(c2956282.discost) - e1:SetTarget(c2956282.distg) - e1:SetOperation(c2956282.disop) - c:RegisterEffect(e1) -end -function c2956282.synfilter(c) - return c:IsAttribute(ATTRIBUTE_EARTH) -end -function c2956282.discon(e,tp,eg,ep,ev,re,r,rp) - return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) - and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_TRAP) and Duel.IsChainNegatable(ev) -end -function c2956282.discost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemoveAsCost,tp,LOCATION_GRAVE,0,2,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemoveAsCost,tp,LOCATION_GRAVE,0,2,2,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c2956282.distg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) - end -end -function c2956282.disop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsFaceup() or not c:IsRelateToEffect(e) then return end - Duel.NegateActivation(ev) - if re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(eg,REASON_EFFECT) - end -end diff --git a/script/c29587993.lua b/script/c29587993.lua deleted file mode 100644 index cf5e27ca0b..0000000000 --- a/script/c29587993.lua +++ /dev/null @@ -1,43 +0,0 @@ ---霞の谷の巨神鳥 -function c29587993.initial_effect(c) - --Negate - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(29587993,0)) - e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_CHAINING) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c29587993.discon) - e1:SetTarget(c29587993.distg) - e1:SetOperation(c29587993.disop) - c:RegisterEffect(e1) -end -function c29587993.discon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return not c:IsStatus(STATUS_BATTLE_DESTROYED) and not c:IsStatus(STATUS_CHAINING) and Duel.IsChainNegatable(ev) -end -function c29587993.filter(c) - return c:IsFaceup() and c:IsSetCard(0x37) and c:IsAbleToHand() -end -function c29587993.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsControler(tp) and c29587993.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c29587993.filter,tp,LOCATION_ONFIELD,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g=Duel.SelectTarget(tp,c29587993.filter,tp,LOCATION_ONFIELD,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) - end -end -function c29587993.disop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsFacedown() or not tc:IsRelateToEffect(e) then return end - Duel.SendtoHand(tc,nil,REASON_EFFECT) - if not tc:IsLocation(LOCATION_HAND) then return end - Duel.NegateActivation(ev) - if re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(eg,REASON_EFFECT) - end -end diff --git a/script/c29590752.lua b/script/c29590752.lua deleted file mode 100644 index 2f6263cf64..0000000000 --- a/script/c29590752.lua +++ /dev/null @@ -1,62 +0,0 @@ ---剣闘獣オクタビウス -function c29590752.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(29590752,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(c29590752.descon) - e1:SetTarget(c29590752.destg) - e1:SetOperation(c29590752.desop) - c:RegisterEffect(e1) - --discard or return - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(29590752,1)) - e2:SetCategory(CATEGORY_HANDES+CATEGORY_TODECK) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_PHASE+PHASE_BATTLE) - e2:SetRange(LOCATION_MZONE) - e2:SetCondition(c29590752.dcon) - e2:SetTarget(c29590752.dtg) - e2:SetOperation(c29590752.dop) - c:RegisterEffect(e2) -end -function c29590752.descon(e,tp,eg,ep,ev,re,r,rp) - local st=e:GetHandler():GetSummonType() - return st>=(SUMMON_TYPE_SPECIAL+100) and st<(SUMMON_TYPE_SPECIAL+150) -end -function c29590752.desfilter(c) - return c:IsFacedown() and c:GetSequence()~=5 and c:IsDestructable() -end -function c29590752.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_SZONE) and c29590752.desfilter(chkc) end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c29590752.desfilter,tp,LOCATION_SZONE,LOCATION_SZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c29590752.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsFacedown() and tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end -function c29590752.dcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetBattledGroupCount()>0 and Duel.GetTurnPlayer()==tp -end -function c29590752.dtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():GetFlagEffect(29590753)==0 end - e:GetHandler():RegisterFlagEffect(29590753,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_BATTLE,EFFECT_FLAG_OATH,1) - Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,1,tp,0) -end -function c29590752.dop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsFaceup() or not c:IsRelateToEffect(e) then return end - if Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)>0 and Duel.SelectYesNo(tp,aux.Stringid(29590752,2)) then - Duel.DiscardHand(tp,aux.TRUE,1,1,REASON_EFFECT+REASON_DISCARD) - else - Duel.SendtoDeck(c,nil,2,REASON_EFFECT) - end -end diff --git a/script/c29590905.lua b/script/c29590905.lua deleted file mode 100644 index 48d20dd0a1..0000000000 --- a/script/c29590905.lua +++ /dev/null @@ -1,39 +0,0 @@ ---スーパージュニア対決! -function c29590905.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetCondition(c29590905.condition) - e1:SetTarget(c29590905.target) - e1:SetOperation(c29590905.activate) - c:RegisterEffect(e1) -end -function c29590905.condition(e,tp,eg,ep,ev,re,r,rp) - return eg:GetFirst():IsControler(1-tp) -end -function c29590905.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsPosition,tp,LOCATION_MZONE,0,1,nil,POS_FACEUP_DEFENCE) end -end -function c29590905.activate(e,tp,eg,ep,ev,re,r,rp) - local g1=Duel.GetMatchingGroup(Card.IsPosition,tp,0,LOCATION_MZONE,nil,POS_FACEUP_ATTACK) - local g2=Duel.GetMatchingGroup(Card.IsPosition,tp,LOCATION_MZONE,0,nil,POS_FACEUP_DEFENCE) - if g1:GetCount()==0 or g2:GetCount()==0 then return end - local ga=g1:GetMinGroup(Card.GetAttack) - local gd=g2:GetMinGroup(Card.GetDefence) - if ga:GetCount()>1 then - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(29590905,0)) - ga=ga:Select(tp,1,1,nil) - end - if gd:GetCount()>1 then - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(29590905,1)) - gd=gd:Select(tp,1,1,nil) - end - Duel.NegateAttack() - local a=ga:GetFirst() - local d=gd:GetFirst() - if a:IsAttackable() and not a:IsImmuneToEffect(e) and not d:IsImmuneToEffect(e) then - Duel.CalculateDamage(a,d) - Duel.SkipPhase(1-tp,PHASE_BATTLE,RESET_PHASE+PHASE_BATTLE,1) - end -end diff --git a/script/c29612557.lua b/script/c29612557.lua deleted file mode 100644 index 87c2da9d47..0000000000 --- a/script/c29612557.lua +++ /dev/null @@ -1,73 +0,0 @@ ---サイクロン・ブーメラン -function c29612557.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c29612557.target) - e1:SetOperation(c29612557.operation) - c:RegisterEffect(e1) - --Equip limit - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_EQUIP_LIMIT) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetValue(c29612557.eqlimit) - c:RegisterEffect(e2) - --equip effect - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_EQUIP) - e3:SetCode(EFFECT_UPDATE_ATTACK) - e3:SetValue(500) - c:RegisterEffect(e3) - --destroy - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(29612557,0)) - e4:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e4:SetCode(EVENT_LEAVE_FIELD) - e4:SetCondition(c29612557.descon) - e4:SetTarget(c29612557.destg) - e4:SetOperation(c29612557.desop) - c:RegisterEffect(e4) -end -function c29612557.eqlimit(e,c) - return c:IsCode(86188410) -end -function c29612557.filter(c) - return c:IsFaceup() and c:IsCode(86188410) -end -function c29612557.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c29612557.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c29612557.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c29612557.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c29612557.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,e:GetHandler(),tc) - end -end -function c29612557.descon(e,tp,eg,ep,ev,re,r,rp) - local ec=e:GetHandler():GetPreviousEquipTarget() - return e:GetHandler():IsReason(REASON_LOST_TARGET) and ec:IsLocation(LOCATION_GRAVE) - and bit.band(ec:GetReason(),0x41)==0x41 -end -function c29612557.dfilter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable() -end -function c29612557.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local g=Duel.GetMatchingGroup(c29612557.dfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,g:GetCount()*100) -end -function c29612557.desop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c29612557.dfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) - local ct=Duel.Destroy(g,REASON_EFFECT) - Duel.Damage(1-tp,ct*100,REASON_EFFECT) -end diff --git a/script/c29616929.lua b/script/c29616929.lua deleted file mode 100644 index 8f2740f817..0000000000 --- a/script/c29616929.lua +++ /dev/null @@ -1,49 +0,0 @@ ---蟲惑の落とし穴 -function c29616929.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DISABLE+CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_CHAINING) - e1:SetCondition(c29616929.condition) - e1:SetTarget(c29616929.target) - e1:SetOperation(c29616929.activate) - c:RegisterEffect(e1) - if not c29616929.global_check then - c29616929.global_check=true - local ge1=Effect.CreateEffect(c) - ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - ge1:SetCode(EVENT_SPSUMMON_SUCCESS) - ge1:SetOperation(c29616929.checkop) - Duel.RegisterEffect(ge1,0) - end -end -function c29616929.checkop(e,tp,eg,ep,ev,re,r,rp) - local tc=eg:GetFirst() - while tc do - if tc:GetFlagEffect(29616929)==0 then - tc:RegisterFlagEffect(29616929,RESET_PHASE+PHASE_END,0,1) - end - tc=eg:GetNext() - end -end -function c29616929.condition(e,tp,eg,ep,ev,re,r,rp) - local loc=Duel.GetChainInfo(0,CHAININFO_TRIGGERING_LOCATION) - return ep~=tp and loc==LOCATION_MZONE and re:GetHandler():GetFlagEffect(29616929)>0 and Duel.IsChainDisablable(ev) -end -function c29616929.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0) - if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) - end -end -function c29616929.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=re:GetHandler() - if not tc:IsDisabled() then - Duel.NegateEffect(ev) - if tc:IsRelateToEffect(re) then - Duel.Destroy(eg,REASON_EFFECT) - end - end -end diff --git a/script/c29618570.lua b/script/c29618570.lua deleted file mode 100644 index 314d839089..0000000000 --- a/script/c29618570.lua +++ /dev/null @@ -1,35 +0,0 @@ ---グレイ・ウイング -function c29618570.initial_effect(c) - --multiatk - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(29618570,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c29618570.atkcon) - e1:SetCost(c29618570.atkcost) - e1:SetTarget(c29618570.atktg) - e1:SetOperation(c29618570.atkop) - c:RegisterEffect(e1) -end -function c29618570.atkcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsAbleToEnterBP() -end -function c29618570.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) -end -function c29618570.atktg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():GetEffectCount(EFFECT_EXTRA_ATTACK)==0 end -end -function c29618570.atkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_EXTRA_ATTACK) - e1:SetValue(1) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - c:RegisterEffect(e1) - end -end diff --git a/script/c296499.lua b/script/c296499.lua deleted file mode 100644 index 61cf216148..0000000000 --- a/script/c296499.lua +++ /dev/null @@ -1,49 +0,0 @@ ---一族の掟 -function c296499.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c296499.target) - c:RegisterEffect(e1) - --cannot attack - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_CANNOT_ATTACK) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e2:SetTarget(c296499.atktarget) - c:RegisterEffect(e2) - e2:SetLabelObject(e1) - --maintain - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e3:SetCode(EVENT_PHASE+PHASE_STANDBY) - e3:SetRange(LOCATION_SZONE) - e3:SetCountLimit(1) - e3:SetCondition(c296499.mtcon) - e3:SetOperation(c296499.mtop) - c:RegisterEffect(e3) -end -function c296499.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,563) - local rc=Duel.AnnounceRace(tp,1,0xffffff) - e:SetLabel(rc) - e:GetHandler():SetHint(CHINT_RACE,rc) -end -function c296499.atktarget(e,c) - return c:GetRace()==e:GetLabelObject():GetLabel() -end -function c296499.mtcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c296499.mtop(e,tp,eg,ep,ev,re,r,rp) - if Duel.CheckReleaseGroup(tp,Card.IsReleasable,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(296499,0)) then - local g=Duel.SelectReleaseGroup(tp,Card.IsReleasable,1,1,nil) - Duel.Release(g,REASON_COST) - else - Duel.Destroy(e:GetHandler(),REASON_RULE) - end -end diff --git a/script/c29654737.lua b/script/c29654737.lua deleted file mode 100644 index 9d7b5d19c2..0000000000 --- a/script/c29654737.lua +++ /dev/null @@ -1,33 +0,0 @@ ---アマゾネスの鎖使い -function c29654737.initial_effect(c) - --get card - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(29654737,0)) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetCondition(c29654737.condition) - e1:SetCost(c29654737.cost) - e1:SetOperation(c29654737.operation) - c:RegisterEffect(e1) -end -function c29654737.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) - and Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)~=0 -end -function c29654737.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,1500) end - Duel.PayLPCost(tp,1500) -end -function c29654737.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND) - if g:GetCount()>0 then - Duel.ConfirmCards(tp,g) - local tg=g:Filter(Card.IsType,nil,TYPE_MONSTER) - if tg:GetCount()>0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local sg=tg:Select(tp,1,1,nil) - Duel.SendtoHand(sg,tp,REASON_EFFECT) - end - Duel.ShuffleHand(1-tp) - end -end diff --git a/script/c29669359.lua b/script/c29669359.lua deleted file mode 100644 index 90601b8628..0000000000 --- a/script/c29669359.lua +++ /dev/null @@ -1,53 +0,0 @@ ---No.61 ヴォルカザウルス -function c29669359.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,5,2) - c:EnableReviveLimit() - --destroy&damage - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE) - e1:SetDescription(aux.Stringid(29669359,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c29669359.cost) - e1:SetTarget(c29669359.target) - e1:SetOperation(c29669359.operation) - c:RegisterEffect(e1) -end -c29669359.xyz_number=61 -function c29669359.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) - and not e:GetHandler():IsDirectAttacked() end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_OATH) - e1:SetCode(EFFECT_CANNOT_DIRECT_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - e:GetHandler():RegisterEffect(e1) -end -function c29669359.filter(c) - return c:IsFaceup() and c:IsDestructable() -end -function c29669359.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c29669359.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c29669359.filter,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c29669359.filter,tp,0,LOCATION_MZONE,1,1,nil) - local atk=g:GetFirst():GetTextAttack() - if atk<0 then atk=0 end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,atk) -end -function c29669359.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsControler(1-tp) then - local atk=tc:GetTextAttack() - if atk<0 then atk=0 end - if Duel.Destroy(tc,REASON_EFFECT)~=0 then - Duel.Damage(1-tp,atk,REASON_EFFECT) - end - end -end diff --git a/script/c29687169.lua b/script/c29687169.lua deleted file mode 100644 index 2150c39225..0000000000 --- a/script/c29687169.lua +++ /dev/null @@ -1,33 +0,0 @@ ---魔装戦士 アルニス -function c29687169.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(29687169,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetCondition(c29687169.condition) - e1:SetTarget(c29687169.target) - e1:SetOperation(c29687169.operation) - c:RegisterEffect(e1) -end -function c29687169.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) - and Duel.GetAttacker():IsControler(1-tp) -end -function c29687169.filter(c,e,tp) - return c:IsAttackBelow(1500) and c:IsRace(RACE_SPELLCASTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c29687169.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c29687169.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c29687169.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c29687169.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_ATTACK) - end -end diff --git a/script/c29726552.lua b/script/c29726552.lua deleted file mode 100644 index f291c040c2..0000000000 --- a/script/c29726552.lua +++ /dev/null @@ -1,90 +0,0 @@ ---Kumongous, the Sticky String Kaiju -function c29726552.initial_effect(c) - c:SetUniqueOnField(1,0,20000000) - --special summon rule - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetRange(LOCATION_HAND) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_SPSUM_PARAM) - e1:SetTargetRange(POS_FACEUP_ATTACK,1) - e1:SetCondition(c29726552.spcon) - e1:SetOperation(c29726552.spop) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_SPSUMMON_PROC) - e2:SetRange(LOCATION_HAND) - e2:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_SPSUM_PARAM) - e2:SetTargetRange(POS_FACEUP_ATTACK,0) - e2:SetCondition(c29726552.spcon2) - c:RegisterEffect(e2) - --disable - local e3=Effect.CreateEffect(c) - e3:SetCategory(CATEGORY_DISABLE) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_SUMMON_SUCCESS) - e3:SetRange(LOCATION_MZONE) - e3:SetCost(c29726552.cost) - e3:SetTarget(c29726552.target) - e3:SetOperation(c29726552.operation) - c:RegisterEffect(e3) - local e4=e3:Clone() - e4:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e4) -end -function c29726552.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0xd3) -end -function c29726552.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.GetLocationCount(1-tp,LOCATION_MZONE)>-1 - and Duel.IsExistingMatchingCard(Card.IsReleasable,tp,0,LOCATION_MZONE,1,nil) -end -function c29726552.spop(e,tp,eg,ep,ev,re,r,rp,c) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) - local g=Duel.SelectMatchingCard(tp,Card.IsReleasable,tp,0,LOCATION_MZONE,1,1,nil) - Duel.Release(g,REASON_COST) -end -function c29726552.spcon2(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c29726552.cfilter,tp,0,LOCATION_MZONE,1,nil) -end -function c29726552.filter(c,tp) - return c:IsFaceup() and c:GetSummonPlayer()==tp -end -function c29726552.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsCanRemoveCounter(tp,1,1,0x37,2,REASON_COST) end - Duel.RemoveCounter(tp,1,1,0x37,2,REASON_COST) -end -function c29726552.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return eg:IsExists(c29726552.filter,1,nil,1-tp) end - local g=eg:Filter(c29726552.filter,nil,1-tp) - Duel.SetTargetCard(g) -end -function c29726552.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) - local tc=g:GetFirst() - while tc do - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,2) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,2) - tc:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_DISABLE_EFFECT) - e3:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,2) - tc:RegisterEffect(e3) - tc=g:GetNext() - end -end diff --git a/script/c29735721.lua b/script/c29735721.lua deleted file mode 100644 index 42eb4ff390..0000000000 --- a/script/c29735721.lua +++ /dev/null @@ -1,40 +0,0 @@ ---呪術抹消 -function c29735721.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_CHAINING) - e1:SetCondition(c29735721.condition) - e1:SetCost(c29735721.cost) - e1:SetTarget(c29735721.target) - e1:SetOperation(c29735721.activate) - c:RegisterEffect(e1) -end -function c29735721.condition(e,tp,eg,ep,ev,re,r,rp) - return re:IsActiveType(TYPE_SPELL) and re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev) -end -function c29735721.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,2,e:GetHandler()) end - Duel.DiscardHand(tp,Card.IsDiscardable,2,2,REASON_COST+REASON_DISCARD) -end -function c29735721.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) - end -end -function c29735721.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateActivation(ev) - if re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(eg,REASON_EFFECT) - end - Duel.BreakEffect() - local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND+LOCATION_DECK) - Duel.ConfirmCards(tp,g) - local sg=g:Filter(Card.IsCode,nil,re:GetHandler():GetCode()) - Duel.SendtoGrave(sg,REASON_EFFECT) - Duel.ShuffleHand(1-tp) - Duel.ShuffleDeck(1-tp) -end diff --git a/script/c29762407.lua b/script/c29762407.lua deleted file mode 100644 index eb0435d951..0000000000 --- a/script/c29762407.lua +++ /dev/null @@ -1,55 +0,0 @@ ---王家の神殿 -function c29762407.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --Trap activate in set turn - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN) - e2:SetProperty(EFFECT_FLAG_SET_AVAILABLE) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(LOCATION_SZONE,0) - e2:SetCountLimit(1,29762407) - c:RegisterEffect(e2) - --spsummon - local e3=Effect.CreateEffect(c) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetDescription(aux.Stringid(29762407,0)) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_SZONE) - e3:SetCountLimit(1,29762408) - e3:SetCost(c29762407.cost) - e3:SetTarget(c29762407.target) - e3:SetOperation(c29762407.operation) - c:RegisterEffect(e3) -end -function c29762407.cfilter(c) - return c:IsFaceup() and c:IsCode(89194033) and c:IsAbleToGraveAsCost() -end -function c29762407.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() - and Duel.IsExistingMatchingCard(c29762407.cfilter,tp,LOCATION_ONFIELD,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c29762407.cfilter,tp,LOCATION_ONFIELD,0,1,1,nil) - g:AddCard(e:GetHandler()) - Duel.SendtoGrave(g,REASON_COST) -end -function c29762407.filter(c,e,tp) - return (c:IsLocation(LOCATION_HAND+LOCATION_DECK) or c:IsType(TYPE_FUSION)) - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c29762407.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c29762407.filter,tp,0x43,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,0x43) -end -function c29762407.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c29762407.filter,tp,0x43,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c29765339.lua b/script/c29765339.lua deleted file mode 100644 index 8a0b9666c2..0000000000 --- a/script/c29765339.lua +++ /dev/null @@ -1,55 +0,0 @@ ---エレキリム -function c29765339.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0xe),aux.NonTuner(Card.IsRace,RACE_THUNDER),1) - c:EnableReviveLimit() - --direct attack - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DIRECT_ATTACK) - c:RegisterEffect(e1) - --handes - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(29765339,0)) - e2:SetCategory(CATEGORY_REMOVE) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_BATTLE_DAMAGE) - e2:SetCondition(c29765339.condition) - e2:SetTarget(c29765339.target) - e2:SetOperation(c29765339.operation) - c:RegisterEffect(e2) -end -function c29765339.condition(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp and Duel.GetAttackTarget()==nil -end -function c29765339.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_DECK) -end -function c29765339.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_DECK,0,1,1,nil) - local tg=g:GetFirst() - if tg==nil then return end - Duel.Remove(tg,POS_FACEUP,REASON_EFFECT) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetRange(LOCATION_REMOVED) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) - e1:SetCountLimit(1) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,2) - e1:SetCondition(c29765339.thcon) - e1:SetOperation(c29765339.thop) - e1:SetLabel(0) - tg:RegisterEffect(e1) -end -function c29765339.thcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c29765339.thop(e,tp,eg,ep,ev,re,r,rp) - local ct=e:GetLabel() - if ct==1 then - Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,e:GetHandler()) - else e:SetLabel(1) end -end diff --git a/script/c2978414.lua b/script/c2978414.lua deleted file mode 100644 index 2c38f4ede1..0000000000 --- a/script/c2978414.lua +++ /dev/null @@ -1,96 +0,0 @@ ---No.46 神影龍ドラッグルーオン -function c2978414.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsRace,RACE_DRAGON),8,2) - c:EnableReviveLimit() - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(2978414,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE) - e1:SetCondition(c2978414.condition) - e1:SetCost(c2978414.cost) - e1:SetTarget(c2978414.sptg) - e1:SetOperation(c2978414.spop) - c:RegisterEffect(e1) - --control - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(2978414,1)) - e2:SetCategory(CATEGORY_CONTROL) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE) - e2:SetCondition(c2978414.condition) - e2:SetCost(c2978414.cost) - e2:SetTarget(c2978414.cttg) - e2:SetOperation(c2978414.ctop) - c:RegisterEffect(e2) - --effect limit - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(2978414,2)) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE) - e3:SetCondition(c2978414.condition) - e3:SetCost(c2978414.cost) - e3:SetOperation(c2978414.efop) - c:RegisterEffect(e3) -end -c2978414.xyz_number=46 -function c2978414.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)<=1 -end -function c2978414.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c2978414.spfilter(c,e,tp) - return c:IsRace(RACE_DRAGON) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c2978414.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c2978414.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c2978414.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c2978414.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end -function c2978414.ctfilter(c) - return c:IsFaceup() and c:IsRace(RACE_DRAGON) and c:IsControlerCanBeChanged() -end -function c2978414.cttg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c2978414.ctfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c2978414.ctfilter,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) - local g=Duel.SelectTarget(tp,c2978414.ctfilter,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0) -end -function c2978414.ctop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and not Duel.GetControl(tc,tp) then - if not tc:IsImmuneToEffect(e) and tc:IsAbleToChangeControler() then - Duel.Destroy(tc,REASON_EFFECT) - end - end -end -function c2978414.efop(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_TRIGGER) - e1:SetTargetRange(0,LOCATION_MZONE) - e1:SetTarget(c2978414.actfilter) - e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN,1) - Duel.RegisterEffect(e1,tp) -end -function c2978414.actfilter(e,c) - return c:IsRace(RACE_DRAGON) -end diff --git a/script/c29795530.lua b/script/c29795530.lua deleted file mode 100644 index b1ad0b83e5..0000000000 --- a/script/c29795530.lua +++ /dev/null @@ -1,64 +0,0 @@ ---妖怪のいたずら -function c29795530.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,0x1c0) - e1:SetTarget(c29795530.target) - e1:SetOperation(c29795530.activate) - c:RegisterEffect(e1) - --lvdown - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(29795530,0)) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetHintTiming(0,0x1c0) - e2:SetRange(LOCATION_GRAVE) - e2:SetCondition(aux.exccon) - e2:SetCost(c29795530.lvcost) - e2:SetTarget(c29795530.lvtg) - e2:SetOperation(c29795530.lvop) - c:RegisterEffect(e2) -end -function c29795530.filter(c) - return c:IsFaceup() and c:IsLevelAbove(2) -end -function c29795530.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c29795530.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end -end -function c29795530.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c29795530.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - local tc=g:GetFirst() - while tc do - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_LEVEL) - e1:SetValue(-2) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - tc=g:GetNext() - end -end -function c29795530.lvcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) -end -function c29795530.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c29795530.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c29795530.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - local g=Duel.SelectTarget(tp,c29795530.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) -end -function c29795530.lvop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_LEVEL) - e1:SetValue(-1) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - end -end diff --git a/script/c2980764.lua b/script/c2980764.lua deleted file mode 100644 index c3f0dd7b54..0000000000 --- a/script/c2980764.lua +++ /dev/null @@ -1,39 +0,0 @@ ---聖なるあかり -function c2980764.initial_effect(c) - --battle - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_AVOID_BATTLE_DAMAGE) - e1:SetValue(c2980764.tglimit) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e2:SetValue(c2980764.tglimit) - c:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE) - e3:SetRange(LOCATION_MZONE) - e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e3:SetTarget(c2980764.tglimit) - c:RegisterEffect(e3) - --disable spsummon - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_FIELD) - e4:SetRange(LOCATION_MZONE) - e4:SetCode(EFFECT_CANNOT_SUMMON) - e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e4:SetTargetRange(1,1) - e4:SetTarget(c2980764.sumlimit) - c:RegisterEffect(e4) - local e5=e4:Clone() - e5:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - c:RegisterEffect(e5) -end -function c2980764.tglimit(e,c) - return c:IsAttribute(ATTRIBUTE_DARK) -end -function c2980764.sumlimit(e,c) - return c:IsAttribute(ATTRIBUTE_DARK) -end diff --git a/script/c29826127.lua b/script/c29826127.lua deleted file mode 100644 index 0697d5dae5..0000000000 --- a/script/c29826127.lua +++ /dev/null @@ -1,30 +0,0 @@ ---暗黒よりの軍勢 -function c29826127.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c29826127.target) - e1:SetOperation(c29826127.activate) - c:RegisterEffect(e1) -end -function c29826127.filter(c) - return c:IsSetCard(0x6) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() -end -function c29826127.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:GetControler()==tp and chkc:GetLocation()==LOCATION_GRAVE and c29826127.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c29826127.filter,tp,LOCATION_GRAVE,0,2,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c29826127.filter,tp,LOCATION_GRAVE,0,2,2,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,2,0,0) -end -function c29826127.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local sg=g:Filter(Card.IsRelateToEffect,nil,e) - if sg:GetCount()>0 then - Duel.SendtoHand(sg,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,sg) - end -end diff --git a/script/c29834183.lua b/script/c29834183.lua deleted file mode 100644 index d14b4c17d4..0000000000 --- a/script/c29834183.lua +++ /dev/null @@ -1,79 +0,0 @@ ---グレイドル・イーグル -function c29834183.initial_effect(c) - --equip - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCondition(c29834183.eqcon) - e1:SetTarget(c29834183.eqtg) - e1:SetOperation(c29834183.eqop) - c:RegisterEffect(e1) -end -function c29834183.eqcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return (c:IsReason(REASON_BATTLE) or (c:IsReason(REASON_EFFECT) and re:IsActiveType(TYPE_MONSTER))) - and c:IsReason(REASON_DESTROY) and c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_MZONE) -end -function c29834183.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsFaceup() end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil) -end -function c29834183.eqlimit(e,c) - return c==e:GetLabelObject() -end -function c29834183.eqop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsRelateToEffect(e) and tc:IsControler(1-tp) then - Duel.Equip(tp,c,tc,true) - --Add Equip limit - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(c29834183.eqlimit) - e1:SetLabelObject(tc) - c:RegisterEffect(e1) - --control - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_SET_CONTROL) - e2:SetValue(tp) - e2:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e2) - --Destroy - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e3:SetCode(EVENT_LEAVE_FIELD_P) - e3:SetOperation(c29834183.checkop) - e3:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e3) - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE) - e4:SetCode(EVENT_LEAVE_FIELD) - e4:SetOperation(c29834183.desop) - e4:SetReset(RESET_EVENT+0x17e0000) - e4:SetLabelObject(e3) - c:RegisterEffect(e4) - end -end -function c29834183.checkop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsDisabled() then - e:SetLabel(1) - else e:SetLabel(0) end -end -function c29834183.desop(e,tp,eg,ep,ev,re,r,rp) - if e:GetLabelObject():GetLabel()~=0 then return end - local tc=e:GetHandler():GetEquipTarget() - if tc and tc:IsLocation(LOCATION_MZONE) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c29843091.lua b/script/c29843091.lua deleted file mode 100644 index 0ab26ac5e6..0000000000 --- a/script/c29843091.lua +++ /dev/null @@ -1,71 +0,0 @@ ---おジャマトリオ -function c29843091.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_DRAW_PHASE) - e1:SetTarget(c29843091.target) - e1:SetOperation(c29843091.activate) - c:RegisterEffect(e1) -end -function c29843091.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(1-tp,LOCATION_MZONE,tp)>2 - and Duel.IsPlayerCanSpecialSummonMonster(tp,29843092,0xf,0x4011,0,1000,2,RACE_BEAST,ATTRIBUTE_LIGHT,POS_FACEUP_DEFENCE,1-tp) end - Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,3,0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,3,0,0) -end -function c29843091.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(1-tp,LOCATION_MZONE,tp)<3 then return end - if not Duel.IsPlayerCanSpecialSummonMonster(tp,29843092,0xf,0x4011,0,1000,2,RACE_BEAST,ATTRIBUTE_LIGHT,POS_FACEUP_DEFENCE,1-tp) then return end - local g=Group.CreateGroup() - for i=1,3 do - local token=Duel.CreateToken(tp,29843091+i) - if Duel.SpecialSummonStep(token,0,tp,1-tp,false,false,POS_FACEUP_DEFENCE) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UNRELEASABLE_SUM) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(1) - token:RegisterEffect(e1,true) - g:AddCard(token) - end - end - g:KeepAlive() - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_DESTROYED) - e2:SetLabelObject(g) - e2:SetCondition(c29843091.damcon) - e2:SetOperation(c29843091.damop) - Duel.RegisterEffect(e2,tp) - Duel.SpecialSummonComplete() -end -function c29843091.dfilter(c,g) - return g:IsContains(c) -end -function c29843091.damcon(e,tp,eg,ep,ev,re,r,rp) - local g=e:GetLabelObject() - if eg:IsExists(c29843091.dfilter,1,nil,g) then - return true - else - if not g:IsExists(Card.IsLocation,1,nil,LOCATION_MZONE) then - g:DeleteGroup() - e:Reset() - end - return false - end -end -function c29843091.damop(e,tp,eg,ep,ev,re,r,rp) - local g=e:GetLabelObject() - local tc=eg:GetFirst() - while tc do - if g:IsContains(tc) then - Duel.Damage(tc:GetPreviousControler(),300,REASON_EFFECT) - g:RemoveCard(tc) - end - tc=eg:GetNext() - end -end diff --git a/script/c29863101.lua b/script/c29863101.lua deleted file mode 100644 index 1e0325a1b5..0000000000 --- a/script/c29863101.lua +++ /dev/null @@ -1,33 +0,0 @@ ---バスター・テレポート -function c29863101.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c29863101.cost) - e1:SetTarget(c29863101.target) - e1:SetOperation(c29863101.activate) - c:RegisterEffect(e1) -end -function c29863101.filter(c) - return c:IsSetCard(0x104f) and c:IsAbleToDeck() -end -function c29863101.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c29863101.filter,tp,LOCATION_HAND,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectMatchingCard(tp,c29863101.filter,tp,LOCATION_HAND,0,1,1,nil) - Duel.ConfirmCards(1-tp,g) - Duel.SendtoDeck(g,nil,2,REASON_COST) -end -function c29863101.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp,2) end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(2) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2) -end -function c29863101.activate(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end diff --git a/script/c2986553.lua b/script/c2986553.lua deleted file mode 100644 index c16e3f5e7c..0000000000 --- a/script/c2986553.lua +++ /dev/null @@ -1,39 +0,0 @@ ---夜薔薇の騎士 -function c2986553.initial_effect(c) - --cannot be battle target - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(0,LOCATION_MZONE) - e1:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET) - e1:SetValue(c2986553.atlimit) - c:RegisterEffect(e1) - --summon success - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(2986553,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_SUMMON_SUCCESS) - e2:SetTarget(c2986553.sumtg) - e2:SetOperation(c2986553.sumop) - c:RegisterEffect(e2) -end -function c2986553.atlimit(e,c) - return c:IsFaceup() and c:IsRace(RACE_PLANT) -end -function c2986553.filter(c,e,tp) - return c:IsLevelBelow(4) and c:IsRace(RACE_PLANT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c2986553.sumtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c2986553.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c2986553.sumop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c2986553.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c29876529.lua b/script/c29876529.lua deleted file mode 100644 index 9568e5790d..0000000000 --- a/script/c29876529.lua +++ /dev/null @@ -1,45 +0,0 @@ ---闇の閃光 -function c29876529.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,0x1e0) - e1:SetCost(c29876529.cost) - e1:SetTarget(c29876529.target) - e1:SetOperation(c29876529.activate) - c:RegisterEffect(e1) -end -function c29876529.cost(e,tp,eg,ep,ev,re,r,rp,chk) - e:SetLabel(1) - return true -end -function c29876529.costfilter(c) - return c:IsAttribute(ATTRIBUTE_DARK) and c:IsAttackAbove(1500) - and Duel.IsExistingMatchingCard(c29876529.dfilter,0,LOCATION_MZONE,LOCATION_MZONE,1,c) -end -function c29876529.dfilter(c) - return c:IsStatus(STATUS_SPSUMMON_TURN) and c:IsDestructable() -end -function c29876529.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - if e:GetLabel()~=0 then - e:SetLabel(0) - return Duel.CheckReleaseGroup(tp,c29876529.costfilter,1,nil) - else - return Duel.IsExistingMatchingCard(c29876529.dfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) - end - end - if e:GetLabel()==1 then - e:SetLabel(0) - local rg=Duel.SelectReleaseGroup(tp,c29876529.costfilter,1,1,nil) - Duel.Release(rg,REASON_COST) - end - local g=Duel.GetMatchingGroup(c29876529.dfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c29876529.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c29876529.dfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - Duel.Destroy(g,REASON_EFFECT) -end diff --git a/script/c29888389.lua b/script/c29888389.lua deleted file mode 100644 index cf51593a93..0000000000 --- a/script/c29888389.lua +++ /dev/null @@ -1,46 +0,0 @@ ---シャドウ・リチュア -function c29888389.initial_effect(c) - --search - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(29888389,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND) - e1:SetCost(c29888389.cost) - e1:SetTarget(c29888389.target) - e1:SetOperation(c29888389.operation) - c:RegisterEffect(e1) - --ritual level - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_RITUAL_LEVEL) - e2:SetValue(c29888389.rlevel) - c:RegisterEffect(e2) -end -function c29888389.rlevel(e,c) - local lv=e:GetHandler():GetLevel() - if c:IsAttribute(ATTRIBUTE_WATER) then - local clv=c:GetLevel() - return lv*65536+clv - else return lv end -end -function c29888389.cost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsDiscardable() end - Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD) -end -function c29888389.filter(c) - return c:IsSetCard(0x3a) and c:GetType()==TYPE_SPELL+TYPE_RITUAL and c:IsAbleToHand() -end -function c29888389.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chk==0 then return Duel.IsExistingMatchingCard(c29888389.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c29888389.operation(e,tp,eg,ep,ev,re,r,rp,chk) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c29888389.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c29904964.lua b/script/c29904964.lua deleted file mode 100644 index 7393510b94..0000000000 --- a/script/c29904964.lua +++ /dev/null @@ -1,52 +0,0 @@ ---覚醒の暗黒騎士ガイア -function c29904964.initial_effect(c) - --summon with no tribute - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(29904964,0)) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SUMMON_PROC) - e1:SetCondition(c29904964.ntcon) - c:RegisterEffect(e1) - --tohand - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(29904964,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_RELEASE) - e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e2:SetCountLimit(1,29904964) - e2:SetTarget(c29904964.sptg) - e2:SetOperation(c29904964.spop) - c:RegisterEffect(e2) - --ritual material - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_EXTRA_RITUAL_MATERIAL) - e3:SetValue(c29904964.mtval) - c:RegisterEffect(e3) -end -function c29904964.ntcon(e,c,minc) - if c==nil then return true end - local tp=c:GetControler() - return minc==0 and c:GetLevel()>4 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0) -end -function c29904964.spfilter(c,e,tp) - return c:IsSetCard(0xcf) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) - and not c:IsHasEffect(EFFECT_NECRO_VALLEY) -end -function c29904964.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c29904964.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE) -end -function c29904964.spop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c29904964.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end -function c29904964.mtval(e,c) - return c:IsSetCard(0xcf) -end diff --git a/script/c29905795.lua b/script/c29905795.lua deleted file mode 100644 index f1f1e7ab2d..0000000000 --- a/script/c29905795.lua +++ /dev/null @@ -1,33 +0,0 @@ ---魔轟神獣チャワ -function c29905795.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(29905795,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND) - e1:SetTarget(c29905795.tg) - e1:SetOperation(c29905795.op) - c:RegisterEffect(e1) -end -function c29905795.tg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_HAND,0,1,e:GetHandler(),0x35) - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) - end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c29905795.op(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsSetCard,tp,LOCATION_HAND,0,nil,0x35) - if g:GetCount()==0 then return end - if g:GetCount()==1 then - Duel.SendtoGrave(g,REASON_EFFECT+REASON_DISCARD) - else - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) - local sg=g:Select(tp,1,1,e:GetHandler()) - Duel.SendtoGrave(sg,REASON_EFFECT+REASON_DISCARD) - end - if e:GetHandler():IsRelateToEffect(e) then - Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c29929832.lua b/script/c29929832.lua deleted file mode 100644 index 954f0f913e..0000000000 --- a/script/c29929832.lua +++ /dev/null @@ -1,6 +0,0 @@ ---マリン・ビースト -function c29929832.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcCode2(c,93343894,94022093,true,true) -end diff --git a/script/c29934351.lua b/script/c29934351.lua deleted file mode 100644 index 610c2ac163..0000000000 --- a/script/c29934351.lua +++ /dev/null @@ -1,32 +0,0 @@ ---地縛波 -function c29934351.initial_effect(c) - --negate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_CHAINING) - e1:SetCondition(c29934351.condition) - e1:SetTarget(c29934351.target) - e1:SetOperation(c29934351.activate) - c:RegisterEffect(e1) -end -function c29934351.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x21) -end -function c29934351.condition(e,tp,eg,ep,ev,re,r,rp) - return rp~=tp and re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev) - and Duel.IsExistingMatchingCard(c29934351.cfilter,tp,LOCATION_MZONE,0,1,nil) -end -function c29934351.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) - end -end -function c29934351.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateActivation(ev) - if re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(eg,REASON_EFFECT) - end -end diff --git a/script/c29947751.lua b/script/c29947751.lua deleted file mode 100644 index bb3ded7866..0000000000 --- a/script/c29947751.lua +++ /dev/null @@ -1,42 +0,0 @@ ---D・マグネンU -function c29947751.initial_effect(c) - --atk - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET) - e1:SetCondition(c29947751.cona) - e1:SetValue(c29947751.vala) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_CANNOT_DIRECT_ATTACK) - e2:SetCondition(c29947751.cona) - c:RegisterEffect(e2) - --def - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetRange(LOCATION_MZONE) - e3:SetTargetRange(0,LOCATION_MZONE) - e3:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET) - e3:SetCondition(c29947751.cond) - e3:SetValue(c29947751.atlimit) - c:RegisterEffect(e3) -end -function c29947751.cona(e) - return e:GetHandler():IsAttackPos() - and Duel.IsExistingMatchingCard(Card.IsFaceup,e:GetHandler():GetControler(),0,LOCATION_MZONE,1,nil) -end -function c29947751.filter(c,atk) - return c:IsFaceup() and c:GetAttack()>atk -end -function c29947751.vala(e,c) - if c:IsFaceup() then - return Duel.IsExistingMatchingCard(c29947751.filter,c:GetControler(),LOCATION_MZONE,0,1,c,c:GetAttack()) - else return true end -end -function c29947751.cond(e) - return e:GetHandler():IsDefencePos() -end -function c29947751.atlimit(e,c) - return c~=e:GetHandler() -end diff --git a/script/c29981921.lua b/script/c29981921.lua deleted file mode 100644 index 0d5d66678c..0000000000 --- a/script/c29981921.lua +++ /dev/null @@ -1,66 +0,0 @@ ---真六武衆-シエン -function c29981921.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsRace,RACE_WARRIOR),aux.NonTuner(Card.IsSetCard,0x3d),1) - c:EnableReviveLimit() - --negate - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(29981921,0)) - e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCode(EVENT_CHAINING) - e1:SetCondition(c29981921.discon) - e1:SetTarget(c29981921.distg) - e1:SetOperation(c29981921.disop) - c:RegisterEffect(e1) - --Destroy replace - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DESTROY_REPLACE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetTarget(c29981921.desreptg) - e2:SetOperation(c29981921.desrepop) - c:RegisterEffect(e2) -end -function c29981921.discon(e,tp,eg,ep,ev,re,r,rp) - return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) - and ep~=tp and re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev) -end -function c29981921.distg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) - end -end -function c29981921.disop(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateActivation(ev) - if re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(eg,REASON_EFFECT) - end -end -function c29981921.repfilter(c) - return c:IsFaceup() and c:IsSetCard(0x3d) and not c:IsStatus(STATUS_DESTROY_CONFIRMED+STATUS_BATTLE_DESTROYED) -end -function c29981921.desreptg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return not c:IsReason(REASON_REPLACE) and c:IsOnField() and c:IsFaceup() - and Duel.IsExistingMatchingCard(c29981921.repfilter,tp,LOCATION_MZONE,0,1,c) end - if Duel.SelectYesNo(tp,aux.Stringid(29981921,1)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESREPLACE) - local g=Duel.SelectMatchingCard(tp,c29981921.repfilter,tp,LOCATION_MZONE,0,1,1,c) - e:SetLabelObject(g:GetFirst()) - Duel.HintSelection(g) - g:GetFirst():SetStatus(STATUS_DESTROY_CONFIRMED,true) - return true - else return false end -end -function c29981921.desrepop(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetLabelObject() - tc:SetStatus(STATUS_DESTROY_CONFIRMED,false) - Duel.Destroy(tc,REASON_EFFECT+REASON_REPLACE) -end diff --git a/script/c29999161.lua b/script/c29999161.lua deleted file mode 100644 index 3eac69bba6..0000000000 --- a/script/c29999161.lua +++ /dev/null @@ -1,38 +0,0 @@ ---発条の巻き戻し -function c29999161.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_END_PHASE) - e1:SetTarget(c29999161.target) - e1:SetOperation(c29999161.activate) - c:RegisterEffect(e1) -end -function c29999161.filter(c) - return c:IsFaceup() and c:IsSetCard(0x58) and c:IsLevelBelow(4) and c:IsAbleToHand() -end -function c29999161.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c29999161.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c29999161.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g=Duel.SelectTarget(tp,c29999161.filter,tp,LOCATION_MZONE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c29999161.spfilter(c,lv,e,tp) - return c:IsSetCard(0x58) and c:GetLevel()==lv and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c29999161.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() and Duel.SendtoHand(tc,nil,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_HAND) then - Duel.ShuffleHand(tc:GetControler()) - if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c29999161.spfilter,tp,LOCATION_HAND,0,1,1,nil,tc:GetLevel(),e,tp) - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end - end -end diff --git a/script/c30042158.lua b/script/c30042158.lua deleted file mode 100644 index d3c6f5a07c..0000000000 --- a/script/c30042158.lua +++ /dev/null @@ -1,39 +0,0 @@ ---サイバー・ウロボロス -function c30042158.initial_effect(c) - --draw - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(30042158,0)) - e1:SetCategory(CATEGORY_DRAW) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CVAL_CHECK) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_REMOVE) - e1:SetCost(c30042158.cost) - e1:SetTarget(c30042158.target) - e1:SetOperation(c30042158.operation) - e1:SetValue(c30042158.valcheck) - c:RegisterEffect(e1) -end -function c30042158.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - if Duel.GetFlagEffect(tp,30042158)==0 then - Duel.RegisterFlagEffect(tp,30042158,RESET_CHAIN,0,1) - c30042158[0]=Duel.GetMatchingGroupCount(Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,nil) - c30042158[1]=0 - end - return c30042158[0]-c30042158[1]>=1 - end - Duel.DiscardHand(tp,Card.IsAbleToGraveAsCost,1,1,REASON_COST) -end -function c30042158.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(1) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c30042158.operation(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end -function c30042158.valcheck(e) - c30042158[1]=c30042158[1]+1 -end diff --git a/script/c30068120.lua b/script/c30068120.lua deleted file mode 100644 index e417e9f719..0000000000 --- a/script/c30068120.lua +++ /dev/null @@ -1,31 +0,0 @@ ---エッジインプ・シザー -function c30068120.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(30068120,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_GRAVE) - e1:SetCountLimit(1,30068120) - e1:SetCost(c30068120.cost) - e1:SetTarget(c30068120.target) - e1:SetOperation(c30068120.operation) - c:RegisterEffect(e1) -end -function c30068120.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToDeckAsCost,tp,LOCATION_HAND,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectMatchingCard(tp,Card.IsAbleToDeckAsCost,tp,LOCATION_HAND,0,1,1,nil) - Duel.SendtoDeck(g,nil,0,REASON_COST) -end -function c30068120.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c30068120.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP_DEFENCE) - end -end diff --git a/script/c30069398.lua b/script/c30069398.lua deleted file mode 100644 index c57b5660f5..0000000000 --- a/script/c30069398.lua +++ /dev/null @@ -1,44 +0,0 @@ ---アイヴィ・ウォール -function c30069398.initial_effect(c) - --token - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(30069398,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN) - e1:SetType(EFFECT_TYPE_FLIP+EFFECT_TYPE_SINGLE) - e1:SetTarget(c30069398.target) - e1:SetOperation(c30069398.operation) - c:RegisterEffect(e1) -end -function c30069398.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0) -end -function c30069398.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(1-tp,LOCATION_MZONE)<=0 then return end - if not Duel.IsPlayerCanSpecialSummonMonster(tp,30069399,0,0x4011,0,0,1,RACE_PLANT,ATTRIBUTE_EARTH,POS_FACEUP_DEFENCE,1-tp) then return end - local token=Duel.CreateToken(tp,30069399) - if Duel.SpecialSummonStep(token,0,tp,1-tp,false,false,POS_FACEUP_DEFENCE) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_DESTROYED) - e1:SetLabelObject(token) - e1:SetCondition(c30069398.damcon) - e1:SetOperation(c30069398.damop) - Duel.RegisterEffect(e1,tp) - end - Duel.SpecialSummonComplete() -end -function c30069398.damcon(e,tp,eg,ep,ev,re,r,rp) - local tok=e:GetLabelObject() - if eg:IsContains(tok) then - return true - else - if not tok:IsLocation(LOCATION_MZONE) then e:Reset() end - return false - end -end -function c30069398.damop(e,tp,eg,ep,ev,re,r,rp) - local tok=e:GetLabelObject() - Duel.Damage(tok:GetPreviousControler(),300,REASON_EFFECT) -end diff --git a/script/c30079770.lua b/script/c30079770.lua deleted file mode 100644 index b092b48ec9..0000000000 --- a/script/c30079770.lua +++ /dev/null @@ -1,31 +0,0 @@ ---真紅眼の黒炎竜 -function c30079770.initial_effect(c) - aux.EnableDualAttribute(c) - --damage - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_PHASE+PHASE_BATTLE) - e1:SetRange(LOCATION_MZONE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCountLimit(1,30079770) - e1:SetCondition(c30079770.damcon) - e1:SetTarget(c30079770.damtg) - e1:SetOperation(c30079770.damop) - c:RegisterEffect(e1) -end -function c30079770.damcon(e,tp,eg,ep,ev,re,r,rp) - return aux.IsDualState(e) and e:GetHandler():GetBattledGroupCount()>0 -end -function c30079770.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local atk=e:GetHandler():GetBaseAttack() - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,atk) -end -function c30079770.damop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFaceup() and c:IsRelateToEffect(e) then - local atk=c:GetBaseAttack() - Duel.Damage(1-tp,atk,REASON_EFFECT) - end -end diff --git a/script/c30100551.lua b/script/c30100551.lua deleted file mode 100644 index 5709d4766c..0000000000 --- a/script/c30100551.lua +++ /dev/null @@ -1,67 +0,0 @@ ---ライトロード・セイント ミネルバ -function c30100551.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,4,2) - c:EnableReviveLimit() - --discard deck & draw - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DECKDES+CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1,30100551) - e1:SetCost(c30100551.drcost) - e1:SetTarget(c30100551.distg) - e1:SetOperation(c30100551.drop) - c:RegisterEffect(e1) - --discard deck & destroy - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_DECKDES+CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_DESTROYED) - e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e2:SetCountLimit(1,30100552) - e2:SetCondition(c30100551.descon) - e2:SetTarget(c30100551.distg) - e2:SetOperation(c30100551.desop) - c:RegisterEffect(e2) -end -function c30100551.drcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c30100551.distg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,3) end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(3) - Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,3) -end -function c30100551.cfilter(c) - return c:IsSetCard(0x38) and c:IsLocation(LOCATION_GRAVE) -end -function c30100551.drop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.DiscardDeck(p,d,REASON_EFFECT) - local g=Duel.GetOperatedGroup() - local ct=g:FilterCount(c30100551.cfilter,nil) - if ct>0 then - Duel.BreakEffect() - Duel.Draw(tp,ct,REASON_EFFECT) - end -end -function c30100551.descon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsReason(REASON_BATTLE) or (rp~=tp and c:IsReason(REASON_EFFECT) and c:GetPreviousControler()==tp) -end -function c30100551.desop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.DiscardDeck(p,d,REASON_EFFECT) - local g=Duel.GetOperatedGroup() - local ct=g:FilterCount(c30100551.cfilter,nil) - local dg=Duel.GetMatchingGroup(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) - if ct~=0 and dg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(30100551,0)) then - Duel.BreakEffect() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local sdg=dg:Select(tp,1,ct,nil) - Duel.Destroy(sdg,REASON_EFFECT) - end -end diff --git a/script/c30106950.lua b/script/c30106950.lua deleted file mode 100644 index b5d9c1585e..0000000000 --- a/script/c30106950.lua +++ /dev/null @@ -1,93 +0,0 @@ ---炎竜星-シュンゲイ -function c30106950.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(30106950,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCountLimit(1,30106950) - e1:SetCondition(c30106950.condition) - e1:SetTarget(c30106950.target) - e1:SetOperation(c30106950.operation) - c:RegisterEffect(e1) - --synchro effect - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetRange(LOCATION_MZONE) - e2:SetHintTiming(0,TIMING_BATTLE_START+TIMING_BATTLE_END) - e2:SetCountLimit(1) - e2:SetCondition(c30106950.sccon) - e2:SetTarget(c30106950.sctg) - e2:SetOperation(c30106950.scop) - c:RegisterEffect(e2) - -- - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e3:SetCode(EVENT_BE_MATERIAL) - e3:SetCondition(c30106950.atkcon) - e3:SetOperation(c30106950.atkop) - c:RegisterEffect(e3) -end -function c30106950.condition(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE+REASON_EFFECT) - and c:IsPreviousLocation(LOCATION_ONFIELD) and c:GetPreviousControler()==tp -end -function c30106950.filter(c,e,tp) - return c:IsSetCard(0x9e) and not c:IsCode(30106950) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c30106950.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c30106950.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c30106950.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c30106950.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENCE) -end -function c30106950.sccon(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetTurnPlayer()==tp then return false end - local ph=Duel.GetCurrentPhase() - return ph==PHASE_MAIN1 or ph==PHASE_BATTLE or ph==PHASE_MAIN2 -end -function c30106950.mfilter(c) - return c:IsSetCard(0x9e) -end -function c30106950.sctg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local mg=Duel.GetMatchingGroup(c30106950.mfilter,tp,LOCATION_MZONE,0,nil) - return Duel.IsExistingMatchingCard(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,1,nil,nil,mg) - end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function c30106950.scop(e,tp,eg,ep,ev,re,r,rp) - local mg=Duel.GetMatchingGroup(c30106950.mfilter,tp,LOCATION_MZONE,0,nil) - local g=Duel.GetMatchingGroup(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,nil,nil,mg) - if g:GetCount()>0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=g:Select(tp,1,1,nil) - Duel.SynchroSummon(tp,sg:GetFirst(),nil,mg) - end -end -function c30106950.atkcon(e,tp,eg,ep,ev,re,r,rp) - return r==REASON_SYNCHRO -end -function c30106950.atkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local rc=c:GetReasonCard() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(500) - e1:SetReset(RESET_EVENT+0x1fe0000) - rc:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_UPDATE_DEFENCE) - rc:RegisterEffect(e2) -end diff --git a/script/c30123142.lua b/script/c30123142.lua deleted file mode 100644 index 839a96d2ea..0000000000 --- a/script/c30123142.lua +++ /dev/null @@ -1,37 +0,0 @@ ---シンクロ・ストライク -function c30123142.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c30123142.condition) - e1:SetTarget(c30123142.target) - e1:SetOperation(c30123142.activate) - c:RegisterEffect(e1) -end -function c30123142.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end -function c30123142.filter(c) - return c:IsFaceup() and c:GetSummonType()==SUMMON_TYPE_SYNCHRO and c:GetMaterialCount()~=0 -end -function c30123142.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c30123142.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c30123142.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c30123142.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) -end -function c30123142.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and c30123142.filter(tc) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e1:SetValue(tc:GetMaterialCount()*500) - tc:RegisterEffect(e1) - end -end diff --git a/script/c30126992.lua b/script/c30126992.lua deleted file mode 100644 index c720d8795c..0000000000 --- a/script/c30126992.lua +++ /dev/null @@ -1,58 +0,0 @@ ---ライトレイ ディアボロス -function c30126992.initial_effect(c) - c:EnableReviveLimit() - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c30126992.spcon) - c:RegisterEffect(e1) - --negate - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(30126992,0)) - e2:SetCategory(CATEGORY_TODECK) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCost(c30126992.tdcost) - e2:SetTarget(c30126992.tdtg) - e2:SetOperation(c30126992.tdop) - c:RegisterEffect(e2) -end -function c30126992.spcon(e,c) - if c==nil then return true end - if Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)<=0 then return false end - local g=Duel.GetMatchingGroup(Card.IsAttribute,c:GetControler(),LOCATION_GRAVE,0,nil,ATTRIBUTE_LIGHT) - local ct=g:GetClassCount(Card.GetCode) - return ct>4 -end -function c30126992.cfilter(c) - return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsAbleToRemoveAsCost() -end -function c30126992.tdcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c30126992.cfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c30126992.cfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c30126992.filter(c) - return c:IsFacedown() and c:IsAbleToDeck() -end -function c30126992.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and c30126992.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c30126992.filter,tp,0,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectTarget(tp,c30126992.filter,tp,0,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0) -end -function c30126992.tdop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFacedown() then - Duel.ConfirmCards(tp,tc) - local opt=Duel.SelectOption(tp,aux.Stringid(30126992,1),aux.Stringid(30126992,2)) - Duel.SendtoDeck(tc,nil,opt,REASON_EFFECT) - end -end diff --git a/script/c30127518.lua b/script/c30127518.lua deleted file mode 100644 index 1ba51f6ea8..0000000000 --- a/script/c30127518.lua +++ /dev/null @@ -1,36 +0,0 @@ ---落とし大穴 -function c30127518.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOGRAVE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetTarget(c30127518.target) - e1:SetOperation(c30127518.activate) - c:RegisterEffect(e1) -end -function c30127518.cfilter(c,sp,e) - return c:IsFaceup() and c:GetSummonPlayer()==sp and (not e or c:IsRelateToEffect(e)) -end -function c30127518.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return eg:IsExists(c30127518.cfilter,2,nil,1-tp) end - local g=eg:Filter(c30127518.cfilter,nil,1-tp) - Duel.SetTargetCard(g) - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,g:GetCount(),0,0) -end -function c30127518.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(c30127518.cfilter,nil,1-tp,e) - Duel.SendtoGrave(g,REASON_EFFECT) - local exg=Group.CreateGroup() - local g1=Duel.GetOperatedGroup() - local tc=g1:GetFirst() - while tc do - if tc:IsLocation(LOCATION_GRAVE) then - local fg=Duel.GetMatchingGroup(Card.IsCode,tp,0,LOCATION_DECK+LOCATION_HAND,nil,tc:GetCode()) - exg:Merge(fg) - end - tc=g1:GetNext() - end - Duel.BreakEffect() - Duel.SendtoGrave(exg,REASON_EFFECT) -end diff --git a/script/c30155789.lua b/script/c30155789.lua deleted file mode 100644 index 9d505090ef..0000000000 --- a/script/c30155789.lua +++ /dev/null @@ -1,64 +0,0 @@ ---サディスティック・ポーション -function c30155789.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c30155789.target) - e1:SetOperation(c30155789.operation) - c:RegisterEffect(e1) -end -function c30155789.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c30155789.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsLocation(LOCATION_SZONE) then return end - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,c,tc) - c:CancelToGrave() - --draw - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_DAMAGE) - e1:SetRange(LOCATION_SZONE) - e1:SetOperation(c30155789.damop) - e1:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e1) - --Atkup - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(1000) - e2:SetCondition(c30155789.atkcon) - e2:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e2) - --Equip limit - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_EQUIP_LIMIT) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e3:SetValue(c30155789.eqlimit) - e3:SetLabelObject(tc) - e3:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e3) - end -end -function c30155789.eqlimit(e,c) - return c==e:GetLabelObject() -end -function c30155789.atkcon(e) - return e:GetHandler():GetFlagEffect(30155789)~=0 -end -function c30155789.damop(e,tp,eg,ep,ev,re,r,rp) - if bit.band(r,REASON_EFFECT)~=0 and ep~=tp and rp==tp then - e:GetHandler():RegisterFlagEffect(30155789,RESET_EVENT+0x1ff0000+RESET_PHASE+PHASE_END,0,1) - end -end diff --git a/script/c30170981.lua b/script/c30170981.lua deleted file mode 100644 index 46ae2020fa..0000000000 --- a/script/c30170981.lua +++ /dev/null @@ -1,11 +0,0 @@ ---死のメッセージ「H」 -function c30170981.initial_effect(c) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_SSET) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - c:RegisterEffect(e2) -end diff --git a/script/c30190809.lua b/script/c30190809.lua deleted file mode 100644 index 23ccd50480..0000000000 --- a/script/c30190809.lua +++ /dev/null @@ -1,27 +0,0 @@ ---機動砦のギア・ゴーレム -function c30190809.initial_effect(c) - --direct attack - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(30190809,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c30190809.condition) - e1:SetCost(c30190809.cost) - e1:SetOperation(c30190809.operation) - c:RegisterEffect(e1) -end -function c30190809.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()==PHASE_MAIN1 and e:GetHandler():GetEffectCount(EFFECT_DIRECT_ATTACK)==0 -end -function c30190809.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,800) end - Duel.PayLPCost(tp,800) -end -function c30190809.operation(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DIRECT_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e:GetHandler():RegisterEffect(e1) -end diff --git a/script/c3019642.lua b/script/c3019642.lua deleted file mode 100644 index b5aa0c94b2..0000000000 --- a/script/c3019642.lua +++ /dev/null @@ -1,85 +0,0 @@ ---サイバー・ダーク・キール -function c3019642.initial_effect(c) - --equip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(3019642,0)) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c3019642.eqtg) - e1:SetOperation(c3019642.eqop) - c:RegisterEffect(e1) - --damage - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(3019642,1)) - e2:SetCategory(CATEGORY_DAMAGE) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetCode(EVENT_BATTLE_DESTROYING) - e2:SetCondition(c3019642.damcon) - e2:SetTarget(c3019642.damtg) - e2:SetOperation(c3019642.damop) - c:RegisterEffect(e2) -end -function c3019642.filter(c) - return c:IsLevelBelow(3) and c:IsRace(RACE_DRAGON) -end -function c3019642.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c3019642.filter(chkc) end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local g=Duel.SelectTarget(tp,c3019642.filter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0) -end -function c3019642.eqop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsFaceup() and c:IsRelateToEffect(e) and tc and tc:IsRelateToEffect(e) then - local atk=tc:GetTextAttack() - if atk<0 then atk=0 end - if not Duel.Equip(tp,tc,c,false) then return end - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_OWNER_RELATE) - e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(c3019642.eqlimit) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetProperty(EFFECT_FLAG_OWNER_RELATE+EFFECT_FLAG_IGNORE_IMMUNE) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetReset(RESET_EVENT+0x1fe0000) - e2:SetValue(atk) - tc:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_EQUIP) - e3:SetCode(EFFECT_DESTROY_SUBSTITUTE) - e3:SetReset(RESET_EVENT+0x1fe0000) - e3:SetValue(c3019642.repval) - tc:RegisterEffect(e3) - end -end -function c3019642.eqlimit(e,c) - return e:GetOwner()==c -end -function c3019642.repval(e,re,r,rp) - return bit.band(r,REASON_BATTLE)~=0 -end -function c3019642.damcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsRelateToBattle() and c:GetBattleTarget():IsType(TYPE_MONSTER) -end -function c3019642.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(300) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,300) -end -function c3019642.damop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c30208479.lua b/script/c30208479.lua deleted file mode 100644 index bd2e190e0b..0000000000 --- a/script/c30208479.lua +++ /dev/null @@ -1,4 +0,0 @@ ---マジシャン・オブ・ブラックカオス -function c30208479.initial_effect(c) - c:EnableReviveLimit() -end diff --git a/script/c30213599.lua b/script/c30213599.lua deleted file mode 100644 index f4fd93e51d..0000000000 --- a/script/c30213599.lua +++ /dev/null @@ -1,35 +0,0 @@ ---墓守の末裔 -function c30213599.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(30213599,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c30213599.cost) - e1:SetTarget(c30213599.target) - e1:SetOperation(c30213599.operation) - c:RegisterEffect(e1) -end -function c30213599.costfilter(c) - return c:IsFaceup() and c:IsSetCard(0x2e) -end -function c30213599.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,c30213599.costfilter,1,e:GetHandler()) end - local sg=Duel.SelectReleaseGroup(tp,c30213599.costfilter,1,1,e:GetHandler()) - Duel.Release(sg,REASON_COST) -end -function c30213599.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() and chkc:IsDestructable() end - if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,0,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,0,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c30213599.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c30230789.lua b/script/c30230789.lua deleted file mode 100644 index bb432dde02..0000000000 --- a/script/c30230789.lua +++ /dev/null @@ -1,61 +0,0 @@ ---カラクリ商人 壱七七 -function c30230789.initial_effect(c) - --must attack - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_MUST_ATTACK) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_CANNOT_EP) - e2:SetRange(LOCATION_MZONE) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetTargetRange(1,0) - e2:SetCondition(c30230789.becon) - c:RegisterEffect(e2) - --to defence - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(30230789,0)) - e3:SetCategory(CATEGORY_POSITION) - e3:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_SINGLE) - e3:SetCode(EVENT_BE_BATTLE_TARGET) - e3:SetCondition(c30230789.poscon) - e3:SetOperation(c30230789.posop) - c:RegisterEffect(e3) - --search - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(30230789,1)) - e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e4:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_SINGLE) - e4:SetCode(EVENT_SUMMON_SUCCESS) - e4:SetTarget(c30230789.tg) - e4:SetOperation(c30230789.op) - c:RegisterEffect(e4) -end -function c30230789.becon(e) - return e:GetHandler():IsAttackable() -end -function c30230789.poscon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsAttackPos() -end -function c30230789.posop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFaceup() and c:IsRelateToEffect(e) then - Duel.ChangePosition(c,POS_FACEUP_DEFENCE) - end -end -function c30230789.filter(c) - return c:IsSetCard(0x11) and c:IsAbleToHand() -end -function c30230789.tg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c30230789.op(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c30230789.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c30241314.lua b/script/c30241314.lua deleted file mode 100644 index 1ef8813882..0000000000 --- a/script/c30241314.lua +++ /dev/null @@ -1,34 +0,0 @@ ---マクロコスモス -function c30241314.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_DRAW_PHASE) - e1:SetOperation(c30241314.activate) - c:RegisterEffect(e1) - --remove - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_RANGE) - e2:SetRange(LOCATION_SZONE) - e2:SetCode(EFFECT_TO_GRAVE_REDIRECT) - e2:SetTargetRange(0xff,0xff) - e2:SetValue(LOCATION_REMOVED) - c:RegisterEffect(e2) -end -function c30241314.filter(c,e,sp) - return c:GetCode()==54493213 and c:IsCanBeSpecialSummoned(e,0,sp,false,false) -end -function c30241314.activate(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local cg=Duel.GetMatchingGroup(c30241314.filter,tp,LOCATION_DECK+LOCATION_HAND,0,nil,e,tp) - if cg:GetCount()>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then - if Duel.SelectYesNo(tp, aux.Stringid(30241314,0)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=cg:Select(tp,1,1,nil) - Duel.SpecialSummon(sg, 0, tp, tp, false, false, POS_FACEUP) - end - end -end diff --git a/script/c30243636.lua b/script/c30243636.lua deleted file mode 100644 index 5b15f3e9e9..0000000000 --- a/script/c30243636.lua +++ /dev/null @@ -1,4 +0,0 @@ ---ハングリーバーガー -function c30243636.initial_effect(c) - c:EnableReviveLimit() -end diff --git a/script/c3027001.lua b/script/c3027001.lua deleted file mode 100644 index b7c779ca76..0000000000 --- a/script/c3027001.lua +++ /dev/null @@ -1,60 +0,0 @@ ---偽物のわな -function c3027001.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_CHAINING) - e1:SetCondition(c3027001.condition) - e1:SetTarget(c3027001.target) - e1:SetOperation(c3027001.activate) - c:RegisterEffect(e1) -end -function c3027001.cfilter(c,tp) - return c:IsType(TYPE_TRAP) and c:IsControler(tp) -end -function c3027001.condition(e,tp,eg,ep,ev,re,r,rp) - if rp==tp then return false end - local ex,tg,tc=Duel.GetOperationInfo(ev,CATEGORY_DESTROY) - return ex and tg~=nil and tg:GetCount()==tc and tg:IsExists(c3027001.cfilter,1,e:GetHandler(),tp) -end -function c3027001.cffilter(c,tp) - return c:IsFacedown() and c:IsControler(tp) -end -function c3027001.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local ex,tg,tc=Duel.GetOperationInfo(ev,CATEGORY_DESTROY) - local fg=tg:Filter(c3027001.cffilter,nil,tp) - Duel.ConfirmCards(1-tp,fg) - local reg=tg:Filter(c3027001.cfilter,e:GetHandler(),tp) - local tc=reg:GetFirst() - while tc do - tc:RegisterFlagEffect(3027001,RESET_EVENT+0x1fe0000+RESET_CHAIN,0,1) - tc=reg:GetNext() - end -end -function c3027001.activate(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_DESTROY_REPLACE) - e1:SetRange(LOCATION_SZONE) - e1:SetTarget(c3027001.reptg) - e1:SetValue(c3027001.repvalue) - e1:SetOperation(c3027001.repop) - e1:SetLabelObject(re) - e1:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e1) -end -function c3027001.repfilter(c) - return c:GetFlagEffect(3027001)~=0 -end -function c3027001.reptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return re==e:GetLabelObject() and eg:IsExists(c3027001.repfilter,1,nil) end - return true -end -function c3027001.repvalue(e,c) - return c:GetFlagEffect(3027001)~=0 -end -function c3027001.repop(e,tp,eg,ep,ev,re,r,rp) - Duel.Destroy(e:GetHandler(),REASON_EFFECT+REASON_REPLACE) -end diff --git a/script/c30276969.lua b/script/c30276969.lua deleted file mode 100644 index 3f9bc646ae..0000000000 --- a/script/c30276969.lua +++ /dev/null @@ -1,12 +0,0 @@ ---氷弾使いレイス -function c30276969.initial_effect(c) - --indes - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e1:SetValue(c30276969.indes) - c:RegisterEffect(e1) -end -function c30276969.indes(e,c) - return c:IsLevelAbove(4) -end diff --git a/script/c30299166.lua b/script/c30299166.lua deleted file mode 100644 index e64dde8e40..0000000000 --- a/script/c30299166.lua +++ /dev/null @@ -1,40 +0,0 @@ ---ワーム・テンタクルス -function c30299166.initial_effect(c) - --multi atk - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(30299166,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCondition(c30299166.mtcon) - e1:SetCost(c30299166.mtcost) - e1:SetTarget(c30299166.mttg) - e1:SetOperation(c30299166.mtop) - c:RegisterEffect(e1) -end -function c30299166.mtcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsAbleToEnterBP() -end -function c30299166.costfilter(c) - return c:IsSetCard(0x3e) and c:IsRace(RACE_REPTILE) and c:IsAbleToRemoveAsCost() -end -function c30299166.mtcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c30299166.costfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c30299166.costfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c30299166.mttg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():GetEffectCount(EFFECT_EXTRA_ATTACK)==0 end -end -function c30299166.mtop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_EXTRA_ATTACK) - e1:SetValue(1) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - c:RegisterEffect(e1) - end -end diff --git a/script/c3030892.lua b/script/c3030892.lua deleted file mode 100644 index de6491b11c..0000000000 --- a/script/c3030892.lua +++ /dev/null @@ -1,32 +0,0 @@ ---スレイブ・エイプ -function c3030892.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(3030892,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetCondition(c3030892.condition) - e1:SetTarget(c3030892.target) - e1:SetOperation(c3030892.operation) - c:RegisterEffect(e1) -end -function c3030892.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) -end -function c3030892.filter(c,e,tp) - return c:IsLevelBelow(4) and c:IsSetCard(0x19) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c3030892.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c3030892.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c3030892.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g = Duel.SelectMatchingCard(tp,c3030892.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c30312361.lua b/script/c30312361.lua deleted file mode 100644 index cfb3b15547..0000000000 --- a/script/c30312361.lua +++ /dev/null @@ -1,82 +0,0 @@ ---ファントム・オブ・カオス -function c30312361.initial_effect(c) - --copy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(30312361,0)) - e1:SetCategory(CATEGORY_REMOVE) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c30312361.cost) - e1:SetTarget(c30312361.target) - e1:SetOperation(c30312361.operation) - c:RegisterEffect(e1) - --no battle damage - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_NO_BATTLE_DAMAGE) - c:RegisterEffect(e2) -end -function c30312361.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():GetFlagEffect(30312361)==0 end - e:GetHandler():RegisterFlagEffect(30312361,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) -end -function c30312361.filter(c) - return c:IsType(TYPE_EFFECT) and not c:IsForbidden() and c:IsAbleToRemove() -end -function c30312361.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c30312361.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c30312361.filter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,c30312361.filter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) -end -function c30312361.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and c:IsFaceup() and tc:IsRelateToEffect(e) then - if Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)~=1 then return end - local code=tc:GetOriginalCode() - local ba=tc:GetBaseAttack() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - e1:SetCode(EFFECT_CHANGE_CODE) - e1:SetValue(code) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - e2:SetLabelObject(e1) - e2:SetCode(EFFECT_SET_BASE_ATTACK) - e2:SetValue(ba) - c:RegisterEffect(e2) - local cid=c:CopyEffect(code,RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END,1) - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(30312361,1)) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e3:SetCode(EVENT_PHASE+PHASE_END) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e3:SetCountLimit(1) - e3:SetRange(LOCATION_MZONE) - e3:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - e3:SetLabel(cid) - e3:SetLabelObject(e2) - e3:SetOperation(c30312361.rstop) - c:RegisterEffect(e3) - end -end -function c30312361.rstop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local cid=e:GetLabel() - c:ResetEffect(cid,RESET_COPY) - local e2=e:GetLabelObject() - local e1=e2:GetLabelObject() - e1:Reset() - e2:Reset() - Duel.HintSelection(Group.FromCards(c)) - Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) -end diff --git a/script/c30314994.lua b/script/c30314994.lua deleted file mode 100644 index 25b9932fb8..0000000000 --- a/script/c30314994.lua +++ /dev/null @@ -1,35 +0,0 @@ ---エレメント・ドラゴン -function c30314994.initial_effect(c) - --atk - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(500) - e1:SetCondition(c30314994.atkcon) - c:RegisterEffect(e1) - --chain attack - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(30314994,0)) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_BATTLED) - e2:SetCondition(c30314994.atcon) - e2:SetOperation(c30314994.atop) - c:RegisterEffect(e2) -end -function c30314994.filter(c,att) - return c:IsFaceup() and c:IsAttribute(att) -end -function c30314994.atkcon(e) - return Duel.IsExistingMatchingCard(c30314994.filter,0,LOCATION_MZONE,LOCATION_MZONE,1,nil,ATTRIBUTE_FIRE) -end -function c30314994.atcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local bc=c:GetBattleTarget() - return bc and bc:IsStatus(STATUS_BATTLE_DESTROYED) and c:IsChainAttackable() and c:IsStatus(STATUS_OPPO_BATTLE) - and not c:IsDisabled() and Duel.IsExistingMatchingCard(c30314994.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,ATTRIBUTE_WIND) -end -function c30314994.atop(e,tp,eg,ep,ev,re,r,rp) - Duel.ChainAttack() -end diff --git a/script/c30328508.lua b/script/c30328508.lua deleted file mode 100644 index d342ddfd4e..0000000000 --- a/script/c30328508.lua +++ /dev/null @@ -1,55 +0,0 @@ ---シャドール・リザード -function c30328508.initial_effect(c) - --flip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(30328508,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) - e1:SetCountLimit(1,30328508) - e1:SetTarget(c30328508.target) - e1:SetOperation(c30328508.operation) - c:RegisterEffect(e1) - --tograve - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(30328508,1)) - e2:SetCategory(CATEGORY_TOGRAVE) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetCountLimit(1,30328508) - e2:SetCondition(c30328508.tgcon) - e2:SetTarget(c30328508.tgtg) - e2:SetOperation(c30328508.tgop) - c:RegisterEffect(e2) -end -function c30328508.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsDestructable() end - if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c30328508.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end -function c30328508.tgcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsReason(REASON_EFFECT) -end -function c30328508.filter(c) - return c:IsSetCard(0x9d) and not c:IsCode(30328508) and c:IsAbleToGrave() -end -function c30328508.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c30328508.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) -end -function c30328508.tgop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c30328508.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoGrave(g,REASON_EFFECT) - end -end diff --git a/script/c30334522.lua b/script/c30334522.lua deleted file mode 100644 index e00045a258..0000000000 --- a/script/c30334522.lua +++ /dev/null @@ -1,34 +0,0 @@ ---イビリチュア・プシュケローネ -function c30334522.initial_effect(c) - c:EnableReviveLimit() - --confirm - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(30334522,0)) - e1:SetCategory(CATEGORY_TODECK) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetTarget(c30334522.target) - e1:SetOperation(c30334522.operation) - c:RegisterEffect(e1) -end -function c30334522.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)~=0 end - Duel.Hint(HINT_SELECTMSG,tp,563) - local rc=Duel.AnnounceRace(tp,1,0xffffff) - e:SetLabel(rc) - Duel.Hint(HINT_SELECTMSG,tp,562) - local at=Duel.AnnounceAttribute(tp,1,0xffff) - Duel.SetTargetParam(at) -end -function c30334522.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)==0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) - local tc=Duel.GetFieldGroup(tp,0,LOCATION_HAND):RandomSelect(tp,1):GetFirst() - Duel.ConfirmCards(tp,tc) - local rc=e:GetLabel() - local at=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM) - if tc:IsRace(rc) and tc:IsAttribute(at) then - Duel.SendtoDeck(tc,nil,2,REASON_EFFECT) - else Duel.ShuffleHand(1-tp) end -end diff --git a/script/c30338466.lua b/script/c30338466.lua deleted file mode 100644 index df6f207981..0000000000 --- a/script/c30338466.lua +++ /dev/null @@ -1,54 +0,0 @@ ---剣現する武神 -function c30338466.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(30338466,0)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c30338466.target) - e1:SetOperation(c30338466.activate) - c:RegisterEffect(e1) - -- - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(30338466,1)) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetType(EFFECT_TYPE_ACTIVATE) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetTarget(c30338466.target2) - e2:SetOperation(c30338466.activate2) - c:RegisterEffect(e2) -end -function c30338466.filter(c) - return c:IsSetCard(0x88) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() -end -function c30338466.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c30338466.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c30338466.filter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c30338466.filter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c30338466.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end -function c30338466.filter2(c) - return c:IsFaceup() and c:IsSetCard(0x88) and c:IsType(TYPE_MONSTER) -end -function c30338466.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_REMOVED) and c30338466.filter2(chkc) end - if chk==0 then return Duel.IsExistingTarget(c30338466.filter2,tp,LOCATION_REMOVED,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - Duel.SelectTarget(tp,c30338466.filter2,tp,LOCATION_REMOVED,0,1,1,nil) -end -function c30338466.activate2(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoGrave(tc,REASON_EFFECT+REASON_RETURN) - end -end diff --git a/script/c30341772.lua b/script/c30341772.lua deleted file mode 100644 index 038dbebdba..0000000000 --- a/script/c30341772.lua +++ /dev/null @@ -1,46 +0,0 @@ ---ホープ・バスター -function c30341772.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c30341772.condition) - e1:SetTarget(c30341772.target) - e1:SetOperation(c30341772.activate) - c:RegisterEffect(e1) -end -function c30341772.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x7f) -end -function c30341772.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c30341772.cfilter,tp,LOCATION_MZONE,0,1,nil) -end -function c30341772.filter(c) - return c:IsFaceup() and c:IsDestructable() -end -function c30341772.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c30341772.filter,tp,0,LOCATION_MZONE,1,nil) end - local g=Duel.GetMatchingGroup(c30341772.filter,tp,0,LOCATION_MZONE,nil) - local tg=g:GetMinGroup(Card.GetAttack) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,tg,1,0,0) -end -function c30341772.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c30341772.filter,tp,0,LOCATION_MZONE,nil) - if g:GetCount()>0 then - local tc=nil - local tg=g:GetMinGroup(Card.GetAttack) - if tg:GetCount()>1 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local sg=tg:Select(tp,1,1,nil) - Duel.HintSelection(sg) - tc=sg:GetFirst() - else - tc=tg:GetFirst() - end - local atk=tc:GetAttack() - if Duel.Destroy(tc,REASON_EFFECT)>0 then - Duel.Damage(1-tp,atk,REASON_EFFECT) - end - end -end diff --git a/script/c30353551.lua b/script/c30353551.lua deleted file mode 100644 index 2564c8c1f2..0000000000 --- a/script/c30353551.lua +++ /dev/null @@ -1,71 +0,0 @@ ---人海戦術 -function c30353551.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(TIMING_END_PHASE) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(30353551,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetRange(LOCATION_SZONE) - e2:SetCode(EVENT_PHASE+PHASE_END) - e2:SetCountLimit(1) - e2:SetTarget(c30353551.target) - e2:SetOperation(c30353551.operation) - c:RegisterEffect(e2) - if not c30353551.global_check then - c30353551.global_check=true - local ge1=Effect.CreateEffect(c) - ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - ge1:SetCode(EVENT_BATTLED) - ge1:SetOperation(c30353551.checkop) - Duel.RegisterEffect(ge1,0) - local ge2=Effect.CreateEffect(c) - ge2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - ge2:SetCode(EVENT_PHASE_START+PHASE_DRAW) - ge2:SetOperation(c30353551.clear) - Duel.RegisterEffect(ge2,0) - end -end -function c30353551.checkop(e,tp,eg,ep,ev,re,r,rp) - local a=Duel.GetAttacker() - local d=Duel.GetAttackTarget() - if a:IsStatus(STATUS_BATTLE_DESTROYED) and a:IsType(TYPE_NORMAL) and a:IsLevelBelow(2) then - c30353551[a:GetControler()]=c30353551[a:GetControler()]+1 - end - if d and d:IsStatus(STATUS_BATTLE_DESTROYED) and d:IsType(TYPE_NORMAL) and d:IsLevelBelow(2) then - c30353551[d:GetControler()]=c30353551[d:GetControler()]+1 - end -end -function c30353551.clear(e,tp,eg,ep,ev,re,r,rp) - c30353551[0]=0 - c30353551[1]=0 -end -function c30353551.filter(c,e,tp) - return c:IsType(TYPE_NORMAL) and c:IsLevelBelow(2) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c30353551.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return c30353551[tp]~=0 end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,c30353551[tp],tp,LOCATION_DECK) -end -function c30353551.operation(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c30353551.filter,tp,LOCATION_DECK,0,c30353551[tp],c30353551[tp],nil,e,tp) - if g:GetCount()==0 then return end - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ft<=0 then - Duel.SendtoGrave(g,REASON_EFFECT) - elseif ft>=g:GetCount() then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - else - local sg=g:Select(tp,ft,ft,nil) - Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) - g:Sub(sg) - Duel.SendtoGrave(g,REASON_EFFECT) - end -end diff --git a/script/c303660.lua b/script/c303660.lua deleted file mode 100644 index 047101b112..0000000000 --- a/script/c303660.lua +++ /dev/null @@ -1,72 +0,0 @@ ---電脳増幅器 -function c303660.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_CANNOT_DISABLE) - e1:SetTarget(c303660.target) - e1:SetOperation(c303660.operation) - c:RegisterEffect(e1) - --Equip limit - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_EQUIP_LIMIT) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetValue(c303660.eqlimit) - c:RegisterEffect(e2) - --immune - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetCode(EFFECT_IMMUNE_EFFECT) - e3:SetProperty(EFFECT_FLAG_SET_AVAILABLE) - e3:SetRange(LOCATION_SZONE) - e3:SetTargetRange(LOCATION_ONFIELD,LOCATION_ONFIELD) - e3:SetTarget(c303660.etarget) - e3:SetValue(c303660.efilter) - c:RegisterEffect(e3) - --leave - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE) - e4:SetCode(EVENT_LEAVE_FIELD) - e4:SetOperation(c303660.desop) - c:RegisterEffect(e4) - --cannot disable - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_SINGLE) - e5:SetCode(EFFECT_CANNOT_DISABLE) - c:RegisterEffect(e5) -end -function c303660.eqlimit(e,c) - return c:IsCode(77585513) -end -function c303660.filter(c) - return c:IsFaceup() and c:IsCode(77585513) -end -function c303660.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c303660.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c303660.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c303660.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c303660.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,e:GetHandler(),tc) - end -end -function c303660.etarget(e,c) - local ec=e:GetHandler():GetEquipTarget() - return c:IsType(TYPE_TRAP) and ec and c:GetControler()==ec:GetControler() -end -function c303660.efilter(e,re) - return re:GetHandler()==e:GetHandler():GetEquipTarget() -end -function c303660.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetHandler():GetFirstCardTarget() - if tc and tc:IsLocation(LOCATION_MZONE) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c30392583.lua b/script/c30392583.lua deleted file mode 100644 index bd74445ffe..0000000000 --- a/script/c30392583.lua +++ /dev/null @@ -1,33 +0,0 @@ ---聖占術の儀式 -function c30392583.initial_effect(c) - aux.AddRitualProcGreater(c,aux.FilterBoolFunction(Card.IsCode,94997874)) - --to hand - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_GRAVE) - e1:SetCondition(aux.exccon) - e1:SetCost(c30392583.thcost) - e1:SetTarget(c30392583.thtg) - e1:SetOperation(c30392583.thop) - c:RegisterEffect(e1) -end -function c30392583.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) -end -function c30392583.thfilter(c) - return c:IsSetCard(0xcc) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() -end -function c30392583.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c30392583.thfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c30392583.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c30392583.thfilter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c30398342.lua b/script/c30398342.lua deleted file mode 100644 index d5429052f8..0000000000 --- a/script/c30398342.lua +++ /dev/null @@ -1,91 +0,0 @@ ---竜星の具象化 -function c30398342.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e1:SetHintTiming(TIMING_DESTROY) - e1:SetCondition(c30398342.spcon1) - e1:SetTarget(c30398342.sptg1) - e1:SetOperation(c30398342.spop) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(30398342,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_DESTROYED) - e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e2:SetRange(LOCATION_SZONE) - e2:SetCountLimit(1) - e2:SetCondition(c30398342.spcon2) - e2:SetCost(c30398342.spcost) - e2:SetTarget(c30398342.sptg2) - e2:SetOperation(c30398342.spop) - c:RegisterEffect(e2) - -- - local e3=Effect.CreateEffect(c) - e3:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetRange(LOCATION_SZONE) - e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e3:SetTargetRange(1,0) - e3:SetTarget(c30398342.sumlimit) - c:RegisterEffect(e3) -end -function c30398342.spcon1(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetCurrentPhase()~=PHASE_DAMAGE then return true end - local res,teg,tep,tev,tre,tr,trp=Duel.CheckEvent(EVENT_DESTROYED,true) - return res and teg:IsExists(c30398342.cfilter,1,nil,tp) - and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c30398342.filter,tp,LOCATION_DECK,0,1,nil,e,tp) -end -function c30398342.sptg1(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local res,teg,tep,tev,tre,tr,trp=Duel.CheckEvent(EVENT_DESTROYED,true) - if Duel.GetCurrentPhase()==PHASE_DAMAGE - or (res and teg:IsExists(c30398342.cfilter,1,nil,tp) - and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c30398342.filter,tp,LOCATION_DECK,0,1,nil,e,tp) - and Duel.SelectYesNo(tp,aux.Stringid(30398342,1))) then - e:SetCategory(CATEGORY_SPECIAL_SUMMON) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) - e:GetHandler():RegisterFlagEffect(30398342,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) - e:GetHandler():RegisterFlagEffect(0,RESET_CHAIN,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(30398342,2)) - else - e:SetCategory(0) - end -end -function c30398342.cfilter(c,tp) - return c:IsReason(REASON_BATTLE+REASON_EFFECT) - and c:IsPreviousLocation(LOCATION_MZONE) and c:GetPreviousControler()==tp -end -function c30398342.spcon2(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c30398342.cfilter,1,nil,tp) -end -function c30398342.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():GetFlagEffect(30398342)==0 end - e:GetHandler():RegisterFlagEffect(30398342,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) -end -function c30398342.filter(c,e,tp) - return c:IsSetCard(0x9e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c30398342.sptg2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsRelateToEffect(e) - and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c30398342.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c30398342.spop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():GetFlagEffect(30398342)==0 then return end - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c30398342.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end -function c30398342.sumlimit(e,c,sump,sumtype,sumpos,targetp) - return c:IsLocation(LOCATION_EXTRA) and not c:IsType(TYPE_SYNCHRO) -end diff --git a/script/c30399511.lua b/script/c30399511.lua deleted file mode 100644 index 465f35d182..0000000000 --- a/script/c30399511.lua +++ /dev/null @@ -1,28 +0,0 @@ ---ジェネクス・パワー・プランナー -function c30399511.initial_effect(c) - --search - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(30399511,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c30399511.target) - e1:SetOperation(c30399511.operation) - c:RegisterEffect(e1) -end -function c30399511.filter(c) - return c:GetLevel()==3 and c:IsSetCard(0x2) and c:IsType(TYPE_EFFECT) and c:IsAbleToHand() -end -function c30399511.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c30399511.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c30399511.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c30399511.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c30435145.lua b/script/c30435145.lua deleted file mode 100644 index 9f90389695..0000000000 --- a/script/c30435145.lua +++ /dev/null @@ -1,48 +0,0 @@ ---古代の機械工場 -function c30435145.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c30435145.target) - e1:SetOperation(c30435145.operation) - c:RegisterEffect(e1) -end -function c30435145.filter(c,g) - return c:GetLevel()>4 and c:IsSetCard(0x7) and g:CheckWithSumEqual(Card.GetLevel,c:GetLevel()*2,1,99) -end -function c30435145.rfilter(c) - return c:GetLevel()>0 and c:IsSetCard(0x7) and c:IsAbleToRemove() -end -function c30435145.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local rg=Duel.GetMatchingGroup(c30435145.rfilter,tp,LOCATION_GRAVE,0,nil) - return Duel.IsExistingMatchingCard(c30435145.filter,tp,LOCATION_HAND,0,1,nil,rg) - end - Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_GRAVE) -end -function c30435145.operation(e,tp,eg,ep,ev,re,r,rp) - local rg=Duel.GetMatchingGroup(c30435145.rfilter,tp,LOCATION_GRAVE,0,nil) - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(30435145,1)) - local g=Duel.SelectMatchingCard(tp,c30435145.filter,tp,LOCATION_HAND,0,1,1,nil,rg) - local tc=g:GetFirst() - if tc then - Duel.ConfirmCards(1-tp,tc) - Duel.ShuffleHand(tp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local sg=rg:SelectWithSumEqual(tp,Card.GetLevel,tc:GetLevel()*2,1,99) - Duel.Remove(sg,POS_FACEUP,REASON_EFFECT) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetDescription(aux.Stringid(30435145,0)) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SUMMON_PROC) - e1:SetCondition(c30435145.ntcon) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - end -end -function c30435145.ntcon(e,c,minc) - if c==nil then return true end - return minc==0 and c:GetLevel()>4 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 -end diff --git a/script/c30450531.lua b/script/c30450531.lua deleted file mode 100644 index e7bb090541..0000000000 --- a/script/c30450531.lua +++ /dev/null @@ -1,35 +0,0 @@ ---降霊の儀式 -function c30450531.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_END_PHASE) - e1:SetTarget(c30450531.target) - e1:SetOperation(c30450531.activate) - c:RegisterEffect(e1) - --immune to necro valley - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_NECRO_VALLEY_IM) - c:RegisterEffect(e2) -end -function c30450531.filter(c,e,tp) - return c:IsSetCard(0x2e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c30450531.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:GetControler()==tp and chkc:GetLocation()==LOCATION_GRAVE and c30450531.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c30450531.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c30450531.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c30450531.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c30451366.lua b/script/c30451366.lua deleted file mode 100644 index 9483a9a938..0000000000 --- a/script/c30451366.lua +++ /dev/null @@ -1,12 +0,0 @@ ---イリュージョン・シープ -function c30451366.initial_effect(c) - --fusion substitute - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_FUSION_SUBSTITUTE) - e1:SetCondition(c30451366.subcon) - c:RegisterEffect(e1) -end -function c30451366.subcon(e) - return e:GetHandler():IsLocation(LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE) -end diff --git a/script/c30459350.lua b/script/c30459350.lua deleted file mode 100644 index 9d32821876..0000000000 --- a/script/c30459350.lua +++ /dev/null @@ -1,25 +0,0 @@ ---王宮の鉄壁 -function c30459350.initial_effect(c) - --activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_DRAW_PHASE+0x1e0) - c:RegisterEffect(e1) - --cannot remove - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_CANNOT_REMOVE) - e2:SetRange(LOCATION_SZONE) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetTargetRange(1,1) - c:RegisterEffect(e2) - --30459350 chk - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetCode(30459350) - e3:SetRange(LOCATION_SZONE) - e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e3:SetTargetRange(1,1) - c:RegisterEffect(e3) -end diff --git a/script/c30461781.lua b/script/c30461781.lua deleted file mode 100644 index e1b24c6089..0000000000 --- a/script/c30461781.lua +++ /dev/null @@ -1,31 +0,0 @@ ---八汰烏の骸 -function c30461781.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c30461781.target) - e1:SetOperation(c30461781.activate) - c:RegisterEffect(e1) -end -function c30461781.filter(c) - return c:IsType(TYPE_SPIRIT) and c:IsFaceup() -end -function c30461781.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end - local d=1 - if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>1 - and Duel.IsExistingMatchingCard(c30461781.filter,tp,0,LOCATION_MZONE,1,nil) - and Duel.SelectOption(tp,aux.Stringid(30461781,0),aux.Stringid(30461781,1))==1 then - d=2 - end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(d) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,d) -end -function c30461781.activate(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end diff --git a/script/c30464153.lua b/script/c30464153.lua deleted file mode 100644 index 1292bb7001..0000000000 --- a/script/c30464153.lua +++ /dev/null @@ -1,14 +0,0 @@ ---ウミノタウルス -function c30464153.initial_effect(c) - --pierce - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_PIERCE) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetTarget(c30464153.target) - c:RegisterEffect(e1) -end -function c30464153.target(e,c) - return c:IsRace(RACE_FISH+RACE_SEASERPENT+RACE_AQUA) -end diff --git a/script/c30488793.lua b/script/c30488793.lua deleted file mode 100644 index f1d1aba635..0000000000 --- a/script/c30488793.lua +++ /dev/null @@ -1,32 +0,0 @@ ---反発力 -function c30488793.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetCode(EVENT_ATTACK_DISABLED) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCondition(c30488793.condition) - e1:SetTarget(c30488793.target) - e1:SetOperation(c30488793.activate) - c:RegisterEffect(e1) -end -function c30488793.condition(e,tp,eg,ep,ev,re,r,rp) - local a=Duel.GetAttacker() - local t=Duel.GetAttackTarget() - return a:IsLocation(LOCATION_MZONE) and t and t:IsLocation(LOCATION_MZONE) and t:IsPosition(POS_FACEUP_ATTACK) -end -function c30488793.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local a1=Duel.GetAttacker():GetAttack() - local a2=Duel.GetAttackTarget():GetAttack() - local dam=a1-a2 - if dam<0 then dam=-dam end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(dam) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,0,0,1-tp,dam) -end -function c30488793.activate(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c30492798.lua b/script/c30492798.lua deleted file mode 100644 index 0cb1be82eb..0000000000 --- a/script/c30492798.lua +++ /dev/null @@ -1,42 +0,0 @@ ---儀式魔人ディザーズ -function c30492798.initial_effect(c) - --ritual material - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_EXTRA_RITUAL_MATERIAL) - e1:SetValue(1) - c:RegisterEffect(e1) - --become material - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetCode(EVENT_BE_MATERIAL) - e2:SetCondition(c30492798.condition) - e2:SetOperation(c30492798.operation) - c:RegisterEffect(e2) -end -function c30492798.condition(e,tp,eg,ep,ev,re,r,rp) - return r==REASON_RITUAL -end -function c30492798.operation(e,tp,eg,ep,ev,re,r,rp) - local rc=eg:GetFirst() - while rc do - if rc:GetFlagEffect(30492798)==0 then - --immune - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetDescription(aux.Stringid(30492798,0)) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CLIENT_HINT) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_IMMUNE_EFFECT) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(c30492798.efilter) - rc:RegisterEffect(e1,true) - rc:RegisterFlagEffect(30492798,RESET_EVENT+0x1fe0000,0,1) - end - rc=eg:GetNext() - end -end -function c30492798.efilter(e,te) - return te:IsActiveType(TYPE_TRAP) -end diff --git a/script/c30494314.lua b/script/c30494314.lua deleted file mode 100644 index 65659c044a..0000000000 --- a/script/c30494314.lua +++ /dev/null @@ -1,46 +0,0 @@ ---紅血鬼 -function c30494314.initial_effect(c) - --atk - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(30494314,0)) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(c30494314.condition) - e1:SetTarget(c30494314.target) - e1:SetOperation(c30494314.operation) - c:RegisterEffect(e1) -end -function c30494314.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_GRAVE) and re:GetHandler():IsRace(RACE_ZOMBIE) -end -function c30494314.filter(c) - return c:IsFaceup() and c:IsRace(RACE_ZOMBIE) and not c:IsType(TYPE_XYZ) -end -function c30494314.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c30494314.filter(chkc) end - if chk==0 then return Duel.CheckRemoveOverlayCard(tp,1,1,1,REASON_EFFECT) - and Duel.IsExistingTarget(c30494314.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - Duel.SelectTarget(tp,c30494314.filter,tp,LOCATION_MZONE,0,1,1,nil) -end -function c30494314.operation(e,tp,eg,ep,ev,re,r,rp) - if not Duel.RemoveOverlayCard(tp,1,1,1,1,REASON_EFFECT) then return end - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_LEVEL) - e1:SetValue(1) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(300) - e2:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e2) - end -end diff --git a/script/c30500113.lua b/script/c30500113.lua deleted file mode 100644 index 15a05f281d..0000000000 --- a/script/c30500113.lua +++ /dev/null @@ -1,76 +0,0 @@ ---RR-リターン -function c30500113.initial_effect(c) - --activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) - e1:SetCondition(c30500113.condition) - e1:SetTarget(c30500113.target) - e1:SetOperation(c30500113.activate) - c:RegisterEffect(e1) - --search - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_DESTROYED) - e2:SetRange(LOCATION_GRAVE) - e2:SetProperty(EFFECT_FLAG_DELAY) - e2:SetCountLimit(1,30500113) - e2:SetCondition(c30500113.thcon) - e2:SetCost(c30500113.thcost) - e2:SetTarget(c30500113.thtg) - e2:SetOperation(c30500113.thop) - c:RegisterEffect(e2) -end -function c30500113.cfilter1(c,tp) - return c:IsSetCard(0xba) and c:GetPreviousControler()==tp -end -function c30500113.condition(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c30500113.cfilter1,1,nil,tp) -end -function c30500113.filter(c) - return c:IsSetCard(0xba) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() -end -function c30500113.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c30500113.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c30500113.filter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c30500113.filter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c30500113.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end -function c30500113.cfilter2(c,tp) - return c:IsSetCard(0xba) and c:IsReason(REASON_EFFECT) and c:IsPreviousLocation(LOCATION_MZONE) - and c:GetPreviousControler()==tp and c:IsPreviousPosition(POS_FACEUP) -end -function c30500113.thcon(e,tp,eg,ep,ev,re,r,rp) - if eg:IsContains(e:GetHandler()) then return false end - return eg:IsExists(c30500113.cfilter2,1,nil,tp) -end -function c30500113.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) -end -function c30500113.thfilter(c) - return c:IsSetCard(0xba) and c:IsAbleToHand() -end -function c30500113.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c30500113.thfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c30500113.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c30500113.thfilter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c30502181.lua b/script/c30502181.lua deleted file mode 100644 index a9baa1c727..0000000000 --- a/script/c30502181.lua +++ /dev/null @@ -1,66 +0,0 @@ ---ライトロード・レイピア -function c30502181.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c30502181.target) - e1:SetOperation(c30502181.operation) - c:RegisterEffect(e1) - --Atk up - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(700) - c:RegisterEffect(e2) - --Equip limit - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_EQUIP_LIMIT) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e3:SetValue(c30502181.eqlimit) - c:RegisterEffect(e3) - --equip - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e4:SetDescription(aux.Stringid(30502181,0)) - e4:SetCategory(CATEGORY_EQUIP) - e4:SetProperty(EFFECT_FLAG_CARD_TARGET) - e4:SetCode(EVENT_TO_GRAVE) - e4:SetCondition(c30502181.eqcondtion) - e4:SetTarget(c30502181.eqtarget) - e4:SetOperation(c30502181.operation) - c:RegisterEffect(e4) -end -function c30502181.eqlimit(e,c) - return c:IsSetCard(0x38) -end -function c30502181.filter(c) - return c:IsFaceup() and c:IsSetCard(0x38) -end -function c30502181.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:GetLocation()==LOCATION_MZONE and c30502181.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c30502181.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c30502181.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c30502181.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,e:GetHandler(),tc) - end -end -function c30502181.eqcondtion(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetPreviousLocation()==LOCATION_DECK -end -function c30502181.eqtarget(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:GetLocation()==LOCATION_MZONE and chkc:GetControler()==tp and c30502181.filter(chkc) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingTarget(c30502181.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c30502181.filter,tp,LOCATION_MZONE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end diff --git a/script/c30525991.lua b/script/c30525991.lua deleted file mode 100644 index 9a7c0b4297..0000000000 --- a/script/c30525991.lua +++ /dev/null @@ -1,32 +0,0 @@ ---スパルタクァの呪術師 -function c30525991.initial_effect(c) - --recover - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(30525991,0)) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c30525991.con) - e1:SetTarget(c30525991.tg) - e1:SetOperation(c30525991.op) - c:RegisterEffect(e1) -end -function c30525991.cfilter(c) - return c:GetPreviousLocation()==LOCATION_DECK -end -function c30525991.con(e,tp,eg,ep,ev,re,r,rp) - return not eg:IsContains(e:GetHandler()) and eg:IsExists(c30525991.cfilter,1,nil) -end -function c30525991.tg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsRelateToEffect(e) end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(500) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,500) -end -function c30525991.op(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) or e:GetHandler():IsFacedown() then return end - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c30531525.lua b/script/c30531525.lua deleted file mode 100644 index 5af21aa1b1..0000000000 --- a/script/c30531525.lua +++ /dev/null @@ -1,42 +0,0 @@ ---魔の試着部屋 -function c30531525.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c30531525.cost) - e1:SetTarget(c30531525.target) - e1:SetOperation(c30531525.activate) - c:RegisterEffect(e1) -end -function c30531525.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,800) end - Duel.PayLPCost(tp,800) -end -function c30531525.filter(c,e,tp) - return c:IsType(TYPE_NORMAL) and c:IsLevelBelow(3) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c30531525.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c30531525.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end -end -function c30531525.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.ConfirmDecktop(tp,4) - local g=Duel.GetDecktopGroup(tp,4):Filter(c30531525.filter,nil,e,tp) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if g:GetCount()>0 then - if ft<=0 then - Duel.SendtoGrave(g,REASON_EFFECT) - elseif ft>=g:GetCount() then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - else - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=g:Select(tp,ft,ft,nil) - Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) - g:Sub(sg) - Duel.SendtoGrave(g,REASON_EFFECT) - end - end - Duel.ShuffleDeck(tp) -end diff --git a/script/c30548775.lua b/script/c30548775.lua deleted file mode 100644 index efb55388a1..0000000000 --- a/script/c30548775.lua +++ /dev/null @@ -1,45 +0,0 @@ ---ブランチ -function c30548775.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(30548775,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_CARD_TARGET) - e2:SetRange(LOCATION_SZONE) - e2:SetCondition(c30548775.condition) - e2:SetTarget(c30548775.target) - e2:SetOperation(c30548775.operation) - c:RegisterEffect(e2) -end -function c30548775.filter(c) - return c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsReason(REASON_DESTROY) and c:IsType(TYPE_FUSION) - and bit.band(c:GetSummonType(),SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION -end -function c30548775.condition(e,tp,eg,ep,ev,re,r,rp,chk) - return eg:IsExists(c30548775.filter,1,nil) -end -function c30548775.spfilter(c,eg,e,tp) - return c:IsReason(REASON_FUSION) and eg:IsContains(c:GetReasonCard()) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c30548775.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c30548775.spfilter(chkc,eg,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c30548775.spfilter,tp,LOCATION_GRAVE,0,1,nil,eg,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c30548775.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,eg,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c30548775.operation(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c3055837.lua b/script/c3055837.lua deleted file mode 100644 index 73c3b9790e..0000000000 --- a/script/c3055837.lua +++ /dev/null @@ -1,47 +0,0 @@ ---黒板消しの罠 -function c3055837.initial_effect(c) - --reflect - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCategory(CATEGORY_HANDES) - e1:SetCode(EVENT_CHAINING) - e1:SetCondition(c3055837.condition) - e1:SetTarget(c3055837.target) - e1:SetOperation(c3055837.operation) - c:RegisterEffect(e1) -end -function c3055837.condition(e,tp,eg,ep,ev,re,r,rp) - if re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and not re:IsHasType(EFFECT_TYPE_ACTIVATE) then return false end - local ex,cg,ct,cp,cv=Duel.GetOperationInfo(ev,CATEGORY_DAMAGE) - if ex then return true end - ex,cg,ct,cp,cv=Duel.GetOperationInfo(ev,CATEGORY_RECOVER) - if not ex then return false end - if cp~=PLAYER_ALL then return Duel.IsPlayerAffectedByEffect(cp,EFFECT_REVERSE_RECOVER) - else return Duel.IsPlayerAffectedByEffect(0,EFFECT_REVERSE_RECOVER) - or Duel.IsPlayerAffectedByEffect(1,EFFECT_REVERSE_RECOVER) - end -end -function c3055837.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0 end - Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,1-tp,1) -end -function c3055837.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.DiscardHand(1-tp,nil,1,1,REASON_EFFECT+REASON_DISCARD) - local cid=Duel.GetChainInfo(ev,CHAININFO_CHAIN_ID) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CHANGE_DAMAGE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetTargetRange(1,0) - e1:SetLabel(cid) - e1:SetValue(c3055837.refcon) - e1:SetReset(RESET_CHAIN) - Duel.RegisterEffect(e1,tp) -end -function c3055837.refcon(e,re,val,r,rp,rc) - local cc=Duel.GetCurrentChain() - if cc==0 or bit.band(r,REASON_EFFECT)==0 then return end - local cid=Duel.GetChainInfo(0,CHAININFO_CHAIN_ID) - if cid==e:GetLabel() then return 0 - else return val end -end diff --git a/script/c30562585.lua b/script/c30562585.lua deleted file mode 100644 index f2dd614fa9..0000000000 --- a/script/c30562585.lua +++ /dev/null @@ -1,54 +0,0 @@ ---ZERO-MAX -function c30562585.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DESTROY) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c30562585.condition) - e1:SetCost(c30562585.cost) - e1:SetTarget(c30562585.target) - e1:SetOperation(c30562585.activate) - c:RegisterEffect(e1) -end -function c30562585.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)==0 -end -function c30562585.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetCurrentPhase()~=PHASE_MAIN2 end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_BP) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) - e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function c30562585.filter(c,e,tp) - return c:IsSetCard(0xb) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c30562585.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c30562585.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c30562585.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c30562585.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) - local tc=g:GetFirst() - local dg=Duel.GetMatchingGroup(c30562585.dfilter,tp,LOCATION_MZONE,LOCATION_MZONE,tc,tc:GetAttack()) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,dg,dg:GetCount(),0,0) -end -function c30562585.dfilter(c,atk) - return c:IsFaceup() and c:IsDestructable() and c:GetAttack()0 then - Duel.Destroy(dg,REASON_EFFECT) - end - end -end diff --git a/script/c3056267.lua b/script/c3056267.lua deleted file mode 100644 index cd6f68f1cd..0000000000 --- a/script/c3056267.lua +++ /dev/null @@ -1,37 +0,0 @@ ---王座の侵略者 -function c3056267.initial_effect(c) - --flip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(3056267,0)) - e1:SetCategory(CATEGORY_CONTROL) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP) - e1:SetCondition(c3056267.condition) - e1:SetTarget(c3056267.target) - e1:SetOperation(c3056267.operation) - c:RegisterEffect(e1) -end -function c3056267.swapfilter(c) - return c:IsAbleToChangeControler() -end -function c3056267.condition(e) - local ph=Duel.GetCurrentPhase() - return not (ph==PHASE_BATTLE or ph==PHASE_DAMAGE or ph==PHASE_DAMAGE_CAL) -end -function c3056267.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - if chk==0 then return true end - if Duel.IsExistingTarget(c3056267.swapfilter,tp,0,LOCATION_MZONE,1,nil) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) - local mon=Duel.SelectTarget(tp,c3056267.swapfilter,tp,0,LOCATION_MZONE,1,1,nil) - mon:AddCard(e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_CONTROL,mon,2,0,0) - end -end -function c3056267.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - local c=e:GetHandler() - if c:IsRelateToEffect(e) and tc and tc:IsRelateToEffect(e) then - Duel.SwapControl(c,tc) - end -end diff --git a/script/c30575681.lua b/script/c30575681.lua deleted file mode 100644 index 081fea4b7f..0000000000 --- a/script/c30575681.lua +++ /dev/null @@ -1,67 +0,0 @@ ---聖騎士ベディヴィエール -function c30575681.initial_effect(c) - --send to grave - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(30575681,0)) - e1:SetCategory(CATEGORY_TOGRAVE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e1:SetTarget(c30575681.target) - e1:SetOperation(c30575681.operation) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e2) - --equip change - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(30575681,1)) - e3:SetType(EFFECT_TYPE_QUICK_O) - e3:SetCode(EVENT_FREE_CHAIN) - e3:SetRange(LOCATION_MZONE) - e3:SetProperty(EFFECT_FLAG_NO_TURN_RESET+EFFECT_FLAG_CARD_TARGET) - e3:SetCountLimit(1) - e3:SetTarget(c30575681.eqtg) - e3:SetOperation(c30575681.eqop) - c:RegisterEffect(e3) -end -function c30575681.filter(c) - return c:IsType(TYPE_EQUIP) and c:IsSetCard(0x207a) and c:IsAbleToGrave() -end -function c30575681.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c30575681.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) -end -function c30575681.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c30575681.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoGrave(g,REASON_EFFECT) - end -end -function c30575681.eqfilter1(c) - return c:IsSetCard(0x207a) and c:GetEquipTarget() - and Duel.IsExistingTarget(c30575681.eqfilter2,0,LOCATION_MZONE,LOCATION_MZONE,1,c:GetEquipTarget(),c) -end -function c30575681.eqfilter2(c,ec) - return c:IsFaceup() and ec:CheckEquipTarget(c) -end -function c30575681.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - if chk==0 then return Duel.IsExistingTarget(c30575681.eqfilter1,tp,LOCATION_SZONE,LOCATION_SZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - local g1=Duel.SelectTarget(tp,c30575681.eqfilter1,tp,LOCATION_SZONE,LOCATION_SZONE,1,1,nil) - local tc=g1:GetFirst() - e:SetLabelObject(tc) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local g2=Duel.SelectTarget(tp,c30575681.eqfilter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,tc:GetEquipTarget(),tc) -end -function c30575681.eqop(e,tp,eg,ep,ev,re,r,rp) - local ec=e:GetLabelObject() - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local tc=g:GetFirst() - if tc==ec then tc=g:GetNext() end - if ec:IsFaceup() and ec:IsRelateToEffect(e) and ec:CheckEquipTarget(tc) and tc:IsFaceup() and tc:IsRelateToEffect(e) then - Duel.Equip(tp,ec,tc) - end -end diff --git a/script/c30585393.lua b/script/c30585393.lua deleted file mode 100644 index 37d96e6742..0000000000 --- a/script/c30585393.lua +++ /dev/null @@ -1,29 +0,0 @@ ---リボーン・パズル -function c30585393.initial_effect(c) - Duel.EnableGlobalFlag(GLOBALFLAG_DELAYED_QUICKEFFECT) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_DESTROYED) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) - e1:SetTarget(c30585393.target) - e1:SetOperation(c30585393.activate) - c:RegisterEffect(e1) -end -function c30585393.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local tc=eg:GetFirst() - if chkc then return chkc==tc end - if chk==0 then return eg:GetCount()==1 and tc:GetPreviousControler()==tp and tc:IsPreviousLocation(LOCATION_MZONE) - and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and tc:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) and tc:IsReason(REASON_EFFECT) - and tc:IsCanBeEffectTarget(e) and tc:IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetTargetCard(tc) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,tc,1,0,0) -end -function c30585393.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c30587695.lua b/script/c30587695.lua deleted file mode 100644 index 38d7e883dc..0000000000 --- a/script/c30587695.lua +++ /dev/null @@ -1,41 +0,0 @@ ---カブトロン -function c30587695.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(30587695,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetCountLimit(1,30587695) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c30587695.spcost) - e1:SetTarget(c30587695.sptg) - e1:SetOperation(c30587695.spop) - c:RegisterEffect(e1) -end -function c30587695.cfilter(c) - return c:IsFaceup() and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToGraveAsCost() -end -function c30587695.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c30587695.cfilter,tp,LOCATION_ONFIELD,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c30587695.cfilter,tp,LOCATION_ONFIELD,0,1,1,nil) - Duel.SendtoGrave(g,REASON_COST) -end -function c30587695.filter(c,e,tp) - return c:IsLevelBelow(4) and c:IsRace(RACE_INSECT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c30587695.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c30587695.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c30587695.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c30587695.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c30587695.spop(e,tp,eg,ep,ev,re,r,rp,chk) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENCE) - end -end diff --git a/script/c30600344.lua b/script/c30600344.lua deleted file mode 100644 index 83890c5b5f..0000000000 --- a/script/c30600344.lua +++ /dev/null @@ -1,30 +0,0 @@ ---エクシーズ・バースト -function c30600344.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c30600344.condition) - e1:SetTarget(c30600344.target) - e1:SetOperation(c30600344.activate) - c:RegisterEffect(e1) -end -function c30600344.cfilter(c) - return c:IsFaceup() and c:IsRankAbove(6) -end -function c30600344.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c30600344.cfilter,tp,LOCATION_MZONE,0,1,nil) -end -function c30600344.filter(c) - return c:IsFacedown() and c:IsDestructable() -end -function c30600344.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c30600344.filter,tp,0,LOCATION_ONFIELD,1,nil) end - local g=Duel.GetMatchingGroup(c30600344.filter,tp,0,LOCATION_ONFIELD,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c30600344.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c30600344.filter,tp,0,LOCATION_ONFIELD,nil) - Duel.Destroy(g,REASON_EFFECT) -end diff --git a/script/c30604579.lua b/script/c30604579.lua deleted file mode 100644 index 08208117be..0000000000 --- a/script/c30604579.lua +++ /dev/null @@ -1,113 +0,0 @@ ---極神皇トール -function c30604579.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,c30604579.tfilter,aux.NonTuner(nil),2) - c:EnableReviveLimit() - --negate - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(30604579,0)) - e1:SetCategory(CATEGORY_DISABLE) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetTarget(c30604579.distg) - e1:SetOperation(c30604579.disop) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetOperation(c30604579.regop) - c:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(30604579,1)) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_PHASE+PHASE_END) - e3:SetRange(LOCATION_GRAVE) - e3:SetCountLimit(1) - e3:SetCondition(c30604579.spcon) - e3:SetCost(c30604579.spcost) - e3:SetTarget(c30604579.sptg) - e3:SetOperation(c30604579.spop) - c:RegisterEffect(e3) - --damage - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(30604579,2)) - e4:SetCategory(CATEGORY_DAMAGE) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e4:SetCode(EVENT_SPSUMMON_SUCCESS) - e4:SetCondition(c30604579.damcon) - e4:SetTarget(c30604579.damtg) - e4:SetOperation(c30604579.damop) - c:RegisterEffect(e4) -end -function c30604579.tfilter(c) - return c:IsSetCard(0x6042) or c:IsCode(61777313) -end -function c30604579.distg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end -end -function c30604579.disop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil) - local tc=g:GetFirst() - local c=e:GetHandler() - while tc do - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e2) - tc=g:GetNext() - end -end -function c30604579.regop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local pos=c:GetPreviousPosition() - if c:IsReason(REASON_BATTLE) then pos=c:GetBattlePosition() end - if rp~=tp and c:GetPreviousControler()==tp and c:IsReason(REASON_DESTROY) - and c:IsPreviousLocation(LOCATION_ONFIELD) and bit.band(pos,POS_FACEUP)~=0 then - c:RegisterFlagEffect(30604579,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) - end -end -function c30604579.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetFlagEffect(30604579)~=0 -end -function c30604579.cfilter(c) - return c:IsSetCard(0x6042) and c:IsType(TYPE_TUNER) and c:IsAbleToRemoveAsCost() -end -function c30604579.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c30604579.cfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c30604579.cfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c30604579.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,1,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c30604579.spop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - Duel.SpecialSummon(e:GetHandler(),1,tp,tp,false,false,POS_FACEUP) - end -end -function c30604579.damcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+1 -end -function c30604579.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(800) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,800) -end -function c30604579.damop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c30606547.lua b/script/c30606547.lua deleted file mode 100644 index f57e8c5074..0000000000 --- a/script/c30606547.lua +++ /dev/null @@ -1,39 +0,0 @@ ---暗黒の扉 -function c30606547.initial_effect(c) - --activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --cannot attack - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e2:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e2:SetCondition(c30606547.atkcon) - e2:SetTarget(c30606547.atktg) - c:RegisterEffect(e2) - --check - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e3:SetCode(EVENT_ATTACK_ANNOUNCE) - e3:SetRange(LOCATION_SZONE) - e3:SetOperation(c30606547.checkop) - e3:SetLabelObject(e2) - c:RegisterEffect(e3) -end -function c30606547.atkcon(e) - return e:GetHandler():GetFlagEffect(30606547)~=0 -end -function c30606547.atktg(e,c) - return c:GetFieldID()~=e:GetLabel() -end -function c30606547.checkop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():GetFlagEffect(30606547)~=0 then return end - local fid=eg:GetFirst():GetFieldID() - e:GetHandler():RegisterFlagEffect(30606547,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) - e:GetLabelObject():SetLabel(fid) -end diff --git a/script/c30608985.lua b/script/c30608985.lua deleted file mode 100644 index 7cabb23ce7..0000000000 --- a/script/c30608985.lua +++ /dev/null @@ -1,29 +0,0 @@ ---マジカル・アンダーテイカー -function c30608985.initial_effect(c) - --flip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(30608985,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) - e1:SetTarget(c30608985.target) - e1:SetOperation(c30608985.operation) - c:RegisterEffect(e1) -end -function c30608985.spfilter(c,e,tp) - return c:IsRace(RACE_SPELLCASTER) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c30608985.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c30608985.spfilter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c30608985.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c30608985.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,g:GetCount(),0,0) -end -function c30608985.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c30643162.lua b/script/c30643162.lua deleted file mode 100644 index 5b08ab5f10..0000000000 --- a/script/c30643162.lua +++ /dev/null @@ -1,33 +0,0 @@ ---ストライク・ショット -function c30643162.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetTarget(c30643162.target) - e1:SetOperation(c30643162.activate) - c:RegisterEffect(e1) -end -function c30643162.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local tg=Duel.GetAttacker() - if chkc then return chkc==tg end - if chk==0 then return tg:IsControler(tp) and tg:IsOnField() and tg:IsCanBeEffectTarget(e) end - Duel.SetTargetCard(tg) -end -function c30643162.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetAttacker() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(700) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_PIERCE) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e2) - end -end diff --git a/script/c3064425.lua b/script/c3064425.lua deleted file mode 100644 index c95f3ffd4b..0000000000 --- a/script/c3064425.lua +++ /dev/null @@ -1,91 +0,0 @@ ---超重武者装留ビッグバン -function c3064425.initial_effect(c) - --equip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(3064425,0)) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_HAND+LOCATION_MZONE) - e1:SetTarget(c3064425.eqtg) - e1:SetOperation(c3064425.eqop) - c:RegisterEffect(e1) - --negate - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(3064425,1)) - e2:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY+CATEGORY_DAMAGE) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_CHAINING) - e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) - e2:SetRange(LOCATION_GRAVE) - e2:SetCondition(c3064425.negcon) - e2:SetCost(c3064425.negcost) - e2:SetTarget(c3064425.negtg) - e2:SetOperation(c3064425.negop) - c:RegisterEffect(e2) -end -function c3064425.filter(c) - return c:IsFaceup() and c:IsSetCard(0x9a) -end -function c3064425.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c3064425.filter(chkc) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingTarget(c3064425.filter,tp,LOCATION_MZONE,0,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c3064425.filter,tp,LOCATION_MZONE,0,1,1,e:GetHandler()) -end -function c3064425.eqop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) then return end - if c:IsLocation(LOCATION_MZONE) and c:IsFacedown() then return end - local tc=Duel.GetFirstTarget() - if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or tc:GetControler()~=tp or tc:IsFacedown() or not tc:IsRelateToEffect(e) then - Duel.SendtoGrave(c,REASON_EFFECT) - return - end - Duel.Equip(tp,c,tc,true) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(c3064425.eqlimit) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_UPDATE_DEFENCE) - e2:SetValue(1000) - e2:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e2) -end -function c3064425.eqlimit(e,c) - return c:IsSetCard(0x9a) -end -function c3064425.cfilter(c) - return c:IsPosition(POS_FACEUP_DEFENCE) and c:IsSetCard(0x9a) -end -function c3064425.negcon(e,tp,eg,ep,ev,re,r,rp) - local ph=Duel.GetCurrentPhase() - return ep~=tp and Duel.IsChainNegatable(ev) and ph>PHASE_MAIN1 and ph0 then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(ct*100) - e1:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e1) - end -end diff --git a/script/c30653113.lua b/script/c30653113.lua deleted file mode 100644 index 6887d233c8..0000000000 --- a/script/c30653113.lua +++ /dev/null @@ -1,37 +0,0 @@ ---ナイルの恵み -function c30653113.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --recover - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(30653113,0)) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetCategory(CATEGORY_RECOVER) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetRange(LOCATION_SZONE) - e2:SetCondition(c30653113.condition) - e2:SetTarget(c30653113.target) - e2:SetOperation(c30653113.operation) - c:RegisterEffect(e2) -end -function c30653113.cfilter(c,tp) - return c:IsPreviousLocation(LOCATION_HAND) and c:IsControler(tp) and c:IsReason(REASON_EFFECT) and c:IsReason(REASON_DISCARD) -end -function c30653113.condition(e,tp,eg,ep,ev,re,r,rp) - return rp~=tp and eg:IsExists(c30653113.cfilter,1,nil,tp) -end -function c30653113.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsRelateToEffect(e) end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(1000) - Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,1000) -end -function c30653113.operation(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Recover(p,d,REASON_EFFECT) -end diff --git a/script/c30683373.lua b/script/c30683373.lua deleted file mode 100644 index 9ff3195ae3..0000000000 --- a/script/c30683373.lua +++ /dev/null @@ -1,28 +0,0 @@ ---シールドクラッシュ -function c30683373.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c30683373.target) - e1:SetOperation(c30683373.activate) - c:RegisterEffect(e1) -end -function c30683373.filter(c) - return not c:IsAttackPos() and c:IsDestructable() -end -function c30683373.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:GetLocation()==LOCATION_MZONE and c30683373.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c30683373.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c30683373.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c30683373.activate(e) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c3070049.lua b/script/c3070049.lua deleted file mode 100644 index 8bc7946909..0000000000 --- a/script/c3070049.lua +++ /dev/null @@ -1,22 +0,0 @@ ---スノー・ドラゴン -function c3070049.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(3070049,0)) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCondition(c3070049.condition) - e1:SetOperation(c3070049.operation) - c:RegisterEffect(e1) -end -function c3070049.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsReason(REASON_DESTROY) -end -function c3070049.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - local tc=g:GetFirst() - while tc do - tc:AddCounter(0x15,1,REASON_EFFECT) - tc=g:GetNext() - end -end diff --git a/script/c30707994.lua b/script/c30707994.lua deleted file mode 100644 index 163ef73b15..0000000000 --- a/script/c30707994.lua +++ /dev/null @@ -1,33 +0,0 @@ ---マキシマム・シックス -function c30707994.initial_effect(c) - --dice - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(30707994,0)) - e1:SetCategory(CATEGORY_DICE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetCondition(c30707994.condition) - e1:SetTarget(c30707994.target) - e1:SetOperation(c30707994.operation) - c:RegisterEffect(e1) -end -function c30707994.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_ADVANCE -end -function c30707994.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DICE,nil,0,tp,1) -end -function c30707994.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - local dice=Duel.TossDice(tp,1) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetProperty(EFFECT_FLAG_COPY_INHERIT) - e1:SetReset(RESET_EVENT+0x1ff0000) - e1:SetValue(dice*200) - c:RegisterEffect(e1) - end -end diff --git a/script/c3072077.lua b/script/c3072077.lua deleted file mode 100644 index cc9a36e5af..0000000000 --- a/script/c3072077.lua +++ /dev/null @@ -1,31 +0,0 @@ ---リターン・ゾンビ -function c3072077.initial_effect(c) - --to hand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(3072077,0)) - e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_FIELD) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) - e1:SetRange(LOCATION_GRAVE) - e1:SetCondition(c3072077.condition) - e1:SetCost(c3072077.cost) - e1:SetTarget(c3072077.target) - e1:SetOperation(c3072077.operation) - c:RegisterEffect(e1) -end -function c3072077.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp and Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)==0 -end -function c3072077.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,500) end - Duel.PayLPCost(tp,500) -end -function c3072077.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToHand() end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0) -end -function c3072077.operation(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT) - end -end diff --git a/script/c3072808.lua b/script/c3072808.lua deleted file mode 100644 index ffc14e2919..0000000000 --- a/script/c3072808.lua +++ /dev/null @@ -1,54 +0,0 @@ ---BF-天狗風のヒレン -function c3072808.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(3072808,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_BATTLE_DAMAGE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_GRAVE) - e1:SetCountLimit(1,3072808+EFFECT_COUNT_CODE_DUEL) - e1:SetCondition(c3072808.condition) - e1:SetTarget(c3072808.target) - e1:SetOperation(c3072808.operation) - c:RegisterEffect(e1) -end -function c3072808.condition(e,tp,eg,ep,ev,re,r,rp) - return ep==tp and ev>=2000 and Duel.GetAttackTarget()==nil -end -function c3072808.filter(c,e,tp) - return c:IsLevelBelow(3) and c:IsSetCard(0x33) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c3072808.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c3072808.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>1 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) - and Duel.IsExistingTarget(c3072808.filter,tp,LOCATION_GRAVE,0,1,e:GetHandler(),e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c3072808.filter,tp,LOCATION_GRAVE,0,1,1,e:GetHandler(),e,tp) - g:AddCard(e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,2,0,0) -end -function c3072808.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - local c=e:GetHandler() - if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 then return end - if not c:IsRelateToEffect(e) or not c:IsCanBeSpecialSummoned(e,0,tp,false,false) then return end - if not tc:IsRelateToEffect(e) or not tc:IsCanBeSpecialSummoned(e,0,tp,false,false) then return end - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0xfe0000) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_DISABLE_EFFECT) - c:RegisterEffect(e2) - local e3=e1:Clone() - tc:RegisterEffect(e3) - local e4=e2:Clone() - tc:RegisterEffect(e4) - Duel.SpecialSummonStep(c,0,tp,tp,false,false,POS_FACEUP) - Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) - Duel.SpecialSummonComplete() -end diff --git a/script/c30741334.lua b/script/c30741334.lua deleted file mode 100644 index a0db41e83c..0000000000 --- a/script/c30741334.lua +++ /dev/null @@ -1,43 +0,0 @@ ---熱血指導王ジャイアントレーナー -function c30741334.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,8,3) - c:EnableReviveLimit() - --draw - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DRAW+CATEGORY_DAMAGE) - e1:SetDescription(aux.Stringid(30741334,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(3,30741334) - e1:SetCost(c30741334.cost) - e1:SetTarget(c30741334.target) - e1:SetOperation(c30741334.operation) - c:RegisterEffect(e1) -end -function c30741334.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetCurrentPhase()==PHASE_MAIN1 - and e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_BP) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) - e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function c30741334.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c30741334.operation(e,tp,eg,ep,ev,re,r,rp,chk) - local ct=Duel.Draw(tp,1,REASON_EFFECT) - if ct==0 then return end - local dc=Duel.GetOperatedGroup():GetFirst() - Duel.ConfirmCards(1-tp,dc) - if dc:IsType(TYPE_MONSTER) then - Duel.Damage(1-tp,800,REASON_EFFECT) - end - Duel.ShuffleHand(tp) -end diff --git a/script/c30757396.lua b/script/c30757396.lua deleted file mode 100644 index 35a3ce20a4..0000000000 --- a/script/c30757396.lua +++ /dev/null @@ -1,58 +0,0 @@ ---ブラッド・メフィスト -function c30757396.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1) - c:EnableReviveLimit() - --damage - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(30757396,0)) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCondition(c30757396.damcon) - e1:SetTarget(c30757396.damtg) - e1:SetOperation(c30757396.damop) - c:RegisterEffect(e1) - --damage - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(30757396,0)) - e2:SetCategory(CATEGORY_DAMAGE) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetCode(EVENT_SSET) - e2:SetRange(LOCATION_MZONE) - e2:SetCondition(c30757396.damcon2) - e2:SetTarget(c30757396.damtg2) - e2:SetOperation(c30757396.damop2) - c:RegisterEffect(e2) -end -function c30757396.damcon(e,tp,eg,ep,ev,re,r,rp) - return tp~=Duel.GetTurnPlayer() -end -function c30757396.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local ct=Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD) - Duel.SetTargetPlayer(1-tp) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,ct*300) -end -function c30757396.damop(e,tp,eg,ep,ev,re,r,rp) - local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) - local ct=Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD) - Duel.Damage(p,ct*300,REASON_EFFECT) -end -function c30757396.damcon2(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(Card.IsControler,1,nil,1-tp) -end -function c30757396.damtg2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(300) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,300) -end -function c30757396.damop2(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c30770156.lua b/script/c30770156.lua deleted file mode 100644 index 69a52ded54..0000000000 --- a/script/c30770156.lua +++ /dev/null @@ -1,39 +0,0 @@ ---コア転送ユニット -function c30770156.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --search - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(30770156,0)) - e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_SZONE) - e2:SetCountLimit(1) - e2:SetCost(c30770156.cost) - e2:SetTarget(c30770156.target) - e2:SetOperation(c30770156.operation) - c:RegisterEffect(e2) -end -function c30770156.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) -end -function c30770156.filter(c) - return c:IsCode(36623431) and c:IsAbleToHand() -end -function c30770156.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c30770156.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c30770156.operation(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c30770156.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c30778711.lua b/script/c30778711.lua deleted file mode 100644 index eaaa86275c..0000000000 --- a/script/c30778711.lua +++ /dev/null @@ -1,13 +0,0 @@ ---シャドウ・グール -function c30778711.initial_effect(c) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(c30778711.value) - c:RegisterEffect(e1) -end -function c30778711.value(e,c) - return Duel.GetMatchingGroupCount(Card.IsType,c:GetControler(),LOCATION_GRAVE,0,nil,TYPE_MONSTER)*100 -end diff --git a/script/c3078576.lua b/script/c3078576.lua deleted file mode 100644 index 25290a6a42..0000000000 --- a/script/c3078576.lua +++ /dev/null @@ -1,77 +0,0 @@ ---八汰烏 -function c3078576.initial_effect(c) - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(aux.FALSE) - c:RegisterEffect(e1) - --summon,flip - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(3078576,0)) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetCode(EVENT_SUMMON_SUCCESS) - e2:SetOperation(c3078576.retreg) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EVENT_FLIP) - c:RegisterEffect(e3) - --skip draw - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(3078576,1)) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e4:SetCode(EVENT_BATTLE_DAMAGE) - e4:SetCondition(c3078576.skipcon) - e4:SetOperation(c3078576.skipop) - c:RegisterEffect(e4) -end -function c3078576.skipcon(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp -end -function c3078576.skipop(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetTargetRange(0,1) - e1:SetCode(EFFECT_SKIP_DP) - e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN) - Duel.RegisterEffect(e1,tp) -end -function c3078576.retreg(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - --to hand - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetDescription(aux.Stringid(3078576,0)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetReset(RESET_EVENT+0x1ee0000+RESET_PHASE+PHASE_END) - e1:SetCondition(c3078576.retcon) - e1:SetTarget(c3078576.rettg) - e1:SetOperation(c3078576.retop) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - c:RegisterEffect(e2) -end -function c3078576.retcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsHasEffect(EFFECT_SPIRIT_DONOT_RETURN) then return false end - if e:IsHasType(EFFECT_TYPE_TRIGGER_F) then - return not c:IsHasEffect(EFFECT_SPIRIT_MAYNOT_RETURN) - else return c:IsHasEffect(EFFECT_SPIRIT_MAYNOT_RETURN) end -end -function c3078576.rettg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0) -end -function c3078576.retop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - Duel.SendtoHand(c,nil,REASON_EFFECT) - end -end diff --git a/script/c30794966.lua b/script/c30794966.lua deleted file mode 100644 index a75bbb813b..0000000000 --- a/script/c30794966.lua +++ /dev/null @@ -1,59 +0,0 @@ ---聖刻龍-ウシルドラゴン -function c30794966.initial_effect(c) - --spsummon from hand - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetRange(LOCATION_HAND) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetCondition(c30794966.hspcon) - e1:SetOperation(c30794966.hspop) - c:RegisterEffect(e1) - --destroy replace - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DESTROY_REPLACE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetTarget(c30794966.desreptg) - e2:SetOperation(c30794966.desrepop) - c:RegisterEffect(e2) -end -function c30794966.rfilter1(c,tp) - return c:IsRace(RACE_DRAGON) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsAbleToRemoveAsCost() - and Duel.IsExistingMatchingCard(c30794966.rfilter2,tp,LOCATION_GRAVE,0,1,c) -end -function c30794966.rfilter2(c) - return c:IsRace(RACE_DRAGON) and c:IsType(TYPE_NORMAL) and c:IsAbleToRemoveAsCost() -end -function c30794966.hspcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c30794966.rfilter1,tp,LOCATION_GRAVE,0,1,nil,tp) -end -function c30794966.hspop(e,tp,eg,ep,ev,re,r,rp,c) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g1=Duel.SelectMatchingCard(tp,c30794966.rfilter1,tp,LOCATION_GRAVE,0,1,1,nil,tp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g2=Duel.SelectMatchingCard(tp,c30794966.rfilter2,tp,LOCATION_GRAVE,0,1,1,g1:GetFirst()) - g1:Merge(g2) - Duel.Remove(g1,POS_FACEUP,REASON_COST) -end -function c30794966.repfilter(c) - return c:IsFaceup() and c:IsSetCard(0x69) and not c:IsStatus(STATUS_DESTROY_CONFIRMED) -end -function c30794966.desreptg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return Duel.CheckReleaseGroup(tp,c30794966.repfilter,1,c) end - if Duel.SelectYesNo(tp,aux.Stringid(30794966,0)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESREPLACE) - local g=Duel.SelectReleaseGroup(tp,c30794966.repfilter,1,1,c) - e:SetLabelObject(g:GetFirst()) - return true - else return false end -end -function c30794966.desrepop(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetLabelObject() - Duel.Release(tc,REASON_EFFECT) -end diff --git a/script/c30811116.lua b/script/c30811116.lua deleted file mode 100644 index 83a432de6d..0000000000 --- a/script/c30811116.lua +++ /dev/null @@ -1,93 +0,0 @@ ---幻獣機レイステイルス -function c30811116.initial_effect(c) - --level - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_UPDATE_LEVEL) - e1:SetValue(c30811116.lvval) - c:RegisterEffect(e1) - -- - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e2:SetCondition(c30811116.indcon) - e2:SetValue(1) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - c:RegisterEffect(e3) - --token - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(30811116,0)) - e4:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e4:SetCode(EVENT_BATTLE_DAMAGE) - e4:SetCondition(c30811116.spcon) - e4:SetTarget(c30811116.sptg) - e4:SetOperation(c30811116.spop) - c:RegisterEffect(e4) - --destroy - local e5=Effect.CreateEffect(c) - e5:SetDescription(aux.Stringid(30811116,1)) - e5:SetCategory(CATEGORY_DESTROY) - e5:SetType(EFFECT_TYPE_IGNITION) - e5:SetRange(LOCATION_MZONE) - e5:SetProperty(EFFECT_FLAG_CARD_TARGET) - e5:SetCountLimit(1) - e5:SetCost(c30811116.descost) - e5:SetTarget(c30811116.destg) - e5:SetOperation(c30811116.desop) - c:RegisterEffect(e5) -end -function c30811116.lvval(e,c) - local tp=c:GetControler() - local lv=0 - for i=0,4 do - local tc=Duel.GetFieldCard(tp,LOCATION_MZONE,i) - if tc and tc:IsCode(31533705) then lv=lv+tc:GetLevel() end - end - return lv -end -function c30811116.indcon(e) - return Duel.IsExistingMatchingCard(Card.IsType,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil,TYPE_TOKEN) -end -function c30811116.spcon(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp -end -function c30811116.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0) -end -function c30811116.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - if Duel.IsPlayerCanSpecialSummonMonster(tp,31533705,0x101b,0x4011,0,0,3,RACE_MACHINE,ATTRIBUTE_WIND) then - local token=Duel.CreateToken(tp,30811117) - Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP) - end -end -function c30811116.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsType,1,nil,TYPE_TOKEN) end - local g=Duel.SelectReleaseGroup(tp,Card.IsType,1,1,nil,TYPE_TOKEN) - Duel.Release(g,REASON_COST) -end -function c30811116.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable() -end -function c30811116.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and c30811116.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c30811116.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c30811116.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c30811116.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c30834988.lua b/script/c30834988.lua deleted file mode 100644 index 0daa787e34..0000000000 --- a/script/c30834988.lua +++ /dev/null @@ -1,64 +0,0 @@ ---召喚制限-猛突するモンスター -function c30834988.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_DRAW_PHASE) - c:RegisterEffect(e1) - --pos - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(30834988,0)) - e2:SetCategory(CATEGORY_POSITION) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetRange(LOCATION_SZONE) - e2:SetTarget(c30834988.target) - e2:SetOperation(c30834988.operation) - c:RegisterEffect(e2) - -- - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetCode(EFFECT_CANNOT_EP) - e3:SetRange(LOCATION_SZONE) - e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e3:SetTargetRange(1,1) - e3:SetCondition(c30834988.epcon) - c:RegisterEffect(e3) -end -function c30834988.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsRelateToEffect(e) end - Duel.SetTargetCard(eg) - Duel.SetOperationInfo(0,CATEGORY_POSITION,eg,eg:GetCount(),0,0) -end -function c30834988.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) then return end - local g=eg:Filter(Card.IsRelateToEffect,nil,e) - Duel.ChangePosition(g,POS_FACEUP_ATTACK) - local tc=g:GetFirst() - while tc do - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_MUST_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - tc=g:GetNext() - end - if Duel.GetFlagEffect(tp,30834988)==0 then - Duel.RegisterFlagEffect(tp,30834988,RESET_PHASE+PHASE_END,0,1) - e:SetLabel(0) - else - local count=e:GetLabel() - e:SetLabel(count+1) - if count>49 then - Duel.SendtoGrave(c,REASON_RULE) - end - end -end -function c30834988.epfilter(c) - return c:IsHasEffect(EFFECT_MUST_ATTACK) and c:IsAttackable() -end -function c30834988.epcon(e) - return Duel.IsExistingMatchingCard(c30834988.epfilter,Duel.GetTurnPlayer(),LOCATION_MZONE,0,1,nil) -end diff --git a/script/c30845999.lua b/script/c30845999.lua deleted file mode 100644 index 4ce80f32de..0000000000 --- a/script/c30845999.lua +++ /dev/null @@ -1,60 +0,0 @@ ---起動する機殻 -function c30845999.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c30845999.condition) - e1:SetTarget(c30845999.target) - e1:SetOperation(c30845999.activate) - c:RegisterEffect(e1) -end -function c30845999.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end -function c30845999.filter(c) - return c:IsFaceup() and c:IsSetCard(0xaa) and bit.band(c:GetSummonType(),SUMMON_TYPE_NORMAL)==SUMMON_TYPE_NORMAL -end -function c30845999.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c30845999.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end -end -function c30845999.activate(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local g=Duel.GetMatchingGroup(c30845999.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - local tc=g:GetFirst() - while tc do - Duel.NegateRelatedChain(tc,RESET_TURN_SET) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - e1:SetValue(300) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - tc:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_DISABLE_EFFECT) - e3:SetValue(RESET_TURN_SET) - e3:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - tc:RegisterEffect(e3) - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e4:SetRange(LOCATION_MZONE) - e4:SetCode(EFFECT_IMMUNE_EFFECT) - e4:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e4:SetValue(c30845999.efilter) - tc:RegisterEffect(e4) - tc=g:GetNext() - end -end -function c30845999.efilter(e,te) - return te:IsActiveType(TYPE_SPELL+TYPE_TRAP) and te:GetOwner()~=e:GetOwner() -end diff --git a/script/c30860696.lua b/script/c30860696.lua deleted file mode 100644 index 8f43670b47..0000000000 --- a/script/c30860696.lua +++ /dev/null @@ -1,41 +0,0 @@ ---ロケット戦士 -function c30860696.initial_effect(c) - --invincible - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e1:SetCondition(c30860696.ivcon) - e1:SetValue(1) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_AVOID_BATTLE_DAMAGE) - e2:SetCondition(c30860696.ivcon) - e2:SetValue(1) - c:RegisterEffect(e2) - --reduce atk - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(30860696,0)) - e3:SetCategory(CATEGORY_ATKCHANGE) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e3:SetCode(EVENT_BATTLED) - e3:SetCondition(c30860696.racon) - e3:SetOperation(c30860696.raop) - c:RegisterEffect(e3) -end -function c30860696.ivcon(e) - return Duel.GetTurnPlayer()==e:GetHandlerPlayer() -end -function c30860696.racon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler()==Duel.GetAttacker() and Duel.GetAttackTarget() -end -function c30860696.raop(e,tp,eg,ep,ev,re,r,rp) - local d=Duel.GetAttackTarget() - if not d:IsRelateToBattle() or d:IsFacedown() then return end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(-500) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - d:RegisterEffect(e1) -end \ No newline at end of file diff --git a/script/c30888983.lua b/script/c30888983.lua deleted file mode 100644 index ad617e2a77..0000000000 --- a/script/c30888983.lua +++ /dev/null @@ -1,43 +0,0 @@ ---方舟の選別 -function c30888983.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DISABLE_SUMMON+CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_SUMMON) - e1:SetCondition(c30888983.condition) - e1:SetCost(c30888983.cost) - e1:SetTarget(c30888983.target) - e1:SetOperation(c30888983.activate) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_FLIP_SUMMON) - c:RegisterEffect(e2) - local e3=e1:Clone() - e3:SetCode(EVENT_SPSUMMON) - c:RegisterEffect(e3) -end -function c30888983.cfilter(c,rc) - return c:IsFaceup() and c:IsRace(rc) -end -function c30888983.filter(c) - return Duel.IsExistingMatchingCard(c30888983.cfilter,0,LOCATION_MZONE,LOCATION_MZONE,1,nil,c:GetRace()) -end -function c30888983.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentChain()==0 and eg:IsExists(c30888983.filter,1,nil) -end -function c30888983.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,1000) end - Duel.PayLPCost(tp,1000) -end -function c30888983.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local g=eg:Filter(c30888983.filter,nil) - Duel.SetOperationInfo(0,CATEGORY_DISABLE_SUMMON,g,g:GetCount(),0,0) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c30888983.activate(e,tp,eg,ep,ev,re,r,rp) - local g=eg:Filter(c30888983.filter,nil) - Duel.NegateSummon(g) - Duel.Destroy(g,REASON_EFFECT) -end diff --git a/script/c30914564.lua b/script/c30914564.lua deleted file mode 100644 index 11daab8e57..0000000000 --- a/script/c30914564.lua +++ /dev/null @@ -1,23 +0,0 @@ ---聖鳥クレイン -function c30914564.initial_effect(c) - --draw - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(30914564,0)) - e1:SetCategory(CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetTarget(c30914564.target) - e1:SetOperation(c30914564.operation) - c:RegisterEffect(e1) -end -function c30914564.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(1) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c30914564.operation(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end diff --git a/script/c30915572.lua b/script/c30915572.lua deleted file mode 100644 index f22db5e052..0000000000 --- a/script/c30915572.lua +++ /dev/null @@ -1,35 +0,0 @@ ---星見獣ガリス -function c30915572.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(30915572,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DAMAGE+CATEGORY_DECKDES) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND) - e1:SetCost(c30915572.spcost) - e1:SetTarget(c30915572.sptarget) - e1:SetOperation(c30915572.spoperation) - c:RegisterEffect(e1) -end -function c30915572.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return not e:GetHandler():IsPublic() end -end -function c30915572.sptarget(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,1) - and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,1) -end -function c30915572.spoperation(e,tp,eg,ep,ev,re,r,rp,c) - local c=e:GetHandler() - Duel.DiscardDeck(tp,1,REASON_EFFECT) - local g=Duel.GetOperatedGroup() - local tc=g:GetFirst() - if tc then - if tc:IsType(TYPE_MONSTER) then - Duel.Damage(1-tp,tc:GetLevel()*200,REASON_EFFECT) - if c:IsRelateToEffect(e) then Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end - else - if c:IsRelateToEffect(e) then Duel.Destroy(c,REASON_EFFECT) end - end - end -end diff --git a/script/c30922149.lua b/script/c30922149.lua deleted file mode 100644 index e7b28f0b01..0000000000 --- a/script/c30922149.lua +++ /dev/null @@ -1,34 +0,0 @@ ---副作用? -function c30922149.initial_effect(c) - --activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DRAW+CATEGORY_RECOVER) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetTarget(c30922149.target) - e1:SetOperation(c30922149.activate) - c:RegisterEffect(e1) -end -function c30922149.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(1-tp,1) end - Duel.SetTargetPlayer(1-tp) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,1-tp,1) -end -function c30922149.activate(e,tp,eg,ep,ev,re,r,rp) - local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) - if not Duel.IsPlayerCanDraw(p) then return end - local ct=Duel.GetFieldGroupCount(p,LOCATION_DECK,0) - local ac=0 - if ct==0 then ac=1 end - if ct>1 then - Duel.Hint(HINT_SELECTMSG,p,aux.Stringid(30922149,0)) - if ct==2 then ac=Duel.AnnounceNumber(p,1,2) - else ac=Duel.AnnounceNumber(p,1,2,3) end - end - local dr=Duel.Draw(p,ac,REASON_EFFECT) - if p~=tp and dr~=0 then - Duel.BreakEffect() - Duel.Recover(tp,dr*2000,REASON_EFFECT) - end -end diff --git a/script/c30929786.lua b/script/c30929786.lua deleted file mode 100644 index b56e647b78..0000000000 --- a/script/c30929786.lua +++ /dev/null @@ -1,68 +0,0 @@ ---立炎星-トウケイ -function c30929786.initial_effect(c) - --search - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(30929786,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCountLimit(1,30929786) - e1:SetCondition(c30929786.thcon) - e1:SetTarget(c30929786.thtg) - e1:SetOperation(c30929786.thop) - c:RegisterEffect(e1) - --set - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(30929786,1)) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCost(c30929786.setcost) - e2:SetTarget(c30929786.settg) - e2:SetOperation(c30929786.setop) - c:RegisterEffect(e2) -end -function c30929786.thcon(e,tp,eg,ep,ev,re,r,rp) - return re:GetHandler():IsSetCard(0x79) and re:GetHandler():IsType(TYPE_MONSTER) -end -function c30929786.thfilter(c) - return c:IsSetCard(0x79) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() -end -function c30929786.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c30929786.thfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c30929786.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c30929786.thfilter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end -function c30929786.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x7c) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToGraveAsCost() -end -function c30929786.setcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c30929786.cfilter,tp,LOCATION_ONFIELD,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c30929786.cfilter,tp,LOCATION_ONFIELD,0,1,1,nil) - Duel.SendtoGrave(g,REASON_COST) -end -function c30929786.filter(c) - return c:IsSetCard(0x7c) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSSetable(true) -end -function c30929786.settg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>-1 - and Duel.IsExistingMatchingCard(c30929786.filter,tp,LOCATION_DECK,0,1,nil) end -end -function c30929786.setop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) - local g=Duel.SelectMatchingCard(tp,c30929786.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SSet(tp,g:GetFirst()) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c30936186.lua b/script/c30936186.lua deleted file mode 100644 index a9fbabb9d6..0000000000 --- a/script/c30936186.lua +++ /dev/null @@ -1,85 +0,0 @@ ---コアキメイル・ウルナイト -function c30936186.initial_effect(c) - --cost - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c30936186.mtcon) - e1:SetOperation(c30936186.mtop) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(30936186,3)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCost(c30936186.spcost) - e2:SetTarget(c30936186.sptg) - e2:SetOperation(c30936186.spop) - c:RegisterEffect(e2) -end -function c30936186.mtcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c30936186.cfilter1(c) - return c:IsCode(36623431) and c:IsAbleToGraveAsCost() -end -function c30936186.cfilter2(c) - return c:IsType(TYPE_MONSTER) and c:IsRace(RACE_BEASTWARRIOR) and not c:IsPublic() -end -function c30936186.mtop(e,tp,eg,ep,ev,re,r,rp) - local g1=Duel.GetMatchingGroup(c30936186.cfilter1,tp,LOCATION_HAND,0,nil) - local g2=Duel.GetMatchingGroup(c30936186.cfilter2,tp,LOCATION_HAND,0,nil) - local select=2 - if g1:GetCount()>0 and g2:GetCount()>0 then - select=Duel.SelectOption(tp,aux.Stringid(30936186,0),aux.Stringid(30936186,1),aux.Stringid(30936186,2)) - elseif g1:GetCount()>0 then - select=Duel.SelectOption(tp,aux.Stringid(30936186,0),aux.Stringid(30936186,2)) - if select==1 then select=2 end - elseif g2:GetCount()>0 then - select=Duel.SelectOption(tp,aux.Stringid(30936186,1),aux.Stringid(30936186,2)) - select=select+1 - end - if select==0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=g1:Select(tp,1,1,nil) - Duel.SendtoGrave(g,REASON_COST) - elseif select==1 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) - local g=g2:Select(tp,1,1,nil) - Duel.ConfirmCards(1-tp,g) - Duel.ShuffleHand(tp) - else - Duel.Destroy(e:GetHandler(),REASON_RULE) - end -end -function c30936186.cfilter(c) - return c:IsCode(36623431) and not c:IsPublic() -end -function c30936186.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c30936186.cfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) - local g=Duel.SelectMatchingCard(tp,c30936186.cfilter,tp,LOCATION_HAND,0,1,1,nil) - Duel.ConfirmCards(1-tp,g) - Duel.ShuffleHand(tp) -end -function c30936186.spfilter(c,e,tp) - return c:IsLevelBelow(4) and c:IsSetCard(0x1d) and c:GetCode()~=30936186 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c30936186.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c30936186.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c30936186.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c30936186.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()~=0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c31000575.lua b/script/c31000575.lua deleted file mode 100644 index 01ad02086b..0000000000 --- a/script/c31000575.lua +++ /dev/null @@ -1,28 +0,0 @@ ---徴兵令 -function c31000575.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOHAND) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c31000575.target) - e1:SetOperation(c31000575.operation) - c:RegisterEffect(e1) -end -function c31000575.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)~=0 end -end -function c31000575.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.ConfirmDecktop(1-tp,1) - local g=Duel.GetDecktopGroup(1-tp,1) - local tc=g:GetFirst() - if not tc then return end - if tc:IsSummonableCard() and tc:IsCanBeSpecialSummoned(e,0,tp,false,false) then - Duel.DisableShuffleCheck() - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - else - Duel.DisableShuffleCheck() - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ShuffleHand(1-tp) - end -end diff --git a/script/c31034919.lua b/script/c31034919.lua deleted file mode 100644 index 1630722139..0000000000 --- a/script/c31034919.lua +++ /dev/null @@ -1,26 +0,0 @@ ---マッド・リローダー -function c31034919.initial_effect(c) - --draw - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(31034919,0)) - e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetCondition(c31034919.condition) - e1:SetTarget(c31034919.target) - e1:SetOperation(c31034919.operation) - c:RegisterEffect(e1) -end -function c31034919.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) -end -function c31034919.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,2,tp,LOCATION_HAND) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2) -end -function c31034919.operation(e,tp,eg,ep,ev,re,r,rp,chk) - if Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)<2 then return end - Duel.DiscardHand(tp,nil,2,2,REASON_EFFECT) - Duel.Draw(tp,2,REASON_EFFECT) -end diff --git a/script/c31036355.lua b/script/c31036355.lua deleted file mode 100644 index 98f0f97790..0000000000 --- a/script/c31036355.lua +++ /dev/null @@ -1,39 +0,0 @@ ---強制転移 -function c31036355.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_CONTROL) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c31036355.target) - e1:SetOperation(c31036355.activate) - c:RegisterEffect(e1) -end -function c31036355.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToChangeControler,tp,LOCATION_MZONE,0,1,nil) - and Duel.IsExistingMatchingCard(Card.IsAbleToChangeControler,tp,0,LOCATION_MZONE,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_CONTROL,nil,0,0,0) -end -function c31036355.activate(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not Duel.IsExistingMatchingCard(Card.IsAbleToChangeControler,tp,LOCATION_MZONE,0,1,nil) - or not Duel.IsExistingMatchingCard(Card.IsAbleToChangeControler,tp,0,LOCATION_MZONE,1,nil) - then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) - local g1=Duel.SelectMatchingCard(tp,Card.IsAbleToChangeControler,tp,LOCATION_MZONE,0,1,1,nil) - Duel.HintSelection(g1) - Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_CONTROL) - local g2=Duel.SelectMatchingCard(1-tp,Card.IsAbleToChangeControler,1-tp,LOCATION_MZONE,0,1,1,nil) - Duel.HintSelection(g2) - local c1=g1:GetFirst() - local c2=g2:GetFirst() - if Duel.SwapControl(c1,c2,0,0) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_CHANGE_POSITION) - e1:SetReset(RESET_PHASE+PHASE_END) - c1:RegisterEffect(e1) - local e2=e1:Clone() - c2:RegisterEffect(e2) - end -end diff --git a/script/c31038159.lua b/script/c31038159.lua deleted file mode 100644 index 519383cf5b..0000000000 --- a/script/c31038159.lua +++ /dev/null @@ -1,65 +0,0 @@ ---創世竜 -function c31038159.initial_effect(c) - --salvage - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(31038159,0)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCost(c31038159.thcost) - e1:SetTarget(c31038159.thtg) - e1:SetOperation(c31038159.thop) - c:RegisterEffect(e1) - --return to deck - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(31038159,1)) - e2:SetCategory(CATEGORY_TODECK) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetCondition(c31038159.tdcon) - e2:SetTarget(c31038159.tdtg) - e2:SetOperation(c31038159.tdop) - c:RegisterEffect(e2) -end -function c31038159.cfilter(c) - return c:IsRace(RACE_DRAGON) and c:IsAbleToGraveAsCost() -end -function c31038159.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c31038159.cfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,c31038159.cfilter,1,1,REASON_COST) -end -function c31038159.thfilter(c) - return c:IsRace(RACE_DRAGON) and c:IsAbleToHand() -end -function c31038159.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c31038159.thfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c31038159.thfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c31038159.thfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c31038159.thop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end -function c31038159.tdcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) -end -function c31038159.tdfilter(c) - return c:IsRace(RACE_DRAGON) and c:IsAbleToDeck() -end -function c31038159.tdtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c31038159.tdfilter,tp,LOCATION_GRAVE,0,1,nil) end - local g=Duel.GetMatchingGroup(c31038159.tdfilter,tp,LOCATION_GRAVE,0,nil) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0) -end -function c31038159.tdop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c31038159.tdfilter,tp,LOCATION_GRAVE,0,nil) - Duel.SendtoDeck(g,nil,2,REASON_EFFECT) -end diff --git a/script/c31044787.lua b/script/c31044787.lua deleted file mode 100644 index 7e73c77a8e..0000000000 --- a/script/c31044787.lua +++ /dev/null @@ -1,38 +0,0 @@ ---イタチの大暴発 -function c31044787.initial_effect(c) - --activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TODECK) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c31044787.condition) - e1:SetTarget(c31044787.target) - e1:SetOperation(c31044787.activate) - c:RegisterEffect(e1) -end -function c31044787.filter(c) - return c:IsFaceup() and c:GetAttack()>0 -end -function c31044787.condition(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c31044787.filter,tp,0,LOCATION_MZONE,nil) - local atk=g:GetSum(Card.GetAttack) - return atk>Duel.GetLP(tp) -end -function c31044787.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,1-tp,LOCATION_MZONE) -end -function c31044787.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c31044787.filter,tp,0,LOCATION_MZONE,nil) - local atk=g:GetSum(Card.GetAttack) - local lp=Duel.GetLP(tp) - local sg=Group.CreateGroup() - while atk>lp and g:GetCount()>0 do - Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_TODECK) - local tc=g:Select(1-tp,1,1,nil):GetFirst() - sg:AddCard(tc) - g:RemoveCard(tc) - atk=atk-tc:GetAttack() - end - Duel.SendtoDeck(sg,nil,2,REASON_RULE) -end diff --git a/script/c31053337.lua b/script/c31053337.lua deleted file mode 100644 index c98a2ef460..0000000000 --- a/script/c31053337.lua +++ /dev/null @@ -1,80 +0,0 @@ ---BF-激震のアブロオロス -function c31053337.initial_effect(c) - --special summon limit - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(aux.FALSE) - c:RegisterEffect(e1) - --to hand1 - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(31053337,0)) - e2:SetCategory(CATEGORY_TOHAND) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetCountLimit(1) - e2:SetRange(LOCATION_MZONE) - e2:SetCondition(c31053337.condition) - e2:SetTarget(c31053337.target) - e2:SetOperation(c31053337.operation) - c:RegisterEffect(e2) - --indes - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e3:SetCode(EVENT_DAMAGE_CALCULATING) - e3:SetRange(LOCATION_MZONE) - e3:SetOperation(c31053337.indes) - c:RegisterEffect(e3) - --to hand2 - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(31053337,1)) - e4:SetCategory(CATEGORY_TOHAND) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e4:SetCode(EVENT_BATTLED) - e4:SetOperation(c31053337.operation2) - c:RegisterEffect(e4) -end -function c31053337.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()==PHASE_MAIN1 -end -function c31053337.filter(c) - return c:IsAbleToHand() and c:GetSequence()<5 -end -function c31053337.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():GetAttack()>=1000 and Duel.IsExistingMatchingCard(c31053337.filter,tp,0,LOCATION_SZONE,1,nil) end - local g=Duel.GetMatchingGroup(c31053337.filter,tp,0,LOCATION_SZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0) -end -function c31053337.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - local g=Duel.GetMatchingGroup(c31053337.filter,tp,0,LOCATION_SZONE,nil) - Duel.SendtoHand(g,nil,REASON_EFFECT) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_COPY_INHERIT) - e1:SetReset(RESET_EVENT+0x1ff0000) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(-1000) - c:RegisterEffect(e1) - end -end -function c31053337.indes(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local bc=c:GetBattleTarget() - if bc then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e1:SetReset(RESET_PHASE+RESET_DAMAGE_CAL) - e1:SetValue(1) - bc:RegisterEffect(e1) - end -end -function c31053337.operation2(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local bc=c:GetBattleTarget() - if bc and bc:IsRelateToBattle() then - Duel.SendtoHand(bc,nil,REASON_EFFECT) - end -end diff --git a/script/c3105404.lua b/script/c3105404.lua deleted file mode 100644 index cbd757e598..0000000000 --- a/script/c3105404.lua +++ /dev/null @@ -1,65 +0,0 @@ ---ブリリアント・スパーク -function c3105404.initial_effect(c) - Duel.EnableGlobalFlag(GLOBALFLAG_DELAYED_QUICKEFFECT) - --activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_DESTROYED) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e1:SetCountLimit(1,3105404+EFFECT_COUNT_CODE_OATH) - e1:SetCondition(c3105404.condition) - e1:SetTarget(c3105404.target) - e1:SetOperation(c3105404.activate) - c:RegisterEffect(e1) - --to hand - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_TOHAND) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetRange(LOCATION_GRAVE) - e2:SetCost(c3105404.thcost) - e2:SetTarget(c3105404.thtg) - e2:SetOperation(c3105404.thop) - c:RegisterEffect(e2) -end -function c3105404.filter(c,e,tp) - return c:IsPreviousPosition(POS_FACEUP) and c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_MZONE) - and (c:IsReason(REASON_EFFECT) or (c:IsReason(REASON_BATTLE) and Duel.GetAttacker():IsControler(1-tp))) - and c:IsSetCard(0x1047) and c:GetBaseAttack()>0 and c:IsCanBeEffectTarget(e) and c:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) -end -function c3105404.condition(e,tp,eg,ep,ev,re,r,rp) - return rp~=tp -end -function c3105404.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return eg:IsContains(chkc) and c3105404.filter(chkc,e,tp) end - if chk==0 then return eg:IsExists(c3105404.filter,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - local g=eg:FilterSelect(tp,c3105404.filter,1,1,nil,e,tp) - Duel.SetTargetCard(g) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,0) -end -function c3105404.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Damage(1-tp,tc:GetBaseAttack(),REASON_EFFECT) - end -end -function c3105404.cfilter(c) - return c:IsSetCard(0x1047) and c:IsAbleToGraveAsCost() -end -function c3105404.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():GetFlagEffect(3105404)==0 - and Duel.IsExistingMatchingCard(c3105404.cfilter,tp,LOCATION_HAND,0,1,nil) end - e:GetHandler():RegisterFlagEffect(3105404,RESET_CHAIN,0,1) - Duel.DiscardHand(tp,c3105404.cfilter,1,1,REASON_COST,nil) -end -function c3105404.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToHand() end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0) -end -function c3105404.thop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT) - end -end diff --git a/script/c31061682.lua b/script/c31061682.lua deleted file mode 100644 index 1efede4a08..0000000000 --- a/script/c31061682.lua +++ /dev/null @@ -1,66 +0,0 @@ ---Kozmo Farmgirl -function c31061682.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1,31061682) - e1:SetCost(c31061682.spcost) - e1:SetTarget(c31061682.sptg) - e1:SetOperation(c31061682.spop) - c:RegisterEffect(e1) - --search - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_BATTLE_DAMAGE) - e2:SetCondition(c31061682.thcon) - e2:SetCost(c31061682.thcost) - e2:SetTarget(c31061682.thtg) - e2:SetOperation(c31061682.thop) - c:RegisterEffect(e2) -end -function c31061682.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) -end -function c31061682.spfilter(c,e,tp) - return c:IsSetCard(0xd2) and c:IsLevelAbove(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c31061682.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsExistingMatchingCard(c31061682.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c31061682.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c31061682.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end -function c31061682.thcon(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp -end -function c31061682.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,500) end - Duel.PayLPCost(tp,500) -end -function c31061682.thfilter(c) - return c:IsSetCard(0xd2) and c:IsAbleToHand() -end -function c31061682.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c31061682.thfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c31061682.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c31061682.thfilter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c31066283.lua b/script/c31066283.lua deleted file mode 100644 index 3002d1f604..0000000000 --- a/script/c31066283.lua +++ /dev/null @@ -1,4 +0,0 @@ ---スカルライダーの復活 -function c31066283.initial_effect(c) - aux.AddRitualProcGreater(c,aux.FilterBoolFunction(Card.IsCode,99721536)) -end diff --git a/script/c31076103.lua b/script/c31076103.lua deleted file mode 100644 index e9dc5b9d43..0000000000 --- a/script/c31076103.lua +++ /dev/null @@ -1,114 +0,0 @@ ---第一の棺 -function c31076103.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_END_PHASE) - c:RegisterEffect(e1) - -- - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(31076103,0)) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetRange(LOCATION_SZONE) - e2:SetCode(EVENT_PHASE+PHASE_END) - e2:SetCountLimit(1) - e2:SetCondition(c31076103.condition) - e2:SetOperation(c31076103.operation) - c:RegisterEffect(e2) - --spsummon - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(31076103,1)) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e3:SetRange(LOCATION_SZONE) - e3:SetCode(EVENT_PHASE+PHASE_END) - e3:SetCountLimit(1) - e3:SetCondition(c31076103.condition) - e3:SetCost(c31076103.spcost) - e3:SetTarget(c31076103.sptg) - e3:SetOperation(c31076103.spop) - c:RegisterEffect(e3) - --tograve - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e4:SetRange(LOCATION_SZONE) - e4:SetCode(EVENT_LEAVE_FIELD) - e4:SetCondition(c31076103.tgcon) - e4:SetOperation(c31076103.tgop) - c:RegisterEffect(e4) - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e5:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e5:SetCode(EVENT_LEAVE_FIELD) - e5:SetOperation(c31076103.tgop) - c:RegisterEffect(e5) -end -function c31076103.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp -end -function c31076103.cfilter1(c,code) - return c:IsFaceup() and c:IsCode(code) -end -function c31076103.operation(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end - if not Duel.IsExistingMatchingCard(c31076103.cfilter1,tp,LOCATION_SZONE,0,1,nil,4081094) then - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(31076103,2)) - local g=Duel.SelectMatchingCard(tp,Card.IsCode,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil,4081094) - if g:GetCount()>0 then - Duel.MoveToField(g:GetFirst(),tp,tp,LOCATION_SZONE,POS_FACEUP,true) - end - elseif not Duel.IsExistingMatchingCard(c31076103.cfilter1,tp,LOCATION_SZONE,0,1,nil,78697395) then - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(31076103,2)) - local g=Duel.SelectMatchingCard(tp,Card.IsCode,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil,78697395) - if g:GetCount()>0 then - Duel.MoveToField(g:GetFirst(),tp,tp,LOCATION_SZONE,POS_FACEUP,true) - end - end -end -function c31076103.cfilter2(c,code) - return c:IsFaceup() and c:IsCode(code) and c:IsAbleToGraveAsCost() -end -function c31076103.cfilter3(c) - local code=c:GetCode() - return c:IsFaceup() and (code==31076103 or code==4081094 or code==78697395) and c:IsAbleToGraveAsCost() -end -function c31076103.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() - and Duel.IsExistingMatchingCard(c31076103.cfilter2,tp,LOCATION_SZONE,0,1,nil,4081094) - and Duel.IsExistingMatchingCard(c31076103.cfilter2,tp,LOCATION_SZONE,0,1,nil,78697395) end - local g=Duel.GetMatchingGroup(c31076103.cfilter3,tp,LOCATION_SZONE,0,nil) - Duel.SendtoGrave(g,REASON_COST) -end -function c31076103.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) -end -function c31076103.spfilter(c,e,tp) - return c:IsCode(25343280) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) -end -function c31076103.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c31076103.spfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil,e,tp) - if g:GetCount()>0 and Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP)>0 then - g:GetFirst():CompleteProcedure() - end -end -function c31076103.cfilter4(c) - local code=c:GetCode() - return code==31076103 or code==4081094 or code==78697395 -end -function c31076103.cfilter5(c) - local code=c:GetCode() - return c:IsFaceup() and (code==31076103 or code==4081094 or code==78697395) -end -function c31076103.tgcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c31076103.cfilter4,1,nil) -end -function c31076103.tgop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c31076103.cfilter5,tp,LOCATION_SZONE,0,nil) - Duel.SendtoGrave(g,REASON_EFFECT) -end diff --git a/script/c31077447.lua b/script/c31077447.lua deleted file mode 100644 index ed418dc462..0000000000 --- a/script/c31077447.lua +++ /dev/null @@ -1,38 +0,0 @@ ---びっくり箱 -function c31077447.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCondition(c31077447.condition) - e1:SetTarget(c31077447.target) - e1:SetOperation(c31077447.activate) - c:RegisterEffect(e1) -end -function c31077447.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetAttacker():IsControler(1-tp) and Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>1 -end -function c31077447.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local tc=Duel.GetAttacker() - if chkc then return chkc==tc end - if chk==0 then return tc:IsOnField() and tc:IsCanBeEffectTarget(e) end - Duel.SetTargetCard(tc) -end -function c31077447.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if not Duel.NegateAttack() then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,nil,tp,0,LOCATION_MZONE,1,1,tc) - local sc=g:GetFirst() - if sc and Duel.SendtoGrave(sc,REASON_EFFECT)~=0 and sc:IsLocation(LOCATION_GRAVE) then - Duel.BreakEffect() - local val=math.max(0,sc:GetAttack(),sc:GetDefence()) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(-val) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - end -end diff --git a/script/c31111109.lua b/script/c31111109.lua deleted file mode 100644 index 131919b0f5..0000000000 --- a/script/c31111109.lua +++ /dev/null @@ -1,126 +0,0 @@ ---E・HERO ゴッド・ネオス -function c31111109.initial_effect(c) - --fusion material - c:EnableReviveLimit() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_FUSION_MATERIAL) - e1:SetCondition(c31111109.fuscon) - e1:SetOperation(c31111109.fusop) - c:RegisterEffect(e1) - --copy - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(31111109,0)) - e2:SetCategory(CATEGORY_ATKCHANGE) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetTarget(c31111109.copytg) - e2:SetOperation(c31111109.copyop) - c:RegisterEffect(e2) - --spsummon condition - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e3:SetCode(EFFECT_SPSUMMON_CONDITION) - e3:SetValue(aux.fuslimit) - c:RegisterEffect(e3) -end -function c31111109.fuscon(e,g,gc,chkf) - if g==nil then return false end - if gc then return false end - local g1=g:Filter(Card.IsSetCard,nil,0x9) - local c1=g1:GetCount() - local g2=g:Filter(Card.IsSetCard,nil,0x1f) - local c2=g2:GetCount() - local g3=g:Filter(Card.IsSetCard,nil,0x8) - local c3=g3:GetCount() - local ag=g1:Clone() - ag:Merge(g2) - ag:Merge(g3) - if chkf~=PLAYER_NONE and not ag:IsExists(aux.FConditionCheckF,1,nil,chkf) then return false end - return c1>0 and c2>0 and c3>0 and ag:GetCount()>=5 and (c1>1 or c3>1 or g1:GetFirst()~=g3:GetFirst()) -end -function c31111109.fusop(e,tp,eg,ep,ev,re,r,rp,gc,chkf) - if gc then return end - local g1=eg:Filter(Card.IsSetCard,nil,0x9) - local g2=eg:Filter(Card.IsSetCard,nil,0x1f) - local g3=eg:Filter(Card.IsSetCard,nil,0x8) - local ag=g1:Clone() - ag:Merge(g2) - ag:Merge(g3) - local tc=nil local f1=0 local f2=0 local f3=0 - local mg=Group.CreateGroup() - for i=1,5 do - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL) - if i==1 and chkf~=PLAYER_NONE then - tc=ag:FilterSelect(tp,aux.FConditionCheckF,1,1,nil,chkf):GetFirst() - else tc=ag:Select(tp,1,1,nil):GetFirst() end - if g1:IsContains(tc) then - g1:RemoveCard(tc) - if g3:IsContains(tc) then g3:RemoveCard(tc) f1=f1+1 f3=f3+1 - else f1=f1+2 end - elseif g2:IsContains(tc) then g2:RemoveCard(tc) f2=f2+1 - else g3:RemoveCard(tc) f3=f3+2 end - ag:RemoveCard(tc) - mg:AddCard(tc) - if i==3 then - if f1==0 and f2==0 then ag:Sub(g3) - elseif f1==0 and f3==0 then ag:Sub(g2) - elseif f2==0 and f3==0 then ag:Sub(g1) end - end - if i==4 then - if f1==0 then ag=g1 - elseif f2==0 then ag=g2 - elseif f3==0 then ag=g3 - elseif f1==1 and f3==1 then ag:Sub(g2) end - end - end - Duel.SetFusionMaterial(mg) -end -function c31111109.filter(c) - return (c:IsSetCard(0x9) or c:IsSetCard(0x1f) or c:IsSetCard(0x8)) and c:IsType(TYPE_MONSTER) - and not c:IsHasEffect(EFFECT_FORBIDDEN) and c:IsAbleToRemove() -end -function c31111109.copytg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c31111109.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c31111109.filter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,c31111109.filter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) -end -function c31111109.copyop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and c:IsFaceup() and tc:IsRelateToEffect(e) then - if Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)~=1 then return end - local code=tc:GetOriginalCode() - local cid=c:CopyEffect(code,RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END,1) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_COPY_INHERIT) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(500) - e1:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(31111109,1)) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_PHASE+PHASE_END) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e2:SetCountLimit(1) - e2:SetRange(LOCATION_MZONE) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - e2:SetLabel(cid) - e2:SetOperation(c31111109.rstop) - c:RegisterEffect(e2) - end -end -function c31111109.rstop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local cid=e:GetLabel() - c:ResetEffect(cid,RESET_COPY) - Duel.HintSelection(Group.FromCards(c)) - Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) -end diff --git a/script/c31118030.lua b/script/c31118030.lua deleted file mode 100644 index ac04db7e84..0000000000 --- a/script/c31118030.lua +++ /dev/null @@ -1,27 +0,0 @@ ---占術姫アローシルフ -function c31118030.initial_effect(c) - --to hand - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DELAY) - e1:SetTarget(c31118030.thtg) - e1:SetOperation(c31118030.thop) - c:RegisterEffect(e1) -end -function c31118030.thfilter(c) - return bit.band(c:GetType(),0x82)==0x82 and c:IsAbleToHand() - and not c:IsHasEffect(EFFECT_NECRO_VALLEY) -end -function c31118030.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c31118030.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE) -end -function c31118030.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c31118030.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c3113836.lua b/script/c3113836.lua deleted file mode 100644 index 63d7749558..0000000000 --- a/script/c3113836.lua +++ /dev/null @@ -1,26 +0,0 @@ ---ジェムナイト・セラフィ -function c3113836.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcFun2(c,aux.FilterBoolFunction(Card.IsSetCard,0x1047),aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_LIGHT),false) - --spsummon condition - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(c3113836.splimit) - c:RegisterEffect(e1) - --extra summon - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetTargetRange(LOCATION_HAND+LOCATION_MZONE,0) - e2:SetCode(EFFECT_EXTRA_SUMMON_COUNT) - e2:SetRange(LOCATION_MZONE) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EFFECT_EXTRA_SET_COUNT) - c:RegisterEffect(e3) -end -function c3113836.splimit(e,se,sp,st) - return not e:GetHandler():IsLocation(LOCATION_EXTRA) or bit.band(st,SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION -end diff --git a/script/c31173519.lua b/script/c31173519.lua deleted file mode 100644 index ec1b762d7b..0000000000 --- a/script/c31173519.lua +++ /dev/null @@ -1,23 +0,0 @@ ---ライライダー -function c31173519.initial_effect(c) - --atk limit - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(31173519,0)) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_BATTLED) - e1:SetCondition(c31173519.condition) - e1:SetOperation(c31173519.operation) - c:RegisterEffect(e1) -end -function c31173519.condition(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetHandler():GetBattleTarget() - return tc and not tc:IsStatus(STATUS_BATTLE_DESTROYED) -end -function c31173519.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetHandler():GetBattleTarget() - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) -end diff --git a/script/c31175914.lua b/script/c31175914.lua deleted file mode 100644 index c080195870..0000000000 --- a/script/c31175914.lua +++ /dev/null @@ -1,34 +0,0 @@ ---アタック・ゲイナー -function c31175914.initial_effect(c) - --atk change - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(31175914,0)) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_BE_MATERIAL) - e1:SetCondition(c31175914.atkcon) - e1:SetTarget(c31175914.atktg) - e1:SetOperation(c31175914.atkop) - c:RegisterEffect(e1) -end -function c31175914.atkcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsLocation(LOCATION_GRAVE) and r==REASON_SYNCHRO -end -function c31175914.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsFaceup() end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil) -end -function c31175914.atkop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) and tc:IsFaceup() then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e1:SetValue(-1000) - tc:RegisterEffect(e1) - end -end diff --git a/script/c3117804.lua b/script/c3117804.lua deleted file mode 100644 index fc1735b9a7..0000000000 --- a/script/c3117804.lua +++ /dev/null @@ -1,33 +0,0 @@ ---超重武者ビッグベン-K -function c3117804.initial_effect(c) - --pos - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(3117804,0)) - e1:SetCategory(CATEGORY_POSITION) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e1:SetOperation(c3117804.posop) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e2) - -- - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetCode(EFFECT_DEFENCE_ATTACK) - e3:SetRange(LOCATION_MZONE) - e3:SetTargetRange(LOCATION_MZONE,0) - e3:SetTarget(c3117804.atktg) - e3:SetValue(1) - c:RegisterEffect(e3) -end -function c3117804.posop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFaceup() and c:IsRelateToEffect(e) then - Duel.ChangePosition(c,POS_FACEUP_DEFENCE,0,POS_FACEUP_ATTACK,0) - end -end -function c3117804.atktg(e,c) - return c:IsSetCard(0x9a) -end diff --git a/script/c31178212.lua b/script/c31178212.lua deleted file mode 100644 index 504b3a5c5c..0000000000 --- a/script/c31178212.lua +++ /dev/null @@ -1,60 +0,0 @@ ---マジェスペクター・ユニコーン -function c31178212.initial_effect(c) - --pendulum summon - aux.AddPendulumProcedure(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --tohand - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_TOHAND) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,31178212) - e2:SetTarget(c31178212.thtg) - e2:SetOperation(c31178212.thop) - c:RegisterEffect(e2) - --cannot target - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e3:SetRange(LOCATION_MZONE) - e3:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) - e3:SetValue(aux.tgoval) - c:RegisterEffect(e3) - --indes - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e4:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - e4:SetRange(LOCATION_MZONE) - e4:SetValue(c31178212.indval) - c:RegisterEffect(e4) -end -function c31178212.filter(c) - return c:IsFaceup() and c:IsType(TYPE_PENDULUM) and c:IsAbleToHand() -end -function c31178212.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - if chk==0 then return Duel.IsExistingTarget(c31178212.filter,tp,LOCATION_MZONE,0,1,nil) - and Duel.IsExistingTarget(Card.IsAbleToHand,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g1=Duel.SelectTarget(tp,c31178212.filter,tp,LOCATION_MZONE,0,1,1,nil) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g2=Duel.SelectTarget(tp,Card.IsAbleToHand,tp,0,LOCATION_MZONE,1,1,nil) - g1:Merge(g2) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g1,2,0,0) -end -function c31178212.thop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - end -end -function c31178212.indval(e,re,tp) - return tp~=e:GetHandlerPlayer() -end diff --git a/script/c31181711.lua b/script/c31181711.lua deleted file mode 100644 index 05dbef853e..0000000000 --- a/script/c31181711.lua +++ /dev/null @@ -1,77 +0,0 @@ ---超重武者装留グレート・ウォール -function c31181711.initial_effect(c) - --equip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(31181711,0)) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_HAND+LOCATION_MZONE) - e1:SetTarget(c31181711.eqtg) - e1:SetOperation(c31181711.eqop) - c:RegisterEffect(e1) -end -function c31181711.filter(c) - return c:IsFaceup() and c:IsSetCard(0x9a) -end -function c31181711.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c31181711.filter(chkc) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingTarget(c31181711.filter,tp,LOCATION_MZONE,0,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c31181711.filter,tp,LOCATION_MZONE,0,1,1,e:GetHandler()) -end -function c31181711.eqop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) then return end - if c:IsLocation(LOCATION_MZONE) and c:IsFacedown() then return end - local tc=Duel.GetFirstTarget() - if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or tc:GetControler()~=tp or tc:IsFacedown() or not tc:IsRelateToEffect(e) then - Duel.SendtoGrave(c,REASON_EFFECT) - return - end - Duel.Equip(tp,c,tc,true) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(c31181711.eqlimit) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_UPDATE_DEFENCE) - e2:SetValue(1200) - e2:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_BE_BATTLE_TARGET) - e3:SetRange(LOCATION_SZONE) - e3:SetCondition(c31181711.btcon) - e3:SetCost(c31181711.btcost) - e3:SetOperation(c31181711.btop) - e3:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e3) -end -function c31181711.eqlimit(e,c) - return c:IsSetCard(0x9a) -end -function c31181711.btcon(e,tp,eg,ep,ev,re,r,rp) - return eg:GetFirst()==e:GetHandler():GetEquipTarget() -end -function c31181711.btcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - e:SetLabelObject(e:GetHandler():GetEquipTarget()) - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end -function c31181711.btop(e,tp,eg,ep,ev,re,r,rp) - local ec=e:GetLabelObject() - if Duel.NegateAttack() and ec:IsFaceup() then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_DEFENCE_FINAL) - e1:SetValue(0) - e1:SetReset(RESET_EVENT+0x1fe0000) - ec:RegisterEffect(e1) - end -end diff --git a/script/c31222701.lua b/script/c31222701.lua deleted file mode 100644 index 8fabcf44dc..0000000000 --- a/script/c31222701.lua +++ /dev/null @@ -1,57 +0,0 @@ ---揺れる眼差し -function c31222701.initial_effect(c) - --activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c31222701.target) - e1:SetOperation(c31222701.activate) - c:RegisterEffect(e1) -end -function c31222701.filter(c) - return (c:GetSequence()==6 or c:GetSequence()==7) and c:IsDestructable() -end -function c31222701.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c31222701.filter,tp,LOCATION_SZONE,LOCATION_SZONE,1,nil) end - local g=Duel.GetMatchingGroup(c31222701.filter,tp,LOCATION_SZONE,LOCATION_SZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,500) -end -function c31222701.thfilter1(c) - return c:IsType(TYPE_PENDULUM) and c:IsAbleToHand() -end -function c31222701.thfilter2(c) - return c:IsCode(31222701) and c:IsAbleToHand() -end -function c31222701.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c31222701.filter,tp,LOCATION_SZONE,LOCATION_SZONE,nil) - local ct=Duel.Destroy(g,REASON_EFFECT) - if ct>=1 then - Duel.BreakEffect() - Duel.Damage(1-tp,500,REASON_EFFECT) - end - local hg1=Duel.GetMatchingGroup(c31222701.thfilter1,tp,LOCATION_DECK,0,nil) - if ct>=2 and hg1:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(31222701,0)) then - Duel.BreakEffect() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local shg1=hg1:Select(tp,1,1,nil) - Duel.SendtoHand(shg1,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,shg1) - end - local rg=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler()) - if ct>=3 and rg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(31222701,1)) then - Duel.BreakEffect() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local srg=rg:Select(tp,1,1,nil) - Duel.Remove(srg,POS_FACEUP,REASON_EFFECT) - end - local hg2=Duel.GetMatchingGroup(c31222701.thfilter2,tp,LOCATION_DECK,0,nil) - if ct==4 and hg2:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(31222701,2)) then - Duel.BreakEffect() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local shg2=hg2:Select(tp,1,1,nil) - Duel.SendtoHand(shg2,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,shg2) - end -end diff --git a/script/c31245780.lua b/script/c31245780.lua deleted file mode 100644 index bbf3872116..0000000000 --- a/script/c31245780.lua +++ /dev/null @@ -1,57 +0,0 @@ ---バトルマニア -function c31245780.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_POSITION) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_STANDBY_PHASE) - e1:SetCondition(c31245780.condition) - e1:SetTarget(c31245780.target) - e1:SetOperation(c31245780.activate) - c:RegisterEffect(e1) -end -function c31245780.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp and Duel.GetCurrentPhase()==PHASE_STANDBY -end -function c31245780.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end - local sg=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_POSITION,sg,sg:GetCount(),0,0) -end -function c31245780.activate(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local sg=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil) - if sg:GetCount()>0 then - Duel.ChangePosition(sg,POS_FACEUP_ATTACK,0,POS_FACEUP_ATTACK,0) - local tc=sg:GetFirst() - while tc do - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_MUST_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_CANNOT_CHANGE_POSITION) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e2) - tc:RegisterFlagEffect(31245780,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) - tc=sg:GetNext() - end - local be=Effect.CreateEffect(c) - be:SetType(EFFECT_TYPE_FIELD) - be:SetCode(EFFECT_CANNOT_EP) - be:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - be:SetTargetRange(0,1) - be:SetCondition(c31245780.becon) - be:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(be,tp) - end -end -function c31245780.befilter(c) - return c:GetFlagEffect(31245780)~=0 and c:IsAttackable() -end -function c31245780.becon(e) - return Duel.IsExistingMatchingCard(c31245780.befilter,e:GetHandlerPlayer(),0,LOCATION_MZONE,1,nil) -end diff --git a/script/c31247589.lua b/script/c31247589.lua deleted file mode 100644 index b70dc2add9..0000000000 --- a/script/c31247589.lua +++ /dev/null @@ -1,51 +0,0 @@ ---剣闘獣ディカエリィ -function c31247589.initial_effect(c) - --double attack - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_EXTRA_ATTACK) - e1:SetCondition(c31247589.dacon) - e1:SetValue(1) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(31247589,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_PHASE+PHASE_BATTLE) - e2:SetRange(LOCATION_MZONE) - e2:SetCondition(c31247589.spcon) - e2:SetCost(c31247589.spcost) - e2:SetTarget(c31247589.sptg) - e2:SetOperation(c31247589.spop) - c:RegisterEffect(e2) -end -function c31247589.dacon(e) - return e:GetHandler():GetFlagEffect(31247589)>0 -end -function c31247589.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetBattledGroupCount()>0 -end -function c31247589.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToDeckAsCost() end - Duel.SendtoDeck(c,nil,2,REASON_COST) -end -function c31247589.filter(c,e,tp) - return not c:IsCode(31247589) and c:IsSetCard(0x19) and c:IsCanBeSpecialSummoned(e,107,tp,false,false) -end -function c31247589.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsExistingMatchingCard(c31247589.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0) -end -function c31247589.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c31247589.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - local tc=g:GetFirst() - if tc then - Duel.SpecialSummon(tc,107,tp,tp,false,false,POS_FACEUP) - tc:RegisterFlagEffect(tc:GetOriginalCode(),RESET_EVENT+0x1ff0000,0,0) - end -end diff --git a/script/c31281980.lua b/script/c31281980.lua deleted file mode 100644 index 2a5d2912c5..0000000000 --- a/script/c31281980.lua +++ /dev/null @@ -1,30 +0,0 @@ ---ヒール・ウェーバー -function c31281980.initial_effect(c) - --recover - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(31281980,0)) - e1:SetCategory(CATEGORY_RECOVER) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c31281980.rectg) - e1:SetOperation(c31281980.recop) - c:RegisterEffect(e1) -end -function c31281980.filter(c) - return c:IsFaceup() and c:GetLevel()>0 -end -function c31281980.rectg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c31281980.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c31281980.filter,tp,LOCATION_MZONE,0,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - local g=Duel.SelectTarget(tp,c31281980.filter,tp,LOCATION_MZONE,0,1,1,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,g:GetFirst():GetLevel()*100) -end -function c31281980.recop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) then - Duel.Recover(tp,tc:GetLevel()*100,REASON_EFFECT) - end -end diff --git a/script/c31292357.lua b/script/c31292357.lua deleted file mode 100644 index 356bf499ff..0000000000 --- a/script/c31292357.lua +++ /dev/null @@ -1,75 +0,0 @@ ---Emハットトリッカー -function c31292357.initial_effect(c) - c:EnableCounterPermit(0x3036) - c:SetCounterLimit(0x3036,3) - --special summon rule - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetRange(LOCATION_HAND) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetCondition(c31292357.spcon) - c:RegisterEffect(e1) - --counter - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_COUNTER) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_CHAINING) - e2:SetRange(LOCATION_MZONE) - e2:SetCondition(aux.damcon1) - e2:SetTarget(c31292357.cttg) - e2:SetOperation(c31292357.ctop) - c:RegisterEffect(e2) - --atk - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e3:SetCode(31292357) - e3:SetOperation(c31292357.atkop) - c:RegisterEffect(e3) -end -function c31292357.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.GetFieldGroupCount(tp,LOCATION_MZONE,LOCATION_MZONE)>=2 -end -function c31292357.cttg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsCanAddCounter(0x3036,1) end -end -function c31292357.ctop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:AddCounter(0x3036,1)~=0 then - if c:GetCounter(0x3036)==3 then - Duel.RaiseSingleEvent(c,31292357,e,0,0,tp,0) - end - local cid=Duel.GetChainInfo(ev,CHAININFO_CHAIN_ID) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CHANGE_DAMAGE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetTargetRange(1,0) - e1:SetLabel(cid) - e1:SetValue(c31292357.damval) - e1:SetReset(RESET_CHAIN) - Duel.RegisterEffect(e1,tp) - end -end -function c31292357.damval(e,re,val,r,rp,rc) - local cc=Duel.GetCurrentChain() - if cc==0 or bit.band(r,REASON_EFFECT)==0 then return val end - local cid=Duel.GetChainInfo(0,CHAININFO_CHAIN_ID) - if cid~=e:GetLabel() then return val end - return 0 -end -function c31292357.atkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetValue(3300) - e1:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_SET_DEFENCE_FINAL) - c:RegisterEffect(e2) -end diff --git a/script/c3129635.lua b/script/c3129635.lua deleted file mode 100644 index c97e8ceca3..0000000000 --- a/script/c3129635.lua +++ /dev/null @@ -1,56 +0,0 @@ ---カース・オブ・スタチュー -function c3129635.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c3129635.target) - e1:SetOperation(c3129635.activate) - c:RegisterEffect(e1) -end -function c3129635.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and - Duel.IsPlayerCanSpecialSummonMonster(tp,3129635,0,0x21,1800,1000,4,RACE_ROCK,ATTRIBUTE_DARK) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c3129635.activate(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) then return end - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 - or not Duel.IsPlayerCanSpecialSummonMonster(tp,3129635,0,0x21,1800,1000,4,RACE_ROCK,ATTRIBUTE_DARK) then return end - c:AddTrapMonsterAttribute(TYPE_EFFECT,ATTRIBUTE_DARK,RACE_ROCK,4,1800,1000) - Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP) - c:TrapMonsterBlock() - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(3129635,0)) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EVENT_BATTLED) - e1:SetTarget(c3129635.destg) - e1:SetOperation(c3129635.desop) - e1:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e1) -end -function c3129635.destg(e,tp,eg,ep,ev,re,r,rp,chk) - local a=Duel.GetAttacker() - local d=Duel.GetAttackTarget() - if chk==0 then - if a:IsControler(tp) then return d and a~=e:GetHandler() and bit.band(a:GetOriginalType(),TYPE_TRAP)~=0 - else return d and d~=e:GetHandler() and bit.band(d:GetOriginalType(),TYPE_TRAP)~=0 end - end - if a:IsControler(tp) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,d,1,0,0) - e:SetLabelObject(d) - else - Duel.SetOperationInfo(0,CATEGORY_DESTROY,a,1,0,0) - e:SetLabelObject(a) - end -end -function c3129635.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetLabelObject() - if tc:IsRelateToBattle() then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c31303283.lua b/script/c31303283.lua deleted file mode 100644 index 48f8e3ed72..0000000000 --- a/script/c31303283.lua +++ /dev/null @@ -1,38 +0,0 @@ ---陽炎獣 ヒッポグリフォ -function c31303283.initial_effect(c) - --cannot be target - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetValue(aux.tgoval) - c:RegisterEffect(e1) - --atkup - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(31303283,0)) - e2:SetCategory(CATEGORY_ATKCHANGE) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCost(c31303283.atkcost) - e2:SetOperation(c31303283.atkop) - c:RegisterEffect(e2) -end -function c31303283.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsAttribute,1,e:GetHandler(),ATTRIBUTE_FIRE) end - local g=Duel.SelectReleaseGroup(tp,Card.IsAttribute,1,1,e:GetHandler(),ATTRIBUTE_FIRE) - Duel.Release(g,REASON_COST) -end -function c31303283.atkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFaceup() and c:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(300) - e1:SetProperty(EFFECT_FLAG_COPY_INHERIT) - e1:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e1) - end -end diff --git a/script/c31305911.lua b/script/c31305911.lua deleted file mode 100644 index a60e78e1e8..0000000000 --- a/script/c31305911.lua +++ /dev/null @@ -1,33 +0,0 @@ ---マシュマロン -function c31305911.initial_effect(c) - --damage - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(31305911,0)) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_BATTLED) - e1:SetCondition(c31305911.condition) - e1:SetTarget(c31305911.target) - e1:SetOperation(c31305911.operation) - c:RegisterEffect(e1) - --battle indestructable - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e2:SetValue(1) - c:RegisterEffect(e2) -end -function c31305911.condition(e,tp,eg,ep,ev,re,r,rp) - local pos=e:GetHandler():GetBattlePosition() - return e:GetHandler()==Duel.GetAttackTarget() and (pos==POS_FACEDOWN_DEFENCE or pos==POS_FACEDOWN_ATTACK) -end -function c31305911.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(1000) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,0,0,1-tp,1000) -end -function c31305911.operation(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c31314549.lua b/script/c31314549.lua deleted file mode 100644 index 8911093efe..0000000000 --- a/script/c31314549.lua +++ /dev/null @@ -1,21 +0,0 @@ ---RR-シンギング・レイニアス -function c31314549.initial_effect(c) - --special summon rule - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetRange(LOCATION_HAND) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetCountLimit(1,31314549) - e1:SetCondition(c31314549.spcon) - c:RegisterEffect(e1) -end -function c31314549.cfilter(c) - return c:IsFaceup() and c:IsType(TYPE_XYZ) -end -function c31314549.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c31314549.cfilter,tp,LOCATION_MZONE,0,1,nil) -end diff --git a/script/c31320433.lua b/script/c31320433.lua deleted file mode 100644 index a5d5a2fe9e..0000000000 --- a/script/c31320433.lua +++ /dev/null @@ -1,79 +0,0 @@ ---No.47 ナイトメア・シャーク -function c31320433.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,3,2) - c:EnableReviveLimit() - --charge - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(31320433,0)) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e1:SetTarget(c31320433.mattg) - e1:SetOperation(c31320433.matop) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(31320433,1)) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCondition(c31320433.dacon) - e2:SetCost(c31320433.dacost) - e2:SetTarget(c31320433.datg) - e2:SetOperation(c31320433.daop) - c:RegisterEffect(e2) -end -c31320433.xyz_number=47 -function c31320433.matfilter(c) - return (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) and not c:IsType(TYPE_TOKEN) and c:GetLevel()==3 and c:IsAttribute(ATTRIBUTE_WATER) -end -function c31320433.mattg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c31320433.matfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil) end -end -function c31320433.matop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL) - local g=Duel.SelectMatchingCard(tp,c31320433.matfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil) - if g:GetCount()>=0 then - Duel.Overlay(e:GetHandler(),g) - end -end -function c31320433.dacon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsAbleToEnterBP() -end -function c31320433.dacost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c31320433.filter(c) - return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_WATER) -end -function c31320433.datg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c31320433.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c31320433.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - local g=Duel.SelectTarget(tp,c31320433.filter,tp,LOCATION_MZONE,0,1,1,nil) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetProperty(EFFECT_FLAG_OATH) - e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetTarget(c31320433.ftarget) - e1:SetLabel(g:GetFirst():GetFieldID()) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function c31320433.daop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DIRECT_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - end -end -function c31320433.ftarget(e,c) - return e:GetLabel()~=c:GetFieldID() -end diff --git a/script/c31328739.lua b/script/c31328739.lua deleted file mode 100644 index 5af57178df..0000000000 --- a/script/c31328739.lua +++ /dev/null @@ -1,31 +0,0 @@ ---サイキック・インパルス -function c31328739.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c31328739.cost) - e1:SetTarget(c31328739.target) - e1:SetOperation(c31328739.activate) - c:RegisterEffect(e1) -end -function c31328739.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsRace,1,nil,RACE_PSYCHO) end - local g=Duel.SelectReleaseGroup(tp,Card.IsRace,1,1,nil,RACE_PSYCHO) - Duel.Release(g,REASON_COST) -end -function c31328739.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0 and Duel.IsPlayerCanDraw(1-tp,3) end - Duel.SetTargetPlayer(1-tp) -end -function c31328739.activate(e,tp,eg,ep,ev,re,r,rp) - local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) - local g=Duel.GetFieldGroup(p,LOCATION_HAND,0) - if g:GetCount()==0 then return end - Duel.SendtoDeck(g,nil,2,REASON_EFFECT) - Duel.ShuffleDeck(p) - Duel.BreakEffect() - Duel.Draw(p,3,REASON_EFFECT) -end \ No newline at end of file diff --git a/script/c31339260.lua b/script/c31339260.lua deleted file mode 100644 index 5c1dca25c0..0000000000 --- a/script/c31339260.lua +++ /dev/null @@ -1,6 +0,0 @@ ---アンデット・ウォーリアー -function c31339260.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcCode2(c,32274490,55550921,true,true) -end diff --git a/script/c313513.lua b/script/c313513.lua deleted file mode 100644 index 5b0481ee1b..0000000000 --- a/script/c313513.lua +++ /dev/null @@ -1,67 +0,0 @@ ---魔法の歯車 -function c313513.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c313513.cost) - e1:SetTarget(c313513.target) - e1:SetOperation(c313513.activate) - c:RegisterEffect(e1) -end -function c313513.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x7) and c:IsAbleToGraveAsCost() -end -function c313513.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c313513.cfilter,tp,LOCATION_ONFIELD,0,3,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c313513.cfilter,tp,LOCATION_ONFIELD,0,3,3,nil) - Duel.SendtoGrave(g,REASON_COST) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_SUMMON) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) - e1:SetReset(RESET_SELF_TURN+RESET_PHASE+RESET_END,2) - e1:SetTargetRange(1,0) - Duel.RegisterEffect(e1,tp) - local e2=e1:Clone() - e2:SetCode(EFFECT_CANNOT_MSET) - Duel.RegisterEffect(e2,tp) -end -function c313513.filter(c,e,tp) - return c:IsCode(83104731) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) -end -function c313513.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c313513.filter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) -end -function c313513.dfilter(c) - return c:IsFacedown() or c:GetCode()~=83104731 -end -function c313513.activate(e,tp,eg,ep,ev,re,r,rp) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ft<=0 then return end - local ct=0 - if ft==1 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c313513.filter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp) - ct=Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP) - else - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g1=Duel.SelectMatchingCard(tp,c313513.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - if g1:GetCount()>0 and Duel.SpecialSummonStep(g1:GetFirst(),0,tp,tp,true,false,POS_FACEUP) then ct=ct+1 end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g2=Duel.SelectMatchingCard(tp,c313513.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if g2:GetCount()>0 and Duel.SpecialSummonStep(g2:GetFirst(),0,tp,tp,true,false,POS_FACEUP) then ct=ct+1 end - Duel.SpecialSummonComplete() - end - if ct>0 then - local dg=Duel.GetMatchingGroup(c313513.dfilter,tp,LOCATION_MZONE,0,nil) - if dg:GetCount()>0 then - Duel.BreakEffect() - Duel.Destroy(dg,REASON_EFFECT) - end - end -end diff --git a/script/c3136426.lua b/script/c3136426.lua deleted file mode 100644 index 415edc6295..0000000000 --- a/script/c3136426.lua +++ /dev/null @@ -1,20 +0,0 @@ ---レベル制限B地区 -function c3136426.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --Pos Change - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_SET_POSITION) - e2:SetRange(LOCATION_SZONE) - e2:SetTarget(c3136426.target) - e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e2:SetValue(POS_FACEUP_DEFENCE) - c:RegisterEffect(e2) -end -function c3136426.target(e,c) - return c:GetLevel()>3 and c:IsFaceup() -end diff --git a/script/c31383545.lua b/script/c31383545.lua deleted file mode 100644 index 51c6cd70fe..0000000000 --- a/script/c31383545.lua +++ /dev/null @@ -1,40 +0,0 @@ ---XX-セイバー ダークソウル -function c31383545.initial_effect(c) - --to grave - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetOperation(c31383545.regop) - c:RegisterEffect(e1) -end -function c31383545.regop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_ONFIELD) then - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(31383545,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_GRAVE) - e1:SetTarget(c31383545.thtg) - e1:SetOperation(c31383545.thop) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - c:RegisterEffect(e1) - end -end -function c31383545.filter(c) - return c:IsSetCard(0x100d) and c:IsAbleToHand() -end -function c31383545.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c31383545.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c31383545.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c31383545.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c31385077.lua b/script/c31385077.lua deleted file mode 100644 index 34e7611aed..0000000000 --- a/script/c31385077.lua +++ /dev/null @@ -1,50 +0,0 @@ ---カオス・ゴッデス-混沌の女神- -function c31385077.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_LIGHT),aux.NonTuner(Card.IsAttribute,ATTRIBUTE_DARK),2) - c:EnableReviveLimit() - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(31385077,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c31385077.spcost) - e1:SetTarget(c31385077.sptg) - e1:SetOperation(c31385077.spop) - c:RegisterEffect(e1) -end -function c31385077.costfilter(c) - return c:IsType(TYPE_MONSTER) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsAbleToGraveAsCost() -end -function c31385077.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c31385077.costfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c31385077.costfilter,tp,LOCATION_HAND,0,1,1,nil) - Duel.SendtoGrave(g,REASON_COST) -end -function c31385077.filter(c,e,tp) - return c:IsLevelAbove(5) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c31385077.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:GetLocation()==LOCATION_GRAVE and chkc:IsControler(tp) and c31385077.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c31385077.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c31385077.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c31385077.spop(e,tp,eg,ep,ev,re,r,rp,chk) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)~=0 then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(1) - tc:RegisterEffect(e1) - end -end diff --git a/script/c31386180.lua b/script/c31386180.lua deleted file mode 100644 index cfdcfe47b5..0000000000 --- a/script/c31386180.lua +++ /dev/null @@ -1,67 +0,0 @@ ---始祖の守護者ティラス -function c31386180.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,5,2) - c:EnableReviveLimit() - --indestructable by effect - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - e1:SetCondition(c31386180.incon) - e1:SetValue(1) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(31386180,0)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_PHASE+PHASE_BATTLE) - e2:SetCountLimit(1) - e2:SetRange(LOCATION_MZONE) - e2:SetCondition(c31386180.descon) - e2:SetTarget(c31386180.destg) - e2:SetOperation(c31386180.desop) - c:RegisterEffect(e2) - --remove material - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(31386180,1)) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e3:SetCode(EVENT_PHASE+PHASE_END) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1) - e3:SetCondition(c31386180.rmcon) - e3:SetOperation(c31386180.rmop) - c:RegisterEffect(e3) -end -function c31386180.incon(e) - return e:GetHandler():GetOverlayCount()>0 -end -function c31386180.descon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetBattledGroupCount()>0 -end -function c31386180.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:GetControler()~=tp and chkc:IsOnField() and chkc:IsDestructable() end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,0,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c31386180.desop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():GetOverlayCount()==0 then return end - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) and tc:IsControler(1-tp) then - Duel.Destroy(tc,REASON_EFFECT) - end -end -function c31386180.rmcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c31386180.rmop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:GetOverlayCount()>0 then - c:RemoveOverlayCard(tp,1,1,REASON_EFFECT) - end -end diff --git a/script/c31423101.lua b/script/c31423101.lua deleted file mode 100644 index fc7b9fffa4..0000000000 --- a/script/c31423101.lua +++ /dev/null @@ -1,74 +0,0 @@ ---神剣-フェニックスブレード -function c31423101.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c31423101.target) - e1:SetOperation(c31423101.operation) - c:RegisterEffect(e1) - --Atk up - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(300) - c:RegisterEffect(e2) - --Equip limit - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_EQUIP_LIMIT) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e3:SetValue(c31423101.equiplimit) - c:RegisterEffect(e3) - --to hand - local e4=Effect.CreateEffect(c) - e4:SetCategory(CATEGORY_TOHAND) - e4:SetDescription(aux.Stringid(31423101,0)) - e4:SetType(EFFECT_TYPE_IGNITION) - e4:SetRange(LOCATION_GRAVE) - e4:SetCost(c31423101.thcost) - e4:SetTarget(c31423101.thtg) - e4:SetOperation(c31423101.thop) - c:RegisterEffect(e4) -end -function c31423101.equiplimit(e,c) - return c:IsRace(RACE_WARRIOR) -end -function c31423101.filter(c) - return c:IsFaceup() and c:IsRace(RACE_WARRIOR) -end -function c31423101.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:GetLocation()==LOCATION_MZONE and c31423101.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c31423101.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c31423101.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c31423101.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,e:GetHandler(),tc) - end -end -function c31423101.thfilter(c) - return c:IsRace(RACE_WARRIOR) and c:IsAbleToRemoveAsCost() -end -function c31423101.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c31423101.thfilter,tp,LOCATION_GRAVE,0,2,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c31423101.thfilter,tp,LOCATION_GRAVE,0,2,2,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c31423101.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToHand() end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0) -end -function c31423101.thop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SendtoHand(c,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,c) - end -end diff --git a/script/c31437713.lua b/script/c31437713.lua deleted file mode 100644 index a2f98bce0f..0000000000 --- a/script/c31437713.lua +++ /dev/null @@ -1,62 +0,0 @@ ---No.82 ハートランドラコ -function c31437713.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,4,2) - c:EnableReviveLimit() - --cannot be battle target - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_CANNOT_BE_BATTLE_TARGET) - e1:SetCondition(c31437713.atkcon) - e1:SetValue(aux.imval1) - c:RegisterEffect(e1) - --direct - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(31437713,0)) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetCountLimit(1) - e2:SetRange(LOCATION_MZONE) - e2:SetCondition(c31437713.condition) - e2:SetCost(c31437713.cost) - e2:SetOperation(c31437713.operation) - c:RegisterEffect(e2) -end -c31437713.xyz_number=82 -function c31437713.filter(c) - return c:IsFaceup() and c:IsType(TYPE_SPELL) -end -function c31437713.atkcon(e) - return Duel.IsExistingMatchingCard(c31437713.filter,e:GetHandlerPlayer(),LOCATION_ONFIELD,0,1,nil) -end -function c31437713.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsAbleToEnterBP() and not e:GetHandler():IsHasEffect(EFFECT_DIRECT_ATTACK) -end -function c31437713.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetProperty(EFFECT_FLAG_OATH) - e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetTarget(c31437713.ftarget) - e1:SetLabel(e:GetHandler():GetFieldID()) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function c31437713.ftarget(e,c) - return e:GetLabel()~=c:GetFieldID() -end -function c31437713.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFaceup() and c:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DIRECT_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - c:RegisterEffect(e1) - end -end diff --git a/script/c31440542.lua b/script/c31440542.lua deleted file mode 100644 index 1628186e21..0000000000 --- a/script/c31440542.lua +++ /dev/null @@ -1,30 +0,0 @@ ---幻惑のラフレシア -function c31440542.initial_effect(c) - --flip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(31440542,0)) - e1:SetCategory(CATEGORY_CONTROL) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP) - e1:SetTarget(c31440542.ctltg) - e1:SetOperation(c31440542.ctlop) - c:RegisterEffect(e1) -end -function c31440542.filter(c) - return c:IsFaceup() and c:IsControlerCanBeChanged() -end -function c31440542.ctltg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c31440542.filter(chkc) end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) - local g=Duel.SelectTarget(tp,c31440542.filter,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,g:GetCount(),0,0) -end -function c31440542.ctlop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) and tc:IsFaceup() and not Duel.GetControl(tc,tp,PHASE_END,1) then - if not tc:IsImmuneToEffect(e) and tc:IsAbleToChangeControler() then - Duel.Destroy(tc,REASON_EFFECT) - end - end -end diff --git a/script/c31444249.lua b/script/c31444249.lua deleted file mode 100644 index 00b7ee86e5..0000000000 --- a/script/c31444249.lua +++ /dev/null @@ -1,123 +0,0 @@ ---煉獄の虚夢 -function c31444249.initial_effect(c) - --activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --change level - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_CHANGE_LEVEL) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(LOCATION_MZONE,0) - e2:SetValue(1) - e2:SetTarget(c31444249.lvtg) - c:RegisterEffect(e2) - --reduce battle damage - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e3:SetCode(EVENT_PRE_BATTLE_DAMAGE) - e3:SetRange(LOCATION_SZONE) - e3:SetCondition(c31444249.rdcon) - e3:SetOperation(c31444249.rdop) - c:RegisterEffect(e3) - --spsummon - local e4=Effect.CreateEffect(c) - e4:SetCategory(CATEGORY_SPECIAL_SUMMON) - e4:SetType(EFFECT_TYPE_IGNITION) - e4:SetRange(LOCATION_SZONE) - e4:SetCost(c31444249.spcost) - e4:SetTarget(c31444249.sptg) - e4:SetOperation(c31444249.spop) - c:RegisterEffect(e4) -end -function c31444249.lvtg(e,c) - return c:IsSetCard(0xbb) and c:GetOriginalLevel()>=2 -end -function c31444249.rdcon(e,tp,eg,ep,ev,re,r,rp) - local ac=eg:GetFirst() - return ep~=tp and ac:IsControler(tp) and ac:IsSetCard(0xbb) and ac:GetOriginalLevel()>=2 and not ac:IsImmuneToEffect(e) -end -function c31444249.rdop(e,tp,eg,ep,ev,re,r,rp) - Duel.ChangeBattleDamage(ep,ev/2) -end -function c31444249.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end -function c31444249.filter1(c,e) - return c:IsCanBeFusionMaterial() and c:IsAbleToGrave() and not c:IsImmuneToEffect(e) -end -function c31444249.filter2(c,e,tp,m,f,chkf) - return c:IsType(TYPE_FUSION) and c:IsSetCard(0xbb) and (not f or f(c)) - and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf) -end -function c31444249.dmcon(e,tp,eg,ep,ev,re,r,rp) - return not Duel.IsExistingMatchingCard(aux.FilterEqualFunction(Card.GetSummonLocation,LOCATION_EXTRA),tp,LOCATION_MZONE,0,1,nil) - and Duel.IsExistingMatchingCard(aux.FilterEqualFunction(Card.GetSummonLocation,LOCATION_EXTRA),tp,0,LOCATION_MZONE,1,nil) -end -function c31444249.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp - local mg1=Duel.GetMatchingGroup(c31444249.filter1,tp,LOCATION_HAND+LOCATION_MZONE,0,nil,e) - if c31444249.dmcon(e,tp,eg,ep,ev,re,r,rp) then - local sg=Duel.GetMatchingGroup(c31444249.filter1,tp,LOCATION_DECK,0,nil,e) - mg1:Merge(sg) - end - local res=Duel.IsExistingMatchingCard(c31444249.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf) - if not res then - local ce=Duel.GetChainMaterial(tp) - if ce~=nil then - local fgroup=ce:GetTarget() - local mg2=fgroup(ce,e,tp) - local mf=ce:GetValue() - res=Duel.IsExistingMatchingCard(c31444249.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,chkf) - end - end - return res - end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function c31444249.spop(e,tp,eg,ep,ev,re,r,rp) - local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp - local mg1=Duel.GetMatchingGroup(c31444249.filter1,tp,LOCATION_HAND+LOCATION_MZONE,0,nil,e) - if c31444249.dmcon(e,tp,eg,ep,ev,re,r,rp) then - local dmg=Duel.GetMatchingGroup(c31444249.filter1,tp,LOCATION_DECK,0,nil,e) - mg1:Merge(dmg) - end - local sg1=Duel.GetMatchingGroup(c31444249.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf) - local mg2=nil - local sg2=nil - local ce=Duel.GetChainMaterial(tp) - if ce~=nil then - local fgroup=ce:GetTarget() - mg2=fgroup(ce,e,tp) - local mf=ce:GetValue() - sg2=Duel.GetMatchingGroup(c31444249.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,mf,chkf) - end - if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then - local sg=sg1:Clone() - if sg2 then sg:Merge(sg2) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local tg=sg:Select(tp,1,1,nil) - local tc=tg:GetFirst() - if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then - if c31444249.dmcon(e,tp,eg,ep,ev,re,r,rp) then - local mgd=Duel.GetMatchingGroup(c31444249.filter1,tp,LOCATION_DECK,0,nil,e) - mg1:Merge(mgd) - tc:RegisterFlagEffect(31444249,RESET_CHAIN,0,1) - end - local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf) - tc:SetMaterial(mat1) - Duel.SendtoGrave(mat1,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION) - Duel.BreakEffect() - Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP) - else - local mat2=Duel.SelectFusionMaterial(tp,tc,mg2,nil,chkf) - local fop=ce:GetOperation() - fop(ce,e,tp,tc,mat2) - end - tc:CompleteProcedure() - end -end diff --git a/script/c31456110.lua b/script/c31456110.lua deleted file mode 100644 index 102f7d37eb..0000000000 --- a/script/c31456110.lua +++ /dev/null @@ -1,30 +0,0 @@ ---ヴェルズ・ゴーレム -function c31456110.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(31456110,0)) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetTarget(c31456110.destg) - e1:SetOperation(c31456110.desop) - c:RegisterEffect(e1) -end -function c31456110.filter(c) - return c:IsFaceup() and c:IsAttribute(0x5f) and c:IsLevelAbove(5) and c:IsDestructable() -end -function c31456110.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c31456110.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c31456110.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c31456110.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c31456110.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and c31456110.filter(tc) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c3146695.lua b/script/c3146695.lua deleted file mode 100644 index 42cd8c5807..0000000000 --- a/script/c3146695.lua +++ /dev/null @@ -1,64 +0,0 @@ ---サイコ・リアクター -function c3146695.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c3146695.regcon) - e1:SetOperation(c3146695.regop) - c:RegisterEffect(e1) -end -function c3146695.cfilter(c) - return c:IsFaceup() and c:IsRace(RACE_PSYCHO) -end -function c3146695.regcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c3146695.cfilter,tp,LOCATION_MZONE,0,1,nil) -end -function c3146695.regop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c3146695.cfilter,tp,LOCATION_MZONE,0,nil) - local tc=g:GetFirst() - while tc do - tc:RegisterFlagEffect(3146695,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) - tc=g:GetNext() - end - g:KeepAlive() - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetDescription(aux.Stringid(3146695,0)) - e1:SetCategory(CATEGORY_REMOVE) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_BATTLED) - e1:SetTarget(c3146695.target) - e1:SetOperation(c3146695.operation) - e1:SetReset(RESET_PHASE+PHASE_END) - e1:SetLabelObject(g) - Duel.RegisterEffect(e1,tp) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_PHASE_START+PHASE_END) - e2:SetReset(RESET_PHASE+PHASE_END) - e2:SetCountLimit(1) - e2:SetLabelObject(g) - e2:SetOperation(c3146695.reset) - Duel.RegisterEffect(e2,tp) -end -function c3146695.filter(c,g) - return c:GetFlagEffect(3146695)>0 and g:IsContains(c) -end -function c3146695.target(e,tp,eg,ep,ev,re,r,rp,chk) - local a=Duel.GetAttacker() - local d=Duel.GetAttackTarget() - local g=Group.FromCards(a,d) - if chk==0 then return d and g:IsExists(c3146695.filter,1,nil,e:GetLabelObject()) end - local rg=g:Filter(Card.IsRelateToBattle,nil) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,rg,rg:GetCount(),0,0) -end -function c3146695.operation(e,tp,eg,ep,ev,re,r,rp) - local a=Duel.GetAttacker() - local d=Duel.GetAttackTarget() - local g=Group.FromCards(a,d) - local rg=g:Filter(Card.IsRelateToBattle,nil) - Duel.Remove(rg,POS_FACEUP,REASON_EFFECT) -end -function c3146695.reset(e,tp,eg,ep,ev,re,r,rp) - e:GetLabelObject():DeleteGroup() -end diff --git a/script/c31467372.lua b/script/c31467372.lua deleted file mode 100644 index 5b30c8953b..0000000000 --- a/script/c31467372.lua +++ /dev/null @@ -1,38 +0,0 @@ ---不死式冥界砲 -function c31467372.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --damage - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(31467372,0)) - e2:SetCategory(CATEGORY_DAMAGE) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetRange(LOCATION_SZONE) - e2:SetCountLimit(1) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetCondition(c31467372.damcon) - e2:SetTarget(c31467372.damtg) - e2:SetOperation(c31467372.damop) - c:RegisterEffect(e2) -end -function c31467372.filter(c,tp) - return c:IsFaceup() and c:IsControler(tp) and c:IsRace(RACE_ZOMBIE) -end -function c31467372.damcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c31467372.filter,1,nil,tp) -end -function c31467372.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(800) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,800) -end -function c31467372.damop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c31476755.lua b/script/c31476755.lua deleted file mode 100644 index 79d4f3d311..0000000000 --- a/script/c31476755.lua +++ /dev/null @@ -1,49 +0,0 @@ ---砂塵の結界 -function c31476755.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c31476755.target) - c:RegisterEffect(e1) - --immune - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_IMMUNE_EFFECT) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e2:SetTarget(aux.TargetBoolFunction(Card.IsType,TYPE_NORMAL)) - e2:SetValue(c31476755.efilter) - c:RegisterEffect(e2) -end -function c31476755.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local c=e:GetHandler() - c:SetTurnCounter(0) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_SZONE) - e1:SetCondition(c31476755.descon) - e1:SetOperation(c31476755.desop) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,2) - c:RegisterEffect(e1) -end -function c31476755.descon(e,tp,eg,ep,ev,re,r,rp) - return tp==Duel.GetTurnPlayer() -end -function c31476755.desop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local ct=c:GetTurnCounter() - ct=ct+1 - c:SetTurnCounter(ct) - if ct==2 then - Duel.Destroy(c,REASON_EFFECT) - end -end -function c31476755.efilter(e,re) - return e:GetHandlerPlayer()~=re:GetOwnerPlayer() and re:IsActiveType(TYPE_SPELL) -end diff --git a/script/c31480215.lua b/script/c31480215.lua deleted file mode 100644 index c33a95858a..0000000000 --- a/script/c31480215.lua +++ /dev/null @@ -1,81 +0,0 @@ ---幻獣機ウォーブラン -function c31480215.initial_effect(c) - -- - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e1:SetCondition(c31480215.indcon) - e1:SetValue(1) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - c:RegisterEffect(e2) - --token - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(31480215,0)) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e3:SetCode(EVENT_BE_MATERIAL) - e3:SetCountLimit(1,31480215) - e3:SetCondition(c31480215.spcon) - e3:SetTarget(c31480215.sptg) - e3:SetOperation(c31480215.spop) - c:RegisterEffect(e3) - --lvup - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(31480215,1)) - e4:SetType(EFFECT_TYPE_IGNITION) - e4:SetRange(LOCATION_MZONE) - e4:SetCountLimit(1,31480215) - e4:SetCost(c31480215.lvcost) - e4:SetOperation(c31480215.lvop) - c:RegisterEffect(e4) -end -function c31480215.indcon(e) - return Duel.IsExistingMatchingCard(Card.IsType,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil,TYPE_TOKEN) -end -function c31480215.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsLocation(LOCATION_GRAVE) and r==REASON_SYNCHRO - and e:GetHandler():GetReasonCard():IsRace(RACE_MACHINE) -end -function c31480215.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0) -end -function c31480215.spop(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetTargetRange(1,0) - e1:SetTarget(c31480215.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - if Duel.IsPlayerCanSpecialSummonMonster(tp,31533705,0x101b,0x4011,0,0,3,RACE_MACHINE,ATTRIBUTE_WIND) then - local token=Duel.CreateToken(tp,31480216) - Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP) - end -end -function c31480215.splimit(e,c,tp,sumtp,sumpos) - return c:GetAttribute()~=ATTRIBUTE_WIND -end -function c31480215.lvcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsSetCard,1,e:GetHandler(),0x101b) end - local g=Duel.SelectReleaseGroup(tp,Card.IsSetCard,1,1,e:GetHandler(),0x101b) - Duel.Release(g,REASON_COST) -end -function c31480215.lvop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFaceup() and c:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_LEVEL) - e1:SetValue(1) - e1:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e1) - end -end diff --git a/script/c3149764.lua b/script/c3149764.lua deleted file mode 100644 index 780e691f2a..0000000000 --- a/script/c3149764.lua +++ /dev/null @@ -1,34 +0,0 @@ ---ツタン仮面 -function c3149764.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_CHAINING) - e1:SetCondition(c3149764.condition) - e1:SetTarget(c3149764.target) - e1:SetOperation(c3149764.activate) - c:RegisterEffect(e1) -end -function c3149764.cfilter(c) - return c:IsLocation(LOCATION_MZONE) and c:IsFaceup() and c:IsRace(RACE_ZOMBIE) -end -function c3149764.condition(e,tp,eg,ep,ev,re,r,rp) - if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return end - if not re:IsHasType(EFFECT_TYPE_ACTIVATE) then return false end - local tg=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) - return tg and tg:GetCount()==1 and c3149764.cfilter(tg:GetFirst()) and Duel.IsChainNegatable(ev) -end -function c3149764.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) - end -end -function c3149764.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateActivation(ev) - if re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(eg,REASON_EFFECT) - end -end diff --git a/script/c31516413.lua b/script/c31516413.lua deleted file mode 100644 index a4b381d60a..0000000000 --- a/script/c31516413.lua +++ /dev/null @@ -1,95 +0,0 @@ ---聖刻龍-ネフテドラゴン -function c31516413.initial_effect(c) - --spsummon from hand - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetRange(LOCATION_HAND) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetCondition(c31516413.hspcon) - e1:SetOperation(c31516413.hspop) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(31516413,0)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCost(c31516413.descost) - e2:SetTarget(c31516413.destg) - e2:SetOperation(c31516413.desop) - c:RegisterEffect(e2) - --spsummon - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(31516413,1)) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetCode(EVENT_RELEASE) - e3:SetTarget(c31516413.sptg) - e3:SetOperation(c31516413.spop) - c:RegisterEffect(e3) -end -function c31516413.hspcon(e,c) - if c==nil then return true end - return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-1 - and Duel.CheckReleaseGroup(c:GetControler(),Card.IsSetCard,1,nil,0x69) -end -function c31516413.hspop(e,tp,eg,ep,ev,re,r,rp,c) - local g=Duel.SelectReleaseGroup(c:GetControler(),Card.IsSetCard,1,1,nil,0x69) - Duel.Release(g,REASON_COST) - c:RegisterFlagEffect(0,RESET_EVENT+0x4fc0000,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(31516413,2)) -end -function c31516413.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroupEx(tp,Card.IsSetCard,1,e:GetHandler(),0x69) end - local g=Duel.SelectReleaseGroupEx(tp,Card.IsSetCard,1,1,e:GetHandler(),0x69) - Duel.Release(g,REASON_COST) -end -function c31516413.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsDestructable() end - if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c31516413.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end -function c31516413.spfilter(c,e,tp) - return c:IsType(TYPE_NORMAL) and c:IsRace(RACE_DRAGON) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) - and not c:IsHasEffect(EFFECT_NECRO_VALLEY) -end -function c31516413.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,0x13) -end -function c31516413.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c31516413.spfilter,tp,0x13,0,1,1,nil,e,tp) - local tc=g:GetFirst() - if tc and Duel.SpecialSummonStep(g:GetFirst(),0,tp,tp,false,false,POS_FACEUP) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK) - e1:SetValue(0) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_SET_DEFENCE) - tc:RegisterEffect(e2) - Duel.SpecialSummonComplete() - elseif Duel.IsPlayerCanSpecialSummon(tp) then - local cg1=Duel.GetFieldGroup(tp,LOCATION_HAND,0) - local cg2=Duel.GetFieldGroup(tp,LOCATION_DECK,0) - Duel.ConfirmCards(1-tp,cg1) - Duel.ConfirmCards(1-tp,cg2) - Duel.ConfirmCards(tp,cg2) - Duel.ShuffleHand(tp) - Duel.ShuffleDeck(tp) - end -end diff --git a/script/c31531170.lua b/script/c31531170.lua deleted file mode 100644 index 9ad6c218dd..0000000000 --- a/script/c31531170.lua +++ /dev/null @@ -1,69 +0,0 @@ ---共鳴する振動 -function c31531170.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c31531170.target) - e1:SetOperation(c31531170.activate) - c:RegisterEffect(e1) -end -function c31531170.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - local tc1=Duel.GetFieldCard(1-tp,LOCATION_SZONE,6) - local tc2=Duel.GetFieldCard(1-tp,LOCATION_SZONE,7) - if chk==0 then return tc1 and tc2 and tc1:IsCanBeEffectTarget(e) and tc2:IsCanBeEffectTarget(e) end - local g=Group.FromCards(tc1,tc2) - Duel.SetTargetCard(g) -end -function c31531170.activate(e,tp,eg,ep,ev,re,r,rp) - local tc1=Duel.GetFieldCard(1-tp,LOCATION_SZONE,6) - local tc2=Duel.GetFieldCard(1-tp,LOCATION_SZONE,7) - if not tc1:IsRelateToEffect(e) or not tc2:IsRelateToEffect(e) then return end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC_G) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_BOTH_SIDE) - e1:SetRange(LOCATION_PZONE) - e1:SetCountLimit(1,10000000) - e1:SetCondition(c31531170.pendcon) - e1:SetOperation(c31531170.pendop) - e1:SetValue(SUMMON_TYPE_PENDULUM) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e1:SetLabel(tc2:GetFieldID()) - tc1:RegisterEffect(e1) -end -function c31531170.pendcon(e,c,og) - if c==nil then return true end - local tp=e:GetOwnerPlayer() - local rpz=Duel.GetFieldCard(1-tp,LOCATION_SZONE,7) - if rpz==nil or rpz:GetFieldID()~=e:GetLabel() then return false end - local lscale=c:GetLeftScale() - local rscale=rpz:GetRightScale() - if lscale>rscale then lscale,rscale=rscale,lscale end - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ft<=0 then return false end - if og then - return og:IsExists(aux.PConditionFilter,1,nil,e,tp,lscale,rscale) - else - return Duel.IsExistingMatchingCard(aux.PConditionFilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,lscale,rscale) - end -end -function c31531170.pendop(e,tp,eg,ep,ev,re,r,rp,c,sg,og) - Duel.Hint(HINT_CARD,0,31531170) - local rpz=Duel.GetFieldCard(1-tp,LOCATION_SZONE,7) - local lscale=c:GetLeftScale() - local rscale=rpz:GetRightScale() - if lscale>rscale then lscale,rscale=rscale,lscale end - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if og then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=og:FilterSelect(tp,aux.PConditionFilter,1,ft,nil,e,tp,lscale,rscale) - sg:Merge(g) - else - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.PConditionFilter,tp,LOCATION_EXTRA,0,1,ft,nil,e,tp,lscale,rscale) - sg:Merge(g) - end -end diff --git a/script/c31533704.lua b/script/c31533704.lua deleted file mode 100644 index cc368f8050..0000000000 --- a/script/c31533704.lua +++ /dev/null @@ -1,96 +0,0 @@ ---幻獣機メガラプター -function c31533704.initial_effect(c) - --level - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_UPDATE_LEVEL) - e1:SetValue(c31533704.lvval) - c:RegisterEffect(e1) - -- - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e2:SetCondition(c31533704.indcon) - e2:SetValue(1) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - c:RegisterEffect(e3) - --token - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(31533704,0)) - e4:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN) - e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e4:SetRange(LOCATION_MZONE) - e4:SetCode(EVENT_SPSUMMON_SUCCESS) - e4:SetCountLimit(1,31533704) - e4:SetCondition(c31533704.spcon) - e4:SetTarget(c31533704.sptg) - e4:SetOperation(c31533704.spop) - c:RegisterEffect(e4) - --search - local e5=Effect.CreateEffect(c) - e5:SetDescription(aux.Stringid(31533704,1)) - e5:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e5:SetType(EFFECT_TYPE_IGNITION) - e5:SetRange(LOCATION_MZONE) - e5:SetCountLimit(1) - e5:SetCost(c31533704.thcost) - e5:SetTarget(c31533704.thtg) - e5:SetOperation(c31533704.thop) - c:RegisterEffect(e5) -end -function c31533704.lvval(e,c) - local tp=c:GetControler() - local lv=0 - for i=0,4 do - local tc=Duel.GetFieldCard(tp,LOCATION_MZONE,i) - if tc and tc:IsCode(31533705) then lv=lv+tc:GetLevel() end - end - return lv -end -function c31533704.indcon(e) - return Duel.IsExistingMatchingCard(Card.IsType,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil,TYPE_TOKEN) -end -function c31533704.spfilter(c,tp) - return c:IsControler(tp) and c:IsType(TYPE_TOKEN) -end -function c31533704.spcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c31533704.spfilter,1,nil,tp) -end -function c31533704.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0) -end -function c31533704.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - if Duel.IsPlayerCanSpecialSummonMonster(tp,31533705,0x101b,0x4011,0,0,3,RACE_MACHINE,ATTRIBUTE_WIND) then - local token=Duel.CreateToken(tp,31533705) - Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP) - end -end -function c31533704.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsType,1,nil,TYPE_TOKEN) end - local g=Duel.SelectReleaseGroup(tp,Card.IsType,1,1,nil,TYPE_TOKEN) - Duel.Release(g,REASON_COST) -end -function c31533704.filter(c) - return c:IsSetCard(0x101b) and c:IsAbleToHand() -end -function c31533704.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c31533704.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c31533704.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c31533704.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c31550470.lua b/script/c31550470.lua deleted file mode 100644 index 2d57ddc83f..0000000000 --- a/script/c31550470.lua +++ /dev/null @@ -1,62 +0,0 @@ ---闇次元の解放 -function c31550470.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_END_PHASE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c31550470.target) - e1:SetOperation(c31550470.operation) - c:RegisterEffect(e1) - --Destroy - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE) - e2:SetCode(EVENT_LEAVE_FIELD) - e2:SetOperation(c31550470.desop) - c:RegisterEffect(e2) - --Destroy2 - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e3:SetRange(LOCATION_SZONE) - e3:SetCode(EVENT_LEAVE_FIELD) - e3:SetCondition(c31550470.descon2) - e3:SetOperation(c31550470.desop2) - c:RegisterEffect(e3) -end -function c31550470.filter(c,e,tp) - return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_DARK) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c31550470.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and c31550470.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c31550470.filter,tp,LOCATION_REMOVED,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c31550470.filter,tp,LOCATION_REMOVED,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c31550470.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then - if Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)==0 then return end - c:SetCardTarget(tc) - e:SetLabelObject(tc) - c:CreateRelation(tc,RESET_EVENT+0x1fe0000) - tc:CreateRelation(c,RESET_EVENT+0x1fe0000) - end -end -function c31550470.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetHandler():GetFirstCardTarget() - if tc and tc:IsLocation(LOCATION_MZONE) then - Duel.Destroy(tc,REASON_EFFECT,LOCATION_REMOVED) - end -end -function c31550470.descon2(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetHandler():GetFirstCardTarget() - return tc and eg:IsContains(tc) and tc:IsReason(REASON_DESTROY) -end -function c31550470.desop2(e,tp,eg,ep,ev,re,r,rp) - Duel.Destroy(e:GetHandler(),REASON_EFFECT) -end diff --git a/script/c31553716.lua b/script/c31553716.lua deleted file mode 100644 index be2c9efaaf..0000000000 --- a/script/c31553716.lua +++ /dev/null @@ -1,24 +0,0 @@ ---スピア・ドラゴン -function c31553716.initial_effect(c) - --to defence - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_DAMAGE_STEP_END) - e1:SetCondition(c31553716.poscon) - e1:SetOperation(c31553716.posop) - c:RegisterEffect(e1) - --pierce - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_PIERCE) - c:RegisterEffect(e2) -end -function c31553716.poscon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler()==Duel.GetAttacker() and e:GetHandler():IsRelateToBattle() -end -function c31553716.posop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsAttackPos() then - Duel.ChangePosition(c,POS_FACEUP_DEFENCE) - end -end diff --git a/script/c31554054.lua b/script/c31554054.lua deleted file mode 100644 index 291f2e4008..0000000000 --- a/script/c31554054.lua +++ /dev/null @@ -1,42 +0,0 @@ ---エクシーズ・リベンジ・シャッフル -function c31554054.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_BE_BATTLE_TARGET) - e1:SetCondition(c31554054.condition) - e1:SetTarget(c31554054.target) - e1:SetOperation(c31554054.activate) - c:RegisterEffect(e1) -end -function c31554054.condition(e,tp,eg,ep,ev,re,r,rp) - local at=Duel.GetAttackTarget() - return at and at:IsFaceup() and at:IsControler(tp) and at:IsType(TYPE_XYZ) -end -function c31554054.filter(c,e,tp) - return c:IsType(TYPE_XYZ) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c31554054.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c31554054.filter(chkc,e,tp) end - if chk==0 then return Duel.GetAttackTarget():IsAbleToDeck() and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c31554054.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c31554054.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.GetAttackTarget():CreateEffectRelation(e) - Duel.SetOperationInfo(0,CATEGORY_TODECK,Duel.GetAttackTarget(),1,0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c31554054.activate(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local at=Duel.GetAttackTarget() - if at:IsRelateToEffect(e) and at:IsFaceup() and Duel.SendtoDeck(at,nil,2,REASON_EFFECT)>0 then - Duel.BreakEffect() - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)~=0 and c:IsRelateToEffect(e) then - c:CancelToGrave() - Duel.Overlay(tc,Group.FromCards(c)) - end - end -end diff --git a/script/c31557782.lua b/script/c31557782.lua deleted file mode 100644 index 33e20dc809..0000000000 --- a/script/c31557782.lua +++ /dev/null @@ -1,20 +0,0 @@ ---古代の歯車 -function c31557782.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_SPSUM_PARAM) - e1:SetTargetRange(POS_FACEUP_ATTACK,0) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c31557782.spcon) - c:RegisterEffect(e1) -end -function c31557782.filter(c) - return c:IsFaceup() and c:IsCode(31557782) -end -function c31557782.spcon(e,c) - if c==nil then return true end - return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c31557782.filter,c:GetControler(),LOCATION_ONFIELD,0,1,nil) -end diff --git a/script/c31560081.lua b/script/c31560081.lua deleted file mode 100644 index 198395c710..0000000000 --- a/script/c31560081.lua +++ /dev/null @@ -1,29 +0,0 @@ ---聖なる魔術師 -function c31560081.initial_effect(c) - --flip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(31560081,0)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP) - e1:SetTarget(c31560081.target) - e1:SetOperation(c31560081.operation) - c:RegisterEffect(e1) -end -function c31560081.filter(c) - return c:IsType(TYPE_SPELL) and c:IsAbleToHand() -end -function c31560081.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c31560081.filter(chkc) end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c31560081.filter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0) -end -function c31560081.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end diff --git a/script/c31563350.lua b/script/c31563350.lua deleted file mode 100644 index b8ea130bee..0000000000 --- a/script/c31563350.lua +++ /dev/null @@ -1,60 +0,0 @@ ---ズババジェネラル -function c31563350.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,4,2) - c:EnableReviveLimit() - --equip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(31563350,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCost(c31563350.eqcost) - e1:SetTarget(c31563350.eqtg) - e1:SetOperation(c31563350.eqop) - c:RegisterEffect(e1) -end -function c31563350.eqcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c31563350.filter(c,tp) - return c:IsRace(RACE_WARRIOR) and c:CheckUniqueOnField(tp) -end -function c31563350.eqtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingMatchingCard(c31563350.filter,tp,LOCATION_HAND,0,1,nil,tp) end - Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_HAND) -end -function c31563350.eqop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end - if c:IsFacedown() or not c:IsRelateToEffect(e) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local g=Duel.SelectMatchingCard(tp,c31563350.filter,tp,LOCATION_HAND,0,1,1,nil,tp) - local tc=g:GetFirst() - if tc then - if not Duel.Equip(tp,tc,c,true) then return end - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_COPY_INHERIT+EFFECT_FLAG_OWNER_RELATE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(c31563350.eqlimit) - tc:RegisterEffect(e1) - local atk=tc:GetTextAttack() - if atk>0 then - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_OWNER_RELATE) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetReset(RESET_EVENT+0x1fe0000) - e2:SetValue(atk) - tc:RegisterEffect(e2) - end - end -end -function c31563350.eqlimit(e,c) - return e:GetOwner()==c -end diff --git a/script/c31571902.lua b/script/c31571902.lua deleted file mode 100644 index f3535cc9ce..0000000000 --- a/script/c31571902.lua +++ /dev/null @@ -1,47 +0,0 @@ ---邪神機-獄炎 -function c31571902.initial_effect(c) - --summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(31571902,0)) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SUMMON_PROC) - e1:SetCondition(c31571902.ntcon) - e1:SetOperation(c31571902.ntop) - c:RegisterEffect(e1) -end -function c31571902.ntcon(e,c,minc) - if c==nil then return true end - return minc==0 and c:GetLevel()>4 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 -end -function c31571902.ntop(e,tp,eg,ep,ev,re,r,rp,c) - --to grave - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(31571902,1)) - e1:SetCategory(CATEGORY_TOGRAVE) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetCondition(c31571902.tgcon) - e1:SetTarget(c31571902.tgtg) - e1:SetOperation(c31571902.tgop) - e1:SetReset(RESET_EVENT+0xc6e0000) - c:RegisterEffect(e1) -end -function c31571902.filter(c) - return c:IsFaceup() and c:IsRace(RACE_ZOMBIE) -end -function c31571902.tgcon(e,tp,eg,ep,ev,re,r,rp) - return not Duel.IsExistingMatchingCard(c31571902.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,e:GetHandler()) -end -function c31571902.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,e:GetHandler(),1,0,0) -end -function c31571902.tgop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() and Duel.SendtoGrave(c,REASON_EFFECT)~=0 then - Duel.Damage(tp,2400,REASON_EFFECT) - end -end diff --git a/script/c3160805.lua b/script/c3160805.lua deleted file mode 100644 index 58ed77ed47..0000000000 --- a/script/c3160805.lua +++ /dev/null @@ -1,100 +0,0 @@ ---明と宵の逆転 -function c3160805.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_END_PHASE) - e1:SetTarget(c3160805.target1) - e1:SetOperation(c3160805.operation) - c:RegisterEffect(e1) - --instant - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(3160805,0)) - e2:SetCategory(CATEGORY_TOGRAVE+CATEGORY_TOHAND+CATEGORY_SEARCH) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetRange(LOCATION_SZONE) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetHintTiming(0,TIMING_END_PHASE) - e2:SetCost(c3160805.cost2) - e2:SetTarget(c3160805.target2) - e2:SetOperation(c3160805.operation) - c:RegisterEffect(e2) -end -function c3160805.tgfilter1(c,tp) - return c:IsRace(RACE_WARRIOR) and c:IsAttribute(ATTRIBUTE_LIGHT) - and Duel.IsExistingMatchingCard(c3160805.thfilter1,tp,LOCATION_DECK,0,1,nil,c:GetLevel()) -end -function c3160805.thfilter1(c,lv) - return c:GetLevel()==lv and c:IsRace(RACE_WARRIOR) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsAbleToHand() -end -function c3160805.tgfilter2(c,tp) - return c:IsRace(RACE_WARRIOR) and c:IsAttribute(ATTRIBUTE_DARK) - and Duel.IsExistingMatchingCard(c3160805.thfilter2,tp,LOCATION_DECK,0,1,nil,c:GetLevel()) -end -function c3160805.thfilter2(c,lv) - return c:GetLevel()==lv and c:IsRace(RACE_WARRIOR) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsAbleToHand() -end -function c3160805.target1(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local b1=Duel.IsExistingMatchingCard(c3160805.tgfilter1,tp,LOCATION_HAND,0,1,nil,tp) - local b2=Duel.IsExistingMatchingCard(c3160805.tgfilter2,tp,LOCATION_HAND,0,1,nil,tp) - local op=2 - if Duel.GetFlagEffect(tp,3160805)==0 and (b1 or b2) and Duel.SelectYesNo(tp,aux.Stringid(3160805,1)) then - if b1 and b2 then - op=Duel.SelectOption(tp,aux.Stringid(3160805,2),aux.Stringid(3160805,3)) - elseif b1 then - op=Duel.SelectOption(tp,aux.Stringid(3160805,2)) - else - op=Duel.SelectOption(tp,aux.Stringid(3160805,3))+1 - end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_HAND) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) - Duel.RegisterFlagEffect(tp,3160805,RESET_PHASE+PHASE_END,0,1) - end - e:SetLabel(op) -end -function c3160805.operation(e,tp,eg,ep,ev,re,r,rp) - if e:GetLabel()==2 or not e:GetHandler():IsRelateToEffect(e) then return end - if e:GetLabel()==0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c3160805.tgfilter1,tp,LOCATION_HAND,0,1,1,nil,tp) - if Duel.SendtoGrave(g,REASON_EFFECT)~=0 then - Duel.BreakEffect() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local tg=Duel.SelectMatchingCard(tp,c3160805.thfilter1,tp,LOCATION_DECK,0,1,1,nil,g:GetFirst():GetLevel()) - Duel.SendtoHand(tg,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tg) - end - else - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c3160805.tgfilter2,tp,LOCATION_HAND,0,1,1,nil,tp) - if Duel.SendtoGrave(g,REASON_EFFECT)~=0 then - Duel.BreakEffect() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local tg=Duel.SelectMatchingCard(tp,c3160805.thfilter2,tp,LOCATION_DECK,0,1,1,nil,g:GetFirst():GetLevel()) - Duel.SendtoHand(tg,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tg) - end - end -end -function c3160805.cost2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetFlagEffect(tp,3160805)==0 end - Duel.RegisterFlagEffect(tp,3160805,RESET_PHASE+PHASE_END,0,1) -end -function c3160805.target2(e,tp,eg,ep,ev,re,r,rp,chk) - local b1=Duel.IsExistingMatchingCard(c3160805.tgfilter1,tp,LOCATION_HAND,0,1,nil,tp) - local b2=Duel.IsExistingMatchingCard(c3160805.tgfilter2,tp,LOCATION_HAND,0,1,nil,tp) - if chk==0 then return b1 or b2 end - local op=0 - if b1 and b2 then - op=Duel.SelectOption(tp,aux.Stringid(3160805,2),aux.Stringid(3160805,3)) - elseif b1 then - op=Duel.SelectOption(tp,aux.Stringid(3160805,2)) - else - op=Duel.SelectOption(tp,aux.Stringid(3160805,3))+1 - end - e:SetLabel(op) - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_HAND) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end diff --git a/script/c31615285.lua b/script/c31615285.lua deleted file mode 100644 index ea8493c18e..0000000000 --- a/script/c31615285.lua +++ /dev/null @@ -1,24 +0,0 @@ ---サボウ・クローザー -function c31615285.initial_effect(c) - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - c:RegisterEffect(e1) - --disable spsummon - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetTargetRange(1,1) - e2:SetCondition(c31615285.dscon) - c:RegisterEffect(e2) -end -function c31615285.filter(c) - return c:IsFaceup() and c:IsRace(RACE_PLANT) -end -function c31615285.dscon(e) - return Duel.IsExistingMatchingCard(c31615285.filter,0,LOCATION_MZONE,LOCATION_MZONE,1,e:GetHandler()) -end diff --git a/script/c31632536.lua b/script/c31632536.lua deleted file mode 100644 index cf06baeb49..0000000000 --- a/script/c31632536.lua +++ /dev/null @@ -1,40 +0,0 @@ ---ラヴァル・ツインスレイヤー -function c31632536.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,nil,aux.NonTuner(Card.IsAttribute,ATTRIBUTE_FIRE),1) - c:EnableReviveLimit() - --chain attack - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_BATTLED) - e1:SetOperation(c31632536.caop1) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_DAMAGE_STEP_END) - e2:SetOperation(c31632536.caop2) - e2:SetLabelObject(e1) - c:RegisterEffect(e2) - --pierce - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_PIERCE) - e3:SetCondition(c31632536.pcon) - c:RegisterEffect(e3) -end -function c31632536.caop1(e,tp,eg,ep,ev,re,r,rp) - local a=Duel.GetAttacker() - local d=Duel.GetAttackTarget() - if e:GetHandler()==a and d and d:IsDefencePos() then e:SetLabel(1) - else e:SetLabel(0) end -end -function c31632536.caop2(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if e:GetLabelObject():GetLabel()==1 and c:IsRelateToBattle() and c:IsChainAttackable() - and Duel.GetMatchingGroupCount(Card.IsSetCard,tp,LOCATION_GRAVE,0,nil,0x39)>=2 then - Duel.ChainAttack() - end -end -function c31632536.pcon(e) - return Duel.GetMatchingGroupCount(Card.IsSetCard,e:GetHandler():GetControler(),LOCATION_GRAVE,0,nil,0x39)>=3 -end diff --git a/script/c3167573.lua b/script/c3167573.lua deleted file mode 100644 index d687e8913e..0000000000 --- a/script/c3167573.lua +++ /dev/null @@ -1,47 +0,0 @@ ---パペット・キング -function c3167573.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(3167573,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetRange(LOCATION_HAND) - e1:SetCode(EVENT_TO_HAND) - e1:SetCondition(c3167573.spcon) - e1:SetTarget(c3167573.sptg) - e1:SetOperation(c3167573.spop) - c:RegisterEffect(e1) -end -function c3167573.cfilter(c,tp) - return c:IsControler(1-tp) and c:IsPreviousLocation(LOCATION_DECK) and not c:IsReason(REASON_DRAW) - and c:IsType(TYPE_MONSTER) -end -function c3167573.spcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c3167573.cfilter,1,nil,tp) -end -function c3167573.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c3167573.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetRange(LOCATION_MZONE) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END+RESET_SELF_TURN) - e1:SetCountLimit(1) - e1:SetCondition(c3167573.descon) - e1:SetOperation(c3167573.desop) - c:RegisterEffect(e1) - end -end -function c3167573.descon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c3167573.desop(e,tp,eg,ep,ev,re,r,rp) - Duel.Destroy(e:GetHandler(),REASON_EFFECT) -end diff --git a/script/c31677606.lua b/script/c31677606.lua deleted file mode 100644 index 48c0caf64c..0000000000 --- a/script/c31677606.lua +++ /dev/null @@ -1,39 +0,0 @@ ---黒白の波動 -function c31677606.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_REMOVE+CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,0x1e0) - e1:SetCondition(c31677606.condition) - e1:SetTarget(c31677606.target) - e1:SetOperation(c31677606.activate) - c:RegisterEffect(e1) -end -function c31677606.cfilter(c) - return c:GetOverlayCount()>0 and c:GetOverlayGroup():IsExists(Card.IsType,1,nil,TYPE_SYNCHRO) -end -function c31677606.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c31677606.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) -end -function c31677606.filter(c) - return c:IsAbleToRemove() -end -function c31677606.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and c31677606.filter(chkc) end - if chk==0 then return Duel.IsPlayerCanDraw(tp,1) - and Duel.IsExistingTarget(c31677606.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,c31677606.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c31677606.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) and Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)>0 then - Duel.BreakEffect() - Duel.Draw(tp,1,REASON_EFFECT) - end -end diff --git a/script/c31692182.lua b/script/c31692182.lua deleted file mode 100644 index 71ed187427..0000000000 --- a/script/c31692182.lua +++ /dev/null @@ -1,33 +0,0 @@ ---コアキメイル・フルバリア -function c31692182.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(31692182,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c31692182.cost) - e1:SetOperation(c31692182.operation) - c:RegisterEffect(e1) -end -function c31692182.cfilter(c) - return c:IsCode(36623431) and c:IsAbleToDeckAsCost() -end -function c31692182.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c31692182.cfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectMatchingCard(tp,c31692182.cfilter,tp,LOCATION_HAND,0,1,1,nil) - Duel.SendtoDeck(g,nil,0,REASON_COST) -end -function c31692182.filter(e,c) - return c:IsType(TYPE_EFFECT) and not c:IsSetCard(0x1d) -end -function c31692182.operation(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e1:SetTarget(c31692182.filter) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN) - Duel.RegisterEffect(e1,tp) -end diff --git a/script/c31709826.lua b/script/c31709826.lua deleted file mode 100644 index b8d4f5879f..0000000000 --- a/script/c31709826.lua +++ /dev/null @@ -1,40 +0,0 @@ ---リバイバルスライム -function c31709826.initial_effect(c) - --reborn preparation - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(31709826,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetCondition(c31709826.spcon) - e1:SetCost(c31709826.spcost) - e1:SetOperation(c31709826.spop) - c:RegisterEffect(e1) - --reborn - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) - e2:SetRange(LOCATION_GRAVE) - e2:SetCountLimit(1) - e2:SetCondition(c31709826.spcon2) - e2:SetOperation(c31709826.spop2) - c:RegisterEffect(e2) -end -function c31709826.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) -end -function c31709826.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,1000) end - Duel.PayLPCost(tp,1000) -end -function c31709826.spop(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():RegisterFlagEffect(31709826,RESET_EVENT+0x1fe0000,0,0) -end -function c31709826.spcon2(e,tp,eg,ep,ev,re,r,rp) - return tp==Duel.GetTurnPlayer() and e:GetHandler():GetFlagEffect(31709826)>0 -end -function c31709826.spop2(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - c:ResetFlagEffect(31709826) - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP_DEFENCE) -end diff --git a/script/c3171055.lua b/script/c3171055.lua deleted file mode 100644 index c182ea0dfc..0000000000 --- a/script/c3171055.lua +++ /dev/null @@ -1,24 +0,0 @@ ---連鎖解呪 -function c3171055.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_CHAINING) - e1:SetCondition(c3171055.condition) - e1:SetTarget(c3171055.target) - e1:SetOperation(c3171055.activate) - c:RegisterEffect(e1) -end -function c3171055.condition(e,tp,eg,ep,ev,re,r,rp) - return re:IsHasType(EFFECT_TYPE_ACTIVATE) -end -function c3171055.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local g=Duel.GetMatchingGroup(Card.IsCode,ep,LOCATION_DECK,0,nil,re:GetHandler():GetCode()) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c3171055.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsCode,ep,LOCATION_DECK,0,nil,re:GetHandler():GetCode()) - Duel.Destroy(g,REASON_EFFECT) -end diff --git a/script/c31764353.lua b/script/c31764353.lua deleted file mode 100644 index 22731ecd6b..0000000000 --- a/script/c31764353.lua +++ /dev/null @@ -1,40 +0,0 @@ ---憑依装着-ウィン -function c31764353.initial_effect(c) - --spsummon proc - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND+LOCATION_DECK) - e1:SetCondition(c31764353.spcon) - e1:SetOperation(c31764353.spop) - c:RegisterEffect(e1) -end -function c31764353.spfilter1(c,tp) - return c:IsFaceup() and c:IsCode(37744402) and c:IsAbleToGraveAsCost() - and Duel.IsExistingMatchingCard(c31764353.spfilter2,tp,LOCATION_MZONE,0,1,c) -end -function c31764353.spfilter2(c) - return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_WIND) and c:IsAbleToGraveAsCost() -end -function c31764353.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.GetLocationCount(tp,LOCATION_MZONE)>-2 - and Duel.IsExistingMatchingCard(c31764353.spfilter1,tp,LOCATION_MZONE,0,1,nil,tp) -end -function c31764353.spop(e,tp,eg,ep,ev,re,r,rp,c) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g1=Duel.SelectMatchingCard(tp,c31764353.spfilter1,tp,LOCATION_MZONE,0,1,1,nil,tp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g2=Duel.SelectMatchingCard(tp,c31764353.spfilter2,tp,LOCATION_MZONE,0,1,1,g1:GetFirst()) - g1:Merge(g2) - Duel.SendtoGrave(g1,REASON_COST) - Duel.ShuffleDeck(tp) - --pierce - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_PIERCE) - e1:SetReset(RESET_EVENT+0xff0000) - c:RegisterEffect(e1) -end diff --git a/script/c31764700.lua b/script/c31764700.lua deleted file mode 100644 index deec9af3b8..0000000000 --- a/script/c31764700.lua +++ /dev/null @@ -1,62 +0,0 @@ ---ユベル-Das Extremer Traurig Drachen -function c31764700.initial_effect(c) - c:EnableReviveLimit() - --battle - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_AVOID_BATTLE_DAMAGE) - e1:SetValue(1) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e2:SetValue(1) - c:RegisterEffect(e2) - --damage - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e3:SetCode(EVENT_BATTLED) - e3:SetOperation(c31764700.batop) - c:RegisterEffect(e3) - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(31764700,0)) - e4:SetCategory(CATEGORY_DAMAGE+CATEGORY_DESTROY) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e4:SetCode(EVENT_DAMAGE_STEP_END) - e4:SetTarget(c31764700.damtg) - e4:SetOperation(c31764700.damop) - e4:SetLabelObject(e3) - c:RegisterEffect(e4) - --cannot special summon - local e5=Effect.CreateEffect(c) - e5:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e5:SetType(EFFECT_TYPE_SINGLE) - e5:SetCode(EFFECT_SPSUMMON_CONDITION) - c:RegisterEffect(e5) -end -function c31764700.batop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local bc=c:GetBattleTarget() - if bc and c:IsAttackPos() then - e:SetLabel(bc:GetAttack()) - e:SetLabelObject(bc) - else - e:SetLabelObject(nil) - end -end -function c31764700.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - local bc=e:GetLabelObject():GetLabelObject() - if chk==0 then return bc end - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,e:GetLabelObject():GetLabel()) - if bc:IsDestructable() then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,bc,1,0,0) - end -end -function c31764700.damop(e,tp,eg,ep,ev,re,r,rp) - Duel.Damage(1-tp,e:GetLabelObject():GetLabel(),REASON_EFFECT) - local bc=e:GetLabelObject():GetLabelObject() - if bc:IsRelateToBattle() then - Duel.Destroy(bc,REASON_EFFECT) - end -end diff --git a/script/c31766317.lua b/script/c31766317.lua deleted file mode 100644 index 8e2d389361..0000000000 --- a/script/c31766317.lua +++ /dev/null @@ -1,58 +0,0 @@ ---ヘル・エンプレス・デーモン -function c31766317.initial_effect(c) - --destroy replace - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_DESTROY_REPLACE) - e1:SetRange(LOCATION_MZONE) - e1:SetTarget(c31766317.destg) - e1:SetValue(1) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(31766317,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetCondition(c31766317.spcon) - e2:SetTarget(c31766317.sptg) - e2:SetOperation(c31766317.spop) - c:RegisterEffect(e2) -end -function c31766317.rfilter(c) - return c:IsRace(RACE_FIEND) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsAbleToRemove() -end -function c31766317.destg(e,tp,eg,ep,ev,re,r,rp,chk) - local dc=eg:GetFirst() - if chk==0 then return eg:GetCount()==1 and dc~=e:GetHandler() and dc:IsFaceup() and dc:IsLocation(LOCATION_MZONE) - and dc:IsRace(RACE_FIEND) and dc:IsAttribute(ATTRIBUTE_DARK) - and Duel.IsExistingMatchingCard(c31766317.rfilter,tp,LOCATION_GRAVE,0,1,nil) end - if Duel.SelectYesNo(tp,aux.Stringid(31766317,0)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c31766317.rfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.Remove(g,POS_FACEUP,REASON_EFFECT) - return true - else return false end -end -function c31766317.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsReason(REASON_DESTROY) and bit.band(e:GetHandler():GetPreviousLocation(),LOCATION_ONFIELD)~=0 -end -function c31766317.filter(c,e,tp) - return c:IsRace(RACE_FIEND) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsLevelAbove(6) - and c:GetCode()~=31766317 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c31766317.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c31766317.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c31766317.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c31766317.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c31766317.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c31768112.lua b/script/c31768112.lua deleted file mode 100644 index cc62be4c43..0000000000 --- a/script/c31768112.lua +++ /dev/null @@ -1,105 +0,0 @@ ---オイルメン -function c31768112.initial_effect(c) - --equip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(31768112,0)) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetTarget(c31768112.eqtg) - e1:SetOperation(c31768112.eqop) - c:RegisterEffect(e1) - --unequip - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(31768112,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_SZONE) - e2:SetCondition(c31768112.uncon) - e2:SetTarget(c31768112.sptg) - e2:SetOperation(c31768112.spop) - c:RegisterEffect(e2) - --destroy sub - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_EQUIP) - e3:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e3:SetCode(EFFECT_DESTROY_SUBSTITUTE) - e3:SetCondition(c31768112.uncon) - e3:SetValue(1) - c:RegisterEffect(e3) - --draw - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(31768112,2)) - e4:SetCategory(CATEGORY_DRAW) - e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e4:SetCode(EVENT_BATTLE_DESTROYING) - e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e4:SetRange(LOCATION_SZONE) - e4:SetCondition(c31768112.drcon) - e4:SetTarget(c31768112.drtg) - e4:SetOperation(c31768112.drop) - c:RegisterEffect(e4) - --eqlimit - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_SINGLE) - e5:SetCode(EFFECT_EQUIP_LIMIT) - e5:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e5:SetValue(c31768112.eqlimit) - c:RegisterEffect(e5) -end -function c31768112.uncon(e) - return e:GetHandler():IsStatus(STATUS_UNION) -end -function c31768112.eqlimit(e,c) - return c:IsRace(RACE_MACHINE) -end -function c31768112.filter(c) - return c:IsFaceup() and c:IsRace(RACE_MACHINE) and c:GetUnionCount()==0 -end -function c31768112.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c31768112.filter(chkc) end - if chk==0 then return e:GetHandler():GetFlagEffect(31768112)==0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingTarget(c31768112.filter,tp,LOCATION_MZONE,0,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local g=Duel.SelectTarget(tp,c31768112.filter,tp,LOCATION_MZONE,0,1,1,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0) - e:GetHandler():RegisterFlagEffect(31768112,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1) -end -function c31768112.eqop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if not c:IsRelateToEffect(e) or c:IsFacedown() then return end - if not tc:IsRelateToEffect(e) or not c31768112.filter(tc) then - Duel.SendtoGrave(c,REASON_EFFECT) - return - end - if not Duel.Equip(tp,c,tc,false) then return end - c:SetStatus(STATUS_UNION,true) -end -function c31768112.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():GetFlagEffect(31768112)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) - e:GetHandler():RegisterFlagEffect(31768112,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1) -end -function c31768112.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP_ATTACK) - end -end -function c31768112.drcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsStatus(STATUS_UNION) and e:GetHandler():GetEquipTarget()==eg:GetFirst() -end -function c31768112.drtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(1) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c31768112.drop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end diff --git a/script/c31785398.lua b/script/c31785398.lua deleted file mode 100644 index bd57312046..0000000000 --- a/script/c31785398.lua +++ /dev/null @@ -1,29 +0,0 @@ ---迎撃準備 -function c31785398.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_POSITION) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(TIMING_BATTLE_PHASE,0x1c0+TIMING_BATTLE_PHASE) - e1:SetTarget(c31785398.target) - e1:SetOperation(c31785398.activate) - c:RegisterEffect(e1) -end -function c31785398.filter(c) - return c:IsFaceup() and c:IsCanTurnSet() and c:IsRace(RACE_WARRIOR+RACE_SPELLCASTER) -end -function c31785398.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c31785398.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c31785398.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - local g=Duel.SelectTarget(tp,c31785398.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0) -end -function c31785398.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.ChangePosition(tc,POS_FACEDOWN_DEFENCE) - end -end diff --git a/script/c31786629.lua b/script/c31786629.lua deleted file mode 100644 index 7389f13324..0000000000 --- a/script/c31786629.lua +++ /dev/null @@ -1,33 +0,0 @@ ---サンダー・ドラゴン -function c31786629.initial_effect(c) - --search - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(31786629,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND) - e1:SetCost(c31786629.cost) - e1:SetTarget(c31786629.target) - e1:SetOperation(c31786629.operation) - c:RegisterEffect(e1) -end -function c31786629.cost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsDiscardable() end - Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD) -end -function c31786629.filter(c) - return c:GetCode()==31786629 and c:IsAbleToHand() -end -function c31786629.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chk==0 then return Duel.IsExistingMatchingCard(c31786629.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c31786629.operation(e,tp,eg,ep,ev,re,r,rp,chk) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c31786629.filter,tp,LOCATION_DECK,0,1,2,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c31801517.lua b/script/c31801517.lua deleted file mode 100644 index 398eae56a1..0000000000 --- a/script/c31801517.lua +++ /dev/null @@ -1,106 +0,0 @@ ---No.62 銀河眼の光子竜皇 -function c31801517.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,8,2) - c:EnableReviveLimit() - --atk - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(31801517,0)) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_PRE_DAMAGE_CALCULATE) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c31801517.atkcon) - e1:SetCost(c31801517.atkcost) - e1:SetOperation(c31801517.atkop) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(31801517,1)) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_DESTROYED) - e2:SetCondition(c31801517.spcon) - e2:SetOperation(c31801517.spop) - c:RegisterEffect(e2) - --half damage - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e3:SetCode(EVENT_PRE_BATTLE_DAMAGE) - e3:SetCondition(c31801517.rdcon) - e3:SetOperation(c31801517.rdop) - c:RegisterEffect(e3) -end -c31801517.xyz_number=62 -function c31801517.atkcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c==Duel.GetAttacker() or c==Duel.GetAttackTarget() -end -function c31801517.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:CheckRemoveOverlayCard(tp,1,REASON_COST) and c:GetFlagEffect(31801517)==0 end - c:RemoveOverlayCard(tp,1,1,REASON_COST) - c:RegisterFlagEffect(31801517,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_DAMAGE_CAL,0,1) -end -function c31801517.atkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - local val=g:GetSum(Card.GetRank)*200 - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(val) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_DAMAGE_CAL) - c:RegisterEffect(e1) - end -end -function c31801517.spcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:GetPreviousControler()==tp and rp~=tp and c:IsReason(REASON_EFFECT) - and c:IsPreviousLocation(LOCATION_MZONE) and c:GetOverlayGroup():IsExists(Card.IsCode,1,nil,93717133) - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c31801517.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetRange(LOCATION_REMOVED+LOCATION_GRAVE) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) - if Duel.GetCurrentPhase()==PHASE_STANDBY and Duel.GetTurnPlayer()==tp then - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,3) - else - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,2) - end - e1:SetCountLimit(1) - e1:SetCondition(c31801517.spcon2) - e1:SetOperation(c31801517.spop2) - c:RegisterEffect(e1) - c:SetTurnCounter(0) -end -function c31801517.spcon2(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c31801517.spop2(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local ct=c:GetTurnCounter() - ct=ct+1 - c:SetTurnCounter(ct) - if ct==2 then - Duel.SpecialSummonStep(c,0,tp,tp,false,false,POS_FACEUP) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_COPY_INHERIT) - e1:SetCode(EFFECT_SET_ATTACK) - e1:SetValue(c:GetAttack()*2) - e1:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e1) - Duel.SpecialSummonComplete() - end -end -function c31801517.rdcon(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp and not e:GetHandler():GetOverlayGroup():IsExists(Card.IsCode,1,nil,93717133) -end -function c31801517.rdop(e,tp,eg,ep,ev,re,r,rp) - Duel.ChangeBattleDamage(ep,ev/2) -end diff --git a/script/c31812496.lua b/script/c31812496.lua deleted file mode 100644 index 6ea2d40506..0000000000 --- a/script/c31812496.lua +++ /dev/null @@ -1,17 +0,0 @@ ---アステカの石像 -function c31812496.initial_effect(c) - --deepen damage - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE) - e1:SetCode(EVENT_PRE_BATTLE_DAMAGE) - e1:SetCondition(c31812496.dcon) - e1:SetOperation(c31812496.dop) - c:RegisterEffect(e1) -end -function c31812496.dcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return ep~=tp and Duel.GetAttackTarget()==c -end -function c31812496.dop(e,tp,eg,ep,ev,re,r,rp) - Duel.ChangeBattleDamage(ep,ev*2) -end diff --git a/script/c31826057.lua b/script/c31826057.lua deleted file mode 100644 index a09bfedf50..0000000000 --- a/script/c31826057.lua +++ /dev/null @@ -1,59 +0,0 @@ ---音響戦士ピアーノ -function c31826057.initial_effect(c) - --race change - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(31826057,0)) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetTarget(c31826057.target1) - e1:SetOperation(c31826057.operation) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(31826057,0)) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_GRAVE) - e2:SetCost(c31826057.cost) - e2:SetTarget(c31826057.target2) - e2:SetOperation(c31826057.operation) - c:RegisterEffect(e2) -end -function c31826057.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) -end -function c31826057.filter(c) - return c:IsFaceup() and c:IsSetCard(0x1066) and c:IsLevelAbove(1) -end -function c31826057.target1(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c31826057.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c31826057.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c31826057.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.Hint(HINT_SELECTMSG,tp,563) - local rc=Duel.AnnounceRace(tp,1,0xffffff) - e:SetLabel(rc) -end -function c31826057.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c31826057.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c31826057.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c31826057.filter,tp,LOCATION_MZONE,0,1,1,nil) - Duel.Hint(HINT_SELECTMSG,tp,563) - local rc=Duel.AnnounceRace(tp,1,0xffffff) - e:SetLabel(rc) -end -function c31826057.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CHANGE_RACE) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(e:GetLabel()) - tc:RegisterEffect(e1) - end -end diff --git a/script/c31828916.lua b/script/c31828916.lua deleted file mode 100644 index 0aec89850b..0000000000 --- a/script/c31828916.lua +++ /dev/null @@ -1,67 +0,0 @@ ---機甲部隊の最前線 -function c31828916.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --special summon - local e3=Effect.CreateEffect(c) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetDescription(aux.Stringid(31828916,0)) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetRange(LOCATION_SZONE) - e3:SetCode(EVENT_BATTLE_DESTROYED) - e3:SetCountLimit(1) - e3:SetTarget(c31828916.target) - e3:SetOperation(c31828916.operation) - c:RegisterEffect(e3) -end -function c31828916.cfilter(c,e,tp) - return c:IsRace(RACE_MACHINE) and c:IsControler(tp) and c:IsLocation(LOCATION_GRAVE) and c:IsReason(REASON_BATTLE) - and bit.band(c:GetPreviousRaceOnField(),RACE_MACHINE)~=0 - and Duel.IsExistingMatchingCard(c31828916.filter,tp,LOCATION_DECK,0,1,nil,c:GetAttack(),c:GetAttribute(),e,tp) -end -function c31828916.filter(c,atk,att,e,tp) - local a=c:GetAttack() - return a>=0 and a0 - and eg:IsExists(c31828916.cfilter,1,nil,e,tp) end - Duel.SetTargetCard(eg) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c31828916.cfilter2(c,e,tp) - return c:IsRace(RACE_MACHINE) and c:IsControler(tp) and c:IsRelateToEffect(e) - and Duel.IsExistingMatchingCard(c31828916.filter,tp,LOCATION_DECK,0,1,nil,c:GetAttack(),c:GetAttribute(),e,tp) -end -function c31828916.operation(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local sg=eg:Filter(c31828916.cfilter2,nil,e,tp) - if sg:GetCount()==1 then - local tc=sg:GetFirst() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c31828916.filter,tp,LOCATION_DECK,0,1,1,nil,tc:GetAttack(),tc:GetAttribute(),e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end - else - local tc=sg:GetFirst() - if not tc then return end - local atk=tc:GetAttack() - local att=tc:GetAttribute() - tc=sg:GetNext() - if tc then - if tc:GetAttack()>atk then atk=tc:GetAttack() end - att=bit.bor(att,tc:GetAttribute()) - end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c31828916.filter,tp,LOCATION_DECK,0,1,1,nil,atk,att,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end - end -end diff --git a/script/c31829185.lua b/script/c31829185.lua deleted file mode 100644 index 0f6c94f708..0000000000 --- a/script/c31829185.lua +++ /dev/null @@ -1,86 +0,0 @@ ---ダーク・ネクロフィア -function c31829185.initial_effect(c) - c:EnableReviveLimit() - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c31829185.spcon) - e1:SetOperation(c31829185.spop) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetOperation(c31829185.tgop) - c:RegisterEffect(e2) -end -function c31829185.spfilter(c) - return c:IsRace(RACE_FIEND) and c:IsAbleToRemoveAsCost() -end -function c31829185.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c31829185.spfilter,tp,LOCATION_GRAVE,0,3,nil) -end -function c31829185.spop(e,tp,eg,ep,ev,re,r,rp,c) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c31829185.spfilter,tp,LOCATION_GRAVE,0,3,3,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c31829185.tgop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_MZONE) - and rp~=tp and bit.band(r,REASON_DESTROY)~=0 then - --equip action - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_GRAVE) - e1:SetCountLimit(1) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e1:SetTarget(c31829185.eqtg) - e1:SetOperation(c31829185.eqop) - c:RegisterEffect(e1) - end -end -function c31829185.filter(c) - return c:IsFaceup() and c:IsControlerCanBeChanged() -end -function c31829185.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c31829185.filter(chkc) end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) - local g=Duel.SelectTarget(tp,c31829185.filter,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c31829185.eqlimit(e,c) - return e:GetOwner()==c -end -function c31829185.eqop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end - local tc=Duel.GetFirstTarget() - if tc and c:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsRelateToEffect(e) then - Duel.Equip(tp,c,tc) - --Add Equip limit - local e1=Effect.CreateEffect(tc) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(c31829185.eqlimit) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_SET_CONTROL) - e2:SetValue(tp) - e2:SetReset(RESET_EVENT+0x1fc0000) - c:RegisterEffect(e2) - end -end diff --git a/script/c31849106.lua b/script/c31849106.lua deleted file mode 100644 index 679ecfbd08..0000000000 --- a/script/c31849106.lua +++ /dev/null @@ -1,23 +0,0 @@ ---異次元グランド -function c31849106.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetOperation(c31849106.activate) - c:RegisterEffect(e1) -end -function c31849106.activate(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_RANGE) - e1:SetCode(EFFECT_TO_GRAVE_REDIRECT) - e1:SetTarget(c31849106.rmtarget) - e1:SetTargetRange(0xff, 0xff) - e1:SetValue(LOCATION_REMOVED) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function c31849106.rmtarget(e,c) - return not c:IsLocation(0x80) and not c:IsType(TYPE_SPELL+TYPE_TRAP) -end diff --git a/script/c31863912.lua b/script/c31863912.lua deleted file mode 100644 index f36778de2e..0000000000 --- a/script/c31863912.lua +++ /dev/null @@ -1,51 +0,0 @@ ---出目出し -function c31863912.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_SPSUMMON) - e1:SetTarget(c31863912.target1) - e1:SetOperation(c31863912.operation) - c:RegisterEffect(e1) - -- - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(31863912,0)) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetRange(LOCATION_SZONE) - e2:SetTarget(c31863912.target2) - e2:SetOperation(c31863912.operation) - e2:SetLabel(1) - c:RegisterEffect(e2) -end -function c31863912.cfilter(c,sp) - return c:IsFaceup() and c:GetSummonPlayer()==sp -end -function c31863912.target1(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local res,teg,tep,tev,tre,tr,trp=Duel.CheckEvent(EVENT_SPSUMMON_SUCCESS,true) - if res and teg:IsExists(c31863912.cfilter,1,nil,1-tp) then - e:SetLabel(1) - Duel.SetTargetCard(teg) - Duel.SetOperationInfo(0,CATEGORY_DICE,nil,0,tp,1) - else - e:SetLabel(0) - end -end -function c31863912.target2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return eg:IsExists(c31863912.cfilter,1,nil,1-tp) end - Duel.SetTargetCard(eg) - Duel.SetOperationInfo(0,CATEGORY_DICE,nil,0,tp,1) -end -function c31863912.filter(c,sp,e,lv) - return c:IsFaceup() and c:GetSummonPlayer()==sp and c:GetLevel()==lv and c:IsAbleToHand() and c:IsRelateToEffect(e) -end -function c31863912.operation(e,tp,eg,ep,ev,re,r,rp) - if e:GetLabel()==0 or not e:GetHandler():IsRelateToEffect(e) then return end - local dc=Duel.TossDice(tp,1) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(c31863912.filter,nil,1-tp,e,dc) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - end -end diff --git a/script/c31887905.lua b/script/c31887905.lua deleted file mode 100644 index 71446caa09..0000000000 --- a/script/c31887905.lua +++ /dev/null @@ -1,40 +0,0 @@ ---憑依装着-アウス -function c31887905.initial_effect(c) - --spsummon proc - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND+LOCATION_DECK) - e1:SetCondition(c31887905.spcon) - e1:SetOperation(c31887905.spop) - c:RegisterEffect(e1) -end -function c31887905.spfilter1(c,tp) - return c:IsFaceup() and c:IsCode(37970940) and c:IsAbleToGraveAsCost() - and Duel.IsExistingMatchingCard(c31887905.spfilter2,tp,LOCATION_MZONE,0,1,c) -end -function c31887905.spfilter2(c) - return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_EARTH) and c:IsAbleToGraveAsCost() -end -function c31887905.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.GetLocationCount(tp,LOCATION_MZONE)>-2 - and Duel.IsExistingMatchingCard(c31887905.spfilter1,tp,LOCATION_MZONE,0,1,nil,tp) -end -function c31887905.spop(e,tp,eg,ep,ev,re,r,rp,c) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g1=Duel.SelectMatchingCard(tp,c31887905.spfilter1,tp,LOCATION_MZONE,0,1,1,nil,tp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g2=Duel.SelectMatchingCard(tp,c31887905.spfilter2,tp,LOCATION_MZONE,0,1,1,g1:GetFirst()) - g1:Merge(g2) - Duel.SendtoGrave(g1,REASON_COST) - Duel.ShuffleDeck(tp) - --pierce - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_PIERCE) - e1:SetReset(RESET_EVENT+0xff0000) - c:RegisterEffect(e1) -end diff --git a/script/c31890399.lua b/script/c31890399.lua deleted file mode 100644 index c7b23cb533..0000000000 --- a/script/c31890399.lua +++ /dev/null @@ -1,4 +0,0 @@ ---デビルズ・ミラー -function c31890399.initial_effect(c) - c:EnableReviveLimit() -end diff --git a/script/c31893528.lua b/script/c31893528.lua deleted file mode 100644 index 4b890c2b0d..0000000000 --- a/script/c31893528.lua +++ /dev/null @@ -1,11 +0,0 @@ ---死のメッセージ「E」 -function c31893528.initial_effect(c) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_SSET) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - c:RegisterEffect(e2) -end diff --git a/script/c31904181.lua b/script/c31904181.lua deleted file mode 100644 index f33adcf81b..0000000000 --- a/script/c31904181.lua +++ /dev/null @@ -1,46 +0,0 @@ ---六武衆-ニサシ -function c31904181.initial_effect(c) - --atk twice - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_EXTRA_ATTACK) - e1:SetCondition(c31904181.dircon) - e1:SetValue(1) - c:RegisterEffect(e1) - --Destroy replace - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DESTROY_REPLACE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetTarget(c31904181.desreptg) - e2:SetOperation(c31904181.desrepop) - c:RegisterEffect(e2) -end -function c31904181.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x3d) and c:GetCode()~=31904181 -end -function c31904181.dircon(e) - return Duel.IsExistingMatchingCard(c31904181.cfilter,e:GetHandler():GetControler(),LOCATION_MZONE,0,1,nil) -end -function c31904181.repfilter(c) - return c:IsFaceup() and c:IsSetCard(0x3d) and not c:IsStatus(STATUS_DESTROY_CONFIRMED+STATUS_BATTLE_DESTROYED) -end -function c31904181.desreptg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return not c:IsReason(REASON_REPLACE) and c:IsOnField() and c:IsFaceup() - and Duel.IsExistingMatchingCard(c31904181.repfilter,tp,LOCATION_MZONE,0,1,c) end - if Duel.SelectYesNo(tp,aux.Stringid(31904181,0)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESREPLACE) - local g=Duel.SelectMatchingCard(tp,c31904181.repfilter,tp,LOCATION_MZONE,0,1,1,c) - e:SetLabelObject(g:GetFirst()) - Duel.HintSelection(g) - g:GetFirst():SetStatus(STATUS_DESTROY_CONFIRMED,true) - return true - else return false end -end -function c31904181.desrepop(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetLabelObject() - tc:SetStatus(STATUS_DESTROY_CONFIRMED,false) - Duel.Destroy(tc,REASON_EFFECT+REASON_REPLACE) -end diff --git a/script/c31919988.lua b/script/c31919988.lua deleted file mode 100644 index 3d39e69e16..0000000000 --- a/script/c31919988.lua +++ /dev/null @@ -1,63 +0,0 @@ ---漆黒のズムウォルト -function c31919988.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure2(c,aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_DARK),aux.NonTuner(Card.IsRace,RACE_INSECT)) - c:EnableReviveLimit() - --indes - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e1:SetValue(1) - c:RegisterEffect(e1) - --atk change - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(31919988,0)) - e2:SetCategory(CATEGORY_ATKCHANGE) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_ATTACK_ANNOUNCE) - e2:SetCondition(c31919988.atcon) - e2:SetTarget(c31919988.attg) - e2:SetOperation(c31919988.atop) - c:RegisterEffect(e2) - --battle destroying - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(31919988,1)) - e3:SetCategory(CATEGORY_DECKDES) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e3:SetCode(EVENT_BATTLE_DESTROYING) - e3:SetCondition(c31919988.ddcon) - e3:SetTarget(c31919988.ddtg) - e3:SetOperation(c31919988.ddop) - c:RegisterEffect(e3) -end -function c31919988.atcon(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetHandler():GetBattleTarget() - return tc and tc:IsFaceup() and tc:GetAttack()>e:GetHandler():GetAttack() -end -function c31919988.attg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - e:GetHandler():GetBattleTarget():CreateEffectRelation(e) -end -function c31919988.atop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=c:GetBattleTarget() - if not c:IsRelateToEffect(e) or c:IsFacedown() or tc:IsFacedown() or not tc:IsRelateToEffect(e) - or tc:GetAttack()<=c:GetAttack() then return end - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetValue(c:GetAttack()) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_BATTLE) - tc:RegisterEffect(e1) -end -function c31919988.ddcon(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetHandler():GetBattleTarget() - return tc:IsLocation(LOCATION_GRAVE) and tc:IsReason(REASON_BATTLE) -end -function c31919988.ddtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,1-tp,3) -end -function c31919988.ddop(e,tp,eg,ep,ev,re,r,rp) - Duel.DiscardDeck(1-tp,3,REASON_EFFECT) -end diff --git a/script/c31924889.lua b/script/c31924889.lua deleted file mode 100644 index 82ba02c079..0000000000 --- a/script/c31924889.lua +++ /dev/null @@ -1,66 +0,0 @@ ---アーカナイト・マジシャン -function c31924889.initial_effect(c) - c:EnableCounterPermit(0x3001) - --synchro summon - aux.AddSynchroProcedure(c,nil,aux.NonTuner(Card.IsRace,RACE_SPELLCASTER),1) - c:EnableReviveLimit() - --attackup - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(c31924889.attackup) - c:RegisterEffect(e1) - --synchro success - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(31924889,0)) - e2:SetCategory(CATEGORY_COUNTER) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetCondition(c31924889.addcc) - e2:SetTarget(c31924889.addct) - e2:SetOperation(c31924889.addc) - c:RegisterEffect(e2) - --destroy - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(31924889,1)) - e3:SetCategory(CATEGORY_DESTROY) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_MZONE) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetCost(c31924889.descost) - e3:SetTarget(c31924889.destg) - e3:SetOperation(c31924889.desop) - c:RegisterEffect(e3) -end -function c31924889.attackup(e,c) - return c:GetCounter(0x3001)*1000 -end -function c31924889.addcc(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_SYNCHRO -end -function c31924889.addct(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,2,0,0x3001) -end -function c31924889.addc(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - e:GetHandler():AddCounter(0x3001,2) - end -end -function c31924889.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsCanRemoveCounter(tp,1,0,0x3001,1,REASON_COST) end - Duel.RemoveCounter(tp,1,0,0x3001,1,REASON_COST) -end -function c31924889.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and chkc:IsDestructable() end - if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,0,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,0,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c31924889.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsControler(1-tp) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c31930787.lua b/script/c31930787.lua deleted file mode 100644 index 447d770bf0..0000000000 --- a/script/c31930787.lua +++ /dev/null @@ -1,135 +0,0 @@ ---機皇帝スキエル∞ -function c31930787.initial_effect(c) - c:EnableReviveLimit() - --special summon condition - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(0) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(31930787,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetRange(LOCATION_HAND) - e2:SetCondition(c31930787.spcon) - e2:SetTarget(c31930787.sptg) - e2:SetOperation(c31930787.spop) - c:RegisterEffect(e2) - --cannot attack announce - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetRange(LOCATION_MZONE) - e3:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE) - e3:SetTargetRange(LOCATION_MZONE,0) - e3:SetTarget(c31930787.antarget) - c:RegisterEffect(e3) - --equip - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(31930787,1)) - e4:SetCategory(CATEGORY_EQUIP) - e4:SetType(EFFECT_TYPE_IGNITION) - e4:SetProperty(EFFECT_FLAG_CARD_TARGET) - e4:SetRange(LOCATION_MZONE) - e4:SetCountLimit(1) - e4:SetTarget(c31930787.eqtg) - e4:SetOperation(c31930787.eqop) - c:RegisterEffect(e4) - --direct attack - local e5=Effect.CreateEffect(c) - e5:SetDescription(aux.Stringid(31930787,2)) - e5:SetType(EFFECT_TYPE_IGNITION) - e5:SetRange(LOCATION_MZONE) - e5:SetCondition(c31930787.dircon) - e5:SetCost(c31930787.dircost) - e5:SetOperation(c31930787.dirop) - c:RegisterEffect(e5) -end -function c31930787.filter(c,tp) - return c:IsType(TYPE_MONSTER) and bit.band(c:GetReason(),0x41)==0x41 and c:GetPreviousControler()==tp - and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP) -end -function c31930787.spcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c31930787.filter,1,nil,tp) -end -function c31930787.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,true) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c31930787.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,true,true,POS_FACEUP)>0 then - c:CompleteProcedure() - end -end -function c31930787.antarget(e,c) - return c~=e:GetHandler() -end -function c31930787.eqfilter(c) - return c:IsFaceup() and c:IsType(TYPE_SYNCHRO) and c:IsAbleToChangeControler() -end -function c31930787.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c31930787.eqfilter(chkc) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingTarget(c31930787.eqfilter,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local g=Duel.SelectTarget(tp,c31930787.eqfilter,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0) -end -function c31930787.eqlimit(e,c) - return e:GetOwner()==c -end -function c31930787.eqop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) and tc:IsType(TYPE_MONSTER)then - if c:IsFaceup() and c:IsRelateToEffect(e) then - local atk=tc:GetTextAttack() - if atk<0 then atk=0 end - if not Duel.Equip(tp,tc,c,false) then return end - --Add Equip limit - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_COPY_INHERIT+EFFECT_FLAG_OWNER_RELATE) - e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(c31930787.eqlimit) - tc:RegisterEffect(e1) - if atk>0 then - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_OWNER_RELATE) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetReset(RESET_EVENT+0x1fe0000) - e2:SetValue(atk) - tc:RegisterEffect(e2) - end - else Duel.SendtoGrave(tc,REASON_EFFECT) end - end -end -function c31930787.dircon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()==PHASE_MAIN1 and not e:GetHandler():IsHasEffect(EFFECT_DIRECT_ATTACK) -end -function c31930787.dcfilter(c) - return bit.band(c:GetOriginalType(),TYPE_MONSTER)~=0 and c:IsAbleToGraveAsCost() -end -function c31930787.dircost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():GetEquipGroup():IsExists(c31930787.dcfilter,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=e:GetHandler():GetEquipGroup():FilterSelect(tp,c31930787.dcfilter,1,1,nil) - Duel.SendtoGrave(g,REASON_COST) -end -function c31930787.dirop(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if c:IsFacedown() or not c:IsRelateToEffect(e) then return end - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DIRECT_ATTACK) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - c:RegisterEffect(e1,true) -end diff --git a/script/c31975743.lua b/script/c31975743.lua deleted file mode 100644 index cc3a3fc64f..0000000000 --- a/script/c31975743.lua +++ /dev/null @@ -1,58 +0,0 @@ ---マジシャンズ・エイプ -function c31975743.initial_effect(c) - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - c:RegisterEffect(e1) - --control - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(31975743,0)) - e2:SetCategory(CATEGORY_CONTROL) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCondition(c31975743.condition) - e2:SetCost(c31975743.cost) - e2:SetTarget(c31975743.target) - e2:SetOperation(c31975743.operation) - c:RegisterEffect(e2) -end -function c31975743.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsAttackPos() -end -function c31975743.cfilter(c) - return c:IsType(TYPE_MONSTER) and c:IsAbleToGraveAsCost() -end -function c31975743.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c31975743.cfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c31975743.cfilter,tp,LOCATION_HAND,0,1,1,nil) - Duel.SendtoGrave(g,REASON_COST) -end -function c31975743.filter(c) - return c:IsPosition(POS_FACEUP_DEFENCE) and c:IsControlerCanBeChanged() -end -function c31975743.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c31975743.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c31975743.filter,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) - local g=Duel.SelectTarget(tp,c31975743.filter,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0) -end -function c31975743.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - if Duel.GetControl(tc,tp,PHASE_END,1) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_CHANGE_POSITION) - e1:SetReset(RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - elseif not tc:IsImmuneToEffect(e) and tc:IsAbleToChangeControler() then - Duel.Destroy(tc,REASON_EFFECT) - end - end -end diff --git a/script/c31986288.lua b/script/c31986288.lua deleted file mode 100644 index 66bb98ddb7..0000000000 --- a/script/c31986288.lua +++ /dev/null @@ -1,31 +0,0 @@ ---スプリット・D・ローズ -function c31986288.initial_effect(c) - --token - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(31986288,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetCondition(c31986288.condition) - e1:SetTarget(c31986288.target) - e1:SetOperation(c31986288.operation) - c:RegisterEffect(e1) -end -function c31986288.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) -end -function c31986288.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>1 - and Duel.IsPlayerCanSpecialSummonMonster(tp,31986289,0,0x4011,1200,1200,3,RACE_PLANT,ATTRIBUTE_DARK) end - Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,2,0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,0,0) -end -function c31986288.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 then return end - if not Duel.IsPlayerCanSpecialSummonMonster(tp,31986289,0,0x4011,1200,1200,3,RACE_PLANT,ATTRIBUTE_DARK) then return end - for i=1,2 do - local token=Duel.CreateToken(tp,31986289) - Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP) - end - Duel.SpecialSummonComplete() -end diff --git a/script/c31991800.lua b/script/c31991800.lua deleted file mode 100644 index 2e98ce7541..0000000000 --- a/script/c31991800.lua +++ /dev/null @@ -1,57 +0,0 @@ ---マジェスペクター・ラクーン -function c31991800.initial_effect(c) - --pendulum summon - aux.AddPendulumProcedure(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --search - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_SUMMON_SUCCESS) - e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e2:SetCountLimit(1,31991800) - e2:SetTarget(c31991800.thtg) - e2:SetOperation(c31991800.thop) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e3) - --cannot target - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e4:SetRange(LOCATION_MZONE) - e4:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) - e4:SetValue(aux.tgoval) - c:RegisterEffect(e4) - --indes - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_SINGLE) - e5:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e5:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - e5:SetRange(LOCATION_MZONE) - e5:SetValue(c31991800.indval) - c:RegisterEffect(e5) -end -function c31991800.thfilter(c) - return c:IsSetCard(0xd0) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() -end -function c31991800.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c31991800.thfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c31991800.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c31991800.thfilter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end -function c31991800.indval(e,re,tp) - return tp~=e:GetHandlerPlayer() -end diff --git a/script/c32003338.lua b/script/c32003338.lua deleted file mode 100644 index 6604b2efa7..0000000000 --- a/script/c32003338.lua +++ /dev/null @@ -1,41 +0,0 @@ ---No.34 電算機獣テラ・バイト -function c32003338.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,3,3) - c:EnableReviveLimit() - --control - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_CONTROL) - e1:SetDescription(aux.Stringid(32003338,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c32003338.cost) - e1:SetTarget(c32003338.target) - e1:SetOperation(c32003338.operation) - c:RegisterEffect(e1) -end -c32003338.xyz_number=34 -function c32003338.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c32003338.filter(c) - return c:IsFaceup() and c:IsAttackPos() and c:IsLevelBelow(4) and c:IsControlerCanBeChanged() -end -function c32003338.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c32003338.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c32003338.filter,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) - local g=Duel.SelectTarget(tp,c32003338.filter,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0) -end -function c32003338.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and not Duel.GetControl(tc,tp,PHASE_END,1) then - if not tc:IsImmuneToEffect(e) and tc:IsAbleToChangeControler() then - Duel.Destroy(tc,REASON_EFFECT) - end - end -end diff --git a/script/c32013448.lua b/script/c32013448.lua deleted file mode 100644 index ee1a12d3b0..0000000000 --- a/script/c32013448.lua +++ /dev/null @@ -1,127 +0,0 @@ ---宵闇の騎士 -function c32013448.initial_effect(c) - --gain - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EVENT_BE_MATERIAL) - e1:SetCondition(c32013448.mtcon) - e1:SetOperation(c32013448.mtop) - c:RegisterEffect(e1) - --tohand - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_REMOVE) - e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e2:SetCountLimit(1,32013448) - e2:SetCondition(c32013448.thcon) - e2:SetTarget(c32013448.thtg) - e2:SetOperation(c32013448.thop) - c:RegisterEffect(e2) -end -function c32013448.mtcon(e,tp,eg,ep,ev,re,r,rp) - return r==REASON_RITUAL -end -function c32013448.mtop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetFlagEffect(tp,32013448)~=0 then return end - local c=e:GetHandler() - local g=eg:Filter(Card.IsSetCard,nil,0xcf) - local rc=g:GetFirst() - if not rc then return end - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(32013448,0)) - e1:SetCategory(CATEGORY_REMOVE) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetTarget(c32013448.rmtg) - e1:SetOperation(c32013448.rmop) - e1:SetReset(RESET_EVENT+0x1fe0000) - rc:RegisterEffect(e1,true) - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(32013448,1)) - e2:SetCategory(CATEGORY_REMOVE) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetTarget(c32013448.rmtg2) - e2:SetOperation(c32013448.rmop2) - e2:SetReset(RESET_EVENT+0x1fe0000) - rc:RegisterEffect(e2,true) - if not rc:IsType(TYPE_EFFECT) then - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_ADD_TYPE) - e3:SetValue(TYPE_EFFECT) - e3:SetReset(RESET_EVENT+0x1fe0000) - rc:RegisterEffect(e3,true) - end - Duel.RegisterFlagEffect(tp,32013448,RESET_PHASE+PHASE_END,0,1) -end -function c32013448.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsAbleToRemove() end - if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) -end -function c32013448.rmop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) - end -end -function c32013448.rmtg2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_HAND,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,1-tp,LOCATION_HAND) -end -function c32013448.rmop2(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_HAND,nil) - if g:GetCount()==0 then return end - local sg=g:RandomSelect(tp,1) - local tc=sg:GetFirst() - Duel.Remove(tc,POS_FACEDOWN,REASON_EFFECT) - tc:RegisterFlagEffect(32013448,RESET_EVENT+0x1fe0000,0,1) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetCountLimit(1) - e1:SetCondition(c32013448.retcon) - e1:SetOperation(c32013448.retop) - e1:SetLabelObject(tc) - e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN) - Duel.RegisterEffect(e1,tp) -end -function c32013448.retcon(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetLabelObject() - if tc:GetFlagEffect(32013448)==0 then - e:Reset() - return false - else - return Duel.GetTurnPlayer()~=tp - end -end -function c32013448.retop(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetLabelObject() - Duel.SendtoHand(tc,nil,REASON_EFFECT) -end -function c32013448.thcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_GRAVE) -end -function c32013448.thfilter(c) - return bit.band(c:GetType(),0x81)==0x81 and c:IsAbleToHand() -end -function c32013448.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c32013448.thfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c32013448.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c32013448.thfilter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c32015116.lua b/script/c32015116.lua deleted file mode 100644 index 237b2cac4e..0000000000 --- a/script/c32015116.lua +++ /dev/null @@ -1,40 +0,0 @@ ---無差別破壊 -function c32015116.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_END_PHASE) - c:RegisterEffect(e1) - --roll and destroy - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(32015116,0)) - e2:SetCategory(CATEGORY_DESTROY+CATEGORY_DICE) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetRange(LOCATION_SZONE) - e2:SetCountLimit(1) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) - e2:SetCondition(c32015116.rdcon) - e2:SetTarget(c32015116.rdtg) - e2:SetOperation(c32015116.rdop) - c:RegisterEffect(e2) -end -function c32015116.rdcon(e,tp,eg,ep,ev,re,r,rp) - return tp==Duel.GetTurnPlayer() -end -function c32015116.rdtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DICE,nil,0,tp,1) -end -function c32015116.rdfilter(c,lv) - if lv<6 then - return c:IsFaceup() and c:IsDestructable() and c:GetLevel()==lv - else - return c:IsFaceup() and c:IsDestructable() and c:GetLevel()>=6 end -end -function c32015116.rdop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local d1=Duel.TossDice(tp,1) - local g=Duel.GetMatchingGroup(c32015116.rdfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,d1) - Duel.Destroy(g,REASON_EFFECT) -end diff --git a/script/c32022366.lua b/script/c32022366.lua deleted file mode 100644 index f81388a11f..0000000000 --- a/script/c32022366.lua +++ /dev/null @@ -1,47 +0,0 @@ ---重力の斧-グラール -function c32022366.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c32022366.target) - e1:SetOperation(c32022366.operation) - c:RegisterEffect(e1) - --Atk - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(500) - c:RegisterEffect(e2) - --Equip limit - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_EQUIP_LIMIT) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e3:SetValue(1) - c:RegisterEffect(e3) - --pos limit - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_FIELD) - e4:SetCode(EFFECT_CANNOT_CHANGE_POSITION) - e4:SetProperty(EFFECT_FLAG_SET_AVAILABLE) - e4:SetRange(LOCATION_SZONE) - e4:SetTargetRange(0,LOCATION_MZONE) - c:RegisterEffect(e4) -end -function c32022366.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c32022366.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,c,tc) - end -end diff --git a/script/c3204467.lua b/script/c3204467.lua deleted file mode 100644 index 3407b5f32c..0000000000 --- a/script/c3204467.lua +++ /dev/null @@ -1,53 +0,0 @@ ---ワーム・ソリッド -function c3204467.initial_effect(c) - --defup - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_DEFENCE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetValue(c3204467.defval) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_BATTLE_DAMAGE) - e2:SetOperation(c3204467.regop) - c:RegisterEffect(e2) -end -function c3204467.vfilter(c) - return c:IsSetCard(0x3e) and c:IsRace(RACE_REPTILE) -end -function c3204467.defval(e,c) - return Duel.GetMatchingGroupCount(c3204467.vfilter,c:GetControler(),LOCATION_GRAVE,0,nil)*100 -end -function c3204467.regop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsDefencePos() and c==Duel.GetAttackTarget() then - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(3204467,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_DAMAGE_STEP_END) - e1:SetTarget(c3204467.destg) - e1:SetOperation(c3204467.desop) - e1:SetReset(RESET_PHASE+PHASE_DAMAGE) - c:RegisterEffect(e1) - end -end -function c3204467.desfilter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable() -end -function c3204467.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and c3204467.desfilter(chkc) end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c3204467.desfilter,tp,0,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c3204467.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c32061744.lua b/script/c32061744.lua deleted file mode 100644 index 70f79d8471..0000000000 --- a/script/c32061744.lua +++ /dev/null @@ -1,40 +0,0 @@ ---エレキーパー -function c32061744.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c32061744.target) - e1:SetOperation(c32061744.activate) - c:RegisterEffect(e1) -end -function c32061744.filter(c,e,tp) - return c:IsLevelBelow(4) and c:IsSetCard(0xe) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c32061744.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c32061744.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c32061744.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c32061744.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c32061744.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)~=0 then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetOperation(c32061744.desop) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e1:SetCountLimit(1) - tc:RegisterEffect(e1) - end -end -function c32061744.desop(e,tp,eg,ep,ev,re,r,rp) - Duel.Destroy(e:GetHandler(),REASON_EFFECT) -end diff --git a/script/c32062913.lua b/script/c32062913.lua deleted file mode 100644 index 1968151611..0000000000 --- a/script/c32062913.lua +++ /dev/null @@ -1,25 +0,0 @@ ---メガトン魔導キャノン -function c32062913.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c32062913.cost) - e1:SetTarget(c32062913.target) - e1:SetOperation(c32062913.activate) - c:RegisterEffect(e1) -end -function c32062913.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsCanRemoveCounter(tp,1,0,0x3001,10,REASON_COST) end - Duel.RemoveCounter(tp,1,0,0x3001,10,REASON_COST) -end -function c32062913.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDestructable,tp,0,LOCATION_ONFIELD,1,nil) end - local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,0,LOCATION_ONFIELD,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c32062913.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,0,LOCATION_ONFIELD,nil) - Duel.Destroy(g,REASON_EFFECT) -end diff --git a/script/c32065885.lua b/script/c32065885.lua deleted file mode 100644 index 056b04d07b..0000000000 --- a/script/c32065885.lua +++ /dev/null @@ -1,51 +0,0 @@ ---痛恨の訴え -function c32065885.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_CONTROL) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_BATTLE_DAMAGE) - e1:SetCondition(c32065885.ctlcon) - e1:SetTarget(c32065885.ctltg) - e1:SetOperation(c32065885.ctlop) - c:RegisterEffect(e1) -end -function c32065885.ctlcon(e,tp,eg,ep,ev,re,r,rp) - return ep==tp and Duel.GetAttackTarget()==nil and Duel.GetAttacker():IsControler(1-tp) -end -function c32065885.ctltg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_CONTROL,nil,1,1-tp,LOCATION_MZONE) -end -function c32065885.ctlop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil) - if g:GetCount()==0 then return end - local sg=g:GetMaxGroup(Card.GetDefence) - if sg:GetCount()>1 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) - sg=sg:Select(tp,1,1,nil) - end - local tc=sg:GetFirst() - if not Duel.GetControl(tc,tp,PHASE_END,2) then - if not tc:IsImmuneToEffect(e) and tc:IsAbleToChangeControler() then - Duel.Destroy(tc,REASON_EFFECT) - end - else - local c=e:GetHandler() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fc0000+RESET_PHASE+PHASE_END,2) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+0x1fc0000+RESET_PHASE+PHASE_END,2) - tc:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_CANNOT_ATTACK) - e3:SetReset(RESET_EVENT+0x1fc0000+RESET_PHASE+PHASE_END,2) - tc:RegisterEffect(e3) - end -end diff --git a/script/c32086564.lua b/script/c32086564.lua deleted file mode 100644 index da0098b1f3..0000000000 --- a/script/c32086564.lua +++ /dev/null @@ -1,47 +0,0 @@ ---エクシーズ・トライバル -function c32086564.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e2:SetTarget(c32086564.target) - e2:SetValue(1) - c:RegisterEffect(e2) - --destroy - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(32086564,0)) - e3:SetCategory(CATEGORY_DESTROY) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e3:SetCode(EVENT_BATTLED) - e3:SetRange(LOCATION_SZONE) - e3:SetTarget(c32086564.destg) - e3:SetOperation(c32086564.desop) - c:RegisterEffect(e3) -end -function c32086564.target(e,c) - return c:GetOverlayCount()>=2 -end -function c32086564.check(c,tp) - return c:IsControler(tp) and c:GetOverlayCount()>=2 -end -function c32086564.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetAttackTarget()~=nil - and (c32086564.check(Duel.GetAttacker(),tp) or c32086564.check(Duel.GetAttackTarget(),tp)) end - if c32086564.check(Duel.GetAttacker(),tp) then - Duel.SetTargetCard(Duel.GetAttackTarget()) - else - Duel.SetTargetCard(Duel.GetAttacker()) - end -end -function c32086564.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c32146097.lua b/script/c32146097.lua deleted file mode 100644 index a0e34e3b89..0000000000 --- a/script/c32146097.lua +++ /dev/null @@ -1,29 +0,0 @@ ---DDパンドラ -function c32146097.initial_effect(c) - --draw - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCondition(c32146097.drcon) - e1:SetTarget(c32146097.drtg) - e1:SetOperation(c32146097.drop) - c:RegisterEffect(e1) -end -function c32146097.drcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return (c:IsReason(REASON_BATTLE) - or rp~=tp and c:IsReason(REASON_DESTROY) and c:GetPreviousControler()==tp) - and Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,0)==0 -end -function c32146097.drtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp,2) end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(2) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2) -end -function c32146097.drop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end diff --git a/script/c32180819.lua b/script/c32180819.lua deleted file mode 100644 index 48d9033c5d..0000000000 --- a/script/c32180819.lua +++ /dev/null @@ -1,33 +0,0 @@ ---最古式念導 -function c32180819.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c32180819.condition) - e1:SetTarget(c32180819.target) - e1:SetOperation(c32180819.activate) - c:RegisterEffect(e1) -end -function c32180819.cfilter(c) - return c:IsFaceup() and c:IsRace(RACE_PSYCHO) -end -function c32180819.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c32180819.cfilter,tp,LOCATION_MZONE,0,1,nil) -end -function c32180819.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsDestructable() and chkc~=e:GetHandler() end - if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,tp,1000) -end -function c32180819.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)>0 then - Duel.Damage(tp,1000,REASON_EFFECT) - end -end diff --git a/script/c32202803.lua b/script/c32202803.lua deleted file mode 100644 index 87c65b1219..0000000000 --- a/script/c32202803.lua +++ /dev/null @@ -1,15 +0,0 @@ ---武神器-タルタ -function c32202803.initial_effect(c) - --indes - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetTarget(c32202803.targt) - e1:SetValue(1) - c:RegisterEffect(e1) -end -function c32202803.targt(e,c) - return c~=e:GetHandler() and c:IsRace(RACE_BEAST+RACE_BEASTWARRIOR+RACE_WINDBEAST) -end diff --git a/script/c32207100.lua b/script/c32207100.lua deleted file mode 100644 index b3cbb2b214..0000000000 --- a/script/c32207100.lua +++ /dev/null @@ -1,32 +0,0 @@ ---大番狂わせ -function c32207100.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c32207100.cost) - e1:SetTarget(c32207100.target) - e1:SetOperation(c32207100.activate) - c:RegisterEffect(e1) -end -function c32207100.cfilter(c) - return c:IsPosition(POS_FACEUP_ATTACK) and c:IsLevelBelow(2) -end -function c32207100.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,c32207100.cfilter,1,nil) end - local g=Duel.SelectReleaseGroup(tp,c32207100.cfilter,1,1,nil) - Duel.Release(g,REASON_COST) -end -function c32207100.filter(c) - return c:IsFaceup() and c:IsLevelAbove(7) and bit.band(c:GetSummonType(),SUMMON_TYPE_SPECIAL)~=0 and c:IsAbleToHand() -end -function c32207100.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c32207100.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - local sg=Duel.GetMatchingGroup(c32207100.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,sg,sg:GetCount(),0,0) -end -function c32207100.activate(e,tp,eg,ep,ev,re,r,rp) - local sg=Duel.GetMatchingGroup(c32207100.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - Duel.SendtoHand(sg,nil,REASON_EFFECT) -end diff --git a/script/c32224143.lua b/script/c32224143.lua deleted file mode 100644 index c37acbd543..0000000000 --- a/script/c32224143.lua +++ /dev/null @@ -1,74 +0,0 @@ ---ゴーストリック・サキュバス -function c32224143.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,2,2) - c:EnableReviveLimit() - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(32224143,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCountLimit(1) - e1:SetCost(c32224143.cost) - e1:SetTarget(c32224143.target) - e1:SetOperation(c32224143.operation) - c:RegisterEffect(e1) - --cannot be battle target - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EFFECT_CANNOT_BE_BATTLE_TARGET) - e2:SetCondition(c32224143.atkcon) - e2:SetValue(aux.imval1) - c:RegisterEffect(e2) -end -function c32224143.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c32224143.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x8d) -end -function c32224143.filter(c,atk) - return c:IsFaceup() and c:IsAttackBelow(atk) and c:IsDestructable() -end -function c32224143.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local cg=Duel.GetMatchingGroup(c32224143.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - local atk=cg:GetSum(Card.GetAttack) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c32224143.filter(chkc,atk) end - if chk==0 then return Duel.IsExistingTarget(c32224143.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,atk) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c32224143.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,atk) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c32224143.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - local seq=tc:GetSequence() - if tc:IsControler(1-tp) then seq=seq+16 end - if tc:IsRelateToEffect(e) and tc:IsFaceup() and Duel.Destroy(tc,REASON_EFFECT)~=0 then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_DISABLE_FIELD) - e1:SetLabel(seq) - e1:SetCondition(c32224143.discon) - e1:SetOperation(c32224143.disop) - e1:SetReset(0) - Duel.RegisterEffect(e1,tp) - end -end -function c32224143.discon(e) - if Duel.IsExistingMatchingCard(c32224143.cfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) then - return true - end - e:Reset() - return false -end -function c32224143.disop(e,tp) - return bit.lshift(0x1,e:GetLabel()) -end -function c32224143.atkcon(e) - return Duel.IsExistingMatchingCard(c32224143.cfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,e:GetHandler()) -end diff --git a/script/c32231618.lua b/script/c32231618.lua deleted file mode 100644 index e85bac7a73..0000000000 --- a/script/c32231618.lua +++ /dev/null @@ -1,40 +0,0 @@ ---占術姫コインノーマ -function c32231618.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DELAY) - e1:SetTarget(c32231618.sptg) - e1:SetOperation(c32231618.spop) - c:RegisterEffect(e1) -end -function c32231618.spfilter(c,e,tp) - return c:IsType(TYPE_FLIP) and c:IsLevelAbove(3) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN) -end -function c32231618.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c32231618.spfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_HAND) -end -function c32231618.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c32231618.spfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEDOWN_DEFENCE) - Duel.ConfirmCards(1-tp,g) - end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetTargetRange(1,0) - e1:SetValue(c32231618.actlimit) - e1:SetReset(RESET_PHASE+RESET_END) - Duel.RegisterEffect(e1,tp) -end -function c32231618.actlimit(e,re,rp) - local rc=re:GetHandler() - return re:IsActiveType(TYPE_MONSTER) and not rc:IsSetCard(0xcc) and not rc:IsImmuneToEffect(e) -end diff --git a/script/c32233746.lua b/script/c32233746.lua deleted file mode 100644 index f17808acfc..0000000000 --- a/script/c32233746.lua +++ /dev/null @@ -1,36 +0,0 @@ ---ライト・バニッシュ -function c32233746.initial_effect(c) - --Activate(summon) - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DISABLE_SUMMON+CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_SUMMON) - e1:SetCondition(c32233746.condition) - e1:SetCost(c32233746.cost) - e1:SetTarget(c32233746.target) - e1:SetOperation(c32233746.activate) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_FLIP_SUMMON) - c:RegisterEffect(e2) - local e3=e1:Clone() - e3:SetCode(EVENT_SPSUMMON) - c:RegisterEffect(e3) -end -function c32233746.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentChain()==0 -end -function c32233746.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsSetCard,1,nil,0x38) end - local g=Duel.SelectReleaseGroup(tp,Card.IsSetCard,1,1,nil,0x38) - Duel.Release(g,REASON_COST) -end -function c32233746.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DISABLE_SUMMON,eg,eg:GetCount(),0,0) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,eg:GetCount(),0,0) -end -function c32233746.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateSummon(eg) - Duel.Destroy(eg,REASON_EFFECT) -end diff --git a/script/c32240937.lua b/script/c32240937.lua deleted file mode 100644 index a8bfbcf66a..0000000000 --- a/script/c32240937.lua +++ /dev/null @@ -1,35 +0,0 @@ ---絶対服従魔人 -function c32240937.initial_effect(c) - --atk limit - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetCondition(c32240937.atkcon) - c:RegisterEffect(e1) - --negate - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_BATTLED) - e2:SetOperation(c32240937.negop) - c:RegisterEffect(e2) -end -function c32240937.atkcon(e) - local tp=e:GetHandlerPlayer() - return Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,0)>1 or Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)>0 -end -function c32240937.negop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local bc=c:GetBattleTarget() - if bc:IsType(TYPE_EFFECT) and bc:IsStatus(STATUS_BATTLE_DESTROYED) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0x17a0000) - bc:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+0x17a0000) - bc:RegisterEffect(e2) - end -end diff --git a/script/c32268901.lua b/script/c32268901.lua deleted file mode 100644 index db6e644fae..0000000000 --- a/script/c32268901.lua +++ /dev/null @@ -1,44 +0,0 @@ ---サラマンドラ -function c32268901.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c32268901.target) - e1:SetOperation(c32268901.operation) - c:RegisterEffect(e1) - --Atk up - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(700) - c:RegisterEffect(e2) - --Equip limit - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetCode(EFFECT_EQUIP_LIMIT) - e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e4:SetValue(c32268901.eqlimit) - c:RegisterEffect(e4) -end -function c32268901.eqlimit(e,c) - return c:IsAttribute(ATTRIBUTE_FIRE) -end -function c32268901.filter(c) - return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_FIRE) -end -function c32268901.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c32268901.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c32268901.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c32268901.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c32268901.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,e:GetHandler(),tc) - end -end diff --git a/script/c32271987.lua b/script/c32271987.lua deleted file mode 100644 index 9c169b6977..0000000000 --- a/script/c32271987.lua +++ /dev/null @@ -1,36 +0,0 @@ ---フェデライザー -function c32271987.initial_effect(c) - --tograve & draw - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(32271987,0)) - e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetCondition(c32271987.condition) - e1:SetTarget(c32271987.target) - e1:SetOperation(c32271987.operation) - c:RegisterEffect(e1) -end -function c32271987.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) -end -function c32271987.filter(c) - return c:IsType(TYPE_DUAL) and c:IsAbleToGrave() -end -function c32271987.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local ct=Duel.GetMatchingGroupCount(c32271987.filter,tp,LOCATION_DECK,0,nil) - if ct==1 and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)==1 then return false end - return Duel.IsPlayerCanDraw(tp,1) and ct>=1 end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c32271987.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c32271987.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoGrave(g,REASON_EFFECT) - Duel.BreakEffect() - Duel.Draw(tp,1,REASON_EFFECT) - end -end diff --git a/script/c32296881.lua b/script/c32296881.lua deleted file mode 100644 index 2257a8389f..0000000000 --- a/script/c32296881.lua +++ /dev/null @@ -1,16 +0,0 @@ ---豊穣のアルテミス -function c32296881.initial_effect(c) - --draw - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_CHAIN_SOLVED) - e1:SetRange(LOCATION_MZONE) - e1:SetOperation(c32296881.drop) - c:RegisterEffect(e1) -end -function c32296881.drop(e,tp,eg,ep,ev,re,r,rp) - if not re:GetHandler():IsType(TYPE_COUNTER) then return end - Duel.Hint(HINT_CARD,0,32296881) - Duel.BreakEffect() - Duel.Draw(tp,1,REASON_EFFECT) -end diff --git a/script/c32298781.lua b/script/c32298781.lua deleted file mode 100644 index f24bce4e72..0000000000 --- a/script/c32298781.lua +++ /dev/null @@ -1,55 +0,0 @@ ---トライアングルパワー -function c32298781.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c32298781.target) - e1:SetOperation(c32298781.activate) - c:RegisterEffect(e1) -end -function c32298781.filter(c) - local tpe=c:GetType() - return c:IsFaceup() and bit.band(tpe,TYPE_NORMAL)~=0 and bit.band(tpe,TYPE_TOKEN)==0 and c:GetLevel()==1 -end -function c32298781.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c32298781.filter,tp,LOCATION_MZONE,0,1,nil) end -end -function c32298781.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c32298781.filter,tp,LOCATION_MZONE,0,nil) - local tc=g:GetFirst() - while tc do - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_BASE_ATTACK) - e1:SetValue(tc:GetBaseAttack()+2000) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_SET_BASE_DEFENCE) - e2:SetValue(tc:GetBaseDefence()+2000) - e2:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e2) - tc=g:GetNext() - end - local de=Effect.CreateEffect(e:GetHandler()) - de:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - de:SetCode(EVENT_PHASE+PHASE_END) - de:SetCountLimit(1) - de:SetCondition(c32298781.descon) - de:SetOperation(c32298781.desop) - de:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(de,tp) -end -function c32298781.dfilter(c) - return c:IsFaceup() and c:IsType(TYPE_NORMAL) and c:GetLevel()==1 -end -function c32298781.descon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c32298781.dfilter,tp,LOCATION_MZONE,0,1,nil) -end -function c32298781.desop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c32298781.dfilter,tp,LOCATION_MZONE,0,nil) - Duel.Destroy(g,REASON_EFFECT) -end diff --git a/script/c32314730.lua b/script/c32314730.lua deleted file mode 100644 index 0e98f7a56b..0000000000 --- a/script/c32314730.lua +++ /dev/null @@ -1,80 +0,0 @@ ---コアキメイル・クルセイダー -function c32314730.initial_effect(c) - --cost - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c32314730.mtcon) - e1:SetOperation(c32314730.mtop) - c:RegisterEffect(e1) - --salvage - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(32314730,0)) - e2:SetCategory(CATEGORY_TOHAND) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_BATTLE_DESTROYING) - e2:SetCondition(c32314730.thcon) - e2:SetTarget(c32314730.thtg) - e2:SetOperation(c32314730.thop) - c:RegisterEffect(e2) -end -function c32314730.mtcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c32314730.cfilter1(c) - return c:IsCode(36623431) and c:IsAbleToGraveAsCost() -end -function c32314730.cfilter2(c) - return c:IsType(TYPE_MONSTER) and c:IsRace(RACE_BEASTWARRIOR) and not c:IsPublic() -end -function c32314730.mtop(e,tp,eg,ep,ev,re,r,rp) - local g1=Duel.GetMatchingGroup(c32314730.cfilter1,tp,LOCATION_HAND,0,nil) - local g2=Duel.GetMatchingGroup(c32314730.cfilter2,tp,LOCATION_HAND,0,nil) - local select=2 - if g1:GetCount()>0 and g2:GetCount()>0 then - select=Duel.SelectOption(tp,aux.Stringid(32314730,0),aux.Stringid(32314730,1),aux.Stringid(32314730,2)) - elseif g1:GetCount()>0 then - select=Duel.SelectOption(tp,aux.Stringid(32314730,0),aux.Stringid(32314730,2)) - if select==1 then select=2 end - elseif g2:GetCount()>0 then - select=Duel.SelectOption(tp,aux.Stringid(32314730,1),aux.Stringid(32314730,2)) - select=select+1 - end - if select==0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=g1:Select(tp,1,1,nil) - Duel.SendtoGrave(g,REASON_COST) - elseif select==1 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) - local g=g2:Select(tp,1,1,nil) - Duel.ConfirmCards(1-tp,g) - Duel.ShuffleHand(tp) - else - Duel.Destroy(e:GetHandler(),REASON_RULE) - end -end -function c32314730.thcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsRelateToBattle() and c:GetBattleTarget():IsType(TYPE_MONSTER) -end -function c32314730.filter(c) - return c:IsSetCard(0x1d) and c:IsAbleToHand() -end -function c32314730.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c32314730.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c32314730.filter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c32314730.filter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c32314730.thop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end diff --git a/script/c32339440.lua b/script/c32339440.lua deleted file mode 100644 index 8f5a81bbbf..0000000000 --- a/script/c32339440.lua +++ /dev/null @@ -1,36 +0,0 @@ ---武神-ヤマト -function c32339440.initial_effect(c) - c:SetUniqueOnField(1,0,32339440) - --to hand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(32339440,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_FIELD) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetCountLimit(1) - e1:SetCondition(c32339440.thcon) - e1:SetTarget(c32339440.thtg) - e1:SetOperation(c32339440.thop) - c:RegisterEffect(e1) -end -function c32339440.thcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c32339440.filter(c) - return c:IsSetCard(0x88) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() -end -function c32339440.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c32339440.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c32339440.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c32339440.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 and Duel.SendtoHand(g,nil,REASON_EFFECT)>0 then - Duel.ConfirmCards(1-tp,g) - Duel.ShuffleHand(tp) - Duel.BreakEffect() - Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT) - end -end diff --git a/script/c32354768.lua b/script/c32354768.lua deleted file mode 100644 index 9e642baef6..0000000000 --- a/script/c32354768.lua +++ /dev/null @@ -1,133 +0,0 @@ ---セフィラの神託 -function c32354768.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,32354768+EFFECT_COUNT_CODE_OATH) - e1:SetTarget(c32354768.target) - e1:SetOperation(c32354768.activate) - c:RegisterEffect(e1) - -- - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(32354768,0)) - e2:SetCategory(CATEGORY_TODECK) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetRange(LOCATION_FZONE) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetCountLimit(1) - e2:SetCondition(c32354768.effcon) - e2:SetTarget(c32354768.tdtg) - e2:SetOperation(c32354768.tdop) - e2:SetLabel(TYPE_RITUAL) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetDescription(aux.Stringid(32354768,1)) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetTarget(c32354768.sptg) - e3:SetOperation(c32354768.spop) - e3:SetLabel(TYPE_FUSION) - c:RegisterEffect(e3) - local e4=e2:Clone() - e4:SetDescription(aux.Stringid(32354768,2)) - e4:SetCategory(0) - e4:SetTarget(c32354768.sttg) - e4:SetOperation(c32354768.stop) - e4:SetLabel(TYPE_SYNCHRO) - c:RegisterEffect(e4) - local e5=e2:Clone() - e5:SetDescription(aux.Stringid(32354768,3)) - e5:SetCategory(CATEGORY_DRAW+CATEGORY_HANDES) - e5:SetTarget(c32354768.drtg) - e5:SetOperation(c32354768.drop) - e5:SetLabel(TYPE_XYZ) - c:RegisterEffect(e5) - local e6=Effect.CreateEffect(c) - e6:SetType(EFFECT_TYPE_FIELD) - e6:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_RANGE) - e6:SetRange(LOCATION_FZONE) - e6:SetCode(EFFECT_MATERIAL_CHECK) - e6:SetValue(c32354768.valcheck) - c:RegisterEffect(e6) -end -function c32354768.mtfilter(c) - return c:IsSetCard(0xc4) and c:IsType(TYPE_MONSTER) -end -function c32354768.valcheck(e,c) - if c:GetMaterial():IsExists(c32354768.mtfilter,1,nil) then - c:RegisterFlagEffect(32354768,RESET_EVENT+0x4fe0000+RESET_PHASE+PHASE_END,0,1) - end -end -function c32354768.filter(c) - return c:IsSetCard(0xc4) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() -end -function c32354768.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c32354768.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c32354768.activate(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c32354768.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end -function c32354768.effcon(e,tp,eg,ep,ev,re,r,rp) - return eg:GetCount()==1 and eg:GetFirst():IsType(e:GetLabel()) and eg:GetFirst():GetFlagEffect(32354768)~=0 -end -function c32354768.tdtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,PLAYER_ALL,LOCATION_MZONE) -end -function c32354768.tdop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SendtoDeck(g,nil,2,REASON_EFFECT) -end -function c32354768.spfilter(c,e,tp) - return c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c32354768.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c32354768.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c32354768.spop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c32354768.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end -function c32354768.sttg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_DECK,0,1,nil,TYPE_MONSTER) end -end -function c32354768.stop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(32354768,4)) - local g=Duel.SelectMatchingCard(tp,Card.IsType,tp,LOCATION_DECK,0,1,1,nil,TYPE_MONSTER) - local tc=g:GetFirst() - if tc then - Duel.ShuffleDeck(tp) - Duel.MoveSequence(tc,0) - Duel.ConfirmDecktop(tp,1) - end -end -function c32354768.drtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end - Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c32354768.drop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - if Duel.Draw(tp,1,REASON_EFFECT)~=0 then - Duel.BreakEffect() - Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT+REASON_DISCARD) - end -end diff --git a/script/c32355828.lua b/script/c32355828.lua deleted file mode 100644 index f2a05f3428..0000000000 --- a/script/c32355828.lua +++ /dev/null @@ -1,6 +0,0 @@ ---スケルゴン -function c32355828.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcCode2(c,29491031,87564352,true,true) -end diff --git a/script/c32362575.lua b/script/c32362575.lua deleted file mode 100644 index 3b7c75f11e..0000000000 --- a/script/c32362575.lua +++ /dev/null @@ -1,37 +0,0 @@ ---魔導雑貨商人 -function c32362575.initial_effect(c) - --flip - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_TOGRAVE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP) - e1:SetOperation(c32362575.operation) - c:RegisterEffect(e1) -end -function c32362575.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsType,tp,LOCATION_DECK,0,nil,TYPE_SPELL+TYPE_TRAP) - local dcount=Duel.GetFieldGroupCount(tp,LOCATION_DECK,0) - if dcount==0 then return end - if g:GetCount()==0 then - Duel.ConfirmDecktop(tp,dcount) - Duel.ShuffleDeck(tp) - return - end - local seq=-1 - local tc=g:GetFirst() - local spcard=nil - while tc do - if tc:GetSequence()>seq then - seq=tc:GetSequence() - spcard=tc - end - tc=g:GetNext() - end - Duel.ConfirmDecktop(tp,dcount-seq) - if spcard:IsAbleToHand() then - Duel.DisableShuffleCheck() - Duel.SendtoHand(spcard,nil,REASON_EFFECT) - Duel.DiscardDeck(tp,dcount-seq-1,REASON_EFFECT+REASON_REVEAL) - Duel.ConfirmCards(1-tp,spcard) - Duel.ShuffleHand(tp) - else Duel.DiscardDeck(tp,dcount-seq,REASON_EFFECT+REASON_REVEAL) end -end diff --git a/script/c32391566.lua b/script/c32391566.lua deleted file mode 100644 index 58f19feb82..0000000000 --- a/script/c32391566.lua +++ /dev/null @@ -1,41 +0,0 @@ ---エクストラ・ヴェーラー -function c32391566.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(32391566,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetRange(LOCATION_HAND) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(c32391566.spcon) - e1:SetTarget(c32391566.sptg) - e1:SetOperation(c32391566.spop) - c:RegisterEffect(e1) -end -function c32391566.cfilter(c,tp) - return c:GetSummonPlayer()==tp -end -function c32391566.spcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c32391566.cfilter,1,nil,1-tp) -end -function c32391566.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c32391566.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EFFECT_REFLECT_DAMAGE) - e1:SetTargetRange(1,0) - e1:SetValue(c32391566.val) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) - end -end -function c32391566.val(e,re,ev,r,rp,rc) - return bit.band(r,REASON_EFFECT)~=0 -end diff --git a/script/c32391631.lua b/script/c32391631.lua deleted file mode 100644 index 4612981f9a..0000000000 --- a/script/c32391631.lua +++ /dev/null @@ -1,101 +0,0 @@ ---サベージ・コロシアム -function c32391631.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --to defence - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(32391631,0)) - e2:SetCategory(CATEGORY_RECOVER) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_DAMAGE_STEP_END) - e2:SetRange(LOCATION_SZONE) - e2:SetTarget(c32391631.rectg) - e2:SetOperation(c32391631.recop) - c:RegisterEffect(e2) - --must attack - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetCode(EFFECT_MUST_ATTACK) - e3:SetRange(LOCATION_SZONE) - e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - c:RegisterEffect(e3) - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_FIELD) - e4:SetCode(EFFECT_CANNOT_EP) - e4:SetRange(LOCATION_SZONE) - e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e4:SetTargetRange(1,1) - e4:SetCondition(c32391631.becon) - c:RegisterEffect(e4) - --destroy - local e5=Effect.CreateEffect(c) - e5:SetDescription(aux.Stringid(32391631,1)) - e5:SetCategory(CATEGORY_DESTROY) - e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e5:SetRange(LOCATION_SZONE) - e5:SetCountLimit(1) - e5:SetCode(EVENT_PHASE+PHASE_END) - e5:SetTarget(c32391631.destg) - e5:SetOperation(c32391631.desop) - c:RegisterEffect(e5) - if not c32391631.global_check then - c32391631.global_check=true - local ge1=Effect.CreateEffect(c) - ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - ge1:SetCode(EVENT_ATTACK_ANNOUNCE) - ge1:SetOperation(c32391631.check) - Duel.RegisterEffect(ge1,0) - local ge2=Effect.CreateEffect(c) - ge2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - ge2:SetCode(EVENT_ATTACK_DISABLED) - ge2:SetOperation(c32391631.check2) - Duel.RegisterEffect(ge2,0) - end -end -function c32391631.check(e,tp,eg,ep,ev,re,r,rp) - local tc=eg:GetFirst() - local ct=tc:GetFlagEffectLabel(32391631) - if ct then - tc:SetFlagEffectLabel(32391631,ct+1) - else - tc:RegisterFlagEffect(32391631,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1,1) - end -end -function c32391631.check2(e,tp,eg,ep,ev,re,r,rp) - local tc=eg:GetFirst() - local ct=tc:GetFlagEffectLabel(32391631) - if ct then - tc:SetFlagEffectLabel(32391631,ct-1) - end -end -function c32391631.rectg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(Duel.GetTurnPlayer()) - Duel.SetTargetParam(300) - Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,Duel.GetTurnPlayer(),300) -end -function c32391631.recop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) or not Duel.GetAttacker():IsRelateToBattle() then return end - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Recover(p,d,REASON_EFFECT) -end -function c32391631.becon(e) - return Duel.IsExistingMatchingCard(Card.IsAttackable,Duel.GetTurnPlayer(),LOCATION_MZONE,0,1,nil) -end -function c32391631.desfilter(c) - local ct=c:GetFlagEffectLabel(32391631) - return c:IsPosition(POS_FACEUP_ATTACK) and (not ct or ct==0) and c:IsDestructable() -end -function c32391631.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local g=Duel.GetMatchingGroup(c32391631.desfilter,Duel.GetTurnPlayer(),LOCATION_MZONE,0,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c32391631.desop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local g=Duel.GetMatchingGroup(c32391631.desfilter,Duel.GetTurnPlayer(),LOCATION_MZONE,0,e:GetHandler()) - Duel.Destroy(g,REASON_EFFECT) -end diff --git a/script/c32393580.lua b/script/c32393580.lua deleted file mode 100644 index 42476245f2..0000000000 --- a/script/c32393580.lua +++ /dev/null @@ -1,19 +0,0 @@ ---サイバー・シャーク -function c32393580.initial_effect(c) - --summon without tribute - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(32393580,0)) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SUMMON_PROC) - e1:SetCondition(c32393580.ntcon) - c:RegisterEffect(e1) -end -function c32393580.ntfilter(c) - return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_WATER) -end -function c32393580.ntcon(e,c,minc) - if c==nil then return true end - return minc==0 and c:GetLevel()>4 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c32393580.ntfilter,c:GetControler(),LOCATION_MZONE,0,1,nil) -end diff --git a/script/c32437102.lua b/script/c32437102.lua deleted file mode 100644 index 375cfdb86f..0000000000 --- a/script/c32437102.lua +++ /dev/null @@ -1,54 +0,0 @@ ---竜魂の力 -function c32437102.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c32437102.target) - e1:SetOperation(c32437102.operation) - c:RegisterEffect(e1) - --Atk - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(500) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EFFECT_UPDATE_DEFENCE) - c:RegisterEffect(e3) - --race - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_EQUIP) - e4:SetCode(EFFECT_CHANGE_RACE) - e4:SetValue(RACE_DRAGON) - c:RegisterEffect(e4) - --Equip limit - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_SINGLE) - e5:SetCode(EFFECT_EQUIP_LIMIT) - e5:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e5:SetValue(c32437102.eqlimit) - c:RegisterEffect(e5) -end -function c32437102.eqlimit(e,c) - return c:GetOriginalRace()==RACE_WARRIOR -end -function c32437102.filter(c) - return c:IsFaceup() and c:IsRace(RACE_WARRIOR) -end -function c32437102.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c32437102.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c32437102.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c32437102.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c32437102.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,c,tc) - end -end diff --git a/script/c32441317.lua b/script/c32441317.lua deleted file mode 100644 index 28652181b1..0000000000 --- a/script/c32441317.lua +++ /dev/null @@ -1,43 +0,0 @@ ---シンクロキャンセル -function c32441317.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TODECK+CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c32441317.target) - e1:SetOperation(c32441317.activate) - c:RegisterEffect(e1) -end -function c32441317.filter(c) - return c:IsFaceup() and c:IsType(TYPE_SYNCHRO) and c:IsAbleToExtra() -end -function c32441317.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c32441317.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c32441317.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectTarget(tp,c32441317.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0) -end -function c32441317.mgfilter(c,e,tp,sync) - return not c:IsControler(tp) or not c:IsLocation(LOCATION_GRAVE) - or bit.band(c:GetReason(),0x80008)~=0x80008 or c:GetReasonCard()~=sync - or not c:IsCanBeSpecialSummoned(e,0,tp,false,false) or c:IsHasEffect(EFFECT_NECRO_VALLEY) -end -function c32441317.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsFacedown() or not tc:IsRelateToEffect(e) then return end - local mg=tc:GetMaterial() - local sumable=true - local sumtype=tc:GetSummonType() - if Duel.SendtoDeck(tc,nil,0,REASON_EFFECT)==0 or sumtype~=SUMMON_TYPE_SYNCHRO or mg:GetCount()==0 - or mg:GetCount()>Duel.GetLocationCount(tp,LOCATION_MZONE) - or mg:IsExists(c32441317.mgfilter,1,nil,e,tp,tc) then - sumable=false - end - if sumable and Duel.SelectYesNo(tp,aux.Stringid(32441317,0)) then - Duel.BreakEffect() - Duel.SpecialSummon(mg,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c3244563.lua b/script/c3244563.lua deleted file mode 100644 index 9736c34c37..0000000000 --- a/script/c3244563.lua +++ /dev/null @@ -1,37 +0,0 @@ ---シールドスピア -function c3244563.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetCondition(c3244563.condition) - e1:SetTarget(c3244563.target) - e1:SetOperation(c3244563.activate) - c:RegisterEffect(e1) -end -function c3244563.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end -function c3244563.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) -end -function c3244563.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - e1:SetValue(400) - tc:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_UPDATE_DEFENCE) - tc:RegisterEffect(e2) - end -end diff --git a/script/c32446630.lua b/script/c32446630.lua deleted file mode 100644 index be86c997aa..0000000000 --- a/script/c32446630.lua +++ /dev/null @@ -1,60 +0,0 @@ ---CNo.43 魂魄傀儡鬼神カオス・マリオネッター -function c32446630.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_DARK),3,4) - c:EnableReviveLimit() - --atk - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_EXTRA_ATTACK) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetTarget(c32446630.atktg) - e1:SetValue(1) - c:RegisterEffect(e1) - --token - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(32446630,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCondition(c32446630.condition) - e2:SetCost(c32446630.cost) - e2:SetTarget(c32446630.target) - e2:SetOperation(c32446630.operation) - c:RegisterEffect(e2) -end -c32446630.xyz_number=43 -function c32446630.atktg(e,c) - return c:IsType(TYPE_TOKEN) -end -function c32446630.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetOverlayGroup():IsExists(Card.IsCode,1,nil,56051086) -end -function c32446630.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c32446630.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsPlayerCanSpecialSummonMonster(tp,32446631,0,0x4011,-2,-2,1,RACE_FIEND,ATTRIBUTE_DARK) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_MZONE) - Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,tp,LOCATION_MZONE) -end -function c32446630.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - if not Duel.IsPlayerCanSpecialSummonMonster(tp,32446631,0,0x4011,-2,-2,1,RACE_FIEND,ATTRIBUTE_DARK) then return end - local token=Duel.CreateToken(tp,32446631) - Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK) - e1:SetValue(Duel.GetLP(1-tp)/2) - e1:SetReset(RESET_EVENT+0x1fe0000) - token:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_SET_DEFENCE) - token:RegisterEffect(e2) - Duel.SpecialSummonComplete() -end diff --git a/script/c32476434.lua b/script/c32476434.lua deleted file mode 100644 index 87c0967207..0000000000 --- a/script/c32476434.lua +++ /dev/null @@ -1,38 +0,0 @@ ---ラインモンスター スピア・ホイール -function c32476434.initial_effect(c) - --lv - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(32476434,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCountLimit(1) - e1:SetTarget(c32476434.target) - e1:SetOperation(c32476434.operation) - c:RegisterEffect(e1) -end -function c32476434.filter(c) - return c:IsFaceup() and c:GetLevel()==3 and c:IsRace(RACE_BEASTWARRIOR) -end -function c32476434.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c32476434.filter(chkc) and chkc~=e:GetHandler() end - if chk==0 then return Duel.IsExistingTarget(c32476434.filter,tp,LOCATION_MZONE,0,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c32476434.filter,tp,LOCATION_MZONE,0,1,1,e:GetHandler()) -end -function c32476434.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and c:IsFaceup() and tc:IsRelateToEffect(e) and tc:IsFaceup() then - local lv=c:GetLevel()+tc:GetLevel() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CHANGE_LEVEL) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetValue(lv) - e1:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e1) - local e2=e1:Clone() - tc:RegisterEffect(e2) - end -end diff --git a/script/c32485271.lua b/script/c32485271.lua deleted file mode 100644 index 6276693597..0000000000 --- a/script/c32485271.lua +++ /dev/null @@ -1,6 +0,0 @@ ---バラに棲む悪霊 -function c32485271.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcCode2(c,41392891,29802344,true,true) -end diff --git a/script/c32485518.lua b/script/c32485518.lua deleted file mode 100644 index 500032a0ec..0000000000 --- a/script/c32485518.lua +++ /dev/null @@ -1,41 +0,0 @@ ---イモータル・ルーラー -function c32485518.initial_effect(c) - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - c:RegisterEffect(e1) - --salvage - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(32485518,0)) - e2:SetCategory(CATEGORY_TOHAND) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCost(c32485518.cost) - e2:SetTarget(c32485518.target) - e2:SetOperation(c32485518.operation) - c:RegisterEffect(e2) -end -function c32485518.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end -function c32485518.filter(c) - return c:GetCode()==4064256 and c:IsAbleToHand() -end -function c32485518.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c32485518.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c32485518.filter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c32485518.filter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0) -end -function c32485518.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end diff --git a/script/c32491822.lua b/script/c32491822.lua deleted file mode 100644 index af9f88b6b0..0000000000 --- a/script/c32491822.lua +++ /dev/null @@ -1,95 +0,0 @@ ---降雷皇ハモン -function c32491822.initial_effect(c) - c:EnableReviveLimit() - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_SPSUMMON_PROC) - e2:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e2:SetRange(LOCATION_HAND) - e2:SetCondition(c32491822.spcon) - e2:SetOperation(c32491822.spop) - c:RegisterEffect(e2) - --damage - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(32491822,0)) - e3:SetCategory(CATEGORY_DAMAGE) - e3:SetCode(EVENT_BATTLE_DESTROYING) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e3:SetCondition(c32491822.damcon) - e3:SetTarget(c32491822.damtg) - e3:SetOperation(c32491822.damop) - c:RegisterEffect(e3) - --atk limit - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_FIELD) - e4:SetRange(LOCATION_MZONE) - e4:SetTargetRange(0,LOCATION_MZONE) - e4:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET) - e4:SetCondition(c32491822.atcon) - e4:SetValue(c32491822.atlimit) - c:RegisterEffect(e4) -end -function c32491822.spfilter(c) - return c:IsFaceup() and c:GetType()==TYPE_SPELL+TYPE_CONTINUOUS and c:IsAbleToGraveAsCost() -end -function c32491822.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ft<-2 then return false end - if ft<=0 then - local ct=-ft+1 - return Duel.IsExistingMatchingCard(c32491822.spfilter,tp,LOCATION_MZONE,0,ct,nil) - and Duel.IsExistingMatchingCard(c32491822.spfilter,tp,LOCATION_ONFIELD,0,3,nil) - else - return Duel.IsExistingMatchingCard(c32491822.spfilter,tp,LOCATION_ONFIELD,0,3,nil) - end -end -function c32491822.spop(e,tp,eg,ep,ev,re,r,rp,c) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ft<=0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local sg=Duel.GetMatchingGroup(c32491822.spfilter,tp,LOCATION_ONFIELD,0,nil) - local ct=-ft+1 - local g1=sg:FilterSelect(tp,Card.IsLocation,ct,ct,nil,LOCATION_MZONE) - if ct<3 then - sg:Sub(g1) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g2=sg:Select(tp,3-ct,3-ct,nil) - g1:Merge(g2) - end - Duel.SendtoGrave(g1,REASON_COST) - else - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c32491822.spfilter,tp,LOCATION_ONFIELD,0,3,3,nil) - Duel.SendtoGrave(g,REASON_COST) - end -end -function c32491822.damcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local bc=c:GetBattleTarget() - return c:IsRelateToBattle() and bc:IsLocation(LOCATION_GRAVE) and bc:IsReason(REASON_BATTLE) and bc:IsType(TYPE_MONSTER) -end -function c32491822.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(1000) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,1000) -end -function c32491822.damop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end -function c32491822.atcon(e) - return e:GetHandler():IsDefencePos() -end -function c32491822.atlimit(e,c) - return c~=e:GetHandler() -end diff --git a/script/c32539892.lua b/script/c32539892.lua deleted file mode 100644 index 03f60d5bd2..0000000000 --- a/script/c32539892.lua +++ /dev/null @@ -1,24 +0,0 @@ ---イビー -function c32539892.initial_effect(c) - --damage - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(32539892,0)) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCondition(c32539892.drcon) - e1:SetTarget(c32539892.drtg) - e1:SetOperation(c32539892.drop) - c:RegisterEffect(e1) -end -function c32539892.drcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetPreviousLocation()==LOCATION_HAND and bit.band(r,0x4040)==0x4040 and rp~=tp -end -function c32539892.drtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,1000) -end -function c32539892.drop(e,tp,eg,ep,ev,re,r,rp) - Duel.Damage(1-tp,1000,REASON_EFFECT) -end diff --git a/script/c32542011.lua b/script/c32542011.lua deleted file mode 100644 index 7ec912fdd5..0000000000 --- a/script/c32542011.lua +++ /dev/null @@ -1,78 +0,0 @@ ---燃え上がる大海 -function c32542011.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_END_PHASE) - e1:SetCondition(c32542011.condition) - e1:SetTarget(c32542011.target) - e1:SetOperation(c32542011.activate) - c:RegisterEffect(e1) -end -function c32542011.cfilter(c) - return c:IsFaceup() and c:IsLevelAbove(7) and c:IsAttribute(ATTRIBUTE_WATER+ATTRIBUTE_FIRE) -end -function c32542011.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c32542011.cfilter,tp,LOCATION_MZONE,0,1,nil) -end -function c32542011.cfilter2(c,att) - return c:IsFaceup() and c:IsAttribute(att) -end -function c32542011.spfilter(c,tid,e,tp) - local re=c:GetReasonEffect() - return c:GetTurnID()==tid and c:IsReason(REASON_COST) and re and re:IsHasType(0x7e0) and re:IsActiveType(TYPE_MONSTER) - and c:IsAttribute(ATTRIBUTE_WATER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c32542011.desfilter(c) - return c:IsDestructable() -end -function c32542011.target(e,tp,eg,ep,ev,re,r,rp,chk) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - local b1=Duel.IsExistingMatchingCard(c32542011.cfilter2,tp,LOCATION_MZONE,0,1,nil,ATTRIBUTE_FIRE) - and Duel.IsExistingMatchingCard(c32542011.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) - local b2=Duel.IsExistingMatchingCard(c32542011.cfilter2,tp,LOCATION_MZONE,0,1,nil,ATTRIBUTE_WATER) - and ft>0 and Duel.IsExistingMatchingCard(c32542011.spfilter,tp,LOCATION_GRAVE,0,1,nil,Duel.GetTurnCount(),e,tp) - if chk==0 then return b1 or b2 end - if b1 then - local g=Duel.GetMatchingGroup(c32542011.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) - end - if b2 then - local g=Duel.GetMatchingGroup(c32542011.spfilter,tp,LOCATION_GRAVE,0,nil,Duel.GetTurnCount(),e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,ft,0,0) - local dg=Duel.GetMatchingGroup(c32542011.desfilter,tp,LOCATION_MZONE,0,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,dg,1,0,0) - end -end -function c32542011.activate(e,tp,eg,ep,ev,re,r,rp) - local opt=0 - if Duel.IsExistingMatchingCard(c32542011.cfilter2,tp,LOCATION_MZONE,0,1,nil,ATTRIBUTE_WATER) then opt=opt+1 end - if Duel.IsExistingMatchingCard(c32542011.cfilter2,tp,LOCATION_MZONE,0,1,nil,ATTRIBUTE_FIRE) then opt=opt+2 end - if opt==1 or opt==3 then - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ft>0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c32542011.spfilter,tp,LOCATION_GRAVE,0,1,ft,nil,Duel.GetTurnCount(),e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - Duel.BreakEffect() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local dg=Duel.SelectMatchingCard(tp,c32542011.desfilter,tp,LOCATION_MZONE,0,1,1,nil) - Duel.Destroy(dg,REASON_EFFECT) - end - end - end - if opt==2 or opt==3 then - Duel.BreakEffect() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectMatchingCard(tp,c32542011.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - if g:GetCount()>0 then - Duel.HintSelection(g) - Duel.Destroy(g,REASON_EFFECT) - Duel.BreakEffect() - Duel.DiscardHand(tp,nil,1,1,REASON_DISCARD+REASON_EFFECT) - end - end -end diff --git a/script/c32543380.lua b/script/c32543380.lua deleted file mode 100644 index 2184097b93..0000000000 --- a/script/c32543380.lua +++ /dev/null @@ -1,72 +0,0 @@ ---ヴォルカニック・デビル -function c32543380.initial_effect(c) - c:EnableReviveLimit() - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c32543380.spcon) - e1:SetOperation(c32543380.spop) - c:RegisterEffect(e1) - --must attack - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_MUST_ATTACK) - e2:SetRange(LOCATION_MZONE) - e2:SetTargetRange(0,LOCATION_MZONE) - c:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e3:SetCode(EFFECT_MUST_BE_ATTACKED) - e3:SetRange(LOCATION_MZONE) - e3:SetValue(aux.imval1) - c:RegisterEffect(e3) - --special summon - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(32543380,0)) - e4:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e4:SetCode(EVENT_BATTLE_DESTROYING) - e4:SetCondition(c32543380.descon) - e4:SetTarget(c32543380.destg) - e4:SetOperation(c32543380.desop) - c:RegisterEffect(e4) -end -function c32543380.spfilter(c) - return c:IsFaceup() and c:IsCode(21420702) and c:IsAbleToGraveAsCost() -end -function c32543380.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c32543380.spfilter,tp,LOCATION_ONFIELD,0,1,nil) -end -function c32543380.spop(e,tp,eg,ep,ev,re,r,rp,c) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c32543380.spfilter,tp,LOCATION_ONFIELD,0,1,1,nil) - Duel.SendtoGrave(g, REASON_COST) -end -function c32543380.descon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local a=Duel.GetAttacker() - local d=Duel.GetAttackTarget() - if a~=c then d=a end - return c:IsRelateToBattle() and c:IsFaceup() - and d and d:GetLocation()==LOCATION_GRAVE and d:IsType(TYPE_MONSTER) -end -function c32543380.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,0,LOCATION_MZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,g:GetCount()*500) -end -function c32543380.desop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,0,LOCATION_MZONE,nil) - local ct=Duel.Destroy(g,REASON_EFFECT) - if ct>0 then - Duel.Damage(1-tp,ct*500,REASON_EFFECT) - end -end diff --git a/script/c32548609.lua b/script/c32548609.lua deleted file mode 100644 index 4e8998349d..0000000000 --- a/script/c32548609.lua +++ /dev/null @@ -1,33 +0,0 @@ ---エレキンモグラ -function c32548609.initial_effect(c) - --extra attack - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_EXTRA_ATTACK) - e1:SetValue(1) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(32548609,0)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_BATTLE_START) - e2:SetCondition(c32548609.descon) - e2:SetTarget(c32548609.destg) - e2:SetOperation(c32548609.desop) - c:RegisterEffect(e2) -end -function c32548609.descon(e,tp,eg,ep,ev,re,r,rp) - local d=Duel.GetAttackTarget() - return e:GetHandler()==Duel.GetAttacker() and d and d:IsFacedown() and d:IsDefencePos() -end -function c32548609.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetAttackTarget():IsDestructable() end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,Duel.GetAttackTarget(),1,0,0) -end -function c32548609.desop(e,tp,eg,ep,ev,re,r,rp) - local d=Duel.GetAttackTarget() - if d:IsRelateToBattle() then - Duel.Destroy(d,REASON_EFFECT) - end -end diff --git a/script/c32559361.lua b/script/c32559361.lua deleted file mode 100644 index 2694841acb..0000000000 --- a/script/c32559361.lua +++ /dev/null @@ -1,86 +0,0 @@ ---CNo.9 天蓋妖星カオス・ダイソン・スフィア -function c32559361.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,10,3) - c:EnableReviveLimit() - --material - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(32559361,0)) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_BATTLE_START) - e1:SetTarget(c32559361.target) - e1:SetOperation(c32559361.operation) - c:RegisterEffect(e1) - --damage - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(32559361,1)) - e2:SetCategory(CATEGORY_DAMAGE) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetTarget(c32559361.damtg) - e2:SetOperation(c32559361.damop) - c:RegisterEffect(e2) - --damage2 - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(32559361,2)) - e3:SetCategory(CATEGORY_DAMAGE) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1) - e3:SetCondition(c32559361.damcon) - e3:SetCost(c32559361.damcost) - e3:SetTarget(c32559361.damtg2) - e3:SetOperation(c32559361.damop2) - c:RegisterEffect(e3) -end -c32559361.xyz_number=9 -function c32559361.target(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - local tc=c:GetBattleTarget() - if chk==0 then return tc and c:IsType(TYPE_XYZ) and not tc:IsType(TYPE_TOKEN) and tc:IsAbleToChangeControler() end -end -function c32559361.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=c:GetBattleTarget() - if c:IsRelateToEffect(e) and c:IsFaceup() and tc:IsRelateToBattle() and not tc:IsImmuneToEffect(e) then - local og=tc:GetOverlayGroup() - if og:GetCount()>0 then - Duel.SendtoGrave(og,REASON_RULE) - end - Duel.Overlay(c,Group.FromCards(tc)) - end -end -function c32559361.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():GetOverlayCount()>0 end - local ct=e:GetHandler():GetOverlayCount() - Duel.SetTargetPlayer(1-tp) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,ct*300) -end -function c32559361.damop(e,tp,eg,ep,ev,re,r,rp) - local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) - local ct=e:GetHandler():GetOverlayCount() - Duel.Damage(p,ct*300,REASON_EFFECT) -end -function c32559361.damcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetOverlayGroup():IsExists(Card.IsCode,1,nil,1992816) -end -function c32559361.damcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,99,REASON_COST) - local ct=Duel.GetOperatedGroup():GetCount() - e:SetLabel(ct) -end -function c32559361.damtg2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local ct=e:GetLabel() - Duel.SetTargetPlayer(1-tp) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,ct*800) -end -function c32559361.damop2(e,tp,eg,ep,ev,re,r,rp) - local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) - local ct=e:GetLabel() - Duel.Damage(p,ct*800,REASON_EFFECT) -end diff --git a/script/c32566831.lua b/script/c32566831.lua deleted file mode 100644 index 7dfcd349f2..0000000000 --- a/script/c32566831.lua +++ /dev/null @@ -1,41 +0,0 @@ ---紅玉の宝札 -function c32566831.initial_effect(c) - --activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCountLimit(1,32566831+EFFECT_COUNT_CODE_OATH) - e1:SetCost(c32566831.cost) - e1:SetTarget(c32566831.target) - e1:SetOperation(c32566831.activate) - c:RegisterEffect(e1) -end -function c32566831.cfilter(c) - return c:IsSetCard(0x3b) and c:GetLevel()==7 and c:IsAbleToGraveAsCost() -end -function c32566831.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c32566831.cfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,c32566831.cfilter,1,1,REASON_COST,nil) -end -function c32566831.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp,2) end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(2) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2) -end -function c32566831.tgfilter(c) - return c:IsSetCard(0x3b) and c:GetLevel()==7 and c:IsAbleToGrave() -end -function c32566831.activate(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - local dr=Duel.Draw(p,d,REASON_EFFECT) - local g=Duel.GetMatchingGroup(c32566831.tgfilter,p,LOCATION_DECK,0,nil) - if dr~=0 and g:GetCount()>0 and Duel.SelectYesNo(p,aux.Stringid(32566831,0)) then - Duel.BreakEffect() - Duel.Hint(HINT_SELECTMSG,p,HINTMSG_TOGRAVE) - local sg=g:Select(p,1,1,nil) - Duel.SendtoGrave(sg,REASON_EFFECT) - end -end diff --git a/script/c32603633.lua b/script/c32603633.lua deleted file mode 100644 index 58f1ff5b0a..0000000000 --- a/script/c32603633.lua +++ /dev/null @@ -1,39 +0,0 @@ ---究極・背水の陣 -function c32603633.initial_effect(c) - --activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c32603633.cost) - e1:SetTarget(c32603633.tg) - e1:SetOperation(c32603633.op) - c:RegisterEffect(e1) -end -function c32603633.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLP(tp)>100 end - Duel.PayLPCost(tp,Duel.GetLP(tp)-100) -end -function c32603633.filter(c,e,tp) - return c:IsSetCard(0x3d) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) - and not Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_MZONE,0,1,nil,c:GetCode()) -end -function c32603633.tg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c32603633.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) - end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE) -end -function c32603633.op(e,tp,eg,ep,ev,re,r,rp) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ft<=0 then return end - local g=Duel.GetMatchingGroup(c32603633.filter,tp,LOCATION_GRAVE,0,nil,e,tp) - while g:GetCount()>0 and ft>0 do - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=g:Select(tp,1,1,nil) - Duel.SpecialSummonStep(sg:GetFirst(), 0, tp, tp, false, false, POS_FACEUP) - ft=ft-1 - g:Remove(Card.IsCode,nil,sg:GetFirst():GetCode()) - end - Duel.SpecialSummonComplete() -end diff --git a/script/c32619583.lua b/script/c32619583.lua deleted file mode 100644 index c42e39f7d4..0000000000 --- a/script/c32619583.lua +++ /dev/null @@ -1,30 +0,0 @@ ---暗黒界の軍神 シルバ -function c32619583.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(32619583,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TODECK) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCondition(c32619583.spcon) - e1:SetTarget(c32619583.sptg) - e1:SetOperation(c32619583.spop) - c:RegisterEffect(e1) -end -function c32619583.spcon(e,tp,eg,ep,ev,re,r,rp) - e:SetLabel(e:GetHandler():GetPreviousControler()) - return e:GetHandler():IsPreviousLocation(LOCATION_HAND) and bit.band(r,0x4040)==0x4040 -end -function c32619583.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c32619583.spop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) and Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP)>0 - and rp~=tp and tp==e:GetLabel() and Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>1 then - Duel.BreakEffect() - Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_TODECK) - local g=Duel.SelectMatchingCard(1-tp,aux.TRUE,tp,0,LOCATION_HAND,2,2,nil) - Duel.SendtoDeck(g,nil,1,REASON_EFFECT) - end -end diff --git a/script/c32623004.lua b/script/c32623004.lua deleted file mode 100644 index be21ae2eb4..0000000000 --- a/script/c32623004.lua +++ /dev/null @@ -1,41 +0,0 @@ ---否定ペンギン -function c32623004.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(32623004,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_QUICK_F) - e1:SetCode(EVENT_CHAINING) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) - e1:SetRange(LOCATION_GRAVE) - e1:SetCountLimit(1,32623004) - e1:SetCondition(c32623004.spcon) - e1:SetTarget(c32623004.sptg) - e1:SetOperation(c32623004.spop) - c:RegisterEffect(e1) - --remove - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetProperty(EFFECT_FLAG_SET_AVAILABLE) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EFFECT_TO_HAND_REDIRECT) - e2:SetTargetRange(LOCATION_ONFIELD,LOCATION_ONFIELD) - e2:SetTarget(c32623004.rmtg) - e2:SetValue(LOCATION_REMOVED) - c:RegisterEffect(e2) -end -function c32623004.spcon(e,tp,eg,ep,ev,re,r,rp) - return re:GetHandler():IsSetCard(0x5a) -end -function c32623004.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c32623004.spop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP) - end -end -function c32623004.rmtg(e,c) - return c:IsReason(REASON_EFFECT) and c:GetReasonEffect():GetHandler():IsSetCard(0x5a) -end diff --git a/script/c32646477.lua b/script/c32646477.lua deleted file mode 100644 index 80d27661e8..0000000000 --- a/script/c32646477.lua +++ /dev/null @@ -1,42 +0,0 @@ ---ダーク・ダイブ・ボンバー -function c32646477.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1) - c:EnableReviveLimit() - --damage - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(32646477,0)) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1,32646477) - e1:SetCondition(c32646477.condition) - e1:SetCost(c32646477.cost) - e1:SetTarget(c32646477.target) - e1:SetOperation(c32646477.operation) - c:RegisterEffect(e1) -end -function c32646477.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()==PHASE_MAIN1 -end -function c32646477.costfilter(c) - return c:GetLevel()>0 -end -function c32646477.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,c32646477.costfilter,1,nil) end - local g=Duel.SelectReleaseGroup(tp,c32646477.costfilter,1,1,nil) - e:SetLabel(g:GetFirst():GetLevel()*200) - Duel.Release(g,REASON_COST) -end -function c32646477.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(e:GetLabel()) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,e:GetLabel()) - e:SetLabel(0) -end -function c32646477.operation(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c32663969.lua b/script/c32663969.lua deleted file mode 100644 index 760863ddc0..0000000000 --- a/script/c32663969.lua +++ /dev/null @@ -1,47 +0,0 @@ ---ドミノ -function c32663969.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(32663969,0)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetRange(LOCATION_SZONE) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_BATTLE_DESTROYED) - e2:SetCondition(c32663969.descon) - e2:SetCost(c32663969.descost) - e2:SetTarget(c32663969.destg) - e2:SetOperation(c32663969.desop) - c:RegisterEffect(e2) -end -function c32663969.cfilter(c,tp) - return c:IsLocation(LOCATION_GRAVE) and c:IsReason(REASON_BATTLE) and c:GetPreviousControler()==tp -end -function c32663969.descon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c32663969.cfilter,1,nil,1-tp) -end -function c32663969.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,Card.IsAbleToGraveAsCost,tp,LOCATION_MZONE,0,1,1,nil) - Duel.SendtoGrave(g,REASON_COST) -end -function c32663969.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsDestructable() end - if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c32663969.desop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c32679370.lua b/script/c32679370.lua deleted file mode 100644 index feae3c6c2c..0000000000 --- a/script/c32679370.lua +++ /dev/null @@ -1,35 +0,0 @@ ---ヒーロー・キッズ -function c32679370.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(32679370,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetTarget(c32679370.target) - e1:SetOperation(c32679370.operation) - c:RegisterEffect(e1) -end -function c32679370.filter(c,e,tp) - return c:IsCode(32679370) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c32679370.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c32679370.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c32679370.operation(e,tp,eg,ep,ev,re,r,rp) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ft<=0 then return end - local g=Duel.GetMatchingGroup(c32679370.filter,tp,LOCATION_DECK,0,nil,e,tp) - local tc=g:GetFirst() - if tc then - Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) - end - tc=g:GetNext() - if ft>1 and tc and Duel.SelectYesNo(tp,aux.Stringid(32679370,1)) then - Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) - end - Duel.SpecialSummonComplete() -end diff --git a/script/c32696942.lua b/script/c32696942.lua deleted file mode 100644 index 03638e134b..0000000000 --- a/script/c32696942.lua +++ /dev/null @@ -1,36 +0,0 @@ ---三段腹ナイト -function c32696942.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(32696942,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCondition(c32696942.spcon) - e1:SetTarget(c32696942.sptg) - e1:SetOperation(c32696942.spop) - c:RegisterEffect(e1) -end -function c32696942.spcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsReason(REASON_COST) and re:IsHasType(0x7e0) and re:IsActiveType(TYPE_MONSTER) - and bit.band(c:GetPreviousLocation(),LOCATION_OVERLAY)~=0 -end -function c32696942.filter(c,e,tp) - return c:IsLevelBelow(3) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c32696942.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c32696942.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c32696942.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c32696942.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c32703716.lua b/script/c32703716.lua deleted file mode 100644 index c6dff0b1a5..0000000000 --- a/script/c32703716.lua +++ /dev/null @@ -1,32 +0,0 @@ ---フィッシュアンドキックス -function c32703716.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_REMOVE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c32703716.condition) - e1:SetTarget(c32703716.target) - e1:SetOperation(c32703716.activate) - c:RegisterEffect(e1) -end -function c32703716.cfilter(c) - return c:IsFaceup() and c:IsRace(RACE_FISH+RACE_SEASERPENT+RACE_AQUA) -end -function c32703716.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c32703716.cfilter,tp,LOCATION_REMOVED,0,3,nil) -end -function c32703716.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsAbleToRemove() end - if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) -end -function c32703716.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) - end -end diff --git a/script/c32710364.lua b/script/c32710364.lua deleted file mode 100644 index c4bda52f06..0000000000 --- a/script/c32710364.lua +++ /dev/null @@ -1,64 +0,0 @@ ---宝玉獣ルビー・カーバンクル -function c32710364.initial_effect(c) - --send replace - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_TO_GRAVE_REDIRECT_CB) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetCondition(c32710364.repcon) - e1:SetOperation(c32710364.repop) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(32710364,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetTarget(c32710364.target) - e2:SetOperation(c32710364.operation) - c:RegisterEffect(e2) -end -function c32710364.repcon(e) - local c=e:GetHandler() - return c:IsFaceup() and c:IsLocation(LOCATION_MZONE) and c:IsReason(REASON_DESTROY) -end -function c32710364.repop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local e1=Effect.CreateEffect(c) - e1:SetCode(EFFECT_CHANGE_TYPE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fc0000) - e1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS) - c:RegisterEffect(e1) - Duel.RaiseEvent(c,47408488,e,0,tp,0,0) -end -function c32710364.filter(c,e,sp) - return c:IsFaceup() and c:IsSetCard(0x1034) and c:IsCanBeSpecialSummoned(e,0,sp,true,false) -end -function c32710364.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c32710364.filter,tp,LOCATION_SZONE,0,1,nil,e,tp) - and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end - local ct=Duel.GetLocationCount(tp,LOCATION_MZONE) - local gct=Duel.GetMatchingGroupCount(c32710364.filter,tp,LOCATION_SZONE,0,nil,e,tp) - if ct>gct then - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,gct,tp,LOCATION_SZONE) - else - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,ct,tp,LOCATION_SZONE) - end -end -function c32710364.operation(e,tp,eg,ep,ev,re,r,rp,chk) - local ct=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ct==0 then return end - local g=Duel.GetMatchingGroup(c32710364.filter,tp,LOCATION_SZONE,0,nil,e,tp) - local gc=g:GetCount() - if gc==0 then return end - if gc<=ct then - Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP) - else - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=g:Select(tp,ct,ct,nil) - Duel.SpecialSummon(sg,0,tp,tp,true,false,POS_FACEUP) - end -end diff --git a/script/c32723153.lua b/script/c32723153.lua deleted file mode 100644 index bdbe913c74..0000000000 --- a/script/c32723153.lua +++ /dev/null @@ -1,29 +0,0 @@ ---マジカル・エクスプロージョン -function c32723153.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_DRAW_PHASE) - e1:SetCondition(c32723153.condition) - e1:SetTarget(c32723153.target) - e1:SetOperation(c32723153.activate) - c:RegisterEffect(e1) -end -function c32723153.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)==0 -end -function c32723153.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_GRAVE,0,1,nil,TYPE_SPELL) end - Duel.SetTargetPlayer(1-tp) - local dam=Duel.GetMatchingGroupCount(Card.IsType,tp,LOCATION_GRAVE,0,nil,TYPE_SPELL)*200 - Duel.SetTargetParam(dam) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,dam) -end -function c32723153.activate(e,tp,eg,ep,ev,re,r,rp) - local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) - local dam=Duel.GetMatchingGroupCount(Card.IsType,tp,LOCATION_GRAVE,0,nil,TYPE_SPELL)*200 - Duel.Damage(p,dam,REASON_EFFECT) -end diff --git a/script/c32744558.lua b/script/c32744558.lua deleted file mode 100644 index a3a1a11a72..0000000000 --- a/script/c32744558.lua +++ /dev/null @@ -1,33 +0,0 @@ ---レアル・ジェネクス・コーディネイター -function c32744558.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(32744558,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c32744558.target) - e1:SetOperation(c32744558.operation) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e2) -end -function c32744558.filter(c,e,tp) - return c:IsSetCard(0x2) and c:GetLevel()<=3 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c32744558.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c32744558.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c32744558.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c32744558.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c32750341.lua b/script/c32750341.lua deleted file mode 100644 index 33014f7d0b..0000000000 --- a/script/c32750341.lua +++ /dev/null @@ -1,29 +0,0 @@ ---BK スパー -function c32750341.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c32750341.spcon) - e1:SetOperation(c32750341.spop) - c:RegisterEffect(e1) -end -function c32750341.filter(c) - return c:IsFaceup() and c:IsSetCard(0x84) -end -function c32750341.spcon(e,c) - if c==nil then return true end - return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and - Duel.IsExistingMatchingCard(c32750341.filter,c:GetControler(),LOCATION_MZONE,0,1,nil) -end -function c32750341.spop(e,tp,eg,ep,ev,re,r,rp,c) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_BP) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) - e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) -end diff --git a/script/c32750510.lua b/script/c32750510.lua deleted file mode 100644 index 5373a023b9..0000000000 --- a/script/c32750510.lua +++ /dev/null @@ -1,71 +0,0 @@ ---アイス・ブリザード・マスター -function c32750510.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c32750510.spcon) - e1:SetOperation(c32750510.spop) - c:RegisterEffect(e1) - --add counter - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(32750510,0)) - e2:SetCategory(CATEGORY_COUNTER) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetCountLimit(1) - e2:SetRange(LOCATION_MZONE) - e2:SetTarget(c32750510.target) - e2:SetOperation(c32750510.operation) - c:RegisterEffect(e2) - --destroy - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(32750510,1)) - e3:SetCategory(CATEGORY_DESTROY) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_MZONE) - e3:SetCost(c32750510.descost) - e3:SetTarget(c32750510.destg) - e3:SetOperation(c32750510.desop) - c:RegisterEffect(e3) -end -function c32750510.spcon(e,c) - if c==nil then return true end - return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-2 - and Duel.CheckReleaseGroup(c:GetControler(),Card.IsAttribute,2,nil,ATTRIBUTE_WATER) -end -function c32750510.spop(e,tp,eg,ep,ev,re,r,rp,c) - local g=Duel.SelectReleaseGroup(c:GetControler(),Card.IsAttribute,2,2,nil,ATTRIBUTE_WATER) - Duel.Release(g,REASON_COST) -end -function c32750510.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsCanAddCounter(0x15,1) end - if chk==0 then return Duel.IsExistingTarget(Card.IsCanAddCounter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,0x15,1) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - local g=Duel.SelectTarget(tp,Card.IsCanAddCounter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,0x15,1) - Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,1,0,0) -end -function c32750510.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) and tc:IsCanAddCounter(0x15,1) then - tc:AddCounter(0x15,1) - end -end -function c32750510.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end -function c32750510.desfilter(c) - return c:GetCounter(0x15)~=0 and c:IsDestructable() -end -function c32750510.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c32750510.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,e:GetHandler()) end - local g=Duel.GetMatchingGroup(c32750510.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c32750510.desop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c32750510.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,e:GetHandler()) - Duel.Destroy(g,REASON_EFFECT) -end diff --git a/script/c32751480.lua b/script/c32751480.lua deleted file mode 100644 index 456d2cdc0a..0000000000 --- a/script/c32751480.lua +++ /dev/null @@ -1,6 +0,0 @@ ---砂の魔女 -function c32751480.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcCode2(c,13039848,93221206,true,true) -end diff --git a/script/c32752319.lua b/script/c32752319.lua deleted file mode 100644 index 8eb875f8ad..0000000000 --- a/script/c32752319.lua +++ /dev/null @@ -1,39 +0,0 @@ ---ユーフォロイド・ファイター -function c32752319.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcCodeFun(c,7602840,aux.FilterBoolFunction(Card.IsRace,RACE_WARRIOR),1,false,false) - --atk - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(c32752319.atkcon) - e1:SetOperation(c32752319.atkop) - c:RegisterEffect(e1) -end -function c32752319.atkcon(e,tp,eg,ep,ev,re,r,rp) - return bit.band(e:GetHandler():GetSummonType(),SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION -end -function c32752319.atkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local g=c:GetMaterial() - local tc=g:GetFirst() - local atk=0 - while tc do - local catk=tc:GetBaseAttack() - if catk<0 then catk=0 end - atk=atk+catk - tc=g:GetNext() - end - if atk~=0 then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_BASE_ATTACK) - e1:SetValue(atk) - e1:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_SET_BASE_DEFENCE) - c:RegisterEffect(e2) - end -end diff --git a/script/c32754886.lua b/script/c32754886.lua deleted file mode 100644 index 24e395cc0e..0000000000 --- a/script/c32754886.lua +++ /dev/null @@ -1,52 +0,0 @@ ---ブラック・イリュージョン -function c32754886.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c32754886.target) - e1:SetOperation(c32754886.activate) - c:RegisterEffect(e1) -end -function c32754886.filter(c) - return c:IsFaceup() and c:IsRace(RACE_SPELLCASTER) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsAttackAbove(2000) -end -function c32754886.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c32754886.filter,tp,LOCATION_MZONE,0,1,nil) end -end -function c32754886.activate(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local g=Duel.GetMatchingGroup(c32754886.filter,tp,LOCATION_MZONE,0,nil) - local tc=g:GetFirst() - while tc do - Duel.NegateRelatedChain(tc,RESET_TURN_SET) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e1:SetValue(1) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - tc:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_DISABLE_EFFECT) - e3:SetValue(RESET_TURN_SET) - e3:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - tc:RegisterEffect(e3) - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetCode(EFFECT_IMMUNE_EFFECT) - e4:SetValue(c32754886.efilter) - e4:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - e4:SetOwnerPlayer(tp) - tc:RegisterEffect(e4) - tc=g:GetNext() - end -end -function c32754886.efilter(e,re) - return e:GetOwnerPlayer()~=re:GetOwnerPlayer() -end diff --git a/script/c32761286.lua b/script/c32761286.lua deleted file mode 100644 index d68dbea86c..0000000000 --- a/script/c32761286.lua +++ /dev/null @@ -1,69 +0,0 @@ ---スクラップ・ワーム -function c32761286.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetOperation(c32761286.regop) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(32761286,0)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EVENT_PHASE+PHASE_BATTLE) - e2:SetCountLimit(1) - e2:SetTarget(c32761286.destg) - e2:SetOperation(c32761286.desop) - c:RegisterEffect(e2) - --search - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(32761286,1)) - e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_TO_GRAVE) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) - e3:SetCondition(c32761286.thcon) - e3:SetTarget(c32761286.thtg) - e3:SetOperation(c32761286.thop) - c:RegisterEffect(e3) - --direct attack - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetCode(EFFECT_DIRECT_ATTACK) - c:RegisterEffect(e4) -end -function c32761286.regop(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():RegisterFlagEffect(32761286,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_BATTLE,0,1) -end -function c32761286.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():GetFlagEffect(32761286)~=0 end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0) -end -function c32761286.desop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - Duel.Destroy(e:GetHandler(),REASON_EFFECT) - end -end -function c32761286.thcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return bit.band(c:GetReason(),0x41)==0x41 and re:GetOwner():IsSetCard(0x24) -end -function c32761286.filter(c) - return c:IsSetCard(0x24) and c:IsType(TYPE_MONSTER) and c:GetCode()~=32761286 and c:IsAbleToHand() -end -function c32761286.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c32761286.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c32761286.filter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c32761286.filter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c32761286.thop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end diff --git a/script/c32787239.lua b/script/c32787239.lua deleted file mode 100644 index 46da3e07f6..0000000000 --- a/script/c32787239.lua +++ /dev/null @@ -1,52 +0,0 @@ ---EMラ・パンダ -function c32787239.initial_effect(c) - --pendulum summon - aux.AddPendulumProcedure(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --scale change - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(32787239,0)) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_PZONE) - e2:SetCountLimit(1) - e2:SetTarget(c32787239.sctg) - e2:SetOperation(c32787239.scop) - c:RegisterEffect(e2) - --negate attack - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(32787239,1)) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_BE_BATTLE_TARGET) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1,32787239) - e3:SetCondition(c32787239.condition) - e3:SetOperation(c32787239.operation) - c:RegisterEffect(e3) -end -function c32787239.sctg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():GetLeftScale()<12 end -end -function c32787239.scop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) or c:GetLeftScale()>=12 then return end - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_LSCALE) - e1:SetValue(1) - e1:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_UPDATE_RSCALE) - c:RegisterEffect(e2) -end -function c32787239.condition(e,tp,eg,ep,ev,re,r,rp) - local d=Duel.GetAttackTarget() - return d and d:IsControler(tp) and d:IsFaceup() and d:IsType(TYPE_PENDULUM) -end -function c32787239.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateAttack() -end diff --git a/script/c3280747.lua b/script/c3280747.lua deleted file mode 100644 index c8da1eb8f3..0000000000 --- a/script/c3280747.lua +++ /dev/null @@ -1,30 +0,0 @@ ---第六感 -function c3280747.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DRAW+CATEGORY_DECKDES+CATEGORY_DICE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c3280747.target) - e1:SetOperation(c3280747.activate) - c:RegisterEffect(e1) -end -function c3280747.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>=6 end - Duel.SetOperationInfo(0,CATEGORY_DICE,nil,0,tp,2) -end -function c3280747.activate(e,tp,eg,ep,ev,re,r,rp) - local t={} - local i=1 - local p=1 - for i=1,6 do t[i]=i end - local a1=Duel.AnnounceNumber(tp,table.unpack(t)) - for i=1,6 do - if a1~=i then t[p]=i p=p+1 end - end - t[p]=nil - local a2=Duel.AnnounceNumber(tp,table.unpack(t)) - local dc=Duel.TossDice(1-tp,1) - if dc==a1 or dc==a2 then Duel.Draw(tp,dc,REASON_EFFECT) - else Duel.DiscardDeck(tp,dc,REASON_EFFECT) end -end diff --git a/script/c32807846.lua b/script/c32807846.lua deleted file mode 100644 index 4e9ab63e8f..0000000000 --- a/script/c32807846.lua +++ /dev/null @@ -1,26 +0,0 @@ ---増援 -function c32807846.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c32807846.target) - e1:SetOperation(c32807846.activate) - c:RegisterEffect(e1) -end -function c32807846.filter(c) - return c:IsLevelBelow(4) and c:IsRace(RACE_WARRIOR) and c:IsAbleToHand() -end -function c32807846.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c32807846.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c32807846.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c32807846.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c32809211.lua b/script/c32809211.lua deleted file mode 100644 index 8180d92de8..0000000000 --- a/script/c32809211.lua +++ /dev/null @@ -1,8 +0,0 @@ ---人造人間7号 -function c32809211.initial_effect(c) - --direct attack - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DIRECT_ATTACK) - c:RegisterEffect(e1) -end diff --git a/script/c32835363.lua b/script/c32835363.lua deleted file mode 100644 index 084bb1dc19..0000000000 --- a/script/c32835363.lua +++ /dev/null @@ -1,62 +0,0 @@ ---クラッキング -function c32835363.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --damage - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetRange(LOCATION_SZONE) - e2:SetCountLimit(1) - e2:SetCondition(c32835363.regcon) - e2:SetOperation(c32835363.regop) - c:RegisterEffect(e2) - -- - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(32835363,0)) - e2:SetCategory(CATEGORY_DAMAGE) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(32835363) - e2:SetTarget(c32835363.damtg) - e2:SetOperation(c32835363.damop) - c:RegisterEffect(e2) -end -function c32835363.regcon(e,tp,eg,ep,ev,re,r,rp) - local d1=false - local d2=false - local tc=eg:GetFirst() - while tc do - if tc:IsPreviousLocation(LOCATION_MZONE) and tc:IsType(TYPE_MONSTER) and tc:IsReason(REASON_EFFECT) then - if tc:GetControler()==0 then d1=true - else d2=true end - end - tc=eg:GetNext() - end - local evt_p=PLAYER_NONE - if d1 and d2 then evt_p=PLAYER_ALL - elseif d1 then evt_p=0 - elseif d2 then evt_p=1 end - e:SetLabel(evt_p) - return evt_p~=PLAYER_NONE -end -function c32835363.regop(e,tp,eg,ep,ev,re,r,rp) - Duel.RaiseSingleEvent(e:GetHandler(),32835363,e,0,tp,e:GetLabel(),0) -end -function c32835363.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsRelateToEffect(e) end - Duel.SetTargetParam(800) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,0,0,ep,800) -end -function c32835363.damop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local d=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM) - if ep==PLAYER_ALL then - Duel.Damage(tp,d,REASON_EFFECT) - Duel.Damage(1-tp,d,REASON_EFFECT) - else - Duel.Damage(ep,d,REASON_EFFECT) - end -end diff --git a/script/c3283679.lua b/script/c3283679.lua deleted file mode 100644 index adac2a3b90..0000000000 --- a/script/c3283679.lua +++ /dev/null @@ -1,54 +0,0 @@ ---エヴォルド・ラゴスクス -function c3283679.initial_effect(c) - --send to grave - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(3283679,0)) - e1:SetCategory(CATEGORY_TOGRAVE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c3283679.target) - e1:SetOperation(c3283679.operation) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(3283679,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e2:SetCode(EVENT_FLIP) - e2:SetTarget(c3283679.sptg) - e2:SetOperation(c3283679.spop) - c:RegisterEffect(e2) -end -function c3283679.tgfilter(c) - return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x604e) and c:IsAbleToGrave() -end -function c3283679.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c3283679.tgfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) -end -function c3283679.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c3283679.tgfilter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoGrave(g,REASON_EFFECT) - end -end -function c3283679.spfilter(c,e,tp) - return c:IsSetCard(0x304e) and c:IsCanBeSpecialSummoned(e,156,tp,false,false) -end -function c3283679.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c3283679.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c3283679.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c3283679.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,156,tp,tp,false,false,POS_FACEUP) - local rf=g:GetFirst().evolreg - if rf then rf(g:GetFirst()) end - end -end diff --git a/script/c32854013.lua b/script/c32854013.lua deleted file mode 100644 index 8b63850191..0000000000 --- a/script/c32854013.lua +++ /dev/null @@ -1,37 +0,0 @@ ---猛突進 -function c32854013.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TODECK) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,0x1e0) - e1:SetTarget(c32854013.target) - e1:SetOperation(c32854013.activate) - c:RegisterEffect(e1) -end -function c32854013.dfilter(c) - return c:IsFaceup() and c:IsRace(RACE_BEAST) and c:IsDestructable() -end -function c32854013.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - if chk==0 then return Duel.IsExistingTarget(c32854013.dfilter,tp,LOCATION_MZONE,0,1,nil) - and Duel.IsExistingTarget(Card.IsAbleToDeck,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g1=Duel.SelectTarget(tp,c32854013.dfilter,tp,LOCATION_MZONE,0,1,1,nil) - e:SetLabelObject(g1:GetFirst()) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g2=Duel.SelectTarget(tp,Card.IsAbleToDeck,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g1,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g2,1,0,0) -end -function c32854013.activate(e) - local tc1=e:GetLabelObject() - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local tc2=g:GetFirst() - if tc2==tc1 then tc2=g:GetNext() end - if tc1:IsRelateToEffect(e) and tc1:IsFaceup() and Duel.Destroy(tc1,REASON_EFFECT)~=0 and tc2:IsRelateToEffect(e) then - Duel.SendtoDeck(tc2,nil,2,REASON_EFFECT) - end -end diff --git a/script/c32872833.lua b/script/c32872833.lua deleted file mode 100644 index 6e01b43f06..0000000000 --- a/script/c32872833.lua +++ /dev/null @@ -1,19 +0,0 @@ ---星間竜パーセク -function c32872833.initial_effect(c) - --summon with no tribute - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(32872833,0)) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SUMMON_PROC) - e1:SetCondition(c32872833.ntcon) - c:RegisterEffect(e1) -end -function c32872833.filter(c) - return c:IsFaceup() and c:GetLevel()==8 -end -function c32872833.ntcon(e,c,minc) - if c==nil then return true end - return minc==0 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c32872833.filter,c:GetControler(),LOCATION_MZONE,0,1,nil) -end diff --git a/script/c32907538.lua b/script/c32907538.lua deleted file mode 100644 index 299949772f..0000000000 --- a/script/c32907538.lua +++ /dev/null @@ -1,63 +0,0 @@ ---ウォールクリエイター -function c32907538.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(32907538,1)) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c32907538.target) - e1:SetOperation(c32907538.operation) - c:RegisterEffect(e1) - --maintain - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e2:SetCode(EVENT_PHASE+PHASE_END) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCondition(c32907538.mtcon) - e2:SetOperation(c32907538.mtop) - c:RegisterEffect(e2) -end -function c32907538.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) end - if chk==0 then return Duel.IsExistingTarget(nil,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - Duel.SelectTarget(tp,nil,tp,0,LOCATION_MZONE,1,1,nil) -end -function c32907538.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsRelateToEffect(e) then - c:SetCardTarget(tc) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_OWNER_RELATE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetCondition(c32907538.rcon) - tc:RegisterEffect(e1,true) - local e2=e1:Clone() - e2:SetCode(EFFECT_UNRELEASABLE_SUM) - e2:SetValue(1) - tc:RegisterEffect(e2,true) - local e3=e2:Clone() - e3:SetCode(EFFECT_UNRELEASABLE_NONSUM) - tc:RegisterEffect(e3,true) - end -end -function c32907538.rcon(e) - return e:GetOwner():IsHasCardTarget(e:GetHandler()) -end -function c32907538.mtcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c32907538.mtop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLP(tp)>500 and Duel.SelectYesNo(tp,aux.Stringid(32907538,0)) then - Duel.PayLPCost(tp,500) - else - Duel.Destroy(e:GetHandler(),REASON_RULE) - end -end diff --git a/script/c32918479.lua b/script/c32918479.lua deleted file mode 100644 index da8ea34ea5..0000000000 --- a/script/c32918479.lua +++ /dev/null @@ -1,62 +0,0 @@ ---光神機-閃空 -function c32918479.initial_effect(c) - --handes - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(32918479,0)) - e1:SetCategory(CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_BATTLE_DAMAGE) - e1:SetCondition(c32918479.condition) - e1:SetTarget(c32918479.target) - e1:SetOperation(c32918479.operation) - c:RegisterEffect(e1) - -- - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_SUMMON_SUCCESS) - e2:SetOperation(c32918479.regop) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - c:RegisterEffect(e3) - local e4=e2:Clone() - e4:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e4) -end -function c32918479.condition(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp and Duel.GetAttackTarget()==nil -end -function c32918479.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(1) - Duel.SetOperationInfo(0,CATEGORY_DRAW,0,0,tp,1) -end -function c32918479.operation(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end -function c32918479.regop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(32918479,1)) - e1:SetCategory(CATEGORY_TOGRAVE) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetTarget(c32918479.tgtg) - e1:SetOperation(c32918479.tgop) - e1:SetReset(RESET_EVENT+0xc6c0000) - c:RegisterEffect(e1) -end -function c32918479.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,e:GetHandler(),1,0,0) -end -function c32918479.tgop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - Duel.SendtoGrave(c,REASON_EFFECT) - end -end diff --git a/script/c32919136.lua b/script/c32919136.lua deleted file mode 100644 index ca8099172b..0000000000 --- a/script/c32919136.lua +++ /dev/null @@ -1,89 +0,0 @@ ---堕落 -function c32919136.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_CONTROL+CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c32919136.target) - e1:SetOperation(c32919136.operation) - c:RegisterEffect(e1) - --damage - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(32919136,0)) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetCategory(CATEGORY_DAMAGE) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) - e2:SetRange(LOCATION_SZONE) - e2:SetCountLimit(1) - e2:SetCondition(c32919136.damcon) - e2:SetTarget(c32919136.damtg) - e2:SetOperation(c32919136.damop) - c:RegisterEffect(e2) - -- - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e3:SetCode(EFFECT_SELF_DESTROY) - e3:SetRange(LOCATION_SZONE) - e3:SetCondition(c32919136.descon) - c:RegisterEffect(e3) - --equip limit - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetCode(EFFECT_EQUIP_LIMIT) - e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e4:SetValue(c32919136.eqlimit) - c:RegisterEffect(e4) - --control - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_EQUIP) - e5:SetCode(EFFECT_SET_CONTROL) - e5:SetValue(c32919136.ctval) - c:RegisterEffect(e5) -end -function c32919136.filter(c) - return c:IsFaceup() and c:IsControlerCanBeChanged() -end -function c32919136.eqlimit(e,c) - return e:GetHandlerPlayer()~=c:GetControler() or e:GetHandler():GetEquipTarget()==c -end -function c32919136.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c32919136.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c32919136.filter,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) - local g=Duel.SelectTarget(tp,c32919136.filter,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c32919136.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsRelateToEffect(e) then - Duel.Equip(tp,c,tc) - end -end -function c32919136.damcon(e,tp,eg,ep,ev,re,r,rp) - return tp~=Duel.GetTurnPlayer() -end -function c32919136.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(800) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,tp,800) -end -function c32919136.damop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end -function c32919136.desfilter(c) - return c:IsFaceup() and c:IsSetCard(0x45) -end -function c32919136.descon(e) - return not Duel.IsExistingMatchingCard(c32919136.desfilter,e:GetHandlerPlayer(),LOCATION_ONFIELD,0,1,nil) -end -function c32919136.ctval(e,c) - return e:GetHandlerPlayer() -end diff --git a/script/c32933942.lua b/script/c32933942.lua deleted file mode 100644 index d554866596..0000000000 --- a/script/c32933942.lua +++ /dev/null @@ -1,47 +0,0 @@ ---宝玉獣 アメジスト・キャット -function c32933942.initial_effect(c) - --send replace - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_TO_GRAVE_REDIRECT_CB) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetCondition(c32933942.repcon) - e1:SetOperation(c32933942.repop) - c:RegisterEffect(e1) - --direct attack - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DIRECT_ATTACK) - c:RegisterEffect(e2) - --damage reduce - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e3:SetRange(LOCATION_MZONE) - e3:SetCode(EVENT_PRE_BATTLE_DAMAGE) - e3:SetCondition(c32933942.rdcon) - e3:SetOperation(c32933942.rdop) - c:RegisterEffect(e3) -end -function c32933942.repcon(e) - local c=e:GetHandler() - return c:IsFaceup() and c:IsLocation(LOCATION_MZONE) and c:IsReason(REASON_DESTROY) -end -function c32933942.repop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local e1=Effect.CreateEffect(c) - e1:SetCode(EFFECT_CHANGE_TYPE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fc0000) - e1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS) - c:RegisterEffect(e1) - Duel.RaiseEvent(c,47408488,e,0,tp,0,0) -end -function c32933942.rdcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return ep~=tp and c==Duel.GetAttacker() and Duel.GetAttackTarget()==nil - and c:GetEffectCount(EFFECT_DIRECT_ATTACK)<2 and Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0 -end -function c32933942.rdop(e,tp,eg,ep,ev,re,r,rp) - Duel.ChangeBattleDamage(ep,ev/2) -end \ No newline at end of file diff --git a/script/c32995007.lua b/script/c32995007.lua deleted file mode 100644 index c652dc2a8d..0000000000 --- a/script/c32995007.lua +++ /dev/null @@ -1,37 +0,0 @@ ---天狼王 ブルー・セイリオス -function c32995007.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1) - c:EnableReviveLimit() - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(32995007,0)) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCondition(c32995007.atkcon) - e1:SetTarget(c32995007.atktg) - e1:SetOperation(c32995007.atkop) - c:RegisterEffect(e1) -end -function c32995007.atkcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) and e:GetHandler():IsReason(REASON_DESTROY) -end -function c32995007.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil) -end -function c32995007.atkop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(-2400) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - end -end diff --git a/script/c32999573.lua b/script/c32999573.lua deleted file mode 100644 index 802bd0cb54..0000000000 --- a/script/c32999573.lua +++ /dev/null @@ -1,34 +0,0 @@ ---エクシーズ・オーバーライド -function c32999573.initial_effect(c) - --activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --remove overlay replace - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(32999573,0)) - e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e2:SetProperty(EFFECT_FLAG_BOTH_SIDE) - e2:SetCode(EFFECT_OVERLAY_REMOVE_REPLACE) - e2:SetRange(LOCATION_SZONE) - e2:SetCondition(c32999573.rcon) - e2:SetOperation(c32999573.rop) - c:RegisterEffect(e2) -end -function c32999573.rcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetFlagEffect(32999573+ep)==0 - and bit.band(r,REASON_COST)~=0 and re:IsHasType(0x7e0) and re:IsActiveType(TYPE_XYZ) - and re:GetHandler():GetOverlayCount()>=ev-1 - and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_HAND,0,1,nil) -end -function c32999573.rop(e,tp,eg,ep,ev,re,r,rp) - local ct=bit.band(ev,0xffff) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_HAND,0,1,1,nil) - Duel.Remove(g,POS_FACEDOWN,REASON_EFFECT) - if ct>1 then - re:GetHandler():RemoveOverlayCard(tp,ct-1,ct-1,REASON_COST) - end - e:GetHandler():RegisterFlagEffect(32999573+ep,RESET_PHASE+PHASE_END,0,1) -end diff --git a/script/c3300267.lua b/script/c3300267.lua deleted file mode 100644 index 45cc2fad32..0000000000 --- a/script/c3300267.lua +++ /dev/null @@ -1,98 +0,0 @@ ---聖刻龍-シユウドラゴン -function c3300267.initial_effect(c) - --spsummon from hand - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetRange(LOCATION_HAND) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetCondition(c3300267.hspcon) - e1:SetOperation(c3300267.hspop) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(3300267,0)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCost(c3300267.descost) - e2:SetTarget(c3300267.destg) - e2:SetOperation(c3300267.desop) - c:RegisterEffect(e2) - --spsummon - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(3300267,1)) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetCode(EVENT_RELEASE) - e3:SetTarget(c3300267.sptg) - e3:SetOperation(c3300267.spop) - c:RegisterEffect(e3) -end -function c3300267.hspcon(e,c) - if c==nil then return true end - return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-1 - and Duel.CheckReleaseGroup(c:GetControler(),Card.IsSetCard,1,nil,0x69) -end -function c3300267.hspop(e,tp,eg,ep,ev,re,r,rp,c) - local g=Duel.SelectReleaseGroup(c:GetControler(),Card.IsSetCard,1,1,nil,0x69) - Duel.Release(g,REASON_COST) - c:RegisterFlagEffect(0,RESET_EVENT+0x4fc0000,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(3300267,2)) -end -function c3300267.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroupEx(tp,Card.IsSetCard,1,e:GetHandler(),0x69) end - local g=Duel.SelectReleaseGroupEx(tp,Card.IsSetCard,1,1,e:GetHandler(),0x69) - Duel.Release(g,REASON_COST) -end -function c3300267.desfilter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable() -end -function c3300267.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and c3300267.desfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c3300267.desfilter,tp,0,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c3300267.desfilter,tp,0,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c3300267.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end -function c3300267.spfilter(c,e,tp) - return c:IsType(TYPE_NORMAL) and c:IsRace(RACE_DRAGON) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) - and not c:IsHasEffect(EFFECT_NECRO_VALLEY) -end -function c3300267.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,0x13) -end -function c3300267.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c3300267.spfilter,tp,0x13,0,1,1,nil,e,tp) - local tc=g:GetFirst() - if tc and Duel.SpecialSummonStep(g:GetFirst(),0,tp,tp,false,false,POS_FACEUP) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK) - e1:SetValue(0) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_SET_DEFENCE) - tc:RegisterEffect(e2) - Duel.SpecialSummonComplete() - elseif Duel.IsPlayerCanSpecialSummon(tp) then - local cg1=Duel.GetFieldGroup(tp,LOCATION_HAND,0) - local cg2=Duel.GetFieldGroup(tp,LOCATION_DECK,0) - Duel.ConfirmCards(1-tp,cg1) - Duel.ConfirmCards(1-tp,cg2) - Duel.ConfirmCards(tp,cg2) - Duel.ShuffleHand(tp) - Duel.ShuffleDeck(tp) - end -end diff --git a/script/c33017655.lua b/script/c33017655.lua deleted file mode 100644 index 834058532d..0000000000 --- a/script/c33017655.lua +++ /dev/null @@ -1,62 +0,0 @@ ---暗黒界の門 -function c33017655.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --atkup - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e2:SetTarget(aux.TargetBoolFunction(Card.IsRace,RACE_FIEND)) - e2:SetValue(300) - c:RegisterEffect(e2) - --defup - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetCode(EFFECT_UPDATE_DEFENCE) - e3:SetRange(LOCATION_SZONE) - e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e3:SetTarget(aux.TargetBoolFunction(Card.IsRace,RACE_FIEND)) - e3:SetValue(300) - c:RegisterEffect(e3) - --discard & draw - local e4=Effect.CreateEffect(c) - e4:SetCategory(CATEGORY_HANDES+CATEGORY_DRAW) - e4:SetDescription(aux.Stringid(33017655,1)) - e4:SetType(EFFECT_TYPE_IGNITION) - e4:SetRange(LOCATION_SZONE) - e4:SetCountLimit(1) - e4:SetCost(c33017655.cost) - e4:SetTarget(c33017655.target) - e4:SetOperation(c33017655.operation) - c:RegisterEffect(e4) -end -function c33017655.costfilter(c) - return c:IsRace(RACE_FIEND) and c:IsAbleToRemoveAsCost() -end -function c33017655.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c33017655.costfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c33017655.costfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c33017655.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsRace,tp,LOCATION_HAND,0,1,nil,RACE_FIEND) - and Duel.IsPlayerCanDraw(tp,1) end - Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c33017655.operation(e,tp,eg,ep,ev,re,r,rp,chk) - if not e:GetHandler():IsRelateToEffect(e) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) - local g=Duel.SelectMatchingCard(tp,Card.IsRace,tp,LOCATION_HAND,0,1,1,nil,RACE_FIEND) - if g:GetCount()>0 then - Duel.SendtoGrave(g,REASON_EFFECT+REASON_DISCARD) - Duel.BreakEffect() - Duel.Draw(tp,1,REASON_EFFECT) - end -end diff --git a/script/c33031674.lua b/script/c33031674.lua deleted file mode 100644 index 0021b2a0a8..0000000000 --- a/script/c33031674.lua +++ /dev/null @@ -1,4 +0,0 @@ ---灼熱の試練 -function c33031674.initial_effect(c) - aux.AddRitualProcGreater(c,aux.FilterBoolFunction(Card.IsCode,60258960)) -end diff --git a/script/c33034646.lua b/script/c33034646.lua deleted file mode 100644 index b2804d78ac..0000000000 --- a/script/c33034646.lua +++ /dev/null @@ -1,39 +0,0 @@ ---機甲忍者フレイム -function c33034646.initial_effect(c) - --lv up - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(33034646,0)) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c33034646.target) - e1:SetOperation(c33034646.operation) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e3) -end -function c33034646.filter(c) - return c:IsFaceup() and c:GetLevel()~=0 and c:IsSetCard(0x2b) -end -function c33034646.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c33034646.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c33034646.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c33034646.filter,tp,LOCATION_MZONE,0,1,1,nil) -end -function c33034646.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_LEVEL) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(1) - tc:RegisterEffect(e1) - end -end diff --git a/script/c33057951.lua b/script/c33057951.lua deleted file mode 100644 index 671f59fd2f..0000000000 --- a/script/c33057951.lua +++ /dev/null @@ -1,29 +0,0 @@ ---浮上 -function c33057951.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c33057951.target) - e1:SetOperation(c33057951.activate) - c:RegisterEffect(e1) -end -function c33057951.filter(c,e,tp) - return c:IsLevelBelow(3) and c:IsRace(0x60040) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c33057951.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c33057951.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c33057951.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c33057951.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c33057951.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENCE) - end -end diff --git a/script/c33066139.lua b/script/c33066139.lua deleted file mode 100644 index 190409928e..0000000000 --- a/script/c33066139.lua +++ /dev/null @@ -1,31 +0,0 @@ ---カードを狩る死神 -function c33066139.initial_effect(c) - --flip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(33066139,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP) - e1:SetTarget(c33066139.target) - e1:SetOperation(c33066139.operation) - c:RegisterEffect(e1) -end -function c33066139.filter(c) - return c:IsFacedown() or c:IsType(TYPE_TRAP) -end -function c33066139.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_SZONE) and c33066139.filter(chkc) end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c33066139.filter,tp,LOCATION_SZONE,LOCATION_SZONE,1,1,e:GetHandler()) - if g:GetCount()>0 and g:GetFirst():IsFaceup() then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) - end -end -function c33066139.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - if tc:IsFacedown() then Duel.ConfirmCards(tp,tc) end - if tc:IsType(TYPE_TRAP) then Duel.Destroy(tc,REASON_EFFECT) end - end -end diff --git a/script/c33093439.lua b/script/c33093439.lua deleted file mode 100644 index d1710d2130..0000000000 --- a/script/c33093439.lua +++ /dev/null @@ -1,62 +0,0 @@ ---サイバー・エルタニン -function c33093439.initial_effect(c) - c:EnableReviveLimit() - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(aux.FALSE) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_SPSUMMON_PROC) - e2:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e2:SetRange(LOCATION_HAND) - e2:SetCondition(c33093439.spcon) - e2:SetOperation(c33093439.spop) - c:RegisterEffect(e2) - --destroy - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(33093439,0)) - e3:SetCategory(CATEGORY_TOGRAVE) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - e3:SetRange(LOCATION_MZONE) - e3:SetTarget(c33093439.target) - e3:SetOperation(c33093439.operation) - c:RegisterEffect(e3) -end -function c33093439.cfilter(c) - return c:IsRace(RACE_MACHINE) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsAbleToRemoveAsCost() - and (not c:IsLocation(LOCATION_MZONE) or c:IsFaceup()) -end -function c33093439.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.IsExistingMatchingCard(c33093439.cfilter,tp,LOCATION_MZONE,0,1,nil) - or (Duel.IsExistingMatchingCard(c33093439.cfilter,tp,LOCATION_GRAVE,0,1,nil) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0) -end -function c33093439.spop(e,tp,eg,ep,ev,re,r,rp,c) - local g=Duel.GetMatchingGroup(c33093439.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK) - e1:SetReset(RESET_EVENT+0xff0000) - e1:SetValue(g:GetCount()*500) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_SET_DEFENCE) - c:RegisterEffect(e2) -end -function c33093439.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,g:GetCount(),0,0) -end -function c33093439.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,e:GetHandler()) - Duel.SendtoGrave(g,REASON_EFFECT) -end diff --git a/script/c33114323.lua b/script/c33114323.lua deleted file mode 100644 index 3cb6064cd1..0000000000 --- a/script/c33114323.lua +++ /dev/null @@ -1,45 +0,0 @@ ---メタルシルバー・アーマー ---Effect is not fully implemented -function c33114323.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c33114323.target) - e1:SetOperation(c33114323.operation) - c:RegisterEffect(e1) - --atk target - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) - e2:SetProperty(EFFECT_FLAG_IGNORE_RANGE) - e2:SetRange(LOCATION_SZONE) - e2:SetTarget(c33114323.efftg) - e2:SetValue(aux.tgoval) - c:RegisterEffect(e2) - --Equip limit - local e3=Effect.CreateEffect(c) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_EQUIP_LIMIT) - e3:SetValue(1) - c:RegisterEffect(e3) -end -function c33114323.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c33114323.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,e:GetHandler(),tc) - end -end -function c33114323.efftg(e,c) - return c~=e:GetHandler():GetEquipTarget() and c:IsType(TYPE_MONSTER) -end diff --git a/script/c33145233.lua b/script/c33145233.lua deleted file mode 100644 index fdf8124761..0000000000 --- a/script/c33145233.lua +++ /dev/null @@ -1,39 +0,0 @@ ---儀式魔人デモリッシャー -function c33145233.initial_effect(c) - --ritual material - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_EXTRA_RITUAL_MATERIAL) - e1:SetValue(1) - c:RegisterEffect(e1) - --become material - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetCode(EVENT_BE_MATERIAL) - e2:SetCondition(c33145233.condition) - e2:SetOperation(c33145233.operation) - c:RegisterEffect(e2) -end -function c33145233.condition(e,tp,eg,ep,ev,re,r,rp) - return r==REASON_RITUAL -end -function c33145233.operation(e,tp,eg,ep,ev,re,r,rp) - local rc=eg:GetFirst() - while rc do - if rc:GetFlagEffect(33145233)==0 then - --untargetable - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetDescription(aux.Stringid(33145233,0)) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CLIENT_HINT) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) - e1:SetValue(aux.tgoval) - e1:SetReset(RESET_EVENT+0x1fe0000) - rc:RegisterEffect(e1,true) - rc:RegisterFlagEffect(33145233,RESET_EVENT+0x1fe0000,0,1) - end - rc=eg:GetNext() - end -end diff --git a/script/c33184167.lua b/script/c33184167.lua deleted file mode 100644 index 7a572a610c..0000000000 --- a/script/c33184167.lua +++ /dev/null @@ -1,43 +0,0 @@ ---同族感染ウィルス -function c33184167.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(33184167,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c33184167.cost) - e1:SetTarget(c33184167.target) - e1:SetOperation(c33184167.operation) - c:RegisterEffect(e1) -end -function c33184167.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) -end -function c33184167.filter(c) - return c:IsFaceup() and c:IsDestructable() -end -function c33184167.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c33184167.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - local g=Duel.GetMatchingGroup(c33184167.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - local tc=g:GetFirst() - local race=0 - while tc do - race=bit.bor(race,tc:GetRace()) - tc=g:GetNext() - end - Duel.Hint(HINT_SELECTMSG,tp,0) - local arc=Duel.AnnounceRace(tp,1,race) - e:SetLabel(arc) - local dg=g:Filter(Card.IsRace,nil,arc) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,dg,dg:GetCount(),0,0) -end -function c33184167.filter2(c,rc) - return c:IsFaceup() and c:IsRace(rc) and c:IsDestructable() -end -function c33184167.operation(e,tp,eg,ep,ev,re,r,rp) - local arc=e:GetLabel() - local g=Duel.GetMatchingGroup(c33184167.filter2,tp,LOCATION_MZONE,LOCATION_MZONE,nil,arc) - Duel.Destroy(g,REASON_EFFECT) -end diff --git a/script/c33184236.lua b/script/c33184236.lua deleted file mode 100644 index e95513b712..0000000000 --- a/script/c33184236.lua +++ /dev/null @@ -1,34 +0,0 @@ ---カラクリ屋敷 -function c33184236.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_CHANGE_POS) - e1:SetCondition(c33184236.condition) - e1:SetTarget(c33184236.target) - e1:SetOperation(c33184236.activate) - c:RegisterEffect(e1) -end -function c33184236.cfilter(c,tp) - local np=c:GetPosition() - local pp=c:GetPreviousPosition() - return c:IsControler(tp) and c:IsSetCard(0x11) and ((pp==0x1 and np==0x4) or (pp==0x4 and np==0x1)) -end -function c33184236.condition(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c33184236.cfilter,1,nil,tp) -end -function c33184236.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsDestructable() end - if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c33184236.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c33198837.lua b/script/c33198837.lua deleted file mode 100644 index b79d93d1a2..0000000000 --- a/script/c33198837.lua +++ /dev/null @@ -1,45 +0,0 @@ ---ナチュル・ビースト -function c33198837.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,c33198837.synfilter,aux.NonTuner(c33198837.synfilter),1) - c:EnableReviveLimit() - --negate - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(33198837,0)) - e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetRange(LOCATION_MZONE) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) - e1:SetCode(EVENT_CHAINING) - e1:SetCondition(c33198837.discon) - e1:SetCost(c33198837.discost) - e1:SetTarget(c33198837.distg) - e1:SetOperation(c33198837.disop) - c:RegisterEffect(e1) -end -function c33198837.synfilter(c) - return c:IsAttribute(ATTRIBUTE_EARTH) -end -function c33198837.discon(e,tp,eg,ep,ev,re,r,rp) - return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) - and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL) and Duel.IsChainNegatable(ev) -end -function c33198837.discost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDiscardDeckAsCost(tp,2) end - Duel.DiscardDeck(tp,2,REASON_COST) -end -function c33198837.distg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) - end -end -function c33198837.disop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsFaceup() or not c:IsRelateToEffect(e) then return end - Duel.NegateActivation(ev) - if re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(eg,REASON_EFFECT) - end -end diff --git a/script/c33225925.lua b/script/c33225925.lua deleted file mode 100644 index ee55febd37..0000000000 --- a/script/c33225925.lua +++ /dev/null @@ -1,28 +0,0 @@ ---久遠の魔術師ミラ -function c33225925.initial_effect(c) - --confirm - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(33225925,0)) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c33225925.target) - e1:SetOperation(c33225925.operation) - c:RegisterEffect(e1) -end -function c33225925.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() and chkc:IsFacedown() end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(33225925,1)) - local g=Duel.SelectTarget(tp,Card.IsFacedown,tp,0,LOCATION_ONFIELD,1,1,nil) - Duel.SetChainLimit(c33225925.chainlimit) -end -function c33225925.chainlimit(e,rp,tp) - return tp==rp or not e:IsHasType(EFFECT_TYPE_ACTIVATE) -end -function c33225925.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) and tc:IsFacedown() then - Duel.ConfirmCards(tp,tc) - end -end diff --git a/script/c33236860.lua b/script/c33236860.lua deleted file mode 100644 index c66a74d87b..0000000000 --- a/script/c33236860.lua +++ /dev/null @@ -1,69 +0,0 @@ ---BF-孤高のシルバー・ウィンド -function c33236860.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0x33),aux.NonTuner(nil),2) - c:EnableReviveLimit() - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(33236860,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(c33236860.descon) - e1:SetCost(c33236860.descost) - e1:SetTarget(c33236860.destg) - e1:SetOperation(c33236860.desop) - c:RegisterEffect(e1) - --destroy replace - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_DESTROY_REPLACE) - e2:SetRange(LOCATION_MZONE) - e2:SetCondition(c33236860.drpcon) - e2:SetTarget(c33236860.drptg) - e2:SetValue(aux.TRUE) - c:RegisterEffect(e2) -end -function c33236860.descon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_SYNCHRO -end -function c33236860.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_BATTLE_PHASE)==0 end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_BP) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) - e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function c33236860.filter(c,atk) - return c:IsFaceup() and c:GetDefence()0 and - Duel.IsExistingMatchingCard(c33244944.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c33244944.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local tg=Duel.SelectMatchingCard(tp,c33244944.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - if tg:GetCount()>0 then - local tc=tg:GetFirst() - Duel.SpecialSummon(tc,332449,tp,tp,true,true,POS_FACEUP) - tc:CompleteProcedure() - end -end diff --git a/script/c33245030.lua b/script/c33245030.lua deleted file mode 100644 index 015cb39d60..0000000000 --- a/script/c33245030.lua +++ /dev/null @@ -1,36 +0,0 @@ ---クリボール -function c33245030.initial_effect(c) - --pos - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_POSITION) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c33245030.condition) - e1:SetCost(c33245030.cost) - e1:SetTarget(c33245030.target) - e1:SetOperation(c33245030.operation) - c:RegisterEffect(e1) - --ritual material - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_EXTRA_RITUAL_MATERIAL) - e2:SetValue(1) - c:RegisterEffect(e2) -end -function c33245030.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetAttacker():IsControler(1-tp) -end -function c33245030.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end -function c33245030.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetAttacker():IsAttackPos() end -end -function c33245030.operation(e,tp,eg,ep,ev,re,r,rp) - local at=Duel.GetAttacker() - if at:IsAttackPos() and at:IsRelateToBattle() then - Duel.ChangePosition(at,POS_FACEUP_DEFENCE) - end -end diff --git a/script/c33248692.lua b/script/c33248692.lua deleted file mode 100644 index 1881dfc915..0000000000 --- a/script/c33248692.lua +++ /dev/null @@ -1,32 +0,0 @@ ---オプションハンター -function c33248692.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_RECOVER) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetRange(LOCATION_SZONE) - e1:SetCondition(c33248692.condition) - e1:SetTarget(c33248692.target) - e1:SetOperation(c33248692.operation) - c:RegisterEffect(e1) -end -function c33248692.filter(c,tp) - return c:GetPreviousControler()==tp and c:IsLocation(LOCATION_GRAVE) and c:IsReason(REASON_BATTLE) -end -function c33248692.condition(e,tp,eg,ep,ev,re,r,rp,chk) - return eg:IsExists(c33248692.filter,1,nil,tp) -end -function c33248692.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local rec=eg:Filter(c33248692.filter,nil,tp):GetFirst():GetBaseAttack() - if rec<0 then rec=0 end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(rec) - Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,rec) -end -function c33248692.operation(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Recover(p,d,REASON_EFFECT) -end diff --git a/script/c33252803.lua b/script/c33252803.lua deleted file mode 100644 index d45f172e67..0000000000 --- a/script/c33252803.lua +++ /dev/null @@ -1,48 +0,0 @@ ---RUM-クイック・カオス -function c33252803.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c33252803.target) - e1:SetOperation(c33252803.activate) - c:RegisterEffect(e1) -end -function c33252803.filter1(c,e,tp) - local m=_G["c"..c:GetCode()] - return c:IsFaceup() and c:IsSetCard(0x48) and not c:IsSetCard(0x1048) and m - and Duel.IsExistingMatchingCard(c33252803.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,c,c:GetRank()+1,m.xyz_number) -end -function c33252803.filter2(c,e,tp,mc,rk,no) - return c:GetRank()==rk and c:IsSetCard(0x1048) and c.xyz_number==no and mc:IsCanBeXyzMaterial(c) - and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) -end -function c33252803.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c33252803.filter1(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsExistingTarget(c33252803.filter1,tp,LOCATION_MZONE,0,1,nil,e,tp)end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - local g=Duel.SelectTarget(tp,c33252803.filter1,tp,LOCATION_MZONE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function c33252803.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<0 then return end - local tc=Duel.GetFirstTarget() - local m=_G["c"..tc:GetCode()] - if tc:IsFacedown() or not tc:IsRelateToEffect(e) or tc:IsControler(1-tp) or tc:IsImmuneToEffect(e) or not m then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c33252803.filter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc,tc:GetRank()+1,m.xyz_number) - local sc=g:GetFirst() - if sc then - local mg=tc:GetOverlayGroup() - if mg:GetCount()~=0 then - Duel.Overlay(sc,mg) - end - sc:SetMaterial(Group.FromCards(tc)) - Duel.Overlay(sc,Group.FromCards(tc)) - Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP) - sc:CompleteProcedure() - end -end diff --git a/script/c33302407.lua b/script/c33302407.lua deleted file mode 100644 index 2da0d9caa8..0000000000 --- a/script/c33302407.lua +++ /dev/null @@ -1,38 +0,0 @@ ---ポイズン・チェーン -function c33302407.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --discard deck - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(33302407,0)) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCategory(CATEGORY_DECKDES) - e2:SetCode(EVENT_PHASE+PHASE_END) - e2:SetRange(LOCATION_SZONE) - e2:SetCountLimit(1) - e2:SetCondition(c33302407.discon) - e2:SetTarget(c33302407.distg) - e2:SetOperation(c33302407.disop) - c:RegisterEffect(e2) -end -function c33302407.discon(e,tp,eg,ep,ev,re,r,rp) - return tp==Duel.GetTurnPlayer() and Duel.GetActivityCount(tp,ACTIVITY_ATTACK)==0 -end -function c33302407.filter(c) - return c:IsFaceup() and c:IsSetCard(0x25) -end -function c33302407.distg(e,tp,eg,ep,ev,re,r,rp,chk) - local ct=Duel.GetMatchingGroupCount(c33302407.filter,tp,LOCATION_MZONE,0,nil) - if chk==0 then return ct>0 and Duel.IsPlayerCanDiscardDeck(1-tp,0) end - Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,1-tp,ct) -end -function c33302407.disop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local ct=Duel.GetMatchingGroupCount(c33302407.filter,tp,LOCATION_MZONE,0,nil) - if ct>0 then - Duel.DiscardDeck(1-tp,ct,REASON_EFFECT) - end -end diff --git a/script/c33323657.lua b/script/c33323657.lua deleted file mode 100644 index 1905e8b0a2..0000000000 --- a/script/c33323657.lua +++ /dev/null @@ -1,34 +0,0 @@ ---サイコ・ソウル -function c33323657.initial_effect(c) - --recover - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCategory(CATEGORY_RECOVER) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c33323657.reccost) - e1:SetTarget(c33323657.rectg) - e1:SetOperation(c33323657.recop) - c:RegisterEffect(e1) -end -function c33323657.filter(c) - return c:GetLevel()>0 and c:IsRace(RACE_PSYCHO) -end -function c33323657.reccost(e,tp,eg,ep,ev,re,r,rp,chk) - e:SetLabel(1) - if chk==0 then return Duel.CheckReleaseGroup(tp,c33323657.filter,1,nil) end - local g=Duel.SelectReleaseGroup(tp,c33323657.filter,1,1,nil) - e:SetLabel(g:GetFirst():GetLevel()) - Duel.Release(g,REASON_COST) -end -function c33323657.rectg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetLabel()~=0 end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(e:GetLabel()*300) - Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,e:GetLabel()*300) - e:SetLabel(0) -end -function c33323657.recop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Recover(p,d,REASON_EFFECT) -end diff --git a/script/c33347467.lua b/script/c33347467.lua deleted file mode 100644 index 17ec928088..0000000000 --- a/script/c33347467.lua +++ /dev/null @@ -1,27 +0,0 @@ ---霊魂の護送船 -function c33347467.initial_effect(c) - c:EnableReviveLimit() - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c33347467.spcon) - e1:SetOperation(c33347467.spop) - c:RegisterEffect(e1) -end -function c33347467.spfilter(c) - return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsAbleToRemoveAsCost() -end -function c33347467.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c33347467.spfilter,tp,LOCATION_GRAVE,0,1,nil) -end -function c33347467.spop(e,tp,eg,ep,ev,re,r,rp,c) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c33347467.spfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end diff --git a/script/c33365932.lua b/script/c33365932.lua deleted file mode 100644 index fbba66403a..0000000000 --- a/script/c33365932.lua +++ /dev/null @@ -1,33 +0,0 @@ ---ヴォルカニック・バレット -function c33365932.initial_effect(c) - --search - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(33365932,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_GRAVE) - e1:SetCountLimit(1) - e1:SetCost(c33365932.cost) - e1:SetTarget(c33365932.tg) - e1:SetOperation(c33365932.op) - c:RegisterEffect(e1) -end -function c33365932.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,500) end - Duel.PayLPCost(tp,500) -end -function c33365932.filter(c) - return c:IsCode(33365932) and c:IsAbleToHand() -end -function c33365932.tg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c33365932.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c33365932.op(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsLocation(LOCATION_GRAVE) then return end - local tc=Duel.GetFirstMatchingCard(c33365932.filter,tp,LOCATION_DECK,0,nil) - if tc then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end diff --git a/script/c33396948.lua b/script/c33396948.lua deleted file mode 100644 index b6150410ab..0000000000 --- a/script/c33396948.lua +++ /dev/null @@ -1,47 +0,0 @@ ---封印されしエクゾディア -function c33396948.initial_effect(c) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_DELAY) - e1:SetCode(EVENT_TO_HAND) - e1:SetRange(LOCATION_HAND) - e1:SetOperation(c33396948.operation) - c:RegisterEffect(e1) -end -function c33396948.check(g) - local a1=false - local a2=false - local a3=false - local a4=false - local a5=false - local tc=g:GetFirst() - while tc do - local code=tc:GetCode() - if code==8124921 then a1=true - elseif code==44519536 then a2=true - elseif code==70903634 then a3=true - elseif code==7902349 then a4=true - elseif code==33396948 then a5=true - end - tc=g:GetNext() - end - return a1 and a2 and a3 and a4 and a5 -end -function c33396948.operation(e,tp,eg,ep,ev,re,r,rp) - local WIN_REASON_EXODIA = 0x10 - local g1=Duel.GetFieldGroup(tp,LOCATION_HAND,0) - local g2=Duel.GetFieldGroup(tp,0,LOCATION_HAND) - local wtp=c33396948.check(g1) - local wntp=c33396948.check(g2) - if wtp and not wntp then - Duel.ConfirmCards(1-tp,g1) - Duel.Win(tp,WIN_REASON_EXODIA) - elseif not wtp and wntp then - Duel.ConfirmCards(tp,g2) - Duel.Win(1-tp,WIN_REASON_EXODIA) - elseif wtp and wntp then - Duel.ConfirmCards(1-tp,g1) - Duel.ConfirmCards(tp,g2) - Duel.Win(PLAYER_NONE,WIN_REASON_EXODIA) - end -end diff --git a/script/c33413279.lua b/script/c33413279.lua deleted file mode 100644 index 5f03a1e252..0000000000 --- a/script/c33413279.lua +++ /dev/null @@ -1,37 +0,0 @@ ---エクスプローシブ・マジシャン -function c33413279.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,nil,aux.NonTuner(Card.IsRace,RACE_SPELLCASTER),1) - c:EnableReviveLimit() - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(33413279,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCost(c33413279.descost) - e1:SetTarget(c33413279.destg) - e1:SetOperation(c33413279.desop) - c:RegisterEffect(e1) -end -function c33413279.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsCanRemoveCounter(tp,1,0,0x3001,2,REASON_COST) end - Duel.RemoveCounter(tp,1,0,0x3001,2,REASON_COST) -end -function c33413279.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable() -end -function c33413279.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and c33413279.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c33413279.filter,tp,0,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c33413279.filter,tp,0,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c33413279.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c33413638.lua b/script/c33413638.lua deleted file mode 100644 index 4f8664252b..0000000000 --- a/script/c33413638.lua +++ /dev/null @@ -1,21 +0,0 @@ ---コカローチ・ナイト -function c33413638.initial_effect(c) - --to deck top - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(33413638,0)) - e1:SetCategory(CATEGORY_TODECK) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetTarget(c33413638.tdtg) - e1:SetOperation(c33413638.tdop) - c:RegisterEffect(e1) -end -function c33413638.tdtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0) -end -function c33413638.tdop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - Duel.SendtoDeck(e:GetHandler(),nil,0,REASON_EFFECT) - end -end diff --git a/script/c33420078.lua b/script/c33420078.lua deleted file mode 100644 index b3e922d62b..0000000000 --- a/script/c33420078.lua +++ /dev/null @@ -1,36 +0,0 @@ ---ゾンビキャリア -function c33420078.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(33420078,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_GRAVE) - e1:SetCost(c33420078.cost) - e1:SetTarget(c33420078.target) - e1:SetOperation(c33420078.operation) - c:RegisterEffect(e1) -end -function c33420078.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToDeckAsCost,tp,LOCATION_HAND,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectMatchingCard(tp,Card.IsAbleToDeckAsCost,tp,LOCATION_HAND,0,1,1,nil) - Duel.SendtoDeck(g,nil,0,REASON_COST) -end -function c33420078.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c33420078.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+0x47e0000) - e1:SetValue(LOCATION_REMOVED) - c:RegisterEffect(e1,true) - end -end diff --git a/script/c33423043.lua b/script/c33423043.lua deleted file mode 100644 index e7da842b10..0000000000 --- a/script/c33423043.lua +++ /dev/null @@ -1,36 +0,0 @@ ---異次元の指名者 -function c33423043.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCategory(CATEGORY_REMOVE) - e1:SetTarget(c33423043.target) - e1:SetOperation(c33423043.operation) - c:RegisterEffect(e1) -end -function c33423043.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0 - and Duel.IsExistingMatchingCard(nil,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,564) - local ac=Duel.AnnounceCard(tp) - e:SetLabel(ac) - e:GetHandler():SetHint(CHINT_CARD,ac) -end -function c33423043.operation(e,tp,eg,ep,ev,re,r,rp) - local ac=e:GetLabel() - local g=Duel.GetMatchingGroup(Card.IsCode,tp,0,LOCATION_HAND,nil,ac) - local hg=Duel.GetFieldGroup(tp,0,LOCATION_HAND) - Duel.ConfirmCards(tp,hg) - if g:GetCount()>0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local sg=g:Select(tp,1,1,nil) - Duel.Remove(sg,POS_FACEUP,REASON_EFFECT) - Duel.ShuffleHand(1-tp) - else - local sg=Duel.GetFieldGroup(tp,LOCATION_HAND,0) - local dg=sg:RandomSelect(tp,1) - Duel.Remove(dg,POS_FACEUP,REASON_EFFECT) - Duel.ShuffleHand(1-tp) - end -end diff --git a/script/c33453260.lua b/script/c33453260.lua deleted file mode 100644 index db68dcf961..0000000000 --- a/script/c33453260.lua +++ /dev/null @@ -1,85 +0,0 @@ ---コミックハンド -function c33453260.initial_effect(c) - --Equip - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP+CATEGORY_CONTROL) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCondition(c33453260.condition) - e1:SetTarget(c33453260.target) - e1:SetOperation(c33453260.activate) - c:RegisterEffect(e1) - --equip limit - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_EQUIP_LIMIT) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetValue(c33453260.eqlimit) - c:RegisterEffect(e2) - --control - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_EQUIP) - e3:SetCode(EFFECT_SET_CONTROL) - e3:SetValue(c33453260.cval) - c:RegisterEffect(e3) - --change type - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_EQUIP) - e4:SetCode(EFFECT_ADD_TYPE) - e4:SetValue(TYPE_TOON) - c:RegisterEffect(e4) - --direct attack - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_EQUIP) - e5:SetCode(EFFECT_DIRECT_ATTACK) - e5:SetCondition(c33453260.dircon) - c:RegisterEffect(e5) - --self destroy - local e6=Effect.CreateEffect(c) - e6:SetType(EFFECT_TYPE_SINGLE) - e6:SetCode(EFFECT_SELF_DESTROY) - e6:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e6:SetRange(LOCATION_SZONE) - e6:SetCondition(c33453260.descon) - c:RegisterEffect(e6) -end -function c33453260.cfilter(c) - return c:IsFaceup() and c:IsCode(15259703) -end -function c33453260.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c33453260.cfilter,tp,LOCATION_ONFIELD,0,1,nil) -end -function c33453260.filter(c) - return c:IsFaceup() and c:IsControlerCanBeChanged() -end -function c33453260.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c33453260.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c33453260.filter,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local g=Duel.SelectTarget(tp,c33453260.filter,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) - Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0) -end -function c33453260.activate(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,c,tc) - end -end -function c33453260.eqlimit(e,c) - return e:GetHandlerPlayer()~=c:GetControler() or e:GetHandler():GetEquipTarget()==c -end -function c33453260.cval(e,c) - return e:GetHandlerPlayer() -end -function c33453260.dirfilter(c) - return c:IsFaceup() and c:IsType(TYPE_TOON) -end -function c33453260.dircon(e) - return not Duel.IsExistingMatchingCard(c33453260.dirfilter,e:GetHandlerPlayer(),0,LOCATION_MZONE,1,nil) -end -function c33453260.descon(e) - return not Duel.IsExistingMatchingCard(c33453260.cfilter,e:GetHandlerPlayer(),LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) -end diff --git a/script/c33455338.lua b/script/c33455338.lua deleted file mode 100644 index 9378e83905..0000000000 --- a/script/c33455338.lua +++ /dev/null @@ -1,39 +0,0 @@ ---邪狂神の使い -function c33455338.initial_effect(c) - --atk up - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(33455338,0)) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) - e1:SetCountLimit(1) - e1:SetCondition(c33455338.atkcon) - e1:SetCost(c33455338.atkcost) - e1:SetOperation(c33455338.atkop) - c:RegisterEffect(e1) -end -function c33455338.atkcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp -end -function c33455338.filter(c) - return c:IsAttribute(ATTRIBUTE_DARK) and c:IsAbleToRemoveAsCost() -end -function c33455338.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c33455338.filter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c33455338.filter,tp,LOCATION_GRAVE,0,1,99,nil) - e:SetLabel(g:GetCount()) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c33455338.atkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_DEFENCE) - e1:SetValue(e:GetLabel()*500) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - c:RegisterEffect(e1) - end -end diff --git a/script/c33508719.lua b/script/c33508719.lua deleted file mode 100644 index 17abb11187..0000000000 --- a/script/c33508719.lua +++ /dev/null @@ -1,22 +0,0 @@ ---メタモルポット -function c33508719.initial_effect(c) - --flip - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_HANDES+CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP) - e1:SetTarget(c33508719.target) - e1:SetOperation(c33508719.operation) - c:RegisterEffect(e1) -end -function c33508719.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,PLAYER_ALL,0) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,PLAYER_ALL,5) -end -function c33508719.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetFieldGroup(tp,LOCATION_HAND,LOCATION_HAND) - if g:GetCount()>0 then Duel.SendtoGrave(g,REASON_DISCARD+REASON_EFFECT) end - Duel.BreakEffect() - Duel.Draw(tp,5,REASON_EFFECT) - Duel.Draw(1-tp,5,REASON_EFFECT) -end diff --git a/script/c33537328.lua b/script/c33537328.lua deleted file mode 100644 index 61e59b1922..0000000000 --- a/script/c33537328.lua +++ /dev/null @@ -1,51 +0,0 @@ ---地縛神 Cusillu -function c33537328.initial_effect(c) - c:SetUniqueOnField(1,1,10000000) - -- - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e4:SetRange(LOCATION_MZONE) - e4:SetCode(EFFECT_SELF_DESTROY) - e4:SetCondition(c33537328.sdcon) - c:RegisterEffect(e4) - --battle target - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_SINGLE) - e5:SetCode(EFFECT_CANNOT_BE_BATTLE_TARGET) - e5:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e5:SetRange(LOCATION_MZONE) - e5:SetValue(aux.imval1) - c:RegisterEffect(e5) - --direct atk - local e6=Effect.CreateEffect(c) - e6:SetType(EFFECT_TYPE_SINGLE) - e6:SetCode(EFFECT_DIRECT_ATTACK) - c:RegisterEffect(e6) - --destroy replace - local e7=Effect.CreateEffect(c) - e7:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE) - e7:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e7:SetRange(LOCATION_MZONE) - e7:SetCode(EFFECT_DESTROY_REPLACE) - e7:SetTarget(c33537328.desreptg) - c:RegisterEffect(e7) -end -function c33537328.sdcon(e) - local c=e:GetHandler() - if c:IsStatus(STATUS_BATTLE_DESTROYED) then return false end - local f1=Duel.GetFieldCard(0,LOCATION_SZONE,5) - local f2=Duel.GetFieldCard(1,LOCATION_SZONE,5) - return ((f1==nil or not f1:IsFaceup()) and (f2==nil or not f2:IsFaceup())) -end -function c33537328.desreptg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsReason(REASON_BATTLE) and c:GetBattlePosition()~=POS_FACEUP_DEFENCE - and Duel.CheckReleaseGroup(tp,Card.IsReleasableByEffect,1,c) end - if Duel.SelectYesNo(tp,aux.Stringid(33537328,0)) then - local g=Duel.SelectReleaseGroup(tp,Card.IsReleasableByEffect,1,1,c) - Duel.Release(g,REASON_EFFECT) - Duel.SetLP(1-tp,Duel.GetLP(1-tp)/2) - return true - else return false end -end diff --git a/script/c33550694.lua b/script/c33550694.lua deleted file mode 100644 index d766ee5e22..0000000000 --- a/script/c33550694.lua +++ /dev/null @@ -1,89 +0,0 @@ ---フュージョン・ゲート -function c33550694.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --fusion - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(33550694,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_SZONE) - e2:SetProperty(EFFECT_FLAG_BOTH_SIDE) - e2:SetTarget(c33550694.target) - e2:SetOperation(c33550694.operation) - c:RegisterEffect(e2) -end -function c33550694.filter0(c) - return c:IsCanBeFusionMaterial() and c:IsAbleToRemove() -end -function c33550694.filter1(c,e) - return c:IsCanBeFusionMaterial() and c:IsAbleToRemove() and not c:IsImmuneToEffect(e) -end -function c33550694.filter2(c,e,tp,m,f,chkf) - return c:IsType(TYPE_FUSION) and (not f or f(c)) - and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf) -end -function c33550694.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp - local mg1=Duel.GetMatchingGroup(c33550694.filter0,tp,LOCATION_HAND+LOCATION_MZONE,0,nil) - local res=Duel.IsExistingMatchingCard(c33550694.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf) - if not res then - local ce=Duel.GetChainMaterial(tp) - if ce~=nil then - local fgroup=ce:GetTarget() - local mg2=fgroup(ce,e,tp) - local mf=ce:GetValue() - res=Duel.IsExistingMatchingCard(c33550694.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,chkf) - end - end - return res - end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function c33550694.operation(e,tp,eg,ep,ev,re,r,rp) - local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp - if not e:GetHandler():IsRelateToEffect(e) then return end - local mg1=Duel.GetMatchingGroup(c33550694.filter1,tp,LOCATION_HAND+LOCATION_MZONE,0,nil,e) - local sg1=Duel.GetMatchingGroup(c33550694.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf) - local mg2=nil - local sg2=nil - local ce=Duel.GetChainMaterial(tp) - if ce~=nil then - local fgroup=ce:GetTarget() - mg2=fgroup(ce,e,tp) - local mf=ce:GetValue() - sg2=Duel.GetMatchingGroup(c33550694.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,mf,chkf) - end - if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then - local sg=sg1:Clone() - if sg2 then sg:Merge(sg2) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local tg=sg:Select(tp,1,1,nil) - local tc=tg:GetFirst() - if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then - local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf) - tc:SetMaterial(mat1) - Duel.Remove(mat1,POS_FACEUP,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION) - Duel.BreakEffect() - Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP) - else - local mat2=Duel.SelectFusionMaterial(tp,tc,mg2,nil,chkf) - local fop=ce:GetOperation() - fop(ce,e,tp,tc,mat2) - end - tc:CompleteProcedure() - else - local cg1=Duel.GetFieldGroup(tp,LOCATION_HAND+LOCATION_MZONE,0) - local cg2=Duel.GetFieldGroup(tp,LOCATION_EXTRA,0) - if cg1:GetCount()>1 and cg2:IsExists(Card.IsFacedown,1,nil) - and Duel.IsPlayerCanSpecialSummon(tp) and not Duel.IsPlayerAffectedByEffect(tp,27581098) then - Duel.ConfirmCards(1-tp,cg1) - Duel.ConfirmCards(1-tp,cg2) - Duel.ShuffleHand(tp) - end - end -end diff --git a/script/c33551032.lua b/script/c33551032.lua deleted file mode 100644 index 5f3f08205d..0000000000 --- a/script/c33551032.lua +++ /dev/null @@ -1,34 +0,0 @@ ---アンブラル・アンフォーム -function c33551032.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(33551032,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetCountLimit(1,33551032) - e1:SetCondition(c33551032.spcon) - e1:SetTarget(c33551032.sptg) - e1:SetOperation(c33551032.spop) - c:RegisterEffect(e1) -end -function c33551032.spcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return Duel.GetAttacker()==c and c:IsLocation(LOCATION_GRAVE) and c:IsReason(REASON_BATTLE) -end -function c33551032.spfilter(c,e,tp) - return c:IsSetCard(0x87) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c33551032.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>1 - and Duel.IsExistingMatchingCard(c33551032.spfilter,tp,LOCATION_DECK,0,2,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_DECK) -end -function c33551032.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=1 then return end - local g=Duel.GetMatchingGroup(c33551032.spfilter,tp,LOCATION_DECK,0,nil,e,tp) - if g:GetCount()<2 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=g:Select(tp,2,2,nil) - Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) -end diff --git a/script/c33574806.lua b/script/c33574806.lua deleted file mode 100644 index 5b44fc2aea..0000000000 --- a/script/c33574806.lua +++ /dev/null @@ -1,24 +0,0 @@ ---E・HERO エスクリダオ -function c33574806.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcFun2(c,aux.FilterBoolFunction(Card.IsSetCard,0x3008),aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_DARK),true) - --spsummon condition - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e2:SetCode(EFFECT_SPSUMMON_CONDITION) - e2:SetValue(aux.fuslimit) - c:RegisterEffect(e2) - --atkup - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e3:SetRange(LOCATION_MZONE) - e3:SetCode(EFFECT_UPDATE_ATTACK) - e3:SetValue(c33574806.atkup) - c:RegisterEffect(e3) -end -function c33574806.atkup(e,c) - return Duel.GetMatchingGroupCount(Card.IsSetCard,c:GetControler(),LOCATION_GRAVE,0,nil,0x3008)*100 -end diff --git a/script/c33609262.lua b/script/c33609262.lua deleted file mode 100644 index 7f6ac5d966..0000000000 --- a/script/c33609262.lua +++ /dev/null @@ -1,38 +0,0 @@ ---帝王の深怨 -function c33609262.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,33609262+EFFECT_COUNT_CODE_OATH) - e1:SetCost(c33609262.cost) - e1:SetTarget(c33609262.target) - e1:SetOperation(c33609262.operation) - c:RegisterEffect(e1) -end -function c33609262.cfilter(c) - return (c:GetAttack()==2400 or c:GetAttack()==2800) and c:GetDefence()==1000 and not c:IsPublic() -end -function c33609262.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c33609262.cfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) - local g=Duel.SelectMatchingCard(tp,c33609262.cfilter,tp,LOCATION_HAND,0,1,1,nil) - Duel.ConfirmCards(1-tp,g) - Duel.ShuffleHand(tp) -end -function c33609262.filter(c) - return c:IsSetCard(0xbe) and c:IsType(TYPE_SPELL+TYPE_TRAP) and not c:IsCode(33609262) and c:IsAbleToHand() -end -function c33609262.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c33609262.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c33609262.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c33609262.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c33611061.lua b/script/c33611061.lua deleted file mode 100644 index 13962dfc6b..0000000000 --- a/script/c33611061.lua +++ /dev/null @@ -1,54 +0,0 @@ ---武神集結 -function c33611061.initial_effect(c) - --activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TODECK+CATEGORY_HANDES) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,33611061+EFFECT_COUNT_CODE_OATH) - e1:SetCondition(c33611061.condition) - e1:SetTarget(c33611061.target) - e1:SetOperation(c33611061.activate) - c:RegisterEffect(e1) -end -function c33611061.condition(e,tp,eg,ep,ev,re,r,rp) - return not Duel.IsExistingMatchingCard(nil,tp,LOCATION_ONFIELD,0,1,e:GetHandler()) -end -function c33611061.filter(c) - return c:IsSetCard(0x88) and c:IsRace(RACE_BEASTWARRIOR) and c:IsAbleToDeck() -end -function c33611061.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c33611061.filter,tp,LOCATION_GRAVE,0,1,nil) end - local g=Duel.GetMatchingGroup(c33611061.filter,tp,LOCATION_GRAVE,0,nil) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0) -end -function c33611061.thfilter(c) - return c:IsSetCard(0x88) and c:IsRace(RACE_BEASTWARRIOR) and c:IsAbleToHand() -end -function c33611061.activate(e,tp,eg,ep,ev,re,r,rp) - local tg=Duel.GetMatchingGroup(c33611061.filter,tp,LOCATION_GRAVE,0,nil) - if tg:GetCount()>0 then - Duel.SendtoDeck(tg,nil,2,REASON_EFFECT) - local hg=Duel.GetFieldGroup(tp,LOCATION_HAND,0) - Duel.SendtoGrave(hg,REASON_EFFECT) - Duel.BreakEffect() - local g=Duel.GetMatchingGroup(c33611061.thfilter,tp,LOCATION_DECK,0,nil) - if g:GetCount()==0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g1=g:Select(tp,1,1,nil) - g:Remove(Card.IsCode,nil,g1:GetFirst():GetCode()) - if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(33611061,0)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g2=g:Select(tp,1,1,nil) - g:Remove(Card.IsCode,nil,g2:GetFirst():GetCode()) - g1:Merge(g2) - if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(33611061,0)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g3=g:Select(tp,1,1,nil) - g1:Merge(g3) - end - end - Duel.SendtoHand(g1,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g1) - end -end diff --git a/script/c33622465.lua b/script/c33622465.lua deleted file mode 100644 index c44261b84c..0000000000 --- a/script/c33622465.lua +++ /dev/null @@ -1,75 +0,0 @@ ---救護部隊 -function c33622465.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c33622465.target) - e1:SetOperation(c33622465.activate) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(33622465,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_BATTLE_DESTROYED) - e2:SetRange(LOCATION_GRAVE) - e2:SetCountLimit(1,33622465) - e2:SetCondition(c33622465.spcon) - e2:SetTarget(c33622465.sptg) - e2:SetOperation(c33622465.spop) - c:RegisterEffect(e2) -end -function c33622465.filter(c) - return c:IsType(TYPE_NORMAL) and c:IsAbleToHand() -end -function c33622465.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c33622465.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c33622465.filter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c33622465.filter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c33622465.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end -function c33622465.cfilter(c) - return bit.band(c:GetPreviousTypeOnField(),TYPE_NORMAL)~=0 -end -function c33622465.spcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c33622465.cfilter,1,nil) -end -function c33622465.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsPlayerCanSpecialSummonMonster(tp,33622465,0,0x11,3,1200,400,RACE_WARRIOR,ATTRIBUTE_EARTH) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c33622465.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local c=e:GetHandler() - if c:IsRelateToEffect(e) - and Duel.IsPlayerCanSpecialSummonMonster(tp,33622465,0,0x11,3,1200,400,RACE_WARRIOR,ATTRIBUTE_EARTH) then - c:SetStatus(STATUS_NO_LEVEL,false) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CHANGE_TYPE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetValue(TYPE_NORMAL+TYPE_MONSTER) - e1:SetReset(RESET_EVENT+0x47c0000) - c:RegisterEffect(e1,true) - Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP_DEFENCE) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetReset(RESET_EVENT+0x47e0000) - e2:SetValue(LOCATION_REMOVED) - c:RegisterEffect(e2,true) - end -end diff --git a/script/c336369.lua b/script/c336369.lua deleted file mode 100644 index ef91cd252b..0000000000 --- a/script/c336369.lua +++ /dev/null @@ -1,33 +0,0 @@ ---ガスタ・スクイレル -function c336369.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(336369,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCondition(c336369.condition) - e1:SetTarget(c336369.target) - e1:SetOperation(c336369.operation) - c:RegisterEffect(e1) -end -function c336369.condition(e,tp,eg,ep,ev,re,r,rp) - return bit.band(r,0x41)==0x41 -end -function c336369.filter(c,e,tp) - return c:IsLevelAbove(5) and c:IsSetCard(0x10) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c336369.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c336369.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c336369.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g = Duel.SelectMatchingCard(tp,c336369.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c33655493.lua b/script/c33655493.lua deleted file mode 100644 index bd637e103c..0000000000 --- a/script/c33655493.lua +++ /dev/null @@ -1,24 +0,0 @@ ---闇の侯爵ベリアル -function c33655493.initial_effect(c) - --cannot be target - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(0,LOCATION_MZONE) - e1:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET) - e1:SetValue(c33655493.tg) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_CANNOT_SELECT_EFFECT_TARGET) - e2:SetProperty(EFFECT_FLAG_SET_AVAILABLE) - e2:SetTargetRange(0,0xff) - e2:SetValue(c33655493.tglimit) - c:RegisterEffect(e2) -end -function c33655493.tg(e,c) - return c:IsFaceup() and c:GetCode()~=33655493 -end -function c33655493.tglimit(e,re,c) - return re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and c:IsControler(e:GetHandlerPlayer()) and c:IsLocation(LOCATION_MZONE) - and c:IsFaceup() and c:GetCode()~=33655493 -end diff --git a/script/c33665663.lua b/script/c33665663.lua deleted file mode 100644 index 5dd6cde1d2..0000000000 --- a/script/c33665663.lua +++ /dev/null @@ -1,33 +0,0 @@ ---炎舞-「開陽」 -function c33665663.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetOperation(c33665663.activate) - c:RegisterEffect(e1) - --atkup - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(LOCATION_MZONE,0) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetTarget(c33665663.filter) - e2:SetValue(300) - c:RegisterEffect(e2) -end -function c33665663.filter(e,c) - return c:IsRace(RACE_BEASTWARRIOR) -end -function c33665663.activate(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_PIERCE) - e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e1:SetTarget(c33665663.filter) - e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) -end diff --git a/script/c3366982.lua b/script/c3366982.lua deleted file mode 100644 index bcb6794e2b..0000000000 --- a/script/c3366982.lua +++ /dev/null @@ -1,18 +0,0 @@ ---ドラゴンに乗るワイバーン -function c3366982.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcCode2(c,88819587,64428736,true,true) - --direct attack - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DIRECT_ATTACK) - e2:SetCondition(c3366982.dircon) - c:RegisterEffect(e2) -end -function c3366982.filter(c) - return c:IsFaceup() and c:IsAttribute(0xf8) -end -function c3366982.dircon(e) - return not Duel.IsExistingMatchingCard(c3366982.filter,e:GetHandlerPlayer(),0,LOCATION_MZONE,1,nil) -end diff --git a/script/c33691040.lua b/script/c33691040.lua deleted file mode 100644 index 7e37df2251..0000000000 --- a/script/c33691040.lua +++ /dev/null @@ -1,6 +0,0 @@ ---プラグティカル -function c33691040.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcCode2(c,42348802,2830619,true,true) -end diff --git a/script/c33695750.lua b/script/c33695750.lua deleted file mode 100644 index 2cb9cdfdf7..0000000000 --- a/script/c33695750.lua +++ /dev/null @@ -1,49 +0,0 @@ ---デス・モスキート -function c33695750.initial_effect(c) - --summon success - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(33695750,0)) - e1:SetCategory(CATEGORY_COUNTER) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c33695750.addct) - e1:SetOperation(c33695750.addc) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e2) - --attackup - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e3:SetRange(LOCATION_MZONE) - e3:SetCode(EFFECT_UPDATE_ATTACK) - e3:SetValue(c33695750.attackup) - c:RegisterEffect(e3) - --destroy replace - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE) - e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e4:SetCode(EFFECT_DESTROY_REPLACE) - e4:SetRange(LOCATION_MZONE) - e4:SetTarget(c33695750.reptg) - c:RegisterEffect(e4) -end -function c33695750.addct(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,1,0,0x27) -end -function c33695750.addc(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - e:GetHandler():AddCounter(0x27,2) - end -end -function c33695750.attackup(e,c) - return c:GetCounter(0x27)*500 -end -function c33695750.reptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReason(REASON_BATTLE) - and e:GetHandler():IsCanRemoveCounter(tp,0x27,1,REASON_COST) end - e:GetHandler():RemoveCounter(tp,0x27,1,REASON_EFFECT) - return true -end diff --git a/script/c33698022.lua b/script/c33698022.lua deleted file mode 100644 index 2349144cef..0000000000 --- a/script/c33698022.lua +++ /dev/null @@ -1,51 +0,0 @@ ---月華竜 ブラック・ローズ -function c33698022.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1) - c:EnableReviveLimit() - --tohand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(33698022,0)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCountLimit(1,33698022) - e1:SetTarget(c33698022.thtg) - e1:SetOperation(c33698022.thop) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(33698022,1)) - e2:SetCategory(CATEGORY_TOHAND) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,33698022) - e2:SetCondition(c33698022.thcon) - e2:SetTarget(c33698022.thtg) - e2:SetOperation(c33698022.thop) - c:RegisterEffect(e2) -end -function c33698022.cfilter(c,tp) - return c:IsFaceup() and c:IsLevelAbove(5) and c:IsControler(tp) -end -function c33698022.thcon(e,tp,eg,ep,ev,re,r,rp) - return not eg:IsContains(e:GetHandler()) and eg:IsExists(c33698022.cfilter,1,nil,1-tp) -end -function c33698022.filter(c) - return bit.band(c:GetSummonType(),SUMMON_TYPE_SPECIAL)==SUMMON_TYPE_SPECIAL and c:IsAbleToHand() -end -function c33698022.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c33698022.filter(chkc) end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g=Duel.SelectTarget(tp,c33698022.filter,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0) -end -function c33698022.thop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - end -end diff --git a/script/c3370104.lua b/script/c3370104.lua deleted file mode 100644 index 70dcc06fc4..0000000000 --- a/script/c3370104.lua +++ /dev/null @@ -1,58 +0,0 @@ ---サイバー・フェニックス -function c3370104.initial_effect(c) - --disable - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_DISABLE) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(LOCATION_SZONE,LOCATION_SZONE) - e1:SetTarget(c3370104.distg) - c:RegisterEffect(e1) - --disable effect - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_CHAIN_SOLVING) - e2:SetRange(LOCATION_MZONE) - e2:SetOperation(c3370104.disop) - c:RegisterEffect(e2) - --draw - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(3370104,0)) - e3:SetCategory(CATEGORY_DRAW) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e3:SetCode(EVENT_BATTLE_DESTROYED) - e3:SetCondition(c3370104.condition) - e3:SetTarget(c3370104.target) - e3:SetOperation(c3370104.operation) - c:RegisterEffect(e3) -end -function c3370104.distg(e,c) - if not e:GetHandler():IsAttackPos() or c:GetCardTargetCount()~=1 then return false end - local tc=c:GetFirstCardTarget() - return tc:IsControler(e:GetHandlerPlayer()) and tc:IsFaceup() and tc:IsRace(RACE_MACHINE) -end -function c3370104.disop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsAttackPos() or re:IsActiveType(TYPE_MONSTER) then return end - if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return end - local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) - if not g or g:GetCount()~=1 then return end - local tc=g:GetFirst() - if tc:IsControler(tp) and tc:IsLocation(LOCATION_MZONE) and tc:IsFaceup() and tc:IsRace(RACE_MACHINE) then - Duel.NegateEffect(ev) - end -end -function c3370104.condition(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsLocation(LOCATION_GRAVE) and c:IsReason(REASON_BATTLE) and c:IsPreviousPosition(POS_FACEUP) -end -function c3370104.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(1) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c3370104.operation(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end diff --git a/script/c33725002.lua b/script/c33725002.lua deleted file mode 100644 index 4235bb731e..0000000000 --- a/script/c33725002.lua +++ /dev/null @@ -1,111 +0,0 @@ ---Vサラマンダー -function c33725002.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(33725002,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c33725002.sptg) - e1:SetOperation(c33725002.spop) - c:RegisterEffect(e1) - --equip - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(33725002,1)) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCategory(CATEGORY_EQUIP) - e2:SetRange(LOCATION_MZONE) - e2:SetTarget(c33725002.eqtg) - e2:SetOperation(c33725002.eqop) - c:RegisterEffect(e2) - --destroy - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(33725002,2)) - e3:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_SZONE) - e3:SetCountLimit(1) - e3:SetCost(c33725002.descost) - e3:SetTarget(c33725002.destg) - e3:SetOperation(c33725002.desop) - c:RegisterEffect(e3) -end -function c33725002.spfilter(c,e,tp) - return c:IsSetCard(0x7f) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c33725002.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c33725002.spfilter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c33725002.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c33725002.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c33725002.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end -function c33725002.eqfilter(c) - return c:IsFaceup() and c:IsCode(66970002) -end -function c33725002.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c33725002.eqfilter(chkc) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingTarget(c33725002.eqfilter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c33725002.eqfilter,tp,LOCATION_MZONE,0,1,1,nil) -end -function c33725002.eqop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) or c:IsFacedown() then return end - local tc=Duel.GetFirstTarget() - if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or tc:GetControler()~=tp or tc:IsFacedown() or not tc:IsRelateToEffect(e) then - Duel.SendtoGrave(c,REASON_EFFECT) - return - end - Duel.Equip(tp,c,tc,true) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(c33725002.eqlimit) - c:RegisterEffect(e1) -end -function c33725002.eqlimit(e,c) - return c:IsSetCard(0x7f) -end -function c33725002.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():GetEquipTarget():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():GetEquipTarget():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c33725002.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDestructable,tp,0,LOCATION_MZONE,1,nil) end - local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,0,LOCATION_MZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,g:GetCount()*1000) -end -function c33725002.desop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local ec=c:GetEquipTarget() - if ec then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000) - ec:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+0x1fe0000) - ec:RegisterEffect(e2) - end - local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,0,LOCATION_MZONE,nil) - local ct=Duel.Destroy(g,REASON_EFFECT) - if ct>0 then - Duel.Damage(1-tp,ct*1000,REASON_EFFECT) - end -end diff --git a/script/c33725271.lua b/script/c33725271.lua deleted file mode 100644 index f09e467090..0000000000 --- a/script/c33725271.lua +++ /dev/null @@ -1,29 +0,0 @@ ---ヴォルカニック・チャージ -function c33725271.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TODECK) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c33725271.target) - e1:SetOperation(c33725271.activate) - c:RegisterEffect(e1) -end -function c33725271.filter(c) - return c:IsSetCard(0x32) and c:IsType(TYPE_MONSTER) and c:IsAbleToDeck() -end -function c33725271.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c33725271.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c33725271.filter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectTarget(tp,c33725271.filter,tp,LOCATION_GRAVE,0,1,3,nil) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0) -end -function c33725271.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local sg=g:Filter(Card.IsRelateToEffect,nil,e) - if sg:GetCount()>0 then - Duel.SendtoDeck(sg,nil,2,REASON_EFFECT) - end -end diff --git a/script/c33731070.lua b/script/c33731070.lua deleted file mode 100644 index ab7546bc38..0000000000 --- a/script/c33731070.lua +++ /dev/null @@ -1,25 +0,0 @@ ---暗黒界の尖兵 ベージ -function c33731070.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(33731070,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCondition(c33731070.spcon) - e1:SetTarget(c33731070.sptg) - e1:SetOperation(c33731070.spop) - c:RegisterEffect(e1) -end -function c33731070.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetPreviousLocation()==LOCATION_HAND and bit.band(r,0x4040)==0x4040 -end -function c33731070.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c33731070.spop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c33737664.lua b/script/c33737664.lua deleted file mode 100644 index ddc6ed4069..0000000000 --- a/script/c33737664.lua +++ /dev/null @@ -1,39 +0,0 @@ ---墓荒らしの報い -function c33737664.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(TIMING_STANDBY_PHASE,0) - c:RegisterEffect(e1) - --damage - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(33737664,0)) - e2:SetCategory(CATEGORY_DAMAGE) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetRange(LOCATION_SZONE) - e2:SetCountLimit(1) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) - e2:SetCondition(c33737664.damcon) - e2:SetTarget(c33737664.damtg) - e2:SetOperation(c33737664.damop) - c:RegisterEffect(e2) -end -function c33737664.damcon(e,tp,eg,ep,ev,re,r,rp) - return tp==Duel.GetTurnPlayer() -end -function c33737664.filter(c) - return c:IsFaceup() and c:IsType(TYPE_MONSTER) -end -function c33737664.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,0) -end -function c33737664.damop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) - local d=Duel.GetMatchingGroupCount(c33737664.filter,tp,0,LOCATION_REMOVED,nil)*100 - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c33746252.lua b/script/c33746252.lua deleted file mode 100644 index 8a09a6c23b..0000000000 --- a/script/c33746252.lua +++ /dev/null @@ -1,21 +0,0 @@ ---威光魔人 -function c33746252.initial_effect(c) - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - c:RegisterEffect(e1) - --act limit - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EFFECT_CANNOT_ACTIVATE) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetTargetRange(1,1) - e2:SetValue(c33746252.aclimit) - c:RegisterEffect(e2) -end -function c33746252.aclimit(e,re,tp) - return re:IsActiveType(TYPE_MONSTER) and not re:GetHandler():IsImmuneToEffect(e) -end diff --git a/script/c33767325.lua b/script/c33767325.lua deleted file mode 100644 index 7eab232d67..0000000000 --- a/script/c33767325.lua +++ /dev/null @@ -1,26 +0,0 @@ ---デス・メテオ -function c33767325.initial_effect(c) - --damage - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c33767325.condition) - e1:SetTarget(c33767325.damtg) - e1:SetOperation(c33767325.damop) - c:RegisterEffect(e1) -end -function c33767325.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetLP(1-tp)>3000 -end -function c33767325.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(1000) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,1000) -end -function c33767325.damop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c33776734.lua b/script/c33776734.lua deleted file mode 100644 index f259583e6a..0000000000 --- a/script/c33776734.lua +++ /dev/null @@ -1,58 +0,0 @@ ---ハネクリボー LV9 -function c33776734.initial_effect(c) - c:SetUniqueOnField(1,0,33776734) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(33776734,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c33776734.spcon) - e1:SetTarget(c33776734.sptg) - e1:SetOperation(c33776734.spop) - c:RegisterEffect(e1) - --remove - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_TO_GRAVE_REDIRECT) - e2:SetRange(LOCATION_MZONE) - e2:SetTargetRange(LOCATION_SZONE,LOCATION_SZONE) - e2:SetTarget(c33776734.rmtarget) - e2:SetValue(LOCATION_REMOVED) - c:RegisterEffect(e2) - --atk,def - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e3:SetCode(EFFECT_SET_ATTACK) - e3:SetRange(LOCATION_MZONE) - e3:SetValue(c33776734.val) - c:RegisterEffect(e3) - local e4=e3:Clone() - e4:SetCode(EFFECT_SET_DEFENCE) - c:RegisterEffect(e4) -end -c33776734.lvupcount=1 -c33776734.lvup={33776734} -function c33776734.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentChain()>=2 -end -function c33776734.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetFlagEffect(tp,33776734)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) - Duel.RegisterFlagEffect(tp,33776734,RESET_CHAIN,0,0) -end -function c33776734.spop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP) - end -end -function c33776734.rmtarget(e,c) - local ty=c:GetOriginalType() - return bit.band(ty,TYPE_SPELL)~=0 and c:IsFaceup() and not c:IsStatus(STATUS_ACTIVATE_DISABLED) -end -function c33776734.val(e,c) - return Duel.GetMatchingGroupCount(Card.IsType,c:GetControler(),0,LOCATION_GRAVE,nil,TYPE_SPELL)*500 -end diff --git a/script/c33776843.lua b/script/c33776843.lua deleted file mode 100644 index 503b60d912..0000000000 --- a/script/c33776843.lua +++ /dev/null @@ -1,38 +0,0 @@ ---CNo.15 ギミック・パペット-シリアルキラー -function c33776843.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,9,3) - c:EnableReviveLimit() - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(33776843,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c33776843.cost) - e1:SetTarget(c33776843.target) - e1:SetOperation(c33776843.operation) - c:RegisterEffect(e1) -end -c33776843.xyz_number=15 -function c33776843.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c33776843.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and chkc:IsDestructable() end - if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,0,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,0,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c33776843.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)~=0 and tc:IsPreviousLocation(LOCATION_MZONE) then - local atk=tc:GetTextAttack() - if atk<0 then atk=0 end - Duel.Damage(1-tp,atk,REASON_EFFECT) - end -end diff --git a/script/c33782437.lua b/script/c33782437.lua deleted file mode 100644 index 4fe4fc6b30..0000000000 --- a/script/c33782437.lua +++ /dev/null @@ -1,32 +0,0 @@ ---一時休戦 -function c33782437.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCategory(CATEGORY_DRAW) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c33782437.target) - e1:SetOperation(c33782437.activate) - c:RegisterEffect(e1) -end -function c33782437.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp,1) and Duel.IsPlayerCanDraw(1-tp,1) end - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,PLAYER_ALL,1) -end -function c33782437.activate(e,tp,eg,ep,ev,re,r,rp) - local d1=Duel.Draw(tp,1,REASON_EFFECT) - local d2=Duel.Draw(1-tp,1,REASON_EFFECT) - if d1==0 or d2==0 then return end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CHANGE_DAMAGE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetTargetRange(1,1) - e1:SetValue(0) - e1:SetReset(RESET_PHASE+PHASE_END,2) - Duel.RegisterEffect(e1,tp) - local e2=e1:Clone() - e2:SetCode(EFFECT_NO_EFFECT_DAMAGE) - e2:SetReset(RESET_PHASE+PHASE_END,2) - Duel.RegisterEffect(e2,tp) -end diff --git a/script/c33784505.lua b/script/c33784505.lua deleted file mode 100644 index cd242f2f24..0000000000 --- a/script/c33784505.lua +++ /dev/null @@ -1,24 +0,0 @@ ---壺盗み -function c33784505.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DISABLE+CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_CHAINING) - e1:SetCondition(c33784505.condition) - e1:SetTarget(c33784505.target) - e1:SetOperation(c33784505.activate) - c:RegisterEffect(e1) -end -function c33784505.condition(e,tp,eg,ep,ev,re,r,rp) - return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:GetHandler():IsCode(55144522) and Duel.IsChainNegatable(ev) -end -function c33784505.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end - Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c33784505.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateEffect(ev) - Duel.Draw(tp,1,REASON_EFFECT) -end diff --git a/script/c3381441.lua b/script/c3381441.lua deleted file mode 100644 index bcf80615ea..0000000000 --- a/script/c3381441.lua +++ /dev/null @@ -1,28 +0,0 @@ ---墓守の巫女 -function c3381441.initial_effect(c) - --field - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_CHANGE_ENVIRONMENT) - e1:SetValue(47355498) - c:RegisterEffect(e1) - --Atk - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetRange(LOCATION_MZONE) - e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x2e)) - e2:SetValue(200) - c:RegisterEffect(e2) - --Def - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetCode(EFFECT_UPDATE_DEFENCE) - e3:SetRange(LOCATION_MZONE) - e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e3:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x2e)) - e3:SetValue(200) - c:RegisterEffect(e3) -end diff --git a/script/c33823832.lua b/script/c33823832.lua deleted file mode 100644 index 6b788b8c88..0000000000 --- a/script/c33823832.lua +++ /dev/null @@ -1,74 +0,0 @@ ---EMファイア・マフライオ -function c33823832.initial_effect(c) - --pendulum summon - aux.AddPendulumProcedure(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(33823832,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_BATTLE_DESTROYED) - e2:SetRange(LOCATION_PZONE) - e2:SetCondition(c33823832.spcon) - e2:SetTarget(c33823832.sptg) - e2:SetOperation(c33823832.spop) - c:RegisterEffect(e2) - --chain attack - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(33823832,1)) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_BATTLED) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1) - e3:SetCondition(c33823832.cacon) - e3:SetOperation(c33823832.caop) - c:RegisterEffect(e3) -end -function c33823832.cfilter(c,tp) - return c:IsType(TYPE_PENDULUM) and c:IsPreviousLocation(LOCATION_MZONE) and c:GetPreviousControler()==tp -end -function c33823832.spcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c33823832.cfilter,1,nil,tp) -end -function c33823832.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c33823832.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) - end -end -function c33823832.cacon(e,tp,eg,ep,ev,re,r,rp) - local a=Duel.GetAttacker() - local d=Duel.GetAttackTarget() - if not d then return false end - if a:IsStatus(STATUS_OPPO_BATTLE) and d:IsControler(tp) then a,d=d,a end - if a:IsType(TYPE_PENDULUM) - and not a:IsStatus(STATUS_BATTLE_DESTROYED) and d:IsStatus(STATUS_BATTLE_DESTROYED) then - e:SetLabelObject(a) - return true - else return false end -end -function c33823832.caop(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetLabelObject() - if tc:IsFaceup() and tc:IsControler(tp) and tc:IsRelateToBattle() then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetValue(200) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_BATTLE) - tc:RegisterEffect(e1) - if tc:IsChainAttackable() then - Duel.ChainAttack() - end - end -end diff --git a/script/c33846209.lua b/script/c33846209.lua deleted file mode 100644 index 1e1632fe9b..0000000000 --- a/script/c33846209.lua +++ /dev/null @@ -1,67 +0,0 @@ ---デュアルスパーク -function c33846209.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,0x1e0) - e1:SetCost(c33846209.cost) - e1:SetTarget(c33846209.target) - e1:SetOperation(c33846209.activate) - c:RegisterEffect(e1) -end -function c33846209.cost(e,tp,eg,ep,ev,re,r,rp,chk) - e:SetLabel(1) - return true -end -function c33846209.costfilter(c,e,dg) - if c:IsFacedown() or c:GetLevel()~=4 or not c:IsType(TYPE_DUAL) then return false end - local a=0 - if dg:IsContains(c) then a=1 end - if c:GetEquipCount()==0 then return dg:GetCount()-a>=1 end - local eg=c:GetEquipGroup() - local tc=eg:GetFirst() - while tc do - if dg:IsContains(tc) then a=a+1 end - tc=eg:GetNext() - end - return dg:GetCount()-a>=1 -end -function c33846209.tgfilter(c,e) - return c:IsDestructable() and c:IsCanBeEffectTarget(e) -end -function c33846209.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsDestructable() and chkc~=e:GetHandler() end - if chk==0 then - if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)==0 then return false end - if e:GetLabel()==1 then - e:SetLabel(0) - local rg=Duel.GetReleaseGroup(tp) - local dg=Duel.GetMatchingGroup(c33846209.tgfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler(),e) - local res=rg:IsExists(c33846209.costfilter,1,e:GetHandler(),e,dg) - return res - else - return Duel.IsExistingTarget(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) - end - end - if e:GetLabel()==1 then - e:SetLabel(0) - local rg=Duel.GetReleaseGroup(tp) - local dg=Duel.GetMatchingGroup(c33846209.tgfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler(),e) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) - local sg=rg:FilterSelect(tp,c33846209.costfilter,1,1,e:GetHandler(),e,dg) - Duel.Release(sg,REASON_COST) - end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c33846209.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)>0 then - Duel.Draw(tp,1,REASON_EFFECT) - end -end diff --git a/script/c33866130.lua b/script/c33866130.lua deleted file mode 100644 index c38e65d770..0000000000 --- a/script/c33866130.lua +++ /dev/null @@ -1,31 +0,0 @@ ---ナチュル・クリフ -function c33866130.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(33866130,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCondition(c33866130.spcon) - e1:SetTarget(c33866130.sptg) - e1:SetOperation(c33866130.spop) - c:RegisterEffect(e1) -end -function c33866130.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) -end -function c33866130.filter(c,e,tp) - return c:IsSetCard(0x2a) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c33866130.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c33866130.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c33866130.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c33866130.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_ATTACK) -end diff --git a/script/c33875961.lua b/script/c33875961.lua deleted file mode 100644 index ce2d8c7df9..0000000000 --- a/script/c33875961.lua +++ /dev/null @@ -1,65 +0,0 @@ ---ダーク・カタパルター -function c33875961.initial_effect(c) - c:EnableCounterPermit(0x3028) - --counter - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(33875961,0)) - e1:SetCategory(CATEGORY_COUNTER) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCondition(c33875961.addccon) - e1:SetTarget(c33875961.addct) - e1:SetOperation(c33875961.addc) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(33875961,1)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCost(c33875961.descost) - e2:SetTarget(c33875961.destg) - e2:SetOperation(c33875961.desop) - c:RegisterEffect(e2) -end -function c33875961.addccon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp and e:GetHandler():IsDefencePos() -end -function c33875961.addct(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,1,0,0x3028) -end -function c33875961.addc(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - e:GetHandler():AddCounter(0x3028,1) - end -end -function c33875961.descost(e,tp,eg,ep,ev,re,r,rp,chk) - local ct=e:GetHandler():GetCounter(0x3028) - if chk==0 then return ct>0 and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_GRAVE,0,ct,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_GRAVE,0,ct,ct,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c33875961.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable() -end -function c33875961.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and c33875961.filter(chkc) end - local ct=e:GetHandler():GetCounter(0x3028) - if chk==0 then return Duel.IsExistingTarget(c33875961.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,ct,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c33875961.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,ct,ct,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,ct,0,0) -end -function c33875961.desop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - if g:FilterCount(Card.IsRelateToEffect,nil,e)==g:GetCount() then - Duel.Destroy(g,REASON_EFFECT) - end - local ct=e:GetHandler():GetCounter(0x3028) - e:GetHandler():RemoveCounter(tp,0x3028,ct,REASON_EFFECT) -end diff --git a/script/c33883834.lua b/script/c33883834.lua deleted file mode 100644 index 3e231b3796..0000000000 --- a/script/c33883834.lua +++ /dev/null @@ -1,41 +0,0 @@ ---紫炎の寄子 -function c33883834.initial_effect(c) - --indestructable - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(33883834,0)) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_QUICK_O+EFFECT_TYPE_FIELD) - e1:SetRange(LOCATION_HAND) - e1:SetCode(EVENT_PRE_DAMAGE_CALCULATE) - e1:SetCondition(c33883834.con) - e1:SetCost(c33883834.cost) - e1:SetOperation(c33883834.op) - c:RegisterEffect(e1) -end -function c33883834.con(e,tp,eg,ep,ev,re,r,rp) - local a=Duel.GetAttacker() - local d=Duel.GetAttackTarget() - return d and ((a:GetControler()==tp and a:IsSetCard(0x3d)) or (d:GetControler()==tp and d:IsSetCard(0x3d))) - and Duel.GetFlagEffect(tp,33883834)==0 -end -function c33883834.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) - Duel.RegisterFlagEffect(tp,33883834,RESET_PHASE+RESET_DAMAGE_CAL,0,1) -end -function c33883834.op(e,tp,eg,ep,ev,re,r,rp,chk) - local a=Duel.GetAttacker() - local d=Duel.GetAttackTarget() - if not a:IsRelateToBattle() or not d:IsRelateToBattle() then return end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetOwnerPlayer(tp) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e1:SetValue(1) - if a:GetControler()==tp then - a:RegisterEffect(e1) - else - d:RegisterEffect(e1) - end -end diff --git a/script/c33900648.lua b/script/c33900648.lua deleted file mode 100644 index 8e9a3ae54d..0000000000 --- a/script/c33900648.lua +++ /dev/null @@ -1,205 +0,0 @@ ---クリアー・ワールド -function c33900648.initial_effect(c) - --activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --maintain - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e2:SetCode(EVENT_PHASE+PHASE_END) - e2:SetRange(LOCATION_SZONE) - e2:SetCountLimit(1) - e2:SetCondition(c33900648.mtcon) - e2:SetOperation(c33900648.mtop) - c:RegisterEffect(e2) - --adjust - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e3:SetCode(EVENT_ADJUST) - e3:SetRange(LOCATION_SZONE) - e3:SetOperation(c33900648.adjustop) - c:RegisterEffect(e3) - --light - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_FIELD) - e4:SetCode(EFFECT_PUBLIC) - e4:SetRange(LOCATION_SZONE) - e4:SetTargetRange(LOCATION_HAND,LOCATION_HAND) - e4:SetTarget(c33900648.lighttg) - c:RegisterEffect(e4) - --dark - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_FIELD) - e5:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE) - e5:SetRange(LOCATION_SZONE) - e5:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e5:SetTargetRange(1,0) - e5:SetCondition(c33900648.darkcon1) - c:RegisterEffect(e5) - local e6=e5:Clone() - e6:SetCondition(c33900648.darkcon2) - e6:SetTargetRange(0,1) - c:RegisterEffect(e6) - --earth - local e7=Effect.CreateEffect(c) - e7:SetDescription(aux.Stringid(33900648,1)) - e7:SetCategory(CATEGORY_DESTROY) - e7:SetCode(EVENT_PHASE+PHASE_STANDBY) - e7:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e7:SetRange(LOCATION_SZONE) - e7:SetProperty(EFFECT_FLAG_CARD_TARGET) - e7:SetCountLimit(1) - e7:SetCondition(c33900648.descon) - e7:SetTarget(c33900648.destg) - e7:SetOperation(c33900648.desop) - c:RegisterEffect(e7) - --water - local e8=Effect.CreateEffect(c) - e8:SetDescription(aux.Stringid(33900648,2)) - e8:SetCategory(CATEGORY_HANDES) - e8:SetCode(EVENT_PHASE+PHASE_END) - e8:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e8:SetRange(LOCATION_SZONE) - e8:SetCountLimit(1) - e8:SetCondition(c33900648.hdcon) - e8:SetTarget(c33900648.hdtg) - e8:SetOperation(c33900648.hdop) - c:RegisterEffect(e8) - --fire - local e9=Effect.CreateEffect(c) - e9:SetDescription(aux.Stringid(33900648,3)) - e9:SetCategory(CATEGORY_DAMAGE) - e9:SetCode(EVENT_PHASE+PHASE_END) - e9:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e9:SetRange(LOCATION_SZONE) - e9:SetCountLimit(1) - e9:SetCondition(c33900648.damcon) - e9:SetTarget(c33900648.damtg) - e9:SetOperation(c33900648.damop) - c:RegisterEffect(e9) - --wind - local e10=Effect.CreateEffect(c) - e10:SetType(EFFECT_TYPE_FIELD) - e10:SetCode(EFFECT_ACTIVATE_COST) - e10:SetRange(LOCATION_SZONE) - e10:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e10:SetTargetRange(1,0) - e10:SetTarget(c33900648.actarget) - e10:SetCondition(c33900648.windcon1) - e10:SetCost(c33900648.costchk) - e10:SetOperation(c33900648.costop) - c:RegisterEffect(e10) - local e11=e10:Clone() - e11:SetTargetRange(0,1) - e11:SetCondition(c33900648.windcon2) - c:RegisterEffect(e11) -end -function c33900648.mtcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c33900648.mtop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLP(tp)>500 and Duel.SelectYesNo(tp,aux.Stringid(33900648,0)) then - Duel.PayLPCost(tp,500) - else - Duel.Destroy(e:GetHandler(),REASON_RULE) - end -end -c33900648[0]=0 -c33900648[1]=0 -function c33900648.raccheck(p) - local rac=0 - for i=0,4 do - local tc=Duel.GetFieldCard(p,LOCATION_MZONE,i) - if tc and tc:IsFaceup() then - rac=bit.bor(rac,tc:GetAttribute()) - end - end - c33900648[p]=rac -end -function c33900648.adjustop(e,tp,eg,ep,ev,re,r,rp) - if not Duel.IsPlayerAffectedByEffect(0,97811903) then - c33900648.raccheck(0) - else c33900648[0]=0 end - if not Duel.IsPlayerAffectedByEffect(1,97811903) then - c33900648.raccheck(1) - else c33900648[1]=0 end -end -function c33900648.lighttg(e,c) - return bit.band(c33900648[c:GetControler()],ATTRIBUTE_LIGHT)~=0 -end -function c33900648.darkcon1(e) - return bit.band(c33900648[e:GetHandlerPlayer()],ATTRIBUTE_DARK)~=0 - and Duel.GetFieldGroupCount(e:GetHandlerPlayer(),LOCATION_MZONE,0)>=2 -end -function c33900648.darkcon2(e) - return bit.band(c33900648[1-e:GetHandlerPlayer()],ATTRIBUTE_DARK)~=0 - and Duel.GetFieldGroupCount(e:GetHandlerPlayer(),0,LOCATION_MZONE)>=2 -end -function c33900648.descon(e,tp,eg,ep,ev,re,r,rp) - return bit.band(c33900648[Duel.GetTurnPlayer()],ATTRIBUTE_EARTH)~=0 -end -function c33900648.desfilter(c) - return c:IsPosition(POS_FACEUP_DEFENCE) and c:IsDestructable() -end -function c33900648.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local turnp=Duel.GetTurnPlayer() - if chkc then return chkc:IsControler(turnp) and chkc:IsLocation(LOCATION_MZONE) and c33900648.desfilter(chkc) end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(turnp,c33900648.desfilter,turnp,LOCATION_MZONE,0,1,1,nil) - if g:GetCount()>0 then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) - end -end -function c33900648.desop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - if bit.band(c33900648[Duel.GetTurnPlayer()],ATTRIBUTE_EARTH)==0 then return end - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) and tc:IsPosition(POS_FACEUP_DEFENCE) then - Duel.Destroy(tc,REASON_EFFECT) - end -end -function c33900648.hdcon(e,tp,eg,ep,ev,re,r,rp) - return bit.band(c33900648[Duel.GetTurnPlayer()],ATTRIBUTE_WATER)~=0 -end -function c33900648.hdtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local turnp=Duel.GetTurnPlayer() - Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,turnp,1) -end -function c33900648.hdop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - if bit.band(c33900648[Duel.GetTurnPlayer()],ATTRIBUTE_WATER)==0 then return end - Duel.DiscardHand(Duel.GetTurnPlayer(),nil,1,1,REASON_EFFECT+REASON_DISCARD) -end -function c33900648.damcon(e,tp,eg,ep,ev,re,r,rp) - return bit.band(c33900648[Duel.GetTurnPlayer()],ATTRIBUTE_FIRE)~=0 -end -function c33900648.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local turnp=Duel.GetTurnPlayer() - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,turnp,1000) -end -function c33900648.damop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - if bit.band(c33900648[Duel.GetTurnPlayer()],ATTRIBUTE_FIRE)==0 then return end - Duel.Damage(Duel.GetTurnPlayer(),1000,REASON_EFFECT) -end -function c33900648.windcon1(e) - return bit.band(c33900648[e:GetHandlerPlayer()],ATTRIBUTE_WIND)~=0 -end -function c33900648.windcon2(e) - return bit.band(c33900648[1-e:GetHandlerPlayer()],ATTRIBUTE_WIND)~=0 -end -function c33900648.actarget(e,te,tp) - return te:IsHasType(EFFECT_TYPE_ACTIVATE) and te:IsActiveType(TYPE_SPELL) -end -function c33900648.costchk(e,te_or_c,tp) - return Duel.CheckLPCost(tp,500) -end -function c33900648.costop(e,tp,eg,ep,ev,re,r,rp) - Duel.PayLPCost(tp,500) -end diff --git a/script/c33904024.lua b/script/c33904024.lua deleted file mode 100644 index c1b013b1b7..0000000000 --- a/script/c33904024.lua +++ /dev/null @@ -1,48 +0,0 @@ ---強欲なカケラ -function c33904024.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --counter - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_DRAW) - e2:SetRange(LOCATION_SZONE) - e2:SetOperation(c33904024.ctop) - c:RegisterEffect(e2) - --draw - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(33904024,0)) - e3:SetCategory(CATEGORY_DRAW) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_SZONE) - e3:SetCondition(c33904024.drcon) - e3:SetCost(c33904024.drcost) - e3:SetTarget(c33904024.drtg) - e3:SetOperation(c33904024.drop) - c:RegisterEffect(e3) -end -function c33904024.ctop(e,tp,eg,ep,ev,re,r,rp) - if ep==tp and r==REASON_RULE then - e:GetHandler():AddCounter(0xd,1) - end -end -function c33904024.drcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetCounter(0xd)>=2 -end -function c33904024.drcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end -function c33904024.drtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp,2) end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(2) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2) -end -function c33904024.drop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end diff --git a/script/c33909817.lua b/script/c33909817.lua deleted file mode 100644 index 69a10c0ebd..0000000000 --- a/script/c33909817.lua +++ /dev/null @@ -1,78 +0,0 @@ ---森羅の姫芽宮 -function c33909817.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,1,2) - c:EnableReviveLimit() - --tohand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(33909817,0)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1,33909817) - e1:SetCost(c33909817.cost) - e1:SetTarget(c33909817.target) - e1:SetOperation(c33909817.operation) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(33909817,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,33909818) - e2:SetCost(c33909817.spcost) - e2:SetTarget(c33909817.sptg) - e2:SetOperation(c33909817.spop) - c:RegisterEffect(e2) -end -function c33909817.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c33909817.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,1) end -end -function c33909817.operation(e,tp,eg,ep,ev,re,r,rp) - if not Duel.IsPlayerCanDiscardDeck(tp,1) then return end - Duel.ConfirmDecktop(tp,1) - local g=Duel.GetDecktopGroup(tp,1) - local tc=g:GetFirst() - if tc:IsType(TYPE_SPELL+TYPE_TRAP) and tc:IsAbleToHand() then - Duel.DisableShuffleCheck() - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ShuffleHand(tp) - else - Duel.DisableShuffleCheck() - Duel.SendtoGrave(tc,REASON_EFFECT+REASON_REVEAL) - end -end -function c33909817.cfilter(c) - return (c:IsFaceup() or c:IsLocation(LOCATION_HAND)) and c:IsRace(RACE_PLANT) and c:IsAbleToGraveAsCost() -end -function c33909817.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - local loc=LOCATION_HAND+LOCATION_MZONE - if Duel.GetLocationCount(tp,LOCATION_MZONE)==0 then loc=LOCATION_MZONE end - if chk==0 then return Duel.IsExistingMatchingCard(c33909817.cfilter,tp,loc,0,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c33909817.cfilter,tp,loc,0,1,1,e:GetHandler()) - Duel.SendtoGrave(g,REASON_COST) -end -function c33909817.filter(c,e,tp) - return c:IsSetCard(0x90) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c33909817.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c33909817.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsExistingTarget(c33909817.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c33909817.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c33909817.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c33911264.lua b/script/c33911264.lua deleted file mode 100644 index 8a3ed4d471..0000000000 --- a/script/c33911264.lua +++ /dev/null @@ -1,56 +0,0 @@ ---太陽風帆船 -function c33911264.initial_effect(c) - c:SetUniqueOnField(1,1,33911264) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c33911264.spcon) - e1:SetOperation(c33911264.spop) - c:RegisterEffect(e1) - --level up - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(33911264,0)) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) - e2:SetCondition(c33911264.lvcon) - e2:SetOperation(c33911264.lvop) - c:RegisterEffect(e2) -end -function c33911264.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 - and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 -end -function c33911264.spop(e,tp,eg,ep,ev,re,r,rp,c) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_SET_BASE_ATTACK) - e1:SetValue(400) - e1:SetReset(RESET_EVENT+0xff0000) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_SET_BASE_DEFENCE) - e2:SetValue(1200) - c:RegisterEffect(e2) -end -function c33911264.lvcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c33911264.lvop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFacedown() or not c:IsRelateToEffect(e) then return end - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_LEVEL) - e1:SetValue(1) - e1:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e1) -end diff --git a/script/c33950246.lua b/script/c33950246.lua deleted file mode 100644 index 00b3b5700b..0000000000 --- a/script/c33950246.lua +++ /dev/null @@ -1,21 +0,0 @@ ---王宮の号令 -function c33950246.initial_effect(c) - --activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_DRAW_PHASE) - c:RegisterEffect(e1) - --disable effect - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_CHAIN_ACTIVATING) - e2:SetRange(LOCATION_SZONE) - e2:SetOperation(c33950246.disop) - c:RegisterEffect(e2) -end -function c33950246.disop(e,tp,eg,ep,ev,re,r,rp) - if re:IsActiveType(TYPE_FLIP) then - Duel.NegateActivation(ev) - end -end diff --git a/script/c33951077.lua b/script/c33951077.lua deleted file mode 100644 index d9eaea9c1c..0000000000 --- a/script/c33951077.lua +++ /dev/null @@ -1,4 +0,0 @@ ---スーパー・ウォー・ライオン -function c33951077.initial_effect(c) - c:EnableReviveLimit() -end diff --git a/script/c3395226.lua b/script/c3395226.lua deleted file mode 100644 index 1bc194b62f..0000000000 --- a/script/c3395226.lua +++ /dev/null @@ -1,48 +0,0 @@ ---幻奏の音姫プロディジー・モーツァルト -function c3395226.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(3395226,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c3395226.spcost) - e1:SetTarget(c3395226.sptg) - e1:SetOperation(c3395226.spop) - c:RegisterEffect(e1) - Duel.AddCustomActivityCounter(3395226,ACTIVITY_SPSUMMON,c3395226.counterfilter) -end -function c3395226.counterfilter(c) - return c:IsAttribute(ATTRIBUTE_LIGHT) -end -function c3395226.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetCustomActivityCount(3395226,tp,ACTIVITY_SPSUMMON)==0 end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) - e1:SetTargetRange(1,0) - e1:SetTarget(c3395226.splimit) - Duel.RegisterEffect(e1,tp) -end -function c3395226.splimit(e,c,sump,sumtype,sumpos,targetp,se) - return c:GetAttribute()~=ATTRIBUTE_LIGHT -end -function c3395226.filter(c,e,tp) - return c:IsRace(RACE_FAIRY) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c3395226.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c3395226.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c3395226.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c3395226.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c33970665.lua b/script/c33970665.lua deleted file mode 100644 index c158a464ab..0000000000 --- a/script/c33970665.lua +++ /dev/null @@ -1,42 +0,0 @@ ---ポンコツの意地 -function c33970665.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c33970665.target) - e1:SetOperation(c33970665.activate) - c:RegisterEffect(e1) -end -function c33970665.filter(c,e,tp) - return c:IsSetCard(0x24) and (c:IsCanBeSpecialSummoned(e,0,tp,false,false) - or c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,1-tp)) -end -function c33970665.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c33970665.filter(chkc,e,tp) end - if chk==0 then return (Duel.GetLocationCount(tp,LOCATION_MZONE)>0 or Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0) - and Duel.IsExistingTarget(c33970665.filter,tp,LOCATION_GRAVE,0,3,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(33970665,2)) - local g=Duel.SelectTarget(tp,c33970665.filter,tp,LOCATION_GRAVE,0,3,3,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c33970665.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) - local ft1=Duel.GetLocationCount(tp,LOCATION_MZONE) - local ft2=Duel.GetLocationCount(1-tp,LOCATION_MZONE) - if g:GetCount()==0 or (ft1==0 and ft2==0) then return end - Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_SPSUMMON) - local tc=g:Select(1-tp,1,1,nil):GetFirst() - local s1=ft1>0 and tc:IsCanBeSpecialSummoned(e,0,tp,false,false) - local s2=ft2>0 and tc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,1-tp) - if s1 and s2 then op=Duel.SelectOption(tp,aux.Stringid(33970665,0),aux.Stringid(33970665,1)) - elseif s1 then op=Duel.SelectOption(tp,aux.Stringid(33970665,0)) - elseif s2 then op=Duel.SelectOption(tp,aux.Stringid(33970665,1))+1 - else op=2 end - if op==0 then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - elseif op==1 then Duel.SpecialSummon(tc,0,tp,1-tp,false,false,POS_FACEUP) end - g:RemoveCard(tc) - Duel.Remove(g,POS_FACEUP,REASON_EFFECT) -end diff --git a/script/c33972299.lua b/script/c33972299.lua deleted file mode 100644 index 3de505a10c..0000000000 --- a/script/c33972299.lua +++ /dev/null @@ -1,43 +0,0 @@ ---ジオ・ジェネクス -function c33972299.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsCode,68505803),aux.NonTuner(Card.IsAttribute,ATTRIBUTE_EARTH),1) - c:EnableReviveLimit() - --ad change - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(33972299,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCondition(c33972299.condition) - e1:SetOperation(c33972299.operation) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetCode(EFFECT_SET_BASE_ATTACK) - e2:SetRange(LOCATION_MZONE) - e2:SetCondition(c33972299.valcon) - e2:SetValue(2800) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EFFECT_SET_BASE_DEFENCE) - e3:SetValue(1800) - c:RegisterEffect(e3) -end -function c33972299.valcon(e) - return e:GetHandler():GetFlagEffect(33972299)~=0 - and Duel.IsExistingMatchingCard(c33972299.cfilter,e:GetHandler():GetControler(),LOCATION_MZONE,0,1,nil) -end -function c33972299.cfilter(c) - return c:IsLevelBelow(4) and c:IsFaceup() and c:IsSetCard(0x2) -end -function c33972299.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c33972299.cfilter,tp,LOCATION_MZONE,0,1,nil) -end -function c33972299.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFaceup() and c:IsRelateToEffect(e) then - c:RegisterFlagEffect(33972299,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) - end -end diff --git a/script/c33977496.lua b/script/c33977496.lua deleted file mode 100644 index 73d9e8fd6e..0000000000 --- a/script/c33977496.lua +++ /dev/null @@ -1,26 +0,0 @@ ---針千本 -function c33977496.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(33977496,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_DAMAGE_STEP_END) - e1:SetCondition(c33977496.condition) - e1:SetTarget(c33977496.target) - e1:SetOperation(c33977496.operation) - c:RegisterEffect(e1) -end -function c33977496.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetAttackTarget()==e:GetHandler() and e:GetHandler():IsDefencePos() - and Duel.GetAttacker():GetAttack()0 and Duel.SendtoDeck(g,nil,1,REASON_EFFECT)>0 then - Duel.ConfirmCards(1-tp,g) - Duel.Draw(tp,1,REASON_EFFECT) - end -end -function c33981008.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsReason(REASON_DESTROY) and not e:GetHandler():IsReason(REASON_RULE) and rp==1-tp -end -function c33981008.ctfilter(c) - return c:IsSetCard(0x106e) and c:IsType(TYPE_SPELL) -end -function c33981008.spfilter(c,e,tp,lv) - return c:IsRace(RACE_SPELLCASTER) and c:IsLevelBelow(lv) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c33981008.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return false end - local ct=Duel.GetMatchingGroupCount(c33981008.ctfilter,tp,LOCATION_GRAVE,0,nil) - return Duel.IsExistingMatchingCard(c33981008.spfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil,e,tp,ct) - end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_HAND) -end -function c33981008.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return false end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local ct=Duel.GetMatchingGroupCount(c33981008.ctfilter,tp,LOCATION_GRAVE,0,nil) - local g=Duel.SelectMatchingCard(tp,c33981008.spfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil,e,tp,ct) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c340002.lua b/script/c340002.lua deleted file mode 100644 index c6c8ed1c04..0000000000 --- a/script/c340002.lua +++ /dev/null @@ -1,48 +0,0 @@ ---EMハンマーマンモ -function c340002.initial_effect(c) - --summon with no tribute - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(340002,0)) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SUMMON_PROC) - e1:SetCondition(c340002.ntcon) - c:RegisterEffect(e1) - --atklimit - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_CANNOT_ATTACK) - e2:SetCondition(c340002.atkcon) - c:RegisterEffect(e2) - --tohand - local e3=Effect.CreateEffect(c) - e3:SetCategory(CATEGORY_TOHAND) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_ATTACK_ANNOUNCE) - e3:SetTarget(c340002.thtg) - e3:SetOperation(c340002.thop) - c:RegisterEffect(e3) -end -function c340002.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x9f) -end -function c340002.ntcon(e,c,minc) - if c==nil then return true end - return minc==0 and c:GetLevel()>4 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c340002.cfilter,c:GetControler(),LOCATION_ONFIELD,0,2,nil) -end -function c340002.atkcon(e) - return not Duel.IsExistingMatchingCard(c340002.cfilter,e:GetHandlerPlayer(),LOCATION_ONFIELD,0,1,e:GetHandler()) -end -function c340002.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand() -end -function c340002.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c340002.filter,tp,0,LOCATION_ONFIELD,1,nil) end - local g=Duel.GetMatchingGroup(c340002.filter,tp,0,LOCATION_ONFIELD,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0) -end -function c340002.thop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c340002.filter,tp,0,LOCATION_ONFIELD,nil) - Duel.SendtoHand(g,nil,REASON_EFFECT) -end diff --git a/script/c34002992.lua b/script/c34002992.lua deleted file mode 100644 index 23f01a0ebe..0000000000 --- a/script/c34002992.lua +++ /dev/null @@ -1,25 +0,0 @@ ---レインボー・ライフ -function c34002992.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c34002992.cost) - e1:SetOperation(c34002992.activate) - c:RegisterEffect(e1) -end -function c34002992.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) -end -function c34002992.activate(e,tp,eg,ep,ev,re,r,rp) - --damage conversion - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EFFECT_REVERSE_DAMAGE) - e1:SetTargetRange(1,0) - e1:SetValue(1) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) -end diff --git a/script/c34004470.lua b/script/c34004470.lua deleted file mode 100644 index 928380ee2b..0000000000 --- a/script/c34004470.lua +++ /dev/null @@ -1,63 +0,0 @@ ---The big SATURN -function c34004470.initial_effect(c) - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_SINGLE_RANGE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetRange(LOCATION_HAND+LOCATION_DECK) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(aux.FALSE) - c:RegisterEffect(e1) - --atkup - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(34004470,0)) - e2:SetCategory(CATEGORY_ATKCHANGE) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCost(c34004470.atcost) - e2:SetOperation(c34004470.atop) - c:RegisterEffect(e2) - --damage - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(34004470,1)) - e3:SetCategory(CATEGORY_DAMAGE) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e3:SetCode(EVENT_TO_GRAVE) - e3:SetCondition(c34004470.damcon) - e3:SetTarget(c34004470.damtg) - e3:SetOperation(c34004470.damop) - c:RegisterEffect(e3) -end -function c34004470.atcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,1000) - and Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) - Duel.PayLPCost(tp,1000) -end -function c34004470.atop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFaceup() and c:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(1000) - e1:SetReset(RESET_EVENT+0x1ff0000+RESET_PHASE+PHASE_END) - c:RegisterEffect(e1) - end -end -function c34004470.damcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return bit.band(r,0x41)==0x41 and rp~=tp and c:GetPreviousControler()==tp -end -function c34004470.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local dam=e:GetHandler():GetAttack() - Duel.SetTargetParam(dam) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,PLAYER_ALL,dam) -end -function c34004470.damop(e,tp,eg,ep,ev,re,r,rp) - local d=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM) - Duel.Damage(1-tp,d,REASON_EFFECT) - Duel.Damage(tp,d,REASON_EFFECT) -end diff --git a/script/c34016756.lua b/script/c34016756.lua deleted file mode 100644 index 43ca8cd182..0000000000 --- a/script/c34016756.lua +++ /dev/null @@ -1,43 +0,0 @@ ---フォース -function c34016756.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c34016756.target) - e1:SetOperation(c34016756.activate) - c:RegisterEffect(e1) -end -function c34016756.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,2,nil) end - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(34016756,0)) - local g1=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - e:SetLabelObject(g1:GetFirst()) - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(34016756,1)) - local g2=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,g1:GetFirst()) -end -function c34016756.activate(e,tp,eg,ep,ev,re,r,rp) - local hc=e:GetLabelObject() - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local tc=g:GetFirst() - if tc==hc then tc=g:GetNext() end - if hc:IsFaceup() and hc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsRelateToEffect(e) then - local atk=hc:GetAttack() - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - e1:SetValue(atk/2) - if hc:RegisterEffect(e1) then - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - e2:SetValue(atk/2) - tc:RegisterEffect(e2) - end - end -end diff --git a/script/c34022290.lua b/script/c34022290.lua deleted file mode 100644 index c054f71e40..0000000000 --- a/script/c34022290.lua +++ /dev/null @@ -1,56 +0,0 @@ ---ガーディアン・エアトス -function c34022290.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c34022290.spcon) - c:RegisterEffect(e1) - --remove - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(34022290,0)) - e2:SetCategory(CATEGORY_REMOVE) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetRange(LOCATION_MZONE) - e2:SetCost(c34022290.rmcost) - e2:SetTarget(c34022290.rmtg) - e2:SetOperation(c34022290.rmop) - c:RegisterEffect(e2) -end -function c34022290.spcon(e,c) - if c==nil then return true end - return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 - and not Duel.IsExistingMatchingCard(Card.IsType,c:GetControler(),LOCATION_GRAVE,0,1,nil,TYPE_MONSTER) -end -function c34022290.rmcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():GetEquipGroup():IsExists(Card.IsAbleToGraveAsCost,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=e:GetHandler():GetEquipGroup():FilterSelect(tp,Card.IsAbleToGraveAsCost,1,1,nil) - Duel.SendtoGrave(g,REASON_COST) -end -function c34022290.rmfilter(c) - return c:IsType(TYPE_MONSTER) and c:IsAbleToRemove() -end -function c34022290.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(1-tp) and c34022290.rmfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c34022290.rmfilter,tp,0,LOCATION_GRAVE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,c34022290.rmfilter,tp,0,LOCATION_GRAVE,1,3,nil) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,0) -end -function c34022290.rmop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) - local ct=Duel.Remove(g,POS_FACEUP,REASON_EFFECT) - local c=e:GetHandler() - if ct>0 and c:IsFaceup() and c:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(ct*500) - e1:SetReset(RESET_EVENT+0x1ff0000+RESET_PHASE+PHASE_END) - c:RegisterEffect(e1) - end -end diff --git a/script/c34026662.lua b/script/c34026662.lua deleted file mode 100644 index bdc6732dd4..0000000000 --- a/script/c34026662.lua +++ /dev/null @@ -1,35 +0,0 @@ ---進化の奇跡 -function c34026662.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c34026662.target) - e1:SetOperation(c34026662.activate) - c:RegisterEffect(e1) -end -function c34026662.filter(c) - local st=c:GetSummonType() - return c:IsFaceup() and st>=(SUMMON_TYPE_SPECIAL+150) and st<(SUMMON_TYPE_SPECIAL+180) -end -function c34026662.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c34026662.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c34026662.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - local g=Duel.SelectTarget(tp,c34026662.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) -end -function c34026662.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - e1:SetValue(1) - tc:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - tc:RegisterEffect(e2) - end -end diff --git a/script/c34029630.lua b/script/c34029630.lua deleted file mode 100644 index d9deb0d915..0000000000 --- a/script/c34029630.lua +++ /dev/null @@ -1,84 +0,0 @@ ---漆黒のパワーストーン -function c34029630.initial_effect(c) - --counter permit - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_COUNTER_PERMIT+0x3001) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCondition(c34029630.ctpermit) - c:RegisterEffect(e1) - --Activate - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_COUNTER) - e2:SetType(EFFECT_TYPE_ACTIVATE) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetTarget(c34029630.target) - e2:SetOperation(c34029630.operation) - c:RegisterEffect(e2) - --counter - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(34029630,1)) - e3:SetCategory(CATEGORY_COUNTER) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetType(EFFECT_TYPE_QUICK_O) - e3:SetRange(LOCATION_SZONE) - e3:SetCode(EVENT_FREE_CHAIN) - e3:SetCountLimit(1) - e3:SetCondition(c34029630.condition) - e3:SetTarget(c34029630.target2) - e3:SetOperation(c34029630.operation) - c:RegisterEffect(e3) - --self destroy - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e4:SetRange(LOCATION_SZONE) - e4:SetCode(EFFECT_SELF_DESTROY) - e4:SetCondition(c34029630.descon) - c:RegisterEffect(e4) -end -function c34029630.ctpermit(e) - local c=e:GetHandler() - return c:IsLocation(LOCATION_SZONE) and not c:IsStatus(STATUS_DISABLED) -end -function c34029630.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and c34029630.filter(chkc) end - if chk==0 then return true end - local c=e:GetHandler() - c:AddCounter(0x3001,3) - if Duel.GetTurnPlayer()==tp and c:IsCanRemoveCounter(tp,0x3001,1,REASON_EFFECT) - and Duel.IsExistingTarget(c34029630.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) - and Duel.SelectYesNo(tp,aux.Stringid(34029630,0)) then - e:SetProperty(EFFECT_FLAG_CARD_TARGET) - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(34029630,2)) - Duel.SelectTarget(tp,c34029630.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,e:GetHandler()) - e:GetHandler():RegisterFlagEffect(34029630,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) - else - e:SetProperty(0) - end -end -function c34029630.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) then return end - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) and c:IsCanRemoveCounter(tp,0x3001,1,REASON_EFFECT) and tc:IsCanAddCounter(0x3001,1) then - c:RemoveCounter(tp,0x3001,1,REASON_EFFECT) - tc:AddCounter(0x3001,1) - end -end -function c34029630.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c34029630.filter(c) - return c:IsFaceup() and c:IsCanAddCounter(0x3001,1) -end -function c34029630.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and c34029630.filter(chkc) end - if chk==0 then return e:GetHandler():GetFlagEffect(34029630)==0 and e:GetHandler():IsCanRemoveCounter(tp,0x3001,1,REASON_EFFECT) - and Duel.IsExistingTarget(c34029630.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(34029630,2)) - Duel.SelectTarget(tp,c34029630.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,e:GetHandler()) -end -function c34029630.descon(e) - return e:GetHandler():GetCounter(0x3001)==0 -end \ No newline at end of file diff --git a/script/c34086406.lua b/script/c34086406.lua deleted file mode 100644 index 0276a924e6..0000000000 --- a/script/c34086406.lua +++ /dev/null @@ -1,55 +0,0 @@ ---ラヴァルバル・チェイン -function c34086406.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,4,2) - c:EnableReviveLimit() - --to grave - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(34086406,1)) - e1:SetCategory(CATEGORY_TOGRAVE) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE) - e1:SetCost(c34086406.cost) - e1:SetTarget(c34086406.target1) - e1:SetOperation(c34086406.operation1) - c:RegisterEffect(e1) - --to deck top - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(34086406,2)) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE) - e2:SetCost(c34086406.cost) - e2:SetTarget(c34086406.target2) - e2:SetOperation(c34086406.operation2) - c:RegisterEffect(e2) -end -function c34086406.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c34086406.target1(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,0,1,tp,LOCATION_DECK) -end -function c34086406.target2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_DECK,0,1,nil,TYPE_MONSTER) - and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>1 end -end -function c34086406.operation1(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,Card.IsAbleToGrave,tp,LOCATION_DECK,0,1,1,nil) - Duel.SendtoGrave(g,REASON_EFFECT) -end -function c34086406.operation2(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(34086406,3)) - local g=Duel.SelectMatchingCard(tp,Card.IsType,tp,LOCATION_DECK,0,1,1,nil,TYPE_MONSTER) - local tc=g:GetFirst() - if tc then - Duel.ShuffleDeck(tp) - Duel.MoveSequence(tc,0) - Duel.ConfirmDecktop(tp,1) - end -end diff --git a/script/c34088136.lua b/script/c34088136.lua deleted file mode 100644 index 224da85b22..0000000000 --- a/script/c34088136.lua +++ /dev/null @@ -1,72 +0,0 @@ ---アルティメット・インセクト LV3 -function c34088136.initial_effect(c) - --atk down - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(0,LOCATION_MZONE) - e1:SetCondition(c34088136.con) - e1:SetValue(-300) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(34088136,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) - e2:SetCondition(c34088136.spcon) - e2:SetCost(c34088136.spcost) - e2:SetTarget(c34088136.sptg) - e2:SetOperation(c34088136.spop) - c:RegisterEffect(e2) - --reg - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e3:SetCode(EVENT_SUMMON_SUCCESS) - e3:SetOperation(c34088136.regop) - c:RegisterEffect(e3) - local e4=e3:Clone() - e4:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e4) - local e5=e3:Clone() - e5:SetCode(EVENT_FLIP) - c:RegisterEffect(e5) -end -c34088136.lvupcount=2 -c34088136.lvup={49441499,34830502} -c34088136.lvdncount=1 -c34088136.lvdn={49441499} -function c34088136.con(e) - return e:GetHandler():GetFlagEffect(34088136)~=0 -end -function c34088136.regop(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():RegisterFlagEffect(34088137,RESET_EVENT+0x1ec0000+RESET_PHASE+RESET_END,0,1) -end -function c34088136.spcon(e,tp,eg,ep,ev,re,r,rp) - return tp==Duel.GetTurnPlayer() and e:GetHandler():GetFlagEffect(34088137)==0 -end -function c34088136.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end -function c34088136.spfilter(c,e,tp) - return c:IsCode(34830502) and c:IsCanBeSpecialSummoned(e,0,tp,true,true) -end -function c34088136.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsExistingMatchingCard(c34088136.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) -end -function c34088136.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c34088136.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp) - local tc=g:GetFirst() - if tc then - Duel.SpecialSummon(tc,0,tp,tp,true,true,POS_FACEUP) - tc:RegisterFlagEffect(34830502,RESET_EVENT+0x16e0000,0,0) - tc:CompleteProcedure() - end -end diff --git a/script/c34103656.lua b/script/c34103656.lua deleted file mode 100644 index 0c7647e7a2..0000000000 --- a/script/c34103656.lua +++ /dev/null @@ -1,62 +0,0 @@ ---忘却の都 レミューリア -function c34103656.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --Atk/def - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetRange(LOCATION_SZONE) - e2:SetTarget(c34103656.adtg) - e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e2:SetValue(200) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EFFECT_UPDATE_DEFENCE) - c:RegisterEffect(e3) - --lv - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(34103656,0)) - e4:SetType(EFFECT_TYPE_IGNITION) - e4:SetRange(LOCATION_SZONE) - e4:SetCountLimit(1) - e4:SetTarget(c34103656.lvtg) - e4:SetOperation(c34103656.lvop) - c:RegisterEffect(e4) -end -function c34103656.adtg(e,c) - return c:IsAttribute(ATTRIBUTE_WATER) -end -function c34103656.cfilter(c) - return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_WATER) and c:GetLevel()>0 -end -function c34103656.lvtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c34103656.cfilter,tp,LOCATION_MZONE,0,1,nil) end -end -function c34103656.lvfilter(c) - return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_WATER) -end -function c34103656.lvop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - local lv=Duel.GetMatchingGroupCount(c34103656.lvfilter,tp,LOCATION_MZONE,0,nil) - local g=Duel.GetFieldGroup(tp,LOCATION_MZONE,0) - local mg,fid=g:GetMaxGroup(Card.GetFieldID) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_UPDATE_LEVEL) - e1:SetRange(LOCATION_SZONE) - e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetTarget(c34103656.efftg) - e1:SetValue(lv) - e1:SetLabel(fid) - e1:SetReset(RESET_EVENT+0x1ff0000+RESET_PHASE+PHASE_END) - c:RegisterEffect(e1) - end -end -function c34103656.efftg(e,c) - return c:GetFieldID()<=e:GetLabel() and c:IsAttribute(ATTRIBUTE_WATER) and c:GetLevel()>0 -end diff --git a/script/c34109611.lua b/script/c34109611.lua deleted file mode 100644 index df5ce8480d..0000000000 --- a/script/c34109611.lua +++ /dev/null @@ -1,35 +0,0 @@ ---ダイガスタ・ファルコス -function c34109611.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,nil,aux.NonTuner(Card.IsSetCard,0x10),1) - c:EnableReviveLimit() - --atkup - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(34109611,0)) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(c34109611.condition) - e1:SetOperation(c34109611.operation) - c:RegisterEffect(e1) -end -function c34109611.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_SYNCHRO -end -function c34109611.filter(c) - return c:IsFaceup() and c:IsSetCard(0x10) -end -function c34109611.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c34109611.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - local tc=g:GetFirst() - while tc do - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(600) - tc:RegisterEffect(e1) - tc=g:GetNext() - end -end diff --git a/script/c34116027.lua b/script/c34116027.lua deleted file mode 100644 index cee60d3abb..0000000000 --- a/script/c34116027.lua +++ /dev/null @@ -1,34 +0,0 @@ ---ドラグニティナイト-ガジャルグ -function c34116027.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsRace,RACE_DRAGON),aux.NonTuner(Card.IsRace,RACE_WINDBEAST),1) - c:EnableReviveLimit() - --search - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(34116027,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_HANDES) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_MZONE) - e1:SetTarget(c34116027.target) - e1:SetOperation(c34116027.operation) - c:RegisterEffect(e1) -end -function c34116027.filter(c) - return c:IsLevelBelow(4) and c:IsRace(RACE_DRAGON+RACE_WINDBEAST) and c:IsAbleToHand() -end -function c34116027.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c34116027.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) - Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,1,tp,1) -end -function c34116027.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c34116027.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()==0 then return end - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - Duel.ShuffleHand(tp) - Duel.BreakEffect() - Duel.DiscardHand(tp,Card.IsRace,1,1,REASON_EFFECT+REASON_DISCARD,nil,RACE_DRAGON+RACE_WINDBEAST) -end diff --git a/script/c34124316.lua b/script/c34124316.lua deleted file mode 100644 index 2eb85f5745..0000000000 --- a/script/c34124316.lua +++ /dev/null @@ -1,64 +0,0 @@ ---サイバーポッド -function c34124316.initial_effect(c) - --flip - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON+CATEGORY_TOHAND) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP) - e1:SetTarget(c34124316.target) - e1:SetOperation(c34124316.operation) - c:RegisterEffect(e1) -end -function c34124316.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c34124316.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - Duel.Destroy(g,REASON_EFFECT) - local g1=Duel.GetDecktopGroup(tp,5) - local g2=Duel.GetDecktopGroup(1-tp,5) - local hg=Group.CreateGroup() - local gg=Group.CreateGroup() - Duel.ConfirmDecktop(tp,5) - local tc=g1:GetFirst() - while tc do - local lv=tc:GetLevel() - local pos=0 - if tc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK) then pos=pos+POS_FACEUP_ATTACK end - if tc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENCE) then pos=pos+POS_FACEDOWN_DEFENCE end - if lv>0 and lv<=4 and pos~=0 then - Duel.DisableShuffleCheck() - Duel.SpecialSummonStep(tc,0,tp,tp,false,false,pos) - elseif tc:IsAbleToHand() then - hg:AddCard(tc) - else gg:AddCard(tc) end - tc=g1:GetNext() - end - Duel.ConfirmDecktop(1-tp,5) - tc=g2:GetFirst() - while tc do - local lv=tc:GetLevel() - local pos=0 - if tc:IsCanBeSpecialSummoned(e,0,1-tp,false,false,POS_FACEUP_ATTACK) then pos=pos+POS_FACEUP_ATTACK end - if tc:IsCanBeSpecialSummoned(e,0,1-tp,false,false,POS_FACEDOWN_DEFENCE) then pos=pos+POS_FACEDOWN_DEFENCE end - if lv>0 and lv<=4 and pos~=0 then - Duel.DisableShuffleCheck() - Duel.SpecialSummonStep(tc,0,1-tp,1-tp,false,false,pos) - elseif tc:IsAbleToHand() then - hg:AddCard(tc) - else gg:AddCard(tc) end - tc=g2:GetNext() - end - Duel.SpecialSummonComplete() - if hg:GetCount()>0 then - Duel.DisableShuffleCheck() - Duel.SendtoHand(hg,nil,REASON_EFFECT) - Duel.ShuffleHand(tp) - Duel.ShuffleHand(1-tp) - end - if gg:GetCount()>0 then - Duel.DisableShuffleCheck() - Duel.SendtoGrave(gg,REASON_EFFECT) - end -end diff --git a/script/c34143852.lua b/script/c34143852.lua deleted file mode 100644 index e1b77e32bf..0000000000 --- a/script/c34143852.lua +++ /dev/null @@ -1,48 +0,0 @@ ---H・C エクストラ・ソード -function c34143852.initial_effect(c) - --effect gain - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_BE_MATERIAL) - e1:SetCondition(c34143852.efcon) - e1:SetOperation(c34143852.efop) - c:RegisterEffect(e1) -end -function c34143852.efcon(e,tp,eg,ep,ev,re,r,rp) - return r==REASON_XYZ -end -function c34143852.efop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local rc=c:GetReasonCard() - local e1=Effect.CreateEffect(rc) - e1:SetDescription(aux.Stringid(34143852,0)) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(c34143852.atkcon) - e1:SetOperation(c34143852.atkop) - e1:SetReset(RESET_EVENT+0x1fe0000) - rc:RegisterEffect(e1,true) - if not rc:IsType(TYPE_EFFECT) then - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_ADD_TYPE) - e2:SetValue(TYPE_EFFECT) - e2:SetReset(RESET_EVENT+0x1fe0000) - rc:RegisterEffect(e2,true) - end -end -function c34143852.atkcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_XYZ -end -function c34143852.atkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(1000) - e1:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e1) - end -end diff --git a/script/c34149830.lua b/script/c34149830.lua deleted file mode 100644 index 935087b82b..0000000000 --- a/script/c34149830.lua +++ /dev/null @@ -1,60 +0,0 @@ ---死力のタッグ・チェンジ -function c34149830.initial_effect(c) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --no damage & spsummon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(34149830,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_PRE_DAMAGE_CALCULATE) - e2:SetRange(LOCATION_SZONE) - e2:SetCondition(c34149830.condition) - e2:SetTarget(c34149830.target) - e2:SetOperation(c34149830.operation) - c:RegisterEffect(e2) -end -function c34149830.condition(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetAttacker() - local bc=tc:GetBattleTarget() - if tc:IsControler(1-tp) then - tc=Duel.GetAttackTarget() - bc=Duel.GetAttacker() - end - return tc and bc and not tc:IsHasEffect(EFFECT_INDESTRUCTABLE_BATTLE) - and tc:IsPosition(POS_FACEUP_ATTACK) and tc:GetAttack()<=bc:GetAttack() -end -function c34149830.spfilter(c,e,tp) - return c:IsLevelBelow(4) and c:IsRace(RACE_WARRIOR) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c34149830.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return not e:GetHandler():IsStatus(STATUS_CHAINING) - and Duel.IsExistingMatchingCard(c34149830.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end -end -function c34149830.operation(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_AVOID_BATTLE_DAMAGE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetReset(RESET_PHASE+PHASE_DAMAGE_CAL) - e1:SetTargetRange(1,0) - e1:SetValue(1) - Duel.RegisterEffect(e1,tp) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_DAMAGE_STEP_END) - e2:SetReset(RESET_PHASE+PHASE_DAMAGE) - e2:SetOperation(c34149830.spop) - Duel.RegisterEffect(e2,tp) -end -function c34149830.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c34149830.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - if g:GetCount()~=0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c34160055.lua b/script/c34160055.lua deleted file mode 100644 index 96277edf9a..0000000000 --- a/script/c34160055.lua +++ /dev/null @@ -1,38 +0,0 @@ ---龍炎剣の使い手 -function c34160055.initial_effect(c) - --atkup - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(34160055,0)) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_FIELD) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c34160055.target) - e1:SetOperation(c34160055.operation) - c:RegisterEffect(e1) -end -function c34160055.target(e,tp,eg,ep,ev,re,r,rp,chk) - local tc=eg:GetFirst() - if chk==0 then return tc:IsControler(tp) and not tc:IsCode(34160055) end - tc:CreateEffectRelation(e) -end -function c34160055.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=eg:GetFirst() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_LEVEL) - e1:SetValue(1) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - if c:IsFaceup() and c:IsRelateToEffect(e) then - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(300) - e2:SetReset(RESET_EVENT+0x1ff0000+RESET_PHASE+PHASE_END) - c:RegisterEffect(e2) - end - end -end diff --git a/script/c34187685.lua b/script/c34187685.lua deleted file mode 100644 index 67428ef12b..0000000000 --- a/script/c34187685.lua +++ /dev/null @@ -1,55 +0,0 @@ ---ダブルアタック -function c34187685.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetLabel(0) - e1:SetCondition(c34187685.condition) - e1:SetCost(c34187685.cost) - e1:SetTarget(c34187685.target) - e1:SetOperation(c34187685.activate) - c:RegisterEffect(e1) -end -function c34187685.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsAbleToEnterBP() -end -function c34187685.cost(e,tp,eg,ep,ev,re,r,rp,chk) - e:SetLabel(1) - return true -end -function c34187685.filter1(c,tp) - local lv=c:GetOriginalLevel() - return lv>1 and c:IsDiscardable() and c:IsAbleToGraveAsCost() - and Duel.IsExistingTarget(c34187685.filter2,tp,LOCATION_MZONE,0,1,nil,lv) -end -function c34187685.filter2(c,lv) - return c:IsFaceup() and c:IsLevelBelow(lv-1) and not c:IsHasEffect(EFFECT_EXTRA_ATTACK) -end -function c34187685.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c34187685.filter2(chkc,e:GetLabel()) end - if chk==0 then - if e:GetLabel()~=1 then return false end - e:SetLabel(0) - return Duel.IsExistingMatchingCard(c34187685.filter1,tp,LOCATION_HAND,0,1,nil,tp) - end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) - local cg=Duel.SelectMatchingCard(tp,c34187685.filter1,tp,LOCATION_HAND,0,1,1,nil,tp) - Duel.SendtoGrave(cg,REASON_DISCARD+REASON_COST) - local lv=cg:GetFirst():GetLevel() - e:SetLabel(lv) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c34187685.filter2,tp,LOCATION_MZONE,0,1,1,nil,lv) -end -function c34187685.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_EXTRA_ATTACK) - e1:SetValue(1) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - end -end diff --git a/script/c34193084.lua b/script/c34193084.lua deleted file mode 100644 index 421c6afec6..0000000000 --- a/script/c34193084.lua +++ /dev/null @@ -1,25 +0,0 @@ ---闇よりの恐怖 -function c34193084.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(34193084,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCondition(c34193084.spcon) - e1:SetTarget(c34193084.sptg) - e1:SetOperation(c34193084.spop) - c:RegisterEffect(e1) -end -function c34193084.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_HAND+LOCATION_DECK) and bit.band(r,REASON_EFFECT)~=0 and rp~=tp -end -function c34193084.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c34193084.spop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c34206604.lua b/script/c34206604.lua deleted file mode 100644 index bd4bd421a3..0000000000 --- a/script/c34206604.lua +++ /dev/null @@ -1,50 +0,0 @@ ---魔導サイエンティスト -function c34206604.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetDescription(aux.Stringid(34206604,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c34206604.cost) - e1:SetTarget(c34206604.target) - e1:SetOperation(c34206604.operation) - c:RegisterEffect(e1) -end -function c34206604.filter(c,e,tp) - return c:IsType(TYPE_FUSION) and c:GetLevel()<=6 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c34206604.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,1000) end - Duel.PayLPCost(tp,1000) -end -function c34206604.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c34206604.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function c34206604.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c34206604.filter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp) - local tc=g:GetFirst() - if tc and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)~=0 then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_DIRECT_ATTACK) - e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1,true) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_PHASE+PHASE_END) - e2:SetCountLimit(1) - e2:SetRange(LOCATION_MZONE) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e2:SetOperation(c34206604.retop) - tc:RegisterEffect(e2) - end -end -function c34206604.retop(e,tp,eg,ep,ev,re,r,rp) - Duel.SendtoDeck(e:GetHandler(),nil,0,REASON_EFFECT) -end diff --git a/script/c34230233.lua b/script/c34230233.lua deleted file mode 100644 index 979fab442d..0000000000 --- a/script/c34230233.lua +++ /dev/null @@ -1,64 +0,0 @@ ---暗黒界の龍神 グラファ -function c34230233.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_GRAVE) - e1:SetCondition(c34230233.spcon) - e1:SetOperation(c34230233.spop) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(34230233,0)) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetCondition(c34230233.descon) - e2:SetTarget(c34230233.destg) - e2:SetOperation(c34230233.desop) - c:RegisterEffect(e2) -end -function c34230233.spfilter(c) - return c:IsFaceup() and c:IsAbleToHandAsCost() and c:IsSetCard(0x6) and c:GetCode()~=34230233 -end -function c34230233.spcon(e,c) - if c==nil then return true end - return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-1 - and Duel.IsExistingMatchingCard(c34230233.spfilter,c:GetControler(),LOCATION_MZONE,0,1,nil) -end -function c34230233.spop(e,tp,eg,ep,ev,re,r,rp,c) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g=Duel.SelectMatchingCard(tp,c34230233.spfilter,tp,LOCATION_MZONE,0,1,1,nil) - Duel.SendtoHand(g,nil,REASON_COST) -end -function c34230233.descon(e,tp,eg,ep,ev,re,r,rp) - e:SetLabel(e:GetHandler():GetPreviousControler()) - return e:GetHandler():IsPreviousLocation(LOCATION_HAND) and bit.band(r,0x4040)==0x4040 -end -function c34230233.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and chkc:IsDestructable() end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,0,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) - if rp==tp then e:SetCategory(CATEGORY_DESTROY) - else e:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON) end -end -function c34230233.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)~=0 and rp~=tp and tp==e:GetLabel() then - Duel.BreakEffect() - local hg=Duel.GetFieldGroup(tp,0,LOCATION_HAND) - if hg:GetCount()>0 then - local cg=hg:RandomSelect(tp,1) - local cc=cg:GetFirst() - Duel.ConfirmCards(tp,cc) - if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and cc:IsCanBeSpecialSummoned(e,0,tp,false,false) - and Duel.SelectYesNo(tp,aux.Stringid(34230233,1)) then - Duel.SpecialSummon(cc,0,tp,tp,false,false,POS_FACEUP) - else Duel.ShuffleHand(1-tp) end - end - end -end diff --git a/script/c34236961.lua b/script/c34236961.lua deleted file mode 100644 index 3a5394fa7b..0000000000 --- a/script/c34236961.lua +++ /dev/null @@ -1,44 +0,0 @@ ---アンティ勝負 -function c34236961.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c34236961.target) - e1:SetOperation(c34236961.activate) - c:RegisterEffect(e1) -end -function c34236961.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local h1=Duel.GetFieldGroupCount(tp,LOCATION_HAND,0) - if e:GetHandler():IsLocation(LOCATION_HAND) then h1=h1-1 end - local h2=Duel.GetFieldGroupCount(1-tp,LOCATION_HAND,0) - return (h1>0 and h2>0) - end -end -function c34236961.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)==0 or Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)==0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) - local g1=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_HAND,0,1,1,nil) - Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_CONFIRM) - local g2=Duel.SelectMatchingCard(1-tp,nil,1-tp,LOCATION_HAND,0,1,1,nil) - Duel.ConfirmCards(1-tp,g1) - Duel.ConfirmCards(tp,g2) - local atpsl=g1:GetFirst() - local ntpsl=g2:GetFirst() - local atplv=atpsl:IsType(TYPE_MONSTER) and atpsl:GetLevel() or 0 - local ntplv=ntpsl:IsType(TYPE_MONSTER) and ntpsl:GetLevel() or 0 - if atplv==ntplv then - Duel.ShuffleHand(tp) - Duel.ShuffleHand(1-tp) - elseif atplv>ntplv then - Duel.Damage(1-tp,1000,REASON_EFFECT) - Duel.SendtoGrave(g2,REASON_EFFECT) - Duel.ShuffleHand(tp) - else - Duel.Damage(tp,1000,REASON_EFFECT) - Duel.SendtoGrave(g1,REASON_EFFECT) - Duel.ShuffleHand(1-tp) - end -end diff --git a/script/c34251483.lua b/script/c34251483.lua deleted file mode 100644 index ee7da982b9..0000000000 --- a/script/c34251483.lua +++ /dev/null @@ -1,45 +0,0 @@ ---ゴブリン切り込み部隊 -function c34251483.initial_effect(c) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetOperation(c34251483.atkop) - c:RegisterEffect(e1) - --to defence - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_PHASE+PHASE_BATTLE) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCondition(c34251483.poscon) - e2:SetOperation(c34251483.posop) - c:RegisterEffect(e2) -end -function c34251483.atkop(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EFFECT_CANNOT_ACTIVATE) - e1:SetTargetRange(0,1) - e1:SetValue(c34251483.aclimit) - e1:SetReset(RESET_CHAIN) - Duel.RegisterEffect(e1,tp) -end -function c34251483.aclimit(e,re,tp) - return re:IsHasType(EFFECT_TYPE_ACTIVATE) or re:GetHandler():IsType(TYPE_MONSTER) -end -function c34251483.poscon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetAttackedCount()>0 -end -function c34251483.posop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsAttackPos() then - Duel.ChangePosition(c,POS_FACEUP_DEFENCE) - end - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_CHANGE_POSITION) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_COPY_INHERIT) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,3) - c:RegisterEffect(e1) -end diff --git a/script/c34257001.lua b/script/c34257001.lua deleted file mode 100644 index 5534da2cbd..0000000000 --- a/script/c34257001.lua +++ /dev/null @@ -1,14 +0,0 @@ ---ダッシュ・ウォリアー -function c34257001.initial_effect(c) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetCondition(c34257001.condtion) - e1:SetValue(1200) - c:RegisterEffect(e1) -end -function c34257001.condtion(e) - local ph=Duel.GetCurrentPhase() - return (ph==PHASE_DAMAGE or ph==PHASE_DAMAGE_CAL) - and Duel.GetAttacker()==e:GetHandler() -end diff --git a/script/c34267821.lua b/script/c34267821.lua deleted file mode 100644 index 3896beb0f5..0000000000 --- a/script/c34267821.lua +++ /dev/null @@ -1,68 +0,0 @@ ---アーティファクト-ロンギヌス -function c34267821.initial_effect(c) - --set - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_MONSTER_SSET) - e1:SetValue(TYPE_SPELL) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(34267821,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetCondition(c34267821.spcon) - e2:SetTarget(c34267821.sptg) - e2:SetOperation(c34267821.spop) - c:RegisterEffect(e2) - --cannot remove - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(34267821,1)) - e3:SetType(EFFECT_TYPE_QUICK_O) - e3:SetCode(EVENT_FREE_CHAIN) - e3:SetRange(LOCATION_HAND+LOCATION_MZONE) - e3:SetCondition(c34267821.rmcon) - e3:SetCost(c34267821.rmcost) - e3:SetOperation(c34267821.rmop) - c:RegisterEffect(e3) -end -function c34267821.spcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsPreviousLocation(LOCATION_SZONE) and c:IsPreviousPosition(POS_FACEDOWN) - and c:IsReason(REASON_DESTROY) and Duel.GetTurnPlayer()~=tp -end -function c34267821.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c34267821.spop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP) - end -end -function c34267821.rmcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp -end -function c34267821.rmcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end -function c34267821.rmop(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_REMOVE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetTargetRange(1,1) - e1:SetValue(1) - e1:SetReset(RESET_PHASE+RESET_END) - Duel.RegisterEffect(e1,tp) - --30459350 chk - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(30459350) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetTargetRange(1,1) - e2:SetReset(RESET_PHASE+RESET_END) - Duel.RegisterEffect(e2,tp) -end diff --git a/script/c3429238.lua b/script/c3429238.lua deleted file mode 100644 index ed63c9ce64..0000000000 --- a/script/c3429238.lua +++ /dev/null @@ -1,101 +0,0 @@ ---ドリル・ウォリアー -function c3429238.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,c3429238.tfilter,aux.NonTuner(nil),1) - c:EnableReviveLimit() - --direct attack - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(3429238,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c3429238.datcon) - e1:SetTarget(c3429238.dattg) - e1:SetOperation(c3429238.datop) - c:RegisterEffect(e1) - --remove - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(3429238,1)) - e2:SetCategory(CATEGORY_REMOVE) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetCountLimit(1) - e2:SetRange(LOCATION_MZONE) - e2:SetTarget(c3429238.rmtg) - e2:SetOperation(c3429238.rmop) - c:RegisterEffect(e2) - --spsummon - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(3429238,2)) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e3:SetCode(EVENT_PHASE+PHASE_STANDBY) - e3:SetRange(LOCATION_REMOVED) - e3:SetCondition(c3429238.spcon) - e3:SetTarget(c3429238.sptg) - e3:SetOperation(c3429238.spop) - c:RegisterEffect(e3) -end -function c3429238.tfilter(c) - return c:IsCode(56286179) or c:IsHasEffect(20932152) -end -function c3429238.datcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()==PHASE_MAIN1 -end -function c3429238.dattg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) -end -function c3429238.datop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetValue(c:GetAttack()/2) - e1:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DIRECT_ATTACK) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - c:RegisterEffect(e2) - end -end -function c3429238.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)>0 and e:GetHandler():IsAbleToRemove() end - Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,e:GetHandler(),1,0,0) -end -function c3429238.rmop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) - local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_HAND,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoGrave(g,REASON_EFFECT+REASON_DISCARD) - if c:IsRelateToEffect(e) and Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT)~=0 then - e:GetHandler():RegisterFlagEffect(3429238,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,0,1) - end - end -end -function c3429238.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c3429238.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():GetFlagEffect(3429238)~=0 end - e:GetHandler():ResetFlagEffect(3429238) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c3429238.filter(c) - return c:IsType(TYPE_MONSTER) and c:IsAbleToHand() and not c:IsHasEffect(EFFECT_NECRO_VALLEY) -end -function c3429238.spop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) and Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP)>0 then - Duel.BreakEffect() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c3429238.filter,tp,LOCATION_GRAVE,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end - end -end diff --git a/script/c34294855.lua b/script/c34294855.lua deleted file mode 100644 index f211a87a41..0000000000 --- a/script/c34294855.lua +++ /dev/null @@ -1,64 +0,0 @@ ---カース・オブ・ヴァンパイア -function c34294855.initial_effect(c) - --reborn preparation - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(34294855,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetCondition(c34294855.spcon) - e1:SetCost(c34294855.spcost) - e1:SetOperation(c34294855.spop) - c:RegisterEffect(e1) - --reborn - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) - e2:SetRange(LOCATION_GRAVE) - e2:SetCountLimit(1) - e2:SetCondition(c34294855.spcon2) - e2:SetOperation(c34294855.spop2) - c:RegisterEffect(e2) - --atk up - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(34294855,1)) - e3:SetCategory(CATEGORY_ATKCHANGE) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e3:SetRange(LOCATION_MZONE) - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - e3:SetCondition(c34294855.upcon) - e3:SetOperation(c34294855.upop) - c:RegisterEffect(e3) -end -function c34294855.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) -end -function c34294855.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,500) end - Duel.PayLPCost(tp,500) -end -function c34294855.spop(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():RegisterFlagEffect(34294855,RESET_EVENT+0x1fe0000,0,0) -end -function c34294855.spcon2(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetFlagEffect(34294855)>0 -end -function c34294855.spop2(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - c:ResetFlagEffect(34294855) - Duel.SpecialSummon(c,1,tp,tp,false,false,POS_FACEUP) -end -function c34294855.upcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+1 -end -function c34294855.upop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFaceup() and c:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(500) - e1:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e1) - end -end \ No newline at end of file diff --git a/script/c3431737.lua b/script/c3431737.lua deleted file mode 100644 index ac32d6b0c7..0000000000 --- a/script/c3431737.lua +++ /dev/null @@ -1,32 +0,0 @@ ---バスター・ビースト -function c3431737.initial_effect(c) - --search - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(3431737,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND) - e1:SetCost(c3431737.cost) - e1:SetTarget(c3431737.target) - e1:SetOperation(c3431737.operation) - c:RegisterEffect(e1) -end -function c3431737.cost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToGraveAsCost() and c:IsDiscardable() end - Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD) -end -function c3431737.filter(c) - return c:GetCode()==80280737 and c:IsAbleToHand() -end -function c3431737.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chk==0 then return Duel.IsExistingMatchingCard(c3431737.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c3431737.operation(e,tp,eg,ep,ev,re,r,rp,chk) - local tc=Duel.GetFirstMatchingCard(c3431737.filter,tp,LOCATION_DECK,0,nil) - if tc then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end diff --git a/script/c34334692.lua b/script/c34334692.lua deleted file mode 100644 index 2cd7207d78..0000000000 --- a/script/c34334692.lua +++ /dev/null @@ -1,16 +0,0 @@ ---儀式の供物 -function c34334692.initial_effect(c) - --ritual level - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_RITUAL_LEVEL) - e1:SetValue(c34334692.rlevel) - c:RegisterEffect(e1) -end -function c34334692.rlevel(e,c) - local lv=e:GetHandler():GetLevel() - if c:IsAttribute(ATTRIBUTE_DARK) then - local clv=c:GetLevel() - return lv*65536+clv - else return lv end -end diff --git a/script/c34351849.lua b/script/c34351849.lua deleted file mode 100644 index 121a76de0f..0000000000 --- a/script/c34351849.lua +++ /dev/null @@ -1,30 +0,0 @@ ---フロッグ・バリア -function c34351849.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_BE_BATTLE_TARGET) - e1:SetCondition(c34351849.condition) - e1:SetTarget(c34351849.target) - e1:SetOperation(c34351849.activate) - c:RegisterEffect(e1) -end -function c34351849.condition(e,tp,eg,ep,ev,re,r,rp) - local d=Duel.GetAttackTarget() - return d and d:IsFaceup() and d:IsControler(tp) and d:IsSetCard(0x12) -end -function c34351849.filter(c) - return c:IsAttackPos() and c:IsDestructable() -end -function c34351849.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c34351849.filter,tp,0,LOCATION_MZONE,1,nil) end - local g=Duel.GetMatchingGroup(c34351849.filter,tp,0,LOCATION_MZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c34351849.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c34351849.filter,tp,0,LOCATION_MZONE,nil) - if g:GetCount()>0 then - Duel.Destroy(g,REASON_EFFECT) - end -end diff --git a/script/c34358408.lua b/script/c34358408.lua deleted file mode 100644 index 4210bc0b86..0000000000 --- a/script/c34358408.lua +++ /dev/null @@ -1,41 +0,0 @@ ---儀式魔人プレサイダー -function c34358408.initial_effect(c) - --ritual material - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_EXTRA_RITUAL_MATERIAL) - e1:SetValue(1) - c:RegisterEffect(e1) - --become material - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetCode(EVENT_BE_MATERIAL) - e2:SetCondition(c34358408.condition) - e2:SetOperation(c34358408.operation) - c:RegisterEffect(e2) -end -function c34358408.condition(e,tp,eg,ep,ev,re,r,rp) - return r==REASON_RITUAL -end -function c34358408.operation(e,tp,eg,ep,ev,re,r,rp) - local rc=eg:GetFirst() - while rc do - if rc:GetFlagEffect(34358408)==0 then - --draw - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetDescription(aux.Stringid(34358408,0)) - e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_BATTLE_DESTROYING) - e1:SetOperation(c34358408.drawop) - e1:SetReset(RESET_EVENT+0x1fe0000) - rc:RegisterEffect(e1,true) - rc:RegisterFlagEffect(34358408,RESET_EVENT+0x1fe0000,0,1) - end - rc=eg:GetNext() - end -end -function c34358408.drawop(e,tp,eg,ep,ev,re,r,rp) - Duel.Draw(tp,1,REASON_EFFECT) -end diff --git a/script/c34370473.lua b/script/c34370473.lua deleted file mode 100644 index e7ba115aa2..0000000000 --- a/script/c34370473.lua +++ /dev/null @@ -1,26 +0,0 @@ ---グリフォンの羽根帚 -function c34370473.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_RECOVER) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c34370473.target) - e1:SetOperation(c34370473.activate) - c:RegisterEffect(e1) -end -function c34370473.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable() -end -function c34370473.target(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return Duel.IsExistingMatchingCard(c34370473.filter,tp,LOCATION_ONFIELD,0,1,c) end - local g=Duel.GetMatchingGroup(c34370473.filter,tp,LOCATION_ONFIELD,0,c) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) - Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,g:GetCount()*500) -end -function c34370473.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c34370473.filter,tp,LOCATION_ONFIELD,0,e:GetHandler()) - local ct=Duel.Destroy(g,REASON_EFFECT) - Duel.Recover(tp,ct*500,REASON_EFFECT) -end diff --git a/script/c34408491.lua b/script/c34408491.lua deleted file mode 100644 index c9aa8e8c8d..0000000000 --- a/script/c34408491.lua +++ /dev/null @@ -1,42 +0,0 @@ ---魔王龍 ベエルゼ -function c34408491.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_DARK),aux.NonTuner(nil),1) - c:EnableReviveLimit() - --indes - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e1:SetValue(1) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - c:RegisterEffect(e2) - --atk - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(34408491,0)) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e3:SetRange(LOCATION_MZONE) - e3:SetCode(EVENT_DAMAGE) - e3:SetCondition(c34408491.atkcon) - e3:SetOperation(c34408491.atkop) - c:RegisterEffect(e3) -end -function c34408491.atkcon(e,tp,eg,ep,ev,re,r,rp) - if ep~=tp then return false end - if bit.band(r,REASON_EFFECT)~=0 then return rp~=tp end - return e:GetHandler():IsRelateToBattle() -end -function c34408491.atkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFaceup() and c:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(ev) - e1:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e1) - end -end diff --git a/script/c34460239.lua b/script/c34460239.lua deleted file mode 100644 index 1b9c83063e..0000000000 --- a/script/c34460239.lua +++ /dev/null @@ -1,42 +0,0 @@ ---ジェネレーション・チェンジ -function c34460239.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c34460239.target) - e1:SetOperation(c34460239.activate) - c:RegisterEffect(e1) -end -function c34460239.filter(c,tp) - return c:IsFaceup() and c:IsDestructable() - and Duel.IsExistingMatchingCard(c34460239.nfilter1,tp,LOCATION_DECK,0,1,nil,c) -end -function c34460239.nfilter1(c,tc) - return c:IsCode(tc:GetCode()) and c:IsAbleToHand() -end -function c34460239.nfilter2(c,tc) - return c:IsCode(tc:GetPreviousCodeOnField()) and c:IsAbleToHand() -end -function c34460239.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c34460239.filter(chkc,tp) end - if chk==0 then return Duel.IsExistingTarget(c34460239.filter,tp,LOCATION_MZONE,0,1,nil,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c34460239.filter,tp,LOCATION_MZONE,0,1,1,nil,tp) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c34460239.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)>0 then - Duel.BreakEffect() - local g=Duel.SelectMatchingCard(tp,c34460239.nfilter2,tp,LOCATION_DECK,0,1,1,nil,tc) - local hc=g:GetFirst() - if hc then - Duel.SendtoHand(hc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,hc) - end - end -end diff --git a/script/c34471458.lua b/script/c34471458.lua deleted file mode 100644 index 517826decf..0000000000 --- a/script/c34471458.lua +++ /dev/null @@ -1,72 +0,0 @@ ---フォーチュンレディ・ライティー -function c34471458.initial_effect(c) - --atk,def - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_SET_ATTACK) - e1:SetValue(c34471458.value) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_SET_DEFENCE) - c:RegisterEffect(e2) - --level up - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(34471458,0)) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1) - e3:SetCode(EVENT_PHASE+PHASE_STANDBY) - e3:SetCondition(c34471458.lvcon) - e3:SetOperation(c34471458.lvop) - c:RegisterEffect(e3) - --special summon - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(34471458,1)) - e4:SetCategory(CATEGORY_SPECIAL_SUMMON) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e4:SetCode(EVENT_LEAVE_FIELD) - e4:SetCondition(c34471458.spcon) - e4:SetTarget(c34471458.sptg) - e4:SetOperation(c34471458.spop) - c:RegisterEffect(e4) -end -function c34471458.value(e,c) - return c:GetLevel()*200 -end -function c34471458.lvcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp and e:GetHandler():IsLevelAbove(1) and e:GetHandler():IsLevelBelow(11) -end -function c34471458.lvop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFacedown() or not c:IsRelateToEffect(e) or c:IsLevelAbove(12) then return end - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_LEVEL) - e1:SetValue(1) - e1:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e1) -end -function c34471458.spcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsReason(REASON_EFFECT) and not c:IsLocation(LOCATION_DECK) - and c:IsPreviousPosition(POS_FACEUP) -end -function c34471458.spfilter(c,e,tp) - return c:IsSetCard(0x31) and c:IsCanBeSpecialSummoned(e,0x8,tp,false,false) -end -function c34471458.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c34471458.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c34471458.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c34471458.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0x8,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c34475451.lua b/script/c34475451.lua deleted file mode 100644 index 4d625a9e50..0000000000 --- a/script/c34475451.lua +++ /dev/null @@ -1,38 +0,0 @@ ---工作列車シグナル・レッド -function c34475451.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(34475451,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c34475451.condition) - e1:SetTarget(c34475451.target) - e1:SetOperation(c34475451.operation) - c:RegisterEffect(e1) -end -function c34475451.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetAttacker():GetControler()~=tp -end -function c34475451.target(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0) -end -function c34475451.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then - local a=Duel.GetAttacker() - if a:IsAttackable() and not a:IsImmuneToEffect(e) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e1:SetValue(1) - e1:SetReset(RESET_PHASE+PHASE_DAMAGE) - c:RegisterEffect(e1) - Duel.CalculateDamage(a,c) - end - end -end diff --git a/script/c34487429.lua b/script/c34487429.lua deleted file mode 100644 index 99c5abbb51..0000000000 --- a/script/c34487429.lua +++ /dev/null @@ -1,140 +0,0 @@ ---虹の古代都市-レインボー・ルイン -function c34487429.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --Destroy replace - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - e2:SetRange(LOCATION_SZONE) - e2:SetCondition(c34487429.desrepcon) - e2:SetValue(1) - c:RegisterEffect(e2) - --Negate - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(34487429,1)) - e3:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) - e3:SetType(EFFECT_TYPE_QUICK_O) - e3:SetCode(EVENT_CHAINING) - e3:SetRange(LOCATION_SZONE) - e3:SetCondition(c34487429.discon) - e3:SetCost(c34487429.discost) - e3:SetTarget(c34487429.distg) - e3:SetOperation(c34487429.disop) - c:RegisterEffect(e3) - --draw - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(34487429,2)) - e4:SetCategory(CATEGORY_DRAW) - e4:SetType(EFFECT_TYPE_IGNITION) - e4:SetRange(LOCATION_SZONE) - e4:SetCountLimit(1) - e4:SetCondition(c34487429.drcon) - e4:SetTarget(c34487429.drtg) - e4:SetOperation(c34487429.drop) - c:RegisterEffect(e4) - --special summon - local e5=Effect.CreateEffect(c) - e5:SetDescription(aux.Stringid(34487429,3)) - e5:SetCategory(CATEGORY_SPECIAL_SUMMON) - e5:SetProperty(EFFECT_FLAG_CARD_TARGET) - e5:SetType(EFFECT_TYPE_IGNITION) - e5:SetRange(LOCATION_SZONE) - e5:SetCountLimit(1) - e5:SetCondition(c34487429.spcon) - e5:SetTarget(c34487429.sptg) - e5:SetOperation(c34487429.spop) - c:RegisterEffect(e5) - --damage reduce - local e6=Effect.CreateEffect(c) - e6:SetDescription(aux.Stringid(34487429,0)) - e6:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e6:SetRange(LOCATION_SZONE) - e6:SetCode(EVENT_PRE_BATTLE_DAMAGE) - e6:SetCondition(c34487429.rdcon) - e6:SetOperation(c34487429.rdop) - c:RegisterEffect(e6) -end -function c34487429.filter1(c) - return c:IsFaceup() and c:IsSetCard(0x1034) -end -function c34487429.desrepcon(e) - return Duel.IsExistingMatchingCard(c34487429.filter1,e:GetHandler():GetControler(),LOCATION_SZONE,0,1,nil) -end -function c34487429.discon(e,tp,eg,ep,ev,re,r,rp) - return re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev) - and Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_SZONE,0,3,nil,0x1034) -end -function c34487429.filter2(c) - return c:IsFaceup() and c:IsSetCard(0x1034) and c:IsAbleToGraveAsCost() -end -function c34487429.discost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c34487429.filter2,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c34487429.filter2,tp,LOCATION_MZONE,0,1,1,nil) - Duel.SendtoGrave(g,REASON_COST) -end -function c34487429.distg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) - end -end -function c34487429.disop(e,tp,eg,ep,ev,re,r,rp) - if not Duel.IsExistingMatchingCard(c34487429.filter1,tp,LOCATION_SZONE,0,3,nil) then return end - Duel.NegateActivation(ev) - if re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(eg,REASON_EFFECT) - end -end -function c34487429.drcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c34487429.filter1,tp,LOCATION_SZONE,0,4,nil) -end -function c34487429.drtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(1) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c34487429.drop(e,tp,eg,ep,ev,re,r,rp) - if not Duel.IsExistingMatchingCard(c34487429.filter1,tp,LOCATION_SZONE,0,4,nil) then return end - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end -function c34487429.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c34487429.filter1,tp,LOCATION_SZONE,0,5,nil) -end -function c34487429.filter3(c,e,tp) - return c:IsFaceup() and c:IsSetCard(0x1034) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c34487429.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:GetLocation()==LOCATION_SZONE and chkc:GetControler()==tp and c34487429.filter3(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c34487429.filter3,tp,LOCATION_SZONE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c34487429.filter3,tp,LOCATION_SZONE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,LOCATION_SZONE) -end -function c34487429.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - if not Duel.IsExistingMatchingCard(c34487429.filter1,tp,LOCATION_SZONE,0,5,nil) then return end - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,true,false,POS_FACEUP) - end -end -function c34487429.rdcon(e,tp,eg,ep,ev,re,r,rp) - return ep==tp and e:GetHandler():GetFlagEffect(34487429)==0 - and Duel.IsExistingMatchingCard(c34487429.filter1,tp,LOCATION_SZONE,0,2,nil) -end -function c34487429.rdop(e,tp,eg,ep,ev,re,r,rp) - if Duel.SelectEffectYesNo(tp,e:GetHandler()) then - Duel.ChangeBattleDamage(tp,ev/2) - e:GetHandler():RegisterFlagEffect(34487429,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) - end -end diff --git a/script/c34492631.lua b/script/c34492631.lua deleted file mode 100644 index 086e6bb3a4..0000000000 --- a/script/c34492631.lua +++ /dev/null @@ -1,63 +0,0 @@ ---ジャンク・ジャイアント -function c34492631.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c34492631.spcon) - c:RegisterEffect(e1) - --effect gain - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_BE_MATERIAL) - e2:SetCondition(c34492631.effcon) - e2:SetOperation(c34492631.effop1) - c:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e3:SetCode(EVENT_BE_PRE_MATERIAL) - e3:SetCondition(c34492631.effcon) - e3:SetOperation(c34492631.effop2) - c:RegisterEffect(e3) -end -function c34492631.filter(c) - return c:IsFaceup() and c:IsLevelAbove(5) -end -function c34492631.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c34492631.filter,tp,0,LOCATION_MZONE,1,nil) -end -function c34492631.effcon(e,tp,eg,ep,ev,re,r,rp) - return r==REASON_SYNCHRO -end -function c34492631.effop1(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local rc=c:GetReasonCard() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetOperation(c34492631.sumop) - rc:RegisterEffect(e1) -end -function c34492631.sumop(e,tp,eg,ep,ev,re,r,rp) - Duel.SetChainLimitTillChainEnd(c34492631.chainlm) -end -function c34492631.chainlm(e,rp,tp) - return tp==rp -end -function c34492631.effop2(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local rc=c:GetReasonCard() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_DISABLE_SPSUMMON) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetReset(RESET_EVENT+0x1fe0000) - rc:RegisterEffect(e1) -end diff --git a/script/c34507039.lua b/script/c34507039.lua deleted file mode 100644 index 92f3a29118..0000000000 --- a/script/c34507039.lua +++ /dev/null @@ -1,30 +0,0 @@ ---ギャクタン -function c34507039.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_NEGATE+CATEGORY_TODECK) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_CHAINING) - e1:SetCondition(c34507039.condition) - e1:SetTarget(c34507039.target) - e1:SetOperation(c34507039.activate) - c:RegisterEffect(e1) -end -function c34507039.condition(e,tp,eg,ep,ev,re,r,rp) - return re:IsActiveType(TYPE_TRAP) and re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev) -end -function c34507039.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - if re:GetHandler():IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_TODECK,eg,1,0,0) - end -end -function c34507039.activate(e,tp,eg,ep,ev,re,r,rp) - local ec=re:GetHandler() - Duel.NegateActivation(ev) - if re:GetHandler():IsRelateToEffect(re) then - ec:CancelToGrave() - Duel.SendtoDeck(ec,nil,2,REASON_EFFECT) - end -end diff --git a/script/c34541863.lua b/script/c34541863.lua deleted file mode 100644 index ae02c587ed..0000000000 --- a/script/c34541863.lua +++ /dev/null @@ -1,37 +0,0 @@ ---「A」細胞増殖装置 -function c34541863.initial_effect(c) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --counter - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(34541863,0)) - e2:SetCategory(CATEGORY_COUNTER) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetRange(LOCATION_SZONE) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCountLimit(1) - e2:SetCondition(c34541863.condition) - e2:SetTarget(c34541863.target) - e2:SetOperation(c34541863.operation) - c:RegisterEffect(e2) -end -function c34541863.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c34541863.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_COUNTER,g,1,0xe,1) -end -function c34541863.operation(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - tc:AddCounter(0xe,1) - end -end diff --git a/script/c34545235.lua b/script/c34545235.lua deleted file mode 100644 index 6292fef818..0000000000 --- a/script/c34545235.lua +++ /dev/null @@ -1,39 +0,0 @@ ---鋼核の輝き -function c34545235.initial_effect(c) - --negate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_CHAINING) - e1:SetCondition(c34545235.condition) - e1:SetCost(c34545235.cost) - e1:SetTarget(c34545235.target) - e1:SetOperation(c34545235.activate) - c:RegisterEffect(e1) -end -function c34545235.condition(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp and re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev) -end -function c34545235.cfilter(c) - return c:IsCode(36623431) and not c:IsPublic() -end -function c34545235.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c34545235.cfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) - local g=Duel.SelectMatchingCard(tp,c34545235.cfilter,tp,LOCATION_HAND,0,1,1,nil) - Duel.ConfirmCards(1-tp,g) - Duel.ShuffleHand(tp) -end -function c34545235.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) - end -end -function c34545235.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateActivation(ev) - if re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(eg,REASON_EFFECT) - end -end diff --git a/script/c34566435.lua b/script/c34566435.lua deleted file mode 100644 index dbb77ebb2e..0000000000 --- a/script/c34566435.lua +++ /dev/null @@ -1,46 +0,0 @@ ---エッジインプ・DTモドキ -function c34566435.initial_effect(c) - --atk - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(34566435,0)) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1,34566435) - e1:SetTarget(c34566435.target) - e1:SetOperation(c34566435.operation) - c:RegisterEffect(e1) - --add setcode - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e2:SetCode(EFFECT_ADD_SETCODE) - e2:SetValue(0xad) - c:RegisterEffect(e2) -end -function c34566435.filter(c) - return (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup()) and c:IsType(TYPE_FUSION) and c:IsSetCard(0xad) -end -function c34566435.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE+LOCATION_GRAVE) and c34566435.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c34566435.filter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c34566435.filter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil) -end -function c34566435.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and c:IsFaceup() and tc:IsRelateToEffect(e) and (tc:IsLocation(LOCATION_GRAVE) or tc:IsFaceup()) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetValue(tc:GetBaseAttack()) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_SET_DEFENCE_FINAL) - e2:SetValue(tc:GetBaseDefence()) - c:RegisterEffect(e2) - end -end diff --git a/script/c34568403.lua b/script/c34568403.lua deleted file mode 100644 index 9f099e4719..0000000000 --- a/script/c34568403.lua +++ /dev/null @@ -1,67 +0,0 @@ ---アルカナフォースVII-THE CHARIOT -function c34568403.initial_effect(c) - --coin - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(34568403,0)) - e1:SetCategory(CATEGORY_COIN) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c34568403.cointg) - e1:SetOperation(c34568403.coinop) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e2) - local e3=e1:Clone() - e3:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - c:RegisterEffect(e3) -end -function c34568403.cointg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_COIN,nil,0,tp,1) -end -function c34568403.coinop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) or c:IsFacedown() then return end - local res=0 - if c:IsHasEffect(73206827) then - res=1-Duel.SelectOption(tp,60,61) - else res=Duel.TossCoin(tp,1) end - c34568403.arcanareg(c,res) - if res==0 then - if not Duel.GetControl(c,1-tp) and not c:IsImmuneToEffect(e) and c:IsAbleToChangeControler() then - Duel.Destroy(c,REASON_EFFECT) - end - end -end -function c34568403.arcanareg(c,coin) - --coin effect - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(34568403,1)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_BATTLE_DESTROYING) - e1:SetCondition(c34568403.spcon) - e1:SetTarget(c34568403.sptg) - e1:SetOperation(c34568403.spop) - e1:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e1) - c:RegisterFlagEffect(36690018,RESET_EVENT+0x1ff0000,EFFECT_FLAG_CLIENT_HINT,1,coin,63-coin) -end -function c34568403.spcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:GetFlagEffectLabel(36690018)==1 and c:IsRelateToBattle() and c:IsStatus(STATUS_OPPO_BATTLE) -end -function c34568403.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - local tc=e:GetHandler():GetBattleTarget() - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and tc:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) and tc:IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetTargetCard(tc) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,tc,1,0,0) -end -function c34568403.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetHandler():GetBattleTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c34614289.lua b/script/c34614289.lua deleted file mode 100644 index 9d95e1a64f..0000000000 --- a/script/c34614289.lua +++ /dev/null @@ -1,67 +0,0 @@ ---U.A.ストロングブロッカー -function c34614289.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(1,34614289) - e1:SetCondition(c34614289.spcon) - e1:SetOperation(c34614289.spop) - c:RegisterEffect(e1) - --position change - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_DISABLE+CATEGORY_POSITION) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetTarget(c34614289.postg) - e2:SetOperation(c34614289.posop) - c:RegisterEffect(e2) -end -function c34614289.spfilter(c) - return c:IsFaceup() and c:IsSetCard(0xb2) and not c:IsCode(34614289) and c:IsAbleToHandAsCost() -end -function c34614289.spcon(e,c) - if c==nil then return true end - return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-1 - and Duel.IsExistingMatchingCard(c34614289.spfilter,c:GetControler(),LOCATION_MZONE,0,1,nil) -end -function c34614289.spop(e,tp,eg,ep,ev,re,r,rp,c) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g=Duel.SelectMatchingCard(tp,c34614289.spfilter,tp,LOCATION_MZONE,0,1,1,nil) - Duel.SendtoHand(g,nil,REASON_COST) -end -function c34614289.filter(c,sp) - return c:GetSummonPlayer()==sp -end -function c34614289.postg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return eg:IsExists(c34614289.filter,1,nil,1-tp) end - local g=eg:Filter(c34614289.filter,nil,1-tp) - Duel.SetTargetCard(g) - Duel.SetOperationInfo(0,CATEGORY_POSITION,g,g:GetCount(),0,0) - Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,g:GetCount(),0,0) -end -function c34614289.posop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) - Duel.ChangePosition(g,POS_FACEUP_DEFENCE,POS_FACEUP_DEFENCE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK) - local og=Duel.GetOperatedGroup() - local tc=og:GetFirst() - while tc do - Duel.NegateRelatedChain(tc,RESET_TURN_SET) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetValue(RESET_TURN_SET) - e2:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e2) - tc=og:GetNext() - end -end diff --git a/script/c34620088.lua b/script/c34620088.lua deleted file mode 100644 index 24741e5c21..0000000000 --- a/script/c34620088.lua +++ /dev/null @@ -1,46 +0,0 @@ ---ギミック・パペット-シャドー・フィーラー -function c34620088.initial_effect(c) - --battle indestructable - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e1:SetValue(1) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(34620088,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DAMAGE) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetRange(LOCATION_GRAVE) - e2:SetCode(EVENT_BATTLE_DAMAGE) - e2:SetCountLimit(1,34620088) - e2:SetCondition(c34620088.spcon) - e2:SetTarget(c34620088.sptg) - e2:SetOperation(c34620088.spop) - c:RegisterEffect(e2) - if not c34620088.global_check then - c34620088.global_check=true - local ge1=Effect.GlobalEffect() - ge1:SetType(EFFECT_TYPE_FIELD) - ge1:SetCode(EFFECT_TO_GRAVE_REDIRECT) - ge1:SetTargetRange(LOCATION_OVERLAY,LOCATION_OVERLAY) - ge1:SetTarget(aux.TargetBoolFunction(Card.IsCode,34620088)) - ge1:SetValue(LOCATION_REMOVED) - Duel.RegisterEffect(ge1,0) - end -end -function c34620088.spcon(e,tp,eg,ep,ev,re,r,rp) - return ep==tp and eg:GetFirst():IsControler(1-tp) and Duel.GetAttackTarget()==nil -end -function c34620088.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,0,0,tp,1000) -end -function c34620088.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP_ATTACK)~=0 then - Duel.Damage(tp,1000,REASON_EFFECT) - end -end diff --git a/script/c34627841.lua b/script/c34627841.lua deleted file mode 100644 index 634050f6a1..0000000000 --- a/script/c34627841.lua +++ /dev/null @@ -1,33 +0,0 @@ ---正義の味方 カイバーマン -function c34627841.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(34627841,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c34627841.spcost) - e1:SetTarget(c34627841.sptg) - e1:SetOperation(c34627841.spop) - c:RegisterEffect(e1) -end -function c34627841.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end -function c34627841.filter(c,e,tp) - return c:GetCode()==89631139 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c34627841.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsExistingMatchingCard(c34627841.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c34627841.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c34627841.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c34646691.lua b/script/c34646691.lua deleted file mode 100644 index 0708ae3b87..0000000000 --- a/script/c34646691.lua +++ /dev/null @@ -1,37 +0,0 @@ ---つまずき -function c34646691.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --pos - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(34646691,0)) - e2:SetCategory(CATEGORY_POSITION) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_SUMMON_SUCCESS) - e2:SetRange(LOCATION_SZONE) - e2:SetTarget(c34646691.target) - e2:SetOperation(c34646691.operation) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - c:RegisterEffect(e3) - local e4=e2:Clone() - e4:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e4) -end -function c34646691.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsRelateToEffect(e) end - Duel.SetTargetCard(eg) - Duel.SetOperationInfo(0,CATEGORY_POSITION,eg,eg:GetCount(),0,0) -end -function c34646691.filter(c,e) - return c:IsFaceup() and c:IsAttackPos() and c:IsRelateToEffect(e) -end -function c34646691.operation(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local g=eg:Filter(c34646691.filter,nil,e) - Duel.ChangePosition(g,POS_FACEUP_DEFENCE) -end diff --git a/script/c34659866.lua b/script/c34659866.lua deleted file mode 100644 index 4d6e390b03..0000000000 --- a/script/c34659866.lua +++ /dev/null @@ -1,27 +0,0 @@ ---ダークシー・レスキュー -function c34659866.initial_effect(c) - --draw - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(34659866,0)) - e1:SetCategory(CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_BE_MATERIAL) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCondition(c34659866.drcon) - e1:SetTarget(c34659866.drtg) - e1:SetOperation(c34659866.drop) - c:RegisterEffect(e1) -end -function c34659866.drcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsLocation(LOCATION_GRAVE) and r==REASON_SYNCHRO -end -function c34659866.drtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(1) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c34659866.drop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end diff --git a/script/c34664411.lua b/script/c34664411.lua deleted file mode 100644 index 6e32589d4a..0000000000 --- a/script/c34664411.lua +++ /dev/null @@ -1,64 +0,0 @@ ---幸運の鉄斧 -function c34664411.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c34664411.target) - e1:SetOperation(c34664411.operation) - c:RegisterEffect(e1) - --Atk,def - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(500) - c:RegisterEffect(e2) - --Equip limit - local e3=Effect.CreateEffect(c) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_EQUIP_LIMIT) - e3:SetValue(1) - c:RegisterEffect(e3) - --draw - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(34664411,0)) - e4:SetCategory(CATEGORY_DRAW) - e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e4:SetCode(EVENT_TO_GRAVE) - e4:SetCondition(c34664411.drcon) - e4:SetTarget(c34664411.drtg) - e4:SetOperation(c34664411.drop) - c:RegisterEffect(e4) -end -function c34664411.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c34664411.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,e:GetHandler(),tc) - end -end -function c34664411.drcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return bit.band(r,0x41)==0x41 and rp~=tp and c:GetPreviousControler()==tp - and c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousPosition(POS_FACEUP) -end -function c34664411.drtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(1) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c34664411.drop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end diff --git a/script/c34680482.lua b/script/c34680482.lua deleted file mode 100644 index 9aa97c52b7..0000000000 --- a/script/c34680482.lua +++ /dev/null @@ -1,86 +0,0 @@ ---マドルチェ・エンジェリー -function c34680482.initial_effect(c) - --to deck - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(34680482,0)) - e1:SetCategory(CATEGORY_TODECK) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCondition(c34680482.retcon) - e1:SetTarget(c34680482.rettg) - e1:SetOperation(c34680482.retop) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(34680482,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,34680482) - e2:SetCost(c34680482.spcost) - e2:SetTarget(c34680482.sptg) - e2:SetOperation(c34680482.spop) - c:RegisterEffect(e2) -end -function c34680482.retcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsReason(REASON_DESTROY) and e:GetHandler():GetReasonPlayer()~=tp - and e:GetHandler():GetPreviousControler()==tp -end -function c34680482.rettg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0) -end -function c34680482.retop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_EFFECT) - end -end -function c34680482.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end -function c34680482.filter(c,e,tp) - return c:IsSetCard(0x71) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c34680482.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsExistingMatchingCard(c34680482.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c34680482.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c34680482.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - local tc=g:GetFirst() - local c=e:GetHandler() - if tc then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - tc:RegisterFlagEffect(34680482,RESET_EVENT+0x1fe0000,0,1,Duel.GetTurnCount()) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e1:SetValue(1) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e2:SetCode(EVENT_PHASE+PHASE_END) - e2:SetLabel(Duel.GetTurnCount()) - e2:SetLabelObject(tc) - e2:SetCondition(c34680482.tdcon) - e2:SetOperation(c34680482.tdop) - e2:SetReset(RESET_PHASE+PHASE_END+RESET_SELF_TURN,2) - e2:SetCountLimit(1) - Duel.RegisterEffect(e2,tp) - end -end -function c34680482.tdcon(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetLabelObject() - return Duel.GetTurnCount()~=e:GetLabel() and Duel.GetTurnPlayer()==tp and tc:GetFlagEffectLabel(34680482)==e:GetLabel() -end -function c34680482.tdop(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetLabelObject() - Duel.Hint(HINT_CARD,0,34680482) - Duel.SendtoDeck(tc,nil,2,REASON_EFFECT) -end diff --git a/script/c34688023.lua b/script/c34688023.lua deleted file mode 100644 index 119ea97ae6..0000000000 --- a/script/c34688023.lua +++ /dev/null @@ -1,41 +0,0 @@ ---エッジインプ・ソウ -function c34688023.initial_effect(c) - --draw - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(34688023,0)) - e1:SetCategory(CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetCountLimit(1,34688023) - e1:SetCost(c34688023.cost) - e1:SetTarget(c34688023.target) - e1:SetOperation(c34688023.operation) - c:RegisterEffect(e1) -end -function c34688023.cfilter(c) - return c:IsSetCard(0xa9) and c:IsType(TYPE_MONSTER) and c:IsAbleToGraveAsCost() -end -function c34688023.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c34688023.cfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,c34688023.cfilter,1,1,REASON_COST) -end -function c34688023.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp,2) end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(2) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2) -end -function c34688023.operation(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - if Duel.Draw(p,d,REASON_EFFECT)<2 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,LOCATION_HAND,0,1,1,nil) - if g:GetCount()>0 then - Duel.BreakEffect() - if Duel.SelectOption(tp,aux.Stringid(34688023,1),aux.Stringid(34688023,2))==0 then - Duel.SendtoDeck(g,nil,0,REASON_EFFECT) - else - Duel.SendtoDeck(g,nil,1,REASON_EFFECT) - end - end -end diff --git a/script/c34694160.lua b/script/c34694160.lua deleted file mode 100644 index cedb14c395..0000000000 --- a/script/c34694160.lua +++ /dev/null @@ -1,42 +0,0 @@ ---真実の眼 -function c34694160.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - -- - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_PUBLIC) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(0,LOCATION_HAND) - c:RegisterEffect(e2) - --recover - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(34694160,0)) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e3:SetCategory(CATEGORY_RECOVER) - e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e3:SetCode(EVENT_PHASE+PHASE_STANDBY) - e3:SetRange(LOCATION_SZONE) - e3:SetCountLimit(1) - e3:SetCondition(c34694160.reccon) - e3:SetTarget(c34694160.rectg) - e3:SetOperation(c34694160.recop) - c:RegisterEffect(e3) -end -function c34694160.reccon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp and Duel.IsExistingMatchingCard(Card.IsType,tp,0,LOCATION_HAND,1,nil,TYPE_SPELL) -end -function c34694160.rectg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(1000) - Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,1-tp,1000) -end -function c34694160.recop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Recover(p,d,REASON_EFFECT) -end diff --git a/script/c34707034.lua b/script/c34707034.lua deleted file mode 100644 index e6bd231ef8..0000000000 --- a/script/c34707034.lua +++ /dev/null @@ -1,80 +0,0 @@ ---アビスコール -function c34707034.initial_effect(c) - --activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_END_PHASE) - e1:SetTarget(c34707034.target) - e1:SetOperation(c34707034.operation) - c:RegisterEffect(e1) -end -function c34707034.filter(c,e,tp) - return c:IsSetCard(0x74) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c34707034.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c34707034.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>2 - and Duel.IsExistingTarget(c34707034.filter,tp,LOCATION_GRAVE,0,3,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c34707034.filter,tp,LOCATION_GRAVE,0,3,3,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,3,0,0) -end -function c34707034.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) - if g:GetCount()==0 then return end - if Duel.GetLocationCount(tp,LOCATION_MZONE)0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c34796454.spop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP) -end diff --git a/script/c34815282.lua b/script/c34815282.lua deleted file mode 100644 index 4f844f0b46..0000000000 --- a/script/c34815282.lua +++ /dev/null @@ -1,66 +0,0 @@ ---ミニチュアライズ -function c34815282.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP+0x1c0) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCondition(c34815282.condition) - e1:SetTarget(c34815282.target) - e1:SetOperation(c34815282.operation) - c:RegisterEffect(e1) - --Destroy - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e2:SetRange(LOCATION_SZONE) - e2:SetCode(EVENT_LEAVE_FIELD) - e2:SetCondition(c34815282.descon) - e2:SetOperation(c34815282.desop) - c:RegisterEffect(e2) -end -function c34815282.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end -function c34815282.filter(c) - return c:IsFaceup() and c:GetBaseAttack()>1000 and c:GetLevel()>0 -end -function c34815282.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c34815282.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c34815282.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c34815282.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) -end -function c34815282.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsRelateToEffect(e) then - c:SetCardTarget(tc) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_OWNER_RELATE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(-1000) - e1:SetCondition(c34815282.rcon) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1,true) - local e2=e1:Clone() - e2:SetCode(EFFECT_UPDATE_LEVEL) - e2:SetValue(-1) - tc:RegisterEffect(e2,true) - end -end -function c34815282.rcon(e) - return e:GetOwner():IsHasCardTarget(e:GetHandler()) -end -function c34815282.descon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsStatus(STATUS_DESTROY_CONFIRMED) then return false end - local tc=c:GetFirstCardTarget() - return tc and eg:IsContains(tc) -end -function c34815282.desop(e,tp,eg,ep,ev,re,r,rp) - Duel.Destroy(e:GetHandler(),REASON_EFFECT) -end diff --git a/script/c34822850.lua b/script/c34822850.lua deleted file mode 100644 index 6a56b80857..0000000000 --- a/script/c34822850.lua +++ /dev/null @@ -1,70 +0,0 @@ ---煉獄の氾爛 -function c34822850.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetRange(LOCATION_FZONE) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) - e2:SetCountLimit(1) - e2:SetCondition(c34822850.spcon) - e2:SetTarget(c34822850.sptg) - e2:SetOperation(c34822850.spop) - c:RegisterEffect(e2) - -- - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetRange(LOCATION_FZONE) - e3:SetTargetRange(LOCATION_HAND+LOCATION_GRAVE,0) - e3:SetTarget(c34822850.efftg) - e3:SetCode(34822850) - c:RegisterEffect(e3) - --cannot be target - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_FIELD) - e4:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET) - e4:SetRange(LOCATION_FZONE) - e4:SetTargetRange(0,LOCATION_MZONE) - e4:SetValue(c34822850.atlimit) - c:RegisterEffect(e4) - local e5=e4:Clone() - e5:SetCode(EFFECT_CANNOT_SELECT_EFFECT_TARGET) - e5:SetProperty(EFFECT_FLAG_SET_AVAILABLE) - e5:SetTargetRange(0,0xff) - e5:SetValue(c34822850.tglimit) - c:RegisterEffect(e5) -end -function c34822850.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c34822850.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsPlayerCanSpecialSummonMonster(tp,34822851,0xbb,0x4011,0,0,1,RACE_FIEND,ATTRIBUTE_FIRE) end - Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0) -end -function c34822850.spop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) - or Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 - or not Duel.IsPlayerCanSpecialSummonMonster(tp,34822851,0xbb,0x4011,0,0,1,RACE_FIEND,ATTRIBUTE_FIRE) then return end - local token=Duel.CreateToken(tp,34822851) - Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP) -end -function c34822850.efftg(e,c) - return c:IsSetCard(0xbb) -end -function c34822850.filter(c,lv) - return c:IsFaceup() and c:IsSetCard(0xbb) and c:GetLevel()>lv -end -function c34822850.atlimit(e,c) - return c:IsFaceup() and c:IsSetCard(0xbb) and Duel.IsExistingMatchingCard(c34822850.filter,c:GetControler(),LOCATION_MZONE,0,1,nil,c:GetLevel()) -end -function c34822850.tglimit(e,re,c) - return c:IsControler(e:GetHandlerPlayer()) and c:IsLocation(LOCATION_MZONE) and c:IsFaceup() and c:IsSetCard(0xbb) - and Duel.IsExistingMatchingCard(c34822850.filter,c:GetControler(),LOCATION_MZONE,0,1,nil,c:GetLevel()) -end diff --git a/script/c34830502.lua b/script/c34830502.lua deleted file mode 100644 index debb71295d..0000000000 --- a/script/c34830502.lua +++ /dev/null @@ -1,72 +0,0 @@ ---アルティメット・インセクト LV5 -function c34830502.initial_effect(c) - --atk down - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(0,LOCATION_MZONE) - e1:SetCondition(c34830502.con) - e1:SetValue(-500) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(34830502,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) - e2:SetCondition(c34830502.spcon) - e2:SetCost(c34830502.spcost) - e2:SetTarget(c34830502.sptg) - e2:SetOperation(c34830502.spop) - c:RegisterEffect(e2) - --reg - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e3:SetCode(EVENT_SUMMON_SUCCESS) - e3:SetOperation(c34830502.regop) - c:RegisterEffect(e3) - local e4=e3:Clone() - e4:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e4) - local e5=e3:Clone() - e5:SetCode(EVENT_FLIP) - c:RegisterEffect(e5) -end -c34830502.lvupcount=2 -c34830502.lvup={34088136,19877898} -c34830502.lvdncount=2 -c34830502.lvdn={49441499,34088136} -function c34830502.con(e) - return e:GetHandler():GetFlagEffect(34830502)~=0 -end -function c34830502.regop(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():RegisterFlagEffect(34830503,RESET_EVENT+0x1ec0000+RESET_PHASE+RESET_END,0,1) -end -function c34830502.spcon(e,tp,eg,ep,ev,re,r,rp) - return tp==Duel.GetTurnPlayer() and e:GetHandler():GetFlagEffect(34830503)==0 -end -function c34830502.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end -function c34830502.spfilter(c,e,tp) - return c:IsCode(19877898) and c:IsCanBeSpecialSummoned(e,0,tp,true,true) -end -function c34830502.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsExistingMatchingCard(c34830502.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) -end -function c34830502.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c34830502.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp) - local tc=g:GetFirst() - if tc then - Duel.SpecialSummon(tc,0,tp,tp,true,true,POS_FACEUP) - tc:RegisterFlagEffect(19877898,RESET_EVENT+0x16e0000,0,0) - tc:CompleteProcedure() - end -end diff --git a/script/c34834619.lua b/script/c34834619.lua deleted file mode 100644 index de4960c864..0000000000 --- a/script/c34834619.lua +++ /dev/null @@ -1,49 +0,0 @@ ---光子竜降臨 -function c34834619.initial_effect(c) - aux.AddRitualProcEqual(c,aux.FilterBoolFunction(Card.IsCode,85346853)) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(34834619,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_GRAVE) - e1:SetCost(c34834619.spcost) - e1:SetTarget(c34834619.sptg) - e1:SetOperation(c34834619.spop) - c:RegisterEffect(e1) -end -function c34834619.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) -end -function c34834619.mtfilter(c,e) - return c:GetLevel()>0 and c:IsAbleToRemove() and not c:IsImmuneToEffect(e) -end -function c34834619.spfilter(c,e,tp,m) - return c:IsCode(85346853) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,true,false) - and m:CheckWithSumEqual(Card.GetRitualLevel,4,1,99,c) -end -function c34834619.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return false end - local mg=Duel.GetMatchingGroup(c34834619.mtfilter,tp,LOCATION_GRAVE,0,e:GetHandler(),e) - return Duel.IsExistingMatchingCard(c34834619.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp,mg) - end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c34834619.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local mg=Duel.GetMatchingGroup(c34834619.mtfilter,tp,LOCATION_GRAVE,0,nil,e) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c34834619.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp,mg) - local tc=g:GetFirst() - if tc then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local mat=mg:SelectWithSumEqual(tp,Card.GetRitualLevel,4,1,99,tc) - tc:SetMaterial(mat) - Duel.ReleaseRitualMaterial(mat) - Duel.BreakEffect() - Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,true,false,POS_FACEUP) - tc:CompleteProcedure() - end -end diff --git a/script/c34838437.lua b/script/c34838437.lua deleted file mode 100644 index 5e9f88da12..0000000000 --- a/script/c34838437.lua +++ /dev/null @@ -1,46 +0,0 @@ ---アクセル・ライト -function c34838437.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,34838437+EFFECT_COUNT_CODE_OATH) - e1:SetCondition(c34838437.condition) - e1:SetCost(c34838437.cost) - e1:SetTarget(c34838437.target) - e1:SetOperation(c34838437.activate) - c:RegisterEffect(e1) -end -function c34838437.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 -end -function c34838437.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_NORMALSUMMON)==0 end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) - e1:SetCode(EFFECT_CANNOT_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) - e1:SetTargetRange(1,0) - Duel.RegisterEffect(e1,tp) - local e2=e1:Clone() - e2:SetCode(EFFECT_CANNOT_MSET) - Duel.RegisterEffect(e2,tp) -end -function c34838437.spfilter(c,e,tp) - return c:IsLevelBelow(4) and (c:IsSetCard(0x55) or c:IsSetCard(0x7b)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c34838437.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c34838437.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c34838437.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c34838437.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c34853266.lua b/script/c34853266.lua deleted file mode 100644 index 2851d90ee9..0000000000 --- a/script/c34853266.lua +++ /dev/null @@ -1,86 +0,0 @@ ---月読命 -function c34853266.initial_effect(c) - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(aux.FALSE) - c:RegisterEffect(e1) - --summon,flip - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(34853266,0)) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetCode(EVENT_SUMMON_SUCCESS) - e2:SetOperation(c34853266.retreg) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EVENT_FLIP) - c:RegisterEffect(e3) - --pos - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(34853266,1)) - e4:SetCategory(CATEGORY_POSITION) - e4:SetProperty(EFFECT_FLAG_CARD_TARGET) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e4:SetCode(EVENT_SUMMON_SUCCESS) - e4:SetTarget(c34853266.postg) - e4:SetOperation(c34853266.posop) - c:RegisterEffect(e4) - local e5=e4:Clone() - e5:SetCode(EVENT_FLIP) - c:RegisterEffect(e5) -end -function c34853266.filter(c) - return c:IsFaceup() and c:IsCanTurnSet() -end -function c34853266.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:GetLocation()==LOCATION_MZONE and c34853266.filter(chkc) end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - local g=Duel.SelectTarget(tp,c34853266.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_POSITION,g,g:GetCount(),0,0) -end -function c34853266.posop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.ChangePosition(tc,POS_FACEDOWN_DEFENCE) - end -end -function c34853266.retreg(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - --to hand - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetDescription(aux.Stringid(34853266,0)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetReset(RESET_EVENT+0x1ee0000+RESET_PHASE+PHASE_END) - e1:SetCondition(c34853266.retcon) - e1:SetTarget(c34853266.rettg) - e1:SetOperation(c34853266.retop) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - c:RegisterEffect(e2) -end -function c34853266.retcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsHasEffect(EFFECT_SPIRIT_DONOT_RETURN) then return false end - if e:IsHasType(EFFECT_TYPE_TRIGGER_F) then - return not c:IsHasEffect(EFFECT_SPIRIT_MAYNOT_RETURN) - else return c:IsHasEffect(EFFECT_SPIRIT_MAYNOT_RETURN) end -end -function c34853266.rettg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0) -end -function c34853266.retop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - Duel.SendtoHand(c,nil,REASON_EFFECT) - end -end diff --git a/script/c34898052.lua b/script/c34898052.lua deleted file mode 100644 index 90b5b4e351..0000000000 --- a/script/c34898052.lua +++ /dev/null @@ -1,49 +0,0 @@ ---牙竜咆哮 -function c34898052.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(34898052,0)) - e1:SetCategory(CATEGORY_TODECK) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_END_PHASE) - e1:SetCost(c34898052.cost) - e1:SetTarget(c34898052.target) - e1:SetOperation(c34898052.activate) - c:RegisterEffect(e1) -end -function c34898052.rfilter(c,att) - return c:IsAttribute(att) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost() -end -function c34898052.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c34898052.rfilter,tp,LOCATION_GRAVE,0,1,nil,ATTRIBUTE_EARTH) - and Duel.IsExistingMatchingCard(c34898052.rfilter,tp,LOCATION_GRAVE,0,1,nil,ATTRIBUTE_WATER) - and Duel.IsExistingMatchingCard(c34898052.rfilter,tp,LOCATION_GRAVE,0,1,nil,ATTRIBUTE_FIRE) - and Duel.IsExistingMatchingCard(c34898052.rfilter,tp,LOCATION_GRAVE,0,1,nil,ATTRIBUTE_WIND) - end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c34898052.rfilter,tp,LOCATION_GRAVE,0,1,1,nil,ATTRIBUTE_EARTH) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g1=Duel.SelectMatchingCard(tp,c34898052.rfilter,tp,LOCATION_GRAVE,0,1,1,nil,ATTRIBUTE_WATER) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g2=Duel.SelectMatchingCard(tp,c34898052.rfilter,tp,LOCATION_GRAVE,0,1,1,nil,ATTRIBUTE_FIRE) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g3=Duel.SelectMatchingCard(tp,c34898052.rfilter,tp,LOCATION_GRAVE,0,1,1,nil,ATTRIBUTE_WIND) - g:Merge(g1) - g:Merge(g2) - g:Merge(g3) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c34898052.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end - local g=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0) -end -function c34898052.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,e:GetHandler()) - if g:GetCount()>0 then - Duel.HintSelection(g) - Duel.SendtoDeck(g,nil,2,REASON_EFFECT) - end -end diff --git a/script/c34906152.lua b/script/c34906152.lua deleted file mode 100644 index 54b57d8d36..0000000000 --- a/script/c34906152.lua +++ /dev/null @@ -1,35 +0,0 @@ ---マスドライバー -function c34906152.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --damage - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(34906152,0)) - e2:SetCategory(CATEGORY_DAMAGE) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_SZONE) - e2:SetCost(c34906152.damcost) - e2:SetTarget(c34906152.damtg) - e2:SetOperation(c34906152.damop) - c:RegisterEffect(e2) -end -function c34906152.damcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,nil,1,nil) end - local g=Duel.SelectReleaseGroup(tp,aux.TRUE,1,1,nil) - Duel.Release(g,REASON_COST) -end -function c34906152.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(400) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,400) -end -function c34906152.damop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c3492538.lua b/script/c3492538.lua deleted file mode 100644 index 704d9a874e..0000000000 --- a/script/c3492538.lua +++ /dev/null @@ -1,44 +0,0 @@ ---火器付機甲鎧 -function c3492538.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c3492538.target) - e1:SetOperation(c3492538.operation) - c:RegisterEffect(e1) - --Atk up - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(700) - c:RegisterEffect(e2) - --Equip limit - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetCode(EFFECT_EQUIP_LIMIT) - e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e4:SetValue(c3492538.eqlimit) - c:RegisterEffect(e4) -end -function c3492538.eqlimit(e,c) - return c:IsRace(RACE_INSECT) -end -function c3492538.filter(c) - return c:IsFaceup() and c:IsRace(RACE_INSECT) -end -function c3492538.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c3492538.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c3492538.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c3492538.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c3492538.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,e:GetHandler(),tc) - end -end diff --git a/script/c3493058.lua b/script/c3493058.lua deleted file mode 100644 index 11ec5f8df4..0000000000 --- a/script/c3493058.lua +++ /dev/null @@ -1,35 +0,0 @@ ---サイコロン -function c3493058.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE+CATEGORY_DICE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_END_PHASE) - e1:SetTarget(c3493058.target) - e1:SetOperation(c3493058.activate) - c:RegisterEffect(e1) -end -function c3493058.filter(c) - return c:IsDestructable() and c:IsType(TYPE_SPELL+TYPE_TRAP) -end -function c3493058.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chk==0 then return Duel.IsExistingMatchingCard(c3493058.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end - Duel.SetOperationInfo(0,CATEGORY_DICE,nil,0,tp,1) -end -function c3493058.activate(e,tp,eg,ep,ev,re,r,rp) - local dc=Duel.TossDice(tp,1) - if dc==1 or dc==6 then - Duel.Damage(tp,1000,REASON_EFFECT) - elseif dc==5 then - local g=Duel.GetMatchingGroup(c3493058.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler()) - if g:GetCount()<2 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local dg=g:Select(tp,2,2,nil) - Duel.Destroy(dg,REASON_EFFECT) - else - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectMatchingCard(tp,c3493058.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,e:GetHandler()) - Duel.Destroy(g,REASON_EFFECT) - end -end diff --git a/script/c3493978.lua b/script/c3493978.lua deleted file mode 100644 index ab46872e62..0000000000 --- a/script/c3493978.lua +++ /dev/null @@ -1,32 +0,0 @@ ---首領亀 -function c3493978.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(3493978,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c3493978.target) - e1:SetOperation(c3493978.operation) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - c:RegisterEffect(e2) -end -function c3493978.filter(c,e,tp) - return c:IsCode(3493978) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c3493978.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c3493978.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c3493978.operation(e,tp,eg,ep,ev,re,r,rp) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ft<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c3493978.filter,tp,LOCATION_HAND,0,1,ft,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c34945480.lua b/script/c34945480.lua deleted file mode 100644 index f909bf3a00..0000000000 --- a/script/c34945480.lua +++ /dev/null @@ -1,68 +0,0 @@ ---外神アザトート -function c34945480.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,5,3,c34945480.ovfilter,aux.Stringid(34945480,1)) - c:EnableReviveLimit() - -- - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL) - e1:SetValue(1) - c:RegisterEffect(e1) - --summon success - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetCondition(c34945480.sumcon) - e2:SetOperation(c34945480.sumsuc) - c:RegisterEffect(e2) - --destroy - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(34945480,0)) - e3:SetCategory(CATEGORY_DESTROY) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_MZONE) - e3:SetCondition(c34945480.condition) - e3:SetCost(c34945480.cost) - e3:SetTarget(c34945480.target) - e3:SetOperation(c34945480.operation) - c:RegisterEffect(e3) -end -function c34945480.ovfilter(c) - return c:IsFaceup() and c:IsSetCard(0xb6) and c:IsType(TYPE_XYZ) -end -function c34945480.sumcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_XYZ -end -function c34945480.sumsuc(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetTargetRange(0,1) - e1:SetValue(c34945480.actlimit) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function c34945480.actlimit(e,re,tp) - return re:IsActiveType(TYPE_MONSTER) -end -function c34945480.condition(e,tp,eg,ep,ev,re,r,rp) - local g=e:GetHandler():GetOverlayGroup() - return g:IsExists(Card.IsType,1,nil,TYPE_FUSION) and g:IsExists(Card.IsType,1,nil,TYPE_SYNCHRO) - and g:IsExists(Card.IsType,1,nil,TYPE_XYZ) -end -function c34945480.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c34945480.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDestructable,tp,0,LOCATION_ONFIELD,1,nil) end - local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,0,LOCATION_ONFIELD,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c34945480.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,0,LOCATION_ONFIELD,nil) - Duel.Destroy(g,REASON_EFFECT) -end diff --git a/script/c34961968.lua b/script/c34961968.lua deleted file mode 100644 index 8b6e71a7f8..0000000000 --- a/script/c34961968.lua +++ /dev/null @@ -1,42 +0,0 @@ ---幻獣サンダーペガス -function c34961968.initial_effect(c) - --indes - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(34961968,0)) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetRange(LOCATION_GRAVE) - e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetCondition(c34961968.condition) - e1:SetCost(c34961968.cost) - e1:SetTarget(c34961968.target) - e1:SetOperation(c34961968.operation) - c:RegisterEffect(e1) -end -function c34961968.condition(e,tp,eg,ep,ev,re,r,rp) - return eg:GetFirst():IsControler(1-tp) -end -function c34961968.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) -end -function c34961968.filter(c) - return c:IsFaceup() and c:IsSetCard(0x1b) -end -function c34961968.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c34961968.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c34961968.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(34961968,1)) - Duel.SelectTarget(tp,c34961968.filter,tp,LOCATION_MZONE,0,1,1,nil) -end -function c34961968.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e1:SetValue(1) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - end -end diff --git a/script/c34968834.lua b/script/c34968834.lua deleted file mode 100644 index aca6fcdc07..0000000000 --- a/script/c34968834.lua +++ /dev/null @@ -1,54 +0,0 @@ ---暗黒界の鬼神 ケルト -function c34968834.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(34968834,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCondition(c34968834.spcon) - e1:SetTarget(c34968834.sptg) - e1:SetOperation(c34968834.spop) - c:RegisterEffect(e1) -end -function c34968834.spcon(e,tp,eg,ep,ev,re,r,rp) - e:SetLabel(e:GetHandler():GetPreviousControler()) - return e:GetHandler():IsPreviousLocation(LOCATION_HAND) and bit.band(r,0x4040)==0x4040 -end -function c34968834.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c34968834.filter(c,e,tp) - return c:IsRace(RACE_FIEND) - and ((Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false)) - or (Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,1-tp))) -end -function c34968834.spop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - if Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP)==0 then return end - if rp~=tp and tp==e:GetLabel() and Duel.IsExistingMatchingCard(c34968834.filter,tp,LOCATION_DECK,0,1,nil,e,tp) - and Duel.SelectYesNo(tp,aux.Stringid(34968834,1)) then - Duel.BreakEffect() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c34968834.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - local tc=g:GetFirst() - if tc then - local b1=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and tc:IsCanBeSpecialSummoned(e,0,tp,false,false) - local b2=Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0 and tc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,1-tp) - local op=0 - if b1 and b2 then - op=Duel.SelectOption(tp,aux.Stringid(34968834,2),aux.Stringid(34968834,3)) - elseif b1 then - op=Duel.SelectOption(tp,aux.Stringid(34968834,2)) - elseif b2 then - op=Duel.SelectOption(tp,aux.Stringid(34968834,3))+1 - else return end - if op==0 then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - else - Duel.SpecialSummon(tc,0,tp,1-tp,false,false,POS_FACEUP) - end - end - end -end diff --git a/script/c35011819.lua b/script/c35011819.lua deleted file mode 100644 index 883f913c58..0000000000 --- a/script/c35011819.lua +++ /dev/null @@ -1,64 +0,0 @@ ---エンペラー・オーダー -function c35011819.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c35011819.target1) - e1:SetOperation(c35011819.activate1) - c:RegisterEffect(e1) - --instant - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(35011819,0)) - e2:SetCategory(CATEGORY_NEGATE+CATEGORY_DRAW) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetRange(LOCATION_SZONE) - e2:SetCode(EVENT_CHAINING) - e2:SetCondition(c35011819.condition2) - e2:SetTarget(c35011819.target2) - e2:SetOperation(c35011819.activate2) - c:RegisterEffect(e2) -end -function c35011819.target1(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - e:SetLabel(0) - local ct=Duel.GetCurrentChain() - if ct==1 then return end - local ct=Duel.GetCurrentChain() - local te=Duel.GetChainInfo(ct-1,CHAININFO_TRIGGERING_EFFECT) - local tc=te:GetHandler() - if te:GetCode()==EVENT_SUMMON_SUCCESS and te:IsActiveType(TYPE_MONSTER) and Duel.IsChainNegatable(ct-1) - and Duel.IsPlayerCanDraw(tc:GetControler(),1) and Duel.SelectYesNo(tp,aux.Stringid(35011819,1)) then - e:SetLabel(1) - Duel.SetOperationInfo(0,CATEGORY_NEGATE,tc,1,0,0) - Duel.SetTargetPlayer(tc:GetControler()) - Duel.SetTargetParam(1) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tc:GetControler(),1) - e:GetHandler():RegisterFlagEffect(0,RESET_CHAIN,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(35011819,2)) - end -end -function c35011819.activate1(e,tp,eg,ep,ev,re,r,rp) - if e:GetLabel()~=1 then return end - local c=e:GetHandler() - if not c:IsRelateToEffect(e) then return end - local ct=Duel.GetChainInfo(0,CHAININFO_CHAIN_COUNT) - Duel.NegateActivation(ct-1) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end -function c35011819.condition2(e,tp,eg,ep,ev,re,r,rp) - return re:IsActiveType(TYPE_MONSTER) and re:GetCode()==EVENT_SUMMON_SUCCESS and Duel.IsChainNegatable(ev) -end -function c35011819.target2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(rp,1) end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - Duel.SetTargetPlayer(rp) - Duel.SetTargetParam(1) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,rp,1) -end -function c35011819.activate2(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - Duel.NegateActivation(ev) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end diff --git a/script/c35014241.lua b/script/c35014241.lua deleted file mode 100644 index 1588d40a50..0000000000 --- a/script/c35014241.lua +++ /dev/null @@ -1,52 +0,0 @@ ---リミットオーバー・ドライブ -function c35014241.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,35014241+EFFECT_COUNT_CODE_OATH) - e1:SetCost(c35014241.cost) - e1:SetTarget(c35014241.target) - e1:SetOperation(c35014241.activate) - c:RegisterEffect(e1) -end -function c35014241.cfilter1(c,e,tp) - return c:IsFaceup() and c:IsType(TYPE_SYNCHRO) and c:IsType(TYPE_TUNER) and c:IsAbleToExtraAsCost() - and Duel.IsExistingMatchingCard(c35014241.cfilter2,tp,LOCATION_MZONE,0,1,nil,e,tp,c) -end -function c35014241.cfilter2(c,e,tp,tc) - return c:IsFaceup() and c:IsType(TYPE_SYNCHRO) and not c:IsType(TYPE_TUNER) and c:IsAbleToExtraAsCost() - and Duel.IsExistingMatchingCard(c35014241.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c:GetLevel()+tc:GetLevel()) -end -function c35014241.spfilter(c,e,tp,lv) - return c:IsType(TYPE_SYNCHRO) and c:GetLevel()==lv and c:IsCanBeSpecialSummoned(e,0,tp,true,false) -end -function c35014241.cost(e,tp,eg,ep,ev,re,r,rp,chk) - e:SetLabel(1) - if chk==0 then return Duel.IsExistingMatchingCard(c35014241.cfilter1,tp,LOCATION_MZONE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g1=Duel.SelectMatchingCard(tp,c35014241.cfilter1,tp,LOCATION_MZONE,0,1,1,nil,e,tp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g2=Duel.SelectMatchingCard(tp,c35014241.cfilter2,tp,LOCATION_MZONE,0,1,1,nil,e,tp,g1:GetFirst()) - e:SetLabel(g1:GetFirst():GetLevel()+g2:GetFirst():GetLevel()) - g1:Merge(g2) - Duel.SendtoDeck(g1,nil,0,REASON_COST) -end -function c35014241.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - if e:GetLabel()~=1 then return false end - e:SetLabel(0) - return Duel.GetLocationCount(tp,LOCATION_MZONE)>-2 - end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function c35014241.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local lv=e:GetLabel() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c35014241.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,lv) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP) - end -end diff --git a/script/c35027493.lua b/script/c35027493.lua deleted file mode 100644 index 5a40292833..0000000000 --- a/script/c35027493.lua +++ /dev/null @@ -1,81 +0,0 @@ ---魔のデッキ破壊ウイルス -function c35027493.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_TOHAND+0x1c0) - e1:SetCost(c35027493.cost) - e1:SetTarget(c35027493.target) - e1:SetOperation(c35027493.activate) - c:RegisterEffect(e1) -end -function c35027493.costfilter(c) - return c:IsAttribute(ATTRIBUTE_DARK) and c:IsAttackAbove(2000) -end -function c35027493.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,c35027493.costfilter,1,nil) end - local g=Duel.SelectReleaseGroup(tp,c35027493.costfilter,1,1,nil) - Duel.Release(g,REASON_COST) -end -function c35027493.tgfilter(c) - return c:IsFaceup() and c:IsAttackBelow(1500) and c:IsDestructable() -end -function c35027493.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local g=Duel.GetMatchingGroup(c35027493.tgfilter,tp,0,LOCATION_MZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c35027493.filter(c) - return c:IsType(TYPE_MONSTER) and c:IsAttackBelow(1500) -end -function c35027493.activate(e,tp,eg,ep,ev,re,r,rp) - local conf=Duel.GetFieldGroup(tp,0,LOCATION_MZONE+LOCATION_HAND) - if conf:GetCount()>0 then - Duel.ConfirmCards(tp,conf) - local dg=conf:Filter(c35027493.filter,nil) - Duel.Destroy(dg,REASON_EFFECT) - Duel.ShuffleHand(1-tp) - end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetProperty(EFFECT_FLAG_DELAY) - e1:SetCode(EVENT_DRAW) - e1:SetOperation(c35027493.desop) - e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN,3) - Duel.RegisterEffect(e1,tp) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_PHASE+PHASE_END) - e2:SetCountLimit(1) - e2:SetCondition(c35027493.turncon) - e2:SetOperation(c35027493.turnop) - e2:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN,3) - Duel.RegisterEffect(e2,tp) - e2:SetLabelObject(e1) - e:GetHandler():RegisterFlagEffect(1082946,RESET_PHASE+PHASE_END+RESET_OPPO_TURN,0,3) - c35027493[e:GetHandler()]=e2 -end -function c35027493.desop(e,tp,eg,ep,ev,re,r,rp) - if ep==e:GetOwnerPlayer() then return end - local hg=eg:Filter(Card.IsLocation,nil,LOCATION_HAND) - if hg:GetCount()==0 then return end - Duel.ConfirmCards(1-ep,hg) - local dg=hg:Filter(c35027493.filter,nil) - Duel.Destroy(dg,REASON_EFFECT) - Duel.ShuffleHand(ep) -end -function c35027493.turncon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp -end -function c35027493.turnop(e,tp,eg,ep,ev,re,r,rp) - local ct=e:GetLabel() - ct=ct+1 - e:SetLabel(ct) - e:GetHandler():SetTurnCounter(ct) - if ct==3 then - e:GetLabelObject():Reset() - e:GetOwner():ResetFlagEffect(1082946) - end -end diff --git a/script/c35035481.lua b/script/c35035481.lua deleted file mode 100644 index 4fc81dea1b..0000000000 --- a/script/c35035481.lua +++ /dev/null @@ -1,82 +0,0 @@ ---버제스토마 올레노이데스 -function c35035481.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c35035481.target) - e1:SetOperation(c35035481.activate) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_CHAINING) - e2:SetRange(LOCATION_GRAVE) - e2:SetCondition(c35035481.spcon) - e2:SetTarget(c35035481.sptg) - e2:SetOperation(c35035481.spop) - c:RegisterEffect(e2) -end -function c35035481.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable() -end -function c35035481.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and c35035481.filter(chkc) and chkc~=e:GetHandler() end - if chk==0 then return Duel.IsExistingTarget(c35035481.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c35035481.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c35035481.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end -function c35035481.spcon(e,tp,eg,ep,ev,re,r,rp) - return re:IsActiveType(TYPE_TRAP) and re:IsHasType(EFFECT_TYPE_ACTIVATE) -end -function c35035481.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:GetFlagEffect(35035481)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsPlayerCanSpecialSummonMonster(tp,35035481,0xd4,0x11,1200,0,2,RACE_AQUA,ATTRIBUTE_WATER) end - c:RegisterFlagEffect(35035481,RESET_CHAIN,0,1) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0) -end -function c35035481.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local c=e:GetHandler() - if c:IsRelateToEffect(e) - and Duel.IsPlayerCanSpecialSummonMonster(tp,35035481,0xd4,0x11,1200,0,2,RACE_AQUA,ATTRIBUTE_WATER) then - c:SetStatus(STATUS_NO_LEVEL,false) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CHANGE_TYPE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetValue(TYPE_NORMAL+TYPE_MONSTER) - e1:SetReset(RESET_EVENT+0x47c0000) - c:RegisterEffect(e1,true) - Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_IMMUNE_EFFECT) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetValue(c35035481.efilter) - e2:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e3:SetReset(RESET_EVENT+0x47e0000) - e3:SetValue(LOCATION_REMOVED) - c:RegisterEffect(e3,true) - end -end -function c35035481.efilter(e,re) - return re:IsActiveType(TYPE_MONSTER) -end diff --git a/script/c35037880.lua b/script/c35037880.lua deleted file mode 100644 index c1aa43ce6f..0000000000 --- a/script/c35037880.lua +++ /dev/null @@ -1,40 +0,0 @@ ---セイバー・リフレクト -function c35037880.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DAMAGE+CATEGORY_RECOVER) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_DAMAGE) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e1:SetCountLimit(1,35037880+EFFECT_COUNT_CODE_OATH) - e1:SetCondition(c35037880.condition) - e1:SetTarget(c35037880.target) - e1:SetOperation(c35037880.operation) - c:RegisterEffect(e1) -end -function c35037880.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x100d) -end -function c35037880.condition(e,tp,eg,ep,ev,re,r,rp) - return ep==tp and Duel.IsExistingMatchingCard(c35037880.cfilter,tp,LOCATION_MZONE,0,1,nil) -end -function c35037880.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,ev) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,ev) -end -function c35037880.filter(c) - return ((c:IsSetCard(0xd) and c:IsType(TYPE_SPELL+TYPE_TRAP)) or c:IsSetCard(0xb0)) and c:IsAbleToHand() -end -function c35037880.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.Recover(tp,ev,REASON_EFFECT) - Duel.Damage(1-tp,ev,REASON_EFFECT) - local g=Duel.GetMatchingGroup(c35037880.filter,tp,LOCATION_DECK,0,nil) - if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(35037880,0)) then - Duel.BreakEffect() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local sg=g:Select(tp,1,1,nil) - Duel.SendtoHand(sg,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,sg) - end -end diff --git a/script/c35050257.lua b/script/c35050257.lua deleted file mode 100644 index 603dc1978c..0000000000 --- a/script/c35050257.lua +++ /dev/null @@ -1,48 +0,0 @@ ---サイバー・ラーバァ -function c35050257.initial_effect(c) - --avoid battle damage - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(35050257,0)) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_BE_BATTLE_TARGET) - e1:SetOperation(c35050257.op1) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(35050257,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_BATTLE_DESTROYED) - e2:SetCondition(c35050257.condition) - e2:SetTarget(c35050257.target) - e2:SetOperation(c35050257.operation) - c:RegisterEffect(e2) -end -function c35050257.op1(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_AVOID_BATTLE_DAMAGE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetTargetRange(1,0) - e1:SetValue(1) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function c35050257.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) -end -function c35050257.filter(c,e,tp) - return c:IsCode(35050257) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c35050257.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c35050257.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c35050257.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local tc=Duel.GetFirstMatchingCard(c35050257.filter,tp,LOCATION_DECK,0,nil,e,tp) - if tc then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c35059553.lua b/script/c35059553.lua deleted file mode 100644 index 350b07c943..0000000000 --- a/script/c35059553.lua +++ /dev/null @@ -1,44 +0,0 @@ ---カイザーコロシアム -function c35059553.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --mzone limit - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetRange(LOCATION_SZONE) - e2:SetCode(EFFECT_MAX_MZONE) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetTargetRange(0,1) - e2:SetValue(c35059553.value) - c:RegisterEffect(e2) - --advance summon limit - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetRange(LOCATION_SZONE) - e3:SetCode(EFFECT_UNRELEASABLE_SUM) - e3:SetTargetRange(LOCATION_MZONE,0) - e3:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_IMMUNE) - e3:SetValue(c35059553.sumlimit) - c:RegisterEffect(e3) -end -function c35059553.value(e,fp,rp,r) - if rp==e:GetHandlerPlayer() or r~=LOCATION_REASON_TOFIELD then return 5 end - local limit=Duel.GetFieldGroupCount(e:GetHandlerPlayer(),LOCATION_MZONE,0) - return limit>0 and limit or 5 -end -function c35059553.sumlimit(e,c) - local tp=e:GetHandlerPlayer() - if c:IsControler(1-tp) then - local mi,ma=c:GetTributeRequirement() - local x=Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0) - local y=Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE) - if ma==2 then return x0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetTargetCard(eg) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c35073065.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local ec=eg:GetFirst() - if c:IsRelateToEffect(e) and Duel.SpecialSummonStep(c,0,tp,tp,false,false,POS_FACEUP) then - if ec:IsRelateToEffect(e) and ec:IsFaceup() then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CHANGE_RACE) - if ec:IsHasEffect(EFFECT_ADD_RACE) and not ec:IsHasEffect(EFFECT_CHANGE_RACE) then - e1:SetValue(ec:GetOriginalRace()) - else - e1:SetValue(ec:GetRace()) - end - e1:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_CHANGE_ATTRIBUTE) - if ec:IsHasEffect(EFFECT_ADD_ATTRIBUTE) and not ec:IsHasEffect(EFFECT_CHANGE_ATTRIBUTE) then - e2:SetValue(ec:GetOriginalAttribute()) - else - e2:SetValue(ec:GetAttribute()) - end - e2:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_CHANGE_LEVEL) - e3:SetValue(ec:GetLevel()) - e3:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e3) - end - Duel.SpecialSummonComplete() - end -end diff --git a/script/c35089369.lua b/script/c35089369.lua deleted file mode 100644 index e5b6b5a5b5..0000000000 --- a/script/c35089369.lua +++ /dev/null @@ -1,95 +0,0 @@ ---風竜星-ホロウ -function c35089369.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(35089369,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCountLimit(1,35089369) - e1:SetCondition(c35089369.condition) - e1:SetTarget(c35089369.target) - e1:SetOperation(c35089369.operation) - c:RegisterEffect(e1) - --synchro effect - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetRange(LOCATION_MZONE) - e2:SetHintTiming(0,TIMING_BATTLE_START+TIMING_BATTLE_END) - e2:SetCountLimit(1) - e2:SetCondition(c35089369.sccon) - e2:SetTarget(c35089369.sctg) - e2:SetOperation(c35089369.scop) - c:RegisterEffect(e2) - -- - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e3:SetCode(EVENT_BE_MATERIAL) - e3:SetCondition(c35089369.immcon) - e3:SetOperation(c35089369.immop) - c:RegisterEffect(e3) -end -function c35089369.condition(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE+REASON_EFFECT) - and c:IsPreviousLocation(LOCATION_ONFIELD) and c:GetPreviousControler()==tp -end -function c35089369.filter(c,e,tp) - return c:IsSetCard(0x9e) and not c:IsCode(35089369) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c35089369.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c35089369.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c35089369.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c35089369.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_ATTACK) -end -function c35089369.sccon(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetTurnPlayer()==tp then return false end - local ph=Duel.GetCurrentPhase() - return ph==PHASE_MAIN1 or ph==PHASE_BATTLE or ph==PHASE_MAIN2 -end -function c35089369.mfilter(c) - return c:IsSetCard(0x9e) -end -function c35089369.sctg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local mg=Duel.GetMatchingGroup(c35089369.mfilter,tp,LOCATION_MZONE,0,nil) - return Duel.IsExistingMatchingCard(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,1,nil,nil,mg) - end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function c35089369.scop(e,tp,eg,ep,ev,re,r,rp) - local mg=Duel.GetMatchingGroup(c35089369.mfilter,tp,LOCATION_MZONE,0,nil) - local g=Duel.GetMatchingGroup(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,nil,nil,mg) - if g:GetCount()>0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=g:Select(tp,1,1,nil) - Duel.SynchroSummon(tp,sg:GetFirst(),nil,mg) - end -end -function c35089369.immcon(e,tp,eg,ep,ev,re,r,rp) - return r==REASON_SYNCHRO -end -function c35089369.immop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local rc=c:GetReasonCard() - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(35089369,1)) - e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_IMMUNE_EFFECT) - e1:SetValue(c35089369.efilter) - e1:SetReset(RESET_EVENT+0x1fe0000) - rc:RegisterEffect(e1) -end -function c35089369.efilter(e,te) - return te:IsActiveType(TYPE_SPELL) -end diff --git a/script/c3510565.lua b/script/c3510565.lua deleted file mode 100644 index b920b1519e..0000000000 --- a/script/c3510565.lua +++ /dev/null @@ -1,44 +0,0 @@ ---ステルスバード -function c3510565.initial_effect(c) - --turn set - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(3510565,0)) - e1:SetCategory(CATEGORY_POSITION) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetTarget(c3510565.target) - e1:SetOperation(c3510565.operation) - c:RegisterEffect(e1) - --damage - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(3510565,1)) - e2:SetCategory(CATEGORY_DAMAGE) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - e2:SetTarget(c3510565.damtg) - e2:SetOperation(c3510565.damop) - c:RegisterEffect(e2) -end -function c3510565.target(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsCanTurnSet() and c:GetFlagEffect(3510565)==0 end - c:RegisterFlagEffect(3510565,RESET_EVENT+0x1fc0000+RESET_PHASE+PHASE_END,0,1) - Duel.SetOperationInfo(0,CATEGORY_POSITION,c,1,0,0) -end -function c3510565.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - Duel.ChangePosition(c,POS_FACEDOWN_DEFENCE) - end -end -function c3510565.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(1000) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,1000) -end -function c3510565.damop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c35112613.lua b/script/c35112613.lua deleted file mode 100644 index 15347500a4..0000000000 --- a/script/c35112613.lua +++ /dev/null @@ -1,60 +0,0 @@ ---クリフォトン -function c35112613.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(35112613,0)) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetRange(LOCATION_HAND) - e1:SetCost(c35112613.cost) - e1:SetOperation(c35112613.operation) - c:RegisterEffect(e1) - --salvage - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(35112613,1)) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_GRAVE) - e2:SetCountLimit(1,35112613) - e2:SetCost(c35112613.thcost) - e2:SetTarget(c35112613.thtg) - e2:SetOperation(c35112613.thop) - c:RegisterEffect(e2) -end -function c35112613.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,2000) and e:GetHandler():IsAbleToGraveAsCost() end - Duel.PayLPCost(tp,2000) - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end -function c35112613.operation(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CHANGE_DAMAGE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetTargetRange(1,0) - e1:SetValue(0) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) - local e2=e1:Clone() - e2:SetCode(EFFECT_NO_EFFECT_DAMAGE) - e2:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e2,tp) -end -function c35112613.cfilter(c) - return c:IsSetCard(0x55) and c:IsType(TYPE_MONSTER) and c:GetCode()~=35112613 and c:IsAbleToGraveAsCost() -end -function c35112613.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c35112613.cfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c35112613.cfilter,tp,LOCATION_HAND,0,1,1,nil) - Duel.SendtoGrave(g,REASON_COST) -end -function c35112613.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToHand() end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0) -end -function c35112613.thop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SendtoHand(c,nil,REASON_EFFECT) - end -end diff --git a/script/c35149085.lua b/script/c35149085.lua deleted file mode 100644 index 659a0e0172..0000000000 --- a/script/c35149085.lua +++ /dev/null @@ -1,39 +0,0 @@ ---キャトルミューティレーション -function c35149085.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_END_PHASE) - e1:SetTarget(c35149085.target) - e1:SetOperation(c35149085.activate) - c:RegisterEffect(e1) -end -function c35149085.filter(c) - return c:IsFaceup() and c:GetLevel()>0 and c:IsRace(RACE_BEAST) and c:IsAbleToHand() -end -function c35149085.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c35149085.filter(chkc) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsExistingTarget(c35149085.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g=Duel.SelectTarget(tp,c35149085.filter,tp,LOCATION_MZONE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c35149085.spfilter(c,e,tp,lv) - return c:IsRace(RACE_BEAST) and c:GetLevel()==lv and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c35149085.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) then - local lv=tc:GetLevel() - if Duel.SendtoHand(tc,nil,REASON_EFFECT)>0 and tc:IsLocation(LOCATION_HAND) - and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c35149085.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp,lv) - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end - end -end diff --git a/script/c35183853.lua b/script/c35183853.lua deleted file mode 100644 index c5e90acfa1..0000000000 --- a/script/c35183853.lua +++ /dev/null @@ -1,31 +0,0 @@ ---鏡鳴する武神 -function c35183853.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c35183853.condition) - e1:SetOperation(c35183853.operation) - c:RegisterEffect(e1) -end -function c35183853.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x88) and c:IsRace(RACE_BEASTWARRIOR) -end -function c35183853.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()==PHASE_MAIN1 and not Duel.CheckPhaseActivity() - and Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)0 then - Duel.SendtoGrave(g,REASON_EFFECT) - end -end diff --git a/script/c35209994.lua b/script/c35209994.lua deleted file mode 100644 index 7726951816..0000000000 --- a/script/c35209994.lua +++ /dev/null @@ -1,28 +0,0 @@ ---ヴェルズ・フレイス -function c35209994.initial_effect(c) - --flip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(35209994,0)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP) - e1:SetTarget(c35209994.target) - e1:SetOperation(c35209994.operation) - c:RegisterEffect(e1) -end -function c35209994.filter(c) - return c:IsFaceup() and c:IsAbleToHand() -end -function c35209994.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() and c35209994.filter(chkc) end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g=Duel.SelectTarget(tp,c35209994.filter,tp,0,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0) -end -function c35209994.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - end -end diff --git a/script/c35215622.lua b/script/c35215622.lua deleted file mode 100644 index 1086f335b2..0000000000 --- a/script/c35215622.lua +++ /dev/null @@ -1,10 +0,0 @@ ---盲信するゴブリン -function c35215622.initial_effect(c) - --control - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_CANNOT_CHANGE_CONTROL) - c:RegisterEffect(e1) -end diff --git a/script/c35220244.lua b/script/c35220244.lua deleted file mode 100644 index 41296d1973..0000000000 --- a/script/c35220244.lua +++ /dev/null @@ -1,83 +0,0 @@ ---重力砲 -function c35220244.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c35220244.target) - e1:SetOperation(c35220244.operation) - c:RegisterEffect(e1) - --Equip limit - local e2=Effect.CreateEffect(c) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_EQUIP_LIMIT) - e2:SetValue(c35220244.eqlimit) - c:RegisterEffect(e2) - --atkup - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(35220244,0)) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_SZONE) - e3:SetCountLimit(1) - e3:SetOperation(c35220244.atkop) - c:RegisterEffect(e3) - --disable - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e4:SetCode(EVENT_BE_BATTLE_TARGET) - e4:SetRange(LOCATION_SZONE) - e4:SetCondition(c35220244.discon) - e4:SetOperation(c35220244.disop) - c:RegisterEffect(e4) -end -function c35220244.eqlimit(e,c) - return c:IsRace(RACE_MACHINE) -end -function c35220244.eqfilter(c) - return c:IsFaceup() and c:IsRace(RACE_MACHINE) -end -function c35220244.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c35220244.eqfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c35220244.eqfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c35220244.eqfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c35220244.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,e:GetHandler(),tc) - end -end -function c35220244.atkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local ec=c:GetEquipTarget() - if ec and c:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(400) - e1:SetReset(RESET_EVENT+0x1fe0000) - ec:RegisterEffect(e1) - end -end -function c35220244.discon(e,tp,eg,ep,ev,re,r,rp) - local ec=e:GetHandler():GetEquipTarget() - return ec and ec:GetControler()==tp and (ec==Duel.GetAttacker() or ec==Duel.GetAttackTarget()) and ec:GetBattleTarget() -end -function c35220244.disop(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetHandler():GetEquipTarget():GetBattleTarget() - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_BATTLE) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_BATTLE) - tc:RegisterEffect(e2) -end diff --git a/script/c35224440.lua b/script/c35224440.lua deleted file mode 100644 index 6789c276dd..0000000000 --- a/script/c35224440.lua +++ /dev/null @@ -1,27 +0,0 @@ ---剣闘訓練所 -function c35224440.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c35224440.target) - e1:SetOperation(c35224440.activate) - c:RegisterEffect(e1) -end -function c35224440.filter(c) - local lv=c:GetLevel() - return c:IsSetCard(0x19) and lv>0 and lv<5 and c:IsAbleToHand() -end -function c35224440.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c35224440.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c35224440.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c35224440.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c35255456.lua b/script/c35255456.lua deleted file mode 100644 index c9e8601a15..0000000000 --- a/script/c35255456.lua +++ /dev/null @@ -1,47 +0,0 @@ ---ミラクル・コンタクト -function c35255456.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c35255456.target) - e1:SetOperation(c35255456.activate) - c:RegisterEffect(e1) -end -function c35255456.filter1(c,e) - return c:IsAbleToDeck() and c:IsCanBeFusionMaterial() and not c:IsImmuneToEffect(e) and not c:IsHasEffect(EFFECT_NECRO_VALLEY) -end -function c35255456.filter2(c,e,tp,m,chkf) - return c:IsType(TYPE_FUSION) and c:IsSetCard(0x3008) and c:IsSetCard(0x9) and c:GetCode()~=31111109 - and c:IsCanBeSpecialSummoned(e,0,tp,true,false) and c:CheckFusionMaterial(m,nil,chkf) -end -function c35255456.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp - local mg=Duel.GetMatchingGroup(c35255456.filter1,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_MZONE,0,nil,e) - return Duel.IsExistingMatchingCard(c35255456.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg,chkf) - end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function c35255456.cffilter(c) - return c:IsLocation(LOCATION_HAND) or (c:IsLocation(LOCATION_MZONE) and c:IsFacedown()) -end -function c35255456.activate(e,tp,eg,ep,ev,re,r,rp) - local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp - local mg=Duel.GetMatchingGroup(c35255456.filter1,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_MZONE,0,nil,e) - local sg=Duel.GetMatchingGroup(c35255456.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg,chkf) - if sg:GetCount()>0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local tg=sg:Select(tp,1,1,nil) - local tc=tg:GetFirst() - local mat=Duel.SelectFusionMaterial(tp,tc,mg,nil,chkf) - local cf=mat:Filter(c35255456.cffilter,nil) - if cf:GetCount()>0 then - Duel.ConfirmCards(1-tp,cf) - end - Duel.SendtoDeck(mat,nil,2,REASON_EFFECT) - Duel.BreakEffect() - Duel.SpecialSummon(tc,0,tp,tp,true,false,POS_FACEUP) - end -end diff --git a/script/c35262428.lua b/script/c35262428.lua deleted file mode 100644 index 6912a7ad3c..0000000000 --- a/script/c35262428.lua +++ /dev/null @@ -1,69 +0,0 @@ ---賢者の聖杯 -function c35262428.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c35262428.condition) - e1:SetTarget(c35262428.target) - e1:SetOperation(c35262428.activate) - c:RegisterEffect(e1) -end -function c35262428.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 -end -function c35262428.filter(c,e,tp) - return c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c35262428.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(1-tp) and c35262428.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c35262428.filter,tp,0,LOCATION_GRAVE,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c35262428.filter,tp,0,LOCATION_GRAVE,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c35262428.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)~=0 then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UNRELEASABLE_SUM) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(1) - tc:RegisterEffect(e1,true) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_UNRELEASABLE_NONSUM) - e2:SetReset(RESET_EVENT+0x1fe0000) - e2:SetValue(1) - tc:RegisterEffect(e2,true) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL) - e3:SetReset(RESET_EVENT+0x1fe0000) - e3:SetValue(1) - tc:RegisterEffect(e3,true) - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e4:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e4:SetRange(LOCATION_MZONE) - e4:SetCode(EVENT_PHASE+PHASE_END) - e4:SetOperation(c35262428.ctlop) - e4:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e4:SetCountLimit(1) - e4:SetLabel(1-tp) - tc:RegisterEffect(e4,true) - end -end -function c35262428.ctlop(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetHandler() - local p=e:GetLabel() - if tc:GetControler()~=p and not Duel.GetControl(tc,p) and not tc:IsImmuneToEffect(e) and tc:IsAbleToChangeControler() then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c35268887.lua b/script/c35268887.lua deleted file mode 100644 index 99a4b08038..0000000000 --- a/script/c35268887.lua +++ /dev/null @@ -1,72 +0,0 @@ ---ダメージ・トランスレーション -function c35268887.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetOperation(c35268887.activate) - c:RegisterEffect(e1) - if not c35268887.global_check then - c35268887.global_check=true - c35268887[0]=0 - c35268887[1]=0 - local ge1=Effect.CreateEffect(c) - ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - ge1:SetCode(EVENT_DAMAGE) - ge1:SetOperation(c35268887.checkop) - Duel.RegisterEffect(ge1,0) - local ge2=Effect.CreateEffect(c) - ge2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - ge2:SetCode(EVENT_PHASE_START+PHASE_DRAW) - ge2:SetOperation(c35268887.clear) - Duel.RegisterEffect(ge2,0) - end -end -function c35268887.checkop(e,tp,eg,ep,ev,re,r,rp) - if bit.band(r,REASON_EFFECT)~=0 then - c35268887[ep]=c35268887[ep]+1 - end -end -function c35268887.clear(e,tp,eg,ep,ev,re,r,rp) - c35268887[0]=0 - c35268887[1]=0 -end -function c35268887.activate(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CHANGE_DAMAGE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetTargetRange(1,0) - e1:SetValue(c35268887.val) - e1:SetReset(RESET_PHASE+PHASE_END,1) - Duel.RegisterEffect(e1,tp) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetDescription(aux.Stringid(35268887,0)) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_PHASE+PHASE_END) - e2:SetCountLimit(1) - e2:SetTarget(c35268887.tokentg) - e2:SetOperation(c35268887.tokenop) - e2:SetReset(RESET_PHASE+PHASE_END,1) - Duel.RegisterEffect(e2,tp) -end -function c35268887.val(e,re,dam,r,rp,rc) - if bit.band(r,REASON_EFFECT)~=0 then - return dam/2 - else return dam end -end -function c35268887.tokentg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return c35268887[tp]~=0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>=c35268887[tp] - and Duel.IsPlayerCanSpecialSummonMonster(tp,35268888,0,0x4011,0,0,1,RACE_FIEND,ATTRIBUTE_DARK) end - Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,c35268887[tp],0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,c35268887[tp],0,0) -end -function c35268887.tokenop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)0 - and Duel.IsExistingTarget(c35307484.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c35307484.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,g:GetCount(),0,0) -end -function c35307484.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e2) - Duel.SpecialSummonComplete() - end -end diff --git a/script/c35316708.lua b/script/c35316708.lua deleted file mode 100644 index 74d29c8677..0000000000 --- a/script/c35316708.lua +++ /dev/null @@ -1,19 +0,0 @@ ---刻の封印 -function c35316708.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_END_PHASE) - e1:SetOperation(c35316708.activate) - c:RegisterEffect(e1) -end -function c35316708.activate(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetTargetRange(0,1) - e1:SetCode(EFFECT_SKIP_DP) - e1:SetReset(RESET_PHASE+PHASE_DRAW+RESET_OPPO_TURN) - Duel.RegisterEffect(e1,tp) -end diff --git a/script/c35329581.lua b/script/c35329581.lua deleted file mode 100644 index d2332c9641..0000000000 --- a/script/c35329581.lua +++ /dev/null @@ -1,42 +0,0 @@ ---シャドー・インパルス -function c35329581.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCountLimit(1,35329581+EFFECT_COUNT_CODE_OATH) - e1:SetTarget(c35329581.target) - e1:SetOperation(c35329581.activate) - c:RegisterEffect(e1) -end -function c35329581.filter(c,e,tp) - return c:IsLocation(LOCATION_GRAVE) and c:IsCanBeEffectTarget(e) - and c:GetPreviousControler()==tp and c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE+REASON_EFFECT) - and c:IsType(TYPE_SYNCHRO) and Duel.IsExistingMatchingCard(c35329581.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c) -end -function c35329581.spfilter(c,e,tp,tc) - return c:IsType(TYPE_SYNCHRO) and c:GetLevel()==tc:GetLevel() - and c:GetRace()==tc:GetRace() and c:GetCode()~=tc:GetCode() - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c35329581.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return eg:IsContains(chkc) and c35329581.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and eg:IsExists(c35329581.filter,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - local g=eg:FilterSelect(tp,c35329581.filter,1,1,nil,e,tp) - Duel.SetTargetCard(g) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function c35329581.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local tc=Duel.GetFirstTarget() - if not tc:IsRelateToEffect(e) or tc:IsFacedown() then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=Duel.SelectMatchingCard(tp,c35329581.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc) - if sg:GetCount()>0 then - Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c35330871.lua b/script/c35330871.lua deleted file mode 100644 index 23cfc5c414..0000000000 --- a/script/c35330871.lua +++ /dev/null @@ -1,88 +0,0 @@ ---彼岸の鬼神 ヘルレイカー -function c35330871.initial_effect(c) - c:EnableReviveLimit() - --special summon condition - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetValue(aux.ritlimit) - c:RegisterEffect(e1) - --atk & def down - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetRange(LOCATION_MZONE) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e2:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP+0x1c0) - e2:SetCountLimit(1) - e2:SetCondition(c35330871.atkcon) - e2:SetCost(c35330871.atkcost) - e2:SetTarget(c35330871.atktg) - e2:SetOperation(c35330871.atkop) - c:RegisterEffect(e2) - --to grave - local e3=Effect.CreateEffect(c) - e3:SetCategory(CATEGORY_TOGRAVE) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_TO_GRAVE) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e3:SetCondition(c35330871.tgcon) - e3:SetTarget(c35330871.tgtg) - e3:SetOperation(c35330871.tgop) - c:RegisterEffect(e3) -end -function c35330871.atkcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end -function c35330871.cfilter(c) - return c:IsSetCard(0xb1) and c:IsType(TYPE_MONSTER) and c:IsAbleToGraveAsCost() -end -function c35330871.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c35330871.cfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c35330871.cfilter,tp,LOCATION_HAND,0,1,1,nil) - Duel.SendtoGrave(g,REASON_COST) - e:SetLabelObject(g:GetFirst()) -end -function c35330871.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil) -end -function c35330871.atkop(e,tp,eg,ep,ev,re,r,rp) - local cc=e:GetLabelObject() - local atk=cc:GetAttack() - local def=cc:GetDefence() - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - e1:SetValue(-atk) - tc:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_UPDATE_DEFENCE) - e2:SetValue(-def) - tc:RegisterEffect(e2) - end -end -function c35330871.tgcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) -end -function c35330871.tgtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_ONFIELD) and chkc:IsAbleToGrave() end - if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToGrave,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectTarget(tp,Card.IsAbleToGrave,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,0,0) -end -function c35330871.tgop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoGrave(tc,REASON_EFFECT) - end -end diff --git a/script/c3534077.lua b/script/c3534077.lua deleted file mode 100644 index 042673c688..0000000000 --- a/script/c3534077.lua +++ /dev/null @@ -1,42 +0,0 @@ ---熱血獣士ウルフバーク -function c3534077.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(3534077,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1,3534077) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c3534077.sptg) - e1:SetOperation(c3534077.spop) - c:RegisterEffect(e1) -end -function c3534077.filter(c,e,tp) - return c:IsRace(RACE_BEASTWARRIOR) and c:IsAttribute(ATTRIBUTE_FIRE) and c:GetLevel()==4 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c3534077.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c3534077.filter(chkc,e,tp) end - if chk==0 then return Duel.IsExistingTarget(c3534077.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) - and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c3534077.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c3534077.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP_DEFENCE) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e2) - end - Duel.SpecialSummonComplete() -end diff --git a/script/c35346968.lua b/script/c35346968.lua deleted file mode 100644 index 3d03d0f704..0000000000 --- a/script/c35346968.lua +++ /dev/null @@ -1,21 +0,0 @@ ---神の恵み -function c35346968.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_END_PHASE) - c:RegisterEffect(e1) - --recover - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetProperty(EFFECT_FLAG_DELAY) - e2:SetRange(LOCATION_SZONE) - e2:SetCode(EVENT_DRAW) - e2:SetOperation(c35346968.recop) - c:RegisterEffect(e2) -end -function c35346968.recop(e,tp,eg,ep,ev,re,r,rp) - if ep~=tp then return end - Duel.Recover(tp,500,REASON_EFFECT) -end diff --git a/script/c3536537.lua b/script/c3536537.lua deleted file mode 100644 index aa2b593684..0000000000 --- a/script/c3536537.lua +++ /dev/null @@ -1,35 +0,0 @@ ---ヴェルズ・ザッハーク -function c3536537.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(3536537,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCondition(c3536537.descon) - e1:SetTarget(c3536537.destg) - e1:SetOperation(c3536537.desop) - c:RegisterEffect(e1) -end -function c3536537.descon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return rp~=tp and c:GetPreviousControler()==tp and bit.band(r,REASON_DESTROY)~=0 - and c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousPosition(POS_FACEUP) -end -function c3536537.filter(c) - return c:IsFaceup() and c:IsLevelAbove(5) and bit.band(c:GetSummonType(),SUMMON_TYPE_SPECIAL)~=0 and c:IsDestructable() -end -function c3536537.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c3536537.filter(chkc) end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c3536537.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c3536537.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c35419032.lua b/script/c35419032.lua deleted file mode 100644 index e93906052b..0000000000 --- a/script/c35419032.lua +++ /dev/null @@ -1,75 +0,0 @@ ---侵略の侵喰感染 -function c35419032.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_END_PHASE) - e1:SetTarget(c35419032.target1) - e1:SetOperation(c35419032.operation) - c:RegisterEffect(e1) - --instant(chain) - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(35419032,0)) - e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetRange(LOCATION_SZONE) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetHintTiming(0,TIMING_END_PHASE) - e2:SetLabel(1) - e2:SetCost(c35419032.cost2) - e2:SetTarget(c35419032.target2) - e2:SetOperation(c35419032.operation) - c:RegisterEffect(e2) -end -function c35419032.cfilter(c) - return c:IsSetCard(0xa) and c:IsType(TYPE_MONSTER) and c:IsAbleToDeckAsCost() and (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) -end -function c35419032.afilter(c) - return c:IsSetCard(0xa) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() -end -function c35419032.target1(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - if Duel.IsExistingMatchingCard(c35419032.cfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil) - and Duel.IsExistingMatchingCard(c35419032.afilter,tp,LOCATION_DECK,0,1,nil) - and Duel.SelectYesNo(tp,aux.Stringid(35419032,1)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectMatchingCard(tp,c35419032.cfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil) - if g:GetFirst():IsLocation(LOCATION_HAND) then - Duel.ConfirmCards(1-tp,g) - end - Duel.SendtoDeck(g,nil,2,REASON_COST) - e:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e:SetLabel(1) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) - e:GetHandler():RegisterFlagEffect(35419032,RESET_PHASE+PHASE_END,0,1) - else - e:SetCategory(0) - e:SetLabel(0) - end -end -function c35419032.operation(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - if e:GetLabel()==0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c35419032.afilter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end -function c35419032.cost2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c35419032.cfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectMatchingCard(tp,c35419032.cfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil) - if g:GetFirst():IsLocation(LOCATION_HAND) then - Duel.ConfirmCards(1-tp,g) - end - Duel.SendtoDeck(g,nil,2,REASON_COST) -end -function c35419032.target2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():GetFlagEffect(35419032)==0 - and Duel.IsExistingMatchingCard(c35419032.afilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) - e:GetHandler():RegisterFlagEffect(35419032,RESET_PHASE+PHASE_END,0,1) -end diff --git a/script/c35429292.lua b/script/c35429292.lua deleted file mode 100644 index c471cde0d7..0000000000 --- a/script/c35429292.lua +++ /dev/null @@ -1,33 +0,0 @@ ---ピクシーナイト -function c35429292.initial_effect(c) - --to deck - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(35429292,0)) - e1:SetCategory(CATEGORY_TODECK) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCondition(c35429292.condition) - e1:SetTarget(c35429292.target) - e1:SetOperation(c35429292.operation) - c:RegisterEffect(e1) -end -function c35429292.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) -end -function c35429292.filter(c) - return c:IsType(TYPE_SPELL) and c:IsAbleToDeck() -end -function c35429292.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c35429292.filter(chkc) end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_TODECK) - local g=Duel.SelectTarget(1-tp,c35429292.filter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0) -end -function c35429292.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.SendtoDeck(tc,nil,0,REASON_EFFECT) - end -end diff --git a/script/c35448319.lua b/script/c35448319.lua deleted file mode 100644 index df923c0f03..0000000000 --- a/script/c35448319.lua +++ /dev/null @@ -1,70 +0,0 @@ ---除草獣 -function c35448319.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(35448319,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c35448319.cost) - e1:SetTarget(c35448319.target) - e1:SetOperation(c35448319.operation) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(35448319,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_DESTROYED) - e2:SetRange(LOCATION_GRAVE) - e2:SetCondition(c35448319.spcon) - e2:SetTarget(c35448319.sptg) - e2:SetOperation(c35448319.spop) - c:RegisterEffect(e2) -end -function c35448319.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsRace,1,nil,RACE_PLANT) end - local sg=Duel.SelectReleaseGroup(tp,Card.IsRace,1,1,nil,RACE_PLANT) - Duel.Release(sg,REASON_COST) -end -function c35448319.filter(c) - return c:IsFaceup() and c:IsDestructable() -end -function c35448319.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and c35448319.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c35448319.filter,tp,0,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c35448319.filter,tp,0,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c35448319.operation(e,tp,eg,ep,ev,re,r,rp,chk) - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end -function c35448319.spfilter(c) - return c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP) and bit.band(c:GetPreviousRaceOnField(),RACE_PLANT)~=0 -end -function c35448319.spcon(e,tp,eg,ep,ev,re,r,rp) - return not eg:IsContains(e:GetHandler()) and eg:IsExists(c35448319.spfilter,1,nil) -end -function c35448319.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c35448319.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+0x47e0000) - e1:SetValue(LOCATION_REMOVED) - c:RegisterEffect(e1,true) - end -end diff --git a/script/c35464895.lua b/script/c35464895.lua deleted file mode 100644 index 4e238fc6ac..0000000000 --- a/script/c35464895.lua +++ /dev/null @@ -1,34 +0,0 @@ ---デステニー・シグナル -function c35464895.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetCondition(c35464895.condition) - e1:SetTarget(c35464895.target) - e1:SetOperation(c35464895.operation) - c:RegisterEffect(e1) -end -function c35464895.cfilter(c,tp) - return c:IsReason(REASON_BATTLE) and c:IsLocation(LOCATION_GRAVE) and c:GetPreviousControler()==tp -end -function c35464895.condition(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c35464895.cfilter,1,nil,tp) -end -function c35464895.spfilter(c,e,tp) - return c:IsLevelBelow(4) and c:IsSetCard(0xc008) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c35464895.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c35464895.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) -end -function c35464895.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c35464895.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()~=0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c35480699.lua b/script/c35480699.lua deleted file mode 100644 index 4a1f60ac38..0000000000 --- a/script/c35480699.lua +++ /dev/null @@ -1,39 +0,0 @@ ---皆既日蝕の書 -function c35480699.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_POSITION) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,0x1e0) - e1:SetTarget(c35480699.target) - e1:SetOperation(c35480699.activate) - c:RegisterEffect(e1) -end -function c35480699.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsCanTurnSet,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - local g=Duel.GetMatchingGroup(Card.IsCanTurnSet,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_POSITION,g,g:GetCount(),0,0) -end -function c35480699.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsCanTurnSet,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - if g:GetCount()>0 then - Duel.ChangePosition(g,POS_FACEDOWN_DEFENCE) - end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetCountLimit(1) - e1:SetReset(RESET_PHASE+PHASE_END) - e1:SetCondition(c35480699.flipcon) - e1:SetOperation(c35480699.flipop) - Duel.RegisterEffect(e1,tp) -end -function c35480699.flipcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(Card.IsFacedown,tp,0,LOCATION_MZONE,1,nil) -end -function c35480699.flipop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsFacedown,tp,0,LOCATION_MZONE,nil) - local ct=Duel.ChangePosition(g,POS_FACEUP_DEFENCE) - Duel.Draw(1-tp,ct,REASON_EFFECT) -end diff --git a/script/c35486099.lua b/script/c35486099.lua deleted file mode 100644 index 7a41cc6df4..0000000000 --- a/script/c35486099.lua +++ /dev/null @@ -1,51 +0,0 @@ ---宝玉の恵み -function c35486099.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_LEAVE_GRAVE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c35486099.target) - e1:SetOperation(c35486099.activate) - c:RegisterEffect(e1) -end -function c35486099.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:GetControler()==tp and chkc:GetLocation()==LOCATION_GRAVE and chkc:IsSetCard(0x1034) end - if chk==0 then - if not Duel.IsExistingTarget(Card.IsSetCard,tp,LOCATION_GRAVE,0,1,nil,0x1034) then return false end - if e:GetHandler():IsLocation(LOCATION_HAND) then - return Duel.GetLocationCount(tp,LOCATION_SZONE)>1 - else return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 end - end - local ft=Duel.GetLocationCount(tp,LOCATION_SZONE) - if ft>2 then ft=2 end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) - local g=Duel.SelectTarget(tp,Card.IsSetCard,tp,LOCATION_GRAVE,0,1,ft,nil,0x1034) - Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g,2,0,0) -end -function c35486099.activate(e,tp,eg,ep,ev,re,r,rp) - local ft=Duel.GetLocationCount(tp,LOCATION_SZONE) - if ft<=0 then return end - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local sg=g:Filter(Card.IsRelateToEffect,nil,e) - if sg:GetCount()>0 then - if sg:GetCount()>ft then - local rg=sg:Select(tp,ft,ft,nil) - sg=rg - end - local tc=sg:GetFirst() - while tc do - Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetCode(EFFECT_CHANGE_TYPE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fc0000) - e1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS) - tc:RegisterEffect(e1) - tc=sg:GetNext() - end - Duel.RaiseEvent(sg,47408488,e,0,tp,0,0) - end -end diff --git a/script/c3549275.lua b/script/c3549275.lua deleted file mode 100644 index 1587a0efca..0000000000 --- a/script/c3549275.lua +++ /dev/null @@ -1,26 +0,0 @@ ---ダイス・ポット -function c3549275.initial_effect(c) - --flip - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DICE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP) - e1:SetTarget(c3549275.target) - e1:SetOperation(c3549275.operation) - c:RegisterEffect(e1) -end -function c3549275.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DICE,nil,0,PLAYER_ALL,1) -end -function c3549275.operation(e,tp,eg,ep,ev,re,r,rp) - local d1=0 - local d2=0 - while d1==d2 do - d1,d2=Duel.TossDice(tp,1,1) - end - if d10 - and Duel.IsPlayerCanSpecialSummonMonster(tp,35514097,0,0x4011,1200,1200,4,RACE_MACHINE,ATTRIBUTE_LIGHT) - local op=0 - if t1 or t2 or t3 then - local m={} - local n={} - local ct=1 - if t1 then m[ct]=aux.Stringid(35514096,1) n[ct]=1 ct=ct+1 end - if t2 then m[ct]=aux.Stringid(35514096,2) n[ct]=2 ct=ct+1 end - if t3 then m[ct]=aux.Stringid(35514096,3) n[ct]=3 ct=ct+1 end - local sp=Duel.SelectOption(tp,table.unpack(m)) - op=n[sp+1] - end - e:SetLabel(op) - if op==2 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c35514096.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) - e:SetProperty(EFFECT_FLAG_CARD_TARGET) - e:SetCategory(CATEGORY_DESTROY) - elseif op==3 then - e:SetProperty(0) - e:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0) - else - e:SetProperty(0) - e:SetCategory(0) - end -end -function c35514096.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if e:GetLabel()==2 then - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end - elseif e:GetLabel()==3 then - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 - or not Duel.IsPlayerCanSpecialSummonMonster(tp,35514097,0,0x4011,1200,1200,4,RACE_MACHINE,ATTRIBUTE_LIGHT) then return end - local token=Duel.CreateToken(tp,35514097) - Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP) - elseif e:GetLabel()==1 then - if c:IsRelateToBattle() then - Duel.ChainAttack() - end - end -end diff --git a/script/c35537251.lua b/script/c35537251.lua deleted file mode 100644 index b548d15041..0000000000 --- a/script/c35537251.lua +++ /dev/null @@ -1,44 +0,0 @@ ---BK シャドー -function c35537251.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(35537251,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(1,35537251) - e1:SetTarget(c35537251.sptg) - e1:SetOperation(c35537251.spop) - c:RegisterEffect(e1) -end -function c35537251.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local g=Group.CreateGroup() - for i=0,4 do - local tc=Duel.GetFieldCard(tp,LOCATION_MZONE,i) - if tc and tc:IsFaceup() and tc:IsSetCard(0x84) and tc:IsType(TYPE_XYZ) then - g:Merge(tc:GetOverlayGroup()) - end - end - if g:GetCount()==0 then return false end - return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) - end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c35537251.spop(e,tp,eg,ep,ev,re,r,rp) - local g=Group.CreateGroup() - for i=0,4 do - local tc=Duel.GetFieldCard(tp,LOCATION_MZONE,i) - if tc and tc:IsFaceup() and tc:IsSetCard(0x84) and tc:IsType(TYPE_XYZ) then - g:Merge(tc:GetOverlayGroup()) - end - end - if g:GetCount()==0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVEXYZ) - local sg=g:Select(tp,1,1,nil) - Duel.SendtoGrave(sg,REASON_EFFECT) - if e:GetHandler():IsRelateToEffect(e) then - Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c35537860.lua b/script/c35537860.lua deleted file mode 100644 index a4d4ae9625..0000000000 --- a/script/c35537860.lua +++ /dev/null @@ -1,32 +0,0 @@ ---精神同調波 -function c35537860.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c35537860.condition) - e1:SetTarget(c35537860.target) - e1:SetOperation(c35537860.activate) - c:RegisterEffect(e1) -end -function c35537860.cfilter(c) - return c:IsFaceup() and c:IsType(TYPE_SYNCHRO) -end -function c35537860.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c35537860.cfilter,tp,LOCATION_MZONE,0,1,nil) -end -function c35537860.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsDestructable() end - if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c35537860.activate(e) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c35539880.lua b/script/c35539880.lua deleted file mode 100644 index a06af57393..0000000000 --- a/script/c35539880.lua +++ /dev/null @@ -1,59 +0,0 @@ ---正統なる血統 -function c35539880.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_END_PHASE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c35539880.target) - e1:SetOperation(c35539880.operation) - c:RegisterEffect(e1) - --Destroy - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE) - e2:SetCode(EVENT_LEAVE_FIELD) - e2:SetOperation(c35539880.desop) - c:RegisterEffect(e2) - --Destroy2 - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e3:SetRange(LOCATION_SZONE) - e3:SetCode(EVENT_LEAVE_FIELD) - e3:SetCondition(c35539880.descon2) - e3:SetOperation(c35539880.desop2) - c:RegisterEffect(e3) -end -function c35539880.filter(c,e,tp) - return c:IsType(TYPE_NORMAL) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c35539880.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:GetLocation()==LOCATION_GRAVE and chkc:GetControler()==tp and c35539880.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c35539880.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c35539880.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c35539880.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then - if Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_ATTACK)==0 then return end - c:SetCardTarget(tc) - end -end -function c35539880.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetHandler():GetFirstCardTarget() - if tc and tc:IsLocation(LOCATION_MZONE) then - Duel.Destroy(tc,REASON_EFFECT) - end -end -function c35539880.descon2(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetHandler():GetFirstCardTarget() - return tc and eg:IsContains(tc) -end -function c35539880.desop2(e,tp,eg,ep,ev,re,r,rp) - Duel.Destroy(e:GetHandler(),REASON_EFFECT) -end diff --git a/script/c35544402.lua b/script/c35544402.lua deleted file mode 100644 index eeeaae11e9..0000000000 --- a/script/c35544402.lua +++ /dev/null @@ -1,64 +0,0 @@ ---ティンクル・セイクリッド -function c35544402.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c35544402.target) - e1:SetOperation(c35544402.operation) - c:RegisterEffect(e1) - --salvage - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_TOHAND) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_GRAVE) - e2:SetCountLimit(1,35544402) - e2:SetCost(c35544402.thcost) - e2:SetTarget(c35544402.thtg) - e2:SetOperation(c35544402.thop) - c:RegisterEffect(e2) -end -function c35544402.filter(c) - return c:IsFaceup() and c:IsSetCard(0x53) and c:GetLevel()>0 -end -function c35544402.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c35544402.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c35544402.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c35544402.filter,tp,LOCATION_MZONE,0,1,1,nil) -end -function c35544402.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_LEVEL) - e1:SetReset(RESET_EVENT+0x1fe0000) - if Duel.SelectOption(tp,aux.Stringid(35544402,0),aux.Stringid(35544402,1))==0 then - e1:SetValue(1) - else e1:SetValue(2) end - tc:RegisterEffect(e1) - end -end -function c35544402.thfilter(c) - return c:IsSetCard(0x53) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost() -end -function c35544402.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c35544402.thfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c35544402.thfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c35544402.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToHand() end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0) -end -function c35544402.thop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SendtoHand(c,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,c) - end -end diff --git a/script/c35561352.lua b/script/c35561352.lua deleted file mode 100644 index 5dec870421..0000000000 --- a/script/c35561352.lua +++ /dev/null @@ -1,38 +0,0 @@ ---セフィラの神撃 -function c35561352.initial_effect(c) - --Activate(effect) - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_CHAINING) - e1:SetCondition(c35561352.condition) - e1:SetCost(c35561352.cost) - e1:SetTarget(c35561352.target) - e1:SetOperation(c35561352.activate) - c:RegisterEffect(e1) -end -function c35561352.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0xc4) and c:IsAbleToRemoveAsCost() -end -function c35561352.condition(e,tp,eg,ep,ev,re,r,rp) - return (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE)) and Duel.IsChainNegatable(ev) -end -function c35561352.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c35561352.cfilter,tp,LOCATION_EXTRA,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c35561352.cfilter,tp,LOCATION_EXTRA,0,1,1,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c35561352.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) - end -end -function c35561352.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateActivation(ev) - if re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(eg,REASON_EFFECT) - end -end diff --git a/script/c35563539.lua b/script/c35563539.lua deleted file mode 100644 index 194ea60a37..0000000000 --- a/script/c35563539.lua +++ /dev/null @@ -1,25 +0,0 @@ ---精霊の鏡 -function c35563539.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_CHAINING) - e1:SetCondition(c35563539.condition) - e1:SetTarget(c35563539.target) - e1:SetOperation(c35563539.activate) - c:RegisterEffect(e1) -end -function c35563539.condition(e,tp,eg,ep,ev,re,r,rp) - return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL) and re:IsHasProperty(EFFECT_FLAG_PLAYER_TARGET) -end -function c35563539.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local te=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_EFFECT) - local ftg=te:GetTarget() - return ftg==nil or ftg(e,tp,eg,ep,ev,re,r,rp,chk) - end -end -function c35563539.activate(e,tp,eg,ep,ev,re,r,rp) - local p=Duel.GetChainInfo(ev,CHAININFO_TARGET_PLAYER) - Duel.ChangeTargetPlayer(ev,1-p) -end diff --git a/script/c35577420.lua b/script/c35577420.lua deleted file mode 100644 index 2fe63fbc8a..0000000000 --- a/script/c35577420.lua +++ /dev/null @@ -1,39 +0,0 @@ ---ライト・リサイレンス -function c35577420.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --discard deck - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetCategory(CATEGORY_REMOVE) - e2:SetDescription(aux.Stringid(35577420,0)) - e2:SetRange(LOCATION_SZONE) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetCondition(c35577420.rmcon) - e2:SetTarget(c35577420.rmtg) - e2:SetOperation(c35577420.rmop) - c:RegisterEffect(e2) -end -function c35577420.cfilter(c) - return c:GetPreviousLocation()==LOCATION_DECK -end -function c35577420.rmcon(e,tp,eg,ep,ev,re,r,rp) - if not re then return false end - local rc=re:GetHandler() - return rp==tp and bit.band(r,REASON_EFFECT)~=0 and rc:IsSetCard(0x38) and rc:IsType(TYPE_MONSTER) - and eg:IsExists(c35577420.cfilter,1,nil) -end -function c35577420.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_DECK) -end -function c35577420.rmop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - if Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)==0 then return end - local g=Duel.GetDecktopGroup(1-tp,1) - Duel.DisableShuffleCheck() - Duel.Remove(g,POS_FACEUP,REASON_EFFECT) -end diff --git a/script/c35618486.lua b/script/c35618486.lua deleted file mode 100644 index 68ba85fa92..0000000000 --- a/script/c35618486.lua +++ /dev/null @@ -1,34 +0,0 @@ ---インヴェルズの先鋭 -function c35618486.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(35618486,0)) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCondition(c35618486.condition) - e1:SetTarget(c35618486.target) - e1:SetOperation(c35618486.operation) - c:RegisterEffect(e1) -end -function c35618486.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetPreviousControler()==tp - and e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) -end -function c35618486.filter(c) - return c:IsFaceup() and c:IsType(TYPE_RITUAL+TYPE_FUSION+TYPE_SYNCHRO) and c:IsDestructable() -end -function c35618486.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c35618486.filter(chkc) end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c35618486.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c35618486.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c35629124.lua b/script/c35629124.lua deleted file mode 100644 index d431ae762b..0000000000 --- a/script/c35629124.lua +++ /dev/null @@ -1,57 +0,0 @@ ---コドモドラゴン -function c35629124.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(35629124,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCountLimit(1,35629124) - e1:SetCost(c35629124.spcost) - e1:SetTarget(c35629124.sptg) - e1:SetOperation(c35629124.spop) - c:RegisterEffect(e1) - Duel.AddCustomActivityCounter(35629124,ACTIVITY_SPSUMMON,c35629124.counterfilter) -end -function c35629124.counterfilter(c) - return c:IsRace(RACE_DRAGON) -end -function c35629124.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_BATTLE_PHASE)==0 - and Duel.GetCustomActivityCount(35629124,tp,ACTIVITY_SPSUMMON)==0 end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_BP) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) - e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) - e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e2:SetReset(RESET_PHASE+PHASE_END) - e2:SetTargetRange(1,0) - e2:SetTarget(c35629124.sumlimit) - Duel.RegisterEffect(e2,tp) -end -function c35629124.sumlimit(e,c) - return c:GetRace()~=RACE_DRAGON -end -function c35629124.filter(c,e,tp) - return c:IsRace(RACE_DRAGON) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c35629124.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c35629124.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c35629124.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c35629124.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c35631584.lua b/script/c35631584.lua deleted file mode 100644 index 01797be788..0000000000 --- a/script/c35631584.lua +++ /dev/null @@ -1,38 +0,0 @@ ---セイクリッドの星痕 -function c35631584.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --draw - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(35631584,0)) - e2:SetCategory(CATEGORY_DRAW) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetRange(LOCATION_SZONE) - e2:SetCountLimit(1) - e2:SetCondition(c35631584.con) - e2:SetTarget(c35631584.tg) - e2:SetOperation(c35631584.op) - c:RegisterEffect(e2) -end -function c35631584.gfilter(c,tp) - return c:IsSetCard(0x53) and c:IsType(TYPE_XYZ) and c:IsControler(tp) -end -function c35631584.con(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c35631584.gfilter,1,nil,tp) -end -function c35631584.tg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(1) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c35631584.op(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end diff --git a/script/c35638627.lua b/script/c35638627.lua deleted file mode 100644 index c741c53d1e..0000000000 --- a/script/c35638627.lua +++ /dev/null @@ -1,48 +0,0 @@ ---ワーム・ウォーロード -function c35638627.initial_effect(c) - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - c:RegisterEffect(e1) - --Disable - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_BATTLED) - e2:SetOperation(c35638627.disop) - c:RegisterEffect(e2) - --chain attack - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(35638627,0)) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_BATTLED) - e3:SetCondition(c35638627.atcon) - e3:SetOperation(c35638627.atop) - c:RegisterEffect(e3) -end -function c35638627.disop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetAttackTarget() - local c=e:GetHandler() - if c==tc then tc=Duel.GetAttacker() end - if tc and tc:IsType(TYPE_EFFECT) and tc:IsStatus(STATUS_BATTLE_DESTROYED) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0x17a0000) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+0x17a0000) - tc:RegisterEffect(e2) - end -end -function c35638627.atcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local bc=c:GetBattleTarget() - return bc and bc:IsStatus(STATUS_BATTLE_DESTROYED) and c:IsChainAttackable() and c:IsStatus(STATUS_OPPO_BATTLE) -end -function c35638627.atop(e,tp,eg,ep,ev,re,r,rp) - Duel.ChainAttack() -end diff --git a/script/c35686187.lua b/script/c35686187.lua deleted file mode 100644 index 72ed3cdb54..0000000000 --- a/script/c35686187.lua +++ /dev/null @@ -1,32 +0,0 @@ ---断頭台の惨劇 -function c35686187.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_CHANGE_POS) - e1:SetCondition(c35686187.condition) - e1:SetTarget(c35686187.target) - e1:SetOperation(c35686187.activate) - c:RegisterEffect(e1) -end -function c35686187.cfilter(c,tp) - return c:IsControler(tp) and c:IsPreviousPosition(POS_FACEUP_ATTACK) and c:IsPosition(POS_FACEUP_DEFENCE) -end -function c35686187.condition(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c35686187.cfilter,1,nil,1-tp) -end -function c35686187.filter(c) - return c:IsDefencePos() and c:IsDestructable() -end -function c35686187.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c35686187.filter,tp,0,LOCATION_MZONE,1,nil) end - local g=Duel.GetMatchingGroup(c35686187.filter,tp,0,LOCATION_MZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c35686187.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c35686187.filter,tp,0,LOCATION_MZONE,nil) - if g:GetCount()>0 then - Duel.Destroy(g,REASON_EFFECT) - end -end diff --git a/script/c35752363.lua b/script/c35752363.lua deleted file mode 100644 index 58073fe5f2..0000000000 --- a/script/c35752363.lua +++ /dev/null @@ -1,6 +0,0 @@ ---朱雀 -function c35752363.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcCode2(c,62403074,71407486,true,true) -end diff --git a/script/c35762283.lua b/script/c35762283.lua deleted file mode 100644 index fb5dcdf631..0000000000 --- a/script/c35762283.lua +++ /dev/null @@ -1,50 +0,0 @@ ---凡骨の意地 -function c35762283.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --draw - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(35762283,0)) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetRange(LOCATION_SZONE) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_DRAW) - e2:SetCondition(c35762283.drcon) - e2:SetCost(c35762283.drcost) - e2:SetTarget(c35762283.drtg) - e2:SetOperation(c35762283.drop) - c:RegisterEffect(e2) -end -function c35762283.drcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp and Duel.GetCurrentPhase()==PHASE_DRAW -end -function c35762283.filter(c) - return c:IsType(TYPE_NORMAL) and not c:IsPublic() -end -function c35762283.drcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return ep==tp and eg:IsExists(c35762283.filter,1,nil) end - local g=eg:Filter(c35762283.filter,nil) - if g:GetCount()==1 then - Duel.ConfirmCards(1-tp,g) - Duel.ShuffleHand(tp) - else - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) - local sg=g:Select(tp,1,1,nil) - Duel.ConfirmCards(1-tp,sg) - Duel.ShuffleHand(tp) - end -end -function c35762283.drtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(1) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c35762283.drop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end diff --git a/script/c35781051.lua b/script/c35781051.lua deleted file mode 100644 index 25e0e309d0..0000000000 --- a/script/c35781051.lua +++ /dev/null @@ -1,97 +0,0 @@ ---アルカナフォースIII-THE EMPRESS -function c35781051.initial_effect(c) - --coin - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(35781051,0)) - e1:SetCategory(CATEGORY_COIN) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c35781051.cointg) - e1:SetOperation(c35781051.coinop) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e2) - local e3=e1:Clone() - e3:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - c:RegisterEffect(e3) -end -function c35781051.cointg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_COIN,nil,0,tp,1) -end -function c35781051.coinop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) or c:IsFacedown() then return end - local res=0 - if c:IsHasEffect(73206827) then - res=1-Duel.SelectOption(tp,60,61) - else res=Duel.TossCoin(tp,1) end - c35781051.arcanareg(c,res) -end -function c35781051.arcanareg(c,coin) - --coin effect - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(35781051,1)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c35781051.spcon) - e1:SetTarget(c35781051.sptg) - e1:SetOperation(c35781051.spop) - e1:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_MSET) - c:RegisterEffect(e2) - -- - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(35781051,2)) - e3:SetCategory(CATEGORY_TOGRAVE) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e3:SetCode(EVENT_SUMMON_SUCCESS) - e3:SetRange(LOCATION_MZONE) - e3:SetCondition(c35781051.tgcon) - e3:SetTarget(c35781051.tgtg) - e3:SetOperation(c35781051.tgop) - e3:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e3) - local e4=e3:Clone() - e4:SetCode(EVENT_MSET) - c:RegisterEffect(e4) - c:RegisterFlagEffect(36690018,RESET_EVENT+0x1ff0000,EFFECT_FLAG_CLIENT_HINT,1,coin,63-coin) -end -function c35781051.spcon(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp and e:GetHandler():GetFlagEffectLabel(36690018)==1 -end -function c35781051.spfilter(c,e,tp) - return c:IsSetCard(0x5) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c35781051.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c35781051.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c35781051.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c35781051.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - if g:GetCount()~=0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end -function c35781051.tgcon(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp and e:GetHandler():GetFlagEffectLabel(36690018)==0 -end -function c35781051.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_HAND) -end -function c35781051.tgop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_HAND,0,1,1,nil) - if g:GetCount()~=0 then - Duel.SendtoGrave(g,REASON_EFFECT) - end -end diff --git a/script/c35787450.lua b/script/c35787450.lua deleted file mode 100644 index d6bcc97859..0000000000 --- a/script/c35787450.lua +++ /dev/null @@ -1,28 +0,0 @@ ---エターナル・ドレッド -function c35787450.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_COUNTER) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c35787450.addcon) - e1:SetOperation(c35787450.addc) - c:RegisterEffect(e1) -end -function c35787450.check(tp) - local tc=Duel.GetFieldCard(tp,LOCATION_SZONE,5) - return tc and tc:IsFaceup() and tc:IsCode(75041269) -end -function c35787450.addcon(e,tp,eg,ep,ev,re,r,rp) - return c35787450.check(0) or c35787450.check(1) -end -function c35787450.addc(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFieldCard(tp,LOCATION_SZONE,5) - if tc and tc:IsFaceup() and tc:IsCode(75041269) then - tc:AddCounter(0x1b,2) - end - tc=Duel.GetFieldCard(1-tp,LOCATION_SZONE,5) - if tc and tc:IsFaceup() and tc:IsCode(75041269) then - tc:AddCounter(0x1b,2) - end -end diff --git a/script/c35798491.lua b/script/c35798491.lua deleted file mode 100644 index f2b641e071..0000000000 --- a/script/c35798491.lua +++ /dev/null @@ -1,47 +0,0 @@ ---ダークビショップデーモン -function c35798491.initial_effect(c) - --maintain - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCondition(c35798491.mtcon) - e1:SetOperation(c35798491.mtop) - c:RegisterEffect(e1) - --disable and destroy - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_CHAIN_SOLVING) - e2:SetRange(LOCATION_MZONE) - e2:SetOperation(c35798491.disop) - c:RegisterEffect(e2) -end -function c35798491.mtcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c35798491.mtop(e,tp,eg,ep,ev,re,r,rp) - if Duel.CheckLPCost(tp,500) then - Duel.PayLPCost(tp,500) - else - Duel.Destroy(e:GetHandler(),REASON_RULE) - end -end -function c35798491.filter(c,tp) - return c:IsLocation(LOCATION_MZONE) and c:IsControler(tp) and c:IsFaceup() and c:IsSetCard(0x45) -end -function c35798491.disop(e,tp,eg,ep,ev,re,r,rp) - if ep==tp then return end - if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end - local tg=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) - if not tg or not tg:IsExists(c35798491.filter,1,nil,tp) or not Duel.IsChainDisablable(ev) then return false end - local rc=re:GetHandler() - local dc=Duel.TossDice(tp,1) - if dc==1 or dc==3 or dc==6 then - Duel.NegateEffect(ev) - if rc:IsRelateToEffect(re) then - Duel.Destroy(rc,REASON_EFFECT) - end - end -end diff --git a/script/c3580032.lua b/script/c3580032.lua deleted file mode 100644 index e750ad77dc..0000000000 --- a/script/c3580032.lua +++ /dev/null @@ -1,109 +0,0 @@ ---伝説の預言者マーリン -function c3580032.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1,3580032) - e1:SetCost(c3580032.spcost) - e1:SetTarget(c3580032.sptg) - e1:SetOperation(c3580032.spop) - c:RegisterEffect(e1) - --synchro effect - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(3580032,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetRange(LOCATION_GRAVE) - e2:SetHintTiming(0,TIMING_END_PHASE+0x1c0) - e2:SetCountLimit(1,3580033) - e2:SetCost(c3580032.cost) - e2:SetTarget(c3580032.sctg) - e2:SetOperation(c3580032.scop) - c:RegisterEffect(e2) - --xyz effect - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(3580032,1)) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_QUICK_O) - e3:SetCode(EVENT_FREE_CHAIN) - e3:SetRange(LOCATION_GRAVE) - e3:SetHintTiming(0,TIMING_END_PHASE+0x1c0) - e3:SetCountLimit(1,3580034) - e3:SetCost(c3580032.cost) - e3:SetTarget(c3580032.xyztg) - e3:SetOperation(c3580032.xyzop) - c:RegisterEffect(e3) - Duel.AddCustomActivityCounter(3580032,ACTIVITY_SPSUMMON,c3580032.counterfilter) -end -function c3580032.counterfilter(c) - return c:IsSetCard(0x107a) -end -function c3580032.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() - and Duel.GetCustomActivityCount(3580032,tp,ACTIVITY_SPSUMMON)==0 end - Duel.Release(e:GetHandler(),REASON_COST) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) - e1:SetTargetRange(1,0) - e1:SetTarget(c3580032.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function c3580032.splimit(e,c,sump,sumtype,sumpos,targetp,se) - return not c:IsSetCard(0x107a) -end -function c3580032.spfilter(c,e,tp) - return c:IsSetCard(0x107a) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c3580032.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsExistingMatchingCard(c3580032.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c3580032.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c3580032.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end -function c3580032.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) -end -function c3580032.scfilter(c) - return c:IsSetCard(0x107a) and c:IsSynchroSummonable(nil) -end -function c3580032.sctg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c3580032.scfilter,tp,LOCATION_EXTRA,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function c3580032.scop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c3580032.scfilter,tp,LOCATION_EXTRA,0,nil) - if g:GetCount()>0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=g:Select(tp,1,1,nil) - Duel.SynchroSummon(tp,sg:GetFirst(),nil) - end -end -function c3580032.xyzfilter(c) - return c:IsSetCard(0x107a) and c:IsXyzSummonable(nil) -end -function c3580032.xyztg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c3580032.xyzfilter,tp,LOCATION_EXTRA,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function c3580032.xyzop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c3580032.xyzfilter,tp,LOCATION_EXTRA,0,nil) - if g:GetCount()>0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local tg=g:Select(tp,1,1,nil) - Duel.XyzSummon(tp,tg:GetFirst(),nil) - end -end diff --git a/script/c35800511.lua b/script/c35800511.lua deleted file mode 100644 index 7dadf007e0..0000000000 --- a/script/c35800511.lua +++ /dev/null @@ -1,84 +0,0 @@ ---超重武者装留バスター・ガントレット -function c35800511.initial_effect(c) - --equip - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_HAND+LOCATION_MZONE) - e1:SetTarget(c35800511.eqtg) - e1:SetOperation(c35800511.eqop) - c:RegisterEffect(e1) - --def - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetRange(LOCATION_HAND) - e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e2:SetHintTiming(TIMING_DAMAGE_STEP) - e2:SetCondition(c35800511.condition) - e2:SetCost(c35800511.cost) - e2:SetOperation(c35800511.operation) - c:RegisterEffect(e2) -end -function c35800511.filter(c) - return c:IsFaceup() and c:IsSetCard(0x9a) -end -function c35800511.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c35800511.filter(chkc) and chkc~=e:GetHandler() end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingTarget(c35800511.filter,tp,LOCATION_MZONE,0,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c35800511.filter,tp,LOCATION_MZONE,0,1,1,e:GetHandler()) -end -function c35800511.eqop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) then return end - if c:IsLocation(LOCATION_MZONE) and c:IsFacedown() then return end - local tc=Duel.GetFirstTarget() - if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or tc:GetControler()~=tp or tc:IsFacedown() or not tc:IsRelateToEffect(e) then - Duel.SendtoGrave(c,REASON_EFFECT) - return - end - Duel.Equip(tp,c,tc,true) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(c35800511.eqlimit) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_UPDATE_DEFENCE) - e2:SetValue(400) - e2:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e2) -end -function c35800511.eqlimit(e,c) - return c:IsSetCard(0x9a) -end -function c35800511.condition(e,tp,eg,ep,ev,re,r,rp) - if Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_GRAVE,0,1,nil,TYPE_SPELL+TYPE_TRAP) then return false end - local phase=Duel.GetCurrentPhase() - if phase~=PHASE_DAMAGE or Duel.IsDamageCalculated() then return false end - local tc=Duel.GetAttacker() - if tc:IsControler(1-tp) then tc=Duel.GetAttackTarget() end - e:SetLabelObject(tc) - return tc and tc:IsSetCard(0x9a) and tc:IsDefencePos() and tc:IsRelateToBattle() and Duel.GetAttackTarget()~=nil -end -function c35800511.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end -function c35800511.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetLabelObject() - if tc:IsRelateToBattle() and tc:IsFaceup() and tc:IsControler(tp) then - local def=tc:GetBaseDefence() - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_DEFENCE_FINAL) - e1:SetValue(def*2) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - end -end diff --git a/script/c35803249.lua b/script/c35803249.lua deleted file mode 100644 index 206a012560..0000000000 --- a/script/c35803249.lua +++ /dev/null @@ -1,96 +0,0 @@ ---人造人間-サイコ・ロード -function c35803249.initial_effect(c) - c:EnableReviveLimit() - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(aux.FALSE) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_SPSUMMON_PROC) - e2:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e2:SetRange(LOCATION_HAND) - e2:SetCondition(c35803249.spcon) - e2:SetOperation(c35803249.spop) - c:RegisterEffect(e2) - --cannot trigger - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetCode(EFFECT_CANNOT_TRIGGER) - e3:SetProperty(EFFECT_FLAG_SET_AVAILABLE) - e3:SetRange(LOCATION_MZONE) - e3:SetTargetRange(0xa,0xa) - e3:SetTarget(c35803249.distg) - c:RegisterEffect(e3) - --disable - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_FIELD) - e4:SetCode(EFFECT_DISABLE) - e4:SetRange(LOCATION_MZONE) - e4:SetTargetRange(LOCATION_SZONE,LOCATION_SZONE) - e4:SetTarget(c35803249.distg) - c:RegisterEffect(e4) - --disable effect - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e5:SetCode(EVENT_CHAIN_SOLVING) - e5:SetRange(LOCATION_MZONE) - e5:SetOperation(c35803249.disop) - c:RegisterEffect(e5) - --disable trap monster - local e6=Effect.CreateEffect(c) - e6:SetType(EFFECT_TYPE_FIELD) - e6:SetCode(EFFECT_DISABLE_TRAPMONSTER) - e6:SetRange(LOCATION_MZONE) - e6:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e6:SetTarget(c35803249.distg) - c:RegisterEffect(e6) - --destroy - local e7=Effect.CreateEffect(c) - e7:SetDescription(aux.Stringid(35803249,0)) - e7:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE) - e7:SetType(EFFECT_TYPE_IGNITION) - e7:SetRange(LOCATION_MZONE) - e7:SetCountLimit(1) - e7:SetTarget(c35803249.destg) - e7:SetOperation(c35803249.desop) - c:RegisterEffect(e7) -end -function c35803249.distg(e,c) - return c:IsType(TYPE_TRAP) -end -function c35803249.disop(e,tp,eg,ep,ev,re,r,rp) - local tl=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION) - if tl==LOCATION_SZONE and re:IsActiveType(TYPE_TRAP) then - Duel.NegateEffect(ev) - end -end -function c35803249.spfilter(c) - return c:IsFaceup() and c:IsCode(77585513) -end -function c35803249.spcon(e,c) - if c==nil then return true end - return Duel.CheckReleaseGroup(c:GetControler(),c35803249.spfilter,1,nil) -end -function c35803249.spop(e,tp,eg,ep,ev,re,r,rp,c) - local g=Duel.SelectReleaseGroup(tp,c35803249.spfilter,1,1,nil) - Duel.Release(g,REASON_COST) -end -function c35803249.filter(c) - return c:IsFaceup() and c:IsType(TYPE_TRAP) and c:IsDestructable() -end -function c35803249.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c35803249.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end - local sg=Duel.GetMatchingGroup(c35803249.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,sg:GetCount(),0,0) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,sg:GetCount()*300) -end -function c35803249.desop(e,tp,eg,ep,ev,re,r,rp) - local sg=Duel.GetMatchingGroup(c35803249.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) - local ct=Duel.Destroy(sg,REASON_EFFECT) - Duel.Damage(1-tp,ct*300,REASON_EFFECT) -end diff --git a/script/c35809262.lua b/script/c35809262.lua deleted file mode 100644 index 3edbefea4d..0000000000 --- a/script/c35809262.lua +++ /dev/null @@ -1,48 +0,0 @@ ---E・HERO フレイム・ウィングマン -function c35809262.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcCode2(c,21844576,58932615,true,true) - --spsummon condition - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(aux.fuslimit) - c:RegisterEffect(e1) - --damage - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(35809262,0)) - e2:SetCategory(CATEGORY_DAMAGE) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetCode(EVENT_BATTLE_DESTROYING) - e2:SetCondition(c35809262.damcon) - e2:SetTarget(c35809262.damtg) - e2:SetOperation(c35809262.damop) - c:RegisterEffect(e2) -end -function c35809262.damcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local bc=c:GetBattleTarget() - return c:IsRelateToBattle() and bc:IsLocation(LOCATION_GRAVE) and bc:IsType(TYPE_MONSTER) -end -function c35809262.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local bc=e:GetHandler():GetBattleTarget() - Duel.SetTargetCard(bc) - local dam=bc:GetAttack() - if dam<0 then dam=0 end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(dam) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,dam) -end -function c35809262.damop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) - local dam=tc:GetAttack() - if dam<0 then dam=0 end - Duel.Damage(p,dam,REASON_EFFECT) - end -end diff --git a/script/c35842855.lua b/script/c35842855.lua deleted file mode 100644 index 55cf08e3d1..0000000000 --- a/script/c35842855.lua +++ /dev/null @@ -1,81 +0,0 @@ ---炎霊神パイロレクス -function c35842855.initial_effect(c) - c:EnableReviveLimit() - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_SPSUMMON_PROC) - e2:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e2:SetRange(LOCATION_HAND) - e2:SetCondition(c35842855.spcon) - c:RegisterEffect(e2) - --destroy - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(35842855,0)) - e3:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - e3:SetCountLimit(1,35842855) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetTarget(c35842855.destg) - e3:SetOperation(c35842855.desop) - c:RegisterEffect(e3) - --leave - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e4:SetCode(EVENT_LEAVE_FIELD_P) - e4:SetOperation(c35842855.leaveop) - c:RegisterEffect(e4) -end -function c35842855.spcon(e,c) - if c==nil then return true end - return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and - Duel.GetMatchingGroupCount(Card.IsAttribute,c:GetControler(),LOCATION_GRAVE,0,nil,ATTRIBUTE_FIRE)==5 -end -function c35842855.filter(c) - return c:IsDestructable() -end -function c35842855.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c35842855.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c35842855.filter,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c35842855.filter,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,PLAYER_ALL,0) -end -function c35842855.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)==1 then - local atk=tc:GetTextAttack()/2 - if atk>0 then - Duel.Damage(tp,atk,REASON_EFFECT) - Duel.Damage(1-tp,atk,REASON_EFFECT) - end - end -end -function c35842855.leaveop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsFacedown() then return end - local effp=e:GetHandler():GetControler() - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SKIP_BP) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetTargetRange(1,0) - if Duel.GetTurnPlayer()==effp then - e1:SetLabel(Duel.GetTurnCount()) - e1:SetCondition(c35842855.skipcon) - e1:SetReset(RESET_PHASE+PHASE_END+RESET_SELF_TURN,2) - else - e1:SetReset(RESET_PHASE+PHASE_END+RESET_SELF_TURN,1) - end - Duel.RegisterEffect(e1,effp) -end -function c35842855.skipcon(e) - return Duel.GetTurnCount()~=e:GetLabel() -end diff --git a/script/c35848254.lua b/script/c35848254.lua deleted file mode 100644 index 4c08f9d6be..0000000000 --- a/script/c35848254.lua +++ /dev/null @@ -1,27 +0,0 @@ ---フォトン・リード -function c35848254.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c35848254.target) - e1:SetOperation(c35848254.activate) - c:RegisterEffect(e1) -end -function c35848254.filter(c,e,tp) - return c:IsLevelBelow(4) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c35848254.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c35848254.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c35848254.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c35848254.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_ATTACK) - end -end diff --git a/script/c35866404.lua b/script/c35866404.lua deleted file mode 100644 index 4e2851eccc..0000000000 --- a/script/c35866404.lua +++ /dev/null @@ -1,20 +0,0 @@ ---グランドラン -function c35866404.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_SPSUM_PARAM) - e1:SetRange(LOCATION_HAND) - e1:SetTargetRange(POS_FACEUP_ATTACK,0) - e1:SetCondition(c35866404.spcon) - c:RegisterEffect(e1) -end -function c35866404.filter(c) - return c:IsFaceup() and c:IsType(TYPE_XYZ) -end -function c35866404.spcon(e,c) - if c==nil then return true end - return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c35866404.filter,c:GetControler(),0,LOCATION_MZONE,1,nil) -end diff --git a/script/c35884610.lua b/script/c35884610.lua deleted file mode 100644 index d0763c9256..0000000000 --- a/script/c35884610.lua +++ /dev/null @@ -1,135 +0,0 @@ ---U.A.パワードギプス -function c35884610.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c35884610.target) - e1:SetOperation(c35884610.operation) - c:RegisterEffect(e1) - --Equip limit - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_EQUIP_LIMIT) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetValue(c35884610.eqlimit) - c:RegisterEffect(e2) - --Atk Def up - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_EQUIP) - e3:SetCode(EFFECT_UPDATE_ATTACK) - e3:SetValue(1000) - c:RegisterEffect(e3) - local e4=e3:Clone() - e4:SetCode(EFFECT_UPDATE_DEFENCE) - c:RegisterEffect(e4) - --damage double - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e5:SetRange(LOCATION_SZONE) - e5:SetCode(EVENT_PRE_BATTLE_DAMAGE) - e5:SetCondition(c35884610.damcon) - e5:SetOperation(c35884610.damop) - c:RegisterEffect(e5) - --chain atk - local e6=Effect.CreateEffect(c) - e6:SetDescription(aux.Stringid(35884610,0)) - e6:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e6:SetRange(LOCATION_SZONE) - e6:SetCode(EVENT_BATTLED) - e6:SetCondition(c35884610.atcon) - e6:SetOperation(c35884610.atop) - c:RegisterEffect(e6) - --remove - local e7=Effect.CreateEffect(c) - e7:SetCategory(CATEGORY_REMOVE) - e7:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e7:SetRange(LOCATION_SZONE) - e7:SetCode(EVENT_PHASE+PHASE_STANDBY) - e7:SetCountLimit(1) - e7:SetCondition(c35884610.rmcon) - e7:SetTarget(c35884610.rmtg) - e7:SetOperation(c35884610.rmop) - c:RegisterEffect(e7) - --to hand - local e8=Effect.CreateEffect(c) - e8:SetDescription(aux.Stringid(35884610,1)) - e8:SetCategory(CATEGORY_TOHAND) - e8:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e8:SetProperty(EFFECT_FLAG_DELAY) - e8:SetCode(EVENT_TO_GRAVE) - e8:SetCondition(c35884610.thcon) - e8:SetTarget(c35884610.thtg) - e8:SetOperation(c35884610.thop) - c:RegisterEffect(e8) -end -function c35884610.eqlimit(e,c) - return c:IsSetCard(0xb2) -end -function c35884610.filter(c) - return c:IsFaceup() and c:IsSetCard(0xb2) -end -function c35884610.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c35884610.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c35884610.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c35884610.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c35884610.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,e:GetHandler(),tc) - end -end -function c35884610.damcon(e,tp,eg,ep,ev,re,r,rp) - return eg:GetFirst()==e:GetHandler():GetEquipTarget() and ep~=tp and eg:GetFirst():GetBattleTarget()~=nil -end -function c35884610.damop(e,tp,eg,ep,ev,re,r,rp) - Duel.ChangeBattleDamage(ep,ev*2) -end -function c35884610.atcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler():GetEquipTarget() - local bc=c:GetBattleTarget() - return bc and bc:IsStatus(STATUS_BATTLE_DESTROYED) and c:IsChainAttackable() -end -function c35884610.atop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=e:GetHandler():GetEquipTarget() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_EXTRA_ATTACK) - e1:SetValue(1) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_BATTLE) - tc:RegisterEffect(e1) -end -function c35884610.rmcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c35884610.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_REMOVE,e:GetHandler():GetEquipTarget(),1,0,0) -end -function c35884610.rmop(e,tp,eg,ep,ev,re,r,rp) - local ec=e:GetHandler():GetEquipTarget() - if ec then - Duel.Remove(ec,POS_FACEUP,REASON_EFFECT) - end -end -function c35884610.thcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsReason(REASON_LOST_TARGET) and c:GetPreviousEquipTarget():IsLocation(LOCATION_HAND) -end -function c35884610.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToHand() end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0) -end -function c35884610.thop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SendtoHand(c,nil,REASON_EFFECT) - end -end diff --git a/script/c35950025.lua b/script/c35950025.lua deleted file mode 100644 index ae1535d5cb..0000000000 --- a/script/c35950025.lua +++ /dev/null @@ -1,59 +0,0 @@ ---銀河騎士 -function c35950025.initial_effect(c) - --summon with no tribute - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(35950025,0)) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SUMMON_PROC) - e1:SetCondition(c35950025.ntcon) - e1:SetValue(1) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(35950025,1)) - e2:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_SUMMON_SUCCESS) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCondition(c35950025.spcon) - e2:SetTarget(c35950025.sptg) - e2:SetOperation(c35950025.spop) - c:RegisterEffect(e2) -end -function c35950025.cfilter(c) - return c:IsFaceup() and (c:IsSetCard(0x55) or c:IsSetCard(0x7b)) -end -function c35950025.ntcon(e,c,minc) - if c==nil then return true end - return minc==0 and c:GetLevel()>4 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c35950025.cfilter,c:GetControler(),LOCATION_MZONE,0,1,nil) -end -function c35950025.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_NORMAL+1 -end -function c35950025.spfilter(c,e,tp) - return c:IsCode(93717133) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c35950025.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c35950025.spfilter(chkc,e,tp) end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c35950025.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,g:GetCount(),0,0,nil) -end -function c35950025.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFaceup() and c:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(-1000) - e1:SetReset(RESET_EVENT+0x1ff0000+RESET_PHASE+PHASE_END) - c:RegisterEffect(e1) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENCE) - end - end -end diff --git a/script/c35952884.lua b/script/c35952884.lua deleted file mode 100644 index cc6d918397..0000000000 --- a/script/c35952884.lua +++ /dev/null @@ -1,110 +0,0 @@ ---シューティング・クェーサー・ドラゴン -function c35952884.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsType,TYPE_SYNCHRO),aux.NonTuner(Card.IsType,TYPE_SYNCHRO),2) - c:EnableReviveLimit() - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(aux.synlimit) - c:RegisterEffect(e1) - --multi attack - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetCondition(c35952884.mtcon) - e2:SetOperation(c35952884.mtop) - c:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_MATERIAL_CHECK) - e3:SetValue(c35952884.valcheck) - e3:SetLabelObject(e2) - c:RegisterEffect(e3) - --negate - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(35952884,0)) - e3:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) - e3:SetType(EFFECT_TYPE_QUICK_O) - e3:SetCode(EVENT_CHAINING) - e3:SetCountLimit(1) - e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) - e3:SetRange(LOCATION_MZONE) - e3:SetCondition(c35952884.discon) - e3:SetTarget(c35952884.distg) - e3:SetOperation(c35952884.disop) - c:RegisterEffect(e3) - --Special Summon - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(35952884,1)) - e4:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE) - e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e4:SetCategory(CATEGORY_SPECIAL_SUMMON) - e4:SetCode(EVENT_TO_GRAVE) - e4:SetCondition(c35952884.sumcon) - e4:SetTarget(c35952884.sumtg) - e4:SetOperation(c35952884.sumop) - c:RegisterEffect(e4) - local e5=e4:Clone() - e5:SetCode(EVENT_REMOVE) - c:RegisterEffect(e5) - local e6=e4:Clone() - e6:SetCode(EVENT_TO_DECK) - c:RegisterEffect(e6) -end -function c35952884.mfilter(c) - return not c:IsType(TYPE_TUNER) -end -function c35952884.valcheck(e,c) - local g=c:GetMaterial() - local ct=g:FilterCount(c35952884.mfilter,nil) - e:GetLabelObject():SetLabel(ct) -end -function c35952884.mtcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_SYNCHRO and e:GetLabel()>0 -end -function c35952884.mtop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local ct=e:GetLabel() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_EXTRA_ATTACK) - e1:SetReset(RESET_EVENT+0x1ff0000) - e1:SetValue(ct-1) - c:RegisterEffect(e1) -end -function c35952884.discon(e,tp,eg,ep,ev,re,r,rp) - return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev) -end -function c35952884.distg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) - end -end -function c35952884.disop(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateActivation(ev) - if re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(eg,REASON_EFFECT) - end -end -function c35952884.sumcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousPosition(POS_FACEUP) and e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) -end -function c35952884.filter(c,e,tp) - return c:GetCode()==24696097 and c:IsCanBeSpecialSummoned(e,0,tp,false,true) -end -function c35952884.sumtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c35952884.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function c35952884.sumop(e,tp,eg,ep,ev,re,r,rp) - local tg=Duel.GetFirstMatchingCard(c35952884.filter,tp,LOCATION_EXTRA,0,nil,e,tp) - if tg then - Duel.SpecialSummon(tg,0,tp,tp,false,true,POS_FACEUP) - end -end diff --git a/script/c35956022.lua b/script/c35956022.lua deleted file mode 100644 index 943f4d2463..0000000000 --- a/script/c35956022.lua +++ /dev/null @@ -1,29 +0,0 @@ ---アシッドレイン -function c35956022.initial_effect(c) - --activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --Atk up - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetTarget(c35956022.filter) - e2:SetValue(-500) - c:RegisterEffect(e2) - --Def down - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetRange(LOCATION_SZONE) - e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e3:SetCode(EFFECT_UPDATE_DEFENCE) - e3:SetTarget(c35956022.filter) - e3:SetValue(400) - c:RegisterEffect(e3) -end -function c35956022.filter(e,c) - return c:IsAttribute(ATTRIBUTE_EARTH) -end diff --git a/script/c359563.lua b/script/c359563.lua deleted file mode 100644 index 5e394d2b24..0000000000 --- a/script/c359563.lua +++ /dev/null @@ -1,33 +0,0 @@ ---ヴェルズ・ナイトメア -function c359563.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_DARK),4,2) - c:EnableReviveLimit() - --pos - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(359563,0)) - e1:SetCategory(CATEGORY_POSITION) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c359563.cost) - e1:SetTarget(c359563.target) - e1:SetOperation(c359563.operation) - c:RegisterEffect(e1) -end -function c359563.filter(c,e,tp) - return c:IsFaceup() and c:GetSummonPlayer()==1-tp and (not e or c:IsRelateToEffect(e)) -end -function c359563.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c359563.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return eg:IsExists(c359563.filter,1,nil,nil,tp) end - Duel.SetTargetCard(eg) - Duel.SetOperationInfo(0,CATEGORY_POSITION,eg,eg:GetCount(),0,0) -end -function c359563.operation(e,tp,eg,ep,ev,re,r,rp) - local g=eg:Filter(c359563.filter,nil,e,tp) - Duel.ChangePosition(g,POS_FACEDOWN_DEFENCE) -end diff --git a/script/c35975813.lua b/script/c35975813.lua deleted file mode 100644 index 701b5fbaf4..0000000000 --- a/script/c35975813.lua +++ /dev/null @@ -1,81 +0,0 @@ ---ジェノサイドキングデーモン -function c35975813.initial_effect(c) - --sumlimit - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_SUMMON) - e1:SetCondition(c35975813.excon) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_CANNOT_FLIP_SUMMON) - c:RegisterEffect(e2) - --maintain - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e3:SetCode(EVENT_PHASE+PHASE_STANDBY) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1) - e3:SetCondition(c35975813.mtcon) - e3:SetOperation(c35975813.mtop) - c:RegisterEffect(e3) - --disable and destroy - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e4:SetCode(EVENT_CHAIN_SOLVING) - e4:SetRange(LOCATION_MZONE) - e4:SetOperation(c35975813.disop) - c:RegisterEffect(e4) - --disable - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e5:SetCode(EVENT_BATTLED) - e5:SetRange(LOCATION_MZONE) - e5:SetOperation(c35975813.disop2) - c:RegisterEffect(e5) -end -function c35975813.exfilter(c) - return c:IsFaceup() and c:IsSetCard(0x45) -end -function c35975813.excon(e) - return not Duel.IsExistingMatchingCard(c35975813.exfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) -end -function c35975813.mtcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c35975813.mtop(e,tp,eg,ep,ev,re,r,rp) - if Duel.CheckLPCost(tp,800) then - Duel.PayLPCost(tp,800) - else - Duel.Destroy(e:GetHandler(),REASON_RULE) - end -end -function c35975813.disop(e,tp,eg,ep,ev,re,r,rp) - if ep==tp then return end - if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end - local tg=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) - if not tg or not tg:IsContains(e:GetHandler()) or not Duel.IsChainDisablable(ev) then return false end - local rc=re:GetHandler() - local dc=Duel.TossDice(tp,1) - if dc~=2 and dc~=5 then return end - Duel.NegateEffect(ev) - if rc:IsRelateToEffect(re) then - Duel.Destroy(rc,REASON_EFFECT) - end -end -function c35975813.disop2(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=c:GetBattleTarget() - if tc and tc:IsType(TYPE_EFFECT) and tc:IsStatus(STATUS_BATTLE_DESTROYED) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0x17a0000) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+0x17a0000) - tc:RegisterEffect(e2) - end -end diff --git a/script/c35984222.lua b/script/c35984222.lua deleted file mode 100644 index 4a38afd513..0000000000 --- a/script/c35984222.lua +++ /dev/null @@ -1,60 +0,0 @@ ---超魔神イド -function c35984222.initial_effect(c) - c:SetUniqueOnField(1,0,35984222) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetOperation(c35984222.spr) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(35984222,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetRange(LOCATION_GRAVE) - e2:SetCountLimit(1) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) - e2:SetCondition(c35984222.spcon) - e2:SetTarget(c35984222.sptg) - e2:SetOperation(c35984222.spop) - c:RegisterEffect(e2) - -- - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetRange(LOCATION_MZONE) - e3:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e3:SetTargetRange(1,0) - c:RegisterEffect(e3) - local e4=e3:Clone() - e4:SetCode(EFFECT_CANNOT_FLIP_SUMMON) - c:RegisterEffect(e4) - local e5=e3:Clone() - e5:SetCode(EFFECT_CANNOT_SUMMON) - c:RegisterEffect(e5) - local e6=e3:Clone() - e6:SetCode(EFFECT_CANNOT_MSET) - c:RegisterEffect(e6) -end -function c35984222.spr(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if bit.band(r,0x41)~=0x41 or c:IsPreviousLocation(LOCATION_SZONE) then return end - c:RegisterFlagEffect(35984222,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,2) -end -function c35984222.spcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:GetTurnID()~=Duel.GetTurnCount() and c:GetFlagEffect(35984222)>0 -end -function c35984222.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,LOCATION_MZONE,0,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c35984222.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,1,tp,tp,false,false,POS_FACEUP)~=0 then - local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,LOCATION_MZONE,0,c) - Duel.Destroy(g,REASON_EFFECT) - end -end diff --git a/script/c36006208.lua b/script/c36006208.lua deleted file mode 100644 index 45045599c2..0000000000 --- a/script/c36006208.lua +++ /dev/null @@ -1,90 +0,0 @@ ---彼岸の沈溺 -function c36006208.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,0x1e0) - e1:SetCost(c36006208.cost) - e1:SetTarget(c36006208.target) - e1:SetOperation(c36006208.activate) - c:RegisterEffect(e1) -end -function c36006208.filter(c) - return c:IsFaceup() and c:IsSetCard(0xb1) and c:IsAbleToGraveAsCost() -end -function c36006208.costfilter(c,rg,dg) - local a=0 - if dg:IsContains(c) then a=1 end - if c:GetEquipCount()==0 then return rg:IsExists(c36006208.costfilter2,1,c,a,dg) end - local eg=c:GetEquipGroup() - local tc=eg:GetFirst() - while tc do - if dg:IsContains(tc) then a=a+1 end - tc=eg:GetNext() - end - return rg:IsExists(c36006208.costfilter2,1,c,a,dg) -end -function c36006208.costfilter2(c,a,dg) - if dg:IsContains(c) then a=a+1 end - if c:GetEquipCount()==0 then return dg:GetCount()-a>=1 end - local eg=c:GetEquipGroup() - local tc=eg:GetFirst() - while tc do - if dg:IsContains(tc) then a=a+1 end - tc=eg:GetNext() - end - return dg:GetCount()-a>=1 -end -function c36006208.tgfilter(c,e) - return c:IsDestructable() and c:IsCanBeEffectTarget(e) -end -function c36006208.cost(e,tp,eg,ep,ev,re,r,rp,chk) - e:SetLabel(1) - return true -end -function c36006208.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsDestructable() end - if chk==0 then - if e:GetLabel()==1 then - e:SetLabel(0) - local rg=Duel.GetMatchingGroup(c36006208.filter,tp,LOCATION_MZONE,0,nil) - local dg=Duel.GetMatchingGroup(c36006208.tgfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler(),e) - return rg:IsExists(c36006208.costfilter,1,nil,rg,dg) - else - return Duel.IsExistingTarget(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) - end - end - if e:GetLabel()==1 then - e:SetLabel(0) - local rg=Duel.GetMatchingGroup(c36006208.filter,tp,LOCATION_MZONE,0,nil) - local dg=Duel.GetMatchingGroup(c36006208.tgfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler(),e) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local sg1=rg:FilterSelect(tp,c36006208.costfilter,1,1,nil,rg,dg) - local sc=sg1:GetFirst() - local a=0 - if dg:IsContains(sc) then a=1 end - if sc:GetEquipCount()>0 then - local eqg=sc:GetEquipGroup() - local tc=eqg:GetFirst() - while tc do - if dg:IsContains(tc) then a=a+1 end - tc=eqg:GetNext() - end - end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local sg2=rg:FilterSelect(tp,c36006208.costfilter2,1,1,sc,a,dg) - sg1:Merge(sg2) - Duel.SendtoGrave(sg1,REASON_COST) - end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,3,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c36006208.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local sg=g:Filter(Card.IsRelateToEffect,nil,e) - Duel.Destroy(sg,REASON_EFFECT) -end diff --git a/script/c36021814.lua b/script/c36021814.lua deleted file mode 100644 index 0b8e9613a2..0000000000 --- a/script/c36021814.lua +++ /dev/null @@ -1,54 +0,0 @@ ---ワイトキング -function c36021814.initial_effect(c) - --base attack - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_BASE_ATTACK) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetValue(c36021814.atkval) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(36021814,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_BATTLE_DESTROYED) - e2:SetCondition(c36021814.condition) - e2:SetCost(c36021814.cost) - e2:SetTarget(c36021814.target) - e2:SetOperation(c36021814.operation) - c:RegisterEffect(e2) -end -function c36021814.filter(c) - local code=c:GetCode() - return code==32274490 or code==36021814 -end -function c36021814.atkval(e,c) - return Duel.GetMatchingGroupCount(c36021814.filter,c:GetControler(),LOCATION_GRAVE,0,nil)*1000 -end -function c36021814.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsLocation(LOCATION_GRAVE) - and bit.band(e:GetHandler():GetReason(),REASON_BATTLE)~=0 -end -function c36021814.costfilter(c) - local code=c:GetCode() - return (code==32274490 or code==36021814) and c:IsAbleToRemoveAsCost() -end -function c36021814.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c36021814.costfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c36021814.costfilter,tp,LOCATION_GRAVE,0,1,1,e:GetHandler()) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c36021814.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c36021814.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - if e:GetHandler():IsRelateToEffect(e) then - Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c36029076.lua b/script/c36029076.lua deleted file mode 100644 index 1b9db1e518..0000000000 --- a/script/c36029076.lua +++ /dev/null @@ -1,30 +0,0 @@ ---地獄大百足 -function c36029076.initial_effect(c) - --summon with no tribute - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(36029076,0)) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SUMMON_PROC) - e1:SetCondition(c36029076.ntcon) - e1:SetOperation(c36029076.ntop) - c:RegisterEffect(e1) -end -function c36029076.ntcon(e,c,minc) - if c==nil then return true end - local tp=c:GetControler() - return minc==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0 - and Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 -end -function c36029076.ntop(e,tp,eg,ep,ev,re,r,rp,c) - --change base attack - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetReset(RESET_EVENT+0xff0000) - e1:SetCode(EFFECT_SET_BASE_ATTACK) - e1:SetValue(1300) - c:RegisterEffect(e1) -end diff --git a/script/c3603242.lua b/script/c3603242.lua deleted file mode 100644 index 7fa6d513ff..0000000000 --- a/script/c3603242.lua +++ /dev/null @@ -1,43 +0,0 @@ ---シュレツダー -function c3603242.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(3603242,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCost(c3603242.descost) - e1:SetTarget(c3603242.destg) - e1:SetOperation(c3603242.desop) - c:RegisterEffect(e1) -end -function c3603242.cfilter(c,tp) - return c:IsRace(RACE_MACHINE) and c:IsAbleToGraveAsCost() - and Duel.IsExistingTarget(c3603242.dfilter,tp,0,LOCATION_MZONE,1,nil,c:GetLevel()) -end -function c3603242.dfilter(c,lv) - return c:IsFaceup() and c:IsLevelBelow(lv) and c:IsDestructable() -end -function c3603242.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c3603242.cfilter,tp,LOCATION_HAND,0,1,nil,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c3603242.cfilter,tp,LOCATION_HAND,0,1,1,nil,tp) - local lv=g:GetFirst():GetLevel() - e:SetLabel(lv) - Duel.SendtoGrave(g,REASON_COST) -end -function c3603242.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and c3603242.dfilter(chkc,e:GetLabel()) end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c3603242.dfilter,tp,0,LOCATION_MZONE,1,1,nil,e:GetLabel()) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c3603242.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsControler(1-tp) and tc:IsRelateToEffect(e) and tc:IsLevelBelow(e:GetLabel()) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c36039163.lua b/script/c36039163.lua deleted file mode 100644 index ab2145b4cf..0000000000 --- a/script/c36039163.lua +++ /dev/null @@ -1,27 +0,0 @@ ---ペンギン・ナイト -function c36039163.initial_effect(c) - --to deck - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(36039163,0)) - e1:SetCategory(CATEGORY_TODECK) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCondition(c36039163.tdcon) - e1:SetTarget(c36039163.tdtg) - e1:SetOperation(c36039163.tdop) - c:RegisterEffect(e1) -end -function c36039163.tdcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_DECK) and bit.band(r,REASON_EFFECT)~=0 and rp==1-tp -end -function c36039163.tdtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local g=Duel.GetFieldGroup(tp,LOCATION_GRAVE,0) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0) -end -function c36039163.tdop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetFieldGroup(tp,LOCATION_GRAVE,0) - if Duel.SendtoDeck(g,nil,0,REASON_EFFECT)~=0 then - Duel.ShuffleDeck(tp) - end -end diff --git a/script/c36042004.lua b/script/c36042004.lua deleted file mode 100644 index 859b93645a..0000000000 --- a/script/c36042004.lua +++ /dev/null @@ -1,33 +0,0 @@ ---ベビケラサウルス -function c36042004.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(36042004,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCondition(c36042004.condition) - e1:SetTarget(c36042004.target) - e1:SetOperation(c36042004.operation) - c:RegisterEffect(e1) -end -function c36042004.condition(e,tp,eg,ep,ev,re,r,rp) - return bit.band(r,0x41)==0x41 -end -function c36042004.filter(c,e,tp) - return c:IsLevelBelow(4) and c:IsRace(RACE_DINOSAUR) - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c36042004.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c36042004.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c36042004.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c36042825.lua b/script/c36042825.lua deleted file mode 100644 index 45c391e57f..0000000000 --- a/script/c36042825.lua +++ /dev/null @@ -1,69 +0,0 @@ ---ワンショット・ワンド -function c36042825.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c36042825.target) - e1:SetOperation(c36042825.operation) - c:RegisterEffect(e1) - --Atk up - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(800) - c:RegisterEffect(e2) - --Equip limit - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_EQUIP_LIMIT) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e3:SetValue(c36042825.eqlimit) - c:RegisterEffect(e3) - --draw - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(36042825,0)) - e4:SetCategory(CATEGORY_DESTROY+CATEGORY_DRAW) - e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e4:SetCode(EVENT_BATTLED) - e4:SetRange(LOCATION_SZONE) - e4:SetCondition(c36042825.drcon) - e4:SetTarget(c36042825.drtg) - e4:SetOperation(c36042825.drop) - c:RegisterEffect(e4) -end -function c36042825.eqlimit(e,c) - return c:IsRace(RACE_SPELLCASTER) -end -function c36042825.filter(c) - return c:IsFaceup() and c:IsRace(RACE_SPELLCASTER) -end -function c36042825.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c36042825.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c36042825.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c36042825.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c36042825.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,e:GetHandler(),tc) - end -end -function c36042825.drcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetEquipTarget():IsRelateToBattle() -end -function c36042825.drtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c36042825.drop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.Destroy(c,REASON_EFFECT)>0 then - Duel.Draw(tp,1,REASON_EFFECT) - end -end diff --git a/script/c36045450.lua b/script/c36045450.lua deleted file mode 100644 index 35c397759c..0000000000 --- a/script/c36045450.lua +++ /dev/null @@ -1,48 +0,0 @@ ---マジシャンズ・クロス -function c36045450.initial_effect(c) - --atkup - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c36045450.condition) - e1:SetTarget(c36045450.target) - e1:SetOperation(c36045450.operation) - c:RegisterEffect(e1) -end -function c36045450.filter(c) - return c:IsPosition(POS_FACEUP_ATTACK) and c:IsRace(RACE_SPELLCASTER) -end -function c36045450.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c36045450.filter,tp,LOCATION_MZONE,0,2,nil) -end -function c36045450.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c36045450.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c36045450.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - local g=Duel.SelectTarget(tp,c36045450.filter,tp,LOCATION_MZONE,0,1,1,nil) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetProperty(EFFECT_FLAG_OATH+EFFECT_FLAG_IGNORE_IMMUNE) - e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetTarget(c36045450.ftarget) - e1:SetLabel(g:GetFirst():GetFieldID()) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function c36045450.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetValue(3000) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - end -end -function c36045450.ftarget(e,c) - return e:GetLabel()~=c:GetFieldID() and c:IsRace(RACE_SPELLCASTER) -end diff --git a/script/c36046926.lua b/script/c36046926.lua deleted file mode 100644 index ce37c89426..0000000000 --- a/script/c36046926.lua +++ /dev/null @@ -1,70 +0,0 @@ ---森羅の水先 リーフ -function c36046926.initial_effect(c) - --deck - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(36046926,0)) - e1:SetCategory(CATEGORY_TOGRAVE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c36046926.target) - e1:SetOperation(c36046926.operation) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(36046926,2)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetCondition(c36046926.descon) - e2:SetTarget(c36046926.destg) - e2:SetOperation(c36046926.desop) - c:RegisterEffect(e2) -end -function c36046926.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,1) end -end -function c36046926.operation(e,tp,eg,ep,ev,re,r,rp) - if not Duel.IsPlayerCanDiscardDeck(tp,1) then return end - local ct=Duel.GetFieldGroupCount(tp,LOCATION_DECK,0) - if ct==0 then return end - local ac=1 - if ct>1 then - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(36046926,1)) - ac=Duel.AnnounceNumber(tp,1,2) - end - Duel.ConfirmDecktop(tp,ac) - local g=Duel.GetDecktopGroup(tp,ac) - local sg=g:Filter(Card.IsRace,nil,RACE_PLANT) - if sg:GetCount()>0 then - Duel.DisableShuffleCheck() - Duel.SendtoGrave(sg,REASON_EFFECT+REASON_REVEAL) - end - ac=ac-sg:GetCount() - if ac>0 then - Duel.SortDecktop(tp,tp,ac) - for i=1,ac do - local mg=Duel.GetDecktopGroup(tp,1) - Duel.MoveSequence(mg:GetFirst(),1) - end - end -end -function c36046926.descon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsPreviousLocation(LOCATION_DECK) and - (c:IsReason(REASON_REVEAL) or c:GetPreviousPosition()==POS_FACEUP_DEFENCE or Duel.IsPlayerAffectedByEffect(tp,EFFECT_REVERSE_DECK)) -end -function c36046926.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsDestructable() end - if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c36046926.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c3606728.lua b/script/c3606728.lua deleted file mode 100644 index c44e67e6f9..0000000000 --- a/script/c3606728.lua +++ /dev/null @@ -1,95 +0,0 @@ ---ガガガガール -function c3606728.initial_effect(c) - --lvchange - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(3606728,0)) - e1:SetCategory(CATEGORY_LVCHANGE) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c3606728.lvtg) - e1:SetOperation(c3606728.lvop) - c:RegisterEffect(e1) - --effect gain - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_BE_MATERIAL) - e2:SetCondition(c3606728.efcon) - e2:SetOperation(c3606728.efop) - c:RegisterEffect(e2) -end -function c3606728.lvfilter(c,lv) - return c:IsFaceup() and c:IsCode(26082117) and c:GetLevel()~=lv -end -function c3606728.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c3606728.lvfilter(chkc,e:GetHandler():GetLevel()) end - if chk==0 then return Duel.IsExistingTarget(c3606728.lvfilter,tp,LOCATION_MZONE,0,1,nil,e:GetHandler():GetLevel()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c3606728.lvfilter,tp,LOCATION_MZONE,0,1,1,nil,e:GetHandler():GetLevel()) -end -function c3606728.lvop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and c:IsFaceup() and tc:IsRelateToEffect(e) and tc:IsFaceup() then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CHANGE_LEVEL) - e1:SetValue(tc:GetLevel()) - e1:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e1) - end -end -function c3606728.ffilter(c) - return not c:IsSetCard(0x54) -end -function c3606728.efcon(e,tp,eg,ep,ev,re,r,rp) - local ec=e:GetHandler():GetReasonCard() - return not ec:GetMaterial():IsExists(c3606728.ffilter,1,nil) and r==REASON_XYZ -end -function c3606728.efop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_CARD,0,3606728) - local c=e:GetHandler() - local rc=c:GetReasonCard() - local e1=Effect.CreateEffect(rc) - e1:SetDescription(aux.Stringid(3606728,1)) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(c3606728.atkcon) - e1:SetTarget(c3606728.atktg) - e1:SetOperation(c3606728.atkop) - e1:SetReset(RESET_EVENT+0x1fe0000) - rc:RegisterEffect(e1,true) - if not rc:IsType(TYPE_EFFECT) then - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_ADD_TYPE) - e2:SetValue(TYPE_EFFECT) - e2:SetReset(RESET_EVENT+0x1fe0000) - rc:RegisterEffect(e2,true) - end -end -function c3606728.atkcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_XYZ -end -function c3606728.atkfilter(c) - return c:IsFaceup() and bit.band(c:GetSummonType(),SUMMON_TYPE_SPECIAL)==SUMMON_TYPE_SPECIAL -end -function c3606728.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c3606728.atkfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c3606728.atkfilter,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c3606728.atkfilter,tp,0,LOCATION_MZONE,1,1,nil) -end -function c3606728.atkop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) and tc:IsFaceup() then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetValue(0) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - end -end diff --git a/script/c36076683.lua b/script/c36076683.lua deleted file mode 100644 index d6f26624ef..0000000000 --- a/script/c36076683.lua +++ /dev/null @@ -1,53 +0,0 @@ ---No.73 激瀧神アビス・スプラッシュ -function c36076683.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_WATER),5,2) - c:EnableReviveLimit() - --atkup - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(36076683,0)) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCondition(c36076683.atkcon) - e1:SetCost(c36076683.atkcost) - e1:SetOperation(c36076683.atkop) - c:RegisterEffect(e1) -end -c36076683.xyz_number=73 -function c36076683.atkcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end -function c36076683.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c36076683.atkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetValue(c:GetAttack()*2) - e1:SetReset(RESET_EVENT+0x1ff0000+RESET_PHASE+PHASE_END+RESET_OPPO_TURN) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_CHANGE_DAMAGE) - e2:SetRange(LOCATION_MZONE) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetTargetRange(0,1) - e2:SetValue(c36076683.damval) - e2:SetReset(RESET_EVENT+0x1ff0000+RESET_PHASE+PHASE_END) - c:RegisterEffect(e2) - end -end -function c36076683.damval(e,re,dam,r,rp,rc) - if bit.band(r,REASON_BATTLE)~=0 and rc==e:GetHandler() then - return dam/2 - else return dam end -end diff --git a/script/c36088082.lua b/script/c36088082.lua deleted file mode 100644 index 5e8e8a7a3a..0000000000 --- a/script/c36088082.lua +++ /dev/null @@ -1,42 +0,0 @@ ---ブルブレーダー -function c36088082.initial_effect(c) - --level change - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(36088082,0)) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c36088082.regcon) - e1:SetOperation(c36088082.regop) - c:RegisterEffect(e1) -end -function c36088082.regcon(e,tp,eg,ep,ev,re,r,rp) - return (e:GetHandler()==Duel.GetAttacker() and Duel.GetAttackTarget()~=nil) or e:GetHandler()==Duel.GetAttackTarget() -end -function c36088082.regop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_NO_BATTLE_DAMAGE) - e1:SetReset(RESET_PHASE+PHASE_DAMAGE) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_AVOID_BATTLE_DAMAGE) - e2:SetValue(1) - c:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e3:SetCode(EVENT_BATTLED) - e3:SetOperation(c36088082.desop) - e3:SetReset(RESET_PHASE+PHASE_DAMAGE) - Duel.RegisterEffect(e3,tp) - end -end -function c36088082.desop(e,tp,eg,ep,ev,re,r,rp) - local tg=e:GetOwner():GetBattleTarget() - if tg then - Duel.Destroy(tg,REASON_EFFECT) - end -end diff --git a/script/c36099620.lua b/script/c36099620.lua deleted file mode 100644 index 1c0da9b380..0000000000 --- a/script/c36099620.lua +++ /dev/null @@ -1,52 +0,0 @@ ---ジャスティス・ワールド -function c36099620.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --Add counter - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetRange(LOCATION_SZONE) - e2:SetOperation(c36099620.acop) - c:RegisterEffect(e2) - --atkup - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetCode(EFFECT_UPDATE_ATTACK) - e3:SetRange(LOCATION_SZONE) - e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e3:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x38)) - e3:SetValue(c36099620.atkval) - c:RegisterEffect(e3) - --Destroy replace - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE) - e4:SetCode(EFFECT_DESTROY_REPLACE) - e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e4:SetRange(LOCATION_SZONE) - e4:SetTarget(c36099620.desreptg) - e4:SetOperation(c36099620.desrepop) - c:RegisterEffect(e4) -end -function c36099620.atkval(e,c) - return e:GetHandler():GetCounter(0x5)*100 -end -function c36099620.cfilter(c,tp) - return c:GetPreviousLocation()==LOCATION_DECK and c:GetPreviousControler()==tp -end -function c36099620.acop(e,tp,eg,ep,ev,re,r,rp) - if eg:IsExists(c36099620.cfilter,1,nil,tp) then - e:GetHandler():AddCounter(0x5,1) - end -end -function c36099620.desreptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return not e:GetHandler():IsReason(REASON_RULE) - and e:GetHandler():GetCounter(0x5)>=2 end - return true -end -function c36099620.desrepop(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():RemoveCounter(ep,0x5,2,REASON_EFFECT) -end diff --git a/script/c36100154.lua b/script/c36100154.lua deleted file mode 100644 index 8dba9f5c99..0000000000 --- a/script/c36100154.lua +++ /dev/null @@ -1,26 +0,0 @@ ---アマゾネスの闘志 -function c36100154.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --atk up - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_DAMAGE_CALCULATING) - e2:SetRange(LOCATION_SZONE) - e2:SetOperation(c36100154.atkup) - c:RegisterEffect(e2) -end -function c36100154.atkup(e,tp,eg,ep,ev,re,r,rp) - local a=Duel.GetAttacker() - local d=Duel.GetAttackTarget() - if not a:IsSetCard(0x4) or not d or a:GetAttack()>=d:GetAttack() then return end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_PHASE+RESET_DAMAGE_CAL) - e1:SetValue(1000) - a:RegisterEffect(e1) -end diff --git a/script/c36107810.lua b/script/c36107810.lua deleted file mode 100644 index d81681c98b..0000000000 --- a/script/c36107810.lua +++ /dev/null @@ -1,26 +0,0 @@ ---ナイトエンド・ソーサラー -function c36107810.initial_effect(c) - --remove - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(36107810,0)) - e1:SetCategory(CATEGORY_REMOVE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetTarget(c36107810.rmtg) - e1:SetOperation(c36107810.rmop) - c:RegisterEffect(e1) -end -function c36107810.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(1-tp) and chkc:IsAbleToRemove() end - if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,2,nil) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,0) -end -function c36107810.rmop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) - if g:GetCount()~=0 then - Duel.Remove(g,POS_FACEUP,REASON_EFFECT) - end -end diff --git a/script/c36183881.lua b/script/c36183881.lua deleted file mode 100644 index 4913792314..0000000000 --- a/script/c36183881.lua +++ /dev/null @@ -1,34 +0,0 @@ ---マジェスペクター・トルネード -function c36183881.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_REMOVE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c36183881.cost) - e1:SetTarget(c36183881.target) - e1:SetOperation(c36183881.activate) - c:RegisterEffect(e1) -end -function c36183881.cfilter(c) - return c:IsRace(RACE_SPELLCASTER) and c:IsAttribute(ATTRIBUTE_WIND) -end -function c36183881.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,c36183881.cfilter,1,nil) end - local g=Duel.SelectReleaseGroup(tp,c36183881.cfilter,1,1,nil) - Duel.Release(g,REASON_COST) -end -function c36183881.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsAbleToRemove() end - if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) -end -function c36183881.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) - end -end diff --git a/script/c36227804.lua b/script/c36227804.lua deleted file mode 100644 index 3344ca2dee..0000000000 --- a/script/c36227804.lua +++ /dev/null @@ -1,30 +0,0 @@ ---リチュア・ビースト -function c36227804.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(36227804,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c36227804.target) - e1:SetOperation(c36227804.operation) - c:RegisterEffect(e1) -end -function c36227804.filter(c,e,tp) - return c:IsLevelBelow(4) and c:IsSetCard(0x3a) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c36227804.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c36227804.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and - Duel.IsExistingTarget(c36227804.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c36227804.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c36227804.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENCE) - end -end diff --git a/script/c36256625.lua b/script/c36256625.lua deleted file mode 100644 index ba4de05ed2..0000000000 --- a/script/c36256625.lua +++ /dev/null @@ -1,11 +0,0 @@ ---スーパービークロイド-ジャンボドリル -function c36256625.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcCode3(c,44729197,71218746,99861526,false,false) - --pierce - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_PIERCE) - c:RegisterEffect(e1) -end diff --git a/script/c36261276.lua b/script/c36261276.lua deleted file mode 100644 index d817f4e0ee..0000000000 --- a/script/c36261276.lua +++ /dev/null @@ -1,38 +0,0 @@ ---亜空間物質転送装置 -function c36261276.initial_effect(c) - --remove - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_REMOVE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c36261276.target) - e1:SetOperation(c36261276.operation) - c:RegisterEffect(e1) -end -function c36261276.filter(c) - return c:IsFaceup() and c:IsAbleToRemove() -end -function c36261276.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c36261276.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c36261276.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,c36261276.filter,tp,LOCATION_MZONE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) -end -function c36261276.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsControler(tp) and Duel.Remove(tc,0,REASON_EFFECT+REASON_TEMPORARY)~=0 then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetReset(RESET_PHASE+PHASE_END) - e1:SetLabelObject(tc) - e1:SetCountLimit(1) - e1:SetOperation(c36261276.retop) - Duel.RegisterEffect(e1,tp) - end -end -function c36261276.retop(e,tp,eg,ep,ev,re,r,rp) - Duel.ReturnToField(e:GetLabelObject()) -end diff --git a/script/c36262024.lua b/script/c36262024.lua deleted file mode 100644 index ebc61b2793..0000000000 --- a/script/c36262024.lua +++ /dev/null @@ -1,33 +0,0 @@ ---黒竜の雛 -function c36262024.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(36262024,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c36262024.spcost) - e1:SetTarget(c36262024.sptg) - e1:SetOperation(c36262024.spop) - c:RegisterEffect(e1) -end -function c36262024.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end -function c36262024.filter(c,e,tp) - return c:GetCode()==74677422 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c36262024.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsExistingMatchingCard(c36262024.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c36262024.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c36262024.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c3627449.lua b/script/c3627449.lua deleted file mode 100644 index a3548bf364..0000000000 --- a/script/c3627449.lua +++ /dev/null @@ -1,4 +0,0 @@ ---ローガーディアン -function c3627449.initial_effect(c) - c:EnableReviveLimit() -end diff --git a/script/c36278828.lua b/script/c36278828.lua deleted file mode 100644 index dbb68330a5..0000000000 --- a/script/c36278828.lua +++ /dev/null @@ -1,27 +0,0 @@ ---ヴェノム・サーペント -function c36278828.initial_effect(c) - --add counter - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(36278828,0)) - e1:SetCategory(CATEGORY_COUNTER) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_MZONE) - e1:SetTarget(c36278828.target) - e1:SetOperation(c36278828.operation) - c:RegisterEffect(e1) -end -function c36278828.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsCanAddCounter(0x9,1) end - if chk==0 then return Duel.IsExistingTarget(Card.IsCanAddCounter,tp,0,LOCATION_MZONE,1,nil,0x9,1) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - local g=Duel.SelectTarget(tp,Card.IsCanAddCounter,tp,0,LOCATION_MZONE,1,1,nil,0x9,1) - Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,1,0,0) -end -function c36278828.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsCanAddCounter(0x9,1) then - tc:AddCounter(0x9,1) - end -end diff --git a/script/c36280194.lua b/script/c36280194.lua deleted file mode 100644 index 69f3b2cb68..0000000000 --- a/script/c36280194.lua +++ /dev/null @@ -1,34 +0,0 @@ ---補充要員 -function c36280194.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c36280194.condition) - e1:SetTarget(c36280194.target) - e1:SetOperation(c36280194.activate) - c:RegisterEffect(e1) -end -function c36280194.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_GRAVE,0,5,nil,TYPE_MONSTER) -end -function c36280194.filter(c) - return c:IsAttackBelow(1500) and c:IsType(TYPE_MONSTER) and not c:IsType(TYPE_EFFECT) and c:IsAbleToHand() -end -function c36280194.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c36280194.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c36280194.filter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c36280194.filter,tp,LOCATION_GRAVE,0,1,3,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0) -end -function c36280194.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local sg=g:Filter(Card.IsRelateToEffect,nil,e) - if sg:GetCount()>0 then - Duel.SendtoHand(sg,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,sg) - end -end diff --git a/script/c36318200.lua b/script/c36318200.lua deleted file mode 100644 index d1ca4bfa09..0000000000 --- a/script/c36318200.lua +++ /dev/null @@ -1,48 +0,0 @@ ---森の聖獣 ユニフォリア -function c36318200.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(36318200,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c36318200.spcon) - e1:SetCost(c36318200.spcost) - e1:SetTarget(c36318200.sptg) - e1:SetOperation(c36318200.spop) - c:RegisterEffect(e1) -end -function c36318200.cfilter(c) - return c:GetRace()~=RACE_BEAST -end -function c36318200.spcon(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsType,tp,LOCATION_GRAVE,0,nil,TYPE_MONSTER) - return g:GetCount()>0 and not g:IsExists(c36318200.cfilter,1,nil) -end -function c36318200.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end -function c36318200.filter(c,e,tp) - return not c:IsCode(36318200) and c:IsRace(RACE_BEAST) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) - and not c:IsHasEffect(EFFECT_NECRO_VALLEY) -end -function c36318200.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsExistingMatchingCard(c36318200.filter,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_HAND) -end -function c36318200.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c36318200.filter,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,1,nil,e,tp) - local tc=g:GetFirst() - if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - Duel.SpecialSummonComplete() - end -end diff --git a/script/c36331074.lua b/script/c36331074.lua deleted file mode 100644 index 36b8a08f76..0000000000 --- a/script/c36331074.lua +++ /dev/null @@ -1,46 +0,0 @@ ---ガスタの疾風 リーズ -function c36331074.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(36331074,0)) - e1:SetCategory(CATEGORY_CONTROL) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCost(c36331074.cost) - e1:SetTarget(c36331074.target) - e1:SetOperation(c36331074.operation) - c:RegisterEffect(e1) -end -function c36331074.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToDeckAsCost,tp,LOCATION_HAND,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectMatchingCard(tp,Card.IsAbleToDeckAsCost,tp,LOCATION_HAND,0,1,1,nil) - Duel.SendtoDeck(g,nil,1,REASON_COST) -end -function c36331074.filter1(c) - return c:IsFaceup() and c:IsSetCard(0x10) and c:IsAbleToChangeControler() -end -function c36331074.filter2(c) - return c:IsAbleToChangeControler() -end -function c36331074.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - if chk==0 then return Duel.IsExistingTarget(c36331074.filter2,tp,0,LOCATION_MZONE,1,nil) - and Duel.IsExistingTarget(c36331074.filter1,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) - local g1=Duel.SelectTarget(tp,c36331074.filter1,tp,LOCATION_MZONE,0,1,1,nil) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) - local g2=Duel.SelectTarget(tp,c36331074.filter2,tp,0,LOCATION_MZONE,1,1,nil) - g1:Merge(g2) - Duel.SetOperationInfo(0,CATEGORY_CONTROL,g1,2,0,0) -end -function c36331074.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local a=g:GetFirst() - local b=g:GetNext() - if a:IsRelateToEffect(e) and b:IsRelateToEffect(e) then - Duel.SwapControl(a,b) - end -end diff --git a/script/c36352429.lua b/script/c36352429.lua deleted file mode 100644 index 6c800309ab..0000000000 --- a/script/c36352429.lua +++ /dev/null @@ -1,33 +0,0 @@ ---ヴァンパイア・ドラゴン -function c36352429.initial_effect(c) - --search - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(36352429,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCondition(c36352429.condition) - e1:SetTarget(c36352429.target) - e1:SetOperation(c36352429.operation) - c:RegisterEffect(e1) -end -function c36352429.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) - and bit.band(e:GetHandler():GetSummonType(),SUMMON_TYPE_ADVANCE)==SUMMON_TYPE_ADVANCE -end -function c36352429.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c36352429.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c36352429.filter(c) - return c:IsLevelBelow(4) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() -end -function c36352429.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c36352429.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c36354007.lua b/script/c36354007.lua deleted file mode 100644 index d314aabc77..0000000000 --- a/script/c36354007.lua +++ /dev/null @@ -1,48 +0,0 @@ ---ギルフォード・ザ・ライトニング -function c36354007.initial_effect(c) - --summon with 3 tribute - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(36354007,0)) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SUMMON_PROC) - e1:SetCondition(c36354007.ttcon) - e1:SetOperation(c36354007.ttop) - e1:SetValue(SUMMON_TYPE_ADVANCE+1) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(36354007,1)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_SUMMON_SUCCESS) - e2:SetCondition(c36354007.descon) - e2:SetTarget(c36354007.destg) - e2:SetOperation(c36354007.desop) - c:RegisterEffect(e2) -end -function c36354007.ttcon(e,c) - if c==nil then return true end - return Duel.GetTributeCount(c)>=3 -end -function c36354007.ttop(e,tp,eg,ep,ev,re,r,rp,c) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) - local g=Duel.SelectTribute(tp,c,3,3) - c:SetMaterial(g) - Duel.Release(g, REASON_SUMMON+REASON_MATERIAL) -end -function c36354007.descon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_ADVANCE+1 -end -function c36354007.filter(c) - return c:IsDestructable() -end -function c36354007.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local g=Duel.GetMatchingGroup(c36354007.filter,tp,0,LOCATION_MZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0,nil) -end -function c36354007.desop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c36354007.filter,tp,0,LOCATION_MZONE,nil) - Duel.Destroy(g,REASON_EFFECT) -end diff --git a/script/c36361633.lua b/script/c36361633.lua deleted file mode 100644 index b3704ac93d..0000000000 --- a/script/c36361633.lua +++ /dev/null @@ -1,24 +0,0 @@ ---威嚇する咆哮 -function c36361633.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_MAIN_END) - e1:SetCondition(c36361633.condition) - e1:SetOperation(c36361633.activate) - c:RegisterEffect(e1) -end -function c36361633.condition(e,tp,eg,ep,ev,re,r,rp) - local ph=Duel.GetCurrentPhase() - return tp~=Duel.GetTurnPlayer() and bit.band(ph,PHASE_MAIN2+PHASE_END)==0 -end -function c36361633.activate(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetReset(RESET_PHASE+PHASE_END) - e1:SetTargetRange(0,1) - Duel.RegisterEffect(e1,tp) -end diff --git a/script/c36376145.lua b/script/c36376145.lua deleted file mode 100644 index 64ed60621f..0000000000 --- a/script/c36376145.lua +++ /dev/null @@ -1,39 +0,0 @@ ---魂の一撃 -function c36376145.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCountLimit(1,36376145+EFFECT_COUNT_CODE_OATH) - e1:SetCondition(c36376145.condition) - e1:SetCost(c36376145.cost) - e1:SetTarget(c36376145.target) - e1:SetOperation(c36376145.activate) - c:RegisterEffect(e1) -end -function c36376145.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetLP(tp)<=4000 and Duel.GetAttackTarget()~=nil -end -function c36376145.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.PayLPCost(tp,math.floor(Duel.GetLP(tp)/2)) -end -function c36376145.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,nil) -end -function c36376145.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(4000-Duel.GetLP(tp)) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END+RESET_OPPO_TURN) - tc:RegisterEffect(e1) - end -end diff --git a/script/c36378044.lua b/script/c36378044.lua deleted file mode 100644 index 1e0b7d6295..0000000000 --- a/script/c36378044.lua +++ /dev/null @@ -1,64 +0,0 @@ ---ラッキーパンチ -function c36378044.initial_effect(c) - --activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c36378044.atktg1) - e1:SetOperation(c36378044.atkop) - c:RegisterEffect(e1) - --atk change - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(36378044,0)) - e2:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_COIN) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_ATTACK_ANNOUNCE) - e2:SetRange(LOCATION_SZONE) - e2:SetLabel(1) - e2:SetCondition(c36378044.atkcon) - e2:SetTarget(c36378044.atktg2) - e2:SetOperation(c36378044.atkop) - c:RegisterEffect(e2) - --life lost - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e3:SetCode(EVENT_DESTROYED) - e3:SetOperation(c36378044.desop) - c:RegisterEffect(e3) -end -function c36378044.atkcon(e,tp,eg,ep,ev,re,r,rp) - return tp~=Duel.GetTurnPlayer() -end -function c36378044.atktg1(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - e:SetLabel(0) - if Duel.CheckEvent(EVENT_ATTACK_ANNOUNCE) and tp~=Duel.GetTurnPlayer() - and Duel.SelectYesNo(tp,aux.Stringid(36378044,1)) then - e:SetLabel(1) - Duel.SetOperationInfo(0,CATEGORY_COIN,nil,0,tp,3) - e:GetHandler():RegisterFlagEffect(36378044,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) - else e:SetLabel(0) end -end -function c36378044.atktg2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():GetFlagEffect(36378044)==0 end - Duel.SetOperationInfo(0,CATEGORY_COIN,nil,0,tp,3) - e:GetHandler():RegisterFlagEffect(36378044,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) -end -function c36378044.atkop(e,tp,eg,ep,ev,re,r,rp) - if e:GetLabel()==0 or not e:GetHandler():IsRelateToEffect(e) then return end - local r1,r2,r3=Duel.TossCoin(tp,3) - if r1+r2+r3==3 then - Duel.Draw(tp,3,REASON_EFFECT) - elseif r1+r2+r3==0 then - Duel.Destroy(e:GetHandler(),REASON_EFFECT) - end -end -function c36378044.desop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:GetPreviousControler()==tp and c:IsStatus(STATUS_ACTIVATED) then - local lp=Duel.GetLP(tp) - if lp>6000 then lp=lp-6000 - else lp=0 end - Duel.SetLP(tp,lp) - end -end diff --git a/script/c36378213.lua b/script/c36378213.lua deleted file mode 100644 index 409e5e227b..0000000000 --- a/script/c36378213.lua +++ /dev/null @@ -1,38 +0,0 @@ ---キューキューロイド -function c36378213.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(36378213,0)) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetCode(EVENT_TO_HAND) - e1:SetRange(LOCATION_MZONE) - e1:SetTarget(c36378213.target) - e1:SetOperation(c36378213.activate) - c:RegisterEffect(e1) -end -function c36378213.filter(c,e,tp) - return c:IsPreviousLocation(LOCATION_GRAVE) and c:GetPreviousControler()==tp and c:IsSetCard(0x16) - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c36378213.target(e,tp,eg,ep,ev,re,r,rp,chk) - local g=eg:Filter(c36378213.filter,nil,e,tp) - if chk==0 then return g:GetCount()~=0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end - Duel.SetTargetCard(eg) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c36378213.spfilter(c,e,tp) - return c:IsPreviousLocation(LOCATION_GRAVE) and c:GetPreviousControler()==tp and c:IsSetCard(0x16) - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsRelateToEffect(e) -end -function c36378213.activate(e,tp,eg,ep,ev,re,r,rp) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ft<=0 then return end - local g=eg:Filter(c36378213.spfilter,nil,e,tp) - if g:GetCount()==0 then return end - if g:GetCount()>ft then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - g=g:Select(tp,ft,ft,nil) - end - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) -end diff --git a/script/c36405256.lua b/script/c36405256.lua deleted file mode 100644 index 71c146bee2..0000000000 --- a/script/c36405256.lua +++ /dev/null @@ -1,50 +0,0 @@ ---時花の魔女-フルール・ド・ソルシエール -function c36405256.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(36405256,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetCountLimit(1,36405256) - e1:SetTarget(c36405256.sptg) - e1:SetOperation(c36405256.spop) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e2) -end -function c36405256.filter(c,e,tp) - return c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c36405256.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(1-tp) and c36405256.filter(chkc,e,tp) end - if chk==0 then return e:GetHandler():IsRelateToEffect(e) and e:GetHandler():IsFaceup() end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c36405256.filter,tp,0,LOCATION_GRAVE,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,g:GetCount(),0,0) -end -function c36405256.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)~=0 then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetOperation(c36405256.desop) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e1:SetCountLimit(1) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_CANNOT_DIRECT_ATTACK) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e2) - end -end -function c36405256.desop(e,tp,eg,ep,ev,re,r,rp) - Duel.Destroy(e:GetHandler(),REASON_EFFECT) -end diff --git a/script/c36407615.lua b/script/c36407615.lua deleted file mode 100644 index 8c5b0715ee..0000000000 --- a/script/c36407615.lua +++ /dev/null @@ -1,38 +0,0 @@ ---デーモン・カオス・キング -function c36407615.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsRace,RACE_FIEND),aux.NonTuner(nil),1) - c:EnableReviveLimit() - --atk/def swap - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(36407615,0)) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetTarget(c36407615.attg) - e1:SetOperation(c36407615.atop) - c:RegisterEffect(e1) -end -function c36407615.attg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end -end -function c36407615.atop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil) - local tc=g:GetFirst() - while tc do - local atk=tc:GetAttack() - local def=tc:GetDefence() - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetValue(def) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_BATTLE) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_SET_DEFENCE_FINAL) - e2:SetValue(atk) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_BATTLE) - tc:RegisterEffect(e2) - tc=g:GetNext() - end -end diff --git a/script/c36415522.lua b/script/c36415522.lua deleted file mode 100644 index 9967ccb273..0000000000 --- a/script/c36415522.lua +++ /dev/null @@ -1,112 +0,0 @@ ---EMピンチヘルパー -function c36415522.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_ATTACK) - e1:SetTarget(c36415522.sptg1) - e1:SetOperation(c36415522.spop) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_ATTACK_ANNOUNCE) - e2:SetRange(LOCATION_SZONE) - e2:SetCondition(c36415522.spcon) - e2:SetCost(c36415522.spcost) - e2:SetTarget(c36415522.sptg2) - e2:SetOperation(c36415522.spop) - c:RegisterEffect(e2) - --no damage - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_ATTACK_ANNOUNCE) - e3:SetRange(LOCATION_SZONE) - e3:SetCost(c36415522.atkcost) - e3:SetTarget(c36415522.atktg) - e3:SetOperation(c36415522.atkop) - c:RegisterEffect(e3) -end -function c36415522.filter(c,e,tp) - return c:IsSetCard(0x9f) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c36415522.sptg1(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - if Duel.CheckEvent(EVENT_ATTACK_ANNOUNCE) and Duel.GetAttacker():IsControler(1-tp) and Duel.GetAttackTarget()==nil - and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c36415522.filter,tp,LOCATION_DECK,0,1,nil,e,tp) - and Duel.SelectYesNo(tp,aux.Stringid(36415522,0)) then - e:SetCategory(CATEGORY_SPECIAL_SUMMON) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) - e:GetHandler():RegisterFlagEffect(36415522,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) - else - e:SetCategory(0) - end -end -function c36415522.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetAttacker():IsControler(1-tp) and Duel.GetAttackTarget()==nil -end -function c36415522.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():GetFlagEffect(36415522)==0 end - e:GetHandler():RegisterFlagEffect(36415522,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) -end -function c36415522.sptg2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsRelateToEffect(e) - and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c36415522.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c36415522.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:GetFlagEffect(36415522)==0 then return end - if not Duel.NegateAttack() then return end - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c36415522.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - local tc=g:GetFirst() - if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e2) - Duel.SpecialSummonComplete() - end -end -function c36415522.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end -function c36415522.atktg(e,tp,eg,ep,ev,re,r,rp,chk) - local a=Duel.GetAttacker() - local d=Duel.GetAttackTarget() - if chk==0 then return d and a:GetControler()~=d:GetControler() end - if a:IsControler(1-tp) then a=d end - e:SetLabelObject(a) -end -function c36415522.atkop(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetLabelObject() - if tc:IsRelateToBattle() and tc:IsFaceup() then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_AVOID_BATTLE_DAMAGE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetTargetRange(1,0) - e1:SetValue(1) - e1:SetCondition(c36415522.damcon) - e1:SetReset(RESET_PHASE+RESET_DAMAGE_CAL) - e1:SetLabelObject(tc) - Duel.RegisterEffect(e1,tp) - end -end -function c36415522.damcon(e) - local tc=e:GetLabelObject() - return tc==Duel.GetAttacker() or tc==Duel.GetAttackTarget() -end diff --git a/script/c3642509.lua b/script/c3642509.lua deleted file mode 100644 index a792e44ae9..0000000000 --- a/script/c3642509.lua +++ /dev/null @@ -1,47 +0,0 @@ ---E・HERO Great TORNADO -function c3642509.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcFun2(c,aux.FilterBoolFunction(Card.IsSetCard,0x3008),aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_WIND),true) - --atk up - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(3642509,0)) - e2:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetCondition(c3642509.atkcon) - e2:SetOperation(c3642509.atkop) - c:RegisterEffect(e2) - --spsummon condition - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e3:SetCode(EFFECT_SPSUMMON_CONDITION) - e3:SetValue(aux.fuslimit) - c:RegisterEffect(e3) -end -function c3642509.atkcon(e,tp,eg,ep,ev,re,r,rp) - return bit.band(e:GetHandler():GetSummonType(),SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION -end -function c3642509.atkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tg=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil) - local tc=tg:GetFirst() - while tc do - local atk=tc:GetAttack() - local def=tc:GetDefence() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetValue(atk/2) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_SET_DEFENCE_FINAL) - e2:SetValue(def/2) - e2:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e2) - tc=tg:GetNext() - end -end diff --git a/script/c3643300.lua b/script/c3643300.lua deleted file mode 100644 index 9719a9b997..0000000000 --- a/script/c3643300.lua +++ /dev/null @@ -1,30 +0,0 @@ ---伝説のフィッシャーマン -function c3643300.initial_effect(c) - --immune spell - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_IMMUNE_EFFECT) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c3643300.econ) - e1:SetValue(c3643300.efilter) - c:RegisterEffect(e1) - --atk - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetCode(EFFECT_IGNORE_BATTLE_TARGET) - e2:SetRange(LOCATION_MZONE) - e2:SetCondition(c3643300.econ) - c:RegisterEffect(e2) -end -function c3643300.filter(c) - return c:IsFaceup() and c:IsCode(22702055) -end -function c3643300.econ(e) - return Duel.IsExistingMatchingCard(c3643300.filter,0,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) - or Duel.IsEnvironment(22702055) -end -function c3643300.efilter(e,te) - return te:IsActiveType(TYPE_SPELL) -end diff --git a/script/c36442179.lua b/script/c36442179.lua deleted file mode 100644 index da26025e22..0000000000 --- a/script/c36442179.lua +++ /dev/null @@ -1,35 +0,0 @@ ---BF-竜巻のハリケーン -function c36442179.initial_effect(c) - --atk - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(36442179,0)) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetTarget(c36442179.target) - e1:SetOperation(c36442179.operation) - c:RegisterEffect(e1) -end -function c36442179.filter(c) - return c:IsFaceup() and c:IsType(TYPE_SYNCHRO) -end -function c36442179.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and c36442179.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c36442179.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c36442179.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) -end -function c36442179.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - local c=e:GetHandler() - if c:IsFaceup() and c:IsRelateToEffect(e) and tc and tc:IsFaceup() and tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetValue(tc:GetAttack()) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - c:RegisterEffect(e1) - end -end diff --git a/script/c36468556.lua b/script/c36468556.lua deleted file mode 100644 index 8e004c082f..0000000000 --- a/script/c36468556.lua +++ /dev/null @@ -1,32 +0,0 @@ ---停戦協定 -function c36468556.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_POSITION+CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_DRAW_PHASE) - e1:SetTarget(c36468556.target) - e1:SetOperation(c36468556.activate) - c:RegisterEffect(e1) -end -function c36468556.tgfilter(c) - return (c:IsFaceup() and c:IsType(TYPE_EFFECT)) or c:IsFacedown() -end -function c36468556.filter(c) - return c:IsFaceup() and c:IsType(TYPE_EFFECT) -end -function c36468556.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c36468556.tgfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - local dam=Duel.GetMatchingGroupCount(c36468556.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)*500 - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(dam) - if dam>0 then Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,dam) end -end -function c36468556.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsFacedown,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - Duel.ChangePosition(g,0x1,0x1,0x4,0x4,true) - local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) - local dam=Duel.GetMatchingGroupCount(c36468556.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)*500 - Duel.Damage(p,dam,REASON_EFFECT) -end diff --git a/script/c36472900.lua b/script/c36472900.lua deleted file mode 100644 index fc5283fb5e..0000000000 --- a/script/c36472900.lua +++ /dev/null @@ -1,12 +0,0 @@ ---ロードランナー -function c36472900.initial_effect(c) - --indes - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e1:SetValue(c36472900.indes) - c:RegisterEffect(e1) -end -function c36472900.indes(e,c) - return c:IsAttackAbove(1900) -end diff --git a/script/c3648368.lua b/script/c3648368.lua deleted file mode 100644 index 788e3a85cf..0000000000 --- a/script/c3648368.lua +++ /dev/null @@ -1,35 +0,0 @@ ---A・O・J リサーチャー -function c3648368.initial_effect(c) - --to hand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(3648368,0)) - e1:SetCategory(CATEGORY_POSITION) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCost(c3648368.cost) - e1:SetTarget(c3648368.target) - e1:SetOperation(c3648368.operation) - c:RegisterEffect(e1) -end -function c3648368.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD,nil) -end -function c3648368.filter(c) - return c:IsFacedown() and c:IsDefencePos() -end -function c3648368.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c3648368.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c3648368.filter,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEDOWNDEFENCE) - local g=Duel.SelectTarget(tp,c3648368.filter,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0) -end -function c3648368.operation(e,tp,eg,ep,ev,re,r,rp,chk) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and c3648368.filter(tc) then - Duel.ChangePosition(tc,0,0,0,POS_FACEUP_ATTACK,true) - end -end diff --git a/script/c36484016.lua b/script/c36484016.lua deleted file mode 100644 index bcc953e067..0000000000 --- a/script/c36484016.lua +++ /dev/null @@ -1,107 +0,0 @@ ---ミラクルシンクロフュージョン -function c36484016.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c36484016.target) - e1:SetOperation(c36484016.activate) - c:RegisterEffect(e1) - --draw - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(36484016,1)) - e2:SetCategory(CATEGORY_DRAW) - e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_PLAYER_TARGET) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetCondition(c36484016.drcon) - e2:SetTarget(c36484016.drtg) - e2:SetOperation(c36484016.drop) - c:RegisterEffect(e2) -end -function c36484016.filter0(c) - return c:IsCanBeFusionMaterial() and c:IsAbleToRemove() -end -function c36484016.filter1(c,e) - return c:IsCanBeFusionMaterial() and c:IsAbleToRemove() and not c:IsImmuneToEffect(e) -end -function c36484016.filter2(c,e,tp,m,f,chkf) - return c:IsType(TYPE_FUSION) and c:IsSetCard(0x101) and (not f or f(c)) - and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and m:IsExists(c36484016.filter3,1,nil,c,m,chkf) -end -function c36484016.filter3(c,fusc,m,chkf) - return c:IsType(TYPE_SYNCHRO) and fusc:CheckFusionMaterial(m,c,chkf) -end -function c36484016.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp - local mg1=Duel.GetMatchingGroup(c36484016.filter0,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil) - local res=Duel.IsExistingMatchingCard(c36484016.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf) - if not res then - local ce=Duel.GetChainMaterial(tp) - if ce~=nil then - local fgroup=ce:GetTarget() - local mg2=fgroup(ce,e,tp) - local mf=ce:GetValue() - res=Duel.IsExistingMatchingCard(c36484016.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,chkf) - end - end - return res - end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function c36484016.activate(e,tp,eg,ep,ev,re,r,rp) - local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp - local mg1=Duel.GetMatchingGroup(c36484016.filter1,tp,LOCATION_GRAVE+LOCATION_MZONE,0,nil,e) - local sg1=Duel.GetMatchingGroup(c36484016.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf) - local mg2=nil - local sg2=nil - local ce=Duel.GetChainMaterial(tp) - if ce~=nil then - local fgroup=ce:GetTarget() - mg2=fgroup(ce,e,tp) - local mf=ce:GetValue() - sg2=Duel.GetMatchingGroup(c36484016.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,mf,chkf) - end - if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then - local sg=sg1:Clone() - if sg2 then sg:Merge(sg2) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local tg=sg:Select(tp,1,1,nil) - local tc=tg:GetFirst() - if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL) - local gc=mg1:FilterSelect(tp,c36484016.filter3,1,1,nil,tc,mg1,chkf):GetFirst() - local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,gc,chkf) - mat1:AddCard(gc) - tc:SetMaterial(mat1) - Duel.Remove(mat1,POS_FACEUP,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION) - Duel.BreakEffect() - Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP) - else - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL) - local gc=mg2:FilterSelect(tp,c36484016.filter3,1,1,nil,tc,mg2,chkf):GetFirst() - local mat2=Duel.SelectFusionMaterial(tp,tc,mg2,gc,chkf) - mat2:AddCard(gc) - local fop=ce:GetOperation() - fop(ce,e,tp,tc,mat2) - end - tc:CompleteProcedure() - end -end -function c36484016.drcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return bit.band(r,0x41)==0x41 and rp~=tp and c:GetPreviousControler()==tp - and c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousPosition(POS_FACEDOWN) -end -function c36484016.drtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(1) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c36484016.drop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end diff --git a/script/c36499284.lua b/script/c36499284.lua deleted file mode 100644 index b599dbe631..0000000000 --- a/script/c36499284.lua +++ /dev/null @@ -1,47 +0,0 @@ ---炎舞-「揺光」 -function c36499284.initial_effect(c) - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c36499284.target) - e1:SetOperation(c36499284.activate) - c:RegisterEffect(e1) - -- - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(LOCATION_MZONE,0) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetTarget(aux.TargetBoolFunction(Card.IsRace,RACE_BEASTWARRIOR)) - e2:SetValue(100) - c:RegisterEffect(e2) -end -function c36499284.filter(c) - return c:IsFaceup() and c:IsDestructable() -end -function c36499284.filter2(c) - return c:IsRace(RACE_BEASTWARRIOR) and c:IsDiscardable() -end -function c36499284.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() and c36499284.filter(chkc) end - if chk==0 then return true end - if Duel.IsExistingTarget(c36499284.filter,tp,0,LOCATION_ONFIELD,1,nil) - and Duel.IsExistingMatchingCard(c36499284.filter2,tp,LOCATION_HAND,0,1,nil) - and Duel.SelectYesNo(tp,aux.Stringid(36499284,0)) then - e:SetProperty(EFFECT_FLAG_CARD_TARGET) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c36499284.filter,tp,0,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) - else - e:SetProperty(0) - end -end -function c36499284.activate(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local tc=Duel.GetFirstTarget() - if not tc then return end - if Duel.DiscardHand(tp,c36499284.filter2,1,1,REASON_EFFECT+REASON_DISCARD)>0 and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c36521459.lua b/script/c36521459.lua deleted file mode 100644 index a23b0fdce3..0000000000 --- a/script/c36521459.lua +++ /dev/null @@ -1,111 +0,0 @@ ---Sin スターダスト・ドラゴン -function c36521459.initial_effect(c) - c:EnableReviveLimit() - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c36521459.spcon) - e1:SetOperation(c36521459.spop) - c:RegisterEffect(e1) - --only 1 can exists - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_CANNOT_FLIP_SUMMON) - e2:SetCondition(c36521459.excon) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - c:RegisterEffect(e3) - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_FIELD) - e4:SetRange(LOCATION_MZONE) - e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e4:SetTargetRange(1,1) - e4:SetCode(EFFECT_CANNOT_SUMMON) - e4:SetTarget(c36521459.sumlimit) - c:RegisterEffect(e4) - local e5=e4:Clone() - e5:SetCode(EFFECT_CANNOT_FLIP_SUMMON) - c:RegisterEffect(e5) - local e6=e4:Clone() - e6:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - c:RegisterEffect(e6) - --selfdes - local e7=Effect.CreateEffect(c) - e7:SetType(EFFECT_TYPE_SINGLE) - e7:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e7:SetRange(LOCATION_MZONE) - e7:SetCode(EFFECT_SELF_DESTROY) - e7:SetCondition(c36521459.descon) - c:RegisterEffect(e7) - local e8=Effect.CreateEffect(c) - e8:SetType(EFFECT_TYPE_FIELD) - e8:SetCode(EFFECT_SELF_DESTROY) - e8:SetRange(LOCATION_MZONE) - e8:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e8:SetTarget(c36521459.destarget) - c:RegisterEffect(e8) - --cannot announce - local e8=Effect.CreateEffect(c) - e8:SetType(EFFECT_TYPE_FIELD) - e8:SetRange(LOCATION_MZONE) - e8:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE) - e8:SetTargetRange(LOCATION_MZONE,0) - e8:SetTarget(c36521459.antarget) - c:RegisterEffect(e8) - --indes - local e9=Effect.CreateEffect(c) - e9:SetType(EFFECT_TYPE_FIELD) - e9:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - e9:SetRange(LOCATION_MZONE) - e9:SetTargetRange(LOCATION_SZONE,LOCATION_SZONE) - e9:SetTarget(c36521459.indes) - e9:SetValue(1) - c:RegisterEffect(e9) - --spson - local ea=Effect.CreateEffect(c) - ea:SetType(EFFECT_TYPE_SINGLE) - ea:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - ea:SetCode(EFFECT_SPSUMMON_CONDITION) - ea:SetValue(aux.FALSE) - c:RegisterEffect(ea) -end -function c36521459.sumlimit(e,c) - return c:IsSetCard(0x23) -end -function c36521459.indes(e,c) - return c:IsFaceup() and c:GetSequence()==5 -end -function c36521459.exfilter(c) - return c:IsFaceup() and c:IsSetCard(0x23) -end -function c36521459.excon(e) - return Duel.IsExistingMatchingCard(c36521459.exfilter,0,LOCATION_MZONE,LOCATION_MZONE,1,nil) -end -function c36521459.spfilter(c) - return c:IsCode(44508094) and c:IsAbleToRemoveAsCost() -end -function c36521459.spcon(e,c) - if c==nil then return true end - return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c36521459.spfilter,c:GetControler(),LOCATION_EXTRA,0,1,nil) - and not Duel.IsExistingMatchingCard(c36521459.exfilter,0,LOCATION_MZONE,LOCATION_MZONE,1,nil) -end -function c36521459.spop(e,tp,eg,ep,ev,re,r,rp,c) - local tc=Duel.GetFirstMatchingCard(c36521459.spfilter,tp,LOCATION_EXTRA,0,nil) - Duel.Remove(tc,POS_FACEUP,REASON_COST) -end -function c36521459.descon(e) - local f1=Duel.GetFieldCard(0,LOCATION_SZONE,5) - local f2=Duel.GetFieldCard(1,LOCATION_SZONE,5) - return (f1==nil or f1:IsFacedown()) and (f2==nil or f2:IsFacedown()) -end -function c36521459.destarget(e,c) - return c:IsSetCard(0x23) and c:GetFieldID()>e:GetHandler():GetFieldID() -end -function c36521459.antarget(e,c) - return c~=e:GetHandler() -end diff --git a/script/c36523152.lua b/script/c36523152.lua deleted file mode 100644 index c454906bf1..0000000000 --- a/script/c36523152.lua +++ /dev/null @@ -1,51 +0,0 @@ ---超重武者ビッグワラ-G -function c36523152.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetValue(1) - e1:SetCondition(c36523152.spcon) - c:RegisterEffect(e1) - --spsummon limit - local e2=Effect.CreateEffect(c) - e2:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetCondition(c36523152.limcon) - e2:SetOperation(c36523152.limop) - c:RegisterEffect(e2) - --double tribute - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_DOUBLE_TRIBUTE) - e3:SetValue(c36523152.condition) - c:RegisterEffect(e3) -end -function c36523152.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and not Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_GRAVE,0,1,nil,TYPE_SPELL+TYPE_TRAP) -end -function c36523152.limcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+1 -end -function c36523152.limop(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetTargetRange(1,0) - e1:SetTarget(c36523152.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function c36523152.splimit(e,c,sump,sumtype,sumpos,targetp,se) - return not c:IsSetCard(0x9a) -end -function c36523152.condition(e,c) - return c:IsRace(RACE_MACHINE) -end diff --git a/script/c36553319.lua b/script/c36553319.lua deleted file mode 100644 index 33aeb1af28..0000000000 --- a/script/c36553319.lua +++ /dev/null @@ -1,83 +0,0 @@ ---彼岸の悪鬼 ファーファレル -function c36553319.initial_effect(c) - --self destroy - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_SELF_DESTROY) - e1:SetCondition(c36553319.sdcon) - c:RegisterEffect(e1) - --Special Summon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(36553319,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_HAND) - e2:SetCountLimit(1,36553319) - e2:SetCondition(c36553319.sscon) - e2:SetTarget(c36553319.sstg) - e2:SetOperation(c36553319.ssop) - c:RegisterEffect(e2) - --remove - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(36553319,1)) - e3:SetCategory(CATEGORY_REMOVE) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_TO_GRAVE) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) - e3:SetCountLimit(1,36553319) - e3:SetTarget(c36553319.rmtg) - e3:SetOperation(c36553319.rmop) - c:RegisterEffect(e3) -end -function c36553319.sdfilter(c) - return not c:IsFaceup() or not c:IsSetCard(0xb1) -end -function c36553319.sdcon(e) - return Duel.IsExistingMatchingCard(c36553319.sdfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) -end -function c36553319.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) -end -function c36553319.sscon(e,tp,eg,ep,ev,re,r,rp) - return not Duel.IsExistingMatchingCard(c36553319.filter,tp,LOCATION_ONFIELD,0,1,nil) -end -function c36553319.sstg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c36553319.ssop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP) - end -end -function c36553319.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsAbleToRemove() end - if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) -end -function c36553319.rmop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.Remove(tc,0,REASON_EFFECT+REASON_TEMPORARY)~=0 then - tc:RegisterFlagEffect(36553319,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetReset(RESET_PHASE+PHASE_END) - e1:SetLabelObject(tc) - e1:SetCountLimit(1) - e1:SetCondition(c36553319.retcon) - e1:SetOperation(c36553319.retop) - Duel.RegisterEffect(e1,tp) - end -end -function c36553319.retcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetLabelObject():GetFlagEffect(36553319)~=0 -end -function c36553319.retop(e,tp,eg,ep,ev,re,r,rp) - Duel.ReturnToField(e:GetLabelObject()) -end diff --git a/script/c36560997.lua b/script/c36560997.lua deleted file mode 100644 index 7d095c42cc..0000000000 --- a/script/c36560997.lua +++ /dev/null @@ -1,56 +0,0 @@ ---オーバー・コアリミット -function c36560997.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --atk - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(LOCATION_MZONE,0) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x1d)) - e2:SetValue(500) - c:RegisterEffect(e2) - --atkup - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(36560997,0)) - e3:SetCategory(CATEGORY_TOGRAVE) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_SZONE) - e3:SetCountLimit(1) - e3:SetCost(c36560997.atcost) - e3:SetTarget(c36560997.attg) - e3:SetOperation(c36560997.atop) - c:RegisterEffect(e3) -end -function c36560997.cfilter(c) - return c:IsCode(36623431) and c:IsDiscardable() -end -function c36560997.atcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c36560997.cfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,c36560997.cfilter,1,1,REASON_COST+REASON_DISCARD) -end -function c36560997.filter(c) - return c:IsFaceup() and c:IsSetCard(0x1d) -end -function c36560997.attg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c36560997.filter,tp,LOCATION_MZONE,0,1,nil) end -end -function c36560997.atop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) then return end - local g=Duel.GetMatchingGroup(c36560997.filter,tp,LOCATION_MZONE,0,nil) - local tc=g:GetFirst() - while tc do - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(1000) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - tc=g:GetNext() - end -end diff --git a/script/c36562627.lua b/script/c36562627.lua deleted file mode 100644 index b695e4f19f..0000000000 --- a/script/c36562627.lua +++ /dev/null @@ -1,27 +0,0 @@ ---セカンド・チャンス -function c36562627.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --coin - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetRange(LOCATION_SZONE) - e2:SetCode(EVENT_TOSS_COIN_NEGATE) - e2:SetCondition(c36562627.coincon) - e2:SetOperation(c36562627.coinop) - c:RegisterEffect(e2) -end -function c36562627.coincon(e,tp,eg,ep,ev,re,r,rp) - return ep==tp and Duel.GetFlagEffect(tp,36562627)==0 -end -function c36562627.coinop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetFlagEffect(tp,36562627)~=0 then return end - if Duel.SelectYesNo(tp,aux.Stringid(36562627,0)) then - Duel.Hint(HINT_CARD,0,36562627) - Duel.RegisterFlagEffect(tp,36562627,RESET_PHASE+PHASE_END,0,1) - Duel.TossCoin(tp,ev) - end -end diff --git a/script/c36565699.lua b/script/c36565699.lua deleted file mode 100644 index 3eee4d47fe..0000000000 --- a/script/c36565699.lua +++ /dev/null @@ -1,30 +0,0 @@ ---メンタルシーカー -function c36565699.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(36565699,0)) - e1:SetCategory(CATEGORY_REMOVE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(c36565699.condition) - e1:SetTarget(c36565699.target) - e1:SetOperation(c36565699.activate) - c:RegisterEffect(e1) -end -function c36565699.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_REMOVED) -end -function c36565699.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,0,LOCATION_DECK) -end -function c36565699.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.ConfirmDecktop(1-tp,3) - local g=Duel.GetDecktopGroup(1-tp,3) - if g:GetCount()>0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local sg=g:FilterSelect(tp,Card.IsAbleToRemove,1,1,nil) - Duel.Remove(sg,POS_FACEUP,REASON_EFFECT) - Duel.ShuffleDeck(1-tp) - end -end diff --git a/script/c36569343.lua b/script/c36569343.lua deleted file mode 100644 index 95cba5c364..0000000000 --- a/script/c36569343.lua +++ /dev/null @@ -1,57 +0,0 @@ ---紅炎の騎士 -function c36569343.initial_effect(c) - --send to grave - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(36569343,0)) - e1:SetCategory(CATEGORY_TOGRAVE) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1,36569343) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCondition(c36569343.tgcon1) - e1:SetTarget(c36569343.tgtg) - e1:SetOperation(c36569343.tgop1) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(36569343,0)) - e2:SetCategory(CATEGORY_TOGRAVE) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCountLimit(1,36569343) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetCondition(c36569343.tgcon2) - e2:SetTarget(c36569343.tgtg) - e2:SetOperation(c36569343.tgop2) - c:RegisterEffect(e2) -end -function c36569343.cfilter(c,tp) - return c:IsControler(tp) and c:IsReason(REASON_DESTROY) and c:IsAttribute(ATTRIBUTE_FIRE) -end -function c36569343.tgcon1(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c36569343.cfilter,1,nil,tp) -end -function c36569343.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) -end -function c36569343.tgop1(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFacedown() or not c:IsRelateToEffect(e) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c36569343.tgfilter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoGrave(g,REASON_EFFECT) - end -end -function c36569343.tgcon2(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsReason(REASON_DESTROY) -end -function c36569343.tgfilter(c) - return c:IsType(TYPE_MONSTER) and c:IsAttribute(ATTRIBUTE_FIRE) and c:IsAbleToGrave() -end -function c36569343.tgop2(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c36569343.tgfilter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoGrave(g,REASON_EFFECT) - end -end diff --git a/script/c3657444.lua b/script/c3657444.lua deleted file mode 100644 index 94d365abc6..0000000000 --- a/script/c3657444.lua +++ /dev/null @@ -1,95 +0,0 @@ ---サイバー・ヴァリー -function c3657444.initial_effect(c) - --be target - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(3657444,0)) - e1:SetCategory(CATEGORY_DRAW) - e1:SetCode(EVENT_BE_BATTLE_TARGET) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCost(c3657444.cost1) - e1:SetTarget(c3657444.target1) - e1:SetOperation(c3657444.operation1) - c:RegisterEffect(e1) - --draw - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(3657444,1)) - e2:SetCategory(CATEGORY_DRAW) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetTarget(c3657444.target2) - e2:SetOperation(c3657444.operation2) - c:RegisterEffect(e2) - --salvage - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(3657444,2)) - e3:SetCategory(CATEGORY_TODECK) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_MZONE) - e3:SetTarget(c3657444.target3) - e3:SetOperation(c3657444.operation3) - c:RegisterEffect(e3) -end -function c3657444.cost1(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) -end -function c3657444.target1(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c3657444.operation1(e,tp,eg,ep,ev,re,r,rp) - Duel.Draw(tp,1,REASON_EFFECT) - Duel.SkipPhase(1-tp,PHASE_BATTLE,RESET_PHASE+PHASE_BATTLE,1) -end -function c3657444.filter2(c) - return c:IsFaceup() and c:IsAbleToRemove() -end -function c3657444.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c3657444.filter2(chkc) end - if chk==0 then return e:GetHandler():IsAbleToRemove() and Duel.IsPlayerCanDraw(tp,2) - and Duel.IsExistingTarget(c3657444.filter2,tp,LOCATION_MZONE,0,1,e:GetHandler()) end - Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,c3657444.filter2,tp,LOCATION_MZONE,0,1,1,e:GetHandler()) - g:AddCard(e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,2,0,0) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2) -end -function c3657444.operation2(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsFacedown() or not c:IsRelateToEffect(e) or not tc:IsRelateToEffect(e) then return end - local sg=Group.FromCards(c,tc) - Duel.Remove(sg,POS_FACEUP,REASON_EFFECT) - Duel.BreakEffect() - Duel.Draw(tp,2,REASON_EFFECT) -end -function c3657444.filter3(c) - return c:IsAbleToDeck() and not c:IsHasEffect(EFFECT_NECRO_VALLEY) -end -function c3657444.target3(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemove() - and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_HAND,0,1,nil) - and Duel.IsExistingMatchingCard(c3657444.filter3,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,2,0,0) - Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_GRAVE) -end -function c3657444.operation3(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local hg=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_HAND,0,1,1,nil) - if hg:GetCount()>0 then - hg:AddCard(c) - Duel.Remove(hg,POS_FACEUP,REASON_EFFECT) - Duel.BreakEffect() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local gg=Duel.SelectMatchingCard(tp,c3657444.filter3,tp,LOCATION_GRAVE,0,1,1,nil) - if gg:GetCount()>0 then - Duel.SendtoDeck(gg,nil,0,REASON_EFFECT) - Duel.ConfirmCards(1-tp,gg) - end - end -end diff --git a/script/c36584821.lua b/script/c36584821.lua deleted file mode 100644 index 83821ed247..0000000000 --- a/script/c36584821.lua +++ /dev/null @@ -1,20 +0,0 @@ ---紅蓮魔獣 ダ・イーザ -function c36584821.initial_effect(c) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_SET_ATTACK) - e1:SetValue(c36584821.value) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EFFECT_SET_DEFENCE) - e2:SetValue(c36584821.value) - c:RegisterEffect(e2) -end -function c36584821.value(e,c) - return Duel.GetFieldGroupCount(c:GetControler(),LOCATION_REMOVED,0)*400 -end diff --git a/script/c36586443.lua b/script/c36586443.lua deleted file mode 100644 index c2a63e7a65..0000000000 --- a/script/c36586443.lua +++ /dev/null @@ -1,27 +0,0 @@ ---エレメンタル・チャージ -function c36586443.initial_effect(c) - --recover - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCategory(CATEGORY_RECOVER) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c36586443.target) - e1:SetOperation(c36586443.operation) - c:RegisterEffect(e1) -end -function c36586443.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c36586443.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.SetTargetPlayer(tp) - local rec=Duel.GetMatchingGroupCount(c36586443.filter,tp,LOCATION_MZONE,0,nil)*1000 - Duel.SetTargetParam(rec) - Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,rec) -end -function c36586443.filter(c) - return c:IsFaceup() and c:IsSetCard(0x3008) -end -function c36586443.operation(e,tp,eg,ep,ev,re,r,rp) - local rec=Duel.GetMatchingGroupCount(c36586443.filter,tp,LOCATION_MZONE,0,nil)*1000 - local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) - Duel.Recover(p,rec,REASON_EFFECT) -end diff --git a/script/c3659803.lua b/script/c3659803.lua deleted file mode 100644 index 26cfc97272..0000000000 --- a/script/c3659803.lua +++ /dev/null @@ -1,72 +0,0 @@ ---オーバーロード・フュージョン -function c3659803.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c3659803.target) - e1:SetOperation(c3659803.activate) - c:RegisterEffect(e1) -end -function c3659803.filter0(c) - return c:IsCanBeFusionMaterial() and c:IsAbleToRemove() -end -function c3659803.filter1(c,e) - return c:IsCanBeFusionMaterial() and c:IsAbleToRemove() and not c:IsImmuneToEffect(e) -end -function c3659803.filter2(c,e,tp,m,f,chkf) - return c:IsType(TYPE_FUSION) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsRace(RACE_MACHINE) and (not f or f(c)) - and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf) -end -function c3659803.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp - local mg1=Duel.GetMatchingGroup(c3659803.filter0,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil) - local res=Duel.IsExistingMatchingCard(c3659803.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf) - if not res then - local ce=Duel.GetChainMaterial(tp) - if ce~=nil then - local fgroup=ce:GetTarget() - local mg2=fgroup(ce,e,tp) - local mf=ce:GetValue() - res=Duel.IsExistingMatchingCard(c3659803.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,chkf) - end - end - return res - end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function c3659803.activate(e,tp,eg,ep,ev,re,r,rp) - local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp - local mg1=Duel.GetMatchingGroup(c3659803.filter1,tp,LOCATION_GRAVE+LOCATION_MZONE,0,nil,e) - local sg1=Duel.GetMatchingGroup(c3659803.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf) - local mg2=nil - local sg2=nil - local ce=Duel.GetChainMaterial(tp) - if ce~=nil then - local fgroup=ce:GetTarget() - mg2=fgroup(ce,e,tp) - local mf=ce:GetValue() - sg2=Duel.GetMatchingGroup(c3659803.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,mf,chkf) - end - if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then - local sg=sg1:Clone() - if sg2 then sg:Merge(sg2) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local tg=sg:Select(tp,1,1,nil) - local tc=tg:GetFirst() - if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then - local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf) - tc:SetMaterial(mat1) - Duel.Remove(mat1,POS_FACEUP,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION) - Duel.BreakEffect() - Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP) - else - local mat2=Duel.SelectFusionMaterial(tp,tc,mg2,nil,chkf) - local fop=ce:GetOperation() - fop(ce,e,tp,tc,mat2) - end - tc:CompleteProcedure() - end -end diff --git a/script/c36607978.lua b/script/c36607978.lua deleted file mode 100644 index 1ca1d72833..0000000000 --- a/script/c36607978.lua +++ /dev/null @@ -1,50 +0,0 @@ ---魔性の月 -function c36607978.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c36607978.target) - e1:SetOperation(c36607978.operation) - c:RegisterEffect(e1) - --atk up - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(300) - c:RegisterEffect(e2) - --def up - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_EQUIP) - e3:SetCode(EFFECT_UPDATE_DEFENCE) - e3:SetValue(300) - c:RegisterEffect(e3) - --equip limit - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetCode(EFFECT_EQUIP_LIMIT) - e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e4:SetValue(c36607978.eqlimit) - c:RegisterEffect(e4) -end -function c36607978.eqlimit(e,c) - return c:IsRace(RACE_BEASTWARRIOR) -end -function c36607978.filter(c) - return c:IsFaceup() and c:IsRace(RACE_BEASTWARRIOR) -end -function c36607978.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c36607978.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c36607978.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c36607978.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c36607978.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,e:GetHandler(),tc) - end -end diff --git a/script/c36623431.lua b/script/c36623431.lua deleted file mode 100644 index b31c702551..0000000000 --- a/script/c36623431.lua +++ /dev/null @@ -1,75 +0,0 @@ ---コアキメイルの鋼核 -function c36623431.initial_effect(c) - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(36623431,0)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_PREDRAW) - e1:SetRange(LOCATION_GRAVE) - e1:SetCondition(c36623431.condition1) - e1:SetTarget(c36623431.target1) - e1:SetOperation(c36623431.operation1) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(36623431,1)) - e2:SetCategory(CATEGORY_TOHAND) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_PHASE+PHASE_DRAW) - e2:SetCountLimit(1) - e2:SetRange(LOCATION_GRAVE) - e2:SetCondition(c36623431.condition2) - e2:SetCost(c36623431.cost2) - e2:SetTarget(c36623431.target2) - e2:SetOperation(c36623431.operation2) - c:RegisterEffect(e2) -end -function c36623431.condition1(e,tp,eg,ep,ev,re,r,rp) - return tp==Duel.GetTurnPlayer() and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0 - and Duel.GetDrawCount(tp)>0 -end -function c36623431.target1(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToHand() end - local dt=Duel.GetDrawCount(tp) - if dt~=0 then - _replace_count=0 - _replace_max=dt - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EFFECT_DRAW_COUNT) - e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_DRAW) - e1:SetValue(0) - Duel.RegisterEffect(e1,tp) - end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0) -end -function c36623431.operation1(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - _replace_count=_replace_count+1 - if _replace_count<=_replace_max and c:IsRelateToEffect(e) then - Duel.SendtoHand(c,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,c) - end -end -function c36623431.condition2(e,tp,eg,ep,ev,re,r,rp) - return tp==Duel.GetTurnPlayer() -end -function c36623431.costfilter(c) - return c:IsSetCard(0x1d) and c:IsType(TYPE_MONSTER) and c:IsAbleToGraveAsCost() -end -function c36623431.cost2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c36623431.costfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,c36623431.costfilter,1,1,REASON_COST,nil) -end -function c36623431.target2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToHand() end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0) -end -function c36623431.operation2(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SendtoHand(c,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,c) - end -end diff --git a/script/c36625827.lua b/script/c36625827.lua deleted file mode 100644 index 3875254389..0000000000 --- a/script/c36625827.lua +++ /dev/null @@ -1,51 +0,0 @@ ---D-HERO ドレッドサーヴァント -function c36625827.initial_effect(c) - --summon success - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(36625827,0)) - e1:SetCategory(CATEGORY_COUNTER) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetOperation(c36625827.addc) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(36625827,1)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_BATTLE_DESTROYED) - e2:SetCondition(c36625827.descon) - e2:SetTarget(c36625827.destg) - e2:SetOperation(c36625827.desop) - c:RegisterEffect(e2) -end -function c36625827.addc(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFieldCard(tp,LOCATION_SZONE,5) - if tc and tc:IsFaceup() and tc:IsCode(75041269) then - tc:AddCounter(0x1b,1) - end - tc=Duel.GetFieldCard(1-tp,LOCATION_SZONE,5) - if tc and tc:IsFaceup() and tc:IsCode(75041269) then - tc:AddCounter(0x1b,1) - end -end -function c36625827.descon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) -end -function c36625827.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable() -end -function c36625827.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsControler(tp) and c36625827.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c36625827.filter,tp,LOCATION_ONFIELD,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c36625827.filter,tp,LOCATION_ONFIELD,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c36625827.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c36629203.lua b/script/c36629203.lua deleted file mode 100644 index 78f2cf2177..0000000000 --- a/script/c36629203.lua +++ /dev/null @@ -1,25 +0,0 @@ ---A・O・J コアデストロイ -function c36629203.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(36629203,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_BATTLE_START) - e1:SetTarget(c36629203.destg) - e1:SetOperation(c36629203.desop) - c:RegisterEffect(e1) -end -function c36629203.destg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - local tc=Duel.GetAttacker() - if tc==c then tc=Duel.GetAttackTarget() end - if chk==0 then return tc and tc:IsFaceup() and tc:IsAttribute(ATTRIBUTE_LIGHT) end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,tc,1,0,0) -end -function c36629203.desop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetAttacker() - if tc==c then tc=Duel.GetAttackTarget() end - if tc:IsRelateToBattle() then Duel.Destroy(tc,REASON_EFFECT) end -end diff --git a/script/c36643046.lua b/script/c36643046.lua deleted file mode 100644 index e756a3aa68..0000000000 --- a/script/c36643046.lua +++ /dev/null @@ -1,41 +0,0 @@ ---シンクロン・エクスプローラー -function c36643046.initial_effect(c) - --summon success - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(36643046,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c36643046.sumtg) - e1:SetOperation(c36643046.sumop) - c:RegisterEffect(e1) -end -function c36643046.filter(c,e,tp) - return c:IsSetCard(0x17) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c36643046.sumtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c36643046.filter(chkc,e,tp) end - if chk==0 then return Duel.IsExistingTarget(c36643046.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) - and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c36643046.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c36643046.sumop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - if Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)==0 then return end - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e2) - end -end diff --git a/script/c36687247.lua b/script/c36687247.lua deleted file mode 100644 index cb430c5a8b..0000000000 --- a/script/c36687247.lua +++ /dev/null @@ -1,53 +0,0 @@ ---TG ラッシュ・ライノ -function c36687247.initial_effect(c) - --atkup - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c36687247.atcon) - e1:SetValue(400) - c:RegisterEffect(e1) - --to grave - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetOperation(c36687247.regop) - c:RegisterEffect(e2) -end -function c36687247.atcon(e) - local ph=Duel.GetCurrentPhase() - return (ph==PHASE_DAMAGE or ph==PHASE_DAMAGE_CAL) and e:GetHandler()==Duel.GetAttacker() -end -function c36687247.regop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if bit.band(c:GetPreviousLocation(),LOCATION_ONFIELD)~=0 and c:IsReason(REASON_DESTROY) then - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(36687247,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_GRAVE) - e1:SetTarget(c36687247.thtg) - e1:SetOperation(c36687247.thop) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - c:RegisterEffect(e1) - end -end -function c36687247.filter(c) - return c:IsSetCard(0x27) and c:GetCode()~=36687247 and c:IsAbleToHand() -end -function c36687247.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c36687247.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c36687247.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c36687247.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c36690018.lua b/script/c36690018.lua deleted file mode 100644 index 9135884b9b..0000000000 --- a/script/c36690018.lua +++ /dev/null @@ -1,27 +0,0 @@ ---逆転する運命 -function c36690018.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c36690018.target) - e1:SetOperation(c36690018.activate) - c:RegisterEffect(e1) -end -function c36690018.filter(c) - return c:GetFlagEffect(36690018)~=0 -end -function c36690018.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c36690018.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c36690018.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c36690018.filter,tp,LOCATION_MZONE,0,1,1,nil) -end -function c36690018.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() and c36690018.filter(tc) then - local val=tc:GetFlagEffectLabel(36690018) - tc:SetFlagEffectLabel(36690018,1-val) - end -end diff --git a/script/c36693940.lua b/script/c36693940.lua deleted file mode 100644 index 1a16d3570b..0000000000 --- a/script/c36693940.lua +++ /dev/null @@ -1,35 +0,0 @@ ---デストーイ・カスタム -function c36693940.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c36693940.target) - e1:SetOperation(c36693940.activate) - c:RegisterEffect(e1) -end -function c36693940.filter(c,e,tp) - return (c:IsSetCard(0xa9) or c:IsSetCard(0xc3)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c36693940.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c36693940.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c36693940.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c36693940.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c36693940.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)~=0 then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetDescription(aux.Stringid(36693940,0)) - e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(36693940) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - end -end diff --git a/script/c36708764.lua b/script/c36708764.lua deleted file mode 100644 index f64fc71ead..0000000000 --- a/script/c36708764.lua +++ /dev/null @@ -1,67 +0,0 @@ ---ルーレット・スパイダー -function c36708764.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DICE+CATEGORY_DAMAGE+CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetCondition(c36708764.condition) - e1:SetTarget(c36708764.target) - e1:SetOperation(c36708764.activate) - c:RegisterEffect(e1) -end -function c36708764.condition(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp -end -function c36708764.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local at=Duel.GetAttacker() - Duel.SetTargetCard(at) - Duel.SetOperationInfo(0,CATEGORY_DICE,nil,0,tp,1) -end -function c36708764.activate(e,tp,eg,ep,ev,re,r,rp) - local dc=Duel.TossDice(tp,1) - if dc==1 then - local lp=Duel.GetLP(tp) - Duel.SetLP(tp,math.ceil(lp/2)) - return - elseif dc==2 then - Duel.ChangeAttackTarget(nil) - return - elseif dc==3 then - local bc=Duel.GetAttackTarget() - local g=Duel.GetMatchingGroup(nil,tp,LOCATION_MZONE,0,bc) - if g:GetCount()>0 then - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(36708764,0)) - local tc=g:Select(tp,1,1,nil):GetFirst() - local at=Duel.GetAttacker() - if at:IsAttackable() and not at:IsImmuneToEffect(e) and not tc:IsImmuneToEffect(e) then - Duel.CalculateDamage(at,tc) - end - end - return - elseif dc==4 then - local at=Duel.GetAttacker() - local g=Duel.GetMatchingGroup(nil,tp,0,LOCATION_MZONE,at) - if g:GetCount()>0 then - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(36708764,0)) - local tc=g:Select(tp,1,1,nil):GetFirst() - local at=Duel.GetAttacker() - if at:IsAttackable() and not at:IsImmuneToEffect(e) and not tc:IsImmuneToEffect(e) then - Duel.CalculateDamage(at,tc) - end - end - return - elseif dc==5 then - local at=Duel.GetFirstTarget() - if at:IsRelateToEffect(e) and Duel.NegateAttack() and at:GetAttack()>0 then - Duel.Damage(1-tp,at:GetAttack(),REASON_EFFECT) - end - return - else - local at=Duel.GetFirstTarget() - if at:IsRelateToEffect(e) and at:IsControler(1-tp) and at:IsType(TYPE_MONSTER) then - Duel.Destroy(at,REASON_EFFECT) - end - end -end diff --git a/script/c36717258.lua b/script/c36717258.lua deleted file mode 100644 index 6221ab8275..0000000000 --- a/script/c36717258.lua +++ /dev/null @@ -1,9 +0,0 @@ ---ジュラック・モノロフ -function c36717258.initial_effect(c) - --attack all - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_ATTACK_ALL) - e1:SetValue(1) - c:RegisterEffect(e1) -end diff --git a/script/c36733451.lua b/script/c36733451.lua deleted file mode 100644 index 4226282703..0000000000 --- a/script/c36733451.lua +++ /dev/null @@ -1,68 +0,0 @@ ---次元合成師 -function c36733451.initial_effect(c) - --atkup - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(36733451,0)) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetTarget(c36733451.target) - e1:SetOperation(c36733451.operation) - c:RegisterEffect(e1) - --add to hand - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(36733451,1)) - e2:SetCategory(CATEGORY_TOHAND) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetCondition(c36733451.thcon) - e2:SetTarget(c36733451.thtg) - e2:SetOperation(c36733451.thop) - c:RegisterEffect(e2) -end -function c36733451.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local g=Duel.GetDecktopGroup(tp,1) - local tc=g:GetFirst() - return tc and tc:IsAbleToRemove() - end - Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_DECK) -end -function c36733451.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local g=Duel.GetDecktopGroup(tp,1) - Duel.DisableShuffleCheck() - Duel.Remove(g,POS_FACEUP,REASON_EFFECT) - if c:IsFaceup() and c:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e1:SetValue(500) - c:RegisterEffect(e1) - end -end -function c36733451.thcon(e,tp,eg,ep,ev,re,r,rp) - return bit.band(r,REASON_DESTROY)>0 - and e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) - and e:GetHandler():GetPreviousControler()==tp -end -function c36733451.filter(c) - return c:IsFaceup() and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() -end -function c36733451.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_REMOVED) and c36733451.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c36733451.filter,tp,LOCATION_REMOVED,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c36733451.filter,tp,LOCATION_REMOVED,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0) -end -function c36733451.thop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end diff --git a/script/c36736723.lua b/script/c36736723.lua deleted file mode 100644 index 265ee91152..0000000000 --- a/script/c36736723.lua +++ /dev/null @@ -1,69 +0,0 @@ ---ラッシュ・ウォリアー -function c36736723.initial_effect(c) - --atkup - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(36736723,0)) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_PRE_DAMAGE_CALCULATE) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(1,36736723) - e1:SetCondition(c36736723.atkcon) - e1:SetCost(c36736723.atkcost) - e1:SetOperation(c36736723.atkop) - c:RegisterEffect(e1) - --tohand - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(36736723,1)) - e2:SetCategory(CATEGORY_TOHAND) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_GRAVE) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCountLimit(1,36736724) - e2:SetCost(c36736723.thcost) - e2:SetTarget(c36736723.thtg) - e2:SetOperation(c36736723.thop) - c:RegisterEffect(e2) -end -function c36736723.atkcon(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetAttackTarget() - if not tc then return false end - if tc:IsControler(1-tp) then tc=Duel.GetAttacker() end - e:SetLabelObject(tc) - return tc and tc:IsRelateToBattle() and tc:IsSetCard(0x66) and tc:IsType(TYPE_SYNCHRO) -end -function c36736723.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end -function c36736723.atkop(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetLabelObject() - if tc:IsFaceup() and tc:IsRelateToBattle() then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_DAMAGE_CAL) - e1:SetValue(tc:GetAttack()*2) - tc:RegisterEffect(e1) - end -end -function c36736723.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) -end -function c36736723.filter(c) - return c:IsSetCard(0x17) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() -end -function c36736723.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c36736723.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c36736723.filter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c36736723.filter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c36736723.thop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end diff --git a/script/c36737092.lua b/script/c36737092.lua deleted file mode 100644 index 2c4f0a5a88..0000000000 --- a/script/c36737092.lua +++ /dev/null @@ -1,55 +0,0 @@ ---シンクロ・チェンジ -function c36737092.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c36737092.cost) - e1:SetTarget(c36737092.target) - e1:SetOperation(c36737092.activate) - c:RegisterEffect(e1) -end -function c36737092.cost(e,tp,eg,ep,ev,re,r,rp,chk) - e:SetLabel(100) - return true -end -function c36737092.filter1(c,e,tp) - return c:IsFaceup() and c:IsType(TYPE_SYNCHRO) and c:IsAbleToRemoveAsCost() - and Duel.IsExistingMatchingCard(c36737092.filter2,tp,LOCATION_EXTRA,0,1,nil,c:GetLevel(),e,tp) -end -function c36737092.filter2(c,lv,e,tp) - return c:IsType(TYPE_SYNCHRO) and c:GetLevel()==lv and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c36737092.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - if e:GetLabel()~=100 then return false end - e:SetLabel(0) - return Duel.IsExistingMatchingCard(c36737092.filter1,tp,LOCATION_MZONE,0,1,nil,e,tp) - end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local rg=Duel.SelectMatchingCard(tp,c36737092.filter1,tp,LOCATION_MZONE,0,1,1,nil,e,tp) - e:SetLabel(rg:GetFirst():GetLevel()) - Duel.Remove(rg,POS_FACEUP,REASON_COST) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function c36737092.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local lv=e:GetLabel() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c36737092.filter2,tp,LOCATION_EXTRA,0,1,1,nil,lv,e,tp) - local tc=g:GetFirst() - if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1,true) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e2,true) - Duel.SpecialSummonComplete() - end -end diff --git a/script/c36750412.lua b/script/c36750412.lua deleted file mode 100644 index 13fb5cecf1..0000000000 --- a/script/c36750412.lua +++ /dev/null @@ -1,26 +0,0 @@ ---炎龍 -function c36750412.initial_effect(c) - --atkup - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(36750412,0)) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_BATTLE_DAMAGE) - e1:SetCondition(c36750412.atkcon) - e1:SetOperation(c36750412.atkop) - c:RegisterEffect(e1) -end -function c36750412.atkcon(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp -end -function c36750412.atkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetProperty(EFFECT_FLAG_COPY_INHERIT) - e1:SetValue(200) - e1:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e1) - end -end diff --git a/script/c36757171.lua b/script/c36757171.lua deleted file mode 100644 index 69739a3b5f..0000000000 --- a/script/c36757171.lua +++ /dev/null @@ -1,49 +0,0 @@ ---ヴェルズ・バハムート -function c36757171.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0xa),4,2) - c:EnableReviveLimit() - --attack up - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_CONTROL+CATEGORY_HANDES) - e1:SetDescription(aux.Stringid(36757171,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c36757171.cost) - e1:SetTarget(c36757171.target) - e1:SetOperation(c36757171.operation) - c:RegisterEffect(e1) -end -function c36757171.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c36757171.filter(c) - return c:IsFaceup() and c:IsControlerCanBeChanged() -end -function c36757171.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c36757171.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c36757171.filter,tp,0,LOCATION_MZONE,1,nil) - and Duel.IsExistingMatchingCard(c36757171.dfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) - local g=Duel.SelectTarget(tp,c36757171.filter,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1) -end -function c36757171.dfilter(c) - return c:IsSetCard(0xa) and c:IsType(TYPE_MONSTER) and c:IsDiscardable() -end -function c36757171.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) - local g=Duel.SelectMatchingCard(tp,c36757171.dfilter,tp,LOCATION_HAND,0,1,1,nil) - if g:GetCount()==0 then return end - Duel.SendtoGrave(g,REASON_EFFECT+REASON_DISCARD) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and not Duel.GetControl(tc,tp) then - if not tc:IsImmuneToEffect(e) and tc:IsAbleToChangeControler() then - Duel.Destroy(tc,REASON_EFFECT) - end - end -end diff --git a/script/c36776089.lua b/script/c36776089.lua deleted file mode 100644 index 1c82b81982..0000000000 --- a/script/c36776089.lua +++ /dev/null @@ -1,47 +0,0 @@ ---神騎セイントレア -function c36776089.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,2,2) - c:EnableReviveLimit() - --indestructable - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e1:SetCondition(c36776089.incon) - e1:SetValue(1) - c:RegisterEffect(e1) - --return - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_TOHAND) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_DAMAGE_STEP_END) - e2:SetCondition(c36776089.retcon) - e2:SetCost(c36776089.retcost) - e2:SetTarget(c36776089.rettg) - e2:SetOperation(c36776089.retop) - c:RegisterEffect(e2) -end -function c36776089.incon(e) - return e:GetHandler():GetOverlayCount()>0 -end -function c36776089.retcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local bc=c:GetBattleTarget() - return bc and c:IsRelateToBattle() and bc:IsRelateToBattle() -end -function c36776089.retcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c36776089.rettg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler():GetBattleTarget(),1,0,0) -end -function c36776089.retop(e,tp,eg,ep,ev,re,r,rp) - local bc=e:GetHandler():GetBattleTarget() - if bc:IsRelateToBattle() then - Duel.SendtoHand(bc,nil,REASON_EFFECT) - end -end diff --git a/script/c3682106.lua b/script/c3682106.lua deleted file mode 100644 index 77e415557c..0000000000 --- a/script/c3682106.lua +++ /dev/null @@ -1,36 +0,0 @@ ---ダブルトラップ -function c3682106.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c3682106.target) - e1:SetOperation(c3682106.activate) - c:RegisterEffect(e1) -end -c3682106.collection={ - [40867519]=true;[67750322]=true;[73551138]=true;[01953925]=true;[65403020]=true; - [77585513]=true;[35803249]=true;[94568601]=true;[74841885]=true;[66235877]=true; - [19312169]=true;[51452091]=true;[92408984]=true;[62892347]=true;[42868711]=true; - [90464188]=true;[03370104]=true;[88989706]=true;[20529766]=true;[74841885]=true; - [53347303]=true;[06150044]=true;[49868263]=true;[51447164]=true;[44155002]=true; - [74593218]=true; -} -function c3682106.filter(c) - return c:IsFaceup() and c3682106.collection[c:GetCode()] and c:IsDestructable() -end -function c3682106.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and c3682106.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c3682106.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c3682106.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c3682106.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c36834155.lua b/script/c36834155.lua deleted file mode 100644 index 8f4649c4d4..0000000000 --- a/script/c36834155.lua +++ /dev/null @@ -1,33 +0,0 @@ ---フォトン・パイレーツ -function c36834155.initial_effect(c) - --atkup - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(36834155,0)) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(2,36834155) - e1:SetCost(c36834155.cost) - e1:SetOperation(c36834155.operation) - c:RegisterEffect(e1) -end -function c36834155.cfilter(c) - return c:IsSetCard(0x55) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost() -end -function c36834155.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c36834155.cfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c36834155.cfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c36834155.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFaceup() and c:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(1000) - e1:SetReset(RESET_EVENT+0x1ff0000+RESET_PHASE+PHASE_END) - c:RegisterEffect(e1) - end -end diff --git a/script/c36857073.lua b/script/c36857073.lua deleted file mode 100644 index 90684c4288..0000000000 --- a/script/c36857073.lua +++ /dev/null @@ -1,80 +0,0 @@ ---琰魔竜 レッド・デーモン・ベリアル -function c36857073.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure2(c,nil,aux.NonTuner(c36857073.sfilter)) - c:EnableReviveLimit() - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(36857073,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetRange(LOCATION_MZONE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCountLimit(1,36857073) - e1:SetCost(c36857073.spcost) - e1:SetTarget(c36857073.sptg1) - e1:SetOperation(c36857073.spop1) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(36857073,1)) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetCode(EVENT_BATTLE_DAMAGE) - e2:SetCountLimit(1,36857074) - e2:SetCondition(c36857073.spcon2) - e2:SetTarget(c36857073.sptg2) - e2:SetOperation(c36857073.spop2) - c:RegisterEffect(e2) -end -function c36857073.sfilter(c) - return c:IsRace(RACE_DRAGON) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsType(TYPE_SYNCHRO) -end -function c36857073.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,nil,1,nil) end - local g=Duel.SelectReleaseGroup(tp,nil,1,1,nil) - Duel.Release(g,REASON_COST) -end -function c36857073.spfilter1(c,e,tp) - return c:IsSetCard(0x1045) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c36857073.sptg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c36857073.spfilter1(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsExistingTarget(c36857073.spfilter1,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c36857073.spfilter1,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c36857073.spop1(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end -function c36857073.spcon2(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp -end -function c36857073.spfilter2(c,e,tp) - return c:IsType(TYPE_TUNER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) - and Duel.IsExistingMatchingCard(c36857073.spfilter3,tp,LOCATION_GRAVE,0,1,nil,e,tp,c:GetLevel()) -end -function c36857073.spfilter3(c,e,tp,lv) - return c:IsType(TYPE_TUNER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) - and c:GetLevel()==lv and not c:IsHasEffect(EFFECT_NECRO_VALLEY) -end -function c36857073.sptg2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>1 - and Duel.IsExistingMatchingCard(c36857073.spfilter2,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_DECK+LOCATION_GRAVE) -end -function c36857073.spop2(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g1=Duel.SelectMatchingCard(tp,c36857073.spfilter2,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if g1:GetCount()==0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g2=Duel.SelectMatchingCard(tp,c36857073.spfilter3,tp,LOCATION_GRAVE,0,1,1,nil,e,tp,g1:GetFirst():GetLevel()) - g1:Merge(g2) - Duel.SpecialSummon(g1,0,tp,tp,false,false,POS_FACEUP_DEFENCE) -end diff --git a/script/c36868108.lua b/script/c36868108.lua deleted file mode 100644 index b6fe3f616e..0000000000 --- a/script/c36868108.lua +++ /dev/null @@ -1,23 +0,0 @@ ---ガラスの鎧 -function c36868108.initial_effect(c) - --activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_EQUIP) - e1:SetOperation(c36868108.activate) - c:RegisterEffect(e1) -end -function c36868108.activate(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - --disable - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_DISABLE) - e1:SetTargetRange(LOCATION_SZONE,LOCATION_SZONE) - e1:SetTarget(c36868108.distarget) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function c36868108.distarget(e,c) - return c:IsType(TYPE_EQUIP) -end diff --git a/script/c36870345.lua b/script/c36870345.lua deleted file mode 100644 index 255dccd643..0000000000 --- a/script/c36870345.lua +++ /dev/null @@ -1,73 +0,0 @@ ---ドラグニティ-アキュリス -function c36870345.initial_effect(c) - --equip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(36870345,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c36870345.sptg) - e1:SetOperation(c36870345.spop) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(36870345,1)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetCondition(c36870345.descon) - e2:SetTarget(c36870345.destg) - e2:SetOperation(c36870345.desop) - c:RegisterEffect(e2) -end -function c36870345.filter(c,e,tp) - return c:IsSetCard(0x29) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c36870345.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingMatchingCard(c36870345.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c36870345.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c36870345.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - local tc=g:GetFirst() - if not tc then return end - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - local c=e:GetHandler() - if c:IsFacedown() or not c:IsRelateToEffect(e) or c:IsControler(1-tp) - or Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end - Duel.BreakEffect() - if not Duel.Equip(tp,c,tc,false) then return end - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(c36870345.eqlimit) - e1:SetLabelObject(tc) - c:RegisterEffect(e1) -end -function c36870345.eqlimit(e,c) - return e:GetLabelObject()==c -end -function c36870345.descon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:GetPreviousLocation()==LOCATION_SZONE and not c:IsReason(REASON_LOST_TARGET) -end -function c36870345.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsDestructable() end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c36870345.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c36898537.lua b/script/c36898537.lua deleted file mode 100644 index 7f2c5d487b..0000000000 --- a/script/c36898537.lua +++ /dev/null @@ -1,133 +0,0 @@ ---メタファイズ・ホルス・ドラゴン -function c36898537.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1) - c:EnableReviveLimit() - --mat check - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_MATERIAL_CHECK) - e1:SetValue(c36898537.valcheck) - c:RegisterEffect(e1) - --immune - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(36898537,0)) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetProperty(EFFECT_FLAG_DELAY) - e2:SetCondition(c36898537.immcon) - e2:SetOperation(c36898537.immop) - e2:SetLabelObject(e1) - c:RegisterEffect(e2) - --negate - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(36898537,1)) - e3:SetCategory(CATEGORY_DISABLE) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) - e3:SetCondition(c36898537.negcon) - e3:SetTarget(c36898537.negtg) - e3:SetOperation(c36898537.negop) - e3:SetLabelObject(e1) - c:RegisterEffect(e3) - --control - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(36898537,2)) - e4:SetCategory(CATEGORY_CONTROL) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e4:SetCode(EVENT_SPSUMMON_SUCCESS) - e4:SetProperty(EFFECT_FLAG_DELAY) - e4:SetCondition(c36898537.ctcon) - e4:SetTarget(c36898537.cttg) - e4:SetOperation(c36898537.ctop) - e4:SetLabelObject(e1) - c:RegisterEffect(e4) -end -function c36898537.valcheck(e,c) - local g=c:GetMaterial() - local tpe=0 - local tc=g:GetFirst() - while tc do - if not tc:IsType(TYPE_TUNER) then - tpe=bit.bor(tpe,tc:GetType()) - end - tc=g:GetNext() - end - e:SetLabel(tpe) -end -function c36898537.immcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_SYNCHRO - and bit.band(e:GetLabelObject():GetLabel(),TYPE_NORMAL)~=0 -end -function c36898537.immop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFaceup() and c:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_IMMUNE_EFFECT) - e1:SetValue(c36898537.efilter) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - c:RegisterEffect(e1) - end -end -function c36898537.efilter(e,te) - return te:GetOwner()~=e:GetOwner() -end -function c36898537.negcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_SYNCHRO - and bit.band(e:GetLabelObject():GetLabel(),TYPE_EFFECT)~=0 -end -function c36898537.negfilter(c) - return c:IsFaceup() and not c:IsType(TYPE_NORMAL) -end -function c36898537.negtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and c36898537.negfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c36898537.negfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - local g=Duel.SelectTarget(tp,c36898537.negfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0) -end -function c36898537.negop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e2) - end -end -function c36898537.ctcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_SYNCHRO - and bit.band(e:GetLabelObject():GetLabel(),TYPE_PENDULUM)~=0 -end -function c36898537.cttg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_CONTROL,nil,1,0,0) -end -function c36898537.ctop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_CONTROL) - local g=Duel.SelectMatchingCard(1-tp,Card.IsAbleToChangeControler,1-tp,LOCATION_MZONE,0,1,1,nil) - local tc=g:GetFirst() - if not tc then return end - if not Duel.GetControl(tc,tp) then - if not tc:IsImmuneToEffect(e) and tc:IsAbleToChangeControler() then - Duel.Destroy(tc,REASON_EFFECT) - end - else - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1,true) - end -end diff --git a/script/c36916401.lua b/script/c36916401.lua deleted file mode 100644 index 3acd944de6..0000000000 --- a/script/c36916401.lua +++ /dev/null @@ -1,35 +0,0 @@ ---バーニングナックル・スピリッツ -function c36916401.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,36916401+EFFECT_COUNT_CODE_OATH) - e1:SetCost(c36916401.cost) - e1:SetTarget(c36916401.target) - e1:SetOperation(c36916401.operation) - c:RegisterEffect(e1) -end -function c36916401.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDiscardDeckAsCost(tp,1) end - Duel.DiscardDeck(tp,1,REASON_COST) -end -function c36916401.filter(c,e,tp) - return c:IsSetCard(0x84) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c36916401.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c36916401.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c36916401.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c36916401.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c36916401.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENCE) - end -end diff --git a/script/c36931229.lua b/script/c36931229.lua deleted file mode 100644 index 2a2602a649..0000000000 --- a/script/c36931229.lua +++ /dev/null @@ -1,41 +0,0 @@ ---キャッスル・ゲート -function c36931229.initial_effect(c) - --battle indestructable - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e1:SetValue(1) - c:RegisterEffect(e1) - --damage - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(36931229,0)) - e2:SetCategory(CATEGORY_DAMAGE) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCondition(c36931229.condition) - e2:SetCost(c36931229.cost) - e2:SetTarget(c36931229.target) - e2:SetOperation(c36931229.operation) - c:RegisterEffect(e2) -end -function c36931229.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsAttackPos() -end -function c36931229.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsLevelBelow,1,nil,5) end - local sg=Duel.SelectReleaseGroup(tp,Card.IsLevelBelow,1,1,nil,5) - e:SetLabel(sg:GetFirst():GetBaseAttack()) - Duel.Release(sg,REASON_COST) -end -function c36931229.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(e:GetLabel()) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,e:GetLabel()) -end -function c36931229.operation(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c36935434.lua b/script/c36935434.lua deleted file mode 100644 index 8fcb06f632..0000000000 --- a/script/c36935434.lua +++ /dev/null @@ -1,34 +0,0 @@ ---バイロード・サクリファイス -function c36935434.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetCondition(c36935434.condition) - e1:SetTarget(c36935434.target) - e1:SetOperation(c36935434.operation) - c:RegisterEffect(e1) -end -function c36935434.cfilter(c,tp) - return c:GetPreviousControler()==tp -end -function c36935434.condition(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c36935434.cfilter,1,nil,tp) -end -function c36935434.filter(c,e,tp) - return c:IsCode(64268668) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c36935434.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c36935434.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c36935434.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c36935434.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c36953371.lua b/script/c36953371.lua deleted file mode 100644 index 98e95818e1..0000000000 --- a/script/c36953371.lua +++ /dev/null @@ -1,44 +0,0 @@ ---超重神鬼シュテンドウ-G -function c36953371.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsRace,RACE_MACHINE),aux.NonTuner(Card.IsSetCard,0x9a),1) - c:EnableReviveLimit() - --defence attack - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DEFENCE_ATTACK) - e1:SetValue(1) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetCondition(c36953371.descon) - e2:SetTarget(c36953371.destg) - e2:SetOperation(c36953371.desop) - c:RegisterEffect(e2) - --add setcode - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e3:SetCode(EFFECT_ADD_SETCODE) - e3:SetValue(0x9a) - c:RegisterEffect(e3) -end -function c36953371.descon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_SYNCHRO - and not Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_GRAVE,0,1,nil,TYPE_SPELL+TYPE_TRAP) -end -function c36953371.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable() -end -function c36953371.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c36953371.filter,tp,0,LOCATION_ONFIELD,1,nil) end - local g=Duel.GetMatchingGroup(c36953371.filter,tp,0,LOCATION_ONFIELD,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c36953371.desop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c36953371.filter,tp,0,LOCATION_ONFIELD,nil) - Duel.Destroy(g,REASON_EFFECT) -end diff --git a/script/c36970611.lua b/script/c36970611.lua deleted file mode 100644 index b79da2df56..0000000000 --- a/script/c36970611.lua +++ /dev/null @@ -1,92 +0,0 @@ ---PSYフレーム・オーバーロード -function c36970611.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_END_PHASE) - e1:SetTarget(c36970611.target1) - c:RegisterEffect(e1) - --remove - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(36970611,0)) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetRange(LOCATION_SZONE) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetHintTiming(0,TIMING_END_PHASE) - e2:SetCost(c36970611.cost2) - e2:SetTarget(c36970611.target2) - e2:SetOperation(c36970611.operation) - c:RegisterEffect(e2) - --to hand - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(36970611,1)) - e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e3:SetType(EFFECT_TYPE_QUICK_O) - e3:SetRange(LOCATION_GRAVE) - e3:SetCode(EVENT_FREE_CHAIN) - e3:SetCondition(aux.exccon) - e3:SetCost(c36970611.thcost) - e3:SetTarget(c36970611.thtg) - e3:SetOperation(c36970611.thop) - c:RegisterEffect(e3) -end -function c36970611.cfilter(c) - return c:IsSetCard(0xc1) and c:IsType(TYPE_MONSTER) and (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) and c:IsAbleToRemoveAsCost() - and Duel.IsExistingTarget(Card.IsAbleToRemove,0,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c) -end -function c36970611.target1(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return c36970611.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end - if chk==0 then return true end - if c36970611.cost2(e,tp,eg,ep,ev,re,r,rp,0) and c36970611.target2(e,tp,eg,ep,ev,re,r,rp,0,chkc) - and Duel.SelectYesNo(tp,aux.Stringid(36970611,2)) then - e:SetProperty(EFFECT_FLAG_CARD_TARGET) - e:SetOperation(c36970611.operation) - c36970611.cost2(e,tp,eg,ep,ev,re,r,rp,1) - c36970611.target2(e,tp,eg,ep,ev,re,r,rp,1,chkc) - else - e:SetProperty(0) - e:SetOperation(nil) - end -end -function c36970611.cost2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c36970611.cfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil) and e:GetHandler():GetFlagEffect(36970611)==0 end - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(36970611,3)) - local cg=Duel.SelectMatchingCard(tp,c36970611.cfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil) - Duel.Remove(cg,POS_FACEUP,REASON_COST) - e:GetHandler():RegisterFlagEffect(36970611,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) -end -function c36970611.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsAbleToRemove() end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) -end -function c36970611.operation(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Remove(tc,POS_FACEDOWN,REASON_EFFECT) - end -end -function c36970611.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) -end -function c36970611.thfilter(c) - return c:IsSetCard(0xc1) and not c:IsCode(36970611) and c:IsAbleToHand() -end -function c36970611.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c36970611.thfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c36970611.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c36970611.thfilter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c36995273.lua b/script/c36995273.lua deleted file mode 100644 index 214d859df2..0000000000 --- a/script/c36995273.lua +++ /dev/null @@ -1,41 +0,0 @@ ---縮退回路 -function c36995273.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --remove - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetProperty(EFFECT_FLAG_SET_AVAILABLE) - e2:SetRange(LOCATION_SZONE) - e2:SetCode(EFFECT_TO_HAND_REDIRECT) - e2:SetTargetRange(LOCATION_ONFIELD,LOCATION_ONFIELD) - e2:SetTarget(c36995273.rmtg) - e2:SetValue(LOCATION_REMOVED) - c:RegisterEffect(e2) - --cost - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e3:SetRange(LOCATION_SZONE) - e3:SetCode(EVENT_PHASE+PHASE_STANDBY) - e3:SetCountLimit(1) - e3:SetCondition(c36995273.costcon) - e3:SetOperation(c36995273.costop) - c:RegisterEffect(e3) -end -function c36995273.rmtg(e,c) - return c:IsLocation(LOCATION_MZONE) or bit.band(c:GetOriginalType(),TYPE_MONSTER)~=0 -end -function c36995273.costcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c36995273.costop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLP(tp)>=500 then - Duel.PayLPCost(tp,500) - else - Duel.Destroy(e:GetHandler(),REASON_RULE) - end -end \ No newline at end of file diff --git a/script/c3701074.lua b/script/c3701074.lua deleted file mode 100644 index 3ccd82cb7d..0000000000 --- a/script/c3701074.lua +++ /dev/null @@ -1,62 +0,0 @@ ---ダーク・キュア -function c3701074.initial_effect(c) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --Activate - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(3701074,0)) - e2:SetCategory(CATEGORY_RECOVER) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetRange(LOCATION_SZONE) - e2:SetCode(EVENT_SUMMON_SUCCESS) - e2:SetTarget(c3701074.rectg1) - e2:SetOperation(c3701074.recop1) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - c:RegisterEffect(e3) - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(3701074,0)) - e4:SetCategory(CATEGORY_RECOVER) - e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e4:SetRange(LOCATION_SZONE) - e4:SetCode(EVENT_SPSUMMON_SUCCESS) - e4:SetTarget(c3701074.rectg2) - e4:SetOperation(c3701074.recop2) - c:RegisterEffect(e4) -end -function c3701074.rectg1(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return rp~=tp end - Duel.SetTargetCard(eg) - Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,1-tp,0) -end -function c3701074.recop1(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local tc=eg:GetFirst() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - local rec=tc:GetAttack()/2 - Duel.Recover(1-tp,rec,REASON_EFFECT) - end -end -function c3701074.filter(c,e,tp) - return c:IsFaceup() and c:IsLocation(LOCATION_MZONE) and c:GetSummonPlayer()==1-tp - and (not e or c:IsRelateToEffect(e)) -end -function c3701074.rectg2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return eg:IsExists(c3701074.filter,1,nil,nil,tp) end - Duel.SetTargetCard(eg) - Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,1-tp,0) -end -function c3701074.recop2(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local g=eg:Filter(c3701074.filter,nil,e,tp) - if g:GetCount()>0 then - if g:GetCount()>1 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - g=g:Select(tp,1,1,nil) - end - Duel.Recover(1-tp,g:GetFirst():GetAttack()/2,REASON_EFFECT) - end -end diff --git a/script/c37011715.lua b/script/c37011715.lua deleted file mode 100644 index 947155a096..0000000000 --- a/script/c37011715.lua +++ /dev/null @@ -1,33 +0,0 @@ ---奇跡の蘇生 -function c37011715.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c37011715.condition) - e1:SetTarget(c37011715.target) - e1:SetOperation(c37011715.activate) - c:RegisterEffect(e1) -end -function c37011715.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentChain()>2 and Duel.CheckChainUniqueness() -end -function c37011715.filter(c,e,tp) - return c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c37011715.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and c37011715.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c37011715.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c37011715.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c37011715.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c37038993.lua b/script/c37038993.lua deleted file mode 100644 index 8e03068680..0000000000 --- a/script/c37038993.lua +++ /dev/null @@ -1,31 +0,0 @@ ---焔紫竜ピュラリス -function c37038993.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure2(c,nil,aux.NonTuner(nil)) - c:EnableReviveLimit() - --synchro summon success - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(37038993,0)) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCondition(c37038993.atkcon) - e1:SetOperation(c37038993.atkop) - c:RegisterEffect(e1) -end -function c37038993.atkcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) -end -function c37038993.atkop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil) - local tc=g:GetFirst() - while tc do - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(-500) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - tc=g:GetNext() - end -end diff --git a/script/c37043180.lua b/script/c37043180.lua deleted file mode 100644 index a6be8a2ccf..0000000000 --- a/script/c37043180.lua +++ /dev/null @@ -1,27 +0,0 @@ ---異次元の戦士 -function c37043180.initial_effect(c) - --remove - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(37043180,0)) - e1:SetCategory(CATEGORY_REMOVE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_BATTLED) - e1:SetTarget(c37043180.target) - e1:SetOperation(c37043180.operation) - c:RegisterEffect(e1) -end -function c37043180.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetAttackTarget()~=nil end - local a=Duel.GetAttacker() - local d=Duel.GetAttackTarget() - local g=Group.FromCards(a,d) - local rg=g:Filter(Card.IsRelateToBattle,nil) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,rg,rg:GetCount(),0,0) -end -function c37043180.operation(e,tp,eg,ep,ev,re,r,rp) - local a=Duel.GetAttacker() - local d=Duel.GetAttackTarget() - local g=Group.FromCards(a,d) - local rg=g:Filter(Card.IsRelateToBattle,nil) - Duel.Remove(rg,POS_FACEUP,REASON_EFFECT) -end diff --git a/script/c37053871.lua b/script/c37053871.lua deleted file mode 100644 index deeafe5a43..0000000000 --- a/script/c37053871.lua +++ /dev/null @@ -1,40 +0,0 @@ ---アストラルバリア -function c37053871.initial_effect(c) - --activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_MAIN_END) - e1:SetTarget(c37053871.atktg1) - e1:SetOperation(c37053871.atkop) - c:RegisterEffect(e1) - --target change - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(37053871,1)) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_BE_BATTLE_TARGET) - e2:SetRange(LOCATION_SZONE) - e2:SetCondition(c37053871.atkcon) - e2:SetTarget(c37053871.atktg2) - e2:SetOperation(c37053871.atkop) - c:RegisterEffect(e2) -end -function c37053871.atkcon(e,tp,eg,ep,ev,re,r,rp) - return eg:GetFirst():IsControler(tp) -end -function c37053871.atktg1(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - e:SetLabel(0) - if Duel.CheckEvent(EVENT_BE_BATTLE_TARGET) and Duel.GetAttackTarget():IsControler(tp) - and Duel.GetAttackTarget() and Duel.SelectYesNo(tp,aux.Stringid(37053871,0)) then - e:SetLabel(1) - end -end -function c37053871.atktg2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - e:SetLabel(1) -end -function c37053871.atkop(e,tp,eg,ep,ev,re,r,rp) - if e:GetLabel()==0 or not e:GetHandler():IsRelateToEffect(e) then return end - Duel.ChangeAttackTarget(nil) -end diff --git a/script/c37055344.lua b/script/c37055344.lua deleted file mode 100644 index 71b3ddcbe9..0000000000 --- a/script/c37055344.lua +++ /dev/null @@ -1,122 +0,0 @@ ---ゴーストリック・ロールシフト -function c37055344.initial_effect(c) - --activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c37055344.target1) - e1:SetOperation(c37055344.operation) - c:RegisterEffect(e1) - --pos - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(37055344,0)) - e2:SetCategory(CATEGORY_POSITION) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetRange(LOCATION_SZONE) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetCondition(c37055344.condition) - e2:SetTarget(c37055344.target2) - e2:SetOperation(c37055344.operation) - c:RegisterEffect(e2) -end -function c37055344.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()==PHASE_BATTLE -end -function c37055344.filter1(c) - return c:IsFaceup() and c:IsSetCard(0x8d) and c:IsCanTurnSet() -end -function c37055344.filter2(c) - return c:IsPosition(POS_FACEDOWN_DEFENCE) -end -function c37055344.filter3(c) - return c:IsPosition(POS_FACEDOWN_DEFENCE) -end -function c37055344.filter4(c) - return c:IsFaceup() and c:IsCanTurnSet() -end -function c37055344.target1(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then - if e:GetLabel()==0 then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c37055344.filter1(chkc) - else return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c37055344.filter3(chkc) end - end - if chk==0 then return true end - local b1=Duel.IsExistingTarget(c37055344.filter1,tp,LOCATION_MZONE,0,1,nil) - and Duel.IsExistingMatchingCard(c37055344.filter2,tp,0,LOCATION_MZONE,1,nil) - local b2=Duel.IsExistingTarget(c37055344.filter3,tp,LOCATION_MZONE,0,1,nil) - if Duel.GetCurrentPhase()==PHASE_BATTLE - and (b1 or b2) and Duel.SelectYesNo(tp,aux.Stringid(37055344,3)) then - local op=0 - if b1 and b2 then - op=Duel.SelectOption(tp,aux.Stringid(37055344,1),aux.Stringid(37055344,2)) - elseif b1 then - op=Duel.SelectOption(tp,aux.Stringid(37055344,1)) - else - op=Duel.SelectOption(tp,aux.Stringid(37055344,2))+1 - end - e:SetLabel(op) - if op==0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - local g=Duel.SelectTarget(tp,c37055344.filter1,tp,LOCATION_MZONE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0) - else - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEDOWNDEFENCE) - local g=Duel.SelectTarget(tp,c37055344.filter3,tp,LOCATION_MZONE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0) - end - e:GetHandler():RegisterFlagEffect(37055344,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) - e:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - else - e:SetProperty(0) - end -end -function c37055344.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then - if e:GetLabel()==0 then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c37055344.filter1(chkc) - else return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c37055344.filter3(chkc) end - end - local b1=Duel.IsExistingTarget(c37055344.filter1,tp,LOCATION_MZONE,0,1,nil) - and Duel.IsExistingMatchingCard(c37055344.filter2,tp,0,LOCATION_MZONE,1,nil) - local b2=Duel.IsExistingTarget(c37055344.filter3,tp,LOCATION_MZONE,0,1,nil) - if chk==0 then return (b1 or b2) and e:GetHandler():GetFlagEffect(37055344)==0 end - local op=0 - if b1 and b2 then - op=Duel.SelectOption(tp,aux.Stringid(37055344,1),aux.Stringid(37055344,2)) - elseif b1 then - op=Duel.SelectOption(tp,aux.Stringid(37055344,1)) - else - op=Duel.SelectOption(tp,aux.Stringid(37055344,2))+1 - end - e:SetLabel(op) - if op==0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - local g=Duel.SelectTarget(tp,c37055344.filter1,tp,LOCATION_MZONE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0) - else - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEDOWNDEFENCE) - local g=Duel.SelectTarget(tp,c37055344.filter3,tp,LOCATION_MZONE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0) - end - e:GetHandler():RegisterFlagEffect(37055344,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) -end -function c37055344.operation(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():GetFlagEffect(37055344)==0 or not e:GetHandler():IsRelateToEffect(e) then return end - local tc=Duel.GetFirstTarget() - if e:GetLabel()==0 then - if not tc:IsRelateToEffect(e) or tc:IsFacedown() then return end - if Duel.ChangePosition(tc,POS_FACEDOWN_DEFENCE)==0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEDOWNDEFENCE) - local g=Duel.SelectMatchingCard(tp,c37055344.filter2,tp,0,LOCATION_MZONE,1,1,nil) - if g:GetCount()>0 then - Duel.ChangePosition(g,POS_FACEUP_ATTACK) - end - else - if not tc:IsRelateToEffect(e) or tc:IsPosition(POS_FACEUP_ATTACK) then return end - if Duel.ChangePosition(tc,POS_FACEUP_ATTACK)==0 or not tc:IsSetCard(0x8d) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - local g=Duel.SelectMatchingCard(tp,c37055344.filter4,tp,0,LOCATION_MZONE,1,1,nil) - if g:GetCount()>0 then - Duel.ChangePosition(g,POS_FACEDOWN_DEFENCE) - end - end -end diff --git a/script/c37057012.lua b/script/c37057012.lua deleted file mode 100644 index 65aec94f66..0000000000 --- a/script/c37057012.lua +++ /dev/null @@ -1,25 +0,0 @@ ---サイバー・オーガ・2 -function c37057012.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcCodeRep(c,64268668,2,false,false) - --atk up - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_DAMAGE_CALCULATING) - e1:SetCondition(c37057012.atkcon) - e1:SetOperation(c37057012.atkop) - c:RegisterEffect(e1) -end -function c37057012.atkcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler()==Duel.GetAttacker() and Duel.GetAttackTarget()~=nil -end -function c37057012.atkop(e,tp,eg,ep,ev,re,r,rp) - local bc=Duel.GetAttackTarget() - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_PHASE+RESET_DAMAGE_CAL) - e1:SetValue(bc:GetAttack()/2) - e:GetHandler():RegisterEffect(e1) -end diff --git a/script/c37057743.lua b/script/c37057743.lua deleted file mode 100644 index 6f7b47797c..0000000000 --- a/script/c37057743.lua +++ /dev/null @@ -1,52 +0,0 @@ ---炎星皇-チョウライオ -function c37057743.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_FIRE),3,2) - c:EnableReviveLimit() - --salvage - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(37057743,0)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCost(c37057743.thcost) - e1:SetTarget(c37057743.thtg) - e1:SetOperation(c37057743.thop) - c:RegisterEffect(e1) -end -function c37057743.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c37057743.filter(c) - return c:IsAttribute(ATTRIBUTE_FIRE) and c:IsAbleToHand() -end -function c37057743.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c37057743.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c37057743.filter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c37057743.filter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c37057743.thop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.SendtoHand(tc,nil,REASON_EFFECT)>0 then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) - e1:SetTargetRange(1,0) - e1:SetTarget(c37057743.sumlimit) - e1:SetLabel(tc:GetCode()) - Duel.RegisterEffect(e1,tp) - local e2=e1:Clone() - e2:SetCode(EFFECT_CANNOT_SUMMON) - Duel.RegisterEffect(e2,tp) - end -end -function c37057743.sumlimit(e,c) - return c:IsCode(e:GetLabel()) -end diff --git a/script/c37083210.lua b/script/c37083210.lua deleted file mode 100644 index fb8a4017e6..0000000000 --- a/script/c37083210.lua +++ /dev/null @@ -1,49 +0,0 @@ ---クロスカウンター -function c37083210.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetCondition(c37083210.condition) - e1:SetOperation(c37083210.activate) - c:RegisterEffect(e1) -end -function c37083210.condition(e,tp,eg,ep,ev,re,r,rp) - local a=Duel.GetAttacker() - local at=Duel.GetAttackTarget() - return Duel.GetCurrentPhase()==PHASE_DAMAGE and not Duel.IsDamageCalculated() - and a:IsControler(1-tp) and at and at:IsPosition(POS_FACEUP_DEFENCE) and a:GetAttack()0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,true) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c37115575.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsLocation(LOCATION_HAND+LOCATION_GRAVE) and Duel.SpecialSummon(c,0,tp,tp,true,true,POS_FACEUP)~=0 then - c:CompleteProcedure() - end -end -function c37115575.descon(e) - local f1=Duel.GetFieldCard(0,LOCATION_SZONE,5) - local f2=Duel.GetFieldCard(1,LOCATION_SZONE,5) - return (f1==nil or f1:IsFacedown()) and (f2==nil or f2:IsFacedown()) -end -function c37115575.destarget(e,c) - return c:IsSetCard(0x23) and c:GetFieldID()>e:GetHandler():GetFieldID() -end -function c37115575.decon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsRelateToBattle() and c:GetBattleTarget():IsType(TYPE_MONSTER) -end -function c37115575.defilter(c) - return c:IsFaceup() and c:IsDestructable() -end -function c37115575.detg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local g=Duel.GetMatchingGroup(c37115575.defilter,tp,0,LOCATION_MZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c37115575.deop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c37115575.defilter,tp,0,LOCATION_MZONE,nil) - Duel.Destroy(g,REASON_EFFECT) -end diff --git a/script/c37115973.lua b/script/c37115973.lua deleted file mode 100644 index 739b476023..0000000000 --- a/script/c37115973.lua +++ /dev/null @@ -1,64 +0,0 @@ ---ナンバーズハンター -function c37115973.initial_effect(c) - --todeck - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(37115973,0)) - e1:SetCategory(CATEGORY_TODECK) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c37115973.target) - e1:SetOperation(c37115973.operation) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - c:RegisterEffect(e2) - local e3=e1:Clone() - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e3) - --splimit - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_FIELD) - e4:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e4:SetRange(LOCATION_MZONE) - e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e4:SetTargetRange(1,1) - e4:SetTarget(c37115973.splimit) - c:RegisterEffect(e4) - --indes - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_SINGLE) - e5:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e5:SetValue(c37115973.indval) - c:RegisterEffect(e5) - --immune - local e6=Effect.CreateEffect(c) - e6:SetType(EFFECT_TYPE_SINGLE) - e6:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e6:SetRange(LOCATION_MZONE) - e6:SetCode(EFFECT_IMMUNE_EFFECT) - e6:SetValue(c37115973.efilter) - c:RegisterEffect(e6) -end -function c37115973.filter(c) - return c:IsSetCard(0x48) and c:IsType(TYPE_XYZ) and c:IsAbleToExtra() -end -function c37115973.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local g=Duel.GetMatchingGroup(c37115973.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0) -end -function c37115973.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c37115973.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - if g:GetCount()>0 then - Duel.SendtoDeck(g,nil,0,REASON_EFFECT) - end -end -function c37115973.splimit(e,c) - return c:IsSetCard(0x48) -end -function c37115973.indval(e,c) - return c:IsType(TYPE_XYZ) -end -function c37115973.efilter(e,te) - return te:IsActiveType(TYPE_XYZ) -end diff --git a/script/c37120512.lua b/script/c37120512.lua deleted file mode 100644 index 6d4eedfb80..0000000000 --- a/script/c37120512.lua +++ /dev/null @@ -1,50 +0,0 @@ ---闇の破神剣 -function c37120512.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c37120512.target) - e1:SetOperation(c37120512.operation) - c:RegisterEffect(e1) - --atk up - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(400) - c:RegisterEffect(e2) - --def down - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_EQUIP) - e3:SetCode(EFFECT_UPDATE_DEFENCE) - e3:SetValue(-200) - c:RegisterEffect(e3) - --equip limit - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetCode(EFFECT_EQUIP_LIMIT) - e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e4:SetValue(c37120512.eqlimit) - c:RegisterEffect(e4) -end -function c37120512.eqlimit(e,c) - return c:IsAttribute(ATTRIBUTE_DARK) -end -function c37120512.filter(c) - return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_DARK) -end -function c37120512.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c37120512.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c37120512.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c37120512.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c37120512.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,e:GetHandler(),tc) - end -end diff --git a/script/c37132349.lua b/script/c37132349.lua deleted file mode 100644 index 63ed5b2420..0000000000 --- a/script/c37132349.lua +++ /dev/null @@ -1,30 +0,0 @@ ---おジャマ・レッド -function c37132349.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(37132349,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c37132349.target) - e1:SetOperation(c37132349.operation) - c:RegisterEffect(e1) -end -function c37132349.filter(c,e,tp) - return c:IsSetCard(0xf) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c37132349.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c37132349.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c37132349.operation(e,tp,eg,ep,ev,re,r,rp) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ft<=0 then return end - if ft>4 then ft=4 end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c37132349.filter,tp,LOCATION_HAND,0,1,ft,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_ATTACK) - end -end diff --git a/script/c37164373.lua b/script/c37164373.lua deleted file mode 100644 index 072394584b..0000000000 --- a/script/c37164373.lua +++ /dev/null @@ -1,45 +0,0 @@ ---クイーンマドルチェ・ティアラミス -function c37164373.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0x71),4,2) - c:EnableReviveLimit() - --todeck - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(37164373,0)) - e1:SetCategory(CATEGORY_TODECK) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetCountLimit(1) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c37164373.cost) - e1:SetTarget(c37164373.target) - e1:SetOperation(c37164373.operation) - c:RegisterEffect(e1) -end -function c37164373.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c37164373.filter(c) - return c:IsSetCard(0x71) and c:IsAbleToDeck() -end -function c37164373.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c37164373.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c37164373.filter,tp,LOCATION_GRAVE,0,1,nil) - and Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,0,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectTarget(tp,c37164373.filter,tp,LOCATION_GRAVE,0,1,2,nil) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0) -end -function c37164373.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) - Duel.SendtoDeck(g,nil,2,REASON_EFFECT) - local ct=g:FilterCount(Card.IsLocation,nil,LOCATION_DECK+LOCATION_HAND+LOCATION_EXTRA) - local dg=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,0,LOCATION_ONFIELD,nil) - if ct>0 and dg:GetCount()>0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local rg=dg:Select(tp,1,ct,nil) - Duel.HintSelection(rg) - Duel.SendtoDeck(rg,nil,2,REASON_EFFECT) - end -end diff --git a/script/c37168514.lua b/script/c37168514.lua deleted file mode 100644 index 5207f544f5..0000000000 --- a/script/c37168514.lua +++ /dev/null @@ -1,31 +0,0 @@ ---ゴルゴニック・ケルベロス -function c37168514.initial_effect(c) - --summon success - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(37168514,0)) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c37168514.lvtg) - e1:SetOperation(c37168514.lvop) - c:RegisterEffect(e1) -end -function c37168514.filter(c) - local lv=c:GetLevel() - return c:IsFaceup() and c:IsRace(RACE_ROCK) and lv>0 and lv~=3 -end -function c37168514.lvtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c37168514.filter,tp,LOCATION_MZONE,0,1,nil) end -end -function c37168514.lvop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c37168514.filter,tp,LOCATION_MZONE,0,nil) - local tc=g:GetFirst() - while tc do - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CHANGE_LEVEL) - e1:SetValue(3) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - tc=g:GetNext() - end -end diff --git a/script/c37169670.lua b/script/c37169670.lua deleted file mode 100644 index 5613b36549..0000000000 --- a/script/c37169670.lua +++ /dev/null @@ -1,65 +0,0 @@ ---ハイパーサイコガンナー/バスター -function c37169670.initial_effect(c) - c:EnableReviveLimit() - --Cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(aux.FALSE) - c:RegisterEffect(e1) - --damage&recover - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(37169670,0)) - e2:SetCategory(CATEGORY_DAMAGE+CATEGORY_RECOVER) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_DAMAGE_STEP_END) - e2:SetTarget(c37169670.damtg) - e2:SetOperation(c37169670.damop) - c:RegisterEffect(e2) - --Special summon - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(37169670,1)) - e3:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e3:SetCode(EVENT_LEAVE_FIELD) - e3:SetCondition(c37169670.spcon) - e3:SetTarget(c37169670.sptg) - e3:SetOperation(c37169670.spop) - c:RegisterEffect(e3) -end -function c37169670.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetAttackTarget()~=nil end - local c=e:GetHandler() - local d=Duel.GetAttackTarget() - if d==c then d=Duel.GetAttacker() end - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,d:GetDefence()) - Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,d:GetAttack()) -end -function c37169670.damop(e,tp,eg,ep,ev,re,r,rp) - local ex1,a1,b1,p1,d1=Duel.GetOperationInfo(0,CATEGORY_DAMAGE) - local ex2,a2,b2,p2,d2=Duel.GetOperationInfo(0,CATEGORY_RECOVER) - Duel.Damage(1-tp,d1,REASON_EFFECT) - Duel.Recover(tp,d2,REASON_EFFECT) -end -function c37169670.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsReason(REASON_DESTROY) -end -function c37169670.spfilter(c,e,tp) - return c:IsCode(95526884) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c37169670.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c37169670.spfilter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c37169670.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c37169670.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c37169670.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c3717252.lua b/script/c3717252.lua deleted file mode 100644 index 6783629681..0000000000 --- a/script/c3717252.lua +++ /dev/null @@ -1,59 +0,0 @@ ---シャドール・ビースト -function c3717252.initial_effect(c) - --flip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(3717252,0)) - e1:SetCategory(CATEGORY_DRAW+CATEGORY_HANDES) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DELAY) - e1:SetCountLimit(1,3717252) - e1:SetCost(c3717252.cost) - e1:SetTarget(c3717252.target) - e1:SetOperation(c3717252.operation) - c:RegisterEffect(e1) - --draw - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(3717252,1)) - e2:SetCategory(CATEGORY_DRAW) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetCountLimit(1,3717252) - e2:SetCondition(c3717252.drcon) - e2:SetCost(c3717252.cost) - e2:SetTarget(c3717252.drtg) - e2:SetOperation(c3717252.drop) - c:RegisterEffect(e2) -end -function c3717252.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) -end -function c3717252.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp,2) end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(2) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2) - Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1) -end -function c3717252.operation(e,tp,eg,ep,ev,re,r,rp) - local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) - if Duel.Draw(p,2,REASON_EFFECT)==2 then - Duel.ShuffleHand(tp) - Duel.BreakEffect() - Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT+REASON_DISCARD) - end -end -function c3717252.drcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsReason(REASON_EFFECT) -end -function c3717252.drtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(1) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c3717252.drop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end diff --git a/script/c37192109.lua b/script/c37192109.lua deleted file mode 100644 index 63a53a97f3..0000000000 --- a/script/c37192109.lua +++ /dev/null @@ -1,122 +0,0 @@ ---PSYフレームロード・Ζ -function c37192109.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1) - c:EnableReviveLimit() - --remove - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(37192109,0)) - e1:SetCategory(CATEGORY_REMOVE) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1) - e1:SetTarget(c37192109.rmtg) - e1:SetOperation(c37192109.rmop) - c:RegisterEffect(e1) - --to hand - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(37192109,1)) - e2:SetCategory(CATEGORY_TODECK+CATEGORY_TOHAND) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_GRAVE) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetTarget(c37192109.thtg) - e2:SetOperation(c37192109.thop) - c:RegisterEffect(e2) -end -function c37192109.rmfilter(c) - return c:IsPosition(POS_FACEUP_ATTACK) and c:IsAbleToRemove() - and bit.band(c:GetSummonType(),SUMMON_TYPE_SPECIAL)==SUMMON_TYPE_SPECIAL -end -function c37192109.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c37192109.rmfilter(chkc) end - if chk==0 then return e:GetHandler():IsAbleToRemove() - and Duel.IsExistingTarget(c37192109.rmfilter,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,c37192109.rmfilter,tp,0,LOCATION_MZONE,1,1,nil) - g:AddCard(e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,2,0,0) -end -function c37192109.rmop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if not c:IsRelateToEffect(e) or not tc:IsRelateToEffect(e) then return end - local g=Group.FromCards(c,tc) - if Duel.Remove(g,0,REASON_EFFECT+REASON_TEMPORARY)~=0 then - local fid=c:GetFieldID() - local rct=1 - if Duel.GetTurnPlayer()==tp and Duel.GetCurrentPhase()==PHASE_STANDBY then rct=2 end - local og=Duel.GetOperatedGroup() - local oc=og:GetFirst() - while oc do - if oc:IsControler(tp) then - oc:RegisterFlagEffect(37192109,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,0,rct,fid) - else - oc:RegisterFlagEffect(37192109,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_STANDBY+RESET_OPPO_TURN,0,1,fid) - end - oc=og:GetNext() - end - og:KeepAlive() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) - e1:SetCountLimit(1) - e1:SetLabel(fid) - e1:SetLabelObject(og) - e1:SetCondition(c37192109.retcon) - e1:SetOperation(c37192109.retop) - if Duel.GetTurnPlayer()==tp and Duel.GetCurrentPhase()==PHASE_STANDBY then - e1:SetReset(RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,2) - e1:SetValue(Duel.GetTurnCount()) - else - e1:SetReset(RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN) - e1:SetValue(0) - end - Duel.RegisterEffect(e1,tp) - end -end -function c37192109.retfilter(c,fid) - return c:GetFlagEffectLabel(37192109)==fid -end -function c37192109.retcon(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetTurnPlayer()~=tp or Duel.GetTurnCount()==e:GetValue() then return false end - local g=e:GetLabelObject() - if not g:IsExists(c37192109.retfilter,1,nil,e:GetLabel()) then - g:DeleteGroup() - e:Reset() - return false - else return true end -end -function c37192109.retop(e,tp,eg,ep,ev,re,r,rp) - local g=e:GetLabelObject() - local sg=g:Filter(c37192109.retfilter,nil,e:GetLabel()) - g:DeleteGroup() - local tc=sg:GetFirst() - while tc do - Duel.ReturnToField(tc) - tc=sg:GetNext() - end -end -function c37192109.thfilter(c) - return c:IsSetCard(0xc1) and c:IsAbleToHand() -end -function c37192109.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c37192109.thfilter(chkc) and chkc~=e:GetHandler() end - if chk==0 then return e:GetHandler():IsAbleToExtra() - and Duel.IsExistingTarget(c37192109.thfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c37192109.thfilter,tp,LOCATION_GRAVE,0,1,1,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0) -end -function c37192109.thop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.SendtoDeck(c,nil,2,REASON_EFFECT)~=0 - and c:IsLocation(LOCATION_EXTRA) and tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - end -end diff --git a/script/c37195861.lua b/script/c37195861.lua deleted file mode 100644 index 8a7f087a82..0000000000 --- a/script/c37195861.lua +++ /dev/null @@ -1,35 +0,0 @@ ---E・HERO オーシャン -function c37195861.initial_effect(c) - --to hand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(37195861,0)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) - e1:SetCountLimit(1) - e1:SetCondition(c37195861.con) - e1:SetTarget(c37195861.tg) - e1:SetOperation(c37195861.op) - c:RegisterEffect(e1) -end -function c37195861.con(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c37195861.filter(c) - return c:IsSetCard(0x8) and c:IsAbleToHand() and (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup()) -end -function c37195861.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(0x14) and chkc:IsControler(tp) and c37195861.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c37195861.filter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g=Duel.SelectTarget(tp,c37195861.filter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c37195861.op(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - end -end diff --git a/script/c37198732.lua b/script/c37198732.lua deleted file mode 100644 index 77390ebdd4..0000000000 --- a/script/c37198732.lua +++ /dev/null @@ -1,50 +0,0 @@ ---レベル・マイスター -function c37198732.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCost(c37198732.cost) - e1:SetTarget(c37198732.target) - e1:SetOperation(c37198732.activate) - c:RegisterEffect(e1) -end -function c37198732.cfilter(c) - return c:GetLevel()>0 and c:IsAbleToGraveAsCost() -end -function c37198732.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c37198732.cfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c37198732.cfilter,tp,LOCATION_HAND,0,1,1,nil) - Duel.SendtoGrave(g,REASON_COST) - e:SetLabelObject(g:GetFirst()) - g:GetFirst():CreateEffectRelation(e) -end -function c37198732.filter(c) - return c:IsFaceup() and c:GetLevel()>0 -end -function c37198732.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c37198732.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c37198732.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c37198732.filter,tp,LOCATION_MZONE,0,1,2,nil) -end -function c37198732.activate(e,tp,eg,ep,ev,re,r,rp) - local lc=e:GetLabelObject() - if not lc:IsRelateToEffect(e) then return end - local lv=lc:GetLevel() - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local tc=g:GetFirst() - while tc do - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CHANGE_LEVEL) - e1:SetValue(lv) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - tc:RegisterEffect(e1) - end - tc=g:GetNext() - end -end diff --git a/script/c37209439.lua b/script/c37209439.lua deleted file mode 100644 index 536fce5ea5..0000000000 --- a/script/c37209439.lua +++ /dev/null @@ -1,128 +0,0 @@ ---誤封の契約書 -function c37209439.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c37209439.target) - c:RegisterEffect(e1) - --disable - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(37209439,0)) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetRange(LOCATION_SZONE) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetCountLimit(1) - e2:SetCondition(c37209439.negcon) - e2:SetCost(c37209439.negcost) - e2:SetOperation(c37209439.negop) - c:RegisterEffect(e2) - --damage - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(37209439,1)) - e3:SetCategory(CATEGORY_DAMAGE) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e3:SetCode(EVENT_PHASE+PHASE_STANDBY) - e3:SetRange(LOCATION_SZONE) - e3:SetCountLimit(1) - e3:SetCondition(c37209439.damcon) - e3:SetCost(c37209439.damcost) - e3:SetTarget(c37209439.damtg) - e3:SetOperation(c37209439.damop) - c:RegisterEffect(e3) -end -function c37209439.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local b1=c37209439.negcon(e,tp,eg,ep,ev,re,r,rp) - local b2=c37209439.damcon(e,tp,eg,ep,ev,re,r,rp) and Duel.GetCurrentPhase()==PHASE_STANDBY - if (b1 or b2) and Duel.SelectYesNo(tp,94) then - local c=e:GetHandler() - local op=0 - if b1 and b2 then - op=Duel.SelectOption(tp,aux.Stringid(37209439,0),aux.Stringid(37209439,1)) - elseif b1 then - op=Duel.SelectOption(tp,aux.Stringid(37209439,0)) - else op=Duel.SelectOption(tp,aux.Stringid(37209439,1))+1 end - if op==0 then - c:RegisterFlagEffect(37209439,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) - e:SetCategory(0) - e:SetOperation(c37209439.negop) - else - c:RegisterFlagEffect(37209440,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) - c37209439.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - e:SetCategory(CATEGORY_DAMAGE) - e:SetOperation(c37209439.damop) - end - else - e:SetCategory(0) - e:SetOperation(nil) - end -end -function c37209439.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0xaf) -end -function c37209439.negcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c37209439.cfilter,tp,LOCATION_MZONE,0,1,nil) -end -function c37209439.negcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():GetFlagEffect(37209439)==0 end - e:GetHandler():RegisterFlagEffect(37209439,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) -end -function c37209439.negop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) then return end - local fid=c:GetFieldID() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_DISABLE) - e1:SetRange(LOCATION_SZONE) - e1:SetTargetRange(LOCATION_SZONE,LOCATION_SZONE) - e1:SetTarget(c37209439.distg) - e1:SetLabel(fid) - e1:SetReset(RESET_PHASE+RESET_END) - Duel.RegisterEffect(e1,tp) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_CHAIN_SOLVING) - e2:SetRange(LOCATION_SZONE) - e2:SetOperation(c37209439.disop) - e2:SetLabel(fid) - e2:SetReset(RESET_PHASE+RESET_END) - Duel.RegisterEffect(e2,tp) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetCode(EFFECT_DISABLE_TRAPMONSTER) - e3:SetRange(LOCATION_SZONE) - e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e3:SetTarget(c37209439.distg) - e3:SetLabel(fid) - e3:SetReset(RESET_PHASE+RESET_END) - Duel.RegisterEffect(e3,tp) -end -function c37209439.distg(e,c) - return c:GetFieldID()~=e:GetLabel() and c:IsType(TYPE_TRAP) and c:IsStatus(STATUS_ACTIVATED) -end -function c37209439.disop(e,tp,eg,ep,ev,re,r,rp) - local tl=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION) - if tl==LOCATION_SZONE and re:IsActiveType(TYPE_TRAP) and re:GetHandler():GetFieldID()~=e:GetLabel() then - Duel.NegateEffect(ev) - end -end -function c37209439.damcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c37209439.damcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():GetFlagEffect(37209440)==0 end - e:GetHandler():RegisterFlagEffect(37209440,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) -end -function c37209439.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(1000) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,0,0,tp,1000) -end -function c37209439.damop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c37231841.lua b/script/c37231841.lua deleted file mode 100644 index 2c1af51702..0000000000 --- a/script/c37231841.lua +++ /dev/null @@ -1,40 +0,0 @@ ---軽量化 -function c37231841.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --draw - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(37231841,0)) - e2:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_SZONE) - e2:SetCountLimit(1) - e2:SetTarget(c37231841.target) - e2:SetOperation(c37231841.operation) - c:RegisterEffect(e2) -end -function c37231841.filter(c) - return c:IsLevelAbove(7) and c:IsAbleToDeck() -end -function c37231841.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp) - and Duel.IsExistingMatchingCard(c37231841.filter,tp,LOCATION_HAND,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_HAND) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c37231841.operation(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - if not Duel.IsPlayerCanDraw(tp) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectMatchingCard(tp,c37231841.filter,tp,LOCATION_HAND,0,1,1,nil) - if g:GetCount()>0 then - Duel.ConfirmCards(1-tp,g) - Duel.SendtoDeck(g,nil,0,REASON_EFFECT) - Duel.ShuffleDeck(tp) - Duel.BreakEffect() - Duel.Draw(tp,1,REASON_EFFECT) - end -end diff --git a/script/c37241623.lua b/script/c37241623.lua deleted file mode 100644 index ebfa646c1d..0000000000 --- a/script/c37241623.lua +++ /dev/null @@ -1,44 +0,0 @@ ---紋章の記録 -function c37241623.initial_effect(c) - Duel.EnableGlobalFlag(GLOBALFLAG_DETACH_EVENT) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_CHAINING) - e1:SetCondition(c37241623.condition) - e1:SetTarget(c37241623.target) - e1:SetOperation(c37241623.activate) - c:RegisterEffect(e1) - if not c37241623.global_check then - c37241623.global_check=true - c37241623[0]=nil - local ge1=Effect.CreateEffect(c) - ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - ge1:SetCode(EVENT_DETACH_MATERIAL) - ge1:SetOperation(c37241623.checkop) - Duel.RegisterEffect(ge1,0) - end -end -function c37241623.checkop(e,tp,eg,ep,ev,re,r,rp) - local cid=Duel.GetCurrentChain() - if cid>0 then - c37241623[0]=Duel.GetChainInfo(cid,CHAININFO_CHAIN_ID) - end -end -function c37241623.condition(e,tp,eg,ep,ev,re,r,rp) - return rp~=tp and Duel.GetChainInfo(0,CHAININFO_CHAIN_ID)==c37241623[0] and re:IsActiveType(TYPE_XYZ) and Duel.IsChainNegatable(ev) -end -function c37241623.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - if re:GetHandler():IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) - end -end -function c37241623.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateActivation(ev) - if re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(re:GetHandler(),REASON_EFFECT) - end -end diff --git a/script/c37267041.lua b/script/c37267041.lua deleted file mode 100644 index 4907df5090..0000000000 --- a/script/c37267041.lua +++ /dev/null @@ -1,39 +0,0 @@ ---サイレント・ソードマン LV7 -function c37267041.initial_effect(c) - c:EnableReviveLimit() - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(aux.FALSE) - c:RegisterEffect(e1) - --disable - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_DISABLE) - e2:SetRange(LOCATION_MZONE) - e2:SetTargetRange(LOCATION_SZONE,LOCATION_SZONE) - e2:SetTarget(c37267041.distg) - c:RegisterEffect(e2) - --disable effect - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e3:SetCode(EVENT_CHAIN_SOLVING) - e3:SetRange(LOCATION_MZONE) - e3:SetOperation(c37267041.disop) - c:RegisterEffect(e3) -end -c37267041.lvupcount=1 -c37267041.lvup={74388798} -c37267041.lvdncount=2 -c37267041.lvdn={1995985,74388798} -function c37267041.distg(e,c) - return c:IsType(TYPE_SPELL) -end -function c37267041.disop(e,tp,eg,ep,ev,re,r,rp) - local tl=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION) - if tl==LOCATION_SZONE and re:IsActiveType(TYPE_SPELL) then - Duel.NegateEffect(ev) - end -end diff --git a/script/c37300735.lua b/script/c37300735.lua deleted file mode 100644 index 7c5bd3d515..0000000000 --- a/script/c37300735.lua +++ /dev/null @@ -1,27 +0,0 @@ ---TG ジェット・ファルコン -function c37300735.initial_effect(c) - --damage - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(37300735,0)) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_BE_MATERIAL) - e1:SetCondition(c37300735.damcon) - e1:SetTarget(c37300735.damtg) - e1:SetOperation(c37300735.damop) - c:RegisterEffect(e1) -end -function c37300735.damcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsLocation(LOCATION_GRAVE) and r==REASON_SYNCHRO -end -function c37300735.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(500) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,500) -end -function c37300735.damop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c37313786.lua b/script/c37313786.lua deleted file mode 100644 index e6236e5482..0000000000 --- a/script/c37313786.lua +++ /dev/null @@ -1,35 +0,0 @@ ---ギャンブル -function c37313786.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_COIN+CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c37313786.condition) - e1:SetTarget(c37313786.target) - e1:SetOperation(c37313786.activate) - c:RegisterEffect(e1) -end -function c37313786.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)<=2 and Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>=6 -end -function c37313786.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_COIN,nil,0,tp,1) -end -function c37313786.activate(e,tp,eg,ep,ev,re,r,rp) - local coin=Duel.SelectOption(tp,60,61) - local res=Duel.TossCoin(tp,1) - if coin~=res then - local gc=Duel.GetFieldGroupCount(tp,LOCATION_HAND,0) - Duel.Draw(tp,5-gc,REASON_EFFECT) - else - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetTargetRange(1,0) - e1:SetCode(EFFECT_SKIP_TURN) - e1:SetReset(RESET_PHASE+PHASE_DRAW+RESET_SELF_TURN) - Duel.RegisterEffect(e1,tp) - end -end diff --git a/script/c37318031.lua b/script/c37318031.lua deleted file mode 100644 index c2c9d7e653..0000000000 --- a/script/c37318031.lua +++ /dev/null @@ -1,38 +0,0 @@ ---R-ライトジャスティス -function c37318031.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c37318031.target) - e1:SetOperation(c37318031.activate) - c:RegisterEffect(e1) -end -function c37318031.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable() -end -function c37318031.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x3008) -end -function c37318031.target(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then - local ct=Duel.GetMatchingGroupCount(c37318031.cfilter,tp,LOCATION_MZONE,0,nil) - e:SetLabel(ct) - return Duel.IsExistingMatchingCard(c37318031.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,ct,c) - end - local ct=e:GetLabel() - local sg=Duel.GetMatchingGroup(c37318031.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,c) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,ct,0,0) -end -function c37318031.activate(e,tp,eg,ep,ev,re,r,rp) - local ct=Duel.GetMatchingGroupCount(c37318031.cfilter,tp,LOCATION_MZONE,0,nil) - local g=Duel.GetMatchingGroup(c37318031.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler()) - if g:GetCount()>=ct then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local sg=g:Select(tp,ct,ct,nil) - Duel.HintSelection(sg) - Duel.Destroy(sg,REASON_EFFECT) - end -end diff --git a/script/c37322745.lua b/script/c37322745.lua deleted file mode 100644 index a6bf6c4469..0000000000 --- a/script/c37322745.lua +++ /dev/null @@ -1,39 +0,0 @@ ---ナチュルの森 -function c37322745.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e2:SetDescription(aux.Stringid(37322745,0)) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY) - e2:SetRange(LOCATION_SZONE) - e2:SetCode(EVENT_CHAIN_NEGATED) - e2:SetCondition(c37322745.condition) - e2:SetTarget(c37322745.target) - e2:SetOperation(c37322745.operation) - c:RegisterEffect(e2) -end -function c37322745.condition(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp -end -function c37322745.filter(c) - return c:IsLevelBelow(3) and c:IsSetCard(0x2a) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() -end -function c37322745.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return not e:GetHandler():IsStatus(STATUS_CHAINING) - and Duel.IsExistingMatchingCard(c37322745.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c37322745.operation(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c37322745.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c3734202.lua b/script/c3734202.lua deleted file mode 100644 index 05cc4232d8..0000000000 --- a/script/c3734202.lua +++ /dev/null @@ -1,163 +0,0 @@ ---ナチュルの神星樹 -function c3734202.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c3734202.target) - e1:SetOperation(c3734202.activate) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(3734202,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetRange(LOCATION_SZONE) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetCountLimit(1,3734202) - e2:SetCost(c3734202.spcost1) - e2:SetTarget(c3734202.sptg1) - e2:SetOperation(c3734202.spop1) - c:RegisterEffect(e2) - --spsummon - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(3734202,1)) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_QUICK_O) - e3:SetRange(LOCATION_SZONE) - e3:SetCode(EVENT_FREE_CHAIN) - e3:SetCountLimit(1,3734202) - e3:SetCost(c3734202.spcost2) - e3:SetTarget(c3734202.sptg2) - e3:SetOperation(c3734202.spop2) - c:RegisterEffect(e3) - --search - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(3734202,2)) - e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e4:SetCode(EVENT_TO_GRAVE) - e4:SetTarget(c3734202.thtg) - e4:SetOperation(c3734202.thop) - c:RegisterEffect(e4) -end -function c3734202.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local b1=Duel.CheckReleaseGroup(tp,c3734202.cfilter1,1,nil) - and Duel.IsExistingMatchingCard(c3734202.spfilter1,tp,LOCATION_DECK,0,1,nil,e,tp) - local b2=Duel.CheckReleaseGroup(tp,c3734202.cfilter2,1,nil) - and Duel.IsExistingMatchingCard(c3734202.spfilter2,tp,LOCATION_DECK,0,1,nil,e,tp) - if Duel.GetFlagEffect(tp,3734202)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and (b1 or b2) and Duel.SelectYesNo(tp,94) then - local opt=0 - if b1 and b2 then - opt=Duel.SelectOption(tp,aux.Stringid(3734202,0),aux.Stringid(3734202,1)) - elseif b1 then - opt=Duel.SelectOption(tp,aux.Stringid(3734202,0)) - else - opt=Duel.SelectOption(tp,aux.Stringid(3734202,1))+1 - end - if opt==0 then - local g=Duel.SelectReleaseGroup(tp,c3734202.cfilter1,1,1,nil) - Duel.Release(g,REASON_COST) - else - local g=Duel.SelectReleaseGroup(tp,c3734202.cfilter2,1,1,nil) - Duel.Release(g,REASON_COST) - end - Duel.RegisterFlagEffect(tp,3734202,RESET_PHASE+PHASE_END,0,1) - e:SetCategory(CATEGORY_SPECIAL_SUMMON) - e:SetLabel(opt+1) - else - e:SetCategory(0) - e:SetLabel(0) - end -end -function c3734202.activate(e,tp,eg,ep,ev,re,r,rp) - local opt=e:GetLabel() - if opt==0 or not e:GetHandler():IsRelateToEffect(e) then return end - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - if opt==1 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c3734202.spfilter1,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end - else - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c3734202.spfilter2,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end - end -end -function c3734202.cfilter1(c) - return c:IsRace(RACE_INSECT) and c:IsAttribute(ATTRIBUTE_EARTH) -end -function c3734202.spcost1(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetFlagEffect(tp,3734202)==0 - and Duel.CheckReleaseGroup(tp,c3734202.cfilter1,1,nil) end - Duel.RegisterFlagEffect(tp,3734202,RESET_PHASE+PHASE_END,0,1) - local g=Duel.SelectReleaseGroup(tp,c3734202.cfilter1,1,1,nil) - Duel.Release(g,REASON_COST) -end -function c3734202.spfilter1(c,e,tp) - return c:IsLevelBelow(4) and c:IsRace(RACE_PLANT) and c:IsAttribute(ATTRIBUTE_EARTH) - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c3734202.sptg1(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsExistingMatchingCard(c3734202.spfilter1,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c3734202.spop1(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c3734202.spfilter1,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end -function c3734202.cfilter2(c) - return c:IsRace(RACE_PLANT) and c:IsAttribute(ATTRIBUTE_EARTH) -end -function c3734202.spcost2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetFlagEffect(tp,3734202)==0 - and Duel.CheckReleaseGroup(tp,c3734202.cfilter2,1,nil) end - Duel.RegisterFlagEffect(tp,3734202,RESET_PHASE+PHASE_END,0,1) - local g=Duel.SelectReleaseGroup(tp,c3734202.cfilter2,1,1,nil) - Duel.Release(g,REASON_COST) -end -function c3734202.spfilter2(c,e,tp) - return c:IsLevelBelow(4) and c:IsRace(RACE_INSECT) and c:IsAttribute(ATTRIBUTE_EARTH) - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c3734202.sptg2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsExistingMatchingCard(c3734202.spfilter2,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c3734202.spop2(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c3734202.spfilter2,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end -function c3734202.thfilter(c) - return c:IsSetCard(0x2a) and not c:IsCode(3734202) and c:IsAbleToHand() -end -function c3734202.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c3734202.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c3734202.thfilter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c37349495.lua b/script/c37349495.lua deleted file mode 100644 index 94ef7a46d9..0000000000 --- a/script/c37349495.lua +++ /dev/null @@ -1,34 +0,0 @@ ---ナチュル・エッグプラント -function c37349495.initial_effect(c) - --to hand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(37349495,0)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCondition(c37349495.thcon) - e1:SetTarget(c37349495.thtg) - e1:SetOperation(c37349495.thop) - c:RegisterEffect(e1) -end -function c37349495.thcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) -end -function c37349495.filter(c) - return c:IsSetCard(0x2a) and c:IsType(TYPE_MONSTER) and c:GetCode()~=37349495 and c:IsAbleToHand() -end -function c37349495.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c37349495.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c37349495.filter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c37349495.filter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c37349495.thop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end diff --git a/script/c37364101.lua b/script/c37364101.lua deleted file mode 100644 index 3d452a5cf8..0000000000 --- a/script/c37364101.lua +++ /dev/null @@ -1,102 +0,0 @@ ---ストイック・チャレンジ -function c37364101.initial_effect(c) - c:SetUniqueOnField(1,0,37364101) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c37364101.target) - e1:SetOperation(c37364101.operation) - c:RegisterEffect(e1) - --equip limit - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_EQUIP_LIMIT) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetValue(c37364101.eqlimit) - c:RegisterEffect(e2) - --atkup - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_EQUIP) - e3:SetCode(EFFECT_UPDATE_ATTACK) - e3:SetValue(c37364101.atkval) - c:RegisterEffect(e3) - --damage change - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_FIELD) - e4:SetCode(EFFECT_CHANGE_DAMAGE) - e4:SetRange(LOCATION_SZONE) - e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e4:SetTargetRange(0,1) - e4:SetValue(c37364101.damval) - c:RegisterEffect(e4) - -- - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_EQUIP) - e5:SetCode(EFFECT_CANNOT_TRIGGER) - c:RegisterEffect(e5) - --tograve - local e6=Effect.CreateEffect(c) - e6:SetDescription(aux.Stringid(37364101,0)) - e6:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e6:SetCode(EVENT_PHASE+PHASE_END) - e6:SetRange(LOCATION_SZONE) - e6:SetCountLimit(1) - e6:SetCondition(c37364101.tgcon) - e6:SetTarget(c37364101.tgtg) - e6:SetOperation(c37364101.tgop) - c:RegisterEffect(e6) - --destroy - local e7=Effect.CreateEffect(c) - e7:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE) - e7:SetCode(EVENT_LEAVE_FIELD) - e7:SetOperation(c37364101.desop) - c:RegisterEffect(e7) -end -function c37364101.eqlimit(e,c) - return c:GetOverlayCount()>0 -end -function c37364101.filter(c) - return c:IsFaceup() and c:GetOverlayCount()>0 -end -function c37364101.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c37364101.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c37364101.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c37364101.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c37364101.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,e:GetHandler(),tc) - end -end -function c37364101.atkval(e,c) - return Duel.GetOverlayCount(e:GetHandlerPlayer(),1,0)*600 -end -function c37364101.damval(e,re,dam,r,rp,rc) - if bit.band(r,REASON_BATTLE)~=0 and rc==e:GetHandler():GetEquipTarget() and rc:GetBattleTarget()~=nil then - return dam*2 - else return dam end -end -function c37364101.tgcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp -end -function c37364101.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,e:GetHandler(),1,0,0) -end -function c37364101.tgop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - Duel.SendtoGrave(e:GetHandler(),REASON_EFFECT) - end -end -function c37364101.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetHandler():GetFirstCardTarget() - if tc and tc:IsLocation(LOCATION_MZONE) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c37383714.lua b/script/c37383714.lua deleted file mode 100644 index dd8b5328a4..0000000000 --- a/script/c37383714.lua +++ /dev/null @@ -1,40 +0,0 @@ ---魂の綱 -function c37383714.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCondition(c37383714.condition) - e1:SetCost(c37383714.cost) - e1:SetTarget(c37383714.target) - e1:SetOperation(c37383714.activate) - c:RegisterEffect(e1) -end -function c37383714.cfilter(c,tp) - return c:IsReason(REASON_EFFECT) and c:IsReason(REASON_DESTROY) and c:IsType(TYPE_MONSTER) - and c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_MZONE) -end -function c37383714.condition(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c37383714.cfilter,1,nil,tp) -end -function c37383714.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,1000) end - Duel.PayLPCost(tp,1000) -end -function c37383714.spfilter(c,e,tp) - return c:GetLevel()==4 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c37383714.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c37383714.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c37383714.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c37383714.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c37390589.lua b/script/c37390589.lua deleted file mode 100644 index 812d028686..0000000000 --- a/script/c37390589.lua +++ /dev/null @@ -1,83 +0,0 @@ ---鎖付きブーメラン -function c37390589.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCondition(c37390589.condition) - e1:SetTarget(c37390589.target) - e1:SetOperation(c37390589.operation) - c:RegisterEffect(e1) -end -function c37390589.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end -function c37390589.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then - if e:GetLabel()==0 then - return false - elseif e:GetLabel()==1 then - return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() - else return false end - end - local b1=Duel.CheckEvent(EVENT_ATTACK_ANNOUNCE) and Duel.GetTurnPlayer()~=tp - and Duel.GetAttacker():IsLocation(LOCATION_MZONE) and Duel.GetAttacker():IsCanBeEffectTarget(e) - local b2=Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) - if chk==0 then return b1 or b2 end - local opt=0 - if b1 and b2 then - opt=Duel.SelectOption(tp,aux.Stringid(37390589,0),aux.Stringid(37390589,1),aux.Stringid(37390589,2)) - elseif b1 then - opt=Duel.SelectOption(tp,aux.Stringid(37390589,0)) - else - opt=Duel.SelectOption(tp,aux.Stringid(37390589,1))+1 - end - e:SetLabel(opt) - if opt==0 or opt==2 then - Duel.SetTargetCard(Duel.GetAttacker()) - end - if opt==1 or opt==2 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,nil) - e:SetLabelObject(g:GetFirst()) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) - end -end -function c37390589.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local opt=e:GetLabel() - if opt==0 or opt==2 then - local tc=Duel.GetAttacker() - if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsAttackable() and not tc:IsStatus(STATUS_ATTACK_CANCELED) then - Duel.ChangePosition(tc,POS_FACEUP_DEFENCE) - end - end - if opt==1 or opt==2 then - local tc=e:GetLabelObject() - if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,c,tc) - c:CancelToGrave() - --Atkup - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_EQUIP) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(500) - e1:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e1) - --Equip limit - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_EQUIP_LIMIT) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetValue(c37390589.eqlimit) - e2:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e2) - end - end -end -function c37390589.eqlimit(e,c) - return c:GetControler()==e:GetOwnerPlayer() -end diff --git a/script/c37406863.lua b/script/c37406863.lua deleted file mode 100644 index 20f8673836..0000000000 --- a/script/c37406863.lua +++ /dev/null @@ -1,30 +0,0 @@ ---封神鏡 -function c37406863.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_HANDES) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c37406863.target) - e1:SetOperation(c37406863.activate) - c:RegisterEffect(e1) -end -function c37406863.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(tp) -end -function c37406863.activate(e,tp,eg,ep,ev,re,r,rp) - local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) - local g=Duel.GetFieldGroup(p,0,LOCATION_HAND) - if g:GetCount()>0 then - Duel.ConfirmCards(p,g) - local tg=g:Filter(Card.IsType,nil,TYPE_SPIRIT) - if tg:GetCount()>0 then - Duel.Hint(HINT_SELECTMSG,p,HINTMSG_TOGRAVE) - local sg=tg:Select(p,1,1,nil) - Duel.SendtoGrave(sg,REASON_DISCARD+REASON_EFFECT) - end - Duel.ShuffleHand(1-p) - end -end diff --git a/script/c37412656.lua b/script/c37412656.lua deleted file mode 100644 index 3d5a257ca9..0000000000 --- a/script/c37412656.lua +++ /dev/null @@ -1,41 +0,0 @@ ---ヒーロー・ブラスト -function c37412656.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_DESTROY) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,0x1e0) - e1:SetTarget(c37412656.target) - e1:SetOperation(c37412656.activate) - c:RegisterEffect(e1) -end -function c37412656.filter(c) - return c:IsSetCard(0x3008) and c:IsType(TYPE_NORMAL) and c:IsAbleToHand() -end -function c37412656.dfilter(c,atk) - return c:IsFaceup() and c:IsDestructable() and c:IsAttackBelow(atk) -end -function c37412656.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:GetLocation()==LOCATION_GRAVE and chkc:GetControler()==tp and c37412656.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c37412656.filter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c37412656.filter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) - local tc=g:GetFirst() - local dg=Duel.GetMatchingGroup(c37412656.dfilter,tp,0,LOCATION_MZONE,nil,tc:GetAttack()) - if dg:GetCount()>0 then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,dg,1,0,0) - end -end -function c37412656.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.BreakEffect() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local dg=Duel.SelectMatchingCard(tp,c37412656.dfilter,tp,0,LOCATION_MZONE,1,1,nil,tc:GetAttack()) - Duel.Destroy(dg,REASON_EFFECT) - end -end diff --git a/script/c37421075.lua b/script/c37421075.lua deleted file mode 100644 index cacb241cc3..0000000000 --- a/script/c37421075.lua +++ /dev/null @@ -1,46 +0,0 @@ ---強制退化 -function c37421075.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_END_PHASE) - e1:SetCost(c37421075.cost) - e1:SetTarget(c37421075.target) - e1:SetOperation(c37421075.activate) - c:RegisterEffect(e1) -end -function c37421075.cfilter(c) - return c:IsLevelAbove(4) and c:IsRace(RACE_DINOSAUR) -end -function c37421075.cost(e,tp,eg,ep,ev,re,r,rp,chk) - e:SetLabel(1) - if chk==0 then return Duel.CheckReleaseGroup(tp,c37421075.cfilter,1,nil) end - local rg=Duel.SelectReleaseGroup(tp,c37421075.cfilter,1,1,nil) - Duel.Release(rg,REASON_COST) -end -function c37421075.spfilter(c,e,tp) - return c:IsLevelBelow(3) and c:IsRace(RACE_REPTILE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) - and not c:IsHasEffect(EFFECT_NECRO_VALLEY) -end -function c37421075.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local chkf=(e:GetLabel()==1) - e:SetLabel(0) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - return Duel.IsExistingMatchingCard(c37421075.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,2,nil,e,tp) - and ((chkf and ft>0) or (not chkf and ft>1)) - end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_HAND+LOCATION_GRAVE) - e:SetLabel(0) -end -function c37421075.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 then return end - local g=Duel.GetMatchingGroup(c37421075.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,nil,e,tp) - if g:GetCount()>1 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=g:Select(tp,2,2,nil) - Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c37421579.lua b/script/c37421579.lua deleted file mode 100644 index d18c2e2315..0000000000 --- a/script/c37421579.lua +++ /dev/null @@ -1,6 +0,0 @@ ---炎の騎士 キラー -function c37421579.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcCode2(c,36121917,96851799,true,true) -end diff --git a/script/c37436476.lua b/script/c37436476.lua deleted file mode 100644 index a9a072e640..0000000000 --- a/script/c37436476.lua +++ /dev/null @@ -1,26 +0,0 @@ ---炎熱旋風壁 -function c37436476.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetCondition(c37436476.condition) - c:RegisterEffect(e1) - --atk up - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(LOCATION_MZONE,0) - e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x39)) - e2:SetValue(c37436476.val) - c:RegisterEffect(e2) -end -function c37436476.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end -function c37436476.val(e,c) - return Duel.GetMatchingGroupCount(Card.IsSetCard,c:GetControler(),LOCATION_GRAVE,0,nil,0x39)*100 -end diff --git a/script/c37445295.lua b/script/c37445295.lua deleted file mode 100644 index 14cca189c7..0000000000 --- a/script/c37445295.lua +++ /dev/null @@ -1,57 +0,0 @@ ---シャドール・ファルコン -function c37445295.initial_effect(c) - --flip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(37445295,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) - e1:SetCountLimit(1,37445295) - e1:SetTarget(c37445295.target) - e1:SetOperation(c37445295.operation) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(37445295,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetCountLimit(1,37445295) - e2:SetCondition(c37445295.spcon) - e2:SetTarget(c37445295.sptg) - e2:SetOperation(c37445295.spop) - c:RegisterEffect(e2) -end -function c37445295.filter(c,e,tp) - return c:IsSetCard(0x9d) and not c:IsCode(37445295) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN) -end -function c37445295.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c37445295.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c37445295.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c37445295.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c37445295.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEDOWN_DEFENCE) - Duel.ConfirmCards(1-tp,tc) - end -end -function c37445295.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsReason(REASON_EFFECT) -end -function c37445295.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c37445295.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEDOWN_DEFENCE)~=0 then - Duel.ConfirmCards(1-tp,c) - end -end diff --git a/script/c37457534.lua b/script/c37457534.lua deleted file mode 100644 index 2a2f3185f8..0000000000 --- a/script/c37457534.lua +++ /dev/null @@ -1,68 +0,0 @@ ---古代の機械戦車 -function c37457534.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c37457534.target) - e1:SetOperation(c37457534.operation) - c:RegisterEffect(e1) - --Atk - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(600) - c:RegisterEffect(e2) - --Equip limit - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_EQUIP_LIMIT) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e3:SetValue(c37457534.eqlimit) - c:RegisterEffect(e3) - --damage - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(37457534,0)) - e4:SetCategory(CATEGORY_DAMAGE) - e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e4:SetCode(EVENT_TO_GRAVE) - e4:SetCondition(c37457534.damcon) - e4:SetTarget(c37457534.damtg) - e4:SetOperation(c37457534.damop) - c:RegisterEffect(e4) -end -function c37457534.eqlimit(e,c) - return c:IsSetCard(0x7) -end -function c37457534.filter(c) - return c:IsFaceup() and c:IsSetCard(0x7) -end -function c37457534.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c37457534.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c37457534.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c37457534.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c37457534.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,e:GetHandler(),tc) - end -end -function c37457534.damcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsReason(REASON_DESTROY) -end -function c37457534.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(600) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,600) -end -function c37457534.damop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c37474917.lua b/script/c37474917.lua deleted file mode 100644 index 5e61af2dba..0000000000 --- a/script/c37474917.lua +++ /dev/null @@ -1,36 +0,0 @@ ---カタパルト・ウォリアー -function c37474917.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1) - c:EnableReviveLimit() - --damage - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(37474917,0)) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCost(c37474917.cost) - e1:SetTarget(c37474917.target) - e1:SetOperation(c37474917.operation) - c:RegisterEffect(e1) -end -function c37474917.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsSetCard,1,nil,0x43) end - local sg=Duel.SelectReleaseGroup(tp,Card.IsSetCard,1,1,nil,0x43) - local atk=sg:GetFirst():GetTextAttack() - if atk<0 then atk=0 end - e:SetLabel(atk) - Duel.Release(sg,REASON_COST) -end -function c37474917.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(e:GetLabel()) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,e:GetLabel()) -end -function c37474917.operation(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c37507488.lua b/script/c37507488.lua deleted file mode 100644 index aae748456d..0000000000 --- a/script/c37507488.lua +++ /dev/null @@ -1,41 +0,0 @@ ---モンスターレリーフ -function c37507488.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetCondition(c37507488.condition) - e1:SetTarget(c37507488.target) - e1:SetOperation(c37507488.activate) - c:RegisterEffect(e1) -end -function c37507488.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==1-tp -end -function c37507488.filter(c) - return c:IsAbleToHand() -end -function c37507488.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c37507488.filter(chkc) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsExistingTarget(c37507488.filter,tp,LOCATION_MZONE,0,1,nil) - and Duel.IsExistingMatchingCard(c37507488.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g=Duel.SelectTarget(tp,c37507488.filter,tp,LOCATION_MZONE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c37507488.spfilter(c,e,tp) - return c:GetLevel()==4 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c37507488.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) and Duel.SendtoHand(tc,nil,REASON_EFFECT)>0 - and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c37507488.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c37511832.lua b/script/c37511832.lua deleted file mode 100644 index c7c998f845..0000000000 --- a/script/c37511832.lua +++ /dev/null @@ -1,67 +0,0 @@ ---サルガッソの灯台 -function c37511832.initial_effect(c) - --damage change - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_CHAINING) - e1:SetCondition(c37511832.condition) - e1:SetOperation(c37511832.operation) - c:RegisterEffect(e1) - -- - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetCode(37511832) - e2:SetRange(LOCATION_GRAVE) - e2:SetTargetRange(1,0) - c:RegisterEffect(e2) - --search - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(37511832,0)) - e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e3:SetCode(EVENT_TO_GRAVE) - e3:SetCondition(c37511832.thcon) - e3:SetTarget(c37511832.thtg) - e3:SetOperation(c37511832.thop) - c:RegisterEffect(e3) -end -function c37511832.condition(e,tp,eg,ep,ev,re,r,rp) - return re:IsActiveType(TYPE_SPELL) and aux.damcon1(e,tp,eg,ep,ev,re,r,rp) -end -function c37511832.operation(e,tp,eg,ep,ev,re,r,rp) - local cid=Duel.GetChainInfo(ev,CHAININFO_CHAIN_ID) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CHANGE_DAMAGE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetTargetRange(1,0) - e1:SetLabel(cid) - e1:SetValue(c37511832.damcon) - e1:SetReset(RESET_CHAIN) - Duel.RegisterEffect(e1,tp) -end -function c37511832.damcon(e,re,val,r,rp,rc) - local cc=Duel.GetCurrentChain() - if cc==0 or bit.band(r,REASON_EFFECT)==0 then return val end - local cid=Duel.GetChainInfo(0,CHAININFO_CHAIN_ID) - if cid==e:GetLabel() then return 0 else return val end -end -function c37511832.thcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) and e:GetHandler():IsPreviousPosition(POS_FACEDOWN) -end -function c37511832.filter(c) - return c:IsCode(1127737) and c:IsAbleToHand() -end -function c37511832.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c37511832.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c37511832.thop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstMatchingCard(c37511832.filter,tp,LOCATION_DECK,0,nil) - if tc then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end diff --git a/script/c37520316.lua b/script/c37520316.lua deleted file mode 100644 index 5a2b1dcc4d..0000000000 --- a/script/c37520316.lua +++ /dev/null @@ -1,49 +0,0 @@ ---精神操作 -function c37520316.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_CONTROL) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c37520316.target) - e1:SetOperation(c37520316.activate) - c:RegisterEffect(e1) -end -function c37520316.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:GetLocation()==LOCATION_MZONE and chkc:GetControler()~=tp and chkc:IsControlerCanBeChanged() end - if chk==0 then return Duel.IsExistingTarget(Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) - local g=Duel.SelectTarget(tp,Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0) -end -function c37520316.activate(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - if not Duel.GetControl(tc,tp,PHASE_END,1) then - if not tc:IsImmuneToEffect(e) and tc:IsAbleToChangeControler() then - Duel.Destroy(tc,REASON_EFFECT) - end - return - end - local e1=Effect.CreateEffect(c) - local reset=RESET_EVENT+0x1fc0000+RESET_PHASE+PHASE_END - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UNRELEASABLE_SUM) - e1:SetReset(reset) - e1:SetValue(1) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_UNRELEASABLE_NONSUM) - e2:SetReset(reset) - e2:SetValue(1) - tc:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_CANNOT_ATTACK) - e3:SetReset(reset) - tc:RegisterEffect(e3) - end -end diff --git a/script/c37534148.lua b/script/c37534148.lua deleted file mode 100644 index 50f70ba745..0000000000 --- a/script/c37534148.lua +++ /dev/null @@ -1,81 +0,0 @@ ---リボーンリボン -function c37534148.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c37534148.target) - e1:SetOperation(c37534148.operation) - c:RegisterEffect(e1) - --Equip limit - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_EQUIP_LIMIT) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetValue(c37534148.eqlimit) - c:RegisterEffect(e2) - --special summon - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e3:SetCode(EVENT_TO_GRAVE) - e3:SetCondition(c37534148.regcon) - e3:SetOperation(c37534148.regop) - c:RegisterEffect(e3) -end -function c37534148.eqlimit(e,c) - return not c:IsHasEffect(EFFECT_CANNOT_SPECIAL_SUMMON) -end -function c37534148.filter(c) - return c:IsFaceup() and not c:IsHasEffect(EFFECT_CANNOT_SPECIAL_SUMMON) -end -function c37534148.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c37534148.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c37534148.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c37534148.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c37534148.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,c,tc) - end -end -function c37534148.regcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local ec=c:GetPreviousEquipTarget() - return c:IsReason(REASON_LOST_TARGET) and ec:IsReason(REASON_BATTLE) and ec:IsLocation(LOCATION_GRAVE) -end -function c37534148.regop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local ec=c:GetPreviousEquipTarget() - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(37534148,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetRange(LOCATION_GRAVE) - e1:SetCountLimit(1) - e1:SetTarget(c37534148.sptg) - e1:SetOperation(c37534148.spop) - e1:SetLabelObject(ec) - e1:SetReset(RESET_EVENT+0x16c0000+RESET_PHASE+PHASE_END) - e:GetHandler():RegisterEffect(e1) - ec:RegisterFlagEffect(37534148,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) -end -function c37534148.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - local ec=e:GetHandler():GetPreviousEquipTarget() - if chk==0 then return ec:GetFlagEffect(37534148)~=0 end - Duel.SetTargetCard(ec) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,ec,1,0,0) -end -function c37534148.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c37557626.lua b/script/c37557626.lua deleted file mode 100644 index dd61f53b00..0000000000 --- a/script/c37557626.lua +++ /dev/null @@ -1,37 +0,0 @@ ---リチュア・キラー -function c37557626.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(37557626,0)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetCondition(c37557626.condition) - e1:SetTarget(c37557626.target) - e1:SetOperation(c37557626.operation) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - c:RegisterEffect(e2) -end -function c37557626.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x3a) -end -function c37557626.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c37557626.cfilter,tp,LOCATION_MZONE,0,1,e:GetHandler()) -end -function c37557626.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:IsAbleToHand() end - if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToHand,tp,LOCATION_MZONE,0,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g=Duel.SelectTarget(tp,Card.IsAbleToHand,tp,LOCATION_MZONE,0,1,1,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c37557626.operation(e,tp,eg,ep,ev,re,r,rp) - if not Duel.IsExistingMatchingCard(c37557626.cfilter,tp,LOCATION_MZONE,0,1,e:GetHandler()) then return end - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - end -end diff --git a/script/c37576645.lua b/script/c37576645.lua deleted file mode 100644 index 844a039271..0000000000 --- a/script/c37576645.lua +++ /dev/null @@ -1,29 +0,0 @@ ---無謀な欲張り -function c37576645.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c37576645.target) - e1:SetOperation(c37576645.activate) - c:RegisterEffect(e1) -end -function c37576645.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp,2) end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(2) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2) -end -function c37576645.activate(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EFFECT_SKIP_DP) - e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_END,5) - Duel.RegisterEffect(e1,tp) -end diff --git a/script/c3758046.lua b/script/c3758046.lua deleted file mode 100644 index 8ef847dc76..0000000000 --- a/script/c3758046.lua +++ /dev/null @@ -1,81 +0,0 @@ ---DDD怒濤王シーザー -function c3758046.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsRace,RACE_FIEND),4,2) - c:EnableReviveLimit() - --special summon - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,3758046) - e1:SetCost(c3758046.cost) - e1:SetOperation(c3758046.operation) - c:RegisterEffect(e1) - --search - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e2:SetCountLimit(1,3758047) - e2:SetCondition(c3758046.thcon) - e2:SetTarget(c3758046.thtg) - e2:SetOperation(c3758046.thop) - c:RegisterEffect(e2) -end -function c3758046.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c3758046.operation(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE+PHASE_BATTLE) - e1:SetCountLimit(1) - e1:SetOperation(c3758046.spop) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function c3758046.filter(c,e,tp,id) - return c:IsReason(REASON_DESTROY) and c:GetTurnID()==id and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c3758046.spop(e,tp,eg,ep,ev,re,r,rp) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ft<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c3758046.filter,tp,LOCATION_GRAVE,0,ft,ft,nil,e,tp,Duel.GetTurnCount()) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) - e1:SetCountLimit(1) - e1:SetLabel(g:GetCount()) - e1:SetReset(RESET_PHASE+PHASE_STANDBY) - e1:SetOperation(c3758046.damop) - Duel.RegisterEffect(e1,tp) - end -end -function c3758046.damop(e,tp,eg,ep,ev,re,r,rp) - Duel.Damage(tp,e:GetLabel()*1000,REASON_EFFECT) -end -function c3758046.thcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) -end -function c3758046.thfilter(c) - return c:IsSetCard(0xae) and c:IsAbleToHand() -end -function c3758046.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c3758046.thfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c3758046.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c3758046.thfilter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c37580756.lua b/script/c37580756.lua deleted file mode 100644 index b2426ea9a4..0000000000 --- a/script/c37580756.lua +++ /dev/null @@ -1,39 +0,0 @@ ---道連れ -function c37580756.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCondition(c37580756.condition) - e1:SetTarget(c37580756.target) - e1:SetOperation(c37580756.activate) - c:RegisterEffect(e1) -end -function c37580756.filter1(c,tp) - return c:IsType(TYPE_MONSTER) and c:IsControler(tp) and c:IsPreviousLocation(LOCATION_MZONE) -end -function c37580756.filter2(c,tp) - return c:IsType(TYPE_MONSTER) and c:IsControler(tp) and c:IsReason(REASON_BATTLE) and c:IsPreviousLocation(LOCATION_MZONE) -end -function c37580756.condition(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetCurrentPhase()~=PHASE_DAMAGE then - return eg:IsExists(c37580756.filter1,1,nil,tp) - else - return eg:IsExists(c37580756.filter2,1,nil,tp) - end -end -function c37580756.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsDestructable() end - if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c37580756.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c37620434.lua b/script/c37620434.lua deleted file mode 100644 index 3b73c57b57..0000000000 --- a/script/c37620434.lua +++ /dev/null @@ -1,30 +0,0 @@ ---デーモン・テイマー -function c37620434.initial_effect(c) - --control - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(37620434,0)) - e1:SetCategory(CATEGORY_CONTROL) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP) - e1:SetTarget(c37620434.target) - e1:SetOperation(c37620434.operation) - c:RegisterEffect(e1) -end -function c37620434.filter(c) - return c:IsFaceup() and c:IsRace(RACE_FIEND) and c:IsControlerCanBeChanged() -end -function c37620434.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c37620434.filter(chkc) end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) - local g=Duel.SelectTarget(tp,c37620434.filter,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0) -end -function c37620434.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsRace(RACE_FIEND) then - if not Duel.GetControl(tc,tp,PHASE_END,1) and not tc:IsImmuneToEffect(e) and tc:IsAbleToChangeControler() then - Duel.Destroy(tc,REASON_EFFECT) - end - end -end diff --git a/script/c37630732.lua b/script/c37630732.lua deleted file mode 100644 index e323f0b3ed..0000000000 --- a/script/c37630732.lua +++ /dev/null @@ -1,95 +0,0 @@ ---パワー・ボンド -function c37630732.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c37630732.target) - e1:SetOperation(c37630732.activate) - c:RegisterEffect(e1) -end -function c37630732.filter1(c,e) - return c:IsCanBeFusionMaterial() and not c:IsImmuneToEffect(e) -end -function c37630732.filter2(c,e,tp,m,f,chkf) - return c:IsType(TYPE_FUSION) and c:IsRace(RACE_MACHINE) and (not f or f(c)) - and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf) -end -function c37630732.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp - local mg1=Duel.GetMatchingGroup(Card.IsCanBeFusionMaterial,tp,LOCATION_HAND+LOCATION_MZONE,0,nil) - local res=Duel.IsExistingMatchingCard(c37630732.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf) - if not res then - local ce=Duel.GetChainMaterial(tp) - if ce~=nil then - local fgroup=ce:GetTarget() - local mg2=fgroup(ce,e,tp) - local mf=ce:GetValue() - res=Duel.IsExistingMatchingCard(c37630732.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,chkf) - end - end - return res - end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function c37630732.activate(e,tp,eg,ep,ev,re,r,rp) - local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp - local mg1=Duel.GetMatchingGroup(c37630732.filter1,tp,LOCATION_HAND+LOCATION_MZONE,0,nil,e) - local sg1=Duel.GetMatchingGroup(c37630732.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf) - local mg2=nil - local sg2=nil - local ce=Duel.GetChainMaterial(tp) - if ce~=nil then - local fgroup=ce:GetTarget() - mg2=fgroup(ce,e,tp) - local mf=ce:GetValue() - sg2=Duel.GetMatchingGroup(c37630732.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,mf,chkf) - end - if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then - local sg=sg1:Clone() - if sg2 then sg:Merge(sg2) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local tg=sg:Select(tp,1,1,nil) - local tc=tg:GetFirst() - if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then - local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf) - tc:SetMaterial(mat1) - Duel.SendtoGrave(mat1,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION) - Duel.BreakEffect() - Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP) - else - local mat2=Duel.SelectFusionMaterial(tp,tc,mg2,nil,chkf) - local fop=ce:GetOperation() - fop(ce,e,tp,tc,mat2) - end - tc:CompleteProcedure() - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(tc:GetBaseAttack()) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_PHASE+PHASE_END) - e2:SetCountLimit(1) - e2:SetLabel(tc:GetBaseAttack()) - e2:SetReset(RESET_PHASE+PHASE_END) - e2:SetOperation(c37630732.damop) - Duel.RegisterEffect(e2,tp) - else - local cg1=Duel.GetFieldGroup(tp,LOCATION_HAND+LOCATION_MZONE,0) - local cg2=Duel.GetFieldGroup(tp,LOCATION_EXTRA,0) - if cg1:GetCount()>1 and cg2:IsExists(Card.IsFacedown,1,nil) - and Duel.IsPlayerCanSpecialSummon(tp) and not Duel.IsPlayerAffectedByEffect(tp,27581098) then - Duel.ConfirmCards(1-tp,cg1) - Duel.ConfirmCards(1-tp,cg2) - Duel.ShuffleHand(tp) - end - end -end -function c37630732.damop(e,tp,eg,ep,ev,re,r,rp) - Duel.Damage(tp,e:GetLabel(),REASON_EFFECT) -end diff --git a/script/c37675138.lua b/script/c37675138.lua deleted file mode 100644 index 5db3a2c2d6..0000000000 --- a/script/c37675138.lua +++ /dev/null @@ -1,64 +0,0 @@ ---ボーンクラッシャー -function c37675138.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(37675138,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(c37675138.descon) - e1:SetTarget(c37675138.destg) - e1:SetOperation(c37675138.desop) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetOperation(c37675138.regop) - c:RegisterEffect(e2) -end -function c37675138.descon(e,tp,eg,ep,ev,re,r,rp) - return re:GetOwner():IsRace(RACE_ZOMBIE) and e:GetHandler():GetSummonLocation()==LOCATION_GRAVE - and e:GetHandler():GetPreviousControler()==tp -end -function c37675138.desfilter(c) - return c:IsDestructable() and c:IsType(TYPE_SPELL+TYPE_TRAP) -end -function c37675138.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() and c37675138.desfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c37675138.desfilter,tp,0,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c37675138.desfilter,tp,0,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c37675138.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end -function c37675138.regop(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetDescription(aux.Stringid(37675138,1)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetCountLimit(1) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetRange(LOCATION_MZONE) - e1:SetTarget(c37675138.sdtg) - e1:SetOperation(c37675138.sdop) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e:GetHandler():RegisterEffect(e1) -end -function c37675138.sdtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0) -end -function c37675138.sdop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - Duel.Destroy(c,REASON_EFFECT) - end -end diff --git a/script/c37675907.lua b/script/c37675907.lua deleted file mode 100644 index e10bb16b5c..0000000000 --- a/script/c37675907.lua +++ /dev/null @@ -1,102 +0,0 @@ ---アクセル・シンクロン -function c37675907.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1) - c:EnableReviveLimit() - --splimit - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(c37675907.regcon) - e1:SetOperation(c37675907.regop) - c:RegisterEffect(e1) - --lv - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(37675907,0)) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCost(c37675907.tgcost) - e2:SetTarget(c37675907.tgtg) - e2:SetOperation(c37675907.tgop) - c:RegisterEffect(e2) - --spsummon - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(37675907,1)) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_QUICK_O) - e3:SetCode(EVENT_FREE_CHAIN) - e3:SetHintTiming(0,0x1c0+TIMING_MAIN_END) - e3:SetRange(LOCATION_MZONE) - e3:SetCondition(c37675907.spcon) - e3:SetTarget(c37675907.sptg) - e3:SetOperation(c37675907.spop) - c:RegisterEffect(e3) -end -function c37675907.regcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_SYNCHRO -end -function c37675907.regop(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_END) - e1:SetTarget(c37675907.splimit) - Duel.RegisterEffect(e1,tp) -end -function c37675907.splimit(e,c,sump,sumtype,sumpos,targetp,se) - return c:IsCode(37675907) and bit.band(sumtype,SUMMON_TYPE_SYNCHRO)==SUMMON_TYPE_SYNCHRO -end -function c37675907.filter(c) - return c:GetLevel()>0 and c:IsSetCard(0x17) and c:IsAbleToGraveAsCost() -end -function c37675907.tgcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c37675907.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c37675907.filter,tp,LOCATION_DECK,0,1,1,nil) - Duel.SendtoGrave(g,REASON_COST) - e:SetLabelObject(g:GetFirst()) -end -function c37675907.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local opt=Duel.SelectOption(tp,aux.Stringid(37675907,2),aux.Stringid(37675907,3)) - e:SetLabel(opt) -end -function c37675907.tgop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local lv=e:GetLabelObject():GetLevel() - if c:IsRelateToEffect(e) and c:IsFaceup() then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_LEVEL) - if e:GetLabel()==0 then - e1:SetValue(lv) - else - e1:SetValue(-lv) - end - e1:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e1) - end -end -function c37675907.spcon(e,tp,eg,ep,ev,re,r,rp) - local ph=Duel.GetCurrentPhase() - return Duel.GetTurnPlayer()~=tp and (ph==PHASE_MAIN1 or ph==PHASE_MAIN2) -end -function c37675907.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return not e:GetHandler():IsStatus(STATUS_CHAINING) - and Duel.IsExistingMatchingCard(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,1,nil,e:GetHandler()) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function c37675907.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsControler(1-tp) or not c:IsRelateToEffect(e) then return end - local g=Duel.GetMatchingGroup(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,nil,c) - if g:GetCount()>0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=g:Select(tp,1,1,nil) - Duel.SynchroSummon(tp,sg:GetFirst(),c) - end -end diff --git a/script/c37684215.lua b/script/c37684215.lua deleted file mode 100644 index e2fcecd9f2..0000000000 --- a/script/c37684215.lua +++ /dev/null @@ -1,52 +0,0 @@ ---融合武器ムラサメブレード -function c37684215.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c37684215.target) - e1:SetOperation(c37684215.operation) - c:RegisterEffect(e1) - --atk up - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(800) - c:RegisterEffect(e2) - --equip limit - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_EQUIP_LIMIT) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e3:SetValue(c37684215.eqlimit) - c:RegisterEffect(e3) - --immune to des - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e4:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - e4:SetRange(LOCATION_SZONE) - e4:SetValue(1) - c:RegisterEffect(e4) -end -function c37684215.eqlimit(e,c) - return c:IsRace(RACE_WARRIOR) -end -function c37684215.filter(c) - return c:IsFaceup() and c:IsRace(RACE_WARRIOR) -end -function c37684215.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c37684215.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c37684215.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c37684215.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c37684215.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,e:GetHandler(),tc) - end -end diff --git a/script/c37694547.lua b/script/c37694547.lua deleted file mode 100644 index 1a5c72bb1d..0000000000 --- a/script/c37694547.lua +++ /dev/null @@ -1,48 +0,0 @@ ---歯車街 -function c37694547.initial_effect(c) - --activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --decrease tribute - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_DECREASE_TRIBUTE) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(LOCATION_HAND,LOCATION_HAND) - e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x7)) - e2:SetValue(0x1) - c:RegisterEffect(e2) - --special summon - local e3=Effect.CreateEffect(c) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetDescription(aux.Stringid(37694547,0)) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e3:SetCode(EVENT_TO_GRAVE) - e3:SetCondition(c37694547.spcon) - e3:SetTarget(c37694547.sptg) - e3:SetOperation(c37694547.spop) - c:RegisterEffect(e3) -end -function c37694547.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsReason(REASON_DESTROY) -end -function c37694547.filter(c,e,tp) - return c:IsSetCard(0x7) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) - and (not c:IsLocation(LOCATION_GRAVE) or not c:IsHasEffect(EFFECT_NECRO_VALLEY)) -end -function c37694547.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c37694547.filter,tp,0x13,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,0x13) -end -function c37694547.spop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c37694547.filter,tp,0x13,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - Duel.ShuffleDeck(tp) - end -end diff --git a/script/c37721209.lua b/script/c37721209.lua deleted file mode 100644 index a9868d821c..0000000000 --- a/script/c37721209.lua +++ /dev/null @@ -1,31 +0,0 @@ ---海竜-ダイダロス -function c37721209.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(37721209,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c37721209.cost) - e1:SetTarget(c37721209.target) - e1:SetOperation(c37721209.operation) - c:RegisterEffect(e1) -end -function c37721209.cfilter(c) - return c:IsFaceup() and c:IsCode(22702055) and c:IsAbleToGraveAsCost() -end -function c37721209.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c37721209.cfilter,tp,LOCATION_ONFIELD,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c37721209.cfilter,tp,LOCATION_ONFIELD,0,1,1,nil) - Duel.SendtoGrave(g,REASON_COST) -end -function c37721209.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end - local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c37721209.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler()) - Duel.Destroy(g,REASON_EFFECT) -end diff --git a/script/c3773196.lua b/script/c3773196.lua deleted file mode 100644 index cad1b7aaab..0000000000 --- a/script/c3773196.lua +++ /dev/null @@ -1,42 +0,0 @@ ---異次元の偵察機 -function c3773196.initial_effect(c) - --removed - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_REMOVE) - e1:SetOperation(c3773196.rmop) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(3773196,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_PHASE+PHASE_END) - e2:SetRange(LOCATION_REMOVED) - e2:SetCondition(c3773196.condition) - e2:SetTarget(c3773196.target) - e2:SetOperation(c3773196.operation) - c:RegisterEffect(e2) -end -function c3773196.rmop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsFacedown() then return end - e:GetHandler():RegisterFlagEffect(3773196,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) -end -function c3773196.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetFlagEffect(3773196)~=0 -end -function c3773196.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():GetFlagEffect(3773197)==0 end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) - e:GetHandler():RegisterFlagEffect(3773197,RESET_PHASE+PHASE_END,0,1) -end -function c3773196.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then - Duel.SendtoGrave(e:GetHandler(),REASON_EFFECT) - return - end - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP_ATTACK) - end -end diff --git a/script/c37742478.lua b/script/c37742478.lua deleted file mode 100644 index 4bb5b584f5..0000000000 --- a/script/c37742478.lua +++ /dev/null @@ -1,64 +0,0 @@ ---オネスト -function c37742478.initial_effect(c) - --to hand - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetDescription(aux.Stringid(37742478,0)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetRange(LOCATION_MZONE) - e1:SetTarget(c37742478.target1) - e1:SetOperation(c37742478.operation1) - c:RegisterEffect(e1) - --atkup - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetDescription(aux.Stringid(37742478,1)) - e2:SetCategory(CATEGORY_ATKCHANGE) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetHintTiming(TIMING_DAMAGE_STEP) - e2:SetRange(LOCATION_HAND) - e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e2:SetCondition(c37742478.condition2) - e2:SetCost(c37742478.cost2) - e2:SetOperation(c37742478.operation2) - c:RegisterEffect(e2) -end -function c37742478.target1(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToHand() end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0) -end -function c37742478.operation1(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFaceup() and c:IsRelateToEffect(e) then - Duel.SendtoHand(c,nil,REASON_EFFECT) - end -end -function c37742478.condition2(e,tp,eg,ep,ev,re,r,rp) - local phase=Duel.GetCurrentPhase() - if phase~=PHASE_DAMAGE or Duel.IsDamageCalculated() then return false end - local a=Duel.GetAttacker() - local d=Duel.GetAttackTarget() - return (d~=nil and a:GetControler()==tp and a:IsAttribute(ATTRIBUTE_LIGHT) and a:IsRelateToBattle()) - or (d~=nil and d:GetControler()==tp and d:IsFaceup() and d:IsAttribute(ATTRIBUTE_LIGHT) and d:IsRelateToBattle()) -end -function c37742478.cost2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end -function c37742478.operation2(e,tp,eg,ep,ev,re,r,rp,chk) - local a=Duel.GetAttacker() - local d=Duel.GetAttackTarget() - if not a:IsRelateToBattle() or not d:IsRelateToBattle() then return end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetOwnerPlayer(tp) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - if a:GetControler()==tp then - e1:SetValue(d:GetAttack()) - a:RegisterEffect(e1) - else - e1:SetValue(a:GetAttack()) - d:RegisterEffect(e1) - end -end \ No newline at end of file diff --git a/script/c37744402.lua b/script/c37744402.lua deleted file mode 100644 index a5037459c4..0000000000 --- a/script/c37744402.lua +++ /dev/null @@ -1,46 +0,0 @@ ---風霊使いウィン -function c37744402.initial_effect(c) - --flip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(37744402,0)) - e1:SetCategory(CATEGORY_CONTROL) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP) - e1:SetTarget(c37744402.target) - e1:SetOperation(c37744402.operation) - c:RegisterEffect(e1) -end -function c37744402.filter(c) - return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_WIND) and c:IsControlerCanBeChanged() -end -function c37744402.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c37744402.filter(chkc) end - if chk==0 then return true end - if not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) - local g=Duel.SelectTarget(tp,c37744402.filter,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,g:GetCount(),0,0) - end -end -function c37744402.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and c:IsFaceup() and tc and tc:IsRelateToEffect(e) and c37744402.filter(tc) then - c:SetCardTarget(tc) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_CONTROL) - e1:SetProperty(EFFECT_FLAG_OWNER_RELATE+EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetValue(tp) - e1:SetLabel(0) - e1:SetReset(RESET_EVENT+0x1fc0000) - e1:SetCondition(c37744402.ctcon) - tc:RegisterEffect(e1) - end -end -function c37744402.ctcon(e) - local c=e:GetOwner() - local h=e:GetHandler() - return h:IsAttribute(ATTRIBUTE_WIND) and c:IsHasCardTarget(h) -end diff --git a/script/c37745740.lua b/script/c37745740.lua deleted file mode 100644 index 4392a5f644..0000000000 --- a/script/c37745740.lua +++ /dev/null @@ -1,68 +0,0 @@ ---EMガンバッター -function c37745740.initial_effect(c) - --damage - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(37745740,0)) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1,37745740) - e1:SetCost(c37745740.cost) - e1:SetTarget(c37745740.target) - e1:SetOperation(c37745740.operation) - c:RegisterEffect(e1) - --tohand - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(37745740,1)) - e2:SetCategory(CATEGORY_TOHAND) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,37745741) - e2:SetCost(c37745740.thcost) - e2:SetTarget(c37745740.thtg) - e2:SetOperation(c37745740.thop) - c:RegisterEffect(e2) -end -function c37745740.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsSetCard,1,nil,0x9f) end - Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) - local g=Duel.SelectReleaseGroup(tp,Card.IsSetCard,1,1,nil,0x9f) - e:SetLabel(g:GetFirst():GetLevel()*100) - Duel.Release(g,REASON_COST) -end -function c37745740.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(e:GetLabel()) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,e:GetLabel()) -end -function c37745740.operation(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end -function c37745740.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsSetCard,1,nil,0x9f) end - Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) - local g=Duel.SelectReleaseGroup(tp,Card.IsSetCard,1,1,nil,0x9f) - e:SetLabelObject(g:GetFirst()) - Duel.Release(g,REASON_COST) -end -function c37745740.thfilter(c) - return c:IsSetCard(0x9f) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() -end -function c37745740.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c37745740.thfilter(chkc) and chkc~=e:GetLabelObject() end - if chk==0 then return Duel.IsExistingTarget(c37745740.thfilter,tp,LOCATION_GRAVE,0,1,e:GetLabelObject()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c37745740.thfilter,tp,LOCATION_GRAVE,0,1,1,e:GetLabelObject()) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0) -end -function c37745740.thop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end diff --git a/script/c37745919.lua b/script/c37745919.lua deleted file mode 100644 index ea2386ee36..0000000000 --- a/script/c37745919.lua +++ /dev/null @@ -1,40 +0,0 @@ ---ジャンクBOX -function c37745919.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c37745919.target) - e1:SetOperation(c37745919.activate) - c:RegisterEffect(e1) -end -function c37745919.filter(c,e,tp) - return c:IsSetCard(0x26) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c37745919.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c37745919.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c37745919.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c37745919.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c37745919.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)~=0 then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetOperation(c37745919.desop) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e1:SetCountLimit(1) - tc:RegisterEffect(e1) - end -end -function c37745919.desop(e,tp,eg,ep,ev,re,r,rp) - Duel.Destroy(e:GetHandler(),REASON_EFFECT) -end diff --git a/script/c37781520.lua b/script/c37781520.lua deleted file mode 100644 index 9d99a34b20..0000000000 --- a/script/c37781520.lua +++ /dev/null @@ -1,93 +0,0 @@ ---水精鱗-リードアビス -function c37781520.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(37781520,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND) - e1:SetCost(c37781520.spcost) - e1:SetTarget(c37781520.sptg) - e1:SetOperation(c37781520.spop) - c:RegisterEffect(e1) - --search - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(37781520,1)) - e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetCondition(c37781520.thcon) - e2:SetTarget(c37781520.thtg) - e2:SetOperation(c37781520.thop) - c:RegisterEffect(e2) - --handes - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(37781520,2)) - e3:SetCategory(CATEGORY_TOGRAVE) - e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1,37781520) - e3:SetCost(c37781520.hdcost) - e3:SetTarget(c37781520.hdtg) - e3:SetOperation(c37781520.hdop) - c:RegisterEffect(e3) -end -function c37781520.cfilter(c) - return c:IsAttribute(ATTRIBUTE_WATER) and c:IsDiscardable() and c:IsAbleToGraveAsCost() -end -function c37781520.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c37781520.cfilter,tp,LOCATION_HAND,0,3,e:GetHandler()) end - Duel.DiscardHand(tp,c37781520.cfilter,3,3,REASON_COST+REASON_DISCARD,e:GetHandler()) -end -function c37781520.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c37781520.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,1,tp,tp,false,false,POS_FACEUP) - end -end -function c37781520.thcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+1 -end -function c37781520.thfilter(c) - return c:IsSetCard(0x75) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand() -end -function c37781520.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c37781520.thfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c37781520.thfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g=Duel.SelectTarget(tp,c37781520.thfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c37781520.thop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end -function c37781520.costfilter(c) - return c:IsPosition(POS_FACEUP_ATTACK) and c:IsSetCard(0x74) -end -function c37781520.hdcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,c37781520.costfilter,1,e:GetHandler()) end - local sg=Duel.SelectReleaseGroup(tp,c37781520.costfilter,1,1,e:GetHandler()) - Duel.Release(sg,REASON_COST) -end -function c37781520.hdtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetFieldGroupCount(1-tp,LOCATION_HAND,0)~=0 end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,1-tp,LOCATION_HAND) -end -function c37781520.hdop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetFieldGroup(1-tp,LOCATION_HAND,0) - if g:GetCount()==0 then return end - local sg=g:RandomSelect(1-tp,1) - Duel.SendtoGrave(sg,REASON_EFFECT) -end diff --git a/script/c37792478.lua b/script/c37792478.lua deleted file mode 100644 index 90c9a87d0e..0000000000 --- a/script/c37792478.lua +++ /dev/null @@ -1,29 +0,0 @@ ---メタボ・シャーク -function c37792478.initial_effect(c) - --to deck - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(37792478,0)) - e1:SetCategory(CATEGORY_TODECK) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c37792478.target) - e1:SetOperation(c37792478.operation) - c:RegisterEffect(e1) -end -function c37792478.filter(c) - return c:IsRace(RACE_FISH) and c:IsAbleToDeck() -end -function c37792478.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c37792478.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c37792478.filter,tp,LOCATION_GRAVE,0,2,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectTarget(tp,c37792478.filter,tp,LOCATION_GRAVE,0,2,2,nil) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,2,0,0) -end -function c37792478.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) - if g:GetCount()>0 then - Duel.SendtoDeck(g,nil,2,REASON_EFFECT) - end -end diff --git a/script/c37798171.lua b/script/c37798171.lua deleted file mode 100644 index 514fd6e2f6..0000000000 --- a/script/c37798171.lua +++ /dev/null @@ -1,41 +0,0 @@ ---デプス・シャーク -function c37798171.initial_effect(c) - --summon with no tribute - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(37798171,0)) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SUMMON_PROC) - e1:SetCondition(c37798171.ntcon) - c:RegisterEffect(e1) - --atk - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(37798171,1)) - e2:SetCategory(CATEGORY_ATKCHANGE) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCondition(c37798171.atkcon) - e2:SetOperation(c37798171.atkop) - c:RegisterEffect(e2) -end -function c37798171.ntcon(e,c,minc) - if c==nil then return true end - return minc==0 and c:GetLevel()>4 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 - and Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0)==0 -end -function c37798171.atkcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp -end -function c37798171.atkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFaceup() and c:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetValue(c:GetAttack()*2) - e1:SetReset(RESET_EVENT+0x1ff0000+RESET_PHASE+PHASE_END) - c:RegisterEffect(e1) - end -end diff --git a/script/c37803172.lua b/script/c37803172.lua deleted file mode 100644 index 53f5d319b5..0000000000 --- a/script/c37803172.lua +++ /dev/null @@ -1,58 +0,0 @@ ---陽炎獣 ペリュトン -function c37803172.initial_effect(c) - --cannot be target - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetValue(aux.tgoval) - c:RegisterEffect(e1) - --spsummon limit - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e2:SetCode(EFFECT_SPSUMMON_CONDITION) - e2:SetValue(c37803172.splimit) - c:RegisterEffect(e2) - --special summon - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(37803172,0)) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1,37803172) - e3:SetCost(c37803172.spcost) - e3:SetTarget(c37803172.sptg) - e3:SetOperation(c37803172.spop) - c:RegisterEffect(e3) -end -function c37803172.splimit(e,se,sp,st) - return se:GetHandler():IsSetCard(0x107d) -end -function c37803172.cfilter(c) - return c:IsAttribute(ATTRIBUTE_FIRE) and c:IsAbleToGraveAsCost() -end -function c37803172.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() - and Duel.IsExistingMatchingCard(c37803172.cfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,c37803172.cfilter,1,1,REASON_COST) - Duel.Release(e:GetHandler(),REASON_COST) -end -function c37803172.filter(c,e,tp) - return c:IsSetCard(0x107d) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c37803172.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c37803172.filter,tp,LOCATION_DECK,0,2,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_DECK) -end -function c37803172.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 then return end - local g=Duel.GetMatchingGroup(c37803172.filter,tp,LOCATION_DECK,0,nil,e,tp) - if g:GetCount()>=2 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=g:Select(tp,2,2,nil) - Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c37806313.lua b/script/c37806313.lua deleted file mode 100644 index 4ab4780bef..0000000000 --- a/script/c37806313.lua +++ /dev/null @@ -1,37 +0,0 @@ ---氷結界の輸送部隊 -function c37806313.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetTarget(c37806313.target) - e1:SetOperation(c37806313.operation) - c:RegisterEffect(e1) -end -function c37806313.filter(c) - return c:IsSetCard(0x2f) and c:IsType(TYPE_MONSTER) and c:IsAbleToDeck() -end -function c37806313.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c37806313.filter(chkc) end - if chk==0 then return Duel.IsPlayerCanDraw(tp,1) and Duel.IsPlayerCanDraw(1-tp,1) - and Duel.IsExistingTarget(c37806313.filter,tp,LOCATION_GRAVE,0,2,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectTarget(tp,c37806313.filter,tp,LOCATION_GRAVE,0,2,2,nil) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,PLAYER_ALL,1) -end -function c37806313.tgfilter(c,e) - return not c:IsRelateToEffect(e) -end -function c37806313.operation(e,tp,eg,ep,ev,re,r,rp) - local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - if tg:IsExists(c37806313.tgfilter,1,nil,e) then return end - Duel.SendtoDeck(tg,nil,0,REASON_EFFECT) - Duel.ShuffleDeck(tp) - Duel.BreakEffect() - Duel.Draw(tp,1,REASON_EFFECT) - Duel.Draw(1-tp,1,REASON_EFFECT) -end diff --git a/script/c37812118.lua b/script/c37812118.lua deleted file mode 100644 index 0f2c2023ed..0000000000 --- a/script/c37812118.lua +++ /dev/null @@ -1,20 +0,0 @@ ---カップ・オブ・エース -function c37812118.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DRAW+CATEGORY_COIN) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c37812118.target) - e1:SetOperation(c37812118.activate) - c:RegisterEffect(e1) -end -function c37812118.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp,2) and Duel.IsPlayerCanDraw(1-tp,2) end - Duel.SetOperationInfo(0,CATEGORY_COIN,nil,0,tp,1) -end -function c37812118.activate(e,tp,eg,ep,ev,re,r,rp) - local res=Duel.TossCoin(tp,1) - if res==1 then Duel.Draw(tp,2,REASON_EFFECT) - else Duel.Draw(1-tp,2,REASON_EFFECT) end -end diff --git a/script/c37820550.lua b/script/c37820550.lua deleted file mode 100644 index b7fd165235..0000000000 --- a/script/c37820550.lua +++ /dev/null @@ -1,50 +0,0 @@ ---電撃鞭 -function c37820550.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c37820550.target) - e1:SetOperation(c37820550.operation) - c:RegisterEffect(e1) - --atk up - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(300) - c:RegisterEffect(e2) - --def up - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_EQUIP) - e3:SetCode(EFFECT_UPDATE_DEFENCE) - e3:SetValue(300) - c:RegisterEffect(e3) - --equip limit - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetCode(EFFECT_EQUIP_LIMIT) - e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e4:SetValue(c37820550.eqlimit) - c:RegisterEffect(e4) -end -function c37820550.eqlimit(e,c) - return c:IsRace(RACE_THUNDER) -end -function c37820550.filter(c) - return c:IsFaceup() and c:IsRace(RACE_THUNDER) -end -function c37820550.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c37820550.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c37820550.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c37820550.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c37820550.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,e:GetHandler(),tc) - end -end diff --git a/script/c37829468.lua b/script/c37829468.lua deleted file mode 100644 index b0722f84f7..0000000000 --- a/script/c37829468.lua +++ /dev/null @@ -1,51 +0,0 @@ ---RAI-JIN -function c37829468.initial_effect(c) - c:SetUniqueOnField(1,1,37829468) - --atkup - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetTarget(c37829468.atktg) - e1:SetValue(c37829468.atkval) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(37829468,0)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_PHASE+PHASE_END) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCondition(c37829468.descon) - e2:SetTarget(c37829468.destg) - e2:SetOperation(c37829468.desop) - c:RegisterEffect(e2) -end -function c37829468.atktg(e,c) - return c:IsAttribute(ATTRIBUTE_LIGHT) -end -function c37829468.atkval(e,c) - return Duel.GetMatchingGroupCount(Card.IsAttribute,e:GetHandlerPlayer(),LOCATION_GRAVE,0,nil,ATTRIBUTE_LIGHT)*100 -end -function c37829468.descon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c37829468.filter(c) - return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsDestructable() -end -function c37829468.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c37829468.filter(chkc) end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c37829468.filter,tp,LOCATION_MZONE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c37829468.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c3784434.lua b/script/c3784434.lua deleted file mode 100644 index 2466ce9ed1..0000000000 --- a/script/c3784434.lua +++ /dev/null @@ -1,55 +0,0 @@ ---突撃ライノス -function c3784434.initial_effect(c) - --move - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(3784434,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCondition(c3784434.seqcon) - e1:SetOperation(c3784434.seqop) - c:RegisterEffect(e1) - -- - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetCondition(c3784434.atkcon) - e2:SetValue(500) - c:RegisterEffect(e2) -end -function c3784434.seqcon(e,tp,eg,ep,ev,re,r,rp) - local seq=e:GetHandler():GetSequence() - return (seq>0 and Duel.CheckLocation(tp,LOCATION_MZONE,seq-1)) - or (seq<4 and Duel.CheckLocation(tp,LOCATION_MZONE,seq+1)) -end -function c3784434.seqop(e,tp,eg,ep,ev,re,r,rp) - local seq=e:GetHandler():GetSequence() - if (seq>0 and Duel.CheckLocation(tp,LOCATION_MZONE,seq-1)) - or (seq<4 and Duel.CheckLocation(tp,LOCATION_MZONE,seq+1)) then - local flag=0 - if seq>0 and Duel.CheckLocation(tp,LOCATION_MZONE,seq-1) then flag=bit.bor(flag,bit.lshift(0x1,seq-1)) end - if seq<4 and Duel.CheckLocation(tp,LOCATION_MZONE,seq+1) then flag=bit.bor(flag,bit.lshift(0x1,seq+1)) end - flag=bit.bxor(flag,0xff) - local s=Duel.SelectDisableField(tp,1,LOCATION_MZONE,0,flag) - local nseq=0 - if s==1 then nseq=0 - elseif s==2 then nseq=1 - elseif s==4 then nseq=2 - elseif s==8 then nseq=3 - else nseq=4 end - Duel.MoveSequence(e:GetHandler(),nseq) - end -end -function c3784434.dircon(e,tp) - local seq=4-e:GetHandler():GetSequence() - return Duel.GetFieldCard(e:GetOwnerPlayer(),LOCATION_MZONE,seq)==nil - and Duel.GetFieldCard(e:GetOwnerPlayer(),LOCATION_SZONE,seq)==nil -end -function c3784434.atkcon(e) - local ph=Duel.GetCurrentPhase() - return (ph==PHASE_DAMAGE or ph==PHASE_DAMAGE_CAL) - and Duel.GetAttacker()==e:GetHandler() and Duel.GetAttackTarget()~=nil - and e:GetHandler():GetSequence()+Duel.GetAttackTarget():GetSequence()==4 -end diff --git a/script/c37869028.lua b/script/c37869028.lua deleted file mode 100644 index 0f62c099ab..0000000000 --- a/script/c37869028.lua +++ /dev/null @@ -1,23 +0,0 @@ ---トリプル・ヴァイパー -function c37869028.initial_effect(c) - --multiattack - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_EXTRA_ATTACK) - e1:SetValue(2) - c:RegisterEffect(e1) - --attack cost - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_ATTACK_COST) - e2:SetCost(c37869028.atcost) - e2:SetOperation(c37869028.atop) - c:RegisterEffect(e2) -end -function c37869028.atcost(e,c,tp) - return Duel.CheckReleaseGroup(tp,Card.IsRace,1,nil,RACE_AQUA) -end -function c37869028.atop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.SelectReleaseGroup(tp,Card.IsRace,1,1,nil,RACE_AQUA) - Duel.Release(g,REASON_COST) -end diff --git a/script/c3790062.lua b/script/c3790062.lua deleted file mode 100644 index a933c0d562..0000000000 --- a/script/c3790062.lua +++ /dev/null @@ -1,37 +0,0 @@ ---No.65 裁断魔人ジャッジ・バスター -function c3790062.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_DARK),2,2) - c:EnableReviveLimit() - --negate activate - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(3790062,0)) - e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DAMAGE) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EVENT_CHAINING) - e1:SetCondition(c3790062.condition) - e1:SetCost(c3790062.cost) - e1:SetTarget(c3790062.target) - e1:SetOperation(c3790062.operation) - c:RegisterEffect(e1) -end -c3790062.xyz_number=65 -function c3790062.condition(e,tp,eg,ep,ev,re,r,rp,chk) - return rp~=tp and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) - and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainNegatable(ev) -end -function c3790062.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,2,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,2,2,REASON_COST) -end -function c3790062.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,500) -end -function c3790062.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateActivation(ev) - Duel.Damage(1-tp,500,REASON_EFFECT) -end diff --git a/script/c37910722.lua b/script/c37910722.lua deleted file mode 100644 index de4f35b9c4..0000000000 --- a/script/c37910722.lua +++ /dev/null @@ -1,84 +0,0 @@ ---天穹覇龍ドラゴアセンション -function c37910722.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1) - c:EnableReviveLimit() - --atk - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(37910722,0)) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(c37910722.atkcon) - e1:SetOperation(c37910722.atkop) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(37910722,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetCondition(c37910722.spcon) - e2:SetTarget(c37910722.sptg) - e2:SetOperation(c37910722.spop) - c:RegisterEffect(e2) -end -function c37910722.atkcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_SYNCHRO -end -function c37910722.atkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFaceup() and c:IsRelateToEffect(e) then - local ct=Duel.GetFieldGroupCount(tp,LOCATION_HAND,0) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(ct*800) - e1:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e1) - end -end -function c37910722.spcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return rp~=tp and c:IsReason(REASON_DESTROY) - and c:IsPreviousLocation(LOCATION_ONFIELD) and c:GetPreviousControler()==tp -end -function c37910722.spfilter(c,e,tp,sync) - return c:IsControler(tp) and c:IsLocation(LOCATION_GRAVE) - and bit.band(c:GetReason(),0x80008)==0x80008 and c:GetReasonCard()==sync - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsHasEffect(EFFECT_NECRO_VALLEY) -end -function c37910722.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - local mg=c:GetMaterial() - local ct=mg:GetCount() - if chk==0 then return c:GetSummonType()==SUMMON_TYPE_SYNCHRO - and ct>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>=ct - and mg:FilterCount(c37910722.spfilter,nil,e,tp,c)==ct end - Duel.SetTargetCard(mg) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,mg,ct,0,0) -end -function c37910722.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local mg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local g=mg:Filter(Card.IsRelateToEffect,nil,e) - if g:GetCount()4 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 -end -function c37991342.lvcon(e) - return e:GetHandler():GetMaterialCount()==0 -end -function c37991342.lvop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CHANGE_LEVEL) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c37991342.lvcon) - e1:SetValue(4) - e1:SetReset(RESET_EVENT+0xff0000) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_SET_BASE_ATTACK) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetCondition(c37991342.lvcon) - e2:SetValue(1800) - e2:SetReset(RESET_EVENT+0xff0000) - c:RegisterEffect(e2) -end -function c37991342.lvop2(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CHANGE_LEVEL) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetValue(4) - e1:SetReset(RESET_EVENT+0xff0000) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_SET_BASE_ATTACK) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetValue(1800) - e2:SetReset(RESET_EVENT+0xff0000) - c:RegisterEffect(e2) -end -function c37991342.immcon(e) - return bit.band(e:GetHandler():GetSummonType(),SUMMON_TYPE_NORMAL)==SUMMON_TYPE_NORMAL -end -function c37991342.desfilter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable() -end -function c37991342.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and c37991342.desfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c37991342.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c37991342.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c37991342.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c37993923.lua b/script/c37993923.lua deleted file mode 100644 index 6d18bc9a41..0000000000 --- a/script/c37993923.lua +++ /dev/null @@ -1,55 +0,0 @@ ---ジャンク・ガードナー -function c37993923.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,c37993923.tfilter,aux.NonTuner(nil),1) - c:EnableReviveLimit() - --pos - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(37993923,0)) - e1:SetCategory(CATEGORY_POSITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,0x1e0) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_MZONE) - e1:SetTarget(c37993923.target) - e1:SetOperation(c37993923.operation) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(37993923,0)) - e2:SetCategory(CATEGORY_POSITION) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetCondition(c37993923.condition2) - e2:SetTarget(c37993923.target2) - e2:SetOperation(c37993923.operation) - c:RegisterEffect(e2) -end -function c37993923.tfilter(c) - return c:IsCode(63977008) or c:IsHasEffect(20932152) -end -function c37993923.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) end - if chk==0 then return Duel.IsExistingTarget(nil,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE) - local g=Duel.SelectTarget(tp,nil,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_POSITION,g,g:GetCount(),0,0) -end -function c37993923.condition2(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) -end -function c37993923.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) end - if chk==0 then return Duel.IsExistingTarget(nil,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE) - local g=Duel.SelectTarget(tp,nil,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_POSITION,g,g:GetCount(),0,0) -end -function c37993923.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.ChangePosition(tc,POS_FACEUP_DEFENCE,POS_FACEDOWN_DEFENCE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK) - end -end diff --git a/script/c38007744.lua b/script/c38007744.lua deleted file mode 100644 index 699eeda5b5..0000000000 --- a/script/c38007744.lua +++ /dev/null @@ -1,17 +0,0 @@ ---先史遺産モアイキャリア -function c38007744.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c38007744.spcon) - c:RegisterEffect(e1) -end -function c38007744.spcon(e,c) - if c==nil then return true end - return Duel.GetFieldGroupCount(c:GetControler(),LOCATION_ONFIELD,0)==0 - and Duel.GetFieldGroupCount(c:GetControler(),0,LOCATION_ONFIELD)>0 - and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 -end diff --git a/script/c38033121.lua b/script/c38033121.lua deleted file mode 100644 index 7aa5a09903..0000000000 --- a/script/c38033121.lua +++ /dev/null @@ -1,18 +0,0 @@ ---ブラック・マジシャン・ガール -function c38033121.initial_effect(c) - --atkup - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetRange(LOCATION_MZONE) - e1:SetValue(c38033121.val) - c:RegisterEffect(e1) -end -function c38033121.val(e,c) - return Duel.GetMatchingGroupCount(c38033121.filter,c:GetControler(),LOCATION_GRAVE,LOCATION_GRAVE,nil)*300 -end -function c38033121.filter(c) - local code=c:GetCode() - return code==46986414 or code==30208479 -end diff --git a/script/c38041940.lua b/script/c38041940.lua deleted file mode 100644 index 73268ce1aa..0000000000 --- a/script/c38041940.lua +++ /dev/null @@ -1,49 +0,0 @@ ---シード・オブ・フレイム -function c38041940.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(38041940,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCondition(c38041940.condition) - e1:SetTarget(c38041940.target) - e1:SetOperation(c38041940.operation) - c:RegisterEffect(e1) -end -function c38041940.condition(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return bit.band(c:GetReason(),0x41)==0x41 and c:IsPreviousLocation(LOCATION_ONFIELD) - and c:GetPreviousControler()==tp -end -function c38041940.spfilter(c,e,tp) - return c:IsLevelBelow(4) and c:IsRace(RACE_PLANT) and c:GetCode()~=38041940 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c38041940.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c38041940.spfilter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c38041940.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) - and Duel.IsPlayerCanSpecialSummonMonster(tp,38041941,0,0x4011,0,0,1,RACE_PLANT,ATTRIBUTE_EARTH,POS_FACEUP_DEFENCE,1-tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c38041940.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,g:GetCount(),0,0) - Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,tp,0) -end -function c38041940.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then - if Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0 - and Duel.IsPlayerCanSpecialSummonMonster(tp,38041941,0,0x4011,0,0,1,RACE_PLANT,ATTRIBUTE_EARTH,POS_FACEUP_DEFENCE,1-tp) then - local token=Duel.CreateToken(tp,38041941) - Duel.SpecialSummonStep(token,0,tp,1-tp,false,false,POS_FACEUP_DEFENCE) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UNRELEASABLE_SUM) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(1) - token:RegisterEffect(e1,true) - end - end - Duel.SpecialSummonComplete() -end diff --git a/script/c38049541.lua b/script/c38049541.lua deleted file mode 100644 index 1e5ac0c784..0000000000 --- a/script/c38049541.lua +++ /dev/null @@ -1,42 +0,0 @@ ---A・ジェネクス・ケミストリ -function c38049541.initial_effect(c) - --att change - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(38049541,0)) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_HAND) - e1:SetCost(c38049541.coscost) - e1:SetTarget(c38049541.costg) - e1:SetOperation(c38049541.cosop) - c:RegisterEffect(e1) -end -function c38049541.coscost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end -function c38049541.filter(c) - return c:IsFaceup() and c:IsSetCard(0x2) -end -function c38049541.costg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(c38049541.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,0) - local att=Duel.AnnounceAttribute(tp,1,0x7f) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c38049541.filter,tp,LOCATION_MZONE,0,1,1,nil) - e:SetLabel(att) -end -function c38049541.cosop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CHANGE_ATTRIBUTE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetValue(e:GetLabel()) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - end -end diff --git a/script/c38049934.lua b/script/c38049934.lua deleted file mode 100644 index 329ec6eade..0000000000 --- a/script/c38049934.lua +++ /dev/null @@ -1,39 +0,0 @@ ---炎塵爆発 -function c38049934.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,0x1e0) - e1:SetCost(c38049934.cost) - e1:SetTarget(c38049934.target) - e1:SetOperation(c38049934.activate) - c:RegisterEffect(e1) -end -c38049934.check=false -function c38049934.cfilter(c) - return c:IsSetCard(0x39) and c:IsAbleToRemoveAsCost() -end -function c38049934.cost(e,tp,eg,ep,ev,re,r,rp,chk) - c38049934.check=true - if chk==0 then return Duel.IsExistingMatchingCard(c38049934.cfilter,tp,LOCATION_GRAVE,0,1,nil) end - local g=Duel.GetMatchingGroup(c38049934.cfilter,tp,LOCATION_GRAVE,0,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) - e:SetLabel(g:GetCount()) -end -function c38049934.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - if not c38049934.check then return false end - c38049934.check=false - return Duel.IsExistingMatchingCard(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) - end - c38049934.check=false - local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c38049934.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectMatchingCard(tp,Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetLabel(),e:GetHandler()) - Duel.Destroy(g,REASON_EFFECT) -end diff --git a/script/c3810071.lua b/script/c3810071.lua deleted file mode 100644 index 07e69cb8a1..0000000000 --- a/script/c3810071.lua +++ /dev/null @@ -1,9 +0,0 @@ ---モンク・ファイター -function c3810071.initial_effect(c) - --dam - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_AVOID_BATTLE_DAMAGE) - e1:SetValue(1) - c:RegisterEffect(e1) -end diff --git a/script/c38107923.lua b/script/c38107923.lua deleted file mode 100644 index b9b80d6b19..0000000000 --- a/script/c38107923.lua +++ /dev/null @@ -1,89 +0,0 @@ ---ダーク・ネフティス -function c38107923.initial_effect(c) - --to grave - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(38107923,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c38107923.tgcon) - e1:SetCost(c38107923.tgcost) - e1:SetTarget(c38107923.tgtg) - e1:SetOperation(c38107923.tgop) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(38107923,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetRange(LOCATION_GRAVE) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) - e2:SetCondition(c38107923.spcon) - e2:SetTarget(c38107923.sptg) - e2:SetOperation(c38107923.spop) - c:RegisterEffect(e2) - --destroy - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(38107923,2)) - e3:SetCategory(CATEGORY_DESTROY) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - e3:SetTarget(c38107923.destg) - e3:SetOperation(c38107923.desop) - c:RegisterEffect(e3) -end -function c38107923.tgcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(Card.IsAttribute,tp,LOCATION_GRAVE,0,3,nil,ATTRIBUTE_DARK) -end -function c38107923.costfilter(c) - return c:IsAttribute(ATTRIBUTE_DARK) and c:IsAbleToRemoveAsCost() -end -function c38107923.tgcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c38107923.costfilter,tp,LOCATION_GRAVE,0,2,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c38107923.costfilter,tp,LOCATION_GRAVE,0,2,2,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c38107923.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGrave() end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,e:GetHandler(),1,0,0) -end -function c38107923.tgop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SendtoGrave(c,REASON_EFFECT) - c:RegisterFlagEffect(38107923,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,0,1) - end -end -function c38107923.spcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:GetTurnID()~=Duel.GetTurnCount() and tp==Duel.GetTurnPlayer() and c:GetFlagEffect(38107923)>0 -end -function c38107923.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local c=e:GetHandler() - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0) - c:ResetFlagEffect(38107923) -end -function c38107923.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,1,tp,tp,false,false,POS_FACEUP) - end -end -function c38107923.desfilter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable() -end -function c38107923.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and c38107923.desfilter(chkc) end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c38107923.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c38107923.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c38109772.lua b/script/c38109772.lua deleted file mode 100644 index 605cd96ae8..0000000000 --- a/script/c38109772.lua +++ /dev/null @@ -1,51 +0,0 @@ ---竜の騎士 -function c38109772.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(38109772,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_CHAINING) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c38109772.condition) - e1:SetCost(c38109772.cost) - e1:SetTarget(c38109772.target) - e1:SetOperation(c38109772.operation) - c:RegisterEffect(e1) - local g=Group.CreateGroup() - g:KeepAlive() - e1:SetLabelObject(g) -end -function c38109772.filter(c,tp,dg) - return c:IsControler(tp) and dg:IsContains(c) -end -function c38109772.condition(e,tp,eg,ep,ev,re,r,rp) - if rp==tp or not re:IsActiveType(TYPE_MONSTER) or not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end - local tg=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) - if not tg or tg:GetCount()==0 then return false end - local ex,dg,dc=Duel.GetOperationInfo(ev,CATEGORY_DESTROY) - if not ex or not dg then return false end - local cg=tg:Filter(c38109772.filter,nil,tp,dg) - if cg:GetCount()>0 then - e:GetLabelObject():Clear() - e:GetLabelObject():Merge(cg) - return true - end - return false -end -function c38109772.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetLabelObject():FilterCount(Card.IsAbleToGraveAsCost,nil)==e:GetLabelObject():GetCount() end - Duel.SendtoGrave(e:GetLabelObject(),REASON_COST) -end -function c38109772.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local ct=e:GetLabelObject():FilterCount(Card.IsLocation,nil,LOCATION_MZONE) - return Duel.GetLocationCount(tp,LOCATION_MZONE)>-ct and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) - end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,eg,1,0,0) -end -function c38109772.operation(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c38120068.lua b/script/c38120068.lua deleted file mode 100644 index 61b1a37b03..0000000000 --- a/script/c38120068.lua +++ /dev/null @@ -1,30 +0,0 @@ ---トレード・イン -function c38120068.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c38120068.cost) - e1:SetTarget(c38120068.target) - e1:SetOperation(c38120068.activate) - c:RegisterEffect(e1) -end -function c38120068.filter(c) - return c:GetLevel()==8 and c:IsDiscardable() -end -function c38120068.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c38120068.filter,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,c38120068.filter,1,1,REASON_COST+REASON_DISCARD) -end -function c38120068.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp,2) end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(2) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2) -end -function c38120068.activate(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end diff --git a/script/c38124994.lua b/script/c38124994.lua deleted file mode 100644 index 14eb581803..0000000000 --- a/script/c38124994.lua +++ /dev/null @@ -1,36 +0,0 @@ ---ファーニマル・ラビット -function c38124994.initial_effect(c) - --tohand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(38124994,1)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) - e1:SetCode(EVENT_BE_MATERIAL) - e1:SetCountLimit(1,38124994) - e1:SetCondition(c38124994.condition) - e1:SetTarget(c38124994.target) - e1:SetOperation(c38124994.operation) - c:RegisterEffect(e1) -end -function c38124994.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsLocation(LOCATION_GRAVE) and r==REASON_FUSION -end -function c38124994.filter(c) - return (c:IsCode(30068120) or (c:IsSetCard(0xa9) and c:IsType(TYPE_MONSTER) and not c:IsCode(38124994))) - and c:IsAbleToHand() -end -function c38124994.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c38124994.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c38124994.filter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c38124994.filter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c38124994.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end diff --git a/script/c3814632.lua b/script/c3814632.lua deleted file mode 100644 index f42d1ed120..0000000000 --- a/script/c3814632.lua +++ /dev/null @@ -1,48 +0,0 @@ ---超巨大空中宮殿ガンガリディア -function c3814632.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,10,2) - c:EnableReviveLimit() - --destroy&damage - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE) - e1:SetDescription(aux.Stringid(3814632,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1,3814632) - e1:SetCost(c3814632.cost) - e1:SetTarget(c3814632.target) - e1:SetOperation(c3814632.operation) - c:RegisterEffect(e1) -end -function c3814632.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) - and e:GetHandler():GetAttackAnnouncedCount()==0 end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - e:GetHandler():RegisterEffect(e1) -end -function c3814632.filter(c) - return c:IsDestructable() -end -function c3814632.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and c3814632.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c3814632.filter,tp,0,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c3814632.filter,tp,0,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,1000) -end -function c3814632.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - if Duel.Destroy(tc,REASON_EFFECT)~=0 then - Duel.Damage(1-tp,1000,REASON_EFFECT) - end - end -end diff --git a/script/c38167722.lua b/script/c38167722.lua deleted file mode 100644 index d9fca205e4..0000000000 --- a/script/c38167722.lua +++ /dev/null @@ -1,42 +0,0 @@ ---闇霊術-「欲」 -function c38167722.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c38167722.cost) - e1:SetTarget(c38167722.target) - e1:SetOperation(c38167722.activate) - c:RegisterEffect(e1) -end -function c38167722.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsAttribute,1,nil,ATTRIBUTE_DARK) end - local g=Duel.SelectReleaseGroup(tp,Card.IsAttribute,1,1,nil,ATTRIBUTE_DARK) - Duel.Release(g,REASON_COST) -end -function c38167722.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp,2) end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(2) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2) -end -function c38167722.cfilter(c) - return not c:IsPublic() and c:IsType(TYPE_SPELL) -end -function c38167722.activate(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - local g=Duel.GetMatchingGroup(c38167722.cfilter,p,0,LOCATION_HAND,nil) - if g:GetCount()>0 and Duel.SelectYesNo(1-p,aux.Stringid(38167722,0)) then - Duel.Hint(HINT_SELECTMSG,1-p,HINTMSG_CONFIRM) - local sg=g:Select(1-p,1,1,nil) - Duel.ConfirmCards(p,sg) - Duel.ShuffleHand(1-p) - if Duel.IsChainDisablable(0) then - Duel.NegateEffect(0) - return - end - end - Duel.Draw(p,d,REASON_EFFECT) -end diff --git a/script/c38180759.lua b/script/c38180759.lua deleted file mode 100644 index fe4584bf78..0000000000 --- a/script/c38180759.lua +++ /dev/null @@ -1,51 +0,0 @@ ---虚構王アンフォームド・ボイド -function c38180759.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,4,3) - c:EnableReviveLimit() - --adup - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(38180759,0)) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,0x1c0+TIMING_MAIN_END) - e1:SetCountLimit(1) - e1:SetCondition(c38180759.atkcon) - e1:SetCost(c38180759.atkcost) - e1:SetTarget(c38180759.atktg) - e1:SetOperation(c38180759.atkop) - c:RegisterEffect(e1) -end -function c38180759.atkcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2) -end -function c38180759.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c38180759.filter(c) - return c:IsFaceup() and c:IsType(TYPE_XYZ) -end -function c38180759.atktg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c38180759.filter,tp,0,LOCATION_MZONE,1,nil) end -end -function c38180759.atkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFaceup() and c:IsRelateToEffect(e) then - local g=Duel.GetMatchingGroup(c38180759.filter,tp,0,LOCATION_MZONE,nil) - local atk=g:GetSum(Card.GetAttack) - if atk>0 then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(atk) - e1:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_UPDATE_DEFENCE) - c:RegisterEffect(e2) - end - end -end diff --git a/script/c3819470.lua b/script/c3819470.lua deleted file mode 100644 index 324aaf279a..0000000000 --- a/script/c3819470.lua +++ /dev/null @@ -1,33 +0,0 @@ ---盗賊の七つ道具 -function c3819470.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_CHAINING) - e1:SetCondition(c3819470.condition) - e1:SetCost(c3819470.cost) - e1:SetTarget(c3819470.target) - e1:SetOperation(c3819470.activate) - c:RegisterEffect(e1) -end -function c3819470.condition(e,tp,eg,ep,ev,re,r,rp) - return re:IsActiveType(TYPE_TRAP) and re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev) -end -function c3819470.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,1000) end - Duel.PayLPCost(tp,1000) -end -function c3819470.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) - end -end -function c3819470.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateActivation(ev) - if re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(eg,REASON_EFFECT) - end -end diff --git a/script/c38199696.lua b/script/c38199696.lua deleted file mode 100644 index e12d73fa52..0000000000 --- a/script/c38199696.lua +++ /dev/null @@ -1,22 +0,0 @@ ---レッド・ポーション -function c38199696.initial_effect(c) - --recover - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCategory(CATEGORY_RECOVER) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c38199696.rectg) - e1:SetOperation(c38199696.recop) - c:RegisterEffect(e1) -end -function c38199696.rectg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(500) - Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,500) -end -function c38199696.recop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Recover(p,d,REASON_EFFECT) -end diff --git a/script/c38210374.lua b/script/c38210374.lua deleted file mode 100644 index de0e9d2f9f..0000000000 --- a/script/c38210374.lua +++ /dev/null @@ -1,81 +0,0 @@ ---バク団 -function c38210374.initial_effect(c) - --equip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(38210374,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetRange(LOCATION_HAND+LOCATION_MZONE) - e1:SetTarget(c38210374.eqtg) - e1:SetOperation(c38210374.eqop) - c:RegisterEffect(e1) - --remove material - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(38210374,1)) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) - e2:SetRange(LOCATION_SZONE) - e2:SetCountLimit(1) - e2:SetCondition(c38210374.rmcon) - e2:SetTarget(c38210374.rmtg) - e2:SetOperation(c38210374.rmop) - c:RegisterEffect(e2) -end -function c38210374.filter(c) - return c:IsFaceup() and c:IsType(TYPE_XYZ) -end -function c38210374.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c38210374.filter(chkc) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingTarget(c38210374.filter,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c38210374.filter,tp,0,LOCATION_MZONE,1,1,nil) -end -function c38210374.eqop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) then return end - if c:IsLocation(LOCATION_MZONE) and c:IsFacedown() then return end - local tc=Duel.GetFirstTarget() - if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or tc:IsFacedown() or not tc:IsRelateToEffect(e) then - Duel.SendtoGrave(c,REASON_EFFECT) - return - end - Duel.Equip(tp,c,tc,true) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(c38210374.eqlimit) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_SELF_DESTROY) - e2:SetCondition(c38210374.descon) - e2:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e2) -end -function c38210374.eqlimit(e,c) - return c:IsType(TYPE_XYZ) -end -function c38210374.descon(e) - local ec=e:GetHandler():GetEquipTarget() - return ec and ec:GetOverlayCount()==0 -end -function c38210374.rmcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp -end -function c38210374.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local ec=e:GetHandler():GetEquipTarget() - return ec and ec:CheckRemoveOverlayCard(tp,1,REASON_EFFECT) - end -end -function c38210374.rmop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local ec=e:GetHandler():GetEquipTarget() - if ec then - ec:RemoveOverlayCard(tp,1,1,REASON_EFFECT) - end -end diff --git a/script/c38247752.lua b/script/c38247752.lua deleted file mode 100644 index 32515d31fd..0000000000 --- a/script/c38247752.lua +++ /dev/null @@ -1,35 +0,0 @@ ---ダーク・アイズ・イリュージョニスト -function c38247752.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(38247752,0)) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c38247752.target) - e1:SetOperation(c38247752.operation) - c:RegisterEffect(e1) -end -function c38247752.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsFaceup() end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - Duel.SelectTarget(tp,nil,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,e:GetHandler()) -end -function c38247752.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then - c:SetCardTarget(tc) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_OWNER_RELATE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetCondition(c38247752.rcon) - tc:RegisterEffect(e1,true) - end -end -function c38247752.rcon(e) - return e:GetOwner():IsHasCardTarget(e:GetHandler()) -end diff --git a/script/c38250531.lua b/script/c38250531.lua deleted file mode 100644 index 31485bd8fc..0000000000 --- a/script/c38250531.lua +++ /dev/null @@ -1,87 +0,0 @@ ---紅貴士-ヴァンパイア・ブラム -function c38250531.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsRace,RACE_ZOMBIE),5,2) - c:EnableReviveLimit() - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(38250531,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1,38250531) - e1:SetCost(c38250531.spcost) - e1:SetTarget(c38250531.sptg) - e1:SetOperation(c38250531.spop) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetOperation(c38250531.spreg) - c:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(38250531,1)) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e3:SetRange(LOCATION_GRAVE) - e3:SetCode(EVENT_PHASE+PHASE_STANDBY) - e3:SetCondition(c38250531.spcon2) - e3:SetTarget(c38250531.sptg2) - e3:SetOperation(c38250531.spop2) - e3:SetLabelObject(e2) - c:RegisterEffect(e3) -end -function c38250531.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c38250531.spfilter(c,e,tp) - return c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c38250531.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(1-tp) and c38250531.spfilter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c38250531.spfilter,tp,0,LOCATION_GRAVE,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c38250531.spfilter,tp,0,LOCATION_GRAVE,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c38250531.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)>0 then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetTarget(c38250531.ftarget) - e1:SetLabel(tc:GetFieldID()) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) - end -end -function c38250531.ftarget(e,c) - return e:GetLabel()~=c:GetFieldID() -end -function c38250531.spreg(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if rp~=tp and c:IsReason(REASON_DESTROY) then - e:SetLabel(Duel.GetTurnCount()+1) - c:RegisterFlagEffect(38250531,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,2) - end -end -function c38250531.spcon2(e,tp,eg,ep,ev,re,r,rp) - return e:GetLabelObject():GetLabel()==Duel.GetTurnCount() and e:GetHandler():GetFlagEffect(38250531)>0 -end -function c38250531.sptg2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) - e:GetHandler():ResetFlagEffect(38250531) -end -function c38250531.spop2(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,1,tp,tp,false,false,POS_FACEUP_DEFENCE) - end -end diff --git a/script/c3825890.lua b/script/c3825890.lua deleted file mode 100644 index 73bc85d0d1..0000000000 --- a/script/c3825890.lua +++ /dev/null @@ -1,62 +0,0 @@ ---墓守の大神官 -function c3825890.initial_effect(c) - --summon with 1 tribute - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(3825890,0)) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SUMMON_PROC) - e1:SetCondition(c3825890.otcon) - e1:SetOperation(c3825890.otop) - e1:SetValue(SUMMON_TYPE_ADVANCE) - c:RegisterEffect(e1) - --atk up - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetValue(c3825890.atkval) - c:RegisterEffect(e2) - --Destroy replace - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE) - e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e3:SetRange(LOCATION_MZONE) - e3:SetCode(EFFECT_DESTROY_REPLACE) - e3:SetTarget(c3825890.desreptg) - c:RegisterEffect(e3) -end -function c3825890.otfilter(c,tp) - return c:IsSetCard(0x2e) and (c:IsControler(tp) or c:IsFaceup()) -end -function c3825890.otcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - local mg=Duel.GetMatchingGroup(c3825890.otfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp) - return c:GetLevel()>6 and Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.GetTributeCount(c,mg)>0 -end -function c3825890.otop(e,tp,eg,ep,ev,re,r,rp,c) - local mg=Duel.GetMatchingGroup(c3825890.otfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp) - local sg=Duel.SelectTribute(tp,c,1,1,mg) - c:SetMaterial(sg) - Duel.Release(sg, REASON_SUMMON+REASON_MATERIAL) -end -function c3825890.filter(c) - return c:IsSetCard(0x2e) and c:IsType(TYPE_MONSTER) -end -function c3825890.atkval(e,c) - return Duel.GetMatchingGroupCount(c3825890.filter,c:GetControler(),LOCATION_GRAVE,0,nil)*200 -end -function c3825890.desreptg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return not c:IsReason(REASON_REPLACE) - and Duel.IsExistingMatchingCard(c3825890.filter,tp,LOCATION_HAND,0,1,nil) end - if Duel.SelectYesNo(tp,aux.Stringid(3825890,1)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) - local g=Duel.SelectMatchingCard(tp,c3825890.filter,tp,LOCATION_HAND,0,1,1,nil) - Duel.SendtoGrave(g,REASON_EFFECT+REASON_REPLACE) - return true - else return false end -end diff --git a/script/c38273745.lua b/script/c38273745.lua deleted file mode 100644 index 0e7b13d7a9..0000000000 --- a/script/c38273745.lua +++ /dev/null @@ -1,97 +0,0 @@ ---ヴェルズ・ウロボロス -function c38273745.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,4,3) - c:EnableReviveLimit() - --tohand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(38273745,1)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE) - e1:SetCondition(c38273745.con1) - e1:SetCost(c38273745.cost) - e1:SetTarget(c38273745.tg1) - e1:SetOperation(c38273745.op1) - c:RegisterEffect(e1) - --handes - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(38273745,2)) - e2:SetCategory(CATEGORY_TOGRAVE) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE) - e2:SetCondition(c38273745.con2) - e2:SetCost(c38273745.cost) - e2:SetTarget(c38273745.tg2) - e2:SetOperation(c38273745.op2) - c:RegisterEffect(e2) - --remove - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(38273745,3)) - e3:SetCategory(CATEGORY_REMOVE) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE) - e3:SetCondition(c38273745.con3) - e3:SetCost(c38273745.cost) - e3:SetTarget(c38273745.tg3) - e3:SetOperation(c38273745.op3) - c:RegisterEffect(e3) -end -function c38273745.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c38273745.con1(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetFlagEffect(38273746)==0 -end -function c38273745.tg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() and chkc:IsAbleToHand() end - if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g=Duel.SelectTarget(tp,Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,1,1,nil) - e:GetHandler():RegisterFlagEffect(38273746,RESET_EVENT+0x1fe0000,EFFECT_FLAG_COPY_INHERIT,1) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0) -end -function c38273745.op1(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - end -end -function c38273745.con2(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetFlagEffect(38273747)==0 -end -function c38273745.tg2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetFieldGroupCount(1-tp,LOCATION_HAND,0)~=0 end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,1-tp,LOCATION_HAND) - e:GetHandler():RegisterFlagEffect(38273747,RESET_EVENT+0x1fe0000,EFFECT_FLAG_COPY_INHERIT,1) -end -function c38273745.op2(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetFieldGroup(1-tp,LOCATION_HAND,0) - if g:GetCount()==0 then return end - local sg=g:RandomSelect(1-tp,1) - Duel.SendtoGrave(sg,REASON_EFFECT) -end -function c38273745.con3(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetFlagEffect(38273748)==0 -end -function c38273745.tg3(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_GRAVE) and chkc:IsAbleToRemove() end - if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,1,nil) - e:GetHandler():RegisterFlagEffect(38273748,RESET_EVENT+0x1fe0000,EFFECT_FLAG_COPY_INHERIT,1) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,0) -end -function c38273745.op3(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) - end -end diff --git a/script/c38275183.lua b/script/c38275183.lua deleted file mode 100644 index a36550aa2b..0000000000 --- a/script/c38275183.lua +++ /dev/null @@ -1,53 +0,0 @@ ---八式対魔法多重結界 -function c38275183.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(38275183,0)) - e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_CHAINING) - e1:SetCondition(c38275183.condition1) - e1:SetTarget(c38275183.target) - e1:SetOperation(c38275183.activate) - c:RegisterEffect(e1) - --Activate - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(38275183,1)) - e2:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_ACTIVATE) - e2:SetCode(EVENT_CHAINING) - e2:SetCondition(c38275183.condition2) - e2:SetCost(c38275183.cost) - e2:SetTarget(c38275183.target) - e2:SetOperation(c38275183.activate) - c:RegisterEffect(e2) -end -function c38275183.condition1(e,tp,eg,ep,ev,re,r,rp) - if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end - local tg=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) - return tg and tg:GetCount()==1 and tg:GetFirst():IsLocation(LOCATION_MZONE) - and re:IsActiveType(TYPE_SPELL) and re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev) -end -function c38275183.condition2(e,tp,eg,ep,ev,re,r,rp) - return re:IsActiveType(TYPE_SPELL) and re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev) -end -function c38275183.cfilter(c) - return c:IsType(TYPE_SPELL) and c:IsAbleToGraveAsCost() -end -function c38275183.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c38275183.cfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,c38275183.cfilter,1,1,REASON_COST,nil) -end -function c38275183.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) - end -end -function c38275183.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateActivation(ev) - if re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(eg,REASON_EFFECT) - end -end diff --git a/script/c38280762.lua b/script/c38280762.lua deleted file mode 100644 index 5c03c4c12c..0000000000 --- a/script/c38280762.lua +++ /dev/null @@ -1,71 +0,0 @@ ---紫炎の老中 エニシ -function c38280762.initial_effect(c) - c:EnableReviveLimit() - --spsummon limit - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(aux.FALSE) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_SPSUMMON_PROC) - e2:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e2:SetRange(LOCATION_HAND) - e2:SetCondition(c38280762.spcon) - e2:SetOperation(c38280762.spop) - c:RegisterEffect(e2) - --destroy - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(38280762,0)) - e3:SetCategory(CATEGORY_DESTROY) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1) - e3:SetCost(c38280762.descost) - e3:SetTarget(c38280762.destg) - e3:SetOperation(c38280762.desop) - c:RegisterEffect(e3) -end -function c38280762.spfilter(c) - return c:IsSetCard(0x3d) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost() -end -function c38280762.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c38280762.spfilter,tp,LOCATION_GRAVE,0,2,nil) -end -function c38280762.spop(e,tp,eg,ep,ev,re,r,rp,c) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c38280762.spfilter,tp,LOCATION_GRAVE,0,2,2,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c38280762.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():GetAttackAnnouncedCount()==0 end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e1:SetProperty(EFFECT_FLAG_OATH) - e:GetHandler():RegisterEffect(e1) -end -function c38280762.desfilter(c) - return c:IsFaceup() and c:IsDestructable() -end -function c38280762.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c38280762.desfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c38280762.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c38280762.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c38280762.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c38296564.lua b/script/c38296564.lua deleted file mode 100644 index ed86cf60a3..0000000000 --- a/script/c38296564.lua +++ /dev/null @@ -1,103 +0,0 @@ ---安全地帯 -function c38296564.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,0x1e0) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c38296564.target) - e1:SetOperation(c38296564.operation) - c:RegisterEffect(e1) - --Destroy - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetCode(EVENT_LEAVE_FIELD_P) - e2:SetOperation(c38296564.checkop) - c:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE) - e3:SetCode(EVENT_LEAVE_FIELD) - e3:SetOperation(c38296564.desop) - e3:SetLabelObject(e2) - c:RegisterEffect(e3) - --Destroy2 - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e4:SetRange(LOCATION_SZONE) - e4:SetCode(EVENT_LEAVE_FIELD) - e4:SetProperty(EFFECT_FLAG_DELAY) - e4:SetCondition(c38296564.descon2) - e4:SetOperation(c38296564.desop2) - c:RegisterEffect(e4) -end -function c38296564.filter(c) - return c:IsFaceup() and c:IsAttackPos() -end -function c38296564.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c38296564.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c38296564.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUPATTACK) - Duel.SelectTarget(tp,c38296564.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) -end -function c38296564.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsRelateToEffect(e) then - c:SetCardTarget(tc) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_OWNER_RELATE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetCondition(c38296564.rcon) - e1:SetValue(1) - tc:RegisterEffect(e1,true) - local e2=e1:Clone() - e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - e2:SetValue(c38296564.efilter) - tc:RegisterEffect(e2,true) - local e3=e2:Clone() - e3:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) - e3:SetValue(c38296564.tgval) - tc:RegisterEffect(e3,true) - local e4=e1:Clone() - e4:SetCode(EFFECT_CANNOT_DIRECT_ATTACK) - e4:SetCondition(c38296564.acon) - e4:SetLabel(tp) - tc:RegisterEffect(e4,true) - end -end -function c38296564.rcon(e) - return e:GetOwner():IsHasCardTarget(e:GetHandler()) -end -function c38296564.acon(e) - return e:GetOwner():IsHasCardTarget(e:GetHandler()) and e:GetHandlerPlayer()==e:GetLabel() -end -function c38296564.efilter(e,re) - return e:GetOwnerPlayer()~=re:GetOwnerPlayer() -end -function c38296564.tgval(e,re,rp) - return rp~=e:GetOwnerPlayer() and aux.tgval(e,re,rp) -end -function c38296564.checkop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsDisabled() then - e:SetLabel(1) - else e:SetLabel(0) end -end -function c38296564.desop(e,tp,eg,ep,ev,re,r,rp) - if e:GetLabelObject():GetLabel()~=0 then return end - local tc=e:GetHandler():GetFirstCardTarget() - if tc and tc:IsLocation(LOCATION_MZONE) then - Duel.Destroy(tc,REASON_EFFECT) - end -end -function c38296564.descon2(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetHandler():GetFirstCardTarget() - return tc and eg:IsContains(tc) -end -function c38296564.desop2(e,tp,eg,ep,ev,re,r,rp) - Duel.Destroy(e:GetHandler(), REASON_EFFECT) -end diff --git a/script/c38299233.lua b/script/c38299233.lua deleted file mode 100644 index 82ba6d7180..0000000000 --- a/script/c38299233.lua +++ /dev/null @@ -1,39 +0,0 @@ ---ニードル・ウォール -function c38299233.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_END_PHASE) - c:RegisterEffect(e1) - --roll and destroy - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(38299233,0)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetRange(LOCATION_SZONE) - e2:SetCountLimit(1) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) - e2:SetCondition(c38299233.rdcon) - e2:SetTarget(c38299233.rdtg) - e2:SetOperation(c38299233.rdop) - c:RegisterEffect(e2) -end -function c38299233.rdcon(e,tp,eg,ep,ev,re,r,rp) - return tp==Duel.GetTurnPlayer() -end -function c38299233.rdtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DICE,nil,0,tp,1) -end -function c38299233.rdop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local d1=6 - while d1==6 do - d1=Duel.TossDice(tp,1) - end - local tc=Duel.GetFieldCard(1-tp,LOCATION_MZONE,d1-1) - if tc then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c38318146.lua b/script/c38318146.lua deleted file mode 100644 index 17dbf9add6..0000000000 --- a/script/c38318146.lua +++ /dev/null @@ -1,46 +0,0 @@ ---暴君の暴力 -function c38318146.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c38318146.cost) - c:RegisterEffect(e1) - --activate cost - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_ACTIVATE_COST) - e2:SetRange(LOCATION_SZONE) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetTargetRange(0,1) - e2:SetCondition(c38318146.accon) - e2:SetTarget(c38318146.actarget) - e2:SetCost(c38318146.accost) - e2:SetOperation(c38318146.acop) - c:RegisterEffect(e2) -end -function c38318146.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,nil,2,nil) end - local rg=Duel.SelectReleaseGroup(tp,nil,2,2,nil) - Duel.Release(rg,REASON_COST) -end -function c38318146.accon(e) - c38318146[0]=false - return true -end -function c38318146.acfilter(c) - return c:IsType(TYPE_SPELL) and c:IsAbleToGraveAsCost() -end -function c38318146.actarget(e,te,tp) - return te:IsActiveType(TYPE_SPELL) and te:IsHasType(EFFECT_TYPE_ACTIVATE) -end -function c38318146.accost(e,te,tp) - return Duel.IsExistingMatchingCard(c38318146.acfilter,tp,LOCATION_DECK,0,1,nil) -end -function c38318146.acop(e,tp,eg,ep,ev,re,r,rp) - if c38318146[0] then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c38318146.acfilter,tp,LOCATION_DECK,0,1,1,nil) - Duel.SendtoGrave(g,REASON_COST) - c38318146[0]=true -end diff --git a/script/c38331564.lua b/script/c38331564.lua deleted file mode 100644 index 2667c380b6..0000000000 --- a/script/c38331564.lua +++ /dev/null @@ -1,82 +0,0 @@ ---光天使セプター -function c38331564.initial_effect(c) - --search - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(38331564,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e1:SetTarget(c38331564.thtg) - e1:SetOperation(c38331564.thop) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e2) - --effect gain - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e3:SetCode(EVENT_BE_MATERIAL) - e3:SetCondition(c38331564.effcon) - e3:SetOperation(c38331564.effop) - c:RegisterEffect(e3) -end -function c38331564.filter(c) - return c:IsSetCard(0x86) and not c:IsCode(38331564) and c:IsAbleToHand() -end -function c38331564.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c38331564.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c38331564.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c38331564.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end -function c38331564.effcon(e,tp,eg,ep,ev,re,r,rp) - return r==REASON_XYZ and e:GetHandler():GetReasonCard():GetMaterial():IsExists(Card.IsPreviousLocation,3,nil,LOCATION_MZONE) -end -function c38331564.effop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_CARD,0,38331564) - local c=e:GetHandler() - local rc=c:GetReasonCard() - local e1=Effect.CreateEffect(rc) - e1:SetDescription(aux.Stringid(38331564,1)) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(c38331564.descon) - e1:SetTarget(c38331564.destg) - e1:SetOperation(c38331564.desop) - e1:SetReset(RESET_EVENT+0x1fe0000) - rc:RegisterEffect(e1,true) - if not rc:IsType(TYPE_EFFECT) then - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_ADD_TYPE) - e2:SetValue(TYPE_EFFECT) - e2:SetReset(RESET_EVENT+0x1fe0000) - rc:RegisterEffect(e2,true) - end -end -function c38331564.descon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_XYZ -end -function c38331564.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsDestructable() and chkc~=e:GetHandler() end - if chk==0 then return Duel.IsPlayerCanDraw(tp,1) - and Duel.IsExistingTarget(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c38331564.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)~=0 then - Duel.Draw(tp,1,REASON_EFFECT) - end -end diff --git a/script/c38354937.lua b/script/c38354937.lua deleted file mode 100644 index 5abb34ca34..0000000000 --- a/script/c38354937.lua +++ /dev/null @@ -1,36 +0,0 @@ ---レアル・ジェネクス・クロキシアン -function c38354937.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0x2),aux.NonTuner(Card.IsAttribute,ATTRIBUTE_DARK),1) - c:EnableReviveLimit() - --control - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(38354937,0)) - e1:SetCategory(CATEGORY_CONTROL) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(c38354937.ctcon) - e1:SetOperation(c38354937.ctop) - c:RegisterEffect(e1) -end -function c38354937.ctcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_SYNCHRO -end -function c38354937.filter(c) - return c:IsFaceup() and c:GetLevel()>0 -end -function c38354937.ctop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c38354937.filter,tp,0,LOCATION_MZONE,nil) - if g:GetCount()==0 then return end - local sg=g:GetMaxGroup(Card.GetLevel) - if sg:GetCount()>1 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) - sg=sg:Select(tp,1,1,nil) - end - local tc=sg:GetFirst() - if not Duel.GetControl(tc,tp) then - if not tc:IsImmuneToEffect(e) and tc:IsAbleToChangeControler() then - Duel.Destroy(tc,REASON_EFFECT) - end - end -end diff --git a/script/c38369349.lua b/script/c38369349.lua deleted file mode 100644 index 610770d80a..0000000000 --- a/script/c38369349.lua +++ /dev/null @@ -1,99 +0,0 @@ ---トゥーン・ドラゴン・エッガー -function c38369349.initial_effect(c) - c:EnableReviveLimit() - --special summon - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_SPSUMMON_PROC) - e2:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e2:SetRange(LOCATION_HAND) - e2:SetCondition(c38369349.spcon) - e2:SetOperation(c38369349.spop) - c:RegisterEffect(e2) - --destroy - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e3:SetRange(LOCATION_MZONE) - e3:SetCode(EVENT_LEAVE_FIELD) - e3:SetCondition(c38369349.sdescon) - e3:SetOperation(c38369349.sdesop) - c:RegisterEffect(e3) - --direct attack - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetCode(EFFECT_DIRECT_ATTACK) - e4:SetCondition(c38369349.dircon) - c:RegisterEffect(e4) - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_SINGLE) - e5:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET) - e5:SetCondition(c38369349.atcon) - e5:SetValue(c38369349.atlimit) - c:RegisterEffect(e5) - local e6=Effect.CreateEffect(c) - e6:SetType(EFFECT_TYPE_SINGLE) - e6:SetCode(EFFECT_CANNOT_DIRECT_ATTACK) - e6:SetCondition(c38369349.atcon) - c:RegisterEffect(e6) - --cannot attack - local e7=Effect.CreateEffect(c) - e7:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e7:SetCode(EVENT_SPSUMMON_SUCCESS) - e7:SetOperation(c38369349.atklimit) - c:RegisterEffect(e7) - --attack cost - local e8=Effect.CreateEffect(c) - e8:SetType(EFFECT_TYPE_SINGLE) - e8:SetCode(EFFECT_ATTACK_COST) - e8:SetCost(c38369349.atcost) - e8:SetOperation(c38369349.atop) - c:RegisterEffect(e8) -end -function c38369349.cfilter(c) - return c:IsFaceup() and c:IsCode(15259703) -end -function c38369349.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.IsExistingMatchingCard(c38369349.cfilter,tp,LOCATION_ONFIELD,0,1,nil) - and Duel.GetLocationCount(tp,LOCATION_MZONE)>-2 and Duel.CheckReleaseGroup(tp,nil,2,nil) -end -function c38369349.spop(e,tp,eg,ep,ev,re,r,rp,c) - local tp=c:GetControler() - local g=Duel.SelectReleaseGroup(tp,nil,2,2,nil) - Duel.Release(g,REASON_COST) -end -function c38369349.sfilter(c) - return c:IsReason(REASON_DESTROY) and c:IsPreviousPosition(POS_FACEUP) and c:GetPreviousCodeOnField()==15259703 and c:IsPreviousLocation(LOCATION_ONFIELD) -end -function c38369349.sdescon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c38369349.sfilter,1,nil) -end -function c38369349.sdesop(e,tp,eg,ep,ev,re,r,rp) - Duel.Destroy(e:GetHandler(),REASON_EFFECT) -end -function c38369349.atkfilter(c) - return c:IsFaceup() and c:IsType(TYPE_TOON) -end -function c38369349.dircon(e) - return not Duel.IsExistingMatchingCard(c38369349.atkfilter,e:GetHandlerPlayer(),0,LOCATION_MZONE,1,nil) -end -function c38369349.atcon(e) - return Duel.IsExistingMatchingCard(c38369349.atkfilter,e:GetHandlerPlayer(),0,LOCATION_MZONE,1,nil) -end -function c38369349.atlimit(e,c) - return not c:IsType(TYPE_TOON) or c:IsFacedown() -end -function c38369349.atklimit(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e:GetHandler():RegisterEffect(e1) -end -function c38369349.atcost(e,c,tp) - return Duel.CheckLPCost(tp,500) -end -function c38369349.atop(e,tp,eg,ep,ev,re,r,rp) - Duel.PayLPCost(tp,500) -end diff --git a/script/c38411870.lua b/script/c38411870.lua deleted file mode 100644 index d8b3bd4f7a..0000000000 --- a/script/c38411870.lua +++ /dev/null @@ -1,28 +0,0 @@ ---つり天井 -function c38411870.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,0x1c0+TIMING_END_PHASE) - e1:SetCondition(c38411870.condition) - e1:SetTarget(c38411870.target) - e1:SetOperation(c38411870.activate) - c:RegisterEffect(e1) -end -function c38411870.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,LOCATION_MZONE)>=4 -end -function c38411870.filter(c) - return c:IsFaceup() and c:IsDestructable() -end -function c38411870.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c38411870.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - local sg=Duel.GetMatchingGroup(c38411870.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,sg:GetCount(),0,0) -end -function c38411870.activate(e,tp,eg,ep,ev,re,r,rp) - local sg=Duel.GetMatchingGroup(c38411870.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - Duel.Destroy(sg,REASON_EFFECT) -end diff --git a/script/c3841833.lua b/script/c3841833.lua deleted file mode 100644 index 1f755d6090..0000000000 --- a/script/c3841833.lua +++ /dev/null @@ -1,65 +0,0 @@ ---ファーニマル・ベア -function c3841833.initial_effect(c) - --sset - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(3841833,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(1,3841833) - e1:SetCost(c3841833.cost) - e1:SetTarget(c3841833.target) - e1:SetOperation(c3841833.operation) - c:RegisterEffect(e1) - --tohand - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(3841833,1)) - e2:SetCategory(CATEGORY_TOHAND) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,3841833) - e2:SetCost(c3841833.thcost) - e2:SetTarget(c3841833.thtg) - e2:SetOperation(c3841833.thop) - c:RegisterEffect(e2) -end -function c3841833.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() and e:GetHandler():IsDiscardable() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end -function c3841833.filter(c) - return c:IsCode(70245411) and c:IsSSetable() -end -function c3841833.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingMatchingCard(c3841833.filter,tp,LOCATION_DECK,0,1,nil) end -end -function c3841833.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) - local g=Duel.SelectMatchingCard(tp,c3841833.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SSet(tp,g:GetFirst()) - Duel.ConfirmCards(1-tp,g) - end -end -function c3841833.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end -function c3841833.thfilter(c) - return c:IsCode(24094653) and c:IsAbleToHand() -end -function c3841833.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c3841833.thfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c3841833.thfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c3841833.thfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c3841833.thop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end diff --git a/script/c38430673.lua b/script/c38430673.lua deleted file mode 100644 index f08d76e278..0000000000 --- a/script/c38430673.lua +++ /dev/null @@ -1,29 +0,0 @@ ---グランドクロス -function c38430673.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c38430673.condition) - e1:SetTarget(c38430673.target) - e1:SetOperation(c38430673.activate) - c:RegisterEffect(e1) -end -function c38430673.filter(c) - return c:IsFaceup() and c:IsCode(30241314) -end -function c38430673.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c38430673.filter,tp,LOCATION_ONFIELD,0,1,nil) -end -function c38430673.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,300) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c38430673.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.Damage(1-tp,300,REASON_EFFECT) - local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - Duel.Destroy(g,REASON_EFFECT) -end diff --git a/script/c38450736.lua b/script/c38450736.lua deleted file mode 100644 index dbba402f1e..0000000000 --- a/script/c38450736.lua +++ /dev/null @@ -1,85 +0,0 @@ ---甲虫装機 ウィーグ -function c38450736.initial_effect(c) - --equip - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetDescription(aux.Stringid(38450736,0)) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetTarget(c38450736.eqtg) - e1:SetOperation(c38450736.eqop) - c:RegisterEffect(e1) - --equip effect - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(1000) - c:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_EQUIP) - e3:SetCode(EFFECT_UPDATE_DEFENCE) - e3:SetValue(1000) - c:RegisterEffect(e3) - --atkup - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(38450736,1)) - e3:SetCategory(CATEGORY_ATKCHANGE) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e3:SetCode(EVENT_LEAVE_FIELD) - e3:SetCondition(c38450736.atkcon) - e3:SetTarget(c38450736.atktg) - e3:SetOperation(c38450736.atkop) - c:RegisterEffect(e3) -end -function c38450736.filter(c) - return c:IsSetCard(0x56) and c:IsType(TYPE_MONSTER) and not c:IsHasEffect(EFFECT_NECRO_VALLEY) -end -function c38450736.eqtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingMatchingCard(c38450736.filter,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,nil,1,tp,LOCATION_GRAVE+LOCATION_HAND) -end -function c38450736.eqop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end - if c:IsFacedown() or not c:IsRelateToEffect(e) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local g=Duel.SelectMatchingCard(tp,c38450736.filter,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,1,nil) - local tc=g:GetFirst() - if tc then - if not Duel.Equip(tp,tc,c,true) then return end - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_COPY_INHERIT+EFFECT_FLAG_OWNER_RELATE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(c38450736.eqlimit) - tc:RegisterEffect(e1) - end -end -function c38450736.eqlimit(e,c) - return e:GetOwner()==c -end -function c38450736.atkcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local ec=c:GetEquipTarget() - e:SetLabelObject(ec) - return ec and c:IsLocation(LOCATION_GRAVE) and ec:IsFaceup() and ec:IsLocation(LOCATION_MZONE) -end -function c38450736.atktg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local ec=e:GetLabelObject() - Duel.SetTargetCard(ec) -end -function c38450736.atkop(e,tp,eg,ep,ev,re,r,rp) - local ec=e:GetLabelObject() - if ec:IsLocation(LOCATION_MZONE) and ec:IsFaceup() and ec:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(1000) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - ec:RegisterEffect(e1) - end -end diff --git a/script/c3846170.lua b/script/c3846170.lua deleted file mode 100644 index dcb2069036..0000000000 --- a/script/c3846170.lua +++ /dev/null @@ -1,66 +0,0 @@ ---カラクリ兵 弐参六 -function c3846170.initial_effect(c) - --must attack - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_MUST_ATTACK) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_CANNOT_EP) - e2:SetRange(LOCATION_MZONE) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetTargetRange(1,0) - e2:SetCondition(c3846170.becon) - c:RegisterEffect(e2) - --to defence - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(3846170,0)) - e3:SetCategory(CATEGORY_POSITION) - e3:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_SINGLE) - e3:SetCode(EVENT_BE_BATTLE_TARGET) - e3:SetCondition(c3846170.poscon) - e3:SetOperation(c3846170.posop) - c:RegisterEffect(e3) - --special summon - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(3846170,1)) - e4:SetCategory(CATEGORY_SPECIAL_SUMMON) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e4:SetCode(EVENT_BATTLE_DESTROYED) - e4:SetCondition(c3846170.spcon) - e4:SetTarget(c3846170.sptg) - e4:SetOperation(c3846170.spop) - c:RegisterEffect(e4) -end -function c3846170.becon(e) - return e:GetHandler():IsAttackable() -end -function c3846170.poscon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsAttackPos() -end -function c3846170.posop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFaceup() and c:IsRelateToEffect(e) then - Duel.ChangePosition(c,POS_FACEUP_DEFENCE) - end -end -function c3846170.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) -end -function c3846170.filter(c,e,tp) - return c:IsLevelBelow(4) and c:IsSetCard(0x11) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c3846170.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c3846170.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c3846170.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c3846170.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_ATTACK) - end -end diff --git a/script/c38468214.lua b/script/c38468214.lua deleted file mode 100644 index 544711a0e5..0000000000 --- a/script/c38468214.lua +++ /dev/null @@ -1,70 +0,0 @@ ---エーリアン・ヒュプノ -function c38468214.initial_effect(c) - aux.EnableDualAttribute(c) - --add counter - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(38468214,0)) - e1:SetCategory(CATEGORY_CONTROL) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(aux.IsDualState) - e1:SetTarget(c38468214.target) - e1:SetOperation(c38468214.operation) - c:RegisterEffect(e1) -end -function c38468214.filter(c) - return c:GetCounter(0xe)>0 and c:IsControlerCanBeChanged() -end -function c38468214.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c38468214.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c38468214.filter,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) - local g=Duel.SelectTarget(tp,c38468214.filter,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0) -end -function c38468214.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFacedown() or not c:IsRelateToEffect(e) then return end - local tc=Duel.GetFirstTarget() - if tc:GetCounter(0xe)>0 and tc:IsRelateToEffect(e) then - c:SetCardTarget(tc) - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_CONTROL) - e1:SetValue(tp) - e1:SetReset(RESET_EVENT+0x1fc0000) - e1:SetCondition(c38468214.ctcon) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_PHASE+PHASE_END) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetLabel(tp) - e2:SetReset(RESET_EVENT+0x1fe0000) - e2:SetCondition(c38468214.rmctcon) - e2:SetOperation(c38468214.rmctop) - tc:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_SELF_DESTROY) - e3:SetReset(RESET_EVENT+0x1fe0000) - e3:SetCondition(c38468214.descon) - tc:RegisterEffect(e3) - end -end -function c38468214.ctcon(e) - local c=e:GetOwner() - return c:IsHasCardTarget(e:GetHandler()) and not c:IsDisabled() -end -function c38468214.rmctcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==e:GetLabel() -end -function c38468214.rmctop(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():RemoveCounter(tp,0xe,1,REASON_EFFECT) -end -function c38468214.descon(e) - return e:GetHandler():GetCounter(0xe)==0 -end diff --git a/script/c38479725.lua b/script/c38479725.lua deleted file mode 100644 index 1f7e56d5d2..0000000000 --- a/script/c38479725.lua +++ /dev/null @@ -1,12 +0,0 @@ ---トロイホース -function c38479725.initial_effect(c) - --double tribute - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DOUBLE_TRIBUTE) - e1:SetValue(c38479725.condition) - c:RegisterEffect(e1) -end -function c38479725.condition(e,c) - return c:IsAttribute(ATTRIBUTE_EARTH) -end diff --git a/script/c38480590.lua b/script/c38480590.lua deleted file mode 100644 index 2338a2a631..0000000000 --- a/script/c38480590.lua +++ /dev/null @@ -1,34 +0,0 @@ ---女豹の傭兵 -function c38480590.initial_effect(c) - --to deck - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TODECK) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c38480590.cost) - e1:SetTarget(c38480590.target) - e1:SetOperation(c38480590.operation) - c:RegisterEffect(e1) -end -function c38480590.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end -function c38480590.filter(c,tid) - return c:IsType(TYPE_MONSTER) and c:GetTurnID()==tid and c:IsReason(REASON_BATTLE) and c:IsAbleToDeck() -end -function c38480590.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local tid=Duel.GetTurnCount() - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c38480590.filter(chkc,tid) end - if chk==0 then return Duel.IsExistingTarget(c38480590.filter,tp,LOCATION_GRAVE,0,1,nil,tid) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectTarget(tp,c38480590.filter,tp,LOCATION_GRAVE,0,1,1,nil,tid) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0) -end -function c38480590.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoDeck(tc,nil,0,REASON_EFFECT) - end -end diff --git a/script/c38492752.lua b/script/c38492752.lua deleted file mode 100644 index 331f27658b..0000000000 --- a/script/c38492752.lua +++ /dev/null @@ -1,33 +0,0 @@ ---ラヴァル・キャノン -function c38492752.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(38492752,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c38492752.sptg) - e1:SetOperation(c38492752.spop) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - c:RegisterEffect(e2) -end -function c38492752.filter(c,e,tp) - return c:IsSetCard(0x39) and c:IsFaceup() and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c38492752.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and c38492752.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c38492752.filter,tp,LOCATION_REMOVED,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c38492752.filter,tp,LOCATION_REMOVED,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c38492752.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c38495396.lua b/script/c38495396.lua deleted file mode 100644 index 4142cbe003..0000000000 --- a/script/c38495396.lua +++ /dev/null @@ -1,46 +0,0 @@ ---セイクリッド・トレミスM7 -function c38495396.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,6,2,c38495396.ovfilter,aux.Stringid(38495396,1),2,c38495396.xyzop) - c:EnableReviveLimit() - --to hand - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(38495396,0)) - e2:SetCategory(CATEGORY_TOHAND) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCost(c38495396.thcost) - e2:SetTarget(c38495396.thtg) - e2:SetOperation(c38495396.thop) - c:RegisterEffect(e2) -end -function c38495396.ovfilter(c) - return c:IsFaceup() and c:IsSetCard(0x53) and c:GetCode()~=38495396 and c:IsType(TYPE_XYZ) -end -function c38495396.xyzop(e,tp,chk) - if chk==0 then return true end - e:GetHandler():RegisterFlagEffect(38495396,RESET_EVENT+0xfe0000+RESET_PHASE+PHASE_END,0,1) -end -function c38495396.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c38495396.thfilter(c) - return c:IsType(TYPE_MONSTER) and c:IsAbleToHand() -end -function c38495396.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE+LOCATION_GRAVE) and c38495396.thfilter(chkc) end - if chk==0 then return e:GetHandler():GetFlagEffect(38495396)==0 - and Duel.IsExistingTarget(c38495396.thfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,LOCATION_MZONE+LOCATION_GRAVE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g=Duel.SelectTarget(tp,c38495396.thfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,LOCATION_MZONE+LOCATION_GRAVE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c38495396.thop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - end -end diff --git a/script/c38520918.lua b/script/c38520918.lua deleted file mode 100644 index b2317bb54a..0000000000 --- a/script/c38520918.lua +++ /dev/null @@ -1,31 +0,0 @@ ---エンシェント・ドラゴン -function c38520918.initial_effect(c) - -- atk/lv up - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(38520918,0)) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_BATTLE_DAMAGE) - e1:SetCondition(c38520918.condition) - e1:SetOperation(c38520918.operation) - c:RegisterEffect(e1) -end -function c38520918.condition(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp and Duel.GetAttackTarget()==nil -end -function c38520918.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetProperty(EFFECT_FLAG_COPY_INHERIT) - e1:SetValue(500) - e1:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_UPDATE_LEVEL) - e2:SetValue(1) - c:RegisterEffect(e2) - end -end diff --git a/script/c38522377.lua b/script/c38522377.lua deleted file mode 100644 index 6905164395..0000000000 --- a/script/c38522377.lua +++ /dev/null @@ -1,95 +0,0 @@ ---機皇神龍アステリスク -function c38522377.initial_effect(c) - c:EnableReviveLimit() - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c38522377.spcon) - c:RegisterEffect(e1) - --atkup - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(38522377,0)) - e2:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_TOGRAVE) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetTarget(c38522377.atktg) - e2:SetOperation(c38522377.atkop) - c:RegisterEffect(e2) - --damage - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(38522377,1)) - e3:SetCategory(CATEGORY_DAMAGE) - e3:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_FIELD) - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - e3:SetRange(LOCATION_MZONE) - e3:SetCondition(c38522377.damcon) - e3:SetTarget(c38522377.damtg) - e3:SetOperation(c38522377.damop) - c:RegisterEffect(e3) -end -function c38522377.spfilter(c) - return c:IsFaceup() and c:IsSetCard(0x13) -end -function c38522377.spcon(e,c) - if c==nil then return true end - return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c38522377.spfilter,c:GetControler(),LOCATION_MZONE,0,3,nil) -end -function c38522377.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chk==0 then return Duel.IsExistingTarget(c38522377.spfilter,tp,LOCATION_MZONE,0,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectTarget(tp,c38522377.spfilter,tp,LOCATION_MZONE,0,1,5,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,g:GetCount(),0,0) -end -function c38522377.atkfilter(c,e) - return c:IsRelateToEffect(e) and c:IsFaceup() -end -function c38522377.atkop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(c38522377.atkfilter,nil,e) - Duel.SendtoGrave(g,REASON_EFFECT) - local og=Duel.GetOperatedGroup() - local tc=og:GetFirst() - local atk=0 - while tc do - local oatk=tc:GetTextAttack() - if oatk<0 then oatk=0 end - atk=atk+oatk - tc=og:GetNext() - end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetValue(atk) - e1:SetReset(RESET_EVENT+0x1ff0000) - e:GetHandler():RegisterEffect(e1) -end -function c38522377.damcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(Card.IsType,1,nil,TYPE_SYNCHRO) -end -function c38522377.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local t1=false - local t2=false - local tc=eg:GetFirst() - while tc do - if tc:IsType(TYPE_SYNCHRO) then - if tc:GetSummonPlayer()==tp then t1=true else t2=true end - end - tc=eg:GetNext() - end - if t1 and not t2 then Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,tp,1000) - elseif not t1 and t2 then Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,1000) - else Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,PLAYER_ALL,1000) end -end -function c38522377.damop(e,tp,eg,ep,ev,re,r,rp) - local ex,g,gc,dp,dv=Duel.GetOperationInfo(0,CATEGORY_DAMAGE) - if dp~=PLAYER_ALL then Duel.Damage(dp,1000,REASON_EFFECT) - else - Duel.Damage(tp,1000,REASON_EFFECT) - Duel.Damage(1-tp,1000,REASON_EFFECT) - end -end diff --git a/script/c38525760.lua b/script/c38525760.lua deleted file mode 100644 index 6ef5b7eba8..0000000000 --- a/script/c38525760.lua +++ /dev/null @@ -1,65 +0,0 @@ ---陽炎獣 サーベラス -function c38525760.initial_effect(c) - --cannot be target - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetValue(aux.tgoval) - c:RegisterEffect(e1) - --summon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(38525760,0)) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_SUMMON_PROC) - e2:SetCondition(c38525760.ntcon) - e2:SetOperation(c38525760.ntop) - c:RegisterEffect(e2) - --search - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(38525760,1)) - e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e3:SetCode(EVENT_TO_GRAVE) - e3:SetCondition(c38525760.thcon) - e3:SetTarget(c38525760.thtg) - e3:SetOperation(c38525760.thop) - c:RegisterEffect(e3) -end -function c38525760.ntcon(e,c,minc) - if c==nil then return true end - local mi,ma=c:GetTributeRequirement() - return minc==0 and mi>0 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 -end -function c38525760.ntop(e,tp,eg,ep,ev,re,r,rp,c) - --change base attack - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetReset(RESET_EVENT+0xff0000) - e1:SetCode(EFFECT_SET_BASE_ATTACK) - e1:SetValue(1000) - c:RegisterEffect(e1) -end -function c38525760.thcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsReason(REASON_DESTROY) -end -function c38525760.filter(c) - return c:IsSetCard(0x7d) and c:IsAbleToHand() -end -function c38525760.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c38525760.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c38525760.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c38525760.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c38528901.lua b/script/c38528901.lua deleted file mode 100644 index de946e642e..0000000000 --- a/script/c38528901.lua +++ /dev/null @@ -1,44 +0,0 @@ ---氷結界の決起隊 -function c38528901.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(38528901,0)) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c38528901.cost) - e1:SetTarget(c38528901.target) - e1:SetOperation(c38528901.operation) - c:RegisterEffect(e1) -end -function c38528901.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end -function c38528901.desfilter(c) - return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_WATER) and c:IsDestructable() -end -function c38528901.sfilter(c) - return c:IsSetCard(0x2f) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() -end -function c38528901.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c38528901.desfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c38528901.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,e:GetHandler()) - and Duel.IsExistingMatchingCard(c38528901.sfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c38528901.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c38528901.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() and Duel.Destroy(tc,REASON_EFFECT)~=0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c38528901.sfilter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end - end -end diff --git a/script/c38538445.lua b/script/c38538445.lua deleted file mode 100644 index e4f6740657..0000000000 --- a/script/c38538445.lua +++ /dev/null @@ -1,80 +0,0 @@ ---不死之炎鳥 -function c38538445.initial_effect(c) - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(aux.FALSE) - c:RegisterEffect(e1) - --summon,flip - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetCode(EVENT_SUMMON_SUCCESS) - e2:SetOperation(c38538445.retreg) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EVENT_FLIP) - c:RegisterEffect(e3) - --recover - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(38538445,1)) - e4:SetCategory(CATEGORY_RECOVER) - e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e4:SetCode(EVENT_BATTLE_DAMAGE) - e4:SetCondition(c38538445.condition) - e4:SetTarget(c38538445.target) - e4:SetOperation(c38538445.operation) - c:RegisterEffect(e4) -end -function c38538445.condition(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp -end -function c38538445.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(ev) - Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,ev) -end -function c38538445.operation(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Recover(p,d,REASON_EFFECT) -end -function c38538445.retreg(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - --to hand - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetDescription(aux.Stringid(38538445,0)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e1:SetCondition(c38538445.retcon) - e1:SetTarget(c38538445.rettg) - e1:SetOperation(c38538445.retop) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - c:RegisterEffect(e2) -end -function c38538445.retcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsHasEffect(EFFECT_SPIRIT_DONOT_RETURN) then return false end - if e:IsHasType(EFFECT_TYPE_TRIGGER_F) then - return not c:IsHasEffect(EFFECT_SPIRIT_MAYNOT_RETURN) - else return c:IsHasEffect(EFFECT_SPIRIT_MAYNOT_RETURN) end -end -function c38538445.rettg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0) -end -function c38538445.retop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SendtoHand(c,nil,REASON_EFFECT) - end -end diff --git a/script/c38552107.lua b/script/c38552107.lua deleted file mode 100644 index ec5e4e6c5d..0000000000 --- a/script/c38552107.lua +++ /dev/null @@ -1,66 +0,0 @@ ---光の角 -function c38552107.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c38552107.target) - e1:SetOperation(c38552107.operation) - c:RegisterEffect(e1) - --Atk up - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_UPDATE_DEFENCE) - e2:SetValue(800) - c:RegisterEffect(e2) - --Equip limit - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_EQUIP_LIMIT) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e3:SetValue(1) - c:RegisterEffect(e3) - --to deck - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(38552107,0)) - e4:SetCategory(CATEGORY_TODECK) - e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e4:SetCode(EVENT_TO_GRAVE) - e4:SetCondition(c38552107.tdcon) - e4:SetCost(c38552107.tdcost) - e4:SetTarget(c38552107.tdtg) - e4:SetOperation(c38552107.tdop) - c:RegisterEffect(e4) -end -function c38552107.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c38552107.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,e:GetHandler(),tc) - end -end -function c38552107.tdcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) -end -function c38552107.tdcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,500) end - Duel.PayLPCost(tp,500) -end -function c38552107.tdtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToDeck() end - Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0) -end -function c38552107.tdop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - Duel.SendtoDeck(e:GetHandler(),nil,0,REASON_EFFECT) - end -end diff --git a/script/c38562933.lua b/script/c38562933.lua deleted file mode 100644 index d720e06320..0000000000 --- a/script/c38562933.lua +++ /dev/null @@ -1,31 +0,0 @@ ---BF-空風のジン -function c38562933.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(38562933,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_BATTLE_START) - e1:SetCondition(c38562933.descon) - e1:SetTarget(c38562933.destg) - e1:SetOperation(c38562933.desop) - c:RegisterEffect(e1) -end -function c38562933.descon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local d=Duel.GetAttackTarget() - if d==c then d=Duel.GetAttacker() end - e:SetLabelObject(d) - return d and d:IsFaceup() and d:GetDefence()<=c:GetAttack() -end -function c38562933.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetLabelObject(),1,0,0) -end -function c38562933.desop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local d=e:GetLabelObject() - if c:IsFaceup() and c:IsRelateToEffect(e) and d:IsRelateToBattle() and d:GetDefence()<=c:GetAttack() then - Duel.Destroy(d,REASON_EFFECT) - end -end diff --git a/script/c38568567.lua b/script/c38568567.lua deleted file mode 100644 index 1b70e2efc0..0000000000 --- a/script/c38568567.lua +++ /dev/null @@ -1,61 +0,0 @@ ---ワンダー・クローバー -function c38568567.initial_effect(c) - --multi attack - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c38568567.condition) - e1:SetCost(c38568567.cost) - e1:SetTarget(c38568567.target) - e1:SetOperation(c38568567.operation) - c:RegisterEffect(e1) -end -function c38568567.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsAbleToEnterBP() -end -function c38568567.cfilter(c) - return c:GetLevel()==4 and c:IsRace(RACE_PLANT) and c:IsAbleToGraveAsCost() -end -function c38568567.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c38568567.cfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c38568567.cfilter,tp,LOCATION_HAND,0,1,1,nil) - Duel.SendtoGrave(g,REASON_COST) - e:SetLabel(1) -end -function c38568567.filter(c) - return c:IsFaceup() and not c:IsHasEffect(EFFECT_EXTRA_ATTACK) -end -function c38568567.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c38568567.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c38568567.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - local g=Duel.SelectTarget(tp,c38568567.filter,tp,LOCATION_MZONE,0,1,1,nil) - if e:GetLabel()==1 then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetProperty(EFFECT_FLAG_OATH) - e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetTarget(c38568567.ftarget) - e1:SetLabel(g:GetFirst():GetFieldID()) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) - e:SetLabel(0) - end -end -function c38568567.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_EXTRA_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e1:SetValue(1) - tc:RegisterEffect(e1) - end -end -function c38568567.ftarget(e,c) - return e:GetLabel()~=c:GetFieldID() -end diff --git a/script/c38589847.lua b/script/c38589847.lua deleted file mode 100644 index 9e01126047..0000000000 --- a/script/c38589847.lua +++ /dev/null @@ -1,41 +0,0 @@ ---アドバンス・フォース -function c38589847.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --summon with 1 tribute - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(38589847,0)) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(LOCATION_HAND,0) - e2:SetCode(EFFECT_SUMMON_PROC) - e2:SetCondition(c38589847.otcon) - e2:SetTarget(c38589847.ottg) - e2:SetOperation(c38589847.otop) - e2:SetValue(SUMMON_TYPE_ADVANCE) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EFFECT_SET_PROC) - c:RegisterEffect(e3) -end -function c38589847.otfilter(c,tp) - return c:IsLevelAbove(5) and (c:IsControler(tp) or c:IsFaceup()) -end -function c38589847.otcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - local mg=Duel.GetMatchingGroup(c38589847.otfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp) - return Duel.GetTributeCount(c,mg)>0 -end -function c38589847.ottg(e,c) - return c:IsLevelAbove(7) -end -function c38589847.otop(e,tp,eg,ep,ev,re,r,rp,c) - local mg=Duel.GetMatchingGroup(c38589847.otfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp) - local sg=Duel.SelectTribute(tp,c,1,1,mg) - c:SetMaterial(sg) - Duel.Release(sg,REASON_SUMMON+REASON_MATERIAL) -end diff --git a/script/c38643567.lua b/script/c38643567.lua deleted file mode 100644 index 843d667359..0000000000 --- a/script/c38643567.lua +++ /dev/null @@ -1,92 +0,0 @@ ---甲虫装機の宝珠 -function c38643567.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCondition(c38643567.condition) - e1:SetTarget(c38643567.target) - e1:SetOperation(c38643567.operation) - c:RegisterEffect(e1) -end -function c38643567.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end -function c38643567.filter(c) - return c:IsFaceup() and c:IsSetCard(0x56) -end -function c38643567.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c38643567.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c38643567.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local g=Duel.SelectTarget(tp,c38643567.filter,tp,LOCATION_MZONE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c38643567.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsLocation(LOCATION_SZONE) then return end - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,c,tc) - c:CancelToGrave() - --Atk/def - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_EQUIP) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(500) - e1:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_UPDATE_DEFENCE) - e2:SetValue(500) - e2:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e2) - --Equip limit - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_EQUIP_LIMIT) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e3:SetValue(c38643567.eqlimit) - e3:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e3) - --negate - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(38643567,0)) - e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_QUICK_O) - e4:SetCategory(CATEGORY_DISABLE) - e4:SetCode(EVENT_CHAINING) - e4:SetRange(LOCATION_SZONE) - e4:SetCondition(c38643567.ngcon) - e4:SetCost(c38643567.ngcost) - e4:SetTarget(c38643567.ngtg) - e4:SetOperation(c38643567.ngop) - e4:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e4) - end -end -function c38643567.eqlimit(e,c) - return c:IsSetCard(0x56) -end -function c38643567.ngcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return end - local loc,tg=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION,CHAININFO_TARGET_CARDS) - local tc=tg:GetFirst() - if tg:GetCount()~=1 or not tc:IsLocation(LOCATION_MZONE) or not tc:IsSetCard(0x56) then return false end - return Duel.IsChainDisablable(ev) and loc~=LOCATION_DECK -end -function c38643567.ngcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end -function c38643567.ngtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0) -end -function c38643567.ngop(e,tp,eg,ep,ev,re,r,rp,chk) - Duel.NegateEffect(ev) -end diff --git a/script/c38667773.lua b/script/c38667773.lua deleted file mode 100644 index 92714ae018..0000000000 --- a/script/c38667773.lua +++ /dev/null @@ -1,36 +0,0 @@ ---星因士 ベガ -function c38667773.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(38667773,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e1:SetCountLimit(1,38667773) - e1:SetTarget(c38667773.sptg) - e1:SetOperation(c38667773.spop) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - c:RegisterEffect(e2) - local e3=e1:Clone() - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e3) -end -function c38667773.filter(c,e,tp) - return c:IsSetCard(0x9c) and not c:IsCode(38667773) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c38667773.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c38667773.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c38667773.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c38667773.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c38670435.lua b/script/c38670435.lua deleted file mode 100644 index 133e66f47a..0000000000 --- a/script/c38670435.lua +++ /dev/null @@ -1,14 +0,0 @@ ---暗黒恐獣 -function c38670435.initial_effect(c) - --direct attack - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DIRECT_ATTACK) - e1:SetCondition(c38670435.dircon) - c:RegisterEffect(e1) -end -function c38670435.dircon(e) - local tp=e:GetHandler():GetControler() - return Duel.GetFieldGroupCount(tp,0,LOCATION_SZONE)==0 - and not Duel.IsExistingMatchingCard(Card.IsAttackPos,tp,0,LOCATION_MZONE,1,nil) -end diff --git a/script/c38679204.lua b/script/c38679204.lua deleted file mode 100644 index e8f79066de..0000000000 --- a/script/c38679204.lua +++ /dev/null @@ -1,76 +0,0 @@ ---ヴァイロン・ステラ -function c38679204.initial_effect(c) - --equip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(38679204,0)) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCondition(c38679204.eqcon) - e1:SetCost(c38679204.eqcost) - e1:SetTarget(c38679204.eqtg) - e1:SetOperation(c38679204.eqop) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(38679204,1)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_DAMAGE_STEP_END) - e2:SetRange(LOCATION_SZONE) - e2:SetCondition(c38679204.descon) - e2:SetTarget(c38679204.destg) - e2:SetOperation(c38679204.desop) - c:RegisterEffect(e2) -end -function c38679204.eqcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_MZONE) -end -function c38679204.eqcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,500) end - Duel.PayLPCost(tp,500) -end -function c38679204.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:IsFaceup() end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,nil) -end -function c38679204.eqop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsRelateToEffect(e) then - Duel.Equip(tp,c,tc) - --equip limit - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetValue(c38679204.eqlimit) - e1:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e1) - end -end -function c38679204.eqlimit(e,c) - return c:GetControler()==e:GetHandlerPlayer() or e:GetHandler():GetEquipTarget()==c -end -function c38679204.descon(e,tp,eg,ep,ev,re,r,rp) - local ec=e:GetHandler():GetEquipTarget() - local dt=nil - if ec==Duel.GetAttacker() then dt=Duel.GetAttackTarget() - elseif ec==Duel.GetAttackTarget() then dt=Duel.GetAttacker() end - e:SetLabelObject(dt) - return dt and dt:IsRelateToBattle() -end -function c38679204.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetLabelObject(),1,0,0) -end -function c38679204.desop(e,tp,eg,ep,ev,re,r,rp) - local dt=e:GetLabelObject() - if dt:IsRelateToBattle() then - Duel.Destroy(dt,REASON_EFFECT) - end -end diff --git a/script/c38680149.lua b/script/c38680149.lua deleted file mode 100644 index 5b3a715a25..0000000000 --- a/script/c38680149.lua +++ /dev/null @@ -1,47 +0,0 @@ ---トラスト・マインド -function c38680149.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetLabel(0) - e1:SetCost(c38680149.cost) - e1:SetTarget(c38680149.target) - e1:SetOperation(c38680149.activate) - c:RegisterEffect(e1) -end -function c38680149.cost(e,tp,eg,ep,ev,re,r,rp,chk) - e:SetLabel(100) - return true -end -function c38680149.filter1(c,e,tp) - local lv=c:GetLevel() - return lv>=2 and Duel.IsExistingTarget(c38680149.filter2,tp,LOCATION_GRAVE,0,1,nil,lv/2) -end -function c38680149.filter2(c,lv) - return c:IsLevelBelow(lv) and c:IsType(TYPE_TUNER) and c:IsAbleToHand() -end -function c38680149.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c38680149.filter2(chkc,e:GetLabel()) end - if chk==0 then - if e:GetLabel()~=100 then return false end - e:SetLabel(0) - return Duel.CheckReleaseGroup(tp,c38680149.filter1,1,nil,e,tp) - end - local rg=Duel.SelectReleaseGroup(tp,c38680149.filter1,1,1,nil,e,tp) - local lv=rg:GetFirst():GetLevel()/2 - e:SetLabel(lv) - Duel.Release(rg,REASON_COST) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c38680149.filter2,tp,LOCATION_GRAVE,0,1,1,nil,lv) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c38680149.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end diff --git a/script/c3868277.lua b/script/c3868277.lua deleted file mode 100644 index d4807f5db6..0000000000 --- a/script/c3868277.lua +++ /dev/null @@ -1,35 +0,0 @@ ---TGX3-DX2 -function c3868277.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c3868277.target) - e1:SetOperation(c3868277.activate) - c:RegisterEffect(e1) -end -function c3868277.filter(c) - return c:IsSetCard(0x27) and c:IsAbleToDeck() -end -function c3868277.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c3868277.filter(chkc) end - if chk==0 then return Duel.IsPlayerCanDraw(tp,2) - and Duel.IsExistingTarget(c3868277.filter,tp,LOCATION_GRAVE,0,3,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectTarget(tp,c3868277.filter,tp,LOCATION_GRAVE,0,3,3,nil) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2) -end -function c3868277.tgfilter(c,e) - return not c:IsRelateToEffect(e) -end -function c3868277.activate(e,tp,eg,ep,ev,re,r,rp) - local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - if tg:IsExists(c3868277.tgfilter,1,nil,e) then return end - Duel.SendtoDeck(tg,nil,0,REASON_EFFECT) - Duel.ShuffleDeck(tp) - Duel.BreakEffect() - Duel.Draw(tp,2,REASON_EFFECT) -end diff --git a/script/c38699854.lua b/script/c38699854.lua deleted file mode 100644 index 38edd73518..0000000000 --- a/script/c38699854.lua +++ /dev/null @@ -1,25 +0,0 @@ ---太陽の書 -function c38699854.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_POSITION) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c38699854.target) - e1:SetOperation(c38699854.activate) - c:RegisterEffect(e1) -end -function c38699854.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:GetLocation()==LOCATION_MZONE and chkc:IsFacedown() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFacedown,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEDOWN) - local g=Duel.SelectTarget(tp,Card.IsFacedown,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0) -end -function c38699854.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFacedown() then - Duel.ChangePosition(tc,POS_FACEUP_ATTACK) - end -end diff --git a/script/c38723936.lua b/script/c38723936.lua deleted file mode 100644 index 0181643d7f..0000000000 --- a/script/c38723936.lua +++ /dev/null @@ -1,36 +0,0 @@ ---クイズ ---Effect is not fully implemented -function c38723936.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_REMOVE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c38723936.target) - e1:SetOperation(c38723936.activate) - c:RegisterEffect(e1) -end -function c38723936.filter(c) - return c:IsType(TYPE_MONSTER) and c:IsAbleToRemove() -end -function c38723936.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chk==0 then return Duel.IsExistingTarget(c38723936.filter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,nil,1,tp,0) -end -function c38723936.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c38723936.filter,tp,LOCATION_GRAVE,0,nil) - if g:GetCount()==0 then return end - local last=g:GetFirst() - local tc=g:GetNext() - while tc do - if tc:GetSequence()0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end -function c387282.filter(c) - return c:IsFaceup() and c:GetLevel()>0 and c:IsSetCard(0x54) -end -function c387282.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c387282.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c387282.filter,tp,LOCATION_MZONE,0,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c387282.filter,tp,LOCATION_MZONE,0,1,1,e:GetHandler()) -end -function c387282.lvop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and c:IsFaceup() and tc:IsRelateToEffect(e) and tc:IsFaceup() then - local lv=c:GetLevel()+tc:GetLevel() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CHANGE_LEVEL) - e1:SetValue(lv) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - c:RegisterEffect(e1) - local e2=e1:Clone() - tc:RegisterEffect(e2) - end -end diff --git a/script/c38730226.lua b/script/c38730226.lua deleted file mode 100644 index ec00a9b22f..0000000000 --- a/script/c38730226.lua +++ /dev/null @@ -1,40 +0,0 @@ ---英知の代行者 マーキュリー -function c38730226.initial_effect(c) - --draw - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(38730226,0)) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c38730226.con) - e1:SetOperation(c38730226.op) - c:RegisterEffect(e1) -end -function c38730226.con(e,tp,eg,ep,ev,re,r,rp,chk) - return Duel.GetTurnPlayer()~=tp and Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)==0 -end -function c38730226.op(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetDescription(aux.Stringid(38730226,1)) - e1:SetCategory(CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_MZONE) - e1:SetTarget(c38730226.dtg) - e1:SetOperation(c38730226.dop) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_STANDBY) - e:GetHandler():RegisterEffect(e1) -end -function c38730226.dtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(1) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c38730226.dop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end diff --git a/script/c38737148.lua b/script/c38737148.lua deleted file mode 100644 index 316bc28e76..0000000000 --- a/script/c38737148.lua +++ /dev/null @@ -1,53 +0,0 @@ ---ライトレイ ダイダロス -function c38737148.initial_effect(c) - c:EnableReviveLimit() - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c38737148.spcon) - c:RegisterEffect(e1) - --spsummon limit - local e2=Effect.CreateEffect(c) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_SPSUMMON_CONDITION) - c:RegisterEffect(e2) - --remove - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(38737148,0)) - e3:SetCategory(CATEGORY_DESTROY) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetCountLimit(1) - e3:SetRange(LOCATION_MZONE) - e3:SetTarget(c38737148.destg) - e3:SetOperation(c38737148.desop) - c:RegisterEffect(e3) -end -function c38737148.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(Card.IsAttribute,tp,LOCATION_GRAVE,0,4,nil,ATTRIBUTE_LIGHT) -end -function c38737148.desfilter(c) - return c:IsDestructable() and c:GetSequence()==5 - and Duel.IsExistingTarget(Card.IsDestructable,0,LOCATION_ONFIELD,LOCATION_ONFIELD,2,c) -end -function c38737148.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - if chk==0 then return Duel.IsExistingTarget(c38737148.desfilter,tp,LOCATION_SZONE,LOCATION_SZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g1=Duel.SelectTarget(tp,c38737148.desfilter,tp,LOCATION_SZONE,LOCATION_SZONE,1,1,nil) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g2=Duel.SelectTarget(tp,Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,2,2,g1:GetFirst()) - g1:Merge(g2) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g1,g1:GetCount(),0,0) -end -function c38737148.desop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) - Duel.Destroy(g,REASON_EFFECT) -end diff --git a/script/c38742075.lua b/script/c38742075.lua deleted file mode 100644 index 2dfd1293a8..0000000000 --- a/script/c38742075.lua +++ /dev/null @@ -1,43 +0,0 @@ ---辺境の大賢者 -function c38742075.initial_effect(c) - --disable - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_DISABLE) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(LOCATION_SZONE,LOCATION_SZONE) - e1:SetTarget(c38742075.distg) - c:RegisterEffect(e1) - --disable effect - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_CHAIN_SOLVING) - e2:SetRange(LOCATION_MZONE) - e2:SetOperation(c38742075.disop) - c:RegisterEffect(e2) - --self destroy - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetCode(EFFECT_SELF_DESTROY) - e3:SetRange(LOCATION_MZONE) - e3:SetTargetRange(LOCATION_SZONE,LOCATION_SZONE) - e3:SetTarget(c38742075.distg) - c:RegisterEffect(e3) -end -function c38742075.cfilter(c,tp) - return c:IsFaceup() and c:IsRace(RACE_WARRIOR) and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) -end -function c38742075.distg(e,c) - return c:GetCardTargetCount()>0 and c:IsType(TYPE_SPELL) - and c:GetCardTarget():IsExists(c38742075.cfilter,1,nil,e:GetHandlerPlayer()) -end -function c38742075.disop(e,tp,eg,ep,ev,re,r,rp) - if not re:IsActiveType(TYPE_SPELL) then return end - if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return end - local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) - if not g or not g:IsExists(c38742075.cfilter,1,nil,tp) then return end - Duel.NegateEffect(ev) - if re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(re:GetHandler(),REASON_EFFECT) - end -end diff --git a/script/c38757297.lua b/script/c38757297.lua deleted file mode 100644 index 7c33e52737..0000000000 --- a/script/c38757297.lua +++ /dev/null @@ -1,25 +0,0 @@ ---フォトン・レオ -function c38757297.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(38757297,0)) - e1:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c38757297.target) - e1:SetOperation(c38757297.activate) - c:RegisterEffect(e1) -end -function c38757297.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(1-tp) - and Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,0,LOCATION_HAND,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,1-tp,LOCATION_HAND) -end -function c38757297.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND) - if g:GetCount()==0 then return end - Duel.SendtoDeck(g,nil,2,REASON_EFFECT) - Duel.ShuffleDeck(1-tp) - Duel.BreakEffect() - Duel.Draw(1-tp,g:GetCount(),REASON_EFFECT) -end diff --git a/script/c38777931.lua b/script/c38777931.lua deleted file mode 100644 index 1f94d56b06..0000000000 --- a/script/c38777931.lua +++ /dev/null @@ -1,30 +0,0 @@ ---リリース・リバース・バースト -function c38777931.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_END_PHASE) - e1:SetCost(c38777931.cost) - e1:SetTarget(c38777931.target) - e1:SetOperation(c38777931.activate) - c:RegisterEffect(e1) -end -function c38777931.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsSetCard,1,nil,0x7f) end - local g=Duel.SelectReleaseGroup(tp,Card.IsSetCard,1,1,nil,0x7f) - Duel.Release(g,REASON_COST) -end -function c38777931.filter(c) - return c:IsFacedown() and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable() -end -function c38777931.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c38777931.filter,tp,0,LOCATION_ONFIELD,1,nil) end - local g=Duel.GetMatchingGroup(c38777931.filter,tp,0,LOCATION_ONFIELD,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c38777931.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c38777931.filter,tp,0,LOCATION_ONFIELD,nil) - Duel.Destroy(g,REASON_EFFECT) -end diff --git a/script/c38814750.lua b/script/c38814750.lua deleted file mode 100644 index 419125934f..0000000000 --- a/script/c38814750.lua +++ /dev/null @@ -1,87 +0,0 @@ ---PSYフレームギア・γ -function c38814750.initial_effect(c) - c:EnableUnsummonable() - --splimit - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(c38814750.splimit) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(38814750,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_NEGATE+CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_QUICK_O) - e2:SetRange(LOCATION_HAND) - e2:SetCode(EVENT_CHAINING) - e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) - e2:SetCondition(c38814750.condition) - e2:SetTarget(c38814750.target) - e2:SetOperation(c38814750.operation) - c:RegisterEffect(e2) -end -function c38814750.splimit(e,se,sp,st) - return se:IsHasType(EFFECT_TYPE_ACTIONS) -end -function c38814750.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 and ep~=tp and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainNegatable(ev) -end -function c38814750.spfilter(c,e,tp) - return c:IsCode(49036338) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c38814750.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return not e:GetHandler():IsStatus(STATUS_CHAINING) and Duel.GetLocationCount(tp,LOCATION_MZONE)>1 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) - and Duel.IsExistingMatchingCard(c38814750.spfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE) - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) - end -end -function c38814750.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 or not e:GetHandler():IsRelateToEffect(e) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c38814750.spfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp) - if g:FilterCount(aux.nvfilter,nil)==0 then return end - local tc=g:GetFirst() - local c=e:GetHandler() - local fid=c:GetFieldID() - Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) - Duel.SpecialSummonStep(c,0,tp,tp,false,false,POS_FACEUP) - tc:RegisterFlagEffect(38814750,RESET_EVENT+0x1fe0000,0,1,fid) - c:RegisterFlagEffect(38814750,RESET_EVENT+0x1fe0000,0,1,fid) - Duel.SpecialSummonComplete() - g:AddCard(c) - g:KeepAlive() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetCountLimit(1) - e1:SetLabel(fid) - e1:SetLabelObject(g) - e1:SetCondition(c38814750.rmcon) - e1:SetOperation(c38814750.rmop) - Duel.RegisterEffect(e1,tp) - Duel.NegateActivation(ev) - if re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(eg,REASON_EFFECT) - end -end -function c38814750.rmfilter(c,fid) - return c:GetFlagEffectLabel(38814750)==fid -end -function c38814750.rmcon(e,tp,eg,ep,ev,re,r,rp) - local g=e:GetLabelObject() - if not g:IsExists(c38814750.rmfilter,1,nil,e:GetLabel()) then - g:DeleteGroup() - e:Reset() - return false - else return true end -end -function c38814750.rmop(e,tp,eg,ep,ev,re,r,rp) - local g=e:GetLabelObject() - local tg=g:Filter(c38814750.rmfilter,nil,e:GetLabel()) - Duel.Remove(tg,POS_FACEUP,REASON_EFFECT) -end diff --git a/script/c38815069.lua b/script/c38815069.lua deleted file mode 100644 index 48f010a676..0000000000 --- a/script/c38815069.lua +++ /dev/null @@ -1,35 +0,0 @@ ---ライトロード・シーフ ライニャン -function c38815069.initial_effect(c) - --flip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(38815069,0)) - e1:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP) - e1:SetTarget(c38815069.target) - e1:SetOperation(c38815069.operation) - c:RegisterEffect(e1) -end -function c38815069.filter(c) - return c:IsSetCard(0x38) and c:IsType(TYPE_MONSTER) and c:IsAbleToDeck() -end -function c38815069.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c38815069.filter(chkc) end - if chk==0 then return true end - if Duel.IsExistingTarget(c38815069.filter,tp,LOCATION_GRAVE,0,1,nil) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectTarget(tp,c38815069.filter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) - end -end -function c38815069.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - local ct=Duel.SendtoDeck(tc,nil,0,REASON_EFFECT) - if ct>0 then - Duel.ShuffleDeck(tp) - Duel.Draw(tp,1,REASON_EFFECT) - end - end -end diff --git a/script/c38834303.lua b/script/c38834303.lua deleted file mode 100644 index ac39500da9..0000000000 --- a/script/c38834303.lua +++ /dev/null @@ -1,29 +0,0 @@ ---カウンタークリーナー -function c38834303.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c38834303.cost) - e1:SetTarget(c38834303.target) - e1:SetOperation(c38834303.activate) - c:RegisterEffect(e1) -end -function c38834303.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,500) end - Duel.PayLPCost(tp,500) -end -function c38834303.filter(c) - return c:GetCounter(0)~=0 -end -function c38834303.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c38834303.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end -end -function c38834303.activate(e,tp,eg,ep,ev,re,r,rp) - local sg=Duel.GetMatchingGroup(c38834303.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) - local tc=sg:GetFirst() - while tc do - tc:RemoveCounter(tp,0,0,0) - tc=sg:GetNext() - end -end diff --git a/script/c38837163.lua b/script/c38837163.lua deleted file mode 100644 index 6b3b44ed05..0000000000 --- a/script/c38837163.lua +++ /dev/null @@ -1,67 +0,0 @@ ---ピューマン -function c38837163.initial_effect(c) - c:EnableReviveLimit() - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c38837163.spcon) - e1:SetOperation(c38837163.spop) - c:RegisterEffect(e1) - --effect - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(38837163,0)) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCost(c38837163.cost) - e2:SetTarget(c38837163.target) - e2:SetOperation(c38837163.operation) - c:RegisterEffect(e2) -end -function c38837163.spfilter(c) - return c:IsRace(RACE_BEASTWARRIOR) and c:IsAbleToRemoveAsCost() -end -function c38837163.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c38837163.spfilter,tp,LOCATION_GRAVE,0,2,nil) -end -function c38837163.spop(e,tp,eg,ep,ev,re,r,rp,c) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c38837163.spfilter,tp,LOCATION_GRAVE,0,2,2,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c38837163.cfilter(c) - return c:IsRace(RACE_BEASTWARRIOR) and c:IsDiscardable() -end -function c38837163.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c38837163.cfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,c38837163.cfilter,1,1,REASON_COST+REASON_DISCARD) -end -function c38837163.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local opt=Duel.SelectOption(tp,aux.Stringid(38837163,1),aux.Stringid(38837163,2)) - e:SetLabel(opt) -end -function c38837163.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) or c:IsFacedown() then return end - if e:GetLabel()==0 then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetValue(c:GetAttack()*2) - e1:SetReset(RESET_EVENT+0x1ff0000+RESET_PHASE+PHASE_END) - c:RegisterEffect(e1) - else - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DIRECT_ATTACK) - e1:SetReset(RESET_EVENT+0x1ff0000+RESET_PHASE+PHASE_END) - c:RegisterEffect(e1) - end -end diff --git a/script/c38844957.lua b/script/c38844957.lua deleted file mode 100644 index ac42bd3187..0000000000 --- a/script/c38844957.lua +++ /dev/null @@ -1,53 +0,0 @@ ---緊急儀式術 -function c38844957.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c38844957.condition) - e1:SetCost(c38844957.cost) - e1:SetTarget(c38844957.target) - e1:SetOperation(c38844957.operation) - c:RegisterEffect(e1) -end -function c38844957.cfilter(c) - return c:IsFaceup() and bit.band(c:GetType(),0x81)==0x81 -end -function c38844957.condition(e,tp,eg,ep,ev,re,r,rp) - return not Duel.IsExistingMatchingCard(c38844957.cfilter,tp,LOCATION_MZONE,0,1,nil) -end -function c38844957.filter(c) - return c:GetType()==TYPE_SPELL+TYPE_RITUAL and c:IsAbleToRemoveAsCost() and c:CheckActivateEffect(true,true,false)~=nil -end -function c38844957.cost(e,tp,eg,ep,ev,re,r,rp,chk) - e:SetLabel(1) - return true -end -function c38844957.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then - local te=e:GetLabelObject() - local tg=te:GetTarget() - return tg(e,tp,eg,ep,ev,re,r,rp,0,chkc) - end - if chk==0 then - if e:GetLabel()==0 then return false end - e:SetLabel(0) - return Duel.IsExistingMatchingCard(c38844957.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil) - end - e:SetLabel(0) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c38844957.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil) - local te=g:GetFirst():CheckActivateEffect(true,true,false) - e:SetLabelObject(te) - Duel.Remove(g,POS_FACEUP,REASON_COST) - e:SetCategory(te:GetCategory()) - e:SetProperty(te:GetProperty()) - local tg=te:GetTarget() - if tg then tg(e,tp,eg,ep,ev,re,r,rp,1) end -end -function c38844957.operation(e,tp,eg,ep,ev,re,r,rp) - local te=e:GetLabelObject() - if not te then return end - local op=te:GetOperation() - if op then op(e,tp,eg,ep,ev,re,r,rp) end -end diff --git a/script/c38898779.lua b/script/c38898779.lua deleted file mode 100644 index 62bc0a31a0..0000000000 --- a/script/c38898779.lua +++ /dev/null @@ -1,76 +0,0 @@ ---ギガンテック・ファイター/バスター -function c38898779.initial_effect(c) - c:EnableReviveLimit() - --Cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(aux.FALSE) - c:RegisterEffect(e1) - --to grave - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(38898779,0)) - e2:SetCategory(CATEGORY_TOGRAVE) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetTarget(c38898779.tgtg) - e2:SetOperation(c38898779.tgop) - c:RegisterEffect(e2) - --atkdown - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetCode(EFFECT_UPDATE_ATTACK) - e3:SetRange(LOCATION_MZONE) - e3:SetTargetRange(0,LOCATION_MZONE) - e3:SetValue(c38898779.atkval) - c:RegisterEffect(e3) - --Special summon - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(38898779,1)) - e4:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE) - e4:SetCategory(CATEGORY_SPECIAL_SUMMON) - e4:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e4:SetCode(EVENT_LEAVE_FIELD) - e4:SetCondition(c38898779.spcon) - e4:SetTarget(c38898779.sptg) - e4:SetOperation(c38898779.spop) - c:RegisterEffect(e4) -end -function c38898779.tgfilter(c) - return c:IsRace(RACE_WARRIOR) and c:IsAbleToGrave() -end -function c38898779.tgtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chk==0 then return Duel.IsExistingMatchingCard(c38898779.tgfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) -end -function c38898779.tgop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c38898779.tgfilter,tp,LOCATION_DECK,0,1,2,nil) - if g:GetCount()>0 then - Duel.SendtoGrave(g,REASON_EFFECT) - end -end -function c38898779.atkval(e,c) - return Duel.GetMatchingGroupCount(Card.IsRace,e:GetHandler():GetControler(),LOCATION_GRAVE,0,nil,RACE_WARRIOR)*-100 -end -function c38898779.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsReason(REASON_DESTROY) -end -function c38898779.spfilter(c,e,tp) - return c:IsCode(23693634) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c38898779.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c38898779.spfilter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c38898779.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c38898779.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c38898779.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c3891471.lua b/script/c3891471.lua deleted file mode 100644 index d8ef6a9b07..0000000000 --- a/script/c3891471.lua +++ /dev/null @@ -1,88 +0,0 @@ ---サイコ・チューン -function c3891471.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_END_PHASE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c3891471.target) - e1:SetOperation(c3891471.operation) - c:RegisterEffect(e1) - --Destroy - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE) - e2:SetCode(EVENT_LEAVE_FIELD) - e2:SetOperation(c3891471.desop) - c:RegisterEffect(e2) - --Destroy2 - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e3:SetRange(LOCATION_SZONE) - e3:SetCode(EVENT_LEAVE_FIELD) - e3:SetCondition(c3891471.descon2) - e3:SetOperation(c3891471.desop2) - c:RegisterEffect(e3) - --Destroy2 - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(3891471,0)) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e4:SetCode(EVENT_TO_GRAVE) - e4:SetTarget(c3891471.damtg) - e4:SetOperation(c3891471.damop) - c:RegisterEffect(e4) -end -function c3891471.filter(c,e,tp) - return c:IsRace(RACE_PSYCHO) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c3891471.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c3891471.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c3891471.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c3891471.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c3891471.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then - local lv=tc:GetLevel() - if Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP_ATTACK) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_ADD_TYPE) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(TYPE_TUNER) - tc:RegisterEffect(e1) - Duel.SpecialSummonComplete() - c:SetCardTarget(tc) - c:RegisterFlagEffect(3891471,RESET_EVENT+0x17a0000,0,1,lv) - end - end -end -function c3891471.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetHandler():GetFirstCardTarget() - if tc and tc:IsLocation(LOCATION_MZONE) then - Duel.Destroy(tc,REASON_EFFECT) - end -end -function c3891471.descon2(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetHandler():GetFirstCardTarget() - return tc and eg:IsContains(tc) -end -function c3891471.desop2(e,tp,eg,ep,ev,re,r,rp) - Duel.Destroy(e:GetHandler(),REASON_EFFECT) -end -function c3891471.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():GetFlagEffect(3891471)~=0 end - Duel.SetTargetPlayer(tp) - local lv=e:GetHandler():GetFlagEffectLabel(3891471) - Duel.SetTargetParam(lv*400) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,tp,lv*400) -end -function c3891471.damop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c3897065.lua b/script/c3897065.lua deleted file mode 100644 index 2653bd1a4c..0000000000 --- a/script/c3897065.lua +++ /dev/null @@ -1,85 +0,0 @@ ---スーパービークロイド-ステルス・ユニオン -function c3897065.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcCode4(c,61538782,98049038,71218746,984114,true,true) - --equip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(3897065,0)) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetTarget(c3897065.eqtg) - e1:SetOperation(c3897065.eqop) - c:RegisterEffect(e1) - --attack all - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_ATTACK_ALL) - e2:SetCondition(c3897065.atcon) - e2:SetValue(1) - c:RegisterEffect(e2) - --pierce - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_PIERCE) - c:RegisterEffect(e3) - --atk - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e4:SetCode(EVENT_ATTACK_ANNOUNCE) - e4:SetOperation(c3897065.atkop) - c:RegisterEffect(e4) -end -function c3897065.eqfilter(c,tp) - return c:IsFaceup() and not c:IsRace(RACE_MACHINE) and (c:IsControler(tp) or c:IsAbleToChangeControler()) -end -function c3897065.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c3897065.eqfilter(chkc,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingTarget(c3897065.eqfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,e:GetHandler(),tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local g=Duel.SelectTarget(tp,c3897065.eqfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,e:GetHandler(),tp) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0) -end -function c3897065.eqlimit(e,c) - return e:GetOwner()==c -end -function c3897065.eqop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsType(TYPE_MONSTER) and not tc:IsRace(RACE_MACHINE) and tc:IsRelateToEffect(e) then - if c:IsFaceup() and c:IsRelateToEffect(e) then - if not Duel.Equip(tp,tc,c,false) then return end - --equip limit - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_COPY_INHERIT+EFFECT_FLAG_OWNER_RELATE) - e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(c3897065.eqlimit) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e2:SetCode(3897065) - e2:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e2) - else Duel.SendtoGrave(tc,REASON_EFFECT) end - end -end -function c3897065.atcon(e) - return e:GetHandler():IsHasEffect(3897065) -end -function c3897065.atkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local atk=c:GetBaseAttack() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_BASE_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_DAMAGE) - e1:SetValue(atk/2) - c:RegisterEffect(e1) -end diff --git a/script/c38973775.lua b/script/c38973775.lua deleted file mode 100644 index 335fb1bc5c..0000000000 --- a/script/c38973775.lua +++ /dev/null @@ -1,33 +0,0 @@ ---フォトン・リザード -function c38973775.initial_effect(c) - --search - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(38973775,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1,38973775) - e1:SetCost(c38973775.cost) - e1:SetTarget(c38973775.target) - e1:SetOperation(c38973775.operation) - c:RegisterEffect(e1) -end -function c38973775.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end -function c38973775.filter(c) - return c:IsLevelBelow(4) and c:IsSetCard(0x55) and c:IsAbleToHand() -end -function c38973775.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c38973775.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c38973775.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c38973775.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c38975369.lua b/script/c38975369.lua deleted file mode 100644 index 3afb44ed89..0000000000 --- a/script/c38975369.lua +++ /dev/null @@ -1,86 +0,0 @@ ---軍荼利 -function c38975369.initial_effect(c) - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(aux.FALSE) - c:RegisterEffect(e1) - --summon,flip - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetCode(EVENT_SUMMON_SUCCESS) - e2:SetOperation(c38975369.retreg) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EVENT_FLIP) - c:RegisterEffect(e3) - --return to hand - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(38975369,0)) - e4:SetCategory(CATEGORY_TOHAND) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e4:SetCode(EVENT_BATTLE_START) - e4:SetCondition(c38975369.thcon) - e4:SetTarget(c38975369.thtg) - e4:SetOperation(c38975369.thop) - c:RegisterEffect(e4) -end -function c38975369.retreg(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - --to hand - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetDescription(aux.Stringid(38975369,0)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetReset(RESET_EVENT+0x1ee0000+RESET_PHASE+PHASE_END) - e1:SetCondition(c38975369.retcon) - e1:SetTarget(c38975369.rettg) - e1:SetOperation(c38975369.retop) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - c:RegisterEffect(e2) -end -function c38975369.retcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsHasEffect(EFFECT_SPIRIT_DONOT_RETURN) then return false end - if e:IsHasType(EFFECT_TYPE_TRIGGER_F) then - return not c:IsHasEffect(EFFECT_SPIRIT_MAYNOT_RETURN) - else return c:IsHasEffect(EFFECT_SPIRIT_MAYNOT_RETURN) end -end -function c38975369.rettg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0) -end -function c38975369.retop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - Duel.SendtoHand(c,nil,REASON_EFFECT) - end -end -function c38975369.thcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local bc=c:GetBattleTarget() - return bc and bc:IsFaceup() and bc:IsType(TYPE_SYNCHRO) -end -function c38975369.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local g=Group.FromCards(Duel.GetAttacker(),Duel.GetAttackTarget()) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0) -end -function c38975369.thop(e,tp,eg,ep,ev,re,r,rp) - local g=Group.CreateGroup() - local c=Duel.GetAttacker() - if c:IsRelateToBattle() then g:AddCard(c) end - c=Duel.GetAttackTarget() - if c~=nil and c:IsRelateToBattle() then g:AddCard(c) end - if g:GetCount()>0 then - Duel.SendtoHand(g, nil, REASON_EFFECT) - end -end diff --git a/script/c38981606.lua b/script/c38981606.lua deleted file mode 100644 index 2df4a41d1c..0000000000 --- a/script/c38981606.lua +++ /dev/null @@ -1,41 +0,0 @@ ---砂漠の守護者 -function c38981606.initial_effect(c) - --defup - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetCode(EFFECT_UPDATE_DEFENCE) - e1:SetRange(LOCATION_MZONE) - e1:SetValue(c38981606.val) - c:RegisterEffect(e1) - --destroy replace - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_DESTROY_REPLACE) - e2:SetRange(LOCATION_MZONE) - e2:SetTarget(c38981606.destg) - e2:SetValue(c38981606.value) - e2:SetOperation(c38981606.desop) - c:RegisterEffect(e2) -end -function c38981606.val(e,c) - return Duel.GetMatchingGroupCount(Card.IsType,0,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,TYPE_SPELL+TYPE_TRAP)*300 -end -function c38981606.dfilter(c,tp) - return c:IsLocation(LOCATION_MZONE) and c:IsFaceup() and c:IsRace(RACE_INSECT) - and not c:IsReason(REASON_REPLACE) and c:IsControler(tp) -end -function c38981606.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return not eg:IsContains(e:GetHandler()) - and eg:IsExists(c38981606.dfilter,1,nil,tp) end - if Duel.SelectYesNo(tp,aux.Stringid(38981606,0)) then - return true - else return false end -end -function c38981606.value(e,c) - return c:IsLocation(LOCATION_MZONE) and c:IsFaceup() and c:IsRace(RACE_INSECT) - and not c:IsReason(REASON_REPLACE) and c:IsControler(e:GetHandlerPlayer()) -end -function c38981606.desop(e,tp,eg,ep,ev,re,r,rp) - Duel.Destroy(e:GetHandler(),REASON_EFFECT+REASON_REPLACE) -end diff --git a/script/c38992735.lua b/script/c38992735.lua deleted file mode 100644 index 1d3a4d570e..0000000000 --- a/script/c38992735.lua +++ /dev/null @@ -1,55 +0,0 @@ ---波動キャノン -function c38992735.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c38992735.reset) - c:RegisterEffect(e1) - --damage - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(38992735,0)) - e2:SetCategory(CATEGORY_DAMAGE) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetRange(LOCATION_SZONE) - e2:SetCost(c38992735.cost) - e2:SetTarget(c38992735.tg) - e2:SetOperation(c38992735.op) - c:RegisterEffect(e2) - --turn - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e3:SetCode(EVENT_PHASE_START+PHASE_STANDBY) - e3:SetRange(LOCATION_SZONE) - e3:SetOperation(c38992735.turncount) - c:RegisterEffect(e3) -end -function c38992735.turncount(e,tp,eg,ep,ev,re,r,rp) - if tp~=Duel.GetTurnPlayer() then return end - local c=e:GetHandler() - local ct=c:GetTurnCounter() - ct=ct+1 - c:SetTurnCounter(ct) -end -function c38992735.reset(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - e:GetHandler():SetTurnCounter(0) -end -function c38992735.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end -function c38992735.tg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:GetTurnCounter()>0 end - local dam=c:GetTurnCounter()*1000 - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(dam) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,dam) -end -function c38992735.op(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c3900605.lua b/script/c3900605.lua deleted file mode 100644 index 555f0bf25b..0000000000 --- a/script/c3900605.lua +++ /dev/null @@ -1,50 +0,0 @@ ---アブソーブポッド -function c3900605.initial_effect(c) - --flip - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP) - e1:SetTarget(c3900605.target) - e1:SetOperation(c3900605.operation) - c:RegisterEffect(e1) -end -function c3900605.filter(c) - return c:IsFacedown() and c:IsDestructable() -end -function c3900605.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local g=Duel.GetMatchingGroup(c3900605.filter,tp,LOCATION_SZONE,LOCATION_SZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c3900605.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c3900605.filter,tp,LOCATION_SZONE,LOCATION_SZONE,nil) - Duel.Destroy(g,REASON_EFFECT) - local dg=Duel.GetOperatedGroup() - local ct1=dg:FilterCount(Card.IsControler,nil,tp) - local ct2=dg:GetCount()-ct1 - Duel.BreakEffect() - if ct1~=0 then Duel.Draw(tp,ct1,REASON_EFFECT) end - if ct2~=0 then Duel.Draw(1-tp,ct2,REASON_EFFECT) end - --cannot set - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_MSET) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetTargetRange(1,0) - e1:SetTarget(aux.TRUE) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) - local e2=e1:Clone() - e2:SetCode(EFFECT_CANNOT_SSET) - Duel.RegisterEffect(e2,tp) - local e3=e1:Clone() - e3:SetCode(EFFECT_CANNOT_TURN_SET) - Duel.RegisterEffect(e3,tp) - local e4=e1:Clone() - e4:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e4:SetTarget(c3900605.sumlimit) - Duel.RegisterEffect(e4,tp) -end -function c3900605.sumlimit(e,c,sump,sumtype,sumpos,targetp) - return bit.band(sumpos,POS_FACEDOWN)~=0 -end diff --git a/script/c39019325.lua b/script/c39019325.lua deleted file mode 100644 index 994bdc7502..0000000000 --- a/script/c39019325.lua +++ /dev/null @@ -1,40 +0,0 @@ ---玉砕指令 -function c39019325.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetHintTiming(0,TIMING_END_PHASE) - e1:SetTarget(c39019325.target) - e1:SetOperation(c39019325.activate) - c:RegisterEffect(e1) -end -function c39019325.rfilter(c,e) - local tpe=c:GetType() - return bit.band(tpe,TYPE_NORMAL)~=0 and bit.band(tpe,TYPE_TOKEN)==0 - and c:IsFaceup() and c:IsLevelBelow(2) and c:IsReleasable() and c:IsReleasableByEffect() and not c:IsImmuneToEffect(e) -end -function c39019325.dfilter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable() -end -function c39019325.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c39019325.rfilter(chkc,e) end - if chk==0 then return Duel.IsExistingTarget(c39019325.rfilter,tp,LOCATION_MZONE,0,1,nil,e) - and Duel.IsExistingMatchingCard(c39019325.dfilter,tp,0,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) - local rg=Duel.SelectTarget(tp,c39019325.rfilter,tp,LOCATION_MZONE,0,1,1,nil,e) - local g=Duel.GetMatchingGroup(c39019325.dfilter,tp,0,LOCATION_ONFIELD,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c39019325.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) and Duel.Release(tc,REASON_EFFECT)>0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local dg=Duel.SelectMatchingCard(tp,c39019325.dfilter,tp,0,LOCATION_ONFIELD,1,2,nil) - if dg:GetCount()>0 then - Duel.Destroy(dg,REASON_EFFECT) - end - end -end diff --git a/script/c39030163.lua b/script/c39030163.lua deleted file mode 100644 index c5156807a5..0000000000 --- a/script/c39030163.lua +++ /dev/null @@ -1,76 +0,0 @@ ---ギャラクシーアイズ FA・フォトン・ドラゴン -function c39030163.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,8,3,c39030163.ovfilter,aux.Stringid(39030163,0)) - c:EnableReviveLimit() - --material - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(39030163,1)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCountLimit(1) - e1:SetCost(c39030163.mtcost) - e1:SetTarget(c39030163.mttg) - e1:SetOperation(c39030163.mtop) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(39030163,2)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCountLimit(1) - e2:SetCost(c39030163.descost) - e2:SetTarget(c39030163.destg) - e2:SetOperation(c39030163.desop) - c:RegisterEffect(e2) -end -function c39030163.ovfilter(c) - return c:IsFaceup() and c:IsSetCard(0x107b) and c:IsType(TYPE_XYZ) and not c:IsCode(39030163) -end -function c39030163.mtcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) -end -function c39030163.mttg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local g=e:GetHandler():GetEquipGroup() - if chkc then return g:IsContains(chkc) and chkc:IsCanBeEffectTarget(e) end - if chk==0 then return g:IsExists(Card.IsCanBeEffectTarget,1,nil,e) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL) - local tg=g:FilterSelect(tp,Card.IsCanBeEffectTarget,1,2,nil,e) - Duel.SetTargetCard(tg) -end -function c39030163.mtfilter(c,e) - return c:IsRelateToEffect(e) and not c:IsImmuneToEffect(e) -end -function c39030163.mtop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) or c:IsFacedown() then return end - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(c39030163.mtfilter,nil,e) - if g:GetCount()>0 then - Duel.Overlay(c,g) - end -end -function c39030163.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) - Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) -end -function c39030163.desfilter(c) - return c:IsFaceup() and c:IsDestructable() -end -function c39030163.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and c39030163.desfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c39030163.desfilter,tp,0,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c39030163.desfilter,tp,0,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c39030163.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c39037517.lua b/script/c39037517.lua deleted file mode 100644 index 6a54a8f9ad..0000000000 --- a/script/c39037517.lua +++ /dev/null @@ -1,70 +0,0 @@ ---コアキメイル・ビートル -function c39037517.initial_effect(c) - --cost - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c39037517.mtcon) - e1:SetOperation(c39037517.mtop) - c:RegisterEffect(e1) - --poschange - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(39037517,3)) - e2:SetCategory(CATEGORY_POSITION) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetRange(LOCATION_MZONE) - e2:SetTarget(c39037517.target) - e2:SetOperation(c39037517.operation) - c:RegisterEffect(e2) -end -function c39037517.mtcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c39037517.cfilter1(c) - return c:IsCode(36623431) and c:IsAbleToGraveAsCost() -end -function c39037517.cfilter2(c) - return c:IsType(TYPE_MONSTER) and c:IsRace(RACE_INSECT) and not c:IsPublic() -end -function c39037517.mtop(e,tp,eg,ep,ev,re,r,rp) - local g1=Duel.GetMatchingGroup(c39037517.cfilter1,tp,LOCATION_HAND,0,nil) - local g2=Duel.GetMatchingGroup(c39037517.cfilter2,tp,LOCATION_HAND,0,nil) - local select=2 - if g1:GetCount()>0 and g2:GetCount()>0 then - select=Duel.SelectOption(tp,aux.Stringid(39037517,0),aux.Stringid(39037517,1),aux.Stringid(39037517,2)) - elseif g1:GetCount()>0 then - select=Duel.SelectOption(tp,aux.Stringid(39037517,0),aux.Stringid(39037517,2)) - if select==1 then select=2 end - elseif g2:GetCount()>0 then - select=Duel.SelectOption(tp,aux.Stringid(39037517,1),aux.Stringid(39037517,2)) - select=select+1 - end - if select==0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=g1:Select(tp,1,1,nil) - Duel.SendtoGrave(g,REASON_COST) - elseif select==1 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) - local g=g2:Select(tp,1,1,nil) - Duel.ConfirmCards(1-tp,g) - Duel.ShuffleHand(tp) - else - Duel.Destroy(e:GetHandler(),REASON_RULE) - end -end -function c39037517.filter(c,e) - return c:IsPosition(POS_FACEUP_ATTACK) and c:IsAttribute(ATTRIBUTE_LIGHT+ATTRIBUTE_DARK) - and (not e or c:IsRelateToEffect(e)) -end -function c39037517.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return eg:IsExists(c39037517.filter,1,nil) end - Duel.SetTargetCard(eg) -end -function c39037517.operation(e,tp,eg,ep,ev,re,r,rp) - local g=eg:Filter(c39037517.filter,nil,e) - Duel.ChangePosition(g,POS_FACEUP_DEFENCE) -end diff --git a/script/c39091951.lua b/script/c39091951.lua deleted file mode 100644 index ad2182a0e8..0000000000 --- a/script/c39091951.lua +++ /dev/null @@ -1,37 +0,0 @@ ---パンダボーグ -function c39091951.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(39091951,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetCondition(c39091951.condition) - e1:SetCost(c39091951.cost) - e1:SetTarget(c39091951.target) - e1:SetOperation(c39091951.operation) - c:RegisterEffect(e1) -end -function c39091951.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) -end -function c39091951.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,800) end - Duel.PayLPCost(tp,800) -end -function c39091951.filter(c,e,tp) - return c:GetLevel()==4 and c:IsRace(RACE_PSYCHO) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c39091951.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c39091951.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c39091951.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c39091951.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c39118197.lua b/script/c39118197.lua deleted file mode 100644 index 5692bd69e6..0000000000 --- a/script/c39118197.lua +++ /dev/null @@ -1,64 +0,0 @@ ---カラクリ武者 六参壱八 -function c39118197.initial_effect(c) - --must attack - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_MUST_ATTACK) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_CANNOT_EP) - e2:SetRange(LOCATION_MZONE) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetTargetRange(1,0) - e2:SetCondition(c39118197.becon) - c:RegisterEffect(e2) - --to defence - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(39118197,0)) - e3:SetCategory(CATEGORY_POSITION) - e3:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_SINGLE) - e3:SetCode(EVENT_BE_BATTLE_TARGET) - e3:SetCondition(c39118197.poscon) - e3:SetOperation(c39118197.posop) - c:RegisterEffect(e3) - --atkup - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(39118197,1)) - e4:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_FIELD) - e4:SetRange(LOCATION_MZONE) - e4:SetCategory(CATEGORY_ATKCHANGE) - e4:SetCode(EVENT_DESTROYED) - e4:SetCondition(c39118197.atkcon) - e4:SetOperation(c39118197.atkop) - c:RegisterEffect(e4) -end -function c39118197.becon(e) - return e:GetHandler():IsAttackable() -end -function c39118197.poscon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsAttackPos() -end -function c39118197.posop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFaceup() and c:IsRelateToEffect(e) then - Duel.ChangePosition(c,POS_FACEUP_DEFENCE) - end -end -function c39118197.filter(c) - return c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousSetCard(0x11) -end -function c39118197.atkcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c39118197.filter,1,nil) -end -function c39118197.atkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+0x1ff0000) - e1:SetValue(400) - c:RegisterEffect(e1) - end -end diff --git a/script/c39122311.lua b/script/c39122311.lua deleted file mode 100644 index 4bac6f7d05..0000000000 --- a/script/c39122311.lua +++ /dev/null @@ -1,84 +0,0 @@ ---竜魂の幻泉 -function c39122311.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_END_PHASE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c39122311.target) - e1:SetOperation(c39122311.operation) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetCode(EVENT_LEAVE_FIELD_P) - e2:SetOperation(c39122311.checkop) - c:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE) - e3:SetCode(EVENT_LEAVE_FIELD) - e3:SetOperation(c39122311.desop) - e3:SetLabelObject(e2) - c:RegisterEffect(e3) - --destroy2 - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e4:SetRange(LOCATION_SZONE) - e4:SetCode(EVENT_LEAVE_FIELD) - e4:SetCondition(c39122311.descon2) - e4:SetOperation(c39122311.desop2) - c:RegisterEffect(e4) -end -function c39122311.filter(c,e,tp) - return c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c39122311.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c39122311.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c39122311.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c39122311.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c39122311.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) - and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP_DEFENCE) then - c:SetCardTarget(tc) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CHANGE_RACE) - e1:SetProperty(EFFECT_FLAG_OWNER_RELATE) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(RACE_WYRM) - e1:SetCondition(c39122311.rcon) - tc:RegisterEffect(e1) - Duel.SpecialSummonComplete() - end -end -function c39122311.rcon(e) - return e:GetOwner():IsHasCardTarget(e:GetHandler()) -end -function c39122311.checkop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsDisabled() then - e:SetLabel(1) - else e:SetLabel(0) end -end -function c39122311.desop(e,tp,eg,ep,ev,re,r,rp) - if e:GetLabelObject():GetLabel()~=0 then return end - local tc=e:GetHandler():GetFirstCardTarget() - if tc and tc:IsLocation(LOCATION_MZONE) then - Duel.Destroy(tc,REASON_EFFECT) - end -end -function c39122311.descon2(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetHandler():GetFirstCardTarget() - return tc and eg:IsContains(tc) -end -function c39122311.desop2(e,tp,eg,ep,ev,re,r,rp) - Duel.Destroy(e:GetHandler(),REASON_EFFECT) -end diff --git a/script/c39131963.lua b/script/c39131963.lua deleted file mode 100644 index 29572c1e62..0000000000 --- a/script/c39131963.lua +++ /dev/null @@ -1,33 +0,0 @@ ---デスカウンター -function c39131963.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(39131963,0)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetRange(LOCATION_SZONE) - e2:SetCode(EVENT_BATTLE_DAMAGE) - e2:SetCondition(c39131963.condition) - e2:SetTarget(c39131963.target) - e2:SetOperation(c39131963.operation) - c:RegisterEffect(e2) -end -function c39131963.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetAttackTarget()==nil -end -function c39131963.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetCard(eg) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) -end -function c39131963.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=eg:GetFirst() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c39139935.lua b/script/c39139935.lua deleted file mode 100644 index 2264abe514..0000000000 --- a/script/c39139935.lua +++ /dev/null @@ -1,56 +0,0 @@ ---No.33 先史遺産-超兵器マシュ=マック -function c39139935.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,5,2) - c:EnableReviveLimit() - --attack up - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DAMAGE+CATEGORY_ATKCHANGE) - e1:SetDescription(aux.Stringid(39139935,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c39139935.cost) - e1:SetTarget(c39139935.target) - e1:SetOperation(c39139935.operation) - c:RegisterEffect(e1) -end -c39139935.xyz_number=33 -function c39139935.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c39139935.filter(c) - return c:IsFaceup() and c:GetAttack()~=c:GetBaseAttack() -end -function c39139935.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c39139935.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c39139935.filter,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - local g=Duel.SelectTarget(tp,c39139935.filter,tp,0,LOCATION_MZONE,1,1,nil) - local tc=g:GetFirst() - local atk=tc:GetAttack() - local batk=tc:GetBaseAttack() - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,(batk>atk) and (batk-atk) or (atk-batk)) -end -function c39139935.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - local atk=tc:GetAttack() - local batk=tc:GetBaseAttack() - if batk~=atk then - local dif=(batk>atk) and (batk-atk) or (atk-batk) - local dam=Duel.Damage(1-tp,dif,REASON_EFFECT) - if dam>0 and c:IsRelateToEffect(e) and c:IsFaceup() then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(dif) - e1:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e1) - end - end - end -end diff --git a/script/c39153655.lua b/script/c39153655.lua deleted file mode 100644 index e593e00d2f..0000000000 --- a/script/c39153655.lua +++ /dev/null @@ -1,86 +0,0 @@ ---DDケルベロス -function c39153655.initial_effect(c) - --pendulum summon - aux.AddPendulumProcedure(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --atk/def - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(39153655,0)) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetRange(LOCATION_PZONE) - e2:SetCountLimit(1) - e2:SetTarget(c39153655.atktg) - e2:SetOperation(c39153655.atkop) - c:RegisterEffect(e2) - --tohand - local e3=Effect.CreateEffect(c) - e3:SetCategory(CATEGORY_TOHAND) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetCondition(c39153655.thcon) - e3:SetTarget(c39153655.thtg) - e3:SetOperation(c39153655.thop) - c:RegisterEffect(e3) -end -function c39153655.filter(c) - local lv=c:GetLevel() - return c:IsFaceup() and c:IsSetCard(0xaf) and lv>0 and lv~=4 -end -function c39153655.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c39153655.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c39153655.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c39153655.filter,tp,LOCATION_MZONE,0,1,1,nil) -end -function c39153655.atkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) then return end - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) and tc:GetLevel()~=4 then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_CHANGE_LEVEL) - e1:SetValue(4) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(400) - tc:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EFFECT_UPDATE_DEFENCE) - tc:RegisterEffect(e3) - end -end -function c39153655.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0xaf) and not c:IsCode(39153655) -end -function c39153655.thcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:GetSummonType()==SUMMON_TYPE_PENDULUM and c:IsPreviousLocation(LOCATION_HAND) - and Duel.IsExistingMatchingCard(c39153655.cfilter,tp,LOCATION_MZONE,0,1,nil) -end -function c39153655.thfilter(c) - return c:GetType()==TYPE_SPELL+TYPE_CONTINUOUS and c:IsAbleToHand() -end -function c39153655.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c39153655.thfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c39153655.thfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c39153655.thfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c39153655.thop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end diff --git a/script/c39163598.lua b/script/c39163598.lua deleted file mode 100644 index 0eafad8aaf..0000000000 --- a/script/c39163598.lua +++ /dev/null @@ -1,57 +0,0 @@ ---惑星汚染ウイルス -function c39163598.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,0x1e1) - e1:SetCost(c39163598.cost) - e1:SetTarget(c39163598.target) - e1:SetOperation(c39163598.activate) - c:RegisterEffect(e1) -end -function c39163598.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsSetCard,1,nil,0xc) end - local g=Duel.SelectReleaseGroup(tp,Card.IsSetCard,1,1,nil,0xc) - Duel.Release(g,REASON_COST) -end -function c39163598.tgfilter(c) - return c:IsFaceup() and c:GetCounter(0xe)==0 and c:IsDestructable() -end -function c39163598.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local g=Duel.GetMatchingGroup(c39163598.tgfilter,tp,0,LOCATION_MZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c39163598.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c39163598.tgfilter,tp,0,LOCATION_MZONE,nil) - Duel.Destroy(g,REASON_EFFECT) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetOperation(c39163598.ctop1) - e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN,3) - Duel.RegisterEffect(e1,tp) - local e2=e1:Clone() - e2:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - Duel.RegisterEffect(e2,tp) - local e3=e1:Clone() - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - e3:SetOperation(c39163598.ctop2) - Duel.RegisterEffect(e3,tp) -end -function c39163598.ctop1(e,tp,eg,ep,ev,re,r,rp) - if ep~=tp then - eg:GetFirst():AddCounter(0xe,1) - end -end -function c39163598.ctop2(e,tp,eg,ep,ev,re,r,rp) - local tc=eg:GetFirst() - while tc do - if tc:IsFaceup() and tc:GetSummonPlayer()~=tp then - tc:AddCounter(0xe,1) - end - tc=eg:GetNext() - end -end diff --git a/script/c39168895.lua b/script/c39168895.lua deleted file mode 100644 index 785e971e1a..0000000000 --- a/script/c39168895.lua +++ /dev/null @@ -1,30 +0,0 @@ ---怒れる類人猿 -function c39168895.initial_effect(c) - --must attack - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_MUST_ATTACK) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_CANNOT_EP) - e2:SetRange(LOCATION_MZONE) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetTargetRange(1,0) - e2:SetCondition(c39168895.becon) - c:RegisterEffect(e2) - --destroy - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e3:SetRange(LOCATION_MZONE) - e3:SetCode(EFFECT_SELF_DESTROY) - e3:SetCondition(c39168895.descon) - c:RegisterEffect(e3) -end -function c39168895.becon(e) - return e:GetHandler():IsAttackable() -end -function c39168895.descon(e) - return e:GetHandler():IsDefencePos() -end diff --git a/script/c39180960.lua b/script/c39180960.lua deleted file mode 100644 index d0923efdd5..0000000000 --- a/script/c39180960.lua +++ /dev/null @@ -1,47 +0,0 @@ ---リグラス・リーパー -function c39180960.initial_effect(c) - --flip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(39180960,0)) - e1:SetCategory(CATEGORY_HANDES) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP) - e1:SetTarget(c39180960.target) - e1:SetOperation(c39180960.operation) - c:RegisterEffect(e1) - --destroyed - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(39180960,1)) - e2:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_BATTLE_DESTROYED) - e2:SetOperation(c39180960.desop) - c:RegisterEffect(e2) -end -function c39180960.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,PLAYER_ALL,1) -end -function c39180960.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) - local g1=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_HAND,0,1,1,nil) - Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_DISCARD) - local g2=Duel.SelectMatchingCard(1-tp,aux.TRUE,1-tp,LOCATION_HAND,0,1,1,nil) - g1:Merge(g2) - Duel.SendtoGrave(g1,REASON_DISCARD+REASON_EFFECT) -end -function c39180960.desop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetAttacker() - if c==tc then tc=Duel.GetAttackTarget() end - if not tc:IsRelateToBattle() then return end - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(-500) - tc:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_UPDATE_DEFENCE) - tc:RegisterEffect(e2) -end diff --git a/script/c3918345.lua b/script/c3918345.lua deleted file mode 100644 index 04d8065883..0000000000 --- a/script/c3918345.lua +++ /dev/null @@ -1,11 +0,0 @@ ---マジック・スライム -function c3918345.initial_effect(c) - aux.EnableDualAttribute(c) - --reflect battle dam - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_REFLECT_BATTLE_DAMAGE) - e1:SetCondition(aux.IsDualState) - e1:SetValue(1) - c:RegisterEffect(e1) -end diff --git a/script/c39188539.lua b/script/c39188539.lua deleted file mode 100644 index ad934e29d6..0000000000 --- a/script/c39188539.lua +++ /dev/null @@ -1,68 +0,0 @@ ---ストーム・シューター -function c39188539.initial_effect(c) - --move - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(39188539,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE) - e1:SetCondition(c39188539.seqcon) - e1:SetCost(c39188539.cost) - e1:SetOperation(c39188539.seqop) - c:RegisterEffect(e1) - -- - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(39188539,1)) - e2:SetCategory(CATEGORY_TOHAND) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE) - e2:SetCost(c39188539.cost) - e2:SetTarget(c39188539.thtg) - e2:SetOperation(c39188539.thop) - c:RegisterEffect(e2) -end -function c39188539.seqcon(e,tp,eg,ep,ev,re,r,rp) - local seq=e:GetHandler():GetSequence() - return (seq>0 and Duel.CheckLocation(tp,LOCATION_MZONE,seq-1)) - or (seq<4 and Duel.CheckLocation(tp,LOCATION_MZONE,seq+1)) -end -function c39188539.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) -end -function c39188539.seqop(e,tp,eg,ep,ev,re,r,rp) - local seq=e:GetHandler():GetSequence() - if (seq>0 and Duel.CheckLocation(tp,LOCATION_MZONE,seq-1)) - or (seq<4 and Duel.CheckLocation(tp,LOCATION_MZONE,seq+1)) then - local flag=0 - if seq>0 and Duel.CheckLocation(tp,LOCATION_MZONE,seq-1) then flag=bit.bor(flag,bit.lshift(0x1,seq-1)) end - if seq<4 and Duel.CheckLocation(tp,LOCATION_MZONE,seq+1) then flag=bit.bor(flag,bit.lshift(0x1,seq+1)) end - flag=bit.bxor(flag,0xff) - local s=Duel.SelectDisableField(tp,1,LOCATION_MZONE,0,flag) - local nseq=0 - if s==1 then nseq=0 - elseif s==2 then nseq=1 - elseif s==4 then nseq=2 - elseif s==8 then nseq=3 - else nseq=4 end - Duel.MoveSequence(e:GetHandler(),nseq) - end -end -function c39188539.filter(c,seq) - return c:GetSequence()==seq and c:IsAbleToHand() -end -function c39188539.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and c39188539.filter(chkc,4-e:GetHandler():GetSequence()) end - if chk==0 then return Duel.IsExistingTarget(c39188539.filter,tp,0,LOCATION_ONFIELD,1,nil,4-e:GetHandler():GetSequence()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g=Duel.SelectTarget(tp,c39188539.filter,tp,0,LOCATION_ONFIELD,1,1,nil,4-e:GetHandler():GetSequence()) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c39188539.thop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - end -end diff --git a/script/c39191307.lua b/script/c39191307.lua deleted file mode 100644 index 9b34a60acb..0000000000 --- a/script/c39191307.lua +++ /dev/null @@ -1,33 +0,0 @@ ---仮面竜 -function c39191307.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(39191307,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetCondition(c39191307.condition) - e1:SetTarget(c39191307.target) - e1:SetOperation(c39191307.operation) - c:RegisterEffect(e1) -end -function c39191307.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) -end -function c39191307.filter(c,e,tp) - return c:IsAttackBelow(1500) and c:IsRace(RACE_DRAGON) - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c39191307.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c39191307.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c39191307.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c39191307.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c39229392.lua b/script/c39229392.lua deleted file mode 100644 index aa77d4a1dd..0000000000 --- a/script/c39229392.lua +++ /dev/null @@ -1,66 +0,0 @@ ---オーバーレイ・スナイパー -function c39229392.initial_effect(c) - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - c:RegisterEffect(e1) - --to defence - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(39229392,0)) - e2:SetCategory(CATEGORY_POSITION) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_SUMMON_SUCCESS) - e2:SetTarget(c39229392.potg) - e2:SetOperation(c39229392.poop) - c:RegisterEffect(e2) - --atkdown - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(39229392,1)) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_GRAVE) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetCondition(c39229392.atkcon) - e3:SetCost(c39229392.atkcost) - e3:SetTarget(c39229392.atktg) - e3:SetOperation(c39229392.atkop) - c:RegisterEffect(e3) -end -function c39229392.potg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAttackPos() end - Duel.SetOperationInfo(0,CATEGORY_POSITION,e:GetHandler(),1,0,0) -end -function c39229392.poop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsPosition(POS_FACEUP_ATTACK) and c:IsRelateToEffect(e) then - Duel.ChangePosition(c,POS_FACEUP_DEFENCE) - end -end -function c39229392.filter(c) - return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:GetOverlayCount()>0 -end -function c39229392.atkcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c39229392.filter,tp,LOCATION_MZONE,0,1,nil) -end -function c39229392.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) -end -function c39229392.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil) -end -function c39229392.atkop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(Duel.GetOverlayCount(tp,1,0)*-500) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - end -end diff --git a/script/c39246582.lua b/script/c39246582.lua deleted file mode 100644 index 8e4d235976..0000000000 --- a/script/c39246582.lua +++ /dev/null @@ -1,37 +0,0 @@ ---ファーニマル・ドッグ -function c39246582.initial_effect(c) - --search - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(39246582,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e1:SetCountLimit(1,39246582) - e1:SetCondition(c39246582.thcon) - e1:SetTarget(c39246582.thtg) - e1:SetOperation(c39246582.thop) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e2) -end -function c39246582.thcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_HAND) -end -function c39246582.filter(c) - return (c:IsCode(30068120) or (c:IsSetCard(0xa9) and c:IsType(TYPE_MONSTER) and not c:IsCode(39246582))) - and c:IsAbleToHand() -end -function c39246582.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c39246582.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c39246582.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c39246582.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c39260991.lua b/script/c39260991.lua deleted file mode 100644 index 2ebf04be72..0000000000 --- a/script/c39260991.lua +++ /dev/null @@ -1,27 +0,0 @@ ---アクアアクトレス・テトラ -function c39260991.initial_effect(c) - --to hand - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetTarget(c39260991.thtg) - e1:SetOperation(c39260991.thop) - c:RegisterEffect(e1) -end -function c39260991.filter(c) - return c:IsSetCard(0xce) and c:IsAbleToHand() -end -function c39260991.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c39260991.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c39260991.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c39260991.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c39261576.lua b/script/c39261576.lua deleted file mode 100644 index d35b1d649c..0000000000 --- a/script/c39261576.lua +++ /dev/null @@ -1,111 +0,0 @@ ---パーティカル・フュージョン -function c39261576.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c39261576.target) - e1:SetOperation(c39261576.activate) - c:RegisterEffect(e1) - --atk up - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_ATKCHANGE) - e2:SetDescription(aux.Stringid(39261576,0)) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCode(39261576) - e2:SetCost(c39261576.atkcost) - e2:SetTarget(c39261576.atktg) - e2:SetOperation(c39261576.atkop) - e2:SetLabelObject(e1) - c:RegisterEffect(e2) -end -function c39261576.filter1(c,e) - return c:IsCanBeFusionMaterial() and not c:IsImmuneToEffect(e) -end -function c39261576.filter2(c,e,tp,m,f,chkf) - return c:IsType(TYPE_FUSION) and c:IsSetCard(0x1047) and (not f or f(c)) - and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf) -end -function c39261576.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp - local mg1=Duel.GetMatchingGroup(Card.IsCanBeFusionMaterial,tp,LOCATION_MZONE,0,nil) - local res=Duel.IsExistingMatchingCard(c39261576.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf) - if not res then - local ce=Duel.GetChainMaterial(tp) - if ce~=nil then - local fgroup=ce:GetTarget() - local mg2=fgroup(ce,e,tp) - local mf=ce:GetValue() - res=Duel.IsExistingMatchingCard(c39261576.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,chkf) - end - end - return res - end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function c39261576.activate(e,tp,eg,ep,ev,re,r,rp) - local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp - local mg1=Duel.GetMatchingGroup(c39261576.filter1,tp,LOCATION_MZONE,0,nil,e) - local sg1=Duel.GetMatchingGroup(c39261576.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf) - local mg2=nil - local sg2=nil - local ce=Duel.GetChainMaterial(tp) - if ce~=nil then - local fgroup=ce:GetTarget() - mg2=fgroup(ce,e,tp) - local mf=ce:GetValue() - sg2=Duel.GetMatchingGroup(c39261576.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,mf,chkf) - end - if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then - local sg=sg1:Clone() - if sg2 then sg:Merge(sg2) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local tg=sg:Select(tp,1,1,nil) - local tc=tg:GetFirst() - if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then - local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf) - tc:SetMaterial(mat1) - Duel.SendtoGrave(mat1,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION) - Duel.BreakEffect() - Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP) - e:SetLabelObject(tc) - Duel.RaiseSingleEvent(e:GetHandler(),39261576,e,0,tp,tp,0) - else - local mat2=Duel.SelectFusionMaterial(tp,tc,mg2,nil,chkf) - local fop=ce:GetOperation() - fop(ce,e,tp,tc,mat2) - e:SetLabelObject(tc) - Duel.RaiseSingleEvent(e:GetHandler(),39261576,e,0,tp,tp,0) - end - tc:CompleteProcedure() - end -end -function c39261576.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsAbleToRemove() end - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) -end -function c39261576.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local tc=e:GetLabelObject():GetLabelObject() - local mat=tc:GetMaterial() - if chkc then return chkc:IsSetCard(0x1047) and mat:IsContains(chkc) end - if chk==0 then return mat:IsExists(Card.IsSetCard,1,nil,0x1047) end - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(39261576,1)) - local g=mat:FilterSelect(tp,Card.IsSetCard,1,1,nil,0x1047) - tc:CreateEffectRelation(e) - Duel.SetTargetCard(g) -end -function c39261576.atkop(e,tp,eg,ep,ev,re,r,rp,chk) - local sc=e:GetLabelObject():GetLabelObject() - if not sc:IsRelateToEffect(e) or sc:IsFacedown() then return end - local tc=Duel.GetFirstTarget() - if not tc:IsRelateToEffect(e) then return end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(tc:GetAttack()) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - sc:RegisterEffect(e1) -end diff --git a/script/c39272762.lua b/script/c39272762.lua deleted file mode 100644 index 8730f51174..0000000000 --- a/script/c39272762.lua +++ /dev/null @@ -1,96 +0,0 @@ ---超銀河眼の光子龍 -function c39272762.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,8,3) - c:EnableReviveLimit() - --negate - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(39272762,0)) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(c39272762.negcon) - e1:SetOperation(c39272762.negop) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_MATERIAL_CHECK) - e2:SetValue(c39272762.valcheck) - e2:SetLabelObject(e1) - c:RegisterEffect(e2) - --attack up - local e3=Effect.CreateEffect(c) - e3:SetCategory(CATEGORY_ATKCHANGE) - e3:SetDescription(aux.Stringid(39272762,1)) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetCountLimit(1) - e3:SetRange(LOCATION_MZONE) - e3:SetCost(c39272762.atcost) - e3:SetTarget(c39272762.attg) - e3:SetOperation(c39272762.atop) - c:RegisterEffect(e3) -end -function c39272762.valcheck(e,c) - local g=c:GetMaterial() - if g:IsExists(Card.IsCode,1,nil,93717133) then - e:GetLabelObject():SetLabel(1) - else - e:GetLabelObject():SetLabel(0) - end -end -function c39272762.negcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_XYZ and e:GetLabel()==1 -end -function c39272762.negop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,c) - local tc=g:GetFirst() - while tc do - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e2) - if tc:IsType(TYPE_TRAPMONSTER) then - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_DISABLE_TRAPMONSTER) - e3:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e3) - end - tc=g:GetNext() - end -end -function c39272762.atcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c39272762.attg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetOverlayCount(tp,0,1)~=0 end -end -function c39272762.atop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local g=Duel.GetOverlayGroup(tp,0,1) - if c:IsFacedown() or not c:IsRelateToEffect(e) then return end - if g:GetCount()~=0 then - Duel.SendtoGrave(g,REASON_EFFECT) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(g:GetCount()*500) - e1:SetReset(RESET_EVENT+0x1ff0000+RESET_PHASE+PHASE_END) - c:RegisterEffect(e1) - end - Duel.BreakEffect() - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetCode(EFFECT_EXTRA_ATTACK) - e2:SetValue(g:GetCount()-1) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - c:RegisterEffect(e2) -end diff --git a/script/c39276790.lua b/script/c39276790.lua deleted file mode 100644 index f879b544b6..0000000000 --- a/script/c39276790.lua +++ /dev/null @@ -1,31 +0,0 @@ ---真剣勝負 -function c39276790.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_CHAINING) - e1:SetCondition(c39276790.condition) - e1:SetTarget(c39276790.target) - e1:SetOperation(c39276790.activate) - c:RegisterEffect(e1) -end -function c39276790.condition(e,tp,eg,ep,ev,re,r,rp) - local ph=Duel.GetCurrentPhase() - return (ph==PHASE_DAMAGE or ph==PHASE_DAMAGE_CAL) - and (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE)) - and Duel.IsChainNegatable(ev) -end -function c39276790.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) - end -end -function c39276790.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateActivation(ev) - if re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(eg,REASON_EFFECT) - end -end diff --git a/script/c39284521.lua b/script/c39284521.lua deleted file mode 100644 index e17e8c87c3..0000000000 --- a/script/c39284521.lua +++ /dev/null @@ -1,32 +0,0 @@ ---マシンナーズ・カノン -function c39284521.initial_effect(c) - c:EnableReviveLimit() - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c39284521.spcon) - e1:SetOperation(c39284521.spop) - c:RegisterEffect(e1) -end -function c39284521.spfilter(c) - return c:IsRace(RACE_MACHINE) and c:IsAbleToGraveAsCost() -end -function c39284521.spcon(e,c) - if c==nil then return true end - return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c39284521.spfilter,c:GetControler(),LOCATION_HAND,0,1,c) -end -function c39284521.spop(e,tp,eg,ep,ev,re,r,rp,c) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c39284521.spfilter,c:GetControler(),LOCATION_HAND,0,1,63,c) - Duel.SendtoGrave(g,REASON_COST) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(g:GetCount()*800) - e1:SetReset(RESET_EVENT+0xff0000) - c:RegisterEffect(e1) -end diff --git a/script/c39303359.lua b/script/c39303359.lua deleted file mode 100644 index 30ea2600b5..0000000000 --- a/script/c39303359.lua +++ /dev/null @@ -1,24 +0,0 @@ ---古代の機械騎士 -function c39303359.initial_effect(c) - aux.EnableDualAttribute(c) - --actlimit - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetCondition(aux.IsDualState) - e1:SetOperation(c39303359.atkop) - c:RegisterEffect(e1) -end -function c39303359.atkop(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EFFECT_CANNOT_ACTIVATE) - e1:SetTargetRange(0,1) - e1:SetValue(c39303359.aclimit) - e1:SetReset(RESET_PHASE+PHASE_DAMAGE) - Duel.RegisterEffect(e1,tp) -end -function c39303359.aclimit(e,re,tp) - return re:IsHasType(EFFECT_TYPE_ACTIVATE) -end diff --git a/script/c39343610.lua b/script/c39343610.lua deleted file mode 100644 index abdd0cdc94..0000000000 --- a/script/c39343610.lua +++ /dev/null @@ -1,62 +0,0 @@ ---ダークブレイズドラゴン -function c39343610.initial_effect(c) - --atkup - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(39343610,0)) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(c39343610.atkcon) - e1:SetOperation(c39343610.atkop) - c:RegisterEffect(e1) - --damage - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(39343610,1)) - e2:SetCategory(CATEGORY_DAMAGE) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetCode(EVENT_BATTLE_DESTROYING) - e2:SetCondition(c39343610.damcon) - e2:SetTarget(c39343610.damtg) - e2:SetOperation(c39343610.damop) - c:RegisterEffect(e2) -end -function c39343610.atkcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_GRAVE) -end -function c39343610.atkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFaceup() and c:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetValue(c:GetBaseAttack()*2) - e1:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_SET_DEFENCE_FINAL) - e2:SetValue(c:GetBaseDefence()*2) - e2:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e2) - end -end -function c39343610.damcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local bc=c:GetBattleTarget() - return c:IsRelateToBattle() and bc:IsLocation(LOCATION_GRAVE) and bc:IsType(TYPE_MONSTER) -end -function c39343610.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local c=e:GetHandler() - local bc=c:GetBattleTarget() - local dam=bc:GetAttack() - if dam<0 then dam=0 end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(dam) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,dam) -end -function c39343610.damop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c39357122.lua b/script/c39357122.lua deleted file mode 100644 index c1a1b9243d..0000000000 --- a/script/c39357122.lua +++ /dev/null @@ -1,30 +0,0 @@ ---真紅眼の凶雷皇-エビル・デーモン -function c39357122.initial_effect(c) - aux.EnableDualAttribute(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCondition(aux.IsDualState) - e1:SetTarget(c39357122.destg) - e1:SetOperation(c39357122.desop) - c:RegisterEffect(e1) -end -function c39357122.filter(c,atk) - return c:IsFaceup() and c:GetDefence()0 - and Duel.IsExistingTarget(c39387565.spfilter1,tp,LOCATION_GRAVE,0,1,nil,e,tp) - and Duel.GetFlagEffect(tp,39387565)==0 end - Duel.RegisterFlagEffect(tp,39387565,RESET_PHASE+RESET_END,0,1) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c39387565.spfilter1,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c39387565.spop1(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end -function c39387565.spcon2(e,tp,eg,ep,ev,re,r,rp) - return bit.band(r,REASON_DESTROY+REASON_EFFECT)==REASON_DESTROY+REASON_EFFECT and rp==1-tp -end -function c39387565.spfilter2(c,e,tp) - return c:IsSetCard(0x3b) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c39387565.sptg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c39387565.spfilter2(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c39387565.spfilter2,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c39387565.spfilter2,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c39387565.spop2(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c39389320.lua b/script/c39389320.lua deleted file mode 100644 index c098f2bb70..0000000000 --- a/script/c39389320.lua +++ /dev/null @@ -1,33 +0,0 @@ ---バーバリアン・キング -function c39389320.initial_effect(c) - --multi attack - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(39389320,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCondition(c39389320.condition) - e1:SetCost(c39389320.cost) - e1:SetOperation(c39389320.operation) - c:RegisterEffect(e1) -end -function c39389320.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsAbleToEnterBP() -end -function c39389320.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsRace,1,e:GetHandler(),RACE_WARRIOR) end - local g=Duel.SelectReleaseGroup(tp,Card.IsRace,1,10,e:GetHandler(),RACE_WARRIOR) - local ct=Duel.Release(g,REASON_COST) - e:SetLabel(ct) -end -function c39389320.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_EXTRA_ATTACK) - e1:SetValue(e:GetLabel()) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - c:RegisterEffect(e1) - end -end diff --git a/script/c39399168.lua b/script/c39399168.lua deleted file mode 100644 index 81bc02ae2a..0000000000 --- a/script/c39399168.lua +++ /dev/null @@ -1,4 +0,0 @@ ---チャクラの復活 -function c39399168.initial_effect(c) - aux.AddRitualProcGreater(c,aux.FilterBoolFunction(Card.IsCode,65393205)) -end diff --git a/script/c39402797.lua b/script/c39402797.lua deleted file mode 100644 index e46e3141c7..0000000000 --- a/script/c39402797.lua +++ /dev/null @@ -1,48 +0,0 @@ ---トライデント・ドラギオン -function c39402797.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsRace,RACE_DRAGON),aux.NonTuner(Card.IsRace,RACE_DRAGON),1) - c:EnableReviveLimit() - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(aux.synlimit) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(39402797,0)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetCondition(c39402797.descon) - e2:SetTarget(c39402797.destg) - e2:SetOperation(c39402797.desop) - c:RegisterEffect(e2) -end -function c39402797.descon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_SYNCHRO -end -function c39402797.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsControler(tp) and chkc:IsDestructable() end - if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,LOCATION_ONFIELD,0,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,LOCATION_ONFIELD,0,1,2,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c39402797.desop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) - local c=e:GetHandler() - local ct=Duel.Destroy(g,REASON_EFFECT) - if ct>0 and c:IsRelateToEffect(e) and c:IsFaceup() then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_EXTRA_ATTACK) - e1:SetValue(ct) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - c:RegisterEffect(e1) - end -end diff --git a/script/c39432962.lua b/script/c39432962.lua deleted file mode 100644 index 1d0d3ec35d..0000000000 --- a/script/c39432962.lua +++ /dev/null @@ -1,40 +0,0 @@ ---ドドドウィッチ -function c39432962.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(39432962,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c39432962.sptg) - e1:SetOperation(c39432962.spop) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e2) -end -function c39432962.filter(c,e,tp) - return c:IsSetCard(0x82) and c:GetCode()~=39432962 - and (c:IsCanBeSpecialSummoned(e,0,tp,false,false) or c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN)) -end -function c39432962.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c39432962.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c39432962.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c39432962.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - local tc=g:GetFirst() - if tc then - local spos=0 - if tc:IsCanBeSpecialSummoned(e,0,tp,false,false) then spos=spos+POS_FACEUP_ATTACK end - if tc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN) then spos=spos+POS_FACEDOWN_DEFENCE end - Duel.SpecialSummon(tc,0,tp,tp,false,false,spos) - if tc:IsFacedown() then - Duel.ConfirmCards(1-tp,tc) - end - end -end diff --git a/script/c39439590.lua b/script/c39439590.lua deleted file mode 100644 index 9a06fbcb86..0000000000 --- a/script/c39439590.lua +++ /dev/null @@ -1,31 +0,0 @@ ---サイバー・ダイナソー -function c39439590.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(39439590,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetRange(LOCATION_HAND) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(c39439590.spcon) - e1:SetTarget(c39439590.sptg) - e1:SetOperation(c39439590.spop) - c:RegisterEffect(e1) -end -function c39439590.cfilter(c,tp) - return c:GetSummonPlayer()==1-tp and c:IsPreviousLocation(LOCATION_HAND) -end -function c39439590.spcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c39439590.cfilter,1,nil,tp) -end -function c39439590.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c39439590.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c39440937.lua b/script/c39440937.lua deleted file mode 100644 index d9f7f1b7c6..0000000000 --- a/script/c39440937.lua +++ /dev/null @@ -1,43 +0,0 @@ ---妨害電波 -function c39440937.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_POSITION) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c39440937.target) - e1:SetOperation(c39440937.activate) - c:RegisterEffect(e1) -end -function c39440937.filter(c) - return c:IsPosition(POS_FACEUP_ATTACK) and c:IsType(TYPE_SYNCHRO) -end -function c39440937.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c39440937.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - local g=Duel.GetMatchingGroup(c39440937.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_POSITION,g,g:GetCount(),0,0) -end -function c39440937.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c39440937.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - if g:GetCount()>0 then - Duel.ChangePosition(g,POS_FACEUP_DEFENCE) - end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetCountLimit(1) - e1:SetReset(RESET_PHASE+PHASE_END) - e1:SetCondition(c39440937.tdcon) - e1:SetOperation(c39440937.tdop) - Duel.RegisterEffect(e1,tp) -end -function c39440937.tdfilter(c) - return c:IsFaceup() and c:IsType(TYPE_SYNCHRO) and c:IsAbleToExtra() -end -function c39440937.tdcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c39440937.tdfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) -end -function c39440937.tdop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c39440937.tdfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - Duel.SendtoDeck(g,nil,0,REASON_EFFECT) -end diff --git a/script/c39454112.lua b/script/c39454112.lua deleted file mode 100644 index ddddfec7eb..0000000000 --- a/script/c39454112.lua +++ /dev/null @@ -1,34 +0,0 @@ ---出たら目 -function c39454112.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --dice - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_TOSS_DICE_NEGATE) - e2:SetRange(LOCATION_SZONE) - e2:SetOperation(c39454112.diceop) - c:RegisterEffect(e2) -end -function c39454112.diceop(e,tp,eg,ep,ev,re,r,rp) - local cc=Duel.GetCurrentChain() - local cid=Duel.GetChainInfo(cc,CHAININFO_CHAIN_ID) - if c39454112[0]~=cid and Duel.SelectYesNo(tp,aux.Stringid(39454112,0)) then - Duel.Hint(HINT_CARD,0,39454112) - local dc={Duel.GetDiceResult()} - local ac=1 - local ct=bit.band(ev,0xff)+bit.rshift(ev,16) - if ct>1 then - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(39454112,1)) - local val,idx=Duel.AnnounceNumber(tp,table.unpack(dc,1,ct)) - ac=idx+1 - end - if dc[ac]==1 or dc[ac]==3 or dc[ac]==5 then dc[ac]=6 - else dc[ac]=1 end - Duel.SetDiceResult(table.unpack(dc)) - c39454112[0]=cid - end -end diff --git a/script/c39477584.lua b/script/c39477584.lua deleted file mode 100644 index 598c3cc422..0000000000 --- a/script/c39477584.lua +++ /dev/null @@ -1,38 +0,0 @@ ---魔轟神レヴュアタン -function c39477584.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0x35),aux.NonTuner(nil),1) - c:EnableReviveLimit() - --to hand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(39477584,0)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCondition(c39477584.con) - e1:SetTarget(c39477584.tg) - e1:SetOperation(c39477584.op) - c:RegisterEffect(e1) -end -function c39477584.con(e,tp,eg,ep,ev,re,r,rp) - return bit.band(r,REASON_DESTROY)~=0 and e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) -end -function c39477584.filter(c) - return c:IsSetCard(0x35) and c:IsAbleToHand() -end -function c39477584.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c39477584.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c39477584.filter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c39477584.filter,tp,LOCATION_GRAVE,0,1,3,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0) -end -function c39477584.op(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local sg=g:Filter(Card.IsRelateToEffect,nil,e) - if sg:GetCount()>0 then - Duel.SendtoHand(sg,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,sg) - end -end diff --git a/script/c39507162.lua b/script/c39507162.lua deleted file mode 100644 index ca8be66878..0000000000 --- a/script/c39507162.lua +++ /dev/null @@ -1,42 +0,0 @@ ---ブレイドナイト -function c39507162.initial_effect(c) - --atk up - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(400) - e1:SetCondition(c39507162.atkcon) - c:RegisterEffect(e1) - --disable - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_BATTLED) - e2:SetRange(LOCATION_MZONE) - e2:SetCondition(c39507162.discon) - e2:SetOperation(c39507162.disop) - c:RegisterEffect(e2) -end -function c39507162.atkcon(e) - return Duel.GetFieldGroupCount(e:GetHandlerPlayer(),LOCATION_HAND,0)<=1 -end -function c39507162.discon(e) - return not Duel.IsExistingMatchingCard(nil,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,e:GetHandler()) -end -function c39507162.disop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local bc=c:GetBattleTarget() - if bc and bc:IsStatus(STATUS_BATTLE_DESTROYED) and bc:IsType(TYPE_FLIP) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0x17a0000) - bc:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+0x17a0000) - bc:RegisterEffect(e2) - end -end diff --git a/script/c39512984.lua b/script/c39512984.lua deleted file mode 100644 index efbf2a12f7..0000000000 --- a/script/c39512984.lua +++ /dev/null @@ -1,63 +0,0 @@ ---ジェムナイトマスター・ダイヤ -function c39512984.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcFunRep(c,aux.FilterBoolFunction(Card.IsSetCard,0x1047),3,false) - --spsummon condition - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(c39512984.splimit) - c:RegisterEffect(e1) - --atkup - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(c39512984.atkup) - c:RegisterEffect(e2) - --copy - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(39512984,0)) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetCountLimit(1) - e3:SetRange(LOCATION_MZONE) - e3:SetCost(c39512984.cost) - e3:SetOperation(c39512984.operation) - c:RegisterEffect(e3) -end -function c39512984.splimit(e,se,sp,st) - return not e:GetHandler():IsLocation(LOCATION_EXTRA) or bit.band(st,SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION -end -function c39512984.atkfilter(c) - return c:IsSetCard(0x47) and c:IsType(TYPE_MONSTER) -end -function c39512984.atkup(e,c) - return Duel.GetMatchingGroupCount(c39512984.atkfilter,c:GetControler(),LOCATION_GRAVE,0,nil)*100 -end -function c39512984.filter(c) - return c:IsLevelBelow(7) and c:IsSetCard(0x1047) and c:IsType(TYPE_FUSION) and c:IsAbleToRemoveAsCost() -end -function c39512984.cost(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chk==0 then return Duel.IsExistingMatchingCard(c39512984.filter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c39512984.filter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) - e:SetLabel(g:GetFirst():GetOriginalCode()) -end -function c39512984.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local code=e:GetLabel() - if c:IsRelateToEffect(e) and c:IsFaceup() then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - e1:SetCode(EFFECT_CHANGE_CODE) - e1:SetValue(code) - c:RegisterEffect(e1) - c:CopyEffect(code, RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END, 1) - end -end diff --git a/script/c39526584.lua b/script/c39526584.lua deleted file mode 100644 index 236a0927c7..0000000000 --- a/script/c39526584.lua +++ /dev/null @@ -1,23 +0,0 @@ ---ギフトカード -function c39526584.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_RECOVER) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_DRAW_PHASE) - e1:SetTarget(c39526584.target) - e1:SetOperation(c39526584.activate) - c:RegisterEffect(e1) -end -function c39526584.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(3000) - Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,1-tp,3000) -end -function c39526584.activate(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Recover(p,d,REASON_EFFECT) -end diff --git a/script/c39531794.lua b/script/c39531794.lua deleted file mode 100644 index 02eedd52a0..0000000000 --- a/script/c39531794.lua +++ /dev/null @@ -1,59 +0,0 @@ ---ブレインハザード -function c39531794.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_END_PHASE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c39531794.target) - e1:SetOperation(c39531794.operation) - c:RegisterEffect(e1) - --Destroy - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE) - e2:SetCode(EVENT_LEAVE_FIELD) - e2:SetOperation(c39531794.desop) - c:RegisterEffect(e2) - --Destroy2 - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e3:SetRange(LOCATION_SZONE) - e3:SetCode(EVENT_LEAVE_FIELD) - e3:SetCondition(c39531794.descon2) - e3:SetOperation(c39531794.desop2) - c:RegisterEffect(e3) -end -function c39531794.filter(c,e,tp) - return c:IsFaceup() and c:IsRace(RACE_PSYCHO) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c39531794.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:GetLocation()==LOCATION_REMOVED and chkc:GetControler()==tp and c39531794.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c39531794.filter,tp,LOCATION_REMOVED,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c39531794.filter,tp,LOCATION_REMOVED,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c39531794.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then - if Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)==0 then return end - c:SetCardTarget(tc) - end -end -function c39531794.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetHandler():GetFirstCardTarget() - if tc and tc:IsLocation(LOCATION_MZONE) then - Duel.Destroy(tc,REASON_EFFECT) - end -end -function c39531794.descon2(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetHandler():GetFirstCardTarget() - return tc and eg:IsContains(tc) and tc:IsReason(REASON_DESTROY) -end -function c39531794.desop2(e,tp,eg,ep,ev,re,r,rp) - Duel.Destroy(e:GetHandler(),REASON_EFFECT) -end diff --git a/script/c39537362.lua b/script/c39537362.lua deleted file mode 100644 index 3c10e0df7e..0000000000 --- a/script/c39537362.lua +++ /dev/null @@ -1,51 +0,0 @@ ---旅人の試練 -function c39537362.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c39537362.target1) - e1:SetOperation(c39537362.activate) - c:RegisterEffect(e1) - --tohand - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(39537362,0)) - e2:SetCategory(CATEGORY_TOHAND) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_ATTACK_ANNOUNCE) - e2:SetRange(LOCATION_SZONE) - e2:SetLabel(1) - e2:SetCondition(c39537362.condition) - e2:SetTarget(c39537362.target2) - e2:SetOperation(c39537362.activate) - c:RegisterEffect(e2) -end -function c39537362.target1(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - if Duel.CheckEvent(EVENT_ATTACK_ANNOUNCE) and tp~=Duel.GetTurnPlayer() - and Duel.SelectYesNo(tp,aux.Stringid(39537362,1)) then - e:SetLabel(1) - Duel.SetTargetCard(Duel.GetAttacker()) - e:GetHandler():RegisterFlagEffect(0,RESET_CHAIN,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(39537362,2)) - else e:SetLabel(0) end -end -function c39537362.condition(e,tp,eg,ep,ev,re,r,rp) - return tp~=Duel.GetTurnPlayer() -end -function c39537362.target2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return not e:GetHandler():IsStatus(STATUS_CHAINING) end - Duel.SetTargetCard(Duel.GetAttacker()) -end -function c39537362.activate(e,tp,eg,ep,ev,re,r,rp) - if e:GetLabel()~=1 or Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)==0 - or not e:GetHandler():IsRelateToEffect(e) or not Duel.GetAttacker():IsRelateToEffect(e) then return end - local g=Duel.GetFieldGroup(tp,LOCATION_HAND,0):RandomSelect(1-tp,1,nil) - local tc=g:GetFirst() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CARDTYPE) - local op=Duel.SelectOption(1-tp,70,71,72) - Duel.ConfirmCards(1-tp,tc) - Duel.ShuffleHand(tp) - if (op~=0 and tc:IsType(TYPE_MONSTER)) or (op~=1 and tc:IsType(TYPE_SPELL)) or (op~=2 and tc:IsType(TYPE_TRAP)) then - Duel.SendtoHand(Duel.GetAttacker(),nil,REASON_EFFECT) - end -end diff --git a/script/c3954901.lua b/script/c3954901.lua deleted file mode 100644 index 3de0c9d79f..0000000000 --- a/script/c3954901.lua +++ /dev/null @@ -1,48 +0,0 @@ ---フェルグラントドラゴン -function c3954901.initial_effect(c) - --special summon condition - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(c3954901.spcon) - c:RegisterEffect(e1) - --atkup - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(3954901,0)) - e2:SetCategory(CATEGORY_ATKCHANGE) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetCondition(c3954901.atkcon) - e2:SetTarget(c3954901.atktg) - e2:SetOperation(c3954901.atkop) - c:RegisterEffect(e2) -end -function c3954901.spcon(e) - return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) -end -function c3954901.atkcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_GRAVE) -end -function c3954901.filter(c) - return c:GetLevel()>0 -end -function c3954901.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c3954901.filter(chkc) end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - Duel.SelectTarget(tp,c3954901.filter,tp,LOCATION_GRAVE,0,1,1,nil) -end -function c3954901.atkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) and c:IsFaceup() and c:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(tc:GetLevel()*200) - e1:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e1) - end -end diff --git a/script/c39648965.lua b/script/c39648965.lua deleted file mode 100644 index 9a9562d1d2..0000000000 --- a/script/c39648965.lua +++ /dev/null @@ -1,47 +0,0 @@ ---機皇兵ワイゼル・アイン -function c39648965.initial_effect(c) - --atkup - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(c39648965.val) - c:RegisterEffect(e1) - --pierce - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(39648965,0)) - e2:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_FIELD) - e2:SetCode(EVENT_ATTACK_ANNOUNCE) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCondition(c39648965.piercecon) - e2:SetTarget(c39648965.piercetg) - e2:SetOperation(c39648965.pierceop) - c:RegisterEffect(e2) -end -function c39648965.atkfilter(c) - return c:IsFaceup() and c:IsSetCard(0x13) -end -function c39648965.val(e,c) - return Duel.GetMatchingGroupCount(c39648965.atkfilter,0,LOCATION_MZONE,LOCATION_MZONE,c)*100 -end -function c39648965.piercecon(e,tp,eg,ep,ev,re,r,rp) - local a=Duel.GetAttacker() - local d=Duel.GetAttackTarget() - return d and a:IsControler(tp) and a~=e:GetHandler() and d:IsDefencePos() and a:IsSetCard(0x13) -end -function c39648965.piercetg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.GetAttacker():CreateEffectRelation(e) -end -function c39648965.pierceop(e,tp,eg,ep,ev,re,r,rp) - local a=Duel.GetAttacker() - if a:IsRelateToEffect(e) and a:IsFaceup() then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_PIERCE) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - a:RegisterEffect(e1) - end -end \ No newline at end of file diff --git a/script/c39672388.lua b/script/c39672388.lua deleted file mode 100644 index 9ac577ebc6..0000000000 --- a/script/c39672388.lua +++ /dev/null @@ -1,39 +0,0 @@ ---エヴォルダー・ダルウィノス -function c39672388.initial_effect(c) - --lvup - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(39672388,0)) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(c39672388.lvcon) - e1:SetTarget(c39672388.lvtg) - e1:SetOperation(c39672388.lvop) - c:RegisterEffect(e1) -end -function c39672388.lvcon(e,tp,eg,ep,ev,re,r,rp) - local st=e:GetHandler():GetSummonType() - return st>=(SUMMON_TYPE_SPECIAL+150) and st<(SUMMON_TYPE_SPECIAL+180) -end -function c39672388.filter(c) - return c:IsFaceup() and not c:IsType(TYPE_XYZ) -end -function c39672388.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c39672388.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c39672388.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c39672388.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) -end -function c39672388.lvop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) and tc:IsFaceup() then - local opt=Duel.SelectOption(tp,aux.Stringid(39672388,1),aux.Stringid(39672388,2)) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_LEVEL) - e1:SetValue(opt+1) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - end -end diff --git a/script/c39695323.lua b/script/c39695323.lua deleted file mode 100644 index 5b179731ad..0000000000 --- a/script/c39695323.lua +++ /dev/null @@ -1,52 +0,0 @@ ---ゴゴゴジャイアント -function c39695323.initial_effect(c) - --summon success - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(39695323,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c39695323.sptg) - e1:SetOperation(c39695323.spop) - c:RegisterEffect(e1) - --to defence - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_PHASE+PHASE_BATTLE) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCondition(c39695323.poscon) - e2:SetOperation(c39695323.posop) - c:RegisterEffect(e2) -end -function c39695323.filter(c,e,tp) - return c:IsSetCard(0x59) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c39695323.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c39695323.filter(chkc,e,tp) end - if chk==0 then return Duel.IsExistingTarget(c39695323.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) - and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c39695323.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c39695323.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENCE)~=0 then - Duel.BreakEffect() - if c:IsRelateToEffect(e) and c:IsFaceup() then - Duel.ChangePosition(c,POS_FACEUP_DEFENCE) - end - end -end -function c39695323.poscon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetAttackedCount()>0 -end -function c39695323.posop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsAttackPos() then - Duel.ChangePosition(c,POS_FACEUP_DEFENCE) - end -end diff --git a/script/c39699564.lua b/script/c39699564.lua deleted file mode 100644 index 27133b3284..0000000000 --- a/script/c39699564.lua +++ /dev/null @@ -1,49 +0,0 @@ ---速炎星-タイヒョウ -function c39699564.initial_effect(c) - --set - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(39699564,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1,39699564) - e1:SetCondition(c39699564.setcon) - e1:SetCost(c39699564.setcost) - e1:SetTarget(c39699564.settg) - e1:SetOperation(c39699564.setop) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetCode(EVENT_SUMMON_SUCCESS) - e2:SetOperation(c39699564.sumop) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e3) -end -function c39699564.setcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetFlagEffect(39699564)>0 -end -function c39699564.setcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsSetCard,1,nil,0x79) end - local g=Duel.SelectReleaseGroup(tp,Card.IsSetCard,1,1,nil,0x79) - Duel.Release(g,REASON_COST) -end -function c39699564.filter(c) - return c:IsSetCard(0x7c) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSSetable() -end -function c39699564.settg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingMatchingCard(c39699564.filter,tp,LOCATION_DECK,0,1,nil) end -end -function c39699564.setop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) - local g=Duel.SelectMatchingCard(tp,c39699564.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SSet(tp,g) - Duel.ConfirmCards(1-tp,g:GetFirst()) - end -end -function c39699564.sumop(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():RegisterFlagEffect(39699564,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) -end diff --git a/script/c39701395.lua b/script/c39701395.lua deleted file mode 100644 index 2ae9ddd543..0000000000 --- a/script/c39701395.lua +++ /dev/null @@ -1,30 +0,0 @@ ---調和の宝札 -function c39701395.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c39701395.cost) - e1:SetTarget(c39701395.target) - e1:SetOperation(c39701395.activate) - c:RegisterEffect(e1) -end -function c39701395.filter(c) - return c:IsType(TYPE_TUNER) and c:IsRace(RACE_DRAGON) and c:IsAttackBelow(1000) and c:IsDiscardable() -end -function c39701395.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c39701395.filter,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,c39701395.filter,1,1,REASON_COST+REASON_DISCARD) -end -function c39701395.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp,2) end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(2) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2) -end -function c39701395.activate(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end diff --git a/script/c39703254.lua b/script/c39703254.lua deleted file mode 100644 index 3bdc5bb376..0000000000 --- a/script/c39703254.lua +++ /dev/null @@ -1 +0,0 @@ ---トマボー function c39703254.initial_effect(c) --draw local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(39703254,0)) e1:SetCategory(CATEGORY_DRAW) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetCode(EVENT_CHAINING) e1:SetRange(LOCATION_MZONE) e1:SetCondition(c39703254.condition) e1:SetCost(c39703254.cost) e1:SetTarget(c39703254.target) e1:SetOperation(c39703254.operation) c:RegisterEffect(e1) end function c39703254.condition(e,tp,eg,ep,ev,re,r,rp) if rp==tp or not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end if not re:IsActiveType(TYPE_SPELL+TYPE_TRAP) then return false end local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) if not g or g:GetCount()~=1 then return false end local tg=g:GetFirst() local c=e:GetHandler() return tg~=c and tg:IsFaceup() and tg:IsRace(RACE_PLANT) end function c39703254.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():IsReleasable() end Duel.Release(e:GetHandler(),REASON_COST) end function c39703254.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDraw(tp,2) end Duel.SetTargetPlayer(tp) Duel.SetTargetParam(2) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2) end function c39703254.operation(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) end \ No newline at end of file diff --git a/script/c39711336.lua b/script/c39711336.lua deleted file mode 100644 index 33dae3c2d1..0000000000 --- a/script/c39711336.lua +++ /dev/null @@ -1,72 +0,0 @@ ---不死王リッチー -function c39711336.initial_effect(c) - c:EnableReviveLimit() - --turn set - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(39711336,0)) - e1:SetCategory(CATEGORY_POSITION) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetTarget(c39711336.target) - e1:SetOperation(c39711336.operation) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(39711336,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_FLIP) - e2:SetTarget(c39711336.sptg) - e2:SetOperation(c39711336.spop) - c:RegisterEffect(e2) - --negate - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e3:SetRange(LOCATION_MZONE) - e3:SetCode(EVENT_CHAIN_ACTIVATING) - e3:SetCondition(c39711336.discon) - e3:SetOperation(c39711336.disop) - c:RegisterEffect(e3) -end -function c39711336.target(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsCanTurnSet() and c:GetFlagEffect(39711336)==0 end - c:RegisterFlagEffect(39711336,RESET_EVENT+0x1fc0000+RESET_PHASE+PHASE_END,0,1) - Duel.SetOperationInfo(0,CATEGORY_POSITION,c,1,0,0) -end -function c39711336.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - Duel.ChangePosition(c,POS_FACEDOWN_DEFENCE) - end -end -function c39711336.spfilter(c,e,tp) - return c:IsRace(RACE_ZOMBIE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c39711336.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c39711336.spfilter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c39711336.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c39711336.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c39711336.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end -function c39711336.discon(e,tp,eg,ep,ev,re,r,rp) - if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end - local tg=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) - if not tg or not tg:IsContains(e:GetHandler()) then return false end - return re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev) -end -function c39711336.disop(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateActivation(ev) - if re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(re:GetHandler(),REASON_EFFECT) - end -end diff --git a/script/c39712330.lua b/script/c39712330.lua deleted file mode 100644 index 28aeb01b33..0000000000 --- a/script/c39712330.lua +++ /dev/null @@ -1,101 +0,0 @@ ---決戦の火蓋 -function c39712330.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c39712330.cost1) - e1:SetTarget(c39712330.target1) - e1:SetOperation(c39712330.activate1) - c:RegisterEffect(e1) - --instant - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(39712330,0)) - e2:SetCategory(CATEGORY_SUMMON) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetRange(LOCATION_SZONE) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetCondition(c39712330.condition2) - e2:SetCost(c39712330.cost2) - e2:SetTarget(c39712330.target2) - e2:SetOperation(c39712330.activate2) - c:RegisterEffect(e2) -end -function c39712330.cfilter(c) - return c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost() -end -function c39712330.filter(c) - return c:IsType(TYPE_NORMAL) and (c:IsSummonable(true,nil) or c:IsMSetable(true,nil)) -end -function c39712330.cost1(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - e:SetLabel(0) - local tn=Duel.GetTurnPlayer() - local ph=Duel.GetCurrentPhase() - if tn~=tp or (ph~=PHASE_MAIN1 and ph~=PHASE_MAIN2) then return false end - if not Duel.IsExistingMatchingCard(c39712330.cfilter,tp,LOCATION_GRAVE,0,1,nil) then return false end - if Duel.IsExistingMatchingCard(c39712330.filter,tp,LOCATION_HAND,0,1,nil) - and Duel.SelectYesNo(tp,aux.Stringid(39712330,1)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c39712330.cfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) - e:SetLabel(1) - end -end -function c39712330.target1(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - if e:GetLabel()~=1 then return end - Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,0,0) -end -function c39712330.activate1(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) then return end - if e:GetLabel()~=1 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON) - local g=Duel.SelectMatchingCard(tp,c39712330.filter,tp,LOCATION_HAND,0,1,1,nil) - local tc=g:GetFirst() - if tc then - if tc:IsSummonable(true,nil) and (not tc:IsMSetable(true,nil) - or Duel.SelectPosition(tp,tc,POS_FACEUP_ATTACK+POS_FACEDOWN_DEFENCE)==POS_FACEUP_ATTACK) then - Duel.Summon(tp,tc,true,nil) - else Duel.MSet(tp,tc,true,nil) end - end -end -function c39712330.condition2(e,tp,eg,ep,ev,re,r,rp) - local tn=Duel.GetTurnPlayer() - local ph=Duel.GetCurrentPhase() - return tn==tp and (ph==PHASE_MAIN1 or ph==PHASE_MAIN2) -end -function c39712330.cost2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c39712330.cfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c39712330.cfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c39712330.target2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - if not e:GetHandler():IsStatus(STATUS_CHAINING) then - local ct=Duel.GetMatchingGroupCount(c39712330.filter,tp,LOCATION_HAND,0,nil) - e:SetLabel(ct) - return ct>0 - else return e:GetLabel()>0 end - end - e:SetLabel(e:GetLabel()-1) - Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,0,0) -end -function c39712330.activate2(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON) - local g=Duel.SelectMatchingCard(tp,c39712330.filter,tp,LOCATION_HAND,0,1,1,nil) - local tc=g:GetFirst() - if tc then - local s1=tc:IsSummonable(true,nil) - local s2=tc:IsMSetable(true,nil) - if (s1 and s2 and Duel.SelectPosition(tp,tc,POS_FACEUP_ATTACK+POS_FACEDOWN_DEFENCE)==POS_FACEUP_ATTACK) or not s2 then - Duel.Summon(tp,tc,true,nil) - else - Duel.MSet(tp,tc,true,nil) - end - end -end diff --git a/script/c39719977.lua b/script/c39719977.lua deleted file mode 100644 index 2f870600ec..0000000000 --- a/script/c39719977.lua +++ /dev/null @@ -1,34 +0,0 @@ ---デルタ・アタッカー -function c39719977.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c39719977.target) - e1:SetOperation(c39719977.activate) - c:RegisterEffect(e1) -end -function c39719977.filter(c,tp) - local tpe=c:GetType() - return c:IsFaceup() and bit.band(tpe,TYPE_NORMAL)~=0 and bit.band(tpe,TYPE_TOKEN)==0 - and Duel.IsExistingMatchingCard(c39719977.filter2,tp,LOCATION_MZONE,0,2,c,c:GetCode()) -end -function c39719977.filter2(c,code) - local tpe=c:GetType() - return c:IsFaceup() and bit.band(tpe,TYPE_NORMAL)~=0 and bit.band(tpe,TYPE_TOKEN)==0 and c:GetCode()==code -end -function c39719977.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c39719977.filter,tp,LOCATION_MZONE,0,3,nil,tp) end -end -function c39719977.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c39719977.filter,tp,LOCATION_MZONE,0,nil,tp) - local tc=g:GetFirst() - while tc do - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DIRECT_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - tc=g:GetNext() - end -end diff --git a/script/c3972721.lua b/script/c3972721.lua deleted file mode 100644 index e5416d6bd1..0000000000 --- a/script/c3972721.lua +++ /dev/null @@ -1,51 +0,0 @@ ---グリード・グラード -function c3972721.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(TIMING_END_PHASE) - e1:SetCondition(c3972721.condition) - e1:SetTarget(c3972721.target) - e1:SetOperation(c3972721.activate) - c:RegisterEffect(e1) - if not c3972721.global_check then - c3972721.global_check=true - local ge1=Effect.CreateEffect(c) - ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - ge1:SetCode(EVENT_DESTROYED) - ge1:SetOperation(c3972721.checkop) - Duel.RegisterEffect(ge1,0) - end -end -function c3972721.checkop(e,tp,eg,ep,ev,re,r,rp) - local tc=eg:GetFirst() - local p1=false - local p2=false - while tc do - if tc:IsType(TYPE_SYNCHRO) and tc:IsPreviousLocation(LOCATION_MZONE) - and ((tc:IsReason(REASON_BATTLE) and bit.band(tc:GetBattlePosition(),POS_FACEUP)~=0) - or (not tc:IsReason(REASON_BATTLE) and tc:IsPreviousPosition(POS_FACEUP))) - and tc:GetPreviousControler()~=tc:GetReasonPlayer() then - if tc:GetReasonPlayer()==0 then p1=true else p2=true end - end - tc=eg:GetNext() - end - if p1 then Duel.RegisterFlagEffect(0,3972721,RESET_PHASE+PHASE_END,0,1) end - if p2 then Duel.RegisterFlagEffect(1,3972721,RESET_PHASE+PHASE_END,0,1) end -end -function c3972721.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetFlagEffect(tp,3972721)~=0 -end -function c3972721.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp,2) end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(2) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2) -end -function c3972721.activate(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end diff --git a/script/c39751093.lua b/script/c39751093.lua deleted file mode 100644 index cb8d547f85..0000000000 --- a/script/c39751093.lua +++ /dev/null @@ -1,82 +0,0 @@ ---竜宮之姫 -function c39751093.initial_effect(c) - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(aux.FALSE) - c:RegisterEffect(e1) - --summon,flip - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetCode(EVENT_SUMMON_SUCCESS) - e2:SetOperation(c39751093.retreg) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EVENT_FLIP) - c:RegisterEffect(e3) - --pos - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(39751093,1)) - e4:SetCategory(CATEGORY_POSITION) - e4:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e4:SetCode(EVENT_SUMMON_SUCCESS) - e4:SetTarget(c39751093.target) - e4:SetOperation(c39751093.operation) - c:RegisterEffect(e4) - local e5=e4:Clone() - e5:SetCode(EVENT_FLIP) - c:RegisterEffect(e5) -end -function c39751093.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE) - local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0) -end -function c39751093.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) then - Duel.ChangePosition(tc,POS_FACEUP_DEFENCE,0,POS_FACEUP_ATTACK,0) - end -end -function c39751093.retreg(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - --to hand - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetDescription(aux.Stringid(39751093,0)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetReset(RESET_EVENT+0x1ee0000+RESET_PHASE+PHASE_END) - e1:SetCondition(c39751093.retcon) - e1:SetTarget(c39751093.rettg) - e1:SetOperation(c39751093.retop) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - c:RegisterEffect(e2) -end -function c39751093.retcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsHasEffect(EFFECT_SPIRIT_DONOT_RETURN) then return false end - if e:IsHasType(EFFECT_TYPE_TRIGGER_F) then - return not c:IsHasEffect(EFFECT_SPIRIT_MAYNOT_RETURN) - else return c:IsHasEffect(EFFECT_SPIRIT_MAYNOT_RETURN) end -end -function c39751093.rettg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0) -end -function c39751093.retop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - Duel.SendtoHand(c,nil,REASON_EFFECT) - end -end diff --git a/script/c39761138.lua b/script/c39761138.lua deleted file mode 100644 index 6eb0b3119f..0000000000 --- a/script/c39761138.lua +++ /dev/null @@ -1,42 +0,0 @@ ---ネオフレムベル・シャーマン -function c39761138.initial_effect(c) - --remove - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(39761138,0)) - e1:SetCategory(CATEGORY_REMOVE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_BATTLE_DESTROYING) - e1:SetCondition(c39761138.rmcon) - e1:SetTarget(c39761138.rmtg) - e1:SetOperation(c39761138.rmop) - c:RegisterEffect(e1) -end -function c39761138.rmcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsRelateToBattle() and c:GetBattleTarget():IsType(TYPE_MONSTER) - and Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_GRAVE,0,3,nil,0x2c) -end -function c39761138.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(1-tp) and chkc:IsAbleToRemove() end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,0) - if Duel.IsExistingMatchingCard(Card.IsType,tp,0,LOCATION_GRAVE,1,nil,TYPE_SPELL) then e:SetLabel(0) - else - e:SetLabel(1) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,500) - end -end -function c39761138.rmop(e,tp,eg,ep,ev,re,r,rp) - if not Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_GRAVE,0,3,nil,0x2c) then return end - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) - if e:GetLabel()==1 then - Duel.BreakEffect() - Duel.Damage(1-tp,500,REASON_EFFECT) - end - end -end diff --git a/script/c39765115.lua b/script/c39765115.lua deleted file mode 100644 index a6078abf36..0000000000 --- a/script/c39765115.lua +++ /dev/null @@ -1,41 +0,0 @@ ---スプラッシュ・キャプチャー -function c39765115.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_CONTROL) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(c39765115.condition) - e1:SetCost(c39765115.cost) - e1:SetTarget(c39765115.target) - e1:SetOperation(c39765115.activate) - c:RegisterEffect(e1) -end -function c39765115.condition(e,tp,eg,ep,ev,re,r,rp) - local tc=eg:GetFirst() - return tc:GetSummonType()==SUMMON_TYPE_XYZ and tc:IsControler(1-tp) -end -function c39765115.cfilter(c) - return c:IsRace(RACE_FISH) and c:IsAbleToRemoveAsCost() -end -function c39765115.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c39765115.cfilter,tp,LOCATION_GRAVE,0,2,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c39765115.cfilter,tp,LOCATION_GRAVE,0,2,2,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c39765115.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - if chk==0 then return eg:GetFirst():IsCanBeEffectTarget(e) and eg:GetFirst():IsControlerCanBeChanged() end - Duel.SetTargetCard(eg) - Duel.SetOperationInfo(0,CATEGORY_CONTROL,eg,1,0,0) -end -function c39765115.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and not Duel.GetControl(tc,tp,0,0) then - if not tc:IsImmuneToEffect(e) and tc:IsAbleToChangeControler() then - Duel.Destroy(tc,REASON_EFFECT) - end - end -end diff --git a/script/c39765958.lua b/script/c39765958.lua deleted file mode 100644 index 083b824bf7..0000000000 --- a/script/c39765958.lua +++ /dev/null @@ -1,48 +0,0 @@ ---琰魔竜 レッド・デーモン -function c39765958.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1) - c:EnableReviveLimit() - --destroy - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetDescription(aux.Stringid(39765958,0)) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCondition(c39765958.descon) - e1:SetCost(c39765958.descost) - e1:SetTarget(c39765958.destg) - e1:SetOperation(c39765958.desop) - c:RegisterEffect(e1) -end -function c39765958.descon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()==PHASE_MAIN1 -end -function c39765958.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_OATH) - e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetTarget(c39765958.ftarget) - e1:SetLabel(e:GetHandler():GetFieldID()) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function c39765958.ftarget(e,c) - return e:GetLabel()~=c:GetFieldID() -end -function c39765958.dfilter(c) - return c:IsPosition(POS_FACEUP_ATTACK) and c:IsDestructable() -end -function c39765958.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c39765958.dfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,e:GetHandler()) end - local sg=Duel.GetMatchingGroup(c39765958.dfilter,tp,LOCATION_MZONE,LOCATION_MZONE,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,sg:GetCount(),0,0) -end -function c39765958.desop(e,tp,eg,ep,ev,re,r,rp) - local sg=Duel.GetMatchingGroup(c39765958.dfilter,tp,LOCATION_MZONE,LOCATION_MZONE,e:GetHandler()) - Duel.Destroy(sg,REASON_EFFECT) -end diff --git a/script/c39774685.lua b/script/c39774685.lua deleted file mode 100644 index fb37d4c1df..0000000000 --- a/script/c39774685.lua +++ /dev/null @@ -1,50 +0,0 @@ ---魔菌 -function c39774685.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c39774685.target) - e1:SetOperation(c39774685.operation) - c:RegisterEffect(e1) - --atk up - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(300) - c:RegisterEffect(e2) - --def up - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_EQUIP) - e3:SetCode(EFFECT_UPDATE_DEFENCE) - e3:SetValue(300) - c:RegisterEffect(e3) - --equip limit - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetCode(EFFECT_EQUIP_LIMIT) - e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e4:SetValue(c39774685.eqlimit) - c:RegisterEffect(e4) -end -function c39774685.eqlimit(e,c) - return c:IsRace(RACE_PLANT) -end -function c39774685.filter(c) - return c:IsFaceup() and c:IsRace(RACE_PLANT) -end -function c39774685.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c39774685.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c39774685.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c39774685.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c39774685.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,e:GetHandler(),tc) - end -end diff --git a/script/c39806198.lua b/script/c39806198.lua deleted file mode 100644 index 9b0ec4a0c5..0000000000 --- a/script/c39806198.lua +++ /dev/null @@ -1,22 +0,0 @@ ---ギミック・パペット-マグネ・ドール -function c39806198.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c39806198.spcon) - c:RegisterEffect(e1) -end -function c39806198.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)>0 - and Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0 - and not Duel.IsExistingMatchingCard(c39806198.cfilter,tp,LOCATION_MZONE,0,1,nil) -end -function c39806198.cfilter(c) - return c:IsFacedown() or not c:IsSetCard(0x83) -end diff --git a/script/c39823987.lua b/script/c39823987.lua deleted file mode 100644 index 9815b14017..0000000000 --- a/script/c39823987.lua +++ /dev/null @@ -1,81 +0,0 @@ ---太陽龍インティ -function c39823987.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsCode,78275321),aux.NonTuner(nil),1) - c:EnableReviveLimit() - --destroy&damage - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(39823987,0)) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetCondition(c39823987.descon) - e1:SetTarget(c39823987.destg) - e1:SetOperation(c39823987.desop) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_DESTROYED) - e2:SetCondition(c39823987.regcon) - e2:SetOperation(c39823987.regop) - c:RegisterEffect(e2) -end -function c39823987.descon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) -end -function c39823987.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local tc=e:GetHandler():GetReasonCard() - if tc:IsRelateToBattle() then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,tc,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,tc:GetAttack()/2) - end -end -function c39823987.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetHandler():GetReasonCard() - if not tc:IsRelateToBattle() then return end - local atk=tc:GetAttack()/2 - if atk<0 then atk=0 end - if Duel.Destroy(tc,REASON_EFFECT)~=0 then - Duel.Damage(1-tp,atk,REASON_EFFECT) - end -end -function c39823987.regcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) -end -function c39823987.regop(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetDescription(aux.Stringid(39823987,2)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) - e1:SetCountLimit(1) - e1:SetCondition(c39823987.spcon) - e1:SetTarget(c39823987.sptg) - e1:SetOperation(c39823987.spop) - e1:SetReset(RESET_PHASE+PHASE_END,2) - e1:SetLabel(Duel.GetTurnCount()) - Duel.RegisterEffect(e1,tp) -end -function c39823987.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnCount()~=e:GetLabel() -end -function c39823987.spfilter(c,e,tp) - return c:IsCode(66818682) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c39823987.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c39823987.spfilter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c39823987.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c39823987.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c39823987.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c39829561.lua b/script/c39829561.lua deleted file mode 100644 index ae4afe19ed..0000000000 --- a/script/c39829561.lua +++ /dev/null @@ -1,43 +0,0 @@ ---D-HERO ディパーテッドガイ -function c39829561.initial_effect(c) - --Special Summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(39829561,0)) - e1:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_FIELD) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) - e1:SetRange(LOCATION_GRAVE) - e1:SetCountLimit(1) - e1:SetCondition(c39829561.condition) - e1:SetTarget(c39829561.target) - e1:SetOperation(c39829561.operation) - c:RegisterEffect(e1) - --redirect - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_TO_GRAVE_REDIRECT) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetCondition(c39829561.recon) - e2:SetValue(LOCATION_REMOVED) - c:RegisterEffect(e2) -end -function c39829561.filter(c) - return c:IsFaceup() and c:IsCode(83986578) -end -function c39829561.condition(e,tp,eg,ep,ev,re,r,rp) - return tp==Duel.GetTurnPlayer() and not Duel.IsExistingMatchingCard(c39829561.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) -end -function c39829561.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c39829561.operation(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - Duel.SpecialSummon(e:GetHandler(),0,tp,1-tp,false,false,POS_FACEUP_ATTACK) - end -end -function c39829561.recon(e) - local c=e:GetHandler() - return (c:IsLocation(LOCATION_MZONE) and c:IsReason(REASON_BATTLE)) - or (c:IsLocation(LOCATION_DECK+LOCATION_HAND) and c:IsReason(REASON_EFFECT)) -end diff --git a/script/c39853199.lua b/script/c39853199.lua deleted file mode 100644 index 21b6715c57..0000000000 --- a/script/c39853199.lua +++ /dev/null @@ -1,84 +0,0 @@ ---妖仙獣 閻魔巳裂 -function c39853199.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(39853199,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_BATTLE_START) - e1:SetTarget(c39853199.destg1) - e1:SetOperation(c39853199.desop1) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(39853199,1)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCondition(c39853199.descon2) - e2:SetTarget(c39853199.destg2) - e2:SetOperation(c39853199.desop2) - c:RegisterEffect(e2) - --return - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(39853199,2)) - e3:SetCategory(CATEGORY_TOHAND) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1) - e3:SetCode(EVENT_PHASE+PHASE_END) - e3:SetCondition(c39853199.retcon) - e3:SetTarget(c39853199.rettg) - e3:SetOperation(c39853199.retop) - c:RegisterEffect(e3) - if not c39853199.global_check then - c39853199.global_check=true - local ge1=Effect.CreateEffect(c) - ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - ge1:SetCode(EVENT_SPSUMMON_SUCCESS) - ge1:SetLabel(39853199) - ge1:SetOperation(aux.sumreg) - Duel.RegisterEffect(ge1,0) - end -end -function c39853199.destg1(e,tp,eg,ep,ev,re,r,rp,chk) - local tc=e:GetHandler():GetBattleTarget() - if chk==0 then return tc and tc:IsFaceup() and tc:GetAttribute()~=ATTRIBUTE_WIND end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,tc,1,0,0) -end -function c39853199.desop1(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetHandler():GetBattleTarget() - if tc:IsRelateToBattle() then - Duel.Destroy(tc,REASON_EFFECT) - end -end -function c39853199.descon2(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_PENDULUM -end -function c39853199.destg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and chkc:IsDestructable() end - if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,0,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,0,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c39853199.desop2(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end -function c39853199.retcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetFlagEffect(39853199)~=0 -end -function c39853199.rettg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0) -end -function c39853199.retop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SendtoHand(c,nil,REASON_EFFECT) - end -end diff --git a/script/c39892082.lua b/script/c39892082.lua deleted file mode 100644 index d9a509b318..0000000000 --- a/script/c39892082.lua +++ /dev/null @@ -1,54 +0,0 @@ ---バルーン・リザード -function c39892082.initial_effect(c) - --counter - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(39892082,0)) - e1:SetCategory(CATEGORY_COUNTER) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCondition(c39892082.addccon) - e1:SetTarget(c39892082.addct) - e1:SetOperation(c39892082.addc) - c:RegisterEffect(e1) - --damage - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(39892082,1)) - e2:SetCategory(CATEGORY_DAMAGE) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_LEAVE_FIELD) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetCondition(c39892082.damcon) - e2:SetTarget(c39892082.damtg) - e2:SetOperation(c39892082.damop) - c:RegisterEffect(e2) -end -function c39892082.addccon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c39892082.addct(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,1,0,0x29) -end -function c39892082.addc(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - e:GetHandler():AddCounter(0x29,1) - end -end -function c39892082.damcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local ct=c:GetCounter(0x29) - e:SetLabel(ct) - return ct>0 and c:IsReason(REASON_DESTROY) -end -function c39892082.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(rp) - Duel.SetTargetParam(e:GetLabel()*400) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,rp,e:GetLabel()*400) -end -function c39892082.damop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c3989465.lua b/script/c3989465.lua deleted file mode 100644 index 3bf2d598f4..0000000000 --- a/script/c3989465.lua +++ /dev/null @@ -1,41 +0,0 @@ ---ラヴァルバル・イグニス -function c3989465.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,3,2) - c:EnableReviveLimit() - --attack up - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetDescription(aux.Stringid(3989465,0)) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c3989465.condition) - e1:SetCost(c3989465.cost) - e1:SetOperation(c3989465.operation) - c:RegisterEffect(e1) -end -function c3989465.condition(e,tp,eg,ep,ev,re,r,rp) - local ph=Duel.GetCurrentPhase() - local c=e:GetHandler() - return ph==PHASE_DAMAGE and (c==Duel.GetAttacker() or c==Duel.GetAttackTarget()) - and not Duel.IsDamageCalculated() -end -function c3989465.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():GetFlagEffect(3989465)==0 and e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) - e:GetHandler():RegisterFlagEffect(3989465,RESET_PHASE+PHASE_DAMAGE,0,1) -end -function c3989465.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFaceup() and c:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(500) - e1:SetReset(RESET_EVENT+0x1ff0000+RESET_PHASE+PHASE_END) - c:RegisterEffect(e1) - end -end diff --git a/script/c39897277.lua b/script/c39897277.lua deleted file mode 100644 index f9dac764af..0000000000 --- a/script/c39897277.lua +++ /dev/null @@ -1,50 +0,0 @@ ---エルフの光 -function c39897277.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c39897277.target) - e1:SetOperation(c39897277.operation) - c:RegisterEffect(e1) - --atk up - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(400) - c:RegisterEffect(e2) - --def down - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_EQUIP) - e3:SetCode(EFFECT_UPDATE_DEFENCE) - e3:SetValue(-200) - c:RegisterEffect(e3) - --equip limit - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetCode(EFFECT_EQUIP_LIMIT) - e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e4:SetValue(c39897277.eqlimit) - c:RegisterEffect(e4) -end -function c39897277.eqlimit(e,c) - return c:IsAttribute(ATTRIBUTE_LIGHT) -end -function c39897277.filter(c) - return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_LIGHT) -end -function c39897277.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c39897277.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c39897277.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c39897277.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c39897277.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,e:GetHandler(),tc) - end -end diff --git a/script/c39900763.lua b/script/c39900763.lua deleted file mode 100644 index 5cd6e539ac..0000000000 --- a/script/c39900763.lua +++ /dev/null @@ -1,38 +0,0 @@ ---異次元の邂逅 -function c39900763.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c39900763.target) - e1:SetOperation(c39900763.operation) - c:RegisterEffect(e1) -end -function c39900763.filter(c,e,tp) - return c:IsFaceup() and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN) -end -function c39900763.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c39900763.filter,tp,LOCATION_REMOVED,0,1,nil,e,tp) - and Duel.GetLocationCount(1-tp,LOCATION_MZONE,1-tp)>0 - and Duel.IsExistingMatchingCard(c39900763.filter,1-tp,LOCATION_REMOVED,0,1,nil,e,1-tp) - end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,PLAYER_ALL,0) -end -function c39900763.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c39900763.filter,tp,LOCATION_REMOVED,0,1,1,nil,e,tp) - local tc=g:GetFirst() - if tc then Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEDOWN_DEFENCE) end - end - if Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0 then - Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(1-tp,c39900763.filter,1-tp,LOCATION_REMOVED,0,1,1,nil,e,1-tp) - local tc=g:GetFirst() - if tc then Duel.SpecialSummonStep(tc,0,1-tp,1-tp,false,false,POS_FACEDOWN_DEFENCE) end - end - Duel.SpecialSummonComplete() -end diff --git a/script/c39905966.lua b/script/c39905966.lua deleted file mode 100644 index c45af1bea6..0000000000 --- a/script/c39905966.lua +++ /dev/null @@ -1,36 +0,0 @@ ---リチュア・マーカー -function c39905966.initial_effect(c) - --salvage - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(39905966,0)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c39905966.tg) - e1:SetOperation(c39905966.op) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - c:RegisterEffect(e2) - local e3=e1:Clone() - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e3) -end -function c39905966.filter(c) - return c:IsSetCard(0x3a) and c:IsType(TYPE_RITUAL) and c:IsAbleToHand() -end -function c39905966.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c39905966.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c39905966.filter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c39905966.filter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c39905966.op(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end diff --git a/script/c39910367.lua b/script/c39910367.lua deleted file mode 100644 index e2f7950430..0000000000 --- a/script/c39910367.lua +++ /dev/null @@ -1,76 +0,0 @@ ---魔法都市エンディミオン -function c39910367.initial_effect(c) - c:EnableCounterPermit(0x3001) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --Add counter - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e3:SetCode(EVENT_CHAIN_SOLVING) - e3:SetProperty(EFFECT_FLAG_DELAY) - e3:SetRange(LOCATION_SZONE) - e3:SetOperation(c39910367.op) - c:RegisterEffect(e3) - --Remove counter replace - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(39910367,0)) - e4:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e4:SetCode(EFFECT_RCOUNTER_REPLACE+0x3001) - e4:SetRange(LOCATION_SZONE) - e4:SetCountLimit(1) - e4:SetCondition(c39910367.rcon) - e4:SetOperation(c39910367.rop) - c:RegisterEffect(e4) - --Destroy replace - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE) - e5:SetCode(EFFECT_DESTROY_REPLACE) - e5:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e5:SetRange(LOCATION_SZONE) - e5:SetTarget(c39910367.desreptg) - e5:SetOperation(c39910367.desrepop) - c:RegisterEffect(e5) - --Add counter2 - local e6=Effect.CreateEffect(c) - e6:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e6:SetCode(EVENT_LEAVE_FIELD) - e6:SetRange(LOCATION_SZONE) - e6:SetOperation(c39910367.addop2) - c:RegisterEffect(e6) -end -function c39910367.op(e,tp,eg,ep,ev,re,r,rp) - local c=re:GetHandler() - if re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL) and c~=e:GetHandler() then - e:GetHandler():AddCounter(0x3001,1) - end -end -function c39910367.rcon(e,tp,eg,ep,ev,re,r,rp) - return bit.band(r,REASON_COST)~=0 and ep==e:GetOwnerPlayer() and e:GetHandler():GetCounter(0x3001)>=ev -end -function c39910367.rop(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():RemoveCounter(ep,0x3001,ev,REASON_EFFECT) -end -function c39910367.desreptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return not e:GetHandler():IsReason(REASON_RULE) - and e:GetHandler():GetCounter(0x3001)>0 end - return Duel.SelectYesNo(tp,aux.Stringid(39910367,1)) -end -function c39910367.desrepop(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():RemoveCounter(ep,0x3001,1,REASON_EFFECT) -end -function c39910367.addop2(e,tp,eg,ep,ev,re,r,rp) - local count=0 - local c=eg:GetFirst() - while c~=nil do - if not c:IsCode(39910367) and c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsReason(REASON_DESTROY) then - count=count+c:GetCounter(0x3001) - end - c=eg:GetNext() - end - if count>0 then - e:GetHandler():AddCounter(0x3001,count) - end -end diff --git a/script/c39956951.lua b/script/c39956951.lua deleted file mode 100644 index fd14f52948..0000000000 --- a/script/c39956951.lua +++ /dev/null @@ -1,24 +0,0 @@ ---封魔一閃 -function c39956951.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c39956951.condition) - e1:SetTarget(c39956951.target) - e1:SetOperation(c39956951.activate) - c:RegisterEffect(e1) -end -function c39956951.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>=5 -end -function c39956951.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDestructable,tp,0,LOCATION_MZONE,1,nil) end - local sg=Duel.GetMatchingGroup(Card.IsDestructable,tp,0,LOCATION_MZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,sg:GetCount(),0,0) -end -function c39956951.activate(e,tp,eg,ep,ev,re,r,rp) - local sg=Duel.GetMatchingGroup(Card.IsDestructable,tp,0,LOCATION_MZONE,nil) - Duel.Destroy(sg,REASON_EFFECT) -end diff --git a/script/c39967326.lua b/script/c39967326.lua deleted file mode 100644 index d160786282..0000000000 --- a/script/c39967326.lua +++ /dev/null @@ -1,39 +0,0 @@ ---早すぎた復活 -function c39967326.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_END_PHASE) - e1:SetTarget(c39967326.target) - e1:SetOperation(c39967326.activate) - c:RegisterEffect(e1) -end -function c39967326.filter(c,e,tp) - return c:IsSetCard(0x21) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c39967326.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c39967326.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c39967326.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c39967326.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c39967326.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)~=0 then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_NO_BATTLE_DAMAGE) - e2:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e2) - end -end diff --git a/script/c39972129.lua b/script/c39972129.lua deleted file mode 100644 index 51f80bd270..0000000000 --- a/script/c39972129.lua +++ /dev/null @@ -1,60 +0,0 @@ ---No.64 古狸三太夫 -function c39972129.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsRace,RACE_BEAST),2,2) - c:EnableReviveLimit() - --token - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(39972129,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c39972129.spcost) - e1:SetTarget(c39972129.sptg) - e1:SetOperation(c39972129.spop) - c:RegisterEffect(e1) - --indestructable - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e2:SetCondition(c39972129.indcon) - e2:SetValue(1) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - c:RegisterEffect(e3) -end -c39972129.xyz_number=64 -function c39972129.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c39972129.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsPlayerCanSpecialSummonMonster(tp,39972130,0,0x4011,-2,0,1,RACE_BEAST,ATTRIBUTE_EARTH) end - Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0) -end -function c39972129.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 - or not Duel.IsPlayerCanSpecialSummonMonster(tp,39972130,0,0x4011,-2,0,1,RACE_BEAST,ATTRIBUTE_EARTH) then return end - local token=Duel.CreateToken(tp,39972130) - Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP) - local g,atk=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,nil):GetMaxGroup(Card.GetAttack) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK) - e1:SetValue(atk) - e1:SetReset(RESET_EVENT+0x1fe0000) - token:RegisterEffect(e1) - Duel.SpecialSummonComplete() -end -function c39972129.ifilter(c) - return c:IsFaceup() and c:IsRace(RACE_BEAST) -end -function c39972129.indcon(e) - return Duel.IsExistingMatchingCard(c39972129.ifilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,e:GetHandler()) -end diff --git a/script/c39978267.lua b/script/c39978267.lua deleted file mode 100644 index dd82fb6885..0000000000 --- a/script/c39978267.lua +++ /dev/null @@ -1,68 +0,0 @@ ---サイバー・レイダー -function c39978267.initial_effect(c) - --effect - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(39978267,0)) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c39978267.target) - e1:SetOperation(c39978267.operation) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e2) - local e3=e1:Clone() - e3:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - c:RegisterEffect(e3) -end -function c39978267.desfilter(c) - return c:IsType(TYPE_EQUIP) and c:IsDestructable() -end -function c39978267.eqfilter(c,ec) - return c:IsType(TYPE_EQUIP) and c:CheckEquipTarget(ec) -end -function c39978267.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then - if e:GetLabel()==1 then return chkc:IsLocation(LOCATION_SZONE) and c39978267.desfilter(chkc) - else return chkc:IsLocation(LOCATION_SZONE) and c39978267.eqfilter(chkc,e:GetHandler()) end - end - if chk==0 then return true end - local sel=0 - if Duel.IsExistingMatchingCard(c39978267.desfilter,tp,LOCATION_SZONE,LOCATION_SZONE,1,nil) then sel=sel+1 end - if Duel.IsExistingMatchingCard(c39978267.eqfilter,tp,LOCATION_SZONE,LOCATION_SZONE,1,nil,e:GetHandler()) then sel=sel+2 end - if sel==3 then - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(39978267,0)) - sel=Duel.SelectOption(tp,aux.Stringid(39978267,1),aux.Stringid(39978267,2))+1 - end - e:SetLabel(sel) - if sel==1 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c39978267.desfilter,tp,LOCATION_SZONE,LOCATION_SZONE,1,1,nil) - if g:GetCount()>0 then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) - end - elseif sel==2 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local g=Duel.SelectTarget(tp,c39978267.eqfilter,tp,LOCATION_SZONE,LOCATION_SZONE,1,1,nil,e:GetHandler()) - if g:GetCount()>0 then - Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,0,0) - end - end -end -function c39978267.operation(e,tp,eg,ep,ev,re,r,rp) - local sel=e:GetLabel() - if sel==0 then return end - local tc=Duel.GetFirstTarget() - if sel==1 then - if tc and tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end - else - local c=e:GetHandler() - if tc and tc:IsRelateToEffect(e) and c:IsRelateToEffect(e) and c:IsFaceup() then - Duel.Equip(tp,tc,e:GetHandler()) - end - end -end diff --git a/script/c39980304.lua b/script/c39980304.lua deleted file mode 100644 index 77c0d27d85..0000000000 --- a/script/c39980304.lua +++ /dev/null @@ -1,61 +0,0 @@ ---チェーン・マテリアル -function c39980304.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c39980304.cost) - e1:SetOperation(c39980304.activate) - c:RegisterEffect(e1) -end -function c39980304.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_ATTACK)==0 end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetProperty(EFFECT_FLAG_OATH+EFFECT_FLAG_IGNORE_IMMUNE) - e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function c39980304.activate(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetDescription(aux.Stringid(39980304,0)) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CHAIN_MATERIAL) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_END) - e1:SetTarget(c39980304.chain_target) - e1:SetOperation(c39980304.chain_operation) - e1:SetValue(aux.TRUE) - Duel.RegisterEffect(e1,tp) -end -function c39980304.filter(c,e) - return c:IsCanBeFusionMaterial() and c:IsAbleToRemove() and not c:IsImmuneToEffect(e) -end -function c39980304.chain_target(e,te,tp) - return Duel.GetMatchingGroup(c39980304.filter,tp,LOCATION_MZONE+LOCATION_GRAVE+LOCATION_HAND+LOCATION_DECK,0,nil,te) -end -function c39980304.chain_operation(e,te,tp,tc,mat,sumtype) - if not sumtype then sumtype=SUMMON_TYPE_FUSION end - tc:SetMaterial(mat) - Duel.Remove(mat,POS_FACEUP,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION) - Duel.BreakEffect() - Duel.SpecialSummon(tc,sumtype,tp,tp,false,false,POS_FACEUP) - tc:RegisterFlagEffect(39980304,RESET_EVENT+0x1fc0000+RESET_PHASE+RESET_END,0,1) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetOwnerPlayer(tp) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetOperation(c39980304.desop) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e1:SetCountLimit(1) - tc:RegisterEffect(e1) -end -function c39980304.desop(e,tp,eg,ep,ev,re,r,rp) - Duel.Destroy(e:GetHandler(),REASON_EFFECT) -end \ No newline at end of file diff --git a/script/c39984786.lua b/script/c39984786.lua deleted file mode 100644 index ac2777c7af..0000000000 --- a/script/c39984786.lua +++ /dev/null @@ -1,54 +0,0 @@ ---スパウン・アリゲーター -function c39984786.initial_effect(c) - --tribute check - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_MATERIAL_CHECK) - e1:SetValue(c39984786.valcheck) - c:RegisterEffect(e1) -end -function c39984786.valcheck(e,c) - local g=c:GetMaterial() - local tc=g:GetFirst() - local sp=false - while tc do - if tc:IsRace(RACE_REPTILE) then - tc:RegisterFlagEffect(39984786,RESET_EVENT+0x17a0000+RESET_PHASE+PHASE_END,0,1) - sp=true - end - tc=g:GetNext() - end - if sp then - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(39984786,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetTarget(c39984786.sptg) - e1:SetOperation(c39984786.spop) - e1:SetReset(RESET_EVENT+0xfc0000+RESET_PHASE+PHASE_END) - c:RegisterEffect(e1) - end -end -function c39984786.filter(c,e,tp) - return c:GetFlagEffect(39984786)~=0 and c:IsCanBeEffectTarget(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c39984786.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return e:GetHandler():GetMaterial():IsContains(chkc) and c39984786.filter(chkc,e,tp) end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local mg=e:GetHandler():GetMaterial() - local g=mg:FilterSelect(tp,c39984786.filter,1,1,nil,e,tp) - Duel.SetTargetCard(g) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,g:GetCount(),0,0) -end -function c39984786.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c39987164.lua b/script/c39987164.lua deleted file mode 100644 index 7015ca774e..0000000000 --- a/script/c39987164.lua +++ /dev/null @@ -1,86 +0,0 @@ ---ヴァイロン・ディシグマ -function c39987164.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,4,3) - c:EnableReviveLimit() - --equip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(39987164,0)) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCost(c39987164.eqcost) - e1:SetTarget(c39987164.eqtg) - e1:SetOperation(c39987164.eqop) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(39987164,1)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_BATTLE_START) - e2:SetCondition(c39987164.descon) - e2:SetTarget(c39987164.destg) - e2:SetOperation(c39987164.desop) - c:RegisterEffect(e2) -end -function c39987164.eqcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c39987164.filter(c) - return c:IsFaceup() and c:IsAttackPos() and c:IsType(TYPE_EFFECT) and c:IsAbleToChangeControler() -end -function c39987164.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c39987164.filter(chkc) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingTarget(c39987164.filter,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local g=Duel.SelectTarget(tp,c39987164.filter,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0) -end -function c39987164.eqlimit(e,c) - return e:GetOwner()==c -end -function c39987164.eqop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) and tc:IsAttackPos() and tc:IsRelateToEffect(e) then - if c:IsFaceup() and c:IsRelateToEffect(e) then - if not Duel.Equip(tp,tc,c,false) then return end - --Add Equip limit - tc:RegisterFlagEffect(39987164,RESET_EVENT+0x1fe0000,0,0) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_COPY_INHERIT+EFFECT_FLAG_OWNER_RELATE) - e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(c39987164.eqlimit) - tc:RegisterEffect(e1) - else Duel.SendtoGrave(tc,REASON_EFFECT) end - end -end -function c39987164.desfilter(c,att) - return c:GetFlagEffect(39987164)~=0 and c:IsAttribute(att) -end -function c39987164.descon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local dt=Duel.GetAttacker() - if dt==c then dt=Duel.GetAttackTarget() end - if not dt or dt:IsFacedown() then return false end - e:SetLabelObject(dt) - local att=dt:GetAttribute() - return c:GetEquipGroup():IsExists(c39987164.desfilter,1,nil,att) -end -function c39987164.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetLabelObject(),1,0,0) -end -function c39987164.desop(e,tp,eg,ep,ev,re,r,rp) - local dt=e:GetLabelObject() - if dt:IsRelateToBattle() then - Duel.Destroy(dt,REASON_EFFECT) - end -end diff --git a/script/c40012727.lua b/script/c40012727.lua deleted file mode 100644 index 704868b339..0000000000 --- a/script/c40012727.lua +++ /dev/null @@ -1,31 +0,0 @@ ---バスター・スラッシュ -function c40012727.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,0x1e0) - e1:SetCondition(c40012727.condition) - e1:SetTarget(c40012727.target) - e1:SetOperation(c40012727.activate) - c:RegisterEffect(e1) -end -function c40012727.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x104f) -end -function c40012727.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c40012727.cfilter,tp,LOCATION_MZONE,0,1,nil) -end -function c40012727.filter(c) - return c:IsFaceup() and c:IsDestructable() -end -function c40012727.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c40012727.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - local dg=Duel.GetMatchingGroup(c40012727.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,dg,dg:GetCount(),0,0) -end -function c40012727.activate(e,tp,eg,ep,ev,re,r,rp) - local dg=Duel.GetMatchingGroup(c40012727.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - Duel.Destroy(dg,REASON_EFFECT) -end diff --git a/script/c40028305.lua b/script/c40028305.lua deleted file mode 100644 index 7ae7cc0151..0000000000 --- a/script/c40028305.lua +++ /dev/null @@ -1,81 +0,0 @@ ---超重武者装留シャイン・クロー -function c40028305.initial_effect(c) - --equip - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_HAND+LOCATION_MZONE) - e1:SetTarget(c40028305.eqtg) - e1:SetOperation(c40028305.eqop) - c:RegisterEffect(e1) -end -function c40028305.eqfilter(c) - return c:IsFaceup() and c:IsSetCard(0x9a) -end -function c40028305.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c40028305.eqfilter(chkc) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingTarget(c40028305.eqfilter,tp,LOCATION_MZONE,0,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c40028305.eqfilter,tp,LOCATION_MZONE,0,1,1,e:GetHandler()) -end -function c40028305.eqop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) then return end - if c:IsLocation(LOCATION_MZONE) and c:IsFacedown() then return end - local tc=Duel.GetFirstTarget() - if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or tc:GetControler()~=tp or tc:IsFacedown() or not tc:IsRelateToEffect(e) then - Duel.SendtoGrave(c,REASON_EFFECT) - return - end - Duel.Equip(tp,c,tc,true) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(c40028305.eqlimit) - e1:SetLabelObject(tc) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(500) - e2:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EFFECT_UPDATE_DEFENCE) - c:RegisterEffect(e3) - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_EQUIP) - e4:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e4:SetReset(RESET_EVENT+0x1fe0000) - e4:SetValue(1) - c:RegisterEffect(e4) - local e5=Effect.CreateEffect(c) - e5:SetCategory(CATEGORY_SPECIAL_SUMMON) - e5:SetType(EFFECT_TYPE_IGNITION) - e5:SetRange(LOCATION_SZONE) - e5:SetCountLimit(1,40028305) - e5:SetTarget(c40028305.sptg) - e5:SetOperation(c40028305.spop) - e5:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e5) -end -function c40028305.eqlimit(e,c) - return c==e:GetLabelObject() -end -function c40028305.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c40028305.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) then return end - if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then - elseif Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then - Duel.SendtoGrave(c,REASON_EFFECT) - end -end diff --git a/script/c40044918.lua b/script/c40044918.lua deleted file mode 100644 index 05fc16508c..0000000000 --- a/script/c40044918.lua +++ /dev/null @@ -1,71 +0,0 @@ ---E・HERO エアーマン -function c40044918.initial_effect(c) - --effect - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(40044918,0)) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c40044918.tg) - e1:SetOperation(c40044918.op) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e2) -end -function c40044918.ctfilter(c) - return c:IsFaceup() and c:IsSetCard(0x8) -end -function c40044918.schfilter(c) - return c:IsSetCard(0x8) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() -end -function c40044918.desfilter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable() -end -function c40044918.tg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then - local ct=Duel.GetMatchingGroupCount(c40044918.ctfilter,tp,LOCATION_MZONE,0,c) - local sel=0 - if ct>0 and Duel.IsExistingMatchingCard(c40044918.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) then sel=sel+1 end - if Duel.IsExistingMatchingCard(c40044918.schfilter,tp,LOCATION_DECK,0,1,nil) then sel=sel+2 end - e:SetLabel(sel) - return sel~=0 - end - local sel=e:GetLabel() - if sel==3 then - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(40044918,0)) - sel=Duel.SelectOption(tp,aux.Stringid(40044918,1),aux.Stringid(40044918,2))+1 - elseif sel==1 then - Duel.SelectOption(tp,aux.Stringid(40044918,1)) - else - Duel.SelectOption(tp,aux.Stringid(40044918,2)) - end - e:SetLabel(sel) - if sel==1 then - local g=Duel.GetMatchingGroup(c40044918.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) - else Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) end -end -function c40044918.op(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local sel=e:GetLabel() - if sel==1 then - local ct=Duel.GetMatchingGroupCount(c40044918.ctfilter,tp,LOCATION_MZONE,0,c) - local g=Duel.GetMatchingGroup(c40044918.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) - if ct>0 and g:GetCount()>0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local dg=g:Select(tp,1,ct,nil) - Duel.HintSelection(dg) - Duel.Destroy(dg,REASON_EFFECT) - end - else - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c40044918.schfilter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end - end -end diff --git a/script/c40048324.lua b/script/c40048324.lua deleted file mode 100644 index 5903fba5f0..0000000000 --- a/script/c40048324.lua +++ /dev/null @@ -1,32 +0,0 @@ ---アーケイン・ファイロ -function c40048324.initial_effect(c) - --search - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(40048324,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DELAY) - e1:SetCode(EVENT_BE_MATERIAL) - e1:SetCondition(c40048324.condition) - e1:SetTarget(c40048324.target) - e1:SetOperation(c40048324.operation) - c:RegisterEffect(e1) -end -function c40048324.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsLocation(LOCATION_GRAVE) and r==REASON_SYNCHRO -end -function c40048324.filter(c) - return c:IsCode(80280737) and c:IsAbleToHand() -end -function c40048324.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c40048324.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c40048324.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local tc=Duel.GetFirstMatchingCard(c40048324.filter,tp,LOCATION_DECK,0,nil) - if tc then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end diff --git a/script/c40061558.lua b/script/c40061558.lua deleted file mode 100644 index 3d9207a176..0000000000 --- a/script/c40061558.lua +++ /dev/null @@ -1,80 +0,0 @@ ---アポクリフォート・カーネル -function c40061558.initial_effect(c) - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - c:RegisterEffect(e1) - --tribute limit - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_TRIBUTE_LIMIT) - e2:SetValue(c40061558.tlimit) - c:RegisterEffect(e2) - --summon with 3 tribute - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e3:SetCode(EFFECT_LIMIT_SUMMON_PROC) - e3:SetCondition(c40061558.ttcon) - e3:SetOperation(c40061558.ttop) - e3:SetValue(SUMMON_TYPE_ADVANCE) - c:RegisterEffect(e3) - local e4=e3:Clone() - e4:SetCode(EFFECT_LIMIT_SET_PROC) - c:RegisterEffect(e4) - --immune - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_SINGLE) - e5:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_UNCOPYABLE) - e5:SetRange(LOCATION_MZONE) - e5:SetCode(EFFECT_IMMUNE_EFFECT) - e5:SetCondition(c40061558.immcon) - e5:SetValue(c40061558.efilter) - c:RegisterEffect(e5) - --control - local e6=Effect.CreateEffect(c) - e6:SetCategory(CATEGORY_CONTROL) - e6:SetType(EFFECT_TYPE_IGNITION) - e6:SetProperty(EFFECT_FLAG_CARD_TARGET) - e6:SetRange(LOCATION_MZONE) - e6:SetCountLimit(1) - e6:SetTarget(c40061558.cttg) - e6:SetOperation(c40061558.ctop) - c:RegisterEffect(e6) -end -function c40061558.tlimit(e,c) - return not c:IsSetCard(0xaa) -end -function c40061558.ttcon(e,c) - if c==nil then return true end - return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-3 and Duel.GetTributeCount(c)>=3 -end -function c40061558.ttop(e,tp,eg,ep,ev,re,r,rp,c) - local g=Duel.SelectTribute(tp,c,3,3) - c:SetMaterial(g) - Duel.Release(g,REASON_SUMMON+REASON_MATERIAL) -end -function c40061558.immcon(e) - return bit.band(e:GetHandler():GetSummonType(),SUMMON_TYPE_NORMAL)==SUMMON_TYPE_NORMAL -end -function c40061558.efilter(e,te) - if te:IsActiveType(TYPE_SPELL+TYPE_TRAP) then return true - else return aux.qlifilter(e,te) end -end -function c40061558.cttg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsControlerCanBeChanged() end - if chk==0 then return Duel.IsExistingTarget(Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) - local g=Duel.SelectTarget(tp,Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0) -end -function c40061558.ctop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and not Duel.GetControl(tc,tp,PHASE_END,1) then - if not tc:IsImmuneToEffect(e) and tc:IsAbleToChangeControler() then - Duel.Destroy(tc,REASON_EFFECT) - end - end -end diff --git a/script/c40089744.lua b/script/c40089744.lua deleted file mode 100644 index e5e63c575f..0000000000 --- a/script/c40089744.lua +++ /dev/null @@ -1,76 +0,0 @@ ---混沌の場 -function c40089744.initial_effect(c) - c:EnableCounterPermit(0x3001) - c:SetCounterLimit(0x3001,6) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,40089744+EFFECT_COUNT_CODE_OATH) - e1:SetTarget(c40089744.target) - e1:SetOperation(c40089744.activate) - c:RegisterEffect(e1) - --add counter - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetRange(LOCATION_FZONE) - e2:SetOperation(c40089744.acop) - c:RegisterEffect(e2) - --to hand - local e3=Effect.CreateEffect(c) - e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_FZONE) - e3:SetCountLimit(1) - e3:SetCost(c40089744.thcost) - e3:SetTarget(c40089744.thtg) - e3:SetOperation(c40089744.thop) - c:RegisterEffect(e3) -end -function c40089744.filter(c) - return ((c:IsSetCard(0xcf) and c:IsType(TYPE_RITUAL)) or c:IsSetCard(0xbd)) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() -end -function c40089744.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c40089744.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c40089744.activate(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c40089744.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end -function c40089744.cfilter(c) - return c:IsType(TYPE_MONSTER) and c:IsPreviousLocation(LOCATION_HAND+LOCATION_ONFIELD) -end -function c40089744.acop(e,tp,eg,ep,ev,re,r,rp) - local ct=eg:FilterCount(c40089744.cfilter,nil) - if ct>0 then - e:GetHandler():AddCounter(0x3001,ct) - end -end -function c40089744.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsCanRemoveCounter(tp,0x3001,3,REASON_COST) end - e:GetHandler():RemoveCounter(tp,0x3001,3,REASON_COST) -end -function c40089744.thfilter(c) - return c:GetType()==TYPE_SPELL+TYPE_RITUAL and c:IsAbleToHand() -end -function c40089744.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c40089744.thfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c40089744.thop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c40089744.thfilter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c40101111.lua b/script/c40101111.lua deleted file mode 100644 index 89282e7331..0000000000 --- a/script/c40101111.lua +++ /dev/null @@ -1,62 +0,0 @@ ---アルティメットサイキッカー -function c40101111.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcFun2(c,c40101111.ffilter,aux.FilterBoolFunction(Card.IsRace,RACE_PSYCHO),true) - --pierce - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_PIERCE) - c:RegisterEffect(e2) - --cannot be destroyed - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e3:SetRange(LOCATION_MZONE) - e3:SetValue(1) - c:RegisterEffect(e3) - --fusion success - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(40101111,0)) - e4:SetCategory(CATEGORY_RECOVER) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e4:SetCode(EVENT_BATTLE_DESTROYING) - e4:SetCondition(c40101111.recon) - e4:SetTarget(c40101111.rectg) - e4:SetOperation(c40101111.recop) - c:RegisterEffect(e4) - --spsummon condition - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_SINGLE) - e5:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e5:SetCode(EFFECT_SPSUMMON_CONDITION) - e5:SetValue(c40101111.splimit) - c:RegisterEffect(e5) -end -function c40101111.splimit(e,se,sp,st) - if e:GetHandler():IsLocation(LOCATION_EXTRA) then - return bit.band(st,SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION - end - return true -end -function c40101111.ffilter(c) - return c:IsType(TYPE_SYNCHRO) and c:IsRace(RACE_PSYCHO) -end -function c40101111.recon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local bc=c:GetBattleTarget() - return c:IsRelateToBattle() and bc:IsLocation(LOCATION_GRAVE) and bc:IsType(TYPE_MONSTER) -end -function c40101111.rectg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local rec=e:GetHandler():GetBattleTarget():GetAttack() - if rec<0 then rec=0 end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(rec) - Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,rec) -end -function c40101111.recop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Recover(p,d,REASON_EFFECT) -end diff --git a/script/c40133511.lua b/script/c40133511.lua deleted file mode 100644 index dda8a35c3d..0000000000 --- a/script/c40133511.lua +++ /dev/null @@ -1,35 +0,0 @@ ---魂を喰らう者 バズー -function c40133511.initial_effect(c) - --atkup - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(40133511,0)) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCost(c40133511.cost) - e1:SetOperation(c40133511.operation) - c:RegisterEffect(e1) -end -function c40133511.cfilter(c) - return c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost() -end -function c40133511.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c40133511.cfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local cg=Duel.SelectMatchingCard(tp,c40133511.cfilter,tp,LOCATION_GRAVE,0,1,3,nil) - Duel.Remove(cg,POS_FACEUP,REASON_COST) - e:SetLabel(cg:GetCount()) -end -function c40133511.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local count=e:GetLabel() - if c:IsFaceup() and c:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(count*300) - e1:SetReset(RESET_EVENT+0x1ff0000+RESET_PHASE+PHASE_END,2) - c:RegisterEffect(e1) - end -end diff --git a/script/c40143123.lua b/script/c40143123.lua deleted file mode 100644 index bd89ef5dfb..0000000000 --- a/script/c40143123.lua +++ /dev/null @@ -1,28 +0,0 @@ ---セイクリッド・スピカ -function c40143123.initial_effect(c) - --summon success - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(40143123,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_SUMMON_SUCCESS) - e2:SetTarget(c40143123.sptg) - e2:SetOperation(c40143123.spop) - c:RegisterEffect(e2) -end -function c40143123.filter(c,e,tp) - return c:IsSetCard(0x53) and c:GetLevel()==5 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c40143123.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c40143123.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c40143123.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c40143123.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENCE) - end -end diff --git a/script/c40159926.lua b/script/c40159926.lua deleted file mode 100644 index cb9c8b83a2..0000000000 --- a/script/c40159926.lua +++ /dev/null @@ -1,70 +0,0 @@ ---ミラー・リゾネーター -function c40159926.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(40159926,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND+LOCATION_GRAVE) - e1:SetCountLimit(1,40159926) - e1:SetCondition(c40159926.condition) - e1:SetTarget(c40159926.target) - e1:SetOperation(c40159926.operation) - c:RegisterEffect(e1) - --synchro level - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(40159926,1)) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetTarget(c40159926.lvtg) - e2:SetOperation(c40159926.lvop) - c:RegisterEffect(e2) -end -function c40159926.cfilter(c) - return c:GetSummonLocation()==LOCATION_EXTRA -end -function c40159926.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c40159926.cfilter,tp,0,LOCATION_MZONE,1,nil) - and not Duel.IsExistingMatchingCard(c40159926.cfilter,tp,LOCATION_MZONE,0,1,nil) -end -function c40159926.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c40159926.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+0x47e0000) - e1:SetValue(LOCATION_REMOVED) - c:RegisterEffect(e1,true) - end -end -function c40159926.lvfilter(c) - return c:IsFaceup() and c:GetOriginalLevel()>0 -end -function c40159926.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and c40159926.lvfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c40159926.lvfilter,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c40159926.lvfilter,tp,0,LOCATION_MZONE,1,1,nil) -end -function c40159926.lvop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsFaceup() and c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SYNCHRO_LEVEL) - e1:SetValue(tc:GetOriginalLevel()) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - c:RegisterEffect(e1) - c:SetHint(CHINT_NUMBER,tc:GetOriginalLevel()) - end -end diff --git a/script/c40160226.lua b/script/c40160226.lua deleted file mode 100644 index 0a41b54f38..0000000000 --- a/script/c40160226.lua +++ /dev/null @@ -1,52 +0,0 @@ ---機海竜プレシオン -function c40160226.initial_effect(c) - --summon with no tribute - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(40160226,0)) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SUMMON_PROC) - e1:SetCondition(c40160226.ntcon) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(40160226,1)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCost(c40160226.cost) - e2:SetTarget(c40160226.target) - e2:SetOperation(c40160226.operation) - c:RegisterEffect(e2) -end -function c40160226.ntfilter(c) - return c:IsFaceup() and c:IsRace(RACE_SEASERPENT) -end -function c40160226.ntcon(e,c,minc) - if c==nil then return true end - return minc==0 and c:GetLevel()>4 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c40160226.ntfilter,c:GetControler(),LOCATION_MZONE,0,1,nil) -end -function c40160226.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsAttribute,1,nil,ATTRIBUTE_WATER) end - local g=Duel.SelectReleaseGroup(tp,Card.IsAttribute,1,1,nil,ATTRIBUTE_WATER) - Duel.Release(g,REASON_COST) -end -function c40160226.filter(c) - return c:IsFaceup() and c:IsDestructable() -end -function c40160226.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and c40160226.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c40160226.filter,tp,0,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c40160226.filter,tp,0,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c40160226.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c40164421.lua b/script/c40164421.lua deleted file mode 100644 index 09624c88df..0000000000 --- a/script/c40164421.lua +++ /dev/null @@ -1,81 +0,0 @@ ---ライトロード・メイデン ミネルバ -function c40164421.initial_effect(c) - --search - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(40164421,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c40164421.thtg) - e1:SetOperation(c40164421.thop) - c:RegisterEffect(e1) - --discard deck - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(40164421,1)) - e2:SetCategory(CATEGORY_DECKDES) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetCondition(c40164421.discon) - e2:SetTarget(c40164421.distg) - e2:SetOperation(c40164421.disop) - c:RegisterEffect(e2) - --discard deck2 - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(40164421,2)) - e3:SetCategory(CATEGORY_DECKDES) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e3:SetCode(EVENT_PHASE+PHASE_END) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1) - e3:SetCondition(c40164421.discon2) - e3:SetTarget(c40164421.distg2) - e3:SetOperation(c40164421.disop2) - c:RegisterEffect(e3) -end -function c40164421.cfilter(c) - return c:IsSetCard(0x38) and c:IsType(TYPE_MONSTER) -end -function c40164421.thfilter(c,lv) - return c:IsLevelBelow(lv) and c:IsRace(RACE_DRAGON) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsAbleToHand() -end -function c40164421.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local g=Duel.GetMatchingGroup(c40164421.cfilter,tp,LOCATION_GRAVE,0,nil) - local ct=g:GetClassCount(Card.GetCode) - return Duel.IsExistingMatchingCard(c40164421.thfilter,tp,LOCATION_DECK,0,1,nil,ct) - end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c40164421.thop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c40164421.cfilter,tp,LOCATION_GRAVE,0,nil) - local ct=g:GetClassCount(Card.GetCode) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local sg=Duel.SelectMatchingCard(tp,c40164421.thfilter,tp,LOCATION_DECK,0,1,1,nil,ct) - if sg:GetCount()>0 then - Duel.SendtoHand(sg,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,sg) - end -end -function c40164421.discon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_DECK+LOCATION_HAND) -end -function c40164421.distg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(1) - Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,1) -end -function c40164421.disop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.DiscardDeck(p,d,REASON_EFFECT) -end -function c40164421.discon2(e,tp,eg,ep,ev,re,r,rp) - return tp==Duel.GetTurnPlayer() -end -function c40164421.distg2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,2) -end -function c40164421.disop2(e,tp,eg,ep,ev,re,r,rp) - Duel.DiscardDeck(tp,2,REASON_EFFECT) -end diff --git a/script/c40172183.lua b/script/c40172183.lua deleted file mode 100644 index 0a9cea9a70..0000000000 --- a/script/c40172183.lua +++ /dev/null @@ -1,26 +0,0 @@ ---狭き通路 -function c40172183.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c40172183.condition) - e1:SetHintTiming(0,TIMING_DRAW_PHASE) - c:RegisterEffect(e1) - -- - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetRange(LOCATION_SZONE) - e2:SetCode(EFFECT_CANNOT_SUMMON) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetTargetRange(1,1) - e2:SetTarget(c40172183.sumlimit) - c:RegisterEffect(e2) -end -function c40172183.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)<=2 - and Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)<=2 -end -function c40172183.sumlimit(e,c,sp,st) - return Duel.GetFieldGroupCount(sp,LOCATION_MZONE,0)>=2 -end diff --git a/script/c40173854.lua b/script/c40173854.lua deleted file mode 100644 index d29f9dba7c..0000000000 --- a/script/c40173854.lua +++ /dev/null @@ -1,6 +0,0 @@ ---水陸両用バグロス -function c40173854.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcCode2(c,58314394,85448931,true,true) -end diff --git a/script/c40189917.lua b/script/c40189917.lua deleted file mode 100644 index 31a9a726e3..0000000000 --- a/script/c40189917.lua +++ /dev/null @@ -1,66 +0,0 @@ ---フレムベル・デスガンナー -function c40189917.initial_effect(c) - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(aux.FALSE) - c:RegisterEffect(e1) - --summon - local e2=Effect.CreateEffect(c) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_LIMIT_SUMMON_PROC) - e2:SetCondition(c40189917.sumcon) - e2:SetOperation(c40189917.sumop) - e2:SetValue(SUMMON_TYPE_ADVANCE) - c:RegisterEffect(e2) - --damage - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(40189917,0)) - e3:SetCategory(CATEGORY_DAMAGE) - e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1) - e3:SetCost(c40189917.damcost) - e3:SetTarget(c40189917.damtg) - e3:SetOperation(c40189917.damop) - c:RegisterEffect(e3) -end -function c40189917.mfilter(c,tp) - return c:IsSetCard(0x2c) and (c:IsControler(tp) or c:IsFaceup()) -end -function c40189917.sumcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - local mg=Duel.GetMatchingGroup(c40189917.mfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp) - return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 and Duel.GetTributeCount(c,mg)>0 -end -function c40189917.sumop(e,tp,eg,ep,ev,re,r,rp,c) - local mg=Duel.GetMatchingGroup(c40189917.mfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp) - local sg=Duel.SelectTribute(tp,c,1,1,mg) - c:SetMaterial(sg) - Duel.Release(sg,REASON_SUMMON+REASON_MATERIAL) -end -function c40189917.cfilter(c) - return c:GetDefence()==200 and c:IsAbleToRemoveAsCost() -end -function c40189917.damcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c40189917.cfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c40189917.cfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) - e:SetLabel(g:GetFirst():GetAttack()) -end -function c40189917.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(e:GetLabel()) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,e:GetLabel()) -end -function c40189917.damop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c40213117.lua b/script/c40213117.lua deleted file mode 100644 index 601a1ed11e..0000000000 --- a/script/c40213117.lua +++ /dev/null @@ -1,40 +0,0 @@ ---魔導弓士 ラムール -function c40213117.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(40213117,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCost(c40213117.spcost) - e1:SetTarget(c40213117.sptg) - e1:SetOperation(c40213117.spop) - c:RegisterEffect(e1) -end -function c40213117.cffilter(c) - return c:IsSetCard(0x106e) and c:IsType(TYPE_SPELL) and not c:IsPublic() -end -function c40213117.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c40213117.cffilter,tp,LOCATION_HAND,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) - local g=Duel.SelectMatchingCard(tp,c40213117.cffilter,tp,LOCATION_HAND,0,1,1,e:GetHandler()) - Duel.ConfirmCards(1-tp,g) - Duel.ShuffleHand(tp) -end -function c40213117.filter(c,e,tp) - return c:IsLevelBelow(4) and c:IsRace(RACE_SPELLCASTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c40213117.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c40213117.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c40213117.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c40213117.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c40217358.lua b/script/c40217358.lua deleted file mode 100644 index fb48f571c6..0000000000 --- a/script/c40217358.lua +++ /dev/null @@ -1,75 +0,0 @@ ---ブルー・ダストン -function c40217358.initial_effect(c) - c:SetUniqueOnField(1,0,40217358) - --cannot release - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_UNRELEASABLE_SUM) - e1:SetValue(1) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_UNRELEASABLE_NONSUM) - c:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e3:SetCode(EFFECT_CANNOT_BE_FUSION_MATERIAL) - e3:SetValue(1) - c:RegisterEffect(e3) - local e4=e3:Clone() - e4:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL) - c:RegisterEffect(e4) - local e5=e3:Clone() - e5:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL) - c:RegisterEffect(e5) - --banish - local e6=Effect.CreateEffect(c) - e6:SetDescription(aux.Stringid(40217358,0)) - e6:SetCategory(CATEGORY_REMOVE) - e6:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e6:SetCode(EVENT_DESTROYED) - e6:SetCondition(c40217358.rmcon) - e6:SetTarget(c40217358.rmtg) - e6:SetOperation(c40217358.rmop) - c:RegisterEffect(e6) -end -function c40217358.rmcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsReason(REASON_DESTROY) and c:IsPreviousLocation(LOCATION_ONFIELD) -end -function c40217358.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local pre=e:GetHandler():GetPreviousControler() - Duel.SetTargetPlayer(pre) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,pre,LOCATION_HAND) -end -function c40217358.rmop(e,tp,eg,ep,ev,re,r,rp) - local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) - local g=Duel.GetFieldGroup(p,LOCATION_HAND,0) - if g:GetCount()==0 then return end - local sg=g:RandomSelect(p,1) - Duel.Remove(sg,POS_FACEDOWN,REASON_EFFECT) - local tc=sg:GetFirst() - tc:RegisterFlagEffect(40217358,RESET_EVENT+0x1fe0000,0,0) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) - e1:SetCountLimit(1) - e1:SetCondition(c40217358.retcon) - e1:SetOperation(c40217358.retop) - e1:SetLabel(Duel.GetTurnCount()+1) - e1:SetLabelObject(tc) - Duel.RegisterEffect(e1,tp) -end -function c40217358.retcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnCount()==e:GetLabel() -end -function c40217358.retop(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetLabelObject() - if tc:GetFlagEffect(40217358)~=0 then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - end - e:Reset() -end diff --git a/script/c40225398.lua b/script/c40225398.lua deleted file mode 100644 index 0d4c13c4e0..0000000000 --- a/script/c40225398.lua +++ /dev/null @@ -1,20 +0,0 @@ ---ツイン・ブレイカー -function c40225398.initial_effect(c) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_DAMAGE_STEP_END) - e1:SetOperation(c40225398.caop) - c:RegisterEffect(e1) - --pierce - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_PIERCE) - c:RegisterEffect(e2) -end -function c40225398.caop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local bc=c:GetBattleTarget() - if Duel.GetAttacker()==c and bc and bit.band(bc:GetBattlePosition(),POS_DEFENCE)~=0 and c:IsRelateToBattle() and c:IsChainAttackable() then - Duel.ChainAttack() - end -end diff --git a/script/c4022819.lua b/script/c4022819.lua deleted file mode 100644 index 658ff5e6e2..0000000000 --- a/script/c4022819.lua +++ /dev/null @@ -1,108 +0,0 @@ ---聖刻龍-アセトドラゴン -function c4022819.initial_effect(c) - --summon with no tribute - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(4022819,0)) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SUMMON_PROC) - e1:SetCondition(c4022819.ntcon) - e1:SetOperation(c4022819.ntop) - c:RegisterEffect(e1) - --lvchange - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(4022819,1)) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetTarget(c4022819.lvtg) - e2:SetOperation(c4022819.lvop) - c:RegisterEffect(e2) - --spsummon - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(4022819,2)) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetCode(EVENT_RELEASE) - e3:SetTarget(c4022819.sptg) - e3:SetOperation(c4022819.spop) - c:RegisterEffect(e3) -end -function c4022819.ntcon(e,c,minc) - if c==nil then return true end - return minc==0 and c:GetLevel()>4 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 -end -function c4022819.ntop(e,tp,eg,ep,ev,re,r,rp,c) - --change base attack - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetReset(RESET_EVENT+0xff0000) - e1:SetCode(EFFECT_SET_BASE_ATTACK) - e1:SetValue(1000) - c:RegisterEffect(e1) -end -function c4022819.lvfilter(c) - return c:IsFaceup() and c:IsType(TYPE_NORMAL) and c:IsRace(RACE_DRAGON) -end -function c4022819.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c4022819.lvfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c4022819.lvfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c4022819.lvfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) -end -function c4022819.lvfilter2(c) - return c:IsFaceup() and c:IsSetCard(0x69) and not c:IsType(TYPE_XYZ) -end -function c4022819.lvop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if not tc:IsRelateToEffect(e) or tc:IsFacedown() then return end - local g=Duel.GetMatchingGroup(c4022819.lvfilter2,tp,LOCATION_MZONE,LOCATION_MZONE,tc) - local lc=g:GetFirst() - local lv=tc:GetLevel() - while lc~=nil do - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CHANGE_LEVEL) - e1:SetValue(lv) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - lc:RegisterEffect(e1) - lc=g:GetNext() - end -end -function c4022819.spfilter(c,e,tp) - return c:IsType(TYPE_NORMAL) and c:IsRace(RACE_DRAGON) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) - and not c:IsHasEffect(EFFECT_NECRO_VALLEY) -end -function c4022819.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,0x13) -end -function c4022819.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c4022819.spfilter,tp,0x13,0,1,1,nil,e,tp) - local tc=g:GetFirst() - if tc and Duel.SpecialSummonStep(g:GetFirst(),0,tp,tp,false,false,POS_FACEUP) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK) - e1:SetValue(0) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_SET_DEFENCE) - tc:RegisterEffect(e2) - Duel.SpecialSummonComplete() - elseif Duel.IsPlayerCanSpecialSummon(tp) then - local cg1=Duel.GetFieldGroup(tp,LOCATION_HAND,0) - local cg2=Duel.GetFieldGroup(tp,LOCATION_DECK,0) - Duel.ConfirmCards(1-tp,cg1) - Duel.ConfirmCards(1-tp,cg2) - Duel.ConfirmCards(tp,cg2) - Duel.ShuffleHand(tp) - Duel.ShuffleDeck(tp) - end -end diff --git a/script/c40230018.lua b/script/c40230018.lua deleted file mode 100644 index e8c191641a..0000000000 --- a/script/c40230018.lua +++ /dev/null @@ -1,77 +0,0 @@ ---魔導書庫クレッセン -function c40230018.initial_effect(c) - --search - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(40230018,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,40230018+EFFECT_COUNT_CODE_OATH) - e1:SetCondition(c40230018.condition) - e1:SetCost(c40230018.cost) - e1:SetTarget(c40230018.target) - e1:SetOperation(c40230018.operation) - c:RegisterEffect(e1) - Duel.AddCustomActivityCounter(40230018,ACTIVITY_CHAIN,c40230018.chainfilter) -end -function c40230018.chainfilter(re,tp,cid) - return not (re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL) and not re:GetHandler():IsSetCard(0x106e)) -end -function c40230018.cfilter(c) - return c:IsSetCard(0x106e) and c:IsType(TYPE_SPELL) -end -function c40230018.condition(e,tp,eg,ep,ev,re,r,rp) - return not Duel.IsExistingMatchingCard(c40230018.cfilter,tp,LOCATION_GRAVE,0,1,nil) -end -function c40230018.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetCustomActivityCount(40230018,tp,ACTIVITY_CHAIN)==0 end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) - e1:SetCode(EFFECT_CANNOT_ACTIVATE) - e1:SetTargetRange(1,0) - e1:SetValue(c40230018.aclimit) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function c40230018.aclimit(e,re,tp) - return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL) and not re:GetHandler():IsSetCard(0x106e) -end -function c40230018.filter1(c) - return c:IsSetCard(0x106e) and c:IsType(TYPE_SPELL) and c:IsAbleToHand() -end -function c40230018.filter2(c) - return c:IsSetCard(0x106e) and c:IsType(TYPE_SPELL) -end -function c40230018.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local g=Duel.GetMatchingGroup(c40230018.filter1,tp,LOCATION_DECK,0,nil) - return g:GetClassCount(Card.GetCode)>=3 - end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,LOCATION_DECK) -end -function c40230018.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c40230018.filter2,tp,LOCATION_DECK,0,nil) - if g:GetClassCount(Card.GetCode)>=3 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) - local sg1=g:Select(tp,1,1,nil) - g:Remove(Card.IsCode,nil,sg1:GetFirst():GetCode()) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) - local sg2=g:Select(tp,1,1,nil) - g:Remove(Card.IsCode,nil,sg2:GetFirst():GetCode()) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) - local sg3=g:Select(tp,1,1,nil) - sg1:Merge(sg2) - sg1:Merge(sg3) - Duel.ConfirmCards(1-tp,sg1) - Duel.ShuffleDeck(tp) - Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_ATOHAND) - local tg=sg1:Select(1-tp,1,1,nil) - local tc=tg:GetFirst() - if tc:IsAbleToHand() then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - else - Duel.SendtoGrave(tc,REASON_EFFECT) - end - end -end diff --git a/script/c40240595.lua b/script/c40240595.lua deleted file mode 100644 index cc04f31cdc..0000000000 --- a/script/c40240595.lua +++ /dev/null @@ -1,74 +0,0 @@ ---進化の繭 -function c40240595.initial_effect(c) - --equip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(40240595,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetRange(LOCATION_HAND) - e1:SetTarget(c40240595.eqtg) - e1:SetOperation(c40240595.eqop) - c:RegisterEffect(e1) -end -function c40240595.filter(c) - return c:IsFaceup() and c:IsCode(58192742) -end -function c40240595.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c40240595.filter(chkc) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingTarget(c40240595.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c40240595.filter,tp,LOCATION_MZONE,0,1,1,nil) -end -function c40240595.eqop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) then return end - local tc=Duel.GetFirstTarget() - if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or tc:GetControler()~=tp or tc:IsFacedown() or not tc:IsRelateToEffect(e) then - Duel.SendtoGrave(c,REASON_EFFECT) - return - end - Duel.Equip(tp,c,tc,true) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetValue(c40240595.eqlimit) - e1:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetRange(LOCATION_SZONE) - e2:SetCode(EVENT_PHASE+PHASE_END) - e2:SetCondition(c40240595.checkcon) - e2:SetOperation(c40240595.checkop) - e2:SetCountLimit(1) - e2:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e2) - --equip effect - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_EQUIP) - e3:SetCode(EFFECT_SET_ATTACK) - e3:SetValue(0) - e3:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e3) - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_EQUIP) - e4:SetCode(EFFECT_SET_DEFENCE) - e4:SetValue(2000) - e4:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e4) - c:SetTurnCounter(0) -end -function c40240595.checkcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c40240595.checkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local ct=c:GetTurnCounter() - ct=ct+1 - c:SetTurnCounter(ct) -end -function c40240595.eqlimit(e,c) - return c:IsCode(58192742) -end diff --git a/script/c40253382.lua b/script/c40253382.lua deleted file mode 100644 index 1f1c6b5810..0000000000 --- a/script/c40253382.lua +++ /dev/null @@ -1,38 +0,0 @@ ---TG-SX1 -function c40253382.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetCondition(c40253382.condition) - e1:SetTarget(c40253382.target) - e1:SetOperation(c40253382.activate) - c:RegisterEffect(e1) -end -function c40253382.cfilter(c,tp) - local rc=c:GetReasonCard() - return c:IsLocation(LOCATION_GRAVE) and c:IsReason(REASON_BATTLE) - and rc:IsSetCard(0x27) and rc:IsControler(tp) and rc:IsRelateToBattle() -end -function c40253382.condition(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c40253382.cfilter,1,nil,tp) -end -function c40253382.filter(c,e,tp) - return c:IsSetCard(0x27) and c:IsType(TYPE_SYNCHRO) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c40253382.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c40253382.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c40253382.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c40253382.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c40253382.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c402568.lua b/script/c402568.lua deleted file mode 100644 index 328b37f643..0000000000 --- a/script/c402568.lua +++ /dev/null @@ -1,32 +0,0 @@ ---エレキリン -function c402568.initial_effect(c) - --direct attack - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DIRECT_ATTACK) - c:RegisterEffect(e1) - --act limit - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(402568,0)) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_BATTLE_DAMAGE) - e2:SetCondition(c402568.condition) - e2:SetOperation(c402568.operation) - c:RegisterEffect(e2) -end -function c402568.condition(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp and Duel.GetAttackTarget()==nil -end -function c402568.operation(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EFFECT_CANNOT_ACTIVATE) - e1:SetTargetRange(0,1) - e1:SetValue(c402568.aclimit) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function c402568.aclimit(e,re,tp) - return not re:GetHandler():IsImmuneToEffect(e) -end diff --git a/script/c40267580.lua b/script/c40267580.lua deleted file mode 100644 index 86a5d4ba26..0000000000 --- a/script/c40267580.lua +++ /dev/null @@ -1,77 +0,0 @@ ---ブレイン・ジャッカー -function c40267580.initial_effect(c) - --flip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(40267580,0)) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP) - e1:SetTarget(c40267580.eqtg) - e1:SetOperation(c40267580.eqop) - c:RegisterEffect(e1) - --recover - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(40267580,1)) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) - e2:SetRange(LOCATION_SZONE) - e2:SetCountLimit(1) - e2:SetCondition(c40267580.reccon) - e2:SetTarget(c40267580.rectg) - e2:SetOperation(c40267580.recop) - c:RegisterEffect(e2) -end -function c40267580.filter(c) - return c:IsFaceup() and c:IsControlerCanBeChanged() -end -function c40267580.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c40267580.filter(chkc) end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) - local g=Duel.SelectTarget(tp,c40267580.filter,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c40267580.eqlimit(e,c) - return e:GetOwner()==c -end -function c40267580.eqop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end - local tc=Duel.GetFirstTarget() - if tc and not c:IsStatus(STATUS_BATTLE_DESTROYED) and c:IsFaceup() and c:IsRelateToEffect(e) then - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - Duel.Equip(tp,c,tc) - --Add Equip limit - local e1=Effect.CreateEffect(tc) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(c40267580.eqlimit) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_SET_CONTROL) - e2:SetValue(tp) - e2:SetReset(RESET_EVENT+0x1fc0000) - c:RegisterEffect(e2) - else - Duel.SendtoGrave(c,REASON_EFFECT) - end - end -end -function c40267580.reccon(e,tp,eg,ep,ev,re,r,rp) - return tp~=Duel.GetTurnPlayer() -end -function c40267580.rectg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(500) - Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,1-tp,500) -end -function c40267580.recop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Recover(p,d,REASON_EFFECT) -end diff --git a/script/c40279770.lua b/script/c40279770.lua deleted file mode 100644 index fbd862b663..0000000000 --- a/script/c40279770.lua +++ /dev/null @@ -1,32 +0,0 @@ ---黒羽の導き -function c40279770.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_DAMAGE) - e1:SetCondition(c40279770.condition) - e1:SetTarget(c40279770.target) - e1:SetOperation(c40279770.activate) - c:RegisterEffect(e1) -end -function c40279770.condition(e,tp,eg,ep,ev,re,r,rp) - return ep==tp and bit.band(r,REASON_EFFECT)~=0 -end -function c40279770.filter(c,e,tp) - return c:IsSetCard(0x33) and c:GetLevel()<=4 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c40279770.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c40279770.filter,tp,LOCATION_HAND,0,1,nil,e,tp) - end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c40279770.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c40279770.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c40318957.lua b/script/c40318957.lua deleted file mode 100644 index b960a2f493..0000000000 --- a/script/c40318957.lua +++ /dev/null @@ -1,50 +0,0 @@ ---EMドクロバット・ジョーカー -function c40318957.initial_effect(c) - --pendulum summon - aux.AddPendulumProcedure(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --splimit - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetRange(LOCATION_PZONE) - e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE) - e2:SetTargetRange(1,0) - e2:SetCondition(aux.nfbdncon) - e2:SetTarget(c40318957.splimit) - c:RegisterEffect(e2) - --search - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(40318957,0)) - e3:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_SUMMON_SUCCESS) - e3:SetTarget(c40318957.thtg) - e3:SetOperation(c40318957.thop) - c:RegisterEffect(e3) -end -function c40318957.filter(c) - return c:IsSetCard(0x9f) or (c:IsSetCard(0x98) and c:IsType(TYPE_PENDULUM)) or c:IsSetCard(0x99) -end -function c40318957.splimit(e,c,tp,sumtp,sumpos) - return not c40318957.filter(c) and bit.band(sumtp,SUMMON_TYPE_PENDULUM)==SUMMON_TYPE_PENDULUM -end -function c40318957.thfilter(c) - return c40318957.filter(c) and not c:IsCode(40318957) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() -end -function c40318957.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c40318957.thfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c40318957.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c40318957.thfilter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c4031928.lua b/script/c4031928.lua deleted file mode 100644 index 625cdb1dcc..0000000000 --- a/script/c4031928.lua +++ /dev/null @@ -1,27 +0,0 @@ ---心変わり -function c4031928.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_CONTROL) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c4031928.target) - e1:SetOperation(c4031928.activate) - c:RegisterEffect(e1) -end -function c4031928.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsControlerCanBeChanged() end - if chk==0 then return Duel.IsExistingTarget(Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) - local g=Duel.SelectTarget(tp,Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0) -end -function c4031928.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and not Duel.GetControl(tc,tp,PHASE_END,1) then - if not tc:IsImmuneToEffect(e) and tc:IsAbleToChangeControler() then - Duel.Destroy(tc,REASON_EFFECT) - end - end -end diff --git a/script/c40320754.lua b/script/c40320754.lua deleted file mode 100644 index 34583520b3..0000000000 --- a/script/c40320754.lua +++ /dev/null @@ -1,33 +0,0 @@ ---ロードポイズン -function c40320754.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(40320754,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetCondition(c40320754.condition) - e1:SetTarget(c40320754.target) - e1:SetOperation(c40320754.operation) - c:RegisterEffect(e1) -end -function c40320754.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) -end -function c40320754.filter(c,e,tp) - return c:IsRace(RACE_PLANT) and c:GetCode()~=40320754 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c40320754.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c40320754.filter(chkc,e,tp) end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c40320754.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,g:GetCount(),0,0) -end -function c40320754.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c40343749.lua b/script/c40343749.lua deleted file mode 100644 index be159fcaf4..0000000000 --- a/script/c40343749.lua +++ /dev/null @@ -1,56 +0,0 @@ ---ハウスダストン -function c40343749.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(40343749,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCondition(c40343749.condition) - e1:SetTarget(c40343749.target) - e1:SetOperation(c40343749.operation) - c:RegisterEffect(e1) -end -function c40343749.condition(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsReason(REASON_BATTLE) then - return c:GetReasonPlayer()~=tp and bit.band(c:GetBattlePosition(),POS_FACEUP)~=0 - end - return rp~=tp and c:IsReason(REASON_DESTROY) and c:IsPreviousPosition(POS_FACEUP) - and c:IsPreviousLocation(LOCATION_ONFIELD) and c:GetPreviousControler()==tp -end -function c40343749.filter(c,e,tp) - return c:IsSetCard(0x80) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) - and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,1-tp) -end -function c40343749.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c40343749.filter,tp,LOCATION_DECK+LOCATION_HAND,0,2,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_DECK+LOCATION_HAND) -end -function c40343749.operation(e,tp,eg,ep,ev,re,r,rp) - local ft1=Duel.GetLocationCount(tp,LOCATION_MZONE) - local ft2=Duel.GetLocationCount(1-tp,LOCATION_MZONE) - if ft1<=0 or ft2<=0 then return end - if ft1>ft2 then ft1=ft2 end - local g=Duel.GetMatchingGroup(c40343749.filter,tp,LOCATION_HAND+LOCATION_DECK,0,nil,e,tp) - local ct=math.floor(g:GetCount()/2) - if ct==0 then return end - if ct>ft1 then ct=ft1 end - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(40343749,1)) - local sg1=g:Select(tp,1,ct,nil) - local tc=sg1:GetFirst() - g:Sub(sg1) - while tc do - Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) - tc=sg1:GetNext() - end - local sg2=g:Select(tp,sg1:GetCount(),sg1:GetCount(),nil) - tc=sg2:GetFirst() - while tc do - Duel.SpecialSummonStep(tc,0,tp,1-tp,false,false,POS_FACEUP) - tc=sg2:GetNext() - end - Duel.SpecialSummonComplete() -end diff --git a/script/c40348946.lua b/script/c40348946.lua deleted file mode 100644 index 0574fcd0af..0000000000 --- a/script/c40348946.lua +++ /dev/null @@ -1,37 +0,0 @@ ---ハイパー・シンクロン -function c40348946.initial_effect(c) - --atk change - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(40348946,0)) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_BE_MATERIAL) - e1:SetCondition(c40348946.con) - e1:SetOperation(c40348946.op) - c:RegisterEffect(e1) -end -function c40348946.con(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsLocation(LOCATION_GRAVE) and r==REASON_SYNCHRO and c:GetReasonCard():IsRace(RACE_DRAGON) -end -function c40348946.op(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local sync=c:GetReasonCard() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(800) - e1:SetReset(RESET_EVENT+0x1fe0000) - sync:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCode(EVENT_PHASE+PHASE_END) - e2:SetOperation(c40348946.rmop) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - sync:RegisterEffect(e2) -end -function c40348946.rmop(e,tp,eg,ep,ev,re,r,rp) - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT) -end diff --git a/script/c40350910.lua b/script/c40350910.lua deleted file mode 100644 index ffc29c3c58..0000000000 --- a/script/c40350910.lua +++ /dev/null @@ -1,23 +0,0 @@ ---おくびょうかぜ -function c40350910.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetOperation(c40350910.activate) - c:RegisterEffect(e1) -end -function c40350910.activate(e,tp,eg,ep,ev,re,r,rp) - --indestructable - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_INDESTRUCTABLE) - e1:SetTargetRange(LOCATION_SZONE,LOCATION_SZONE) - e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE) - e1:SetTarget(c40350910.infilter) - e1:SetReset(RESET_PHASE+PHASE_END,2) - Duel.RegisterEffect(e1,tp) -end -function c40350910.infilter(e,c) - return c:IsFacedown() -end diff --git a/script/c40371092.lua b/script/c40371092.lua deleted file mode 100644 index 5e7ed101a0..0000000000 --- a/script/c40371092.lua +++ /dev/null @@ -1,76 +0,0 @@ ---白夜の騎士ガイア -function c40371092.initial_effect(c) - --search - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(40371092,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_HANDES) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1,40371092) - e1:SetCost(c40371092.thcost) - e1:SetTarget(c40371092.thtg) - e1:SetOperation(c40371092.thop) - c:RegisterEffect(e1) - --atk - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(40371092,1)) - e2:SetCategory(CATEGORY_ATKCHANGE) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,40371093) - e2:SetCost(c40371092.atkcost) - e2:SetTarget(c40371092.atktg) - e2:SetOperation(c40371092.atkop) - c:RegisterEffect(e2) -end -function c40371092.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsAttribute,1,e:GetHandler(),ATTRIBUTE_LIGHT) end - local g=Duel.SelectReleaseGroup(tp,Card.IsAttribute,1,1,e:GetHandler(),ATTRIBUTE_LIGHT) - Duel.Release(g,REASON_COST) -end -function c40371092.filter(c) - return c:GetLevel()==4 and c:IsRace(RACE_WARRIOR) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsAbleToHand() -end -function c40371092.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c40371092.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) - Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,1,tp,1) -end -function c40371092.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c40371092.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - Duel.ShuffleHand(tp) - Duel.BreakEffect() - Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT) - end -end -function c40371092.cfilter(c) - return c:IsAttribute(ATTRIBUTE_DARK) and c:IsAbleToRemoveAsCost() -end -function c40371092.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c40371092.cfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c40371092.cfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c40371092.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) -end -function c40371092.atkop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,2) - e1:SetValue(-500) - tc:RegisterEffect(e1) - end -end diff --git a/script/c40383551.lua b/script/c40383551.lua deleted file mode 100644 index b0d338db30..0000000000 --- a/script/c40383551.lua +++ /dev/null @@ -1,38 +0,0 @@ ---大寒気 -function c40383551.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c40383551.target) - e1:SetOperation(c40383551.operation) - c:RegisterEffect(e1) -end -function c40383551.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(tp) -end -function c40383551.operation(e,tp,eg,ep,ev,re,r,rp) - local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EFFECT_CANNOT_ACTIVATE) - e1:SetTargetRange(1,0) - e1:SetValue(c40383551.aclimit) - e1:SetReset(RESET_PHASE+PHASE_END,1) - Duel.RegisterEffect(e1,p) - --cannot set - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_CANNOT_SSET) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetTargetRange(1,0) - e2:SetTarget(aux.TRUE) - e2:SetReset(RESET_PHASE+PHASE_END,1) - Duel.RegisterEffect(e2,p) -end -function c40383551.aclimit(e,re,tp) - return re:IsActiveType(TYPE_SPELL+TYPE_TRAP) -end diff --git a/script/c403847.lua b/script/c403847.lua deleted file mode 100644 index 9a2b3933f8..0000000000 --- a/script/c403847.lua +++ /dev/null @@ -1,26 +0,0 @@ ---連合軍 -function c403847.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --atk up - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(LOCATION_MZONE,0) - e2:SetTarget(c403847.tg) - e2:SetValue(c403847.val) - c:RegisterEffect(e2) -end -function c403847.tg(e,c) - return c:IsRace(RACE_WARRIOR) -end -function c403847.filter(c) - return c:IsFaceup() and c:IsRace(RACE_WARRIOR+RACE_SPELLCASTER) -end -function c403847.val(e,c) - return Duel.GetMatchingGroupCount(c403847.filter,c:GetControler(),LOCATION_MZONE,0,nil)*200 -end diff --git a/script/c40384720.lua b/script/c40384720.lua deleted file mode 100644 index 28a0cb8717..0000000000 --- a/script/c40384720.lua +++ /dev/null @@ -1,31 +0,0 @@ ---ソニック・シューター -function c40384720.initial_effect(c) - --direct attack - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DIRECT_ATTACK) - e1:SetCondition(c40384720.dircon) - c:RegisterEffect(e1) - --damage reduce - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EVENT_PRE_BATTLE_DAMAGE) - e2:SetCondition(c40384720.rdcon) - e2:SetOperation(c40384720.rdop) - c:RegisterEffect(e2) -end -function c40384720.dfilter(c) - return c:GetSequence()<5 -end -function c40384720.dircon(e) - return not Duel.IsExistingMatchingCard(c40384720.dfilter,e:GetHandlerPlayer(),0,LOCATION_SZONE,1,nil) -end -function c40384720.rdcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return ep~=tp and c==Duel.GetAttacker() and Duel.GetAttackTarget()==nil - and c:GetEffectCount(EFFECT_DIRECT_ATTACK)<2 and Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0 -end -function c40384720.rdop(e,tp,eg,ep,ev,re,r,rp) - Duel.ChangeBattleDamage(ep,e:GetHandler():GetBaseAttack()) -end diff --git a/script/c40390147.lua b/script/c40390147.lua deleted file mode 100644 index 881405ccd2..0000000000 --- a/script/c40390147.lua +++ /dev/null @@ -1,50 +0,0 @@ ---輝光帝ギャラクシオン -function c40390147.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0x55),4,2) - c:EnableReviveLimit() - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(40390147,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCost(c40390147.sptg) - e1:SetOperation(c40390147.spop) - c:RegisterEffect(e1) -end -function c40390147.spfilter(c,e,tp) - return c:IsCode(93717133) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c40390147.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - local b1=Duel.IsExistingMatchingCard(c40390147.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) and e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) - local b2=Duel.IsExistingMatchingCard(c40390147.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) and e:GetHandler():CheckRemoveOverlayCard(tp,2,REASON_COST) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and (b1 or b2) end - if b1 and b2 then - local opt=Duel.SelectOption(tp,aux.Stringid(40390147,1),aux.Stringid(40390147,2)) - e:SetLabel(opt) - e:GetHandler():RemoveOverlayCard(tp,opt+1,opt+1,REASON_COST) - elseif b1 then - Duel.SelectOption(tp,aux.Stringid(40390147,1)) - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) - e:SetLabel(0) - else - Duel.SelectOption(tp,aux.Stringid(40390147,2)) - e:GetHandler():RemoveOverlayCard(tp,2,2,REASON_COST) - e:SetLabel(1) - end -end -function c40390147.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local tc=nil - if e:GetLabel()==0 then - tc=Duel.GetFirstMatchingCard(c40390147.spfilter,tp,LOCATION_HAND,0,nil,e,tp) - else - tc=Duel.GetFirstMatchingCard(c40390147.spfilter,tp,LOCATION_DECK,0,nil,e,tp) - end - if tc then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c40391316.lua b/script/c40391316.lua deleted file mode 100644 index d6e795bc6d..0000000000 --- a/script/c40391316.lua +++ /dev/null @@ -1,23 +0,0 @@ ---おジャマ・ナイト -function c40391316.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcFunRep(c,aux.FilterBoolFunction(Card.IsSetCard,0xf),2,true) - --disable field - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EFFECT_DISABLE_FIELD) - e2:SetOperation(c40391316.disop) - c:RegisterEffect(e2) -end -function c40391316.disop(e,tp) - local c=Duel.GetLocationCount(1-tp,LOCATION_MZONE) - if c==0 then return end - local dis1=Duel.SelectDisableField(tp,1,0,LOCATION_MZONE,0) - if c>1 and Duel.SelectYesNo(tp,aux.Stringid(40391316,0)) then - local dis2=Duel.SelectDisableField(tp,1,0,LOCATION_MZONE,dis1) - dis1=bit.bor(dis1,dis2) - end - return dis1 -end diff --git a/script/c40410110.lua b/script/c40410110.lua deleted file mode 100644 index c665b8cf03..0000000000 --- a/script/c40410110.lua +++ /dev/null @@ -1,26 +0,0 @@ ---錬金生物 ホムンクルス -function c40410110.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(40410110,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetOperation(c40410110.attop) - c:RegisterEffect(e1) -end -function c40410110.attop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFaceup() and c:IsRelateToEffect(e) then - Duel.Hint(HINT_SELECTMSG,tp,562) - local catt=c:GetAttribute() - local att=Duel.AnnounceAttribute(tp,1,0xffff - catt) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_COPY_INHERIT) - e1:SetCode(EFFECT_CHANGE_ATTRIBUTE) - e1:SetValue(att) - e1:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e1) - end -end diff --git a/script/c40418351.lua b/script/c40418351.lua deleted file mode 100644 index 5bd1a9d5d3..0000000000 --- a/script/c40418351.lua +++ /dev/null @@ -1,82 +0,0 @@ ---鎧黒竜-サイバー・ダーク・ドラゴン -function c40418351.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcCode3(c,41230939,77625948,3019642,true,true) - --equip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(40418351,0)) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c40418351.eqtg) - e1:SetOperation(c40418351.eqop) - c:RegisterEffect(e1) - --atkup - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetValue(c40418351.atkval) - c:RegisterEffect(e2) - --spsummon condition - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e3:SetCode(EFFECT_SPSUMMON_CONDITION) - e3:SetValue(aux.fuslimit) - c:RegisterEffect(e3) -end -function c40418351.filter(c) - return c:IsRace(RACE_DRAGON) -end -function c40418351.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c40418351.filter(chkc) end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local g=Duel.SelectTarget(tp,c40418351.filter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0) -end -function c40418351.eqop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsFaceup() and c:IsRelateToEffect(e) and tc and tc:IsRelateToEffect(e) then - local atk=tc:GetTextAttack() - if atk<0 then atk=0 end - if not Duel.Equip(tp,tc,c,false) then return end - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_OWNER_RELATE) - e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(c40418351.eqlimit) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetProperty(EFFECT_FLAG_OWNER_RELATE+EFFECT_FLAG_IGNORE_IMMUNE) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetReset(RESET_EVENT+0x1fe0000) - e2:SetValue(atk) - tc:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_EQUIP) - e3:SetCode(EFFECT_DESTROY_SUBSTITUTE) - e3:SetReset(RESET_EVENT+0x1fe0000) - e3:SetValue(c40418351.repval) - tc:RegisterEffect(e3) - end -end -function c40418351.eqlimit(e,c) - return e:GetOwner()==c -end -function c40418351.repval(e,re,r,rp) - return bit.band(r,REASON_BATTLE)~=0 -end -function c40418351.atkval(e,c) - local tp=e:GetHandlerPlayer() - return Duel.GetMatchingGroupCount(Card.IsType,tp,LOCATION_GRAVE,0,nil,TYPE_MONSTER)*100 -end diff --git a/script/c4041838.lua b/script/c4041838.lua deleted file mode 100644 index d7047d3fcd..0000000000 --- a/script/c4041838.lua +++ /dev/null @@ -1,24 +0,0 @@ ---忍者マスター SASUKE -function c4041838.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(4041838,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_BATTLE_START) - e1:SetTarget(c4041838.targ) - e1:SetOperation(c4041838.op) - c:RegisterEffect(e1) -end -function c4041838.targ(e,tp,eg,ep,ev,re,r,rp,chk) - local d=Duel.GetAttackTarget() - if chk ==0 then return Duel.GetAttacker()==e:GetHandler() - and d~=nil and d:IsFaceup() and d:IsDefencePos() and d:IsDestructable() end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,d,1,0,0) -end -function c4041838.op(e,tp,eg,ep,ev,re,r,rp) - local d=Duel.GetAttackTarget() - if d~=nil and d:IsRelateToBattle() and d:IsDefencePos() then - Duel.Destroy(d,REASON_EFFECT) - end -end diff --git a/script/c40424929.lua b/script/c40424929.lua deleted file mode 100644 index 30b7da19cf..0000000000 --- a/script/c40424929.lua +++ /dev/null @@ -1,32 +0,0 @@ ---烈華砲艦ナデシコ -function c40424929.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,3,3) - c:EnableReviveLimit() - --damage - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(40424929,0)) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1,40424929) - e1:SetCost(c40424929.damcost) - e1:SetTarget(c40424929.damtg) - e1:SetOperation(c40424929.damop) - c:RegisterEffect(e1) -end -function c40424929.damcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c40424929.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0 end - local ct=Duel.GetFieldGroupCount(tp,0,LOCATION_HAND) - Duel.SetTargetPlayer(1-tp) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,ct*200) -end -function c40424929.damop(e,tp,eg,ep,ev,re,r,rp) - local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) - local ct=Duel.GetFieldGroupCount(p,LOCATION_HAND,0) - Duel.Damage(p,ct*200,REASON_EFFECT) -end diff --git a/script/c40453765.lua b/script/c40453765.lua deleted file mode 100644 index 7e295ddc91..0000000000 --- a/script/c40453765.lua +++ /dev/null @@ -1,16 +0,0 @@ ---バーバリアン2号 -function c40453765.initial_effect(c) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(c40453765.value) - c:RegisterEffect(e1) -end -function c40453765.filter(c) - return c:IsFaceup() and c:IsCode(20394040) -end -function c40453765.value(e,c) - return Duel.GetMatchingGroupCount(c40453765.filter,c:GetControler(),LOCATION_MZONE,0,nil)*500 -end diff --git a/script/c40465719.lua b/script/c40465719.lua deleted file mode 100644 index 20248dc025..0000000000 --- a/script/c40465719.lua +++ /dev/null @@ -1,35 +0,0 @@ ---凡人の施し -function c40465719.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c40465719.target) - e1:SetOperation(c40465719.activate) - c:RegisterEffect(e1) -end -function c40465719.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,30459350) and Duel.IsPlayerCanDraw(tp,2) end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(2) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2) -end -function c40465719.activate(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) - Duel.BreakEffect() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(p,Card.IsType,p,LOCATION_HAND,0,1,1,nil,TYPE_NORMAL) - local tg=g:GetFirst() - if tg then - if Duel.Remove(tg,POS_FACEUP,REASON_EFFECT)==0 then - Duel.ConfirmCards(1-p,tg) - Duel.ShuffleHand(p) - end - else - local sg=Duel.GetFieldGroup(p,LOCATION_HAND,0) - Duel.SendtoGrave(sg,REASON_EFFECT) - end -end diff --git a/script/c40473581.lua b/script/c40473581.lua deleted file mode 100644 index 167163f1ad..0000000000 --- a/script/c40473581.lua +++ /dev/null @@ -1,71 +0,0 @@ ---雷帝神 -function c40473581.initial_effect(c) - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(aux.FALSE) - c:RegisterEffect(e1) - --summon,flip - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetCode(EVENT_SUMMON_SUCCESS) - e2:SetOperation(c40473581.retreg) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EVENT_FLIP) - c:RegisterEffect(e3) - --half damage - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e4:SetRange(LOCATION_MZONE) - e4:SetCode(EVENT_PRE_BATTLE_DAMAGE) - e4:SetCondition(c40473581.dcon) - e4:SetOperation(c40473581.dop) - c:RegisterEffect(e4) -end -function c40473581.dcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return ep~=tp and (c==Duel.GetAttacker() or c==Duel.GetAttackTarget()) -end -function c40473581.dop(e,tp,eg,ep,ev,re,r,rp) - Duel.ChangeBattleDamage(ep,ev/2) -end -function c40473581.retreg(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - --to hand - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetDescription(aux.Stringid(40473581,0)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e1:SetCondition(c40473581.retcon) - e1:SetTarget(c40473581.rettg) - e1:SetOperation(c40473581.retop) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - c:RegisterEffect(e2) -end -function c40473581.retcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsHasEffect(EFFECT_SPIRIT_DONOT_RETURN) then return false end - if e:IsHasType(EFFECT_TYPE_TRIGGER_F) then - return not c:IsHasEffect(EFFECT_SPIRIT_MAYNOT_RETURN) - else return c:IsHasEffect(EFFECT_SPIRIT_MAYNOT_RETURN) end -end -function c40473581.rettg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0) -end -function c40473581.retop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SendtoHand(c,nil,REASON_EFFECT) - end -end diff --git a/script/c40502912.lua b/script/c40502912.lua deleted file mode 100644 index 6202eaf452..0000000000 --- a/script/c40502912.lua +++ /dev/null @@ -1,20 +0,0 @@ ---幻奏の音女アリア -function c40502912.initial_effect(c) - --cannot be target/battle indestructable - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x9b)) - e1:SetCondition(c40502912.tgcon) - e1:SetValue(aux.tgval) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e2:SetValue(1) - c:RegisterEffect(e2) -end -function c40502912.tgcon(e) - return bit.band(e:GetHandler():GetSummonType(),SUMMON_TYPE_SPECIAL)==SUMMON_TYPE_SPECIAL -end diff --git a/script/c40529384.lua b/script/c40529384.lua deleted file mode 100644 index 64fce8de96..0000000000 --- a/script/c40529384.lua +++ /dev/null @@ -1,34 +0,0 @@ ---エクスプロード・ウィング・ドラゴン -function c40529384.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,nil,aux.NonTuner(Card.IsRace,RACE_DRAGON),1) - c:EnableReviveLimit() - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(40529384,0)) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_BATTLE_START) - e1:SetTarget(c40529384.destg) - e1:SetOperation(c40529384.desop) - c:RegisterEffect(e1) -end -function c40529384.destg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - local tc=Duel.GetAttacker() - if tc==c then tc=Duel.GetAttackTarget() end - if chk==0 then return tc and tc:IsFaceup() and tc:GetAttack()<=c:GetAttack() end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,tc,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,tc:GetAttack()) -end -function c40529384.desop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetAttacker() - if tc==c then tc=Duel.GetAttackTarget() end - if tc:IsRelateToBattle() and tc:GetAttack()<=c:GetAttack() then - local atk=tc:GetAttack() - if Duel.Destroy(tc,REASON_EFFECT)~=0 then - Duel.Damage(1-tp,atk,REASON_EFFECT) - end - end -end diff --git a/script/c40555959.lua b/script/c40555959.lua deleted file mode 100644 index 7c751c1254..0000000000 --- a/script/c40555959.lua +++ /dev/null @@ -1,78 +0,0 @@ ---ハンドレス・フェイク -function c40555959.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetOperation(c40555959.activate) - c:RegisterEffect(e1) - --remove - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetDescription(aux.Stringid(40555959,0)) - e2:SetRange(LOCATION_SZONE) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetCondition(c40555959.remcon) - e2:SetTarget(c40555959.remtg) - e2:SetOperation(c40555959.remop) - c:RegisterEffect(e2) -end -function c40555959.activate(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - if Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_HAND,0,1,nil) - and Duel.IsExistingMatchingCard(c40555959.cfilter,tp,LOCATION_MZONE,0,1,nil) - and Duel.SelectYesNo(tp,aux.Stringid(40555959,1)) then - c40555959.remop(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():RegisterFlagEffect(40555959,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) - e:GetHandler():RegisterFlagEffect(0,RESET_CHAIN,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(40555959,2)) - end -end -function c40555959.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0xb) -end -function c40555959.remcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c40555959.cfilter,tp,LOCATION_MZONE,0,1,nil) -end -function c40555959.remtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():GetFlagEffect(40555959)==0 - and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_HAND,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_HAND) - e:GetHandler():RegisterFlagEffect(40555959,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) -end -function c40555959.remop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_HAND,0,nil) - if g:GetCount()>0 then - Duel.Remove(g,POS_FACEDOWN,REASON_EFFECT) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) - e1:SetReset(RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,1) - e1:SetCountLimit(1) - e1:SetLabel(c40555959.counter) - e1:SetCondition(c40555959.retcon) - e1:SetOperation(c40555959.retop) - e1:SetLabelObject(g) - Duel.RegisterEffect(e1,tp) - g:KeepAlive() - local tc=g:GetFirst() - while tc do - tc:RegisterFlagEffect(40555959,RESET_EVENT+0x1fe0000,0,1) - tc=g:GetNext() - end - end -end -function c40555959.retfilter(c) - return c:GetFlagEffect(40555959)~=0 -end -function c40555959.retcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c40555959.retop(e,tp,eg,ep,ev,re,r,rp) - local g=e:GetLabelObject() - local sg=g:Filter(c40555959.retfilter,nil) - g:DeleteGroup() - if sg:GetCount()>0 then - Duel.SendtoHand(sg,nil,REASON_EFFECT) - end -end diff --git a/script/c4058065.lua b/script/c4058065.lua deleted file mode 100644 index cbafc87ba7..0000000000 --- a/script/c4058065.lua +++ /dev/null @@ -1,33 +0,0 @@ ---ヴェルズ・サラマンドラ -function c4058065.initial_effect(c) - --atkup - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(4058065,0)) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(2) - e1:SetCost(c4058065.cost) - e1:SetOperation(c4058065.operation) - c:RegisterEffect(e1) -end -function c4058065.cfilter(c) - return c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost() -end -function c4058065.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c4058065.cfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c4058065.cfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c4058065.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFaceup() and c:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(300) - e1:SetReset(RESET_EVENT+0x1ff0000+RESET_PHASE+PHASE_END,2) - c:RegisterEffect(e1) - end -end diff --git a/script/c40583194.lua b/script/c40583194.lua deleted file mode 100644 index 850f31132b..0000000000 --- a/script/c40583194.lua +++ /dev/null @@ -1,48 +0,0 @@ ---フォース・リゾネーター -function c40583194.initial_effect(c) - -- - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(40583194,0)) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c40583194.cost) - e1:SetTarget(c40583194.target) - e1:SetOperation(c40583194.operation) - c:RegisterEffect(e1) -end -function c40583194.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end -function c40583194.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,nil) -end -function c40583194.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetOperation(c40583194.atkop) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - end -end -function c40583194.atkop(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetOwner()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_SELECT_EFFECT_TARGET) - e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE) - e1:SetTargetRange(0,0xff) - e1:SetValue(c40583194.etarget) - e1:SetReset(RESET_PHASE+PHASE_DAMAGE) - Duel.RegisterEffect(e1,tp) -end -function c40583194.etarget(e,re,c) - return c:IsType(TYPE_MONSTER) and (c:IsFaceup() or c:IsLocation(LOCATION_MZONE)) -end diff --git a/script/c40591390.lua b/script/c40591390.lua deleted file mode 100644 index c4791242ff..0000000000 --- a/script/c40591390.lua +++ /dev/null @@ -1,83 +0,0 @@ ---D-HERO ドレッドガイ -function c40591390.initial_effect(c) - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(40591390,0)) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(c40591390.spcon) - e1:SetTarget(c40591390.sptg) - e1:SetOperation(c40591390.spop) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetOperation(c40591390.indop) - c:RegisterEffect(e2) - --atk - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e3:SetRange(LOCATION_MZONE) - e3:SetCode(EFFECT_SET_ATTACK) - e3:SetValue(c40591390.val) - c:RegisterEffect(e3) - local e4=e3:Clone() - e4:SetCode(EFFECT_SET_DEFENCE) - c:RegisterEffect(e4) -end -function c40591390.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+1 -end -function c40591390.desfilter(c) - return c:IsFacedown() or not c:IsSetCard(0xc008) -end -function c40591390.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local g=Duel.GetMatchingGroup(c40591390.desfilter,tp,LOCATION_MZONE,0,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c40591390.spfilter(c,e,tp) - return c:IsSetCard(0xc008) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c40591390.spop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c40591390.desfilter,tp,LOCATION_MZONE,0,nil) - Duel.Destroy(g,REASON_EFFECT) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ft<=0 then return end - if ft>2 then ft=2 end - g=Duel.GetMatchingGroup(c40591390.spfilter,tp,LOCATION_GRAVE,0,nil,e,tp) - if g:GetCount()~=0 and Duel.SelectYesNo(tp,aux.Stringid(40591390,1)) then - Duel.BreakEffect() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=g:Select(tp,1,ft,nil) - Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) - end -end -function c40591390.filter(e,c) - return c:IsFaceup() and c:IsSetCard(0xc008) -end -function c40591390.indop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetTarget(c40591390.filter) - e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e1:SetValue(1) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) - local e2=e1:Clone() - e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - Duel.RegisterEffect(e2,tp) - local e3=e1:Clone() - e3:SetCode(EFFECT_AVOID_BATTLE_DAMAGE) - Duel.RegisterEffect(e3,tp) -end -function c40591390.vfilter(c) - return c:IsFaceup() and c:IsSetCard(0xc008) -end -function c40591390.val(e,c) - local g=Duel.GetMatchingGroup(c40591390.vfilter,c:GetControler(),LOCATION_MZONE,0,c) - return g:GetSum(Card.GetBaseAttack) -end diff --git a/script/c40607210.lua b/script/c40607210.lua deleted file mode 100644 index 63cb0a186b..0000000000 --- a/script/c40607210.lua +++ /dev/null @@ -1,73 +0,0 @@ ---ヴァンパイア・グレイス -function c40607210.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(40607210,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetRange(LOCATION_GRAVE) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCountLimit(1,40607210) - e1:SetCondition(c40607210.condition) - e1:SetCost(c40607210.cost) - e1:SetTarget(c40607210.target) - e1:SetOperation(c40607210.operation) - c:RegisterEffect(e1) - -- - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(40607210,1)) - e2:SetCategory(CATEGORY_TOGRAVE) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetTarget(c40607210.tgtg) - e2:SetOperation(c40607210.tgop) - c:RegisterEffect(e2) -end -function c40607210.cfilter(c,tp) - return c:IsLevelAbove(5) and c:IsRace(RACE_ZOMBIE) and c:IsControler(tp) -end -function c40607210.condition(e,tp,eg,ep,ev,re,r,rp) - local rc=re:GetHandler() - return rc and rc:IsRace(RACE_ZOMBIE) and eg:IsExists(c40607210.cfilter,1,nil,tp) - and (re:GetCode()~=EFFECT_SPSUMMON_PROC or not rc:IsHasEffect(EFFECT_REVIVE_LIMIT)) -end -function c40607210.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,2000) end - Duel.PayLPCost(tp,2000) -end -function c40607210.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c40607210.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) - end -end -function c40607210.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,555) - local op=Duel.SelectOption(tp,70,71,72) - e:SetLabel(op) - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,1-tp,LOCATION_DECK) -end -function c40607210.tgfilter(c,ty) - return c:IsType(ty) and c:IsAbleToGrave() -end -function c40607210.tgop(e,tp,eg,ep,ev,re,r,rp) - local g=nil - Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_TOGRAVE) - if e:GetLabel()==0 then g=Duel.SelectMatchingCard(1-tp,c40607210.tgfilter,1-tp,LOCATION_DECK,0,1,1,nil,TYPE_MONSTER) - elseif e:GetLabel()==1 then g=Duel.SelectMatchingCard(1-tp,c40607210.tgfilter,1-tp,LOCATION_DECK,0,1,1,nil,TYPE_SPELL) - else g=Duel.SelectMatchingCard(1-tp,c40607210.tgfilter,1-tp,LOCATION_DECK,0,1,1,nil,TYPE_TRAP) end - if g:GetCount()~=0 then - Duel.SendtoGrave(g,REASON_EFFECT) - else - local cg=Duel.GetFieldGroup(tp,0,LOCATION_DECK) - Duel.ConfirmCards(tp,cg) - Duel.ShuffleDeck(1-tp) - end -end diff --git a/script/c40619741.lua b/script/c40619741.lua deleted file mode 100644 index 260536cab4..0000000000 --- a/script/c40619741.lua +++ /dev/null @@ -1,25 +0,0 @@ ---ヴァイロン・ソルジャー -function c40619741.initial_effect(c) - --pos - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(40619741,0)) - e1:SetCategory(CATEGORY_POSITION) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetTarget(c40619741.postg) - e1:SetOperation(c40619741.posop) - c:RegisterEffect(e1) -end -function c40619741.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) end - if chk==0 then return e:GetHandler():GetEquipCount()>0 and Duel.IsExistingTarget(aux.TRUE,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE) - local g=Duel.SelectTarget(tp,aux.TRUE,tp,0,LOCATION_MZONE,1,e:GetHandler():GetEquipCount(),nil) - Duel.SetOperationInfo(0,CATEGORY_POSITION,g,g:GetCount(),0,0) -end -function c40619741.posop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local sg=g:Filter(Card.IsRelateToEffect,nil,e) - Duel.ChangePosition(sg,POS_FACEUP_DEFENCE,POS_FACEDOWN_DEFENCE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK) -end diff --git a/script/c40619825.lua b/script/c40619825.lua deleted file mode 100644 index a6fd843d17..0000000000 --- a/script/c40619825.lua +++ /dev/null @@ -1,78 +0,0 @@ ---デーモンの斧 -function c40619825.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c40619825.target) - e1:SetOperation(c40619825.operation) - c:RegisterEffect(e1) - --Atk up - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(1000) - c:RegisterEffect(e2) - --Equip limit - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_EQUIP_LIMIT) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e3:SetValue(1) - c:RegisterEffect(e3) - --to deck - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(40619825,0)) - e4:SetCategory(CATEGORY_TODECK) - e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_CVAL_CHECK) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e4:SetCode(EVENT_TO_GRAVE) - e4:SetCondition(c40619825.tdcon) - e4:SetCost(c40619825.tdcost) - e4:SetTarget(c40619825.tdtg) - e4:SetOperation(c40619825.tdop) - e4:SetValue(c40619825.valcheck) - c:RegisterEffect(e4) -end -function c40619825.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c40619825.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,e:GetHandler(),tc) - end -end -function c40619825.tdcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) -end -function c40619825.tdcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - if Duel.GetFlagEffect(tp,40619825)==0 then - Duel.RegisterFlagEffect(tp,40619825,RESET_CHAIN,0,1) - c40619825[0]=Duel.GetReleaseGroupCount(tp) - c40619825[1]=0 - end - return c40619825[0]-c40619825[1]>=1 - end - local g=Duel.SelectReleaseGroup(tp,nil,1,1,nil) - Duel.Release(g,REASON_COST) -end -function c40619825.tdtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToDeck() end - Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0) -end -function c40619825.tdop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - Duel.SendtoDeck(e:GetHandler(),nil,0,REASON_EFFECT) - end -end -function c40619825.valcheck(e) - c40619825[1]=c40619825[1]+1 -end diff --git a/script/c40633297.lua b/script/c40633297.lua deleted file mode 100644 index 4538f75d0a..0000000000 --- a/script/c40633297.lua +++ /dev/null @@ -1,18 +0,0 @@ ---シモッチによる副作用 -function c40633297.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_DRAW_PHASE) - c:RegisterEffect(e1) - --recover conversion - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetCode(EFFECT_REVERSE_RECOVER) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(0,1) - e2:SetValue(1) - c:RegisterEffect(e2) -end diff --git a/script/c40640057.lua b/script/c40640057.lua deleted file mode 100644 index 43bf334d59..0000000000 --- a/script/c40640057.lua +++ /dev/null @@ -1,31 +0,0 @@ ---クリボー -function c40640057.initial_effect(c) - --no damage - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(40640057,0)) - e1:SetType(EFFECT_TYPE_QUICK_O+EFFECT_TYPE_FIELD) - e1:SetRange(LOCATION_HAND) - e1:SetCode(EVENT_PRE_DAMAGE_CALCULATE) - e1:SetCondition(c40640057.con) - e1:SetCost(c40640057.cost) - e1:SetOperation(c40640057.op) - c:RegisterEffect(e1) -end -function c40640057.con(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp and Duel.GetBattleDamage(tp)>0 -end -function c40640057.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsDiscardable() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD) -end -function c40640057.op(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PRE_BATTLE_DAMAGE) - e1:SetOperation(c40640057.damop) - e1:SetReset(RESET_PHASE+PHASE_DAMAGE) - Duel.RegisterEffect(e1,tp) -end -function c40640057.damop(e,tp,eg,ep,ev,re,r,rp) - Duel.ChangeBattleDamage(tp,0) -end diff --git a/script/c4064256.lua b/script/c4064256.lua deleted file mode 100644 index 99edd2faa1..0000000000 --- a/script/c4064256.lua +++ /dev/null @@ -1,31 +0,0 @@ ---アンデットワールド -function c4064256.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --race - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(LOCATION_MZONE+LOCATION_GRAVE,LOCATION_MZONE+LOCATION_GRAVE) - e2:SetCode(EFFECT_CHANGE_RACE) - e2:SetValue(RACE_ZOMBIE) - c:RegisterEffect(e2) - --summon limit - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetRange(LOCATION_SZONE) - e3:SetCode(EFFECT_CANNOT_SUMMON) - e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e3:SetTargetRange(1,1) - e3:SetTarget(c4064256.sumlimit) - c:RegisterEffect(e3) - local e4=e3:Clone() - e4:SetCode(EFFECT_CANNOT_MSET) - c:RegisterEffect(e4) -end -function c4064256.sumlimit(e,c,tp,sumtp) - return bit.band(sumtp,SUMMON_TYPE_ADVANCE)==SUMMON_TYPE_ADVANCE and c:GetRace()~=RACE_ZOMBIE -end diff --git a/script/c40659562.lua b/script/c40659562.lua deleted file mode 100644 index 7a9470045e..0000000000 --- a/script/c40659562.lua +++ /dev/null @@ -1,42 +0,0 @@ ---守護者スフィンクス -function c40659562.initial_effect(c) - --turn set - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(40659562,0)) - e1:SetCategory(CATEGORY_POSITION) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetTarget(c40659562.target) - e1:SetOperation(c40659562.operation) - c:RegisterEffect(e1) - --to hand - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(40659562,1)) - e2:SetCategory(CATEGORY_TOHAND) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - e2:SetTarget(c40659562.thtg) - e2:SetOperation(c40659562.thop) - c:RegisterEffect(e2) -end -function c40659562.target(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsCanTurnSet() and c:GetFlagEffect(40659562)==0 end - c:RegisterFlagEffect(40659562,RESET_EVENT+0x1fc0000+RESET_PHASE+PHASE_END,0,1) - Duel.SetOperationInfo(0,CATEGORY_POSITION,c,1,0,0) -end -function c40659562.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - Duel.ChangePosition(c,POS_FACEDOWN_DEFENCE) - end -end -function c40659562.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local g=Duel.GetMatchingGroup(Card.IsAbleToHand,tp,0,LOCATION_MZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0) -end -function c40659562.thop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsAbleToHand,tp,0,LOCATION_MZONE,nil) - Duel.SendtoHand(g,nil,REASON_EFFECT) -end diff --git a/script/c40666140.lua b/script/c40666140.lua deleted file mode 100644 index edebc3896f..0000000000 --- a/script/c40666140.lua +++ /dev/null @@ -1,38 +0,0 @@ ---極星霊リョースアールヴ -function c40666140.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(40666140,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c40666140.sptg) - e1:SetOperation(c40666140.spop) - c:RegisterEffect(e1) -end -function c40666140.filter(c,e,tp) - local lv=c:GetLevel() - return c:IsFaceup() and lv>0 and Duel.IsExistingMatchingCard(c40666140.filter2,tp,LOCATION_HAND,0,1,nil,lv,e,tp) -end -function c40666140.filter2(c,lv,e,tp) - return c:IsSetCard(0x42) and c:GetLevel()<=lv and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c40666140.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c40666140.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c40666140.filter,tp,LOCATION_MZONE,0,1,e:GetHandler(),e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - local g=Duel.SelectTarget(tp,c40666140.filter,tp,LOCATION_MZONE,0,1,1,e:GetHandler(),e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c40666140.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local tc=Duel.GetFirstTarget() - if not tc:IsRelateToEffect(e) or tc:IsFacedown() then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=Duel.SelectMatchingCard(tp,c40666140.filter2,tp,LOCATION_HAND,0,1,1,nil,tc:GetLevel(),e,tp) - if sg:GetCount()>0 then - Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c40672993.lua b/script/c40672993.lua deleted file mode 100644 index caccf01d56..0000000000 --- a/script/c40672993.lua +++ /dev/null @@ -1,16 +0,0 @@ ---避雷神 -function c40672993.initial_effect(c) - --actlimit - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(1,1) - e1:SetValue(c40672993.actlimit) - c:RegisterEffect(e1) -end -function c40672993.actlimit(e,te,tp) - return Duel.GetCurrentPhase()==PHASE_MAIN1 - and te:IsHasType(EFFECT_TYPE_ACTIVATE) and te:IsActiveType(TYPE_SPELL) -end diff --git a/script/c4068622.lua b/script/c4068622.lua deleted file mode 100644 index 9ca7656904..0000000000 --- a/script/c4068622.lua +++ /dev/null @@ -1,83 +0,0 @@ ---BF-極光のアウロラ -function c4068622.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c4068622.spcon) - e1:SetOperation(c4068622.spop) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(4068622,0)) - e2:SetCategory(CATEGORY_REMOVE) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetTarget(c4068622.target) - e2:SetOperation(c4068622.operation) - c:RegisterEffect(e2) - --special summon limit - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e3:SetCode(EFFECT_SPSUMMON_CONDITION) - e3:SetValue(aux.FALSE) - c:RegisterEffect(e3) - c:EnableReviveLimit() -end -function c4068622.spfilter1(c) - return c:IsFaceup() and c:IsSetCard(0x33) and c:IsType(TYPE_TUNER) and c:IsAbleToRemove() -end -function c4068622.spfilter2(c) - return c:IsFaceup() and not c:IsType(TYPE_TUNER) and c:IsAbleToRemove() -end -function c4068622.spcon(e,c) - if c==nil then return true end - return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-2 - and Duel.IsExistingMatchingCard(c4068622.spfilter1,c:GetControler(),LOCATION_MZONE,0,1,nil) - and Duel.IsExistingMatchingCard(c4068622.spfilter2,c:GetControler(),LOCATION_MZONE,0,1,nil) -end -function c4068622.spop(e,tp,eg,ep,ev,re,r,rp,c) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g1=Duel.SelectMatchingCard(tp,c4068622.spfilter1,tp,LOCATION_MZONE,0,1,1,nil) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g2=Duel.SelectMatchingCard(tp,c4068622.spfilter2,tp,LOCATION_MZONE,0,1,1,nil) - g1:Merge(g2) - Duel.Remove(g1,POS_FACEUP,REASON_COST) -end -function c4068622.filter(c) - return c:IsSetCard(0x33) and c:IsAbleToRemove() -end -function c4068622.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c4068622.filter,tp,LOCATION_EXTRA,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,0,tp,LOCATION_EXTRA) -end -function c4068622.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c4068622.filter,tp,LOCATION_EXTRA,0,1,1,nil) - local tc=g:GetFirst() - local c=e:GetHandler() - if tc and c:IsFaceup() and c:IsRelateToEffect(e) and Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)>0 then - local code=tc:GetOriginalCode() - local ba=tc:GetBaseAttack() - local reset_flag=RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END - c:CopyEffect(code, reset_flag, 1) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(reset_flag) - e1:SetCode(EFFECT_CHANGE_CODE) - e1:SetValue(code) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetReset(reset_flag) - e2:SetCode(EFFECT_SET_BASE_ATTACK) - e2:SetValue(ba) - c:RegisterEffect(e2) - end -end diff --git a/script/c40695128.lua b/script/c40695128.lua deleted file mode 100644 index feacf51737..0000000000 --- a/script/c40695128.lua +++ /dev/null @@ -1,89 +0,0 @@ ---磨破羅魏 -function c40695128.initial_effect(c) - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(aux.FALSE) - c:RegisterEffect(e1) - --summon,flip - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetCode(EVENT_SUMMON_SUCCESS) - e2:SetOperation(c40695128.retreg) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EVENT_FLIP) - c:RegisterEffect(e3) - --summon success - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(40695128,1)) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e4:SetCode(EVENT_SUMMON_SUCCESS) - e4:SetOperation(c40695128.regop) - c:RegisterEffect(e4) - local e5=e4:Clone() - e5:SetCode(EVENT_FLIP) - c:RegisterEffect(e5) -end -function c40695128.retreg(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - --to hand - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetDescription(aux.Stringid(40695128,0)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e1:SetCondition(c40695128.retcon) - e1:SetTarget(c40695128.rettg) - e1:SetOperation(c40695128.retop) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - c:RegisterEffect(e2) -end -function c40695128.retcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsHasEffect(EFFECT_SPIRIT_DONOT_RETURN) then return false end - if e:IsHasType(EFFECT_TYPE_TRIGGER_F) then - return not c:IsHasEffect(EFFECT_SPIRIT_MAYNOT_RETURN) - else return c:IsHasEffect(EFFECT_SPIRIT_MAYNOT_RETURN) end -end -function c40695128.rettg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0) -end -function c40695128.retop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SendtoHand(c,nil,REASON_EFFECT) - end -end -function c40695128.regop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetFlagEffect(tp,40695128)~=0 then return end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PREDRAW) - e1:SetCondition(c40695128.condition) - e1:SetOperation(c40695128.operation) - e1:SetReset(RESET_PHASE+PHASE_DRAW+RESET_SELF_TURN,1) - Duel.RegisterEffect(e1,tp) - Duel.RegisterFlagEffect(tp,40695128,RESET_PHASE+PHASE_END,0,2) -end -function c40695128.condition(e,tp,eg,ep,ev,re,r,rp) - return tp==Duel.GetTurnPlayer() and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0 -end -function c40695128.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetDecktopGroup(tp,1) - Duel.ConfirmCards(tp,g) - local tc=g:GetFirst() - local opt=Duel.SelectOption(tp,aux.Stringid(40695128,2),aux.Stringid(40695128,3)) - if opt==1 then - Duel.MoveSequence(tc,opt) - end -end \ No newline at end of file diff --git a/script/c40703222.lua b/script/c40703222.lua deleted file mode 100644 index a63836340c..0000000000 --- a/script/c40703222.lua +++ /dev/null @@ -1,43 +0,0 @@ ---増殖 -function c40703222.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c40703222.cost) - e1:SetTarget(c40703222.target) - e1:SetOperation(c40703222.activate) - c:RegisterEffect(e1) -end -function c40703222.cfilter(c) - return c:IsFaceup() and c:IsCode(40640057) -end -function c40703222.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,c40703222.cfilter,1,nil) end - local g=Duel.SelectReleaseGroup(tp,c40703222.cfilter,1,1,nil) - Duel.Release(g,REASON_COST) -end -function c40703222.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsPlayerCanSpecialSummonMonster(tp,40703223,0,0x4011,300,200,1,RACE_FIEND,ATTRIBUTE_DARK) end - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,ft,0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,ft,0,0) -end -function c40703222.activate(e,tp,eg,ep,ev,re,r,rp) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ft<=0 or not Duel.IsPlayerCanSpecialSummonMonster(tp,40703223,0,0x4011,300,200,1,RACE_FIEND,ATTRIBUTE_DARK) then return end - for i=1,ft do - local token=Duel.CreateToken(tp,40703223) - Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP_DEFENCE) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UNRELEASABLE_SUM) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetValue(1) - e1:SetReset(RESET_EVENT+0x1fe0000) - token:RegisterEffect(e1,true) - end - Duel.SpecialSummonComplete() -end diff --git a/script/c40703393.lua b/script/c40703393.lua deleted file mode 100644 index 6e2b9be1ae..0000000000 --- a/script/c40703393.lua +++ /dev/null @@ -1,48 +0,0 @@ ---冥界流傀儡術 -function c40703393.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_REMOVE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c40703393.target) - e1:SetOperation(c40703393.activate) - c:RegisterEffect(e1) -end -function c40703393.spfilter(c,e,tp,ft,rg) - local lv=c:GetLevel() - return lv>0 and c:IsRace(RACE_FIEND) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) - and rg:CheckWithSumEqual(Card.GetLevel,lv,ft,99) -end -function c40703393.rmfilter(c) - return c:GetLevel()>0 and c:IsAbleToRemove() -end -function c40703393.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ft<=0 then ft=-ft+1 else ft=1 end - if chk==0 then - local rg=Duel.GetMatchingGroup(c40703393.rmfilter,tp,LOCATION_MZONE,0,nil) - return Duel.IsExistingTarget(c40703393.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp,ft,rg) - end - local rg=Duel.GetMatchingGroup(c40703393.rmfilter,tp,LOCATION_MZONE,0,nil) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c40703393.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp,ft,rg) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c40703393.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ft<=0 then ft=-ft+1 else ft=1 end - if not tc:IsRelateToEffect(e) or not tc:IsCanBeSpecialSummoned(e,0,tp,false,false) then return end - local rg=Duel.GetMatchingGroup(c40703393.rmfilter,tp,LOCATION_MZONE,0,nil) - local lv=tc:GetLevel() - if rg:CheckWithSumEqual(Card.GetLevel,lv,ft,99) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local rm=rg:SelectWithSumEqual(tp,Card.GetLevel,lv,ft,99) - Duel.Remove(rm,POS_FACEUP,REASON_EFFECT) - Duel.BreakEffect() - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c40732515.lua b/script/c40732515.lua deleted file mode 100644 index a7219b5066..0000000000 --- a/script/c40732515.lua +++ /dev/null @@ -1,87 +0,0 @@ ---神聖魔導王エンディミオン -function c40732515.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND+LOCATION_GRAVE) - e1:SetCondition(c40732515.spcon) - e1:SetOperation(c40732515.spop) - e1:SetValue(1) - c:RegisterEffect(e1) - --to hand - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(40732515,0)) - e2:SetCategory(CATEGORY_TOHAND) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetCondition(c40732515.condition) - e2:SetTarget(c40732515.target) - e2:SetOperation(c40732515.operation) - c:RegisterEffect(e2) - --destroy - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(40732515,1)) - e3:SetCategory(CATEGORY_DESTROY) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetCost(c40732515.descost) - e3:SetTarget(c40732515.destg) - e3:SetOperation(c40732515.desop) - c:RegisterEffect(e3) -end -function c40732515.spcon(e,c) - if c==nil then return true end - local fd=Duel.GetFieldCard(c:GetControler(),LOCATION_SZONE,5) - return fd and fd:IsCode(39910367) and fd:IsCanRemoveCounter(c:GetControler(),0x3001,6,REASON_COST) - and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 -end -function c40732515.spop(e,tp,eg,ep,ev,re,r,rp,c) - local fd=Duel.GetFieldCard(tp,LOCATION_SZONE,5) - fd:RemoveCounter(tp,0x3001,6,REASON_RULE) -end -function c40732515.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+1 -end -function c40732515.filter(c) - return c:IsType(TYPE_SPELL) and c:IsAbleToHand() -end -function c40732515.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c40732515.filter(chkc) end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c40732515.filter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0) -end -function c40732515.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ShuffleHand(tp) - end -end -function c40732515.cfilter(c) - return c:IsType(TYPE_SPELL) and c:IsDiscardable() -end -function c40732515.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c40732515.cfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,c40732515.cfilter,1,1,REASON_COST+REASON_DISCARD) -end -function c40732515.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsDestructable() end - if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c40732515.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c40736921.lua b/script/c40736921.lua deleted file mode 100644 index 4705d64d29..0000000000 --- a/script/c40736921.lua +++ /dev/null @@ -1,37 +0,0 @@ ---心鎮壷のレプリカ -function c40736921.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c40736921.target) - e1:SetOperation(c40736921.operation) - c:RegisterEffect(e1) -end -function c40736921.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_SZONE) and chkc:IsFacedown() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFacedown,tp,LOCATION_SZONE,LOCATION_SZONE,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(40736921,0)) - local g=Duel.SelectTarget(tp,Card.IsFacedown,tp,LOCATION_SZONE,LOCATION_SZONE,1,1,e:GetHandler()) - Duel.SetChainLimit(aux.FALSE) -end -function c40736921.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsFacedown() and tc:IsRelateToEffect(e) then - c:SetCardTarget(tc) - e:SetLabelObject(tc) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_OWNER_RELATE) - e1:SetCode(EFFECT_CANNOT_TRIGGER) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetCondition(c40736921.rcon) - e1:SetValue(1) - tc:RegisterEffect(e1) - end -end -function c40736921.rcon(e) - return e:GetOwner():IsHasCardTarget(e:GetHandler()) -end diff --git a/script/c40737112.lua b/script/c40737112.lua deleted file mode 100644 index ccb78df294..0000000000 --- a/script/c40737112.lua +++ /dev/null @@ -1,87 +0,0 @@ ---混沌の黒魔術師 -function c40737112.initial_effect(c) - --summon success - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(40737112,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1,40737112) - e1:SetCost(c40737112.thcost) - e1:SetTarget(c40737112.thtg) - e1:SetOperation(c40737112.thop) - c:RegisterEffect(e1) - --remove - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(40737112,1)) - e2:SetCategory(CATEGORY_REMOVE) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_BATTLED) - e2:SetCondition(c40737112.rmcon) - e2:SetTarget(c40737112.rmtg) - e2:SetOperation(c40737112.rmop) - c:RegisterEffect(e2) - --redirect - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e3:SetCondition(c40737112.recon) - e3:SetValue(LOCATION_REMOVED) - c:RegisterEffect(e3) - if not c40737112.global_check then - c40737112.global_check=true - local ge1=Effect.CreateEffect(c) - ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - ge1:SetCode(EVENT_SUMMON_SUCCESS) - ge1:SetLabel(40737112) - ge1:SetOperation(aux.sumreg) - Duel.RegisterEffect(ge1,0) - local ge2=ge1:Clone() - ge2:SetCode(EVENT_SPSUMMON_SUCCESS) - ge2:SetLabel(40737112) - Duel.RegisterEffect(ge2,0) - end -end -function c40737112.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():GetFlagEffect(40737112)~=0 end - e:GetHandler():ResetFlagEffect(40737112) -end -function c40737112.thfilter(c) - return c:IsType(TYPE_SPELL) and c:IsAbleToHand() -end -function c40737112.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c40737112.thfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c40737112.thfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c40737112.thfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c40737112.thop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end -function c40737112.rmcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local bc=c:GetBattleTarget() - e:SetLabelObject(bc) - return bc and bc:IsStatus(STATUS_BATTLE_DESTROYED) and c:IsStatus(STATUS_OPPO_BATTLE) -end -function c40737112.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_REMOVE,e:GetLabelObject(),1,0,0) -end -function c40737112.rmop(e,tp,eg,ep,ev,re,r,rp) - local bc=e:GetLabelObject() - if bc:IsRelateToBattle() and bc:IsAbleToRemove() then - Duel.Remove(bc,POS_FACEUP,REASON_EFFECT) - end -end -function c40737112.recon(e) - return e:GetHandler():IsFaceup() -end diff --git a/script/c4081094.lua b/script/c4081094.lua deleted file mode 100644 index dbc18af308..0000000000 --- a/script/c4081094.lua +++ /dev/null @@ -1,11 +0,0 @@ ---第二の棺 -function c4081094.initial_effect(c) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_SSET) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - c:RegisterEffect(e2) -end diff --git a/script/c4081665.lua b/script/c4081665.lua deleted file mode 100644 index 011bbaf199..0000000000 --- a/script/c4081665.lua +++ /dev/null @@ -1,63 +0,0 @@ ---Emスティルツ・シューター -function c4081665.initial_effect(c) - --special summon rule - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetRange(LOCATION_HAND) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetCondition(c4081665.spcon) - e1:SetOperation(c4081665.spop) - c:RegisterEffect(e1) - --damage - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_DAMAGE) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_CHAINING) - e2:SetRange(LOCATION_GRAVE) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetCountLimit(1,4081665) - e2:SetCondition(c4081665.damcon) - e2:SetCost(c4081665.damcost) - e2:SetTarget(c4081665.damtg) - e2:SetOperation(c4081665.damop) - c:RegisterEffect(e2) -end -function c4081665.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.GetFieldGroupCount(tp,LOCATION_MZONE,LOCATION_MZONE)==0 -end -function c4081665.spop(e,tp,eg,ep,ev,re,r,rp,c) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_SUMMON) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) - e1:SetReset(RESET_PHASE+RESET_END) - e1:SetTargetRange(1,0) - Duel.RegisterEffect(e1,tp) - local e2=e1:Clone() - e2:SetCode(EFFECT_CANNOT_MSET) - Duel.RegisterEffect(e2,tp) -end -function c4081665.cfilter(c) - return c:IsSetCard(0xc6) and c:IsType(TYPE_MONSTER) -end -function c4081665.damcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c4081665.cfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler()) and aux.damcon1(e,1-tp,eg,ep,ev,re,r,rp) -end -function c4081665.damcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) -end -function c4081665.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(2000) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,2000) -end -function c4081665.damop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c40817915.lua b/script/c40817915.lua deleted file mode 100644 index 60526b9ab7..0000000000 --- a/script/c40817915.lua +++ /dev/null @@ -1,46 +0,0 @@ ---クリボルト -function c40817915.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(40817915,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c40817915.target) - e1:SetOperation(c40817915.activate) - c:RegisterEffect(e1) - --unsynchroable - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL) - e2:SetValue(1) - c:RegisterEffect(e2) -end -function c40817915.ofilter(c) - return c:GetOverlayCount()~=0 -end -function c40817915.spfilter(c,e,tp) - return c:IsCode(40817915) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c40817915.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c40817915.ofilter(chkc) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c40817915.ofilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) - and Duel.IsExistingMatchingCard(c40817915.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) - end - Duel.Hint(HINT_SELECTMSG,tp,532) - local g=Duel.SelectTarget(tp,c40817915.ofilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c40817915.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:GetOverlayCount()==0 then return end - tc:RemoveOverlayCard(tp,1,1,REASON_EFFECT) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c40817915.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c4081825.lua b/script/c4081825.lua deleted file mode 100644 index bb47a20509..0000000000 --- a/script/c4081825.lua +++ /dev/null @@ -1,55 +0,0 @@ ---カオス・インフィニティ -function c4081825.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_POSITION+CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_END_PHASE) - e1:SetTarget(c4081825.target) - e1:SetOperation(c4081825.activate) - c:RegisterEffect(e1) -end -function c4081825.spfilter(c,e,tp) - return c:IsSetCard(0x13) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsHasEffect(EFFECT_NECRO_VALLEY) -end -function c4081825.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDefencePos,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) - and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c4081825.spfilter,tp,0x11,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE) -end -function c4081825.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsDefencePos,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - if g:GetCount()==0 then return end - Duel.ChangePosition(g,POS_FACEUP_ATTACK) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=Duel.SelectMatchingCard(tp,c4081825.spfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp) - local tc=sg:GetFirst() - if tc then - Duel.BreakEffect() - Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1,true) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e2,true) - Duel.SpecialSummonComplete() - local e3=Effect.CreateEffect(e:GetHandler()) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e3:SetRange(LOCATION_MZONE) - e3:SetCode(EVENT_PHASE+PHASE_END) - e3:SetOperation(c4081825.desop) - e3:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e3:SetCountLimit(1) - tc:RegisterEffect(e3) - end -end -function c4081825.desop(e,tp,eg,ep,ev,re,r,rp) - Duel.Destroy(e:GetHandler(),REASON_EFFECT) -end diff --git a/script/c40830387.lua b/script/c40830387.lua deleted file mode 100644 index 5995118525..0000000000 --- a/script/c40830387.lua +++ /dev/null @@ -1,67 +0,0 @@ ---古代の機械掌 -function c40830387.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c40830387.target) - e1:SetOperation(c40830387.operation) - c:RegisterEffect(e1) - --Equip limit - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_EQUIP_LIMIT) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetValue(c40830387.eqlimit) - c:RegisterEffect(e2) - --destroy - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(40830387,0)) - e3:SetCategory(CATEGORY_DESTROY) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e3:SetCode(EVENT_DAMAGE_STEP_END) - e3:SetRange(LOCATION_SZONE) - e3:SetCondition(c40830387.descon) - e3:SetTarget(c40830387.destg) - e3:SetOperation(c40830387.desop) - c:RegisterEffect(e3) -end -function c40830387.eqlimit(e,c) - return c:IsSetCard(0x7) -end -function c40830387.filter(c) - return c:IsFaceup() and c:IsSetCard(0x7) -end -function c40830387.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c40830387.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c40830387.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c40830387.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c40830387.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,e:GetHandler(),tc) - end -end -function c40830387.descon(e,tp,eg,ep,ev,re,r,rp) - local ec=e:GetHandler():GetEquipTarget() - local dt=nil - if ec==Duel.GetAttacker() then dt=Duel.GetAttackTarget() - elseif ec==Duel.GetAttackTarget() then dt=Duel.GetAttacker() end - e:SetLabelObject(dt) - return dt and dt:IsRelateToBattle() -end -function c40830387.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetLabelObject(),1,0,0) -end -function c40830387.desop(e,tp,eg,ep,ev,re,r,rp) - local dt=e:GetLabelObject() - if dt:IsRelateToBattle() then - Duel.Destroy(dt,REASON_EFFECT) - end -end diff --git a/script/c40844552.lua b/script/c40844552.lua deleted file mode 100644 index 2a6532aef5..0000000000 --- a/script/c40844552.lua +++ /dev/null @@ -1,41 +0,0 @@ ---極星天ヴァルキュリア -function c40844552.initial_effect(c) - --token - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(40844552,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetCondition(c40844552.condition) - e1:SetCost(c40844552.cost) - e1:SetTarget(c40844552.target) - e1:SetOperation(c40844552.operation) - c:RegisterEffect(e1) -end -function c40844552.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0 and Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,0)<=1 -end -function c40844552.cfilter(c) - return c:IsSetCard(0x42) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost() -end -function c40844552.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c40844552.cfilter,tp,LOCATION_HAND,0,2,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c40844552.cfilter,tp,LOCATION_HAND,0,2,2,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c40844552.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>1 - and Duel.IsPlayerCanSpecialSummonMonster(tp,40844553,0,0x4011,1000,1000,4,RACE_WARRIOR,ATTRIBUTE_EARTH) end - Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,2,0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,0,0) -end -function c40844552.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 then return end - if not Duel.IsPlayerCanSpecialSummonMonster(tp,40844553,0,0x4011,1000,1000,4,RACE_WARRIOR,ATTRIBUTE_EARTH) then return end - for i=1,2 do - local token=Duel.CreateToken(tp,40844553) - Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP_DEFENCE) - end - Duel.SpecialSummonComplete() -end diff --git a/script/c40854197.lua b/script/c40854197.lua deleted file mode 100644 index 5aa1eaab58..0000000000 --- a/script/c40854197.lua +++ /dev/null @@ -1,55 +0,0 @@ ---E・HERO アブソルートZero -function c40854197.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcFun2(c,aux.FilterBoolFunction(Card.IsSetCard,0x8),aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_WATER),true) - --spsummon condition - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(aux.fuslimit) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(40854197,0)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetCondition(c40854197.descon) - e2:SetTarget(c40854197.destg) - e2:SetOperation(c40854197.desop) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EVENT_REMOVE) - c:RegisterEffect(e3) - local e4=e2:Clone() - e4:SetCode(EVENT_TO_DECK) - c:RegisterEffect(e4) - --atkup - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_SINGLE) - e5:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e5:SetRange(LOCATION_MZONE) - e5:SetCode(EFFECT_UPDATE_ATTACK) - e5:SetValue(c40854197.atkup) - c:RegisterEffect(e5) -end -function c40854197.atkfilter(c) - return c:IsFaceup() and c:GetCode()~=40854197 and c:IsAttribute(ATTRIBUTE_WATER) -end -function c40854197.atkup(e,c) - return Duel.GetMatchingGroupCount(c40854197.atkfilter,0,LOCATION_MZONE,LOCATION_MZONE,nil)*500 -end -function c40854197.descon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousPosition(POS_FACEUP) and e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) -end -function c40854197.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,0,LOCATION_MZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c40854197.desop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,0,LOCATION_MZONE,nil) - Duel.Destroy(g,REASON_EFFECT) -end diff --git a/script/c40854824.lua b/script/c40854824.lua deleted file mode 100644 index 1f07f05ded..0000000000 --- a/script/c40854824.lua +++ /dev/null @@ -1,43 +0,0 @@ ---オーバー・ザ・レインボー -function c40854824.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c40854824.condition) - e1:SetTarget(c40854824.target) - e1:SetOperation(c40854824.activate) - c:RegisterEffect(e1) - Duel.AddCustomActivityCounter(40854824,ACTIVITY_CHAIN,c40854824.chainfilter) -end -function c40854824.chainfilter(re,tp,cid) - local code1,code2=re:GetHandler():GetOriginalCodeRule() - return not (re:IsActiveType(TYPE_MONSTER) and (code1==79407975 or code1==79856792 or code2==79407975 or code2==79856792)) -end -function c40854824.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCustomActivityCount(40854824,tp,ACTIVITY_CHAIN)~=0 -end -function c40854824.filter(c,e,tp) - return c:IsSetCard(0x1034) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c40854824.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c40854824.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c40854824.activate(e,tp,eg,ep,ev,re,r,rp) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ft<=0 then return end - local g=Duel.GetMatchingGroup(c40854824.filter,tp,LOCATION_DECK,0,nil,e,tp) - if g:GetCount()==0 then return end - repeat - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=g:Select(tp,1,1,nil) - local tc=sg:GetFirst() - Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) - g:Remove(Card.IsCode,nil,tc:GetCode()) - ft=ft-1 - until ft<=0 or g:GetCount()==0 or not Duel.SelectYesNo(tp,aux.Stringid(40854824,0)) - Duel.SpecialSummonComplete() -end diff --git a/script/c40867519.lua b/script/c40867519.lua deleted file mode 100644 index 1cfa40d97a..0000000000 --- a/script/c40867519.lua +++ /dev/null @@ -1,57 +0,0 @@ ---静寂虫 -function c40867519.initial_effect(c) - --to defence - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(40867519,0)) - e1:SetCategory(CATEGORY_POSITION) - e1:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_SINGLE) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c40867519.postg) - e1:SetOperation(c40867519.posop) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - c:RegisterEffect(e2) - --disable - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetCode(EFFECT_DISABLE) - e3:SetRange(LOCATION_MZONE) - e3:SetTargetRange(LOCATION_SZONE,LOCATION_SZONE) - e3:SetTarget(c40867519.distarget) - c:RegisterEffect(e3) - --disable effect - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e4:SetCode(EVENT_CHAIN_SOLVING) - e4:SetRange(LOCATION_MZONE) - e4:SetOperation(c40867519.disop) - c:RegisterEffect(e4) - --disable trap monster - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_FIELD) - e5:SetCode(EFFECT_DISABLE_TRAPMONSTER) - e5:SetRange(LOCATION_MZONE) - e5:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e5:SetTarget(c40867519.distarget) - c:RegisterEffect(e5) -end -function c40867519.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chk==0 then return e:GetHandler():IsAttackPos() end - Duel.SetOperationInfo(0,CATEGORY_POSITION,e:GetHandler(),1,0,0) -end -function c40867519.posop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFaceup() and c:IsAttackPos() and c:IsRelateToEffect(e) then - Duel.ChangePosition(c,POS_FACEUP_DEFENCE) - end -end -function c40867519.distarget(e,c) - return c~=e:GetHandler() and c:IsType(TYPE_CONTINUOUS) -end -function c40867519.disop(e,tp,eg,ep,ev,re,r,rp) - local tl=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION) - if tl==LOCATION_SZONE and re:IsActiveType(TYPE_CONTINUOUS) then - Duel.NegateEffect(ev) - end -end diff --git a/script/c40884383.lua b/script/c40884383.lua deleted file mode 100644 index 3ec81ce4b5..0000000000 --- a/script/c40884383.lua +++ /dev/null @@ -1,32 +0,0 @@ ---凶悪犯-チョップマン -function c40884383.initial_effect(c) - --equip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(40884383,0)) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - e1:SetTarget(c40884383.eqtg) - e1:SetOperation(c40884383.eqop) - c:RegisterEffect(e1) -end -function c40884383.filter(c,ec) - return c:IsType(TYPE_EQUIP) and c:CheckEquipTarget(ec) -end -function c40884383.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c40884383.filter(chkc,e:GetHandler()) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingTarget(c40884383.filter,tp,LOCATION_GRAVE,0,1,nil,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local g=Duel.SelectTarget(tp,c40884383.filter,tp,LOCATION_GRAVE,0,1,1,nil,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0) -end -function c40884383.eqop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and c:IsFaceup() and c:IsRelateToEffect(e) then - Duel.Equip(tp,tc,c) - end -end diff --git a/script/c40894584.lua b/script/c40894584.lua deleted file mode 100644 index 90cbdc072d..0000000000 --- a/script/c40894584.lua +++ /dev/null @@ -1,50 +0,0 @@ ---ジゴバイト -function c40894584.initial_effect(c) - c:SetUniqueOnField(1,0,40894584) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c40894584.spcon) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(40894584,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetCondition(c40894584.condition) - e2:SetTarget(c40894584.target) - e2:SetOperation(c40894584.operation) - c:RegisterEffect(e2) -end -function c40894584.cfilter(c) - return c:IsFaceup() and c:IsRace(RACE_SPELLCASTER) -end -function c40894584.spcon(e,c) - if c==nil then return true end - return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c40894584.cfilter,c:GetControler(),LOCATION_MZONE,0,1,nil) -end -function c40894584.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsReason(REASON_DESTROY) and e:GetHandler():IsReason(REASON_BATTLE+REASON_EFFECT) -end -function c40894584.filter(c,e,tp) - return c:GetAttack()==1500 and c:GetDefence()==200 and not c:IsCode(40894584) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c40894584.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c40894584.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c40894584.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c40894584.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c40907115.lua b/script/c40907115.lua deleted file mode 100644 index b07ef5f60d..0000000000 --- a/script/c40907115.lua +++ /dev/null @@ -1,31 +0,0 @@ ---霊獣使い ウェン -function c40907115.initial_effect(c) - c:SetSPSummonOnce(40907115) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(40907115,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c40907115.sptg) - e1:SetOperation(c40907115.spop) - c:RegisterEffect(e1) -end -function c40907115.filter(c,e,tp) - return c:IsFaceup() and c:IsSetCard(0xb5) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c40907115.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_REMOVED) and c40907115.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c40907115.filter,tp,LOCATION_REMOVED,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c40907115.filter,tp,LOCATION_REMOVED,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c40907115.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c40908371.lua b/script/c40908371.lua deleted file mode 100644 index 846b0e12ec..0000000000 --- a/script/c40908371.lua +++ /dev/null @@ -1,71 +0,0 @@ ---蒼眼の銀龍 -function c40908371.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,nil,aux.NonTuner(Card.IsType,TYPE_NORMAL),1) - c:EnableReviveLimit() - --negate - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(40908371,0)) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetOperation(c40908371.effop) - c:RegisterEffect(e1) - --spsumon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(40908371,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) - e2:SetCountLimit(1) - e2:SetCondition(c40908371.spcon) - e2:SetTarget(c40908371.sptg) - e2:SetOperation(c40908371.spop) - c:RegisterEffect(e2) -end -function c40908371.filter(c) - return c:IsFaceup() and c:IsRace(RACE_DRAGON) -end -function c40908371.effop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local g=Duel.GetMatchingGroup(c40908371.filter,tp,LOCATION_MZONE,0,nil) - local tc=g:GetFirst() - while tc do - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetValue(1) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,2) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetValue(aux.tgval) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,2) - tc:RegisterEffect(e2) - tc=g:GetNext() - end -end -function c40908371.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c40908371.spfilter(c,e,tp) - return c:IsType(TYPE_NORMAL) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c40908371.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c40908371.spfilter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c40908371.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c40908371.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c40908371.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c40916023.lua b/script/c40916023.lua deleted file mode 100644 index 0d833ed225..0000000000 --- a/script/c40916023.lua +++ /dev/null @@ -1,60 +0,0 @@ ---水の精霊 アクエリア -function c40916023.initial_effect(c) - c:EnableReviveLimit() - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c40916023.spcon) - e1:SetOperation(c40916023.spop) - c:RegisterEffect(e1) - --pos - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(40916023,0)) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) - e2:SetCondition(c40916023.poscon) - e2:SetTarget(c40916023.postg) - e2:SetOperation(c40916023.posop) - c:RegisterEffect(e2) -end -function c40916023.spfilter(c) - return c:IsAttribute(ATTRIBUTE_WATER) and c:IsAbleToRemoveAsCost() -end -function c40916023.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c40916023.spfilter,tp,LOCATION_GRAVE,0,1,nil) -end -function c40916023.spop(e,tp,eg,ep,ev,re,r,rp,c) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c40916023.spfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c40916023.poscon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp -end -function c40916023.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE) - local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_POSITION,g,g:GetCount(),0,0) -end -function c40916023.posop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.ChangePosition(tc,POS_FACEUP_DEFENCE,0,POS_FACEUP_ATTACK,0) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_CHANGE_POSITION) - e1:SetReset(RESET_EVENT+0x1fc0000+RESET_PHASE+PHASE_END,1) - tc:RegisterEffect(e1) - end -end diff --git a/script/c40921545.lua b/script/c40921545.lua deleted file mode 100644 index 709cc640f0..0000000000 --- a/script/c40921545.lua +++ /dev/null @@ -1,34 +0,0 @@ ---ヴェルズ・カイトス -function c40921545.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(40921545,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c40921545.cost) - e1:SetTarget(c40921545.target) - e1:SetOperation(c40921545.operation) - c:RegisterEffect(e1) -end -function c40921545.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end -function c40921545.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable() -end -function c40921545.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_SZONE) and chkc:IsDestructable() end - if chk==0 then return Duel.IsExistingTarget(c40921545.filter,tp,0,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c40921545.filter,tp,0,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c40921545.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c40921744.lua b/script/c40921744.lua deleted file mode 100644 index fb8a5ae0db..0000000000 --- a/script/c40921744.lua +++ /dev/null @@ -1,81 +0,0 @@ ---堕天使ゼラート -function c40921744.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(40921744,0)) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SUMMON_PROC) - e1:SetCondition(c40921744.sumcon) - e1:SetOperation(c40921744.sumop) - e1:SetValue(SUMMON_TYPE_ADVANCE) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(40921744,1)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCost(c40921744.descost) - e2:SetTarget(c40921744.destg) - e2:SetOperation(c40921744.desop) - c:RegisterEffect(e2) - -- - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(40921744,2)) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e3:SetCode(EVENT_PHASE+PHASE_END) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1) - e3:SetCondition(c40921744.sdescon) - e3:SetTarget(c40921744.sdestg) - e3:SetOperation(c40921744.sdesop) - c:RegisterEffect(e3) -end -function c40921744.mfilter(c,tp) - return c:IsAttribute(ATTRIBUTE_DARK) and (c:IsControler(tp) or c:IsFaceup()) -end -function c40921744.sumcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - local mg=Duel.GetMatchingGroup(c40921744.mfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp) - local ag=Duel.GetMatchingGroup(Card.IsAttribute,tp,LOCATION_GRAVE,0,nil,ATTRIBUTE_DARK) - return c:IsLevelAbove(7) and Duel.GetTributeCount(c,mg)>0 - and ag:GetClassCount(Card.GetCode)>=4 -end -function c40921744.sumop(e,tp,eg,ep,ev,re,r,rp,c) - local mg=Duel.GetMatchingGroup(c40921744.mfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp) - local sg=Duel.SelectTribute(tp,c,1,1,mg) - c:SetMaterial(sg) - Duel.Release(sg,REASON_SUMMON+REASON_MATERIAL) -end -function c40921744.cfilter(c) - return c:IsAttribute(ATTRIBUTE_DARK) and c:IsAbleToGraveAsCost() -end -function c40921744.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c40921744.cfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,c40921744.cfilter,1,1,REASON_COST) - e:GetHandler():RegisterFlagEffect(40921744,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) -end -function c40921744.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDestructable,tp,0,LOCATION_MZONE,1,nil) end - local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,0,LOCATION_MZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c40921744.desop(e,tp,eg,ep,ev,re,r,rp,chk) - local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,0,LOCATION_MZONE,nil) - Duel.Destroy(g,REASON_EFFECT) -end -function c40921744.sdescon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetFlagEffect(40921744)~=0 -end -function c40921744.sdestg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0) -end -function c40921744.sdesop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - Duel.Destroy(c,REASON_EFFECT) - end -end diff --git a/script/c40933924.lua b/script/c40933924.lua deleted file mode 100644 index e48e88a238..0000000000 --- a/script/c40933924.lua +++ /dev/null @@ -1,19 +0,0 @@ ---黒蠍盗掘団 -function c40933924.initial_effect(c) - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(40933924,0)) - e1:SetCategory(CATEGORY_TOGRAVE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_BATTLE_DAMAGE) - e1:SetCondition(c40933924.condition) - e1:SetOperation(c40933924.operation) - c:RegisterEffect(e1) -end -function c40933924.condition(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp -end -function c40933924.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(1-tp,Card.IsType,1-tp,LOCATION_DECK,0,1,1,nil,TYPE_SPELL) - Duel.SendtoGrave(g,REASON_EFFECT) -end diff --git a/script/c40937767.lua b/script/c40937767.lua deleted file mode 100644 index c1d1994f5a..0000000000 --- a/script/c40937767.lua +++ /dev/null @@ -1,39 +0,0 @@ ---グレイヴ・オージャ -function c40937767.initial_effect(c) - --cannot be battle target - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_CANNOT_BE_BATTLE_TARGET) - e1:SetCondition(c40937767.ccon) - e1:SetValue(aux.imval1) - c:RegisterEffect(e1) - --damage - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(40937767,0)) - e2:SetCategory(CATEGORY_DAMAGE) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - e2:SetCondition(c40937767.damcon) - e2:SetTarget(c40937767.damtg) - e2:SetOperation(c40937767.damop) - c:RegisterEffect(e2) -end -function c40937767.ccon(e) - return Duel.IsExistingMatchingCard(Card.IsPosition,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil,POS_FACEDOWN_DEFENCE) -end -function c40937767.damcon(e,tp,eg,ep,ev,re,r,rp) - return ep==tp and eg:GetFirst()~=e:GetHandler() -end -function c40937767.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(300) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,300) -end -function c40937767.damop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c40941889.lua b/script/c40941889.lua deleted file mode 100644 index 7615f3cf4d..0000000000 --- a/script/c40941889.lua +++ /dev/null @@ -1,62 +0,0 @@ ---ZW-阿修羅副腕 -function c40941889.initial_effect(c) - c:SetUniqueOnField(1,0,40941889) - --equip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(40941889,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetRange(LOCATION_HAND+LOCATION_MZONE) - e1:SetCondition(c40941889.eqcon) - e1:SetTarget(c40941889.eqtg) - e1:SetOperation(c40941889.eqop) - c:RegisterEffect(e1) - --attack all - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_ATTACK_ALL) - e2:SetValue(1) - c:RegisterEffect(e2) -end -function c40941889.eqcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():CheckUniqueOnField(tp) -end -function c40941889.filter(c) - return c:IsFaceup() and c:IsSetCard(0x7f) -end -function c40941889.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c40941889.filter(chkc) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingTarget(c40941889.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c40941889.filter,tp,LOCATION_MZONE,0,1,1,nil) -end -function c40941889.eqop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) then return end - if c:IsLocation(LOCATION_MZONE) and c:IsFacedown() then return end - local tc=Duel.GetFirstTarget() - if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or tc:GetControler()~=tp or tc:IsFacedown() or not tc:IsRelateToEffect(e) or not c:CheckUniqueOnField(tp) then - Duel.SendtoGrave(c,REASON_EFFECT) - return - end - Duel.Equip(tp,c,tc,true) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(c40941889.eqlimit) - e1:SetLabelObject(tc) - c:RegisterEffect(e1) - --atkup - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(1000) - e2:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e2) -end -function c40941889.eqlimit(e,c) - return c==e:GetLabelObject() -end diff --git a/script/c40975574.lua b/script/c40975574.lua deleted file mode 100644 index 7f7c78419b..0000000000 --- a/script/c40975574.lua +++ /dev/null @@ -1,55 +0,0 @@ ---レッド・リゾネーター -function c40975574.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(40975574,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c40975574.sptg) - e1:SetOperation(c40975574.spop) - c:RegisterEffect(e1) - --recover - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(40975574,1)) - e2:SetCategory(CATEGORY_RECOVER) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetCountLimit(1,40975574) - e2:SetTarget(c40975574.rectg) - e2:SetOperation(c40975574.recop) - c:RegisterEffect(e2) -end -function c40975574.spfilter(c,e,tp) - return c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c40975574.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c40975574.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c40975574.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c40975574.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end -function c40975574.filter(c) - return c:IsFaceup() and c:GetAttack()>0 -end -function c40975574.rectg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c40975574.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c40975574.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - local g=Duel.SelectTarget(tp,c40975574.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,g:GetFirst():GetAttack()) -end -function c40975574.recop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:GetAttack()>0 then - Duel.Recover(tp,tc:GetAttack(),REASON_EFFECT) - end -end diff --git a/script/c40991587.lua b/script/c40991587.lua deleted file mode 100644 index 5b5ab7cea0..0000000000 --- a/script/c40991587.lua +++ /dev/null @@ -1,35 +0,0 @@ ---ワイト夫人 -function c40991587.initial_effect(c) - --change code - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_GRAVE) - e1:SetCode(EFFECT_CHANGE_CODE) - e1:SetValue(32274490) - c:RegisterEffect(e1) - --battle indestructable - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e2:SetRange(LOCATION_MZONE) - e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e2:SetTarget(c40991587.etarget) - e2:SetValue(1) - c:RegisterEffect(e2) - --immune - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetCode(EFFECT_IMMUNE_EFFECT) - e3:SetRange(LOCATION_MZONE) - e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e3:SetTarget(c40991587.etarget) - e3:SetValue(c40991587.efilter) - c:RegisterEffect(e3) -end -function c40991587.etarget(e,c) - return c:GetCode()~=40991587 and c:IsRace(RACE_ZOMBIE) and c:IsLevelBelow(3) -end -function c40991587.efilter(e,te) - return te:IsActiveType(TYPE_SPELL+TYPE_TRAP) and not te:GetHandler():IsCode(4064256) -end diff --git a/script/c41006930.lua b/script/c41006930.lua deleted file mode 100644 index 7c917673ae..0000000000 --- a/script/c41006930.lua +++ /dev/null @@ -1,45 +0,0 @@ ---速攻の黒い忍者 -function c41006930.initial_effect(c) - --remove - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(41006930,0)) - e1:SetCategory(CATEGORY_REMOVE) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,41006930) - e1:SetCost(c41006930.rmcost) - e1:SetTarget(c41006930.rmtg) - e1:SetOperation(c41006930.rmop) - c:RegisterEffect(e1) -end -function c41006930.cfilter(c) - return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_DARK) and c:IsAbleToRemoveAsCost() -end -function c41006930.rmcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c41006930.cfilter,tp,LOCATION_GRAVE,0,2,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c41006930.cfilter,tp,LOCATION_GRAVE,0,2,2,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c41006930.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemove() end - Duel.SetOperationInfo(0,CATEGORY_REMOVE,e:GetHandler(),1,0,0) -end -function c41006930.rmop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFaceup() and c:IsRelateToEffect(e) then - Duel.Remove(c,POS_FACEUP,REASON_EFFECT+REASON_TEMPORARY) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetReset(RESET_PHASE+PHASE_END) - e1:SetLabelObject(c) - e1:SetCountLimit(1) - e1:SetOperation(c41006930.retop) - Duel.RegisterEffect(e1,tp) - end -end -function c41006930.retop(e,tp,eg,ep,ev,re,r,rp) - Duel.ReturnToField(e:GetLabelObject()) -end diff --git a/script/c41039846.lua b/script/c41039846.lua deleted file mode 100644 index 9045e96893..0000000000 --- a/script/c41039846.lua +++ /dev/null @@ -1,50 +0,0 @@ ---カラスの巨群 -function c41039846.initial_effect(c) - --turn set - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(41039846,0)) - e1:SetCategory(CATEGORY_POSITION) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetTarget(c41039846.target) - e1:SetOperation(c41039846.operation) - c:RegisterEffect(e1) - --draw - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(41039846,1)) - e2:SetCategory(CATEGORY_HANDES) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - e2:SetTarget(c41039846.hdtg) - e2:SetOperation(c41039846.hdop) - c:RegisterEffect(e2) - --splimit - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e3:SetRange(LOCATION_DECK) - e3:SetCode(EFFECT_SPSUMMON_CONDITION) - c:RegisterEffect(e3) -end -function c41039846.target(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsCanTurnSet() and c:GetFlagEffect(41039846)==0 end - c:RegisterFlagEffect(41039846,RESET_EVENT+0x1fc0000+RESET_PHASE+PHASE_END,0,1) - Duel.SetOperationInfo(0,CATEGORY_POSITION,c,1,0,0) -end -function c41039846.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - Duel.ChangePosition(c,POS_FACEDOWN_DEFENCE) - end -end -function c41039846.hdtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,1-tp,1) -end -function c41039846.hdop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetFieldGroup(1-tp,LOCATION_HAND,0) - if g:GetCount()==0 then return end - local sg=g:RandomSelect(1-tp,1) - Duel.SendtoGrave(sg,REASON_DISCARD+REASON_EFFECT) -end diff --git a/script/c41077745.lua b/script/c41077745.lua deleted file mode 100644 index 395dfacb69..0000000000 --- a/script/c41077745.lua +++ /dev/null @@ -1,60 +0,0 @@ ---E・HERO アイスエッジ -function c41077745.initial_effect(c) - --direct attack - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(41077745,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c41077745.datcon) - e1:SetCost(c41077745.datcost) - e1:SetOperation(c41077745.datop) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(41077745,1)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_BATTLE_DAMAGE) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCondition(c41077745.descon) - e2:SetTarget(c41077745.destg) - e2:SetOperation(c41077745.desop) - c:RegisterEffect(e2) -end -function c41077745.datcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()==PHASE_MAIN1 -end -function c41077745.datcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) -end -function c41077745.datop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DIRECT_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - c:RegisterEffect(e1) - end -end -function c41077745.descon(e,tp,eg,ep,ev,re,r,rp,chk) - return ep~=tp and Duel.GetAttackTarget()==nil -end -function c41077745.filter(c) - return c:IsFacedown() and c:GetSequence()~=5 and c:IsDestructable() -end -function c41077745.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_SZONE) and chkc:IsControler(1-tp) and c41077745.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c41077745.filter,tp,0,LOCATION_SZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c41077745.filter,tp,0,LOCATION_SZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c41077745.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsFacedown() and tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c41089128.lua b/script/c41089128.lua deleted file mode 100644 index a18b75426f..0000000000 --- a/script/c41089128.lua +++ /dev/null @@ -1,12 +0,0 @@ ---炎を支配する者 -function c41089128.initial_effect(c) - --double tribute - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DOUBLE_TRIBUTE) - e1:SetValue(c41089128.condition) - c:RegisterEffect(e1) -end -function c41089128.condition(e,c) - return c:IsAttribute(ATTRIBUTE_FIRE) -end diff --git a/script/c41090784.lua b/script/c41090784.lua deleted file mode 100644 index 9973347515..0000000000 --- a/script/c41090784.lua +++ /dev/null @@ -1,37 +0,0 @@ ---氷結界の大僧正 -function c41090784.initial_effect(c) - --to defence - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(41090784,0)) - e1:SetCategory(CATEGORY_POSITION) - e1:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_SINGLE) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c41090784.potg) - e1:SetOperation(c41090784.poop) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - c:RegisterEffect(e2) - --special summon - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetRange(LOCATION_MZONE) - e3:SetTargetRange(LOCATION_MZONE,0) - e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - e3:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x2f)) - e3:SetValue(c41090784.indval) - c:RegisterEffect(e3) -end -function c41090784.potg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chk==0 then return e:GetHandler():IsAttackPos() end - Duel.SetOperationInfo(0,CATEGORY_POSITION,e:GetHandler(),1,0,0) -end -function c41090784.poop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFaceup() and c:IsAttackPos() and c:IsRelateToEffect(e) then - Duel.ChangePosition(c,POS_FACEUP_DEFENCE) - end -end -function c41090784.indval(e,re,rp) - return re:IsActiveType(TYPE_SPELL+TYPE_TRAP) -end diff --git a/script/c41097056.lua b/script/c41097056.lua deleted file mode 100644 index c9cc25df90..0000000000 --- a/script/c41097056.lua +++ /dev/null @@ -1,37 +0,0 @@ ---シンクロ・クラッカー -function c41097056.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TODECK+CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c41097056.target) - e1:SetOperation(c41097056.activate) - c:RegisterEffect(e1) -end -function c41097056.filter(c,tp) - return c:IsFaceup() and c:IsType(TYPE_SYNCHRO) and c:IsAbleToExtra() - and Duel.IsExistingMatchingCard(c41097056.desfilter,tp,0,LOCATION_MZONE,1,nil,math.max(0,c:GetTextAttack())) -end -function c41097056.desfilter(c,atk) - return c:IsFaceup() and c:IsAttackBelow(atk) and c:IsDestructable() -end -function c41097056.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c41097056.filter(chkc,tp) end - if chk==0 then return Duel.IsExistingTarget(c41097056.filter,tp,LOCATION_MZONE,0,1,nil,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g1=Duel.SelectTarget(tp,c41097056.filter,tp,LOCATION_MZONE,0,1,1,nil,tp) - local g2=Duel.GetMatchingGroup(c41097056.desfilter,tp,0,LOCATION_MZONE,nil,math.max(0,g1:GetFirst():GetTextAttack())) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g1,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g2,g2:GetCount(),0,0) -end -function c41097056.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - local atk=tc:GetTextAttack() - if atk<0 then atk=0 end - if tc:IsRelateToEffect(e) and Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_EXTRA) then - local g=Duel.GetMatchingGroup(c41097056.desfilter,tp,0,LOCATION_MZONE,nil,atk) - Duel.Destroy(g,REASON_EFFECT) - end -end diff --git a/script/c41098335.lua b/script/c41098335.lua deleted file mode 100644 index 05fedd7186..0000000000 --- a/script/c41098335.lua +++ /dev/null @@ -1,39 +0,0 @@ ---ファイターズ・エイプ -function c41098335.initial_effect(c) - --atkup - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(41098335,0)) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_BATTLE_DESTROYING) - e1:SetCondition(c41098335.atkcon) - e1:SetOperation(c41098335.atkop) - c:RegisterEffect(e1) - --atk clear - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_TURN_END) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetOperation(c41098335.retop) - c:RegisterEffect(e2) -end -function c41098335.atkcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsFaceup() and e:GetHandler():IsRelateToBattle() -end -function c41098335.atkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(300) - e1:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e1) - end -end -function c41098335.retop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if Duel.GetTurnPlayer()==tp and c:GetAttackedCount()==0 then - c:ResetEffect(RESET_DISABLE,RESET_EVENT) - end -end diff --git a/script/c41113025.lua b/script/c41113025.lua deleted file mode 100644 index d6e98ad78f..0000000000 --- a/script/c41113025.lua +++ /dev/null @@ -1,33 +0,0 @@ ---ディスクライダー -function c41113025.initial_effect(c) - --atkup - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(41113025,0)) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCost(c41113025.cost) - e1:SetOperation(c41113025.operation) - c:RegisterEffect(e1) -end -function c41113025.cfilter(c) - return c:GetType()==TYPE_TRAP and c:IsAbleToRemoveAsCost() -end -function c41113025.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c41113025.cfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local cg=Duel.SelectMatchingCard(tp,c41113025.cfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.Remove(cg,POS_FACEUP,REASON_COST) -end -function c41113025.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFaceup() and c:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(500) - e1:SetReset(RESET_EVENT+0x1ff0000+RESET_PHASE+PHASE_END,2) - c:RegisterEffect(e1) - end -end diff --git a/script/c41141943.lua b/script/c41141943.lua deleted file mode 100644 index 04022272b5..0000000000 --- a/script/c41141943.lua +++ /dev/null @@ -1,87 +0,0 @@ ---超重武者ヒキャ-Q -function c41141943.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(41141943,0)) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c41141943.hspcon) - e1:SetValue(1) - c:RegisterEffect(e1) - --spsummon limit - local e2=Effect.CreateEffect(c) - e2:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetCondition(c41141943.hspcon2) - e2:SetOperation(c41141943.hspop) - c:RegisterEffect(e2) - --special summon - local e3=Effect.CreateEffect(c) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DRAW) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1,41141943) - e3:SetCondition(c41141943.spcon) - e3:SetCost(c41141943.spcost) - e3:SetTarget(c41141943.sptg) - e3:SetOperation(c41141943.spop) - c:RegisterEffect(e3) -end -function c41141943.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) -end -function c41141943.hspcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and not Duel.IsExistingMatchingCard(c41141943.filter,tp,LOCATION_GRAVE,0,1,nil) -end -function c41141943.hspcon2(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+1 -end -function c41141943.hspop(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetTargetRange(1,0) - e1:SetTarget(c41141943.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function c41141943.splimit(e,c,sump,sumtype,sumpos,targetp,se) - return not c:IsSetCard(0x9a) -end -function c41141943.spcon(e,tp,eg,ep,ev,re,r,rp) - return not Duel.IsExistingMatchingCard(c41141943.filter,tp,LOCATION_GRAVE,0,1,nil) -end -function c41141943.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end -function c41141943.spfilter(c,e,tp) - return c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENCE,1-tp) -end -function c41141943.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0 - and Duel.IsPlayerCanDraw(tp,1) - and Duel.IsExistingMatchingCard(c41141943.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c41141943.spop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c41141943.spfilter,tp,LOCATION_HAND,0,nil,e,tp) - if g:GetCount()==0 then return end - local ft=Duel.GetLocationCount(1-tp,LOCATION_MZONE) - if ft>2 then ft=2 end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=g:Select(tp,1,ft,nil) - local ct=Duel.SpecialSummon(sg,0,tp,1-tp,false,false,POS_FACEUP_DEFENCE) - if ct>0 then - Duel.BreakEffect() - Duel.Draw(tp,ct,REASON_EFFECT) - end -end diff --git a/script/c41142615.lua b/script/c41142615.lua deleted file mode 100644 index d0da0b740e..0000000000 --- a/script/c41142615.lua +++ /dev/null @@ -1,21 +0,0 @@ ---陽気な葬儀屋 -function c41142615.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_HANDES) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c41142615.target) - e1:SetOperation(c41142615.activate) - c:RegisterEffect(e1) -end -function c41142615.filter(c) - return c:IsType(TYPE_MONSTER) -end -function c41142615.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c41142615.filter,tp,LOCATION_HAND,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1) -end -function c41142615.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.DiscardHand(tp,c41142615.filter,1,3,REASON_EFFECT+REASON_DISCARD) -end diff --git a/script/c41147577.lua b/script/c41147577.lua deleted file mode 100644 index 0f46d47085..0000000000 --- a/script/c41147577.lua +++ /dev/null @@ -1,62 +0,0 @@ ---CX 風紀大宮司サイモン -function c41147577.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,7,3) - c:EnableReviveLimit() - -- - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_IMMUNE_EFFECT) - e1:SetValue(c41147577.efilter) - c:RegisterEffect(e1) - -- - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(41147577,0)) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetRange(LOCATION_MZONE) - e2:SetHintTiming(0,0x1c0) - e2:SetCountLimit(1) - e2:SetCondition(c41147577.poscon) - e2:SetCost(c41147577.poscost) - e2:SetTarget(c41147577.postg) - e2:SetOperation(c41147577.posop) - c:RegisterEffect(e2) -end -function c41147577.efilter(e,te) - return te:IsActiveType(TYPE_MONSTER) and te:GetOwner()~=e:GetOwner() -end -function c41147577.poscon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetOverlayGroup():IsExists(Card.IsCode,1,nil,14152862) -end -function c41147577.poscost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c41147577.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) end - if chk==0 then return Duel.IsExistingTarget(nil,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - Duel.SelectTarget(tp,nil,tp,0,LOCATION_MZONE,1,1,nil) -end -function c41147577.posop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.ChangePosition(tc,POS_FACEUP_DEFENCE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK) - Duel.NegateRelatedChain(tc,RESET_TURN_SET) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetValue(RESET_TURN_SET) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - tc:RegisterEffect(e2) - end -end diff --git a/script/c41158734.lua b/script/c41158734.lua deleted file mode 100644 index 4a7d19636f..0000000000 --- a/script/c41158734.lua +++ /dev/null @@ -1,49 +0,0 @@ ---アポカテクイル -function c41158734.initial_effect(c) - --level change - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_CHANGE_LEVEL) - e1:SetCondition(c41158734.lvcon) - e1:SetValue(5) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetDescription(aux.Stringid(41158734,0)) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetCondition(c41158734.spcon) - e2:SetTarget(c41158734.sptg) - e2:SetOperation(c41158734.spop) - c:RegisterEffect(e2) -end -function c41158734.lvfilter(c) - return c:IsFaceup() and c:IsType(TYPE_TUNER) -end -function c41158734.lvcon(e) - return Duel.IsExistingMatchingCard(c41158734.lvfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) -end -function c41158734.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) and e:GetHandler():IsReason(REASON_DESTROY) -end -function c41158734.spfilter(c,e,tp) - return c:IsCode(42280216) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c41158734.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c41158734.spfilter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c41158734.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c41158734.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c41158734.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c41160533.lua b/script/c41160533.lua deleted file mode 100644 index b89da281f2..0000000000 --- a/script/c41160533.lua +++ /dev/null @@ -1,53 +0,0 @@ ---ローズ・テンタクルス -function c41160533.initial_effect(c) - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_PHASE_START+PHASE_BATTLE) - e2:SetRange(LOCATION_MZONE) - e2:SetOperation(c41160533.maop) - c:RegisterEffect(e2) - --special summon - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(41160533,0)) - e3:SetCategory(CATEGORY_DAMAGE) - e3:SetCode(EVENT_BATTLE_DESTROYING) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e3:SetCondition(c41160533.damcon) - e3:SetTarget(c41160533.damtg) - e3:SetOperation(c41160533.damop) - c:RegisterEffect(e3) -end -function c41160533.mfilter(c) - return c:IsFaceup() and c:IsRace(RACE_PLANT) -end -function c41160533.maop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetTurnPlayer()~=tp then return end - local ct=Duel.GetMatchingGroupCount(c41160533.mfilter,tp,0,LOCATION_MZONE,nil) - if ct~=0 then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_EXTRA_ATTACK) - e1:SetValue(ct) - e1:SetReset(RESET_EVENT+0x1ff0000+RESET_PHASE+PHASE_BATTLE) - e:GetHandler():RegisterEffect(e1) - end -end -function c41160533.damcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetBattleTarget():IsRace(RACE_PLANT) -end -function c41160533.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(300) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,300) -end -function c41160533.damop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c41160595.lua b/script/c41160595.lua deleted file mode 100644 index 1321fd8e70..0000000000 --- a/script/c41160595.lua +++ /dev/null @@ -1,34 +0,0 @@ ---コーリング・マジック -function c41160595.initial_effect(c) - --set - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(41160595,0)) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCondition(c41160595.setcon) - e1:SetTarget(c41160595.settg) - e1:SetOperation(c41160595.setop) - c:RegisterEffect(e1) -end -function c41160595.setcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return bit.band(r,0x41)==0x41 and rp~=tp and re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and c:GetPreviousControler()==tp - and c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousPosition(POS_FACEDOWN) -end -function c41160595.filter(c) - return c:GetType()==TYPE_SPELL+TYPE_QUICKPLAY and c:IsSSetable() -end -function c41160595.settg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingMatchingCard(c41160595.filter,tp,LOCATION_DECK,0,1,nil) end -end -function c41160595.setop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) - local g=Duel.SelectMatchingCard(tp,c41160595.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SSet(tp,g:GetFirst()) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c41172955.lua b/script/c41172955.lua deleted file mode 100644 index 67be873a62..0000000000 --- a/script/c41172955.lua +++ /dev/null @@ -1,30 +0,0 @@ ---グリーン・ガジェット -function c41172955.initial_effect(c) - --search - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(41172955,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c41172955.tg) - e1:SetOperation(c41172955.op) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e2) -end -function c41172955.filter(c) - return c:IsCode(86445415) and c:IsAbleToHand() -end -function c41172955.tg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c41172955.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c41172955.op(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstMatchingCard(c41172955.filter,tp,LOCATION_DECK,0,nil) - if tc then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end diff --git a/script/c41181774.lua b/script/c41181774.lua deleted file mode 100644 index ee0b4c63e7..0000000000 --- a/script/c41181774.lua +++ /dev/null @@ -1,73 +0,0 @@ ---地縛神 Wiraqocha Rasca -function c41181774.initial_effect(c) - c:SetUniqueOnField(1,1,10000000) - -- - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e4:SetRange(LOCATION_MZONE) - e4:SetCode(EFFECT_SELF_DESTROY) - e4:SetCondition(c41181774.sdcon) - c:RegisterEffect(e4) - --battle target - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_SINGLE) - e5:SetCode(EFFECT_CANNOT_BE_BATTLE_TARGET) - e5:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e5:SetRange(LOCATION_MZONE) - e5:SetValue(aux.imval1) - c:RegisterEffect(e5) - --direct atk - local e6=Effect.CreateEffect(c) - e6:SetType(EFFECT_TYPE_SINGLE) - e6:SetCode(EFFECT_DIRECT_ATTACK) - c:RegisterEffect(e6) - --handes - local e7=Effect.CreateEffect(c) - e7:SetDescription(aux.Stringid(41181774,0)) - e7:SetCategory(CATEGORY_TODECK+CATEGORY_HANDES) - e7:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e7:SetProperty(EFFECT_FLAG_CARD_TARGET) - e7:SetCode(EVENT_SUMMON_SUCCESS) - e7:SetTarget(c41181774.hdtg) - e7:SetOperation(c41181774.hdop) - c:RegisterEffect(e7) -end -function c41181774.sdcon(e) - local c=e:GetHandler() - if c:IsStatus(STATUS_BATTLE_DESTROYED) then return false end - local f1=Duel.GetFieldCard(0,LOCATION_SZONE,5) - local f2=Duel.GetFieldCard(1,LOCATION_SZONE,5) - return ((f1==nil or not f1:IsFaceup()) and (f2==nil or not f2:IsFaceup())) -end -function c41181774.hdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsControler(tp) and chkc:IsAbleToDeck() end - if chk==0 then return true end - local ct=Duel.GetFieldGroupCount(tp,0,LOCATION_HAND) - if ct==0 then return end - if ct>3 then ct=3 end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectTarget(tp,Card.IsAbleToDeck,tp,LOCATION_ONFIELD,0,1,ct,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0) -end -function c41181774.hdop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - if not g then return end - local sg=g:Filter(Card.IsRelateToEffect,nil,e) - Duel.SendtoDeck(sg,nil,2,REASON_EFFECT) - local ct=sg:FilterCount(Card.IsLocation,nil,LOCATION_DECK+LOCATION_EXTRA) - if ct==0 then return end - local dg=Duel.GetFieldGroup(tp,0,LOCATION_HAND):RandomSelect(tp,ct) - local dt=Duel.SendtoGrave(dg,REASON_EFFECT+REASON_DISCARD) - local c=e:GetHandler() - if dt~=0 and c:IsRelateToEffect(e) and c:IsFaceup() then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(dt*1000) - e1:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e1) - end -end diff --git a/script/c41182875.lua b/script/c41182875.lua deleted file mode 100644 index d66f082d90..0000000000 --- a/script/c41182875.lua +++ /dev/null @@ -1,4 +0,0 @@ ---ジャベリンビートルの契約 -function c41182875.initial_effect(c) - aux.AddRitualProcGreater(c,aux.FilterBoolFunction(Card.IsCode,26932788)) -end diff --git a/script/c41197012.lua b/script/c41197012.lua deleted file mode 100644 index 5387ef300b..0000000000 --- a/script/c41197012.lua +++ /dev/null @@ -1,47 +0,0 @@ ---スカーレッド・カーペット -function c41197012.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_END_PHASE) - e1:SetCondition(c41197012.spcon) - e1:SetTarget(c41197012.sptg) - e1:SetOperation(c41197012.spop) - c:RegisterEffect(e1) -end -function c41197012.cfilter(c) - return c:IsFaceup() and c:IsType(TYPE_SYNCHRO) and c:IsRace(RACE_DRAGON) -end -function c41197012.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c41197012.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) -end -function c41197012.filter(c,e,tp) - return c:IsSetCard(0x57) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c41197012.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c41197012.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c41197012.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - local ct=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ct>2 then ct=2 end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c41197012.filter,tp,LOCATION_GRAVE,0,1,ct,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,g:GetCount(),0,0) -end -function c41197012.spop(e,tp,eg,ep,ev,re,r,rp) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ft<=0 then return end - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local sg=g:Filter(Card.IsRelateToEffect,nil,e) - if sg:GetCount()==0 then return end - if ft>=g:GetCount() then - Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) - else - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg2=sg:Select(tp,ft,ft,nil) - Duel.SpecialSummon(sg2,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c41201386.lua b/script/c41201386.lua deleted file mode 100644 index b980ff3aaa..0000000000 --- a/script/c41201386.lua +++ /dev/null @@ -1,87 +0,0 @@ ---RUM-レイド・フォース -function c41201386.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(41201386,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c41201386.target) - e1:SetOperation(c41201386.activate) - c:RegisterEffect(e1) - --salvage - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(41201386,1)) - e2:SetCategory(CATEGORY_TOHAND) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetRange(LOCATION_GRAVE) - e2:SetCost(c41201386.thcost) - e2:SetTarget(c41201386.thtg) - e2:SetOperation(c41201386.thop) - c:RegisterEffect(e2) -end -function c41201386.filter1(c,e,tp) - local rk=c:GetRank() - return c:IsFaceup() and c:IsType(TYPE_XYZ) - and Duel.IsExistingMatchingCard(c41201386.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,c,rk+1) -end -function c41201386.filter2(c,e,tp,mc,rk) - return c:GetRank()==rk and c:IsSetCard(0xba) and mc:IsCanBeXyzMaterial(c) - and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) -end -function c41201386.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c41201386.filter1(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsExistingTarget(c41201386.filter1,tp,LOCATION_MZONE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - Duel.SelectTarget(tp,c41201386.filter1,tp,LOCATION_MZONE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function c41201386.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<0 then return end - local tc=Duel.GetFirstTarget() - if tc:IsFacedown() or not tc:IsRelateToEffect(e) or tc:IsControler(1-tp) or tc:IsImmuneToEffect(e) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c41201386.filter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc,tc:GetRank()+1) - local sc=g:GetFirst() - if sc then - local mg=tc:GetOverlayGroup() - if mg:GetCount()~=0 then - Duel.Overlay(sc,mg) - end - sc:SetMaterial(Group.FromCards(tc)) - Duel.Overlay(sc,Group.FromCards(tc)) - Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP) - sc:CompleteProcedure() - end -end -function c41201386.cfilter(c) - return c:IsSetCard(0xba) and c:IsAbleToRemoveAsCost() -end -function c41201386.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() - and Duel.IsExistingMatchingCard(c41201386.cfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c41201386.cfilter,tp,LOCATION_HAND,0,1,1,nil) - g:AddCard(e:GetHandler()) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c41201386.thfilter(c) - return c:IsSetCard(0x95) and not c:IsCode(41201386) and c:IsAbleToHand() -end -function c41201386.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c41201386.thfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c41201386.thfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c41201386.thfilter,tp,LOCATION_GRAVE,0,1,1,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c41201386.thop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end diff --git a/script/c41201555.lua b/script/c41201555.lua deleted file mode 100644 index 826740a367..0000000000 --- a/script/c41201555.lua +++ /dev/null @@ -1,77 +0,0 @@ ---コアキメイル・グラヴィローズ -function c41201555.initial_effect(c) - --cost - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c41201555.mtcon) - e1:SetOperation(c41201555.mtop) - c:RegisterEffect(e1) - --send to grave - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(41201555,3)) - e2:SetCategory(CATEGORY_TOGRAVE) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) - e2:SetCondition(c41201555.condition) - e2:SetTarget(c41201555.target) - e2:SetOperation(c41201555.operation) - c:RegisterEffect(e2) -end -function c41201555.mtcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c41201555.cfilter1(c) - return c:IsCode(36623431) and c:IsAbleToGraveAsCost() -end -function c41201555.cfilter2(c) - return c:IsType(TYPE_MONSTER) and c:IsRace(RACE_PLANT) and not c:IsPublic() -end -function c41201555.mtop(e,tp,eg,ep,ev,re,r,rp) - local g1=Duel.GetMatchingGroup(c41201555.cfilter1,tp,LOCATION_HAND,0,nil) - local g2=Duel.GetMatchingGroup(c41201555.cfilter2,tp,LOCATION_HAND,0,nil) - local select=2 - if g1:GetCount()>0 and g2:GetCount()>0 then - select=Duel.SelectOption(tp,aux.Stringid(41201555,0),aux.Stringid(41201555,1),aux.Stringid(41201555,2)) - elseif g1:GetCount()>0 then - select=Duel.SelectOption(tp,aux.Stringid(41201555,0),aux.Stringid(41201555,2)) - if select==1 then select=2 end - elseif g2:GetCount()>0 then - select=Duel.SelectOption(tp,aux.Stringid(41201555,1),aux.Stringid(41201555,2)) - select=select+1 - end - if select==0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=g1:Select(tp,1,1,nil) - Duel.SendtoGrave(g,REASON_COST) - elseif select==1 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) - local g=g2:Select(tp,1,1,nil) - Duel.ConfirmCards(1-tp,g) - Duel.ShuffleHand(tp) - else - Duel.Destroy(e:GetHandler(),REASON_RULE) - end -end -function c41201555.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c41201555.tgfilter(c) - return c:IsLevelBelow(3) and c:IsAbleToGrave() -end -function c41201555.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c41201555.tgfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) -end -function c41201555.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c41201555.tgfilter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoGrave(g,REASON_EFFECT) - end -end diff --git a/script/c41224658.lua b/script/c41224658.lua deleted file mode 100644 index f18e562859..0000000000 --- a/script/c41224658.lua +++ /dev/null @@ -1,42 +0,0 @@ ---野望のゴーファー -function c41224658.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(41224658,0)) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetTarget(c41224658.destg) - e1:SetOperation(c41224658.desop) - c:RegisterEffect(e1) -end -function c41224658.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsDestructable() end - if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,0,LOCATION_MZONE,1,2,nil) - if Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)==Duel.GetMatchingGroupCount(Card.IsPublic,tp,0,LOCATION_HAND,nil) - and not Duel.IsExistingMatchingCard(Card.IsType,tp,0,LOCATION_HAND,1,nil,TYPE_MONSTER) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) - end -end -function c41224658.cfilter(c) - return not c:IsPublic() and c:IsType(TYPE_MONSTER) -end -function c41224658.desop(e,tp,eg,ep,ev,re,r,rp) - local dis=false - if Duel.IsChainDisablable(0) then - local cg=Duel.GetMatchingGroup(c41224658.cfilter,tp,0,LOCATION_HAND,nil) - if cg:GetCount()>0 and Duel.SelectYesNo(1-tp,aux.Stringid(41224658,1)) then - Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_CONFIRM) - local sg=cg:Select(1-tp,1,1,nil) - Duel.ConfirmCards(tp,sg) - Duel.ShuffleHand(1-tp) - return - end - end - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) - Duel.Destroy(g,REASON_EFFECT) -end diff --git a/script/c41230939.lua b/script/c41230939.lua deleted file mode 100644 index b9f1d0a4e6..0000000000 --- a/script/c41230939.lua +++ /dev/null @@ -1,65 +0,0 @@ ---サイバー・ダーク・ホーン -function c41230939.initial_effect(c) - --equip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(41230939,0)) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c41230939.eqtg) - e1:SetOperation(c41230939.eqop) - c:RegisterEffect(e1) - --pierce - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_PIERCE) - c:RegisterEffect(e2) -end -function c41230939.filter(c) - return c:IsLevelBelow(3) and c:IsRace(RACE_DRAGON) -end -function c41230939.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c41230939.filter(chkc) end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local g=Duel.SelectTarget(tp,c41230939.filter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0) -end -function c41230939.eqop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsFaceup() and c:IsRelateToEffect(e) and tc and tc:IsRelateToEffect(e) then - local atk=tc:GetTextAttack() - if atk<0 then atk=0 end - if not Duel.Equip(tp,tc,c,false) then return end - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_OWNER_RELATE) - e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(c41230939.eqlimit) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetProperty(EFFECT_FLAG_OWNER_RELATE+EFFECT_FLAG_IGNORE_IMMUNE) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetReset(RESET_EVENT+0x1fe0000) - e2:SetValue(atk) - tc:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_EQUIP) - e3:SetCode(EFFECT_DESTROY_SUBSTITUTE) - e3:SetReset(RESET_EVENT+0x1fe0000) - e3:SetValue(c41230939.repval) - tc:RegisterEffect(e3) - end -end -function c41230939.eqlimit(e,c) - return e:GetOwner()==c -end -function c41230939.repval(e,re,r,rp) - return bit.band(r,REASON_BATTLE)~=0 -end diff --git a/script/c41234315.lua b/script/c41234315.lua deleted file mode 100644 index 60b390d5cf..0000000000 --- a/script/c41234315.lua +++ /dev/null @@ -1,53 +0,0 @@ ---フェイク・エクスプロージョン・ペンタ -function c41234315.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetCondition(c41234315.condition) - e1:SetOperation(c41234315.activate) - c:RegisterEffect(e1) -end -function c41234315.condition(e,tp,eg,ep,ev,re,r,rp) - return eg:GetFirst():IsControler(1-tp) -end -function c41234315.activate(e,tp,eg,ep,ev,re,r,rp) - local a=Duel.GetAttacker() - local d=Duel.GetAttackTarget() - if a then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e1:SetValue(1) - e1:SetReset(RESET_PHASE+PHASE_DAMAGE) - a:RegisterEffect(e1) - end - if d then - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e2:SetValue(1) - e2:SetReset(RESET_PHASE+PHASE_DAMAGE) - d:RegisterEffect(e2) - end - local e3=Effect.CreateEffect(e:GetHandler()) - e3:SetDescription(aux.Stringid(41234315,0)) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e3:SetCode(EVENT_BATTLED) - e3:SetOperation(c41234315.spop) - e3:SetReset(RESET_PHASE+PHASE_DAMAGE) - Duel.RegisterEffect(e3,tp) -end -function c41234315.spfilter(c,e,tp) - return c:IsCode(89493368) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsHasEffect(EFFECT_NECRO_VALLEY) -end -function c41234315.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c41234315.spfilter,tp,0x12,0,1,1,nil,e,tp) - if g:GetCount()~=0 then - Duel.SpecialSummon(g,0,tp,tp,true,true,POS_FACEUP) - end -end diff --git a/script/c41249545.lua b/script/c41249545.lua deleted file mode 100644 index 8b813cea77..0000000000 --- a/script/c41249545.lua +++ /dev/null @@ -1,14 +0,0 @@ ---グラスファントム -function c41249545.initial_effect(c) - --atkup - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(c41249545.atkup) - c:RegisterEffect(e1) -end -function c41249545.atkup(e,c) - return Duel.GetMatchingGroupCount(Card.IsCode,c:GetControler(),LOCATION_GRAVE,0,nil,41249545)*500 -end diff --git a/script/c41269771.lua b/script/c41269771.lua deleted file mode 100644 index f123ba5626..0000000000 --- a/script/c41269771.lua +++ /dev/null @@ -1,28 +0,0 @@ ---セイクリッド・グレディ -function c41269771.initial_effect(c) - --summon success - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(41269771,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_SUMMON_SUCCESS) - e2:SetTarget(c41269771.sptg) - e2:SetOperation(c41269771.spop) - c:RegisterEffect(e2) -end -function c41269771.filter(c,e,tp) - return c:IsSetCard(0x53) and c:GetLevel()==4 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c41269771.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c41269771.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c41269771.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c41269771.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c4130270.lua b/script/c4130270.lua deleted file mode 100644 index 6f853bc80d..0000000000 --- a/script/c4130270.lua +++ /dev/null @@ -1,18 +0,0 @@ ---G・B・ハンター -function c4130270.initial_effect(c) - -- - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_TO_DECK) - e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_SET_AVAILABLE) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(LOCATION_ONFIELD,LOCATION_ONFIELD) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_CANNOT_TO_HAND) - e2:SetTarget(c4130270.etarget) - c:RegisterEffect(e2) -end -function c4130270.etarget(e,c) - return c:IsType(TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ) -end diff --git a/script/c41307269.lua b/script/c41307269.lua deleted file mode 100644 index 481d8bba43..0000000000 --- a/script/c41307269.lua +++ /dev/null @@ -1,43 +0,0 @@ ---超重武者カブ-10 -function c41307269.initial_effect(c) - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(41307269,0)) - e1:SetCategory(CATEGORY_POSITION) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c41307269.condition) - e1:SetTarget(c41307269.target) - e1:SetOperation(c41307269.operation) - c:RegisterEffect(e1) -end -function c41307269.cfilter(c,tp) - return c:GetSummonPlayer()~=tp -end -function c41307269.condition(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c41307269.cfilter,1,nil,tp) -end -function c41307269.filter(c) - return c:IsPosition(POS_FACEUP_ATTACK) and c:IsSetCard(0x9a) -end -function c41307269.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c41307269.filter,tp,LOCATION_MZONE,0,1,nil) end - local g=Duel.GetMatchingGroup(c41307269.filter,tp,LOCATION_MZONE,0,nil) - Duel.SetOperationInfo(0,CATEGORY_POSITION,g,g:GetCount(),0,0) -end -function c41307269.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c41307269.filter,tp,LOCATION_MZONE,0,nil) - Duel.ChangePosition(g,POS_FACEUP_DEFENCE,POS_FACEDOWN_DEFENCE,0,0) - local og=Duel.GetOperatedGroup() - local tc=og:GetFirst() - while tc do - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_DEFENCE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetValue(500) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - tc:RegisterEffect(e1) - tc=og:GetNext() - end -end diff --git a/script/c41309158.lua b/script/c41309158.lua deleted file mode 100644 index 2d3fc687d2..0000000000 --- a/script/c41309158.lua +++ /dev/null @@ -1,59 +0,0 @@ ---CX 機装魔人エンジェネラル -function c41309158.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,4,3) - c:EnableReviveLimit() - -- - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(41309158,0)) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(c41309158.poscon) - e1:SetTarget(c41309158.postg) - e1:SetOperation(c41309158.posop) - c:RegisterEffect(e1) - --damage - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(41309158,1)) - e2:SetCategory(CATEGORY_DAMAGE) - e2:SetCode(EVENT_BATTLE_DAMAGE) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCondition(c41309158.damcon) - e2:SetCost(c41309158.damcost) - e2:SetTarget(c41309158.damtg) - e2:SetOperation(c41309158.damop) - c:RegisterEffect(e2) -end -function c41309158.poscon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_XYZ -end -function c41309158.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsDefencePos() end - if chk==0 then return Duel.IsExistingTarget(Card.IsDefencePos,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DEFENCE) - Duel.SelectTarget(tp,Card.IsDefencePos,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) -end -function c41309158.posop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsDefencePos() and tc:IsRelateToEffect(e) then - Duel.ChangePosition(tc,POS_FACEUP_ATTACK) - end -end -function c41309158.damcon(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp and e:GetHandler():GetOverlayGroup():IsExists(Card.IsCode,1,nil,15914410) -end -function c41309158.damcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c41309158.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(1000) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,1000) -end -function c41309158.damop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c41329458.lua b/script/c41329458.lua deleted file mode 100644 index 93f6c8b96f..0000000000 --- a/script/c41329458.lua +++ /dev/null @@ -1,76 +0,0 @@ ---幻獣機グリーフィン -function c41329458.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(41329458,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(1,41329458) - e1:SetCost(c41329458.spcost) - e1:SetTarget(c41329458.sptg) - e1:SetOperation(c41329458.spop) - c:RegisterEffect(e1) - -- - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e2:SetCondition(c41329458.indcon) - e2:SetValue(1) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - c:RegisterEffect(e3) - --token - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(41329458,1)) - e4:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN) - e4:SetType(EFFECT_TYPE_IGNITION) - e4:SetRange(LOCATION_MZONE) - e4:SetCountLimit(1) - e4:SetCost(c41329458.spcost2) - e4:SetTarget(c41329458.sptg2) - e4:SetOperation(c41329458.spop2) - c:RegisterEffect(e4) -end -function c41329458.indcon(e) - return Duel.IsExistingMatchingCard(Card.IsType,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil,TYPE_TOKEN) -end -function c41329458.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsSetCard,2,nil,0x101b) end - local g=Duel.SelectReleaseGroup(tp,Card.IsSetCard,2,2,nil,0x101b) - Duel.Release(g,REASON_COST) -end -function c41329458.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-2 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c41329458.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) - end -end -function c41329458.cfilter(c) - return c:IsSetCard(0x101b) and c:IsType(TYPE_MONSTER) and c:IsDiscardable() -end -function c41329458.spcost2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c41329458.cfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,c41329458.cfilter,1,1,REASON_COST+REASON_DISCARD) -end -function c41329458.sptg2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsPlayerCanSpecialSummonMonster(tp,31533705,0x101b,0x4011,0,0,3,RACE_MACHINE,ATTRIBUTE_WIND) end - Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0) -end -function c41329458.spop2(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - if Duel.IsPlayerCanSpecialSummonMonster(tp,31533705,0x101b,0x4011,0,0,3,RACE_MACHINE,ATTRIBUTE_WIND) then - local token=Duel.CreateToken(tp,41329459) - Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c41356845.lua b/script/c41356845.lua deleted file mode 100644 index e1cb29f64b..0000000000 --- a/script/c41356845.lua +++ /dev/null @@ -1,35 +0,0 @@ ---硫酸のたまった落とし穴 -function c41356845.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_POSITION+CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c41356845.target) - e1:SetOperation(c41356845.activate) - c:RegisterEffect(e1) -end -function c41356845.filter(c) - return c:IsFacedown() -end -function c41356845.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c41356845.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c41356845.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - local g=Duel.SelectTarget(tp,c41356845.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0) -end -function c41356845.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFacedown() then - Duel.ChangePosition(tc,0,POS_FACEUP_ATTACK,0,POS_FACEUP_DEFENCE) - if tc:IsDefenceBelow(2000) then - Duel.BreakEffect() - Duel.Destroy(tc,REASON_EFFECT) - else - Duel.ConfirmCards(1-tc:GetControler(),tc) - Duel.ChangePosition(tc,POS_FACEDOWN_DEFENCE) - end - end -end diff --git a/script/c41367003.lua b/script/c41367003.lua deleted file mode 100644 index a03e40575e..0000000000 --- a/script/c41367003.lua +++ /dev/null @@ -1,35 +0,0 @@ ---ドロー・マッスル -function c41367003.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCountLimit(1,41367003+EFFECT_COUNT_CODE_OATH) - e1:SetTarget(c41367003.target) - e1:SetOperation(c41367003.activate) - c:RegisterEffect(e1) -end -function c41367003.filter(c,e,tp) - return c:IsPosition(POS_FACEUP_DEFENCE) and c:IsDefenceBelow(1000) -end -function c41367003.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c41367003.filter(chkc,e,tp) end - if chk==0 then return Duel.IsPlayerCanDraw(tp,1) - and Duel.IsExistingTarget(c41367003.filter,tp,LOCATION_MZONE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUPDEFENCE) - Duel.SelectTarget(tp,c41367003.filter,tp,LOCATION_MZONE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c41367003.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if Duel.Draw(tp,1,REASON_EFFECT)~=0 and tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e1:SetValue(1) - tc:RegisterEffect(e1) - end -end diff --git a/script/c41382147.lua b/script/c41382147.lua deleted file mode 100644 index 82c46e6735..0000000000 --- a/script/c41382147.lua +++ /dev/null @@ -1,55 +0,0 @@ ---星見鳥ラリス -function c41382147.initial_effect(c) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetCondition(c41382147.atkcon) - e1:SetValue(c41382147.atkval) - c:RegisterEffect(e1) - --remove - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(41382147,0)) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCategory(CATEGORY_REMOVE) - e2:SetCode(EVENT_DAMAGE_STEP_END) - e2:SetCondition(c41382147.rmcon) - e2:SetTarget(c41382147.rmtg) - e2:SetOperation(c41382147.rmop) - c:RegisterEffect(e2) -end -function c41382147.atkcon(e) - local ph=Duel.GetCurrentPhase() - return (ph==PHASE_DAMAGE or ph==PHASE_DAMAGE_CAL) - and (Duel.GetAttacker()==e:GetHandler() or Duel.GetAttackTarget()==e:GetHandler()) and Duel.GetAttackTarget()~=nil -end -function c41382147.atkval(e,c) - return e:GetHandler():GetBattleTarget():GetLevel()*200 -end -function c41382147.rmcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsRelateToBattle() and c==Duel.GetAttacker() and c:IsFaceup() -end -function c41382147.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_REMOVE,e:GetHandler(),1,0,0) -end -function c41382147.rmop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() and Duel.Remove(c,POS_FACEUP,REASON_EFFECT+REASON_TEMPORARY)==1 then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE_START+PHASE_BATTLE) - e1:SetReset(RESET_PHASE+PHASE_END+RESET_SELF_TURN,2) - e1:SetLabelObject(c) - e1:SetCountLimit(1) - e1:SetOperation(c41382147.retop) - Duel.RegisterEffect(e1,tp) - end -end -function c41382147.retop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetTurnPlayer()==tp then - Duel.ReturnToField(e:GetLabelObject()) - end -end diff --git a/script/c41386308.lua b/script/c41386308.lua deleted file mode 100644 index f36eadc718..0000000000 --- a/script/c41386308.lua +++ /dev/null @@ -1,51 +0,0 @@ ---マスマティシャン -function c41386308.initial_effect(c) - --send to grave - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(41386308,0)) - e1:SetCategory(CATEGORY_TOGRAVE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c41386308.target) - e1:SetOperation(c41386308.operation) - c:RegisterEffect(e1) - --draw - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(41386308,1)) - e2:SetCategory(CATEGORY_DRAW) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetCode(EVENT_BATTLE_DESTROYED) - e2:SetCondition(c41386308.drcon) - e2:SetTarget(c41386308.drtg) - e2:SetOperation(c41386308.drop) - c:RegisterEffect(e2) -end -function c41386308.tgfilter(c) - return c:IsLevelBelow(4) and c:IsAbleToGrave() -end -function c41386308.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c41386308.tgfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) -end -function c41386308.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c41386308.tgfilter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoGrave(g,REASON_EFFECT) - end -end -function c41386308.drcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsLocation(LOCATION_GRAVE) and c:IsReason(REASON_BATTLE) -end -function c41386308.drtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(1) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c41386308.drop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end \ No newline at end of file diff --git a/script/c41398771.lua b/script/c41398771.lua deleted file mode 100644 index 4275ed3e03..0000000000 --- a/script/c41398771.lua +++ /dev/null @@ -1,43 +0,0 @@ ---老化の呪い -function c41398771.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetCondition(c41398771.condition) - e1:SetCost(c41398771.cost) - e1:SetTarget(c41398771.target) - e1:SetOperation(c41398771.activate) - c:RegisterEffect(e1) -end -function c41398771.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end -function c41398771.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) -end -function c41398771.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end -end -function c41398771.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil) - if g:GetCount()>0 then - local tc=g:GetFirst() - while tc do - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - e1:SetValue(-500) - tc:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_UPDATE_DEFENCE) - tc:RegisterEffect(e2) - tc=g:GetNext() - end - end -end \ No newline at end of file diff --git a/script/c4141820.lua b/script/c4141820.lua deleted file mode 100644 index 70e2a9b12c..0000000000 --- a/script/c4141820.lua +++ /dev/null @@ -1,41 +0,0 @@ ---儀式魔人プレコグスター -function c4141820.initial_effect(c) - --ritual material - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_EXTRA_RITUAL_MATERIAL) - e1:SetValue(1) - c:RegisterEffect(e1) - --become material - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetCode(EVENT_BE_MATERIAL) - e2:SetCondition(c4141820.condition) - e2:SetOperation(c4141820.operation) - c:RegisterEffect(e2) -end -function c4141820.condition(e,tp,eg,ep,ev,re,r,rp) - return r==REASON_RITUAL -end -function c4141820.operation(e,tp,eg,ep,ev,re,r,rp) - local rc=eg:GetFirst() - while rc do - if rc:GetFlagEffect(4141820)==0 then - --draw - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetDescription(aux.Stringid(4141820,0)) - e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_BATTLE_DAMAGE) - e1:SetOperation(c4141820.hdop) - e1:SetReset(RESET_EVENT+0x1fe0000) - rc:RegisterEffect(e1,true) - rc:RegisterFlagEffect(4141820,RESET_EVENT+0x1fe0000,0,1) - end - rc=eg:GetNext() - end -end -function c4141820.hdop(e,tp,eg,ep,ev,re,r,rp) - Duel.DiscardHand(1-tp,nil,1,1,REASON_EFFECT+REASON_DISCARD) -end diff --git a/script/c41420027.lua b/script/c41420027.lua deleted file mode 100644 index 281c1f3313..0000000000 --- a/script/c41420027.lua +++ /dev/null @@ -1,65 +0,0 @@ ---神の宣告 -function c41420027.initial_effect(c) - --Activate(summon) - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DISABLE_SUMMON+CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_SUMMON) - e1:SetCondition(c41420027.condition1) - e1:SetCost(c41420027.cost1) - e1:SetTarget(c41420027.target1) - e1:SetOperation(c41420027.activate1) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_FLIP_SUMMON) - c:RegisterEffect(e2) - local e3=e1:Clone() - e3:SetCode(EVENT_SPSUMMON) - c:RegisterEffect(e3) - --Activate(effect) - local e4=Effect.CreateEffect(c) - e4:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) - e4:SetType(EFFECT_TYPE_ACTIVATE) - e4:SetCode(EVENT_CHAINING) - e4:SetCondition(c41420027.condition2) - e4:SetCost(c41420027.cost2) - e4:SetTarget(c41420027.target2) - e4:SetOperation(c41420027.activate2) - c:RegisterEffect(e4) -end -function c41420027.condition1(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentChain()==0 -end -function c41420027.cost1(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.PayLPCost(tp,math.floor(Duel.GetLP(tp)/2)) -end -function c41420027.target1(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DISABLE_SUMMON,eg,eg:GetCount(),0,0) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,eg:GetCount(),0,0) -end -function c41420027.activate1(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateSummon(eg) - Duel.Destroy(eg,REASON_EFFECT) -end -function c41420027.condition2(e,tp,eg,ep,ev,re,r,rp) - return re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev) -end -function c41420027.cost2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.PayLPCost(tp,math.floor(Duel.GetLP(tp)/2)) -end -function c41420027.target2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) - end -end -function c41420027.activate2(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateActivation(ev) - if re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(eg,REASON_EFFECT) - end -end diff --git a/script/c41426869.lua b/script/c41426869.lua deleted file mode 100644 index b3f60ea46e..0000000000 --- a/script/c41426869.lua +++ /dev/null @@ -1,4 +0,0 @@ ---イリュージョンの儀式 -function c41426869.initial_effect(c) - aux.AddRitualProcGreater(c,aux.FilterBoolFunction(Card.IsCode,64631466)) -end diff --git a/script/c41431329.lua b/script/c41431329.lua deleted file mode 100644 index 8440c9ea35..0000000000 --- a/script/c41431329.lua +++ /dev/null @@ -1,33 +0,0 @@ ---ヴァイロン・キューブ -function c41431329.initial_effect(c) - --search - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(41431329,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_BE_MATERIAL) - e1:SetCondition(c41431329.thcon) - e1:SetTarget(c41431329.thtg) - e1:SetOperation(c41431329.thop) - c:RegisterEffect(e1) -end -function c41431329.thcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsLocation(LOCATION_GRAVE) and r==REASON_SYNCHRO - and c:GetReasonCard():IsAttribute(ATTRIBUTE_LIGHT) -end -function c41431329.filter(c) - return c:IsType(TYPE_EQUIP) and c:IsAbleToHand() -end -function c41431329.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c41431329.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c41431329.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c41431329.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c41436536.lua b/script/c41436536.lua deleted file mode 100644 index b48f463552..0000000000 --- a/script/c41436536.lua +++ /dev/null @@ -1,19 +0,0 @@ ---E・HERO フェニックスガイ -function c41436536.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcCode2(c,21844576,58932615,true,true) - --spsummon condition - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(aux.fuslimit) - c:RegisterEffect(e1) - --indes - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e2:SetValue(1) - c:RegisterEffect(e2) -end diff --git a/script/c41440148.lua b/script/c41440148.lua deleted file mode 100644 index f67d60b584..0000000000 --- a/script/c41440148.lua +++ /dev/null @@ -1,21 +0,0 @@ ---EMディスカバー・ヒッポ -function c41440148.initial_effect(c) - --extra summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetOperation(c41440148.sumop) - c:RegisterEffect(e1) -end -function c41440148.sumop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetFlagEffect(tp,41440148)~=0 then return end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetTargetRange(LOCATION_HAND,0) - e1:SetCode(EFFECT_EXTRA_SUMMON_COUNT) - e1:SetTarget(aux.TargetBoolFunction(Card.IsLevelAbove,7)) - e1:SetValue(0x1) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) - Duel.RegisterFlagEffect(tp,41440148,RESET_PHASE+PHASE_END,0,1) -end diff --git a/script/c41442341.lua b/script/c41442341.lua deleted file mode 100644 index a5edc88d33..0000000000 --- a/script/c41442341.lua +++ /dev/null @@ -1,52 +0,0 @@ ---死霊操りしパペットマスター -function c41442341.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(41442341,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetCondition(c41442341.spcon) - e1:SetCost(c41442341.spcost) - e1:SetTarget(c41442341.sptg) - e1:SetOperation(c41442341.spop) - c:RegisterEffect(e1) -end -function c41442341.spcon(e,tp,eg,ep,ev,re,r,rp) - return bit.band(e:GetHandler():GetSummonType(),SUMMON_TYPE_ADVANCE)==SUMMON_TYPE_ADVANCE -end -function c41442341.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,2000) end - Duel.PayLPCost(tp,2000) -end -function c41442341.filter(c,e,tp) - return c:IsRace(RACE_FIEND) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c41442341.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:GetControler()==tp and chkc:GetLocation()==LOCATION_GRAVE and c41442341.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>1 - and Duel.IsExistingTarget(c41442341.filter,tp,LOCATION_GRAVE,0,2,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c41442341.filter,tp,LOCATION_GRAVE,0,2,2,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,g:GetCount(),0,0) -end -function c41442341.spop(e,tp,eg,ep,ev,re,r,rp) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ft<=0 then return end - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local fg=g:Filter(Card.IsRelateToEffect,nil,e) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - if fg:GetCount()>1 and ft==1 then fg=fg:Select(tp,1,1,nil) end - local tc=fg:GetFirst() - while tc do - Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - tc=fg:GetNext() - end - Duel.SpecialSummonComplete() -end diff --git a/script/c41458579.lua b/script/c41458579.lua deleted file mode 100644 index 95589f2e1b..0000000000 --- a/script/c41458579.lua +++ /dev/null @@ -1,36 +0,0 @@ ---六尺瓊勾玉 -function c41458579.initial_effect(c) - --Negate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_CHAINING) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) - e1:SetCondition(c41458579.condition) - e1:SetTarget(c41458579.target) - e1:SetOperation(c41458579.operation) - c:RegisterEffect(e1) -end -function c41458579.filter(c) - return c:IsFaceup() and c:IsSetCard(0x3d) -end -function c41458579.condition(e,tp,eg,ep,ev,re,r,rp) - if not Duel.IsExistingMatchingCard(c41458579.filter,tp,LOCATION_MZONE,0,1,nil) then return false end - if tp==ep or not Duel.IsChainNegatable(ev) then return false end - if not re:IsActiveType(TYPE_MONSTER) and not re:IsHasType(EFFECT_TYPE_ACTIVATE) then return false end - local ex,tg,tc=Duel.GetOperationInfo(ev,CATEGORY_DESTROY) - return ex and tg~=nil and tc>0 -end -function c41458579.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) - end -end -function c41458579.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateActivation(ev) - if re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(eg,REASON_EFFECT) - end -end diff --git a/script/c41462083.lua b/script/c41462083.lua deleted file mode 100644 index 6bae2019f2..0000000000 --- a/script/c41462083.lua +++ /dev/null @@ -1,6 +0,0 @@ ---千年竜 -function c41462083.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcCode2(c,71625222,88819587,true,true) -end diff --git a/script/c41470137.lua b/script/c41470137.lua deleted file mode 100644 index ebf3da74b2..0000000000 --- a/script/c41470137.lua +++ /dev/null @@ -1,72 +0,0 @@ ---剣闘獣ベストロウリィ -function c41470137.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(41470137,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(c41470137.descon) - e1:SetTarget(c41470137.destg) - e1:SetOperation(c41470137.desop) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(41470137,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_PHASE+PHASE_BATTLE) - e2:SetRange(LOCATION_MZONE) - e2:SetCondition(c41470137.spcon) - e2:SetCost(c41470137.spcost) - e2:SetTarget(c41470137.sptg) - e2:SetOperation(c41470137.spop) - c:RegisterEffect(e2) -end -function c41470137.descon(e,tp,eg,ep,ev,re,r,rp) - local st=e:GetHandler():GetSummonType() - return st>=(SUMMON_TYPE_SPECIAL+100) and st<(SUMMON_TYPE_SPECIAL+150) -end -function c41470137.desfilter(c) - return c:IsDestructable() and c:IsType(TYPE_SPELL+TYPE_TRAP) -end -function c41470137.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and c41470137.desfilter(chkc) end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c41470137.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c41470137.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end -function c41470137.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetBattledGroupCount()>0 -end -function c41470137.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToDeckAsCost() end - Duel.SendtoDeck(c,nil,2,REASON_COST) -end -function c41470137.filter(c,e,tp) - return not c:IsCode(41470137) and c:IsSetCard(0x19) and c:IsCanBeSpecialSummoned(e,102,tp,false,false) -end -function c41470137.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsExistingMatchingCard(c41470137.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c41470137.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c41470137.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - local tc=g:GetFirst() - if tc then - Duel.SpecialSummon(tc,102,tp,tp,false,false,POS_FACEUP) - tc:RegisterFlagEffect(tc:GetOriginalCode(),RESET_EVENT+0x1ff0000,0,0) - end -end diff --git a/script/c41475424.lua b/script/c41475424.lua deleted file mode 100644 index f51016a5db..0000000000 --- a/script/c41475424.lua +++ /dev/null @@ -1,34 +0,0 @@ ---機限爆弾 -function c41475424.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,0x1c0+TIMING_END_PHASE) - e1:SetTarget(c41475424.target) - e1:SetOperation(c41475424.activate) - c:RegisterEffect(e1) -end -function c41475424.filter(c) - return c:IsFaceup() and c:IsSetCard(0x13) and c:IsDestructable() -end -function c41475424.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - if chk==0 then return Duel.IsExistingTarget(c41475424.filter,tp,LOCATION_MZONE,0,1,nil) - and Duel.IsExistingTarget(Card.IsDestructable,tp,0,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g1=Duel.SelectTarget(tp,c41475424.filter,tp,LOCATION_MZONE,0,1,1,nil) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g2=Duel.SelectTarget(tp,Card.IsDestructable,tp,0,LOCATION_ONFIELD,1,1,nil) - g1:Merge(g2) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g1,2,0,0) -end -function c41475424.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local tg=g:Filter(Card.IsRelateToEffect,nil,e) - if tg:GetCount()>0 then - Duel.Destroy(tg,REASON_EFFECT) - end -end diff --git a/script/c41482598.lua b/script/c41482598.lua deleted file mode 100644 index c5f70a59c0..0000000000 --- a/script/c41482598.lua +++ /dev/null @@ -1,71 +0,0 @@ ---悪夢の蜃気楼 -function c41482598.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c41482598.clear) - c:RegisterEffect(e1) - --draw - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(41482598,0)) - e2:SetCategory(CATEGORY_DRAW) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetRange(LOCATION_SZONE) - e2:SetCountLimit(1) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) - e2:SetCondition(c41482598.drcon) - e2:SetTarget(c41482598.drtg) - e2:SetOperation(c41482598.drop) - e2:SetLabelObject(e1) - c:RegisterEffect(e2) - --discard - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(41482598,1)) - e3:SetCategory(CATEGORY_HANDES) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e3:SetRange(LOCATION_SZONE) - e3:SetCountLimit(1) - e3:SetCode(EVENT_PHASE+PHASE_STANDBY) - e3:SetCondition(c41482598.dccon) - e3:SetTarget(c41482598.dctg) - e3:SetOperation(c41482598.dcop) - e3:SetLabelObject(e1) - c:RegisterEffect(e3) -end -function c41482598.clear(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - e:SetLabel(0) -end -function c41482598.drcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp and Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)<4 -end -function c41482598.drtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local ht=Duel.GetFieldGroupCount(tp,LOCATION_HAND,0) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,4-ht) -end -function c41482598.drop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local ht=Duel.GetFieldGroupCount(tp,LOCATION_HAND,0) - if ht<4 then - Duel.Draw(tp,4-ht,REASON_EFFECT) - e:GetLabelObject():SetLabel(4-ht) - else e:GetLabelObject():SetLabel(0) end -end -function c41482598.dccon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp and e:GetLabelObject():GetLabel()~=0 -end -function c41482598.dctg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local de=e:GetLabelObject() - e:SetLabel(de:GetLabel()) - de:SetLabel(0) - Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,e:GetLabel()) -end -function c41482598.dcop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local g=Duel.GetFieldGroup(tp,LOCATION_HAND,0) - local sg=g:RandomSelect(tp,e:GetLabel()) - Duel.SendtoGrave(sg,REASON_EFFECT+REASON_DISCARD) -end diff --git a/script/c41493640.lua b/script/c41493640.lua deleted file mode 100644 index 696b6a896c..0000000000 --- a/script/c41493640.lua +++ /dev/null @@ -1,58 +0,0 @@ ---ラインモンスター Kホース -function c41493640.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(41493640,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c41493640.target) - e1:SetOperation(c41493640.operation) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(41493640,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(41493640) - e2:SetTarget(c41493640.sptg) - e2:SetOperation(c41493640.spop) - c:RegisterEffect(e2) -end -function c41493640.filter(c) - return c:IsFacedown() and c:GetSequence()~=5 -end -function c41493640.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_SZONE) and c41493640.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c41493640.filter,tp,0,LOCATION_SZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEDOWN) - Duel.SelectTarget(tp,c41493640.filter,tp,0,LOCATION_SZONE,1,1,nil) -end -function c41493640.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if not tc:IsRelateToEffect(e) or tc:IsFaceup() then return end - Duel.ConfirmCards(tp,tc) - if tc:IsType(TYPE_TRAP) and Duel.Destroy(tc,REASON_EFFECT)~=0 then - if c:IsFaceup() and c:IsRelateToEffect(e) then - Duel.RaiseSingleEvent(c,41493640,e,0,tp,tp,0) - end - end -end -function c41493640.spfilter(c,e,tp) - return c:GetLevel()==3 and c:IsAttribute(ATTRIBUTE_EARTH) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c41493640.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c41493640.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c41493640.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c41493640.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENCE) - end -end diff --git a/script/c4149689.lua b/script/c4149689.lua deleted file mode 100644 index f814f13bce..0000000000 --- a/script/c4149689.lua +++ /dev/null @@ -1,41 +0,0 @@ ---天狗のうちわ -function c4149689.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetCode(EFFECT_CANNOT_ACTIVATE) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(1,1) - e2:SetValue(c4149689.aclimit) - c:RegisterEffect(e2) - --destroy - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(4149689,0)) - e3:SetCategory(CATEGORY_DESTROY) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e3:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - e3:SetRange(LOCATION_SZONE) - e3:SetTarget(c4149689.destg) - e3:SetOperation(c4149689.desop) - c:RegisterEffect(e3) -end -function c4149689.aclimit(e,re,tp) - local rc=re:GetHandler() - return re:IsActiveType(TYPE_MONSTER) and bit.band(rc:GetSummonType(),SUMMON_TYPE_FLIP)==SUMMON_TYPE_FLIP and rc:IsLevelBelow(2) -end -function c4149689.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return eg:GetFirst():IsLevelBelow(2) end - Duel.SetTargetCard(eg) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) -end -function c4149689.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=eg:GetFirst() - if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsLevelBelow(2) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c41510920.lua b/script/c41510920.lua deleted file mode 100644 index 5c42041a2f..0000000000 --- a/script/c41510920.lua +++ /dev/null @@ -1,40 +0,0 @@ ---神星なる因子 -function c41510920.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY+CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_CHAINING) - e1:SetCondition(c41510920.condition) - e1:SetCost(c41510920.cost) - e1:SetTarget(c41510920.target) - e1:SetOperation(c41510920.activate) - c:RegisterEffect(e1) -end -function c41510920.condition(e,tp,eg,ep,ev,re,r,rp) - return (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE)) and Duel.IsChainNegatable(ev) -end -function c41510920.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x9c) and c:IsAbleToGraveAsCost() and not c:IsStatus(STATUS_BATTLE_DESTROYED) -end -function c41510920.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c41510920.cfilter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c41510920.cfilter,tp,LOCATION_MZONE,0,1,1,nil) - Duel.SendtoGrave(g,REASON_COST) -end -function c41510920.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) - end -end -function c41510920.activate(e,tp,eg,ep,ev,re,r,rp) - if not Duel.NegateActivation(ev) then return end - if re:GetHandler():IsRelateToEffect(re) and Duel.Destroy(eg,REASON_EFFECT)~=0 then - Duel.BreakEffect() - Duel.Draw(tp,1,REASON_EFFECT) - end -end diff --git a/script/c41517789.lua b/script/c41517789.lua deleted file mode 100644 index 08df60a97b..0000000000 --- a/script/c41517789.lua +++ /dev/null @@ -1,47 +0,0 @@ ---星態龍 -function c41517789.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1) - c:EnableReviveLimit() - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(aux.synlimit) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_CANNOT_DISABLE_SPSUMMON) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - c:RegisterEffect(e2) - --summon success - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - e3:SetOperation(c41517789.sumsuc) - c:RegisterEffect(e3) - --immune - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e4:SetCode(EVENT_ATTACK_ANNOUNCE) - e4:SetOperation(c41517789.atkop) - c:RegisterEffect(e4) -end -function c41517789.sumsuc(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():GetSummonType()~=SUMMON_TYPE_SYNCHRO then return end - Duel.SetChainLimitTillChainEnd(aux.FALSE) -end -function c41517789.atkop(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_IMMUNE_EFFECT) - e1:SetValue(c41517789.efilter) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_DAMAGE) - e:GetHandler():RegisterEffect(e1) -end -function c41517789.efilter(e,te) - return te:GetOwner()~=e:GetOwner() -end diff --git a/script/c41517968.lua b/script/c41517968.lua deleted file mode 100644 index dbac4b953f..0000000000 --- a/script/c41517968.lua +++ /dev/null @@ -1,57 +0,0 @@ ---E・HERO ダーク・ブライトマン -function c41517968.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcCode2(c,20721928,89252153,true,true) - --spsummon condition - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(aux.fuslimit) - c:RegisterEffect(e1) - --pierce - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_PIERCE) - c:RegisterEffect(e2) - --to defence - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e3:SetCode(EVENT_DAMAGE_STEP_END) - e3:SetCondition(c41517968.poscon) - e3:SetOperation(c41517968.posop) - c:RegisterEffect(e3) - --destroy - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(41517968,0)) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e4:SetCategory(CATEGORY_DESTROY) - e4:SetProperty(EFFECT_FLAG_CARD_TARGET) - e4:SetCode(EVENT_DESTROYED) - e4:SetTarget(c41517968.destg) - e4:SetOperation(c41517968.desop) - c:RegisterEffect(e4) -end -function c41517968.poscon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler()==Duel.GetAttacker() and e:GetHandler():IsRelateToBattle() -end -function c41517968.posop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsAttackPos() then - Duel.ChangePosition(c,POS_FACEUP_DEFENCE) - end -end -function c41517968.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsDestructable() end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c41517968.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c41544074.lua b/script/c41544074.lua deleted file mode 100644 index d9c8e93770..0000000000 --- a/script/c41544074.lua +++ /dev/null @@ -1,6 +0,0 @@ ---カオス・ウィザード -function c41544074.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcCode2(c,15025844,22026707,true,true) -end diff --git a/script/c41587307.lua b/script/c41587307.lua deleted file mode 100644 index 15de4b112f..0000000000 --- a/script/c41587307.lua +++ /dev/null @@ -1,32 +0,0 @@ ---折れ竹光 -function c41587307.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c41587307.target) - e1:SetOperation(c41587307.operation) - c:RegisterEffect(e1) - --Equip limit - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_EQUIP_LIMIT) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetValue(1) - c:RegisterEffect(e2) -end -function c41587307.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c41587307.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,e:GetHandler(),tc) - end -end diff --git a/script/c41589166.lua b/script/c41589166.lua deleted file mode 100644 index 7caa728765..0000000000 --- a/script/c41589166.lua +++ /dev/null @@ -1,13 +0,0 @@ ---天下人 紫炎 -function c41589166.initial_effect(c) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_IMMUNE_EFFECT) - e1:SetValue(c41589166.efilter) - c:RegisterEffect(e1) -end -function c41589166.efilter(e,te) - return te:IsActiveType(TYPE_TRAP) -end diff --git a/script/c41613948.lua b/script/c41613948.lua deleted file mode 100644 index 72ac599ef0..0000000000 --- a/script/c41613948.lua +++ /dev/null @@ -1,60 +0,0 @@ ---D-HERO デビルガイ -function c41613948.initial_effect(c) - --remove - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(41613948,0)) - e1:SetCategory(CATEGORY_REMOVE) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCondition(c41613948.condition) - e1:SetCost(c41613948.cost) - e1:SetTarget(c41613948.target) - e1:SetOperation(c41613948.operation) - c:RegisterEffect(e1) -end -function c41613948.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPosition(POS_FACEUP_ATTACK) -end -function c41613948.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_ATTACK)==0 end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) - e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+RESET_END) - Duel.RegisterEffect(e1,tp) -end -function c41613948.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsAbleToRemove() end - if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) -end -function c41613948.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() and tc:IsRelateToEffect(e) and Duel.Remove(tc,tc:GetPosition(),REASON_EFFECT+REASON_TEMPORARY)~=0 then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) - e1:SetReset(RESET_PHASE+RESET_STANDBY+RESET_SELF_TURN,2) - e1:SetCountLimit(1) - e1:SetCondition(c41613948.retcon) - e1:SetOperation(c41613948.retop) - e1:SetLabel(1) - e1:SetLabelObject(tc) - Duel.RegisterEffect(e1,tp) - end -end -function c41613948.retcon(e,tp,eg,ep,ev,re,r,rp) - return tp==Duel.GetTurnPlayer() -end -function c41613948.retop(e,tp,eg,ep,ev,re,r,rp) - local t=e:GetLabel() - if t==1 then e:SetLabel(0) - else Duel.ReturnToField(e:GetLabelObject()) end -end diff --git a/script/c4162088.lua b/script/c4162088.lua deleted file mode 100644 index 44db40aff3..0000000000 --- a/script/c4162088.lua +++ /dev/null @@ -1,38 +0,0 @@ ---サイバー・レーザー・ドラゴン -function c4162088.initial_effect(c) - c:EnableReviveLimit() - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(4162088,0)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetCountLimit(1) - e2:SetRange(LOCATION_MZONE) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetTarget(c4162088.target) - e2:SetOperation(c4162088.operation) - c:RegisterEffect(e2) -end -function c4162088.filter(c,atk) - return c:IsFaceup() and (c:IsAttackAbove(atk) or c:IsDefenceAbove(atk)) and c:IsDestructable() -end -function c4162088.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c4162088.filter(chkc,e:GetHandler():GetAttack()) end - if chk==0 then return Duel.IsExistingTarget(c4162088.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,e:GetHandler():GetAttack()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c4162088.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,e:GetHandler():GetAttack()) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c4162088.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsFaceup() and c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and c4162088.filter(tc,c:GetAttack()) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c41620959.lua b/script/c41620959.lua deleted file mode 100644 index 79f1cd9a52..0000000000 --- a/script/c41620959.lua +++ /dev/null @@ -1,31 +0,0 @@ ---竜の霊廟 -function c41620959.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOGRAVE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,41620959+EFFECT_COUNT_CODE_OATH) - e1:SetTarget(c41620959.target) - e1:SetOperation(c41620959.activate) - c:RegisterEffect(e1) -end -function c41620959.tgfilter(c) - return c:IsRace(RACE_DRAGON) and c:IsAbleToGrave() -end -function c41620959.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c41620959.tgfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) -end -function c41620959.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c41620959.tgfilter,tp,LOCATION_DECK,0,1,1,nil) - local tc=g:GetFirst() - if tc and Duel.SendtoGrave(tc,REASON_EFFECT)>0 and tc:IsLocation(LOCATION_GRAVE) and tc:IsRace(RACE_DRAGON) and tc:IsType(TYPE_NORMAL) - and Duel.IsExistingMatchingCard(c41620959.tgfilter,tp,LOCATION_DECK,0,1,nil) - and Duel.SelectYesNo(tp,aux.Stringid(41620959,0)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g1=Duel.SelectMatchingCard(tp,c41620959.tgfilter,tp,LOCATION_DECK,0,1,1,nil) - Duel.SendtoGrave(g1,REASON_EFFECT) - end -end diff --git a/script/c41628550.lua b/script/c41628550.lua deleted file mode 100644 index 82d8176498..0000000000 --- a/script/c41628550.lua +++ /dev/null @@ -1,32 +0,0 @@ ---超重武者ワカ-O2 -function c41628550.initial_effect(c) - --position - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(41628550,0)) - e1:SetCategory(CATEGORY_POSITION) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c41628550.postg) - e1:SetOperation(c41628550.posop) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e2) - --battle indestructable - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e3:SetValue(1) - c:RegisterEffect(e3) -end -function c41628550.postg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_POSITION,e:GetHandler(),1,0,0) -end -function c41628550.posop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.ChangePosition(c,POS_FACEUP_DEFENCE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK) - end -end diff --git a/script/c41639001.lua b/script/c41639001.lua deleted file mode 100644 index 04a5a34fcf..0000000000 --- a/script/c41639001.lua +++ /dev/null @@ -1,56 +0,0 @@ ---聖刻龍-ドラゴンヌート -function c41639001.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(41639001,0)) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_QUICK_F) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_CHAINING) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCondition(c41639001.spcon) - e1:SetTarget(c41639001.sptg) - e1:SetOperation(c41639001.spop) - c:RegisterEffect(e1) -end -function c41639001.spcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end - local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) - return g and g:IsContains(c) -end -function c41639001.spfilter(c,e,tp) - return c:IsType(TYPE_NORMAL) and c:IsRace(RACE_DRAGON) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) - and not c:IsHasEffect(EFFECT_NECRO_VALLEY) -end -function c41639001.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,0x13) -end -function c41639001.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c41639001.spfilter,tp,0x13,0,1,1,nil,e,tp) - local tc=g:GetFirst() - if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK) - e1:SetValue(0) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_SET_DEFENCE) - tc:RegisterEffect(e2) - Duel.SpecialSummonComplete() - elseif Duel.IsPlayerCanSpecialSummon(tp) then - local cg1=Duel.GetFieldGroup(tp,LOCATION_HAND,0) - local cg2=Duel.GetFieldGroup(tp,LOCATION_DECK,0) - Duel.ConfirmCards(1-tp,cg1) - Duel.ConfirmCards(1-tp,cg2) - Duel.ConfirmCards(tp,cg2) - Duel.ShuffleHand(tp) - Duel.ShuffleDeck(tp) - end -end diff --git a/script/c4168871.lua b/script/c4168871.lua deleted file mode 100644 index edf1c31a83..0000000000 --- a/script/c4168871.lua +++ /dev/null @@ -1,41 +0,0 @@ ---黒羽の宝札 -function c4168871.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,4168871+EFFECT_COUNT_CODE_OATH) - e1:SetCost(c4168871.cost) - e1:SetTarget(c4168871.target) - e1:SetOperation(c4168871.activate) - c:RegisterEffect(e1) -end -function c4168871.filter(c) - return c:IsSetCard(0x33) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost() -end -function c4168871.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_SPSUMMON)==0 - and Duel.IsExistingMatchingCard(c4168871.filter,tp,LOCATION_HAND,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c4168871.filter,tp,LOCATION_HAND,0,1,1,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) - e1:SetTargetRange(1,0) - Duel.RegisterEffect(e1,tp) -end -function c4168871.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp,2) end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(2) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2) -end -function c4168871.activate(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end diff --git a/script/c41705642.lua b/script/c41705642.lua deleted file mode 100644 index 0de46ce950..0000000000 --- a/script/c41705642.lua +++ /dev/null @@ -1,32 +0,0 @@ ---サルベージ・ウォリアー -function c41705642.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(41705642,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetCondition(c41705642.spcon) - e1:SetTarget(c41705642.sptg) - e1:SetOperation(c41705642.spop) - c:RegisterEffect(e1) -end -function c41705642.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_ADVANCE -end -function c41705642.filter(c,e,tp) - return c:IsType(TYPE_TUNER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsHasEffect(EFFECT_NECRO_VALLEY) -end -function c41705642.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c41705642.filter,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_HAND) -end -function c41705642.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c41705642.filter,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c41722932.lua b/script/c41722932.lua deleted file mode 100644 index 103eb2c2f1..0000000000 --- a/script/c41722932.lua +++ /dev/null @@ -1,35 +0,0 @@ ---ダーク・ジェノサイド・カッター -function c41722932.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_REMOVE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c41722932.condition) - e1:SetTarget(c41722932.target) - e1:SetOperation(c41722932.activate) - c:RegisterEffect(e1) -end -function c41722932.cfilter(c) - return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_DARK) -end -function c41722932.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c41722932.cfilter,tp,LOCATION_MZONE,0,3,nil) -end -function c41722932.filter(c) - return c:IsFaceup() and c:IsAbleToRemove() -end -function c41722932.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and c41722932.filter(chkc) and chkc~=e:GetHandler() end - if chk==0 then return Duel.IsExistingTarget(c41722932.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,c41722932.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) -end -function c41722932.activate(e) - local tc=Duel.GetFirstTarget() - if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) then - Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) - end -end diff --git a/script/c41741922.lua b/script/c41741922.lua deleted file mode 100644 index eff1732bb9..0000000000 --- a/script/c41741922.lua +++ /dev/null @@ -1,43 +0,0 @@ ---ラヴァ・ドラゴン -function c41741922.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(41741922,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c41741922.spcost) - e1:SetTarget(c41741922.sptg) - e1:SetOperation(c41741922.spop) - c:RegisterEffect(e1) -end -function c41741922.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsDefencePos() and e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end -function c41741922.filter(c,e,tp) - return c:IsLevelBelow(3) and c:IsRace(RACE_DRAGON) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) - and not c:IsHasEffect(EFFECT_NECRO_VALLEY) -end -function c41741922.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c41741922.filter,tp,LOCATION_HAND,0,1,nil,e,tp) - and Duel.IsExistingMatchingCard(c41741922.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_HAND+LOCATION_GRAVE) -end -function c41741922.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c41741922.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - local tc=g:GetFirst() - if tc then - Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) - end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - g=Duel.SelectMatchingCard(tp,c41741922.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - tc=g:GetFirst() - if tc then - Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) - end - Duel.SpecialSummonComplete() -end diff --git a/script/c41753322.lua b/script/c41753322.lua deleted file mode 100644 index a9e7bd9830..0000000000 --- a/script/c41753322.lua +++ /dev/null @@ -1,90 +0,0 @@ ---竜脚獣ブラキオン -function c41753322.initial_effect(c) - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_SINGLE_RANGE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetRange(LOCATION_DECK) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - c:RegisterEffect(e1) - --summon with 1 tribute - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(41753322,0)) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_SUMMON_PROC) - e2:SetCondition(c41753322.otcon) - e2:SetOperation(c41753322.otop) - e2:SetValue(SUMMON_TYPE_ADVANCE) - c:RegisterEffect(e2) - --turn set - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(41753322,1)) - e3:SetCategory(CATEGORY_POSITION) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_MZONE) - e3:SetTarget(c41753322.postg) - e3:SetOperation(c41753322.posop) - c:RegisterEffect(e3) - --position - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(41753322,1)) - e4:SetCategory(CATEGORY_POSITION) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e4:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - e4:SetTarget(c41753322.postg2) - e4:SetOperation(c41753322.posop2) - c:RegisterEffect(e4) - --damage amp - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e5:SetRange(LOCATION_MZONE) - e5:SetCode(EVENT_PRE_BATTLE_DAMAGE) - e5:SetCondition(c41753322.dcon) - e5:SetOperation(c41753322.dop) - c:RegisterEffect(e5) -end -function c41753322.otfilter(c,tp) - return c:IsRace(RACE_DINOSAUR) and (c:IsControler(tp) or c:IsFaceup()) -end -function c41753322.otcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - local mg=Duel.GetMatchingGroup(c41753322.otfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp) - return c:GetLevel()>6 and Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.GetTributeCount(c,mg)>0 -end -function c41753322.otop(e,tp,eg,ep,ev,re,r,rp,c) - local mg=Duel.GetMatchingGroup(c41753322.otfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp) - local sg=Duel.SelectTribute(tp,c,1,1,mg) - c:SetMaterial(sg) - Duel.Release(sg,REASON_SUMMON+REASON_MATERIAL) -end -function c41753322.postg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsCanTurnSet() and c:GetFlagEffect(41753322)==0 end - c:RegisterFlagEffect(41753322,RESET_EVENT+0x1fc0000+RESET_PHASE+PHASE_END,0,1) - Duel.SetOperationInfo(0,CATEGORY_POSITION,c,1,0,0) -end -function c41753322.posop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - Duel.ChangePosition(c,POS_FACEDOWN_DEFENCE) - end -end -function c41753322.postg2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local g=Duel.GetMatchingGroup(Card.IsCanTurnSet,tp,LOCATION_MZONE,LOCATION_MZONE,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_POSITION,g,g:GetCount(),0,0) -end -function c41753322.posop2(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsCanTurnSet,tp,LOCATION_MZONE,LOCATION_MZONE,e:GetHandler()) - Duel.ChangePosition(g,POS_FACEDOWN_DEFENCE) -end -function c41753322.dcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return ep~=tp and Duel.GetAttackTarget()==c -end -function c41753322.dop(e,tp,eg,ep,ev,re,r,rp) - Duel.ChangeBattleDamage(ep,ev*2) -end diff --git a/script/c41777.lua b/script/c41777.lua deleted file mode 100644 index 8a94dbe06c..0000000000 --- a/script/c41777.lua +++ /dev/null @@ -1,48 +0,0 @@ ---ジェム・エンハンス -function c41777.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(TIMING_ATTACK,TIMING_ATTACK) - e1:SetCost(c41777.cost) - e1:SetTarget(c41777.target) - e1:SetOperation(c41777.activate) - c:RegisterEffect(e1) -end -function c41777.cost(e,tp,eg,ep,ev,re,r,rp,chk) - e:SetLabel(1) - if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsSetCard,1,nil,0x1047) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) - local g=Duel.SelectReleaseGroup(tp,Card.IsSetCard,1,1,nil,0x1047) - Duel.Release(g,REASON_COST) -end -function c41777.filter(c,e,tp) - return c:IsSetCard(0x1047) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c41777.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c41777.filter(chkc,e,tp) end - if chk==0 then - if e:GetLabel()==1 then - e:SetLabel(0) - return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsExistingTarget(c41777.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) - else - return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c41777.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) - end - end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c41777.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,g:GetCount(),0,0) - e:SetLabel(0) -end -function c41777.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c4178474.lua b/script/c4178474.lua deleted file mode 100644 index 88f7e76af3..0000000000 --- a/script/c4178474.lua +++ /dev/null @@ -1,31 +0,0 @@ ---サンダー・ブレイク -function c4178474.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(TIMING_ATTACK,0x11e0) - e1:SetCost(c4178474.cost) - e1:SetTarget(c4178474.target) - e1:SetOperation(c4178474.activate) - c:RegisterEffect(e1) -end -function c4178474.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) -end -function c4178474.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsDestructable() and chkc~=e:GetHandler() end - if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c4178474.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c41788781.lua b/script/c41788781.lua deleted file mode 100644 index c85b9e2843..0000000000 --- a/script/c41788781.lua +++ /dev/null @@ -1,20 +0,0 @@ ---極星獣グルファクシ -function c41788781.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c41788781.spcon) - c:RegisterEffect(e1) -end -function c41788781.filter(c) - return c:IsFaceup() and c:IsType(TYPE_SYNCHRO) -end -function c41788781.spcon(e,c) - if c==nil then return true end - return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 - and Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0,nil)==0 - and Duel.IsExistingMatchingCard(c41788781.filter,c:GetControler(),0,LOCATION_MZONE,1,nil) -end diff --git a/script/c4179255.lua b/script/c4179255.lua deleted file mode 100644 index dc515753c4..0000000000 --- a/script/c4179255.lua +++ /dev/null @@ -1,69 +0,0 @@ ---妖精竜 エンシェント -function c4179255.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1) - c:EnableReviveLimit() - --draw - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DRAW) - e1:SetDescription(aux.Stringid(4179255,0)) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_CHAIN_SOLVED) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1,4179255) - e1:SetCondition(c4179255.drcon) - e1:SetTarget(c4179255.drtg) - e1:SetOperation(c4179255.drop) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetDescription(aux.Stringid(4179255,1)) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCondition(c4179255.descon) - e2:SetTarget(c4179255.destg) - e2:SetOperation(c4179255.desop) - c:RegisterEffect(e2) -end -function c4179255.drcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp and re and re:IsActiveType(TYPE_FIELD) and re:IsHasType(EFFECT_TYPE_ACTIVATE) -end -function c4179255.drtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsRelateToEffect(e) and e:GetHandler():IsFaceup() end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(1) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c4179255.drop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end -function c4179255.check() - local tc=Duel.GetFieldCard(0,LOCATION_SZONE,5) - if tc and tc:IsFaceup() then return true end - tc=Duel.GetFieldCard(1,LOCATION_SZONE,5) - return tc and tc:IsFaceup() -end -function c4179255.descon(e,tp,eg,ep,ev,re,r,rp) - return c4179255.check() -end -function c4179255.desfilter(c) - return c:IsPosition(POS_FACEUP_ATTACK) and c:IsDestructable() -end -function c4179255.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c4179255.desfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c4179255.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c4179255.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c4179255.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsPosition(POS_FACEUP_ATTACK) and c4179255.check() then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c41855169.lua b/script/c41855169.lua deleted file mode 100644 index 1966f4a683..0000000000 --- a/script/c41855169.lua +++ /dev/null @@ -1,42 +0,0 @@ ---昇霊術師 ジョウゲン -function c41855169.initial_effect(c) - --disable spsummon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetTargetRange(1,1) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(41855169,0)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCost(c41855169.cost) - e2:SetTarget(c41855169.target) - e2:SetOperation(c41855169.operation) - c:RegisterEffect(e2) -end -function c41855169.cfilter(c) - return c:IsDiscardable() and c:IsAbleToGraveAsCost() and not c:IsHasEffect(81674782) -end -function c41855169.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c41855169.cfilter,tp,LOCATION_HAND,0,1,nil) end - local g=Duel.GetFieldGroup(tp,LOCATION_HAND,0) - local sg=g:RandomSelect(tp,1) - Duel.SendtoGrave(sg,REASON_COST+REASON_DISCARD) -end -function c41855169.filter(c) - return bit.band(c:GetSummonType(),SUMMON_TYPE_SPECIAL)~=0 -end -function c41855169.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c41855169.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - local g=Duel.GetMatchingGroup(c41855169.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c41855169.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c41855169.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - Duel.Destroy(g,REASON_EFFECT) -end diff --git a/script/c41858121.lua b/script/c41858121.lua deleted file mode 100644 index a2729a5eb8..0000000000 --- a/script/c41858121.lua +++ /dev/null @@ -1,50 +0,0 @@ ---ヴァイロン・マター -function c41858121.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW+CATEGORY_DESTROY) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c41858121.target) - e1:SetOperation(c41858121.activate) - c:RegisterEffect(e1) -end -function c41858121.filter(c) - return c:IsType(TYPE_EQUIP) and c:IsAbleToDeck() -end -function c41858121.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c41858121.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c41858121.filter,tp,LOCATION_GRAVE,0,3,nil) - and ((Duel.IsPlayerCanDraw(tp) and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0) - or Duel.IsExistingMatchingCard(Card.IsDestructable,tp,0,LOCATION_ONFIELD,1,nil)) - end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectTarget(tp,c41858121.filter,tp,LOCATION_GRAVE,0,3,3,nil) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,3,0,0) -end -function c41858121.tgfilter(c,e) - return not c:IsRelateToEffect(e) -end -function c41858121.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - if g:IsExists(c41858121.tgfilter,1,nil,e) then return end - Duel.SendtoDeck(g,nil,0,REASON_EFFECT) - Duel.ShuffleDeck(tp) - Duel.BreakEffect() - local op=0 - local b1=Duel.IsPlayerCanDraw(tp,1) - local b2=Duel.IsExistingMatchingCard(Card.IsDestructable,tp,0,LOCATION_ONFIELD,1,nil) - Duel.Hint(HINT_SELECTMSG,tp,0) - if b1 and b2 then op=Duel.SelectOption(tp,aux.Stringid(41858121,0),aux.Stringid(41858121,1)) - elseif b1 then op=Duel.SelectOption(tp,aux.Stringid(41858121,0)) - elseif b2 then Duel.SelectOption(tp,aux.Stringid(41858121,1)) op=1 - else return end - if op==0 then - Duel.Draw(tp,1,REASON_EFFECT) - else - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local dg=Duel.SelectMatchingCard(tp,Card.IsDestructable,tp,0,LOCATION_ONFIELD,1,1,nil) - Duel.Destroy(dg,REASON_EFFECT) - end -end diff --git a/script/c41859700.lua b/script/c41859700.lua deleted file mode 100644 index c6b98ca3f3..0000000000 --- a/script/c41859700.lua +++ /dev/null @@ -1,23 +0,0 @@ ---燃える藻 -function c41859700.initial_effect(c) - --recover - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(41859700,0)) - e1:SetCategory(CATEGORY_RECOVER) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetTarget(c41859700.target) - e1:SetOperation(c41859700.operation) - c:RegisterEffect(e1) -end -function c41859700.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(1000) - Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,1-tp,1000) -end -function c41859700.operation(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Recover(p,d,REASON_EFFECT) -end diff --git a/script/c41872150.lua b/script/c41872150.lua deleted file mode 100644 index 7db03ee172..0000000000 --- a/script/c41872150.lua +++ /dev/null @@ -1,50 +0,0 @@ ---イナゴの軍勢 -function c41872150.initial_effect(c) - --turn set - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(41872150,0)) - e1:SetCategory(CATEGORY_POSITION) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetTarget(c41872150.target) - e1:SetOperation(c41872150.operation) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(41872150,1)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - e2:SetTarget(c41872150.destg) - e2:SetOperation(c41872150.desop) - c:RegisterEffect(e2) -end -function c41872150.target(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsCanTurnSet() and c:GetFlagEffect(41872150)==0 end - c:RegisterFlagEffect(41872150,RESET_EVENT+0x1fc0000+RESET_PHASE+PHASE_END,0,1) - Duel.SetOperationInfo(0,CATEGORY_POSITION,c,1,0,0) -end -function c41872150.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - Duel.ChangePosition(c,POS_FACEDOWN_DEFENCE) - end -end -function c41872150.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable() -end -function c41872150.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and c41872150.filter(chkc) end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c41872150.filter,tp,0,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c41872150.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c41902352.lua b/script/c41902352.lua deleted file mode 100644 index 696ceb3f22..0000000000 --- a/script/c41902352.lua +++ /dev/null @@ -1,14 +0,0 @@ ---BF-東雲のコチ -function c41902352.initial_effect(c) - --synchro limit - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL) - e1:SetCondition(c41902352.synlimit) - e1:SetValue(1) - c:RegisterEffect(e1) -end -function c41902352.synlimit(e) - return bit.band(e:GetHandler():GetSummonType(),SUMMON_TYPE_SPECIAL)==SUMMON_TYPE_SPECIAL -end diff --git a/script/c41925941.lua b/script/c41925941.lua deleted file mode 100644 index 9d0a4f2390..0000000000 --- a/script/c41925941.lua +++ /dev/null @@ -1,66 +0,0 @@ ---冥王の咆哮 -function c41925941.initial_effect(c) - --atkdown - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCondition(c41925941.condition) - e1:SetCost(c41925941.cost) - e1:SetTarget(c41925941.target) - e1:SetOperation(c41925941.operation) - c:RegisterEffect(e1) -end -function c41925941.condition(e,tp,eg,ep,ev,re,r,rp) - local phase=Duel.GetCurrentPhase() - if phase~=PHASE_DAMAGE or Duel.IsDamageCalculated() then return false end - local a=Duel.GetAttacker() - local d=Duel.GetAttackTarget() - if a:IsControler(tp) then - e:SetLabelObject(d) - return a:IsFaceup() and a:IsRace(RACE_FIEND) and a:IsRelateToBattle() and d and d:IsFaceup() and d:IsRelateToBattle() - else - e:SetLabelObject(a) - return d:IsFaceup() and d:IsRace(RACE_FIEND) and d:IsRelateToBattle() and a and a:IsFaceup() and a:IsRelateToBattle() - end -end -function c41925941.cost(e,tp,eg,ep,ev,re,r,rp,chk) - local bc=e:GetLabelObject() - if chk==0 then return Duel.CheckLPCost(tp,100) and (bc:IsAttackAbove(100) or bc:IsDefenceAbove(100)) end - local maxc=Duel.GetLP(tp) - local maxpay=bc:GetAttack() - local def=bc:GetDefence() - if maxpay5000 then maxc=5000 end - maxc=math.floor(maxc/100)*100 - local t={} - for i=1,maxc/100 do - t[i]=i*100 - end - local cost=Duel.AnnounceNumber(tp,table.unpack(t)) - Duel.PayLPCost(tp,cost) - e:SetLabel(cost) -end -function c41925941.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local tc=e:GetLabelObject() - if chkc then return chkc==tc end - if chk==0 then return tc:IsCanBeEffectTarget(e) end - Duel.SetTargetCard(tc) -end -function c41925941.operation(e,tp,eg,ep,ev,re,r,rp,chk) - local bc=Duel.GetFirstTarget() - local val=e:GetLabel() - if not bc or not bc:IsRelateToEffect(e) or not bc:IsControler(1-tp) then return end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(-val) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - bc:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_UPDATE_DEFENCE) - bc:RegisterEffect(e2) -end diff --git a/script/c4192696.lua b/script/c4192696.lua deleted file mode 100644 index eec54f8a44..0000000000 --- a/script/c4192696.lua +++ /dev/null @@ -1,45 +0,0 @@ ---森の聖霊 エーコ -function c4192696.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(4192696,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetRange(LOCATION_HAND) - e1:SetCode(EVENT_DAMAGE) - e1:SetCondition(c4192696.spcon) - e1:SetTarget(c4192696.sptg) - e1:SetOperation(c4192696.spop) - c:RegisterEffect(e1) -end -function c4192696.spcon(e,tp,eg,ep,ev,re,r,rp) - return ep==tp and tp~=rp and bit.band(r,REASON_EFFECT)~=0 -end -function c4192696.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,ev) -end -function c4192696.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then - Duel.Damage(1-tp,ev,REASON_EFFECT) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CHANGE_DAMAGE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetTargetRange(1,1) - e1:SetValue(c4192696.damval) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) - local e2=e1:Clone() - e2:SetCode(EFFECT_NO_EFFECT_DAMAGE) - e2:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e2,tp) - end -end -function c4192696.damval(e,re,val,r,rp,rc) - if bit.band(r,REASON_EFFECT)~=0 then return 0 - else return val end -end diff --git a/script/c41930553.lua b/script/c41930553.lua deleted file mode 100644 index 770b992a44..0000000000 --- a/script/c41930553.lua +++ /dev/null @@ -1,64 +0,0 @@ ---暗黒の瘴気 -function c41930553.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_END_PHASE) - e1:SetTarget(c41930553.target1) - e1:SetOperation(c41930553.operation) - c:RegisterEffect(e1) - --remove - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(41930553,1)) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetRange(LOCATION_SZONE) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetHintTiming(0,TIMING_END_PHASE) - e2:SetTarget(c41930553.target2) - e2:SetOperation(c41930553.operation) - c:RegisterEffect(e2) -end -function c41930553.cfilter(c) - return c:IsRace(RACE_FIEND) and c:IsDiscardable() -end -function c41930553.rfilter(c) - return c:IsType(TYPE_MONSTER) and c:IsAbleToRemove() -end -function c41930553.target1(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(1-tp) and c41930553.rfilter(chkc) end - if chk==0 then return true end - if Duel.IsExistingMatchingCard(c41930553.cfilter,tp,LOCATION_HAND,0,1,nil) - and Duel.IsExistingTarget(c41930553.rfilter,tp,0,LOCATION_GRAVE,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(41930553,0)) then - e:SetProperty(EFFECT_FLAG_CARD_TARGET) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,c41930553.rfilter,tp,0,LOCATION_GRAVE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) - e:GetHandler():RegisterFlagEffect(41930553,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) - else e:SetProperty(0) end -end -function c41930553.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(1-tp) and c41930553.rfilter(chkc) end - if chk==0 then return e:GetHandler():GetFlagEffect(41930553)==0 - and Duel.IsExistingMatchingCard(c41930553.cfilter,tp,LOCATION_HAND,0,1,nil) - and Duel.IsExistingTarget(c41930553.rfilter,tp,0,LOCATION_GRAVE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,c41930553.rfilter,tp,0,LOCATION_GRAVE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) - e:GetHandler():RegisterFlagEffect(41930553,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) -end -function c41930553.operation(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local tc=Duel.GetFirstTarget() - if not tc then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) - local cg=Duel.SelectMatchingCard(tp,c41930553.cfilter,tp,LOCATION_HAND,0,1,1,nil) - if cg:GetCount()==0 then return end - Duel.SendtoGrave(cg,REASON_EFFECT+REASON_DISCARD) - if tc:IsRelateToEffect(e) then - Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) - end -end diff --git a/script/c41952656.lua b/script/c41952656.lua deleted file mode 100644 index 3e2bca2aa2..0000000000 --- a/script/c41952656.lua +++ /dev/null @@ -1,30 +0,0 @@ ---イマイルカ -function c41952656.initial_effect(c) - --draw - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(41952656,0)) - e1:SetCategory(CATEGORY_DECKDES+CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCondition(c41952656.drcon) - e1:SetTarget(c41952656.drtg) - e1:SetOperation(c41952656.drop) - c:RegisterEffect(e1) -end -function c41952656.drcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsReason(REASON_DESTROY) and not c:IsReason(REASON_RULE) and rp==1-tp and c:GetPreviousControler()==tp -end -function c41952656.drtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,1) -end -function c41952656.drop(e,tp,eg,ep,ev,re,r,rp) - if Duel.DiscardDeck(tp,1,REASON_EFFECT)==1 then - local g=Duel.GetOperatedGroup() - if g:GetFirst():IsAttribute(ATTRIBUTE_WATER) then - Duel.Draw(tp,1,REASON_EFFECT) - end - end -end diff --git a/script/c41978142.lua b/script/c41978142.lua deleted file mode 100644 index 6aecf1796d..0000000000 --- a/script/c41978142.lua +++ /dev/null @@ -1,24 +0,0 @@ ---霞の谷の執行者 -function c41978142.initial_effect(c) - --to hand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(41978142,0)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c41978142.thtg) - e1:SetOperation(c41978142.thop) - c:RegisterEffect(e1) -end -function c41978142.filter(c) - return c:IsFaceup() and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand() -end -function c41978142.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local g=Duel.GetMatchingGroup(c41978142.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0) -end -function c41978142.thop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c41978142.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) - Duel.SendtoHand(g,nil,REASON_EFFECT) -end diff --git a/script/c42009836.lua b/script/c42009836.lua deleted file mode 100644 index e551607651..0000000000 --- a/script/c42009836.lua +++ /dev/null @@ -1,32 +0,0 @@ ---フォッシル・ダイナ パキケファロ -function c42009836.initial_effect(c) - --disable spsummon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetTargetRange(1,1) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(42009836,0)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_FLIP) - e2:SetTarget(c42009836.target) - e2:SetOperation(c42009836.operation) - c:RegisterEffect(e2) -end -function c42009836.filter(c) - return bit.band(c:GetSummonType(),SUMMON_TYPE_SPECIAL)~=0 -end -function c42009836.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local g=Duel.GetMatchingGroup(c42009836.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c42009836.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c42009836.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - Duel.Destroy(g,REASON_EFFECT) -end diff --git a/script/c42015635.lua b/script/c42015635.lua deleted file mode 100644 index 60179dadd1..0000000000 --- a/script/c42015635.lua +++ /dev/null @@ -1,27 +0,0 @@ ---ネオスペース -function c42015635.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --Atk - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e2:SetTarget(c42015635.atktg) - e2:SetValue(500) - c:RegisterEffect(e2) - --Def - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetCode(42015635) - e3:SetRange(LOCATION_SZONE) - e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - c:RegisterEffect(e3) -end -function c42015635.atktg(e,c) - return c:GetCode()==89943723 or (c:IsSetCard(0x9) and c:IsType(TYPE_FUSION) and not c:IsCode(31111109)) -end diff --git a/script/c42024143.lua b/script/c42024143.lua deleted file mode 100644 index 0362d9a3f5..0000000000 --- a/script/c42024143.lua +++ /dev/null @@ -1,20 +0,0 @@ ---XX-セイバー ガルドストライク -function c42024143.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c42024143.spcon) - c:RegisterEffect(e1) -end -function c42024143.spfilter(c) - return c:IsSetCard(0x100d) and c:IsType(TYPE_MONSTER) -end -function c42024143.spcon(e,c) - if c==nil then return true end - return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 - and Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0)==0 - and Duel.IsExistingMatchingCard(c42024143.spfilter,c:GetControler(),LOCATION_GRAVE,0,2,nil) -end diff --git a/script/c42029847.lua b/script/c42029847.lua deleted file mode 100644 index 4f65ea534a..0000000000 --- a/script/c42029847.lua +++ /dev/null @@ -1,29 +0,0 @@ ---幻奏の音女セレナ -function c42029847.initial_effect(c) - --double tribute - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DOUBLE_TRIBUTE) - e1:SetValue(c42029847.condition) - c:RegisterEffect(e1) - --extra summon - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetOperation(c42029847.regop) - c:RegisterEffect(e2) -end -function c42029847.condition(e,c) - return c:IsRace(RACE_FAIRY) -end -function c42029847.regop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetFlagEffect(tp,42029847)~=0 then return end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetTargetRange(LOCATION_HAND+LOCATION_MZONE,0) - e1:SetCode(EFFECT_EXTRA_SUMMON_COUNT) - e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x9b)) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) - Duel.RegisterFlagEffect(tp,42029847,RESET_PHASE+PHASE_END,0,1) -end diff --git a/script/c42035044.lua b/script/c42035044.lua deleted file mode 100644 index a66568eacd..0000000000 --- a/script/c42035044.lua +++ /dev/null @@ -1,17 +0,0 @@ ---漆黒の豹戦士パンサーウォリアー -function c42035044.initial_effect(c) - --attack cost - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_ATTACK_COST) - e1:SetCost(c42035044.atcost) - e1:SetOperation(c42035044.atop) - c:RegisterEffect(e1) -end -function c42035044.atcost(e,c,tp) - return Duel.CheckReleaseGroup(tp,nil,1,e:GetHandler()) -end -function c42035044.atop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.SelectReleaseGroup(tp,nil,1,1,e:GetHandler()) - Duel.Release(g,REASON_COST) -end diff --git a/script/c4206964.lua b/script/c4206964.lua deleted file mode 100644 index 5001b95058..0000000000 --- a/script/c4206964.lua +++ /dev/null @@ -1,30 +0,0 @@ ---落とし穴 -function c4206964.initial_effect(c) - --Activate(summon) - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c4206964.target) - e1:SetOperation(c4206964.activate) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - c:RegisterEffect(e2) -end -function c4206964.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if not eg then return false end - local tc=eg:GetFirst() - if chkc then return chkc==tc end - if chk==0 then return ep~=tp and tc:IsFaceup() and tc:GetAttack()>=1000 and tc:IsOnField() - and tc:IsCanBeEffectTarget(e) and tc:IsDestructable() end - Duel.SetTargetCard(eg) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,tc,1,0,0) -end -function c4206964.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=eg:GetFirst() - if tc:IsFaceup() and tc:IsRelateToEffect(e) and tc:GetAttack()>=1000 then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c42079445.lua b/script/c42079445.lua deleted file mode 100644 index 02cb7bd32c..0000000000 --- a/script/c42079445.lua +++ /dev/null @@ -1,57 +0,0 @@ ---ロスト・スター・ディセント -function c42079445.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c42079445.sptg) - e1:SetOperation(c42079445.spop) - c:RegisterEffect(e1) -end -function c42079445.spfilter(c,e,tp) - return c:IsType(TYPE_SYNCHRO) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c42079445.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c42079445.spfilter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c42079445.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c42079445.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c42079445.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP_DEFENCE) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1,true) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e2,true) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_UPDATE_LEVEL) - e3:SetValue(-1) - e3:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e3,true) - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetCode(EFFECT_SET_DEFENCE_FINAL) - e4:SetValue(0) - e4:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e4,true) - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_SINGLE) - e5:SetCode(EFFECT_CANNOT_CHANGE_POSITION) - e5:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e5,true) - Duel.SpecialSummonComplete() - end -end diff --git a/script/c42082363.lua b/script/c42082363.lua deleted file mode 100644 index ba905c24c2..0000000000 --- a/script/c42082363.lua +++ /dev/null @@ -1,34 +0,0 @@ ---ガスタ・グリフ -function c42082363.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(42082363,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCountLimit(1,42082363) - e1:SetCondition(c42082363.condition) - e1:SetTarget(c42082363.target) - e1:SetOperation(c42082363.operation) - c:RegisterEffect(e1) -end -function c42082363.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_HAND) -end -function c42082363.filter(c,e,tp) - return c:IsSetCard(0x10) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c42082363.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c42082363.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c42082363.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c42082363.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c42110434.lua b/script/c42110434.lua deleted file mode 100644 index b83821397a..0000000000 --- a/script/c42110434.lua +++ /dev/null @@ -1,25 +0,0 @@ ---ナチュル・バタフライ -function c42110434.initial_effect(c) - --negate attack - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(42110434,0)) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCondition(c42110434.condition) - e1:SetTarget(c42110434.target) - e1:SetOperation(c42110434.operation) - c:RegisterEffect(e1) -end -function c42110434.condition(e,tp,eg,ep,ev,re,r,rp) - return eg:GetFirst():GetControler()~=tp -end -function c42110434.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,1) end - Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,1) -end -function c42110434.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.DiscardDeck(tp,1,REASON_EFFECT) - Duel.NegateAttack() -end diff --git a/script/c42110604.lua b/script/c42110604.lua deleted file mode 100644 index ef194e7b3c..0000000000 --- a/script/c42110604.lua +++ /dev/null @@ -1,63 +0,0 @@ ---HSRチャンバライダー -function c42110604.initial_effect(c) - c:SetSPSummonOnce(42110604) - --synchro summon - aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1) - c:EnableReviveLimit() - --extra attack - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_EXTRA_ATTACK) - e1:SetValue(1) - c:RegisterEffect(e1) - --attack up - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(42110604,0)) - e2:SetCategory(CATEGORY_ATKCHANGE) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_BATTLE_START) - e2:SetCondition(c42110604.condition) - e2:SetOperation(c42110604.operation) - c:RegisterEffect(e2) - --tohand - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(42110604,1)) - e3:SetCategory(CATEGORY_TOHAND) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_TO_GRAVE) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) - e3:SetTarget(c42110604.thtg) - e3:SetOperation(c42110604.thop) - c:RegisterEffect(e3) -end -function c42110604.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsRelateToBattle() -end -function c42110604.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFaceup() and c:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(200) - e1:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e1) - end -end -function c42110604.thfilter(c) - return c:IsSetCard(0x2016) and c:IsAbleToHand() -end -function c42110604.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and c42110604.thfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c42110604.thfilter,tp,LOCATION_REMOVED,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c42110604.thfilter,tp,LOCATION_REMOVED,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c42110604.thop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end diff --git a/script/c42155488.lua b/script/c42155488.lua deleted file mode 100644 index d5ad60ed50..0000000000 --- a/script/c42155488.lua +++ /dev/null @@ -1,79 +0,0 @@ ---ジェノミックス・ファイター -function c42155488.initial_effect(c) - --summon with no tribute - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(42155488,0)) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SUMMON_PROC) - e1:SetCondition(c42155488.ntcon) - e1:SetOperation(c42155488.ntop) - c:RegisterEffect(e1) - --declear - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(42155488,1)) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetTarget(c42155488.dectg) - e2:SetOperation(c42155488.decop) - c:RegisterEffect(e2) -end -function c42155488.ntcon(e,c,minc) - if c==nil then return true end - return minc==0 and c:GetLevel()>4 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 -end -function c42155488.ntop(e,tp,eg,ep,ev,re,r,rp,c) - --change base attack - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetReset(RESET_EVENT+0xff0000) - e1:SetCode(EFFECT_SET_BASE_ATTACK) - e1:SetValue(1100) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_CHANGE_LEVEL) - e2:SetValue(3) - c:RegisterEffect(e2) -end -function c42155488.dectg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,563) - local rc=Duel.AnnounceRace(tp,1,0xffffff) - e:SetLabel(rc) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_SUMMON) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetTargetRange(1,0) - e1:SetTarget(c42155488.sumlimit) - e1:SetReset(RESET_PHASE+PHASE_END) - e1:SetLabel(rc) - Duel.RegisterEffect(e1,tp) - local e2=e1:Clone() - e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - Duel.RegisterEffect(e2,tp) -end -function c42155488.sumlimit(e,c) - return c:GetRace()~=e:GetLabel() -end -function c42155488.decop(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - local rc=e:GetLabel() - c:SetHint(CHINT_RACE,rc) - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SYNCHRO_CHECK) - e1:SetValue(c42155488.syncheck) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e1:SetLabel(rc) - c:RegisterEffect(e1) - end -end -function c42155488.syncheck(e,c) - c:AssumeProperty(ASSUME_RACE,e:GetLabel()) -end diff --git a/script/c4215636.lua b/script/c4215636.lua deleted file mode 100644 index e26734cf65..0000000000 --- a/script/c4215636.lua +++ /dev/null @@ -1,54 +0,0 @@ ---霞の谷の祭壇 -function c4215636.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetDescription(aux.Stringid(4215636,0)) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetRange(LOCATION_SZONE) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetCountLimit(1) - e2:SetCondition(c4215636.condition) - e2:SetTarget(c4215636.target) - e2:SetOperation(c4215636.operation) - c:RegisterEffect(e2) -end -function c4215636.cfilter(c,tp) - return bit.band(c:GetReason(),0x41)==0x41 and c:IsControler(tp) and c:IsAttribute(ATTRIBUTE_WIND) -end -function c4215636.condition(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c4215636.cfilter,1,nil,tp) -end -function c4215636.spfilter(c,e,tp) - return c:IsLevelBelow(3) and c:IsAttribute(ATTRIBUTE_WIND) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c4215636.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsRelateToEffect(e) and not e:GetHandler():IsStatus(STATUS_CHAINING) - and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c4215636.spfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_HAND) -end -function c4215636.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - if not e:GetHandler():IsRelateToEffect(e) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c4215636.spfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil,e,tp) - local tc=g:GetFirst() - if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1,true) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e2,true) - Duel.SpecialSummonComplete() - end -end diff --git a/script/c42167046.lua b/script/c42167046.lua deleted file mode 100644 index bcffad5983..0000000000 --- a/script/c42167046.lua +++ /dev/null @@ -1,60 +0,0 @@ ---グレイモヤ不発弾 -function c42167046.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c42167046.target) - e1:SetOperation(c42167046.operation) - c:RegisterEffect(e1) - --Destroy1 - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_LEAVE_FIELD) - e2:SetCondition(c42167046.descon1) - e2:SetOperation(c42167046.desop1) - c:RegisterEffect(e2) - --Destroy2 - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e3:SetRange(LOCATION_SZONE) - e3:SetCode(EVENT_LEAVE_FIELD) - e3:SetCondition(c42167046.descon2) - e3:SetOperation(c42167046.desop2) - c:RegisterEffect(e3) -end -function c42167046.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsPosition(POS_FACEUP_ATTACK) end - if chk==0 then return Duel.IsExistingTarget(Card.IsPosition,tp,LOCATION_MZONE,LOCATION_MZONE,2,nil,POS_FACEUP_ATTACK) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUPATTACK) - local g=Duel.SelectTarget(tp,Card.IsPosition,tp,LOCATION_MZONE,LOCATION_MZONE,2,2,nil,POS_FACEUP_ATTACK) -end -function c42167046.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) then return end - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) - local tc=g:GetFirst() - while tc do - c:SetCardTarget(tc) - tc=g:GetNext() - end -end -function c42167046.descon1(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsReason(REASON_DESTROY) -end -function c42167046.desop1(e,tp,eg,ep,ev,re,r,rp) - local g=e:GetHandler():GetCardTarget():Filter(Card.IsLocation,nil,LOCATION_MZONE) - Duel.Destroy(g,REASON_EFFECT) -end -function c42167046.descon2(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:GetCardTargetCount()==0 then return false end - local g=c:GetCardTarget() - local tc1=g:GetFirst() - local tc2=g:GetNext() - return eg:IsContains(tc1) or (tc2 and eg:IsContains(tc2)) -end -function c42167046.desop2(e,tp,eg,ep,ev,re,r,rp) - Duel.Destroy(e:GetHandler(),REASON_EFFECT) -end diff --git a/script/c42175079.lua b/script/c42175079.lua deleted file mode 100644 index fb816109ec..0000000000 --- a/script/c42175079.lua +++ /dev/null @@ -1,29 +0,0 @@ ---大噴火 -function c42175079.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(TIMING_END_PHASE,0) - e1:SetCondition(c42175079.condition) - e1:SetTarget(c42175079.target) - e1:SetOperation(c42175079.activate) - c:RegisterEffect(e1) -end -function c42175079.filter(c) - return c:IsFaceup() and c:IsCode(10080320) -end -function c42175079.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()==PHASE_END and Duel.GetTurnPlayer()==tp - and Duel.IsExistingMatchingCard(c42175079.filter,tp,LOCATION_ONFIELD,0,1,nil) -end -function c42175079.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end - local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c42175079.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler()) - Duel.Destroy(g,REASON_EFFECT) -end diff --git a/script/c42199039.lua b/script/c42199039.lua deleted file mode 100644 index 711e314152..0000000000 --- a/script/c42199039.lua +++ /dev/null @@ -1,91 +0,0 @@ ---妖刀竹光 -function c42199039.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c42199039.target) - e1:SetOperation(c42199039.activate) - c:RegisterEffect(e1) - --Equip limit - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_EQUIP_LIMIT) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetValue(1) - c:RegisterEffect(e2) - --direct - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(42199039,0)) - e3:SetCategory(CATEGORY_TOHAND) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetRange(LOCATION_SZONE) - e3:SetCountLimit(1,42199039) - e3:SetTarget(c42199039.dttg) - e3:SetOperation(c42199039.dtop) - c:RegisterEffect(e3) - --search - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(42199039,1)) - e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e4:SetCode(EVENT_TO_GRAVE) - e4:SetTarget(c42199039.thtg) - e4:SetOperation(c42199039.thop) - c:RegisterEffect(e4) -end -function c42199039.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c42199039.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,e:GetHandler(),tc) - end -end -function c42199039.filter(c) - return c:IsFaceup() and c:IsSetCard(0x60) and c:IsAbleToHand() -end -function c42199039.dttg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsControler(tp) and c42199039.filter(chkc) and chkc~=e:GetHandler() end - if chk==0 then return Duel.IsExistingTarget(c42199039.filter,tp,LOCATION_ONFIELD,0,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g=Duel.SelectTarget(tp,c42199039.filter,tp,LOCATION_ONFIELD,0,1,1,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c42199039.dtop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) then return end - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.SendtoHand(tc,nil,REASON_EFFECT)~=0 then - Duel.ConfirmCards(1-tp,tc) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_EQUIP) - e1:SetCode(EFFECT_DIRECT_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - c:RegisterEffect(e1) - end -end -function c42199039.thfilter(c) - return c:IsSetCard(0x60) and not c:IsCode(42199039) and c:IsAbleToHand() -end -function c42199039.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c42199039.thfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c42199039.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c42199039.thfilter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c42216237.lua b/script/c42216237.lua deleted file mode 100644 index 6d10dde555..0000000000 --- a/script/c42216237.lua +++ /dev/null @@ -1,55 +0,0 @@ ---ゼラの天使 -function c42216237.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1) - c:EnableReviveLimit() - -- - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(c42216237.atkval) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_REMOVE) - e2:SetOperation(c42216237.spreg) - c:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(42216237,0)) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e3:SetRange(LOCATION_REMOVED) - e3:SetCode(EVENT_PHASE+PHASE_STANDBY) - e3:SetCountLimit(1,42216237) - e3:SetCondition(c42216237.spcon) - e3:SetTarget(c42216237.sptg) - e3:SetOperation(c42216237.spop) - e3:SetLabelObject(e2) - c:RegisterEffect(e3) -end -function c42216237.atkval(e,c) - return Duel.GetFieldGroupCount(c:GetControler(),0,LOCATION_REMOVED)*100 -end -function c42216237.spreg(e,tp,eg,ep,ev,re,r,rp) - e:SetLabel(Duel.GetTurnCount()) - e:GetHandler():RegisterFlagEffect(42216237,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,2) -end -function c42216237.spcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return e:GetLabelObject():GetLabel()~=Duel.GetTurnCount() and c:GetFlagEffect(42216237)>0 -end -function c42216237.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local c=e:GetHandler() - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0) - c:ResetFlagEffect(42216237) -end -function c42216237.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c42233477.lua b/script/c42233477.lua deleted file mode 100644 index 9488274c71..0000000000 --- a/script/c42233477.lua +++ /dev/null @@ -1,67 +0,0 @@ ---バーバリアン・レイジ -function c42233477.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetCondition(c42233477.condition) - e1:SetTarget(c42233477.target) - e1:SetOperation(c42233477.activate) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e2:SetRange(LOCATION_SZONE) - e2:SetCode(EVENT_LEAVE_FIELD) - e2:SetCondition(c42233477.descon) - e2:SetOperation(c42233477.desop) - c:RegisterEffect(e2) -end -function c42233477.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end -function c42233477.filter(c) - return c:IsFaceup() and c:IsRace(RACE_WARRIOR) -end -function c42233477.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c42233477.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c42233477.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c42233477.filter,tp,LOCATION_MZONE,0,1,1,nil) -end -function c42233477.activate(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then - c:SetCardTarget(tc) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetProperty(EFFECT_FLAG_OWNER_RELATE) - e1:SetCondition(c42233477.rcon) - e1:SetValue(1000) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_BATTLE_DESTROY_REDIRECT) - e2:SetProperty(EFFECT_FLAG_OWNER_RELATE) - e2:SetCondition(c42233477.rcon) - e2:SetValue(LOCATION_HAND) - e2:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e2) - end -end -function c42233477.rcon(e) - return e:GetOwner():IsHasCardTarget(e:GetHandler()) -end -function c42233477.descon(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetHandler():GetFirstCardTarget() - return tc and eg:IsContains(tc) -end -function c42233477.desop(e,tp,eg,ep,ev,re,r,rp) - Duel.Destroy(e:GetHandler(),REASON_EFFECT) -end diff --git a/script/c42239546.lua b/script/c42239546.lua deleted file mode 100644 index 226ef9d09b..0000000000 --- a/script/c42239546.lua +++ /dev/null @@ -1,38 +0,0 @@ ---C・モーグ -function c42239546.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(42239546,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c42239546.spcon) - e1:SetCost(c42239546.spcost) - e1:SetTarget(c42239546.sptg) - e1:SetOperation(c42239546.spop) - c:RegisterEffect(e1) -end -function c42239546.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsEnvironment(42015635) -end -function c42239546.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end -function c42239546.spfilter(c,e,tp) - return c:IsCode(80344569) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c42239546.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsExistingMatchingCard(c42239546.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) -end -function c42239546.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - if not Duel.IsEnvironment(42015635) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c42239546.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c42256406.lua b/script/c42256406.lua deleted file mode 100644 index cc9ec26fbe..0000000000 --- a/script/c42256406.lua +++ /dev/null @@ -1,79 +0,0 @@ ---カードブロッカー -function c42256406.initial_effect(c) - --to defence - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(42256406,0)) - e1:SetCategory(CATEGORY_POSITION) - e1:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_SINGLE) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c42256406.potg) - e1:SetOperation(c42256406.poop) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - c:RegisterEffect(e2) - local e3=e1:Clone() - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e3) - --change battle target - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(42256406,1)) - e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e4:SetCode(EVENT_BE_BATTLE_TARGET) - e4:SetRange(LOCATION_MZONE) - e4:SetCondition(c42256406.cbcon) - e4:SetOperation(c42256406.cbop) - c:RegisterEffect(e4) - local e5=Effect.CreateEffect(c) - e5:SetDescription(aux.Stringid(42256406,2)) - e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e5:SetCode(EVENT_BE_BATTLE_TARGET) - e5:SetCost(c42256406.defcost) - e5:SetOperation(c42256406.defop) - c:RegisterEffect(e5) -end -function c42256406.potg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chk==0 then return e:GetHandler():IsAttackPos() end - Duel.SetOperationInfo(0,CATEGORY_POSITION,e:GetHandler(),1,0,0) -end -function c42256406.poop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFaceup() and c:IsAttackPos() and c:IsRelateToEffect(e) then - Duel.ChangePosition(c,POS_FACEUP_DEFENCE) - end -end -function c42256406.cbcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local bt=eg:GetFirst() - return r~=REASON_REPLACE and c~=bt and bt:IsFaceup() and bt:GetControler()==c:GetControler() -end -function c42256406.cbop(e,tp,eg,ep,ev,re,r,rp) - Duel.ChangeAttackTarget(e:GetHandler()) -end -function c42256406.defcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDiscardDeckAsCost(tp,1) end - local ct=Duel.GetFieldGroupCount(tp,LOCATION_DECK,0) - if ct==1 then - Duel.DiscardDeck(tp,1,REASON_COST) - e:SetLabel(1) - else - local ac=0 - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(42256406,3)) - if ct==2 then ac=Duel.AnnounceNumber(tp,1,2) - else ac=Duel.AnnounceNumber(tp,1,2,3) end - Duel.DiscardDeck(tp,ac,REASON_COST) - e:SetLabel(ac) - end -end -function c42256406.defop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFaceup() and c:IsRelateToEffect(e) then - local ct=e:GetLabel() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_DEFENCE) - e1:SetReset(RESET_EVENT+0x1ff0000+RESET_PHASE+PHASE_END) - e1:SetValue(ct*500) - c:RegisterEffect(e1) - end -end diff --git a/script/c4227096.lua b/script/c4227096.lua deleted file mode 100644 index c62de69e6c..0000000000 --- a/script/c4227096.lua +++ /dev/null @@ -1,21 +0,0 @@ ---捕違い -function c4227096.initial_effect(c) - --activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetOperation(c4227096.activate) - c:RegisterEffect(e1) -end -function c4227096.activate(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_TO_HAND) - e1:SetTargetRange(LOCATION_DECK,LOCATION_DECK) - if Duel.GetTurnPlayer()==tp then - e1:SetReset(RESET_PHASE+RESET_END+RESET_SELF_TURN,2) - else - e1:SetReset(RESET_PHASE+RESET_END+RESET_SELF_TURN) - end - Duel.RegisterEffect(e1,tp) -end diff --git a/script/c42280216.lua b/script/c42280216.lua deleted file mode 100644 index 6b8b345201..0000000000 --- a/script/c42280216.lua +++ /dev/null @@ -1,47 +0,0 @@ ---太陽の神官 -function c42280216.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c42280216.spcon) - c:RegisterEffect(e1) - --search - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(42280216,0)) - e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetCondition(c42280216.shcon) - e2:SetTarget(c42280216.shtg) - e2:SetOperation(c42280216.shop) - c:RegisterEffect(e2) -end -function c42280216.spcon(e,c) - if c==nil then return true end - return Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0,nil)==0 - and Duel.GetFieldGroupCount(c:GetControler(),0,LOCATION_MZONE,nil)>0 - and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 -end -function c42280216.shcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) and e:GetHandler():IsReason(REASON_DESTROY) -end -function c42280216.filter(c) - local code=c:GetCode() - return (code==78275321 or code==78552773) and c:IsAbleToHand() -end -function c42280216.shtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c42280216.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c42280216.shop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c42280216.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c42303365.lua b/script/c42303365.lua deleted file mode 100644 index 2d494b9c53..0000000000 --- a/script/c42303365.lua +++ /dev/null @@ -1,30 +0,0 @@ ---レプティレス・バイパー -function c42303365.initial_effect(c) - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(42303365,0)) - e1:SetCategory(CATEGORY_CONTROL) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetTarget(c42303365.ctltg) - e1:SetOperation(c42303365.ctlop) - c:RegisterEffect(e1) -end -function c42303365.filter(c) - return c:IsFaceup() and c:IsControlerCanBeChanged() and c:GetAttack()==0 -end -function c42303365.ctltg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c42303365.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c42303365.filter,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) - local g=Duel.SelectTarget(tp,c42303365.filter,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0) -end -function c42303365.ctlop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:GetAttack()==0 and not Duel.GetControl(tc,tp) then - if not tc:IsImmuneToEffect(e) and tc:IsAbleToChangeControler() then - Duel.Destroy(tc,REASON_EFFECT) - end - end -end diff --git a/script/c4230620.lua b/script/c4230620.lua deleted file mode 100644 index 54a5367b9e..0000000000 --- a/script/c4230620.lua +++ /dev/null @@ -1,52 +0,0 @@ ---サイキックブレイク -function c4230620.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(4230620,0)) - e2:SetCategory(CATEGORY_ATKCHANGE) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetRange(LOCATION_SZONE) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_SUMMON_SUCCESS) - e2:SetCondition(c4230620.atkcon) - e2:SetCost(c4230620.atkcost) - e2:SetTarget(c4230620.atktg) - e2:SetOperation(c4230620.atkop) - c:RegisterEffect(e2) -end -function c4230620.atkcon(e,tp,eg,ep,ev,re,r,rp) - local c=eg:GetFirst() - return c:IsOnField() and c:IsRace(RACE_PSYCHO) -end -function c4230620.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,500) end - Duel.PayLPCost(tp,500) -end -function c4230620.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - if chk==0 then return true end - Duel.SetTargetCard(eg) -end -function c4230620.atkop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_LEVEL) - e1:SetValue(1) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(300) - e2:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e2) - end -end diff --git a/script/c42309337.lua b/script/c42309337.lua deleted file mode 100644 index ae88f31c94..0000000000 --- a/script/c42309337.lua +++ /dev/null @@ -1,28 +0,0 @@ ---カウンター・カウンター -function c42309337.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_CHAINING) - e1:SetCondition(c42309337.condition) - e1:SetTarget(c42309337.target) - e1:SetOperation(c42309337.activate) - c:RegisterEffect(e1) -end -function c42309337.condition(e,tp,eg,ep,ev,re,r,rp) - return re:GetHandler():IsType(TYPE_COUNTER) and re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev) -end -function c42309337.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) - end -end -function c42309337.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateActivation(ev) - if re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(eg,REASON_EFFECT) - end -end diff --git a/script/c42314669.lua b/script/c42314669.lua deleted file mode 100644 index 9d3e280cf7..0000000000 --- a/script/c42314669.lua +++ /dev/null @@ -1,30 +0,0 @@ ---完全防音壁 -function c42314669.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c42314669.condition) - e1:SetOperation(c42314669.operation) - c:RegisterEffect(e1) -end -function c42314669.cfilter(c) - return c:IsFaceup() and c:IsType(TYPE_SYNCHRO) -end -function c42314669.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()==PHASE_MAIN1 and not Duel.CheckPhaseActivity() - and not Duel.IsExistingMatchingCard(c42314669.cfilter,tp,LOCATION_MZONE,0,1,nil) -end -function c42314669.operation(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetTargetRange(1,1) - e1:SetTarget(c42314669.sumlimit) - e1:SetReset(RESET_PHASE+PHASE_END,2) - Duel.RegisterEffect(e1,tp) -end -function c42314669.sumlimit(e,c,sump,sumtype,sumpos,targetp) - return c:IsType(TYPE_SYNCHRO) -end diff --git a/script/c42328171.lua b/script/c42328171.lua deleted file mode 100644 index 83d6e5c2e8..0000000000 --- a/script/c42328171.lua +++ /dev/null @@ -1,37 +0,0 @@ ---ゼンマイバット -function c42328171.initial_effect(c) - --salvage - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(42328171,0)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_NO_TURN_RESET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCondition(c42328171.thcon) - e1:SetTarget(c42328171.thtg) - e1:SetOperation(c42328171.thop) - c:RegisterEffect(e1) -end -function c42328171.thcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPosition(POS_FACEUP_ATTACK) -end -function c42328171.filter(c) - return c:IsSetCard(0x58) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() -end -function c42328171.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c42328171.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c42328171.filter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c42328171.filter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c42328171.thop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and c:IsPosition(POS_FACEUP_ATTACK) and c:IsControler(tp) and tc:IsRelateToEffect(e) then - Duel.ChangePosition(c,POS_FACEUP_DEFENCE) - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end diff --git a/script/c42338879.lua b/script/c42338879.lua deleted file mode 100644 index ee20bbb931..0000000000 --- a/script/c42338879.lua +++ /dev/null @@ -1,41 +0,0 @@ ---こけコッコ -function c42338879.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c42338879.spcon) - e1:SetOperation(c42338879.spop) - c:RegisterEffect(e1) - --redirect - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) - e2:SetCondition(c42338879.recon) - e2:SetValue(LOCATION_REMOVED) - c:RegisterEffect(e2) -end -function c42338879.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return (Duel.GetFieldGroupCount(tp,LOCATION_MZONE,LOCATION_MZONE)==0 - or (Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,0)==0 and Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0)) - and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 -end -function c42338879.spop(e,tp,eg,ep,ev,re,r,rp,c) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CHANGE_LEVEL) - if Duel.GetFieldGroupCount(tp,LOCATION_MZONE,LOCATION_MZONE)==0 then - e1:SetValue(3) - else - e1:SetValue(4) - end - e1:SetReset(RESET_EVENT+0xff0000) - c:RegisterEffect(e1) -end -function c42338879.recon(e) - return e:GetHandler():IsFaceup() -end diff --git a/script/c423585.lua b/script/c423585.lua deleted file mode 100644 index 33a89040c6..0000000000 --- a/script/c423585.lua +++ /dev/null @@ -1,76 +0,0 @@ ---召喚僧サモンプリースト -function c423585.initial_effect(c) - --to defence - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(423585,0)) - e1:SetCategory(CATEGORY_POSITION) - e1:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_SINGLE) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c423585.potg) - e1:SetOperation(c423585.poop) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - c:RegisterEffect(e2) - --special summon - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(423585,1)) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetCountLimit(1) - e3:SetRange(LOCATION_MZONE) - e3:SetCost(c423585.spcost) - e3:SetTarget(c423585.sptg) - e3:SetOperation(c423585.spop) - c:RegisterEffect(e3) - --cannot release - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e4:SetRange(LOCATION_MZONE) - e4:SetCode(EFFECT_UNRELEASABLE_SUM) - e4:SetValue(1) - c:RegisterEffect(e4) - local e5=e4:Clone() - e5:SetCode(EFFECT_UNRELEASABLE_NONSUM) - c:RegisterEffect(e5) -end -function c423585.potg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chk==0 then return e:GetHandler():IsAttackPos() end - Duel.SetOperationInfo(0,CATEGORY_POSITION,e:GetHandler(),1,0,0) -end -function c423585.poop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFaceup() and c:IsAttackPos() and c:IsRelateToEffect(e) then - Duel.ChangePosition(c,POS_FACEUP_DEFENCE) - end -end -function c423585.costfilter(c) - return c:IsType(TYPE_SPELL) and c:IsDiscardable() -end -function c423585.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c423585.costfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,c423585.costfilter,1,1,REASON_COST+REASON_DISCARD) -end -function c423585.filter(c,e,tp) - return c:GetLevel()==4 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c423585.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c423585.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c423585.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c423585.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - local tc=g:GetFirst() - if tc then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - end -end diff --git a/script/c42364257.lua b/script/c42364257.lua deleted file mode 100644 index 28361978dc..0000000000 --- a/script/c42364257.lua +++ /dev/null @@ -1,26 +0,0 @@ ---避雷針 -function c42364257.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DISABLE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_CHAINING) - e1:SetCondition(c42364257.condition) - e1:SetTarget(c42364257.target) - e1:SetOperation(c42364257.activate) - c:RegisterEffect(e1) -end -function c42364257.condition(e,tp,eg,ep,ev,re,r,rp) - return rp~=tp and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:GetHandler():IsCode(12580477) and Duel.IsChainDisablable(ev) -end -function c42364257.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0) - local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,0,LOCATION_MZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c42364257.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateEffect(ev) - local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,0,LOCATION_MZONE,nil) - Duel.Destroy(g,REASON_EFFECT) -end diff --git a/script/c42364374.lua b/script/c42364374.lua deleted file mode 100644 index 9da8f14054..0000000000 --- a/script/c42364374.lua +++ /dev/null @@ -1,22 +0,0 @@ ---アーマード・フライ -function c42364374.initial_effect(c) - --atk def - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_SET_ATTACK) - e1:SetValue(1000) - e1:SetCondition(c42364374.con) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_SET_DEFENCE) - c:RegisterEffect(e2) -end -function c42364374.filter(c) - return c:IsFaceup() and c:IsRace(RACE_INSECT) -end -function c42364374.con(e) - local c=e:GetHandler() - return not Duel.IsExistingMatchingCard(c42364374.filter,c:GetControler(),LOCATION_MZONE,0,1,c) -end diff --git a/script/c423705.lua b/script/c423705.lua deleted file mode 100644 index 34125d5cae..0000000000 --- a/script/c423705.lua +++ /dev/null @@ -1,25 +0,0 @@ ---鉄の騎士 ギア・フリード -function c423705.initial_effect(c) - --destroy equip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(423705,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_EQUIP) - e1:SetTarget(c423705.destg) - e1:SetOperation(c423705.desop) - c:RegisterEffect(e1) -end -function c423705.filter(c,ec) - return c:GetEquipTarget()==ec -end -function c423705.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return eg:IsExists(c423705.filter,1,nil,e:GetHandler()) end - local dg=eg:Filter(c423705.filter,nil,e:GetHandler()) - Duel.SetTargetCard(dg) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,dg,dg:GetCount(),0,0) -end -function c423705.desop(e,tp,eg,ep,ev,re,r,rp) - local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) - Duel.Destroy(tg,REASON_EFFECT) -end diff --git a/script/c42386471.lua b/script/c42386471.lua deleted file mode 100644 index 220d5ec17b..0000000000 --- a/script/c42386471.lua +++ /dev/null @@ -1,78 +0,0 @@ ---トゥーン・ヂェミナイ・エルフ -function c42386471.initial_effect(c) - --cannot attack - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetOperation(c42386471.atklimit) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e2) - local e3=e1:Clone() - e3:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - c:RegisterEffect(e3) - --destroy - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e4:SetRange(LOCATION_MZONE) - e4:SetCode(EVENT_LEAVE_FIELD) - e4:SetCondition(c42386471.sdescon) - e4:SetOperation(c42386471.sdesop) - c:RegisterEffect(e4) - --direct attack - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_SINGLE) - e5:SetCode(EFFECT_DIRECT_ATTACK) - e5:SetCondition(c42386471.dircon) - c:RegisterEffect(e5) - --handes - local e6=Effect.CreateEffect(c) - e6:SetDescription(aux.Stringid(42386471,0)) - e6:SetCategory(CATEGORY_HANDES) - e6:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e6:SetCode(EVENT_BATTLE_DAMAGE) - e6:SetCondition(c42386471.condition) - e6:SetTarget(c42386471.target) - e6:SetOperation(c42386471.operation) - c:RegisterEffect(e6) -end -function c42386471.atklimit(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e:GetHandler():RegisterEffect(e1) -end -function c42386471.sfilter(c) - return c:IsReason(REASON_DESTROY) and c:IsPreviousPosition(POS_FACEUP) and c:GetPreviousCodeOnField()==15259703 and c:IsPreviousLocation(LOCATION_ONFIELD) -end -function c42386471.sdescon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c42386471.sfilter,1,nil) -end -function c42386471.sdesop(e,tp,eg,ep,ev,re,r,rp) - Duel.Destroy(e:GetHandler(),REASON_EFFECT) -end -function c42386471.dirfilter1(c) - return c:IsFaceup() and c:IsCode(15259703) -end -function c42386471.dirfilter2(c) - return c:IsFaceup() and c:IsType(TYPE_TOON) -end -function c42386471.dircon(e) - return Duel.IsExistingMatchingCard(c42386471.dirfilter1,e:GetHandlerPlayer(),LOCATION_ONFIELD,0,1,nil) - and not Duel.IsExistingMatchingCard(c42386471.dirfilter2,e:GetHandlerPlayer(),0,LOCATION_MZONE,1,nil) -end -function c42386471.condition(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp -end -function c42386471.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,1-tp,1) -end -function c42386471.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetFieldGroup(ep,LOCATION_HAND,0) - if g:GetCount()==0 then return end - local sg=g:RandomSelect(1-tp,1) - Duel.SendtoGrave(sg,REASON_EFFECT+REASON_DISCARD) -end diff --git a/script/c42391240.lua b/script/c42391240.lua deleted file mode 100644 index a01b26f502..0000000000 --- a/script/c42391240.lua +++ /dev/null @@ -1,33 +0,0 @@ ---セイクリッド・アンタレス -function c42391240.initial_effect(c) - --summon success - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(42391240,0)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c42391240.thtg) - e1:SetOperation(c42391240.thop) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e2) -end -function c42391240.tgfilter(c) - return c:IsSetCard(0x53) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() -end -function c42391240.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:GetControler()==tp and c42391240.tgfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c42391240.tgfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c42391240.tgfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c42391240.thop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end diff --git a/script/c4239451.lua b/script/c4239451.lua deleted file mode 100644 index c8f33ee295..0000000000 --- a/script/c4239451.lua +++ /dev/null @@ -1,72 +0,0 @@ ---EMヒックリカエル -function c4239451.initial_effect(c) - --pendulum summon - aux.AddPendulumProcedure(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --swap1 - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(4239451,0)) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_PZONE) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCountLimit(1) - e2:SetTarget(c4239451.adtg1) - e2:SetOperation(c4239451.adop1) - c:RegisterEffect(e2) - --swap2 - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(4239451,1)) - e3:SetType(EFFECT_TYPE_QUICK_O) - e3:SetCode(EVENT_FREE_CHAIN) - e3:SetRange(LOCATION_MZONE) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetCountLimit(1) - e3:SetCondition(c4239451.adcon2) - e3:SetTarget(c4239451.adtg2) - e3:SetOperation(c4239451.adop2) - c:RegisterEffect(e3) -end -function c4239451.filter(c) - return c:IsFaceup() -end -function c4239451.adtg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c4239451.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c4239451.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c4239451.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) -end -function c4239451.adop1(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SWAP_AD) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - tc:RegisterEffect(e1) - end -end -function c4239451.adcon2(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp and Duel.GetCurrentPhase()==PHASE_BATTLE and Duel.GetCurrentChain()==0 -end -function c4239451.adtg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) end - if chk==0 then return Duel.IsExistingTarget(nil,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - Duel.SelectTarget(tp,nil,tp,LOCATION_MZONE,0,1,1,nil) -end -function c4239451.adop2(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) - and Duel.ChangePosition(tc,POS_FACEUP_DEFENCE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK)~=0 then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SWAP_AD) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - tc:RegisterEffect(e1) - end -end diff --git a/script/c42421606.lua b/script/c42421606.lua deleted file mode 100644 index 2a6e883689..0000000000 --- a/script/c42421606.lua +++ /dev/null @@ -1,74 +0,0 @@ ---No.85 クレイジー・ボックス -function c42421606.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,4,2) - c:EnableReviveLimit() - -- - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_ATTACK) - c:RegisterEffect(e1) - -- - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(42421606,0)) - e2:SetCategory(CATEGORY_DICE) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCost(c42421606.efcost) - e2:SetTarget(c42421606.eftg) - e2:SetOperation(c42421606.efop) - c:RegisterEffect(e2) -end -c42421606.xyz_number=85 -function c42421606.efcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c42421606.eftg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DICE,nil,0,tp,1) -end -function c42421606.efop(e,tp,eg,ep,ev,re,r,rp) - local dc=Duel.TossDice(tp,1) - if dc==1 then - Duel.SetLP(tp,Duel.GetLP(tp)/2) - elseif dc==2 then - Duel.Draw(tp,1,REASON_EFFECT) - elseif dc==3 then - if Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0 then - Duel.DiscardHand(1-tp,nil,1,1,REASON_EFFECT+REASON_DISCARD) - end - elseif dc==4 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - local g=Duel.SelectMatchingCard(tp,Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - if g:GetCount()>0 then - Duel.HintSelection(g) - local tc=g:GetFirst() - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetValue(RESET_TURN_SET) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - tc:RegisterEffect(e2) - end - elseif dc==5 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectMatchingCard(tp,Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - if g:GetCount()>0 then - Duel.HintSelection(g) - Duel.Destroy(g,REASON_EFFECT) - end - else - if e:GetHandler():IsRelateToEffect(e) then - Duel.Destroy(e:GetHandler(),REASON_EFFECT) - end - end -end diff --git a/script/c42425831.lua b/script/c42425831.lua deleted file mode 100644 index d36f9a9766..0000000000 --- a/script/c42425831.lua +++ /dev/null @@ -1,63 +0,0 @@ ---雷遁封印式 -function c42425831.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_END_PHASE) - e1:SetTarget(c42425831.target1) - e1:SetOperation(c42425831.operation) - c:RegisterEffect(e1) - --remove - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(42425831,0)) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetRange(LOCATION_SZONE) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetHintTiming(0,TIMING_END_PHASE) - e2:SetCost(c42425831.cost2) - e2:SetTarget(c42425831.target2) - e2:SetOperation(c42425831.operation) - c:RegisterEffect(e2) -end -function c42425831.cfilter(c) - return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_WIND) and c:IsAbleToDeckAsCost() -end -function c42425831.target1(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(1-tp) and chkc:IsAbleToRemove() end - if chk==0 then return true end - if Duel.IsExistingMatchingCard(c42425831.cfilter,tp,LOCATION_MZONE,0,1,nil) - and Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(42425831,1)) then - e:SetProperty(EFFECT_FLAG_CARD_TARGET) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local cg=Duel.SelectMatchingCard(tp,c42425831.cfilter,tp,LOCATION_MZONE,0,1,1,nil) - Duel.SendtoDeck(cg,nil,1,REASON_COST) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,2,nil) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,0) - e:GetHandler():RegisterFlagEffect(42425831,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) - else e:SetProperty(0) end -end -function c42425831.cost2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c42425831.cfilter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local cg=Duel.SelectMatchingCard(tp,c42425831.cfilter,tp,LOCATION_MZONE,0,1,1,nil) - Duel.SendtoDeck(cg,nil,1,REASON_COST) -end -function c42425831.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(1-tp) and chkc:IsAbleToRemove() end - if chk==0 then return e:GetHandler():GetFlagEffect(42425831)==0 - and Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,2,nil) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,0) - e:GetHandler():RegisterFlagEffect(42425831,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) -end -function c42425831.operation(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - if not g or g:GetCount()==0 then return end - local rg=g:Filter(Card.IsRelateToEffect,nil,e) - Duel.Remove(rg,POS_FACEUP,REASON_EFFECT) -end diff --git a/script/c42463414.lua b/script/c42463414.lua deleted file mode 100644 index e809c794d3..0000000000 --- a/script/c42463414.lua +++ /dev/null @@ -1,15 +0,0 @@ ---ニードル・ギルマン -function c42463414.initial_effect(c) - --atk up - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetTarget(c42463414.atktg) - e1:SetValue(400) - c:RegisterEffect(e1) -end -function c42463414.atktg(e,c) - return c:IsRace(0x60040) -end diff --git a/script/c42502956.lua b/script/c42502956.lua deleted file mode 100644 index c4f4c6b199..0000000000 --- a/script/c42502956.lua +++ /dev/null @@ -1,41 +0,0 @@ ---エアーズロック・サンライズ -function c42502956.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,42502956+EFFECT_COUNT_CODE_OATH) - e1:SetTarget(c42502956.target) - e1:SetOperation(c42502956.activate) - c:RegisterEffect(e1) -end -function c42502956.filter(c,e,tp) - return c:IsRace(RACE_BEAST) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c42502956.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c42502956.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c42502956.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c42502956.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c42502956.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)~=0 then - local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil) - local ct=Duel.GetMatchingGroupCount(Card.IsRace,tp,LOCATION_GRAVE,0,nil,RACE_BEAST+RACE_WINDBEAST+RACE_PLANT) - tc=g:GetFirst() - while tc do - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(ct*-200) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - tc=g:GetNext() - end - end -end diff --git a/script/c4252828.lua b/script/c4252828.lua deleted file mode 100644 index efec2eef5e..0000000000 --- a/script/c4252828.lua +++ /dev/null @@ -1,79 +0,0 @@ ---シー・アーチャー -function c4252828.initial_effect(c) - --equip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(4252828,0)) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCondition(c4252828.eqcon) - e1:SetTarget(c4252828.eqtg) - e1:SetOperation(c4252828.eqop) - c:RegisterEffect(e1) - --Destroy replace - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EFFECT_DESTROY_REPLACE) - e2:SetTarget(c4252828.desreptg) - e2:SetOperation(c4252828.desrepop) - e2:SetLabelObject(e1) - c:RegisterEffect(e2) -end -function c4252828.eqcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local ec=e:GetLabelObject() - return ec==nil or not ec:IsHasCardTarget(c) or ec:GetFlagEffect(4252828)==0 -end -function c4252828.filter(c) - return c:IsFaceup() and c:IsLevelBelow(3) -end -function c4252828.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c4252828.filter(chkc) and chkc~=e:GetHandler() end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingTarget(c4252828.filter,tp,LOCATION_MZONE,0,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local g=Duel.SelectTarget(tp,c4252828.filter,tp,LOCATION_MZONE,0,1,1,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0) -end -function c4252828.eqlimit(e,c) - return e:GetOwner()==c -end -function c4252828.eqop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) and tc:IsType(TYPE_MONSTER) then - if c:IsFaceup() and c:IsRelateToEffect(e) then - if not Duel.Equip(tp,tc,c,false) then return end - --Add Equip limit - tc:RegisterFlagEffect(4252828,RESET_EVENT+0x1fe0000,0,0) - e:SetLabelObject(tc) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetProperty(EFFECT_FLAG_COPY_INHERIT+EFFECT_FLAG_OWNER_RELATE) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(c4252828.eqlimit) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetReset(RESET_EVENT+0x1fe0000) - e2:SetValue(800) - tc:RegisterEffect(e2) - else Duel.SendtoGrave(tc,REASON_EFFECT) end - end -end -function c4252828.desreptg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - local ec=e:GetLabelObject():GetLabelObject() - if chk==0 then return ec and ec:IsHasCardTarget(c) - and not ec:IsStatus(STATUS_DESTROY_CONFIRMED) and ec:GetFlagEffect(4252828)~=0 end - return Duel.SelectYesNo(tp,aux.Stringid(4252828,1)) -end -function c4252828.desrepop(e,tp,eg,ep,ev,re,r,rp) - Duel.Destroy(e:GetLabelObject():GetLabelObject(),REASON_EFFECT+REASON_REPLACE) -end diff --git a/script/c42534368.lua b/script/c42534368.lua deleted file mode 100644 index f7aa3766ad..0000000000 --- a/script/c42534368.lua +++ /dev/null @@ -1,34 +0,0 @@ ---黙する死者 -function c42534368.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c42534368.target) - e1:SetOperation(c42534368.activate) - c:RegisterEffect(e1) -end -function c42534368.filter(c,e,tp) - return c:IsType(TYPE_NORMAL) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c42534368.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c42534368.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c42534368.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c42534368.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c42534368.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENCE)~=0 then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1,true) - end -end diff --git a/script/c4253484.lua b/script/c4253484.lua deleted file mode 100644 index 0d81337718..0000000000 --- a/script/c4253484.lua +++ /dev/null @@ -1,51 +0,0 @@ ---剣闘獣ホプロムス -function c4253484.initial_effect(c) - --def - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_BASE_DEFENCE) - e1:SetCondition(c4253484.defcon) - e1:SetValue(2400) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(4253484,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_PHASE+PHASE_BATTLE) - e2:SetRange(LOCATION_MZONE) - e2:SetCondition(c4253484.spcon) - e2:SetCost(c4253484.spcost) - e2:SetTarget(c4253484.sptg) - e2:SetOperation(c4253484.spop) - c:RegisterEffect(e2) -end -function c4253484.defcon(e) - return e:GetHandler():GetFlagEffect(4253484)>0 -end -function c4253484.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetBattledGroupCount()>0 -end -function c4253484.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToDeckAsCost() end - Duel.SendtoDeck(c,nil,2,REASON_COST) -end -function c4253484.filter(c,e,tp) - return not c:IsCode(4253484) and c:IsSetCard(0x19) and c:IsCanBeSpecialSummoned(e,101,tp,false,false) -end -function c4253484.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsExistingMatchingCard(c4253484.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c4253484.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c4253484.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - local tc=g:GetFirst() - if tc then - Duel.SpecialSummon(tc,101,tp,tp,false,false,POS_FACEUP) - tc:RegisterFlagEffect(tc:GetOriginalCode(),RESET_EVENT+0x1ff0000,0,0) - end -end diff --git a/script/c42541548.lua b/script/c42541548.lua deleted file mode 100644 index 2217093429..0000000000 --- a/script/c42541548.lua +++ /dev/null @@ -1,41 +0,0 @@ ---鬼ゴブリン -function c42541548.initial_effect(c) - --draw - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(42541548,0)) - e1:SetCategory(CATEGORY_DRAW) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCondition(c42541548.drcon) - e1:SetCost(c42541548.drcost) - e1:SetTarget(c42541548.drtg) - e1:SetOperation(c42541548.drop) - c:RegisterEffect(e1) -end -function c42541548.drcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c42541548.cfilter(c) - return c:IsType(TYPE_NORMAL) and c:IsAbleToDeckAsCost() -end -function c42541548.drcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c42541548.cfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectMatchingCard(tp,c42541548.cfilter,tp,LOCATION_HAND,0,1,1,nil) - Duel.ConfirmCards(1-tp,g) - Duel.SendtoDeck(g,nil,1,REASON_COST) -end -function c42541548.drtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(1) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c42541548.drop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) or e:GetHandler():IsFacedown() then return end - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end diff --git a/script/c42548470.lua b/script/c42548470.lua deleted file mode 100644 index 33a868f65c..0000000000 --- a/script/c42548470.lua +++ /dev/null @@ -1,58 +0,0 @@ ---揺れる発条秤 -function c42548470.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DRAW) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c42548470.target) - e1:SetOperation(c42548470.activate) - c:RegisterEffect(e1) -end -function c42548470.filter1(c,tp) - local lv1=c:GetLevel() - return c:IsFaceup() and c:IsSetCard(0x58) and lv1~=0 and Duel.IsExistingTarget(c42548470.filter2,tp,LOCATION_MZONE,0,1,c,lv1) -end -function c42548470.filter2(c,lv) - local lv2=c:GetLevel() - return c:IsFaceup() and c:IsSetCard(0x58) and lv2~=0 and lv2~=lv -end -function c42548470.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - if chk==0 then return Duel.IsExistingTarget(c42548470.filter1,tp,LOCATION_MZONE,0,1,nil,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - local g1=Duel.SelectTarget(tp,c42548470.filter1,tp,LOCATION_MZONE,0,1,1,nil,tp) - local tc1=g1:GetFirst() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - local g2=Duel.SelectTarget(tp,c42548470.filter2,tp,LOCATION_MZONE,0,1,1,tc1,tc1:GetLevel()) -end -function c42548470.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local tc1=g:GetFirst() - local tc2=g:GetNext() - local lv1=tc1:GetLevel() - local lv2=tc2:GetLevel() - if lv1==lv2 then return end - if tc1:IsFaceup() and tc1:IsRelateToEffect(e) and tc2:IsFaceup() and tc2:IsRelateToEffect(e) then - Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_TARGET) - local sg=g:Select(1-tp,1,1,nil) - if sg:GetFirst()==tc1 then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CHANGE_LEVEL) - e1:SetValue(lv1) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc2:RegisterEffect(e1) - if lv10 and e:GetHandler():GetPreviousLocation()==LOCATION_MZONE -end -function c42589641.spfilter(c,e,tp) - return c:IsSetCard(0x9c) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c42589641.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c42589641.spfilter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c42589641.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c42589641.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c42589641.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c4259068.lua b/script/c4259068.lua deleted file mode 100644 index 77e3064db5..0000000000 --- a/script/c4259068.lua +++ /dev/null @@ -1,24 +0,0 @@ ---魔力倹約術 -function c4259068.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --Cost Change - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_LPCOST_CHANGE) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(1,1) - e2:SetValue(c4259068.costchange) - c:RegisterEffect(e2) -end -function c4259068.costchange(e,re,rp,val) - if re and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:GetHandler():IsType(TYPE_SPELL) and not re:GetHandler():IsCode(9236985) then - return 0 - else - return val - end -end diff --git a/script/c42592719.lua b/script/c42592719.lua deleted file mode 100644 index ae7a9a7a84..0000000000 --- a/script/c42592719.lua +++ /dev/null @@ -1,66 +0,0 @@ ---剣闘獣アレクサンデル -function c42592719.initial_effect(c) - --immune spell - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_IMMUNE_EFFECT) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c42592719.imcon) - e1:SetValue(c42592719.imfilter) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(42592719,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_PHASE+PHASE_BATTLE) - e2:SetRange(LOCATION_MZONE) - e2:SetCondition(c42592719.spcon) - e2:SetCost(c42592719.spcost) - e2:SetTarget(c42592719.sptg) - e2:SetOperation(c42592719.spop) - c:RegisterEffect(e2) - --spsummon limit - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e3:SetCode(EFFECT_SPSUMMON_CONDITION) - e3:SetValue(c42592719.splimit) - c:RegisterEffect(e3) -end -function c42592719.splimit(e,se,sp,st) - return st==(SUMMON_TYPE_SPECIAL+107) or bit.band(st,SUMMON_TYPE_PENDULUM)==SUMMON_TYPE_PENDULUM -end -function c42592719.imcon(e) - return e:GetHandler():GetFlagEffect(42592719)>0 -end -function c42592719.imfilter(e,te) - return te:IsActiveType(TYPE_SPELL) -end -function c42592719.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetBattledGroupCount()>0 -end -function c42592719.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToDeckAsCost() end - Duel.SendtoDeck(c,nil,2,REASON_COST) -end -function c42592719.filter(c,e,tp) - return not c:IsCode(42592719) and c:IsSetCard(0x19) and c:IsCanBeSpecialSummoned(e,111,tp,false,false) -end -function c42592719.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsExistingMatchingCard(c42592719.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c42592719.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c42592719.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - local tc=g:GetFirst() - if tc then - Duel.SpecialSummon(tc,111,tp,tp,false,false,POS_FACEUP) - tc:RegisterFlagEffect(tc:GetOriginalCode(),RESET_EVENT+0x1ff0000,0,0) - end -end diff --git a/script/c425934.lua b/script/c425934.lua deleted file mode 100644 index 256c6643f3..0000000000 --- a/script/c425934.lua +++ /dev/null @@ -1,12 +0,0 @@ ---強欲ゴブリン -function c425934.initial_effect(c) - --discard limit - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(1,1) - e1:SetCode(EFFECT_CANNOT_DISCARD_HAND) - e1:SetValue(1) - c:RegisterEffect(e1) -end diff --git a/script/c42598242.lua b/script/c42598242.lua deleted file mode 100644 index 994f703c92..0000000000 --- a/script/c42598242.lua +++ /dev/null @@ -1,28 +0,0 @@ ---スペシャルハリケーン -function c42598242.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c42598242.cost) - e1:SetTarget(c42598242.target) - e1:SetOperation(c42598242.activate) - c:RegisterEffect(e1) -end -function c42598242.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) -end -function c42598242.filter(c) - return bit.band(c:GetSummonType(),SUMMON_TYPE_SPECIAL)==SUMMON_TYPE_SPECIAL and c:IsDestructable() -end -function c42598242.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c42598242.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - local g=Duel.GetMatchingGroup(c42598242.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c42598242.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c42598242.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - Duel.Destroy(g,REASON_EFFECT) -end diff --git a/script/c42647539.lua b/script/c42647539.lua deleted file mode 100644 index 68895b4feb..0000000000 --- a/script/c42647539.lua +++ /dev/null @@ -1,32 +0,0 @@ ---ガーゴイルの道化師 -function c42647539.initial_effect(c) - --pos - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(42647539,0)) - e1:SetCategory(CATEGORY_POSITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c42647539.postg) - e1:SetOperation(c42647539.posop) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e2) - local e3=e1:Clone() - e3:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - c:RegisterEffect(e3) -end -function c42647539.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0) -end -function c42647539.posop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.ChangePosition(tc,POS_FACEUP_DEFENCE,0,POS_FACEUP_ATTACK,0) - end -end diff --git a/script/c42664989.lua b/script/c42664989.lua deleted file mode 100644 index 5a3c063024..0000000000 --- a/script/c42664989.lua +++ /dev/null @@ -1,32 +0,0 @@ ---天よりの宝札 -function c42664989.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DRAW) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c42664989.cost) - e1:SetTarget(c42664989.target) - e1:SetOperation(c42664989.operation) - c:RegisterEffect(e1) -end -function c42664989.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemoveAsCost,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,e:GetHandler()) end - local g=Duel.GetMatchingGroup(Card.IsAbleToRemoveAsCost,tp,LOCATION_HAND+LOCATION_ONFIELD,0,e:GetHandler()) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c42664989.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp) end - local ht=Duel.GetFieldGroupCount(tp,LOCATION_HAND,0) - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(2-ht) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2-ht) -end -function c42664989.operation(e,tp,eg,ep,ev,re,r,rp) - local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) - local ht=Duel.GetFieldGroupCount(p,LOCATION_HAND,0) - if ht<2 then - Duel.Draw(p,2-ht,REASON_EFFECT) - end -end diff --git a/script/c4266839.lua b/script/c4266839.lua deleted file mode 100644 index 624dc19887..0000000000 --- a/script/c4266839.lua +++ /dev/null @@ -1,65 +0,0 @@ ---精神寄生体 -function c4266839.initial_effect(c) - --damage - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(4266839,0)) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_BATTLE_CONFIRM) - e1:SetCondition(c4266839.eqcon) - e1:SetOperation(c4266839.eqop) - c:RegisterEffect(e1) -end -function c4266839.eqcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetAttackTarget()==e:GetHandler() and e:GetHandler():GetBattlePosition()==POS_FACEDOWN_DEFENCE -end -function c4266839.eqop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetAttacker() - if not tc:IsRelateToBattle() or not c:IsRelateToBattle() then return end - if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or tc:IsFacedown() then - Duel.Destroy(c,REASON_EFFECT) - return - end - Duel.Equip(tp,c,tc) - local e1=Effect.CreateEffect(tc) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(c4266839.eqlimit) - c:RegisterEffect(e1) - --recover - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(4266839,1)) - e2:SetCategory(CATEGORY_RECOVER) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) - e2:SetRange(LOCATION_SZONE) - e2:SetCountLimit(1) - e2:SetCondition(c4266839.recon) - e2:SetTarget(c4266839.retg) - e2:SetOperation(c4266839.reop) - e2:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e2) -end -function c4266839.eqlimit(e,c) - return e:GetOwner()==c -end -function c4266839.recon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp -end -function c4266839.retg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local ec=e:GetHandler():GetEquipTarget() - Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,ec:GetAttack()/2) -end -function c4266839.reop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) then return end - local ec=c:GetEquipTarget() - if ec then - local atk=ec:GetAttack() - Duel.Recover(tp,atk/2,REASON_EFFECT) - end -end diff --git a/script/c42671151.lua b/script/c42671151.lua deleted file mode 100644 index 25d7ca6059..0000000000 --- a/script/c42671151.lua +++ /dev/null @@ -1,39 +0,0 @@ ---フリッグのリンゴ -function c42671151.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_RECOVER+CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_BATTLE_DAMAGE) - e1:SetCondition(c42671151.condition) - e1:SetTarget(c42671151.target) - e1:SetOperation(c42671151.activate) - c:RegisterEffect(e1) -end -function c42671151.condition(e,tp,eg,ep,ev,re,r,rp) - return ep==tp and Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 -end -function c42671151.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsPlayerCanSpecialSummonMonster(tp,42671152,0,0x4011,-2,-2,1,RACE_FIEND,ATTRIBUTE_DARK) end - Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,ev) - Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0) -end -function c42671151.activate(e,tp,eg,ep,ev,re,r,rp) - local rec=Duel.Recover(tp,ev,REASON_EFFECT) - if rec~=ev or Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 - or not Duel.IsPlayerCanSpecialSummonMonster(tp,42671152,0,0x4011,-2,-2,1,RACE_FIEND,ATTRIBUTE_DARK) then return end - local token=Duel.CreateToken(tp,42671152) - Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK) - e1:SetValue(ev) - e1:SetReset(RESET_EVENT+0x1fe0000) - token:RegisterEffect(e1,true) - local e2=e1:Clone() - e2:SetCode(EFFECT_SET_DEFENCE) - token:RegisterEffect(e2,true) - Duel.SpecialSummonComplete() -end diff --git a/script/c42679662.lua b/script/c42679662.lua deleted file mode 100644 index 75484e49ff..0000000000 --- a/script/c42679662.lua +++ /dev/null @@ -1,28 +0,0 @@ ---ヴェルズ・アザトホース -function c42679662.initial_effect(c) - --flip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(42679662,0)) - e1:SetCategory(CATEGORY_TODECK) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP) - e1:SetTarget(c42679662.target) - e1:SetOperation(c42679662.operation) - c:RegisterEffect(e1) -end -function c42679662.filter(c) - return bit.band(c:GetSummonType(),SUMMON_TYPE_SPECIAL)~=0 and c:IsAbleToDeck() -end -function c42679662.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c42679662.filter(chkc) end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectTarget(tp,c42679662.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0) -end -function c42679662.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.SendtoDeck(tc,nil,2,REASON_EFFECT) - end -end diff --git a/script/c42682609.lua b/script/c42682609.lua deleted file mode 100644 index 328f67aeb6..0000000000 --- a/script/c42682609.lua +++ /dev/null @@ -1,38 +0,0 @@ ---C・ドルフィーナ -function c42682609.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(42682609,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c42682609.spcon) - e1:SetCost(c42682609.spcost) - e1:SetTarget(c42682609.sptg) - e1:SetOperation(c42682609.spop) - c:RegisterEffect(e1) -end -function c42682609.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsEnvironment(42015635) -end -function c42682609.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end -function c42682609.spfilter(c,e,tp) - return c:IsCode(17955766) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c42682609.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsExistingMatchingCard(c42682609.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) -end -function c42682609.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - if not Duel.IsEnvironment(42015635) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c42682609.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c42685062.lua b/script/c42685062.lua deleted file mode 100644 index fab0fca47c..0000000000 --- a/script/c42685062.lua +++ /dev/null @@ -1,42 +0,0 @@ ---地獄からの使い -function c42685062.initial_effect(c) - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - c:RegisterEffect(e1) - --summon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(42685062,0)) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_SUMMON_PROC) - e2:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e2:SetCondition(c42685062.sumcon) - e2:SetOperation(c42685062.sumop) - e2:SetValue(SUMMON_TYPE_ADVANCE) - c:RegisterEffect(e2) -end -function c42685062.sumcon(e,c) - if c==nil then return true end - return Duel.GetTributeCount(c)~=0 -end -function c42685062.sumop(e,tp,eg,ep,ev,re,r,rp,c) - local g=Duel.SelectTribute(tp,c,1,1) - c:SetMaterial(g) - Duel.Release(g,REASON_SUMMON+REASON_MATERIAL) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CHANGE_LEVEL) - e1:SetValue(5) - e1:SetReset(RESET_EVENT+0xff0000) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_SET_BASE_ATTACK) - e2:SetValue(1300) - c:RegisterEffect(e2) - local e3=e1:Clone() - e3:SetCode(EFFECT_SET_BASE_DEFENCE) - e3:SetValue(900) - c:RegisterEffect(e3) -end diff --git a/script/c42703248.lua b/script/c42703248.lua deleted file mode 100644 index 516534ffd7..0000000000 --- a/script/c42703248.lua +++ /dev/null @@ -1,24 +0,0 @@ ---ハリケーン -function c42703248.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c42703248.target) - e1:SetOperation(c42703248.activate) - c:RegisterEffect(e1) -end -function c42703248.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand() -end -function c42703248.target(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return Duel.IsExistingMatchingCard(c42703248.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c) end - local sg=Duel.GetMatchingGroup(c42703248.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,c) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,sg,sg:GetCount(),0,0) -end -function c42703248.activate(e,tp,eg,ep,ev,re,r,rp) - local sg=Duel.GetMatchingGroup(c42703248.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler()) - Duel.SendtoHand(sg,nil,REASON_EFFECT) -end diff --git a/script/c42709949.lua b/script/c42709949.lua deleted file mode 100644 index 3c184ba5e7..0000000000 --- a/script/c42709949.lua +++ /dev/null @@ -1,41 +0,0 @@ ---守護神の矛 -function c42709949.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c42709949.target) - e1:SetOperation(c42709949.operation) - c:RegisterEffect(e1) - --Atk,def - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(c42709949.value) - c:RegisterEffect(e2) - --Equip limit - local e3=Effect.CreateEffect(c) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_EQUIP_LIMIT) - e3:SetValue(1) - c:RegisterEffect(e3) -end -function c42709949.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c42709949.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,e:GetHandler(),tc) - end -end -function c42709949.value(e,c) - return Duel.GetMatchingGroupCount(Card.IsCode,0,LOCATION_GRAVE,LOCATION_GRAVE,nil,c:GetCode())*900 -end diff --git a/script/c42737833.lua b/script/c42737833.lua deleted file mode 100644 index 08ccaa5ecd..0000000000 --- a/script/c42737833.lua +++ /dev/null @@ -1,32 +0,0 @@ ---XX-セイバー エマーズブレイド -function c42737833.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(42737833,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetCondition(c42737833.condition) - e1:SetTarget(c42737833.target) - e1:SetOperation(c42737833.operation) - c:RegisterEffect(e1) -end -function c42737833.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) -end -function c42737833.filter(c,e,tp) - return c:GetLevel()<=4 and c:IsSetCard(0x100d) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c42737833.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c42737833.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c42737833.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c42737833.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c42752141.lua b/script/c42752141.lua deleted file mode 100644 index 9b61762542..0000000000 --- a/script/c42752141.lua +++ /dev/null @@ -1,40 +0,0 @@ ---エヴォルカイザー・ドルカ -function c42752141.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsRace,RACE_DINOSAUR),4,2) - c:EnableReviveLimit() - --negate activate - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(42752141,0)) - e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EVENT_CHAINING) - e1:SetCondition(c42752141.condition) - e1:SetCost(c42752141.cost) - e1:SetTarget(c42752141.target) - e1:SetOperation(c42752141.operation) - c:RegisterEffect(e1) -end -function c42752141.condition(e,tp,eg,ep,ev,re,r,rp,chk) - return re~=e and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) - and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainNegatable(ev) -end -function c42752141.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c42752141.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) - end -end -function c42752141.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateActivation(ev) - if re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(eg,REASON_EFFECT) - end -end diff --git a/script/c42776960.lua b/script/c42776960.lua deleted file mode 100644 index d1301aa360..0000000000 --- a/script/c42776960.lua +++ /dev/null @@ -1,57 +0,0 @@ ---魂のリレー -function c42776960.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c42776960.target) - e1:SetOperation(c42776960.activate) - c:RegisterEffect(e1) -end -function c42776960.filter(c,e,tp) - return c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c42776960.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c42776960.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c42776960.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c42776960.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - local tc=g:GetFirst() - if tc then - Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CHANGE_DAMAGE) - e1:SetRange(LOCATION_MZONE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_AVAILABLE_BD+EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetTargetRange(1,0) - e1:SetCondition(c42776960.con) - e1:SetValue(0) - tc:RegisterEffect(e1,true) - local e2=e1:Clone() - e2:SetCode(EFFECT_NO_EFFECT_DAMAGE) - e2:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e2,true) - local e3=Effect.CreateEffect(e:GetHandler()) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e3:SetCode(EVENT_LEAVE_FIELD) - e3:SetLabel(1-tp) - e3:SetOperation(c42776960.leaveop) - e3:SetReset(RESET_EVENT+0xc020000) - tc:RegisterEffect(e3,true) - Duel.SpecialSummonComplete() - end -end -function c42776960.con(e) - return e:GetHandlerPlayer()==e:GetOwnerPlayer() -end -function c42776960.leaveop(e,tp,eg,ep,ev,re,r,rp) - local WIN_REASON_RELAY_SOUL=0x1a - Duel.Win(e:GetLabel(),WIN_REASON_RELAY_SOUL) -end diff --git a/script/c42793609.lua b/script/c42793609.lua deleted file mode 100644 index a7e6826fee..0000000000 --- a/script/c42793609.lua +++ /dev/null @@ -1,43 +0,0 @@ ---極星宝ブリージンガ・メン -function c42793609.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetCondition(c42793609.condition) - e1:SetTarget(c42793609.target) - e1:SetOperation(c42793609.operation) - c:RegisterEffect(e1) -end -function c42793609.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end -function c42793609.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) - and Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SELF) - local g1=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,nil) - e:SetLabelObject(g1:GetFirst()) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPPO) - Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil) -end -function c42793609.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local tc=g:GetFirst() - local sc=g:GetNext() - if tc:IsFacedown() or not tc:IsRelateToEffect(e) - or sc:IsFacedown() or not sc:IsRelateToEffect(e) then return end - local ac=e:GetLabelObject() - if tc==ac then tc=sc end - local atk=tc:GetBaseAttack() - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetValue(atk) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - ac:RegisterEffect(e1) -end diff --git a/script/c42810973.lua b/script/c42810973.lua deleted file mode 100644 index ed10dd2133..0000000000 --- a/script/c42810973.lua +++ /dev/null @@ -1,43 +0,0 @@ ---ジャンク・アーチャー -function c42810973.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,c42810973.tfilter,aux.NonTuner(nil),1) - c:EnableReviveLimit() - --remove - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(42810973,0)) - e1:SetCategory(CATEGORY_REMOVE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_MZONE) - e1:SetTarget(c42810973.target) - e1:SetOperation(c42810973.operation) - c:RegisterEffect(e1) -end -function c42810973.tfilter(c) - return c:IsCode(63977008) or c:IsHasEffect(20932152) -end -function c42810973.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsAbleToRemove() end - if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,0) -end -function c42810973.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.Remove(tc,tc:GetPosition(),REASON_EFFECT+REASON_TEMPORARY)~=0 then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetReset(RESET_PHASE+PHASE_END) - e1:SetCountLimit(1) - e1:SetLabelObject(tc) - e1:SetOperation(c42810973.retop) - Duel.RegisterEffect(e1,tp) - end -end -function c42810973.retop(e,tp,eg,ep,ev,re,r,rp) - Duel.ReturnToField(e:GetLabelObject()) -end diff --git a/script/c42829885.lua b/script/c42829885.lua deleted file mode 100644 index c790cf92db..0000000000 --- a/script/c42829885.lua +++ /dev/null @@ -1,28 +0,0 @@ ---強引な番兵 -function c42829885.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TODECK) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c42829885.target) - e1:SetOperation(c42829885.activate) - c:RegisterEffect(e1) -end -function c42829885.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0 end - Duel.SetTargetPlayer(tp) - Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,0,1-tp,LOCATION_HAND) -end -function c42829885.activate(e,tp,eg,ep,ev,re,r,rp) - local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) - local g=Duel.GetFieldGroup(p,0,LOCATION_HAND) - if g:GetCount()>0 then - Duel.ConfirmCards(p,g) - Duel.Hint(HINT_SELECTMSG,p,HINTMSG_TODECK) - local sg=g:Select(p,1,1,nil) - Duel.SendtoDeck(sg,nil,2,REASON_EFFECT) - Duel.ShuffleHand(1-p) - end -end diff --git a/script/c42851643.lua b/script/c42851643.lua deleted file mode 100644 index f616ae3afb..0000000000 --- a/script/c42851643.lua +++ /dev/null @@ -1,52 +0,0 @@ ---穿孔重機ドリルジャンボ -function c42851643.initial_effect(c) - --lvup - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(42851643,0)) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c42851643.lvtg) - e1:SetOperation(c42851643.lvop) - c:RegisterEffect(e1) - --to defence - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_DAMAGE_STEP_END) - e2:SetCondition(c42851643.poscon) - e2:SetOperation(c42851643.posop) - c:RegisterEffect(e2) - --pierce - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_PIERCE) - c:RegisterEffect(e3) -end -function c42851643.filter(c) - return c:IsFaceup() and c:IsLevelAbove(1) and c:IsRace(RACE_MACHINE) -end -function c42851643.lvtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c42851643.filter,tp,LOCATION_MZONE,0,1,nil) end -end -function c42851643.lvop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c42851643.filter,tp,LOCATION_MZONE,0,nil) - local tc=g:GetFirst() - while tc do - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_LEVEL) - e1:SetValue(1) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - tc=g:GetNext() - end -end -function c42851643.poscon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler()==Duel.GetAttacker() and e:GetHandler():IsRelateToBattle() -end -function c42851643.posop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsAttackPos() then - Duel.ChangePosition(c,POS_FACEUP_DEFENCE) - end -end diff --git a/script/c42868711.lua b/script/c42868711.lua deleted file mode 100644 index 73db38f813..0000000000 --- a/script/c42868711.lua +++ /dev/null @@ -1,40 +0,0 @@ ---幻影のゴラ亀 -function c42868711.initial_effect(c) - --disable - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_DISABLE) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(LOCATION_SZONE,LOCATION_SZONE) - e1:SetTarget(c42868711.distg) - c:RegisterEffect(e1) - --disable effect - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_CHAIN_SOLVING) - e2:SetRange(LOCATION_MZONE) - e2:SetOperation(c42868711.disop) - c:RegisterEffect(e2) - --self destroy - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetCode(EFFECT_SELF_DESTROY) - e3:SetRange(LOCATION_MZONE) - e3:SetTargetRange(LOCATION_SZONE,LOCATION_SZONE) - e3:SetTarget(c42868711.distg) - c:RegisterEffect(e3) -end -function c42868711.distg(e,c) - return c:GetControler()~=e:GetHandlerPlayer() and c:IsHasCardTarget(e:GetHandler()) -end -function c42868711.disop(e,tp,eg,ep,ev,re,r,rp) - if rp==tp or not re:IsActiveType(TYPE_SPELL+TYPE_TRAP) then return end - if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return end - local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) - if not g or g:GetCount()==0 then return end - if g:IsContains(e:GetHandler()) then - if Duel.NegateEffect(ev) and re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(re:GetHandler(),REASON_EFFECT) - end - end -end diff --git a/script/c42874792.lua b/script/c42874792.lua deleted file mode 100644 index 55d0f7ac1a..0000000000 --- a/script/c42874792.lua +++ /dev/null @@ -1,55 +0,0 @@ ---ゼンマイラビット -function c42874792.initial_effect(c) - --remove - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(42874792,0)) - e1:SetCategory(CATEGORY_REMOVE) - e1:SetProperty(EFFECT_FLAG_NO_TURN_RESET+EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c42874792.target) - e1:SetOperation(c42874792.operation) - c:RegisterEffect(e1) -end -function c42874792.filter(c) - return c:IsFaceup() and c:IsSetCard(0x58) and c:IsAbleToRemove() -end -function c42874792.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c42874792.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c42874792.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,c42874792.filter,tp,LOCATION_MZONE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) -end -function c42874792.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.Remove(tc,tc:GetPosition(),REASON_EFFECT+REASON_TEMPORARY)~=0 then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) - e1:SetRange(LOCATION_REMOVED) - e1:SetCountLimit(1) - if Duel.GetTurnPlayer()==tp then - if Duel.GetCurrentPhase()==PHASE_DRAW then - e1:SetLabel(Duel.GetTurnCount()) - else - e1:SetLabel(Duel.GetTurnCount()+2) - end - else - e1:SetLabel(Duel.GetTurnCount()+1) - end - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetCondition(c42874792.retcon) - e1:SetOperation(c42874792.retop) - tc:RegisterEffect(e1) - end -end -function c42874792.retcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnCount()==e:GetLabel() -end -function c42874792.retop(e,tp,eg,ep,ev,re,r,rp) - Duel.ReturnToField(e:GetHandler()) - e:Reset() -end diff --git a/script/c42883273.lua b/script/c42883273.lua deleted file mode 100644 index 9f19aaf8e2..0000000000 --- a/script/c42883273.lua +++ /dev/null @@ -1,16 +0,0 @@ ---森の住人 ウダン -function c42883273.initial_effect(c) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(c42883273.value) - c:RegisterEffect(e1) -end -function c42883273.filter(c) - return c:IsFaceup() and c:IsRace(RACE_PLANT) -end -function c42883273.value(e,c) - return Duel.GetMatchingGroupCount(c42883273.filter,0,LOCATION_MZONE,LOCATION_MZONE,nil)*100 -end diff --git a/script/c4290468.lua b/script/c4290468.lua deleted file mode 100644 index ddd360a758..0000000000 --- a/script/c4290468.lua +++ /dev/null @@ -1,82 +0,0 @@ ---スプレンディッド・ローズ -function c4290468.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1) - c:EnableReviveLimit() - --atkdown - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(4290468,0)) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCost(c4290468.atkcost) - e1:SetTarget(c4290468.atktg) - e1:SetOperation(c4290468.atkop) - c:RegisterEffect(e1) - --atk again - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(4290468,1)) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCondition(c4290468.dacon) - e2:SetCost(c4290468.dacost) - e2:SetOperation(c4290468.daop) - c:RegisterEffect(e2) -end -function c4290468.costfilter(c) - return c:IsRace(RACE_PLANT) and c:IsAbleToRemoveAsCost() -end -function c4290468.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c4290468.costfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c4290468.costfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c4290468.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil) -end -function c4290468.atkop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if not tc or tc:IsFacedown() or not tc:IsRelateToEffect(e) then return end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e1:SetValue(tc:GetAttack()/2) - tc:RegisterEffect(e1) -end -function c4290468.dacon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()==PHASE_BATTLE and e:GetHandler():GetAttackedGroupCount()~=0 - and Duel.GetAttacker()==nil and Duel.GetCurrentChain()==0 -end -function c4290468.dacost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c4290468.costfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c4290468.costfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c4290468.daop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFacedown() or not c:IsRelateToEffect(e) then return end - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e1:SetValue(c:GetAttack()/2) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_EXTRA_ATTACK) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e2:SetValue(1) - c:RegisterEffect(e2) -end diff --git a/script/c42940404.lua b/script/c42940404.lua deleted file mode 100644 index 4d827b7393..0000000000 --- a/script/c42940404.lua +++ /dev/null @@ -1,100 +0,0 @@ ---マシンナーズ・ギアフレーム -function c42940404.initial_effect(c) - --equip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(42940404,0)) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetTarget(c42940404.eqtg) - e1:SetOperation(c42940404.eqop) - c:RegisterEffect(e1) - --unequip - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(42940404,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_SZONE) - e2:SetCondition(c42940404.uncon) - e2:SetTarget(c42940404.sptg) - e2:SetOperation(c42940404.spop) - c:RegisterEffect(e2) - --destroy sub - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_EQUIP) - e3:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e3:SetCode(EFFECT_DESTROY_SUBSTITUTE) - e3:SetCondition(c42940404.uncon) - e3:SetValue(1) - c:RegisterEffect(e3) - --eqlimit - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetCode(EFFECT_EQUIP_LIMIT) - e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e4:SetValue(aux.TargetBoolFunction(Card.IsRace,RACE_MACHINE)) - c:RegisterEffect(e4) - --search - local e5=Effect.CreateEffect(c) - e5:SetDescription(aux.Stringid(42940404,2)) - e5:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e5:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE) - e5:SetCode(EVENT_SUMMON_SUCCESS) - e5:SetTarget(c42940404.stg) - e5:SetOperation(c42940404.sop) - c:RegisterEffect(e5) -end -function c42940404.uncon(e) - return e:GetHandler():IsStatus(STATUS_UNION) -end -function c42940404.filter(c) - return c:IsFaceup() and c:IsRace(RACE_MACHINE) and c:GetUnionCount()==0 -end -function c42940404.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c42940404.filter(chkc) and chkc~=e:GetHandler() end - if chk==0 then return e:GetHandler():GetFlagEffect(42940404)==0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingTarget(c42940404.filter,tp,LOCATION_MZONE,0,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local g=Duel.SelectTarget(tp,c42940404.filter,tp,LOCATION_MZONE,0,1,1,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0) - e:GetHandler():RegisterFlagEffect(42940404,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1) -end -function c42940404.eqop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if not c:IsRelateToEffect(e) or c:IsFacedown() then return end - if not tc:IsRelateToEffect(e) or not c42940404.filter(tc) then - Duel.SendtoGrave(c,REASON_EFFECT) - return - end - if not Duel.Equip(tp,c,tc,false) then return end - c:SetStatus(STATUS_UNION,true) -end -function c42940404.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():GetFlagEffect(42940404)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) - e:GetHandler():RegisterFlagEffect(42940404,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1) -end -function c42940404.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP_ATTACK) - end -end -function c42940404.sfilter(c) - return c:IsSetCard(0x36) and c:GetCode()~=42940404 and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() -end -function c42940404.stg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c42940404.sfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c42940404.sop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c42940404.sfilter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c42945701.lua b/script/c42945701.lua deleted file mode 100644 index d4bcbbe0ae..0000000000 --- a/script/c42945701.lua +++ /dev/null @@ -1,37 +0,0 @@ ---火霊術-「紅」 -function c42945701.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c42945701.cost) - e1:SetTarget(c42945701.target) - e1:SetOperation(c42945701.activate) - c:RegisterEffect(e1) -end -function c42945701.cost(e,tp,eg,ep,ev,re,r,rp,chk) - e:SetLabel(1) - if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsAttribute,1,nil,ATTRIBUTE_FIRE) end - local g=Duel.SelectReleaseGroup(tp,Card.IsAttribute,1,1,nil,ATTRIBUTE_FIRE) - local atk=g:GetFirst():GetTextAttack() - if atk<0 then atk=0 end - e:SetLabel(atk) - Duel.Release(g,REASON_COST) -end -function c42945701.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local res=e:GetLabel()~=0 - e:SetLabel(0) - return res - end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(e:GetLabel()) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,e:GetLabel()) - e:SetLabel(0) -end -function c42945701.activate(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c42956963.lua b/script/c42956963.lua deleted file mode 100644 index b7d1b9f588..0000000000 --- a/script/c42956963.lua +++ /dev/null @@ -1,70 +0,0 @@ ---ナイトメア・デーモンズ -function c42956963.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_DRAW_PHASE) - e1:SetCost(c42956963.cost) - e1:SetTarget(c42956963.target) - e1:SetOperation(c42956963.activate) - c:RegisterEffect(e1) -end -function c42956963.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,nil,1,nil) end - local g=Duel.SelectReleaseGroup(tp,nil,1,1,nil) - Duel.Release(g,REASON_COST) -end -function c42956963.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(1-tp,LOCATION_MZONE)>2 - and Duel.IsPlayerCanSpecialSummonMonster(tp,42956964,0x45,0x4011,2000,2000,6,RACE_FIEND,ATTRIBUTE_DARK,POS_FACEUP_ATTACK,1-tp) end - Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,3,0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,3,0,0) -end -function c42956963.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(1-tp,LOCATION_MZONE)<3 then return end - if not Duel.IsPlayerCanSpecialSummonMonster(tp,42956964,0x45,0x4011,2000,2000,6,RACE_FIEND,ATTRIBUTE_DARK,POS_FACEUP_ATTACK,1-tp) then return end - local g=Group.CreateGroup() - for i=1,3 do - local token=Duel.CreateToken(tp,42956964) - if Duel.SpecialSummonStep(token,0,tp,1-tp,false,false,POS_FACEUP_ATTACK) then - g:AddCard(token) - end - end - g:KeepAlive() - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_DESTROYED) - e2:SetLabelObject(g) - e2:SetCondition(c42956963.damcon) - e2:SetOperation(c42956963.damop) - Duel.RegisterEffect(e2,tp) - Duel.SpecialSummonComplete() -end -function c42956963.dfilter(c,g) - return g:IsContains(c) -end -function c42956963.damcon(e,tp,eg,ep,ev,re,r,rp) - local g=e:GetLabelObject() - if eg:IsExists(c42956963.dfilter,1,nil,g) then - return true - else - if not g:IsExists(Card.IsLocation,1,nil,LOCATION_MZONE) then - g:DeleteGroup() - e:Reset() - end - return false - end -end -function c42956963.damop(e,tp,eg,ep,ev,re,r,rp) - local g=e:GetLabelObject() - local tc=eg:GetFirst() - while tc do - if g:IsContains(tc) then - Duel.Damage(tc:GetPreviousControler(),800,REASON_EFFECT) - g:RemoveCard(tc) - end - tc=eg:GetNext() - end -end diff --git a/script/c42969214.lua b/script/c42969214.lua deleted file mode 100644 index e92c4abb6c..0000000000 --- a/script/c42969214.lua +++ /dev/null @@ -1,34 +0,0 @@ ---アイアイアン -function c42969214.initial_effect(c) - --atkup - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(42969214,0)) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCost(c42969214.cost) - e1:SetOperation(c42969214.operation) - c:RegisterEffect(e1) -end -function c42969214.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():GetAttackAnnouncedCount()==0 end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_OATH) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e:GetHandler():RegisterEffect(e1) -end -function c42969214.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFaceup() and c:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetProperty(EFFECT_FLAG_COPY_INHERIT) - e1:SetValue(400) - e1:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e1) - end -end diff --git a/script/c42994702.lua b/script/c42994702.lua deleted file mode 100644 index 46a56f2781..0000000000 --- a/script/c42994702.lua +++ /dev/null @@ -1,25 +0,0 @@ ---さまようミイラ -function c42994702.initial_effect(c) - --turn set - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(42994702,0)) - e1:SetCategory(CATEGORY_POSITION) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetTarget(c42994702.target) - e1:SetOperation(c42994702.operation) - c:RegisterEffect(e1) -end -function c42994702.target(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsCanTurnSet() and c:GetFlagEffect(42994702)==0 end - c:RegisterFlagEffect(42994702,RESET_EVENT+0x1fc0000+RESET_PHASE+PHASE_END,0,1) - Duel.SetOperationInfo(0,CATEGORY_POSITION,c,1,0,0) -end -function c42994702.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() and Duel.ChangePosition(c,POS_FACEDOWN_DEFENCE)>0 then - local g=Duel.GetMatchingGroup(Card.IsFacedown,tp,LOCATION_MZONE,0,nil) - Duel.ShuffleSetCard(g) - end -end diff --git a/script/c43002864.lua b/script/c43002864.lua deleted file mode 100644 index 50fce3b76d..0000000000 --- a/script/c43002864.lua +++ /dev/null @@ -1,32 +0,0 @@ ---レプティレス・ガードナー -function c43002864.initial_effect(c) - --search - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(43002864,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCondition(c43002864.condition) - e1:SetTarget(c43002864.target) - e1:SetOperation(c43002864.operation) - c:RegisterEffect(e1) -end -function c43002864.condition(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsReason(REASON_DESTROY) and c:IsPreviousLocation(LOCATION_ONFIELD) and c:GetPreviousControler()==tp -end -function c43002864.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c43002864.filter(c) - return c:IsSetCard(0x3c) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() -end -function c43002864.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c43002864.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c43014054.lua b/script/c43014054.lua deleted file mode 100644 index 116ed3c884..0000000000 --- a/script/c43014054.lua +++ /dev/null @@ -1,36 +0,0 @@ ---バイス・バーサーカー -function c43014054.initial_effect(c) - --damage & atk - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(43014054,0)) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_BE_MATERIAL) - e1:SetCondition(c43014054.damcon) - e1:SetTarget(c43014054.damtg) - e1:SetOperation(c43014054.damop) - c:RegisterEffect(e1) -end -function c43014054.damcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsLocation(LOCATION_GRAVE) and r==REASON_SYNCHRO -end -function c43014054.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local rc=e:GetHandler():GetReasonCard() - Duel.SetTargetPlayer(rc:GetControler()) - Duel.SetTargetParam(2000) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,rc:GetControler(),2000) -end -function c43014054.damop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) - local rc=e:GetHandler():GetReasonCard() - if rc:IsFaceup() and rc:IsOnField() then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e1:SetValue(2000) - rc:RegisterEffect(e1) - end -end diff --git a/script/c43034264.lua b/script/c43034264.lua deleted file mode 100644 index 106ba5893c..0000000000 --- a/script/c43034264.lua +++ /dev/null @@ -1,24 +0,0 @@ ---機殻の要塞 -function c43034264.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --extra summon - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetRange(LOCATION_SZONE) - e2:SetCode(EFFECT_EXTRA_SUMMON_COUNT) - e2:SetTargetRange(LOCATION_HAND+LOCATION_MZONE,0) - e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0xaa)) - c:RegisterEffect(e2) - --cannot disable summon - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetCode(EFFECT_CANNOT_DISABLE_SUMMON) - e3:SetRange(LOCATION_SZONE) - e3:SetProperty(EFFECT_FLAG_IGNORE_RANGE+EFFECT_FLAG_SET_AVAILABLE) - e3:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0xaa)) - c:RegisterEffect(e3) -end diff --git a/script/c43040603.lua b/script/c43040603.lua deleted file mode 100644 index 9854d4fc1c..0000000000 --- a/script/c43040603.lua +++ /dev/null @@ -1,53 +0,0 @@ ---モンスターゲート -function c43040603.initial_effect(c) - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c43040603.cost) - e1:SetTarget(c43040603.target) - e1:SetOperation(c43040603.operation) - c:RegisterEffect(e1) -end -function c43040603.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,nil,1,nil) end - local g=Duel.SelectReleaseGroup(tp,aux.TRUE,1,1,nil) - Duel.Release(g,REASON_COST) -end -function c43040603.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 and Duel.IsPlayerCanSpecialSummon(tp) - and Duel.IsExistingMatchingCard(Card.IsSummonableCard,tp,LOCATION_DECK,0,1,nil) and Duel.IsPlayerCanDiscardDeck(tp,1) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,LOCATION_DECK) -end -function c43040603.operation(e,tp,eg,ep,ev,re,r,rp) - if not Duel.IsPlayerCanSpecialSummon(tp) or not Duel.IsPlayerCanDiscardDeck(tp,1) then return end - local g=Duel.GetMatchingGroup(Card.IsSummonableCard,tp,LOCATION_DECK,0,nil) - local dcount=Duel.GetFieldGroupCount(tp,LOCATION_DECK,0) - local seq=-1 - local tc=g:GetFirst() - local spcard=nil - while tc do - if tc:GetSequence()>seq then - seq=tc:GetSequence() - spcard=tc - end - tc=g:GetNext() - end - if seq==-1 then - Duel.ConfirmDecktop(tp,dcount) - Duel.ShuffleDeck(tp) - return - end - Duel.ConfirmDecktop(tp,dcount-seq) - if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and spcard:IsCanBeSpecialSummoned(e,0,tp,false,false) then - Duel.DisableShuffleCheck() - if dcount-seq==1 then Duel.SpecialSummon(spcard,0,tp,tp,false,false,POS_FACEUP) - else - Duel.SpecialSummonStep(spcard,0,tp,tp,false,false,POS_FACEUP) - Duel.DiscardDeck(tp,dcount-seq-1,REASON_EFFECT) - Duel.SpecialSummonComplete() - end - else - Duel.DiscardDeck(tp,dcount-seq,REASON_EFFECT) - end -end diff --git a/script/c43061293.lua b/script/c43061293.lua deleted file mode 100644 index 42f043e31b..0000000000 --- a/script/c43061293.lua +++ /dev/null @@ -1,27 +0,0 @@ ---ファイアーダーツ -function c43061293.initial_effect(c) - --damage - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCategory(CATEGORY_DAMAGE+CATEGORY_DICE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c43061293.damcon) - e1:SetTarget(c43061293.damtg) - e1:SetOperation(c43061293.damop) - c:RegisterEffect(e1) -end -function c43061293.damcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)==0 -end -function c43061293.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetOperationInfo(0,CATEGORY_DICE,nil,0,tp,3) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,0) -end -function c43061293.damop(e,tp,eg,ep,ev,re,r,rp) - local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) - local d1,d2,d3=Duel.TossDice(tp,3) - Duel.Damage(p,(d1+d2+d3)*100,REASON_EFFECT) -end diff --git a/script/c43114901.lua b/script/c43114901.lua deleted file mode 100644 index 64a4aabcc3..0000000000 --- a/script/c43114901.lua +++ /dev/null @@ -1,36 +0,0 @@ ---ジェムナイト・サニクス -function c43114901.initial_effect(c) - aux.EnableDualAttribute(c) - --search - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(43114901,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c43114901.thcon) - e1:SetTarget(c43114901.thtg) - e1:SetOperation(c43114901.thop) - c:RegisterEffect(e1) -end -function c43114901.thcon(e,tp,eg,ep,ev,re,r,rp) - if not aux.IsDualState(e) then return false end - local tc=eg:GetFirst() - return eg:GetCount()==1 and tc:GetReasonCard()==e:GetHandler() - and tc:IsLocation(LOCATION_GRAVE) and tc:IsReason(REASON_BATTLE) -end -function c43114901.filter(c) - return c:IsSetCard(0x1047) and c:IsAbleToHand() -end -function c43114901.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c43114901.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c43114901.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c43114901.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c43138260.lua b/script/c43138260.lua deleted file mode 100644 index f43c9e245c..0000000000 --- a/script/c43138260.lua +++ /dev/null @@ -1,88 +0,0 @@ ---エクシーズ・リモーラ -function c43138260.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c43138260.spcon) - e1:SetOperation(c43138260.spop) - e1:SetValue(1) - c:RegisterEffect(e1) - -- - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(43138260,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetCondition(c43138260.spcon2) - e2:SetTarget(c43138260.sptg2) - e2:SetOperation(c43138260.spop2) - c:RegisterEffect(e2) -end -function c43138260.spcon(e,c) - if c==nil then return true end - return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 - and Duel.CheckRemoveOverlayCard(c:GetControler(),1,0,2,REASON_COST) -end -function c43138260.spop(e,tp,eg,ep,ev,re,r,rp,c) - Duel.RemoveOverlayCard(tp,1,0,2,2,REASON_COST) -end -function c43138260.spcon2(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+1 -end -function c43138260.spfilter(c,e,tp) - return c:IsRace(RACE_FISH) and c:GetLevel()==4 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c43138260.sptg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c43138260.spfilter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>1 - and Duel.IsExistingTarget(c43138260.spfilter,tp,LOCATION_GRAVE,0,2,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c43138260.spfilter,tp,LOCATION_GRAVE,0,2,2,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,2,0,0) -end -function c43138260.spop2(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) - if g:GetCount()==0 then return end - if Duel.GetLocationCount(tp,LOCATION_MZONE)1 - and Duel.IsPlayerCanSpecialSummonMonster(tp,43140792,0x3e,0x4011,0,0,1,RACE_INSECT,ATTRIBUTE_EARTH) end - Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,2,0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,0,0) -end -function c43140791.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)>1 - and Duel.IsPlayerCanSpecialSummonMonster(tp,43140792,0x3e,0x4011,0,0,1,RACE_INSECT,ATTRIBUTE_EARTH) then - for i=1,2 do - local token=Duel.CreateToken(tp,43140792) - Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP) - end - Duel.SpecialSummonComplete() - end -end diff --git a/script/c43175858.lua b/script/c43175858.lua deleted file mode 100644 index e5b7653a7c..0000000000 --- a/script/c43175858.lua +++ /dev/null @@ -1,70 +0,0 @@ ---トゥーン・キングダム -function c43175858.initial_effect(c) - --activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_REMOVE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c43175858.target) - e1:SetOperation(c43175858.activate) - c:RegisterEffect(e1) - --change code - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_CHANGE_CODE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_IMMEDIATELY_APPLY) - e2:SetRange(LOCATION_FZONE) - e2:SetValue(15259703) - c:RegisterEffect(e2) - --cannot be target - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetCode(EFFECT_CANNOT_SELECT_EFFECT_TARGET) - e3:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IMMEDIATELY_APPLY) - e3:SetRange(LOCATION_FZONE) - e3:SetTargetRange(0,0xff) - e3:SetValue(c43175858.etarget) - c:RegisterEffect(e3) - --destroy replace - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e4:SetCode(EFFECT_DESTROY_REPLACE) - e4:SetRange(LOCATION_FZONE) - e4:SetTarget(c43175858.reptg) - e4:SetValue(c43175858.repval) - c:RegisterEffect(e4) -end -function c43175858.target(e,tp,eg,ep,ev,re,r,rp,chk) - local g=Duel.GetDecktopGroup(tp,3) - if chk==0 then return g:FilterCount(Card.IsAbleToRemove,nil)==3 end - Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,3,tp,LOCATION_DECK) -end -function c43175858.activate(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local ct=Duel.GetFieldGroupCount(tp,LOCATION_DECK,0) - if ct==0 then return end - if ct>3 then ct=3 end - local g=Duel.GetDecktopGroup(tp,ct) - Duel.DisableShuffleCheck() - Duel.Remove(g,POS_FACEDOWN,REASON_EFFECT) -end -function c43175858.etarget(e,re,c) - return c:IsFaceup() and c:IsControler(e:GetHandlerPlayer()) and c:IsLocation(LOCATION_MZONE) and c:IsType(TYPE_TOON) -end -function c43175858.repfilter(c,tp) - return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) - and c:IsType(TYPE_TOON) and c:IsReason(REASON_BATTLE+REASON_EFFECT) -end -function c43175858.reptg(e,tp,eg,ep,ev,re,r,rp,chk) - local ct=eg:FilterCount(c43175858.repfilter,nil,tp) - local g=Duel.GetDecktopGroup(tp,ct) - if chk==0 then return g:IsExists(Card.IsAbleToRemove,ct,nil) end - if Duel.SelectYesNo(tp,aux.Stringid(43175858,0)) then - Duel.DisableShuffleCheck() - Duel.Remove(g,POS_FACEDOWN,REASON_EFFECT) - return true - else return false end -end -function c43175858.repval(e,c) - return c43175858.repfilter(c,e:GetHandlerPlayer()) -end diff --git a/script/c43191636.lua b/script/c43191636.lua deleted file mode 100644 index 6c529ee541..0000000000 --- a/script/c43191636.lua +++ /dev/null @@ -1,37 +0,0 @@ ---竜影魚レイ・ブロント -function c43191636.initial_effect(c) - aux.EnableDualAttribute(c) - --change base attack - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(aux.IsDualState) - e1:SetCode(EFFECT_SET_BASE_ATTACK) - e1:SetValue(2300) - c:RegisterEffect(e1) - --to defence - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_PHASE+PHASE_BATTLE) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCondition(c43191636.poscon) - e2:SetOperation(c43191636.posop) - c:RegisterEffect(e2) -end -function c43191636.poscon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsDualState() and e:GetHandler():GetAttackedCount()>0 -end -function c43191636.posop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsAttackPos() then - Duel.ChangePosition(c,POS_FACEUP_DEFENCE) - end - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_CHANGE_POSITION) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_COPY_INHERIT) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,3) - c:RegisterEffect(e1) -end diff --git a/script/c43202238.lua b/script/c43202238.lua deleted file mode 100644 index 804c6157ff..0000000000 --- a/script/c43202238.lua +++ /dev/null @@ -1,79 +0,0 @@ ---邪竜星-ガイザー -function c43202238.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1) - c:EnableReviveLimit() - --cannot target - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) - e1:SetValue(aux.tgoval) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(43202238,0)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCountLimit(1,43202238) - e2:SetTarget(c43202238.destg) - e2:SetOperation(c43202238.desop) - c:RegisterEffect(e2) - --spsummon - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(43202238,1)) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_TO_GRAVE) - e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e3:SetCountLimit(1,43202239) - e3:SetCondition(c43202238.spcon) - e3:SetTarget(c43202238.sptg) - e3:SetOperation(c43202238.spop) - c:RegisterEffect(e3) -end -function c43202238.desfilter(c) - return c:IsFaceup() and c:IsSetCard(0x9e) and c:IsDestructable() -end -function c43202238.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - if chk==0 then return Duel.IsExistingTarget(c43202238.desfilter,tp,LOCATION_MZONE,0,1,nil) - and Duel.IsExistingTarget(Card.IsDestructable,tp,0,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g1=Duel.SelectTarget(tp,c43202238.desfilter,tp,LOCATION_MZONE,0,1,1,nil) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g2=Duel.SelectTarget(tp,Card.IsDestructable,tp,0,LOCATION_ONFIELD,1,1,nil) - g1:Merge(g2) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g1,2,0,0) -end -function c43202238.desop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local tg=g:Filter(Card.IsRelateToEffect,nil,e) - if tg:GetCount()>0 then - Duel.Destroy(tg,REASON_EFFECT) - end -end -function c43202238.spcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsReason(REASON_DESTROY) and c:GetPreviousControler()==tp - and c:IsPreviousLocation(LOCATION_ONFIELD) -end -function c43202238.spfilter(c,e,tp) - return c:IsRace(RACE_WYRM) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c43202238.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c43202238.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c43202238.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c43202238.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENCE) - end -end diff --git a/script/c43225434.lua b/script/c43225434.lua deleted file mode 100644 index c687411524..0000000000 --- a/script/c43225434.lua +++ /dev/null @@ -1,30 +0,0 @@ ---決闘融合-バトル・フュージョン -function c43225434.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetCountLimit(1,43225434+EFFECT_COUNT_CODE_OATH) - e1:SetCondition(c43225434.condition) - e1:SetOperation(c43225434.activate) - c:RegisterEffect(e1) -end -function c43225434.condition(e,tp,eg,ep,ev,re,r,rp) - local a=Duel.GetAttacker() - local at=Duel.GetAttackTarget() - return at and ((a:IsControler(tp) and a:IsType(TYPE_FUSION)) - or (at:IsControler(tp) and at:IsFaceup() and at:IsType(TYPE_FUSION))) -end -function c43225434.activate(e,tp,eg,ep,ev,re,r,rp) - local a=Duel.GetAttacker() - local at=Duel.GetAttackTarget() - if a:IsControler(1-tp) then a,at=at,a end - if not a:IsRelateToBattle() or a:IsFacedown() or not at:IsRelateToBattle() or at:IsFacedown() then return end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_DAMAGE) - e1:SetValue(at:GetAttack()) - a:RegisterEffect(e1) -end diff --git a/script/c43237273.lua b/script/c43237273.lua deleted file mode 100644 index fb7547a002..0000000000 --- a/script/c43237273.lua +++ /dev/null @@ -1,58 +0,0 @@ ---N・ブラック・パンサー -function c43237273.initial_effect(c) - --copy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(43237273,0)) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetTarget(c43237273.target) - e1:SetOperation(c43237273.operation) - c:RegisterEffect(e1) -end -function c43237273.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil) -end -function c43237273.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc and c:IsRelateToEffect(e) and c:IsFaceup() and tc:IsRelateToEffect(e) and not tc:IsType(TYPE_TOKEN) then - local code=tc:GetOriginalCode() - local cid=0 - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - e1:SetCode(EFFECT_CHANGE_CODE) - e1:SetValue(code) - c:RegisterEffect(e1) - if not tc:IsType(TYPE_TRAPMONSTER) then - cid=c:CopyEffect(code, RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END, 1) - end - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(43237273,1)) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_PHASE+PHASE_END) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e2:SetCountLimit(1) - e2:SetRange(LOCATION_MZONE) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - e2:SetLabelObject(e1) - e2:SetLabel(cid) - e2:SetOperation(c43237273.rstop) - c:RegisterEffect(e2) - end -end -function c43237273.rstop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local cid=e:GetLabel() - if cid~=0 then c:ResetEffect(cid,RESET_COPY) end - local e1=e:GetLabelObject() - e1:Reset() - Duel.HintSelection(Group.FromCards(c)) - Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) -end diff --git a/script/c43241495.lua b/script/c43241495.lua deleted file mode 100644 index 04febdcb44..0000000000 --- a/script/c43241495.lua +++ /dev/null @@ -1,62 +0,0 @@ ---EMトランポリンクス -function c43241495.initial_effect(c) - --pendulum summon - aux.AddPendulumProcedure(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --tohand - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(43241495,0)) - e2:SetCategory(CATEGORY_TOHAND) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetRange(LOCATION_PZONE) - e2:SetCountLimit(1,43241495) - e2:SetCondition(c43241495.thcon) - e2:SetTarget(c43241495.thtg) - e2:SetOperation(c43241495.thop1) - c:RegisterEffect(e2) - --tohand - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(43241495,1)) - e3:SetCategory(CATEGORY_TOHAND) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_SUMMON_SUCCESS) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetTarget(c43241495.thtg) - e3:SetOperation(c43241495.thop2) - c:RegisterEffect(e3) -end -function c43241495.cfilter(c,tp) - return c:IsControler(tp) and c:GetSummonType()==SUMMON_TYPE_PENDULUM -end -function c43241495.thcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c43241495.cfilter,1,nil,tp) -end -function c43241495.filter(c) - return (c:GetSequence()==6 or c:GetSequence()==7) and c:IsAbleToHand() -end -function c43241495.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_SZONE) and c43241495.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c43241495.filter,tp,LOCATION_SZONE,LOCATION_SZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g=Duel.SelectTarget(tp,c43241495.filter,tp,LOCATION_SZONE,LOCATION_SZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c43241495.thop1(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - end -end -function c43241495.thop2(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - end -end diff --git a/script/c43250041.lua b/script/c43250041.lua deleted file mode 100644 index c0c7edd417..0000000000 --- a/script/c43250041.lua +++ /dev/null @@ -1,32 +0,0 @@ ---ドレインシールド -function c43250041.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_RECOVER) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetCondition(c43250041.condition) - e1:SetTarget(c43250041.target) - e1:SetOperation(c43250041.activate) - c:RegisterEffect(e1) -end -function c43250041.condition(e,tp,eg,ep,ev,re,r,rp) - return tp~=Duel.GetTurnPlayer() -end -function c43250041.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local tg=Duel.GetAttacker() - if chkc then return chkc==tg end - if chk==0 then return tg:IsOnField() and tg:IsCanBeEffectTarget(e) end - Duel.SetTargetCard(tg) - local rec=tg:GetAttack() - Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,rec) -end -function c43250041.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsAttackable() then - if Duel.NegateAttack(tc) then - Duel.Recover(tp,tc:GetAttack(),REASON_EFFECT) - end - end -end diff --git a/script/c43262273.lua b/script/c43262273.lua deleted file mode 100644 index bdab77d9b0..0000000000 --- a/script/c43262273.lua +++ /dev/null @@ -1,67 +0,0 @@ ---紅蓮の指名者 -function c43262273.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_REMOVE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_TOHAND) - e1:SetCost(c43262273.cost) - e1:SetTarget(c43262273.target) - e1:SetOperation(c43262273.activate) - c:RegisterEffect(e1) -end -function c43262273.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,2000) and Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)~=0 - and not Duel.IsExistingMatchingCard(Card.IsPublic,tp,LOCATION_HAND,0,1,nil) end - Duel.PayLPCost(tp,2000) - local g=Duel.GetFieldGroup(tp,LOCATION_HAND,0) - Duel.ConfirmCards(1-tp,g) - Duel.ShuffleHand(tp) -end -function c43262273.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)~=0 - and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_HAND,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,0,1-tp,LOCATION_HAND) -end -function c43262273.activate(e,tp,eg,ep,ev,re,r,rp) - local g0=Duel.GetFieldGroup(tp,0,LOCATION_HAND) - Duel.ConfirmCards(tp,g0) - local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_HAND,nil) - if g:GetCount()>0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local sg=g:Select(tp,1,1,nil) - local tc=sg:GetFirst() - Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) - tc:RegisterFlagEffect(43262273,RESET_EVENT+0x1fe0000,0,1) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetCountLimit(1) - if Duel.GetTurnPlayer()==1-tp and Duel.GetCurrentPhase()==PHASE_END then - e1:SetLabel(Duel.GetTurnCount()) - e1:SetReset(RESET_PHASE+PHASE_END,3) - else - e1:SetLabel(0) - e1:SetReset(RESET_PHASE+PHASE_END,2) - end - e1:SetLabelObject(tc) - e1:SetCondition(c43262273.retcon) - e1:SetOperation(c43262273.retop) - Duel.RegisterEffect(e1,tp) - end - Duel.ShuffleHand(1-tp) -end -function c43262273.retcon(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetLabelObject() - if tc:GetFlagEffect(43262273)==0 then - e:Reset() - return false - else - return Duel.GetTurnPlayer()==1-tp and Duel.GetTurnCount()~=e:GetLabel() - end -end -function c43262273.retop(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetLabelObject() - Duel.SendtoHand(tc,1-tp,REASON_EFFECT) -end diff --git a/script/c43268675.lua b/script/c43268675.lua deleted file mode 100644 index cc2241a5f7..0000000000 --- a/script/c43268675.lua +++ /dev/null @@ -1,43 +0,0 @@ ---幻奏の音女オペラ -function c43268675.initial_effect(c) - --cannot attack - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetOperation(c43268675.atklimit) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_FLIP) - c:RegisterEffect(e2) - --indes - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_BE_MATERIAL) - e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e3:SetCondition(c43268675.indcon) - e3:SetOperation(c43268675.indop) - c:RegisterEffect(e3) -end -function c43268675.atklimit(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - e:GetHandler():RegisterEffect(e1) -end -function c43268675.indcon(e,tp,eg,ep,ev,re,r,rp) - return r==REASON_FUSION and e:GetHandler():IsLocation(LOCATION_GRAVE) -end -function c43268675.indop(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x9b)) - e1:SetValue(1) - e1:SetReset(RESET_PHASE+RESET_END) - Duel.RegisterEffect(e1,tp) - local e2=e1:Clone() - e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - Duel.RegisterEffect(e2,tp) -end diff --git a/script/c43318266.lua b/script/c43318266.lua deleted file mode 100644 index af11b840e8..0000000000 --- a/script/c43318266.lua +++ /dev/null @@ -1,68 +0,0 @@ ---雲魔物-キロスタス -function c43318266.initial_effect(c) - --battle indestructable - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e1:SetValue(1) - c:RegisterEffect(e1) - --selfdes - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EFFECT_SELF_DESTROY) - e2:SetCondition(c43318266.sdcon) - c:RegisterEffect(e2) - --counter - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(43318266,0)) - e3:SetCategory(CATEGORY_COUNTER) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e3:SetCode(EVENT_SUMMON_SUCCESS) - e3:SetOperation(c43318266.addc) - c:RegisterEffect(e3) - --destroy - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(43318266,1)) - e4:SetProperty(EFFECT_FLAG_CARD_TARGET) - e4:SetCategory(CATEGORY_DESTROY) - e4:SetType(EFFECT_TYPE_IGNITION) - e4:SetRange(LOCATION_MZONE) - e4:SetCost(c43318266.descost) - e4:SetTarget(c43318266.destg) - e4:SetOperation(c43318266.desop) - c:RegisterEffect(e4) -end -function c43318266.sdcon(e) - return e:GetHandler():IsPosition(POS_FACEUP_DEFENCE) -end -function c43318266.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x18) -end -function c43318266.addc(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - local ct=Duel.GetMatchingGroupCount(c43318266.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - e:GetHandler():AddCounter(0x19,ct) - end -end -function c43318266.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsCanRemoveCounter(tp,0x19,2,REASON_COST) end - e:GetHandler():RemoveCounter(tp,0x19,2,REASON_COST) -end -function c43318266.filter(c) - return c:IsDestructable() -end -function c43318266.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c43318266.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c43318266.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c43318266.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c43318266.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c43332022.lua b/script/c43332022.lua deleted file mode 100644 index 4532255e80..0000000000 --- a/script/c43332022.lua +++ /dev/null @@ -1,30 +0,0 @@ ---ジュラック・ガリム -function c43332022.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(43332022,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetCondition(c43332022.descon) - e1:SetTarget(c43332022.destg) - e1:SetOperation(c43332022.desop) - c:RegisterEffect(e1) -end -function c43332022.descon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) -end -function c43332022.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local tc=e:GetHandler():GetReasonCard() - if tc:IsRelateToBattle() and not Duel.IsExistingMatchingCard(Card.IsDiscardable,1-tp,LOCATION_HAND,0,1,nil) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,tc,1,0,0) - end -end -function c43332022.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetHandler():GetReasonCard() - if not tc:IsRelateToBattle() then return end - if Duel.IsExistingMatchingCard(Card.IsDiscardable,1-tp,LOCATION_HAND,0,1,nil) and Duel.SelectYesNo(1-tp,aux.Stringid(43332022,1)) then - Duel.DiscardHand(1-tp,Card.IsDiscardable,1,1,REASON_EFFECT+REASON_DISCARD,nil) - else Duel.Destroy(tc,REASON_EFFECT) end -end diff --git a/script/c43340443.lua b/script/c43340443.lua deleted file mode 100644 index 2f9cb717e8..0000000000 --- a/script/c43340443.lua +++ /dev/null @@ -1,27 +0,0 @@ ---キックバック -function c43340443.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DISABLE_SUMMON+CATEGORY_TOHAND) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_SUMMON) - e1:SetCondition(c43340443.condition) - e1:SetTarget(c43340443.target) - e1:SetOperation(c43340443.activate) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_FLIP_SUMMON) - c:RegisterEffect(e2) -end -function c43340443.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentChain()==0 -end -function c43340443.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DISABLE_SUMMON,eg,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,eg,1,0,0) -end -function c43340443.activate(e,tp,eg,ep,ev,re,r,rp,chk) - Duel.NegateSummon(eg:GetFirst()) - Duel.SendtoHand(eg,nil,REASON_EFFECT) -end diff --git a/script/c4334811.lua b/script/c4334811.lua deleted file mode 100644 index 6ad4e37f53..0000000000 --- a/script/c4334811.lua +++ /dev/null @@ -1,61 +0,0 @@ ---スクラップ・リサイクラー -function c4334811.initial_effect(c) - --send to grave - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(4334811,0)) - e1:SetCategory(CATEGORY_TOGRAVE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c4334811.target) - e1:SetOperation(c4334811.operation) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e2) - --draw - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(4334811,1)) - e3:SetCategory(CATEGORY_DRAW) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1) - e3:SetCost(c4334811.drcost) - e3:SetTarget(c4334811.drtg) - e3:SetOperation(c4334811.drop) - c:RegisterEffect(e3) -end -function c4334811.tgfilter(c) - return c:IsType(TYPE_MONSTER) and c:IsRace(RACE_MACHINE) and c:IsAbleToGrave() -end -function c4334811.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c4334811.tgfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) -end -function c4334811.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c4334811.tgfilter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoGrave(g,REASON_EFFECT) - end -end -function c4334811.cfilter(c) - return c:IsAttribute(ATTRIBUTE_EARTH) and c:IsRace(RACE_MACHINE) and c:GetLevel()==4 and c:IsAbleToDeckAsCost() -end -function c4334811.drcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c4334811.cfilter,tp,LOCATION_GRAVE,0,2,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectMatchingCard(tp,c4334811.cfilter,tp,LOCATION_GRAVE,0,2,2,nil) - Duel.SendtoDeck(g,nil,2,REASON_COST) -end -function c4334811.drtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(1) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c4334811.drop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end diff --git a/script/c4335427.lua b/script/c4335427.lua deleted file mode 100644 index 5803872b1a..0000000000 --- a/script/c4335427.lua +++ /dev/null @@ -1,68 +0,0 @@ ---創星神 sophia -function c4335427.initial_effect(c) - c:EnableReviveLimit() - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c4335427.spcon) - e1:SetOperation(c4335427.spop) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_CANNOT_DISABLE_SPSUMMON) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - c:RegisterEffect(e2) - --cannot special summon - local e3=Effect.CreateEffect(c) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_SPSUMMON_CONDITION) - c:RegisterEffect(e3) - --remove - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(4335427,0)) - e4:SetCategory(CATEGORY_REMOVE) - e4:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_SINGLE) - e4:SetCode(EVENT_SPSUMMON_SUCCESS) - e4:SetTarget(c4335427.rmtg) - e4:SetOperation(c4335427.rmop) - c:RegisterEffect(e4) -end -function c4335427.spfilter(c,tpe) - return c:IsFaceup() and c:IsType(tpe) and c:IsAbleToRemoveAsCost() -end -function c4335427.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.IsExistingMatchingCard(c4335427.spfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,TYPE_RITUAL) - and Duel.IsExistingMatchingCard(c4335427.spfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,TYPE_FUSION) - and Duel.IsExistingMatchingCard(c4335427.spfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,TYPE_SYNCHRO) - and Duel.IsExistingMatchingCard(c4335427.spfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,TYPE_XYZ) -end -function c4335427.spop(e,tp,eg,ep,ev,re,r,rp,c) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g1=Duel.SelectMatchingCard(tp,c4335427.spfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,TYPE_RITUAL) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g2=Duel.SelectMatchingCard(tp,c4335427.spfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,TYPE_FUSION) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g3=Duel.SelectMatchingCard(tp,c4335427.spfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,TYPE_SYNCHRO) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g4=Duel.SelectMatchingCard(tp,c4335427.spfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,TYPE_XYZ) - g1:Merge(g2) - g1:Merge(g3) - g1:Merge(g4) - Duel.Remove(g1,POS_FACEUP,REASON_COST) -end -function c4335427.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0x1e,0x1e,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,0) - Duel.SetChainLimit(aux.FALSE) -end -function c4335427.rmop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0x1e,0x1e,e:GetHandler()) - Duel.Remove(g,POS_FACEUP,REASON_EFFECT) -end diff --git a/script/c4335645.lua b/script/c4335645.lua deleted file mode 100644 index 0fad8d8bc3..0000000000 --- a/script/c4335645.lua +++ /dev/null @@ -1,30 +0,0 @@ ---ニュードリュア -function c4335645.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(4335645,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetCondition(c4335645.condition) - e1:SetTarget(c4335645.target) - e1:SetOperation(c4335645.operation) - c:RegisterEffect(e1) -end -function c4335645.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) -end -function c4335645.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsDestructable() end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c4335645.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c43359262.lua b/script/c43359262.lua deleted file mode 100644 index a0b36a0726..0000000000 --- a/script/c43359262.lua +++ /dev/null @@ -1,39 +0,0 @@ ---エレクトロ軍曹 -function c43359262.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(43359262,0)) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetTarget(c43359262.target) - e1:SetOperation(c43359262.operation) - c:RegisterEffect(e1) -end -function c43359262.filter(c,rc) - return c:IsFacedown() and c:GetSequence()~=5 and not rc:IsHasCardTarget(c) -end -function c43359262.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_SZONE) and chkc:IsControler(1-tp) and c43359262.filter(chkc,e:GetHandler()) end - if chk==0 then return Duel.IsExistingTarget(c43359262.filter,tp,0,LOCATION_SZONE,1,nil,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,515) - Duel.SelectTarget(tp,c43359262.filter,tp,0,LOCATION_SZONE,1,1,nil,e:GetHandler()) -end -function c43359262.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsFacedown() and tc:IsRelateToEffect(e) then - c:SetCardTarget(tc) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_TRIGGER) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetCondition(c43359262.rcon) - e1:SetValue(1) - tc:RegisterEffect(e1) - end -end -function c43359262.rcon(e) - return e:GetOwner():IsHasCardTarget(e:GetHandler()) -end diff --git a/script/c43366227.lua b/script/c43366227.lua deleted file mode 100644 index 3d87ea7b46..0000000000 --- a/script/c43366227.lua +++ /dev/null @@ -1,86 +0,0 @@ ---セブン・ソード・ウォリアー -function c43366227.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1) - c:EnableReviveLimit() - --damage - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(43366227,0)) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCountLimit(1) - e1:SetCode(EVENT_EQUIP) - e1:SetTarget(c43366227.damtg) - e1:SetOperation(c43366227.damop) - c:RegisterEffect(e1) - --to grave - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(43366227,1)) - e2:SetCategory(CATEGORY_TOGRAVE) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetTarget(c43366227.tgtg) - e2:SetOperation(c43366227.tgop) - c:RegisterEffect(e2) - --special summon - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(43366227,2)) - e3:SetCategory(CATEGORY_DESTROY) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_LEAVE_FIELD) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetRange(LOCATION_MZONE) - e3:SetCondition(c43366227.descon) - e3:SetTarget(c43366227.destg) - e3:SetOperation(c43366227.desop) - c:RegisterEffect(e3) -end -function c43366227.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return not e:GetHandler():IsStatus(STATUS_CHAINING) end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(800) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,800) -end -function c43366227.damop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end -function c43366227.tgtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:GetEquipTarget()==e:GetHandler() end - if chk==0 then return e:GetHandler():GetEquipCount()~=0 end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=e:GetHandler():GetEquipGroup():Select(tp,1,1,nil) - Duel.SetTargetCard(g) - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,0,0) -end -function c43366227.tgop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoGrave(tc,REASON_EFFECT) - end -end -function c43366227.cfilter(c,ec,tp) - return c:IsLocation(LOCATION_GRAVE) and c:IsControler(tp) and c:GetEquipTarget()==ec -end -function c43366227.descon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c43366227.cfilter,1,nil,e:GetHandler(),tp) -end -function c43366227.desfilter(c) - return c:IsFaceup() and c:IsDestructable() -end -function c43366227.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and c43366227.desfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c43366227.desfilter,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c43366227.desfilter,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c43366227.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c43378048.lua b/script/c43378048.lua deleted file mode 100644 index 3260f37ed5..0000000000 --- a/script/c43378048.lua +++ /dev/null @@ -1,65 +0,0 @@ ---混沌幻魔アーミタイル -function c43378048.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcCode3(c,6007213,32491822,69890967,true,true) - --spsummon condition - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(c43378048.splimit) - c:RegisterEffect(e1) - --special summon rule - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_SPSUMMON_PROC) - e2:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e2:SetRange(LOCATION_EXTRA) - e2:SetCondition(c43378048.spcon) - e2:SetOperation(c43378048.spop) - c:RegisterEffect(e2) - --indes - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e3:SetValue(1) - c:RegisterEffect(e3) - --atkup - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetCode(EFFECT_UPDATE_ATTACK) - e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e4:SetRange(LOCATION_MZONE) - e4:SetCondition(c43378048.atkcon) - e4:SetValue(10000) - c:RegisterEffect(e4) -end -function c43378048.splimit(e,se,sp,st) - return e:GetHandler():GetLocation()~=LOCATION_EXTRA -end -function c43378048.spfilter(c,code) - return c:IsFaceup() and c:IsCode(code) and c:IsAbleToRemoveAsCost() -end -function c43378048.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.GetLocationCount(tp,LOCATION_MZONE)>-3 - and Duel.IsExistingMatchingCard(c43378048.spfilter,tp,LOCATION_ONFIELD,0,1,nil,6007213) - and Duel.IsExistingMatchingCard(c43378048.spfilter,tp,LOCATION_ONFIELD,0,1,nil,32491822) - and Duel.IsExistingMatchingCard(c43378048.spfilter,tp,LOCATION_ONFIELD,0,1,nil,69890967) -end -function c43378048.spop(e,tp,eg,ep,ev,re,r,rp,c) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g1=Duel.SelectMatchingCard(tp,c43378048.spfilter,tp,LOCATION_ONFIELD,0,1,1,nil,6007213) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g2=Duel.SelectMatchingCard(tp,c43378048.spfilter,tp,LOCATION_ONFIELD,0,1,1,nil,32491822) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g3=Duel.SelectMatchingCard(tp,c43378048.spfilter,tp,LOCATION_ONFIELD,0,1,1,nil,69890967) - g1:Merge(g2) - g1:Merge(g3) - Duel.Remove(g1,POS_FACEUP,REASON_COST) -end -function c43378048.atkcon(e) - return Duel.GetTurnPlayer()==e:GetHandlerPlayer() -end diff --git a/script/c43378076.lua b/script/c43378076.lua deleted file mode 100644 index ae65eebce7..0000000000 --- a/script/c43378076.lua +++ /dev/null @@ -1,104 +0,0 @@ ---羅刹 -function c43378076.initial_effect(c) - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(aux.FALSE) - c:RegisterEffect(e1) - --summon,flip - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetCode(EVENT_SUMMON_SUCCESS) - e2:SetOperation(c43378076.retreg) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EVENT_FLIP) - c:RegisterEffect(e3) - --return - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(43378076,0)) - e4:SetCategory(CATEGORY_TOHAND) - e4:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e4:SetCode(EVENT_SUMMON_SUCCESS) - e4:SetCost(c43378076.sretcost) - e4:SetTarget(c43378076.srettg) - e4:SetOperation(c43378076.sretop) - c:RegisterEffect(e4) - local e5=e4:Clone() - e5:SetCode(EVENT_FLIP) - c:RegisterEffect(e5) -end -function c43378076.cfilter(c) - return c:IsType(TYPE_SPIRIT) and c:GetCode()~=43378076 and not c:IsPublic() -end -function c43378076.sretcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_SPSUMMON)==0 - and Duel.IsExistingMatchingCard(c43378076.cfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) - local g=Duel.SelectMatchingCard(tp,c43378076.cfilter,tp,LOCATION_HAND,0,1,1,nil) - Duel.ConfirmCards(1-tp,g) - Duel.ShuffleHand(tp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) - e1:SetTargetRange(1,0) - Duel.RegisterEffect(e1,tp) -end -function c43378076.filter(c) - return c:IsPosition(POS_FACEUP_ATTACK) and c:IsAbleToHand() -end -function c43378076.srettg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c43378076.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c43378076.filter,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g=Duel.SelectTarget(tp,c43378076.filter,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c43378076.sretop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - end -end -function c43378076.retreg(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - --to hand - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetDescription(aux.Stringid(43378076,0)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetReset(RESET_EVENT+0x1ee0000+RESET_PHASE+PHASE_END) - e1:SetCondition(c43378076.retcon) - e1:SetTarget(c43378076.rettg) - e1:SetOperation(c43378076.retop) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - c:RegisterEffect(e2) -end -function c43378076.retcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsHasEffect(EFFECT_SPIRIT_DONOT_RETURN) then return false end - if e:IsHasType(EFFECT_TYPE_TRIGGER_F) then - return not c:IsHasEffect(EFFECT_SPIRIT_MAYNOT_RETURN) - else return c:IsHasEffect(EFFECT_SPIRIT_MAYNOT_RETURN) end -end -function c43378076.rettg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0) -end -function c43378076.retop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - Duel.SendtoHand(c,nil,REASON_EFFECT) - end -end diff --git a/script/c43383478.lua b/script/c43383478.lua deleted file mode 100644 index 3b7b801dc6..0000000000 --- a/script/c43383478.lua +++ /dev/null @@ -1,69 +0,0 @@ ---RUM-ラプターズ・フォース -function c43383478.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetHintTiming(TIMING_DESTROY) - e1:SetCondition(c43383478.condition) - e1:SetTarget(c43383478.target) - e1:SetOperation(c43383478.activate) - c:RegisterEffect(e1) - if not c43383478.globle_check then - c43383478.globle_check=true - local ge1=Effect.CreateEffect(c) - ge1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - ge1:SetCode(EVENT_TO_GRAVE) - ge1:SetOperation(c43383478.checkop) - Duel.RegisterEffect(ge1,0) - end -end -function c43383478.checkop(e,tp,eg,ep,ev,re,r,rp) - local tc=eg:GetFirst() - local p1=false - local p2=false - while tc do - if tc:IsSetCard(0xba) and tc:IsType(TYPE_XYZ) and tc:IsReason(REASON_DESTROY) then - if tc:GetPreviousControler()==0 then p1=true else p2=true end - end - tc=eg:GetNext() - end - if p1 then Duel.RegisterFlagEffect(0,43383478,RESET_PHASE+PHASE_END,0,1) end - if p2 then Duel.RegisterFlagEffect(1,43383478,RESET_PHASE+PHASE_END,0,1) end -end -function c43383478.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetFlagEffect(tp,43383478)~=0 -end -function c43383478.filter1(c,e,tp) - return c:IsSetCard(0xba) and c:IsType(TYPE_XYZ) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) - and Duel.IsExistingMatchingCard(c43383478.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,c,c:GetRank()+1) -end -function c43383478.filter2(c,e,tp,mc,rk) - return c:GetRank()==rk and c:IsSetCard(0xba) and mc:IsCanBeXyzMaterial(c) - and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) -end -function c43383478.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c43383478.filter1(chkc,e,tp) end - if chk==0 then return Duel.IsPlayerCanSpecialSummonCount(tp,2) - and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c43383478.filter1,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c43383478.filter1,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function c43383478.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local tc=Duel.GetFirstTarget() - if not tc:IsRelateToEffect(e) or tc:IsImmuneToEffect(e) then return end - if Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)==0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c43383478.filter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc,tc:GetRank()+1) - local sc=g:GetFirst() - if sc then - Duel.Overlay(sc,Group.FromCards(tc)) - Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP) - sc:CompleteProcedure() - end -end diff --git a/script/c43385557.lua b/script/c43385557.lua deleted file mode 100644 index 26ac103ad2..0000000000 --- a/script/c43385557.lua +++ /dev/null @@ -1,36 +0,0 @@ ---マジカル・アンドロイド -function c43385557.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1) - c:EnableReviveLimit() - --recover - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(43385557,0)) - e1:SetCategory(CATEGORY_RECOVER) - e1:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_FIELD) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetRange(LOCATION_MZONE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCountLimit(1) - e1:SetCondition(c43385557.reccon) - e1:SetTarget(c43385557.rectg) - e1:SetOperation(c43385557.recop) - c:RegisterEffect(e1) -end -function c43385557.reccon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c43385557.filter(c) - return c:IsFaceup() and c:IsRace(RACE_PSYCHO) -end -function c43385557.rectg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local ct=Duel.GetMatchingGroupCount(c43385557.filter,tp,LOCATION_MZONE,0,nil) - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(ct*600) - Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,ct*600) -end -function c43385557.recop(e,tp,eg,ep,ev,re,r,rp) - local ct=Duel.GetMatchingGroupCount(c43385557.filter,tp,LOCATION_MZONE,0,nil) - Duel.Recover(tp,ct*600,REASON_EFFECT) -end diff --git a/script/c43405287.lua b/script/c43405287.lua deleted file mode 100644 index 78b0004225..0000000000 --- a/script/c43405287.lua +++ /dev/null @@ -1,84 +0,0 @@ ---D-チェーン -function c43405287.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCondition(c43405287.condition) - e1:SetTarget(c43405287.target) - e1:SetOperation(c43405287.operation) - c:RegisterEffect(e1) -end -function c43405287.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end -function c43405287.filter(c) - return c:IsFaceup() and c:IsSetCard(0xc008) -end -function c43405287.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c43405287.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c43405287.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local g=Duel.SelectTarget(tp,c43405287.filter,tp,LOCATION_MZONE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c43405287.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsLocation(LOCATION_SZONE) then return end - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,c,tc) - c:CancelToGrave() - --draw - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(43405287,0)) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetRange(LOCATION_SZONE) - e1:SetCondition(c43405287.damcon) - e1:SetTarget(c43405287.damtg) - e1:SetOperation(c43405287.damop) - e1:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e1) - --Atkup - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(500) - e2:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e2) - --Equip limit - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_EQUIP_LIMIT) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e3:SetValue(c43405287.eqlimit) - e3:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e3) - end -end -function c43405287.eqlimit(e,c) - return c:GetControler()==e:GetOwnerPlayer() and c:IsSetCard(0xc008) -end -function c43405287.damfilter(c,rc) - return c:IsLocation(LOCATION_GRAVE) and c:IsReason(REASON_BATTLE) and c:GetReasonCard()==rc -end -function c43405287.damcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c43405287.damfilter,1,nil,e:GetHandler():GetEquipTarget()) -end -function c43405287.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(500) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,500) -end -function c43405287.damop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c43417563.lua b/script/c43417563.lua deleted file mode 100644 index 92fba6a7f1..0000000000 --- a/script/c43417563.lua +++ /dev/null @@ -1,4 +0,0 @@ ---踊りによる誘発 -function c43417563.initial_effect(c) - aux.AddRitualProcGreater(c,aux.FilterBoolFunction(Card.IsCode,4849037)) -end diff --git a/script/c43422537.lua b/script/c43422537.lua deleted file mode 100644 index db880b6efa..0000000000 --- a/script/c43422537.lua +++ /dev/null @@ -1,19 +0,0 @@ ---二重召喚 -function c43422537.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetOperation(c43422537.activate) - c:RegisterEffect(e1) -end -function c43422537.activate(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SET_SUMMON_COUNT_LIMIT) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetTargetRange(1,0) - e1:SetValue(2) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) -end diff --git a/script/c43426903.lua b/script/c43426903.lua deleted file mode 100644 index 45ef79a8cf..0000000000 --- a/script/c43426903.lua +++ /dev/null @@ -1,30 +0,0 @@ ---レプティレス・ゴルゴーン -function c43426903.initial_effect(c) - --atk change - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(43426903,0)) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_BATTLED) - e1:SetCondition(c43426903.condition) - e1:SetOperation(c43426903.operation) - c:RegisterEffect(e1) -end -function c43426903.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler()==Duel.GetAttacker() and Duel.GetAttackTarget() -end -function c43426903.operation(e,tp,eg,ep,ev,re,r,rp) - local d=Duel.GetAttackTarget() - if not d:IsRelateToBattle() then return end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetValue(0) - e1:SetReset(RESET_EVENT+0x1fe0000) - d:RegisterEffect(e1) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_CANNOT_CHANGE_POSITION) - e2:SetReset(RESET_EVENT+0x1fe0000) - d:RegisterEffect(e2) -end diff --git a/script/c43434803.lua b/script/c43434803.lua deleted file mode 100644 index c962178859..0000000000 --- a/script/c43434803.lua +++ /dev/null @@ -1,46 +0,0 @@ ---浅すぎた墓穴 -function c43434803.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c43434803.target) - e1:SetOperation(c43434803.operation) - c:RegisterEffect(e1) -end -function c43434803.filter(c,e,tp) - return c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENCE) -end -function c43434803.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - if chk==0 then - return Duel.IsExistingTarget(c43434803.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) - and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c43434803.filter,1-tp,LOCATION_GRAVE,0,1,nil,e,1-tp) - and Duel.GetLocationCount(1-tp,LOCATION_MZONE,1-tp)>0 - end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=Duel.SelectTarget(tp,c43434803.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_SPSUMMON) - local og=Duel.SelectTarget(1-tp,c43434803.filter,1-tp,LOCATION_GRAVE,0,1,1,nil,e,1-tp) - local sc=sg:GetFirst() - local oc=og:GetFirst() - local g=Group.FromCards(sc,oc) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,2,PLAYER_ALL,g:GetFirst():GetOwner()) - e:SetLabelObject(sc) -end -function c43434803.operation(e,tp,eg,ep,ev,re,r,rp) - local sc=e:GetLabelObject() - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local oc=g:GetFirst() - if oc==sc then oc=g:GetNext() end - if sc:IsRelateToEffect(e) then - Duel.SpecialSummonStep(sc,0,tp,tp,false,false,POS_FACEDOWN_DEFENCE) - end - if oc:IsRelateToEffect(e) then - Duel.SpecialSummonStep(oc,0,1-tp,1-tp,false,false,POS_FACEDOWN_DEFENCE) - end - Duel.SpecialSummonComplete() -end diff --git a/script/c43436049.lua b/script/c43436049.lua deleted file mode 100644 index c381404961..0000000000 --- a/script/c43436049.lua +++ /dev/null @@ -1,59 +0,0 @@ ---ジャンク・ブレイカー -function c43436049.initial_effect(c) - --disable - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetOperation(c43436049.sumsuc) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(43436049,0)) - e2:SetCategory(CATEGORY_DISABLE) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCondition(c43436049.condition) - e2:SetCost(c43436049.cost) - e2:SetTarget(c43436049.target) - e2:SetOperation(c43436049.operation) - c:RegisterEffect(e2) -end -function c43436049.sumsuc(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():RegisterFlagEffect(43436049,RESET_EVENT+0x1ec0000+RESET_PHASE+PHASE_END,0,1) -end -function c43436049.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetFlagEffect(43436049)>0 -end -function c43436049.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end -function c43436049.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(aux.disfilter1,tp,LOCATION_MZONE,LOCATION_MZONE,1,e:GetHandler()) end - local g=Duel.GetMatchingGroup(aux.disfilter1,tp,LOCATION_MZONE,LOCATION_MZONE,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,g:GetCount(),0,0) -end -function c43436049.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(aux.disfilter1,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - local tc=g:GetFirst() - while tc do - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - tc:RegisterEffect(e2) - if tc:IsType(TYPE_TRAPMONSTER) then - local e3=Effect.CreateEffect(e:GetHandler()) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_DISABLE_TRAPMONSTER) - e3:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - tc:RegisterEffect(e3) - end - tc=g:GetNext() - end -end diff --git a/script/c43452193.lua b/script/c43452193.lua deleted file mode 100644 index ae3592e16b..0000000000 --- a/script/c43452193.lua +++ /dev/null @@ -1,34 +0,0 @@ ---異次元トンネル-ミラーゲート- -function c43452193.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_CONTROL) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetCondition(c43452193.condition) - e1:SetTarget(c43452193.target) - e1:SetOperation(c43452193.activate) - c:RegisterEffect(e1) -end -function c43452193.condition(e,tp,eg,ep,ev,re,r,rp) - local at=Duel.GetAttackTarget() - return Duel.GetTurnPlayer()~=tp and at and at:IsFaceup() and at:IsSetCard(0x3008) -end -function c43452193.target(e,tp,eg,ep,ev,re,r,rp,chk) - local a=Duel.GetAttacker() - local at=Duel.GetAttackTarget() - if chk==0 then return a:IsOnField() and a:IsAbleToChangeControler() - and at:IsOnField() and at:IsAbleToChangeControler() end - local g=Group.FromCards(a,at) - Duel.SetTargetCard(g) - Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,2,0,0) -end -function c43452193.activate(e,tp,eg,ep,ev,re,r,rp) - local a=Duel.GetAttacker() - local at=Duel.GetAttackTarget() - if a:IsRelateToEffect(e) and a:IsAttackable() and at:IsRelateToEffect(e) then - if Duel.SwapControl(a,at,RESET_PHASE+PHASE_END,1) then - Duel.CalculateDamage(a,at) - end - end -end diff --git a/script/c43455065.lua b/script/c43455065.lua deleted file mode 100644 index f031e40984..0000000000 --- a/script/c43455065.lua +++ /dev/null @@ -1,70 +0,0 @@ ---魔力の泉 -function c43455065.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCountLimit(1,43455065+EFFECT_COUNT_CODE_OATH) - e1:SetTarget(c43455065.target) - e1:SetOperation(c43455065.activate) - c:RegisterEffect(e1) -end -function c43455065.filter(c) - return c:IsFaceup() and c:IsType(TYPE_SPELL+TYPE_TRAP) -end -function c43455065.target(e,tp,eg,ep,ev,re,r,rp,chk) - local ct=Duel.GetMatchingGroupCount(c43455065.filter,tp,0,LOCATION_ONFIELD,nil) - if chk==0 then return ct>0 and Duel.IsPlayerCanDraw(tp,ct) end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(ct) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,ct) -end -function c43455065.activate(e,tp,eg,ep,ev,re,r,rp) - local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) - local ct=Duel.GetMatchingGroupCount(c43455065.filter,tp,0,LOCATION_ONFIELD,nil) - if Duel.Draw(p,ct,REASON_EFFECT)~=0 then - ct=Duel.GetMatchingGroupCount(c43455065.filter,tp,LOCATION_ONFIELD,0,nil) - if ct>0 then - Duel.BreakEffect() - Duel.DiscardHand(tp,nil,ct,ct,REASON_EFFECT+REASON_DISCARD) - end - end - local rct=1 - if Duel.GetTurnPlayer()~=tp then rct=2 end - local c=e:GetHandler() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - e1:SetTargetRange(0,LOCATION_ONFIELD) - e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE) - e1:SetTarget(c43455065.indtg) - e1:SetValue(1) - e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN,rct) - Duel.RegisterEffect(e1,tp) - local e2=e1:Clone() - e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e2:SetTargetRange(0,LOCATION_MZONE) - Duel.RegisterEffect(e2,tp) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_CANNOT_INACTIVATE) - e2:SetValue(c43455065.efilter) - e2:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN,rct) - Duel.RegisterEffect(e2,tp) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetCode(EFFECT_CANNOT_DISEFFECT) - e3:SetValue(c43455065.efilter) - e3:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN,rct) - Duel.RegisterEffect(e3,tp) -end -function c43455065.indtg(e,c) - return c:IsLocation(LOCATION_SZONE) or (c:IsFaceup() and c:IsType(TYPE_SPELL+TYPE_TRAP)) -end -function c43455065.efilter(e,ct) - local te,tp=Duel.GetChainInfo(ct,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER) - local tc=te:GetHandler() - return tp~=e:GetHandlerPlayer() and tc:IsType(TYPE_SPELL+TYPE_TRAP) -end diff --git a/script/c43476205.lua b/script/c43476205.lua deleted file mode 100644 index 7f96da6da5..0000000000 --- a/script/c43476205.lua +++ /dev/null @@ -1,72 +0,0 @@ ---RUM-レヴォリューション・フォース -function c43476205.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c43476205.target) - e1:SetOperation(c43476205.activate) - c:RegisterEffect(e1) -end -function c43476205.filter1(c,e,tp) - local rk=c:GetRank() - return rk>0 and c:IsFaceup() and c:IsSetCard(0xba) - and Duel.IsExistingMatchingCard(c43476205.filter3,tp,LOCATION_EXTRA,0,1,nil,e,tp,c,rk+1) -end -function c43476205.filter2(c,e,tp) - local rk=c:GetRank() - return rk>0 and c:IsFaceup() and c:GetOverlayCount()==0 and c:IsControlerCanBeChanged() - and Duel.IsExistingMatchingCard(c43476205.filter3,tp,LOCATION_EXTRA,0,1,nil,e,tp,c,rk+1) -end -function c43476205.filter3(c,e,tp,mc,rk) - return c:GetRank()==rk and c:IsSetCard(0xba) and mc:IsCanBeXyzMaterial(c) - and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) -end -function c43476205.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if Duel.GetTurnPlayer()==tp then - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c43476205.filter1(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsExistingTarget(c43476205.filter1,tp,LOCATION_MZONE,0,1,nil,e,tp) end - e:SetCategory(CATEGORY_SPECIAL_SUMMON) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - Duel.SelectTarget(tp,c43476205.filter1,tp,LOCATION_MZONE,0,1,1,nil,e,tp) - else - if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and c43476205.filter2(chkc,e,tp) end - if chk==0 then return Duel.IsExistingTarget(c43476205.filter2,tp,0,LOCATION_MZONE,1,nil,e,tp) end - e:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_CONTROL) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - local g=Duel.SelectTarget(tp,c43476205.filter2,tp,0,LOCATION_MZONE,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0) - end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function c43476205.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if Duel.GetTurnPlayer()~=tp then - if not tc:IsRelateToEffect(e) or not tc:IsFaceup() then return end - if not Duel.GetControl(tc,tp) then - if not tc:IsImmuneToEffect(e) and tc:IsAbleToChangeControler() then - Duel.Destroy(tc,REASON_EFFECT) - end - return - end - Duel.BreakEffect() - end - if Duel.GetLocationCount(tp,LOCATION_MZONE)<0 then return end - if tc:IsFacedown() or not tc:IsRelateToEffect(e) or tc:IsControler(1-tp) or tc:IsImmuneToEffect(e) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c43476205.filter3,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc,tc:GetRank()+1) - local sc=g:GetFirst() - if sc then - local mg=tc:GetOverlayGroup() - if mg:GetCount()~=0 then - Duel.Overlay(sc,mg) - end - sc:SetMaterial(Group.FromCards(tc)) - Duel.Overlay(sc,Group.FromCards(tc)) - Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP) - sc:CompleteProcedure() - end -end diff --git a/script/c43487744.lua b/script/c43487744.lua deleted file mode 100644 index 75d4cba9fc..0000000000 --- a/script/c43487744.lua +++ /dev/null @@ -1,28 +0,0 @@ ---ホワイト・ホール -function c43487744.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_CHAINING) - e1:SetCondition(c43487744.condition) - e1:SetOperation(c43487744.activate) - c:RegisterEffect(e1) -end -function c43487744.condition(e,tp,eg,ep,ev,re,r,rp) - return rp~=tp and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:GetHandler():IsCode(53129443) -end -function c43487744.activate(e,tp,eg,ep,ev,re,r,rp) - local cid=Duel.GetChainInfo(ev,CHAININFO_CHAIN_ID) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE) - e1:SetValue(c43487744.indval) - e1:SetReset(RESET_CHAIN) - e1:SetLabel(cid) - Duel.RegisterEffect(e1,tp) -end -function c43487744.indval(e,re,rp) - return Duel.GetChainInfo(0,CHAININFO_CHAIN_ID)==e:GetLabel() -end diff --git a/script/c43509019.lua b/script/c43509019.lua deleted file mode 100644 index 286f08a116..0000000000 --- a/script/c43509019.lua +++ /dev/null @@ -1,36 +0,0 @@ ---トゥーン・ディフェンス -function c43509019.initial_effect(c) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetTarget(c43509019.cbtg) - e1:SetOperation(c43509019.cbop) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --change battle target - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(43509019,0)) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_ATTACK_ANNOUNCE) - e2:SetRange(LOCATION_SZONE) - e2:SetLabel(1) - e2:SetCondition(c43509019.cbcon) - e2:SetOperation(c43509019.cbop) - c:RegisterEffect(e2) -end -function c43509019.cbtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local bt=Duel.GetAttackTarget() - if Duel.CheckEvent(EVENT_ATTACK_ANNOUNCE) and bt and bt:IsFaceup() and bt:IsLevelBelow(4) and bt:IsType(TYPE_TOON) - and bt:GetControler()==e:GetHandlerPlayer() and Duel.SelectYesNo(tp,94) then - e:SetLabel(1) - else e:SetLabel(0) end -end -function c43509019.cbcon(e,tp,eg,ep,ev,re,r,rp) - local bt=Duel.GetAttackTarget() - return bt and bt:IsFaceup() and bt:IsLevelBelow(4) and bt:IsType(TYPE_TOON) and bt:GetControler()==e:GetHandlerPlayer() -end -function c43509019.cbop(e,tp,eg,ep,ev,re,r,rp) - if e:GetLabel()==1 then - Duel.ChangeAttackTarget(nil) - end -end diff --git a/script/c43513897.lua b/script/c43513897.lua deleted file mode 100644 index 2b8f00a452..0000000000 --- a/script/c43513897.lua +++ /dev/null @@ -1,31 +0,0 @@ ---セイクリッド・アクベス -function c43513897.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(43513897,0)) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetOperation(c43513897.atkop) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e2) -end -function c43513897.filter(c) - return c:IsFaceup() and c:IsSetCard(0x53) -end -function c43513897.atkop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c43513897.filter,tp,LOCATION_MZONE,0,nil) - local tc=g:GetFirst() - while tc do - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(500) - tc:RegisterEffect(e1) - tc=g:GetNext() - end -end diff --git a/script/c43530283.lua b/script/c43530283.lua deleted file mode 100644 index 2b05ae3179..0000000000 --- a/script/c43530283.lua +++ /dev/null @@ -1,42 +0,0 @@ ---勇気の砂時計 -function c43530283.initial_effect(c) - --atkup - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(43530283,0)) - e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetOperation(c43530283.adop) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - c:RegisterEffect(e2) -end -function c43530283.adop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFaceup() and c:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_BASE_ATTACK) - e1:SetValue(c43530283.val) - e1:SetLabel(1100) - e1:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_SET_BASE_DEFENCE) - e2:SetLabel(1200) - c:RegisterEffect(e2) - if Duel.GetTurnPlayer()==tp then - c:RegisterFlagEffect(43530283,RESET_EVENT+0x1ff0000+RESET_PHASE+PHASE_END+RESET_SELF_TURN,0,2) - else - c:RegisterFlagEffect(43530283,RESET_EVENT+0x1ff0000+RESET_PHASE+PHASE_END+RESET_SELF_TURN,0,1) - end - end -end -function c43530283.val(e,c) - if c:GetFlagEffect(43530283)==0 then - return e:GetLabel()*2 - else - return e:GetLabel()/2 - end -end diff --git a/script/c43543777.lua b/script/c43543777.lua deleted file mode 100644 index d0f47cbd43..0000000000 --- a/script/c43543777.lua +++ /dev/null @@ -1,92 +0,0 @@ ---伊弉波 -function c43543777.initial_effect(c) - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(aux.FALSE) - c:RegisterEffect(e1) - --summon,flip - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(43543777,0)) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetCode(EVENT_SUMMON_SUCCESS) - e2:SetOperation(c43543777.retreg) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EVENT_FLIP) - c:RegisterEffect(e3) - --salvage - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(43543777,1)) - e4:SetCategory(CATEGORY_TOHAND) - e4:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e4:SetCode(EVENT_SUMMON_SUCCESS) - e4:SetCost(c43543777.thcost) - e4:SetTarget(c43543777.thtg) - e4:SetOperation(c43543777.thop) - c:RegisterEffect(e4) - local e5=e4:Clone() - e5:SetCode(EVENT_FLIP) - c:RegisterEffect(e5) -end -function c43543777.filter(c) - return c:IsType(TYPE_SPIRIT) and c:IsAbleToHand() -end -function c43543777.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) -end -function c43543777.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:GetControler()==tp and chkc:GetLocation()==LOCATION_GRAVE and c43543777.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c43543777.filter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c43543777.filter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c43543777.thop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end -function c43543777.retreg(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - --to hand - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetDescription(aux.Stringid(43543777,0)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetReset(RESET_EVENT+0x1ee0000+RESET_PHASE+PHASE_END) - e1:SetCondition(c43543777.retcon) - e1:SetTarget(c43543777.rettg) - e1:SetOperation(c43543777.retop) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - c:RegisterEffect(e2) -end -function c43543777.retcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsHasEffect(EFFECT_SPIRIT_DONOT_RETURN) then return false end - if e:IsHasType(EFFECT_TYPE_TRIGGER_F) then - return not c:IsHasEffect(EFFECT_SPIRIT_MAYNOT_RETURN) - else return c:IsHasEffect(EFFECT_SPIRIT_MAYNOT_RETURN) end -end -function c43543777.rettg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0) -end -function c43543777.retop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - Duel.SendtoHand(c,nil,REASON_EFFECT) - end -end diff --git a/script/c4357063.lua b/script/c4357063.lua deleted file mode 100644 index eb43dba0d5..0000000000 --- a/script/c4357063.lua +++ /dev/null @@ -1,46 +0,0 @@ ---先史遺産都市バビロン -function c4357063.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(4357063,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_SZONE) - e2:SetCountLimit(1) - e2:SetTarget(c4357063.sptg) - e2:SetOperation(c4357063.spop) - c:RegisterEffect(e2) -end -function c4357063.costfilter(c,e,tp) - return c:IsSetCard(0x70) and c:IsAbleToRemoveAsCost() and c:GetLevel()>0 - and Duel.IsExistingTarget(c4357063.spfilter,tp,LOCATION_GRAVE,0,1,c,e,tp,c:GetLevel()) -end -function c4357063.spfilter(c,e,tp,lv) - return c:IsSetCard(0x70) and c:GetLevel()==lv and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c4357063.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c4357063.spfilter(chkc,e,tp,e:GetLabel()) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c4357063.costfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c4357063.costfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - local lv=g:GetFirst():GetLevel() - Duel.Remove(g,POS_FACEUP,REASON_COST) - e:SetLabel(lv) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c4357063.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp,lv) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c4357063.spop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c43573231.lua b/script/c43573231.lua deleted file mode 100644 index a64f06d105..0000000000 --- a/script/c43573231.lua +++ /dev/null @@ -1,41 +0,0 @@ ---幻蝶の刺客モルフォ -function c43573231.initial_effect(c) - --atk,def - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(43573231,0)) - e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_FIELD) - e1:SetCode(EVENT_CHANGE_POS) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetTarget(c43573231.adtg) - e1:SetOperation(c43573231.adop) - c:RegisterEffect(e1) -end -function c43573231.cfilter(c,e,tp) - local np=c:GetPosition() - local pp=c:GetPreviousPosition() - return c:IsControler(tp) and ((pp==0x1 and np==0x4) or (pp==0x4 and np==0x1) or (pp==0x8 and np==0x1)) and c:IsCanBeEffectTarget(e) -end -function c43573231.adtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return eg:IsContains(chkc) and c43573231.cfilter(chkc,e,1-tp) end - if chk==0 then return eg:IsExists(c43573231.cfilter,1,nil,e,1-tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - local g=eg:FilterSelect(tp,c43573231.cfilter,1,1,nil,e,1-tp) - Duel.SetTargetCard(g) -end -function c43573231.adop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(-1000) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_UPDATE_DEFENCE) - tc:RegisterEffect(e2) - end -end diff --git a/script/c43577607.lua b/script/c43577607.lua deleted file mode 100644 index 832dc06628..0000000000 --- a/script/c43577607.lua +++ /dev/null @@ -1,101 +0,0 @@ ---竜星の気脈 -function c43577607.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --atkup - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(LOCATION_MZONE,0) - e2:SetTarget(c43577607.atktg) - e2:SetValue(500) - e2:SetCondition(c43577607.effcon) - e2:SetLabel(2) - c:RegisterEffect(e2) - --replace - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e3:SetCode(EFFECT_DESTROY_REPLACE) - e3:SetRange(LOCATION_SZONE) - e3:SetCountLimit(1) - e3:SetTarget(c43577607.reptg) - e3:SetValue(c43577607.repval) - e3:SetOperation(c43577607.repop) - e3:SetCondition(c43577607.effcon) - e3:SetLabel(3) - c:RegisterEffect(e3) - --cannot mset - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_FIELD) - e4:SetCode(EFFECT_CANNOT_MSET) - e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e4:SetRange(LOCATION_SZONE) - e4:SetTargetRange(0,1) - e4:SetCondition(c43577607.effcon) - e4:SetLabel(4) - c:RegisterEffect(e4) - --poschange - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_FIELD) - e5:SetCode(EFFECT_SET_POSITION) - e5:SetRange(LOCATION_SZONE) - e5:SetTargetRange(0,LOCATION_MZONE) - e5:SetValue(POS_FACEUP_ATTACK) - e5:SetCondition(c43577607.effcon) - e5:SetLabel(4) - c:RegisterEffect(e5) - --destroy - local e6=Effect.CreateEffect(c) - e6:SetDescription(aux.Stringid(43577607,0)) - e6:SetCategory(CATEGORY_DESTROY) - e6:SetType(EFFECT_TYPE_IGNITION) - e6:SetRange(LOCATION_SZONE) - e6:SetCondition(c43577607.effcon) - e6:SetCost(c43577607.descost) - e6:SetTarget(c43577607.destg) - e6:SetOperation(c43577607.desop) - e6:SetLabel(5) - c:RegisterEffect(e6) -end -function c43577607.confilter(c) - return c:IsSetCard(0x9e) and c:IsType(TYPE_MONSTER) -end -function c43577607.effcon(e) - local g=Duel.GetMatchingGroup(c43577607.confilter,e:GetHandlerPlayer(),LOCATION_GRAVE,0,nil) - return g:GetClassCount(Card.GetAttribute)>=e:GetLabel() -end -function c43577607.atktg(e,c) - return c:IsSetCard(0x9e) -end -function c43577607.repfilter(c,tp) - return c:IsFaceup() and c:IsSetCard(0x9e) and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) -end -function c43577607.reptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return eg:IsExists(c43577607.repfilter,1,nil,tp) end - return Duel.SelectYesNo(tp,aux.Stringid(43577607,1)) -end -function c43577607.repval(e,c) - return c43577607.repfilter(c,e:GetHandlerPlayer()) -end -function c43577607.repop(e,tp,eg,ep,ev,re,r,rp) - Duel.SendtoGrave(e:GetHandler(),REASON_EFFECT) -end -function c43577607.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end -function c43577607.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end - local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c43577607.desop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) - if g:GetCount()>0 then - Duel.Destroy(g,REASON_EFFECT) - end -end diff --git a/script/c43580269.lua b/script/c43580269.lua deleted file mode 100644 index 7348f6eaaa..0000000000 --- a/script/c43580269.lua +++ /dev/null @@ -1,28 +0,0 @@ ---エメス・ザ・インフィニティ -function c43580269.initial_effect(c) - --atkup - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(43580269,0)) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_BATTLE_DESTROYING) - e1:SetCondition(c43580269.atcon) - e1:SetOperation(c43580269.atop) - c:RegisterEffect(e1) -end -function c43580269.atcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local bc=c:GetBattleTarget() - return c:IsRelateToBattle() and bc:IsLocation(LOCATION_GRAVE) and bc:IsReason(REASON_BATTLE) -end -function c43580269.atop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(700) - e1:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e1) - end -end diff --git a/script/c43586926.lua b/script/c43586926.lua deleted file mode 100644 index 84632394f8..0000000000 --- a/script/c43586926.lua +++ /dev/null @@ -1,44 +0,0 @@ ---ドル・ドラ -function c43586926.initial_effect(c) - --to grave - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetOperation(c43586926.regop) - c:RegisterEffect(e1) -end -function c43586926.regop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsReason(REASON_DESTROY) and bit.band(c:GetPreviousLocation(),LOCATION_ONFIELD)~=0 then - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(43586926,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetRange(LOCATION_GRAVE) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetCountLimit(1,43586926+EFFECT_COUNT_CODE_DUEL) - e1:SetTarget(c43586926.sptg) - e1:SetOperation(c43586926.spop) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - c:RegisterEffect(e1) - end -end -function c43586926.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c43586926.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK) - e1:SetValue(1000) - e1:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_SET_DEFENCE) - c:RegisterEffect(e2) - end -end diff --git a/script/c43641473.lua b/script/c43641473.lua deleted file mode 100644 index 6f0229da66..0000000000 --- a/script/c43641473.lua +++ /dev/null @@ -1,42 +0,0 @@ ---移り気な仕立屋 -function c43641473.initial_effect(c) - --effect - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetHintTiming(0,TIMING_EQUIP) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c43641473.target) - e1:SetOperation(c43641473.operation) - c:RegisterEffect(e1) -end -function c43641473.tcfilter(tc,ec) - return tc:IsFaceup() and ec:CheckEquipTarget(tc) -end -function c43641473.ecfilter(c) - return c:IsType(TYPE_EQUIP) and c:GetEquipTarget()~=nil and Duel.IsExistingTarget(c43641473.tcfilter,0,LOCATION_MZONE,LOCATION_MZONE,1,c:GetEquipTarget(),c) -end -function c43641473.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_SZONE) and c43641473.ecfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c43641473.ecfilter,tp,LOCATION_SZONE,LOCATION_SZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(43641473,0)) - local g=Duel.SelectTarget(tp,c43641473.ecfilter,tp,LOCATION_SZONE,LOCATION_SZONE,1,1,nil) - local ec=g:GetFirst() - e:SetLabelObject(ec) - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(43641473,1)) - local tc=Duel.SelectTarget(tp,c43641473.tcfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,ec:GetEquipTarget(),ec) -end -function c43641473.operation(e,tp,eg,ep,ev,re,r,rp) - local ec=e:GetLabelObject() - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local tc=g:GetFirst() - if tc==ec then tc=g:GetNext() end - if ec:IsFaceup() and ec:IsRelateToEffect(e) then - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - Duel.Equip(tp,ec,tc) - else - Duel.SendtoGrave(ec,REASON_EFFECT) - end - end -end diff --git a/script/c43642620.lua b/script/c43642620.lua deleted file mode 100644 index ad18cd3c7c..0000000000 --- a/script/c43642620.lua +++ /dev/null @@ -1,39 +0,0 @@ ---マンモス・ゾンビ -function c43642620.initial_effect(c) - --self destroy - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_SELF_DESTROY) - e1:SetCondition(c43642620.sdcon) - c:RegisterEffect(e1) - --damage - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(43642620,0)) - e2:SetCategory(CATEGORY_DAMAGE) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_LEAVE_FIELD) - e2:SetCondition(c43642620.dmcon) - e2:SetTarget(c43642620.dmtg) - e2:SetOperation(c43642620.dmop) - c:RegisterEffect(e2) -end -function c43642620.sdcon(e) - return not Duel.IsExistingMatchingCard(Card.IsRace,e:GetHandlerPlayer(),LOCATION_GRAVE,0,1,nil,RACE_ZOMBIE) -end -function c43642620.dmcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsReason(REASON_DESTROY) and c:IsPreviousPosition(POS_FACEUP) -end -function c43642620.dmtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local c=e:GetHandler() - Duel.SetTargetPlayer(c:GetPreviousControler()) - Duel.SetTargetParam(1900) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,c:GetPreviousControler(),1900) -end -function c43642620.dmop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c43644025.lua b/script/c43644025.lua deleted file mode 100644 index e0737783a1..0000000000 --- a/script/c43644025.lua +++ /dev/null @@ -1,57 +0,0 @@ ---コクーン・リボーン -function c43644025.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(43644025,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_SZONE) - e2:SetCost(c43644025.cost) - e2:SetTarget(c43644025.target) - e2:SetOperation(c43644025.activate) - c:RegisterEffect(e2) -end -c43644025.list={[42682609]=17955766,[43751755]=43237273,[17363041]=54959865, - [29246354]=17732278,[16241441]=89621922,[42239546]=80344569} -function c43644025.filter1(c,e,tp) - if c:IsFacedown() then return false end - local code=c:GetCode() - local tcode=c43644025.list[code] - return tcode and Duel.IsExistingTarget(c43644025.filter2,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil,tcode,e,tp) -end -function c43644025.filter2(c,tcode,e,tp) - return c:IsCode(tcode) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) -end -function c43644025.cost(e,tp,eg,ep,ev,re,r,rp,chk) - e:SetLabel(1) - return true -end -function c43644025.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - if chk==0 then - local res=e:GetLabel()==1 - e:SetLabel(0) - return res and Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.CheckReleaseGroup(tp,c43644025.filter1,1,nil,e,tp) end - e:SetLabel(0) - local rg=Duel.SelectReleaseGroup(tp,c43644025.filter1,1,1,nil,e,tp) - local code=rg:GetFirst():GetCode() - local tcode=c43644025.list[code] - Duel.Release(rg,REASON_COST) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c43644025.filter2,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil,tcode,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c43644025.activate(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c43658697.lua b/script/c43658697.lua deleted file mode 100644 index 732c6c60a3..0000000000 --- a/script/c43658697.lua +++ /dev/null @@ -1,51 +0,0 @@ ---U.A.フラッグシップ・ディール -function c43658697.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,43658697+EFFECT_COUNT_CODE_OATH) - e1:SetTarget(c43658697.target) - e1:SetOperation(c43658697.activate) - c:RegisterEffect(e1) -end -function c43658697.filter(c,e,tp) - return c:IsSetCard(0xb2) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c43658697.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c43658697.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c43658697.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c43658697.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - local tc=g:GetFirst() - if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e2) - local e3=Effect.CreateEffect(e:GetHandler()) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL) - e3:SetReset(RESET_EVENT+0x1fe0000) - e3:SetValue(1) - tc:RegisterEffect(e3) - local e4=e3:Clone() - e4:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL) - tc:RegisterEffect(e4) - Duel.SpecialSummonComplete() - Duel.BreakEffect() - local lp=Duel.GetLP(tp) - Duel.SetLP(tp,lp-tc:GetLevel()*300) - end -end diff --git a/script/c43661068.lua b/script/c43661068.lua deleted file mode 100644 index a1f7623a16..0000000000 --- a/script/c43661068.lua +++ /dev/null @@ -1,41 +0,0 @@ ---星に願いを -function c43661068.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c43661068.target) - e1:SetOperation(c43661068.activate) - c:RegisterEffect(e1) -end -function c43661068.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c43661068.tfilter(chkc,tp) end - if chk==0 then return Duel.IsExistingTarget(c43661068.tfilter,tp,LOCATION_MZONE,0,1,nil,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c43661068.tfilter,tp,LOCATION_MZONE,0,1,1,nil,tp) -end -function c43661068.filter(c,atk,def) - return c:IsFaceup() and c:GetLevel()>0 and (c:GetAttack()==atk or c:GetDefence()==def) -end -function c43661068.tfilter(c,tp) - return c:IsFaceup() and c:GetLevel()>0 - and Duel.IsExistingMatchingCard(c43661068.filter,tp,LOCATION_MZONE,0,1,c,c:GetAttack(),c:GetDefence()) -end -function c43661068.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - local g=Duel.GetMatchingGroup(c43661068.filter,tp,LOCATION_MZONE,0,tc,tc:GetAttack(),tc:GetDefence()) - local lv=tc:GetLevel() - local lc=g:GetFirst() - while lc do - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CHANGE_LEVEL_FINAL) - e1:SetValue(lv) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - lc:RegisterEffect(e1) - lc=g:GetNext() - end - end -end diff --git a/script/c43694075.lua b/script/c43694075.lua deleted file mode 100644 index d957f02770..0000000000 --- a/script/c43694075.lua +++ /dev/null @@ -1,4 +0,0 @@ ---ローの祈り -function c43694075.initial_effect(c) - aux.AddRitualProcGreater(c,aux.FilterBoolFunction(Card.IsCode,3627449)) -end diff --git a/script/c43694481.lua b/script/c43694481.lua deleted file mode 100644 index dfe09f487c..0000000000 --- a/script/c43694481.lua +++ /dev/null @@ -1,33 +0,0 @@ ---ブリザード・ファルコン -function c43694481.initial_effect(c) - --damage - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(43694481,0)) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_NO_TURN_RESET) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c43694481.damcon) - e1:SetCost(c43694481.damcost) - e1:SetTarget(c43694481.damtg) - e1:SetOperation(c43694481.damop) - c:RegisterEffect(e1) -end -function c43694481.damcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetAttack()>e:GetHandler():GetBaseAttack() -end -function c43694481.damcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetFlagEffect(tp,43694481)==0 end - Duel.RegisterFlagEffect(tp,43694481,RESET_PHASE+PHASE_END,0,1) -end -function c43694481.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(1500) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,1500) -end -function c43694481.damop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c43697559.lua b/script/c43697559.lua deleted file mode 100644 index d02b28cefc..0000000000 --- a/script/c43697559.lua +++ /dev/null @@ -1,19 +0,0 @@ ---ジェット・ロイド -function c43697559.initial_effect(c) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EVENT_BE_BATTLE_TARGET) - e1:SetOperation(c43697559.operation) - c:RegisterEffect(e1) -end -function c43697559.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_TRAP_ACT_IN_HAND) - e1:SetTargetRange(LOCATION_HAND,0) - e1:SetReset(RESET_CHAIN) - Duel.RegisterEffect(e1,tp) -end diff --git a/script/c43698897.lua b/script/c43698897.lua deleted file mode 100644 index c823e59de1..0000000000 --- a/script/c43698897.lua +++ /dev/null @@ -1,122 +0,0 @@ ---デストーイ・ファクトリー -function c43698897.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_SZONE) - e2:SetCountLimit(1,43698897) - e2:SetCost(c43698897.spcost) - e2:SetTarget(c43698897.sptg) - e2:SetOperation(c43698897.spop) - c:RegisterEffect(e2) - --tohand - local e3=Effect.CreateEffect(c) - e3:SetCategory(CATEGORY_TOHAND) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_TO_GRAVE) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) - e3:SetCountLimit(1,43698898) - e3:SetTarget(c43698897.thtg) - e3:SetOperation(c43698897.thop) - c:RegisterEffect(e3) -end -function c43698897.spfilter(c) - return c:IsSetCard(0x46) and c:IsType(TYPE_SPELL) and c:IsAbleToRemoveAsCost() -end -function c43698897.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c43698897.spfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c43698897.spfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c43698897.filter1(c,e) - return c:IsCanBeFusionMaterial() and not c:IsImmuneToEffect(e) -end -function c43698897.filter2(c,e,tp,m,f,chkf) - return c:IsType(TYPE_FUSION) and c:IsSetCard(0xad) and (not f or f(c)) - and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf) -end -function c43698897.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp - local mg1=Duel.GetMatchingGroup(Card.IsCanBeFusionMaterial,tp,LOCATION_HAND+LOCATION_MZONE,0,nil) - local res=Duel.IsExistingMatchingCard(c43698897.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf) - if not res then - local ce=Duel.GetChainMaterial(tp) - if ce~=nil then - local fgroup=ce:GetTarget() - local mg2=fgroup(ce,e,tp) - local mf=ce:GetValue() - res=Duel.IsExistingMatchingCard(c43698897.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,chkf) - end - end - return res - end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function c43698897.spop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp - local mg1=Duel.GetMatchingGroup(c43698897.filter1,tp,LOCATION_HAND+LOCATION_MZONE,0,nil,e) - local sg1=Duel.GetMatchingGroup(c43698897.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf) - local mg2=nil - local sg2=nil - local ce=Duel.GetChainMaterial(tp) - if ce~=nil then - local fgroup=ce:GetTarget() - mg2=fgroup(ce,e,tp) - local mf=ce:GetValue() - sg2=Duel.GetMatchingGroup(c43698897.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,mf,chkf) - end - if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then - local sg=sg1:Clone() - if sg2 then sg:Merge(sg2) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local tg=sg:Select(tp,1,1,nil) - local tc=tg:GetFirst() - if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then - local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf) - tc:SetMaterial(mat1) - Duel.SendtoGrave(mat1,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION) - Duel.BreakEffect() - Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP) - else - local mat2=Duel.SelectFusionMaterial(tp,tc,mg2,nil,chkf) - local fop=ce:GetOperation() - fop(ce,e,tp,tc,mat2) - end - tc:CompleteProcedure() - else - local cg1=Duel.GetFieldGroup(tp,LOCATION_HAND+LOCATION_MZONE,0) - local cg2=Duel.GetFieldGroup(tp,LOCATION_EXTRA,0) - if cg1:GetCount()>1 and cg2:IsExists(Card.IsFacedown,1,nil) - and Duel.IsPlayerCanSpecialSummon(tp) and not Duel.IsPlayerAffectedByEffect(tp,27581098) then - Duel.ConfirmCards(1-tp,cg1) - Duel.ConfirmCards(1-tp,cg2) - Duel.ShuffleHand(tp) - end - end -end -function c43698897.thfilter(c) - return c:IsFaceup() and c:IsCode(6077601) and c:IsAbleToHand() -end -function c43698897.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_REMOVED) and c43698897.thfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c43698897.thfilter,tp,LOCATION_REMOVED,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c43698897.thfilter,tp,LOCATION_REMOVED,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c43698897.thop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end diff --git a/script/c43708041.lua b/script/c43708041.lua deleted file mode 100644 index 22bd1d667b..0000000000 --- a/script/c43708041.lua +++ /dev/null @@ -1,50 +0,0 @@ ---陽炎光輪 -function c43708041.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --decrease tribute - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_DECREASE_TRIBUTE) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(LOCATION_HAND,0) - e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x107d)) - e2:SetValue(0x1) - c:RegisterEffect(e2) - --salvage - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(43708041,0)) - e3:SetCategory(CATEGORY_TOHAND) - e3:SetType(EFFECT_TYPE_QUICK_O) - e3:SetCode(EVENT_FREE_CHAIN) - e3:SetRange(LOCATION_SZONE) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetCost(c43708041.thcost) - e3:SetTarget(c43708041.thtg) - e3:SetOperation(c43708041.thop) - c:RegisterEffect(e3) -end -function c43708041.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end -function c43708041.filter(c) - return c:IsSetCard(0x7d) and c:GetCode()~=43708041 and c:IsAbleToHand() -end -function c43708041.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c43708041.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c43708041.filter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c43708041.filter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c43708041.thop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end diff --git a/script/c43708640.lua b/script/c43708640.lua deleted file mode 100644 index e7cf0c76ea..0000000000 --- a/script/c43708640.lua +++ /dev/null @@ -1,41 +0,0 @@ ---ミノケンサテュロス -function c43708640.initial_effect(c) - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(43708640,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCost(c43708640.spcost) - e2:SetTarget(c43708640.sptg) - e2:SetOperation(c43708640.spop) - c:RegisterEffect(e2) -end -function c43708640.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end -function c43708640.filter(c,e,tp) - return c:IsType(TYPE_NORMAL) and c:GetLevel()==4 and c:IsRace(RACE_BEASTWARRIOR) - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c43708640.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c43708640.filter,tp,LOCATION_DECK,0,2,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_DECK) -end -function c43708640.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 then return end - local g=Duel.GetMatchingGroup(c43708640.filter,tp,LOCATION_DECK,0,nil,e,tp) - if g:GetCount()>=2 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=g:Select(tp,2,2,nil) - Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c43711255.lua b/script/c43711255.lua deleted file mode 100644 index 925c881a2a..0000000000 --- a/script/c43711255.lua +++ /dev/null @@ -1,37 +0,0 @@ ---禁止令 -function c43711255.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c43711255.target) - c:RegisterEffect(e1) - --forbidden - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetProperty(EFFECT_FLAG_SET_AVAILABLE) - e2:SetCode(EFFECT_FORBIDDEN) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(0x7f,0x7f) - e2:SetTarget(c43711255.bantg) - e2:SetLabelObject(e1) - c:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetCode(EFFECT_DISABLE) - e3:SetRange(LOCATION_SZONE) - e3:SetTargetRange(0x7f,0x7f) - e3:SetTarget(c43711255.bantg) - e3:SetLabelObject(e1) - c:RegisterEffect(e3) -end -function c43711255.bantg(e,c) - return c:IsCode(e:GetLabelObject():GetLabel()) and (not c:IsOnField() or c:GetRealFieldID()>e:GetFieldID()) -end -function c43711255.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,564) - local ac=Duel.AnnounceCard(tp) - e:SetLabel(ac) - e:GetHandler():SetHint(CHINT_CARD,ac) -end diff --git a/script/c43714890.lua b/script/c43714890.lua deleted file mode 100644 index 77a43a5f98..0000000000 --- a/script/c43714890.lua +++ /dev/null @@ -1,33 +0,0 @@ ---人投げトロール -function c43714890.initial_effect(c) - --damage - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(43714890,0)) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c43714890.cost) - e1:SetTarget(c43714890.target) - e1:SetOperation(c43714890.operation) - c:RegisterEffect(e1) -end -function c43714890.cfilter(c) - local tp=c:GetType() - return bit.band(tp,TYPE_NORMAL)~=0 and bit.band(tp,TYPE_TOKEN)==0 -end -function c43714890.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,c43714890.cfilter,1,nil) end - local sg=Duel.SelectReleaseGroup(tp,c43714890.cfilter,1,1,nil) - Duel.Release(sg,REASON_COST) -end -function c43714890.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(800) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,800) -end -function c43714890.operation(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c43716289.lua b/script/c43716289.lua deleted file mode 100644 index 5fa4fb2456..0000000000 --- a/script/c43716289.lua +++ /dev/null @@ -1,22 +0,0 @@ ---ポイズンマミー -function c43716289.initial_effect(c) - --flip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(43716289,0)) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP) - e1:SetTarget(c43716289.target) - e1:SetOperation(c43716289.operation) - c:RegisterEffect(e1) -end -function c43716289.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(500) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,500) -end -function c43716289.operation(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c43748308.lua b/script/c43748308.lua deleted file mode 100644 index 02e15023be..0000000000 --- a/script/c43748308.lua +++ /dev/null @@ -1,74 +0,0 @@ ---微炎星-リュウシシン -function c43748308.initial_effect(c) - --set - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(43748308,0)) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_CHAIN_SOLVING) - e1:SetProperty(EFFECT_FLAG_DELAY) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCondition(c43748308.setcon) - e1:SetTarget(c43748308.settg) - e1:SetOperation(c43748308.setop) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(43748308,1)) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCost(c43748308.spcost) - e2:SetTarget(c43748308.sptg) - e2:SetOperation(c43748308.spop) - c:RegisterEffect(e2) -end -function c43748308.setcon(e,tp,eg,ep,ev,re,r,rp) - return rp==tp and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL+TYPE_TRAP) - and re:GetHandler():IsSetCard(0x7c) -end -function c43748308.filter(c) - return c:IsSetCard(0x7c) and c:IsType(TYPE_TRAP) and c:IsSSetable() -end -function c43748308.settg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsRelateToEffect(e) and e:GetHandler():IsFaceup() - and not e:GetHandler():IsStatus(STATUS_CHAINING) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingMatchingCard(c43748308.filter,tp,LOCATION_DECK,0,1,nil) end -end -function c43748308.setop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) - local g=Duel.SelectMatchingCard(tp,c43748308.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SSet(tp,g:GetFirst()) - Duel.ConfirmCards(1-tp,g) - end -end -function c43748308.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x7c) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToGraveAsCost() -end -function c43748308.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c43748308.cfilter,tp,LOCATION_ONFIELD,0,2,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c43748308.cfilter,tp,LOCATION_ONFIELD,0,2,2,nil) - Duel.SendtoGrave(g,REASON_COST) -end -function c43748308.spfilter(c,e,tp) - return c:IsSetCard(0x79) and c:GetCode()~=43748308 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c43748308.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c43748308.spfilter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c43748308.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c43748308.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c43748308.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c43751755.lua b/script/c43751755.lua deleted file mode 100644 index 677b3a3639..0000000000 --- a/script/c43751755.lua +++ /dev/null @@ -1,38 +0,0 @@ ---C・パンテール -function c43751755.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(43751755,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c43751755.spcon) - e1:SetCost(c43751755.spcost) - e1:SetTarget(c43751755.sptg) - e1:SetOperation(c43751755.spop) - c:RegisterEffect(e1) -end -function c43751755.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsEnvironment(42015635) -end -function c43751755.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end -function c43751755.spfilter(c,e,tp) - return c:IsCode(43237273) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c43751755.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsExistingMatchingCard(c43751755.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) -end -function c43751755.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - if not Duel.IsEnvironment(42015635) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c43751755.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c4376658.lua b/script/c4376658.lua deleted file mode 100644 index 9b1bca8e20..0000000000 --- a/script/c4376658.lua +++ /dev/null @@ -1,40 +0,0 @@ ---憑依装着-ヒータ -function c4376658.initial_effect(c) - --spsummon proc - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND+LOCATION_DECK) - e1:SetCondition(c4376658.spcon) - e1:SetOperation(c4376658.spop) - c:RegisterEffect(e1) -end -function c4376658.spfilter1(c,tp) - return c:IsFaceup() and c:IsCode(759393) and c:IsAbleToGraveAsCost() - and Duel.IsExistingMatchingCard(c4376658.spfilter2,tp,LOCATION_MZONE,0,1,c) -end -function c4376658.spfilter2(c) - return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_FIRE) and c:IsAbleToGraveAsCost() -end -function c4376658.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.GetLocationCount(tp,LOCATION_MZONE)>-2 - and Duel.IsExistingMatchingCard(c4376658.spfilter1,tp,LOCATION_MZONE,0,1,nil,tp) -end -function c4376658.spop(e,tp,eg,ep,ev,re,r,rp,c) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g1=Duel.SelectMatchingCard(tp,c4376658.spfilter1,tp,LOCATION_MZONE,0,1,1,nil,tp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g2=Duel.SelectMatchingCard(tp,c4376658.spfilter2,tp,LOCATION_MZONE,0,1,1,g1:GetFirst()) - g1:Merge(g2) - Duel.SendtoGrave(g1,REASON_COST) - Duel.ShuffleDeck(tp) - --pierce - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_PIERCE) - e1:SetReset(RESET_EVENT+0xff0000) - c:RegisterEffect(e1) -end diff --git a/script/c43785278.lua b/script/c43785278.lua deleted file mode 100644 index 073254d745..0000000000 --- a/script/c43785278.lua +++ /dev/null @@ -1,43 +0,0 @@ ---フーコーの魔砲石 -function c43785278.initial_effect(c) - --pendulum summon - aux.AddPendulumProcedure(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetOperation(c43785278.regop) - c:RegisterEffect(e1) -end -function c43785278.regop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(43785278,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_PZONE) - e1:SetTarget(c43785278.destg) - e1:SetOperation(c43785278.desop) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - c:RegisterEffect(e1) -end -function c43785278.filter(c) - return c:IsFaceup() and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable() -end -function c43785278.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and c43785278.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c43785278.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c43785278.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c43785278.desop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c43791861.lua b/script/c43791861.lua deleted file mode 100644 index ffa9e7d935..0000000000 --- a/script/c43791861.lua +++ /dev/null @@ -1,14 +0,0 @@ ---鳳王獣ガイルーダ -function c43791861.initial_effect(c) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetCondition(c43791861.condtion) - e1:SetValue(300) - c:RegisterEffect(e1) -end -function c43791861.condtion(e) - local ph=Duel.GetCurrentPhase() - return (ph==PHASE_DAMAGE or ph==PHASE_DAMAGE_CAL) - and Duel.GetAttacker()==e:GetHandler() and Duel.GetAttackTarget()~=nil -end diff --git a/script/c43797906.lua b/script/c43797906.lua deleted file mode 100644 index dd91032b8f..0000000000 --- a/script/c43797906.lua +++ /dev/null @@ -1,32 +0,0 @@ ---アトランティスの戦士 -function c43797906.initial_effect(c) - --search - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(43797906,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND) - e1:SetCost(c43797906.cost) - e1:SetTarget(c43797906.target) - e1:SetOperation(c43797906.operation) - c:RegisterEffect(e1) -end -function c43797906.cost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToGraveAsCost() and c:IsDiscardable() end - Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD) -end -function c43797906.filter(c) - return c:GetOriginalCode()==295517 and c:IsAbleToHand() -end -function c43797906.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chk==0 then return Duel.IsExistingMatchingCard(c43797906.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c43797906.operation(e,tp,eg,ep,ev,re,r,rp,chk) - local tg=Duel.GetFirstMatchingCard(c43797906.filter,tp,LOCATION_DECK,0,nil) - if tg then - Duel.SendtoHand(tg,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tg) - end -end diff --git a/script/c43813459.lua b/script/c43813459.lua deleted file mode 100644 index 79fc5a078f..0000000000 --- a/script/c43813459.lua +++ /dev/null @@ -1,33 +0,0 @@ ---反射光子流 -function c43813459.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_BE_BATTLE_TARGET) - e1:SetCondition(c43813459.condition) - e1:SetTarget(c43813459.target) - e1:SetOperation(c43813459.activate) - c:RegisterEffect(e1) -end -function c43813459.condition(e,tp,eg,ep,ev,re,r,rp) - local a=Duel.GetAttacker() - local d=Duel.GetAttackTarget() - return a:IsOnField() and d and d:IsFaceup() and d:IsControler(tp) and d:IsAttribute(ATTRIBUTE_LIGHT) and d:IsRace(RACE_DRAGON) -end -function c43813459.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.GetAttacker():CreateEffectRelation(e) - Duel.GetAttackTarget():CreateEffectRelation(e) -end -function c43813459.activate(e,tp,eg,ep,ev,re,r,rp) - local a=Duel.GetAttacker() - local d=Duel.GetAttackTarget() - if a:IsFacedown() or not a:IsRelateToEffect(e) or d:IsFacedown() or not d:IsRelateToEffect(e) then return end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(a:GetAttack()) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_DAMAGE) - d:RegisterEffect(e1) -end diff --git a/script/c43841694.lua b/script/c43841694.lua deleted file mode 100644 index 76ef5765f0..0000000000 --- a/script/c43841694.lua +++ /dev/null @@ -1,43 +0,0 @@ ---魔導書の奇跡 -function c43841694.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,43841694+EFFECT_COUNT_CODE_OATH) - e1:SetTarget(c43841694.target) - e1:SetOperation(c43841694.activate) - c:RegisterEffect(e1) -end -function c43841694.filter(c,e,tp) - return c:IsType(TYPE_XYZ) and c:IsRace(RACE_SPELLCASTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c43841694.filter2(c) - return c:IsFaceup() and c:IsSetCard(0x106e) and c:IsType(TYPE_SPELL) -end -function c43841694.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c43841694.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) - and Duel.IsExistingTarget(c43841694.filter2,tp,LOCATION_REMOVED,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g1=Duel.SelectTarget(tp,c43841694.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - e:SetLabelObject(g1:GetFirst()) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - local g2=Duel.SelectTarget(tp,c43841694.filter2,tp,LOCATION_REMOVED,0,1,2,nil) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g1,1,0,0) -end -function c43841694.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local sg=g:Filter(Card.IsRelateToEffect,nil,e) - local tc=e:GetLabelObject() - sg:RemoveCard(tc) - if tc:IsRelateToEffect(e) and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)>0 then - Duel.BreakEffect() - if sg:GetCount()>0 then - Duel.Overlay(tc,sg) - end - end -end diff --git a/script/c43889633.lua b/script/c43889633.lua deleted file mode 100644 index d522e6ba02..0000000000 --- a/script/c43889633.lua +++ /dev/null @@ -1,96 +0,0 @@ ---忘却の海底神殿 -function c43889633.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c43889633.target1) - e1:SetOperation(c43889633.operation) - c:RegisterEffect(e1) - --instant(chain) - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(43889633,1)) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCategory(CATEGORY_REMOVE) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetRange(LOCATION_SZONE) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetTarget(c43889633.target2) - e2:SetOperation(c43889633.operation) - c:RegisterEffect(e2) - --code - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_CHANGE_CODE) - e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e3:SetRange(LOCATION_SZONE) - e3:SetValue(22702055) - c:RegisterEffect(e3) -end -function c43889633.filter(c) - local lv=c:GetLevel() - return c:IsFaceup() and lv>0 and lv<=4 and c:IsRace(RACE_FISH+RACE_SEASERPENT+RACE_AQUA) and c:IsAbleToRemove() -end -function c43889633.target1(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c43889633.filter(chkc) end - if chk==0 then return true end - if Duel.IsExistingTarget(c43889633.filter,tp,LOCATION_MZONE,0,1,nil) - and Duel.SelectYesNo(tp,aux.Stringid(43889633,0)) then - e:SetProperty(EFFECT_FLAG_CARD_TARGET) - e:SetCategory(CATEGORY_REMOVE) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,c43889633.filter,tp,LOCATION_MZONE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) - e:GetHandler():RegisterFlagEffect(43889633,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) - e:SetLabel(1) - else - e:SetProperty(0) - e:SetCategory(0) - e:SetLabel(0) - end -end -function c43889633.operation(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) and Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)~=0 then - tc:RegisterFlagEffect(43889634,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END+RESET_SELF_TURN,0,1) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetDescription(aux.Stringid(43889633,2)) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetRange(LOCATION_SZONE) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetCountLimit(1) - e1:SetLabelObject(tc) - e1:SetCondition(c43889633.spcon) - e1:SetTarget(c43889633.sptg) - e1:SetOperation(c43889633.spop) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END+RESET_SELF_TURN) - e:GetHandler():RegisterEffect(e1) - end -end -function c43889633.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c43889633.filter(chkc) end - if chk==0 then return e:GetHandler():GetFlagEffect(43889633)==0 - and Duel.IsExistingTarget(c43889633.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,c43889633.filter,tp,LOCATION_MZONE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) - e:GetHandler():RegisterFlagEffect(43889633,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) -end -function c43889633.spcon(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetLabelObject() - return tc and tc:GetFlagEffect(43889634)~=0 and Duel.GetTurnPlayer()==tp -end -function c43889633.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local tc=e:GetLabelObject() - Duel.SetTargetCard(tc) - e:SetLabelObject(nil) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,tc,1,0,0) -end -function c43889633.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c43892408.lua b/script/c43892408.lua deleted file mode 100644 index efc1680e57..0000000000 --- a/script/c43892408.lua +++ /dev/null @@ -1,49 +0,0 @@ ---竜騎士ブラック・マジシャン・ガール -function c43892408.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcCodeFun(c,38033121,aux.FilterBoolFunction(Card.IsRace,RACE_DRAGON),1,false,false) - --spsummon condition - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(c43892408.splimit) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(43892408,0)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCost(c43892408.cost) - e2:SetTarget(c43892408.target) - e2:SetOperation(c43892408.activate) - c:RegisterEffect(e2) -end -function c43892408.splimit(e,se,sp,st) - return bit.band(st,SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION or se:GetHandler():IsCode(1784686) -end -function c43892408.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,Card.IsAbleToGraveAsCost,1,1,REASON_COST) -end -function c43892408.filter(c) - return c:IsFaceup() and c:IsDestructable() -end -function c43892408.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and c43892408.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c43892408.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c43892408.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c43892408.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c43906884.lua b/script/c43906884.lua deleted file mode 100644 index 54bd5da200..0000000000 --- a/script/c43906884.lua +++ /dev/null @@ -1,33 +0,0 @@ ---BF-マイン -function c43906884.initial_effect(c) - --draw - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(43906884,0)) - e1:SetCategory(CATEGORY_DRAW) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_PLAYER_TARGET) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCondition(c43906884.con) - e1:SetTarget(c43906884.tg) - e1:SetOperation(c43906884.op) - c:RegisterEffect(e1) -end -function c43906884.filter(c) - return c:IsFaceup() and c:IsSetCard(0x33) -end -function c43906884.con(e,tp,eg,ep,ev,re,r,rp) - return bit.band(r,0x41)==0x41 and rp~=tp - and bit.band(e:GetHandler():GetPreviousLocation(),LOCATION_ONFIELD)~=0 - and bit.band(e:GetHandler():GetPreviousPosition(),POS_FACEDOWN)~=0 - and Duel.IsExistingMatchingCard(c43906884.filter,tp,LOCATION_MZONE,0,1,nil) -end -function c43906884.tg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,1000) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c43906884.op(e,tp,eg,ep,ev,re,r,rp) - if not Duel.IsExistingMatchingCard(c43906884.filter,tp,LOCATION_MZONE,0,1,nil) then return end - Duel.Damage(1-tp,1000,REASON_EFFECT) - Duel.Draw(tp,1,REASON_EFFECT) -end diff --git a/script/c43912676.lua b/script/c43912676.lua deleted file mode 100644 index 2ee7a64564..0000000000 --- a/script/c43912676.lua +++ /dev/null @@ -1,55 +0,0 @@ ---異層空間 -function c43912676.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --boost - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e2:SetTarget(aux.TargetBoolFunction(Card.IsRace,RACE_WYRM)) - e2:SetValue(300) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EFFECT_UPDATE_DEFENCE) - c:RegisterEffect(e3) - --destroy - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(43912676,0)) - e4:SetCategory(CATEGORY_DESTROY) - e4:SetType(EFFECT_TYPE_IGNITION) - e4:SetProperty(EFFECT_FLAG_CARD_TARGET) - e4:SetRange(LOCATION_SZONE) - e4:SetCountLimit(1) - e4:SetCost(c43912676.cost) - e4:SetTarget(c43912676.target) - e4:SetOperation(c43912676.operation) - c:RegisterEffect(e4) -end -function c43912676.cfilter(c) - return c:IsRace(RACE_WYRM) and c:IsAbleToRemoveAsCost() -end -function c43912676.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c43912676.cfilter,tp,LOCATION_GRAVE,0,3,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c43912676.cfilter,tp,LOCATION_GRAVE,0,3,3,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c43912676.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsDestructable() end - if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c43912676.operation(e,tp,eg,ep,ev,re,r,rp,chk) - if not e:GetHandler():IsRelateToEffect(e) then return end - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c43925870.lua b/script/c43925870.lua deleted file mode 100644 index f5e57a98b5..0000000000 --- a/script/c43925870.lua +++ /dev/null @@ -1,49 +0,0 @@ ---ウィンドファーム・ジェネクス -function c43925870.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsCode,68505803),aux.NonTuner(Card.IsAttribute,ATTRIBUTE_WIND),1) - c:EnableReviveLimit() - --atkup - local e1=Effect.CreateEffect(c) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetValue(c43925870.val) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(43925870,0)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCost(c43925870.descost) - e2:SetTarget(c43925870.destg) - e2:SetOperation(c43925870.desop) - c:RegisterEffect(e2) -end -function c43925870.val(e,c) - return Duel.GetMatchingGroupCount(Card.IsFacedown,0,LOCATION_SZONE,LOCATION_SZONE,nil)*300 -end -function c43925870.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - Duel.SendtoGrave(Duel.SelectMatchingCard(tp,Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,1,1,nil),REASON_COST) -end -function c43925870.filter(c) - return c:IsFacedown() and c:IsDestructable() -end -function c43925870.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_SZONE) and c43925870.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c43925870.filter,tp,LOCATION_SZONE,LOCATION_SZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c43925870.filter,tp,LOCATION_SZONE,LOCATION_SZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c43925870.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsFacedown() and tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c43932460.lua b/script/c43932460.lua deleted file mode 100644 index cdcb335153..0000000000 --- a/script/c43932460.lua +++ /dev/null @@ -1,50 +0,0 @@ ---ナチュル・ランドオルス -function c43932460.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,c43932460.synfilter,aux.NonTuner(c43932460.synfilter),1) - c:EnableReviveLimit() - --negate - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(43932460,0)) - e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetRange(LOCATION_MZONE) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) - e1:SetCode(EVENT_CHAINING) - e1:SetCondition(c43932460.discon) - e1:SetCost(c43932460.discost) - e1:SetTarget(c43932460.distg) - e1:SetOperation(c43932460.disop) - c:RegisterEffect(e1) -end -function c43932460.synfilter(c) - return c:IsAttribute(ATTRIBUTE_EARTH) -end -function c43932460.discon(e,tp,eg,ep,ev,re,r,rp) - return e~=re and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) - and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainNegatable(ev) -end -function c43932460.cfilter(c) - return c:IsType(TYPE_SPELL) and c:IsAbleToGraveAsCost() -end -function c43932460.discost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c43932460.cfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c43932460.cfilter,tp,LOCATION_HAND,0,1,1,nil) - Duel.SendtoGrave(g,REASON_COST) -end -function c43932460.distg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) - end -end -function c43932460.disop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsFaceup() or not c:IsRelateToEffect(e) then return end - Duel.NegateActivation(ev) - if re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(eg,REASON_EFFECT) - end -end diff --git a/script/c43973174.lua b/script/c43973174.lua deleted file mode 100644 index 05b1234c2b..0000000000 --- a/script/c43973174.lua +++ /dev/null @@ -1,37 +0,0 @@ ---ドラゴンを呼ぶ笛 -function c43973174.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c43973174.condition) - e1:SetTarget(c43973174.target) - e1:SetOperation(c43973174.activate) - c:RegisterEffect(e1) -end -function c43973174.cfilter(c) - return c:IsFaceup() and c:IsCode(17985575) -end -function c43973174.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c43973174.cfilter,tp,LOCATION_MZONE,0,1,nil) -end -function c43973174.filter(c,e,tp) - return c:IsRace(RACE_DRAGON) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c43973174.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c43973174.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c43973174.activate(e,tp,eg,ep,ev,re,r,rp) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ft<=0 then return end - if ft>2 then ft=2 end - if not Duel.IsExistingMatchingCard(c43973174.cfilter,tp,LOCATION_MZONE,0,1,nil) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c43973174.filter,tp,LOCATION_HAND,0,1,ft,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c44028461.lua b/script/c44028461.lua deleted file mode 100644 index 9af617a667..0000000000 --- a/script/c44028461.lua +++ /dev/null @@ -1,49 +0,0 @@ ---ブラック・バック -function c44028461.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c44028461.condition) - e1:SetCost(c44028461.cost) - e1:SetTarget(c44028461.target) - e1:SetOperation(c44028461.activate) - c:RegisterEffect(e1) -end -function c44028461.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c44028461.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_NORMALSUMMON)==0 end - --oath effects - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) - e1:SetCode(EFFECT_CANNOT_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) - e1:SetTargetRange(1,0) - Duel.RegisterEffect(e1,tp) - local e2=e1:Clone() - e2:SetCode(EFFECT_CANNOT_MSET) - Duel.RegisterEffect(e2,tp) -end -function c44028461.filter(c,e,tp) - return c:IsAttackBelow(2000) and c:IsSetCard(0x33) and c:IsType(TYPE_MONSTER) - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c44028461.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:GetControler()==tp and chkc:GetLocation()==LOCATION_GRAVE and c44028461.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c44028461.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c44028461.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c44028461.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c44035031.lua b/script/c44035031.lua deleted file mode 100644 index d7a615b85b..0000000000 --- a/script/c44035031.lua +++ /dev/null @@ -1,65 +0,0 @@ ---グラヴィティ・ウォリアー -function c44035031.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1) - c:EnableReviveLimit() - --atkup - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(44035031,0)) - e1:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_SINGLE) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(c44035031.atkcon) - e1:SetOperation(c44035031.atkop) - c:RegisterEffect(e1) - --pos - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(44035031,1)) - e2:SetCategory(CATEGORY_POSITION) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetCountLimit(1) - e2:SetRange(LOCATION_MZONE) - e2:SetCondition(c44035031.poscon) - e2:SetTarget(c44035031.postg) - e2:SetOperation(c44035031.posop) - c:RegisterEffect(e2) -end -function c44035031.atkcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_SYNCHRO -end -function c44035031.atkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsFaceup() or not c:IsRelateToEffect(e) then return end - local ct=Duel.GetMatchingGroupCount(Card.IsFaceup,tp,0,LOCATION_MZONE,nil) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(ct*300) - e1:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e1) -end -function c44035031.poscon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp and Duel.GetCurrentPhase()==PHASE_BATTLE -end -function c44035031.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsDefencePos() end - if chk==0 then return Duel.IsExistingTarget(Card.IsDefencePos,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE) - local g=Duel.SelectTarget(tp,Card.IsDefencePos,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_POSITION,g,g:GetCount(),0,0) -end -function c44035031.posop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.ChangePosition(tc,POS_FACEUP_ATTACK) - if tc:IsFaceup() then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_MUST_ATTACK) - e1:SetReset(RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - end - end -end diff --git a/script/c4404099.lua b/script/c4404099.lua deleted file mode 100644 index ab7e2926c4..0000000000 --- a/script/c4404099.lua +++ /dev/null @@ -1,52 +0,0 @@ ---海底に潜む深海竜 -function c4404099.initial_effect(c) - --add counter - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(4404099,0)) - e1:SetCategory(CATEGORY_COUNTER) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) - e1:SetTarget(c4404099.addct) - e1:SetOperation(c4404099.addc) - c:RegisterEffect(e1) - --attackup - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(4404099,1)) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_LEAVE_FIELD) - e2:SetCondition(c4404099.atkcon) - e2:SetOperation(c4404099.atkop) - c:RegisterEffect(e2) -end -function c4404099.addct(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,1,0,0x23) -end -function c4404099.addc(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - e:GetHandler():AddCounter(0x23,1) - end -end -function c4404099.atkcon(e,tp,eg,ep,ev,re,r,rp) - local ct=e:GetHandler():GetCounter(0x23) - e:SetLabel(ct) - return ct>0 and not e:GetHandler():IsLocation(LOCATION_DECK) -end -function c4404099.filter(c) - return c:IsFaceup() and c:IsRace(RACE_FISH+RACE_SEASERPENT) -end -function c4404099.atkop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c4404099.filter,tp,LOCATION_MZONE,0,nil) - local tc=g:GetFirst() - while tc do - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(e:GetLabel()*200) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - tc=g:GetNext() - end -end diff --git a/script/c44046281.lua b/script/c44046281.lua deleted file mode 100644 index 81ef3b0eb8..0000000000 --- a/script/c44046281.lua +++ /dev/null @@ -1,80 +0,0 @@ ---ディメンション・ゲート -function c44046281.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_REMOVE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c44046281.target) - e1:SetOperation(c44046281.operation) - c:RegisterEffect(e1) - --send to grave - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(44046281,0)) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_ATTACK_ANNOUNCE) - e2:SetRange(LOCATION_SZONE) - e2:SetCondition(c44046281.tgcon) - e2:SetTarget(c44046281.tgtg) - e2:SetOperation(c44046281.tgop) - c:RegisterEffect(e2) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(44046281,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_LEAVE_FIELD) - e2:SetCondition(c44046281.spcon) - e2:SetTarget(c44046281.sptg) - e2:SetOperation(c44046281.spop) - c:RegisterEffect(e2) -end -function c44046281.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:IsAbleToRemove() end - if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,LOCATION_MZONE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) -end -function c44046281.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)>0 then - c:SetCardTarget(tc) - end -end -function c44046281.tgcon(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp and Duel.GetAttackTarget()==nil -end -function c44046281.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,e:GetHandler(),1,0,0) -end -function c44046281.tgop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - Duel.SendtoGrave(e:GetHandler(),REASON_EFFECT) - end -end -function c44046281.spcon(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetHandler():GetFirstCardTarget() - if tc and e:GetHandler():IsLocation(LOCATION_GRAVE) then - e:SetLabelObject(tc) - return true - end - return false -end -function c44046281.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - local tc=e:GetLabelObject() - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and tc and tc:IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetTargetCard(tc) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,tc,1,0,0) -end -function c44046281.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c440556.lua b/script/c440556.lua deleted file mode 100644 index 7f481147f8..0000000000 --- a/script/c440556.lua +++ /dev/null @@ -1,49 +0,0 @@ ---バハムート・シャーク -function c440556.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_WATER),4,2) - c:EnableReviveLimit() - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(440556,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCost(c440556.spcost) - e1:SetTarget(c440556.sptg) - e1:SetOperation(c440556.spop) - c:RegisterEffect(e1) -end -function c440556.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c440556.filter(c,e,tp) - return c:IsRankBelow(3) and c:IsAttribute(ATTRIBUTE_WATER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,tp) -end -function c440556.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c440556.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function c440556.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local c=e:GetHandler() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c440556.filter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - c:RegisterEffect(e1) - else - local cg=Duel.GetFieldGroup(tp,LOCATION_EXTRA,0) - if cg and cg:GetCount()>0 then - Duel.ConfirmCards(1-tp,cg) - end - end -end diff --git a/script/c44072894.lua b/script/c44072894.lua deleted file mode 100644 index 9a658cb672..0000000000 --- a/script/c44072894.lua +++ /dev/null @@ -1,35 +0,0 @@ ---物資調達員 -function c44072894.initial_effect(c) - --flip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(44072894,0)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP) - e1:SetTarget(c44072894.target) - e1:SetOperation(c44072894.operation) - c:RegisterEffect(e1) -end -function c44072894.filter(c,e) - return c:IsReason(REASON_FUSION) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() and c:IsCanBeEffectTarget(e) -end -function c44072894.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c44072894.filter(chkc,e) end - if chk==0 then return true end - local g=Duel.GetMatchingGroup(c44072894.filter,tp,LOCATION_GRAVE,0,nil,e) - if g:GetCount()>=2 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local sg=g:Select(tp,2,2,nil) - Duel.SetTargetCard(sg) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,sg,2,0,0) - end -end -function c44072894.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - if not g then return end - g=g:Filter(Card.IsRelateToEffect,nil,e) - if g:GetCount()==2 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c44095762.lua b/script/c44095762.lua deleted file mode 100644 index 3544f6050c..0000000000 --- a/script/c44095762.lua +++ /dev/null @@ -1,29 +0,0 @@ ---聖なるバリア-ミラーフォース- -function c44095762.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetCondition(c44095762.condition) - e1:SetTarget(c44095762.target) - e1:SetOperation(c44095762.activate) - c:RegisterEffect(e1) -end -function c44095762.condition(e,tp,eg,ep,ev,re,r,rp) - return tp~=Duel.GetTurnPlayer() -end -function c44095762.filter(c) - return c:IsAttackPos() and c:IsDestructable() -end -function c44095762.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c44095762.filter,tp,0,LOCATION_MZONE,1,nil) end - local g=Duel.GetMatchingGroup(c44095762.filter,tp,0,LOCATION_MZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c44095762.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c44095762.filter,tp,0,LOCATION_MZONE,nil) - if g:GetCount()>0 then - Duel.Destroy(g,REASON_EFFECT) - end -end diff --git a/script/c44125452.lua b/script/c44125452.lua deleted file mode 100644 index 744bae26eb..0000000000 --- a/script/c44125452.lua +++ /dev/null @@ -1,28 +0,0 @@ ---薔薇の妖精 -function c44125452.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(44125452,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DELAY) - e1:SetCode(EVENT_TO_HAND) - e1:SetCondition(c44125452.condition) - e1:SetTarget(c44125452.target) - e1:SetOperation(c44125452.operation) - c:RegisterEffect(e1) -end -function c44125452.condition(e,tp,eg,ep,ev,re,r,rp) - return bit.band(r,REASON_EFFECT)~=0 and e:GetHandler():IsPreviousLocation(LOCATION_DECK) -end -function c44125452.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c44125452.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c44155002.lua b/script/c44155002.lua deleted file mode 100644 index f556ea481e..0000000000 --- a/script/c44155002.lua +++ /dev/null @@ -1,21 +0,0 @@ ---魔轟神獣ユニコール -function c44155002.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0x35),aux.NonTuner(nil),1) - c:EnableReviveLimit() - --disable and destroy - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EVENT_CHAIN_ACTIVATING) - e1:SetOperation(c44155002.disop) - c:RegisterEffect(e1) -end -function c44155002.disop(e,tp,eg,ep,ev,re,r,rp) - if ep==tp or Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)~=Duel.GetFieldGroupCount(tp,0,LOCATION_HAND) then return end - local rc=re:GetHandler() - Duel.NegateEffect(ev) - if rc:IsRelateToEffect(re) then - Duel.Destroy(rc,REASON_EFFECT) - end -end diff --git a/script/c4417407.lua b/script/c4417407.lua deleted file mode 100644 index 044fb4aad4..0000000000 --- a/script/c4417407.lua +++ /dev/null @@ -1,90 +0,0 @@ ---幻獣機ブラックファルコン -function c4417407.initial_effect(c) - --level - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_UPDATE_LEVEL) - e1:SetValue(c4417407.lvval) - c:RegisterEffect(e1) - -- - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e2:SetCondition(c4417407.indcon) - e2:SetValue(1) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - c:RegisterEffect(e3) - --token - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(4417407,0)) - e4:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e4:SetCode(EVENT_ATTACK_ANNOUNCE) - e4:SetTarget(c4417407.sptg) - e4:SetOperation(c4417407.spop) - c:RegisterEffect(e4) - --pos - local e5=Effect.CreateEffect(c) - e5:SetDescription(aux.Stringid(4417407,1)) - e5:SetCategory(CATEGORY_POSITION) - e5:SetType(EFFECT_TYPE_QUICK_O) - e5:SetRange(LOCATION_MZONE) - e5:SetCode(EVENT_FREE_CHAIN) - e5:SetProperty(EFFECT_FLAG_CARD_TARGET) - e5:SetHintTiming(TIMING_BATTLE_PHASE) - e5:SetCountLimit(1) - e5:SetCost(c4417407.poscost) - e5:SetTarget(c4417407.postg) - e5:SetOperation(c4417407.posop) - c:RegisterEffect(e5) -end -function c4417407.lvval(e,c) - local tp=c:GetControler() - local lv=0 - for i=0,4 do - local tc=Duel.GetFieldCard(tp,LOCATION_MZONE,i) - if tc and tc:IsCode(31533705) then lv=lv+tc:GetLevel() end - end - return lv -end -function c4417407.indcon(e) - return Duel.IsExistingMatchingCard(Card.IsType,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil,TYPE_TOKEN) -end -function c4417407.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0) -end -function c4417407.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - if Duel.IsPlayerCanSpecialSummonMonster(tp,31533705,0x101b,0x4011,0,0,3,RACE_MACHINE,ATTRIBUTE_WIND) then - local token=Duel.CreateToken(tp,4417408) - Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP) - end -end -function c4417407.poscost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsType,1,nil,TYPE_TOKEN) end - local g=Duel.SelectReleaseGroup(tp,Card.IsType,1,1,nil,TYPE_TOKEN) - Duel.Release(g,REASON_COST) -end -function c4417407.filter(c) - return not c:IsPosition(POS_FACEUP_DEFENCE) -end -function c4417407.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and c4417407.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c4417407.filter,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE) - Duel.SelectTarget(tp,c4417407.filter,tp,0,LOCATION_MZONE,1,1,nil) -end -function c4417407.posop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and not tc:IsPosition(POS_FACEUP_DEFENCE) then - Duel.ChangePosition(tc,POS_FACEUP_DEFENCE) - end -end diff --git a/script/c44178886.lua b/script/c44178886.lua deleted file mode 100644 index d1485d2e63..0000000000 --- a/script/c44178886.lua +++ /dev/null @@ -1,45 +0,0 @@ ---ライトロード・モンク エイリン -function c44178886.initial_effect(c) - --to deck - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(44178886,0)) - e1:SetCategory(CATEGORY_TODECK) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_BATTLE_CONFIRM) - e1:SetTarget(c44178886.targ) - e1:SetOperation(c44178886.op) - c:RegisterEffect(e1) - --discard deck - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetCategory(CATEGORY_DECKDES) - e2:SetDescription(aux.Stringid(44178886,1)) - e2:SetCode(EVENT_PHASE+PHASE_END) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCondition(c44178886.discon) - e2:SetTarget(c44178886.distg) - e2:SetOperation(c44178886.disop) - c:RegisterEffect(e2) -end -function c44178886.targ(e,tp,eg,ep,ev,re,r,rp,chk) - local t=Duel.GetAttackTarget() - if chk ==0 then return Duel.GetAttacker()==e:GetHandler() and t~=nil and not t:IsAttackPos() and t:IsAbleToDeck() end - Duel.SetOperationInfo(0,CATEGORY_TODECK,t,1,0,0) -end -function c44178886.op(e,tp,eg,ep,ev,re,r,rp) - local t=Duel.GetAttackTarget() - if t~=nil and t:IsRelateToBattle() and not t:IsAttackPos() then - Duel.SendtoDeck(t,nil,2,REASON_EFFECT) - end -end -function c44178886.discon(e,tp,eg,ep,ev,re,r,rp) - return tp==Duel.GetTurnPlayer() -end -function c44178886.distg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,3) -end -function c44178886.disop(e,tp,eg,ep,ev,re,r,rp) - Duel.DiscardDeck(tp,3,REASON_EFFECT) -end diff --git a/script/c44182827.lua b/script/c44182827.lua deleted file mode 100644 index ba1b9f3ea6..0000000000 --- a/script/c44182827.lua +++ /dev/null @@ -1,20 +0,0 @@ ---輪廻転生 -function c44182827.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --remove - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_RANGE) - e2:SetCode(EFFECT_TO_GRAVE_REDIRECT) - e2:SetRange(LOCATION_SZONE) - e2:SetTarget(c44182827.rmtarget) - e2:SetValue(LOCATION_DECKSHF) - c:RegisterEffect(e2) -end -function c44182827.rmtarget(e,c) - return c:GetReason()==REASON_RELEASE+REASON_RITUAL+REASON_EFFECT+REASON_MATERIAL -end diff --git a/script/c44186624.lua b/script/c44186624.lua deleted file mode 100644 index a12dd18929..0000000000 --- a/script/c44186624.lua +++ /dev/null @@ -1,83 +0,0 @@ ---DDD制覇王カイゼル -function c44186624.initial_effect(c) - --spsummon success - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DISABLE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(c44186624.effcon) - e1:SetTarget(c44186624.distg) - e1:SetOperation(c44186624.disop) - c:RegisterEffect(e1) - --extra attack - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetCondition(c44186624.effcon) - e2:SetOperation(c44186624.regop) - c:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetCategory(CATEGORY_DESTROY) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetCountLimit(1) - e3:SetRange(LOCATION_MZONE) - e3:SetCondition(c44186624.descon) - e3:SetTarget(c44186624.destg) - e3:SetOperation(c44186624.desop) - c:RegisterEffect(e3) -end -function c44186624.effcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_PENDULUM -end -function c44186624.distg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_ONFIELD,1,nil) end -end -function c44186624.disop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_ONFIELD,nil) - local tc=g:GetFirst() - while tc do - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e2) - tc=g:GetNext() - end -end -function c44186624.regop(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():RegisterFlagEffect(44186624,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) -end -function c44186624.descon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetFlagEffect(44186624)~=0 -end -function c44186624.filter(c) - return c:GetSequence()<5 and c:IsDestructable() -end -function c44186624.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_SZONE) and chkc:IsControler(tp) and c44186624.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c44186624.filter,tp,LOCATION_SZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c44186624.filter,tp,LOCATION_SZONE,0,1,2,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c44186624.desop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) - local ct=Duel.Destroy(g,REASON_EFFECT) - if ct>0 and c:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_EXTRA_ATTACK) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetValue(ct) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - c:RegisterEffect(e1) - end -end diff --git a/script/c44209392.lua b/script/c44209392.lua deleted file mode 100644 index 1d08f55517..0000000000 --- a/script/c44209392.lua +++ /dev/null @@ -1,34 +0,0 @@ ---城壁 -function c44209392.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DEFCHANGE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetCondition(c44209392.condition) - e1:SetTarget(c44209392.target) - e1:SetOperation(c44209392.activate) - c:RegisterEffect(e1) -end -function c44209392.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end -function c44209392.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) -end -function c44209392.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_DEFENCE) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - e1:SetValue(500) - tc:RegisterEffect(e1) - end -end diff --git a/script/c44223284.lua b/script/c44223284.lua deleted file mode 100644 index 62c7240fbc..0000000000 --- a/script/c44223284.lua +++ /dev/null @@ -1,15 +0,0 @@ ---深海王デビルシャーク -function c44223284.initial_effect(c) - --battle indes - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_INDESTRUCTABLE_COUNT) - e1:SetCountLimit(1) - e1:SetValue(c44223284.valcon) - c:RegisterEffect(e1) -end -function c44223284.valcon(e,re,r,rp) - return bit.band(r,REASON_EFFECT)~=0 and not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) -end diff --git a/script/c4423206.lua b/script/c4423206.lua deleted file mode 100644 index 3c0d9780c8..0000000000 --- a/script/c4423206.lua +++ /dev/null @@ -1,49 +0,0 @@ ---M.X-セイバー インヴォーカー -function c4423206.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,3,2) - c:EnableReviveLimit() - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetDescription(aux.Stringid(4423206,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c4423206.cost) - e1:SetTarget(c4423206.sptg) - e1:SetOperation(c4423206.spop) - c:RegisterEffect(e1) -end -function c4423206.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c4423206.spfilter(c,e,tp) - return c:IsRace(RACE_WARRIOR+RACE_BEASTWARRIOR) and c:IsAttribute(ATTRIBUTE_EARTH) - and c:GetLevel()==4 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c4423206.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c4423206.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c4423206.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c4423206.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENCE)~=0 then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetOperation(c4423206.desop) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetCountLimit(1) - g:GetFirst():RegisterEffect(e1,true) - end -end -function c4423206.desop(e,tp,eg,ep,ev,re,r,rp) - Duel.Destroy(e:GetHandler(),REASON_EFFECT) -end diff --git a/script/c44236692.lua b/script/c44236692.lua deleted file mode 100644 index 5d91b46349..0000000000 --- a/script/c44236692.lua +++ /dev/null @@ -1,41 +0,0 @@ ---ネクロ・リンカー -function c44236692.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(44236692,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c44236692.spcost) - e1:SetTarget(c44236692.sptg) - e1:SetOperation(c44236692.spop) - c:RegisterEffect(e1) -end -function c44236692.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end -function c44236692.filter(c,e,tp) - return c:IsSetCard(0x17) and c:IsType(TYPE_TUNER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c44236692.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c44236692.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsExistingTarget(c44236692.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c44236692.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,g:GetCount(),0,0) -end -function c44236692.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)~=0 then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetValue(1) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - end -end diff --git a/script/c44250812.lua b/script/c44250812.lua deleted file mode 100644 index ce9a9eea29..0000000000 --- a/script/c44250812.lua +++ /dev/null @@ -1,19 +0,0 @@ ---ガガガクラーク -function c44250812.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c44250812.spcon) - c:RegisterEffect(e1) -end -function c44250812.filter(c) - return c:IsFaceup() and c:IsSetCard(0x54) and c:GetCode()~=44250812 -end -function c44250812.spcon(e,c) - if c==nil then return true end - return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and - Duel.IsExistingMatchingCard(c44250812.filter,c:GetControler(),LOCATION_MZONE,0,1,nil) -end diff --git a/script/c44256816.lua b/script/c44256816.lua deleted file mode 100644 index c60ef9fd0d..0000000000 --- a/script/c44256816.lua +++ /dev/null @@ -1,52 +0,0 @@ ---独奏の第1楽章 -function c44256816.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,44256816+EFFECT_COUNT_CODE_OATH) - e1:SetCondition(c44256816.condition) - e1:SetCost(c44256816.cost) - e1:SetTarget(c44256816.target) - e1:SetOperation(c44256816.activate) - c:RegisterEffect(e1) - Duel.AddCustomActivityCounter(44256816,ACTIVITY_SPSUMMON,c44256816.counterfilter) -end -function c44256816.counterfilter(c) - return c:IsSetCard(0x9b) -end -function c44256816.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 -end -function c44256816.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetCustomActivityCount(44256816,tp,ACTIVITY_SPSUMMON)==0 end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) - e1:SetTargetRange(1,0) - e1:SetLabelObject(e) - e1:SetTarget(c44256816.splimit) - Duel.RegisterEffect(e1,tp) -end -function c44256816.splimit(e,c,sump,sumtype,sumpos,targetp,se) - return not c:IsSetCard(0x9b) -end -function c44256816.filter(c,e,tp) - return c:IsLevelBelow(4) and c:IsSetCard(0x9b) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c44256816.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c44256816.filter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,LOCATION_DECK+LOCATION_HAND) -end -function c44256816.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c44256816.filter,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c44273680.lua b/script/c44273680.lua deleted file mode 100644 index a8ec52d327..0000000000 --- a/script/c44273680.lua +++ /dev/null @@ -1,37 +0,0 @@ ---光天使ブックス -function c44273680.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(44273680,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCost(c44273680.spcost) - e1:SetTarget(c44273680.sptg) - e1:SetOperation(c44273680.spop) - c:RegisterEffect(e1) -end -function c44273680.cfilter(c) - return c:IsType(TYPE_SPELL) and c:IsAbleToGraveAsCost() -end -function c44273680.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c44273680.cfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,c44273680.cfilter,1,1,REASON_COST) -end -function c44273680.spfilter(c,e,tp) - return c:IsSetCard(0x86) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c44273680.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c44273680.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c44273680.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c44273680.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c44311445.lua b/script/c44311445.lua deleted file mode 100644 index 4a543f8887..0000000000 --- a/script/c44311445.lua +++ /dev/null @@ -1,82 +0,0 @@ ---マドルチェ・プディンセス・ショコ・ア・ラ・モード -function c44311445.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_EARTH),5,2,c44311445.ovfilter,aux.Stringid(44311445,0)) - c:EnableReviveLimit() - --todeck - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TODECK) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetTarget(c44311445.tdtg) - e1:SetOperation(c44311445.tdop) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EVENT_TO_DECK) - e2:SetCondition(c44311445.spcon) - e2:SetCost(c44311445.spcost) - e2:SetTarget(c44311445.sptg) - e2:SetOperation(c44311445.spop) - c:RegisterEffect(e2) -end -function c44311445.ovfilter(c) - return c:IsFaceup() and c:IsRankBelow(4) and c:IsSetCard(0x71) -end -function c44311445.tdfilter(c) - return c:IsSetCard(0x71) and c:IsAbleToDeck() -end -function c44311445.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c44311445.tdfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c44311445.tdfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectTarget(tp,c44311445.tdfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0) -end -function c44311445.tdop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoDeck(tc,nil,2,REASON_EFFECT) - end -end -function c44311445.cfilter(c,tp) - return c:IsSetCard(0x71) and c:IsLocation(LOCATION_DECK) - and c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_GRAVE) -end -function c44311445.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetOverlayGroup():IsExists(Card.IsCode,1,nil,74641045) and eg:IsExists(c44311445.cfilter,1,nil,tp) -end -function c44311445.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:CheckRemoveOverlayCard(tp,1,REASON_COST) and c:GetFlagEffect(44311445)==0 end - c:RemoveOverlayCard(tp,1,1,REASON_COST) - c:RegisterFlagEffect(44311445,RESET_CHAIN,0,1) -end -function c44311445.spfilter(c,e,tp) - return c:IsSetCard(0x71) and (c:IsCanBeSpecialSummoned(e,0,tp,false,false) or c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN)) -end -function c44311445.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c44311445.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c44311445.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c44311445.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - local tc=g:GetFirst() - if tc then - local spos=0 - if tc:IsCanBeSpecialSummoned(e,0,tp,false,false) then spos=spos+POS_FACEUP_ATTACK end - if tc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN) then spos=spos+POS_FACEDOWN_DEFENCE end - Duel.SpecialSummon(tc,0,tp,tp,false,false,spos) - if tc:IsFacedown() then - Duel.ConfirmCards(1-tp,tc) - end - end -end diff --git a/script/c44330098.lua b/script/c44330098.lua deleted file mode 100644 index f2d98f8e8d..0000000000 --- a/script/c44330098.lua +++ /dev/null @@ -1,100 +0,0 @@ ---冥府の使者ゴーズ -function c44330098.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(44330098,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e1:SetRange(LOCATION_HAND) - e1:SetCode(EVENT_DAMAGE) - e1:SetCondition(c44330098.sumcon) - e1:SetTarget(c44330098.sumtg) - e1:SetOperation(c44330098.sumop) - c:RegisterEffect(e1) - --special summon success - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(44330098,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetCondition(c44330098.sumcon2) - e2:SetTarget(c44330098.sumtg2) - e2:SetOperation(c44330098.sumop2) - e2:SetLabelObject(e1) - c:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(44330098,2)) - e3:SetCategory(CATEGORY_DAMAGE) - e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - e3:SetCondition(c44330098.sumcon3) - e3:SetTarget(c44330098.sumtg3) - e3:SetOperation(c44330098.sumop3) - e3:SetLabelObject(e1) - c:RegisterEffect(e3) -end -function c44330098.filter(c) - return not c:IsStatus(STATUS_LEAVE_CONFIRMED) -end -function c44330098.sumcon(e,tp,eg,ep,ev,re,r,rp) - return ep==tp and tp~=rp and not Duel.IsExistingMatchingCard(c44330098.filter,tp,LOCATION_ONFIELD,0,1,nil) -end -function c44330098.sumtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c44330098.sumop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - local sumtype=1 - if bit.band(r,REASON_BATTLE)~=0 then sumtype=2 end - if Duel.SpecialSummon(c,sumtype,tp,tp,false,false,POS_FACEUP)==0 then return end - e:SetLabel(ev) - end -end -function c44330098.sumcon2(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+2 -end -function c44330098.sumtg2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0) - Duel.RegisterFlagEffect(tp,EFFECT_SPSUM_EFFECT_ACTIVATED,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1) -end -function c44330098.sumop2(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local c=e:GetHandler() - local val=e:GetLabelObject():GetLabel() - if not Duel.IsPlayerCanSpecialSummonMonster(tp,44330099,0,0x4011,-2,-2,7,RACE_FAIRY,ATTRIBUTE_LIGHT) then return end - local token=Duel.CreateToken(tp,44330099) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK) - e1:SetValue(val) - e1:SetReset(RESET_EVENT+0xfe0000) - token:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_SET_DEFENCE) - e2:SetValue(val) - e2:SetReset(RESET_EVENT+0xfe0000) - token:RegisterEffect(e2) - Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP) -end -function c44330098.sumcon3(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+1 -end -function c44330098.sumtg3(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local d=e:GetLabelObject():GetLabel() - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(d) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,d) -end -function c44330098.sumop3(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c44341034.lua b/script/c44341034.lua deleted file mode 100644 index d28eed3361..0000000000 --- a/script/c44341034.lua +++ /dev/null @@ -1,41 +0,0 @@ ---ダーク・バグ -function c44341034.initial_effect(c) - --summon success - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(44341034,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c44341034.sumtg) - e1:SetOperation(c44341034.sumop) - c:RegisterEffect(e1) -end -function c44341034.filter(c,e,tp) - return c:GetLevel()==3 and c:IsType(TYPE_TUNER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c44341034.sumtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c44341034.filter(chkc,e,tp) end - if chk==0 then return Duel.IsExistingTarget(c44341034.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) - and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c44341034.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c44341034.sumop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e2) - Duel.SpecialSummonComplete() - end -end diff --git a/script/c44364077.lua b/script/c44364077.lua deleted file mode 100644 index caccbea59f..0000000000 --- a/script/c44364077.lua +++ /dev/null @@ -1,34 +0,0 @@ ---EMヘイタイガー -function c44364077.initial_effect(c) - --search - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(44364077,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_BATTLE_DESTROYING) - e1:SetCountLimit(1,44364077) - e1:SetCondition(c44364077.condition) - e1:SetTarget(c44364077.target) - e1:SetOperation(c44364077.operation) - c:RegisterEffect(e1) -end -function c44364077.condition(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local bc=c:GetBattleTarget() - return c:IsRelateToBattle() and bc:IsLocation(LOCATION_GRAVE) and bc:IsType(TYPE_MONSTER) -end -function c44364077.filter(c) - return c:IsSetCard(0x9f) and c:IsType(TYPE_PENDULUM) and c:IsAbleToHand() -end -function c44364077.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c44364077.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c44364077.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c44364077.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c44364207.lua b/script/c44364207.lua deleted file mode 100644 index 021011f721..0000000000 --- a/script/c44364207.lua +++ /dev/null @@ -1,47 +0,0 @@ ---ジェイドナイト -function c44364207.initial_effect(c) - --indes - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetTarget(c44364207.indestg) - e1:SetValue(c44364207.indesval) - c:RegisterEffect(e1) - --search - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(44364207,0)) - e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_BATTLE_DESTROYED) - e2:SetCondition(c44364207.condition) - e2:SetTarget(c44364207.target) - e2:SetOperation(c44364207.operation) - c:RegisterEffect(e2) -end -function c44364207.indestg(e,c) - return c:IsRace(RACE_MACHINE) and c:IsAttackBelow(1200) -end -function c44364207.indesval(e,re) - return re:GetHandler():IsType(TYPE_TRAP) -end -function c44364207.condition(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsLocation(LOCATION_GRAVE) and c:IsReason(REASON_BATTLE) and c:IsPreviousPosition(POS_FACEUP) -end -function c44364207.filter(c) - return c:IsRace(RACE_MACHINE) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:GetLevel()==4 and c:IsAbleToHand() -end -function c44364207.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chk==0 then return Duel.IsExistingMatchingCard(c44364207.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c44364207.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c44364207.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c44394295.lua b/script/c44394295.lua deleted file mode 100644 index d26cd24b21..0000000000 --- a/script/c44394295.lua +++ /dev/null @@ -1,98 +0,0 @@ ---影依融合 -function c44394295.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,44394295+EFFECT_COUNT_CODE_OATH) - e1:SetTarget(c44394295.target) - e1:SetOperation(c44394295.activate) - c:RegisterEffect(e1) -end -function c44394295.filter0(c) - return c:IsCanBeFusionMaterial() and c:IsAbleToGrave() -end -function c44394295.filter1(c,e) - return c:IsCanBeFusionMaterial() and c:IsAbleToGrave() and not c:IsImmuneToEffect(e) -end -function c44394295.filter2(c,e,tp,m,f,chkf) - return c:IsType(TYPE_FUSION) and c:IsSetCard(0x9d) and (not f or f(c)) - and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf) -end -function c44394295.cfilter(c) - return c:GetSummonLocation()==LOCATION_EXTRA -end -function c44394295.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp - local loc=LOCATION_HAND+LOCATION_MZONE - if Duel.IsExistingMatchingCard(c44394295.cfilter,tp,0,LOCATION_MZONE,1,nil) then - loc=loc+LOCATION_DECK - end - local mg1=Duel.GetMatchingGroup(c44394295.filter0,tp,loc,0,nil) - local res=Duel.IsExistingMatchingCard(c44394295.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf) - if not res then - local ce=Duel.GetChainMaterial(tp) - if ce~=nil then - local fgroup=ce:GetTarget() - local mg2=fgroup(ce,e,tp) - local mf=ce:GetValue() - res=Duel.IsExistingMatchingCard(c44394295.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,chkf) - end - end - return res - end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function c44394295.activate(e,tp,eg,ep,ev,re,r,rp) - local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp - local loc=LOCATION_HAND+LOCATION_MZONE - if Duel.IsExistingMatchingCard(c44394295.cfilter,tp,0,LOCATION_MZONE,1,nil) then - loc=loc+LOCATION_DECK - end - local mg1=Duel.GetMatchingGroup(c44394295.filter1,tp,loc,0,nil,e) - local sg1=Duel.GetMatchingGroup(c44394295.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf) - local mg2=nil - local sg2=nil - local ce=Duel.GetChainMaterial(tp) - if ce~=nil then - local fgroup=ce:GetTarget() - mg2=fgroup(ce,e,tp) - local mf=ce:GetValue() - sg2=Duel.GetMatchingGroup(c44394295.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,mf,chkf) - end - if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then - local sg=sg1:Clone() - if sg2 then sg:Merge(sg2) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local tg=sg:Select(tp,1,1,nil) - local tc=tg:GetFirst() - if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then - local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf) - tc:SetMaterial(mat1) - Duel.SendtoGrave(mat1,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION) - Duel.BreakEffect() - Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP) - else - local mat2=Duel.SelectFusionMaterial(tp,tc,mg2,nil,chkf) - local fop=ce:GetOperation() - fop(ce,e,tp,tc,mat2) - end - tc:CompleteProcedure() - else - local cg1=Duel.GetFieldGroup(tp,LOCATION_HAND+LOCATION_MZONE,0) - local cg2=Duel.GetFieldGroup(tp,LOCATION_DECK,0) - local cg3=Duel.GetFieldGroup(tp,LOCATION_EXTRA,0) - if cg1:GetCount()>1 and cg3:IsExists(Card.IsFacedown,1,nil) and Duel.IsPlayerCanSpecialSummon(tp) - and not Duel.IsPlayerAffectedByEffect(tp,27581098) then - Duel.ConfirmCards(1-tp,cg1) - if bit.band(loc,LOCATION_DECK)==LOCATION_DECK and not Duel.IsPlayerAffectedByEffect(tp,EFFECT_CANNOT_DISCARD_DECK) then - Duel.ConfirmCards(1-tp,cg2) - Duel.ShuffleDeck(tp) - end - Duel.ConfirmCards(1-tp,cg3) - Duel.ShuffleHand(tp) - end - end -end diff --git a/script/c44397496.lua b/script/c44397496.lua deleted file mode 100644 index 3fa3b8335d..0000000000 --- a/script/c44397496.lua +++ /dev/null @@ -1,29 +0,0 @@ ---レッドアイズ・スピリッツ -function c44397496.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c44397496.target) - e1:SetOperation(c44397496.activate) - c:RegisterEffect(e1) -end -function c44397496.filter(c,e,tp) - return c:IsSetCard(0x3b) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c44397496.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c44397496.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c44397496.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c44397496.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c44397496.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c44405066.lua b/script/c44405066.lua deleted file mode 100644 index 7cef0542a1..0000000000 --- a/script/c44405066.lua +++ /dev/null @@ -1,77 +0,0 @@ ---真紅眼の鋼炎竜 -function c44405066.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,7,2) - c:EnableReviveLimit() - --indes - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c44405066.indcon) - e1:SetValue(1) - c:RegisterEffect(e1) - --damage - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_CHAINING) - e2:SetRange(LOCATION_MZONE) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetOperation(c44405066.regop) - c:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e3:SetCode(EVENT_CHAIN_SOLVED) - e3:SetRange(LOCATION_MZONE) - e3:SetCondition(c44405066.damcon) - e3:SetOperation(c44405066.damop) - c:RegisterEffect(e3) - --spsummon - local e4=Effect.CreateEffect(c) - e4:SetCategory(CATEGORY_SPECIAL_SUMMON) - e4:SetType(EFFECT_TYPE_QUICK_O) - e4:SetCode(EVENT_FREE_CHAIN) - e4:SetRange(LOCATION_MZONE) - e4:SetProperty(EFFECT_FLAG_CARD_TARGET) - e4:SetCountLimit(1) - e4:SetCost(c44405066.spcost) - e4:SetTarget(c44405066.sptg) - e4:SetOperation(c44405066.spop) - c:RegisterEffect(e4) -end -function c44405066.indcon(e) - return e:GetHandler():GetOverlayCount()>0 -end -function c44405066.regop(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():RegisterFlagEffect(44405066,RESET_EVENT+0x1fc0000+RESET_CHAIN,0,1) -end -function c44405066.damcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:GetOverlayCount()>0 and ep~=tp and c:GetFlagEffect(44405066)~=0 -end -function c44405066.damop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_CARD,0,44405066) - Duel.Damage(1-tp,500,REASON_EFFECT) -end -function c44405066.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c44405066.spfilter(c,e,tp) - return c:IsSetCard(0x3b) and c:IsType(TYPE_NORMAL) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c44405066.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c44405066.spfilter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c44405066.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c44405066.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c44405066.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c4440873.lua b/script/c4440873.lua deleted file mode 100644 index 6f1d0be62b..0000000000 --- a/script/c4440873.lua +++ /dev/null @@ -1,37 +0,0 @@ ---強烈なはたき落とし -function c4440873.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_HANDES) - e1:SetCode(EVENT_TO_HAND) - e1:SetCondition(c4440873.condition) - e1:SetTarget(c4440873.target) - e1:SetOperation(c4440873.activate) - c:RegisterEffect(e1) -end -function c4440873.cfilter(c,tp) - return c:IsControler(tp) and c:IsPreviousLocation(LOCATION_DECK) -end -function c4440873.condition(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c4440873.cfilter,1,nil,1-tp) -end -function c4440873.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetCard(eg) - Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,1-tp,1) -end -function c4440873.filter(c,e,tp) - return c:IsRelateToEffect(e) and c:IsControler(tp) and c:IsPreviousLocation(LOCATION_DECK) -end -function c4440873.activate(e,tp,eg,ep,ev,re,r,rp) - local sg=eg:Filter(c4440873.filter,nil,e,1-tp) - if sg:GetCount()==0 then - elseif sg:GetCount()==1 then - Duel.SendtoGrave(sg,REASON_EFFECT+REASON_DISCARD) - else - Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_DISCARD) - local dg=sg:Select(1-tp,1,1,nil) - Duel.SendtoGrave(dg,REASON_EFFECT+REASON_DISCARD) - end -end diff --git a/script/c44424095.lua b/script/c44424095.lua deleted file mode 100644 index d3975c9c91..0000000000 --- a/script/c44424095.lua +++ /dev/null @@ -1,40 +0,0 @@ ---D・スピードユニット -function c44424095.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TODECK+CATEGORY_DESTROY+CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c44424095.target) - e1:SetOperation(c44424095.activate) - c:RegisterEffect(e1) -end -function c44424095.filter(c) - return c:IsSetCard(0x26) and c:IsType(TYPE_MONSTER) and c:IsAbleToDeck() -end -function c44424095.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsDestructable() end - if chk==0 then return Duel.IsExistingMatchingCard(c44424095.filter,tp,LOCATION_HAND,0,1,nil) - and Duel.IsExistingTarget(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) - and Duel.IsPlayerCanDraw(tp,1) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local dg=Duel.SelectTarget(tp,Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,dg,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_HAND) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c44424095.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectMatchingCard(tp,c44424095.filter,tp,LOCATION_HAND,0,1,1,nil) - if g:GetCount()==0 then return end - Duel.ConfirmCards(1-tp,g) - Duel.SendtoDeck(g,nil,0,REASON_EFFECT) - Duel.ShuffleDeck(tp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.BreakEffect() - if Duel.Destroy(tc,REASON_EFFECT)==0 then return end - Duel.Draw(tp,1,REASON_EFFECT) - end -end diff --git a/script/c44436472.lua b/script/c44436472.lua deleted file mode 100644 index 1384088d8a..0000000000 --- a/script/c44436472.lua +++ /dev/null @@ -1,12 +0,0 @@ ---ダブルコストン -function c44436472.initial_effect(c) - --double tribute - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DOUBLE_TRIBUTE) - e1:SetValue(c44436472.condition) - c:RegisterEffect(e1) -end -function c44436472.condition(e,c) - return c:IsAttribute(ATTRIBUTE_DARK) -end diff --git a/script/c4446672.lua b/script/c4446672.lua deleted file mode 100644 index 76d843f41f..0000000000 --- a/script/c4446672.lua +++ /dev/null @@ -1,31 +0,0 @@ ---古代の機械爆弾 -function c4446672.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c4446672.target) - e1:SetOperation(c4446672.activate) - c:RegisterEffect(e1) -end -function c4446672.filter(c) - return c:IsFaceup() and c:IsSetCard(0x7) and c:IsDestructable() -end -function c4446672.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c4446672.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c4446672.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c4446672.filter,tp,LOCATION_MZONE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,0) -end -function c4446672.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - if Duel.Destroy(tc,REASON_EFFECT)>0 then - Duel.Damage(1-tp,tc:GetBaseAttack()/2,REASON_EFFECT) - end - end -end diff --git a/script/c44472639.lua b/script/c44472639.lua deleted file mode 100644 index 843844c848..0000000000 --- a/script/c44472639.lua +++ /dev/null @@ -1,28 +0,0 @@ ---ソーラーレイ -function c44472639.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,0x1c1) - e1:SetTarget(c44472639.target) - e1:SetOperation(c44472639.activate) - c:RegisterEffect(e1) -end -function c44472639.filter(c) - return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsFaceup() -end -function c44472639.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c44472639.filter,tp,LOCATION_MZONE,0,1,nil) end - local dam=Duel.GetMatchingGroupCount(c44472639.filter,tp,LOCATION_MZONE,0,nil)*600 - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(dam) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,dam) -end -function c44472639.activate(e,tp,eg,ep,ev,re,r,rp) - local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) - local dam=Duel.GetMatchingGroupCount(c44472639.filter,tp,LOCATION_MZONE,0,nil)*600 - Duel.Damage(p,dam,REASON_EFFECT) -end diff --git a/script/c44481227.lua b/script/c44481227.lua deleted file mode 100644 index a42d7551aa..0000000000 --- a/script/c44481227.lua +++ /dev/null @@ -1,81 +0,0 @@ ---EMラクダウン -function c44481227.initial_effect(c) - --pendulum summon - aux.AddPendulumProcedure(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - -- - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_ATKCHANGE) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_PZONE) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCountLimit(1) - e2:SetCondition(c44481227.condition) - e2:SetTarget(c44481227.target) - e2:SetOperation(c44481227.operation) - c:RegisterEffect(e2) - --atk down - local e3=Effect.CreateEffect(c) - e3:SetCategory(CATEGORY_ATKCHANGE) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_BATTLE_DESTROYED) - e3:SetProperty(EFFECT_FLAG_DELAY) - e3:SetCondition(c44481227.atkcon) - e3:SetOperation(c44481227.atkop) - c:RegisterEffect(e3) -end -function c44481227.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsAbleToEnterBP() -end -function c44481227.filter(c) - return c:IsFaceup() and not c:IsHasEffect(EFFECT_PIERCE) -end -function c44481227.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c44481227.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c44481227.filter,tp,LOCATION_MZONE,0,1,nil) - and Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - Duel.SelectTarget(tp,c44481227.filter,tp,LOCATION_MZONE,0,1,1,nil) -end -function c44481227.operation(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local tc=Duel.GetFirstTarget() - local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil) - if g:GetCount()==0 then return end - local gc=g:GetFirst() - while gc do - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_DEFENCE) - e1:SetValue(-800) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - gc:RegisterEffect(e1) - gc=g:GetNext() - end - if tc:IsRelateToEffect(e) then - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_PIERCE) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - tc:RegisterEffect(e2) - end -end -function c44481227.atkcon(e,tp,eg,ep,ev,re,r,rp) - local rc=e:GetHandler():GetReasonCard() - return rc:IsRelateToBattle() -end -function c44481227.atkop(e,tp,eg,ep,ev,re,r,rp) - local rc=e:GetHandler():GetReasonCard() - if rc:IsRelateToBattle() then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(-800) - e1:SetReset(RESET_EVENT+0x1fe0000) - rc:RegisterEffect(e1) - end -end diff --git a/script/c44487250.lua b/script/c44487250.lua deleted file mode 100644 index 634b0fd1f6..0000000000 --- a/script/c44487250.lua +++ /dev/null @@ -1,33 +0,0 @@ ---エクシーズ・ブロック -function c44487250.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_CHAINING) - e1:SetCondition(c44487250.condition) - e1:SetCost(c44487250.cost) - e1:SetTarget(c44487250.target) - e1:SetOperation(c44487250.activate) - c:RegisterEffect(e1) -end -function c44487250.condition(e,tp,eg,ep,ev,re,r,rp) - return rp~=tp and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainNegatable(ev) -end -function c44487250.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckRemoveOverlayCard(tp,1,0,1,REASON_COST) end - Duel.RemoveOverlayCard(tp,1,0,1,1,REASON_COST) -end -function c44487250.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) - end -end -function c44487250.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateActivation(ev) - if re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(eg,REASON_EFFECT) - end -end diff --git a/script/c44505297.lua b/script/c44505297.lua deleted file mode 100644 index 66b1ecfa64..0000000000 --- a/script/c44505297.lua +++ /dev/null @@ -1,98 +0,0 @@ ---甲虫装機 エクサビートル -function c44505297.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,6,2) - c:EnableReviveLimit() - --equip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(44505297,0)) - e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(c44505297.eqcon) - e1:SetTarget(c44505297.eqtg) - e1:SetOperation(c44505297.eqop) - c:RegisterEffect(e1) - --tograve - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(44505297,1)) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetCountLimit(1) - e2:SetRange(LOCATION_MZONE) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCategory(CATEGORY_TOGRAVE) - e2:SetCost(c44505297.tgcost) - e2:SetTarget(c44505297.tgtg) - e2:SetOperation(c44505297.tgop) - c:RegisterEffect(e2) -end -function c44505297.eqcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_XYZ -end -function c44505297.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsType(TYPE_MONSTER) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingTarget(Card.IsType,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil,TYPE_MONSTER) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local g=Duel.SelectTarget(tp,Card.IsType,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil,TYPE_MONSTER) - Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g,1,0,0) -end -function c44505297.eqop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or c:IsFacedown() - or not c:IsRelateToEffect(e) or not tc:IsRelateToEffect(e) then return end - Duel.Equip(tp,tc,c,false) - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_OWNER_RELATE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(c44505297.eqlimit) - tc:RegisterEffect(e1) - local atk=tc:GetTextAttack()/2 - if atk<0 then atk=0 end - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetReset(RESET_EVENT+0x1fe0000) - e2:SetValue(atk) - tc:RegisterEffect(e2) - local def=tc:GetTextDefence()/2 - if def<0 then def=0 end - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_EQUIP) - e3:SetCode(EFFECT_UPDATE_DEFENCE) - e3:SetReset(RESET_EVENT+0x1fe0000) - e3:SetValue(def) - tc:RegisterEffect(e3) -end -function c44505297.eqlimit(e,c) - return e:GetOwner()==c -end -function c44505297.tgcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c44505297.tgtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_ONFIELD,0,1,nil) - and Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g1=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_ONFIELD,0,1,1,nil) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g2=Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_ONFIELD,1,1,nil) - g1:Merge(g2) - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g1,2,0,0) -end -function c44505297.tgfilter(c,e) - return c:IsFaceup() and c:IsRelateToEffect(e) -end -function c44505297.tgop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local tg=g:Filter(c44505297.tgfilter,nil,e) - if tg:GetCount()>0 then - Duel.SendtoGrave(tg,REASON_EFFECT) - end -end diff --git a/script/c44508094.lua b/script/c44508094.lua deleted file mode 100644 index dd8e2a866b..0000000000 --- a/script/c44508094.lua +++ /dev/null @@ -1,66 +0,0 @@ ---スターダスト・ドラゴン -function c44508094.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1) - c:EnableReviveLimit() - --Negate - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(44508094,0)) - e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_CHAINING) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c44508094.condition) - e1:SetCost(c44508094.cost) - e1:SetTarget(c44508094.target) - e1:SetOperation(c44508094.operation) - c:RegisterEffect(e1) - --Revive - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(44508094,1)) - e2:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_FIELD) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetCode(EVENT_PHASE+PHASE_END) - e2:SetRange(LOCATION_GRAVE) - e2:SetCountLimit(1) - e2:SetTarget(c44508094.sumtg) - e2:SetOperation(c44508094.sumop) - c:RegisterEffect(e2) -end -function c44508094.condition(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) or not Duel.IsChainNegatable(ev) then return false end - if re:IsHasCategory(CATEGORY_NEGATE) - and Duel.GetChainInfo(ev-1,CHAININFO_TRIGGERING_EFFECT):IsHasType(EFFECT_TYPE_ACTIVATE) then return false end - local ex,tg,tc=Duel.GetOperationInfo(ev,CATEGORY_DESTROY) - return ex and tg~=nil and tc+tg:FilterCount(Card.IsOnField,nil)-tg:GetCount()>0 -end -function c44508094.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end -function c44508094.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) - end -end -function c44508094.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateActivation(ev) - if re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(eg,REASON_EFFECT) - end - e:GetHandler():RegisterFlagEffect(44508094,RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END,0,0) -end -function c44508094.sumtg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:GetFlagEffect(44508094)>0 - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0) -end -function c44508094.sumop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c4450854.lua b/script/c4450854.lua deleted file mode 100644 index b7aa979d1a..0000000000 --- a/script/c4450854.lua +++ /dev/null @@ -1,26 +0,0 @@ ---隠されし機殻 -function c4450854.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,4450854+EFFECT_COUNT_CODE_OATH) - e1:SetTarget(c4450854.target) - e1:SetOperation(c4450854.activate) - c:RegisterEffect(e1) -end -function c4450854.filter(c) - return c:IsFaceup() and c:IsSetCard(0xaa) and c:IsType(TYPE_PENDULUM) and c:IsAbleToHand() -end -function c4450854.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c4450854.filter,tp,LOCATION_EXTRA,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_EXTRA) -end -function c4450854.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c4450854.filter,tp,LOCATION_EXTRA,0,1,3,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c44509898.lua b/script/c44509898.lua deleted file mode 100644 index 1e6904448b..0000000000 --- a/script/c44509898.lua +++ /dev/null @@ -1,41 +0,0 @@ ---ピンポイント・ガード -function c44509898.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetCondition(c44509898.condition) - e1:SetTarget(c44509898.target) - e1:SetOperation(c44509898.operation) - c:RegisterEffect(e1) -end -function c44509898.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp -end -function c44509898.filter(c,e,tp) - return c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c44509898.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c44509898.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c44509898.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c44509898.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c44509898.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENCE)~=0 then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e1:SetValue(1) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - tc:RegisterEffect(e2) - end -end diff --git a/script/c44584775.lua b/script/c44584775.lua deleted file mode 100644 index 5671204382..0000000000 --- a/script/c44584775.lua +++ /dev/null @@ -1,42 +0,0 @@ ---ダメージ=レプトル -function c44584775.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(44584775,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_BATTLE_DAMAGE) - e2:SetRange(LOCATION_SZONE) - e2:SetCountLimit(1) - e2:SetCondition(c44584775.condition) - e2:SetTarget(c44584775.target) - e2:SetOperation(c44584775.activate) - c:RegisterEffect(e2) -end -function c44584775.condition(e,tp,eg,ep,ev,re,r,rp) - local a=Duel.GetAttacker() - local d=Duel.GetAttackTarget() - return ep==tp and (a:IsRace(RACE_REPTILE) or (d and d:IsRace(RACE_REPTILE))) -end -function c44584775.filter(c,e,tp,dam) - return c:IsAttackBelow(dam) and c:IsRace(RACE_REPTILE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c44584775.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c44584775.filter,tp,LOCATION_DECK,0,1,nil,e,tp,ev) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c44584775.activate(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c44584775.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp,ev) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c44595286.lua b/script/c44595286.lua deleted file mode 100644 index e7bb392dde..0000000000 --- a/script/c44595286.lua +++ /dev/null @@ -1,48 +0,0 @@ ---裁きの光 -function c44595286.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOGRAVE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetHintTiming(0,TIMING_TOHAND+0x1e0) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c44595286.condition) - e1:SetCost(c44595286.cost) - e1:SetTarget(c44595286.target) - e1:SetOperation(c44595286.activate) - c:RegisterEffect(e1) -end -function c44595286.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsEnvironment(56433456) -end -function c44595286.cfilter(c) - return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsDiscardable() and c:IsAbleToGraveAsCost() -end -function c44595286.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c44595286.cfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,c44595286.cfilter,1,1,REASON_COST+REASON_DISCARD) -end -function c44595286.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD+LOCATION_HAND)>0 end -end -function c44595286.activate(e,tp,eg,ep,ev,re,r,rp) - local g1=Duel.GetFieldGroup(tp,0,LOCATION_ONFIELD) - local g2=Duel.GetFieldGroup(tp,0,LOCATION_HAND) - local opt=0 - if g1:GetCount()>0 and g2:GetCount()>0 then - opt=Duel.SelectOption(tp,aux.Stringid(44595286,0),aux.Stringid(44595286,1))+1 - elseif g1:GetCount()>0 then opt=1 - elseif g2:GetCount()>0 then opt=2 - end - if opt==1 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=g1:Select(tp,1,1,nil) - Duel.SendtoGrave(g,REASON_EFFECT) - elseif opt==2 then - Duel.ConfirmCards(tp,g2) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=g2:Select(tp,1,1,nil) - Duel.SendtoGrave(g,REASON_EFFECT) - Duel.ShuffleHand(1-tp) - end -end diff --git a/script/c44635489.lua b/script/c44635489.lua deleted file mode 100644 index 905ec21a3c..0000000000 --- a/script/c44635489.lua +++ /dev/null @@ -1,62 +0,0 @@ ---セイクリッド・シェアト -function c44635489.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c44635489.spcon) - c:RegisterEffect(e1) - --lv change - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(44635489,0)) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetTarget(c44635489.lvtg) - e2:SetOperation(c44635489.lvop) - c:RegisterEffect(e2) - --xyzlimit - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e3:SetValue(c44635489.xyzlimit) - c:RegisterEffect(e3) -end -function c44635489.spcon(e,c) - if c==nil then return true end - return Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0,nil)==0 - and Duel.GetFieldGroupCount(c:GetControler(),0,LOCATION_MZONE,nil)>0 - and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 -end -function c44635489.filter(c,clv) - local lv=c:GetLevel() - return c:IsSetCard(0x53) and lv~=0 and lv~=clv - and ((c:IsLocation(LOCATION_MZONE) and c:IsFaceup()) or c:IsLocation(LOCATION_GRAVE)) -end -function c44635489.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE+LOCATION_GRAVE) and c44635489.filter(chkc,e:GetHandler():GetLevel()) end - if chk==0 then return Duel.IsExistingTarget(c44635489.filter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,e:GetHandler(),e:GetHandler():GetLevel()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - Duel.SelectTarget(tp,c44635489.filter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,e:GetHandler(),e:GetHandler():GetLevel()) -end -function c44635489.lvop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and c:IsFaceup() and tc:IsRelateToEffect(e) - and (not tc:IsLocation(LOCATION_MZONE) or tc:IsFaceup()) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CHANGE_LEVEL) - e1:SetValue(tc:GetLevel()) - e1:SetReset(RESET_EVENT+0x1ff0000) - e:GetHandler():RegisterEffect(e1) - end -end -function c44635489.xyzlimit(e,c) - if not c then return false end - return not c:IsSetCard(0x53) -end diff --git a/script/c44656491.lua b/script/c44656491.lua deleted file mode 100644 index cfa8d9ca4b..0000000000 --- a/script/c44656491.lua +++ /dev/null @@ -1,39 +0,0 @@ ---平和の使者 -function c44656491.initial_effect(c) - --activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --cannot attack - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e2:SetTarget(c44656491.atktarget) - c:RegisterEffect(e2) - --maintain - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e3:SetCode(EVENT_PHASE+PHASE_STANDBY) - e3:SetRange(LOCATION_SZONE) - e3:SetCountLimit(1) - e3:SetCondition(c44656491.mtcon) - e3:SetOperation(c44656491.mtop) - c:RegisterEffect(e3) -end -function c44656491.atktarget(e,c) - return c:GetAttack()>=1500 -end -function c44656491.mtcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c44656491.mtop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLP(tp)>100 and Duel.SelectYesNo(tp,aux.Stringid(44656491,0)) then - Duel.PayLPCost(tp,100) - else - Duel.Destroy(e:GetHandler(),REASON_RULE) - end -end diff --git a/script/c4466015.lua b/script/c4466015.lua deleted file mode 100644 index 33adbd4a0b..0000000000 --- a/script/c4466015.lua +++ /dev/null @@ -1,31 +0,0 @@ ---ヴェノム・スプラッシュ -function c4466015.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_DRAW_PHASE) - e1:SetTarget(c4466015.target) - e1:SetOperation(c4466015.activate) - c:RegisterEffect(e1) -end -function c4466015.filter(c) - return c:GetCounter(0x9)>0 -end -function c4466015.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c4466015.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c4466015.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - local g=Duel.SelectTarget(tp,c4466015.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,g:GetFirst():GetCounter(0x9)*700) -end -function c4466015.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - local ct=tc:GetCounter(0x9) - if ct>0 then - tc:RemoveCounter(tp,0x9,ct,REASON_EFFECT) - Duel.Damage(1-tp,ct*700,REASON_EFFECT) - end -end diff --git a/script/c44663232.lua b/script/c44663232.lua deleted file mode 100644 index 5574875f20..0000000000 --- a/script/c44663232.lua +++ /dev/null @@ -1,37 +0,0 @@ ---異怪の妖精 エルフォビア -function c44663232.initial_effect(c) - --activate limit - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(44663232,0)) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCost(c44663232.cost) - e2:SetOperation(c44663232.operation) - c:RegisterEffect(e2) -end -function c44663232.cfilter(c) - return c:IsAttribute(ATTRIBUTE_WIND) and not c:IsPublic() -end -function c44663232.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c44663232.cfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) - local g=Duel.SelectMatchingCard(tp,c44663232.cfilter,tp,LOCATION_HAND,0,1,1,nil) - Duel.ConfirmCards(1-tp,g) - e:SetLabel(g:GetFirst():GetLevel()) - Duel.ShuffleHand(tp) -end -function c44663232.operation(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EFFECT_CANNOT_ACTIVATE) - e1:SetTargetRange(1,1) - e1:SetLabel(e:GetLabel()+1) - e1:SetReset(RESET_PHASE+PHASE_MAIN1+RESET_OPPO_TURN) - e1:SetValue(c44663232.val) - Duel.RegisterEffect(e1,tp) -end -function c44663232.val(e,re,tp) - return re:IsActiveType(TYPE_MONSTER) and re:GetHandler():IsLevelAbove(e:GetLabel()) and not re:GetHandler():IsImmuneToEffect(e) -end diff --git a/script/c44665365.lua b/script/c44665365.lua deleted file mode 100644 index 442d25fc79..0000000000 --- a/script/c44665365.lua +++ /dev/null @@ -1,44 +0,0 @@ ---神光の宣告者 -function c44665365.initial_effect(c) - c:EnableReviveLimit() - --Negate - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(44665365,0)) - e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_CHAINING) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c44665365.discon) - e1:SetCost(c44665365.discost) - e1:SetTarget(c44665365.distg) - e1:SetOperation(c44665365.disop) - c:RegisterEffect(e1) -end -function c44665365.discon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if ep==tp or c:IsStatus(STATUS_BATTLE_DESTROYED) then return false end - return (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE)) and Duel.IsChainNegatable(ev) -end -function c44665365.costfilter(c) - return c:IsRace(RACE_FAIRY) and c:IsAbleToGraveAsCost() -end -function c44665365.discost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c44665365.costfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c44665365.costfilter,tp,LOCATION_HAND,0,1,1,nil) - Duel.SendtoGrave(g,REASON_COST) -end -function c44665365.distg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) - end -end -function c44665365.disop(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateActivation(ev) - if re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(eg,REASON_EFFECT) - end -end diff --git a/script/c44676200.lua b/script/c44676200.lua deleted file mode 100644 index fa0b9bb34d..0000000000 --- a/script/c44676200.lua +++ /dev/null @@ -1,32 +0,0 @@ ---ヒーローバリア -function c44676200.initial_effect(c) - --negate attack - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c44676200.condition) - e1:SetOperation(c44676200.operation) - c:RegisterEffect(e1) -end -function c44676200.filter(c) - return c:IsFaceup() and c:IsSetCard(0x3008) -end -function c44676200.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp and Duel.GetCurrentPhase()0 and - Duel.CheckLPCost(c:GetControler(),2000) -end -function c44682448.spop(e,tp,eg,ep,ev,re,r,rp,c) - Duel.PayLPCost(tp,2000) -end -function c44682448.xyzlimit(e,c) - if not c then return false end - return not c:IsAttribute(ATTRIBUTE_DARK) -end diff --git a/script/c44689688.lua b/script/c44689688.lua deleted file mode 100644 index 054f80d680..0000000000 --- a/script/c44689688.lua +++ /dev/null @@ -1,31 +0,0 @@ ---ジュラック・スピノス -function c44689688.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(44689688,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c44689688.spcon) - e1:SetTarget(c44689688.sptg) - e1:SetOperation(c44689688.spop) - c:RegisterEffect(e1) -end -function c44689688.spcon(e,tp,eg,ep,ev,re,r,rp) - local tc=eg:GetFirst() - return eg:GetCount()==1 and tc:GetReasonCard()==e:GetHandler() - and tc:IsLocation(LOCATION_GRAVE) and tc:IsReason(REASON_BATTLE) -end -function c44689688.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0) -end -function c44689688.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(1-tp,LOCATION_MZONE,tp)<=0 then return end - if Duel.IsPlayerCanSpecialSummonMonster(tp,44689689,0,0x4011,300,0,1,RACE_DINOSAUR,ATTRIBUTE_FIRE,POS_FACEUP_ATTACK,1-tp) then - local token=Duel.CreateToken(tp,44689689) - Duel.SpecialSummon(token,0,tp,1-tp,false,false,POS_FACEUP_ATTACK) - end -end diff --git a/script/c44702857.lua b/script/c44702857.lua deleted file mode 100644 index 23735bb0eb..0000000000 --- a/script/c44702857.lua +++ /dev/null @@ -1,8 +0,0 @@ ---バイトロン -function c44702857.initial_effect(c) - --pierce - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_PIERCE) - c:RegisterEffect(e1) -end diff --git a/script/c44717069.lua b/script/c44717069.lua deleted file mode 100644 index e661017489..0000000000 --- a/script/c44717069.lua +++ /dev/null @@ -1,33 +0,0 @@ ---スターフィッシュ -function c44717069.initial_effect(c) - --lvup - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(44717069,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetTarget(c44717069.target) - e1:SetOperation(c44717069.operation) - c:RegisterEffect(e1) -end -function c44717069.filter(c) - return c:IsFaceup() and c:IsCode(44717069) -end -function c44717069.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c44717069.filter,tp,LOCATION_MZONE,0,1,nil) end -end -function c44717069.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c44717069.filter,tp,LOCATION_MZONE,0,nil) - local c=e:GetHandler() - local tc=g:GetFirst() - while tc do - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_LEVEL) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetValue(1) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - tc=g:GetNext() - end -end diff --git a/script/c44729197.lua b/script/c44729197.lua deleted file mode 100644 index d0434c5148..0000000000 --- a/script/c44729197.lua +++ /dev/null @@ -1,20 +0,0 @@ ---スチームロイド -function c44729197.initial_effect(c) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetCondition(c44729197.condtion) - e1:SetValue(c44729197.val) - c:RegisterEffect(e1) -end -function c44729197.condtion(e) - local ph=Duel.GetCurrentPhase() - return ph==PHASE_DAMAGE or ph==PHASE_DAMAGE_CAL -end -function c44729197.val(e,c) - if Duel.GetAttacker()==e:GetHandler() and Duel.GetAttackTarget()~=nil then return 500 - elseif e:GetHandler()==Duel.GetAttackTarget() then return -500 - else return 0 end -end diff --git a/script/c44762290.lua b/script/c44762290.lua deleted file mode 100644 index ea81bf8399..0000000000 --- a/script/c44762290.lua +++ /dev/null @@ -1,43 +0,0 @@ ---光学迷彩アーマー -function c44762290.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c44762290.target) - e1:SetOperation(c44762290.operation) - c:RegisterEffect(e1) - --direct attack - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_DIRECT_ATTACK) - c:RegisterEffect(e2) - --equip limit - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_EQUIP_LIMIT) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e3:SetValue(c44762290.eqlimit) - c:RegisterEffect(e3) -end -function c44762290.eqlimit(e,c) - return c:GetLevel()==1 -end -function c44762290.filter(c) - return c:IsFaceup() and c:GetLevel()==1 -end -function c44762290.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c44762290.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c44762290.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c44762290.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c44762290.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,e:GetHandler(),tc) - end -end diff --git a/script/c44763025.lua b/script/c44763025.lua deleted file mode 100644 index 5586c890b0..0000000000 --- a/script/c44763025.lua +++ /dev/null @@ -1,36 +0,0 @@ ---いたずら好きな双子悪魔 -function c44763025.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_HANDES) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c44763025.cost) - e1:SetTarget(c44763025.target) - e1:SetOperation(c44763025.activate) - c:RegisterEffect(e1) -end -function c44763025.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,1000) end - Duel.PayLPCost(tp,1000) -end -function c44763025.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0 end - Duel.SetTargetPlayer(tp) - Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,1-tp,2) -end -function c44763025.activate(e,tp,eg,ep,ev,re,r,rp) - local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) - local g=Duel.GetFieldGroup(p,0,LOCATION_HAND) - if g:GetCount()>0 then - local sg=g:RandomSelect(p,1) - Duel.SendtoGrave(sg,REASON_EFFECT+REASON_DISCARD) - g:RemoveCard(sg:GetFirst()) - if g:GetCount()>0 then - Duel.Hint(HINT_SELECTMSG,1-p,HINTMSG_DISCARD) - sg=g:Select(1-p,1,1,nil) - Duel.SendtoGrave(sg,REASON_EFFECT+REASON_DISCARD) - end - end -end diff --git a/script/c44771289.lua b/script/c44771289.lua deleted file mode 100644 index f76b9c4743..0000000000 --- a/script/c44771289.lua +++ /dev/null @@ -1,121 +0,0 @@ ---旅人の結彼岸 -function c44771289.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(44771289,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c44771289.target) - e1:SetOperation(c44771289.activate) - c:RegisterEffect(e1) - --atk & def - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(44771289,1)) - e2:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_GRAVE) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCondition(c44771289.atkcon) - e2:SetCost(c44771289.atkcost) - e2:SetTarget(c44771289.atktg) - e2:SetOperation(c44771289.atkop) - c:RegisterEffect(e2) -end -function c44771289.filter1(c,e) - return c:IsCanBeFusionMaterial() and not c:IsImmuneToEffect(e) -end -function c44771289.filter2(c,e,tp,m,f,chkf) - return c:IsType(TYPE_FUSION) and c:IsSetCard(0xb1) and (not f or f(c)) - and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf) -end -function c44771289.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp - local mg1=Duel.GetMatchingGroup(Card.IsCanBeFusionMaterial,tp,LOCATION_HAND+LOCATION_MZONE,0,nil) - local res=Duel.IsExistingMatchingCard(c44771289.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf) - if not res then - local ce=Duel.GetChainMaterial(tp) - if ce~=nil then - local fgroup=ce:GetTarget() - local mg2=fgroup(ce,e,tp) - local mf=ce:GetValue() - res=Duel.IsExistingMatchingCard(c44771289.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,chkf) - end - end - return res - end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function c44771289.activate(e,tp,eg,ep,ev,re,r,rp) - local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp - local mg1=Duel.GetMatchingGroup(c44771289.filter1,tp,LOCATION_HAND+LOCATION_MZONE,0,nil,e) - local sg1=Duel.GetMatchingGroup(c44771289.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf) - local mg2=nil - local sg2=nil - local ce=Duel.GetChainMaterial(tp) - if ce~=nil then - local fgroup=ce:GetTarget() - mg2=fgroup(ce,e,tp) - local mf=ce:GetValue() - sg2=Duel.GetMatchingGroup(c44771289.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,mf,chkf) - end - if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then - local sg=sg1:Clone() - if sg2 then sg:Merge(sg2) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local tg=sg:Select(tp,1,1,nil) - local tc=tg:GetFirst() - if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then - local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf) - tc:SetMaterial(mat1) - Duel.SendtoGrave(mat1,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION) - Duel.BreakEffect() - Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP) - else - local mat2=Duel.SelectFusionMaterial(tp,tc,mg2,nil,chkf) - local fop=ce:GetOperation() - fop(ce,e,tp,tc,mat2) - end - tc:CompleteProcedure() - else - local cg1=Duel.GetFieldGroup(tp,LOCATION_HAND+LOCATION_MZONE,0) - local cg2=Duel.GetFieldGroup(tp,LOCATION_EXTRA,0) - if cg1:GetCount()>1 and cg2:IsExists(Card.IsFacedown,1,nil) - and Duel.IsPlayerCanSpecialSummon(tp) and not Duel.IsPlayerAffectedByEffect(tp,27581098) then - Duel.ConfirmCards(1-tp,cg1) - Duel.ConfirmCards(1-tp,cg2) - Duel.ShuffleHand(tp) - end - end -end -function c44771289.atkcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetTurnID()~=Duel.GetTurnCount() -end -function c44771289.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT) -end -function c44771289.atkfilter(c) - return c:IsFaceup() and c:IsSetCard(0xb1) -end -function c44771289.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c44771289.atkfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c44771289.atkfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - Duel.SelectTarget(tp,c44771289.atkfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) -end -function c44771289.atkop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(800) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END+RESET_OPPO_TURN) - tc:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_UPDATE_DEFENCE) - tc:RegisterEffect(e2) - end -end diff --git a/script/c44789585.lua b/script/c44789585.lua deleted file mode 100644 index 7819645e51..0000000000 --- a/script/c44789585.lua +++ /dev/null @@ -1,35 +0,0 @@ ---ナチュル・ビーンズ -function c44789585.initial_effect(c) - --battle indes - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_INDESTRUCTABLE_COUNT) - e1:SetCountLimit(1) - e1:SetValue(c44789585.valcon) - c:RegisterEffect(e1) - --damage - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(44789585,0)) - e2:SetCategory(CATEGORY_DAMAGE) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_BE_BATTLE_TARGET) - e2:SetTarget(c44789585.damtg) - e2:SetOperation(c44789585.damop) - c:RegisterEffect(e2) -end -function c44789585.valcon(e,re,r,rp) - return bit.band(r,REASON_BATTLE)~=0 -end -function c44789585.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(500) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,500) -end -function c44789585.damop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c44790889.lua b/script/c44790889.lua deleted file mode 100644 index d661c5440b..0000000000 --- a/script/c44790889.lua +++ /dev/null @@ -1,41 +0,0 @@ ---ハンマーラッシュ・バウンサー -function c44790889.initial_effect(c) - --summon with no tribute - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(44790889,0)) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SUMMON_PROC) - e1:SetCondition(c44790889.ntcon) - c:RegisterEffect(e1) - --actlimit - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_ATTACK_ANNOUNCE) - e2:SetCondition(c44790889.atkcon) - e2:SetOperation(c44790889.atkop) - c:RegisterEffect(e2) -end -function c44790889.ntcon(e,c,minc) - if c==nil then return true end - return minc==0 and c:GetLevel()>4 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 - and Duel.GetFieldGroupCount(c:GetControler(),LOCATION_ONFIELD,0,nil)==0 - and Duel.GetFieldGroupCount(c:GetControler(),0,LOCATION_ONFIELD,nil)>0 -end -function c44790889.atkcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetAttackTarget()~=nil - and not Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_ONFIELD,0,1,nil,TYPE_SPELL+TYPE_TRAP) -end -function c44790889.atkop(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EFFECT_CANNOT_ACTIVATE) - e1:SetTargetRange(0,1) - e1:SetValue(c44790889.aclimit) - e1:SetReset(RESET_PHASE+PHASE_DAMAGE) - Duel.RegisterEffect(e1,tp) -end -function c44790889.aclimit(e,re,tp) - return re:IsHasType(EFFECT_TYPE_ACTIVATE) -end \ No newline at end of file diff --git a/script/c44792253.lua b/script/c44792253.lua deleted file mode 100644 index 3e92dc1a7f..0000000000 --- a/script/c44792253.lua +++ /dev/null @@ -1,32 +0,0 @@ ---D.D.デストロイヤー -function c44792253.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(44792253,0)) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_REMOVE) - e1:SetCondition(c44792253.descon) - e1:SetTarget(c44792253.destg) - e1:SetOperation(c44792253.desop) - c:RegisterEffect(e1) -end -function c44792253.descon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsFaceup() and e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) -end -function c44792253.filter(c) - return c:IsFaceup() and c:IsDestructable() -end -function c44792253.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and c44792253.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c44792253.filter,tp,0,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c44792253.filter,tp,0,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c44792253.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c44800181.lua b/script/c44800181.lua deleted file mode 100644 index f0cb55bd07..0000000000 --- a/script/c44800181.lua +++ /dev/null @@ -1,27 +0,0 @@ ---コンボマスター -function c44800181.initial_effect(c) - --chain - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EVENT_CHAINING) - e1:SetRange(LOCATION_MZONE) - e1:SetOperation(c44800181.chop) - c:RegisterEffect(e1) - --atk - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_EXTRA_ATTACK) - e2:SetCondition(c44800181.atkcon) - e2:SetValue(1) - c:RegisterEffect(e2) -end -function c44800181.chop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetCurrentPhase()==PHASE_MAIN1 and Duel.GetTurnPlayer()==tp and Duel.GetCurrentChain()>1 - and e:GetHandler():GetFlagEffect(44800181)==0 then - e:GetHandler():RegisterFlagEffect(44800181,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) - end -end -function c44800181.atkcon(e) - return e:GetHandler():GetFlagEffect(44800181)~=0 -end diff --git a/script/c44811425.lua b/script/c44811425.lua deleted file mode 100644 index 1bb633f922..0000000000 --- a/script/c44811425.lua +++ /dev/null @@ -1,38 +0,0 @@ ---ワーム・リンクス -function c44811425.initial_effect(c) - --flip - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_FLIP) - e1:SetOperation(c44811425.flipop) - c:RegisterEffect(e1) - --draw - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(44811425,0)) - e2:SetCategory(CATEGORY_DRAW) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCode(EVENT_PHASE+PHASE_END) - e2:SetCondition(c44811425.drcon) - e2:SetTarget(c44811425.drtg) - e2:SetOperation(c44811425.drop) - c:RegisterEffect(e2) -end -function c44811425.flipop(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():RegisterFlagEffect(44811425,RESET_EVENT+0x1fc0000,0,1) -end -function c44811425.drcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetFlagEffect(44811425)~=0 -end -function c44811425.drtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(1) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c44811425.drop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end diff --git a/script/c4483989.lua b/script/c4483989.lua deleted file mode 100644 index 8cdb2753cd..0000000000 --- a/script/c4483989.lua +++ /dev/null @@ -1,60 +0,0 @@ ---モンスターBOX -function c4483989.initial_effect(c) - --activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_BATTLE_START) - e1:SetTarget(c4483989.atktg1) - e1:SetOperation(c4483989.atkop) - c:RegisterEffect(e1) - --dice - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(4483989,0)) - e2:SetCategory(CATEGORY_COIN) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_ATTACK_ANNOUNCE) - e2:SetRange(LOCATION_SZONE) - e2:SetCondition(c4483989.atkcon) - e2:SetTarget(c4483989.atktg2) - e2:SetOperation(c4483989.atkop) - c:RegisterEffect(e2) -end -function c4483989.atkcon(e,tp,eg,ep,ev,re,r,rp) - local at=Duel.GetAttackTarget() - return tp~=Duel.GetTurnPlayer() and at and at:IsPosition(POS_FACEUP_DEFENCE) -end -function c4483989.atktg1(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - e:SetLabel(0) - local at=Duel.GetAttackTarget() - if Duel.CheckEvent(EVENT_ATTACK_ANNOUNCE) and tp~=Duel.GetTurnPlayer() - and at and at:IsPosition(POS_FACEUP_DEFENCE) then - e:SetLabel(1) - Duel.GetAttacker():CreateEffectRelation(e) - at:CreateEffectRelation(e) - Duel.SetOperationInfo(0,CATEGORY_COIN,nil,0,tp,1) - end -end -function c4483989.atktg2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - e:SetLabel(1) - Duel.GetAttacker():CreateEffectRelation(e) - Duel.GetAttackTarget():CreateEffectRelation(e) - Duel.SetOperationInfo(0,CATEGORY_COIN,nil,0,tp,1) -end -function c4483989.atkop(e,tp,eg,ep,ev,re,r,rp) - if e:GetLabel()==0 or not e:GetHandler():IsRelateToEffect(e) then return end - local a=Duel.GetAttacker() - local at=Duel.GetAttackTarget() - if a:IsFaceup() and a:IsRelateToEffect(e) and at:IsFaceup() and at:IsRelateToEffect(e) then - Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_COIN) - local coin=Duel.SelectOption(1-tp,60,61) - local res=Duel.TossCoin(1-tp,1) - if coin~=res then - Duel.ChangePosition(at,POS_FACEUP_ATTACK) - elseif a:GetAttack()>at:GetDefence() then - Duel.Damage(tp,a:GetAttack()-at:GetDefence(),REASON_EFFECT) - end - end -end diff --git a/script/c44860890.lua b/script/c44860890.lua deleted file mode 100644 index ec32c4f52f..0000000000 --- a/script/c44860890.lua +++ /dev/null @@ -1,46 +0,0 @@ ---捷炎星-セイヴン -function c44860890.initial_effect(c) - --set - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(44860890,0)) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCondition(c44860890.setcon) - e1:SetTarget(c44860890.settg) - e1:SetOperation(c44860890.setop) - c:RegisterEffect(e1) - -- - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - e2:SetRange(LOCATION_MZONE) - e2:SetTargetRange(LOCATION_ONFIELD,0) - e2:SetTarget(c44860890.indtg) - e2:SetValue(c44860890.indval) - c:RegisterEffect(e2) -end -function c44860890.setcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) -end -function c44860890.filter(c) - return c:IsSetCard(0x7c) and c:IsType(TYPE_SPELL) and c:IsSSetable() -end -function c44860890.settg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingMatchingCard(c44860890.filter,tp,LOCATION_DECK,0,1,nil) end -end -function c44860890.setop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) - local g=Duel.SelectMatchingCard(tp,c44860890.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SSet(tp,g:GetFirst()) - Duel.ConfirmCards(1-tp,g) - end -end -function c44860890.indtg(e,c) - return c:IsFaceup() and c:IsSetCard(0x7c) and c:IsType(TYPE_SPELL+TYPE_TRAP) -end -function c44860890.indval(e,re,tp) - return e:GetHandler():GetControler()~=tp -end diff --git a/script/c44877690.lua b/script/c44877690.lua deleted file mode 100644 index 49877670e8..0000000000 --- a/script/c44877690.lua +++ /dev/null @@ -1,93 +0,0 @@ ---氷結界の神精霊 -function c44877690.initial_effect(c) - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(aux.FALSE) - c:RegisterEffect(e1) - --summon,flip - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetCode(EVENT_SUMMON_SUCCESS) - e2:SetOperation(c44877690.retreg) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EVENT_FLIP) - c:RegisterEffect(e3) -end -function c44877690.retreg(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - --to hand - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetDescription(aux.Stringid(44877690,0)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetReset(RESET_EVENT+0x1ee0000+RESET_PHASE+PHASE_END) - e1:SetCondition(c44877690.retcon) - e1:SetTarget(c44877690.rettg) - e1:SetOperation(c44877690.retop) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - c:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e3:SetDescription(aux.Stringid(44877690,0)) - e3:SetCategory(CATEGORY_TOHAND) - e3:SetCode(EVENT_PHASE+PHASE_END) - e3:SetRange(LOCATION_MZONE) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetCountLimit(1) - e3:SetReset(RESET_EVENT+0x1ee0000+RESET_PHASE+PHASE_END) - e3:SetCondition(c44877690.retcon2) - e3:SetTarget(c44877690.rettg2) - e3:SetOperation(c44877690.retop2) - c:RegisterEffect(e3) -end -function c44877690.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x2f) -end -function c44877690.retcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if Duel.IsExistingMatchingCard(c44877690.cfilter,tp,LOCATION_MZONE,0,1,c) then return false end - if c:IsHasEffect(EFFECT_SPIRIT_DONOT_RETURN) then return false end - if e:IsHasType(EFFECT_TYPE_TRIGGER_F) then - return not c:IsHasEffect(EFFECT_SPIRIT_MAYNOT_RETURN) - else return c:IsHasEffect(EFFECT_SPIRIT_MAYNOT_RETURN) end -end -function c44877690.rettg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():GetFlagEffect(44877690)==0 end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0) - e:GetHandler():RegisterFlagEffect(44877690,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1) -end -function c44877690.retop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - Duel.SendtoHand(c,nil,REASON_EFFECT) - end -end -function c44877690.retcon2(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return Duel.IsExistingMatchingCard(c44877690.cfilter,tp,LOCATION_MZONE,0,1,c) - and not c:IsHasEffect(EFFECT_SPIRIT_DONOT_RETURN) -end -function c44877690.rettg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsAbleToHand() end - if chk==0 then return e:GetHandler():GetFlagEffect(44877690)==0 end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g=Duel.SelectTarget(tp,Card.IsAbleToHand,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0) - e:GetHandler():RegisterFlagEffect(44877690,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1) -end -function c44877690.retop2(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - end -end diff --git a/script/c44883600.lua b/script/c44883600.lua deleted file mode 100644 index 5b67ffa693..0000000000 --- a/script/c44883600.lua +++ /dev/null @@ -1,34 +0,0 @@ ---ダブル・ディフェンダー -function c44883600.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --disable attack - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(44883600,0)) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_FIELD) - e2:SetRange(LOCATION_SZONE) - e2:SetCountLimit(1) - e2:SetCode(EVENT_ATTACK_ANNOUNCE) - e2:SetCondition(c44883600.condition) - e2:SetTarget(c44883600.target) - e2:SetOperation(c44883600.activate) - c:RegisterEffect(e2) -end -function c44883600.condition(e,tp,eg,ep,ev,re,r,rp) - return tp~=Duel.GetTurnPlayer() and Duel.IsExistingMatchingCard(Card.IsPosition,tp,LOCATION_MZONE,0,2,nil,POS_FACEUP_DEFENCE) -end -function c44883600.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local tg=Duel.GetAttacker() - if chkc then return chkc==tg end - if chk==0 then return tg:IsOnField() and tg:IsCanBeEffectTarget(e) end - Duel.SetTargetCard(tg) -end -function c44883600.activate(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - Duel.NegateAttack() - end -end diff --git a/script/c44883830.lua b/script/c44883830.lua deleted file mode 100644 index 9c25ad1e54..0000000000 --- a/script/c44883830.lua +++ /dev/null @@ -1,27 +0,0 @@ ---死の合唱 -function c44883830.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c44883830.condition) - e1:SetTarget(c44883830.target) - e1:SetOperation(c44883830.activate) - c:RegisterEffect(e1) -end -function c44883830.cfilter(c) - return c:IsFaceup() and c:IsCode(84451804) -end -function c44883830.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c44883830.cfilter,tp,LOCATION_MZONE,0,3,nil) -end -function c44883830.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDestructable,tp,0,LOCATION_ONFIELD,1,nil) end - local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,0,LOCATION_ONFIELD,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c44883830.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,0,LOCATION_ONFIELD,nil) - Duel.Destroy(g,REASON_EFFECT) -end diff --git a/script/c44887817.lua b/script/c44887817.lua deleted file mode 100644 index 1f45ba5714..0000000000 --- a/script/c44887817.lua +++ /dev/null @@ -1,71 +0,0 @@ ---増草剤 -function c44887817.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(44887817,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetCountLimit(1) - e2:SetRange(LOCATION_SZONE) - e2:SetCost(c44887817.cost) - e2:SetTarget(c44887817.target) - e2:SetOperation(c44887817.operation) - c:RegisterEffect(e2) - --Destroy - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e3:SetRange(LOCATION_SZONE) - e3:SetCode(EVENT_LEAVE_FIELD) - e3:SetCondition(c44887817.descon) - e3:SetOperation(c44887817.desop) - c:RegisterEffect(e3) -end -function c44887817.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_NORMALSUMMON)==0 end -end -function c44887817.filter(c,e,tp) - return c:IsRace(RACE_PLANT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c44887817.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c44887817.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c44887817.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c44887817.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c44887817.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then - if Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)==0 then return end - c:SetCardTarget(tc) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_SUMMON) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetReset(RESET_PHASE+RESET_END) - e1:SetTargetRange(1,0) - Duel.RegisterEffect(e1,tp) - local e2=e1:Clone(e1) - e2:SetCode(EFFECT_CANNOT_MSET) - Duel.RegisterEffect(e2,tp) - end -end -function c44887817.dfilter(c,sg) - return sg:IsContains(c) -end -function c44887817.descon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:GetCardTargetCount()==0 then return false end - return c:GetCardTarget():IsExists(c44887817.dfilter,1,nil,eg) -end -function c44887817.desop(e,tp,eg,ep,ev,re,r,rp) - Duel.Destroy(e:GetHandler(),REASON_EFFECT) -end diff --git a/script/c44901281.lua b/script/c44901281.lua deleted file mode 100644 index a4ee5cc78a..0000000000 --- a/script/c44901281.lua +++ /dev/null @@ -1,34 +0,0 @@ ---セイバー・ホール -function c44901281.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DISABLE_SUMMON+CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_SUMMON) - e1:SetCondition(c44901281.condition) - e1:SetTarget(c44901281.target) - e1:SetOperation(c44901281.activate) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_FLIP_SUMMON) - c:RegisterEffect(e2) - local e3=e1:Clone() - e3:SetCode(EVENT_SPSUMMON) - c:RegisterEffect(e3) -end -function c44901281.filter(c) - return c:IsFaceup() and c:IsSetCard(0x100d) -end -function c44901281.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c44901281.filter,tp,LOCATION_MZONE,0,1,nil) - and Duel.GetCurrentChain()==0 -end -function c44901281.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DISABLE_SUMMON,eg,eg:GetCount(),0,0) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,eg:GetCount(),0,0) -end -function c44901281.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateSummon(eg) - Duel.Destroy(eg,REASON_EFFECT) -end diff --git a/script/c44910027.lua b/script/c44910027.lua deleted file mode 100644 index eb9408dca7..0000000000 --- a/script/c44910027.lua +++ /dev/null @@ -1,50 +0,0 @@ ---ヴィクトリー・ドラゴン -function c44910027.initial_effect(c) - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - c:RegisterEffect(e1) - --summon with 3 tribute - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_LIMIT_SUMMON_PROC) - e1:SetCondition(c44910027.ttcon) - e1:SetOperation(c44910027.ttop) - e1:SetValue(SUMMON_TYPE_ADVANCE) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_LIMIT_SET_PROC) - e2:SetCondition(c44910027.ttcon) - e2:SetOperation(c44910027.ttop) - e2:SetValue(SUMMON_TYPE_ADVANCE) - c:RegisterEffect(e2) - --tribute limit - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_TRIBUTE_LIMIT) - e3:SetValue(c44910027.tlimit) - c:RegisterEffect(e3) - --match kill - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e4:SetCode(EFFECT_MATCH_KILL) - c:RegisterEffect(e4) -end -function c44910027.ttcon(e,c) - if c==nil then return true end - return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-3 and Duel.GetTributeCount(c)>=3 -end -function c44910027.ttop(e,tp,eg,ep,ev,re,r,rp,c) - local g=Duel.SelectTribute(tp,c,3,3) - c:SetMaterial(g) - Duel.Release(g,REASON_SUMMON+REASON_MATERIAL) -end -function c44910027.tlimit(e,c) - return not c:IsRace(RACE_DRAGON) -end diff --git a/script/c44913552.lua b/script/c44913552.lua deleted file mode 100644 index e6e30e5d55..0000000000 --- a/script/c44913552.lua +++ /dev/null @@ -1,20 +0,0 @@ ---タイム・イーター -function c44913552.initial_effect(c) - --skip draw - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(44913552,0)) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_BATTLE_DESTROYING) - e2:SetRange(LOCATION_MZONE) - e2:SetOperation(c44913552.skipop) - c:RegisterEffect(e2) -end -function c44913552.skipop(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetTargetRange(0,1) - e1:SetCode(EFFECT_SKIP_M1) - e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN) - Duel.RegisterEffect(e1,tp) -end diff --git a/script/c44920699.lua b/script/c44920699.lua deleted file mode 100644 index 126a889f2f..0000000000 --- a/script/c44920699.lua +++ /dev/null @@ -1,47 +0,0 @@ ---炎舞-「天璇」 -function c44920699.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetCondition(c44920699.condition) - e1:SetTarget(c44920699.target) - e1:SetOperation(c44920699.activate) - c:RegisterEffect(e1) - -- - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetRange(LOCATION_SZONE) - e3:SetTargetRange(LOCATION_MZONE,0) - e3:SetCode(EFFECT_UPDATE_ATTACK) - e3:SetTarget(aux.TargetBoolFunction(Card.IsRace,RACE_BEASTWARRIOR)) - e3:SetValue(300) - c:RegisterEffect(e3) -end -function c44920699.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end -function c44920699.filter(c) - return c:IsFaceup() and c:IsRace(RACE_BEASTWARRIOR) -end -function c44920699.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c44920699.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c44920699.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c44920699.filter,tp,LOCATION_MZONE,0,1,1,nil) -end -function c44920699.activate(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - e1:SetValue(700) - tc:RegisterEffect(e1) - end -end diff --git a/script/c44928016.lua b/script/c44928016.lua deleted file mode 100644 index 677295bdf4..0000000000 --- a/script/c44928016.lua +++ /dev/null @@ -1,34 +0,0 @@ ---にん人 -function c44928016.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(44928016,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_GRAVE) - e1:SetCountLimit(1,44928016) - e1:SetCost(c44928016.cost) - e1:SetTarget(c44928016.target) - e1:SetOperation(c44928016.operation) - c:RegisterEffect(e1) -end -function c44928016.cfilter(c) - return c:IsRace(RACE_PLANT) and (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) and not c:IsCode(44928016) and c:IsAbleToGraveAsCost() -end -function c44928016.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c44928016.cfilter,tp,LOCATION_MZONE+LOCATION_HAND,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c44928016.cfilter,tp,LOCATION_MZONE+LOCATION_HAND,0,1,1,nil) - Duel.SendtoGrave(g,REASON_COST) -end -function c44928016.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c44928016.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c44947065.lua b/script/c44947065.lua deleted file mode 100644 index 0e02eb8bf3..0000000000 --- a/script/c44947065.lua +++ /dev/null @@ -1,19 +0,0 @@ ---強者の苦痛 -function c44947065.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --atk down - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(0,LOCATION_MZONE) - e2:SetValue(c44947065.val) - c:RegisterEffect(e2) -end -function c44947065.val(e,c) - return c:GetLevel()*-100 -end diff --git a/script/c44954628.lua b/script/c44954628.lua deleted file mode 100644 index 1d5c01f4dd..0000000000 --- a/script/c44954628.lua +++ /dev/null @@ -1,99 +0,0 @@ ---巨大戦艦 テトラン -function c44954628.initial_effect(c) - --summon success - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(44954628,0)) - e1:SetCategory(CATEGORY_COUNTER) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c44954628.addct) - e1:SetOperation(c44954628.addc) - c:RegisterEffect(e1) - --battle indestructable - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e2:SetValue(1) - c:RegisterEffect(e2) - --remove counter - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(44954628,1)) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e3:SetCode(EVENT_DAMAGE_STEP_END) - e3:SetCondition(c44954628.rctcon) - e3:SetOperation(c44954628.rctop) - c:RegisterEffect(e3) - --destroy - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(44954628,2)) - e4:SetCategory(CATEGORY_DESTROY) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e4:SetCode(EVENT_DAMAGE_STEP_END) - e4:SetCondition(c44954628.descon) - e4:SetTarget(c44954628.destg) - e4:SetOperation(c44954628.desop) - c:RegisterEffect(e4) - --destroy - local e5=Effect.CreateEffect(c) - e5:SetDescription(aux.Stringid(44954628,3)) - e5:SetCategory(CATEGORY_DESTROY) - e5:SetProperty(EFFECT_FLAG_CARD_TARGET) - e5:SetType(EFFECT_TYPE_IGNITION) - e5:SetRange(LOCATION_MZONE) - e5:SetCountLimit(1) - e5:SetCost(c44954628.descost2) - e5:SetTarget(c44954628.destg2) - e5:SetOperation(c44954628.desop2) - c:RegisterEffect(e5) -end -function c44954628.addct(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,3,0,0x1f) -end -function c44954628.addc(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - e:GetHandler():AddCounter(0x1f,3) - end -end -function c44954628.rctcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetCounter(0x1f)~=0 -end -function c44954628.rctop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFaceup() and c:IsRelateToEffect(e) then - c:RemoveCounter(tp,0x1f,1,REASON_EFFECT) - end -end -function c44954628.descon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetCounter(0x1f)==0 -end -function c44954628.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0) -end -function c44954628.desop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFaceup() and c:IsRelateToEffect(e) then - Duel.Destroy(c,REASON_EFFECT) - end -end -function c44954628.descost2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsCanRemoveCounter(tp,0x1f,1,REASON_COST) end - e:GetHandler():RemoveCounter(tp,0x1f,1,REASON_COST) -end -function c44954628.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable() -end -function c44954628.destg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and c44954628.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c44954628.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c44954628.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c44954628.desop2(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c44968687.lua b/script/c44968687.lua deleted file mode 100644 index b82e42cc45..0000000000 --- a/script/c44968687.lua +++ /dev/null @@ -1,104 +0,0 @@ ---伝説のフィッシャーマン三世 -function c44968687.initial_effect(c) - c:EnableReviveLimit() - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_SPSUMMON_PROC) - e2:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e2:SetRange(LOCATION_HAND) - e2:SetCondition(c44968687.spcon) - e2:SetOperation(c44968687.spop) - c:RegisterEffect(e2) - --remove - local e3=Effect.CreateEffect(c) - e3:SetCategory(CATEGORY_REMOVE) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - e3:SetTarget(c44968687.rmtg) - e3:SetOperation(c44968687.rmop) - c:RegisterEffect(e3) - --indes - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e4:SetValue(1) - c:RegisterEffect(e4) - local e5=e4:Clone() - e5:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - c:RegisterEffect(e5) - --immune - local e6=Effect.CreateEffect(c) - e6:SetType(EFFECT_TYPE_SINGLE) - e6:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e6:SetRange(LOCATION_MZONE) - e6:SetCode(EFFECT_IMMUNE_EFFECT) - e6:SetValue(c44968687.efilter) - c:RegisterEffect(e6) - --double damage - local e7=Effect.CreateEffect(c) - e7:SetType(EFFECT_TYPE_IGNITION) - e7:SetRange(LOCATION_MZONE) - e7:SetCountLimit(1) - e7:SetTarget(c44968687.damtg) - e7:SetOperation(c44968687.damop) - c:RegisterEffect(e7) -end -function c44968687.spcon(e,c) - if c==nil then return true end - return Duel.CheckReleaseGroup(c:GetControler(),Card.IsCode,1,nil,3643300) -end -function c44968687.spop(e,tp,eg,ep,ev,re,r,rp,c) - local g=Duel.SelectReleaseGroup(tp,Card.IsCode,1,1,nil,3643300) - Duel.Release(g,REASON_COST) -end -function c44968687.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_MZONE,1,nil) end - local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_MZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,0) -end -function c44968687.rmop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_MZONE,nil) - if Duel.Remove(g,POS_FACEUP,REASON_EFFECT)~=0 then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e:GetHandler():RegisterEffect(e1) - end -end -function c44968687.efilter(e,te) - return te:IsActiveType(TYPE_SPELL+TYPE_TRAP) -end -function c44968687.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_REMOVED)>0 end - local g=Duel.GetFieldGroup(tp,0,LOCATION_REMOVED) - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,g:GetCount(),0,0) -end -function c44968687.damop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetFieldGroup(tp,0,LOCATION_REMOVED) - if Duel.SendtoGrave(g,REASON_EFFECT+REASON_RETURN)~=0 then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CHANGE_DAMAGE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetTargetRange(0,1) - e1:SetValue(c44968687.damval) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) - Duel.RegisterFlagEffect(tp,44968687,RESET_PHASE+PHASE_END,0,1) - end -end -function c44968687.damval(e,re,val,r,rp,rc) - local tp=e:GetHandlerPlayer() - if Duel.GetFlagEffect(tp,44968687)==0 or bit.band(r,REASON_BATTLE+REASON_EFFECT)==0 then return val end - Duel.ResetFlagEffect(tp,44968687) - return val*2 -end diff --git a/script/c45010690.lua b/script/c45010690.lua deleted file mode 100644 index b433064245..0000000000 --- a/script/c45010690.lua +++ /dev/null @@ -1,27 +0,0 @@ ---フラボット -function c45010690.initial_effect(c) - --token - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(45010690,0)) - e1:SetCategory(CATEGORY_DRAW+CATEGORY_TODECK) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetTarget(c45010690.target) - e1:SetOperation(c45010690.operation) - c:RegisterEffect(e1) -end -function c45010690.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(1) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) - Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_HAND) -end -function c45010690.operation(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - if Duel.Draw(p,d,REASON_EFFECT)==0 then return end - Duel.BreakEffect() - Duel.Hint(HINT_SELECTMSG,p,HINTMSG_TODECK) - local g=Duel.SelectMatchingCard(p,Card.IsAbleToDeck,p,LOCATION_HAND,0,1,1,nil) - Duel.SendtoDeck(g,nil,0,REASON_EFFECT) -end diff --git a/script/c45023678.lua b/script/c45023678.lua deleted file mode 100644 index e495eaeefb..0000000000 --- a/script/c45023678.lua +++ /dev/null @@ -1,52 +0,0 @@ ---ライトニングパニッシャー -function c45023678.initial_effect(c) - --chain - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EVENT_CHAINING) - e1:SetRange(LOCATION_MZONE) - e1:SetOperation(c45023678.chop) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(45023678,0)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_CHAIN_END) - e2:SetRange(LOCATION_MZONE) - e2:SetCondition(c45023678.descon) - e2:SetTarget(c45023678.destg) - e2:SetOperation(c45023678.desop) - e2:SetLabelObject(e1) - c:RegisterEffect(e2) -end -function c45023678.chop(e,tp,eg,ep,ev,re,r,rp) - local ct=Duel.GetCurrentChain() - if ct==1 then - e:SetLabel(0) - elseif not Duel.CheckChainUniqueness() then - e:SetLabel(2) - elseif ct>=3 and e:GetLabel()~=2 then - e:SetLabel(1) - end -end -function c45023678.descon(e,tp,eg,ep,ev,re,r,rp) - local res=e:GetLabelObject():GetLabel() - e:GetLabelObject():SetLabel(0) - return res==1 -end -function c45023678.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() and chkc:IsDestructable() end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,0,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c45023678.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c45033006.lua b/script/c45033006.lua deleted file mode 100644 index 6ebd2d1411..0000000000 --- a/script/c45033006.lua +++ /dev/null @@ -1,31 +0,0 @@ ---A・O・J エネミー・キャッチャー -function c45033006.initial_effect(c) - --control - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(45033006,0)) - e1:SetCategory(CATEGORY_CONTROL) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c45033006.target) - e1:SetOperation(c45033006.operation) - c:RegisterEffect(e1) -end -function c45033006.filter(c) - return c:IsFacedown() and c:IsDefencePos() and c:IsControlerCanBeChanged() -end -function c45033006.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c45033006.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c45033006.filter,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) - local g=Duel.SelectTarget(tp,c45033006.filter,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0) -end -function c45033006.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFacedown() and tc:IsDefencePos() and not Duel.GetControl(tc,tp,PHASE_END,1) then - if not tc:IsImmuneToEffect(e) and tc:IsAbleToChangeControler() then - Duel.Destroy(tc,REASON_EFFECT) - end - end -end diff --git a/script/c45037489.lua b/script/c45037489.lua deleted file mode 100644 index 661a857cfe..0000000000 --- a/script/c45037489.lua +++ /dev/null @@ -1,41 +0,0 @@ ---フルール・ド・シュヴァリエ -function c45037489.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,c45037489.tfilter,aux.NonTuner(nil),1) - c:EnableReviveLimit() - --negate - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(45037489,0)) - e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) - e1:SetCode(EVENT_CHAINING) - e1:SetCondition(c45037489.discon) - e1:SetTarget(c45037489.distg) - e1:SetOperation(c45037489.disop) - c:RegisterEffect(e1) -end -function c45037489.tfilter(c) - return c:IsCode(19642774) or c:IsHasEffect(20932152) -end -function c45037489.discon(e,tp,eg,ep,ev,re,r,rp) - return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and rp~=tp and tp==Duel.GetTurnPlayer() - and re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev) -end -function c45037489.distg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) - end -end -function c45037489.disop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsFaceup() or not c:IsRelateToEffect(e) then return end - Duel.NegateActivation(ev) - if re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(eg,REASON_EFFECT) - end -end diff --git a/script/c45041488.lua b/script/c45041488.lua deleted file mode 100644 index d295127946..0000000000 --- a/script/c45041488.lua +++ /dev/null @@ -1,83 +0,0 @@ ---コアキメイル・ガーディアン -function c45041488.initial_effect(c) - --cost - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c45041488.mtcon) - e1:SetOperation(c45041488.mtop) - c:RegisterEffect(e1) - --Negate - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(45041488,3)) - e2:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_QUICK_O) - e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) - e2:SetCode(EVENT_CHAINING) - e2:SetRange(LOCATION_MZONE) - e2:SetCondition(c45041488.condition) - e2:SetCost(c45041488.cost) - e2:SetTarget(c45041488.target) - e2:SetOperation(c45041488.operation) - c:RegisterEffect(e2) -end -function c45041488.mtcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c45041488.cfilter1(c) - return c:IsCode(36623431) and c:IsAbleToGraveAsCost() -end -function c45041488.cfilter2(c) - return c:IsType(TYPE_MONSTER) and c:IsRace(RACE_ROCK) and not c:IsPublic() -end -function c45041488.mtop(e,tp,eg,ep,ev,re,r,rp) - local g1=Duel.GetMatchingGroup(c45041488.cfilter1,tp,LOCATION_HAND,0,nil) - local g2=Duel.GetMatchingGroup(c45041488.cfilter2,tp,LOCATION_HAND,0,nil) - local select=2 - Duel.Hint(HINT_SELECTMSG,tp,0) - if g1:GetCount()>0 and g2:GetCount()>0 then - select=Duel.SelectOption(tp,aux.Stringid(45041488,0),aux.Stringid(45041488,1),aux.Stringid(45041488,2)) - elseif g1:GetCount()>0 then - select=Duel.SelectOption(tp,aux.Stringid(45041488,0),aux.Stringid(45041488,2)) - if select==1 then select=2 end - elseif g2:GetCount()>0 then - select=Duel.SelectOption(tp,aux.Stringid(45041488,1),aux.Stringid(45041488,2)) - select=select+1 - end - if select==0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=g1:Select(tp,1,1,nil) - Duel.SendtoGrave(g,REASON_COST) - elseif select==1 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) - local g=g2:Select(tp,1,1,nil) - Duel.ConfirmCards(1-tp,g) - Duel.ShuffleHand(tp) - else - Duel.Destroy(e:GetHandler(),REASON_RULE) - end -end -function c45041488.condition(e,tp,eg,ep,ev,re,r,rp) - return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and re:IsActiveType(TYPE_MONSTER) - and Duel.IsChainNegatable(ev) -end -function c45041488.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end -function c45041488.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) - end -end -function c45041488.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateActivation(ev) - if re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(eg,REASON_EFFECT) - end -end diff --git a/script/c45045866.lua b/script/c45045866.lua deleted file mode 100644 index 1d51a5ffab..0000000000 --- a/script/c45045866.lua +++ /dev/null @@ -1,33 +0,0 @@ ---オーシャンズ・オーパー -function c45045866.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_PIERCE) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(45045866,0)) - e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_BATTLE_DESTROYED) - e2:SetTarget(c45045866.target) - e2:SetOperation(c45045866.operation) - c:RegisterEffect(e2) -end -function c45045866.filter(c) - local code=c:GetCode() - return (code==81434470 or code==18828179) and c:IsAbleToHand() -end -function c45045866.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c45045866.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c45045866.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c45082499.lua b/script/c45082499.lua deleted file mode 100644 index d246761aa6..0000000000 --- a/script/c45082499.lua +++ /dev/null @@ -1,78 +0,0 @@ ---ZW-雷神猛虎剣 -function c45082499.initial_effect(c) - c:SetUniqueOnField(1,0,45082499) - --equip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(45082499,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetRange(LOCATION_HAND+LOCATION_MZONE) - e1:SetCondition(c45082499.eqcon) - e1:SetTarget(c45082499.eqtg) - e1:SetOperation(c45082499.eqop) - c:RegisterEffect(e1) - -- - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(LOCATION_ONFIELD,0) - e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x7e)) - e2:SetValue(c45082499.indval) - c:RegisterEffect(e2) - --destroy sub - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_EQUIP) - e3:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e3:SetCode(EFFECT_DESTROY_SUBSTITUTE) - e3:SetValue(c45082499.repval) - c:RegisterEffect(e3) -end -function c45082499.eqcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():CheckUniqueOnField(tp) -end -function c45082499.filter(c) - return c:IsFaceup() and c:IsSetCard(0x7f) -end -function c45082499.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c45082499.filter(chkc) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingTarget(c45082499.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c45082499.filter,tp,LOCATION_MZONE,0,1,1,nil) -end -function c45082499.eqop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) then return end - if c:IsLocation(LOCATION_MZONE) and c:IsFacedown() then return end - local tc=Duel.GetFirstTarget() - if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or tc:GetControler()~=tp or tc:IsFacedown() or not tc:IsRelateToEffect(e) or not c:CheckUniqueOnField(tp) then - Duel.SendtoGrave(c,REASON_EFFECT) - return - end - Duel.Equip(tp,c,tc,true) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(c45082499.eqlimit) - e1:SetLabelObject(tc) - c:RegisterEffect(e1) - --atkup - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(1200) - e2:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e2) -end -function c45082499.eqlimit(e,c) - return c==e:GetLabelObject() -end -function c45082499.indval(e,re,tp) - return e:GetHandler():GetControler()~=tp -end -function c45082499.repval(e,re,r,rp) - return bit.band(r,REASON_EFFECT)~=0 -end diff --git a/script/c45103815.lua b/script/c45103815.lua deleted file mode 100644 index 9c5f39eabd..0000000000 --- a/script/c45103815.lua +++ /dev/null @@ -1,40 +0,0 @@ ---召喚師ライズベルト -function c45103815.initial_effect(c) - --pendulum summon - aux.AddPendulumProcedure(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --level - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_PZONE) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCountLimit(1) - e2:SetTarget(c45103815.lvtg) - e2:SetOperation(c45103815.lvop) - c:RegisterEffect(e2) -end -function c45103815.filter(c) - return c:IsFaceup() and c:GetLevel()>0 -end -function c45103815.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c45103815.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c45103815.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - Duel.SelectTarget(tp,c45103815.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) -end -function c45103815.lvop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_LEVEL) - e1:SetValue(1) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - end -end diff --git a/script/c45118716.lua b/script/c45118716.lua deleted file mode 100644 index 337e767261..0000000000 --- a/script/c45118716.lua +++ /dev/null @@ -1,40 +0,0 @@ ---マジック・リサイクラー -function c45118716.initial_effect(c) - --todeck - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(45118716,0)) - e1:SetCategory(CATEGORY_TODECK) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetRange(LOCATION_GRAVE) - e1:SetCondition(c45118716.condition) - e1:SetCost(c45118716.cost) - e1:SetTarget(c45118716.target) - e1:SetOperation(c45118716.operation) - c:RegisterEffect(e1) -end -function c45118716.condition(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp -end -function c45118716.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) -end -function c45118716.filter(c) - return c:IsType(TYPE_SPELL) and c:IsAbleToDeck() -end -function c45118716.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c45118716.filter(chkc) end - if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,1) - and Duel.IsExistingTarget(c45118716.filter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectTarget(tp,c45118716.filter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0) -end -function c45118716.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if Duel.DiscardDeck(tp,1,REASON_EFFECT)>0 and tc:IsRelateToEffect(e) then - Duel.SendtoDeck(tc,nil,1,REASON_EFFECT) - end -end diff --git a/script/c45133463.lua b/script/c45133463.lua deleted file mode 100644 index 98ef66ed2b..0000000000 --- a/script/c45133463.lua +++ /dev/null @@ -1,37 +0,0 @@ ---死神の呼び声 -function c45133463.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(c45133463.condition) - e1:SetTarget(c45133463.target) - e1:SetOperation(c45133463.activate) - c:RegisterEffect(e1) -end -function c45133463.cfiltetr(c,tp) - return c:IsPreviousLocation(LOCATION_GRAVE) and c:GetPreviousControler()==tp -end -function c45133463.condition(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c45133463.cfiltetr,1,nil,tp) -end -function c45133463.filter(c,e,tp) - local code=c:GetCode() - return (code==78552773 or code==78275321) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c45133463.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c45133463.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c45133463.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c45133463.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c45133463.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c45141013.lua b/script/c45141013.lua deleted file mode 100644 index 95829c08c2..0000000000 --- a/script/c45141013.lua +++ /dev/null @@ -1,29 +0,0 @@ ---大熱波 -function c45141013.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c45141013.condition) - e1:SetOperation(c45141013.operation) - c:RegisterEffect(e1) -end -function c45141013.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()==PHASE_MAIN1 and not Duel.CheckPhaseActivity() -end -function c45141013.operation(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetTargetRange(1,1) - e1:SetTarget(c45141013.sumlimit) - e1:SetReset(RESET_PHASE+PHASE_END,2) - Duel.RegisterEffect(e1,tp) - local e2=e1:Clone() - e2:SetCode(EFFECT_CANNOT_SUMMON) - Duel.RegisterEffect(e2,tp) -end -function c45141013.sumlimit(e,c,sump,sumtype,sumpos,targetp) - return c:IsType(TYPE_EFFECT) -end diff --git a/script/c45141844.lua b/script/c45141844.lua deleted file mode 100644 index ad07279e9d..0000000000 --- a/script/c45141844.lua +++ /dev/null @@ -1,25 +0,0 @@ ---執念深き老魔術師 -function c45141844.initial_effect(c) - --flip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(45141844,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP) - e1:SetTarget(c45141844.target) - e1:SetOperation(c45141844.operation) - c:RegisterEffect(e1) -end -function c45141844.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsDestructable() end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c45141844.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c45159319.lua b/script/c45159319.lua deleted file mode 100644 index 2cd7d1b452..0000000000 --- a/script/c45159319.lua +++ /dev/null @@ -1,24 +0,0 @@ ---モアイ迎撃砲 -function c45159319.initial_effect(c) - --turn set - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(45159319,0)) - e1:SetCategory(CATEGORY_POSITION) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetTarget(c45159319.target) - e1:SetOperation(c45159319.operation) - c:RegisterEffect(e1) -end -function c45159319.target(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsCanTurnSet() and c:GetFlagEffect(45159319)==0 end - c:RegisterFlagEffect(45159319,RESET_EVENT+0x1fc0000+RESET_PHASE+PHASE_END,0,1) - Duel.SetOperationInfo(0,CATEGORY_POSITION,c,1,0,0) -end -function c45159319.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - Duel.ChangePosition(c,POS_FACEDOWN_DEFENCE) - end -end diff --git a/script/c45170821.lua b/script/c45170821.lua deleted file mode 100644 index 8a2d7cb02f..0000000000 --- a/script/c45170821.lua +++ /dev/null @@ -1,47 +0,0 @@ ---V・HERO アドレイション -function c45170821.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcFunRep(c,aux.FilterBoolFunction(Card.IsSetCard,0x8),2,true) - --summon success - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(45170821,0)) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCountLimit(1) - e2:SetRange(LOCATION_MZONE) - e2:SetTarget(c45170821.valtg) - e2:SetOperation(c45170821.valop) - c:RegisterEffect(e2) -end -function c45170821.sfilter(c) - return c:IsFaceup() and c:IsSetCard(0x8) -end -function c45170821.valtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) - and Duel.IsExistingTarget(c45170821.sfilter,tp,LOCATION_MZONE,0,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPPO) - local g1=Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil) - e:SetLabelObject(g1:GetFirst()) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SELF) - Duel.SelectTarget(tp,c45170821.sfilter,tp,LOCATION_MZONE,0,1,1,e:GetHandler()) -end -function c45170821.valop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local o=e:GetLabelObject() - local s=g:GetFirst() - if s==o then s=g:GetNext() end - if s:IsFaceup() and o:IsFaceup() and s:IsRelateToEffect(e) and o:IsRelateToEffect(e) then - local val=s:GetAttack()*-1 - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e1:SetValue(val) - o:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_UPDATE_DEFENCE) - o:RegisterEffect(e2) - end -end diff --git a/script/c45178472.lua b/script/c45178472.lua deleted file mode 100644 index 656e2a5cf6..0000000000 --- a/script/c45178472.lua +++ /dev/null @@ -1,34 +0,0 @@ ---フルハウス -function c45178472.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_END_PHASE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c45178472.target) - e1:SetOperation(c45178472.activate) - c:RegisterEffect(e1) -end -function c45178472.up(c) - return c:IsFaceup() and c:IsDestructable() and c:IsType(TYPE_SPELL+TYPE_TRAP) -end -function c45178472.down(c) - return c:IsFacedown() and c:IsDestructable() and c:IsType(TYPE_SPELL+TYPE_TRAP) -end -function c45178472.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - if chk==0 then return Duel.IsExistingTarget(c45178472.up,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,2,e:GetHandler()) - and Duel.IsExistingTarget(c45178472.down,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,3,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g1=Duel.SelectTarget(tp,c45178472.up,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,2,2,e:GetHandler()) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g2=Duel.SelectTarget(tp,c45178472.down,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,3,3,e:GetHandler()) - g1:Merge(g2) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g1,5,0,0) -end -function c45178472.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) - Duel.Destroy(g,REASON_EFFECT) -end diff --git a/script/c45184165.lua b/script/c45184165.lua deleted file mode 100644 index 4084322684..0000000000 --- a/script/c45184165.lua +++ /dev/null @@ -1,86 +0,0 @@ ---RR-スカル・イーグル -function c45184165.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e1:SetCountLimit(1,45184165) - e1:SetCondition(c45184165.thcon) - e1:SetCost(c45184165.thcost) - e1:SetTarget(c45184165.thtg) - e1:SetOperation(c45184165.thop) - c:RegisterEffect(e1) - --effect gain - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_BE_MATERIAL) - e2:SetCondition(c45184165.efcon) - e2:SetOperation(c45184165.efop) - c:RegisterEffect(e2) -end -function c45184165.thcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsReason(REASON_COST) and re:IsHasType(0x7e0) and re:IsActiveType(TYPE_MONSTER) - and c:IsPreviousLocation(LOCATION_OVERLAY) -end -function c45184165.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) -end -function c45184165.thfilter(c) - return c:IsSetCard(0xba) and c:IsAbleToHand() -end -function c45184165.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c45184165.thfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c45184165.thfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c45184165.thfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c45184165.thop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end -function c45184165.efcon(e,tp,eg,ep,ev,re,r,rp) - return r==REASON_XYZ -end -function c45184165.efop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local rc=c:GetReasonCard() - local e1=Effect.CreateEffect(rc) - e1:SetDescription(aux.Stringid(45184165,0)) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(c45184165.atkcon) - e1:SetOperation(c45184165.atkop) - e1:SetReset(RESET_EVENT+0x1fe0000) - rc:RegisterEffect(e1,true) - if not rc:IsType(TYPE_EFFECT) then - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_ADD_TYPE) - e2:SetValue(TYPE_EFFECT) - e2:SetReset(RESET_EVENT+0x1fe0000) - rc:RegisterEffect(e2,true) - end -end -function c45184165.atkcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_XYZ -end -function c45184165.atkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(300) - e1:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e1) - end -end diff --git a/script/c45206713.lua b/script/c45206713.lua deleted file mode 100644 index 02c3662a28..0000000000 --- a/script/c45206713.lua +++ /dev/null @@ -1,102 +0,0 @@ ---DDスワラル・スライム -function c45206713.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(1,45206713) - e1:SetTarget(c45206713.target) - e1:SetOperation(c45206713.operation) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_GRAVE) - e2:SetCountLimit(1,45206714) - e2:SetCost(c45206713.spcost) - e2:SetTarget(c45206713.sptg) - e2:SetOperation(c45206713.spop) - c:RegisterEffect(e2) -end -function c45206713.filter1(c,e) - return c:IsCanBeFusionMaterial() and not c:IsImmuneToEffect(e) -end -function c45206713.filter2(c,e,tp,m,f,gc) - return c:IsType(TYPE_FUSION) and c:IsSetCard(0x10af) and (not f or f(c)) - and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,gc) -end -function c45206713.target(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then - local mg1=Duel.GetMatchingGroup(Card.IsCanBeFusionMaterial,tp,LOCATION_HAND,0,c) - local res=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c45206713.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,c) - if not res then - local ce=Duel.GetChainMaterial(tp) - if ce~=nil then - local fgroup=ce:GetTarget() - local mg2=fgroup(ce,e,tp) - local mf=ce:GetValue() - res=Duel.IsExistingMatchingCard(c45206713.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,c) - end - end - return res - end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function c45206713.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) or c:IsImmuneToEffect(e) then return end - local mg1=Duel.GetMatchingGroup(c45206713.filter1,tp,LOCATION_HAND,0,c,e) - local sg1=Duel.GetMatchingGroup(c45206713.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,c) - local mg2=nil - local sg2=nil - local ce=Duel.GetChainMaterial(tp) - if ce~=nil then - local fgroup=ce:GetTarget() - mg2=fgroup(ce,e,tp) - local mf=ce:GetValue() - sg2=Duel.GetMatchingGroup(c45206713.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,mf,c) - end - if (Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and sg1:GetCount()>0) or (sg2~=nil and sg2:GetCount()>0) then - local sg=sg1:Clone() - if sg2 then sg:Merge(sg2) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local tg=sg:Select(tp,1,1,nil) - local tc=tg:GetFirst() - if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then - local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,c) - tc:SetMaterial(mat1) - Duel.SendtoGrave(mat1,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION) - Duel.BreakEffect() - Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP) - else - local mat2=Duel.SelectFusionMaterial(tp,tc,mg2,c) - local fop=ce:GetOperation() - fop(ce,e,tp,tc,mat2) - end - tc:CompleteProcedure() - end -end -function c45206713.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) -end -function c45206713.spfilter(c,e,tp) - return c:IsSetCard(0xaf) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c45206713.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c45206713.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c45206713.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c45206713.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c45215453.lua b/script/c45215453.lua deleted file mode 100644 index 350dc5099b..0000000000 --- a/script/c45215453.lua +++ /dev/null @@ -1,38 +0,0 @@ ---ヴァイロン・デルタ -function c45215453.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,nil,aux.NonTuner(Card.IsAttribute,ATTRIBUTE_LIGHT),1) - c:EnableReviveLimit() - --search - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(45215453,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetCountLimit(1) - e1:SetCondition(c45215453.thcon) - e1:SetTarget(c45215453.thtg) - e1:SetOperation(c45215453.thop) - c:RegisterEffect(e1) -end -function c45215453.thcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp and e:GetHandler():IsDefencePos() -end -function c45215453.filter(c) - return c:IsType(TYPE_EQUIP) and c:IsAbleToHand() -end -function c45215453.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c45215453.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c45215453.thop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFacedown() or c:IsAttackPos() or not c:IsRelateToEffect(e) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c45215453.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c45222299.lua b/script/c45222299.lua deleted file mode 100644 index 6866f4b53a..0000000000 --- a/script/c45222299.lua +++ /dev/null @@ -1,31 +0,0 @@ ---イビリチュア・ガストクラーケ -function c45222299.initial_effect(c) - c:EnableReviveLimit() - --confirm - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(45222299,0)) - e1:SetCategory(CATEGORY_TODECK) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(c45222299.condition) - e1:SetTarget(c45222299.target) - e1:SetOperation(c45222299.operation) - c:RegisterEffect(e1) -end -function c45222299.condition(e,tp,eg,ep,ev,re,r,rp) - return bit.band(e:GetHandler():GetSummonType(),SUMMON_TYPE_RITUAL)==SUMMON_TYPE_RITUAL -end -function c45222299.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,0,LOCATION_HAND) -end -function c45222299.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)==0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) - local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND):RandomSelect(tp,2) - Duel.ConfirmCards(tp,g) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local sg=g:Select(tp,1,1,nil) - Duel.SendtoDeck(sg,nil,2,REASON_EFFECT) - Duel.ShuffleHand(1-tp) -end diff --git a/script/c45231177.lua b/script/c45231177.lua deleted file mode 100644 index 907f11c7aa..0000000000 --- a/script/c45231177.lua +++ /dev/null @@ -1,6 +0,0 @@ ---炎の剣士 -function c45231177.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcCode2(c,34460851,44287299,true,true) -end diff --git a/script/c45247637.lua b/script/c45247637.lua deleted file mode 100644 index 14c2429a88..0000000000 --- a/script/c45247637.lua +++ /dev/null @@ -1,85 +0,0 @@ ---薔薇の刻印 -function c45247637.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_CONTROL+CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCost(c45247637.cost) - e1:SetTarget(c45247637.target) - e1:SetOperation(c45247637.operation) - c:RegisterEffect(e1) - --control - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(45247637,0)) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) - e2:SetRange(LOCATION_SZONE) - e2:SetCountLimit(1) - e2:SetCondition(c45247637.ccon) - e2:SetOperation(c45247637.cop1) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EVENT_PHASE+PHASE_END) - e3:SetOperation(c45247637.cop2) - c:RegisterEffect(e3) - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_EQUIP) - e4:SetCode(EFFECT_SET_CONTROL) - e4:SetValue(c45247637.ctval) - c:RegisterEffect(e4) - e2:SetLabelObject(e4) - e3:SetLabelObject(e4) - --Equip limit - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_SINGLE) - e5:SetCode(EFFECT_EQUIP_LIMIT) - e5:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e5:SetValue(c45247637.eqlimit) - c:RegisterEffect(e5) -end -function c45247637.costfilter(c) - return c:IsRace(RACE_PLANT) and c:IsAbleToRemove() -end -function c45247637.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c45247637.costfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c45247637.costfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c45247637.filter(c) - return c:IsFaceup() and c:IsControlerCanBeChanged() -end -function c45247637.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:GetLocation()==LOCATION_MZONE and chkc:GetControler()~=tp and c45247637.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c45247637.filter,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) - local g=Duel.SelectTarget(tp,c45247637.filter,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c45247637.eqlimit(e,c) - return e:GetHandlerPlayer()~=c:GetControler() or e:GetHandler():GetEquipTarget()==c -end -function c45247637.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsRelateToEffect(e) then - Duel.Equip(tp,c,tc) - end -end -function c45247637.ccon(e,tp,eg,ep,ev,re,r,rp) - return tp==Duel.GetTurnPlayer() -end -function c45247637.cop1(e,tp,eg,ep,ev,re,r,rp) - local ce=e:GetLabelObject() - if ce then ce:SetValue(tp) end -end -function c45247637.cop2(e,tp,eg,ep,ev,re,r,rp) - local ce=e:GetLabelObject() - if ce then ce:SetValue(1-tp) end -end -function c45247637.ctval(e,c) - return e:GetHandlerPlayer() -end diff --git a/script/c45282603.lua b/script/c45282603.lua deleted file mode 100644 index 545cca9cc4..0000000000 --- a/script/c45282603.lua +++ /dev/null @@ -1,30 +0,0 @@ ---召喚師セームベル -function c45282603.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(45282603,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetProperty(EFFECT_FLAG_NO_TURN_RESET) - e1:SetCountLimit(1) - e1:SetTarget(c45282603.sptg) - e1:SetOperation(c45282603.spop) - c:RegisterEffect(e1) -end -function c45282603.filter(c,lv,e,tp) - return c:GetLevel()==lv and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c45282603.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c45282603.filter,tp,LOCATION_HAND,0,1,nil,e:GetHandler():GetLevel(),e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c45282603.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c45282603.filter,tp,LOCATION_HAND,0,1,1,nil,e:GetHandler():GetLevel(),e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c45286019.lua b/script/c45286019.lua deleted file mode 100644 index 46e36c0c82..0000000000 --- a/script/c45286019.lua +++ /dev/null @@ -1,64 +0,0 @@ ---ギアギアーノ Mk-III -function c45286019.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(45286019,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCountLimit(1,45286019) - e1:SetCondition(c45286019.spcon) - e1:SetCost(c45286019.spcost) - e1:SetTarget(c45286019.sptg) - e1:SetOperation(c45286019.spop) - c:RegisterEffect(e1) - Duel.AddCustomActivityCounter(45286019,ACTIVITY_SPSUMMON,c45286019.counterfilter) -end -function c45286019.counterfilter(c) - return c:IsSetCard(0x72) -end -function c45286019.spcon(e,tp,eg,ep,ev,re,r,rp) - return re:GetHandler():IsSetCard(0x72) -end -function c45286019.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetCustomActivityCount(45286019,tp,ACTIVITY_SPSUMMON)==0 end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) - e1:SetTargetRange(1,0) - e1:SetTarget(c45286019.splimit) - Duel.RegisterEffect(e1,tp) -end -function c45286019.splimit(e,c,sump,sumtype,sumpos,targetp,se) - return not c:IsSetCard(0x72) -end -function c45286019.filter(c,e,tp) - return c:IsSetCard(0x72) and not c:IsCode(45286019) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) - and not c:IsHasEffect(EFFECT_NECRO_VALLEY) -end -function c45286019.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c45286019.filter,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_HAND) -end -function c45286019.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c45286019.filter,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,1,nil,e,tp) - local tc=g:GetFirst() - if tc then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENCE) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e2) - end -end diff --git a/script/c45298492.lua b/script/c45298492.lua deleted file mode 100644 index b7c319f015..0000000000 --- a/script/c45298492.lua +++ /dev/null @@ -1,29 +0,0 @@ ---スカー・ウォリアー -function c45298492.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1) - c:EnableReviveLimit() - --cannot be battle target - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(0,LOCATION_MZONE) - e1:SetValue(c45298492.atlimit) - c:RegisterEffect(e1) - --battle indes - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EFFECT_INDESTRUCTABLE_COUNT) - e2:SetCountLimit(1) - e2:SetValue(c45298492.valcon) - c:RegisterEffect(e2) -end -function c45298492.atlimit(e,c) - return c~=e:GetHandler() and c:IsFaceup() and c:IsRace(RACE_WARRIOR) -end -function c45298492.valcon(e,re,r,rp) - return bit.band(r,REASON_BATTLE)~=0 -end diff --git a/script/c45305419.lua b/script/c45305419.lua deleted file mode 100644 index ef93f8013f..0000000000 --- a/script/c45305419.lua +++ /dev/null @@ -1,57 +0,0 @@ ---継承の印 -function c45305419.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c45305419.target) - e1:SetOperation(c45305419.operation) - c:RegisterEffect(e1) - --Destroy - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE) - e2:SetCode(EVENT_LEAVE_FIELD) - e2:SetOperation(c45305419.desop) - c:RegisterEffect(e2) -end -function c45305419.filter(c,e,tp) - return c:IsCanBeSpecialSummoned(e,0,tp,false,false) - and Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_GRAVE,0,2,c,c:GetCode()) -end -function c45305419.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c45305419.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c45305419.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c45305419.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c45305419.eqlimit(e,c) - return e:GetOwner()==c -end -function c45305419.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then - if Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)==0 then return end - Duel.Equip(tp,c,tc) - --Add Equip limit - local e1=Effect.CreateEffect(tc) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(c45305419.eqlimit) - c:RegisterEffect(e1) - end -end -function c45305419.desop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=c:GetFirstCardTarget() - if c:IsReason(REASON_DESTROY) and tc and tc:IsLocation(LOCATION_MZONE) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c45311864.lua b/script/c45311864.lua deleted file mode 100644 index c3b69434f9..0000000000 --- a/script/c45311864.lua +++ /dev/null @@ -1,20 +0,0 @@ ---盗人ゴブリン -function c45311864.initial_effect(c) - --recover&damage - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCategory(CATEGORY_RECOVER+CATEGORY_DAMAGE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c45311864.target) - e1:SetOperation(c45311864.operation) - c:RegisterEffect(e1) -end -function c45311864.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,500) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,500) -end -function c45311864.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.Damage(1-tp,500,REASON_EFFECT) - Duel.Recover(tp,500,REASON_EFFECT) -end diff --git a/script/c45349196.lua b/script/c45349196.lua deleted file mode 100644 index ec01bccf3f..0000000000 --- a/script/c45349196.lua +++ /dev/null @@ -1,64 +0,0 @@ ---悪魔竜ブラック・デーモンズ・ドラゴン -function c45349196.initial_effect(c) - c:SetSPSummonOnce(45349196) - --fusion material - aux.AddFusionProcFun2(c,c45349196.mfilter1,c45349196.mfilter2,true) - c:EnableReviveLimit() - --aclimit - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_ACTIVATE) - e1:SetRange(LOCATION_MZONE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetTargetRange(0,1) - e1:SetCondition(c45349196.accon) - e1:SetValue(c45349196.aclimit) - c:RegisterEffect(e1) - --damage - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_DAMAGE+CATEGORY_TODECK) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_PHASE+PHASE_BATTLE) - e2:SetRange(LOCATION_MZONE) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCountLimit(1) - e2:SetCondition(c45349196.damcon) - e2:SetTarget(c45349196.damtg) - e2:SetOperation(c45349196.damop) - c:RegisterEffect(e2) -end -function c45349196.mfilter1(c) - return c:IsSetCard(0x45) and c:IsType(TYPE_NORMAL) and c:GetLevel()==6 -end -function c45349196.mfilter2(c) - return c:IsSetCard(0x3b) and c:IsType(TYPE_NORMAL) -end -function c45349196.accon(e) - return Duel.GetAttacker()==e:GetHandler() or Duel.GetAttackTarget()==e:GetHandler() -end -function c45349196.aclimit(e,re,tp) - return not re:GetHandler():IsImmuneToEffect(e) -end -function c45349196.damcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:GetSummonType()==SUMMON_TYPE_FUSION and c:GetBattledGroupCount()>0 -end -function c45349196.filter(c) - return c:IsSetCard(0x3b) and c:IsType(TYPE_NORMAL) and c:IsAbleToDeck() -end -function c45349196.damtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c45349196.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c45349196.filter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - local g=Duel.SelectTarget(tp,c45349196.filter,tp,LOCATION_GRAVE,0,1,1,nil) - local atk=g:GetFirst():GetBaseAttack() - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,atk) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0) -end -function c45349196.damop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.Damage(1-tp,tc:GetBaseAttack(),REASON_EFFECT)~=0 then - Duel.BreakEffect() - Duel.SendtoDeck(tc,nil,2,REASON_EFFECT) - end -end diff --git a/script/c45358284.lua b/script/c45358284.lua deleted file mode 100644 index 7fbc3daed2..0000000000 --- a/script/c45358284.lua +++ /dev/null @@ -1,54 +0,0 @@ ---ミラー・レディバグ -function c45358284.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c45358284.spcon) - e1:SetValue(1) - c:RegisterEffect(e1) - --level change - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(45358284,0)) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetCondition(c45358284.lvcon) - e2:SetOperation(c45358284.lvop) - c:RegisterEffect(e2) - --destroy - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e3:SetRange(LOCATION_MZONE) - e3:SetCode(EFFECT_SELF_DESTROY) - e3:SetCondition(c45358284.descon) - c:RegisterEffect(e3) -end -function c45358284.spcon(e,c) - if c==nil then return true end - return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(Card.IsFaceup,c:GetControler(),LOCATION_MZONE,0,1,nil) - and not Duel.IsExistingMatchingCard(Card.IsType,c:GetControler(),LOCATION_GRAVE,0,1,nil,TYPE_MONSTER) -end -function c45358284.lvcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+1 -end -function c45358284.lvop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) then return end - local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,c) - local lvs=g:GetSum(Card.GetLevel) - if lvs~=0 then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CHANGE_LEVEL) - e1:SetValue(lvs) - e1:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e1) - end -end -function c45358284.descon(e) - return e:GetHandler():GetLevel()>12 -end diff --git a/script/c45379225.lua b/script/c45379225.lua deleted file mode 100644 index 415212a95d..0000000000 --- a/script/c45379225.lua +++ /dev/null @@ -1,36 +0,0 @@ ---サイコ・ヘルストランサー -function c45379225.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1) - c:EnableReviveLimit() - --recover - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(45379225,0)) - e1:SetCategory(CATEGORY_RECOVER) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c45379225.cost) - e1:SetTarget(c45379225.target) - e1:SetOperation(c45379225.operation) - c:RegisterEffect(e1) -end -function c45379225.filter(c) - return c:IsRace(RACE_PSYCHO) and c:IsAbleToRemoveAsCost() -end -function c45379225.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c45379225.filter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c45379225.filter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c45379225.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(1200) - Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,1200) -end -function c45379225.operation(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Recover(p,d,REASON_EFFECT) -end diff --git a/script/c45410988.lua b/script/c45410988.lua deleted file mode 100644 index abc2cdd81b..0000000000 --- a/script/c45410988.lua +++ /dev/null @@ -1,46 +0,0 @@ ---レッドアイズ・トランスマイグレーション -function c45410988.initial_effect(c) - --activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c45410988.target) - e1:SetOperation(c45410988.activate) - c:RegisterEffect(e1) -end -function c45410988.filter(c,e,tp,m1,m2) - if not c:IsCode(19025379) or not c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true) then return false end - local mg=m1:Filter(Card.IsCanBeRitualMaterial,c,c) - mg:Merge(m2) - return mg:CheckWithSumGreater(Card.GetRitualLevel,8,c) -end -function c45410988.mfilter(c) - return c:IsSetCard(0x3b) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemove() -end -function c45410988.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local mg1=Duel.GetRitualMaterial(tp) - local mg2=Duel.GetMatchingGroup(c45410988.mfilter,tp,LOCATION_GRAVE,0,nil) - return Duel.IsExistingMatchingCard(c45410988.filter,tp,LOCATION_HAND,0,1,nil,e,tp,mg1,mg2) - end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c45410988.activate(e,tp,eg,ep,ev,re,r,rp) - local mg1=Duel.GetRitualMaterial(tp) - local mg2=Duel.GetMatchingGroup(c45410988.mfilter,tp,LOCATION_GRAVE,0,nil) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c45410988.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp,mg1,mg2) - local tc=g:GetFirst() - if tc then - local mg=mg1:Filter(Card.IsCanBeRitualMaterial,tc,tc) - mg:Merge(mg2) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) - local mat=mg:SelectWithSumGreater(tp,Card.GetRitualLevel,8,tc) - tc:SetMaterial(mat) - Duel.ReleaseRitualMaterial(mat) - Duel.BreakEffect() - Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP) - tc:CompleteProcedure() - end -end diff --git a/script/c45425051.lua b/script/c45425051.lua deleted file mode 100644 index 3d3317ea70..0000000000 --- a/script/c45425051.lua +++ /dev/null @@ -1,22 +0,0 @@ ---妖精王オベロン -function c45425051.initial_effect(c) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetCondition(c45425051.con) - e1:SetTarget(c45425051.tg) - e1:SetValue(500) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_UPDATE_DEFENCE) - e2:SetValue(500) - c:RegisterEffect(e2) -end -function c45425051.con(e) - return e:GetHandler():IsDefencePos() -end -function c45425051.tg(e,c) - return c:IsRace(RACE_PLANT) -end diff --git a/script/c4542651.lua b/script/c4542651.lua deleted file mode 100644 index 5be1ae0cfd..0000000000 --- a/script/c4542651.lua +++ /dev/null @@ -1,16 +0,0 @@ ---カオス・シールド -function c4542651.initial_effect(c) - --activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --Def up - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(LOCATION_MZONE,0) - e2:SetCode(EFFECT_UPDATE_DEFENCE) - e2:SetValue(300) - c:RegisterEffect(e2) -end diff --git a/script/c45439263.lua b/script/c45439263.lua deleted file mode 100644 index 566431621e..0000000000 --- a/script/c45439263.lua +++ /dev/null @@ -1,16 +0,0 @@ ---ラヴァル・コアトル -function c45439263.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c45439263.spcon) - c:RegisterEffect(e1) -end -function c45439263.spcon(e,c) - if c==nil then return true end - if Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)<=0 then return false end - return Duel.GetMatchingGroup(Card.IsSetCard,c:GetControler(),LOCATION_GRAVE,0,nil,0x39):GetClassCount(Card.GetCode)>=3 -end diff --git a/script/c45450218.lua b/script/c45450218.lua deleted file mode 100644 index fa991b51af..0000000000 --- a/script/c45450218.lua +++ /dev/null @@ -1,47 +0,0 @@ ---A・O・J リーサル・ウェポン -function c45450218.initial_effect(c) - --check - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_BATTLED) - e1:SetOperation(c45450218.checkop) - c:RegisterEffect(e1) - --draw - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(45450218,0)) - e2:SetCategory(CATEGORY_DRAW+CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EVENT_BATTLE_DESTROYED) - e2:SetCondition(c45450218.condition) - e2:SetTarget(c45450218.target) - e2:SetOperation(c45450218.operation) - e2:SetLabelObject(e1) - c:RegisterEffect(e2) -end -function c45450218.checkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetAttacker() - if tc==c then tc=Duel.GetAttackTarget() end - if tc and tc:IsAttribute(ATTRIBUTE_LIGHT) then e:SetLabel(1) - else e:SetLabel(0) end -end -function c45450218.condition(e,tp,eg,ep,ev,re,r,rp) - local dg=eg:GetFirst() - return eg:GetCount()==1 and dg:IsLocation(LOCATION_GRAVE) and dg:IsReason(REASON_BATTLE) - and dg:IsAttribute(ATTRIBUTE_LIGHT) and dg:GetReasonCard()==e:GetHandler() and e:GetLabelObject():GetLabel()==1 -end -function c45450218.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c45450218.operation(e,tp,eg,ep,ev,re,r,rp) - local ct=Duel.Draw(tp,1,REASON_EFFECT) - if ct==0 or Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local tc=Duel.GetOperatedGroup():GetFirst() - if tc:GetLevel()<=4 and tc:IsAttribute(ATTRIBUTE_DARK) and tc:IsCanBeSpecialSummoned(e,0,tp,false,false) - and Duel.SelectYesNo(tp,aux.Stringid(45450218,1)) then - Duel.ConfirmCards(1-tp,tc) - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c45452224.lua b/script/c45452224.lua deleted file mode 100644 index 938b63545a..0000000000 --- a/script/c45452224.lua +++ /dev/null @@ -1,105 +0,0 @@ ---金華猫 -function c45452224.initial_effect(c) - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(aux.FALSE) - c:RegisterEffect(e1) - --summon,flip - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetCode(EVENT_SUMMON_SUCCESS) - e2:SetOperation(c45452224.retreg) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EVENT_FLIP) - c:RegisterEffect(e3) - --spsummon - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(45452224,1)) - e4:SetCategory(CATEGORY_SPECIAL_SUMMON) - e4:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e4:SetCode(EVENT_SUMMON_SUCCESS) - e4:SetTarget(c45452224.sptg) - e4:SetOperation(c45452224.spop) - c:RegisterEffect(e4) - local e5=e4:Clone() - e5:SetCode(EVENT_FLIP) - c:RegisterEffect(e5) - --leave field - local e6=Effect.CreateEffect(c) - e6:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e6:SetCode(EVENT_LEAVE_FIELD) - e6:SetOperation(c45452224.leave) - c:RegisterEffect(e6) - e4:SetLabelObject(e6) - e5:SetLabelObject(e6) -end -function c45452224.filter(c,e,tp) - return c:GetLevel()==1 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c45452224.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c45452224.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c45452224.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c45452224.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c45452224.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)>0 and c:IsRelateToEffect(e) then - c:SetCardTarget(tc) - e:GetLabelObject():SetLabelObject(tc) - c:CreateRelation(tc,RESET_EVENT+0x5020000) - tc:CreateRelation(c,RESET_EVENT+0x1fe0000) - end -end -function c45452224.retreg(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - --to hand - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetDescription(aux.Stringid(45452224,0)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetReset(RESET_EVENT+0x1ee0000+RESET_PHASE+PHASE_END) - e1:SetCondition(c45452224.retcon) - e1:SetTarget(c45452224.rettg) - e1:SetOperation(c45452224.retop) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - c:RegisterEffect(e2) -end -function c45452224.retcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsHasEffect(EFFECT_SPIRIT_DONOT_RETURN) then return false end - if e:IsHasType(EFFECT_TYPE_TRIGGER_F) then - return not c:IsHasEffect(EFFECT_SPIRIT_MAYNOT_RETURN) - else return c:IsHasEffect(EFFECT_SPIRIT_MAYNOT_RETURN) end -end -function c45452224.rettg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0) -end -function c45452224.retop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - Duel.SendtoHand(c,nil,REASON_EFFECT) - end -end -function c45452224.leave(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=e:GetLabelObject() - if tc and c:IsRelateToCard(tc) and tc:IsRelateToCard(c) then - Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) - end -end diff --git a/script/c4545683.lua b/script/c4545683.lua deleted file mode 100644 index 6dddfa1c8c..0000000000 --- a/script/c4545683.lua +++ /dev/null @@ -1,136 +0,0 @@ ---機皇帝グランエル∞ -function c4545683.initial_effect(c) - c:EnableReviveLimit() - --special summon condition - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(0) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(4545683,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetRange(LOCATION_HAND) - e2:SetCondition(c4545683.spcon) - e2:SetTarget(c4545683.sptg) - e2:SetOperation(c4545683.spop) - c:RegisterEffect(e2) - --atk,def up - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e3:SetRange(LOCATION_MZONE) - e3:SetCode(EFFECT_UPDATE_ATTACK) - e3:SetValue(c4545683.val) - c:RegisterEffect(e3) - local e4=e3:Clone() - e4:SetCode(EFFECT_UPDATE_DEFENCE) - c:RegisterEffect(e4) - --equip - local e5=Effect.CreateEffect(c) - e5:SetDescription(aux.Stringid(4545683,1)) - e5:SetCategory(CATEGORY_EQUIP) - e5:SetType(EFFECT_TYPE_IGNITION) - e5:SetProperty(EFFECT_FLAG_CARD_TARGET) - e5:SetRange(LOCATION_MZONE) - e5:SetCountLimit(1) - e5:SetTarget(c4545683.eqtg) - e5:SetOperation(c4545683.eqop) - c:RegisterEffect(e5) - --special summon equip - local e6=Effect.CreateEffect(c) - e6:SetDescription(aux.Stringid(4545683,2)) - e6:SetCategory(CATEGORY_SPECIAL_SUMMON) - e6:SetType(EFFECT_TYPE_IGNITION) - e6:SetProperty(EFFECT_FLAG_CARD_TARGET) - e6:SetRange(LOCATION_MZONE) - e6:SetCountLimit(1) - e6:SetTarget(c4545683.sptg2) - e6:SetOperation(c4545683.spop2) - c:RegisterEffect(e6) -end -function c4545683.filter(c,tp) - return c:IsType(TYPE_MONSTER) and bit.band(c:GetReason(),0x41)==0x41 and c:GetPreviousControler()==tp - and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP) -end -function c4545683.spcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c4545683.filter,1,nil,tp) -end -function c4545683.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,true) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c4545683.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,true,true,POS_FACEUP)>0 then - c:CompleteProcedure() - end -end -function c4545683.val(e,c) - return Duel.GetLP(c:GetControler())/2 -end -function c4545683.eqfilter(c) - return c:IsFaceup() and c:IsType(TYPE_SYNCHRO) and c:IsAbleToChangeControler() -end -function c4545683.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c4545683.eqfilter(chkc) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingTarget(c4545683.eqfilter,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local g=Duel.SelectTarget(tp,c4545683.eqfilter,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0) -end -function c4545683.eqlimit(e,c) - return e:GetOwner()==c and not c:IsDisabled() -end -function c4545683.eqop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) and tc:IsType(TYPE_MONSTER) then - if c:IsFaceup() and c:IsRelateToEffect(e) then - local atk=tc:GetTextAttack() - if atk<0 then atk=0 end - if not Duel.Equip(tp,tc,c,false) then return end - tc:RegisterFlagEffect(4545683,RESET_EVENT+0x1fe0000,0,0) - --Add Equip limit - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_COPY_INHERIT+EFFECT_FLAG_OWNER_RELATE) - e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(c4545683.eqlimit) - tc:RegisterEffect(e1) - if atk>0 then - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_OWNER_RELATE) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetReset(RESET_EVENT+0x1fe0000) - e2:SetValue(atk) - tc:RegisterEffect(e2) - end - else Duel.SendtoGrave(tc,REASON_EFFECT) end - end -end -function c4545683.spfilter(c,e,tp,ec) - return c:GetFlagEffect(4545683)~=0 and c:GetEquipTarget()==ec and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c4545683.sptg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_SZONE) and chkc:IsControler(tp) and c4545683.spfilter(chkc,e,tp,e:GetHandler()) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c4545683.spfilter,tp,LOCATION_SZONE,0,1,nil,e,tp,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c4545683.spfilter,tp,LOCATION_SZONE,0,1,1,nil,e,tp,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c4545683.spop2(e,tp,eg,ep,ev,re,r,rp,chk) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENCE) - end -end diff --git a/script/c45458027.lua b/script/c45458027.lua deleted file mode 100644 index afd1b0aff9..0000000000 --- a/script/c45458027.lua +++ /dev/null @@ -1,50 +0,0 @@ ---ネジマキシキガミ -function c45458027.initial_effect(c) - c:EnableReviveLimit() - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c45458027.spcon) - c:RegisterEffect(e1) - --atk - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(45458027,0)) - e2:SetCategory(CATEGORY_ATKCHANGE) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetTarget(c45458027.target) - e2:SetOperation(c45458027.operation) - c:RegisterEffect(e2) -end -function c45458027.cfilter(c) - return c:GetRace()~=RACE_MACHINE -end -function c45458027.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return false end - local g=Duel.GetMatchingGroup(Card.IsType,tp,LOCATION_GRAVE,0,nil,TYPE_MONSTER) - return g:GetCount()>0 and not g:IsExists(c45458027.cfilter,1,nil) -end -function c45458027.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsFaceup() and chkc:IsLocation(LOCATION_MZONE) end - if chk==0 then return Duel.IsExistingTarget(aux.nzatk,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,aux.nzatk,tp,0,LOCATION_MZONE,1,1,nil) -end -function c45458027.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e1:SetValue(0) - tc:RegisterEffect(e1) - end -end diff --git a/script/c4545854.lua b/script/c4545854.lua deleted file mode 100644 index 1949553f06..0000000000 --- a/script/c4545854.lua +++ /dev/null @@ -1,50 +0,0 @@ ---エクシーズ・テリトリー -function c4545854.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --ad up - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_DAMAGE_CALCULATING) - e2:SetRange(LOCATION_SZONE) - e2:SetOperation(c4545854.atkup) - c:RegisterEffect(e2) - --Destroy replace - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_DESTROY_REPLACE) - e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e3:SetRange(LOCATION_SZONE) - e3:SetTarget(c4545854.desreptg) - c:RegisterEffect(e3) -end -function c4545854.atkup(e,tp,eg,ep,ev,re,r,rp,chk) - local a=Duel.GetAttacker() - local d=Duel.GetAttackTarget() - if not d then return end - c4545854.adup(a,e:GetHandler()) - c4545854.adup(d,e:GetHandler()) -end -function c4545854.adup(c,oc) - if not c:IsType(TYPE_XYZ) then return end - local e1=Effect.CreateEffect(oc) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_PHASE+RESET_DAMAGE_CAL) - e1:SetValue(c:GetRank()*200) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_UPDATE_DEFENCE) - c:RegisterEffect(e2) -end -function c4545854.desreptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return not e:GetHandler():IsReason(REASON_RULE) - and Duel.CheckRemoveOverlayCard(tp,1,0,1,REASON_EFFECT) end - if Duel.SelectYesNo(tp,aux.Stringid(4545854,0)) then - Duel.RemoveOverlayCard(tp,1,0,1,1,REASON_EFFECT) - return true - else return false end -end diff --git a/script/c45462639.lua b/script/c45462639.lua deleted file mode 100644 index f3e0a07ac2..0000000000 --- a/script/c45462639.lua +++ /dev/null @@ -1,77 +0,0 @@ ---闇紅の魔導師 -function c45462639.initial_effect(c) - c:EnableCounterPermit(0x3001) - --summon success - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(45462639,0)) - e1:SetCategory(CATEGORY_COUNTER) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c45462639.addct) - e1:SetOperation(c45462639.addc) - c:RegisterEffect(e1) - --add counter - local e0=Effect.CreateEffect(c) - e0:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e0:SetCode(EVENT_CHAINING) - e0:SetRange(LOCATION_MZONE) - e0:SetOperation(aux.chainreg) - c:RegisterEffect(e0) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e2:SetCode(EVENT_CHAIN_SOLVED) - e2:SetRange(LOCATION_MZONE) - e2:SetOperation(c45462639.acop) - c:RegisterEffect(e2) - --attackup - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e3:SetRange(LOCATION_MZONE) - e3:SetCode(EFFECT_UPDATE_ATTACK) - e3:SetValue(c45462639.attackup) - c:RegisterEffect(e3) - --destroy - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(45462639,1)) - e4:SetCategory(CATEGORY_HANDES) - e4:SetType(EFFECT_TYPE_IGNITION) - e4:SetRange(LOCATION_MZONE) - e4:SetCountLimit(1) - e4:SetCost(c45462639.descost) - e4:SetTarget(c45462639.destarg) - e4:SetOperation(c45462639.desop) - c:RegisterEffect(e4) -end -function c45462639.addct(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,2,0,0x3001) -end -function c45462639.addc(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - e:GetHandler():AddCounter(0x3001,2) - end -end -function c45462639.acop(e,tp,eg,ep,ev,re,r,rp) - if re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL) and e:GetHandler():GetFlagEffect(1)>0 then - e:GetHandler():AddCounter(0x3001,1) - end -end -function c45462639.attackup(e,c) - return c:GetCounter(0x3001)*300 -end -function c45462639.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsCanRemoveCounter(tp,0x3001,2,REASON_COST) end - e:GetHandler():RemoveCounter(tp,0x3001,2,REASON_COST) -end -function c45462639.destarg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0 end - Duel.SetOperationInfo(0,CATEGORY_HANDES,0,0,1-tp,1) -end -function c45462639.desop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND,nil) - if g:GetCount()==0 then return end - local sg=g:RandomSelect(1-tp,1) - Duel.SendtoGrave(sg,REASON_DISCARD+REASON_EFFECT) -end diff --git a/script/c4549095.lua b/script/c4549095.lua deleted file mode 100644 index 6854209768..0000000000 --- a/script/c4549095.lua +++ /dev/null @@ -1,40 +0,0 @@ ---BK カウンターブロー -function c4549095.initial_effect(c) - --atkup - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetDescription(aux.Stringid(4549095,0)) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetRange(LOCATION_HAND+LOCATION_GRAVE) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e1:SetCountLimit(1,4549095) - e1:SetCondition(c4549095.condition) - e1:SetCost(c4549095.cost) - e1:SetOperation(c4549095.operation) - c:RegisterEffect(e1) -end -function c4549095.condition(e,tp,eg,ep,ev,re,r,rp) - local phase=Duel.GetCurrentPhase() - if phase~=PHASE_DAMAGE or Duel.IsDamageCalculated() then return false end - local a=Duel.GetAttacker() - local d=Duel.GetAttackTarget() - return (a:GetControler()==tp and a:IsSetCard(0x84) and a:IsRelateToBattle()) - or (d and d:GetControler()==tp and d:IsSetCard(0x84) and d:IsRelateToBattle()) -end -function c4549095.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) -end -function c4549095.operation(e,tp,eg,ep,ev,re,r,rp,chk) - local a=Duel.GetAttacker() - if Duel.GetTurnPlayer()~=tp then a=Duel.GetAttackTarget() end - if not a:IsRelateToBattle() then return end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e1:SetValue(1000) - a:RegisterEffect(e1) -end diff --git a/script/c45496268.lua b/script/c45496268.lua deleted file mode 100644 index c2641b327b..0000000000 --- a/script/c45496268.lua +++ /dev/null @@ -1,71 +0,0 @@ ---SDロボ・エレファン -function c45496268.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(45496268,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c45496268.sumtg) - e1:SetOperation(c45496268.sumop) - c:RegisterEffect(e1) - --lvchange - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(45496268,1)) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetTarget(c45496268.lvtg) - e2:SetOperation(c45496268.lvop) - c:RegisterEffect(e2) - --xyzlimit - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e3:SetValue(c45496268.xyzlimit) - c:RegisterEffect(e3) -end -function c45496268.filter(c,e,tp) - return (c:IsSetCard(0x85) or c:IsCode(71071546)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c45496268.sumtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c45496268.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c45496268.sumop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c45496268.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end -function c45496268.lvfilter(c) - return c:IsFaceup() and (c:IsSetCard(0x85) or c:IsCode(71071546)) and c:GetLevel()~=8 -end -function c45496268.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c45496268.lvfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c45496268.lvfilter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c45496268.lvfilter,tp,LOCATION_MZONE,0,1,1,nil) -end -function c45496268.lvop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_CHANGE_LEVEL) - e1:SetValue(8) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - end -end -function c45496268.xyzlimit(e,c) - if not c then return false end - return not c:IsRace(RACE_MACHINE) -end diff --git a/script/c45500495.lua b/script/c45500495.lua deleted file mode 100644 index 9e9b0c6994..0000000000 --- a/script/c45500495.lua +++ /dev/null @@ -1,28 +0,0 @@ ---ヘル・ブランブル -function c45500495.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,nil,aux.NonTuner(Card.IsRace,RACE_PLANT),1) - c:EnableReviveLimit() - --cost - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SUMMON_COST) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(LOCATION_HAND,LOCATION_HAND) - e1:SetTarget(c45500495.sumtg) - e1:SetCost(c45500495.ccost) - e1:SetOperation(c45500495.acop) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_SPSUMMON_COST) - c:RegisterEffect(e2) -end -function c45500495.sumtg(e,c) - return c:GetRace()~=RACE_PLANT -end -function c45500495.ccost(e,c,tp) - return Duel.CheckLPCost(tp,1000) -end -function c45500495.acop(e,tp,eg,ep,ev,re,r,rp) - Duel.PayLPCost(tp,1000) -end diff --git a/script/c45533023.lua b/script/c45533023.lua deleted file mode 100644 index 76d1125166..0000000000 --- a/script/c45533023.lua +++ /dev/null @@ -1,71 +0,0 @@ ---RR-ブレイズ・ファルコン -function c45533023.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsRace,RACE_WINDBEAST),5,3) - c:EnableReviveLimit() - --direct attack - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DIRECT_ATTACK) - e1:SetCondition(c45533023.dacon) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_BATTLE_DAMAGE) - e2:SetCondition(c45533023.descon) - e2:SetTarget(c45533023.destg1) - e2:SetOperation(c45533023.desop1) - c:RegisterEffect(e2) - --destroy - local e3=Effect.CreateEffect(c) - e3:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1) - e3:SetCost(c45533023.descost) - e3:SetTarget(c45533023.destg2) - e3:SetOperation(c45533023.desop2) - c:RegisterEffect(e3) -end -function c45533023.dacon(e) - return e:GetHandler():GetOverlayCount()>0 -end -function c45533023.descon(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp -end -function c45533023.destg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsDestructable() end - if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c45533023.desop1(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end -function c45533023.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c45533023.filter(c) - return bit.band(c:GetSummonType(),SUMMON_TYPE_SPECIAL)==SUMMON_TYPE_SPECIAL and c:IsDestructable() -end -function c45533023.destg2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c45533023.filter,tp,0,LOCATION_MZONE,1,nil) end - local g=Duel.GetMatchingGroup(c45533023.filter,tp,0,LOCATION_MZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,g:GetCount()*500) -end -function c45533023.desop2(e,tp,eg,ep,ev,re,r,rp) - local sg=Duel.GetMatchingGroup(c45533023.filter,tp,0,LOCATION_MZONE,nil) - local ct=Duel.Destroy(sg,REASON_EFFECT) - if ct>0 then - Duel.Damage(1-tp,ct*500,REASON_EFFECT) - end -end diff --git a/script/c45547649.lua b/script/c45547649.lua deleted file mode 100644 index 7c3c278af1..0000000000 --- a/script/c45547649.lua +++ /dev/null @@ -1,31 +0,0 @@ ---バード・フェイス -function c45547649.initial_effect(c) - --search - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(45547649,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetCondition(c45547649.condition) - e1:SetTarget(c45547649.target) - e1:SetOperation(c45547649.operation) - c:RegisterEffect(e1) -end -function c45547649.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) -end -function c45547649.filter(c) - return c:IsCode(76812113) and c:IsAbleToHand() -end -function c45547649.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c45547649.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c45547649.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c45547649.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c45586855.lua b/script/c45586855.lua deleted file mode 100644 index 45267b98ff..0000000000 --- a/script/c45586855.lua +++ /dev/null @@ -1,39 +0,0 @@ ---A・O・J サイクロン・クリエイター -function c45586855.initial_effect(c) - --to hand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(45586855,0)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCost(c45586855.cost) - e1:SetTarget(c45586855.target) - e1:SetOperation(c45586855.operation) - c:RegisterEffect(e1) -end -function c45586855.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD,nil) -end -function c45586855.cfilter(c) - return c:IsFaceup() and c:IsType(TYPE_TUNER) -end -function c45586855.rfilter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand() -end -function c45586855.target(e,tp,eg,ep,ev,re,r,rp,chk) - local ct=Duel.GetMatchingGroupCount(c45586855.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - if chk==0 then return Duel.IsExistingMatchingCard(c45586855.rfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,ct,nil) end - local rg=Duel.GetMatchingGroup(c45586855.rfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,rg,ct,0,0) -end -function c45586855.operation(e,tp,eg,ep,ev,re,r,rp,chk) - local ct=Duel.GetMatchingGroupCount(c45586855.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - local rg=Duel.GetMatchingGroup(c45586855.rfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) - if rg:GetCount()0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c45593826.ssop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP) - end -end -function c45593826.dttg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_DECK,0,1,nil,0xb1) end -end -function c45593826.dtop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(45593826,2)) - local g=Duel.SelectMatchingCard(tp,Card.IsSetCard,tp,LOCATION_DECK,0,1,1,nil,0xb1) - local tc=g:GetFirst() - if tc then - Duel.ShuffleDeck(tp) - Duel.MoveSequence(tc,0) - Duel.ConfirmDecktop(tp,1) - end -end diff --git a/script/c45620686.lua b/script/c45620686.lua deleted file mode 100644 index 19564e3845..0000000000 --- a/script/c45620686.lua +++ /dev/null @@ -1,37 +0,0 @@ ---騒々虫 -function c45620686.initial_effect(c) - --lvup - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(45620686,0)) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND) - e1:SetCost(c45620686.lvcost) - e1:SetTarget(c45620686.lvtg) - e1:SetOperation(c45620686.lvop) - c:RegisterEffect(e1) -end -function c45620686.lvcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end -function c45620686.lvfilter(c) - return c:IsFaceup() and not c:IsType(TYPE_XYZ) -end -function c45620686.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c45620686.lvfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c45620686.lvfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c45620686.lvfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) -end -function c45620686.lvop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_LEVEL) - e1:SetValue(1) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - end -end diff --git a/script/c45627618.lua b/script/c45627618.lua deleted file mode 100644 index 4a36c1b5ec..0000000000 --- a/script/c45627618.lua +++ /dev/null @@ -1,111 +0,0 @@ ---覇王黒竜オッドアイズ・リベリオン・ドラゴン -function c45627618.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsRace,RACE_DRAGON),7,2) - c:EnableReviveLimit() - --pendulum summon - aux.AddPendulumProcedure(c) - --pendulum set - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_PZONE) - e1:SetCountLimit(1) - e1:SetTarget(c45627618.pctg) - e1:SetOperation(c45627618.pcop) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetCondition(c45627618.descon) - e2:SetTarget(c45627618.destg) - e2:SetOperation(c45627618.desop) - c:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_MATERIAL_CHECK) - e3:SetValue(c45627618.valcheck) - e3:SetLabelObject(e2) - c:RegisterEffect(e3) - --pendulum - local e4=Effect.CreateEffect(c) - e4:SetCategory(CATEGORY_DESTROY) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e4:SetCode(EVENT_DESTROYED) - e4:SetProperty(EFFECT_FLAG_DELAY) - e4:SetCondition(c45627618.pencon) - e4:SetTarget(c45627618.pentg) - e4:SetOperation(c45627618.penop) - c:RegisterEffect(e4) -end -c45627618.pendulum_level=7 -function c45627618.pcfilter(c) - return c:IsType(TYPE_PENDULUM) and not c:IsForbidden() -end -function c45627618.pctg(e,tp,eg,ep,ev,re,r,rp,chk) - local seq=e:GetHandler():GetSequence() - if chk==0 then return Duel.CheckLocation(tp,LOCATION_SZONE,13-seq) - and Duel.IsExistingMatchingCard(c45627618.pcfilter,tp,LOCATION_DECK,0,1,nil) end -end -function c45627618.pcop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local seq=e:GetHandler():GetSequence() - if not Duel.CheckLocation(tp,LOCATION_SZONE,13-seq) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) - local g=Duel.SelectMatchingCard(tp,c45627618.pcfilter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.MoveToField(g:GetFirst(),tp,tp,LOCATION_SZONE,POS_FACEUP,true) - end -end -function c45627618.descon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_XYZ and e:GetLabel()==1 -end -function c45627618.desfilter(c) - return c:IsFaceup() and c:IsLevelBelow(7) and c:IsDestructable() -end -function c45627618.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local g=Duel.GetMatchingGroup(c45627618.desfilter,tp,0,LOCATION_MZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,g:GetCount()*1000) -end -function c45627618.desop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c45627618.desfilter,tp,0,LOCATION_MZONE,nil) - local ct=Duel.Destroy(g,REASON_EFFECT) - if Duel.Damage(1-tp,ct*1000,REASON_EFFECT)~=0 then - local c=e:GetHandler() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_EXTRA_ATTACK) - e1:SetValue(2) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - c:RegisterEffect(e1) - end -end -function c45627618.valcheck(e,c) - local g=c:GetMaterial() - if g:IsExists(Card.IsType,1,nil,TYPE_XYZ) then - e:GetLabelObject():SetLabel(1) - else - e:GetLabelObject():SetLabel(0) - end -end -function c45627618.pencon(e,tp,eg,ep,ev,re,r,rp) - return bit.band(r,REASON_EFFECT+REASON_BATTLE)~=0 and e:GetHandler():IsPreviousLocation(LOCATION_MZONE) -end -function c45627618.pentg(e,tp,eg,ep,ev,re,r,rp,chk) - local lsc=Duel.GetFieldCard(tp,LOCATION_SZONE,6) - local rsc=Duel.GetFieldCard(tp,LOCATION_SZONE,7) - local g=Group.FromCards(lsc,rsc):Filter(Card.IsDestructable,nil) - if chk==0 then return g:GetCount()>0 end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c45627618.penop(e,tp,eg,ep,ev,re,r,rp) - local lsc=Duel.GetFieldCard(tp,LOCATION_SZONE,6) - local rsc=Duel.GetFieldCard(tp,LOCATION_SZONE,7) - local g=Group.FromCards(lsc,rsc) - if Duel.Destroy(g,REASON_EFFECT)~=0 and e:GetHandler():IsRelateToEffect(e) then - Duel.MoveToField(e:GetHandler(),tp,tp,LOCATION_SZONE,POS_FACEUP,true) - end -end diff --git a/script/c45651298.lua b/script/c45651298.lua deleted file mode 100644 index 729ec06269..0000000000 --- a/script/c45651298.lua +++ /dev/null @@ -1,22 +0,0 @@ ---ミミミック -function c45651298.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(1,45651298) - e1:SetCondition(c45651298.spcon) - c:RegisterEffect(e1) -end -function c45651298.filter(c) - return c:IsFaceup() and c:GetLevel()==3 -end -function c45651298.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE,nil)>0 - and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c45651298.filter,tp,LOCATION_MZONE,0,1,nil) -end diff --git a/script/c45653036.lua b/script/c45653036.lua deleted file mode 100644 index b20b99f26d..0000000000 --- a/script/c45653036.lua +++ /dev/null @@ -1,60 +0,0 @@ ---暴風雨 -function c45653036.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetHintTiming(0,0x1e0) - e1:SetTarget(c45653036.target) - e1:SetOperation(c45653036.activate) - c:RegisterEffect(e1) -end -function c45653036.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x18) and c:IsAttackAbove(1000) -end -function c45653036.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c45653036.cfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c45653036.cfilter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c45653036.cfilter,tp,LOCATION_MZONE,0,1,1,nil) -end -function c45653036.filter1(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable() -end -function c45653036.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - local atk=tc:GetAttack() - local g1=Duel.GetMatchingGroup(c45653036.filter1,tp,0,LOCATION_ONFIELD,nil) - local g2=Duel.GetMatchingGroup(Card.IsDestructable,tp,0,LOCATION_ONFIELD,nil) - local opt=0 - local b1=atk>=1000 and g1:GetCount()>0 - local b2=atk>=2000 and g2:GetCount()>1 - if b1 and b2 then opt=Duel.SelectOption(tp,aux.Stringid(45653036,0),aux.Stringid(45653036,1)) - elseif b1 then opt=Duel.SelectOption(tp,aux.Stringid(45653036,0)) - elseif b2 then opt=Duel.SelectOption(tp,aux.Stringid(45653036,1))+1 - else opt=2 end - if opt==0 then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(-1000) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local dg=g1:Select(tp,1,1,nil) - Duel.Destroy(dg,REASON_EFFECT) - elseif opt==1 then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(-2000) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local dg=g2:Select(tp,2,2,nil) - Duel.Destroy(dg,REASON_EFFECT) - end - end -end diff --git a/script/c45662855.lua b/script/c45662855.lua deleted file mode 100644 index cc7da3fb89..0000000000 --- a/script/c45662855.lua +++ /dev/null @@ -1,55 +0,0 @@ ---ジェムナイト・アイオーラ -function c45662855.initial_effect(c) - aux.EnableDualAttribute(c) - --salvage - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetDescription(aux.Stringid(45662855,0)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCondition(aux.IsDualState) - e1:SetCost(c45662855.cost) - e1:SetTarget(c45662855.target) - e1:SetOperation(c45662855.operation) - c:RegisterEffect(e1) -end -function c45662855.costfilter(c,tp) - return c:IsSetCard(0x47) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost() - and Duel.IsExistingTarget(c45662855.tgfilter,tp,LOCATION_GRAVE,0,1,c) -end -function c45662855.tgfilter(c) - return c:IsSetCard(0x1047) and c:IsAbleToHand() -end -function c45662855.cost(e,tp,eg,ep,ev,re,r,rp,chk) - e:SetLabel(1) - return true -end -function c45662855.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c45662855.tgfilter(chkc) end - if chk==0 then - if e:GetLabel()==1 then - e:SetLabel(0) - return Duel.IsExistingMatchingCard(c45662855.costfilter,tp,LOCATION_GRAVE,0,1,nil,tp) - else - return Duel.IsExistingTarget(c45662855.tgfilter,tp,LOCATION_GRAVE,0,1,nil) - end - end - if e:GetLabel()==1 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local cg=Duel.SelectMatchingCard(tp,c45662855.costfilter,tp,LOCATION_GRAVE,0,1,1,nil,tp) - Duel.Remove(cg,POS_FACEUP,REASON_COST) - e:SetLabel(0) - end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c45662855.tgfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c45662855.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end diff --git a/script/c45688586.lua b/script/c45688586.lua deleted file mode 100644 index 9d2acb10c3..0000000000 --- a/script/c45688586.lua +++ /dev/null @@ -1,25 +0,0 @@ ---カラクリ蜘蛛 -function c45688586.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(45688586,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_BATTLED) - e1:SetTarget(c45688586.target) - e1:SetOperation(c45688586.operation) - c:RegisterEffect(e1) -end -function c45688586.target(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - local bc=c:GetBattleTarget() - if chk==0 then return c==Duel.GetAttacker() and bc and bc:IsAttribute(ATTRIBUTE_DARK) end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,bc,1,0,0) -end -function c45688586.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local bc=c:GetBattleTarget() - if bc:IsRelateToBattle() then - Duel.Destroy(bc,REASON_EFFECT) - end -end diff --git a/script/c45705025.lua b/script/c45705025.lua deleted file mode 100644 index 44648ec6f3..0000000000 --- a/script/c45705025.lua +++ /dev/null @@ -1,47 +0,0 @@ ---紋章獣ユニコーン -function c45705025.initial_effect(c) - --revive - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(45705025,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_GRAVE) - e1:SetCountLimit(1,45705025) - e1:SetCost(c45705025.cost) - e1:SetTarget(c45705025.target) - e1:SetOperation(c45705025.operation) - c:RegisterEffect(e1) -end -function c45705025.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) -end -function c45705025.filter(c,e,tp) - return c:IsRace(RACE_PSYCHO) and c:IsType(TYPE_XYZ) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c45705025.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c45705025.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c45705025.filter,tp,LOCATION_GRAVE,0,1,e:GetHandler(),e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c45705025.filter,tp,LOCATION_GRAVE,0,1,1,e:GetHandler(),e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c45705025.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e2) - Duel.SpecialSummonComplete() - end -end diff --git a/script/c45711266.lua b/script/c45711266.lua deleted file mode 100644 index 5a57640a6b..0000000000 --- a/script/c45711266.lua +++ /dev/null @@ -1,37 +0,0 @@ ---ジュラック・プティラ -function c45711266.initial_effect(c) - --tohand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(45711266,0)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_BATTLED) - e1:SetCondition(c45711266.condition) - e1:SetTarget(c45711266.target) - e1:SetOperation(c45711266.operation) - c:RegisterEffect(e1) -end -function c45711266.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler()==Duel.GetAttackTarget() -end -function c45711266.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local tc=Duel.GetAttacker() - Duel.SetOperationInfo(0,CATEGORY_TOHAND,tc,1,0,0) -end -function c45711266.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetAttacker() - if tc:IsRelateToBattle() then - local lv=tc:GetLevel() - Duel.SendtoHand(tc,nil,REASON_EFFECT) - if not c:IsStatus(STATUS_BATTLE_DESTROYED) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_DEFENCE) - e1:SetValue(lv*100) - e1:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e1) - end - end -end diff --git a/script/c45725480.lua b/script/c45725480.lua deleted file mode 100644 index 899d3b790b..0000000000 --- a/script/c45725480.lua +++ /dev/null @@ -1,33 +0,0 @@ ---七星の宝刀 -function c45725480.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,45725480+EFFECT_COUNT_CODE_OATH) - e1:SetCost(c45725480.cost) - e1:SetTarget(c45725480.target) - e1:SetOperation(c45725480.activate) - c:RegisterEffect(e1) -end -function c45725480.filter(c) - return (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) and c:GetLevel()==7 and c:IsAbleToRemoveAsCost() -end -function c45725480.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c45725480.filter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c45725480.filter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c45725480.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp,2) end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(2) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2) -end -function c45725480.activate(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end diff --git a/script/c45742626.lua b/script/c45742626.lua deleted file mode 100644 index 71d477e099..0000000000 --- a/script/c45742626.lua +++ /dev/null @@ -1,46 +0,0 @@ ---巡死神リーパー -function c45742626.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,6,2) - c:EnableReviveLimit() - --atk/def - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(c45742626.value) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_UPDATE_DEFENCE) - c:RegisterEffect(e2) - --deckdes - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(45742626,0)) - e3:SetCategory(CATEGORY_DECKDES) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1,45742626) - e3:SetCost(c45742626.cost) - e3:SetTarget(c45742626.target) - e3:SetOperation(c45742626.operation) - c:RegisterEffect(e3) -end -function c45742626.value(e,c) - return Duel.GetMatchingGroupCount(Card.IsAttribute,0,LOCATION_GRAVE,LOCATION_GRAVE,nil,ATTRIBUTE_DARK)*200 -end -function c45742626.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c45742626.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,5) and Duel.IsPlayerCanDiscardDeck(1-tp,5) end - Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,PLAYER_ALL,5) -end -function c45742626.operation(e,tp,eg,ep,ev,re,r,rp) - local g1=Duel.GetDecktopGroup(tp,5) - local g2=Duel.GetDecktopGroup(1-tp,5) - g1:Merge(g2) - Duel.DisableShuffleCheck() - Duel.SendtoGrave(g1,REASON_EFFECT) -end diff --git a/script/c45778932.lua b/script/c45778932.lua deleted file mode 100644 index 9929e2e8e0..0000000000 --- a/script/c45778932.lua +++ /dev/null @@ -1,29 +0,0 @@ ---デザートストーム -function c45778932.initial_effect(c) - --activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --Atk up - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetTarget(c45778932.filter) - e2:SetValue(500) - c:RegisterEffect(e2) - --Def down - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetRange(LOCATION_SZONE) - e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e3:SetCode(EFFECT_UPDATE_DEFENCE) - e3:SetTarget(c45778932.filter) - e3:SetValue(-400) - c:RegisterEffect(e3) -end -function c45778932.filter(e,c) - return c:IsAttribute(ATTRIBUTE_WIND) -end diff --git a/script/c45801022.lua b/script/c45801022.lua deleted file mode 100644 index 997d643e94..0000000000 --- a/script/c45801022.lua +++ /dev/null @@ -1,32 +0,0 @@ ---エレキツネザル -function c45801022.initial_effect(c) - --bp limit - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(45801022,0)) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_DESTROYED) - e1:SetCondition(c45801022.condition) - e1:SetOperation(c45801022.operation) - c:RegisterEffect(e1) -end -function c45801022.condition(e,tp,eg,ep,ev,re,r,rp) - return rp~=tp and e:GetHandler():GetPreviousControler()==tp -end -function c45801022.operation(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EFFECT_CANNOT_BP) - e1:SetTargetRange(0,1) - e1:SetCondition(c45801022.con) - e1:SetLabel(Duel.GetTurnCount()) - if Duel.GetTurnPlayer()==tp then - e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN,1) - else - e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN,2) - end - Duel.RegisterEffect(e1,tp) -end -function c45801022.con(e) - return Duel.GetTurnCount()~=e:GetLabel() -end diff --git a/script/c45803070.lua b/script/c45803070.lua deleted file mode 100644 index 0f26ef2869..0000000000 --- a/script/c45803070.lua +++ /dev/null @@ -1,95 +0,0 @@ ---ティオの蟲惑魔 -function c45803070.initial_effect(c) - --immune - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_IMMUNE_EFFECT) - e1:SetValue(c45803070.efilter) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(45803070,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_SUMMON_SUCCESS) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetTarget(c45803070.sptg) - e2:SetOperation(c45803070.spop) - c:RegisterEffect(e2) - --set - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(45803070,1)) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e3:SetCountLimit(1,45803070) - e3:SetTarget(c45803070.settg) - e3:SetOperation(c45803070.setop) - c:RegisterEffect(e3) -end -function c45803070.efilter(e,te) - local c=te:GetHandler() - return c:GetType()==TYPE_TRAP and (c:IsSetCard(0x4c) or c:IsSetCard(0x89)) -end -function c45803070.filter(c,e,tp) - return c:IsSetCard(0x108a) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c45803070.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c45803070.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c45803070.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c45803070.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c45803070.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENCE) - end -end -function c45803070.setfilter(c) - return c:GetType()==TYPE_TRAP and (c:IsSetCard(0x4c) or c:IsSetCard(0x89)) and c:IsSSetable() -end -function c45803070.settg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c45803070.setfilter(chkc) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingTarget(c45803070.setfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) - local g=Duel.SelectTarget(tp,c45803070.setfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g,1,0,0) -end -function c45803070.setop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 then - Duel.SSet(tp,tc) - Duel.ConfirmCards(1-tp,tc) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetCountLimit(1) - if Duel.GetTurnPlayer()==tp then - e1:SetLabel(Duel.GetTurnCount()) - e1:SetReset(RESET_PHASE+PHASE_END+RESET_SELF_TURN,2) - else - e1:SetLabel(0) - e1:SetReset(RESET_PHASE+PHASE_END+RESET_SELF_TURN) - end - e1:SetLabelObject(tc) - e1:SetCondition(c45803070.rmcon) - e1:SetOperation(c45803070.rmop) - Duel.RegisterEffect(e1,tp) - tc:CreateEffectRelation(e1) - end -end -function c45803070.rmcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnCount()~=e:GetLabel() and Duel.GetTurnPlayer()==tp -end -function c45803070.rmop(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetLabelObject() - if tc:IsRelateToEffect(e) then - Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) - end -end diff --git a/script/c45809008.lua b/script/c45809008.lua deleted file mode 100644 index c563e08a98..0000000000 --- a/script/c45809008.lua +++ /dev/null @@ -1,30 +0,0 @@ ---デステニー・ドロー -function c45809008.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c45809008.cost) - e1:SetTarget(c45809008.target) - e1:SetOperation(c45809008.activate) - c:RegisterEffect(e1) -end -function c45809008.filter(c) - return c:IsSetCard(0xc008) and c:IsDiscardable() -end -function c45809008.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c45809008.filter,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,c45809008.filter,1,1,REASON_COST+REASON_DISCARD) -end -function c45809008.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp,2) end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(2) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2) -end -function c45809008.activate(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end diff --git a/script/c45812361.lua b/script/c45812361.lua deleted file mode 100644 index d15e1ac468..0000000000 --- a/script/c45812361.lua +++ /dev/null @@ -1,61 +0,0 @@ ---カードカー・D -function c45812361.initial_effect(c) - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - c:RegisterEffect(e1) - --draw - local e2=Effect.CreateEffect(c) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_SUMMON_SUCCESS) - e2:SetOperation(c45812361.sumsuc) - c:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(45812361,0)) - e3:SetCategory(CATEGORY_DRAW) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_MZONE) - e3:SetCondition(c45812361.condition) - e3:SetCost(c45812361.cost) - e3:SetTarget(c45812361.target) - e3:SetOperation(c45812361.operation) - c:RegisterEffect(e3) -end -function c45812361.sumsuc(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():RegisterFlagEffect(45812361,RESET_EVENT+0x1fc0000+RESET_PHASE+PHASE_END,0,1) -end -function c45812361.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetFlagEffect(45812361)~=0 and Duel.GetCurrentPhase()==PHASE_MAIN1 -end -function c45812361.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_SPSUMMON)==0 and e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) - --oath effects - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) - e1:SetTargetRange(1,0) - Duel.RegisterEffect(e1,tp) -end -function c45812361.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp,2) end - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2) -end -function c45812361.operation(e,tp,eg,ep,ev,re,r,rp) - local ct=Duel.Draw(tp,2,REASON_EFFECT) - if ct==0 then return end - Duel.BreakEffect() - Duel.SkipPhase(tp,PHASE_MAIN1,RESET_PHASE+PHASE_END,1) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetTargetRange(1,0) - e1:SetCode(EFFECT_CANNOT_BP) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) -end diff --git a/script/c45815891.lua b/script/c45815891.lua deleted file mode 100644 index 4069004914..0000000000 --- a/script/c45815891.lua +++ /dev/null @@ -1,6 +0,0 @@ ---スクラップ・デスデーモン -function c45815891.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1) - c:EnableReviveLimit() -end diff --git a/script/c45869829.lua b/script/c45869829.lua deleted file mode 100644 index b88a3d1a16..0000000000 --- a/script/c45869829.lua +++ /dev/null @@ -1,58 +0,0 @@ ---速攻魔力増幅器 -function c45869829.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TODECK) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c45869829.target) - e1:SetOperation(c45869829.activate) - c:RegisterEffect(e1) - --search - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(45869829,0)) - e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetCondition(c45869829.thcon) - e2:SetTarget(c45869829.thtg) - e2:SetOperation(c45869829.thop) - c:RegisterEffect(e2) -end -function c45869829.filter(c) - return c:IsType(TYPE_QUICKPLAY) and c:GetCode()~=45869829 and c:IsAbleToDeck() -end -function c45869829.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c45869829.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c45869829.filter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectTarget(tp,c45869829.filter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0) -end -function c45869829.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoDeck(tc,nil,2,REASON_EFFECT) - end -end -function c45869829.thcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return rp~=tp and c:IsReason(REASON_DESTROY) and c:IsPreviousLocation(LOCATION_ONFIELD) and c:GetPreviousControler()==tp -end -function c45869829.thfilter(c) - return c:IsType(TYPE_QUICKPLAY) and c:GetCode()~=45869829 and c:IsAbleToHand() -end -function c45869829.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c45869829.thfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c45869829.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c45869829.thfilter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c45871897.lua b/script/c45871897.lua deleted file mode 100644 index ae798477a9..0000000000 --- a/script/c45871897.lua +++ /dev/null @@ -1,17 +0,0 @@ ---ロストガーディアン -function c45871897.initial_effect(c) - --base defence - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_BASE_DEFENCE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetValue(c45871897.defval) - c:RegisterEffect(e1) -end -function c45871897.filter(c) - return c:IsFaceup() and c:IsRace(RACE_ROCK) -end -function c45871897.defval(e,c) - return Duel.GetMatchingGroupCount(c45871897.filter,c:GetControler(),LOCATION_REMOVED,0,nil)*700 -end diff --git a/script/c4587638.lua b/script/c4587638.lua deleted file mode 100644 index 23c93a3156..0000000000 --- a/script/c4587638.lua +++ /dev/null @@ -1,53 +0,0 @@ ---吠え猛る大地 -function c4587638.initial_effect(c) - --activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --pierce - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_PIERCE) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(LOCATION_MZONE,0) - e2:SetTarget(aux.TargetBoolFunction(Card.IsRace,RACE_BEAST)) - c:RegisterEffect(e2) - --atkdown - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(4587638,0)) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetCode(EVENT_BATTLE_DAMAGE) - e3:SetRange(LOCATION_SZONE) - e3:SetCondition(c4587638.atkcon) - e3:SetTarget(c4587638.atktg) - e3:SetOperation(c4587638.atkop) - c:RegisterEffect(e3) -end -function c4587638.atkcon(e,tp,eg,ep,ev,re,r,rp) - local a=Duel.GetAttacker() - local d=Duel.GetAttackTarget() - return d and eg:GetFirst()==a and a:IsControler(tp) and a:IsRace(RACE_BEAST) and d:IsDefencePos() -end -function c4587638.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsFaceup() end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil) -end -function c4587638.atkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc and tc:IsRelateToEffect(e) and tc:IsFaceup() then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(-500) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_UPDATE_DEFENCE) - tc:RegisterEffect(e2) - end -end \ No newline at end of file diff --git a/script/c45894482.lua b/script/c45894482.lua deleted file mode 100644 index 4f3c39c173..0000000000 --- a/script/c45894482.lua +++ /dev/null @@ -1,54 +0,0 @@ ---俊足のギラザウルス -function c45894482.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c45894482.spcon) - e1:SetValue(1) - c:RegisterEffect(e1) - --spsummon success - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetOperation(c45894482.trigop) - c:RegisterEffect(e2) - --spsummon - local e3=Effect.CreateEffect(c) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetDescription(aux.Stringid(45894482,0)) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_EVENT_PLAYER) - e3:SetCode(45894482) - e3:SetTarget(c45894482.target) - e3:SetOperation(c45894482.operation) - c:RegisterEffect(e3) -end -function c45894482.spcon(e,c) - if c==nil then return true end - return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 -end -function c45894482.trigop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+1 then - Duel.RaiseSingleEvent(e:GetHandler(),45894482,e,r,rp,1-tp,0) - end -end -function c45894482.filter(c,e,tp) - return c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c45894482.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c45894482.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c45894482.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c45894482.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c45894482.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c45895206.lua b/script/c45895206.lua deleted file mode 100644 index 4d4b00da4c..0000000000 --- a/script/c45895206.lua +++ /dev/null @@ -1,22 +0,0 @@ ---闇をかき消す光 -function c45895206.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_POSITION) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c45895206.target) - e1:SetOperation(c45895206.activate) - c:RegisterEffect(e1) -end -function c45895206.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFacedown,tp,0,LOCATION_MZONE,1,nil) end - local g=Duel.GetMatchingGroup(Card.IsFacedown,tp,0,LOCATION_MZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_POSITION,g,g:GetCount(),0,0) -end -function c45895206.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsFacedown,tp,0,LOCATION_MZONE,nil) - if g:GetCount()>0 then - Duel.ChangePosition(g,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK,POS_FACEUP_DEFENCE,POS_FACEUP_DEFENCE) - end -end diff --git a/script/c45898858.lua b/script/c45898858.lua deleted file mode 100644 index a69fc19248..0000000000 --- a/script/c45898858.lua +++ /dev/null @@ -1,37 +0,0 @@ ---ボンディング-H2O -function c45898858.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c45898858.cost) - e1:SetTarget(c45898858.target) - e1:SetOperation(c45898858.activate) - c:RegisterEffect(e1) -end -function c45898858.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsCode,2,nil,22587018) - and Duel.CheckReleaseGroup(tp,Card.IsCode,1,nil,58071123) end - local g1=Duel.SelectReleaseGroup(tp,Card.IsCode,2,2,nil,22587018) - local g2=Duel.SelectReleaseGroup(tp,Card.IsCode,1,1,nil,58071123) - g1:Merge(g2) - Duel.Release(g1,REASON_COST) -end -function c45898858.filter(c,e,tp) - return c:IsCode(85066822) and c:IsCanBeSpecialSummoned(e,0,tp,true,true) and not c:IsHasEffect(EFFECT_NECRO_VALLEY) -end -function c45898858.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-3 - and Duel.IsExistingMatchingCard(c45898858.filter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE) -end -function c45898858.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c45898858.filter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,true,true,POS_FACEUP) - g:GetFirst():CompleteProcedure() - end -end diff --git a/script/c45906428.lua b/script/c45906428.lua deleted file mode 100644 index 8e459c4241..0000000000 --- a/script/c45906428.lua +++ /dev/null @@ -1,72 +0,0 @@ ---ミラクル・フュージョン -function c45906428.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c45906428.target) - e1:SetOperation(c45906428.activate) - c:RegisterEffect(e1) -end -function c45906428.filter0(c) - return c:IsCanBeFusionMaterial() and c:IsAbleToRemove() -end -function c45906428.filter1(c,e) - return c:IsCanBeFusionMaterial() and c:IsAbleToRemove() and not c:IsImmuneToEffect(e) -end -function c45906428.filter2(c,e,tp,m,f,chkf) - return c:IsType(TYPE_FUSION) and c:IsSetCard(0x3008) and (not f or f(c)) - and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf) -end -function c45906428.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp - local mg1=Duel.GetMatchingGroup(c45906428.filter0,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil) - local res=Duel.IsExistingMatchingCard(c45906428.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf) - if not res then - local ce=Duel.GetChainMaterial(tp) - if ce~=nil then - local fgroup=ce:GetTarget() - local mg2=fgroup(ce,e,tp) - local mf=ce:GetValue() - res=Duel.IsExistingMatchingCard(c45906428.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,chkf) - end - end - return res - end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function c45906428.activate(e,tp,eg,ep,ev,re,r,rp) - local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp - local mg1=Duel.GetMatchingGroup(c45906428.filter1,tp,LOCATION_GRAVE+LOCATION_MZONE,0,nil,e) - local sg1=Duel.GetMatchingGroup(c45906428.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf) - local mg2=nil - local sg2=nil - local ce=Duel.GetChainMaterial(tp) - if ce~=nil then - local fgroup=ce:GetTarget() - mg2=fgroup(ce,e,tp) - local mf=ce:GetValue() - sg2=Duel.GetMatchingGroup(c45906428.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,mf,chkf) - end - if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then - local sg=sg1:Clone() - if sg2 then sg:Merge(sg2) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local tg=sg:Select(tp,1,1,nil) - local tc=tg:GetFirst() - if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then - local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf) - tc:SetMaterial(mat1) - Duel.Remove(mat1,POS_FACEUP,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION) - Duel.BreakEffect() - Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP) - else - local mat2=Duel.SelectFusionMaterial(tp,tc,mg2,nil,chkf) - local fop=ce:GetOperation() - fop(ce,e,tp,tc,mat2) - end - tc:CompleteProcedure() - end -end diff --git a/script/c45939611.lua b/script/c45939611.lua deleted file mode 100644 index a8109fbced..0000000000 --- a/script/c45939611.lua +++ /dev/null @@ -1,28 +0,0 @@ ---リトル・フェアリー -function c45939611.initial_effect(c) - --lvup - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(45939611,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(2) - e1:SetCost(c45939611.cost) - e1:SetOperation(c45939611.operation) - c:RegisterEffect(e1) -end -function c45939611.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,Card.IsAbleToGraveAsCost,1,1,REASON_COST) -end -function c45939611.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFaceup() and c:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_LEVEL) - e1:SetProperty(EFFECT_FLAG_COPY_INHERIT) - e1:SetValue(1) - e1:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e1) - end -end diff --git a/script/c45939841.lua b/script/c45939841.lua deleted file mode 100644 index 9778103a45..0000000000 --- a/script/c45939841.lua +++ /dev/null @@ -1,34 +0,0 @@ ---ツイスター -function c45939841.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_END_PHASE) - e1:SetCost(c45939841.cost) - e1:SetTarget(c45939841.target) - e1:SetOperation(c45939841.activate) - c:RegisterEffect(e1) -end -function c45939841.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,500) - else Duel.PayLPCost(tp,500) end -end -function c45939841.filter(c) - return c:IsFaceup() and c:IsDestructable() and c:IsType(TYPE_SPELL+TYPE_TRAP) -end -function c45939841.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and c45939841.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c45939841.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c45939841.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c45939841.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c45950291.lua b/script/c45950291.lua deleted file mode 100644 index d0c6d60b98..0000000000 --- a/script/c45950291.lua +++ /dev/null @@ -1,107 +0,0 @@ ---RUM-アストラル・フォース -function c45950291.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c45950291.target) - e1:SetOperation(c45950291.activate) - c:RegisterEffect(e1) - -- - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(45950291,0)) - e2:SetCategory(CATEGORY_TOHAND) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_PREDRAW) - e2:SetRange(LOCATION_GRAVE) - e2:SetCondition(c45950291.thcon) - e2:SetCost(c45950291.thcost) - e2:SetTarget(c45950291.thtg) - e2:SetOperation(c45950291.thop) - c:RegisterEffect(e2) -end -function c45950291.cfilter(c,rk) - return c:IsFaceup() and c:GetRank()>rk -end -function c45950291.filter1(c,e,tp) - local rk=c:GetRank() - return c:IsFaceup() and c:IsType(TYPE_XYZ) - and not Duel.IsExistingMatchingCard(c45950291.cfilter,tp,LOCATION_MZONE,0,1,nil,rk) - and Duel.IsExistingMatchingCard(c45950291.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,c,rk+2,c:GetRace(),c:GetAttribute(),c:GetCode()) -end -function c45950291.filter2(c,e,tp,mc,rk,rc,att,code) - if c:GetOriginalCode()==6165656 and code~=48995978 then return false end - return c:GetRank()==rk and c:IsRace(rc) and c:IsAttribute(att) and mc:IsCanBeXyzMaterial(c) - and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) -end -function c45950291.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c45950291.filter1(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsExistingTarget(c45950291.filter1,tp,LOCATION_MZONE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - Duel.SelectTarget(tp,c45950291.filter1,tp,LOCATION_MZONE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function c45950291.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<0 then return end - local tc=Duel.GetFirstTarget() - if tc:IsFacedown() or not tc:IsRelateToEffect(e) or tc:IsControler(1-tp) or tc:IsImmuneToEffect(e) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c45950291.filter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc,tc:GetRank()+2,tc:GetRace(),tc:GetAttribute(),tc:GetCode()) - local sc=g:GetFirst() - if sc then - local mg=tc:GetOverlayGroup() - if mg:GetCount()~=0 then - Duel.Overlay(sc,mg) - end - sc:SetMaterial(Group.FromCards(tc)) - Duel.Overlay(sc,Group.FromCards(tc)) - Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP) - sc:CompleteProcedure() - end -end -function c45950291.thcon(e,tp,eg,ep,ev,re,r,rp) - return tp==Duel.GetTurnPlayer() and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0 - and Duel.GetDrawCount(tp)>0 -end -function c45950291.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_SPSUMMON)==0 end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) - e1:SetTargetRange(1,0) - e1:SetTarget(c45950291.splimit) - Duel.RegisterEffect(e1,tp) -end -function c45950291.splimit(e,c,sump,sumtype,sumpos,targetp,se) - return not se:GetHandler():IsCode(45950291) -end -function c45950291.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToHand() end - local dt=Duel.GetDrawCount(tp) - if dt~=0 then - _replace_count=0 - _replace_max=dt - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EFFECT_DRAW_COUNT) - e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_DRAW) - e1:SetValue(0) - Duel.RegisterEffect(e1,tp) - end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0) -end -function c45950291.thop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - _replace_count=_replace_count+1 - if _replace_count<=_replace_max and c:IsRelateToEffect(e) then - Duel.SendtoHand(c,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,c) - end -end diff --git a/script/c45985838.lua b/script/c45985838.lua deleted file mode 100644 index fe3fb6d19c..0000000000 --- a/script/c45985838.lua +++ /dev/null @@ -1,45 +0,0 @@ ---プロミネンス・ドラゴン -function c45985838.initial_effect(c) - --cannot be target - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_BE_BATTLE_TARGET) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c45985838.atklm) - e1:SetValue(aux.imval1) - c:RegisterEffect(e1) - --damage - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(45985838,0)) - e2:SetCategory(CATEGORY_DAMAGE) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetCode(EVENT_PHASE+PHASE_END) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCondition(c45985838.condition) - e2:SetTarget(c45985838.target) - e2:SetOperation(c45985838.operation) - c:RegisterEffect(e2) -end -function c45985838.filter(c) - return c:IsFaceup() and c:IsRace(RACE_PYRO) -end -function c45985838.atklm(e) - local c=e:GetHandler() - return Duel.IsExistingMatchingCard(c45985838.filter,c:GetControler(),LOCATION_MZONE,0,1,c) -end -function c45985838.condition(e,tp,eg,ep,ev,re,r,rp) - return tp==Duel.GetTurnPlayer() -end -function c45985838.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(500) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,500) -end -function c45985838.operation(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c45986603.lua b/script/c45986603.lua deleted file mode 100644 index be28c30431..0000000000 --- a/script/c45986603.lua +++ /dev/null @@ -1,75 +0,0 @@ ---強奪 -function c45986603.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_CONTROL+CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c45986603.target) - e1:SetOperation(c45986603.operation) - c:RegisterEffect(e1) - --recover - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(45986603,0)) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetCategory(CATEGORY_RECOVER) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) - e2:SetRange(LOCATION_SZONE) - e2:SetCountLimit(1) - e2:SetCondition(c45986603.reccon) - e2:SetTarget(c45986603.rectg) - e2:SetOperation(c45986603.recop) - c:RegisterEffect(e2) - --equip limit - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_EQUIP_LIMIT) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e3:SetValue(c45986603.eqlimit) - c:RegisterEffect(e3) - --control - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_EQUIP) - e4:SetCode(EFFECT_SET_CONTROL) - e4:SetValue(c45986603.ctval) - c:RegisterEffect(e4) -end -function c45986603.filter(c) - return c:IsFaceup() and c:IsControlerCanBeChanged() -end -function c45986603.eqlimit(e,c) - return e:GetHandlerPlayer()~=c:GetControler() or e:GetHandler():GetEquipTarget()==c -end -function c45986603.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c45986603.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c45986603.filter,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) - local g=Duel.SelectTarget(tp,c45986603.filter,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c45986603.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsRelateToEffect(e) then - Duel.Equip(tp,c,tc) - end -end -function c45986603.reccon(e,tp,eg,ep,ev,re,r,rp) - return tp~=Duel.GetTurnPlayer() -end -function c45986603.rectg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(1000) - Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,1-tp,1000) -end -function c45986603.recop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Recover(p,d,REASON_EFFECT) -end -function c45986603.ctval(e,c) - return e:GetHandlerPlayer() -end diff --git a/script/c46008667.lua b/script/c46008667.lua deleted file mode 100644 index 12ffb42307..0000000000 --- a/script/c46008667.lua +++ /dev/null @@ -1,96 +0,0 @@ ---聖剣 EX-カリバーン -function c46008667.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c46008667.target) - e1:SetOperation(c46008667.operation) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(46008667,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetRange(LOCATION_GRAVE) - e2:SetCountLimit(1,46008667) - e2:SetCondition(aux.exccon) - e2:SetCost(c46008667.spcost) - e2:SetTarget(c46008667.sptg) - e2:SetOperation(c46008667.spop) - c:RegisterEffect(e2) - --Untargetable - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_EQUIP) - e3:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) - e3:SetValue(aux.tgoval) - c:RegisterEffect(e3) - --Equip limit - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetCode(EFFECT_EQUIP_LIMIT) - e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e4:SetValue(c46008667.eqlimit) - c:RegisterEffect(e4) -end -function c46008667.eqlimit(e,c) - return c:IsSetCard(0x107a) -end -function c46008667.filter(c) - return c:IsFaceup() and c:IsSetCard(0x107a) -end -function c46008667.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c46008667.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c46008667.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c46008667.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c46008667.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,c,tc) - end -end -function c46008667.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) -end -function c46008667.filter1(c,e,tp) - return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:IsSetCard(0x107a) - and Duel.IsExistingMatchingCard(c46008667.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,c,c:GetCode()) -end -function c46008667.filter2(c,e,tp,mc,code) - return c:IsType(TYPE_XYZ) and c:IsSetCard(0x107a) and not c:IsCode(code) and mc:IsCanBeXyzMaterial(c) - and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) -end -function c46008667.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c46008667.filter1(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsExistingTarget(c46008667.filter1,tp,LOCATION_MZONE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - Duel.SelectTarget(tp,c46008667.filter1,tp,LOCATION_MZONE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function c46008667.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<0 then return end - local tc=Duel.GetFirstTarget() - if tc:IsFacedown() or not tc:IsRelateToEffect(e) or tc:IsControler(1-tp) or tc:IsImmuneToEffect(e) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c46008667.filter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc,tc:GetCode()) - local sc=g:GetFirst() - if sc then - local mg=tc:GetOverlayGroup() - if mg:GetCount()~=0 then - Duel.Overlay(sc,mg) - end - sc:SetMaterial(Group.FromCards(tc)) - Duel.Overlay(sc,Group.FromCards(tc)) - Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP) - sc:CompleteProcedure() - end -end diff --git a/script/c46009906.lua b/script/c46009906.lua deleted file mode 100644 index 261c9b9bca..0000000000 --- a/script/c46009906.lua +++ /dev/null @@ -1,50 +0,0 @@ ---猛獣の歯 -function c46009906.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c46009906.target) - e1:SetOperation(c46009906.operation) - c:RegisterEffect(e1) - --atk up - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(300) - c:RegisterEffect(e2) - --def up - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_EQUIP) - e3:SetCode(EFFECT_UPDATE_DEFENCE) - e3:SetValue(300) - c:RegisterEffect(e3) - --equip limit - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetCode(EFFECT_EQUIP_LIMIT) - e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e4:SetValue(c46009906.eqlimit) - c:RegisterEffect(e4) -end -function c46009906.eqlimit(e,c) - return c:IsRace(RACE_BEAST) -end -function c46009906.filter(c) - return c:IsFaceup() and c:IsRace(RACE_BEAST) -end -function c46009906.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c46009906.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c46009906.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c46009906.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c46009906.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,e:GetHandler(),tc) - end -end diff --git a/script/c46031686.lua b/script/c46031686.lua deleted file mode 100644 index 63e17e5496..0000000000 --- a/script/c46031686.lua +++ /dev/null @@ -1,26 +0,0 @@ ---ダメージ・ポラリライザー -function c46031686.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_CHAINING) - e1:SetCondition(c46031686.condition) - e1:SetTarget(c46031686.target) - e1:SetOperation(c46031686.activate) - c:RegisterEffect(e1) -end -function c46031686.condition(e,tp,eg,ep,ev,re,r,rp) - local ex=Duel.GetOperationInfo(ev,CATEGORY_DAMAGE) - return ex and (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE)) and Duel.IsChainNegatable(ev) -end -function c46031686.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp,1) and Duel.IsPlayerCanDraw(1-tp,1) end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,PLAYER_ALL,1) -end -function c46031686.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateActivation(ev) - Duel.Draw(tp,1,REASON_EFFECT) - Duel.Draw(1-tp,1,REASON_EFFECT) -end diff --git a/script/c46037213.lua b/script/c46037213.lua deleted file mode 100644 index 5c2c361ad4..0000000000 --- a/script/c46037213.lua +++ /dev/null @@ -1,51 +0,0 @@ ---ガーディアン・トライス -function c46037213.initial_effect(c) - --sum limit - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_SUMMON) - e1:SetCondition(c46037213.sumlimit) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_CANNOT_FLIP_SUMMON) - c:RegisterEffect(e2) - local e3=e1:Clone() - e3:SetCode(EFFECT_SPSUMMON_CONDITION) - c:RegisterEffect(e3) - --spsummon - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(46037213,0)) - e4:SetCategory(CATEGORY_SPECIAL_SUMMON) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e4:SetCode(EVENT_TO_GRAVE) - e4:SetCondition(c46037213.spcon) - e4:SetTarget(c46037213.sptg) - e4:SetOperation(c46037213.spop) - c:RegisterEffect(e4) -end -function c46037213.cfilter(c) - return c:IsFaceup() and c:IsCode(21900719) -end -function c46037213.sumlimit(e) - return not Duel.IsExistingMatchingCard(c46037213.cfilter,e:GetHandlerPlayer(),LOCATION_ONFIELD,0,1,nil) -end -function c46037213.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsReason(REASON_DESTROY) -end -function c46037213.spfilter(c,e,tp,rc) - return c:IsLocation(LOCATION_GRAVE) and c:IsReason(REASON_SUMMON) and c:GetReasonCard()==rc and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c46037213.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - if chk==0 then return true end - local g=e:GetHandler():GetMaterial():Filter(c46037213.spfilter,nil,e,tp,e:GetHandler()) - Duel.SetTargetCard(g) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,g:GetCount(),0,0) -end -function c46037213.spop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) - if Duel.GetLocationCount(tp,LOCATION_MZONE)>=g:GetCount() then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c46044841.lua b/script/c46044841.lua deleted file mode 100644 index 878a9759f5..0000000000 --- a/script/c46044841.lua +++ /dev/null @@ -1,35 +0,0 @@ ---ガスタ・ファルコ -function c46044841.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(46044841,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCondition(c46044841.condition) - e1:SetTarget(c46044841.target) - e1:SetOperation(c46044841.operation) - c:RegisterEffect(e1) -end -function c46044841.condition(e,tp,eg,ep,ev,re,r,rp) - return bit.band(r,REASON_BATTLE)==0 and e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) - and e:GetHandler():IsPreviousPosition(POS_FACEUP) -end -function c46044841.filter(c,e,tp) - return c:IsSetCard(0x10) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN) -end -function c46044841.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c46044841.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c46044841.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c46044841.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEDOWN_DEFENCE) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c46052429.lua b/script/c46052429.lua deleted file mode 100644 index 290c11fea4..0000000000 --- a/script/c46052429.lua +++ /dev/null @@ -1,49 +0,0 @@ ---高等儀式術 -function c46052429.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c46052429.target) - e1:SetOperation(c46052429.activate) - c:RegisterEffect(e1) -end -function c46052429.filter(c,e,tp,m) - if bit.band(c:GetType(),0x81)~=0x81 - or not c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true) then return false end - if c.mat_filter then - m=m:Filter(c.mat_filter,nil) - end - return m:CheckWithSumEqual(Card.GetRitualLevel,c:GetLevel(),1,99,c) -end -function c46052429.matfilter(c) - return c:IsType(TYPE_NORMAL) and c:IsAbleToGrave() -end -function c46052429.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return false end - local mg=Duel.GetMatchingGroup(c46052429.matfilter,tp,LOCATION_DECK,0,nil) - return Duel.IsExistingMatchingCard(c46052429.filter,tp,LOCATION_HAND,0,1,nil,e,tp,mg) - end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c46052429.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local mg=Duel.GetMatchingGroup(c46052429.matfilter,tp,LOCATION_DECK,0,nil) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local tg=Duel.SelectMatchingCard(tp,c46052429.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp,mg) - if tg:GetCount()>0 then - local tc=tg:GetFirst() - if tc.mat_filter then - mg=mg:Filter(tc.mat_filter,nil) - end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local mat=mg:SelectWithSumEqual(tp,Card.GetRitualLevel,tc:GetLevel(),1,99,tc) - tc:SetMaterial(mat) - Duel.SendtoGrave(mat,REASON_EFFECT+REASON_MATERIAL+REASON_RITUAL) - Duel.BreakEffect() - Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP) - tc:CompleteProcedure() - end -end diff --git a/script/c46083380.lua b/script/c46083380.lua deleted file mode 100644 index a48bf41f26..0000000000 --- a/script/c46083380.lua +++ /dev/null @@ -1,20 +0,0 @@ ---攻通規制 -function c46083380.initial_effect(c) - --activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --cannot attack - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(0,1) - e2:SetCondition(c46083380.atcon) - c:RegisterEffect(e2) -end -function c46083380.atcon(e) - return Duel.GetFieldGroupCount(e:GetHandlerPlayer(),0,LOCATION_MZONE)>=3 -end diff --git a/script/c46089249.lua b/script/c46089249.lua deleted file mode 100644 index 1561edf6f9..0000000000 --- a/script/c46089249.lua +++ /dev/null @@ -1,43 +0,0 @@ ---コアキリング -function c46089249.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c46089249.cost) - e1:SetTarget(c46089249.target) - e1:SetOperation(c46089249.activate) - c:RegisterEffect(e1) -end -function c46089249.cfilter(c) - return c:IsCode(36623431) and not c:IsPublic() -end -function c46089249.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c46089249.cfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) - local g=Duel.SelectMatchingCard(tp,c46089249.cfilter,tp,LOCATION_HAND,0,1,1,nil) - Duel.ConfirmCards(1-tp,g) - Duel.ShuffleHand(tp) -end -function c46089249.filter(c) - return c:IsFaceup() and c:IsDestructable() -end -function c46089249.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c46089249.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c46089249.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c46089249.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,PLAYER_ALL,1000) -end -function c46089249.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - if Duel.Destroy(tc,REASON_EFFECT)>0 then - Duel.Damage(1-tp,1000,REASON_EFFECT) - Duel.Damage(tp,1000,REASON_EFFECT) - end - end -end diff --git a/script/c4611269.lua b/script/c4611269.lua deleted file mode 100644 index 3481238334..0000000000 --- a/script/c4611269.lua +++ /dev/null @@ -1,21 +0,0 @@ ---ライオ・アリゲーター -function c4611269.initial_effect(c) - --pierce - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_PIERCE) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetCondition(c4611269.condition) - e1:SetTarget(c4611269.target) - c:RegisterEffect(e1) -end -function c4611269.cfilter(c) - return c:IsFaceup() and c:IsRace(RACE_REPTILE) -end -function c4611269.condition(e) - return Duel.IsExistingMatchingCard(c4611269.cfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,e:GetHandler()) -end -function c4611269.target(e,c) - return c:IsRace(RACE_REPTILE) -end diff --git a/script/c46128076.lua b/script/c46128076.lua deleted file mode 100644 index 955f1bdf45..0000000000 --- a/script/c46128076.lua +++ /dev/null @@ -1,30 +0,0 @@ ---黒魔導師クラン -function c46128076.initial_effect(c) - --damage - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(46128076,0)) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCondition(c46128076.condition) - e1:SetTarget(c46128076.target) - e1:SetOperation(c46128076.operation) - c:RegisterEffect(e1) -end -function c46128076.condition(e,tp,eg,ep,ev,re,r,rp) - return tp==Duel.GetTurnPlayer() -end -function c46128076.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local ct=Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE) - Duel.SetTargetPlayer(1-tp) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,ct*300) -end -function c46128076.operation(e,tp,eg,ep,ev,re,r,rp) - local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) - local ct=Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE) - Duel.Damage(p,ct*300,REASON_EFFECT) -end diff --git a/script/c46130346.lua b/script/c46130346.lua deleted file mode 100644 index 2229281051..0000000000 --- a/script/c46130346.lua +++ /dev/null @@ -1,22 +0,0 @@ ---ファイヤー・ボール -function c46130346.initial_effect(c) - --damage - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c46130346.damtg) - e1:SetOperation(c46130346.damop) - c:RegisterEffect(e1) -end -function c46130346.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(500) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,500) -end -function c46130346.damop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c46132282.lua b/script/c46132282.lua deleted file mode 100644 index 0e5a202608..0000000000 --- a/script/c46132282.lua +++ /dev/null @@ -1,44 +0,0 @@ ---甲化鎧骨格 -function c46132282.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1) - c:EnableReviveLimit() - --immune - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(46132282,0)) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(c46132282.effcon) - e1:SetOperation(c46132282.effop) - c:RegisterEffect(e1) -end -function c46132282.effcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_SYNCHRO -end -function c46132282.effop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetValue(1) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - c:RegisterEffect(e2) - end - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetCode(EFFECT_CHANGE_DAMAGE) - e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e3:SetTargetRange(1,0) - e3:SetValue(0) - e3:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e3,tp) - local e4=e3:Clone() - e4:SetCode(EFFECT_NO_EFFECT_DAMAGE) - e4:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e4,tp) -end diff --git a/script/c4614116.lua b/script/c4614116.lua deleted file mode 100644 index 3d31cb3873..0000000000 --- a/script/c4614116.lua +++ /dev/null @@ -1,50 +0,0 @@ ---闇・エネルギー -function c4614116.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c4614116.target) - e1:SetOperation(c4614116.operation) - c:RegisterEffect(e1) - --atk up - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(300) - c:RegisterEffect(e2) - --def up - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_EQUIP) - e3:SetCode(EFFECT_UPDATE_DEFENCE) - e3:SetValue(300) - c:RegisterEffect(e3) - --equip limit - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetCode(EFFECT_EQUIP_LIMIT) - e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e4:SetValue(c4614116.eqlimit) - c:RegisterEffect(e4) -end -function c4614116.eqlimit(e,c) - return c:IsRace(RACE_FIEND) -end -function c4614116.filter(c) - return c:IsFaceup() and c:IsRace(RACE_FIEND) -end -function c4614116.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c4614116.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c4614116.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c4614116.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c4614116.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,e:GetHandler(),tc) - end -end diff --git a/script/c46145256.lua b/script/c46145256.lua deleted file mode 100644 index 13213d6517..0000000000 --- a/script/c46145256.lua +++ /dev/null @@ -1,15 +0,0 @@ ---閃光の結界像 -function c46145256.initial_effect(c) - --disable spsummon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetTargetRange(1,1) - e1:SetTarget(c46145256.sumlimit) - c:RegisterEffect(e1) -end -function c46145256.sumlimit(e,c,sump,sumtype,sumpos,targetp) - return c:GetAttribute()~=ATTRIBUTE_LIGHT -end diff --git a/script/c46159582.lua b/script/c46159582.lua deleted file mode 100644 index 54ca612167..0000000000 --- a/script/c46159582.lua +++ /dev/null @@ -1,39 +0,0 @@ ---リチュアの儀水鏡 -function c46159582.initial_effect(c) - aux.AddRitualProcEqual2(c,c46159582.ritual_filter) - --salvage - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(46159582,0)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_GRAVE) - e1:SetCost(c46159582.cost) - e1:SetTarget(c46159582.tg) - e1:SetOperation(c46159582.op) - c:RegisterEffect(e1) -end -function c46159582.ritual_filter(c) - return c:IsSetCard(0x3a) and bit.band(c:GetType(),0x81)==0x81 -end -function c46159582.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToDeckAsCost() end - Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_COST) -end -function c46159582.thfilter(c) - return c:IsSetCard(0x3a) and bit.band(c:GetType(),0x81)==0x81 and c:IsAbleToHand() -end -function c46159582.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c46159582.thfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c46159582.thfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c46159582.thfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c46159582.op(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end \ No newline at end of file diff --git a/script/c46173679.lua b/script/c46173679.lua deleted file mode 100644 index af7617cfe2..0000000000 --- a/script/c46173679.lua +++ /dev/null @@ -1,66 +0,0 @@ ---終焉の焔 -function c46173679.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_END_PHASE) - e1:SetCost(c46173679.cost) - e1:SetTarget(c46173679.target) - e1:SetOperation(c46173679.activate) - c:RegisterEffect(e1) -end -function c46173679.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_SUMMON)==0 - and Duel.GetActivityCount(tp,ACTIVITY_FLIPSUMMON)==0 and Duel.GetActivityCount(tp,ACTIVITY_SPSUMMON)==0 end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) - e1:SetLabelObject(e) - e1:SetTargetRange(1,0) - e1:SetTarget(c46173679.sumlimit) - Duel.RegisterEffect(e1,tp) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) - e2:SetCode(EFFECT_CANNOT_SUMMON) - e2:SetReset(RESET_PHASE+PHASE_END) - e2:SetTargetRange(1,0) - Duel.RegisterEffect(e2,tp) - local e3=e2:Clone() - e3:SetCode(EFFECT_CANNOT_FLIP_SUMMON) - Duel.RegisterEffect(e3,tp) -end -function c46173679.sumlimit(e,c,sump,sumtype,sumpos,targetp,se) - return e:GetLabelObject()~=se -end -function c46173679.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>1 - and Duel.IsPlayerCanSpecialSummonMonster(tp,46173680,0,0x4011,0,0,1,RACE_FIEND,ATTRIBUTE_DARK) - end - Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,2,0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,0,0) -end -function c46173679.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)>1 - and Duel.IsPlayerCanSpecialSummonMonster(tp,46173680,0,0x4011,0,0,1,RACE_FIEND,ATTRIBUTE_DARK) then - for i=1,2 do - local token=Duel.CreateToken(tp,46173679+i) - Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP_DEFENCE) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UNRELEASABLE_SUM) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetValue(c46173679.recon) - e1:SetReset(RESET_EVENT+0x1fe0000) - token:RegisterEffect(e1,true) - end - Duel.SpecialSummonComplete() - end -end -function c46173679.recon(e,c) - return not c:IsAttribute(ATTRIBUTE_DARK) -end diff --git a/script/c46181000.lua b/script/c46181000.lua deleted file mode 100644 index 83a78e4795..0000000000 --- a/script/c46181000.lua +++ /dev/null @@ -1,35 +0,0 @@ ---前線基地 -function c46181000.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(46181000,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_SZONE) - e1:SetTarget(c46181000.target) - e1:SetOperation(c46181000.operation) - c:RegisterEffect(e1) -end -function c46181000.filter(c,e,sp) - return c:IsType(TYPE_UNION) and c:GetLevel()<=4 and c:IsCanBeSpecialSummoned(e,0,sp,false,false) -end -function c46181000.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c46181000.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c46181000.operation(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c46181000.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c46195773.lua b/script/c46195773.lua deleted file mode 100644 index 53710f1481..0000000000 --- a/script/c46195773.lua +++ /dev/null @@ -1,47 +0,0 @@ ---ターボ・ウォリアー -function c46195773.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,c46195773.tfilter,aux.NonTuner(nil),1) - c:EnableReviveLimit() - --atk down - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(46195773,0)) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetTarget(c46195773.atktg) - e1:SetOperation(c46195773.atkop) - c:RegisterEffect(e1) - --cannot be target - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetValue(c46195773.efilter) - c:RegisterEffect(e2) -end -function c46195773.tfilter(c) - return c:IsCode(67270095) or c:IsHasEffect(20932152) -end -function c46195773.efilter(e,re,rp) - return re:GetHandler():IsLevelBelow(6) and aux.tgval(e,re,rp) -end -function c46195773.atktg(e,tp,eg,ep,ev,re,r,rp,chk) - local d=Duel.GetAttackTarget() - if chk==0 then return d and d:IsFaceup() and d:GetLevel()>=6 and d:IsType(TYPE_SYNCHRO) end - d:CreateEffectRelation(e) - Duel.SetOperationInfo(0,CATEGORY_POSITION,d,1,0,0) -end -function c46195773.atkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local d=Duel.GetAttackTarget() - if d:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetValue(d:GetAttack()/2) - e1:SetReset(RESET_PHASE+PHASE_DAMAGE) - d:RegisterEffect(e1) - end -end diff --git a/script/c46232525.lua b/script/c46232525.lua deleted file mode 100644 index 68402131ea..0000000000 --- a/script/c46232525.lua +++ /dev/null @@ -1,52 +0,0 @@ ---ヘルモスの爪 -function c46232525.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,46232525+EFFECT_COUNT_CODE_OATH) - e1:SetTarget(c46232525.target) - e1:SetOperation(c46232525.activate) - c:RegisterEffect(e1) - --add code - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_ADD_CODE) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e2:SetValue(10000070) - c:RegisterEffect(e2) -end -function c46232525.tgfilter(c,e,tp,chkf) - if chkf~=PLAYER_NONE and c:IsLocation(LOCATION_HAND) then return false end - return c:IsType(TYPE_MONSTER) and Duel.IsExistingMatchingCard(c46232525.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c:GetRace()) -end -function c46232525.spfilter(c,e,tp,race) - return c:IsType(TYPE_FUSION) and c.material_race and c:IsCanBeSpecialSummoned(e,0,tp,true,false) and race==c.material_race -end -function c46232525.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp - return Duel.IsExistingMatchingCard(c46232525.tgfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil,e,tp,chkf) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function c46232525.activate(e,tp,eg,ep,ev,re,r,rp) - local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL) - local g=Duel.SelectMatchingCard(tp,c46232525.tgfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil,e,tp,chkf) - local tc=g:GetFirst() - if tc and not tc:IsImmuneToEffect(e) then - if tc:IsFacedown() then Duel.ConfirmCards(1-tp,tc) end - local race=tc:GetRace() - Duel.SendtoGrave(tc,REASON_EFFECT) - if not tc:IsLocation(LOCATION_GRAVE) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=Duel.SelectMatchingCard(tp,c46232525.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,race) - local sc=sg:GetFirst() - if sc then - Duel.BreakEffect() - Duel.SpecialSummon(sc,0,tp,tp,true,false,POS_FACEUP) - sc:CompleteProcedure() - end - end -end diff --git a/script/c46237548.lua b/script/c46237548.lua deleted file mode 100644 index 7906a3a932..0000000000 --- a/script/c46237548.lua +++ /dev/null @@ -1,55 +0,0 @@ ---紅蓮魔闘士 -function c46237548.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c46237548.spcon) - e1:SetOperation(c46237548.spop) - c:RegisterEffect(e1) - --SpecialSummon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(46237548,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetCountLimit(1) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetRange(LOCATION_MZONE) - e2:SetTarget(c46237548.target) - e2:SetOperation(c46237548.operation) - c:RegisterEffect(e2) -end -function c46237548.spcfilter(c) - return c:IsType(TYPE_NORMAL) and c:IsAbleToRemoveAsCost() -end -function c46237548.spcon(e,c) - if c==nil then return true end - return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 - and Duel.GetMatchingGroupCount(Card.IsType,c:GetControler(),LOCATION_GRAVE,0,nil,TYPE_NORMAL)==3 - and Duel.IsExistingMatchingCard(c46237548.spcfilter,c:GetControler(),LOCATION_GRAVE,0,2,nil) -end -function c46237548.spop(e,tp,eg,ep,ev,re,r,rp,c) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c46237548.spcfilter,tp,LOCATION_GRAVE,0,2,2,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c46237548.tgfilter(c,e,tp) - return c:IsType(TYPE_NORMAL) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c46237548.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c46237548.tgfilter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c46237548.tgfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c46237548.tgfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c46237548.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c46239604.lua b/script/c46239604.lua deleted file mode 100644 index 444acb9bef..0000000000 --- a/script/c46239604.lua +++ /dev/null @@ -1,51 +0,0 @@ ---魔知ガエル -function c46239604.initial_effect(c) - --change code - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_CHANGE_CODE) - e1:SetValue(84451804) - c:RegisterEffect(e1) - --search - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(46239604,0)) - e2:SetCategory(CATEGORY_TOHAND) - e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e2:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetCondition(c46239604.condition) - e2:SetTarget(c46239604.target) - e2:SetOperation(c46239604.operation) - c:RegisterEffect(e2) - --atlimit - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET) - e3:SetRange(LOCATION_MZONE) - e3:SetTargetRange(0,LOCATION_MZONE) - e3:SetValue(c46239604.atlimit) - c:RegisterEffect(e3) -end -function c46239604.atlimit(e,c) - return c~=e:GetHandler() -end -function c46239604.condition(e,tp,eg,ep,ev,re,r,rp,chk) - return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) -end -function c46239604.filter(c) - return c:IsSetCard(0x12) and c:GetCode()~=46239604 and c:IsAbleToHand() and not c:IsHasEffect(EFFECT_NECRO_VALLEY) -end -function c46239604.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c46239604.filter,tp,LOCATION_GRAVE+LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE+LOCATION_DECK) -end -function c46239604.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c46239604.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c46259438.lua b/script/c46259438.lua deleted file mode 100644 index 3ef04c4679..0000000000 --- a/script/c46259438.lua +++ /dev/null @@ -1,30 +0,0 @@ ---契約洗浄 -function c46259438.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_DRAW+CATEGORY_RECOVER) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c46259438.target) - e1:SetOperation(c46259438.activate) - c:RegisterEffect(e1) -end -function c46259438.filter(c) - return c:IsFaceup() and c:IsSetCard(0xae) and c:GetSequence()<5 and c:IsDestructable() -end -function c46259438.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp) - and Duel.IsExistingMatchingCard(c46259438.filter,tp,LOCATION_SZONE,0,1,nil) end - local g=Duel.GetMatchingGroup(c46259438.filter,tp,LOCATION_SZONE,0,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,g:GetCount()) - Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,g:GetCount()*1000) -end -function c46259438.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c46259438.filter,tp,LOCATION_SZONE,0,nil) - local ct1=Duel.Destroy(g,REASON_EFFECT) - if ct1==0 then return end - local ct2=Duel.Draw(tp,ct1,REASON_EFFECT) - Duel.BreakEffect() - Duel.Recover(tp,ct2*1000,REASON_EFFECT) -end diff --git a/script/c46263076.lua b/script/c46263076.lua deleted file mode 100644 index d4ae63fcf3..0000000000 --- a/script/c46263076.lua +++ /dev/null @@ -1,54 +0,0 @@ ---地縛神 Ccapac Apu -function c46263076.initial_effect(c) - c:SetUniqueOnField(1,1,10000000) - -- - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e4:SetRange(LOCATION_MZONE) - e4:SetCode(EFFECT_SELF_DESTROY) - e4:SetCondition(c46263076.sdcon) - c:RegisterEffect(e4) - --battle target - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_SINGLE) - e5:SetCode(EFFECT_CANNOT_BE_BATTLE_TARGET) - e5:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e5:SetRange(LOCATION_MZONE) - e5:SetValue(aux.imval1) - c:RegisterEffect(e5) - --direct atk - local e6=Effect.CreateEffect(c) - e6:SetType(EFFECT_TYPE_SINGLE) - e6:SetCode(EFFECT_DIRECT_ATTACK) - c:RegisterEffect(e6) - --damage - local e7=Effect.CreateEffect(c) - e7:SetDescription(aux.Stringid(46263076,0)) - e7:SetCategory(CATEGORY_DAMAGE) - e7:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e7:SetCode(EVENT_BATTLE_DESTROYING) - e7:SetTarget(c46263076.damtg) - e7:SetOperation(c46263076.damop) - c:RegisterEffect(e7) -end -function c46263076.sdcon(e) - local c=e:GetHandler() - if c:IsStatus(STATUS_BATTLE_DESTROYED) then return false end - local f1=Duel.GetFieldCard(0,LOCATION_SZONE,5) - local f2=Duel.GetFieldCard(1,LOCATION_SZONE,5) - return ((f1==nil or not f1:IsFaceup()) and (f2==nil or not f2:IsFaceup())) -end -function c46263076.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local tc=e:GetHandler():GetBattleTarget() - local atk=tc:GetBaseAttack() - if atk<0 then atk=0 end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(atk) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,atk) -end -function c46263076.damop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c46272804.lua b/script/c46272804.lua deleted file mode 100644 index 85e96d213a..0000000000 --- a/script/c46272804.lua +++ /dev/null @@ -1,8 +0,0 @@ ---ランス・リンドブルム -function c46272804.initial_effect(c) - --pierce - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_PIERCE) - c:RegisterEffect(e1) -end diff --git a/script/c46291010.lua b/script/c46291010.lua deleted file mode 100644 index 1c05da13b8..0000000000 --- a/script/c46291010.lua +++ /dev/null @@ -1,34 +0,0 @@ ---サイキック・ビースト -function c46291010.initial_effect(c) - --remove - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(46291010,0)) - e1:SetCategory(CATEGORY_REMOVE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c46291010.rmtg) - e1:SetOperation(c46291010.rmop) - c:RegisterEffect(e1) -end -function c46291010.filter(c,lv) - return c:IsRace(RACE_PSYCHO) and c:GetLevel()~=lv and c:IsAbleToRemove() -end -function c46291010.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c46291010.filter,tp,LOCATION_DECK,0,1,nil,e:GetHandler():GetLevel()) end - Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_DECK) -end -function c46291010.rmop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c46291010.filter,tp,LOCATION_DECK,0,1,1,nil,c:GetLevel()) - local tc=g:GetFirst() - if tc and c:IsRelateToEffect(e) and c:IsFaceup() then - Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CHANGE_LEVEL) - e1:SetValue(tc:GetLevel()) - e1:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e1) - end -end diff --git a/script/c46303688.lua b/script/c46303688.lua deleted file mode 100644 index 0a55dd7ada..0000000000 --- a/script/c46303688.lua +++ /dev/null @@ -1,33 +0,0 @@ ---ルーレットボマー -function c46303688.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(46303688,0)) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_DICE) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetTarget(c46303688.target) - e1:SetOperation(c46303688.activate) - c:RegisterEffect(e1) -end -function c46303688.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DICE,nil,0,tp,2) -end -function c46303688.dfilter(c,lv) - return c:IsFaceup() and c:GetLevel()==lv and c:IsDestructable() -end -function c46303688.activate(e,tp,eg,ep,ev,re,r,rp) - local d1,d2=Duel.TossDice(tp,2) - local sel=d1 - if d1>d2 then d1,d2=d2,d1 end - if d1~=d2 then - sel=Duel.AnnounceNumber(tp,d1,d2) - end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local dg=Duel.SelectMatchingCard(tp,c46303688.dfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,sel) - if dg:GetCount()>0 then - Duel.Destroy(dg,REASON_EFFECT) - end -end diff --git a/script/c46337945.lua b/script/c46337945.lua deleted file mode 100644 index 2c86cc4a29..0000000000 --- a/script/c46337945.lua +++ /dev/null @@ -1,41 +0,0 @@ ---儀水鏡の瞑想術 -function c46337945.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c46337945.cost) - e1:SetTarget(c46337945.target) - e1:SetOperation(c46337945.activate) - c:RegisterEffect(e1) -end -function c46337945.costfilter(c) - return not c:IsPublic() and c:GetType()==0x82 -end -function c46337945.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c46337945.costfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) - local g=Duel.SelectMatchingCard(tp,c46337945.costfilter,tp,LOCATION_HAND,0,1,1,nil) - Duel.ConfirmCards(1-tp,g) - Duel.ShuffleHand(tp) -end -function c46337945.filter(c) - return c:IsSetCard(0x3a) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() -end -function c46337945.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:GetControler()==tp and chkc:GetLocation()==LOCATION_GRAVE and c46337945.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c46337945.filter,tp,LOCATION_GRAVE,0,2,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c46337945.filter,tp,LOCATION_GRAVE,0,2,2,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,2,0,0) -end -function c46337945.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local sg=g:Filter(Card.IsRelateToEffect,nil,e) - if sg:GetCount()>0 then - Duel.SendtoHand(sg,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,sg) - end -end diff --git a/script/c46354113.lua b/script/c46354113.lua deleted file mode 100644 index 6e67dbe66c..0000000000 --- a/script/c46354113.lua +++ /dev/null @@ -1,61 +0,0 @@ ---ロケット・ヘルモス・キャノン -function c46354113.initial_effect(c) - c:EnableReviveLimit() - --spsummon condition - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - c:RegisterEffect(e1) - --equip - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_EQUIP) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetTarget(c46354113.eqtg) - e2:SetOperation(c46354113.eqop) - c:RegisterEffect(e2) -end -c46354113.material_race=RACE_WARRIOR -function c46354113.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() and chkc~=e:GetHandler() end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,e:GetHandler()) -end -function c46354113.eqop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if not tc then return end - local c=e:GetHandler() - if not c:IsRelateToEffect(e) or c:IsLocation(LOCATION_SZONE) or c:IsFacedown() then return end - if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or tc:IsFacedown() or not tc:IsRelateToEffect(e) then - Duel.SendtoGrave(c,REASON_EFFECT) - return - end - Duel.Equip(tp,c,tc) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetValue(c46354113.eqlimit) - e1:SetLabelObject(tc) - e1:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e1) - --extra attack - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_EXTRA_ATTACK) - e2:SetValue(1) - e2:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e2) - --pierce - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_EQUIP) - e3:SetCode(EFFECT_PIERCE) - e3:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e3) -end -function c46354113.eqlimit(e,c) - return c==e:GetLabelObject() -end diff --git a/script/c46363422.lua b/script/c46363422.lua deleted file mode 100644 index 9772d77c87..0000000000 --- a/script/c46363422.lua +++ /dev/null @@ -1,54 +0,0 @@ ---熟練の白魔導師 -function c46363422.initial_effect(c) - c:EnableCounterPermit(0x3001) - c:SetCounterLimit(0x3001,3) - --add counter - local e0=Effect.CreateEffect(c) - e0:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e0:SetCode(EVENT_CHAINING) - e0:SetRange(LOCATION_MZONE) - e0:SetOperation(aux.chainreg) - c:RegisterEffect(e0) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e1:SetCode(EVENT_CHAIN_SOLVED) - e1:SetRange(LOCATION_MZONE) - e1:SetOperation(c46363422.acop) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(46363422,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCost(c46363422.spcost) - e2:SetTarget(c46363422.sptg) - e2:SetOperation(c46363422.spop) - c:RegisterEffect(e2) -end -function c46363422.acop(e,tp,eg,ep,ev,re,r,rp) - if re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL) and e:GetHandler():GetFlagEffect(1)>0 then - e:GetHandler():AddCounter(0x3001,1) - end -end -function c46363422.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():GetCounter(0x3001)==3 and e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end -function c46363422.filter(c,e,tp) - return c:IsCode(78193831) and not c:IsHasEffect(EFFECT_NECRO_VALLEY) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c46363422.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsExistingMatchingCard(c46363422.filter,tp,0x13,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,0,tp,0x13) -end -function c46363422.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c46363422.filter,tp,0x13,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c46372010.lua b/script/c46372010.lua deleted file mode 100644 index 5752390167..0000000000 --- a/script/c46372010.lua +++ /dev/null @@ -1,59 +0,0 @@ ---地獄門の契約書 -function c46372010.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --tohand - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(46372010,0)) - e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_SZONE) - e2:SetCountLimit(1,46372010) - e2:SetTarget(c46372010.thtg) - e2:SetOperation(c46372010.thop) - c:RegisterEffect(e2) - --damage - local e3=Effect.CreateEffect(c) - e3:SetCategory(CATEGORY_DAMAGE) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e3:SetRange(LOCATION_SZONE) - e3:SetCode(EVENT_PHASE+PHASE_STANDBY) - e3:SetCountLimit(1) - e3:SetCondition(c46372010.damcon) - e3:SetTarget(c46372010.damtg) - e3:SetOperation(c46372010.damop) - c:RegisterEffect(e3) -end -function c46372010.filter(c) - return c:IsSetCard(0xaf) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() -end -function c46372010.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c46372010.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c46372010.thop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c46372010.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end -function c46372010.damcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c46372010.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(1000) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,0,0,tp,1000) -end -function c46372010.damop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c4638410.lua b/script/c4638410.lua deleted file mode 100644 index 20da588bea..0000000000 --- a/script/c4638410.lua +++ /dev/null @@ -1,29 +0,0 @@ ---暴君の威圧 -function c4638410.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c4638410.cost) - c:RegisterEffect(e1) - --immune - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_IMMUNE_EFFECT) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e2:SetTarget(c4638410.etarget) - e2:SetValue(c4638410.efilter) - c:RegisterEffect(e2) -end -function c4638410.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,nil,1,nil) end - local rg=Duel.SelectReleaseGroup(tp,nil,1,1,nil) - Duel.Release(rg,REASON_COST) -end -function c4638410.etarget(e,c) - return c:GetOwner()==e:GetHandlerPlayer() -end -function c4638410.efilter(e,te) - return te:IsActiveType(TYPE_TRAP) and te:GetOwner()~=e:GetOwner() -end diff --git a/script/c46384403.lua b/script/c46384403.lua deleted file mode 100644 index c49fa56d21..0000000000 --- a/script/c46384403.lua +++ /dev/null @@ -1,33 +0,0 @@ ---素早いマンタ -function c46384403.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(46384403,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCondition(c46384403.condition) - e1:SetTarget(c46384403.target) - e1:SetOperation(c46384403.operation) - c:RegisterEffect(e1) -end -function c46384403.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) and e:GetHandler():IsReason(REASON_EFFECT) -end -function c46384403.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c46384403.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c46384403.filter(c,e,tp) - return c:IsCode(46384403) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c46384403.operation(e,tp,eg,ep,ev,re,r,rp) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ft<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c46384403.filter,tp,LOCATION_DECK,0,1,ft,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c46384672.lua b/script/c46384672.lua deleted file mode 100644 index 4c3384f009..0000000000 --- a/script/c46384672.lua +++ /dev/null @@ -1,95 +0,0 @@ ---アームド・ドラゴン LV5 -function c46384672.initial_effect(c) - --battle destroy - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_BATTLE_DESTROYING) - e1:SetOperation(c46384672.bdop) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(46384672,0)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCost(c46384672.descost) - e2:SetTarget(c46384672.destg) - e2:SetOperation(c46384672.desop) - c:RegisterEffect(e2) - --special summon - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(46384672,1)) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetRange(LOCATION_MZONE) - e3:SetCode(EVENT_PHASE+PHASE_END) - e3:SetCondition(c46384672.spcon) - e3:SetCost(c46384672.spcost) - e3:SetTarget(c46384672.sptg) - e3:SetOperation(c46384672.spop) - c:RegisterEffect(e3) -end -c46384672.lvupcount=1 -c46384672.lvup={73879377} -c46384672.lvdncount=1 -c46384672.lvdn={980973} -function c46384672.bdop(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():RegisterFlagEffect(46384672,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) -end -function c46384672.cfilter(c,tp) - local atk=c:GetAttack() - if atk<0 then atk=0 end - return c:IsType(TYPE_MONSTER) and c:IsAbleToGraveAsCost() - and Duel.IsExistingTarget(c46384672.dfilter,tp,0,LOCATION_MZONE,1,nil,atk) -end -function c46384672.dfilter(c,atk) - return c:IsFaceup() and c:GetAttack()<=atk and c:IsDestructable() -end -function c46384672.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c46384672.cfilter,tp,LOCATION_HAND,0,1,nil,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c46384672.cfilter,tp,LOCATION_HAND,0,1,1,nil,tp) - local atk=g:GetFirst():GetAttack() - if atk<0 then atk=0 end - e:SetLabel(atk) - Duel.SendtoGrave(g,REASON_COST) -end -function c46384672.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and c46384672.dfilter(chkc,e:GetLabel()) end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c46384672.dfilter,tp,0,LOCATION_MZONE,1,1,nil,e:GetLabel()) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c46384672.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) and tc:GetAttack()<=e:GetLabel() then - Duel.Destroy(tc,REASON_EFFECT) - end -end -function c46384672.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetFlagEffect(46384672)>0 -end -function c46384672.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end -function c46384672.spfilter(c,e,tp) - return c:IsCode(73879377) and c:IsCanBeSpecialSummoned(e,0,tp,true,true) -end -function c46384672.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsExistingMatchingCard(c46384672.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) -end -function c46384672.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c46384672.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp) - local tc=g:GetFirst() - if tc then - Duel.SpecialSummon(tc,0,tp,tp,true,true,POS_FACEUP) - tc:CompleteProcedure() - end -end diff --git a/script/c46404281.lua b/script/c46404281.lua deleted file mode 100644 index 649cf97609..0000000000 --- a/script/c46404281.lua +++ /dev/null @@ -1,34 +0,0 @@ ---ラヴァルのマグマ砲兵 -function c46404281.initial_effect(c) - --damage - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(46404281,0)) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(2) - e1:SetCost(c46404281.damcost) - e1:SetTarget(c46404281.damtg) - e1:SetOperation(c46404281.damop) - c:RegisterEffect(e1) -end -function c46404281.cfilter(c) - return c:IsAttribute(ATTRIBUTE_FIRE) and c:IsAbleToGraveAsCost() -end -function c46404281.damcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c46404281.cfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c46404281.cfilter,tp,LOCATION_HAND,0,1,1,nil) - Duel.SendtoGrave(g,REASON_COST) -end -function c46404281.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(500) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,500) -end -function c46404281.damop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c46411259.lua b/script/c46411259.lua deleted file mode 100644 index b304c03717..0000000000 --- a/script/c46411259.lua +++ /dev/null @@ -1,45 +0,0 @@ ---突然変異 -function c46411259.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetLabel(0) - e1:SetCost(c46411259.cost) - e1:SetTarget(c46411259.target) - e1:SetOperation(c46411259.activate) - c:RegisterEffect(e1) -end -function c46411259.cost(e,tp,eg,ep,ev,re,r,rp,chk) - e:SetLabel(100) - return true -end -function c46411259.filter1(c,e,tp) - local lv=c:GetLevel() - return lv>0 and Duel.IsExistingMatchingCard(c46411259.filter2,tp,LOCATION_EXTRA,0,1,nil,lv,e,tp) -end -function c46411259.filter2(c,lv,e,tp) - return c:IsType(TYPE_FUSION) and c:GetLevel()==lv and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c46411259.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - if e:GetLabel()~=100 then return false end - e:SetLabel(0) - return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.CheckReleaseGroup(tp,c46411259.filter1,1,nil,e,tp) - end - local rg=Duel.SelectReleaseGroup(tp,c46411259.filter1,1,1,nil,e,tp) - e:SetLabel(rg:GetFirst():GetLevel()) - Duel.Release(rg,REASON_COST) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function c46411259.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local lv=e:GetLabel() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c46411259.filter2,tp,LOCATION_EXTRA,0,1,1,nil,lv,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c46427957.lua b/script/c46427957.lua deleted file mode 100644 index 8e626cadad..0000000000 --- a/script/c46427957.lua +++ /dev/null @@ -1,20 +0,0 @@ ---破滅の女神ルイン -function c46427957.initial_effect(c) - c:EnableReviveLimit() - --chain attack - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(46427957,0)) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_BATTLED) - e1:SetCondition(c46427957.atcon) - e1:SetOperation(c46427957.atop) - c:RegisterEffect(e1) -end -function c46427957.atcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local bc=c:GetBattleTarget() - return bc and bc:IsStatus(STATUS_BATTLE_DESTROYED) and c:IsChainAttackable() and c:IsStatus(STATUS_OPPO_BATTLE) -end -function c46427957.atop(e,tp,eg,ep,ev,re,r,rp) - Duel.ChainAttack() -end diff --git a/script/c464362.lua b/script/c464362.lua deleted file mode 100644 index d31d1a6765..0000000000 --- a/script/c464362.lua +++ /dev/null @@ -1,78 +0,0 @@ ---デストーイ・シザー・タイガー -function c464362.initial_effect(c) - c:SetUniqueOnField(1,0,464362) - --fusion material - c:EnableReviveLimit() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_FUSION_MATERIAL) - e1:SetCondition(c464362.fscon) - e1:SetOperation(c464362.fsop) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetCondition(c464362.descon) - e2:SetTarget(c464362.destg) - e2:SetOperation(c464362.desop) - c:RegisterEffect(e2) - --atk - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetCode(EFFECT_UPDATE_ATTACK) - e3:SetRange(LOCATION_MZONE) - e3:SetTargetRange(LOCATION_MZONE,0) - e3:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0xad)) - e3:SetValue(c464362.atkval) - c:RegisterEffect(e3) -end -c464362.material_count=1 -c464362.material={30068120} -function c464362.mfilter(c,mg) - return (c:IsCode(30068120) or c:IsHasEffect(EFFECT_FUSION_SUBSTITUTE)) and mg:IsExists(Card.IsSetCard,1,c,0xa9) -end -function c464362.fscon(e,mg,gc) - if mg==nil then return true end - if gc then return (gc:IsCode(30068120) or gc:IsHasEffect(EFFECT_FUSION_SUBSTITUTE)) - and mg:IsExists(Card.IsSetCard,1,gc,0xa9) end - return mg:IsExists(c464362.mfilter,1,nil,mg) -end -function c464362.fsop(e,tp,eg,ep,ev,re,r,rp,gc) - if gc then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL) - local g1=eg:FilterSelect(tp,Card.IsSetCard,1,63,nil,0xa9) - Duel.SetFusionMaterial(g1) - return - end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL) - local g1=eg:FilterSelect(tp,c464362.mfilter,1,1,nil,eg) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL) - local g2=eg:FilterSelect(tp,Card.IsSetCard,1,63,g1:GetFirst(),0xa9) - g1:Merge(g2) - Duel.SetFusionMaterial(g1) -end -function c464362.descon(e,tp,eg,ep,ev,re,r,rp) - return bit.band(e:GetHandler():GetSummonType(),SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION -end -function c464362.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsDestructable() end - if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end - local ct=e:GetHandler():GetMaterialCount() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,ct,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c464362.desop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) - Duel.Destroy(g,REASON_EFFECT) -end -function c464362.atkfilter(c) - return c:IsFaceup() and (c:IsSetCard(0xa9) or c:IsSetCard(0xad)) -end -function c464362.atkval(e,c) - return Duel.GetMatchingGroupCount(c464362.atkfilter,c:GetControler(),LOCATION_MZONE,0,nil)*300 -end diff --git a/script/c46448938.lua b/script/c46448938.lua deleted file mode 100644 index 11f4fdf1b6..0000000000 --- a/script/c46448938.lua +++ /dev/null @@ -1,76 +0,0 @@ ---魔導書の神判 -function c46448938.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,46448938+EFFECT_COUNT_CODE_OATH) - e1:SetOperation(c46448938.activate) - c:RegisterEffect(e1) -end -function c46448938.activate(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_CHAINING) - e1:SetCondition(c46448938.regcon) - e1:SetOperation(c46448938.regop1) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_CHAIN_NEGATED) - e2:SetCondition(c46448938.regcon) - e2:SetOperation(c46448938.regop2) - e2:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e2,tp) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e3:SetCode(EVENT_PHASE+PHASE_END) - e3:SetCountLimit(1) - e3:SetCondition(c46448938.effcon) - e3:SetOperation(c46448938.effop) - e3:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e3,tp) - e1:SetLabelObject(e3) - e2:SetLabelObject(e3) -end -function c46448938.regcon(e,tp,eg,ep,ev,re,r,rp) - return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL) -end -function c46448938.regop1(e,tp,eg,ep,ev,re,r,rp) - local ct=e:GetLabelObject():GetLabel() - e:GetLabelObject():SetLabel(ct+1) -end -function c46448938.regop2(e,tp,eg,ep,ev,re,r,rp) - local ct=e:GetLabelObject():GetLabel() - if ct==0 then ct=1 end - e:GetLabelObject():SetLabel(ct-1) -end -function c46448938.effcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetLabel()>0 -end -function c46448938.sfilter(c) - return c:IsSetCard(0x106e) and c:GetCode()~=46448938 and c:IsType(TYPE_SPELL) and c:IsAbleToHand() -end -function c46448938.spfilter(c,lv,e,tp) - return c:IsLevelBelow(lv) and c:IsRace(RACE_SPELLCASTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c46448938.effop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_CARD,0,46448938) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c46448938.sfilter,tp,LOCATION_DECK,0,1,e:GetLabel(),nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c46448938.spfilter,tp,LOCATION_DECK,0,1,nil,g:GetCount(),e,tp) - and Duel.SelectYesNo(tp,aux.Stringid(46448938,1)) then - Duel.BreakEffect() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=Duel.SelectMatchingCard(tp,c46448938.spfilter,tp,LOCATION_DECK,0,1,1,nil,g:GetCount(),e,tp) - Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) - end - end -end diff --git a/script/c46461247.lua b/script/c46461247.lua deleted file mode 100644 index 68552af2bf..0000000000 --- a/script/c46461247.lua +++ /dev/null @@ -1,31 +0,0 @@ ---トラップ・マスター -function c46461247.initial_effect(c) - --flip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(46461247,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP) - e1:SetTarget(c46461247.target) - e1:SetOperation(c46461247.operation) - c:RegisterEffect(e1) -end -function c46461247.filter(c) - return c:IsFacedown() or c:IsType(TYPE_TRAP) -end -function c46461247.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_SZONE) and c46461247.filter(chkc) end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c46461247.filter,tp,LOCATION_SZONE,LOCATION_SZONE,1,1,e:GetHandler()) - if g:GetCount()>0 and g:GetFirst():IsFaceup() then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) - end -end -function c46461247.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - if tc:IsFacedown() then Duel.ConfirmCards(tp,tc) end - if tc:IsType(TYPE_TRAP) then Duel.Destroy(tc,REASON_EFFECT) end - end -end diff --git a/script/c46480475.lua b/script/c46480475.lua deleted file mode 100644 index 58cf1b1fa2..0000000000 --- a/script/c46480475.lua +++ /dev/null @@ -1,47 +0,0 @@ ---不協和音 -function c46480475.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_DRAW_PHASE) - e1:SetTarget(c46480475.target) - c:RegisterEffect(e1) - --disable spsummon - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetRange(LOCATION_SZONE) - e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetTargetRange(1,1) - e2:SetTarget(c46480475.splimit) - c:RegisterEffect(e2) -end -function c46480475.splimit(e,c,tp,sumtp,sumpos) - return bit.band(sumtp,SUMMON_TYPE_SYNCHRO)==SUMMON_TYPE_SYNCHRO -end -function c46480475.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetRange(LOCATION_SZONE) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetLabel(3) - e1:SetCountLimit(1) - e1:SetCondition(c46480475.tgcon) - e1:SetOperation(c46480475.tgop) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END+RESET_SELF_TURN,3) - e:GetHandler():RegisterEffect(e1) -end -function c46480475.tgcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c46480475.tgop(e,tp,eg,ep,ev,re,r,rp) - local ct=e:GetLabel() - ct=ct-1 - e:SetLabel(ct) - if ct==0 then - Duel.SendtoGrave(e:GetHandler(),REASON_EFFECT) - end -end diff --git a/script/c46502013.lua b/script/c46502013.lua deleted file mode 100644 index cf9479cbdf..0000000000 --- a/script/c46502013.lua +++ /dev/null @@ -1,25 +0,0 @@ ---ガリトラップ-ピクシーの輪- -function c46502013.initial_effect(c) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --cannot be battle target - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(0,LOCATION_MZONE) - e2:SetCondition(c46502013.con) - e2:SetValue(c46502013.atlimit) - c:RegisterEffect(e2) -end -function c46502013.con(e) - return Duel.IsExistingMatchingCard(Card.IsPosition,e:GetHandlerPlayer(),LOCATION_MZONE,0,2,nil,POS_FACEUP_ATTACK) -end -function c46502013.tfilter(c,atk) - return c:IsFaceup() and c:GetAttack()0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c46502744.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.SpecialSummonStep(c,0,tp,tp,false,false,POS_FACEUP) then - c:RegisterFlagEffect(46502745,RESET_EVENT+0xfe0000,0,1) - Duel.SpecialSummonComplete() - end -end -function c46502744.remcon(e) - return e:GetHandler():GetFlagEffect(46502745)~=0 -end -function c46502744.thcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) -end -function c46502744.thfilter(c) - return c:IsRace(RACE_INSECT) and c:IsAttribute(ATTRIBUTE_EARTH) and c:IsAttackBelow(1500) and not c:IsCode(46502744) and c:IsAbleToHand() -end -function c46502744.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c46502744.thfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c46502744.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c46502744.thfilter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c46508640.lua b/script/c46508640.lua deleted file mode 100644 index 20272d823c..0000000000 --- a/script/c46508640.lua +++ /dev/null @@ -1,17 +0,0 @@ ---龍脈に棲む者 -function c46508640.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(c46508640.atkval) - c:RegisterEffect(e1) -end -function c46508640.cfilter(c) - return c:IsFaceup() and c:GetType()==TYPE_SPELL+TYPE_CONTINUOUS and c:GetSequence()~=5 -end -function c46508640.atkval(e,c) - return Duel.GetMatchingGroupCount(c46508640.cfilter,c:GetControler(),LOCATION_SZONE,0,nil)*300 -end diff --git a/script/c46565218.lua b/script/c46565218.lua deleted file mode 100644 index cda98afe24..0000000000 --- a/script/c46565218.lua +++ /dev/null @@ -1,46 +0,0 @@ ---サタンクロース -function c46565218.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_SPSUM_PARAM) - e1:SetRange(LOCATION_HAND) - e1:SetTargetRange(POS_FACEUP_DEFENCE,1) - e1:SetCondition(c46565218.spcon) - e1:SetOperation(c46565218.spop) - c:RegisterEffect(e1) -end -function c46565218.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.GetLocationCount(1-tp,LOCATION_MZONE)>-1 - and Duel.IsExistingMatchingCard(Card.IsReleasable,tp,0,LOCATION_MZONE,1,nil) -end -function c46565218.spop(e,tp,eg,ep,ev,re,r,rp,c) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) - local g=Duel.SelectMatchingCard(tp,Card.IsReleasable,tp,0,LOCATION_MZONE,1,1,nil) - Duel.Release(g,REASON_COST) - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(46565218,0)) - e1:SetCategory(CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetRange(LOCATION_MZONE) - e1:SetProperty(EFFECT_FLAG_OATH) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetCountLimit(1) - e1:SetTarget(c46565218.drtg) - e1:SetOperation(c46565218.drop) - e1:SetReset(RESET_EVENT+0xec0000+RESET_PHASE+PHASE_END) - c:RegisterEffect(e1) -end -function c46565218.drtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(1) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c46565218.drop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end diff --git a/script/c46571052.lua b/script/c46571052.lua deleted file mode 100644 index 4c8b77bf3b..0000000000 --- a/script/c46571052.lua +++ /dev/null @@ -1,28 +0,0 @@ ---ブラッド・オーキス -function c46571052.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(46571052,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c46571052.sptg) - e1:SetOperation(c46571052.spop) - c:RegisterEffect(e1) -end -function c46571052.filter(c,e,tp) - return c:IsCode(12965761) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c46571052.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c46571052.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c46571052.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c46571052.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c46572756.lua b/script/c46572756.lua deleted file mode 100644 index 971ccd90cb..0000000000 --- a/script/c46572756.lua +++ /dev/null @@ -1,35 +0,0 @@ ---レアル・ジェネクス・ウルティマム -function c46572756.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(46572756,0)) - e1:SetCategory(CATEGORY_TODECK) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCondition(c46572756.condition) - e1:SetTarget(c46572756.target) - e1:SetOperation(c46572756.operation) - c:RegisterEffect(e1) -end -function c46572756.condition(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsReason(REASON_DESTROY) and c:IsPreviousPosition(POS_FACEUP) -end -function c46572756.filter(c) - return c:IsSetCard(0x2) and c:IsAbleToDeck() -end -function c46572756.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c46572756.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c46572756.filter,tp,LOCATION_GRAVE,0,2,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectTarget(tp,c46572756.filter,tp,LOCATION_GRAVE,0,2,2,nil) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,2,0,0) -end -function c46572756.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local sg=g:Filter(Card.IsRelateToEffect,nil,e) - if sg:GetCount()>0 then - Duel.SendtoDeck(sg,nil,2,REASON_EFFECT) - end -end diff --git a/script/c46609443.lua b/script/c46609443.lua deleted file mode 100644 index dc6b7373bb..0000000000 --- a/script/c46609443.lua +++ /dev/null @@ -1,35 +0,0 @@ ---カオスエンドマスター -function c46609443.initial_effect(c) - --search - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(46609443,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c46609443.spcon) - e1:SetTarget(c46609443.sptg) - e1:SetOperation(c46609443.spop) - c:RegisterEffect(e1) -end -function c46609443.spcon(e,tp,eg,ep,ev,re,r,rp) - local tc=eg:GetFirst() - return eg:GetCount()==1 and tc:GetReasonCard()==e:GetHandler() - and tc:IsLocation(LOCATION_GRAVE) and tc:IsReason(REASON_BATTLE) -end -function c46609443.filter(c,e,tp) - return c:IsAttackBelow(1600) and c:IsLevelAbove(5) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c46609443.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c46609443.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c46609443.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c46609443.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c46652477.lua b/script/c46652477.lua deleted file mode 100644 index c75b5aedce..0000000000 --- a/script/c46652477.lua +++ /dev/null @@ -1,24 +0,0 @@ ---転生の予言 -function c46652477.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TODECK) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c46652477.target) - e1:SetOperation(c46652477.activate) - c:RegisterEffect(e1) -end -function c46652477.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToDeck,tp,LOCATION_GRAVE,LOCATION_GRAVE,2,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectTarget(tp,Card.IsAbleToDeck,tp,LOCATION_GRAVE,LOCATION_GRAVE,2,2,nil) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,2,0,0) -end -function c46652477.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local sg=g:Filter(Card.IsRelateToEffect,nil,e) - Duel.SendtoDeck(sg,nil,2,REASON_EFFECT) -end diff --git a/script/c46656406.lua b/script/c46656406.lua deleted file mode 100644 index f5c80577f5..0000000000 --- a/script/c46656406.lua +++ /dev/null @@ -1,31 +0,0 @@ ---呪言の鏡 -function c46656406.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetTarget(c46656406.target) - e1:SetOperation(c46656406.activate) - c:RegisterEffect(e1) -end -function c46656406.filter(c,tp) - return c:GetSummonPlayer()~=tp and c:IsPreviousLocation(LOCATION_DECK) and c:IsDestructable() -end -function c46656406.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return eg:IsExists(c46656406.filter,1,nil,tp) and Duel.IsPlayerCanDraw(tp,1) end - local g=eg:Filter(c46656406.filter,nil,tp) - Duel.SetTargetCard(eg) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c46656406.filter2(c,e,tp) - return c:IsRelateToEffect(e) and c:GetSummonPlayer()~=tp and c:IsPreviousLocation(LOCATION_DECK) and c:IsDestructable() -end -function c46656406.activate(e,tp,eg,ep,ev,re,r,rp) - local g=eg:Filter(c46656406.filter2,nil,e,tp) - if Duel.Destroy(g,REASON_EFFECT)~=0 then - Duel.BreakEffect() - Duel.Draw(tp,1,REASON_EFFECT) - end -end diff --git a/script/c46657337.lua b/script/c46657337.lua deleted file mode 100644 index 79a712ddab..0000000000 --- a/script/c46657337.lua +++ /dev/null @@ -1,18 +0,0 @@ ---ムカムカ -function c46657337.initial_effect(c) - --atkup - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetRange(LOCATION_MZONE) - e1:SetValue(c46657337.val) - c:RegisterEffect(e1) - --defup - local e2=e1:Clone() - e2:SetCode(EFFECT_UPDATE_DEFENCE) - c:RegisterEffect(e2) -end -function c46657337.val(e,c) - return Duel.GetFieldGroupCount(c:GetControler(),LOCATION_HAND,0)*300 -end diff --git a/script/c46659709.lua b/script/c46659709.lua deleted file mode 100644 index b11a427ae7..0000000000 --- a/script/c46659709.lua +++ /dev/null @@ -1,55 +0,0 @@ ---銀河戦士 -function c46659709.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(46659709,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND) - e1:SetCost(c46659709.spcost) - e1:SetTarget(c46659709.sptg) - e1:SetOperation(c46659709.spop) - c:RegisterEffect(e1) - --search - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(46659709,1)) - e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetCountLimit(1,46659709) - e2:SetTarget(c46659709.target) - e2:SetOperation(c46659709.operation) - c:RegisterEffect(e2) -end -function c46659709.cfilter(c) - return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsAbleToGraveAsCost() -end -function c46659709.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c46659709.cfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,c46659709.cfilter,1,1,REASON_COST,e:GetHandler()) -end -function c46659709.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c46659709.spop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP_DEFENCE) - end -end -function c46659709.filter(c) - return c:IsSetCard(0x7b) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() -end -function c46659709.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c46659709.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c46659709.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c46659709.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c46668237.lua b/script/c46668237.lua deleted file mode 100644 index 79ed976c6a..0000000000 --- a/script/c46668237.lua +++ /dev/null @@ -1,38 +0,0 @@ ---森の番人グリーン・バブーン -function c46668237.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(46668237,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetRange(LOCATION_HAND+LOCATION_GRAVE) - e1:SetProperty(EFFECT_FLAG_CHAIN_UNIQUE) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCondition(c46668237.condition) - e1:SetCost(c46668237.cost) - e1:SetTarget(c46668237.target) - e1:SetOperation(c46668237.operation) - c:RegisterEffect(e1) -end -function c46668237.cfilter(c,tp) - return c:IsType(TYPE_MONSTER) and c:IsRace(RACE_BEAST) and c:GetPreviousControler()==tp and c:IsPreviousPosition(POS_FACEUP) - and c:IsPreviousLocation(LOCATION_MZONE) and bit.band(c:GetPreviousRaceOnField(),RACE_BEAST)~=0 -end -function c46668237.condition(e,tp,eg,ep,ev,re,r,rp) - return not eg:IsContains(e:GetHandler()) and eg:IsExists(c46668237.cfilter,1,nil,tp) and bit.band(r,REASON_DESTROY)~=0 -end -function c46668237.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,1000) end - Duel.PayLPCost(tp,1000) -end -function c46668237.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c46668237.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c46696593.lua b/script/c46696593.lua deleted file mode 100644 index 2d19fa17bc..0000000000 --- a/script/c46696593.lua +++ /dev/null @@ -1,6 +0,0 @@ ---紅陽鳥 -function c46696593.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcCode2(c,75582395,10202894,true,true) -end diff --git a/script/c46700124.lua b/script/c46700124.lua deleted file mode 100644 index 73595f9628..0000000000 --- a/script/c46700124.lua +++ /dev/null @@ -1,17 +0,0 @@ ---機械王 -function c46700124.initial_effect(c) - --atkup - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetRange(LOCATION_MZONE) - e1:SetValue(c46700124.val) - c:RegisterEffect(e1) -end -function c46700124.val(e,c) - return Duel.GetMatchingGroupCount(c46700124.filter,c:GetControler(),LOCATION_MZONE,LOCATION_MZONE,nil)*100 -end -function c46700124.filter(c) - return c:IsFaceup() and c:IsRace(RACE_MACHINE) -end diff --git a/script/c46710683.lua b/script/c46710683.lua deleted file mode 100644 index e38152c3aa..0000000000 --- a/script/c46710683.lua +++ /dev/null @@ -1,31 +0,0 @@ ---BF-銀盾のミストラル -function c46710683.initial_effect(c) - --change damage - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(46710683,0)) - e1:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_SINGLE) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCondition(c46710683.condition) - e1:SetOperation(c46710683.operation) - c:RegisterEffect(e1) -end -function c46710683.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) and e:GetHandler():IsReason(REASON_DESTROY) -end -function c46710683.operation(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetTargetRange(1,0) - e1:SetCode(EFFECT_CHANGE_DAMAGE) - e1:SetValue(c46710683.damval) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) - Duel.RegisterFlagEffect(tp,46710683,RESET_PHASE+PHASE_END,0,1) -end -function c46710683.damval(e,re,val,r,rp,rc) - local tp=e:GetHandlerPlayer() - if Duel.GetFlagEffect(tp,46710683)==0 or bit.band(r,REASON_BATTLE)==0 then return val end - Duel.ResetFlagEffect(tp,46710683) - return 0 -end diff --git a/script/c46759931.lua b/script/c46759931.lua deleted file mode 100644 index 9a416a7bce..0000000000 --- a/script/c46759931.lua +++ /dev/null @@ -1,40 +0,0 @@ ---V・HERO トリニティー -function c46759931.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcFunRep(c,aux.FilterBoolFunction(Card.IsSetCard,0x8),3,true) - --summon success - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(c46759931.regcon) - e1:SetOperation(c46759931.regop) - c:RegisterEffect(e1) - --extra attack - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_EXTRA_ATTACK) - e2:SetCondition(c46759931.atkcon) - e2:SetValue(2) - c:RegisterEffect(e2) - --cannot diratk - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_CANNOT_DIRECT_ATTACK) - c:RegisterEffect(e3) -end -function c46759931.regcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_FUSION -end -function c46759931.regop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK) - e1:SetReset(RESET_EVENT+0x1ff0000+RESET_PHASE+PHASE_END) - e1:SetValue(c:GetBaseAttack()*2) - c:RegisterEffect(e1) -end -function c46759931.atkcon(e) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_FUSION -end diff --git a/script/c46772449.lua b/script/c46772449.lua deleted file mode 100644 index 5079e09eea..0000000000 --- a/script/c46772449.lua +++ /dev/null @@ -1,57 +0,0 @@ ---励輝士 ヴェルズビュート -function c46772449.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,4,2) - c:EnableReviveLimit() - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(46772449,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(TIMING_SPSUMMON) - e1:SetCondition(c46772449.condition) - e1:SetCost(c46772449.cost) - e1:SetTarget(c46772449.target) - e1:SetOperation(c46772449.operation) - c:RegisterEffect(e1) -end -function c46772449.condition(e,tp,eg,ep,ev,re,r,rp) - local ct1=Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD+LOCATION_HAND,0) - local ct2=Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD+LOCATION_HAND) - if ct1>=ct2 then return false end - local ph=Duel.GetCurrentPhase() - if Duel.GetTurnPlayer()==tp then - return ph==PHASE_MAIN1 or ph==PHASE_MAIN2 - else - return ph==PHASE_BATTLE - end -end -function c46772449.cost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:CheckRemoveOverlayCard(tp,1,REASON_COST) and c:GetFlagEffect(46772449)==0 end - c:RemoveOverlayCard(tp,1,1,REASON_COST) - c:RegisterFlagEffect(46772449,RESET_CHAIN,0,1) -end -function c46772449.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end - local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c46772449.operation(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CHANGE_DAMAGE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetTargetRange(0,1) - e1:SetValue(0) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) - local e2=e1:Clone() - e2:SetCode(EFFECT_NO_EFFECT_DAMAGE) - e2:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e2,tp) - local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler()) - Duel.Destroy(g,REASON_EFFECT) -end \ No newline at end of file diff --git a/script/c46820049.lua b/script/c46820049.lua deleted file mode 100644 index 7ddedc8ff5..0000000000 --- a/script/c46820049.lua +++ /dev/null @@ -1,31 +0,0 @@ ---地獄将軍・メフィスト -function c46820049.initial_effect(c) - --handes - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(46820049,0)) - e1:SetCategory(CATEGORY_HANDES) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_BATTLE_DAMAGE) - e1:SetCondition(c46820049.condition) - e1:SetTarget(c46820049.target) - e1:SetOperation(c46820049.operation) - c:RegisterEffect(e1) - --pierce - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_PIERCE) - c:RegisterEffect(e2) -end -function c46820049.condition(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp -end -function c46820049.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_HANDES,0,0,1-tp,1) -end -function c46820049.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetFieldGroup(ep,LOCATION_HAND,0,nil) - if g:GetCount()==0 then return end - local sg=g:RandomSelect(ep,1) - Duel.SendtoGrave(sg,REASON_DISCARD+REASON_EFFECT) -end diff --git a/script/c46833854.lua b/script/c46833854.lua deleted file mode 100644 index 91f55cac7f..0000000000 --- a/script/c46833854.lua +++ /dev/null @@ -1,47 +0,0 @@ ---魔轟神トピー -function c46833854.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(46833854,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c46833854.con) - e1:SetCost(c46833854.cost) - e1:SetTarget(c46833854.tg) - e1:SetOperation(c46833854.op) - c:RegisterEffect(e1) -end -function c46833854.con(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)-Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)>=2 -end -function c46833854.cfilter(c) - return c:IsSetCard(0x35) and not c:IsPublic() -end -function c46833854.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() - and Duel.IsExistingMatchingCard(c46833854.cfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) - local g=Duel.SelectMatchingCard(tp,c46833854.cfilter,tp,LOCATION_HAND,0,1,1,e:GetHandler()) - Duel.ConfirmCards(1-tp,g) - Duel.Release(e:GetHandler(),REASON_COST) - Duel.ShuffleHand(tp) -end -function c46833854.filter(c) - return c:IsDestructable() and c:IsType(TYPE_SPELL+TYPE_TRAP) -end -function c46833854.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and c46833854.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c46833854.filter,tp,0,LOCATION_ONFIELD,2,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c46833854.filter,tp,0,LOCATION_ONFIELD,2,2,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,2,0,0) -end -function c46833854.op(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local sg=g:Filter(Card.IsRelateToEffect,nil,e) - if sg:GetCount()>0 then - Duel.Destroy(sg,REASON_EFFECT) - end -end diff --git a/script/c46848859.lua b/script/c46848859.lua deleted file mode 100644 index d824afd29e..0000000000 --- a/script/c46848859.lua +++ /dev/null @@ -1,49 +0,0 @@ ---ネイビィロイド -function c46848859.initial_effect(c) - --Negate - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(46848859,0)) - e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_CHAINING) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c46848859.condition) - e1:SetCost(c46848859.cost) - e1:SetTarget(c46848859.target) - e1:SetOperation(c46848859.operation) - c:RegisterEffect(e1) -end -function c46848859.cfilter(c) - return c:IsOnField() and c:IsType(TYPE_SPELL+TYPE_TRAP) -end -function c46848859.tgfilter(c,tp) - return c:IsOnField() and c:IsControler(tp) and c:IsType(TYPE_SPELL+TYPE_TRAP) -end -function c46848859.condition(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) or not Duel.IsChainNegatable(ev) then return false end - if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end - local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) - if not g or not g:IsExists(c46848859.tgfilter,1,nil,tp) then return false end - if re:IsHasCategory(CATEGORY_NEGATE) - and Duel.GetChainInfo(ev-1,CHAININFO_TRIGGERING_EFFECT):IsHasType(EFFECT_TYPE_ACTIVATE) then return false end - local ex,tg,tc=Duel.GetOperationInfo(ev,CATEGORY_DESTROY) - return ex and tg~=nil and tc+tg:FilterCount(c46848859.cfilter,nil)-tg:GetCount()>0 -end -function c46848859.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) -end -function c46848859.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) - end -end -function c46848859.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateActivation(ev) - if re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(eg,REASON_EFFECT) - end -end diff --git a/script/c46871387.lua b/script/c46871387.lua deleted file mode 100644 index 05e8a446df..0000000000 --- a/script/c46871387.lua +++ /dev/null @@ -1,48 +0,0 @@ ---No.55 ゴゴゴゴライアス -function c46871387.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,4,2) - c:EnableReviveLimit() - --search - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(46871387,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1,46871387) - e1:SetCost(c46871387.thcost) - e1:SetTarget(c46871387.thtg) - e1:SetOperation(c46871387.thop) - c:RegisterEffect(e1) - --def - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_UPDATE_DEFENCE) - e2:SetRange(LOCATION_MZONE) - e2:SetTargetRange(LOCATION_MZONE,0) - e2:SetValue(800) - c:RegisterEffect(e2) -end -c46871387.xyz_number=55 -function c46871387.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c46871387.filter(c) - return c:IsRace(RACE_ROCK) and c:IsAttribute(ATTRIBUTE_EARTH) and c:GetLevel()==4 and c:IsAbleToHand() -end -function c46871387.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c46871387.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c46871387.filter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c46871387.filter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c46871387.thop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end diff --git a/script/c46874015.lua b/script/c46874015.lua deleted file mode 100644 index 8f2399a543..0000000000 --- a/script/c46874015.lua +++ /dev/null @@ -1,41 +0,0 @@ ---六武衆推参! -function c46874015.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c46874015.target) - e1:SetOperation(c46874015.activate) - c:RegisterEffect(e1) -end -function c46874015.filter(c,e,tp) - return c:IsSetCard(0x3d) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c46874015.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:GetLocation()==LOCATION_GRAVE and chkc:GetControler()==tp and c46874015.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c46874015.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c46874015.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c46874015.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)~=0 then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetOwnerPlayer(tp) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetOperation(c46874015.desop) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e1:SetCountLimit(1) - tc:RegisterEffect(e1) - end -end -function c46874015.desop(e,tp,eg,ep,ev,re,r,rp) - Duel.Destroy(e:GetHandler(),REASON_EFFECT) -end diff --git a/script/c46895036.lua b/script/c46895036.lua deleted file mode 100644 index 121189e2e2..0000000000 --- a/script/c46895036.lua +++ /dev/null @@ -1,86 +0,0 @@ ---ゴーストリック・デュラハン -function c46895036.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,1,2) - c:EnableReviveLimit() - --atk - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(c46895036.atkval) - c:RegisterEffect(e1) - --atk down - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(46895036,0)) - e2:SetCategory(CATEGORY_ATKCHANGE) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetHintTiming(TIMING_DAMAGE_STEP) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCondition(c46895036.condition) - e2:SetCost(c46895036.cost) - e2:SetTarget(c46895036.target) - e2:SetOperation(c46895036.operation) - c:RegisterEffect(e2) - --to hand - local e3=Effect.CreateEffect(c) - e3:SetCategory(CATEGORY_TOHAND) - e3:SetDescription(aux.Stringid(46895036,1)) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) - e3:SetCode(EVENT_TO_GRAVE) - e3:SetTarget(c46895036.thtg) - e3:SetOperation(c46895036.thop) - c:RegisterEffect(e3) -end -function c46895036.atkfilter(c) - return c:IsFaceup() and c:IsSetCard(0x8d) -end -function c46895036.atkval(e,c) - return Duel.GetMatchingGroupCount(c46895036.atkfilter,c:GetControler(),LOCATION_ONFIELD,0,nil)*200 -end -function c46895036.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end -function c46895036.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c46895036.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsFaceup() and chkc:IsLocation(LOCATION_MZONE) end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) -end -function c46895036.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e1:SetValue(tc:GetAttack()/2) - tc:RegisterEffect(e1) - end -end -function c46895036.filter(c) - return c:IsSetCard(0x8d) and c:IsAbleToHand() -end -function c46895036.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c46895036.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c46895036.filter,tp,LOCATION_GRAVE,0,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c46895036.filter,tp,LOCATION_GRAVE,0,1,1,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c46895036.thop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end diff --git a/script/c46897277.lua b/script/c46897277.lua deleted file mode 100644 index 13177222f7..0000000000 --- a/script/c46897277.lua +++ /dev/null @@ -1,34 +0,0 @@ ---エレキツネ -function c46897277.initial_effect(c) - --act limit - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(46897277,0)) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_DESTROYED) - e1:SetCondition(c46897277.condition) - e1:SetOperation(c46897277.operation) - c:RegisterEffect(e1) -end -function c46897277.condition(e,tp,eg,ep,ev,re,r,rp) - return rp~=tp and e:GetHandler():GetPreviousControler()==tp -end -function c46897277.operation(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EFFECT_CANNOT_ACTIVATE) - e1:SetTargetRange(0,1) - e1:SetValue(c46897277.aclimit) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e2:SetReset(RESET_PHASE+PHASE_END) - e2:SetTargetRange(0,1) - Duel.RegisterEffect(e2,tp) -end -function c46897277.aclimit(e,re,tp) - return not re:GetHandler():IsImmuneToEffect(e) -end diff --git a/script/c46910446.lua b/script/c46910446.lua deleted file mode 100644 index 8ee4979072..0000000000 --- a/script/c46910446.lua +++ /dev/null @@ -1,44 +0,0 @@ ---ヘル・アライアンス -function c46910446.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c46910446.target) - e1:SetOperation(c46910446.operation) - c:RegisterEffect(e1) - --Atk - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(c46910446.value) - c:RegisterEffect(e2) - --Equip limit - local e3=Effect.CreateEffect(c) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_EQUIP_LIMIT) - e3:SetValue(1) - c:RegisterEffect(e3) -end -function c46910446.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c46910446.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,e:GetHandler(),tc) - end -end -function c46910446.filter(c,code) - return c:IsFaceup() and c:IsCode(code) -end -function c46910446.value(e,c) - return Duel.GetMatchingGroupCount(c46910446.filter,0,LOCATION_MZONE,LOCATION_MZONE,c,c:GetCode())*800 -end diff --git a/script/c46918794.lua b/script/c46918794.lua deleted file mode 100644 index fabd0578c3..0000000000 --- a/script/c46918794.lua +++ /dev/null @@ -1,19 +0,0 @@ ---火炎地獄 -function c46918794.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c46918794.target) - e1:SetOperation(c46918794.activate) - c:RegisterEffect(e1) -end -function c46918794.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,PLAYER_ALL,500) -end -function c46918794.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.Damage(1-tp,1000,REASON_EFFECT) - Duel.Damage(tp,500,REASON_EFFECT) -end diff --git a/script/c46925518.lua b/script/c46925518.lua deleted file mode 100644 index 9980f0c006..0000000000 --- a/script/c46925518.lua +++ /dev/null @@ -1,76 +0,0 @@ ---ゴーストリックの人形 -function c46925518.initial_effect(c) - --summon limit - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_SUMMON) - e1:SetCondition(c46925518.sumcon) - c:RegisterEffect(e1) - --turn set - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(46925518,0)) - e2:SetCategory(CATEGORY_POSITION) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetTarget(c46925518.postg) - e2:SetOperation(c46925518.posop) - c:RegisterEffect(e2) - -- - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e3:SetCode(EVENT_FLIP) - e3:SetOperation(c46925518.fdop) - c:RegisterEffect(e3) -end -function c46925518.sfilter(c) - return c:IsFaceup() and c:IsSetCard(0x8d) -end -function c46925518.sumcon(e) - return not Duel.IsExistingMatchingCard(c46925518.sfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) -end -function c46925518.postg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsCanTurnSet() and c:GetFlagEffect(46925518)==0 end - c:RegisterFlagEffect(46925518,RESET_EVENT+0x1fc0000+RESET_PHASE+PHASE_END,0,1) - Duel.SetOperationInfo(0,CATEGORY_POSITION,c,1,0,0) -end -function c46925518.posop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - Duel.ChangePosition(c,POS_FACEDOWN_DEFENCE) - end -end -function c46925518.fdop(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetCountLimit(1) - e1:SetCondition(c46925518.condition) - e1:SetOperation(c46925518.operation) - e1:SetReset(RESET_PHASE+RESET_END) - Duel.RegisterEffect(e1,tp) -end -function c46925518.filter(c) - return c:IsFaceup() and c:IsCanTurnSet() -end -function c46925518.spfilter(c,e,tp,lv) - return c:IsSetCard(0x8d) and c:IsLevelBelow(lv) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN) -end -function c46925518.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c46925518.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) -end -function c46925518.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c46925518.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - if g:GetCount()==0 then return end - local ct=Duel.ChangePosition(g,POS_FACEDOWN_DEFENCE) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local sg=Duel.GetMatchingGroup(c46925518.spfilter,tp,LOCATION_DECK,0,nil,e,tp,ct) - if sg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(46925518,1)) then - Duel.BreakEffect() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local tg=sg:Select(tp,1,1,nil) - if Duel.SpecialSummon(tg,0,tp,tp,false,false,POS_FACEDOWN_DEFENCE)~=0 then - Duel.ConfirmCards(1-tp,tg) - end - end -end diff --git a/script/c4694209.lua b/script/c4694209.lua deleted file mode 100644 index 9eacb543f6..0000000000 --- a/script/c4694209.lua +++ /dev/null @@ -1,78 +0,0 @@ ---カードガード -function c4694209.initial_effect(c) - --summon success - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(4694209,0)) - e1:SetCategory(CATEGORY_COUNTER) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c4694209.addct) - e1:SetOperation(c4694209.addc) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e2) - --attackup - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e3:SetRange(LOCATION_MZONE) - e3:SetCode(EFFECT_UPDATE_ATTACK) - e3:SetValue(c4694209.attackup) - c:RegisterEffect(e3) - --destroy rep - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(4694209,1)) - e4:SetCategory(CATEGORY_COUNTER) - e4:SetType(EFFECT_TYPE_IGNITION) - e4:SetCountLimit(1) - e4:SetRange(LOCATION_MZONE) - e4:SetProperty(EFFECT_FLAG_CARD_TARGET) - e4:SetTarget(c4694209.addct2) - e4:SetOperation(c4694209.addc2) - c:RegisterEffect(e4) -end -function c4694209.addct(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,1,0,0x21) -end -function c4694209.addc(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - e:GetHandler():AddCounter(0x21,1) - end -end -function c4694209.attackup(e,c) - return c:GetCounter(0x21)*300 -end -function c4694209.addct2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsControler(tp) and chkc:IsFaceup() end - if chk==0 then return e:GetHandler():IsCanRemoveCounter(tp,0x21,1,REASON_EFFECT) - and Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_ONFIELD,0,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(4694209,1)) - Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_ONFIELD,0,1,1,e:GetHandler()) -end -function c4694209.addc2(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:GetCounter(0x21)==0 then return end - c:RemoveCounter(tp,0x21,1,REASON_EFFECT) - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - tc:AddCounter(0x21,1) - if tc:GetFlagEffect(4694209)~=0 then return end - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EFFECT_DESTROY_REPLACE) - e1:SetTarget(c4694209.reptg) - e1:SetOperation(c4694209.repop) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - tc:RegisterFlagEffect(4694209,RESET_EVENT+0x1fe0000,0,0) - end -end -function c4694209.reptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return not e:GetHandler():IsReason(REASON_RULE) and e:GetHandler():GetCounter(0x21)>0 end - return true -end -function c4694209.repop(e,tp,eg,ep,ev,re,r,rp,chk) - e:GetHandler():RemoveCounter(tp,0x21,1,REASON_EFFECT) -end diff --git a/script/c46955770.lua b/script/c46955770.lua deleted file mode 100644 index c52b89d0f9..0000000000 --- a/script/c46955770.lua +++ /dev/null @@ -1,21 +0,0 @@ ---墓守の異端者 -function c46955770.initial_effect(c) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_IMMUNE_EFFECT) - e1:SetCondition(c46955770.con) - e1:SetValue(c46955770.efilter) - c:RegisterEffect(e1) -end -function c46955770.filter(c) - return c:IsFaceup() and c:IsCode(47355498) -end -function c46955770.con(e) - return Duel.IsExistingMatchingCard(c46955770.filter,0,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) - or Duel.IsEnvironment(47355498) -end -function c46955770.efilter(e,te) - return te:GetOwner()~=e:GetOwner() -end diff --git a/script/c46961802.lua b/script/c46961802.lua deleted file mode 100644 index 10342feb7d..0000000000 --- a/script/c46961802.lua +++ /dev/null @@ -1,61 +0,0 @@ ---クロス・アタック -function c46961802.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c46961802.target) - e1:SetOperation(c46961802.activate) - c:RegisterEffect(e1) -end -function c46961802.filter1(c,tp) - return c:IsFaceup() and Duel.IsExistingTarget(c46961802.filter2,tp,LOCATION_MZONE,0,1,c,c:GetAttack()) -end -function c46961802.filter2(c,atk) - return c:IsFaceup() and c:GetAttack()==atk -end -function c46961802.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - if chk==0 then return Duel.IsExistingTarget(c46961802.filter1,tp,LOCATION_MZONE,0,1,nil,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - local g1=Duel.SelectTarget(tp,c46961802.filter1,tp,LOCATION_MZONE,0,1,1,nil,tp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - local g2=Duel.SelectTarget(tp,c46961802.filter2,tp,LOCATION_MZONE,0,1,1,g1:GetFirst(),g1:GetFirst():GetAttack()) -end -function c46961802.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local tc1=g:GetFirst() - local tc2=g:GetNext() - if tc1:IsFacedown() or tc2:IsFacedown() or not tc1:IsRelateToEffect(e) or not tc2:IsRelateToEffect(e) - or tc1:GetAttack()~=tc2:GetAttack() then return end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DIRECT_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc1:RegisterEffect(e1) - local e2=e1:Clone() - tc2:RegisterEffect(e2) - tc1:RegisterFlagEffect(46961802,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) - tc2:RegisterFlagEffect(46961802,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) - local e3=Effect.CreateEffect(e:GetHandler()) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e3:SetCode(EVENT_ATTACK_ANNOUNCE) - e3:SetOperation(c46961802.atop) - e3:SetLabelObject(tc2) - e3:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc1:RegisterEffect(e3) - local e4=e3:Clone() - e4:SetLabelObject(tc1) - tc2:RegisterEffect(e4) -end -function c46961802.atop(e,tp,eg,ep,ev,re,r,rp) - local oc=e:GetLabelObject() - if oc:GetFlagEffect(46961802)~=0 then - local e1=Effect.CreateEffect(e:GetOwner()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - oc:RegisterEffect(e1,true) - end -end diff --git a/script/c46967601.lua b/script/c46967601.lua deleted file mode 100644 index 793d50c2af..0000000000 --- a/script/c46967601.lua +++ /dev/null @@ -1,62 +0,0 @@ ---呪いのお札 -function c46967601.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c46967601.target) - e1:SetOperation(c46967601.operation) - c:RegisterEffect(e1) - --equip limit - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_EQUIP_LIMIT) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetValue(1) - c:RegisterEffect(e2) - --damage - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(46967601,0)) - e3:SetCategory(CATEGORY_DAMAGE) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e3:SetCode(EVENT_TO_GRAVE) - e3:SetCondition(c46967601.damcon) - e3:SetTarget(c46967601.damtg) - e3:SetOperation(c46967601.damop) - c:RegisterEffect(e3) -end -function c46967601.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c46967601.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,e:GetHandler(),tc) - end -end -function c46967601.damcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local ec=c:GetPreviousEquipTarget() - if not ec then return end - e:SetLabelObject(ec) - e:SetLabel(ec:GetPreviousControler()) - return c:IsReason(REASON_LOST_TARGET) and ec:IsLocation(LOCATION_GRAVE) and ec:IsReason(REASON_DESTROY) -end -function c46967601.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local dam=e:GetLabelObject():GetTextDefence() - if dam<0 then dam=0 end - Duel.SetTargetPlayer(e:GetLabel()) - Duel.SetTargetParam(dam) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,e:GetLabel(),dam) -end -function c46967601.damop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c47013502.lua b/script/c47013502.lua deleted file mode 100644 index fd9ac8bc6b..0000000000 --- a/script/c47013502.lua +++ /dev/null @@ -1,28 +0,0 @@ ---アボイド・ドラゴン -function c47013502.initial_effect(c) - --summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_DISABLE_SUMMON) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - c:RegisterEffect(e1) - --summon success - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_SUMMON_SUCCESS) - e2:SetOperation(c47013502.sumsuc) - c:RegisterEffect(e2) -end -function c47013502.sumsuc(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetTargetRange(0,1) - e1:SetValue(c47013502.actlimit) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function c47013502.actlimit(e,te,tp) - return te:GetHandler():IsType(TYPE_COUNTER) -end diff --git a/script/c47017574.lua b/script/c47017574.lua deleted file mode 100644 index 883fc2010a..0000000000 --- a/script/c47017574.lua +++ /dev/null @@ -1,87 +0,0 @@ ---CNo.92 偽骸虚龍 Heart-eartH Chaos Dragon -function c47017574.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,10,4) - c:EnableReviveLimit() - --battle - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e1:SetValue(1) - c:RegisterEffect(e1) - --recover - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(47017574,0)) - e2:SetCategory(CATEGORY_RECOVER) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EVENT_BATTLE_DAMAGE) - e2:SetCondition(c47017574.reccon) - e2:SetTarget(c47017574.rectg) - e2:SetOperation(c47017574.recop) - c:RegisterEffect(e2) - --negate - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(47017574,1)) - e3:SetCategory(CATEGORY_DISABLE) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1) - e3:SetCondition(c47017574.discon) - e3:SetCost(c47017574.discost) - e3:SetTarget(c47017574.distg) - e3:SetOperation(c47017574.disop) - c:RegisterEffect(e3) -end -c47017574.xyz_number=92 -function c47017574.reccon(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp and eg:GetFirst():IsControler(tp) -end -function c47017574.rectg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(ev) - Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,ev) -end -function c47017574.recop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Recover(p,d,REASON_EFFECT) -end -function c47017574.discon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetOverlayGroup():IsExists(Card.IsCode,1,nil,97403510) -end -function c47017574.discost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c47017574.distg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(aux.disfilter1,tp,0,LOCATION_ONFIELD,1,nil) end -end -function c47017574.disop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local g=Duel.GetMatchingGroup(aux.disfilter1,tp,0,LOCATION_ONFIELD,nil) - local tc=g:GetFirst() - while tc do - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e2) - if tc:IsType(TYPE_TRAPMONSTER) then - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_DISABLE_TRAPMONSTER) - e3:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e3) - end - tc=g:GetNext() - end -end diff --git a/script/c47025270.lua b/script/c47025270.lua deleted file mode 100644 index b1b6abf724..0000000000 --- a/script/c47025270.lua +++ /dev/null @@ -1,23 +0,0 @@ ---白兵戦型お手伝いロボ -function c47025270.initial_effect(c) - --draw - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(47025270,0)) - e1:SetCategory(CATEGORY_DRAW+CATEGORY_TODECK) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_BATTLE_DESTROYING) - e1:SetTarget(c47025270.drtg) - e1:SetOperation(c47025270.drop) - c:RegisterEffect(e1) -end -function c47025270.drtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c47025270.drop(e,tp,eg,ep,ev,re,r,rp) - if Duel.Draw(tp,1,REASON_EFFECT)~=0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_HAND,0,1,1,nil) - Duel.SendtoDeck(g,nil,1,REASON_EFFECT) - end -end diff --git a/script/c47030842.lua b/script/c47030842.lua deleted file mode 100644 index 5cc84c79df..0000000000 --- a/script/c47030842.lua +++ /dev/null @@ -1,51 +0,0 @@ ---ギアギアクセル -function c47030842.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_SPSUM_PARAM) - e1:SetRange(LOCATION_HAND) - e1:SetTargetRange(POS_FACEUP_DEFENCE,0) - e1:SetCondition(c47030842.spcon) - c:RegisterEffect(e1) - --tohand - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(47030842,0)) - e2:SetCategory(CATEGORY_TOHAND) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetCondition(c47030842.thcon) - e2:SetTarget(c47030842.thtg) - e2:SetOperation(c47030842.thop) - c:RegisterEffect(e2) -end -function c47030842.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x72) -end -function c47030842.spcon(e,c) - if c==nil then return true end - return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c47030842.cfilter,c:GetControler(),LOCATION_MZONE,0,1,nil) -end -function c47030842.thcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) -end -function c47030842.filter(c) - return c:IsSetCard(0x72) and c:GetCode()~=47030842 and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() -end -function c47030842.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c47030842.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c47030842.filter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c47030842.filter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c47030842.thop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end diff --git a/script/c47060347.lua b/script/c47060347.lua deleted file mode 100644 index 38163716dd..0000000000 --- a/script/c47060347.lua +++ /dev/null @@ -1,35 +0,0 @@ ---女神の加護 -function c47060347.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCategory(CATEGORY_RECOVER) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c47060347.rectg) - e1:SetOperation(c47060347.recop) - c:RegisterEffect(e1) - --leave - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_LEAVE_FIELD) - e2:SetOperation(c47060347.leave) - c:RegisterEffect(e2) -end -function c47060347.rectg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(3000) - Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,3000) -end -function c47060347.recop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Recover(p,d,REASON_EFFECT) -end -function c47060347.leave(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:GetPreviousControler()==tp and c:IsStatus(STATUS_ACTIVATED) then - Duel.Damage(tp,3000,REASON_EFFECT) - end -end diff --git a/script/c47075569.lua b/script/c47075569.lua deleted file mode 100644 index eae890cb1c..0000000000 --- a/script/c47075569.lua +++ /dev/null @@ -1,83 +0,0 @@ ---EMペンデュラム・マジシャン -function c47075569.initial_effect(c) - --pendulum summon - aux.AddPendulumProcedure(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --atk - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetRange(LOCATION_PZONE) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetCondition(c47075569.atkcon) - e2:SetOperation(c47075569.atkop) - c:RegisterEffect(e2) - --tohand - local e3=Effect.CreateEffect(c) - e3:SetCategory(CATEGORY_DESTROY+CATEGORY_TOHAND+CATEGORY_SEARCH) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - e3:SetCountLimit(1,47075569) - e3:SetTarget(c47075569.thtg) - e3:SetOperation(c47075569.thop) - c:RegisterEffect(e3) -end -function c47075569.cfilter(c,tp) - return c:IsFaceup() and c:IsSetCard(0x9f) and c:IsControler(tp) and c:GetSummonType()==SUMMON_TYPE_PENDULUM -end -function c47075569.atkcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c47075569.cfilter,1,nil,tp) -end -function c47075569.filter(c) - return c:IsFaceup() and c:IsSetCard(0x9f) -end -function c47075569.atkop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local g=Duel.GetMatchingGroup(c47075569.filter,tp,LOCATION_MZONE,0,nil) - local tc=g:GetFirst() - while tc do - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(1000) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - tc:RegisterEffect(e1) - tc=g:GetNext() - end -end -function c47075569.thfilter(c) - return c:IsSetCard(0x9f) and c:IsType(TYPE_MONSTER) and not c:IsCode(47075569) and c:IsAbleToHand() -end -function c47075569.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsOnField() and chkc:IsDestructable() end - if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,LOCATION_ONFIELD,0,1,nil) - and Duel.IsExistingMatchingCard(c47075569.thfilter,tp,LOCATION_DECK,0,1,nil) end - local g=Duel.GetMatchingGroup(c47075569.thfilter,tp,LOCATION_DECK,0,nil) - local ct=g:GetClassCount(Card.GetCode) - if ct>2 then ct=2 end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local dg=Duel.SelectTarget(tp,Card.IsDestructable,tp,LOCATION_ONFIELD,0,1,ct,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,dg,dg:GetCount(),0,0) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,dg:GetCount(),tp,LOCATION_DECK) -end -function c47075569.thop(e,tp,eg,ep,ev,re,r,rp) - local dg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) - local ct=Duel.Destroy(dg,REASON_EFFECT) - local g=Duel.GetMatchingGroup(c47075569.thfilter,tp,LOCATION_DECK,0,nil) - if ct==0 or g:GetCount()==0 then return end - if ct>g:GetClassCount(Card.GetCode) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g1=g:Select(tp,1,1,nil) - if ct==2 then - g:Remove(Card.IsCode,nil,g1:GetFirst():GetCode()) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g2=g:Select(tp,1,1,nil) - g1:Merge(g2) - end - Duel.SendtoHand(g1,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g1) -end diff --git a/script/c47077318.lua b/script/c47077318.lua deleted file mode 100644 index ac347569b5..0000000000 --- a/script/c47077318.lua +++ /dev/null @@ -1,67 +0,0 @@ ---森羅の蜜柑子 シトラ -function c47077318.initial_effect(c) - --deck check - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(47077318,0)) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCondition(c47077318.condition) - e1:SetTarget(c47077318.target) - e1:SetOperation(c47077318.operation) - c:RegisterEffect(e1) - --boost - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(47077318,1)) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetProperty(EFFECT_FLAG_DELAY) - e2:SetCondition(c47077318.tdcon) - e2:SetOperation(c47077318.tdop) - c:RegisterEffect(e2) -end -function c47077318.condition(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsReason(REASON_DESTROY) and c:GetReasonPlayer()~=tp - and c:GetPreviousControler()==tp -end -function c47077318.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,1) end -end -function c47077318.operation(e,tp,eg,ep,ev,re,r,rp) - if not Duel.IsPlayerCanDiscardDeck(tp,1) then return end - Duel.ConfirmDecktop(tp,1) - local g=Duel.GetDecktopGroup(tp,1) - local tc=g:GetFirst() - if tc:IsRace(RACE_PLANT) then - Duel.DisableShuffleCheck() - Duel.SendtoGrave(g,REASON_EFFECT+REASON_REVEAL) - else - Duel.MoveSequence(tc,1) - end -end -function c47077318.tdcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsPreviousLocation(LOCATION_DECK) and - (c:IsReason(REASON_REVEAL) or c:GetPreviousPosition()==POS_FACEUP_DEFENCE or Duel.IsPlayerAffectedByEffect(tp,EFFECT_REVERSE_DECK)) -end -function c47077318.filter(c) - return c:IsFaceup() and c:IsRace(RACE_PLANT) -end -function c47077318.tdop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c47077318.filter,tp,LOCATION_MZONE,0,nil) - local tc=g:GetFirst() - while tc do - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(300) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_UPDATE_DEFENCE) - tc:RegisterEffect(e2) - tc=g:GetNext() - end -end diff --git a/script/c47084486.lua b/script/c47084486.lua deleted file mode 100644 index e862ea8586..0000000000 --- a/script/c47084486.lua +++ /dev/null @@ -1,18 +0,0 @@ ---虚無魔人 -function c47084486.initial_effect(c) - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(aux.FALSE) - c:RegisterEffect(e1) - --disable spsummon - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetTargetRange(1,1) - c:RegisterEffect(e2) -end diff --git a/script/c47106439.lua b/script/c47106439.lua deleted file mode 100644 index 9c18d3236e..0000000000 --- a/script/c47106439.lua +++ /dev/null @@ -1,46 +0,0 @@ ---ヴィジョン・リチュア -function c47106439.initial_effect(c) - --search - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(47106439,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND) - e1:SetCost(c47106439.cost) - e1:SetTarget(c47106439.target) - e1:SetOperation(c47106439.operation) - c:RegisterEffect(e1) - --ritual level - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_RITUAL_LEVEL) - e2:SetValue(c47106439.rlevel) - c:RegisterEffect(e2) -end -function c47106439.rlevel(e,c) - local lv=e:GetHandler():GetLevel() - if c:IsAttribute(ATTRIBUTE_WATER) then - local clv=c:GetLevel() - return lv*65536+clv - else return lv end -end -function c47106439.cost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsDiscardable() end - Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD) -end -function c47106439.filter(c) - return c:IsSetCard(0x3a) and bit.band(c:GetType(),0x81)==0x81 and c:IsAbleToHand() -end -function c47106439.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chk==0 then return Duel.IsExistingMatchingCard(c47106439.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c47106439.operation(e,tp,eg,ep,ev,re,r,rp,chk) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c47106439.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c47111934.lua b/script/c47111934.lua deleted file mode 100644 index cf6bdf97fb..0000000000 --- a/script/c47111934.lua +++ /dev/null @@ -1,72 +0,0 @@ ---ワーム・ヤガン -function c47111934.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(47111934,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_GRAVE) - e1:SetCondition(c47111934.spcon) - e1:SetTarget(c47111934.sptg) - e1:SetOperation(c47111934.spop) - c:RegisterEffect(e1) - --flip - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(47111934,1)) - e2:SetCategory(CATEGORY_TOHAND) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_FLIP) - e2:SetTarget(c47111934.thtg) - e2:SetOperation(c47111934.thop) - c:RegisterEffect(e2) -end -function c47111934.check(tp) - local ret=false - for i=0,4 do - local tc=Duel.GetFieldCard(tp,LOCATION_MZONE,i) - if tc then - if not ret and tc:IsFaceup() and tc:IsCode(11722335) then ret=true - else return false end - end - end - return ret -end -function c47111934.spcon(e,tp,eg,ep,ev,re,r,rp,chk) - return c47111934.check(tp) -end -function c47111934.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENCE) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c47111934.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 or not c47111934.check(tp) then return end - if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEDOWN_DEFENCE)>0 then - Duel.ConfirmCards(1-tp,c) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+0x47e0000) - e1:SetValue(LOCATION_REMOVED) - c:RegisterEffect(e1,true) - end -end -function c47111934.filter(c) - return c:IsFaceup() and c:IsAbleToHand() -end -function c47111934.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and c47111934.filter(chkc) end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g=Duel.SelectTarget(tp,c47111934.filter,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0) -end -function c47111934.thop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - end -end diff --git a/script/c47120245.lua b/script/c47120245.lua deleted file mode 100644 index b1dfd15afc..0000000000 --- a/script/c47120245.lua +++ /dev/null @@ -1,73 +0,0 @@ ---聖騎士ボールス -function c47120245.initial_effect(c) - --Normal monster - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetCode(EFFECT_ADD_TYPE) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c47120245.eqcon1) - e1:SetValue(TYPE_NORMAL) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_REMOVE_TYPE) - e2:SetValue(TYPE_EFFECT) - c:RegisterEffect(e2) - --Attribute Dark - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e3:SetCode(EFFECT_CHANGE_ATTRIBUTE) - e3:SetRange(LOCATION_MZONE) - e3:SetCondition(c47120245.eqcon2) - e3:SetValue(ATTRIBUTE_DARK) - c:RegisterEffect(e3) - local e4=e3:Clone() - e4:SetCode(EFFECT_UPDATE_LEVEL) - e4:SetValue(1) - c:RegisterEffect(e4) - --search - local e5=Effect.CreateEffect(c) - e5:SetDescription(aux.Stringid(47120245,0)) - e5:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e5:SetType(EFFECT_TYPE_IGNITION) - e5:SetRange(LOCATION_MZONE) - e5:SetCountLimit(1,47120245) - e5:SetCondition(c47120245.thcon) - e5:SetTarget(c47120245.thtg) - e5:SetOperation(c47120245.thop) - c:RegisterEffect(e5) -end -function c47120245.eqcon1(e) - return not e:GetHandler():GetEquipGroup():IsExists(Card.IsSetCard,1,nil,0x207a) -end -function c47120245.eqcon2(e) - return e:GetHandler():GetEquipGroup():IsExists(Card.IsSetCard,1,nil,0x207a) -end -function c47120245.thcon(e,tp,eg,ep,ev,re,r,rp) - return c47120245.eqcon2(e) -end -function c47120245.thfilter(c) - return c:IsSetCard(0x207a) and c:IsAbleToHand() -end -function c47120245.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c47120245.thfilter,tp,LOCATION_DECK,0,3,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,LOCATION_DECK) -end -function c47120245.thop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsSetCard,tp,LOCATION_DECK,0,nil,0x207a) - if g:GetCount()>=3 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local sg=g:Select(tp,3,3,nil) - Duel.ConfirmCards(1-tp,sg) - Duel.ShuffleDeck(tp) - Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_ATOHAND) - local tg=sg:Select(1-tp,1,1,nil) - local tc=tg:GetFirst() - if tc:IsAbleToHand() then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - sg:RemoveCard(tc) - end - Duel.SendtoGrave(sg,REASON_EFFECT) - end -end diff --git a/script/c47121070.lua b/script/c47121070.lua deleted file mode 100644 index e89f49c918..0000000000 --- a/script/c47121070.lua +++ /dev/null @@ -1,46 +0,0 @@ ---宝玉の双璧 -function c47121070.initial_effect(c) - --to field - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetCondition(c47121070.tfcon) - e1:SetTarget(c47121070.tftg) - e1:SetOperation(c47121070.tfop) - c:RegisterEffect(e1) -end -function c47121070.filter(c,tp) - return c:IsSetCard(0x1034) and c:IsLocation(LOCATION_GRAVE) and c:GetPreviousControler()==tp and c:IsReason(REASON_BATTLE) -end -function c47121070.tfcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c47121070.filter,1,nil,tp) -end -function c47121070.tftg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_DECK,0,1,nil,0x1034) end -end -function c47121070.tfop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) - local g=Duel.SelectMatchingCard(tp,Card.IsSetCard,tp,LOCATION_DECK,0,1,1,nil,0x1034) - if g:GetCount()>0 then - local tc=g:GetFirst() - Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) - local e1=Effect.CreateEffect(tc) - e1:SetCode(EFFECT_CHANGE_TYPE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fc0000) - e1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS) - tc:RegisterEffect(e1) - Duel.RaiseEvent(tc,47408488,e,0,tp,0,0) - end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_AVOID_BATTLE_DAMAGE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetTargetRange(1,0) - e1:SetValue(1) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) -end diff --git a/script/c47126872.lua b/script/c47126872.lua deleted file mode 100644 index bac7ee9ea4..0000000000 --- a/script/c47126872.lua +++ /dev/null @@ -1,66 +0,0 @@ ---スペースタイムポリス -function c47126872.initial_effect(c) - --remove - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(47126872,0)) - e1:SetCategory(CATEGORY_REMOVE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetTarget(c47126872.rmtg) - e1:SetOperation(c47126872.rmop) - c:RegisterEffect(e1) - --set - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(47126872,1)) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_LEAVE_FIELD) - e2:SetCondition(c47126872.setcon) - e2:SetTarget(c47126872.settg) - e2:SetOperation(c47126872.setop) - e2:SetLabelObject(e1) - c:RegisterEffect(e2) -end -function c47126872.filter(c) - return c:IsFaceup() and c:IsAbleToRemove() -end -function c47126872.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() and c47126872.filter(chkc) end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,c47126872.filter,tp,0,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,0) -end -function c47126872.rmop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) then - if Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)~=0 and e:GetHandler():IsRelateToEffect(e) then - e:SetLabelObject(tc) - tc:RegisterFlagEffect(47126872,RESET_EVENT+0x1fe0000,0,1) - end - end -end -function c47126872.setcon(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetLabelObject():GetLabelObject() - return tc and tc:GetFlagEffect(47126872)~=0 -end -function c47126872.settg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local tc=e:GetLabelObject():GetLabelObject() - Duel.SetTargetCard(tc) - if tc:IsType(TYPE_MONSTER) then - e:SetCategory(CATEGORY_SPECIAL_SUMMON) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,tc,1,0,0) - else - e:SetCategory(0) - end -end -function c47126872.setop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if not tc:IsRelateToEffect(e) then return end - if tc:IsType(TYPE_MONSTER) then - Duel.SpecialSummon(tc,0,tp,1-tp,false,false,POS_FACEDOWN_DEFENCE) - else - Duel.SSet(tp,tc,1-tp) - end -end diff --git a/script/c47150851.lua b/script/c47150851.lua deleted file mode 100644 index dff6568f3c..0000000000 --- a/script/c47150851.lua +++ /dev/null @@ -1,37 +0,0 @@ ---ガーディアン・グラール -function c47150851.initial_effect(c) - --sum limit - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_SUMMON) - e1:SetCondition(c47150851.sumlimit) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_CANNOT_FLIP_SUMMON) - c:RegisterEffect(e2) - local e3=e1:Clone() - e3:SetCode(EFFECT_SPSUMMON_CONDITION) - c:RegisterEffect(e3) - --spsummon - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_FIELD) - e4:SetCode(EFFECT_SPSUMMON_PROC) - e4:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE) - e4:SetRange(LOCATION_HAND) - e4:SetCondition(c47150851.spcon) - c:RegisterEffect(e4) -end -function c47150851.cfilter(c) - return c:IsFaceup() and c:IsCode(32022366) -end -function c47150851.sumlimit(e) - return not Duel.IsExistingMatchingCard(c47150851.cfilter,e:GetHandlerPlayer(),LOCATION_ONFIELD,0,1,nil) -end -function c47150851.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)==1 - and Duel.IsExistingMatchingCard(c47150851.cfilter,e:GetHandlerPlayer(),LOCATION_ONFIELD,0,1,nil) -end diff --git a/script/c47198668.lua b/script/c47198668.lua deleted file mode 100644 index 2236b7c601..0000000000 --- a/script/c47198668.lua +++ /dev/null @@ -1,100 +0,0 @@ ---DDD死偉王ヘル・アーマゲドン -function c47198668.initial_effect(c) - --pendulum summon - aux.AddPendulumProcedure(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --atk up - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_PZONE) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCountLimit(1) - e2:SetTarget(c47198668.atktg1) - e2:SetOperation(c47198668.atkop1) - c:RegisterEffect(e2) - --atk up - local e3=Effect.CreateEffect(c) - e3:SetCategory(CATEGORY_ATKCHANGE) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_DESTROYED) - e3:SetRange(LOCATION_MZONE) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e3:SetCountLimit(1) - e3:SetCost(c47198668.atkcost) - e3:SetTarget(c47198668.atktg2) - e3:SetOperation(c47198668.atkop2) - c:RegisterEffect(e3) - --indes - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e4:SetRange(LOCATION_MZONE) - e4:SetValue(c47198668.efilter) - c:RegisterEffect(e4) -end -function c47198668.filter1(c) - return c:IsFaceup() and c:IsSetCard(0xaf) -end -function c47198668.atktg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c47198668.filter1(chkc) end - if chk==0 then return Duel.IsExistingTarget(c47198668.filter1,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c47198668.filter1,tp,LOCATION_MZONE,0,1,1,nil) -end -function c47198668.atkop1(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(800) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - end -end -function c47198668.filter2(c,e,tp) - return c:IsReason(REASON_BATTLE+REASON_EFFECT) and c:IsType(TYPE_MONSTER) - and c:IsPreviousLocation(LOCATION_MZONE) and c:GetPreviousControler()==tp - and c:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) and c:IsCanBeEffectTarget(e) -end -function c47198668.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return not e:GetHandler():IsDirectAttacked() end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_OATH) - e1:SetCode(EFFECT_CANNOT_DIRECT_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - e:GetHandler():RegisterEffect(e1) -end -function c47198668.atktg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return eg:IsContains(chkc) and c47198668.filter2(chkc,e,tp) end - if chk==0 then return eg:IsExists(c47198668.filter2,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - local g=eg:FilterSelect(tp,c47198668.filter2,1,1,nil,e,tp) - Duel.SetTargetCard(g) -end -function c47198668.atkop2(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsFaceup() and c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(tc:GetBaseAttack()) - e1:SetReset(RESET_EVENT+0x1ff0000+RESET_PHASE+PHASE_END) - c:RegisterEffect(e1) - end -end -function c47198668.efilter(e,re,rp) - if not re:IsActiveType(TYPE_SPELL+TYPE_TRAP) then return false end - if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return true end - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - return not g:IsContains(e:GetHandler()) -end diff --git a/script/c47217354.lua b/script/c47217354.lua deleted file mode 100644 index fb1bf631ff..0000000000 --- a/script/c47217354.lua +++ /dev/null @@ -1,35 +0,0 @@ ---魔轟神レイヴン -function c47217354.initial_effect(c) - --lv atk up - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(47217354,0)) - e1:SetCategory(CATEGORY_HANDES+CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_MZONE) - e1:SetTarget(c47217354.tg) - e1:SetOperation(c47217354.op) - c:RegisterEffect(e1) -end -function c47217354.tg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)>0 end - Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1) -end -function c47217354.op(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local ct=Duel.DiscardHand(tp,aux.TRUE,1,60,REASON_EFFECT+REASON_DISCARD) - if ct>0 and c:IsFaceup() and c:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+0x1ff0000+RESET_PHASE+PHASE_END) - e1:SetValue(ct*400) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_UPDATE_LEVEL) - e2:SetReset(RESET_EVENT+0x1ff0000+RESET_PHASE+PHASE_END) - e2:SetValue(ct) - c:RegisterEffect(e2) - end -end diff --git a/script/c4722253.lua b/script/c4722253.lua deleted file mode 100644 index ec32d22568..0000000000 --- a/script/c4722253.lua +++ /dev/null @@ -1,73 +0,0 @@ ---ライトレイ ギア・フリード -function c4722253.initial_effect(c) - c:EnableReviveLimit() - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c4722253.spcon) - c:RegisterEffect(e1) - --spsummon limit - local e2=Effect.CreateEffect(c) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_SPSUMMON_CONDITION) - c:RegisterEffect(e2) - --negate - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(4722253,0)) - e3:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) - e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) - e3:SetType(EFFECT_TYPE_QUICK_O) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1) - e3:SetCode(EVENT_CHAINING) - e3:SetCondition(c4722253.negcon) - e3:SetCost(c4722253.negcost) - e3:SetTarget(c4722253.negtg) - e3:SetOperation(c4722253.negop) - c:RegisterEffect(e3) -end -function c4722253.spcon(e,c) - if c==nil then return true end - if Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)<=0 then return false end - local g=Duel.GetMatchingGroup(Card.IsAttribute,c:GetControler(),LOCATION_GRAVE,0,nil,ATTRIBUTE_LIGHT) - local ct=g:GetClassCount(Card.GetCode) - return ct>4 -end -function c4722253.cfilter(c) - return c:IsFaceup() and not c:IsRace(RACE_WARRIOR) -end -function c4722253.negcon(e,tp,eg,ep,ev,re,r,rp) - return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev) - and not Duel.IsExistingMatchingCard(c4722253.cfilter,tp,LOCATION_MZONE,0,1,nil) -end -function c4722253.cfilter2(c) - return c:IsRace(RACE_WARRIOR) and c:IsAbleToRemove() -end -function c4722253.negcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c4722253.cfilter2,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c4722253.cfilter2,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c4722253.negtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) - end -end -function c4722253.cfilter3(c) - return c:IsFaceup() and c:IsRace(RACE_WARRIOR) -end -function c4722253.negop(e,tp,eg,ep,ev,re,r,rp) - if Duel.IsExistingMatchingCard(c4722253.cfilter,tp,LOCATION_MZONE,0,1,nil) - or not Duel.IsExistingMatchingCard(c4722253.cfilter3,tp,LOCATION_MZONE,0,1,nil) then return end - Duel.NegateActivation(ev) - if re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(eg,REASON_EFFECT) - end -end diff --git a/script/c47228077.lua b/script/c47228077.lua deleted file mode 100644 index 83b011134d..0000000000 --- a/script/c47228077.lua +++ /dev/null @@ -1,108 +0,0 @@ ---ヴァイロン・ペンタクロ -function c47228077.initial_effect(c) - --equip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(47228077,0)) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetTarget(c47228077.eqtg) - e1:SetOperation(c47228077.eqop) - c:RegisterEffect(e1) - --unequip - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(47228077,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_SZONE) - e2:SetCondition(c47228077.uncon) - e2:SetTarget(c47228077.sptg) - e2:SetOperation(c47228077.spop) - c:RegisterEffect(e2) - --destroy sub - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_EQUIP) - e3:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e3:SetCode(EFFECT_DESTROY_SUBSTITUTE) - e3:SetCondition(c47228077.uncon) - e3:SetValue(1) - c:RegisterEffect(e3) - --destroy - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(47228077,2)) - e4:SetCategory(CATEGORY_DESTROY) - e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e4:SetCode(EVENT_BATTLE_DESTROYING) - e4:SetProperty(EFFECT_FLAG_CARD_TARGET) - e4:SetRange(LOCATION_SZONE) - e4:SetCondition(c47228077.descon) - e4:SetTarget(c47228077.destg) - e4:SetOperation(c47228077.desop) - c:RegisterEffect(e4) - --eqlimit - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_SINGLE) - e5:SetCode(EFFECT_EQUIP_LIMIT) - e5:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e5:SetValue(c47228077.eqlimit) - c:RegisterEffect(e5) -end -function c47228077.uncon(e) - return e:GetHandler():IsStatus(STATUS_UNION) -end -function c47228077.eqlimit(e,c) - return c:IsSetCard(0x30) -end -function c47228077.filter(c) - return c:IsFaceup() and c:IsSetCard(0x30) and c:GetUnionCount()==0 -end -function c47228077.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c47228077.filter(chkc) end - if chk==0 then return e:GetHandler():GetFlagEffect(47228077)==0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingTarget(c47228077.filter,tp,LOCATION_MZONE,0,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local g=Duel.SelectTarget(tp,c47228077.filter,tp,LOCATION_MZONE,0,1,1,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0) - e:GetHandler():RegisterFlagEffect(47228077,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1) -end -function c47228077.eqop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if not c:IsRelateToEffect(e) or c:IsFacedown() then return end - if not tc:IsRelateToEffect(e) or not c47228077.filter(tc) then - Duel.SendtoGrave(c,REASON_EFFECT) - return - end - if not Duel.Equip(tp,c,tc,false) then return end - c:SetStatus(STATUS_UNION,true) -end -function c47228077.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():GetFlagEffect(47228077)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) - e:GetHandler():RegisterFlagEffect(47228077,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1) -end -function c47228077.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP_ATTACK) - end -end -function c47228077.descon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsStatus(STATUS_UNION) and e:GetHandler():GetEquipTarget()==eg:GetFirst() -end -function c47228077.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and chkc:IsDestructable() end - if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,0,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,0,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c47228077.desop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c47233801.lua b/script/c47233801.lua deleted file mode 100644 index d8baff62a7..0000000000 --- a/script/c47233801.lua +++ /dev/null @@ -1,41 +0,0 @@ ---黒蛇病 -function c47233801.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --damage - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(47233801,0)) - e2:SetCategory(CATEGORY_DAMAGE) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetRange(LOCATION_SZONE) - e2:SetCountLimit(1) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) - e2:SetCondition(c47233801.damcon) - e2:SetTarget(c47233801.damtg) - e2:SetOperation(c47233801.damop) - c:RegisterEffect(e2) -end -function c47233801.damcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c47233801.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,PLAYER_ALL,0) -end -function c47233801.damop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) then return end - local dam=c:GetFlagEffectLabel(47233801) - if dam==nil then - c:RegisterFlagEffect(47233801,RESET_EVENT+0x1fe0000,0,0,200) - dam=200 - else - dam=dam*2 - c:SetFlagEffectLabel(47233801,dam) - end - Duel.Damage(tp,dam,REASON_EFFECT) - Duel.Damage(1-tp,dam,REASON_EFFECT) -end diff --git a/script/c47247413.lua b/script/c47247413.lua deleted file mode 100644 index 06dd414da4..0000000000 --- a/script/c47247413.lua +++ /dev/null @@ -1,31 +0,0 @@ ---差し戻し -function c47247413.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCategory(CATEGORY_TODECK) - e1:SetCode(EVENT_TO_HAND) - e1:SetCondition(c47247413.condition) - e1:SetTarget(c47247413.target) - e1:SetOperation(c47247413.activate) - c:RegisterEffect(e1) -end -function c47247413.filter(c,e,tp) - return c:IsPreviousLocation(LOCATION_GRAVE) and c:IsControler(tp) and (not e or c:IsRelateToEffect(e)) -end -function c47247413.condition(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c47247413.filter,1,nil,nil,1-tp) -end -function c47247413.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetCard(eg) - Duel.SetOperationInfo(0,CATEGORY_TODECK,eg,1,0,0) -end -function c47247413.activate(e,tp,eg,ep,ev,re,r,rp) - local g=eg:Filter(c47247413.filter,nil,e,1-tp) - if g:GetCount()==0 then return end - Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_TODECK) - local rg=g:Select(1-tp,1,1,nil) - Duel.ConfirmCards(tp,rg) - Duel.SendtoDeck(rg,nil,2,REASON_EFFECT) -end diff --git a/script/c47264717.lua b/script/c47264717.lua deleted file mode 100644 index 77bbcd7d4c..0000000000 --- a/script/c47264717.lua +++ /dev/null @@ -1,33 +0,0 @@ ---シューティング・スター -function c47264717.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(TIMING_ATTACK,0x11e0) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCondition(c47264717.condition) - e1:SetTarget(c47264717.target) - e1:SetOperation(c47264717.activate) - c:RegisterEffect(e1) -end -function c47264717.cfilter(c) - return c:IsSetCard(0xa3) and c:IsFaceup() -end -function c47264717.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c47264717.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) -end -function c47264717.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsDestructable() and chkc~=e:GetHandler() end - if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c47264717.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/script/c47274077.lua b/script/c47274077.lua deleted file mode 100644 index 4ece61fe68..0000000000 --- a/script/c47274077.lua +++ /dev/null @@ -1,94 +0,0 @@ ---ネオス・フォース -function c47274077.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c47274077.target) - e1:SetOperation(c47274077.operation) - c:RegisterEffect(e1) - --atk - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(800) - c:RegisterEffect(e2) - --Equip limit - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_EQUIP_LIMIT) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e3:SetValue(c47274077.eqlimit) - c:RegisterEffect(e3) - --damage - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(47274077,0)) - e4:SetCategory(CATEGORY_DAMAGE) - e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e4:SetCode(EVENT_BATTLE_DESTROYING) - e4:SetRange(LOCATION_SZONE) - e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e4:SetCondition(c47274077.damcon) - e4:SetTarget(c47274077.damtg) - e4:SetOperation(c47274077.damop) - c:RegisterEffect(e4) - --return - local e5=Effect.CreateEffect(c) - e5:SetDescription(aux.Stringid(47274077,1)) - e5:SetCategory(CATEGORY_TODECK) - e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e5:SetCode(EVENT_PHASE+PHASE_END) - e5:SetRange(LOCATION_SZONE) - e5:SetCountLimit(1) - e5:SetTarget(c47274077.rettg) - e5:SetOperation(c47274077.retop) - c:RegisterEffect(e5) -end -function c47274077.eqlimit(e,c) - return c:IsCode(89943723) -end -function c47274077.filter(c) - return c:IsFaceup() and c:IsCode(89943723) -end -function c47274077.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c47274077.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c47274077.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c47274077.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c47274077.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,e:GetHandler(),tc) - end -end -function c47274077.damcon(e,tp,eg,ep,ev,re,r,rp) - local ec=eg:GetFirst() - local bc=ec:GetBattleTarget() - return ec==e:GetHandler():GetEquipTarget() and bc:IsLocation(LOCATION_GRAVE) and bc:IsReason(REASON_BATTLE) -end -function c47274077.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local ec=eg:GetFirst() - local bc=ec:GetBattleTarget() - local dam=bc:GetAttack() - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(dam) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,dam) -end -function c47274077.damop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end -function c47274077.rettg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0) -end -function c47274077.retop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_EFFECT) -end diff --git a/script/c47295267.lua b/script/c47295267.lua deleted file mode 100644 index 5276fca1f6..0000000000 --- a/script/c47295267.lua +++ /dev/null @@ -1,61 +0,0 @@ ---サイバネティック・ゾーン -function c47295267.initial_effect(c) - --remove - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_REMOVE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c47295267.target) - e1:SetOperation(c47295267.operation) - c:RegisterEffect(e1) -end -function c47295267.filter(c) - return c:IsFaceup() and c:IsRace(RACE_MACHINE) and c:IsType(TYPE_FUSION) and c:IsAbleToRemove() -end -function c47295267.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c47295267.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c47295267.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,c47295267.filter,tp,LOCATION_MZONE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) -end -function c47295267.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() and Duel.Remove(tc,0,REASON_EFFECT+REASON_TEMPORARY)~=0 then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetReset(RESET_PHASE+PHASE_END) - e1:SetLabelObject(tc) - e1:SetCountLimit(1) - e1:SetOperation(c47295267.retop) - Duel.RegisterEffect(e1,tp) - end -end -function c47295267.retop(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetLabelObject() - if Duel.ReturnToField(e:GetLabelObject()) then - local e1=Effect.CreateEffect(e:GetOwner()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetValue(tc:GetBaseAttack()*2) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(e:GetOwner()) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCondition(c47295267.descon) - e2:SetOperation(c47295267.desop) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN) - tc:RegisterEffect(e2) - end -end -function c47295267.descon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp and e:GetHandler():IsRace(RACE_MACHINE) -end -function c47295267.desop(e,tp,eg,ep,ev,re,r,rp) - Duel.Destroy(e:GetHandler(),REASON_EFFECT) -end diff --git a/script/c47297616.lua b/script/c47297616.lua deleted file mode 100644 index 66dbe9a0db..0000000000 --- a/script/c47297616.lua +++ /dev/null @@ -1,97 +0,0 @@ ---光と闇の竜 -function c47297616.initial_effect(c) - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(aux.FALSE) - c:RegisterEffect(e1) - --Attribute Dark - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetCode(EFFECT_ADD_ATTRIBUTE) - e2:SetRange(LOCATION_MZONE) - e2:SetValue(ATTRIBUTE_DARK) - c:RegisterEffect(e2) - --Negate - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(47297616,2)) - e3:SetCategory(CATEGORY_NEGATE) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_QUICK_F) - e3:SetCode(EVENT_CHAINING) - e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) - e3:SetRange(LOCATION_MZONE) - e3:SetCondition(c47297616.codisable) - e3:SetTarget(c47297616.tgdisable) - e3:SetOperation(c47297616.opdisable) - c:RegisterEffect(e3) - --Special summon - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(47297616,4)) - e4:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DESTROY) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e4:SetCode(EVENT_TO_GRAVE) - e4:SetProperty(EFFECT_FLAG_CARD_TARGET) - e4:SetCondition(c47297616.cdspsum) - e4:SetTarget(c47297616.tgspsum) - e4:SetOperation(c47297616.opspsum) - c:RegisterEffect(e4) -end -function c47297616.codisable(e,tp,eg,ep,ev,re,r,rp) - return (re:IsHasType(EFFECT_TYPE_ACTIVATE) or re:IsActiveType(TYPE_MONSTER)) - and not e:GetHandler():IsStatus(STATUS_CHAINING) -end -function c47297616.tgdisable(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:GetFlagEffect(47297616)==0 end - if c:IsHasEffect(EFFECT_REVERSE_UPDATE) then - c:RegisterFlagEffect(47297616,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) - end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) -end -function c47297616.opdisable(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsFaceup() or c:GetDefence()<500 or c:GetAttack()< 500 or not c:IsRelateToEffect(e) or Duel.GetCurrentChain()~=ev+1 or c:IsStatus(STATUS_BATTLE_DESTROYED) then - return - end - if Duel.NegateActivation(ev) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_COPY_INHERIT) - e1:SetReset(RESET_EVENT+0x1ff0000) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(-500) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_COPY_INHERIT) - e2:SetReset(RESET_EVENT+0x1ff0000) - e2:SetCode(EFFECT_UPDATE_DEFENCE) - e2:SetValue(-500) - c:RegisterEffect(e2) - end -end -function c47297616.cdspsum(e) - return e:GetHandler():IsReason(REASON_DESTROY) -end -function c47297616.tgspsum(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) - and chkc:IsCanBeSpecialSummoned(e,0,PLAYER_NONE,false,false,POS_FACEUP,tp) end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,Card.IsCanBeSpecialSummoned,tp,LOCATION_GRAVE,0,1,1,nil,e,0,PLAYER_NONE,false,false,POS_FACEUP,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,g:GetCount(),0,0) - local dg=Duel.GetMatchingGroup(Card.IsDestructable,tp,LOCATION_ONFIELD,0,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,dg,dg:GetCount(),0,0) -end -function c47297616.opspsum(e,tp,eg,ep,ev,re,r,rp) - local dg=Duel.GetMatchingGroup(nil,tp,LOCATION_ONFIELD,0,nil) - Duel.Destroy(dg,REASON_EFFECT) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.BreakEffect() - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c4732017.lua b/script/c4732017.lua deleted file mode 100644 index 517a1d16f0..0000000000 --- a/script/c4732017.lua +++ /dev/null @@ -1,27 +0,0 @@ ---灼熱ゾンビ -function c4732017.initial_effect(c) - --draw - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(4732017,0)) - e1:SetCategory(CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(c4732017.condition) - e1:SetTarget(c4732017.target) - e1:SetOperation(c4732017.operation) - c:RegisterEffect(e1) -end -function c4732017.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetPreviousLocation()==LOCATION_GRAVE -end -function c4732017.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(1) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c4732017.operation(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end diff --git a/script/c47325505.lua b/script/c47325505.lua deleted file mode 100644 index 2114edc7de..0000000000 --- a/script/c47325505.lua +++ /dev/null @@ -1,26 +0,0 @@ ---化石調査 -function c47325505.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c47325505.target) - e1:SetOperation(c47325505.activate) - c:RegisterEffect(e1) -end -function c47325505.filter(c) - return c:IsLevelBelow(6) and c:IsRace(RACE_DINOSAUR) and c:IsAbleToHand() -end -function c47325505.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c47325505.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c47325505.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c47325505.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c47346845.lua b/script/c47346845.lua deleted file mode 100644 index 82d7f50ebf..0000000000 --- a/script/c47346845.lua +++ /dev/null @@ -1,32 +0,0 @@ ---電池メン-単四型 -function c47346845.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(47346845,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c47346845.sumtg) - e1:SetOperation(c47346845.sumop) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_FLIP) - c:RegisterEffect(e2) -end -function c47346845.filter(c,e,tp) - return c:IsCode(47346845) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsHasEffect(EFFECT_NECRO_VALLEY) -end -function c47346845.sumtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c47346845.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE) -end -function c47346845.sumop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c47346845.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c473469.lua b/script/c473469.lua deleted file mode 100644 index a592f2b67e..0000000000 --- a/script/c473469.lua +++ /dev/null @@ -1,36 +0,0 @@ ---猛吹雪 -function c473469.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCondition(c473469.condition) - e1:SetTarget(c473469.target) - e1:SetOperation(c473469.activate) - c:RegisterEffect(e1) -end -function c473469.filter(c,tp) - return c:IsType(TYPE_TRAP) and c:IsPreviousLocation(LOCATION_ONFIELD) and c:GetPreviousControler()==tp - and bit.band(c:GetReason(),0x41)==0x41 -end -function c473469.condition(e,tp,eg,ep,ev,re,r,rp) - return rp~=tp and eg:IsExists(c473469.filter,1,nil,tp) -end -function c473469.desfilter(c) - return c:IsDestructable() and c:IsType(TYPE_SPELL+TYPE_TRAP) -end -function c473469.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and c473469.desfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c473469.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c473469.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c473469.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c47349310.lua b/script/c47349310.lua deleted file mode 100644 index cff6f4ae40..0000000000 --- a/script/c47349310.lua +++ /dev/null @@ -1,59 +0,0 @@ ---スカイオニヒトクイエイ -function c47349310.initial_effect(c) - --reg - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_DAMAGE_STEP_END) - e1:SetOperation(c47349310.regop) - c:RegisterEffect(e1) - --pierce - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DIRECT_ATTACK) - c:RegisterEffect(e2) - --remove - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(47349310,0)) - e3:SetCategory(CATEGORY_REMOVE) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e3:SetRange(LOCATION_MZONE) - e3:SetCode(EVENT_PHASE+PHASE_BATTLE) - e3:SetCountLimit(1) - e3:SetCondition(c47349310.rmcon) - e3:SetTarget(c47349310.rmtg) - e3:SetOperation(c47349310.rmop) - c:RegisterEffect(e3) -end -function c47349310.regop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if Duel.GetAttackTarget() then return end - c:RegisterFlagEffect(47349310,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_BATTLE,0,1) -end -function c47349310.rmcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetFlagEffect(47349310)~=0 -end -function c47349310.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_REMOVE,e:GetHandler(),1,0,0) -end -function c47349310.rmop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - if Duel.Remove(c,0,REASON_EFFECT+REASON_TEMPORARY)==0 then return end - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) - e1:SetCountLimit(1) - e1:SetLabelObject(c) - e1:SetCondition(c47349310.retcon) - e1:SetOperation(c47349310.retop) - e1:SetReset(RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN) - Duel.RegisterEffect(e1,tp) - end -end -function c47349310.retcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c47349310.retop(e,tp,eg,ep,ev,re,r,rp) - Duel.ReturnToField(e:GetLabelObject()) -end diff --git a/script/c47355498.lua b/script/c47355498.lua deleted file mode 100644 index 8b382d03f1..0000000000 --- a/script/c47355498.lua +++ /dev/null @@ -1,110 +0,0 @@ ---王家の眠る谷-ネクロバレー -function c47355498.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --Atk&Def - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetRange(LOCATION_FZONE) - e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x2e)) - e2:SetValue(500) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EFFECT_UPDATE_DEFENCE) - c:RegisterEffect(e3) - --cannot remove - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_FIELD) - e4:SetCode(EFFECT_CANNOT_REMOVE) - e4:SetRange(LOCATION_FZONE) - e4:SetTargetRange(LOCATION_GRAVE,0) - e4:SetCondition(c47355498.contp) - c:RegisterEffect(e4) - local e5=e4:Clone() - e5:SetTargetRange(0,LOCATION_GRAVE) - e5:SetCondition(c47355498.conntp) - c:RegisterEffect(e5) - --necro valley - local e6=Effect.CreateEffect(c) - e6:SetType(EFFECT_TYPE_FIELD) - e6:SetCode(EFFECT_NECRO_VALLEY) - e6:SetRange(LOCATION_FZONE) - e6:SetTargetRange(LOCATION_GRAVE,0) - e6:SetCondition(c47355498.contp) - c:RegisterEffect(e6) - local e7=e6:Clone() - e7:SetTargetRange(0,LOCATION_GRAVE) - e7:SetCondition(c47355498.conntp) - c:RegisterEffect(e7) - local e8=Effect.CreateEffect(c) - e8:SetType(EFFECT_TYPE_FIELD) - e8:SetCode(EFFECT_NECRO_VALLEY) - e8:SetRange(LOCATION_FZONE) - e8:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e8:SetTargetRange(1,0) - e8:SetCondition(c47355498.contp) - c:RegisterEffect(e8) - local e9=e8:Clone() - e9:SetTargetRange(0,1) - e9:SetCondition(c47355498.conntp) - c:RegisterEffect(e9) - --disable - local e10=Effect.CreateEffect(c) - e10:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e10:SetCode(EVENT_CHAIN_SOLVING) - e10:SetRange(LOCATION_FZONE) - e10:SetOperation(c47355498.disop) - c:RegisterEffect(e10) -end -function c47355498.contp(e) - return not Duel.IsPlayerAffectedByEffect(e:GetHandler():GetControler(),EFFECT_NECRO_VALLEY_IM) -end -function c47355498.conntp(e) - return not Duel.IsPlayerAffectedByEffect(1-e:GetHandler():GetControler(),EFFECT_NECRO_VALLEY_IM) -end -function c47355498.disfilter1(c,im0,im1,targets) - if c:IsControler(0) then return im0 and targets:IsContains(c) and c:IsHasEffect(EFFECT_NECRO_VALLEY) - else return im1 and targets:IsContains(c) and c:IsHasEffect(EFFECT_NECRO_VALLEY) end -end -function c47355498.disfilter2(c,im0,im1) - if c:IsControler(0) then return im0 and c:IsHasEffect(EFFECT_NECRO_VALLEY) - else return im1 and c:IsHasEffect(EFFECT_NECRO_VALLEY) end -end -function c47355498.discheck(ev,category,re,im0,im1,targets) - local ex,tg,ct,p,v=Duel.GetOperationInfo(ev,category) - if not ex then return false end - if tg and tg:GetCount()>0 then - if targets then - return tg:IsExists(c47355498.disfilter1,1,nil,im0,im1,targets) - else - return tg:IsExists(c47355498.disfilter2,1,re:GetHandler(),im0,im1) - end - end - if v~=LOCATION_GRAVE then return false end - if p~=PLAYER_ALL then - if p==0 then return im0 else return im1 end - end - return im0 and im1 -end -function c47355498.disop(e,tp,eg,ep,ev,re,r,rp) - local tc=re:GetHandler() - if not Duel.IsChainDisablable(ev) or tc:IsHasEffect(EFFECT_NECRO_VALLEY_IM) then return end - local res=false - local targets=nil - if re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then - targets=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) - end - local im0=not Duel.IsPlayerAffectedByEffect(0,EFFECT_NECRO_VALLEY_IM) - local im1=not Duel.IsPlayerAffectedByEffect(1,EFFECT_NECRO_VALLEY_IM) - if not res and c47355498.discheck(ev,CATEGORY_SPECIAL_SUMMON,re,im0,im1,targets) then res=true end - if not res and c47355498.discheck(ev,CATEGORY_REMOVE,re,im0,im1,targets) then res=true end - if not res and c47355498.discheck(ev,CATEGORY_TOHAND,re,im0,im1,targets) then res=true end - if not res and c47355498.discheck(ev,CATEGORY_TODECK,re,im0,im1,targets) then res=true end - if not res and c47355498.discheck(ev,CATEGORY_LEAVE_GRAVE,re,im0,im1,targets) then res=true end - if res then Duel.NegateEffect(ev) end -end diff --git a/script/c47360060.lua b/script/c47360060.lua deleted file mode 100644 index d6607efa10..0000000000 --- a/script/c47360060.lua +++ /dev/null @@ -1,37 +0,0 @@ ---反射の聖刻印 -function c47360060.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_CHAINING) - e1:SetCondition(c47360060.condition) - e1:SetCost(c47360060.cost) - e1:SetTarget(c47360060.target) - e1:SetOperation(c47360060.activate) - c:RegisterEffect(e1) -end -function c47360060.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsChainNegatable(ev) and (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE)) -end -function c47360060.cfilter(c) - return c:IsSetCard(0x69) and not c:IsStatus(STATUS_BATTLE_DESTROYED) -end -function c47360060.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,c47360060.cfilter,1,nil) end - local g=Duel.SelectReleaseGroup(tp,c47360060.cfilter,1,1,nil) - Duel.Release(g,REASON_COST) -end -function c47360060.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) - end -end -function c47360060.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateActivation(ev) - if re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(eg,REASON_EFFECT) - end -end diff --git a/script/c47387961.lua b/script/c47387961.lua deleted file mode 100644 index 80330f193f..0000000000 --- a/script/c47387961.lua +++ /dev/null @@ -1,62 +0,0 @@ ---No.8 紋章王ゲノム・ヘリター -function c47387961.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0x76),4,2) - c:EnableReviveLimit() - --attack up - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetDescription(aux.Stringid(47387961,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetCountLimit(1) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetTarget(c47387961.target) - e1:SetOperation(c47387961.operation) - c:RegisterEffect(e1) -end -c47387961.xyz_number=8 -function c47387961.filter(c) - return c:IsFaceup() and c:IsType(TYPE_XYZ) -end -function c47387961.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and c47387961.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c47387961.filter,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c47387961.filter,tp,0,LOCATION_MZONE,1,1,nil) -end -function c47387961.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc and c:IsRelateToEffect(e) and c:IsFaceup() and tc:IsFaceup() and tc:IsRelateToEffect(e) then - local code=tc:GetOriginalCode() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_CHANGE_CODE) - e1:SetValue(code) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_SET_BASE_ATTACK) - e2:SetValue(tc:GetAttack()) - c:RegisterEffect(e2) - c:CopyEffect(code,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,1) - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetCode(EFFECT_SET_ATTACK_FINAL) - e4:SetValue(0) - e4:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e4) - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_SINGLE) - e5:SetCode(EFFECT_DISABLE) - e5:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e5) - local e6=Effect.CreateEffect(c) - e6:SetType(EFFECT_TYPE_SINGLE) - e6:SetCode(EFFECT_DISABLE_EFFECT) - e6:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e6) - end -end diff --git a/script/c47395382.lua b/script/c47395382.lua deleted file mode 100644 index dd35ca1b35..0000000000 --- a/script/c47395382.lua +++ /dev/null @@ -1,36 +0,0 @@ ---魔轟神レイジオン -function c47395382.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0x35),aux.NonTuner(nil),1) - c:EnableReviveLimit() - --draw - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(47395382,0)) - e1:SetCategory(CATEGORY_DRAW) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(c47395382.con) - e1:SetTarget(c47395382.tg) - e1:SetOperation(c47395382.op) - c:RegisterEffect(e1) -end -function c47395382.con(e,tp,eg,ep,ev,re,r,rp,chk) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_SYNCHRO -end -function c47395382.tg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local h=Duel.GetFieldGroupCount(tp,LOCATION_HAND,0) - return h<2 and Duel.IsPlayerCanDraw(tp,2-h) - end - local h=Duel.GetFieldGroupCount(tp,LOCATION_HAND,0) - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(2-h) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2-h) -end -function c47395382.op(e,tp,eg,ep,ev,re,r,rp) - local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) - local h=Duel.GetFieldGroupCount(p,LOCATION_HAND,0) - if h>=2 then return end - Duel.Draw(p,2-h,REASON_EFFECT) -end diff --git a/script/c47408488.lua b/script/c47408488.lua deleted file mode 100644 index dc71139dbe..0000000000 --- a/script/c47408488.lua +++ /dev/null @@ -1,77 +0,0 @@ ---宝玉の樹 -function c47408488.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --counter - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_COUNTER) - e2:SetDescription(aux.Stringid(47408488,0)) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetRange(LOCATION_SZONE) - e2:SetCode(47408488) - e2:SetOperation(c47408488.ctop) - c:RegisterEffect(e2) - --equip - local e3=Effect.CreateEffect(c) - e3:SetCategory(CATEGORY_COUNTER) - e3:SetDescription(aux.Stringid(47408488,0)) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e3:SetRange(LOCATION_SZONE) - e3:SetCode(EVENT_EQUIP) - e3:SetCondition(c47408488.eqcon) - e3:SetOperation(c47408488.ctop) - c:RegisterEffect(e3) - --place - local e4=Effect.CreateEffect(c) - e4:SetCategory(CATEGORY_COUNTER) - e4:SetDescription(aux.Stringid(47408488,1)) - e4:SetType(EFFECT_TYPE_IGNITION) - e4:SetRange(LOCATION_SZONE) - e4:SetCost(c47408488.plcost) - e4:SetTarget(c47408488.pltg) - e4:SetOperation(c47408488.plop) - c:RegisterEffect(e4) -end -function c47408488.eqcon(e,tp,eg,ep,ev,re,r,rp) - local tc=eg:GetFirst() - return tc:IsFaceup() and tc:IsSetCard(0x1034) -end -function c47408488.ctop(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():AddCounter(0x6,1) -end -function c47408488.plcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - e:SetLabel(e:GetHandler():GetCounter(0x6)) - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end -function c47408488.pltg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local ct=e:GetHandler():GetCounter(0x6) - return ct>0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>=ct - end -end -function c47408488.plop(e,tp,eg,ep,ev,re,r,rp) - local ft=Duel.GetLocationCount(tp,LOCATION_SZONE) - if ft<=0 then return end - if ft>e:GetLabel() then ft=e:GetLabel() end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) - local g=Duel.SelectMatchingCard(tp,Card.IsSetCard,tp,LOCATION_DECK,0,ft,ft,nil,0x1034) - if g:GetCount()>0 then - local tc=g:GetFirst() - while tc do - Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetCode(EFFECT_CHANGE_TYPE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fc0000) - e1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS) - tc:RegisterEffect(e1) - tc=g:GetNext() - end - Duel.RaiseEvent(g,47408488,e,0,tp,0,0) - end -end diff --git a/script/c47415292.lua b/script/c47415292.lua deleted file mode 100644 index 6ba3175917..0000000000 --- a/script/c47415292.lua +++ /dev/null @@ -1,98 +0,0 @@ ---漆黒の闘龍 -function c47415292.initial_effect(c) - --equip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(47415292,0)) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetTarget(c47415292.eqtg) - e1:SetOperation(c47415292.eqop) - c:RegisterEffect(e1) - --unequip - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(47415292,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_SZONE) - e2:SetCondition(c47415292.uncon) - e2:SetTarget(c47415292.sptg) - e2:SetOperation(c47415292.spop) - c:RegisterEffect(e2) - --atk/def - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_EQUIP) - e3:SetCode(EFFECT_UPDATE_ATTACK) - e3:SetValue(400) - e3:SetCondition(c47415292.uncon) - c:RegisterEffect(e3) - local e4=e3:Clone() - e4:SetCode(EFFECT_UPDATE_DEFENCE) - c:RegisterEffect(e4) - --pierce - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_EQUIP) - e5:SetCode(EFFECT_PIERCE) - e5:SetCondition(c47415292.uncon) - c:RegisterEffect(e5) - --destroy sub - local e6=Effect.CreateEffect(c) - e6:SetType(EFFECT_TYPE_EQUIP) - e6:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e6:SetCode(EFFECT_DESTROY_SUBSTITUTE) - e6:SetCondition(c47415292.uncon) - e6:SetValue(c47415292.repval) - c:RegisterEffect(e6) - --eqlimit - local e7=Effect.CreateEffect(c) - e7:SetType(EFFECT_TYPE_SINGLE) - e7:SetCode(EFFECT_EQUIP_LIMIT) - e7:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e7:SetValue(c47415292.eqlimit) - c:RegisterEffect(e7) -end -function c47415292.uncon(e) - return e:GetHandler():IsStatus(STATUS_UNION) -end -function c47415292.repval(e,re,r,rp) - return bit.band(r,REASON_BATTLE)~=0 -end -function c47415292.eqlimit(e,c) - return c:IsCode(11321183) -end -function c47415292.filter(c) - return c:IsFaceup() and c:IsCode(11321183) and c:GetUnionCount()==0 -end -function c47415292.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c47415292.filter(chkc) end - if chk==0 then return e:GetHandler():GetFlagEffect(47415292)==0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingTarget(c47415292.filter,tp,LOCATION_MZONE,0,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local g=Duel.SelectTarget(tp,c47415292.filter,tp,LOCATION_MZONE,0,1,1,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0) - e:GetHandler():RegisterFlagEffect(47415292,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1) -end -function c47415292.eqop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if not c:IsRelateToEffect(e) or c:IsFacedown() then return end - if not tc:IsRelateToEffect(e) or not c47415292.filter(tc) then - Duel.SendtoGrave(c,REASON_EFFECT) - return - end - if not Duel.Equip(tp,c,tc,false) then return end - c:SetStatus(STATUS_UNION,true) -end -function c47415292.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():GetFlagEffect(47415292)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) - e:GetHandler():RegisterFlagEffect(47415292,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1) -end -function c47415292.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP_ATTACK) - end -end diff --git a/script/c47421985.lua b/script/c47421985.lua deleted file mode 100644 index d9f15d80ae..0000000000 --- a/script/c47421985.lua +++ /dev/null @@ -1,35 +0,0 @@ ---ハイドロ・ジェネクス -function c47421985.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsCode,68505803),aux.NonTuner(Card.IsAttribute,ATTRIBUTE_WATER),1) - c:EnableReviveLimit() - --recover - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(47421985,0)) - e1:SetCategory(CATEGORY_RECOVER) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_BATTLE_DESTROYING) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCondition(c47421985.reccon) - e1:SetTarget(c47421985.rectg) - e1:SetOperation(c47421985.recop) - c:RegisterEffect(e1) -end -function c47421985.reccon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local t=Duel.GetAttackTarget() - if ev==1 then t=Duel.GetAttacker() end - if not c:IsRelateToBattle() or c:IsFacedown() then return false end - e:SetLabel(t:GetAttack()) - return t:GetLocation()==LOCATION_GRAVE and t:IsType(TYPE_MONSTER) -end -function c47421985.rectg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(e:GetLabel()) - Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,e:GetLabel()) -end -function c47421985.recop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Recover(p,d,REASON_EFFECT) -end diff --git a/script/c47432275.lua b/script/c47432275.lua deleted file mode 100644 index e994668ee8..0000000000 --- a/script/c47432275.lua +++ /dev/null @@ -1,40 +0,0 @@ ---クリボン -function c47432275.initial_effect(c) - --be target - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(47432275,0)) - e1:SetCategory(CATEGORY_RECOVER+CATEGORY_TOHAND) - e1:SetType(EFFECT_TYPE_QUICK_O+EFFECT_TYPE_FIELD) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EVENT_PRE_DAMAGE_CALCULATE) - e1:SetCountLimit(1) - e1:SetCondition(c47432275.con) - e1:SetTarget(c47432275.target) - e1:SetOperation(c47432275.op) - c:RegisterEffect(e1) -end -function c47432275.con(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetAttackTarget()==e:GetHandler() and Duel.GetBattleDamage(tp)>0 -end -function c47432275.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local val=Duel.GetAttacker():GetAttack() - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(val) - Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,1-tp,val) -end -function c47432275.op(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PRE_BATTLE_DAMAGE) - e1:SetOperation(c47432275.damop) - e1:SetReset(RESET_PHASE+PHASE_DAMAGE) - Duel.RegisterEffect(e1,tp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Recover(p,d,REASON_EFFECT) - Duel.SendtoHand(c,nil,REASON_EFFECT) -end -function c47432275.damop(e,tp,eg,ep,ev,re,r,rp) - Duel.ChangeBattleDamage(tp,0) -end diff --git a/script/c47436247.lua b/script/c47436247.lua deleted file mode 100644 index 851d1776c1..0000000000 --- a/script/c47436247.lua +++ /dev/null @@ -1,61 +0,0 @@ ---紫炎の道場 -function c47436247.initial_effect(c) - c:EnableCounterPermit(0x3003) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --add counter - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetRange(LOCATION_SZONE) - e2:SetCode(EVENT_SUMMON_SUCCESS) - e2:SetOperation(c47436247.ctop) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e3) - --special summon - local e4=Effect.CreateEffect(c) - e4:SetCategory(CATEGORY_SPECIAL_SUMMON) - e4:SetDescription(aux.Stringid(47436247,0)) - e4:SetType(EFFECT_TYPE_IGNITION) - e4:SetRange(LOCATION_SZONE) - e4:SetCost(c47436247.spcost) - e4:SetTarget(c47436247.sptg) - e4:SetOperation(c47436247.spop) - c:RegisterEffect(e4) -end -function c47436247.ctfilter(c) - return c:IsFaceup() and c:IsSetCard(0x3d) -end -function c47436247.ctop(e,tp,eg,ep,ev,re,r,rp) - if eg:IsExists(c47436247.ctfilter,1,nil) then - e:GetHandler():AddCounter(0x3003,1) - end -end -function c47436247.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - local ct=e:GetHandler():GetCounter(0x3003) - e:SetLabel(ct) - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end -function c47436247.filter(c,ct,e,tp) - return c:IsLevelBelow(ct) and (c:IsSetCard(0x3d) or c:IsSetCard(0x20)) - and c:IsType(TYPE_EFFECT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c47436247.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c47436247.filter,tp,LOCATION_DECK,0,1,nil,e:GetHandler():GetCounter(0x3003),e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c47436247.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local ct=e:GetLabel() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c47436247.filter,tp,LOCATION_DECK,0,1,1,nil,ct,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c47453433.lua b/script/c47453433.lua deleted file mode 100644 index 869bae4707..0000000000 --- a/script/c47453433.lua +++ /dev/null @@ -1,30 +0,0 @@ ---振り出し -function c47453433.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TODECK) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c47453433.cost) - e1:SetTarget(c47453433.target) - e1:SetOperation(c47453433.activate) - c:RegisterEffect(e1) -end -function c47453433.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) -end -function c47453433.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:GetLocation()==LOCATION_MZONE and chkc:IsAbleToDeck() end - if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToDeck,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectTarget(tp,Card.IsAbleToDeck,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0) -end -function c47453433.activate(e) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoDeck(tc,nil,0,REASON_EFFECT) - end -end diff --git a/script/c47459126.lua b/script/c47459126.lua deleted file mode 100644 index 232a9c63e0..0000000000 --- a/script/c47459126.lua +++ /dev/null @@ -1,13 +0,0 @@ ---チューンド・マジシャン -function c47459126.initial_effect(c) - aux.EnableDualAttribute(c) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_ADD_TYPE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(aux.IsDualState) - e1:SetValue(TYPE_TUNER) - c:RegisterEffect(e1) -end - diff --git a/script/c47480070.lua b/script/c47480070.lua deleted file mode 100644 index dac4dc9fd0..0000000000 --- a/script/c47480070.lua +++ /dev/null @@ -1,17 +0,0 @@ ---アマゾネスの聖戦士 -function c47480070.initial_effect(c) - --atkup - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetRange(LOCATION_MZONE) - e1:SetValue(c47480070.val) - c:RegisterEffect(e1) -end -function c47480070.val(e,c) - return Duel.GetMatchingGroupCount(c47480070.filter,c:GetControler(),LOCATION_MZONE,0,nil)*100 -end -function c47480070.filter(c) - return c:IsFaceup() and c:IsSetCard(0x4) -end diff --git a/script/c47506081.lua b/script/c47506081.lua deleted file mode 100644 index 80846ac212..0000000000 --- a/script/c47506081.lua +++ /dev/null @@ -1,36 +0,0 @@ ---グレンザウルス -function c47506081.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,3,2) - c:EnableReviveLimit() - --damage - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(47506081,0)) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetCode(EVENT_BATTLE_DESTROYING) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCondition(c47506081.damcon) - e1:SetCost(c47506081.damcost) - e1:SetTarget(c47506081.damtg) - e1:SetOperation(c47506081.damop) - c:RegisterEffect(e1) -end -function c47506081.damcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local bc=c:GetBattleTarget() - return c:IsRelateToBattle() and bc:IsLocation(LOCATION_GRAVE) and bc:IsType(TYPE_MONSTER) -end -function c47506081.damcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c47506081.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(1000) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,1000) -end -function c47506081.damop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c47507260.lua b/script/c47507260.lua deleted file mode 100644 index 519eac2be9..0000000000 --- a/script/c47507260.lua +++ /dev/null @@ -1,75 +0,0 @@ ---ミスティック・ソードマン LV2 -function c47507260.initial_effect(c) - --battle destroy - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_BATTLE_DESTROYING) - e1:SetOperation(c47507260.bdop) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(47507260,0)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_BATTLE_START) - e2:SetCondition(c47507260.descon) - e2:SetTarget(c47507260.destg) - e2:SetOperation(c47507260.desop) - c:RegisterEffect(e2) - --special summon - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(47507260,1)) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetRange(LOCATION_MZONE) - e3:SetCode(EVENT_PHASE+PHASE_END) - e3:SetCondition(c47507260.spcon) - e3:SetCost(c47507260.spcost) - e3:SetTarget(c47507260.sptg) - e3:SetOperation(c47507260.spop) - c:RegisterEffect(e3) -end -c47507260.lvupcount=1 -c47507260.lvup={74591968} -function c47507260.bdop(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():RegisterFlagEffect(47507260,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) -end -function c47507260.descon(e,tp,eg,ep,ev,re,r,rp) - local d=Duel.GetAttackTarget() - return e:GetHandler()==Duel.GetAttacker() and d and d:IsFacedown() and d:IsDefencePos() -end -function c47507260.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,Duel.GetAttackTarget(),1,0,0) -end -function c47507260.desop(e,tp,eg,ep,ev,re,r,rp) - local d=Duel.GetAttackTarget() - if d:IsRelateToBattle() then - Duel.Destroy(d,REASON_EFFECT) - end -end -function c47507260.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetFlagEffect(47507260)>0 -end -function c47507260.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end -function c47507260.spfilter(c,e,tp) - return c:IsCode(74591968) and c:IsCanBeSpecialSummoned(e,0,tp,true,true) -end -function c47507260.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsExistingMatchingCard(c47507260.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) -end -function c47507260.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c47507260.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp) - local tc=g:GetFirst() - if tc then - Duel.SpecialSummon(tc,0,tp,tp,true,true,POS_FACEUP) - tc:CompleteProcedure() - end -end diff --git a/script/c47529357.lua b/script/c47529357.lua deleted file mode 100644 index dbb6813076..0000000000 --- a/script/c47529357.lua +++ /dev/null @@ -1,38 +0,0 @@ ---ミスト・ボディ -function c47529357.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c47529357.target) - e1:SetOperation(c47529357.operation) - c:RegisterEffect(e1) - --Indes - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e2:SetValue(1) - c:RegisterEffect(e2) - --Equip limit - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_EQUIP_LIMIT) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e3:SetValue(1) - c:RegisterEffect(e3) -end -function c47529357.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c47529357.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,e:GetHandler(),tc) - end -end diff --git a/script/c4756629.lua b/script/c4756629.lua deleted file mode 100644 index 93e7059a23..0000000000 --- a/script/c4756629.lua +++ /dev/null @@ -1,110 +0,0 @@ ---ヴェルズ・ケルキオン -function c4756629.initial_effect(c) - --salvage - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetDescription(aux.Stringid(4756629,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCountLimit(1,4756629) - e1:SetCost(c4756629.thcost) - e1:SetTarget(c4756629.thtg) - e1:SetOperation(c4756629.thop) - c:RegisterEffect(e1) - --summon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(4756629,1)) - e2:SetCategory(CATEGORY_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCondition(c4756629.sumcon) - e2:SetTarget(c4756629.sumtg) - e2:SetOperation(c4756629.sumop) - c:RegisterEffect(e2) - --decrease tribute - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e3:SetCode(EVENT_TO_GRAVE) - e3:SetOperation(c4756629.decop) - c:RegisterEffect(e3) -end -function c4756629.rmfilter(c,tp) - return c:IsSetCard(0xa) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost() - and Duel.IsExistingTarget(c4756629.filter,tp,LOCATION_GRAVE,0,1,c) -end -function c4756629.filter(c) - return c:IsSetCard(0xa) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() -end -function c4756629.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c4756629.rmfilter,tp,LOCATION_GRAVE,0,1,nil,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c4756629.rmfilter,tp,LOCATION_GRAVE,0,1,1,nil,tp) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c4756629.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c4756629.filter(chkc) end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g=Duel.SelectTarget(tp,c4756629.filter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c4756629.thop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end - if c:IsRelateToEffect(e) and c:IsFaceup() then - c:RegisterFlagEffect(4756629,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) - end -end -function c4756629.sumcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetFlagEffect(4756629)~=0 -end -function c4756629.sumfilter(c) - return c:IsSetCard(0xa) and c:IsSummonable(true,nil) -end -function c4756629.sumtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c4756629.sumfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,0,0) -end -function c4756629.sumop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON) - local g=Duel.SelectMatchingCard(tp,c4756629.sumfilter,tp,LOCATION_HAND,0,1,1,nil) - local tc=g:GetFirst() - if tc then - Duel.Summon(tp,tc,true,nil) - end -end -function c4756629.decop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if Duel.GetFlagEffect(tp,4756630)~=0 then return end - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_DECREASE_TRIBUTE) - e1:SetTargetRange(LOCATION_HAND,LOCATION_HAND) - e1:SetTarget(c4756629.rfilter) - e1:SetCondition(c4756629.econ) - e1:SetCountLimit(1) - e1:SetValue(0x1) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(0x10000000+4756631) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetRange(LOCATION_GRAVE) - e2:SetTargetRange(1,0) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - c:RegisterEffect(e2) - Duel.RegisterFlagEffect(tp,4756630,RESET_PHASE+PHASE_END,0,1) -end -function c4756629.econ(e) - return Duel.GetFlagEffect(e:GetHandlerPlayer(),4756631)~=0 -end -function c4756629.rfilter(e,c) - return c:IsSetCard(0xa) -end diff --git a/script/c47579719.lua b/script/c47579719.lua deleted file mode 100644 index 58d24afc03..0000000000 --- a/script/c47579719.lua +++ /dev/null @@ -1,31 +0,0 @@ ---セイクリッド・ヒアデス -function c47579719.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_LIGHT),3,2) - c:EnableReviveLimit() - --pos change - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_POSITION) - e1:SetDescription(aux.Stringid(47579719,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c47579719.cost) - e1:SetTarget(c47579719.target) - e1:SetOperation(c47579719.operation) - c:RegisterEffect(e1) -end -function c47579719.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c47579719.filter(c) - return c:GetPosition()~=POS_FACEUP_DEFENCE -end -function c47579719.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c47579719.filter,tp,0,LOCATION_MZONE,1,nil) end -end -function c47579719.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c47579719.filter,tp,0,LOCATION_MZONE,nil) - Duel.ChangePosition(g,POS_FACEUP_DEFENCE,POS_FACEUP_DEFENCE,POS_FACEUP_DEFENCE,POS_FACEUP_DEFENCE) -end diff --git a/script/c47594192.lua b/script/c47594192.lua deleted file mode 100644 index f3c4e65869..0000000000 --- a/script/c47594192.lua +++ /dev/null @@ -1,34 +0,0 @@ ---スリーカード -function c47594192.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,0x1e0) - e1:SetCondition(c47594192.condition) - e1:SetTarget(c47594192.target) - e1:SetOperation(c47594192.activate) - c:RegisterEffect(e1) -end -function c47594192.cfilter(c,tp) - return c:IsFaceup() and not c:IsType(TYPE_TOKEN) and Duel.IsExistingMatchingCard(c47594192.cfilter2,tp,LOCATION_MZONE,0,2,c,c:GetCode()) -end -function c47594192.cfilter2(c,code) - return c:IsFaceup() and c:GetCode()==code -end -function c47594192.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c47594192.cfilter,tp,LOCATION_MZONE,0,1,nil,tp) -end -function c47594192.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and chkc:IsDestructable() end - if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,0,LOCATION_ONFIELD,3,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,0,LOCATION_ONFIELD,3,3,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,3,0,0) -end -function c47594192.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) - Duel.Destroy(g,REASON_EFFECT) -end diff --git a/script/c47594939.lua b/script/c47594939.lua deleted file mode 100644 index 06722a38ed..0000000000 --- a/script/c47594939.lua +++ /dev/null @@ -1,50 +0,0 @@ ---召喚制限-ディスコードセクター -function c47594939.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --adjust - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e2:SetCode(EVENT_ADJUST) - e2:SetRange(LOCATION_SZONE) - e2:SetOperation(c47594939.adjustop) - c:RegisterEffect(e2) - --disable spsummon - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetRange(LOCATION_SZONE) - e3:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e3:SetTargetRange(1,1) - e3:SetTarget(c47594939.splimit) - c:RegisterEffect(e3) - local g=Group.CreateGroup() - g:KeepAlive() - e2:SetLabelObject(g) - e3:SetLabelObject(g) -end -function c47594939.lvfilter(c,lv,tp) - return c:GetLevel()==lv and c:IsControler(tp) -end -function c47594939.rkfilter(c,rk,tp) - return c:GetRank()==rk and c:IsControler(tp) -end -function c47594939.splimit(e,c,sump,sumtype,sumpos,targetp) - local lv=c:GetLevel() - local rk=c:GetRank() - if lv>0 then - return e:GetLabelObject():IsExists(c47594939.lvfilter,1,nil,lv,sump) - end - return e:GetLabelObject():IsExists(c47594939.rkfilter,1,nil,rk,sump) -end -function c47594939.adjustop(e,tp,eg,ep,ev,re,r,rp) - local phase=Duel.GetCurrentPhase() - if (phase==PHASE_DAMAGE and not Duel.IsDamageCalculated()) or phase==PHASE_DAMAGE_CAL then return end - local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - e:GetLabelObject():Clear() - e:GetLabelObject():Merge(g) -end diff --git a/script/c47596607.lua b/script/c47596607.lua deleted file mode 100644 index 8252dae8c4..0000000000 --- a/script/c47596607.lua +++ /dev/null @@ -1,37 +0,0 @@ ---摩天楼2-ヒーローシティ -function c47596607.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(47596607,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_SZONE) - e2:SetCountLimit(1) - e2:SetTarget(c47596607.sptg) - e2:SetOperation(c47596607.spop) - c:RegisterEffect(e2) -end -function c47596607.filter(c,e,tp) - return c:IsSetCard(0x3008) and bit.band(c:GetReason(),REASON_BATTLE)~=0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c47596607.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c47596607.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c47596607.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c47596607.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c47596607.spop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c47606319.lua b/script/c47606319.lua deleted file mode 100644 index 9c7615738c..0000000000 --- a/script/c47606319.lua +++ /dev/null @@ -1,52 +0,0 @@ ---ギガンテス -function c47606319.initial_effect(c) - c:EnableReviveLimit() - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c47606319.spcon) - e1:SetOperation(c47606319.spop) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(47606319,0)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_BATTLE_DESTROYED) - e2:SetCondition(c47606319.condition) - e2:SetTarget(c47606319.target) - e2:SetOperation(c47606319.operation) - c:RegisterEffect(e2) -end -function c47606319.spfilter(c) - return c:IsAttribute(ATTRIBUTE_EARTH) and c:IsAbleToRemoveAsCost() -end -function c47606319.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c47606319.spfilter,tp,LOCATION_GRAVE,0,1,nil) -end -function c47606319.spop(e,tp,eg,ep,ev,re,r,rp,c) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c47606319.spfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c47606319.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) -end -function c47606319.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable() -end -function c47606319.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local g=Duel.GetMatchingGroup(c47606319.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c47606319.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c47606319.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) - Duel.Destroy(g,REASON_EFFECT) -end diff --git a/script/c47611119.lua b/script/c47611119.lua deleted file mode 100644 index 4a02e842f5..0000000000 --- a/script/c47611119.lua +++ /dev/null @@ -1,50 +0,0 @@ ---ジェムナイトレディ・ラピスラズリ -function c47611119.initial_effect(c) - c:SetSPSummonOnce(47611119) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcCodeFun(c,99645428,aux.FilterBoolFunction(Card.IsSetCard,0x1047),1,false,false) - --spsummon condition - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(c47611119.splimit) - c:RegisterEffect(e1) - --damage - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_DAMAGE) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetTarget(c47611119.damtg) - e2:SetOperation(c47611119.damop) - c:RegisterEffect(e2) -end -function c47611119.splimit(e,se,sp,st) - return not e:GetHandler():IsLocation(LOCATION_EXTRA) or bit.band(st,SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION -end -function c47611119.filter(c) - return c:IsSetCard(0x1047) and c:IsType(TYPE_MONSTER) and c:IsAbleToGrave() -end -function c47611119.ctfilter(c) - return bit.band(c:GetSummonType(),SUMMON_TYPE_SPECIAL)==SUMMON_TYPE_SPECIAL -end -function c47611119.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c47611119.filter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,nil) - and Duel.IsExistingMatchingCard(c47611119.ctfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - local ct=Duel.GetMatchingGroupCount(c47611119.ctfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - Duel.SetTargetPlayer(1-tp) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,ct*500) -end -function c47611119.damop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c47611119.filter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoGrave(g,REASON_EFFECT) - local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) - local ct=Duel.GetMatchingGroupCount(c47611119.ctfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - Duel.Damage(p,ct*500,REASON_EFFECT) - end -end diff --git a/script/c47658964.lua b/script/c47658964.lua deleted file mode 100644 index 9188526527..0000000000 --- a/script/c47658964.lua +++ /dev/null @@ -1,38 +0,0 @@ ---紅蓮の炎壁 -function c47658964.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c47658964.cost) - e1:SetTarget(c47658964.target) - e1:SetOperation(c47658964.activate) - c:RegisterEffect(e1) -end -function c47658964.cfilter(c) - return c:IsSetCard(0x39) and c:IsAbleToRemoveAsCost() -end -function c47658964.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c47658964.cfilter,tp,LOCATION_GRAVE,0,1,nil) end - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c47658964.cfilter,tp,LOCATION_GRAVE,0,1,ft,nil) - e:SetLabel(g:GetCount()) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c47658964.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsPlayerCanSpecialSummonMonster(tp,47658965,0x39,0x4011,0,0,1,RACE_PYRO,ATTRIBUTE_FIRE) end - Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,e:GetLabel(),0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,e:GetLabel(),0,0) -end -function c47658964.activate(e,tp,eg,ep,ev,re,r,rp) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ft-1 - and Duel.IsExistingTarget(c47660516.filter1,tp,LOCATION_MZONE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - local g=Duel.SelectTarget(tp,c47660516.filter1,tp,LOCATION_MZONE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function c47660516.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<0 then return end - local tc=Duel.GetFirstTarget() - if tc:IsFacedown() or not tc:IsRelateToEffect(e) or tc:IsControler(1-tp) or tc:IsImmuneToEffect(e) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c47660516.filter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc,tc:GetRank()+1,tc:GetRace(),tc:GetCode()) - local sc=g:GetFirst() - if sc then - local mg=tc:GetOverlayGroup() - if mg:GetCount()~=0 then - Duel.Overlay(sc,mg) - end - sc:SetMaterial(Group.FromCards(tc)) - Duel.Overlay(sc,Group.FromCards(tc)) - Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP) - sc:CompleteProcedure() - if Duel.GetOverlayCount(tp,0,1)~=0 then - Duel.BreakEffect() - local g1=Duel.GetOverlayGroup(tp,0,1) - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(47660516,0)) - local mg2=g1:Select(tp,1,1,nil) - local oc=mg2:GetFirst():GetOverlayTarget() - Duel.Overlay(sc,mg2) - Duel.RaiseSingleEvent(oc,EVENT_DETACH_MATERIAL,e,0,0,0,0) - end - end -end diff --git a/script/c47664723.lua b/script/c47664723.lua deleted file mode 100644 index 0c0a695629..0000000000 --- a/script/c47664723.lua +++ /dev/null @@ -1,17 +0,0 @@ ---堕天使エデ・アーラエ -function c47664723.initial_effect(c) - --spsum success - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetOperation(c47664723.gete) - c:RegisterEffect(e1) -end -function c47664723.gete(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():GetPreviousLocation()~=LOCATION_GRAVE then return end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_PIERCE) - e1:SetReset(RESET_EVENT+0x1ff0000) - e:GetHandler():RegisterEffect(e1) -end diff --git a/script/c47687766.lua b/script/c47687766.lua deleted file mode 100644 index bda87e6b81..0000000000 --- a/script/c47687766.lua +++ /dev/null @@ -1,45 +0,0 @@ ---ギアギアングラー -function c47687766.initial_effect(c) - --search - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(47687766,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c47687766.target) - e1:SetOperation(c47687766.operation) - c:RegisterEffect(e1) -end -function c47687766.filter(c) - return c:GetLevel()==4 and c:IsRace(RACE_MACHINE) and c:IsAttribute(ATTRIBUTE_EARTH) and not c:IsCode(47687766) and c:IsAbleToHand() -end -function c47687766.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c47687766.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c47687766.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c47687766.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e2:SetTargetRange(1,0) - e2:SetTarget(c47687766.splimit) - e2:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e2,tp) -end -function c47687766.splimit(e,c) - return c:GetRace()~=RACE_MACHINE -end diff --git a/script/c47693640.lua b/script/c47693640.lua deleted file mode 100644 index aca34a72c0..0000000000 --- a/script/c47693640.lua +++ /dev/null @@ -1,121 +0,0 @@ ---ゾンビタイガー -function c47693640.initial_effect(c) - --equip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(47693640,0)) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetTarget(c47693640.eqtg) - e1:SetOperation(c47693640.eqop) - c:RegisterEffect(e1) - --unequip - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(47693640,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_SZONE) - e2:SetCondition(c47693640.uncon) - e2:SetTarget(c47693640.sptg) - e2:SetOperation(c47693640.spop) - c:RegisterEffect(e2) - --Atk up - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_EQUIP) - e3:SetCode(EFFECT_UPDATE_ATTACK) - e3:SetValue(500) - e3:SetCondition(c47693640.uncon) - c:RegisterEffect(e3) - --Def up - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_EQUIP) - e4:SetCode(EFFECT_UPDATE_DEFENCE) - e4:SetValue(500) - e4:SetCondition(c47693640.uncon) - c:RegisterEffect(e4) - --handes - local e5=Effect.CreateEffect(c) - e5:SetDescription(aux.Stringid(47693640,2)) - e5:SetCategory(CATEGORY_HANDES) - e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e5:SetRange(LOCATION_SZONE) - e5:SetCode(EVENT_BATTLE_DESTROYING) - e5:SetCondition(c47693640.hdcon) - e5:SetTarget(c47693640.hdtg) - e5:SetOperation(c47693640.hdop) - c:RegisterEffect(e5) - --destroy sub - local e6=Effect.CreateEffect(c) - e6:SetType(EFFECT_TYPE_EQUIP) - e6:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e6:SetCode(EFFECT_DESTROY_SUBSTITUTE) - e6:SetCondition(c47693640.uncon) - e6:SetValue(c47693640.repval) - c:RegisterEffect(e6) - --eqlimit - local e7=Effect.CreateEffect(c) - e7:SetType(EFFECT_TYPE_SINGLE) - e7:SetCode(EFFECT_EQUIP_LIMIT) - e7:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e7:SetValue(c47693640.eqlimit) - c:RegisterEffect(e7) -end -function c47693640.uncon(e) - return e:GetHandler():IsStatus(STATUS_UNION) -end -function c47693640.repval(e,re,r,rp) - return bit.band(r,REASON_BATTLE)~=0 -end -function c47693640.eqlimit(e,c) - return c:IsCode(10209545) -end -function c47693640.filter(c) - return c:IsFaceup() and c:IsCode(10209545) and c:GetUnionCount()==0 -end -function c47693640.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c47693640.filter(chkc) end - if chk==0 then return e:GetHandler():GetFlagEffect(47693640)==0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingTarget(c47693640.filter,tp,LOCATION_MZONE,0,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local g=Duel.SelectTarget(tp,c47693640.filter,tp,LOCATION_MZONE,0,1,1,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0) - e:GetHandler():RegisterFlagEffect(47693640,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1) -end -function c47693640.eqop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if not c:IsRelateToEffect(e) or c:IsFacedown() then return end - if not tc:IsRelateToEffect(e) or not c47693640.filter(tc) then - Duel.SendtoGrave(c,REASON_EFFECT) - return - end - if not Duel.Equip(tp,c,tc,false) then return end - c:SetStatus(STATUS_UNION,true) -end -function c47693640.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():GetFlagEffect(47693640)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,false) end - Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) - e:GetHandler():RegisterFlagEffect(47693640,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1) -end -function c47693640.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP_ATTACK) - end -end -function c47693640.hdcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsStatus(STATUS_UNION) and eg:GetFirst()==e:GetHandler():GetEquipTarget() -end -function c47693640.hdtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_HANDES,0,0,1-tp,1) -end -function c47693640.hdop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND) - if g:GetCount()==0 then return end - local sg=g:RandomSelect(1-tp,1) - Duel.SendtoGrave(sg,REASON_DISCARD+REASON_EFFECT) -end diff --git a/script/c47728740.lua b/script/c47728740.lua deleted file mode 100644 index 0e1ae3f76c..0000000000 --- a/script/c47728740.lua +++ /dev/null @@ -1,80 +0,0 @@ ---Alich, Malebranche of the Burning Abyss -function c47728740.initial_effect(c) - --self destroy - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_SELF_DESTROY) - e1:SetCondition(c47728740.sdcon) - c:RegisterEffect(e1) - --Special Summon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(47728740,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_HAND) - e2:SetCountLimit(1,47728740) - e2:SetCondition(c47728740.sscon) - e2:SetTarget(c47728740.sstg) - e2:SetOperation(c47728740.ssop) - c:RegisterEffect(e2) - --disable - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(47728740,1)) - e3:SetCategory(CATEGORY_DISABLE) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) - e3:SetCode(EVENT_TO_GRAVE) - e3:SetCountLimit(1,47728740) - e3:SetTarget(c47728740.distg) - e3:SetOperation(c47728740.disop) - c:RegisterEffect(e3) -end -function c47728740.sdfilter(c) - return not c:IsFaceup() or not c:IsSetCard(0xb1) -end -function c47728740.sdcon(e) - return Duel.IsExistingMatchingCard(c47728740.sdfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) -end -function c47728740.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) -end -function c47728740.sscon(e,tp,eg,ep,ev,re,r,rp) - return not Duel.IsExistingMatchingCard(c47728740.filter,tp,LOCATION_ONFIELD,0,1,nil) -end -function c47728740.sstg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c47728740.ssop(e,tp,eg,ep,ev,re,r,rp) - if Duel.IsExistingMatchingCard(c47728740.filter,tp,LOCATION_ONFIELD,0,1,nil) then return end - if e:GetHandler():IsRelateToEffect(e) then - Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP) - end -end -function c47728740.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsFaceup() and chkc:IsLocation(LOCATION_MZONE) end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) -end -function c47728740.disop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() and not tc:IsDisabled() then - Duel.NegateRelatedChain(tc,RESET_TURN_SET) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetValue(RESET_TURN_SET) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - tc:RegisterEffect(e2) - end -end diff --git a/script/c47731128.lua b/script/c47731128.lua deleted file mode 100644 index 1dec47b183..0000000000 --- a/script/c47731128.lua +++ /dev/null @@ -1,35 +0,0 @@ ---結界術師 メイコウ -function c47731128.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(47731128,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c47731128.cost) - e1:SetTarget(c47731128.target) - e1:SetOperation(c47731128.operation) - c:RegisterEffect(e1) -end -function c47731128.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end -function c47731128.filter(c) - local tpe=c:GetType() - return c:IsFaceup() and (tpe==0x20002 or tpe==0x20004) and c:IsDestructable() -end -function c47731128.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and c47731128.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c47731128.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c47731128.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c47731128.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c47737087.lua b/script/c47737087.lua deleted file mode 100644 index 4256f1528e..0000000000 --- a/script/c47737087.lua +++ /dev/null @@ -1,52 +0,0 @@ ---E・HERO ランパートガンナー -function c47737087.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcCode2(c,58932615,84327329,true,true) - --spsummon condition - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(aux.fuslimit) - c:RegisterEffect(e1) - -- - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DIRECT_ATTACK) - e2:SetCondition(c47737087.dacon) - c:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_DEFENCE_ATTACK) - c:RegisterEffect(e3) - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET) - e4:SetCondition(c47737087.dacon) - e4:SetValue(1) - c:RegisterEffect(e4) - --atkdown - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e5:SetCode(EVENT_PRE_DAMAGE_CALCULATE) - e5:SetCondition(c47737087.rdcon) - e5:SetOperation(c47737087.rdop) - c:RegisterEffect(e5) -end -function c47737087.dacon(e) - return e:GetHandler():IsDefencePos() -end -function c47737087.rdcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsDefencePos() and c==Duel.GetAttacker() and Duel.GetAttackTarget()==nil and c:GetEffectCount(EFFECT_DIRECT_ATTACK)==1 -end -function c47737087.rdop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetValue(c:GetAttack()/2) - e1:SetReset(RESET_PHASE+PHASE_DAMAGE_CAL) - c:RegisterEffect(e1) -end diff --git a/script/c47741109.lua b/script/c47741109.lua deleted file mode 100644 index 9691b41845..0000000000 --- a/script/c47741109.lua +++ /dev/null @@ -1,33 +0,0 @@ ---森羅の隠蜜 スナッフ -function c47741109.initial_effect(c) - --tograve - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(47741109,0)) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e1:SetCondition(c47741109.condition) - e1:SetTarget(c47741109.target) - e1:SetOperation(c47741109.operation) - c:RegisterEffect(e1) -end -function c47741109.condition(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsPreviousLocation(LOCATION_HAND+LOCATION_ONFIELD) or (c:IsPreviousLocation(LOCATION_DECK) and - (c:IsReason(REASON_REVEAL) or c:GetPreviousPosition()==POS_FACEUP_DEFENCE or Duel.IsPlayerAffectedByEffect(tp,EFFECT_REVERSE_DECK))) -end -function c47741109.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,1) end -end -function c47741109.operation(e,tp,eg,ep,ev,re,r,rp) - if not Duel.IsPlayerCanDiscardDeck(tp,1) then return end - Duel.ConfirmDecktop(tp,1) - local g=Duel.GetDecktopGroup(tp,1) - local tc=g:GetFirst() - if tc:IsRace(RACE_PLANT) then - Duel.DisableShuffleCheck() - Duel.SendtoGrave(g,REASON_EFFECT+REASON_REVEAL) - else - Duel.MoveSequence(tc,1) - end -end diff --git a/script/c47754278.lua b/script/c47754278.lua deleted file mode 100644 index c48a19b4c4..0000000000 --- a/script/c47754278.lua +++ /dev/null @@ -1,64 +0,0 @@ ---ヘル・ドラゴン -function c47754278.initial_effect(c) - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(47754278,0)) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCondition(c47754278.descon) - e1:SetTarget(c47754278.destg) - e1:SetOperation(c47754278.desop) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(47754278,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_CVAL_CHECK) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetCondition(c47754278.spcon) - e2:SetCost(c47754278.spcost) - e2:SetTarget(c47754278.sptg) - e2:SetOperation(c47754278.spop) - e2:SetValue(c47754278.valcheck) - c:RegisterEffect(e2) -end -function c47754278.descon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetAttackAnnouncedCount()~=0 -end -function c47754278.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0) -end -function c47754278.desop(e,tp,eg,ep,ev,re,r,rp) - Duel.Destroy(e:GetHandler(),REASON_EFFECT) -end -function c47754278.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsReason(REASON_DESTROY) and e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) -end -function c47754278.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - if Duel.GetFlagEffect(tp,47754278)==0 then - Duel.RegisterFlagEffect(tp,47754278,RESET_CHAIN,0,1) - c47754278[0]=Duel.GetReleaseGroupCount(tp) - c47754278[1]=0 - end - return c47754278[0]-c47754278[1]>=1 - end - local g=Duel.SelectReleaseGroup(tp,nil,1,1,nil) - Duel.Release(g,REASON_COST) -end -function c47754278.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c47754278.spop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP) - end -end -function c47754278.valcheck(e) - c47754278[1]=c47754278[1]+1 -end diff --git a/script/c47766694.lua b/script/c47766694.lua deleted file mode 100644 index 0fbd2a2434..0000000000 --- a/script/c47766694.lua +++ /dev/null @@ -1,67 +0,0 @@ ---荒野の大竜巻 -function c47766694.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c47766694.target) - e1:SetOperation(c47766694.activate) - c:RegisterEffect(e1) - --Destroy - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(47766694,1)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetCondition(c47766694.descon) - e2:SetTarget(c47766694.destg) - e2:SetOperation(c47766694.desop) - c:RegisterEffect(e2) -end -function c47766694.filter(c) - return c:IsFaceup() and c:GetSequence()<5 and c:IsDestructable() -end -function c47766694.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_SZONE) and c47766694.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c47766694.filter,tp,LOCATION_SZONE,LOCATION_SZONE,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c47766694.filter,tp,LOCATION_SZONE,LOCATION_SZONE,1,1,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c47766694.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)~=0 then - local dp=tc:GetControler() - local g=Duel.GetMatchingGroup(Card.IsSSetable,dp,LOCATION_HAND,0,nil) - if g:GetCount()>0 and Duel.SelectYesNo(dp,aux.Stringid(47766694,0)) then - Duel.BreakEffect() - Duel.Hint(HINT_SELECTMSG,tp,510) - local sg=g:Select(dp,1,1,nil) - Duel.SSet(dp,sg:GetFirst()) - end - end -end -function c47766694.descon(e,tp,eg,ep,ev,re,r,rp) - return bit.band(r,REASON_DESTROY)~=0 - and bit.band(e:GetHandler():GetPreviousLocation(),LOCATION_ONFIELD)~=0 - and bit.band(e:GetHandler():GetPreviousPosition(),POS_FACEDOWN)~=0 -end -function c47766694.desfilter(c) - return c:IsFaceup() and c:IsDestructable() -end -function c47766694.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and c47766694.desfilter(chkc) end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c47766694.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c47766694.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c47778083.lua b/script/c47778083.lua deleted file mode 100644 index a36da6b2b3..0000000000 --- a/script/c47778083.lua +++ /dev/null @@ -1,76 +0,0 @@ ---ボーン・テンプル・ブロック -function c47778083.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c47778083.target) - e1:SetOperation(c47778083.operation) - c:RegisterEffect(e1) -end -function c47778083.filter(c,e,tp) - return c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c47778083.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - if chk==0 then - return Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)~=0 - and Duel.IsExistingTarget(c47778083.filter,tp,0,LOCATION_GRAVE,1,nil,e,tp) - and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c47778083.filter,1-tp,0,LOCATION_GRAVE,1,nil,e,1-tp) - and Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0 - end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=Duel.SelectTarget(tp,c47778083.filter,tp,0,LOCATION_GRAVE,1,1,nil,e,tp) - Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_SPSUMMON) - local og=Duel.SelectTarget(1-tp,c47778083.filter,1-tp,0,LOCATION_GRAVE,1,1,nil,e,1-tp) - local sc=sg:GetFirst() - local oc=og:GetFirst() - local g=Group.FromCards(sc,oc) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,2,PLAYER_ALL,1-g:GetFirst():GetOwner()) - e:SetLabelObject(sc) -end -function c47778083.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_EFFECT+REASON_DISCARD)==0 then return end - local sc=e:GetLabelObject() - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local oc=g:GetFirst() - if oc==sc then oc=g:GetNext() end - if sc:IsRelateToEffect(e) then - Duel.SpecialSummonStep(sc,0,tp,tp,false,false,POS_FACEUP) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetCondition(c47778083.descon) - e1:SetOperation(c47778083.desop) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,2) - e1:SetCountLimit(1) - e1:SetLabel(Duel.GetTurnCount()) - sc:RegisterEffect(e1,true) - end - if oc:IsRelateToEffect(e) then - Duel.SpecialSummonStep(oc,0,1-tp,1-tp,false,false,POS_FACEUP) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetCondition(c47778083.descon) - e1:SetOperation(c47778083.desop) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,2) - e1:SetCountLimit(1) - e1:SetLabel(Duel.GetTurnCount()) - oc:RegisterEffect(e1,true) - end - Duel.SpecialSummonComplete() -end -function c47778083.descon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnCount()~=e:GetLabel() -end -function c47778083.desop(e,tp,eg,ep,ev,re,r,rp) - Duel.Destroy(e:GetHandler(),REASON_EFFECT) -end diff --git a/script/c4779091.lua b/script/c4779091.lua deleted file mode 100644 index 3b514cb147..0000000000 --- a/script/c4779091.lua +++ /dev/null @@ -1,102 +0,0 @@ ---ユベル-Das Abscheulich Ritter -function c4779091.initial_effect(c) - c:EnableReviveLimit() - --battle - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_AVOID_BATTLE_DAMAGE) - e1:SetValue(1) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e2:SetValue(1) - c:RegisterEffect(e2) - --damage - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(4779091,0)) - e3:SetCategory(CATEGORY_DAMAGE) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e3:SetCode(EVENT_BATTLE_CONFIRM) - e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e3:SetCondition(c4779091.damcon) - e3:SetTarget(c4779091.damtg) - e3:SetOperation(c4779091.damop) - c:RegisterEffect(e3) - --destroy - local e4=Effect.CreateEffect(c) - e4:SetCategory(CATEGORY_RELEASE+CATEGORY_DESTROY) - e4:SetDescription(aux.Stringid(4779091,1)) - e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e4:SetRange(LOCATION_MZONE) - e4:SetCountLimit(1) - e4:SetCode(EVENT_PHASE+PHASE_END) - e4:SetCondition(c4779091.descon) - e4:SetTarget(c4779091.destg) - e4:SetOperation(c4779091.desop) - c:RegisterEffect(e4) - --special summon - local e5=Effect.CreateEffect(c) - e5:SetDescription(aux.Stringid(4779091,2)) - e5:SetCategory(CATEGORY_SPECIAL_SUMMON) - e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e5:SetCode(EVENT_LEAVE_FIELD) - e5:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e5:SetCondition(c4779091.spcon) - e5:SetTarget(c4779091.sptg) - e5:SetOperation(c4779091.spop) - c:RegisterEffect(e5) - --cannot special summon - local e6=Effect.CreateEffect(c) - e6:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e6:SetType(EFFECT_TYPE_SINGLE) - e6:SetCode(EFFECT_SPSUMMON_CONDITION) - c:RegisterEffect(e6) -end -function c4779091.damcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler()==Duel.GetAttackTarget() -end -function c4779091.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAttackPos() end - Duel.SetTargetPlayer(1-tp) - local atk=Duel.GetAttacker():GetAttack() - Duel.SetTargetParam(atk) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,atk) -end -function c4779091.damop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end -function c4779091.descon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c4779091.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,LOCATION_MZONE,LOCATION_MZONE,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c4779091.desop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,LOCATION_MZONE,LOCATION_MZONE,e:GetHandler()) - Duel.Destroy(g,REASON_EFFECT) -end -function c4779091.spcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsPreviousPosition(POS_FACEUP) and c:GetLocation()~=LOCATION_DECK -end -function c4779091.filter(c,e,tp) - return c:IsCode(31764700) and c:IsCanBeSpecialSummoned(e,0,tp,true,true) - and (not c:IsLocation(LOCATION_GRAVE) or not c:IsHasEffect(EFFECT_NECRO_VALLEY)) -end -function c4779091.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c4779091.filter,tp,0x13,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,0x13) -end -function c4779091.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c4779091.filter,tp,0x13,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,true,true,POS_FACEUP) - end -end diff --git a/script/c47795344.lua b/script/c47795344.lua deleted file mode 100644 index 3c910bb22f..0000000000 --- a/script/c47795344.lua +++ /dev/null @@ -1,22 +0,0 @@ ---ナチュル・ハイドランジー -function c47795344.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c47795344.spcon) - c:RegisterEffect(e1) - Duel.AddCustomActivityCounter(47795344,ACTIVITY_CHAIN,c47795344.chainfilter) -end -function c47795344.chainfilter(re,tp,cid) - return not (re:GetHandler():IsSetCard(0x2a) and re:IsActiveType(TYPE_MONSTER) - and Duel.GetChainInfo(cid,CHAININFO_TRIGGERING_LOCATION)==LOCATION_MZONE) -end -function c47795344.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.GetCustomActivityCount(47795344,tp,ACTIVITY_CHAIN)~=0 - and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 -end diff --git a/script/c4779823.lua b/script/c4779823.lua deleted file mode 100644 index cb6c760b6a..0000000000 --- a/script/c4779823.lua +++ /dev/null @@ -1,85 +0,0 @@ ---ライトロード・アーク ミカエル -function c4779823.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,nil,aux.NonTuner(Card.IsAttribute,ATTRIBUTE_LIGHT),1) - c:EnableReviveLimit() - --remove - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(4779823,0)) - e1:SetCategory(CATEGORY_REMOVE) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCost(c4779823.rmcost) - e1:SetTarget(c4779823.rmtg) - e1:SetOperation(c4779823.rmop) - c:RegisterEffect(e1) - --todeck - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(4779823,1)) - e2:SetCategory(CATEGORY_TODECK+CATEGORY_RECOVER) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e2:SetCode(EVENT_DESTROYED) - e2:SetTarget(c4779823.rettg) - e2:SetOperation(c4779823.retop) - c:RegisterEffect(e2) - --discard deck - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(4779823,2)) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e3:SetCategory(CATEGORY_DECKDES) - e3:SetCode(EVENT_PHASE+PHASE_END) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1) - e3:SetCondition(c4779823.discon) - e3:SetTarget(c4779823.distg) - e3:SetOperation(c4779823.disop) - c:RegisterEffect(e3) -end -function c4779823.rmcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,1000) end - Duel.PayLPCost(tp,1000) -end -function c4779823.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsAbleToRemove() end - if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) -end -function c4779823.rmop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) - end -end -function c4779823.filter(c) - return c:IsSetCard(0x38) and c:IsType(TYPE_MONSTER) and c:IsAbleToDeck() -end -function c4779823.rettg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c4779823.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c4779823.filter,tp,LOCATION_GRAVE,0,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectTarget(tp,c4779823.filter,tp,LOCATION_GRAVE,0,1,99,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0) - Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,g:GetCount()*300) -end -function c4779823.retop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) - local ct=Duel.SendtoDeck(g,nil,2,REASON_EFFECT) - if ct>0 then - Duel.Recover(tp,ct*300,REASON_EFFECT) - end -end -function c4779823.discon(e,tp,eg,ep,ev,re,r,rp) - return tp==Duel.GetTurnPlayer() -end -function c4779823.distg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,3) -end -function c4779823.disop(e,tp,eg,ep,ev,re,r,rp) - Duel.DiscardDeck(tp,3,REASON_EFFECT) -end diff --git a/script/c47805931.lua b/script/c47805931.lua deleted file mode 100644 index e39ad176a6..0000000000 --- a/script/c47805931.lua +++ /dev/null @@ -1,35 +0,0 @@ ---No.20 蟻岩土ブリリアント -function c47805931.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,3,2) - c:EnableReviveLimit() - --attack up - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetDescription(aux.Stringid(47805931,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c47805931.cost) - e1:SetOperation(c47805931.operation) - c:RegisterEffect(e1) -end -c47805931.xyz_number=20 -function c47805931.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c47805931.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil) - local tc=g:GetFirst() - while tc do - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetValue(300) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - tc=g:GetNext() - end -end diff --git a/script/c47826112.lua b/script/c47826112.lua deleted file mode 100644 index d53e14b067..0000000000 --- a/script/c47826112.lua +++ /dev/null @@ -1,72 +0,0 @@ ---海皇龍 ポセイドラ -function c47826112.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(47826112,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND+LOCATION_GRAVE) - e1:SetCost(c47826112.spcost) - e1:SetTarget(c47826112.sptg) - e1:SetOperation(c47826112.spop) - c:RegisterEffect(e1) - --return - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(47826112,1)) - e2:SetCategory(CATEGORY_TOHAND) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetCondition(c47826112.thcon) - e2:SetTarget(c47826112.thtg) - e2:SetOperation(c47826112.thop) - c:RegisterEffect(e2) -end -function c47826112.cfilter(c) - return c:IsLevelBelow(3) and c:IsAttribute(ATTRIBUTE_WATER) -end -function c47826112.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,c47826112.cfilter,3,nil) end - local g=Duel.SelectReleaseGroup(tp,c47826112.cfilter,3,3,nil) - Duel.Release(g,REASON_COST) -end -function c47826112.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-3 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c47826112.spop(e,tp,eg,ep,ev,re,r,rp,c) - local c=e:GetHandler() - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,1,tp,tp,false,false,POS_FACEUP) - end -end -function c47826112.thcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+1 -end -function c47826112.thfilter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand() -end -function c47826112.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local g=Duel.GetMatchingGroup(c47826112.thfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0) -end -function c47826112.thop(e,tp,eg,ep,ev,re,r,rp,c) - local g=Duel.GetMatchingGroup(c47826112.thfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) - Duel.SendtoHand(g,nil,REASON_EFFECT) - local ct=g:FilterCount(Card.IsLocation,nil,LOCATION_HAND) - if ct>=3 then - local mg=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil) - local tc=mg:GetFirst() - while tc do - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(-ct*300) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - tc=mg:GetNext() - end - end -end diff --git a/script/c47829960.lua b/script/c47829960.lua deleted file mode 100644 index 4a453aa44e..0000000000 --- a/script/c47829960.lua +++ /dev/null @@ -1,37 +0,0 @@ ---カオスライダー グスタフ -function c47829960.initial_effect(c) - --atkup - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(47829960,0)) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetTarget(c47829960.target) - e1:SetOperation(c47829960.operation) - c:RegisterEffect(e1) -end -function c47829960.filter(c) - return c:IsType(TYPE_SPELL) and c:IsAbleToRemove() -end -function c47829960.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c47829960.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c47829960.filter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,c47829960.filter,tp,LOCATION_GRAVE,0,1,2,nil) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,0) -end -function c47829960.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) - local count=Duel.Remove(g,POS_FACEUP,REASON_EFFECT) - local c=e:GetHandler() - if count>0 and c:IsFaceup() and c:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(count*300) - e1:SetReset(RESET_EVENT+0x1ff0000+RESET_PHASE+PHASE_END,2) - c:RegisterEffect(e1) - end -end diff --git a/script/c47852924.lua b/script/c47852924.lua deleted file mode 100644 index fd2bd49945..0000000000 --- a/script/c47852924.lua +++ /dev/null @@ -1 +0,0 @@ ---天使の生き血 function c47852924.initial_effect(c) --recover local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCategory(CATEGORY_RECOVER) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetCode(EVENT_FREE_CHAIN) e1:SetTarget(c47852924.tg) e1:SetOperation(c47852924.op) c:RegisterEffect(e1) end function c47852924.tg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetTargetPlayer(tp) Duel.SetTargetParam(800) Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,800) end function c47852924.op(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Recover(p,d,REASON_EFFECT) end \ No newline at end of file diff --git a/script/c4786063.lua b/script/c4786063.lua deleted file mode 100644 index 9135903d9c..0000000000 --- a/script/c4786063.lua +++ /dev/null @@ -1,101 +0,0 @@ ---超重武者装留ファイヤー・アーマー -function c4786063.initial_effect(c) - --equip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(4786063,0)) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_HAND+LOCATION_MZONE) - e1:SetTarget(c4786063.eqtg) - e1:SetOperation(c4786063.eqop) - c:RegisterEffect(e1) - --level - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_CHANGE_LEVEL) - e2:SetValue(5) - c:RegisterEffect(e2) - --indes - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(4786063,1)) - e3:SetCategory(CATEGORY_DEFCHANGE) - e3:SetType(EFFECT_TYPE_QUICK_O) - e3:SetCode(EVENT_FREE_CHAIN) - e3:SetHintTiming(TIMING_DAMAGE_STEP) - e3:SetRange(LOCATION_HAND) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e3:SetCondition(c4786063.condition) - e3:SetCost(c4786063.cost) - e3:SetTarget(c4786063.target) - e3:SetOperation(c4786063.operation) - c:RegisterEffect(e3) -end -function c4786063.eqfilter(c) - return c:IsFaceup() and c:IsSetCard(0x9a) -end -function c4786063.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c4786063.eqfilter(chkc) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingTarget(c4786063.eqfilter,tp,LOCATION_MZONE,0,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c4786063.eqfilter,tp,LOCATION_MZONE,0,1,1,e:GetHandler()) -end -function c4786063.eqop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) then return end - if c:IsLocation(LOCATION_MZONE) and c:IsFacedown() then return end - local tc=Duel.GetFirstTarget() - if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or tc:GetControler()~=tp or tc:IsFacedown() or not tc:IsRelateToEffect(e) then - Duel.SendtoGrave(c,REASON_EFFECT) - return - end - Duel.Equip(tp,c,tc,true) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(c4786063.eqlimit) - c:RegisterEffect(e1) -end -function c4786063.eqlimit(e,c) - return c:IsSetCard(0x9a) -end -function c4786063.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end -function c4786063.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsDiscardable() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD) -end -function c4786063.filter(c) - return c:IsPosition(POS_FACEUP_DEFENCE) and c:IsSetCard(0x9a) -end -function c4786063.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c4786063.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c4786063.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUPDEFENCE) - Duel.SelectTarget(tp,c4786063.filter,tp,LOCATION_MZONE,0,1,1,nil) -end -function c4786063.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_DEFENCE) - e1:SetValue(-800) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e2:SetValue(1) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - tc:RegisterEffect(e3) - end -end diff --git a/script/c47863787.lua b/script/c47863787.lua deleted file mode 100644 index ad15b0345e..0000000000 --- a/script/c47863787.lua +++ /dev/null @@ -1,55 +0,0 @@ ---アーティファクト-ラブリュス -function c47863787.initial_effect(c) - --set - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_MONSTER_SSET) - e1:SetValue(TYPE_SPELL) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(47863787,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetCondition(c47863787.spcon) - e2:SetTarget(c47863787.sptg) - e2:SetOperation(c47863787.spop) - c:RegisterEffect(e2) - --spsummon - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(47863787,1)) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_TO_GRAVE) - e3:SetRange(LOCATION_HAND) - e3:SetCondition(c47863787.spcon2) - e3:SetTarget(c47863787.sptg2) - e3:SetOperation(c47863787.spop) - c:RegisterEffect(e3) -end -function c47863787.spcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsPreviousLocation(LOCATION_SZONE) and c:IsPreviousPosition(POS_FACEDOWN) - and c:IsReason(REASON_DESTROY) and Duel.GetTurnPlayer()~=tp -end -function c47863787.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c47863787.spop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP) - end -end -function c47863787.cfilter(c,tp) - return c:IsControler(tp) and c:IsSetCard(0x97) and c:IsReason(REASON_DESTROY) -end -function c47863787.spcon2(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c47863787.cfilter,1,nil,tp) -end -function c47863787.sptg2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end diff --git a/script/c47929865.lua b/script/c47929865.lua deleted file mode 100644 index 8bffd82623..0000000000 --- a/script/c47929865.lua +++ /dev/null @@ -1,35 +0,0 @@ ---マジドッグ -function c47929865.initial_effect(c) - --draw - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(47929865,0)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_BE_MATERIAL) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) - e1:SetCondition(c47929865.thcon) - e1:SetTarget(c47929865.thtg) - e1:SetOperation(c47929865.thop) - c:RegisterEffect(e1) -end -function c47929865.thcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsLocation(LOCATION_GRAVE) and r==REASON_SYNCHRO - and e:GetHandler():GetReasonCard():IsRace(RACE_SPELLCASTER) -end -function c47929865.filter(c) - return c:IsType(TYPE_FIELD) and c:IsAbleToHand() -end -function c47929865.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c47929865.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c47929865.filter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c47929865.filter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c47929865.thop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end diff --git a/script/c47942531.lua b/script/c47942531.lua deleted file mode 100644 index 902ae717f5..0000000000 --- a/script/c47942531.lua +++ /dev/null @@ -1,34 +0,0 @@ ---偉大魔獣 ガーゼット -function c47942531.initial_effect(c) - --tribute check - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_MATERIAL_CHECK) - e1:SetValue(c47942531.valcheck) - c:RegisterEffect(e1) - --give atk effect only when summon - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_SUMMON_COST) - e2:SetOperation(c47942531.facechk) - e2:SetLabelObject(e1) - c:RegisterEffect(e2) -end -function c47942531.valcheck(e,c) - local tc=c:GetMaterial():GetFirst() - local atk=0 - if tc then atk=tc:GetTextAttack()*2 end - if atk<0 then atk=0 end - if e:GetLabel()==1 then - e:SetLabel(0) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK) - e1:SetValue(atk) - e1:SetReset(RESET_EVENT+0xff0000) - c:RegisterEffect(e1) - end -end -function c47942531.facechk(e,tp,eg,ep,ev,re,r,rp) - e:GetLabelObject():SetLabel(1) -end diff --git a/script/c4796100.lua b/script/c4796100.lua deleted file mode 100644 index 73ede41192..0000000000 --- a/script/c4796100.lua +++ /dev/null @@ -1,34 +0,0 @@ ---有翼幻獣キマイラ -function c4796100.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcCode2(c,5818798,77207191,true,true) - --Special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(4796100,0)) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_DESTROYED) - e1:SetTarget(c4796100.sptg) - e1:SetOperation(c4796100.spop) - c:RegisterEffect(e1) -end -function c4796100.spfilter(c,e,tp) - local code=c:GetCode() - return (code==5818798 or code==77207191) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c4796100.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c4796100.spfilter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c4796100.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c4796100.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c4796100.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c47961808.lua b/script/c47961808.lua deleted file mode 100644 index 94187557e0..0000000000 --- a/script/c47961808.lua +++ /dev/null @@ -1,15 +0,0 @@ ---業火の結界像 -function c47961808.initial_effect(c) - --disable spsummon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetTargetRange(1,1) - e1:SetTarget(c47961808.sumlimit) - c:RegisterEffect(e1) -end -function c47961808.sumlimit(e,c,sump,sumtype,sumpos,targetp) - return c:GetAttribute()~=ATTRIBUTE_FIRE -end diff --git a/script/c47985614.lua b/script/c47985614.lua deleted file mode 100644 index 147e074d08..0000000000 --- a/script/c47985614.lua +++ /dev/null @@ -1,29 +0,0 @@ ---ガジェット・アームズ -function c47985614.initial_effect(c) - --flip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(47985614,0)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP) - e1:SetTarget(c47985614.target) - e1:SetOperation(c47985614.operation) - c:RegisterEffect(e1) -end -function c47985614.filter(c) - return c:IsSetCard(0x26) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand() -end -function c47985614.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c47985614.filter(chkc) end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c47985614.filter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0) -end -function c47985614.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end diff --git a/script/c48009503.lua b/script/c48009503.lua deleted file mode 100644 index bddba8700b..0000000000 --- a/script/c48009503.lua +++ /dev/null @@ -1,34 +0,0 @@ ---H-C ガーンデーヴァ -function c48009503.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsRace,RACE_WARRIOR),4,2) - c:EnableReviveLimit() - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(48009503,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCost(c48009503.cost) - e1:SetTarget(c48009503.target) - e1:SetOperation(c48009503.operation) - c:RegisterEffect(e1) -end -function c48009503.filter(c,e,tp) - return c:IsFaceup() and c:IsControler(1-tp) and c:IsLevelBelow(4) and (not e or c:IsRelateToEffect(e)) -end -function c48009503.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c48009503.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return eg:IsExists(c48009503.filter,1,nil,nil,tp) end - Duel.SetTargetCard(eg) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,eg:GetCount(),0,0) -end -function c48009503.operation(e,tp,eg,ep,ev,re,r,rp) - local g=eg:Filter(c48009503.filter,nil,e,tp) - Duel.Destroy(g,REASON_EFFECT) -end diff --git a/script/c48017809.lua b/script/c48017809.lua deleted file mode 100644 index 64cbe223df..0000000000 --- a/script/c48017809.lua +++ /dev/null @@ -1,27 +0,0 @@ ---蜃気楼の筒 -function c48017809.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_BE_BATTLE_TARGET) - e1:SetCondition(c48017809.condition) - e1:SetTarget(c48017809.target) - e1:SetOperation(c48017809.activate) - c:RegisterEffect(e1) -end -function c48017809.condition(e,tp,eg,ep,ev,re,r,rp) - return not e:GetHandler():IsLocation(LOCATION_HAND) - and eg:GetFirst():IsControler(tp) and eg:GetFirst():IsFaceup() -end -function c48017809.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(1000) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,1000) -end -function c48017809.activate(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c48049769.lua b/script/c48049769.lua deleted file mode 100644 index accfe5c845..0000000000 --- a/script/c48049769.lua +++ /dev/null @@ -1,50 +0,0 @@ ---サンダー・シーホース -function c48049769.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(48049769,0)) - e1:SetCategory(CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(1,48049769) - e1:SetCost(c48049769.cost) - e1:SetTarget(c48049769.target) - e1:SetOperation(c48049769.operation) - c:RegisterEffect(e1) -end -function c48049769.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_SPSUMMON)==0 and e:GetHandler():IsDiscardable() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD) - --oath effects - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) - e1:SetTargetRange(1,0) - Duel.RegisterEffect(e1,tp) -end -function c48049769.filter(c) - return c:IsRace(RACE_THUNDER) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:GetLevel()==4 and c:IsAttackBelow(1600) and c:IsAbleToHand() -end -function c48049769.filter1(c,g) - return g:IsExists(Card.IsCode,1,c,c:GetCode()) -end -function c48049769.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local g=Duel.GetMatchingGroup(c48049769.filter,tp,LOCATION_DECK,0,nil) - return g:IsExists(c48049769.filter1,1,nil,g) - end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,2,tp,LOCATION_DECK) -end -function c48049769.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c48049769.filter,tp,LOCATION_DECK,0,nil) - local sg=g:Filter(c48049769.filter1,nil,g) - if sg:GetCount()==0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local hg=sg:Select(tp,1,1,nil) - local hc=sg:Filter(Card.IsCode,hg:GetFirst(),hg:GetFirst():GetCode()):GetFirst() - hg:AddCard(hc) - Duel.SendtoHand(hg,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,hg) -end diff --git a/script/c48063985.lua b/script/c48063985.lua deleted file mode 100644 index 446f05398b..0000000000 --- a/script/c48063985.lua +++ /dev/null @@ -1,133 +0,0 @@ ---聖霊獣騎 カンナホーク -function c48063985.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcFun2(c,aux.FilterBoolFunction(Card.IsSetCard,0x10b5),aux.FilterBoolFunction(Card.IsSetCard,0x20b5),true) - --spsummon condition - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - c:RegisterEffect(e1) - --special summon rule - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_SPSUMMON_PROC) - e2:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e2:SetRange(LOCATION_EXTRA) - e2:SetCondition(c48063985.sprcon) - e2:SetOperation(c48063985.sprop) - c:RegisterEffect(e2) - --search - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(48063985,0)) - e3:SetCategory(CATEGORY_TOGRAVE+CATEGORY_SEARCH) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1) - e3:SetTarget(c48063985.thtg) - e3:SetOperation(c48063985.thop) - c:RegisterEffect(e3) - --special summon - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(48063985,1)) - e4:SetCategory(CATEGORY_SPECIAL_SUMMON) - e4:SetType(EFFECT_TYPE_QUICK_O) - e4:SetCode(EVENT_FREE_CHAIN) - e4:SetHintTiming(0,TIMING_END_PHASE) - e4:SetProperty(EFFECT_FLAG_CARD_TARGET) - e4:SetRange(LOCATION_MZONE) - e4:SetCost(c48063985.spcost) - e4:SetTarget(c48063985.sptg) - e4:SetOperation(c48063985.spop) - c:RegisterEffect(e4) -end -function c48063985.spfilter1(c,tp) - return c:IsSetCard(0x10b5) and c:IsAbleToRemoveAsCost() and c:IsCanBeFusionMaterial() - and Duel.IsExistingMatchingCard(c48063985.spfilter2,tp,LOCATION_MZONE,0,1,c) -end -function c48063985.spfilter2(c) - return c:IsSetCard(0x20b5) and c:IsAbleToRemoveAsCost() and c:IsCanBeFusionMaterial() -end -function c48063985.sprcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.GetLocationCount(tp,LOCATION_MZONE)>-2 - and Duel.IsExistingMatchingCard(c48063985.spfilter1,tp,LOCATION_MZONE,0,1,nil,tp) -end -function c48063985.sprop(e,tp,eg,ep,ev,re,r,rp,c) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g1=Duel.SelectMatchingCard(tp,c48063985.spfilter1,tp,LOCATION_MZONE,0,1,1,nil,tp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g2=Duel.SelectMatchingCard(tp,c48063985.spfilter2,tp,LOCATION_MZONE,0,1,1,g1:GetFirst()) - g1:Merge(g2) - c:SetMaterial(g1) - Duel.Remove(g1,POS_FACEUP,REASON_COST) -end -function c48063985.tgfilter(c) - return c:IsFaceup() and c:IsSetCard(0xb5) -end -function c48063985.thfilter(c) - return c:IsSetCard(0xb5) and c:IsAbleToHand() -end -function c48063985.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and c48063985.tgfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c48063985.tgfilter,tp,LOCATION_REMOVED,0,2,nil) - and Duel.IsExistingMatchingCard(c48063985.thfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectTarget(tp,c48063985.tgfilter,tp,LOCATION_REMOVED,0,2,2,nil) - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,2,0,0) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c48063985.thop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) - if g:GetCount()>0 then - Duel.SendtoGrave(g,REASON_EFFECT+REASON_RETURN) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local sg=Duel.SelectMatchingCard(tp,c48063985.thfilter,tp,LOCATION_DECK,0,1,1,nil) - if sg:GetCount()>0 then - Duel.SendtoHand(sg,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,sg) - end - end -end -function c48063985.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToExtraAsCost() end - Duel.SendtoDeck(e:GetHandler(),nil,0,REASON_COST) -end -function c48063985.filter1(c,e,tp) - return c:IsFaceup() and c:IsSetCard(0x10b5) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) - and Duel.IsExistingTarget(c48063985.filter2,tp,LOCATION_REMOVED,0,1,c,e,tp) -end -function c48063985.filter2(c,e,tp) - return c:IsFaceup() and c:IsSetCard(0x20b5) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c48063985.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c48063985.filter1,tp,LOCATION_REMOVED,0,1,nil,e,tp) end - Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g1=Duel.SelectTarget(tp,c48063985.filter1,tp,LOCATION_REMOVED,0,1,1,nil,e,tp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g2=Duel.SelectTarget(tp,c48063985.filter2,tp,LOCATION_REMOVED,0,1,1,g1:GetFirst(),e,tp) - g1:Merge(g2) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g1,2,0,0) -end -function c48063985.spop(e,tp,eg,ep,ev,re,r,rp) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ft<=0 then return end - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) - if g:GetCount()==0 then return end - if g:GetCount()<=ft then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENCE) - else - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=g:Select(tp,ft,ft,nil) - Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP_DEFENCE) - g:Sub(sg) - Duel.SendtoGrave(g,REASON_EFFECT) - end -end diff --git a/script/c4807253.lua b/script/c4807253.lua deleted file mode 100644 index 8df2fc2ef2..0000000000 --- a/script/c4807253.lua +++ /dev/null @@ -1,78 +0,0 @@ ---Emフレイム・イーター -function c4807253.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_CHAINING) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(aux.damcon1) - e1:SetTarget(c4807253.sptg) - e1:SetOperation(c4807253.spop) - c:RegisterEffect(e1) - --damage - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_DAMAGE) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_SUMMON_SUCCESS) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetTarget(c4807253.damtg) - e2:SetOperation(c4807253.damop) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e3) -end -function c4807253.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c4807253.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then - local cid=Duel.GetChainInfo(ev,CHAININFO_CHAIN_ID) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CHANGE_DAMAGE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetTargetRange(1,0) - e1:SetLabel(cid) - e1:SetValue(c4807253.damval) - e1:SetReset(RESET_CHAIN) - Duel.RegisterEffect(e1,tp) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetReset(RESET_EVENT+0x47e0000) - e2:SetValue(LOCATION_REMOVED) - c:RegisterEffect(e2,true) - end - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e3:SetTargetRange(1,0) - e3:SetTarget(c4807253.splimit) - e3:SetReset(RESET_PHASE+RESET_END) - Duel.RegisterEffect(e3,tp) -end -function c4807253.damval(e,re,val,r,rp,rc) - local cc=Duel.GetCurrentChain() - if cc==0 or bit.band(r,REASON_EFFECT)==0 then return val end - local cid=Duel.GetChainInfo(0,CHAININFO_CHAIN_ID) - if cid~=e:GetLabel() then return val end - return 0 -end -function c4807253.splimit(e,c,sump,sumtype,sumpos,targetp,se) - return not c:IsSetCard(0xc6) -end -function c4807253.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,PLAYER_ALL,500) -end -function c4807253.damop(e,tp,eg,ep,ev,re,r,rp) - Duel.Damage(1-tp,500,REASON_EFFECT) - Duel.Damage(tp,500,REASON_EFFECT) -end diff --git a/script/c48086335.lua b/script/c48086335.lua deleted file mode 100644 index 51f81ccdd0..0000000000 --- a/script/c48086335.lua +++ /dev/null @@ -1,63 +0,0 @@ ---アーティファクト-フェイルノート -function c48086335.initial_effect(c) - --set - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_MONSTER_SSET) - e1:SetValue(TYPE_SPELL) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(48086335,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetCondition(c48086335.spcon) - e2:SetTarget(c48086335.sptg) - e2:SetOperation(c48086335.spop) - c:RegisterEffect(e2) - --sset - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(48086335,1)) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_CARD_TARGET) - e3:SetCondition(c48086335.setcon) - e3:SetTarget(c48086335.settg) - e3:SetOperation(c48086335.setop) - c:RegisterEffect(e3) -end -function c48086335.spcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsPreviousLocation(LOCATION_SZONE) and c:IsPreviousPosition(POS_FACEDOWN) - and c:IsReason(REASON_DESTROY) and Duel.GetTurnPlayer()~=tp -end -function c48086335.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c48086335.spop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP) - end -end -function c48086335.setcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp -end -function c48086335.filter(c) - return c:IsSetCard(0x97) and c:IsType(TYPE_MONSTER) and c:IsSSetable() -end -function c48086335.settg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c48086335.filter(chkc) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingTarget(c48086335.filter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) - Duel.SelectTarget(tp,c48086335.filter,tp,LOCATION_GRAVE,0,1,1,nil) -end -function c48086335.setop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsSSetable() then - Duel.SSet(tp,tc) - Duel.ConfirmCards(1-tp,tc) - end -end diff --git a/script/c48092532.lua b/script/c48092532.lua deleted file mode 100644 index f8c09633ec..0000000000 --- a/script/c48092532.lua +++ /dev/null @@ -1,47 +0,0 @@ ---異次元の生還者 -function c48092532.initial_effect(c) - --removed - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_REMOVE) - e1:SetCondition(c48092532.rmcon) - e1:SetOperation(c48092532.rmop) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(48092532,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_PHASE+PHASE_END) - e2:SetRange(LOCATION_REMOVED) - e2:SetCondition(c48092532.condition) - e2:SetTarget(c48092532.target) - e2:SetOperation(c48092532.operation) - c:RegisterEffect(e2) -end -function c48092532.rmcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsFaceup() and c:IsPreviousPosition(POS_FACEUP) - and c:IsPreviousLocation(LOCATION_ONFIELD) and c:GetPreviousControler()==tp -end -function c48092532.rmop(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():RegisterFlagEffect(48092532,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) -end -function c48092532.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetFlagEffect(48092532)~=0 -end -function c48092532.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():GetFlagEffect(48092533)==0 end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) - e:GetHandler():RegisterFlagEffect(48092533,RESET_PHASE+PHASE_END,0,1) -end -function c48092532.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then - Duel.SendtoGrave(e:GetHandler(),REASON_EFFECT) - return - end - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c48115277.lua b/script/c48115277.lua deleted file mode 100644 index 869ae246b8..0000000000 --- a/script/c48115277.lua +++ /dev/null @@ -1,67 +0,0 @@ ---ブロックマン -function c48115277.initial_effect(c) - --check - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EVENT_PHASE_START+PHASE_DRAW) - e1:SetCondition(c48115277.regcon) - e1:SetOperation(c48115277.regop) - c:RegisterEffect(e1) - --token - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(48115277,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCost(c48115277.spcost) - e2:SetTarget(c48115277.sptg) - e2:SetOperation(c48115277.spop) - c:RegisterEffect(e2) -end -function c48115277.regcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c48115277.regop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local ct=c:GetFlagEffectLabel(48115277) - if not ct then - c:RegisterFlagEffect(48115277,RESET_EVENT+0x1fe0000,0,1,0) - else - c:SetFlagEffectLabel(48115277,ct+1) - end -end -function c48115277.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - local ct=e:GetHandler():GetFlagEffectLabel(48115277) - if not ct then ct=0 end - e:SetLabel(ct) - Duel.Release(e:GetHandler(),REASON_COST) -end -function c48115277.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local ct=e:GetHandler():GetFlagEffectLabel(48115277) - if not ct then ct=0 end - return Duel.GetLocationCount(tp,LOCATION_MZONE)>ct-1 - and Duel.IsPlayerCanSpecialSummonMonster(tp,48115278,0,0x4011,1000,1500,4,RACE_ROCK,ATTRIBUTE_EARTH) - end - local ct=e:GetLabel() - Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,ct-1,0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,ct-1,0,0) -end -function c48115277.spop(e,tp,eg,ep,ev,re,r,rp) - local ct=e:GetLabel() - if Duel.GetLocationCount(tp,LOCATION_MZONE)>ct - and Duel.IsPlayerCanSpecialSummonMonster(tp,48115278,0,0x4011,1000,1500,4,RACE_ROCK,ATTRIBUTE_EARTH) then - for i=1,ct+1 do - local token=Duel.CreateToken(tp,48115278) - Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP_DEFENCE) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000) - token:RegisterEffect(e1,true) - end - Duel.SpecialSummonComplete() - end -end diff --git a/script/c48130397.lua b/script/c48130397.lua deleted file mode 100644 index d830e6804e..0000000000 --- a/script/c48130397.lua +++ /dev/null @@ -1,79 +0,0 @@ ---超融合 -function c48130397.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,0x1e0) - e1:SetCost(c48130397.cost) - e1:SetTarget(c48130397.target) - e1:SetOperation(c48130397.activate) - c:RegisterEffect(e1) -end -function c48130397.filter0(c,tp) - return (c:IsControler(tp) or c:IsFaceup()) and c:IsCanBeFusionMaterial() -end -function c48130397.filter1(c,e,tp) - return (c:IsControler(tp) or c:IsFaceup()) and c:IsCanBeFusionMaterial() and not c:IsImmuneToEffect(e) -end -function c48130397.filter2(c,e,tp,m,f,chkf) - return c:IsType(TYPE_FUSION) and (not f or f(c)) - and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf) -end -function c48130397.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) -end -function c48130397.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp - local mg1=Duel.GetMatchingGroup(c48130397.filter0,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp) - local res=Duel.IsExistingMatchingCard(c48130397.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf) - if not res then - local ce=Duel.GetChainMaterial(tp) - if ce~=nil then - local fgroup=ce:GetTarget() - local mg2=fgroup(ce,e,tp) - local mf=ce:GetValue() - res=Duel.IsExistingMatchingCard(c48130397.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,chkf) - end - end - return res - end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) - Duel.SetChainLimit(aux.FALSE) -end -function c48130397.activate(e,tp,eg,ep,ev,re,r,rp) - local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp - local mg1=Duel.GetMatchingGroup(c48130397.filter1,tp,LOCATION_MZONE,LOCATION_MZONE,nil,e,tp) - local sg1=Duel.GetMatchingGroup(c48130397.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf) - local mg2=nil - local sg2=nil - local ce=Duel.GetChainMaterial(tp) - if ce~=nil then - local fgroup=ce:GetTarget() - mg2=fgroup(ce,e,tp) - local mf=ce:GetValue() - sg2=Duel.GetMatchingGroup(c48130397.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,mf,chkf) - end - if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then - local sg=sg1:Clone() - if sg2 then sg:Merge(sg2) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local tg=sg:Select(tp,1,1,nil) - local tc=tg:GetFirst() - if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then - local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf) - tc:SetMaterial(mat1) - Duel.SendtoGrave(mat1,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION) - Duel.BreakEffect() - Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP) - else - local mat2=Duel.SelectFusionMaterial(tp,tc,mg2,nil,chkf) - local fop=ce:GetOperation() - fop(ce,e,tp,tc,mat2) - end - tc:CompleteProcedure() - end -end diff --git a/script/c48135190.lua b/script/c48135190.lua deleted file mode 100644 index 2b96083216..0000000000 --- a/script/c48135190.lua +++ /dev/null @@ -1,34 +0,0 @@ ---砂利ケーン -function c48135190.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_END_PHASE) - e1:SetTarget(c48135190.target) - e1:SetOperation(c48135190.activate) - c:RegisterEffect(e1) -end -function c48135190.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand() -end -function c48135190.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - if chk==0 then return Duel.IsExistingTarget(c48135190.filter,tp,0,LOCATION_ONFIELD,1,nil) - and Duel.IsExistingTarget(c48135190.filter,tp,LOCATION_ONFIELD,0,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g1=Duel.SelectTarget(tp,c48135190.filter,tp,LOCATION_ONFIELD,0,1,1,e:GetHandler()) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g2=Duel.SelectTarget(tp,c48135190.filter,tp,0,LOCATION_ONFIELD,1,1,nil) - g1:Merge(g2) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g1,2,0,0) -end -function c48135190.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local sg=g:Filter(Card.IsRelateToEffect,nil,e) - if sg:GetCount()>0 then - Duel.SendtoHand(sg,nil,REASON_EFFECT) - end -end diff --git a/script/c48144509.lua b/script/c48144509.lua deleted file mode 100644 index ef90c58e3c..0000000000 --- a/script/c48144509.lua +++ /dev/null @@ -1,113 +0,0 @@ ---オッドアイズ・フュージョン -function c48144509.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,48144509+EFFECT_COUNT_CODE_OATH) - e1:SetTarget(c48144509.target) - e1:SetOperation(c48144509.activate) - c:RegisterEffect(e1) -end -function c48144509.filter0(c) - return c:IsCanBeFusionMaterial() and c:IsAbleToGrave() -end -function c48144509.filter1(c,e) - return c:IsCanBeFusionMaterial() and c:IsAbleToGrave() and not c:IsImmuneToEffect(e) -end -function c48144509.exfilter0(c) - return c:IsSetCard(0x99) and c:IsCanBeFusionMaterial() and c:IsAbleToGrave() -end -function c48144509.exfilter1(c,e) - return c:IsSetCard(0x99) and c:IsCanBeFusionMaterial() and c:IsAbleToGrave() and not c:IsImmuneToEffect(e) -end -function c48144509.filter2(c,e,tp,m,f,chkf) - return c:IsType(TYPE_FUSION) and c:IsRace(RACE_DRAGON) and (not f or f(c)) - and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf) -end ---fusion monster filter ---check_fusion_material_48144509: for dragon-type monsters that >2 odd-eye is possible -function c48144509.filter3(c,e,tp,m,f,chkf) - local mg=m:Clone() - mg:RemoveCard(c) - if c:IsType(TYPE_FUSION) and c:IsRace(RACE_DRAGON) and (not f or f(c)) - and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) then - if c.check_fusion_material_48144509 then return c.check_fusion_material_48144509(mg,chkf) end - return c:CheckFusionMaterial(mg,nil,chkf) - else return false end -end -function c48144509.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp - local mg1=Duel.GetMatchingGroup(c48144509.filter0,tp,LOCATION_HAND+LOCATION_MZONE,0,nil) - if Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 and Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>1 then - local sg=Duel.GetMatchingGroup(c48144509.exfilter0,tp,LOCATION_EXTRA,0,nil) - mg1:Merge(sg) - end - local res=Duel.IsExistingMatchingCard(c48144509.filter3,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf) - if not res then - local ce=Duel.GetChainMaterial(tp) - if ce~=nil then - local fgroup=ce:GetTarget() - local mg2=fgroup(ce,e,tp) - local mf=ce:GetValue() - res=Duel.IsExistingMatchingCard(c48144509.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,chkf) - end - end - return res - end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function c48144509.activate(e,tp,eg,ep,ev,re,r,rp) - local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp - local mg1=Duel.GetMatchingGroup(c48144509.filter1,tp,LOCATION_HAND+LOCATION_MZONE,0,nil,e) - if Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 and Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>1 then - local sg=Duel.GetMatchingGroup(c48144509.exfilter1,tp,LOCATION_EXTRA,0,nil,e) - mg1:Merge(sg) - end - local sg1=Duel.GetMatchingGroup(c48144509.filter3,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf) - local mg2=nil - local sg2=nil - local ce=Duel.GetChainMaterial(tp) - if ce~=nil then - local fgroup=ce:GetTarget() - mg2=fgroup(ce,e,tp) - local mf=ce:GetValue() - sg2=Duel.GetMatchingGroup(c48144509.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,mf,chkf) - end - if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then - local sg=sg1:Clone() - if sg2 then sg:Merge(sg2) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local tg=sg:Select(tp,1,1,nil) - local tc=tg:GetFirst() - mg1:RemoveCard(tc) - if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then - local mat1=nil - if tc.select_fusion_material_48144509 then - mat1=tc.select_fusion_material_48144509(tp,mg1,chkf) - else - mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf) - end - tc:SetMaterial(mat1) - Duel.SendtoGrave(mat1,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION) - Duel.BreakEffect() - Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP) - else - local mat2=Duel.SelectFusionMaterial(tp,tc,mg2,nil,chkf) - local fop=ce:GetOperation() - fop(ce,e,tp,tc,mat2) - end - tc:CompleteProcedure() - else - local cg1=Duel.GetFieldGroup(tp,LOCATION_HAND+LOCATION_MZONE,0) - local cg2=Duel.GetFieldGroup(tp,LOCATION_EXTRA,0) - if cg1:GetCount()>1 and cg2:IsExists(Card.IsFacedown,1,nil) - and Duel.IsPlayerCanSpecialSummon(tp) and not Duel.IsPlayerAffectedByEffect(tp,27581098) then - Duel.ConfirmCards(1-tp,cg1) - Duel.ConfirmCards(1-tp,cg2) - Duel.ShuffleHand(tp) - end - end -end diff --git a/script/c48148828.lua b/script/c48148828.lua deleted file mode 100644 index a9e7cf2483..0000000000 --- a/script/c48148828.lua +++ /dev/null @@ -1,23 +0,0 @@ ---異次元の狂獣 -function c48148828.initial_effect(c) - --remove - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(48148828,0)) - e1:SetCategory(CATEGORY_REMOVE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_BATTLED) - e1:SetTarget(c48148828.target) - e1:SetOperation(c48148828.operation) - c:RegisterEffect(e1) -end -function c48148828.target(e,tp,eg,ep,ev,re,r,rp,chk) - local bc=e:GetHandler():GetBattleTarget() - if chk==0 then return bc and bc:IsRelateToBattle() and bc:IsStatus(STATUS_BATTLE_DESTROYED) end - Duel.SetOperationInfo(0,CATEGORY_REMOVE,bc,1,0,0) -end -function c48148828.operation(e,tp,eg,ep,ev,re,r,rp) - local bc=e:GetHandler():GetBattleTarget() - if bc:IsRelateToBattle() then - Duel.Remove(bc,POS_FACEUP,REASON_EFFECT) - end -end diff --git a/script/c48156348.lua b/script/c48156348.lua deleted file mode 100644 index a662d8d0d0..0000000000 --- a/script/c48156348.lua +++ /dev/null @@ -1,118 +0,0 @@ ---剣闘獣ガイザレス -function c48156348.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcCodeFun(c,41470137,aux.FilterBoolFunction(Card.IsSetCard,0x19),1,true,true) - --spsummon condition - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(c48156348.splimit) - c:RegisterEffect(e1) - --special summon rule - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_SPSUMMON_PROC) - e2:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e2:SetRange(LOCATION_EXTRA) - e2:SetCondition(c48156348.sprcon) - e2:SetOperation(c48156348.sprop) - c:RegisterEffect(e2) - --destroy - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(48156348,0)) - e3:SetCategory(CATEGORY_DESTROY) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - e3:SetTarget(c48156348.destg) - e3:SetOperation(c48156348.desop) - c:RegisterEffect(e3) - --special summon - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(48156348,1)) - e4:SetCategory(CATEGORY_SPECIAL_SUMMON) - e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e4:SetCode(EVENT_PHASE+PHASE_BATTLE) - e4:SetRange(LOCATION_MZONE) - e4:SetCondition(c48156348.spcon) - e4:SetCost(c48156348.spcost) - e4:SetTarget(c48156348.sptg) - e4:SetOperation(c48156348.spop) - c:RegisterEffect(e4) -end -function c48156348.splimit(e,se,sp,st) - return e:GetHandler():GetLocation()~=LOCATION_EXTRA -end -function c48156348.spfilter1(c,tp) - return c:IsCode(41470137) and c:IsAbleToDeckOrExtraAsCost() and c:IsCanBeFusionMaterial(true) - and Duel.IsExistingMatchingCard(c48156348.spfilter2,tp,LOCATION_MZONE,0,1,c) -end -function c48156348.spfilter2(c) - return c:IsSetCard(0x19) and c:IsCanBeFusionMaterial() and c:IsAbleToDeckOrExtraAsCost() -end -function c48156348.sprcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.GetLocationCount(tp,LOCATION_MZONE)>-2 - and Duel.IsExistingMatchingCard(c48156348.spfilter1,tp,LOCATION_ONFIELD,0,1,nil,tp) -end -function c48156348.sprop(e,tp,eg,ep,ev,re,r,rp,c) - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(48156348,2)) - local g1=Duel.SelectMatchingCard(tp,c48156348.spfilter1,tp,LOCATION_ONFIELD,0,1,1,nil,tp) - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(48156348,3)) - local g2=Duel.SelectMatchingCard(tp,c48156348.spfilter2,tp,LOCATION_MZONE,0,1,1,g1:GetFirst()) - g1:Merge(g2) - local tc=g1:GetFirst() - while tc do - if not tc:IsFaceup() then Duel.ConfirmCards(1-tp,tc) end - tc=g1:GetNext() - end - Duel.SendtoDeck(g1,nil,2,REASON_COST) -end -function c48156348.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsDestructable() end - if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,2,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c48156348.desop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local tg=g:Filter(Card.IsRelateToEffect,nil,e) - if tg:GetCount()>0 then - Duel.Destroy(tg,REASON_EFFECT) - end -end -function c48156348.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetBattledGroupCount()>0 -end -function c48156348.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToExtraAsCost() end - Duel.SendtoDeck(c,nil,0,REASON_COST) -end -function c48156348.filter(c,e,tp) - return not c:IsCode(41470137) and c:IsSetCard(0x19) and c:IsCanBeSpecialSummoned(e,120,tp,false,false) -end -function c48156348.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c48156348.filter,tp,LOCATION_DECK,0,2,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_DECK) -end -function c48156348.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 then return end - local g=Duel.GetMatchingGroup(c48156348.filter,tp,LOCATION_DECK,0,nil,e,tp) - if g:GetCount()>=2 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=g:Select(tp,2,2,nil) - local tc=sg:GetFirst() - Duel.SpecialSummonStep(tc,120,tp,tp,false,false,POS_FACEUP) - tc:RegisterFlagEffect(tc:GetOriginalCode(),RESET_EVENT+0x1ff0000,0,0) - tc=sg:GetNext() - Duel.SpecialSummonStep(tc,120,tp,tp,false,false,POS_FACEUP) - tc:RegisterFlagEffect(tc:GetOriginalCode(),RESET_EVENT+0x1ff0000,0,0) - Duel.SpecialSummonComplete() - end -end diff --git a/script/c48179391.lua b/script/c48179391.lua deleted file mode 100644 index e294f9d279..0000000000 --- a/script/c48179391.lua +++ /dev/null @@ -1,81 +0,0 @@ ---オレイカルコスの結界 -function c48179391.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c48179391.actcost) - e1:SetTarget(c48179391.acttg) - e1:SetOperation(c48179391.actop) - c:RegisterEffect(e1) - --spsummon limit - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetRange(LOCATION_SZONE) - e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetTargetRange(1,0) - e2:SetTarget(c48179391.sumlimit) - c:RegisterEffect(e2) - -- - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetRange(LOCATION_SZONE) - e3:SetCode(EFFECT_UPDATE_ATTACK) - e3:SetTargetRange(LOCATION_MZONE,0) - e3:SetValue(500) - c:RegisterEffect(e3) - -- - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e4:SetRange(LOCATION_SZONE) - e4:SetCode(EFFECT_INDESTRUCTABLE_COUNT) - e4:SetCountLimit(1) - e4:SetValue(c48179391.valcon) - c:RegisterEffect(e4) - --atk limit - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_FIELD) - e5:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET) - e5:SetRange(LOCATION_FZONE) - e5:SetTargetRange(0,LOCATION_MZONE) - e5:SetCondition(c48179391.atkcon) - e5:SetValue(c48179391.atlimit) - c:RegisterEffect(e5) -end -function c48179391.actcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetFlagEffect(tp,48179391)==0 end - Duel.RegisterFlagEffect(tp,48179391,0,0,0) -end -function c48179391.desfilter(c) - return bit.band(c:GetSummonType(),SUMMON_TYPE_SPECIAL)~=0 and c:IsDestructable() -end -function c48179391.acttg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local g=Duel.GetMatchingGroup(c48179391.desfilter,tp,LOCATION_MZONE,0,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c48179391.actop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local g=Duel.GetMatchingGroup(c48179391.desfilter,tp,LOCATION_MZONE,0,nil) - if g:GetCount()>0 then - Duel.Destroy(g,REASON_EFFECT) - end -end -function c48179391.sumlimit(e,c,sump,sumtype,sumpos,targetp) - return c:IsLocation(LOCATION_EXTRA) -end -function c48179391.valcon(e,re,r,rp) - return bit.band(r,REASON_EFFECT)~=0 -end -function c48179391.atkcon(e) - return Duel.IsExistingMatchingCard(Card.IsPosition,e:GetHandlerPlayer(),LOCATION_MZONE,0,2,nil,POS_FACEUP_ATTACK) -end -function c48179391.atkfilter(c,atk) - return c:IsFaceup() and c:GetAttack()0 - and Duel.IsExistingTarget(c48206762.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c48206762.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c48206762.eqlimit(e,c) - return e:GetOwner()==c -end -function c48206762.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then - if Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)==0 then return end - Duel.Equip(tp,c,tc) - --Add Equip limit - local e1=Effect.CreateEffect(tc) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(c48206762.eqlimit) - c:RegisterEffect(e1) - end -end -function c48206762.rmop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=c:GetFirstCardTarget() - if c:IsReason(REASON_DESTROY) and tc and tc:IsLocation(LOCATION_MZONE) then - Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) - end -end diff --git a/script/c4820694.lua b/script/c4820694.lua deleted file mode 100644 index 219e41f654..0000000000 --- a/script/c4820694.lua +++ /dev/null @@ -1,83 +0,0 @@ ---セイクリッド・テンペスト -function c4820694.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --lp - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(4820694,0)) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_PHASE+PHASE_END) - e2:SetRange(LOCATION_SZONE) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCountLimit(1,4820694+EFFECT_COUNT_CODE_DUEL) - e2:SetCondition(c4820694.condition) - e2:SetTarget(c4820694.lptg) - e2:SetOperation(c4820694.lpop) - c:RegisterEffect(e2) - --material - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(4820694,1)) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_PHASE+PHASE_STANDBY) - e3:SetRange(LOCATION_SZONE) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetCountLimit(1) - e3:SetCondition(c4820694.condition) - e3:SetTarget(c4820694.mattg) - e3:SetOperation(c4820694.matop) - c:RegisterEffect(e3) -end -function c4820694.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c4820694.filter(c) - return c:IsFaceup() and c:IsSetCard(0x53) and c:IsType(TYPE_XYZ) and c:GetOverlayCount()>0 -end -function c4820694.lptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c4820694.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c4820694.filter,tp,LOCATION_MZONE,0,2,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c4820694.filter,tp,LOCATION_MZONE,0,2,2,nil) -end -function c4820694.lpop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local tc1=g:GetFirst() - local tc2=g:GetNext() - if tc1:IsRelateToEffect(e) and tc2:IsRelateToEffect(e) then - local og1=tc1:GetOverlayGroup() - local og2=tc2:GetOverlayGroup() - og1:Merge(og2) - if Duel.SendtoGrave(og1,REASON_EFFECT)0 then - Duel.Overlay(tc,g) - end -end diff --git a/script/c48210156.lua b/script/c48210156.lua deleted file mode 100644 index a9de6e12f6..0000000000 --- a/script/c48210156.lua +++ /dev/null @@ -1,76 +0,0 @@ ---DDナイト・ハウリング -function c48210156.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(48210156,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c48210156.sptg) - e1:SetOperation(c48210156.spop) - c:RegisterEffect(e1) -end -function c48210156.filter(c,e,tp) - return c:IsSetCard(0xaf) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c48210156.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c48210156.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c48210156.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c48210156.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c48210156.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)~=0 then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetValue(0) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_SET_DEFENCE_FINAL) - tc:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e3:SetCode(EVENT_DESTROYED) - e3:SetCondition(c48210156.damcon) - e3:SetOperation(c48210156.damop) - Duel.RegisterEffect(e3,tp) - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e4:SetCode(EVENT_DESTROY) - e4:SetLabelObject(e3) - e4:SetOperation(c48210156.checkop) - e4:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e4) - end - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetTargetRange(1,0) - e1:SetTarget(c48210156.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) - Duel.SpecialSummonComplete() -end -function c48210156.splimit(e,c) - return c:GetRace()~=RACE_FIEND -end -function c48210156.checkop(e,tp,eg,ep,ev,re,r,rp) - local e3=e:GetLabelObject() - e3:SetLabel(1) -end -function c48210156.damcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetLabel()==1 -end -function c48210156.damop(e,tp,eg,ep,ev,re,r,rp) - Duel.Damage(tp,1000,REASON_EFFECT) - e:SetLabel(0) - e:Reset() -end diff --git a/script/c48216773.lua b/script/c48216773.lua deleted file mode 100644 index ebafcd6ad9..0000000000 --- a/script/c48216773.lua +++ /dev/null @@ -1,26 +0,0 @@ ---強制退出装置 -function c48216773.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TODECK) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,0x1e0) - e1:SetTarget(c48216773.target) - e1:SetOperation(c48216773.activate) - c:RegisterEffect(e1) -end -function c48216773.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,LOCATION_MZONE,0,1,nil) - and Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,0,LOCATION_MZONE,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,2,PLAYER_ALL,LOCATION_MZONE) -end -function c48216773.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local dg1=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,LOCATION_MZONE,0,1,1,nil) - Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_TODECK) - local dg2=Duel.SelectMatchingCard(1-tp,Card.IsAbleToDeck,1-tp,LOCATION_MZONE,0,1,1,nil) - dg1:Merge(dg2) - Duel.HintSelection(dg1) - Duel.SendtoDeck(dg1,nil,2,REASON_EFFECT) -end diff --git a/script/c48229808.lua b/script/c48229808.lua deleted file mode 100644 index cc7cf8fe74..0000000000 --- a/script/c48229808.lua +++ /dev/null @@ -1,46 +0,0 @@ ---ホルスの黒炎竜 LV8 -function c48229808.initial_effect(c) - c:EnableReviveLimit() - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(aux.FALSE) - c:RegisterEffect(e1) - --Negate - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(48229808,0)) - e2:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_QUICK_O) - e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) - e2:SetCode(EVENT_CHAINING) - e2:SetRange(LOCATION_MZONE) - e2:SetCondition(c48229808.condition) - e2:SetTarget(c48229808.target) - e2:SetOperation(c48229808.operation) - c:RegisterEffect(e2) -end -c48229808.lvupcount=1 -c48229808.lvup={11224103} -c48229808.lvdncount=2 -c48229808.lvdn={75830094,11224103} -function c48229808.condition(e,tp,eg,ep,ev,re,r,rp) - return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and re:IsHasType(EFFECT_TYPE_ACTIVATE) - and re:IsActiveType(TYPE_SPELL) and Duel.IsChainNegatable(ev) -end -function c48229808.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) - end -end -function c48229808.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFacedown() or not c:IsRelateToEffect(e) then return end - Duel.NegateActivation(ev) - if re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(eg,REASON_EFFECT) - end -end diff --git a/script/c48252330.lua b/script/c48252330.lua deleted file mode 100644 index 4fd0b51b88..0000000000 --- a/script/c48252330.lua +++ /dev/null @@ -1,58 +0,0 @@ ---マドルチェ・バトラスク -function c48252330.initial_effect(c) - --to deck - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(48252330,0)) - e1:SetCategory(CATEGORY_TODECK) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCondition(c48252330.retcon) - e1:SetTarget(c48252330.rettg) - e1:SetOperation(c48252330.retop) - c:RegisterEffect(e1) - --search - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(48252330,1)) - e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_SUMMON_SUCCESS) - e2:SetCondition(c48252330.shcon) - e2:SetTarget(c48252330.shtg) - e2:SetOperation(c48252330.shop) - c:RegisterEffect(e2) -end -function c48252330.retcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsReason(REASON_DESTROY) and e:GetHandler():GetReasonPlayer()~=tp - and e:GetHandler():GetPreviousControler()==tp -end -function c48252330.rettg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0) -end -function c48252330.retop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_EFFECT) - end -end -function c48252330.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x71) -end -function c48252330.shcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c48252330.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,e:GetHandler()) -end -function c48252330.filter(c) - return c:IsType(TYPE_FIELD) and c:IsAbleToHand() -end -function c48252330.shtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c48252330.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c48252330.shop(e,tp,eg,ep,ev,re,r,rp) - if not Duel.IsExistingMatchingCard(c48252330.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,e:GetHandler()) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c48252330.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c48276469.lua b/script/c48276469.lua deleted file mode 100644 index e7aec0b4e7..0000000000 --- a/script/c48276469.lua +++ /dev/null @@ -1,29 +0,0 @@ ---連鎖炸薬 -function c48276469.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_DRAW_PHASE) - c:RegisterEffect(e1) - --damage - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetCode(EVENT_CHAINING) - e2:SetRange(LOCATION_SZONE) - e2:SetOperation(aux.chainreg) - c:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e3:SetCode(EVENT_CHAIN_SOLVED) - e3:SetRange(LOCATION_SZONE) - e3:SetOperation(c48276469.damop) - c:RegisterEffect(e3) -end -function c48276469.damop(e,tp,eg,ep,ev,re,r,rp) - local c=re:GetHandler() - if re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_TRAP) and e:GetHandler():GetFlagEffect(1)>0 then - Duel.Damage(rp,1000,REASON_EFFECT) - end -end diff --git a/script/c48333324.lua b/script/c48333324.lua deleted file mode 100644 index 68781e8848..0000000000 --- a/script/c48333324.lua +++ /dev/null @@ -1,79 +0,0 @@ ---RUM-ヌメロン・フォース -function c48333324.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c48333324.target) - e1:SetOperation(c48333324.activate) - c:RegisterEffect(e1) -end -function c48333324.filter1(c,e,tp) - local rk=c:GetRank() - return c:IsFaceup() and c:IsType(TYPE_XYZ) - and Duel.IsExistingMatchingCard(c48333324.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,c,rk+1,c:GetRace(),c:GetCode()) -end -function c48333324.filter2(c,e,tp,mc,rk,rc,code) - if c:GetOriginalCode()==6165656 and code~=48995978 then return false end - return c:GetRank()==rk and c:IsRace(rc) and c:IsSetCard(0x1048) and mc:IsCanBeXyzMaterial(c) - and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) -end -function c48333324.disfilter(c) - return (not c:IsDisabled() or c:IsType(TYPE_TRAPMONSTER)) and not (c:IsType(TYPE_NORMAL) and bit.band(c:GetOriginalType(),TYPE_NORMAL)) -end -function c48333324.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c48333324.filter1(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsExistingTarget(c48333324.filter1,tp,LOCATION_MZONE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - local g=Duel.SelectTarget(tp,c48333324.filter1,tp,LOCATION_MZONE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function c48333324.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<0 then return end - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsFacedown() or not tc:IsRelateToEffect(e) or tc:IsControler(1-tp) or tc:IsImmuneToEffect(e) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c48333324.filter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc,tc:GetRank()+1,tc:GetRace(),tc:GetCode()) - local sc=g:GetFirst() - if sc then - local mg=tc:GetOverlayGroup() - if mg:GetCount()~=0 then - Duel.Overlay(sc,mg) - end - sc:SetMaterial(Group.FromCards(tc)) - Duel.Overlay(sc,Group.FromCards(tc)) - Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP) - sc:CompleteProcedure() - local g1=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,sc) - g1:RemoveCard(c) - if g1:GetCount()>0 then - Duel.BreakEffect() - end - local ng=g1:Filter(c48333324.disfilter,nil) - local nc=ng:GetFirst() - while nc do - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000) - nc:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+0x1fe0000) - nc:RegisterEffect(e2) - if nc:IsType(TYPE_TRAPMONSTER) then - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_DISABLE_TRAPMONSTER) - e3:SetReset(RESET_EVENT+0x1fe0000) - nc:RegisterEffect(e3) - end - nc=ng:GetNext() - end - end -end diff --git a/script/c48343627.lua b/script/c48343627.lua deleted file mode 100644 index b4eb7149b3..0000000000 --- a/script/c48343627.lua +++ /dev/null @@ -1,30 +0,0 @@ ---グレイブ・スクワーマー -function c48343627.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(48343627,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetCondition(c48343627.condition) - e1:SetTarget(c48343627.target) - e1:SetOperation(c48343627.operation) - c:RegisterEffect(e1) -end -function c48343627.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) -end -function c48343627.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsDestructable() end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c48343627.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c48356796.lua b/script/c48356796.lua deleted file mode 100644 index 504ec858da..0000000000 --- a/script/c48356796.lua +++ /dev/null @@ -1,41 +0,0 @@ ---閃光の宝札 -function c48356796.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c48356796.accon) - c:RegisterEffect(e1) - --Effect Draw - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_DRAW_COUNT) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(1,0) - e2:SetValue(2) - e2:SetCondition(c48356796.drawcon) - c:RegisterEffect(e2) - --Effect Disable Field - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetCode(EFFECT_DISABLE_FIELD) - e3:SetRange(LOCATION_SZONE) - e3:SetTargetRange(LOCATION_SZONE,0) - e3:SetOperation(c48356796.disop) - c:RegisterEffect(e3) -end -function c48356796.accon(e,tp,eg,ep,ev,re,r,rp) - local c=Duel.GetLocationCount(tp,LOCATION_SZONE) - if e:GetHandler():IsFacedown() then return c>0 end - return c>1 -end -function c48356796.filter(c) - return c:IsCode(48356796) and c:IsFaceup() -end -function c48356796.drawcon(e) - return Duel.IsExistingMatchingCard(c48356796.filter,e:GetHandlerPlayer(),LOCATION_SZONE,0,1,e:GetHandler()) -end -function c48356796.disop(e,tp,eg,ep,ev,re,r,rp) - return Duel.SelectDisableField(tp,1,LOCATION_SZONE,0,0) -end diff --git a/script/c48357738.lua b/script/c48357738.lua deleted file mode 100644 index 97c975e578..0000000000 --- a/script/c48357738.lua +++ /dev/null @@ -1,34 +0,0 @@ ---暴君の暴飲暴食 -function c48357738.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c48357738.cost) - c:RegisterEffect(e1) - --spsummon limit - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetRange(LOCATION_SZONE) - e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetTargetRange(1,1) - e2:SetTarget(aux.TargetBoolFunction(Card.IsLevelAbove,6)) - c:RegisterEffect(e2) - --des - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e3:SetRange(LOCATION_SZONE) - e3:SetCode(EFFECT_SELF_DESTROY) - e3:SetCondition(c48357738.descon) - c:RegisterEffect(e3) -end -function c48357738.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,nil,1,nil) end - local rg=Duel.SelectReleaseGroup(tp,nil,1,1,nil) - Duel.Release(rg,REASON_COST) -end -function c48357738.descon(e) - return Duel.GetFieldGroupCount(e:GetHandlerPlayer(),LOCATION_HAND,0)>=3 -end diff --git a/script/c48370501.lua b/script/c48370501.lua deleted file mode 100644 index 660f3462da..0000000000 --- a/script/c48370501.lua +++ /dev/null @@ -1,36 +0,0 @@ ---ヴァイロン・シグマ -function c48370501.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_LIGHT),aux.NonTuner(Card.IsAttribute,ATTRIBUTE_LIGHT),1) - c:EnableReviveLimit() - --equip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(48370501,0)) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetCondition(c48370501.eqcon) - e1:SetTarget(c48370501.eqtg) - e1:SetOperation(c48370501.eqop) - c:RegisterEffect(e1) -end -function c48370501.eqcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)<=1 -end -function c48370501.filter(c,ec) - return c:IsType(TYPE_EQUIP) and c:CheckEquipTarget(ec) -end -function c48370501.eqtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingMatchingCard(c48370501.filter,tp,LOCATION_DECK,0,1,nil,e:GetHandler()) end - Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_DECK) -end -function c48370501.eqop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or c:IsFacedown() or not c:IsRelateToEffect(e) then return end - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(48370501,1)) - local g=Duel.SelectMatchingCard(tp,c48370501.filter,tp,LOCATION_DECK,0,1,1,nil,c) - if g:GetCount()>0 then - Duel.Equip(tp,g:GetFirst(),c) - end -end diff --git a/script/c48381268.lua b/script/c48381268.lua deleted file mode 100644 index 063cc22973..0000000000 --- a/script/c48381268.lua +++ /dev/null @@ -1,31 +0,0 @@ ---D・ボードン -function c48381268.initial_effect(c) - --atk - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetCode(EFFECT_DIRECT_ATTACK) - e1:SetCondition(c48381268.cona) - e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x26)) - c:RegisterEffect(e1) - --def - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetRange(LOCATION_MZONE) - e2:SetTargetRange(LOCATION_MZONE,0) - e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e2:SetCondition(c48381268.cond) - e2:SetTarget(c48381268.tgd) - e2:SetValue(1) - c:RegisterEffect(e2) -end -function c48381268.cona(e) - return e:GetHandler():IsAttackPos() -end -function c48381268.cond(e) - return e:GetHandler():IsDefencePos() -end -function c48381268.tgd(e,c) - return c:IsSetCard(0x26) and c~=e:GetHandler() -end diff --git a/script/c48411996.lua b/script/c48411996.lua deleted file mode 100644 index 0ff2008fdb..0000000000 --- a/script/c48411996.lua +++ /dev/null @@ -1,35 +0,0 @@ ---ジュラック・スタウリコ -function c48411996.initial_effect(c) - --token - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(48411996,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetTarget(c48411996.target) - e1:SetOperation(c48411996.operation) - c:RegisterEffect(e1) -end -function c48411996.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,2,tp,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,0) -end -function c48411996.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 then return end - if not Duel.IsPlayerCanSpecialSummonMonster(tp,48411997,0x22,0x4011,0,0,1,RACE_DINOSAUR,ATTRIBUTE_FIRE) then return end - for i=1,2 do - local token=Duel.CreateToken(tp,48411997) - Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP_DEFENCE) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UNRELEASABLE_SUM) - e1:SetValue(c48411996.sumlimit) - e1:SetReset(RESET_EVENT+0x1fe0000) - token:RegisterEffect(e1) - end - Duel.SpecialSummonComplete() -end -function c48411996.sumlimit(e,c) - return not c:IsSetCard(0x22) -end diff --git a/script/c48422921.lua b/script/c48422921.lua deleted file mode 100644 index fbb6645527..0000000000 --- a/script/c48422921.lua +++ /dev/null @@ -1,57 +0,0 @@ ---猪突猛進 -function c48422921.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCondition(c48422921.condition) - e1:SetTarget(c48422921.target) - e1:SetOperation(c48422921.operation) - c:RegisterEffect(e1) -end -function c48422921.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsAbleToEnterBP() or Duel.GetCurrentPhase()==PHASE_BATTLE -end -function c48422921.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,nil) - local val=0xff - local reg=g:GetFirst():GetFlagEffectLabel(48422921) - if reg then val=val-reg end - Duel.Hint(HINT_SELECTMSG,tp,562) - local att=Duel.AnnounceAttribute(tp,1,val) - e:SetLabel(att) -end -function c48422921.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - local att=e:GetLabel() - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_BATTLE_START) - e1:SetLabel(att) - e1:SetOwnerPlayer(tp) - e1:SetCondition(c48422921.descon) - e1:SetOperation(c48422921.desop) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1,true) - local reg=tc:GetFlagEffectLabel(48422921) - if reg then - reg=bit.bor(reg,att) - tc:SetFlagEffectLabel(48422921,reg) - else - tc:RegisterFlagEffect(48422921,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1,att) - end - end -end -function c48422921.descon(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetHandler():GetBattleTarget() - return tp==e:GetOwnerPlayer() and tc and tc:IsControler(1-tp) and tc:IsAttribute(e:GetLabel()) -end -function c48422921.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetHandler():GetBattleTarget() - Duel.Destroy(tc,REASON_EFFECT) -end diff --git a/script/c48424886.lua b/script/c48424886.lua deleted file mode 100644 index 58fcb7bca1..0000000000 --- a/script/c48424886.lua +++ /dev/null @@ -1,191 +0,0 @@ ---エルシャドール・エグリスタ -function c48424886.initial_effect(c) - c:EnableReviveLimit() - --fusion material - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_FUSION_MATERIAL) - e1:SetCondition(c48424886.fuscon) - e1:SetOperation(c48424886.fusop) - c:RegisterEffect(e1) - --cannot spsummon - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e2:SetCode(EFFECT_SPSUMMON_CONDITION) - e2:SetRange(LOCATION_EXTRA) - e2:SetValue(c48424886.splimit) - c:RegisterEffect(e2) - --disable spsummon - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(48424886,0)) - e3:SetCategory(CATEGORY_DISABLE_SUMMON+CATEGORY_DESTROY) - e3:SetType(EFFECT_TYPE_QUICK_O) - e3:SetRange(LOCATION_MZONE) - e3:SetCode(EVENT_SPSUMMON) - e3:SetCountLimit(1,48424886) - e3:SetCondition(c48424886.condition) - e3:SetTarget(c48424886.target) - e3:SetOperation(c48424886.operation) - c:RegisterEffect(e3) - --tohand - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(48424886,1)) - e4:SetCategory(CATEGORY_TOHAND) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e4:SetCode(EVENT_TO_GRAVE) - e4:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) - e4:SetTarget(c48424886.thtg) - e4:SetOperation(c48424886.thop) - c:RegisterEffect(e4) -end -function c48424886.ffilter1(c) - return c:IsSetCard(0x9d) -end -function c48424886.ffilter2(c) - return c:IsAttribute(ATTRIBUTE_FIRE) or c:IsHasEffect(4904633) -end -function c48424886.exfilter(c,g) - return c:IsFaceup() and c:IsCanBeFusionMaterial() and not g:IsContains(c) -end -function c48424886.fuscon(e,g,gc,chkf) - if g==nil then return true end - local tp=e:GetHandlerPlayer() - local fc=Duel.GetFieldCard(tp,LOCATION_SZONE,5) - local exg=Group.CreateGroup() - if fc and fc:IsHasEffect(81788994) and fc:IsCanRemoveCounter(tp,0x16,3,REASON_EFFECT) then - local sg=Duel.GetMatchingGroup(c48424886.exfilter,tp,0,LOCATION_MZONE,nil,g) - exg:Merge(sg) - end - if gc then return (c48424886.ffilter1(gc) and (g:IsExists(c48424886.ffilter2,1,gc) or exg:IsExists(c48424886.ffilter2,1,gc))) - or (c48424886.ffilter2(gc) and (g:IsExists(c48424886.ffilter1,1,gc) or exg:IsExists(c48424886.ffilter1,1,gc))) end - local g1=Group.CreateGroup() - local g2=Group.CreateGroup() - local g3=Group.CreateGroup() - local g4=Group.CreateGroup() - local tc=g:GetFirst() - while tc do - if c48424886.ffilter1(tc) then - g1:AddCard(tc) - if aux.FConditionCheckF(tc,chkf) then g3:AddCard(tc) end - end - if c48424886.ffilter2(tc) then - g2:AddCard(tc) - if aux.FConditionCheckF(tc,chkf) then g4:AddCard(tc) end - end - tc=g:GetNext() - end - local exg1=exg:Filter(c48424886.ffilter1,nil) - local exg2=exg:Filter(c48424886.ffilter2,nil) - if chkf~=PLAYER_NONE then - return (g3:IsExists(aux.FConditionFilterF2,1,nil,g2) - or g3:IsExists(aux.FConditionFilterF2,1,nil,exg2) - or g4:IsExists(aux.FConditionFilterF2,1,nil,g1) - or g4:IsExists(aux.FConditionFilterF2,1,nil,exg1)) - else - return (g1:IsExists(aux.FConditionFilterF2,1,nil,g2) - or g1:IsExists(aux.FConditionFilterF2,1,nil,exg2) - or g2:IsExists(aux.FConditionFilterF2,1,nil,exg1)) - end -end -function c48424886.fusop(e,tp,eg,ep,ev,re,r,rp,gc,chkf) - local fc=Duel.GetFieldCard(tp,LOCATION_SZONE,5) - local exg=Group.CreateGroup() - if fc and fc:IsHasEffect(81788994) and fc:IsCanRemoveCounter(tp,0x16,3,REASON_EFFECT) then - local sg=Duel.GetMatchingGroup(c48424886.exfilter,tp,0,LOCATION_MZONE,nil,eg) - exg:Merge(sg) - end - if gc then - local sg1=Group.CreateGroup() - local sg2=Group.CreateGroup() - if c48424886.ffilter1(gc) then - sg1:Merge(eg:Filter(c48424886.ffilter2,gc)) - sg2:Merge(exg:Filter(c48424886.ffilter2,gc)) - end - if c48424886.ffilter2(gc) then - sg1:Merge(eg:Filter(c48424886.ffilter1,gc)) - sg2:Merge(exg:Filter(c48424886.ffilter1,gc)) - end - local g1=nil - if sg1:GetCount()==0 or (sg2:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(81788994,0))) then - fc:RemoveCounter(tp,0x16,3,REASON_EFFECT) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL) - g1=sg2:Select(tp,1,1,nil) - else - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL) - g1=sg1:Select(tp,1,1,nil) - end - Duel.SetFusionMaterial(g1) - return - end - local sg=eg:Filter(aux.FConditionFilterF2c,nil,c48424886.ffilter1,c48424886.ffilter2) - local g1=nil - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL) - if chkf~=PLAYER_NONE then - g1=sg:FilterSelect(tp,aux.FConditionCheckF,1,1,nil,chkf) - else g1=sg:Select(tp,1,1,nil) end - local tc1=g1:GetFirst() - local sg1=Group.CreateGroup() - local sg2=Group.CreateGroup() - if c48424886.ffilter1(tc1) then - sg1:Merge(sg:Filter(c48424886.ffilter2,tc1)) - sg2:Merge(exg:Filter(c48424886.ffilter2,tc1)) - end - if c48424886.ffilter2(tc1) then - sg1:Merge(sg:Filter(c48424886.ffilter1,tc1)) - sg2:Merge(exg:Filter(c48424886.ffilter1,tc1)) - end - local g2=nil - if sg1:GetCount()==0 or (sg2:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(81788994,0))) then - fc:RemoveCounter(tp,0x16,3,REASON_EFFECT) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL) - g2=sg2:Select(tp,1,1,nil) - else - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL) - g2=sg1:Select(tp,1,1,nil) - end - g1:Merge(g2) - Duel.SetFusionMaterial(g1) -end -function c48424886.splimit(e,se,sp,st) - return bit.band(st,SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION -end -function c48424886.condition(e,tp,eg,ep,ev,re,r,rp) - return tp~=ep and Duel.GetCurrentChain()==0 -end -function c48424886.filter(c) - return c:IsSetCard(0x9d) -end -function c48424886.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c48424886.filter,tp,LOCATION_HAND,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_DISABLE_SUMMON,eg,eg:GetCount(),0,0) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,eg:GetCount(),0,0) -end -function c48424886.operation(e,tp,eg,ep,ev,re,r,rp,chk) - Duel.NegateSummon(eg) - Duel.Destroy(eg,REASON_EFFECT) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c48424886.filter,tp,LOCATION_HAND,0,1,1,nil) - if g:GetCount()>0 then - Duel.BreakEffect() - Duel.SendtoGrave(g,REASON_EFFECT) - end -end -function c48424886.thfilter(c) - return c:IsSetCard(0x9d) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand() -end -function c48424886.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c48424886.thfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c48424886.thfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c48424886.thfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c48424886.thop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end diff --git a/script/c48439321.lua b/script/c48439321.lua deleted file mode 100644 index 9432368485..0000000000 --- a/script/c48439321.lua +++ /dev/null @@ -1,36 +0,0 @@ ---マドルチェ・ワルツ -function c48439321.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --damage - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(48439321,0)) - e2:SetCategory(CATEGORY_DAMAGE) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetRange(LOCATION_SZONE) - e2:SetCode(EVENT_BATTLED) - e2:SetCondition(c48439321.damcon) - e2:SetTarget(c48439321.damtg) - e2:SetOperation(c48439321.damop) - c:RegisterEffect(e2) -end -function c48439321.check(c,tp) - return c and c:IsControler(tp) and c:IsSetCard(0x71) -end -function c48439321.damcon(e,tp,eg,ep,ev,re,r,rp) - return c48439321.check(Duel.GetAttacker(),tp) or c48439321.check(Duel.GetAttackTarget(),tp) -end -function c48439321.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(300) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,300) -end -function c48439321.damop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c48445393.lua b/script/c48445393.lua deleted file mode 100644 index 99e93b58e8..0000000000 --- a/script/c48445393.lua +++ /dev/null @@ -1,44 +0,0 @@ ---スクラップ・スコール -function c48445393.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_TOGRAVE+CATEGORY_DRAW) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c48445393.target) - e1:SetOperation(c48445393.activate) - c:RegisterEffect(e1) -end -function c48445393.desfilter(c) - return c:IsFaceup() and c:IsSetCard(0x24) and c:IsDestructable() -end -function c48445393.sfilter(c) - return c:IsSetCard(0x24) and c:IsType(TYPE_MONSTER) and c:IsAbleToGrave() -end -function c48445393.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c48445393.desfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c48445393.desfilter,tp,LOCATION_MZONE,0,1,nil) - and Duel.IsExistingMatchingCard(c48445393.sfilter,tp,LOCATION_DECK,0,1,nil) - and Duel.IsPlayerCanDraw(tp,2) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c48445393.desfilter,tp,LOCATION_MZONE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c48445393.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c48445393.sfilter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoGrave(g,REASON_EFFECT) - if not g:GetFirst():IsLocation(LOCATION_GRAVE) then return end - Duel.BreakEffect() - Duel.Draw(tp,1,REASON_EFFECT) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.BreakEffect() - Duel.Destroy(tc,REASON_EFFECT) - end - end -end diff --git a/script/c48447192.lua b/script/c48447192.lua deleted file mode 100644 index 968b483a72..0000000000 --- a/script/c48447192.lua +++ /dev/null @@ -1,93 +0,0 @@ ---剣の煌き -function c48447192.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c48447192.target) - e1:SetOperation(c48447192.operation) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetDescription(aux.Stringid(48447192,0)) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_BATTLE_DESTROYING) - e2:SetRange(LOCATION_SZONE) - e2:SetCondition(c48447192.descon) - e2:SetTarget(c48447192.destg) - e2:SetOperation(c48447192.desop) - c:RegisterEffect(e2) - --Equip limit - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_EQUIP_LIMIT) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e3:SetValue(c48447192.eqlimit) - c:RegisterEffect(e3) - --todeck - local e4=Effect.CreateEffect(c) - e4:SetCategory(CATEGORY_TODECK) - e4:SetDescription(aux.Stringid(48447192,1)) - e4:SetType(EFFECT_TYPE_IGNITION) - e4:SetRange(LOCATION_GRAVE) - e4:SetCost(c48447192.retcost) - e4:SetTarget(c48447192.rettg) - e4:SetOperation(c48447192.retop) - c:RegisterEffect(e4) -end -function c48447192.eqlimit(e,c) - return c:IsSetCard(0x100d) -end -function c48447192.filter(c) - return c:IsFaceup() and c:IsSetCard(0x100d) -end -function c48447192.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:GetLocation()==LOCATION_MZONE and c48447192.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c48447192.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c48447192.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c48447192.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,c,tc) - end -end -function c48447192.descon(e,tp,eg,ep,ev,re,r,rp) - local ec=e:GetHandler():GetEquipTarget() - return ec and eg:IsContains(ec) -end -function c48447192.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and chkc:IsDestructable() end - if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,0,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,0,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c48447192.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end -function c48447192.retcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,aux.TRUE,1,nil) end - local g=Duel.SelectReleaseGroup(tp,aux.TRUE,1,1,nil) - Duel.Release(g,REASON_COST) -end -function c48447192.rettg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToDeck() end - Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0) -end -function c48447192.retop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SendtoDeck(c,nil,0,REASON_EFFECT) - end -end diff --git a/script/c48453776.lua b/script/c48453776.lua deleted file mode 100644 index 6c8346ec5b..0000000000 --- a/script/c48453776.lua +++ /dev/null @@ -1,66 +0,0 @@ ---天魔神 ノーレラス -function c48453776.initial_effect(c) - c:EnableReviveLimit() - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(aux.FALSE) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_SPSUMMON_PROC) - e2:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e2:SetRange(LOCATION_HAND) - e2:SetCondition(c48453776.spcon) - e2:SetOperation(c48453776.spop) - c:RegisterEffect(e2) - --to grave - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(48453776,0)) - e3:SetCategory(CATEGORY_TOGRAVE+CATEGORY_DRAW) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_MZONE) - e3:SetCost(c48453776.sgcost) - e3:SetTarget(c48453776.sgtg) - e3:SetOperation(c48453776.sgop) - c:RegisterEffect(e3) -end -function c48453776.spfilter1(c) - return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_FAIRY) and c:IsAbleToRemoveAsCost() -end -function c48453776.spfilter2(c) - return c:IsAttribute(ATTRIBUTE_DARK) and c:IsRace(RACE_FIEND) and c:IsAbleToRemoveAsCost() -end -function c48453776.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c48453776.spfilter1,tp,LOCATION_GRAVE,0,1,nil) - and Duel.IsExistingMatchingCard(c48453776.spfilter2,tp,LOCATION_GRAVE,0,3,nil) -end -function c48453776.spop(e,tp,eg,ep,ev,re,r,rp,c) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g1=Duel.SelectMatchingCard(tp,c48453776.spfilter1,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g2=Duel.SelectMatchingCard(tp,c48453776.spfilter2,tp,LOCATION_GRAVE,0,3,3,nil) - g1:Merge(g2) - Duel.Remove(g1,POS_FACEUP,REASON_COST) -end -function c48453776.sgcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,1000) - else Duel.PayLPCost(tp,1000) end -end -function c48453776.sgtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end - local g=Duel.GetFieldGroup(tp,0xe,0xe) - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,g:GetCount(),0,0) - Duel.SetOperationInfo(0,CATEGORY_DRAW,0,0,tp,1) -end -function c48453776.sgop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetFieldGroup(tp,0xe,0xe) - Duel.SendtoGrave(g,REASON_EFFECT) - Duel.Draw(tp,1,REASON_EFFECT) -end diff --git a/script/c4849037.lua b/script/c4849037.lua deleted file mode 100644 index eefa60cc8f..0000000000 --- a/script/c4849037.lua +++ /dev/null @@ -1,4 +0,0 @@ ---ダンシング・ソルジャー -function c4849037.initial_effect(c) - c:EnableReviveLimit() -end diff --git a/script/c48497555.lua b/script/c48497555.lua deleted file mode 100644 index 375e91ce65..0000000000 --- a/script/c48497555.lua +++ /dev/null @@ -1,60 +0,0 @@ ---くず鉄の像 -function c48497555.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_CHAINING) - e1:SetCountLimit(1,48497555) - e1:SetCondition(c48497555.condition) - e1:SetTarget(c48497555.target) - e1:SetOperation(c48497555.activate) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e2:SetCountLimit(1,48497556) - e2:SetTarget(c48497555.sptg) - e2:SetOperation(c48497555.spop) - c:RegisterEffect(e2) -end -function c48497555.condition(e,tp,eg,ep,ev,re,r,rp) - local rc=re:GetHandler() - return rc:IsOnField() and rc:IsControler(1-tp) and re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and not re:IsHasType(EFFECT_TYPE_ACTIVATE) -end -function c48497555.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return re:GetHandler():IsDestructable() end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) -end -function c48497555.activate(e,tp,eg,ep,ev,re,r,rp) - if re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(eg,REASON_EFFECT) - end - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsCanTurnSet() then - Duel.BreakEffect() - c:CancelToGrave() - Duel.ChangePosition(c,POS_FACEDOWN) - Duel.RaiseEvent(c,EVENT_SSET,e,REASON_EFFECT,tp,tp,0) - end -end -function c48497555.spfilter(c,e,tp) - return c:IsSetCard(0x43) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c48497555.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c48497555.spfilter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c48497555.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c48497555.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c48497555.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENCE) - end -end diff --git a/script/c48505422.lua b/script/c48505422.lua deleted file mode 100644 index b1d6873234..0000000000 --- a/script/c48505422.lua +++ /dev/null @@ -1,50 +0,0 @@ ---真六武衆-シナイ -function c48505422.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c48505422.spcon) - c:RegisterEffect(e1) - --to hand - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(48505422,0)) - e2:SetCategory(CATEGORY_TOHAND) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_RELEASE) - e2:SetCondition(c48505422.rlcon) - e2:SetTarget(c48505422.rltg) - e2:SetOperation(c48505422.rlop) - c:RegisterEffect(e2) -end -function c48505422.spfilter(c) - return c:IsFaceup() and c:IsCode(74094021) -end -function c48505422.spcon(e,c) - if c==nil then return true end - return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and - Duel.IsExistingMatchingCard(c48505422.spfilter,c:GetControler(),LOCATION_ONFIELD,0,1,nil) -end -function c48505422.rlcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) -end -function c48505422.filter(c) - return c:IsSetCard(0x3d) and c:GetCode()~=48505422 and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() -end -function c48505422.rltg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c48505422.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c48505422.filter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c48505422.filter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c48505422.rlop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end diff --git a/script/c48539234.lua b/script/c48539234.lua deleted file mode 100644 index 15459b1dc5..0000000000 --- a/script/c48539234.lua +++ /dev/null @@ -1,25 +0,0 @@ ---便乗 -function c48539234.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_DRAW) - e1:SetCondition(c48539234.condition) - c:RegisterEffect(e1) - --recover - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetProperty(EFFECT_FLAG_DELAY) - e2:SetRange(LOCATION_SZONE) - e2:SetCode(EVENT_DRAW) - e2:SetCondition(c48539234.condition) - e2:SetOperation(c48539234.operation) - c:RegisterEffect(e2) -end -function c48539234.condition(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp and Duel.GetCurrentPhase()~=PHASE_DRAW -end -function c48539234.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_CARD,0,48539234) - Duel.Draw(tp,2,REASON_EFFECT) -end diff --git a/script/c48546368.lua b/script/c48546368.lua deleted file mode 100644 index 989df33e6a..0000000000 --- a/script/c48546368.lua +++ /dev/null @@ -1,78 +0,0 @@ ---崇光なる宣告者 -function c48546368.initial_effect(c) - c:EnableReviveLimit() - --spsummon condition - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(aux.ritlimit) - c:RegisterEffect(e1) - --negate - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(48546368,0)) - e2:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_CHAINING) - e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) - e2:SetRange(LOCATION_MZONE) - e2:SetCondition(c48546368.negcon) - e2:SetCost(c48546368.cost) - e2:SetTarget(c48546368.negtg) - e2:SetOperation(c48546368.negop) - c:RegisterEffect(e2) - --disable spsummon - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(48546368,1)) - e3:SetCategory(CATEGORY_DISABLE_SUMMON+CATEGORY_DESTROY) - e3:SetType(EFFECT_TYPE_QUICK_O) - e3:SetRange(LOCATION_MZONE) - e3:SetCode(EVENT_SPSUMMON) - e3:SetCondition(c48546368.discon) - e3:SetCost(c48546368.cost) - e3:SetTarget(c48546368.distg) - e3:SetOperation(c48546368.disop) - c:RegisterEffect(e3) -end -function c48546368.negcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if ep==tp or c:IsStatus(STATUS_BATTLE_DESTROYED) then return false end - return (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE)) and Duel.IsChainNegatable(ev) -end -function c48546368.cfilter(c) - return c:IsRace(RACE_FAIRY) and c:IsAbleToGraveAsCost() -end -function c48546368.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c48546368.cfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,c48546368.cfilter,1,1,REASON_COST) -end -function c48546368.negtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) - end -end -function c48546368.negop(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateActivation(ev) - if re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(eg,REASON_EFFECT) - end -end -function c48546368.filter(c,tp) - return c:GetSummonPlayer()==tp -end -function c48546368.discon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentChain()==0 and eg:IsExists(c48546368.filter,1,nil,1-tp) -end -function c48546368.distg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local g=eg:Filter(c48546368.filter,nil,1-tp) - Duel.SetOperationInfo(0,CATEGORY_DISABLE_SUMMON,g,g:GetCount(),0,0) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c48546368.disop(e,tp,eg,ep,ev,re,r,rp) - local g=eg:Filter(c48546368.filter,nil,1-tp) - Duel.NegateSummon(g) - Duel.Destroy(g,REASON_EFFECT) -end diff --git a/script/c48568432.lua b/script/c48568432.lua deleted file mode 100644 index 7e70267fbd..0000000000 --- a/script/c48568432.lua +++ /dev/null @@ -1,109 +0,0 @@ ---トライゴン -function c48568432.initial_effect(c) - --equip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(48568432,0)) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetTarget(c48568432.eqtg) - e1:SetOperation(c48568432.eqop) - c:RegisterEffect(e1) - --unequip - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(48568432,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_SZONE) - e2:SetCondition(c48568432.uncon) - e2:SetTarget(c48568432.sptg) - e2:SetOperation(c48568432.spop) - c:RegisterEffect(e2) - --destroy sub - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_EQUIP) - e3:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e3:SetCode(EFFECT_DESTROY_SUBSTITUTE) - e3:SetCondition(c48568432.uncon) - e3:SetValue(1) - c:RegisterEffect(e3) - --eqlimit - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetCode(EFFECT_EQUIP_LIMIT) - e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e4:SetValue(aux.TargetBoolFunction(Card.IsRace,RACE_MACHINE)) - c:RegisterEffect(e4) - --spsummon - local e5=Effect.CreateEffect(c) - e5:SetDescription(aux.Stringid(48568432,2)) - e5:SetCategory(CATEGORY_SPECIAL_SUMMON) - e5:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_FIELD) - e5:SetProperty(EFFECT_FLAG_CARD_TARGET) - e5:SetRange(LOCATION_SZONE) - e5:SetCode(EVENT_BATTLE_DESTROYING) - e5:SetCondition(c48568432.spcon2) - e5:SetTarget(c48568432.sptg2) - e5:SetOperation(c48568432.spop2) - c:RegisterEffect(e5) -end -function c48568432.uncon(e) - return e:GetHandler():IsStatus(STATUS_UNION) -end -function c48568432.filter(c) - return c:IsFaceup() and c:IsRace(RACE_MACHINE) and c:GetUnionCount()==0 -end -function c48568432.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c48568432.filter(chkc) end - if chk==0 then return e:GetHandler():GetFlagEffect(48568432)==0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingTarget(c48568432.filter,tp,LOCATION_MZONE,0,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local g=Duel.SelectTarget(tp,c48568432.filter,tp,LOCATION_MZONE,0,1,1,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0) - e:GetHandler():RegisterFlagEffect(48568432,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1) -end -function c48568432.eqop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if not c:IsRelateToEffect(e) or c:IsFacedown() then return end - if not tc:IsRelateToEffect(e) or not c48568432.filter(tc) then - Duel.SendtoGrave(c,REASON_EFFECT) - return - end - if not Duel.Equip(tp,c,tc,false) then return end - c:SetStatus(STATUS_UNION,true) -end -function c48568432.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():GetFlagEffect(48568432)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) - e:GetHandler():RegisterFlagEffect(48568432,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1) -end -function c48568432.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP_ATTACK) - end -end -function c48568432.spcon2(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsStatus(STATUS_UNION) and eg:GetFirst()==e:GetHandler():GetEquipTarget() -end -function c48568432.spfilter(c,e,tp) - return c:IsLevelBelow(4) and c:IsRace(RACE_MACHINE) and c:IsAttribute(ATTRIBUTE_LIGHT) - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c48568432.sptg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c48568432.spfilter(chkc,e,tp) end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c48568432.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,g:GetCount(),0,0) -end -function c48568432.spop2(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c4857085.lua b/script/c4857085.lua deleted file mode 100644 index 561748d748..0000000000 --- a/script/c4857085.lua +++ /dev/null @@ -1,62 +0,0 @@ ---Ωメガネ -function c4857085.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c4857085.target) - e1:SetOperation(c4857085.operation) - c:RegisterEffect(e1) - --Equip limit - local e2=Effect.CreateEffect(c) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_EQUIP_LIMIT) - e2:SetValue(1) - c:RegisterEffect(e2) - --confirm - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(4857085,0)) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_SZONE) - e3:SetCountLimit(1) - e3:SetCost(c4857085.cfcost) - e3:SetTarget(c4857085.cftg) - e3:SetOperation(c4857085.cfop) - c:RegisterEffect(e3) -end -function c4857085.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c4857085.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,e:GetHandler(),tc) - end -end -function c4857085.cfcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():GetEquipTarget():GetAttackAnnouncedCount()==0 end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_EQUIP) - e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_OATH) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e:GetHandler():RegisterEffect(e1) -end -function c4857085.cftg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0 end -end -function c4857085.cfop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND) - if g:GetCount()==0 then return end - local sg=g:RandomSelect(tp,1) - Duel.ConfirmCards(tp,sg) - Duel.ShuffleHand(1-tp) -end diff --git a/script/c48576971.lua b/script/c48576971.lua deleted file mode 100644 index 89472f6ec9..0000000000 --- a/script/c48576971.lua +++ /dev/null @@ -1,87 +0,0 @@ ---与奪の首飾り -function c48576971.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c48576971.target) - e1:SetOperation(c48576971.operation) - c:RegisterEffect(e1) - --Equip limit - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_EQUIP_LIMIT) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetValue(1) - c:RegisterEffect(e2) - --effect - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(48576971,0)) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e3:SetCode(EVENT_TO_GRAVE) - e3:SetCondition(c48576971.effcon) - e3:SetTarget(c48576971.efftg) - e3:SetOperation(c48576971.effop) - c:RegisterEffect(e3) -end -function c48576971.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c48576971.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,c,tc) - end -end -function c48576971.effcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local ec=c:GetPreviousEquipTarget() - return c:IsReason(REASON_LOST_TARGET) and ec:IsReason(REASON_BATTLE) and ec:GetPreviousControler()==tp -end -function c48576971.efftg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local opt=0 - local b1=Duel.IsPlayerCanDraw(tp,1) - local b2=Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0 - if b1 and b2 then - opt=Duel.SelectOption(tp,aux.Stringid(48576971,1),aux.Stringid(48576971,2)) - elseif b1 then - opt=Duel.SelectOption(tp,aux.Stringid(48576971,1)) - elseif b2 then - opt=Duel.SelectOption(tp,aux.Stringid(48576971,2))+1 - else opt=2 end - e:SetLabel(opt) - if opt==0 then - e:SetCategory(CATEGORY_DRAW) - e:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(1) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) - elseif opt==1 then - e:SetCategory(CATEGORY_HANDES) - e:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(1) - Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,1-tp,1) - else - e:SetCategory(0) - e:SetProperty(0) - end -end -function c48576971.effop(e,tp,eg,ep,ev,re,r,rp) - if e:GetLabel()==0 then - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) - elseif e:GetLabel()==1 then - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - local g=Duel.GetFieldGroup(p,LOCATION_HAND,0):RandomSelect(p,d) - Duel.SendtoGrave(g,REASON_EFFECT+REASON_DISCARD) - end -end diff --git a/script/c48579379.lua b/script/c48579379.lua deleted file mode 100644 index 28f688a370..0000000000 --- a/script/c48579379.lua +++ /dev/null @@ -1,28 +0,0 @@ ---究極完全態・グレート・モス -function c48579379.initial_effect(c) - c:EnableReviveLimit() - --special summon - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_SPSUMMON_PROC) - e2:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e2:SetRange(LOCATION_HAND) - e2:SetCondition(c48579379.spcon) - e2:SetOperation(c48579379.spop) - c:RegisterEffect(e2) -end -function c48579379.eqfilter(c) - return c:IsCode(40240595) and c:GetTurnCounter()>=6 -end -function c48579379.rfilter(c) - return c:IsCode(58192742) and c:GetEquipGroup():FilterCount(c48579379.eqfilter,nil)>0 -end -function c48579379.spcon(e,c) - if c==nil then return true end - return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-1 - and Duel.CheckReleaseGroup(c:GetControler(),c48579379.rfilter,1,nil) -end -function c48579379.spop(e,tp,eg,ep,ev,re,r,rp,c) - local g=Duel.SelectReleaseGroup(c:GetControler(),c48579379.rfilter,1,1,nil) - Duel.Release(g,REASON_COST) -end diff --git a/script/c48582558.lua b/script/c48582558.lua deleted file mode 100644 index 73e80b8288..0000000000 --- a/script/c48582558.lua +++ /dev/null @@ -1,43 +0,0 @@ ---バウンサー・ガード -function c48582558.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c48582558.target) - e1:SetOperation(c48582558.activate) - c:RegisterEffect(e1) -end -function c48582558.filter(c) - return c:IsFaceup() and c:IsSetCard(0x6b) -end -function c48582558.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c48582558.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c48582558.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c48582558.filter,tp,LOCATION_MZONE,0,1,1,nil) -end -function c48582558.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e1:SetValue(1) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) - e2:SetValue(aux.tgval) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e2) - local e3=Effect.CreateEffect(e:GetHandler()) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_MUST_BE_ATTACKED) - e3:SetValue(aux.imval1) - e3:SetReset(RESET_EVENT+0x1fc0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e3) - end -end diff --git a/script/c48588176.lua b/script/c48588176.lua deleted file mode 100644 index db489711a4..0000000000 --- a/script/c48588176.lua +++ /dev/null @@ -1,31 +0,0 @@ ---ダニポン -function c48588176.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(48588176,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetCondition(c48588176.condition) - e1:SetTarget(c48588176.target) - e1:SetOperation(c48588176.operation) - c:RegisterEffect(e1) -end -function c48588176.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) -end -function c48588176.filter(c) - return c:IsDefenceBelow(1000) and c:IsRace(RACE_INSECT) and c:IsAbleToHand() -end -function c48588176.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c48588176.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c48588176.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c48588176.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c4861205.lua b/script/c4861205.lua deleted file mode 100644 index c34f58c174..0000000000 --- a/script/c4861205.lua +++ /dev/null @@ -1,40 +0,0 @@ ---ミイラの呼び声 -function c4861205.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(4861205,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_SZONE) - e1:SetCondition(c4861205.condition) - e1:SetTarget(c4861205.target) - e1:SetOperation(c4861205.operation) - c:RegisterEffect(e1) -end -function c4861205.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 -end -function c4861205.filter(c,e,sp) - return c:IsRace(RACE_ZOMBIE) and c:IsCanBeSpecialSummoned(e,0,sp,false,false) -end -function c4861205.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c4861205.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c4861205.operation(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - if Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)>0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c4861205.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c48642904.lua b/script/c48642904.lua deleted file mode 100644 index 5bbaa02fc5..0000000000 --- a/script/c48642904.lua +++ /dev/null @@ -1,18 +0,0 @@ ---催眠術 -function c48642904.initial_effect(c) - --activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetOperation(c48642904.regop) - c:RegisterEffect(e1) -end -function c48642904.regop(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_CHANGE_POSITION) - e1:SetTargetRange(0,LOCATION_MZONE) - e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_IMMUNE) - e1:SetReset(RESET_PHASE+PHASE_END,2) - Duel.RegisterEffect(e1,tp) -end diff --git a/script/c48653261.lua b/script/c48653261.lua deleted file mode 100644 index 0fb606ce98..0000000000 --- a/script/c48653261.lua +++ /dev/null @@ -1,41 +0,0 @@ ---ガードペナルティ -function c48653261.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c48653261.target) - e1:SetOperation(c48653261.activate) - c:RegisterEffect(e1) -end -function c48653261.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) end - if chk==0 then return Duel.IsExistingTarget(nil,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - Duel.SelectTarget(tp,nil,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) -end -function c48653261.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_CHANGE_POS) - e1:SetCountLimit(1) - e1:SetCondition(c48653261.drcon) - e1:SetOperation(c48653261.drop) - e1:SetLabel(tc:GetRealFieldID()) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) - end -end -function c48653261.filter(c,fid) - return c:GetRealFieldID()==fid and c:IsDefencePos() and c:IsPreviousPosition(POS_ATTACK) -end -function c48653261.drcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c48653261.filter,1,nil,e:GetLabel()) -end -function c48653261.drop(e,tp,eg,ep,ev,re,r,rp) - Duel.Draw(tp,1,REASON_EFFECT) - e:Reset() -end diff --git a/script/c48659020.lua b/script/c48659020.lua deleted file mode 100644 index b894d8ca36..0000000000 --- a/script/c48659020.lua +++ /dev/null @@ -1,29 +0,0 @@ ---魂を呼ぶ者 -function c48659020.initial_effect(c) - --flip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(48659020,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) - e1:SetTarget(c48659020.target) - e1:SetOperation(c48659020.operation) - c:RegisterEffect(e1) -end -function c48659020.filter(c,e,tp) - return c:IsType(TYPE_NORMAL) and c:IsLevelBelow(3) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c48659020.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c48659020.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c48659020.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c48659020.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,g:GetCount(),0,0) -end -function c48659020.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c48675364.lua b/script/c48675364.lua deleted file mode 100644 index 5280376e5b..0000000000 --- a/script/c48675364.lua +++ /dev/null @@ -1,43 +0,0 @@ ---ジェネラルデーモン -function c48675364.initial_effect(c) - --search - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(48675364,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND) - e1:SetCost(c48675364.cost) - e1:SetTarget(c48675364.target) - e1:SetOperation(c48675364.operation) - c:RegisterEffect(e1) - --self destroy - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EFFECT_SELF_DESTROY) - e2:SetCondition(c48675364.descon) - c:RegisterEffect(e2) -end -function c48675364.cost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToGraveAsCost() and c:IsDiscardable() end - Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD) -end -function c48675364.filter(c) - return c:GetCode()==94585852 and c:IsAbleToHand() -end -function c48675364.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chk==0 then return Duel.IsExistingMatchingCard(c48675364.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c48675364.operation(e,tp,eg,ep,ev,re,r,rp,chk) - local tg=Duel.GetFirstMatchingCard(c48675364.filter,tp,LOCATION_DECK,0,nil) - if tg then - Duel.SendtoHand(tg,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tg) - end -end -function c48675364.descon(e) - return not Duel.IsEnvironment(94585852) -end diff --git a/script/c48680970.lua b/script/c48680970.lua deleted file mode 100644 index 70e01db457..0000000000 --- a/script/c48680970.lua +++ /dev/null @@ -1,133 +0,0 @@ ---永遠の魂 -function c48680970.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_END_PHASE) - e1:SetTarget(c48680970.target1) - e1:SetOperation(c48680970.operation) - c:RegisterEffect(e1) - --instant - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOHAND+CATEGORY_SEARCH) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetRange(LOCATION_SZONE) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetHintTiming(0,TIMING_END_PHASE) - e2:SetCost(c48680970.cost2) - e2:SetTarget(c48680970.target2) - e2:SetOperation(c48680970.operation) - c:RegisterEffect(e2) - --immune effect - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetCode(EFFECT_IMMUNE_EFFECT) - e3:SetRange(LOCATION_SZONE) - e3:SetTargetRange(LOCATION_MZONE,0) - e3:SetTarget(c48680970.etarget) - e3:SetValue(c48680970.efilter) - c:RegisterEffect(e3) - --destroy - local e4=Effect.CreateEffect(c) - e4:SetCategory(CATEGORY_DESTROY) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e4:SetCode(EVENT_LEAVE_FIELD) - e4:SetCondition(c48680970.descon) - e4:SetTarget(c48680970.destg) - e4:SetOperation(c48680970.desop) - c:RegisterEffect(e4) -end -function c48680970.filter1(c,e,tp) - return c:IsCode(46986414) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsHasEffect(EFFECT_NECRO_VALLEY) -end -function c48680970.filter2(c) - return (c:IsCode(2314238) or c:IsCode(63391643)) and c:IsAbleToHand() -end -function c48680970.target1(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local b1=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c48680970.filter1,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) - local b2=Duel.IsExistingMatchingCard(c48680970.filter2,tp,LOCATION_DECK,0,1,nil) - local op=2 - e:SetCategory(0) - if Duel.GetFlagEffect(tp,48680970)==0 and (b1 or b2) and Duel.SelectYesNo(tp,aux.Stringid(48680970,0)) then - if b1 and b2 then - op=Duel.SelectOption(tp,aux.Stringid(48680970,1),aux.Stringid(48680970,2)) - elseif b1 then - op=Duel.SelectOption(tp,aux.Stringid(48680970,1)) - else - op=Duel.SelectOption(tp,aux.Stringid(48680970,2))+1 - end - if op==0 then - e:SetCategory(CATEGORY_SPECIAL_SUMMON) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE) - else - e:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) - end - Duel.RegisterFlagEffect(tp,48680970,RESET_PHASE+PHASE_END,0,1) - end - e:SetLabel(op) -end -function c48680970.operation(e,tp,eg,ep,ev,re,r,rp) - if e:GetLabel()==2 or not e:GetHandler():IsRelateToEffect(e) then return end - if e:GetLabel()==0 then - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c48680970.filter1,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end - else - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c48680970.filter2,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end - end -end -function c48680970.cost2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetFlagEffect(tp,48680970)==0 end - Duel.RegisterFlagEffect(tp,48680970,RESET_PHASE+PHASE_END,0,1) -end -function c48680970.target2(e,tp,eg,ep,ev,re,r,rp,chk) - local b1=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c48680970.filter1,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) - local b2=Duel.IsExistingMatchingCard(c48680970.filter2,tp,LOCATION_DECK,0,1,nil) - if chk==0 then return b1 or b2 end - local op=0 - if b1 and b2 then - op=Duel.SelectOption(tp,aux.Stringid(48680970,1),aux.Stringid(48680970,2)) - elseif b1 then - op=Duel.SelectOption(tp,aux.Stringid(48680970,1)) - else - op=Duel.SelectOption(tp,aux.Stringid(48680970,2))+1 - end - e:SetLabel(op) - if op==0 then - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE) - else - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) - end -end -function c48680970.etarget(e,c) - return c:IsCode(46986414) -end -function c48680970.efilter(e,re) - return re:GetOwnerPlayer()~=e:GetHandlerPlayer() -end -function c48680970.descon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsPreviousPosition(POS_FACEUP) and not c:IsLocation(LOCATION_DECK) -end -function c48680970.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,LOCATION_MZONE,0,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c48680970.desop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,LOCATION_MZONE,0,nil) - Duel.Destroy(g,REASON_EFFECT) -end diff --git a/script/c48686504.lua b/script/c48686504.lua deleted file mode 100644 index 7d35dbcdac..0000000000 --- a/script/c48686504.lua +++ /dev/null @@ -1,38 +0,0 @@ ---ローンファイア・ブロッサム -function c48686504.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(48686504,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCost(c48686504.cost) - e1:SetTarget(c48686504.target) - e1:SetOperation(c48686504.operation) - c:RegisterEffect(e1) -end -function c48686504.costfilter(c) - return c:IsFaceup() and c:IsRace(RACE_PLANT) -end -function c48686504.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,c48686504.costfilter,1,nil) end - local g=Duel.SelectReleaseGroup(tp,c48686504.costfilter,1,1,nil) - Duel.Release(g,REASON_COST) -end -function c48686504.filter(c,e,tp) - return c:IsRace(RACE_PLANT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c48686504.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsExistingMatchingCard(c48686504.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,LOCATION_DECK) -end -function c48686504.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c48686504.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c4869446.lua b/script/c4869446.lua deleted file mode 100644 index d453fbd78c..0000000000 --- a/script/c4869446.lua +++ /dev/null @@ -1,15 +0,0 @@ ---砂漠の裁き -function c4869446.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - -- - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_CANNOT_CHANGE_POSITION) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - c:RegisterEffect(e2) -end diff --git a/script/c48700891.lua b/script/c48700891.lua deleted file mode 100644 index c728e7fcbd..0000000000 --- a/script/c48700891.lua +++ /dev/null @@ -1,29 +0,0 @@ ---記憶破壊者 -function c48700891.initial_effect(c) - --damage - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(48700891,0)) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_BATTLE_DAMAGE) - e1:SetCondition(c48700891.condition) - e1:SetTarget(c48700891.target) - e1:SetOperation(c48700891.operation) - c:RegisterEffect(e1) -end -function c48700891.condition(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp and Duel.GetAttackTarget()==nil -end -function c48700891.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local ct=Duel.GetFieldGroupCount(tp,0,LOCATION_EXTRA) - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(ct*100) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,ct*100) -end -function c48700891.operation(e,tp,eg,ep,ev,re,r,rp) - local ct=Duel.GetFieldGroupCount(tp,0,LOCATION_EXTRA) - local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) - Duel.Damage(p,ct*100,REASON_EFFECT) -end diff --git a/script/c48712195.lua b/script/c48712195.lua deleted file mode 100644 index 8c8c6701ea..0000000000 --- a/script/c48712195.lua +++ /dev/null @@ -1,42 +0,0 @@ ---カードトレーダー -function c48712195.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --draw - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(48712195,0)) - e2:SetCategory(CATEGORY_DRAW) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) - e2:SetRange(LOCATION_SZONE) - e2:SetCountLimit(1) - e2:SetCondition(c48712195.drcon) - e2:SetCost(c48712195.drcost) - e2:SetTarget(c48712195.drtg) - e2:SetOperation(c48712195.drop) - c:RegisterEffect(e2) -end -function c48712195.drcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c48712195.drcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToDeckAsCost,tp,LOCATION_HAND,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectMatchingCard(tp,Card.IsAbleToDeckAsCost,tp,LOCATION_HAND,0,1,1,nil) - Duel.SendtoDeck(g,nil,2,REASON_COST) -end -function c48712195.drtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(1) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c48712195.drop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end diff --git a/script/c48716139.lua b/script/c48716139.lua deleted file mode 100644 index 452db7a191..0000000000 --- a/script/c48716139.lua +++ /dev/null @@ -1,69 +0,0 @@ ---草薙剣 -function c48716139.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c48716139.target) - e1:SetOperation(c48716139.operation) - c:RegisterEffect(e1) - --Pierce - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_PIERCE) - c:RegisterEffect(e2) - --Equip limit - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_EQUIP_LIMIT) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e3:SetValue(c48716139.eqlimit) - c:RegisterEffect(e3) - --tohand - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e4:SetCategory(CATEGORY_TOHAND) - e4:SetDescription(aux.Stringid(48716139,0)) - e4:SetCode(EVENT_TO_GRAVE) - e4:SetCondition(c48716139.retcon) - e4:SetTarget(c48716139.rettg) - e4:SetOperation(c48716139.retop) - c:RegisterEffect(e4) -end -function c48716139.eqlimit(e,c) - return c:IsType(TYPE_SPIRIT) -end -function c48716139.filter(c) - return c:IsFaceup() and c:IsType(TYPE_SPIRIT) -end -function c48716139.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c48716139.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c48716139.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c48716139.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) -end -function c48716139.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,c,tc) - end -end -function c48716139.retcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local ec=c:GetPreviousEquipTarget() - return c:IsReason(REASON_LOST_TARGET) and (ec:GetLocation()==LOCATION_HAND) and ec:GetPreviousControler()==tp -end -function c48716139.rettg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0) -end -function c48716139.retop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SendtoHand(c,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,c) - end -end diff --git a/script/c48716527.lua b/script/c48716527.lua deleted file mode 100644 index a7bfa9e099..0000000000 --- a/script/c48716527.lua +++ /dev/null @@ -1,43 +0,0 @@ ---帝王の溶撃 -function c48716527.initial_effect(c) - --activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c48716527.actcon) - c:RegisterEffect(e1) - --disable - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e2:SetTarget(c48716527.distg) - e2:SetCode(EFFECT_DISABLE) - c:RegisterEffect(e2) - -- - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e3:SetCode(EVENT_PHASE+PHASE_END) - e3:SetCountLimit(1) - e3:SetRange(LOCATION_SZONE) - e3:SetCondition(c48716527.tgcon) - e3:SetOperation(c48716527.tgop) - c:RegisterEffect(e3) -end -function c48716527.cfilter(c) - return bit.band(c:GetSummonType(),SUMMON_TYPE_ADVANCE)==SUMMON_TYPE_ADVANCE -end -function c48716527.actcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetFieldGroupCount(tp,LOCATION_EXTRA,0)==0 - and Duel.IsExistingMatchingCard(c48716527.cfilter,tp,LOCATION_MZONE,0,1,nil) -end -function c48716527.distg(e,c) - return bit.band(c:GetSummonType(),SUMMON_TYPE_ADVANCE)~=SUMMON_TYPE_ADVANCE -end -function c48716527.tgcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp - and not Duel.IsExistingMatchingCard(c48716527.cfilter,tp,LOCATION_MZONE,0,1,nil) -end -function c48716527.tgop(e,tp,eg,ep,ev,re,r,rp) - Duel.SendtoGrave(e:GetHandler(),REASON_EFFECT) -end diff --git a/script/c48737767.lua b/script/c48737767.lua deleted file mode 100644 index 8871992c6e..0000000000 --- a/script/c48737767.lua +++ /dev/null @@ -1,33 +0,0 @@ ---切り盛り隊長 -function c48737767.initial_effect(c) - --todeck - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(48737767,0)) - e1:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW+CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c48737767.target) - e1:SetOperation(c48737767.operation) - c:RegisterEffect(e1) -end -function c48737767.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp,1) - and Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,LOCATION_HAND,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_HAND) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c48737767.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,LOCATION_HAND,0,1,1,nil) - if g:GetCount()>0 and Duel.SendtoDeck(g,nil,1,REASON_EFFECT)~=0 then - Duel.ShuffleDeck(tp) - Duel.BreakEffect() - if Duel.Draw(tp,1,REASON_EFFECT)==0 then return end - local dg=Duel.GetOperatedGroup() - local dc=dg:GetFirst() - if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and dc:IsCanBeSpecialSummoned(e,0,tp,false,false) - and Duel.SelectYesNo(tp,aux.Stringid(48737767,1)) then - Duel.SpecialSummon(dc,0,tp,tp,false,false,POS_FACEUP) - end - end -end diff --git a/script/c48739166.lua b/script/c48739166.lua deleted file mode 100644 index 14258f595b..0000000000 --- a/script/c48739166.lua +++ /dev/null @@ -1,58 +0,0 @@ ---No.101 S・H・Ark Knight -function c48739166.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,4,2) - c:EnableReviveLimit() - --material - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(48739166,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1,48739166) - e1:SetCost(c48739166.cost) - e1:SetTarget(c48739166.target) - e1:SetOperation(c48739166.operation) - c:RegisterEffect(e1) - --destroy replace - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EFFECT_DESTROY_REPLACE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetTarget(c48739166.reptg) - c:RegisterEffect(e2) -end -c48739166.xyz_number=101 -function c48739166.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,2,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,2,2,REASON_COST) -end -function c48739166.filter(c) - return c:IsPosition(POS_FACEUP_ATTACK) and c:IsAbleToChangeControler() - and not c:IsType(TYPE_TOKEN) and bit.band(c:GetSummonType(),SUMMON_TYPE_SPECIAL)==SUMMON_TYPE_SPECIAL -end -function c48739166.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c48739166.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c48739166.filter,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - Duel.SelectTarget(tp,c48739166.filter,tp,0,LOCATION_MZONE,1,1,nil) -end -function c48739166.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then - local og=tc:GetOverlayGroup() - if og:GetCount()>0 then - Duel.SendtoGrave(og,REASON_RULE) - end - Duel.Overlay(c,Group.FromCards(tc)) - end -end -function c48739166.reptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_EFFECT) end - if Duel.SelectYesNo(tp,aux.Stringid(48739166,1)) then - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_EFFECT) - return true - else return false end -end diff --git a/script/c48742406.lua b/script/c48742406.lua deleted file mode 100644 index 1973bcc50e..0000000000 --- a/script/c48742406.lua +++ /dev/null @@ -1,37 +0,0 @@ ---フェアリー・アーチャー -function c48742406.initial_effect(c) - --damage - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(48742406,0)) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1,48742406) - e1:SetCost(c48742406.damcost) - e1:SetTarget(c48742406.damtg) - e1:SetOperation(c48742406.damop) - c:RegisterEffect(e1) -end -function c48742406.damcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():GetAttackAnnouncedCount()==0 end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_OATH) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e:GetHandler():RegisterEffect(e1) -end -function c48742406.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,0) -end -function c48742406.dfilter(c) - return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_LIGHT) -end -function c48742406.damop(e,tp,eg,ep,ev,re,r,rp) - local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) - local ct=Duel.GetMatchingGroupCount(c48742406.dfilter,tp,LOCATION_MZONE,0,nil) - Duel.Damage(p,ct*400,REASON_EFFECT) -end diff --git a/script/c48768179.lua b/script/c48768179.lua deleted file mode 100644 index d8cd6f0ecc..0000000000 --- a/script/c48768179.lua +++ /dev/null @@ -1,52 +0,0 @@ ---黒蠍-強力のゴーグ -function c48768179.initial_effect(c) - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(48768179,0)) - e1:SetCategory(CATEGORY_TODECK+CATEGORY_TOGRAVE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_BATTLE_DAMAGE) - e1:SetCondition(c48768179.condition) - e1:SetTarget(c48768179.target) - e1:SetOperation(c48768179.operation) - c:RegisterEffect(e1) -end -function c48768179.condition(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp -end -function c48768179.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsAbleToDeck() end - if chk==0 then return Duel.IsPlayerCanDiscardDeck(1-tp,1) - or Duel.IsExistingTarget(Card.IsAbleToDeck,tp,0,LOCATION_MZONE,1,nil) end - local op=0 - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(48768179,0)) - if Duel.IsExistingTarget(Card.IsAbleToDeck,tp,0,LOCATION_MZONE,1,nil) - and Duel.IsPlayerCanDiscardDeck(1-tp,1) then - op=Duel.SelectOption(tp,aux.Stringid(48768179,1),aux.Stringid(48768179,2)) - elseif Duel.IsPlayerCanDiscardDeck(1-tp,1) then - Duel.SelectOption(tp,aux.Stringid(48768179,2)) - op=1 - else - Duel.SelectOption(tp,aux.Stringid(48768179,1)) - op=0 - end - e:SetLabel(op) - if op==0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectTarget(tp,Card.IsAbleToDeck,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0) - e:SetProperty(EFFECT_FLAG_CARD_TARGET) - else - Duel.SetOperationInfo(0,CATEGORY_DECKDES,0,0,1-tp,1) - e:SetProperty(0) - end -end -function c48768179.operation(e,tp,eg,ep,ev,re,r,rp) - if e:GetLabel()==0 then - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.SendtoDeck(tc,nil,0,REASON_EFFECT) - end - else - Duel.DiscardDeck(1-tp,1,REASON_EFFECT) - end -end diff --git a/script/c48783998.lua b/script/c48783998.lua deleted file mode 100644 index a8270966fc..0000000000 --- a/script/c48783998.lua +++ /dev/null @@ -1,48 +0,0 @@ ---コーリング・ノヴァ -function c48783998.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(48783998,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetCondition(c48783998.condition) - e1:SetTarget(c48783998.target) - e1:SetOperation(c48783998.operation) - c:RegisterEffect(e1) -end -function c48783998.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) -end -function c48783998.filter1(c,e,tp) - return c:IsAttackBelow(1500) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_FAIRY) - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c48783998.filter2(c,e,tp) - return (c:IsCode(18036057) or (c:IsAttackBelow(1500) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_FAIRY))) - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c48783998.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return false end - if not Duel.IsEnvironment(56433456) then - return Duel.IsExistingMatchingCard(c48783998.filter1,tp,LOCATION_DECK,0,1,nil,e,tp) - else - return Duel.IsExistingMatchingCard(c48783998.filter2,tp,LOCATION_DECK,0,1,nil,e,tp) - end - end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c48783998.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local g=nil - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - if not Duel.IsEnvironment(56433456) then - g=Duel.SelectMatchingCard(tp,c48783998.filter1,tp,LOCATION_DECK,0,1,1,nil,e,tp) - else - g=Duel.SelectMatchingCard(tp,c48783998.filter2,tp,LOCATION_DECK,0,1,1,nil,e,tp) - end - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c48800175.lua b/script/c48800175.lua deleted file mode 100644 index 2539b77629..0000000000 --- a/script/c48800175.lua +++ /dev/null @@ -1,31 +0,0 @@ ---ドラゴン・目覚めの旋律 -function c48800175.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c48800175.cost) - e1:SetTarget(c48800175.target) - e1:SetOperation(c48800175.activate) - c:RegisterEffect(e1) -end -function c48800175.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) -end -function c48800175.filter(c) - return c:IsRace(RACE_DRAGON) and c:IsAttackAbove(3000) and c:IsDefenceBelow(2500) and c:IsAbleToHand() -end -function c48800175.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c48800175.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c48800175.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c48800175.filter,tp,LOCATION_DECK,0,1,2,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c48868994.lua b/script/c48868994.lua deleted file mode 100644 index cdc8aa39fd..0000000000 --- a/script/c48868994.lua +++ /dev/null @@ -1,88 +0,0 @@ ---D・クリーナン -function c48868994.initial_effect(c) - --atk - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(48868994,0)) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c48868994.cona) - e1:SetCost(c48868994.costa) - e1:SetTarget(c48868994.tga) - e1:SetOperation(c48868994.opa) - c:RegisterEffect(e1) - --equip - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(48868994,1)) - e2:SetCategory(CATEGORY_EQUIP) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCondition(c48868994.cond) - e2:SetTarget(c48868994.tgd) - e2:SetOperation(c48868994.opd) - c:RegisterEffect(e2) -end -function c48868994.cona(e,tp,eg,ep,ev,re,r,rp) - return not e:GetHandler():IsDisabled() and e:GetHandler():IsAttackPos() -end -function c48868994.costa(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():GetEquipGroup():IsExists(Card.IsAbleToGraveAsCost,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=e:GetHandler():GetEquipGroup():FilterSelect(tp,Card.IsAbleToGraveAsCost,1,1,nil) - Duel.SendtoGrave(g,REASON_COST) -end -function c48868994.tga(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(500) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,500) -end -function c48868994.opa(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end -function c48868994.cond(e,tp,eg,ep,ev,re,r,rp) - return not e:GetHandler():IsDisabled() and e:GetHandler():IsDefencePos() - and not e:GetHandler():IsHasEffect(48868994) -end -function c48868994.filter(c) - return c:IsFaceup() and c:IsAttackPos() and c:IsAbleToChangeControler() -end -function c48868994.tgd(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c48868994.filter(chkc) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingTarget(c48868994.filter,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local g=Duel.SelectTarget(tp,c48868994.filter,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0) -end -function c48868994.eqlimit(e,c) - return e:GetOwner()==c and not c:IsDisabled() -end -function c48868994.opd(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsAttackPos() then - if c:IsFaceup() and c:IsRelateToEffect(e) then - if not Duel.Equip(tp,tc,c,false) then return end - --Add Equip limit - tc:CreateRelation(c,RESET_EVENT+0x1fe0000) - e:SetLabelObject(tc) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(c48868994.eqlimit) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(48868994) - e2:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e2) - else Duel.SendtoGrave(tc,REASON_EFFECT) end - end -end diff --git a/script/c48928529.lua b/script/c48928529.lua deleted file mode 100644 index 22075c8a21..0000000000 --- a/script/c48928529.lua +++ /dev/null @@ -1,40 +0,0 @@ ---No.83 ギャラクシー・クィーン -function c48928529.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,1,3) - c:EnableReviveLimit() - --attack up - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(48928529,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c48928529.cost) - e1:SetOperation(c48928529.operation) - c:RegisterEffect(e1) -end -c48928529.xyz_number=83 -function c48928529.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c48928529.operation(e,tp,eg,ep,ev,re,r,rp,chk) - local g=Duel.GetFieldGroup(tp,LOCATION_MZONE,0) - local tc=g:GetFirst() - while tc do - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,2) - e1:SetValue(1) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetCode(EFFECT_PIERCE) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,2) - tc:RegisterEffect(e2) - tc=g:GetNext() - end -end diff --git a/script/c48934760.lua b/script/c48934760.lua deleted file mode 100644 index 333bb920cf..0000000000 --- a/script/c48934760.lua +++ /dev/null @@ -1,40 +0,0 @@ ---終焉の地 -function c48934760.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(c48934760.condition) - e1:SetTarget(c48934760.target) - e1:SetOperation(c48934760.activate) - c:RegisterEffect(e1) -end -function c48934760.cfilter(c,tp) - return c:GetSummonPlayer()==1-tp -end -function c48934760.condition(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c48934760.cfilter,1,nil,tp) -end -function c48934760.filter(c,tp) - return c:IsType(TYPE_FIELD) and c:GetActivateEffect():IsActivatable(tp) -end -function c48934760.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c48934760.filter,tp,LOCATION_DECK,0,1,nil,tp) end -end -function c48934760.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(48934760,0)) - local tc=Duel.SelectMatchingCard(tp,c48934760.filter,tp,LOCATION_DECK,0,1,1,nil,tp):GetFirst() - if tc then - local fc=Duel.GetFieldCard(tp,LOCATION_SZONE,5) - if fc then - Duel.SendtoGrave(fc,REASON_RULE) - Duel.BreakEffect() - end - Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) - local te=tc:GetActivateEffect() - local tep=tc:GetControler() - local cost=te:GetCost() - if cost then cost(te,tep,eg,ep,ev,re,r,rp,1) end - Duel.RaiseEvent(tc,EVENT_CHAIN_SOLVED,tc:GetActivateEffect(),0,tp,tp,Duel.GetCurrentChain()) - end -end diff --git a/script/c48940337.lua b/script/c48940337.lua deleted file mode 100644 index 6eb76a7e9e..0000000000 --- a/script/c48940337.lua +++ /dev/null @@ -1,21 +0,0 @@ ---ランスフォリンクス -function c48940337.initial_effect(c) - --pendulum summon - aux.AddPendulumProcedure(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --pierce - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_PIERCE) - e2:SetRange(LOCATION_PZONE) - e2:SetTargetRange(LOCATION_MZONE,0) - e2:SetTarget(c48940337.target) - c:RegisterEffect(e2) -end -function c48940337.target(e,c) - return c:IsType(TYPE_NORMAL) -end diff --git a/script/c48948935.lua b/script/c48948935.lua deleted file mode 100644 index be9b5e3b0f..0000000000 --- a/script/c48948935.lua +++ /dev/null @@ -1,84 +0,0 @@ ---仮面魔獣デス・ガーディウス -function c48948935.initial_effect(c) - c:EnableReviveLimit() - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c48948935.spcon) - e1:SetOperation(c48948935.spop) - c:RegisterEffect(e1) - --equip - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(48948935,0)) - e2:SetCategory(CATEGORY_EQUIP) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetCondition(c48948935.eqcon) - e2:SetTarget(c48948935.eqtg) - e2:SetOperation(c48948935.eqop) - c:RegisterEffect(e2) -end -function c48948935.spfilter(c) - local code=c:GetCode() - return code==13676474 or code==86569121 -end -function c48948935.spcon(e,c) - if c==nil then return true end - local g=Duel.GetReleaseGroup(c:GetControler()) - return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-2 - and g:GetCount()>1 and g:IsExists(c48948935.spfilter,1,nil) -end -function c48948935.spop(e,tp,eg,ep,ev,re,r,rp,c) - local g=Duel.GetReleaseGroup(tp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) - local sg1=g:FilterSelect(tp,c48948935.spfilter,1,1,nil) - g:RemoveCard(sg1:GetFirst()) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) - local sg2=g:Select(tp,1,1,nil) - sg1:Merge(sg2) - Duel.Release(sg1,REASON_COST) -end -function c48948935.eqcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) -end -function c48948935.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() and chkc:IsControler(1-tp) end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_DECK) -end -function c48948935.filter(c) - return c:IsCode(22610082) and not c:IsHasEffect(EFFECT_FORBIDDEN) -end -function c48948935.eqop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end - local tc=Duel.GetFirstTarget() - if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local g=Duel.SelectMatchingCard(tp,c48948935.filter,tp,LOCATION_DECK,0,1,1,nil) - local eqc=g:GetFirst() - if not eqc or not Duel.Equip(tp,eqc,tc,true) then return end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(c48948935.eqlimit) - e1:SetLabelObject(tc) - eqc:RegisterEffect(e1) - local e2=Effect.CreateEffect(eqc) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_SET_CONTROL) - e2:SetValue(tp) - e2:SetReset(RESET_EVENT+0x1fe0000) - eqc:RegisterEffect(e2) - end -end -function c48948935.eqlimit(e,c) - return e:GetLabelObject()==c -end diff --git a/script/c48964966.lua b/script/c48964966.lua deleted file mode 100644 index 44552655c7..0000000000 --- a/script/c48964966.lua +++ /dev/null @@ -1,85 +0,0 @@ ---アテナ -function c48964966.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(48964966,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c48964966.cost) - e1:SetTarget(c48964966.target) - e1:SetOperation(c48964966.operation) - c:RegisterEffect(e1) - --damage - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(48964966,1)) - e2:SetCategory(CATEGORY_DAMAGE) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetCondition(c48964966.condition2) - e2:SetTarget(c48964966.target2) - e2:SetOperation(c48964966.operation2) - c:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(48964966,1)) - e3:SetCategory(CATEGORY_DAMAGE) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e3:SetRange(LOCATION_MZONE) - e3:SetCode(EVENT_SUMMON_SUCCESS) - e3:SetCondition(c48964966.condition2) - e3:SetTarget(c48964966.target2) - e3:SetOperation(c48964966.operation2) - c:RegisterEffect(e3) - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(48964966,1)) - e4:SetCategory(CATEGORY_DAMAGE) - e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e4:SetRange(LOCATION_MZONE) - e4:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - e4:SetCondition(c48964966.condition2) - e4:SetTarget(c48964966.target2) - e4:SetOperation(c48964966.operation2) - c:RegisterEffect(e4) -end -function c48964966.filter1(c) - return c:IsFaceup() and c:IsRace(RACE_FAIRY) and c:GetCode()~=48964966 and c:IsAbleToGraveAsCost() -end -function c48964966.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c48964966.filter1,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local cc=Duel.SelectMatchingCard(tp,c48964966.filter1,tp,LOCATION_MZONE,0,1,1,nil); - Duel.SendtoGrave(cc,REASON_COST) -end -function c48964966.filter2(c,e,sp) - return c:IsRace(RACE_FAIRY) and c:GetCode()~=48964966 and c:IsCanBeSpecialSummoned(e,0,sp,false,false) -end -function c48964966.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c48964966.filter2(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsExistingTarget(c48964966.filter2,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c48964966.filter2,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c48964966.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end -function c48964966.condition2(e,tp,eg,ep,ev,re,r,rp) - return not eg:IsContains(e:GetHandler()) and eg:FilterCount(Card.IsRace,nil,RACE_FAIRY)>0 -end -function c48964966.target2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(600) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,600) -end -function c48964966.operation2(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c4896788.lua b/script/c4896788.lua deleted file mode 100644 index 192eb4abb1..0000000000 --- a/script/c4896788.lua +++ /dev/null @@ -1,18 +0,0 @@ ---強欲な壺の精霊 -function c4896788.initial_effect(c) - --activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EVENT_CHAIN_SOLVING) - e1:SetCondition(c4896788.drcon) - e1:SetOperation(c4896788.drop) - c:RegisterEffect(e1) -end -function c4896788.drcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsAttackPos() - and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:GetHandler():IsCode(55144522) -end -function c4896788.drop(e,tp,eg,ep,ev,re,r,rp) - Duel.ChangeTargetParam(ev,3) -end diff --git a/script/c48976825.lua b/script/c48976825.lua deleted file mode 100644 index b079eebc4a..0000000000 --- a/script/c48976825.lua +++ /dev/null @@ -1,29 +0,0 @@ ---異次元からの埋葬 -function c48976825.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOGRAVE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c48976825.target) - e1:SetOperation(c48976825.activate) - c:RegisterEffect(e1) -end -function c48976825.filter(c) - return c:IsFaceup() and c:IsType(TYPE_MONSTER) -end -function c48976825.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_REMOVED) and c48976825.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c48976825.filter,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(48976825,0)) - local g=Duel.SelectTarget(tp,c48976825.filter,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,3,nil) - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,g:GetCount(),0,0) -end -function c48976825.activate(e,tp,eg,ep,ev,re,r,rp) - local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local sg=tg:Filter(Card.IsRelateToEffect,nil,e) - if sg:GetCount()>0 then - Duel.SendtoGrave(sg,REASON_EFFECT+REASON_RETURN) - end -end diff --git a/script/c48995978.lua b/script/c48995978.lua deleted file mode 100644 index 5dedf28a92..0000000000 --- a/script/c48995978.lua +++ /dev/null @@ -1,51 +0,0 @@ ---No.88 ギミック・パペット-デステニー・レオ -function c48995978.initial_effect(c) - c:EnableCounterPermit(0x302b) - --xyz summon - aux.AddXyzProcedure(c,nil,8,3) - c:EnableReviveLimit() - --counter - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_COUNTER) - e1:SetDescription(aux.Stringid(48995978,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c48995978.condition) - e1:SetCost(c48995978.cost) - e1:SetTarget(c48995978.target) - e1:SetOperation(c48995978.operation) - c:RegisterEffect(e1) -end -c48995978.xyz_number=88 -function c48995978.filter(c) - return c:GetSequence()<5 -end -function c48995978.condition(e,tp,eg,ep,ev,re,r,rp) - return not Duel.IsExistingMatchingCard(c48995978.filter,tp,LOCATION_SZONE,0,1,nil) -end -function c48995978.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetCurrentPhase()==PHASE_MAIN1 end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_BP) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) - e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function c48995978.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_EFFECT) - and e:GetHandler():IsCanAddCounter(0x302b,1) end - Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,1,0,0x302b) -end -function c48995978.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() and c:RemoveOverlayCard(tp,1,1,REASON_EFFECT) then - c:AddCounter(0x302b,1) - if c:GetCounter(0x302b)==3 then - local WIN_REASON_DESTINY_LEO=0x17 - Duel.Win(c:GetControler(),WIN_REASON_DESTINY_LEO) - end - end -end diff --git a/script/c48996569.lua b/script/c48996569.lua deleted file mode 100644 index ab0aa83139..0000000000 --- a/script/c48996569.lua +++ /dev/null @@ -1,124 +0,0 @@ ---E・HERO グラン・ネオス -function c48996569.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcCode2(c,89943723,80344569,false,false) - --spsummon condition - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(c48996569.splimit) - c:RegisterEffect(e1) - --special summon rule - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_SPSUMMON_PROC) - e2:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e2:SetRange(LOCATION_EXTRA) - e2:SetCondition(c48996569.spcon) - e2:SetOperation(c48996569.spop) - c:RegisterEffect(e2) - --return - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(48996569,0)) - e3:SetCategory(CATEGORY_TODECK) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e3:SetCode(EVENT_PHASE+PHASE_END) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1) - e3:SetCondition(c48996569.retcon1) - e3:SetTarget(c48996569.rettg) - e3:SetOperation(c48996569.retop) - c:RegisterEffect(e3) - local e4=e3:Clone() - e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e4:SetProperty(0) - e4:SetCondition(c48996569.retcon2) - c:RegisterEffect(e4) - --tohand - local e5=Effect.CreateEffect(c) - e5:SetDescription(aux.Stringid(48996569,1)) - e5:SetCategory(CATEGORY_TOHAND) - e5:SetType(EFFECT_TYPE_IGNITION) - e5:SetRange(LOCATION_MZONE) - e5:SetCountLimit(1) - e5:SetProperty(EFFECT_FLAG_CARD_TARGET) - e5:SetTarget(c48996569.thtg) - e5:SetOperation(c48996569.thop) - c:RegisterEffect(e5) -end -function c48996569.splimit(e,se,sp,st) - return not e:GetHandler():IsLocation(LOCATION_EXTRA) -end -function c48996569.spfilter(c,code) - return c:IsAbleToDeckOrExtraAsCost() and c:GetCode()==code -end -function c48996569.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ft<-1 then return false end - local g1=Duel.GetMatchingGroup(c48996569.spfilter,tp,LOCATION_ONFIELD,0,nil,89943723) - local g2=Duel.GetMatchingGroup(c48996569.spfilter,tp,LOCATION_ONFIELD,0,nil,80344569) - if g1:GetCount()==0 or g2:GetCount()==0 then return false end - if ft>0 then return true end - local f1=g1:FilterCount(Card.IsLocation,nil,LOCATION_MZONE) - local f2=g2:FilterCount(Card.IsLocation,nil,LOCATION_MZONE) - if ft==-1 then return f1>0 and f2>0 - else return f1>0 or f2>0 end -end -function c48996569.spop(e,tp,eg,ep,ev,re,r,rp,c) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - local g1=Duel.GetMatchingGroup(c48996569.spfilter,tp,LOCATION_ONFIELD,0,nil,89943723) - local g2=Duel.GetMatchingGroup(c48996569.spfilter,tp,LOCATION_ONFIELD,0,nil,80344569) - g1:Merge(g2) - local g=Group.CreateGroup() - local tc=nil - for i=1,2 do - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - if ft<=0 then - tc=g1:FilterSelect(tp,Card.IsLocation,1,1,nil,LOCATION_MZONE):GetFirst() - else - tc=g1:Select(tp,1,1,nil):GetFirst() - end - g:AddCard(tc) - g1:Remove(Card.IsCode,nil,tc:GetCode()) - ft=ft+1 - end - local cg=g:Filter(Card.IsFacedown,nil) - if cg:GetCount()>0 then - Duel.ConfirmCards(1-tp,cg) - end - Duel.SendtoDeck(g,nil,2,REASON_COST) -end -function c48996569.retcon1(e,tp,eg,ep,ev,re,r,rp,chk) - return not e:GetHandler():IsHasEffect(42015635) -end -function c48996569.retcon2(e,tp,eg,ep,ev,re,r,rp,chk) - return e:GetHandler():IsHasEffect(42015635) -end -function c48996569.rettg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToExtra() end - Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0) -end -function c48996569.retop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) or e:GetHandler():IsFacedown() then return end - Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_EFFECT) -end -function c48996569.filter(c) - return c:IsAbleToHand() -end -function c48996569.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c48996569.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c48996569.filter,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g=Duel.SelectTarget(tp,c48996569.filter,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c48996569.thop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - end -end diff --git a/script/c49003716.lua b/script/c49003716.lua deleted file mode 100644 index 55a76b5abe..0000000000 --- a/script/c49003716.lua +++ /dev/null @@ -1,24 +0,0 @@ ---BF-黒槍のブラスト -function c49003716.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c49003716.spcon) - c:RegisterEffect(e1) - --pierce - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_PIERCE) - c:RegisterEffect(e2) -end -function c49003716.filter(c) - return c:IsFaceup() and c:IsSetCard(0x33) and c:GetCode()~=49003716 -end -function c49003716.spcon(e,c) - if c==nil then return true end - return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and - Duel.IsExistingMatchingCard(c49003716.filter,c:GetControler(),LOCATION_MZONE,0,1,nil) -end diff --git a/script/c49010598.lua b/script/c49010598.lua deleted file mode 100644 index 57bfb3f101..0000000000 --- a/script/c49010598.lua +++ /dev/null @@ -1,33 +0,0 @@ ---天罰 -function c49010598.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_CHAINING) - e1:SetCondition(c49010598.condition) - e1:SetCost(c49010598.cost) - e1:SetTarget(c49010598.target) - e1:SetOperation(c49010598.activate) - c:RegisterEffect(e1) -end -function c49010598.condition(e,tp,eg,ep,ev,re,r,rp) - return re:IsActiveType(TYPE_MONSTER) and Duel.IsChainNegatable(ev) -end -function c49010598.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) -end -function c49010598.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) - end -end -function c49010598.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateActivation(ev) - if re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(eg,REASON_EFFECT) - end -end diff --git a/script/c49032236.lua b/script/c49032236.lua deleted file mode 100644 index 8a9458ee20..0000000000 --- a/script/c49032236.lua +++ /dev/null @@ -1,43 +0,0 @@ ---No.81 超弩級砲塔列車スペリオル・ドーラ -function c49032236.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,10,2) - c:EnableReviveLimit() - --immune - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(49032236,0)) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCost(c49032236.cost) - e1:SetTarget(c49032236.target) - e1:SetOperation(c49032236.operation) - c:RegisterEffect(e1) -end -c49032236.xyz_number=81 -function c49032236.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c49032236.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) -end -function c49032236.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_IMMUNE_EFFECT) - e1:SetValue(c49032236.efilter) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - tc:RegisterEffect(e1) - end -end -function c49032236.efilter(e,re) - return e:GetHandler()~=re:GetOwner() -end diff --git a/script/c49033797.lua b/script/c49033797.lua deleted file mode 100644 index f1af859237..0000000000 --- a/script/c49033797.lua +++ /dev/null @@ -1,65 +0,0 @@ ---禁断のトラペゾヘドロン -function c49033797.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,49033797+EFFECT_COUNT_CODE_OATH) - e1:SetTarget(c49033797.target) - e1:SetOperation(c49033797.activate) - c:RegisterEffect(e1) -end -function c49033797.cfilter(c,tpe) - return c:IsFaceup() and c:IsType(tpe) -end -function c49033797.filter(c,e,tp,cat) - return c:IsSetCard(cat) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c49033797.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return false end - local flag=0 - if Duel.IsExistingMatchingCard(c49033797.cfilter,tp,LOCATION_MZONE,0,1,nil,TYPE_FUSION) then flag=flag+1 end - if Duel.IsExistingMatchingCard(c49033797.cfilter,tp,LOCATION_MZONE,0,1,nil,TYPE_SYNCHRO) then flag=flag+2 end - if Duel.IsExistingMatchingCard(c49033797.cfilter,tp,LOCATION_MZONE,0,1,nil,TYPE_XYZ) then flag=flag+4 end - e:SetLabel(flag) - if flag==3 then - return Duel.IsExistingMatchingCard(c49033797.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp,0xb6) - elseif flag==6 then - return Duel.IsExistingMatchingCard(c49033797.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp,0xb7) - elseif flag==5 then - return Duel.IsExistingMatchingCard(c49033797.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp,0xb8) - else return false end - end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function c49033797.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local flag=e:GetLabel() - if flag==3 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c49033797.filter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,0xb6) - local sc=g:GetFirst() - if sc then - Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - c:CancelToGrave() - Duel.Overlay(sc,Group.FromCards(c)) - end - end - elseif flag==6 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c49033797.filter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,0xb7) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end - else - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c49033797.filter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,0xb8) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end - end -end diff --git a/script/c4904633.lua b/script/c4904633.lua deleted file mode 100644 index 45bc316e34..0000000000 --- a/script/c4904633.lua +++ /dev/null @@ -1,62 +0,0 @@ ---影依の原核 -function c4904633.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_END_PHASE) - e1:SetTarget(c4904633.target) - e1:SetOperation(c4904633.activate) - c:RegisterEffect(e1) - --tohand - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(4904633,0)) - e2:SetCategory(CATEGORY_TOHAND) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) - e2:SetCondition(c4904633.thcon) - e2:SetTarget(c4904633.thtg) - e2:SetOperation(c4904633.thop) - c:RegisterEffect(e2) -end -function c4904633.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsPlayerCanSpecialSummonMonster(tp,4904633,0,0x21,1450,1950,9,RACE_SPELLCASTER,ATTRIBUTE_DARK) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c4904633.activate(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) then return end - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 - or not Duel.IsPlayerCanSpecialSummonMonster(tp,4904633,0,0x21,1450,1950,9,RACE_SPELLCASTER,ATTRIBUTE_DARK) then return end - c:AddTrapMonsterAttribute(TYPE_EFFECT,ATTRIBUTE_DARK,RACE_SPELLCASTER,9,1450,1950) - Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP) - c:TrapMonsterBlock() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(4904633) - e1:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e1) -end -function c4904633.thcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsReason(REASON_EFFECT) -end -function c4904633.thfilter(c) - return c:IsSetCard(0x9d) and c:IsType(TYPE_SPELL+TYPE_TRAP) and not c:IsCode(4904633) and c:IsAbleToHand() -end -function c4904633.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c4904633.thfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c4904633.thfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c4904633.thfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c4904633.thop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end diff --git a/script/c4904812.lua b/script/c4904812.lua deleted file mode 100644 index b8647a7a45..0000000000 --- a/script/c4904812.lua +++ /dev/null @@ -1,37 +0,0 @@ ---ジェネクス・ウンディーネ -function c4904812.initial_effect(c) - --search - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(4904812,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetCost(c4904812.cost) - e1:SetTarget(c4904812.target) - e1:SetOperation(c4904812.operation) - c:RegisterEffect(e1) -end -function c4904812.cfilter(c) - return c:IsAttribute(ATTRIBUTE_WATER) and c:IsAbleToGraveAsCost() -end -function c4904812.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c4904812.cfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c4904812.cfilter,tp,LOCATION_DECK,0,1,1,nil) - Duel.SendtoGrave(g,REASON_COST) -end -function c4904812.filter(c) - return c:IsCode(68505803) and c:IsAbleToHand() -end -function c4904812.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c4904812.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c4904812.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local tc=Duel.GetFirstMatchingCard(c4904812.filter,tp,LOCATION_DECK,0,nil) - if tc then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end diff --git a/script/c4906301.lua b/script/c4906301.lua deleted file mode 100644 index 3dd468fe48..0000000000 --- a/script/c4906301.lua +++ /dev/null @@ -1,37 +0,0 @@ ---ネクロ・ガードナー -function c4906301.initial_effect(c) - --disable attack - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(4906301,0)) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_ATTACK) - e1:SetRange(LOCATION_GRAVE) - e1:SetCondition(c4906301.condition) - e1:SetCost(c4906301.cost) - e1:SetOperation(c4906301.operation) - c:RegisterEffect(e1) -end -function c4906301.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp and (Duel.IsAbleToEnterBP() or Duel.GetCurrentPhase()==PHASE_BATTLE) -end -function c4906301.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) -end -function c4906301.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetAttacker() then Duel.NegateAttack() - else - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetReset(RESET_PHASE+PHASE_END) - e1:SetCountLimit(1) - e1:SetOperation(c4906301.disop) - Duel.RegisterEffect(e1,tp) - end -end -function c4906301.disop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_CARD,0,4906301) - Duel.NegateAttack() -end diff --git a/script/c49064413.lua b/script/c49064413.lua deleted file mode 100644 index d54110e9c7..0000000000 --- a/script/c49064413.lua +++ /dev/null @@ -1,4 +0,0 @@ ---仮面魔獣マスクド・ヘルレイザー -function c49064413.initial_effect(c) - c:EnableReviveLimit() -end diff --git a/script/c49080532.lua b/script/c49080532.lua deleted file mode 100644 index e63058fbe6..0000000000 --- a/script/c49080532.lua +++ /dev/null @@ -1,44 +0,0 @@ ---インフェルニティ・ビートル -function c49080532.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(49080532,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c49080532.condition) - e1:SetCost(c49080532.cost) - e1:SetTarget(c49080532.target) - e1:SetOperation(c49080532.operation) - c:RegisterEffect(e1) -end -function c49080532.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)==0 -end -function c49080532.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end -function c49080532.filter(c,e,tp) - return c:GetCode()==49080532 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c49080532.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsExistingMatchingCard(c49080532.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c49080532.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)>0 then return end - local ct=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ct==0 then return end - local g=Duel.GetMatchingGroup(c49080532.filter,tp,LOCATION_DECK,0,nil,e,tp) - if g:GetCount()>0 then - local t1=g:GetFirst() - local t2=g:GetNext() - Duel.SpecialSummonStep(t1,0,tp,tp,false,false,POS_FACEUP) - if t2 and ct>1 and Duel.SelectYesNo(tp,aux.Stringid(49080532,1)) then - Duel.SpecialSummonStep(t2,0,tp,tp,false,false,POS_FACEUP) - end - Duel.SpecialSummonComplete() - end -end diff --git a/script/c49140998.lua b/script/c49140998.lua deleted file mode 100644 index a9b02c46c1..0000000000 --- a/script/c49140998.lua +++ /dev/null @@ -1,30 +0,0 @@ ---鳳凰神の羽根 -function c49140998.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TODECK) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c49140998.cost) - e1:SetTarget(c49140998.target) - e1:SetOperation(c49140998.activate) - c:RegisterEffect(e1) -end -function c49140998.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) -end -function c49140998.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:GetLocation()==LOCATION_GRAVE and chkc:GetControler()==tp and chkc:IsAbleToDeck() end - if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToDeck,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local sg=Duel.SelectTarget(tp,Card.IsAbleToDeck,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TODECK,sg,sg:GetCount(),0,0) -end -function c49140998.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.SendtoDeck(tc,nil,0,REASON_EFFECT) - end -end diff --git a/script/c49144107.lua b/script/c49144107.lua deleted file mode 100644 index fe94dc06a1..0000000000 --- a/script/c49144107.lua +++ /dev/null @@ -1,28 +0,0 @@ ---デス・ウサギ -function c49144107.initial_effect(c) - --flip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(49144107,0)) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP) - e1:SetTarget(c49144107.target) - e1:SetOperation(c49144107.operation) - c:RegisterEffect(e1) -end -function c49144107.filter(c) - local tpe=c:GetType() - return c:IsFaceup() and bit.band(tpe,TYPE_NORMAL)~=0 and bit.band(tpe,TYPE_TOKEN)==0 -end -function c49144107.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - local dam=Duel.GetMatchingGroupCount(c49144107.filter,tp,LOCATION_MZONE,0,nil)*1000 - Duel.SetTargetParam(dam) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,dam) -end -function c49144107.operation(e,tp,eg,ep,ev,re,r,rp) - local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) - local dam=Duel.GetMatchingGroupCount(c49144107.filter,tp,LOCATION_MZONE,0,nil)*1000 - Duel.Damage(p,dam,REASON_EFFECT) -end diff --git a/script/c49191560.lua b/script/c49191560.lua deleted file mode 100644 index 103aa545cf..0000000000 --- a/script/c49191560.lua +++ /dev/null @@ -1,39 +0,0 @@ ---魔導剣士 シャリオ -function c49191560.initial_effect(c) - --salvage - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(49191560,0)) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCost(c49191560.cost) - e1:SetTarget(c49191560.target) - e1:SetOperation(c49191560.operation) - c:RegisterEffect(e1) -end -function c49191560.cfilter(c) - return c:IsSetCard(0x106e) and c:IsType(TYPE_SPELL) and c:IsDiscardable() -end -function c49191560.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c49191560.cfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,c49191560.cfilter,1,1,REASON_DISCARD+REASON_COST) -end -function c49191560.filter(c) - return c:IsRace(RACE_SPELLCASTER) and c:IsAbleToHand() -end -function c49191560.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c49191560.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c49191560.filter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c49191560.filter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c49191560.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end diff --git a/script/c49195710.lua b/script/c49195710.lua deleted file mode 100644 index 794da35f72..0000000000 --- a/script/c49195710.lua +++ /dev/null @@ -1,57 +0,0 @@ ---CNo.65 裁断魔王ジャッジ・デビル -function c49195710.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_DARK),3,3) - c:EnableReviveLimit() - --addown - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(49195710,0)) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCost(c49195710.cost) - e1:SetTarget(c49195710.target) - e1:SetOperation(c49195710.operation) - c:RegisterEffect(e1) - --act limit - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EFFECT_CANNOT_TRIGGER) - e2:SetTargetRange(0,LOCATION_MZONE) - e2:SetCondition(c49195710.accon) - c:RegisterEffect(e2) -end -c49195710.xyz_number=65 -function c49195710.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c49195710.filter(c) - return c:IsFaceup() -end -function c49195710.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and c49195710.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c49195710.filter,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c49195710.filter,tp,0,LOCATION_MZONE,1,1,nil) -end -function c49195710.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(-1000) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_UPDATE_DEFENCE) - tc:RegisterEffect(e2) - end -end -function c49195710.accon(e) - return e:GetHandler():GetOverlayGroup():IsExists(Card.IsCode,1,nil,3790062) -end diff --git a/script/c49202331.lua b/script/c49202331.lua deleted file mode 100644 index 15ec8a2f69..0000000000 --- a/script/c49202331.lua +++ /dev/null @@ -1,59 +0,0 @@ ---CX 超巨大空中要塞バビロン -function c49202331.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,11,3) - c:EnableReviveLimit() - --damage - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(49202331,0)) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_BATTLE_DESTROYING) - e1:SetCondition(aux.bdgcon) - e1:SetTarget(c49202331.damtg) - e1:SetOperation(c49202331.damop) - c:RegisterEffect(e1) - --chain attack - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(49202331,1)) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_BATTLED) - e2:SetCountLimit(1) - e2:SetCondition(c49202331.atcon) - e2:SetCost(c49202331.atcost) - e2:SetOperation(c49202331.atop) - c:RegisterEffect(e2) -end -function c49202331.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local bc=e:GetHandler():GetBattleTarget() - Duel.SetTargetCard(bc) - local dam=bc:GetAttack()/2 - if dam<0 then dam=0 end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(dam) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,dam) -end -function c49202331.damop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) - local dam=tc:GetAttack()/2 - if dam<0 then dam=0 end - Duel.Damage(p,dam,REASON_EFFECT) - end -end -function c49202331.atcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local bc=c:GetBattleTarget() - return bc and bc:IsStatus(STATUS_BATTLE_DESTROYED) and c:IsChainAttackable() - and e:GetHandler():GetOverlayGroup():IsExists(Card.IsCode,1,nil,3814632) -end -function c49202331.atcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c49202331.atop(e,tp,eg,ep,ev,re,r,rp) - Duel.ChainAttack() -end diff --git a/script/c49204190.lua b/script/c49204190.lua deleted file mode 100644 index 8b217a6301..0000000000 --- a/script/c49204190.lua +++ /dev/null @@ -1,45 +0,0 @@ ---奇策 -function c49204190.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetCondition(c49204190.condition) - e1:SetCost(c49204190.cost) - e1:SetTarget(c49204190.target) - e1:SetOperation(c49204190.activate) - c:RegisterEffect(e1) -end -function c49204190.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end -function c49204190.cfilter(c) - return c:GetAttack()>0 and c:IsDiscardable() -end -function c49204190.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c49204190.cfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) - local g=Duel.SelectMatchingCard(tp,c49204190.cfilter,tp,LOCATION_HAND,0,1,1,nil) - e:SetLabel(g:GetFirst():GetAttack()) - Duel.SendtoGrave(g,REASON_COST+REASON_DISCARD) -end -function c49204190.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) -end -function c49204190.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(-e:GetLabel()) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - end -end diff --git a/script/c49217579.lua b/script/c49217579.lua deleted file mode 100644 index aed394ee0f..0000000000 --- a/script/c49217579.lua +++ /dev/null @@ -1,47 +0,0 @@ ---幻影の騎士-ミラージュ・ナイト- -function c49217579.initial_effect(c) - c:EnableReviveLimit() - --atkup - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_DAMAGE_CALCULATING) - e1:SetCondition(c49217579.atkcon) - e1:SetOperation(c49217579.atkop) - c:RegisterEffect(e1) - --remove - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_PHASE+PHASE_END) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCondition(c49217579.rmcon) - e2:SetOperation(c49217579.rmop) - c:RegisterEffect(e2) - --cannot special summon - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e3:SetCode(EFFECT_SPSUMMON_CONDITION) - e3:SetValue(aux.FALSE) - c:RegisterEffect(e3) -end -function c49217579.atkcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetBattleTarget()~=nil -end -function c49217579.atkop(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetHandler():GetBattleTarget() - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_PHASE+RESET_DAMAGE_CAL) - e1:SetValue(tc:GetBaseAttack()) - e:GetHandler():RegisterEffect(e1) -end -function c49217579.rmcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetBattledGroupCount()>0 -end -function c49217579.rmop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT) - end -end diff --git a/script/c49221191.lua b/script/c49221191.lua deleted file mode 100644 index 2e8baec9bd..0000000000 --- a/script/c49221191.lua +++ /dev/null @@ -1,66 +0,0 @@ ---CNo.32 海咬龍シャーク・ドレイク・バイス -function c49221191.initial_effect(c) - --xyz summon - c:EnableReviveLimit() - aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_WATER),4,4,c49221191.ovfilter,aux.Stringid(49221191,0)) - --atk/def - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(49221191,1)) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetRange(LOCATION_MZONE) - e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetCondition(c49221191.condition) - e1:SetCost(c49221191.cost) - e1:SetTarget(c49221191.target) - e1:SetOperation(c49221191.operation) - c:RegisterEffect(e1) -end -c49221191.xyz_number=32 -function c49221191.ovfilter(c) - return c:IsFaceup() and c:IsCode(65676461) -end -function c49221191.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetLP(tp)<=1000 and (Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()) -end -function c49221191.rfilter(c) - return c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost() -end -function c49221191.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) - and Duel.IsExistingMatchingCard(c49221191.rfilter,tp,LOCATION_GRAVE,0,1,nil) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c49221191.rfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c49221191.filter(c) - return c:IsFaceup() and (c:GetAttack()>0 or c:GetDefence()>0) -end -function c49221191.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c49221191.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c49221191.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c49221191.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) -end -function c49221191.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetValue(0) - if Duel.GetTurnPlayer()~=tp then - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,2) - else - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,1) - end - tc:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_SET_DEFENCE_FINAL) - tc:RegisterEffect(e2) - end -end diff --git a/script/c4923662.lua b/script/c4923662.lua deleted file mode 100644 index e73b4d56c7..0000000000 --- a/script/c4923662.lua +++ /dev/null @@ -1,37 +0,0 @@ ---カオス・バースト -function c4923662.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetCondition(c4923662.condition) - e1:SetCost(c4923662.cost) - e1:SetTarget(c4923662.target) - e1:SetOperation(c4923662.activate) - c:RegisterEffect(e1) -end -function c4923662.condition(e,tp,eg,ep,ev,re,r,rp) - return tp~=Duel.GetTurnPlayer() -end -function c4923662.cost(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chk==0 then return Duel.CheckReleaseGroup(tp,nil,1,nil) end - local g=Duel.SelectReleaseGroup(tp,nil,1,1,nil) - Duel.Release(g,REASON_COST) -end -function c4923662.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local tg=Duel.GetAttacker() - if chkc then return chkc==tg end - if chk==0 then return tg:IsOnField() and tg:IsDestructable() and tg:IsCanBeEffectTarget(e) end - Duel.SetTargetCard(tg) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,tg,1,0,0) -end -function c4923662.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsAttackable() and not tc:IsStatus(STATUS_ATTACK_CANCELED) - and Duel.Destroy(tc,REASON_EFFECT)~=0 then - Duel.BreakEffect() - Duel.Damage(1-tp,1000,REASON_EFFECT) - end -end diff --git a/script/c49249907.lua b/script/c49249907.lua deleted file mode 100644 index c07626684c..0000000000 --- a/script/c49249907.lua +++ /dev/null @@ -1,61 +0,0 @@ ---妖仙獣 凶旋嵐 -function c49249907.initial_effect(c) - --summon - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DELAY) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c49249907.sptg) - e1:SetOperation(c49249907.spop) - c:RegisterEffect(e1) - --return - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_TOHAND) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCode(EVENT_PHASE+PHASE_END) - e2:SetCondition(c49249907.retcon) - e2:SetTarget(c49249907.rettg) - e2:SetOperation(c49249907.retop) - c:RegisterEffect(e2) - if not c49249907.global_check then - c49249907.global_check=true - local ge1=Effect.CreateEffect(c) - ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - ge1:SetCode(EVENT_SPSUMMON_SUCCESS) - ge1:SetLabel(49249907) - ge1:SetOperation(aux.sumreg) - Duel.RegisterEffect(ge1,0) - end -end -function c49249907.filter(c,e,tp) - return c:IsSetCard(0xb3) and not c:IsCode(49249907) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c49249907.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c49249907.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c49249907.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c49249907.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end -function c49249907.retcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetFlagEffect(49249907)~=0 -end -function c49249907.rettg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0) -end -function c49249907.retop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SendtoHand(c,nil,REASON_EFFECT) - end -end diff --git a/script/c49251811.lua b/script/c49251811.lua deleted file mode 100644 index e32e056dc7..0000000000 --- a/script/c49251811.lua +++ /dev/null @@ -1,27 +0,0 @@ ---魔法探査の石版 -function c49251811.initial_effect(c) - --activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_CHAINING) - e1:SetCondition(c49251811.condition) - e1:SetOperation(c49251811.activate) - c:RegisterEffect(e1) -end -function c49251811.condition(e,tp,eg,ep,ev,re,r,rp) - return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:GetActiveType()==TYPE_CONTINUOUS+TYPE_SPELL -end -function c49251811.activate(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - --disable - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_DISABLE) - e1:SetTargetRange(LOCATION_SZONE,LOCATION_SZONE) - e1:SetTarget(c49251811.distarget) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function c49251811.distarget(e,c) - return c:GetType()==TYPE_CONTINUOUS+TYPE_SPELL -end diff --git a/script/c49267971.lua b/script/c49267971.lua deleted file mode 100644 index ab561e089f..0000000000 --- a/script/c49267971.lua +++ /dev/null @@ -1,41 +0,0 @@ ---死角からの一撃 -function c49267971.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetCondition(c49267971.condition) - e1:SetTarget(c49267971.target) - e1:SetOperation(c49267971.activate) - c:RegisterEffect(e1) -end -function c49267971.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end -function c49267971.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - if chk==0 then return Duel.IsExistingTarget(Card.IsPosition,tp,0,LOCATION_MZONE,1,nil,POS_FACEUP_DEFENCE) - and Duel.IsExistingTarget(Card.IsPosition,tp,LOCATION_MZONE,0,1,nil,POS_FACEUP_ATTACK) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPPO) - local g1=Duel.SelectTarget(tp,Card.IsPosition,tp,0,LOCATION_MZONE,1,1,nil,POS_FACEUP_DEFENCE) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SELF) - local g2=Duel.SelectTarget(tp,Card.IsPosition,tp,LOCATION_MZONE,0,1,1,nil,POS_FACEUP_ATTACK) - e:SetLabelObject(g1:GetFirst()) -end -function c49267971.activate(e,tp,eg,ep,ev,re,r,rp) - local tc1=e:GetLabelObject() - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local tc2=g:GetFirst() - if tc1==tc2 then tc2=g:GetNext() end - if tc1:IsRelateToEffect(e) and tc1:IsFaceup() and tc2:IsRelateToEffect(e) and tc2:IsFaceup() then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - e1:SetValue(tc1:GetDefence()) - tc2:RegisterEffect(e1) - end -end diff --git a/script/c4929256.lua b/script/c4929256.lua deleted file mode 100644 index 82fde86b8e..0000000000 --- a/script/c4929256.lua +++ /dev/null @@ -1,32 +0,0 @@ ---氷帝メビウス -function c4929256.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(4929256,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetCondition(c4929256.condition) - e1:SetTarget(c4929256.target) - e1:SetOperation(c4929256.operation) - c:RegisterEffect(e1) -end -function c4929256.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_ADVANCE -end -function c4929256.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable() -end -function c4929256.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and c4929256.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c4929256.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c4929256.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,2,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c4929256.operation(e,tp,eg,ep,ev,re,r,rp) - local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local sg=tg:Filter(Card.IsRelateToEffect,nil,e) - Duel.Destroy(sg,REASON_EFFECT) -end diff --git a/script/c49328340.lua b/script/c49328340.lua deleted file mode 100644 index 8fd3ec009f..0000000000 --- a/script/c49328340.lua +++ /dev/null @@ -1,47 +0,0 @@ ---螺旋槍殺 -function c49328340.initial_effect(c) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --pierce - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_PIERCE) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(LOCATION_MZONE,0) - e2:SetTarget(c49328340.pietg) - c:RegisterEffect(e2) - --shuffle - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(49328340,0)) - e3:SetCategory(CATEGORY_DRAW) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e3:SetCode(EVENT_BATTLE_DAMAGE) - e3:SetRange(LOCATION_SZONE) - e3:SetCondition(c49328340.condition) - e3:SetTarget(c49328340.target) - e3:SetOperation(c49328340.operation) - c:RegisterEffect(e3) -end -function c49328340.pietg(e,c) - local code=c:GetCode() - return code==6368038 or code==16589042 or code==66889139 -end -function c49328340.condition(e,tp,eg,ep,ev,re,r,rp) - local tc=eg:GetFirst() - local bc=tc:GetBattleTarget() - return tc:IsControler(tp) and bc and bc:IsDefencePos() and tc:IsCode(66889139) -end -function c49328340.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2) - Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1) -end -function c49328340.operation(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) or Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)==0 then return end - if Duel.Draw(tp,2,REASON_EFFECT)==2 then - Duel.BreakEffect() - Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT+REASON_DISCARD) - end -end diff --git a/script/c49352945.lua b/script/c49352945.lua deleted file mode 100644 index b41609140c..0000000000 --- a/script/c49352945.lua +++ /dev/null @@ -1,146 +0,0 @@ ---E・HERO ストーム・ネオス -function c49352945.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcCode3(c,89943723,17955766,54959865,false,false) - --spsummon condition - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(c49352945.splimit) - c:RegisterEffect(e1) - --special summon rule - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_SPSUMMON_PROC) - e2:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e2:SetRange(LOCATION_EXTRA) - e2:SetCondition(c49352945.spcon) - e2:SetOperation(c49352945.spop) - c:RegisterEffect(e2) - --return - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(49352945,0)) - e3:SetCategory(CATEGORY_TODECK) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e3:SetCode(EVENT_PHASE+PHASE_END) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1) - e3:SetCondition(c49352945.retcon1) - e3:SetTarget(c49352945.rettg) - e3:SetOperation(c49352945.retop) - c:RegisterEffect(e3) - local e4=e3:Clone() - e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e4:SetProperty(0) - e4:SetCondition(c49352945.retcon2) - c:RegisterEffect(e4) - --destroy - local e5=Effect.CreateEffect(c) - e5:SetDescription(aux.Stringid(49352945,1)) - e5:SetCategory(CATEGORY_DESTROY) - e5:SetType(EFFECT_TYPE_IGNITION) - e5:SetRange(LOCATION_MZONE) - e5:SetCountLimit(1) - e5:SetTarget(c49352945.destg) - e5:SetOperation(c49352945.desop) - c:RegisterEffect(e5) - --todeck - local e6=Effect.CreateEffect(c) - e6:SetDescription(aux.Stringid(49352945,2)) - e6:SetCategory(CATEGORY_TODECK) - e6:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e6:SetCode(49352945) - e6:SetTarget(c49352945.tdtg) - e6:SetOperation(c49352945.tdop) - c:RegisterEffect(e6) -end -function c49352945.splimit(e,se,sp,st) - return not e:GetHandler():IsLocation(LOCATION_EXTRA) -end -function c49352945.spfilter(c,code) - return c:IsAbleToDeckOrExtraAsCost() and c:GetCode()==code -end -function c49352945.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ft<-2 then return false end - local g1=Duel.GetMatchingGroup(c49352945.spfilter,tp,LOCATION_ONFIELD,0,nil,89943723) - local g2=Duel.GetMatchingGroup(c49352945.spfilter,tp,LOCATION_ONFIELD,0,nil,17955766) - local g3=Duel.GetMatchingGroup(c49352945.spfilter,tp,LOCATION_ONFIELD,0,nil,54959865) - if g1:GetCount()==0 or g2:GetCount()==0 or g3:GetCount()==0 then return false end - if ft>0 then return true end - local f1=g1:FilterCount(Card.IsLocation,nil,LOCATION_MZONE)>0 and 1 or 0 - local f2=g2:FilterCount(Card.IsLocation,nil,LOCATION_MZONE)>0 and 1 or 0 - local f3=g3:FilterCount(Card.IsLocation,nil,LOCATION_MZONE)>0 and 1 or 0 - if ft==-2 then return f1+f2+f3==3 - elseif ft==-1 then return f1+f2+f3>=2 - else return f1+f2+f3>=1 end -end -function c49352945.spop(e,tp,eg,ep,ev,re,r,rp,c) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - local g1=Duel.GetMatchingGroup(c49352945.spfilter,tp,LOCATION_ONFIELD,0,nil,89943723) - local g2=Duel.GetMatchingGroup(c49352945.spfilter,tp,LOCATION_ONFIELD,0,nil,17955766) - local g3=Duel.GetMatchingGroup(c49352945.spfilter,tp,LOCATION_ONFIELD,0,nil,54959865) - g1:Merge(g2) - g1:Merge(g3) - local g=Group.CreateGroup() - local tc=nil - for i=1,3 do - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - if ft<=0 then - tc=g1:FilterSelect(tp,Card.IsLocation,1,1,nil,LOCATION_MZONE):GetFirst() - else - tc=g1:Select(tp,1,1,nil):GetFirst() - end - g:AddCard(tc) - g1:Remove(Card.IsCode,nil,tc:GetCode()) - ft=ft+1 - end - local cg=g:Filter(Card.IsFacedown,nil) - if cg:GetCount()>0 then - Duel.ConfirmCards(1-tp,cg) - end - Duel.SendtoDeck(g,nil,2,REASON_COST) -end -function c49352945.retcon1(e,tp,eg,ep,ev,re,r,rp,chk) - return not e:GetHandler():IsHasEffect(42015635) -end -function c49352945.retcon2(e,tp,eg,ep,ev,re,r,rp,chk) - return e:GetHandler():IsHasEffect(42015635) -end -function c49352945.rettg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToExtra() end - Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0) -end -function c49352945.retop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) or c:IsFacedown() then return end - Duel.SendtoDeck(c,nil,2,REASON_EFFECT) - if c:IsLocation(LOCATION_EXTRA) then - Duel.RaiseSingleEvent(c,49352945,e,0,0,0,0) - end -end -function c49352945.desfilter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable() -end -function c49352945.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c49352945.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end - local g=Duel.GetMatchingGroup(c49352945.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c49352945.desop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c49352945.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) - Duel.Destroy(g,REASON_EFFECT) -end -function c49352945.tdtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local g=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0) -end -function c49352945.tdop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) - Duel.SendtoDeck(g,nil,2,REASON_EFFECT) -end diff --git a/script/c49366157.lua b/script/c49366157.lua deleted file mode 100644 index b48ad8cc85..0000000000 --- a/script/c49366157.lua +++ /dev/null @@ -1,34 +0,0 @@ ---マジェスペクター・サイクロン -function c49366157.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c49366157.cost) - e1:SetTarget(c49366157.target) - e1:SetOperation(c49366157.activate) - c:RegisterEffect(e1) -end -function c49366157.cfilter(c) - return c:IsRace(RACE_SPELLCASTER) and c:IsAttribute(ATTRIBUTE_WIND) -end -function c49366157.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,c49366157.cfilter,1,nil) end - local g=Duel.SelectReleaseGroup(tp,c49366157.cfilter,1,1,nil) - Duel.Release(g,REASON_COST) -end -function c49366157.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsDestructable() end - if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c49366157.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c49374988.lua b/script/c49374988.lua deleted file mode 100644 index 3ba3709eea..0000000000 --- a/script/c49374988.lua +++ /dev/null @@ -1,72 +0,0 @@ ---マドルチェ・メェプル -function c49374988.initial_effect(c) - --to deck - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(49374988,0)) - e1:SetCategory(CATEGORY_TODECK) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCondition(c49374988.retcon) - e1:SetTarget(c49374988.rettg) - e1:SetOperation(c49374988.retop) - c:RegisterEffect(e1) - --search - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(49374988,1)) - e2:SetCategory(CATEGORY_POSITION) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetTarget(c49374988.postg) - e2:SetOperation(c49374988.posop) - c:RegisterEffect(e2) -end -function c49374988.retcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsReason(REASON_DESTROY) and e:GetHandler():GetReasonPlayer()~=tp - and e:GetHandler():GetPreviousControler()==tp -end -function c49374988.rettg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0) -end -function c49374988.retop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_EFFECT) - end -end -function c49374988.filter1(c) - return c:IsPosition(POS_FACEUP_ATTACK) and c:IsSetCard(0x71) -end -function c49374988.filter2(c) - return c:IsPosition(POS_FACEUP_ATTACK) -end -function c49374988.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - if chk==0 then return Duel.IsExistingTarget(c49374988.filter1,tp,LOCATION_MZONE,0,1,nil) - and Duel.IsExistingTarget(c49374988.filter2,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE) - local g1=Duel.SelectTarget(tp,c49374988.filter1,tp,LOCATION_MZONE,0,1,1,nil) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE) - local g2=Duel.SelectTarget(tp,c49374988.filter2,tp,0,LOCATION_MZONE,1,1,nil) - g1:Merge(g2) - Duel.SetOperationInfo(0,CATEGORY_POSITION,g1,2,0,0) -end -function c49374988.pfilter(c,e) - return c:IsPosition(POS_FACEUP_ATTACK) and c:IsRelateToEffect(e) -end -function c49374988.posop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(c49374988.pfilter,nil,e) - if g:GetCount()>0 then - Duel.ChangePosition(g,POS_FACEUP_DEFENCE) - local tc=g:GetFirst() - while tc do - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_CHANGE_POSITION) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,2) - tc:RegisterEffect(e1) - tc=g:GetNext() - end - end -end diff --git a/script/c49375719.lua b/script/c49375719.lua deleted file mode 100644 index f1dc6c6e23..0000000000 --- a/script/c49375719.lua +++ /dev/null @@ -1,15 +0,0 @@ ---サイバー・チュチュ -function c49375719.initial_effect(c) - --direct attack - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DIRECT_ATTACK) - e1:SetCondition(c49375719.dacon) - c:RegisterEffect(e1) -end -function c49375719.filter(c,atk) - return c:IsFacedown() or c:GetAttack()<=atk -end -function c49375719.dacon(e) - return not Duel.IsExistingMatchingCard(c49375719.filter,e:GetHandlerPlayer(),0,LOCATION_MZONE,1,nil,e:GetHandler():GetAttack()) -end diff --git a/script/c49389523.lua b/script/c49389523.lua deleted file mode 100644 index 92cc48901c..0000000000 --- a/script/c49389523.lua +++ /dev/null @@ -1,38 +0,0 @@ ---ライトニング・トライコーン -function c49389523.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,nil,aux.NonTuner(Card.IsRace,RACE_BEAST),1) - c:EnableReviveLimit() - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(49389523,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e1:SetCode(EVENT_DESTROYED) - e1:SetCondition(c49389523.spcon) - e1:SetTarget(c49389523.sptg) - e1:SetOperation(c49389523.spop) - c:RegisterEffect(e1) -end -function c49389523.spcon(e,tp,eg,ep,ev,re,r,rp) - return rp~=tp and e:GetHandler():GetPreviousControler()==tp -end -function c49389523.filter(c,e,tp) - local code=c:GetCode() - return (code==77506119 or code==13995824) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c49389523.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c49389523.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c49389523.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c49389523.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c49389523.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c49398568.lua b/script/c49398568.lua deleted file mode 100644 index 872d36e8a1..0000000000 --- a/script/c49398568.lua +++ /dev/null @@ -1,39 +0,0 @@ ---連続魔法 -function c49398568.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_CHAINING) - e1:SetCondition(c49398568.condition) - e1:SetCost(c49398568.cost) - e1:SetTarget(c49398568.target) - e1:SetOperation(c49398568.activate) - c:RegisterEffect(e1) -end -function c49398568.condition(e,tp,eg,ep,ev,re,r,rp) - return re:GetActiveType()==TYPE_SPELL and re:IsHasType(EFFECT_TYPE_ACTIVATE) and rp==tp -end -function c49398568.cfilter(c) - return c:IsDiscardable() and c:IsAbleToGraveAsCost() -end -function c49398568.cost(e,tp,eg,ep,ev,re,r,rp,chk) - local hg=Duel.GetFieldGroup(tp,LOCATION_HAND,0) - hg:RemoveCard(e:GetHandler()) - if chk==0 then return hg:GetCount()>0 and hg:FilterCount(c49398568.cfilter,nil)==hg:GetCount() end - Duel.SendtoGrave(hg,REASON_COST+REASON_DISCARD) -end -function c49398568.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local ftg=re:GetTarget() - if chkc then return ftg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end - if chk==0 then return not ftg or ftg(e,tp,eg,ep,ev,re,r,rp,chk) end - if re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then - e:SetProperty(EFFECT_FLAG_CARD_TARGET) - end - if ftg then - ftg(e,tp,eg,ep,ev,re,r,rp,chk) - end -end -function c49398568.activate(e,tp,eg,ep,ev,re,r,rp) - local fop=re:GetOperation() - fop(e,tp,eg,ep,ev,re,r,rp) -end diff --git a/script/c4939890.lua b/script/c4939890.lua deleted file mode 100644 index 01f13c1dbe..0000000000 --- a/script/c4939890.lua +++ /dev/null @@ -1,64 +0,0 @@ ---シャドール・ヘッジホッグ -function c4939890.initial_effect(c) - --flip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(4939890,0)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DELAY) - e1:SetCountLimit(1,4939890) - e1:SetCost(c4939890.cost) - e1:SetTarget(c4939890.target) - e1:SetOperation(c4939890.operation) - c:RegisterEffect(e1) - --tohand - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(4939890,1)) - e2:SetCategory(CATEGORY_TOHAND) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetCountLimit(1,4939890) - e2:SetCondition(c4939890.thcon) - e2:SetCost(c4939890.cost) - e2:SetTarget(c4939890.thtg) - e2:SetOperation(c4939890.thop) - c:RegisterEffect(e2) -end -function c4939890.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) -end -function c4939890.filter(c) - return c:IsSetCard(0x9d) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand() -end -function c4939890.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c4939890.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c4939890.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c4939890.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end -function c4939890.thcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsReason(REASON_EFFECT) -end -function c4939890.thfilter(c) - return c:IsSetCard(0x9d) and c:IsType(TYPE_MONSTER) and not c:IsCode(4939890) and c:IsAbleToHand() -end -function c4939890.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c4939890.thfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c4939890.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c4939890.thfilter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c4941482.lua b/script/c4941482.lua deleted file mode 100644 index 9ad10a16af..0000000000 --- a/script/c4941482.lua +++ /dev/null @@ -1,36 +0,0 @@ ---インフォーマー・スパイダー -function c4941482.initial_effect(c) - --control - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_CONTROL) - e2:SetDescription(aux.Stringid(4941482,0)) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetCondition(c4941482.condition) - e2:SetTarget(c4941482.target) - e2:SetOperation(c4941482.operation) - c:RegisterEffect(e2) -end -function c4941482.condition(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsReason(REASON_EFFECT) -end -function c4941482.filter(c) - return c:IsDefencePos() and c:IsControlerCanBeChanged() -end -function c4941482.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c4941482.filter(chkc) end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) - local g=Duel.SelectTarget(tp,c4941482.filter,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,g:GetCount(),0,0) -end -function c4941482.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsDefencePos() and tc:IsRelateToEffect(e) and not Duel.GetControl(tc,tp) then - if not tc:IsImmuneToEffect(e) and tc:IsAbleToChangeControler() then - Duel.Destroy(tc,REASON_EFFECT) - end - end -end diff --git a/script/c49441499.lua b/script/c49441499.lua deleted file mode 100644 index e76549e434..0000000000 --- a/script/c49441499.lua +++ /dev/null @@ -1,69 +0,0 @@ ---アルティメット・インセクト LV1 -function c49441499.initial_effect(c) - --immune spell - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_IMMUNE_EFFECT) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetValue(c49441499.efilter) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(49441499,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) - e2:SetCondition(c49441499.spcon) - e2:SetCost(c49441499.spcost) - e2:SetTarget(c49441499.sptg) - e2:SetOperation(c49441499.spop) - c:RegisterEffect(e2) - --reg - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e3:SetCode(EVENT_SUMMON_SUCCESS) - e3:SetOperation(c49441499.regop) - c:RegisterEffect(e3) - local e4=e3:Clone() - e4:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e4) - local e5=e3:Clone() - e5:SetCode(EVENT_FLIP) - c:RegisterEffect(e5) -end -c49441499.lvupcount=1 -c49441499.lvup={34088136} -function c49441499.efilter(e,te) - return te:IsActiveType(TYPE_SPELL) -end -function c49441499.regop(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():RegisterFlagEffect(49441499,RESET_EVENT+0x1ec0000+RESET_PHASE+RESET_END,0,1) -end -function c49441499.spcon(e,tp,eg,ep,ev,re,r,rp) - return tp==Duel.GetTurnPlayer() and e:GetHandler():GetFlagEffect(49441499)==0 -end -function c49441499.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end -function c49441499.spfilter(c,e,tp) - return c:IsCode(34088136) and c:IsCanBeSpecialSummoned(e,0,tp,true,true) -end -function c49441499.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsExistingMatchingCard(c49441499.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) -end -function c49441499.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c49441499.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp) - local tc=g:GetFirst() - if tc then - Duel.SpecialSummon(tc,0,tp,tp,true,true,POS_FACEUP) - tc:RegisterFlagEffect(34088136,RESET_EVENT+0x16e0000,0,0) - tc:CompleteProcedure() - end -end diff --git a/script/c49456901.lua b/script/c49456901.lua deleted file mode 100644 index 90c22cf9f7..0000000000 --- a/script/c49456901.lua +++ /dev/null @@ -1,69 +0,0 @@ ---CNo.104 仮面魔踏士アンブラル -function c49456901.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,5,4) - c:EnableReviveLimit() - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(49456901,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetTarget(c49456901.destg) - e1:SetOperation(c49456901.desop) - c:RegisterEffect(e1) - --negate activate - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(49456901,1)) - e2:SetCategory(CATEGORY_NEGATE+CATEGORY_HANDES) - e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCode(EVENT_CHAINING) - e2:SetCondition(c49456901.condition) - e2:SetCost(c49456901.cost) - e2:SetTarget(c49456901.target) - e2:SetOperation(c49456901.operation) - c:RegisterEffect(e2) -end -c49456901.xyz_number=104 -function c49456901.desfilter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable() -end -function c49456901.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and c49456901.desfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c49456901.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c49456901.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c49456901.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end -function c49456901.condition(e,tp,eg,ep,ev,re,r,rp,chk) - local loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION) - return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and ep~=tp - and loc==LOCATION_MZONE and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainNegatable(ev) - and e:GetHandler():GetOverlayGroup():IsExists(Card.IsCode,1,nil,2061963) -end -function c49456901.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c49456901.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) -end -function c49456901.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.NegateActivation(ev) and Duel.GetFieldGroupCount(1-tp,LOCATION_HAND,0)>0 - and Duel.SelectYesNo(tp,aux.Stringid(49456901,2)) then - local g=Duel.GetFieldGroup(1-tp,LOCATION_HAND,0):RandomSelect(1-tp,1) - Duel.SendtoGrave(g,REASON_EFFECT) - Duel.SetLP(1-tp,Duel.GetLP(1-tp)/2) - end -end diff --git a/script/c49460512.lua b/script/c49460512.lua deleted file mode 100644 index 3343424ecd..0000000000 --- a/script/c49460512.lua +++ /dev/null @@ -1,47 +0,0 @@ ---BF-流離いのコガラシ -function c49460512.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(49460512,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c49460512.spcon) - e1:SetTarget(c49460512.sptg) - e1:SetOperation(c49460512.spop) - c:RegisterEffect(e1) - --activate limit - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_BE_MATERIAL) - e2:SetCondition(c49460512.limitcon) - e2:SetOperation(c49460512.limitop) - c:RegisterEffect(e2) -end -function c49460512.cfilter(c,tp) - return c:IsSetCard(0x33) and c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_MZONE) - and c:IsPreviousPosition(POS_FACEUP) and bit.band(c:GetReason(),0x41)==0x41 -end -function c49460512.spcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c49460512.cfilter,1,nil,tp) -end -function c49460512.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c49460512.spop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP) - end -end -function c49460512.limitcon(e,tp,eg,ep,ev,re,r,rp) - return r==REASON_SYNCHRO -end -function c49460512.limitop(e,tp,eg,ep,ev,re,r,rp) - Duel.SetChainLimitTillChainEnd(c49460512.chainlm) -end -function c49460512.chainlm(e,rp,tp) - return tp==rp -end diff --git a/script/c49469105.lua b/script/c49469105.lua deleted file mode 100644 index 410fdd4433..0000000000 --- a/script/c49469105.lua +++ /dev/null @@ -1,63 +0,0 @@ ---融合破棄 -function c49469105.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c49469105.cost) - e1:SetTarget(c49469105.target) - e1:SetOperation(c49469105.operation) - c:RegisterEffect(e1) -end -function c49469105.cfilter(c) - return c:IsCode(24094653) and c:IsDiscardable() and c:IsAbleToGraveAsCost() -end -function c49469105.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c49469105.cfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,c49469105.cfilter,1,1,REASON_COST+REASON_DISCARD) -end -function c49469105.filter2(c,fc) - local fd=c:GetCode() - for i=1,fc.material_count do - if fd==fc.material[i] then return true end - end - return false -end -function c49469105.filter1(c,g) - local ct=c.material_count - return ct~=nil and g:IsExists(c49469105.filter2,1,nil,c) -end -function c49469105.spfilter(c,e,tp) - return c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c49469105.target(e,tp,eg,ep,ev,re,r,rp,chk) - local g=Duel.GetMatchingGroup(c49469105.spfilter,tp,LOCATION_HAND,0,nil,e,tp) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c49469105.filter1,tp,LOCATION_EXTRA,0,1,nil,g) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c49469105.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local g=Duel.GetMatchingGroup(c49469105.spfilter,tp,LOCATION_HAND,0,nil,e,tp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local exg=Duel.SelectMatchingCard(tp,c49469105.filter1,tp,LOCATION_EXTRA,0,1,1,nil,g) - if exg:GetCount()>0 then - Duel.SendtoGrave(exg,REASON_EFFECT) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=g:FilterSelect(tp,c49469105.filter2,1,1,nil,exg:GetFirst()) - Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetOperation(c49469105.tgop) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e1:SetCountLimit(1) - sg:GetFirst():RegisterEffect(e1,true) - end -end -function c49469105.tgop(e,tp,eg,ep,ev,re,r,rp) - Duel.SendtoGrave(e:GetHandler(),REASON_EFFECT) -end diff --git a/script/c49479374.lua b/script/c49479374.lua deleted file mode 100644 index b48b1a7413..0000000000 --- a/script/c49479374.lua +++ /dev/null @@ -1,30 +0,0 @@ ---急速充電器 -function c49479374.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c49479374.target) - e1:SetOperation(c49479374.activate) - c:RegisterEffect(e1) -end -function c49479374.filter(c) - return c:IsSetCard(0x28) and c:IsLevelBelow(4) and c:IsAbleToHand() -end -function c49479374.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:GetControler()==tp and chkc:GetLocation()==LOCATION_GRAVE and c49479374.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c49479374.filter,tp,LOCATION_GRAVE,0,2,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c49479374.filter,tp,LOCATION_GRAVE,0,2,2,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,2,0,0) -end -function c49479374.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local sg=g:Filter(Card.IsRelateToEffect,nil,e) - if sg:GetCount()>0 then - Duel.SendtoHand(sg,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,sg) - end -end diff --git a/script/c494922.lua b/script/c494922.lua deleted file mode 100644 index 4fb86bd91b..0000000000 --- a/script/c494922.lua +++ /dev/null @@ -1,60 +0,0 @@ ---超重荒神スサノ-O -function c494922.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsRace,RACE_MACHINE),aux.NonTuner(Card.IsSetCard,0x9a),1) - c:EnableReviveLimit() - --defence attack - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DEFENCE_ATTACK) - e1:SetValue(1) - c:RegisterEffect(e1) - --set - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(494922,0)) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCondition(c494922.setcon) - e2:SetTarget(c494922.settg) - e2:SetOperation(c494922.setop) - c:RegisterEffect(e2) - --add setcode - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e3:SetCode(EFFECT_ADD_SETCODE) - e3:SetValue(0x9a) - c:RegisterEffect(e3) -end -function c494922.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) -end -function c494922.setcon(e,tp,eg,ep,ev,re,r,rp) - return not Duel.IsExistingMatchingCard(c494922.filter,tp,LOCATION_GRAVE,0,1,nil) -end -function c494922.setfilter(c,tp) - return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSSetable(true) and (c:IsType(TYPE_FIELD) or Duel.GetLocationCount(tp,LOCATION_SZONE)>0) -end -function c494922.settg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_GRAVE) and c494922.setfilter(chkc,tp) end - if chk==0 then return Duel.IsExistingTarget(c494922.setfilter,tp,0,LOCATION_GRAVE,1,nil,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) - local g=Duel.SelectTarget(tp,c494922.setfilter,tp,0,LOCATION_GRAVE,1,1,nil,tp) - Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g,1,0,0) -end -function c494922.setop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and (tc:IsType(TYPE_FIELD) or Duel.GetLocationCount(tp,LOCATION_SZONE)>0) then - Duel.SSet(tp,tc) - Duel.ConfirmCards(1-tp,tc) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) - e1:SetReset(RESET_EVENT+0x47e0000) - e1:SetValue(LOCATION_REMOVED) - tc:RegisterEffect(e1,true) - end -end diff --git a/script/c49514333.lua b/script/c49514333.lua deleted file mode 100644 index 1ae4aca4fb..0000000000 --- a/script/c49514333.lua +++ /dev/null @@ -1,64 +0,0 @@ ---ソウル・オブ・スタチュー -function c49514333.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c49514333.target) - e1:SetOperation(c49514333.activate) - c:RegisterEffect(e1) - local g=Group.CreateGroup() - g:KeepAlive() - e1:SetLabelObject(g) -end -function c49514333.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and - Duel.IsPlayerCanSpecialSummonMonster(tp,49514333,0,0x21,1000,1800,4,RACE_ROCK,ATTRIBUTE_LIGHT) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c49514333.activate(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) then return end - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 - or not Duel.IsPlayerCanSpecialSummonMonster(tp,49514333,0,0x21,1000,1800,4,RACE_ROCK,ATTRIBUTE_LIGHT) then return end - c:AddTrapMonsterAttribute(TYPE_EFFECT,ATTRIBUTE_LIGHT,RACE_ROCK,4,1000,1800) - Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP) - c:TrapMonsterBlock() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_SEND_REPLACE) - e1:SetTarget(c49514333.reptg) - e1:SetValue(c49514333.repval) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetLabelObject(e) - c:RegisterEffect(e1) -end -function c49514333.repfilter(c,tp) - return c:IsLocation(LOCATION_MZONE) and c:IsFaceup() and c:GetDestination()==LOCATION_GRAVE and c:IsReason(REASON_DESTROY) - and c:GetReasonPlayer()~=tp and c:GetOwner()==tp and bit.band(c:GetOriginalType(),TYPE_TRAP)~=0 and c:IsCanTurnSet() -end -function c49514333.reptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local count=eg:FilterCount(c49514333.repfilter,e:GetHandler(),tp) - return count>0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>=count - end - if Duel.SelectYesNo(tp,aux.Stringid(49514333,0)) then - local container=e:GetLabelObject():GetLabelObject() - container:Clear() - local g=eg:Filter(c49514333.repfilter,e:GetHandler(),tp) - local tc=g:GetFirst() - while tc do - Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) - tc=g:GetNext() - end - Duel.ChangePosition(g,POS_FACEDOWN) - container:Merge(g) - return true - end - return false -end -function c49514333.repval(e,c) - return e:GetLabelObject():GetLabelObject():IsContains(c) -end diff --git a/script/c49522489.lua b/script/c49522489.lua deleted file mode 100644 index 46309dc631..0000000000 --- a/script/c49522489.lua +++ /dev/null @@ -1,14 +0,0 @@ ---悪魔ガエル -function c49522489.initial_effect(c) - --Special Summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetValue(c49522489.val) - c:RegisterEffect(e1) -end -function c49522489.val(e,c) - return Duel.GetMatchingGroupCount(Card.IsCode,c:GetControler(),LOCATION_GRAVE,0,nil,10456559)*300 -end diff --git a/script/c49551909.lua b/script/c49551909.lua deleted file mode 100644 index 04c463eaf4..0000000000 --- a/script/c49551909.lua +++ /dev/null @@ -1,86 +0,0 @@ ---ヒロイック・リベンジ・ソード -function c49551909.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(TIMING_BATTLE_PHASE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c49551909.target) - e1:SetOperation(c49551909.operation) - c:RegisterEffect(e1) -end -function c49551909.filter(c) - return c:IsFaceup() and c:IsSetCard(0x6f) -end -function c49551909.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c49551909.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c49551909.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local g=Duel.SelectTarget(tp,c49551909.filter,tp,LOCATION_MZONE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c49551909.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsLocation(LOCATION_SZONE) then return end - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,c,tc) - c:CancelToGrave() - --destroy - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetDescription(aux.Stringid(49551909,0)) - e1:SetCode(EVENT_BATTLED) - e1:SetRange(LOCATION_SZONE) - e1:SetCondition(c49551909.descon) - e1:SetTarget(c49551909.destg) - e1:SetOperation(c49551909.desop) - e1:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e1) - --damage - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_PRE_BATTLE_DAMAGE) - e2:SetRange(LOCATION_SZONE) - e2:SetCondition(c49551909.damcon) - e2:SetOperation(c49551909.damop) - e2:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e2) - --Equip limit - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_EQUIP_LIMIT) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e3:SetValue(c49551909.eqlimit) - e3:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e3) - end -end -function c49551909.eqlimit(e,c) - return c:GetControler()==e:GetOwnerPlayer() and c:IsSetCard(0x6f) -end -function c49551909.descon(e,tp,eg,ep,ev,re,r,rp) - local ec=e:GetHandler():GetEquipTarget() - return Duel.GetAttackTarget()==ec or (Duel.GetAttacker()==ec and Duel.GetAttackTarget()) -end -function c49551909.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler():GetEquipTarget():GetBattleTarget(),1,0,0) -end -function c49551909.desop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local bc=e:GetHandler():GetEquipTarget():GetBattleTarget() - if bc:IsRelateToBattle() then - Duel.Destroy(bc,REASON_EFFECT) - end -end -function c49551909.damcon(e,tp,eg,ep,ev,re,r,rp) - local ec=e:GetHandler():GetEquipTarget() - return ec and ep==tp and (Duel.GetAttacker()==ec or Duel.GetAttackTarget()==ec) -end -function c49551909.damop(e,tp,eg,ep,ev,re,r,rp) - Duel.ChangeBattleDamage(1-tp,ev,false) -end diff --git a/script/c49587034.lua b/script/c49587034.lua deleted file mode 100644 index c382fe1612..0000000000 --- a/script/c49587034.lua +++ /dev/null @@ -1,51 +0,0 @@ ---光の封札剣 -function c49587034.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_REMOVE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_END_PHASE) - e1:SetTarget(c49587034.target) - e1:SetOperation(c49587034.activate) - c:RegisterEffect(e1) -end -function c49587034.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_HAND,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,1-tp,LOCATION_HAND) -end -function c49587034.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetFieldGroup(1-tp,LOCATION_HAND,0,nil) - local rs=g:RandomSelect(1-tp,1) - local card=rs:GetFirst() - if card==nil then return end - if Duel.Remove(card,POS_FACEDOWN,REASON_EFFECT)>0 then - local ph=Duel.GetCurrentPhase() - local cp=Duel.GetTurnPlayer() - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetRange(LOCATION_REMOVED) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) - e1:SetCountLimit(1) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,4) - e1:SetCondition(c49587034.thcon) - e1:SetOperation(c49587034.thop) - e1:SetLabel(1) - card:RegisterEffect(e1) - e:GetHandler():RegisterFlagEffect(1082946,RESET_PHASE+PHASE_END+RESET_SELF_TURN,0,3) - c49587034[e:GetHandler()]=e1 - end -end -function c49587034.thcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c49587034.thop(e,tp,eg,ep,ev,re,r,rp) - local ct=e:GetLabel() - e:GetOwner():SetTurnCounter(ct) - if ct==4 then - Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT) - e:GetOwner():ResetFlagEffect(1082946) - else - e:SetLabel(ct+1) - end -end diff --git a/script/c49597193.lua b/script/c49597193.lua deleted file mode 100644 index 01d4af2f6b..0000000000 --- a/script/c49597193.lua +++ /dev/null @@ -1,52 +0,0 @@ ---ジェムナイト・パーズ -function c49597193.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcCodeFun(c,54620698,aux.FilterBoolFunction(Card.IsSetCard,0x1047),1,false,false) - --spsummon condition - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e2:SetCode(EFFECT_SPSUMMON_CONDITION) - e2:SetValue(c49597193.splimit) - c:RegisterEffect(e2) - --damage - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(49597193,0)) - e3:SetCategory(CATEGORY_DAMAGE) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e3:SetCode(EVENT_BATTLE_DESTROYING) - e3:SetCondition(c49597193.damcon) - e3:SetTarget(c49597193.damtg) - e3:SetOperation(c49597193.damop) - c:RegisterEffect(e3) - --multi attack - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetCode(EFFECT_EXTRA_ATTACK) - e4:SetValue(1) - c:RegisterEffect(e4) -end -function c49597193.splimit(e,se,sp,st) - return not e:GetHandler():IsLocation(LOCATION_EXTRA) or bit.band(st,SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION -end -function c49597193.damcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local bc=c:GetBattleTarget() - return c:IsRelateToBattle() and bc:IsLocation(LOCATION_GRAVE) and bc:IsType(TYPE_MONSTER) -end -function c49597193.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local c=e:GetHandler() - local bc=c:GetBattleTarget() - local dam=bc:GetAttack() - if dam<0 then dam=0 end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(dam) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,dam) -end -function c49597193.damop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c49600724.lua b/script/c49600724.lua deleted file mode 100644 index c67b4dc7a2..0000000000 --- a/script/c49600724.lua +++ /dev/null @@ -1,43 +0,0 @@ ---異次元への隙間 -function c49600724.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_REMOVE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c49600724.target) - e1:SetOperation(c49600724.activate) - c:RegisterEffect(e1) -end -function c49600724.filter(c,e) - return c:IsType(TYPE_MONSTER) and c:IsCanBeEffectTarget(e) and c:IsAbleToRemove() -end -function c49600724.filter1(c,g) - return g:IsExists(Card.IsAttribute,1,c,c:GetAttribute()) -end -function c49600724.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and c49600724.filter(chkc,e) end - if chk==0 then - local g=Duel.GetMatchingGroup(c49600724.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,nil,e) - return g:IsExists(c49600724.filter1,1,nil,g) - end - local g=Duel.GetMatchingGroup(c49600724.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,nil,e) - local rg=g:Filter(c49600724.filter1,nil,g) - local tc=rg:GetFirst() - local att=0 - while tc do - att=bit.bor(att,tc:GetAttribute()) - tc=rg:GetNext() - end - local ac=Duel.AnnounceAttribute(tp,1,att) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local sg=rg:FilterSelect(tp,Card.IsAttribute,2,2,nil,ac) - Duel.SetTargetCard(sg) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,sg,2,0,0) -end -function c49600724.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local sg=g:Filter(Card.IsRelateToEffect,nil,e) - Duel.Remove(sg,POS_FACEUP,REASON_EFFECT) -end diff --git a/script/c49633574.lua b/script/c49633574.lua deleted file mode 100644 index a66e574626..0000000000 --- a/script/c49633574.lua +++ /dev/null @@ -1,45 +0,0 @@ ---魔轟神オルトロ -function c49633574.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(49633574,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_MZONE) - e1:SetTarget(c49633574.tg) - e1:SetOperation(c49633574.op) - c:RegisterEffect(e1) -end -function c49633574.spfilter(c,e,tp) - return c:IsSetCard(0x35) and c:GetLevel()==3 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c49633574.tg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return false end - local g=Duel.GetMatchingGroup(c49633574.spfilter,tp,LOCATION_HAND,0,nil,e,tp) - local res=nil - if g:GetCount()==0 then - res=false - elseif g:GetCount()==1 then - res=Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,1,g:GetFirst()) - else res=Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,1,nil) end - return res - end - local g=Duel.GetMatchingGroup(c49633574.spfilter,tp,LOCATION_HAND,0,nil,e,tp) - local cg=nil - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - if g:GetCount()==1 then - cg=Duel.SelectMatchingCard(tp,Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,1,1,g:GetFirst()) - else cg=Duel.SelectMatchingCard(tp,Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,1,1,nil) end - Duel.SendtoGrave(cg,REASON_COST) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c49633574.op(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c49633574.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c49645921.lua b/script/c49645921.lua deleted file mode 100644 index c12e7ebb8c..0000000000 --- a/script/c49645921.lua +++ /dev/null @@ -1,8 +0,0 @@ ---セイバー・ビートル -function c49645921.initial_effect(c) - --pierce - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_PIERCE) - c:RegisterEffect(e1) -end diff --git a/script/c49669730.lua b/script/c49669730.lua deleted file mode 100644 index a4e09bab37..0000000000 --- a/script/c49669730.lua +++ /dev/null @@ -1,40 +0,0 @@ ---ウォーターハザード -function c49669730.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(49669730,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_SZONE) - e1:SetCondition(c49669730.condition) - e1:SetTarget(c49669730.target) - e1:SetOperation(c49669730.operation) - c:RegisterEffect(e1) -end -function c49669730.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 -end -function c49669730.filter(c,e,sp) - return c:IsAttribute(ATTRIBUTE_WATER) and c:GetLevel()<=4 and c:IsCanBeSpecialSummoned(e,0,sp,false,false) -end -function c49669730.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c49669730.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c49669730.operation(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - if Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)>0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c49669730.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c49674183.lua b/script/c49674183.lua deleted file mode 100644 index 68a9ff1bac..0000000000 --- a/script/c49674183.lua +++ /dev/null @@ -1,32 +0,0 @@ ---魔天使ローズ・ソーサラー -function c49674183.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c49674183.spcon) - e1:SetOperation(c49674183.spop) - c:RegisterEffect(e1) -end -function c49674183.spfilter(c) - return c:IsFaceup() and c:IsRace(RACE_PLANT) and c:GetCode()~=49674183 and c:IsAbleToHandAsCost() -end -function c49674183.spcon(e,c) - if c==nil then return true end - return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-1 - and Duel.IsExistingMatchingCard(c49674183.spfilter,c:GetControler(),LOCATION_MZONE,0,1,nil) -end -function c49674183.spop(e,tp,eg,ep,ev,re,r,rp,c) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g=Duel.SelectMatchingCard(tp,c49674183.spfilter,tp,LOCATION_MZONE,0,1,1,nil) - Duel.SendtoHand(g,nil,REASON_COST) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+0x47e0000) - e1:SetValue(LOCATION_REMOVED) - c:RegisterEffect(e1,true) -end diff --git a/script/c49678559.lua b/script/c49678559.lua deleted file mode 100644 index 0937b97f24..0000000000 --- a/script/c49678559.lua +++ /dev/null @@ -1,85 +0,0 @@ ---No.102 光天使グローリアス・ヘイロー -function c49678559.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_LIGHT),4,3) - c:EnableReviveLimit() - --negate - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(49678559,0)) - e1:SetCategory(CATEGORY_DISABLE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCost(c49678559.cost) - e1:SetTarget(c49678559.target) - e1:SetOperation(c49678559.operation) - c:RegisterEffect(e1) - --destroy replace - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetCode(EFFECT_DESTROY_REPLACE) - e2:SetRange(LOCATION_MZONE) - e2:SetTarget(c49678559.reptg) - c:RegisterEffect(e2) -end -c49678559.xyz_number=102 -function c49678559.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c49678559.filter(c) - return c:IsFaceup() -end -function c49678559.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and c49678559.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c49678559.filter,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - local g=Duel.SelectTarget(tp,c49678559.filter,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0) -end -function c49678559.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetValue(tc:GetAttack()/2) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE) - e2:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_DISABLE_EFFECT) - e3:SetValue(RESET_TURN_SET) - e3:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e3) - end -end -function c49678559.reptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_EFFECT) end - if Duel.SelectYesNo(tp,aux.Stringid(49678559,1)) then - local g=e:GetHandler():GetOverlayGroup() - Duel.SendtoGrave(g,REASON_EFFECT) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CHANGE_DAMAGE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetTargetRange(1,0) - e1:SetValue(c49678559.damval) - e1:SetReset(RESET_PHASE+PHASE_END,1) - Duel.RegisterEffect(e1,tp) - return true - else return false end -end -function c49678559.damval(e,re,dam,r,rp,rc) - if bit.band(r,REASON_BATTLE)~=0 then - return dam/2 - else return dam end -end diff --git a/script/c49680980.lua b/script/c49680980.lua deleted file mode 100644 index 6cac816f35..0000000000 --- a/script/c49680980.lua +++ /dev/null @@ -1,83 +0,0 @@ ---コアキメイル・サンドマン -function c49680980.initial_effect(c) - --cost - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c49680980.mtcon) - e1:SetOperation(c49680980.mtop) - c:RegisterEffect(e1) - --Negate - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(49680980,3)) - e2:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_QUICK_O) - e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) - e2:SetCode(EVENT_CHAINING) - e2:SetRange(LOCATION_MZONE) - e2:SetCondition(c49680980.condition) - e2:SetCost(c49680980.cost) - e2:SetTarget(c49680980.target) - e2:SetOperation(c49680980.operation) - c:RegisterEffect(e2) -end -function c49680980.mtcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c49680980.cfilter1(c) - return c:IsCode(36623431) and c:IsAbleToGraveAsCost() -end -function c49680980.cfilter2(c) - return c:IsType(TYPE_MONSTER) and c:IsRace(RACE_ROCK) and not c:IsPublic() -end -function c49680980.mtop(e,tp,eg,ep,ev,re,r,rp) - local g1=Duel.GetMatchingGroup(c49680980.cfilter1,tp,LOCATION_HAND,0,nil) - local g2=Duel.GetMatchingGroup(c49680980.cfilter2,tp,LOCATION_HAND,0,nil) - local select=2 - Duel.Hint(HINT_SELECTMSG,tp,0) - if g1:GetCount()>0 and g2:GetCount()>0 then - select=Duel.SelectOption(tp,aux.Stringid(49680980,0),aux.Stringid(49680980,1),aux.Stringid(49680980,2)) - elseif g1:GetCount()>0 then - select=Duel.SelectOption(tp,aux.Stringid(49680980,0),aux.Stringid(49680980,2)) - if select==1 then select=2 end - elseif g2:GetCount()>0 then - select=Duel.SelectOption(tp,aux.Stringid(49680980,1),aux.Stringid(49680980,2)) - select=select+1 - end - if select==0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=g1:Select(tp,1,1,nil) - Duel.SendtoGrave(g,REASON_COST) - elseif select==1 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) - local g=g2:Select(tp,1,1,nil) - Duel.ConfirmCards(1-tp,g) - Duel.ShuffleHand(tp) - else - Duel.Destroy(e:GetHandler(),REASON_RULE) - end -end -function c49680980.condition(e,tp,eg,ep,ev,re,r,rp) - return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and ep~=tp - and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_TRAP) and Duel.IsChainNegatable(ev) -end -function c49680980.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end -function c49680980.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) - end -end -function c49680980.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateActivation(ev) - if re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(eg,REASON_EFFECT) - end -end diff --git a/script/c49681811.lua b/script/c49681811.lua deleted file mode 100644 index 27a29c4f44..0000000000 --- a/script/c49681811.lua +++ /dev/null @@ -1,87 +0,0 @@ ---無敗将軍 フリード -function c49681811.initial_effect(c) - --disable - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_DISABLE) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(LOCATION_SZONE,LOCATION_SZONE) - e1:SetTarget(c49681811.distg) - c:RegisterEffect(e1) - --disable effect - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_CHAIN_SOLVING) - e2:SetRange(LOCATION_MZONE) - e2:SetOperation(c49681811.disop) - c:RegisterEffect(e2) - --self destroy - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetCode(EFFECT_SELF_DESTROY) - e3:SetRange(LOCATION_MZONE) - e3:SetTargetRange(LOCATION_SZONE,LOCATION_SZONE) - e3:SetTarget(c49681811.distg) - c:RegisterEffect(e3) - --search - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(49681811,0)) - e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e4:SetCode(EVENT_PREDRAW) - e4:SetRange(LOCATION_MZONE) - e4:SetCondition(c49681811.condition) - e4:SetTarget(c49681811.target) - e4:SetOperation(c49681811.operation) - c:RegisterEffect(e4) -end -function c49681811.distg(e,c) - if not c:IsType(TYPE_SPELL) or c:GetCardTargetCount()==0 then return false end - return c:GetCardTarget():IsContains(e:GetHandler()) -end -function c49681811.disop(e,tp,eg,ep,ev,re,r,rp) - if not re:IsActiveType(TYPE_SPELL) then return end - if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return end - local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) - if not g or g:GetCount()==0 then return end - if g:IsContains(e:GetHandler()) then - Duel.NegateEffect(ev) - if re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(re:GetHandler(),REASON_EFFECT) - end - end -end -function c49681811.condition(e,tp,eg,ep,ev,re,r,rp) - return tp==Duel.GetTurnPlayer() and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0 - and Duel.GetDrawCount(tp)>0 -end -function c49681811.filter(c) - return c:IsLevelBelow(4) and c:IsRace(RACE_WARRIOR) and c:IsAbleToHand() -end -function c49681811.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c49681811.filter,tp,LOCATION_DECK,0,1,nil) end - local dt=Duel.GetDrawCount(tp) - if dt~=0 then - _replace_count=0 - _replace_max=dt - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EFFECT_DRAW_COUNT) - e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_DRAW) - e1:SetValue(0) - Duel.RegisterEffect(e1,tp) - end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,LOCATION_DECK) -end -function c49681811.operation(e,tp,eg,ep,ev,re,r,rp) - _replace_count=_replace_count+1 - if _replace_count>_replace_max or not e:GetHandler():IsRelateToEffect(e) or e:GetHandler():IsFacedown() then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c49681811.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()~=0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c49702428.lua b/script/c49702428.lua deleted file mode 100644 index bd84c96828..0000000000 --- a/script/c49702428.lua +++ /dev/null @@ -1,30 +0,0 @@ ---黒・魔・導・爆・裂・破 -function c49702428.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c49702428.condition) - e1:SetTarget(c49702428.target) - e1:SetOperation(c49702428.activate) - c:RegisterEffect(e1) -end -function c49702428.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x10a2) -end -function c49702428.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c49702428.cfilter,tp,LOCATION_MZONE,0,1,nil) -end -function c49702428.filter(c) - return c:IsFaceup() and c:IsDestructable() -end -function c49702428.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c49702428.filter,tp,0,LOCATION_MZONE,1,nil) end - local g=Duel.GetMatchingGroup(c49702428.filter,tp,0,LOCATION_MZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c49702428.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c49702428.filter,tp,0,LOCATION_MZONE,nil) - Duel.Destroy(g,REASON_EFFECT) -end diff --git a/script/c49721904.lua b/script/c49721904.lua deleted file mode 100644 index 3ec8730f26..0000000000 --- a/script/c49721904.lua +++ /dev/null @@ -1,38 +0,0 @@ ---真六武衆-キザン -function c49721904.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c49721904.spcon) - c:RegisterEffect(e1) - --atk,def - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetCondition(c49721904.valcon) - e2:SetValue(300) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EFFECT_UPDATE_DEFENCE) - c:RegisterEffect(e3) -end -function c49721904.spfilter(c) - return c:IsFaceup() and c:IsSetCard(0x3d) and c:GetCode()~=49721904 -end -function c49721904.spcon(e,c) - if c==nil then return true end - return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and - Duel.IsExistingMatchingCard(c49721904.spfilter,c:GetControler(),LOCATION_MZONE,0,1,nil) -end -function c49721904.vfilter(c) - return c:IsFaceup() and c:IsSetCard(0x3d) -end -function c49721904.valcon(e) - local c=e:GetHandler() - return Duel.IsExistingMatchingCard(c49721904.vfilter,c:GetControler(),LOCATION_MZONE,0,2,c) -end diff --git a/script/c49771608.lua b/script/c49771608.lua deleted file mode 100644 index c4bdc86c26..0000000000 --- a/script/c49771608.lua +++ /dev/null @@ -1,29 +0,0 @@ ---吸収天児 -function c49771608.initial_effect(c) - --recover - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(49771608,0)) - e1:SetCategory(CATEGORY_RECOVER) - e1:SetCode(EVENT_BATTLE_DESTROYING) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCondition(c49771608.condition) - e1:SetTarget(c49771608.target) - e1:SetOperation(c49771608.operation) - c:RegisterEffect(e1) -end -function c49771608.condition(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local bc=c:GetBattleTarget() - return c:IsRelateToBattle() and bc:IsLocation(LOCATION_GRAVE) and bc:IsType(TYPE_MONSTER) -end -function c49771608.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local rec=e:GetHandler():GetBattleTarget():GetLevel()*300 - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(rec) - Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,rec) -end -function c49771608.operation(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Recover(p,d,REASON_EFFECT) -end diff --git a/script/c49785720.lua b/script/c49785720.lua deleted file mode 100644 index 65eb478d48..0000000000 --- a/script/c49785720.lua +++ /dev/null @@ -1,21 +0,0 @@ ---機炎星-ゴヨウテ -function c49785720.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c49785720.spcon) - c:RegisterEffect(e1) -end -function c49785720.filter(c) - return c:IsFaceup() and c:IsSetCard(0x7c) and c:IsType(TYPE_SPELL+TYPE_TRAP) -end -function c49785720.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0,nil)==0 - and Duel.IsExistingMatchingCard(c49785720.filter,tp,LOCATION_SZONE,0,1,nil) -end diff --git a/script/c49808196.lua b/script/c49808196.lua deleted file mode 100644 index fb48bdd99a..0000000000 --- a/script/c49808196.lua +++ /dev/null @@ -1,37 +0,0 @@ ---メタボ・サッカー -function c49808196.initial_effect(c) - --token - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(49808196,1)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_BE_MATERIAL) - e1:SetCondition(c49808196.tkcon) - e1:SetTarget(c49808196.tktg) - e1:SetOperation(c49808196.tkop) - c:RegisterEffect(e1) -end -function c49808196.tkcon(e,tp,eg,ep,ev,re,r,rp) - return r==REASON_SUMMON and e:GetHandler():GetReasonCard():IsAttribute(ATTRIBUTE_DARK) -end -function c49808196.tktg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,3,0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,3,0,0) -end -function c49808196.tkop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<3 then return end - if not Duel.IsPlayerCanSpecialSummonMonster(tp,49808197,0,0x4011,0,0,1,RACE_FIEND,ATTRIBUTE_DARK) then return end - for i=1,3 do - local token=Duel.CreateToken(tp,49808197) - Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP_DEFENCE) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UNRELEASABLE_SUM) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(1) - token:RegisterEffect(e1,true) - end - Duel.SpecialSummonComplete() -end diff --git a/script/c49814180.lua b/script/c49814180.lua deleted file mode 100644 index a5d893ae97..0000000000 --- a/script/c49814180.lua +++ /dev/null @@ -1,34 +0,0 @@ ---マスターモンク -function c49814180.initial_effect(c) - c:EnableReviveLimit() - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_SPSUMMON_PROC) - e2:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e2:SetRange(LOCATION_HAND) - e2:SetCondition(c49814180.spcon) - e2:SetOperation(c49814180.spop) - c:RegisterEffect(e2) - --double atk - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_EXTRA_ATTACK) - e3:SetValue(1) - c:RegisterEffect(e3) -end -function c49814180.spcon(e,c) - if c==nil then return true end - return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-1 - and Duel.CheckReleaseGroup(c:GetControler(),Card.IsCode,1,nil,3810071) -end -function c49814180.spop(e,tp,eg,ep,ev,re,r,rp,c) - local g=Duel.SelectReleaseGroup(c:GetControler(),Card.IsCode,1,1,nil,3810071) - Duel.Release(g,REASON_COST) -end diff --git a/script/c49826746.lua b/script/c49826746.lua deleted file mode 100644 index 9450251b4d..0000000000 --- a/script/c49826746.lua +++ /dev/null @@ -1,12 +0,0 @@ ---黒翼の魔術師 -function c49826746.initial_effect(c) - --Trap activate in set turn - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN) - e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(LOCATION_SZONE,0) - e1:SetTarget(aux.TargetBoolFunction(Card.IsCode,80280737)) - c:RegisterEffect(e1) -end diff --git a/script/c49833312.lua b/script/c49833312.lua deleted file mode 100644 index 512b9ce760..0000000000 --- a/script/c49833312.lua +++ /dev/null @@ -1,30 +0,0 @@ ---D・スクランブル -function c49833312.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetCondition(c49833312.condition) - e1:SetTarget(c49833312.target) - e1:SetOperation(c49833312.activate) - c:RegisterEffect(e1) -end -function c49833312.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 -end -function c49833312.filter(c,e,tp) - return c:IsSetCard(0x26) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c49833312.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c49833312.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c49833312.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.NegateAttack() and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c49833312.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c49838105.lua b/script/c49838105.lua deleted file mode 100644 index 780ea7d8ff..0000000000 --- a/script/c49838105.lua +++ /dev/null @@ -1,94 +0,0 @@ ---森羅の滝滑り -function c49838105.initial_effect(c) - --activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c49838105.target1) - e1:SetOperation(c49838105.operation) - c:RegisterEffect(e1) - -- - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(49838105,0)) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_ATTACK_ANNOUNCE) - e2:SetRange(LOCATION_SZONE) - e2:SetCondition(c49838105.condition) - e2:SetTarget(c49838105.target2) - e2:SetOperation(c49838105.operation) - e2:SetLabel(1) - c:RegisterEffect(e2) - -- - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(49838105,1)) - e3:SetCategory(CATEGORY_TOHAND) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e3:SetCode(EVENT_PREDRAW) - e3:SetRange(LOCATION_SZONE) - e3:SetCondition(c49838105.cfcon) - e3:SetTarget(c49838105.cftg) - e3:SetOperation(c49838105.cfop) - c:RegisterEffect(e3) -end -function c49838105.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetAttacker():IsControler(1-tp) and Duel.GetAttackTarget()==nil -end -function c49838105.target1(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - if Duel.CheckEvent(EVENT_ATTACK_ANNOUNCE) and Duel.GetAttacker():IsControler(1-tp) and Duel.GetAttackTarget()==nil - and Duel.IsPlayerCanDiscardDeck(tp,1) and Duel.SelectYesNo(tp,aux.Stringid(49838105,2)) then - e:SetLabel(1) - else e:SetLabel(0) end -end -function c49838105.target2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,1) end -end -function c49838105.operation(e,tp,eg,ep,ev,re,r,rp) - if e:GetLabel()==0 or not e:GetHandler():IsRelateToEffect(e) then return end - if not Duel.IsPlayerCanDiscardDeck(tp,1) then return end - Duel.ConfirmDecktop(tp,1) - local g=Duel.GetDecktopGroup(tp,1) - local tc=g:GetFirst() - if tc:IsRace(RACE_PLANT) then - Duel.DisableShuffleCheck() - Duel.SendtoGrave(tc,REASON_EFFECT+REASON_REVEAL) - else - Duel.MoveSequence(tc,1) - end -end -function c49838105.cfcon(e,tp,eg,ep,ev,re,r,rp) - return tp==Duel.GetTurnPlayer() and Duel.GetDrawCount(tp)>0 -end -function c49838105.cftg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local dt=Duel.GetDrawCount(tp) - if dt~=0 then - _replace_count=0 - _replace_max=dt - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EFFECT_DRAW_COUNT) - e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_DRAW) - e1:SetValue(0) - Duel.RegisterEffect(e1,tp) - end -end -function c49838105.cfop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)==0 then return end - _replace_count=_replace_count+1 - if _replace_count<=_replace_max then - Duel.ConfirmDecktop(tp,1) - local g=Duel.GetDecktopGroup(tp,1) - local tc=g:GetFirst() - Duel.DisableShuffleCheck() - if tc:IsRace(RACE_PLANT) then - Duel.SendtoGrave(tc,REASON_EFFECT+REASON_REVEAL) - else - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ShuffleHand(tp) - end - end -end diff --git a/script/c49868263.lua b/script/c49868263.lua deleted file mode 100644 index 3cf5852a78..0000000000 --- a/script/c49868263.lua +++ /dev/null @@ -1,72 +0,0 @@ ---ドラゴン・ウォリアー -function c49868263.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcCode2(c,75953262,67957315,false,false) - --negate - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(49868263,0)) - e1:SetCategory(CATEGORY_DISABLE) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_CHAINING) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c49868263.discon) - e1:SetCost(c49868263.discost) - e1:SetTarget(c49868263.distg) - e1:SetOperation(c49868263.disop) - c:RegisterEffect(e1) - --disable effect - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_CHAIN_SOLVING) - e2:SetRange(LOCATION_MZONE) - e2:SetOperation(c49868263.disop2) - c:RegisterEffect(e2) - --disable - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetCode(EFFECT_DISABLE) - e3:SetRange(LOCATION_MZONE) - e3:SetTargetRange(LOCATION_SZONE,LOCATION_SZONE) - e3:SetTarget(c49868263.distg2) - c:RegisterEffect(e3) - --self destroy - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_FIELD) - e4:SetCode(EFFECT_SELF_DESTROY) - e4:SetRange(LOCATION_MZONE) - e4:SetTargetRange(LOCATION_SZONE,LOCATION_SZONE) - e4:SetTarget(c49868263.distg2) - c:RegisterEffect(e4) -end -function c49868263.discon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsStatus(STATUS_BATTLE_DESTROYED) then return false end - return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:GetActiveType()==TYPE_TRAP and Duel.IsChainDisablable(ev) -end -function c49868263.discost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,1000) end - Duel.PayLPCost(tp,1000) -end -function c49868263.distg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0) -end -function c49868263.disop(e,tp,eg,ep,ev,re,r,rp,chk) - Duel.NegateEffect(ev) -end -function c49868263.disop2(e,tp,eg,ep,ev,re,r,rp) - if re:IsActiveType(TYPE_SPELL) and re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then - local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) - if g and g:IsContains(e:GetHandler()) then - Duel.NegateEffect(ev) - if re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(re:GetHandler(),REASON_EFFECT) - end - end - end -end -function c49868263.distg2(e,c) - return c:GetCardTargetCount()>0 and c:IsType(TYPE_SPELL) - and c:GetCardTarget():IsContains(e:GetHandler()) -end diff --git a/script/c49879995.lua b/script/c49879995.lua deleted file mode 100644 index c3d20d04e2..0000000000 --- a/script/c49879995.lua +++ /dev/null @@ -1,38 +0,0 @@ ---ファントム・ドラゴン -function c49879995.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(49879995,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetRange(LOCATION_HAND) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(c49879995.spcon) - e1:SetTarget(c49879995.sptg) - e1:SetOperation(c49879995.spop) - c:RegisterEffect(e1) - -- - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EFFECT_USE_EXTRA_MZONE) - e2:SetValue(2) - c:RegisterEffect(e2) -end -function c49879995.cfilter(c,tp) - return c:GetSummonPlayer()==1-tp -end -function c49879995.spcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c49879995.cfilter,1,nil,tp) -end -function c49879995.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c49879995.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c49885567.lua b/script/c49885567.lua deleted file mode 100644 index a5007ce22c..0000000000 --- a/script/c49885567.lua +++ /dev/null @@ -1,49 +0,0 @@ ---精霊獣 カンナホーク -function c49885567.initial_effect(c) - c:SetSPSummonOnce(49885567) - --tohand - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_REMOVE) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_MZONE) - e1:SetTarget(c49885567.target) - e1:SetOperation(c49885567.operation) - c:RegisterEffect(e1) -end -function c49885567.filter(c) - return c:IsSetCard(0xb5) and c:IsAbleToRemove() -end -function c49885567.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c49885567.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_DECK) -end -function c49885567.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c49885567.filter,tp,LOCATION_DECK,0,1,1,nil) - local tc=g:GetFirst() - if tc then - Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetRange(LOCATION_REMOVED) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) - e1:SetCountLimit(1) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,2) - e1:SetCondition(c49885567.thcon) - e1:SetOperation(c49885567.thop) - e1:SetLabel(0) - tc:RegisterEffect(e1) - end -end -function c49885567.thcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c49885567.thop(e,tp,eg,ep,ev,re,r,rp) - local ct=e:GetLabel() - e:GetHandler():SetTurnCounter(ct+1) - if ct==1 then - Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,e:GetHandler()) - else e:SetLabel(1) end -end diff --git a/script/c49905576.lua b/script/c49905576.lua deleted file mode 100644 index 7289b5853f..0000000000 --- a/script/c49905576.lua +++ /dev/null @@ -1,19 +0,0 @@ ---天空聖者メルティウス -function c49905576.initial_effect(c) - --recover&destroy - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_CHAIN_SOLVED) - e1:SetRange(LOCATION_MZONE) - e1:SetOperation(c49905576.drop) - c:RegisterEffect(e1) -end -function c49905576.drop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not re:GetHandler():IsType(TYPE_COUNTER) or not c:IsLocation(LOCATION_MZONE) or not c:IsFaceup() then return end - Duel.Recover(tp,1000,REASON_EFFECT) - if not Duel.IsEnvironment(56433456) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectMatchingCard(tp,Card.IsDestructable,tp,0,LOCATION_ONFIELD,1,1,nil) - Duel.Destroy(g,REASON_EFFECT) -end diff --git a/script/c49919798.lua b/script/c49919798.lua deleted file mode 100644 index 58e85adda0..0000000000 --- a/script/c49919798.lua +++ /dev/null @@ -1,98 +0,0 @@ ---音響戦士サイザス -function c49919798.initial_effect(c) - --tohand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(49919798,0)) - e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DELAY) - e1:SetTarget(c49919798.thtg) - e1:SetOperation(c49919798.thop) - c:RegisterEffect(e1) - --copy - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(49919798,1)) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCountLimit(1) - e2:SetCost(c49919798.cpcost) - e2:SetTarget(c49919798.cptg) - e2:SetOperation(c49919798.cpop) - c:RegisterEffect(e2) - --special summon - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(49919798,2)) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_GRAVE) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetCost(c49919798.spcost) - e3:SetTarget(c49919798.sptg) - e3:SetOperation(c49919798.spop) - c:RegisterEffect(e3) -end -function c49919798.thfilter(c) - return c:IsSetCard(0x1066) and not c:IsCode(49919798) and c:IsAbleToHand() -end -function c49919798.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c49919798.thfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c49919798.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c49919798.thfilter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end -function c49919798.cpcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():GetFlagEffect(49919798)==0 end - e:GetHandler():RegisterFlagEffect(49919798,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) -end -function c49919798.cpfilter(c) - return c:IsFaceup() and c:IsSetCard(0x1066) and not c:IsCode(49919798) -end -function c49919798.cptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE+LOCATION_GRAVE) and c49919798.cpfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c49919798.cpfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c49919798.cpfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil) -end -function c49919798.cpop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and c:IsFaceup() and tc:IsRelateToEffect(e) and (not tc:IsLocation(LOCATION_MZONE) or tc:IsFaceup()) then - local code=tc:GetCode() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - e1:SetCode(EFFECT_CHANGE_CODE) - e1:SetValue(code) - c:RegisterEffect(e1) - c:CopyEffect(code,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,1) - end -end -function c49919798.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) -end -function c49919798.spfilter(c,e,tp) - return c:IsFaceup() and c:IsSetCard(0x1066) and not c:IsCode(49919798) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c49919798.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and c49919798.spfilter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c49919798.spfilter,tp,LOCATION_REMOVED,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c49919798.spfilter,tp,LOCATION_REMOVED,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c49919798.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c49959355.lua b/script/c49959355.lua deleted file mode 100644 index a9a094d9d0..0000000000 --- a/script/c49959355.lua +++ /dev/null @@ -1,91 +0,0 @@ ---ユニゾンビ -function c49959355.initial_effect(c) - --level - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(49959355,0)) - e1:SetCategory(CATEGORY_HANDES) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCountLimit(1,49959355) - e1:SetCost(c49959355.lvcost) - e1:SetTarget(c49959355.lvtg1) - e1:SetOperation(c49959355.lvop1) - c:RegisterEffect(e1) - --level - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(49959355,1)) - e2:SetCategory(CATEGORY_TOGRAVE) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCountLimit(1,49959356) - e2:SetCost(c49959355.lvcost) - e2:SetTarget(c49959355.lvtg2) - e2:SetOperation(c49959355.lvop2) - c:RegisterEffect(e2) -end -function c49959355.lvcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) -end -function c49959355.filter(c) - return c:IsFaceup() and c:GetLevel()>0 -end -function c49959355.lvtg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c49959355.filter(chkc) end - if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)>0 - and Duel.IsExistingTarget(c49959355.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c49959355.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1) -end -function c49959355.lvop1(e,tp,eg,ep,ev,re,r,rp) - if Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT+REASON_DISCARD)==0 then return end - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_LEVEL) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetValue(1) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - end -end -function c49959355.tgfilter(c) - return c:IsRace(RACE_ZOMBIE) and c:IsAbleToGrave() -end -function c49959355.lvtg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c49959355.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c49959355.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) - and Duel.IsExistingMatchingCard(c49959355.tgfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c49959355.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) -end -function c49959355.lvop2(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c49959355.tgfilter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()==0 or Duel.SendtoGrave(g,REASON_EFFECT)==0 then return end - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_LEVEL) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetValue(1) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - end - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_CANNOT_ATTACK) - e2:SetTargetRange(LOCATION_MZONE,0) - e2:SetTarget(c49959355.atktg) - e2:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e2,tp) -end -function c49959355.atktg(e,c) - return not c:IsRace(RACE_ZOMBIE) -end diff --git a/script/c49966595.lua b/script/c49966595.lua deleted file mode 100644 index c54e98c306..0000000000 --- a/script/c49966595.lua +++ /dev/null @@ -1,120 +0,0 @@ ---グレイドル・パラサイト -function c49966595.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(TIMING_ATTACK) - e1:SetTarget(c49966595.acttg) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_ATTACK_ANNOUNCE) - e2:SetRange(LOCATION_SZONE) - e2:SetCountLimit(1,49966595) - e2:SetCondition(c49966595.spcon1) - e2:SetCost(c49966595.spcost1) - e2:SetTarget(c49966595.sptg1) - e2:SetOperation(c49966595.spop1) - c:RegisterEffect(e2) - --spsummon - local e3=Effect.CreateEffect(c) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_ATTACK_ANNOUNCE) - e3:SetRange(LOCATION_SZONE) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetCountLimit(1,49966596) - e3:SetCondition(c49966595.spcon2) - e3:SetCost(c49966595.spcost2) - e3:SetTarget(c49966595.sptg2) - e3:SetOperation(c49966595.spop2) - c:RegisterEffect(e3) -end -function c49966595.acttg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return c49966595.sptg2(e,tp,eg,ep,ev,re,r,rp,0,chkc) end - if chk==0 then return true end - if Duel.CheckEvent(EVENT_ATTACK_ANNOUNCE) then - if c49966595.spcon1(e,tp,eg,ep,ev,re,r,rp) - and c49966595.spcost1(e,tp,eg,ep,ev,re,r,rp,0) - and c49966595.sptg1(e,tp,eg,ep,ev,re,r,rp,0) - and Duel.SelectYesNo(tp,aux.Stringid(49966595,0)) then - e:SetCategory(CATEGORY_SPECIAL_SUMMON) - e:SetProperty(0) - e:SetOperation(c49966595.spop1) - c49966595.spcost1(e,tp,eg,ep,ev,re,r,rp,1) - c49966595.sptg1(e,tp,eg,ep,ev,re,r,rp,1) - return - elseif c49966595.spcon2(e,tp,eg,ep,ev,re,r,rp) - and c49966595.spcost2(e,tp,eg,ep,ev,re,r,rp,0) - and c49966595.sptg2(e,tp,eg,ep,ev,re,r,rp,0,chkc) - and Duel.SelectYesNo(tp,aux.Stringid(49966595,0)) then - e:SetCategory(CATEGORY_SPECIAL_SUMMON) - e:SetProperty(EFFECT_FLAG_CARD_TARGET) - e:SetOperation(c49966595.spop2) - c49966595.spcost2(e,tp,eg,ep,ev,re,r,rp,1) - c49966595.sptg2(e,tp,eg,ep,ev,re,r,rp,1,chkc) - return - end - end - e:SetCategory(0) - e:SetProperty(0) - e:SetOperation(nil) -end -function c49966595.spcon1(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetAttacker():IsControler(1-tp) and Duel.GetAttackTarget()==nil -end -function c49966595.spcost1(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetFlagEffect(tp,49966595)==0 end - Duel.RegisterFlagEffect(tp,49966595,RESET_PHASE+PHASE_END,0,1) -end -function c49966595.spfilter1(c,e,tp) - return c:IsSetCard(0xd1) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) -end -function c49966595.sptg1(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 - and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c49966595.spfilter1,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c49966595.spop1(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - if Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)~=0 then return end - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c49966595.spfilter1,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_ATTACK) - end -end -function c49966595.spcon2(e,tp,eg,ep,ev,re,r,rp) - local c=Duel.GetAttacker() - return c:IsControler(tp) and c:IsSetCard(0xd1) and Duel.GetAttackTarget()==nil -end -function c49966595.spcost2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetFlagEffect(tp,49966596)==0 end - Duel.RegisterFlagEffect(tp,49966596,RESET_PHASE+PHASE_END,0,1) -end -function c49966595.spfilter2(c,e,tp) - return c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,1-tp) -end -function c49966595.sptg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_GRAVE) and c49966595.spfilter2(chkc,e,tp) end - if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)==0 - and Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c49966595.spfilter2,tp,0,LOCATION_GRAVE,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c49966595.spfilter2,tp,0,LOCATION_GRAVE,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c49966595.spop2(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - if Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)~=0 then return end - if Duel.GetLocationCount(1-tp,LOCATION_MZONE)<=0 then return end - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,1-tp,false,false,POS_FACEUP) - end -end diff --git a/script/c49980185.lua b/script/c49980185.lua deleted file mode 100644 index 35cdf0781b..0000000000 --- a/script/c49980185.lua +++ /dev/null @@ -1 +0,0 @@ ---超能力治療 function c49980185.initial_effect(c) --recover local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCategory(CATEGORY_RECOVER) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetCode(EVENT_FREE_CHAIN) e1:SetHintTiming(TIMING_END_PHASE) e1:SetCondition(c49980185.reccon) e1:SetTarget(c49980185.rectg) e1:SetOperation(c49980185.recop) c:RegisterEffect(e1) if not c49980185.global_check then c49980185.global_check=true c49980185[0]=0 local ge1=Effect.CreateEffect(c) ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) ge1:SetCode(EVENT_TO_GRAVE) ge1:SetOperation(c49980185.checkop) Duel.RegisterEffect(ge1,0) local ge2=Effect.CreateEffect(c) ge2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) ge2:SetCode(EVENT_PHASE_START+PHASE_DRAW) ge2:SetOperation(c49980185.clear) Duel.RegisterEffect(ge2,0) end end function c49980185.checkop(e,tp,eg,ep,ev,re,r,rp) c49980185[0]=c49980185[0]+eg:FilterCount(Card.IsRace,nil,RACE_PSYCHO) end function c49980185.clear(e,tp,eg,ep,ev,re,r,rp) c49980185[0]=0 end function c49980185.reccon(e,tp,eg,ep,ev,re,r,rp,chk) return Duel.GetCurrentPhase()==PHASE_END end function c49980185.rectg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return c49980185[0]~=0 end Duel.SetTargetPlayer(tp) Duel.SetTargetParam(c49980185[0]*1000) Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,c49980185[0]*1000) end function c49980185.recop(e,tp,eg,ep,ev,re,r,rp) local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) Duel.Recover(p,c49980185[0]*1000,REASON_EFFECT) end \ No newline at end of file diff --git a/script/c49998907.lua b/script/c49998907.lua deleted file mode 100644 index fa1e2aa9f9..0000000000 --- a/script/c49998907.lua +++ /dev/null @@ -1,16 +0,0 @@ ---コザッキーの研究成果 -function c49998907.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c49998907.target) - e1:SetOperation(c49998907.activate) - c:RegisterEffect(e1) -end -function c49998907.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>2 end -end -function c49998907.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.SortDecktop(tp,tp,3) -end diff --git a/script/c50032342.lua b/script/c50032342.lua deleted file mode 100644 index 6573eec069..0000000000 --- a/script/c50032342.lua +++ /dev/null @@ -1,34 +0,0 @@ ---氷結界の軍師 -function c50032342.initial_effect(c) - --draw - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(50032342,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetCategory(CATEGORY_DRAW) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCost(c50032342.cost) - e1:SetTarget(c50032342.target) - e1:SetOperation(c50032342.operation) - c:RegisterEffect(e1) -end -function c50032342.cfilter(c) - return c:IsSetCard(0x2f) and c:IsType(TYPE_MONSTER) and c:IsAbleToGraveAsCost() -end -function c50032342.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c50032342.cfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c50032342.cfilter,tp,LOCATION_HAND,0,1,1,nil) - Duel.SendtoGrave(g,REASON_COST) -end -function c50032342.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(1) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c50032342.operation(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end diff --git a/script/c50045299.lua b/script/c50045299.lua deleted file mode 100644 index f294bce43d..0000000000 --- a/script/c50045299.lua +++ /dev/null @@ -1,23 +0,0 @@ ---ドラゴン族・封印の壺 -function c50045299.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --Pos Change - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_SET_POSITION) - e2:SetRange(LOCATION_SZONE) - e2:SetTarget(c50045299.target) - e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e2:SetValue(POS_FACEUP_DEFENCE) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EFFECT_CANNOT_CHANGE_POSITION) - c:RegisterEffect(e3) -end -function c50045299.target(e,c) - return c:IsRace(RACE_DRAGON) -end diff --git a/script/c50074392.lua b/script/c50074392.lua deleted file mode 100644 index a3b53e5320..0000000000 --- a/script/c50074392.lua +++ /dev/null @@ -1,67 +0,0 @@ ---霊水鳥シレーヌ・オルカ -function c50074392.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c50074392.spcon) - e1:SetValue(1) - c:RegisterEffect(e1) - --lv - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(50074392,0)) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetCondition(c50074392.lvcon) - e2:SetTarget(c50074392.lvtg) - e2:SetOperation(c50074392.lvop) - c:RegisterEffect(e2) -end -function c50074392.cfilter(c,rc) - return c:IsFaceup() and c:IsRace(rc) -end -function c50074392.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c50074392.cfilter,tp,LOCATION_MZONE,0,1,nil,RACE_FISH) - and Duel.IsExistingMatchingCard(c50074392.cfilter,tp,LOCATION_MZONE,0,1,nil,RACE_WINDBEAST) -end -function c50074392.lvcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+1 -end -function c50074392.filter(c) - return c:IsFaceup() and c:GetLevel()>0 -end -function c50074392.lvtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c50074392.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,567) - local lv=Duel.AnnounceNumber(tp,3,4,5) - e:SetLabel(lv) -end -function c50074392.lvop(e,tp,eg,ep,ev,re,r,rp) - local lv=e:GetLabel() - local g=Duel.GetMatchingGroup(c50074392.filter,tp,LOCATION_MZONE,0,nil) - local tc=g:GetFirst() - while tc do - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CHANGE_LEVEL) - e1:SetValue(lv) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - tc=g:GetNext() - end - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_CANNOT_TRIGGER) - e2:SetProperty(EFFECT_FLAG_IGNORE_RANGE) - e2:SetTarget(c50074392.actfilter) - e2:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e2,tp) -end -function c50074392.actfilter(e,c) - return c:GetControler()==e:GetHandlerPlayer() and c:IsType(TYPE_MONSTER) and not c:IsAttribute(ATTRIBUTE_WATER) -end diff --git a/script/c50074522.lua b/script/c50074522.lua deleted file mode 100644 index 7299ab3fa8..0000000000 --- a/script/c50074522.lua +++ /dev/null @@ -1,22 +0,0 @@ ---電磁蚊 -function c50074522.initial_effect(c) - --flip - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP) - e1:SetTarget(c50074522.target) - e1:SetOperation(c50074522.operation) - c:RegisterEffect(e1) -end -function c50074522.filter(c) - return c:IsFaceup() and c:IsRace(RACE_MACHINE) and c:IsDestructable() -end -function c50074522.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local g=Duel.GetMatchingGroup(c50074522.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c50074522.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c50074522.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - Duel.Destroy(g,REASON_EFFECT) -end diff --git a/script/c50078509.lua b/script/c50078509.lua deleted file mode 100644 index 1a429e202f..0000000000 --- a/script/c50078509.lua +++ /dev/null @@ -1,61 +0,0 @@ ---デモンズ・チェーン -function c50078509.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DISABLE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,0x1c0) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c50078509.target) - e1:SetOperation(c50078509.operation) - c:RegisterEffect(e1) - --Destroy - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e2:SetRange(LOCATION_SZONE) - e2:SetCode(EVENT_LEAVE_FIELD) - e2:SetCondition(c50078509.descon) - e2:SetOperation(c50078509.desop) - c:RegisterEffect(e2) -end -function c50078509.filter(c) - return c:IsFaceup() and c:IsType(TYPE_EFFECT) -end -function c50078509.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c50078509.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c50078509.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - local g=Duel.SelectTarget(tp,c50078509.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0) -end -function c50078509.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsRelateToEffect(e) then - c:SetCardTarget(tc) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_OWNER_RELATE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetCondition(c50078509.rcon) - tc:RegisterEffect(e1,true) - local e2=e1:Clone() - e2:SetCode(EFFECT_CANNOT_ATTACK) - tc:RegisterEffect(e2,true) - end -end -function c50078509.rcon(e) - return e:GetOwner():IsHasCardTarget(e:GetHandler()) -end -function c50078509.descon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsStatus(STATUS_DESTROY_CONFIRMED) then return false end - local tc=c:GetFirstCardTarget() - return tc and eg:IsContains(tc) and tc:IsReason(REASON_DESTROY) -end -function c50078509.desop(e,tp,eg,ep,ev,re,r,rp) - Duel.Destroy(e:GetHandler(), REASON_EFFECT) -end diff --git a/script/c50088247.lua b/script/c50088247.lua deleted file mode 100644 index 899f1775b4..0000000000 --- a/script/c50088247.lua +++ /dev/null @@ -1,71 +0,0 @@ ---氷結界の伝道師 -function c50088247.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c50088247.spcon) - e1:SetOperation(c50088247.spop) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(50088247,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCost(c50088247.spcost2) - e2:SetTarget(c50088247.sptg2) - e2:SetOperation(c50088247.spop2) - c:RegisterEffect(e2) - Duel.AddCustomActivityCounter(50088247,ACTIVITY_SPSUMMON,c50088247.counterfilter) -end -function c50088247.counterfilter(c) - return not c:IsLevelAbove(5) -end -function c50088247.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x2f) -end -function c50088247.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.GetCustomActivityCount(50088247,tp,ACTIVITY_SPSUMMON)==0 - and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c50088247.cfilter,tp,LOCATION_MZONE,0,1,nil) -end -function c50088247.spop(e,tp,eg,ep,ev,re,r,rp,c) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) - e1:SetTargetRange(1,0) - e1:SetTarget(c50088247.sumlimit) - Duel.RegisterEffect(e1,tp) -end -function c50088247.sumlimit(e,c,sump,sumtype,sumpos,targetp,se) - return c:IsLevelAbove(5) -end -function c50088247.spcost2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end -function c50088247.filter(c,e,tp) - return c:IsSetCard(0x2f) and c:GetCode()~=50088247 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c50088247.sptg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c50088247.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsExistingTarget(c50088247.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c50088247.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,g:GetCount(),0,0) -end -function c50088247.spop2(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c50091196.lua b/script/c50091196.lua deleted file mode 100644 index 0e37c8aacf..0000000000 --- a/script/c50091196.lua +++ /dev/null @@ -1,60 +0,0 @@ ---フォーミュラ・シンクロン -function c50091196.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure2(c,nil,aux.NonTuner(nil)) - c:EnableReviveLimit() - --synchro summon success - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(50091196,0)) - e1:SetCategory(CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(c50091196.drcon) - e1:SetTarget(c50091196.drtarg) - e1:SetOperation(c50091196.drop) - c:RegisterEffect(e1) - --synchro effect - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(50091196,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetHintTiming(0,0x1c0+TIMING_MAIN_END) - e2:SetRange(LOCATION_MZONE) - e2:SetCondition(c50091196.sccon) - e2:SetTarget(c50091196.sctarg) - e2:SetOperation(c50091196.scop) - c:RegisterEffect(e2) -end -function c50091196.drcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_SYNCHRO -end -function c50091196.drtarg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(1) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c50091196.drop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end -function c50091196.sccon(e,tp,eg,ep,ev,re,r,rp) - return not e:GetHandler():IsStatus(STATUS_CHAINING) and Duel.GetTurnPlayer()~=tp - and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2) -end -function c50091196.sctarg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,1,nil,e:GetHandler()) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function c50091196.scop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:GetControler()~=tp or not c:IsRelateToEffect(e) then return end - local g=Duel.GetMatchingGroup(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,nil,c) - if g:GetCount()>0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=g:Select(tp,1,1,nil) - Duel.SynchroSummon(tp,sg:GetFirst(),c) - end -end diff --git a/script/c5010422.lua b/script/c5010422.lua deleted file mode 100644 index e758153d95..0000000000 --- a/script/c5010422.lua +++ /dev/null @@ -1,30 +0,0 @@ ---占術姫ウィジャモリガン -function c5010422.initial_effect(c) - --flip - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP) - e1:SetOperation(c5010422.flipop) - c:RegisterEffect(e1) -end -function c5010422.flipop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - --destroy - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetCountLimit(1) - e1:SetOperation(c5010422.desop) - e1:SetReset(RESET_PHASE+RESET_END) - Duel.RegisterEffect(e1,tp) -end -function c5010422.desfilter(c) - return c:IsDefencePos() and c:IsDestructable() -end -function c5010422.desop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c5010422.desfilter,tp,0,LOCATION_MZONE,nil) - if g:GetCount()>0 then - Duel.Hint(HINT_CARD,0,5010422) - local ct=Duel.Destroy(g,REASON_EFFECT) - Duel.Damage(1-tp,ct*500,REASON_EFFECT) - end -end diff --git a/script/c50122883.lua b/script/c50122883.lua deleted file mode 100644 index 2c1a478ad5..0000000000 --- a/script/c50122883.lua +++ /dev/null @@ -1,25 +0,0 @@ ---朱い靴 -function c50122883.initial_effect(c) - --flip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(50122883,0)) - e1:SetCategory(CATEGORY_POSITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP) - e1:SetTarget(c50122883.target) - e1:SetOperation(c50122883.operation) - c:RegisterEffect(e1) -end -function c50122883.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE) - local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0) -end -function c50122883.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.ChangePosition(tc,POS_FACEUP_DEFENCE,0,POS_FACEUP_ATTACK,0) - end -end diff --git a/script/c50140163.lua b/script/c50140163.lua deleted file mode 100644 index d43a4d9aea..0000000000 --- a/script/c50140163.lua +++ /dev/null @@ -1,82 +0,0 @@ ---魅惑の女王 LV7 -function c50140163.initial_effect(c) - --equip - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetOperation(c50140163.regop) - c:RegisterEffect(e1) -end -c50140163.lvupcount=1 -c50140163.lvup={23756165} -c50140163.lvdncount=2 -c50140163.lvdn={23756165,87257460} -function c50140163.regop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:GetSummonType()==SUMMON_TYPE_SPECIAL+1 then - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(50140163,0)) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCondition(c50140163.eqcon) - e1:SetTarget(c50140163.eqtg) - e1:SetOperation(c50140163.eqop) - e1:SetReset(RESET_EVENT+0x1ff0000) - e1:SetLabelObject(e) - c:RegisterEffect(e1) - end -end -function c50140163.eqcon(e,tp,eg,ep,ev,re,r,rp) - local ec=e:GetLabelObject():GetLabelObject() - return ec==nil or ec:GetFlagEffect(50140163)==0 -end -function c50140163.filter(c) - return c:IsAbleToChangeControler() -end -function c50140163.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c50140163.filter(chkc) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingTarget(c50140163.filter,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local g=Duel.SelectTarget(tp,c50140163.filter,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0) -end -function c50140163.eqlimit(e,c) - return e:GetOwner()==c and not c:IsDisabled() -end -function c50140163.eqop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - if c:IsFaceup() and c:IsRelateToEffect(e) then - local atk=tc:GetTextAttack() - local def=tc:GetTextDefence() - if atk<0 then atk=0 end - if def<0 then def=0 end - if not Duel.Equip(tp,tc,c,false) then return end - --Add Equip limit - tc:RegisterFlagEffect(50140163,RESET_EVENT+0x1fe0000,0,0) - e:GetLabelObject():SetLabelObject(tc) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_COPY_INHERIT+EFFECT_FLAG_OWNER_RELATE) - e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(c50140163.eqlimit) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_OWNER_RELATE+EFFECT_FLAG_SET_AVAILABLE) - e2:SetCode(EFFECT_DESTROY_SUBSTITUTE) - e2:SetReset(RESET_EVENT+0x1fe0000) - e2:SetValue(c50140163.repval) - tc:RegisterEffect(e2) - else Duel.SendtoGrave(tc,REASON_EFFECT) end - end -end -function c50140163.repval(e,re,r,rp) - return bit.band(r,REASON_BATTLE)~=0 -end diff --git a/script/c5014629.lua b/script/c5014629.lua deleted file mode 100644 index da7840c1b6..0000000000 --- a/script/c5014629.lua +++ /dev/null @@ -1,36 +0,0 @@ ---潜航母艦エアロ・シャーク -function c5014629.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,3,2) - c:EnableReviveLimit() - --damage - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(5014629,0)) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCost(c5014629.damcost) - e1:SetTarget(c5014629.damtg) - e1:SetOperation(c5014629.damop) - c:RegisterEffect(e1) -end -function c5014629.damcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c5014629.filter(c) - return c:IsFaceup() and c:IsType(TYPE_MONSTER) -end -function c5014629.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c5014629.filter,tp,LOCATION_REMOVED,0,1,nil) end - local ct=Duel.GetMatchingGroupCount(c5014629.filter,tp,LOCATION_REMOVED,0,nil) - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(ct*100) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,ct*100) -end -function c5014629.damop(e,tp,eg,ep,ev,re,r,rp) - local ct=Duel.GetMatchingGroupCount(c5014629.filter,tp,LOCATION_REMOVED,0,nil) - local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) - Duel.Damage(p,ct*100,REASON_EFFECT) -end diff --git a/script/c50152549.lua b/script/c50152549.lua deleted file mode 100644 index 55d82856ff..0000000000 --- a/script/c50152549.lua +++ /dev/null @@ -1,43 +0,0 @@ ---しびれ薬 -function c50152549.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c50152549.target) - e1:SetOperation(c50152549.operation) - c:RegisterEffect(e1) - --atklimit - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_CANNOT_ATTACK) - c:RegisterEffect(e2) - --equip limit - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetCode(EFFECT_EQUIP_LIMIT) - e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e4:SetValue(c50152549.eqlimit) - c:RegisterEffect(e4) -end -function c50152549.eqlimit(e,c) - return not c:IsRace(RACE_MACHINE) -end -function c50152549.filter(c) - return c:IsFaceup() and not c:IsRace(RACE_MACHINE) -end -function c50152549.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c50152549.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c50152549.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c50152549.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c50152549.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,e:GetHandler(),tc) - end -end diff --git a/script/c50155385.lua b/script/c50155385.lua deleted file mode 100644 index fbf02112d0..0000000000 --- a/script/c50155385.lua +++ /dev/null @@ -1,43 +0,0 @@ ---スピリチューアル・ウィスパー -function c50155385.initial_effect(c) - --battle indes - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_INDESTRUCTABLE_COUNT) - e1:SetCountLimit(1) - e1:SetValue(c50155385.valcon) - c:RegisterEffect(e1) - --tohand - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(50155385,0)) - e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetCondition(c50155385.thcon) - e2:SetTarget(c50155385.thtg) - e2:SetOperation(c50155385.thop) - c:RegisterEffect(e2) -end -function c50155385.valcon(e,re,r,rp) - return bit.band(r,REASON_BATTLE)~=0 -end -function c50155385.thcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_PENDULUM -end -function c50155385.filter(c) - return c:IsType(TYPE_RITUAL) and c:IsAbleToHand() -end -function c50155385.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c50155385.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c50155385.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c50155385.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c50164989.lua b/script/c50164989.lua deleted file mode 100644 index ec6fa09b4d..0000000000 --- a/script/c50164989.lua +++ /dev/null @@ -1,29 +0,0 @@ ---ダーク・ヴァージャー -function c50164989.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(50164989,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetRange(LOCATION_GRAVE) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetCondition(c50164989.spcon) - e1:SetTarget(c50164989.sptg) - e1:SetOperation(c50164989.spop) - c:RegisterEffect(e1) -end -function c50164989.spcon(e,tp,eg,ep,ev,re,r,rp) - local tc=eg:GetFirst() - return tc:IsControler(tp) and tc:IsRace(RACE_PLANT) and tc:IsType(TYPE_TUNER) -end -function c50164989.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c50164989.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP_ATTACK) - end -end diff --git a/script/c50185950.lua b/script/c50185950.lua deleted file mode 100644 index c7281cf34e..0000000000 --- a/script/c50185950.lua +++ /dev/null @@ -1,46 +0,0 @@ ---サクリボー -function c50185950.initial_effect(c) - --draw - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(50185950,0)) - e1:SetCategory(CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_RELEASE) - e1:SetTarget(c50185950.drtg) - e1:SetOperation(c50185950.drop) - c:RegisterEffect(e1) - --destroy replace - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_DESTROY_REPLACE) - e2:SetRange(LOCATION_GRAVE) - e2:SetTarget(c50185950.reptg) - e2:SetValue(c50185950.repval) - e2:SetOperation(c50185950.repop) - c:RegisterEffect(e2) -end -function c50185950.drtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(1) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c50185950.drop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end -function c50185950.filter(c,tp) - return c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) - and c:IsReason(REASON_BATTLE) and not c:IsReason(REASON_REPLACE) -end -function c50185950.reptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return eg:IsExists(c50185950.filter,1,nil,tp) and e:GetHandler():IsAbleToRemove() end - return Duel.SelectYesNo(tp,aux.Stringid(50185950,1)) -end -function c50185950.repval(e,c) - return c50185950.filter(c,e:GetHandlerPlayer()) -end -function c50185950.repop(e,tp,eg,ep,ev,re,r,rp) - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT+REASON_REPLACE) -end diff --git a/script/c50215517.lua b/script/c50215517.lua deleted file mode 100644 index 1010370908..0000000000 --- a/script/c50215517.lua +++ /dev/null @@ -1,30 +0,0 @@ ---クリムゾン・ヘル・セキュア -function c50215517.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c50215517.condition) - e1:SetTarget(c50215517.target) - e1:SetOperation(c50215517.activate) - c:RegisterEffect(e1) -end -function c50215517.cfilter(c) - return c:IsFaceup() and c:IsCode(70902743) -end -function c50215517.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c50215517.cfilter,tp,LOCATION_ONFIELD,0,1,nil) -end -function c50215517.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable() -end -function c50215517.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c50215517.filter,tp,0,LOCATION_ONFIELD,1,nil) end - local sg=Duel.GetMatchingGroup(c50215517.filter,tp,0,LOCATION_ONFIELD,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,sg:GetCount(),0,0) -end -function c50215517.activate(e,tp,eg,ep,ev,re,r,rp) - local sg=Duel.GetMatchingGroup(c50215517.filter,tp,0,LOCATION_ONFIELD,e:GetHandler()) - Duel.Destroy(sg,REASON_EFFECT) -end diff --git a/script/c50243722.lua b/script/c50243722.lua deleted file mode 100644 index 84b62f5249..0000000000 --- a/script/c50243722.lua +++ /dev/null @@ -1,35 +0,0 @@ ---バースト・リバース -function c50243722.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_END_PHASE) - e1:SetCost(c50243722.cost) - e1:SetTarget(c50243722.target) - e1:SetOperation(c50243722.operation) - c:RegisterEffect(e1) -end -function c50243722.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,2000) end - Duel.PayLPCost(tp,2000) -end -function c50243722.filter(c,e,tp) - return c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN) -end -function c50243722.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c50243722.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c50243722.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c50243722.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c50243722.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEDOWN_DEFENCE) - end -end diff --git a/script/c50259460.lua b/script/c50259460.lua deleted file mode 100644 index 37e6d4f2c3..0000000000 --- a/script/c50259460.lua +++ /dev/null @@ -1,12 +0,0 @@ ---破壊神 ヴァサーゴ -function c50259460.initial_effect(c) - --fusion substitute - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_FUSION_SUBSTITUTE) - e1:SetCondition(c50259460.subcon) - c:RegisterEffect(e1) -end -function c50259460.subcon(e) - return e:GetHandler():IsLocation(LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE) -end diff --git a/script/c50260683.lua b/script/c50260683.lua deleted file mode 100644 index 35b3fabee2..0000000000 --- a/script/c50260683.lua +++ /dev/null @@ -1,81 +0,0 @@ ---No.36 先史遺産-超機関フォーク=ヒューク -function c50260683.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0x70),4,2) - c:EnableReviveLimit() - --atkdown - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(50260683,0)) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCondition(c50260683.condition) - e1:SetCost(c50260683.cost) - e1:SetTarget(c50260683.target) - e1:SetOperation(c50260683.operation) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(50260683,1)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetRange(LOCATION_MZONE) - e2:SetCost(c50260683.descost) - e2:SetTarget(c50260683.destg) - e2:SetOperation(c50260683.desop) - c:RegisterEffect(e2) -end -c50260683.xyz_number=36 -function c50260683.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end -function c50260683.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c50260683.filter(c) - return c:IsFaceup() and c:GetAttack()>0 -end -function c50260683.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and c50260683.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c50260683.filter,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c50260683.filter,tp,0,LOCATION_MZONE,1,1,nil) -end -function c50260683.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) and tc:GetAttack()>0 then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetValue(0) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - end -end -function c50260683.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsSetCard,1,nil,0x70) end - local g=Duel.SelectReleaseGroup(tp,Card.IsSetCard,1,1,nil,0x70) - Duel.Release(g,REASON_COST) -end -function c50260683.filter2(c) - return c:IsFaceup() and c:GetAttack()~=c:GetBaseAttack() and c:IsDestructable() -end -function c50260683.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c50260683.filter2(chkc) end - if chk==0 then return Duel.IsExistingTarget(c50260683.filter2,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c50260683.filter2,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c50260683.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) and tc:GetAttack()~=tc:GetBaseAttack() then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c5026221.lua b/script/c5026221.lua deleted file mode 100644 index bc2b394a11..0000000000 --- a/script/c5026221.lua +++ /dev/null @@ -1,63 +0,0 @@ ---神星なる波動 -function c5026221.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c5026221.target1) - e1:SetOperation(c5026221.operation) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(5026221,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetRange(LOCATION_SZONE) - e2:SetCountLimit(1) - e2:SetCondition(c5026221.condition) - e2:SetTarget(c5026221.target2) - e2:SetOperation(c5026221.operation) - e2:SetLabel(1) - c:RegisterEffect(e2) -end -function c5026221.target1(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local tn=Duel.GetTurnPlayer() - local ph=Duel.GetCurrentPhase() - if ((tn==tp and (ph==PHASE_MAIN1 or ph==PHASE_MAIN2)) or (tn~=tp and ph==PHASE_BATTLE)) - and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c5026221.filter,tp,LOCATION_HAND,0,1,nil,e,tp) - and Duel.SelectYesNo(tp,94) then - e:GetHandler():RegisterFlagEffect(5026221,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) - e:GetHandler():RegisterFlagEffect(0,RESET_CHAIN,EFFECT_FLAG_CLIENT_HINT,1,0,65) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) - end -end -function c5026221.condition(e,tp,eg,ep,ev,re,r,rp) - local ph=Duel.GetCurrentPhase() - if Duel.GetTurnPlayer()==tp then - return ph==PHASE_MAIN1 or ph==PHASE_MAIN2 - else - return ph==PHASE_BATTLE - end -end -function c5026221.filter(c,e,tp) - return c:IsSetCard(0x9c) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c5026221.target2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():GetFlagEffect(5026221)==0 - and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c5026221.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end - e:GetHandler():RegisterFlagEffect(5026221,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c5026221.operation(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():GetFlagEffect(5026221)==0 or not e:GetHandler():IsRelateToEffect(e) then return end - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c5026221.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c50263751.lua b/script/c50263751.lua deleted file mode 100644 index b6b75e8bbe..0000000000 --- a/script/c50263751.lua +++ /dev/null @@ -1,50 +0,0 @@ ---グリード・クエーサー -function c50263751.initial_effect(c) - --base attack - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_BASE_ATTACK) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetValue(c50263751.atkval) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_SET_BASE_DEFENCE) - c:RegisterEffect(e2) - --lvup - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_BATTLE_DESTROYING) - e2:SetCondition(c50263751.condition) - e2:SetOperation(c50263751.operation) - c:RegisterEffect(e2) -end -function c50263751.atkval(e,c) - return c:GetLevel()*300 -end -function c50263751.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsRelateToBattle() and e:GetHandler():IsFaceup() -end -function c50263751.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local bc=c:GetBattleTarget() - local lv=bc:GetLevel() - if lv>0 then - if c:GetFlagEffect(50263751)==0 then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_LEVEL) - e1:SetValue(lv) - e1:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e1) - c:RegisterFlagEffect(50263751,RESET_EVENT+0x1ff0000,0,0) - e:SetLabelObject(e1) - e:SetLabel(lv) - else - local pe=e:GetLabelObject() - local ct=e:GetLabel()+lv - e:SetLabel(ct) - pe:SetValue(ct) - end - end -end diff --git a/script/c50277973.lua b/script/c50277973.lua deleted file mode 100644 index f5fa3b5b89..0000000000 --- a/script/c50277973.lua +++ /dev/null @@ -1,56 +0,0 @@ ---鏡像のスワンプマン -function c50277973.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c50277973.target) - e1:SetOperation(c50277973.activate) - c:RegisterEffect(e1) -end -function c50277973.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local rac=0 - local crac=1 - for irac=0,23 do - local catt=1 - for iatt=0,7 do - if Duel.IsPlayerCanSpecialSummonMonster(tp,50277973,0,0x11,1800,1000,4,crac,catt) then - rac=rac+crac - break - end - catt=catt*2 - end - crac=crac*2 - end - e:SetLabel(rac) - return rac~=0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - end - Duel.Hint(HINT_SELECTMSG,tp,563) - local crac=Duel.AnnounceRace(tp,1,e:GetLabel()) - local att=0 - local catt=1 - for iatt=0,7 do - if Duel.IsPlayerCanSpecialSummonMonster(tp,50277973,0,0x11,1800,1000,4,crac,catt) then - att=att+catt - end - catt=catt*2 - end - Duel.Hint(HINT_SELECTMSG,tp,562) - catt=Duel.AnnounceAttribute(tp,1,att) - e:SetLabel(crac) - Duel.SetTargetParam(catt) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c50277973.activate(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) then return end - local rac=e:GetLabel() - local att=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 - or not Duel.IsPlayerCanSpecialSummonMonster(tp,50277973,0,0x11,1800,1000,4,rac,att) then return end - c:AddTrapMonsterAttribute(TYPE_NORMAL,att,rac,4,1800,1000) - Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP) - c:TrapMonsterBlock() -end diff --git a/script/c50278554.lua b/script/c50278554.lua deleted file mode 100644 index ae6b86bb5c..0000000000 --- a/script/c50278554.lua +++ /dev/null @@ -1,68 +0,0 @@ ---スクラップ・ツイン・ドラゴン -function c50278554.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0x24),aux.NonTuner(nil),1) - c:EnableReviveLimit() - --Destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(50278554,0)) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_TOHAND) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_MZONE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c50278554.destg) - e1:SetOperation(c50278554.desop) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(50278554,1)) - e2:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetCondition(c50278554.spcon) - e2:SetTarget(c50278554.sptg) - e2:SetOperation(c50278554.spop) - c:RegisterEffect(e2) -end -function c50278554.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,LOCATION_ONFIELD,0,1,nil) - and Duel.IsExistingTarget(Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,2,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g1=Duel.SelectTarget(tp,Card.IsDestructable,tp,LOCATION_ONFIELD,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g1,1,0,0) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g2=Duel.SelectTarget(tp,Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,2,2,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g2,2,0,0) -end -function c50278554.desop(e,tp,eg,ep,ev,re,r,rp) - local ex,g1=Duel.GetOperationInfo(0,CATEGORY_DESTROY) - local ex,g2=Duel.GetOperationInfo(0,CATEGORY_TOHAND) - if g1:GetFirst():IsRelateToEffect(e) and Duel.Destroy(g1,REASON_EFFECT)~=0 then - local hg=g2:Filter(Card.IsRelateToEffect,nil,e) - Duel.SendtoHand(hg,nil,REASON_EFFECT) - end -end -function c50278554.spcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local crp=c:GetReasonPlayer() - return c:IsReason(REASON_DESTROY) and c:GetPreviousControler()==tp and tp~=crp and crp~=PLAYER_NONE -end -function c50278554.spfilter(c,e,tp) - return c:IsSetCard(0x24) and not c:IsType(TYPE_SYNCHRO) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c50278554.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c50278554.spfilter(chkc,e,tp) end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c50278554.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,g:GetCount(),0,0) -end -function c50278554.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c50282757.lua b/script/c50282757.lua deleted file mode 100644 index 3b9abf9c65..0000000000 --- a/script/c50282757.lua +++ /dev/null @@ -1,54 +0,0 @@ ---E-HERO ヘル・スナイパー -function c50282757.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcCode2(c,84327329,58932615,true,true) - --spsummon condition - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(c50282757.splimit) - c:RegisterEffect(e1) - --damage - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(50282757,0)) - e2:SetCategory(CATEGORY_DAMAGE) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetCondition(c50282757.condition) - e2:SetTarget(c50282757.target) - e2:SetOperation(c50282757.operation) - c:RegisterEffect(e2) - --indes - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e3:SetRange(LOCATION_MZONE) - e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - e3:SetValue(c50282757.indesval) - c:RegisterEffect(e3) -end -function c50282757.splimit(e,se,sp,st) - return st==SUMMON_TYPE_FUSION+0x10 -end -function c50282757.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPosition(POS_FACEUP_DEFENCE) and Duel.GetTurnPlayer()==tp -end -function c50282757.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(1000) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,0,0,1-tp,1000) -end -function c50282757.operation(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) or e:GetHandler():IsFacedown() then return end - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end -function c50282757.indesval(e,re) - return re:IsActiveType(TYPE_SPELL) -end diff --git a/script/c50287060.lua b/script/c50287060.lua deleted file mode 100644 index c4880f88fc..0000000000 --- a/script/c50287060.lua +++ /dev/null @@ -1,45 +0,0 @@ ---暗黒魔族ギルファー・デーモン -function c50287060.initial_effect(c) - --equip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(50287060,0)) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetTarget(c50287060.eqtg) - e1:SetOperation(c50287060.eqop) - c:RegisterEffect(e1) -end -function c50287060.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) -end -function c50287060.eqlimit(e,c) - return e:GetOwner()==c -end -function c50287060.eqop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsRelateToEffect(e) then - Duel.Equip(tp,c,tc,true) - --Add Equip limit - local e1=Effect.CreateEffect(tc) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(c50287060.eqlimit) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(-500) - e2:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e2) - end -end diff --git a/script/c50292967.lua b/script/c50292967.lua deleted file mode 100644 index f07ca402a3..0000000000 --- a/script/c50292967.lua +++ /dev/null @@ -1,43 +0,0 @@ ---パスト・イメージ -function c50292967.initial_effect(c) - --remove - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_REMOVE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,0x1c0) - e1:SetCondition(c50292967.condition) - e1:SetTarget(c50292967.target) - e1:SetOperation(c50292967.operation) - c:RegisterEffect(e1) -end -function c50292967.cfilter(c) - return c:IsFaceup() and c:IsRace(RACE_PSYCHO) -end -function c50292967.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c50292967.cfilter,tp,LOCATION_MZONE,0,1,nil) -end -function c50292967.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsAbleToRemove() end - if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) -end -function c50292967.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.Remove(tc,0,REASON_EFFECT+REASON_TEMPORARY)~=0 then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) - e1:SetReset(RESET_PHASE+PHASE_STANDBY) - e1:SetLabelObject(tc) - e1:SetCountLimit(1) - e1:SetOperation(c50292967.retop) - Duel.RegisterEffect(e1,tp) - end -end -function c50292967.retop(e,tp,eg,ep,ev,re,r,rp) - Duel.ReturnToField(e:GetLabelObject()) -end diff --git a/script/c50304345.lua b/script/c50304345.lua deleted file mode 100644 index 5c8ede8417..0000000000 --- a/script/c50304345.lua +++ /dev/null @@ -1,50 +0,0 @@ ---E-HERO ヘル・ブラット -function c50304345.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_SPSUM_PARAM) - e1:SetTargetRange(POS_FACEUP_ATTACK,0) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c50304345.spcon) - c:RegisterEffect(e1) - --to grave - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_BE_MATERIAL) - e2:SetOperation(c50304345.regop) - c:RegisterEffect(e2) -end -function c50304345.spcon(e,c) - if c==nil then return true end - return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 - and Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0,nil)==0 -end -function c50304345.regop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local rc=e:GetHandler():GetReasonCard() - if r==REASON_SUMMON and rc:IsSetCard(0x8) then - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(50304345,0)) - e1:SetCategory(CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_GRAVE) - e1:SetTarget(c50304345.drtarget) - e1:SetOperation(c50304345.droperation) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - c:RegisterEffect(e1) - end -end -function c50304345.drtarget(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(1) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c50304345.droperation(e,tp,eg,ep,ev,re,r,rp) - local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) - Duel.Draw(p,1,REASON_EFFECT) -end diff --git a/script/c50319138.lua b/script/c50319138.lua deleted file mode 100644 index bdc262c746..0000000000 --- a/script/c50319138.lua +++ /dev/null @@ -1,35 +0,0 @@ ---バグマンZ -function c50319138.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(50319138,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetCondition(c50319138.condition) - e1:SetTarget(c50319138.target) - e1:SetOperation(c50319138.operation) - c:RegisterEffect(e1) -end -function c50319138.cfilter(c) - return c:IsFaceup() and c:IsCode(87526784) -end -function c50319138.spfilter(c,e,tp) - return c:IsCode(23915499) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c50319138.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c50319138.cfilter,tp,LOCATION_ONFIELD,0,1,nil) -end -function c50319138.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c50319138.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c50319138.operation(e,tp,eg,ep,ev,re,r,rp,chk) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - if not Duel.IsExistingMatchingCard(c50319138.cfilter,tp,LOCATION_ONFIELD,0,1,nil) then return end - local tc=Duel.GetFirstMatchingCard(c50319138.spfilter,tp,LOCATION_DECK,0,nil,e,tp) - if tc then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c50321796.lua b/script/c50321796.lua deleted file mode 100644 index 21c293e5eb..0000000000 --- a/script/c50321796.lua +++ /dev/null @@ -1,43 +0,0 @@ ---氷結界の龍 ブリューナク -function c50321796.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1) - c:EnableReviveLimit() - --to hand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(50321796,0)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c50321796.cost) - e1:SetTarget(c50321796.target) - e1:SetOperation(c50321796.operation) - c:RegisterEffect(e1) -end -function c50321796.costfilter(c) - return c:IsDiscardable() and c:IsAbleToGraveAsCost() -end -function c50321796.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c50321796.costfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end - local rt=Duel.GetTargetCount(Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) - local cg=Duel.SelectMatchingCard(tp,c50321796.costfilter,tp,LOCATION_HAND,0,1,rt,nil) - Duel.SendtoGrave(cg,REASON_COST+REASON_DISCARD) - e:SetLabel(cg:GetCount()) -end -function c50321796.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsAbleToHand() end - if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end - local ct=e:GetLabel() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local eg=Duel.SelectTarget(tp,Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,ct,ct,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,eg,ct,0,0) -end -function c50321796.operation(e,tp,eg,ep,ev,re,r,rp,chk) - local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local rg=tg:Filter(Card.IsRelateToEffect,nil,e) - if rg:GetCount()>0 then - Duel.SendtoHand(rg,nil,REASON_EFFECT) - end -end diff --git a/script/c50323155.lua b/script/c50323155.lua deleted file mode 100644 index 93b4a007f3..0000000000 --- a/script/c50323155.lua +++ /dev/null @@ -1,24 +0,0 @@ ---昇天の黒角笛 -function c50323155.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DISABLE_SUMMON+CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_SPSUMMON) - e1:SetCondition(c50323155.condition) - e1:SetTarget(c50323155.target) - e1:SetOperation(c50323155.activate) - c:RegisterEffect(e1) -end -function c50323155.condition(e,tp,eg,ep,ev,re,r,rp) - return tp~=ep and eg:GetCount()==1 and Duel.GetCurrentChain()==0 -end -function c50323155.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DISABLE_SUMMON,eg,eg:GetCount(),0,0) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,eg:GetCount(),0,0) -end -function c50323155.activate(e,tp,eg,ep,ev,re,r,rp,chk) - Duel.NegateSummon(eg) - Duel.Destroy(eg,REASON_EFFECT) -end diff --git a/script/c5037726.lua b/script/c5037726.lua deleted file mode 100644 index ca975d6988..0000000000 --- a/script/c5037726.lua +++ /dev/null @@ -1,59 +0,0 @@ ---光霊術-「聖」 -function c5037726.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCost(c5037726.cost) - e1:SetTarget(c5037726.target) - e1:SetOperation(c5037726.operation) - c:RegisterEffect(e1) -end -function c5037726.cost(e,tp,eg,ep,ev,re,r,rp,chk) - e:SetLabel(1) - if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsAttribute,1,nil,ATTRIBUTE_LIGHT) end - local g=Duel.SelectReleaseGroup(tp,Card.IsAttribute,1,1,nil,ATTRIBUTE_LIGHT) - Duel.Release(g,REASON_COST) -end -function c5037726.filter(c,e,tp) - return c:IsFaceup() and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c5037726.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_REMOVED) and c5037726.filter(chkc,e,tp) end - if chk==0 then - if e:GetLabel()==1 then - e:SetLabel(0) - return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsExistingTarget(c5037726.filter,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,nil,e,tp) - else - return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c5037726.filter,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,nil,e,tp) - end - end - e:SetLabel(0) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c5037726.filter,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c5037726.cfilter(c) - return not c:IsPublic() and c:IsType(TYPE_TRAP) -end -function c5037726.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - local g=Duel.GetMatchingGroup(c5037726.cfilter,tp,0,LOCATION_HAND,nil) - if g:GetCount()>0 and Duel.SelectYesNo(1-tp,aux.Stringid(5037726,0)) then - Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_CONFIRM) - local sg=g:Select(1-tp,1,1,nil) - Duel.ConfirmCards(tp,sg) - Duel.ShuffleHand(1-tp) - if Duel.IsChainDisablable(0) then - Duel.NegateEffect(0) - return - end - end - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c50400231.lua b/script/c50400231.lua deleted file mode 100644 index 9d31e5e6c2..0000000000 --- a/script/c50400231.lua +++ /dev/null @@ -1,48 +0,0 @@ ---サテライト・キャノン -function c50400231.initial_effect(c) - --ind - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e1:SetValue(c50400231.indval) - c:RegisterEffect(e1) - --atkup - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(50400231,0)) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EVENT_PHASE+PHASE_END) - e2:SetCountLimit(1) - e2:SetCondition(c50400231.atkcon) - e2:SetOperation(c50400231.atkop) - c:RegisterEffect(e2) - --atk clear - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e3:SetCode(EVENT_BATTLED) - e3:SetOperation(c50400231.retop) - c:RegisterEffect(e3) -end -function c50400231.indval(e,c) - return c:IsLevelBelow(7) -end -function c50400231.atkcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c50400231.atkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(1000) - e1:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e1) - end -end -function c50400231.retop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c==Duel.GetAttacker() then - c:ResetEffect(RESET_DISABLE,RESET_EVENT) - end -end diff --git a/script/c50407691.lua b/script/c50407691.lua deleted file mode 100644 index c02266136e..0000000000 --- a/script/c50407691.lua +++ /dev/null @@ -1,50 +0,0 @@ ---イグナイト・ライオット -function c50407691.initial_effect(c) - --pendulum summon - aux.AddPendulumProcedure(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --tohand - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_DESTROY+CATEGORY_TOHAND+CATEGORY_SEARCH) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_PZONE) - e2:SetCondition(c50407691.thcon) - e2:SetTarget(c50407691.thtg) - e2:SetOperation(c50407691.thop) - c:RegisterEffect(e2) -end -function c50407691.thcon(e,tp,eg,ep,ev,re,r,rp) - local seq=e:GetHandler():GetSequence() - local pc=Duel.GetFieldCard(tp,LOCATION_SZONE,13-seq) - return pc and pc:IsSetCard(0xc8) -end -function c50407691.filter(c) - return c:IsRace(RACE_WARRIOR) and c:IsAttribute(ATTRIBUTE_FIRE) and c:IsAbleToHand() -end -function c50407691.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - local pc=Duel.GetFieldCard(tp,LOCATION_SZONE,13-c:GetSequence()) - if chk==0 then return c:IsDestructable() and pc:IsDestructable() - and Duel.IsExistingMatchingCard(c50407691.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end - local g=Group.FromCards(c,pc) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,2,0,0) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE) -end -function c50407691.thop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) then return end - local pc=Duel.GetFieldCard(tp,LOCATION_SZONE,13-c:GetSequence()) - if not pc then return end - local dg=Group.FromCards(c,pc) - if Duel.Destroy(dg,REASON_EFFECT)~=2 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c50407691.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil) - if g:GetCount()>0 and not g:GetFirst():IsHasEffect(EFFECT_NECRO_VALLEY) then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c50412166.lua b/script/c50412166.lua deleted file mode 100644 index 849865673f..0000000000 --- a/script/c50412166.lua +++ /dev/null @@ -1,34 +0,0 @@ ---シャブティのお守り -function c50412166.initial_effect(c) - --indes - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(50412166,0)) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c50412166.condition) - e1:SetCost(c50412166.cost) - e1:SetOperation(c50412166.operation) - c:RegisterEffect(e1) -end -function c50412166.condition(e,tp,eg,ep,ev,re,r,rp) - local ph=Duel.GetCurrentPhase() - return ph~=PHASE_MAIN2 and ph~=PHASE_END -end -function c50412166.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsDiscardable() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD) -end -function c50412166.operation(e,tp,eg,ep,ev,re,r,rp,chk) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetReset(RESET_PHASE+PHASE_END) - e1:SetTarget(c50412166.tgfilter) - e1:SetValue(1) - Duel.RegisterEffect(e1,tp) -end -function c50412166.tgfilter(e,c) - return c:IsSetCard(0x2e) -end diff --git a/script/c50418970.lua b/script/c50418970.lua deleted file mode 100644 index 9b5e39cf9b..0000000000 --- a/script/c50418970.lua +++ /dev/null @@ -1,115 +0,0 @@ ---スピリット・バーナー -function c50418970.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c50418970.target) - e1:SetOperation(c50418970.operation) - c:RegisterEffect(e1) - --Equip limit - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_EQUIP_LIMIT) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetValue(1) - c:RegisterEffect(e2) - --pos - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(50418970,0)) - e3:SetCategory(CATEGORY_POSITION) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_SZONE) - e3:SetCountLimit(1) - e3:SetTarget(c50418970.postg) - e3:SetOperation(c50418970.posop) - c:RegisterEffect(e3) - --damage - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(50418970,1)) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e4:SetCategory(CATEGORY_DAMAGE) - e4:SetCode(EVENT_TO_GRAVE) - e4:SetCondition(c50418970.damcon) - e4:SetTarget(c50418970.damtg) - e4:SetOperation(c50418970.damop) - c:RegisterEffect(e4) - -- - local e5=Effect.CreateEffect(c) - e5:SetDescription(aux.Stringid(50418970,2)) - e5:SetCategory(CATEGORY_TOHAND) - e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e5:SetCode(EVENT_PREDRAW) - e5:SetRange(LOCATION_GRAVE) - e5:SetCondition(c50418970.retcon) - e5:SetTarget(c50418970.rettg) - e5:SetOperation(c50418970.retop) - c:RegisterEffect(e5) -end -function c50418970.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c50418970.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,e:GetHandler(),tc) - end -end -function c50418970.postg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():GetEquipTarget():IsAttackPos() end -end -function c50418970.posop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - Duel.ChangePosition(e:GetHandler():GetEquipTarget(),POS_FACEUP_DEFENCE) -end -function c50418970.damcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local ec=c:GetPreviousEquipTarget() - return c:IsReason(REASON_LOST_TARGET) and ec:IsLocation(LOCATION_HAND) -end -function c50418970.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(600) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,600) -end -function c50418970.damop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end -function c50418970.retcon(e,tp,eg,ep,ev,re,r,rp) - return tp==Duel.GetTurnPlayer() and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0 - and Duel.GetDrawCount(tp)>0 -end -function c50418970.rettg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToHand() end - local dt=Duel.GetDrawCount(tp) - if dt~=0 then - _replace_count=0 - _replace_max=dt - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EFFECT_DRAW_COUNT) - e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_DRAW) - e1:SetValue(0) - Duel.RegisterEffect(e1,tp) - end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0) -end -function c50418970.retop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - _replace_count=_replace_count+1 - if _replace_count<=_replace_max and c:IsRelateToEffect(e) then - Duel.SendtoHand(c,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,c) - end -end diff --git a/script/c50427388.lua b/script/c50427388.lua deleted file mode 100644 index d92ba91460..0000000000 --- a/script/c50427388.lua +++ /dev/null @@ -1,39 +0,0 @@ ---暴走する魔力 -function c50427388.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c50427388.cost) - e1:SetTarget(c50427388.target) - e1:SetOperation(c50427388.activate) - c:RegisterEffect(e1) -end -function c50427388.cost(e,tp,eg,ep,ev,re,r,rp,chk) - e:SetLabel(1) - return true -end -function c50427388.cfilter(c) - return c:IsType(TYPE_SPELL) and c:IsAbleToRemove() -end -function c50427388.filter(c,def) - return c:IsFaceup() and c:IsDefenceBelow(def) and c:IsDestructable() -end -function c50427388.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - if e:GetLabel()~=1 then return false end - e:SetLabel(0) - local ct=Duel.GetMatchingGroupCount(c50427388.cfilter,tp,LOCATION_GRAVE,0,nil) - return Duel.IsExistingMatchingCard(c50427388.filter,tp,0,LOCATION_MZONE,1,nil,ct*300) - end - local g=Duel.GetMatchingGroup(c50427388.cfilter,tp,LOCATION_GRAVE,0,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) - e:SetLabel(g:GetCount()*300) - local sg=Duel.GetMatchingGroup(c50427388.filter,tp,0,LOCATION_MZONE,nil,g:GetCount()*300) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,sg:GetCount(),0,0) -end -function c50427388.activate(e,tp,eg,ep,ev,re,r,rp) - local sg=Duel.GetMatchingGroup(c50427388.filter,tp,0,LOCATION_MZONE,nil,e:GetLabel()) - Duel.Destroy(sg,REASON_EFFECT) -end diff --git a/script/c50433147.lua b/script/c50433147.lua deleted file mode 100644 index 199f2e778a..0000000000 --- a/script/c50433147.lua +++ /dev/null @@ -1,45 +0,0 @@ ---極星の輝き -function c50433147.initial_effect(c) - --activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --battle indestructable - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e2:SetTarget(c50433147.indtg) - e2:SetValue(1) - c:RegisterEffect(e2) - --destroy - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(50433147,0)) - e3:SetCategory(CATEGORY_DESTROY) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e3:SetCode(EVENT_DESTROYED) - e3:SetCondition(c50433147.descon) - e3:SetTarget(c50433147.destg) - e3:SetOperation(c50433147.desop) - c:RegisterEffect(e3) -end -function c50433147.indtg(e,c) - return c:IsSetCard(0x42) -end -function c50433147.descon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) -end -function c50433147.desfilter(c) - return c:IsFaceup() and c:IsSetCard(0x42) and c:IsDestructable() -end -function c50433147.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local g=Duel.GetMatchingGroup(c50433147.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c50433147.desop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c50433147.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - Duel.Destroy(g,REASON_EFFECT) -end diff --git a/script/c50449881.lua b/script/c50449881.lua deleted file mode 100644 index 44dad667d1..0000000000 --- a/script/c50449881.lua +++ /dev/null @@ -1,57 +0,0 @@ ---シャーク・フォートレス -function c50449881.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,5,2) - c:EnableReviveLimit() - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(50449881,0)) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c50449881.condition) - e1:SetCost(c50449881.cost) - e1:SetTarget(c50449881.target) - e1:SetOperation(c50449881.operation) - c:RegisterEffect(e1) - --atk limit - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET) - e2:SetRange(LOCATION_MZONE) - e2:SetTargetRange(0,LOCATION_MZONE) - e2:SetValue(c50449881.atlimit) - c:RegisterEffect(e2) -end -function c50449881.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsAbleToEnterBP() -end -function c50449881.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c50449881.filter(c) - return c:IsFaceup() and not c:IsHasEffect(EFFECT_EXTRA_ATTACK) -end -function c50449881.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c50449881.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c50449881.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c50449881.filter,tp,LOCATION_MZONE,0,1,1,nil) -end -function c50449881.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_EXTRA_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - e1:SetValue(1) - tc:RegisterEffect(e1) - end -end -function c50449881.atlimit(e,c) - return c~=e:GetHandler() -end diff --git a/script/c50457953.lua b/script/c50457953.lua deleted file mode 100644 index 32e3821829..0000000000 --- a/script/c50457953.lua +++ /dev/null @@ -1,36 +0,0 @@ ---幻木龙 -function c50457953.initial_effect(c) - --lvchange - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(50457953,0)) - e1:SetCategory(CATEGORY_LVCHANGE) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c50457953.lvtg) - e1:SetOperation(c50457953.lvop) - c:RegisterEffect(e1) -end -function c50457953.lvfilter(c,lv) - local clv=c:GetLevel() - return c:IsFaceup() and clv>0 and clv~=lv and c:IsAttribute(ATTRIBUTE_WATER) and c:IsRace(RACE_DRAGON) -end -function c50457953.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c50457953.lvfilter(chkc,e:GetHandler():GetLevel()) end - if chk==0 then return Duel.IsExistingTarget(c50457953.lvfilter,tp,LOCATION_MZONE,0,1,nil,e:GetHandler():GetLevel()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c50457953.lvfilter,tp,LOCATION_MZONE,0,1,1,nil,e:GetHandler():GetLevel()) -end -function c50457953.lvop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and c:IsFaceup() and tc:IsRelateToEffect(e) and tc:IsFaceup() then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CHANGE_LEVEL) - e1:SetValue(tc:GetLevel()) - e1:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e1) - end -end diff --git a/script/c50470982.lua b/script/c50470982.lua deleted file mode 100644 index e08f9511f5..0000000000 --- a/script/c50470982.lua +++ /dev/null @@ -1,24 +0,0 @@ ---運命の分かれ道 -function c50470982.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DRAW+CATEGORY_COIN) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_DRAW_PHASE) - e1:SetTarget(c50470982.target) - e1:SetOperation(c50470982.activate) - c:RegisterEffect(e1) -end -function c50470982.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_COIN,nil,0,PLAYER_ALL,1) -end -function c50470982.activate(e,tp,eg,ep,ev,re,r,rp) - local res=Duel.TossCoin(tp,1) - if res==1 then Duel.Recover(tp,2000,REASON_EFFECT) - else Duel.Damage(tp,2000,REASON_EFFECT) end - res=Duel.TossCoin(1-tp,1) - if res==1 then Duel.Recover(1-tp,2000,REASON_EFFECT) - else Duel.Damage(1-tp,2000,REASON_EFFECT) end -end diff --git a/script/c50474354.lua b/script/c50474354.lua deleted file mode 100644 index 6b925c409e..0000000000 --- a/script/c50474354.lua +++ /dev/null @@ -1,53 +0,0 @@ ---武神器-ヤサカニ -function c50474354.initial_effect(c) - --search - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(50474354,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(1,50474354) - e1:SetCondition(c50474354.condition) - e1:SetCost(c50474354.cost) - e1:SetTarget(c50474354.target) - e1:SetOperation(c50474354.operation) - c:RegisterEffect(e1) - Duel.AddCustomActivityCounter(50474354,ACTIVITY_CHAIN,c50474354.chainfilter) -end -function c50474354.chainfilter(re,tp,cid) - return re:GetHandler():IsSetCard(0x88) -end -function c50474354.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()==PHASE_MAIN2 -end -function c50474354.cost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return Duel.GetCustomActivityCount(50474354,tp,ACTIVITY_CHAIN)==0 and c:IsAbleToGraveAsCost() end - Duel.SendtoGrave(c,REASON_COST) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) - e1:SetCode(EFFECT_CANNOT_ACTIVATE) - e1:SetTargetRange(1,0) - e1:SetValue(c50474354.aclimit) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function c50474354.aclimit(e,re,tp) - return not re:GetHandler():IsSetCard(0x88) -end -function c50474354.filter(c) - return c:IsSetCard(0x88) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() -end -function c50474354.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c50474354.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c50474354.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c50474354.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c50485594.lua b/script/c50485594.lua deleted file mode 100644 index e177449e57..0000000000 --- a/script/c50485594.lua +++ /dev/null @@ -1,152 +0,0 @@ ---レスキューラット -function c50485594.initial_effect(c) - --pendulum summon - aux.AddPendulumProcedure(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --to hand - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(50485594,0)) - e2:SetCategory(CATEGORY_TOHAND) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_PZONE) - e2:SetCountLimit(1,50485594+EFFECT_COUNT_CODE_DUEL) - e2:SetCost(c50485594.thcost) - e2:SetTarget(c50485594.thtg) - e2:SetOperation(c50485594.thop) - c:RegisterEffect(e2) - --special summon - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e3:SetCode(EVENT_SUMMON_SUCCESS) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e3:SetOperation(c50485594.regop) - c:RegisterEffect(e3) - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(50485594,1)) - e4:SetCategory(CATEGORY_SPECIAL_SUMMON) - e4:SetType(EFFECT_TYPE_IGNITION) - e4:SetRange(LOCATION_MZONE) - e4:SetCost(c50485594.spcost) - e4:SetCondition(c50485594.spcon) - e4:SetTarget(c50485594.sptg) - e4:SetOperation(c50485594.spop) - c:RegisterEffect(e4) -end -function c50485594.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) -end -function c50485594.filter(c) - return c:IsFaceup() and c:IsType(TYPE_PENDULUM) and c:IsAbleToHand() -end -function c50485594.filter2(c,g) - return g:IsExists(Card.IsCode,1,c,c:GetCode()) -end -function c50485594.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local g=Duel.GetMatchingGroup(c50485594.filter,tp,LOCATION_EXTRA,0,nil) - return g:IsExists(c50485594.filter2,1,nil,g) - end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,2,tp,LOCATION_EXTRA) -end -function c50485594.thop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c50485594.filter,tp,LOCATION_EXTRA,0,nil) - local sg=g:Filter(c50485594.filter2,nil,g) - if sg:GetCount()==0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local hg1=sg:Select(tp,1,1,nil) - local hg2=sg:Filter(Card.IsCode,hg1:GetFirst(),hg1:GetFirst():GetCode()) - hg1:AddCard(hg2:GetFirst()) - Duel.SendtoHand(hg1,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,hg1) -end -function c50485594.regop(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():RegisterFlagEffect(50485594,RESET_EVENT+0x1fc0000+RESET_PHASE+PHASE_END,0,1) -end -function c50485594.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetFlagEffect(50485594)~=0 -end -function c50485594.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end -function c50485594.spfilter(c,e,tp) - return c:IsFaceup() and c:IsType(TYPE_PENDULUM) and c:IsLevelBelow(5) - and Duel.IsExistingMatchingCard(c50485594.spfilter2,tp,LOCATION_DECK,0,2,nil,c:GetCode(),e,tp) -end -function c50485594.spfilter2(c,code,e,tp) - return c:IsCode(code) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c50485594.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c50485594.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_DECK) -end -function c50485594.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - local g=Duel.SelectMatchingCard(tp,c50485594.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp) - if g:GetCount()==0 then return end - local code=g:GetFirst():GetCode() - local dg=Duel.GetMatchingGroup(c50485594.spfilter2,tp,LOCATION_DECK,0,nil,code,e,tp) - if dg:GetCount()>1 then - local c=e:GetHandler() - local fid=c:GetFieldID() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg1=dg:Select(tp,1,1,nil) - local tc1=sg1:GetFirst() - local sg2=dg:Filter(Card.IsCode,tc1,tc1:GetCode()) - local tc2=sg2:GetFirst() - Duel.SpecialSummonStep(tc1,0,tp,tp,false,false,POS_FACEUP) - Duel.SpecialSummonStep(tc2,0,tp,tp,false,false,POS_FACEUP) - tc1:RegisterFlagEffect(50485594,RESET_EVENT+0x1fe0000,0,1,fid) - tc2:RegisterFlagEffect(50485594,RESET_EVENT+0x1fe0000,0,1,fid) - Duel.SpecialSummonComplete() - sg1:Merge(sg2) - sg1:KeepAlive() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e1:SetCountLimit(1) - e1:SetLabel(fid) - e1:SetLabelObject(sg1) - e1:SetCondition(c50485594.descon) - e1:SetOperation(c50485594.desop) - Duel.RegisterEffect(e1,tp) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE) - e2:SetReset(RESET_EVENT+0x1fe0000) - tc1:RegisterEffect(e2) - local e3=e2:Clone() - tc2:RegisterEffect(e3) - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetCode(EFFECT_DISABLE_EFFECT) - e4:SetReset(RESET_EVENT+0x1fe0000) - tc1:RegisterEffect(e4) - local e5=e4:Clone() - tc2:RegisterEffect(e5) - end -end -function c50485594.desfilter(c,fid) - return c:GetFlagEffectLabel(50485594)==fid -end -function c50485594.descon(e,tp,eg,ep,ev,re,r,rp) - local g=e:GetLabelObject() - if not g:IsExists(c50485594.desfilter,1,nil,e:GetLabel()) then - g:DeleteGroup() - e:Reset() - return false - else return true end -end -function c50485594.desop(e,tp,eg,ep,ev,re,r,rp) - local g=e:GetLabelObject() - local tg=g:Filter(c50485594.desfilter,nil,e:GetLabel()) - Duel.Destroy(tg,REASON_EFFECT) -end diff --git a/script/c50491121.lua b/script/c50491121.lua deleted file mode 100644 index 6b9570702a..0000000000 --- a/script/c50491121.lua +++ /dev/null @@ -1,40 +0,0 @@ ---H・C スパルタス -function c50491121.initial_effect(c) - --atkup - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(50491121,0)) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetRange(LOCATION_MZONE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetCountLimit(1) - e1:SetCondition(c50491121.atkcon) - e1:SetTarget(c50491121.atktg) - e1:SetOperation(c50491121.atkop) - c:RegisterEffect(e1) -end -function c50491121.atkcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp -end -function c50491121.filter(c) - return c:IsFaceup() and c:IsSetCard(0x6f) -end -function c50491121.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c50491121.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c50491121.filter,tp,LOCATION_MZONE,0,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c50491121.filter,tp,LOCATION_MZONE,0,1,1,e:GetHandler()) -end -function c50491121.atkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsFaceup() and c:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(tc:GetBaseAttack()) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_BATTLE) - c:RegisterEffect(e1) - end -end diff --git a/script/c5050644.lua b/script/c5050644.lua deleted file mode 100644 index 474e791196..0000000000 --- a/script/c5050644.lua +++ /dev/null @@ -1,75 +0,0 @@ ---アロマガーデン -function c5050644.initial_effect(c) - --activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --recover 1 - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_RECOVER+CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_FZONE) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetCountLimit(1) - e2:SetCondition(c5050644.recon1) - e2:SetTarget(c5050644.retg1) - e2:SetOperation(c5050644.reop1) - c:RegisterEffect(e2) - --recover 2 - local e3=Effect.CreateEffect(c) - e3:SetCategory(CATEGORY_RECOVER) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e3:SetCode(EVENT_TO_GRAVE) - e3:SetRange(LOCATION_FZONE) - e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e3:SetCondition(c5050644.recon2) - e3:SetTarget(c5050644.retg2) - e3:SetOperation(c5050644.reop2) - c:RegisterEffect(e3) -end -function c5050644.cfilter1(c) - return c:IsFaceup() and c:IsSetCard(0xc9) -end -function c5050644.recon1(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c5050644.cfilter1,tp,LOCATION_MZONE,0,1,nil) -end -function c5050644.retg1(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(500) - Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,500) -end -function c5050644.reop1(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Recover(p,d,REASON_EFFECT) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetValue(500) - e1:SetReset(RESET_PHASE+RESET_END+RESET_OPPO_TURN) - Duel.RegisterEffect(e1,tp) - local e2=e1:Clone() - e2:SetCode(EFFECT_UPDATE_DEFENCE) - Duel.RegisterEffect(e2,tp) -end -function c5050644.cfilter2(c,tp) - return c:IsSetCard(0xc9) and c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE+REASON_EFFECT) - and c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP) -end -function c5050644.recon2(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c5050644.cfilter2,1,nil,tp) -end -function c5050644.retg2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsRelateToEffect(e) end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(1000) - Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,1000) -end -function c5050644.reop2(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Recover(p,d,REASON_EFFECT) -end diff --git a/script/c5052212.lua b/script/c5052212.lua deleted file mode 100644 index bcc0797457..0000000000 --- a/script/c5052212.lua +++ /dev/null @@ -1,47 +0,0 @@ ---イージーチューニング -function c5052212.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetCondition(c5052212.condition) - e1:SetCost(c5052212.cost) - e1:SetTarget(c5052212.target) - e1:SetOperation(c5052212.activate) - c:RegisterEffect(e1) -end -function c5052212.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end -function c5052212.cfilter(c) - return c:IsType(TYPE_TUNER) and c:IsAbleToRemoveAsCost() -end -function c5052212.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c5052212.cfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c5052212.cfilter,tp,LOCATION_GRAVE,0,1,1,nil) - local atk=g:GetFirst():GetAttack() - if atk<0 then atk=0 end - e:SetLabel(atk) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c5052212.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,nil) -end -function c5052212.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(e:GetLabel()) - tc:RegisterEffect(e1) - end -end diff --git a/script/c50527144.lua b/script/c50527144.lua deleted file mode 100644 index 6a3d7e6d5b..0000000000 --- a/script/c50527144.lua +++ /dev/null @@ -1,38 +0,0 @@ ---ゴーストリック・アウト -function c50527144.initial_effect(c) - -- - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c50527144.cost) - e1:SetOperation(c50527144.activate) - c:RegisterEffect(e1) -end -function c50527144.cfilter(c) - return c:IsSetCard(0x8d) and c:IsType(TYPE_MONSTER) and not c:IsPublic() -end -function c50527144.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c50527144.cfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) - local g=Duel.SelectMatchingCard(tp,c50527144.cfilter,tp,LOCATION_HAND,0,1,1,nil) - Duel.ConfirmCards(1-tp,g) - Duel.ShuffleHand(tp) -end -function c50527144.activate(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) - e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE) - e1:SetTargetRange(LOCATION_ONFIELD,0) - e1:SetTarget(c50527144.tgfilter) - e1:SetValue(aux.tgval) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) - local e2=e1:Clone() - e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - e2:SetValue(1) - Duel.RegisterEffect(e2,tp) -end -function c50527144.tgfilter(e,c) - return (c:IsFaceup() and c:IsSetCard(0x8d)) or (c:IsFacedown() and c:IsLocation(LOCATION_MZONE)) -end diff --git a/script/c50532786.lua b/script/c50532786.lua deleted file mode 100644 index 2d67c869da..0000000000 --- a/script/c50532786.lua +++ /dev/null @@ -1,32 +0,0 @@ ---ジョーズマン -function c50532786.initial_effect(c) - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - c:RegisterEffect(e1) - --tribute limit - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_TRIBUTE_LIMIT) - e2:SetValue(c50532786.tlimit) - c:RegisterEffect(e2) - --atkup - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e3:SetRange(LOCATION_MZONE) - e3:SetCode(EFFECT_UPDATE_ATTACK) - e3:SetValue(c50532786.atkup) - c:RegisterEffect(e3) -end -function c50532786.tlimit(e,c) - return not c:IsAttribute(ATTRIBUTE_WATER) -end -function c50532786.atkfilter(c) - return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_WATER) -end -function c50532786.atkup(e,c) - return Duel.GetMatchingGroupCount(c50532786.atkfilter,c:GetControler(),LOCATION_MZONE,0,c)*300 -end diff --git a/script/c50593156.lua b/script/c50593156.lua deleted file mode 100644 index 1c15ee4ea8..0000000000 --- a/script/c50593156.lua +++ /dev/null @@ -1,28 +0,0 @@ ---サンド・ギャンブラー -function c50593156.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(50593156,0)) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_COIN) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetTarget(c50593156.destg) - e1:SetOperation(c50593156.desop) - c:RegisterEffect(e1) -end -function c50593156.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chk==0 then return true end - local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_COIN,nil,0,tp,3) -end -function c50593156.desop(e,tp,eg,ep,ev,re,r,rp) - local c1,c2,c3=Duel.TossCoin(tp,3) - if c1+c2+c3==3 then - local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,0,LOCATION_MZONE,nil) - Duel.Destroy(g,REASON_EFFECT) - elseif c1+c2+c3==0 then - local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,LOCATION_MZONE,0,nil) - Duel.Destroy(g,REASON_EFFECT) - end -end diff --git a/script/c50604950.lua b/script/c50604950.lua deleted file mode 100644 index 4ce11365d1..0000000000 --- a/script/c50604950.lua +++ /dev/null @@ -1,34 +0,0 @@ ---X-セイバー ガラハド -function c50604950.initial_effect(c) - --atk - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(c50604950.atkval) - c:RegisterEffect(e1) - --negate attack - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(50604950,0)) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_BE_BATTLE_TARGET) - e2:SetCost(c50604950.cost) - e2:SetOperation(c50604950.operation) - c:RegisterEffect(e2) -end -function c50604950.atkval(e,c) - local ph=Duel.GetCurrentPhase() - if ph~=PHASE_DAMAGE and ph~=PHASE_DAMAGE_CAL then return 0 end - if c==Duel.GetAttacker() and Duel.GetAttackTarget() then return 300 end - if c==Duel.GetAttackTarget() then return -500 end - return 0 -end -function c50604950.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsSetCard,1,e:GetHandler(),0xd) end - local g=Duel.SelectReleaseGroup(tp,Card.IsSetCard,1,1,e:GetHandler(),0xd) - Duel.Release(g,REASON_COST) -end -function c50604950.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateAttack() -end diff --git a/script/c50608164.lua b/script/c50608164.lua deleted file mode 100644 index c0d4368640..0000000000 --- a/script/c50608164.lua +++ /dev/null @@ -1,65 +0,0 @@ ---M・HERO 光牙 -function c50608164.initial_effect(c) - c:EnableReviveLimit() - --spsummon condition - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - c:RegisterEffect(e1) - --atkup - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(c50608164.val) - c:RegisterEffect(e2) - --atkdown - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(50608164,0)) - e3:SetType(EFFECT_TYPE_QUICK_O) - e3:SetCode(EVENT_FREE_CHAIN) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e3:SetRange(LOCATION_MZONE) - e3:SetHintTiming(TIMING_DAMAGE_STEP) - e3:SetCountLimit(1) - e3:SetCondition(c50608164.condition) - e3:SetCost(c50608164.cost) - e3:SetTarget(c50608164.target) - e3:SetOperation(c50608164.operation) - c:RegisterEffect(e3) -end -function c50608164.val(e,c) - return Duel.GetFieldGroupCount(c:GetControler(),0,LOCATION_MZONE)*500 -end -function c50608164.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end -function c50608164.cfilter(c) - return c:IsSetCard(0x8) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost() -end -function c50608164.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c50608164.cfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c50608164.cfilter,tp,LOCATION_GRAVE,0,1,1,nil) - e:SetLabel(g:GetFirst():GetAttack()) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c50608164.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) -end -function c50608164.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(-e:GetLabel()) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - end -end diff --git a/script/c50613779.lua b/script/c50613779.lua deleted file mode 100644 index 665138c499..0000000000 --- a/script/c50613779.lua +++ /dev/null @@ -1,29 +0,0 @@ --- ダメージ・メイジ -function c50613779.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(50613779,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_RECOVER) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetRange(LOCATION_HAND) - e1:SetCode(EVENT_DAMAGE) - e1:SetCondition(c50613779.spcon) - e1:SetTarget(c50613779.sptg) - e1:SetOperation(c50613779.spop) - c:RegisterEffect(e1) -end -function c50613779.spcon(e,tp,eg,ep,ev,re,r,rp) - return ep==tp and bit.band(r,REASON_EFFECT)~=0 -end -function c50613779.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) - Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,ev) -end -function c50613779.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then - Duel.Recover(tp,ev,REASON_EFFECT) - end -end diff --git a/script/c50615578.lua b/script/c50615578.lua deleted file mode 100644 index fdd437cb52..0000000000 --- a/script/c50615578.lua +++ /dev/null @@ -1,58 +0,0 @@ ---カラクリ忍者 七七四九 -function c50615578.initial_effect(c) - --must attack - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_MUST_ATTACK) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_CANNOT_EP) - e2:SetRange(LOCATION_MZONE) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetTargetRange(1,0) - e2:SetCondition(c50615578.becon) - c:RegisterEffect(e2) - --pos change - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(50615578,0)) - e3:SetCategory(CATEGORY_POSITION) - e3:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_SINGLE) - e3:SetCode(EVENT_BE_BATTLE_TARGET) - e3:SetOperation(c50615578.posop) - c:RegisterEffect(e3) - --draw - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(50615578,1)) - e4:SetCategory(CATEGORY_DRAW) - e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e4:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE) - e4:SetCode(EVENT_SUMMON_SUCCESS) - e4:SetTarget(c50615578.drtg) - e4:SetOperation(c50615578.drop) - c:RegisterEffect(e4) -end -function c50615578.becon(e) - return e:GetHandler():IsAttackable() -end -function c50615578.posop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFaceup() and c:IsRelateToEffect(e) then - Duel.ChangePosition(c,POS_FACEUP_DEFENCE,0,POS_FACEUP_ATTACK,0) - end -end -function c50615578.drfilter(c) - return c:IsPosition(POS_FACEUP_DEFENCE) and c:IsSetCard(0x11) -end -function c50615578.drtg(e,tp,eg,ep,ev,re,r,rp,chk) - local ct=Duel.GetMatchingGroupCount(c50615578.drfilter,tp,LOCATION_MZONE,0,nil) - if chk==0 then return ct>0 and Duel.IsPlayerCanDraw(tp,ct) end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(ct) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,ct) -end -function c50615578.drop(e,tp,eg,ep,ev,re,r,rp) - local ct=Duel.GetMatchingGroupCount(c50615578.drfilter,tp,LOCATION_MZONE,0,nil) - local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) - Duel.Draw(p,ct,REASON_EFFECT) -end diff --git a/script/c50621530.lua b/script/c50621530.lua deleted file mode 100644 index f107031b00..0000000000 --- a/script/c50621530.lua +++ /dev/null @@ -1,17 +0,0 @@ ---パワード・チューナー -function c50621530.initial_effect(c) - --atkup - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(c50621530.atkval) - c:RegisterEffect(e1) -end -function c50621530.cfilter(c) - return c:IsFaceup() and c:IsType(TYPE_TUNER) -end -function c50621530.atkval(e,c) - return Duel.GetMatchingGroupCount(c50621530.cfilter,0,LOCATION_MZONE,LOCATION_MZONE,nil)*500 -end diff --git a/script/c50684552.lua b/script/c50684552.lua deleted file mode 100644 index 447339539c..0000000000 --- a/script/c50684552.lua +++ /dev/null @@ -1,34 +0,0 @@ ---ワンダーガレージ -function c50684552.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(50684552,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCondition(c50684552.spcon) - e1:SetTarget(c50684552.sptg) - e1:SetOperation(c50684552.spop) - c:RegisterEffect(e1) -end -function c50684552.spcon(e,tp,eg,ep,ev,re,r,rp) - return bit.band(r,REASON_DESTROY)~=0 - and e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) - and e:GetHandler():IsPreviousPosition(POS_FACEDOWN) -end -function c50684552.spfilter(c,e,tp) - return c:IsLevelBelow(4) and c:IsSetCard(0x16) and c:IsRace(RACE_MACHINE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c50684552.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c50684552.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c50684552.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c50684552.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - if g:GetCount()~=0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c50702124.lua b/script/c50702124.lua deleted file mode 100644 index 86c03efa8f..0000000000 --- a/script/c50702124.lua +++ /dev/null @@ -1,31 +0,0 @@ ---シンクロ・マグネーター -function c50702124.initial_effect(c) - c:EnableReviveLimit() - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(50702124,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetRange(LOCATION_HAND) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(c50702124.spcon) - e1:SetTarget(c50702124.sptg) - e1:SetOperation(c50702124.spop) - c:RegisterEffect(e1) -end -function c50702124.spcon(e,tp,eg,ep,ev,re,r,rp) - local tc=eg:GetFirst() - return eg:GetCount()==1 and tc:IsControler(tp) and tc:GetSummonType()==SUMMON_TYPE_SYNCHRO -end -function c50702124.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c50702124.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP) - c:CompleteProcedure() - end -end diff --git a/script/c50705071.lua b/script/c50705071.lua deleted file mode 100644 index c0da4b8ac9..0000000000 --- a/script/c50705071.lua +++ /dev/null @@ -1,27 +0,0 @@ ---メタル・デビルゾア -function c50705071.initial_effect(c) - c:EnableReviveLimit() - --spsummon proc - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_DECK) - e1:SetCondition(c50705071.spcon) - e1:SetOperation(c50705071.spop) - c:RegisterEffect(e1) -end -function c50705071.spfilter(c) - return c:IsCode(24311372) and c:GetEquipGroup():IsExists(Card.IsCode,1,nil,68540058) -end -function c50705071.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.CheckReleaseGroup(tp,c50705071.spfilter,1,nil) -end -function c50705071.spop(e,tp,eg,ep,ev,re,r,rp,c) - local g=Duel.SelectReleaseGroup(tp,c50705071.spfilter,1,1,nil) - Duel.Release(g,REASON_COST) - Duel.ShuffleDeck(tp) -end diff --git a/script/c50712728.lua b/script/c50712728.lua deleted file mode 100644 index 80ccbc3b59..0000000000 --- a/script/c50712728.lua +++ /dev/null @@ -1,28 +0,0 @@ ---墓守の呪術師 -function c50712728.initial_effect(c) - --damage - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(50712728,0)) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_SINGLE) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c50712728.target) - e1:SetOperation(c50712728.operation) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e2) - local e3=e1:Clone() - e3:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - c:RegisterEffect(e3) -end -function c50712728.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(500) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,500) -end -function c50712728.operation(e,tp,eg,ep,ev,re,r,rp,chk) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c50720316.lua b/script/c50720316.lua deleted file mode 100644 index 0d594a747e..0000000000 --- a/script/c50720316.lua +++ /dev/null @@ -1,55 +0,0 @@ ---E・HERO シャドー・ミスト -function c50720316.initial_effect(c) - --search - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(50720316,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e1:SetCountLimit(1,50720316) - e1:SetCost(c50720316.cost) - e1:SetTarget(c50720316.thtg1) - e1:SetOperation(c50720316.tgop1) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetDescription(aux.Stringid(50720316,1)) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetTarget(c50720316.thtg2) - e2:SetOperation(c50720316.tgop2) - c:RegisterEffect(e2) -end -function c50720316.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) -end -function c50720316.thfilter1(c) - return c:IsSetCard(0xa5) and c:IsType(TYPE_QUICKPLAY) and c:IsAbleToHand() -end -function c50720316.thtg1(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c50720316.thfilter1,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c50720316.tgop1(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c50720316.thfilter1,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end -function c50720316.thfilter2(c) - return c:IsSetCard(0x8) and c:IsType(TYPE_MONSTER) and not c:IsCode(50720316) and c:IsAbleToHand() -end -function c50720316.thtg2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c50720316.thfilter2,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c50720316.tgop2(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c50720316.thfilter2,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c50725996.lua b/script/c50725996.lua deleted file mode 100644 index 8f9e227190..0000000000 --- a/script/c50725996.lua +++ /dev/null @@ -1,32 +0,0 @@ ---ブラック・マジシャンズ・ナイト -function c50725996.initial_effect(c) - c:EnableReviveLimit() - --special summon limit - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - c:RegisterEffect(e1) - --des - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetTarget(c50725996.destg) - e2:SetOperation(c50725996.desop) - c:RegisterEffect(e2) -end -function c50725996.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsDestructable() end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c50725996.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/script/c50732780.lua b/script/c50732780.lua deleted file mode 100644 index 0fce6ae0a7..0000000000 --- a/script/c50732780.lua +++ /dev/null @@ -1,31 +0,0 @@ ---ヘル・セキュリティ -function c50732780.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(50732780,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetCondition(c50732780.condition) - e1:SetTarget(c50732780.target) - e1:SetOperation(c50732780.operation) - c:RegisterEffect(e1) -end -function c50732780.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) -end -function c50732780.filter(c,e,tp) - return c:IsRace(RACE_FIEND) and c:GetLevel()==1 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c50732780.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c50732780.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c50732780.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c50755.lua b/script/c50755.lua deleted file mode 100644 index e4f41c552e..0000000000 --- a/script/c50755.lua +++ /dev/null @@ -1,38 +0,0 @@ ---マジシャンズ・サークル -function c50755.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetCondition(c50755.condition) - e1:SetTarget(c50755.target) - e1:SetOperation(c50755.activate) - c:RegisterEffect(e1) -end -function c50755.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetAttacker():IsRace(RACE_SPELLCASTER) -end -function c50755.filter(c,e,tp) - return c:IsAttackBelow(2000) and c:IsRace(RACE_SPELLCASTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c50755.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c50755.filter,tp,LOCATION_DECK,0,1,nil,e,tp) - and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0 end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c50755.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c50755.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - local tc=g:GetFirst() - if tc then Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP_ATTACK) end - end - if Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0 then - Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(1-tp,c50755.filter,1-tp,LOCATION_DECK,0,1,1,nil,e,1-tp) - local tc=g:GetFirst() - if tc then Duel.SpecialSummonStep(tc,0,1-tp,1-tp,false,false,POS_FACEUP_ATTACK) end - end - Duel.SpecialSummonComplete() -end diff --git a/script/c50766506.lua b/script/c50766506.lua deleted file mode 100644 index 3363788169..0000000000 --- a/script/c50766506.lua +++ /dev/null @@ -1,69 +0,0 @@ ---忍法 分身の術 -function c50766506.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,0x1c0) - e1:SetTarget(c50766506.target) - e1:SetOperation(c50766506.operation) - c:RegisterEffect(e1) - --Destroy - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE) - e2:SetCode(EVENT_LEAVE_FIELD) - e2:SetOperation(c50766506.desop) - c:RegisterEffect(e2) -end -function c50766506.cfilter(c,e,tp) - local lv=c:GetLevel() - return lv>0 and c:IsSetCard(0x2b) - and Duel.IsExistingMatchingCard(c50766506.spfilter,tp,LOCATION_DECK,0,1,nil,lv,e,tp) -end -function c50766506.spfilter(c,lv,e,tp) - return c:IsLevelBelow(lv) and c:IsSetCard(0x2b) and - (c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK) or c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENCE)) -end -function c50766506.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 and Duel.CheckReleaseGroup(tp,c50766506.cfilter,1,nil,e,tp) end - local rg=Duel.SelectReleaseGroup(tp,c50766506.cfilter,1,1,nil,e,tp) - e:SetLabel(rg:GetFirst():GetLevel()) - Duel.Release(rg,REASON_COST) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c50766506.spfilter2(c,e,tp) - return c:IsSetCard(0x2b) and - (c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK) or c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENCE)) -end -function c50766506.operation(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ft<=0 then return end - local c=e:GetHandler() - local slv=e:GetLabel() - local sg=Duel.GetMatchingGroup(c50766506.spfilter2,tp,LOCATION_DECK,0,nil,e,tp) - sg:Remove(Card.IsLevelAbove,nil,slv+1) - if sg:GetCount()==0 then return end - local cg=Group.CreateGroup() - repeat - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local tc=sg:Select(tp,1,1,nil):GetFirst() - sg:RemoveCard(tc) - slv=slv-tc:GetLevel() - local spos=0 - if tc:IsCanBeSpecialSummoned(e,0,tp,false,false) then spos=spos+POS_FACEUP_ATTACK end - if tc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN) then spos=spos+POS_FACEDOWN_DEFENCE end - Duel.SpecialSummonStep(tc,0,tp,tp,false,false,spos) - if tc:IsFacedown() then cg:AddCard(tc) end - c:SetCardTarget(tc) - sg:Remove(Card.IsLevelAbove,nil,slv+1) - ft=ft-1 - until ft<=0 or sg:GetCount()==0 or not Duel.SelectYesNo(tp,aux.Stringid(50766506,0)) - Duel.SpecialSummonComplete() - Duel.ConfirmCards(1-tp,cg) -end -function c50766506.desop(e,tp,eg,ep,ev,re,r,rp) - local g=e:GetHandler():GetCardTarget():Filter(Card.IsLocation,nil,LOCATION_MZONE) - Duel.Destroy(g,REASON_EFFECT) -end diff --git a/script/c50781944.lua b/script/c50781944.lua deleted file mode 100644 index e6f313922f..0000000000 --- a/script/c50781944.lua +++ /dev/null @@ -1,32 +0,0 @@ ---エンシェント・クリムゾン・エイプ -function c50781944.initial_effect(c) - --lp rec - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(50781944,0)) - e1:SetCategory(CATEGORY_RECOVER) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetRange(LOCATION_MZONE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCondition(c50781944.reccon) - e1:SetTarget(c50781944.rectg) - e1:SetOperation(c50781944.recop) - c:RegisterEffect(e1) -end -function c50781944.filter(c,tp) - return c:IsReason(REASON_DESTROY) and c:IsPreviousLocation(LOCATION_MZONE) and - c:GetPreviousControler()==tp and c:IsType(TYPE_MONSTER) -end -function c50781944.reccon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c50781944.filter,1,nil,tp) -end -function c50781944.rectg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(1000) - Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,1000) -end -function c50781944.recop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Recover(p,d,REASON_EFFECT) -end diff --git a/script/c50785356.lua b/script/c50785356.lua deleted file mode 100644 index c086da5c07..0000000000 --- a/script/c50785356.lua +++ /dev/null @@ -1,37 +0,0 @@ ---ハウリング・ウォリアー -function c50785356.initial_effect(c) - --lv change - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(50785356,0)) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c50785356.target) - e1:SetOperation(c50785356.operation) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e2) -end -function c50785356.filter(c) - local lv=c:GetLevel() - return c:IsFaceup() and lv>0 and lv~=3 -end -function c50785356.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c50785356.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c50785356.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c50785356.filter,tp,LOCATION_MZONE,0,1,1,nil) -end -function c50785356.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CHANGE_LEVEL) - e1:SetValue(3) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - end -end diff --git a/script/c50789693.lua b/script/c50789693.lua deleted file mode 100644 index 62dd735641..0000000000 --- a/script/c50789693.lua +++ /dev/null @@ -1,77 +0,0 @@ ---アーマー・カッパー -function c50789693.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,2,2) - c:EnableReviveLimit() - --attack up - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE) - e1:SetDescription(aux.Stringid(50789693,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c50789693.adcost) - e1:SetOperation(c50789693.adop) - c:RegisterEffect(e1) - -- - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(50789693,1)) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetCountLimit(1,50789693+EFFECT_COUNT_CODE_DUEL) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetHintTiming(TIMING_BATTLE_PHASE) - e2:SetCondition(c50789693.btcon) - e2:SetCost(c50789693.btcost) - e2:SetOperation(c50789693.btop) - c:RegisterEffect(e2) -end -function c50789693.adcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c50789693.adop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - local opt=Duel.SelectOption(tp,aux.Stringid(50789693,2),aux.Stringid(50789693,3)) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_COPY_INHERIT) - if opt==0 then - e1:SetCode(EFFECT_UPDATE_ATTACK) - else - e1:SetCode(EFFECT_UPDATE_DEFENCE) - end - e1:SetValue(1000) - e1:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e1) - end -end -function c50789693.btcon(e,tp,eg,ep,ev,re,r,rp) - local bt=Duel.GetAttacker() - if bt and bt:IsControler(tp) then return true end - bt=Duel.GetAttackTarget() - return bt and bt:IsControler(tp) -end -function c50789693.btcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) -end -function c50789693.btop(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_AVOID_BATTLE_DAMAGE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetTargetRange(1,0) - e1:SetValue(1) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e2:SetTargetRange(LOCATION_MZONE,0) - e2:SetReset(RESET_PHASE+PHASE_END) - e2:SetValue(1) - Duel.RegisterEffect(e2,tp) -end diff --git a/script/c50823978.lua b/script/c50823978.lua deleted file mode 100644 index 3507bc5969..0000000000 --- a/script/c50823978.lua +++ /dev/null @@ -1,18 +0,0 @@ ---軍隊ピラニア -function c50823978.initial_effect(c) - --deepen damage - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EVENT_PRE_BATTLE_DAMAGE) - e1:SetCondition(c50823978.dcon) - e1:SetOperation(c50823978.dop) - c:RegisterEffect(e1) -end -function c50823978.dcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return ep~=tp and c==Duel.GetAttacker() and Duel.GetAttackTarget()==nil -end -function c50823978.dop(e,tp,eg,ep,ev,re,r,rp) - Duel.ChangeBattleDamage(ep,ev*2) -end diff --git a/script/c50866755.lua b/script/c50866755.lua deleted file mode 100644 index 880f5a9f98..0000000000 --- a/script/c50866755.lua +++ /dev/null @@ -1,80 +0,0 @@ ---鳳凰 -function c50866755.initial_effect(c) - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(aux.FALSE) - c:RegisterEffect(e1) - --summon,flip - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetCode(EVENT_SUMMON_SUCCESS) - e2:SetOperation(c50866755.retreg) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EVENT_FLIP) - c:RegisterEffect(e3) - --destroy - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(50866755,1)) - e4:SetCategory(CATEGORY_DESTROY) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e4:SetCode(EVENT_SUMMON_SUCCESS) - e4:SetTarget(c50866755.destg) - e4:SetOperation(c50866755.desop) - c:RegisterEffect(e4) - local e5=e4:Clone() - e5:SetCode(EVENT_FLIP) - c:RegisterEffect(e5) -end -function c50866755.filter(c) - return c:IsFacedown() and c:IsDestructable() -end -function c50866755.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local g=Duel.GetMatchingGroup(c50866755.filter,tp,0,LOCATION_SZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c50866755.desop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c50866755.filter,tp,0,LOCATION_SZONE,nil) - Duel.Destroy(g,REASON_EFFECT) -end -function c50866755.retreg(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - --to hand - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetDescription(aux.Stringid(50866755,0)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetReset(RESET_EVENT+0x1ee0000+RESET_PHASE+PHASE_END) - e1:SetCondition(c50866755.retcon) - e1:SetTarget(c50866755.rettg) - e1:SetOperation(c50866755.retop) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - c:RegisterEffect(e2) -end -function c50866755.retcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsHasEffect(EFFECT_SPIRIT_DONOT_RETURN) then return false end - if e:IsHasType(EFFECT_TYPE_TRIGGER_F) then - return not c:IsHasEffect(EFFECT_SPIRIT_MAYNOT_RETURN) - else return c:IsHasEffect(EFFECT_SPIRIT_MAYNOT_RETURN) end -end -function c50866755.rettg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0) -end -function c50866755.retop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - Duel.SendtoHand(c,nil,REASON_EFFECT) - end -end diff --git a/script/c50893987.lua b/script/c50893987.lua deleted file mode 100644 index c1402c87ed..0000000000 --- a/script/c50893987.lua +++ /dev/null @@ -1,47 +0,0 @@ ---剣闘獣ティゲル -function c50893987.initial_effect(c) - --search - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(50893987,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(c50893987.sccon) - e1:SetCost(c50893987.sccost) - e1:SetTarget(c50893987.sctg) - e1:SetOperation(c50893987.scop) - c:RegisterEffect(e1) - --fusion limit - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_CANNOT_BE_FUSION_MATERIAL) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetValue(1) - c:RegisterEffect(e2) -end -function c50893987.sccon(e,tp,eg,ep,ev,re,r,rp) - local st=e:GetHandler():GetSummonType() - return st>=(SUMMON_TYPE_SPECIAL+100) and st<(SUMMON_TYPE_SPECIAL+150) -end -function c50893987.costfilter(c) - return c:IsSetCard(0x19) and c:IsDiscardable() -end -function c50893987.sccost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c50893987.costfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,c50893987.costfilter,1,1,REASON_DISCARD+REASON_COST,nil) -end -function c50893987.scfilter(c) - return c:IsSetCard(0x19) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() -end -function c50893987.sctg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c50893987.scfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c50893987.scop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c50893987.scfilter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c50896944.lua b/script/c50896944.lua deleted file mode 100644 index 752e48f1b6..0000000000 --- a/script/c50896944.lua +++ /dev/null @@ -1,28 +0,0 @@ ---暗黒ブラキ -function c50896944.initial_effect(c) - --pos - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(50896944,0)) - e1:SetCategory(CATEGORY_POSITION) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c50896944.postg) - e1:SetOperation(c50896944.posop) - c:RegisterEffect(e1) -end -function c50896944.filter(c) - return not c:IsPosition(POS_FACEUP_DEFENCE) -end -function c50896944.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c50896944.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c50896944.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE) - Duel.SelectTarget(tp,c50896944.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) -end -function c50896944.posop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and not tc:IsPosition(POS_FACEUP_DEFENCE) then - Duel.ChangePosition(tc,POS_FACEUP_DEFENCE) - end -end diff --git a/script/c50903514.lua b/script/c50903514.lua deleted file mode 100644 index 3322066da3..0000000000 --- a/script/c50903514.lua +++ /dev/null @@ -1,87 +0,0 @@ ---蒼炎の剣士 -function c50903514.initial_effect(c) - --atk - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(50903514,0)) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c50903514.condition) - e1:SetTarget(c50903514.target) - e1:SetOperation(c50903514.operation) - c:RegisterEffect(e1) - --summon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(50903514,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetCondition(c50903514.spcon) - e2:SetCost(c50903514.spcost) - e2:SetTarget(c50903514.sptg) - e2:SetOperation(c50903514.spop) - c:RegisterEffect(e2) -end -function c50903514.condition(e,tp,eg,ep,ev,re,r,rp) - local ph=Duel.GetCurrentPhase() - return ph==PHASE_BATTLE or (ph==PHASE_DAMAGE and not Duel.IsDamageCalculated()) -end -function c50903514.filter(c) - return c:IsFaceup() and c:IsRace(RACE_WARRIOR) -end -function c50903514.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c50903514.filter(chkc) end - if chk==0 then return e:GetHandler():IsAttackAbove(600) - and Duel.IsExistingTarget(c50903514.filter,tp,LOCATION_MZONE,0,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c50903514.filter,tp,LOCATION_MZONE,0,1,1,e:GetHandler()) -end -function c50903514.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsFacedown() or not c:IsRelateToEffect(e) or c:GetAttack()<600 - or tc:IsFacedown() or not tc:IsRelateToEffect(e) then return end - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(-600) - e1:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(600) - e2:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e2) -end -function c50903514.spcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return rp~=tp and c:IsReason(REASON_DESTROY) - and c:IsPreviousLocation(LOCATION_ONFIELD) and c:GetPreviousControler()==tp -end -function c50903514.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) -end -function c50903514.spfilter(c,e,tp) - return c:IsRace(RACE_WARRIOR) and c:IsAttribute(ATTRIBUTE_FIRE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c50903514.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c50903514.spfilter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c50903514.spfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler(),e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c50903514.spfilter,tp,LOCATION_GRAVE,0,1,1,e:GetHandler(),e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c50903514.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c50913601.lua b/script/c50913601.lua deleted file mode 100644 index 1e4cf60791..0000000000 --- a/script/c50913601.lua +++ /dev/null @@ -1,29 +0,0 @@ ---山 -function c50913601.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --Atk - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e2:SetTarget(c50913601.tg) - e2:SetValue(200) - c:RegisterEffect(e2) - --Def - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetCode(EFFECT_UPDATE_DEFENCE) - e3:SetRange(LOCATION_SZONE) - e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e3:SetTarget(c50913601.tg) - e3:SetValue(200) - c:RegisterEffect(e3) -end -function c50913601.tg(e,c) - return c:IsRace(RACE_DRAGON+RACE_WINDBEAST+RACE_THUNDER) -end diff --git a/script/c50916353.lua b/script/c50916353.lua deleted file mode 100644 index 7a406a4a92..0000000000 --- a/script/c50916353.lua +++ /dev/null @@ -1,39 +0,0 @@ ---地獄戦士 -function c50916353.initial_effect(c) - --reg - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetProperty(EFFECT_FLAG_AVAILABLE_BD) - e1:SetCode(EVENT_BATTLE_DAMAGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c50916353.regcon) - e1:SetOperation(c50916353.regop) - c:RegisterEffect(e1) -end -function c50916353.regcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return ep==tp and c:GetBattleTarget()==eg:GetFirst() -end -function c50916353.regop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(50916353,0)) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetTarget(c50916353.damtg) - e1:SetOperation(c50916353.damop) - e1:SetLabel(ev) - e1:SetReset(RESET_PHASE+PHASE_DAMAGE) - c:RegisterEffect(e1) -end -function c50916353.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(e:GetLabel()) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,e:GetLabel()) -end -function c50916353.damop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c50920465.lua b/script/c50920465.lua deleted file mode 100644 index 2506f77953..0000000000 --- a/script/c50920465.lua +++ /dev/null @@ -1,46 +0,0 @@ ---ブリザード・サンダーバード -function c50920465.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(50920465,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1,50920465) - e1:SetCost(c50920465.cost) - e1:SetTarget(c50920465.target) - e1:SetOperation(c50920465.operation) - c:RegisterEffect(e1) -end -function c50920465.cfilter(c,e,tp) - return c:IsDiscardable() and Duel.IsExistingMatchingCard(c50920465.filter,tp,LOCATION_HAND,0,1,c,e,tp) -end -function c50920465.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c50920465.cfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.DiscardHand(tp,c50920465.cfilter,1,1,REASON_COST+REASON_DISCARD,nil,e,tp) -end -function c50920465.filter(c,e,tp) - return c:IsRace(RACE_WINDBEAST) and c:IsAttribute(ATTRIBUTE_WATER) - and not c:IsCode(50920465) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsHasEffect(EFFECT_NECRO_VALLEY) -end -function c50920465.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>1 - and Duel.IsExistingMatchingCard(c50920465.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_HAND+LOCATION_GRAVE) -end -function c50920465.operation(e,tp,eg,ep,ev,re,r,rp,chk) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 then return end - local g1=Duel.GetMatchingGroup(c50920465.filter,tp,LOCATION_HAND,0,nil,e,tp) - local g2=Duel.GetMatchingGroup(c50920465.filter,tp,LOCATION_GRAVE,0,nil,e,tp) - if g1:GetCount()==0 or g2:GetCount()==0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg1=g1:Select(tp,1,1,nil) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg2=g2:Select(tp,1,1,nil) - sg1:Merge(sg2) - Duel.SpecialSummon(sg1,0,tp,tp,false,false,POS_FACEUP) - if e:GetHandler():IsRelateToEffect(e) then - Duel.BreakEffect() - Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT) - end -end diff --git a/script/c50933533.lua b/script/c50933533.lua deleted file mode 100644 index b8882dafab..0000000000 --- a/script/c50933533.lua +++ /dev/null @@ -1,108 +0,0 @@ ---古代の機械巨竜 -function c50933533.initial_effect(c) - --mat check - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_MATERIAL_CHECK) - e1:SetValue(c50933533.valcheck) - c:RegisterEffect(e1) - --summon success - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_SUMMON_SUCCESS) - e2:SetCondition(c50933533.regcon) - e2:SetOperation(c50933533.regop) - c:RegisterEffect(e2) - e2:SetLabelObject(e1) - --actlimit - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e3:SetCode(EVENT_ATTACK_ANNOUNCE) - e3:SetOperation(c50933533.atkop) - c:RegisterEffect(e3) -end -function c50933533.atkop(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EFFECT_CANNOT_ACTIVATE) - e1:SetTargetRange(0,1) - e1:SetValue(c50933533.aclimit) - e1:SetReset(RESET_PHASE+PHASE_DAMAGE) - Duel.RegisterEffect(e1,tp) -end -function c50933533.aclimit(e,re,tp) - return re:IsHasType(EFFECT_TYPE_ACTIVATE) -end -function c50933533.valcheck(e,c) - local g=c:GetMaterial() - local flag=0 - local tc=g:GetFirst() - while tc do - local code=tc:GetCode() - if code==41172955 then flag=bit.bor(flag,0x1) - elseif code==86445415 then flag=bit.bor(flag,0x2) - elseif code==13839120 then flag=bit.bor(flag,0x4) - end - tc=g:GetNext() - end - e:SetLabel(flag) -end -function c50933533.regcon(e,tp,eg,ep,ev,re,r,rp) - return bit.band(e:GetHandler():GetSummonType(),SUMMON_TYPE_ADVANCE)==SUMMON_TYPE_ADVANCE -end -function c50933533.regop(e,tp,eg,ep,ev,re,r,rp) - local flag=e:GetLabelObject():GetLabel() - local c=e:GetHandler() - if bit.band(flag,0x1)~=0 then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_PIERCE) - e1:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e1) - end - if bit.band(flag,0x2)~=0 then - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(50933533,0)) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_BATTLE_DAMAGE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCondition(c50933533.damcon1) - e1:SetTarget(c50933533.damtg1) - e1:SetOperation(c50933533.damop) - e1:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e1) - end - if bit.band(flag,0x4)~=0 then - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(50933533,1)) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_BATTLE_DESTROYING) - e1:SetTarget(c50933533.damtg2) - e1:SetOperation(c50933533.damop) - e1:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e1) - end -end -function c50933533.damcon1(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp -end -function c50933533.damtg1(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(400) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,400) -end -function c50933533.damtg2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(600) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,600) -end -function c50933533.damop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c50939127.lua b/script/c50939127.lua deleted file mode 100644 index d50ff20a80..0000000000 --- a/script/c50939127.lua +++ /dev/null @@ -1,22 +0,0 @@ ---異次元竜 トワイライトゾーンドラゴン -function c50939127.initial_effect(c) - --indestructable - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - e1:SetValue(c50939127.ind1) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e2:SetValue(c50939127.ind2) - c:RegisterEffect(e2) -end -function c50939127.ind1(e,re,rp,c) - return not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) and re:IsActiveType(TYPE_SPELL+TYPE_TRAP) -end -function c50939127.ind2(e,c) - return c:IsAttackBelow(1900) -end diff --git a/script/c50951359.lua b/script/c50951359.lua deleted file mode 100644 index 89584add12..0000000000 --- a/script/c50951359.lua +++ /dev/null @@ -1,34 +0,0 @@ ---チューナー・キャプチャー -function c50951359.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(c50951359.condition) - e1:SetTarget(c50951359.target) - e1:SetOperation(c50951359.activate) - c:RegisterEffect(e1) -end -function c50951359.condition(e,tp,eg,ep,ev,re,r,rp) - local tc=eg:GetFirst() - return tc:GetSummonType()==SUMMON_TYPE_SYNCHRO and ep~=tp -end -function c50951359.filter(c,e,tp,mg) - return mg:IsContains(c) and c:IsType(TYPE_TUNER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c50951359.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(1-tp) and c50951359.filter(chkc,e,tp,eg:GetFirst():GetMaterial()) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c50951359.filter,tp,0,LOCATION_GRAVE,1,nil,e,tp,eg:GetFirst():GetMaterial()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c50951359.filter,tp,0,LOCATION_GRAVE,1,1,nil,e,tp,eg:GetFirst():GetMaterial()) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c50951359.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c50957346.lua b/script/c50957346.lua deleted file mode 100644 index 8802b95795..0000000000 --- a/script/c50957346.lua +++ /dev/null @@ -1,28 +0,0 @@ ---レイジアース -function c50957346.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(50957346,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetCondition(c50957346.condition) - e1:SetTarget(c50957346.target) - e1:SetOperation(c50957346.operation) - c:RegisterEffect(e1) -end -function c50957346.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) -end -function c50957346.filter(c) - return (c:IsFacedown() or c:GetAttribute()~=ATTRIBUTE_EARTH) and c:IsDestructable() -end -function c50957346.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local g=Duel.GetMatchingGroup(c50957346.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c50957346.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c50957346.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - Duel.Destroy(g,REASON_EFFECT) -end diff --git a/script/c51020079.lua b/script/c51020079.lua deleted file mode 100644 index 138da36eee..0000000000 --- a/script/c51020079.lua +++ /dev/null @@ -1,38 +0,0 @@ ---サイボーグドクター -function c51020079.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(51020079,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetTarget(c51020079.sptg) - e1:SetOperation(c51020079.spop) - c:RegisterEffect(e1) -end -function c51020079.rfilter(c,e,tp) - return c:IsType(TYPE_TUNER) and Duel.IsExistingTarget(c51020079.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp,c:GetLevel(),c:GetAttribute()) -end -function c51020079.spfilter(c,e,tp,lv,att) - return c:GetLevel()==lv and c:IsAttribute(att) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c51020079.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c51020079.spfilter(chkc,e,tp) end - if chk==0 then return Duel.CheckReleaseGroup(tp,c51020079.rfilter,1,nil,e,tp) end - local rg=Duel.SelectReleaseGroup(tp,c51020079.rfilter,1,1,nil,e,tp) - local r=rg:GetFirst() - local lv=r:GetLevel() - local att=r:GetAttribute() - Duel.Release(rg,REASON_COST) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c51020079.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp,lv,att) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c51020079.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c51043053.lua b/script/c51043053.lua deleted file mode 100644 index e39e9ef6a2..0000000000 --- a/script/c51043053.lua +++ /dev/null @@ -1,42 +0,0 @@ ---防覇龍ヘリオスフィア -function c51043053.initial_effect(c) - -- - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(0,LOCATION_MZONE) - e1:SetCondition(c51043053.atcon) - c:RegisterEffect(e1) - --lv change - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(51043053,0)) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCondition(c51043053.condition) - e2:SetOperation(c51043053.operation) - c:RegisterEffect(e2) -end -function c51043053.atcon(e) - return Duel.GetFieldGroupCount(e:GetHandlerPlayer(),LOCATION_MZONE,0)==1 - and Duel.GetFieldGroupCount(e:GetHandlerPlayer(),0,LOCATION_HAND)<5 -end -function c51043053.filter(c) - return c:IsFaceup() and c:GetLevel()==8 and c:IsRace(RACE_DRAGON) -end -function c51043053.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetLevel()~=8 - and Duel.IsExistingMatchingCard(c51043053.filter,tp,LOCATION_MZONE,0,1,nil) -end -function c51043053.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CHANGE_LEVEL) - e1:SetValue(8) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - c:RegisterEffect(e1) - end -end diff --git a/script/c51043243.lua b/script/c51043243.lua deleted file mode 100644 index b83bb2e301..0000000000 --- a/script/c51043243.lua +++ /dev/null @@ -1,25 +0,0 @@ ---ワーム・カルタロス -function c51043243.initial_effect(c) - --search - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetType(EFFECT_TYPE_FLIP+EFFECT_TYPE_SINGLE) - e1:SetTarget(c51043243.tg) - e1:SetOperation(c51043243.op) - c:RegisterEffect(e1) -end -function c51043243.filter(c) - return c:IsLevelBelow(4) and c:IsSetCard(0x3e) and c:IsRace(RACE_REPTILE) and c:IsAbleToHand() -end -function c51043243.tg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c51043243.op(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c51043243.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c51047350.lua b/script/c51047350.lua deleted file mode 100644 index f2b7925884..0000000000 --- a/script/c51047350.lua +++ /dev/null @@ -1,27 +0,0 @@ ---カード・ブレイカー -function c51047350.initial_effect(c) - c:EnableReviveLimit() - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_SPSUM_PARAM+EFFECT_FLAG_UNCOPYABLE) - e1:SetTargetRange(POS_FACEUP_ATTACK,0) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c51047350.spcon) - e1:SetOperation(c51047350.spop) - c:RegisterEffect(e1) -end -function c51047350.filter(c) - return c:GetSequence()<5 and c:IsAbleToGraveAsCost() -end -function c51047350.spcon(e,c) - if c==nil then return true end - return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and - Duel.IsExistingMatchingCard(c51047350.filter,c:GetControler(),LOCATION_SZONE,0,1,nil) -end -function c51047350.spop(e,tp,eg,ep,ev,re,r,rp,c) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c51047350.filter,tp,LOCATION_SZONE,0,1,1,nil) - Duel.SendtoGrave(g,REASON_COST) -end diff --git a/script/c51085303.lua b/script/c51085303.lua deleted file mode 100644 index 0f62706255..0000000000 --- a/script/c51085303.lua +++ /dev/null @@ -1,48 +0,0 @@ ---E・HERO ブルーメ -function c51085303.initial_effect(c) - c:EnableReviveLimit() - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - c:RegisterEffect(e1) - --atk/def - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(51085303,0)) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_BATTLE_DAMAGE) - e2:SetCondition(c51085303.adcon) - e2:SetOperation(c51085303.adop) - c:RegisterEffect(e2) - -- - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET) - e3:SetRange(LOCATION_MZONE) - e3:SetTargetRange(0,LOCATION_MZONE) - e3:SetValue(c51085303.atlimit) - c:RegisterEffect(e3) -end -function c51085303.adcon(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp -end -function c51085303.adop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() and c:GetDefence()>=200 then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetProperty(EFFECT_FLAG_COPY_INHERIT) - e1:SetValue(200) - e1:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_UPDATE_DEFENCE) - e2:SetValue(-200) - c:RegisterEffect(e2) - end -end -function c51085303.atlimit(e,c) - return c:IsFacedown() or not c:IsCode(51085303) -end diff --git a/script/c51099515.lua b/script/c51099515.lua deleted file mode 100644 index 05069dde72..0000000000 --- a/script/c51099515.lua +++ /dev/null @@ -1,47 +0,0 @@ ---恐撃 -function c51099515.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetCondition(c51099515.condition) - e1:SetCost(c51099515.cost) - e1:SetTarget(c51099515.target) - e1:SetOperation(c51099515.activate) - c:RegisterEffect(e1) -end -function c51099515.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end -function c51099515.cfilter(c) - return c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost() -end -function c51099515.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c51099515.cfilter,tp,LOCATION_GRAVE,0,2,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local cg=Duel.SelectMatchingCard(tp,c51099515.cfilter,tp,LOCATION_GRAVE,0,2,2,nil) - Duel.Remove(cg,POS_FACEUP,REASON_COST) -end -function c51099515.tfilter(c) - return c:IsPosition(POS_FACEUP_ATTACK) and c:GetAttack()>0 -end -function c51099515.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c51099515.tfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c51099515.tfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c51099515.tfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) -end -function c51099515.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetValue(0) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - end -end diff --git a/script/c51119924.lua b/script/c51119924.lua deleted file mode 100644 index 388a9f1814..0000000000 --- a/script/c51119924.lua +++ /dev/null @@ -1,36 +0,0 @@ ---パペット・プラント -function c51119924.initial_effect(c) - --control - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(51119924,0)) - e1:SetCategory(CATEGORY_CONTROL) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND) - e1:SetCost(c51119924.cost) - e1:SetTarget(c51119924.target) - e1:SetOperation(c51119924.operation) - c:RegisterEffect(e1) -end -function c51119924.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD) -end -function c51119924.filter(c) - return c:IsFaceup() and c:IsRace(RACE_WARRIOR+RACE_SPELLCASTER) and c:IsControlerCanBeChanged() -end -function c51119924.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c51119924.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c51119924.filter,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) - local g=Duel.SelectTarget(tp,c51119924.filter,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0) -end -function c51119924.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsRace(RACE_WARRIOR+RACE_SPELLCASTER) then - if not Duel.GetControl(tc,tp,PHASE_END,1) and not tc:IsImmuneToEffect(e) and tc:IsAbleToChangeControler() then - Duel.Destroy(tc,REASON_EFFECT) - end - end -end diff --git a/script/c51124303.lua b/script/c51124303.lua deleted file mode 100644 index 2484d9e720..0000000000 --- a/script/c51124303.lua +++ /dev/null @@ -1,143 +0,0 @@ ---影霊衣の万華鏡 -function c51124303.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,51124303) - e1:SetTarget(c51124303.target) - e1:SetOperation(c51124303.activate) - c:RegisterEffect(e1) - --search - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_GRAVE) - e2:SetCondition(c51124303.thcon) - e2:SetCost(c51124303.thcost) - e2:SetTarget(c51124303.thtg) - e2:SetOperation(c51124303.thop) - c:RegisterEffect(e2) -end -function c51124303.spfilter(c,e,tp,mc) - return c:IsSetCard(0xb4) and bit.band(c:GetType(),0x81)==0x81 and (not c.mat_filter or c.mat_filter(mc)) - and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true) - and mc:IsCanBeRitualMaterial(c) -end -function c51124303.rfilter(c,mc) - local mlv=mc:GetRitualLevel(c) - if mlv==mc:GetLevel() then return false end - local lv=c:GetLevel() - return lv==bit.band(mlv,0xffff) or lv==bit.rshift(mlv,16) -end -function c51124303.filter(c,e,tp) - local sg=Duel.GetMatchingGroup(c51124303.spfilter,tp,LOCATION_HAND,0,c,e,tp,c) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if c:IsLocation(LOCATION_MZONE) then ft=ft+1 end - return sg:IsExists(c51124303.rfilter,1,nil,c) or sg:CheckWithSumEqual(Card.GetLevel,c:GetLevel(),1,ft) -end -function c51124303.mfilter(c) - return c:GetLevel()>0 and c:IsAbleToGrave() -end -function c51124303.mzfilter(c,tp) - return c:IsLocation(LOCATION_MZONE) and c:IsControler(tp) -end -function c51124303.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ft<0 then return false end - local mg=Duel.GetRitualMaterial(tp) - if ft>0 then - local mg2=Duel.GetMatchingGroup(c51124303.mfilter,tp,LOCATION_EXTRA,0,nil) - mg:Merge(mg2) - else - mg=mg:Filter(c51124303.mzfilter,nil,tp) - end - return mg:IsExists(c51124303.filter,1,nil,e,tp) - end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c51124303.activate(e,tp,eg,ep,ev,re,r,rp) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ft<0 then return end - local mg=Duel.GetRitualMaterial(tp) - if ft>0 then - local mg2=Duel.GetMatchingGroup(c51124303.mfilter,tp,LOCATION_EXTRA,0,nil) - mg:Merge(mg2) - else - mg=mg:Filter(Card.IsLocation,nil,LOCATION_MZONE) - end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) - local mat=mg:FilterSelect(tp,c51124303.filter,1,1,nil,e,tp) - local mc=mat:GetFirst() - if not mc then return end - local sg=Duel.GetMatchingGroup(c51124303.spfilter,tp,LOCATION_HAND,0,mc,e,tp,mc) - if mc:IsLocation(LOCATION_MZONE) then ft=ft+1 end - local b1=sg:IsExists(c51124303.rfilter,1,nil,mc) - local b2=sg:CheckWithSumEqual(Card.GetLevel,mc:GetLevel(),1,ft) - if b1 and (not b2 or Duel.SelectYesNo(tp,aux.Stringid(51124303,0))) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local tg=sg:FilterSelect(tp,c51124303.rfilter,1,1,nil,mc) - local tc=tg:GetFirst() - tc:SetMaterial(mat) - if not mc:IsLocation(LOCATION_EXTRA) then - Duel.ReleaseRitualMaterial(mat) - else - Duel.SendtoGrave(mat,REASON_EFFECT+REASON_MATERIAL+REASON_RITUAL) - end - Duel.BreakEffect() - Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP) - tc:CompleteProcedure() - else - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local tg=sg:SelectWithSumEqual(tp,Card.GetLevel,mc:GetLevel(),1,ft) - local tc=tg:GetFirst() - while tc do - tc:SetMaterial(mat) - tc=tg:GetNext() - end - if not mc:IsLocation(LOCATION_EXTRA) then - Duel.ReleaseRitualMaterial(mat) - else - Duel.SendtoGrave(mat,REASON_EFFECT+REASON_MATERIAL+REASON_RITUAL) - end - Duel.BreakEffect() - tc=tg:GetFirst() - while tc do - Duel.SpecialSummonStep(tc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP) - tc:CompleteProcedure() - tc=tg:GetNext() - end - Duel.SpecialSummonComplete() - end -end -function c51124303.thcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 -end -function c51124303.cfilter(c) - return c:IsSetCard(0xb4) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost() -end -function c51124303.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() - and Duel.IsExistingMatchingCard(c51124303.cfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c51124303.cfilter,tp,LOCATION_GRAVE,0,1,1,nil) - g:AddCard(e:GetHandler()) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c51124303.thfilter(c) - return c:IsSetCard(0xb4) and c:IsType(TYPE_SPELL) and c:IsAbleToHand() -end -function c51124303.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c51124303.thfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c51124303.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c51124303.thfilter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c51126152.lua b/script/c51126152.lua deleted file mode 100644 index 146e10f34e..0000000000 --- a/script/c51126152.lua +++ /dev/null @@ -1,34 +0,0 @@ ---深夜急行騎士ナイト・エクスプレス・ナイト -function c51126152.initial_effect(c) - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_DECK) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - c:RegisterEffect(e1) - --summon with no tribute - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(51126152,0)) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_SUMMON_PROC) - e2:SetCondition(c51126152.ntcon) - e2:SetOperation(c51126152.ntop) - c:RegisterEffect(e2) -end -function c51126152.ntcon(e,c,minc) - if c==nil then return true end - return minc==0 and c:GetLevel()>4 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 -end -function c51126152.ntop(e,tp,eg,ep,ev,re,r,rp,c) - --change base attack - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetReset(RESET_EVENT+0xff0000) - e1:SetCode(EFFECT_SET_BASE_ATTACK) - e1:SetValue(0) - c:RegisterEffect(e1) -end diff --git a/script/c51192573.lua b/script/c51192573.lua deleted file mode 100644 index da3b7e1be1..0000000000 --- a/script/c51192573.lua +++ /dev/null @@ -1,78 +0,0 @@ ---宇宙獣ガンギル -function c51192573.initial_effect(c) - --summon with 1 tribute - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(51192573,0)) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SUMMON_PROC) - e1:SetCondition(c51192573.otcon) - e1:SetOperation(c51192573.otop) - e1:SetValue(SUMMON_TYPE_ADVANCE) - c:RegisterEffect(e1) - --counter - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(51192573,1)) - e2:SetCategory(CATEGORY_COUNTER) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetTarget(c51192573.cttg) - e2:SetOperation(c51192573.ctop) - c:RegisterEffect(e2) - --atk def - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e3:SetCode(EVENT_DAMAGE_CALCULATING) - e3:SetRange(LOCATION_MZONE) - e3:SetOperation(c51192573.adval) - c:RegisterEffect(e3) -end -function c51192573.otfilter(c,tp) - return c:GetOwner()==tp -end -function c51192573.otcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - local mg=Duel.GetMatchingGroup(c51192573.otfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,1-tp) - return c:GetLevel()>6 and Duel.GetTributeCount(c,mg)>0 -end -function c51192573.otop(e,tp,eg,ep,ev,re,r,rp,c) - local mg=Duel.GetMatchingGroup(c51192573.otfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,1-tp) - local sg=Duel.SelectTribute(tp,c,1,1,mg) - c:SetMaterial(sg) - Duel.Release(sg,REASON_SUMMON+REASON_MATERIAL) -end -function c51192573.cttg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_COUNTER,g,1,0xe,1) -end -function c51192573.ctop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - tc:AddCounter(0xe,1) - end -end -function c51192573.addown(c,e) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_PHASE+RESET_DAMAGE_CAL) - e1:SetValue(c:GetCounter(0xe)*-300) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_UPDATE_DEFENCE) - c:RegisterEffect(e2) -end -function c51192573.adval(e,tp,eg,ep,ev,re,r,rp) - local a=Duel.GetAttacker() - local d=Duel.GetAttackTarget() - if not d then return end - if a:GetCounter(0xe)>0 and d:IsSetCard(0xc) then c51192573.addown(a,e) end - if d:GetCounter(0xe)>0 and a:IsSetCard(0xc) then c51192573.addown(d,e) end -end diff --git a/script/c51194046.lua b/script/c51194046.lua deleted file mode 100644 index 67359a7dda..0000000000 --- a/script/c51194046.lua +++ /dev/null @@ -1,88 +0,0 @@ ---クリフォート・アセンブラ -function c51194046.initial_effect(c) - --pendulum summon - aux.AddPendulumProcedure(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --splimit - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE) - e2:SetRange(LOCATION_PZONE) - e2:SetTargetRange(1,0) - e2:SetCondition(aux.nfbdncon) - e2:SetTarget(c51194046.splimit) - c:RegisterEffect(e2) - --draw - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(51194046,0)) - e3:SetCategory(CATEGORY_DRAW) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_PHASE+PHASE_END) - e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e3:SetRange(LOCATION_PZONE) - e3:SetCountLimit(1) - e3:SetCondition(c51194046.drcon) - e3:SetTarget(c51194046.drtg) - e3:SetOperation(c51194046.drop) - c:RegisterEffect(e3) - if not c51194046.global_check then - c51194046.global_check=true - c51194046[0]=0 - c51194046[1]=0 - local ge1=Effect.CreateEffect(c) - ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - ge1:SetCode(EVENT_SUMMON_SUCCESS) - ge1:SetOperation(c51194046.checkop) - Duel.RegisterEffect(ge1,0) - local ge2=ge1:Clone() - ge2:SetCode(EVENT_MSET) - Duel.RegisterEffect(ge2,0) - local ge3=Effect.CreateEffect(c) - ge3:SetType(EFFECT_TYPE_FIELD) - ge3:SetCode(EFFECT_MATERIAL_CHECK) - ge3:SetTargetRange(LOCATION_HAND,LOCATION_HAND) - ge3:SetValue(c51194046.valcheck) - Duel.RegisterEffect(ge3,0) - ge1:SetLabelObject(ge3) - ge2:SetLabelObject(ge3) - local ge4=Effect.CreateEffect(c) - ge4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - ge4:SetCode(EVENT_PHASE_START+PHASE_DRAW) - ge4:SetOperation(c51194046.clearop) - Duel.RegisterEffect(ge4,0) - end -end -function c51194046.splimit(e,c) - return not c:IsSetCard(0xaa) -end -function c51194046.checkop(e,tp,eg,ep,ev,re,r,rp) - local tc=eg:GetFirst() - if bit.band(tc:GetSummonType(),SUMMON_TYPE_ADVANCE)==SUMMON_TYPE_ADVANCE then - local p=tc:GetSummonPlayer() - c51194046[p]=c51194046[p]+e:GetLabelObject():GetLabel() - end -end -function c51194046.valcheck(e,c) - local ct=c:GetMaterial():FilterCount(Card.IsSetCard,nil,0xaa) - e:SetLabel(ct) -end -function c51194046.clearop(e,tp,eg,ep,ev,re,r,rp) - c51194046[0]=0 - c51194046[1]=0 -end -function c51194046.drcon(e,tp,eg,ep,ev,re,r,rp) - return c51194046[tp]>0 -end -function c51194046.drtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp,c51194046[tp]) end - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,c51194046[tp]) -end -function c51194046.drop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - Duel.Draw(tp,c51194046[tp],REASON_EFFECT) -end diff --git a/script/c51196174.lua b/script/c51196174.lua deleted file mode 100644 index f273825ce4..0000000000 --- a/script/c51196174.lua +++ /dev/null @@ -1,15 +0,0 @@ ---ザ・カリキュレーター -function c51196174.initial_effect(c) - --attack - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetValue(c51196174.atkval) - c:RegisterEffect(e1) -end -function c51196174.atkval(e,c) - local g=Duel.GetMatchingGroup(Card.IsFaceup,c:GetControler(),LOCATION_MZONE,0,nil) - return g:GetSum(Card.GetLevel)*300 -end diff --git a/script/c51196805.lua b/script/c51196805.lua deleted file mode 100644 index 4f0943cee0..0000000000 --- a/script/c51196805.lua +++ /dev/null @@ -1,63 +0,0 @@ ---ゴーストリック・スケルトン -function c51196805.initial_effect(c) - --summon limit - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_SUMMON) - e1:SetCondition(c51196805.sumcon) - c:RegisterEffect(e1) - --turn set - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(51196805,0)) - e2:SetCategory(CATEGORY_POSITION) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetTarget(c51196805.postg) - e2:SetOperation(c51196805.posop) - c:RegisterEffect(e2) - --banish - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(51196805,1)) - e3:SetCategory(CATEGORY_REMOVE) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e3:SetCountLimit(1,51196805) - e3:SetCode(EVENT_FLIP) - e3:SetTarget(c51196805.rmtg) - e3:SetOperation(c51196805.rmop) - c:RegisterEffect(e3) -end -function c51196805.sfilter(c) - return c:IsFaceup() and c:IsSetCard(0x8d) -end -function c51196805.sumcon(e) - return not Duel.IsExistingMatchingCard(c51196805.sfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) -end -function c51196805.postg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsCanTurnSet() and c:GetFlagEffect(51196805)==0 end - c:RegisterFlagEffect(51196805,RESET_EVENT+0x1fc0000+RESET_PHASE+PHASE_END,0,1) - Duel.SetOperationInfo(0,CATEGORY_POSITION,c,1,0,0) -end -function c51196805.posop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - Duel.ChangePosition(c,POS_FACEDOWN_DEFENCE) - end -end -function c51196805.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,1-tp,LOCATION_DECK) -end -function c51196805.rmop(e,tp,eg,ep,ev,re,r,rp) - local ct1=Duel.GetMatchingGroupCount(c51196805.sfilter,tp,LOCATION_MZONE,0,nil) - local ct2=Duel.GetFieldGroupCount(tp,0,LOCATION_DECK) - if ct1>ct2 then ct1=ct2 end - if ct1==0 then return end - local t={} - for i=1,ct1 do t[i]=i end - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(51196805,2)) - local ac=Duel.AnnounceNumber(tp,table.unpack(t)) - local g=Duel.GetDecktopGroup(1-tp,ac) - Duel.DisableShuffleCheck() - Duel.Remove(g,POS_FACEDOWN,REASON_EFFECT) -end diff --git a/script/c51232472.lua b/script/c51232472.lua deleted file mode 100644 index 5d15e658e7..0000000000 --- a/script/c51232472.lua +++ /dev/null @@ -1,33 +0,0 @@ ---暗黒界の策士 グリン -function c51232472.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(51232472,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCondition(c51232472.descon) - e1:SetTarget(c51232472.destg) - e1:SetOperation(c51232472.desop) - c:RegisterEffect(e1) -end -function c51232472.descon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetPreviousLocation()==LOCATION_HAND and bit.band(r,0x4040)==0x4040 -end -function c51232472.desfilter(c) - return c:IsDestructable() and c:IsType(TYPE_SPELL+TYPE_TRAP) -end -function c51232472.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and c51232472.desfilter(chkc) end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c51232472.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c51232472.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c51254277.lua b/script/c51254277.lua deleted file mode 100644 index 613488692a..0000000000 --- a/script/c51254277.lua +++ /dev/null @@ -1,33 +0,0 @@ ---ビッグ・ジョーズ -function c51254277.initial_effect(c) - --reg - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetOperation(c51254277.regop) - c:RegisterEffect(e1) -end -function c51254277.regop(e,tp,eg,ep,ev,re,r,rp) - --remove - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetDescription(aux.Stringid(51254277,0)) - e1:SetCategory(CATEGORY_REMOVE) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EVENT_PHASE+PHASE_BATTLE) - e1:SetCountLimit(1) - e1:SetTarget(c51254277.rmtg) - e1:SetOperation(c51254277.rmop) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_BATTLE) - e:GetHandler():RegisterEffect(e1) -end -function c51254277.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_REMOVE,e:GetHandler(),1,0,0) -end -function c51254277.rmop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - Duel.Remove(c,POS_FACEUP,REASON_EFFECT) - end -end diff --git a/script/c51254980.lua b/script/c51254980.lua deleted file mode 100644 index cddb3f8f69..0000000000 --- a/script/c51254980.lua +++ /dev/null @@ -1,33 +0,0 @@ ---ナチュル・マンティス -function c51254980.initial_effect(c) - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(51254980,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetCost(c51254980.cost) - e1:SetTarget(c51254980.target) - e1:SetOperation(c51254980.operation) - c:RegisterEffect(e1) -end -function c51254980.cfilter(c) - return c:IsSetCard(0x2a) and c:IsType(TYPE_MONSTER) and c:IsAbleToGraveAsCost() -end -function c51254980.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c51254980.cfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c51254980.cfilter,tp,LOCATION_HAND,0,1,1,nil) - Duel.SendtoGrave(g,REASON_COST) -end -function c51254980.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return ep~=tp and eg:GetFirst():IsDestructable() end - eg:GetFirst():CreateEffectRelation(e) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) -end -function c51254980.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=eg:GetFirst() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c5126490.lua b/script/c5126490.lua deleted file mode 100644 index 4fcabbbee9..0000000000 --- a/script/c5126490.lua +++ /dev/null @@ -1,88 +0,0 @@ ---ネオス・ワイズマン -function c5126490.initial_effect(c) - c:EnableReviveLimit() - --spsummon condition - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - c:RegisterEffect(e1) - --special summon rule - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_SPSUMMON_PROC) - e2:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e2:SetRange(LOCATION_HAND) - e2:SetCondition(c5126490.spcon) - e2:SetOperation(c5126490.spop) - c:RegisterEffect(e2) - --damage&recover - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(5126490,0)) - e3:SetCategory(CATEGORY_DAMAGE+CATEGORY_RECOVER) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e3:SetCode(EVENT_DAMAGE_STEP_END) - e3:SetTarget(c5126490.damtg) - e3:SetOperation(c5126490.damop) - c:RegisterEffect(e3) - -- - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e4:SetRange(LOCATION_MZONE) - e4:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - e4:SetValue(1) - c:RegisterEffect(e4) -end -function c5126490.spfilter(c,code) - return c:IsFaceup() and c:IsCode(code) and c:IsAbleToGraveAsCost() -end -function c5126490.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ft<-1 then return false end - local g1=Duel.GetMatchingGroup(c5126490.spfilter,tp,LOCATION_ONFIELD,0,nil,89943723) - local g2=Duel.GetMatchingGroup(c5126490.spfilter,tp,LOCATION_ONFIELD,0,nil,78371393) - if g1:GetCount()==0 or g2:GetCount()==0 then return false end - if ft>0 then return true end - local f1=g1:FilterCount(Card.IsLocation,nil,LOCATION_MZONE) - local f2=g2:FilterCount(Card.IsLocation,nil,LOCATION_MZONE) - if ft==-1 then return f1>0 and f2>0 - else return f1>0 or f2>0 end -end -function c5126490.spop(e,tp,eg,ep,ev,re,r,rp,c) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - local g1=Duel.GetMatchingGroup(c5126490.spfilter,tp,LOCATION_ONFIELD,0,nil,89943723) - local g2=Duel.GetMatchingGroup(c5126490.spfilter,tp,LOCATION_ONFIELD,0,nil,78371393) - g1:Merge(g2) - local g=Group.CreateGroup() - local tc=nil - for i=1,2 do - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - if ft<=0 then - tc=g1:FilterSelect(tp,Card.IsLocation,1,1,nil,LOCATION_MZONE):GetFirst() - else - tc=g1:Select(tp,1,1,nil):GetFirst() - end - g:AddCard(tc) - g1:Remove(Card.IsCode,nil,tc:GetCode()) - ft=ft+1 - end - Duel.SendtoGrave(g,REASON_COST) -end -function c5126490.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetAttackTarget()~=nil end - local bc=e:GetHandler():GetBattleTarget() - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,bc:GetAttack()) - Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,bc:GetDefence()) -end -function c5126490.damop(e,tp,eg,ep,ev,re,r,rp) - local bc=e:GetHandler():GetBattleTarget() - local atk=bc:GetAttack() - local def=bc:GetDefence() - if atk<0 then atk=0 end - if def<0 then def=0 end - Duel.Damage(1-tp,atk,REASON_EFFECT) - Duel.Recover(tp,def,REASON_EFFECT) -end diff --git a/script/c51267887.lua b/script/c51267887.lua deleted file mode 100644 index 9d0449741d..0000000000 --- a/script/c51267887.lua +++ /dev/null @@ -1,50 +0,0 @@ ---体温の上昇 -function c51267887.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c51267887.target) - e1:SetOperation(c51267887.operation) - c:RegisterEffect(e1) - --atk up - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(300) - c:RegisterEffect(e2) - --def up - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_EQUIP) - e3:SetCode(EFFECT_UPDATE_DEFENCE) - e3:SetValue(300) - c:RegisterEffect(e3) - --equip limit - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetCode(EFFECT_EQUIP_LIMIT) - e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e4:SetValue(c51267887.eqlimit) - c:RegisterEffect(e4) -end -function c51267887.eqlimit(e,c) - return c:IsRace(RACE_DINOSAUR) -end -function c51267887.filter(c) - return c:IsFaceup() and c:IsRace(RACE_DINOSAUR) -end -function c51267887.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c51267887.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c51267887.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c51267887.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c51267887.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,e:GetHandler(),tc) - end -end diff --git a/script/c51275027.lua b/script/c51275027.lua deleted file mode 100644 index f8a381c454..0000000000 --- a/script/c51275027.lua +++ /dev/null @@ -1,17 +0,0 @@ ---薄幸の美少女 -function c51275027.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(51275027,0)) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetCondition(c51275027.condition) - e1:SetOperation(c51275027.operation) - c:RegisterEffect(e1) -end -function c51275027.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) -end -function c51275027.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.SkipPhase(Duel.GetTurnPlayer(),PHASE_BATTLE,RESET_PHASE+PHASE_BATTLE,1) -end diff --git a/script/c51282878.lua b/script/c51282878.lua deleted file mode 100644 index 2b903b256a..0000000000 --- a/script/c51282878.lua +++ /dev/null @@ -1,36 +0,0 @@ ---フィッシュボーグ-プランター -function c51282878.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(51282878,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_NO_TURN_RESET) - e1:SetRange(LOCATION_GRAVE) - e1:SetCountLimit(1) - e1:SetCost(c51282878.cost) - e1:SetTarget(c51282878.target) - e1:SetOperation(c51282878.operation) - c:RegisterEffect(e1) -end -function c51282878.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetFlagEffect(tp,51282878)==0 end - Duel.RegisterFlagEffect(tp,51282878,RESET_PHASE+PHASE_END,0,1) -end -function c51282878.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,1) - and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,1) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c51282878.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)==0 then return end - Duel.DiscardDeck(tp,1,REASON_EFFECT) - local c=e:GetHandler() - local tc=Duel.GetOperatedGroup():GetFirst() - if tc and c:IsRelateToEffect(e) and tc:IsLocation(LOCATION_GRAVE) and tc:IsAttribute(ATTRIBUTE_WATER) then - Duel.BreakEffect() - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c5128859.lua b/script/c5128859.lua deleted file mode 100644 index 2a64525413..0000000000 --- a/script/c5128859.lua +++ /dev/null @@ -1,88 +0,0 @@ ---E・HERO マリン・ネオス -function c5128859.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcCode2(c,89943723,78734254,false,false) - --spsummon condition - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(c5128859.splimit) - c:RegisterEffect(e1) - --special summon rule - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_SPSUMMON_PROC) - e2:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e2:SetRange(LOCATION_EXTRA) - e2:SetCondition(c5128859.spcon) - e2:SetOperation(c5128859.spop) - c:RegisterEffect(e2) - --destroy - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(5128859,0)) - e3:SetCategory(CATEGORY_DESTROY) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1) - e3:SetTarget(c5128859.destg) - e3:SetOperation(c5128859.desop) - c:RegisterEffect(e3) -end -function c5128859.splimit(e,se,sp,st) - return not e:GetHandler():IsLocation(LOCATION_EXTRA) -end -function c5128859.spfilter(c,code) - return c:IsAbleToDeckOrExtraAsCost() and c:GetCode()==code -end -function c5128859.spfilter2(c,code) - return c:IsAbleToDeckOrExtraAsCost() and c:GetOriginalCode()==code -end -function c5128859.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ft<-1 then return false end - local g1=Duel.GetMatchingGroup(c5128859.spfilter,tp,LOCATION_ONFIELD,0,nil,89943723) - local g2=Duel.GetMatchingGroup(c5128859.spfilter2,tp,LOCATION_ONFIELD,0,nil,78734254) - if g1:GetCount()==0 or g2:GetCount()==0 then return false end - if ft>0 then return true end - local f1=g1:FilterCount(Card.IsLocation,nil,LOCATION_MZONE) - local f2=g2:FilterCount(Card.IsLocation,nil,LOCATION_MZONE) - if ft==-1 then return f1>0 and f2>0 - else return f1>0 or f2>0 end -end -function c5128859.spop(e,tp,eg,ep,ev,re,r,rp,c) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - local g1=Duel.GetMatchingGroup(c5128859.spfilter,tp,LOCATION_ONFIELD,0,nil,89943723) - local g2=Duel.GetMatchingGroup(c5128859.spfilter2,tp,LOCATION_ONFIELD,0,nil,78734254) - g1:Merge(g2) - local g=Group.CreateGroup() - local tc=nil - for i=1,2 do - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - if ft<=0 then - tc=g1:FilterSelect(tp,Card.IsLocation,1,1,nil,LOCATION_MZONE):GetFirst() - else - tc=g1:Select(tp,1,1,nil):GetFirst() - end - g:AddCard(tc) - g1:Remove(Card.IsCode,nil,tc:GetCode()) - ft=ft+1 - end - local cg=g:Filter(Card.IsFacedown,nil) - if cg:GetCount()>0 then - Duel.ConfirmCards(1-tp,cg) - end - Duel.SendtoDeck(g,nil,2,REASON_COST) -end -function c5128859.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0 end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,1-tp,LOCATION_HAND) -end -function c5128859.desop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND) - local sg=g:RandomSelect(tp,1) - Duel.Destroy(sg,REASON_EFFECT) -end diff --git a/script/c51316684.lua b/script/c51316684.lua deleted file mode 100644 index 0501b090f9..0000000000 --- a/script/c51316684.lua +++ /dev/null @@ -1,129 +0,0 @@ ---インフェルノイド・ヴァエル -function c51316684.initial_effect(c) - c:EnableReviveLimit() - --special summon condition - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_SPSUMMON_PROC) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e2:SetRange(LOCATION_HAND+LOCATION_GRAVE) - e2:SetCondition(c51316684.spcon) - e2:SetOperation(c51316684.spop) - c:RegisterEffect(e2) - --remove - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(51316684,0)) - e3:SetCategory(CATEGORY_REMOVE) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_PHASE+PHASE_BATTLE) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1) - e3:SetCondition(c51316684.rmcon) - e3:SetTarget(c51316684.rmtg) - e3:SetOperation(c51316684.rmop) - c:RegisterEffect(e3) - --remove - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(51316684,1)) - e4:SetCategory(CATEGORY_REMOVE) - e4:SetType(EFFECT_TYPE_QUICK_O) - e4:SetCode(EVENT_FREE_CHAIN) - e4:SetRange(LOCATION_MZONE) - e4:SetProperty(EFFECT_FLAG_CARD_TARGET) - e4:SetCountLimit(1) - e4:SetCost(c51316684.rmcost2) - e4:SetTarget(c51316684.rmtg2) - e4:SetOperation(c51316684.rmop2) - c:RegisterEffect(e4) -end -function c51316684.spfilter(c) - return c:IsSetCard(0xbb) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost() -end -function c51316684.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - local sum=0 - for i=0,4 do - local tc=Duel.GetFieldCard(tp,LOCATION_MZONE,i) - if tc and tc:IsFaceup() and tc:IsType(TYPE_EFFECT) then - if tc:IsType(TYPE_XYZ) then sum=sum+tc:GetRank() - else sum=sum+tc:GetLevel() end - end - end - if sum>8 then return false end - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ft<-1 then return false end - if c:IsHasEffect(34822850) then - if ft>0 then - return Duel.IsExistingMatchingCard(c51316684.spfilter,tp,LOCATION_MZONE+LOCATION_GRAVE+LOCATION_HAND,0,2,c) - else - local ct=-ft+1 - return Duel.IsExistingMatchingCard(c51316684.spfilter,tp,LOCATION_MZONE,0,ct,nil) - and Duel.IsExistingMatchingCard(c51316684.spfilter,tp,LOCATION_MZONE+LOCATION_GRAVE+LOCATION_HAND,0,2,c) - end - else - return ft>0 and Duel.IsExistingMatchingCard(c51316684.spfilter,tp,LOCATION_GRAVE+LOCATION_HAND,0,2,c) - end -end -function c51316684.spop(e,tp,eg,ep,ev,re,r,rp,c) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - local g=nil - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - if c:IsHasEffect(34822850) then - if ft>0 then - g=Duel.SelectMatchingCard(tp,c51316684.spfilter,tp,LOCATION_MZONE+LOCATION_GRAVE+LOCATION_HAND,0,2,2,c) - else - local sg=Duel.GetMatchingGroup(c51316684.spfilter,tp,LOCATION_MZONE+LOCATION_GRAVE+LOCATION_HAND,0,c) - local ct=-ft+1 - g=sg:FilterSelect(tp,Card.IsLocation,ct,ct,nil,LOCATION_MZONE) - if ct<2 then - sg:Sub(g) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g2=sg:Select(tp,1,1,nil) - g:Merge(g2) - end - end - else - g=Duel.SelectMatchingCard(tp,c51316684.spfilter,tp,LOCATION_GRAVE+LOCATION_HAND,0,2,2,c) - end - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c51316684.rmcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp and e:GetHandler():GetBattledGroup():GetCount()>0 -end -function c51316684.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end - local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) -end -function c51316684.rmop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - if g:GetCount()>0 then - Duel.Remove(g,POS_FACEUP,REASON_EFFECT) - end -end -function c51316684.rmcost2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsReleasable,1,nil) end - local g=Duel.SelectReleaseGroup(tp,Card.IsReleasable,1,1,nil) - Duel.Release(g,REASON_COST) -end -function c51316684.rmtg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(1-tp) and chkc:IsAbleToRemove() end - if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) -end -function c51316684.rmop2(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) - end -end diff --git a/script/c51324455.lua b/script/c51324455.lua deleted file mode 100644 index cdfd5e5df2..0000000000 --- a/script/c51324455.lua +++ /dev/null @@ -1,34 +0,0 @@ ---魔製産卵床 -function c51324455.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_REMOVE) - e1:SetCondition(c51324455.condition) - e1:SetTarget(c51324455.target) - e1:SetOperation(c51324455.activate) - c:RegisterEffect(e1) -end -function c51324455.cfilter(c,tp) - return c:IsFaceup() and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP) - and c:GetPreviousControler()==tp and c:IsRace(RACE_FISH+RACE_SEASERPENT+RACE_AQUA) -end -function c51324455.condition(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c51324455.cfilter,1,nil,tp) -end -function c51324455.filter(c) - return c:IsLevelBelow(4) and c:IsRace(RACE_FISH+RACE_SEASERPENT+RACE_AQUA) and c:IsAbleToHand() -end -function c51324455.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c51324455.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c51324455.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c51324455.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c5133471.lua b/script/c5133471.lua deleted file mode 100644 index 9e89be7241..0000000000 --- a/script/c5133471.lua +++ /dev/null @@ -1,56 +0,0 @@ ---ギャラクシー・サイクロン -function c5133471.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(5133471,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c5133471.target) - e1:SetOperation(c5133471.activate) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(5133471,1)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_GRAVE) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCountLimit(1,5133471) - e2:SetCondition(aux.exccon) - e2:SetCost(c5133471.descost) - e2:SetTarget(c5133471.destg) - e2:SetOperation(c5133471.activate) - c:RegisterEffect(e2) -end -function c5133471.filter(c) - return c:IsFacedown() and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable() -end -function c5133471.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and c5133471.filter(chkc) and chkc~=e:GetHandler() end - if chk==0 then return Duel.IsExistingTarget(c5133471.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c5133471.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c5133471.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end -function c5133471.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) -end -function c5133471.filter2(c) - return c:IsFaceup() and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable() -end -function c5133471.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and c5133471.filter2(chkc) and chkc~=e:GetHandler() end - if chk==0 then return Duel.IsExistingTarget(c5133471.filter2,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c5133471.filter2,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end diff --git a/script/c51345461.lua b/script/c51345461.lua deleted file mode 100644 index 991bd6e305..0000000000 --- a/script/c51345461.lua +++ /dev/null @@ -1,58 +0,0 @@ ---ソードハンター -function c51345461.initial_effect(c) - --equip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(51345461,0)) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_PHASE+PHASE_BATTLE) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetTarget(c51345461.eqtg) - e1:SetOperation(c51345461.eqop) - c:RegisterEffect(e1) -end -function c51345461.filter(c,rc,tid) - return c:IsReason(REASON_BATTLE) and c:GetReasonCard()==rc and c:GetTurnID()==tid -end -function c51345461.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingMatchingCard(c51345461.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil,e:GetHandler(),Duel.GetTurnCount()) end - local g=Duel.GetMatchingGroup(c51345461.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,nil,e:GetHandler(),Duel.GetTurnCount()) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,g:GetCount(),0,0) -end -function c51345461.eqop(e,tp,eg,ep,ev,re,r,rp) - local ft=Duel.GetLocationCount(tp,LOCATION_SZONE) - if ft<=0 then return end - local c=e:GetHandler() - if not c:IsRelateToEffect(e) or c:IsFacedown() then return end - local gc=Duel.GetMatchingGroup(c51345461.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,nil,e:GetHandler(),Duel.GetTurnCount()) - if gc:GetCount()==0 then return end - if gc:GetCount()>ft then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - gc=gc:Select(tp,ft,ft,nil) - end - local tc=gc:GetFirst() - while tc do - Duel.Equip(tp,tc,c,false,true) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_OWNER_RELATE) - e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(c51345461.eqlimit) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetProperty(EFFECT_FLAG_OWNER_RELATE+EFFECT_FLAG_IGNORE_IMMUNE) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetReset(RESET_EVENT+0x1fe0000) - e2:SetValue(200) - tc:RegisterEffect(e2) - tc=gc:GetNext() - end - Duel.EquipComplete() -end -function c51345461.eqlimit(e,c) - return e:GetOwner()==c -end diff --git a/script/c51351302.lua b/script/c51351302.lua deleted file mode 100644 index 88cd1c30f4..0000000000 --- a/script/c51351302.lua +++ /dev/null @@ -1,38 +0,0 @@ ---ウジャト眼を持つ男 -function c51351302.initial_effect(c) - --confirm - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(51351302,0)) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c51351302.target) - e1:SetOperation(c51351302.operation) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(51351302,0)) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) - e2:SetCountLimit(1) - e2:SetCondition(c51351302.condition) - e2:SetTarget(c51351302.target) - e2:SetOperation(c51351302.operation) - c:RegisterEffect(e2) -end -function c51351302.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c51351302.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() and chkc:IsFacedown() end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(51351302,1)) - Duel.SelectTarget(tp,Card.IsFacedown,tp,0,LOCATION_ONFIELD,1,1,nil) -end -function c51351302.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) and tc:IsFacedown() then - Duel.ConfirmCards(tp,tc) - end -end diff --git a/script/c51355346.lua b/script/c51355346.lua deleted file mode 100644 index 3080bcabc3..0000000000 --- a/script/c51355346.lua +++ /dev/null @@ -1,56 +0,0 @@ ---爆炎集合体 ガイヤ・ソウル -function c51355346.initial_effect(c) - --atk - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(51355346,0)) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c51355346.atkcost) - e1:SetOperation(c51355346.atkop) - c:RegisterEffect(e1) - --pierce - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_PIERCE) - c:RegisterEffect(e2) - --destroy - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(51355346,1)) - e3:SetCategory(CATEGORY_DESTROY) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e3:SetRange(LOCATION_MZONE) - e3:SetCode(EVENT_PHASE+PHASE_END) - e3:SetCountLimit(1) - e3:SetTarget(c51355346.destg) - e3:SetOperation(c51355346.desop) - c:RegisterEffect(e3) -end -function c51355346.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsRace,1,e:GetHandler(),RACE_PYRO) end - local g=Duel.SelectReleaseGroup(tp,Card.IsRace,1,2,e:GetHandler(),RACE_PYRO) - Duel.Release(g,REASON_COST) - e:SetLabel(g:GetCount()) -end -function c51355346.atkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFaceup() and c:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_COPY_INHERIT) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+0x1ff0000) - e1:SetValue(e:GetLabel()*1000) - c:RegisterEffect(e1) - end -end -function c51355346.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0) -end -function c51355346.desop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - Duel.Destroy(c,REASON_EFFECT) - end -end diff --git a/script/c51365514.lua b/script/c51365514.lua deleted file mode 100644 index 2466aaa696..0000000000 --- a/script/c51365514.lua +++ /dev/null @@ -1,27 +0,0 @@ ---超力の聖刻印 -function c51365514.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c51365514.target) - e1:SetOperation(c51365514.activate) - c:RegisterEffect(e1) -end -function c51365514.filter(c,e,tp) - return c:IsSetCard(0x69) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c51365514.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c51365514.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c51365514.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c51365514.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c51371017.lua b/script/c51371017.lua deleted file mode 100644 index 9e1a935870..0000000000 --- a/script/c51371017.lua +++ /dev/null @@ -1,24 +0,0 @@ ---剣の女王 -function c51371017.initial_effect(c) - --flip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(51371017,0)) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP) - e1:SetTarget(c51371017.target) - e1:SetOperation(c51371017.operation) - c:RegisterEffect(e1) -end -function c51371017.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - local dam=Duel.GetFieldGroupCount(tp,0,LOCATION_SZONE)*500 - Duel.SetTargetParam(dam) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,dam) -end -function c51371017.operation(e,tp,eg,ep,ev,re,r,rp) - local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) - local dam=Duel.GetFieldGroupCount(p,LOCATION_SZONE,0)*500 - Duel.Damage(p,dam,REASON_EFFECT) -end diff --git a/script/c51394546.lua b/script/c51394546.lua deleted file mode 100644 index 5818a819e9..0000000000 --- a/script/c51394546.lua +++ /dev/null @@ -1,25 +0,0 @@ ---セメタリー・ボム -function c51394546.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_TOGRAVE+TIMING_END_PHASE) - e1:SetTarget(c51394546.target) - e1:SetOperation(c51394546.activate) - c:RegisterEffect(e1) -end -function c51394546.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_GRAVE)>0 end - Duel.SetTargetPlayer(1-tp) - local dam=Duel.GetFieldGroupCount(tp,0,LOCATION_GRAVE)*100 - Duel.SetTargetParam(dam) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,dam) -end -function c51394546.activate(e,tp,eg,ep,ev,re,r,rp) - local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) - local dam=Duel.GetFieldGroupCount(1-tp,LOCATION_GRAVE,0)*100 - Duel.Damage(p,dam,REASON_EFFECT) -end diff --git a/script/c51402177.lua b/script/c51402177.lua deleted file mode 100644 index f8bfdecac8..0000000000 --- a/script/c51402177.lua +++ /dev/null @@ -1,74 +0,0 @@ ---スフィンクス・テーレイア -function c51402177.initial_effect(c) - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_GRAVE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_SPSUMMON_PROC) - e2:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e2:SetRange(LOCATION_HAND) - e2:SetCondition(c51402177.spcon) - e2:SetOperation(c51402177.spop) - c:RegisterEffect(e2) - --damage - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(51402177,0)) - e3:SetCategory(CATEGORY_DAMAGE) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e3:SetCode(EVENT_BATTLE_DESTROYING) - e3:SetCondition(c51402177.damcon) - e3:SetTarget(c51402177.damtg) - e3:SetOperation(c51402177.damop) - c:RegisterEffect(e3) - --cannot attack - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e4:SetCode(EVENT_SUMMON_SUCCESS) - e4:SetOperation(c51402177.atklimit) - c:RegisterEffect(e4) - local e5=e4:Clone() - e5:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e5) -end -function c51402177.atklimit(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e:GetHandler():RegisterEffect(e1) -end -function c51402177.cfilter(c) - return c:IsFaceup() and c:IsCode(53569894) -end -function c51402177.spcon(e,c) - if c==nil then return true end - return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and Duel.CheckLPCost(c:GetControler(),500) - and Duel.IsExistingMatchingCard(c51402177.cfilter,0,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) -end -function c51402177.spop(e,tp,eg,ep,ev,re,r,rp,c) - Duel.PayLPCost(tp,500) -end -function c51402177.damcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local bc=c:GetBattleTarget() - return c:IsRelateToBattle() and bc:IsType(TYPE_MONSTER) and bit.band(bc:GetBattlePosition(),POS_DEFENCE)~=0 -end -function c51402177.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local dam=e:GetHandler():GetBattleTarget():GetBaseDefence()/2 - if dam<0 then dam=0 end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(dam) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,dam) -end -function c51402177.damop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c51402908.lua b/script/c51402908.lua deleted file mode 100644 index 65dc9a6c6b..0000000000 --- a/script/c51402908.lua +++ /dev/null @@ -1,54 +0,0 @@ ---THE Supremacy Sun -function c51402908.initial_effect(c) - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(aux.FALSE) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetOperation(c51402908.spr) - c:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(51402908,0)) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetRange(LOCATION_GRAVE) - e3:SetCode(EVENT_PHASE+PHASE_STANDBY) - e3:SetCondition(c51402908.spcon) - e3:SetCost(c51402908.spcost) - e3:SetTarget(c51402908.sptg) - e3:SetOperation(c51402908.spop) - c:RegisterEffect(e3) -end -function c51402908.spr(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsReason(REASON_DESTROY) and c:IsPreviousLocation(LOCATION_ONFIELD) - and c:IsPreviousPosition(POS_FACEUP) then - c:RegisterFlagEffect(51402908,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,2) - end -end -function c51402908.spcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:GetTurnID()~=Duel.GetTurnCount() and c:GetFlagEffect(51402908)>0 -end -function c51402908.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD,nil) -end -function c51402908.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) - e:GetHandler():ResetFlagEffect(51402908) -end -function c51402908.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP) - end -end diff --git a/script/c51405049.lua b/script/c51405049.lua deleted file mode 100644 index d4fc2230e3..0000000000 --- a/script/c51405049.lua +++ /dev/null @@ -1,62 +0,0 @@ ---ワンチャン!? -function c51405049.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c51405049.condition) - e1:SetTarget(c51405049.target) - e1:SetOperation(c51405049.activate) - c:RegisterEffect(e1) -end -function c51405049.cfilter(c) - return c:IsFaceup() and c:GetLevel()==1 -end -function c51405049.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c51405049.cfilter,tp,LOCATION_MZONE,0,1,nil) -end -function c51405049.filter(c) - return c:GetLevel()==1 and c:IsAbleToHand() -end -function c51405049.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c51405049.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c51405049.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c51405049.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetOperation(c51405049.regop) - e1:SetLabel(g:GetFirst():GetCode()) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_PHASE+PHASE_END) - e2:SetCountLimit(1) - e2:SetCondition(c51405049.damcon) - e2:SetOperation(c51405049.damop) - e2:SetReset(RESET_PHASE+PHASE_END) - e2:SetLabelObject(e1) - Duel.RegisterEffect(e2,tp) - end -end -function c51405049.regop(e,tp,eg,ep,ev,re,r,rp) - if e:GetLabel()==0 then return end - local tc=eg:GetFirst() - if tc:GetCode()==e:GetLabel() then - e:SetLabel(0) - end -end -function c51405049.damcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetLabelObject():GetLabel()~=0 -end -function c51405049.damop(e,tp,eg,ep,ev,re,r,rp) - Duel.Damage(tp,2000,REASON_EFFECT) -end diff --git a/script/c51435705.lua b/script/c51435705.lua deleted file mode 100644 index b2ae114f80..0000000000 --- a/script/c51435705.lua +++ /dev/null @@ -1,41 +0,0 @@ ---先史遺産クリスタル・スカル -function c51435705.initial_effect(c) - --search - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(51435705,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(1,51435705) - e1:SetCondition(c51435705.shcon) - e1:SetCost(c51435705.shcost) - e1:SetTarget(c51435705.shtg) - e1:SetOperation(c51435705.shop) - c:RegisterEffect(e1) -end -function c51435705.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x70) -end -function c51435705.shcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c51435705.cfilter,tp,LOCATION_MZONE,0,1,nil) -end -function c51435705.shcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsDiscardable() and e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_DISCARD+REASON_COST) -end -function c51435705.filter(c) - return c:IsSetCard(0x70) and c:GetCode()~=51435705 and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() - and not c:IsHasEffect(EFFECT_NECRO_VALLEY) -end -function c51435705.shtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c51435705.filter,tp,LOCATION_GRAVE+LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE+LOCATION_DECK) -end -function c51435705.shop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c51435705.filter,tp,LOCATION_GRAVE+LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c51447164.lua b/script/c51447164.lua deleted file mode 100644 index 65fb4a2cdc..0000000000 --- a/script/c51447164.lua +++ /dev/null @@ -1,102 +0,0 @@ ---TG ブレード・ガンナー -function c51447164.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsType,TYPE_SYNCHRO),aux.NonTuner(Card.IsType,TYPE_SYNCHRO),1) - c:EnableReviveLimit() - --Negate - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(51447164,0)) - e1:SetCategory(CATEGORY_DISABLE) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_CHAINING) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c51447164.discon) - e1:SetCost(c51447164.discost) - e1:SetTarget(c51447164.distg) - e1:SetOperation(c51447164.disop) - c:RegisterEffect(e1) - --Remove - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(51447164,1)) - e2:SetCategory(CATEGORY_REMOVE) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCondition(c51447164.rmcon) - e2:SetCost(c51447164.rmcost) - e2:SetTarget(c51447164.rmtg) - e2:SetOperation(c51447164.rmop) - c:RegisterEffect(e2) - --Special summon - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(51447164,2)) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetCode(EVENT_PHASE+PHASE_STANDBY) - e3:SetRange(LOCATION_REMOVED) - e3:SetCountLimit(1) - e3:SetCondition(c51447164.spcon) - e3:SetTarget(c51447164.sptg) - e3:SetOperation(c51447164.spop) - c:RegisterEffect(e3) -end -function c51447164.discon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsStatus(STATUS_BATTLE_DESTROYED) then return false end - if not re:IsHasType(EFFECT_TYPE_ACTIVATE) or not Duel.IsChainDisablable(ev) then return false end - return re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) and Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS):IsContains(c) -end -function c51447164.discost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,1,1,nil) - Duel.SendtoGrave(g,REASON_COST) -end -function c51447164.distg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0) -end -function c51447164.disop(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateEffect(ev) -end -function c51447164.rmcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp -end -function c51447164.rmfilter(c) - return c:IsSetCard(0x27) and c:IsAbleToRemoveAsCost() -end -function c51447164.rmcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c51447164.rmfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c51447164.rmfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c51447164.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemove() end - Duel.SetOperationInfo(0,CATEGORY_REMOVE,e:GetHandler(),1,0,0) -end -function c51447164.rmop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.Remove(c,POS_FACEUP,REASON_EFFECT)~=0 then - if Duel.GetCurrentPhase()==PHASE_STANDBY then - c:RegisterFlagEffect(51447164,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_STANDBY,0,2,Duel.GetTurnCount()) - else - c:RegisterFlagEffect(51447164,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_STANDBY,0,1) - end - end -end -function c51447164.spcon(e,tp,eg,ep,ev,re,r,rp) - local label=e:GetHandler():GetFlagEffectLabel(51447164) - return label and label~=Duel.GetTurnCount() -end -function c51447164.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - e:GetHandler():ResetFlagEffect(51447164) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c51447164.spop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c51449743.lua b/script/c51449743.lua deleted file mode 100644 index f6469d1293..0000000000 --- a/script/c51449743.lua +++ /dev/null @@ -1,32 +0,0 @@ ---チェーン・ブラスト -function c51449743.initial_effect(c) - --damage - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c51449743.damtg) - e1:SetOperation(c51449743.damop) - c:RegisterEffect(e1) -end -function c51449743.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(500) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,500) -end -function c51449743.damop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) then return end - local ct=Duel.GetCurrentChain() - if ct>3 then - c:CancelToGrave() - Duel.SendtoHand(c,nil,REASON_EFFECT) - elseif ct>1 then - c:CancelToGrave() - Duel.SendtoDeck(c,nil,2,REASON_EFFECT) - end -end diff --git a/script/c51452091.lua b/script/c51452091.lua deleted file mode 100644 index b884f36b9a..0000000000 --- a/script/c51452091.lua +++ /dev/null @@ -1,41 +0,0 @@ ---王宮のお触れ -function c51452091.initial_effect(c) - --activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_END_PHASE) - c:RegisterEffect(e1) - --disable - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_DISABLE) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(LOCATION_SZONE,LOCATION_SZONE) - e2:SetTarget(c51452091.distarget) - c:RegisterEffect(e2) - --disable effect - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e3:SetCode(EVENT_CHAIN_SOLVING) - e3:SetRange(LOCATION_SZONE) - e3:SetOperation(c51452091.disop) - c:RegisterEffect(e3) - --disable trap monster - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_FIELD) - e4:SetCode(EFFECT_DISABLE_TRAPMONSTER) - e4:SetRange(LOCATION_SZONE) - e4:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e4:SetTarget(c51452091.distarget) - c:RegisterEffect(e4) -end -function c51452091.distarget(e,c) - return c~=e:GetHandler() and c:IsType(TYPE_TRAP) and c:IsStatus(STATUS_ACTIVATED) -end -function c51452091.disop(e,tp,eg,ep,ev,re,r,rp) - local tl=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION) - if tl==LOCATION_SZONE and re:IsActiveType(TYPE_TRAP) and re:GetHandler()~=e:GetHandler() then - Duel.NegateEffect(ev) - end -end diff --git a/script/c51481927.lua b/script/c51481927.lua deleted file mode 100644 index 83463860ee..0000000000 --- a/script/c51481927.lua +++ /dev/null @@ -1,22 +0,0 @@ ---魔法吸収 -function c51481927.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --LP up - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(51481927,0)) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_CHAIN_SOLVED) - e2:SetRange(LOCATION_SZONE) - e2:SetOperation(c51481927.operation) - c:RegisterEffect(e2) -end -function c51481927.operation(e,tp,eg,ep,ev,re,r,rp) - local te=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_EFFECT) - if te:IsHasType(EFFECT_TYPE_ACTIVATE) and te:IsActiveType(TYPE_SPELL) and te:GetHandler()~=e:GetHandler() then - Duel.Recover(e:GetHandlerPlayer(),500,REASON_EFFECT) - end -end diff --git a/script/c51482758.lua b/script/c51482758.lua deleted file mode 100644 index 76183d7dc5..0000000000 --- a/script/c51482758.lua +++ /dev/null @@ -1,28 +0,0 @@ ---罠はずし -function c51482758.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c51482758.target) - e1:SetOperation(c51482758.activate) - c:RegisterEffect(e1) -end -function c51482758.filter(c) - return c:IsFaceup() and c:IsDestructable() and c:IsType(TYPE_TRAP) -end -function c51482758.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and c51482758.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c51482758.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c51482758.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c51482758.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c51531505.lua b/script/c51531505.lua deleted file mode 100644 index e58798ca66..0000000000 --- a/script/c51531505.lua +++ /dev/null @@ -1,52 +0,0 @@ ---竜穴の魔術師 -function c51531505.initial_effect(c) - --pendulum summon - aux.AddPendulumProcedure(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(51531505,0)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_PZONE) - e2:SetCountLimit(1) - e2:SetCondition(c51531505.condition) - e2:SetCost(c51531505.cost) - e2:SetTarget(c51531505.target) - e2:SetOperation(c51531505.operation) - c:RegisterEffect(e2) -end -function c51531505.condition(e,tp,eg,ep,ev,re,r,rp) - local seq=e:GetHandler():GetSequence() - local tc=Duel.GetFieldCard(tp,LOCATION_SZONE,13-seq) - return tc and tc:IsSetCard(0x98) -end -function c51531505.cfilter(c) - return c:IsType(TYPE_PENDULUM) and c:IsDiscardable() -end -function c51531505.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c51531505.cfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,c51531505.cfilter,1,1,REASON_COST+REASON_DISCARD) -end -function c51531505.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable() -end -function c51531505.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and c51531505.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c51531505.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c51531505.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c51531505.operation(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c51534754.lua b/script/c51534754.lua deleted file mode 100644 index f50d1b986c..0000000000 --- a/script/c51534754.lua +++ /dev/null @@ -1,29 +0,0 @@ ---黄泉へ渡る船 -function c51534754.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(51534754,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetCondition(c51534754.condition) - e1:SetTarget(c51534754.target) - e1:SetOperation(c51534754.operation) - c:RegisterEffect(e1) -end -function c51534754.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) - and e:GetHandler():GetReasonCard():IsRelateToBattle() -end -function c51534754.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local rc=e:GetHandler():GetReasonCard() - Duel.SetTargetCard(rc) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,rc,1,0,0) -end -function c51534754.operation(e,tp,eg,ep,ev,re,r,rp) - local rc=Duel.GetFirstTarget() - if rc:IsRelateToEffect(e) then - Duel.Destroy(rc,REASON_EFFECT) - end -end diff --git a/script/c51543904.lua b/script/c51543904.lua deleted file mode 100644 index b60a4114af..0000000000 --- a/script/c51543904.lua +++ /dev/null @@ -1,93 +0,0 @@ ---No.99 希望皇龍ホープドラグーン -function c51543904.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,10,3,c51543904.ovfilter,aux.Stringid(51543904,0),3,c51543904.xyzop) - c:EnableReviveLimit() - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(51543904,1)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetTarget(c51543904.sptg) - e1:SetOperation(c51543904.spop) - c:RegisterEffect(e1) - --disable - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(51543904,2)) - e2:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_CHAINING) - e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) - e2:SetRange(LOCATION_MZONE) - e2:SetCondition(c51543904.discon) - e2:SetCost(c51543904.discost) - e2:SetTarget(c51543904.distg) - e2:SetOperation(c51543904.disop) - c:RegisterEffect(e2) -end -c51543904.xyz_number=99 -function c51543904.cfilter(c) - return c:IsSetCard(0x95) and c:IsType(TYPE_SPELL) and c:IsDiscardable() -end -function c51543904.ovfilter(c) - return c:IsFaceup() and c:IsSetCard(0x7f) -end -function c51543904.xyzop(e,tp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c51543904.cfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,c51543904.cfilter,1,1,REASON_COST+REASON_DISCARD) -end -function c51543904.filter(c,e,tp) - return c:IsSetCard(0x48) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c51543904.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c51543904.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c51543904.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c51543904.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c51543904.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP_DEFENCE) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e2) - Duel.SpecialSummonComplete() - end -end -function c51543904.discon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsStatus(STATUS_BATTLE_DESTROYED) then return false end - if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) or not re:IsActiveType(TYPE_MONSTER) then return end - local tg=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) - return tg and tg:IsContains(c) and Duel.IsChainNegatable(ev) -end -function c51543904.discost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c51543904.distg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) - end -end -function c51543904.disop(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateActivation(ev) - if re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(eg,REASON_EFFECT) - end -end diff --git a/script/c51549976.lua b/script/c51549976.lua deleted file mode 100644 index 24ea13fa9f..0000000000 --- a/script/c51549976.lua +++ /dev/null @@ -1,46 +0,0 @@ ---ファイナル・インゼクション -function c51549976.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c51549976.cost) - e1:SetTarget(c51549976.target) - e1:SetOperation(c51549976.activate) - c:RegisterEffect(e1) -end -function c51549976.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x56) and c:IsAbleToGraveAsCost() -end -function c51549976.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c51549976.cfilter,tp,LOCATION_ONFIELD,0,5,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c51549976.cfilter,tp,LOCATION_ONFIELD,0,5,5,nil) - Duel.SendtoGrave(g,REASON_COST) -end -function c51549976.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,0,LOCATION_ONFIELD,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c51549976.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,0,LOCATION_ONFIELD,nil) - Duel.Destroy(g,REASON_EFFECT) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EFFECT_CANNOT_ACTIVATE) - e1:SetTargetRange(0,1) - e1:SetCondition(c51549976.actcon) - e1:SetValue(c51549976.aclimit) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function c51549976.actcon(e) - local ph=Duel.GetCurrentPhase() - return ph>=PHASE_BATTLE and ph<=PHASE_DAMAGE_CAL -end -function c51549976.aclimit(e,re,tp) - return re:GetHandler():IsType(TYPE_MONSTER) and re:GetHandler():IsLocation(LOCATION_HAND+LOCATION_GRAVE) -end diff --git a/script/c51554871.lua b/script/c51554871.lua deleted file mode 100644 index 34f92c5f6b..0000000000 --- a/script/c51554871.lua +++ /dev/null @@ -1,38 +0,0 @@ ---灼熱工の巨匠カエン -function c51554871.initial_effect(c) - --atkup - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(51554871,0)) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_GRAVE) - e1:SetCost(c51554871.cost) - e1:SetTarget(c51554871.target) - e1:SetOperation(c51554871.operation) - c:RegisterEffect(e1) -end -function c51554871.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) -end -function c51554871.filter(c) - return c:IsFaceup() and c:IsSetCard(0x39) -end -function c51554871.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c51554871.filter,tp,LOCATION_MZONE,0,1,nil) end -end -function c51554871.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c51554871.filter,tp,LOCATION_MZONE,0,nil) - local tc=g:GetFirst() - if not tc then return end - local c=e:GetHandler() - while tc do - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(400) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - tc=g:GetNext() - end -end diff --git a/script/c51555725.lua b/script/c51555725.lua deleted file mode 100644 index 4e451627e2..0000000000 --- a/script/c51555725.lua +++ /dev/null @@ -1,47 +0,0 @@ ---スクラップ・ブレイカー -function c51555725.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c51555725.spcon) - e1:SetValue(1) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(51555725,0)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetCondition(c51555725.condition) - e2:SetTarget(c51555725.target) - e2:SetOperation(c51555725.operation) - c:RegisterEffect(e2) -end -function c51555725.spcon(e,c) - if c==nil then return true end - return Duel.GetFieldGroupCount(c:GetControler(),0,LOCATION_MZONE,nil)>0 - and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 -end -function c51555725.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+1 -end -function c51555725.filter(c) - return c:IsFaceup() and c:IsSetCard(0x24) and c:IsDestructable() -end -function c51555725.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c51555725.filter(chkc) end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c51555725.filter,tp,LOCATION_MZONE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c51555725.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/script/c51562916.lua b/script/c51562916.lua deleted file mode 100644 index 7123b85b6c..0000000000 --- a/script/c51562916.lua +++ /dev/null @@ -1,36 +0,0 @@ ---大波小波 -function c51562916.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c51562916.target) - e1:SetOperation(c51562916.activate) - c:RegisterEffect(e1) -end -function c51562916.dfilter(c) - return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_WATER) and c:IsDestructable() -end -function c51562916.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c51562916.dfilter,tp,LOCATION_MZONE,0,1,nil) end - local g=Duel.GetMatchingGroup(c51562916.dfilter,tp,LOCATION_MZONE,0,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c51562916.spfilter(c,e,tp) - return c:IsAttribute(ATTRIBUTE_WATER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c51562916.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c51562916.dfilter,tp,LOCATION_MZONE,0,nil) - local ct=Duel.Destroy(g,REASON_EFFECT) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ct==0 or ft<=0 then return end - if ct>ft then ct=ft end - local sg=Duel.GetMatchingGroup(c51562916.spfilter,tp,LOCATION_HAND,0,nil,e,tp) - if sg:GetCount()~=0 and Duel.SelectYesNo(tp,aux.Stringid(51562916,0)) then - Duel.BreakEffect() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local spg=sg:Select(tp,1,ct,nil) - Duel.SpecialSummon(spg,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c51566770.lua b/script/c51566770.lua deleted file mode 100644 index 7a22c220a5..0000000000 --- a/script/c51566770.lua +++ /dev/null @@ -1,23 +0,0 @@ ---インフェルニティ・ガーディアン -function c51566770.initial_effect(c) - --cannot destroy - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c51566770.condition) - e1:SetValue(1) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - e2:SetRange(LOCATION_MZONE) - e2:SetCondition(c51566770.condition) - e2:SetValue(1) - c:RegisterEffect(e2) -end -function c51566770.condition(e) - return Duel.GetFieldGroupCount(e:GetHandler():GetControler(),LOCATION_HAND,0)==0 -end diff --git a/script/c51589188.lua b/script/c51589188.lua deleted file mode 100644 index 8915102ad6..0000000000 --- a/script/c51589188.lua +++ /dev/null @@ -1,73 +0,0 @@ ---フォトン・トライデント -function c51589188.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetCondition(c51589188.condition) - e1:SetTarget(c51589188.target) - e1:SetOperation(c51589188.activate) - c:RegisterEffect(e1) -end -function c51589188.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end -function c51589188.filter(c) - return c:IsFaceup() and c:IsSetCard(0x55) -end -function c51589188.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c51589188.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c51589188.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - local g=Duel.SelectTarget(tp,c51589188.filter,tp,LOCATION_MZONE,0,1,1,nil) -end -function c51589188.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() and not tc:IsImmuneToEffect(e) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - e1:SetValue(700) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_PIERCE) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - tc:RegisterEffect(e2) - local e3=Effect.CreateEffect(e:GetHandler()) - e3:SetDescription(aux.Stringid(51589188,0)) - e3:SetCategory(CATEGORY_DESTROY) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_BATTLE_DAMAGE) - e3:SetLabelObject(tc) - e3:SetCondition(c51589188.descon) - e3:SetTarget(c51589188.destg) - e3:SetOperation(c51589188.desop) - e3:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e3,tp) - end -end -function c51589188.descon(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp and eg:GetFirst()==e:GetLabelObject() -end -function c51589188.desfilter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable() -end -function c51589188.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and c51589188.desfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c51589188.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c51589188.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c51589188.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c51616747.lua b/script/c51616747.lua deleted file mode 100644 index 93804e30cb..0000000000 --- a/script/c51616747.lua +++ /dev/null @@ -1,33 +0,0 @@ ---ヌビアガード -function c51616747.initial_effect(c) - --todeck - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(51616747,0)) - e1:SetCategory(CATEGORY_TODECK) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_BATTLE_DAMAGE) - e1:SetCondition(c51616747.condition) - e1:SetTarget(c51616747.target) - e1:SetOperation(c51616747.operation) - c:RegisterEffect(e1) -end -function c51616747.condition(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp -end -function c51616747.filter(c) - return c:GetType()==TYPE_SPELL+TYPE_CONTINUOUS and c:IsAbleToDeck() -end -function c51616747.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c51616747.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c51616747.filter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectTarget(tp,c51616747.filter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0) -end -function c51616747.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.SendtoDeck(tc,nil,0,REASON_EFFECT) - end -end diff --git a/script/c51617185.lua b/script/c51617185.lua deleted file mode 100644 index 43870e2a62..0000000000 --- a/script/c51617185.lua +++ /dev/null @@ -1,68 +0,0 @@ ---マシンナーズ・メガフォーム -function c51617185.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(51617185,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1,51617185) - e1:SetCost(c51617185.spcost1) - e1:SetTarget(c51617185.sptg1) - e1:SetOperation(c51617185.spop1) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(51617185,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetRange(LOCATION_GRAVE) - e2:SetCountLimit(1,51617185) - e2:SetCost(c51617185.spcost2) - e2:SetTarget(c51617185.sptg2) - e2:SetOperation(c51617185.spop2) - c:RegisterEffect(e2) -end -function c51617185.spcost1(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end -function c51617185.spfilter(c,e,tp) - return c:IsSetCard(0x36) and not c:IsCode(51617185) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c51617185.sptg1(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsExistingMatchingCard(c51617185.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) -end -function c51617185.spop1(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c51617185.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end -function c51617185.cfilter(c,tp) - return c:IsCode(5556499) and c:IsControler(tp) - and c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousPosition(POS_FACEUP) - and c:GetPreviousControler()==tp and c:IsAbleToRemoveAsCost() -end -function c51617185.spcost2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return not eg:IsContains(e:GetHandler()) and eg:IsExists(c51617185.cfilter,1,nil,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=eg:FilterSelect(tp,c51617185.cfilter,1,1,nil,tp) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c51617185.sptg2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c51617185.spop2(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c51630558.lua b/script/c51630558.lua deleted file mode 100644 index ab80f248cc..0000000000 --- a/script/c51630558.lua +++ /dev/null @@ -1,31 +0,0 @@ ---アドバンスドロー -function c51630558.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c51630558.cost) - e1:SetTarget(c51630558.target) - e1:SetOperation(c51630558.activate) - c:RegisterEffect(e1) -end -function c51630558.filter(c) - return c:IsFaceup() and c:GetLevel()>=8 -end -function c51630558.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,c51630558.filter,1,nil) end - local g=Duel.SelectReleaseGroup(tp,c51630558.filter,1,1,nil) - Duel.Release(g,REASON_COST) -end -function c51630558.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp,2) end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(2) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2) -end -function c51630558.activate(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end diff --git a/script/c51632798.lua b/script/c51632798.lua deleted file mode 100644 index a01086a152..0000000000 --- a/script/c51632798.lua +++ /dev/null @@ -1,34 +0,0 @@ ---可変機獣 ガンナードラゴン -function c51632798.initial_effect(c) - --summon & set with no tribute - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(51632798,0)) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SUMMON_PROC) - e1:SetCondition(c51632798.ntcon) - e1:SetOperation(c51632798.ntop) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_SET_PROC) - c:RegisterEffect(e2) -end -function c51632798.ntcon(e,c,minc) - if c==nil then return true end - return minc==0 and c:GetLevel()>4 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 -end -function c51632798.ntop(e,tp,eg,ep,ev,re,r,rp,c) - --change base attack - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetReset(RESET_EVENT+0xff0000) - e1:SetCode(EFFECT_SET_BASE_ATTACK) - e1:SetValue(1400) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_SET_BASE_DEFENCE) - e2:SetValue(1000) - c:RegisterEffect(e2) -end diff --git a/script/c51670553.lua b/script/c51670553.lua deleted file mode 100644 index 4c13eb3f81..0000000000 --- a/script/c51670553.lua +++ /dev/null @@ -1,80 +0,0 @@ ---魂を吸う竹光 -function c51670553.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c51670553.target) - e1:SetOperation(c51670553.operation) - c:RegisterEffect(e1) - --skip draw - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(51670553,0)) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetRange(LOCATION_SZONE) - e2:SetCode(EVENT_DAMAGE) - e2:SetCondition(c51670553.skipcon) - e2:SetOperation(c51670553.skipop) - c:RegisterEffect(e2) - --destroy - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e3:SetCode(EVENT_PHASE+PHASE_STANDBY) - e3:SetCountLimit(1) - e3:SetRange(LOCATION_SZONE) - e3:SetCondition(c51670553.descon) - e3:SetOperation(c51670553.desop) - c:RegisterEffect(e3) -end -function c51670553.filter(c) - return c:GetEquipCount()~=0 and c:GetEquipGroup():IsExists(Card.IsSetCard,1,nil,0x60) -end -function c51670553.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c51670553.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c51670553.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - e:GetHandler():SetTurnCounter(0) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - Duel.SelectTarget(tp,c51670553.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) -end -function c51670553.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) then return end - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - c:SetCardTarget(tc) - end -end -function c51670553.skipcon(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetHandler():GetFirstCardTarget() - return tc and ep~=tp and r==REASON_BATTLE and (Duel.GetAttacker()==tc or Duel.GetAttackTarget()==tc) -end -function c51670553.skipop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetRange(LOCATION_SZONE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetTargetRange(0,1) - e1:SetCode(EFFECT_SKIP_DP) - e1:SetCondition(c51670553.skipdp) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_DRAW+RESET_OPPO_TURN) - e:GetHandler():RegisterEffect(e1) -end -function c51670553.skipdp(e) - local tc=e:GetHandler():GetFirstCardTarget() - return tc and c51670553.filter(tc) -end -function c51670553.descon(e,tp,eg,ep,ev,re,r,rp) - return tp==Duel.GetTurnPlayer() -end -function c51670553.desop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local ct=c:GetTurnCounter() - ct=ct+1 - c:SetTurnCounter(ct) - if ct==2 then - Duel.Destroy(c,REASON_RULE) - end -end diff --git a/script/c51701885.lua b/script/c51701885.lua deleted file mode 100644 index d07aa1bf75..0000000000 --- a/script/c51701885.lua +++ /dev/null @@ -1,70 +0,0 @@ ---テレポンD.D. -function c51701885.initial_effect(c) - --remove - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(51701885,0)) - e1:SetCategory(CATEGORY_REMOVE) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_REMOVE) - e1:SetCondition(c51701885.rmcon) - e1:SetTarget(c51701885.rmtg) - e1:SetOperation(c51701885.rmop) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(51701885,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetRange(LOCATION_REMOVED) - e2:SetCountLimit(1) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) - e2:SetCondition(c51701885.spcon) - e2:SetTarget(c51701885.sptg) - e2:SetOperation(c51701885.spop) - e2:SetLabelObject(e1) - c:RegisterEffect(e2) -end -function c51701885.rmcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) and e:GetHandler():IsPreviousPosition(POS_FACEUP) -end -function c51701885.filter(c) - return c:IsAttackBelow(1500) and c:IsRace(RACE_PSYCHO) and c:IsAbleToRemove() -end -function c51701885.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c51701885.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_DECK) -end -function c51701885.rmop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c51701885.filter,tp,LOCATION_DECK,0,1,1,nil) - local tc=g:GetFirst() - local c=e:GetHandler() - if tc then - Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) - if c:IsRelateToEffect(e) then - c:RegisterFlagEffect(51701885,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,3) - tc:RegisterFlagEffect(51701885,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,3) - e:SetLabelObject(tc) - end - end -end -function c51701885.spcon(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetLabelObject():GetLabelObject() - local c=e:GetHandler() - return tc and Duel.GetTurnCount()~=tc:GetTurnID() and Duel.GetTurnPlayer()==tp - and c:GetFlagEffect(51701885)~=0 and tc:GetFlagEffect(51701885)~=0 -end -function c51701885.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - local tc=e:GetLabelObject():GetLabelObject() - if chk==0 then return tc:IsCanBeSpecialSummoned(e,0,tp,false,false) end - tc:CreateEffectRelation(e) - e:GetHandler():ResetFlagEffect(51701885) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,tc,1,0,0) -end -function c51701885.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetLabelObject():GetLabelObject() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c51717541.lua b/script/c51717541.lua deleted file mode 100644 index 451123cd57..0000000000 --- a/script/c51717541.lua +++ /dev/null @@ -1,43 +0,0 @@ ---インフェルニティ・ブレイク -function c51717541.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_REMOVE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,0x1e0) - e1:SetCondition(c51717541.condition) - e1:SetTarget(c51717541.target) - e1:SetOperation(c51717541.activate) - c:RegisterEffect(e1) -end -function c51717541.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)==0 -end -function c51717541.filter(c) - return c:IsSetCard(0xb) and c:IsAbleToRemove() -end -function c51717541.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,0,LOCATION_ONFIELD,1,nil) - and Duel.IsExistingTarget(c51717541.filter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g1=Duel.SelectTarget(tp,c51717541.filter,tp,LOCATION_GRAVE,0,1,1,nil) - local rm=g1:GetFirst() - Duel.SetOperationInfo(0,CATEGORY_REMOVE,rm,1,0,0) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g2=Duel.SelectTarget(tp,Card.IsDestructable,tp,0,LOCATION_ONFIELD,1,1,nil) - local ds=g2:GetFirst() - Duel.SetOperationInfo(0,CATEGORY_DESTROY,ds,1,0,0) -end -function c51717541.activate(e,tp,eg,ep,ev,re,r,rp) - local ex1,g1=Duel.GetOperationInfo(0,CATEGORY_REMOVE) - local rm=g1:GetFirst() - if not rm:IsRelateToEffect(e) then return end - if Duel.Remove(rm,POS_FACEUP,REASON_EFFECT)==0 then return end - local ex2,g2=Duel.GetOperationInfo(0,CATEGORY_DESTROY) - local ds=g2:GetFirst() - if not ds:IsRelateToEffect(e) then return end - Duel.Destroy(ds,REASON_EFFECT) -end diff --git a/script/c51735257.lua b/script/c51735257.lua deleted file mode 100644 index 9b8d32de35..0000000000 --- a/script/c51735257.lua +++ /dev/null @@ -1,50 +0,0 @@ ---No.50 ブラック・コーン号 -function c51735257.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,4,2) - c:EnableReviveLimit() - --send to grave - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(51735257,0)) - e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_DAMAGE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c51735257.cost) - e1:SetTarget(c51735257.target) - e1:SetOperation(c51735257.operation) - c:RegisterEffect(e1) -end -c51735257.xyz_number=50 -function c51735257.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():GetAttackAnnouncedCount()==0 - and e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_OATH) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e:GetHandler():RegisterEffect(e1) -end -function c51735257.filter(c,atk) - return c:IsFaceup() and c:IsAttackBelow(atk) -end -function c51735257.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and c51735257.filter(chkc,e:GetHandler():GetAttack()) end - if chk==0 then return Duel.IsExistingTarget(c51735257.filter,tp,0,LOCATION_MZONE,1,nil,e:GetHandler():GetAttack()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectTarget(tp,c51735257.filter,tp,0,LOCATION_MZONE,1,1,nil,e:GetHandler():GetAttack()) - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,g:GetCount(),0,0) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,1000) -end -function c51735257.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.SendtoGrave(tc,REASON_EFFECT) - if tc:IsLocation(LOCATION_GRAVE) then - Duel.Damage(1-tp,1000,REASON_EFFECT) - end - end -end diff --git a/script/c51773900.lua b/script/c51773900.lua deleted file mode 100644 index 1df73e2369..0000000000 --- a/script/c51773900.lua +++ /dev/null @@ -1,36 +0,0 @@ ---カーム・マジック -function c51773900.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c51773900.condition) - e1:SetOperation(c51773900.operation) - c:RegisterEffect(e1) -end -function c51773900.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()==PHASE_MAIN1 and not Duel.CheckPhaseActivity() -end -function c51773900.operation(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetCondition(c51773900.sumcon) - e1:SetReset(RESET_PHASE+PHASE_END) - e1:SetTargetRange(1,1) - Duel.RegisterEffect(e1,tp) - local e2=e1:Clone() - e2:SetCode(EFFECT_CANNOT_SUMMON) - Duel.RegisterEffect(e2,tp) - local e3=e1:Clone() - e3:SetCode(EFFECT_CANNOT_FLIP_SUMMON) - Duel.RegisterEffect(e3,tp) - local e4=e1:Clone() - e4:SetCode(EFFECT_CANNOT_MSET) - Duel.RegisterEffect(e4,tp) -end -function c51773900.sumcon(e) - local ph=Duel.GetCurrentPhase() - return ph>=PHASE_MAIN1 and ph<=PHASE_MAIN2 -end diff --git a/script/c51790181.lua b/script/c51790181.lua deleted file mode 100644 index 81101f4745..0000000000 --- a/script/c51790181.lua +++ /dev/null @@ -1,28 +0,0 @@ ---無欲な壺 -function c51790181.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TODECK) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,51790181+EFFECT_COUNT_CODE_OATH) - e1:SetTarget(c51790181.target) - e1:SetOperation(c51790181.activate) - c:RegisterEffect(e1) -end -function c51790181.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToDeck,tp,LOCATION_GRAVE,LOCATION_GRAVE,2,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectTarget(tp,Card.IsAbleToDeck,tp,LOCATION_GRAVE,LOCATION_GRAVE,2,2,nil) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,2,0,0) -end -function c51790181.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local sg=g:Filter(Card.IsRelateToEffect,nil,e) - Duel.SendtoDeck(sg,nil,2,REASON_EFFECT) - if e:GetHandler():IsRelateToEffect(e) then - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT) - end -end diff --git a/script/c51808422.lua b/script/c51808422.lua deleted file mode 100644 index 0b5142574c..0000000000 --- a/script/c51808422.lua +++ /dev/null @@ -1,55 +0,0 @@ ---XX-セイバー フォルトロール -function c51808422.initial_effect(c) - c:EnableReviveLimit() - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(aux.FALSE) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_SPSUMMON_PROC) - e2:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e2:SetRange(LOCATION_HAND) - e2:SetCondition(c51808422.spcon) - c:RegisterEffect(e2) - --special summon - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(51808422,0)) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1) - e3:SetTarget(c51808422.target) - e3:SetOperation(c51808422.operation) - c:RegisterEffect(e3) -end -function c51808422.spfilter(c) - return c:IsFaceup() and c:IsSetCard(0x100d) -end -function c51808422.spcon(e,c) - if c==nil then return true end - return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and - Duel.IsExistingMatchingCard(c51808422.spfilter,c:GetControler(),LOCATION_MZONE,0,2,nil) -end -function c51808422.filter(c,e,tp) - return c:IsSetCard(0x100d) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c51808422.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c51808422.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c51808422.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c51808422.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c51808422.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c51827737.lua b/script/c51827737.lua deleted file mode 100644 index 9e1b5a69a8..0000000000 --- a/script/c51827737.lua +++ /dev/null @@ -1,31 +0,0 @@ ---リサイクル・ジェネクス -function c51827737.initial_effect(c) - --cos - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(51827737,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_MZONE) - e1:SetTarget(c51827737.target) - e1:SetOperation(c51827737.operation) - c:RegisterEffect(e1) -end -function c51827737.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and chkc:IsSetCard(0x2) end - if chk==0 then return Duel.IsExistingTarget(Card.IsSetCard,tp,LOCATION_GRAVE,0,1,nil,0x2) end - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(51827737,1)) - Duel.SelectTarget(tp,Card.IsSetCard,tp,LOCATION_GRAVE,0,1,1,nil,0x2) -end -function c51827737.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if not c:IsRelateToEffect(e) or c:IsFacedown() or not tc:IsRelateToEffect(e) then return end - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CHANGE_CODE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e1:SetValue(tc:GetCode()) - c:RegisterEffect(e1) -end diff --git a/script/c51828629.lua b/script/c51828629.lua deleted file mode 100644 index 3956094c2f..0000000000 --- a/script/c51828629.lua +++ /dev/null @@ -1,6 +0,0 @@ ---魔導騎士ギルティア -function c51828629.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcCode2(c,89272878,10071456,true,true) -end diff --git a/script/c5183693.lua b/script/c5183693.lua deleted file mode 100644 index d380b6b2a3..0000000000 --- a/script/c5183693.lua +++ /dev/null @@ -1,83 +0,0 @@ ---下克上の首飾り -function c5183693.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c5183693.target) - e1:SetOperation(c5183693.operation) - c:RegisterEffect(e1) - --atk up - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_DAMAGE_CALCULATING) - e2:SetRange(LOCATION_SZONE) - e2:SetOperation(c5183693.atkup) - c:RegisterEffect(e2) - --Equip limit - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_EQUIP_LIMIT) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e3:SetValue(c5183693.eqlimit) - c:RegisterEffect(e3) - --todeck - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(5183693,0)) - e4:SetCategory(CATEGORY_TODECK) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e4:SetCode(EVENT_TO_GRAVE) - e4:SetTarget(c5183693.tdtg) - e4:SetOperation(c5183693.tdop) - c:RegisterEffect(e4) -end -function c5183693.eqlimit(e,c) - return c:IsType(TYPE_NORMAL) -end -function c5183693.filter(c) - return c:IsFaceup() and c:IsType(TYPE_NORMAL) -end -function c5183693.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:GetLocation()==LOCATION_MZONE and c5183693.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c5183693.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c5183693.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c5183693.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,e:GetHandler(),tc) - end -end -function c5183693.atkup(e,tp,eg,ep,ev,re,r,rp) - local eqc=e:GetHandler():GetEquipTarget() - local a=Duel.GetAttacker() - local d=Duel.GetAttackTarget() - if not d or (a~=eqc and d~=eqc) then return end - local la=a:GetLevel() - local ld=d:GetLevel() - if (a==eqc and ld<=la) or (d==eqc and la<=ld) then return end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_PHASE+RESET_DAMAGE_CAL) - if a==eqc then - e1:SetValue((ld-la)*500) - a:RegisterEffect(e1) - else - e1:SetValue((la-ld)*500) - d:RegisterEffect(e1) - end -end -function c5183693.tdtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToDeck() end - Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0) -end -function c5183693.tdop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - Duel.SendtoDeck(e:GetHandler(),nil,0,REASON_EFFECT) - end -end diff --git a/script/c51838385.lua b/script/c51838385.lua deleted file mode 100644 index cccf7031fc..0000000000 --- a/script/c51838385.lua +++ /dev/null @@ -1,19 +0,0 @@ ---ナイトメアテーベ -function c51838385.initial_effect(c) - --atk - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetCondition(c51838385.atkcon) - e1:SetValue(1500) - c:RegisterEffect(e1) -end -function c51838385.atkcon(e) - local tp=e:GetHandlerPlayer() - for i=0,4 do - if Duel.GetFieldCard(tp,LOCATION_SZONE,i) then return false end - end - return Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)==0 -end diff --git a/script/c51852507.lua b/script/c51852507.lua deleted file mode 100644 index 8774c62c48..0000000000 --- a/script/c51852507.lua +++ /dev/null @@ -1,40 +0,0 @@ ---薔薇の聖弓手 -function c51852507.initial_effect(c) - --Negate - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(51852507,0)) - e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_CHAINING) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c51852507.discon) - e1:SetCost(c51852507.discost) - e1:SetTarget(c51852507.distg) - e1:SetOperation(c51852507.disop) - c:RegisterEffect(e1) -end -function c51852507.cfilter(c) - return c:IsFaceup() and c:IsRace(RACE_PLANT) -end -function c51852507.discon(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp and re:IsActiveType(TYPE_TRAP) and re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev) - and Duel.IsExistingMatchingCard(c51852507.cfilter,tp,LOCATION_MZONE,0,1,nil) -end -function c51852507.discost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end -function c51852507.distg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) - end -end -function c51852507.disop(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateActivation(ev) - if re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(eg,REASON_EFFECT) - end -end diff --git a/script/c51855378.lua b/script/c51855378.lua deleted file mode 100644 index 326324f93a..0000000000 --- a/script/c51855378.lua +++ /dev/null @@ -1,32 +0,0 @@ ---ジャンク・ブレーダー -function c51855378.initial_effect(c) - --atkup - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(51855378,0)) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c51855378.cost) - e1:SetOperation(c51855378.operation) - c:RegisterEffect(e1) -end -function c51855378.cfilter(c) - return c:IsSetCard(0x43) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost() -end -function c51855378.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c51855378.cfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c51855378.cfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c51855378.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFaceup() and c:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(400) - e1:SetReset(RESET_EVENT+0x1ff0000+RESET_PHASE+PHASE_END) - c:RegisterEffect(e1) - end -end diff --git a/script/c51858306.lua b/script/c51858306.lua deleted file mode 100644 index 93934c60c6..0000000000 --- a/script/c51858306.lua +++ /dev/null @@ -1,63 +0,0 @@ ---エクリプス・ワイバーン -function c51858306.initial_effect(c) - --remove - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(51858306,0)) - e1:SetCategory(CATEGORY_REMOVE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetTarget(c51858306.target) - e1:SetOperation(c51858306.operation) - c:RegisterEffect(e1) - --remove - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(51858306,1)) - e2:SetCategory(CATEGORY_TOHAND) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP) - e2:SetCode(EVENT_REMOVE) - e2:SetCondition(c51858306.thcon) - e2:SetTarget(c51858306.thtg) - e2:SetOperation(c51858306.thop) - e2:SetLabelObject(e1) - c:RegisterEffect(e2) -end -function c51858306.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_DECK) -end -function c51858306.filter(c) - return c:IsLevelAbove(7) and c:IsRace(RACE_DRAGON) and c:IsAttribute(ATTRIBUTE_LIGHT+ATTRIBUTE_DARK) - and c:IsAbleToRemove() -end -function c51858306.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.IsPlayerAffectedByEffect(tp,30459350) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c51858306.filter,tp,LOCATION_DECK,0,1,1,nil) - local tc=g:GetFirst() - if tc then - Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) - e:SetLabelObject(tc) - e:GetHandler():RegisterFlagEffect(51858306,RESET_EVENT+0x1e60000,0,1) - tc:RegisterFlagEffect(51858306,RESET_EVENT+0x1fe0000,0,1) - else - local cg=Duel.GetFieldGroup(tp,LOCATION_DECK,0) - Duel.ConfirmCards(1-tp,cg) - Duel.ConfirmCards(tp,cg) - Duel.ShuffleDeck(tp) - end -end -function c51858306.thcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsFaceup() and e:GetHandler():GetFlagEffect(51858306)~=0 -end -function c51858306.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - local tc=e:GetLabelObject():GetLabelObject() - if chk==0 then return tc and tc:GetFlagEffect(51858306)~=0 and tc:IsAbleToHand() end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,tc,1,0,0) -end -function c51858306.thop(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetLabelObject():GetLabelObject() - if tc:GetFlagEffect(51858306)~=0 and Duel.SendtoHand(tc,nil,REASON_EFFECT)~=0 then - Duel.ConfirmCards(1-tp,tc) - end -end diff --git a/script/c51865604.lua b/script/c51865604.lua deleted file mode 100644 index a1f71494a5..0000000000 --- a/script/c51865604.lua +++ /dev/null @@ -1,75 +0,0 @@ ---ZS-幻影賢者 -function c51865604.initial_effect(c) - --draw - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(51865604,0)) - e1:SetCategory(CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1,51865604) - e1:SetCondition(c51865604.condition) - e1:SetTarget(c51865604.target) - e1:SetOperation(c51865604.operation) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(51865604,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetRange(LOCATION_MZONE) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_REMOVE) - e2:SetCountLimit(1,51865604) - e2:SetCondition(c51865604.spcon) - e2:SetCost(c51865604.spcost) - e2:SetTarget(c51865604.sptg) - e2:SetOperation(c51865604.spop) - c:RegisterEffect(e2) -end -function c51865604.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x7f) -end -function c51865604.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c51865604.cfilter,tp,LOCATION_MZONE,0,1,nil) -end -function c51865604.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(1) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c51865604.operation(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end -function c51865604.spfilter(c,e,tp) - return c:IsFaceup() and c:IsPreviousLocation(LOCATION_MZONE) and c:GetPreviousControler()==tp - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsCanBeEffectTarget(e) -end -function c51865604.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()==PHASE_BATTLE and eg:IsExists(c51865604.spfilter,1,nil,e,tp) -end -function c51865604.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) -end -function c51865604.rmfilter(c) - return c:IsAttackBelow(3000) and c:IsAbleToRemove() -end -function c51865604.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return eg:IsContains(chkc) and c51865604.spfilter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c51865604.rmfilter,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=eg:FilterSelect(tp,c51865604.spfilter,1,1,nil,e,tp) - Duel.SetTargetCard(g) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c51865604.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)~=0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c51865604.rmfilter,tp,0,LOCATION_MZONE,1,1,nil) - Duel.Remove(g,POS_FACEUP,REASON_EFFECT) - end -end diff --git a/script/c5186893.lua b/script/c5186893.lua deleted file mode 100644 index fcc4f7e55d..0000000000 --- a/script/c5186893.lua +++ /dev/null @@ -1,60 +0,0 @@ ---真紅眼の不死竜 -function c5186893.initial_effect(c) - --summon with 1 tribute - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(5186893,0)) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SUMMON_PROC) - e1:SetCondition(c5186893.otcon) - e1:SetOperation(c5186893.otop) - e1:SetValue(SUMMON_TYPE_ADVANCE) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(5186893,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetCode(EVENT_BATTLE_DESTROYING) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCondition(c5186893.spcon) - e2:SetTarget(c5186893.sptg) - e2:SetOperation(c5186893.spop) - c:RegisterEffect(e2) -end -function c5186893.otfilter(c,tp) - return c:IsRace(RACE_ZOMBIE) and (c:IsControler(tp) or c:IsFaceup()) -end -function c5186893.otcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - local mg=Duel.GetMatchingGroup(c5186893.otfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp) - return c:GetLevel()>6 and Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.GetTributeCount(c,mg)>0 -end -function c5186893.otop(e,tp,eg,ep,ev,re,r,rp,c) - local mg=Duel.GetMatchingGroup(c5186893.otfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp) - local sg=Duel.SelectTribute(tp,c,1,1,mg) - c:SetMaterial(sg) - Duel.Release(sg, REASON_SUMMON+REASON_MATERIAL) -end -function c5186893.spcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetAttacker() - if c==tc then tc=Duel.GetAttackTarget() end - e:SetLabelObject(tc) - if not c:IsRelateToBattle() or c:IsFacedown() then return false end - return tc:GetLocation()==LOCATION_GRAVE and tc:IsRace(RACE_ZOMBIE) -end -function c5186893.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - local tc=e:GetLabelObject() - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and tc:IsCanBeSpecialSummoned(e,0,tp,false,false) end - tc:CreateEffectRelation(e) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,tc,1,0,LOCATION_GRAVE) -end -function c5186893.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetLabelObject() - if tc:IsRelateToEffect(e) and tc:IsRace(RACE_ZOMBIE) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c51912531.lua b/script/c51912531.lua deleted file mode 100644 index a6ec0fee6e..0000000000 --- a/script/c51912531.lua +++ /dev/null @@ -1,45 +0,0 @@ ---幻妖種ミトラ -function c51912531.initial_effect(c) - --synchro limit - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetValue(c51912531.synlimit) - c:RegisterEffect(e1) - --level down - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(51912531,0)) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCountLimit(2,51912531) - e2:SetTarget(c51912531.target) - e2:SetOperation(c51912531.operation) - c:RegisterEffect(e2) -end -function c51912531.synlimit(e,c) - if not c then return false end - return not c:IsAttribute(ATTRIBUTE_EARTH) -end -function c51912531.filter(c) - return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_EARTH) and c:GetLevel()>1 -end -function c51912531.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c51912531.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c51912531.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c51912531.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) -end -function c51912531.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_LEVEL) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetValue(-1) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - end -end diff --git a/script/c51916032.lua b/script/c51916032.lua deleted file mode 100644 index 64689aef48..0000000000 --- a/script/c51916032.lua +++ /dev/null @@ -1,61 +0,0 @@ ---人造人間-サイコ・ジャッカー -function c51916032.initial_effect(c) - --change - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetCode(EFFECT_CHANGE_CODE) - e1:SetRange(LOCATION_MZONE+LOCATION_GRAVE) - e1:SetValue(77585513) - c:RegisterEffect(e1) - --tohand - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(51916032,0)) - e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,51916032) - e2:SetCost(c51916032.cost) - e2:SetTarget(c51916032.target) - e2:SetOperation(c51916032.operation) - c:RegisterEffect(e2) -end -function c51916032.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end -function c51916032.filter(c) - return c:IsSetCard(0xbc) and not c:IsCode(51916032) and c:IsAbleToHand() -end -function c51916032.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c51916032.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c51916032.cffilter(c) - return c:IsFacedown() and c:GetSequence()<5 -end -function c51916032.spfilter(c,e,tp) - return c:IsSetCard(0xbc) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c51916032.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c51916032.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()==0 or Duel.SendtoHand(g,nil,REASON_EFFECT)==0 then return end - Duel.ConfirmCards(1-tp,g) - Duel.ShuffleHand(tp) - local cg=Duel.GetMatchingGroup(c51916032.cffilter,tp,0,LOCATION_SZONE,nil) - if cg:GetCount()>0 then - Duel.BreakEffect() - Duel.ConfirmCards(tp,cg) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ft<=0 then return end - local ct=cg:FilterCount(Card.IsType,nil,TYPE_TRAP) - if ct>ft then ct=ft end - local sg=Duel.GetMatchingGroup(c51916032.spfilter,tp,LOCATION_HAND,0,nil,e,tp) - if ct>0 and sg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(51916032,1)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local tg=sg:Select(tp,1,ct,nil) - Duel.SpecialSummon(tg,0,tp,tp,false,false,POS_FACEUP) - end - end -end diff --git a/script/c51925772.lua b/script/c51925772.lua deleted file mode 100644 index 98ea25981f..0000000000 --- a/script/c51925772.lua +++ /dev/null @@ -1,31 +0,0 @@ ---ドレッド・ドラゴン -function c51925772.initial_effect(c) - --search - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(51925772,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetCondition(c51925772.condition) - e1:SetTarget(c51925772.target) - e1:SetOperation(c51925772.operation) - c:RegisterEffect(e1) -end -function c51925772.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) -end -function c51925772.filter(c) - return c:IsLevelBelow(3) and c:IsRace(RACE_DRAGON) and c:IsAbleToHand() -end -function c51925772.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c51925772.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c51925772.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c51925772.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c51945556.lua b/script/c51945556.lua deleted file mode 100644 index 0dbf32a3a1..0000000000 --- a/script/c51945556.lua +++ /dev/null @@ -1,30 +0,0 @@ ---雷帝ザボルグ -function c51945556.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(51945556,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetCondition(c51945556.condition) - e1:SetTarget(c51945556.target) - e1:SetOperation(c51945556.operation) - c:RegisterEffect(e1) -end -function c51945556.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_ADVANCE -end -function c51945556.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,nil,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c51945556.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c51960178.lua b/script/c51960178.lua deleted file mode 100644 index b78ea165b4..0000000000 --- a/script/c51960178.lua +++ /dev/null @@ -1,32 +0,0 @@ ---フェアリー・チア・ガール -function c51960178.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsRace,RACE_FAIRY),4,2) - c:EnableReviveLimit() - --draw - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DRAW) - e1:SetDescription(aux.Stringid(51960178,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1,51960178) - e1:SetCost(c51960178.cost) - e1:SetTarget(c51960178.target) - e1:SetOperation(c51960178.operation) - c:RegisterEffect(e1) -end -function c51960178.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c51960178.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(1) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c51960178.operation(e,tp,eg,ep,ev,re,r,rp,chk) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end diff --git a/script/c51962254.lua b/script/c51962254.lua deleted file mode 100644 index dbc33e0c08..0000000000 --- a/script/c51962254.lua +++ /dev/null @@ -1,32 +0,0 @@ ---ハンター・アウル -function c51962254.initial_effect(c) - --cannot be attacked - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_BE_BATTLE_TARGET) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c51962254.atcon) - e1:SetValue(aux.imval1) - c:RegisterEffect(e1) - --atkup - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetRange(LOCATION_MZONE) - e2:SetValue(c51962254.upval) - c:RegisterEffect(e2) -end -function c51962254.cfilter(c) - return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_WIND) -end -function c51962254.atcon(e) - return Duel.IsExistingMatchingCard(c51962254.cfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,e:GetHandler()) -end -function c51962254.upval(e,c) - return Duel.GetMatchingGroupCount(c51962254.upfilter,c:GetControler(),LOCATION_MZONE,0,nil)*500 -end -function c51962254.upfilter(c) - return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_WIND) -end diff --git a/script/c51976476.lua b/script/c51976476.lua deleted file mode 100644 index 07cc6a67af..0000000000 --- a/script/c51976476.lua +++ /dev/null @@ -1,28 +0,0 @@ ---姑息な落とし穴 -function c51976476.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_REMOVE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetTarget(c51976476.target) - e1:SetOperation(c51976476.activate) - c:RegisterEffect(e1) -end -function c51976476.filter(c,e,tp) - return c:GetSummonPlayer()==tp and c:IsDefencePos() and c:IsAbleToRemove() - and (not e or (c:IsRelateToEffect(e) and c:IsLocation(LOCATION_MZONE))) -end -function c51976476.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return eg:IsExists(c51976476.filter,1,nil,nil,1-tp) end - local g=eg:Filter(c51976476.filter,nil,nil,1-tp) - Duel.SetTargetCard(g) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,0) -end -function c51976476.activate(e,tp,eg,ep,ev,re,r,rp) - local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local g=tg:Filter(c51976476.filter,nil,e,1-tp) - if g:GetCount()>0 then - Duel.Remove(g,POS_FACEUP,REASON_EFFECT) - end -end diff --git a/script/c51987571.lua b/script/c51987571.lua deleted file mode 100644 index 31e1d5956c..0000000000 --- a/script/c51987571.lua +++ /dev/null @@ -1,43 +0,0 @@ ---ロックストーン・ウォリアー -function c51987571.initial_effect(c) - --token - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(51987571,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetCondition(c51987571.condition) - e1:SetTarget(c51987571.target) - e1:SetOperation(c51987571.operation) - c:RegisterEffect(e1) - -- - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_AVOID_BATTLE_DAMAGE) - e2:SetValue(1) - c:RegisterEffect(e2) -end -function c51987571.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler()==Duel.GetAttacker() and e:GetHandler():IsLocation(LOCATION_GRAVE) - and e:GetHandler():IsReason(REASON_BATTLE) -end -function c51987571.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,2,0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,0,0) -end -function c51987571.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 then return end - if not Duel.IsPlayerCanSpecialSummonMonster(tp,51987572,0,0x4011,0,0,1,RACE_ROCK,ATTRIBUTE_EARTH) then return end - for i=1,2 do - local token=Duel.CreateToken(tp,51987572) - Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UNRELEASABLE_SUM) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(1) - token:RegisterEffect(e1,true) - end - Duel.SpecialSummonComplete() -end diff --git a/script/c52031567.lua b/script/c52031567.lua deleted file mode 100644 index 6e1c1365e8..0000000000 --- a/script/c52031567.lua +++ /dev/null @@ -1,13 +0,0 @@ ---E・HERO マッドボールマン -function c52031567.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcCode2(c,79979666,84327329,true,true) - --spsummon condition - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(aux.fuslimit) - c:RegisterEffect(e1) -end diff --git a/script/c52035300.lua b/script/c52035300.lua deleted file mode 100644 index d20214d8a6..0000000000 --- a/script/c52035300.lua +++ /dev/null @@ -1,51 +0,0 @@ ---不死武士 -function c52035300.initial_effect(c) - --release limit - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UNRELEASABLE_SUM) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetValue(c52035300.recon) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_UNRELEASABLE_NONSUM) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetValue(1) - c:RegisterEffect(e2) - --Special Summon - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(52035300,0)) - e3:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_FIELD) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetCode(EVENT_PHASE+PHASE_STANDBY) - e3:SetRange(LOCATION_GRAVE) - e3:SetCountLimit(1) - e3:SetCondition(c52035300.condition) - e3:SetTarget(c52035300.target) - e3:SetOperation(c52035300.operation) - c:RegisterEffect(e3) -end -function c52035300.recon(e,c) - return not c:IsRace(RACE_WARRIOR) -end -function c52035300.filter(c) - return c:IsType(TYPE_MONSTER) and not c:IsRace(RACE_WARRIOR) -end -function c52035300.condition(e,tp,eg,ep,ev,re,r,rp) - return tp==Duel.GetTurnPlayer() and Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 - and not Duel.IsExistingMatchingCard(c52035300.filter,tp,LOCATION_GRAVE,0,1,nil) -end -function c52035300.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c52035300.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 or Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)>0 then return end - if e:GetHandler():IsRelateToEffect(e) then - Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c52038272.lua b/script/c52038272.lua deleted file mode 100644 index 81b9bc3f0a..0000000000 --- a/script/c52038272.lua +++ /dev/null @@ -1,130 +0,0 @@ ---インフェルノイド・ルキフグス -function c52038272.initial_effect(c) - c:EnableReviveLimit() - --special summon condition - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_SPSUMMON_PROC) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e2:SetRange(LOCATION_HAND) - e2:SetCondition(c52038272.spcon) - e2:SetOperation(c52038272.spop) - c:RegisterEffect(e2) - --destroy - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(52038272,0)) - e3:SetCategory(CATEGORY_DESTROY) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_MZONE) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetCountLimit(1) - e3:SetCost(c52038272.descost) - e3:SetTarget(c52038272.destg) - e3:SetOperation(c52038272.desop) - c:RegisterEffect(e3) - --remove - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(52038272,1)) - e4:SetCategory(CATEGORY_REMOVE) - e4:SetType(EFFECT_TYPE_QUICK_O) - e4:SetCode(EVENT_FREE_CHAIN) - e4:SetRange(LOCATION_MZONE) - e4:SetProperty(EFFECT_FLAG_CARD_TARGET) - e4:SetCountLimit(1) - e4:SetCondition(c52038272.rmcon) - e4:SetCost(c52038272.rmcost) - e4:SetTarget(c52038272.rmtg) - e4:SetOperation(c52038272.rmop) - c:RegisterEffect(e4) -end -function c52038272.spfilter(c) - return c:IsSetCard(0xbb) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost() -end -function c52038272.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - local sum=0 - for i=0,4 do - local tc=Duel.GetFieldCard(tp,LOCATION_MZONE,i) - if tc and tc:IsFaceup() and tc:IsType(TYPE_EFFECT) then - if tc:IsType(TYPE_XYZ) then sum=sum+tc:GetRank() - else sum=sum+tc:GetLevel() end - end - end - if sum>8 then return false end - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ft<0 then return false end - if c:IsHasEffect(34822850) then - if ft>0 then - return Duel.IsExistingMatchingCard(c52038272.spfilter,tp,LOCATION_MZONE+LOCATION_GRAVE+LOCATION_HAND,0,1,c) - else - return Duel.IsExistingMatchingCard(c52038272.spfilter,tp,LOCATION_MZONE,0,1,nil) - end - else - return ft>0 and Duel.IsExistingMatchingCard(c52038272.spfilter,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,c) - end -end -function c52038272.spop(e,tp,eg,ep,ev,re,r,rp,c) - local g=nil - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - if c:IsHasEffect(34822850) then - if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then - g=Duel.SelectMatchingCard(tp,c52038272.spfilter,tp,LOCATION_MZONE+LOCATION_GRAVE+LOCATION_HAND,0,1,1,c) - else - g=Duel.SelectMatchingCard(tp,c52038272.spfilter,tp,LOCATION_MZONE,0,1,1,nil) - end - else - g=Duel.SelectMatchingCard(tp,c52038272.spfilter,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,1,c) - end - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c52038272.descost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:GetAttackAnnouncedCount()==0 end - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_OATH) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - c:RegisterEffect(e1) -end -function c52038272.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsDestructable() end - if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c52038272.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end -function c52038272.rmcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp -end -function c52038272.rmcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsReleasable,1,nil) end - local g=Duel.SelectReleaseGroup(tp,Card.IsReleasable,1,1,nil) - Duel.Release(g,REASON_COST) -end -function c52038272.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(1-tp) and chkc:IsAbleToRemove() end - if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) -end -function c52038272.rmop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) - end -end diff --git a/script/c52040216.lua b/script/c52040216.lua deleted file mode 100644 index 5bcd9281df..0000000000 --- a/script/c52040216.lua +++ /dev/null @@ -1,20 +0,0 @@ ---ハーピィズペット竜 -function c52040216.initial_effect(c) - --atkup - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetRange(LOCATION_MZONE) - e1:SetValue(c52040216.val) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_UPDATE_DEFENCE) - c:RegisterEffect(e2) -end -function c52040216.val(e,c) - return Duel.GetMatchingGroupCount(c52040216.filter,c:GetControler(),LOCATION_ONFIELD,LOCATION_ONFIELD,nil)*300 -end -function c52040216.filter(c) - return c:IsFaceup() and c:IsCode(76812113) -end diff --git a/script/c52068432.lua b/script/c52068432.lua deleted file mode 100644 index 04255976b4..0000000000 --- a/script/c52068432.lua +++ /dev/null @@ -1,84 +0,0 @@ ---トリシューラの影霊衣 -function c52068432.initial_effect(c) - c:EnableReviveLimit() - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(aux.ritlimit) - c:RegisterEffect(e1) - --negate - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(52068432,0)) - e2:SetCategory(CATEGORY_NEGATE) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) - e2:SetCode(EVENT_CHAINING) - e2:SetRange(LOCATION_HAND) - e2:SetCountLimit(1,52068432) - e2:SetCondition(c52068432.negcon) - e2:SetCost(c52068432.negcost) - e2:SetTarget(c52068432.negtg) - e2:SetOperation(c52068432.negop) - c:RegisterEffect(e2) - --remove - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(52068432,1)) - e3:SetCategory(CATEGORY_REMOVE) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - e3:SetCountLimit(1,52068433) - e3:SetCondition(c52068432.remcon) - e3:SetTarget(c52068432.remtg) - e3:SetOperation(c52068432.remop) - c:RegisterEffect(e3) -end -function c52068432.mat_filter(c) - return c:GetLevel()~=9 -end -function c52068432.tfilter(c,tp) - return c:IsFaceup() and c:IsSetCard(0xb4) and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) -end -function c52068432.negcon(e,tp,eg,ep,ev,re,r,rp) - if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end - local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) - return g and g:IsExists(c52068432.tfilter,1,nil,tp) and Duel.IsChainNegatable(ev) -end -function c52068432.negcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsDiscardable() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD) -end -function c52068432.negtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) -end -function c52068432.negop(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateActivation(ev) -end -function c52068432.remcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_RITUAL -end -function c52068432.remtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_HAND,1,nil) - and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,nil) - and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,0,LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_HAND) -end -function c52068432.remop(e,tp,eg,ep,ev,re,r,rp) - local g1=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_HAND,nil) - local g2=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,nil) - local g3=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,nil) - if g1:GetCount()>0 and g2:GetCount()>0 and g3:GetCount()>0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local sg1=g1:RandomSelect(tp,1) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local sg2=g2:Select(tp,1,1,nil) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local sg3=g3:Select(tp,1,1,nil) - sg1:Merge(sg2) - sg1:Merge(sg3) - Duel.HintSelection(sg1) - Duel.Remove(sg1,POS_FACEUP,REASON_EFFECT) - end -end diff --git a/script/c52077741.lua b/script/c52077741.lua deleted file mode 100644 index 2c4838f6ac..0000000000 --- a/script/c52077741.lua +++ /dev/null @@ -1,12 +0,0 @@ ---翻弄するエルフの剣士 -function c52077741.initial_effect(c) - --indes - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e1:SetValue(c52077741.indes) - c:RegisterEffect(e1) -end -function c52077741.indes(e,c) - return c:GetAttack()>=1900 -end diff --git a/script/c52085072.lua b/script/c52085072.lua deleted file mode 100644 index f59ffd0a27..0000000000 --- a/script/c52085072.lua +++ /dev/null @@ -1,89 +0,0 @@ ---絶望神アンチホープ -function c52085072.initial_effect(c) - c:EnableReviveLimit() - --special summon condition - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_SPSUMMON_PROC) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e2:SetRange(LOCATION_HAND+LOCATION_GRAVE) - e2:SetCondition(c52085072.spcon) - e2:SetOperation(c52085072.spop) - c:RegisterEffect(e2) - --cannot attack - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetRange(LOCATION_MZONE) - e3:SetCode(EFFECT_CANNOT_ATTACK) - e3:SetTargetRange(LOCATION_MZONE,0) - e3:SetTarget(c52085072.antarget) - c:RegisterEffect(e3) - -- - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(52085072,0)) - e4:SetType(EFFECT_TYPE_QUICK_O) - e4:SetCode(EVENT_FREE_CHAIN) - e4:SetRange(LOCATION_MZONE) - e4:SetHintTiming(TIMING_BATTLE_PHASE) - e4:SetCondition(c52085072.btcon) - e4:SetCost(c52085072.btcost) - e4:SetOperation(c52085072.btop) - c:RegisterEffect(e4) -end -function c52085072.spcfilter(c) - return c:IsFaceup() and c:GetLevel()==1 and c:IsAbleToGraveAsCost() -end -function c52085072.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.IsExistingMatchingCard(c52085072.spcfilter,tp,LOCATION_MZONE,0,4,nil) - and Duel.GetLocationCount(tp,LOCATION_MZONE)>-4 -end -function c52085072.spop(e,tp,eg,ep,ev,re,r,rp,c) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c52085072.spcfilter,tp,LOCATION_MZONE,0,4,4,nil) - Duel.SendtoGrave(g,REASON_COST) -end -function c52085072.antarget(e,c) - return c~=e:GetHandler() -end -function c52085072.btcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()==PHASE_BATTLE and not e:GetHandler():IsStatus(STATUS_CHAINING) - and (Duel.GetAttacker()==e:GetHandler() or Duel.GetAttackTarget()==e:GetHandler()) -end -function c52085072.btcfilter(c) - return c:IsType(TYPE_MONSTER) and c:GetLevel()==1 and c:IsAbleToRemoveAsCost() -end -function c52085072.btcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c52085072.btcfilter,tp,LOCATION_GRAVE,0,1,nil) - and e:GetHandler():GetFlagEffect(52085072)==0 end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c52085072.btcfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) - e:GetHandler():RegisterFlagEffect(52085072,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_DAMAGE,0,1) -end -function c52085072.btop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_IMMUNE_EFFECT) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetValue(c52085072.efilter) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_DAMAGE) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e2:SetValue(1) - c:RegisterEffect(e2) - end -end -function c52085072.efilter(e,re) - return e:GetHandler()~=re:GetOwner() -end diff --git a/script/c52090844.lua b/script/c52090844.lua deleted file mode 100644 index 9c9adada98..0000000000 --- a/script/c52090844.lua +++ /dev/null @@ -1,29 +0,0 @@ ---ボーガニアン -function c52090844.initial_effect(c) - --damage - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(52090844,0)) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCondition(c52090844.condition) - e1:SetTarget(c52090844.target) - e1:SetOperation(c52090844.operation) - c:RegisterEffect(e1) -end -function c52090844.condition(e,tp,eg,ep,ev,re,r,rp) - return tp==Duel.GetTurnPlayer() -end -function c52090844.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(600) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,600) -end -function c52090844.operation(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c52097679.lua b/script/c52097679.lua deleted file mode 100644 index 1075105a04..0000000000 --- a/script/c52097679.lua +++ /dev/null @@ -1,36 +0,0 @@ ---右手に盾を左手に剣を -function c52097679.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c52097679.target) - e1:SetOperation(c52097679.activate) - c:RegisterEffect(e1) -end -function c52097679.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end -end -function c52097679.activate(e,tp,eg,ep,ev,re,r,rp) - local sg=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - local c=e:GetHandler() - local tc=sg:GetFirst() - while tc do - local atk=tc:GetBaseAttack() - local def=tc:GetBaseDefence() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_BASE_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e1:SetValue(def) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_SET_BASE_DEFENCE) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e2:SetValue(atk) - tc:RegisterEffect(e2) - tc=sg:GetNext() - end -end diff --git a/script/c52098461.lua b/script/c52098461.lua deleted file mode 100644 index 84ba4977e7..0000000000 --- a/script/c52098461.lua +++ /dev/null @@ -1,35 +0,0 @@ ---ラス・オブ・ネオス -function c52098461.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TODECK+CATEGORY_DESTROY) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c52098461.target) - e1:SetOperation(c52098461.activate) - c:RegisterEffect(e1) -end -function c52098461.filter(c) - return c:IsFaceup() and c:IsCode(89943723) and c:IsAbleToDeck() -end -function c52098461.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c52098461.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c52098461.filter,tp,LOCATION_MZONE,0,1,nil) - and Duel.IsExistingMatchingCard(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,2,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectTarget(tp,c52098461.filter,tp,LOCATION_MZONE,0,1,1,nil) - local dg=Duel.GetMatchingGroup(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler()) - dg:RemoveCard(g:GetFirst()) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,dg,dg:GetCount(),0,0) -end -function c52098461.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and c52098461.filter(tc) - and Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_DECK) then - Duel.BreakEffect() - local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler()) - Duel.Destroy(g,REASON_EFFECT) - end -end diff --git a/script/c52101615.lua b/script/c52101615.lua deleted file mode 100644 index b7115bc5f8..0000000000 --- a/script/c52101615.lua +++ /dev/null @@ -1,58 +0,0 @@ ---融合呪印生物-闇 -function c52101615.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetDescription(aux.Stringid(52101615,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetLabel(0) - e1:SetCost(c52101615.cost) - e1:SetTarget(c52101615.target) - e1:SetOperation(c52101615.operation) - c:RegisterEffect(e1) - --fusion substitute - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_FUSION_SUBSTITUTE) - e2:SetCondition(c52101615.subcon) - c:RegisterEffect(e2) -end -function c52101615.subcon(e) - return e:GetHandler():IsLocation(0x1e) -end -function c52101615.filter(c,e,tp,m,gc) - return c:IsType(TYPE_FUSION) and c:IsAttribute(ATTRIBUTE_DARK) - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:CheckFusionMaterial(m,gc) -end -function c52101615.cost(e,tp,eg,ep,ev,re,r,rp,chk) - e:SetLabel(1) - return true -end -function c52101615.target(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then - if e:GetLabel()~=1 then return false end - e:SetLabel(0) - local mg=Duel.GetMatchingGroup(Card.IsCanBeFusionMaterial,tp,LOCATION_MZONE,0,nil) - return Duel.IsExistingMatchingCard(c52101615.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg,c) - end - local mg=Duel.GetMatchingGroup(Card.IsCanBeFusionMaterial,tp,LOCATION_MZONE,0,nil) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c52101615.filter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,mg,c) - local mat=Duel.SelectFusionMaterial(tp,g:GetFirst(),mg,c) - Duel.Release(mat,REASON_COST) - e:SetLabel(g:GetFirst():GetCode()) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function c52101615.filter2(c,e,tp,code) - return c:IsCode(code) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c52101615.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local code=e:GetLabel() - local tc=Duel.GetFirstMatchingCard(c52101615.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,code) - if tc then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c52105192.lua b/script/c52105192.lua deleted file mode 100644 index 336522ef69..0000000000 --- a/script/c52105192.lua +++ /dev/null @@ -1,42 +0,0 @@ ---アームズ・ホール -function c52105192.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c52105192.cost) - e1:SetTarget(c52105192.target) - e1:SetOperation(c52105192.activate) - c:RegisterEffect(e1) -end -function c52105192.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_NORMALSUMMON)==0 and Duel.IsPlayerCanDiscardDeckAsCost(tp,1) end - Duel.DiscardDeck(tp,1,REASON_COST) - --oath effects - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) - e1:SetCode(EFFECT_CANNOT_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) - e1:SetTargetRange(1,0) - Duel.RegisterEffect(e1,tp) - local e2=e1:Clone() - e2:SetCode(EFFECT_CANNOT_MSET) - Duel.RegisterEffect(e2,tp) -end -function c52105192.filter(c) - return c:IsType(TYPE_EQUIP) and c:IsAbleToHand() and not c:IsHasEffect(EFFECT_NECRO_VALLEY) -end -function c52105192.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c52105192.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,0,1,0,LOCATION_DECK+LOCATION_GRAVE) -end -function c52105192.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c52105192.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c52112003.lua b/script/c52112003.lua deleted file mode 100644 index f039315b07..0000000000 --- a/script/c52112003.lua +++ /dev/null @@ -1,26 +0,0 @@ ---カード・アドバンス -function c52112003.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c52112003.target) - e1:SetOperation(c52112003.activate) - c:RegisterEffect(e1) -end -function c52112003.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0 end -end -function c52112003.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.SortDecktop(tp,tp,5) - if Duel.GetFlagEffect(tp,52112003)~=0 then return end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetTargetRange(LOCATION_HAND,0) - e1:SetCode(EFFECT_EXTRA_SUMMON_COUNT) - e1:SetTarget(aux.TargetBoolFunction(Card.IsLevelAbove,5)) - e1:SetValue(0x1) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) - Duel.RegisterFlagEffect(tp,52112003,RESET_PHASE+PHASE_END,0,1) -end diff --git a/script/c52128900.lua b/script/c52128900.lua deleted file mode 100644 index 6112b225b1..0000000000 --- a/script/c52128900.lua +++ /dev/null @@ -1,48 +0,0 @@ ---シンクロ・ギフト -function c52128900.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c52128900.target) - e1:SetOperation(c52128900.activate) - c:RegisterEffect(e1) -end -function c52128900.filter1(c) - return c:IsFaceup() and c:IsType(TYPE_SYNCHRO) -end -function c52128900.filter2(c) - return c:IsFaceup() and not c:IsType(TYPE_SYNCHRO) -end -function c52128900.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - if chk==0 then return Duel.IsExistingTarget(c52128900.filter1,tp,LOCATION_MZONE,0,1,nil) - and Duel.IsExistingTarget(c52128900.filter2,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(52128900,0)) - local g1=Duel.SelectTarget(tp,c52128900.filter1,tp,LOCATION_MZONE,0,1,1,nil) - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(52128900,1)) - local g2=Duel.SelectTarget(tp,c52128900.filter2,tp,LOCATION_MZONE,0,1,1,nil) - e:SetLabelObject(g1:GetFirst()) -end -function c52128900.activate(e,tp,eg,ep,ev,re,r,rp) - local tc1=e:GetLabelObject() - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local tc2=g:GetFirst() - if tc1==tc2 then tc2=g:GetNext() end - if tc1:IsRelateToEffect(e) and tc1:IsFaceup() and tc2:IsRelateToEffect(e) and tc2:IsFaceup() then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - e1:SetValue(tc1:GetBaseAttack()) - tc2:RegisterEffect(e1) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_SET_ATTACK_FINAL) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - e2:SetValue(0) - tc1:RegisterEffect(e2) - end -end diff --git a/script/c52140003.lua b/script/c52140003.lua deleted file mode 100644 index bd30da863e..0000000000 --- a/script/c52140003.lua +++ /dev/null @@ -1,71 +0,0 @@ ---爆弾ウニ-ボム・アーチン- -function c52140003.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_CHAINING) - e1:SetCondition(c52140003.condition) - e1:SetTarget(c52140003.target) - c:RegisterEffect(e1) - --damage - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(52140003,0)) - e2:SetCategory(CATEGORY_DAMAGE) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetRange(LOCATION_SZONE) - e2:SetCountLimit(1) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) - e2:SetCondition(c52140003.damcon) - e2:SetTarget(c52140003.damtg) - e2:SetOperation(c52140003.damop) - c:RegisterEffect(e2) -end -function c52140003.condition(e,tp,eg,ep,ev,re,r,rp) - return re:IsActiveType(TYPE_TRAP) and re:IsHasType(EFFECT_TYPE_ACTIVATE) and rp~=tp -end -function c52140003.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local c=e:GetHandler() - --to grave - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_IGNORE_IMMUNE) - e1:SetRange(LOCATION_SZONE) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetCountLimit(1) - e1:SetCondition(c52140003.tgcon) - e1:SetOperation(c52140003.tgop) - e1:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e1) - c:SetTurnCounter(0) -end -function c52140003.cfilter(c) - return c:IsFaceup() and c:IsType(TYPE_TRAP) -end -function c52140003.damcon(e,tp,eg,ep,ev,re,r,rp) - return tp==Duel.GetTurnPlayer() and Duel.IsExistingMatchingCard(c52140003.cfilter,tp,0,LOCATION_ONFIELD,1,nil) -end -function c52140003.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(1000) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,1000) -end -function c52140003.damop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - if not Duel.IsExistingMatchingCard(c52140003.cfilter,tp,0,LOCATION_ONFIELD,1,nil) then return end - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end -function c52140003.tgcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c52140003.tgop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local ct=c:GetTurnCounter() - c:SetTurnCounter(ct+1) - if ct+1>=3 then - Duel.SendtoGrave(e:GetHandler(),REASON_EFFECT) - end -end diff --git a/script/c52145422.lua b/script/c52145422.lua deleted file mode 100644 index 2ed7dc6c18..0000000000 --- a/script/c52145422.lua +++ /dev/null @@ -1,86 +0,0 @@ ---グレイドル・ドラゴン -function c52145422.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsRace,RACE_AQUA),aux.NonTuner(nil),1) - c:EnableReviveLimit() - --destroy - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCountLimit(1,52145422) - e1:SetCondition(c52145422.descon) - e1:SetTarget(c52145422.destg) - e1:SetOperation(c52145422.desop) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_MATERIAL_CHECK) - e2:SetValue(c52145422.valcheck) - e2:SetLabelObject(e1) - c:RegisterEffect(e2) - --spsummon - local e3=Effect.CreateEffect(c) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e3:SetCode(EVENT_TO_GRAVE) - e3:SetCountLimit(1,52145423) - e3:SetCondition(c52145422.spcon) - e3:SetTarget(c52145422.sptg) - e3:SetOperation(c52145422.spop) - c:RegisterEffect(e3) -end -function c52145422.valcheck(e,c) - local ct=e:GetHandler():GetMaterial():FilterCount(Card.IsAttribute,nil,ATTRIBUTE_WATER) - e:GetLabelObject():SetLabel(ct) -end -function c52145422.descon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_SYNCHRO -end -function c52145422.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and chkc:IsDestructable() end - local ct=e:GetLabel() - if chk==0 then return ct>0 and Duel.IsExistingTarget(Card.IsDestructable,tp,0,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,0,LOCATION_ONFIELD,1,ct,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c52145422.desop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) - if g:GetCount()>0 then - Duel.Destroy(g,REASON_EFFECT) - end -end -function c52145422.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsReason(REASON_DESTROY) and e:GetHandler():IsReason(REASON_BATTLE+REASON_EFFECT) -end -function c52145422.filter(c,e,tp) - return c:IsAttribute(ATTRIBUTE_WATER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c52145422.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c52145422.filter(chkc,e,tp) and chkc~=e:GetHandler() end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c52145422.filter,tp,LOCATION_GRAVE,0,1,e:GetHandler(),e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c52145422.filter,tp,LOCATION_GRAVE,0,1,1,e:GetHandler(),e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c52145422.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e2) - Duel.SpecialSummonComplete() - end -end diff --git a/script/c52158283.lua b/script/c52158283.lua deleted file mode 100644 index 165f60e87e..0000000000 --- a/script/c52158283.lua +++ /dev/null @@ -1,45 +0,0 @@ ---先史遺産コロッサル・ヘッド -function c52158283.initial_effect(c) - --adchange - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(52158283,0)) - e1:SetCategory(CATEGORY_POSITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_GRAVE) - e1:SetCountLimit(1,52158283) - e1:SetCost(c52158283.cost) - e1:SetTarget(c52158283.target) - e1:SetOperation(c52158283.operation) - c:RegisterEffect(e1) -end -function c52158283.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) -end -function c52158283.filter(c) - return c:IsAttackPos() and c:IsLevelAbove(3) -end -function c52158283.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c52158283.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c52158283.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE) - local g=Duel.SelectTarget(tp,c52158283.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0) -end -function c52158283.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - if tc:IsAttackPos() then - local pos=0 - if tc:IsCanTurnSet() then - pos=Duel.SelectPosition(tp,tc,POS_DEFENCE) - else - pos=Duel.SelectPosition(tp,tc,POS_FACEUP_DEFENCE) - end - Duel.ChangePosition(tc,pos) - else - Duel.ChangePosition(tc,0,0,POS_FACEDOWN_DEFENCE,POS_FACEUP_DEFENCE) - end - end -end diff --git a/script/c52182715.lua b/script/c52182715.lua deleted file mode 100644 index f688d8a1b8..0000000000 --- a/script/c52182715.lua +++ /dev/null @@ -1,59 +0,0 @@ ---グリーン・ダストン -function c52182715.initial_effect(c) - c:SetUniqueOnField(1,0,52182715) - --cannot release - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_UNRELEASABLE_SUM) - e1:SetValue(1) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_UNRELEASABLE_NONSUM) - c:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e3:SetCode(EFFECT_CANNOT_BE_FUSION_MATERIAL) - e3:SetValue(1) - c:RegisterEffect(e3) - local e4=e3:Clone() - e4:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL) - c:RegisterEffect(e4) - local e5=e3:Clone() - e5:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL) - c:RegisterEffect(e5) - --tohand - local e6=Effect.CreateEffect(c) - e6:SetDescription(aux.Stringid(52182715,0)) - e6:SetCategory(CATEGORY_TOHAND) - e6:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e6:SetProperty(EFFECT_FLAG_CARD_TARGET) - e6:SetCode(EVENT_DESTROYED) - e6:SetCondition(c52182715.retcon) - e6:SetTarget(c52182715.rettg) - e6:SetOperation(c52182715.retop) - c:RegisterEffect(e6) -end -function c52182715.retcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsReason(REASON_DESTROY) and c:IsPreviousLocation(LOCATION_ONFIELD) -end -function c52182715.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand() -end -function c52182715.rettg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local prec=e:GetHandler():GetPreviousControler() - if chkc then return chkc:IsControler(prec) and chkc:IsOnField() and c52182715.filter(chkc) end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g=Duel.SelectTarget(prec,c52182715.filter,prec,LOCATION_ONFIELD,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0) -end -function c52182715.retop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - end -end diff --git a/script/c52198054.lua b/script/c52198054.lua deleted file mode 100644 index 6ae08dbe09..0000000000 --- a/script/c52198054.lua +++ /dev/null @@ -1,106 +0,0 @@ ---ブレイズ・キャノン・マガジン -function c52198054.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c52198054.target1) - e1:SetOperation(c52198054.operation) - e1:SetHintTiming(0,TIMING_MAIN_END) - c:RegisterEffect(e1) - --tograve - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_TOGRAVE+CATEGORY_DRAW) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetRange(LOCATION_SZONE) - e2:SetCountLimit(1,52198054) - e2:SetCondition(c52198054.condition) - e2:SetCost(c52198054.cost) - e2:SetTarget(c52198054.target2) - e2:SetOperation(c52198054.operation) - e2:SetHintTiming(0,TIMING_MAIN_END) - e2:SetLabel(1) - c:RegisterEffect(e2) - --change - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e3:SetCode(EFFECT_CHANGE_CODE) - e3:SetRange(LOCATION_SZONE) - e3:SetValue(21420702) - c:RegisterEffect(e3) - --tograve - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(52198054,1)) - e4:SetCategory(CATEGORY_TOGRAVE) - e4:SetType(EFFECT_TYPE_QUICK_O) - e4:SetCode(EVENT_FREE_CHAIN) - e4:SetRange(LOCATION_GRAVE) - e4:SetCondition(c52198054.condition) - e4:SetCost(c52198054.tgcost) - e4:SetTarget(c52198054.tgtg) - e4:SetOperation(c52198054.tgop) - e4:SetHintTiming(0,TIMING_MAIN_END) - c:RegisterEffect(e4) -end -function c52198054.target1(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - if (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2) - and Duel.GetFlagEffect(tp,52198054)==0 - and Duel.IsPlayerCanDraw(tp,1) - and Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_HAND,0,1,nil,0x32) - and Duel.SelectYesNo(tp,aux.Stringid(52198054,0)) then - e:SetCategory(CATEGORY_TOGRAVE+CATEGORY_DRAW) - e:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - Duel.RegisterFlagEffect(tp,52198054,RESET_PHASE+PHASE_END,0,1) - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_HAND) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) - e:SetLabel(1) - e:GetHandler():RegisterFlagEffect(0,RESET_CHAIN,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(52198054,2)) - else - e:SetCategory(0) - e:SetProperty(0) - e:SetLabel(0) - end -end -function c52198054.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2 -end -function c52198054.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetFlagEffect(tp,52198054)==0 end - Duel.RegisterFlagEffect(tp,52198054,RESET_PHASE+PHASE_END,0,1) -end -function c52198054.target2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp,1) - and Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_HAND,0,1,nil,0x32) end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_HAND) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c52198054.operation(e,tp,eg,ep,ev,re,r,rp) - if e:GetLabel()==0 or not e:GetHandler():IsRelateToEffect(e) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,Card.IsSetCard,tp,LOCATION_HAND,0,1,1,nil,0x32) - if g:GetCount()>0 and Duel.SendtoGrave(g,REASON_EFFECT)~=0 and g:GetFirst():IsLocation(LOCATION_GRAVE) then - Duel.Draw(tp,1,REASON_EFFECT) - end -end -function c52198054.tgcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) -end -function c52198054.tgfilter(c) - return c:IsSetCard(0x32) and c:IsAbleToGrave() -end -function c52198054.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c52198054.tgfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) -end -function c52198054.tgop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c52198054.tgfilter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoGrave(g,REASON_EFFECT) - end -end diff --git a/script/c5220687.lua b/script/c5220687.lua deleted file mode 100644 index 424b38ee5e..0000000000 --- a/script/c5220687.lua +++ /dev/null @@ -1,30 +0,0 @@ ---素早いビッグハムスター -function c5220687.initial_effect(c) - --flip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(5220687,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DELAY) - e1:SetTarget(c5220687.target) - e1:SetOperation(c5220687.operation) - c:RegisterEffect(e1) -end -function c5220687.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c5220687.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c5220687.filter(c,e,tp) - return c:IsLevelBelow(3) and c:IsRace(RACE_BEAST) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN) -end -function c5220687.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local g=Duel.GetMatchingGroup(c5220687.filter,tp,LOCATION_DECK,0,nil,e,tp) - if g:GetCount()>0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=g:Select(tp,1,1,nil) - Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEDOWN_DEFENCE) - Duel.ConfirmCards(1-tp,sg) - end -end diff --git a/script/c52222372.lua b/script/c52222372.lua deleted file mode 100644 index c5ab29e5e9..0000000000 --- a/script/c52222372.lua +++ /dev/null @@ -1,12 +0,0 @@ ---タービン・ジェネクス -function c52222372.initial_effect(c) - --atk - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x2)) - e1:SetValue(400) - c:RegisterEffect(e1) -end diff --git a/script/c52228131.lua b/script/c52228131.lua deleted file mode 100644 index c9039de595..0000000000 --- a/script/c52228131.lua +++ /dev/null @@ -1,35 +0,0 @@ ---パリィ -function c52228131.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY+CATEGORY_TODECK) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_CHAINING) - e1:SetCondition(c52228131.condition) - e1:SetTarget(c52228131.target) - e1:SetOperation(c52228131.activate) - c:RegisterEffect(e1) -end -function c52228131.filter(c) - return c:IsSetCard(0x19) and c:IsAbleToDeck() -end -function c52228131.condition(e,tp,eg,ep,ev,re,r,rp) - return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_TRAP) and Duel.IsChainNegatable(ev) -end -function c52228131.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c52228131.filter,tp,LOCATION_HAND,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) - end -end -function c52228131.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectMatchingCard(tp,c52228131.filter,tp,LOCATION_HAND,0,1,1,nil) - if g:GetCount()==0 then return end - Duel.SendtoDeck(g,nil,2,REASON_EFFECT) - Duel.NegateActivation(ev) - if re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(eg,REASON_EFFECT) - end -end diff --git a/script/c52248570.lua b/script/c52248570.lua deleted file mode 100644 index d7fb7bf64e..0000000000 --- a/script/c52248570.lua +++ /dev/null @@ -1,59 +0,0 @@ ---プリズンクインデーモン -function c52248570.initial_effect(c) - --maintain - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCondition(c52248570.mtcon) - e1:SetOperation(c52248570.mtop) - c:RegisterEffect(e1) - --atkup - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(52248570,0)) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCountLimit(1) - e2:SetRange(LOCATION_GRAVE) - e2:SetCondition(c52248570.atkcon) - e2:SetTarget(c52248570.atktg) - e2:SetOperation(c52248570.atkop) - c:RegisterEffect(e2) -end -function c52248570.mtcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c52248570.mtop(e,tp,eg,ep,ev,re,r,rp) - if Duel.CheckLPCost(tp,1000) then - Duel.PayLPCost(tp,1000) - else - Duel.Destroy(e:GetHandler(),REASON_RULE) - end -end -function c52248570.atkcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp and Duel.IsEnvironment(94585852) -end -function c52248570.filter(c) - return c:IsFaceup() and c:IsLevelBelow(4) and c:IsRace(RACE_FIEND) -end -function c52248570.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c52248570.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c52248570.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c52248570.filter,tp,LOCATION_MZONE,0,1,1,nil) -end -function c52248570.atkop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) or not Duel.IsEnvironment(94585852) then return end - local tc=Duel.GetFirstTarget() - if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e1:SetValue(1000) - tc:RegisterEffect(e1) - end -end diff --git a/script/c52263685.lua b/script/c52263685.lua deleted file mode 100644 index 3d6898ca4a..0000000000 --- a/script/c52263685.lua +++ /dev/null @@ -1,30 +0,0 @@ ---盗み見ゴブリン -function c52263685.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c52263685.target) - e1:SetOperation(c52263685.activate) - c:RegisterEffect(e1) -end -function c52263685.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)>=3 end - Duel.SetTargetPlayer(tp) -end -function c52263685.activate(e,tp,eg,ep,ev,re,r,rp) - local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) - if Duel.GetFieldGroupCount(p,0,LOCATION_DECK)==0 then return end - Duel.ConfirmDecktop(1-p,3) - local g=Duel.GetDecktopGroup(1-p,3) - local ct=g:GetCount() - if ct>0 then - Duel.Hint(HINT_SELECTMSG,p,aux.Stringid(52263685,0)) - local sg=g:Select(p,1,1,nil) - Duel.MoveSequence(sg:GetFirst(),1) - Duel.ConfirmCards(1-p,sg) - Duel.SortDecktop(p,1-p,ct-1) - Duel.ConfirmDecktop(1-p,ct-1) - end -end diff --git a/script/c52265835.lua b/script/c52265835.lua deleted file mode 100644 index ed25557b6b..0000000000 --- a/script/c52265835.lua +++ /dev/null @@ -1,17 +0,0 @@ ---A・O・J ルドラ -function c52265835.initial_effect(c) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetCondition(c52265835.condtion) - e1:SetValue(700) - c:RegisterEffect(e1) -end -function c52265835.condtion(e) - local ph=Duel.GetCurrentPhase() - if not (ph==PHASE_DAMAGE or ph==PHASE_DAMAGE_CAL) then return false end - local a=Duel.GetAttacker() - local d=Duel.GetAttackTarget() - return (a==e:GetHandler() and d and d:IsFaceup() and d:IsAttribute(ATTRIBUTE_LIGHT)) - or (d==e:GetHandler() and a:IsAttribute(ATTRIBUTE_LIGHT)) -end diff --git a/script/c52286175.lua b/script/c52286175.lua deleted file mode 100644 index c20e89fbe4..0000000000 --- a/script/c52286175.lua +++ /dev/null @@ -1,30 +0,0 @@ ---トラップ・リアクター・RR -function c52286175.initial_effect(c) - --destroy&damage - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(52286175,0)) - e1:SetCategory(CATEGORY_DAMAGE+CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_QUICK_O) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) - e1:SetCode(EVENT_CHAINING) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCondition(c52286175.condition) - e1:SetTarget(c52286175.target) - e1:SetOperation(c52286175.operation) - c:RegisterEffect(e1) -end -function c52286175.condition(e,tp,eg,ep,ev,re,r,rp) - return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and ep~=tp - and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_TRAP) -end -function c52286175.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return re:GetHandler():IsDestructable() end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,800) -end -function c52286175.operation(e,tp,eg,ep,ev,re,r,rp) - if re:GetHandler():IsRelateToEffect(re) and Duel.Destroy(eg,REASON_EFFECT)~=0 then - Duel.Damage(1-tp,800,REASON_EFFECT) - end -end diff --git a/script/c52319752.lua b/script/c52319752.lua deleted file mode 100644 index f3431eba54..0000000000 --- a/script/c52319752.lua +++ /dev/null @@ -1,20 +0,0 @@ ---暗黒ヴェロキ -function c52319752.initial_effect(c) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetCondition(c52319752.condtion) - e1:SetValue(c52319752.val) - c:RegisterEffect(e1) -end -function c52319752.condtion(e) - local ph=Duel.GetCurrentPhase() - return ph==PHASE_DAMAGE or ph==PHASE_DAMAGE_CAL -end -function c52319752.val(e,c) - if Duel.GetAttacker()==e:GetHandler() and Duel.GetAttackTarget()~=nil then return 400 - elseif e:GetHandler()==Duel.GetAttackTarget() then return -400 - else return 0 end -end diff --git a/script/c52323207.lua b/script/c52323207.lua deleted file mode 100644 index ef00d850b9..0000000000 --- a/script/c52323207.lua +++ /dev/null @@ -1,47 +0,0 @@ ---番兵ゴーレム -function c52323207.initial_effect(c) - --turn set - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(52323207,0)) - e1:SetCategory(CATEGORY_POSITION) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetTarget(c52323207.target) - e1:SetOperation(c52323207.operation) - c:RegisterEffect(e1) - --to hand - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(52323207,1)) - e2:SetCategory(CATEGORY_TOHAND) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - e2:SetTarget(c52323207.thtg) - e2:SetOperation(c52323207.thop) - c:RegisterEffect(e2) -end -function c52323207.target(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsCanTurnSet() and c:GetFlagEffect(52323207)==0 end - c:RegisterFlagEffect(52323207,RESET_EVENT+0x1fc0000+RESET_PHASE+PHASE_END,0,1) - Duel.SetOperationInfo(0,CATEGORY_POSITION,c,1,0,0) -end -function c52323207.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - Duel.ChangePosition(c,POS_FACEDOWN_DEFENCE) - end -end -function c52323207.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsAbleToHand() end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g=Duel.SelectTarget(tp,Card.IsAbleToHand,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0) -end -function c52323207.thop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - end -end diff --git a/script/c52323874.lua b/script/c52323874.lua deleted file mode 100644 index f65e33717a..0000000000 --- a/script/c52323874.lua +++ /dev/null @@ -1,41 +0,0 @@ ---RR-デビル・イーグル -function c52323874.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0xba),3,2) - c:EnableReviveLimit() - --damage - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCountLimit(1,52323874) - e1:SetCost(c52323874.cost) - e1:SetTarget(c52323874.target) - e1:SetOperation(c52323874.operation) - c:RegisterEffect(e1) -end -function c52323874.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c52323874.filter(c) - return c:IsFaceup() and c:GetBaseAttack()>0 - and bit.band(c:GetSummonType(),SUMMON_TYPE_SPECIAL)==SUMMON_TYPE_SPECIAL -end -function c52323874.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and c52323874.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c52323874.filter,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - local g=Duel.SelectTarget(tp,c52323874.filter,tp,0,LOCATION_MZONE,1,1,nil) - local atk=g:GetFirst():GetBaseAttack() - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,atk) -end -function c52323874.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - local atk=tc:GetBaseAttack() - if atk<0 then atk=0 end - Duel.Damage(1-tp,atk,REASON_EFFECT) - end -end diff --git a/script/c52339733.lua b/script/c52339733.lua deleted file mode 100644 index 0dd63f395d..0000000000 --- a/script/c52339733.lua +++ /dev/null @@ -1,31 +0,0 @@ ---竜胆ブルーム -function c52339733.initial_effect(c) - --atk - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_PRE_DAMAGE_CALCULATE) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c52339733.atkcon) - e1:SetOperation(c52339733.atkop) - c:RegisterEffect(e1) -end -function c52339733.atkcon(e,tp,eg,ep,ev,re,r,rp) - local a=Duel.GetAttacker() - local d=Duel.GetAttackTarget() - return d and a:GetControler()~=d:GetControler() -end -function c52339733.atkop(e,tp,eg,ep,ev,re,r,rp) - local a=Duel.GetAttacker() - local d=Duel.GetAttackTarget() - if a:IsFaceup() and a:IsRelateToBattle() and d:IsFaceup() and d:IsRelateToBattle() then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetValue(a:GetDefence()) - e1:SetReset(RESET_PHASE+RESET_DAMAGE_CAL) - a:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetValue(d:GetDefence()) - d:RegisterEffect(e2) - end -end diff --git a/script/c52340274.lua b/script/c52340274.lua deleted file mode 100644 index dfd03c44b3..0000000000 --- a/script/c52340274.lua +++ /dev/null @@ -1,41 +0,0 @@ ---ギャラクシー・クィーンズ・ライト -function c52340274.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c52340274.target) - e1:SetOperation(c52340274.activate) - c:RegisterEffect(e1) -end -function c52340274.filter1(c) - return c:IsFaceup() and c:IsLevelAbove(7) -end -function c52340274.filter2(c) - return c:IsFaceup() and c:GetLevel()>0 -end -function c52340274.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c52340274.filter1(chkc) end - if chk==0 then return Duel.IsExistingTarget(c52340274.filter1,tp,LOCATION_MZONE,0,1,nil) - and Duel.IsExistingMatchingCard(c52340274.filter2,tp,LOCATION_MZONE,0,2,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - Duel.SelectTarget(tp,c52340274.filter1,tp,LOCATION_MZONE,0,1,1,nil) -end -function c52340274.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - local g=Duel.GetMatchingGroup(c52340274.filter2,tp,LOCATION_MZONE,0,tc) - local lc=g:GetFirst() - local lv=tc:GetLevel() - while lc do - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CHANGE_LEVEL_FINAL) - e1:SetValue(lv) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - lc:RegisterEffect(e1) - lc=g:GetNext() - end - end -end diff --git a/script/c52346240.lua b/script/c52346240.lua deleted file mode 100644 index 588f4984f9..0000000000 --- a/script/c52346240.lua +++ /dev/null @@ -1,41 +0,0 @@ ---ロックキャット -function c52346240.initial_effect(c) - --summon success - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(52346240,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c52346240.sptg) - e1:SetOperation(c52346240.spop) - c:RegisterEffect(e1) -end -function c52346240.filter(c,e,tp) - return c:GetLevel()==1 and c:IsRace(RACE_BEAST) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c52346240.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c52346240.filter(chkc,e,tp) end - if chk==0 then return Duel.IsExistingTarget(c52346240.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) - and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c52346240.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c52346240.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP_DEFENCE) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e2) - end - Duel.SpecialSummonComplete() -end diff --git a/script/c52352005.lua b/script/c52352005.lua deleted file mode 100644 index d95c2067f1..0000000000 --- a/script/c52352005.lua +++ /dev/null @@ -1,30 +0,0 @@ ---XX-セイバー ガトムズ -function c52352005.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,nil,aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_EARTH),1) - c:EnableReviveLimit() - --handes - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(52352005,0)) - e1:SetCategory(CATEGORY_HANDES) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c52352005.cost) - e1:SetTarget(c52352005.target) - e1:SetOperation(c52352005.operation) - c:RegisterEffect(e1) -end -function c52352005.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsSetCard,1,nil,0x100d) end - local g=Duel.SelectReleaseGroup(tp,Card.IsSetCard,1,1,nil,0x100d) - Duel.Release(g,REASON_COST) -end -function c52352005.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0 end - Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,1-tp,1) -end -function c52352005.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetFieldGroup(1-tp,LOCATION_HAND,0,nil) - local sg=g:RandomSelect(1-tp,1) - Duel.SendtoGrave(sg,REASON_DISCARD+REASON_EFFECT) -end diff --git a/script/c52370835.lua b/script/c52370835.lua deleted file mode 100644 index bdaf043794..0000000000 --- a/script/c52370835.lua +++ /dev/null @@ -1,44 +0,0 @@ ---H・C ソード・シールド -function c52370835.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(52370835,0)) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c52370835.condition) - e1:SetCost(c52370835.cost) - e1:SetOperation(c52370835.operation) - c:RegisterEffect(e1) -end -function c52370835.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x6f) -end -function c52370835.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c52370835.cfilter,tp,LOCATION_MZONE,0,1,nil) -end -function c52370835.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end -function c52370835.operation(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_AVOID_BATTLE_DAMAGE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetTargetRange(1,0) - e1:SetValue(1) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e2:SetTargetRange(LOCATION_MZONE,0) - e2:SetTarget(c52370835.filter) - e2:SetReset(RESET_PHASE+PHASE_END) - e2:SetValue(1) - Duel.RegisterEffect(e2,tp) -end -function c52370835.filter(e,c) - return c:IsSetCard(0x6f) -end diff --git a/script/c5237827.lua b/script/c5237827.lua deleted file mode 100644 index b86a806ba7..0000000000 --- a/script/c5237827.lua +++ /dev/null @@ -1,43 +0,0 @@ ---ヴァイロン・オーム -function c5237827.initial_effect(c) - --remove - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(5237827,0)) - e1:SetCategory(CATEGORY_REMOVE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c5237827.rmtg) - e1:SetOperation(c5237827.rmop) - c:RegisterEffect(e1) -end -function c5237827.filter(c) - return c:IsType(TYPE_EQUIP) and c:IsAbleToRemove() -end -function c5237827.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c5237827.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c5237827.filter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,c5237827.filter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) -end -function c5237827.rmop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) and Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)~=0 then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetRange(LOCATION_REMOVED) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) - e1:SetCountLimit(1) - e1:SetCondition(c5237827.thcon) - e1:SetOperation(c5237827.thop) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN) - tc:RegisterEffect(e1) - end -end -function c5237827.thcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c5237827.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT) -end diff --git a/script/c52404456.lua b/script/c52404456.lua deleted file mode 100644 index dd3f59735f..0000000000 --- a/script/c52404456.lua +++ /dev/null @@ -1,59 +0,0 @@ ---マドルチェ・メッセンジェラート -function c52404456.initial_effect(c) - --to deck - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(52404456,0)) - e1:SetCategory(CATEGORY_TODECK) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCondition(c52404456.retcon) - e1:SetTarget(c52404456.rettg) - e1:SetOperation(c52404456.retop) - c:RegisterEffect(e1) - --search - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(52404456,1)) - e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetCondition(c52404456.shcon) - e2:SetTarget(c52404456.shtg) - e2:SetOperation(c52404456.shop) - c:RegisterEffect(e2) -end -function c52404456.retcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsReason(REASON_DESTROY) and e:GetHandler():GetReasonPlayer()~=tp - and e:GetHandler():GetPreviousControler()==tp -end -function c52404456.rettg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0) -end -function c52404456.retop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_EFFECT) - end -end -function c52404456.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x71) and c:IsRace(RACE_BEAST) -end -function c52404456.shcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c52404456.cfilter,tp,LOCATION_MZONE,0,1,e:GetHandler()) -end -function c52404456.filter(c) - return c:IsSetCard(0x71) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand() -end -function c52404456.shtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c52404456.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c52404456.shop(e,tp,eg,ep,ev,re,r,rp) - if not Duel.IsExistingMatchingCard(c52404456.cfilter,tp,LOCATION_MZONE,0,1,e:GetHandler()) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c52404456.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c52417194.lua b/script/c52417194.lua deleted file mode 100644 index f0c9987a7b..0000000000 --- a/script/c52417194.lua +++ /dev/null @@ -1,29 +0,0 @@ ---大暴落 -function c52417194.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetHintTiming(0,TIMING_TOHAND) - e1:SetCondition(c52417194.condition) - e1:SetTarget(c52417194.target) - e1:SetOperation(c52417194.activate) - c:RegisterEffect(e1) -end -function c52417194.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>7 -end -function c52417194.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(1-tp) end - Duel.SetTargetPlayer(1-tp) -end -function c52417194.activate(e,tp,eg,ep,ev,re,r,rp) - local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) - local g=Duel.GetFieldGroup(p,LOCATION_HAND,0) - Duel.SendtoDeck(g,nil,2,REASON_EFFECT) - Duel.ShuffleDeck(p) - Duel.BreakEffect() - Duel.Draw(p,2,REASON_EFFECT) -end diff --git a/script/c52430902.lua b/script/c52430902.lua deleted file mode 100644 index 68df355f49..0000000000 --- a/script/c52430902.lua +++ /dev/null @@ -1,52 +0,0 @@ ---サイコジャンパー -function c52430902.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(52430902,0)) - e1:SetCategory(CATEGORY_CONTROL) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCost(c52430902.cost) - e1:SetTarget(c52430902.target) - e1:SetOperation(c52430902.operation) - c:RegisterEffect(e1) -end -function c52430902.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,1000) end - Duel.PayLPCost(tp,1000) -end -function c52430902.filter1(c) - return c:IsFaceup() and c:IsRace(RACE_PSYCHO) and c:GetCode()~=52430902 and c:IsAbleToChangeControler() -end -function c52430902.filter2(c) - return c:IsFaceup() and c:IsAbleToChangeControler() -end -function c52430902.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - if chk==0 then return Duel.IsExistingTarget(c52430902.filter2,tp,0,LOCATION_MZONE,1,nil) - and Duel.IsExistingTarget(c52430902.filter1,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) - local g1=Duel.SelectTarget(tp,c52430902.filter1,tp,LOCATION_MZONE,0,1,1,nil) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) - local g2=Duel.SelectTarget(tp,c52430902.filter2,tp,0,LOCATION_MZONE,1,1,nil) - g1:Merge(g2) - Duel.SetOperationInfo(0,CATEGORY_CONTROL,g1,2,0,0) -end -function c52430902.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local tc1=g:GetFirst() - local tc2=g:GetNext() - if tc1:IsFaceup() and tc1:IsRelateToEffect(e) and tc2:IsFaceup() and tc2:IsRelateToEffect(e) then - if Duel.SwapControl(tc1,tc2) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_CHANGE_POSITION) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc1:RegisterEffect(e1) - local e2=e1:Clone() - tc2:RegisterEffect(e2) - end - end -end diff --git a/script/c5244497.lua b/script/c5244497.lua deleted file mode 100644 index 8837c63c89..0000000000 --- a/script/c5244497.lua +++ /dev/null @@ -1,27 +0,0 @@ ---スクープ・シューター -function c5244497.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(5244497,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_BATTLE_START) - e1:SetCondition(c5244497.descon) - e1:SetTarget(c5244497.destg) - e1:SetOperation(c5244497.desop) - c:RegisterEffect(e1) -end -function c5244497.descon(e,tp,eg,ep,ev,re,r,rp) - local d=Duel.GetAttackTarget() - return e:GetHandler()==Duel.GetAttacker() and d and d:IsFaceup() and d:GetDefence()>e:GetHandler():GetAttack() -end -function c5244497.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,Duel.GetAttackTarget(),1,0,0) -end -function c5244497.desop(e,tp,eg,ep,ev,re,r,rp) - local d=Duel.GetAttackTarget() - if d:IsRelateToBattle() and d:GetDefence()>e:GetHandler():GetAttack() then - Duel.Destroy(d,REASON_EFFECT) - end -end diff --git a/script/c52496105.lua b/script/c52496105.lua deleted file mode 100644 index c37950eddc..0000000000 --- a/script/c52496105.lua +++ /dev/null @@ -1,71 +0,0 @@ ---剣闘獣の闘器マニカ -function c52496105.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c52496105.target) - e1:SetOperation(c52496105.operation) - c:RegisterEffect(e1) - -- - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e2:SetValue(1) - c:RegisterEffect(e2) - --Equip limit - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_EQUIP_LIMIT) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e3:SetValue(c52496105.eqlimit) - c:RegisterEffect(e3) - --tohand - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e4:SetCategory(CATEGORY_TOHAND) - e4:SetDescription(aux.Stringid(52496105,0)) - e4:SetCode(EVENT_TO_GRAVE) - e4:SetCondition(c52496105.retcon) - e4:SetTarget(c52496105.rettg) - e4:SetOperation(c52496105.retop) - c:RegisterEffect(e4) -end -function c52496105.eqlimit(e,c) - return c:IsSetCard(0x19) -end -function c52496105.filter(c) - return c:IsFaceup() and c:IsSetCard(0x19) -end -function c52496105.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:GetLocation()==LOCATION_MZONE and c52496105.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c52496105.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c52496105.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c52496105.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,c,tc) - end -end -function c52496105.retcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local ec=c:GetPreviousEquipTarget() - return c:IsReason(REASON_LOST_TARGET) and (ec:GetLocation()==LOCATION_DECK or ec:GetLocation()==LOCATION_EXTRA) -end -function c52496105.rettg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToHand() end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0) -end -function c52496105.retop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SendtoHand(c,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,c) - end -end diff --git a/script/c52497105.lua b/script/c52497105.lua deleted file mode 100644 index 889d247bdc..0000000000 --- a/script/c52497105.lua +++ /dev/null @@ -1,58 +0,0 @@ ---蛮勇鱗粉 -function c52497105.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetCondition(c52497105.condition) - e1:SetTarget(c52497105.target) - e1:SetOperation(c52497105.activate) - c:RegisterEffect(e1) -end -function c52497105.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end -function c52497105.filter(c) - return c:IsFaceup() and (Duel.GetCurrentPhase()~=PHASE_DAMAGE or c~=Duel.GetAttacker() or Duel.GetAttackTarget()) -end -function c52497105.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c52497105.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c52497105.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c52497105.filter,tp,LOCATION_MZONE,0,1,1,nil) -end -function c52497105.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - e1:SetValue(1000) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_CANNOT_DIRECT_ATTACK) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - tc:RegisterEffect(e2) - local e3=Effect.CreateEffect(e:GetHandler()) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e3:SetCode(EVENT_PHASE+PHASE_END) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1) - e3:SetOperation(c52497105.atkdown) - e3:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - tc:RegisterEffect(e3) - end -end -function c52497105.atkdown(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetOwner()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(-1000) - e1:SetReset(RESET_EVENT+0x1fe0000) - e:GetHandler():RegisterEffect(e1,true) -end diff --git a/script/c52503575.lua b/script/c52503575.lua deleted file mode 100644 index 16507582a9..0000000000 --- a/script/c52503575.lua +++ /dev/null @@ -1,20 +0,0 @@ ---最終突撃命令 -function c52503575.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_DRAW_PHASE) - c:RegisterEffect(e1) - --Pos Change - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_SET_POSITION) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e2:SetValue(POS_FACEUP_ATTACK) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EFFECT_CANNOT_CHANGE_POSITION) - c:RegisterEffect(e3) -end diff --git a/script/c525110.lua b/script/c525110.lua deleted file mode 100644 index 5392596fcf..0000000000 --- a/script/c525110.lua +++ /dev/null @@ -1,49 +0,0 @@ ---プチトマボー -function c525110.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(525110,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetCondition(c525110.condition) - e1:SetTarget(c525110.target) - e1:SetOperation(c525110.operation) - c:RegisterEffect(e1) -end -function c525110.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) -end -function c525110.filter(c,e,tp) - return c:IsSetCard(0x5b) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c525110.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c525110.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c525110.operation(e,tp,eg,ep,ev,re,r,rp) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ft<=0 then return end - if ft>=2 then ft=2 end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c525110.filter,tp,LOCATION_DECK,0,1,ft,nil,e,tp) - if g:GetCount()>0 then - local t1=g:GetFirst() - local t2=g:GetNext() - Duel.SpecialSummonStep(t1,0,tp,tp,false,false,POS_FACEUP) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetValue(1) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - t1:RegisterEffect(e1) - if t2 then - Duel.SpecialSummonStep(t2,0,tp,tp,false,false,POS_FACEUP) - local e2=e1:Clone() - t2:RegisterEffect(e2) - end - Duel.SpecialSummonComplete() - end -end diff --git a/script/c52512994.lua b/script/c52512994.lua deleted file mode 100644 index 3dc7691315..0000000000 --- a/script/c52512994.lua +++ /dev/null @@ -1,58 +0,0 @@ ---火車 -function c52512994.initial_effect(c) - c:EnableReviveLimit() - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(aux.FALSE) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_SPSUMMON_PROC) - e2:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e2:SetRange(LOCATION_HAND) - e2:SetCondition(c52512994.spcon) - c:RegisterEffect(e2) - --todeck - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(52512994,0)) - e3:SetCategory(CATEGORY_TODECK) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - e3:SetTarget(c52512994.tdtg) - e3:SetOperation(c52512994.tdop) - c:RegisterEffect(e3) -end -function c52512994.spfilter(c) - return c:IsFaceup() and c:IsRace(RACE_ZOMBIE) -end -function c52512994.spcon(e,c) - if c==nil then return true end - return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c52512994.spfilter,c:GetControler(),LOCATION_MZONE,0,2,nil) -end -function c52512994.tdtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local g=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,LOCATION_MZONE,LOCATION_MZONE,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0) -end -function c52512994.rfilter(c) - return c:IsLocation(LOCATION_DECK+LOCATION_EXTRA) and c:IsRace(RACE_ZOMBIE) and bit.band(c:GetPreviousPosition(),POS_FACEUP)~=0 -end -function c52512994.tdop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,LOCATION_MZONE,LOCATION_MZONE,e:GetHandler()) - Duel.SendtoDeck(g,nil,2,REASON_EFFECT) - local c=e:GetHandler() - local rt=Duel.GetOperatedGroup():FilterCount(c52512994.rfilter,nil) - if rt>0 and c:IsFaceup() and c:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetValue(rt*1000) - e1:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e1) - end -end diff --git a/script/c52518793.lua b/script/c52518793.lua deleted file mode 100644 index 45832697c7..0000000000 --- a/script/c52518793.lua +++ /dev/null @@ -1,58 +0,0 @@ ---剣闘獣の檻-コロッセウム -function c52518793.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --Add counter - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(52518793,0)) - e2:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_FIELD) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetRange(LOCATION_SZONE) - e2:SetCondition(c52518793.accon) - e2:SetOperation(c52518793.acop) - c:RegisterEffect(e2) - --atkup - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetCode(EFFECT_UPDATE_ATTACK) - e3:SetRange(LOCATION_SZONE) - e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e3:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x19)) - e3:SetValue(c52518793.atkval) - c:RegisterEffect(e3) - local e4=e3:Clone() - e4:SetCode(EFFECT_UPDATE_DEFENCE) - c:RegisterEffect(e4) - --Destroy replace - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE) - e5:SetCode(EFFECT_DESTROY_REPLACE) - e5:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e5:SetRange(LOCATION_SZONE) - e5:SetTarget(c52518793.desreptg) - e5:SetOperation(c52518793.desrepop) - c:RegisterEffect(e5) -end -function c52518793.atkval(e,c) - return e:GetHandler():GetCounter(0x7)*100 -end -function c52518793.cfilter(c,tp) - return c:IsPreviousLocation(LOCATION_DECK) -end -function c52518793.accon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c52518793.cfilter,1,nil,tp) -end -function c52518793.acop(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():AddCounter(0x7,1) -end -function c52518793.desreptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return not e:GetHandler():IsReason(REASON_RULE) - and Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_HAND,0,1,nil,52518793) end - return Duel.SelectYesNo(tp,aux.Stringid(52518793,1)) -end -function c52518793.desrepop(e,tp,eg,ep,ev,re,r,rp) - Duel.DiscardHand(tp,Card.IsCode,1,1,REASON_EFFECT+REASON_DISCARD,nil,52518793) -end diff --git a/script/c5255013.lua b/script/c5255013.lua deleted file mode 100644 index 991bcd9333..0000000000 --- a/script/c5255013.lua +++ /dev/null @@ -1,72 +0,0 @@ ---セフィラの輝跡 -function c5255013.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TODECK) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c5255013.condition) - e1:SetOperation(c5255013.activate) - c:RegisterEffect(e1) - --splimit - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetRange(LOCATION_SZONE) - e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetTargetRange(1,1) - e2:SetTarget(c5255013.splimit) - c:RegisterEffect(e2) - --cannot be target - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) - e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e3:SetRange(LOCATION_SZONE) - e3:SetCondition(c5255013.tgcon) - e3:SetValue(aux.tgval) - c:RegisterEffect(e3) - --self destroy - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e4:SetRange(LOCATION_SZONE) - e4:SetCode(EVENT_DESTROY) - e4:SetCondition(c5255013.descon) - e4:SetOperation(c5255013.desop) - c:RegisterEffect(e4) -end -function c5255013.condition(e,tp,eg,ep,ev,re,r,rp) - local tc1=Duel.GetFieldCard(tp,LOCATION_SZONE,6) - local tc2=Duel.GetFieldCard(tp,LOCATION_SZONE,7) - if not tc1 or not tc2 or not tc1:IsSetCard(0xc4) or not tc2:IsSetCard(0xc4) then return false end - local scl1=tc1:GetLeftScale() - local scl2=tc2:GetRightScale() - if scl1>scl2 then scl1,scl2=scl2,scl1 end - return scl1==1 and scl2==7 -end -function c5255013.filter(c) - return (c:IsFacedown() or not c:IsSetCard(0xc4)) and c:IsAbleToDeck() -end -function c5255013.activate(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local g=Duel.GetMatchingGroup(c5255013.filter,tp,LOCATION_MZONE,0,nil) - if g:GetCount()>0 then - Duel.SendtoDeck(g,nil,2,REASON_EFFECT) - end -end -function c5255013.splimit(e,c,sump,sumtype,sumpos,targetp) - return not c:IsLocation(LOCATION_HAND+LOCATION_EXTRA) -end -function c5255013.tgcon(e) - local tp=e:GetHandlerPlayer() - return Duel.GetFieldCard(tp,LOCATION_SZONE,6) or Duel.GetFieldCard(tp,LOCATION_SZONE,7) -end -function c5255013.desfilter(c,tp) - return c:IsControler(tp) and c:IsLocation(LOCATION_SZONE) and (c:GetSequence()==6 or c:GetSequence()==7) -end -function c5255013.descon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c5255013.desfilter,1,nil,tp) -end -function c5255013.desop(e,tp,eg,ep,ev,re,r,rp) - Duel.Destroy(e:GetHandler(),REASON_EFFECT) -end diff --git a/script/c52551211.lua b/script/c52551211.lua deleted file mode 100644 index 901eb7c181..0000000000 --- a/script/c52551211.lua +++ /dev/null @@ -1,61 +0,0 @@ ---シャドール・ハウンド -function c52551211.initial_effect(c) - --tohand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(52551211,0)) - e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) - e1:SetCountLimit(1,52551211) - e1:SetTarget(c52551211.thtg) - e1:SetOperation(c52551211.thop) - c:RegisterEffect(e1) - --pos - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(52551211,1)) - e2:SetCategory(CATEGORY_POSITION) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) - e2:SetCountLimit(1,52551211) - e2:SetCondition(c52551211.poscon) - e2:SetTarget(c52551211.postg) - e2:SetOperation(c52551211.posop) - c:RegisterEffect(e2) -end -function c52551211.filter(c) - return c:IsSetCard(0x9d) and c:IsAbleToHand() -end -function c52551211.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c52551211.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c52551211.filter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c52551211.filter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c52551211.thop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end -function c52551211.poscon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsReason(REASON_EFFECT) -end -function c52551211.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) end - if chk==0 then return Duel.IsExistingTarget(nil,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE) - local g=Duel.SelectTarget(tp,nil,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0) -end -function c52551211.posop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if not tc:IsRelateToEffect(e) then return end - if tc:IsSetCard(0x9d) then - Duel.ChangePosition(tc,POS_FACEUP_DEFENCE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK) - else - Duel.ChangePosition(tc,POS_FACEUP_DEFENCE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK,true) - end -end diff --git a/script/c52558805.lua b/script/c52558805.lua deleted file mode 100644 index 83474e73aa..0000000000 --- a/script/c52558805.lua +++ /dev/null @@ -1,58 +0,0 @@ ---太鼓魔人テンテンテンポ -function c52558805.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,3,2) - c:EnableReviveLimit() - --atkchange - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(52558805,0)) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetHintTiming(TIMING_DAMAGE_STEP+0x1c0) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCondition(c52558805.atkcon) - e1:SetCost(c52558805.atkcost) - e1:SetTarget(c52558805.atktg) - e1:SetOperation(c52558805.atkop) - c:RegisterEffect(e1) -end -function c52558805.atkcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end -function c52558805.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c52558805.filter(c,tp) - return c:CheckRemoveOverlayCard(tp,1,REASON_EFFECT) -end -function c52558805.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c52558805.filter(chkc,tp) end - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_EFFECT) - and Duel.IsExistingTarget(c52558805.filter,tp,0,LOCATION_MZONE,1,nil,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c52558805.filter,tp,0,LOCATION_MZONE,1,1,nil,tp) -end -function c52558805.atkfilter(c) - return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:IsSetCard(0x6d) -end -function c52558805.atkop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if not tc:IsRelateToEffect(e) or tc:GetOverlayCount()==0 then return end - tc:RemoveOverlayCard(tp,1,1,REASON_EFFECT) - local g=Duel.GetMatchingGroup(c52558805.atkfilter,tp,LOCATION_MZONE,0,nil) - local tc=g:GetFirst() - while tc do - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetValue(500) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - tc=g:GetNext() - end -end diff --git a/script/c52571838.lua b/script/c52571838.lua deleted file mode 100644 index cfdf7db708..0000000000 --- a/script/c52571838.lua +++ /dev/null @@ -1,15 +0,0 @@ ---忍び寄るデビルマンタ -function c52571838.initial_effect(c) - --summon success - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetOperation(c52571838.sumsuc) - c:RegisterEffect(e1) -end -function c52571838.sumsuc(e,tp,eg,ep,ev,re,r,rp) - Duel.SetChainLimitTillChainEnd(c52571838.chlimit) -end -function c52571838.chlimit(re,rp,tp) - return not re:GetHandler():IsType(TYPE_TRAP) or not re:IsHasType(EFFECT_TYPE_ACTIVATE) -end diff --git a/script/c52575195.lua b/script/c52575195.lua deleted file mode 100644 index bf1b4c5567..0000000000 --- a/script/c52575195.lua +++ /dev/null @@ -1,81 +0,0 @@ ---ビビット騎士 -function c52575195.initial_effect(c) - --change target - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(52575195,0)) - e1:SetCategory(CATEGORY_REMOVE+CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_CHAINING) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c52575195.tgcon1) - e1:SetTarget(c52575195.tgtg) - e1:SetOperation(c52575195.tgop) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(52575195,0)) - e2:SetCategory(CATEGORY_REMOVE+CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_ATTACK_ANNOUNCE) - e2:SetRange(LOCATION_HAND) - e2:SetCondition(c52575195.tgcon2) - e2:SetTarget(c52575195.tgtg) - e2:SetOperation(c52575195.tgop) - c:RegisterEffect(e2) -end -function c52575195.tgcon1(e,tp,eg,ep,ev,re,r,rp) - if rp==tp or not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end - local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) - if not g or g:GetCount()~=1 then return false end - local tc=g:GetFirst() - e:SetLabelObject(tc) - return tc:IsControler(tp) and tc:IsLocation(LOCATION_MZONE) and tc:IsFaceup() - and tc:IsAttribute(ATTRIBUTE_LIGHT) and tc:IsRace(RACE_BEASTWARRIOR) -end -function c52575195.tgcon2(e,tp,eg,ep,ev,re,r,rp) - if tp==Duel.GetTurnPlayer() then return false end - local tc=Duel.GetAttackTarget() - e:SetLabelObject(tc) - return tc and tc:IsFaceup() and tc:IsAttribute(ATTRIBUTE_LIGHT) and tc:IsRace(RACE_BEASTWARRIOR) -end -function c52575195.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) - local tc=e:GetLabelObject() - if chk==0 then return tc:IsAbleToRemove() and Duel.GetLocationCount(tp,LOCATION_MZONE)>=0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetTargetCard(tc) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,tc,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c52575195.tgop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsControler(tp) and Duel.Remove(tc,tc:GetPosition(),REASON_EFFECT+REASON_TEMPORARY)~=0 then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) - e1:SetRange(LOCATION_REMOVED) - e1:SetCountLimit(1) - if Duel.GetTurnPlayer()==tp then - if Duel.GetCurrentPhase()==PHASE_DRAW then - e1:SetLabel(Duel.GetTurnCount()) - else - e1:SetLabel(Duel.GetTurnCount()+2) - end - else - e1:SetLabel(Duel.GetTurnCount()+1) - end - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetCondition(c52575195.retcon) - e1:SetOperation(c52575195.retop) - tc:RegisterEffect(e1) - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) - end - end -end -function c52575195.retcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnCount()==e:GetLabel() -end -function c52575195.retop(e,tp,eg,ep,ev,re,r,rp) - Duel.ReturnToField(e:GetHandler()) - e:Reset() -end diff --git a/script/c5257687.lua b/script/c5257687.lua deleted file mode 100644 index b534e8c550..0000000000 --- a/script/c5257687.lua +++ /dev/null @@ -1,33 +0,0 @@ ---X・E・N・O -function c5257687.initial_effect(c) - --flip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(5257687,0)) - e1:SetCategory(CATEGORY_CONTROL) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c5257687.target) - e1:SetOperation(c5257687.operation) - c:RegisterEffect(e1) -end -function c5257687.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsControlerCanBeChanged() end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) - local g=Duel.SelectTarget(tp,Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0) -end -function c5257687.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - if Duel.GetControl(tc,tp,PHASE_END,1) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DIRECT_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - elseif not tc:IsImmuneToEffect(e) and tc:IsAbleToChangeControler() then - Duel.Destroy(tc,REASON_EFFECT) - end - end -end diff --git a/script/c52601736.lua b/script/c52601736.lua deleted file mode 100644 index 8d4ae70c48..0000000000 --- a/script/c52601736.lua +++ /dev/null @@ -1,89 +0,0 @@ ---甲虫装機 ホッパー -function c52601736.initial_effect(c) - --equip - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetDescription(aux.Stringid(52601736,0)) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetTarget(c52601736.eqtg) - e1:SetOperation(c52601736.eqop) - c:RegisterEffect(e1) - --equip effect - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_UPDATE_LEVEL) - e2:SetValue(4) - c:RegisterEffect(e2) - --direct atk - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(52601736,1)) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_SZONE) - e3:SetCondition(c52601736.dacon) - e3:SetCost(c52601736.dacost) - e3:SetOperation(c52601736.daop) - c:RegisterEffect(e3) -end -function c52601736.filter(c) - return c:IsSetCard(0x56) and c:IsType(TYPE_MONSTER) and not c:IsHasEffect(EFFECT_NECRO_VALLEY) -end -function c52601736.eqtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingMatchingCard(c52601736.filter,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,nil,1,tp,LOCATION_GRAVE+LOCATION_HAND) -end -function c52601736.eqop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end - if c:IsFacedown() or not c:IsRelateToEffect(e) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local g=Duel.SelectMatchingCard(tp,c52601736.filter,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,1,nil) - local tc=g:GetFirst() - if tc then - if not Duel.Equip(tp,tc,c,true) then return end - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(c52601736.eqlimit) - tc:RegisterEffect(e1) - end -end -function c52601736.eqlimit(e,c) - return e:GetOwner()==c and not c:IsDisabled() -end -function c52601736.dacon(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetHandler():GetEquipTarget() - return Duel.IsAbleToEnterBP() - and tc:IsAttackable() and tc:GetEffectCount(EFFECT_DIRECT_ATTACK)==0 -end -function c52601736.ftarget(e,c) - return e:GetLabel()~=c:GetFieldID() -end -function c52601736.dacost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - local tc=e:GetHandler():GetEquipTarget() - Duel.SetTargetCard(tc) - Duel.SendtoGrave(e:GetHandler(),REASON_COST) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetProperty(EFFECT_FLAG_OATH) - e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetTarget(c52601736.ftarget) - e1:SetLabel(tc:GetFieldID()) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function c52601736.daop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DIRECT_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - end -end diff --git a/script/c52624755.lua b/script/c52624755.lua deleted file mode 100644 index 0075e7a633..0000000000 --- a/script/c52624755.lua +++ /dev/null @@ -1,33 +0,0 @@ ---闇・道化師のペーテン -function c52624755.initial_effect(c) - --sp summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(52624755,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCost(c52624755.cost) - e1:SetTarget(c52624755.target) - e1:SetOperation(c52624755.operation) - c:RegisterEffect(e1) -end -function c52624755.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) -end -function c52624755.filter(c,e,sp) - return c:GetCode()==52624755 and c:IsCanBeSpecialSummoned(e,0,sp,false,false) -end -function c52624755.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c52624755.filter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) -end -function c52624755.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c52624755.filter,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c52628687.lua b/script/c52628687.lua deleted file mode 100644 index afce3e6656..0000000000 --- a/script/c52628687.lua +++ /dev/null @@ -1,78 +0,0 @@ ---ネクロの魔導書 -function c52628687.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCountLimit(1,52628687+EFFECT_COUNT_CODE_OATH) - e1:SetCost(c52628687.cost) - e1:SetTarget(c52628687.target) - e1:SetOperation(c52628687.operation) - c:RegisterEffect(e1) -end -function c52628687.cost(e,tp,eg,ep,ev,re,r,rp,chk) - e:SetLabel(100) - return true -end -function c52628687.cfilter(c,e,tp) - return c:IsRace(RACE_SPELLCASTER) and c:GetLevel()>0 and c:IsAbleToRemoveAsCost() - and Duel.IsExistingTarget(c52628687.spfilter,tp,LOCATION_GRAVE,0,1,c,e,tp) -end -function c52628687.cffilter(c) - return c:IsSetCard(0x106e) and c:IsType(TYPE_SPELL) and not c:IsPublic() -end -function c52628687.spfilter(c,e,tp) - return c:IsRace(RACE_SPELLCASTER) and c:GetLevel()>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c52628687.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c52628687.spfilter(chkc,e,tp) end - if chk==0 then - if e:GetLabel()~=100 then return false end - e:SetLabel(0) - return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c52628687.cfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) - and Duel.IsExistingMatchingCard(c52628687.cffilter,tp,LOCATION_HAND,0,1,e:GetHandler()) - end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local rg=Duel.SelectMatchingCard(tp,c52628687.cfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - e:SetLabel(rg:GetFirst():GetLevel()) - Duel.Remove(rg,POS_FACEUP,REASON_COST) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) - local cg=Duel.SelectMatchingCard(tp,c52628687.cffilter,tp,LOCATION_HAND,0,1,1,e:GetHandler()) - Duel.ConfirmCards(1-tp,cg) - Duel.ShuffleHand(tp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c52628687.spfilter,tp,LOCATION_GRAVE,0,1,1,rg:GetFirst(),e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c52628687.eqlimit(e,c) - return c==e:GetLabelObject() -end -function c52628687.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) - and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP_ATTACK) then - --levelup - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_EQUIP) - e1:SetCode(EFFECT_UPDATE_LEVEL) - e1:SetValue(e:GetLabel()) - e1:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e1) - Duel.Equip(tp,c,tc) - Duel.SpecialSummonComplete() - --Add Equip limit - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_EQUIP_LIMIT) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetReset(RESET_EVENT+0x1fe0000) - e2:SetLabelObject(tc) - e2:SetValue(c52628687.eqlimit) - c:RegisterEffect(e2) - end -end diff --git a/script/c52639377.lua b/script/c52639377.lua deleted file mode 100644 index 4a84513500..0000000000 --- a/script/c52639377.lua +++ /dev/null @@ -1,37 +0,0 @@ ---魔界闘士 バルムンク -function c52639377.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1) - c:EnableReviveLimit() - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(52639377,0)) - e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCondition(c52639377.spcon) - e1:SetTarget(c52639377.sptg) - e1:SetOperation(c52639377.spop) - c:RegisterEffect(e1) -end -function c52639377.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsReason(REASON_EFFECT) and e:GetHandler():IsReason(REASON_DESTROY) -end -function c52639377.spfilter(c,e,tp) - return c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c52639377.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c52639377.spfilter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c52639377.spfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler(),e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c52639377.spfilter,tp,LOCATION_GRAVE,0,1,1,e:GetHandler(),e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,g:GetCount(),0,0) -end -function c52639377.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c52648457.lua b/script/c52648457.lua deleted file mode 100644 index ce9e4f8691..0000000000 --- a/script/c52648457.lua +++ /dev/null @@ -1,23 +0,0 @@ ---ゴーゴンの眼 -function c52648457.initial_effect(c) - --activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetOperation(c52648457.activate) - c:RegisterEffect(e1) -end -function c52648457.activate(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - --disable - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_DISABLE) - e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e1:SetTarget(c52648457.distg) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function c52648457.distg(e,c) - return c:IsDefencePos() -end diff --git a/script/c52653092.lua b/script/c52653092.lua deleted file mode 100644 index 570af074b9..0000000000 --- a/script/c52653092.lua +++ /dev/null @@ -1,146 +0,0 @@ ---SNo.0 ホープ・ゼアル -function c52653092.initial_effect(c) - --xyz summon - c:EnableReviveLimit() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetRange(LOCATION_EXTRA) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetCondition(c52653092.xyzcon) - e1:SetOperation(c52653092.xyzop) - e1:SetValue(SUMMON_TYPE_XYZ) - c:RegisterEffect(e1) - --cannot disable spsummon - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_CANNOT_DISABLE_SPSUMMON) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e2:SetCondition(c52653092.effcon) - c:RegisterEffect(e2) - --summon success - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - e3:SetCondition(c52653092.effcon2) - e3:SetOperation(c52653092.spsumsuc) - c:RegisterEffect(e3) - --atk & def - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetCode(EFFECT_UPDATE_ATTACK) - e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e4:SetRange(LOCATION_MZONE) - e4:SetValue(c52653092.atkval) - c:RegisterEffect(e4) - local e5=e4:Clone() - e5:SetCode(EFFECT_UPDATE_DEFENCE) - c:RegisterEffect(e5) - --activate limit - local e6=Effect.CreateEffect(c) - e6:SetDescription(aux.Stringid(52653092,1)) - e6:SetType(EFFECT_TYPE_QUICK_O) - e6:SetCode(EVENT_FREE_CHAIN) - e6:SetRange(LOCATION_MZONE) - e6:SetHintTiming(0,TIMING_DRAW_PHASE) - e6:SetCountLimit(1) - e6:SetCondition(c52653092.actcon) - e6:SetCost(c52653092.actcost) - e6:SetOperation(c52653092.actop) - c:RegisterEffect(e6) -end -c52653092.xyz_number=0 -function c52653092.cfilter(c) - return c:IsSetCard(0x95) and c:GetType()==TYPE_SPELL and c:IsDiscardable() -end -function c52653092.ovfilter(c) - return c:IsFaceup() and c:IsSetCard(0x7f) -end -function c52653092.mfilter(c,xyzc) - return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:IsSetCard(0x48) and c:IsCanBeXyzMaterial(xyzc) -end -function c52653092.xyzfilter1(c,g) - return g:IsExists(c52653092.xyzfilter2,2,c,c:GetRank()) -end -function c52653092.xyzfilter2(c,rk) - return c:GetRank()==rk -end -function c52653092.xyzcon(e,c,og) - if c==nil then return true end - local tp=c:GetControler() - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - local ct=-ft - if 3<=ct then return false end - if ct<1 and Duel.IsExistingMatchingCard(aux.XyzAlterFilter,tp,LOCATION_MZONE,0,1,nil,c52653092.ovfilter,c) - and Duel.IsExistingMatchingCard(c52653092.cfilter,tp,LOCATION_HAND,0,1,nil) then - return true - end - local mg=Duel.GetMatchingGroup(c52653092.mfilter,tp,LOCATION_MZONE,0,nil,c) - return mg:IsExists(c52653092.xyzfilter1,1,nil,mg) -end -function c52653092.xyzop(e,tp,eg,ep,ev,re,r,rp,c,og) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - local ct=-ft - local mg=Duel.GetMatchingGroup(c52653092.mfilter,tp,LOCATION_MZONE,0,nil,c) - local b1=mg:IsExists(c52653092.xyzfilter1,1,nil,mg) - local b2=ct<1 and Duel.IsExistingMatchingCard(aux.XyzAlterFilter,tp,LOCATION_MZONE,0,1,nil,c52653092.ovfilter,c) - and Duel.IsExistingMatchingCard(c52653092.cfilter,tp,LOCATION_HAND,0,1,nil) - if b2 and (not b1 or Duel.SelectYesNo(tp,aux.Stringid(52653092,0))) then - Duel.DiscardHand(tp,c52653092.cfilter,1,1,REASON_COST+REASON_DISCARD,nil) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL) - local g=Duel.SelectMatchingCard(tp,aux.XyzAlterFilter,tp,LOCATION_MZONE,0,1,1,nil,c52653092.ovfilter,c) - local g2=g:GetFirst():GetOverlayGroup() - if g2:GetCount()~=0 then - Duel.Overlay(c,g2) - end - c:SetMaterial(g) - Duel.Overlay(c,g) - else - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL) - local g1=mg:FilterSelect(tp,c52653092.xyzfilter1,1,1,nil,mg) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL) - local g2=mg:FilterSelect(tp,c52653092.xyzfilter2,2,2,g1:GetFirst(),g1:GetFirst():GetRank()) - g1:Merge(g2) - local sg=Group.CreateGroup() - local tc=g1:GetFirst() - while tc do - sg:Merge(tc:GetOverlayGroup()) - tc=g1:GetNext() - end - Duel.SendtoGrave(sg,REASON_RULE) - c:SetMaterial(g1) - Duel.Overlay(c,g1) - end -end -function c52653092.effcon(e) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_XYZ -end -function c52653092.effcon2(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_XYZ -end -function c52653092.spsumsuc(e,tp,eg,ep,ev,re,r,rp) - Duel.SetChainLimitTillChainEnd(c52653092.chlimit) -end -function c52653092.chlimit(e,ep,tp) - return tp==ep -end -function c52653092.atkval(e,c) - return c:GetOverlayCount()*1000 -end -function c52653092.actcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp -end -function c52653092.actcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c52653092.actop(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EFFECT_CANNOT_ACTIVATE) - e1:SetTargetRange(0,1) - e1:SetValue(aux.TRUE) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) -end diff --git a/script/c52665542.lua b/script/c52665542.lua deleted file mode 100644 index 76da42fa38..0000000000 --- a/script/c52665542.lua +++ /dev/null @@ -1,97 +0,0 @@ ---ライトロードの神域 -function c52665542.initial_effect(c) - --activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --to hand - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(52665542,0)) - e2:SetCategory(CATEGORY_TOHAND) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCountLimit(1) - e2:SetRange(LOCATION_SZONE) - e2:SetCost(c52665542.cost) - e2:SetTarget(c52665542.target) - e2:SetOperation(c52665542.operation) - c:RegisterEffect(e2) - --add counter - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e3:SetCode(EVENT_TO_GRAVE) - e3:SetRange(LOCATION_SZONE) - e3:SetProperty(EFFECT_FLAG_DELAY) - e3:SetCondition(c52665542.accon) - e3:SetOperation(c52665542.acop) - c:RegisterEffect(e3) - --destroy replace - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e4:SetCode(EFFECT_DESTROY_REPLACE) - e4:SetRange(LOCATION_SZONE) - e4:SetTarget(c52665542.destg) - e4:SetValue(c52665542.value) - e4:SetOperation(c52665542.desop) - c:RegisterEffect(e4) -end -function c52665542.costfilter(c) - return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x38) and c:IsAbleToGraveAsCost() -end -function c52665542.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c52665542.costfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end - local g=Duel.GetFieldGroup(tp,LOCATION_HAND,0) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local sg=g:FilterSelect(tp,c52665542.costfilter,1,1,nil) - e:SetLabelObject(sg:GetFirst()) - Duel.SendtoGrave(sg,REASON_COST) -end -function c52665542.tgfilter(c) - return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x38) and c:IsAbleToHand() -end -function c52665542.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local cc=e:GetLabelObject() - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c52665542.tgfilter(chkc) and chkc~=cc end - if chk==0 then return Duel.IsExistingTarget(c52665542.tgfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local sg=Duel.SelectTarget(tp,c52665542.tgfilter,tp,LOCATION_GRAVE,0,1,1,cc) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,sg,1,0,0) -end -function c52665542.operation(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end -function c52665542.cfilter(c,tp) - return c:IsPreviousLocation(LOCATION_DECK) and c:GetPreviousControler()==tp -end -function c52665542.accon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c52665542.cfilter,1,nil,tp) -end -function c52665542.acop(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():AddCounter(0x5,1) -end -function c52665542.dfilter(c,tp) - return c:IsFaceup() and c:IsLocation(LOCATION_ONFIELD) - and c:IsSetCard(0x38) and c:IsControler(tp) and c:IsReason(REASON_EFFECT) -end -function c52665542.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local count=eg:FilterCount(c52665542.dfilter,nil,tp) - e:SetLabel(count) - return count>0 and Duel.IsCanRemoveCounter(tp,1,0,0x5,count*2,REASON_EFFECT) - end - return Duel.SelectYesNo(tp,aux.Stringid(52665542,1)) -end -function c52665542.value(e,c) - return c:IsFaceup() and c:IsLocation(LOCATION_ONFIELD) - and c:IsSetCard(0x38) and c:IsControler(e:GetHandlerPlayer()) and c:IsReason(REASON_EFFECT) -end -function c52665542.desop(e,tp,eg,ep,ev,re,r,rp) - local count=e:GetLabel() - Duel.RemoveCounter(tp,1,0,0x5,count*2,REASON_EFFECT) -end diff --git a/script/c52675689.lua b/script/c52675689.lua deleted file mode 100644 index 45a6b2eb3c..0000000000 --- a/script/c52675689.lua +++ /dev/null @@ -1,39 +0,0 @@ ---暗黒の眠りを誘うルシファー -function c52675689.initial_effect(c) - --atklimit - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(52675689,0)) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c52675689.target) - e1:SetOperation(c52675689.operation) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - c:RegisterEffect(e2) -end -function c52675689.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) end - if chk==0 then return Duel.IsExistingTarget(nil,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - Duel.SelectTarget(tp,nil,tp,0,LOCATION_MZONE,1,1,nil) -end -function c52675689.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and c:IsFaceup() and tc:IsRelateToEffect(e) then - c:SetCardTarget(tc) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_OWNER_RELATE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetCondition(c52675689.rcon) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1,true) - end -end -function c52675689.rcon(e) - return e:GetOwner():IsHasCardTarget(e:GetHandler()) -end diff --git a/script/c52684508.lua b/script/c52684508.lua deleted file mode 100644 index 4e19e5582a..0000000000 --- a/script/c52684508.lua +++ /dev/null @@ -1,43 +0,0 @@ ---黒炎弾 -function c52684508.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c52684508.cost) - e1:SetTarget(c52684508.target) - e1:SetOperation(c52684508.activate) - c:RegisterEffect(e1) - Duel.AddCustomActivityCounter(52684508,ACTIVITY_ATTACK,c52684508.counterfilter) -end -function c52684508.counterfilter(c) - return not c:IsCode(74677422) -end -function c52684508.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetCustomActivityCount(52684508,tp,ACTIVITY_ATTACK)==0 end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE) - e1:SetProperty(EFFECT_FLAG_OATH+EFFECT_FLAG_IGNORE_IMMUNE) - e1:SetTarget(aux.TargetBoolFunction(Card.IsCode,74677422)) - e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e1:SetReset(RESET_PHASE+RESET_END) - Duel.RegisterEffect(e1,tp) -end -function c52684508.filter(c) - return c:IsFaceup() and c:IsCode(74677422) -end -function c52684508.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c52684508.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c52684508.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - local g=Duel.SelectTarget(tp,c52684508.filter,tp,LOCATION_MZONE,0,1,1,nil) -end -function c52684508.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) then - Duel.Damage(1-tp,tc:GetBaseAttack(),REASON_EFFECT) - end -end diff --git a/script/c52687916.lua b/script/c52687916.lua deleted file mode 100644 index c62bd52439..0000000000 --- a/script/c52687916.lua +++ /dev/null @@ -1,47 +0,0 @@ ---氷結界の龍 トリシューラ -function c52687916.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),2) - c:EnableReviveLimit() - --remove - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(52687916,0)) - e1:SetCategory(CATEGORY_REMOVE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(c52687916.remcon) - e1:SetTarget(c52687916.remtg) - e1:SetOperation(c52687916.remop) - c:RegisterEffect(e1) -end -function c52687916.remcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_SYNCHRO -end -function c52687916.remtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,0x1e,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,0,0x1e) -end -function c52687916.remop(e,tp,eg,ep,ev,re,r,rp) - local g1=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,nil) - local g2=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,nil) - local g3=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_HAND,nil) - local sg=Group.CreateGroup() - if g1:GetCount()>0 and ((g2:GetCount()==0 and g3:GetCount()==0) or Duel.SelectYesNo(tp,aux.Stringid(52687916,1))) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local sg1=g1:Select(tp,1,1,nil) - Duel.HintSelection(sg1) - sg:Merge(sg1) - end - if g2:GetCount()>0 and ((sg:GetCount()==0 and g3:GetCount()==0) or Duel.SelectYesNo(tp,aux.Stringid(52687916,2))) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local sg2=g2:Select(tp,1,1,nil) - Duel.HintSelection(sg2) - sg:Merge(sg2) - end - if g3:GetCount()>0 and (sg:GetCount()==0 or Duel.SelectYesNo(tp,aux.Stringid(52687916,3))) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local sg3=g3:RandomSelect(tp,1) - sg:Merge(sg3) - end - Duel.Remove(sg,POS_FACEUP,REASON_EFFECT) -end diff --git a/script/c52702748.lua b/script/c52702748.lua deleted file mode 100644 index efcdf43508..0000000000 --- a/script/c52702748.lua +++ /dev/null @@ -1,48 +0,0 @@ ---異次元への案内人 -function c52702748.initial_effect(c) - --control - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(52702748,0)) - e1:SetCategory(CATEGORY_CONTROL) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c52702748.ctltg) - e1:SetOperation(c52702748.ctlop) - c:RegisterEffect(e1) - --remove - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(52702748,1)) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetCategory(CATEGORY_REMOVE) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_PHASE+PHASE_END) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetTarget(c52702748.rmtg) - e2:SetOperation(c52702748.rmop) - c:RegisterEffect(e2) -end -function c52702748.ctltg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_CONTROL,e:GetHandler(),1,0,0) -end -function c52702748.ctlop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) or c:IsFacedown() then return end - if not Duel.GetControl(c,1-tp) and not c:IsImmuneToEffect(e) and c:IsAbleToChangeControler() then - Duel.Destroy(c,REASON_EFFECT) - end -end -function c52702748.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and chkc:IsAbleToRemove(1-tp) end - if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,LOCATION_GRAVE,0,1,nil,1-tp) end - Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(1-tp,Card.IsAbleToRemove,tp,LOCATION_GRAVE,0,1,1,nil,1-tp) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) -end -function c52702748.rmop(e,tp,eg,ep,ev,re,r,rp,chk) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) - end -end diff --git a/script/c52709508.lua b/script/c52709508.lua deleted file mode 100644 index 01a761f8a1..0000000000 --- a/script/c52709508.lua +++ /dev/null @@ -1,123 +0,0 @@ ---A・ジェネクス・トライフォース -function c52709508.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0x2),aux.NonTuner(nil),1) - c:EnableReviveLimit() - --mat check - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_MATERIAL_CHECK) - e1:SetValue(c52709508.valcheck) - c:RegisterEffect(e1) - --synchro success - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetCondition(c52709508.regcon) - e2:SetOperation(c52709508.regop) - c:RegisterEffect(e2) - e2:SetLabelObject(e1) -end -function c52709508.valcheck(e,c) - local g=c:GetMaterial() - local att=0 - local tc=g:GetFirst() - while tc do - if not tc:IsType(TYPE_TUNER) then - att=bit.bor(att,tc:GetAttribute()) - end - tc=g:GetNext() - end - att=bit.band(att,0x15) - e:SetLabel(att) -end -function c52709508.regcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_SYNCHRO - and e:GetLabelObject():GetLabel()~=0 -end -function c52709508.regop(e,tp,eg,ep,ev,re,r,rp) - local att=e:GetLabelObject():GetLabel() - local c=e:GetHandler() - if bit.band(att,ATTRIBUTE_EARTH)~=0 then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetOperation(c52709508.atkop) - e1:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e1) - end - if bit.band(att,ATTRIBUTE_FIRE)~=0 then - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(52709508,0)) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_BATTLE_DESTROYING) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCondition(c52709508.damcon) - e1:SetTarget(c52709508.damtg) - e1:SetOperation(c52709508.damop) - e1:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e1) - end - if bit.band(att,ATTRIBUTE_LIGHT)~=0 then - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(52709508,1)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetTarget(c52709508.sptg) - e1:SetOperation(c52709508.spop) - e1:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e1) - end -end -function c52709508.atkop(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EFFECT_CANNOT_ACTIVATE) - e1:SetTargetRange(0,1) - e1:SetValue(c52709508.aclimit) - e1:SetReset(RESET_PHASE+PHASE_DAMAGE) - Duel.RegisterEffect(e1,tp) -end -function c52709508.aclimit(e,re,tp) - return re:IsHasType(EFFECT_TYPE_ACTIVATE) -end -function c52709508.damcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local t=Duel.GetAttackTarget() - if ev==1 then t=Duel.GetAttacker() end - e:SetLabel(t:GetAttack()) - return t:GetLocation()==LOCATION_GRAVE and t:IsType(TYPE_MONSTER) -end -function c52709508.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(e:GetLabel()) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,e:GetLabel()) -end -function c52709508.damop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end -function c52709508.spfilter(c,e,tp) - return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENCE) -end -function c52709508.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c52709508.spfilter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c52709508.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) - local g=Duel.SelectTarget(tp,c52709508.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c52709508.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEDOWN_DEFENCE) - Duel.ConfirmCards(1-tp,tc) - end -end diff --git a/script/c52738610.lua b/script/c52738610.lua deleted file mode 100644 index 21f43b207e..0000000000 --- a/script/c52738610.lua +++ /dev/null @@ -1,62 +0,0 @@ ---影霊衣の舞姫 -function c52738610.initial_effect(c) - --act limit - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_CHAINING) - e1:SetRange(LOCATION_MZONE) - e1:SetOperation(c52738610.chainop) - c:RegisterEffect(e1) - --cannot be target - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) - e2:SetRange(LOCATION_MZONE) - e2:SetTargetRange(LOCATION_MZONE,0) - e2:SetTarget(c52738610.tgtg) - e2:SetValue(aux.tgoval) - c:RegisterEffect(e2) - --tohand - local e3=Effect.CreateEffect(c) - e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_RELEASE) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e3:SetCountLimit(1,52738610) - e3:SetCondition(c52738610.thcon) - e3:SetTarget(c52738610.thtg) - e3:SetOperation(c52738610.thop) - c:RegisterEffect(e3) -end -function c52738610.chainop(e,tp,eg,ep,ev,re,r,rp) - local rc=re:GetHandler() - if re:IsHasType(EFFECT_TYPE_ACTIVATE) and rc:IsSetCard(0xb4) and re:IsActiveType(TYPE_RITUAL) then - Duel.SetChainLimit(c52738610.chainlm) - end -end -function c52738610.chainlm(e,rp,tp) - return tp==rp -end -function c52738610.tgtg(e,c) - return c:IsSetCard(0xb4) and c:IsType(TYPE_RITUAL) -end -function c52738610.thcon(e,tp,eg,ep,ev,re,r,rp) - return bit.band(r,REASON_EFFECT)~=0 -end -function c52738610.thfilter(c) - return c:IsFaceup() and c:IsSetCard(0xb4) and c:IsType(TYPE_MONSTER) and not c:IsCode(52738610) and c:IsAbleToHand() -end -function c52738610.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and c52738610.thfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c52738610.thfilter,tp,LOCATION_REMOVED,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c52738610.thfilter,tp,LOCATION_REMOVED,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c52738610.thop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end diff --git a/script/c52768103.lua b/script/c52768103.lua deleted file mode 100644 index 241c61a60b..0000000000 --- a/script/c52768103.lua +++ /dev/null @@ -1,30 +0,0 @@ ---KA-2 デス・シザース -function c52768103.initial_effect(c) - --damage - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(52768103,0)) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetCode(EVENT_BATTLE_DESTROYING) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCondition(c52768103.damcon) - e1:SetTarget(c52768103.damtg) - e1:SetOperation(c52768103.damop) - c:RegisterEffect(e1) -end -function c52768103.damcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local bc=c:GetBattleTarget() - return c:IsRelateToBattle() and bc:IsLocation(LOCATION_GRAVE) and bc:IsReason(REASON_BATTLE) and bc:IsType(TYPE_MONSTER) -end -function c52768103.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local bc=e:GetHandler():GetBattleTarget() - local dam=bc:GetLevel()*500 - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(dam) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,dam) -end -function c52768103.damop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c52786469.lua b/script/c52786469.lua deleted file mode 100644 index f9f0fcd8d5..0000000000 --- a/script/c52786469.lua +++ /dev/null @@ -1,31 +0,0 @@ ---ラヴァル・ウォリアー -function c52786469.initial_effect(c) - --damage - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(52786469,0)) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetCode(EVENT_BATTLE_DESTROYING) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCondition(c52786469.condition) - e1:SetTarget(c52786469.target) - e1:SetOperation(c52786469.operation) - c:RegisterEffect(e1) -end -function c52786469.condition(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local bc=c:GetBattleTarget() - e:SetLabel(bc:GetAttack()) - return c:IsRelateToBattle() and bc:IsType(TYPE_MONSTER) -end -function c52786469.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(e:GetLabel()) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,e:GetLabel()) -end -function c52786469.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetMatchingGroup(Card.IsSetCard,tp,LOCATION_GRAVE,0,nil,0x39):GetClassCount(Card.GetCode)<4 then return end - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c52817046.lua b/script/c52817046.lua deleted file mode 100644 index 29da2a89b3..0000000000 --- a/script/c52817046.lua +++ /dev/null @@ -1,33 +0,0 @@ ---記憶抹消 -function c52817046.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c52817046.condition) - e1:SetTarget(c52817046.target) - e1:SetOperation(c52817046.activate) - c:RegisterEffect(e1) -end -function c52817046.condition(e,tp,eg,ep,ev,re,r,rp,chk) - local ct=Duel.GetFieldGroupCount(tp,0,LOCATION_HAND) - return ct>0 and ct<=3 -end -function c52817046.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(1-tp) - and Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.SetTargetPlayer(1-tp) - Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_HAND) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c52817046.activate(e,tp,eg,ep,ev,re,r,rp) - local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) - local g=Duel.GetFieldGroup(p,LOCATION_HAND,0) - if g:GetCount()==0 then return end - Duel.SendtoDeck(g,nil,2,REASON_EFFECT) - Duel.ShuffleDeck(p) - Duel.BreakEffect() - Duel.Draw(p,g:GetCount(),REASON_EFFECT) -end diff --git a/script/c52823314.lua b/script/c52823314.lua deleted file mode 100644 index 360a3f34c6..0000000000 --- a/script/c52823314.lua +++ /dev/null @@ -1,29 +0,0 @@ ---魔界発現世行きバス -function c52823314.initial_effect(c) - --to deck - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(52823314,0)) - e1:SetCategory(CATEGORY_TODECK) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetTarget(c52823314.target) - e1:SetOperation(c52823314.operation) - c:RegisterEffect(e1) -end -function c52823314.filter(c) - return c:GetCode()~=52823314 and c:IsType(TYPE_MONSTER) and c:IsAbleToDeck() -end -function c52823314.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and c52823314.filter(chkc) end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectTarget(tp,c52823314.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0) -end -function c52823314.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.SendtoDeck(tc,nil,2,REASON_EFFECT) - end -end diff --git a/script/c52824910.lua b/script/c52824910.lua deleted file mode 100644 index 2e2227459b..0000000000 --- a/script/c52824910.lua +++ /dev/null @@ -1,39 +0,0 @@ ---カイザー・グライダー -function c52824910.initial_effect(c) - --indes - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e1:SetValue(c52824910.indes) - c:RegisterEffect(e1) - --to hand - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(52824910,0)) - e2:SetCategory(CATEGORY_TOHAND) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetCondition(c52824910.condition) - e2:SetTarget(c52824910.target) - e2:SetOperation(c52824910.operation) - c:RegisterEffect(e2) -end -function c52824910.indes(e,c) - return c:GetAttack()==e:GetHandler():GetAttack() -end -function c52824910.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsReason(REASON_DESTROY) -end -function c52824910.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsAbleToHand() end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g=Duel.SelectTarget(tp,Card.IsAbleToHand,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0) -end -function c52824910.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - end -end diff --git a/script/c52833089.lua b/script/c52833089.lua deleted file mode 100644 index 8ddb03c9f4..0000000000 --- a/script/c52833089.lua +++ /dev/null @@ -1,30 +0,0 @@ ---ブラック・サンダー -function c52833089.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetCondition(c52833089.condition) - e1:SetTarget(c52833089.target) - e1:SetOperation(c52833089.activate) - c:RegisterEffect(e1) -end -function c52833089.cfilter(c,tp) - return c:IsSetCard(0x33) and c:IsLocation(LOCATION_GRAVE) - and c:GetPreviousControler()==tp and bit.band(c:GetReason(),REASON_BATTLE)~=0 -end -function c52833089.condition(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c52833089.cfilter,1,nil,tp) -end -function c52833089.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD)>0 end - Duel.SetTargetPlayer(1-tp) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,400) -end -function c52833089.activate(e,tp,eg,ep,ev,re,r,rp) - local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) - local d=Duel.GetFieldGroupCount(p,LOCATION_ONFIELD,0)*400 - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c52840598.lua b/script/c52840598.lua deleted file mode 100644 index 6a53923ce3..0000000000 --- a/script/c52840598.lua +++ /dev/null @@ -1,33 +0,0 @@ ---ブライ・シンクロン -function c52840598.initial_effect(c) - --atk change - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_BE_MATERIAL) - e1:SetCondition(c52840598.con) - e1:SetOperation(c52840598.op) - c:RegisterEffect(e1) -end -function c52840598.con(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsLocation(LOCATION_GRAVE) and r==REASON_SYNCHRO -end -function c52840598.op(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local sync=c:GetReasonCard() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(600) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - sync:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - sync:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_DISABLE_EFFECT) - e3:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - sync:RegisterEffect(e3) -end diff --git a/script/c5284653.lua b/script/c5284653.lua deleted file mode 100644 index 1f2665c1de..0000000000 --- a/script/c5284653.lua +++ /dev/null @@ -1,32 +0,0 @@ ---ヴェルズ・オ・ウィスプ -function c5284653.initial_effect(c) - --Disable - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(5284653,0)) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_BATTLED) - e1:SetCondition(c5284653.condition) - e1:SetOperation(c5284653.operation) - c:RegisterEffect(e1) -end -function c5284653.condition(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local a=Duel.GetAttacker() - if a==c then a=Duel.GetAttackTarget() end - e:SetLabelObject(a) - return a and a:IsType(TYPE_EFFECT) and a:IsRelateToBattle() -end -function c5284653.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetLabelObject() - if tc:IsFacedown() or not tc:IsRelateToBattle() then return end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0x57a0000) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+0x57a0000) - tc:RegisterEffect(e2) -end diff --git a/script/c52846880.lua b/script/c52846880.lua deleted file mode 100644 index 98477acdd4..0000000000 --- a/script/c52846880.lua +++ /dev/null @@ -1,79 +0,0 @@ ---カタストルの影霊衣 -function c52846880.initial_effect(c) - c:EnableReviveLimit() - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(aux.ritlimit) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(52846880,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_HAND) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCountLimit(1,52846880) - e2:SetCost(c52846880.spcost) - e2:SetTarget(c52846880.sptg) - e2:SetOperation(c52846880.spop) - c:RegisterEffect(e2) - --destroy - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(52846880,1)) - e3:SetCategory(CATEGORY_DESTROY) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e3:SetCode(EVENT_BATTLE_START) - e3:SetRange(LOCATION_MZONE) - e3:SetCondition(c52846880.condition) - e3:SetTarget(c52846880.target) - e3:SetOperation(c52846880.operation) - c:RegisterEffect(e3) -end -function c52846880.mat_filter(c) - return not c:IsCode(52846880) -end -function c52846880.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsDiscardable() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD) -end -function c52846880.spfilter(c,e,tp) - return c:IsSetCard(0xb4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c52846880.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c52846880.spfilter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c52846880.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c52846880.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c52846880.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end -function c52846880.condition(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetAttacker() - local bc=Duel.GetAttackTarget() - if not bc then return false end - if tc:IsControler(1-tp) then tc,bc=bc,tc end - if tc:IsSetCard(0xb4) and bc:GetSummonLocation()==LOCATION_EXTRA then - e:SetLabelObject(bc) - return true - else return false end -end -function c52846880.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local bc=e:GetLabelObject() - Duel.SetOperationInfo(0,CATEGORY_DESTROY,bc,1,0,0) -end -function c52846880.operation(e,tp,eg,ep,ev,re,r,rp) - local bc=e:GetLabelObject() - if bc:IsRelateToBattle() then - Duel.Destroy(bc,REASON_EFFECT) - end -end diff --git a/script/c5285665.lua b/script/c5285665.lua deleted file mode 100644 index 7424510e57..0000000000 --- a/script/c5285665.lua +++ /dev/null @@ -1,65 +0,0 @@ ---E・HERO バブルマン・ネオ -function c5285665.initial_effect(c) - c:EnableReviveLimit() - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_SPSUMMON_PROC) - e2:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e2:SetRange(LOCATION_HAND) - e2:SetCondition(c5285665.spcon) - e2:SetOperation(c5285665.spop) - c:RegisterEffect(e2) - --change code - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e3:SetRange(LOCATION_MZONE) - e3:SetCode(EFFECT_CHANGE_CODE) - e3:SetValue(79979666) - c:RegisterEffect(e3) - --destroy - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(5285665,0)) - e4:SetCategory(CATEGORY_DESTROY) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e4:SetCode(EVENT_DAMAGE_STEP_END) - e4:SetTarget(c5285665.destg) - e4:SetOperation(c5285665.desop) - c:RegisterEffect(e4) -end -function c5285665.spfilter(c,code) - return c:IsCode(code) and c:IsAbleToGraveAsCost() -end -function c5285665.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsExistingMatchingCard(c5285665.spfilter,tp,LOCATION_MZONE,0,1,nil,79979666) - and Duel.IsExistingMatchingCard(c5285665.spfilter,tp,LOCATION_HAND,0,1,nil,46411259) -end -function c5285665.spop(e,tp,eg,ep,ev,re,r,rp,c) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g1=Duel.SelectMatchingCard(tp,c5285665.spfilter,tp,LOCATION_MZONE,0,1,1,nil,79979666) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g2=Duel.SelectMatchingCard(tp,c5285665.spfilter,tp,LOCATION_HAND,0,1,1,nil,46411259) - g1:Merge(g2) - Duel.SendtoGrave(g1,REASON_COST) -end -function c5285665.destg(e,tp,eg,ep,ev,re,r,rp,chk) - local bc=e:GetHandler():GetBattleTarget() - if chk==0 then return bc and bc:IsRelateToBattle() end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,bc,1,0,0) -end -function c5285665.desop(e,tp,eg,ep,ev,re,r,rp) - local bc=e:GetHandler():GetBattleTarget() - if bc:IsRelateToBattle() then - Duel.Destroy(bc,REASON_EFFECT) - end -end diff --git a/script/c52860176.lua b/script/c52860176.lua deleted file mode 100644 index a53b923c27..0000000000 --- a/script/c52860176.lua +++ /dev/null @@ -1,36 +0,0 @@ ---憑依するブラッド・ソウル -function c52860176.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(52860176,0)) - e1:SetCategory(CATEGORY_CONTROL) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c52860176.cost) - e1:SetTarget(c52860176.target) - e1:SetOperation(c52860176.operation) - c:RegisterEffect(e1) -end -function c52860176.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end -function c52860176.filter(c) - return c:IsFaceup() and c:IsLevelBelow(3) and c:IsControlerCanBeChanged() -end -function c52860176.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsExistingMatchingCard(c52860176.filter,tp,0,LOCATION_MZONE,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_CONTROL,nil,1,1-tp,LOCATION_MZONE) -end -function c52860176.operation(e,tp,eg,ep,ev,re,r,rp) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - local c=e:GetHandler() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) - local g=Duel.SelectMatchingCard(tp,c52860176.filter,tp,0,LOCATION_MZONE,ft,ft,nil) - local tc=g:GetFirst() - while tc do - Duel.GetControl(tc,tp) - tc=g:GetNext() - end -end diff --git a/script/c52869807.lua b/script/c52869807.lua deleted file mode 100644 index 29132efde5..0000000000 --- a/script/c52869807.lua +++ /dev/null @@ -1,34 +0,0 @@ ---BF-逆風のガスト -function c52869807.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c52869807.spcon) - c:RegisterEffect(e1) - --atk down - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_DAMAGE_CALCULATING) - e2:SetRange(LOCATION_MZONE) - e2:SetOperation(c52869807.atkup) - c:RegisterEffect(e2) -end -function c52869807.spcon(e,c) - if c==nil then return true end - return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and - Duel.GetFieldGroupCount(c:GetControler(),LOCATION_ONFIELD,0)==0 -end -function c52869807.atkup(e,tp,eg,ep,ev,re,r,rp,chk) - local a=Duel.GetAttacker() - local d=Duel.GetAttackTarget() - if not d or not d:IsSetCard(0x33) or d:IsControler(1-tp) then return end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_PHASE+RESET_DAMAGE_CAL) - e1:SetValue(-300) - a:RegisterEffect(e1) -end diff --git a/script/c52875873.lua b/script/c52875873.lua deleted file mode 100644 index 0d434fcd0d..0000000000 --- a/script/c52875873.lua +++ /dev/null @@ -1,58 +0,0 @@ ---エヴォリューション・バースト -function c52875873.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c52875873.condition) - e1:SetCost(c52875873.cost) - e1:SetTarget(c52875873.target) - e1:SetOperation(c52875873.activate) - c:RegisterEffect(e1) - if not c52875873.global_check then - c52875873.global_check=true - local ge1=Effect.CreateEffect(c) - ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - ge1:SetCode(EVENT_ATTACK_ANNOUNCE) - ge1:SetOperation(c52875873.checkop) - Duel.RegisterEffect(ge1,0) - end -end -function c52875873.checkop(e,tp,eg,ep,ev,re,r,rp) - local tc=eg:GetFirst() - if tc:IsCode(70095154) then - Duel.RegisterFlagEffect(tc:GetControler(),52875873,RESET_PHASE+PHASE_END,0,1) - end -end -function c52875873.cfilter(c) - return c:IsFaceup() and c:IsCode(70095154) -end -function c52875873.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c52875873.cfilter,tp,LOCATION_ONFIELD,0,1,nil) -end -function c52875873.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetFlagEffect(tp,52875873)==0 end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE) - e1:SetProperty(EFFECT_FLAG_OATH) - e1:SetTarget(aux.TargetBoolFunction(Card.IsCode,70095154)) - e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e1:SetReset(RESET_PHASE+RESET_END) - Duel.RegisterEffect(e1,tp) -end -function c52875873.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and chkc:IsDestructable() end - if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,0,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,0,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c52875873.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c5288597.lua b/script/c5288597.lua deleted file mode 100644 index 907a32ba46..0000000000 --- a/script/c5288597.lua +++ /dev/null @@ -1,54 +0,0 @@ ---トランスターン -function c5288597.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetLabel(0) - e1:SetCountLimit(1,5288597) - e1:SetCost(c5288597.cost) - e1:SetTarget(c5288597.target) - e1:SetOperation(c5288597.activate) - c:RegisterEffect(e1) -end -function c5288597.cost(e,tp,eg,ep,ev,re,r,rp,chk) - e:SetLabel(100) - if chk==0 then return true end -end -function c5288597.cfilter(c,e,tp) - local lv=c:GetOriginalLevel() - local rc=nil - if Duel.IsEnvironment(4064256) then rc=RACE_ZOMBIE - else rc=c:GetOriginalRace() end - return bit.band(c:GetOriginalType(),TYPE_MONSTER)~=0 and lv>0 and c:IsFaceup() and c:IsAbleToGraveAsCost() - and Duel.IsExistingMatchingCard(c5288597.spfilter,tp,LOCATION_DECK,0,1,nil,lv+1,rc,c:GetOriginalAttribute(),e,tp) -end -function c5288597.spfilter(c,lv,rc,att,e,tp) - return c:GetLevel()==lv and c:IsRace(rc) and c:IsAttribute(att) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c5288597.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - if e:GetLabel()~=100 then return false end - e:SetLabel(0) - return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsExistingMatchingCard(c5288597.cfilter,tp,LOCATION_MZONE,0,1,nil,e,tp) - end - e:SetLabel(0) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c5288597.cfilter,tp,LOCATION_MZONE,0,1,1,nil,e,tp) - local tc=g:GetFirst() - Duel.SendtoGrave(tc,REASON_COST) - Duel.SetTargetCard(tc) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c5288597.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local tc=Duel.GetFirstTarget() - if not tc:IsRelateToEffect(e) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c5288597.spfilter,tp,LOCATION_DECK,0,1,1,nil,tc:GetLevel()+1,tc:GetRace(),tc:GetAttribute(),e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c52900379.lua b/script/c52900379.lua deleted file mode 100644 index f941659842..0000000000 --- a/script/c52900379.lua +++ /dev/null @@ -1,68 +0,0 @@ ---BF-追い風のアリゼ -function c52900379.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c52900379.spcon) - c:RegisterEffect(e1) - --damage - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(52900379,0)) - e2:SetCategory(CATEGORY_RECOVER) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetCode(EVENT_BE_MATERIAL) - e2:SetCondition(c52900379.reccon) - e2:SetTarget(c52900379.rectg) - e2:SetOperation(c52900379.recop) - c:RegisterEffect(e2) - if not c52900379.global_check then - c52900379.global_check=true - c52900379[0]=0 - c52900379[1]=0 - local ge1=Effect.CreateEffect(c) - ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - ge1:SetCode(EVENT_DESTROY) - ge1:SetOperation(c52900379.checkop) - Duel.RegisterEffect(ge1,0) - local ge2=Effect.CreateEffect(c) - ge2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - ge2:SetCode(EVENT_PHASE_START+PHASE_DRAW) - ge2:SetOperation(c52900379.clear) - Duel.RegisterEffect(ge2,0) - end -end -function c52900379.spcon(e,c) - if c==nil then return true end - return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and c52900379[c:GetControler()]>=2 -end -function c52900379.checkop(e,tp,eg,ep,ev,re,r,rp) - local tc=eg:GetFirst() - while tc do - local pos=tc:GetPosition() - if tc:IsLocation(LOCATION_MZONE) and tc:IsSetCard(0x33) and bit.band(pos,POS_FACEUP)~=0 then - c52900379[tc:GetControler()]=c52900379[tc:GetControler()]+1 - end - tc=eg:GetNext() - end -end -function c52900379.clear(e,tp,eg,ep,ev,re,r,rp) - c52900379[0]=0 - c52900379[1]=0 -end -function c52900379.reccon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsLocation(LOCATION_GRAVE) and r==REASON_SYNCHRO -end -function c52900379.rectg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(600) - Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,600) -end -function c52900379.recop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Recover(p,d,REASON_EFFECT) -end diff --git a/script/c52913738.lua b/script/c52913738.lua deleted file mode 100644 index 8ce283cf25..0000000000 --- a/script/c52913738.lua +++ /dev/null @@ -1,49 +0,0 @@ ---破滅の儀式 -function c52913738.initial_effect(c) - aux.AddRitualProcGreater(c,aux.FilterBoolFunction(Card.IsCode,30646525)) - --To Deck - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(52913738,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_GRAVE) - e1:SetCondition(c52913738.regcon) - e1:SetCost(c52913738.regcost) - e1:SetOperation(c52913738.regop) - c:RegisterEffect(e1) -end -function c52913738.regcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()==PHASE_MAIN1 -end -function c52913738.regcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) -end -function c52913738.regop(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_BATTLED) - e1:SetOperation(c52913738.tdop) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function c52913738.tdop(e,tp,eg,ep,ev,re,r,rp) - local a=Duel.GetAttacker() - local d=Duel.GetAttackTarget() - if d and a:IsType(TYPE_RITUAL) and d:IsStatus(STATUS_BATTLE_DESTROYED) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetCode(EFFECT_SEND_REPLACE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetTarget(c52913738.reptg) - e1:SetOperation(c52913738.repop) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_DAMAGE) - d:RegisterEffect(e1) - end -end -function c52913738.reptg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:GetDestination()==LOCATION_GRAVE and c:IsReason(REASON_BATTLE) end - return true -end -function c52913738.repop(e,tp,eg,ep,ev,re,r,rp) - Duel.SendtoDeck(e:GetHandler(),nil,0,REASON_EFFECT) -end diff --git a/script/c5291803.lua b/script/c5291803.lua deleted file mode 100644 index 585a3d4876..0000000000 --- a/script/c5291803.lua +++ /dev/null @@ -1,21 +0,0 @@ ---先史遺産トゥーラ・ガーディアン -function c5291803.initial_effect(c) - c:SetUniqueOnField(1,0,5291803) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c5291803.spcon) - c:RegisterEffect(e1) -end -function c5291803.cfilter(tc) - return tc and tc:IsFaceup() -end -function c5291803.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and (c5291803.cfilter(Duel.GetFieldCard(tp,LOCATION_SZONE,5)) or c5291803.cfilter(Duel.GetFieldCard(1-tp,LOCATION_SZONE,5))) -end diff --git a/script/c52963531.lua b/script/c52963531.lua deleted file mode 100644 index ba5e906233..0000000000 --- a/script/c52963531.lua +++ /dev/null @@ -1,120 +0,0 @@ ---EMマンモスプラッシュ -function c52963531.initial_effect(c) - --pendulum summon - aux.AddPendulumProcedure(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetRange(LOCATION_PZONE) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetCountLimit(1) - e2:SetCondition(c52963531.spcon) - e2:SetTarget(c52963531.sptg) - e2:SetOperation(c52963531.spop) - c:RegisterEffect(e2) - --spsummon - local e3=Effect.CreateEffect(c) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1,52963531+EFFECT_COUNT_CODE_DUEL) - e3:SetTarget(c52963531.target) - e3:SetOperation(c52963531.operation) - c:RegisterEffect(e3) -end -function c52963531.cfilter(c,tp) - return c:IsFaceup() and c:IsType(TYPE_FUSION) and c:IsControler(tp) -end -function c52963531.spcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c52963531.cfilter,1,nil,tp) -end -function c52963531.spfilter(c,e,tp) - return c:IsFaceup() and c:IsSetCard(0x99) and c:IsType(TYPE_PENDULUM) - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c52963531.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c52963531.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function c52963531.spop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) or Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c52963531.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end -function c52963531.filter1(c,e) - return c:IsCanBeFusionMaterial() and not c:IsImmuneToEffect(e) -end -function c52963531.filter2(c,e,tp,m,f,chkf) - return c:IsType(TYPE_FUSION) and c:IsRace(RACE_DRAGON) and (not f or f(c)) - and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf) -end -function c52963531.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp - local mg1=Duel.GetMatchingGroup(Card.IsCanBeFusionMaterial,tp,LOCATION_MZONE,0,nil) - local res=Duel.IsExistingMatchingCard(c52963531.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf) - if not res then - local ce=Duel.GetChainMaterial(tp) - if ce~=nil then - local fgroup=ce:GetTarget() - local mg2=fgroup(ce,e,tp) - local mf=ce:GetValue() - res=Duel.IsExistingMatchingCard(c52963531.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,chkf) - end - end - return res - end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function c52963531.operation(e,tp,eg,ep,ev,re,r,rp) - local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp - local mg1=Duel.GetMatchingGroup(c52963531.filter1,tp,LOCATION_MZONE,0,nil,e) - local sg1=Duel.GetMatchingGroup(c52963531.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf) - local mg2=nil - local sg2=nil - local ce=Duel.GetChainMaterial(tp) - if ce~=nil then - local fgroup=ce:GetTarget() - mg2=fgroup(ce,e,tp) - local mf=ce:GetValue() - sg2=Duel.GetMatchingGroup(c52963531.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,mf,chkf) - end - if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then - local sg=sg1:Clone() - if sg2 then sg:Merge(sg2) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local tg=sg:Select(tp,1,1,nil) - local tc=tg:GetFirst() - if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then - local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf) - tc:SetMaterial(mat1) - Duel.SendtoGrave(mat1,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION) - Duel.BreakEffect() - Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP) - else - local mat2=Duel.SelectFusionMaterial(tp,tc,mg2,nil,chkf) - local fop=ce:GetOperation() - fop(ce,e,tp,tc,mat2) - end - tc:CompleteProcedure() - else - local cg1=Duel.GetFieldGroup(tp,LOCATION_MZONE,0) - local cg2=Duel.GetFieldGroup(tp,LOCATION_EXTRA,0) - if cg1:GetCount()>1 and cg2:IsExists(Card.IsFacedown,1,nil) - and Duel.IsPlayerCanSpecialSummon(tp) and not Duel.IsPlayerAffectedByEffect(tp,27581098) then - Duel.ConfirmCards(1-tp,cg1) - Duel.ConfirmCards(1-tp,cg2) - Duel.ShuffleHand(tp) - end - end -end diff --git a/script/c52971673.lua b/script/c52971673.lua deleted file mode 100644 index e37f78d594..0000000000 --- a/script/c52971673.lua +++ /dev/null @@ -1,36 +0,0 @@ ---トークン復活祭 -function c52971673.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c52971673.target) - e1:SetOperation(c52971673.activate) - c:RegisterEffect(e1) -end -function c52971673.cfilter(c) - return c:IsType(TYPE_TOKEN) and c:IsDestructable() -end -function c52971673.dfilter(c) - return not c:IsType(TYPE_TOKEN) and c:IsDestructable() -end -function c52971673.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c52971673.cfilter,tp,LOCATION_MZONE,0,1,nil) - and Duel.IsExistingMatchingCard(c52971673.dfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end - local g=Duel.GetMatchingGroup(c52971673.cfilter,tp,LOCATION_MZONE,0,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c52971673.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c52971673.cfilter,tp,LOCATION_MZONE,0,nil) - local dt=Duel.Destroy(g,REASON_EFFECT) - if dt==0 then return end - local dg=Duel.GetMatchingGroup(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler()) - if dg:GetCount()>0 then - Duel.BreakEffect() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local sg=dg:Select(tp,1,dt,nil) - Duel.HintSelection(sg) - Duel.Destroy(sg,REASON_EFFECT) - end -end diff --git a/script/c52971944.lua b/script/c52971944.lua deleted file mode 100644 index 6d08f98478..0000000000 --- a/script/c52971944.lua +++ /dev/null @@ -1,63 +0,0 @@ ---火遁封印式 -function c52971944.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_END_PHASE) - e1:SetTarget(c52971944.target1) - e1:SetOperation(c52971944.operation) - c:RegisterEffect(e1) - --remove - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(52971944,1)) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetRange(LOCATION_SZONE) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetHintTiming(0,TIMING_END_PHASE) - e2:SetCost(c52971944.cost2) - e2:SetTarget(c52971944.target2) - e2:SetOperation(c52971944.operation) - c:RegisterEffect(e2) -end -function c52971944.cfilter(c) - return c:IsAttribute(ATTRIBUTE_FIRE) and c:IsAbleToRemoveAsCost() -end -function c52971944.target1(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(1-tp) and chkc:IsAbleToRemove() end - if chk==0 then return true end - if Duel.IsExistingMatchingCard(c52971944.cfilter,tp,LOCATION_GRAVE,0,1,nil) - and Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(52971944,0)) then - e:SetProperty(EFFECT_FLAG_CARD_TARGET) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local cg=Duel.SelectMatchingCard(tp,c52971944.cfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.Remove(cg,POS_FACEUP,REASON_COST) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) - e:GetHandler():RegisterFlagEffect(52971944,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) - else e:SetProperty(0) end -end -function c52971944.cost2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c52971944.cfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local cg=Duel.SelectMatchingCard(tp,c52971944.cfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.Remove(cg,POS_FACEUP,REASON_COST) -end -function c52971944.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(1-tp) and chkc:IsAbleToRemove() end - if chk==0 then return e:GetHandler():GetFlagEffect(52971944)==0 - and Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) - e:GetHandler():RegisterFlagEffect(52971944,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) -end -function c52971944.operation(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) - end -end diff --git a/script/c52977572.lua b/script/c52977572.lua deleted file mode 100644 index 120de374a0..0000000000 --- a/script/c52977572.lua +++ /dev/null @@ -1,66 +0,0 @@ ---ドラグニティ-ピルム -function c52977572.initial_effect(c) - --equip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(52977572,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c52977572.sptg) - e1:SetOperation(c52977572.spop) - c:RegisterEffect(e1) - --direct attack - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_DIRECT_ATTACK) - c:RegisterEffect(e2) - --damage reduce - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e3:SetRange(LOCATION_SZONE) - e3:SetCode(EVENT_PRE_BATTLE_DAMAGE) - e3:SetCondition(c52977572.rdcon) - e3:SetOperation(c52977572.rdop) - c:RegisterEffect(e3) -end -function c52977572.filter(c,e,tp) - return c:IsSetCard(0x29) and c:IsRace(RACE_WINDBEAST) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c52977572.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingMatchingCard(c52977572.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c52977572.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c52977572.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - local tc=g:GetFirst() - if not tc then return end - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - local c=e:GetHandler() - if c:IsFacedown() or not c:IsRelateToEffect(e) or c:IsControler(1-tp) - or Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end - Duel.BreakEffect() - if not Duel.Equip(tp,c,tc,false) then return end - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(c52977572.eqlimit) - e1:SetLabelObject(tc) - c:RegisterEffect(e1) -end -function c52977572.eqlimit(e,c) - return e:GetLabelObject()==c -end -function c52977572.rdcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler():GetEquipTarget() - return ep~=tp and c==Duel.GetAttacker() and Duel.GetAttackTarget()==nil - and c:GetEffectCount(EFFECT_DIRECT_ATTACK)<2 and Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0 -end -function c52977572.rdop(e,tp,eg,ep,ev,re,r,rp) - Duel.ChangeBattleDamage(ep,ev/2) -end diff --git a/script/c53025096.lua b/script/c53025096.lua deleted file mode 100644 index b6f6bb4397..0000000000 --- a/script/c53025096.lua +++ /dev/null @@ -1,31 +0,0 @@ ---オッドアイズ・ドラゴン -function c53025096.initial_effect(c) - --damage - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(53025096,0)) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_BATTLE_DESTROYING) - e1:SetCondition(c53025096.damcon) - e1:SetTarget(c53025096.damtg) - e1:SetOperation(c53025096.damop) - c:RegisterEffect(e1) -end -function c53025096.damcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local bc=c:GetBattleTarget() - return c:IsRelateToBattle() and bc:IsLocation(LOCATION_GRAVE) and bc:IsType(TYPE_MONSTER) -end -function c53025096.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local dam=e:GetHandler():GetBattleTarget():GetAttack()/2 - if dam<0 then dam=0 end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(dam) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,dam) -end -function c53025096.damop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c53027855.lua b/script/c53027855.lua deleted file mode 100644 index c5bd993b83..0000000000 --- a/script/c53027855.lua +++ /dev/null @@ -1,71 +0,0 @@ ---風霊神ウィンドローズ -function c53027855.initial_effect(c) - c:EnableReviveLimit() - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_SPSUMMON_PROC) - e2:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e2:SetRange(LOCATION_HAND) - e2:SetCondition(c53027855.spcon) - c:RegisterEffect(e2) - --destroy - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(53027855,0)) - e3:SetCategory(CATEGORY_DESTROY) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - e3:SetCountLimit(1,53027855) - e3:SetTarget(c53027855.destg) - e3:SetOperation(c53027855.desop) - c:RegisterEffect(e3) - --leave - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e4:SetCode(EVENT_LEAVE_FIELD_P) - e4:SetOperation(c53027855.leaveop) - c:RegisterEffect(e4) -end -function c53027855.spcon(e,c) - if c==nil then return true end - return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and - Duel.GetMatchingGroupCount(Card.IsAttribute,c:GetControler(),LOCATION_GRAVE,0,nil,ATTRIBUTE_WIND)==5 -end -function c53027855.desfilter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable() -end -function c53027855.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local g=Duel.GetMatchingGroup(c53027855.desfilter,tp,0,LOCATION_ONFIELD,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c53027855.desop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c53027855.desfilter,tp,0,LOCATION_ONFIELD,nil) - Duel.Destroy(g,REASON_EFFECT) -end -function c53027855.leaveop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsFacedown() then return end - local effp=e:GetHandler():GetControler() - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SKIP_BP) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetTargetRange(1,0) - if Duel.GetTurnPlayer()==effp then - e1:SetLabel(Duel.GetTurnCount()) - e1:SetCondition(c53027855.skipcon) - e1:SetReset(RESET_PHASE+PHASE_END+RESET_SELF_TURN,2) - else - e1:SetReset(RESET_PHASE+PHASE_END+RESET_SELF_TURN,1) - end - Duel.RegisterEffect(e1,effp) -end -function c53027855.skipcon(e) - return Duel.GetTurnCount()~=e:GetLabel() -end diff --git a/script/c53039326.lua b/script/c53039326.lua deleted file mode 100644 index 08e5283f99..0000000000 --- a/script/c53039326.lua +++ /dev/null @@ -1,91 +0,0 @@ ---鋼核合成獣研究所 -function c53039326.initial_effect(c) - --activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --maintain - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e2:SetCode(EVENT_PHASE+PHASE_END) - e2:SetRange(LOCATION_SZONE) - e2:SetCountLimit(1) - e2:SetCondition(c53039326.mtcon) - e2:SetOperation(c53039326.mtop) - c:RegisterEffect(e2) - --search - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e3:SetCode(EVENT_DESTROY) - e3:SetRange(LOCATION_SZONE) - e3:SetOperation(c53039326.check) - c:RegisterEffect(e3) - local e4=Effect.CreateEffect(c) - e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e4:SetDescription(aux.Stringid(53039326,2)) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_EVENT_PLAYER) - e4:SetCode(53039326) - e4:SetTarget(c53039326.target) - e4:SetOperation(c53039326.operation) - c:RegisterEffect(e4) -end -function c53039326.cfilter(c) - return c:IsCode(36623431) and not c:IsPublic() -end -function c53039326.mtcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c53039326.mtop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c53039326.cfilter,tp,LOCATION_HAND,0,nil) - local sel=1 - if g:GetCount()~=0 then - sel=Duel.SelectOption(tp,aux.Stringid(53039326,0),aux.Stringid(53039326,1)) - else - sel=Duel.SelectOption(tp,aux.Stringid(53039326,1))+1 - end - if sel==0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) - local cg=g:Select(tp,1,1,nil) - Duel.ConfirmCards(1-tp,cg) - Duel.ShuffleHand(tp) - else - Duel.Destroy(e:GetHandler(),REASON_RULE) - end -end -function c53039326.check(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if Duel.GetCurrentPhase()~=PHASE_END then return end - local tc=eg:GetFirst() - local turnp=Duel.GetTurnPlayer() - local b1=false - local b2=false - while tc do - if tc:IsFaceup() and tc:IsLocation(LOCATION_MZONE) and tc:IsSetCard(0x1d) then - if tc:GetOwner()==turnp then b1=true else b2=true end - end - tc=eg:GetNext() - end - if b1 then Duel.RaiseSingleEvent(c,53039326,e,r,rp,turnp,0) end - if b2 then Duel.RaiseSingleEvent(c,53039326,e,r,rp,1-turnp,0) end -end -function c53039326.filter(c) - return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x1d) and c:IsAbleToHand() -end -function c53039326.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsRelateToEffect(e) - and Duel.IsExistingMatchingCard(c53039326.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c53039326.operation(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c53039326.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c53046408.lua b/script/c53046408.lua deleted file mode 100644 index c503bbb0e1..0000000000 --- a/script/c53046408.lua +++ /dev/null @@ -1,33 +0,0 @@ ---非常食 -function c53046408.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_RECOVER) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c53046408.cost) - e1:SetTarget(c53046408.target) - e1:SetOperation(c53046408.activate) - c:RegisterEffect(e1) -end -function c53046408.costfilter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToGraveAsCost() -end -function c53046408.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c53046408.costfilter,tp,LOCATION_ONFIELD,0,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c53046408.costfilter,tp,LOCATION_ONFIELD,0,1,5,e:GetHandler()) - Duel.SendtoGrave(g,REASON_COST) - e:SetLabel(g:GetCount()) -end -function c53046408.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local ct=e:GetLabel() - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(ct*1000) - Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,ct*1000) -end -function c53046408.activate(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Recover(p,d,REASON_EFFECT) -end diff --git a/script/c53054833.lua b/script/c53054833.lua deleted file mode 100644 index d819eb37d1..0000000000 --- a/script/c53054833.lua +++ /dev/null @@ -1,30 +0,0 @@ ---SRダブルヨーヨー -function c53054833.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(53054833,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c53054833.target) - e1:SetOperation(c53054833.operation) - c:RegisterEffect(e1) -end -function c53054833.filter(c,e,tp) - return c:IsLevelBelow(3) and c:IsSetCard(0x2016) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c53054833.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c53054833.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c53054833.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c53054833.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c53054833.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c53063039.lua b/script/c53063039.lua deleted file mode 100644 index dd2de3e37e..0000000000 --- a/script/c53063039.lua +++ /dev/null @@ -1,33 +0,0 @@ ---Sin Claw Stream -function c53063039.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,0x1e0) - e1:SetCondition(c53063039.condition) - e1:SetTarget(c53063039.target) - e1:SetOperation(c53063039.activate) - c:RegisterEffect(e1) -end -function c53063039.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x23) -end -function c53063039.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c53063039.cfilter,tp,LOCATION_MZONE,0,1,nil) -end -function c53063039.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsDestructable() end - if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c53063039.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c53090623.lua b/script/c53090623.lua deleted file mode 100644 index b9a40e756a..0000000000 --- a/script/c53090623.lua +++ /dev/null @@ -1,68 +0,0 @@ ---黄血鬼 -function c53090623.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(53090623,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetRange(LOCATION_HAND) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(c53090623.condition) - e1:SetTarget(c53090623.target) - e1:SetOperation(c53090623.operation) - c:RegisterEffect(e1) - --rankdown - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(53090623,1)) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetCountLimit(1) - e2:SetRange(LOCATION_MZONE) - e2:SetCost(c53090623.rdcost) - e2:SetTarget(c53090623.rdtg) - e2:SetOperation(c53090623.rdop) - c:RegisterEffect(e2) -end -function c53090623.condition(e,tp,eg,ep,ev,re,r,rp) - local c=eg:GetFirst() - return eg:GetCount()==1 and c:IsControler(tp) and c:GetSummonType()==SUMMON_TYPE_XYZ -end -function c53090623.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c53090623.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) - end -end -function c53090623.rdcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckRemoveOverlayCard(tp,1,0,1,REASON_COST) end - Duel.RemoveOverlayCard(tp,1,0,1,1,REASON_COST) -end -function c53090623.filter(c) - return c:IsFaceup() and c:GetRank()>1 -end -function c53090623.rdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c53090623.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c53090623.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - Duel.SelectTarget(tp,c53090623.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) -end -function c53090623.rdop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(-300) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_UPDATE_RANK) - e2:SetValue(-1) - tc:RegisterEffect(e2) - end -end diff --git a/script/c5309481.lua b/script/c5309481.lua deleted file mode 100644 index 89431400c5..0000000000 --- a/script/c5309481.lua +++ /dev/null @@ -1,33 +0,0 @@ ---蘇りし魔王 ハ・デス -function c5309481.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsCode,33420078),aux.NonTuner(Card.IsRace,RACE_ZOMBIE),1) - c:EnableReviveLimit() - --Disable - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_BATTLED) - e1:SetRange(LOCATION_MZONE) - e1:SetOperation(c5309481.operation) - c:RegisterEffect(e1) -end -function c5309481.operation(e,tp,eg,ep,ev,re,r,rp) - local a=Duel.GetAttacker() - local d=Duel.GetAttackTarget() - local p=e:GetHandler():GetControler() - if d==nil then return end - local tc=nil - if a:GetControler()==p and a:IsRace(RACE_ZOMBIE) and d:IsStatus(STATUS_BATTLE_DESTROYED) then tc=d - elseif d:GetControler()==p and d:IsRace(RACE_ZOMBIE) and a:IsStatus(STATUS_BATTLE_DESTROYED) then tc=a end - if not tc then return end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0x17a0000) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+0x17a0000) - tc:RegisterEffect(e2) -end diff --git a/script/c53100061.lua b/script/c53100061.lua deleted file mode 100644 index b5ac3b2ef2..0000000000 --- a/script/c53100061.lua +++ /dev/null @@ -1,31 +0,0 @@ ---X-セイバー アクセル -function c53100061.initial_effect(c) - --draw - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(53100061,0)) - e1:SetCategory(CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetCondition(c53100061.condition) - e1:SetTarget(c53100061.target) - e1:SetOperation(c53100061.operation) - c:RegisterEffect(e1) -end -function c53100061.filter(c) - return c:IsSetCard(0xd) and c:IsLocation(LOCATION_GRAVE) and c:IsReason(REASON_BATTLE) -end -function c53100061.condition(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c53100061.filter,1,nil) -end -function c53100061.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(1) - Duel.SetOperationInfo(0,CATEGORY_DRAW,0,0,tp,1) -end -function c53100061.operation(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end diff --git a/script/c53112492.lua b/script/c53112492.lua deleted file mode 100644 index c659d54a88..0000000000 --- a/script/c53112492.lua +++ /dev/null @@ -1,33 +0,0 @@ ---対抗魔術 -function c53112492.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_CHAINING) - e1:SetCondition(c53112492.condition) - e1:SetCost(c53112492.cost) - e1:SetTarget(c53112492.target) - e1:SetOperation(c53112492.activate) - c:RegisterEffect(e1) -end -function c53112492.condition(e,tp,eg,ep,ev,re,r,rp) - return re:IsActiveType(TYPE_SPELL) and re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev) -end -function c53112492.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsCanRemoveCounter(tp,1,0,0x3001,2,REASON_COST) end - Duel.RemoveCounter(tp,1,0,0x3001,2,REASON_COST) -end -function c53112492.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) - end -end -function c53112492.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateActivation(ev) - if re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(eg,REASON_EFFECT) - end -end diff --git a/script/c53116300.lua b/script/c53116300.lua deleted file mode 100644 index 975469819d..0000000000 --- a/script/c53116300.lua +++ /dev/null @@ -1,33 +0,0 @@ ---インヴェルズを呼ぶ者 -function c53116300.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(53116300,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_BE_MATERIAL) - e1:SetCondition(c53116300.spcon) - e1:SetTarget(c53116300.sptg) - e1:SetOperation(c53116300.spop) - c:RegisterEffect(e1) -end -function c53116300.spcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsLocation(LOCATION_GRAVE) and r==REASON_SUMMON and c:GetReasonCard():IsSetCard(0x100a) -end -function c53116300.filter(c,e,tp) - return c:IsSetCard(0x100a) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c53116300.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c53116300.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c53116300.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c53116300.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c53119267.lua b/script/c53119267.lua deleted file mode 100644 index 7e5b47168e..0000000000 --- a/script/c53119267.lua +++ /dev/null @@ -1,25 +0,0 @@ ---魔力の棘 -function c53119267.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_DRAW_PHASE) - c:RegisterEffect(e1) - --damage - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetProperty(EFFECT_FLAG_DELAY) - e2:SetRange(LOCATION_SZONE) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetOperation(c53119267.damop) - c:RegisterEffect(e2) -end -function c53119267.filter(c,tp) - return c:IsPreviousLocation(LOCATION_HAND) and c:GetControler()~=tp and c:GetPreviousControler()~=tp - and c:IsReason(REASON_DISCARD) -end -function c53119267.damop(e,tp,eg,ep,ev,re,r,rp) - local ct=eg:FilterCount(c53119267.filter,nil,tp) - Duel.Damage(1-tp,ct*500,REASON_EFFECT) -end diff --git a/script/c53129443.lua b/script/c53129443.lua deleted file mode 100644 index ea902288ee..0000000000 --- a/script/c53129443.lua +++ /dev/null @@ -1,20 +0,0 @@ ---ブラック・ホール -function c53129443.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c53129443.target) - e1:SetOperation(c53129443.activate) - c:RegisterEffect(e1) -end -function c53129443.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDestructable,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - local sg=Duel.GetMatchingGroup(Card.IsDestructable,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,sg:GetCount(),0,0) -end -function c53129443.activate(e,tp,eg,ep,ev,re,r,rp) - local sg=Duel.GetMatchingGroup(Card.IsDestructable,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - Duel.Destroy(sg,REASON_EFFECT) -end diff --git a/script/c53136004.lua b/script/c53136004.lua deleted file mode 100644 index 088c2acfc4..0000000000 --- a/script/c53136004.lua +++ /dev/null @@ -1,56 +0,0 @@ ---魔導皇士 アンプール -function c53136004.initial_effect(c) - --attack up - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_CONTROL) - e1:SetDescription(aux.Stringid(53136004,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1,53136004) - e1:SetCost(c53136004.cost) - e1:SetTarget(c53136004.target) - e1:SetOperation(c53136004.operation) - c:RegisterEffect(e1) -end -function c53136004.cfilter1(c) - return c:IsFaceup() and c:IsRace(RACE_SPELLCASTER) and c:IsAbleToRemoveAsCost() -end -function c53136004.cfilter2(c) - return c:IsSetCard(0x106e) and c:IsAbleToRemoveAsCost() -end -function c53136004.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():GetAttackAnnouncedCount()==0 - and Duel.IsExistingMatchingCard(c53136004.cfilter1,tp,LOCATION_MZONE,0,1,e:GetHandler()) - and Duel.IsExistingMatchingCard(c53136004.cfilter2,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g1=Duel.SelectMatchingCard(tp,c53136004.cfilter1,tp,LOCATION_MZONE,0,1,1,e:GetHandler()) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g2=Duel.SelectMatchingCard(tp,c53136004.cfilter2,tp,LOCATION_GRAVE,0,1,1,nil) - g1:Merge(g2) - Duel.Remove(g1,POS_FACEUP,REASON_COST) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_OATH) - e1:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - e:GetHandler():RegisterEffect(e1) -end -function c53136004.filter(c) - return c:IsFaceup() and c:IsControlerCanBeChanged() -end -function c53136004.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c53136004.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c53136004.filter,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) - local g=Duel.SelectTarget(tp,c53136004.filter,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0) -end -function c53136004.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) and not Duel.GetControl(tc,tp,PHASE_END,1) then - if not tc:IsImmuneToEffect(e) and tc:IsAbleToChangeControler() then - Duel.Destroy(tc,REASON_EFFECT) - end - end -end diff --git a/script/c53152590.lua b/script/c53152590.lua deleted file mode 100644 index eb10003fc0..0000000000 --- a/script/c53152590.lua +++ /dev/null @@ -1,37 +0,0 @@ ---C・コイル -function c53152590.initial_effect(c) - --atkup - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(53152590,0)) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c53152590.atktg) - e1:SetOperation(c53152590.atkop) - c:RegisterEffect(e1) -end -function c53152590.filter(c) - return c:IsFaceup() and c:IsSetCard(0x25) -end -function c53152590.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c53152590.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c53152590.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c53152590.filter,tp,LOCATION_MZONE,0,1,1,nil) -end -function c53152590.atkop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(300) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_UPDATE_DEFENCE) - tc:RegisterEffect(e2) - end -end diff --git a/script/c53162898.lua b/script/c53162898.lua deleted file mode 100644 index 64a0e3a0b8..0000000000 --- a/script/c53162898.lua +++ /dev/null @@ -1,33 +0,0 @@ ---アマゾネスの賢者 -function c53162898.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(53162898,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_DAMAGE_STEP_END) - e1:SetCondition(c53162898.condition) - e1:SetTarget(c53162898.target) - e1:SetOperation(c53162898.operation) - c:RegisterEffect(e1) -end -function c53162898.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler()==Duel.GetAttacker() and e:GetHandler():IsRelateToBattle() -end -function c53162898.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable() -end -function c53162898.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and c53162898.filter(chkc) end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c53162898.filter,tp,0,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c53162898.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c53180020.lua b/script/c53180020.lua deleted file mode 100644 index 2f3e6dc652..0000000000 --- a/script/c53180020.lua +++ /dev/null @@ -1,61 +0,0 @@ ---影霊衣の戦士 エグザ -function c53180020.initial_effect(c) - --tohand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(53180020,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_RELEASE) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e1:SetCountLimit(1,53180020) - e1:SetCondition(c53180020.thcon) - e1:SetTarget(c53180020.thtg) - e1:SetOperation(c53180020.thop) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(53180020,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_REMOVE) - e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) - e2:SetCountLimit(1,53180020) - e2:SetTarget(c53180020.sptg) - e2:SetOperation(c53180020.spop) - c:RegisterEffect(e2) -end -function c53180020.thcon(e,tp,eg,ep,ev,re,r,rp) - return bit.band(r,REASON_EFFECT)~=0 -end -function c53180020.thfilter(c) - return c:IsSetCard(0xb4) and c:IsType(TYPE_RITUAL) and c:IsRace(RACE_DRAGON) and c:IsAbleToHand() -end -function c53180020.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c53180020.thfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c53180020.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c53180020.thfilter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end -function c53180020.spfilter(c,e,tp) - return c:IsSetCard(0xb4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c53180020.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and c53180020.spfilter(chkc,e,tp) and chkc~=e:GetHandler() end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c53180020.spfilter,tp,LOCATION_REMOVED,0,1,e:GetHandler(),e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c53180020.spfilter,tp,LOCATION_REMOVED,0,1,1,e:GetHandler(),e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c53180020.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c53183600.lua b/script/c53183600.lua deleted file mode 100644 index 0754375f52..0000000000 --- a/script/c53183600.lua +++ /dev/null @@ -1,99 +0,0 @@ ---ブルーアイズ・トゥーン・ドラゴン -function c53183600.initial_effect(c) - c:EnableReviveLimit() - --special summon - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_SPSUMMON_PROC) - e2:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e2:SetRange(LOCATION_HAND) - e2:SetCondition(c53183600.spcon) - e2:SetOperation(c53183600.spop) - c:RegisterEffect(e2) - --destroy - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e3:SetRange(LOCATION_MZONE) - e3:SetCode(EVENT_LEAVE_FIELD) - e3:SetCondition(c53183600.sdescon) - e3:SetOperation(c53183600.sdesop) - c:RegisterEffect(e3) - --direct attack - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetCode(EFFECT_DIRECT_ATTACK) - e4:SetCondition(c53183600.dircon) - c:RegisterEffect(e4) - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_SINGLE) - e5:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET) - e5:SetCondition(c53183600.atcon) - e5:SetValue(c53183600.atlimit) - c:RegisterEffect(e5) - local e6=Effect.CreateEffect(c) - e6:SetType(EFFECT_TYPE_SINGLE) - e6:SetCode(EFFECT_CANNOT_DIRECT_ATTACK) - e6:SetCondition(c53183600.atcon) - c:RegisterEffect(e6) - --cannot attack - local e7=Effect.CreateEffect(c) - e7:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e7:SetCode(EVENT_SPSUMMON_SUCCESS) - e7:SetOperation(c53183600.atklimit) - c:RegisterEffect(e7) - --attack cost - local e8=Effect.CreateEffect(c) - e8:SetType(EFFECT_TYPE_SINGLE) - e8:SetCode(EFFECT_ATTACK_COST) - e8:SetCost(c53183600.atcost) - e8:SetOperation(c53183600.atop) - c:RegisterEffect(e8) -end -function c53183600.cfilter(c) - return c:IsFaceup() and c:IsCode(15259703) -end -function c53183600.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.IsExistingMatchingCard(c53183600.cfilter,tp,LOCATION_ONFIELD,0,1,nil) - and Duel.GetLocationCount(tp,LOCATION_MZONE)>-2 and Duel.CheckReleaseGroup(tp,nil,2,nil) -end -function c53183600.spop(e,tp,eg,ep,ev,re,r,rp,c) - local tp=c:GetControler() - local g=Duel.SelectReleaseGroup(tp,nil,2,2,nil) - Duel.Release(g,REASON_COST) -end -function c53183600.sfilter(c) - return c:IsReason(REASON_DESTROY) and c:IsPreviousPosition(POS_FACEUP) and c:GetPreviousCodeOnField()==15259703 and c:IsPreviousLocation(LOCATION_ONFIELD) -end -function c53183600.sdescon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c53183600.sfilter,1,nil) -end -function c53183600.sdesop(e,tp,eg,ep,ev,re,r,rp) - Duel.Destroy(e:GetHandler(),REASON_EFFECT) -end -function c53183600.atkfilter(c) - return c:IsFaceup() and c:IsType(TYPE_TOON) -end -function c53183600.dircon(e) - return not Duel.IsExistingMatchingCard(c53183600.atkfilter,e:GetHandlerPlayer(),0,LOCATION_MZONE,1,nil) -end -function c53183600.atcon(e) - return Duel.IsExistingMatchingCard(c53183600.atkfilter,e:GetHandlerPlayer(),0,LOCATION_MZONE,1,nil) -end -function c53183600.atlimit(e,c) - return not c:IsType(TYPE_TOON) or c:IsFacedown() -end -function c53183600.atklimit(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e:GetHandler():RegisterEffect(e1) -end -function c53183600.atcost(e,c,tp) - return Duel.CheckLPCost(tp,500) -end -function c53183600.atop(e,tp,eg,ep,ev,re,r,rp) - Duel.PayLPCost(tp,500) -end diff --git a/script/c5318639.lua b/script/c5318639.lua deleted file mode 100644 index d9f39ecefc..0000000000 --- a/script/c5318639.lua +++ /dev/null @@ -1,29 +0,0 @@ ---サイクロン -function c5318639.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_END_PHASE+TIMING_EQUIP) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c5318639.target) - e1:SetOperation(c5318639.activate) - c:RegisterEffect(e1) -end -function c5318639.filter(c) - return c:IsDestructable() and c:IsType(TYPE_SPELL+TYPE_TRAP) -end -function c5318639.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and c5318639.filter(chkc) and chkc~=e:GetHandler() end - if chk==0 then return Duel.IsExistingTarget(c5318639.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c5318639.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c5318639.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c53193261.lua b/script/c53193261.lua deleted file mode 100644 index ec65f009e5..0000000000 --- a/script/c53193261.lua +++ /dev/null @@ -1,28 +0,0 @@ ---エレキー -function c53193261.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c53193261.target) - e1:SetOperation(c53193261.activate) - c:RegisterEffect(e1) -end -function c53193261.filter(c) - return c:IsFaceup() and c:IsSetCard(0xe) -end -function c53193261.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chk==0 then return Duel.IsExistingMatchingCard(c53193261.filter,tp,LOCATION_MZONE,0,1,nil) end -end -function c53193261.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c53193261.filter,tp,LOCATION_MZONE,0,nil) - local tc=g:GetFirst() - while tc do - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DIRECT_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - tc=g:GetNext() - end -end diff --git a/script/c53199020.lua b/script/c53199020.lua deleted file mode 100644 index b9c16bdcab..0000000000 --- a/script/c53199020.lua +++ /dev/null @@ -1,60 +0,0 @@ ---魔轟神ディアネイラ -function c53199020.initial_effect(c) - --summon with 1 tribute - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(53199020,0)) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SUMMON_PROC) - e1:SetCondition(c53199020.otcon) - e1:SetOperation(c53199020.otop) - e1:SetValue(SUMMON_TYPE_ADVANCE) - c:RegisterEffect(e1) - --change effect - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_CHAINING) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCondition(c53199020.chcon1) - e2:SetOperation(c53199020.chop1) - c:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e3:SetCode(EVENT_CHAIN_ACTIVATING) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1) - e3:SetCondition(c53199020.chcon2) - e3:SetOperation(c53199020.chop2) - c:RegisterEffect(e3) -end -function c53199020.otfilter(c,tp) - return c:IsSetCard(0x35) and (c:IsControler(tp) or c:IsFaceup()) -end -function c53199020.otcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - local mg=Duel.GetMatchingGroup(c53199020.otfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp) - return c:GetLevel()>6 and Duel.GetTributeCount(c,mg)>0 -end -function c53199020.otop(e,tp,eg,ep,ev,re,r,rp,c) - local mg=Duel.GetMatchingGroup(c53199020.otfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp) - local sg=Duel.SelectTribute(tp,c,1,1,mg) - c:SetMaterial(sg) - Duel.Release(sg, REASON_SUMMON+REASON_MATERIAL) -end -function c53199020.chcon1(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp and re:GetHandler():GetType()==TYPE_SPELL and re:IsHasType(EFFECT_TYPE_ACTIVATE) -end -function c53199020.chop1(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():RegisterFlagEffect(53199020,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) -end -function c53199020.chcon2(e,tp,eg,ep,ev,re,r,rp) - return ev==1 and e:GetHandler():GetFlagEffect(53199020)>0 -end -function c53199020.chop2(e,tp,eg,ep,ev,re,r,rp) - return Duel.ChangeChainOperation(1,c53199020.rep_op) -end -function c53199020.rep_op(e,tp,eg,ep,ev,re,r,rp) - Duel.DiscardHand(1-tp,aux.TRUE,1,1,REASON_EFFECT+REASON_DISCARD) -end diff --git a/script/c53208660.lua b/script/c53208660.lua deleted file mode 100644 index 22c0d37c73..0000000000 --- a/script/c53208660.lua +++ /dev/null @@ -1,62 +0,0 @@ ---ペンデュラム・コール -function c53208660.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,53208660+EFFECT_COUNT_CODE_OATH) - e1:SetCondition(c53208660.condition) - e1:SetCost(c53208660.cost) - e1:SetTarget(c53208660.target) - e1:SetOperation(c53208660.activate) - c:RegisterEffect(e1) - Duel.AddCustomActivityCounter(53208660,ACTIVITY_CHAIN,c53208660.chainfilter) -end -function c53208660.chainfilter(re,tp,cid) - local rc=re:GetHandler() - local loc,seq=Duel.GetChainInfo(cid,CHAININFO_TRIGGERING_LOCATION,CHAININFO_TRIGGERING_SEQUENCE) - return not (re:IsActiveType(TYPE_SPELL) and not re:IsHasType(EFFECT_TYPE_ACTIVATE) - and loc==LOCATION_SZONE and (seq==6 or seq==7) and rc:IsSetCard(0x98)) -end -function c53208660.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCustomActivityCount(53208660,tp,ACTIVITY_CHAIN)==0 -end -function c53208660.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) -end -function c53208660.thfilter(c) - return c:IsSetCard(0x98) and c:IsType(TYPE_PENDULUM) and c:IsAbleToHand() -end -function c53208660.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local g=Duel.GetMatchingGroup(c53208660.thfilter,tp,LOCATION_DECK,0,nil) - return g:GetClassCount(Card.GetCode)>=2 - end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,2,tp,LOCATION_DECK) -end -function c53208660.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c53208660.thfilter,tp,LOCATION_DECK,0,nil) - if g:GetClassCount(Card.GetCode)>=2 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g1=g:Select(tp,1,1,nil) - g:Remove(Card.IsCode,nil,g1:GetFirst():GetCode()) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g2=g:Select(tp,1,1,nil) - g1:Merge(g2) - Duel.SendtoHand(g1,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g1) - end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - e1:SetTargetRange(LOCATION_SZONE,0) - e1:SetTarget(c53208660.indtg) - e1:SetValue(1) - e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN) - Duel.RegisterEffect(e1,tp) -end -function c53208660.indtg(e,c) - return (c:GetSequence()==6 or c:GetSequence()==7) and c:IsSetCard(0x98) -end diff --git a/script/c53239672.lua b/script/c53239672.lua deleted file mode 100644 index 995e2e4a0c..0000000000 --- a/script/c53239672.lua +++ /dev/null @@ -1,20 +0,0 @@ ---スピリットバリア -function c53239672.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --avoid battle damage - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_AVOID_BATTLE_DAMAGE) - e2:SetRange(LOCATION_SZONE) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetTargetRange(1,0) - e2:SetCondition(c53239672.condition) - c:RegisterEffect(e2) -end -function c53239672.condition(e) - return Duel.GetFieldGroupCount(e:GetHandlerPlayer(),LOCATION_MZONE,0)>0 -end diff --git a/script/c53244294.lua b/script/c53244294.lua deleted file mode 100644 index 35fc6085c1..0000000000 --- a/script/c53244294.lua +++ /dev/null @@ -1,70 +0,0 @@ ---No.57 奮迅竜トレスラグーン -function c53244294.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,4,3) - c:EnableReviveLimit() - --atkup - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(53244294,0)) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetTarget(c53244294.atktg) - e1:SetOperation(c53244294.atkop) - c:RegisterEffect(e1) - --disable zone - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(53244294,1)) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCondition(c53244294.zcon) - e2:SetCost(c53244294.zcost) - e2:SetTarget(c53244294.ztg) - e2:SetOperation(c53244294.zop) - c:RegisterEffect(e2) -end -c53244294.xyz_number=57 -function c53244294.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil) -end -function c53244294.atkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and c:IsFaceup() and tc:IsRelateToEffect(e) and tc:IsFaceup() then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(tc:GetAttack()) - e1:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e1) - end -end -function c53244294.zcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD)>Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,0) -end -function c53244294.zcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c53244294.ztg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)+Duel.GetLocationCount(1-tp,LOCATION_MZONE) - +Duel.GetLocationCount(tp,LOCATION_SZONE)+Duel.GetLocationCount(1-tp,LOCATION_SZONE)>0 end - local dis=Duel.SelectDisableField(tp,1,LOCATION_ONFIELD,LOCATION_ONFIELD,0) - e:SetLabel(dis) -end -function c53244294.zop(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_DISABLE_FIELD) - e1:SetOperation(c53244294.disop) - e1:SetReset(RESET_EVENT+0x1ff0000) - e1:SetLabel(e:GetLabel()) - e:GetHandler():RegisterEffect(e1) -end -function c53244294.disop(e,tp) - return e:GetLabel() -end diff --git a/script/c53251824.lua b/script/c53251824.lua deleted file mode 100644 index 727181fe45..0000000000 --- a/script/c53251824.lua +++ /dev/null @@ -1,45 +0,0 @@ ---RR-バニシング・レイニアス -function c53251824.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCondition(c53251824.spcon) - e1:SetTarget(c53251824.sptg) - e1:SetOperation(c53251824.spop) - c:RegisterEffect(e1) - if not c53251824.global_check then - c53251824.global_check=true - local ge1=Effect.CreateEffect(c) - ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - ge1:SetCode(EVENT_SUMMON_SUCCESS) - ge1:SetLabel(53251824) - ge1:SetOperation(aux.sumreg) - Duel.RegisterEffect(ge1,0) - local ge2=ge1:Clone() - ge2:SetCode(EVENT_SPSUMMON_SUCCESS) - ge2:SetLabel(53251824) - Duel.RegisterEffect(ge2,0) - end -end -function c53251824.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetFlagEffect(53251824)>0 -end -function c53251824.spfilter(c,e,tp) - return c:IsSetCard(0xba) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c53251824.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c53251824.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c53251824.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c53251824.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c5325424.lua b/script/c5325424.lua deleted file mode 100644 index 463238648b..0000000000 --- a/script/c5325424.lua +++ /dev/null @@ -1,29 +0,0 @@ ---牙竜転生 -function c5325424.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c5325424.target) - e1:SetOperation(c5325424.activate) - c:RegisterEffect(e1) -end -function c5325424.filter(c) - return c:IsFaceup() and c:IsRace(RACE_DRAGON) and c:IsAbleToHand() -end -function c5325424.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_REMOVED) and c5325424.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c5325424.filter,tp,LOCATION_REMOVED,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c5325424.filter,tp,LOCATION_REMOVED,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c5325424.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end diff --git a/script/c53257892.lua b/script/c53257892.lua deleted file mode 100644 index 7834c63d3e..0000000000 --- a/script/c53257892.lua +++ /dev/null @@ -1,31 +0,0 @@ ---ギガプラント -function c53257892.initial_effect(c) - aux.EnableDualAttribute(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetDescription(aux.Stringid(53257892,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCondition(aux.IsDualState) - e1:SetTarget(c53257892.target) - e1:SetOperation(c53257892.operation) - c:RegisterEffect(e1) -end -function c53257892.filter(c,e,tp) - return c:IsRace(RACE_INSECT+RACE_PLANT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsHasEffect(EFFECT_NECRO_VALLEY) -end -function c53257892.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c53257892.filter,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_HAND) -end -function c53257892.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c53257892.filter,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c53262004.lua b/script/c53262004.lua deleted file mode 100644 index 30b986d49d..0000000000 --- a/script/c53262004.lua +++ /dev/null @@ -1,69 +0,0 @@ ---オッドアイズ・ボルテックス・ドラゴン -function c53262004.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcFun2(c,aux.FilterBoolFunction(Card.IsSetCard,0x99),aux.FilterBoolFunction(Card.IsType,TYPE_PENDULUM),false) - --tohand - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCountLimit(1,53262004) - e1:SetTarget(c53262004.thtg) - e1:SetOperation(c53262004.thop) - c:RegisterEffect(e1) - --negate - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_CHAINING) - e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,53262005) - e2:SetCondition(c53262004.discon) - e2:SetTarget(c53262004.distg) - e2:SetOperation(c53262004.disop) - c:RegisterEffect(e2) -end -function c53262004.filter(c) - return c:IsPosition(POS_FACEUP_ATTACK) and c:IsAbleToHand() -end -function c53262004.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c53262004.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c53262004.filter,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g=Duel.SelectTarget(tp,c53262004.filter,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c53262004.thop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - end -end -function c53262004.discon(e,tp,eg,ep,ev,re,r,rp) - return re:GetHandler()~=e:GetHandler() and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) - and (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE)) and Duel.IsChainNegatable(ev) -end -function c53262004.disfilter(c) - return c:IsFaceup() and c:IsType(TYPE_PENDULUM) and c:IsAbleToDeck() -end -function c53262004.distg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c53262004.disfilter,tp,LOCATION_EXTRA,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_EXTRA) - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) - end -end -function c53262004.disop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectMatchingCard(tp,c53262004.disfilter,tp,LOCATION_EXTRA,0,1,1,nil) - if Duel.SendtoDeck(g,nil,2,REASON_EFFECT)~=0 then - Duel.NegateActivation(ev) - if re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(eg,REASON_EFFECT) - end - end -end diff --git a/script/c53274132.lua b/script/c53274132.lua deleted file mode 100644 index cc3802e795..0000000000 --- a/script/c53274132.lua +++ /dev/null @@ -1,69 +0,0 @@ ---C・リペアラー -function c53274132.initial_effect(c) - --damage - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(53274132,0)) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_SINGLE) - e1:SetCode(EVENT_BATTLE_DESTROYING) - e1:SetCondition(c53274132.damcon) - e1:SetTarget(c53274132.damtg) - e1:SetOperation(c53274132.damop) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(53274132,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCost(c53274132.spcost) - e2:SetTarget(c53274132.sptg) - e2:SetOperation(c53274132.spop) - c:RegisterEffect(e2) -end -function c53274132.damcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local bc=c:GetBattleTarget() - return c:IsRelateToBattle() and c:IsFaceup() and bc:IsLocation(LOCATION_GRAVE) - and bc:IsReason(REASON_BATTLE) and bc:IsType(TYPE_MONSTER) -end -function c53274132.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(300) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,300) -end -function c53274132.damop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end -function c53274132.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():GetAttackAnnouncedCount()==0 end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_OATH) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e:GetHandler():RegisterEffect(e1) -end -function c53274132.spfilter(c,e,tp) - return c:IsLevelBelow(4) and c:IsSetCard(0x25) and c:GetCode()~=53274132 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c53274132.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c53274132.spfilter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c53274132.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c53274132.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c53274132.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c53291093.lua b/script/c53291093.lua deleted file mode 100644 index e928122db5..0000000000 --- a/script/c53291093.lua +++ /dev/null @@ -1,50 +0,0 @@ ---トライアングル・エリア -function c53291093.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,0x1e0) - e1:SetTarget(c53291093.target) - e1:SetOperation(c53291093.activate) - c:RegisterEffect(e1) -end -function c53291093.filter(c) - return c:GetCounter(0xe)>0 and c:IsDestructable() -end -function c53291093.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c53291093.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c53291093.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c53291093.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c53291093.spfilter(c,e,tp) - return c:IsSetCard(0xc) and c:GetLevel()==4 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c53291093.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)~=0 - and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then - local g=Duel.GetMatchingGroup(c53291093.spfilter,tp,LOCATION_DECK,0,nil,e,tp) - if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(53291093,0)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=g:Select(tp,1,1,nil) - Duel.BreakEffect() - Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetOperation(c53291093.desop) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e1:SetCountLimit(1) - sg:GetFirst():RegisterEffect(e1) - end - end -end -function c53291093.desop(e,tp,eg,ep,ev,re,r,rp) - Duel.Destroy(e:GetHandler(),REASON_EFFECT) -end diff --git a/script/c53315891.lua b/script/c53315891.lua deleted file mode 100644 index 6fa98eca59..0000000000 --- a/script/c53315891.lua +++ /dev/null @@ -1,121 +0,0 @@ ---合神竜ティマイオス -function c53315891.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcCode3(c,80019195,85800949,84565800,true,true) - --spsummon condition - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - c:RegisterEffect(e1) - --special summon rule - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_SPSUMMON_PROC) - e2:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e2:SetRange(LOCATION_EXTRA) - e2:SetCondition(c53315891.sprcon) - e2:SetOperation(c53315891.sprop) - c:RegisterEffect(e2) - --immune - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_IMMUNE_EFFECT) - e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e3:SetRange(LOCATION_MZONE) - e3:SetValue(c53315891.efilter) - c:RegisterEffect(e3) - --atk & def - local e4=Effect.CreateEffect(c) - e4:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE) - e4:SetType(EFFECT_TYPE_QUICK_O) - e4:SetCode(EVENT_PRE_DAMAGE_CALCULATE) - e4:SetRange(LOCATION_MZONE) - e4:SetCondition(c53315891.atkcon) - e4:SetTarget(c53315891.atktg) - e4:SetOperation(c53315891.atkop) - c:RegisterEffect(e4) - --spsummon - local e5=Effect.CreateEffect(c) - e5:SetCategory(CATEGORY_SPECIAL_SUMMON) - e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e5:SetCode(EVENT_BATTLE_DESTROYED) - e5:SetTarget(c53315891.sptg) - e5:SetOperation(c53315891.spop) - c:RegisterEffect(e5) -end -function c53315891.sprfilter(c,code) - return c:IsCode(code) and c:IsAbleToGraveAsCost() -end -function c53315891.sprcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.GetLocationCount(tp,LOCATION_MZONE)>-3 - and Duel.IsExistingMatchingCard(c53315891.sprfilter,tp,LOCATION_ONFIELD,0,1,nil,80019195) - and Duel.IsExistingMatchingCard(c53315891.sprfilter,tp,LOCATION_ONFIELD,0,1,nil,85800949) - and Duel.IsExistingMatchingCard(c53315891.sprfilter,tp,LOCATION_ONFIELD,0,1,nil,84565800) -end -function c53315891.sprop(e,tp,eg,ep,ev,re,r,rp,c) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g1=Duel.SelectMatchingCard(tp,c53315891.sprfilter,tp,LOCATION_ONFIELD,0,1,1,nil,80019195) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g2=Duel.SelectMatchingCard(tp,c53315891.sprfilter,tp,LOCATION_ONFIELD,0,1,1,nil,85800949) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g3=Duel.SelectMatchingCard(tp,c53315891.sprfilter,tp,LOCATION_ONFIELD,0,1,1,nil,84565800) - g1:Merge(g2) - g1:Merge(g3) - Duel.SendtoGrave(g1,REASON_COST) -end -function c53315891.efilter(e,te) - return te:GetOwner()~=e:GetOwner() -end -function c53315891.atkcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c==Duel.GetAttacker() or c==Duel.GetAttackTarget() -end -function c53315891.atktg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then - local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,c) - if g:GetCount()==0 then return false end - local g1,atk=g:GetMaxGroup(Card.GetAttack) - return c:GetAttack()~=atk and c:GetFlagEffect(53315891)==0 - end - c:RegisterFlagEffect(53315891,RESET_CHAIN,0,1) -end -function c53315891.atkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,c) - if g:GetCount()==0 then return end - local g1,atk=g:GetMaxGroup(Card.GetAttack) - if c:IsRelateToEffect(e) and c:IsFaceup() and atk>0 then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(atk) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_SET_DEFENCE_FINAL) - c:RegisterEffect(e2) - end -end -function c53315891.spfilter(c,e,tp) - return c:IsSetCard(0xa0) and c:IsCanBeSpecialSummoned(e,0,tp,true,true) - and not c:IsHasEffect(EFFECT_NECRO_VALLEY) -end -function c53315891.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>=3 - and Duel.IsExistingMatchingCard(c53315891.spfilter,tp,0x13,0,3,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,3,tp,0x13) -end -function c53315891.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<3 then return end - local g=Duel.GetMatchingGroup(c53315891.spfilter,tp,0x13,0,nil,e,tp) - if g:GetCount()>2 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=g:Select(tp,3,3,nil) - Duel.SpecialSummon(sg,0,tp,tp,true,true,POS_FACEUP) - end -end diff --git a/script/c53334471.lua b/script/c53334471.lua deleted file mode 100644 index ebb817db70..0000000000 --- a/script/c53334471.lua +++ /dev/null @@ -1,105 +0,0 @@ ---御前試合 -function c53334471.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_DRAW_PHASE) - e1:SetTarget(c53334471.acttg) - c:RegisterEffect(e1) - --adjust - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e2:SetCode(EVENT_ADJUST) - e2:SetRange(LOCATION_SZONE) - e2:SetOperation(c53334471.adjustop) - c:RegisterEffect(e2) - --cannot summon,spsummon,flipsummon - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_FIELD) - e4:SetRange(LOCATION_SZONE) - e4:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e4:SetTargetRange(1,1) - e4:SetTarget(c53334471.sumlimit) - c:RegisterEffect(e4) - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_FIELD) - e5:SetRange(LOCATION_SZONE) - e5:SetCode(EFFECT_CANNOT_SUMMON) - e5:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e5:SetTargetRange(1,1) - e5:SetTarget(c53334471.sumlimit) - c:RegisterEffect(e5) - local e6=Effect.CreateEffect(c) - e6:SetType(EFFECT_TYPE_FIELD) - e6:SetRange(LOCATION_SZONE) - e6:SetCode(EFFECT_CANNOT_FLIP_SUMMON) - e6:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e6:SetTargetRange(1,1) - e6:SetTarget(c53334471.sumlimit) - c:RegisterEffect(e6) -end -c53334471[0]=0 -c53334471[1]=0 -function c53334471.acttg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - c53334471[0]=0 - c53334471[1]=0 -end -function c53334471.sumlimit(e,c,sump,sumtype,sumpos,targetp) - if sumpos and bit.band(sumpos,POS_FACEDOWN)>0 then return false end - local at=c53334471[sump] - if targetp then at=c53334471[targetp] end - if at==0 then return false end - return c:GetAttribute()~=at -end -function c53334471.getattribute(g) - local aat=0 - local tc=g:GetFirst() - while tc do - aat=bit.bor(aat,tc:GetAttribute()) - tc=g:GetNext() - end - return aat -end -function c53334471.rmfilter(c,at) - return c:GetAttribute()==at -end -function c53334471.adjustop(e,tp,eg,ep,ev,re,r,rp) - local phase=Duel.GetCurrentPhase() - if (phase==PHASE_DAMAGE and not Duel.IsDamageCalculated()) or phase==PHASE_DAMAGE_CAL then return end - local g1=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil) - local g2=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil) - local c=e:GetHandler() - if g1:GetCount()==0 then c53334471[tp]=0 - else - local att=c53334471.getattribute(g1) - if bit.band(att,att-1)~=0 then - if c53334471[tp]==0 or bit.band(c53334471[tp],att)==0 then - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(53334471,0)) - att=Duel.AnnounceAttribute(tp,1,att) - else att=c53334471[tp] end - end - g1:Remove(c53334471.rmfilter,nil,att) - c53334471[tp]=att - end - if g2:GetCount()==0 then c53334471[1-tp]=0 - else - local att=c53334471.getattribute(g2) - if bit.band(att,att-1)~=0 then - if c53334471[1-tp]==0 or bit.band(c53334471[1-tp],att)==0 then - Duel.Hint(HINT_SELECTMSG,1-tp,aux.Stringid(53334471,0)) - att=Duel.AnnounceAttribute(1-tp,1,att) - else att=c53334471[1-tp] end - end - g2:Remove(c53334471.rmfilter,nil,att) - c53334471[1-tp]=att - end - g1:Merge(g2) - if g1:GetCount()>0 then - Duel.SendtoGrave(g1,REASON_RULE) - Duel.Readjust() - end -end diff --git a/script/c53334641.lua b/script/c53334641.lua deleted file mode 100644 index 31cbe8dae9..0000000000 --- a/script/c53334641.lua +++ /dev/null @@ -1,80 +0,0 @@ ---ゴーストリックの駄天使 -function c53334641.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,4,2,c53334641.ovfilter,aux.Stringid(53334641,0)) - c:EnableReviveLimit() - --win - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_DELAY) - e1:SetCode(EVENT_CHAIN_SOLVING) - e1:SetRange(LOCATION_MZONE) - e1:SetOperation(c53334641.winop) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e2) - --search - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(53334641,1)) - e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCost(c53334641.thcost) - e2:SetTarget(c53334641.thtg) - e2:SetOperation(c53334641.thop) - c:RegisterEffect(e2) - --material - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(53334641,2)) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1) - e3:SetTarget(c53334641.mttg) - e3:SetOperation(c53334641.mtop) - c:RegisterEffect(e3) -end -function c53334641.ovfilter(c) - return c:IsFaceup() and c:IsSetCard(0x8d) and c:IsType(TYPE_XYZ) and not c:IsCode(53334641) -end -function c53334641.winop(e,tp,eg,ep,ev,re,r,rp) - local WIN_REASON_GHOSTRICK_SPOILEDANGEL=0x1b - if e:GetHandler():GetOverlayCount()==10 then - Duel.Win(tp,WIN_REASON_GHOSTRICK_SPOILEDANGEL) - end -end -function c53334641.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c53334641.thfilter(c) - return c:IsSetCard(0x8d) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand() -end -function c53334641.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c53334641.thfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c53334641.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c53334641.thfilter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end -function c53334641.mtfilter(c) - return c:IsSetCard(0x8d) -end -function c53334641.mttg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c53334641.mtfilter,tp,LOCATION_HAND,0,1,nil) end -end -function c53334641.mtop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) or c:IsFacedown() then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL) - local g=Duel.SelectMatchingCard(tp,c53334641.mtfilter,tp,LOCATION_HAND,0,1,1,nil) - if g:GetCount()>0 then - Duel.Overlay(c,g) - end -end diff --git a/script/c53341729.lua b/script/c53341729.lua deleted file mode 100644 index 80884609cb..0000000000 --- a/script/c53341729.lua +++ /dev/null @@ -1,22 +0,0 @@ ---閃光を吸い込むマジック・ミラー -function c53341729.initial_effect(c) - --activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --disable - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e2:SetRange(LOCATION_SZONE) - e2:SetCode(EVENT_CHAIN_ACTIVATING) - e2:SetOperation(c53341729.disop) - c:RegisterEffect(e2) -end -function c53341729.disop(e,tp,eg,ep,ev,re,r,rp) - local loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION) - if re:IsActiveType(TYPE_MONSTER) and (loc==LOCATION_MZONE or loc==LOCATION_GRAVE) - and re:GetHandler():IsAttribute(ATTRIBUTE_LIGHT) then - Duel.NegateEffect(ev) - end -end diff --git a/script/c53347303.lua b/script/c53347303.lua deleted file mode 100644 index 9362e3ae8a..0000000000 --- a/script/c53347303.lua +++ /dev/null @@ -1,65 +0,0 @@ ---青眼の光龍 -function c53347303.initial_effect(c) - c:EnableReviveLimit() - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(aux.FALSE) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_SPSUMMON_PROC) - e2:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e2:SetRange(LOCATION_HAND) - e2:SetCondition(c53347303.spcon) - e2:SetOperation(c53347303.spop) - c:RegisterEffect(e2) - --atkup - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e3:SetCode(EFFECT_UPDATE_ATTACK) - e3:SetRange(LOCATION_MZONE) - e3:SetValue(c53347303.val) - c:RegisterEffect(e3) - --negate - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(53347303,0)) - e4:SetCategory(CATEGORY_DISABLE) - e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_QUICK_O) - e4:SetCode(EVENT_CHAINING) - e4:SetRange(LOCATION_MZONE) - e4:SetCondition(c53347303.discon) - e4:SetTarget(c53347303.distg) - e4:SetOperation(c53347303.disop) - c:RegisterEffect(e4) -end -function c53347303.spcon(e,c) - if c==nil then return true end - return Duel.CheckReleaseGroup(c:GetControler(),Card.IsCode,1,nil,23995346) -end -function c53347303.spop(e,tp,eg,ep,ev,re,r,rp,c) - local g=Duel.SelectReleaseGroup(c:GetControler(),Card.IsCode,1,1,nil,23995346) - Duel.Release(g,REASON_COST) -end -function c53347303.val(e,c) - return Duel.GetMatchingGroupCount(Card.IsRace,c:GetControler(),LOCATION_GRAVE,0,nil,RACE_DRAGON)*300 -end -function c53347303.discon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsStatus(STATUS_BATTLE_DESTROYED) then return false end - if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return end - local loc,tg=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION,CHAININFO_TARGET_CARDS) - if not tg or not tg:IsContains(c) then return false end - return Duel.IsChainDisablable(ev) and loc~=LOCATION_DECK -end -function c53347303.distg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0) -end -function c53347303.disop(e,tp,eg,ep,ev,re,r,rp,chk) - Duel.NegateEffect(ev) -end diff --git a/script/c5338223.lua b/script/c5338223.lua deleted file mode 100644 index 595edf666b..0000000000 --- a/script/c5338223.lua +++ /dev/null @@ -1,41 +0,0 @@ ---強制進化 -function c5338223.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c5338223.cost) - e1:SetTarget(c5338223.target) - e1:SetOperation(c5338223.activate) - c:RegisterEffect(e1) -end -function c5338223.cost(e,tp,eg,ep,ev,re,r,rp,chk) - e:SetLabel(1) - if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsSetCard,1,nil,0x304e) end - local rg=Duel.SelectReleaseGroup(tp,Card.IsSetCard,1,1,nil,0x304e) - Duel.Release(rg,REASON_COST) -end -function c5338223.spfilter(c,e,tp) - return c:IsSetCard(0x604e) and c:IsCanBeSpecialSummoned(e,170,tp,false,false) -end -function c5338223.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local chkf=(e:GetLabel()==1) and 0 or -1 - e:SetLabel(0) - return Duel.IsExistingMatchingCard(c5338223.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) - and Duel.GetLocationCount(tp,LOCATION_MZONE)>chkf - end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) - e:SetLabel(0) -end -function c5338223.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c5338223.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,170,tp,tp,false,false,POS_FACEUP) - local rf=g:GetFirst().evolreg - if rf then rf(g:GetFirst()) end - end -end diff --git a/script/c53388413.lua b/script/c53388413.lua deleted file mode 100644 index d8f5e3a641..0000000000 --- a/script/c53388413.lua +++ /dev/null @@ -1,12 +0,0 @@ ---総剣司令 ガトムズ -function c53388413.initial_effect(c) - --atk - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0xd)) - e1:SetValue(400) - c:RegisterEffect(e1) -end diff --git a/script/c53408006.lua b/script/c53408006.lua deleted file mode 100644 index 1f0f2d38b4..0000000000 --- a/script/c53408006.lua +++ /dev/null @@ -1,45 +0,0 @@ ---ジェム・マーチャント -function c53408006.initial_effect(c) - --atk,def up - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetDescription(aux.Stringid(53408006,0)) - e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetRange(LOCATION_HAND) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e1:SetCondition(c53408006.condition) - e1:SetCost(c53408006.cost) - e1:SetOperation(c53408006.operation) - c:RegisterEffect(e1) -end -function c53408006.filter(c) - return c:IsAttribute(ATTRIBUTE_EARTH) and c:IsType(TYPE_NORMAL) -end -function c53408006.condition(e,tp,eg,ep,ev,re,r,rp) - local phase=Duel.GetCurrentPhase() - if phase~=PHASE_DAMAGE or Duel.IsDamageCalculated() then return false end - local a=Duel.GetAttacker() - local d=Duel.GetAttackTarget() - return (a:GetControler()==tp and c53408006.filter(a) and a:IsRelateToBattle()) - or (d and d:GetControler()==tp and d:IsFaceup() and c53408006.filter(d) and d:IsRelateToBattle()) -end -function c53408006.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end -function c53408006.operation(e,tp,eg,ep,ev,re,r,rp,chk) - local a=Duel.GetAttacker() - if Duel.GetTurnPlayer()~=tp then a=Duel.GetAttackTarget() end - if not a:IsRelateToBattle() then return end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e1:SetValue(1000) - a:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_UPDATE_DEFENCE) - a:RegisterEffect(e2) -end diff --git a/script/c53451824.lua b/script/c53451824.lua deleted file mode 100644 index 57012e622d..0000000000 --- a/script/c53451824.lua +++ /dev/null @@ -1,58 +0,0 @@ ---幻獣機コンコルーダ -function c53451824.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1) - c:EnableReviveLimit() - -- - local e1=Effect.CreateEffect(c) - e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetTarget(aux.TargetBoolFunction(Card.IsType,TYPE_TOKEN)) - e1:SetValue(1) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - c:RegisterEffect(e2) - --spsummon - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(53451824,0)) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_CHAIN_UNIQUE) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetCode(EVENT_TO_GRAVE) - e3:SetCondition(c53451824.spcon) - e3:SetCost(c53451824.spcost) - e3:SetTarget(c53451824.sptg) - e3:SetOperation(c53451824.spop) - c:RegisterEffect(e3) -end -function c53451824.spcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local crp=c:GetReasonPlayer() - return c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsReason(REASON_DESTROY) and c:GetPreviousControler()==tp and tp~=crp and crp~=PLAYER_NONE -end -function c53451824.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - local g=Duel.GetMatchingGroup(Card.IsType,tp,LOCATION_MZONE,0,nil,TYPE_TOKEN) - e:SetLabel(g:GetCount()) - if chk==0 then return g:GetCount()>0 and g:FilterCount(Card.IsReleasable,nil)==g:GetCount() end - Duel.Release(g,REASON_COST) -end -function c53451824.spfilter(c,e,tp) - return c:IsSetCard(0x101b) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c53451824.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c53451824.spfilter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-e:GetLabel()+1 - and Duel.IsExistingTarget(c53451824.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c53451824.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,g:GetCount(),0,0) -end -function c53451824.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c53461122.lua b/script/c53461122.lua deleted file mode 100644 index a63bdaffc2..0000000000 --- a/script/c53461122.lua +++ /dev/null @@ -1,12 +0,0 @@ ---ガイアフレーム -function c53461122.initial_effect(c) - --double tribute - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DOUBLE_TRIBUTE) - e1:SetValue(c53461122.condition) - c:RegisterEffect(e1) -end -function c53461122.condition(e,c) - return c:IsAttribute(ATTRIBUTE_EARTH) and c:IsType(TYPE_NORMAL) -end diff --git a/script/c53466826.lua b/script/c53466826.lua deleted file mode 100644 index 876040cb2e..0000000000 --- a/script/c53466826.lua +++ /dev/null @@ -1,38 +0,0 @@ ---ヒロイック・チャンス -function c53466826.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,53466826+EFFECT_COUNT_CODE_OATH) - e1:SetTarget(c53466826.target) - e1:SetOperation(c53466826.activate) - c:RegisterEffect(e1) -end -function c53466826.filter(c) - return c:IsFaceup() and c:IsSetCard(0x6f) -end -function c53466826.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c53466826.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c53466826.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c53466826.filter,tp,LOCATION_MZONE,0,1,1,nil) -end -function c53466826.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetValue(tc:GetAttack()*2) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_CANNOT_DIRECT_ATTACK) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - tc:RegisterEffect(e2) - end -end diff --git a/script/c53485634.lua b/script/c53485634.lua deleted file mode 100644 index 4ea0cf30fb..0000000000 --- a/script/c53485634.lua +++ /dev/null @@ -1,87 +0,0 @@ ---真紅眼の遡刻竜 -function c53485634.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(53485634,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetRange(LOCATION_HAND) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e1:SetCondition(c53485634.spcon) - e1:SetTarget(c53485634.sptg) - e1:SetOperation(c53485634.spop) - c:RegisterEffect(e1) - --extra summon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(53485634,1)) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCondition(c53485634.sumcon) - e2:SetCost(c53485634.sumcost) - e2:SetTarget(c53485634.sumtg) - e2:SetOperation(c53485634.sumop) - c:RegisterEffect(e2) -end -function c53485634.spfilter(c,e,tp) - return c:IsPreviousPosition(POS_FACEUP) and c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_MZONE) - and c:IsReason(REASON_DESTROY) and (c:IsReason(REASON_EFFECT) or (c:IsReason(REASON_BATTLE) and Duel.GetAttacker():IsControler(1-tp))) - and c:IsSetCard(0x3b) and c:IsLevelBelow(7) and c:IsControler(tp) - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c53485634.spcon(e,tp,eg,ep,ev,re,r,rp) - return rp~=tp -end -function c53485634.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanSpecialSummonCount(tp,2) - and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) - and eg:IsExists(c53485634.spfilter,1,nil,e,tp) end - local g=eg:Filter(c53485634.spfilter,nil,e,tp) - Duel.SetTargetCard(g) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c53485634.filter(c,e,tp) - return c:IsRelateToEffect(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c53485634.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local c=e:GetHandler() - if not c:IsRelateToEffect(e) then return end - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(c53485634.filter,nil,e,tp) - if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP_DEFENCE)~=0 then - local ct=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ct<=0 or g:GetCount()==0 then return end - if g:GetCount()>ct then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - g=g:Select(tp,ct,ct,nil) - end - local tc=g:GetFirst() - while tc do - local pos=tc:GetPreviousPosition() - Duel.SpecialSummonStep(tc,0,tp,tp,false,false,pos) - tc=g:GetNext() - end - Duel.SpecialSummonComplete() - end -end -function c53485634.sumcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetFlagEffect(tp,53485634)==0 -end -function c53485634.sumcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end -function c53485634.sumtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanSummon(tp) end -end -function c53485634.sumop(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_EXTRA_SUMMON_COUNT) - e1:SetTargetRange(LOCATION_HAND+LOCATION_MZONE,0) - e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x3b)) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) - Duel.RegisterFlagEffect(tp,53485634,RESET_PHASE+PHASE_END,0,1) -end diff --git a/script/c53493204.lua b/script/c53493204.lua deleted file mode 100644 index 4719be5027..0000000000 --- a/script/c53493204.lua +++ /dev/null @@ -1,12 +0,0 @@ ---心眼の女神 -function c53493204.initial_effect(c) - --fusion substitute - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_FUSION_SUBSTITUTE) - e1:SetCondition(c53493204.subcon) - c:RegisterEffect(e1) -end -function c53493204.subcon(e) - return e:GetHandler():IsLocation(LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE) -end diff --git a/script/c53519297.lua b/script/c53519297.lua deleted file mode 100644 index 2a8928ee01..0000000000 --- a/script/c53519297.lua +++ /dev/null @@ -1,32 +0,0 @@ ---ブラック・ブースト -function c53519297.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c53519297.cost) - e1:SetTarget(c53519297.target) - e1:SetOperation(c53519297.activate) - c:RegisterEffect(e1) -end -function c53519297.filter(c) - return c:IsFaceup() and c:IsSetCard(0x33) and c:IsType(TYPE_TUNER) and c:IsAbleToRemoveAsCost() -end -function c53519297.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c53519297.filter,tp,LOCATION_MZONE,0,2,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c53519297.filter,tp,LOCATION_MZONE,0,2,2,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c53519297.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp,2) end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(2) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2) -end -function c53519297.activate(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end diff --git a/script/c53527835.lua b/script/c53527835.lua deleted file mode 100644 index 7f68b1d662..0000000000 --- a/script/c53527835.lua +++ /dev/null @@ -1,26 +0,0 @@ ---ダーク・シティ -function c53527835.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --atk up - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_DAMAGE_CALCULATING) - e2:SetRange(LOCATION_SZONE) - e2:SetOperation(c53527835.atkup) - c:RegisterEffect(e2) -end -function c53527835.atkup(e,tp,eg,ep,ev,re,r,rp,chk) - local a=Duel.GetAttacker() - local d=Duel.GetAttackTarget() - if not a:IsSetCard(0xc008) or not d or a:GetAttack()>=d:GetAttack() then return end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_PHASE+RESET_DAMAGE_CAL) - e1:SetValue(1000) - a:RegisterEffect(e1) -end diff --git a/script/c53530069.lua b/script/c53530069.lua deleted file mode 100644 index 7f5684d0d5..0000000000 --- a/script/c53530069.lua +++ /dev/null @@ -1,32 +0,0 @@ ---そよ風の精霊 -function c53530069.initial_effect(c) - --recover - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(53530069,0)) - e1:SetCategory(CATEGORY_RECOVER) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCondition(c53530069.condition) - e1:SetTarget(c53530069.target) - e1:SetOperation(c53530069.operation) - c:RegisterEffect(e1) -end -function c53530069.condition(e,tp,eg,ep,ev,re,r,rp) - return tp==Duel.GetTurnPlayer() and e:GetHandler():IsAttackPos() -end -function c53530069.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(1000) - Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,1000) -end -function c53530069.operation(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - local c=e:GetHandler() - if c:IsPosition(POS_FACEUP_ATTACK) and c:IsRelateToEffect(e) then - Duel.Recover(p,d,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/script/c53539634.lua b/script/c53539634.lua deleted file mode 100644 index 7119bf9f5b..0000000000 --- a/script/c53539634.lua +++ /dev/null @@ -1,6 +0,0 @@ ---クリッチー -function c53539634.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcCode2(c,78010363,26202165,true,true) -end diff --git a/script/c53540729.lua b/script/c53540729.lua deleted file mode 100644 index cb6a200176..0000000000 --- a/script/c53540729.lua +++ /dev/null @@ -1,43 +0,0 @@ ---ゼンマイウォリアー -function c53540729.initial_effect(c) - --atk/lv up - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(53540729,0)) - e1:SetProperty(EFFECT_FLAG_NO_TURN_RESET+EFFECT_FLAG_CARD_TARGET) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetTarget(c53540729.target) - e1:SetOperation(c53540729.operation) - c:RegisterEffect(e1) -end -function c53540729.filter(c) - return c:IsFaceup() and c:IsSetCard(0x58) and c:IsLevelAbove(1) -end -function c53540729.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c53540729.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c53540729.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - local g=Duel.SelectTarget(tp,c53540729.filter,tp,LOCATION_MZONE,0,1,1,nil) -end -function c53540729.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e1:SetValue(600) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_UPDATE_LEVEL) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e2:SetValue(1) - tc:RegisterEffect(e2) - end -end diff --git a/script/c53550467.lua b/script/c53550467.lua deleted file mode 100644 index 149cfb0456..0000000000 --- a/script/c53550467.lua +++ /dev/null @@ -1,65 +0,0 @@ ---聖騎士トリスタン -function c53550467.initial_effect(c) - --cannot be battle target - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(0,LOCATION_MZONE) - e1:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET) - e1:SetCondition(c53550467.con) - e1:SetValue(c53550467.atlimit) - c:RegisterEffect(e1) - --cannot be effect target - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetRange(LOCATION_MZONE) - e2:SetTargetRange(0,0xff) - e2:SetCode(EFFECT_CANNOT_SELECT_EFFECT_TARGET) - e2:SetProperty(EFFECT_FLAG_SET_AVAILABLE) - e2:SetCondition(c53550467.con) - e2:SetValue(c53550467.tglimit) - c:RegisterEffect(e2) - --destroy - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(53550467,0)) - e3:SetCategory(CATEGORY_DESTROY) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetCode(EVENT_EQUIP) - e3:SetCountLimit(1,53550467) - e3:SetCondition(c53550467.descon) - e3:SetTarget(c53550467.destg) - e3:SetOperation(c53550467.desop) - c:RegisterEffect(e3) -end -function c53550467.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x107a) -end -function c53550467.con(e) - return Duel.IsExistingMatchingCard(c53550467.cfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,e:GetHandler()) -end -function c53550467.atlimit(e,c) - return c~=e:GetHandler() and c:IsFaceup() and c:GetAttack()<1800 -end -function c53550467.tglimit(e,re,c) - return c~=e:GetHandler() and c:IsControler(e:GetHandlerPlayer()) and c:IsLocation(LOCATION_MZONE) and c:IsFaceup() and c:GetAttack()<1800 -end -function c53550467.descon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(Card.IsSetCard,1,nil,0x207a) -end -function c53550467.desfilter(c) - return c:IsFaceup() and c:IsDestructable() -end -function c53550467.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and c53550467.desfilter(chkc) end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c53550467.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c53550467.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c53567095.lua b/script/c53567095.lua deleted file mode 100644 index 1e81f6cb76..0000000000 --- a/script/c53567095.lua +++ /dev/null @@ -1,64 +0,0 @@ ---ゴッドバードアタック -function c53567095.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,0x1e0) - e1:SetCost(c53567095.cost) - e1:SetTarget(c53567095.target) - e1:SetOperation(c53567095.activate) - c:RegisterEffect(e1) -end -function c53567095.cost(e,tp,eg,ep,ev,re,r,rp,chk) - e:SetLabel(1) - return true -end -function c53567095.costfilter(c,e,dg) - if not c:IsRace(RACE_WINDBEAST) then return false end - local a=0 - if dg:IsContains(c) then a=1 end - if c:GetEquipCount()==0 then return dg:GetCount()-a>=2 end - local eg=c:GetEquipGroup() - local tc=eg:GetFirst() - while tc do - if dg:IsContains(tc) then a=a+1 end - tc=eg:GetNext() - end - return dg:GetCount()-a>=2 -end -function c53567095.tgfilter(c,e) - return c:IsDestructable() and c:IsCanBeEffectTarget(e) -end -function c53567095.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chk==0 then - if chkc then return chkc:IsOnField() and chkc:IsDestructable() end - if e:GetLabel()==1 then - e:SetLabel(0) - local rg=Duel.GetReleaseGroup(tp) - local dg=Duel.GetMatchingGroup(c53567095.tgfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler(),e) - local res=rg:IsExists(c53567095.costfilter,1,e:GetHandler(),e,dg) - return res - else - return Duel.IsExistingTarget(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,2,e:GetHandler()) - end - end - if e:GetLabel()==1 then - e:SetLabel(0) - local rg=Duel.GetReleaseGroup(tp) - local dg=Duel.GetMatchingGroup(c53567095.tgfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler(),e) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) - local sg=rg:FilterSelect(tp,c53567095.costfilter,1,1,e:GetHandler(),e,dg) - Duel.Release(sg,REASON_COST) - end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,2,2,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c53567095.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local sg=g:Filter(Card.IsRelateToEffect,nil,e) - Duel.Destroy(sg,REASON_EFFECT) -end diff --git a/script/c53569894.lua b/script/c53569894.lua deleted file mode 100644 index d29b5871ac..0000000000 --- a/script/c53569894.lua +++ /dev/null @@ -1,26 +0,0 @@ ---光のピラミッド -function c53569894.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_DESTROY+CATEGORY_REMOVE) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_LEAVE_FIELD) - e2:SetOperation(c53569894.leave) - c:RegisterEffect(e2) -end -function c53569894.filter(c) - local code=c:GetCode() - return c:IsFaceup() and (code==15013468 or code==51402177) and c:IsDestructable() -end -function c53569894.leave(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:GetPreviousControler()==tp and c:IsStatus(STATUS_ACTIVATED) then - local g=Duel.GetMatchingGroup(c53569894.filter,tp,LOCATION_ONFIELD,0,nil) - Duel.Destroy(g,REASON_EFFECT,LOCATION_REMOVED) - end -end diff --git a/script/c53573406.lua b/script/c53573406.lua deleted file mode 100644 index 3d0505394a..0000000000 --- a/script/c53573406.lua +++ /dev/null @@ -1,76 +0,0 @@ ---カメンレオン -function c53573406.initial_effect(c) - --cannot summon - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_SUMMON) - e1:SetCondition(c53573406.sumcon) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(53573406,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_SUMMON_SUCCESS) - e2:SetCost(c53573406.spcost) - e2:SetTarget(c53573406.sptg) - e2:SetOperation(c53573406.spop) - c:RegisterEffect(e2) - Duel.AddCustomActivityCounter(53573406,ACTIVITY_SPSUMMON,c53573406.counterfilter) -end -function c53573406.counterfilter(c) - return c:GetSummonLocation()==LOCATION_EXTRA -end -function c53573406.cfilter(c) - return c:IsFaceup() and c:IsLevelAbove(5) -end -function c53573406.sumcon(e) - return Duel.IsExistingMatchingCard(c53573406.cfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) -end -function c53573406.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetCustomActivityCount(53573406,tp,ACTIVITY_SPSUMMON)==0 end - local fid=e:GetHandler():GetFieldID() - e:SetLabel(fid) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) - e1:SetTargetRange(1,0) - e1:SetLabel(fid) - e1:SetTarget(c53573406.sumlimit) - Duel.RegisterEffect(e1,tp) -end -function c53573406.sumlimit(e,c,sump,sumtype,sumpos,targetp,se) - return e:GetLabel()~=se:GetLabel() and not c:IsLocation(LOCATION_EXTRA) -end -function c53573406.filter(c,e,tp) - return c:GetDefence()==0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c53573406.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:GetControler()==tp and chkc:GetLocation()==LOCATION_GRAVE and c53573406.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c53573406.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c53573406.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,g:GetCount(),0,0) -end -function c53573406.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP_DEFENCE) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e2) - end - Duel.SpecialSummonComplete() -end diff --git a/script/c53582587.lua b/script/c53582587.lua deleted file mode 100644 index 44159dc031..0000000000 --- a/script/c53582587.lua +++ /dev/null @@ -1,36 +0,0 @@ ---激流葬 -function c53582587.initial_effect(c) - --Activate(summon) - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c53582587.target) - e1:SetOperation(c53582587.activate) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_ACTIVATE) - e2:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - e2:SetTarget(c53582587.target) - e2:SetOperation(c53582587.activate) - c:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetCategory(CATEGORY_DESTROY) - e3:SetType(EFFECT_TYPE_ACTIVATE) - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - e3:SetTarget(c53582587.target) - e3:SetOperation(c53582587.activate) - c:RegisterEffect(e3) -end -function c53582587.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDestructable,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c53582587.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - if g:GetCount()>0 then - Duel.Destroy(g,REASON_EFFECT) - end -end diff --git a/script/c53586134.lua b/script/c53586134.lua deleted file mode 100644 index 5ca1a1de19..0000000000 --- a/script/c53586134.lua +++ /dev/null @@ -1,58 +0,0 @@ ---バブル・ショット -function c53586134.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c53586134.target) - e1:SetOperation(c53586134.operation) - c:RegisterEffect(e1) - --Equip limit - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_EQUIP_LIMIT) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetValue(c53586134.eqlimit) - c:RegisterEffect(e2) - --equip effect - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_EQUIP) - e3:SetCode(EFFECT_UPDATE_ATTACK) - e3:SetValue(800) - c:RegisterEffect(e3) - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_EQUIP) - e4:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e4:SetCode(EFFECT_DESTROY_SUBSTITUTE) - e4:SetValue(c53586134.repval) - c:RegisterEffect(e4) - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_EQUIP) - e5:SetCode(EFFECT_AVOID_BATTLE_DAMAGE) - e5:SetValue(1) - c:RegisterEffect(e5) -end -function c53586134.eqlimit(e,c) - return c:IsCode(79979666) -end -function c53586134.filter(c) - return c:IsFaceup() and c:IsCode(79979666) -end -function c53586134.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c53586134.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c53586134.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c53586134.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c53586134.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,e:GetHandler(),tc) - end -end -function c53586134.repval(e,re,r,rp) - return bit.band(r,REASON_BATTLE)~=0 -end diff --git a/script/c53610653.lua b/script/c53610653.lua deleted file mode 100644 index c81868fa9f..0000000000 --- a/script/c53610653.lua +++ /dev/null @@ -1,76 +0,0 @@ ---バウンド・ワンド -function c53610653.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c53610653.target) - e1:SetOperation(c53610653.operation) - c:RegisterEffect(e1) - --Atk up - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(c53610653.atkval) - c:RegisterEffect(e2) - --Equip limit - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_EQUIP_LIMIT) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e3:SetValue(c53610653.eqlimit) - c:RegisterEffect(e3) - --spsummon - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(53610653,0)) - e4:SetCategory(CATEGORY_SPECIAL_SUMMON) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e4:SetCode(EVENT_TO_GRAVE) - e4:SetCondition(c53610653.spcon) - e4:SetTarget(c53610653.sptg) - e4:SetOperation(c53610653.spop) - c:RegisterEffect(e4) -end -function c53610653.eqlimit(e,c) - return c:IsRace(RACE_SPELLCASTER) and not c:IsType(TYPE_XYZ) -end -function c53610653.filter(c) - return c:IsFaceup() and c:IsRace(RACE_SPELLCASTER) and not c:IsType(TYPE_XYZ) -end -function c53610653.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c53610653.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c53610653.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c53610653.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c53610653.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,e:GetHandler(),tc) - end -end -function c53610653.atkval(e,c) - return c:GetLevel()*100 -end -function c53610653.spcon(e,tp,eg,ep,ev,re,r,rp) - local ec=e:GetHandler():GetPreviousEquipTarget() - return e:GetHandler():IsReason(REASON_LOST_TARGET) and ec and ec:IsReason(REASON_DESTROY) - and ec:IsLocation(LOCATION_GRAVE) and ec:GetReasonPlayer()==1-tp -end -function c53610653.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - local ec=e:GetHandler():GetPreviousEquipTarget() - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and ec:IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetTargetCard(ec) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,ec,1,0,0) -end -function c53610653.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c5361647.lua b/script/c5361647.lua deleted file mode 100644 index a9ac6d0055..0000000000 --- a/script/c5361647.lua +++ /dev/null @@ -1,52 +0,0 @@ ---BK グラスジョー -function c5361647.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(5361647,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_BE_BATTLE_TARGET) - e1:SetTarget(c5361647.destg) - e1:SetOperation(c5361647.desop) - c:RegisterEffect(e1) - --search - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(5361647,1)) - e2:SetCategory(CATEGORY_TOHAND) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCondition(c5361647.thcon) - e2:SetTarget(c5361647.thtg) - e2:SetOperation(c5361647.thop) - c:RegisterEffect(e2) -end -function c5361647.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0) -end -function c5361647.desop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - Duel.Destroy(e:GetHandler(),REASON_EFFECT) - end -end -function c5361647.thcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsReason(REASON_EFFECT) -end -function c5361647.filter(c) - return c:IsSetCard(0x84) and c:GetCode()~=5361647 and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() -end -function c5361647.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c5361647.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c5361647.filter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c5361647.filter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c5361647.thop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end diff --git a/script/c53623827.lua b/script/c53623827.lua deleted file mode 100644 index 0ed7078081..0000000000 --- a/script/c53623827.lua +++ /dev/null @@ -1,11 +0,0 @@ ---トップ・ランナー -function c53623827.initial_effect(c) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetTarget(aux.TargetBoolFunction(Card.IsType,TYPE_SYNCHRO)) - e1:SetValue(600) - c:RegisterEffect(e1) -end diff --git a/script/c53656677.lua b/script/c53656677.lua deleted file mode 100644 index 1a155ef9a3..0000000000 --- a/script/c53656677.lua +++ /dev/null @@ -1,52 +0,0 @@ ---パワー・フレーム -function c53656677.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_BE_BATTLE_TARGET) - e1:SetTarget(c53656677.target) - e1:SetOperation(c53656677.operation) - c:RegisterEffect(e1) -end -function c53656677.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc==Duel.GetAttackTarget() end - local a=Duel.GetAttacker() - local d=Duel.GetAttackTarget() - if chk==0 then return d and d:IsControler(tp) and d:IsFaceup() and d:IsCanBeEffectTarget(e) - and d:GetAttack()0 - and Duel.IsExistingTarget(c53670497.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c53670497.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c53670497.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c53678698.lua b/script/c53678698.lua deleted file mode 100644 index a8e4144892..0000000000 --- a/script/c53678698.lua +++ /dev/null @@ -1,82 +0,0 @@ ---武神-ミカヅチ -function c53678698.initial_effect(c) - c:SetUniqueOnField(1,0,53678698) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(53678698,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c53678698.spcon) - e1:SetTarget(c53678698.sptg) - e1:SetOperation(c53678698.spop) - c:RegisterEffect(e1) - --search - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(53678698,1)) - e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EVENT_PHASE+PHASE_END) - e2:SetCountLimit(1) - e2:SetCondition(c53678698.thcon) - e2:SetTarget(c53678698.thtg) - e2:SetOperation(c53678698.thop) - c:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e3:SetRange(LOCATION_MZONE) - e3:SetCode(EVENT_TO_GRAVE) - e3:SetCondition(c53678698.regcon) - e3:SetOperation(c53678698.regop) - c:RegisterEffect(e3) -end -function c53678698.cfilter(c,tp) - return c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_MZONE) - and c:IsSetCard(0x88) and c:IsRace(RACE_BEASTWARRIOR) and c:IsReason(REASON_DESTROY) -end -function c53678698.spcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c53678698.cfilter,1,nil,tp) -end -function c53678698.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c53678698.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) - end -end -function c53678698.thcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetFlagEffect(53678698)>0 -end -function c53678698.filter(c) - return c:IsSetCard(0x88) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand() -end -function c53678698.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c53678698.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c53678698.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c53678698.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end -function c53678698.rfilter(c,tp) - return c:IsControler(tp) and c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_HAND) - and c:IsSetCard(0x88) and c:IsType(TYPE_MONSTER) -end -function c53678698.regcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c53678698.rfilter,1,nil,tp) -end -function c53678698.regop(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():RegisterFlagEffect(53678698,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) -end diff --git a/script/c5368615.lua b/script/c5368615.lua deleted file mode 100644 index 5684e85669..0000000000 --- a/script/c5368615.lua +++ /dev/null @@ -1,6 +0,0 @@ ---スチームジャイロイド -function c5368615.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcCode2(c,18325492,44729197,true,true) -end diff --git a/script/c53693416.lua b/script/c53693416.lua deleted file mode 100644 index ea38001163..0000000000 --- a/script/c53693416.lua +++ /dev/null @@ -1,15 +0,0 @@ ---イーグル・アイ -function c53693416.initial_effect(c) - --summon success - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetOperation(c53693416.sumsuc) - c:RegisterEffect(e1) -end -function c53693416.sumsuc(e,tp,eg,ep,ev,re,r,rp) - Duel.SetChainLimitTillChainEnd(c53693416.chlimit) -end -function c53693416.chlimit(re,rp,tp) - return not re:GetHandler():IsType(TYPE_TRAP) or not re:IsHasType(EFFECT_TYPE_ACTIVATE) -end diff --git a/script/c53714009.lua b/script/c53714009.lua deleted file mode 100644 index 75d788a188..0000000000 --- a/script/c53714009.lua +++ /dev/null @@ -1,33 +0,0 @@ ---フレムベル・ウルキサス -function c53714009.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1) - c:EnableReviveLimit() - --pierce - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_PIERCE) - c:RegisterEffect(e1) - --atkup - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(53714009,0)) - e2:SetCategory(CATEGORY_ATKCHANGE) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_BATTLE_DAMAGE) - e2:SetCondition(c53714009.atkcon) - e2:SetOperation(c53714009.atkop) - c:RegisterEffect(e2) -end -function c53714009.atkcon(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp -end -function c53714009.atkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFacedown() or not c:IsRelateToEffect(e) then return end - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(300) - e1:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e1) -end diff --git a/script/c5371656.lua b/script/c5371656.lua deleted file mode 100644 index e24f3b7499..0000000000 --- a/script/c5371656.lua +++ /dev/null @@ -1,52 +0,0 @@ ---魂喰らいの魔刀 -function c5371656.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c5371656.target) - e1:SetOperation(c5371656.operation) - c:RegisterEffect(e1) - --Equip limit - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_EQUIP_LIMIT) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetValue(c5371656.eqlimit) - c:RegisterEffect(e2) -end -function c5371656.eqlimit(e,c) - return c:IsType(TYPE_NORMAL) and c:IsLevelBelow(3) -end -function c5371656.filter(c) - return c:IsFaceup() and c:IsType(TYPE_NORMAL) and c:IsLevelBelow(3) -end -function c5371656.rfilter(c) - local tpe=c:GetType() - return bit.band(tpe,TYPE_NORMAL)~=0 and bit.band(tpe,TYPE_TOKEN)==0 and c:IsReleasable() -end -function c5371656.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c5371656.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c5371656.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local g=Duel.SelectTarget(tp,c5371656.filter,tp,LOCATION_MZONE,0,1,1,nil) - local rg=Duel.GetMatchingGroup(c5371656.rfilter,tp,LOCATION_MZONE,0,g:GetFirst()) - Duel.Release(rg,REASON_COST) - e:SetLabel(rg:GetCount()*1000) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c5371656.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsControler(tp) then - Duel.Equip(tp,e:GetHandler(),tc) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_EQUIP) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(e:GetLabel()) - e1:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e1) - end -end diff --git a/script/c5373478.lua b/script/c5373478.lua deleted file mode 100644 index 3055e3ef21..0000000000 --- a/script/c5373478.lua +++ /dev/null @@ -1,55 +0,0 @@ ---サイバー・ドラゴン・ツヴァイ -function c5373478.initial_effect(c) - --atkup - local e1=Effect.CreateEffect(c) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c5373478.atkcon) - e1:SetValue(300) - c:RegisterEffect(e1) - --change code - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(5373478,0)) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCost(c5373478.cost) - e2:SetOperation(c5373478.cdop) - c:RegisterEffect(e2) - --code - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_CHANGE_CODE) - e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e3:SetRange(LOCATION_GRAVE) - e3:SetValue(70095154) - c:RegisterEffect(e3) -end -function c5373478.atkcon(e) - local phase=Duel.GetCurrentPhase() - return (phase==PHASE_DAMAGE or phase==PHASE_DAMAGE_CAL) - and Duel.GetAttacker()==e:GetHandler() and Duel.GetAttackTarget()~=nil -end -function c5373478.costfilter(c) - return c:IsType(TYPE_SPELL) and not c:IsPublic() -end -function c5373478.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c5373478.costfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) - local g=Duel.SelectMatchingCard(tp,c5373478.costfilter,tp,LOCATION_HAND,0,1,1,nil) - Duel.ConfirmCards(1-tp,g) - Duel.ShuffleHand(tp) -end -function c5373478.cdop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFacedown() or not c:IsRelateToEffect(e) then return end - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CHANGE_CODE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e1:SetValue(70095154) - c:RegisterEffect(e1) -end diff --git a/script/c53778229.lua b/script/c53778229.lua deleted file mode 100644 index dd7c3991be..0000000000 --- a/script/c53778229.lua +++ /dev/null @@ -1,28 +0,0 @@ ---墓地封印 -function c53778229.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c53778229.cost) - e1:SetOperation(c53778229.activate) - c:RegisterEffect(e1) -end -function c53778229.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) -end -function c53778229.activate(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e1:SetCode(EVENT_CHAIN_ACTIVATING) - e1:SetOperation(c53778229.disop) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function c53778229.disop(e,tp,eg,ep,ev,re,r,rp) - local loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION) - if loc==LOCATION_GRAVE then - Duel.NegateEffect(ev) - end -end diff --git a/script/c53797637.lua b/script/c53797637.lua deleted file mode 100644 index 94501475cc..0000000000 --- a/script/c53797637.lua +++ /dev/null @@ -1,46 +0,0 @@ ---炎征竜-バーナー -function c53797637.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(53797637,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(1,53797637) - e1:SetCost(c53797637.spcost) - e1:SetTarget(c53797637.sptg) - e1:SetOperation(c53797637.spop) - c:RegisterEffect(e1) -end -function c53797637.costfilter(c) - return (c:IsRace(RACE_DRAGON) or c:IsAttribute(ATTRIBUTE_FIRE)) and c:IsDiscardable() -end -function c53797637.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsDiscardable() - and Duel.IsExistingMatchingCard(c53797637.costfilter,tp,LOCATION_HAND,0,1,c) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) - local g=Duel.SelectMatchingCard(tp,c53797637.costfilter,tp,LOCATION_HAND,0,1,1,c) - g:AddCard(c) - Duel.SendtoGrave(g,REASON_COST+REASON_DISCARD) -end -function c53797637.spfilter(c,e,tp) - return c:IsCode(53804307) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c53797637.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c53797637.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c53797637.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local tc=Duel.GetFirstMatchingCard(c53797637.spfilter,tp,LOCATION_DECK,0,nil,e,tp) - if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - Duel.SpecialSummonComplete() - end -end diff --git a/script/c53804307.lua b/script/c53804307.lua deleted file mode 100644 index 7ba210de1f..0000000000 --- a/script/c53804307.lua +++ /dev/null @@ -1,125 +0,0 @@ ---焔征竜-ブラスター -function c53804307.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(53804307,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND+LOCATION_GRAVE) - e1:SetCountLimit(1,53804307) - e1:SetCost(c53804307.hspcost) - e1:SetTarget(c53804307.hsptg) - e1:SetOperation(c53804307.hspop) - c:RegisterEffect(e1) - --return - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(53804307,1)) - e2:SetCategory(CATEGORY_TOHAND) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,53804307) - e2:SetCode(EVENT_PHASE+PHASE_END) - e2:SetCondition(c53804307.retcon) - e2:SetTarget(c53804307.rettg) - e2:SetOperation(c53804307.retop) - c:RegisterEffect(e2) - --destroy - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(53804307,2)) - e3:SetCategory(CATEGORY_DESTROY) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_HAND) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetCountLimit(1,53804307) - e3:SetCost(c53804307.descost) - e3:SetTarget(c53804307.destg) - e3:SetOperation(c53804307.desop) - c:RegisterEffect(e3) - --search - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(53804307,3)) - e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e4:SetCode(EVENT_REMOVE) - e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e4:SetCountLimit(1,53804307) - e4:SetTarget(c53804307.thtg) - e4:SetOperation(c53804307.thop) - c:RegisterEffect(e4) -end -function c53804307.rfilter(c) - return (c:IsRace(RACE_DRAGON) or c:IsAttribute(ATTRIBUTE_FIRE)) and c:IsAbleToRemoveAsCost() -end -function c53804307.hspcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c53804307.rfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,2,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c53804307.rfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,2,2,e:GetHandler()) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c53804307.hsptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c53804307.hspop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) - end -end -function c53804307.retcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp - and bit.band(e:GetHandler():GetSummonType(),SUMMON_TYPE_SPECIAL)==SUMMON_TYPE_SPECIAL -end -function c53804307.rettg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,e:GetHandler(),1,0,0) -end -function c53804307.retop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - Duel.SendtoHand(c,nil,REASON_EFFECT) - end -end -function c53804307.dfilter(c) - return c:IsAttribute(ATTRIBUTE_FIRE) and c:IsDiscardable() and c:IsAbleToGraveAsCost() -end -function c53804307.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsDiscardable() and e:GetHandler():IsAbleToGraveAsCost() - and Duel.IsExistingMatchingCard(c53804307.dfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) - local g=Duel.SelectMatchingCard(tp,c53804307.dfilter,tp,LOCATION_HAND,0,1,1,e:GetHandler()) - g:AddCard(e:GetHandler()) - Duel.SendtoGrave(g,REASON_COST+REASON_DISCARD) -end -function c53804307.desfilter(c) - return c:IsDestructable() -end -function c53804307.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and c53804307.desfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c53804307.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c53804307.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c53804307.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end -function c53804307.thfilter(c) - return c:IsRace(RACE_DRAGON) and c:IsAttribute(ATTRIBUTE_FIRE) and c:IsAbleToHand() -end -function c53804307.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c53804307.thfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c53804307.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c53804307.thfilter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c53819808.lua b/script/c53819808.lua deleted file mode 100644 index cf62ecd57c..0000000000 --- a/script/c53819808.lua +++ /dev/null @@ -1,38 +0,0 @@ ---六武院 -function c53819808.initial_effect(c) - c:EnableCounterPermit(0x3003) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --add counter - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetRange(LOCATION_SZONE) - e2:SetCode(EVENT_SUMMON_SUCCESS) - e2:SetOperation(c53819808.ctop) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e3) - --atk down - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_FIELD) - e4:SetCode(EFFECT_UPDATE_ATTACK) - e4:SetRange(LOCATION_SZONE) - e4:SetTargetRange(0,LOCATION_MZONE) - e4:SetValue(c53819808.val) - c:RegisterEffect(e4) -end -function c53819808.ctfilter(c) - return c:IsFaceup() and c:IsSetCard(0x3d) -end -function c53819808.ctop(e,tp,eg,ep,ev,re,r,rp) - if eg:IsExists(c53819808.ctfilter,1,nil) then - e:GetHandler():AddCounter(0x3003,1) - end -end -function c53819808.val(e) - return e:GetHandler():GetCounter(0x3003)*-100 -end diff --git a/script/c53828396.lua b/script/c53828396.lua deleted file mode 100644 index 3889fb8f4c..0000000000 --- a/script/c53828396.lua +++ /dev/null @@ -1,67 +0,0 @@ ---瞬着ボマー -function c53828396.initial_effect(c) - --equip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(53828396,0)) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_BATTLE_CONFIRM) - e1:SetCondition(c53828396.eqcon) - e1:SetOperation(c53828396.eqop) - c:RegisterEffect(e1) -end -function c53828396.eqcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetAttackTarget()==e:GetHandler() and e:GetHandler():GetBattlePosition()==POS_FACEDOWN_DEFENCE -end -function c53828396.eqop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetAttacker() - if not tc:IsRelateToBattle() or not c:IsRelateToBattle() then return end - if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or tc:IsFacedown() then - Duel.Destroy(c,REASON_EFFECT) - return - end - Duel.Equip(tp,c,tc) - local e1=Effect.CreateEffect(tc) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(c53828396.eqlimit) - c:RegisterEffect(e1) - --destroy&damage - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(53828396,1)) - e2:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) - e2:SetRange(LOCATION_SZONE) - e2:SetCountLimit(1) - e2:SetCondition(c53828396.descon) - e2:SetTarget(c53828396.destg) - e2:SetOperation(c53828396.desop) - e2:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e2) -end -function c53828396.eqlimit(e,c) - return e:GetOwner()==c -end -function c53828396.descon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp -end -function c53828396.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local ec=e:GetHandler():GetEquipTarget() - ec:CreateEffectRelation(e) - e:SetLabelObject(ec) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,ec,1,0,0) -end -function c53828396.desop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) then return end - local ec=e:GetLabelObject() - if ec:IsRelateToEffect(e) and ec:IsFaceup() then - if Duel.Destroy(ec,REASON_EFFECT)~=0 then - else Duel.Destroy(c,REASON_EFFECT) end - end -end diff --git a/script/c53839837.lua b/script/c53839837.lua deleted file mode 100644 index c3b6bf3b09..0000000000 --- a/script/c53839837.lua +++ /dev/null @@ -1,78 +0,0 @@ ---ヴァンパイア・ロード -function c53839837.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetOperation(c53839837.spr) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(53839837,4)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetRange(LOCATION_GRAVE) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) - e2:SetCondition(c53839837.spcon) - e2:SetTarget(c53839837.sptg) - e2:SetOperation(c53839837.spop) - e2:SetLabelObject(e1) - c:RegisterEffect(e2) - --to grave - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(53839837,0)) - e3:SetCategory(CATEGORY_TOGRAVE) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e3:SetCode(EVENT_BATTLE_DAMAGE) - e3:SetCondition(c53839837.tgcon) - e3:SetTarget(c53839837.tgtg) - e3:SetOperation(c53839837.tgop) - c:RegisterEffect(e3) -end -function c53839837.spr(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if bit.band(r,0x41)~=0x41 or rp==tp or c:GetPreviousControler()~=tp then return end - if Duel.GetTurnPlayer()==tp and Duel.GetCurrentPhase()==PHASE_STANDBY then - e:SetLabel(Duel.GetTurnCount()) - c:RegisterFlagEffect(53839837,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,0,2) - else - e:SetLabel(0) - c:RegisterFlagEffect(53839837,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,0,1) - end -end -function c53839837.spcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return e:GetLabelObject():GetLabel()~=Duel.GetTurnCount() and tp==Duel.GetTurnPlayer() and c:GetFlagEffect(53839837)>0 -end -function c53839837.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local c=e:GetHandler() - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0) - c:ResetFlagEffect(53839837) -end -function c53839837.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) - end -end -function c53839837.tgcon(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp -end -function c53839837.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(53839837,5)) - local op=Duel.SelectOption(tp,aux.Stringid(53839837,1),aux.Stringid(53839837,2),aux.Stringid(53839837,3)) - e:SetLabel(op) - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,1-tp,LOCATION_DECK) -end -function c53839837.tgfilter(c,ty) - return c:IsType(ty) and c:IsAbleToGrave() -end -function c53839837.tgop(e,tp,eg,ep,ev,re,r,rp) - local g=nil - Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_TOGRAVE) - if e:GetLabel()==0 then g=Duel.SelectMatchingCard(1-tp,c53839837.tgfilter,1-tp,LOCATION_DECK,0,1,1,nil,TYPE_MONSTER) - elseif e:GetLabel()==1 then g=Duel.SelectMatchingCard(1-tp,c53839837.tgfilter,1-tp,LOCATION_DECK,0,1,1,nil,TYPE_SPELL) - else g=Duel.SelectMatchingCard(1-tp,c53839837.tgfilter,1-tp,LOCATION_DECK,0,1,1,nil,TYPE_TRAP) end - Duel.SendtoGrave(g,REASON_EFFECT) -end diff --git a/script/c53855409.lua b/script/c53855409.lua deleted file mode 100644 index e9d26e19fd..0000000000 --- a/script/c53855409.lua +++ /dev/null @@ -1,59 +0,0 @@ ---ドッペル・ウォリアー -function c53855409.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(53855409,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetRange(LOCATION_HAND) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(c53855409.spcon) - e1:SetTarget(c53855409.sptg) - e1:SetOperation(c53855409.spop) - c:RegisterEffect(e1) - --token - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(53855409,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_BE_MATERIAL) - e2:SetCondition(c53855409.tcon) - e2:SetTarget(c53855409.ttg) - e2:SetOperation(c53855409.top) - c:RegisterEffect(e2) -end -function c53855409.gfilter(c,tp) - return c:GetPreviousLocation()==LOCATION_GRAVE and c:GetPreviousControler()==tp -end -function c53855409.spcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c53855409.gfilter,1,nil,tp) -end -function c53855409.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c53855409.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) - end -end -function c53855409.tcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsLocation(LOCATION_GRAVE) and r==REASON_SYNCHRO -end -function c53855409.ttg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>1 - and Duel.IsPlayerCanSpecialSummonMonster(tp,53855410,0,0x4011,400,400,1,RACE_WARRIOR,ATTRIBUTE_DARK) end - Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,2,0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,0,0) -end -function c53855409.top(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 then return end - if not Duel.IsPlayerCanSpecialSummonMonster(tp,53855410,0,0x4011,400,400,1,RACE_WARRIOR,ATTRIBUTE_DARK) then return end - for i=1,2 do - local token=Duel.CreateToken(tp,53855409+i) - Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP_ATTACK) - end - Duel.SpecialSummonComplete() -end diff --git a/script/c53890795.lua b/script/c53890795.lua deleted file mode 100644 index 4f1ebf7178..0000000000 --- a/script/c53890795.lua +++ /dev/null @@ -1,14 +0,0 @@ ---ロケット・ジャンパー -function c53890795.initial_effect(c) - --direct attack - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DIRECT_ATTACK) - e1:SetCondition(c53890795.dircon) - c:RegisterEffect(e1) -end -function c53890795.dircon(e) - local tp=e:GetHandler():GetControler() - return Duel.GetFieldGroupCount(tp,0,LOCATION_SZONE)==0 - and not Duel.IsExistingMatchingCard(Card.IsAttackPos,tp,0,LOCATION_MZONE,1,nil) -end diff --git a/script/c53921056.lua b/script/c53921056.lua deleted file mode 100644 index a170d10568..0000000000 --- a/script/c53921056.lua +++ /dev/null @@ -1,36 +0,0 @@ ---氷結界の虎将 ガンターラ -function c53921056.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(53921056,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetRange(LOCATION_MZONE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCountLimit(1) - e1:SetCondition(c53921056.spcon) - e1:SetTarget(c53921056.sptg) - e1:SetOperation(c53921056.spop) - c:RegisterEffect(e1) -end -function c53921056.filter(c,e,tp) - return c:IsSetCard(0x2f) and c:GetCode()~=53921056 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c53921056.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c53921056.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c53921056.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c53921056.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c53921056.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,g:GetCount(),0,0) -end -function c53921056.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c53927679.lua b/script/c53927679.lua deleted file mode 100644 index 9c1a0806ca..0000000000 --- a/script/c53927679.lua +++ /dev/null @@ -1,34 +0,0 @@ ---ファイヤー・トルーパー -function c53927679.initial_effect(c) - --damage - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(53927679,0)) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE) - e1:SetCost(c53927679.cost) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c53927679.tg) - e1:SetOperation(c53927679.op) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e2) - local e3=e1:Clone() - e3:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - c:RegisterEffect(e3) -end -function c53927679.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end -function c53927679.tg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(1000) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,1000) -end -function c53927679.op(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end \ No newline at end of file diff --git a/script/c53932291.lua b/script/c53932291.lua deleted file mode 100644 index f0d4dec1e0..0000000000 --- a/script/c53932291.lua +++ /dev/null @@ -1,63 +0,0 @@ ---SRタケトンボーグ -function c53932291.initial_effect(c) - c:SetSPSummonOnce(53932291) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c53932291.spcon) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(53932291,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCost(c53932291.spcost) - e2:SetTarget(c53932291.sptg) - e2:SetOperation(c53932291.spop) - c:RegisterEffect(e2) -end -function c53932291.spfilter(c) - return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_WIND) -end -function c53932291.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c53932291.spfilter,tp,LOCATION_MZONE,0,1,nil) -end -function c53932291.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end -function c53932291.filter(c,e,tp) - return c:IsSetCard(0x2016) and c:IsType(TYPE_TUNER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c53932291.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsExistingMatchingCard(c53932291.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c53932291.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c53932291.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end - end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetTargetRange(1,0) - e1:SetTarget(c53932291.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function c53932291.splimit(e,c,tp,sumtp,sumpos) - return c:GetAttribute()~=ATTRIBUTE_WIND -end diff --git a/script/c53944920.lua b/script/c53944920.lua deleted file mode 100644 index 550bcf2a93..0000000000 --- a/script/c53944920.lua +++ /dev/null @@ -1,19 +0,0 @@ ---ジェネクス・ヒート -function c53944920.initial_effect(c) - --summon with no tribute - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(53944920,0)) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SUMMON_PROC) - e1:SetCondition(c53944920.ntcon) - c:RegisterEffect(e1) -end -function c53944920.ntfilter(c) - return c:IsFaceup() and c:IsCode(68505803) -end -function c53944920.ntcon(e,c,minc) - if c==nil then return true end - return minc==0 and c:GetLevel()>4 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c53944920.ntfilter,c:GetControler(),LOCATION_MZONE,0,1,nil) -end diff --git a/script/c53981499.lua b/script/c53981499.lua deleted file mode 100644 index 7dbbc86e2a..0000000000 --- a/script/c53981499.lua +++ /dev/null @@ -1,36 +0,0 @@ ---マイティ・ウォリアー -function c53981499.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1) - c:EnableReviveLimit() - --damage - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(53981499,0)) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_BATTLE_DESTROYING) - e1:SetCondition(c53981499.damcon) - e1:SetTarget(c53981499.damtg) - e1:SetOperation(c53981499.damop) - c:RegisterEffect(e1) -end -function c53981499.damcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local bc=c:GetBattleTarget() - return c:IsRelateToBattle() and bc:IsType(TYPE_MONSTER) -end -function c53981499.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local c=e:GetHandler() - local bc=c:GetBattleTarget() - local dam=bc:GetAttack()/2 - if dam<0 then dam=0 end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(dam) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,dam) -end -function c53981499.damop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c53982768.lua b/script/c53982768.lua deleted file mode 100644 index 8ee6a85046..0000000000 --- a/script/c53982768.lua +++ /dev/null @@ -1,37 +0,0 @@ ---冥界の魔王 ハ・デス -function c53982768.initial_effect(c) - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_SINGLE_RANGE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetRange(LOCATION_GRAVE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - c:RegisterEffect(e1) - --Disable - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_BATTLED) - e2:SetRange(LOCATION_MZONE) - e2:SetOperation(c53982768.operation) - c:RegisterEffect(e2) -end -function c53982768.operation(e,tp,eg,ep,ev,re,r,rp) - local a=Duel.GetAttacker() - local d=Duel.GetAttackTarget() - local p=e:GetHandler():GetControler() - if d==nil then return end - local tc=nil - if a:GetControler()==p and a:IsRace(RACE_FIEND) and d:IsStatus(STATUS_BATTLE_DESTROYED) then tc=d - elseif d:GetControler()==p and d:IsRace(RACE_FIEND) and a:IsStatus(STATUS_BATTLE_DESTROYED) then tc=a end - if not tc then return end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0x17a0000) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+0x17a0000) - tc:RegisterEffect(e2) -end diff --git a/script/c5399521.lua b/script/c5399521.lua deleted file mode 100644 index 56ee9681cf..0000000000 --- a/script/c5399521.lua +++ /dev/null @@ -1,97 +0,0 @@ ---音響戦士マイクス -function c5399521.initial_effect(c) - --pendulum summon - aux.AddPendulumProcedure(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --scale - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_CHANGE_LSCALE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_PZONE) - e2:SetCondition(c5399521.slcon) - e2:SetValue(4) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EFFECT_CHANGE_RSCALE) - c:RegisterEffect(e3) - --tohand - local e4=Effect.CreateEffect(c) - e4:SetCategory(CATEGORY_TOHAND) - e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e4:SetProperty(EFFECT_FLAG_CARD_TARGET) - e4:SetCode(EVENT_PHASE+PHASE_END) - e4:SetRange(LOCATION_PZONE) - e4:SetCountLimit(1) - e4:SetCondition(c5399521.thcon) - e4:SetTarget(c5399521.thtg) - e4:SetOperation(c5399521.thop) - c:RegisterEffect(e4) - --spsummon - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_FIELD) - e5:SetCode(EFFECT_SPSUMMON_PROC) - e5:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e5:SetRange(LOCATION_HAND) - e5:SetCondition(c5399521.spcon) - e5:SetOperation(c5399521.spop) - c:RegisterEffect(e5) - --extra summon - local e6=Effect.CreateEffect(c) - e6:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e6:SetCode(EVENT_SUMMON_SUCCESS) - e6:SetOperation(c5399521.sumop) - c:RegisterEffect(e6) - local e7=e6:Clone() - e7:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e7) -end -function c5399521.thcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c5399521.thfilter(c) - return c:IsFaceup() and c:IsSetCard(0x1066) and c:IsAbleToHand() -end -function c5399521.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_REMOVED) and c5399521.thfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c5399521.thfilter,tp,LOCATION_REMOVED,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c5399521.thfilter,tp,LOCATION_REMOVED,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c5399521.thop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end -function c5399521.slcon(e) - local seq=e:GetHandler():GetSequence() - local tc=Duel.GetFieldCard(e:GetHandlerPlayer(),LOCATION_SZONE,13-seq) - return not tc or not tc:IsSetCard(0x1066) -end -function c5399521.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsCanRemoveCounter(tp,1,0,0x35,3,REASON_COST) -end -function c5399521.spop(e,tp,eg,ep,ev,re,r,rp,c) - Duel.RemoveCounter(tp,1,0,0x35,3,REASON_COST) -end -function c5399521.sumop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetFlagEffect(tp,5399521)~=0 then return end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetTargetRange(LOCATION_HAND+LOCATION_MZONE,0) - e1:SetCode(EFFECT_EXTRA_SUMMON_COUNT) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) - Duel.RegisterFlagEffect(tp,5399521,RESET_PHASE+PHASE_END,0,1) -end diff --git a/script/c54031490.lua b/script/c54031490.lua deleted file mode 100644 index b80701bef1..0000000000 --- a/script/c54031490.lua +++ /dev/null @@ -1,27 +0,0 @@ ---紫炎の狼煙 -function c54031490.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c54031490.target) - e1:SetOperation(c54031490.activate) - c:RegisterEffect(e1) -end -function c54031490.filter(c) - local lv=c:GetLevel() - return c:IsSetCard(0x3d) and lv>0 and lv<4 and c:IsAbleToHand() -end -function c54031490.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c54031490.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c54031490.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c54031490.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c54040221.lua b/script/c54040221.lua deleted file mode 100644 index e2fdf1c3dd..0000000000 --- a/script/c54040221.lua +++ /dev/null @@ -1,38 +0,0 @@ ---炎帝近衛兵 -function c54040221.initial_effect(c) - --to deck and draw - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(54040221,0)) - e1:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c54040221.tg) - e1:SetOperation(c54040221.op) - c:RegisterEffect(e1) -end -function c54040221.filter(c) - return c:IsRace(RACE_PYRO) and c:IsAbleToDeck() -end -function c54040221.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c54040221.filter(chkc) end - if chk==0 then return true end - if Duel.IsExistingTarget(c54040221.filter,tp,LOCATION_GRAVE,0,4,nil) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectTarget(tp,c54040221.filter,tp,LOCATION_GRAVE,0,4,4,nil) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2) - end -end -function c54040221.op(e,tp,eg,ep,ev,re,r,rp) - local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - if not tg or tg:FilterCount(Card.IsRelateToEffect,nil,e)~=4 then return end - Duel.SendtoDeck(tg,nil,0,REASON_EFFECT) - local g=Duel.GetOperatedGroup() - local ct=g:FilterCount(Card.IsLocation,nil,LOCATION_DECK+LOCATION_EXTRA) - if ct==4 then - Duel.ShuffleDeck(tp) - Duel.BreakEffect() - Duel.Draw(tp,2,REASON_EFFECT) - end -end diff --git a/script/c54048462.lua b/script/c54048462.lua deleted file mode 100644 index a4b81e05ef..0000000000 --- a/script/c54048462.lua +++ /dev/null @@ -1,35 +0,0 @@ ---魔轟神ヴァルキュルス -function c54048462.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0x35),aux.NonTuner(nil),1) - c:EnableReviveLimit() - --draw - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(54048462,0)) - e1:SetCategory(CATEGORY_DRAW) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c54048462.cost) - e1:SetTarget(c54048462.tg) - e1:SetOperation(c54048462.op) - c:RegisterEffect(e1) -end -function c54048462.costfilter(c) - return c:IsRace(RACE_FIEND) and c:IsDiscardable() -end -function c54048462.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c54048462.costfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,c54048462.costfilter,1,1,REASON_DISCARD+REASON_COST) -end -function c54048462.tg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(1) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c54048462.op(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end diff --git a/script/c5405694.lua b/script/c5405694.lua deleted file mode 100644 index df9605f342..0000000000 --- a/script/c5405694.lua +++ /dev/null @@ -1,4 +0,0 @@ ---カオス・ソルジャー -function c5405694.initial_effect(c) - c:EnableReviveLimit() -end diff --git a/script/c54059040.lua b/script/c54059040.lua deleted file mode 100644 index 685509ef53..0000000000 --- a/script/c54059040.lua +++ /dev/null @@ -1,59 +0,0 @@ ---アイスバーン -function c54059040.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_SUMMON+TIMING_SPSUMMON) - e1:SetTarget(c54059040.target1) - e1:SetOperation(c54059040.operation) - c:RegisterEffect(e1) - --pos - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(54059040,0)) - e2:SetCategory(CATEGORY_POSITION) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_SUMMON_SUCCESS) - e2:SetRange(LOCATION_SZONE) - e2:SetTarget(c54059040.target2) - e2:SetOperation(c54059040.operation) - e2:SetLabel(1) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e3) -end -function c54059040.cfilter(c) - return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_WATER) -end -function c54059040.pfilter(c,e) - return c:IsPosition(POS_FACEUP_ATTACK) and not c:IsAttribute(ATTRIBUTE_WATER) and (not e or c:IsRelateToEffect(e)) -end -function c54059040.target1(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local res,teg,tep,tev,tre,tr,trp=Duel.CheckEvent(EVENT_SUMMON_SUCCESS,true) - if not res then - res,teg,tep,tev,tre,tr,trp=Duel.CheckEvent(EVENT_SPSUMMON_SUCCESS,true) - end - if res and Duel.IsExistingMatchingCard(c54059040.cfilter,tp,LOCATION_MZONE,0,1,nil) - and teg:IsExists(c54059040.pfilter,1,nil) - and Duel.SelectYesNo(tp,aux.Stringid(54059040,1)) then - e:SetLabel(1) - Duel.SetTargetCard(teg) - Duel.SetOperationInfo(0,CATEGORY_POSITION,teg,teg:GetCount(),0,0) - else - e:SetLabel(0) - end -end -function c54059040.target2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsRelateToEffect(e) - and Duel.IsExistingMatchingCard(c54059040.cfilter,tp,LOCATION_MZONE,0,1,nil) - and eg:IsExists(c54059040.pfilter,1,nil) end - Duel.SetTargetCard(eg) - Duel.SetOperationInfo(0,CATEGORY_POSITION,eg,eg:GetCount(),0,0) -end -function c54059040.operation(e,tp,eg,ep,ev,re,r,rp) - if e:GetLabel()==0 or not e:GetHandler():IsRelateToEffect(e) then return end - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(c54059040.pfilter,nil,e) - Duel.ChangePosition(g,POS_FACEUP_DEFENCE) -end diff --git a/script/c54094821.lua b/script/c54094821.lua deleted file mode 100644 index 61e161dbd5..0000000000 --- a/script/c54094821.lua +++ /dev/null @@ -1,30 +0,0 @@ ---リチュアルバスター -function c54094821.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(c54094821.condition) - e1:SetOperation(c54094821.activate) - c:RegisterEffect(e1) -end -function c54094821.condition(e,tp,eg,ep,ev,re,r,rp) - return eg:GetCount()==1 and eg:GetFirst():GetSummonType()==SUMMON_TYPE_RITUAL -end -function c54094821.activate(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EFFECT_CANNOT_ACTIVATE) - e1:SetTargetRange(0,1) - e1:SetValue(c54094821.aclimit) - if Duel.GetTurnPlayer()==tp then - e1:SetReset(RESET_PHASE+PHASE_STANDBY,2) - else - e1:SetReset(RESET_PHASE+PHASE_STANDBY,1) - end - Duel.RegisterEffect(e1,tp) -end -function c54094821.aclimit(e,re,tp) - return re:GetHandler():IsType(TYPE_SPELL+TYPE_TRAP) -end diff --git a/script/c54098121.lua b/script/c54098121.lua deleted file mode 100644 index 0f69cf9686..0000000000 --- a/script/c54098121.lua +++ /dev/null @@ -1,31 +0,0 @@ ---謎の傀儡師 -function c54098121.initial_effect(c) - --recover - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(54098121,0)) - e1:SetCategory(CATEGORY_RECOVER) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c54098121.con) - e1:SetTarget(c54098121.tg) - e1:SetOperation(c54098121.op) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - c:RegisterEffect(e2) -end -function c54098121.con(e,tp,eg,ep,ev,re,r,rp) - return not eg:IsContains(e:GetHandler()) -end -function c54098121.tg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(500) - Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,500) -end -function c54098121.op(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Recover(p,d,REASON_EFFECT) -end diff --git a/script/c54109233.lua b/script/c54109233.lua deleted file mode 100644 index 8e3f4f45eb..0000000000 --- a/script/c54109233.lua +++ /dev/null @@ -1,48 +0,0 @@ ---メサイアの蟻地獄 -function c54109233.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(54109233,0)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetRange(LOCATION_SZONE) - e2:SetCountLimit(1) - e2:SetCode(EVENT_PHASE+PHASE_END) - e2:SetTarget(c54109233.target) - e2:SetOperation(c54109233.activate) - c:RegisterEffect(e2) - if not c54109233.global_check then - c54109233.global_check=true - local ge1=Effect.CreateEffect(c) - ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - ge1:SetCode(EVENT_SUMMON_SUCCESS) - ge1:SetOperation(c54109233.checkop) - Duel.RegisterEffect(ge1,0) - local ge2=Effect.CreateEffect(c) - ge2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - ge2:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - ge2:SetOperation(c54109233.checkop) - Duel.RegisterEffect(ge2,0) - end -end -function c54109233.checkop(e,tp,eg,ep,ev,re,r,rp) - eg:GetFirst():RegisterFlagEffect(54109233,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) -end -function c54109233.filter(c) - return c:IsLevelBelow(3) and c:GetFlagEffect(54109233)~=0 and c:IsDestructable() -end -function c54109233.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local g=Duel.GetMatchingGroup(c54109233.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c54109233.activate(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local g=Duel.GetMatchingGroup(c54109233.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - Duel.Destroy(g,REASON_EFFECT) -end diff --git a/script/c54149433.lua b/script/c54149433.lua deleted file mode 100644 index bdead36f60..0000000000 --- a/script/c54149433.lua +++ /dev/null @@ -1,65 +0,0 @@ ---炎王獣 ガルドニクス -function c54149433.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(54149433,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DELAY) - e1:SetRange(LOCATION_HAND) - e1:SetCode(EVENT_DESTROYED) - e1:SetCondition(c54149433.spcon) - e1:SetTarget(c54149433.sptg) - e1:SetOperation(c54149433.spop) - c:RegisterEffect(e1) - -- - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(54149433,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetCondition(c54149433.spcon2) - e2:SetTarget(c54149433.sptg2) - e2:SetOperation(c54149433.spop2) - c:RegisterEffect(e2) -end -function c54149433.cfilter(c,tp) - return c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP) and c:GetPreviousControler()==tp - and c:IsReason(REASON_EFFECT) and c:IsSetCard(0x81) -end -function c54149433.spcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c54149433.cfilter,1,nil,tp) -end -function c54149433.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsRelateToEffect(e) - and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c54149433.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) - end -end -function c54149433.spcon2(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:GetPreviousControler()==tp and rp~=tp and c:IsReason(REASON_DESTROY) -end -function c54149433.spfilter(c,e,tp) - return c:IsSetCard(0x1081) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c54149433.sptg2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c54149433.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c54149433.spop2(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c54149433.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c54161401.lua b/script/c54161401.lua deleted file mode 100644 index 89feb01fb5..0000000000 --- a/script/c54161401.lua +++ /dev/null @@ -1,32 +0,0 @@ ---ナチュル・ロック -function c54161401.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(54161401,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetRange(LOCATION_HAND) - e1:SetCode(EVENT_CHAINING) - e1:SetCondition(c54161401.spcon) - e1:SetCost(c54161401.spcost) - e1:SetTarget(c54161401.sptg) - e1:SetOperation(c54161401.spop) - c:RegisterEffect(e1) -end -function c54161401.spcon(e,tp,eg,ep,ev,re,r,rp) - return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:GetHandler():IsType(TYPE_TRAP) -end -function c54161401.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDiscardDeckAsCost(tp,1) end - Duel.DiscardDeck(tp,1,REASON_COST) -end -function c54161401.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return not e:GetHandler():IsStatus(STATUS_CHAINING) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c54161401.spop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c54178050.lua b/script/c54178050.lua deleted file mode 100644 index ecba4410fe..0000000000 --- a/script/c54178050.lua +++ /dev/null @@ -1,16 +0,0 @@ ---竜の逆鱗 -function c54178050.initial_effect(c) - --activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --pierce - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_PIERCE) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(LOCATION_MZONE,0) - e2:SetTarget(aux.TargetBoolFunction(Card.IsRace,RACE_DRAGON)) - c:RegisterEffect(e2) -end diff --git a/script/c54241725.lua b/script/c54241725.lua deleted file mode 100644 index c6d012de67..0000000000 --- a/script/c54241725.lua +++ /dev/null @@ -1,106 +0,0 @@ ---真源の帝王 -function c54241725.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_ATTACK) - e1:SetTarget(c54241725.acttg) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(54241725,0)) - e2:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetRange(LOCATION_SZONE) - e2:SetCost(c54241725.drcost) - e2:SetTarget(c54241725.drtg) - e2:SetOperation(c54241725.drop) - c:RegisterEffect(e2) - --spsummon - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(54241725,1)) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_QUICK_O) - e3:SetCode(EVENT_FREE_CHAIN) - e3:SetRange(LOCATION_GRAVE) - e3:SetCountLimit(1,54241725) - e3:SetCost(c54241725.spcost) - e3:SetTarget(c54241725.sptg) - e3:SetOperation(c54241725.spop) - c:RegisterEffect(e3) -end -function c54241725.acttg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chk==0 then return true end - if c54241725.drcost(e,tp,eg,ep,ev,re,r,rp,0) and c54241725.drtg(e,tp,eg,ep,ev,re,r,rp,0,chkc) and Duel.SelectYesNo(tp,94) then - e:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW) - e:SetProperty(EFFECT_FLAG_CARD_TARGET) - e:SetOperation(c54241725.drop) - c54241725.drcost(e,tp,eg,ep,ev,re,r,rp,1) - c54241725.drtg(e,tp,eg,ep,ev,re,r,rp,1,chkc) - e:GetHandler():RegisterFlagEffect(0,RESET_CHAIN,EFFECT_FLAG_CLIENT_HINT,1,0,65) - else - e:SetCategory(0) - e:SetProperty(0) - e:SetOperation(nil) - end -end -function c54241725.drcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():GetFlagEffect(54241725)==0 end - e:GetHandler():RegisterFlagEffect(54241725,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) -end -function c54241725.tdfilter(c) - return c:IsSetCard(0xbe) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToDeck() -end -function c54241725.drtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c54241725.tdfilter(chkc) end - if chk==0 then return Duel.IsPlayerCanDraw(tp,1) - and Duel.IsExistingTarget(c54241725.tdfilter,tp,LOCATION_GRAVE,0,2,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectTarget(tp,c54241725.tdfilter,tp,LOCATION_GRAVE,0,2,2,nil) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c54241725.drop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) - if tg:GetCount()<=0 then return end - Duel.SendtoDeck(tg,nil,0,REASON_EFFECT) - Duel.ShuffleDeck(tp) - Duel.BreakEffect() - Duel.Draw(tp,1,REASON_EFFECT) -end -function c54241725.cfilter(c) - return c:IsSetCard(0xbe) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToRemoveAsCost() -end -function c54241725.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c54241725.cfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler()) - and e:GetHandler():GetFlagEffect(54241725)==0 end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c54241725.cfilter,tp,LOCATION_GRAVE,0,1,1,e:GetHandler()) - Duel.Remove(g,POS_FACEUP,REASON_COST) - e:GetHandler():RegisterFlagEffect(54241725,RESET_CHAIN,0,1) -end -function c54241725.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsPlayerCanSpecialSummonMonster(tp,54241725,0,0x11,5,1000,2400,RACE_FAIRY,ATTRIBUTE_LIGHT) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c54241725.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local c=e:GetHandler() - if c:IsRelateToEffect(e) - and Duel.IsPlayerCanSpecialSummonMonster(tp,54241725,0,0x11,5,1000,2400,RACE_FAIRY,ATTRIBUTE_LIGHT) then - c:SetStatus(STATUS_NO_LEVEL,false) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CHANGE_TYPE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetValue(TYPE_NORMAL+TYPE_MONSTER) - e1:SetReset(RESET_EVENT+0x47c0000) - c:RegisterEffect(e1,true) - Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP_DEFENCE) - end -end diff --git a/script/c54248491.lua b/script/c54248491.lua deleted file mode 100644 index 0aea2f1336..0000000000 --- a/script/c54248491.lua +++ /dev/null @@ -1,33 +0,0 @@ ---サクリファイス・スパイダー -function c54248491.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(54248491,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c54248491.condition) - e1:SetCost(c54248491.cost) - e1:SetTarget(c54248491.target) - e1:SetOperation(c54248491.operation) - c:RegisterEffect(e1) -end -function c54248491.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(Card.IsRace,tp,LOCATION_GRAVE,0,4,nil,RACE_INSECT) -end -function c54248491.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end -function c54248491.filter(c) - return c:IsPosition(POS_FACEUP_DEFENCE) and c:IsDestructable() -end -function c54248491.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c54248491.filter,tp,0,LOCATION_MZONE,1,nil) end - local g=Duel.GetMatchingGroup(c54248491.filter,tp,0,LOCATION_MZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c54248491.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c54248491.filter,tp,0,LOCATION_MZONE,nil) - Duel.Destroy(g,REASON_EFFECT) -end diff --git a/script/c54250060.lua b/script/c54250060.lua deleted file mode 100644 index 9eda54e849..0000000000 --- a/script/c54250060.lua +++ /dev/null @@ -1,91 +0,0 @@ ---召魔装着 -function c54250060.initial_effect(c) - --activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --atk up - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetRange(LOCATION_FZONE) - e2:SetTargetRange(LOCATION_MZONE,0) - e2:SetTarget(c54250060.atktg) - e2:SetValue(300) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EFFECT_UPDATE_DEFENCE) - c:RegisterEffect(e3) - --spsummon - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(54250060,0)) - e4:SetCategory(CATEGORY_SPECIAL_SUMMON) - e4:SetType(EFFECT_TYPE_IGNITION) - e4:SetRange(LOCATION_FZONE) - e4:SetCountLimit(1) - e4:SetCost(c54250060.spcost) - e4:SetTarget(c54250060.sptg) - e4:SetOperation(c54250060.spop) - c:RegisterEffect(e4) - --to hand - local e5=Effect.CreateEffect(c) - e5:SetDescription(aux.Stringid(54250060,1)) - e5:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e5:SetType(EFFECT_TYPE_IGNITION) - e5:SetRange(LOCATION_FZONE) - e5:SetCountLimit(1) - e5:SetCost(c54250060.thcost) - e5:SetTarget(c54250060.thtg) - e5:SetOperation(c54250060.thop) - c:RegisterEffect(e5) -end -function c54250060.atktg(e,c) - return c:IsRace(RACE_DRAGON+RACE_WARRIOR+RACE_SPELLCASTER) -end -function c54250060.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_DISCARD+REASON_COST,nil) -end -function c54250060.spfilter(c,e,tp) - return c:IsSetCard(0xca) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c54250060.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c54250060.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c54250060.spop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c54250060.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end -function c54250060.cfilter(c) - return c:IsRace(RACE_WARRIOR+RACE_SPELLCASTER) and c:IsAbleToRemoveAsCost() -end -function c54250060.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c54250060.cfilter,tp,LOCATION_GRAVE,0,4,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c54250060.cfilter,tp,LOCATION_GRAVE,0,4,4,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c54250060.thfilter(c) - return c:IsSetCard(0xcb) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() -end -function c54250060.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c54250060.thfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c54250060.thop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c54250060.thfilter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c54266211.lua b/script/c54266211.lua deleted file mode 100644 index cb371c1018..0000000000 --- a/script/c54266211.lua +++ /dev/null @@ -1,39 +0,0 @@ ---エヴォルダー・ウルカノドン -function c54266211.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(54266211,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(c54266211.spcon) - e1:SetTarget(c54266211.sptg) - e1:SetOperation(c54266211.spop) - c:RegisterEffect(e1) -end -function c54266211.spcon(e,tp,eg,ep,ev,re,r,rp) - local st=e:GetHandler():GetSummonType() - return st>=(SUMMON_TYPE_SPECIAL+150) and st<(SUMMON_TYPE_SPECIAL+180) -end -function c54266211.filter(c,e,tp) - return c:IsSetCard(0x604e) and c:IsCanBeSpecialSummoned(e,180,tp,false,false) -end -function c54266211.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c54266211.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c54266211.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c54266211.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,180,tp,tp,false,false,POS_FACEUP) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - end -end diff --git a/script/c54283059.lua b/script/c54283059.lua deleted file mode 100644 index 64277ded0c..0000000000 --- a/script/c54283059.lua +++ /dev/null @@ -1,61 +0,0 @@ ---平行世界融合 -function c54283059.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c54283059.cost) - e1:SetTarget(c54283059.target) - e1:SetOperation(c54283059.activate) - c:RegisterEffect(e1) -end -function c54283059.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_SPSUMMON)==0 end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) - e1:SetLabelObject(e) - e1:SetTargetRange(1,0) - e1:SetTarget(c54283059.sumlimit) - Duel.RegisterEffect(e1,tp) -end -function c54283059.sumlimit(e,c,sump,sumtype,sumpos,targetp,se) - return e:GetLabelObject()~=se -end -function c54283059.filter0(c) - return c:IsFaceup() and c:IsCanBeFusionMaterial() and c:IsAbleToDeck() -end -function c54283059.filter1(c,e) - return c:IsFaceup() and c:IsCanBeFusionMaterial() and c:IsAbleToDeck() and not c:IsImmuneToEffect(e) -end -function c54283059.filter2(c,e,tp,m) - return c:IsType(TYPE_FUSION) and c:IsSetCard(0x3008) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) - and c:CheckFusionMaterial(m) -end -function c54283059.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return false end - local mg=Duel.GetMatchingGroup(c54283059.filter0,tp,LOCATION_REMOVED,0,nil) - return Duel.IsExistingMatchingCard(c54283059.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg) - end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function c54283059.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local mg=Duel.GetMatchingGroup(c54283059.filter1,tp,LOCATION_REMOVED,0,nil,e) - local sg=Duel.GetMatchingGroup(c54283059.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg) - if sg:GetCount()>0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local tg=sg:Select(tp,1,1,nil) - local tc=tg:GetFirst() - local mat=Duel.SelectFusionMaterial(tp,tc,mg) - tc:SetMaterial(mat) - Duel.SendtoDeck(mat,nil,2,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION) - Duel.BreakEffect() - Duel.SpecialSummon(tc, SUMMON_TYPE_FUSION, tp, tp, false, false, POS_FACEUP) - tc:CompleteProcedure() - end -end diff --git a/script/c54289683.lua b/script/c54289683.lua deleted file mode 100644 index a8bc01fbe5..0000000000 --- a/script/c54289683.lua +++ /dev/null @@ -1,145 +0,0 @@ ---パワーカプセル -function c54289683.initial_effect(c) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c54289683.target) - e1:SetOperation(c54289683.operation) - c:RegisterEffect(e1) -end -function c54289683.filter(c) - return c:IsFaceup() and c:IsCode(93130021) -end -function c54289683.desfilter(c) - return c:IsFaceup() and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable() -end -function c54289683.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - if chk==0 then return Duel.IsExistingTarget(c54289683.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - local cg=Duel.SelectTarget(tp,c54289683.filter,tp,LOCATION_MZONE,0,1,1,nil) - local c=cg:GetFirst() - local t1=Duel.IsExistingTarget(c54289683.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) - local t2=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsPlayerCanSpecialSummonMonster(tp,93130022,0,0x4011,c:GetAttack(),c:GetDefence(),c:GetLevel(),c:GetRace(),c:GetAttribute()) - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(93130021,0)) - if t1 and t2 then - op=Duel.SelectOption(tp,aux.Stringid(93130021,1),aux.Stringid(93130021,2),aux.Stringid(93130021,3)) - elseif t1 then - op=Duel.SelectOption(tp,aux.Stringid(93130021,1),aux.Stringid(93130021,2)) - elseif t2 then - op=Duel.SelectOption(tp,aux.Stringid(93130021,1),aux.Stringid(93130021,3)) - if op==1 then op=2 end - else op=Duel.SelectOption(tp,aux.Stringid(93130021,1)) end - e:SetLabel(op) - if op==1 then - e:SetCategory(CATEGORY_DESTROY) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c54289683.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,e:GetHandler()) - e:SetLabelObject(g:GetFirst()) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) - elseif op==2 then - e:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0) - else - e:SetCategory(CATEGORY_ATKCHANGE) - end -end -function c54289683.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if e:GetLabel()==1 then - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local dc=e:GetLabelObject() - tc=g:GetFirst() - if tc==dc then tc=g:GetNext() end - if tc:IsFaceup() and tc:IsRelateToEffect(e) and dc:IsRelateToEffect(e) then - Duel.Destroy(dc,REASON_EFFECT) - end - elseif e:GetLabel()==2 then - if tc:IsFacedown() or not tc:IsRelateToEffect(e) then return end - local atk=tc:GetAttack() - local def=tc:GetDefence() - local lv=tc:GetLevel() - local race=tc:GetRace() - local att=tc:GetAttribute() - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 - or not Duel.IsPlayerCanSpecialSummonMonster(tp,93130022,0,0x4011,atk,def,lv,race,att) then return end - local token=Duel.CreateToken(tp,93130022) - tc:CreateRelation(token,RESET_EVENT+0x1fe0000) - Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetValue(c54289683.tokenatk) - e1:SetLabelObject(tc) - e1:SetReset(RESET_EVENT+0xfe0000) - token:RegisterEffect(e1,true) - local e2=e1:Clone() - e2:SetCode(EFFECT_SET_DEFENCE_FINAL) - e2:SetValue(c54289683.tokendef) - e2:SetLabelObject(tc) - token:RegisterEffect(e2,true) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_CHANGE_LEVEL) - e3:SetValue(c54289683.tokenlv) - e3:SetLabelObject(tc) - e3:SetReset(RESET_EVENT+0xfe0000) - token:RegisterEffect(e3,true) - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetCode(EFFECT_CHANGE_RACE) - e4:SetValue(c54289683.tokenrace) - e4:SetLabelObject(tc) - e4:SetReset(RESET_EVENT+0xfe0000) - token:RegisterEffect(e4,true) - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_SINGLE) - e5:SetCode(EFFECT_CHANGE_ATTRIBUTE) - e5:SetValue(c54289683.tokenatt) - e5:SetLabelObject(tc) - e5:SetReset(RESET_EVENT+0xfe0000) - token:RegisterEffect(e5,true) - local e6=Effect.CreateEffect(c) - e6:SetType(EFFECT_TYPE_SINGLE) - e6:SetCode(EFFECT_SELF_DESTROY) - e6:SetCondition(c54289683.tokendes) - e6:SetLabelObject(tc) - e6:SetReset(RESET_EVENT+0xfe0000) - token:RegisterEffect(e6,true) - Duel.SpecialSummonComplete() - else - if tc:IsFacedown() or not tc:IsRelateToEffect(e) then return end - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(400) - e1:SetReset(RESET_EVENT+0x1ff0000) - tc:RegisterEffect(e1) - end - end -end -function c54289683.tokenatk(e,c) - return e:GetLabelObject():GetAttack() -end -function c54289683.tokendef(e,c) - return e:GetLabelObject():GetDefence() -end -function c54289683.tokenlv(e,c) - return e:GetLabelObject():GetLevel() -end -function c54289683.tokenrace(e,c) - return e:GetLabelObject():GetRace() -end -function c54289683.tokenatt(e,c) - return e:GetLabelObject():GetAttribute() -end -function c54289683.tokendes(e) - return not e:GetLabelObject():IsRelateToCard(e:GetHandler()) -end diff --git a/script/c54306223.lua b/script/c54306223.lua deleted file mode 100644 index b76f5ca196..0000000000 --- a/script/c54306223.lua +++ /dev/null @@ -1,52 +0,0 @@ ---ヴェノム・スワンプ -function c54306223.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --Add counter - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(54306223,0)) - e2:SetCategory(CATEGORY_COUNTER) - e2:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_FIELD) - e2:SetCode(EVENT_PHASE+PHASE_END) - e2:SetCountLimit(1) - e2:SetRange(LOCATION_SZONE) - e2:SetOperation(c54306223.acop) - c:RegisterEffect(e2) - --atk down - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetCode(EFFECT_UPDATE_ATTACK) - e3:SetRange(LOCATION_SZONE) - e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e3:SetValue(c54306223.atkval) - c:RegisterEffect(e3) - --destroy - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_FIELD) - e4:SetCode(EFFECT_SELF_DESTROY) - e4:SetRange(LOCATION_SZONE) - e4:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e4:SetTarget(Duel.VenomSwampCheck) - c:RegisterEffect(e4) -end -function c54306223.atkval(e,c) - return c:GetCounter(0x9)*-500 -end -function c54306223.acop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - for i=0,4 do - local tc=Duel.GetFieldCard(tp,LOCATION_MZONE,i) - if tc and tc:IsCanAddCounter(0x9,1) and not tc:IsSetCard(0x50) then - tc:AddCounter(0x9,1) - end - end - for i=0,4 do - local tc=Duel.GetFieldCard(1-tp,LOCATION_MZONE,i) - if tc and tc:IsCanAddCounter(0x9,1) and not tc:IsSetCard(0x50) then - tc:AddCounter(0x9,1) - end - end -end diff --git a/script/c54320860.lua b/script/c54320860.lua deleted file mode 100644 index 1847b72688..0000000000 --- a/script/c54320860.lua +++ /dev/null @@ -1,41 +0,0 @@ ---インフェルニティ・ビショップ -function c54320860.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(1,54320860) - e1:SetCondition(c54320860.spcon) - c:RegisterEffect(e1) - --destroy replace - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_DESTROY_REPLACE) - e2:SetRange(LOCATION_GRAVE) - e2:SetTarget(c54320860.reptg) - e2:SetValue(c54320860.repval) - e2:SetOperation(c54320860.repop) - c:RegisterEffect(e2) -end -function c54320860.spcon(e,c) - if c==nil then return true end - return Duel.GetFieldGroupCount(c:GetControler(),LOCATION_HAND,0)==1 - and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 -end -function c54320860.filter(c,tp) - return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) - and c:IsSetCard(0xb) and not c:IsReason(REASON_REPLACE) -end -function c54320860.reptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)==0 - and eg:IsExists(c54320860.filter,1,nil,tp) and e:GetHandler():IsAbleToRemove() end - return Duel.SelectYesNo(tp,aux.Stringid(54320860,0)) -end -function c54320860.repval(e,c) - return c54320860.filter(c,e:GetHandlerPlayer()) -end -function c54320860.repop(e,tp,eg,ep,ev,re,r,rp) - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT+REASON_REPLACE) -end diff --git a/script/c54326448.lua b/script/c54326448.lua deleted file mode 100644 index 3d03997add..0000000000 --- a/script/c54326448.lua +++ /dev/null @@ -1,40 +0,0 @@ ---フレムベル・アーチャー -function c54326448.initial_effect(c) - --atkup - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(54326448,0)) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetTarget(c54326448.attg) - e1:SetOperation(c54326448.atop) - c:RegisterEffect(e1) -end -function c54326448.cfilter(c,tp) - return c:IsFaceup() and c:IsRace(RACE_PYRO) - and Duel.IsExistingMatchingCard(c54326448.filter,tp,LOCATION_MZONE,0,1,c) -end -function c54326448.filter(c) - return c:IsFaceup() and c:IsSetCard(0x2c) -end -function c54326448.attg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,c54326448.cfilter,1,nil,tp) end - local g=Duel.SelectReleaseGroup(tp,c54326448.cfilter,1,1,nil,tp) - Duel.Release(g,REASON_COST) -end -function c54326448.atop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c54326448.filter,tp,LOCATION_MZONE,0,nil) - local tc=g:GetFirst() - local c=e:GetHandler() - while tc do - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetValue(800) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - tc=g:GetNext() - end -end diff --git a/script/c54338958.lua b/script/c54338958.lua deleted file mode 100644 index 1006d56a39..0000000000 --- a/script/c54338958.lua +++ /dev/null @@ -1,39 +0,0 @@ ---インヴェルズの魔細胞 -function c54338958.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c54338958.spcon) - c:RegisterEffect(e1) - --cannot release - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EFFECT_UNRELEASABLE_NONSUM) - e2:SetValue(1) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EFFECT_UNRELEASABLE_SUM) - e3:SetValue(c54338958.sumlimit) - c:RegisterEffect(e3) - --cannot be synchro material - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e4:SetRange(LOCATION_MZONE) - e4:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL) - e4:SetValue(1) - c:RegisterEffect(e4) -end -function c54338958.spcon(e,c) - if c==nil then return true end - return Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0,nil)==0 - and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 -end -function c54338958.sumlimit(e,c) - return not c:IsSetCard(0x100a) -end diff --git a/script/c54343893.lua b/script/c54343893.lua deleted file mode 100644 index 0209085de1..0000000000 --- a/script/c54343893.lua +++ /dev/null @@ -1,32 +0,0 @@ ---バイス・ドラゴン -function c54343893.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c54343893.spcon) - e1:SetOperation(c54343893.spop) - c:RegisterEffect(e1) -end -function c54343893.spcon(e,c) - if c==nil then return true end - return Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0,nil)==0 - and Duel.GetFieldGroupCount(c:GetControler(),0,LOCATION_MZONE,nil)>0 - and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 -end -function c54343893.spop(e,tp,eg,ep,ev,re,r,rp,c) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_BASE_ATTACK) - e1:SetValue(1000) - e1:SetReset(RESET_EVENT+0xff0000) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_SET_BASE_DEFENCE) - e2:SetValue(1200) - e2:SetReset(RESET_EVENT+0xff0000) - c:RegisterEffect(e2) -end diff --git a/script/c54351224.lua b/script/c54351224.lua deleted file mode 100644 index 15ae93b6ef..0000000000 --- a/script/c54351224.lua +++ /dev/null @@ -1,50 +0,0 @@ ---リチュアル・ウェポン -function c54351224.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c54351224.target) - e1:SetOperation(c54351224.operation) - c:RegisterEffect(e1) - --atk up - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(1500) - c:RegisterEffect(e2) - --def up - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_EQUIP) - e3:SetCode(EFFECT_UPDATE_DEFENCE) - e3:SetValue(1500) - c:RegisterEffect(e3) - --Equip limit - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetCode(EFFECT_EQUIP_LIMIT) - e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e4:SetValue(c54351224.eqlimit) - c:RegisterEffect(e4) -end -function c54351224.eqlimit(e,c) - return c:IsType(TYPE_RITUAL) and c:IsLevelBelow(6) -end -function c54351224.filter(c) - return c:IsFaceup() and c:IsType(TYPE_RITUAL) and c:IsLevelBelow(6) -end -function c54351224.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c54351224.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c54351224.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c54351224.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c54351224.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,e:GetHandler(),tc) - end -end diff --git a/script/c54359696.lua b/script/c54359696.lua deleted file mode 100644 index 34ac49d7aa..0000000000 --- a/script/c54359696.lua +++ /dev/null @@ -1,27 +0,0 @@ ---魔導術士 ラパンデ -function c54359696.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(54359696,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetTarget(c54359696.target) - e1:SetOperation(c54359696.operation) - c:RegisterEffect(e1) -end -function c54359696.filter(c) - return c:IsSetCard(0x6e) and c:GetLevel()==3 and c:IsAbleToHand() -end -function c54359696.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c54359696.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c54359696.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c54360049.lua b/script/c54360049.lua deleted file mode 100644 index 02faca94fd..0000000000 --- a/script/c54360049.lua +++ /dev/null @@ -1,41 +0,0 @@ ---カトブレパスと運命の魔女 -function c54360049.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(54360049,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c54360049.cost) - e1:SetTarget(c54360049.target) - e1:SetOperation(c54360049.operation) - c:RegisterEffect(e1) -end -function c54360049.cfilter(c) - return c:GetTextAttack()==-2 and c:IsAbleToRemoveAsCost() and c:IsType(TYPE_MONSTER) -end -function c54360049.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c54360049.cfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c54360049.cfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c54360049.filter(c,tp) - return c:GetSummonPlayer()~=tp and c:IsDestructable() -end -function c54360049.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return eg:IsExists(c54360049.filter,1,nil,tp) end - local g=eg:Filter(c54360049.filter,nil,tp) - Duel.SetTargetCard(eg) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c54360049.dfilter(c,e,tp) - return c:GetSummonPlayer()~=tp and c:IsDestructable() and c:IsRelateToEffect(e) -end -function c54360049.operation(e,tp,eg,ep,ev,re,r,rp) - local g=eg:Filter(c54360049.dfilter,nil,e,tp) - if g:GetCount()>0 then - Duel.Destroy(g,REASON_EFFECT) - end -end diff --git a/script/c54366836.lua b/script/c54366836.lua deleted file mode 100644 index ac830fdf74..0000000000 --- a/script/c54366836.lua +++ /dev/null @@ -1,71 +0,0 @@ ---No.54 反骨の闘士ライオンハート -function c54366836.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,1,3) - c:EnableReviveLimit() - --ind - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e1:SetCondition(c54366836.indcon) - e1:SetValue(1) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(54366836,0)) - e2:SetCategory(CATEGORY_DAMAGE) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_BATTLE_DAMAGE) - e2:SetRange(LOCATION_MZONE) - e2:SetCondition(c54366836.damcon) - e2:SetTarget(c54366836.damtg) - e2:SetOperation(c54366836.damop) - c:RegisterEffect(e2) - --damage - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(54366836,0)) - e3:SetType(EFFECT_TYPE_QUICK_O) - e3:SetCode(EVENT_PRE_DAMAGE_CALCULATE) - e3:SetRange(LOCATION_MZONE) - e3:SetCondition(c54366836.damcon2) - e3:SetCost(c54366836.damcost2) - e3:SetOperation(c54366836.damop2) - c:RegisterEffect(e3) -end -c54366836.xyz_number=54 -function c54366836.damcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return ep==tp and c:IsRelateToBattle() -end -function c54366836.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(ev) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,ev) -end -function c54366836.damop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end -function c54366836.damcon2(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetBattleTarget()~=nil -end -function c54366836.damcost2(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:GetFlagEffect(54366836)==0 and c:CheckRemoveOverlayCard(tp,1,REASON_COST) end - c:RemoveOverlayCard(tp,1,1,REASON_COST) - c:RegisterFlagEffect(54366836,RESET_CHAIN,0,1) -end -function c54366836.damop2(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_REFLECT_BATTLE_DAMAGE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_DAMAGE_CAL) - Duel.RegisterEffect(e1,tp) -end -function c54366836.indcon(e) - return e:GetHandler():IsPosition(POS_FACEUP_ATTACK) -end diff --git a/script/c5438492.lua b/script/c5438492.lua deleted file mode 100644 index 021387e423..0000000000 --- a/script/c5438492.lua +++ /dev/null @@ -1,33 +0,0 @@ ---荒野の女戦士 -function c5438492.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(5438492,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetCondition(c5438492.condition) - e1:SetTarget(c5438492.target) - e1:SetOperation(c5438492.operation) - c:RegisterEffect(e1) -end -function c5438492.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) -end -function c5438492.filter(c,e,tp) - return c:IsAttackBelow(1500) and c:IsAttribute(ATTRIBUTE_EARTH) and c:IsRace(RACE_WARRIOR) - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c5438492.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c5438492.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c5438492.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c5438492.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_ATTACK) - end -end diff --git a/script/c54407825.lua b/script/c54407825.lua deleted file mode 100644 index acf5a75078..0000000000 --- a/script/c54407825.lua +++ /dev/null @@ -1,52 +0,0 @@ ---驚天動地 -function c54407825.initial_effect(c) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --to deck - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_TODECK) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetRange(LOCATION_SZONE) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetCondition(c54407825.condition) - e2:SetTarget(c54407825.target) - e2:SetOperation(c54407825.operation) - c:RegisterEffect(e2) -end -function c54407825.filter(c) - return c:IsPreviousLocation(LOCATION_DECK) -end -function c54407825.condition(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c54407825.filter,1,nil) -end -function c54407825.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsAbleToDeck() end - if chk==0 then return e:GetHandler():IsRelateToEffect(e) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectTarget(tp,Card.IsAbleToDeck,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0) -end -function c54407825.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) then return end - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.SendtoDeck(tc,nil,2,REASON_EFFECT) - end - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_TO_GRAVE) - e1:SetTargetRange(LOCATION_DECK,LOCATION_DECK) - e1:SetReset(RESET_PHASE+RESET_END) - Duel.RegisterEffect(e1,tp) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetCode(EFFECT_CANNOT_DISCARD_DECK) - e2:SetTargetRange(1,1) - e2:SetReset(RESET_PHASE+RESET_END) - Duel.RegisterEffect(e2,tp) -end diff --git a/script/c54415063.lua b/script/c54415063.lua deleted file mode 100644 index 7d91a22eb2..0000000000 --- a/script/c54415063.lua +++ /dev/null @@ -1,20 +0,0 @@ ---ハーピィ・レディ3 -function c54415063.initial_effect(c) - --atk limit - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_BATTLED) - e1:SetRange(LOCATION_MZONE) - e1:SetOperation(c54415063.operation) - c:RegisterEffect(e1) -end -function c54415063.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local bc=c:GetBattleTarget() - if not bc then return end - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END+RESET_SELF_TURN,2) - bc:RegisterEffect(e1) -end diff --git a/script/c54447022.lua b/script/c54447022.lua deleted file mode 100644 index 449a23ab2e..0000000000 --- a/script/c54447022.lua +++ /dev/null @@ -1,52 +0,0 @@ ---ソウル・チャージ -function c54447022.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,54447022+EFFECT_COUNT_CODE_OATH) - e1:SetCost(c54447022.spcost) - e1:SetTarget(c54447022.sptg) - e1:SetOperation(c54447022.spop) - c:RegisterEffect(e1) -end -function c54447022.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetCurrentPhase()~=PHASE_MAIN2 end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_BP) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) - e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function c54447022.filter(c,e,tp) - return c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c54447022.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and chkc:IsCanBeSpecialSummoned(e,0,tp,false,false) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c54447022.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c54447022.filter,tp,LOCATION_GRAVE,0,1,ft,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,g:GetCount(),0,0) -end -function c54447022.spop(e,tp,eg,ep,ev,re,r,rp) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local sg=g:Filter(Card.IsRelateToEffect,nil,e) - if sg:GetCount()>ft then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - sg=sg:Select(tp,ft,ft,nil) - end - local ct=Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) - local lp=Duel.GetLP(tp) - if lp<=ct*1000 then - Duel.SetLP(tp,0) - else - Duel.SetLP(tp,lp-ct*1000) - end -end diff --git a/script/c54451023.lua b/script/c54451023.lua deleted file mode 100644 index bdfc8fb1be..0000000000 --- a/script/c54451023.lua +++ /dev/null @@ -1,85 +0,0 @@ ---植物連鎖 -function c54451023.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCondition(c54451023.condition) - e1:SetTarget(c54451023.target) - e1:SetOperation(c54451023.operation) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(54451023,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_LEAVE_FIELD) - e2:SetCondition(c54451023.spcon) - e2:SetTarget(c54451023.sptg) - e2:SetOperation(c54451023.spop) - c:RegisterEffect(e2) -end -function c54451023.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end -function c54451023.filter(c) - return c:IsFaceup() and c:IsRace(RACE_PLANT) -end -function c54451023.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c54451023.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c54451023.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local g=Duel.SelectTarget(tp,c54451023.filter,tp,LOCATION_MZONE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c54451023.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsLocation(LOCATION_SZONE) then return end - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,c,tc) - c:CancelToGrave() - --Atkup - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_EQUIP) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(500) - e1:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e1) - --Equip limit - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_EQUIP_LIMIT) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetValue(c54451023.eqlimit) - e2:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e2) - end -end -function c54451023.eqlimit(e,c) - return c:GetControler()==e:GetOwnerPlayer() and c:IsRace(RACE_PLANT) -end -function c54451023.spcon(e,tp,eg,ep,ev,re,r,rp) - return bit.band(e:GetHandler():GetReason(),0x41)==0x41 and e:GetHandler():GetEquipTarget() -end -function c54451023.spfilter(c,e,tp) - return c:IsRace(RACE_PLANT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c54451023.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c54451023.spfilter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c54451023.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c54451023.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,g:GetCount(),0,0) -end -function c54451023.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c54455435.lua b/script/c54455435.lua deleted file mode 100644 index 3adc01c319..0000000000 --- a/script/c54455435.lua +++ /dev/null @@ -1,34 +0,0 @@ ---ガスタの巫女 ウィンダ -function c54455435.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(54455435,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetCondition(c54455435.condition) - e1:SetTarget(c54455435.target) - e1:SetOperation(c54455435.operation) - c:RegisterEffect(e1) -end -function c54455435.condition(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsLocation(LOCATION_GRAVE) and c:IsReason(REASON_BATTLE) - and c:GetPreviousControler()==tp and c==Duel.GetAttackTarget() and Duel.GetAttacker():IsControler(1-tp) -end -function c54455435.filter(c,e,tp) - return c:IsSetCard(0x10) and c:IsType(TYPE_TUNER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c54455435.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c54455435.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c54455435.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c54455435.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c54455664.lua b/script/c54455664.lua deleted file mode 100644 index 2fb2925482..0000000000 --- a/script/c54455664.lua +++ /dev/null @@ -1,9 +0,0 @@ ---ドラグニティ-ブラックスピア -function c54455664.initial_effect(c) - --Double Attack - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_EQUIP) - e1:SetCode(EFFECT_EXTRA_ATTACK) - e1:SetValue(1) - c:RegisterEffect(e1) -end diff --git a/script/c54484652.lua b/script/c54484652.lua deleted file mode 100644 index 75edd751b8..0000000000 --- a/script/c54484652.lua +++ /dev/null @@ -1,66 +0,0 @@ ---超戦士カオス・ソルジャー -function c54484652.initial_effect(c) - c:SetSPSummonOnce(54484652) - c:EnableReviveLimit() - --damage - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_BATTLE_DESTROYING) - e1:SetCondition(aux.bdogcon) - e1:SetTarget(c54484652.damtg) - e1:SetOperation(c54484652.damop) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetCondition(c54484652.spcon) - e2:SetTarget(c54484652.sptg) - e2:SetOperation(c54484652.spop) - c:RegisterEffect(e2) -end -function c54484652.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local bc=e:GetHandler():GetBattleTarget() - Duel.SetTargetCard(bc) - local dam=bc:GetBaseAttack() - if dam<0 then dam=0 end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(dam) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,dam) -end -function c54484652.damop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) - local dam=tc:GetBaseAttack() - if dam<0 then dam=0 end - Duel.Damage(p,dam,REASON_EFFECT) - end -end -function c54484652.spcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsReason(REASON_BATTLE) - or (rp~=tp and c:IsReason(REASON_DESTROY) and c:GetPreviousControler()==tp) -end -function c54484652.spfilter(c,e,tp) - return c:IsSetCard(0xbd) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) - and not c:IsHasEffect(EFFECT_NECRO_VALLEY) -end -function c54484652.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c54484652.spfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE) -end -function c54484652.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c54484652.spfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c54490275.lua b/script/c54490275.lua deleted file mode 100644 index 2021a193be..0000000000 --- a/script/c54490275.lua +++ /dev/null @@ -1,67 +0,0 @@ ---ゴーストリックの雪女 -function c54490275.initial_effect(c) - --summon limit - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_SUMMON) - e1:SetCondition(c54490275.sumcon) - c:RegisterEffect(e1) - --turn set - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(54490275,0)) - e2:SetCategory(CATEGORY_POSITION) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetTarget(c54490275.postg) - e2:SetOperation(c54490275.posop) - c:RegisterEffect(e2) - --change pos - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(54490275,1)) - e3:SetCategory(CATEGORY_POSITION) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_BATTLE_DESTROYED) - e3:SetCondition(c54490275.poscon2) - e3:SetTarget(c54490275.postg2) - e3:SetOperation(c54490275.posop2) - c:RegisterEffect(e3) -end -function c54490275.sfilter(c) - return c:IsFaceup() and c:IsSetCard(0x8d) -end -function c54490275.sumcon(e) - return not Duel.IsExistingMatchingCard(c54490275.sfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) -end -function c54490275.postg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsCanTurnSet() and c:GetFlagEffect(54490275)==0 end - c:RegisterFlagEffect(54490275,RESET_EVENT+0x1fc0000+RESET_PHASE+PHASE_END,0,1) - Duel.SetOperationInfo(0,CATEGORY_POSITION,c,1,0,0) -end -function c54490275.posop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - Duel.ChangePosition(c,POS_FACEDOWN_DEFENCE) - end -end -function c54490275.poscon2(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) - and e:GetHandler():GetReasonCard():IsRelateToBattle() -end -function c54490275.postg2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local rc=e:GetHandler():GetReasonCard() - Duel.SetTargetCard(rc) - Duel.SetOperationInfo(0,CATEGORY_POSITION,rc,1,0,0) -end -function c54490275.posop2(e,tp,eg,ep,ev,re,r,rp) - local rc=Duel.GetFirstTarget() - if rc:IsFaceup() and rc:IsRelateToEffect(e) then - Duel.ChangePosition(rc,POS_FACEDOWN_DEFENCE) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_CHANGE_POSITION) - e1:SetReset(RESET_EVENT+0x1fe0000) - rc:RegisterEffect(e1) - end -end diff --git a/script/c54493213.lua b/script/c54493213.lua deleted file mode 100644 index 9d6e9e7dba..0000000000 --- a/script/c54493213.lua +++ /dev/null @@ -1,19 +0,0 @@ ---原始太陽ヘリオス -function c54493213.initial_effect(c) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_SET_ATTACK) - e1:SetValue(c54493213.value) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_SET_DEFENCE) - c:RegisterEffect(e2) -end -function c54493213.filter(c) - return c:IsFaceup() and c:IsType(TYPE_MONSTER) -end -function c54493213.value(e,c) - return Duel.GetMatchingGroupCount(c54493213.filter,c:GetControler(),LOCATION_REMOVED,LOCATION_REMOVED,nil)*100 -end diff --git a/script/c54497620.lua b/script/c54497620.lua deleted file mode 100644 index 9d67b41155..0000000000 --- a/script/c54497620.lua +++ /dev/null @@ -1,36 +0,0 @@ ---ガジェット・ドライバー -function c54497620.initial_effect(c) - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(54497620,0)) - e1:SetCategory(CATEGORY_POSITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetRange(LOCATION_HAND) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c54497620.cost) - e1:SetTarget(c54497620.tg) - e1:SetOperation(c54497620.op) - c:RegisterEffect(e1) -end -function c54497620.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end -function c54497620.filter(c) - return c:IsFaceup() and c:IsSetCard(0x26) -end -function c54497620.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c54497620.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c54497620.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE) - local g=Duel.SelectTarget(tp,c54497620.filter,tp,LOCATION_MZONE,0,1,5,nil) - Duel.SetOperationInfo(0,CATEGORY_POSITION,g,g:GetCount(),0,0) -end -function c54497620.tfilter(c,e) - return c:IsRelateToEffect(e) and c:IsFaceup() -end -function c54497620.op(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local sg=g:Filter(c54497620.tfilter,nil,e) - Duel.ChangePosition(sg,POS_FACEUP_DEFENCE,0,POS_FACEUP_ATTACK,0) -end diff --git a/script/c54512827.lua b/script/c54512827.lua deleted file mode 100644 index 7b31f3f302..0000000000 --- a/script/c54512827.lua +++ /dev/null @@ -1,76 +0,0 @@ ---ゴーストリック・ランタン -function c54512827.initial_effect(c) - --summon limit - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_SUMMON) - e1:SetCondition(c54512827.sumcon) - c:RegisterEffect(e1) - --turn set - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(54512827,0)) - e2:SetCategory(CATEGORY_POSITION) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetTarget(c54512827.postg) - e2:SetOperation(c54512827.posop) - c:RegisterEffect(e2) - --negate attack - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(54512827,1)) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_ATTACK_ANNOUNCE) - e3:SetRange(LOCATION_HAND) - e3:SetCondition(c54512827.spcon1) - e3:SetTarget(c54512827.sptg) - e3:SetOperation(c54512827.spop) - c:RegisterEffect(e3) - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(54512827,1)) - e4:SetCategory(CATEGORY_SPECIAL_SUMMON) - e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e4:SetCode(EVENT_BE_BATTLE_TARGET) - e4:SetRange(LOCATION_HAND) - e4:SetCondition(c54512827.spcon2) - e4:SetTarget(c54512827.sptg) - e4:SetOperation(c54512827.spop) - c:RegisterEffect(e4) -end -function c54512827.sfilter(c) - return c:IsFaceup() and c:IsSetCard(0x8d) -end -function c54512827.sumcon(e) - return not Duel.IsExistingMatchingCard(c54512827.sfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) -end -function c54512827.postg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsCanTurnSet() and c:GetFlagEffect(54512827)==0 end - c:RegisterFlagEffect(54512827,RESET_EVENT+0x1fc0000+RESET_PHASE+PHASE_END,0,1) - Duel.SetOperationInfo(0,CATEGORY_POSITION,c,1,0,0) -end -function c54512827.posop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - Duel.ChangePosition(c,POS_FACEDOWN_DEFENCE) - end -end -function c54512827.spcon1(e,tp,eg,ep,ev,re,r,rp) - local at=Duel.GetAttacker() - return at:GetControler()~=tp and Duel.GetAttackTarget()==nil -end -function c54512827.spcon2(e,tp,eg,ep,ev,re,r,rp) - local at=Duel.GetAttackTarget() - return at:IsControler(tp) and at:IsFaceup() and at:IsSetCard(0x8d) -end -function c54512827.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c54512827.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if Duel.NegateAttack() and c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEDOWN_DEFENCE)~=0 then - Duel.ConfirmCards(1-tp,c) - end -end diff --git a/script/c54514594.lua b/script/c54514594.lua deleted file mode 100644 index 6548dddac7..0000000000 --- a/script/c54514594.lua +++ /dev/null @@ -1,33 +0,0 @@ ---ヴォルカニック・ハンマー -function c54514594.initial_effect(c) - --damage - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(54514594,0)) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c54514594.cost) - e1:SetTarget(c54514594.target) - e1:SetOperation(c54514594.operation) - c:RegisterEffect(e1) -end -function c54514594.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():GetAttackAnnouncedCount()==0 end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_OATH) - e1:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - e:GetHandler():RegisterEffect(e1) -end -function c54514594.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_GRAVE,0,1,nil,0x32) end - Duel.SetTargetPlayer(1-tp) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,0) -end -function c54514594.operation(e,tp,eg,ep,ev,re,r,rp) - local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) - local d=Duel.GetMatchingGroupCount(Card.IsSetCard,tp,LOCATION_GRAVE,0,nil,0x32)*200 - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c54520292.lua b/script/c54520292.lua deleted file mode 100644 index f3507586a7..0000000000 --- a/script/c54520292.lua +++ /dev/null @@ -1,81 +0,0 @@ ---コアキメイル・アイス -function c54520292.initial_effect(c) - --cost - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c54520292.mtcon) - e1:SetOperation(c54520292.mtop) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(54520292,3)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCost(c54520292.descost) - e2:SetTarget(c54520292.destg) - e2:SetOperation(c54520292.desop) - c:RegisterEffect(e2) -end -function c54520292.mtcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c54520292.cfilter1(c) - return c:IsCode(36623431) and c:IsAbleToGraveAsCost() -end -function c54520292.cfilter2(c) - return c:GetType()==TYPE_SPELL+TYPE_CONTINUOUS and not c:IsPublic() -end -function c54520292.mtop(e,tp,eg,ep,ev,re,r,rp) - local g1=Duel.GetMatchingGroup(c54520292.cfilter1,tp,LOCATION_HAND,0,nil) - local g2=Duel.GetMatchingGroup(c54520292.cfilter2,tp,LOCATION_HAND,0,nil) - local select=2 - if g1:GetCount()>0 and g2:GetCount()>0 then - select=Duel.SelectOption(tp,aux.Stringid(54520292,0),aux.Stringid(54520292,1),aux.Stringid(54520292,2)) - elseif g1:GetCount()>0 then - select=Duel.SelectOption(tp,aux.Stringid(54520292,0),aux.Stringid(54520292,2)) - if select==1 then select=2 end - elseif g2:GetCount()>0 then - select=Duel.SelectOption(tp,aux.Stringid(54520292,1),aux.Stringid(54520292,2)) - select=select+1 - end - if select==0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=g1:Select(tp,1,1,nil) - Duel.SendtoGrave(g,REASON_COST) - elseif select==1 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) - local g=g2:Select(tp,1,1,nil) - Duel.ConfirmCards(1-tp,g) - Duel.ShuffleHand(tp) - else - Duel.Destroy(e:GetHandler(),REASON_RULE) - end -end -function c54520292.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,1,1,nil) - Duel.SendtoGrave(g,REASON_COST) -end -function c54520292.filter(c) - return bit.band(c:GetSummonType(),SUMMON_TYPE_SPECIAL)==SUMMON_TYPE_SPECIAL and c:IsDestructable() -end -function c54520292.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c54520292.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c54520292.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c54520292.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c54520292.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c54537489.lua b/script/c54537489.lua deleted file mode 100644 index 5036d5b828..0000000000 --- a/script/c54537489.lua +++ /dev/null @@ -1,45 +0,0 @@ ---タツノオトシオヤ -function c54537489.initial_effect(c) - --spsummon condition - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(c54537489.splimit) - c:RegisterEffect(e1) - --token - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(54537489,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(3,54537489) - e2:SetTarget(c54537489.sptg) - e2:SetOperation(c54537489.spop) - c:RegisterEffect(e2) -end -function c54537489.splimit(e,se,sp,st) - return se:IsActiveType(TYPE_MONSTER) and se:GetHandler():IsRace(RACE_WYRM) -end -function c54537489.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():GetLevel()>1 - and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsPlayerCanSpecialSummonMonster(tp,54537490,0,0x4011,300,200,1,RACE_WYRM,ATTRIBUTE_WATER) end - Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0) -end -function c54537489.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFacedown() or not c:IsRelateToEffect(e) or c:IsImmuneToEffect(e) or c:GetLevel()<2 then return end - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_LEVEL) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(-1) - c:RegisterEffect(e1) - if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsPlayerCanSpecialSummonMonster(tp,54537490,0,0x4011,300,200,1,RACE_WYRM,ATTRIBUTE_WATER) then - local token=Duel.CreateToken(tp,54537490) - Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c54539105.lua b/script/c54539105.lua deleted file mode 100644 index 95d0d20499..0000000000 --- a/script/c54539105.lua +++ /dev/null @@ -1,4 +0,0 @@ ---ライオンの儀式 -function c54539105.initial_effect(c) - aux.AddRitualProcGreater(c,aux.FilterBoolFunction(Card.IsCode,33951077)) -end diff --git a/script/c54541900.lua b/script/c54541900.lua deleted file mode 100644 index 68020c1a14..0000000000 --- a/script/c54541900.lua +++ /dev/null @@ -1,6 +0,0 @@ ---カルボナーラ戦士 -function c54541900.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcCode2(c,56342351,92731455,true,true) -end diff --git a/script/c54578613.lua b/script/c54578613.lua deleted file mode 100644 index 4b2a2ba0ea..0000000000 --- a/script/c54578613.lua +++ /dev/null @@ -1,79 +0,0 @@ ---ドラグニティ-レギオン -function c54578613.initial_effect(c) - --equip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(54578613,0)) - e1:SetCategory(CATEGORY_LEAVE_GRAVE+CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c54578613.eqtg) - e1:SetOperation(c54578613.eqop) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(54578613,1)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCost(c54578613.descost) - e2:SetTarget(c54578613.destg) - e2:SetOperation(c54578613.desop) - c:RegisterEffect(e2) -end -function c54578613.filter(c) - return c:IsSetCard(0x29) and c:IsLevelBelow(3) and c:IsRace(RACE_DRAGON) -end -function c54578613.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c54578613.filter(chkc) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingTarget(c54578613.filter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local g=Duel.SelectTarget(tp,c54578613.filter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0) -end -function c54578613.eqop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsFaceup() and c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then - if not Duel.Equip(tp,tc,c,false) then return end - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_OWNER_RELATE) - e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(c54578613.eqlimit) - tc:RegisterEffect(e1) - end -end -function c54578613.eqlimit(e,c) - return e:GetOwner()==c -end -function c54578613.costfilter(c) - return c:IsFaceup() and c:IsSetCard(0x29) and c:IsAbleToGraveAsCost() -end -function c54578613.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c54578613.costfilter,tp,LOCATION_SZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c54578613.costfilter,tp,LOCATION_SZONE,0,1,1,nil) - Duel.SendtoGrave(g,REASON_COST) -end -function c54578613.desfilter(c) - return c:IsFaceup() and c:IsDestructable() -end -function c54578613.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c54578613.desfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c54578613.desfilter,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c54578613.desfilter,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c54578613.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c54582424.lua b/script/c54582424.lua deleted file mode 100644 index 7d98db5839..0000000000 --- a/script/c54582424.lua +++ /dev/null @@ -1,38 +0,0 @@ ---幻蝶の刺客オオルリ -function c54582424.initial_effect(c) - c:EnableReviveLimit() - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(54582424,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetRange(LOCATION_HAND) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetCondition(c54582424.spcon) - e1:SetTarget(c54582424.sptg) - e1:SetOperation(c54582424.spop) - c:RegisterEffect(e1) - --unsynchroable - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e2:SetValue(1) - c:RegisterEffect(e2) -end -function c54582424.spcon(e,tp,eg,ep,ev,re,r,rp) - local ec=eg:GetFirst() - return ec:IsControler(tp) and ec:IsRace(RACE_WARRIOR) -end -function c54582424.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c54582424.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP) - c:CompleteProcedure() - end -end diff --git a/script/c54591086.lua b/script/c54591086.lua deleted file mode 100644 index 98649d0ba3..0000000000 --- a/script/c54591086.lua +++ /dev/null @@ -1,40 +0,0 @@ ---魔法除去細菌兵器 -function c54591086.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetLabel(0) - e1:SetCost(c54591086.cost) - e1:SetTarget(c54591086.target) - e1:SetOperation(c54591086.activate) - c:RegisterEffect(e1) -end -function c54591086.cost(e,tp,eg,ep,ev,re,r,rp,chk) - e:SetLabel(100) - return true -end -function c54591086.rfilter(c) - return not c:IsType(TYPE_TOKEN) -end -function c54591086.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - if e:GetLabel()~=100 then return false end - e:SetLabel(0) - return Duel.CheckReleaseGroup(tp,c54591086.rfilter,1,nil) - end - local rg=Duel.SelectReleaseGroup(tp,c54591086.rfilter,1,5,nil) - e:SetLabel(rg:GetCount()) - Duel.Release(rg,REASON_COST) -end -function c54591086.filter(c) - return c:IsType(TYPE_SPELL) and c:IsAbleToGrave() -end -function c54591086.activate(e,tp,eg,ep,ev,re,r,rp) - local ct=e:GetLabel() - Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(1-tp,c54591086.filter,1-tp,LOCATION_DECK,0,ct,ct,nil) - if g:GetCount()>0 then - Duel.SendtoGrave(g,REASON_EFFECT) - end -end diff --git a/script/c54622031.lua b/script/c54622031.lua deleted file mode 100644 index 196e38abef..0000000000 --- a/script/c54622031.lua +++ /dev/null @@ -1,6 +0,0 @@ ---金色の魔象 -function c54622031.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcCode2(c,29491031,66672569,true,true) -end diff --git a/script/c54629413.lua b/script/c54629413.lua deleted file mode 100644 index 845bc5e52b..0000000000 --- a/script/c54629413.lua +++ /dev/null @@ -1,28 +0,0 @@ ---ゲリラカイト -function c54629413.initial_effect(c) - --damage - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(54629413,0)) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCountLimit(1,54629413) - e1:SetCondition(c54629413.damcon) - e1:SetTarget(c54629413.damtg) - e1:SetOperation(c54629413.damop) - c:RegisterEffect(e1) -end -function c54629413.damcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) -end -function c54629413.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(500) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,500) -end -function c54629413.damop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c54631834.lua b/script/c54631834.lua deleted file mode 100644 index 258f3a6678..0000000000 --- a/script/c54631834.lua +++ /dev/null @@ -1,20 +0,0 @@ ---端末世界 -function c54631834.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c54631834.condition) - c:RegisterEffect(e1) - --skip - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(1,1) - e2:SetCode(EFFECT_SKIP_M2) - c:RegisterEffect(e2) -end -function c54631834.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()==PHASE_MAIN1 -end diff --git a/script/c54635862.lua b/script/c54635862.lua deleted file mode 100644 index b09adf87d6..0000000000 --- a/script/c54635862.lua +++ /dev/null @@ -1,40 +0,0 @@ ---ジェントルーパー -function c54635862.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(54635862,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c54635862.condition) - e1:SetTarget(c54635862.target) - e1:SetOperation(c54635862.operation) - c:RegisterEffect(e1) - --atk limit - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET) - e2:SetRange(LOCATION_MZONE) - e2:SetTargetRange(0,LOCATION_MZONE) - e2:SetValue(c54635862.atlimit) - c:RegisterEffect(e2) -end -function c54635862.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetAttacker():GetControler()~=tp -end -function c54635862.target(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0) -end -function c54635862.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) - end -end -function c54635862.atlimit(e,c) - return c~=e:GetHandler() -end diff --git a/script/c54652250.lua b/script/c54652250.lua deleted file mode 100644 index a3d8783571..0000000000 --- a/script/c54652250.lua +++ /dev/null @@ -1,25 +0,0 @@ ---人喰い虫 -function c54652250.initial_effect(c) - --flip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(54652250,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP) - e1:SetTarget(c54652250.target) - e1:SetOperation(c54652250.operation) - c:RegisterEffect(e1) -end -function c54652250.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsDestructable() end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c54652250.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c54702678.lua b/script/c54702678.lua deleted file mode 100644 index f7502b05c1..0000000000 --- a/script/c54702678.lua +++ /dev/null @@ -1,69 +0,0 @@ ---極戦機王ヴァルバロイド -function c54702678.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcFunRep(c,c54702678.ffilter,5,true) - --extra attack - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_EXTRA_ATTACK) - e1:SetValue(1) - c:RegisterEffect(e1) - --disable - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(54702678,0)) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_BATTLED) - e2:SetCondition(c54702678.discon) - e2:SetOperation(c54702678.disop) - c:RegisterEffect(e2) - --damage - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(54702678,1)) - e3:SetCategory(CATEGORY_DAMAGE) - e3:SetCode(EVENT_BATTLE_DESTROYING) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e3:SetCondition(c54702678.damcon) - e3:SetTarget(c54702678.damtg) - e3:SetOperation(c54702678.damop) - c:RegisterEffect(e3) - -- - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetCode(EFFECT_CANNOT_DIRECT_ATTACK) - c:RegisterEffect(e4) -end -function c54702678.ffilter(c) - return c:IsSetCard(0x16) and c:IsRace(RACE_MACHINE) -end -function c54702678.discon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetAttackTarget() and e:GetHandler()==Duel.GetAttacker() -end -function c54702678.disop(e,tp,eg,ep,ev,re,r,rp) - local bc=e:GetHandler():GetBattleTarget() - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0x57a0000) - bc:RegisterEffect(e1) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+0x57a0000) - bc:RegisterEffect(e2) -end -function c54702678.damcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsRelateToBattle() and c:GetBattleTarget():IsType(TYPE_MONSTER) -end -function c54702678.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(1000) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,1000) -end -function c54702678.damop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c54704216.lua b/script/c54704216.lua deleted file mode 100644 index 0c3bcda2b7..0000000000 --- a/script/c54704216.lua +++ /dev/null @@ -1,87 +0,0 @@ ---拷問車輪 -function c54704216.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DISABLE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(TIMING_STANDBY_PHASE,0x1c0) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c54704216.target) - e1:SetOperation(c54704216.operation) - c:RegisterEffect(e1) - --damage - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(54704216,0)) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetCategory(CATEGORY_DAMAGE) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) - e2:SetRange(LOCATION_SZONE) - e2:SetCountLimit(1) - e2:SetCondition(c54704216.damcon) - e2:SetTarget(c54704216.damtg) - e2:SetOperation(c54704216.damop) - c:RegisterEffect(e2) - --Destroy - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e3:SetRange(LOCATION_SZONE) - e3:SetCode(EVENT_LEAVE_FIELD) - e3:SetCondition(c54704216.descon) - e3:SetOperation(c54704216.desop) - c:RegisterEffect(e3) - e1:SetLabelObject(e3) -end -function c54704216.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) end - if chk==0 then return Duel.IsExistingTarget(nil,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - Duel.SelectTarget(tp,nil,tp,0,LOCATION_MZONE,1,1,nil) -end -function c54704216.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then - c:SetCardTarget(tc) - c:CreateRelation(tc,RESET_EVENT+0x1fe0000) - e:GetLabelObject():SetLabelObject(tc) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetRange(LOCATION_SZONE) - e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e1:SetTarget(c54704216.efftg) - e1:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_CANNOT_CHANGE_POSITION) - e2:SetProperty(EFFECT_FLAG_SET_AVAILABLE) - c:RegisterEffect(e2) - end -end -function c54704216.efftg(e,c) - return e:GetHandler():IsRelateToCard(c) -end -function c54704216.descon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsStatus(STATUS_DESTROY_CONFIRMED) then return false end - local tc=e:GetLabelObject() - return tc and eg:IsContains(tc) and c:IsRelateToCard(tc) -end -function c54704216.desop(e,tp,eg,ep,ev,re,r,rp) - Duel.Destroy(e:GetHandler(),REASON_EFFECT) -end -function c54704216.damcon(e,tp,eg,ep,ev,re,r,rp) - return tp==Duel.GetTurnPlayer() and e:GetHandler():GetFirstCardTarget()~=nil -end -function c54704216.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(500) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,500) -end -function c54704216.damop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c54706054.lua b/script/c54706054.lua deleted file mode 100644 index 9028b22ce9..0000000000 --- a/script/c54706054.lua +++ /dev/null @@ -1,15 +0,0 @@ ---ザ・キャリブレーター -function c54706054.initial_effect(c) - --attack - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetValue(c54706054.atkval) - c:RegisterEffect(e1) -end -function c54706054.atkval(e,c) - local g=Duel.GetMatchingGroup(Card.IsFaceup,c:GetControler(),0,LOCATION_MZONE,nil) - return g:GetSum(Card.GetRank)*300 -end diff --git a/script/c54719828.lua b/script/c54719828.lua deleted file mode 100644 index c1d8393f97..0000000000 --- a/script/c54719828.lua +++ /dev/null @@ -1,50 +0,0 @@ ---No.16 色の支配者ショック・ルーラー -function c54719828.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,4,3) - c:EnableReviveLimit() - --act limit - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(54719828,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c54719828.cost) - e1:SetTarget(c54719828.target) - e1:SetOperation(c54719828.operation) - c:RegisterEffect(e1) -end -c54719828.xyz_number=16 -function c54719828.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c54719828.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(54719828,1)) - e:SetLabel(Duel.SelectOption(tp,70,71,72)) -end -function c54719828.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EFFECT_CANNOT_ACTIVATE) - e1:SetTargetRange(1,1) - if e:GetLabel()==0 then - e1:SetValue(c54719828.aclimit1) - elseif e:GetLabel()==1 then - e1:SetValue(c54719828.aclimit2) - else e1:SetValue(c54719828.aclimit3) end - e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN,1) - Duel.RegisterEffect(e1,tp) -end -function c54719828.aclimit1(e,re,tp) - return re:IsActiveType(TYPE_MONSTER) and not re:GetHandler():IsImmuneToEffect(e) -end -function c54719828.aclimit2(e,re,tp) - return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL) and not re:GetHandler():IsImmuneToEffect(e) -end -function c54719828.aclimit3(e,re,tp) - return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_TRAP) and not re:GetHandler():IsImmuneToEffect(e) -end diff --git a/script/c54747648.lua b/script/c54747648.lua deleted file mode 100644 index cbcd0c6312..0000000000 --- a/script/c54747648.lua +++ /dev/null @@ -1,25 +0,0 @@ ---玄武の召喚士 -function c54747648.initial_effect(c) - --flip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(54747648,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c54747648.target) - e1:SetOperation(c54747648.operation) - c:RegisterEffect(e1) -end -function c54747648.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsDestructable() end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c54747648.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c54749427.lua b/script/c54749427.lua deleted file mode 100644 index 6fb6cafbec..0000000000 --- a/script/c54749427.lua +++ /dev/null @@ -1,28 +0,0 @@ ---D-HERO ディフェンドガイ -function c54749427.initial_effect(c) - --draw - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(54749427,0)) - e1:SetCategory(CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c54749427.condition) - e1:SetTarget(c54749427.target) - e1:SetOperation(c54749427.operation) - c:RegisterEffect(e1) -end -function c54749427.condition(e,tp,eg,ep,ev,re,r,rp) - return tp~=Duel.GetTurnPlayer() -end -function c54749427.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsDefencePos() end - Duel.SetTargetPlayer(1-tp) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,1-tp,1) -end -function c54749427.operation(e,tp,eg,ep,ev,re,r,rp) - local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) - Duel.Draw(p,1,REASON_EFFECT) -end diff --git a/script/c54752875.lua b/script/c54752875.lua deleted file mode 100644 index f4e13e79d8..0000000000 --- a/script/c54752875.lua +++ /dev/null @@ -1,6 +0,0 @@ ---双頭の雷龍 -function c54752875.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcCodeRep(c,31786629,2,true,true) -end diff --git a/script/c54762426.lua b/script/c54762426.lua deleted file mode 100644 index 3792298e09..0000000000 --- a/script/c54762426.lua +++ /dev/null @@ -1,31 +0,0 @@ ---埋蔵金の地図 -function c54762426.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DRAW+CATEGORY_HANDES) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_CHAINING) - e1:SetCondition(c54762426.condition) - e1:SetTarget(c54762426.target) - e1:SetOperation(c54762426.activate) - c:RegisterEffect(e1) -end -function c54762426.condition(e,tp,eg,ep,ev,re,r,rp) - local ex,tg,tc=Duel.GetOperationInfo(ev,CATEGORY_TOHAND) - return ex and tg~=nil and tg:IsContains(e:GetHandler()) -end -function c54762426.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp,2) end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(2) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2) - Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1) -end -function c54762426.activate(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - if Duel.Draw(p,d,REASON_EFFECT)==2 then - Duel.BreakEffect() - Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT+REASON_DISCARD) - end -end diff --git a/script/c54766667.lua b/script/c54766667.lua deleted file mode 100644 index 95162c1871..0000000000 --- a/script/c54766667.lua +++ /dev/null @@ -1,12 +0,0 @@ ---ホーリーフレーム -function c54766667.initial_effect(c) - --double tribute - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DOUBLE_TRIBUTE) - e1:SetValue(c54766667.condition) - c:RegisterEffect(e1) -end -function c54766667.condition(e,c) - return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsType(TYPE_NORMAL) -end diff --git a/script/c54773234.lua b/script/c54773234.lua deleted file mode 100644 index 1403d829fc..0000000000 --- a/script/c54773234.lua +++ /dev/null @@ -1,98 +0,0 @@ ---禁じられた聖典 -function c54773234.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_PRE_DAMAGE_CALCULATE) - e1:SetCondition(c54773234.condition) - e1:SetOperation(c54773234.activate) - c:RegisterEffect(e1) -end -function c54773234.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetAttackTarget()~=nil -end -function c54773234.activate(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local a=Duel.GetAttacker() - local d=Duel.GetAttackTarget() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_DISABLE) - e1:SetTargetRange(LOCATION_ONFIELD,LOCATION_ONFIELD) - e1:SetTarget(c54773234.distg) - e1:SetReset(RESET_PHASE+PHASE_DAMAGE) - Duel.RegisterEffect(e1,tp) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_CHAIN_SOLVING) - e2:SetRange(LOCATION_MZONE) - e2:SetOperation(c54773234.disop) - e2:SetReset(RESET_PHASE+PHASE_DAMAGE) - Duel.RegisterEffect(e2,tp) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetCode(EFFECT_DISABLE_TRAPMONSTER) - e3:SetRange(LOCATION_MZONE) - e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e3:SetReset(RESET_PHASE+PHASE_DAMAGE) - Duel.RegisterEffect(e3,tp) - if a:IsRelateToBattle() then - local aa=a:GetTextAttack() - local ad=a:GetTextDefence() - if a:IsImmuneToEffect(e) then - aa=a:GetBaseAttack() - ad=a:GetBaseDefence() end - if aa<0 then aa=0 end - if ad<0 then ad=0 end - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_IGNORE_IMMUNE) - e4:SetRange(LOCATION_MZONE) - e4:SetCode(EFFECT_SET_ATTACK_FINAL) - e4:SetReset(RESET_PHASE+PHASE_DAMAGE) - e4:SetValue(aa) - a:RegisterEffect(e4,true) - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_SINGLE) - e5:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_IGNORE_IMMUNE) - e5:SetRange(LOCATION_MZONE) - e5:SetCode(EFFECT_SET_DEFENCE_FINAL) - e5:SetReset(RESET_PHASE+PHASE_DAMAGE) - e5:SetValue(ad) - a:RegisterEffect(e5,true) - end - if d and d:IsRelateToBattle() then - local da=d:GetTextAttack() - local dd=d:GetTextDefence() - if d:IsImmuneToEffect(e) then - da=d:GetBaseAttack() - dd=d:GetBaseDefence() end - if da<0 then da=0 end - if dd<0 then dd=0 end - local e6=Effect.CreateEffect(c) - e6:SetType(EFFECT_TYPE_SINGLE) - e6:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_IGNORE_IMMUNE) - e6:SetRange(LOCATION_MZONE) - e6:SetCode(EFFECT_SET_ATTACK_FINAL) - e6:SetValue(da) - e6:SetReset(RESET_PHASE+PHASE_DAMAGE) - d:RegisterEffect(e6,true) - local e7=Effect.CreateEffect(c) - e7:SetType(EFFECT_TYPE_SINGLE) - e7:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_IGNORE_IMMUNE) - e7:SetRange(LOCATION_MZONE) - e7:SetCode(EFFECT_SET_DEFENCE_FINAL) - e7:SetValue(dd) - e7:SetReset(RESET_PHASE+PHASE_DAMAGE) - d:RegisterEffect(e7,true) - end -end -function c54773234.distg(e,c) - return c~=e:GetHandler() -end -function c54773234.disop(e,tp,eg,ep,ev,re,r,rp) - local loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION) - if bit.band(loc,LOCATION_ONFIELD)~=0 then - Duel.NegateEffect(ev) - end -end diff --git a/script/c5479217.lua b/script/c5479217.lua deleted file mode 100644 index 9fe0f74c85..0000000000 --- a/script/c5479217.lua +++ /dev/null @@ -1,27 +0,0 @@ ---ジュラック・インパクト -function c5479217.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c5479217.condition) - e1:SetTarget(c5479217.target) - e1:SetOperation(c5479217.activate) - c:RegisterEffect(e1) -end -function c5479217.cfilter(c) - return c:IsFaceup() and c:IsAttackAbove(2500) and c:IsRace(RACE_DINOSAUR) -end -function c5479217.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c5479217.cfilter,tp,LOCATION_MZONE,0,1,nil) -end -function c5479217.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end - local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c5479217.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler()) - Duel.Destroy(g,REASON_EFFECT) -end diff --git a/script/c54813225.lua b/script/c54813225.lua deleted file mode 100644 index d7dbb002e6..0000000000 --- a/script/c54813225.lua +++ /dev/null @@ -1,39 +0,0 @@ ---ダックファイター -function c54813225.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(54813225,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND+LOCATION_GRAVE) - e1:SetCost(c54813225.spcost) - e1:SetTarget(c54813225.sptg) - e1:SetOperation(c54813225.spop) - c:RegisterEffect(e1) -end -function c54813225.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - local ct=-ft+1 - if ct<=0 then ct=1 end - if chk==0 then - if Duel.GetFlagEffect(tp,54813225)~=0 then return false end - local rg=Duel.GetReleaseGroup(tp):Filter(Card.IsType,nil,TYPE_TOKEN) - return rg:CheckWithSumGreater(Card.GetLevel,3,ct,99) - end - local rg=Duel.GetReleaseGroup(tp):Filter(Card.IsType,nil,TYPE_TOKEN) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) - local rm=rg:SelectWithSumGreater(tp,Card.GetLevel,3,ct,99) - Duel.Release(rm,REASON_COST) - Duel.RegisterFlagEffect(tp,54813225,RESET_PHASE+PHASE_END,0,1) -end -function c54813225.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c54813225.spop(e,tp,eg,ep,ev,re,r,rp,c) - local c=e:GetHandler() - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c54860010.lua b/script/c54860010.lua deleted file mode 100644 index 80bd4d8919..0000000000 --- a/script/c54860010.lua +++ /dev/null @@ -1,54 +0,0 @@ ---ワーム・プリンス -function c54860010.initial_effect(c) - --search - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(54860010,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_BATTLE_DESTROYING) - e1:SetTarget(c54860010.thtg) - e1:SetOperation(c54860010.thop) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(54860010,1)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_PHASE+PHASE_END) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCondition(c54860010.descon) - e2:SetTarget(c54860010.destg) - e2:SetOperation(c54860010.desop) - c:RegisterEffect(e2) -end -function c54860010.filter(c) - return c:IsSetCard(0x3e) and c:IsRace(RACE_REPTILE) and c:IsAbleToHand() -end -function c54860010.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c54860010.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c54860010.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c54860010.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end -function c54860010.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x3e) and c:IsRace(RACE_REPTILE) -end -function c54860010.descon(e,tp,eg,ep,ev,re,r,rp) - return not Duel.IsExistingMatchingCard(c54860010.cfilter,tp,LOCATION_MZONE,0,1,e:GetHandler()) -end -function c54860010.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0) -end -function c54860010.desop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - Duel.Destroy(e:GetHandler(),REASON_EFFECT) - end -end diff --git a/script/c54878498.lua b/script/c54878498.lua deleted file mode 100644 index c47057c20a..0000000000 --- a/script/c54878498.lua +++ /dev/null @@ -1,25 +0,0 @@ ---ケルベク -function c54878498.initial_effect(c) - --to hand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(54878498,0)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_BATTLED) - e1:SetCondition(c54878498.condition) - e1:SetTarget(c54878498.target) - e1:SetOperation(c54878498.operation) - c:RegisterEffect(e1) -end -function c54878498.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetAttackTarget()==e:GetHandler() and not Duel.GetAttacker():IsStatus(STATUS_BATTLE_DESTROYED) -end -function c54878498.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,Duel.GetAttacker(),1,0,0) -end -function c54878498.operation(e,tp,eg,ep,ev,re,r,rp) - local a=Duel.GetAttacker() - if not a:IsRelateToBattle() then return end - Duel.SendtoHand(a,nil,REASON_EFFECT) -end diff --git a/script/c54903668.lua b/script/c54903668.lua deleted file mode 100644 index 41003aff1f..0000000000 --- a/script/c54903668.lua +++ /dev/null @@ -1,36 +0,0 @@ ---妖仙獣の秘技 -function c54903668.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_CHAINING) - e1:SetCondition(c54903668.condition) - e1:SetTarget(c54903668.target) - e1:SetOperation(c54903668.activate) - c:RegisterEffect(e1) -end -function c54903668.filter1(c) - return c:IsFaceup() and c:IsSetCard(0xb3) -end -function c54903668.filter2(c) - return c:IsFaceup() and not c:IsSetCard(0xb3) -end -function c54903668.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c54903668.filter1,tp,LOCATION_ONFIELD,0,1,nil) - and not Duel.IsExistingMatchingCard(c54903668.filter2,tp,LOCATION_MZONE,0,1,nil) - and (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE)) and Duel.IsChainNegatable(ev) -end -function c54903668.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) - end -end -function c54903668.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateActivation(ev) - if re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(eg,REASON_EFFECT) - end -end diff --git a/script/c54912977.lua b/script/c54912977.lua deleted file mode 100644 index b9015bee79..0000000000 --- a/script/c54912977.lua +++ /dev/null @@ -1,55 +0,0 @@ ---マジック・ランプ -function c54912977.initial_effect(c) - --change target - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(54912977,0)) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_BATTLE_CONFIRM) - e1:SetCondition(c54912977.condition) - e1:SetTarget(c54912977.target) - e1:SetOperation(c54912977.operation) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(54912977,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetTarget(c54912977.sptg) - e2:SetOperation(c54912977.spop) - c:RegisterEffect(e2) -end -function c54912977.condition(e,tp,eg,ep,ev,re,r,rp) - return r~=REASON_REPLACE and Duel.GetAttackTarget()==e:GetHandler() and Duel.GetAttacker():IsControler(1-tp) - and e:GetHandler():GetBattlePosition()==POS_FACEDOWN_DEFENCE -end -function c54912977.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - Duel.SelectTarget(tp,nil,tp,0,LOCATION_MZONE,1,1,Duel.GetAttacker()) -end -function c54912977.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.ChangeAttackTarget(tc) - end -end -function c54912977.spfilter(c,e,tp) - return c:IsCode(97590747) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c54912977.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c54912977.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c54912977.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - if not e:GetHandler():IsRelateToEffect(e) or e:GetHandler():IsFacedown() then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c54912977.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c54913680.lua b/script/c54913680.lua deleted file mode 100644 index 997781b9bf..0000000000 --- a/script/c54913680.lua +++ /dev/null @@ -1,36 +0,0 @@ ---六武ノ書 -function c54913680.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c54913680.cost) - e1:SetTarget(c54913680.target) - e1:SetOperation(c54913680.activate) - c:RegisterEffect(e1) -end -function c54913680.costfilter(c) - return c:IsFaceup() and c:IsSetCard(0x3d) -end -function c54913680.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,c54913680.costfilter,2,nil) end - local g=Duel.SelectReleaseGroup(tp,c54913680.costfilter,2,2,nil) - Duel.Release(g,REASON_COST) -end -function c54913680.filter(c,e,tp) - return c:IsCode(63176202) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c54913680.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-2 - and Duel.IsExistingMatchingCard(c54913680.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c54913680.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c54913680.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c54936498.lua b/script/c54936498.lua deleted file mode 100644 index 1a4c1cf104..0000000000 --- a/script/c54936498.lua +++ /dev/null @@ -1,33 +0,0 @@ ---インフルーエンス・ドラゴン -function c54936498.initial_effect(c) - --lv up - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(54936498,0)) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_MZONE) - e1:SetTarget(c54936498.tg) - e1:SetOperation(c54936498.op) - c:RegisterEffect(e1) -end -function c54936498.filter(c) - return c:IsFaceup() and not c:IsRace(RACE_DRAGON) -end -function c54936498.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c54936498.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c54936498.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - local g=Duel.SelectTarget(tp,c54936498.filter,tp,LOCATION_MZONE,0,1,1,nil) -end -function c54936498.op(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CHANGE_RACE) - e1:SetValue(RACE_DRAGON) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - end -end diff --git a/script/c5494820.lua b/script/c5494820.lua deleted file mode 100644 index ab891a7c2b..0000000000 --- a/script/c5494820.lua +++ /dev/null @@ -1,49 +0,0 @@ ---サイクロンレーザー -function c5494820.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c5494820.target) - e1:SetOperation(c5494820.operation) - c:RegisterEffect(e1) - --atk - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(300) - c:RegisterEffect(e2) - --pierce - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_EQUIP) - e3:SetCode(EFFECT_PIERCE) - c:RegisterEffect(e3) - --Equip limit - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetCode(EFFECT_EQUIP_LIMIT) - e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e4:SetValue(c5494820.eqfilter) - c:RegisterEffect(e4) -end -function c5494820.eqfilter(e,c) - return c:IsCode(10992251) -end -function c5494820.filter(c) - return c:IsFaceup() and c:IsCode(10992251) -end -function c5494820.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c5494820.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c5494820.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c5494820.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c5494820.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,e:GetHandler(),tc) - end -end diff --git a/script/c54959865.lua b/script/c54959865.lua deleted file mode 100644 index 3ec072d35e..0000000000 --- a/script/c54959865.lua +++ /dev/null @@ -1,24 +0,0 @@ ---N・エア・ハミングバード -function c54959865.initial_effect(c) - --recover - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(54959865,0)) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCategory(CATEGORY_RECOVER) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetTarget(c54959865.target) - e1:SetOperation(c54959865.operation) - c:RegisterEffect(e1) -end -function c54959865.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0 end - Duel.SetTargetPlayer(tp) - Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,0) -end -function c54959865.operation(e,tp,eg,ep,ev,re,r,rp) - local rt=Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)*500 - local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) - Duel.Recover(p,rt,REASON_EFFECT) -end diff --git a/script/c54974237.lua b/script/c54974237.lua deleted file mode 100644 index 7686b10adf..0000000000 --- a/script/c54974237.lua +++ /dev/null @@ -1,89 +0,0 @@ ---闇のデッキ破壊ウイルス -function c54974237.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_TOHAND+TIMING_END_PHASE) - e1:SetCost(c54974237.cost) - e1:SetTarget(c54974237.target) - e1:SetOperation(c54974237.activate) - c:RegisterEffect(e1) -end -function c54974237.costfilter(c) - return c:IsAttribute(ATTRIBUTE_DARK) and c:GetAttack()>=2500 -end -function c54974237.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,c54974237.costfilter,1,nil) end - local g=Duel.SelectReleaseGroup(tp,c54974237.costfilter,1,1,nil) - Duel.Release(g,REASON_COST) -end -function c54974237.tgfilter(c,ty) - return c:IsFaceup() and c:IsType(ty) and c:IsDestructable() -end -function c54974237.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(54974237,2)) - local ac=Duel.SelectOption(tp,aux.Stringid(54974237,0),aux.Stringid(54974237,1)) - local ty=TYPE_SPELL - if ac==1 then ty=TYPE_TRAP end - e:SetLabel(ty) - local g=Duel.GetMatchingGroup(c54974237.tgfilter,tp,0,LOCATION_ONFIELD,nil,ty) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c54974237.cffilter(c) - return c:IsLocation(LOCATION_HAND) or (c:IsFacedown() and c:IsType(TYPE_SPELL+TYPE_TRAP)) -end -function c54974237.activate(e,tp,eg,ep,ev,re,r,rp) - local ty=e:GetLabel() - local g=Duel.GetFieldGroup(tp,0,LOCATION_ONFIELD+LOCATION_HAND) - if g:GetCount()>0 then - local cg=g:Filter(c54974237.cffilter,nil) - Duel.ConfirmCards(tp,cg) - local dg=g:Filter(Card.IsType,nil,ty) - Duel.Destroy(dg,REASON_EFFECT) - Duel.ShuffleHand(1-tp) - end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetProperty(EFFECT_FLAG_DELAY) - e1:SetCode(EVENT_DRAW) - e1:SetOperation(c54974237.desop) - e1:SetLabel(ty) - e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN,3) - Duel.RegisterEffect(e1,tp) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_PHASE+PHASE_END) - e2:SetCountLimit(1) - e2:SetCondition(c54974237.turncon) - e2:SetOperation(c54974237.turnop) - e2:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN,3) - Duel.RegisterEffect(e2,tp) - e2:SetLabelObject(e1) - e:GetHandler():RegisterFlagEffect(1082946,RESET_PHASE+PHASE_END+RESET_OPPO_TURN,0,3) - c54974237[e:GetHandler()]=e2 -end -function c54974237.desop(e,tp,eg,ep,ev,re,r,rp) - if ep==e:GetOwnerPlayer() then return end - local hg=eg:Filter(Card.IsLocation,nil,LOCATION_HAND) - if hg:GetCount()==0 then return end - Duel.ConfirmCards(1-ep,hg) - local dg=hg:Filter(Card.IsType,nil,e:GetLabel()) - Duel.Destroy(dg,REASON_EFFECT) - Duel.ShuffleHand(ep) -end -function c54974237.turncon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp -end -function c54974237.turnop(e,tp,eg,ep,ev,re,r,rp) - local ct=e:GetLabel() - ct=ct+1 - e:SetLabel(ct) - e:GetHandler():SetTurnCounter(ct) - if ct==3 then - e:GetLabelObject():Reset() - e:GetOwner():ResetFlagEffect(1082946) - end -end diff --git a/script/c54976796.lua b/script/c54976796.lua deleted file mode 100644 index 189b978857..0000000000 --- a/script/c54976796.lua +++ /dev/null @@ -1,20 +0,0 @@ ---レベル制限A地区 -function c54976796.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --Pos Change - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_SET_POSITION) - e2:SetRange(LOCATION_SZONE) - e2:SetTarget(c54976796.target) - e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e2:SetValue(POS_FACEUP_ATTACK) - c:RegisterEffect(e2) -end -function c54976796.target(e,c) - return c:IsLevelBelow(3) and c:IsFaceup() -end diff --git a/script/c54977057.lua b/script/c54977057.lua deleted file mode 100644 index 0f728fd332..0000000000 --- a/script/c54977057.lua +++ /dev/null @@ -1,40 +0,0 @@ ---天空の宝札 -function c54977057.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DRAW+CATEGORY_REMOVE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c54977057.cost) - e1:SetTarget(c54977057.target) - e1:SetOperation(c54977057.activate) - c:RegisterEffect(e1) -end -function c54977057.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_SPSUMMON)==0 and Duel.GetActivityCount(tp,ACTIVITY_BATTLE_PHASE)==0 end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) - e1:SetTargetRange(1,0) - Duel.RegisterEffect(e1,tp) - local e2=e1:Clone() - e2:SetCode(EFFECT_CANNOT_BP) - Duel.RegisterEffect(e2,tp) -end -function c54977057.filter(c) - return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_FAIRY) and c:IsAbleToRemove() -end -function c54977057.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp,2) - and Duel.IsExistingMatchingCard(c54977057.filter,tp,LOCATION_HAND,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_HAND) -end -function c54977057.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c54977057.filter,tp,LOCATION_HAND,0,1,1,nil) - Duel.Remove(g,POS_FACEUP,REASON_EFFECT) - Duel.Draw(tp,2,REASON_EFFECT) -end diff --git a/script/c5498296.lua b/script/c5498296.lua deleted file mode 100644 index 92b94cca2b..0000000000 --- a/script/c5498296.lua +++ /dev/null @@ -1,31 +0,0 @@ ---暗黒界の斥候 スカー -function c5498296.initial_effect(c) - --search - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(5498296,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetCondition(c5498296.condition) - e1:SetTarget(c5498296.target) - e1:SetOperation(c5498296.operation) - c:RegisterEffect(e1) -end -function c5498296.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) -end -function c5498296.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c5498296.filter(c) - return c:IsLevelBelow(4) and c:IsSetCard(0x6) and c:IsAbleToHand() -end -function c5498296.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c5498296.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c55001420.lua b/script/c55001420.lua deleted file mode 100644 index a7d8d07b37..0000000000 --- a/script/c55001420.lua +++ /dev/null @@ -1,50 +0,0 @@ ---深緑の魔弓使い -function c55001420.initial_effect(c) - --cannot be battle target - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_CANNOT_BE_BATTLE_TARGET) - e1:SetCondition(c55001420.ccon) - e1:SetValue(aux.imval1) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(55001420,0)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetRange(LOCATION_MZONE) - e2:SetCost(c55001420.descost) - e2:SetTarget(c55001420.destg) - e2:SetOperation(c55001420.desop) - c:RegisterEffect(e2) -end -function c55001420.cfilter(c) - return c:IsFaceup() and c:IsRace(RACE_PLANT) -end -function c55001420.ccon(e) - return Duel.IsExistingMatchingCard(c55001420.cfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) -end -function c55001420.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsRace,1,nil,RACE_PLANT) end - local g=Duel.SelectReleaseGroup(tp,Card.IsRace,1,1,nil,RACE_PLANT) - Duel.Release(g,REASON_COST) -end -function c55001420.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable() -end -function c55001420.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and c55001420.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c55001420.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c55001420.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c55001420.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c55008284.lua b/script/c55008284.lua deleted file mode 100644 index 8f979e7d59..0000000000 --- a/script/c55008284.lua +++ /dev/null @@ -1,41 +0,0 @@ ---同姓同名同盟 -function c55008284.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c55008284.target) - e1:SetOperation(c55008284.activate) - c:RegisterEffect(e1) -end -function c55008284.spfilter(c,e,tp,code) - return c:IsCode(code) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c55008284.filter(c,e,tp) - return c:IsFaceup() and c:IsLevelBelow(2) and c:IsType(TYPE_NORMAL) - and Duel.IsExistingMatchingCard(c55008284.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp,c:GetCode()) -end -function c55008284.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c55008284.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c55008284.filter,tp,LOCATION_MZONE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - local g=Duel.SelectTarget(tp,c55008284.filter,tp,LOCATION_MZONE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c55008284.activate(e,tp,eg,ep,ev,re,r,rp) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ft<=0 then return end - local tc=Duel.GetFirstTarget() - if not tc:IsRelateToEffect(e) or tc:IsFacedown() then return end - local g=Duel.GetMatchingGroup(c55008284.spfilter,tp,LOCATION_DECK,0,nil,e,tp,tc:GetCode()) - local sc=g:GetFirst() - while ft>0 and sc do - Duel.SpecialSummonStep(sc,0,tp,tp,false,false,POS_FACEUP) - ft=ft-1 - sc=g:GetNext() - end - Duel.SpecialSummonComplete() -end diff --git a/script/c55013285.lua b/script/c55013285.lua deleted file mode 100644 index 5ab6c8b9e0..0000000000 --- a/script/c55013285.lua +++ /dev/null @@ -1,32 +0,0 @@ ---軍隊竜 -function c55013285.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(55013285,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetCondition(c55013285.condition) - e1:SetTarget(c55013285.target) - e1:SetOperation(c55013285.operation) - c:RegisterEffect(e1) -end -function c55013285.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) -end -function c55013285.filter(c,e,tp) - return c:IsCode(55013285) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c55013285.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c55013285.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c55013285.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c55013285.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c55046718.lua b/script/c55046718.lua deleted file mode 100644 index de3f4c5519..0000000000 --- a/script/c55046718.lua +++ /dev/null @@ -1,74 +0,0 @@ ---ヴァイロン・コンポーネント -function c55046718.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c55046718.target) - e1:SetOperation(c55046718.operation) - c:RegisterEffect(e1) - --Pierce - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_PIERCE) - c:RegisterEffect(e2) - --Equip limit - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_EQUIP_LIMIT) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e3:SetValue(c55046718.eqlimit) - c:RegisterEffect(e3) - --Search - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(55046718,0)) - e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e4:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP) - e4:SetCode(EVENT_TO_GRAVE) - e4:SetCondition(c55046718.thcon) - e4:SetTarget(c55046718.thtg) - e4:SetOperation(c55046718.thop) - c:RegisterEffect(e4) -end -function c55046718.eqlimit(e,c) - return c:IsSetCard(0x30) -end -function c55046718.filter(c) - return c:IsFaceup() and c:IsSetCard(0x30) -end -function c55046718.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c55046718.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c55046718.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c55046718.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c55046718.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,c,tc) - end -end -function c55046718.thcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousPosition(POS_FACEUP) - and e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) -end -function c55046718.thfilter(c) - return c:IsSetCard(0x30) and c:IsType(TYPE_SPELL) and c:IsAbleToHand() -end -function c55046718.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c55046718.thfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c55046718.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c55046718.thfilter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c55063681.lua b/script/c55063681.lua deleted file mode 100644 index b1e8de0be3..0000000000 --- a/script/c55063681.lua +++ /dev/null @@ -1,53 +0,0 @@ ---パワー・サプライヤー -function c55063681.initial_effect(c) - --set target - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(55063681,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c55063681.target) - e1:SetOperation(c55063681.operation) - c:RegisterEffect(e1) -end -function c55063681.filter(c,ec) - return c:IsFaceup() and ((ec==c and c:GetFlagEffect(55063681)==0) or (ec~=c and not ec:IsHasCardTarget(c))) -end -function c55063681.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c55063681.filter(chkc,e:GetHandler()) end - if chk==0 then return Duel.IsExistingTarget(c55063681.filter,tp,LOCATION_MZONE,0,1,nil,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c55063681.filter,tp,LOCATION_MZONE,0,1,1,nil,e:GetHandler()) -end -function c55063681.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - local c=e:GetHandler() - if tc:IsFaceup() and tc:IsRelateToEffect(e) and c:IsFaceup() and c:IsRelateToEffect(e) then - if tc~=c then - c:SetCardTarget(tc) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(400) - e1:SetCondition(c55063681.atkcon) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - else - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(400) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - tc:RegisterFlagEffect(55063681,RESET_EVENT+0x1fe0000,0,1) - end - end -end -function c55063681.atkcon(e) - return e:GetOwner():IsHasCardTarget(e:GetHandler()) -end diff --git a/script/c55067058.lua b/script/c55067058.lua deleted file mode 100644 index 600e4adbeb..0000000000 --- a/script/c55067058.lua +++ /dev/null @@ -1,31 +0,0 @@ ---No.19 フリーザードン -function c55067058.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,5,2) - c:EnableReviveLimit() - --remove overlay replace - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(55067058,0)) - e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_OVERLAY_REMOVE_REPLACE) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCondition(c55067058.rcon) - e1:SetOperation(c55067058.rop) - c:RegisterEffect(e1) -end -c55067058.xyz_number=19 -function c55067058.rcon(e,tp,eg,ep,ev,re,r,rp) - return bit.band(r,REASON_COST)~=0 and re:IsHasType(0x7e0) and re:IsActiveType(TYPE_XYZ) - and e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_EFFECT) - and ep==e:GetOwnerPlayer() and re:GetHandler():GetOverlayCount()>=ev-1 -end -function c55067058.rop(e,tp,eg,ep,ev,re,r,rp) - local ct=bit.band(ev,0xffff) - if ct==1 then - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_EFFECT) - else - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_EFFECT) - re:GetHandler():RemoveOverlayCard(tp,ct-1,ct-1,REASON_COST) - end -end diff --git a/script/c5506791.lua b/script/c5506791.lua deleted file mode 100644 index 360c3cbbb4..0000000000 --- a/script/c5506791.lua +++ /dev/null @@ -1,66 +0,0 @@ ---マジェスペクター・キャット -function c5506791.initial_effect(c) - --pendulum summon - aux.AddPendulumProcedure(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --search - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_SUMMON_SUCCESS) - e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e2:SetCountLimit(1,5506791) - e2:SetOperation(c5506791.regop) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e3) - --cannot target - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e4:SetRange(LOCATION_MZONE) - e4:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) - e4:SetValue(aux.tgoval) - c:RegisterEffect(e4) - --indes - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_SINGLE) - e5:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e5:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - e5:SetRange(LOCATION_MZONE) - e5:SetValue(c5506791.indval) - c:RegisterEffect(e5) -end -function c5506791.thfilter(c) - return c:IsSetCard(0xd0) and c:IsAbleToHand() -end -function c5506791.regop(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetCountLimit(1) - e1:SetCondition(c5506791.thcon) - e1:SetOperation(c5506791.thop) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function c5506791.thcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c5506791.thfilter,tp,LOCATION_DECK,0,1,nil) -end -function c5506791.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_CARD,0,5506791) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c5506791.thfilter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end -function c5506791.indval(e,re,tp) - return tp~=e:GetHandlerPlayer() -end diff --git a/script/c55099248.lua b/script/c55099248.lua deleted file mode 100644 index b083852459..0000000000 --- a/script/c55099248.lua +++ /dev/null @@ -1,40 +0,0 @@ ---ナチュル・ストロベリー -function c55099248.initial_effect(c) - --atk up - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(55099248,0)) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE) - e1:SetTarget(c55099248.atktg) - e1:SetOperation(c55099248.atkop) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e2) -end -function c55099248.filter(c,e,tp) - return c:IsFaceup() and c:IsLocation(LOCATION_MZONE) and c:IsCanBeEffectTarget(e) and c:GetSummonPlayer()~=tp -end -function c55099248.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return eg:IsContains(chkc) and c55099248.filter(chkc,e,tp) end - if chk==0 then return eg:IsExists(c55099248.filter,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - local g=eg:FilterSelect(tp,c55099248.filter,1,1,nil,e,tp) - Duel.SetTargetCard(g) -end -function c55099248.atkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsFaceup() and c:IsRelateToEffect(e) and tc and tc:IsFaceup() and tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(tc:GetLevel()*100) - e1:SetReset(RESET_EVENT+0x1ff0000+RESET_PHASE+PHASE_END) - c:RegisterEffect(e1) - end -end diff --git a/script/c55106249.lua b/script/c55106249.lua deleted file mode 100644 index c4c709f7b5..0000000000 --- a/script/c55106249.lua +++ /dev/null @@ -1,94 +0,0 @@ ---ブンボーグ006 -function c55106249.initial_effect(c) - --pendulum summon - aux.AddPendulumProcedure(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --splimit - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetRange(LOCATION_PZONE) - e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE) - e2:SetTargetRange(1,0) - e2:SetCondition(aux.nfbdncon) - e2:SetTarget(c55106249.splimit) - c:RegisterEffect(e2) - --pos - local e3=Effect.CreateEffect(c) - e3:SetCategory(CATEGORY_POSITION) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e3:SetCode(EVENT_SUMMON_SUCCESS) - e3:SetTarget(c55106249.postg) - e3:SetOperation(c55106249.posop) - c:RegisterEffect(e3) - local e4=e3:Clone() - e4:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e4) - --atk - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_SINGLE) - e5:SetCode(EFFECT_UPDATE_ATTACK) - e5:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e5:SetRange(LOCATION_MZONE) - e5:SetValue(c55106249.atkval) - c:RegisterEffect(e5) - --to hand - local e6=Effect.CreateEffect(c) - e6:SetCategory(CATEGORY_TOHAND) - e6:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e6:SetCode(EVENT_DESTROYED) - e6:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e6:SetCountLimit(1,55106249) - e6:SetCondition(c55106249.thcon) - e6:SetTarget(c55106249.thtg) - e6:SetOperation(c55106249.thop) - c:RegisterEffect(e6) -end -function c55106249.splimit(e,c,tp,sumtp,sumpos) - return not c:IsSetCard(0xab) and bit.band(sumtp,SUMMON_TYPE_PENDULUM)==SUMMON_TYPE_PENDULUM -end -function c55106249.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) end - if chk==0 then return Duel.IsExistingTarget(nil,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE) - local g=Duel.SelectTarget(tp,nil,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0) -end -function c55106249.posop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.ChangePosition(tc,POS_FACEUP_DEFENCE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK) - end -end -function c55106249.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0xab) -end -function c55106249.atkval(e,c) - return Duel.GetMatchingGroupCount(c55106249.cfilter,c:GetControler(),LOCATION_EXTRA,0,nil)*500 -end -function c55106249.thcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsPreviousLocation(LOCATION_SZONE) and (c:GetPreviousSequence()==6 or c:GetPreviousSequence()==7) -end -function c55106249.thfilter(c) - return c:IsSetCard(0xab) and c:IsAbleToHand() -end -function c55106249.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c55106249.thfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c55106249.thfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c55106249.thfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c55106249.thop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end diff --git a/script/c55117418.lua b/script/c55117418.lua deleted file mode 100644 index d11978e409..0000000000 --- a/script/c55117418.lua +++ /dev/null @@ -1,33 +0,0 @@ ---能力吸収コア -function c55117418.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_CHAINING) - e1:SetCondition(c55117418.condition) - e1:SetTarget(c55117418.target) - e1:SetOperation(c55117418.activate) - c:RegisterEffect(e1) -end -function c55117418.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x1d) -end -function c55117418.condition(e,tp,eg,ep,ev,re,r,rp) - return re:IsActiveType(TYPE_MONSTER) and Duel.IsChainNegatable(ev) - and Duel.IsExistingMatchingCard(c55117418.cfilter,tp,LOCATION_MZONE,0,1,nil) - and Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_GRAVE,0,1,nil,36623431) -end -function c55117418.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) - end -end -function c55117418.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateActivation(ev) - if re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(eg,REASON_EFFECT) - end -end diff --git a/script/c55119278.lua b/script/c55119278.lua deleted file mode 100644 index 6a9b6316de..0000000000 --- a/script/c55119278.lua +++ /dev/null @@ -1,25 +0,0 @@ ---D・ラジオン -function c55119278.initial_effect(c) - --atk - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetCondition(c55119278.cona) - e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x26)) - e1:SetValue(800) - c:RegisterEffect(e1) - --def - local e2=e1:Clone() - e2:SetCode(EFFECT_UPDATE_DEFENCE) - e2:SetCondition(c55119278.cond) - e2:SetValue(1000) - c:RegisterEffect(e2) -end -function c55119278.cona(e) - return e:GetHandler():IsAttackPos() -end -function c55119278.cond(e) - return e:GetHandler():IsDefencePos() -end diff --git a/script/c55136228.lua b/script/c55136228.lua deleted file mode 100644 index 034f88231d..0000000000 --- a/script/c55136228.lua +++ /dev/null @@ -1,66 +0,0 @@ ---剣闘獣の底力 -function c55136228.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetCondition(c55136228.condition) - e1:SetTarget(c55136228.target) - e1:SetOperation(c55136228.activate) - c:RegisterEffect(e1) - --to hand - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_GRAVE) - e1:SetCost(c55136228.thcost) - e1:SetTarget(c55136228.thtg) - e1:SetOperation(c55136228.thop) - c:RegisterEffect(e1) -end -function c55136228.condition(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetCurrentPhase()==PHASE_DAMAGE and Duel.IsDamageCalculated() then return false end - return true -end -function c55136228.filter(c) - return c:IsFaceup() and c:IsSetCard(0x19) -end -function c55136228.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c55136228.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c55136228.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - local g=Duel.SelectTarget(tp,c55136228.filter,tp,LOCATION_MZONE,0,1,1,nil) -end -function c55136228.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - e1:SetValue(500) - tc:RegisterEffect(e1) - end -end -function c55136228.cfilter(c) - return c:IsSetCard(0x19) and c:IsAbleToDeckAsCost() -end -function c55136228.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c55136228.cfilter,tp,LOCATION_GRAVE,0,2,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectMatchingCard(tp,c55136228.cfilter,tp,LOCATION_GRAVE,0,2,2,e:GetHandler()) - Duel.SendtoDeck(g,nil,2,REASON_COST) -end -function c55136228.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToHand() end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0) -end -function c55136228.thop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,e:GetHandler()) - end -end diff --git a/script/c55144522.lua b/script/c55144522.lua deleted file mode 100644 index b2f55d1cd8..0000000000 --- a/script/c55144522.lua +++ /dev/null @@ -1,22 +0,0 @@ ---強欲な壺 -function c55144522.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c55144522.target) - e1:SetOperation(c55144522.activate) - c:RegisterEffect(e1) -end -function c55144522.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp,2) end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(2) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2) -end -function c55144522.activate(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end diff --git a/script/c55154048.lua b/script/c55154048.lua deleted file mode 100644 index 8684edf58e..0000000000 --- a/script/c55154048.lua +++ /dev/null @@ -1,75 +0,0 @@ ---極星宝ドラウプニル -function c55154048.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c55154048.target) - e1:SetOperation(c55154048.operation) - c:RegisterEffect(e1) - --Atk - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(800) - c:RegisterEffect(e2) - --Equip limit - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_EQUIP_LIMIT) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e3:SetValue(c55154048.eqlimit) - c:RegisterEffect(e3) - --Search - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(55154048,0)) - e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e4:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP) - e4:SetCode(EVENT_LEAVE_FIELD) - e4:SetCondition(c55154048.thcon) - e4:SetTarget(c55154048.thtg) - e4:SetOperation(c55154048.thop) - c:RegisterEffect(e4) -end -function c55154048.eqlimit(e,c) - return c:IsSetCard(0x42) or c:IsSetCard(0x4b) -end -function c55154048.filter(c) - return c:IsFaceup() and (c:IsSetCard(0x42) or c:IsSetCard(0x4b)) -end -function c55154048.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c55154048.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c55154048.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c55154048.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c55154048.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,c,tc) - end -end -function c55154048.thcon(e,tp,eg,ep,ev,re,r,rp,chk) - return e:GetHandler():IsPreviousPosition(POS_FACEUP) - and bit.band(e:GetHandler():GetReason(),0x41)==0x41 -end -function c55154048.thfilter(c) - return c:IsSetCard(0x5042) and c:IsAbleToHand() -end -function c55154048.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c55154048.thfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c55154048.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c55154048.thfilter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c55171412.lua b/script/c55171412.lua deleted file mode 100644 index 698405bae5..0000000000 --- a/script/c55171412.lua +++ /dev/null @@ -1,121 +0,0 @@ ---E・HERO アクア・ネオス -function c55171412.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcCode2(c,89943723,17955766,false,false) - --spsummon condition - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(c55171412.splimit) - c:RegisterEffect(e1) - --special summon rule - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_SPSUMMON_PROC) - e2:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e2:SetRange(LOCATION_EXTRA) - e2:SetCondition(c55171412.spcon) - e2:SetOperation(c55171412.spop) - c:RegisterEffect(e2) - --return - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(55171412,0)) - e3:SetCategory(CATEGORY_TODECK) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e3:SetCode(EVENT_PHASE+PHASE_END) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1) - e3:SetCondition(c55171412.retcon1) - e3:SetTarget(c55171412.rettg) - e3:SetOperation(c55171412.retop) - c:RegisterEffect(e3) - local e4=e3:Clone() - e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e4:SetProperty(0) - e4:SetCondition(c55171412.retcon2) - c:RegisterEffect(e4) - --destroy - local e5=Effect.CreateEffect(c) - e5:SetDescription(aux.Stringid(55171412,1)) - e5:SetCategory(CATEGORY_DESTROY) - e5:SetType(EFFECT_TYPE_IGNITION) - e5:SetRange(LOCATION_MZONE) - e5:SetCountLimit(1) - e5:SetCost(c55171412.descost) - e5:SetTarget(c55171412.destg) - e5:SetOperation(c55171412.desop) - c:RegisterEffect(e5) -end -function c55171412.splimit(e,se,sp,st) - return not e:GetHandler():IsLocation(LOCATION_EXTRA) -end -function c55171412.spfilter(c,code) - return c:IsAbleToDeckOrExtraAsCost() and c:GetCode()==code -end -function c55171412.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ft<-1 then return false end - local g1=Duel.GetMatchingGroup(c55171412.spfilter,tp,LOCATION_ONFIELD,0,nil,89943723) - local g2=Duel.GetMatchingGroup(c55171412.spfilter,tp,LOCATION_ONFIELD,0,nil,17955766) - if g1:GetCount()==0 or g2:GetCount()==0 then return false end - if ft>0 then return true end - local f1=g1:FilterCount(Card.IsLocation,nil,LOCATION_MZONE) - local f2=g2:FilterCount(Card.IsLocation,nil,LOCATION_MZONE) - if ft==-1 then return f1>0 and f2>0 - else return f1>0 or f2>0 end -end -function c55171412.spop(e,tp,eg,ep,ev,re,r,rp,c) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - local g1=Duel.GetMatchingGroup(c55171412.spfilter,tp,LOCATION_ONFIELD,0,nil,89943723) - local g2=Duel.GetMatchingGroup(c55171412.spfilter,tp,LOCATION_ONFIELD,0,nil,17955766) - g1:Merge(g2) - local g=Group.CreateGroup() - local tc=nil - for i=1,2 do - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - if ft<=0 then - tc=g1:FilterSelect(tp,Card.IsLocation,1,1,nil,LOCATION_MZONE):GetFirst() - else - tc=g1:Select(tp,1,1,nil):GetFirst() - end - g:AddCard(tc) - g1:Remove(Card.IsCode,nil,tc:GetCode()) - ft=ft+1 - end - local cg=g:Filter(Card.IsFacedown,nil) - if cg:GetCount()>0 then - Duel.ConfirmCards(1-tp,cg) - end - Duel.SendtoDeck(g,nil,2,REASON_COST) -end -function c55171412.retcon1(e,tp,eg,ep,ev,re,r,rp,chk) - return not e:GetHandler():IsHasEffect(42015635) -end -function c55171412.retcon2(e,tp,eg,ep,ev,re,r,rp,chk) - return e:GetHandler():IsHasEffect(42015635) -end -function c55171412.rettg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToExtra() end - Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0) -end -function c55171412.retop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) or e:GetHandler():IsFacedown() then return end - Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_EFFECT) -end -function c55171412.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) -end -function c55171412.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0 end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,1-tp,LOCATION_HAND) -end -function c55171412.desop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND) - local sg=g:RandomSelect(tp,1) - Duel.Destroy(sg,REASON_EFFECT) -end diff --git a/script/c5519829.lua b/script/c5519829.lua deleted file mode 100644 index c3fc396d7f..0000000000 --- a/script/c5519829.lua +++ /dev/null @@ -1,31 +0,0 @@ ---メンタル・カウンセラー リリー -function c5519829.initial_effect(c) - --atk change - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(5519829,0)) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetProperty(EFFECT_FLAG_DELAY) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_BE_MATERIAL) - e1:SetCondition(c5519829.con) - e1:SetCost(c5519829.cost) - e1:SetOperation(c5519829.op) - c:RegisterEffect(e1) -end -function c5519829.con(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsLocation(LOCATION_GRAVE) and r==REASON_SYNCHRO -end -function c5519829.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,500) end - Duel.PayLPCost(tp,500) -end -function c5519829.op(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local sync=c:GetReasonCard() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(1000) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - sync:RegisterEffect(e1) -end diff --git a/script/c55204071.lua b/script/c55204071.lua deleted file mode 100644 index 9304f7746b..0000000000 --- a/script/c55204071.lua +++ /dev/null @@ -1,76 +0,0 @@ ---ギミック・パペット-ナイトメア -function c55204071.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(1,55204071) - e1:SetCondition(c55204071.spcon) - e1:SetOperation(c55204071.spop) - e1:SetValue(1) - c:RegisterEffect(e1) - -- - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(55204071,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetCondition(c55204071.spcon2) - e2:SetTarget(c55204071.sptg2) - e2:SetOperation(c55204071.spop2) - c:RegisterEffect(e2) - -- - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - e3:SetOperation(c55204071.spop3) - c:RegisterEffect(e3) -end -function c55204071.cfilter(c) - return c:IsFaceup() and c:IsType(TYPE_XYZ) -end -function c55204071.spcon(e,c) - if c==nil then return true end - return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-1 - and Duel.CheckReleaseGroup(c:GetControler(),c55204071.cfilter,1,nil) -end -function c55204071.spop(e,tp,eg,ep,ev,re,r,rp,c) - local g=Duel.SelectReleaseGroup(c:GetControler(),c55204071.cfilter,1,1,nil) - Duel.Release(g,REASON_COST) -end -function c55204071.spcon2(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+1 -end -function c55204071.spfilter(c,e,tp) - return c:IsCode(55204071) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsHasEffect(EFFECT_NECRO_VALLEY) -end -function c55204071.sptg2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c55204071.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE) -end -function c55204071.spop2(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c55204071.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end -function c55204071.spop3(e,tp,eg,ep,ev,re,r,rp,c) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) - e1:SetTargetRange(1,0) - e1:SetTarget(c55204071.splimit) - Duel.RegisterEffect(e1,tp) -end -function c55204071.splimit(e,c) - return not c:IsSetCard(0x83) -end \ No newline at end of file diff --git a/script/c55226821.lua b/script/c55226821.lua deleted file mode 100644 index 728fb7a249..0000000000 --- a/script/c55226821.lua +++ /dev/null @@ -1,56 +0,0 @@ ---稲妻の剣 -function c55226821.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c55226821.target) - e1:SetOperation(c55226821.operation) - c:RegisterEffect(e1) - --atk up - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(800) - c:RegisterEffect(e2) - --equip limit - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_EQUIP_LIMIT) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e3:SetValue(c55226821.eqlimit) - c:RegisterEffect(e3) - --atk down - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_FIELD) - e4:SetRange(LOCATION_SZONE) - e4:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e4:SetCode(EFFECT_UPDATE_ATTACK) - e4:SetTarget(c55226821.adtg) - e4:SetValue(-500) - c:RegisterEffect(e4) -end -function c55226821.adtg(e,c) - return c:IsAttribute(ATTRIBUTE_WATER) -end -function c55226821.eqlimit(e,c) - return c:IsRace(RACE_WARRIOR) -end -function c55226821.filter(c) - return c:IsFaceup() and c:IsRace(RACE_WARRIOR) -end -function c55226821.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c55226821.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c55226821.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c55226821.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c55226821.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,e:GetHandler(),tc) - end -end diff --git a/script/c55256016.lua b/script/c55256016.lua deleted file mode 100644 index f477fee224..0000000000 --- a/script/c55256016.lua +++ /dev/null @@ -1,53 +0,0 @@ ---アヌビスの裁き -function c55256016.initial_effect(c) - --Negate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_CHAINING) - e1:SetCondition(c55256016.condition) - e1:SetCost(c55256016.cost) - e1:SetTarget(c55256016.target) - e1:SetOperation(c55256016.operation) - c:RegisterEffect(e1) -end -function c55256016.cfilter(c) - return c:IsOnField() and c:IsType(TYPE_SPELL+TYPE_TRAP) -end -function c55256016.condition(e,tp,eg,ep,ev,re,r,rp) - if tp==ep or not Duel.IsChainNegatable(ev) then return false end - if not (re:IsActiveType(TYPE_SPELL) and re:IsHasType(EFFECT_TYPE_ACTIVATE)) then return false end - local ex,tg,tc=Duel.GetOperationInfo(ev,CATEGORY_DESTROY) - return ex and tg~=nil and tc+tg:FilterCount(c55256016.cfilter,nil)-tg:GetCount()>0 -end -function c55256016.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) -end -function c55256016.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) - end -end -function c55256016.desfilter(c) - return c:IsFaceup() and c:IsDestructable() -end -function c55256016.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateActivation(ev) - if re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(eg,REASON_EFFECT) - end - local dg=Duel.GetMatchingGroup(c55256016.desfilter,tp,0,LOCATION_MZONE,nil) - if dg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(55256016,0)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local des=dg:Select(tp,1,1,nil) - Duel.HintSelection(des) - local atk=des:GetFirst():GetAttack() - Duel.BreakEffect() - if Duel.Destroy(des,REASON_EFFECT)>0 then - Duel.Damage(1-tp,atk,REASON_EFFECT) - end - end -end diff --git a/script/c55271628.lua b/script/c55271628.lua deleted file mode 100644 index 7fdf39631a..0000000000 --- a/script/c55271628.lua +++ /dev/null @@ -1,32 +0,0 @@ ---暴君の自暴自棄 -function c55271628.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c55271628.cost) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetRange(LOCATION_SZONE) - e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetTargetRange(1,1) - e2:SetTarget(c55271628.sumlimit) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EFFECT_CANNOT_SUMMON) - c:RegisterEffect(e3) -end -function c55271628.cfilter(c) - local tpe=c:GetType() - return bit.band(tpe,TYPE_NORMAL)~=0 and bit.band(tpe,TYPE_TOKEN)==0 -end -function c55271628.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,c55271628.cfilter,2,nil) end - local rg=Duel.SelectReleaseGroup(tp,c55271628.cfilter,2,2,nil) - Duel.Release(rg,REASON_COST) -end -function c55271628.sumlimit(e,c,sump,sumtype,sumpos,targetp) - return c:IsLocation(LOCATION_MZONE) or c:IsType(TYPE_EFFECT) -end diff --git a/script/c55277252.lua b/script/c55277252.lua deleted file mode 100644 index 3fcf883194..0000000000 --- a/script/c55277252.lua +++ /dev/null @@ -1,62 +0,0 @@ ---魔轟神獣ノズチ -function c55277252.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(55277252,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND) - e1:SetTarget(c55277252.tg) - e1:SetOperation(c55277252.op) - c:RegisterEffect(e1) - --spsummon2 - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(55277252,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCondition(c55277252.con2) - e2:SetTarget(c55277252.tg2) - e2:SetOperation(c55277252.op2) - c:RegisterEffect(e2) -end -function c55277252.tg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_HAND,0,1,e:GetHandler(),0x35) - and e:GetHandler():IsCanBeSpecialSummoned(e,1,tp,false,false) - end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c55277252.op(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsSetCard,tp,LOCATION_HAND,0,nil,0x35) - if g:GetCount()==0 then return end - if g:GetCount()==1 then - Duel.SendtoGrave(g,REASON_EFFECT+REASON_DISCARD) - else - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) - local sg=g:Select(tp,1,1,e:GetHandler()) - Duel.SendtoGrave(sg,REASON_EFFECT+REASON_DISCARD) - end - if e:GetHandler():IsRelateToEffect(e) then - Duel.SpecialSummon(e:GetHandler(),1,tp,tp,false,false,POS_FACEUP) - end -end -function c55277252.con2(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+1 -end -function c55277252.filter2(c,e,tp) - return c:IsLevelBelow(2) and c:IsSetCard(0x35) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c55277252.tg2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c55277252.filter2,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c55277252.op2(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c55277252.filter2,tp,LOCATION_HAND,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c55321970.lua b/script/c55321970.lua deleted file mode 100644 index 01234afb41..0000000000 --- a/script/c55321970.lua +++ /dev/null @@ -1,50 +0,0 @@ ---突風の扇 -function c55321970.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c55321970.target) - e1:SetOperation(c55321970.operation) - c:RegisterEffect(e1) - --atk up - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(400) - c:RegisterEffect(e2) - --def down - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_EQUIP) - e3:SetCode(EFFECT_UPDATE_DEFENCE) - e3:SetValue(-200) - c:RegisterEffect(e3) - --equip limit - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetCode(EFFECT_EQUIP_LIMIT) - e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e4:SetValue(c55321970.eqlimit) - c:RegisterEffect(e4) -end -function c55321970.eqlimit(e,c) - return c:IsAttribute(ATTRIBUTE_WIND) -end -function c55321970.filter(c) - return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_WIND) -end -function c55321970.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c55321970.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c55321970.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c55321970.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c55321970.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,e:GetHandler(),tc) - end -end diff --git a/script/c55343236.lua b/script/c55343236.lua deleted file mode 100644 index 0242a45102..0000000000 --- a/script/c55343236.lua +++ /dev/null @@ -1,92 +0,0 @@ ---Sin 真紅眼の黒竜 -function c55343236.initial_effect(c) - c:EnableReviveLimit() - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c55343236.spcon) - e1:SetOperation(c55343236.spop) - c:RegisterEffect(e1) - --only 1 can exists - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_CANNOT_FLIP_SUMMON) - e2:SetCondition(c55343236.excon) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - c:RegisterEffect(e3) - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_FIELD) - e4:SetRange(LOCATION_MZONE) - e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e4:SetTargetRange(1,1) - e4:SetCode(EFFECT_CANNOT_SUMMON) - e4:SetTarget(c55343236.sumlimit) - c:RegisterEffect(e4) - local e5=e4:Clone() - e5:SetCode(EFFECT_CANNOT_FLIP_SUMMON) - c:RegisterEffect(e5) - local e6=e4:Clone() - e6:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - c:RegisterEffect(e6) - --selfdes - local e7=Effect.CreateEffect(c) - e7:SetType(EFFECT_TYPE_SINGLE) - e7:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e7:SetRange(LOCATION_MZONE) - e7:SetCode(EFFECT_SELF_DESTROY) - e7:SetCondition(c55343236.descon) - c:RegisterEffect(e7) - local e8=Effect.CreateEffect(c) - e8:SetType(EFFECT_TYPE_FIELD) - e8:SetCode(EFFECT_SELF_DESTROY) - e8:SetRange(LOCATION_MZONE) - e8:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e8:SetTarget(c55343236.destarget) - c:RegisterEffect(e8) - --cannot announce - local e8=Effect.CreateEffect(c) - e8:SetType(EFFECT_TYPE_FIELD) - e8:SetRange(LOCATION_MZONE) - e8:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE) - e8:SetTargetRange(LOCATION_MZONE,0) - e8:SetTarget(c55343236.antarget) - c:RegisterEffect(e8) -end -function c55343236.sumlimit(e,c) - return c:IsSetCard(0x23) -end -function c55343236.exfilter(c) - return c:IsFaceup() and c:IsSetCard(0x23) -end -function c55343236.excon(e) - return Duel.IsExistingMatchingCard(c55343236.exfilter,0,LOCATION_MZONE,LOCATION_MZONE,1,nil) -end -function c55343236.spfilter(c) - return c:IsCode(74677422) and c:IsAbleToRemoveAsCost() -end -function c55343236.spcon(e,c) - if c==nil then return true end - return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c55343236.spfilter,c:GetControler(),LOCATION_DECK,0,1,nil) - and not Duel.IsExistingMatchingCard(c55343236.exfilter,0,LOCATION_MZONE,LOCATION_MZONE,1,nil) -end -function c55343236.spop(e,tp,eg,ep,ev,re,r,rp,c) - local tc=Duel.GetFirstMatchingCard(c55343236.spfilter,tp,LOCATION_DECK,0,nil) - Duel.Remove(tc,POS_FACEUP,REASON_COST) -end -function c55343236.descon(e) - local f1=Duel.GetFieldCard(0,LOCATION_SZONE,5) - local f2=Duel.GetFieldCard(1,LOCATION_SZONE,5) - return (f1==nil or f1:IsFacedown()) and (f2==nil or f2:IsFacedown()) -end -function c55343236.destarget(e,c) - return c:IsSetCard(0x23) and c:GetFieldID()>e:GetHandler():GetFieldID() -end -function c55343236.antarget(e,c) - return c~=e:GetHandler() -end diff --git a/script/c55348096.lua b/script/c55348096.lua deleted file mode 100644 index 2f5bd7d521..0000000000 --- a/script/c55348096.lua +++ /dev/null @@ -1,29 +0,0 @@ ---武器庫荒らし -function c55348096.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOGRAVE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c55348096.target) - e1:SetOperation(c55348096.activate) - c:RegisterEffect(e1) -end -function c55348096.tgfilter(c) - return c:IsType(TYPE_EQUIP) and c:IsAbleToGrave() -end -function c55348096.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)>0 end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,1-tp,LOCATION_DECK) -end -function c55348096.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(1-tp,c55348096.tgfilter,1-tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoGrave(g,REASON_EFFECT) - else - local cg=Duel.GetFieldGroup(1-tp,LOCATION_DECK,0) - Duel.ConfirmCards(tp,cg) - Duel.ShuffleDeck(1-tp) - end -end diff --git a/script/c55375684.lua b/script/c55375684.lua deleted file mode 100644 index 51976cf4c5..0000000000 --- a/script/c55375684.lua +++ /dev/null @@ -1,43 +0,0 @@ ---召喚雲 -function c55375684.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(55375684,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetCountLimit(1) - e2:SetRange(LOCATION_SZONE) - e2:SetCondition(c55375684.condition) - e2:SetTarget(c55375684.target) - e2:SetOperation(c55375684.operation) - c:RegisterEffect(e2) -end -function c55375684.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 -end -function c55375684.filter(c,e,tp) - return c:IsLevelBelow(4) and c:IsSetCard(0x18) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) - and not c:IsHasEffect(EFFECT_NECRO_VALLEY) -end -function c55375684.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c55375684.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE) -end -function c55375684.operation(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - if Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)>0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c55375684.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp) - if g:GetCount()>0 then - local grav=g:GetFirst():IsLocation(LOCATION_GRAVE) - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - if grav then Duel.Destroy(e:GetHandler(),REASON_EFFECT) end - end -end diff --git a/script/c55401221.lua b/script/c55401221.lua deleted file mode 100644 index c04c2e9bce..0000000000 --- a/script/c55401221.lua +++ /dev/null @@ -1,14 +0,0 @@ ---電池メン-単一型 -function c55401221.initial_effect(c) - --cannot be battle target - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(0,LOCATION_MZONE) - e1:SetValue(c55401221.atlimit) - c:RegisterEffect(e1) -end -function c55401221.atlimit(e,c) - return c:IsFaceup() and c:IsRace(RACE_THUNDER) and c:GetCode()~=55401221 -end diff --git a/script/c55416843.lua b/script/c55416843.lua deleted file mode 100644 index 509694cb27..0000000000 --- a/script/c55416843.lua +++ /dev/null @@ -1,52 +0,0 @@ ---蛮族の狂宴LV5 -function c55416843.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c55416843.target) - e1:SetOperation(c55416843.operation) - c:RegisterEffect(e1) -end -function c55416843.filter(c,e,tp) - return c:GetLevel()==5 and c:IsRace(RACE_WARRIOR) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) - and not c:IsHasEffect(EFFECT_NECRO_VALLEY) -end -function c55416843.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c55416843.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE) -end -function c55416843.operation(e,tp,eg,ep,ev,re,r,rp) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ft<=0 then return end - local c=e:GetHandler() - if ft>2 then ft=2 end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c55416843.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,ft,nil,e,tp) - if g:GetCount()>0 then - local tc=g:GetFirst() - while tc do - Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_CANNOT_ATTACK) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e3:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e3) - tc=g:GetNext() - end - Duel.SpecialSummonComplete() - end -end diff --git a/script/c55424270.lua b/script/c55424270.lua deleted file mode 100644 index 89fc196723..0000000000 --- a/script/c55424270.lua +++ /dev/null @@ -1,49 +0,0 @@ ---魔導獣 ケルベロス -function c55424270.initial_effect(c) - c:EnableCounterPermit(0x3001) - --add counter - local e0=Effect.CreateEffect(c) - e0:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e0:SetCode(EVENT_CHAINING) - e0:SetRange(LOCATION_MZONE) - e0:SetOperation(aux.chainreg) - c:RegisterEffect(e0) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e1:SetCode(EVENT_CHAIN_SOLVED) - e1:SetRange(LOCATION_MZONE) - e1:SetOperation(c55424270.acop) - c:RegisterEffect(e1) - --attackup - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(c55424270.attackup) - c:RegisterEffect(e2) - --remove counter - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e3:SetCode(EVENT_PHASE+PHASE_BATTLE) - e3:SetCountLimit(1) - e3:SetRange(LOCATION_MZONE) - e3:SetCondition(c55424270.condition) - e3:SetOperation(c55424270.operation) - c:RegisterEffect(e3) -end -function c55424270.acop(e,tp,eg,ep,ev,re,r,rp) - if re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL) and e:GetHandler():GetFlagEffect(1)>0 then - e:GetHandler():AddCounter(0x3001,1) - end -end -function c55424270.attackup(e,c) - return c:GetCounter(0x3001)*500 -end -function c55424270.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetBattledGroupCount()>0 -end -function c55424270.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local n=c:GetCounter(0x3001) - if n~=0 then c:RemoveCounter(tp,0x3001,n,REASON_EFFECT) end -end diff --git a/script/c55428242.lua b/script/c55428242.lua deleted file mode 100644 index 8a6a4f30f4..0000000000 --- a/script/c55428242.lua +++ /dev/null @@ -1,45 +0,0 @@ ---アトラの蟲惑魔 -function c55428242.initial_effect(c) - --immune - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_IMMUNE_EFFECT) - e1:SetValue(c55428242.efilter) - c:RegisterEffect(e1) - -- - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_TRAP_ACT_IN_HAND) - e2:SetRange(LOCATION_MZONE) - e2:SetTargetRange(LOCATION_HAND,0) - e2:SetTarget(c55428242.etarget) - c:RegisterEffect(e2) - -- - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetCode(EFFECT_CANNOT_INACTIVATE) - e3:SetRange(LOCATION_MZONE) - e3:SetValue(c55428242.chainfilter) - c:RegisterEffect(e3) - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_FIELD) - e4:SetCode(EFFECT_CANNOT_DISEFFECT) - e4:SetRange(LOCATION_MZONE) - e4:SetValue(c55428242.chainfilter) - c:RegisterEffect(e4) -end -function c55428242.efilter(e,te) - local c=te:GetHandler() - return c:GetType()==TYPE_TRAP and (c:IsSetCard(0x4c) or c:IsSetCard(0x89)) -end -function c55428242.etarget(e,c) - return c:GetType()==TYPE_TRAP and (c:IsSetCard(0x4c) or c:IsSetCard(0x89)) -end -function c55428242.chainfilter(e,ct) - local p=e:GetHandlerPlayer() - local te,tp=Duel.GetChainInfo(ct,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER) - local tc=te:GetHandler() - return p==tp and tc:GetType()==TYPE_TRAP -end diff --git a/script/c55428811.lua b/script/c55428811.lua deleted file mode 100644 index f7f9091154..0000000000 --- a/script/c55428811.lua +++ /dev/null @@ -1,39 +0,0 @@ ---ホープ・オブ・フィフス -function c55428811.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c55428811.target) - e1:SetOperation(c55428811.activate) - c:RegisterEffect(e1) -end -function c55428811.filter(c) - return c:IsSetCard(0x3008) and c:IsAbleToDeck() -end -function c55428811.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c55428811.filter(chkc) end - local dc=2 - if not Duel.IsExistingMatchingCard(nil,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,e:GetHandler()) then dc=3 end - if chk==0 then return Duel.IsPlayerCanDraw(tp,dc) - and Duel.IsExistingTarget(c55428811.filter,tp,LOCATION_GRAVE,0,5,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectTarget(tp,c55428811.filter,tp,LOCATION_GRAVE,0,5,5,nil) - e:SetLabel(dc) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,dc) -end -function c55428811.activate(e,tp,eg,ep,ev,re,r,rp) - local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - if not tg or tg:FilterCount(Card.IsRelateToEffect,nil,e)~=5 then return end - Duel.SendtoDeck(tg,nil,0,REASON_EFFECT) - local g=Duel.GetOperatedGroup() - local ct=g:FilterCount(Card.IsLocation,nil,LOCATION_DECK+LOCATION_EXTRA) - if ct==5 then - Duel.ShuffleDeck(tp) - Duel.BreakEffect() - Duel.Draw(tp,e:GetLabel(),REASON_EFFECT) - end -end diff --git a/script/c55461064.lua b/script/c55461064.lua deleted file mode 100644 index fc610287b8..0000000000 --- a/script/c55461064.lua +++ /dev/null @@ -1,45 +0,0 @@ ---D-HERO ダガーガイ -function c55461064.initial_effect(c) - --atkup - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(55461064,0)) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_DAMAGE_STEP) - e1:SetRange(LOCATION_HAND) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e1:SetCondition(c55461064.atkcon) - e1:SetCost(c55461064.atkcost) - e1:SetTarget(c55461064.atktg) - e1:SetOperation(c55461064.atkop) - c:RegisterEffect(e1) -end -function c55461064.atkcon(e,tp,eg,ep,ev,re,r,rp) - local phase=Duel.GetCurrentPhase() - return Duel.GetTurnPlayer()~=tp and (phase==PHASE_BATTLE or (phase==PHASE_DAMAGE and not Duel.IsDamageCalculated())) -end -function c55461064.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end -function c55461064.filter(c) - return c:IsFaceup() and c:IsSetCard(0xc008) -end -function c55461064.atktg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c55461064.filter,tp,LOCATION_MZONE,0,1,nil) end -end -function c55461064.atkop(e,tp,eg,ep,ev,re,r,rp,chk) - local g=Duel.GetMatchingGroup(c55461064.filter,tp,LOCATION_MZONE,0,nil) - local tc=g:GetFirst() - while tc do - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetOwnerPlayer(tp) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e1:SetValue(800) - tc:RegisterEffect(e1) - tc=g:GetNext() - end -end \ No newline at end of file diff --git a/script/c55465441.lua b/script/c55465441.lua deleted file mode 100644 index 8db60d793f..0000000000 --- a/script/c55465441.lua +++ /dev/null @@ -1,45 +0,0 @@ ---ギブ&テイク -function c55465441.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c55465441.target) - e1:SetOperation(c55465441.activate) - c:RegisterEffect(e1) -end -function c55465441.filter(c,e,tp) - return c:GetLevel()>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENCE,1-tp) -end -function c55465441.filter2(c) - return c:IsFaceup() and not c:IsType(TYPE_XYZ) -end -function c55465441.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - if chk==0 then return Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c55465441.filter2,tp,LOCATION_MZONE,0,1,nil) - and Duel.IsExistingTarget(c55465441.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g1=Duel.SelectTarget(tp,c55465441.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - local g2=Duel.SelectTarget(tp,c55465441.filter2,tp,LOCATION_MZONE,0,1,1,nil) - e:SetLabelObject(g2:GetFirst()) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g1,1,0,0) -end -function c55465441.activate(e,tp,eg,ep,ev,re,r,rp) - local tc1=e:GetLabelObject() - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local tc2=g:GetFirst() - if tc2==tc1 then tc2=g:GetNext() end - if tc2:IsRelateToEffect(e) and Duel.SpecialSummon(tc2,0,tp,1-tp,false,false,POS_FACEUP_DEFENCE)~=0 - and tc1:IsFaceup() and tc1:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_LEVEL) - e1:SetValue(tc2:GetLevel()) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc1:RegisterEffect(e1) - end -end diff --git a/script/c55488859.lua b/script/c55488859.lua deleted file mode 100644 index 0accc152b5..0000000000 --- a/script/c55488859.lua +++ /dev/null @@ -1,34 +0,0 @@ ---エヴォルド・ゲフィロス -function c55488859.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(55488859,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetCondition(c55488859.condition) - e1:SetTarget(c55488859.target) - e1:SetOperation(c55488859.operation) - c:RegisterEffect(e1) -end -function c55488859.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) -end -function c55488859.filter(c,e,tp) - return c:IsSetCard(0x604e) and c:IsCanBeSpecialSummoned(e,150,tp,false,false) -end -function c55488859.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c55488859.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c55488859.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c55488859.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.SpecialSummon(tc,150,tp,tp,false,false,POS_FACEUP)~=0 then - local rf=tc.evolreg - if rf then rf(tc) end - end -end diff --git a/script/c55501446.lua b/script/c55501446.lua deleted file mode 100644 index 38330833bd..0000000000 --- a/script/c55501446.lua +++ /dev/null @@ -1,34 +0,0 @@ ---ライト・サーペント -function c55501446.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(55501446,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCondition(c55501446.spcon) - e1:SetTarget(c55501446.sptg) - e1:SetOperation(c55501446.spop) - c:RegisterEffect(e1) - -- - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e2:SetValue(1) - c:RegisterEffect(e2) -end -function c55501446.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_HAND) -end -function c55501446.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsRelateToEffect(e) - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c55501446.spop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c5554990.lua b/script/c5554990.lua deleted file mode 100644 index d330b4a8be..0000000000 --- a/script/c5554990.lua +++ /dev/null @@ -1,26 +0,0 @@ ---エレキンメダイ -function c5554990.initial_effect(c) - --handes - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(5554990,0)) - e1:SetCategory(CATEGORY_HANDES) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_BATTLE_DAMAGE) - e1:SetCondition(c5554990.condition) - e1:SetTarget(c5554990.target) - e1:SetOperation(c5554990.operation) - c:RegisterEffect(e1) -end -function c5554990.condition(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp and Duel.GetAttackTarget()==nil -end -function c5554990.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_HANDES,0,0,1-tp,1) -end -function c5554990.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetFieldGroup(ep,LOCATION_HAND,0,nil) - if g:GetCount()==0 then return end - local sg=g:RandomSelect(1-tp,1) - Duel.SendtoGrave(sg,REASON_DISCARD+REASON_EFFECT) -end diff --git a/script/c5556499.lua b/script/c5556499.lua deleted file mode 100644 index 10760bb56e..0000000000 --- a/script/c5556499.lua +++ /dev/null @@ -1,82 +0,0 @@ ---マシンナーズ・フォートレス -function c5556499.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND+LOCATION_GRAVE) - e1:SetCondition(c5556499.spcon) - e1:SetOperation(c5556499.spop) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(5556499,0)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_BATTLE_DESTROYED) - e2:SetCondition(c5556499.condition) - e2:SetTarget(c5556499.target) - e2:SetOperation(c5556499.operation) - c:RegisterEffect(e2) - --handes - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e3:SetRange(LOCATION_MZONE) - e3:SetCode(EVENT_CHAIN_SOLVING) - e3:SetOperation(c5556499.hdop) - c:RegisterEffect(e3) -end -function c5556499.spfilter(c) - return c:IsRace(RACE_MACHINE) and c:IsDiscardable() -end -function c5556499.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return false end - local g=Duel.GetMatchingGroup(c5556499.spfilter,tp,LOCATION_HAND,0,nil) - if not c:IsAbleToGraveAsCost() then - g:RemoveCard(c) - end - return g:CheckWithSumGreater(Card.GetLevel,8) -end -function c5556499.spop(e,tp,eg,ep,ev,re,r,rp,c) - local g=Duel.GetMatchingGroup(c5556499.spfilter,c:GetControler(),LOCATION_HAND,0,nil) - if not c:IsAbleToGraveAsCost() then - g:RemoveCard(c) - end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) - local sg=g:SelectWithSumGreater(tp,Card.GetLevel,8) - Duel.SendtoGrave(sg,REASON_COST+REASON_DISCARD) -end -function c5556499.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) -end -function c5556499.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and chkc:IsDestructable() end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,0,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c5556499.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end -function c5556499.hdop(e,tp,eg,ep,ev,re,r,rp) - if ep==tp then return end - if not re:IsActiveType(TYPE_EFFECT) or not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return end - local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) - if g and g:IsContains(e:GetHandler()) then - local hg=Duel.GetFieldGroup(tp,0,LOCATION_HAND) - if hg:GetCount()==0 then return end - Duel.ConfirmCards(tp,hg) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) - local sg=hg:Select(tp,1,1,nil) - Duel.SendtoGrave(sg,REASON_EFFECT+REASON_DISCARD) - Duel.ShuffleHand(1-tp) - end -end diff --git a/script/c5556668.lua b/script/c5556668.lua deleted file mode 100644 index e8df223c13..0000000000 --- a/script/c5556668.lua +++ /dev/null @@ -1,27 +0,0 @@ ---エクスチェンジ -function c5556668.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c5556668.target) - e1:SetOperation(c5556668.activate) - c:RegisterEffect(e1) -end -function c5556668.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0 - and Duel.IsExistingMatchingCard(nil,tp,LOCATION_HAND,0,1,e:GetHandler()) end -end -function c5556668.activate(e,tp,eg,ep,ev,re,r,rp) - local g1=Duel.GetFieldGroup(tp,LOCATION_HAND,0) - local g2=Duel.GetFieldGroup(tp,0,LOCATION_HAND) - if g1:GetCount()==0 or g2:GetCount()==0 then return end - Duel.ConfirmCards(tp,g2) - Duel.ConfirmCards(1-tp,g1) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local ag1=g2:Select(tp,1,1,nil) - Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_ATOHAND) - local ag2=g1:Select(1-tp,1,1,nil) - Duel.SendtoHand(ag1,tp,REASON_EFFECT) - Duel.SendtoHand(ag2,1-tp,REASON_EFFECT) -end diff --git a/script/c55569674.lua b/script/c55569674.lua deleted file mode 100644 index 4fe569ee6e..0000000000 --- a/script/c55569674.lua +++ /dev/null @@ -1,76 +0,0 @@ ---女神の聖剣-エアトス -function c55569674.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c55569674.target) - e1:SetOperation(c55569674.operation) - c:RegisterEffect(e1) - --Atk up - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(500) - c:RegisterEffect(e2) - --Equip limit - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_EQUIP_LIMIT) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e3:SetValue(1) - c:RegisterEffect(e3) - --atk - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(55569674,0)) - e4:SetCategory(CATEGORY_ATKCHANGE) - e4:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e4:SetCode(EVENT_TO_GRAVE) - e4:SetCondition(c55569674.atkcon) - e4:SetTarget(c55569674.atktg) - e4:SetOperation(c55569674.atkop) - c:RegisterEffect(e4) -end -function c55569674.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c55569674.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,e:GetHandler(),tc) - end -end -function c55569674.atkcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) -end -function c55569674.filter(c) - return c:IsFaceup() and c:IsCode(34022290) -end -function c55569674.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c55569674.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c55569674.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c55569674.filter,tp,LOCATION_MZONE,0,1,1,nil) -end -function c55569674.atkfilter(c) - return c:IsFaceup() and c:IsType(TYPE_MONSTER) -end -function c55569674.atkop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - local ct=Duel.GetMatchingGroupCount(c55569674.atkfilter,tp,LOCATION_REMOVED,LOCATION_REMOVED,nil) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(500*ct) - tc:RegisterEffect(e1) - end -end diff --git a/script/c55586621.lua b/script/c55586621.lua deleted file mode 100644 index 66a5f9d1b7..0000000000 --- a/script/c55586621.lua +++ /dev/null @@ -1,75 +0,0 @@ ---フォーチュンレディ・ダルキー -function c55586621.initial_effect(c) - --atk,def - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_SET_ATTACK) - e1:SetValue(c55586621.value) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_SET_DEFENCE) - c:RegisterEffect(e2) - --level up - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(55586621,0)) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1) - e3:SetCode(EVENT_PHASE+PHASE_STANDBY) - e3:SetCondition(c55586621.lvcon) - e3:SetOperation(c55586621.lvop) - c:RegisterEffect(e3) - --special summon - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(55586621,1)) - e4:SetCategory(CATEGORY_SPECIAL_SUMMON) - e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e4:SetRange(LOCATION_MZONE) - e4:SetProperty(EFFECT_FLAG_CARD_TARGET) - e4:SetCode(EVENT_BATTLE_DESTROYED) - e4:SetCondition(c55586621.spcon) - e4:SetTarget(c55586621.sptg) - e4:SetOperation(c55586621.spop) - c:RegisterEffect(e4) -end -function c55586621.value(e,c) - return c:GetLevel()*400 -end -function c55586621.lvcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp and e:GetHandler():IsLevelAbove(1) and e:GetHandler():IsLevelBelow(11) -end -function c55586621.lvop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFacedown() or not c:IsRelateToEffect(e) or c:IsLevelAbove(12) then return end - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_LEVEL) - e1:SetValue(1) - e1:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e1) -end -function c55586621.spcon(e,tp,eg,ep,ev,re,r,rp) - local tc=eg:GetFirst() - local rc=tc:GetReasonCard() - return eg:GetCount()==1 and rc:IsControler(tp) and rc:IsSetCard(0x31) - and tc:IsType(TYPE_MONSTER) and tc:IsReason(REASON_BATTLE) and tc:IsLocation(LOCATION_GRAVE) -end -function c55586621.spfilter(c,e,tp) - return c:IsSetCard(0x31) and c:IsCanBeSpecialSummoned(e,0x8,tp,false,false) -end -function c55586621.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c55586621.spfilter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c55586621.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c55586621.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c55586621.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0x8,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c55589254.lua b/script/c55589254.lua deleted file mode 100644 index 6b9fe0fc7f..0000000000 --- a/script/c55589254.lua +++ /dev/null @@ -1,66 +0,0 @@ ---氷炎の双竜 -function c55589254.initial_effect(c) - c:EnableReviveLimit() - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_SPSUMMON_PROC) - e2:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e2:SetRange(LOCATION_HAND) - e2:SetCondition(c55589254.spcon) - e2:SetOperation(c55589254.spop) - c:RegisterEffect(e2) - --destroy - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(55589254,0)) - e3:SetCategory(CATEGORY_DESTROY) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetCountLimit(1) - e3:SetRange(LOCATION_MZONE) - e3:SetCost(c55589254.descost) - e3:SetTarget(c55589254.destg) - e3:SetOperation(c55589254.desop) - c:RegisterEffect(e3) -end -function c55589254.spfilter(c,att) - return c:IsAttribute(att) and c:IsAbleToRemoveAsCost() -end -function c55589254.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c55589254.spfilter,tp,LOCATION_GRAVE,0,2,nil,ATTRIBUTE_WATER) - and Duel.IsExistingMatchingCard(c55589254.spfilter,tp,LOCATION_GRAVE,0,1,nil,ATTRIBUTE_FIRE) -end -function c55589254.spop(e,tp,eg,ep,ev,re,r,rp,c) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g1=Duel.SelectMatchingCard(tp,c55589254.spfilter,tp,LOCATION_GRAVE,0,2,2,nil,ATTRIBUTE_WATER) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g2=Duel.SelectMatchingCard(tp,c55589254.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,ATTRIBUTE_FIRE) - g1:Merge(g2) - Duel.Remove(g1,POS_FACEUP,REASON_COST) -end -function c55589254.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) -end -function c55589254.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsDestructable() end - if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c55589254.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c55599882.lua b/script/c55599882.lua deleted file mode 100644 index 0e340bab94..0000000000 --- a/script/c55599882.lua +++ /dev/null @@ -1,53 +0,0 @@ ---武神決戦 -function c55599882.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c55599882.target) - e1:SetOperation(c55599882.activate) - c:RegisterEffect(e1) -end -function c55599882.filter(c) - return c:IsFaceup() and c:IsSetCard(0x88) -end -function c55599882.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c55599882.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c55599882.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c55599882.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) -end -function c55599882.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() and not tc:IsImmuneToEffect(e) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetDescription(aux.Stringid(55599882,0)) - e1:SetCategory(CATEGORY_REMOVE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_BATTLE_DESTROYING) - e1:SetTarget(c55599882.rmtg) - e1:SetOperation(c55599882.rmop) - e1:SetReset(RESET_EVENT+0x1620000+RESET_PHASE+RESET_END) - tc:RegisterEffect(e1) - end -end -function c55599882.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - local bc=c:GetBattleTarget() - if chk==0 then return bc and bc:IsLocation(LOCATION_GRAVE) and bc:IsReason(REASON_BATTLE) and bc:IsType(TYPE_MONSTER) - and c:GetBaseAttack()<=bc:GetAttack() and bc:IsAbleToRemove() end - Duel.SetOperationInfo(0,CATEGORY_REMOVE,bc,1,0,0) -end -function c55599882.rmfilter(c,code) - return c:IsCode(code) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemove() -end -function c55599882.rmop(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetHandler():GetBattleTarget() - if Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)==0 then return end - local g=Duel.GetMatchingGroup(c55599882.rmfilter,tp,0,LOCATION_HAND+LOCATION_DECK+LOCATION_EXTRA+LOCATION_GRAVE,nil,tc:GetCode()) - if g:GetCount()>0 then - Duel.BreakEffect() - Duel.Remove(g,POS_FACEUP,REASON_EFFECT) - end -end diff --git a/script/c55608151.lua b/script/c55608151.lua deleted file mode 100644 index 244220fe9f..0000000000 --- a/script/c55608151.lua +++ /dev/null @@ -1,29 +0,0 @@ ---グリフォンの翼 -function c55608151.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DISABLE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_CHAINING) - e1:SetCondition(c55608151.condition) - e1:SetTarget(c55608151.target) - e1:SetOperation(c55608151.activate) - c:RegisterEffect(e1) -end -function c55608151.condition(e,tp,eg,ep,ev,re,r,rp) - return rp~=tp and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:GetHandler():IsCode(18144506) and Duel.IsChainDisablable(ev) -end -function c55608151.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable() -end -function c55608151.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0) - local g=Duel.GetMatchingGroup(c55608151.filter,tp,0,LOCATION_ONFIELD,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c55608151.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateEffect(ev) - local g=Duel.GetMatchingGroup(c55608151.filter,tp,0,LOCATION_ONFIELD,nil) - Duel.Destroy(g,REASON_EFFECT) -end diff --git a/script/c55610595.lua b/script/c55610595.lua deleted file mode 100644 index 2a7bbc5b35..0000000000 --- a/script/c55610595.lua +++ /dev/null @@ -1,50 +0,0 @@ ---BF-上弦のピナーカ -function c55610595.initial_effect(c) - --synchro limit - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetValue(c55610595.synlimit) - c:RegisterEffect(e1) - --to grave - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetOperation(c55610595.regop) - c:RegisterEffect(e2) -end -function c55610595.synlimit(e,c) - if not c then return false end - return not c:IsSetCard(0x33) -end -function c55610595.regop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsPreviousLocation(LOCATION_ONFIELD) then - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetRange(LOCATION_GRAVE) - e1:SetCountLimit(1,55610595) - e1:SetTarget(c55610595.thtg) - e1:SetOperation(c55610595.thop) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - c:RegisterEffect(e1) - end -end -function c55610595.filter(c) - return c:IsSetCard(0x33) and c:IsType(TYPE_MONSTER) and not c:IsCode(55610595) and c:IsAbleToHand() -end -function c55610595.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c55610595.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c55610595.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c55610595.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c55615891.lua b/script/c55615891.lua deleted file mode 100644 index 67c781d504..0000000000 --- a/script/c55615891.lua +++ /dev/null @@ -1,44 +0,0 @@ ---E・HERO ワイルド・ウィングマン -function c55615891.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcCode2(c,86188410,21844576,true,true) - --spsummon condition - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(aux.fuslimit) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(55615891,0)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCost(c55615891.descost) - e2:SetTarget(c55615891.destg) - e2:SetOperation(c55615891.desop) - c:RegisterEffect(e2) -end -function c55615891.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) -end -function c55615891.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable() -end -function c55615891.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and c55615891.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c55615891.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c55615891.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c55615891.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c5562461.lua b/script/c5562461.lua deleted file mode 100644 index 84442861b3..0000000000 --- a/script/c5562461.lua +++ /dev/null @@ -1,34 +0,0 @@ ---闇の幻影 -function c5562461.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_CHAINING) - e1:SetCondition(c5562461.condition) - e1:SetTarget(c5562461.target) - e1:SetOperation(c5562461.activate) - c:RegisterEffect(e1) -end -function c5562461.cfilter(c) - return c:IsLocation(LOCATION_MZONE) and c:IsFaceup() and c:IsAttribute(ATTRIBUTE_DARK) -end -function c5562461.condition(e,tp,eg,ep,ev,re,r,rp) - if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return end - if not re:IsActiveType(TYPE_MONSTER) and not re:IsHasType(EFFECT_TYPE_ACTIVATE) then return false end - local tg=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) - return tg and tg:IsExists(c5562461.cfilter,1,nil) and Duel.IsChainNegatable(ev) -end -function c5562461.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) - end -end -function c5562461.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateActivation(ev) - if re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(eg,REASON_EFFECT) - end -end diff --git a/script/c55624610.lua b/script/c55624610.lua deleted file mode 100644 index 48e8301987..0000000000 --- a/script/c55624610.lua +++ /dev/null @@ -1,37 +0,0 @@ ---スクラップ・ハンター -function c55624610.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(55624610,0)) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_TOGRAVE) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetTarget(c55624610.destg) - e1:SetOperation(c55624610.desop) - c:RegisterEffect(e1) -end -function c55624610.desfilter(c) - return c:IsFaceup() and c:IsSetCard(0x24) and c:IsDestructable() -end -function c55624610.sfilter(c) - return c:IsType(TYPE_TUNER) and c:IsAbleToGrave() -end -function c55624610.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c55624610.desfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c55624610.desfilter,tp,LOCATION_MZONE,0,1,e:GetHandler()) - and Duel.IsExistingMatchingCard(c55624610.sfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c55624610.desfilter,tp,LOCATION_MZONE,0,1,1,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) -end -function c55624610.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)~=0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local sg=Duel.SelectMatchingCard(tp,c55624610.sfilter,tp,LOCATION_DECK,0,1,1,nil) - Duel.SendtoGrave(sg,REASON_EFFECT) - end -end diff --git a/script/c55673611.lua b/script/c55673611.lua deleted file mode 100644 index dcff6baf42..0000000000 --- a/script/c55673611.lua +++ /dev/null @@ -1,34 +0,0 @@ ---サイコ・トリガー -function c55673611.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_REMOVE+CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c55673611.condition) - e1:SetTarget(c55673611.target) - e1:SetOperation(c55673611.activate) - c:RegisterEffect(e1) -end -function c55673611.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetLP(tp)6 and Duel.GetTributeCount(c,mg)>0 -end -function c55690251.otop(e,tp,eg,ep,ev,re,r,rp,c) - local mg=Duel.GetMatchingGroup(c55690251.otfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp) - local sg=Duel.SelectTribute(tp,c,1,1,mg) - c:SetMaterial(sg) - Duel.Release(sg, REASON_SUMMON+REASON_MATERIAL) -end -function c55690251.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local c=e:GetHandler() - if chkc then return chkc:GetControler()~=tp and chkc:IsLocation(LOCATION_MZONE) and chkc:IsAbleToGrave() end - if chk==0 then return c:GetAttack()>=1000 and Duel.IsExistingTarget(Card.IsAbleToGrave,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectTarget(tp,Card.IsAbleToGrave,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,g:GetCount(),0,0) -end -function c55690251.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and c:IsFaceup() and c:GetAttack()>=1000 then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_COPY_INHERIT) - e1:SetReset(RESET_EVENT+0x1ff0000) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(-1000) - c:RegisterEffect(e1) - if tc and tc:IsRelateToEffect(e) and not c:IsHasEffect(EFFECT_REVERSE_UPDATE) then - Duel.SendtoGrave(tc,REASON_EFFECT) - end - end -end diff --git a/script/c55696885.lua b/script/c55696885.lua deleted file mode 100644 index b7cf20cc9a..0000000000 --- a/script/c55696885.lua +++ /dev/null @@ -1,38 +0,0 @@ ---疫病狼 -function c55696885.initial_effect(c) - --atkup - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(55696885,0)) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetOperation(c55696885.atkop) - c:RegisterEffect(e1) -end -function c55696885.atkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetValue(c:GetBaseAttack()*2) - e1:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(55696885,1)) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_PHASE+PHASE_END) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetTarget(c55696885.destg) - e2:SetOperation(c55696885.desop) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - c:RegisterEffect(e2) -end -function c55696885.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0) -end -function c55696885.desop(e,tp,eg,ep,ev,re,r,rp) - Duel.Destroy(e:GetHandler(),REASON_EFFECT) -end diff --git a/script/c55713623.lua b/script/c55713623.lua deleted file mode 100644 index 5908a82a2e..0000000000 --- a/script/c55713623.lua +++ /dev/null @@ -1,34 +0,0 @@ ---収縮 -function c55713623.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c55713623.condition) - e1:SetTarget(c55713623.target) - e1:SetOperation(c55713623.activate) - c:RegisterEffect(e1) -end -function c55713623.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end -function c55713623.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) -end -function c55713623.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_BASE_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e1:SetValue(tc:GetBaseAttack()/2) - tc:RegisterEffect(e1) - end -end diff --git a/script/c55727845.lua b/script/c55727845.lua deleted file mode 100644 index 122060ab1b..0000000000 --- a/script/c55727845.lua +++ /dev/null @@ -1,48 +0,0 @@ ---No.96 ブラック・ミスト -function c55727845.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,2,3) - c:EnableReviveLimit() - --atk u/d - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(55727845,0)) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c55727845.atkcost) - e1:SetTarget(c55727845.atktg) - e1:SetOperation(c55727845.atkop) - c:RegisterEffect(e1) -end -c55727845.xyz_number=96 -function c55727845.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c55727845.atktg(e,tp,eg,ep,ev,re,r,rp,chk) - local at=Duel.GetAttackTarget() - if chk==0 then return ((at and at:IsFaceup() and Duel.GetAttacker()==e:GetHandler()) or at==e:GetHandler()) - and not e:GetHandler():IsStatus(STATUS_CHAINING) end - Duel.SetTargetCard(e:GetHandler():GetBattleTarget()) -end -function c55727845.atkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and c:IsFaceup() and tc:IsRelateToEffect(e) and tc:IsFaceup() and not tc:IsImmuneToEffect(e) then - local atk=tc:GetAttack()/2 - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetValue(atk) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(atk) - e2:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e2) - end -end diff --git a/script/c55735315.lua b/script/c55735315.lua deleted file mode 100644 index c8ff358ee0..0000000000 --- a/script/c55735315.lua +++ /dev/null @@ -1,54 +0,0 @@ ---魂食神龍ドレイン・ドラゴン -function c55735315.initial_effect(c) - c:EnableUnsummonable() - --spsummon condition - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(c55735315.splimit) - c:RegisterEffect(e1) - --atkup - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(55735315,0)) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetCondition(c55735315.atkcon) - e2:SetOperation(c55735315.atkop) - c:RegisterEffect(e2) - -- - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_CANNOT_DIRECT_ATTACK) - c:RegisterEffect(e3) -end -function c55735315.splimit(e,se,sp,st) - local sc=se:GetHandler() - return sc:IsType(TYPE_XYZ) and sc:IsRace(RACE_DRAGON) -end -function c55735315.atkcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetLP(tp)-1 - and Duel.CheckReleaseGroup(c:GetControler(),Card.IsSetCard,1,nil,0x5c) -end -function c55737443.spop(e,tp,eg,ep,ev,re,r,rp,c) - local g=Duel.SelectReleaseGroup(tp,Card.IsSetCard,1,1,nil,0x5c) - Duel.Release(g,REASON_COST) -end -function c55737443.damcon(e,tp,eg,ep,ev,re,r,rp) - local tc=eg:GetFirst() - return tc~=e:GetHandler() and tc:IsAttribute(ATTRIBUTE_EARTH) -end -function c55737443.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsRelateToEffect(e) end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(1000) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,1000) -end -function c55737443.damop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c55742055.lua b/script/c55742055.lua deleted file mode 100644 index 436cf40623..0000000000 --- a/script/c55742055.lua +++ /dev/null @@ -1,137 +0,0 @@ ---円卓の聖騎士 -function c55742055.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - -- - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(55742055,0)) - e2:SetCategory(CATEGORY_TOGRAVE) - e2:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_FIELD) - e2:SetRange(LOCATION_SZONE) - e2:SetCode(EVENT_PHASE+PHASE_END) - e2:SetLabel(3) - e2:SetCountLimit(1) - e2:SetCondition(c55742055.effcon) - e2:SetTarget(c55742055.target1) - e2:SetOperation(c55742055.operation1) - c:RegisterEffect(e2) - --Special Summon - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(55742055,1)) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_FIELD) - e3:SetRange(LOCATION_SZONE) - e3:SetCode(EVENT_PHASE+PHASE_END) - e3:SetLabel(6) - e3:SetCountLimit(1) - e3:SetCondition(c55742055.effcon) - e3:SetTarget(c55742055.target2) - e3:SetOperation(c55742055.operation2) - c:RegisterEffect(e3) - --tohand - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(55742055,2)) - e4:SetCategory(CATEGORY_TOHAND) - e4:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_FIELD) - e4:SetRange(LOCATION_SZONE) - e4:SetCode(EVENT_PHASE+PHASE_END) - e4:SetProperty(EFFECT_FLAG_CARD_TARGET) - e4:SetLabel(9) - e4:SetCountLimit(1) - e4:SetCondition(c55742055.effcon) - e4:SetTarget(c55742055.target3) - e4:SetOperation(c55742055.operation3) - c:RegisterEffect(e4) - -- draw - local e5=Effect.CreateEffect(c) - e5:SetDescription(aux.Stringid(55742055,3)) - e5:SetCategory(CATEGORY_DRAW) - e5:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_FIELD) - e5:SetRange(LOCATION_SZONE) - e5:SetCode(EVENT_PHASE+PHASE_END) - e5:SetCountLimit(1) - e5:SetCondition(c55742055.condition4) - e5:SetTarget(c55742055.target4) - e5:SetOperation(c55742055.operation4) - c:RegisterEffect(e5) -end -function c55742055.confilter(c) - return c:IsFaceup() and c:IsSetCard(0x107a) -end -function c55742055.effcon(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetTurnPlayer()~=tp then return false end - local g=Duel.GetMatchingGroup(c55742055.confilter,tp,LOCATION_GRAVE+LOCATION_ONFIELD,0,nil) - return g:GetClassCount(Card.GetCode)>=e:GetLabel() -end -function c55742055.filter1(c) - return c:IsSetCard(0x107a) and c:IsAbleToGrave() -end -function c55742055.target1(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c55742055.filter1,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,0,1,tp,LOCATION_DECK) -end -function c55742055.operation1(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c55742055.filter1,tp,LOCATION_DECK,0,1,1,nil) - Duel.SendtoGrave(g,REASON_EFFECT) -end -function c55742055.filter2(c,e,tp) - return c:IsSetCard(0x107a) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c55742055.target2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c55742055.filter2,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c55742055.eqfilter(c,tc,tp) - return c:IsType(TYPE_EQUIP) and c:IsSetCard(0x207a) and c:CheckEquipTarget(tc) and c:CheckUniqueOnField(tp) -end -function c55742055.operation2(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c55742055.filter2,tp,LOCATION_HAND,0,1,1,nil,e,tp) - local tc=g:GetFirst() - if Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)==0 then return end - local tg=Duel.GetMatchingGroup(c55742055.eqfilter,tp,LOCATION_HAND,0,nil,tc,tp) - if tg:GetCount()>0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.SelectYesNo(tp,aux.Stringid(55742055,4)) then - Duel.BreakEffect() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local sg=tg:Select(tp,1,1,nil) - Duel.Equip(tp,sg:GetFirst(),tc,true) - end -end -function c55742055.thfilter(c) - return c:IsSetCard(0x107a) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() -end -function c55742055.target3(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c55742055.thfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c55742055.thfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c55742055.thfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c55742055.operation3(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - end -end -function c55742055.condition4(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetTurnPlayer()~=tp then return false end - local g=Duel.GetMatchingGroup(c55742055.confilter,tp,LOCATION_GRAVE+LOCATION_ONFIELD,0,nil) - return g:GetClassCount(Card.GetCode)==12 -end -function c55742055.target4(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c55742055.operation4(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - Duel.Draw(tp,1,REASON_EFFECT) -end diff --git a/script/c55758589.lua b/script/c55758589.lua deleted file mode 100644 index 679c3ebaf2..0000000000 --- a/script/c55758589.lua +++ /dev/null @@ -1,27 +0,0 @@ ---フォトン・ワイバーン -function c55758589.initial_effect(c) - --Destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(55758589,0)) - e1:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_SINGLE) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c55758589.destg) - e1:SetOperation(c55758589.desop) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - c:RegisterEffect(e2) -end -function c55758589.filter(c) - return c:IsFacedown() and c:IsDestructable() -end -function c55758589.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local g=Duel.GetMatchingGroup(c55758589.filter,tp,0,LOCATION_ONFIELD,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c55758589.desop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c55758589.filter,tp,0,LOCATION_ONFIELD,nil) - Duel.Destroy(g,REASON_EFFECT) -end diff --git a/script/c55761792.lua b/script/c55761792.lua deleted file mode 100644 index 9c157e8a7a..0000000000 --- a/script/c55761792.lua +++ /dev/null @@ -1,4 +0,0 @@ ---カオスの儀式 -function c55761792.initial_effect(c) - aux.AddRitualProcGreater(c,aux.FilterBoolFunction(Card.IsCode,5405694)) -end diff --git a/script/c55763552.lua b/script/c55763552.lua deleted file mode 100644 index 912a9bcfe4..0000000000 --- a/script/c55763552.lua +++ /dev/null @@ -1,29 +0,0 @@ ---壺魔人 -function c55763552.initial_effect(c) - --flip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(55763552,0)) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_POSITION) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP) - e1:SetTarget(c55763552.target) - e1:SetOperation(c55763552.operation) - c:RegisterEffect(e1) -end -function c55763552.filter(c) - return c:IsFaceup() and c:IsCode(50045299) and c:IsDestructable() -end -function c55763552.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local g=Duel.GetMatchingGroup(c55763552.filter,tp,LOCATION_SZONE,LOCATION_SZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c55763552.pfilter(c) - return c:IsPosition(POS_FACEUP_DEFENCE) and c:IsRace(RACE_DRAGON) -end -function c55763552.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c55763552.filter,tp,LOCATION_SZONE,LOCATION_SZONE,nil) - if Duel.Destroy(g,REASON_EFFECT)>0 then - local pg=Duel.GetMatchingGroup(c55763552.pfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - Duel.ChangePosition(pg,POS_FACEUP_ATTACK) - end -end diff --git a/script/c55773067.lua b/script/c55773067.lua deleted file mode 100644 index d5db9ce1ad..0000000000 --- a/script/c55773067.lua +++ /dev/null @@ -1,31 +0,0 @@ ---はたき落とし -function c55773067.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_HANDES) - e1:SetCode(EVENT_DRAW) - e1:SetCondition(c55773067.condition) - e1:SetTarget(c55773067.target) - e1:SetOperation(c55773067.activate) - c:RegisterEffect(e1) -end -function c55773067.condition(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp and bit.band(r,REASON_RULE)~=0 -end -function c55773067.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetCard(eg) - Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,1-tp,1) -end -function c55773067.activate(e,tp,eg,ep,ev,re,r,rp) - local sg=eg:Filter(Card.IsRelateToEffect,nil,e) - if sg:GetCount()==0 then - elseif sg:GetCount()==1 then - Duel.SendtoGrave(sg,REASON_EFFECT+REASON_DISCARD) - else - Duel.Hint(HINT_SELECTMSG,ep,HINTMSG_TOGRAVE) - local dg=sg:Select(ep,1,1,nil) - Duel.SendtoGrave(dg,REASON_EFFECT+REASON_DISCARD) - end -end diff --git a/script/c5577649.lua b/script/c5577649.lua deleted file mode 100644 index f7809107f3..0000000000 --- a/script/c5577649.lua +++ /dev/null @@ -1,31 +0,0 @@ ---スクラップ・クラッシュ -function c5577649.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCondition(c5577649.condition) - e1:SetTarget(c5577649.target) - e1:SetOperation(c5577649.operation) - c:RegisterEffect(e1) -end -function c5577649.cfilter(c,tp) - return c:IsSetCard(0x24) and c:IsReason(REASON_DESTROY) and c:GetPreviousControler()==tp - and c:GetPreviousLocation()==LOCATION_MZONE and bit.band(c:GetPreviousPosition(),POS_FACEUP)~=0 -end -function c5577649.condition(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c5577649.cfilter,1,nil,tp) -end -function c5577649.filter(c) - return c:IsFaceup() and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable() -end -function c5577649.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c5577649.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end - local g=Duel.GetMatchingGroup(c5577649.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c5577649.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c5577649.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler()) - Duel.Destroy(g,REASON_EFFECT) -end diff --git a/script/c55794644.lua b/script/c55794644.lua deleted file mode 100644 index 69a4d24da6..0000000000 --- a/script/c55794644.lua +++ /dev/null @@ -1,73 +0,0 @@ ---マスター・ヒュペリオン -function c55794644.initial_effect(c) - --spsummon proc - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c55794644.hspcon) - e1:SetOperation(c55794644.hspop) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(55794644,0)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetRange(LOCATION_MZONE) - e2:SetCondition(c55794644.condition) - e2:SetCost(c55794644.cost) - e2:SetTarget(c55794644.target) - e2:SetOperation(c55794644.operation) - c:RegisterEffect(e2) -end -function c55794644.spfilter(c) - return c:IsSetCard(0x44) and c:IsAbleToRemoveAsCost() and (not c:IsLocation(LOCATION_MZONE) or c:IsFaceup()) -end -function c55794644.hspcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ft<=-1 then return false end - if ft<=0 then - return Duel.IsExistingMatchingCard(c55794644.spfilter,tp,LOCATION_MZONE,0,1,nil) - else return Duel.IsExistingMatchingCard(c55794644.spfilter,tp,0x16,0,1,nil) end -end -function c55794644.hspop(e,tp,eg,ep,ev,re,r,rp,c) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then - local g=Duel.SelectMatchingCard(tp,c55794644.spfilter,tp,LOCATION_MZONE,0,1,1,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) - else - local g=Duel.SelectMatchingCard(tp,c55794644.spfilter,tp,0x16,0,1,1,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) - end -end -function c55794644.condition(e,tp,eg,ep,ev,re,r,rp) - if Duel.IsEnvironment(56433456) then return e:GetHandler():GetFlagEffect(55794644)<2 - else return e:GetHandler():GetFlagEffect(55794644)<1 end -end -function c55794644.costfilter(c) - return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_FAIRY) and c:IsAbleToRemoveAsCost() -end -function c55794644.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c55794644.costfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c55794644.costfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c55794644.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsDestructable() end - if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) - e:GetHandler():RegisterFlagEffect(55794644,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) -end -function c55794644.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c55818463.lua b/script/c55818463.lua deleted file mode 100644 index a8584054ba..0000000000 --- a/script/c55818463.lua +++ /dev/null @@ -1,35 +0,0 @@ ---死王リッチーロード -function c55818463.initial_effect(c) - --tribute limit - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_TRIBUTE_LIMIT) - e1:SetValue(c55818463.tlimit) - c:RegisterEffect(e1) - --to hand - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(55818463,0)) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_RELEASE) - e2:SetCondition(c55818463.retcon) - e2:SetTarget(c55818463.rettg) - e2:SetOperation(c55818463.retop) - c:RegisterEffect(e2) -end -function c55818463.tlimit(e,c) - return not c:IsAttribute(ATTRIBUTE_DARK) -end -function c55818463.retcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_EFFECT) -end -function c55818463.rettg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0) -end -function c55818463.retop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SendtoHand(c,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,c) - end -end diff --git a/script/c55821894.lua b/script/c55821894.lua deleted file mode 100644 index d3852b074a..0000000000 --- a/script/c55821894.lua +++ /dev/null @@ -1,9 +0,0 @@ ---アマゾネスの格闘戦士 -function c55821894.initial_effect(c) - --battle dam 0 - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_AVOID_BATTLE_DAMAGE) - e1:SetValue(1) - c:RegisterEffect(e1) -end diff --git a/script/c55824220.lua b/script/c55824220.lua deleted file mode 100644 index 914d667112..0000000000 --- a/script/c55824220.lua +++ /dev/null @@ -1,78 +0,0 @@ ---輝石融合 -function c55824220.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c55824220.target) - e1:SetOperation(c55824220.activate) - c:RegisterEffect(e1) -end -function c55824220.filter1(c,e) - return c:IsCanBeFusionMaterial() and not c:IsImmuneToEffect(e) -end -function c55824220.filter2(c,e,tp,m,f,chkf) - return c:IsType(TYPE_FUSION) and c:IsSetCard(0x1047) and (not f or f(c)) - and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf) -end -function c55824220.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp - local mg1=Duel.GetMatchingGroup(Card.IsCanBeFusionMaterial,tp,LOCATION_HAND+LOCATION_MZONE,0,nil) - local res=Duel.IsExistingMatchingCard(c55824220.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf) - if not res then - local ce=Duel.GetChainMaterial(tp) - if ce~=nil then - local fgroup=ce:GetTarget() - local mg2=fgroup(ce,e,tp) - local mf=ce:GetValue() - res=Duel.IsExistingMatchingCard(c55824220.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,chkf) - end - end - return res - end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function c55824220.activate(e,tp,eg,ep,ev,re,r,rp) - local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp - local mg1=Duel.GetMatchingGroup(c55824220.filter1,tp,LOCATION_HAND+LOCATION_MZONE,0,nil,e) - local sg1=Duel.GetMatchingGroup(c55824220.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf) - local mg2=nil - local sg2=nil - local ce=Duel.GetChainMaterial(tp) - if ce~=nil then - local fgroup=ce:GetTarget() - mg2=fgroup(ce,e,tp) - local mf=ce:GetValue() - sg2=Duel.GetMatchingGroup(c55824220.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,mf,chkf) - end - if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then - local sg=sg1:Clone() - if sg2 then sg:Merge(sg2) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local tg=sg:Select(tp,1,1,nil) - local tc=tg:GetFirst() - if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then - local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf) - tc:SetMaterial(mat1) - Duel.SendtoGrave(mat1,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION) - Duel.BreakEffect() - Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP) - else - local mat2=Duel.SelectFusionMaterial(tp,tc,mg2,nil,chkf) - local fop=ce:GetOperation() - fop(ce,e,tp,tc,mat2) - end - tc:CompleteProcedure() - else - local cg1=Duel.GetFieldGroup(tp,LOCATION_HAND+LOCATION_MZONE,0) - local cg2=Duel.GetFieldGroup(tp,LOCATION_EXTRA,0) - if cg1:GetCount()>1 and cg2:IsExists(Card.IsFacedown,1,nil) - and Duel.IsPlayerCanSpecialSummon(tp) and not Duel.IsPlayerAffectedByEffect(tp,27581098) then - Duel.ConfirmCards(1-tp,cg1) - Duel.ConfirmCards(1-tp,cg2) - Duel.ShuffleHand(tp) - end - end -end diff --git a/script/c55863245.lua b/script/c55863245.lua deleted file mode 100644 index db36b1ce0a..0000000000 --- a/script/c55863245.lua +++ /dev/null @@ -1,79 +0,0 @@ ---たつのこ -function c55863245.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1) - c:EnableReviveLimit() - --synchro custom - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SYNCHRO_MATERIAL_CUSTOM) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCondition(c55863245.syncon) - e1:SetTarget(c55863245.syntg) - e1:SetValue(1) - e1:SetOperation(c55863245.synop) - c:RegisterEffect(e1) - --immune - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EFFECT_IMMUNE_EFFECT) - e2:SetValue(c55863245.efilter) - c:RegisterEffect(e2) - --hand synchro for double tuner - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e3:SetCondition(c55863245.syncon) - e3:SetCode(55863245) - c:RegisterEffect(e3) -end -function c55863245.synfilter1(c,syncard,tuner,f) - return c:IsFaceup() and c:IsCanBeSynchroMaterial(syncard,tuner) and (f==nil or f(c)) -end -function c55863245.synfilter2(c,syncard,tuner,f,g,lv,minc,maxc) - if c:IsCanBeSynchroMaterial(syncard,tuner) and (f==nil or f(c)) then - lv=lv-c:GetLevel() - if lv<0 then return false end - if lv==0 then return minc==1 end - return g:CheckWithSumEqual(Card.GetSynchroLevel,lv,minc-1,maxc-1,syncard) - else return false end -end -function c55863245.syncon(e) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_SYNCHRO -end -function c55863245.syntg(e,syncard,f,minc,maxc) - local c=e:GetHandler() - local tp=syncard:GetControler() - local lv=syncard:GetLevel()-c:GetLevel() - if lv<=0 then return false end - local g1=Duel.GetMatchingGroup(c55863245.synfilter1,tp,LOCATION_MZONE,LOCATION_MZONE,c,syncard,c,f) - return g1:CheckWithSumEqual(Card.GetSynchroLevel,lv,minc,maxc,syncard) - or Duel.IsExistingMatchingCard(c55863245.synfilter2,tp,LOCATION_HAND,0,1,nil,syncard,c,f,g1,lv,minc,maxc) -end -function c55863245.synop(e,tp,eg,ep,ev,re,r,rp,syncard,f,minc,maxc) - local c=e:GetHandler() - local lv=syncard:GetLevel()-c:GetLevel() - local g1=Duel.GetMatchingGroup(c55863245.synfilter1,tp,LOCATION_MZONE,LOCATION_MZONE,c,syncard,c,f) - local g2=Duel.GetMatchingGroup(c55863245.synfilter2,tp,LOCATION_HAND,0,nil,syncard,c,f,g1,lv,minc,maxc) - if not g1:CheckWithSumEqual(Card.GetSynchroLevel,lv,minc,maxc,syncard) - or (g2:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(55863245,0))) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SMATERIAL) - local sg=g2:Select(tp,1,1,nil) - local tc=sg:GetFirst() - if lv>tc:GetLevel() then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SMATERIAL) - local tg=g1:SelectWithSumEqual(tp,Card.GetSynchroLevel,lv-tc:GetLevel(),minc-1,maxc-1,syncard) - sg:Merge(tg) - end - Duel.SetSynchroMaterial(sg) - else - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SMATERIAL) - local sg=g1:SelectWithSumEqual(tp,Card.GetSynchroLevel,lv,minc,maxc,syncard) - Duel.SetSynchroMaterial(sg) - end -end -function c55863245.efilter(e,te) - return te:IsActiveType(TYPE_MONSTER) and te:GetOwner()~=e:GetOwner() -end diff --git a/script/c55875323.lua b/script/c55875323.lua deleted file mode 100644 index cc07f28241..0000000000 --- a/script/c55875323.lua +++ /dev/null @@ -1,30 +0,0 @@ ---でんきトカゲ -function c55875323.initial_effect(c) - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(55875323,0)) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_DAMAGE_STEP_END) - e1:SetCondition(c55875323.condition) - e1:SetOperation(c55875323.operation) - c:RegisterEffect(e1) -end -function c55875323.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler()==Duel.GetAttackTarget() and not Duel.GetAttacker():IsRace(RACE_ZOMBIE) -end -function c55875323.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetAttacker() - if tc:IsRelateToBattle() then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetLabel(Duel.GetTurnCount()) - e1:SetCondition(c55875323.atkcon) - e1:SetOwnerPlayer(tp) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END+RESET_OPPO_TURN,2) - tc:RegisterEffect(e1) - end -end -function c55875323.atkcon(e) - return Duel.GetTurnCount()~=e:GetLabel() and Duel.GetTurnPlayer()~=e:GetOwnerPlayer() -end diff --git a/script/c55888045.lua b/script/c55888045.lua deleted file mode 100644 index b6708d409f..0000000000 --- a/script/c55888045.lua +++ /dev/null @@ -1,46 +0,0 @@ ---CNo.106 溶岩掌ジャイアント・ハンド・レッド -function c55888045.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,5,3) - c:EnableReviveLimit() - --Negate - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(55888045,0)) - e1:SetCategory(CATEGORY_NEGATE) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_QUICK_F) - e1:SetCode(EVENT_CHAINING) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCondition(c55888045.negcon) - e1:SetOperation(c55888045.negop) - c:RegisterEffect(e1) -end -c55888045.xyz_number=106 -function c55888045.negcon(e,tp,eg,ep,ev,re,r,rp) - local loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION) - return (loc==LOCATION_SZONE or loc==LOCATION_MZONE) and not e:GetHandler():IsStatus(STATUS_CHAINING) - and e:GetHandler():GetOverlayGroup():IsExists(Card.IsSetCard,1,nil,0x48) -end -function c55888045.filter(c) - return c:IsFaceup() and (c:IsLocation(LOCATION_SZONE) or c:IsType(TYPE_EFFECT)) -end -function c55888045.negop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) or Duel.GetCurrentChain()~=ev+1 or not c:RemoveOverlayCard(tp,1,1,REASON_EFFECT) then return end - local g=Duel.GetMatchingGroup(c55888045.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,c) - local tc=g:GetFirst() - while tc do - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e2) - tc=g:GetNext() - end -end diff --git a/script/c5592689.lua b/script/c5592689.lua deleted file mode 100644 index 21992ab308..0000000000 --- a/script/c5592689.lua +++ /dev/null @@ -1,58 +0,0 @@ ---サクリファイス・ロータス -function c5592689.initial_effect(c) - --Special Summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(5592689,0)) - e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_FIELD) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetRange(LOCATION_GRAVE) - e1:SetCountLimit(1) - e1:SetCondition(c5592689.sscon) - e1:SetTarget(c5592689.sstg) - e1:SetOperation(c5592689.ssop) - c:RegisterEffect(e1) - --damage - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(5592689,1)) - e2:SetCategory(CATEGORY_DAMAGE) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetCondition(c5592689.dmcon) - e2:SetTarget(c5592689.dmtg) - e2:SetOperation(c5592689.dmop) - c:RegisterEffect(e2) -end -function c5592689.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) -end -function c5592689.sscon(e,tp,eg,ep,ev,re,r,rp) - return tp==Duel.GetTurnPlayer() and not Duel.IsExistingMatchingCard(c5592689.filter,tp,LOCATION_ONFIELD,0,1,nil) -end -function c5592689.sstg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c5592689.ssop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) and not Duel.IsExistingMatchingCard(c5592689.filter,tp,LOCATION_ONFIELD,0,1,nil) then - Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP_ATTACK) - end -end -function c5592689.dmcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c5592689.dmtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(1000) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,0,0,tp,1000) -end -function c5592689.dmop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) or e:GetHandler():IsFacedown() then return end - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c55935416.lua b/script/c55935416.lua deleted file mode 100644 index e49a3414e2..0000000000 --- a/script/c55935416.lua +++ /dev/null @@ -1,37 +0,0 @@ ---No.56 ゴールドラット -function c55935416.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,1,3) - c:EnableReviveLimit() - --damage - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(55935416,0)) - e1:SetCategory(CATEGORY_DRAW+CATEGORY_TODECK) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCost(c55935416.drcost) - e1:SetTarget(c55935416.drtg) - e1:SetOperation(c55935416.drop) - c:RegisterEffect(e1) -end -c55935416.xyz_number=56 -function c55935416.drcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c55935416.drtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(1) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c55935416.drop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - local ct=Duel.Draw(p,d,REASON_EFFECT) - if ct~=0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_HAND,0,1,1,nil) - Duel.SendtoDeck(g,nil,2,REASON_EFFECT) - end -end diff --git a/script/c55948544.lua b/script/c55948544.lua deleted file mode 100644 index a8d2d76e06..0000000000 --- a/script/c55948544.lua +++ /dev/null @@ -1,104 +0,0 @@ ---ファラオの審判 -function c55948544.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(55948544,0)) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_DRAW_PHASE) - e1:SetCondition(c55948544.condition1) - e1:SetCost(c55948544.cost) - e1:SetOperation(c55948544.operation1) - c:RegisterEffect(e1) - -- - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(55948544,1)) - e2:SetType(EFFECT_TYPE_ACTIVATE) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetHintTiming(0,TIMING_DRAW_PHASE) - e2:SetCondition(c55948544.condition2) - e2:SetCost(c55948544.cost) - e2:SetOperation(c55948544.operation2) - c:RegisterEffect(e2) -end -function c55948544.condition1(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_GRAVE,0,1,nil,81332143) -end -function c55948544.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) - Duel.PayLPCost(tp,math.floor(Duel.GetLP(tp)/2)) -end -function c55948544.operation1(e,tp,eg,ep,ev,re,r,rp) - if not Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_GRAVE,0,1,nil,81332143) then return end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) - e1:SetTargetRange(0,1) - Duel.RegisterEffect(e1,tp) - local e2=e1:Clone() - e2:SetCode(EFFECT_CANNOT_SUMMON) - Duel.RegisterEffect(e2,tp) - local e3=e1:Clone() - e3:SetCode(EFFECT_CANNOT_FLIP_SUMMON) - Duel.RegisterEffect(e3,tp) - local e4=e1:Clone() - e4:SetCode(EFFECT_CANNOT_MSET) - Duel.RegisterEffect(e4,tp) - local e5=e1:Clone() - e5:SetCode(EFFECT_CANNOT_TURN_SET) - Duel.RegisterEffect(e5,tp) - local e6=Effect.CreateEffect(e:GetHandler()) - e6:SetType(EFFECT_TYPE_FIELD) - e6:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e6:SetCode(EFFECT_CANNOT_ACTIVATE) - e6:SetTargetRange(0,1) - e6:SetValue(c55948544.aclimit1) - e6:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e6,tp) -end -function c55948544.aclimit1(e,re,tp) - return re:IsActiveType(TYPE_MONSTER) -end -function c55948544.condition2(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_GRAVE,0,1,nil,14731897) -end -function c55948544.operation2(e,tp,eg,ep,ev,re,r,rp) - if not Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_GRAVE,0,1,nil,14731897) then return end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_SSET) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetTargetRange(0,1) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetCode(EFFECT_CANNOT_ACTIVATE) - e2:SetTargetRange(0,1) - e2:SetValue(c55948544.aclimit2) - e2:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e2,tp) - local e3=Effect.CreateEffect(e:GetHandler()) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetCode(EFFECT_DISABLE) - e3:SetTargetRange(0,LOCATION_SZONE) - e3:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e3,tp) - local e4=Effect.CreateEffect(e:GetHandler()) - e4:SetType(EFFECT_TYPE_FIELD) - e4:SetCode(EFFECT_DISABLE_TRAPMONSTER) - e4:SetTargetRange(0,LOCATION_MZONE) - e4:SetTarget(c55948544.distg) - e4:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e4,tp) -end -function c55948544.aclimit2(e,re,tp) - return re:IsHasType(EFFECT_TYPE_ACTIVATE) -end -function c55948544.distg(e,c) - return c:IsType(TYPE_TRAP) -end diff --git a/script/c55969226.lua b/script/c55969226.lua deleted file mode 100644 index 0fb1fdff86..0000000000 --- a/script/c55969226.lua +++ /dev/null @@ -1,32 +0,0 @@ ---青竜の召喚士 -function c55969226.initial_effect(c) - --tohand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(55969226,0)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCondition(c55969226.condition) - e1:SetTarget(c55969226.target) - e1:SetOperation(c55969226.operation) - c:RegisterEffect(e1) -end -function c55969226.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) -end -function c55969226.filter(c) - return c:IsType(TYPE_NORMAL) and c:IsRace(RACE_DRAGON+RACE_WARRIOR+RACE_SPELLCASTER) and c:IsAbleToHand() -end -function c55969226.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c55969226.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c55969226.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c55969226.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c55982698.lua b/script/c55982698.lua deleted file mode 100644 index a192ec83fc..0000000000 --- a/script/c55982698.lua +++ /dev/null @@ -1,41 +0,0 @@ ---A・O・J リバース・ブレイク -function c55982698.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(55982698,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_BATTLE_START) - e1:SetCondition(c55982698.descon) - e1:SetTarget(c55982698.destg) - e1:SetOperation(c55982698.desop) - c:RegisterEffect(e1) - --self destroy - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EFFECT_SELF_DESTROY) - e2:SetCondition(c55982698.sdcon) - c:RegisterEffect(e2) -end -function c55982698.descon(e,tp,eg,ep,ev,re,r,rp) - local d=Duel.GetAttackTarget() - return e:GetHandler()==Duel.GetAttacker() and d and d:IsFacedown() and d:IsDefencePos() -end -function c55982698.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,Duel.GetAttackTarget(),1,0,0) -end -function c55982698.desop(e,tp,eg,ep,ev,re,r,rp) - local d=Duel.GetAttackTarget() - if d:IsRelateToBattle() then - Duel.Destroy(d,REASON_EFFECT) - end -end -function c55982698.sdfilter(c) - return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_LIGHT) -end -function c55982698.sdcon(e) - return Duel.IsExistingMatchingCard(c55982698.sdfilter,0,LOCATION_MZONE,LOCATION_MZONE,1,nil) -end diff --git a/script/c55985014.lua b/script/c55985014.lua deleted file mode 100644 index 1367788149..0000000000 --- a/script/c55985014.lua +++ /dev/null @@ -1,36 +0,0 @@ ---ミラクル・キッズ -function c55985014.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetCondition(c55985014.condition) - e1:SetTarget(c55985014.target) - e1:SetOperation(c55985014.activate) - c:RegisterEffect(e1) -end -function c55985014.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end -function c55985014.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_GRAVE,0,1,nil,32679370) - and Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil) -end -function c55985014.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - local val=Duel.GetMatchingGroupCount(Card.IsCode,tp,LOCATION_GRAVE,0,nil,32679370)*400 - if val>0 and tc:IsRelateToEffect(e) and tc:IsFaceup() then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - e1:SetValue(-val) - tc:RegisterEffect(e1) - end -end diff --git a/script/c55991637.lua b/script/c55991637.lua deleted file mode 100644 index be7fdf651a..0000000000 --- a/script/c55991637.lua +++ /dev/null @@ -1,59 +0,0 @@ ---火竜の火炎弾 -function c55991637.initial_effect(c) - --damage - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(55991637,0)) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c55991637.condition) - e1:SetTarget(c55991637.damtg) - e1:SetOperation(c55991637.damop) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(55991637,1)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_ACTIVATE) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetCondition(c55991637.condition) - e2:SetTarget(c55991637.destg) - e2:SetOperation(c55991637.desop) - c:RegisterEffect(e2) -end -function c55991637.cfilter(c) - return c:IsFaceup() and c:IsRace(RACE_DRAGON) -end -function c55991637.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c55991637.cfilter,tp,LOCATION_MZONE,0,1,nil) -end -function c55991637.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(800) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,800) -end -function c55991637.damop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end -function c55991637.dfilter(c) - return c:IsFaceup() and c:IsDefenceBelow(800) and c:IsDestructable() -end -function c55991637.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c55991637.dfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c55991637.dfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c55991637.dfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c55991637.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and c55991637.dfilter(tc) and tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c5600127.lua b/script/c5600127.lua deleted file mode 100644 index 131eba770d..0000000000 --- a/script/c5600127.lua +++ /dev/null @@ -1,6 +0,0 @@ ---ヒューマノイド・ドレイク -function c5600127.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcCode2(c,73216412,46821314,true,true) -end diff --git a/script/c56043446.lua b/script/c56043446.lua deleted file mode 100644 index 37f360b19d..0000000000 --- a/script/c56043446.lua +++ /dev/null @@ -1,58 +0,0 @@ ---万力魔神バイサー・デス -function c56043446.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(56043446,0)) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c56043446.target) - e1:SetOperation(c56043446.operation) - c:RegisterEffect(e1) -end -function c56043446.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - Duel.SelectTarget(tp,nil,tp,0,LOCATION_MZONE,1,1,nil) -end -function c56043446.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc and tc:IsRelateToEffect(e) then - c:SetCardTarget(tc) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) - e1:SetCondition(c56043446.descon) - e1:SetOperation(c56043446.desop) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,3) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e2:SetValue(1) - e2:SetCondition(c56043446.rcon) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,3) - c:RegisterEffect(e2) - end -end -function c56043446.rcon(e) - return e:GetHandler():GetFirstCardTarget()~=nil -end -function c56043446.descon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c56043446.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetHandler():GetFirstCardTarget() - if not tc then return end - local ct=e:GetLabel() - ct=ct+1 - e:SetLabel(ct) - e:GetHandler():SetTurnCounter(ct) - if ct==3 then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c56051086.lua b/script/c56051086.lua deleted file mode 100644 index cf7a8dd86f..0000000000 --- a/script/c56051086.lua +++ /dev/null @@ -1,97 +0,0 @@ ---No.43 魂魄傀儡鬼ソウル・マリオネッター -function c56051086.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_DARK),2,3) - c:EnableReviveLimit() - --equip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(56051086,0)) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCost(c56051086.eqcost) - e1:SetTarget(c56051086.eqtg) - e1:SetOperation(c56051086.eqop) - c:RegisterEffect(e1) - -- - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e2:SetCondition(c56051086.indcon) - e2:SetValue(1) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - c:RegisterEffect(e3) - --damage - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(56051086,1)) - e4:SetCategory(CATEGORY_DAMAGE) - e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e4:SetCode(EVENT_RECOVER) - e4:SetRange(LOCATION_MZONE) - e4:SetCountLimit(1) - e4:SetCondition(c56051086.damcon) - e4:SetTarget(c56051086.damtg) - e4:SetOperation(c56051086.damop) - c:RegisterEffect(e4) -end -c56051086.xyz_number=43 -function c56051086.eqcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c56051086.filter(c) - return c:IsSetCard(0x48) and c:IsType(TYPE_MONSTER) -end -function c56051086.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c56051086.filter(chkc) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingTarget(c56051086.filter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local g=Duel.SelectTarget(tp,c56051086.filter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0) -end -function c56051086.eqop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsFaceup() and c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then - if not Duel.Equip(tp,tc,c,false) then return end - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_OWNER_RELATE) - e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(c56051086.eqlimit) - tc:RegisterEffect(e1) - end -end -function c56051086.eqlimit(e,c) - return c==e:GetOwner() -end -function c56051086.indcon(e) - return e:GetHandler():GetEquipGroup():IsExists(Card.IsSetCard,1,nil,0x48) -end -function c56051086.damcon(e,tp,eg,ep,ev,re,r,rp) - return ep==tp -end -function c56051086.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,ev) -end -function c56051086.damop(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_COPY_INHERIT) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(ev) - e1:SetReset(RESET_EVENT+0x1ff0000) - e:GetHandler():RegisterEffect(e1) - Duel.Damage(1-tp,ev,REASON_EFFECT) -end diff --git a/script/c56051648.lua b/script/c56051648.lua deleted file mode 100644 index 16d3c7f502..0000000000 --- a/script/c56051648.lua +++ /dev/null @@ -1,33 +0,0 @@ ---スパイダー・エッグ -function c56051648.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetCondition(c56051648.condition) - e1:SetTarget(c56051648.target) - e1:SetOperation(c56051648.activate) - c:RegisterEffect(e1) -end -function c56051648.condition(e,tp,eg,ep,ev,re,r,rp) - return tp~=Duel.GetTurnPlayer() and Duel.GetAttackTarget()==nil - and Duel.IsExistingMatchingCard(Card.IsRace,tp,LOCATION_GRAVE,0,3,nil,RACE_INSECT) -end -function c56051648.target(e,tp,eg,ep,ev,re,r,rp,chk) - local tg=Duel.GetAttacker() - if chk==0 then return tg:IsOnField() and Duel.GetLocationCount(tp,LOCATION_MZONE)>=3 - and Duel.IsPlayerCanSpecialSummonMonster(tp,56051649,0,0x4011,100,100,1,RACE_INSECT,ATTRIBUTE_EARTH) end - Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,3,0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,3,0,0) -end -function c56051648.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.NegateAttack() and Duel.GetLocationCount(tp,LOCATION_MZONE)>2 - and Duel.IsPlayerCanSpecialSummonMonster(tp,56051649,0,0x4011,100,100,1,RACE_INSECT,ATTRIBUTE_EARTH) then - for i=1,3 do - local token=Duel.CreateToken(tp,56051649) - Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP_ATTACK) - end - Duel.SpecialSummonComplete() - end -end diff --git a/script/c56052205.lua b/script/c56052205.lua deleted file mode 100644 index 31f22bc2b3..0000000000 --- a/script/c56052205.lua +++ /dev/null @@ -1,43 +0,0 @@ ---貫ガエル -function c56052205.initial_effect(c) - --direct - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DIRECT_ATTACK) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(56052205,0)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_BATTLE_DAMAGE) - e2:SetCondition(c56052205.condition) - e2:SetTarget(c56052205.target) - e2:SetOperation(c56052205.operation) - c:RegisterEffect(e2) -end -function c56052205.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x12) and c:GetCode()~=56052205 -end -function c56052205.condition(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp and Duel.GetAttackTarget()==nil - and Duel.IsExistingMatchingCard(c56052205.cfilter,tp,LOCATION_MZONE,0,1,nil) -end -function c56052205.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable() -end -function c56052205.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() and c56052205.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c56052205.filter,tp,0,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c56052205.filter,tp,0,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c56052205.operation(e,tp,eg,ep,ev,re,r,rp) - if not Duel.IsExistingMatchingCard(c56052205.cfilter,tp,LOCATION_MZONE,0,1,nil) then return end - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c56058888.lua b/script/c56058888.lua deleted file mode 100644 index 3f48d9461c..0000000000 --- a/script/c56058888.lua +++ /dev/null @@ -1,28 +0,0 @@ ---王宮の陥落 -function c56058888.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_CHAINING) - e1:SetCondition(c56058888.condition) - e1:SetTarget(c56058888.target) - e1:SetOperation(c56058888.activate) - c:RegisterEffect(e1) -end -function c56058888.condition(e,tp,eg,ep,ev,re,r,rp) - return rp~=tp and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:GetActiveType()==TYPE_TRAP+TYPE_CONTINUOUS and Duel.IsChainNegatable(ev) -end -function c56058888.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) - end -end -function c56058888.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateActivation(ev) - if re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(eg,REASON_EFFECT) - end -end diff --git a/script/c5606466.lua b/script/c5606466.lua deleted file mode 100644 index d1a0190e78..0000000000 --- a/script/c5606466.lua +++ /dev/null @@ -1,67 +0,0 @@ ---異次元の落とし穴 -function c5606466.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_REMOVE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_MSET) - e1:SetTarget(c5606466.target) - e1:SetOperation(c5606466.activate) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_CHANGE_POS) - c:RegisterEffect(e2) - local e3=e1:Clone() - e3:SetTarget(c5606466.target2) - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e3) -end -function c5606466.filter(c,e,tp) - return c:IsFacedown() and c:GetReasonPlayer()==tp and c:IsCanBeEffectTarget(e) and c:IsDestructable() and c:IsAbleToRemove() -end -function c5606466.filter2(c,e) - return c:IsDestructable() and c:IsAbleToRemove() and c:IsCanBeEffectTarget(e) -end -function c5606466.filter3(c,e,tp) - return c:IsFacedown() and c:GetSummonPlayer()==tp and c:IsCanBeEffectTarget(e) and c:IsDestructable() and c:IsAbleToRemove() -end -function c5606466.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - if chk==0 then - local sg=eg:Filter(c5606466.filter,nil,e,1-tp) - return sg:GetCount()==1 and Duel.IsExistingMatchingCard(c5606466.filter2,tp,LOCATION_MZONE,0,1,sg:GetFirst(),e) - end - local sg1=eg:Filter(c5606466.filter,nil,e,1-tp) - e:SetLabelObject(sg1:GetFirst()) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local sg2=Duel.SelectMatchingCard(tp,c5606466.filter2,tp,LOCATION_MZONE,0,1,1,sg1:GetFirst(),e) - sg1:Merge(sg2) - Duel.SetTargetCard(sg1) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg1,sg1:GetCount(),0,0) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,sg1,sg1:GetCount(),0,0) -end -function c5606466.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - if chk==0 then - local sg=eg:Filter(c5606466.filter3,nil,e,1-tp) - return sg:GetCount()==1 and Duel.IsExistingMatchingCard(c5606466.filter2,tp,LOCATION_MZONE,0,1,sg:GetFirst(),e) - end - local sg1=eg:Filter(c5606466.filter3,nil,e,1-tp) - e:SetLabelObject(sg1:GetFirst()) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local sg2=Duel.SelectMatchingCard(tp,c5606466.filter2,tp,LOCATION_MZONE,0,1,1,sg1:GetFirst(),e) - sg1:Merge(sg2) - Duel.SetTargetCard(sg1) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg1,sg1:GetCount(),0,0) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,sg1,sg1:GetCount(),0,0) -end -function c5606466.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local tc1=g:GetFirst() - local tc2=g:GetNext() - local sc=e:GetLabelObject() - if tc1 and tc1:IsRelateToEffect(e) and tc2 and tc2:IsRelateToEffect(e) and sc:IsFacedown() then - Duel.Destroy(g,REASON_EFFECT,LOCATION_REMOVED) - end -end diff --git a/script/c56074358.lua b/script/c56074358.lua deleted file mode 100644 index 5a0b580f93..0000000000 --- a/script/c56074358.lua +++ /dev/null @@ -1,71 +0,0 @@ ---D・フィールド -function c56074358.initial_effect(c) - --activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --add counter - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_CHANGE_POS) - e2:SetRange(LOCATION_SZONE) - e2:SetCondition(c56074358.accon) - e2:SetOperation(c56074358.acop) - c:RegisterEffect(e2) - --atkup - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetCode(EFFECT_UPDATE_ATTACK) - e3:SetRange(LOCATION_SZONE) - e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e3:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x26)) - e3:SetValue(c56074358.atkval) - c:RegisterEffect(e3) - --special summon - local e4=Effect.CreateEffect(c) - e4:SetCategory(CATEGORY_SPECIAL_SUMMON) - e4:SetDescription(aux.Stringid(56074358,0)) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e4:SetProperty(EFFECT_FLAG_CARD_TARGET) - e4:SetCode(EVENT_TO_GRAVE) - e4:SetCondition(c56074358.spcon) - e4:SetTarget(c56074358.sptg) - e4:SetOperation(c56074358.spop) - c:RegisterEffect(e4) -end -function c56074358.atkval(e,c) - return e:GetHandler():GetCounter(0x8)*300 -end -function c56074358.cfilter(c) - local np=c:GetPosition() - local pp=c:GetPreviousPosition() - return not c:IsStatus(STATUS_CONTINUOUS_POS) and ((np<3 and pp>3) or (pp<3 and np>3)) -end -function c56074358.accon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c56074358.cfilter,1,nil) -end -function c56074358.acop(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():AddCounter(0x8,1) -end -function c56074358.spcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsReason(REASON_DESTROY) and bit.band(c:GetPreviousLocation(),LOCATION_ONFIELD)~=0 -end -function c56074358.filter(c,e,tp) - return c:IsSetCard(0x26) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c56074358.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c56074358.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c56074358.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c56074358.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c56074358.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c5609226.lua b/script/c5609226.lua deleted file mode 100644 index db0c5e636a..0000000000 --- a/script/c5609226.lua +++ /dev/null @@ -1,37 +0,0 @@ ---チューナーズ・バリア -function c5609226.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c5609226.target) - e1:SetOperation(c5609226.activate) - c:RegisterEffect(e1) -end -function c5609226.filter(c) - return c:IsFaceup() and c:IsType(TYPE_TUNER) -end -function c5609226.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c5609226.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c5609226.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c5609226.filter,tp,LOCATION_MZONE,0,1,1,nil) -end -function c5609226.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e1:SetValue(1) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,2) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - e2:SetValue(1) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,2) - tc:RegisterEffect(e2) - end -end diff --git a/script/c56094445.lua b/script/c56094445.lua deleted file mode 100644 index 400e30d0a1..0000000000 --- a/script/c56094445.lua +++ /dev/null @@ -1,22 +0,0 @@ ---古代の機械兵士 -function c56094445.initial_effect(c) - --actlimit - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetOperation(c56094445.atkop) - c:RegisterEffect(e1) -end -function c56094445.atkop(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EFFECT_CANNOT_ACTIVATE) - e1:SetTargetRange(0,1) - e1:SetValue(c56094445.aclimit) - e1:SetReset(RESET_PHASE+PHASE_DAMAGE) - Duel.RegisterEffect(e1,tp) -end -function c56094445.aclimit(e,re,tp) - return re:IsHasType(EFFECT_TYPE_ACTIVATE) -end diff --git a/script/c56105047.lua b/script/c56105047.lua deleted file mode 100644 index 404f6d4854..0000000000 --- a/script/c56105047.lua +++ /dev/null @@ -1,35 +0,0 @@ ---ゴゴゴゴースト -function c56105047.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(56105047,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCountLimit(1,56105047) - e1:SetTarget(c56105047.sptg) - e1:SetOperation(c56105047.spop) - c:RegisterEffect(e1) -end -function c56105047.filter(c,e,tp) - return c:GetCode()==62476815 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c56105047.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c56105047.filter(chkc,e,tp) end - if chk==0 then return Duel.IsExistingTarget(c56105047.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) - and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c56105047.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c56105047.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENCE)==1 then - if c:IsPosition(POS_FACEUP_ATTACK) and c:IsRelateToEffect(e) then - Duel.BreakEffect() - Duel.ChangePosition(c,POS_FACEUP_DEFENCE) - end - end -end diff --git a/script/c56111151.lua b/script/c56111151.lua deleted file mode 100644 index d4a2c38734..0000000000 --- a/script/c56111151.lua +++ /dev/null @@ -1,71 +0,0 @@ ---Kyoutou Waterfront -function c56111151.initial_effect(c) - c:SetCounterLimit(0x37,5) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --counter - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetRange(LOCATION_FZONE) - e2:SetOperation(c56111151.counter) - c:RegisterEffect(e2) - --to hand - local e3=Effect.CreateEffect(c) - e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_FZONE) - e3:SetCountLimit(1) - e3:SetCondition(c56111151.thcon) - e3:SetTarget(c56111151.thtg) - e3:SetOperation(c56111151.thop) - c:RegisterEffect(e3) - --Destroy replace - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE) - e4:SetCode(EFFECT_DESTROY_REPLACE) - e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e4:SetRange(LOCATION_FZONE) - e4:SetTarget(c56111151.desreptg) - e4:SetOperation(c56111151.desrepop) - c:RegisterEffect(e4) -end -function c56111151.cfilter(c) - return c:IsPreviousLocation(LOCATION_ONFIELD) -end -function c56111151.counter(e,tp,eg,ep,ev,re,r,rp) - local ct=eg:FilterCount(c56111151.cfilter,nil) - if ct>0 then - e:GetHandler():AddCounter(0x37,ct) - end -end -function c56111151.thfilter(c) - return c:IsSetCard(0xd3) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() -end -function c56111151.thcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetCounter(0x37)>=3 -end -function c56111151.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c56111151.thfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c56111151.thop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c56111151.thfilter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end -function c56111151.desreptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return not e:GetHandler():IsReason(REASON_RULE) - and e:GetHandler():IsCanRemoveCounter(tp,0x37,1,REASON_EFFECT) end - return Duel.SelectYesNo(tp,aux.Stringid(56111151,0)) -end -function c56111151.desrepop(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():RemoveCounter(tp,0x37,1,REASON_EFFECT) -end diff --git a/script/c56120475.lua b/script/c56120475.lua deleted file mode 100644 index aa70a6dcd7..0000000000 --- a/script/c56120475.lua +++ /dev/null @@ -1,29 +0,0 @@ ---炸裂装甲 -function c56120475.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetCondition(c56120475.condition) - e1:SetTarget(c56120475.target) - e1:SetOperation(c56120475.activate) - c:RegisterEffect(e1) -end -function c56120475.condition(e,tp,eg,ep,ev,re,r,rp) - return tp~=Duel.GetTurnPlayer() -end -function c56120475.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local tg=Duel.GetAttacker() - if chkc then return chkc==tg end - if chk==0 then return tg:IsOnField() and tg:IsDestructable() and tg:IsCanBeEffectTarget(e) end - Duel.SetTargetCard(tg) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,tg,1,0,0) -end -function c56120475.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsAttackable() and not tc:IsStatus(STATUS_ATTACK_CANCELED) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c5616412.lua b/script/c5616412.lua deleted file mode 100644 index c41111c47b..0000000000 --- a/script/c5616412.lua +++ /dev/null @@ -1,29 +0,0 @@ ---カウンターパンチ -function c5616412.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_DAMAGE_STEP_END) - e1:SetCondition(c5616412.condition) - e1:SetTarget(c5616412.target) - e1:SetOperation(c5616412.activate) - c:RegisterEffect(e1) -end -function c5616412.condition(e,tp,eg,ep,ev,re,r,rp) - local a=Duel.GetAttacker() - local d=Duel.GetAttackTarget() - return d and a:IsControler(1-tp) and a:IsRelateToBattle() - and d:IsDefencePos() and d:IsRelateToBattle() and d:GetDefence()>a:GetAttack() -end -function c5616412.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetAttacker():IsDestructable() end - Duel.SetTargetCard(Duel.GetAttacker()) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,Duel.GetAttacker(),1,0,0) -end -function c5616412.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c56174248.lua b/script/c56174248.lua deleted file mode 100644 index 677ee37dfd..0000000000 --- a/script/c56174248.lua +++ /dev/null @@ -1,34 +0,0 @@ ---魔導鬼士 ディアール -function c56174248.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(56174248,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_GRAVE) - e1:SetCost(c56174248.spcost) - e1:SetTarget(c56174248.sptg) - e1:SetOperation(c56174248.spop) - c:RegisterEffect(e1) -end -function c56174248.rfilter(c) - return c:IsSetCard(0x106e) and c:IsType(TYPE_SPELL) and c:IsAbleToRemoveAsCost() -end -function c56174248.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c56174248.rfilter,tp,LOCATION_GRAVE,0,3,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c56174248.rfilter,tp,LOCATION_GRAVE,0,3,3,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c56174248.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c56174248.spop(e,tp,eg,ep,ev,re,r,rp,c) - local c=e:GetHandler() - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c56209279.lua b/script/c56209279.lua deleted file mode 100644 index de65b37657..0000000000 --- a/script/c56209279.lua +++ /dev/null @@ -1,54 +0,0 @@ ---インフェルニティ・ネクロマンサー -function c56209279.initial_effect(c) - --to defence - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(56209279,0)) - e1:SetCategory(CATEGORY_POSITION) - e1:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_SINGLE) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c56209279.potg) - e1:SetOperation(c56209279.poop) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(56209279,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetCountLimit(1) - e2:SetRange(LOCATION_MZONE) - e2:SetCondition(c56209279.spcon) - e2:SetTarget(c56209279.sptg) - e2:SetOperation(c56209279.spop) - c:RegisterEffect(e2) -end -function c56209279.potg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chk==0 then return e:GetHandler():IsAttackPos() end - Duel.SetOperationInfo(0,CATEGORY_POSITION,e:GetHandler(),1,0,0) -end -function c56209279.poop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFaceup() and c:IsAttackPos() and c:IsRelateToEffect(e) then - Duel.ChangePosition(c,POS_FACEUP_DEFENCE) - end -end -function c56209279.spcon(e,tp,eg,ep,ev,re,r,rp) - return not e:GetHandler():IsDisabled() and Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)==0 -end -function c56209279.filter(c,e,tp) - return c:IsSetCard(0xb) and c:GetCode()~=56209279 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c56209279.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c56209279.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c56209279.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c56209279.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,g:GetCount(),0,0) -end -function c56209279.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c56223084.lua b/script/c56223084.lua deleted file mode 100644 index dd6892724d..0000000000 --- a/script/c56223084.lua +++ /dev/null @@ -1,30 +0,0 @@ ---ハリマンボウ -function c56223084.initial_effect(c) - --atkdown - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(56223084,0)) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetTarget(c56223084.target) - e1:SetOperation(c56223084.operation) - c:RegisterEffect(e1) -end -function c56223084.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil) -end -function c56223084.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(-500) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - end -end diff --git a/script/c56240989.lua b/script/c56240989.lua deleted file mode 100644 index cf6fa3f4f8..0000000000 --- a/script/c56240989.lua +++ /dev/null @@ -1,104 +0,0 @@ ---エヴォルド・カシネリア -function c56240989.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_BATTLE_DESTROYING) - e1:SetOperation(c56240989.regop) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(56240989,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_PHASE+PHASE_BATTLE) - e2:SetRange(LOCATION_MZONE) - e2:SetCondition(c56240989.spcon) - e2:SetCost(c56240989.spcost) - e2:SetTarget(c56240989.sptg) - e2:SetOperation(c56240989.spop) - c:RegisterEffect(e2) -end -function c56240989.regop(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():RegisterFlagEffect(56240989,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) -end -function c56240989.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetFlagEffect(56240989)~=0 -end -function c56240989.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end -function c56240989.filter(c,e,tp) - return c:IsLevelBelow(6) and c:IsRace(RACE_DINOSAUR) and c:IsAttribute(ATTRIBUTE_FIRE) - and c:IsCanBeSpecialSummoned(e,154,tp,false,false) -end -function c56240989.filter2(c,g) - return g:IsExists(Card.IsCode,1,c,c:GetCode()) -end -function c56240989.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local g=Duel.GetMatchingGroup(c56240989.filter,tp,LOCATION_DECK,0,nil,e,tp) - return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and g:IsExists(c56240989.filter2,1,nil,g) - end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_DECK) -end -function c56240989.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 then return end - local c=e:GetHandler() - local g=Duel.GetMatchingGroup(c56240989.filter,tp,LOCATION_DECK,0,nil,e,tp) - local dg=g:Filter(c56240989.filter2,nil,g) - if dg:GetCount()>=1 then - local fid=c:GetFieldID() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=dg:Select(tp,1,1,nil) - local tc1=sg:GetFirst() - local tc2=dg:Filter(Card.IsCode,tc1,tc1:GetCode()):GetFirst() - Duel.SpecialSummonStep(tc1,154,tp,tp,false,false,POS_FACEUP) - Duel.SpecialSummonStep(tc2,154,tp,tp,false,false,POS_FACEUP) - tc1:RegisterFlagEffect(56240989,RESET_EVENT+0x1fe0000,0,1,fid) - tc2:RegisterFlagEffect(56240989,RESET_EVENT+0x1fe0000,0,1,fid) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc1:RegisterEffect(e1,true) - local e2=e1:Clone() - tc2:RegisterEffect(e2,true) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_DISABLE_EFFECT) - e3:SetReset(RESET_EVENT+0x1fe0000) - tc1:RegisterEffect(e3,true) - local e4=e3:Clone() - tc2:RegisterEffect(e4,true) - Duel.SpecialSummonComplete() - sg:AddCard(tc2) - sg:KeepAlive() - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e5:SetCode(EVENT_PHASE+PHASE_END) - e5:SetCountLimit(1) - e5:SetLabel(fid) - e5:SetLabelObject(sg) - e5:SetCondition(c56240989.rmcon) - e5:SetOperation(c56240989.rmop) - Duel.RegisterEffect(e5,tp) - end -end -function c56240989.rmfilter(c,fid) - return c:GetFlagEffectLabel(56240989)==fid -end -function c56240989.rmcon(e,tp,eg,ep,ev,re,r,rp) - local g=e:GetLabelObject() - if not g:IsExists(c56240989.rmfilter,1,nil,e:GetLabel()) then - g:DeleteGroup() - e:Reset() - return false - else return true end -end -function c56240989.rmop(e,tp,eg,ep,ev,re,r,rp) - local g=e:GetLabelObject() - local tg=g:Filter(c56240989.rmfilter,nil,e:GetLabel()) - Duel.Remove(tg,POS_FACEUP,REASON_EFFECT) -end diff --git a/script/c56246017.lua b/script/c56246017.lua deleted file mode 100644 index 5d404c9ef1..0000000000 --- a/script/c56246017.lua +++ /dev/null @@ -1,55 +0,0 @@ ---デーモンの雄叫び -function c56246017.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c56246017.cost) - e1:SetTarget(c56246017.target) - e1:SetOperation(c56246017.activate) - c:RegisterEffect(e1) -end -function c56246017.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,500) end - Duel.PayLPCost(tp,500) -end -function c56246017.filter(c,e,tp) - return c:IsSetCard(0x45) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c56246017.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c56246017.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c56246017.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c56246017.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c56246017.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)~=0 then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UNRELEASABLE_SUM) - e1:SetValue(1) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1,true) - local e2=e1:Clone() - e2:SetCode(EFFECT_UNRELEASABLE_NONSUM) - tc:RegisterEffect(e2,true) - local e3=Effect.CreateEffect(e:GetHandler()) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e3:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e3:SetRange(LOCATION_MZONE) - e3:SetCode(EVENT_PHASE+PHASE_END) - e3:SetOperation(c56246017.desop) - e3:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e3:SetCountLimit(1) - tc:RegisterEffect(e3,true) - end -end -function c56246017.desop(e,tp,eg,ep,ev,re,r,rp) - Duel.Destroy(e:GetHandler(),REASON_EFFECT) -end diff --git a/script/c56252810.lua b/script/c56252810.lua deleted file mode 100644 index a836e5a2fe..0000000000 --- a/script/c56252810.lua +++ /dev/null @@ -1,75 +0,0 @@ ---Re-BUSTER -function c56252810.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c56252810.cost) - e1:SetTarget(c56252810.target) - e1:SetOperation(c56252810.activate) - c:RegisterEffect(e1) -end -function c56252810.cfilter(c) - return c:IsCode(80280737) and c:IsAbleToRemoveAsCost() -end -function c56252810.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c56252810.cfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c56252810.cfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c56252810.filter(c,e,tp) - return c:IsSetCard(0x104f) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) -end -function c56252810.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c56252810.filter(chkc,e,tp) end - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDestructable,tp,LOCATION_MZONE,0,1,nil) - and Duel.IsExistingTarget(c56252810.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - local dg=Duel.GetMatchingGroup(Card.IsDestructable,tp,LOCATION_MZONE,0,nil) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c56252810.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,dg,dg:GetCount(),0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c56252810.activate(e,tp,eg,ep,ev,re,r,rp) - local dg=Duel.GetMatchingGroup(Card.IsDestructable,tp,LOCATION_MZONE,0,nil) - Duel.Destroy(dg,REASON_EFFECT) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local tc=Duel.GetFirstTarget() - local c=e:GetHandler() - if tc:IsRelateToEffect(e) then - Duel.BreakEffect() - if Duel.SpecialSummon(tc,0,tp,tp,true,false,POS_FACEUP)==0 then return end - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1,true) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e2,true) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_UNRELEASABLE_SUM) - e3:SetReset(RESET_EVENT+0x1fe0000) - e3:SetValue(1) - tc:RegisterEffect(e3,true) - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetCode(EFFECT_UNRELEASABLE_NONSUM) - e4:SetReset(RESET_EVENT+0x1fe0000) - e4:SetValue(1) - tc:RegisterEffect(e4,true) - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_SINGLE) - e5:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) - e5:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e5:SetReset(RESET_EVENT+0x47e0000) - e5:SetValue(LOCATION_REMOVED) - tc:RegisterEffect(e5,true) - end -end diff --git a/script/c56260110.lua b/script/c56260110.lua deleted file mode 100644 index 12465937a1..0000000000 --- a/script/c56260110.lua +++ /dev/null @@ -1,22 +0,0 @@ ---雷鳴 -function c56260110.initial_effect(c) - --damage - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c56260110.damtg) - e1:SetOperation(c56260110.damop) - c:RegisterEffect(e1) -end -function c56260110.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(300) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,300) -end -function c56260110.damop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c56286179.lua b/script/c56286179.lua deleted file mode 100644 index 2d55d1be02..0000000000 --- a/script/c56286179.lua +++ /dev/null @@ -1,43 +0,0 @@ ---ドリル・シンクロン -function c56286179.initial_effect(c) - --pierce - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_PIERCE) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetTarget(c56286179.ptg) - c:RegisterEffect(e1) - --draw - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(56286179,0)) - e2:SetCategory(CATEGORY_DRAW) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetCode(EVENT_BATTLE_DAMAGE) - e2:SetCountLimit(1) - e2:SetRange(LOCATION_MZONE) - e2:SetCondition(c56286179.drcon) - e2:SetTarget(c56286179.drtg) - e2:SetOperation(c56286179.drop) - c:RegisterEffect(e2) -end -function c56286179.ptg(e,c) - return c:IsRace(RACE_WARRIOR) -end -function c56286179.drcon(e,tp,eg,ep,ev,re,r,rp) - if ep==tp then return false end - local a=Duel.GetAttacker() - local d=Duel.GetAttackTarget() - return d and d:IsDefencePos() and a:IsControler(tp) and a:IsRace(RACE_WARRIOR) -end -function c56286179.drtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(1) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c56286179.drop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end diff --git a/script/c56321639.lua b/script/c56321639.lua deleted file mode 100644 index 8927b40859..0000000000 --- a/script/c56321639.lua +++ /dev/null @@ -1,76 +0,0 @@ ---魔導書廊エトワール -function c56321639.initial_effect(c) - c:EnableCounterPermit(0x3001) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --Add counter - local e0=Effect.CreateEffect(c) - e0:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e0:SetCode(EVENT_CHAINING) - e0:SetRange(LOCATION_SZONE) - e0:SetOperation(aux.chainreg) - c:RegisterEffect(e0) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e2:SetCode(EVENT_CHAIN_SOLVED) - e2:SetRange(LOCATION_SZONE) - e2:SetCondition(c56321639.ctcon) - e2:SetOperation(c56321639.ctop) - c:RegisterEffect(e2) - --atkup - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetCode(EFFECT_UPDATE_ATTACK) - e3:SetRange(LOCATION_SZONE) - e3:SetTargetRange(LOCATION_MZONE,0) - e3:SetTarget(aux.TargetBoolFunction(Card.IsRace,RACE_SPELLCASTER)) - e3:SetValue(c56321639.atkval) - c:RegisterEffect(e3) - --search - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(56321639,0)) - e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e4:SetCode(EVENT_LEAVE_FIELD) - e4:SetCondition(c56321639.thcon) - e4:SetTarget(c56321639.thtg) - e4:SetOperation(c56321639.thop) - c:RegisterEffect(e4) -end -function c56321639.ctcon(e,tp,eg,ep,ev,re,r,rp) - if not re then return false end - local c=re:GetHandler() - return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL) and c:IsSetCard(0x106e) and e:GetHandler():GetFlagEffect(1)>0 -end -function c56321639.ctop(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():AddCounter(0x3001,1) -end -function c56321639.atkval(e,c) - return e:GetHandler():GetCounter(0x3001)*100 -end -function c56321639.thcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local ct=c:GetCounter(0x3001) - e:SetLabel(ct) - return ct>0 and c:IsLocation(LOCATION_GRAVE) and c:IsReason(REASON_DESTROY) -end -function c56321639.filter(c,lv) - return c:IsLevelBelow(lv) and c:IsRace(RACE_SPELLCASTER) and c:IsAbleToHand() -end -function c56321639.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c56321639.filter,tp,LOCATION_DECK,0,1,nil,e:GetLabel()) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c56321639.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c56321639.filter,tp,LOCATION_DECK,0,1,1,nil,e:GetLabel()) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c56339050.lua b/script/c56339050.lua deleted file mode 100644 index ca2065a65c..0000000000 --- a/script/c56339050.lua +++ /dev/null @@ -1,71 +0,0 @@ ---地縛神の咆哮 -function c56339050.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c56339050.target) - e1:SetOperation(c56339050.operation) - c:RegisterEffect(e1) - -- - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(56339050,0)) - e2:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetRange(LOCATION_SZONE) - e2:SetCode(EVENT_ATTACK_ANNOUNCE) - e2:SetCondition(c56339050.condition2) - e2:SetTarget(c56339050.target2) - e2:SetOperation(c56339050.operation) - c:RegisterEffect(e2) -end -function c56339050.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc==Duel.GetAttacker() end - if chk==0 then return true end - if Duel.CheckEvent(EVENT_ATTACK_ANNOUNCE) and Duel.GetTurnPlayer()~=tp then - local tc=Duel.GetAttacker() - if Duel.IsExistingMatchingCard(c56339050.cfilter,tp,LOCATION_MZONE,0,1,nil,tc:GetAttack()) - and tc:IsOnField() and tc:IsCanBeEffectTarget(e) and tc:IsDestructable() then - e:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE) - e:SetProperty(EFFECT_FLAG_CARD_TARGET) - Duel.SetTargetCard(tc) - local dam=tc:GetAttack()/2 - Duel.SetTargetParam(dam) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,tc,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,dam) - e:GetHandler():RegisterFlagEffect(56339050,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) - else - e:SetCategory(0) - e:SetProperty(0) - end - end -end -function c56339050.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsAttackable() then - local atk=tc:GetAttack()/2 - if Duel.Destroy(tc,REASON_EFFECT)~=0 then - Duel.Damage(1-tp,atk,REASON_EFFECT) - end - end -end -function c56339050.cfilter(c,atk) - return c:IsFaceup() and c:IsSetCard(0x21) and c:GetAttack()>atk -end -function c56339050.condition2(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetAttacker() - return Duel.GetTurnPlayer()~=tp and Duel.IsExistingMatchingCard(c56339050.cfilter,tp,LOCATION_MZONE,0,1,nil,tc:GetAttack()) -end -function c56339050.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local tc=Duel.GetAttacker() - if chkc then return chkc==tc end - if chk==0 then return e:GetHandler():GetFlagEffect(56339050)==0 - and tc:IsOnField() and tc:IsCanBeEffectTarget(e) and tc:IsDestructable() end - Duel.SetTargetCard(tc) - local dam=tc:GetAttack()/2 - Duel.SetTargetParam(dam) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,tc,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,dam) - e:GetHandler():RegisterFlagEffect(56339050,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) -end diff --git a/script/c56350972.lua b/script/c56350972.lua deleted file mode 100644 index 5a4693a6a1..0000000000 --- a/script/c56350972.lua +++ /dev/null @@ -1,100 +0,0 @@ ---竜姫神サフィラ -function c56350972.initial_effect(c) - c:EnableReviveLimit() - --effect - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE) - e1:SetCondition(c56350972.regcon1) - e1:SetOperation(c56350972.regop) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE) - e2:SetCondition(c56350972.regcon2) - e2:SetOperation(c56350972.regop) - c:RegisterEffect(e2) -end -function c56350972.regcon1(e,tp,eg,ep,ev,re,r,rp) - return bit.band(e:GetHandler():GetSummonType(),SUMMON_TYPE_RITUAL)==SUMMON_TYPE_RITUAL -end -function c56350972.regfilter(c) - return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsPreviousLocation(LOCATION_HAND+LOCATION_DECK) -end -function c56350972.regcon2(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c56350972.regfilter,1,nil) -end -function c56350972.regop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(56350972,0)) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetCountLimit(1,56350972) - e1:SetRange(LOCATION_MZONE) - e1:SetTarget(c56350972.target) - e1:SetOperation(c56350972.operation) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - c:RegisterEffect(e1) -end -function c56350972.filter(c) - return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsAbleToHand() -end -function c56350972.target(e,tp,eg,ep,ev,re,r,rp,chk) - local b1=Duel.IsPlayerCanDraw(tp,2) - local b2=Duel.GetFieldGroupCount(1-tp,LOCATION_HAND,0)~=0 - local b3=Duel.IsExistingMatchingCard(c56350972.filter,tp,LOCATION_GRAVE,0,1,nil) - if chk==0 then return b1 or b2 or b3 end - local ops={} - local opval={} - local off=1 - if b1 then - ops[off]=aux.Stringid(56350972,1) - opval[off-1]=1 - off=off+1 - end - if b2 then - ops[off]=aux.Stringid(56350972,2) - opval[off-1]=2 - off=off+1 - end - if b3 then - ops[off]=aux.Stringid(56350972,3) - opval[off-1]=3 - off=off+1 - end - local op=Duel.SelectOption(tp,table.unpack(ops)) - local sel=opval[op] - e:SetLabel(sel) - if sel==1 then - Duel.SetOperationInfo(0,CATEGORY_DRAW,0,0,tp,2) - Duel.SetOperationInfo(0,CATEGORY_HANDES,0,0,tp,1) - elseif sel==2 then - Duel.SetOperationInfo(0,CATEGORY_HANDES,0,0,1-tp,1) - else - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE) - end -end -function c56350972.operation(e,tp,eg,ep,ev,re,r,rp) - local sel=e:GetLabel() - if sel==1 then - Duel.Draw(tp,2,REASON_EFFECT) - Duel.BreakEffect() - Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT+REASON_DISCARD) - elseif sel==2 then - local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND) - if g:GetCount()==0 then return end - local sg=g:RandomSelect(tp,1) - Duel.SendtoGrave(sg,REASON_EFFECT+REASON_DISCARD) - else - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c56350972.filter,tp,LOCATION_GRAVE,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end - end -end diff --git a/script/c56387350.lua b/script/c56387350.lua deleted file mode 100644 index 2fa36e57a1..0000000000 --- a/script/c56387350.lua +++ /dev/null @@ -1,43 +0,0 @@ ---ヴァンパイア・ベビー -function c56387350.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(56387350,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_PHASE+PHASE_BATTLE) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCondition(c56387350.spcon) - e1:SetTarget(c56387350.sptg) - e1:SetOperation(c56387350.spop) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_BATTLE_DESTROYING) - e2:SetOperation(c56387350.regop) - c:RegisterEffect(e2) -end -function c56387350.regop(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():RegisterFlagEffect(56387350,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_BATTLE,0,1) -end -function c56387350.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetFlagEffect(56387350)~=0 -end -function c56387350.filter(c,e,tp,rc,tid) - return c:IsReason(REASON_BATTLE) and c:GetReasonCard()==rc and c:GetTurnID()==tid - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c56387350.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c56387350.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil,e,tp,e:GetHandler(),Duel.GetTurnCount()) end - local g=Duel.GetMatchingGroup(c56387350.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,nil,e,tp,e:GetHandler(),Duel.GetTurnCount()) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c56387350.spop(e,tp,eg,ep,ev,re,r,rp) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ft<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local tc=Duel.SelectMatchingCard(tp,c56387350.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,ft,nil,e,tp,e:GetHandler(),Duel.GetTurnCount()) - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) -end diff --git a/script/c56399890.lua b/script/c56399890.lua deleted file mode 100644 index ea83987b78..0000000000 --- a/script/c56399890.lua +++ /dev/null @@ -1,33 +0,0 @@ ---魔轟神獣キャシー -function c56399890.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(56399890,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCondition(c56399890.descon) - e1:SetTarget(c56399890.destg) - e1:SetOperation(c56399890.desop) - c:RegisterEffect(e1) -end -function c56399890.descon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_HAND) and bit.band(r,REASON_DISCARD)~=0 -end -function c56399890.filter(c) - return c:IsFaceup() and c:IsDestructable() -end -function c56399890.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and c56399890.filter(chkc) end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c56399890.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c56399890.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c5640330.lua b/script/c5640330.lua deleted file mode 100644 index f8f3eee684..0000000000 --- a/script/c5640330.lua +++ /dev/null @@ -1,54 +0,0 @@ ---ハンニバル・ネクロマンサー -function c5640330.initial_effect(c) - c:EnableCounterPermit(0x3001) - c:SetCounterLimit(0x3001,1) - --summon success - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(5640330,0)) - e1:SetCategory(CATEGORY_COUNTER) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c5640330.addct) - e1:SetOperation(c5640330.addc) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(5640330,1)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCost(c5640330.descost) - e2:SetTarget(c5640330.destg) - e2:SetOperation(c5640330.desop) - c:RegisterEffect(e2) -end -function c5640330.addct(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,1,0,0x3001) -end -function c5640330.addc(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - e:GetHandler():AddCounter(0x3001,1) - end -end -function c5640330.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsCanRemoveCounter(tp,0x3001,1,REASON_COST) end - e:GetHandler():RemoveCounter(tp,0x3001,1,REASON_COST) -end -function c5640330.filter(c) - return c:IsType(TYPE_TRAP) and c:IsFaceup() and c:IsDestructable() -end -function c5640330.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and c5640330.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c5640330.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c5640330.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c5640330.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c56410040.lua b/script/c56410040.lua deleted file mode 100644 index c36aab5be1..0000000000 --- a/script/c56410040.lua +++ /dev/null @@ -1,17 +0,0 @@ ---ジャンク・フォアード -function c56410040.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(56410040,0)) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c56410040.spcon) - c:RegisterEffect(e1) -end -function c56410040.spcon(e,c) - if c==nil then return true end - return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 - and Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0,nil)==0 -end diff --git a/script/c56413937.lua b/script/c56413937.lua deleted file mode 100644 index 7c474f7abd..0000000000 --- a/script/c56413937.lua +++ /dev/null @@ -1,6 +0,0 @@ ---戦場の死装束 -function c56413937.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcCode2(c,38942059,16899564,true,true) -end diff --git a/script/c56421754.lua b/script/c56421754.lua deleted file mode 100644 index c462dd76a6..0000000000 --- a/script/c56421754.lua +++ /dev/null @@ -1,42 +0,0 @@ ---U.A.マイティースラッガー -function c56421754.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(1,56421754) - e1:SetCondition(c56421754.spcon) - e1:SetOperation(c56421754.spop) - c:RegisterEffect(e1) - --actlimit - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetCode(EFFECT_CANNOT_ACTIVATE) - e2:SetRange(LOCATION_MZONE) - e2:SetTargetRange(0,1) - e2:SetValue(c56421754.aclimit) - e2:SetCondition(c56421754.actcon) - c:RegisterEffect(e2) -end -function c56421754.spfilter(c) - return c:IsFaceup() and c:IsSetCard(0xb2) and not c:IsCode(56421754) and c:IsAbleToHandAsCost() -end -function c56421754.spcon(e,c) - if c==nil then return true end - return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-1 - and Duel.IsExistingMatchingCard(c56421754.spfilter,c:GetControler(),LOCATION_MZONE,0,1,nil) -end -function c56421754.spop(e,tp,eg,ep,ev,re,r,rp,c) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g=Duel.SelectMatchingCard(tp,c56421754.spfilter,tp,LOCATION_MZONE,0,1,1,nil) - Duel.SendtoHand(g,nil,REASON_COST) -end -function c56421754.aclimit(e,re,tp) - return not re:GetHandler():IsImmuneToEffect(e) -end -function c56421754.actcon(e) - return Duel.GetAttacker()==e:GetHandler() -end diff --git a/script/c56427559.lua b/script/c56427559.lua deleted file mode 100644 index 4a631c6f19..0000000000 --- a/script/c56427559.lua +++ /dev/null @@ -1,43 +0,0 @@ ---ギミック・パペット-ギア・チェンジャー -function c56427559.initial_effect(c) - --lvchange - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(56427559,0)) - e1:SetCategory(CATEGORY_LVCHANGE) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c56427559.lvtg) - e1:SetOperation(c56427559.lvop) - c:RegisterEffect(e1) - -- - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e2:SetRange(LOCATION_DECK) - e2:SetCode(EFFECT_SPSUMMON_CONDITION) - c:RegisterEffect(e2) -end -function c56427559.lvfilter(c,lv) - local clv=c:GetLevel() - return c:IsFaceup() and c:IsSetCard(0x83) and clv>0 and clv~=lv -end -function c56427559.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c56427559.lvfilter(chkc,e:GetHandler():GetLevel()) end - if chk==0 then return Duel.IsExistingTarget(c56427559.lvfilter,tp,LOCATION_MZONE,0,1,nil,e:GetHandler():GetLevel()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c56427559.lvfilter,tp,LOCATION_MZONE,0,1,1,nil,e:GetHandler():GetLevel()) -end -function c56427559.lvop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and c:IsFaceup() and tc:IsRelateToEffect(e) and tc:IsFaceup() then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CHANGE_LEVEL) - e1:SetValue(tc:GetLevel()) - e1:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e1) - end -end diff --git a/script/c56433456.lua b/script/c56433456.lua deleted file mode 100644 index 577369e67b..0000000000 --- a/script/c56433456.lua +++ /dev/null @@ -1,21 +0,0 @@ ---天空の聖域 -function c56433456.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --avoid battle damage - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_AVOID_BATTLE_DAMAGE) - e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e2:SetTarget(c56433456.tg) - e2:SetValue(1) - c:RegisterEffect(e2) -end -function c56433456.tg(e,c) - return c:IsRace(RACE_FAIRY) -end diff --git a/script/c5645210.lua b/script/c5645210.lua deleted file mode 100644 index a4926ef45f..0000000000 --- a/script/c5645210.lua +++ /dev/null @@ -1,49 +0,0 @@ ---The splendid VENUS -function c5645210.initial_effect(c) - --atk,def - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e1:SetTarget(c5645210.target) - e1:SetValue(-500) - c:RegisterEffect(e1) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_UPDATE_DEFENCE) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e1:SetTarget(c5645210.target) - e1:SetValue(-500) - c:RegisterEffect(e1) - --cannot disable - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetCode(EFFECT_CANNOT_DISABLE) - e3:SetRange(LOCATION_MZONE) - e3:SetTargetRange(LOCATION_SZONE,0) - c:RegisterEffect(e3) - --inactivatable - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_FIELD) - e4:SetCode(EFFECT_CANNOT_INACTIVATE) - e4:SetRange(LOCATION_MZONE) - e4:SetValue(c5645210.effectfilter) - c:RegisterEffect(e4) - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_FIELD) - e5:SetCode(EFFECT_CANNOT_DISEFFECT) - e5:SetRange(LOCATION_MZONE) - e5:SetValue(c5645210.effectfilter) - c:RegisterEffect(e5) -end -function c5645210.target(e,c) - return c:IsFaceup() and not c:IsRace(RACE_FAIRY) -end -function c5645210.effectfilter(e,ct) - local p=e:GetHandler():GetControler() - local te,tp=Duel.GetChainInfo(ct,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER) - local tc=te:GetHandler() - return p==tp and tc:IsType(TYPE_SPELL+TYPE_TRAP) -end diff --git a/script/c564541.lua b/script/c564541.lua deleted file mode 100644 index fe65b148d0..0000000000 --- a/script/c564541.lua +++ /dev/null @@ -1,50 +0,0 @@ ---ミンゲイドラゴン -function c564541.initial_effect(c) - --double tribute - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DOUBLE_TRIBUTE) - e1:SetValue(c564541.dccon) - c:RegisterEffect(e1) - --Special Summon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(564541,0)) - e2:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_FIELD) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) - e2:SetRange(LOCATION_GRAVE) - e2:SetCountLimit(1) - e2:SetCondition(c564541.spcon) - e2:SetTarget(c564541.sptg) - e2:SetOperation(c564541.spop) - c:RegisterEffect(e2) -end -function c564541.dccon(e,c) - return c:IsRace(RACE_DRAGON) -end -function c564541.cfilter(c) - return c:IsType(TYPE_MONSTER) and not c:IsRace(RACE_DRAGON) -end -function c564541.spcon(e,tp,eg,ep,ev,re,r,rp) - return tp==Duel.GetTurnPlayer() and Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 - and not Duel.IsExistingMatchingCard(c564541.cfilter,tp,LOCATION_GRAVE,0,1,nil) -end -function c564541.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c564541.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 - and not Duel.IsExistingMatchingCard(c564541.cfilter,tp,LOCATION_GRAVE,0,1,nil) then - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP_ATTACK) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+0x47e0000) - e1:SetValue(LOCATION_REMOVED) - c:RegisterEffect(e1,true) - end -end diff --git a/script/c56460688.lua b/script/c56460688.lua deleted file mode 100644 index 69a6932f59..0000000000 --- a/script/c56460688.lua +++ /dev/null @@ -1,65 +0,0 @@ ---異次元隔離マシーン -function c56460688.initial_effect(c) - --remove - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_REMOVE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c56460688.target) - e1:SetOperation(c56460688.operation) - c:RegisterEffect(e1) - --return - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetOperation(c56460688.retop) - e2:SetLabelObject(e1) - c:RegisterEffect(e2) -end -function c56460688.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,LOCATION_MZONE,0,1,nil) - and Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g1=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,LOCATION_MZONE,0,1,1,nil) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g2=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_MZONE,1,1,nil) - g1:Merge(g2) - if e:GetLabelObject() then - e:GetLabelObject():DeleteGroup() - e:SetLabelObject(nil) - end - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g1,2,0,0) -end -function c56460688.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) then return end - local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) - if Duel.Remove(tg,0,REASON_EFFECT+REASON_TEMPORARY)~=0 then - local g=Duel.GetOperatedGroup() - local tc=g:GetFirst() - while tc do - tc:RegisterFlagEffect(56460688,RESET_EVENT+0x1fe0000,0,1) - tc=g:GetNext() - end - c:RegisterFlagEffect(56460688,RESET_EVENT+0x17a0000,0,1) - g:KeepAlive() - e:SetLabelObject(g) - end -end -function c56460688.retop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():GetFlagEffect(56460688)==0 then return end - if bit.band(r,REASON_DESTROY)~=0 then - local g=e:GetLabelObject():GetLabelObject() - local tc=g:GetFirst() - while tc do - if tc:GetFlagEffect(56460688)>0 then - Duel.ReturnToField(tc) - end - tc=g:GetNext() - end - g:DeleteGroup() - e:GetLabelObject():SetLabelObject(nil) - end -end diff --git a/script/c5650082.lua b/script/c5650082.lua deleted file mode 100644 index fc3ec133f2..0000000000 --- a/script/c5650082.lua +++ /dev/null @@ -1,29 +0,0 @@ ---神風のバリア -エア・フォース- -function c5650082.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetCondition(c5650082.condition) - e1:SetTarget(c5650082.target) - e1:SetOperation(c5650082.activate) - c:RegisterEffect(e1) -end -function c5650082.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp -end -function c5650082.filter(c) - return c:IsAttackPos() and c:IsAbleToHand() -end -function c5650082.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c5650082.filter,tp,0,LOCATION_MZONE,1,nil) end - local g=Duel.GetMatchingGroup(c5650082.filter,tp,0,LOCATION_MZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0) -end -function c5650082.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c5650082.filter,tp,0,LOCATION_MZONE,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - end -end diff --git a/script/c56511382.lua b/script/c56511382.lua deleted file mode 100644 index 8834f89d6c..0000000000 --- a/script/c56511382.lua +++ /dev/null @@ -1,43 +0,0 @@ ---A・ジェネクス・ボルキャノン -function c56511382.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(56511382,0)) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCost(c56511382.descost) - e1:SetTarget(c56511382.destg) - e1:SetOperation(c56511382.desop) - c:RegisterEffect(e1) -end -function c56511382.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x2) and c:IsAttribute(ATTRIBUTE_FIRE) and c:IsAbleToGraveAsCost() -end -function c56511382.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c56511382.cfilter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c56511382.cfilter,tp,LOCATION_MZONE,0,1,1,nil) - Duel.SendtoGrave(g,REASON_COST) -end -function c56511382.filter(c) - return c:IsFaceup() and c:IsDestructable() -end -function c56511382.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c56511382.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c56511382.filter,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c56511382.filter,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,1,1-tp,g:GetFirst():GetLevel()*400) -end -function c56511382.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - local lv=tc:GetLevel() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Destroy(tc,REASON_EFFECT) - Duel.Damage(1-tp,lv*400,REASON_EFFECT) - end -end diff --git a/script/c56514812.lua b/script/c56514812.lua deleted file mode 100644 index 42cf8d9038..0000000000 --- a/script/c56514812.lua +++ /dev/null @@ -1,22 +0,0 @@ ---くノ一ウォリアー -function c56514812.initial_effect(c) - --handes - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(56514812,0)) - e1:SetCategory(CATEGORY_HANDES) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_CONTROL_CHANGED) - e1:SetTarget(c56514812.target) - e1:SetOperation(c56514812.operation) - c:RegisterEffect(e1) -end -function c56514812.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return not e:GetHandler():IsStatus(STATUS_CHAINING) end - Duel.SetOperationInfo(0,CATEGORY_HANDES,0,0,ep,1) -end -function c56514812.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetFieldGroup(ep,LOCATION_HAND,0) - if g:GetCount()==0 then return end - local sg=g:RandomSelect(ep,1) - Duel.SendtoGrave(sg,REASON_DISCARD+REASON_EFFECT) -end diff --git a/script/c56524813.lua b/script/c56524813.lua deleted file mode 100644 index 1dd24060f7..0000000000 --- a/script/c56524813.lua +++ /dev/null @@ -1,46 +0,0 @@ ---逆巻くエリア -function c56524813.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCost(c56524813.spcost) - e1:SetTarget(c56524813.sptg) - e1:SetOperation(c56524813.spop) - c:RegisterEffect(e1) -end -function c56524813.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsAttribute,1,e:GetHandler(),ATTRIBUTE_WATER) end - local g=Duel.SelectReleaseGroup(tp,Card.IsAttribute,1,1,e:GetHandler(),ATTRIBUTE_WATER) - Duel.Release(g,REASON_COST) -end -function c56524813.filter(c,e,tp) - return c:IsAttribute(ATTRIBUTE_WATER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c56524813.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c56524813.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c56524813.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c56524813.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_LEAVE_FIELD) - e1:SetRange(LOCATION_MZONE) - e1:SetOperation(c56524813.desop) - e1:SetReset(RESET_EVENT+0x1fe0000) - g:GetFirst():RegisterEffect(e1) - end -end -function c56524813.desop(e,tp,eg,ep,ev,re,r,rp) - if eg:IsExists(Card.IsCode,1,nil,56524813) then - Duel.Destroy(e:GetHandler(),REASON_EFFECT) - end -end diff --git a/script/c56532632.lua b/script/c56532632.lua deleted file mode 100644 index a60835e121..0000000000 --- a/script/c56532632.lua +++ /dev/null @@ -1,30 +0,0 @@ ---威風堂々 -function c56532632.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_CHAINING) - e1:SetCondition(c56532632.condition) - e1:SetTarget(c56532632.target) - e1:SetOperation(c56532632.activate) - c:RegisterEffect(e1) -end -function c56532632.condition(e,tp,eg,ep,ev,re,r,rp) - local ph=Duel.GetCurrentPhase() - return ep~=tp and ph>=PHASE_BATTLE and ph<=PHASE_DAMAGE_CAL - and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainNegatable(ev) -end -function c56532632.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) - end -end -function c56532632.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateActivation(ev) - if re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(eg,REASON_EFFECT) - end -end diff --git a/script/c56535497.lua b/script/c56535497.lua deleted file mode 100644 index dbb0bee46f..0000000000 --- a/script/c56535497.lua +++ /dev/null @@ -1,88 +0,0 @@ ---バーサーキング -function c56535497.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetTarget(c56535497.target1) - e1:SetOperation(c56535497.operation) - c:RegisterEffect(e1) - --atk - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(56535497,1)) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetRange(LOCATION_SZONE) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetHintTiming(TIMING_DAMAGE_STEP) - e2:SetCondition(c56535497.condition2) - e2:SetTarget(c56535497.target2) - e2:SetOperation(c56535497.operation) - c:RegisterEffect(e2) -end -function c56535497.filter(c) - return c:IsFaceup() and c:IsRace(RACE_BEAST) -end -function c56535497.target1(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - if chk==0 then - local ph=Duel.GetCurrentPhase() - if Duel.GetTurnPlayer()==tp then return ph==PHASE_MAIN1 or ph==PHASE_MAIN2 - else return ph==PHASE_BATTLE or (ph==PHASE_DAMAGE - and Duel.IsExistingTarget(c56535497.filter,tp,LOCATION_MZONE,LOCATION_MZONE,2,nil)) end - end - if Duel.GetCurrentPhase()==PHASE_DAMAGE or - (Duel.IsExistingTarget(c56535497.filter,tp,LOCATION_MZONE,LOCATION_MZONE,2,nil) and Duel.SelectYesNo(tp,aux.Stringid(56535497,0))) then - e:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(56535497,2)) - local rg=Duel.SelectTarget(tp,c56535497.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - e:SetLabelObject(rg:GetFirst()) - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(56535497,3)) - Duel.SelectTarget(tp,c56535497.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,rg:GetFirst()) - e:GetHandler():RegisterFlagEffect(56535497,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) - else - e:SetLabelObject(nil) - e:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - end -end -function c56535497.condition2(e,tp,eg,ep,ev,re,r,rp) - local ph=Duel.GetCurrentPhase() - if Duel.GetTurnPlayer()==tp then return ph==PHASE_MAIN1 or ph==PHASE_MAIN2 - else return ph==PHASE_BATTLE or ph==PHASE_DAMAGE end -end -function c56535497.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - if chk==0 then return e:GetHandler():GetFlagEffect(56535497)==0 - and Duel.IsExistingTarget(c56535497.filter,tp,LOCATION_MZONE,LOCATION_MZONE,2,nil) end - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(56535497,2)) - local rg=Duel.SelectTarget(tp,c56535497.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - e:SetLabelObject(rg:GetFirst()) - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(56535497,3)) - Duel.SelectTarget(tp,c56535497.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,rg:GetFirst()) - e:GetHandler():RegisterFlagEffect(56535497,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) -end -function c56535497.operation(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local tc1=e:GetLabelObject() - if not tc1 then return end - local tc2=g:GetFirst() - if tc1==tc2 then tc2=g:GetNext() end - if tc1:IsFaceup() and tc1:IsRelateToEffect(e) and tc2:IsFaceup() and tc2:IsRelateToEffect(e) then - local atk=tc1:GetAttack()/2 - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetValue(atk) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc1:RegisterEffect(e1) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(atk) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc2:RegisterEffect(e2) - end -end diff --git a/script/c56570271.lua b/script/c56570271.lua deleted file mode 100644 index 15f53af08e..0000000000 --- a/script/c56570271.lua +++ /dev/null @@ -1,27 +0,0 @@ ---D-HERO ディスクガイ -function c56570271.initial_effect(c) - --draw - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(56570271,0)) - e1:SetCategory(CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(c56570271.condition) - e1:SetTarget(c56570271.target) - e1:SetOperation(c56570271.operation) - c:RegisterEffect(e1) -end -function c56570271.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetPreviousLocation()==LOCATION_GRAVE -end -function c56570271.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(2) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2) -end -function c56570271.operation(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end diff --git a/script/c56574543.lua b/script/c56574543.lua deleted file mode 100644 index db431b5d1b..0000000000 --- a/script/c56574543.lua +++ /dev/null @@ -1,56 +0,0 @@ ---武神器-ツムガリ -function c56574543.initial_effect(c) - --atkup - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(56574543,0)) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetRange(LOCATION_GRAVE) - e1:SetCountLimit(1,56574543) - e1:SetCondition(c56574543.atkcon) - e1:SetCost(c56574543.atkcost) - e1:SetOperation(c56574543.atkop) - c:RegisterEffect(e1) -end -function c56574543.atkcon(e,tp,eg,ep,ev,re,r,rp) - local phase=Duel.GetCurrentPhase() - if phase~=PHASE_DAMAGE or Duel.IsDamageCalculated() then return false end - local c=Duel.GetAttackTarget() - if not c then return false end - if c:IsControler(1-tp) then c=Duel.GetAttacker() end - return c and c:IsSetCard(0x88) and c:IsRace(RACE_BEASTWARRIOR) and c:IsRelateToBattle() -end -function c56574543.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) -end -function c56574543.atkop(e,tp,eg,ep,ev,re,r,rp,chk) - local a=Duel.GetAttacker() - local d=Duel.GetAttackTarget() - if not a:IsRelateToBattle() or a:IsFacedown() or not d:IsRelateToBattle() or d:IsFacedown() then return end - if a:GetControler()~=tp then a,d=d,a end - if a:IsImmuneToEffect(e) then return end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetOwnerPlayer(tp) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_DAMAGE_CAL) - e1:SetValue(d:GetAttack()) - a:RegisterEffect(e1) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_PRE_BATTLE_DAMAGE) - e2:SetCondition(c56574543.rdcon) - e2:SetOperation(c56574543.rdop) - e2:SetReset(RESET_PHASE+PHASE_DAMAGE_CAL) - Duel.RegisterEffect(e2,tp) -end -function c56574543.rdcon(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp -end -function c56574543.rdop(e,tp,eg,ep,ev,re,r,rp) - Duel.ChangeBattleDamage(ep,ev/2) -end diff --git a/script/c56585883.lua b/script/c56585883.lua deleted file mode 100644 index efe37e4ea3..0000000000 --- a/script/c56585883.lua +++ /dev/null @@ -1,84 +0,0 @@ ---ハーピィ・ハーピスト -function c56585883.initial_effect(c) - --change name - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetCode(EFFECT_CHANGE_CODE) - e1:SetRange(LOCATION_MZONE+LOCATION_GRAVE) - e1:SetValue(76812113) - c:RegisterEffect(e1) - --return - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(56585883,0)) - e2:SetCategory(CATEGORY_TOHAND) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_SUMMON_SUCCESS) - e2:SetCountLimit(1,56585883) - e2:SetTarget(c56585883.target) - e2:SetOperation(c56585883.operation) - c:RegisterEffect(e2) - --to grave - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e3:SetCode(EVENT_TO_GRAVE) - e3:SetOperation(c56585883.regop) - c:RegisterEffect(e3) - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(56585883,1)) - e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e4:SetCode(EVENT_PHASE+PHASE_END) - e4:SetCountLimit(1,56585884) - e4:SetRange(LOCATION_GRAVE) - e4:SetCondition(c56585883.thcon) - e4:SetTarget(c56585883.thtg) - e4:SetOperation(c56585883.thop) - c:RegisterEffect(e4) -end -function c56585883.filter1(c) - return c:IsFaceup() and c:IsRace(RACE_WINDBEAST) and c:IsAbleToHand() -end -function c56585883.filter2(c) - return c:IsFaceup() and c:IsAbleToHand() -end -function c56585883.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - if chk==0 then return Duel.IsExistingTarget(c56585883.filter1,tp,LOCATION_MZONE,0,1,e:GetHandler()) - and Duel.IsExistingTarget(c56585883.filter2,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g1=Duel.SelectTarget(tp,c56585883.filter1,tp,LOCATION_MZONE,0,1,1,e:GetHandler()) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g2=Duel.SelectTarget(tp,c56585883.filter2,tp,0,LOCATION_MZONE,1,1,nil) - g1:Merge(g2) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g1,2,0,0) -end -function c56585883.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - end -end -function c56585883.regop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - c:RegisterFlagEffect(56585883,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) -end -function c56585883.thcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetFlagEffect(56585883)>0 -end -function c56585883.thfilter(c) - return c:IsAttackBelow(1500) and c:IsRace(RACE_WINDBEAST) and c:GetLevel()==4 and c:IsAbleToHand() -end -function c56585883.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c56585883.thfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c56585883.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c56585883.thfilter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c56594520.lua b/script/c56594520.lua deleted file mode 100644 index d86fb7f7a0..0000000000 --- a/script/c56594520.lua +++ /dev/null @@ -1,29 +0,0 @@ ---ガイアパワー -function c56594520.initial_effect(c) - --activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --Atk up - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetTarget(c56594520.filter) - e2:SetValue(500) - c:RegisterEffect(e2) - --Def down - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetRange(LOCATION_SZONE) - e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e3:SetCode(EFFECT_UPDATE_DEFENCE) - e3:SetTarget(c56594520.filter) - e3:SetValue(-400) - c:RegisterEffect(e3) -end -function c56594520.filter(e,c) - return c:IsAttribute(ATTRIBUTE_EARTH) -end diff --git a/script/c56597272.lua b/script/c56597272.lua deleted file mode 100644 index 34311a5877..0000000000 --- a/script/c56597272.lua +++ /dev/null @@ -1,39 +0,0 @@ ---雲魔物-羊雲 -function c56597272.initial_effect(c) - --token - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(56597272,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetCondition(c56597272.condition) - e1:SetTarget(c56597272.target) - e1:SetOperation(c56597272.operation) - c:RegisterEffect(e1) -end -function c56597272.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) -end -function c56597272.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,2,0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,0,0) -end -function c56597272.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 then return end - if not Duel.IsPlayerCanSpecialSummonMonster(tp,56597273,0x18,0x4011,0,0,1,RACE_FAIRY,ATTRIBUTE_WATER) then return end - for i=1,2 do - local token=Duel.CreateToken(tp,56597273) - Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP_DEFENCE) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UNRELEASABLE_SUM) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(c56597272.sumlimit) - token:RegisterEffect(e1,true) - end - Duel.SpecialSummonComplete() -end -function c56597272.sumlimit(e,c) - return not c:IsSetCard(0x18) -end diff --git a/script/c56605802.lua b/script/c56605802.lua deleted file mode 100644 index 7aeb6882ff..0000000000 --- a/script/c56605802.lua +++ /dev/null @@ -1,28 +0,0 @@ ---幻影コオロギ -function c56605802.initial_effect(c) - --flip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(56605802,0)) - e1:SetCategory(CATEGORY_TODECK) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP) - e1:SetTarget(c56605802.target) - e1:SetOperation(c56605802.operation) - c:RegisterEffect(e1) -end -function c56605802.filter(c) - return c:IsFacedown() and c:IsAbleToDeck() -end -function c56605802.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c56605802.filter(chkc) end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectTarget(tp,c56605802.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0) -end -function c56605802.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.SendtoDeck(tc,nil,0,REASON_EFFECT) - end -end diff --git a/script/c56606928.lua b/script/c56606928.lua deleted file mode 100644 index 639e92aedc..0000000000 --- a/script/c56606928.lua +++ /dev/null @@ -1,23 +0,0 @@ ---永遠の渇水 -function c56606928.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c56606928.target) - e1:SetOperation(c56606928.activate) - c:RegisterEffect(e1) -end -function c56606928.filter(c) - return c:IsRace(RACE_FISH) and c:IsFaceup() and c:IsDestructable() -end -function c56606928.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c56606928.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - local sg=Duel.GetMatchingGroup(c56606928.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,sg:GetCount(),0,0) -end -function c56606928.activate(e,tp,eg,ep,ev,re,r,rp) - local sg=Duel.GetMatchingGroup(c56606928.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - Duel.Destroy(sg,REASON_EFFECT) -end diff --git a/script/c56611470.lua b/script/c56611470.lua deleted file mode 100644 index 2fae195345..0000000000 --- a/script/c56611470.lua +++ /dev/null @@ -1,98 +0,0 @@ ---アーティファクトの解放 -function c56611470.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c56611470.target) - e1:SetOperation(c56611470.activate) - c:RegisterEffect(e1) - --draw - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(56611470,0)) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP) - e2:SetCode(EVENT_DESTROYED) - e2:SetCondition(c56611470.drcon) - e2:SetCost(c56611470.drcost) - e2:SetTarget(c56611470.drtg) - e2:SetOperation(c56611470.drop) - c:RegisterEffect(e2) -end -function c56611470.filter(c,e) - return c:IsFaceup() and c:IsSetCard(0x97) and c:IsCanBeEffectTarget(e) -end -function c56611470.xyzfilter(c,mg) - if c.xyz_count~=2 then return false end - return c:IsXyzSummonable(mg) -end -function c56611470.mfilter1(c,exg) - return exg:IsExists(c56611470.mfilter2,1,nil,c) -end -function c56611470.mfilter2(c,mc) - return c.xyz_filter(mc) -end -function c56611470.mfilter3(c,mc,exg) - return exg:IsExists(Card.IsXyzSummonable,1,nil,Group.FromCards(c,mc)) -end -function c56611470.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - local mg=Duel.GetMatchingGroup(c56611470.filter,tp,LOCATION_MZONE,0,nil,e) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-2 and mg:GetCount()>1 - and Duel.IsExistingMatchingCard(c56611470.xyzfilter,tp,LOCATION_EXTRA,0,1,nil,mg) end - local exg=Duel.GetMatchingGroup(c56611470.xyzfilter,tp,LOCATION_EXTRA,0,nil,mg) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL) - local sg1=mg:FilterSelect(tp,c56611470.mfilter1,1,1,nil,exg) - local tc1=sg1:GetFirst() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL) - local sg2=mg:FilterSelect(tp,c56611470.mfilter3,1,1,tc1,tc1,exg) - sg1:Merge(sg2) - Duel.SetTargetCard(sg1) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function c56611470.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<-1 then return end - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) - if g:GetCount()<2 then return end - local xyzg=Duel.GetMatchingGroup(c56611470.xyzfilter,tp,LOCATION_EXTRA,0,nil,g) - if xyzg:GetCount()>0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local xyz=xyzg:Select(tp,1,1,nil):GetFirst() - Duel.XyzSummon(tp,xyz,g) - end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetTarget(c56611470.attg) - e1:SetReset(RESET_PHASE+RESET_END) - Duel.RegisterEffect(e1,tp) -end -function c56611470.attg(e,c) - return not c:IsSetCard(0x97) -end -function c56611470.drcon(e,tp,eg,ep,ev,re,r,rp) - return rp~=tp and e:GetHandler():GetPreviousControler()==tp -end -function c56611470.cffilter(c) - return c:IsAttribute(ATTRIBUTE_LIGHT) and c:GetLevel()==5 and not c:IsPublic() -end -function c56611470.drcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c56611470.cffilter,tp,LOCATION_HAND,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) - local g=Duel.SelectMatchingCard(tp,c56611470.cffilter,tp,LOCATION_HAND,0,1,1,nil) - Duel.ConfirmCards(1-tp,g) - Duel.ShuffleHand(tp) -end -function c56611470.drtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(1) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c56611470.drop(e,tp,eg,ep,ev,re,r,rp,chk) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end diff --git a/script/c56619314.lua b/script/c56619314.lua deleted file mode 100644 index 1193ba81b8..0000000000 --- a/script/c56619314.lua +++ /dev/null @@ -1,91 +0,0 @@ ---DDD覇龍王ペンドラゴン -function c56619314.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(56619314,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND) - e1:SetCost(c56619314.spcost) - e1:SetTarget(c56619314.sptg) - e1:SetOperation(c56619314.spop) - c:RegisterEffect(e1) - --atk up/destroy - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(56619314,1)) - e2:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCost(c56619314.cost) - e2:SetOperation(c56619314.operation) - c:RegisterEffect(e2) -end -function c56619314.spfilter(c,rac,tp) - return c:IsRace(rac) and c:IsControler(tp) -end -function c56619314.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local ct=0 - if Duel.CheckReleaseGroup(tp,c56619314.spfilter,1,nil,RACE_DRAGON,tp) then ct=ct-1 end - if Duel.CheckReleaseGroup(tp,c56619314.spfilter,1,nil,RACE_FIEND,tp) then ct=ct-1 end - return Duel.GetLocationCount(tp,LOCATION_MZONE)>ct - and Duel.CheckReleaseGroupEx(tp,Card.IsRace,1,e:GetHandler(),RACE_DRAGON) - and Duel.CheckReleaseGroupEx(tp,Card.IsRace,1,e:GetHandler(),RACE_FIEND) - end - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ft>0 then - local g1=Duel.SelectReleaseGroupEx(tp,Card.IsRace,1,1,e:GetHandler(),RACE_DRAGON) - local g2=Duel.SelectReleaseGroupEx(tp,Card.IsRace,1,1,e:GetHandler(),RACE_FIEND) - g1:Merge(g2) - Duel.Release(g1,REASON_COST) - elseif ft==0 then - local g1=Duel.SelectReleaseGroup(tp,c56619314.spfilter,1,1,nil,RACE_DRAGON+RACE_FIEND,tp) - local rac=RACE_DRAGON - if g1:GetFirst():IsRace(RACE_DRAGON) then rac=RACE_FIEND end - local g2=Duel.SelectReleaseGroupEx(tp,Card.IsRace,1,1,e:GetHandler(),rac) - g1:Merge(g2) - Duel.Release(g1,REASON_COST) - else - local g1=Duel.SelectReleaseGroup(tp,c56619314.spfilter,1,1,nil,RACE_DRAGON,tp) - local g2=Duel.SelectReleaseGroup(tp,c56619314.spfilter,1,1,nil,RACE_FIEND,tp) - g1:Merge(g2) - Duel.Release(g1,REASON_COST) - end -end -function c56619314.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c56619314.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) - end -end -function c56619314.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) -end -function c56619314.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable() -end -function c56619314.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFaceup() and c:IsRelateToEffect(e) and not c:IsImmuneToEffect(e) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(500) - e1:SetReset(RESET_EVENT+0x1ff0000+RESET_PHASE+PHASE_END) - c:RegisterEffect(e1) - local g=Duel.GetMatchingGroup(c56619314.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) - if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(56619314,2)) then - Duel.BreakEffect() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local dg=g:Select(tp,1,1,nil) - Duel.HintSelection(dg) - Duel.Destroy(dg,REASON_EFFECT) - end - end -end diff --git a/script/c56638325.lua b/script/c56638325.lua deleted file mode 100644 index c8d1b6e2f3..0000000000 --- a/script/c56638325.lua +++ /dev/null @@ -1,104 +0,0 @@ ---星輝士 デルタテロス -function c56638325.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,4,3) - c:EnableReviveLimit() - --act limit - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c56638325.limcon) - e1:SetOperation(c56638325.limop) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e3:SetRange(LOCATION_MZONE) - e3:SetCode(EVENT_CHAIN_END) - e3:SetOperation(c56638325.limop2) - c:RegisterEffect(e3) - --destroy - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(56638325,0)) - e3:SetCategory(CATEGORY_DESTROY) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_MZONE) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetCountLimit(1) - e3:SetCost(c56638325.descost) - e3:SetTarget(c56638325.destg) - e3:SetOperation(c56638325.desop) - c:RegisterEffect(e3) - --spsummon - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(56638325,1)) - e4:SetCategory(CATEGORY_SPECIAL_SUMMON) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e4:SetCode(EVENT_TO_GRAVE) - e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e4:SetCondition(c56638325.spcon) - e4:SetTarget(c56638325.sptg) - e4:SetOperation(c56638325.spop) - c:RegisterEffect(e4) -end -function c56638325.limfilter(c,tp) - return c:GetSummonPlayer()==tp -end -function c56638325.limcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetOverlayCount()>0 and eg:IsExists(c56638325.limfilter,1,nil,tp) -end -function c56638325.limop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetCurrentChain()==0 then - Duel.SetChainLimitTillChainEnd(c56638325.chainlm) - else - e:GetHandler():RegisterFlagEffect(56638325,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) - end -end -function c56638325.limop2(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():GetOverlayCount()>0 and e:GetHandler():GetFlagEffect(56638325)~=0 then - Duel.SetChainLimitTillChainEnd(c56638325.chainlm) - end - e:GetHandler():ResetFlagEffect(56638325) -end -function c56638325.chainlm(e,rp,tp) - return tp==rp -end -function c56638325.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c56638325.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsDestructable() end - if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c56638325.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end -function c56638325.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) -end -function c56638325.spfilter(c,e,tp) - return c:IsSetCard(0x9c) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c56638325.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c56638325.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) -end -function c56638325.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c56638325.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c56641453.lua b/script/c56641453.lua deleted file mode 100644 index 86105e3527..0000000000 --- a/script/c56641453.lua +++ /dev/null @@ -1,66 +0,0 @@ ---コクーン・ヴェール -function c56641453.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c56641453.cost) - e1:SetTarget(c56641453.target) - e1:SetOperation(c56641453.activate) - c:RegisterEffect(e1) -end -c56641453.list={[42682609]=17955766,[43751755]=43237273,[17363041]=54959865, - [29246354]=17732278,[16241441]=89621922,[42239546]=80344569} -function c56641453.filter1(c,e,tp) - if c:IsFacedown() then return false end - local code=c:GetCode() - local tcode=c56641453.list[code] - return tcode and Duel.IsExistingTarget(c56641453.filter2,tp,0x13,0,1,nil,tcode,e,tp) -end -function c56641453.filter2(c,tcode,e,tp) - return c:IsCode(tcode) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) and not c:IsHasEffect(EFFECT_NECRO_VALLEY) -end -function c56641453.cost(e,tp,eg,ep,ev,re,r,rp,chk) - e:SetLabel(1) - return true -end -function c56641453.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local res=e:GetLabel()==1 - e:SetLabel(0) - return res and Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.CheckReleaseGroup(tp,c56641453.filter1,1,nil,e,tp) end - e:SetLabel(0) - local rg=Duel.SelectReleaseGroup(tp,c56641453.filter1,1,1,nil,e,tp) - local code=rg:GetFirst():GetCode() - local tcode=c56641453.list[code] - Duel.Release(rg,REASON_COST) - Duel.SetTargetParam(tcode) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,0x13) -end -function c56641453.activate(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CHANGE_DAMAGE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetTargetRange(1,0) - e1:SetValue(c56641453.damval) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) - local e2=e1:Clone() - e2:SetCode(EFFECT_NO_EFFECT_DAMAGE) - e2:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e2,tp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local tcode=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c56641453.filter2,tp,0x13,0,1,1,nil,tcode,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end -function c56641453.damval(e,re,val,r,rp,rc) - if bit.band(r,REASON_EFFECT)~=0 then return 0 - else return val end -end diff --git a/script/c56647086.lua b/script/c56647086.lua deleted file mode 100644 index e328753944..0000000000 --- a/script/c56647086.lua +++ /dev/null @@ -1,15 +0,0 @@ ---暗黒の侵略者 -function c56647086.initial_effect(c) - --act limit - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EFFECT_CANNOT_ACTIVATE) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(0,1) - e1:SetValue(c56647086.aclimit) - c:RegisterEffect(e1) -end -function c56647086.aclimit(e,re,tp) - return re:GetHandler():GetType()==TYPE_SPELL+TYPE_QUICKPLAY and re:IsHasType(EFFECT_TYPE_ACTIVATE) -end diff --git a/script/c56655675.lua b/script/c56655675.lua deleted file mode 100644 index 1746ae1f1b..0000000000 --- a/script/c56655675.lua +++ /dev/null @@ -1,100 +0,0 @@ ---聖霊獣騎 ガイアペライオ -function c56655675.initial_effect(c) - c:EnableReviveLimit() - --spsummon condition - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - c:RegisterEffect(e1) - --special summon rule - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_SPSUMMON_PROC) - e2:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e2:SetRange(LOCATION_EXTRA) - e2:SetValue(1) - e2:SetCondition(c56655675.spcon) - e2:SetOperation(c56655675.spop) - c:RegisterEffect(e2) - --negate - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - e3:SetCondition(c56655675.condition) - e3:SetOperation(c56655675.operation) - c:RegisterEffect(e3) -end -function c56655675.spfilter1(c) - return c:IsSetCard(0x40b5) and c:IsAbleToRemoveAsCost() and c:IsCanBeFusionMaterial() -end -function c56655675.spfilter2(c) - return c:IsSetCard(0x10b5) and c:IsAbleToRemoveAsCost() and c:IsCanBeFusionMaterial() -end -function c56655675.spfilter3(c) - return c:IsSetCard(0x20b5) and c:IsAbleToRemoveAsCost() and c:IsCanBeFusionMaterial() -end -function c56655675.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.GetLocationCount(tp,LOCATION_MZONE)>-2 - and Duel.IsExistingMatchingCard(c56655675.spfilter1,tp,LOCATION_MZONE,0,1,nil) - and Duel.IsExistingMatchingCard(c56655675.spfilter2,tp,LOCATION_MZONE,0,1,nil) - and Duel.IsExistingMatchingCard(c56655675.spfilter3,tp,LOCATION_MZONE,0,1,nil) -end -function c56655675.spop(e,tp,eg,ep,ev,re,r,rp,c) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g1=Duel.SelectMatchingCard(tp,c56655675.spfilter1,tp,LOCATION_MZONE,0,1,1,nil) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g2=Duel.SelectMatchingCard(tp,c56655675.spfilter2,tp,LOCATION_MZONE,0,1,1,nil) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g3=Duel.SelectMatchingCard(tp,c56655675.spfilter3,tp,LOCATION_MZONE,0,1,1,nil) - g1:Merge(g2) - g1:Merge(g3) - c:SetMaterial(g1) - Duel.Remove(g1,POS_FACEUP,REASON_COST) -end -function c56655675.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+1 -end -function c56655675.operation(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_CHAINING) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c56655675.discon) - e1:SetCost(c56655675.discost) - e1:SetTarget(c56655675.distg) - e1:SetOperation(c56655675.disop) - e1:SetReset(RESET_EVENT+0x1fe0000) - e:GetHandler():RegisterEffect(e1) -end -function c56655675.discon(e,tp,eg,ep,ev,re,r,rp) - return re~=e and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) - and (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE)) and Duel.IsChainNegatable(ev) -end -function c56655675.filter(c) - return c:IsSetCard(0xb5) and c:IsAbleToRemoveAsCost() -end -function c56655675.discost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c56655675.filter,tp,LOCATION_HAND,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c56655675.filter,tp,LOCATION_HAND,0,1,1,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c56655675.distg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) - end -end -function c56655675.disop(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateActivation(ev) - if re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(eg,REASON_EFFECT) - end -end diff --git a/script/c56681873.lua b/script/c56681873.lua deleted file mode 100644 index 51eccd9cf6..0000000000 --- a/script/c56681873.lua +++ /dev/null @@ -1,28 +0,0 @@ ---魔装戦士 テライガー -function c56681873.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(56681873,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c56681873.sptg) - e1:SetOperation(c56681873.spop) - c:RegisterEffect(e1) -end -function c56681873.filter(c,e,tp) - return c:IsLevelBelow(4) and c:IsType(TYPE_NORMAL) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c56681873.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c56681873.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c56681873.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c56681873.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENCE) - end -end diff --git a/script/c56704140.lua b/script/c56704140.lua deleted file mode 100644 index 96253aa3c2..0000000000 --- a/script/c56704140.lua +++ /dev/null @@ -1,38 +0,0 @@ ---氷結界の風水師 -function c56704140.initial_effect(c) - --untargetable - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(56704140,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetProperty(EFFECT_FLAG_NO_TURN_RESET) - e1:SetCountLimit(1) - e1:SetCost(c56704140.cost) - e1:SetTarget(c56704140.target) - e1:SetOperation(c56704140.operation) - c:RegisterEffect(e1) -end -function c56704140.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) -end -function c56704140.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,0) - local aat=Duel.AnnounceAttribute(tp,1,0x7f) - e:SetLabel(aat) -end -function c56704140.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFacedown() or not c:IsRelateToEffect(e) then return end - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_BE_BATTLE_TARGET) - e1:SetLabel(e:GetLabel()) - e1:SetValue(c56704140.tgval) - e1:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e1) -end -function c56704140.tgval(e,c) - return c:IsAttribute(e:GetLabel()) and not c:IsImmuneToEffect(e) -end diff --git a/script/c5672432.lua b/script/c5672432.lua deleted file mode 100644 index 1c7862c844..0000000000 --- a/script/c5672432.lua +++ /dev/null @@ -1,35 +0,0 @@ ---EMリバイバル -function c5672432.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_DESTROYED) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e1:SetCondition(c5672432.condition) - e1:SetTarget(c5672432.target) - e1:SetOperation(c5672432.operation) - c:RegisterEffect(e1) -end -function c5672432.cfilter(c,tp) - return c:IsReason(REASON_BATTLE+REASON_EFFECT) and c:IsPreviousLocation(LOCATION_MZONE) and c:GetPreviousControler()==tp -end -function c5672432.condition(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c5672432.cfilter,1,nil,tp) -end -function c5672432.filter(c,e,tp) - return c:IsSetCard(0x9f) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsHasEffect(EFFECT_NECRO_VALLEY) -end -function c5672432.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c5672432.filter,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_HAND) -end -function c5672432.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c5672432.filter,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c56746202.lua b/script/c56746202.lua deleted file mode 100644 index 64c9ade780..0000000000 --- a/script/c56746202.lua +++ /dev/null @@ -1,53 +0,0 @@ ---スクラップ・キマイラ -function c56746202.initial_effect(c) - Duel.EnableGlobalFlag(GLOBALFLAG_SCRAP_CHIMERA) - --summon success - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(56746202,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c56746202.sumtg) - e1:SetOperation(c56746202.sumop) - c:RegisterEffect(e1) - --synchro custom - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e2:SetValue(c56746202.synlimit) - c:RegisterEffect(e2) - -- - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(56746202,1)) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_SCRAP_CHIMERA) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e3:SetValue(c56746202.synlimit2) - c:RegisterEffect(e3) -end -function c56746202.filter(c,e,tp) - return c:IsSetCard(0x24) and c:IsType(TYPE_TUNER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c56746202.sumtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c56746202.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c56746202.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c56746202.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c56746202.sumop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end -function c56746202.synlimit(e,c) - if not c then return false end - return not c:IsSetCard(0x24) -end -function c56746202.synlimit2(e,c) - return not c:IsSetCard(0x24) -end diff --git a/script/c56747793.lua b/script/c56747793.lua deleted file mode 100644 index 60a717a5af..0000000000 --- a/script/c56747793.lua +++ /dev/null @@ -1,46 +0,0 @@ ---団結の力 -function c56747793.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c56747793.target) - e1:SetOperation(c56747793.operation) - c:RegisterEffect(e1) - --Atk,def - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(c56747793.value) - c:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_EQUIP) - e3:SetCode(EFFECT_UPDATE_DEFENCE) - e3:SetValue(c56747793.value) - c:RegisterEffect(e3) - --Equip limit - local e4=Effect.CreateEffect(c) - e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetCode(EFFECT_EQUIP_LIMIT) - e4:SetValue(1) - c:RegisterEffect(e4) -end -function c56747793.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c56747793.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,e:GetHandler(),tc) - end -end -function c56747793.value(e,c) - return Duel.GetMatchingGroupCount(Card.IsFaceup,e:GetHandler():GetControler(),LOCATION_MZONE,0,nil)*800 -end diff --git a/script/c56768355.lua b/script/c56768355.lua deleted file mode 100644 index a23ebf6275..0000000000 --- a/script/c56768355.lua +++ /dev/null @@ -1,56 +0,0 @@ ---ヴァイロン・アルファ -function c56768355.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0x30),aux.NonTuner(nil),1) - c:EnableReviveLimit() - --equip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(56768355,0)) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(c56768355.eqcon) - e1:SetTarget(c56768355.eqtg) - e1:SetOperation(c56768355.eqop) - c:RegisterEffect(e1) - --indes - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - e2:SetCondition(c56768355.indcon) - e2:SetValue(c56768355.indval) - c:RegisterEffect(e2) -end -function c56768355.eqcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_SYNCHRO -end -function c56768355.filter(c,ec) - return c:IsType(TYPE_EQUIP) and c:CheckEquipTarget(ec) -end -function c56768355.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c56768355.filter(chkc,e:GetHandler()) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingTarget(c56768355.filter,tp,LOCATION_GRAVE,0,1,nil,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local g=Duel.SelectTarget(tp,c56768355.filter,tp,LOCATION_GRAVE,0,1,1,nil,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g,1,0,0) -end -function c56768355.eqop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and c:IsFaceup() and c:IsRelateToEffect(e) then - Duel.Equip(tp,tc,c) - end -end -function c56768355.indcon(e) - return e:GetHandler():GetEquipCount()>0 -end -function c56768355.indval(e,re) - if not re then return false end - local ty=re:GetActiveType() - return bit.band(ty,TYPE_SPELL+TYPE_TRAP)~=0 and bit.band(ty,TYPE_EQUIP)==0 -end diff --git a/script/c56769674.lua b/script/c56769674.lua deleted file mode 100644 index e8483be499..0000000000 --- a/script/c56769674.lua +++ /dev/null @@ -1,29 +0,0 @@ ---DNA移植手術 -function c56769674.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,0x1c1) - e1:SetTarget(c56769674.target) - c:RegisterEffect(e1) - --race - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e2:SetCode(EFFECT_CHANGE_ATTRIBUTE) - e2:SetValue(c56769674.value) - c:RegisterEffect(e2) - e1:SetLabelObject(e2) -end -function c56769674.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,562) - local rc=Duel.AnnounceAttribute(tp,1,0xffff) - e:GetLabelObject():SetLabel(rc) - e:GetHandler():SetHint(CHINT_ATTRIBUTE,rc) -end -function c56769674.value(e,c) - return e:GetLabel() -end diff --git a/script/c56784842.lua b/script/c56784842.lua deleted file mode 100644 index 66b991b4a8..0000000000 --- a/script/c56784842.lua +++ /dev/null @@ -1,25 +0,0 @@ ---エンジェルO7 -function c56784842.initial_effect(c) - --act limit - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetOperation(c56784842.regop) - c:RegisterEffect(e1) -end -function c56784842.regop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:GetSummonType()~=SUMMON_TYPE_ADVANCE then return end - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EFFECT_CANNOT_ACTIVATE) - e1:SetReset(RESET_EVENT+0x1ff0000) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(1,1) - e1:SetValue(c56784842.aclimit) - c:RegisterEffect(e1) -end -function c56784842.aclimit(e,re,tp) - return re:IsActiveType(TYPE_MONSTER) -end diff --git a/script/c56804361.lua b/script/c56804361.lua deleted file mode 100644 index 12904431f0..0000000000 --- a/script/c56804361.lua +++ /dev/null @@ -1,31 +0,0 @@ ---魔装聖龍 イーサルウェポン -function c56804361.initial_effect(c) - --tohand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(56804361,0)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCountLimit(1,56804361) - e1:SetCondition(c56804361.condition) - e1:SetTarget(c56804361.target) - e1:SetOperation(c56804361.operation) - c:RegisterEffect(e1) -end -function c56804361.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_PENDULUM -end -function c56804361.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsAbleToHand() end - if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g=Duel.SelectTarget(tp,Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c56804361.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - end -end diff --git a/script/c56830749.lua b/script/c56830749.lua deleted file mode 100644 index 4a892cd228..0000000000 --- a/script/c56830749.lua +++ /dev/null @@ -1,23 +0,0 @@ ---痛み分け -function c56830749.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c56830749.cost) - e1:SetTarget(c56830749.target) - e1:SetOperation(c56830749.activate) - c:RegisterEffect(e1) -end -function c56830749.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,nil,1,nil) end - local g=Duel.SelectReleaseGroup(tp,nil,1,1,nil) - Duel.Release(g,REASON_COST) -end -function c56830749.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(1-tp,nil,1,nil) end -end -function c56830749.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.SelectReleaseGroup(1-tp,nil,1,1,nil) - Duel.Release(g,REASON_RULE) -end diff --git a/script/c56832966.lua b/script/c56832966.lua deleted file mode 100644 index 75ecb24abe..0000000000 --- a/script/c56832966.lua +++ /dev/null @@ -1,64 +0,0 @@ ---SNo.39 希望皇ホープ・ザ・ライトニング -function c56832966.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_LIGHT),5,3,c56832966.ovfilter,aux.Stringid(56832966,0)) - c:EnableReviveLimit() - -- - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL) - e1:SetValue(1) - c:RegisterEffect(e1) - --actlimit - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetCode(EFFECT_CANNOT_ACTIVATE) - e2:SetRange(LOCATION_MZONE) - e2:SetTargetRange(0,1) - e2:SetValue(c56832966.aclimit) - e2:SetCondition(c56832966.actcon) - c:RegisterEffect(e2) - --atk - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(56832966,1)) - e3:SetCategory(CATEGORY_ATKCHANGE) - e3:SetType(EFFECT_TYPE_QUICK_O+EFFECT_TYPE_FIELD) - e3:SetRange(LOCATION_MZONE) - e3:SetCode(EVENT_PRE_DAMAGE_CALCULATE) - e3:SetCondition(c56832966.atkcon) - e3:SetCost(c56832966.atkcost) - e3:SetOperation(c56832966.atkop) - c:RegisterEffect(e3) -end -c56832966.xyz_number=39 -function c56832966.ovfilter(c) - return c:IsFaceup() and c:IsSetCard(0x7f) and c:IsType(TYPE_XYZ) and c:GetRank()==4 -end -function c56832966.aclimit(e,re,tp) - return not re:GetHandler():IsImmuneToEffect(e) -end -function c56832966.actcon(e) - return Duel.GetAttacker()==e:GetHandler() or Duel.GetAttackTarget()==e:GetHandler() -end -function c56832966.atkcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetBattleTarget()~=nil and e:GetHandler():GetOverlayGroup():IsExists(Card.IsSetCard,1,nil,0x7f) -end -function c56832966.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:CheckRemoveOverlayCard(tp,2,REASON_COST) and c:GetFlagEffect(56832966)==0 end - c:RemoveOverlayCard(tp,2,2,REASON_COST) - c:RegisterFlagEffect(56832966,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_DAMAGE_CAL,0,1) -end -function c56832966.atkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetReset(RESET_PHASE+RESET_DAMAGE_CAL) - e1:SetValue(5000) - c:RegisterEffect(e1) - end -end diff --git a/script/c56839613.lua b/script/c56839613.lua deleted file mode 100644 index 813bd618c8..0000000000 --- a/script/c56839613.lua +++ /dev/null @@ -1,60 +0,0 @@ ---電池メン-ボタン型 -function c56839613.initial_effect(c) - --flip effect - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(56839613,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP) - e1:SetTarget(c56839613.target) - e1:SetOperation(c56839613.operation) - c:RegisterEffect(e1) - --draw - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetCode(EVENT_FLIP) - e2:SetOperation(c56839613.flipop) - c:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(56839613,1)) - e3:SetCategory(CATEGORY_DRAW) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e3:SetCode(EVENT_BATTLE_DESTROYED) - e3:SetCondition(c56839613.drcon) - e3:SetTarget(c56839613.drtg) - e3:SetOperation(c56839613.drop) - c:RegisterEffect(e3) -end -function c56839613.filter(c,e,tp) - return not c:IsCode(56839613) and c:IsSetCard(0x28) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c56839613.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c56839613.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c56839613.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end -function c56839613.flipop(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():RegisterFlagEffect(56839613,RESET_EVENT+0x17a0000,0,0) -end -function c56839613.drcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsLocation(LOCATION_GRAVE) - and e:GetHandler():IsReason(REASON_BATTLE) - and e:GetHandler():GetFlagEffect(56839613)~=0 -end -function c56839613.drtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chk==0 then return true end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(1) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c56839613.drop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end diff --git a/script/c56840427.lua b/script/c56840427.lua deleted file mode 100644 index 6b3391d420..0000000000 --- a/script/c56840427.lua +++ /dev/null @@ -1,50 +0,0 @@ ---CNo.39 希望皇ホープレイ -function c56840427.initial_effect(c) - --xyz summon - c:EnableReviveLimit() - aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_LIGHT),4,3,c56840427.ovfilter,aux.Stringid(56840427,1)) - --attack up - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetDescription(aux.Stringid(56840427,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c56840427.condition) - e1:SetCost(c56840427.cost) - e1:SetOperation(c56840427.operation) - c:RegisterEffect(e1) -end -c56840427.xyz_number=39 -function c56840427.ovfilter(c) - return c:IsFaceup() and c:IsCode(84013237) -end -function c56840427.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetLP(tp)<=1000 -end -function c56840427.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c56840427.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(500) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - c:RegisterEffect(e1) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - local g=Duel.SelectMatchingCard(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil) - if g:GetCount()>0 then - Duel.HintSelection(g) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(-1000) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - g:GetFirst():RegisterEffect(e2) - end - end -end diff --git a/script/c56840658.lua b/script/c56840658.lua deleted file mode 100644 index 800036ea47..0000000000 --- a/script/c56840658.lua +++ /dev/null @@ -1,29 +0,0 @@ ---引きガエル -function c56840658.initial_effect(c) - --draw - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(56840658,0)) - e2:SetCategory(CATEGORY_DRAW) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetCondition(c56840658.condition) - e2:SetTarget(c56840658.target) - e2:SetOperation(c56840658.operation) - c:RegisterEffect(e2) -end -function c56840658.condition(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousPosition(POS_FACEUP) -end -function c56840658.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(1) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c56840658.operation(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end diff --git a/script/c56856951.lua b/script/c56856951.lua deleted file mode 100644 index 331ba39846..0000000000 --- a/script/c56856951.lua +++ /dev/null @@ -1,71 +0,0 @@ ---メテオ・プロミネンス -function c56856951.initial_effect(c) - --damage - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c56856951.damcon) - e1:SetCost(c56856951.damcost) - e1:SetTarget(c56856951.damtg) - e1:SetOperation(c56856951.damop) - c:RegisterEffect(e1) - --salvage - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(56856951,0)) - e2:SetCategory(CATEGORY_TOHAND) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_PREDRAW) - e2:SetRange(LOCATION_GRAVE) - e2:SetCondition(c56856951.thcon) - e2:SetTarget(c56856951.thtg) - e2:SetOperation(c56856951.thop) - c:RegisterEffect(e2) -end -function c56856951.damcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetLP(1-tp)>3000 -end -function c56856951.damcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,2,nil) end - Duel.DiscardHand(tp,Card.IsAbleToGraveAsCost,2,2,REASON_COST) -end -function c56856951.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(2000) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,2000) -end -function c56856951.damop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end -function c56856951.thcon(e,tp,eg,ep,ev,re,r,rp) - return tp==Duel.GetTurnPlayer() and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0 - and Duel.GetDrawCount(tp)>0 -end -function c56856951.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToHand() end - local dt=Duel.GetDrawCount(tp) - if dt~=0 then - _replace_count=0 - _replace_max=dt - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EFFECT_DRAW_COUNT) - e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_DRAW) - e1:SetValue(0) - Duel.RegisterEffect(e1,tp) - end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0) -end -function c56856951.thop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - _replace_count=_replace_count+1 - if _replace_count<=_replace_max and c:IsRelateToEffect(e) then - Duel.SendtoHand(c,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,c) - end -end diff --git a/script/c56897896.lua b/script/c56897896.lua deleted file mode 100644 index aa9bbfc5f4..0000000000 --- a/script/c56897896.lua +++ /dev/null @@ -1,32 +0,0 @@ ---モノ・シンクロン -function c56897896.initial_effect(c) - --synchro custom - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SYNCHRO_MATERIAL_CUSTOM) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetTarget(c56897896.syntg) - e1:SetValue(1) - e1:SetOperation(c56897896.synop) - c:RegisterEffect(e1) -end -c56897896.tuner_filter=aux.FALSE -function c56897896.synfilter(c,syncard,tuner,f) - return c:IsFaceup() and c:IsNotTuner() and c:IsCanBeSynchroMaterial(syncard,tuner) - and c:IsLevelBelow(4) and c:IsRace(RACE_WARRIOR+RACE_MACHINE) and (f==nil or f(c)) -end -function c56897896.syntg(e,syncard,f,minc,maxc) - local c=e:GetHandler() - local lv=syncard:GetLevel()-c:GetLevel() - if lv<=0 then return false end - local g=Duel.GetMatchingGroup(c56897896.synfilter,syncard:GetControler(),LOCATION_MZONE,LOCATION_MZONE,c,syncard,c,f) - return lv>=minc and lv<=maxc and g:GetCount()>=lv -end -function c56897896.synop(e,tp,eg,ep,ev,re,r,rp,syncard,f,minc,maxc) - local c=e:GetHandler() - local lv=syncard:GetLevel()-c:GetLevel() - local g=Duel.GetMatchingGroup(c56897896.synfilter,syncard:GetControler(),LOCATION_MZONE,LOCATION_MZONE,c,syncard,c,f) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SMATERIAL) - local sg=g:Select(tp,lv,lv,nil) - Duel.SetSynchroMaterial(sg) -end diff --git a/script/c56907389.lua b/script/c56907389.lua deleted file mode 100644 index f76b13ed29..0000000000 --- a/script/c56907389.lua +++ /dev/null @@ -1,6 +0,0 @@ ---音楽家の帝王 -function c56907389.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcCode2(c,78010363,17358176,true,true) -end diff --git a/script/c56910167.lua b/script/c56910167.lua deleted file mode 100644 index b0d4eee9de..0000000000 --- a/script/c56910167.lua +++ /dev/null @@ -1,32 +0,0 @@ ---超弩級砲塔列車グスタフ・マックス -function c56910167.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,10,2) - c:EnableReviveLimit() - --damage - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(56910167,0)) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCost(c56910167.cost) - e1:SetTarget(c56910167.target) - e1:SetOperation(c56910167.operation) - c:RegisterEffect(e1) -end -function c56910167.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c56910167.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(2000) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,2000) -end -function c56910167.operation(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c56916805.lua b/script/c56916805.lua deleted file mode 100644 index c596b90b4a..0000000000 --- a/script/c56916805.lua +++ /dev/null @@ -1,38 +0,0 @@ ---エナジー・ドレイン -function c56916805.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetCondition(c56916805.condition) - e1:SetTarget(c56916805.target) - e1:SetOperation(c56916805.activate) - c:RegisterEffect(e1) -end -function c56916805.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end -function c56916805.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,nil) -end -function c56916805.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - local val=Duel.GetFieldGroupCount(1-tp,LOCATION_HAND,0)*200 - if val~=0 and tc:IsRelateToEffect(e) and tc:IsFaceup() then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - e1:SetValue(val) - tc:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_UPDATE_DEFENCE) - tc:RegisterEffect(e2) - end -end diff --git a/script/c56921677.lua b/script/c56921677.lua deleted file mode 100644 index 8672dcad07..0000000000 --- a/script/c56921677.lua +++ /dev/null @@ -1,31 +0,0 @@ ---紋章獣バシリスク -function c56921677.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(56921677,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_BATTLED) - e1:SetCondition(c56921677.condition) - e1:SetTarget(c56921677.target) - e1:SetOperation(c56921677.operation) - c:RegisterEffect(e1) -end -function c56921677.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetBattleTarget()~=nil -end -function c56921677.filter(c) - return c:IsDestructable() -end -function c56921677.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local tc=e:GetHandler():GetBattleTarget() - Duel.SetTargetCard(tc) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,tc,1,0,0) -end -function c56921677.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c56931015.lua b/script/c56931015.lua deleted file mode 100644 index b4f48b221d..0000000000 --- a/script/c56931015.lua +++ /dev/null @@ -1,55 +0,0 @@ ---グラヴィティ・ベヒモス -function c56931015.initial_effect(c) - --summon with no tribute - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(56931015,0)) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SUMMON_PROC) - e1:SetCondition(c56931015.ntcon) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(56931015,1)) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCost(c56931015.descost) - e2:SetTarget(c56931015.destg) - e2:SetOperation(c56931015.desop) - c:RegisterEffect(e2) -end -function c56931015.ntcon(e,c,minc) - if c==nil then return Duel.GetTurnCount()~=1 end - return minc==0 and c:GetLevel()>4 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 - and Duel.GetFieldGroupCount(c:GetControler(),LOCATION_ONFIELD,LOCATION_ONFIELD)==0 -end -function c56931015.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():GetAttackAnnouncedCount()==0 end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_OATH) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e:GetHandler():RegisterEffect(e1) -end -function c56931015.destg(e,tp,eg,ep,ev,re,r,rp,chk) - local c1=Duel.GetFieldCard(0,LOCATION_SZONE,5) - local c2=Duel.GetFieldCard(1,LOCATION_SZONE,5) - if chk==0 then return (c1 and c1:IsDestructable()) or (c2 and c2:IsDestructable()) end - local g=Group.CreateGroup() - if c1 and c1:IsDestructable() then g:AddCard(c1) end - if c2 and c2:IsDestructable() then g:AddCard(c2) end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c56931015.desop(e,tp,eg,ep,ev,re,r,rp) - local c1=Duel.GetFieldCard(0,LOCATION_SZONE,5) - local c2=Duel.GetFieldCard(1,LOCATION_SZONE,5) - local g=Group.CreateGroup() - if c1 and c1:IsDestructable() then g:AddCard(c1) end - if c2 and c2:IsDestructable() then g:AddCard(c2) end - if g:GetCount()>0 then - Duel.Destroy(g,REASON_EFFECT) - end -end diff --git a/script/c56948373.lua b/script/c56948373.lua deleted file mode 100644 index 9f06b540c9..0000000000 --- a/script/c56948373.lua +++ /dev/null @@ -1,64 +0,0 @@ ---呪魂の仮面 -function c56948373.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c56948373.target) - e1:SetOperation(c56948373.operation) - c:RegisterEffect(e1) - --Atk,def - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_CANNOT_ATTACK) - c:RegisterEffect(e2) - --Equip limit - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_EQUIP_LIMIT) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e3:SetValue(1) - c:RegisterEffect(e3) - --damage - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(56948373,0)) - e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e4:SetCode(EVENT_PHASE+PHASE_STANDBY) - e4:SetRange(LOCATION_SZONE) - e4:SetCountLimit(1) - e4:SetCondition(c56948373.damcon) - e4:SetTarget(c56948373.damtg) - e4:SetOperation(c56948373.damop) - c:RegisterEffect(e4) -end -function c56948373.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c56948373.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,e:GetHandler(),tc) - end -end -function c56948373.damcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp and e:GetHandler():GetEquipTarget()~=nil -end -function c56948373.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local p=e:GetHandler():GetEquipTarget():GetControler() - Duel.SetTargetPlayer(p) - Duel.SetTargetParam(500) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,p,500) -end -function c56948373.damop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c56981417.lua b/script/c56981417.lua deleted file mode 100644 index a3b49af1ba..0000000000 --- a/script/c56981417.lua +++ /dev/null @@ -1,71 +0,0 @@ ---セフェルの魔導書 -function c56981417.initial_effect(c) - --copy spell - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,56981417+EFFECT_COUNT_CODE_OATH) - e1:SetCondition(c56981417.condition) - e1:SetCost(c56981417.cost) - e1:SetTarget(c56981417.target) - e1:SetOperation(c56981417.operation) - c:RegisterEffect(e1) -end -function c56981417.cfilter(c) - return c:IsFaceup() and c:IsRace(RACE_SPELLCASTER) -end -function c56981417.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c56981417.cfilter,tp,LOCATION_MZONE,0,1,nil) -end -function c56981417.cffilter(c) - return c:IsSetCard(0x106e) and not c:IsPublic() -end -function c56981417.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c56981417.cffilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) - local g=Duel.SelectMatchingCard(tp,c56981417.cffilter,tp,LOCATION_HAND,0,1,1,e:GetHandler()) - Duel.ConfirmCards(1-tp,g) - Duel.ShuffleHand(tp) -end -function c56981417.filter(c) - return c:IsSetCard(0x106e) and c:GetCode()~=56981417 and c:GetType()==TYPE_SPELL and c:CheckActivateEffect(true,true,false)~=nil -end -function c56981417.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then - local te=e:GetLabelObject() - local tg=te:GetTarget() - return tg and tg(te,tp,eg,ep,ev,re,r,rp,0,chkc) - end - if chk==0 then return Duel.IsExistingTarget(c56981417.filter,tp,LOCATION_GRAVE,0,1,nil) end - e:SetProperty(EFFECT_FLAG_CARD_TARGET) - e:SetCategory(0) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - local g=Duel.SelectTarget(tp,c56981417.filter,tp,LOCATION_GRAVE,0,1,1,nil) - local te=g:GetFirst():CheckActivateEffect(true,true,false) - e:SetLabelObject(te) - Duel.ClearTargetCard() - g:GetFirst():CreateEffectRelation(e) - local tg=te:GetTarget() - e:SetCategory(te:GetCategory()) - e:SetProperty(te:GetProperty()) - if tg then tg(te,tp,eg,ep,ev,re,r,rp,1) end - local cg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local tc=cg:GetFirst() - while tc do - tc:CreateEffectRelation(te) - tc=cg:GetNext() - end -end -function c56981417.operation(e,tp,eg,ep,ev,re,r,rp) - local te=e:GetLabelObject() - if te:GetHandler():IsRelateToEffect(e) then - local op=te:GetOperation() - if op then op(te,tp,eg,ep,ev,re,r,rp) end - local cg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local tc=cg:GetFirst() - while tc do - tc:ReleaseEffectRelation(te) - tc=cg:GetNext() - end - end -end diff --git a/script/c56993276.lua b/script/c56993276.lua deleted file mode 100644 index 8c8e05570f..0000000000 --- a/script/c56993276.lua +++ /dev/null @@ -1,37 +0,0 @@ ---エレキャンセル -function c56993276.initial_effect(c) - --Activate(summon) - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DISABLE_SUMMON+CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_SUMMON) - e1:SetCondition(c56993276.condition) - e1:SetCost(c56993276.cost) - e1:SetTarget(c56993276.target) - e1:SetOperation(c56993276.activate) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_SPSUMMON) - c:RegisterEffect(e2) -end -function c56993276.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentChain()==0 and eg:IsExists(Card.IsControler,1,nil,1-tp) -end -function c56993276.cfilter(c) - return c:IsSetCard(0xe) and c:IsType(TYPE_MONSTER) and c:IsDiscardable() -end -function c56993276.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c56993276.cfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,c56993276.cfilter,1,1,REASON_COST+REASON_DISCARD,nil) -end -function c56993276.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local g=eg:Filter(Card.IsControler,nil,1-tp) - Duel.SetOperationInfo(0,CATEGORY_DISABLE_SUMMON,g,g:GetCount(),0,0) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c56993276.activate(e,tp,eg,ep,ev,re,r,rp) - local g=eg:Filter(Card.IsControler,nil,1-tp) - Duel.NegateSummon(g) - Duel.Destroy(g,REASON_EFFECT) -end diff --git a/script/c56995655.lua b/script/c56995655.lua deleted file mode 100644 index a8807bf8a1..0000000000 --- a/script/c56995655.lua +++ /dev/null @@ -1,37 +0,0 @@ ---不吉な占い -function c56995655.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_END_PHASE) - c:RegisterEffect(e1) - --call & damage - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(56995655,0)) - e2:SetCategory(CATEGORY_DAMAGE) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetRange(LOCATION_SZONE) - e2:SetCountLimit(1) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) - e2:SetCondition(c56995655.con) - e2:SetOperation(c56995655.op) - c:RegisterEffect(e2) -end -function c56995655.con(e,tp,eg,ep,ev,re,r,rp) - return tp==Duel.GetTurnPlayer() -end -function c56995655.op(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) then return end - local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND):RandomSelect(tp,1,nil) - local tc=g:GetFirst() - if not tc then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CARDTYPE) - local op=Duel.SelectOption(tp,70,71,72) - Duel.ConfirmCards(tp,tc) - Duel.ShuffleHand(1-tp) - if (op==0 and tc:IsType(TYPE_MONSTER)) or (op==1 and tc:IsType(TYPE_SPELL)) or (op==2 and tc:IsType(TYPE_TRAP)) then - Duel.Damage(1-tp,700,REASON_EFFECT) - end -end diff --git a/script/c57006589.lua b/script/c57006589.lua deleted file mode 100644 index e905e4e7da..0000000000 --- a/script/c57006589.lua +++ /dev/null @@ -1,31 +0,0 @@ ---エネルギー吸収板 -function c57006589.initial_effect(c) - --reflect - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_CHAINING) - e1:SetCondition(c57006589.condition) - e1:SetOperation(c57006589.operation) - c:RegisterEffect(e1) -end -function c57006589.condition(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp and aux.damcon1(e,tp,eg,ep,ev,re,r,rp) -end -function c57006589.operation(e,tp,eg,ep,ev,re,r,rp) - local cid=Duel.GetChainInfo(ev,CHAININFO_CHAIN_ID) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_REVERSE_DAMAGE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetTargetRange(1,0) - e1:SetLabel(cid) - e1:SetValue(c57006589.refcon) - e1:SetReset(RESET_CHAIN) - Duel.RegisterEffect(e1,tp) -end -function c57006589.refcon(e,re,r,rp,rc) - local cc=Duel.GetCurrentChain() - if cc==0 or bit.band(r,REASON_EFFECT)==0 then return end - local cid=Duel.GetChainInfo(0,CHAININFO_CHAIN_ID) - return cid==e:GetLabel() -end diff --git a/script/c57019473.lua b/script/c57019473.lua deleted file mode 100644 index d5f22b6fdf..0000000000 --- a/script/c57019473.lua +++ /dev/null @@ -1,41 +0,0 @@ ---ONeサンダー -function c57019473.initial_effect(c) - --remove - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(57019473,0)) - e1:SetCategory(CATEGORY_REMOVE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c57019473.rmtg) - e1:SetOperation(c57019473.rmop) - c:RegisterEffect(e1) -end -function c57019473.filter(c) - return c:IsRace(RACE_THUNDER) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:GetLevel()==4 - and c:GetCode()~=57019473 and c:IsAttackBelow(1600) and c:IsAbleToRemove() -end -function c57019473.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c57019473.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c57019473.filter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,c57019473.filter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,HINTMSG_REMOVE,g,1,0,0) -end -function c57019473.rmop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)>0 then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetRange(LOCATION_REMOVED) - e1:SetCountLimit(1) - e1:SetOperation(c57019473.thop) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - end -end -function c57019473.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,e:GetHandler()) -end diff --git a/script/c57036718.lua b/script/c57036718.lua deleted file mode 100644 index 7a09f1d808..0000000000 --- a/script/c57036718.lua +++ /dev/null @@ -1,54 +0,0 @@ ---ズバババスター -function c57036718.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_BATTLE_DAMAGE) - e1:SetOperation(c57036718.damop) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(57036718,0)) - e2:SetCategory(CATEGORY_DESTROY+CATEGORY_ATKCHANGE) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_DAMAGE_STEP_END) - e2:SetCondition(c57036718.descon) - e2:SetTarget(c57036718.destg) - e2:SetOperation(c57036718.desop) - c:RegisterEffect(e2) -end -function c57036718.damop(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():RegisterFlagEffect(57036718,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_DAMAGE,0,1) -end -function c57036718.descon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetFlagEffect(57036718)~=0 -end -function c57036718.filter(c) - return c:IsFaceup() and c:IsDestructable() -end -function c57036718.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local g=Duel.GetMatchingGroup(c57036718.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - if g:GetCount()==0 then return end - local tg=g:GetMinGroup(Card.GetAttack) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,tg,1,0,0) -end -function c57036718.desop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c57036718.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - if g:GetCount()>0 then - local tg=g:GetMinGroup(Card.GetAttack) - if tg:GetCount()>1 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local sg=tg:Select(tp,1,1,nil) - Duel.Destroy(sg,REASON_EFFECT) - else Duel.Destroy(tg,REASON_EFFECT) end - end - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(-800) - e1:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e1) - end -end diff --git a/script/c5703682.lua b/script/c5703682.lua deleted file mode 100644 index d9e0bd3204..0000000000 --- a/script/c5703682.lua +++ /dev/null @@ -1,55 +0,0 @@ ---サウザンドエナジー -function c5703682.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c5703682.target) - e1:SetOperation(c5703682.activate) - c:RegisterEffect(e1) -end -function c5703682.filter(c) - local tpe=c:GetType() - return c:IsFaceup() and bit.band(tpe,TYPE_NORMAL)~=0 and bit.band(tpe,TYPE_TOKEN)==0 and c:GetLevel()==2 -end -function c5703682.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c5703682.filter,tp,LOCATION_MZONE,0,1,nil) end -end -function c5703682.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c5703682.filter,tp,LOCATION_MZONE,0,nil) - local tc=g:GetFirst() - while tc do - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_BASE_ATTACK) - e1:SetValue(tc:GetBaseAttack()+1000) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_SET_BASE_DEFENCE) - e2:SetValue(tc:GetBaseDefence()+1000) - e2:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e2) - tc=g:GetNext() - end - local de=Effect.CreateEffect(e:GetHandler()) - de:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - de:SetCode(EVENT_PHASE+PHASE_END) - de:SetCountLimit(1) - de:SetCondition(c5703682.descon) - de:SetOperation(c5703682.desop) - de:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(de,tp) -end -function c5703682.dfilter(c) - return c:IsFaceup() and c:IsType(TYPE_NORMAL) and c:GetLevel()==2 -end -function c5703682.descon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c5703682.dfilter,tp,LOCATION_MZONE,0,1,nil) -end -function c5703682.desop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c5703682.dfilter,tp,LOCATION_MZONE,0,nil) - Duel.Destroy(g,REASON_EFFECT) -end diff --git a/script/c57043117.lua b/script/c57043117.lua deleted file mode 100644 index f590d6c354..0000000000 --- a/script/c57043117.lua +++ /dev/null @@ -1,62 +0,0 @@ ---鋼鉄の巨兵 -function c57043117.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsRace,RACE_ROCK),3,2) - c:EnableReviveLimit() - --immune - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_IMMUNE_EFFECT) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetValue(c57043117.efilter) - c:RegisterEffect(e1) - --def - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_DEFCHANGE) - e2:SetDescription(aux.Stringid(57043117,0)) - e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetCountLimit(1) - e2:SetHintTiming(TIMING_DAMAGE_STEP) - e2:SetCost(c57043117.cost) - e2:SetOperation(c57043117.operation) - c:RegisterEffect(e2) -end -function c57043117.efilter(e,te) - return te:IsActiveType(TYPE_MONSTER) and te:GetOwner()~=e:GetOwner() -end -function c57043117.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c57043117.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_COPY_INHERIT) - e1:SetCode(EFFECT_UPDATE_DEFENCE) - e1:SetValue(1000) - e1:SetReset(RESET_EVENT+0x1ff0000+RESET_PHASE+PHASE_END) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_CHANGE_DAMAGE) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetTargetRange(1,0) - e2:SetValue(c57043117.damval) - e2:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e2,tp) - local e3=e2:Clone() - e3:SetCode(EFFECT_NO_EFFECT_DAMAGE) - e3:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e3,tp) - end -end -function c57043117.damval(e,re,val,r,rp,rc) - if bit.band(r,REASON_EFFECT)~=0 and rp~=e:GetOwnerPlayer() then return 0 - else return val end -end diff --git a/script/c57046845.lua b/script/c57046845.lua deleted file mode 100644 index 5ed28cba6c..0000000000 --- a/script/c57046845.lua +++ /dev/null @@ -1,33 +0,0 @@ ---剣聖-ネイキッド・ギア・フリード -function c57046845.initial_effect(c) - c:EnableReviveLimit() - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(57046845,0)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_EQUIP) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetTarget(c57046845.destg) - e2:SetOperation(c57046845.desop) - c:RegisterEffect(e2) -end -function c57046845.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsDestructable() end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c57046845.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c57047293.lua b/script/c57047293.lua deleted file mode 100644 index 9bc0d35441..0000000000 --- a/script/c57047293.lua +++ /dev/null @@ -1,38 +0,0 @@ ---蒼焔の煉獄 -function c57047293.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c57047293.target) - e1:SetOperation(c57047293.activate) - c:RegisterEffect(e1) -end -function c57047293.filter(c,e,tp) - return c:IsSetCard(0xbb) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) -end -function c57047293.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c57047293.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c57047293.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c57047293.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - local tc=g:GetFirst() - if tc and Duel.SpecialSummonStep(tc,0,tp,tp,true,false,POS_FACEUP) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1,true) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e2,true) - Duel.SpecialSummonComplete() - end -end diff --git a/script/c57062206.lua b/script/c57062206.lua deleted file mode 100644 index f2125903ca..0000000000 --- a/script/c57062206.lua +++ /dev/null @@ -1,89 +0,0 @@ ---ドイツ -function c57062206.initial_effect(c) - --equip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(57062206,0)) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetTarget(c57062206.eqtg) - e1:SetOperation(c57062206.eqop) - c:RegisterEffect(e1) - --unequip - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(57062206,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_SZONE) - e2:SetCondition(c57062206.uncon) - e2:SetTarget(c57062206.sptg) - e2:SetOperation(c57062206.spop) - c:RegisterEffect(e2) - --atk up - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_EQUIP) - e3:SetCode(EFFECT_UPDATE_ATTACK) - e3:SetValue(2500) - e3:SetCondition(c57062206.uncon) - c:RegisterEffect(e3) - --destroy sub - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_EQUIP) - e5:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e5:SetCode(EFFECT_DESTROY_SUBSTITUTE) - e5:SetCondition(c57062206.uncon) - e5:SetValue(c57062206.repval) - c:RegisterEffect(e5) - --eqlimit - local e6=Effect.CreateEffect(c) - e6:SetType(EFFECT_TYPE_SINGLE) - e6:SetCode(EFFECT_EQUIP_LIMIT) - e6:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e6:SetValue(c57062206.eqlimit) - c:RegisterEffect(e6) -end -function c57062206.uncon(e) - return e:GetHandler():IsStatus(STATUS_UNION) -end -function c57062206.repval(e,re,r,rp) - return bit.band(r,REASON_BATTLE)~=0 -end -function c57062206.eqlimit(e,c) - return c:IsCode(60246171) -end -function c57062206.filter(c) - return c:IsFaceup() and c:IsCode(60246171) and c:GetUnionCount()==0 -end -function c57062206.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c57062206.filter(chkc) end - if chk==0 then return e:GetHandler():GetFlagEffect(57062206)==0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingTarget(c57062206.filter,tp,LOCATION_MZONE,0,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local g=Duel.SelectTarget(tp,c57062206.filter,tp,LOCATION_MZONE,0,1,1,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0) - e:GetHandler():RegisterFlagEffect(57062206,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1) -end -function c57062206.eqop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if not c:IsRelateToEffect(e) or c:IsFacedown() then return end - if not tc:IsRelateToEffect(e) or not c57062206.filter(tc) then - Duel.SendtoGrave(c,REASON_EFFECT) - return - end - if not Duel.Equip(tp,c,tc,false) then return end - c:SetStatus(STATUS_UNION,true) -end -function c57062206.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():GetFlagEffect(57062206)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) - e:GetHandler():RegisterFlagEffect(57062206,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1) -end -function c57062206.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP_ATTACK) - end -end diff --git a/script/c57069605.lua b/script/c57069605.lua deleted file mode 100644 index 01fd11ea1f..0000000000 --- a/script/c57069605.lua +++ /dev/null @@ -1,32 +0,0 @@ ---魂の氷結 -function c57069605.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_MAIN_END+TIMING_DRAW_PHASE) - e1:SetCondition(c57069605.condition) - e1:SetOperation(c57069605.activate) - c:RegisterEffect(e1) -end -function c57069605.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetLP(tp)+2000<=Duel.GetLP(1-tp) -end -function c57069605.activate(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SKIP_BP) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetTargetRange(0,1) - if Duel.GetTurnPlayer()~=tp and Duel.GetCurrentPhase()==PHASE_BATTLE then - e1:SetLabel(Duel.GetTurnCount()) - e1:SetCondition(c57069605.skipcon) - e1:SetReset(RESET_PHASE+PHASE_BATTLE+RESET_OPPO_TURN,2) - else - e1:SetReset(RESET_PHASE+PHASE_BATTLE+RESET_OPPO_TURN,1) - end - Duel.RegisterEffect(e1,tp) -end -function c57069605.skipcon(e) - return Duel.GetTurnCount()~=e:GetLabel() -end diff --git a/script/c57103969.lua b/script/c57103969.lua deleted file mode 100644 index 1035b5de2c..0000000000 --- a/script/c57103969.lua +++ /dev/null @@ -1,32 +0,0 @@ ---炎舞-「天璣」 -function c57103969.initial_effect(c) - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,57103969+EFFECT_COUNT_CODE_OATH) - e1:SetOperation(c57103969.activate) - c:RegisterEffect(e1) - -- - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(LOCATION_MZONE,0) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetTarget(aux.TargetBoolFunction(Card.IsRace,RACE_BEASTWARRIOR)) - e2:SetValue(100) - c:RegisterEffect(e2) -end -function c57103969.filter(c) - return c:IsLevelBelow(4) and c:IsRace(RACE_BEASTWARRIOR) and c:IsAbleToHand() -end -function c57103969.activate(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local g=Duel.GetMatchingGroup(c57103969.filter,tp,LOCATION_DECK,0,nil) - if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(57103969,0)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local sg=g:Select(tp,1,1,nil) - Duel.SendtoHand(sg,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,sg) - end -end diff --git a/script/c57108202.lua b/script/c57108202.lua deleted file mode 100644 index 4a2eaec21a..0000000000 --- a/script/c57108202.lua +++ /dev/null @@ -1,83 +0,0 @@ ---D・リモコン -function c57108202.initial_effect(c) - --search - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(57108202,0)) - e1:SetCategory(CATEGORY_REMOVE+CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c57108202.cona) - e1:SetTarget(c57108202.tga) - e1:SetOperation(c57108202.opa) - c:RegisterEffect(e1) - --salvage - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(57108202,1)) - e2:SetCategory(CATEGORY_TOGRAVE+CATEGORY_TOHAND) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetCountLimit(1) - e2:SetRange(LOCATION_MZONE) - e2:SetCondition(c57108202.cond) - e2:SetTarget(c57108202.tgd) - e2:SetOperation(c57108202.opd) - c:RegisterEffect(e2) -end -function c57108202.filter(c,lv) - return c:IsSetCard(0x26) and c:GetLevel()==lv and c:IsAbleToHand() -end -function c57108202.cona(e,tp,eg,ep,ev,re,r,rp) - return not e:GetHandler():IsDisabled() and e:GetHandler():IsAttackPos() -end -function c57108202.filtera(c,tp) - local lv=c:GetLevel() - return c:IsSetCard(0x26) and lv>0 and c:IsAbleToRemove() - and Duel.IsExistingMatchingCard(c57108202.filter,tp,LOCATION_DECK,0,1,nil,lv) -end -function c57108202.tga(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c57108202.filtera(chkc,tp) end - if chk==0 then return Duel.IsExistingTarget(c57108202.filtera,tp,LOCATION_GRAVE,0,1,nil,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,c57108202.filtera,tp,LOCATION_GRAVE,0,1,1,nil,tp) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c57108202.opa(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)~=0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c57108202.filter,tp,LOCATION_DECK,0,1,1,nil,tc:GetLevel()) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end - end -end -function c57108202.cond(e,tp,eg,ep,ev,re,r,rp) - return not e:GetHandler():IsDisabled() and e:GetHandler():IsDefencePos() -end -function c57108202.filterd(c,tp) - local lv=c:GetLevel() - return c:IsSetCard(0x26) and lv>0 and c:IsAbleToGrave() - and Duel.IsExistingMatchingCard(c57108202.filter,tp,LOCATION_GRAVE,0,1,nil,lv) -end -function c57108202.tgd(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c57108202.filterd,tp,LOCATION_HAND,0,1,nil,tp) end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_HAND) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE) -end -function c57108202.opd(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c57108202.filterd,tp,LOCATION_HAND,0,1,1,nil,tp) - local tc=g:GetFirst() - if not tc then return end - Duel.SendtoGrave(tc,REASON_EFFECT) - if not tc:IsLocation(LOCATION_GRAVE) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local sg=Duel.SelectMatchingCard(tp,c57108202.filter,tp,LOCATION_GRAVE,0,1,1,tc,tc:GetLevel()) - if sg:GetCount()>0 then - Duel.SendtoHand(sg,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,sg) - end -end diff --git a/script/c57115864.lua b/script/c57115864.lua deleted file mode 100644 index 8364032469..0000000000 --- a/script/c57115864.lua +++ /dev/null @@ -1,42 +0,0 @@ ---光子化 -function c57115864.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetCondition(c57115864.condition) - e1:SetTarget(c57115864.target) - e1:SetOperation(c57115864.activate) - c:RegisterEffect(e1) -end -function c57115864.condition(e,tp,eg,ep,ev,re,r,rp) - return tp~=Duel.GetTurnPlayer() -end -function c57115864.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local tg=Duel.GetAttacker() - if chkc then return chkc==tg end - if chk==0 then return tg:IsOnField() and tg:IsCanBeEffectTarget(e) - and Duel.IsExistingMatchingCard(c57115864.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.SetTargetCard(tg) -end -function c57115864.filter(c) - return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_LIGHT) -end -function c57115864.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateAttack() - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - local g=Duel.SelectMatchingCard(tp,c57115864.filter,tp,LOCATION_MZONE,0,1,1,nil) - local ac=g:GetFirst() - if ac then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(tc:GetAttack()) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,2) - ac:RegisterEffect(e1) - end - end -end diff --git a/script/c57116033.lua b/script/c57116033.lua deleted file mode 100644 index 6c1f4a948e..0000000000 --- a/script/c57116033.lua +++ /dev/null @@ -1,24 +0,0 @@ ---ハネクリボー -function c57116033.initial_effect(c) - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(57116033,0)) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCondition(c57116033.con) - e1:SetOperation(c57116033.op) - c:RegisterEffect(e1) -end -function c57116033.con(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsReason(REASON_DESTROY) -end -function c57116033.op(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_AVOID_BATTLE_DAMAGE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetTargetRange(1,0) - e1:SetValue(1) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) -end diff --git a/script/c57139487.lua b/script/c57139487.lua deleted file mode 100644 index 757a4928c5..0000000000 --- a/script/c57139487.lua +++ /dev/null @@ -1,50 +0,0 @@ ---連鎖除外 -function c57139487.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_REMOVE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c57139487.target) - e1:SetOperation(c57139487.activate) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - c:RegisterEffect(e2) - local e3=e1:Clone() - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e3) -end -function c57139487.filter(c) - return c:IsFaceup() and c:GetAttack()<=1000 and c:IsAbleToRemove() -end -function c57139487.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chk==0 then return eg:IsExists(c57139487.filter,1,nil) end - local g=eg:Filter(c57139487.filter,nil) - Duel.SetTargetCard(g) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,0) -end -function c57139487.efilter(c,e) - return c:IsFaceup() and c:IsAttackBelow(1000) and c:IsRelateToEffect(e) -end -function c57139487.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local sg=g:Filter(c57139487.efilter,nil,e) - Duel.Remove(sg,POS_FACEUP,REASON_EFFECT) - local rg=Group.CreateGroup() - local tc=sg:GetFirst() - while tc do - if tc:IsLocation(LOCATION_REMOVED) then - local tpe=tc:GetType() - if bit.band(tpe,TYPE_TOKEN)==0 then - local g1=Duel.GetMatchingGroup(Card.IsCode,tp,0,LOCATION_DECK+LOCATION_HAND,nil,tc:GetCode()) - rg:Merge(g1) - end - end - tc=sg:GetNext() - end - if rg:GetCount()>0 then - Duel.BreakEffect() - Duel.Remove(rg,POS_FACEUP,REASON_EFFECT) - end -end diff --git a/script/c57143342.lua b/script/c57143342.lua deleted file mode 100644 index dfd94efde2..0000000000 --- a/script/c57143342.lua +++ /dev/null @@ -1,72 +0,0 @@ ---彼岸の悪鬼 ガトルホッグ -function c57143342.initial_effect(c) - --self destroy - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_SELF_DESTROY) - e1:SetCondition(c57143342.sdcon) - c:RegisterEffect(e1) - --Special Summon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(57143342,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_HAND) - e2:SetCountLimit(1,57143342) - e2:SetCondition(c57143342.sscon) - e2:SetTarget(c57143342.sstg) - e2:SetOperation(c57143342.ssop) - c:RegisterEffect(e2) - --spsummon - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(57143342,1)) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e3:SetCode(EVENT_TO_GRAVE) - e3:SetCountLimit(1,57143342) - e3:SetTarget(c57143342.sptg) - e3:SetOperation(c57143342.spop) - c:RegisterEffect(e3) -end -function c57143342.sdfilter(c) - return not c:IsFaceup() or not c:IsSetCard(0xb1) -end -function c57143342.sdcon(e) - return Duel.IsExistingMatchingCard(c57143342.sdfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) -end -function c57143342.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) -end -function c57143342.sscon(e,tp,eg,ep,ev,re,r,rp) - return not Duel.IsExistingMatchingCard(c57143342.filter,tp,LOCATION_ONFIELD,0,1,nil) -end -function c57143342.sstg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c57143342.ssop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP) - end -end -function c57143342.spfilter(c,e,tp) - return c:IsSetCard(0xb1) and not c:IsCode(57143342) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c57143342.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c57143342.spfilter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c57143342.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c57143342.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c57143342.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c57182235.lua b/script/c57182235.lua deleted file mode 100644 index 4bd9bf3c5b..0000000000 --- a/script/c57182235.lua +++ /dev/null @@ -1,22 +0,0 @@ ---トークン収穫祭 -function c57182235.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_RECOVER) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c57182235.target) - e1:SetOperation(c57182235.activate) - c:RegisterEffect(e1) -end -function c57182235.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,TYPE_TOKEN) end - local g=Duel.GetMatchingGroup(Card.IsType,tp,LOCATION_MZONE,LOCATION_MZONE,nil,TYPE_TOKEN) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) - Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,g:GetCount()*800) -end -function c57182235.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsType,tp,LOCATION_MZONE,LOCATION_MZONE,nil,TYPE_TOKEN) - local ct=Duel.Destroy(g,REASON_EFFECT) - Duel.Recover(tp,ct*800,REASON_EFFECT) -end diff --git a/script/c57201737.lua b/script/c57201737.lua deleted file mode 100644 index 83824c517c..0000000000 --- a/script/c57201737.lua +++ /dev/null @@ -1,44 +0,0 @@ ---ガオドレイクのタテガミ -function c57201737.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DISABLE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c57201737.target) - e1:SetOperation(c57201737.activate) - c:RegisterEffect(e1) -end -function c57201737.filter(c) - return c:IsFaceup() and c:IsSetCard(0x2a) -end -function c57201737.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c57201737.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c57201737.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - local g=Duel.SelectTarget(tp,c57201737.filter,tp,LOCATION_MZONE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0) -end -function c57201737.activate(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - e1:SetValue(3000) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - tc:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_DISABLE_EFFECT) - e3:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - tc:RegisterEffect(e3) - end -end diff --git a/script/c57238939.lua b/script/c57238939.lua deleted file mode 100644 index dbb97d24f5..0000000000 --- a/script/c57238939.lua +++ /dev/null @@ -1,34 +0,0 @@ ---A・ジェネクス・リモート -function c57238939.initial_effect(c) - --cos - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(57238939,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetTarget(c57238939.costg) - e1:SetOperation(c57238939.cosop) - c:RegisterEffect(e1) -end -function c57238939.filter(c) - return c:IsFaceup() and c:IsType(TYPE_TUNER) -end -function c57238939.costg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c57238939.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c57238939.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c57238939.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) -end -function c57238939.cosop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CHANGE_CODE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetValue(68505803) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - end -end diff --git a/script/c57270476.lua b/script/c57270476.lua deleted file mode 100644 index 1caedbd274..0000000000 --- a/script/c57270476.lua +++ /dev/null @@ -1,36 +0,0 @@ ---墓場からの誘い -function c57270476.initial_effect(c) - Duel.EnableGlobalFlag(GLOBALFLAG_DECK_REVERSE_CHECK) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c57270476.target) - e1:SetOperation(c57270476.activate) - c:RegisterEffect(e1) -end -function c57270476.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)>0 end -end -function c57270476.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.ConfirmDecktop(1-tp,1) - local g=Duel.GetDecktopGroup(1-tp,1) - if g:GetCount()>0 then - local tc=g:GetFirst() - Duel.ShuffleDeck(1-tp) - tc:ReverseInDeck() - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_TO_HAND) - e1:SetOperation(c57270476.tgop) - e1:SetReset(RESET_EVENT+0x1de0000) - tc:RegisterEffect(e1) - end -end -function c57270476.tgop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsReason(REASON_DRAW) then - Duel.SendtoGrave(e:GetHandler(),REASON_EFFECT) - end -end diff --git a/script/c57272170.lua b/script/c57272170.lua deleted file mode 100644 index 05d74332b1..0000000000 --- a/script/c57272170.lua +++ /dev/null @@ -1,39 +0,0 @@ ---イビリチュア・ソウルオーガ -function c57272170.initial_effect(c) - c:EnableReviveLimit() - --return to deck - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(57272170,0)) - e1:SetCategory(CATEGORY_TODECK) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCost(c57272170.cost) - e1:SetTarget(c57272170.target) - e1:SetOperation(c57272170.operation) - c:RegisterEffect(e1) -end -function c57272170.costfilter(c) - return c:IsSetCard(0x3a) and c:IsType(TYPE_MONSTER) and c:IsDiscardable() -end -function c57272170.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c57272170.costfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,c57272170.costfilter,1,1,REASON_COST+REASON_DISCARD) -end -function c57272170.filter(c) - return c:IsFaceup() and c:IsAbleToDeck() -end -function c57272170.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsControler(tp) and c57272170.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c57272170.filter,tp,0,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectTarget(tp,c57272170.filter,tp,0,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0) -end -function c57272170.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoDeck(tc,nil,2,REASON_EFFECT) - end -end diff --git a/script/c57274196.lua b/script/c57274196.lua deleted file mode 100644 index 9e8b212b23..0000000000 --- a/script/c57274196.lua +++ /dev/null @@ -1,36 +0,0 @@ ---未来王の予言 -function c57274196.initial_effect(c) - --chain attack - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_BATTLE_DESTROYING) - e1:SetCondition(c57274196.condition) - e1:SetCost(c57274196.cost) - e1:SetOperation(c57274196.operation) - c:RegisterEffect(e1) -end -function c57274196.condition(e,tp,eg,ep,ev,re,r,rp) - local tc=eg:GetFirst() - return tc:IsControler(tp) and tc:IsRace(RACE_SPELLCASTER) and tc:IsChainAttackable() and tc:IsStatus(STATUS_OPPO_BATTLE) -end -function c57274196.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_SUMMON)==0 - and Duel.GetActivityCount(tp,ACTIVITY_FLIPSUMMON)==0 and Duel.GetActivityCount(tp,ACTIVITY_SPSUMMON)==0 end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) - e1:SetTargetRange(1,0) - e1:SetLabelObject(e) - Duel.RegisterEffect(e1,tp) - local e2=e1:Clone() - e2:SetCode(EFFECT_CANNOT_SUMMON) - Duel.RegisterEffect(e2,tp) - local e3=e1:Clone() - e3:SetCode(EFFECT_CANNOT_FLIP_SUMMON) - Duel.RegisterEffect(e3,tp) -end -function c57274196.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.ChainAttack() -end diff --git a/script/c5728014.lua b/script/c5728014.lua deleted file mode 100644 index 9064140083..0000000000 --- a/script/c5728014.lua +++ /dev/null @@ -1,38 +0,0 @@ ---ライバル登場! -function c5728014.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c5728014.target) - e1:SetOperation(c5728014.activate) - c:RegisterEffect(e1) -end -function c5728014.filter(c,e,tp) - local lv=c:GetLevel() - return c:IsFaceup() and lv>0 and Duel.IsExistingMatchingCard(c5728014.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp,lv) -end -function c5728014.spfilter(c,e,tp,lv) - return c:GetLevel()==lv and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c5728014.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c5728014.filter,tp,0,LOCATION_MZONE,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPPO) - Duel.SelectTarget(tp,c5728014.filter,tp,0,LOCATION_MZONE,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c5728014.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c5728014.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp,tc:GetLevel()) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end - end -end diff --git a/script/c57281778.lua b/script/c57281778.lua deleted file mode 100644 index 71f0d8f7ba..0000000000 --- a/script/c57281778.lua +++ /dev/null @@ -1,29 +0,0 @@ ---龍骨鬼 -function c57281778.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(57281778,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_DAMAGE_STEP_END) - e1:SetCondition(c57281778.descon) - e1:SetTarget(c57281778.destg) - e1:SetOperation(c57281778.desop) - c:RegisterEffect(e1) -end -function c57281778.descon(e,tp,eg,ep,ev,re,r,rp) - local t=Duel.GetAttackTarget() - if ev==1 then t=Duel.GetAttacker() end - e:SetLabelObject(t) - return t and t:IsRace(RACE_SPELLCASTER+RACE_WARRIOR) and t:IsRelateToBattle() -end -function c57281778.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetLabelObject():IsDestructable() end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetLabelObject(),1,0,0) -end -function c57281778.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetLabelObject() - if tc:IsRelateToBattle() then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c57319935.lua b/script/c57319935.lua deleted file mode 100644 index eb02abcabf..0000000000 --- a/script/c57319935.lua +++ /dev/null @@ -1,72 +0,0 @@ ---エクシーズ熱戦!! -function c57319935.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetCondition(c57319935.condition) - e1:SetCost(c57319935.cost) - e1:SetTarget(c57319935.target) - e1:SetOperation(c57319935.activate) - c:RegisterEffect(e1) -end -function c57319935.cfilter(c,tp) - return c:IsType(TYPE_XYZ) and c:GetPreviousControler()==tp -end -function c57319935.condition(e,tp,eg,ep,ev,re,r,rp) - local tc=eg:GetFirst() - if c57319935.cfilter(tc,tp) then - e:SetLabel(tc:GetRank()) - return true - end - tc=eg:GetNext() - if tc and c57319935.cfilter(tc,tp) then - e:SetLabel(tc:GetRank()) - return true - end - return false -end -function c57319935.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,1000) end - Duel.PayLPCost(tp,1000) -end -function c57319935.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsRankBelow,tp,LOCATION_EXTRA,0,1,nil,e:GetLabel()) end -end -function c57319935.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(57319935,0)) - local tc1=Duel.SelectMatchingCard(tp,Card.IsRankBelow,tp,LOCATION_EXTRA,0,1,1,nil,e:GetLabel()):GetFirst() - Duel.Hint(HINT_SELECTMSG,1-tp,aux.Stringid(57319935,0)) - local tc2=Duel.SelectMatchingCard(1-tp,Card.IsRankBelow,1-tp,LOCATION_EXTRA,0,1,1,nil,e:GetLabel()):GetFirst() - if tc1 then - Duel.ConfirmCards(1-tp,tc1) - end - if tc2 then - Duel.ConfirmCards(tp,tc2) - end - if tc1 and tc2 then - local atk1=tc1:GetAttack() - local atk2=tc2:GetAttack() - if atk1>atk2 then - Duel.Damage(1-tp,atk1-atk2,REASON_EFFECT) - elseif atk10 and c:IsAbleToChangeControler() -end -function c57384901.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - if chk==0 then return Duel.IsExistingTarget(c57384901.filter2,tp,0,LOCATION_MZONE,1,nil) - and Duel.IsExistingTarget(c57384901.filter1,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) - local g2=Duel.SelectTarget(tp,c57384901.filter2,tp,0,LOCATION_MZONE,1,1,nil) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) - local g1=Duel.SelectTarget(tp,c57384901.filter1,tp,LOCATION_MZONE,0,1,1,nil) - g1:Merge(g2) - Duel.SetOperationInfo(0,CATEGORY_CONTROL,g1,2,0,0) -end -function c57384901.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local a=g:GetFirst() - local b=g:GetNext() - if a:IsRelateToEffect(e) and b:IsRelateToEffect(e) then - Duel.SwapControl(a,b) - end -end diff --git a/script/c57409948.lua b/script/c57409948.lua deleted file mode 100644 index f0206818bf..0000000000 --- a/script/c57409948.lua +++ /dev/null @@ -1,26 +0,0 @@ ---爆弾かめ虫 -function c57409948.initial_effect(c) - --flip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(57409948,0)) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP) - e1:SetTarget(c57409948.target) - e1:SetOperation(c57409948.operation) - c:RegisterEffect(e1) -end -function c57409948.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsFacedown() end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - Duel.SelectTarget(tp,Card.IsFacedown,tp,0,LOCATION_MZONE,1,1,nil) -end -function c57409948.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) and tc:IsFacedown() then - Duel.ConfirmCards(tp,tc) - if tc:IsType(TYPE_EFFECT) then - Duel.Destroy(tc,REASON_EFFECT) - end - end -end diff --git a/script/c57421866.lua b/script/c57421866.lua deleted file mode 100644 index 6b7d13dd27..0000000000 --- a/script/c57421866.lua +++ /dev/null @@ -1,47 +0,0 @@ ---レベル・スティーラー -function c57421866.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(57421866,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_GRAVE) - e1:SetTarget(c57421866.target) - e1:SetOperation(c57421866.operation) - c:RegisterEffect(e1) - --unreleaseable nonsum - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EFFECT_UNRELEASABLE_NONSUM) - e2:SetValue(1) - c:RegisterEffect(e2) -end -function c57421866.filter(c) - return c:IsFaceup() and c:GetLevel()>=5 -end -function c57421866.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c57421866.filter(chkc) end - local c=e:GetHandler() - if chk==0 then return Duel.IsExistingTarget(c57421866.filter,tp,LOCATION_MZONE,0,1,nil) - and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(57421866,1)) - Duel.SelectTarget(tp,c57421866.filter,tp,LOCATION_MZONE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0) -end -function c57421866.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsFacedown() or not tc:IsRelateToEffect(e) or tc:IsImmuneToEffect(e) or tc:GetLevel()<2 then return end - local c=e:GetHandler() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_LEVEL) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(-1) - tc:RegisterEffect(e1) - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c57441100.lua b/script/c57441100.lua deleted file mode 100644 index 34cc411afb..0000000000 --- a/script/c57441100.lua +++ /dev/null @@ -1,42 +0,0 @@ ---金剛真力 -function c57441100.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(57441100,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_SZONE) - e1:SetCondition(c57441100.condition) - e1:SetTarget(c57441100.target) - e1:SetOperation(c57441100.operation) - c:RegisterEffect(e1) -end -function c57441100.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 - and Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)~=0 -end -function c57441100.filter(c,e,sp) - return c:IsType(TYPE_DUAL) and c:GetLevel()<=4 and c:IsCanBeSpecialSummoned(e,0,sp,false,false) -end -function c57441100.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c57441100.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c57441100.operation(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - if Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)>0 - or Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)==0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c57441100.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c57470761.lua b/script/c57470761.lua deleted file mode 100644 index f514ffe188..0000000000 --- a/script/c57470761.lua +++ /dev/null @@ -1,129 +0,0 @@ ---タイラント・ウィング -function c57470761.initial_effect(c) - --activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCondition(c57470761.condition) - e1:SetTarget(c57470761.target) - e1:SetOperation(c57470761.activate) - c:RegisterEffect(e1) -end -function c57470761.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end -function c57470761.filter(c) - return c:IsFaceup() and c:IsRace(RACE_DRAGON) -end -function c57470761.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c57470761.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c57470761.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c57470761.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c57470761.activate(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsLocation(LOCATION_SZONE) then return end - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,c,tc) - c:CancelToGrave() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetValue(c57470761.eqlimit) - e1:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(400) - e2:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EFFECT_UPDATE_DEFENCE) - c:RegisterEffect(e3) - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_EQUIP) - e4:SetCode(EFFECT_EXTRA_ATTACK) - e4:SetValue(1) - e4:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e4) - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_EQUIP) - e5:SetCode(EFFECT_CANNOT_DIRECT_ATTACK) - e5:SetCondition(c57470761.dircon) - e5:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e5) - local e6=e5:Clone() - e6:SetCode(EFFECT_CANNOT_ATTACK) - e6:SetCondition(c57470761.atkcon) - c:RegisterEffect(e6) - local e7=Effect.CreateEffect(c) - e7:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e7:SetCode(EVENT_BATTLE_START) - e7:SetRange(LOCATION_SZONE) - e7:SetOperation(c57470761.regop) - e7:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e7) - local e8=Effect.CreateEffect(c) - e8:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e8:SetCode(EVENT_EQUIP) - e8:SetRange(LOCATION_SZONE) - e8:SetOperation(c57470761.resetop) - e8:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e8) - local e9=Effect.CreateEffect(c) - e9:SetCategory(CATEGORY_DESTROY) - e9:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e9:SetCode(EVENT_PHASE+PHASE_END) - e9:SetRange(LOCATION_SZONE) - e9:SetCountLimit(1) - e9:SetCondition(c57470761.descon) - e9:SetTarget(c57470761.destg) - e9:SetOperation(c57470761.desop) - e9:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e9) - end -end -function c57470761.eqlimit(e,c) - return c:IsRace(RACE_DRAGON) -end -function c57470761.dircon(e) - return e:GetHandler():GetEquipTarget():GetAttackAnnouncedCount()>0 -end -function c57470761.atkcon(e) - return e:GetHandler():GetEquipTarget():IsDirectAttacked() -end -function c57470761.regop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local ec=c:GetEquipTarget() - if not ec:IsRelateToBattle() then return end - local bc=ec:GetBattleTarget() - if bc and bc:IsControler(1-tp) then - c:RegisterFlagEffect(57470761,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) - end -end -function c57470761.resetop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if eg:IsContains(c) then - c:ResetFlagEffect(57470761) - end -end -function c57470761.descon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetFlagEffect(57470761)~=0 -end -function c57470761.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0) -end -function c57470761.desop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - Duel.Destroy(e:GetHandler(),REASON_EFFECT) - end -end diff --git a/script/c57473560.lua b/script/c57473560.lua deleted file mode 100644 index e84b8bf199..0000000000 --- a/script/c57473560.lua +++ /dev/null @@ -1,78 +0,0 @@ ---ワイトプリンス -function c57473560.initial_effect(c) - --change code - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_GRAVE) - e1:SetCode(EFFECT_CHANGE_CODE) - e1:SetValue(32274490) - c:RegisterEffect(e1) - --to grave - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(57473560,0)) - e2:SetCategory(CATEGORY_TOGRAVE) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetProperty(EFFECT_FLAG_DELAY) - e2:SetTarget(c57473560.tgtg) - e2:SetOperation(c57473560.tgop) - c:RegisterEffect(e2) - --spsummon - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(57473560,1)) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_GRAVE) - e3:SetCost(c57473560.spcost) - e3:SetTarget(c57473560.sptg) - e3:SetOperation(c57473560.spop) - c:RegisterEffect(e3) -end -function c57473560.tgfilter(c,code) - return c:IsCode(code) and c:IsAbleToGrave() -end -function c57473560.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c57473560.tgfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,32274490) - and Duel.IsExistingMatchingCard(c57473560.tgfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,40991587) end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,2,tp,LOCATION_HAND+LOCATION_DECK) -end -function c57473560.tgop(e,tp,eg,ep,ev,re,r,rp) - local g1=Duel.GetMatchingGroup(c57473560.tgfilter,tp,LOCATION_HAND+LOCATION_DECK,0,nil,32274490) - local g2=Duel.GetMatchingGroup(c57473560.tgfilter,tp,LOCATION_HAND+LOCATION_DECK,0,nil,40991587) - if g1:GetCount()>0 and g2:GetCount()>0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local sg1=g1:Select(tp,1,1,nil) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local sg2=g2:Select(tp,1,1,nil) - sg1:Merge(sg2) - Duel.SendtoGrave(sg1,REASON_EFFECT) - end -end -function c57473560.cfilter(c) - return c:IsCode(32274490) and c:IsAbleToRemoveAsCost() -end -function c57473560.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() - and Duel.IsExistingMatchingCard(c57473560.cfilter,tp,LOCATION_GRAVE,0,2,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c57473560.cfilter,tp,LOCATION_GRAVE,0,2,2,e:GetHandler()) - g:AddCard(e:GetHandler()) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c57473560.spfilter(c,e,tp) - return c:IsCode(36021814) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c57473560.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c57473560.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c57473560.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c57473560.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c57477163.lua b/script/c57477163.lua deleted file mode 100644 index 88753c3fb4..0000000000 --- a/script/c57477163.lua +++ /dev/null @@ -1,55 +0,0 @@ ---デストーイ・チェーン・シープ -function c57477163.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcCodeFun(c,61173621,aux.FilterBoolFunction(Card.IsSetCard,0xa9),1,true,true) - --actlimit - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EFFECT_CANNOT_ACTIVATE) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(0,1) - e1:SetValue(c57477163.aclimit) - e1:SetCondition(c57477163.actcon) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetCountLimit(1,57477163) - e2:SetCondition(c57477163.condition) - e2:SetTarget(c57477163.target) - e2:SetOperation(c57477163.operation) - c:RegisterEffect(e2) -end -function c57477163.aclimit(e,re,tp) - return not re:GetHandler():IsImmuneToEffect(e) -end -function c57477163.actcon(e) - return Duel.GetAttacker()==e:GetHandler() or Duel.GetAttackTarget()==e:GetHandler() -end -function c57477163.condition(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsReason(REASON_BATTLE) - or rp~=tp and c:IsReason(REASON_DESTROY) and c:GetPreviousControler()==tp -end -function c57477163.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c57477163.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.SpecialSummonStep(c,0,tp,tp,false,false,POS_FACEUP) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(800) - e1:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e1) - Duel.SpecialSummonComplete() - end -end diff --git a/script/c57482479.lua b/script/c57482479.lua deleted file mode 100644 index 9f14f96347..0000000000 --- a/script/c57482479.lua +++ /dev/null @@ -1,17 +0,0 @@ ---太陽の戦士 -function c57482479.initial_effect(c) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetCondition(c57482479.condtion) - e1:SetValue(500) - c:RegisterEffect(e1) -end -function c57482479.condtion(e) - local ph=Duel.GetCurrentPhase() - if not (ph==PHASE_DAMAGE or ph==PHASE_DAMAGE_CAL) or not e:GetHandler():IsRelateToBattle() then return false end - local bc=e:GetHandler():GetBattleTarget() - return bc and bc:IsFaceup() and bc:IsAttribute(ATTRIBUTE_DARK) -end diff --git a/script/c57543573.lua b/script/c57543573.lua deleted file mode 100644 index 394bf8418b..0000000000 --- a/script/c57543573.lua +++ /dev/null @@ -1,68 +0,0 @@ ---ワーム・イリダン -function c57543573.initial_effect(c) - --add counter - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_MSET) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c57543573.accon1) - e1:SetOperation(c57543573.acop) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_SSET) - c:RegisterEffect(e2) - local e3=e1:Clone() - e3:SetCode(EVENT_CHANGE_POS) - e3:SetCondition(c57543573.accon2) - c:RegisterEffect(e3) - local e4=e1:Clone() - e4:SetCode(EVENT_SPSUMMON_SUCCESS) - e4:SetCondition(c57543573.accon3) - c:RegisterEffect(e4) - --destroy - local e5=Effect.CreateEffect(c) - e5:SetDescription(aux.Stringid(57543573,0)) - e5:SetCategory(CATEGORY_DESTROY) - e5:SetType(EFFECT_TYPE_IGNITION) - e5:SetRange(LOCATION_MZONE) - e5:SetProperty(EFFECT_FLAG_CARD_TARGET) - e5:SetCost(c57543573.descost) - e5:SetTarget(c57543573.destg) - e5:SetOperation(c57543573.desop) - c:RegisterEffect(e5) -end -function c57543573.accon1(e,tp,eg,ep,ev,re,r,rp) - return eg:GetFirst():IsControler(tp) -end -function c57543573.filter2(c,tp) - return c:IsControler(tp) and bit.band(c:GetPreviousPosition(),POS_FACEUP)~=0 and bit.band(c:GetPosition(),POS_FACEDOWN)~=0 -end -function c57543573.accon2(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c57543573.filter2,1,nil,tp) -end -function c57543573.filter3(c,tp) - return c:IsControler(tp) and c:IsFacedown() -end -function c57543573.accon3(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c57543573.filter3,1,nil,tp) -end -function c57543573.acop(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():AddCounter(0xf,1) -end -function c57543573.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsCanRemoveCounter(tp,0xf,2,REASON_COST) end - e:GetHandler():RemoveCounter(tp,0xf,2,REASON_COST) -end -function c57543573.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and chkc:IsDestructable() end - if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,0,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,0,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c57543573.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c57549932.lua b/script/c57549932.lua deleted file mode 100644 index 84780f166c..0000000000 --- a/script/c57549932.lua +++ /dev/null @@ -1,13 +0,0 @@ ---サンライズ・ガードナー -function c57549932.initial_effect(c) - aux.EnableDualAttribute(c) - --change base defence - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(aux.IsDualState) - e1:SetCode(EFFECT_SET_BASE_DEFENCE) - e1:SetValue(2300) - c:RegisterEffect(e1) -end diff --git a/script/c575512.lua b/script/c575512.lua deleted file mode 100644 index 19e158efaf..0000000000 --- a/script/c575512.lua +++ /dev/null @@ -1,82 +0,0 @@ ---PSYフレーム・サーキット -function c575512.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --synchro summon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(575512,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetProperty(EFFECT_FLAG_DELAY) - e2:SetRange(LOCATION_FZONE) - e2:SetCondition(c575512.sccon) - e2:SetTarget(c575512.sctg) - e2:SetOperation(c575512.scop) - c:RegisterEffect(e2) - --atkup - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(575512,1)) - e3:SetCategory(CATEGORY_ATKCHANGE) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_BATTLE_START) - e3:SetRange(LOCATION_FZONE) - e3:SetCondition(c575512.atkcon) - e3:SetCost(c575512.atkcost) - e3:SetOperation(c575512.atkop) - c:RegisterEffect(e3) -end -function c575512.scfilter(c,tp) - return c:IsFaceup() and c:IsSetCard(0xc1) and c:IsControler(tp) -end -function c575512.sccon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c575512.scfilter,1,nil,tp) -end -function c575512.sctg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local mg=Duel.GetMatchingGroup(Card.IsSetCard,tp,LOCATION_MZONE,0,nil,0xc1) - return Duel.IsExistingMatchingCard(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,1,nil,nil,mg) - end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function c575512.scop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local mg=Duel.GetMatchingGroup(Card.IsSetCard,tp,LOCATION_MZONE,0,nil,0xc1) - local g=Duel.GetMatchingGroup(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,nil,nil,mg) - if g:GetCount()>0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=g:Select(tp,1,1,nil) - Duel.SynchroSummon(tp,sg:GetFirst(),nil,mg) - end -end -function c575512.atkcon(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetAttacker() - if tc:IsControler(1-tp) then tc=Duel.GetAttackTarget() end - e:SetLabelObject(tc) - return tc and tc:IsControler(tp) and tc:IsSetCard(0xc1) and tc:IsRelateToBattle() and Duel.GetAttackTarget()~=nil -end -function c575512.atkfilter(c) - return c:IsSetCard(0xc1) and c:GetAttack()>0 and c:IsDiscardable() -end -function c575512.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c575512.atkfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) - local g=Duel.SelectMatchingCard(tp,c575512.atkfilter,tp,LOCATION_HAND,0,1,1,nil) - e:SetLabel(g:GetFirst():GetAttack()) - Duel.SendtoGrave(g,REASON_COST+REASON_DISCARD) -end -function c575512.atkop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local tc=e:GetLabelObject() - if tc:IsRelateToBattle() and tc:IsFaceup() and tc:IsControler(tp) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(e:GetLabel()) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - end -end diff --git a/script/c57554544.lua b/script/c57554544.lua deleted file mode 100644 index 9bf5759062..0000000000 --- a/script/c57554544.lua +++ /dev/null @@ -1,102 +0,0 @@ ---炎王の孤島 -function c57554544.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(57554544,0)) - e2:SetCategory(CATEGORY_DESTROY+CATEGORY_TOHAND+CATEGORY_SEARCH) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_FZONE) - e2:SetCountLimit(1,57554544) - e2:SetTarget(c57554544.target) - e2:SetOperation(c57554544.operation) - c:RegisterEffect(e2) - --special summon - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(57554544,1)) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_FZONE) - e3:SetCountLimit(1,57554544) - e3:SetCondition(c57554544.spcon) - e3:SetTarget(c57554544.sptg) - e3:SetOperation(c57554544.spop) - c:RegisterEffect(e3) - --destroy - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(57554544,2)) - e4:SetCategory(CATEGORY_DESTROY) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e4:SetCode(EVENT_TO_GRAVE) - e4:SetCondition(c57554544.descon) - e4:SetTarget(c57554544.destg) - e4:SetOperation(c57554544.desop) - c:RegisterEffect(e4) - local e5=e4:Clone() - e5:SetCode(EVENT_REMOVE) - c:RegisterEffect(e5) -end -function c57554544.filter1(c) - return c:IsType(TYPE_MONSTER) and c:IsDestructable() -end -function c57554544.filter2(c) - return c:IsSetCard(0x81) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() -end -function c57554544.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c57554544.filter1,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil) - and Duel.IsExistingMatchingCard(c57554544.filter2,tp,LOCATION_DECK,0,1,nil) end - Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,tp,LOCATION_HAND+LOCATION_MZONE) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c57554544.operation(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectMatchingCard(tp,c57554544.filter1,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil) - if g:GetCount()>0 and Duel.Destroy(g,REASON_EFFECT)~=0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c57554544.filter2,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end - end -end -function c57554544.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 -end -function c57554544.spfilter(c,e,tp) - return c:IsRace(RACE_WINDBEAST) and c:IsAttribute(ATTRIBUTE_FIRE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c57554544.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c57554544.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c57554544.spop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c57554544.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end -function c57554544.descon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsPreviousLocation(LOCATION_SZONE) and c:GetPreviousSequence()==5 and c:IsPreviousPosition(POS_FACEUP) -end -function c57554544.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,LOCATION_MZONE,0,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c57554544.desop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,LOCATION_MZONE,0,nil) - Duel.Destroy(g,REASON_EFFECT) -end diff --git a/script/c57568840.lua b/script/c57568840.lua deleted file mode 100644 index 546bc94ac7..0000000000 --- a/script/c57568840.lua +++ /dev/null @@ -1,34 +0,0 @@ ---デルタフライ -function c57568840.initial_effect(c) - --lvchange - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(57568840,0)) - e1:SetCategory(CATEGORY_LVCHANGE) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c57568840.lvtg) - e1:SetOperation(c57568840.lvop) - c:RegisterEffect(e1) -end -function c57568840.filter(c) - return c:IsFaceup() and not c:IsType(TYPE_XYZ) -end -function c57568840.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c57568840.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c57568840.filter,tp,LOCATION_MZONE,0,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c57568840.filter,tp,LOCATION_MZONE,0,1,1,e:GetHandler()) -end -function c57568840.lvop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_LEVEL) - e1:SetValue(1) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - end -end diff --git a/script/c57579381.lua b/script/c57579381.lua deleted file mode 100644 index 39a959cbb6..0000000000 --- a/script/c57579381.lua +++ /dev/null @@ -1,31 +0,0 @@ ---堕天使マリー -function c57579381.initial_effect(c) - --recover - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(57579381,0)) - e1:SetCategory(CATEGORY_RECOVER) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) - e1:SetRange(LOCATION_GRAVE) - e1:SetCountLimit(1) - e1:SetCondition(c57579381.condition) - e1:SetTarget(c57579381.target) - e1:SetOperation(c57579381.operation) - c:RegisterEffect(e1) -end -function c57579381.condition(e,tp,eg,ep,ev,re,r,rp) - return tp==Duel.GetTurnPlayer() -end -function c57579381.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(200) - Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,200) -end -function c57579381.operation(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Recover(p,d,REASON_EFFECT) - end -end diff --git a/script/c5758500.lua b/script/c5758500.lua deleted file mode 100644 index 438cb72e67..0000000000 --- a/script/c5758500.lua +++ /dev/null @@ -1,24 +0,0 @@ ---魂の解放 -function c5758500.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_REMOVE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c5758500.target) - e1:SetOperation(c5758500.activate) - c:RegisterEffect(e1) -end -function c5758500.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:GetLocation()==LOCATION_GRAVE and chkc:IsAbleToRemove() end - if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,5,nil) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,0) -end -function c5758500.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local sg=g:Filter(Card.IsRelateToEffect,nil,e) - Duel.Remove(sg,POS_FACEUP,REASON_EFFECT) -end diff --git a/script/c57585212.lua b/script/c57585212.lua deleted file mode 100644 index e8992b8e94..0000000000 --- a/script/c57585212.lua +++ /dev/null @@ -1,17 +0,0 @@ ---自爆スイッチ -function c57585212.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c57585212.condition) - e1:SetOperation(c57585212.activate) - c:RegisterEffect(e1) -end -function c57585212.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetLP(tp)<=Duel.GetLP(1-tp)-7000 -end -function c57585212.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.SetLP(tp,0) - Duel.SetLP(1-tp,0) -end diff --git a/script/c57594700.lua b/script/c57594700.lua deleted file mode 100644 index 9c68b2fea6..0000000000 --- a/script/c57594700.lua +++ /dev/null @@ -1,42 +0,0 @@ ---幻奏の音姫マイスタリン・シューベルト -function c57594700.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcFunRep(c,aux.FilterBoolFunction(Card.IsSetCard,0x9b),2,true) - --remove - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_REMOVE+CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_NO_TURN_RESET) - e1:SetRange(LOCATION_MZONE) - e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetCountLimit(1) - e1:SetCondition(c57594700.condition) - e1:SetTarget(c57594700.target) - e1:SetOperation(c57594700.operation) - c:RegisterEffect(e1) -end -function c57594700.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end -function c57594700.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsAbleToRemove() end - if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,3,nil) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,0) -end -function c57594700.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) - local ct=Duel.Remove(g,POS_FACEUP,REASON_EFFECT) - local c=e:GetHandler() - if ct>0 and c:IsFaceup() and c:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+0x1ff0000) - e1:SetValue(ct*200) - c:RegisterEffect(e1) - end -end diff --git a/script/c57610714.lua b/script/c57610714.lua deleted file mode 100644 index 0482e70058..0000000000 --- a/script/c57610714.lua +++ /dev/null @@ -1,35 +0,0 @@ ---雲魔物-アイ・オブ・ザ・タイフーン -function c57610714.initial_effect(c) - --battle indestructable - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e1:SetValue(1) - c:RegisterEffect(e1) - --selfdes - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EFFECT_SELF_DESTROY) - e2:SetCondition(c57610714.sdcon) - c:RegisterEffect(e2) - --pos Change - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(57610714,0)) - e3:SetCategory(CATEGORY_POSITION) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e3:SetCode(EVENT_ATTACK_ANNOUNCE) - e3:SetOperation(c57610714.posop) - c:RegisterEffect(e3) -end -function c57610714.sdcon(e) - return e:GetHandler():IsPosition(POS_FACEUP_DEFENCE) -end -function c57610714.filter(c) - return c:IsFaceup() and not c:IsSetCard(0x18) -end -function c57610714.posop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c57610714.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - Duel.ChangePosition(g,POS_FACEUP_DEFENCE,0,POS_FACEUP_ATTACK,0) -end diff --git a/script/c57617178.lua b/script/c57617178.lua deleted file mode 100644 index f9cad08c8b..0000000000 --- a/script/c57617178.lua +++ /dev/null @@ -1,30 +0,0 @@ ---ソニックバード -function c57617178.initial_effect(c) - --effect - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(57617178,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c57617178.tg) - e1:SetOperation(c57617178.op) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - c:RegisterEffect(e2) -end -function c57617178.filter(c) - return c:GetType()==0x82 and c:IsAbleToHand() -end -function c57617178.tg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c57617178.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c57617178.op(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c57617178.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c57624336.lua b/script/c57624336.lua deleted file mode 100644 index 18c141e94d..0000000000 --- a/script/c57624336.lua +++ /dev/null @@ -1,67 +0,0 @@ ---エキセントリック・デーモン -function c57624336.initial_effect(c) - --pendulum summon - aux.AddPendulumProcedure(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --Destroy spell & trap - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_PZONE) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCountLimit(1,57624336) - e2:SetTarget(c57624336.destg1) - e2:SetOperation(c57624336.desop1) - c:RegisterEffect(e2) - --Destroy monster - local e3=Effect.CreateEffect(c) - e3:SetCategory(CATEGORY_DESTROY) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_MZONE) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetCountLimit(1,57624337) - e3:SetCost(c57624336.descost2) - e3:SetTarget(c57624336.destg2) - e3:SetOperation(c57624336.desop2) - c:RegisterEffect(e3) -end -function c57624336.filter1(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable() -end -function c57624336.destg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and c57624336.filter1(chkc) and chkc~=e:GetHandler() end - if chk==0 then return e:GetHandler():IsDestructable() - and Duel.IsExistingTarget(c57624336.filter1,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c57624336.filter1,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,e:GetHandler()) - g:AddCard(e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,2,0,0) -end -function c57624336.desop1(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(Group.FromCards(tc,e:GetHandler()),REASON_EFFECT) - end -end -function c57624336.descost2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end -function c57624336.destg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsDestructable() end - if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,LOCATION_MZONE,LOCATION_MZONE,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c57624336.desop2(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsType(TYPE_MONSTER) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c5763020.lua b/script/c5763020.lua deleted file mode 100644 index 1bd65fbd00..0000000000 --- a/script/c5763020.lua +++ /dev/null @@ -1,32 +0,0 @@ ---泣き神の石像 -function c5763020.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(5763020,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND) - e1:SetCost(c5763020.spcost) - e1:SetTarget(c5763020.sptg) - e1:SetOperation(c5763020.spop) - c:RegisterEffect(e1) -end -function c5763020.costfilter(c) - return c:IsType(TYPE_TUNER) and c:IsAbleToRemoveAsCost() -end -function c5763020.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c5763020.costfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c5763020.costfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c5763020.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c5763020.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 or not c:IsRelateToEffect(e) then return end - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) -end diff --git a/script/c57662975.lua b/script/c57662975.lua deleted file mode 100644 index e0567a8670..0000000000 --- a/script/c57662975.lua +++ /dev/null @@ -1,37 +0,0 @@ ---ダークストーム・ドラゴン -function c57662975.initial_effect(c) - aux.EnableDualAttribute(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetDescription(aux.Stringid(57662975,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCondition(aux.IsDualState) - e1:SetCost(c57662975.cost) - e1:SetTarget(c57662975.target) - e1:SetOperation(c57662975.operation) - c:RegisterEffect(e1) -end -function c57662975.cfilter(c) - return c:IsFaceup() and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToGraveAsCost() -end -function c57662975.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c57662975.cfilter,tp,LOCATION_ONFIELD,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c57662975.cfilter,tp,LOCATION_ONFIELD,0,1,1,nil) - Duel.SendtoGrave(g,REASON_COST) -end -function c57662975.dfilter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable() -end -function c57662975.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c57662975.dfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,2,nil) end - local g=Duel.GetMatchingGroup(c57662975.dfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c57662975.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c57662975.dfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) - Duel.Destroy(g,REASON_EFFECT) -end diff --git a/script/c57666212.lua b/script/c57666212.lua deleted file mode 100644 index 5825b4b029..0000000000 --- a/script/c57666212.lua +++ /dev/null @@ -1,58 +0,0 @@ ---光帝クライス -function c57666212.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(57666212,0)) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c57666212.target) - e1:SetOperation(c57666212.operation) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e2) - --cannot attack - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e3:SetCode(EVENT_SUMMON_SUCCESS) - e3:SetOperation(c57666212.disatt) - c:RegisterEffect(e3) - local e4=e3:Clone() - e4:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e4) -end -function c57666212.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsDestructable() end - if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,2,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c57666212.operation(e,tp,eg,ep,ev,re,r,rp) - local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local sg=tg:Filter(Card.IsRelateToEffect,nil,e) - Duel.Destroy(sg,REASON_EFFECT) - sg=Duel.GetOperatedGroup() - local d1=0 - local d2=0 - local tc=sg:GetFirst() - while tc do - if tc then - if tc:GetPreviousControler()==0 then d1=d1+1 - else d2=d2+1 end - end - tc=sg:GetNext() - end - if d1>0 and Duel.SelectYesNo(0,aux.Stringid(57666212,1)) then Duel.Draw(0,d1,REASON_EFFECT) end - if d2>0 and Duel.SelectYesNo(1,aux.Stringid(57666212,1)) then Duel.Draw(1,d2,REASON_EFFECT) end -end -function c57666212.disatt(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - c:RegisterEffect(e1) -end diff --git a/script/c57690191.lua b/script/c57690191.lua deleted file mode 100644 index a3e8b60eb7..0000000000 --- a/script/c57690191.lua +++ /dev/null @@ -1,87 +0,0 @@ ---聖騎士の三兄弟 -function c57690191.initial_effect(c) - --atk limit - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetCondition(c57690191.atcon) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(57690191,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_SUMMON_SUCCESS) - e2:SetTarget(c57690191.sptg) - e2:SetOperation(c57690191.spop) - c:RegisterEffect(e2) - --ret&draw - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(57690191,1)) - e3:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_MZONE) - e3:SetTarget(c57690191.drtg) - e3:SetOperation(c57690191.drop) - e3:SetCountLimit(1) - c:RegisterEffect(e3) -end -function c57690191.atcon(e) - local g=Duel.GetFieldGroup(e:GetHandlerPlayer(),LOCATION_MZONE,0) - return g:GetCount()~=3 or g:IsExists(c57690191.atkfilter,1,nil) -end -function c57690191.atkfilter(c) - return c:IsFacedown() or not c:IsSetCard(0x107a) -end -function c57690191.spfilter(c,e,tp) - return c:IsSetCard(0x107a) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c57690191.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c57690191.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c57690191.spop(e,tp,eg,ep,ev,re,r,rp) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ft<=0 then return end - if ft>2 then ft=2 end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c57690191.spfilter,tp,LOCATION_HAND,0,1,ft,nil,e,tp) - if g:GetCount()~=0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) - e1:SetTargetRange(1,0) - e1:SetTarget(c57690191.splimit) - Duel.RegisterEffect(e1,tp) -end -function c57690191.splimit(e,c,sump,sumtype,sumpos,targetp,se) - return not c:IsSetCard(0x107a) -end -function c57690191.drfilter(c) - return (c:IsSetCard(0x107a) or c:IsSetCard(0x207a)) and c:IsAbleToDeck() -end -function c57690191.drtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c57690191.drfilter(chkc) end - if chk==0 then return Duel.IsPlayerCanDraw(tp,1) and Duel.IsExistingTarget(c57690191.drfilter,tp,LOCATION_GRAVE,0,3,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectTarget(tp,c57690191.drfilter,tp,LOCATION_GRAVE,0,3,3,nil) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c57690191.tgfilter(c,e) - return not c:IsRelateToEffect(e) -end -function c57690191.drop(e,tp,eg,ep,ev,re,r,rp) - local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - if tg:IsExists(c57690191.tgfilter,1,nil,e) then return end - Duel.SendtoDeck(tg,nil,0,REASON_EFFECT) - Duel.ShuffleDeck(tp) - Duel.BreakEffect() - Duel.Draw(tp,1,REASON_EFFECT) -end diff --git a/script/c57707471.lua b/script/c57707471.lua deleted file mode 100644 index a95aa8a714..0000000000 --- a/script/c57707471.lua +++ /dev/null @@ -1,97 +0,0 @@ ---No.21 氷結のレディ・ジャスティス -function c57707471.initial_effect(c) - c:EnableReviveLimit() - --xyz summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_EXTRA) - e1:SetCondition(c57707471.xyzcon) - e1:SetOperation(c57707471.xyzop) - e1:SetValue(SUMMON_TYPE_XYZ) - c:RegisterEffect(e1) - --atk - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetValue(c57707471.atkval) - c:RegisterEffect(e2) - --destroy - local e3=Effect.CreateEffect(c) - e3:SetCategory(CATEGORY_DESTROY) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1) - e3:SetCost(c57707471.descost) - e3:SetTarget(c57707471.destg) - e3:SetOperation(c57707471.desop) - c:RegisterEffect(e3) - if not c57707471.xyz_filter then - c57707471.xyz_filter=function(mc) return mc:IsXyzLevel(c,6) end - end -end -c57707471.xyz_number=21 -c57707471.xyz_count=2 -function c57707471.ovfilter(c,tp,xyzc) - return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:GetRank()==5 and c:IsCanBeXyzMaterial(xyzc) - and c:CheckRemoveOverlayCard(tp,1,REASON_COST) -end -function c57707471.xyzcon(e,c,og) - if c==nil then return true end - local tp=c:GetControler() - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - local ct=-ft - if 2<=ct then return false end - if ct<1 and not og and Duel.IsExistingMatchingCard(c57707471.ovfilter,tp,LOCATION_MZONE,0,1,nil,tp,c) then - return true - end - return Duel.CheckXyzMaterial(c,nil,6,2,2,og) -end -function c57707471.xyzop(e,tp,eg,ep,ev,re,r,rp,c,og) - if og then - c:SetMaterial(og) - Duel.Overlay(c,og) - else - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - local ct=-ft - local b1=Duel.CheckXyzMaterial(c,nil,6,2,2,og) - local b2=ct<1 and Duel.IsExistingMatchingCard(c57707471.ovfilter,tp,LOCATION_MZONE,0,1,nil,tp,c) - if b2 and (not b1 or Duel.SelectYesNo(tp,aux.Stringid(57707471,0))) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL) - local mg=Duel.SelectMatchingCard(tp,c57707471.ovfilter,tp,LOCATION_MZONE,0,1,1,nil,tp,c) - mg:GetFirst():RemoveOverlayCard(tp,1,1,REASON_COST) - local mg2=mg:GetFirst():GetOverlayGroup() - if mg2:GetCount()~=0 then - Duel.Overlay(c,mg2) - end - c:SetMaterial(mg) - Duel.Overlay(c,mg) - else - local mg=Duel.SelectXyzMaterial(tp,c,nil,6,2,2) - c:SetMaterial(mg) - Duel.Overlay(c,mg) - end - end -end -function c57707471.atkval(e,c) - return c:GetOverlayCount()*1000 -end -function c57707471.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c57707471.desfilter(c) - return c:IsDefencePos() and c:IsDestructable() -end -function c57707471.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c57707471.desfilter,tp,0,LOCATION_MZONE,1,nil) end - local g=Duel.GetMatchingGroup(c57707471.desfilter,tp,0,LOCATION_MZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c57707471.desop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c57707471.desfilter,tp,0,LOCATION_MZONE,nil) - Duel.Destroy(g,REASON_EFFECT) -end diff --git a/script/c57728570.lua b/script/c57728570.lua deleted file mode 100644 index 0457c94ce2..0000000000 --- a/script/c57728570.lua +++ /dev/null @@ -1,68 +0,0 @@ ---死のデッキ破壊ウイルス -function c57728570.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_TOHAND) - e1:SetCost(c57728570.cost) - e1:SetTarget(c57728570.target) - e1:SetOperation(c57728570.activate) - c:RegisterEffect(e1) -end -function c57728570.costfilter(c) - return c:IsAttribute(ATTRIBUTE_DARK) and c:IsAttackBelow(1000) -end -function c57728570.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,c57728570.costfilter,1,nil) end - local g=Duel.SelectReleaseGroup(tp,c57728570.costfilter,1,1,nil) - Duel.Release(g,REASON_COST) -end -function c57728570.filter(c) - return c:IsAttackAbove(1500) and c:IsDestructable() -end -function c57728570.hgfilter(c) - return not c:IsPublic() or c57728570.filter(c) -end -function c57728570.fgfilter(c) - return c:IsFacedown() or c57728570.filter(c) -end -function c57728570.tgfilter(c) - return ((c:IsLocation(LOCATION_HAND) and c:IsPublic()) or (c:IsLocation(LOCATION_MZONE) and c:IsFaceup())) and c57728570.filter(c) -end -function c57728570.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c57728570.hgfilter,tp,0,LOCATION_HAND,1,nil) - or Duel.IsExistingMatchingCard(c57728570.fgfilter,tp,0,LOCATION_MZONE,1,nil) end - local g=Duel.GetMatchingGroup(c57728570.tgfilter,tp,0,LOCATION_MZONE+LOCATION_HAND,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c57728570.activate(e,tp,eg,ep,ev,re,r,rp) - local conf=Duel.GetFieldGroup(tp,0,LOCATION_MZONE+LOCATION_HAND) - local ct=0 - if conf:GetCount()>0 then - Duel.ConfirmCards(tp,conf) - local dg=conf:Filter(c57728570.filter,nil) - ct=Duel.Destroy(dg,REASON_EFFECT) - Duel.ShuffleHand(1-tp) - end - local g=Duel.GetMatchingGroup(c57728570.filter,1-tp,LOCATION_DECK,0,nil) - if ct>0 and g:GetCount()>0 and Duel.SelectYesNo(1-tp,aux.Stringid(57728570,0)) then - Duel.BreakEffect() - Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_DESTROY) - local dg=g:Select(1-tp,1,3,nil) - Duel.Destroy(dg,REASON_EFFECT) - end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CHANGE_DAMAGE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetTargetRange(0,1) - e1:SetValue(0) - e1:SetReset(RESET_PHASE+PHASE_END,2) - Duel.RegisterEffect(e1,tp) - local e2=e1:Clone() - e2:SetCode(EFFECT_NO_EFFECT_DAMAGE) - e2:SetReset(RESET_PHASE+PHASE_END,2) - Duel.RegisterEffect(e2,tp) -end diff --git a/script/c57731460.lua b/script/c57731460.lua deleted file mode 100644 index cee548fa74..0000000000 --- a/script/c57731460.lua +++ /dev/null @@ -1,72 +0,0 @@ ---剣闘獣エクイテ -function c57731460.initial_effect(c) - --tohand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(57731460,0)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(c57731460.retcon) - e1:SetTarget(c57731460.rettg) - e1:SetOperation(c57731460.retop) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(57731460,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_PHASE+PHASE_BATTLE) - e2:SetRange(LOCATION_MZONE) - e2:SetCondition(c57731460.spcon) - e2:SetCost(c57731460.spcost) - e2:SetTarget(c57731460.sptg) - e2:SetOperation(c57731460.spop) - c:RegisterEffect(e2) -end -function c57731460.retcon(e,tp,eg,ep,ev,re,r,rp) - local st=e:GetHandler():GetSummonType() - return st>=(SUMMON_TYPE_SPECIAL+100) and st<(SUMMON_TYPE_SPECIAL+150) -end -function c57731460.retfilter(c) - return c:IsSetCard(0x19) and c:IsAbleToHand() -end -function c57731460.rettg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c57731460.retfilter(chkc) end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c57731460.retfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0) -end -function c57731460.retop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - end -end -function c57731460.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetBattledGroupCount()>0 -end -function c57731460.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToDeckAsCost() end - Duel.SendtoDeck(c,nil,2,REASON_COST) -end -function c57731460.filter(c,e,tp) - return not c:IsCode(57731460) and c:IsSetCard(0x19) and c:IsCanBeSpecialSummoned(e,103,tp,false,false) -end -function c57731460.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsExistingMatchingCard(c57731460.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c57731460.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c57731460.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - local tc=g:GetFirst() - if tc then - Duel.SpecialSummon(tc,103,tp,tp,false,false,POS_FACEUP) - tc:RegisterFlagEffect(tc:GetOriginalCode(),RESET_EVENT+0x1ff0000,0,0) - end -end diff --git a/script/c57734012.lua b/script/c57734012.lua deleted file mode 100644 index 3d49da159c..0000000000 --- a/script/c57734012.lua +++ /dev/null @@ -1,81 +0,0 @@ ---RUM-七皇の剣 -function c57734012.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_TO_HAND) - e1:SetCondition(c57734012.regcon) - e1:SetOperation(c57734012.regop) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_ACTIVATE) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetCondition(c57734012.condition) - e2:SetCost(c57734012.cost) - e2:SetTarget(c57734012.target) - e2:SetOperation(c57734012.activate) - c:RegisterEffect(e2) -end -function c57734012.regcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return Duel.GetFlagEffect(tp,57734012)==0 and Duel.GetCurrentPhase()==PHASE_DRAW - and c:IsReason(REASON_DRAW) and c:IsReason(REASON_RULE) -end -function c57734012.regop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if Duel.SelectYesNo(tp,aux.Stringid(57734012,0)) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_PUBLIC) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_MAIN1) - c:RegisterEffect(e1) - c:RegisterFlagEffect(57734012,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_MAIN1,0,1) - end -end -function c57734012.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()==PHASE_MAIN1 and not Duel.CheckPhaseActivity() -end -function c57734012.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():GetFlagEffect(57734012)~=0 end -end -function c57734012.filter1(c,e,tp) - local m=_G["c"..c:GetCode()] - if not m then return false end - local no=m.xyz_number - return no and no>=101 and no<=107 and c:IsSetCard(0x48) and not c:IsSetCard(0x1048) - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) - and Duel.IsExistingMatchingCard(c57734012.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,c,no) -end -function c57734012.filter2(c,e,tp,mc,no) - return c.xyz_number==no and c:IsSetCard(0x1048) and mc:IsCanBeXyzMaterial(c) - and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) -end -function c57734012.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanSpecialSummonCount(tp,2) - and Duel.GetFlagEffect(tp,57734012)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c57734012.filter1,tp,LOCATION_GRAVE+LOCATION_EXTRA,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_EXTRA) -end -function c57734012.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetFlagEffect(tp,57734012)~=0 then return end - Duel.RegisterFlagEffect(tp,57734012,0,0,0) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g1=Duel.SelectMatchingCard(tp,c57734012.filter1,tp,LOCATION_GRAVE+LOCATION_EXTRA,0,1,1,nil,e,tp) - local tc1=g1:GetFirst() - if tc1 and not tc1:IsHasEffect(EFFECT_NECRO_VALLEY) and Duel.SpecialSummon(tc1,0,tp,tp,false,false,POS_FACEUP)~=0 then - local m=_G["c"..tc1:GetCode()] - if not m then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g2=Duel.SelectMatchingCard(tp,c57734012.filter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc1,m.xyz_number) - local tc2=g2:GetFirst() - if tc2 then - Duel.BreakEffect() - tc2:SetMaterial(g1) - Duel.Overlay(tc2,g1) - Duel.SpecialSummon(tc2,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP) - tc2:CompleteProcedure() - end - end -end diff --git a/script/c57753602.lua b/script/c57753602.lua deleted file mode 100644 index 8e0fb73d86..0000000000 --- a/script/c57753602.lua +++ /dev/null @@ -1,39 +0,0 @@ ---ジェムフラッシュエナジー -function c57753602.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_END_PHASE) - c:RegisterEffect(e1) - --damage - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(57753602,0)) - e2:SetCategory(CATEGORY_DAMAGE) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetRange(LOCATION_SZONE) - e2:SetCountLimit(1) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) - e2:SetCondition(c57753602.damcon) - e2:SetTarget(c57753602.damtg) - e2:SetOperation(c57753602.damop) - c:RegisterEffect(e2) -end -function c57753602.damcon(e,tp,eg,ep,ev,re,r,rp) - return tp==Duel.GetTurnPlayer() -end -function c57753602.filter(c) - return c:IsFaceup() and bit.band(c:GetType(),0x20002)==0x20002 -end -function c57753602.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,0) -end -function c57753602.damop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) - local d=Duel.GetMatchingGroupCount(c57753602.filter,tp,LOCATION_SZONE,LOCATION_SZONE,nil)*300 - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c57774843.lua b/script/c57774843.lua deleted file mode 100644 index f9ef9dfef7..0000000000 --- a/script/c57774843.lua +++ /dev/null @@ -1,75 +0,0 @@ ---裁きの龍 -function c57774843.initial_effect(c) - c:EnableReviveLimit() - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(57774843,0)) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c57774843.spcon) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetDescription(aux.Stringid(57774843,1)) - e2:SetRange(LOCATION_MZONE) - e2:SetCost(c57774843.cost) - e2:SetTarget(c57774843.target) - e2:SetOperation(c57774843.operation) - c:RegisterEffect(e2) - --discard deck - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e3:SetCategory(CATEGORY_DECKDES) - e3:SetDescription(aux.Stringid(57774843,2)) - e3:SetCountLimit(1) - e3:SetCode(EVENT_PHASE+PHASE_END) - e3:SetRange(LOCATION_MZONE) - e3:SetCondition(c57774843.condition2) - e3:SetTarget(c57774843.target2) - e3:SetOperation(c57774843.operation2) - c:RegisterEffect(e3) - --splimit - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e4:SetCode(EFFECT_SPSUMMON_CONDITION) - c:RegisterEffect(e4) -end -function c57774843.spfilter(c) - return c:IsSetCard(0x38) and c:IsType(TYPE_MONSTER) -end -function c57774843.spcon(e,c) - if c==nil then return true end - if Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)<=0 then return false end - local g=Duel.GetMatchingGroup(c57774843.spfilter,c:GetControler(),LOCATION_GRAVE,0,nil) - local ct=g:GetClassCount(Card.GetCode) - return ct>3 -end -function c57774843.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,1000) end - Duel.PayLPCost(tp,1000) -end -function c57774843.target(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c) end - local sg=Duel.GetMatchingGroup(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,c) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,sg:GetCount(),0,0) -end -function c57774843.operation(e,tp,eg,ep,ev,re,r,rp) - local sg=Duel.GetMatchingGroup(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler()) - Duel.Destroy(sg,REASON_EFFECT) -end -function c57774843.condition2(e,tp,eg,ep,ev,re,r,rp) - return tp==Duel.GetTurnPlayer() -end -function c57774843.target2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,4) -end -function c57774843.operation2(e,tp,eg,ep,ev,re,r,rp) - Duel.DiscardDeck(tp,4,REASON_EFFECT) -end diff --git a/script/c57777714.lua b/script/c57777714.lua deleted file mode 100644 index a7cbf40d58..0000000000 --- a/script/c57777714.lua +++ /dev/null @@ -1,70 +0,0 @@ ---英霊獣使い-セフィラムピリカ -function c57777714.initial_effect(c) - c:SetSPSummonOnce(57777714) - --pendulum summon - aux.AddPendulumProcedure(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --splimit - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetRange(LOCATION_PZONE) - e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE) - e2:SetTargetRange(1,0) - e2:SetTarget(c57777714.splimit) - e2:SetCondition(aux.nfbdncon) - c:RegisterEffect(e2) - --spsummon - local e3=Effect.CreateEffect(c) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_SUMMON_SUCCESS) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetTarget(c57777714.target) - e3:SetOperation(c57777714.operation) - c:RegisterEffect(e3) - local e4=e3:Clone() - e4:SetCode(EVENT_SPSUMMON_SUCCESS) - e4:SetCondition(c57777714.condition) - c:RegisterEffect(e4) -end -function c57777714.splimit(e,c,sump,sumtype,sumpos,targetp) - if c:IsSetCard(0xb5) or c:IsSetCard(0xc4) then return false end - return bit.band(sumtype,SUMMON_TYPE_PENDULUM)==SUMMON_TYPE_PENDULUM -end -function c57777714.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_PENDULUM -end -function c57777714.filter(c,e,tp) - return (c:IsSetCard(0xb5) or c:IsSetCard(0xc4)) and not c:IsCode(57777714) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c57777714.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c57777714.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c57777714.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c57777714.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c57777714.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetOperation(c57777714.desop) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - end -end -function c57777714.desop(e,tp,eg,ep,ev,re,r,rp) - Duel.Destroy(e:GetHandler(),REASON_EFFECT) -end diff --git a/script/c57782164.lua b/script/c57782164.lua deleted file mode 100644 index 8839c6ea5c..0000000000 --- a/script/c57782164.lua +++ /dev/null @@ -1,34 +0,0 @@ ---ガガガウィンド -function c57782164.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c57782164.target) - e1:SetOperation(c57782164.activate) - c:RegisterEffect(e1) -end -function c57782164.filter(c,e,tp) - return c:IsSetCard(0x54) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c57782164.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c57782164.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,LOCATION_HAND) -end -function c57782164.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c57782164.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - local tc=g:GetFirst() - if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CHANGE_LEVEL) - e1:SetValue(4) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1,true) - Duel.SpecialSummonComplete() - end -end diff --git a/script/c57784563.lua b/script/c57784563.lua deleted file mode 100644 index a0098c9c67..0000000000 --- a/script/c57784563.lua +++ /dev/null @@ -1,69 +0,0 @@ ---闇魔界の戦士長 ダークソード -function c57784563.initial_effect(c) - --equip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(57784563,0)) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCondition(c57784563.eqcon) - e1:SetCost(c57784563.eqcost) - e1:SetTarget(c57784563.eqtg) - e1:SetOperation(c57784563.eqop) - c:RegisterEffect(e1) -end -function c57784563.eqcon(e,tp,eg,ep,ev,re,r,rp) - local ec=e:GetLabelObject() - return ec==nil or ec:GetFlagEffect(57784563)==0 -end -function c57784563.cfilter(c) - return c:IsAttribute(ATTRIBUTE_DARK) and c:IsAbleToRemoveAsCost() -end -function c57784563.eqcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c57784563.cfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c57784563.cfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c57784563.filter(c) - return c:IsFaceup() and c:IsLevelBelow(4) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsAbleToChangeControler() -end -function c57784563.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c57784563.filter(chkc) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingTarget(c57784563.filter,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local g=Duel.SelectTarget(tp,c57784563.filter,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0) -end -function c57784563.eqlimit(e,c) - return e:GetOwner()==c -end -function c57784563.eqop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) and tc:IsType(TYPE_MONSTER) then - if c:IsFaceup() and c:IsRelateToEffect(e) then - if not Duel.Equip(tp,tc,c,false) then return end - --Add Equip limit - tc:RegisterFlagEffect(57784563,RESET_EVENT+0x1fe0000,0,0) - e:SetLabelObject(tc) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetProperty(EFFECT_FLAG_COPY_INHERIT+EFFECT_FLAG_OWNER_RELATE) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(c57784563.eqlimit) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetProperty(EFFECT_FLAG_OWNER_RELATE+EFFECT_FLAG_IGNORE_IMMUNE) - e2:SetCode(EFFECT_DESTROY_SUBSTITUTE) - e2:SetReset(RESET_EVENT+0x1fe0000) - e2:SetValue(1) - tc:RegisterEffect(e2) - else Duel.SendtoGrave(tc,REASON_EFFECT) end - end -end diff --git a/script/c57793869.lua b/script/c57793869.lua deleted file mode 100644 index 1f4d545459..0000000000 --- a/script/c57793869.lua +++ /dev/null @@ -1,82 +0,0 @@ ---邪神イレイザー -function c57793869.initial_effect(c) - --summon with 3 tribute - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_LIMIT_SUMMON_PROC) - e1:SetCondition(c57793869.ttcon) - e1:SetOperation(c57793869.ttop) - e1:SetValue(SUMMON_TYPE_ADVANCE) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_LIMIT_SET_PROC) - c:RegisterEffect(e2) - --cannot special summon - local e3=Effect.CreateEffect(c) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_SPSUMMON_CONDITION) - c:RegisterEffect(e3) - --atk - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetCode(EFFECT_SET_ATTACK) - e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e4:SetRange(LOCATION_MZONE) - e4:SetValue(c57793869.adval) - c:RegisterEffect(e4) - local e5=e4:Clone() - e5:SetCode(EFFECT_SET_DEFENCE) - c:RegisterEffect(e5) - --Eraser - local e6=Effect.CreateEffect(c) - e6:SetDescription(aux.Stringid(57793869,0)) - e6:SetCategory(CATEGORY_DESTROY) - e6:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e6:SetCode(EVENT_TO_GRAVE) - e6:SetCondition(c57793869.erascon) - e6:SetTarget(c57793869.erastg) - e6:SetOperation(c57793869.erasop) - c:RegisterEffect(e6) - --suicide - local e7=Effect.CreateEffect(c) - e7:SetDescription(aux.Stringid(57793869,1)) - e7:SetType(EFFECT_TYPE_IGNITION) - e7:SetCategory(CATEGORY_DESTROY) - e7:SetRange(LOCATION_MZONE) - e7:SetTarget(c57793869.destg) - e7:SetOperation(c57793869.desop) - c:RegisterEffect(e7) -end -function c57793869.ttcon(e,c) - if c==nil then return true end - return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-3 and Duel.GetTributeCount(c)>=3 -end -function c57793869.ttop(e,tp,eg,ep,ev,re,r,rp,c) - local g=Duel.SelectTribute(tp,c,3,3) - c:SetMaterial(g) - Duel.Release(g,REASON_SUMMON+REASON_MATERIAL) -end -function c57793869.adval(e,c) - return Duel.GetFieldGroupCount(c:GetControler(),0,LOCATION_ONFIELD)*1000 -end -function c57793869.erascon(e) - return e:GetHandler():IsReason(REASON_DESTROY) -end -function c57793869.erastg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local dg=Duel.GetMatchingGroup(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,dg,dg:GetCount(),0,0) -end -function c57793869.erasop(e,tp,eg,ep,ev,re,r,rp) - local dg=Duel.GetMatchingGroup(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) - Duel.Destroy(dg,REASON_EFFECT) -end -function c57793869.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsDestructable() end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0) -end -function c57793869.desop(e,tp,eg,ep,ev,re,r,rp) - Duel.Destroy(e:GetHandler(),REASON_EFFECT) -end \ No newline at end of file diff --git a/script/c5780210.lua b/script/c5780210.lua deleted file mode 100644 index 89ff8fe4be..0000000000 --- a/script/c5780210.lua +++ /dev/null @@ -1,19 +0,0 @@ ---クリエイト・リゾネーター -function c5780210.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c5780210.spcon) - c:RegisterEffect(e1) -end -function c5780210.cfilter(c) - return c:IsFaceup() and c:IsLevelAbove(8) and c:IsType(TYPE_SYNCHRO) -end -function c5780210.spcon(e,c) - if c==nil then return true end - return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c5780210.cfilter,c:GetControler(),LOCATION_MZONE,0,1,nil) -end diff --git a/script/c57815601.lua b/script/c57815601.lua deleted file mode 100644 index 6d9c0c5239..0000000000 --- a/script/c57815601.lua +++ /dev/null @@ -1,57 +0,0 @@ ---霊獣の騎襲 -function c57815601.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCountLimit(1,57815601+EFFECT_COUNT_CODE_OATH) - e1:SetTarget(c57815601.target) - e1:SetOperation(c57815601.activate) - c:RegisterEffect(e1) -end -function c57815601.filter1(c,e,tp) - return c:IsSetCard(0x10b5) and (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup()) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) - and Duel.IsExistingTarget(c57815601.filter2,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,c,e,tp) -end -function c57815601.filter2(c,e,tp) - return c:IsSetCard(0x20b5) and (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup()) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c57815601.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>1 - and Duel.IsExistingTarget(c57815601.filter1,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g1=Duel.SelectTarget(tp,c57815601.filter1,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,e,tp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g2=Duel.SelectTarget(tp,c57815601.filter2,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,g1:GetFirst(),e,tp) - g1:Merge(g2) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g1,2,0,0) -end -function c57815601.activate(e,tp,eg,ep,ev,re,r,rp) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ft<=0 then return end - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) - if g:GetCount()==0 then return end - if g:GetCount()<=ft then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENCE) - else - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=g:Select(tp,ft,ft,nil) - Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP_DEFENCE) - g:Sub(sg) - Duel.SendtoGrave(g,REASON_EFFECT) - end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetTargetRange(1,0) - e1:SetTarget(c57815601.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function c57815601.splimit(e,c) - return not c:IsSetCard(0xb5) -end diff --git a/script/c57827484.lua b/script/c57827484.lua deleted file mode 100644 index f53c61a9d5..0000000000 --- a/script/c57827484.lua +++ /dev/null @@ -1,36 +0,0 @@ ---シャドウ・ダイバー -function c57827484.initial_effect(c) - aux.EnableDualAttribute(c) - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(57827484,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c57827484.condition) - e1:SetTarget(c57827484.target) - e1:SetOperation(c57827484.operation) - c:RegisterEffect(e1) -end -function c57827484.condition(e,tp,eg,ep,ev,re,r,rp) - return aux.IsDualState(e) and Duel.GetCurrentPhase()==PHASE_MAIN1 -end -function c57827484.filter(c) - return c:IsFaceup() and c:IsLevelBelow(4) and c:IsAttribute(ATTRIBUTE_DARK) and not c:IsHasEffect(EFFECT_DIRECT_ATTACK) -end -function c57827484.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c57827484.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c57827484.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c57827484.filter,tp,LOCATION_MZONE,0,1,1,nil) -end -function c57827484.operation(e,tp,eg,ep,ev,re,r,rp,chk) - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DIRECT_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - end -end diff --git a/script/c57836546.lua b/script/c57836546.lua deleted file mode 100644 index f19a135995..0000000000 --- a/script/c57836546.lua +++ /dev/null @@ -1,77 +0,0 @@ ---エクシーズ・ダブル・バック -function c57836546.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c57836546.condition) - e1:SetTarget(c57836546.target) - e1:SetOperation(c57836546.activate) - c:RegisterEffect(e1) -end -function c57836546.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 -end -function c57836546.filter1(c,e,tp,turn) - return c:IsType(TYPE_XYZ) and c:IsReason(REASON_DESTROY) and c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_MZONE) - and c:IsPreviousPosition(POS_FACEUP) and c:GetTurnID()==turn and c:IsCanBeSpecialSummoned(e,0,tp,false,false) - and Duel.IsExistingTarget(c57836546.filter2,tp,LOCATION_GRAVE,0,1,c,e,tp,c:GetAttack()) -end -function c57836546.filter2(c,e,tp,atk) - return c:IsAttackBelow(atk) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c57836546.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>1 - and Duel.IsExistingTarget(c57836546.filter1,tp,LOCATION_GRAVE,0,1,nil,e,tp,Duel.GetTurnCount()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g1=Duel.SelectTarget(tp,c57836546.filter1,tp,LOCATION_GRAVE,0,1,1,nil,e,tp,Duel.GetTurnCount()) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g2=Duel.SelectTarget(tp,c57836546.filter2,tp,LOCATION_GRAVE,0,1,1,g1:GetFirst(),e,tp,g1:GetFirst():GetAttack()) - g1:Merge(g2) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g1,2,0,0) -end -function c57836546.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) - if g:GetCount()~=2 or Duel.GetLocationCount(tp,LOCATION_MZONE)<2 then return end - local fid=e:GetHandler():GetFieldID() - local tc=g:GetFirst() - while tc do - if Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then - tc:RegisterFlagEffect(57836546,RESET_EVENT+0x1fe0000,0,1,fid) - end - tc=g:GetNext() - end - Duel.SpecialSummonComplete() - g:KeepAlive() - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e1:SetCountLimit(1) - e1:SetCondition(c57836546.descon) - e1:SetOperation(c57836546.desop) - e1:SetLabel(fid) - e1:SetLabelObject(g) - Duel.RegisterEffect(e1,tp) -end -function c57836546.desfilter(c,fid) - return c:GetFlagEffectLabel(57836546)==fid -end -function c57836546.descon(e,tp,eg,ep,ev,re,r,rp) - local g=e:GetLabelObject() - if not g:IsExists(c57836546.desfilter,1,nil,e:GetLabel()) then - g:DeleteGroup() - e:Reset() - return false - else return true end -end -function c57836546.desop(e,tp,eg,ep,ev,re,r,rp) - local sg=e:GetLabelObject() - local dg=sg:Filter(c57836546.desfilter,nil,e:GetLabel()) - if dg:GetCount()>0 then - Duel.Destroy(dg,REASON_EFFECT) - end -end diff --git a/script/c57839750.lua b/script/c57839750.lua deleted file mode 100644 index 5640bdc266..0000000000 --- a/script/c57839750.lua +++ /dev/null @@ -1,33 +0,0 @@ ---グリズリーマザー -function c57839750.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(57839750,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetCondition(c57839750.condition) - e1:SetTarget(c57839750.target) - e1:SetOperation(c57839750.operation) - c:RegisterEffect(e1) -end -function c57839750.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsLocation(LOCATION_GRAVE) -end -function c57839750.filter(c,e,tp) - return c:IsAttackBelow(1500) and c:IsAttribute(ATTRIBUTE_WATER) - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c57839750.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c57839750.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c57839750.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c57839750.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_ATTACK) - end -end diff --git a/script/c57844634.lua b/script/c57844634.lua deleted file mode 100644 index 43e6f06f86..0000000000 --- a/script/c57844634.lua +++ /dev/null @@ -1,45 +0,0 @@ ---素早いムササビ -function c57844634.initial_effect(c) - --battle destroyed - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(57844634,0)) - e1:SetCategory(CATEGORY_DAMAGE+CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetCondition(c57844634.condition) - e1:SetTarget(c57844634.target) - e1:SetOperation(c57844634.operation) - c:RegisterEffect(e1) - -- - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_UNRELEASABLE_SUM) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetValue(1) - c:RegisterEffect(e2) -end -function c57844634.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) -end -function c57844634.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,500) -end -function c57844634.filter(c,e,tp) - return c:IsCode(57844634) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK,1-tp) -end -function c57844634.operation(e,tp,eg,ep,ev,re,r,rp) - local ft=Duel.GetLocationCount(1-tp,LOCATION_MZONE) - Duel.Damage(1-tp,500,REASON_EFFECT) - if ft<=0 then return end - local g=Duel.GetMatchingGroup(c57844634.filter,tp,LOCATION_DECK,0,nil,e,tp) - if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(57844634,1)) then - Duel.BreakEffect() - Duel.SpecialSummonStep(g:GetFirst(),0,tp,1-tp,false,false,POS_FACEUP_ATTACK) - if ft>1 and g:GetCount()>1 and Duel.SelectYesNo(tp,aux.Stringid(57844634,1)) then - Duel.SpecialSummonStep(g:GetNext(),0,tp,1-tp,false,false,POS_FACEUP_ATTACK) - end - Duel.SpecialSummonComplete() - end -end diff --git a/script/c57882509.lua b/script/c57882509.lua deleted file mode 100644 index 14d4c99f27..0000000000 --- a/script/c57882509.lua +++ /dev/null @@ -1,27 +0,0 @@ ---弱体化の仮面 -function c57882509.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_BE_BATTLE_TARGET) - e1:SetTarget(c57882509.target) - e1:SetOperation(c57882509.activate) - c:RegisterEffect(e1) -end -function c57882509.target(e,tp,eg,ep,ev,re,r,rp,chk) - local tc=Duel.GetAttacker() - if chk==0 then return tc:IsOnField() end - tc:CreateEffectRelation(e) -end -function c57882509.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetAttacker() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(-700) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - end -end diff --git a/script/c57902193.lua b/script/c57902193.lua deleted file mode 100644 index 71a646e339..0000000000 --- a/script/c57902193.lua +++ /dev/null @@ -1,39 +0,0 @@ ---苦渋の転生 -function c57902193.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1) - e1:SetTarget(c57902193.target) - e1:SetOperation(c57902193.activate) - c:RegisterEffect(e1) -end -function c57902193.filter(c) - return c:IsType(TYPE_MONSTER) and c:IsAbleToHand() -end -function c57902193.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c57902193.filter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE) -end -function c57902193.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(1-tp,c57902193.filter,tp,LOCATION_GRAVE,0,1,1,nil) - local tc=g:GetFirst() - if tc then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetRange(LOCATION_GRAVE) - e1:SetCountLimit(1) - e1:SetOperation(c57902193.thop) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - end -end -function c57902193.thop(e,tp,eg,ep,ev,re,r,rp) - if Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT)~=0 then - Duel.ConfirmCards(1-tp,e:GetHandler()) - end -end diff --git a/script/c57902462.lua b/script/c57902462.lua deleted file mode 100644 index 8566c2659d..0000000000 --- a/script/c57902462.lua +++ /dev/null @@ -1,28 +0,0 @@ ---聖導騎士イシュザーク -function c57902462.initial_effect(c) - --remove - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(57902462,0)) - e1:SetCategory(CATEGORY_REMOVE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_BATTLED) - e1:SetCondition(c57902462.condition) - e1:SetTarget(c57902462.target) - e1:SetOperation(c57902462.operation) - c:RegisterEffect(e1) -end -function c57902462.condition(e,tp,eg,ep,ev,re,r,rp) - local bc=e:GetHandler():GetBattleTarget() - return bc and bc:IsStatus(STATUS_BATTLE_DESTROYED) -end -function c57902462.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local bc=e:GetHandler():GetBattleTarget() - Duel.SetOperationInfo(0,CATEGORY_REMOVE,bc,1,0,0) -end -function c57902462.operation(e,tp,eg,ep,ev,re,r,rp) - local bc=e:GetHandler():GetBattleTarget() - if bc:IsRelateToBattle() then - Duel.Remove(bc,POS_FACEUP,REASON_EFFECT) - end -end diff --git a/script/c57953380.lua b/script/c57953380.lua deleted file mode 100644 index 3c20526aa6..0000000000 --- a/script/c57953380.lua +++ /dev/null @@ -1,37 +0,0 @@ ---生還の宝札 -function c57953380.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --draw - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(57953380,0)) - e2:SetCategory(CATEGORY_DRAW) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetRange(LOCATION_SZONE) - e2:SetCondition(c57953380.con) - e2:SetTarget(c57953380.tg) - e2:SetOperation(c57953380.op) - c:RegisterEffect(e2) -end -function c57953380.gfilter(c,tp) - return c:IsPreviousLocation(LOCATION_GRAVE) and c:GetPreviousControler()==tp -end -function c57953380.con(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c57953380.gfilter,1,nil,tp) -end -function c57953380.tg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(1) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c57953380.op(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end diff --git a/script/c5795980.lua b/script/c5795980.lua deleted file mode 100644 index 9da2b1cbc5..0000000000 --- a/script/c5795980.lua +++ /dev/null @@ -1,119 +0,0 @@ ---帝王の轟毅 -function c5795980.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DISABLE+CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetHintTiming(0,0x1e0) - e1:SetCost(c5795980.cost) - e1:SetTarget(c5795980.target) - e1:SetOperation(c5795980.activate) - c:RegisterEffect(e1) - -- - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(5795980,0)) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_GRAVE) - e2:SetCost(c5795980.atcost) - e2:SetTarget(c5795980.attg) - e2:SetOperation(c5795980.atop) - c:RegisterEffect(e2) -end -function c5795980.cost(e,tp,eg,ep,ev,re,r,rp,chk) - e:SetLabel(1) - return true -end -function c5795980.cfilter(c,e,dg) - if c:IsFacedown() or not c:IsLevelAbove(5) or bit.band(c:GetSummonType(),SUMMON_TYPE_NORMAL)==0 then return false end - local a=0 - if dg:IsContains(c) then a=1 end - if c:GetEquipCount()==0 then return dg:GetCount()-a>=1 end - local eg=c:GetEquipGroup() - local tc=eg:GetFirst() - while tc do - if dg:IsContains(tc) then a=a+1 end - tc=eg:GetNext() - end - return dg:GetCount()-a>=1 -end -function c5795980.tgfilter(c,e) - return aux.disfilter1(c) and c:IsCanBeEffectTarget(e) -end -function c5795980.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and c5795980.tgfilter(chkc,e) and chkc~=e:GetHandler() end - if chk==0 then - if not Duel.IsPlayerCanDraw(tp,1) then return false end - if e:GetLabel()==1 then - e:SetLabel(0) - local rg=Duel.GetReleaseGroup(tp) - local dg=Duel.GetMatchingGroup(c5795980.tgfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler(),e) - return rg:IsExists(c5795980.cfilter,1,e:GetHandler(),e,dg) - else - return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) - end - end - if e:GetLabel()==1 then - e:SetLabel(0) - local rg=Duel.GetReleaseGroup(tp) - local dg=Duel.GetMatchingGroup(c5795980.tgfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler(),e) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) - local sg=rg:FilterSelect(tp,c5795980.cfilter,1,1,e:GetHandler(),e,dg) - Duel.Release(sg,REASON_COST) - end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,g:GetCount(),0,0) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c5795980.activate(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and ((tc:IsFaceup() and not tc:IsDisabled()) or tc:IsType(TYPE_TRAPMONSTER)) then - Duel.NegateRelatedChain(tc,RESET_TURN_SET) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetValue(RESET_TURN_SET) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - tc:RegisterEffect(e2) - if tc:IsType(TYPE_TRAPMONSTER) then - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_DISABLE_TRAPMONSTER) - e3:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - tc:RegisterEffect(e3) - end - Duel.BreakEffect() - Duel.Draw(tp,1,REASON_EFFECT) - end -end -function c5795980.atcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) -end -function c5795980.attg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,nil) end - Duel.Hint(HINT_SELECTMSG,tp,562) - local rc=Duel.AnnounceAttribute(tp,1,0xffff) - e:SetLabel(rc) -end -function c5795980.atop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - local tc=g:GetFirst() - while tc do - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CHANGE_ATTRIBUTE) - e1:SetValue(e:GetLabel()) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - tc=g:GetNext() - end -end diff --git a/script/c57962537.lua b/script/c57962537.lua deleted file mode 100644 index 6843d91040..0000000000 --- a/script/c57962537.lua +++ /dev/null @@ -1,37 +0,0 @@ ---ゼンマイネズミ -function c57962537.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(57962537,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_NO_TURN_RESET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCondition(c57962537.spcon) - e1:SetTarget(c57962537.sptg) - e1:SetOperation(c57962537.spop) - c:RegisterEffect(e1) -end -function c57962537.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPosition(POS_FACEUP_ATTACK) -end -function c57962537.filter(c,e,tp) - return c:IsSetCard(0x58) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c57962537.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c57962537.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c57962537.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c57962537.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c57962537.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and c:IsPosition(POS_FACEUP_ATTACK) and c:IsControler(tp) and tc:IsRelateToEffect(e) then - Duel.ChangePosition(c,POS_FACEUP_DEFENCE) - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENCE) - end -end diff --git a/script/c57996334.lua b/script/c57996334.lua deleted file mode 100644 index e9649644e2..0000000000 --- a/script/c57996334.lua +++ /dev/null @@ -1,59 +0,0 @@ ---ドドドバスター -function c57996334.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c57996334.spcon) - e1:SetOperation(c57996334.spop) - c:RegisterEffect(e1) - --summon success - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(57996334,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_SUMMON_SUCCESS) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCondition(c57996334.sumcon) - e2:SetTarget(c57996334.sumtg) - e2:SetOperation(c57996334.sumop) - c:RegisterEffect(e2) -end -function c57996334.spcon(e,c) - if c==nil then return true end - return Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0)==0 - and Duel.GetFieldGroupCount(c:GetControler(),0,LOCATION_MZONE)>0 - and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 -end -function c57996334.spop(e,tp,eg,ep,ev,re,r,rp,c) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetReset(RESET_EVENT+0xff0000) - e1:SetCode(EFFECT_CHANGE_LEVEL) - e1:SetValue(4) - c:RegisterEffect(e1) -end -function c57996334.sumcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_ADVANCE -end -function c57996334.filter(c,e,tp) - return c:IsSetCard(0x82) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c57996334.sumtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c57996334.filter(chkc,e,tp) end - if chk==0 then return Duel.IsExistingTarget(c57996334.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) - and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c57996334.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c57996334.sumop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENCE) - end -end diff --git a/script/c58012107.lua b/script/c58012107.lua deleted file mode 100644 index 778e21245d..0000000000 --- a/script/c58012107.lua +++ /dev/null @@ -1,36 +0,0 @@ ---エーリアン・サイコ -function c58012107.initial_effect(c) - --to defence - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(58012107,0)) - e1:SetCategory(CATEGORY_POSITION) - e1:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_SINGLE) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c58012107.potg) - e1:SetOperation(c58012107.poop) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - c:RegisterEffect(e2) - --cannot attack announce - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetRange(LOCATION_MZONE) - e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e3:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE) - e3:SetTarget(c58012107.atktg) - c:RegisterEffect(e3) -end -function c58012107.potg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAttackPos() end - Duel.SetOperationInfo(0,CATEGORY_POSITION,e:GetHandler(),1,0,0) -end -function c58012107.poop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFaceup() and c:IsAttackPos() and c:IsRelateToEffect(e) then - Duel.ChangePosition(c,POS_FACEUP_DEFENCE) - end -end -function c58012107.atktg(e,c) - return c:GetCounter(0xe)>0 -end diff --git a/script/c58015506.lua b/script/c58015506.lua deleted file mode 100644 index ab647fca26..0000000000 --- a/script/c58015506.lua +++ /dev/null @@ -1,21 +0,0 @@ ---ピケルの読心術 -function c58015506.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetOperation(c58015506.activate) - c:RegisterEffect(e1) -end -function c58015506.activate(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_DRAW) - e1:SetOperation(c58015506.cfop) - e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN,2) - Duel.RegisterEffect(e1,tp) -end -function c58015506.cfop(e,tp,eg,ep,ev,re,r,rp) - if ep==e:GetOwnerPlayer() then return end - Duel.ConfirmCards(1-ep,eg) -end diff --git a/script/c58016954.lua b/script/c58016954.lua deleted file mode 100644 index 7108aac5c1..0000000000 --- a/script/c58016954.lua +++ /dev/null @@ -1,63 +0,0 @@ ---イェシャドール-セフィラナーガ -function c58016954.initial_effect(c) - --pendulum summon - aux.AddPendulumProcedure(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --splimit - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetRange(LOCATION_PZONE) - e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE) - e2:SetTargetRange(1,0) - e2:SetTarget(c58016954.splimit) - e2:SetCondition(aux.nfbdncon) - c:RegisterEffect(e2) - --spsummon - local e3=Effect.CreateEffect(c) - e3:SetCategory(CATEGORY_TOHAND) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - e3:SetCountLimit(1,58016954) - e3:SetCondition(c58016954.condition1) - e3:SetTarget(c58016954.target) - e3:SetOperation(c58016954.operation) - c:RegisterEffect(e3) - local e4=e3:Clone() - e4:SetCode(EVENT_TO_GRAVE) - e4:SetCondition(aux.TRUE) - c:RegisterEffect(e4) -end -function c58016954.splimit(e,c,sump,sumtype,sumpos,targetp) - if c:IsSetCard(0x9d) or c:IsSetCard(0xc4) then return false end - return bit.band(sumtype,SUMMON_TYPE_PENDULUM)==SUMMON_TYPE_PENDULUM -end -function c58016954.condition1(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_PENDULUM -end -function c58016954.cfilter(c) - return (c:GetSequence()==6 or c:GetSequence()==7) and c:IsSetCard(0xc4) -end -function c58016954.filter(c) - return (c:GetSequence()==6 or c:GetSequence()==7) and c:IsAbleToHand() -end -function c58016954.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_SZONE) and c58016954.filter(chkc) end - if chk==0 then return Duel.IsExistingMatchingCard(c58016954.cfilter,tp,LOCATION_SZONE,0,1,nil) - and Duel.IsExistingTarget(c58016954.filter,tp,LOCATION_SZONE,LOCATION_SZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g=Duel.SelectTarget(tp,c58016954.filter,tp,LOCATION_SZONE,LOCATION_SZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c58016954.operation(e,tp,eg,ep,ev,re,r,rp) - if not Duel.IsExistingMatchingCard(c58016954.cfilter,tp,LOCATION_SZONE,0,1,nil) then return end - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - end -end diff --git a/script/c58054262.lua b/script/c58054262.lua deleted file mode 100644 index 2ec12c9cef..0000000000 --- a/script/c58054262.lua +++ /dev/null @@ -1,64 +0,0 @@ ---マシンナーズ・フォース -function c58054262.initial_effect(c) - c:EnableReviveLimit() - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - c:RegisterEffect(e1) - --attack cost - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_ATTACK_COST) - e2:SetCost(c58054262.atcost) - e2:SetOperation(c58054262.atop) - c:RegisterEffect(e2) - --special summon - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(58054262,0)) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetRange(LOCATION_MZONE) - e3:SetCost(c58054262.spcost) - e3:SetTarget(c58054262.sptg) - e3:SetOperation(c58054262.spop) - c:RegisterEffect(e3) -end -function c58054262.atcost(e,c,tp) - return Duel.CheckLPCost(tp,1000) -end -function c58054262.atop(e,tp,eg,ep,ev,re,r,rp) - Duel.PayLPCost(tp,1000) -end -function c58054262.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end -function c58054262.filter(c,code,e,tp) - return c:IsCode(code) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c58054262.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>=2 - and Duel.IsExistingTarget(c58054262.filter,tp,LOCATION_GRAVE,0,1,nil,60999392,e,tp) - and Duel.IsExistingTarget(c58054262.filter,tp,LOCATION_GRAVE,0,1,nil,23782705,e,tp) - and Duel.IsExistingTarget(c58054262.filter,tp,LOCATION_GRAVE,0,1,nil,96384007,e,tp) - end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g1=Duel.SelectTarget(tp,c58054262.filter,tp,LOCATION_GRAVE,0,1,1,nil,60999392,e,tp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g2=Duel.SelectTarget(tp,c58054262.filter,tp,LOCATION_GRAVE,0,1,1,nil,23782705,e,tp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g3=Duel.SelectTarget(tp,c58054262.filter,tp,LOCATION_GRAVE,0,1,1,nil,96384007,e,tp) - g1:Merge(g2) - g1:Merge(g3) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g1,3,0,0) -end -function c58054262.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<3 then return end - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - if g:FilterCount(Card.IsRelateToEffect,nil,e)~=3 then return end - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) -end diff --git a/script/c58058134.lua b/script/c58058134.lua deleted file mode 100644 index 00bf0fe144..0000000000 --- a/script/c58058134.lua +++ /dev/null @@ -1,53 +0,0 @@ ---シャイニート・マジシャン -function c58058134.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,1,2) - c:EnableReviveLimit() - --battle indes - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_INDESTRUCTABLE_COUNT) - e1:SetCountLimit(1) - e1:SetValue(c58058134.valcon) - c:RegisterEffect(e1) - --negate - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(58058134,0)) - e2:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_CHAINING) - e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) - e2:SetRange(LOCATION_MZONE) - e2:SetCondition(c58058134.negcon) - e2:SetCost(c58058134.negcost) - e2:SetTarget(c58058134.negtg) - e2:SetOperation(c58058134.negop) - c:RegisterEffect(e2) -end -function c58058134.valcon(e,re,r,rp) - return bit.band(r,REASON_BATTLE)~=0 -end -function c58058134.negcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsStatus(STATUS_BATTLE_DESTROYED) or not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end - local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) - return g and g:IsContains(c) -end -function c58058134.negcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c58058134.negtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - if re:GetHandler():IsRelateToEffect(re) and re:GetHandler():IsDestructable() then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) - end -end -function c58058134.negop(e,tp,eg,ep,ev,re,r,rp) - if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(re:GetHandler(),REASON_EFFECT) - end -end diff --git a/script/c58069384.lua b/script/c58069384.lua deleted file mode 100644 index f612f19231..0000000000 --- a/script/c58069384.lua +++ /dev/null @@ -1,106 +0,0 @@ ---サイバー・ドラゴン・ノヴァ -function c58069384.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsRace,RACE_MACHINE),5,2) - c:EnableReviveLimit() - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(58069384,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCost(c58069384.cost) - e1:SetTarget(c58069384.target) - e1:SetOperation(c58069384.operation) - c:RegisterEffect(e1) - --atkup - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(58069384,1)) - e2:SetCategory(CATEGORY_ATKCHANGE) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetHintTiming(TIMING_DAMAGE_STEP) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCondition(c58069384.atkcon) - e2:SetCost(c58069384.atkcost) - e2:SetOperation(c58069384.atkop) - c:RegisterEffect(e2) - --spsummon2 - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(58069384,2)) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e3:SetCode(EVENT_TO_GRAVE) - e3:SetCondition(c58069384.spcon) - e3:SetTarget(c58069384.sptg) - e3:SetOperation(c58069384.spop) - c:RegisterEffect(e3) -end -function c58069384.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c58069384.filter(c,e,tp) - return c:IsCode(70095154) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c58069384.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c58069384.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c58069384.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c58069384.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c58069384.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end -function c58069384.atkcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end -function c58069384.atkfilter(c) - return c:IsCode(70095154) and c:IsAbleToRemoveAsCost() and (not c:IsOnField() or c:IsFaceup()) -end -function c58069384.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c58069384.atkfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c58069384.atkfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c58069384.atkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFaceup() and c:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(2100) - e1:SetReset(RESET_EVENT+0x1ff0000+RESET_PHASE+PHASE_END) - c:RegisterEffect(e1) - end -end -function c58069384.spcon(e,tp,eg,ep,ev,re,r,rp) - return rp~=tp and bit.band(r,REASON_EFFECT)~=0 and e:GetHandler():GetPreviousControler()==tp -end -function c58069384.spfilter(c,e,tp) - return c:IsType(TYPE_FUSION) and c:IsRace(RACE_MACHINE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c58069384.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c58069384.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function c58069384.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c58069384.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c58071123.lua b/script/c58071123.lua deleted file mode 100644 index 340cc90593..0000000000 --- a/script/c58071123.lua +++ /dev/null @@ -1,24 +0,0 @@ ---オキシゲドン -function c58071123.initial_effect(c) - --damage - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(58071123,0)) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetCondition(c58071123.damcon) - e1:SetTarget(c58071123.damtg) - e1:SetOperation(c58071123.damop) - c:RegisterEffect(e1) -end -function c58071123.damcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():GetBattleTarget():IsRace(RACE_PYRO) -end -function c58071123.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,PLAYER_ALL,800) -end -function c58071123.damop(e,tp,eg,ep,ev,re,r,rp) - Duel.Damage(tp,800,REASON_EFFECT) - Duel.Damage(1-tp,800,REASON_EFFECT) -end diff --git a/script/c58074572.lua b/script/c58074572.lua deleted file mode 100644 index 482b2d847d..0000000000 --- a/script/c58074572.lua +++ /dev/null @@ -1,24 +0,0 @@ ---モウヤンのカレー -function c58074572.initial_effect(c) - --recover - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCategory(CATEGORY_RECOVER) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c58074572.rectg) - e1:SetOperation(c58074572.recop) - c:RegisterEffect(e1) -end -function c58074572.rectg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local opt=Duel.SelectOption(tp,aux.Stringid(58074572,0),aux.Stringid(58074572,1)) - local p=(opt==0 and tp or 1-tp) - Duel.SetTargetPlayer(p) - Duel.SetTargetParam(200) - Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,p,200) -end -function c58074572.recop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Recover(p,d,REASON_EFFECT) -end diff --git a/script/c58098303.lua b/script/c58098303.lua deleted file mode 100644 index 1be2edd6a6..0000000000 --- a/script/c58098303.lua +++ /dev/null @@ -1,29 +0,0 @@ ---フレイム・オーガ -function c58098303.initial_effect(c) - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - c:RegisterEffect(e1) - --draw - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(58098303,0)) - e2:SetCategory(CATEGORY_DRAW) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetCode(EVENT_SUMMON_SUCCESS) - e2:SetTarget(c58098303.target) - e2:SetOperation(c58098303.operation) - c:RegisterEffect(e2) -end -function c58098303.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(1) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c58098303.operation(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end diff --git a/script/c581014.lua b/script/c581014.lua deleted file mode 100644 index ef4c46a12c..0000000000 --- a/script/c581014.lua +++ /dev/null @@ -1,74 +0,0 @@ ---ダイガスタ・エメラル -function c581014.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,4,2) - c:EnableReviveLimit() - --ret&draw - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(581014,1)) - e1:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE) - e1:SetCost(c581014.cost) - e1:SetTarget(c581014.target1) - e1:SetOperation(c581014.operation1) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(581014,2)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE) - e2:SetCost(c581014.cost) - e2:SetTarget(c581014.target2) - e2:SetOperation(c581014.operation2) - c:RegisterEffect(e2) -end -function c581014.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c581014.filter1(c) - return c:IsType(TYPE_MONSTER) and c:IsAbleToDeck() -end -function c581014.filter2(c,e,tp) - return not c:IsType(TYPE_EFFECT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c581014.target1(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c581014.filter1(chkc) end - if chk==0 then return Duel.IsPlayerCanDraw(tp,1) and Duel.IsExistingTarget(c581014.filter1,tp,LOCATION_GRAVE,0,3,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectTarget(tp,c581014.filter1,tp,LOCATION_GRAVE,0,3,3,nil) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c581014.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c581014.filter2(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c581014.filter2,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c581014.filter2,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c581014.tgfilter(c,e) - return not c:IsRelateToEffect(e) -end -function c581014.operation1(e,tp,eg,ep,ev,re,r,rp) - local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - if tg:IsExists(c581014.tgfilter,1,nil,e) then return end - Duel.SendtoDeck(tg,nil,0,REASON_EFFECT) - Duel.ShuffleDeck(tp) - Duel.BreakEffect() - Duel.Draw(tp,1,REASON_EFFECT) -end -function c581014.operation2(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c58120309.lua b/script/c58120309.lua deleted file mode 100644 index 69956f0e0c..0000000000 --- a/script/c58120309.lua +++ /dev/null @@ -1,43 +0,0 @@ ---スターライト・ロード -function c58120309.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DISABLE+CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_CHAINING) - e1:SetCondition(c58120309.condition) - e1:SetTarget(c58120309.target) - e1:SetOperation(c58120309.activate) - c:RegisterEffect(e1) -end -function c58120309.filter(c,p) - return c:GetControler()==p and c:IsOnField() -end -function c58120309.condition(e,tp,eg,ep,ev,re,r,rp) - if not Duel.IsChainNegatable(ev) then return false end - local ex,tg,tc=Duel.GetOperationInfo(ev,CATEGORY_DESTROY) - return ex and tg~=nil and tc+tg:FilterCount(c58120309.filter,nil,tp)-tg:GetCount()>1 -end -function c58120309.sfilter(c,e,tp) - return c:GetCode()==44508094 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c58120309.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0) - if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) - end -end -function c58120309.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=re:GetHandler() - if not tc:IsDisabled() then - Duel.NegateEffect(ev) - if tc:IsRelateToEffect(re) and Duel.Destroy(eg,REASON_EFFECT)~=0 then - local sc=Duel.GetFirstMatchingCard(c58120309.sfilter,tp,LOCATION_EXTRA,0,nil,e,tp) - if sc and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.SelectYesNo(tp,aux.Stringid(58120309,0)) then - Duel.BreakEffect() - Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP) - end - end - end -end diff --git a/script/c58131925.lua b/script/c58131925.lua deleted file mode 100644 index 6248c2c92e..0000000000 --- a/script/c58131925.lua +++ /dev/null @@ -1,45 +0,0 @@ ---BF-極夜のダマスカス -function c58131925.initial_effect(c) - --atkup - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(58131925,0)) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetRange(LOCATION_HAND) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCondition(c58131925.condition) - e1:SetCost(c58131925.cost) - e1:SetTarget(c58131925.target) - e1:SetOperation(c58131925.operation) - c:RegisterEffect(e1) -end -function c58131925.condition(e,tp,eg,ep,ev,re,r,rp) - local phase=Duel.GetCurrentPhase() - return phase~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end -function c58131925.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsDiscardable() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD) -end -function c58131925.filter(c) - return c:IsFaceup() and c:IsSetCard(0x33) -end -function c58131925.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c58131925.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c58131925.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - Duel.SelectTarget(tp,c58131925.filter,tp,LOCATION_MZONE,0,1,1,nil) -end -function c58131925.operation(e,tp,eg,ep,ev,re,r,rp,chk) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(500) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - end -end diff --git a/script/c58132856.lua b/script/c58132856.lua deleted file mode 100644 index 0ca4635d54..0000000000 --- a/script/c58132856.lua +++ /dev/null @@ -1,71 +0,0 @@ ---トイ・マジシャン -function c58132856.initial_effect(c) - --Set - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_MONSTER_SSET) - e1:SetValue(TYPE_SPELL) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetOperation(c58132856.regop) - c:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(58132856,0)) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e3:SetCode(EVENT_PHASE+PHASE_END) - e3:SetRange(LOCATION_GRAVE) - e3:SetCountLimit(1) - e3:SetTarget(c58132856.sptg) - e3:SetOperation(c58132856.spop) - c:RegisterEffect(e3) - --destroy - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(58132856,1)) - e4:SetCategory(CATEGORY_DESTROY) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e4:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - e4:SetTarget(c58132856.destg) - e4:SetOperation(c58132856.desop) - c:RegisterEffect(e4) -end -function c58132856.regop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsPreviousLocation(LOCATION_SZONE) and c:IsPreviousPosition(POS_FACEDOWN) - and c:IsReason(REASON_EFFECT) and c:IsReason(REASON_DESTROY) and rp~=tp then - c:RegisterFlagEffect(58132856,RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END,0,0) - end -end -function c58132856.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():GetFlagEffect(58132856)>0 end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c58132856.spop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP) - end -end -function c58132856.cfilter(c) - return c:IsFaceup() and c:IsCode(58132856) -end -function c58132856.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable() -end -function c58132856.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local ct=Duel.GetMatchingGroupCount(c58132856.cfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) - local g=Duel.GetMatchingGroup(c58132856.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) - if ct>g:GetCount() then ct=g:GetCount() end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,ct,0,0) -end -function c58132856.desop(e,tp,eg,ep,ev,re,r,rp) - local ct=Duel.GetMatchingGroupCount(c58132856.cfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) - if ct==0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectMatchingCard(tp,c58132856.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,ct,ct,nil) - Duel.HintSelection(g) - Duel.Destroy(g,REASON_EFFECT) -end diff --git a/script/c58139128.lua b/script/c58139128.lua deleted file mode 100644 index 44401b4d92..0000000000 --- a/script/c58139128.lua +++ /dev/null @@ -1,66 +0,0 @@ ---墓守の祈祷師 -function c58139128.initial_effect(c) - --def up - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_DEFENCE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetValue(c58139128.defval) - c:RegisterEffect(e1) - --disable - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EVENT_CHAIN_ACTIVATING) - e2:SetOperation(c58139128.disop) - c:RegisterEffect(e2) - --cannot activate - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetCode(EFFECT_CANNOT_ACTIVATE) - e3:SetRange(LOCATION_MZONE) - e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e3:SetTargetRange(0,1) - e3:SetCondition(c58139128.econ) - e3:SetValue(c58139128.efilter1) - c:RegisterEffect(e3) - -- - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_FIELD) - e4:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - e4:SetRange(LOCATION_MZONE) - e4:SetProperty(EFFECT_FLAG_IGNORE_RANGE+EFFECT_FLAG_SET_AVAILABLE) - e4:SetCondition(c58139128.econ) - e4:SetTarget(c58139128.etarget) - e4:SetValue(c58139128.efilter2) - c:RegisterEffect(e4) -end -function c58139128.filter(c) - return c:IsSetCard(0x2e) and c:IsType(TYPE_MONSTER) -end -function c58139128.defval(e,c) - return Duel.GetMatchingGroupCount(c58139128.filter,c:GetControler(),LOCATION_GRAVE,0,nil)*200 -end -function c58139128.disop(e,tp,eg,ep,ev,re,r,rp) - local loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION) - if re:IsActiveType(TYPE_MONSTER) and not re:GetHandler():IsSetCard(0x2e) and loc==LOCATION_GRAVE then - Duel.NegateEffect(ev) - end -end -function c58139128.actfilter(c) - return c:IsFaceup() and c:IsCode(47355498) -end -function c58139128.econ(e) - return Duel.IsExistingMatchingCard(c58139128.actfilter,0,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) - or Duel.IsEnvironment(47355498) -end -function c58139128.efilter1(e,re,tp) - return re:GetHandler():IsType(TYPE_FIELD) and re:IsHasType(EFFECT_TYPE_ACTIVATE) -end -function c58139128.etarget(e,c) - return c:IsType(TYPE_FIELD) -end -function c58139128.efilter2(e,re,tp) - return e:GetOwnerPlayer()~=re:GetOwnerPlayer() -end diff --git a/script/c58147549.lua b/script/c58147549.lua deleted file mode 100644 index 55d7192a3f..0000000000 --- a/script/c58147549.lua +++ /dev/null @@ -1,22 +0,0 @@ ---M・HERO 剛火 -function c58147549.initial_effect(c) - c:EnableReviveLimit() - --spsummon condition - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(aux.FALSE) - c:RegisterEffect(e1) - --atkup - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(c58147549.atkup) - c:RegisterEffect(e2) -end -function c58147549.atkup(e,c) - return Duel.GetMatchingGroupCount(Card.IsSetCard,c:GetControler(),LOCATION_GRAVE,0,nil,0x8)*100 -end diff --git a/script/c58165765.lua b/script/c58165765.lua deleted file mode 100644 index 6d1fa55f75..0000000000 --- a/script/c58165765.lua +++ /dev/null @@ -1,61 +0,0 @@ ---赤竜の忍者 -function c58165765.initial_effect(c) - --todeck - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(58165765,0)) - e1:SetCategory(CATEGORY_TODECK) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetCountLimit(1,58165765) - e1:SetCost(c58165765.cost) - e1:SetTarget(c58165765.target) - e1:SetOperation(c58165765.operation) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - c:RegisterEffect(e2) - local e3=e1:Clone() - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e3) -end -function c58165765.cfilter(c) - return (c:IsSetCard(0x2b) or c:IsSetCard(0x61)) and c:IsAbleToRemoveAsCost() -end -function c58165765.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c58165765.cfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c58165765.cfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c58165765.filter(c) - return c:IsFacedown() and c:IsAbleToDeck() -end -function c58165765.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() and c58165765.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c58165765.filter,tp,0,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectTarget(tp,c58165765.filter,tp,0,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0) - Duel.SetChainLimit(c58165765.limit(g:GetFirst())) -end -function c58165765.limit(c) - return function (e,lp,tp) - return e:GetHandler()~=c - end -end -function c58165765.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) and tc:IsFacedown() then - Duel.ConfirmCards(tp,tc) - Duel.BreakEffect() - if tc:IsAbleToDeck() then - local opt=Duel.SelectOption(tp,aux.Stringid(58165765,1),aux.Stringid(58165765,2)) - if opt==0 then - Duel.SendtoDeck(tc,nil,0,REASON_EFFECT) - else - Duel.SendtoDeck(tc,nil,1,REASON_EFFECT) - end - end - end -end diff --git a/script/c58169731.lua b/script/c58169731.lua deleted file mode 100644 index 89aa752998..0000000000 --- a/script/c58169731.lua +++ /dev/null @@ -1,35 +0,0 @@ ---分断の壁 -function c58169731.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetCondition(c58169731.condition) - e1:SetTarget(c58169731.target) - e1:SetOperation(c58169731.activate) - c:RegisterEffect(e1) -end -function c58169731.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetAttacker():IsControler(1-tp) -end -function c58169731.filter(c) - return c:IsPosition(POS_FACEUP_ATTACK) -end -function c58169731.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c58169731.filter,tp,0,LOCATION_MZONE,1,nil) end -end -function c58169731.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c58169731.filter,tp,0,LOCATION_MZONE,nil) - if g:GetCount()==0 then return end - local atk=Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)*800 - local tc=g:GetFirst() - while tc do - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(-atk) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - tc=g:GetNext() - end -end diff --git a/script/c5817857.lua b/script/c5817857.lua deleted file mode 100644 index 0103a8f0b2..0000000000 --- a/script/c5817857.lua +++ /dev/null @@ -1,74 +0,0 @@ ---コアキメイル・グールズスレイブ -function c5817857.initial_effect(c) - --cost - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c5817857.mtcon) - e1:SetOperation(c5817857.mtop) - c:RegisterEffect(e1) - --destroy replace - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_DESTROY_REPLACE) - e2:SetRange(LOCATION_MZONE) - e2:SetTarget(c5817857.destg) - e2:SetValue(1) - e2:SetOperation(c5817857.desop) - c:RegisterEffect(e2) -end -function c5817857.mtcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c5817857.cfilter1(c) - return c:IsCode(36623431) and c:IsAbleToGraveAsCost() -end -function c5817857.cfilter2(c) - return c:IsType(TYPE_MONSTER) and c:IsRace(RACE_ZOMBIE) and not c:IsPublic() -end -function c5817857.mtop(e,tp,eg,ep,ev,re,r,rp) - local g1=Duel.GetMatchingGroup(c5817857.cfilter1,tp,LOCATION_HAND,0,nil) - local g2=Duel.GetMatchingGroup(c5817857.cfilter2,tp,LOCATION_HAND,0,nil) - local select=2 - if g1:GetCount()>0 and g2:GetCount()>0 then - select=Duel.SelectOption(tp,aux.Stringid(5817857,0),aux.Stringid(5817857,1),aux.Stringid(5817857,2)) - elseif g1:GetCount()>0 then - select=Duel.SelectOption(tp,aux.Stringid(5817857,0),aux.Stringid(5817857,2)) - if select==1 then select=2 end - elseif g2:GetCount()>0 then - select=Duel.SelectOption(tp,aux.Stringid(5817857,1),aux.Stringid(5817857,2)) - select=select+1 - end - if select==0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=g1:Select(tp,1,1,nil) - Duel.SendtoGrave(g,REASON_COST) - elseif select==1 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) - local g=g2:Select(tp,1,1,nil) - Duel.ConfirmCards(1-tp,g) - Duel.ShuffleHand(tp) - else - Duel.Destroy(e:GetHandler(),REASON_RULE) - end -end -function c5817857.rfilter(c) - return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x1d) and c:IsAbleToRemove() -end -function c5817857.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - if eg:GetCount()~=1 then return false end - local tc=eg:GetFirst() - return tc:IsFaceup() and tc:IsLocation(LOCATION_MZONE) and tc:IsSetCard(0x1d) and tc:IsReason(REASON_BATTLE+REASON_EFFECT) - and Duel.IsExistingMatchingCard(c5817857.rfilter,tp,LOCATION_GRAVE,0,1,nil) - end - return Duel.SelectYesNo(tp,aux.Stringid(5817857,3)) -end -function c5817857.desop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c5817857.rfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.Remove(g,POS_FACEUP,REASON_EFFECT) -end diff --git a/script/c5818294.lua b/script/c5818294.lua deleted file mode 100644 index db788cff17..0000000000 --- a/script/c5818294.lua +++ /dev/null @@ -1,34 +0,0 @@ ---武神器-ヘツカ -function c5818294.initial_effect(c) - --negate - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(5818294,0)) - e1:SetCategory(CATEGORY_DISABLE) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_CHAINING) - e1:SetRange(LOCATION_GRAVE) - e1:SetCondition(c5818294.negcon) - e1:SetCost(c5818294.negcost) - e1:SetTarget(c5818294.negtg) - e1:SetOperation(c5818294.negop) - c:RegisterEffect(e1) -end -function c5818294.tfilter(c,tp) - return c:IsLocation(LOCATION_MZONE) and c:IsControler(tp) and c:IsFaceup() and c:IsSetCard(0x88) -end -function c5818294.negcon(e,tp,eg,ep,ev,re,r,rp) - if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end - local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) - return g and g:IsExists(c5818294.tfilter,1,nil,tp) and Duel.IsChainDisablable(ev) -end -function c5818294.negcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) -end -function c5818294.negtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0) -end -function c5818294.negop(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateEffect(ev) -end diff --git a/script/c58185394.lua b/script/c58185394.lua deleted file mode 100644 index 6381e0a900..0000000000 --- a/script/c58185394.lua +++ /dev/null @@ -1,43 +0,0 @@ ---G・コザッキー -function c58185394.initial_effect(c) - --self destroy - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_SELF_DESTROY) - e1:SetCondition(c58185394.sdcon) - c:RegisterEffect(e1) - --damage - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(58185394,0)) - e2:SetCategory(CATEGORY_DAMAGE) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_LEAVE_FIELD) - e2:SetCondition(c58185394.dmcon) - e2:SetTarget(c58185394.dmtg) - e2:SetOperation(c58185394.dmop) - c:RegisterEffect(e2) -end -function c58185394.sdfilter(c) - return c:IsFaceup() and c:IsCode(99171160) -end -function c58185394.sdcon(e) - return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) - and not Duel.IsExistingMatchingCard(c58185394.sdfilter,0,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) -end -function c58185394.dmcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsReason(REASON_DESTROY) and c:IsPreviousPosition(POS_FACEUP) -end -function c58185394.dmtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local c=e:GetHandler() - Duel.SetTargetPlayer(c:GetPreviousControler()) - Duel.SetTargetParam(2500) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,c:GetPreviousControler(),2500) -end -function c58185394.dmop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c58199906.lua b/script/c58199906.lua deleted file mode 100644 index 6f49398af8..0000000000 --- a/script/c58199906.lua +++ /dev/null @@ -1,43 +0,0 @@ ---サイバネティック・フュージョン・サポート -function c58199906.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,58199906+EFFECT_COUNT_CODE_OATH) - e1:SetCost(c58199906.cost) - e1:SetOperation(c58199906.activate) - c:RegisterEffect(e1) -end -function c58199906.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.PayLPCost(tp,math.floor(Duel.GetLP(tp)/2)) -end -function c58199906.activate(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetDescription(aux.Stringid(58199906,0)) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CHAIN_MATERIAL) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_END) - e1:SetTarget(c58199906.chain_target) - e1:SetOperation(c58199906.chain_operation) - e1:SetValue(aux.FilterBoolFunction(Card.IsRace,RACE_MACHINE)) - Duel.RegisterEffect(e1,tp) -end -function c58199906.filter(c,e) - return c:IsCanBeFusionMaterial() and c:IsAbleToRemove() and not c:IsImmuneToEffect(e) -end -function c58199906.chain_target(e,te,tp) - return Duel.GetMatchingGroup(c58199906.filter,tp,LOCATION_MZONE+LOCATION_GRAVE+LOCATION_HAND,0,nil,te) -end -function c58199906.chain_operation(e,te,tp,tc,mat,sumtype) - if not sumtype then sumtype=SUMMON_TYPE_FUSION end - tc:SetMaterial(mat) - Duel.Remove(mat,POS_FACEUP,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION) - Duel.BreakEffect() - Duel.SpecialSummon(tc,sumtype,tp,tp,false,false,POS_FACEUP) - e:Reset() -end diff --git a/script/c58206034.lua b/script/c58206034.lua deleted file mode 100644 index 83728399da..0000000000 --- a/script/c58206034.lua +++ /dev/null @@ -1,37 +0,0 @@ ---漆黒の魔王 LV8 -function c58206034.initial_effect(c) - --disable - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_BATTLED) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c58206034.discon) - e1:SetOperation(c58206034.disop) - c:RegisterEffect(e1) - --redirect - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_BATTLE_DESTROY_REDIRECT) - e2:SetCondition(c58206034.discon) - e2:SetValue(LOCATION_REMOVED) - c:RegisterEffect(e2) -end -c58206034.lvupcount=1 -c58206034.lvup={12817939} -c58206034.lvdncount=2 -c58206034.lvdn={85313220,12817939} -function c58206034.discon(e) - return e:GetHandler():GetFlagEffect(12817939)~=0 -end -function c58206034.disop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local d=Duel.GetAttackTarget() - if d==c then d=Duel.GetAttacker() end - if d and d:IsStatus(STATUS_BATTLE_DESTROYED) and d:IsType(TYPE_EFFECT) and not c:IsStatus(STATUS_BATTLE_DESTROYED) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0x17a0000) - d:RegisterEffect(e1) - end -end diff --git a/script/c58242947.lua b/script/c58242947.lua deleted file mode 100644 index de1729b7e7..0000000000 --- a/script/c58242947.lua +++ /dev/null @@ -1,47 +0,0 @@ ---ジャンク・コレクター -function c58242947.initial_effect(c) - --copy trap - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(58242947,0)) - e1:SetType(EFFECT_TYPE_QUICK_O+EFFECT_TYPE_FIELD) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,0x1e1) - e1:SetCost(c58242947.cost) - e1:SetTarget(c58242947.target) - e1:SetOperation(c58242947.operation) - c:RegisterEffect(e1) -end -function c58242947.filter(c) - return c:GetType()==0x4 and c:IsAbleToRemoveAsCost() and c:CheckActivateEffect(false,true,false)~=nil -end -function c58242947.cost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToRemoveAsCost() - and Duel.IsExistingMatchingCard(c58242947.filter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(58242947,1)) - local g=Duel.SelectMatchingCard(tp,c58242947.filter,tp,LOCATION_GRAVE,0,1,1,nil) - local te=g:GetFirst():CheckActivateEffect(false,true,true) - c58242947[Duel.GetCurrentChain()]=te - g:AddCard(c) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c58242947.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local te=c58242947[Duel.GetCurrentChain()] - if chkc then - local tg=te:GetTarget() - return tg(e,tp,eg,ep,ev,re,r,rp,0,true) - end - if chk==0 then return true end - if not te then return end - e:SetCategory(te:GetCategory()) - e:SetProperty(te:GetProperty()) - local tg=te:GetTarget() - if tg then tg(e,tp,eg,ep,ev,re,r,rp,1) end -end -function c58242947.operation(e,tp,eg,ep,ev,re,r,rp) - local te=c58242947[Duel.GetCurrentChain()] - if not te then return end - local op=te:GetOperation() - if op then op(e,tp,eg,ep,ev,re,r,rp) end -end diff --git a/script/c58258899.lua b/script/c58258899.lua deleted file mode 100644 index fc5e629b68..0000000000 --- a/script/c58258899.lua +++ /dev/null @@ -1,22 +0,0 @@ ---TGX300 -function c58258899.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --atk up - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(LOCATION_MZONE,0) - e2:SetValue(c58258899.val) - c:RegisterEffect(e2) -end -function c58258899.filter(c) - return c:IsFaceup() and c:IsSetCard(0x27) -end -function c58258899.val(e,c) - return Duel.GetMatchingGroupCount(c58258899.filter,c:GetControler(),LOCATION_MZONE,0,nil)*300 -end diff --git a/script/c58268433.lua b/script/c58268433.lua deleted file mode 100644 index 9c86f1c7f1..0000000000 --- a/script/c58268433.lua +++ /dev/null @@ -1,31 +0,0 @@ ---ブレードラビット -function c58268433.initial_effect(c) - --flip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(58268433,0)) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_CHANGE_POS) - e1:SetCondition(c58268433.condition) - e1:SetTarget(c58268433.target) - e1:SetOperation(c58268433.operation) - c:RegisterEffect(e1) -end -function c58268433.condition(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return bit.band(c:GetPreviousPosition(),POS_ATTACK)~=0 and c:IsFaceup() and c:IsDefencePos() -end -function c58268433.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsDestructable() end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c58268433.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c58272005.lua b/script/c58272005.lua deleted file mode 100644 index 1ab597a503..0000000000 --- a/script/c58272005.lua +++ /dev/null @@ -1,82 +0,0 @@ ---生存競争 -function c58272005.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCondition(c58272005.condition) - e1:SetTarget(c58272005.target) - e1:SetOperation(c58272005.operation) - c:RegisterEffect(e1) -end -function c58272005.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end -function c58272005.filter(c) - return c:IsFaceup() and c:IsRace(RACE_DINOSAUR) -end -function c58272005.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c58272005.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c58272005.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local g=Duel.SelectTarget(tp,c58272005.filter,tp,LOCATION_MZONE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c58272005.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsLocation(LOCATION_SZONE) then return end - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,c,tc) - c:CancelToGrave() - --Atkup - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_EQUIP) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(1000) - e1:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e1) - --Equip limit - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_EQUIP_LIMIT) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetValue(c58272005.eqlimit) - e2:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e2) - --chain attack - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(58272005,0)) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetRange(LOCATION_SZONE) - e3:SetCode(EVENT_BATTLE_DESTROYING) - e3:SetCondition(c58272005.atcon) - e3:SetOperation(c58272005.atop) - e3:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e3) - end -end -function c58272005.eqlimit(e,c) - return c:IsRace(RACE_DINOSAUR) -end -function c58272005.atcon(e,tp,eg,ep,ev,re,r,rp) - local ec=e:GetHandler():GetEquipTarget() - if not eg:IsContains(ec) then return false end - local bc=ec:GetBattleTarget() - return bc:IsLocation(LOCATION_GRAVE) and bc:IsType(TYPE_MONSTER) and ec:IsChainAttackable(2,true) and ec:IsStatus(STATUS_OPPO_BATTLE) -end -function c58272005.atop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local ec=c:GetEquipTarget() - if not ec:IsRelateToBattle() then return end - Duel.ChainAttack() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_DIRECT_ATTACK) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_BATTLE) - ec:RegisterEffect(e1) -end diff --git a/script/c58293343.lua b/script/c58293343.lua deleted file mode 100644 index 756ce6f5cc..0000000000 --- a/script/c58293343.lua +++ /dev/null @@ -1,69 +0,0 @@ ---タイラント・バースト・ドラゴン -function c58293343.initial_effect(c) - c:EnableReviveLimit() - --spsummon condition - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - c:RegisterEffect(e1) - --attack all - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_ATTACK_ALL) - e2:SetValue(1) - c:RegisterEffect(e2) - --equip - local e3=Effect.CreateEffect(c) - e3:SetCategory(CATEGORY_EQUIP) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_MZONE) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetTarget(c58293343.eqtg) - e3:SetOperation(c58293343.eqop) - c:RegisterEffect(e3) -end -c58293343.material_trap=57470761 -function c58293343.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:IsFaceup() and chkc~=e:GetHandler() end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,e:GetHandler()) -end -function c58293343.eqop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) or c:IsLocation(LOCATION_SZONE) or c:IsFacedown() then return end - local tc=Duel.GetFirstTarget() - if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or tc:GetControler()~=tp or tc:IsFacedown() or not tc:IsRelateToEffect(e) then - Duel.SendtoGrave(c,REASON_EFFECT) - return - end - Duel.Equip(tp,c,tc,true) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetLabelObject(tc) - e1:SetValue(c58293343.eqlimit) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(400) - e2:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EFFECT_UPDATE_DEFENCE) - c:RegisterEffect(e3) - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_EQUIP) - e4:SetCode(EFFECT_EXTRA_ATTACK) - e4:SetValue(2) - e4:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e4) -end -function c58293343.eqlimit(e,c) - return c==e:GetLabelObject() -end diff --git a/script/c58324930.lua b/script/c58324930.lua deleted file mode 100644 index 42e39c9abb..0000000000 --- a/script/c58324930.lua +++ /dev/null @@ -1,33 +0,0 @@ ---破戒僧 ランシン -function c58324930.initial_effect(c) - --search - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(58324930,0)) - e1:SetCategory(CATEGORY_REMOVE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCondition(c58324930.condition) - e1:SetTarget(c58324930.target) - e1:SetOperation(c58324930.operation) - c:RegisterEffect(e1) -end -function c58324930.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) and e:GetHandler():GetPreviousControler()==tp and rp~=tp -end -function c58324930.filter(c) - return c:IsType(TYPE_MONSTER) and c:IsAbleToRemove() -end -function c58324930.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(1-tp) and c58324930.filter(chkc) end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,c58324930.filter,tp,0,LOCATION_GRAVE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,0) -end -function c58324930.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) - end -end diff --git a/script/c5832914.lua b/script/c5832914.lua deleted file mode 100644 index 76850a071d..0000000000 --- a/script/c5832914.lua +++ /dev/null @@ -1,37 +0,0 @@ ---トゥーンのかばん -function c5832914.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TODECK) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetCondition(c5832914.condition) - e1:SetTarget(c5832914.target) - e1:SetOperation(c5832914.activate) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - c:RegisterEffect(e2) - local e3=e1:Clone() - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e3) -end -function c5832914.cfilter(c) - return c:IsFaceup() and c:IsType(TYPE_TOON) -end -function c5832914.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c5832914.cfilter,tp,LOCATION_MZONE,0,1,nil) -end -function c5832914.filter(c,tp) - return c:GetSummonPlayer()==tp and c:IsAbleToDeck() -end -function c5832914.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return eg:IsExists(c5832914.filter,1,nil,1-tp) end - local g=eg:Filter(c5832914.filter,nil,1-tp) - Duel.SetTargetCard(g) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0) -end -function c5832914.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) - Duel.SendtoDeck(g,nil,2,REASON_EFFECT) -end diff --git a/script/c58332301.lua b/script/c58332301.lua deleted file mode 100644 index 3d78ac7078..0000000000 --- a/script/c58332301.lua +++ /dev/null @@ -1,58 +0,0 @@ ---E-HERO ダーク・ガイア -function c58332301.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcFun2(c,aux.FilterBoolFunction(Card.IsRace,RACE_FIEND),aux.FilterBoolFunction(Card.IsRace,RACE_ROCK),true) - --spsummon condition - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e2:SetCode(EFFECT_SPSUMMON_CONDITION) - e2:SetValue(c58332301.splimit) - c:RegisterEffect(e2) - --atk - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - e3:SetOperation(c58332301.atkop) - c:RegisterEffect(e3) - --Pos Change - local e3=Effect.CreateEffect(c) - e3:SetCategory(CATEGORY_POSITION) - e3:SetDescription(aux.Stringid(58332301,0)) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_ATTACK_ANNOUNCE) - e3:SetTarget(c58332301.postg) - e3:SetOperation(c58332301.posop) - c:RegisterEffect(e3) -end -function c58332301.splimit(e,se,sp,st) - return st==SUMMON_TYPE_FUSION+0x10 -end -function c58332301.atkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local g=c:GetMaterial() - local s=0 - local tc=g:GetFirst() - while tc do - local a=tc:GetAttack() - if a<0 then a=0 end - s=s+a - tc=g:GetNext() - end - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_BASE_ATTACK) - e1:SetValue(s) - e1:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e1) -end -function c58332301.postg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDefencePos,tp,0,LOCATION_MZONE,1,nil) end - local g=Duel.GetMatchingGroup(Card.IsDefencePos,tp,0,LOCATION_MZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_POSITION,g,g:GetCount(),0,0) -end -function c58332301.posop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsDefencePos,tp,0,LOCATION_MZONE,nil) - Duel.ChangePosition(g,0,0,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK,true) -end diff --git a/script/c58369990.lua b/script/c58369990.lua deleted file mode 100644 index a8d3bebc17..0000000000 --- a/script/c58369990.lua +++ /dev/null @@ -1,37 +0,0 @@ ---凶星の魔術師 -function c58369990.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(58369990,0)) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCountLimit(1) - e1:SetCost(c58369990.cost) - e1:SetTarget(c58369990.target) - e1:SetOperation(c58369990.operation) - c:RegisterEffect(e1) -end -function c58369990.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) -end -function c58369990.filter(c) - return (c:GetSequence()==6 or c:GetSequence()==7) and c:IsDestructable() -end -function c58369990.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_SZONE) and c58369990.filter(chkc) end - if chk==0 then return Duel.IsPlayerCanDraw(tp,1) - and Duel.IsExistingTarget(c58369990.filter,tp,LOCATION_SZONE,LOCATION_SZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c58369990.filter,tp,LOCATION_SZONE,LOCATION_SZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c58369990.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)~=0 then - Duel.Draw(tp,1,REASON_EFFECT) - end -end diff --git a/script/c58392024.lua b/script/c58392024.lua deleted file mode 100644 index 00d29cab48..0000000000 --- a/script/c58392024.lua +++ /dev/null @@ -1,27 +0,0 @@ ---融合失敗 -function c58392024.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TODECK) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(c58392024.condition) - e1:SetTarget(c58392024.target) - e1:SetOperation(c58392024.activate) - c:RegisterEffect(e1) -end -function c58392024.condition(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(Card.IsType,1,nil,TYPE_FUSION) -end -function c58392024.filter(c) - return c:IsType(TYPE_FUSION) and c:IsAbleToExtra() -end -function c58392024.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c58392024.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - local g=Duel.GetMatchingGroup(c58392024.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0) -end -function c58392024.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c58392024.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - Duel.SendtoDeck(g,nil,0,REASON_EFFECT) -end diff --git a/script/c58419204.lua b/script/c58419204.lua deleted file mode 100644 index 939bcf6dc4..0000000000 --- a/script/c58419204.lua +++ /dev/null @@ -1,39 +0,0 @@ ---生存本能 -function c58419204.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_RECOVER) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c58419204.cost) - e1:SetTarget(c58419204.target) - e1:SetOperation(c58419204.activate) - c:RegisterEffect(e1) -end -function c58419204.cfilter(c) - return c:IsRace(RACE_DINOSAUR) and c:IsAbleToRemoveAsCost() -end -function c58419204.cost(e,tp,eg,ep,ev,re,r,rp,chk) - e:SetLabel(1) - if chk==0 then return Duel.IsExistingMatchingCard(c58419204.cfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c58419204.cfilter,tp,LOCATION_GRAVE,0,1,63,nil) - e:SetLabel(g:GetCount()*400) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c58419204.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local res=e:GetLabel()~=0 - e:SetLabel(0) - return res - end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(e:GetLabel()) - Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,e:GetLabel()) - e:SetLabel(0) -end -function c58419204.activate(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Recover(p,d,REASON_EFFECT) -end diff --git a/script/c58441120.lua b/script/c58441120.lua deleted file mode 100644 index 9b1fc07c58..0000000000 --- a/script/c58441120.lua +++ /dev/null @@ -1,32 +0,0 @@ ---波動共鳴 -function c58441120.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c58441120.target) - e1:SetOperation(c58441120.activate) - c:RegisterEffect(e1) -end -function c58441120.filter(c) - local lv=c:GetLevel() - return c:IsFaceup() and lv>0 and lv~=4 -end -function c58441120.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c58441120.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c58441120.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c58441120.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) -end -function c58441120.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CHANGE_LEVEL) - e1:SetValue(4) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - tc:RegisterEffect(e1) - end -end diff --git a/script/c58446973.lua b/script/c58446973.lua deleted file mode 100644 index ee59938a67..0000000000 --- a/script/c58446973.lua +++ /dev/null @@ -1,45 +0,0 @@ ---インフェルノイド・デカトロン -function c58446973.initial_effect(c) - -- - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOGRAVE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e1:SetTarget(c58446973.target) - e1:SetOperation(c58446973.operation) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e2) -end -function c58446973.filter(c) - return c:IsSetCard(0xbb) and c:IsType(TYPE_MONSTER) and not c:IsCode(58446973) and c:IsAbleToGrave() -end -function c58446973.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c58446973.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) -end -function c58446973.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c58446973.filter,tp,LOCATION_DECK,0,1,1,nil) - local tc=g:GetFirst() - local c=e:GetHandler() - if tc and Duel.SendtoGrave(tc,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_GRAVE) - and c:IsRelateToEffect(e) and c:IsFaceup() then - local code=tc:GetCode() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_LEVEL) - e1:SetValue(tc:GetLevel()) - e1:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_CHANGE_CODE) - e2:SetValue(code) - e2:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e2) - c:CopyEffect(code,RESET_EVENT+0x1fe0000,1) - end -end diff --git a/script/c58453942.lua b/script/c58453942.lua deleted file mode 100644 index d9b5046efb..0000000000 --- a/script/c58453942.lua +++ /dev/null @@ -1,50 +0,0 @@ ---サイコ・ウォールド -function c58453942.initial_effect(c) - --extra atk - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(58453942,0)) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c58453942.condition) - e1:SetCost(c58453942.cost) - e1:SetTarget(c58453942.target) - e1:SetOperation(c58453942.operation) - c:RegisterEffect(e1) -end -function c58453942.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsAbleToEnterBP() -end -function c58453942.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,800) end - Duel.PayLPCost(tp,800) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_OATH) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e:GetHandler():RegisterEffect(e1) -end -function c58453942.filter(c) - return c:IsFaceup() and c:IsRace(RACE_PSYCHO) and c:GetEffectCount(EFFECT_EXTRA_ATTACK)==0 -end -function c58453942.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c58453942.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c58453942.filter,tp,LOCATION_MZONE,0,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c58453942.filter,tp,LOCATION_MZONE,0,1,1,e:GetHandler()) -end -function c58453942.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - --extra atk - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_EXTRA_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e1:SetValue(1) - tc:RegisterEffect(e1) - end -end diff --git a/script/c58471134.lua b/script/c58471134.lua deleted file mode 100644 index d2020774de..0000000000 --- a/script/c58471134.lua +++ /dev/null @@ -1,40 +0,0 @@ ---水精鱗-アビスパイク -function c58471134.initial_effect(c) - --search - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(58471134,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetCountLimit(1,58471134) - e1:SetCost(c58471134.thcost) - e1:SetTarget(c58471134.thtg) - e1:SetOperation(c58471134.thop) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e2) -end -function c58471134.cfilter(c) - return c:IsAttribute(ATTRIBUTE_WATER) and c:IsDiscardable() and c:IsAbleToGraveAsCost() -end -function c58471134.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c58471134.cfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,c58471134.cfilter,1,1,REASON_COST+REASON_DISCARD) -end -function c58471134.filter(c) - return c:GetLevel()==3 and c:IsAttribute(ATTRIBUTE_WATER) and c:IsAbleToHand() -end -function c58471134.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c58471134.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c58471134.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c58471134.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c58475908.lua b/script/c58475908.lua deleted file mode 100644 index 9cd2f61434..0000000000 --- a/script/c58475908.lua +++ /dev/null @@ -1,30 +0,0 @@ ---ゼンマイマイ -function c58475908.initial_effect(c) - --to hand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(58475908,0)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_NO_TURN_RESET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetTarget(c58475908.target) - e1:SetOperation(c58475908.operation) - c:RegisterEffect(e1) -end -function c58475908.filter(c) - return c:IsFacedown() and c:IsAbleToHand() -end -function c58475908.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and c58475908.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c58475908.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g=Duel.SelectTarget(tp,c58475908.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c58475908.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsFacedown() and tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - end -end diff --git a/script/c58477767.lua b/script/c58477767.lua deleted file mode 100644 index fbedcb4779..0000000000 --- a/script/c58477767.lua +++ /dev/null @@ -1,36 +0,0 @@ ---女王の選択 -function c58477767.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetCondition(c58477767.condition) - e1:SetTarget(c58477767.target) - e1:SetOperation(c58477767.operation) - c:RegisterEffect(e1) -end -function c58477767.check(c1,c2,tp) - return c1:IsLocation(LOCATION_GRAVE) and c1:IsReason(REASON_BATTLE) and c1:GetPreviousControler()~=tp and c2:IsSetCard(0x4) -end -function c58477767.condition(e,tp,eg,ep,ev,re,r,rp) - local dc=eg:GetFirst() - local bc=dc:GetBattleTarget() - return c58477767.check(dc,bc,tp) or c58477767.check(bc,dc,tp) -end -function c58477767.spfilter(c,e,tp) - return c:IsLevelBelow(4) and c:IsSetCard(0x4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c58477767.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c58477767.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c58477767.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c58477767.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c58481572.lua b/script/c58481572.lua deleted file mode 100644 index 6b2c6bba17..0000000000 --- a/script/c58481572.lua +++ /dev/null @@ -1,54 +0,0 @@ ---M・HERO ダーク・ロウ -function c58481572.initial_effect(c) - c:EnableReviveLimit() - --spsummon condition - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - c:RegisterEffect(e1) - --remove - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_RANGE) - e2:SetCode(EFFECT_TO_GRAVE_REDIRECT) - e2:SetRange(LOCATION_MZONE) - e2:SetTargetRange(0,0xff) - e2:SetValue(LOCATION_REMOVED) - e2:SetTarget(c58481572.rmtg) - c:RegisterEffect(e2) - --handes - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(58481572,0)) - e3:SetCategory(CATEGORY_REMOVE) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_DELAY) - e3:SetCode(EVENT_TO_HAND) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1) - e3:SetCondition(c58481572.hdcon) - e3:SetTarget(c58481572.hdtg) - e3:SetOperation(c58481572.hdop) - c:RegisterEffect(e3) -end -function c58481572.rmtg(e,c) - return c:GetOwner()~=e:GetHandlerPlayer() -end -function c58481572.cfilter(c,tp) - return c:IsControler(tp) and c:IsPreviousLocation(LOCATION_DECK) -end -function c58481572.hdcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DRAW and eg:IsExists(c58481572.cfilter,1,nil,1-tp) -end -function c58481572.hdtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsRelateToEffect(e) and e:GetHandler():IsFaceup() - and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_HAND,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_HAND) -end -function c58481572.hdop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_HAND,nil) - if g:GetCount()>0 then - local sg=g:RandomSelect(tp,1) - Duel.Remove(sg,POS_FACEUP,REASON_EFFECT) - end -end diff --git a/script/c58494728.lua b/script/c58494728.lua deleted file mode 100644 index e09c028112..0000000000 --- a/script/c58494728.lua +++ /dev/null @@ -1,72 +0,0 @@ ---インヴェルズ・ギラファ -function c58494728.initial_effect(c) - --summon with 1 tribute - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(58494728,0)) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SUMMON_PROC) - e1:SetCondition(c58494728.otcon) - e1:SetOperation(c58494728.otop) - e1:SetValue(SUMMON_TYPE_ADVANCE) - c:RegisterEffect(e1) - --summon success - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(58494728,1)) - e2:SetCategory(CATEGORY_TOGRAVE+CATEGORY_RECOVER) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_SUMMON_SUCCESS) - e2:SetCondition(c58494728.condition) - e2:SetTarget(c58494728.target) - e2:SetOperation(c58494728.operation) - c:RegisterEffect(e2) - --tribute check - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_MATERIAL_CHECK) - e3:SetValue(c58494728.valcheck) - e3:SetLabelObject(e2) - c:RegisterEffect(e3) -end -function c58494728.otfilter(c,tp) - return c:IsSetCard(0x100a) and (c:IsControler(tp) or c:IsFaceup()) -end -function c58494728.otcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - local mg=Duel.GetMatchingGroup(c58494728.otfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp) - return c:GetLevel()>6 and Duel.GetTributeCount(c,mg)>0 -end -function c58494728.otop(e,tp,eg,ep,ev,re,r,rp,c) - local mg=Duel.GetMatchingGroup(c58494728.otfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp) - local sg=Duel.SelectTribute(tp,c,1,1,mg) - c:SetMaterial(sg) - Duel.Release(sg,REASON_SUMMON+REASON_MATERIAL) -end -function c58494728.valcheck(e,c) - local g=c:GetMaterial() - if g:IsExists(Card.IsSetCard,1,nil,0x100a) then - e:GetLabelObject():SetLabel(1) - else - e:GetLabelObject():SetLabel(0) - end -end -function c58494728.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_ADVANCE and e:GetLabel()==1 -end -function c58494728.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) end - if chk==0 then return Duel.IsExistingTarget(nil,tp,0,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectTarget(tp,nil,tp,0,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,1000) -end -function c58494728.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoGrave(tc,REASON_EFFECT) - if tc:IsLocation(LOCATION_GRAVE) then Duel.Recover(tp,1000,REASON_EFFECT) end - end -end diff --git a/script/c58504745.lua b/script/c58504745.lua deleted file mode 100644 index cd995d141c..0000000000 --- a/script/c58504745.lua +++ /dev/null @@ -1,43 +0,0 @@ ---間炎星-コウカンショウ -function c58504745.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0x79),4,2) - c:EnableReviveLimit() - --todeck - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(58504745,0)) - e1:SetCategory(CATEGORY_TODECK) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetCountLimit(1,58504745) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c58504745.cost) - e1:SetTarget(c58504745.target) - e1:SetOperation(c58504745.operation) - c:RegisterEffect(e1) -end -function c58504745.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,2,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,2,2,REASON_COST) -end -function c58504745.filter1(c) - return (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup()) and (c:IsSetCard(0x79) or c:IsSetCard(0x7c)) and c:IsAbleToDeck() -end -function c58504745.filter2(c) - return (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup()) and c:IsAbleToDeck() -end -function c58504745.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - if chk==0 then return Duel.IsExistingTarget(c58504745.filter1,tp,LOCATION_GRAVE+LOCATION_ONFIELD,0,2,nil) - and Duel.IsExistingTarget(c58504745.filter2,tp,0,LOCATION_GRAVE+LOCATION_ONFIELD,2,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g1=Duel.SelectTarget(tp,c58504745.filter1,tp,LOCATION_GRAVE+LOCATION_ONFIELD,0,2,2,nil) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g2=Duel.SelectTarget(tp,c58504745.filter2,tp,0,LOCATION_GRAVE+LOCATION_ONFIELD,2,2,nil) - g1:Merge(g2) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g1,4,0,0) -end -function c58504745.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) - Duel.SendtoDeck(g,nil,2,REASON_EFFECT) -end diff --git a/script/c5851097.lua b/script/c5851097.lua deleted file mode 100644 index 319808c380..0000000000 --- a/script/c5851097.lua +++ /dev/null @@ -1,44 +0,0 @@ ---虚無空間 -function c5851097.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,0x1c0) - c:RegisterEffect(e1) - --disable spsummon - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetRange(LOCATION_SZONE) - e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetTargetRange(1,1) - c:RegisterEffect(e2) - --destroy - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(5851097,0)) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e3:SetRange(LOCATION_SZONE) - e3:SetCode(EVENT_TO_GRAVE) - e3:SetCondition(c5851097.descon) - e3:SetTarget(c5851097.destg) - e3:SetOperation(c5851097.desop) - c:RegisterEffect(e3) -end -function c5851097.filter(c,tp) - return c:IsPreviousLocation(LOCATION_DECK+LOCATION_ONFIELD) and c:IsLocation(LOCATION_GRAVE) and c:IsControler(tp) -end -function c5851097.descon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c5851097.filter,1,nil,tp) and e:GetHandler():IsStatus(STATUS_ACTIVATED) -end -function c5851097.destg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsRelateToEffect(e) end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,c,1,0,0) -end -function c5851097.desop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.Destroy(c,REASON_EFFECT) - end -end diff --git a/script/c58528964.lua b/script/c58528964.lua deleted file mode 100644 index d8a973fa35..0000000000 --- a/script/c58528964.lua +++ /dev/null @@ -1,6 +0,0 @@ ---フレイム・ゴースト -function c58528964.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcCode2(c,32274490,40826495,true,true) -end diff --git a/script/c58531587.lua b/script/c58531587.lua deleted file mode 100644 index 8caaa1d3be..0000000000 --- a/script/c58531587.lua +++ /dev/null @@ -1,83 +0,0 @@ ---バブル・ブリンガー -function c58531587.initial_effect(c) - --activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --cannot direct attack - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_CANNOT_DIRECT_ATTACK) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e2:SetTarget(c58531587.atktarget) - c:RegisterEffect(e2) - --special summon - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(58531587,0)) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_QUICK_O) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetCode(EVENT_FREE_CHAIN) - e3:SetRange(LOCATION_SZONE) - e3:SetCondition(c58531587.spcon) - e3:SetCost(c58531587.spcost) - e3:SetTarget(c58531587.sptg) - e3:SetOperation(c58531587.spop) - c:RegisterEffect(e3) -end -function c58531587.atktarget(e,c) - return c:GetLevel()>=4 -end -function c58531587.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c58531587.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end -function c58531587.filter(c,e,tp) - return c:IsLevelBelow(3) and c:IsAttribute(ATTRIBUTE_WATER) - and c:IsCanBeEffectTarget(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c58531587.filter2(c,g) - return g:IsExists(Card.IsCode,1,c,c:GetCode()) -end -function c58531587.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return end - if chk==0 then - if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 then return false end - local g=Duel.GetMatchingGroup(c58531587.filter,tp,LOCATION_GRAVE,0,nil,e,tp) - return g:IsExists(c58531587.filter2,1,nil,g) - end - local g=Duel.GetMatchingGroup(c58531587.filter,tp,LOCATION_GRAVE,0,nil,e,tp) - local dg=g:Filter(c58531587.filter2,nil,g) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg1=dg:Select(tp,1,1,nil) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg2=dg:FilterSelect(tp,Card.IsCode,1,1,sg1:GetFirst(),sg1:GetFirst():GetCode()) - sg1:Merge(sg2) - Duel.SetTargetCard(sg1) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,sg1,2,0,0) -end -function c58531587.spop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) - if Duel.GetLocationCount(tp,LOCATION_MZONE)0 and g2:GetCount()>0 then - g1:Merge(g2) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g1,2,PLAYER_ALL,g1:GetFirst():GetOwner()) - elseif g1:GetCount()>0 then - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g1,1,0,0) - elseif g2:GetCount()>0 then - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g2,1,1,0) - end -end -function c58551308.spop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local sg=g:Filter(Card.IsRelateToEffect,nil,e) - if sg:GetCount()==0 then return end - local tc=sg:GetFirst() - if tc and Duel.GetLocationCount(tc:GetControler(),LOCATION_MZONE)>0 then - local sp=tc:GetControler() - local spos=0 - if tc:IsCanBeSpecialSummoned(e,0,sp,false,false) then spos=spos+POS_FACEUP_ATTACK end - if tc:IsCanBeSpecialSummoned(e,0,sp,false,false,POS_FACEDOWN) then spos=spos+POS_FACEDOWN_DEFENCE end - if spos~=0 then Duel.SpecialSummonStep(tc,0,sp,sp,false,false,spos) end - end - tc=sg:GetNext() - if tc and Duel.GetLocationCount(tc:GetControler(),LOCATION_MZONE)>0 then - local sp=tc:GetControler() - local spos=0 - if tc:IsCanBeSpecialSummoned(e,0,sp,false,false) then spos=spos+POS_FACEUP_ATTACK end - if tc:IsCanBeSpecialSummoned(e,0,sp,false,false,POS_FACEDOWN) then spos=spos+POS_FACEDOWN_DEFENCE end - if spos~=0 then Duel.SpecialSummonStep(tc,0,sp,sp,false,false,spos) end - end - Duel.SpecialSummonComplete() -end diff --git a/script/c58554959.lua b/script/c58554959.lua deleted file mode 100644 index 93dc67bc5e..0000000000 --- a/script/c58554959.lua +++ /dev/null @@ -1,27 +0,0 @@ ---E-HERO マリシャス・エッジ -function c58554959.initial_effect(c) - --summon with 1 tribute - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(58554959,0)) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SUMMON_PROC) - e1:SetCondition(c58554959.otcon) - e1:SetOperation(c58554959.otop) - e1:SetValue(SUMMON_TYPE_ADVANCE) - c:RegisterEffect(e1) - --pierce - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_PIERCE) - c:RegisterEffect(e2) -end -function c58554959.otcon(e,c) - if c==nil then return true end - return c:GetLevel()>6 and Duel.GetFieldGroupCount(c:GetControler(),0,LOCATION_MZONE)~=0 and Duel.GetTributeCount(c)>0 -end -function c58554959.otop(e,tp,eg,ep,ev,re,r,rp,c) - local sg=Duel.SelectTribute(tp,c,1,1) - c:SetMaterial(sg) - Duel.Release(sg,REASON_SUMMON+REASON_MATERIAL) -end diff --git a/script/c58569561.lua b/script/c58569561.lua deleted file mode 100644 index 6ceeb22697..0000000000 --- a/script/c58569561.lua +++ /dev/null @@ -1,63 +0,0 @@ ---アロマージ-ローズマリー -function c58569561.initial_effect(c) - --active limit - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c58569561.actcon) - e1:SetOperation(c58569561.actop) - c:RegisterEffect(e1) - --position change - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_POSITION) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_RECOVER) - e2:SetRange(LOCATION_MZONE) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCountLimit(1) - e2:SetCondition(c58569561.poscon) - e2:SetTarget(c58569561.postg) - e2:SetOperation(c58569561.posop) - c:RegisterEffect(e2) -end -function c58569561.actcon(e,tp,eg,ep,ev,re,r,rp) - local ac=Duel.GetAttacker() - return ac and ac:IsControler(tp) and ac:IsRace(RACE_PLANT) -end -function c58569561.actop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_ACTIVATE) - e1:SetRange(LOCATION_MZONE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetTargetRange(0,1) - e1:SetCondition(c58569561.accon) - e1:SetValue(c58569561.actlimit) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_DAMAGE) - c:RegisterEffect(e1) -end -function c58569561.accon(e) - local tp=e:GetHandlerPlayer() - return Duel.GetLP(tp)>Duel.GetLP(1-tp) -end -function c58569561.actlimit(e,re,tp) - return re:IsActiveType(TYPE_MONSTER) and not re:GetHandler():IsImmuneToEffect(e) -end -function c58569561.poscon(e,tp,eg,ep,ev,re,r,rp) - return ep==tp -end -function c58569561.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end - if chk==0 then return ep==tp and e:GetHandler():IsRelateToEffect(e) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE) - local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_POSITION,g,g:GetCount(),0,0) -end -function c58569561.posop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.ChangePosition(tc,POS_FACEUP_DEFENCE,POS_FACEDOWN_DEFENCE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK) - end -end diff --git a/script/c58577036.lua b/script/c58577036.lua deleted file mode 100644 index bc47e1a3dd..0000000000 --- a/script/c58577036.lua +++ /dev/null @@ -1,50 +0,0 @@ ---名推理 -function c58577036.initial_effect(c) - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c58577036.target) - e1:SetOperation(c58577036.operation) - c:RegisterEffect(e1) -end -function c58577036.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsPlayerCanSpecialSummon(tp) - and Duel.IsExistingMatchingCard(Card.IsSummonableCard,tp,LOCATION_DECK,0,1,nil) and Duel.IsPlayerCanDiscardDeck(tp,1) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,LOCATION_DECK) -end -function c58577036.operation(e,tp,eg,ep,ev,re,r,rp) - if not Duel.IsPlayerCanSpecialSummon(tp) or not Duel.IsPlayerCanDiscardDeck(tp,1) then return end - Duel.Hint(HINT_SELECTMSG,1-tp,567) - local lv=Duel.AnnounceNumber(1-tp,1,2,3,4,5,6,7,8,9,10,11,12) - local g=Duel.GetMatchingGroup(Card.IsSummonableCard,tp,LOCATION_DECK,0,nil) - local dcount=Duel.GetFieldGroupCount(tp,LOCATION_DECK,0) - local seq=-1 - local tc=g:GetFirst() - local spcard=nil - while tc do - if tc:GetSequence()>seq then - seq=tc:GetSequence() - spcard=tc - end - tc=g:GetNext() - end - if seq==-1 then - Duel.ConfirmDecktop(tp,dcount) - Duel.ShuffleDeck(tp) - return - end - Duel.ConfirmDecktop(tp,dcount-seq) - if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and lv~=spcard:GetLevel() - and spcard:IsCanBeSpecialSummoned(e,0,tp,false,false) then - Duel.DisableShuffleCheck() - if dcount-seq==1 then Duel.SpecialSummon(spcard,0,tp,tp,false,false,POS_FACEUP) - else - Duel.SpecialSummonStep(spcard,0,tp,tp,false,false,POS_FACEUP) - Duel.DiscardDeck(tp,dcount-seq-1,REASON_EFFECT) - Duel.SpecialSummonComplete() - end - else - Duel.DiscardDeck(tp,dcount-seq,REASON_EFFECT+REASON_REVEAL) - end -end diff --git a/script/c58601383.lua b/script/c58601383.lua deleted file mode 100644 index 9ddea46a4e..0000000000 --- a/script/c58601383.lua +++ /dev/null @@ -1,31 +0,0 @@ ---地天の騎士ガイアドレイク -function c58601383.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcCodeFun(c,97204936,c58601383.ffilter,1,true,true) - --cannot be target - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetValue(c58601383.efilter1) - c:RegisterEffect(e2) - --cannot be destroyed - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e3:SetRange(LOCATION_MZONE) - e3:SetValue(c58601383.efilter2) - c:RegisterEffect(e3) -end -function c58601383.ffilter(c) - return c:IsType(TYPE_SYNCHRO) and not c:IsType(TYPE_EFFECT) -end -function c58601383.efilter1(e,re,rp) - return re:IsActiveType(TYPE_EFFECT) and aux.tgval(e,re,rp) -end -function c58601383.efilter2(e,re) - return re:IsActiveType(TYPE_EFFECT) -end diff --git a/script/c58607704.lua b/script/c58607704.lua deleted file mode 100644 index b40e155edb..0000000000 --- a/script/c58607704.lua +++ /dev/null @@ -1,38 +0,0 @@ ---悪魔の手鏡 -function c58607704.initial_effect(c) - --activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_CHAINING) - e1:SetCondition(c58607704.tgcon) - e1:SetTarget(c58607704.tgtg) - e1:SetOperation(c58607704.tgop) - c:RegisterEffect(e1) -end -function c58607704.tgcon(e,tp,eg,ep,ev,re,r,rp) - if rp==tp or not re:IsHasType(EFFECT_TYPE_ACTIVATE) or not re:IsActiveType(TYPE_SPELL) - or not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end - local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) - if not g or g:GetCount()~=1 then return false end - local tc=g:GetFirst() - e:SetLabelObject(tc) - return tc:IsOnField() and tc:IsType(TYPE_SPELL+TYPE_TRAP) -end -function c58607704.filter(c,re,rp,tf,ceg,cep,cev,cre,cr,crp) - return c:IsType(TYPE_SPELL+TYPE_TRAP) and tf(re,rp,ceg,cep,cev,cre,cr,crp,0,c) -end -function c58607704.tgtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local tf=re:GetTarget() - local res,ceg,cep,cev,cre,cr,crp=Duel.CheckEvent(re:GetCode(),true) - if chkc then return chkc~=e:GetLabelObject() and chkc:IsOnField() and chkc:IsType(TYPE_SPELL+TYPE_TRAP) and tf(re,rp,ceg,cep,cev,cre,cr,crp,0,chkc) end - if chk==0 then return Duel.IsExistingTarget(c58607704.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetLabelObject(),re,rp,tf,ceg,cep,cev,cre,cr,crp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - Duel.SelectTarget(tp,c58607704.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,e:GetLabelObject(),re,rp,tf,ceg,cep,cev,cre,cr,crp) -end -function c58607704.tgop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - if g and g:GetFirst():IsRelateToEffect(e) then - Duel.ChangeTargetCard(ev,g) - end -end diff --git a/script/c58616392.lua b/script/c58616392.lua deleted file mode 100644 index 562428811e..0000000000 --- a/script/c58616392.lua +++ /dev/null @@ -1,31 +0,0 @@ ---魔犬オクトロス -function c58616392.initial_effect(c) - --search - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCountLimit(1,58616392) - e1:SetCondition(c58616392.condition) - e1:SetTarget(c58616392.target) - e1:SetOperation(c58616392.operation) - c:RegisterEffect(e1) -end -function c58616392.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) -end -function c58616392.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c58616392.filter(c) - return c:IsRace(RACE_FIEND) and c:GetLevel()==8 and c:IsAbleToHand() -end -function c58616392.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c58616392.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c5861892.lua b/script/c5861892.lua deleted file mode 100644 index c1179dc271..0000000000 --- a/script/c5861892.lua +++ /dev/null @@ -1,134 +0,0 @@ ---アルカナフォースEX-THE LIGHT RULER -function c5861892.initial_effect(c) - c:EnableReviveLimit() - --spsummon proc - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c5861892.spcon) - e1:SetOperation(c5861892.spop) - c:RegisterEffect(e1) - --cannot special summon - local e2=Effect.CreateEffect(c) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_SPSUMMON_CONDITION) - c:RegisterEffect(e2) - --coin - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(5861892,0)) - e3:SetCategory(CATEGORY_COIN) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - e3:SetTarget(c5861892.cointg) - e3:SetOperation(c5861892.coinop) - c:RegisterEffect(e3) -end -function c5861892.spcon(e,c) - if c==nil then return true end - return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-3 - and Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,c:GetControler(),LOCATION_MZONE,0,3,nil) -end -function c5861892.spop(e,tp,eg,ep,ev,re,r,rp,c) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,Card.IsAbleToGraveAsCost,c:GetControler(),LOCATION_MZONE,0,3,3,nil) - Duel.SendtoGrave(g,REASON_COST) -end -function c5861892.cointg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_COIN,nil,0,tp,1) -end -function c5861892.coinop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) or c:IsFacedown() then return end - local res=0 - if c:IsHasEffect(73206827) then - res=1-Duel.SelectOption(tp,60,61) - else res=Duel.TossCoin(tp,1) end - c5861892.arcanareg(c,res) -end -function c5861892.arcanareg(c,coin) - --coin effect - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(5861892,1)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_BATTLE_DESTROYING) - e1:SetCondition(c5861892.thcon) - e1:SetTarget(c5861892.thtg) - e1:SetOperation(c5861892.thop) - e1:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e1) - -- - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(5861892,2)) - e2:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_QUICK_F) - e2:SetCode(EVENT_CHAINING) - e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) - e2:SetRange(LOCATION_MZONE) - e2:SetCondition(c5861892.negcon) - e2:SetTarget(c5861892.negtg) - e2:SetOperation(c5861892.negop) - e2:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e2) - c:RegisterFlagEffect(36690018,RESET_EVENT+0x1ff0000,EFFECT_FLAG_CLIENT_HINT,1,coin,63-coin) -end -function c5861892.thcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:GetFlagEffectLabel(36690018)==1 and c:IsRelateToBattle() - and c:GetBattleTarget():IsLocation(LOCATION_GRAVE) -end -function c5861892.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and chkc:IsAbleToHand() end - if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToHand,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,Card.IsAbleToHand,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c5861892.thop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end -function c5861892.negcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end - local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) - if not g or not g:IsContains(c) then return false end - return c:GetFlagEffectLabel(36690018)==0 and (re:IsHasType(EFFECT_TYPE_ACTIVATE) or re:IsActiveType(TYPE_MONSTER)) -end -function c5861892.negtg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:GetFlagEffect(5861892)==0 end - if c:IsHasEffect(EFFECT_REVERSE_UPDATE) then - c:RegisterFlagEffect(5861892,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) - end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - if re:GetHandler():IsRelateToEffect(re) and re:GetHandler():IsDestructable() then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) - end -end -function c5861892.negop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsFaceup() or c:GetAttack()<1000 or not c:IsRelateToEffect(e) or Duel.GetCurrentChain()~=ev+1 then - return - end - if Duel.NegateActivation(ev) then - if re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(re:GetHandler(),REASON_EFFECT) - end - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_COPY_INHERIT) - e1:SetReset(RESET_EVENT+0x1ff0000) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(-1000) - c:RegisterEffect(e1) - end -end diff --git a/script/c58621589.lua b/script/c58621589.lua deleted file mode 100644 index f24cb48aa6..0000000000 --- a/script/c58621589.lua +++ /dev/null @@ -1,42 +0,0 @@ ---誘惑のシャドウ -function c58621589.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_POSITION) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_CHANGE_POS) - e1:SetTarget(c58621589.target) - e1:SetOperation(c58621589.operation) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_MSET) - e2:SetTarget(c58621589.target2) - c:RegisterEffect(e2) - local e3=e1:Clone() - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - e3:SetTarget(c58621589.target2) - c:RegisterEffect(e3) -end -function c58621589.filter1(c,tp) - return c:IsFacedown() and c:IsPreviousPosition(POS_FACEUP) and c:IsControler(1-tp) -end -function c58621589.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return eg:IsExists(c58621589.filter1,1,nil,tp) end - Duel.SetTargetCard(eg) - Duel.SetOperationInfo(0,CATEGORY_POSITION,eg,eg:GetCount(),0,0) -end -function c58621589.filter2(c,tp) - return c:IsFacedown() and c:IsControler(1-tp) -end -function c58621589.target2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return eg:IsExists(c58621589.filter2,1,nil,tp) end - Duel.SetTargetCard(eg) - Duel.SetOperationInfo(0,CATEGORY_POSITION,eg,eg:GetCount(),0,0) -end -function c58621589.filter3(c,e) - return c:IsFacedown() and c:IsRelateToEffect(e) -end -function c58621589.operation(e,tp,eg,ep,ev,re,r,rp) - local g=eg:Filter(c58621589.filter3,nil,e,tp) - Duel.ChangePosition(g,0x1,0x1,0x1,0x1,true) -end diff --git a/script/c58628539.lua b/script/c58628539.lua deleted file mode 100644 index b37c053da4..0000000000 --- a/script/c58628539.lua +++ /dev/null @@ -1,29 +0,0 @@ ---エクシーズエフェクト -function c58628539.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(c58628539.condition) - e1:SetTarget(c58628539.target) - e1:SetOperation(c58628539.activate) - c:RegisterEffect(e1) -end -function c58628539.condition(e,tp,eg,ep,ev,re,r,rp) - return eg:GetCount()==1 and eg:GetFirst():GetSummonType()==SUMMON_TYPE_XYZ and eg:GetFirst():IsControler(tp) -end -function c58628539.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsDestructable() and chkc~=e:GetHandler() end - if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c58628539.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c58641905.lua b/script/c58641905.lua deleted file mode 100644 index 408946b320..0000000000 --- a/script/c58641905.lua +++ /dev/null @@ -1,37 +0,0 @@ ---防御輪 -function c58641905.initial_effect(c) - --reflect - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_CHAINING) - e1:SetCondition(c58641905.condition) - e1:SetOperation(c58641905.operation) - c:RegisterEffect(e1) -end -function c58641905.condition(e,tp,eg,ep,ev,re,r,rp) - if not re:IsActiveType(TYPE_TRAP) then return false end - local ex,cg,ct,cp,cv=Duel.GetOperationInfo(ev,CATEGORY_DAMAGE) - if ex then return true end - ex,cg,ct,cp,cv=Duel.GetOperationInfo(ev,CATEGORY_RECOVER) - return ex -end -function c58641905.operation(e,tp,eg,ep,ev,re,r,rp) - local cid=Duel.GetChainInfo(ev,CHAININFO_CHAIN_ID) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CHANGE_DAMAGE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetTargetRange(1,1) - e1:SetLabel(cid) - e1:SetValue(c58641905.refcon) - e1:SetReset(RESET_CHAIN) - Duel.RegisterEffect(e1,tp) -end -function c58641905.refcon(e,re,val,r,rp,rc) - local cc=Duel.GetCurrentChain() - if cc==0 or bit.band(r,REASON_EFFECT)==0 then return end - local cid=Duel.GetChainInfo(0,CHAININFO_CHAIN_ID) - if cid==e:GetLabel() then return 0 end - return val -end diff --git a/script/c58685438.lua b/script/c58685438.lua deleted file mode 100644 index 2b2400651a..0000000000 --- a/script/c58685438.lua +++ /dev/null @@ -1,26 +0,0 @@ ---二角獣レーム -function c58685438.initial_effect(c) - --deckdes - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(58685438,0)) - e1:SetCategory(CATEGORY_DECKDES) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_BE_MATERIAL) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCondition(c58685438.ddcon) - e1:SetTarget(c58685438.ddtg) - e1:SetOperation(c58685438.ddop) - c:RegisterEffect(e1) -end -function c58685438.ddcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsLocation(LOCATION_GRAVE) and r==REASON_SYNCHRO -end -function c58685438.ddtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,1-tp,2) -end -function c58685438.ddop(e,tp,eg,ep,ev,re,r,rp) - local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) - Duel.DiscardDeck(p,2,REASON_EFFECT) -end diff --git a/script/c58695102.lua b/script/c58695102.lua deleted file mode 100644 index 4d31060630..0000000000 --- a/script/c58695102.lua +++ /dev/null @@ -1,39 +0,0 @@ ---リ・バイブル -function c58695102.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(58695102,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_GRAVE) - e1:SetCountLimit(1,58695102) - e1:SetCondition(c58695102.condition) - e1:SetCost(c58695102.cost) - e1:SetTarget(c58695102.target) - e1:SetOperation(c58695102.operation) - c:RegisterEffect(e1) -end -function c58695102.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetFieldGroupCount(tp,LOCATION_EXTRA,0)<=Duel.GetFieldGroupCount(tp,0,LOCATION_EXTRA)-5 -end -function c58695102.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,2000) end - Duel.PayLPCost(tp,2000) -end -function c58695102.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c58695102.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+0x47e0000) - e1:SetValue(LOCATION_REMOVED) - c:RegisterEffect(e1,true) - end -end diff --git a/script/c58712976.lua b/script/c58712976.lua deleted file mode 100644 index ace316f5f7..0000000000 --- a/script/c58712976.lua +++ /dev/null @@ -1,65 +0,0 @@ ---ヘルフレイムゴースト -function c58712976.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsRace,RACE_PYRO),4,2) - c:EnableReviveLimit() - --attack up - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetDescription(aux.Stringid(58712976,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c58712976.cost) - e1:SetOperation(c58712976.operation) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(58712976,1)) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_DESTROYED) - e2:SetCondition(c58712976.rmcon) - e2:SetTarget(c58712976.rmtg) - e2:SetOperation(c58712976.rmop) - c:RegisterEffect(e2) -end -function c58712976.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c58712976.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_COPY_INHERIT) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(500) - e1:SetReset(RESET_EVENT+0x1ff0000+RESET_PHASE+PHASE_END,2) - c:RegisterEffect(e1) - end -end -function c58712976.rmcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetPreviousAttackOnField()>=2500 -end -function c58712976.filter(c) - return c:IsType(TYPE_MONSTER) and c:IsAbleToRemove() -end -function c58712976.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and c58712976.filter(chkc) end - if chk==0 then return true end - if Duel.IsExistingTarget(c58712976.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,3,nil) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,c58712976.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,3,3,nil) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,3,0,0) - end -end -function c58712976.rmop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - if not g then return end - local rg=g:Filter(Card.IsRelateToEffect,nil,e) - if rg:GetCount()>0 then - Duel.Remove(rg,POS_FACEUP,REASON_EFFECT) - end -end diff --git a/script/c58760121.lua b/script/c58760121.lua deleted file mode 100644 index f61bb7b7cf..0000000000 --- a/script/c58760121.lua +++ /dev/null @@ -1,22 +0,0 @@ ---ワーム・ファルコ -function c58760121.initial_effect(c) - --flip - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FLIP+EFFECT_TYPE_SINGLE) - e1:SetCategory(CATEGORY_POSITION) - e1:SetTarget(c58760121.postg) - e1:SetOperation(c58760121.posop) - c:RegisterEffect(e1) -end -function c58760121.filter(c) - return c:IsFaceup() and c:IsSetCard(0x3e) and c:IsRace(RACE_REPTILE) -end -function c58760121.postg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local g=Duel.GetMatchingGroup(c58760121.filter,tp,LOCATION_MZONE,0,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_POSITION,g,g:GetCount(),0,0) -end -function c58760121.posop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c58760121.filter,tp,LOCATION_MZONE,0,e:GetHandler()) - Duel.ChangePosition(g,POS_FACEDOWN_DEFENCE,0,POS_FACEDOWN_DEFENCE,0) -end diff --git a/script/c58775978.lua b/script/c58775978.lua deleted file mode 100644 index 866ff61499..0000000000 --- a/script/c58775978.lua +++ /dev/null @@ -1,55 +0,0 @@ ---悪夢の鉄檻 -function c58775978.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_POSITION) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c58775978.target) - e1:SetOperation(c58775978.activate) - c:RegisterEffect(e1) - --cannot attack - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - c:RegisterEffect(e2) - --remain field - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_REMAIN_FIELD) - c:RegisterEffect(e3) -end -function c58775978.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - --destroy - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_SZONE) - e1:SetCondition(c58775978.descon) - e1:SetOperation(c58775978.desop) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END+RESET_OPPO_TURN,2) - e:GetHandler():RegisterEffect(e1) - e:GetHandler():RegisterFlagEffect(1082946,RESET_PHASE+PHASE_END+RESET_OPPO_TURN,0,2) - c58775978[e:GetHandler()]=e1 -end -function c58775978.activate(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():SetTurnCounter(0) -end -function c58775978.descon(e,tp,eg,ep,ev,re,r,rp) - return tp~=Duel.GetTurnPlayer() -end -function c58775978.desop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local ct=c:GetTurnCounter() - ct=ct+1 - c:SetTurnCounter(ct) - if ct==2 then - Duel.Destroy(c,REASON_RULE) - c:ResetFlagEffect(1082946) - end -end diff --git a/script/c58786132.lua b/script/c58786132.lua deleted file mode 100644 index fe4d99c29c..0000000000 --- a/script/c58786132.lua +++ /dev/null @@ -1,69 +0,0 @@ ---邪帝家臣ルキウス -function c58786132.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(1,58786132) - e1:SetCost(c58786132.spcost) - e1:SetTarget(c58786132.sptg) - e1:SetOperation(c58786132.spop) - c:RegisterEffect(e1) - --confirm - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_RELEASE) - e2:SetCountLimit(1,58786133) - e2:SetCondition(c58786132.condition) - e2:SetTarget(c58786132.target) - e2:SetOperation(c58786132.operation) - c:RegisterEffect(e2) -end -function c58786132.cfilter(c) - return c:IsLevelAbove(5) and c:IsAbleToRemoveAsCost() -end -function c58786132.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c58786132.cfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c58786132.cfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c58786132.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c58786132.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) - end - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) - e1:SetTargetRange(1,0) - e1:SetTarget(c58786132.splimit) - Duel.RegisterEffect(e1,tp) -end -function c58786132.splimit(e,c,sump,sumtype,sumpos,targetp,se) - return c:IsLocation(LOCATION_EXTRA) -end -function c58786132.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsReason(REASON_SUMMON) -end -function c58786132.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFacedown,tp,0,LOCATION_ONFIELD,1,nil) end - Duel.SetChainLimit(c58786132.chlimit) -end -function c58786132.chlimit(e,ep,tp) - return tp==ep -end -function c58786132.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsFacedown,tp,0,LOCATION_ONFIELD,nil) - Duel.ConfirmCards(tp,g) -end diff --git a/script/c58807980.lua b/script/c58807980.lua deleted file mode 100644 index fe27cbf339..0000000000 --- a/script/c58807980.lua +++ /dev/null @@ -1,61 +0,0 @@ ---モノケロース -function c58807980.initial_effect(c) - c:EnableReviveLimit() - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c58807980.hspcon) - e1:SetOperation(c58807980.hspop) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(58807980,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_BE_MATERIAL) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCondition(c58807980.spcon) - e2:SetTarget(c58807980.sptg) - e2:SetOperation(c58807980.spop) - c:RegisterEffect(e2) -end -function c58807980.cfilter(c) - return c:IsType(TYPE_SPELL) and c:IsAbleToRemoveAsCost() -end -function c58807980.hspcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c58807980.cfilter,tp,LOCATION_HAND,0,1,nil) -end -function c58807980.hspop(e,tp,eg,ep,ev,re,r,rp,c) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c58807980.cfilter,tp,LOCATION_HAND,0,1,1,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c58807980.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsLocation(LOCATION_GRAVE) and r==REASON_SYNCHRO -end -function c58807980.filter(c,e,tp) - return c:IsLocation(LOCATION_GRAVE) and c:IsType(TYPE_TUNER) and c:IsRace(RACE_BEAST) - and c:IsCanBeEffectTarget(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c58807980.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local mg=e:GetHandler():GetReasonCard():GetMaterial() - if chkc then return mg:IsContains(chkc) and c58807980.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and mg:IsExists(c58807980.filter,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=mg:FilterSelect(tp,c58807980.filter,1,1,nil,e,tp) - Duel.SetTargetCard(g) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c58807980.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c58820853.lua b/script/c58820853.lua deleted file mode 100644 index 4e7cfb2839..0000000000 --- a/script/c58820853.lua +++ /dev/null @@ -1,40 +0,0 @@ ---BF-蒼炎のシュラ -function c58820853.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(58820853,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_BATTLE_DESTROYING) - e1:SetCondition(aux.bdogcon) - e1:SetTarget(c58820853.target) - e1:SetOperation(c58820853.operation) - c:RegisterEffect(e1) -end -function c58820853.filter(c,e,tp) - return c:IsAttackBelow(1500) and c:IsSetCard(0x33) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c58820853.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c58820853.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c58820853.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local c=e:GetHandler() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c58820853.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - local tc=g:GetFirst() - if tc and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)>0 then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e2) - end -end diff --git a/script/c58820923.lua b/script/c58820923.lua deleted file mode 100644 index 551f371911..0000000000 --- a/script/c58820923.lua +++ /dev/null @@ -1,112 +0,0 @@ ---No.95 ギャラクシーアイズ・ダークマター・ドラゴン -function c58820923.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,9,3,c58820923.ovfilter,aux.Stringid(58820923,0)) - c:EnableReviveLimit() - --xyzlimit - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL) - e1:SetValue(1) - c:RegisterEffect(e1) - --remove - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetCondition(c58820923.rmcon) - e2:SetCost(c58820923.rmcost) - e2:SetTarget(c58820923.rmtg) - e2:SetOperation(c58820923.rmop) - c:RegisterEffect(e2) - --multi attack - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_MZONE) - e3:SetCondition(c58820923.atkcon) - e3:SetCost(c58820923.atkcost) - e3:SetTarget(c58820923.atktg) - e3:SetOperation(c58820923.atkop) - c:RegisterEffect(e3) -end -c58820923.xyz_number=95 -function c58820923.ovfilter(c) - return c:IsFaceup() and c:IsSetCard(0x107b) and c:IsType(TYPE_XYZ) -end -function c58820923.rmcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_XYZ -end -function c58820923.cfilter(c) - return c:IsRace(RACE_DRAGON) and c:IsAbleToGraveAsCost() -end -function c58820923.rmcost(e,tp,eg,ep,ev,re,r,rp,chk) - local g=Duel.GetMatchingGroup(c58820923.cfilter,tp,LOCATION_DECK,0,nil) - if chk==0 then return g:GetClassCount(Card.GetCode)>2 end - local tg=Group.CreateGroup() - for i=1,3 do - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local sg=g:Select(tp,1,1,nil) - g:Remove(Card.IsCode,nil,sg:GetFirst():GetCode()) - tg:Merge(sg) - end - Duel.SendtoGrave(tg,REASON_COST) -end -function c58820923.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)>2 - and not Duel.IsPlayerAffectedByEffect(1-tp,30459350) end -end -function c58820923.rmfilter(c) - return c:IsType(TYPE_MONSTER) and c:IsAbleToRemove() -end -function c58820923.rmop(e,tp,eg,ep,ev,re,r,rp) - if Duel.IsPlayerAffectedByEffect(1-tp,30459350) then return end - local g=Duel.GetMatchingGroup(c58820923.rmfilter,1-tp,LOCATION_DECK,0,nil) - if g:GetCount()>2 then - Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_REMOVE) - local sg=g:Select(1-tp,3,3,nil) - Duel.Remove(sg,POS_FACEUP,REASON_EFFECT) - else - local cg=Duel.GetFieldGroup(1-tp,LOCATION_DECK,0) - Duel.ConfirmCards(tp,cg) - Duel.ShuffleDeck(1-tp) - end -end -function c58820923.atkcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsAbleToEnterBP() -end -function c58820923.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c58820923.atktg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():GetEffectCount(EFFECT_EXTRA_ATTACK)==0 end -end -function c58820923.atkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_EXTRA_ATTACK) - e1:SetValue(1) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetCode(EFFECT_CANNOT_DIRECT_ATTACK) - e2:SetCondition(c58820923.dircon) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EFFECT_CANNOT_ATTACK) - e3:SetCondition(c58820923.atkcon2) - c:RegisterEffect(e3) - end -end -function c58820923.dircon(e) - return e:GetHandler():GetAttackAnnouncedCount()>0 -end -function c58820923.atkcon2(e) - return e:GetHandler():IsDirectAttacked() -end diff --git a/script/c58843503.lua b/script/c58843503.lua deleted file mode 100644 index de9fcc91c4..0000000000 --- a/script/c58843503.lua +++ /dev/null @@ -1,52 +0,0 @@ ---ミッド・ピース・ゴーレム -function c58843503.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(58843503,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetCondition(c58843503.spcon) - e1:SetTarget(c58843503.sptg) - e1:SetOperation(c58843503.spop) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e2) - local e3=e1:Clone() - e3:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - c:RegisterEffect(e3) -end -function c58843503.cfilter(c) - return c:IsFaceup() and c:IsCode(25247218) -end -function c58843503.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c58843503.cfilter,tp,LOCATION_ONFIELD,0,1,nil) -end -function c58843503.filter(c,e,tp) - return c:IsCode(22754505) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c58843503.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c58843503.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c58843503.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c58843503.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - local tc=g:GetFirst() - if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1,true) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e2,true) - Duel.SpecialSummonComplete() - end -end diff --git a/script/c58851034.lua b/script/c58851034.lua deleted file mode 100644 index 067cba2048..0000000000 --- a/script/c58851034.lua +++ /dev/null @@ -1,47 +0,0 @@ ---封魔の呪印 -function c58851034.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_CHAINING) - e1:SetCondition(c58851034.condition) - e1:SetCost(c58851034.cost) - e1:SetTarget(c58851034.target) - e1:SetOperation(c58851034.activate) - c:RegisterEffect(e1) -end -function c58851034.condition(e,tp,eg,ep,ev,re,r,rp) - return re:IsActiveType(TYPE_SPELL) and re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev) -end -function c58851034.cfilter(c) - return c:IsType(TYPE_SPELL) and c:IsDiscardable() -end -function c58851034.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c58851034.cfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,c58851034.cfilter,1,1,REASON_COST+REASON_DISCARD,nil) -end -function c58851034.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) - end -end -function c58851034.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateActivation(ev) - if re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(eg,REASON_EFFECT) - end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EFFECT_CANNOT_ACTIVATE) - e1:SetTargetRange(0,1) - e1:SetValue(c58851034.aclimit) - e1:SetLabel(re:GetHandler():GetCode()) - Duel.RegisterEffect(e1,tp) -end -function c58851034.aclimit(e,re,tp) - return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:GetHandler():IsCode(e:GetLabel()) -end diff --git a/script/c58859575.lua b/script/c58859575.lua deleted file mode 100644 index 47d60ec419..0000000000 --- a/script/c58859575.lua +++ /dev/null @@ -1,90 +0,0 @@ ---VW-タイガー・カタパルト -function c58859575.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcCode2(c,51638941,96300057,true,true) - --spsummon condition - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(c58859575.splimit) - c:RegisterEffect(e1) - --special summon rule - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_SPSUMMON_PROC) - e2:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e2:SetRange(LOCATION_EXTRA) - e2:SetCondition(c58859575.spcon) - e2:SetOperation(c58859575.spop) - c:RegisterEffect(e2) - --pos - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(58859575,0)) - e3:SetCategory(CATEGORY_POSITION) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetRange(LOCATION_MZONE) - e3:SetCost(c58859575.poscost) - e3:SetTarget(c58859575.postg) - e3:SetOperation(c58859575.posop) - c:RegisterEffect(e3) -end -function c58859575.splimit(e,se,sp,st) - return not e:GetHandler():IsLocation(LOCATION_EXTRA) -end -function c58859575.spfilter(c,code) - return c:IsCode(code) and c:IsAbleToRemoveAsCost() -end -function c58859575.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ft<-1 then return false end - local g1=Duel.GetMatchingGroup(c58859575.spfilter,tp,LOCATION_ONFIELD,0,nil,51638941) - local g2=Duel.GetMatchingGroup(c58859575.spfilter,tp,LOCATION_ONFIELD,0,nil,96300057) - if g1:GetCount()==0 or g2:GetCount()==0 then return false end - if ft>0 then return true end - local f1=g1:FilterCount(Card.IsLocation,nil,LOCATION_MZONE) - local f2=g2:FilterCount(Card.IsLocation,nil,LOCATION_MZONE) - if ft==-1 then return f1>0 and f2>0 - else return f1>0 or f2>0 end -end -function c58859575.spop(e,tp,eg,ep,ev,re,r,rp,c) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - local g1=Duel.GetMatchingGroup(c58859575.spfilter,tp,LOCATION_ONFIELD,0,nil,51638941) - local g2=Duel.GetMatchingGroup(c58859575.spfilter,tp,LOCATION_ONFIELD,0,nil,96300057) - g1:Merge(g2) - local g=Group.CreateGroup() - local tc=nil - for i=1,2 do - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - if ft<=0 then - tc=g1:FilterSelect(tp,Card.IsLocation,1,1,nil,LOCATION_MZONE):GetFirst() - else - tc=g1:Select(tp,1,1,nil):GetFirst() - end - g:AddCard(tc) - g1:Remove(Card.IsCode,nil,tc:GetCode()) - ft=ft+1 - end - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c58859575.poscost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) -end -function c58859575.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) end - if chk==0 then return Duel.IsExistingTarget(nil,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE) - local g=Duel.SelectTarget(tp,nil,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_POSITION,g,g:GetCount(),0,0) -end -function c58859575.posop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.ChangePosition(tc,POS_FACEUP_DEFENCE,POS_FACEDOWN_DEFENCE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK,true) - end -end diff --git a/script/c58861941.lua b/script/c58861941.lua deleted file mode 100644 index 65c3827e5b..0000000000 --- a/script/c58861941.lua +++ /dev/null @@ -1,8 +0,0 @@ ---ラージマウス -function c58861941.initial_effect(c) - --direct attack - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DIRECT_ATTACK) - c:RegisterEffect(e1) -end diff --git a/script/c58873391.lua b/script/c58873391.lua deleted file mode 100644 index bff457d36c..0000000000 --- a/script/c58873391.lua +++ /dev/null @@ -1,67 +0,0 @@ ---フィッシャーチャージ -function c58873391.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,0x1e0) - e1:SetCost(c58873391.cost) - e1:SetTarget(c58873391.target) - e1:SetOperation(c58873391.activate) - c:RegisterEffect(e1) -end -function c58873391.cost(e,tp,eg,ep,ev,re,r,rp,chk) - e:SetLabel(1) - return true -end -function c58873391.costfilter(c,e,dg) - if not c:IsRace(RACE_FISH) then return false end - local a=0 - if dg:IsContains(c) then a=1 end - if c:GetEquipCount()==0 then return dg:GetCount()-a>=1 end - local eg=c:GetEquipGroup() - local tc=eg:GetFirst() - while tc do - if dg:IsContains(tc) then a=a+1 end - tc=eg:GetNext() - end - return dg:GetCount()-a>=1 -end -function c58873391.tgfilter(c,e) - return c:IsDestructable() and c:IsCanBeEffectTarget(e) -end -function c58873391.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsDestructable() end - if chk==0 then - if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)==0 then return false end - if e:GetLabel()==1 then - e:SetLabel(0) - local rg=Duel.GetReleaseGroup(tp) - local dg=Duel.GetMatchingGroup(c58873391.tgfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler(),e) - local res=rg:IsExists(c58873391.costfilter,1,e:GetHandler(),e,dg) - return res - else - return Duel.IsExistingTarget(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) - end - end - if e:GetLabel()==1 then - e:SetLabel(0) - local rg=Duel.GetReleaseGroup(tp) - local dg=Duel.GetMatchingGroup(c58873391.tgfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler(),e) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) - local sg=rg:FilterSelect(tp,c58873391.costfilter,1,1,e:GetHandler(),e,dg) - Duel.Release(sg,REASON_COST) - end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c58873391.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)>0 then - Duel.Draw(tp,1,REASON_EFFECT) - end -end diff --git a/script/c58911105.lua b/script/c58911105.lua deleted file mode 100644 index 66b249e524..0000000000 --- a/script/c58911105.lua +++ /dev/null @@ -1,43 +0,0 @@ ---成金忍者 -function c58911105.initial_effect(c) - --to hand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(58911105,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCost(c58911105.cost) - e1:SetTarget(c58911105.target) - e1:SetOperation(c58911105.operation) - c:RegisterEffect(e1) -end -function c58911105.costfilter(c) - return c:IsType(TYPE_TRAP) and c:IsAbleToGraveAsCost() -end -function c58911105.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c58911105.costfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local cg=Duel.SelectMatchingCard(tp,c58911105.costfilter,tp,LOCATION_HAND,0,1,1,nil) - Duel.SendtoGrave(cg,REASON_COST) -end -function c58911105.filter(c,e,tp) - return c:IsLevelBelow(4) and c:IsSetCard(0x2b) and - (c:IsCanBeSpecialSummoned(e,0,tp,false,false) or c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN)) -end -function c58911105.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c58911105.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c58911105.operation(e,tp,eg,ep,ev,re,r,rp,chk) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c58911105.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - local tc=g:GetFirst() - if not tc then return end - local spos=0 - if tc:IsCanBeSpecialSummoned(e,0,tp,false,false) then spos=spos+POS_FACEUP_DEFENCE end - if tc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN) then spos=spos+POS_FACEDOWN_DEFENCE end - Duel.SpecialSummon(tc,0,tp,tp,false,false,spos) -end diff --git a/script/c58921041.lua b/script/c58921041.lua deleted file mode 100644 index ff3217d77e..0000000000 --- a/script/c58921041.lua +++ /dev/null @@ -1,36 +0,0 @@ ---魔封じの芳香 -function c58921041.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_DRAW_PHASE) - c:RegisterEffect(e1) - --cannot activate - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetCode(EFFECT_CANNOT_ACTIVATE) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(1,1) - e2:SetValue(c58921041.aclimit) - c:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e3:SetCode(EVENT_SSET) - e3:SetRange(LOCATION_SZONE) - e3:SetOperation(c58921041.aclimset) - c:RegisterEffect(e3) -end -function c58921041.aclimit(e,re,tp) - if not re:IsHasType(EFFECT_TYPE_ACTIVATE) or not re:IsActiveType(TYPE_SPELL) then return false end - local c=re:GetHandler() - return not c:IsLocation(LOCATION_SZONE) or c:GetFlagEffect(58921041)>0 -end -function c58921041.aclimset(e,tp,eg,ep,ev,re,r,rp) - local tc=eg:GetFirst() - while tc do - tc:RegisterFlagEffect(58921041,RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END+RESET_OPPO_TURN,0,1) - tc=eg:GetNext() - end -end diff --git a/script/c58924378.lua b/script/c58924378.lua deleted file mode 100644 index c8ca72d7ba..0000000000 --- a/script/c58924378.lua +++ /dev/null @@ -1,27 +0,0 @@ ---エレキャッスル -function c58924378.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --atk down - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_BATTLED) - e2:SetRange(LOCATION_SZONE) - e2:SetOperation(c58924378.atkdn) - c:RegisterEffect(e2) -end -function c58924378.atkdn(e,tp,eg,ep,ev,re,r,rp,chk) - local a=Duel.GetAttacker() - local d=Duel.GetAttackTarget() - if d and d:IsSetCard(0xe) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(-1000) - a:RegisterEffect(e1) - end -end diff --git a/script/c58947797.lua b/script/c58947797.lua deleted file mode 100644 index 2cfbc0b00f..0000000000 --- a/script/c58947797.lua +++ /dev/null @@ -1,69 +0,0 @@ ---ヴァンパイア・デューク -function c58947797.initial_effect(c) - --spsuccess - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(58947797,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c58947797.sptg) - e1:SetOperation(c58947797.spop) - c:RegisterEffect(e1) - --to grave - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(58947797,1)) - e2:SetCategory(CATEGORY_TOGRAVE) - e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetCountLimit(1,58947797) - e2:SetTarget(c58947797.tgtg) - e2:SetOperation(c58947797.tgop) - c:RegisterEffect(e2) - -- - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE) - e3:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL) - e3:SetValue(c58947797.xyzlimit) - c:RegisterEffect(e3) -end -function c58947797.filter(c,e,tp) - return c:IsSetCard(0x8e) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c58947797.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c58947797.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c58947797.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c58947797.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c58947797.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENCE) - end -end -function c58947797.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CARDTYPE) - local op=Duel.SelectOption(tp,70,71,72) - e:SetLabel(bit.lshift(1,op)) - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,1-tp,LOCATION_DECK) -end -function c58947797.tgfilter(c,ty) - return c:IsType(ty) and c:IsAbleToGrave() -end -function c58947797.tgop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(1-tp,c58947797.tgfilter,1-tp,LOCATION_DECK,0,1,1,nil,e:GetLabel()) - if g:GetCount()>0 then - Duel.SendtoGrave(g,REASON_EFFECT) - end -end -function c58947797.xyzlimit(e,c) - if not c then return false end - return not c:IsAttribute(ATTRIBUTE_DARK) -end diff --git a/script/c58990362.lua b/script/c58990362.lua deleted file mode 100644 index 6dc1b19c31..0000000000 --- a/script/c58990362.lua +++ /dev/null @@ -1,61 +0,0 @@ ---秘竜星-セフィラシウゴ -function c58990362.initial_effect(c) - --pendulum summon - aux.AddPendulumProcedure(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --splimit - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetRange(LOCATION_PZONE) - e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE) - e2:SetTargetRange(1,0) - e2:SetTarget(c58990362.splimit) - e2:SetCondition(aux.nfbdncon) - c:RegisterEffect(e2) - --search - local e3=Effect.CreateEffect(c) - e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - e3:SetCountLimit(1,58990362) - e3:SetCondition(c58990362.condition1) - e3:SetTarget(c58990362.target) - e3:SetOperation(c58990362.operation) - c:RegisterEffect(e3) - local e4=e3:Clone() - e4:SetCode(EVENT_DESTROYED) - e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e4:SetCondition(c58990362.condition2) - c:RegisterEffect(e4) -end -function c58990362.splimit(e,c,sump,sumtype,sumpos,targetp) - if c:IsSetCard(0x9e) or c:IsSetCard(0xc4) then return false end - return bit.band(sumtype,SUMMON_TYPE_PENDULUM)==SUMMON_TYPE_PENDULUM -end -function c58990362.condition1(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_PENDULUM -end -function c58990362.condition2(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsReason(REASON_BATTLE+REASON_EFFECT) and c:IsPreviousLocation(LOCATION_MZONE) and c:GetPreviousControler()==tp -end -function c58990362.thfilter(c) - return (c:IsSetCard(0x9e) or c:IsSetCard(0xc4)) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand() -end -function c58990362.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c58990362.thfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c58990362.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c58990362.thfilter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c58990631.lua b/script/c58990631.lua deleted file mode 100644 index aefcdb36b3..0000000000 --- a/script/c58990631.lua +++ /dev/null @@ -1,66 +0,0 @@ ---オートマチック・レーザー -function c58990631.initial_effect(c) - --Activate(summon) - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetCost(c58990631.cost) - e1:SetTarget(c58990631.target) - e1:SetOperation(c58990631.activate) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_ACTIVATE) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetCost(c58990631.cost) - e2:SetTarget(c58990631.target2) - e2:SetOperation(c58990631.activate2) - c:RegisterEffect(e2) -end -function c58990631.cfilter(c) - return c:IsCode(36623431) and not c:IsPublic() -end -function c58990631.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c58990631.cfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) - local g=Duel.SelectMatchingCard(tp,c58990631.cfilter,tp,LOCATION_HAND,0,1,1,nil) - Duel.ConfirmCards(1-tp,g) - Duel.ShuffleHand(tp) -end -function c58990631.filter(c,tp,ep) - return c:IsFaceup() and c:IsAttackAbove(1000) - and ep~=tp and c:IsDestructable() -end -function c58990631.target(e,tp,eg,ep,ev,re,r,rp,chk) - local tc=eg:GetFirst() - if chk==0 then return c58990631.filter(tc,tp,ep) end - Duel.SetTargetCard(eg) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,tc,1,0,0) -end -function c58990631.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=eg:GetFirst() - if tc and tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsAttackAbove(1000) then - Duel.Destroy(tc,REASON_EFFECT) - end -end -function c58990631.filter2(c,tp) - return c:IsFaceup() and c:IsAttackAbove(1000) and c:GetSummonPlayer()~=tp - and c:IsDestructable() -end -function c58990631.target2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return eg:IsExists(c58990631.filter2,1,nil,tp) end - local g=eg:Filter(c58990631.filter2,nil,tp) - Duel.SetTargetCard(eg) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c58990631.filter3(c,e,tp) - return c:IsFaceup() and c:IsAttackAbove(1000) and c:GetSummonPlayer()~=tp - and c:IsRelateToEffect(e) and c:IsDestructable() -end -function c58990631.activate2(e,tp,eg,ep,ev,re,r,rp) - local g=eg:Filter(c58990631.filter3,nil,e,tp) - if g:GetCount()>0 then - Duel.Destroy(g,REASON_EFFECT) - end -end diff --git a/script/c58996430.lua b/script/c58996430.lua deleted file mode 100644 index f2e4a8c668..0000000000 --- a/script/c58996430.lua +++ /dev/null @@ -1,36 +0,0 @@ ---ライトロード・ビースト ウォルフ -function c58996430.initial_effect(c) - c:EnableUnsummonable() - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetDescription(aux.Stringid(58996430,0)) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCondition(c58996430.condtion) - e1:SetTarget(c58996430.target) - e1:SetOperation(c58996430.operation) - c:RegisterEffect(e1) - --splimit - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e2:SetCode(EFFECT_SPSUMMON_CONDITION) - e2:SetValue(c58996430.splimit) - c:RegisterEffect(e2) -end -function c58996430.splimit(e,se,sp,st) - return se:IsHasType(EFFECT_TYPE_ACTIONS) -end -function c58996430.condtion(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetPreviousLocation()==LOCATION_DECK -end -function c58996430.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c58996430.operation(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c5901497.lua b/script/c5901497.lua deleted file mode 100644 index deabcfff6e..0000000000 --- a/script/c5901497.lua +++ /dev/null @@ -1,8 +0,0 @@ ---女王の影武者 -function c5901497.initial_effect(c) - --direct attack - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DIRECT_ATTACK) - c:RegisterEffect(e1) -end diff --git a/script/c59019082.lua b/script/c59019082.lua deleted file mode 100644 index a737282b9a..0000000000 --- a/script/c59019082.lua +++ /dev/null @@ -1,38 +0,0 @@ ---ライトロード・ウォリアー ガロス -function c59019082.initial_effect(c) - --discard deck - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetCategory(CATEGORY_DECKDES+CATEGORY_DRAW) - e1:SetDescription(aux.Stringid(59019082,0)) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCondition(c59019082.condtion) - e1:SetTarget(c59019082.target) - e1:SetOperation(c59019082.operation) - c:RegisterEffect(e1) -end -function c59019082.cfilter(c) - return c:IsPreviousLocation(LOCATION_DECK) -end -function c59019082.condtion(e,tp,eg,ep,ev,re,r,rp) - if not re then return false end - local rc=re:GetHandler() - return rp==tp and bit.band(r,REASON_EFFECT)~=0 and not rc:IsCode(59019082) and rc:IsSetCard(0x38) and rc:IsType(TYPE_MONSTER) - and re:GetActivateLocation()==LOCATION_MZONE and eg:IsExists(c59019082.cfilter,1,nil) -end -function c59019082.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,2) -end -function c59019082.filter(c) - return c:IsLocation(LOCATION_GRAVE) and c:IsSetCard(0x38) and c:IsType(TYPE_MONSTER) -end -function c59019082.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:GetControler()~=tp or not c:IsRelateToEffect(e) or c:IsFacedown() then return end - Duel.DiscardDeck(tp,2,REASON_EFFECT) - local dg=Duel.GetOperatedGroup() - local d=dg:FilterCount(c59019082.filter,nil) - if d>0 then Duel.Draw(tp,d,REASON_EFFECT) end -end diff --git a/script/c59023523.lua b/script/c59023523.lua deleted file mode 100644 index 59bd024f11..0000000000 --- a/script/c59023523.lua +++ /dev/null @@ -1,35 +0,0 @@ ---サイバネティック・マジシャン -function c59023523.initial_effect(c) - --atk change - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(59023523,0)) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c59023523.cost) - e1:SetTarget(c59023523.target) - e1:SetOperation(c59023523.operation) - c:RegisterEffect(e1) -end -function c59023523.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) -end -function c59023523.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsFaceup() and chkc:IsLocation(LOCATION_MZONE) end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) -end -function c59023523.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e1:SetValue(2000) - tc:RegisterEffect(e1) - end -end diff --git a/script/c59036972.lua b/script/c59036972.lua deleted file mode 100644 index a2a5a4d046..0000000000 --- a/script/c59036972.lua +++ /dev/null @@ -1,6 +0,0 @@ ---マブラス -function c59036972.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcCode2(c,72842870,92944626,true,true) -end diff --git a/script/c59042331.lua b/script/c59042331.lua deleted file mode 100644 index 8d57cd4374..0000000000 --- a/script/c59042331.lua +++ /dev/null @@ -1,41 +0,0 @@ ---ガード・ヘッジ -function c59042331.initial_effect(c) - --atkdown - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(59042331,0)) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_PRE_DAMAGE_CALCULATE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c59042331.atkcon) - e1:SetCost(c59042331.atkcost) - e1:SetOperation(c59042331.atkop) - c:RegisterEffect(e1) -end -function c59042331.atkcon(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetAttacker() - if tc:IsControler(1-tp) then tc=Duel.GetAttackTarget() end - e:SetLabelObject(tc) - return tc and tc:IsControler(tp) -end -function c59042331.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end -function c59042331.atkop(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetLabelObject() - if tc:IsRelateToBattle() then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e1:SetValue(1) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_DAMAGE) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_SET_ATTACK_FINAL) - e2:SetValue(tc:GetAttack()/2) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e2) - end -end diff --git a/script/c59048135.lua b/script/c59048135.lua deleted file mode 100644 index 25aa8c94cc..0000000000 --- a/script/c59048135.lua +++ /dev/null @@ -1,77 +0,0 @@ ---昇華する紋章 -function c59048135.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --search - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(59048135,0)) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_SZONE) - e2:SetCountLimit(1) - e2:SetCost(c59048135.thcost) - e2:SetTarget(c59048135.thtg) - e2:SetOperation(c59048135.thop) - c:RegisterEffect(e2) - --cannot be target - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) - e3:SetRange(LOCATION_SZONE) - e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e3:SetTarget(c59048135.etarget) - e3:SetValue(c59048135.evalue) - c:RegisterEffect(e3) - Duel.AddCustomActivityCounter(59048135,ACTIVITY_SUMMON,c59048135.counterfilter) - Duel.AddCustomActivityCounter(59048135,ACTIVITY_SPSUMMON,c59048135.counterfilter) -end -function c59048135.counterfilter(c) - return c:IsRace(RACE_PSYCHO) and c:IsType(TYPE_XYZ) or c:IsSetCard(0x76) -end -function c59048135.etarget(e,c) - return c:IsRace(RACE_PSYCHO) and c:IsType(TYPE_XYZ) -end -function c59048135.evalue(e,re,rp) - return re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and aux.tgval(e,re,rp) -end -function c59048135.cfilter(c) - return c:IsSetCard(0x76) and c:IsType(TYPE_MONSTER) and c:IsDiscardable() -end -function c59048135.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetCustomActivityCount(59048135,tp,ACTIVITY_SUMMON)==0 - and Duel.GetCustomActivityCount(59048135,tp,ACTIVITY_SPSUMMON)==0 - and Duel.IsExistingMatchingCard(c59048135.cfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,c59048135.cfilter,1,1,REASON_COST+REASON_DISCARD,nil) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) - e1:SetTargetRange(1,0) - e1:SetTarget(c59048135.splimit) - Duel.RegisterEffect(e1,tp) - local e2=e1:Clone() - e2:SetCode(EFFECT_CANNOT_SUMMON) - Duel.RegisterEffect(e2,tp) -end -function c59048135.splimit(e,c) - return not (c:IsRace(RACE_PSYCHO) and c:IsType(TYPE_XYZ)) and not c:IsSetCard(0x76) -end -function c59048135.filter(c) - return c:IsSetCard(0x92) and c:IsType(TYPE_SPELL+TYPE_TRAP) and not c:IsCode(59048135) and c:IsAbleToHand() -end -function c59048135.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c59048135.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c59048135.thop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c59048135.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c59057152.lua b/script/c59057152.lua deleted file mode 100644 index 63be6f7bf4..0000000000 --- a/script/c59057152.lua +++ /dev/null @@ -1,72 +0,0 @@ ---聖騎士モルドレッド -function c59057152.initial_effect(c) - --normal monster - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetCode(EFFECT_ADD_TYPE) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c59057152.eqcon1) - e1:SetValue(TYPE_NORMAL) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_REMOVE_TYPE) - e2:SetValue(TYPE_EFFECT) - c:RegisterEffect(e2) - --Attribute Dark - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e3:SetCode(EFFECT_CHANGE_ATTRIBUTE) - e3:SetRange(LOCATION_MZONE) - e3:SetCondition(c59057152.eqcon2) - e3:SetValue(ATTRIBUTE_DARK) - c:RegisterEffect(e3) - local e4=e3:Clone() - e4:SetCode(EFFECT_UPDATE_LEVEL) - e4:SetValue(1) - c:RegisterEffect(e4) - --spsummon - local e5=Effect.CreateEffect(c) - e5:SetDescription(aux.Stringid(59057152,0)) - e5:SetCategory(CATEGORY_SPECIAL_SUMMON) - e5:SetType(EFFECT_TYPE_IGNITION) - e5:SetRange(LOCATION_MZONE) - e5:SetCountLimit(1) - e5:SetCondition(c59057152.spcon) - e5:SetTarget(c59057152.sptg) - e5:SetOperation(c59057152.spop) - c:RegisterEffect(e5) -end -function c59057152.eqcon1(e) - local eg=e:GetHandler():GetEquipGroup() - return not eg or not eg:IsExists(Card.IsSetCard,1,nil,0x207a) -end -function c59057152.eqcon2(e) - local eg=e:GetHandler():GetEquipGroup() - return eg and eg:IsExists(Card.IsSetCard,1,nil,0x207a) -end -function c59057152.spcon(e,tp,eg,ep,ev,re,r,rp) - return c59057152.eqcon2(e) and Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==1 -end -function c59057152.spfilter(c,e,tp) - return c:IsSetCard(0x107a) and c:GetCode()~=59057152 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c59057152.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c59057152.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c59057152.desfilter(c) - return c:IsFaceup() and c:IsType(TYPE_EQUIP) -end -function c59057152.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c59057152.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENCE)~=0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local dg=Duel.SelectMatchingCard(tp,c59057152.desfilter,tp,LOCATION_SZONE,0,1,1,nil) - Duel.Destroy(dg,REASON_EFFECT) - end -end diff --git a/script/c59070329.lua b/script/c59070329.lua deleted file mode 100644 index 0c30df4978..0000000000 --- a/script/c59070329.lua +++ /dev/null @@ -1,34 +0,0 @@ ---皇の波動 -function c59070329.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c59070329.cost) - e1:SetTarget(c59070329.target) - e1:SetOperation(c59070329.activate) - c:RegisterEffect(e1) -end -function c59070329.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckRemoveOverlayCard(tp,1,0,1,REASON_COST) end - Duel.RemoveOverlayCard(tp,1,0,1,1,REASON_COST) -end -function c59070329.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c59070329.filter,tp,LOCATION_MZONE,0,1,nil) end -end -function c59070329.filter(c) - return c:IsFaceup() and c:IsType(TYPE_XYZ) -end -function c59070329.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c59070329.filter,tp,LOCATION_MZONE,0,nil) - local tc=g:GetFirst() - while tc do - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - e1:SetValue(1) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - tc=g:GetNext() - end -end diff --git a/script/c5908650.lua b/script/c5908650.lua deleted file mode 100644 index 1e002f0596..0000000000 --- a/script/c5908650.lua +++ /dev/null @@ -1,50 +0,0 @@ ---幻奏の音姫ローリイット・フランソワ -function c5908650.initial_effect(c) - --to hand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(5908650,0)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCountLimit(1) - e1:SetCost(c5908650.thcost) - e1:SetTarget(c5908650.thtg) - e1:SetOperation(c5908650.thop) - c:RegisterEffect(e1) - Duel.AddCustomActivityCounter(5908650,ACTIVITY_CHAIN,c5908650.chainfilter) -end -function c5908650.chainfilter(re,tp,cid) - return not (re:IsActiveType(TYPE_MONSTER) and not re:GetHandler():IsAttribute(ATTRIBUTE_LIGHT)) -end -function c5908650.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetCustomActivityCount(5908650,tp,ACTIVITY_CHAIN)==0 end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) - e1:SetCode(EFFECT_CANNOT_ACTIVATE) - e1:SetTargetRange(1,0) - e1:SetValue(c5908650.aclimit) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function c5908650.aclimit(e,re,tp) - return re:IsActiveType(TYPE_MONSTER) and not re:GetHandler():IsAttribute(ATTRIBUTE_LIGHT) -end -function c5908650.filter(c) - return c:IsRace(RACE_FAIRY) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsAbleToHand() -end -function c5908650.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c5908650.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c5908650.filter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c5908650.filter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c5908650.thop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end diff --git a/script/c5914184.lua b/script/c5914184.lua deleted file mode 100644 index baa1b108ea..0000000000 --- a/script/c5914184.lua +++ /dev/null @@ -1,58 +0,0 @@ ---倍返し -function c5914184.initial_effect(c) - --counter - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_DAMAGE) - e1:SetCondition(c5914184.actcon) - e1:SetOperation(c5914184.actop) - c:RegisterEffect(e1) -end -function c5914184.actcon(e,tp,eg,ep,ev,re,r,rp) - return ep==tp and tp~=rp and ev>=1000 and bit.band(r,REASON_EFFECT)~=0 -end -function c5914184.actop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - local ct=math.floor(ev/1000) - c:AddCounter(0x1a,ct) - --damage - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(5914184,0)) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetRange(LOCATION_SZONE) - e1:SetCountLimit(1) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCondition(c5914184.damcon) - e1:SetTarget(c5914184.damtg) - e1:SetOperation(c5914184.damop) - if Duel.GetTurnPlayer()==tp then - e1:SetLabel(0) - e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN) - else - e1:SetLabel(Duel.GetTurnCount()) - e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN,2) - end - c:RegisterEffect(e1) - end -end -function c5914184.damcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp and Duel.GetTurnCount()~=e:GetLabel() -end -function c5914184.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - local dam=e:GetHandler():GetCounter(0x1a)*2000; - Duel.SetTargetParam(dam) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,dam) -end -function c5914184.damop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - if Duel.Destroy(e:GetHandler(),REASON_EFFECT)~=0 then - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) - end -end diff --git a/script/c5915629.lua b/script/c5915629.lua deleted file mode 100644 index 44fb64985c..0000000000 --- a/script/c5915629.lua +++ /dev/null @@ -1,22 +0,0 @@ ---強欲な贈り物 -function c5915629.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c5915629.target) - e1:SetOperation(c5915629.activate) - c:RegisterEffect(e1) -end -function c5915629.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(1-tp,2) end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(2) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,1-tp,2) -end -function c5915629.activate(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end diff --git a/script/c59156966.lua b/script/c59156966.lua deleted file mode 100644 index 920f0bdd76..0000000000 --- a/script/c59156966.lua +++ /dev/null @@ -1,43 +0,0 @@ ---黄金の歯車装置箱 -function c59156966.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetCondition(c59156966.condition) - e1:SetTarget(c59156966.target) - e1:SetOperation(c59156966.activate) - c:RegisterEffect(e1) -end -function c59156966.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end -function c59156966.filter(c) - return c:IsFaceup() and c:IsSetCard(0x11) -end -function c59156966.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c59156966.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c59156966.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - local g=Duel.SelectTarget(tp,c59156966.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) -end -function c59156966.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - e1:SetValue(500) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_UPDATE_DEFENCE) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - e2:SetValue(1500) - tc:RegisterEffect(e2) - end -end diff --git a/script/c59170782.lua b/script/c59170782.lua deleted file mode 100644 index feaa811ca9..0000000000 --- a/script/c59170782.lua +++ /dev/null @@ -1,98 +0,0 @@ ---水精鱗-アビストリーテ -function c59170782.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,3,3) - c:EnableReviveLimit() - --change target - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(59170782,0)) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_CHAINING) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c59170782.tgcon1) - e1:SetCost(c59170782.tgcost) - e1:SetOperation(c59170782.tgop1) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(59170782,0)) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_ATTACK_ANNOUNCE) - e2:SetRange(LOCATION_MZONE) - e2:SetCondition(c59170782.tgcon2) - e2:SetCost(c59170782.tgcost) - e2:SetOperation(c59170782.tgop2) - c:RegisterEffect(e2) - --spsummon - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(59170782,1)) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_TO_GRAVE) - e3:SetCondition(c59170782.spcon) - e3:SetTarget(c59170782.sptg) - e3:SetOperation(c59170782.spop) - c:RegisterEffect(e3) -end -function c59170782.tgcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c59170782.tgcon1(e,tp,eg,ep,ev,re,r,rp) - if rp==tp or not re:IsActiveType(TYPE_SPELL+TYPE_TRAP) or not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end - local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) - if not g or g:GetCount()~=1 then return false end - local tc=g:GetFirst() - local c=e:GetHandler() - if tc==c or tc:GetControler()~=tp or tc:IsFacedown() or not tc:IsLocation(LOCATION_MZONE) or not tc:IsSetCard(0x74) then return false end - local tf=re:GetTarget() - local res,ceg,cep,cev,cre,cr,crp=Duel.CheckEvent(re:GetCode(),true) - return tf(re,rp,ceg,cep,cev,cre,cr,crp,0,c) -end -function c59170782.tgop1(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - local tf=re:GetTarget() - local res,ceg,cep,cev,cre,cr,crp=Duel.CheckEvent(re:GetCode(),true) - if tf(re,rp,ceg,cep,cev,cre,cr,crp,0,c) then - local g=Group.CreateGroup() - g:AddCard(c) - Duel.ChangeTargetCard(ev,g) - end - end -end -function c59170782.tgcon2(e,tp,eg,ep,ev,re,r,rp) - if tp==Duel.GetTurnPlayer() then return false end - local at=Duel.GetAttackTarget() - if at and at:IsFaceup() and at:IsSetCard(0x74) then - local ag=eg:GetFirst():GetAttackableTarget() - return ag:IsContains(e:GetHandler()) - end - return false -end -function c59170782.tgop2(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.ChangeAttackTarget(c) - end -end -function c59170782.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsReason(REASON_DESTROY) -end -function c59170782.spfilter(c,e,tp) - return c:IsSetCard(0x74) and c:GetCode()~=59170782 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c59170782.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c59170782.spfilter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c59170782.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c59170782.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c59170782.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c59197169.lua b/script/c59197169.lua deleted file mode 100644 index a1902166b1..0000000000 --- a/script/c59197169.lua +++ /dev/null @@ -1,30 +0,0 @@ ---闇 -function c59197169.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --Atk - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e2:SetValue(c59197169.val) - c:RegisterEffect(e2) - --Def - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetCode(EFFECT_UPDATE_DEFENCE) - e3:SetRange(LOCATION_SZONE) - e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e3:SetValue(c59197169.val) - c:RegisterEffect(e3) -end -function c59197169.val(e,c) - local r=c:GetRace() - if bit.band(r,RACE_FIEND+RACE_SPELLCASTER)>0 then return 200 - elseif bit.band(r,RACE_FAIRY)>0 then return -200 - else return 0 end -end diff --git a/script/c59235795.lua b/script/c59235795.lua deleted file mode 100644 index 10f860c36d..0000000000 --- a/script/c59235795.lua +++ /dev/null @@ -1,28 +0,0 @@ ---デスサイクロン -function c59235795.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(59235795,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetCondition(c59235795.condition) - e1:SetTarget(c59235795.target) - e1:SetOperation(c59235795.operation) - c:RegisterEffect(e1) -end -function c59235795.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) -end -function c59235795.filter(c) - return (c:IsFacedown() or c:GetAttribute()~=ATTRIBUTE_WIND) and c:IsDestructable() -end -function c59235795.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local g=Duel.GetMatchingGroup(c59235795.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c59235795.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c59235795.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - Duel.Destroy(g,REASON_EFFECT) -end diff --git a/script/c59237154.lua b/script/c59237154.lua deleted file mode 100644 index bcd773d767..0000000000 --- a/script/c59237154.lua +++ /dev/null @@ -1,29 +0,0 @@ ---うごめく影 -function c59237154.initial_effect(c) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --shuffle - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(59237154,0)) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_SZONE) - e2:SetCountLimit(1) - e2:SetCost(c59237154.cost) - e2:SetTarget(c59237154.target) - e2:SetOperation(c59237154.operation) - c:RegisterEffect(e2) -end -function c59237154.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,300) end - Duel.PayLPCost(tp,300) -end -function c59237154.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFacedown,tp,LOCATION_MZONE,0,2,nil) end -end -function c59237154.operation(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local g=Duel.GetMatchingGroup(Card.IsFacedown,tp,LOCATION_MZONE,0,nil) - Duel.ShuffleSetCard(g) -end diff --git a/script/c59251766.lua b/script/c59251766.lua deleted file mode 100644 index 193357d892..0000000000 --- a/script/c59251766.lua +++ /dev/null @@ -1,44 +0,0 @@ ---武神器-サグサ -function c59251766.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(59251766,0)) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_GRAVE) - e1:SetCountLimit(1,59251766) - e1:SetCost(c59251766.cost) - e1:SetTarget(c59251766.target) - e1:SetOperation(c59251766.operation) - c:RegisterEffect(e1) -end -function c59251766.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) -end -function c59251766.filter(c) - return c:IsFaceup() and c:IsSetCard(0x88) and c:IsRace(RACE_BEASTWARRIOR) -end -function c59251766.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c59251766.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c59251766.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c59251766.filter,tp,LOCATION_MZONE,0,1,1,nil) -end -function c59251766.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_INDESTRUCTABLE_COUNT) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCountLimit(1) - e1:SetValue(c59251766.valcon) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - end -end -function c59251766.valcon(e,re,r,rp) - return bit.band(r,REASON_BATTLE+REASON_EFFECT)~=0 -end diff --git a/script/c59258334.lua b/script/c59258334.lua deleted file mode 100644 index 0f1f83e2bf..0000000000 --- a/script/c59258334.lua +++ /dev/null @@ -1,86 +0,0 @@ ---洗脳光線 -function c59258334.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_CONTROL) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c59258334.target) - e1:SetOperation(c59258334.operation) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_SZONE) - e2:SetCode(EFFECT_SELF_DESTROY) - e2:SetCondition(c59258334.descon) - c:RegisterEffect(e2) - --destroy2 - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e3:SetRange(LOCATION_SZONE) - e3:SetCode(EVENT_LEAVE_FIELD) - e3:SetCondition(c59258334.descon2) - e3:SetOperation(c59258334.desop2) - c:RegisterEffect(e3) - --remove counter - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e4:SetRange(LOCATION_SZONE) - e4:SetCode(EVENT_PHASE+PHASE_END) - e4:SetCountLimit(1) - e4:SetCondition(c59258334.rccon) - e4:SetOperation(c59258334.rcop) - c:RegisterEffect(e4) -end -function c59258334.filter(c) - return c:GetCounter(0xe)>0 and c:IsControlerCanBeChanged() -end -function c59258334.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c59258334.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c59258334.filter,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) - local g=Duel.SelectTarget(tp,c59258334.filter,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0) -end -function c59258334.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) then return end - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:GetCounter(0xe)>0 and tc:IsRelateToEffect(e) then - c:SetCardTarget(tc) - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_OWNER_RELATE) - e1:SetRange(LOCATION_MZONE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_CONTROL) - e1:SetValue(tp) - e1:SetReset(RESET_EVENT+0x1fc0000) - e1:SetCondition(c59258334.con) - tc:RegisterEffect(e1) - end -end -function c59258334.con(e) - return e:GetOwner():IsHasCardTarget(e:GetHandler()) -end -function c59258334.descon(e) - local c=e:GetHandler() - if c:GetCardTargetCount()==0 then return false end - return c:GetFirstCardTarget():GetCounter(0xe)==0 -end -function c59258334.descon2(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetHandler():GetFirstCardTarget() - return tc and eg:IsContains(tc) and tc:IsReason(REASON_DESTROY) -end -function c59258334.desop2(e,tp,eg,ep,ev,re,r,rp) - Duel.Destroy(e:GetHandler(),REASON_EFFECT) -end -function c59258334.rccon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp and e:GetHandler():GetFirstCardTarget() -end -function c59258334.rcop(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetHandler():GetFirstCardTarget() - tc:RemoveCounter(tp,0xe,1,REASON_EFFECT) -end diff --git a/script/c59281922.lua b/script/c59281922.lua deleted file mode 100644 index 57aaa102fd..0000000000 --- a/script/c59281922.lua +++ /dev/null @@ -1,88 +0,0 @@ ---サイバー・ドラゴン・ドライ -function c59281922.initial_effect(c) - --lv - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(59281922,0)) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetCost(c59281922.lvcost) - e1:SetTarget(c59281922.lvtg) - e1:SetOperation(c59281922.lvop) - c:RegisterEffect(e1) - --indes - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(59281922,1)) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_REMOVE) - e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) - e2:SetTarget(c59281922.target) - e2:SetOperation(c59281922.operation) - c:RegisterEffect(e2) - --code - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e3:SetCode(EFFECT_CHANGE_CODE) - e3:SetRange(LOCATION_MZONE+LOCATION_GRAVE) - e3:SetValue(70095154) - c:RegisterEffect(e3) - Duel.AddCustomActivityCounter(59281922,ACTIVITY_SPSUMMON,c59281922.counterfilter) -end -function c59281922.counterfilter(c) - return c:IsRace(RACE_MACHINE) -end -function c59281922.lvcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetCustomActivityCount(59281922,tp,ACTIVITY_SPSUMMON)==0 end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) - e1:SetTargetRange(1,0) - e1:SetTarget(c59281922.splimit) - Duel.RegisterEffect(e1,tp) -end -function c59281922.splimit(e,c,sump,sumtype,sumpos,targetp,se) - return c:GetRace()~=RACE_MACHINE -end -function c59281922.filter(c) - return c:IsFaceup() and c:IsCode(70095154) -end -function c59281922.lvtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c59281922.filter,tp,LOCATION_MZONE,0,1,nil) end -end -function c59281922.lvop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c59281922.filter,tp,LOCATION_MZONE,0,nil) - local tc=g:GetFirst() - while tc do - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CHANGE_LEVEL) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetValue(5) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - tc=g:GetNext() - end -end -function c59281922.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c59281922.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c59281922.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c59281922.filter,tp,LOCATION_MZONE,0,1,1,nil) -end -function c59281922.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetValue(1) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - tc:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - tc:RegisterEffect(e2) - end -end diff --git a/script/c59290628.lua b/script/c59290628.lua deleted file mode 100644 index f3c4c1059f..0000000000 --- a/script/c59290628.lua +++ /dev/null @@ -1,8 +0,0 @@ ---ナイトメア・ホース -function c59290628.initial_effect(c) - --direct attack - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DIRECT_ATTACK) - c:RegisterEffect(e1) -end diff --git a/script/c59297550.lua b/script/c59297550.lua deleted file mode 100644 index cd2e394351..0000000000 --- a/script/c59297550.lua +++ /dev/null @@ -1,38 +0,0 @@ ---ゼンマイマジシャン -function c59297550.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(59297550,0)) - e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_NO_TURN_RESET) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_FIELD) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EVENT_CHAIN_SOLVING) - e1:SetCountLimit(1) - e1:SetCondition(c59297550.spcon) - e1:SetTarget(c59297550.sptg) - e1:SetOperation(c59297550.spop) - c:RegisterEffect(e1) -end -function c59297550.spcon(e,tp,eg,ep,ev,re,r,rp) - return re:IsActiveType(TYPE_MONSTER) - and re:GetHandler():IsSetCard(0x58) and re:GetHandler():GetCode()~=59297550 -end -function c59297550.filter(c,e,tp) - return c:IsSetCard(0x58) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c59297550.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsFaceup() and c:IsRelateToEffect(e) and not c:IsStatus(STATUS_CHAINING) - and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c59297550.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c59297550.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c59297550.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENCE) - end -end diff --git a/script/c5929801.lua b/script/c5929801.lua deleted file mode 100644 index d05b1039ec..0000000000 --- a/script/c5929801.lua +++ /dev/null @@ -1,75 +0,0 @@ ---RR-ファジー・レイニアス -function c5929801.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(1,5929801) - e1:SetCondition(c5929801.spcon) - e1:SetCost(c5929801.cost) - e1:SetTarget(c5929801.sptg) - e1:SetOperation(c5929801.spop) - c:RegisterEffect(e1) - --to hand - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetProperty(EFFECT_FLAG_DELAY) - e2:SetCountLimit(1,5929802) - e2:SetCost(c5929801.cost) - e2:SetTarget(c5929801.thtg) - e2:SetOperation(c5929801.thop) - c:RegisterEffect(e2) - Duel.AddCustomActivityCounter(5929801,ACTIVITY_SPSUMMON,c5929801.counterfilter) -end -function c5929801.counterfilter(c) - return c:IsSetCard(0xba) -end -function c5929801.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetCustomActivityCount(5929801,tp,ACTIVITY_SPSUMMON)==0 end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) - e1:SetTargetRange(1,0) - e1:SetTarget(c5929801.splimit) - e1:SetReset(RESET_PHASE+RESET_END) - Duel.RegisterEffect(e1,tp) -end -function c5929801.splimit(e,c,sump,sumtype,sumpos,targetp,se) - return not c:IsSetCard(0xba) -end -function c5929801.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0xba) and not c:IsCode(5929801) -end -function c5929801.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c5929801.cfilter,tp,LOCATION_MZONE,0,1,nil) -end -function c5929801.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c5929801.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) - end -end -function c5929801.thfilter(c) - return c:IsCode(5929801) and c:IsAbleToHand() -end -function c5929801.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c5929801.thfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c5929801.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c5929801.thfilter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c59305593.lua b/script/c59305593.lua deleted file mode 100644 index eade9ac4e6..0000000000 --- a/script/c59305593.lua +++ /dev/null @@ -1,15 +0,0 @@ ---手違い -function c59305593.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --disable search - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_CANNOT_TO_HAND) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(LOCATION_DECK,LOCATION_DECK) - c:RegisterEffect(e2) -end diff --git a/script/c59312550.lua b/script/c59312550.lua deleted file mode 100644 index ee96940009..0000000000 --- a/script/c59312550.lua +++ /dev/null @@ -1,34 +0,0 @@ ---ジュラック・ヴェロー -function c59312550.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(59312550,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetCondition(c59312550.condition) - e1:SetTarget(c59312550.target) - e1:SetOperation(c59312550.operation) - c:RegisterEffect(e1) -end -function c59312550.condition(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsLocation(LOCATION_GRAVE) and c:IsReason(REASON_BATTLE) - and c:IsPreviousPosition(POS_FACEUP_ATTACK) and c:GetPreviousControler()==tp -end -function c59312550.filter(c,e,tp) - return c:IsSetCard(0x22) and c:IsAttackBelow(1700) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c59312550.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c59312550.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c59312550.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c59312550.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c59344077.lua b/script/c59344077.lua deleted file mode 100644 index dbcf6d0cd7..0000000000 --- a/script/c59344077.lua +++ /dev/null @@ -1,30 +0,0 @@ ---マジック・ドレイン -function c59344077.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_CHAINING) - e1:SetCondition(c59344077.condition) - e1:SetOperation(c59344077.activate) - c:RegisterEffect(e1) -end -function c59344077.condition(e,tp,eg,ep,ev,re,r,rp) - return rp~=tp and re:IsActiveType(TYPE_SPELL) and re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev) -end -function c59344077.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsType,tp,0,LOCATION_HAND,nil,TYPE_SPELL) - if g:GetCount()>0 and Duel.SelectYesNo(1-tp,aux.Stringid(59344077,0)) then - Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_DISCARD) - local sg=g:Select(1-tp,1,1,nil) - Duel.SendtoGrave(sg,REASON_EFFECT+REASON_DISCARD) - if Duel.IsChainDisablable(0) then - Duel.NegateEffect(0) - return - end - end - Duel.NegateActivation(ev) - if re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(eg,REASON_EFFECT) - end -end diff --git a/script/c59364406.lua b/script/c59364406.lua deleted file mode 100644 index 3f44f7274c..0000000000 --- a/script/c59364406.lua +++ /dev/null @@ -1,114 +0,0 @@ ---灼岩魔獣 -function c59364406.initial_effect(c) - --equip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(59364406,0)) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetTarget(c59364406.eqtg) - e1:SetOperation(c59364406.eqop) - c:RegisterEffect(e1) - --unequip - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(59364406,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_SZONE) - e2:SetCondition(c59364406.uncon) - e2:SetTarget(c59364406.sptg) - e2:SetOperation(c59364406.spop) - c:RegisterEffect(e2) - --destroy - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(59364406,2)) - e3:SetCategory(CATEGORY_DESTROY) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetRange(LOCATION_SZONE) - e3:SetCode(EVENT_BATTLE_DAMAGE) - e3:SetCondition(c59364406.descon) - e3:SetTarget(c59364406.destg) - e3:SetOperation(c59364406.desop) - c:RegisterEffect(e3) - --destroy sub - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_EQUIP) - e4:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e4:SetCode(EFFECT_DESTROY_SUBSTITUTE) - e4:SetCondition(c59364406.uncon) - e4:SetValue(c59364406.repval) - c:RegisterEffect(e4) - --eqlimit - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_SINGLE) - e5:SetCode(EFFECT_EQUIP_LIMIT) - e5:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e5:SetValue(c59364406.eqlimit) - c:RegisterEffect(e5) -end -function c59364406.uncon(e) - return e:GetHandler():IsStatus(STATUS_UNION) -end -function c59364406.repval(e,re,r,rp) - return bit.band(r,REASON_BATTLE)~=0 -end -function c59364406.eqlimit(e,c) - return c:IsCode(85359414) -end -function c59364406.filter(c) - return c:IsFaceup() and c:IsCode(85359414) and c:GetUnionCount()==0 -end -function c59364406.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c59364406.filter(chkc) end - if chk==0 then return e:GetHandler():GetFlagEffect(59364406)==0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingTarget(c59364406.filter,tp,LOCATION_MZONE,0,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local g=Duel.SelectTarget(tp,c59364406.filter,tp,LOCATION_MZONE,0,1,1,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0) - e:GetHandler():RegisterFlagEffect(59364406,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1) -end -function c59364406.eqop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if not c:IsRelateToEffect(e) or c:IsFacedown() then return end - if not tc:IsRelateToEffect(e) or not c59364406.filter(tc) then - Duel.SendtoGrave(c,REASON_EFFECT) - return - end - if not Duel.Equip(tp,c,tc,false) then return end - c:SetStatus(STATUS_UNION,true) -end -function c59364406.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():GetFlagEffect(59364406)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,false) end - Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) - e:GetHandler():RegisterFlagEffect(59364406,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1) -end -function c59364406.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP_ATTACK) - end -end -function c59364406.descon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsStatus(STATUS_UNION) and ep~=tp and eg:GetFirst()==e:GetHandler():GetEquipTarget() -end -function c59364406.desfilter(c) - return c:IsFaceup() and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable() -end -function c59364406.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and c59364406.desfilter(chkc) end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c59364406.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c59364406.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c59368956.lua b/script/c59368956.lua deleted file mode 100644 index cd03abea23..0000000000 --- a/script/c59368956.lua +++ /dev/null @@ -1,43 +0,0 @@ ---ブンボーグ002 -function c59368956.initial_effect(c) - --search - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(59368956,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e1:SetTarget(c59368956.target) - e1:SetOperation(c59368956.operation) - c:RegisterEffect(e1) - --boost - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetRange(LOCATION_MZONE) - e2:SetTargetRange(LOCATION_MZONE,0) - e2:SetTarget(c59368956.atktg) - e2:SetValue(500) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EFFECT_UPDATE_DEFENCE) - c:RegisterEffect(e3) -end -function c59368956.filter(c) - return c:IsSetCard(0xab) and c:IsAbleToHand() -end -function c59368956.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c59368956.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c59368956.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c59368956.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end -function c59368956.atktg(e,c) - return c:IsRace(RACE_MACHINE) and c~=e:GetHandler() -end diff --git a/script/c59371387.lua b/script/c59371387.lua deleted file mode 100644 index 9b255601a2..0000000000 --- a/script/c59371387.lua +++ /dev/null @@ -1,28 +0,0 @@ ---鉄壁の機皇兵 -function c59371387.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --disable - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(LOCATION_MZONE,0) - e2:SetTarget(c59371387.target) - e2:SetCode(EFFECT_DISABLE) - c:RegisterEffect(e2) - --indes - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetRange(LOCATION_SZONE) - e3:SetTargetRange(LOCATION_MZONE,0) - e3:SetTarget(c59371387.target) - e3:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e3:SetValue(1) - c:RegisterEffect(e3) -end -function c59371387.target(e,c) - return c:IsPosition(POS_FACEUP_ATTACK) and c:IsSetCard(0x6013) -end diff --git a/script/c59380081.lua b/script/c59380081.lua deleted file mode 100644 index 6b4521bf9a..0000000000 --- a/script/c59380081.lua +++ /dev/null @@ -1,14 +0,0 @@ ---ビッグホーン・マンモス -function c59380081.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(0,LOCATION_MZONE) - e1:SetTarget(c59380081.target) - c:RegisterEffect(e1) -end -function c59380081.target(e,c) - return c:IsStatus(STATUS_SUMMON_TURN+STATUS_FLIP_SUMMON_TURN+STATUS_SPSUMMON_TURN) -end diff --git a/script/c59385322.lua b/script/c59385322.lua deleted file mode 100644 index 78b7f1d9cc..0000000000 --- a/script/c59385322.lua +++ /dev/null @@ -1,93 +0,0 @@ ---コアバスター -function c59385322.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c59385322.target) - e1:SetOperation(c59385322.operation) - c:RegisterEffect(e1) - --Equip limit - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_EQUIP_LIMIT) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetValue(c59385322.eqlimit) - c:RegisterEffect(e2) - --destroy - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(59385322,0)) - e3:SetCategory(CATEGORY_DESTROY) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e3:SetRange(LOCATION_SZONE) - e3:SetCode(EVENT_BATTLE_START) - e3:SetCondition(c59385322.descon) - e3:SetTarget(c59385322.destg) - e3:SetOperation(c59385322.desop) - c:RegisterEffect(e3) - --salvage - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(59385322,1)) - e4:SetCategory(CATEGORY_TOHAND) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e4:SetCode(EVENT_TO_GRAVE) - e4:SetCondition(c59385322.thcon) - e4:SetTarget(c59385322.thtg) - e4:SetOperation(c59385322.thop) - c:RegisterEffect(e4) -end -function c59385322.eqlimit(e,c) - return c:IsSetCard(0x1d) -end -function c59385322.filter(c) - return c:IsFaceup() and c:IsSetCard(0x1d) -end -function c59385322.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c59385322.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c59385322.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c59385322.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c59385322.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,c,tc) - end -end -function c59385322.descon(e,tp,eg,ep,ev,re,r,rp) - local ec=e:GetHandler():GetEquipTarget() - if ec~=Duel.GetAttacker() and ec~=Duel.GetAttackTarget() then return false end - local tc=ec:GetBattleTarget() - e:SetLabelObject(tc) - return tc and tc:IsFaceup() and tc:IsAttribute(ATTRIBUTE_LIGHT+ATTRIBUTE_DARK) -end -function c59385322.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetLabelObject(),1,0,0) -end -function c59385322.desop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local tc=e:GetLabelObject() - if tc:IsFaceup() and tc:IsRelateToBattle() then - Duel.Destroy(tc,REASON_EFFECT) - end -end -function c59385322.thcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsReason(REASON_LOST_TARGET) - and not e:GetHandler():GetPreviousEquipTarget():IsLocation(LOCATION_MZONE) -end -function c59385322.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToHand() end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0) -end -function c59385322.thop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,e:GetHandler()) - end -end diff --git a/script/c59388357.lua b/script/c59388357.lua deleted file mode 100644 index 836986a0f2..0000000000 --- a/script/c59388357.lua +++ /dev/null @@ -1,39 +0,0 @@ ---炎王炎環 -function c59388357.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,59388357+EFFECT_COUNT_CODE_OATH) - e1:SetTarget(c59388357.target) - e1:SetOperation(c59388357.activate) - c:RegisterEffect(e1) -end -function c59388357.desfilter(c) - return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_FIRE) and c:IsDestructable() -end -function c59388357.spfilter(c,e,tp) - return c:IsAttribute(ATTRIBUTE_FIRE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c59388357.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsExistingTarget(c59388357.desfilter,tp,LOCATION_MZONE,0,1,nil) - and Duel.IsExistingTarget(c59388357.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g1=Duel.SelectTarget(tp,c59388357.desfilter,tp,LOCATION_MZONE,0,1,1,nil) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g2=Duel.SelectTarget(tp,c59388357.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g1,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g2,1,0,0) - e:SetLabelObject(g1:GetFirst()) -end -function c59388357.activate(e,tp,eg,ep,ev,re,r,rp) - local tc1,tc2=Duel.GetFirstTarget() - if tc1~=e:GetLabelObject() then tc1,tc2=tc2,tc1 end - if tc1:IsControler(tp) and tc1:IsRelateToEffect(e) and Duel.Destroy(tc1,REASON_EFFECT)>0 and tc2:IsRelateToEffect(e) then - Duel.SpecialSummon(tc2,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c59438930.lua b/script/c59438930.lua deleted file mode 100644 index e045e9a38d..0000000000 --- a/script/c59438930.lua +++ /dev/null @@ -1,32 +0,0 @@ ---幽鬼うさぎ -function c59438930.initial_effect(c) - --double - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_CHAINING) - e1:SetRange(LOCATION_MZONE+LOCATION_HAND) - e1:SetCountLimit(1,59438930) - e1:SetCondition(c59438930.condition) - e1:SetCost(c59438930.cost) - e1:SetTarget(c59438930.target) - e1:SetOperation(c59438930.operation) - c:RegisterEffect(e1) -end -function c59438930.condition(e,tp,eg,ep,ev,re,r,rp) - return re:GetHandler():IsOnField() and (re:IsActiveType(TYPE_MONSTER) - or (re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and not re:IsHasType(EFFECT_TYPE_ACTIVATE))) -end -function c59438930.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end -function c59438930.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return re:GetHandler():IsDestructable() end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) -end -function c59438930.operation(e,tp,eg,ep,ev,re,r,rp) - if re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(eg,REASON_EFFECT) - end -end diff --git a/script/c59463312.lua b/script/c59463312.lua deleted file mode 100644 index cc7c6be9ac..0000000000 --- a/script/c59463312.lua +++ /dev/null @@ -1,73 +0,0 @@ ---冥帝従騎エイドス -function c59463312.initial_effect(c) - --summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(59463312,0)) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetOperation(c59463312.sumop) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e2) - --spsummon - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(59463312,1)) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_GRAVE) - e3:SetCountLimit(1,59463312) - e3:SetCost(c59463312.cost) - e3:SetTarget(c59463312.target) - e3:SetOperation(c59463312.operation) - c:RegisterEffect(e3) -end -function c59463312.sumop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetFlagEffect(tp,59463312)~=0 then return end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetTargetRange(LOCATION_HAND,0) - e1:SetCode(EFFECT_EXTRA_SUMMON_COUNT) - e1:SetValue(0x1) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) - local e2=e1:Clone() - e2:SetCode(EFFECT_EXTRA_SET_COUNT) - Duel.RegisterEffect(e2,tp) - Duel.RegisterFlagEffect(tp,59463312,RESET_PHASE+PHASE_END,0,1) -end -function c59463312.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) -end -function c59463312.filter(c,e,tp) - return c:GetAttack()==800 and c:GetDefence()==1000 and not c:IsCode(59463312) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c59463312.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c59463312.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c59463312.filter,tp,LOCATION_GRAVE,0,1,e:GetHandler(),e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c59463312.filter,tp,LOCATION_GRAVE,0,1,1,e:GetHandler(),e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c59463312.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENCE) - end - end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) - e1:SetTargetRange(1,0) - e1:SetTarget(c59463312.splimit) - Duel.RegisterEffect(e1,tp) -end -function c59463312.splimit(e,c,sump,sumtype,sumpos,targetp,se) - return c:IsLocation(LOCATION_EXTRA) -end diff --git a/script/c59464593.lua b/script/c59464593.lua deleted file mode 100644 index b4bdf667a9..0000000000 --- a/script/c59464593.lua +++ /dev/null @@ -1,61 +0,0 @@ ---アームド・ドラゴン LV10 -function c59464593.initial_effect(c) - c:EnableReviveLimit() - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(aux.FALSE) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_SPSUMMON_PROC) - e2:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e2:SetRange(LOCATION_HAND) - e2:SetCondition(c59464593.spcon) - e2:SetOperation(c59464593.spop) - c:RegisterEffect(e2) - --destroy - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(59464593,0)) - e3:SetCategory(CATEGORY_DESTROY) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_MZONE) - e3:SetCost(c59464593.descost) - e3:SetTarget(c59464593.destg) - e3:SetOperation(c59464593.desop) - c:RegisterEffect(e3) -end -c59464593.lvupcount=1 -c59464593.lvup={73879377} -c59464593.lvdncount=3 -c59464593.lvdn={73879377,46384672,980973} -function c59464593.spcon(e,c) - if c==nil then return true end - return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-1 - and Duel.CheckReleaseGroup(c:GetControler(),Card.IsCode,1,nil,73879377) -end -function c59464593.spop(e,tp,eg,ep,ev,re,r,rp,c) - local g=Duel.SelectReleaseGroup(c:GetControler(),Card.IsCode,1,1,nil,73879377) - Duel.Release(g,REASON_COST) -end -function c59464593.dfilter(c) - return c:IsFaceup() and c:IsDestructable() -end -function c59464593.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,1,1,nil) - Duel.SendtoGrave(g,REASON_COST) -end -function c59464593.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c59464593.dfilter,tp,0,LOCATION_MZONE,1,nil) end - local g=Duel.GetMatchingGroup(c59464593.dfilter,tp,0,LOCATION_MZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c59464593.desop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c59464593.dfilter,tp,0,LOCATION_MZONE,nil) - Duel.Destroy(g,REASON_EFFECT) -end diff --git a/script/c59482302.lua b/script/c59482302.lua deleted file mode 100644 index 089ed3793a..0000000000 --- a/script/c59482302.lua +++ /dev/null @@ -1,38 +0,0 @@ ---A・ボム -function c59482302.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(59482302,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetCondition(c59482302.condition) - e1:SetTarget(c59482302.target) - e1:SetOperation(c59482302.operation) - c:RegisterEffect(e1) -end -function c59482302.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) - and e:GetHandler():GetReasonCard():IsAttribute(ATTRIBUTE_LIGHT) -end -function c59482302.filter(c,e) - return c:IsDestructable() and c:IsCanBeEffectTarget(e) -end -function c59482302.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and c59482302.filter(chkc,e) end - if chk==0 then return true end - local g=Duel.GetMatchingGroup(c59482302.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,e) - if g:GetCount()>1 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local sg=g:Select(tp,2,2,nil) - Duel.SetTargetCard(sg) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,2,0,0) - end -end -function c59482302.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - if not g then return end - local dg=g:Filter(Card.IsRelateToEffect,nil,e) - Duel.Destroy(dg,REASON_EFFECT) -end diff --git a/script/c59509952.lua b/script/c59509952.lua deleted file mode 100644 index 9289fc4f11..0000000000 --- a/script/c59509952.lua +++ /dev/null @@ -1,69 +0,0 @@ ---大天使クリスティア -function c59509952.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(59509952,0)) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c59509952.spcon) - e1:SetValue(1) - c:RegisterEffect(e1) - --disable spsummon - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetTargetRange(1,1) - c:RegisterEffect(e2) - --redirect - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) - e3:SetCondition(c59509952.recon) - e3:SetValue(LOCATION_DECK) - c:RegisterEffect(e3) - --to hand - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(59509952,1)) - e4:SetCategory(CATEGORY_TOHAND) - e4:SetProperty(EFFECT_FLAG_CARD_TARGET) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e4:SetRange(LOCATION_MZONE) - e4:SetCode(EVENT_SPSUMMON_SUCCESS) - e4:SetCondition(c59509952.condition) - e4:SetTarget(c59509952.target) - e4:SetOperation(c59509952.operation) - c:RegisterEffect(e4) -end -function c59509952.spcon(e,c) - if c==nil then return true end - return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and - Duel.GetMatchingGroupCount(Card.IsRace,c:GetControler(),LOCATION_GRAVE,0,nil,RACE_FAIRY)==4 -end -function c59509952.recon(e) - local c=e:GetHandler() - return c:IsFaceup() and c:GetDestination()==LOCATION_GRAVE -end -function c59509952.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+1 -end -function c59509952.filter(c) - return c:IsRace(RACE_FAIRY) and c:IsAbleToHand() -end -function c59509952.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c59509952.filter(chkc) end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c59509952.filter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0) -end -function c59509952.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ShuffleHand(tp) - end -end diff --git a/script/c59546528.lua b/script/c59546528.lua deleted file mode 100644 index f5918d45a1..0000000000 --- a/script/c59546528.lua +++ /dev/null @@ -1,49 +0,0 @@ ---氷結界の舞姫 -function c59546528.initial_effect(c) - --to hand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(59546528,0)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c59546528.condition) - e1:SetTarget(c59546528.target) - e1:SetOperation(c59546528.operation) - c:RegisterEffect(e1) -end -function c59546528.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x2f) -end -function c59546528.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c59546528.cfilter,tp,LOCATION_MZONE,0,1,e:GetHandler()) -end -function c59546528.cfilter2(c) - return c:IsSetCard(0x2f) and c:IsType(TYPE_MONSTER) and not c:IsPublic() -end -function c59546528.filter(c,e) - return c:IsFacedown() and c:IsAbleToHand() and (not e or c:IsRelateToEffect(e)) -end -function c59546528.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_SZONE) and chkc:IsControler(1-tp) and c59546528.filter(chkc) end - if chk==0 then return Duel.IsExistingMatchingCard(c59546528.cfilter2,tp,LOCATION_HAND,0,1,nil) - and Duel.IsExistingTarget(c59546528.filter,tp,0,LOCATION_SZONE,1,nil) end - local ht=Duel.GetMatchingGroupCount(c59546528.cfilter2,tp,LOCATION_HAND,0,nil) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g=Duel.SelectTarget(tp,c59546528.filter,tp,0,LOCATION_SZONE,1,ht,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0) -end -function c59546528.operation(e,tp,eg,ep,ev,re,r,rp,chk) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local hg=Duel.GetMatchingGroup(c59546528.cfilter2,tp,LOCATION_HAND,0,nil) - if hg:GetCount()0 then - Duel.SendtoHand(rg,nil,REASON_EFFECT) - end -end diff --git a/script/c59546797.lua b/script/c59546797.lua deleted file mode 100644 index df9a7eb7db..0000000000 --- a/script/c59546797.lua +++ /dev/null @@ -1,70 +0,0 @@ ---ジュラゲド -function c59546797.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(59546797,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_RECOVER) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(1,59546797) - e1:SetCondition(c59546797.spcon) - e1:SetTarget(c59546797.sptg) - e1:SetOperation(c59546797.spop) - c:RegisterEffect(e1) - --atk - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(59546797,1)) - e2:SetCategory(CATEGORY_ATKCHANGE) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetRange(LOCATION_MZONE) - e2:SetHintTiming(TIMING_DAMAGE_STEP) - e2:SetCondition(c59546797.atkcon) - e2:SetCost(c59546797.atkcost) - e2:SetTarget(c59546797.atktg) - e2:SetOperation(c59546797.atkop) - c:RegisterEffect(e2) -end -function c59546797.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()==PHASE_BATTLE and not Duel.CheckTiming(TIMING_BATTLE_START+TIMING_BATTLE_END) -end -function c59546797.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return not e:GetHandler():IsStatus(STATUS_CHAINING) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) - Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,1000) -end -function c59546797.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) then return end - if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then - Duel.Recover(tp,1000,REASON_EFFECT) - elseif Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then - Duel.SendtoGrave(c,REASON_EFFECT) - end -end -function c59546797.atkcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end -function c59546797.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end -function c59546797.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,nil) -end -function c59546797.atkop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsFacedown() or not tc:IsRelateToEffect(e) then return end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(1000) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,2) - tc:RegisterEffect(e1) -end diff --git a/script/c59560625.lua b/script/c59560625.lua deleted file mode 100644 index fba210f4aa..0000000000 --- a/script/c59560625.lua +++ /dev/null @@ -1,68 +0,0 @@ ---シフトチェンジ -function c59560625.initial_effect(c) - --change target - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(59560625,0)) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetCondition(c59560625.condition1) - e1:SetTarget(c59560625.target1) - e1:SetOperation(c59560625.activate1) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(59560625,1)) - e2:SetType(EFFECT_TYPE_ACTIVATE) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_CHAINING) - e2:SetCondition(c59560625.condition2) - e2:SetTarget(c59560625.target2) - e2:SetOperation(c59560625.activate2) - c:RegisterEffect(e2) -end -function c59560625.condition1(e,tp,eg,ep,ev,re,r,rp) - return tp~=Duel.GetTurnPlayer() -end -function c59560625.filter1(c,e) - return c:IsCanBeEffectTarget(e) -end -function c59560625.target1(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - local ag=eg:GetFirst():GetAttackableTarget() - local at=Duel.GetAttackTarget() - if chk==0 then return ag:IsExists(c59560625.filter1,1,at,e) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - local g=ag:FilterSelect(tp,c59560625.filter1,1,1,at,e) - Duel.SetTargetCard(g) -end -function c59560625.activate1(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.ChangeAttackTarget(tc) - end -end -function c59560625.condition2(e,tp,eg,ep,ev,re,r,rp) - if rp==tp or not re:IsHasType(EFFECT_TYPE_ACTIVATE) or not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end - local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) - if not g or g:GetCount()~=1 then return false end - local tc=g:GetFirst() - e:SetLabelObject(tc) - return tc:IsControler(tp) and tc:IsLocation(LOCATION_MZONE) -end -function c59560625.filter2(c,re,rp,tf,ceg,cep,cev,cre,cr,crp) - return tf(re,rp,ceg,cep,cev,cre,cr,crp,0,c) -end -function c59560625.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local tf=re:GetTarget() - local res,ceg,cep,cev,cre,cr,crp=Duel.CheckEvent(re:GetCode(),true) - if chkc then return chkc~=e:GetLabelObject() and chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and tf(re,rp,ceg,cep,cev,cre,cr,crp,0,chkc) end - if chk==0 then return Duel.IsExistingTarget(c59560625.filter2,tp,LOCATION_MZONE,0,1,e:GetLabelObject(),re,rp,tf,ceg,cep,cev,cre,cr,crp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - Duel.SelectTarget(tp,c59560625.filter2,tp,LOCATION_MZONE,0,1,1,e:GetLabelObject(),re,rp,tf,ceg,cep,cev,cre,cr,crp) -end -function c59560625.activate2(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - if g:GetFirst():IsRelateToEffect(e) then - Duel.ChangeTargetCard(ev,g) - end -end diff --git a/script/c59563768.lua b/script/c59563768.lua deleted file mode 100644 index bb7757e7f7..0000000000 --- a/script/c59563768.lua +++ /dev/null @@ -1,17 +0,0 @@ ---転身テンシーン -function c59563768.initial_effect(c) - --atk - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(c59563768.atkval) - c:RegisterEffect(e2) -end -function c59563768.filter(c) - return c:IsFaceup() and c:GetLevel()==2 -end -function c59563768.atkval(e,c) - return Duel.GetMatchingGroupCount(c59563768.filter,e:GetHandlerPlayer(),LOCATION_MZONE,0,nil)*400 -end diff --git a/script/c59575539.lua b/script/c59575539.lua deleted file mode 100644 index 25b7bd88db..0000000000 --- a/script/c59575539.lua +++ /dev/null @@ -1,18 +0,0 @@ ---クレボンス -function c59575539.initial_effect(c) - --be target - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(59575539,0)) - e1:SetCode(EVENT_BE_BATTLE_TARGET) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCost(c59575539.cost) - e1:SetOperation(c59575539.operation) - c:RegisterEffect(e1) -end -function c59575539.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,800) end - Duel.PayLPCost(tp,800) -end -function c59575539.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateAttack() -end diff --git a/script/c59593925.lua b/script/c59593925.lua deleted file mode 100644 index d85768cc34..0000000000 --- a/script/c59593925.lua +++ /dev/null @@ -1,66 +0,0 @@ ---共鳴破 -function c59593925.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c59593925.target) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(59593925,0)) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_BE_MATERIAL) - e2:SetRange(LOCATION_SZONE) - e2:SetCondition(c59593925.descon) - e2:SetTarget(c59593925.destg) - e2:SetOperation(c59593925.desop) - c:RegisterEffect(e2) - --self destroy - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e3:SetCode(EVENT_PHASE+PHASE_END) - e3:SetCountLimit(1) - e3:SetRange(LOCATION_SZONE) - e3:SetCondition(c59593925.sdescon) - e3:SetOperation(c59593925.sdesop) - c:RegisterEffect(e3) -end -function c59593925.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - e:GetHandler():SetTurnCounter(0) -end -function c59593925.cfilter(c) - return c:IsLocation(LOCATION_GRAVE) and c:IsSetCard(0x57) -end -function c59593925.descon(e,tp,eg,ep,ev,re,r,rp) - return r==REASON_SYNCHRO and eg:IsExists(c59593925.cfilter,1,nil) -end -function c59593925.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() and chkc:IsDestructable() end - if chk==0 then return e:GetHandler():IsRelateToEffect(e) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,0,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c59593925.desop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end -function c59593925.sdescon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c59593925.sdesop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local ct=c:GetTurnCounter() - ct=ct+1 - c:SetTurnCounter(ct) - if ct==2 then - Duel.Destroy(c,REASON_RULE) - end -end diff --git a/script/c596051.lua b/script/c596051.lua deleted file mode 100644 index 5787a52aa5..0000000000 --- a/script/c596051.lua +++ /dev/null @@ -1,34 +0,0 @@ ---毒蛇の牙 -function c596051.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DEFCHANGE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetCondition(c596051.condition) - e1:SetTarget(c596051.target) - e1:SetOperation(c596051.activate) - c:RegisterEffect(e1) -end -function c596051.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end -function c596051.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) -end -function c596051.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_DEFENCE) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - e1:SetValue(-500) - tc:RegisterEffect(e1) - end -end diff --git a/script/c59616123.lua b/script/c59616123.lua deleted file mode 100644 index 1f46693b65..0000000000 --- a/script/c59616123.lua +++ /dev/null @@ -1,44 +0,0 @@ ---トラップ・スタン -function c59616123.initial_effect(c) - --activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetOperation(c59616123.activate) - c:RegisterEffect(e1) -end -function c59616123.activate(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - --disable - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_DISABLE) - e1:SetTargetRange(LOCATION_SZONE,LOCATION_SZONE) - e1:SetTarget(c59616123.distarget) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) - --disable effect - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_CHAIN_SOLVING) - e2:SetOperation(c59616123.disoperation) - e2:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e2,tp) - --disable trap monster - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetCode(EFFECT_DISABLE_TRAPMONSTER) - e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e3:SetTarget(c59616123.distarget) - e3:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e3,tp) -end -function c59616123.distarget(e,c) - return c~=e:GetHandler() and c:IsType(TYPE_TRAP) -end -function c59616123.disoperation(e,tp,eg,ep,ev,re,r,rp) - local tl=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION) - if tl==LOCATION_SZONE and re:IsActiveType(TYPE_TRAP) then - Duel.NegateEffect(ev) - end -end diff --git a/script/c59627393.lua b/script/c59627393.lua deleted file mode 100644 index 915dfbd046..0000000000 --- a/script/c59627393.lua +++ /dev/null @@ -1,65 +0,0 @@ ---No.105 BK 流星のセスタス -function c59627393.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,4,3) - c:EnableReviveLimit() - --attack up - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(59627393,0)) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(TIMING_BATTLE_PHASE) - e1:SetCondition(c59627393.condition) - e1:SetCost(c59627393.cost) - e1:SetTarget(c59627393.target) - e1:SetOperation(c59627393.operation) - c:RegisterEffect(e1) -end -c59627393.xyz_number=105 -function c59627393.condition(e,tp,eg,ep,ev,re,r,rp) - local a=Duel.GetAttacker() - local at=Duel.GetAttackTarget() - return Duel.GetCurrentPhase()==PHASE_BATTLE and at and ((a:IsControler(tp) and a:IsOnField() and a:IsSetCard(0x84)) - or (at:IsControler(tp) and at:IsOnField() and at:IsFaceup() and at:IsSetCard(0x84))) -end -function c59627393.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetFlagEffect(tp,59627393)==0 and e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) - Duel.RegisterFlagEffect(tp,59627393,RESET_PHASE+PHASE_DAMAGE,0,1) -end -function c59627393.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetCard(Duel.GetAttacker()) - Duel.SetTargetCard(Duel.GetAttackTarget()) -end -function c59627393.operation(e,tp,eg,ep,ev,re,r,rp) - local a=Duel.GetAttacker() - local at=Duel.GetAttackTarget() - if at:IsControler(tp) then a,at=at,a end - if a:IsFacedown() or not a:IsRelateToEffect(e) or not at:IsRelateToEffect(e) then return end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e1:SetValue(1) - e1:SetReset(RESET_PHASE+PHASE_DAMAGE) - a:RegisterEffect(e1,true) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_REFLECT_BATTLE_DAMAGE) - e2:SetValue(1) - e2:SetReset(RESET_PHASE+PHASE_DAMAGE) - a:RegisterEffect(e2,true) - if at:IsType(TYPE_EFFECT) then - local e3=Effect.CreateEffect(e:GetHandler()) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_DISABLE) - e3:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - at:RegisterEffect(e3) - local e4=Effect.CreateEffect(e:GetHandler()) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetCode(EFFECT_DISABLE_EFFECT) - e4:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - at:RegisterEffect(e4) - end -end diff --git a/script/c59642500.lua b/script/c59642500.lua deleted file mode 100644 index 89221c99d9..0000000000 --- a/script/c59642500.lua +++ /dev/null @@ -1,60 +0,0 @@ ---M・HERO 闇鬼 -function c59642500.initial_effect(c) - c:EnableReviveLimit() - --spsummon condition - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - c:RegisterEffect(e1) - --direct attack - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DIRECT_ATTACK) - c:RegisterEffect(e2) - --damage reduce - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e3:SetCode(EVENT_PRE_BATTLE_DAMAGE) - e3:SetCondition(c59642500.rdcon) - e3:SetOperation(c59642500.rdop) - c:RegisterEffect(e3) - --search - local e4=Effect.CreateEffect(c) - e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e4:SetCode(EVENT_BATTLE_DESTROYING) - e4:SetCountLimit(1,59642500) - e4:SetCondition(c59642500.thcon) - e4:SetTarget(c59642500.thtg) - e4:SetOperation(c59642500.thop) - c:RegisterEffect(e4) -end -function c59642500.rdcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return ep~=tp and Duel.GetAttackTarget()==nil - and c:GetEffectCount(EFFECT_DIRECT_ATTACK)<2 and Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0 -end -function c59642500.rdop(e,tp,eg,ep,ev,re,r,rp) - Duel.ChangeBattleDamage(ep,ev/2) -end -function c59642500.thcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local bc=c:GetBattleTarget() - return c:IsRelateToBattle() and bc:IsLocation(LOCATION_GRAVE) and bc:IsType(TYPE_MONSTER) -end -function c59642500.filter(c) - return c:IsSetCard(0xa5) and c:IsType(TYPE_QUICKPLAY) and c:IsAbleToHand() -end -function c59642500.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c59642500.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c59642500.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c59642500.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c59644958.lua b/script/c59644958.lua deleted file mode 100644 index 0e04abd3a2..0000000000 --- a/script/c59644958.lua +++ /dev/null @@ -1,30 +0,0 @@ ---オーバーレイ・オウル -function c59644958.initial_effect(c) - --detach - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(59644958,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCost(c59644958.cost) - e1:SetTarget(c59644958.target) - e1:SetOperation(c59644958.operation) - c:RegisterEffect(e1) -end -function c59644958.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,600) end - Duel.PayLPCost(tp,600) -end -function c59644958.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckRemoveOverlayCard(tp,1,1,1,REASON_EFFECT) end -end -function c59644958.operation(e,tp,eg,ep,ev,re,r,rp) - local sg=Duel.GetMatchingGroup(Card.CheckRemoveOverlayCard,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp,1,REASON_EFFECT) - if sg:GetCount()==0 then return end - if sg:GetCount()>1 then - Duel.Hint(HINT_SELECTMSG,tp,532) - sg=sg:Select(tp,1,1,nil) - Duel.HintSelection(sg) - end - sg:GetFirst():RemoveOverlayCard(tp,1,1,REASON_EFFECT) -end diff --git a/script/c59650656.lua b/script/c59650656.lua deleted file mode 100644 index fcefbd86d7..0000000000 --- a/script/c59650656.lua +++ /dev/null @@ -1,88 +0,0 @@ ---時空混沌渦 -function c59650656.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(59650656,0)) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_REMOVE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCondition(c59650656.descon) - e1:SetTarget(c59650656.destg) - e1:SetOperation(c59650656.desop) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(59650656,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_PREDRAW) - e2:SetRange(LOCATION_GRAVE) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCondition(c59650656.spcon) - e2:SetCost(c59650656.spcost) - e2:SetTarget(c59650656.sptg) - e2:SetOperation(c59650656.spop) - c:RegisterEffect(e2) -end -function c59650656.cfilter(c,tp) - return c:IsFaceup() and c:IsSetCard(0x7b) and c:IsType(TYPE_XYZ) - and c:IsReason(REASON_DESTROY) and c:IsPreviousLocation(LOCATION_MZONE) and c:GetPreviousControler()==tp -end -function c59650656.descon(e,tp,eg,ep,ev,re,r,rp) - return rp~=tp and eg:IsExists(c59650656.cfilter,1,nil,tp) -end -function c59650656.filter(c) - return c:IsFaceup() and c:IsDestructable() and c:IsAbleToRemove() -end -function c59650656.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c59650656.filter,tp,0,LOCATION_ONFIELD,1,nil) end - local g=Duel.GetMatchingGroup(c59650656.filter,tp,0,LOCATION_ONFIELD,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,0) -end -function c59650656.desop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c59650656.filter,tp,0,LOCATION_ONFIELD,nil) - if g:GetCount()>0 then - Duel.Destroy(g,REASON_EFFECT,LOCATION_REMOVED) - end -end -function c59650656.spcon(e,tp,eg,ep,ev,re,r,rp) - return tp==Duel.GetTurnPlayer() and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0 - and Duel.GetDrawCount(tp)>0 -end -function c59650656.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) -end -function c59650656.spfilter(c,e,tp) - return c:IsSetCard(0x7b) and c:IsType(TYPE_XYZ) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c59650656.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c59650656.spfilter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c59650656.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - local dt=Duel.GetDrawCount(tp) - if dt~=0 then - _replace_count=0 - _replace_max=dt - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EFFECT_DRAW_COUNT) - e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_DRAW) - e1:SetValue(0) - Duel.RegisterEffect(e1,tp) - end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c59650656.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c59650656.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - _replace_count=_replace_count+1 - if _replace_count<=_replace_max and tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c59695933.lua b/script/c59695933.lua deleted file mode 100644 index 4ee15515cb..0000000000 --- a/script/c59695933.lua +++ /dev/null @@ -1,32 +0,0 @@ ---インターセプト -function c59695933.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_CONTROL) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetCondition(c59695933.condition) - e1:SetTarget(c59695933.target) - e1:SetOperation(c59695933.activate) - c:RegisterEffect(e1) -end -function c59695933.condition(e,tp,eg,ep,ev,re,r,rp) - local tc=eg:GetFirst() - return bit.band(tc:GetSummonType(),SUMMON_TYPE_ADVANCE)==SUMMON_TYPE_ADVANCE - and tc:GetMaterialCount()==1 -end -function c59695933.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - if chk==0 then return eg:GetFirst():IsCanBeEffectTarget(e) and eg:GetFirst():IsControlerCanBeChanged() end - Duel.SetTargetCard(eg) - Duel.SetOperationInfo(0,CATEGORY_CONTROL,eg,1,0,0) -end -function c59695933.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and not Duel.GetControl(tc,tp,0,0) then - if not tc:IsImmuneToEffect(e) and tc:IsAbleToChangeControler() then - Duel.Destroy(tc,REASON_EFFECT) - end - end -end diff --git a/script/c59699355.lua b/script/c59699355.lua deleted file mode 100644 index 48e6398085..0000000000 --- a/script/c59699355.lua +++ /dev/null @@ -1,37 +0,0 @@ ---スクラップ・カウンター -function c59699355.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DEFCHANGE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_PRE_DAMAGE_CALCULATE) - e1:SetCondition(c59699355.condition) - e1:SetOperation(c59699355.activate) - c:RegisterEffect(e1) -end -function c59699355.condition(e,tp,eg,ep,ev,re,r,rp) - local d=Duel.GetAttackTarget() - return d and d:IsDefencePos() and d:IsSetCard(0x24) -end -function c59699355.activate(e,tp,eg,ep,ev,re,r,rp) - local d=Duel.GetAttackTarget() - if d:IsRelateToBattle() then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_DEFENCE) - e1:SetValue(2000) - e1:SetReset(RESET_EVENT+0x1fe0000) - d:RegisterEffect(e1) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EVENT_PHASE+PHASE_BATTLE) - e2:SetCountLimit(1) - e2:SetOperation(c59699355.desop) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_BATTLE) - d:RegisterEffect(e2) - end -end -function c59699355.desop(e,tp,eg,ep,ev,re,r,rp) - Duel.Destroy(e:GetHandler(),REASON_EFFECT) -end diff --git a/script/c59708927.lua b/script/c59708927.lua deleted file mode 100644 index fde2a8ccd1..0000000000 --- a/script/c59708927.lua +++ /dev/null @@ -1,46 +0,0 @@ ---アンブラル・ゴースト -function c59708927.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(59708927,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(1,59708927) - e1:SetCost(c59708927.spcost) - e1:SetTarget(c59708927.sptg) - e1:SetOperation(c59708927.spop) - c:RegisterEffect(e1) -end -function c59708927.filter(c,e,tp) - return c:IsLevelBelow(4) and c:IsRace(RACE_FIEND) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c59708927.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_NORMALSUMMON)==0 end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_SUMMON) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetReset(RESET_PHASE+RESET_END) - e1:SetTargetRange(1,0) - Duel.RegisterEffect(e1,tp) - local e2=e1:Clone() - e2:SetCode(EFFECT_CANNOT_MSET) - Duel.RegisterEffect(e2,tp) -end -function c59708927.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>1 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) - and Duel.IsExistingMatchingCard(c59708927.filter,tp,LOCATION_HAND,0,1,e:GetHandler(),e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_HAND) -end -function c59708927.spop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c59708927.filter,tp,LOCATION_HAND,0,1,1,e:GetHandler(),e,tp) - if g:GetCount()>0 then - g:AddCard(e:GetHandler()) - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c59718521.lua b/script/c59718521.lua deleted file mode 100644 index 811fceac4e..0000000000 --- a/script/c59718521.lua +++ /dev/null @@ -1,62 +0,0 @@ ---ブローニング・パワー -function c59718521.initial_effect(c) - --Activate(summon) - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DISABLE_SUMMON+CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_SUMMON) - e1:SetCondition(c59718521.condition1) - e1:SetCost(c59718521.cost) - e1:SetTarget(c59718521.target1) - e1:SetOperation(c59718521.activate1) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_SPSUMMON) - c:RegisterEffect(e2) - --Activate(effect) - local e3=Effect.CreateEffect(c) - e3:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) - e3:SetType(EFFECT_TYPE_ACTIVATE) - e3:SetCode(EVENT_CHAINING) - e3:SetCondition(c59718521.condition2) - e3:SetCost(c59718521.cost) - e3:SetTarget(c59718521.target2) - e3:SetOperation(c59718521.activate2) - c:RegisterEffect(e3) -end -function c59718521.condition1(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentChain()==0 -end -function c59718521.filter(c) - return c:IsRace(RACE_PSYCHO) and not c:IsStatus(STATUS_BATTLE_DESTROYED) -end -function c59718521.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,c59718521.filter,1,nil) end - local g=Duel.SelectReleaseGroup(tp,c59718521.filter,1,1,nil) - Duel.Release(g,REASON_COST) -end -function c59718521.target1(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DISABLE_SUMMON,eg,eg:GetCount(),0,0) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,eg:GetCount(),0,0) -end -function c59718521.activate1(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateSummon(eg) - Duel.Destroy(eg,REASON_EFFECT) -end -function c59718521.condition2(e,tp,eg,ep,ev,re,r,rp) - return re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev) -end -function c59718521.target2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) - end -end -function c59718521.activate2(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateActivation(ev) - if re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(eg,REASON_EFFECT) - end -end diff --git a/script/c5972394.lua b/script/c5972394.lua deleted file mode 100644 index 1226a7dba9..0000000000 --- a/script/c5972394.lua +++ /dev/null @@ -1,48 +0,0 @@ ---モノマネンド -function c5972394.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCountLimit(1,5972394+EFFECT_COUNT_CODE_OATH) - e1:SetCondition(c5972394.condition) - e1:SetTarget(c5972394.target) - e1:SetOperation(c5972394.activate) - c:RegisterEffect(e1) -end -function c5972394.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0 -end -function c5972394.filter(c,e,tp) - return c:IsLevelBelow(2) and c:IsPosition(POS_FACEUP_DEFENCE) - and Duel.IsExistingMatchingCard(c5972394.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp,c:GetCode()) -end -function c5972394.spfilter(c,e,tp,code) - return c:IsCode(code) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c5972394.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c5972394.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c5972394.filter,tp,LOCATION_MZONE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUPDEFENCE) - Duel.SelectTarget(tp,c5972394.filter,tp,LOCATION_MZONE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c5972394.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local tc=Duel.GetFirstTarget() - if tc:IsFacedown() or not tc:IsRelateToEffect(e) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c5972394.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,tc:GetCode()) - if Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENCE)~=0 then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+0x47e0000) - e1:SetValue(LOCATION_REMOVED) - g:GetFirst():RegisterEffect(e1,true) - end -end diff --git a/script/c5973663.lua b/script/c5973663.lua deleted file mode 100644 index a5dc84c562..0000000000 --- a/script/c5973663.lua +++ /dev/null @@ -1,131 +0,0 @@ ---世界樹 -function c5973663.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --add counter - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetRange(LOCATION_SZONE) - e2:SetCode(EVENT_DESTROYED) - e2:SetCondition(c5973663.ctcon) - e2:SetOperation(c5973663.ctop) - c:RegisterEffect(e2) - --atkup defup - local e3=Effect.CreateEffect(c) - e3:SetCategory(CATEGORY_ATKCHANGE) - e3:SetDescription(aux.Stringid(5973663,0)) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_SZONE) - e3:SetCost(c5973663.cost1) - e3:SetTarget(c5973663.tg1) - e3:SetOperation(c5973663.op1) - c:RegisterEffect(e3) - --destroy - local e4=Effect.CreateEffect(c) - e4:SetCategory(CATEGORY_DESTROY) - e4:SetDescription(aux.Stringid(5973663,1)) - e4:SetProperty(EFFECT_FLAG_CARD_TARGET) - e4:SetType(EFFECT_TYPE_IGNITION) - e4:SetRange(LOCATION_SZONE) - e4:SetCost(c5973663.cost2) - e4:SetTarget(c5973663.tg2) - e4:SetOperation(c5973663.op2) - c:RegisterEffect(e4) - --special summon - local e5=Effect.CreateEffect(c) - e5:SetCategory(CATEGORY_SPECIAL_SUMMON) - e5:SetDescription(aux.Stringid(5973663,2)) - e5:SetProperty(EFFECT_FLAG_CARD_TARGET) - e5:SetType(EFFECT_TYPE_IGNITION) - e5:SetRange(LOCATION_SZONE) - e5:SetCost(c5973663.cost3) - e5:SetTarget(c5973663.tg3) - e5:SetOperation(c5973663.op3) - c:RegisterEffect(e5) -end -function c5973663.ctfilter(c) - return c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP) and bit.band(c:GetPreviousRaceOnField(),RACE_PLANT)~=0 -end -function c5973663.ctcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c5973663.ctfilter,1,nil) -end -function c5973663.ctop(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():AddCounter(0x18,1) -end -function c5973663.cost1(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsCanRemoveCounter(tp,0x18,1,REASON_COST) end - Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) - e:GetHandler():RemoveCounter(tp,0x18,1,REASON_COST) -end -function c5973663.filter1(c) - return c:IsFaceup() and c:IsRace(RACE_PLANT) -end -function c5973663.tg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c5973663.filter1(chkc) end - if chk==0 then return Duel.IsExistingTarget(c5973663.filter1,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - local g=Duel.SelectTarget(tp,c5973663.filter1,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,g,1,0,500) -end -function c5973663.op1(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local tc=Duel.GetFirstTarget() - if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e1:SetValue(400) - tc:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_UPDATE_DEFENCE) - tc:RegisterEffect(e2) - end -end -function c5973663.cost2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsCanRemoveCounter(tp,0x18,2,REASON_COST) end - Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) - e:GetHandler():RemoveCounter(tp,0x18,2,REASON_COST) -end -function c5973663.tg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsDestructable() end - if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c5973663.op2(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end -function c5973663.cost3(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsCanRemoveCounter(tp,0x18,3,REASON_COST) end - Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) - e:GetHandler():RemoveCounter(tp,0x18,3,REASON_COST) -end -function c5973663.filter3(c,e,tp) - return c:IsRace(RACE_PLANT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c5973663.tg3(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c5973663.filter3(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c5973663.filter3,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c5973663.filter3,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c5973663.op3(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c59744639.lua b/script/c59744639.lua deleted file mode 100644 index e84d0e0533..0000000000 --- a/script/c59744639.lua +++ /dev/null @@ -1,21 +0,0 @@ ---イタクァの暴風 -function c59744639.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_POSITION) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,0x1c0+TIMING_MAIN_END) - e1:SetTarget(c59744639.target) - e1:SetOperation(c59744639.operation) - c:RegisterEffect(e1) -end -function c59744639.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end - local sg=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_POSITION,sg,sg:GetCount(),0,0) -end -function c59744639.operation(e,tp,eg,ep,ev,re,r,rp) - local sg=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil) - Duel.ChangePosition(sg,POS_FACEUP_DEFENCE,0,POS_FACEUP_ATTACK,0) -end diff --git a/script/c5975022.lua b/script/c5975022.lua deleted file mode 100644 index 6f30033d50..0000000000 --- a/script/c5975022.lua +++ /dev/null @@ -1,72 +0,0 @@ ---剣闘獣ムルミロ -function c5975022.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(5975022,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(c5975022.descon) - e1:SetTarget(c5975022.destg) - e1:SetOperation(c5975022.desop) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(5975022,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_PHASE+PHASE_BATTLE) - e2:SetRange(LOCATION_MZONE) - e2:SetCondition(c5975022.spcon) - e2:SetCost(c5975022.spcost) - e2:SetTarget(c5975022.sptg) - e2:SetOperation(c5975022.spop) - c:RegisterEffect(e2) -end -function c5975022.descon(e,tp,eg,ep,ev,re,r,rp) - local st=e:GetHandler():GetSummonType() - return st>=(SUMMON_TYPE_SPECIAL+100) and st<(SUMMON_TYPE_SPECIAL+150) -end -function c5975022.desfilter(c) - return c:IsFaceup() and c:IsDestructable() -end -function c5975022.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:GetLocation()==LOCATION_MZONE and c5975022.desfilter(chkc) end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c5975022.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c5975022.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end -function c5975022.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetBattledGroupCount()>0 -end -function c5975022.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToDeckAsCost() end - Duel.SendtoDeck(c,nil,2,REASON_COST) -end -function c5975022.filter(c,e,tp) - return not c:IsCode(5975022) and c:IsSetCard(0x19) and c:IsCanBeSpecialSummoned(e,105,tp,false,false) -end -function c5975022.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsExistingMatchingCard(c5975022.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c5975022.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c5975022.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - local tc=g:GetFirst() - if tc then - Duel.SpecialSummon(tc,105,tp,tp,false,false,POS_FACEUP) - tc:RegisterFlagEffect(tc:GetOriginalCode(),RESET_EVENT+0x1ff0000,0,0) - end -end diff --git a/script/c59755122.lua b/script/c59755122.lua deleted file mode 100644 index b4e5497d66..0000000000 --- a/script/c59755122.lua +++ /dev/null @@ -1,24 +0,0 @@ ---ドラグニティ-ファランクス -function c59755122.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(59755122,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_SZONE) - e1:SetTarget(c59755122.sptg) - e1:SetOperation(c59755122.spop) - c:RegisterEffect(e1) -end -function c59755122.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c59755122.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c59771339.lua b/script/c59771339.lua deleted file mode 100644 index c471279ae1..0000000000 --- a/script/c59771339.lua +++ /dev/null @@ -1,71 +0,0 @@ ---ジャンク・バーサーカー -function c59771339.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,c59771339.tfilter,aux.NonTuner(nil),1) - c:EnableReviveLimit() - --atkdown - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(59771339,0)) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c59771339.cost) - e1:SetTarget(c59771339.target) - e1:SetOperation(c59771339.operation) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(59771339,1)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_BATTLE_START) - e2:SetCondition(c59771339.descon) - e2:SetTarget(c59771339.destg) - e2:SetOperation(c59771339.desop) - c:RegisterEffect(e2) -end -function c59771339.tfilter(c) - return c:IsCode(63977008) or c:IsHasEffect(20932152) -end -function c59771339.cfilter(c) - return c:IsSetCard(0x43) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost() -end -function c59771339.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c59771339.cfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c59771339.cfilter,tp,LOCATION_GRAVE,0,1,1,nil) - e:SetLabel(g:GetFirst():GetAttack()) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c59771339.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil) -end -function c59771339.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(-e:GetLabel()) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - end -end -function c59771339.descon(e,tp,eg,ep,ev,re,r,rp) - local d=Duel.GetAttackTarget() - return e:GetHandler()==Duel.GetAttacker() and d and d:IsDefencePos() -end -function c59771339.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,Duel.GetAttackTarget(),1,0,0) -end -function c59771339.desop(e,tp,eg,ep,ev,re,r,rp) - local d=Duel.GetAttackTarget() - if d:IsRelateToBattle() then - Duel.Destroy(d,REASON_EFFECT) - end -end diff --git a/script/c59784896.lua b/script/c59784896.lua deleted file mode 100644 index a702d464be..0000000000 --- a/script/c59784896.lua +++ /dev/null @@ -1,35 +0,0 @@ ---ダークゼブラ -function c59784896.initial_effect(c) - --to defence - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(59784896,0)) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetCategory(CATEGORY_POSITION) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCondition(c59784896.condition) - e1:SetTarget(c59784896.target) - e1:SetOperation(c59784896.operation) - c:RegisterEffect(e1) -end -function c59784896.condition(e,tp,eg,ep,ev,re,r,rp) - return tp==Duel.GetTurnPlayer() and Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==1 - and e:GetHandler():IsAttackPos() -end -function c59784896.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_POSITION,e:GetHandler(),1,0,0) -end -function c59784896.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsPosition(POS_FACEUP_ATTACK) then - Duel.ChangePosition(c,POS_FACEUP_DEFENCE) - end - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_CHANGE_POSITION) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_COPY_INHERIT) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - c:RegisterEffect(e1) -end diff --git a/script/c59785059.lua b/script/c59785059.lua deleted file mode 100644 index eadf788f68..0000000000 --- a/script/c59785059.lua +++ /dev/null @@ -1,80 +0,0 @@ ---イグナイト・スティンガー -function c59785059.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c59785059.sptg) - e1:SetOperation(c59785059.spop) - c:RegisterEffect(e1) - --todeck - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_TOHAND+CATEGORY_TODECK) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCountLimit(1) - e2:SetTarget(c59785059.tdtg) - e2:SetOperation(c59785059.tdop) - c:RegisterEffect(e2) -end -function c59785059.desfilter(c) - return c:IsFaceup() and c:IsSetCard(0xc8) and c:IsDestructable() -end -function c59785059.desfilter2(c,e) - return c59785059.desfilter(c) and c:IsCanBeEffectTarget(e) -end -function c59785059.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsControler(tp) and c59785059.desfilter(chkc) end - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - local ct=-ft+1 - if chk==0 then return ct<=3 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) - and Duel.IsExistingTarget(c59785059.desfilter,tp,LOCATION_ONFIELD,0,3,nil) - and (ct<=0 or Duel.IsExistingTarget(c59785059.desfilter,tp,LOCATION_MZONE,0,ct,nil)) end - local g=nil - if ct>0 then - local tg=Duel.GetMatchingGroup(c59785059.desfilter2,tp,LOCATION_ONFIELD,0,nil,e) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - g=tg:FilterSelect(tp,Card.IsLocation,ct,ct,nil,LOCATION_MZONE) - if ct<3 then - tg:Sub(g) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g2=tg:Select(tp,3-ct,3-ct,nil) - g:Merge(g2) - end - Duel.SetTargetCard(g) - else - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - g=Duel.SelectTarget(tp,c59785059.desfilter,tp,LOCATION_ONFIELD,0,3,3,nil) - end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,3,0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c59785059.spop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) - if Duel.Destroy(g,REASON_EFFECT)~=0 then - Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP) - end -end -function c59785059.thfilter(c) - return c:IsFaceup() and c:IsSetCard(0xc8) and c:IsAbleToHand() -end -function c59785059.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c59785059.thfilter(chkc) and chkc~=e:GetHandler() end - if chk==0 then return Duel.IsExistingTarget(c59785059.thfilter,tp,LOCATION_MZONE,0,1,e:GetHandler()) - and Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c59785059.thfilter,tp,LOCATION_MZONE,0,1,1,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,1-tp,LOCATION_MZONE) -end -function c59785059.tdop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.SendtoHand(tc,nil,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_HAND) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SendtoDeck(g,nil,1,REASON_EFFECT) - end -end diff --git a/script/c59793705.lua b/script/c59793705.lua deleted file mode 100644 index 93b49a0ac7..0000000000 --- a/script/c59793705.lua +++ /dev/null @@ -1,7 +0,0 @@ ---E・HERO エッジマン -function c59793705.initial_effect(c) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_PIERCE) - c:RegisterEffect(e1) -end diff --git a/script/c59797187.lua b/script/c59797187.lua deleted file mode 100644 index ec0b45d524..0000000000 --- a/script/c59797187.lua +++ /dev/null @@ -1,23 +0,0 @@ ---ゴロゴル -function c59797187.initial_effect(c) - --pos - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(59797187,0)) - e1:SetCategory(CATEGORY_POSITION) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_DAMAGE_STEP_END) - e1:SetTarget(c59797187.target) - e1:SetOperation(c59797187.operation) - c:RegisterEffect(e1) -end -function c59797187.target(e,tp,eg,ep,ev,re,r,rp,chk) - local tg=e:GetHandler():GetBattleTarget() - if chk==0 then return tg and tg:IsRelateToBattle() end - Duel.SetOperationInfo(0,CATEGORY_POSITION,tg,1,0,0) -end -function c59797187.operation(e,tp,eg,ep,ev,re,r,rp) - local bc=e:GetHandler():GetBattleTarget() - if bc:IsRelateToBattle() and bc:IsFaceup() then - Duel.ChangePosition(bc,POS_FACEDOWN_DEFENCE) - end -end diff --git a/script/c59808784.lua b/script/c59808784.lua deleted file mode 100644 index b53044548d..0000000000 --- a/script/c59808784.lua +++ /dev/null @@ -1,93 +0,0 @@ ---炎帝家臣ベルリネス -function c59808784.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(1,59808784) - e1:SetCost(c59808784.spcost) - e1:SetTarget(c59808784.sptg) - e1:SetOperation(c59808784.spop) - c:RegisterEffect(e1) - --remove - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_REMOVE) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_RELEASE) - e2:SetCountLimit(1,59808785) - e2:SetCondition(c59808784.rmcon) - e2:SetTarget(c59808784.rmtg) - e2:SetOperation(c59808784.rmop) - c:RegisterEffect(e2) -end -function c59808784.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD,e:GetHandler()) -end -function c59808784.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c59808784.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) - end - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) - e1:SetTargetRange(1,0) - e1:SetTarget(c59808784.splimit) - Duel.RegisterEffect(e1,tp) -end -function c59808784.splimit(e,c,sump,sumtype,sumpos,targetp,se) - return c:IsLocation(LOCATION_EXTRA) -end -function c59808784.rmcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsReason(REASON_SUMMON) -end -function c59808784.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0 end - Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,1-tp,LOCATION_HAND) -end -function c59808784.rmop(e,tp,eg,ep,ev,re,r,rp) - local hg=Duel.GetFieldGroup(tp,0,LOCATION_HAND) - if hg:GetCount()==0 then return end - Duel.ConfirmCards(tp,hg) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=hg:Select(tp,1,1,nil) - local tc=g:GetFirst() - Duel.Remove(g,POS_FACEUP,REASON_EFFECT) - Duel.ShuffleHand(1-tp) - local c=e:GetHandler() - local fid=c:GetFieldID() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetCountLimit(1) - e1:SetLabel(fid) - e1:SetLabelObject(tc) - e1:SetCondition(c59808784.retcon) - e1:SetOperation(c59808784.retop) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) - tc:RegisterFlagEffect(59808784,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1,fid) -end -function c59808784.retcon(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetLabelObject() - if tc:GetFlagEffectLabel(59808784)==e:GetLabel() then - return true - else - e:Reset() - return false - end -end -function c59808784.retop(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetLabelObject() - Duel.SendtoHand(tc,nil,REASON_EFFECT) -end diff --git a/script/c59811955.lua b/script/c59811955.lua deleted file mode 100644 index 9d03877dcd..0000000000 --- a/script/c59811955.lua +++ /dev/null @@ -1,29 +0,0 @@ ---古代の整備場 -function c59811955.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c59811955.target) - e1:SetOperation(c59811955.activate) - c:RegisterEffect(e1) -end -function c59811955.filter(c) - return c:IsSetCard(0x7) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() -end -function c59811955.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c59811955.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c59811955.filter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c59811955.filter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c59811955.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end diff --git a/script/c59820352.lua b/script/c59820352.lua deleted file mode 100644 index 08ec29f230..0000000000 --- a/script/c59820352.lua +++ /dev/null @@ -1,7 +0,0 @@ ---大地讃頌 -function c59820352.initial_effect(c) - aux.AddRitualProcEqual2(c,c59820352.ritual_filter) -end -function c59820352.ritual_filter(c) - return c:IsType(TYPE_RITUAL) and c:IsAttribute(ATTRIBUTE_EARTH) -end diff --git a/script/c59834564.lua b/script/c59834564.lua deleted file mode 100644 index d2289da2e9..0000000000 --- a/script/c59834564.lua +++ /dev/null @@ -1,44 +0,0 @@ ---嚇灼の魔神 -function c59834564.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c59834564.spcon) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(59834564,0)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetTarget(c59834564.destg) - e2:SetOperation(c59834564.desop) - c:RegisterEffect(e2) -end -function c59834564.filter(c) - return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_FIRE) -end -function c59834564.spcon(e,c) - if c==nil then return true end - return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c59834564.filter,c:GetControler(),LOCATION_MZONE,0,1,nil) -end -function c59834564.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c59834564.filter(chkc) end - if chk==0 then return true end - if Duel.IsExistingTarget(c59834564.filter,tp,LOCATION_MZONE,0,2,nil) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c59834564.filter,tp,LOCATION_MZONE,0,2,2,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,2,0,0) - end -end -function c59834564.desop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - if not g then return end - local dg=g:Filter(Card.IsRelateToEffect,nil,e) - Duel.Destroy(dg,REASON_EFFECT) -end diff --git a/script/c59839761.lua b/script/c59839761.lua deleted file mode 100644 index 143cede99f..0000000000 --- a/script/c59839761.lua +++ /dev/null @@ -1,40 +0,0 @@ ---デルタ・クロウ-アンチ・リバース -function c59839761.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_END_PHASE) - e1:SetCondition(c59839761.condition) - e1:SetTarget(c59839761.target) - e1:SetOperation(c59839761.activate) - c:RegisterEffect(e1) - --act in hand - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_TRAP_ACT_IN_HAND) - e2:SetCondition(c59839761.handcon) - c:RegisterEffect(e2) -end -function c59839761.handcon(e) - return Duel.GetMatchingGroupCount(c59839761.cfilter,e:GetHandler():GetControler(),LOCATION_MZONE,0,nil)==3 -end -function c59839761.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x33) -end -function c59839761.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c59839761.cfilter,tp,LOCATION_MZONE,0,1,nil) -end -function c59839761.filter(c) - return c:IsFacedown() and c:IsDestructable() -end -function c59839761.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c59839761.filter,tp,0,LOCATION_SZONE,1,nil) end - local g=Duel.GetMatchingGroup(c59839761.filter,tp,0,LOCATION_SZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c59839761.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c59839761.filter,tp,0,LOCATION_SZONE,nil) - Duel.Destroy(g,REASON_EFFECT) -end diff --git a/script/c598988.lua b/script/c598988.lua deleted file mode 100644 index 805f44d373..0000000000 --- a/script/c598988.lua +++ /dev/null @@ -1,100 +0,0 @@ ---Sin レインボー・ドラゴン -function c598988.initial_effect(c) - c:EnableReviveLimit() - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c598988.spcon) - e1:SetOperation(c598988.spop) - c:RegisterEffect(e1) - --only 1 can exists - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_CANNOT_FLIP_SUMMON) - e2:SetCondition(c598988.excon) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - c:RegisterEffect(e3) - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_FIELD) - e4:SetRange(LOCATION_MZONE) - e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e4:SetTargetRange(1,1) - e4:SetCode(EFFECT_CANNOT_SUMMON) - e4:SetTarget(c598988.sumlimit) - c:RegisterEffect(e4) - local e5=e4:Clone() - e5:SetCode(EFFECT_CANNOT_FLIP_SUMMON) - c:RegisterEffect(e5) - local e6=e4:Clone() - e6:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - c:RegisterEffect(e6) - --selfdes - local e7=Effect.CreateEffect(c) - e7:SetType(EFFECT_TYPE_SINGLE) - e7:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e7:SetRange(LOCATION_MZONE) - e7:SetCode(EFFECT_SELF_DESTROY) - e7:SetCondition(c598988.descon) - c:RegisterEffect(e7) - local e8=Effect.CreateEffect(c) - e8:SetType(EFFECT_TYPE_FIELD) - e8:SetCode(EFFECT_SELF_DESTROY) - e8:SetRange(LOCATION_MZONE) - e8:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e8:SetTarget(c598988.destarget) - c:RegisterEffect(e8) - --cannot announce - local e8=Effect.CreateEffect(c) - e8:SetType(EFFECT_TYPE_FIELD) - e8:SetRange(LOCATION_MZONE) - e8:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE) - e8:SetTargetRange(LOCATION_MZONE,0) - e8:SetTarget(c598988.antarget) - c:RegisterEffect(e8) - --spson - local e9=Effect.CreateEffect(c) - e9:SetType(EFFECT_TYPE_SINGLE) - e9:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e9:SetCode(EFFECT_SPSUMMON_CONDITION) - e9:SetValue(aux.FALSE) - c:RegisterEffect(e9) -end -function c598988.sumlimit(e,c) - return c:IsSetCard(0x23) -end -function c598988.exfilter(c) - return c:IsFaceup() and c:IsSetCard(0x23) -end -function c598988.excon(e) - return Duel.IsExistingMatchingCard(c598988.exfilter,0,LOCATION_MZONE,LOCATION_MZONE,1,nil) -end -function c598988.spfilter(c) - return c:IsCode(79856792) and c:IsAbleToRemoveAsCost() -end -function c598988.spcon(e,c) - if c==nil then return true end - return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c598988.spfilter,c:GetControler(),LOCATION_HAND+LOCATION_DECK,0,1,nil) - and not Duel.IsExistingMatchingCard(c598988.exfilter,0,LOCATION_MZONE,LOCATION_MZONE,1,nil) -end -function c598988.spop(e,tp,eg,ep,ev,re,r,rp,c) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local tg=Duel.SelectMatchingCard(tp,c598988.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil) - Duel.Remove(tg,POS_FACEUP,REASON_COST) -end -function c598988.descon(e) - local f1=Duel.GetFieldCard(0,LOCATION_SZONE,5) - local f2=Duel.GetFieldCard(1,LOCATION_SZONE,5) - return (f1==nil or f1:IsFacedown()) and (f2==nil or f2:IsFacedown()) -end -function c598988.destarget(e,c) - return c:IsSetCard(0x23) and c:GetFieldID()>e:GetHandler():GetFieldID() -end -function c598988.antarget(e,c) - return c~=e:GetHandler() -end diff --git a/script/c5990062.lua b/script/c5990062.lua deleted file mode 100644 index 48eafa7198..0000000000 --- a/script/c5990062.lua +++ /dev/null @@ -1,40 +0,0 @@ ---大逆転クイズ -function c5990062.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c5990062.cost) - e1:SetOperation(c5990062.activate) - c:RegisterEffect(e1) -end -function c5990062.cfilter(c) - return not c:IsAbleToGraveAsCost() -end -function c5990062.cost(e,tp,eg,ep,ev,re,r,rp,chk) - local g1=Duel.GetFieldGroup(tp,LOCATION_ONFIELD,0) - local g2=Duel.GetFieldGroup(tp,LOCATION_HAND,0) - g1:RemoveCard(e:GetHandler()) - g2:RemoveCard(e:GetHandler()) - if chk==0 then return g1:GetCount()>0 and not g1:IsExists(c5990062.cfilter,1,nil) - and g2:GetCount()>0 and not g2:IsExists(c5990062.cfilter,1,nil) end - g1:Merge(g2) - Duel.SendtoGrave(g1,REASON_COST) -end -function c5990062.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetDecktopGroup(tp,1) - local tc=g:GetFirst() - if not tc then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CARDTYPE) - local res=Duel.SelectOption(tp,70,71,72) - Duel.ConfirmDecktop(tp,1) - if (res==0 and tc:IsType(TYPE_MONSTER)) - or (res==1 and tc:IsType(TYPE_SPELL)) - or (res==2 and tc:IsType(TYPE_TRAP)) then - local lp1=Duel.GetLP(tp) - local lp2=Duel.GetLP(1-tp) - Duel.SetLP(tp,lp2) - Duel.SetLP(1-tp,lp1) - end - Duel.ShuffleDeck(tp) -end diff --git a/script/c59905358.lua b/script/c59905358.lua deleted file mode 100644 index 6c8f4fd2c3..0000000000 --- a/script/c59905358.lua +++ /dev/null @@ -1,31 +0,0 @@ ---ダイスインパクト -function c59905358.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_CHAINING) - e1:SetCondition(c59905358.condition) - e1:SetTarget(c59905358.target) - e1:SetOperation(c59905358.activate) - c:RegisterEffect(e1) -end -function c59905358.condition(e,tp,eg,ep,ev,re,r,rp) - if not Duel.IsChainNegatable(ev) then return false end - if not re:IsActiveType(TYPE_MONSTER) and not re:IsHasType(EFFECT_TYPE_ACTIVATE) then return false end - local ex=Duel.GetOperationInfo(ev,CATEGORY_DICE) - return ex -end -function c59905358.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) - end -end -function c59905358.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateActivation(ev) - if re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(eg,REASON_EFFECT) - end -end diff --git a/script/c59907935.lua b/script/c59907935.lua deleted file mode 100644 index 016bb3747b..0000000000 --- a/script/c59907935.lua +++ /dev/null @@ -1,52 +0,0 @@ ---サイバーデーモン -function c59907935.initial_effect(c) - --draw - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(59907935,0)) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EVENT_PREDRAW) - e1:SetCondition(c59907935.drcon) - e1:SetTarget(c59907935.drtg) - e1:SetOperation(c59907935.drop) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(59907935,1)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCode(EVENT_PHASE+PHASE_END) - e2:SetCondition(c59907935.descon) - e2:SetTarget(c59907935.destg) - e2:SetOperation(c59907935.desop) - c:RegisterEffect(e2) -end -function c59907935.drcon(e,tp,eg,ep,ev,re,r,rp) - return ep==tp and Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)==0 -end -function c59907935.drtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(1) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c59907935.drop(e,tp,eg,ep,ev,re,r,rp,c) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end -function c59907935.descon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp and Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)>0 -end -function c59907935.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0) -end -function c59907935.desop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - Duel.Destroy(c,REASON_EFFECT) - end -end diff --git a/script/c59911557.lua b/script/c59911557.lua deleted file mode 100644 index 18586f3ca4..0000000000 --- a/script/c59911557.lua +++ /dev/null @@ -1,51 +0,0 @@ ---ゴゴゴゴラム -function c59911557.initial_effect(c) - --pos change - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(59911557,0)) - e1:SetCategory(CATEGORY_POSITION) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetOperation(c59911557.operation) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e2) - local e3=e1:Clone() - e3:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - c:RegisterEffect(e3) - --to grave - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(59911557,1)) - e4:SetCategory(CATEGORY_TOGRAVE) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e4:SetCode(EVENT_TO_GRAVE) - e4:SetCondition(c59911557.tgcon) - e4:SetTarget(c59911557.tgtg) - e4:SetOperation(c59911557.tgop) - c:RegisterEffect(e4) -end -function c59911557.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFaceup() and c:IsRelateToEffect(e) then - Duel.ChangePosition(c,POS_FACEUP_DEFENCE,0,POS_FACEUP_ATTACK,0) - end -end -function c59911557.tgcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsReason(REASON_DESTROY) and c:IsPreviousLocation(LOCATION_ONFIELD) -end -function c59911557.tgfilter(c) - return c:IsSetCard(0x59) and c:IsType(TYPE_MONSTER) and c:IsAbleToGrave() -end -function c59911557.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) -end -function c59911557.tgop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c59911557.tgfilter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoGrave(g,REASON_EFFECT) - end -end diff --git a/script/c59951714.lua b/script/c59951714.lua deleted file mode 100644 index a625653b6c..0000000000 --- a/script/c59951714.lua +++ /dev/null @@ -1,66 +0,0 @@ ---アドバンス・ディボーター -function c59951714.initial_effect(c) - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_BE_MATERIAL) - e2:SetOperation(c59951714.spr) - c:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(59951714,0)) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetRange(LOCATION_GRAVE) - e3:SetCode(EVENT_PHASE+PHASE_STANDBY) - e3:SetCondition(c59951714.spcon) - e3:SetCost(c59951714.spcost) - e3:SetTarget(c59951714.sptg) - e3:SetOperation(c59951714.spop) - c:RegisterEffect(e3) - Duel.AddCustomActivityCounter(59951714,ACTIVITY_SPSUMMON,c59951714.counterfilter) -end -function c59951714.counterfilter(c) - return c:GetSummonLocation()~=LOCATION_EXTRA -end -function c59951714.spr(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if r==REASON_SUMMON then - c:RegisterFlagEffect(59951714,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,0,1) - end -end -function c59951714.spcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:GetTurnID()~=Duel.GetTurnCount() and tp==Duel.GetTurnPlayer() and c:GetFlagEffect(59951714)>0 -end -function c59951714.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetCustomActivityCount(59951714,tp,ACTIVITY_SPSUMMON)==0 end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) - e1:SetTargetRange(1,0) - e1:SetTarget(c59951714.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function c59951714.splimit(e,c,sump,sumtype,sumpos,targetp) - return c:IsLocation(LOCATION_EXTRA) -end -function c59951714.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) - e:GetHandler():ResetFlagEffect(59951714) -end -function c59951714.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP) - end -end diff --git a/script/c59957503.lua b/script/c59957503.lua deleted file mode 100644 index 54380ae117..0000000000 --- a/script/c59957503.lua +++ /dev/null @@ -1,46 +0,0 @@ ---キャッシュバック -function c59957503.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_NEGATE+CATEGORY_TODECK) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_CHAINING) - e1:SetCondition(c59957503.condition) - e1:SetTarget(c59957503.target) - e1:SetOperation(c59957503.activate) - c:RegisterEffect(e1) - if not c59957503.global_check then - c59957503.global_check=true - c59957503[0]=nil - local ge1=Effect.CreateEffect(c) - ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - ge1:SetCode(EVENT_PAY_LPCOST) - ge1:SetOperation(c59957503.checkop) - Duel.RegisterEffect(ge1,0) - end -end -function c59957503.checkop(e,tp,eg,ep,ev,re,r,rp) - local cid=Duel.GetCurrentChain() - if cid>0 then - c59957503[0]=Duel.GetChainInfo(cid,CHAININFO_CHAIN_ID) - end -end -function c59957503.condition(e,tp,eg,ep,ev,re,r,rp) - return rp~=tp and Duel.GetChainInfo(0,CHAININFO_CHAIN_ID)==c59957503[0] - and (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE)) and Duel.IsChainNegatable(ev) -end -function c59957503.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - if re:GetHandler():IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_TODECK,eg,1,0,0) - end -end -function c59957503.activate(e,tp,eg,ep,ev,re,r,rp) - local ec=re:GetHandler() - Duel.NegateActivation(ev) - if re:GetHandler():IsRelateToEffect(re) then - ec:CancelToGrave() - Duel.SendtoDeck(ec,nil,2,REASON_EFFECT) - end -end diff --git a/script/c59965151.lua b/script/c59965151.lua deleted file mode 100644 index 502f18c43f..0000000000 --- a/script/c59965151.lua +++ /dev/null @@ -1,50 +0,0 @@ ---デッド・ガードナー -function c59965151.initial_effect(c) - --change battle target - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(59965151,0)) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_BE_BATTLE_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c59965151.cbcon) - e1:SetOperation(c59965151.cbop) - c:RegisterEffect(e1) - --atkdown - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(59965151,1)) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCondition(c59965151.atkcon) - e2:SetTarget(c59965151.atktg) - e2:SetOperation(c59965151.atkop) - c:RegisterEffect(e2) -end -function c59965151.cbcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local bt=eg:GetFirst() - return c~=bt and bt:IsFaceup() and bt:GetControler()==c:GetControler() -end -function c59965151.cbop(e,tp,eg,ep,ev,re,r,rp) - Duel.ChangeAttackTarget(e:GetHandler()) -end -function c59965151.atkcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsReason(REASON_DESTROY) -end -function c59965151.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil) -end -function c59965151.atkop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(-1000) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - end -end diff --git a/script/c59969392.lua b/script/c59969392.lua deleted file mode 100644 index 1b33aef2d4..0000000000 --- a/script/c59969392.lua +++ /dev/null @@ -1,15 +0,0 @@ ---アンデット・スカル・デーモン -function c59969392.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsCode,33420078),aux.NonTuner(Card.IsRace,RACE_ZOMBIE),2) - c:EnableReviveLimit() - --indes - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetTarget(aux.TargetBoolFunction(Card.IsRace,RACE_ZOMBIE)) - e1:SetValue(1) - c:RegisterEffect(e1) -end diff --git a/script/c5998840.lua b/script/c5998840.lua deleted file mode 100644 index 5b0346dd9c..0000000000 --- a/script/c5998840.lua +++ /dev/null @@ -1,39 +0,0 @@ ---XX-セイバー ボガーナイト -function c5998840.initial_effect(c) - --summon success - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(5998840,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c5998840.sumtg) - e1:SetOperation(c5998840.sumop) - c:RegisterEffect(e1) - --synchro limit - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e2:SetValue(c5998840.synlimit) - c:RegisterEffect(e2) -end -function c5998840.synlimit(e,c) - if not c then return false end - return not c:IsSetCard(0x100d) -end -function c5998840.filter(c,e,tp) - return c:GetLevel()<=4 and c:IsSetCard(0x100d) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c5998840.sumtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c5998840.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c5998840.sumop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c5998840.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c60004971.lua b/script/c60004971.lua deleted file mode 100644 index 180c346ab2..0000000000 --- a/script/c60004971.lua +++ /dev/null @@ -1,95 +0,0 @@ ---ドラグニティの神槍 -function c60004971.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c60004971.target) - e1:SetOperation(c60004971.operation) - c:RegisterEffect(e1) - --Equip limit - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_EQUIP_LIMIT) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetValue(c60004971.eqlimit) - c:RegisterEffect(e2) - --atk - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_EQUIP) - e3:SetCode(EFFECT_UPDATE_ATTACK) - e3:SetValue(c60004971.atkval) - c:RegisterEffect(e3) - --immune - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_EQUIP) - e4:SetCode(EFFECT_IMMUNE_EFFECT) - e4:SetValue(c60004971.efilter) - c:RegisterEffect(e4) - --equip - local e5=Effect.CreateEffect(c) - e5:SetCategory(CATEGORY_EQUIP) - e5:SetType(EFFECT_TYPE_IGNITION) - e5:SetRange(LOCATION_SZONE) - e5:SetCountLimit(1,60004971) - e5:SetTarget(c60004971.eqtg) - e5:SetOperation(c60004971.eqop) - c:RegisterEffect(e5) -end -function c60004971.eqlimit(e,c) - return c:IsSetCard(0x29) -end -function c60004971.filter(c) - return c:IsFaceup() and c:IsSetCard(0x29) -end -function c60004971.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c60004971.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c60004971.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c60004971.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c60004971.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,c,tc) - end -end -function c60004971.atkval(e,c) - return c:GetLevel()*100 -end -function c60004971.efilter(e,re) - return re:IsActiveType(TYPE_TRAP) -end -function c60004971.eqfilter(c) - return c:IsSetCard(0x29) and c:IsRace(RACE_DRAGON) and c:IsType(TYPE_TUNER) -end -function c60004971.eqtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingMatchingCard(c60004971.eqfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_DECK) -end -function c60004971.eqop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end - local c=e:GetHandler() - local ec=c:GetEquipTarget() - if c:IsRelateToEffect(e) and ec:IsFaceup() then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local g=Duel.SelectMatchingCard(tp,c60004971.eqfilter,tp,LOCATION_DECK,0,1,1,nil) - local tc=g:GetFirst() - if not tc or not Duel.Equip(tp,tc,ec,true) then return end - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(c60004971.eqlimit2) - e1:SetLabelObject(ec) - tc:RegisterEffect(e1) - end -end -function c60004971.eqlimit2(e,c) - return c==e:GetLabelObject() -end diff --git a/script/c6007213.lua b/script/c6007213.lua deleted file mode 100644 index 3cf88e2616..0000000000 --- a/script/c6007213.lua +++ /dev/null @@ -1,91 +0,0 @@ ---神炎皇ウリア -function c6007213.initial_effect(c) - c:EnableReviveLimit() - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(aux.FALSE) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_SPSUMMON_PROC) - e2:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e2:SetRange(LOCATION_HAND) - e2:SetCondition(c6007213.spcon) - e2:SetOperation(c6007213.spop) - c:RegisterEffect(e2) - --atkup - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_UPDATE_ATTACK) - e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e3:SetRange(LOCATION_MZONE) - e3:SetValue(c6007213.atkval) - c:RegisterEffect(e3) - --destroy - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(6007213,0)) - e4:SetCategory(CATEGORY_DESTROY) - e4:SetType(EFFECT_TYPE_IGNITION) - e4:SetRange(LOCATION_MZONE) - e4:SetCountLimit(1) - e4:SetProperty(EFFECT_FLAG_CARD_TARGET) - e4:SetTarget(c6007213.destg) - e4:SetOperation(c6007213.desop) - c:RegisterEffect(e4) -end -function c6007213.spfilter(c) - return c:IsFaceup() and c:IsType(TYPE_TRAP) and c:IsAbleToGraveAsCost() -end -function c6007213.spcon(e,c) - if c==nil then return true end - if Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)==0 then - return Duel.IsExistingMatchingCard(c6007213.spfilter,c:GetControler(),LOCATION_MZONE,0,1,nil) - and Duel.IsExistingMatchingCard(c6007213.spfilter,c:GetControler(),LOCATION_ONFIELD,0,3,nil) - else - return Duel.IsExistingMatchingCard(c6007213.spfilter,c:GetControler(),LOCATION_ONFIELD,0,3,nil) - end -end -function c6007213.spop(e,tp,eg,ep,ev,re,r,rp,c) - if Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)==0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g1=Duel.SelectMatchingCard(tp,c6007213.spfilter,tp,LOCATION_MZONE,0,1,1,nil) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g2=Duel.SelectMatchingCard(tp,c6007213.spfilter,tp,LOCATION_ONFIELD,0,2,2,g1:GetFirst()) - g2:AddCard(g1:GetFirst()) - Duel.SendtoGrave(g2,REASON_COST) - else - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c6007213.spfilter,tp,LOCATION_ONFIELD,0,3,3,nil) - Duel.SendtoGrave(g,REASON_COST) - end -end -function c6007213.atkfilter(c) - return c:GetType()==TYPE_TRAP+TYPE_CONTINUOUS -end -function c6007213.atkval(e,c) - return Duel.GetMatchingGroupCount(c6007213.atkfilter,c:GetControler(),LOCATION_GRAVE,0,nil)*1000 -end -function c6007213.desfilter(c) - return c:IsFacedown() and c:IsDestructable() -end -function c6007213.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_SZONE) and chkc:IsControler(1-tp) and c6007213.desfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c6007213.desfilter,tp,0,LOCATION_SZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c6007213.desfilter,tp,0,LOCATION_SZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) - Duel.SetChainLimit(c6007213.chainlimit) -end -function c6007213.chainlimit(e,rp,tp) - return not e:IsHasType(EFFECT_TYPE_ACTIVATE) -end -function c6007213.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsFacedown() and tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c60080151.lua b/script/c60080151.lua deleted file mode 100644 index d26f9380c3..0000000000 --- a/script/c60080151.lua +++ /dev/null @@ -1,49 +0,0 @@ ---好敵手の記憶 -function c60080151.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DAMAGE+CATEGORY_REMOVE+CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetCondition(c60080151.condition) - e1:SetTarget(c60080151.target) - e1:SetOperation(c60080151.activate) - c:RegisterEffect(e1) -end -function c60080151.condition(e,tp,eg,ep,ev,re,r,rp) - return tp~=Duel.GetTurnPlayer() -end -function c60080151.target(e,tp,eg,ep,ev,re,r,rp,chk) - local tg=Duel.GetAttacker() - if chk==0 then return tg:IsOnField() and tg:IsAbleToRemove() end - local dam=tg:GetAttack() - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,tp,dam) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,tg,1,0,0) -end -function c60080151.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetAttacker() - if tc and tc:IsAttackable() and not tc:IsStatus(STATUS_ATTACK_CANCELED) then - local dam=tc:GetAttack() - if Duel.Damage(tp,dam,REASON_EFFECT)>0 and Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)>0 then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCountLimit(1) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetCondition(c60080151.spcon) - e1:SetOperation(c60080151.spop) - e1:SetLabelObject(tc) - e1:SetLabel(Duel.GetTurnCount()) - e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN,2) - Duel.RegisterEffect(e1,tp) - tc:RegisterFlagEffect(60080151,RESET_EVENT+0x1fe0000,0,0) - end - end -end -function c60080151.spcon(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetLabelObject() - return Duel.GetTurnCount()~=e:GetLabel() and Duel.GetTurnPlayer()~=tp - and tc:GetFlagEffect(60080151)~=0 and tc:GetReasonEffect():GetHandler()==e:GetHandler() -end -function c60080151.spop(e,tp,eg,ep,ev,re,r,rp) - Duel.SpecialSummon(e:GetLabelObject(),0,tp,tp,false,false,POS_FACEUP) -end diff --git a/script/c60082869.lua b/script/c60082869.lua deleted file mode 100644 index b49c4f8eb3..0000000000 --- a/script/c60082869.lua +++ /dev/null @@ -1,35 +0,0 @@ ---砂塵の大竜巻 -function c60082869.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_END_PHASE) - e1:SetTarget(c60082869.target) - e1:SetOperation(c60082869.activate) - c:RegisterEffect(e1) -end -function c60082869.filter(c) - return c:IsDestructable() and c:IsType(TYPE_SPELL+TYPE_TRAP) -end -function c60082869.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and c60082869.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c60082869.filter,tp,0,LOCATION_ONFIELD,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c60082869.filter,tp,0,LOCATION_ONFIELD,1,1,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c60082869.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)~=0 then - local g=Duel.GetMatchingGroup(Card.IsSSetable,tp,LOCATION_HAND,0,nil) - if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(60082869,0)) then - Duel.BreakEffect() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) - local sg=g:Select(tp,1,1,nil) - Duel.SSet(tp,sg:GetFirst()) - end - end -end diff --git a/script/c60102563.lua b/script/c60102563.lua deleted file mode 100644 index 011478ee9f..0000000000 --- a/script/c60102563.lua +++ /dev/null @@ -1,35 +0,0 @@ ---本気ギレパンダ -function c60102563.initial_effect(c) - --atkup - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(60102563,0)) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_FIELD) - e1:SetCode(EVENT_DESTROYED) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c60102563.atkcon) - e1:SetTarget(c60102563.atktg) - e1:SetOperation(c60102563.atkop) - c:RegisterEffect(e1) -end -function c60102563.cfilter(c) - return c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP) and bit.band(c:GetPreviousRaceOnField(),RACE_BEAST)~=0 -end -function c60102563.atkcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c60102563.cfilter,1,nil) -end -function c60102563.atktg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsRelateToEffect(e) and e:GetHandler():IsFaceup() end -end -function c60102563.atkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFaceup() and c:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_COPY_INHERIT) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(500) - c:RegisterEffect(e1) - end -end diff --git a/script/c601193.lua b/script/c601193.lua deleted file mode 100644 index 4b79968463..0000000000 --- a/script/c601193.lua +++ /dev/null @@ -1,65 +0,0 @@ ---彼岸の詩人 ウェルギリウス -function c601193.initial_effect(c) - c:SetUniqueOnField(1,0,601193) - --synchro summon - aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1) - c:EnableReviveLimit() - --to hand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(601193,0)) - e1:SetCategory(CATEGORY_TODECK) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCost(c601193.tdcost) - e1:SetTarget(c601193.tdtg) - e1:SetOperation(c601193.tdop) - c:RegisterEffect(e1) - --draw - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(601193,1)) - e2:SetCategory(CATEGORY_DRAW) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetCountLimit(1,601193) - e2:SetCondition(c601193.drcon) - e2:SetTarget(c601193.drtg) - e2:SetOperation(c601193.drop) - c:RegisterEffect(e2) -end -function c601193.filter(c) - return c:IsSetCard(0xb1) and c:IsDiscardable() -end -function c601193.tdcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c601193.filter,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,c601193.filter,1,1,REASON_COST+REASON_DISCARD) -end -function c601193.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_ONFIELD+LOCATION_GRAVE) and chkc:IsControler(1-tp) and chkc:IsAbleToDeck() end - if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToDeck,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectTarget(tp,Card.IsAbleToDeck,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0) -end -function c601193.tdop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoDeck(tc,nil,2,REASON_EFFECT) - end -end -function c601193.drcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE+REASON_EFFECT) -end -function c601193.drtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(1) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c601193.drop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end diff --git a/script/c60161788.lua b/script/c60161788.lua deleted file mode 100644 index 7deef69987..0000000000 --- a/script/c60161788.lua +++ /dev/null @@ -1,27 +0,0 @@ ---氷結界の番人ブリズド -function c60161788.initial_effect(c) - --draw - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(60161788,0)) - e1:SetCategory(CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetCondition(c60161788.condition) - e1:SetTarget(c60161788.target) - e1:SetOperation(c60161788.operation) - c:RegisterEffect(e1) -end -function c60161788.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) -end -function c60161788.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chk==0 then return true end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(1) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c60161788.operation(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end diff --git a/script/c60181553.lua b/script/c60181553.lua deleted file mode 100644 index 477304c432..0000000000 --- a/script/c60181553.lua +++ /dev/null @@ -1,34 +0,0 @@ ---巨星のミラ -function c60181553.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,1,3) - c:EnableReviveLimit() - --destroy replace - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetCode(EFFECT_DESTROY_REPLACE) - e1:SetRange(LOCATION_MZONE) - e1:SetTarget(c60181553.reptg) - e1:SetOperation(c60181553.repop) - c:RegisterEffect(e1) - --indes - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - e2:SetTargetRange(LOCATION_MZONE,0) - e2:SetTarget(c60181553.indtg) - e2:SetValue(1) - c:RegisterEffect(e2) -end -function c60181553.indtg(e,c) - return c:IsFaceup() and c:IsLevelBelow(4) -end -function c60181553.reptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_EFFECT) end - return Duel.SelectYesNo(tp,aux.Stringid(60181553,0)) -end -function c60181553.repop(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_EFFECT) -end diff --git a/script/c60187739.lua b/script/c60187739.lua deleted file mode 100644 index bb86db2b0e..0000000000 --- a/script/c60187739.lua +++ /dev/null @@ -1,69 +0,0 @@ ---ワンショット・ブースター -function c60187739.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c60187739.spcon) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(60187739,0)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCost(c60187739.cost) - e2:SetTarget(c60187739.target) - e2:SetOperation(c60187739.operation) - c:RegisterEffect(e2) - if not c60187739.global_check then - c60187739.global_check=true - c60187739[0]=false - c60187739[1]=false - local ge1=Effect.CreateEffect(c) - ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - ge1:SetCode(EVENT_SUMMON_SUCCESS) - ge1:SetOperation(c60187739.checkop) - Duel.RegisterEffect(ge1,0) - local ge2=Effect.CreateEffect(c) - ge2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - ge2:SetCode(EVENT_PHASE_START+PHASE_DRAW) - ge2:SetOperation(c60187739.clear) - Duel.RegisterEffect(ge2,0) - end -end -function c60187739.checkop(e,tp,eg,ep,ev,re,r,rp) - local tc=eg:GetFirst() - c60187739[tc:GetControler()]=true -end -function c60187739.clear(e,tp,eg,ep,ev,re,r,rp) - c60187739[0]=false - c60187739[1]=false -end -function c60187739.spcon(e,c) - if c==nil then return true end - return c60187739[c:GetControler()] and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 -end -function c60187739.filter(c) - return c:IsFaceup() and c:GetBattledGroupCount()~=0 -end -function c60187739.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end -function c60187739.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c60187739.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c60187739.filter,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c60187739.filter,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c60187739.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c60202749.lua b/script/c60202749.lua deleted file mode 100644 index 7df45f9407..0000000000 --- a/script/c60202749.lua +++ /dev/null @@ -1,88 +0,0 @@ ---アビスフィアー -function c60202749.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_END_PHASE+TIMING_MAIN_END) - e1:SetTarget(c60202749.target) - e1:SetOperation(c60202749.operation) - c:RegisterEffect(e1) - --act limit - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetCode(EFFECT_CANNOT_ACTIVATE) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(1,0) - e2:SetValue(c60202749.aclimit) - c:RegisterEffect(e2) - --destroy - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE) - e3:SetCode(EVENT_LEAVE_FIELD) - e3:SetOperation(c60202749.desop) - c:RegisterEffect(e3) -end -function c60202749.filter(c,e,tp) - return c:IsSetCard(0x74) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c60202749.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c60202749.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetRange(LOCATION_SZONE) - e1:SetCountLimit(1) - e1:SetCondition(c60202749.sdescon) - e1:SetOperation(c60202749.sdesop) - if Duel.GetCurrentPhase()==PHASE_END and Duel.GetTurnPlayer()~=tp then - e1:SetLabel(Duel.GetTurnCount()) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END+RESET_OPPO_TURN,2) - else - e1:SetLabel(0) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END+RESET_OPPO_TURN) - end - e:GetHandler():RegisterEffect(e1) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c60202749.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) or Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c60202749.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - local tc=g:GetFirst() - if tc then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - c:SetCardTarget(tc) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_OWNER_RELATE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetCondition(c60202749.rcon) - tc:RegisterEffect(e1,true) - end -end -function c60202749.rcon(e) - return e:GetOwner():IsHasCardTarget(e:GetHandler()) -end -function c60202749.sdescon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp and Duel.GetTurnCount()~=e:GetLabel() -end -function c60202749.sdesop(e,tp,eg,ep,ev,re,r,rp) - Duel.Destroy(e:GetHandler(),REASON_EFFECT) -end -function c60202749.aclimit(e,re,tp) - return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL) -end -function c60202749.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetHandler():GetFirstCardTarget() - if tc and tc:IsLocation(LOCATION_MZONE) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c6021033.lua b/script/c6021033.lua deleted file mode 100644 index a90520d0e2..0000000000 --- a/script/c6021033.lua +++ /dev/null @@ -1,52 +0,0 @@ ---デスカイザー・ドラゴン -function c6021033.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsCode,33420078),aux.NonTuner(Card.IsRace,RACE_ZOMBIE),1) - c:EnableReviveLimit() - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(6021033,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetTarget(c6021033.sptg) - e1:SetOperation(c6021033.spop) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_LEAVE_FIELD) - e2:SetOperation(c6021033.desop) - e2:SetLabelObject(e1) - c:RegisterEffect(e2) -end -function c6021033.filter(c,e,tp) - return c:IsRace(RACE_ZOMBIE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c6021033.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(1-tp) and c6021033.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c6021033.filter,tp,0,LOCATION_GRAVE,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c6021033.filter,tp,0,LOCATION_GRAVE,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c6021033.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsRace(RACE_ZOMBIE) - and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_ATTACK)~=0 then - if c:IsFacedown() or not c:IsRelateToEffect(e) then return end - c:SetCardTarget(tc) - e:SetLabelObject(tc) - tc:RegisterFlagEffect(6021033,RESET_EVENT+0x1fe0000,0,0) - c:RegisterFlagEffect(6021033,RESET_EVENT+0x1020000,0,0) - end -end -function c6021033.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetLabelObject():GetLabelObject() - if tc and tc:GetFlagEffect(6021033)~=0 and e:GetHandler():GetFlagEffect(6021033)~=0 then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c60222582.lua b/script/c60222582.lua deleted file mode 100644 index d2ab478848..0000000000 --- a/script/c60222582.lua +++ /dev/null @@ -1,35 +0,0 @@ ---銀河遠征 -function c60222582.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,60222582+EFFECT_COUNT_CODE_OATH) - e1:SetCondition(c60222582.condition) - e1:SetTarget(c60222582.target) - e1:SetOperation(c60222582.activate) - c:RegisterEffect(e1) -end -function c60222582.cfilter(c) - return c:IsFaceup() and c:IsLevelAbove(5) and (c:IsSetCard(0x55) or c:IsSetCard(0x7b)) -end -function c60222582.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c60222582.cfilter,tp,LOCATION_MZONE,0,1,nil) -end -function c60222582.spfilter(c,e,tp) - return c:IsLevelAbove(5) and (c:IsSetCard(0x55) or c:IsSetCard(0x7b)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c60222582.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c60222582.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c60222582.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c60222582.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENCE) - end -end diff --git a/script/c60226558.lua b/script/c60226558.lua deleted file mode 100644 index c2d7a0f3f1..0000000000 --- a/script/c60226558.lua +++ /dev/null @@ -1,132 +0,0 @@ ---魂写しの同化 -function c60226558.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c60226558.target) - e1:SetOperation(c60226558.operation) - c:RegisterEffect(e1) - --Equip limit - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_EQUIP_LIMIT) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetValue(c60226558.eqlimit) - c:RegisterEffect(e2) - --spsummon - local e3=Effect.CreateEffect(c) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_SZONE) - e3:SetCountLimit(1,60226558) - e3:SetTarget(c60226558.sptg) - e3:SetOperation(c60226558.spop) - c:RegisterEffect(e3) -end -function c60226558.eqlimit(e,c) - return c:IsSetCard(0x9d) -end -function c60226558.filter(c) - return c:IsFaceup() and c:IsSetCard(0x9d) -end -function c60226558.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c60226558.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c60226558.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local g=Duel.SelectTarget(tp,c60226558.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.Hint(HINT_SELECTMSG,tp,562) - local att=Duel.AnnounceAttribute(tp,1,0xff-g:GetFirst():GetAttribute()) - e:SetLabel(att) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c60226558.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,c,tc) - local att=e:GetLabel() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_EQUIP) - e1:SetCode(EFFECT_CHANGE_ATTRIBUTE) - e1:SetValue(att) - e1:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e1) - c:SetHint(CHINT_ATTRIBUTE,att) - end -end -function c60226558.filter1(c,e) - return c:IsCanBeFusionMaterial() and not c:IsImmuneToEffect(e) -end -function c60226558.filter2(c,e,tp,m,ec,f,chkf) - return c:IsType(TYPE_FUSION) and c:IsSetCard(0x9d) and (not f or f(c)) - and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,ec,chkf) -end -function c60226558.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local ec=e:GetHandler():GetEquipTarget() - if ec:IsControler(1-tp) then return false end - local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp - local mg1=Duel.GetMatchingGroup(Card.IsCanBeFusionMaterial,tp,LOCATION_HAND+LOCATION_MZONE,0,ec) - local res=Duel.IsExistingMatchingCard(c60226558.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,ec,nil,chkf) - if not res then - local ce=Duel.GetChainMaterial(tp) - if ce~=nil then - local fgroup=ce:GetTarget() - local mg2=fgroup(ce,e,tp) - local mf=ce:GetValue() - res=Duel.IsExistingMatchingCard(c60226558.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,ec,mf,chkf) - end - end - return res - end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function c60226558.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) then return end - local ec=c:GetEquipTarget() - if ec:IsControler(1-tp) or ec:IsImmuneToEffect(e) then return end - local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp - local mg1=Duel.GetMatchingGroup(c60226558.filter1,tp,LOCATION_HAND+LOCATION_MZONE,0,ec,e) - local sg1=Duel.GetMatchingGroup(c60226558.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,ec,nil,chkf) - local mg2=nil - local sg2=nil - local ce=Duel.GetChainMaterial(tp) - if ce~=nil then - local fgroup=ce:GetTarget() - mg2=fgroup(ce,e,tp) - local mf=ce:GetValue() - sg2=Duel.GetMatchingGroup(c60226558.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,ec,mf,chkf) - end - if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then - local sg=sg1:Clone() - if sg2 then sg:Merge(sg2) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local tg=sg:Select(tp,1,1,nil) - local tc=tg:GetFirst() - if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then - local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,ec,chkf) - tc:SetMaterial(mat1) - Duel.SendtoGrave(mat1,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION) - Duel.BreakEffect() - Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP) - else - local mat2=Duel.SelectFusionMaterial(tp,tc,mg2,ec,chkf) - local fop=ce:GetOperation() - fop(ce,e,tp,tc,mat2) - end - tc:CompleteProcedure() - else - local cg1=Duel.GetFieldGroup(tp,LOCATION_HAND+LOCATION_MZONE,0) - local cg2=Duel.GetFieldGroup(tp,LOCATION_EXTRA,0) - if cg1:GetCount()>1 and cg2:IsExists(Card.IsFacedown,1,nil) - and Duel.IsPlayerCanSpecialSummon(tp) and not Duel.IsPlayerAffectedByEffect(tp,27581098) then - Duel.ConfirmCards(1-tp,cg1) - Duel.ConfirmCards(1-tp,cg2) - Duel.ShuffleHand(tp) - end - end -end diff --git a/script/c60228941.lua b/script/c60228941.lua deleted file mode 100644 index dc57581d47..0000000000 --- a/script/c60228941.lua +++ /dev/null @@ -1,51 +0,0 @@ ---暗黒界の術師 スノウ -function c60228941.initial_effect(c) - --search - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(60228941,0)) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCondition(c60228941.condition) - e1:SetTarget(c60228941.target) - e1:SetOperation(c60228941.operation) - c:RegisterEffect(e1) -end -function c60228941.condition(e,tp,eg,ep,ev,re,r,rp) - e:SetLabel(e:GetHandler():GetPreviousControler()) - return e:GetHandler():IsPreviousLocation(LOCATION_HAND) and bit.band(r,0x4040)==0x4040 -end -function c60228941.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return c60228941.filter2(chkc) and chkc:IsControler(1-tp) and IsLocation(LOCATION_GRAVE) end - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) - if tp~=rp and tp==e:GetLabel() and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c60228941.filter2,tp,0,LOCATION_GRAVE,1,nil,e,tp) - and Duel.SelectYesNo(tp,aux.Stringid(60228941,1)) then - e:SetProperty(EFFECT_FLAG_CARD_TARGET) - e:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_SPECIAL_SUMMON) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c60228941.filter2,tp,0,LOCATION_GRAVE,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) - else - e:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - end -end -function c60228941.filter1(c) - return c:IsSetCard(0x6) and c:IsAbleToHand() -end -function c60228941.filter2(c,e,tp) - return c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c60228941.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c60228941.filter1,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.BreakEffect() - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENCE) - end - end -end diff --git a/script/c60229110.lua b/script/c60229110.lua deleted file mode 100644 index 9eefadbd11..0000000000 --- a/script/c60229110.lua +++ /dev/null @@ -1,30 +0,0 @@ ---地帝グランマーグ -function c60229110.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(60229110,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetCondition(c60229110.condition) - e1:SetTarget(c60229110.target) - e1:SetOperation(c60229110.operation) - c:RegisterEffect(e1) -end -function c60229110.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_ADVANCE -end -function c60229110.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsFacedown() end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsFacedown,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c60229110.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) and tc:IsFacedown() then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c60234913.lua b/script/c60234913.lua deleted file mode 100644 index 171d9fcc97..0000000000 --- a/script/c60234913.lua +++ /dev/null @@ -1,38 +0,0 @@ ---救世の儀式 -function c60234913.initial_effect(c) - aux.AddRitualProcGreater(c,aux.FilterBoolFunction(Card.IsCode,61757117)) - --untargetable - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(60234913,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_GRAVE) - e1:SetCost(c60234913.utcost) - e1:SetTarget(c60234913.uttg) - e1:SetOperation(c60234913.utop) - c:RegisterEffect(e1) -end -function c60234913.utcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) -end -function c60234913.filter(c) - return c:IsFaceup() and c:IsType(TYPE_RITUAL) -end -function c60234913.uttg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c60234913.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c60234913.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c60234913.filter,tp,LOCATION_MZONE,0,1,1,nil) -end -function c60234913.utop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) - e1:SetValue(aux.tgval) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - end -end diff --git a/script/c60258960.lua b/script/c60258960.lua deleted file mode 100644 index c98cfa1c71..0000000000 --- a/script/c60258960.lua +++ /dev/null @@ -1,48 +0,0 @@ ---伝説の爆炎使い -function c60258960.initial_effect(c) - c:EnableReviveLimit() - c:EnableCounterPermit(0x3001) - --add counter - local e0=Effect.CreateEffect(c) - e0:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e0:SetCode(EVENT_CHAINING) - e0:SetRange(LOCATION_MZONE) - e0:SetOperation(aux.chainreg) - c:RegisterEffect(e0) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e1:SetCode(EVENT_CHAIN_SOLVED) - e1:SetRange(LOCATION_MZONE) - e1:SetOperation(c60258960.acop) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(60258960,0)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCost(c60258960.descost) - e2:SetTarget(c60258960.destg) - e2:SetOperation(c60258960.desop) - c:RegisterEffect(e2) -end -function c60258960.acop(e,tp,eg,ep,ev,re,r,rp) - if re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL) and e:GetHandler():GetFlagEffect(1)>0 then - e:GetHandler():AddCounter(0x3001,1) - end -end -function c60258960.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsCanRemoveCounter(tp,0x3001,3,REASON_COST) end - e:GetHandler():RemoveCounter(tp,0x3001,3,REASON_COST) -end -function c60258960.destg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDestructable,tp,LOCATION_MZONE,LOCATION_MZONE,1,c) end - local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,LOCATION_MZONE,LOCATION_MZONE,c) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c60258960.desop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,LOCATION_MZONE,LOCATION_MZONE,e:GetHandler()) - Duel.Destroy(g,REASON_EFFECT) -end diff --git a/script/c60306104.lua b/script/c60306104.lua deleted file mode 100644 index 267296bb2d..0000000000 --- a/script/c60306104.lua +++ /dev/null @@ -1,21 +0,0 @@ ---進入禁止!No Entry!! -function c60306104.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_POSITION) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,0x1c0) - e1:SetTarget(c60306104.target) - e1:SetOperation(c60306104.operation) - c:RegisterEffect(e1) -end -function c60306104.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAttackPos,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - local g=Duel.GetMatchingGroup(Card.IsAttackPos,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_POSITION,g,g:GetCount(),0,0) -end -function c60306104.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsAttackPos,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - Duel.ChangePosition(g,POS_FACEUP_DEFENCE,POS_FACEDOWN_DEFENCE,0,0) -end diff --git a/script/c60312997.lua b/script/c60312997.lua deleted file mode 100644 index 4bf46847dd..0000000000 --- a/script/c60312997.lua +++ /dev/null @@ -1,56 +0,0 @@ ---波動再生 -function c60312997.initial_effect(c) - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetCondition(c60312997.condition) - e1:SetTarget(c60312997.target) - e1:SetOperation(c60312997.operation) - c:RegisterEffect(e1) -end -function c60312997.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp and Duel.GetAttackTarget()==nil - and eg:GetFirst():IsLocation(LOCATION_MZONE) -end -function c60312997.filter(c,lv) - return c:IsLevelBelow(lv) and c:IsType(TYPE_SYNCHRO) and c:IsStatus(STATUS_PROC_COMPLETE) -end -function c60312997.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c60312997.filter(chkc,eg:GetFirst():GetLevel()) end - if chk==0 then return Duel.IsExistingTarget(c60312997.filter,tp,LOCATION_GRAVE,0,1,nil,eg:GetFirst():GetLevel()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - Duel.SelectTarget(tp,c60312997.filter,tp,LOCATION_GRAVE,0,1,1,nil,eg:GetFirst():GetLevel()) -end -function c60312997.operation(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CHANGE_DAMAGE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetReset(RESET_PHASE+PHASE_DAMAGE) - e1:SetTargetRange(1,0) - e1:SetValue(c60312997.damval) - Duel.RegisterEffect(e1,tp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_DAMAGE_STEP_END) - e2:SetOperation(c60312997.spop) - e2:SetLabelObject(tc) - e2:SetReset(RESET_PHASE+PHASE_DAMAGE) - Duel.RegisterEffect(e2,tp) - end -end -function c60312997.damval(e,re,val,r,rp,rc) - if r==REASON_BATTLE then - return val/2 - else return val end -end -function c60312997.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local tc=e:GetLabelObject() - if tc:IsLocation(LOCATION_GRAVE) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c60316373.lua b/script/c60316373.lua deleted file mode 100644 index a1aff3b101..0000000000 --- a/script/c60316373.lua +++ /dev/null @@ -1,40 +0,0 @@ ---紋章獣アバコーンウェイ -function c60316373.initial_effect(c) - --salvage - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(60316373,0)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_GRAVE) - e1:SetCountLimit(1,60316373) - e1:SetCost(c60316373.cost) - e1:SetTarget(c60316373.target) - e1:SetOperation(c60316373.operation) - c:RegisterEffect(e1) -end -function c60316373.rfilter(c) - return c:IsCode(60316373) and c:IsAbleToRemoveAsCost() -end -function c60316373.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c60316373.rfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c60316373.rfilter,tp,LOCATION_GRAVE,0,1,1,e:GetHandler()) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c60316373.filter(c) - return c:IsSetCard(0x76) and c:IsAbleToHand() -end -function c60316373.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c60316373.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c60316373.filter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g=Duel.SelectTarget(tp,c60316373.filter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c60316373.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.SendtoHand(tc,nil,REASON_EFFECT)>0 then - Duel.ConfirmCards(1-tp,tc) - end -end diff --git a/script/c60365591.lua b/script/c60365591.lua deleted file mode 100644 index eba8dca34a..0000000000 --- a/script/c60365591.lua +++ /dev/null @@ -1,4 +0,0 @@ ---奇跡の方舟 -function c60365591.initial_effect(c) - aux.AddRitualProcGreater(c,aux.FilterBoolFunction(Card.IsCode,86327225)) -end diff --git a/script/c60369732.lua b/script/c60369732.lua deleted file mode 100644 index b535449ba6..0000000000 --- a/script/c60369732.lua +++ /dev/null @@ -1,4 +0,0 @@ ---大邪神の儀式 -function c60369732.initial_effect(c) - aux.AddRitualProcGreater(c,aux.FilterBoolFunction(Card.IsCode,62420419)) -end diff --git a/script/c60391791.lua b/script/c60391791.lua deleted file mode 100644 index 9993944c20..0000000000 --- a/script/c60391791.lua +++ /dev/null @@ -1,33 +0,0 @@ ---千里眼 -function c60391791.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - -- - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(60391791,0)) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) - e2:SetRange(LOCATION_SZONE) - e2:SetCountLimit(1) - e2:SetCondition(c60391791.cfcon) - e2:SetCost(c60391791.cfcost) - e2:SetOperation(c60391791.cfop) - c:RegisterEffect(e2) -end -function c60391791.cfcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp and Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)~=0 -end -function c60391791.cfcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,100) end - Duel.PayLPCost(tp,100) -end -function c60391791.cfop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local g=Duel.GetDecktopGroup(1-tp,1) - if g:GetCount()~=0 then - Duel.ConfirmCards(tp,g) - end -end diff --git a/script/c60398723.lua b/script/c60398723.lua deleted file mode 100644 index 945b499eac..0000000000 --- a/script/c60398723.lua +++ /dev/null @@ -1,36 +0,0 @@ ---森のざわめき -function c60398723.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_POSITION+CATEGORY_TOHAND) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c60398723.target) - e1:SetOperation(c60398723.activate) - c:RegisterEffect(e1) -end -function c60398723.filter(c) - return c:IsFaceup() and c:IsCanTurnSet() -end -function c60398723.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and c60398723.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c60398723.filter,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - local g=Duel.SelectTarget(tp,c60398723.filter,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0) -end -function c60398723.rfilter(c) - return c:GetSequence()==5 and c:IsAbleToHand() -end -function c60398723.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsControler(1-tp) and tc:IsFaceup() then - Duel.ChangePosition(tc,POS_FACEDOWN_DEFENCE) - local rg=Duel.GetMatchingGroup(c60398723.rfilter,tp,LOCATION_SZONE,LOCATION_SZONE,nil) - if rg:GetCount()~=0 and Duel.SelectYesNo(tp,aux.Stringid(60398723,0)) then - Duel.BreakEffect() - Duel.SendtoHand(rg,nil,REASON_EFFECT) - end - end -end diff --git a/script/c60399954.lua b/script/c60399954.lua deleted file mode 100644 index f8bf997bcb..0000000000 --- a/script/c60399954.lua +++ /dev/null @@ -1,67 +0,0 @@ ---ユニオン・アタック -function c60399954.initial_effect(c) - --atkup - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c60399954.condition) - e1:SetTarget(c60399954.target) - e1:SetOperation(c60399954.operation) - c:RegisterEffect(e1) -end -function c60399954.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()==PHASE_MAIN1 -end -function c60399954.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,nil) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetProperty(EFFECT_FLAG_OATH+EFFECT_FLAG_IGNORE_IMMUNE) - e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetTarget(c60399954.ftarget) - e1:SetLabel(g:GetFirst():GetFieldID()) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function c60399954.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE_START+PHASE_BATTLE) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetOperation(c60399954.atkop) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_NO_BATTLE_DAMAGE) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e2) - end -end -function c60399954.ftarget(e,c) - return e:GetLabel()~=c:GetFieldID() -end -function c60399954.atkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local atk=0 - local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,c) - local tc=g:GetFirst() - while tc do - atk=atk+tc:GetAttack() - tc=g:GetNext() - end - local e1=Effect.CreateEffect(e:GetOwner()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(atk) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_BATTLE) - c:RegisterEffect(e1) -end diff --git a/script/c60406591.lua b/script/c60406591.lua deleted file mode 100644 index 57faf462c8..0000000000 --- a/script/c60406591.lua +++ /dev/null @@ -1,56 +0,0 @@ ---デモンバルサム・シード -function c60406591.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetCondition(c60406591.condition) - e1:SetTarget(c60406591.target) - e1:SetOperation(c60406591.activate) - c:RegisterEffect(e1) - if not c60406591.global_check then - c60406591.global_check=true - c60406591[0]=nil - c60406591[1]=nil - c60406591[2]=nil - local ge1=Effect.CreateEffect(c) - ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - ge1:SetCode(EVENT_BATTLE_DAMAGE) - ge1:SetOperation(c60406591.checkop) - Duel.RegisterEffect(ge1,0) - local ge2=Effect.CreateEffect(c) - ge2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - ge2:SetCode(EVENT_PHASE_START+PHASE_DRAW) - ge2:SetOperation(c60406591.clear) - Duel.RegisterEffect(ge2,0) - end -end -function c60406591.checkop(e,tp,eg,ep,ev,re,r,rp) - c60406591[0]=ep - c60406591[1]=math.floor(ev/500) - c60406591[2]=eg:GetFirst():GetBattleTarget() -end -function c60406591.clear(e,tp,eg,ep,ev,re,r,rp) - c60406591[0]=nil - c60406591[1]=nil - c60406591[2]=nil -end -function c60406591.condition(e,tp,eg,ep,ev,re,r,rp) - return c60406591[0]==tp and eg:GetCount()==1 and eg:GetFirst()==c60406591[2] -end -function c60406591.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return c60406591[1]>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>c60406591[1] - and Duel.IsPlayerCanSpecialSummonMonster(tp,60406592,0,0x4011,100,100,1,RACE_PLANT,ATTRIBUTE_DARK) end - Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,c60406591[1],0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,c60406591[1],0,0) -end -function c60406591.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)-1 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c60417395.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - if e:GetHandler():IsRelateToEffect(e) and Duel.SpecialSummon(e:GetHandler(),0,tp,tp,true,false,POS_FACEUP)~=0 then - e:GetHandler():CompleteProcedure() - end -end -function c60417395.filter(c) - return c:IsFaceup() and c:IsType(TYPE_TRAP) and c:IsAbleToHand() -end -function c60417395.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chk==0 then return Duel.IsExistingTarget(c60417395.filter,tp,LOCATION_ONFIELD,0,1,nil) end - local g=Duel.GetMatchingGroup(c60417395.filter,tp,LOCATION_ONFIELD,0,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0) -end -function c60417395.thop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c60417395.filter,tp,LOCATION_ONFIELD,0,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - end -end diff --git a/script/c60434101.lua b/script/c60434101.lua deleted file mode 100644 index 06c76889ea..0000000000 --- a/script/c60434101.lua +++ /dev/null @@ -1,39 +0,0 @@ ---魔轟神ガルバス -function c60434101.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(60434101,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c60434101.cost) - e1:SetTarget(c60434101.tg) - e1:SetOperation(c60434101.op) - c:RegisterEffect(e1) -end -function c60434101.costfilter(c) - return c:IsDiscardable() and c:IsAbleToGraveAsCost() -end -function c60434101.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c60434101.costfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,c60434101.costfilter,1,1,REASON_DISCARD+REASON_COST) -end -function c60434101.filter(c,atk) - return c:IsFaceup() and c:IsDestructable() and c:GetDefence()<=atk -end -function c60434101.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local c=e:GetHandler() - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c60434101.filter(chkc,c:GetAttack()) end - if chk==0 then return Duel.IsExistingTarget(c60434101.filter,tp,0,LOCATION_MZONE,1,nil,c:GetAttack()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c60434101.filter,tp,0,LOCATION_MZONE,1,1,nil,c:GetAttack()) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c60434101.op(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - local c=e:GetHandler() - if c:IsFaceup() and c:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsRelateToEffect(e) and tc:GetDefence()<=c:GetAttack() then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c60434189.lua b/script/c60434189.lua deleted file mode 100644 index 2ece0e3a3b..0000000000 --- a/script/c60434189.lua +++ /dev/null @@ -1,44 +0,0 @@ ---ペンデュラム・モラトリアム -function c60434189.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetOperation(c60434189.activate) - c:RegisterEffect(e1) -end -function c60434189.activate(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - e1:SetTargetRange(LOCATION_SZONE,LOCATION_SZONE) - e1:SetTarget(c60434189.indtg) - e1:SetValue(c60434189.indval) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_CHAIN_SOLVING) - e2:SetCondition(c60434189.discon) - e2:SetOperation(c60434189.disop) - e2:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e2,tp) -end -function c60434189.indtg(e,c) - return c:GetSequence()>5 -end -function c60434189.indval(e,re,tp) - return tp~=e:GetHandlerPlayer() -end -function c60434189.indfilter(c) - return c:IsLocation(LOCATION_SZONE) and c:GetSequence()>5 -end -function c60434189.discon(e,tp,eg,ep,ev,re,r,rp) - if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end - local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) - return g and g:IsExists(c60434189.indfilter,1,nil) and ep~=tp -end -function c60434189.disop(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateEffect(ev) -end diff --git a/script/c60470713.lua b/script/c60470713.lua deleted file mode 100644 index 99f8fd763d..0000000000 --- a/script/c60470713.lua +++ /dev/null @@ -1,70 +0,0 @@ ---マドルチェ・チケット -function c60470713.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --search - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(60470713,0)) - e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetRange(LOCATION_SZONE) - e2:SetCountLimit(1,60470713) - e2:SetCode(EVENT_TO_DECK) - e2:SetCondition(c60470713.condition) - e2:SetTarget(c60470713.target) - e2:SetOperation(c60470713.operation) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EVENT_TO_HAND) - c:RegisterEffect(e3) -end -function c60470713.cfilter(c,tp) - return c:IsControler(tp) and c:GetPreviousControler()==tp - and (c:IsPreviousLocation(LOCATION_GRAVE) or (c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousPosition(POS_FACEUP))) - and c:IsSetCard(0x71) and not c:IsLocation(LOCATION_EXTRA) -end -function c60470713.condition(e,tp,eg,ep,ev,re,r,rp) - return bit.band(r,REASON_EFFECT)~=0 and eg:IsExists(c60470713.cfilter,1,nil,tp) -end -function c60470713.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsRelateToEffect(e) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c60470713.mfilter(c) - return c:IsFaceup() and c:IsSetCard(0x71) and c:IsRace(RACE_FAIRY) -end -function c60470713.filter1(c) - return c:IsSetCard(0x71) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() -end -function c60470713.filter2(c,e,tp) - return c:IsSetCard(0x71) and c:IsType(TYPE_MONSTER) - and (c:IsAbleToHand() or c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK)) -end -function c60470713.operation(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local b=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c60470713.mfilter,tp,LOCATION_MZONE,0,1,nil) - if not b then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c60470713.filter1,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end - else - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c60470713.filter2,tp,LOCATION_DECK,0,1,1,nil,e,tp) - local tc=g:GetFirst() - if tc then - if not tc:IsAbleToHand() or (tc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK) - and Duel.SelectYesNo(tp,aux.Stringid(60470713,1))) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_ATTACK) - else - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end - end - end -end diff --git a/script/c60482781.lua b/script/c60482781.lua deleted file mode 100644 index d7803006fd..0000000000 --- a/script/c60482781.lua +++ /dev/null @@ -1,43 +0,0 @@ ---ミスティック・ソードマン LV6 -function c60482781.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(60482781,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_BATTLE_START) - e1:SetCondition(c60482781.descon) - e1:SetTarget(c60482781.destg) - e1:SetOperation(c60482781.desop) - c:RegisterEffect(e1) - --summon limit - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_LIMIT_SUMMON_PROC) - e2:SetCondition(c60482781.sumcon) - c:RegisterEffect(e2) -end -c60482781.lvdncount=2 -c60482781.lvdn={47507260,74591968} -function c60482781.descon(e,tp,eg,ep,ev,re,r,rp) - local d=Duel.GetAttackTarget() - return e:GetHandler()==Duel.GetAttacker() and d and d:IsFacedown() and d:IsDefencePos() -end -function c60482781.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,Duel.GetAttackTarget(),1,0,0) -end -function c60482781.desop(e,tp,eg,ep,ev,re,r,rp) - local d=Duel.GetAttackTarget() - if d:IsRelateToBattle() then - if d:GetOwner()~=tp and Duel.SelectYesNo(tp,aux.Stringid(60482781,1)) then - Duel.Destroy(d,REASON_EFFECT,LOCATION_DECK) - else - Duel.Destroy(d,REASON_EFFECT) - end - end -end -function c60482781.sumcon(e,c) - if not c then return true end - return false -end diff --git a/script/c60493189.lua b/script/c60493189.lua deleted file mode 100644 index 33340cffb3..0000000000 --- a/script/c60493189.lua +++ /dev/null @@ -1,49 +0,0 @@ ---E・HERO プラズマヴァイスマン -function c60493189.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcCode2(c,20721928,59793705,true,true) - --spsummon condition - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(aux.fuslimit) - c:RegisterEffect(e1) - --pierce - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_PIERCE) - c:RegisterEffect(e2) - --destroy - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(60493189,0)) - e3:SetCategory(CATEGORY_DESTROY) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_MZONE) - e3:SetCost(c60493189.descost) - e3:SetTarget(c60493189.destg) - e3:SetOperation(c60493189.desop) - c:RegisterEffect(e3) -end -function c60493189.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) -end -function c60493189.filter(c) - return c:IsAttackPos() and c:IsDestructable() -end -function c60493189.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and c60493189.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c60493189.filter,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c60493189.filter,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c60493189.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsAttackPos() and tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c60519422.lua b/script/c60519422.lua deleted file mode 100644 index 206448a46d..0000000000 --- a/script/c60519422.lua +++ /dev/null @@ -1,24 +0,0 @@ ---騎士道精神 -function c60519422.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --indes - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(LOCATION_MZONE,0) - e2:SetTarget(c60519422.indtg) - e2:SetValue(c60519422.indval) - c:RegisterEffect(e2) -end -function c60519422.indtg(e,c) - e:SetLabel(c:GetAttack()) - return true -end -function c60519422.indval(e,c) - return c:GetAttack()==e:GetLabel() -end diff --git a/script/c60530944.lua b/script/c60530944.lua deleted file mode 100644 index 9146c51b3d..0000000000 --- a/script/c60530944.lua +++ /dev/null @@ -1,48 +0,0 @@ ---異種闘争 -function c60530944.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOGRAVE) - e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,0x1c0) - e1:SetCondition(c60530944.condition) - e1:SetOperation(c60530944.operation) - c:RegisterEffect(e1) -end -function c60530944.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)>0 - and not Duel.IsExistingMatchingCard(Card.IsFacedown,tp,LOCATION_MZONE,0,1,nil) - and Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0 - and not Duel.IsExistingMatchingCard(Card.IsFacedown,tp,0,LOCATION_MZONE,1,nil) -end -function c60530944.getattr(g) - local aat=0 - local tc=g:GetFirst() - while tc do - aat=bit.bor(aat,tc:GetAttribute()) - tc=g:GetNext() - end - return aat -end -function c60530944.rmfilter(c,at) - return c:GetAttribute()==at -end -function c60530944.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 - or Duel.IsExistingMatchingCard(Card.IsFacedown,tp,LOCATION_MZONE,0,1,nil) - or Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)==0 - or Duel.IsExistingMatchingCard(Card.IsFacedown,tp,0,LOCATION_MZONE,1,nil) then return end - local g1=Duel.GetFieldGroup(tp,LOCATION_MZONE,0) - local g2=Duel.GetFieldGroup(tp,0,LOCATION_MZONE) - local c=e:GetHandler() - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(60530944,0)) - local r1=Duel.AnnounceAttribute(tp,1,c60530944.getattr(g1)) - g1:Remove(c60530944.rmfilter,nil,r1) - Duel.Hint(HINT_SELECTMSG,1-tp,aux.Stringid(60530944,0)) - local r2=Duel.AnnounceAttribute(1-tp,1,c60530944.getattr(g2)) - g2:Remove(c60530944.rmfilter,nil,r2) - g1:Merge(g2) - Duel.SendtoGrave(g1,REASON_EFFECT) -end diff --git a/script/c60534585.lua b/script/c60534585.lua deleted file mode 100644 index 0f073ea93c..0000000000 --- a/script/c60534585.lua +++ /dev/null @@ -1,31 +0,0 @@ ---闘争本能 -function c60534585.initial_effect(c) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetCondition(c60534585.condition) - e1:SetTarget(c60534585.target) - e1:SetOperation(c60534585.operation) - c:RegisterEffect(e1) -end -function c60534585.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp and Duel.GetAttackTarget()==nil - and Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 -end -function c60534585.spfilter(c,e,tp) - return c:IsLevelBelow(4) and c:IsRace(RACE_BEAST) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c60534585.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c60534585.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c60534585.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c60534585.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - if g:GetCount()~=0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_ATTACK) - end -end diff --git a/script/c60549248.lua b/script/c60549248.lua deleted file mode 100644 index acebb618f6..0000000000 --- a/script/c60549248.lua +++ /dev/null @@ -1,71 +0,0 @@ ---電池メン-角型 -function c60549248.initial_effect(c) - --tohand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(60549248,0)) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e1:SetCountLimit(1,60549248) - e1:SetTarget(c60549248.thtg) - e1:SetOperation(c60549248.thop) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - c:RegisterEffect(e2) - local e3=e1:Clone() - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e3) - --destroy - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(60549248,1)) - e4:SetCategory(CATEGORY_DESTROY) - e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e4:SetCode(EVENT_PHASE+PHASE_END) - e4:SetRange(LOCATION_MZONE) - e4:SetCountLimit(1) - e4:SetCondition(c60549248.descon) - e4:SetTarget(c60549248.destg) - e4:SetOperation(c60549248.desop) - c:RegisterEffect(e4) -end -function c60549248.filter(c) - return c:IsSetCard(0x28) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() -end -function c60549248.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c60549248.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c60549248.thop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c60549248.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - if c:IsRelateToEffect(e) and c:IsFaceup() then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetValue(c:GetBaseAttack()*2) - e1:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_SET_DEFENCE_FINAL) - e2:SetValue(c:GetBaseDefence()*2) - c:RegisterEffect(e2) - end - end -end -function c60549248.descon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c60549248.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0) -end -function c60549248.desop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - Duel.Destroy(e:GetHandler(),REASON_EFFECT) - end -end diff --git a/script/c60551528.lua b/script/c60551528.lua deleted file mode 100644 index 52eecd796c..0000000000 --- a/script/c60551528.lua +++ /dev/null @@ -1,126 +0,0 @@ ---インフェルノイド・シャイターン -function c60551528.initial_effect(c) - c:EnableReviveLimit() - --special summon condition - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_SPSUMMON_PROC) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e2:SetRange(LOCATION_HAND) - e2:SetCondition(c60551528.spcon) - e2:SetOperation(c60551528.spop) - c:RegisterEffect(e2) - --todeck - local e3=Effect.CreateEffect(c) - e3:SetCategory(CATEGORY_TODECK) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_MZONE) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetCountLimit(1) - e3:SetTarget(c60551528.tdtg) - e3:SetOperation(c60551528.tdop) - c:RegisterEffect(e3) - --remove - local e4=Effect.CreateEffect(c) - e4:SetCategory(CATEGORY_REMOVE) - e4:SetType(EFFECT_TYPE_QUICK_O) - e4:SetCode(EVENT_FREE_CHAIN) - e4:SetRange(LOCATION_MZONE) - e4:SetProperty(EFFECT_FLAG_CARD_TARGET) - e4:SetCountLimit(1) - e4:SetCondition(c60551528.rmcon) - e4:SetCost(c60551528.rmcost) - e4:SetTarget(c60551528.rmtg) - e4:SetOperation(c60551528.rmop) - c:RegisterEffect(e4) -end -function c60551528.spfilter(c) - return c:IsSetCard(0xbb) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost() -end -function c60551528.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - local sum=0 - for i=0,4 do - local tc=Duel.GetFieldCard(tp,LOCATION_MZONE,i) - if tc and tc:IsFaceup() and tc:IsType(TYPE_EFFECT) then - if tc:IsType(TYPE_XYZ) then sum=sum+tc:GetRank() - else sum=sum+tc:GetLevel() end - end - end - if sum>8 then return false end - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ft<0 then return false end - if c:IsHasEffect(34822850) then - if ft>0 then - return Duel.IsExistingMatchingCard(c60551528.spfilter,tp,LOCATION_MZONE+LOCATION_GRAVE+LOCATION_HAND,0,1,c) - else - return Duel.IsExistingMatchingCard(c60551528.spfilter,tp,LOCATION_MZONE,0,1,nil) - end - else - return ft>0 and Duel.IsExistingMatchingCard(c60551528.spfilter,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,c) - end -end -function c60551528.spop(e,tp,eg,ep,ev,re,r,rp,c) - local g=nil - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - if c:IsHasEffect(34822850) then - if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then - g=Duel.SelectMatchingCard(tp,c60551528.spfilter,tp,LOCATION_MZONE+LOCATION_GRAVE+LOCATION_HAND,0,1,1,c) - else - g=Duel.SelectMatchingCard(tp,c60551528.spfilter,tp,LOCATION_MZONE,0,1,1,nil) - end - else - g=Duel.SelectMatchingCard(tp,c60551528.spfilter,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,1,c) - end - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c60551528.tdfilter(c) - return c:IsFacedown() and c:IsAbleToDeck() -end -function c60551528.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and c60551528.tdfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c60551528.tdfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectTarget(tp,c60551528.tdfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0) - Duel.SetChainLimit(c60551528.limit(g:GetFirst())) -end -function c60551528.tdop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoDeck(tc,nil,2,REASON_EFFECT) - end -end -function c60551528.limit(c) - return function (e,lp,tp) - return e:GetHandler()~=c - end -end -function c60551528.rmcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp -end -function c60551528.rmcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsReleasable,1,nil) end - local g=Duel.SelectReleaseGroup(tp,Card.IsReleasable,1,1,nil) - Duel.Release(g,REASON_COST) -end -function c60551528.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(1-tp) and chkc:IsAbleToRemove() end - if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) -end -function c60551528.rmop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) - end -end diff --git a/script/c60577362.lua b/script/c60577362.lua deleted file mode 100644 index d32c230214..0000000000 --- a/script/c60577362.lua +++ /dev/null @@ -1,30 +0,0 @@ ---威圧する魔眼 -function c60577362.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c60577362.target) - e1:SetOperation(c60577362.activate) - c:RegisterEffect(e1) -end -function c60577362.filter(c) - return c:IsFaceup() and c:IsAttackBelow(2000) and c:IsRace(RACE_ZOMBIE) -end -function c60577362.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c60577362.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c60577362.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c60577362.filter,tp,LOCATION_MZONE,0,1,1,nil) -end -function c60577362.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DIRECT_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - end -end diff --git a/script/c6061630.lua b/script/c6061630.lua deleted file mode 100644 index 76a12ee0be..0000000000 --- a/script/c6061630.lua +++ /dev/null @@ -1,72 +0,0 @@ ---マジカル・コンダクター -function c6061630.initial_effect(c) - c:EnableCounterPermit(0x3001) - --add counter - local e0=Effect.CreateEffect(c) - e0:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e0:SetCode(EVENT_CHAINING) - e0:SetRange(LOCATION_MZONE) - e0:SetOperation(aux.chainreg) - c:RegisterEffect(e0) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e1:SetCode(EVENT_CHAIN_SOLVED) - e1:SetRange(LOCATION_MZONE) - e1:SetOperation(c6061630.acop) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(6061630,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetCountLimit(1) - e2:SetRange(LOCATION_MZONE) - e2:SetTarget(c6061630.sptg) - e2:SetOperation(c6061630.spop) - c:RegisterEffect(e2) -end -function c6061630.acop(e,tp,eg,ep,ev,re,r,rp) - if re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL) and e:GetHandler():GetFlagEffect(1)>0 then - e:GetHandler():AddCounter(0x3001,2) - end -end -function c6061630.filter(c,cc,e,tp) - return c:IsRace(RACE_SPELLCASTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsHasEffect(EFFECT_NECRO_VALLEY) - and c:GetLevel()>0 and cc:IsCanRemoveCounter(tp,0x3001,c:GetLevel(),REASON_COST) -end -function c6061630.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c6061630.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e:GetHandler(),e,tp) end - local g=Duel.GetMatchingGroup(c6061630.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,nil,e:GetHandler(),e,tp) - local lvt={} - local tc=g:GetFirst() - while tc do - local tlv=tc:GetLevel() - lvt[tlv]=tlv - tc=g:GetNext() - end - local pc=1 - for i=1,12 do - if lvt[i] then lvt[i]=nil lvt[pc]=i pc=pc+1 end - end - lvt[pc]=nil - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(6061630,1)) - local lv=Duel.AnnounceNumber(tp,table.unpack(lvt)) - e:GetHandler():RemoveCounter(tp,0x3001,lv,REASON_COST) - e:SetLabel(lv) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE) -end -function c6061630.sfilter(c,lv,e,tp) - return c:IsRace(RACE_SPELLCASTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsHasEffect(EFFECT_NECRO_VALLEY) - and c:GetLevel()==lv -end -function c6061630.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local lv=e:GetLabel() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c6061630.sfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,lv,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c60621361.lua b/script/c60621361.lua deleted file mode 100644 index 03703a39f6..0000000000 --- a/script/c60621361.lua +++ /dev/null @@ -1,95 +0,0 @@ ---横取りボーン -function c60621361.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_END_PHASE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCondition(c60621361.condition) - e1:SetTarget(c60621361.target) - e1:SetOperation(c60621361.activate) - c:RegisterEffect(e1) - --remove - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetCode(EVENT_LEAVE_FIELD_P) - e2:SetOperation(c60621361.checkop) - c:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE) - e3:SetCode(EVENT_LEAVE_FIELD) - e3:SetOperation(c60621361.remop) - e3:SetLabelObject(e2) - c:RegisterEffect(e3) - --destroy - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e4:SetRange(LOCATION_SZONE) - e4:SetCode(EVENT_LEAVE_FIELD) - e4:SetCondition(c60621361.descon) - e4:SetOperation(c60621361.desop) - c:RegisterEffect(e4) - if not c60621361.global_check then - c60621361.global_check=true - local ge1=Effect.CreateEffect(c) - ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - ge1:SetCode(EVENT_SPSUMMON_SUCCESS) - ge1:SetOperation(c60621361.spcheckop) - Duel.RegisterEffect(ge1,0) - end -end -function c60621361.spcheckop(e,tp,eg,ep,ev,re,r,rp) - local tc=eg:GetFirst() - local p1=false - local p2=false - while tc do - if tc:GetSummonPlayer()==0 then p1=true else p2=true end - tc=eg:GetNext() - end - if p1 then Duel.RegisterFlagEffect(0,60621361,RESET_PHASE+PHASE_END,0,1) end - if p2 then Duel.RegisterFlagEffect(1,60621361,RESET_PHASE+PHASE_END,0,1) end -end -function c60621361.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetFlagEffect(1-tp,60621361)~=0 -end -function c60621361.filter(c,e,tp) - return c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c60621361.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(1-tp) and c60621361.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c60621361.filter,tp,0,LOCATION_GRAVE,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c60621361.filter,tp,0,LOCATION_GRAVE,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c60621361.activate(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then - if Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENCE)==0 then return end - c:SetCardTarget(tc) - end -end -function c60621361.checkop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsDisabled() then - e:SetLabel(1) - else e:SetLabel(0) end -end -function c60621361.remop(e,tp,eg,ep,ev,re,r,rp) - if e:GetLabelObject():GetLabel()~=0 then return end - local tc=e:GetHandler():GetFirstCardTarget() - if tc and tc:IsLocation(LOCATION_MZONE) then - Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) - end -end -function c60621361.descon(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetHandler():GetFirstCardTarget() - return tc and eg:IsContains(tc) -end -function c60621361.desop(e,tp,eg,ep,ev,re,r,rp) - Duel.Destroy(e:GetHandler(),REASON_EFFECT) -end diff --git a/script/c60627999.lua b/script/c60627999.lua deleted file mode 100644 index e7d160bacd..0000000000 --- a/script/c60627999.lua +++ /dev/null @@ -1,61 +0,0 @@ ---血の沼地 -function c60627999.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_POSITION) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c60627999.target) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_SZONE) - e2:SetCode(EFFECT_SELF_DESTROY) - e2:SetCondition(c60627999.sdescon) - c:RegisterEffect(e2) - --disable spsummon - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetRange(LOCATION_SZONE) - e3:SetProperty(EFFECT_FLAG_SET_AVAILABLE) - e3:SetCode(EFFECT_CANNOT_TRIGGER) - e3:SetTargetRange(LOCATION_SZONE,LOCATION_SZONE) - e3:SetTarget(c60627999.acttg) - c:RegisterEffect(e3) -end -function c60627999.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local c=e:GetHandler() - c:SetTurnCounter(0) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_SZONE) - e1:SetCondition(c60627999.descon) - e1:SetOperation(c60627999.desop) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,2) - c:RegisterEffect(e1) -end -function c60627999.descon(e,tp,eg,ep,ev,re,r,rp) - return tp==Duel.GetTurnPlayer() -end -function c60627999.desop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local ct=c:GetTurnCounter() - ct=ct+1 - c:SetTurnCounter(ct) - if ct==2 then - Duel.Destroy(c,REASON_EFFECT) - end -end -function c60627999.sdescon(e) - return Duel.IsExistingMatchingCard(Card.IsType,e:GetHandlerPlayer(),LOCATION_ONFIELD,0,1,e:GetHandler(),TYPE_SPELL+TYPE_TRAP) -end -function c60627999.acttg(e,c) - return c:IsFacedown() and c:GetSequence()~=5 -end diff --git a/script/c60634565.lua b/script/c60634565.lua deleted file mode 100644 index 30a45b39d9..0000000000 --- a/script/c60634565.lua +++ /dev/null @@ -1,33 +0,0 @@ ---レプティレス・ラミア -function c60634565.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0x3c),aux.NonTuner(nil),1) - c:EnableReviveLimit() - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(60634565,0)) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(c60634565.descon) - e1:SetTarget(c60634565.destg) - e1:SetOperation(c60634565.desop) - c:RegisterEffect(e1) -end -function c60634565.descon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_SYNCHRO -end -function c60634565.desfilter(c) - return c:IsFaceup() and c:GetAttack()==0 and c:IsDestructable() -end -function c60634565.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local g=Duel.GetMatchingGroup(c60634565.desfilter,tp,0,LOCATION_MZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,g:GetCount()) -end -function c60634565.desop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c60634565.desfilter,tp,0,LOCATION_MZONE,nil) - local ct=Duel.Destroy(g,REASON_EFFECT) - Duel.Draw(tp,ct,REASON_EFFECT) -end diff --git a/script/c60645181.lua b/script/c60645181.lua deleted file mode 100644 index b14da8ba16..0000000000 --- a/script/c60645181.lua +++ /dev/null @@ -1,31 +0,0 @@ ---H-C エクスカリバー -function c60645181.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsRace,RACE_WARRIOR),4,2) - c:EnableReviveLimit() - --attack up - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetDescription(aux.Stringid(60645181,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c60645181.cost) - e1:SetOperation(c60645181.operation) - c:RegisterEffect(e1) -end -function c60645181.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,2,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,2,2,REASON_COST) -end -function c60645181.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetValue(c:GetBaseAttack()*2) - e1:SetReset(RESET_EVENT+0x1ff0000+RESET_PHASE+PHASE_END,2) - c:RegisterEffect(e1) - end -end diff --git a/script/c60666820.lua b/script/c60666820.lua deleted file mode 100644 index f4e33ccf3c..0000000000 --- a/script/c60666820.lua +++ /dev/null @@ -1,56 +0,0 @@ ---デーモン・イーター -function c60666820.initial_effect(c) - c:SetUniqueOnField(1,0,60666820) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c60666820.spcon) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(60666820,0)) - e2:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_PHASE+PHASE_END) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetRange(LOCATION_GRAVE) - e2:SetCountLimit(1) - e2:SetCondition(c60666820.condition) - e2:SetTarget(c60666820.target) - e2:SetOperation(c60666820.operation) - c:RegisterEffect(e2) -end -function c60666820.cfilter(c) - return c:IsFaceup() and c:IsRace(RACE_SPELLCASTER) -end -function c60666820.spcon(e,c) - if c==nil then return true end - return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c60666820.cfilter,c:GetControler(),LOCATION_MZONE,0,1,nil) -end -function c60666820.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp -end -function c60666820.filter(c) - return c:IsFaceup() and c:IsDestructable() -end -function c60666820.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) - and Duel.IsExistingTarget(c60666820.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c60666820.filter,tp,LOCATION_MZONE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c60666820.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)~=0 and c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c60668166.lua b/script/c60668166.lua deleted file mode 100644 index 6a292d5a51..0000000000 --- a/script/c60668166.lua +++ /dev/null @@ -1,42 +0,0 @@ ---ナチュル・チェリー -function c60668166.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(60668166,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCondition(c60668166.condition) - e1:SetTarget(c60668166.target) - e1:SetOperation(c60668166.operation) - c:RegisterEffect(e1) -end -function c60668166.condition(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return rp~=tp and c:GetPreviousControler()==tp and bit.band(c:GetPreviousLocation(),LOCATION_ONFIELD)~=0 -end -function c60668166.filter(c,e,tp) - return c:GetCode()==60668166 and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN) -end -function c60668166.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c60668166.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c60668166.operation(e,tp,eg,ep,ev,re,r,rp) - local ct=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ct==0 then return end - local g=Duel.GetMatchingGroup(c60668166.filter,tp,LOCATION_DECK,0,nil,e,tp) - if g:GetCount()>0 then - local t1=g:GetFirst() - local t2=g:GetNext() - Duel.SpecialSummonStep(t1,0,tp,tp,false,false,POS_FACEDOWN_DEFENCE) - Duel.ConfirmCards(1-tp,t1) - if t2 and ct>1 and Duel.SelectYesNo(tp,aux.Stringid(60668166,1)) then - Duel.SpecialSummonStep(t2,0,tp,tp,false,false,POS_FACEDOWN_DEFENCE) - Duel.ConfirmCards(1-tp,t2) - end - Duel.SpecialSummonComplete() - end -end diff --git a/script/c60682203.lua b/script/c60682203.lua deleted file mode 100644 index a2266243ce..0000000000 --- a/script/c60682203.lua +++ /dev/null @@ -1,35 +0,0 @@ ---大寒波 -function c60682203.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c60682203.condition) - e1:SetOperation(c60682203.operation) - c:RegisterEffect(e1) -end -function c60682203.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()==PHASE_MAIN1 and not Duel.CheckPhaseActivity() -end -function c60682203.operation(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EFFECT_CANNOT_ACTIVATE) - e1:SetTargetRange(1,1) - e1:SetValue(c60682203.aclimit) - e1:SetReset(RESET_PHASE+PHASE_END,2) - Duel.RegisterEffect(e1,tp) - --cannot set - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_CANNOT_SSET) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetTargetRange(1,1) - e2:SetTarget(aux.TRUE) - e2:SetReset(RESET_PHASE+PHASE_END,2) - Duel.RegisterEffect(e2,tp) -end -function c60682203.aclimit(e,re,tp) - return re:IsActiveType(TYPE_SPELL+TYPE_TRAP) -end diff --git a/script/c60694662.lua b/script/c60694662.lua deleted file mode 100644 index 047957cd4f..0000000000 --- a/script/c60694662.lua +++ /dev/null @@ -1,22 +0,0 @@ ---スケルエンジェル -function c60694662.initial_effect(c) - --flip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(60694662,0)) - e1:SetCategory(CATEGORY_DRAW) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP) - e1:SetTarget(c60694662.target) - e1:SetOperation(c60694662.operation) - c:RegisterEffect(e1) -end -function c60694662.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(1) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c60694662.operation(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end diff --git a/script/c60718396.lua b/script/c60718396.lua deleted file mode 100644 index 67b8afb246..0000000000 --- a/script/c60718396.lua +++ /dev/null @@ -1,38 +0,0 @@ ---フレムベルカウンター -function c60718396.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_CHAINING) - e1:SetCondition(c60718396.condition) - e1:SetCost(c60718396.cost) - e1:SetTarget(c60718396.target) - e1:SetOperation(c60718396.activate) - c:RegisterEffect(e1) -end -function c60718396.condition(e,tp,eg,ep,ev,re,r,rp) - return re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev) -end -function c60718396.cfilter(c) - return c:GetDefence()==200 and c:IsAttribute(ATTRIBUTE_FIRE) and c:IsAbleToRemoveAsCost() -end -function c60718396.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c60718396.cfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c60718396.cfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c60718396.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) - end -end -function c60718396.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateActivation(ev) - if re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(eg,REASON_EFFECT) - end -end diff --git a/script/c60728397.lua b/script/c60728397.lua deleted file mode 100644 index 9099787549..0000000000 --- a/script/c60728397.lua +++ /dev/null @@ -1,42 +0,0 @@ ---ヴェノム・ショット -function c60728397.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOGRAVE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c60728397.condition) - e1:SetTarget(c60728397.target) - e1:SetOperation(c60728397.activate) - c:RegisterEffect(e1) -end -function c60728397.cfilter(c) - local code=c:GetCode() - return c:IsFaceup() and (code==72677437 or code==8062132 or c:IsSetCard(0x50)) -end -function c60728397.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c60728397.cfilter,tp,LOCATION_MZONE,0,1,nil) -end -function c60728397.tgfilter(c) - return c:IsRace(RACE_REPTILE) and c:IsAbleToGrave() -end -function c60728397.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsCanAddCounter(0x9,2) end - if chk==0 then return Duel.IsExistingTarget(Card.IsCanAddCounter,tp,0,LOCATION_MZONE,1,nil,0x9,2) - and Duel.IsExistingMatchingCard(c60728397.tgfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - local g=Duel.SelectTarget(tp,Card.IsCanAddCounter,tp,0,LOCATION_MZONE,1,1,nil,0x9,2) - Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,1,0,0) -end -function c60728397.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c60728397.tgfilter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoGrave(g,REASON_EFFECT) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsCanAddCounter(0x9,2) and g:GetFirst():IsLocation(LOCATION_GRAVE) then - tc:AddCounter(0x9,2) - end - end -end diff --git a/script/c60741115.lua b/script/c60741115.lua deleted file mode 100644 index be038f3c21..0000000000 --- a/script/c60741115.lua +++ /dev/null @@ -1,47 +0,0 @@ ---ダメージ・イーター -function c60741115.initial_effect(c) - -- - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(60741115,0)) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_CHAINING) - e1:SetRange(LOCATION_GRAVE) - e1:SetCondition(c60741115.condition) - e1:SetCost(c60741115.cost) - e1:SetOperation(c60741115.operation) - c:RegisterEffect(e1) -end -function c60741115.condition(e,tp,eg,ep,ev,re,r,rp) - if rp==tp or Duel.GetTurnPlayer()==tp then return false end - local ex,cg,ct,cp,cv=Duel.GetOperationInfo(ev,CATEGORY_DAMAGE) - if ex then return true end - ex,cg,ct,cp,cv=Duel.GetOperationInfo(ev,CATEGORY_RECOVER) - if not ex then return false end - if cp~=PLAYER_ALL then return Duel.IsPlayerAffectedByEffect(cp,EFFECT_REVERSE_RECOVER) - else return Duel.IsPlayerAffectedByEffect(0,EFFECT_REVERSE_RECOVER) - or Duel.IsPlayerAffectedByEffect(1,EFFECT_REVERSE_RECOVER) - end -end -function c60741115.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) -end -function c60741115.operation(e,tp,eg,ep,ev,re,r,rp) - local cid=Duel.GetChainInfo(ev,CHAININFO_CHAIN_ID) - --damage conversion - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EFFECT_REVERSE_DAMAGE) - e1:SetTargetRange(1,1) - e1:SetValue(c60741115.rev) - e1:SetReset(RESET_CHAIN) - e1:SetLabel(cid) - Duel.RegisterEffect(e1,tp) -end -function c60741115.rev(e,re,r,rp,rc) - local cc=Duel.GetCurrentChain() - if cc==0 or bit.band(r,REASON_EFFECT)==0 then return false end - local cid=Duel.GetChainInfo(0,CHAININFO_CHAIN_ID) - return cid==e:GetLabel() -end diff --git a/script/c60743819.lua b/script/c60743819.lua deleted file mode 100644 index f48311ee6b..0000000000 --- a/script/c60743819.lua +++ /dev/null @@ -1,37 +0,0 @@ ---悪魔の嘆き -function c60743819.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TODECK) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c60743819.target) - e1:SetOperation(c60743819.activate) - c:RegisterEffect(e1) -end -function c60743819.filter(c) - return c:IsType(TYPE_MONSTER) and c:IsAbleToDeck() -end -function c60743819.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_GRAVE) and c60743819.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c60743819.filter,tp,0,LOCATION_GRAVE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectTarget(tp,c60743819.filter,tp,0,LOCATION_GRAVE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0) -end -function c60743819.tgfilter(c) - return c:IsRace(RACE_FIEND) and c:IsAbleToGrave() -end -function c60743819.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)~=0 then - local g=Duel.GetMatchingGroup(c60743819.tgfilter,tp,LOCATION_DECK,0,nil) - if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(60743819,0)) then - Duel.BreakEffect() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local sg=g:Select(tp,1,1,nil) - Duel.SendtoGrave(sg,REASON_EFFECT) - end - end -end diff --git a/script/c60764581.lua b/script/c60764581.lua deleted file mode 100644 index b874f7c9b6..0000000000 --- a/script/c60764581.lua +++ /dev/null @@ -1,54 +0,0 @@ ---迷える仔羊 -function c60764581.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c60764581.cost) - e1:SetTarget(c60764581.target) - e1:SetOperation(c60764581.activate) - c:RegisterEffect(e1) -end -function c60764581.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_SUMMON)==0 - and Duel.GetActivityCount(tp,ACTIVITY_FLIPSUMMON)==0 and Duel.GetActivityCount(tp,ACTIVITY_SPSUMMON)==0 end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) - e1:SetTargetRange(1,0) - e1:SetLabelObject(e) - e1:SetTarget(c60764581.sumlimit) - Duel.RegisterEffect(e1,tp) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) - e2:SetCode(EFFECT_CANNOT_SUMMON) - e2:SetReset(RESET_PHASE+PHASE_END) - e2:SetTargetRange(1,0) - Duel.RegisterEffect(e2,tp) - local e3=e2:Clone() - e3:SetCode(EFFECT_CANNOT_FLIP_SUMMON) - Duel.RegisterEffect(e3,tp) -end -function c60764581.sumlimit(e,c,sump,sumtype,sumpos,targetp,se) - return e:GetLabelObject()~=se -end -function c60764581.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>1 - and Duel.IsPlayerCanSpecialSummonMonster(tp,60764582,0,0x4011,0,0,1,RACE_BEAST,ATTRIBUTE_EARTH) end - Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,2,0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,0,0) -end -function c60764581.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)>1 - and Duel.IsPlayerCanSpecialSummonMonster(tp,60764582,0,0x4011,0,0,1,RACE_BEAST,ATTRIBUTE_EARTH) then - for i=1,2 do - local token=Duel.CreateToken(tp,60764581+i) - Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP_DEFENCE) - end - Duel.SpecialSummonComplete() - end -end diff --git a/script/c6077601.lua b/script/c6077601.lua deleted file mode 100644 index 28865afaa4..0000000000 --- a/script/c6077601.lua +++ /dev/null @@ -1,73 +0,0 @@ ---魔玩具融合 -function c6077601.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,6077601+EFFECT_COUNT_CODE_OATH) - e1:SetTarget(c6077601.target) - e1:SetOperation(c6077601.activate) - c:RegisterEffect(e1) -end -function c6077601.filter0(c) - return c:IsCanBeFusionMaterial() and c:IsAbleToRemove() -end -function c6077601.filter1(c,e) - return c:IsCanBeFusionMaterial() and c:IsAbleToRemove() and not c:IsImmuneToEffect(e) -end -function c6077601.filter2(c,e,tp,m,f,chkf) - return c:IsType(TYPE_FUSION) and c:IsSetCard(0xad) and (not f or f(c)) - and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf) -end -function c6077601.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp - local mg1=Duel.GetMatchingGroup(c6077601.filter0,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil) - local res=Duel.IsExistingMatchingCard(c6077601.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf) - if not res then - local ce=Duel.GetChainMaterial(tp) - if ce~=nil then - local fgroup=ce:GetTarget() - local mg2=fgroup(ce,e,tp) - local mf=ce:GetValue() - res=Duel.IsExistingMatchingCard(c6077601.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,chkf) - end - end - return res - end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function c6077601.activate(e,tp,eg,ep,ev,re,r,rp) - local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp - local mg1=Duel.GetMatchingGroup(c6077601.filter1,tp,LOCATION_GRAVE+LOCATION_MZONE,0,nil,e) - local sg1=Duel.GetMatchingGroup(c6077601.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf) - local mg2=nil - local sg2=nil - local ce=Duel.GetChainMaterial(tp) - if ce~=nil then - local fgroup=ce:GetTarget() - mg2=fgroup(ce,e,tp) - local mf=ce:GetValue() - sg2=Duel.GetMatchingGroup(c6077601.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,mf,chkf) - end - if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then - local sg=sg1:Clone() - if sg2 then sg:Merge(sg2) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local tg=sg:Select(tp,1,1,nil) - local tc=tg:GetFirst() - if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then - local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf) - tc:SetMaterial(mat1) - Duel.Remove(mat1,POS_FACEUP,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION) - Duel.BreakEffect() - Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP) - else - local mat2=Duel.SelectFusionMaterial(tp,tc,mg2,nil,chkf) - local fop=ce:GetOperation() - fop(ce,e,tp,tc,mat2) - end - tc:CompleteProcedure() - end -end diff --git a/script/c60800381.lua b/script/c60800381.lua deleted file mode 100644 index 9dc84059b6..0000000000 --- a/script/c60800381.lua +++ /dev/null @@ -1,42 +0,0 @@ ---ジャンク・ウォリアー -function c60800381.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,c60800381.tfilter,aux.NonTuner(nil),1) - c:EnableReviveLimit() - --atkup - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(60800381,0)) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(c60800381.con) - e1:SetOperation(c60800381.op) - c:RegisterEffect(e1) -end -function c60800381.tfilter(c) - return c:IsCode(63977008) or c:IsHasEffect(20932152) -end -function c60800381.con(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_SYNCHRO -end -function c60800381.filter(c) - return c:IsFaceup() and c:IsLevelBelow(2) -end -function c60800381.op(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local g=Duel.GetMatchingGroup(c60800381.filter,tp,LOCATION_MZONE,0,nil) - if g:GetCount()>0 then - local atk=0 - local tc=g:GetFirst() - while tc do - atk=atk+tc:GetAttack() - tc=g:GetNext() - end - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(atk) - e1:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e1) - end -end diff --git a/script/c60806437.lua b/script/c60806437.lua deleted file mode 100644 index ce5ea98335..0000000000 --- a/script/c60806437.lua +++ /dev/null @@ -1,33 +0,0 @@ ---UFOタートル -function c60806437.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(60806437,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetCondition(c60806437.condition) - e1:SetTarget(c60806437.target) - e1:SetOperation(c60806437.operation) - c:RegisterEffect(e1) -end -function c60806437.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsLocation(LOCATION_GRAVE) -end -function c60806437.filter(c,e,tp) - return c:IsAttackBelow(1500) and c:IsAttribute(ATTRIBUTE_FIRE) - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c60806437.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c60806437.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c60806437.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c60806437.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_ATTACK) - end -end diff --git a/script/c60866277.lua b/script/c60866277.lua deleted file mode 100644 index 67d94e6eca..0000000000 --- a/script/c60866277.lua +++ /dev/null @@ -1,29 +0,0 @@ ---地殻変動 -function c60866277.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetHintTiming(0,0x1c0) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c60866277.target) - e1:SetOperation(c60866277.operation) - c:RegisterEffect(e1) -end -function c60866277.filter(c) - return c:IsFaceup() and c:IsDestructable() -end -function c60866277.desfilter(c,att) - return c:IsFaceup() and c:IsDestructable() and c:IsAttribute(att) -end -function c60866277.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c60866277.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end -end -function c60866277.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,562) - local att1=Duel.AnnounceAttribute(tp,2,0xff) - Duel.Hint(HINT_SELECTMSG,1-tp,562) - local att2=Duel.AnnounceAttribute(1-tp,1,att1) - local g=Duel.GetMatchingGroup(c60866277.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,att2) - Duel.Destroy(g,REASON_EFFECT) -end diff --git a/script/c60876124.lua b/script/c60876124.lua deleted file mode 100644 index a0468d8619..0000000000 --- a/script/c60876124.lua +++ /dev/null @@ -1,33 +0,0 @@ ---レア・ヴァリュー -function c60876124.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c60876124.condition) - e1:SetTarget(c60876124.target) - e1:SetOperation(c60876124.activate) - c:RegisterEffect(e1) -end -function c60876124.filter(c) - return c:IsFaceup() and c:IsSetCard(0x1034) -end -function c60876124.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c60876124.filter,tp,LOCATION_SZONE,0,2,nil) -end -function c60876124.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp,2) end - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2) -end -function c60876124.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c60876124.filter,tp,LOCATION_SZONE,0,nil) - if g:GetCount()>0 then - Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_TOGRAVE) - local sg=g:Select(1-tp,1,1,nil) - Duel.SendtoGrave(sg,REASON_EFFECT) - if sg:GetFirst():IsLocation(LOCATION_GRAVE) then - Duel.Draw(tp,2,REASON_EFFECT) - end - end -end diff --git a/script/c60879050.lua b/script/c60879050.lua deleted file mode 100644 index 1d49796877..0000000000 --- a/script/c60879050.lua +++ /dev/null @@ -1,74 +0,0 @@ ---機関連結 -function c60879050.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCost(c60879050.cost) - e1:SetTarget(c60879050.target) - e1:SetOperation(c60879050.operation) - c:RegisterEffect(e1) - --Equip limit - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_EQUIP_LIMIT) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetValue(c60879050.eqlimit) - c:RegisterEffect(e2) - --Atk Change - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_EQUIP) - e3:SetCode(EFFECT_SET_ATTACK) - e3:SetValue(c60879050.value) - c:RegisterEffect(e3) - --Pierce - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_EQUIP) - e4:SetCode(EFFECT_PIERCE) - c:RegisterEffect(e4) - --cannot attack - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_FIELD) - e5:SetCode(EFFECT_CANNOT_ATTACK) - e5:SetProperty(EFFECT_FLAG_OATH) - e5:SetRange(LOCATION_SZONE) - e5:SetTargetRange(LOCATION_MZONE,0) - e5:SetTarget(c60879050.ftarget) - c:RegisterEffect(e5) -end -function c60879050.eqlimit(e,c) - return e:GetHandler():GetEquipTarget()==c and c:IsRace(RACE_MACHINE) and c:IsAttribute(ATTRIBUTE_EARTH) -end -function c60879050.filter(c) - return c:IsFaceup() and c:IsRace(RACE_MACHINE) and c:IsAttribute(ATTRIBUTE_EARTH) -end -function c60879050.rmfilter(c) - return c:IsRace(RACE_MACHINE) and c:IsLevelAbove(10) and c:IsAbleToRemoveAsCost() -end -function c60879050.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c60879050.rmfilter,tp,LOCATION_GRAVE,0,2,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c60879050.rmfilter,tp,LOCATION_GRAVE,0,2,2,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c60879050.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c60879050.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c60879050.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c60879050.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) -end -function c60879050.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,c,tc) - end -end -function c60879050.value(e,c) - return c:GetBaseAttack()*2 -end -function c60879050.ftarget(e,c) - return e:GetHandler():GetEquipTarget()~=c -end diff --git a/script/c60912752.lua b/script/c60912752.lua deleted file mode 100644 index 059df73255..0000000000 --- a/script/c60912752.lua +++ /dev/null @@ -1,20 +0,0 @@ ---異次元の境界線 -function c60912752.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --cannot bp - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_CANNOT_BP) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetTargetRange(1,1) - e2:SetRange(LOCATION_SZONE) - e2:SetCondition(c60912752.bpcon) - c:RegisterEffect(e2) -end -function c60912752.bpcon(e) - return not Duel.IsExistingMatchingCard(Card.IsType,e:GetHandlerPlayer(),LOCATION_GRAVE,0,1,nil,TYPE_SPELL) -end diff --git a/script/c60930169.lua b/script/c60930169.lua deleted file mode 100644 index de1b2dfb46..0000000000 --- a/script/c60930169.lua +++ /dev/null @@ -1,57 +0,0 @@ ---ブロークン・ブロッカー -function c60930169.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetCondition(c60930169.condition) - e1:SetTarget(c60930169.target) - e1:SetOperation(c60930169.activate) - c:RegisterEffect(e1) - if not c60930169.global_check then - c60930169.global_check=true - local ge1=Effect.CreateEffect(c) - ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - ge1:SetCode(EVENT_BATTLED) - ge1:SetOperation(c60930169.checkop) - Duel.RegisterEffect(ge1,0) - end -end -function c60930169.checkop(e,tp,eg,ep,ev,re,r,rp) - local a=Duel.GetAttacker() - local t=Duel.GetAttackTarget() - if a and a:IsDefencePos() and a:GetDefence()>a:GetAttack() and a:IsStatus(STATUS_BATTLE_DESTROYED) then - a:RegisterFlagEffect(60930169,RESET_PHASE+PHASE_DAMAGE,0,1) - end - if t and t:IsDefencePos() and t:GetDefence()>t:GetAttack() and t:IsStatus(STATUS_BATTLE_DESTROYED) then - t:RegisterFlagEffect(60930169,RESET_PHASE+PHASE_DAMAGE,0,1) - end -end -function c60930169.filter(c,e,tp) - if c:GetFlagEffect(60930169)~=0 and c:GetPreviousControler()==tp then - e:SetLabel(c:GetCode()) - return true - else return false end -end -function c60930169.condition(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c60930169.filter,1,nil,e,tp) -end -function c60930169.spfilter(c,e,tp,code) - return c:IsCode(code) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c60930169.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c60930169.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp,e:GetLabel()) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c60930169.activate(e,tp,eg,ep,ev,re,r,rp) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ft<=0 then return end - if ft>2 then ft=2 end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c60930169.spfilter,tp,LOCATION_DECK,0,1,ft,nil,e,tp,e:GetLabel()) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENCE) - end -end diff --git a/script/c60946968.lua b/script/c60946968.lua deleted file mode 100644 index 44656aa7e0..0000000000 --- a/script/c60946968.lua +++ /dev/null @@ -1,33 +0,0 @@ ---異界空間-Aゾーン -function c60946968.initial_effect(c) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --atk def - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_DAMAGE_CALCULATING) - e2:SetRange(LOCATION_SZONE) - e2:SetOperation(c60946968.adval) - c:RegisterEffect(e2) -end -function c60946968.addown(c,e) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_PHASE+RESET_DAMAGE_CAL) - e1:SetValue(-300) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_UPDATE_DEFENCE) - c:RegisterEffect(e2) -end -function c60946968.adval(e,tp,eg,ep,ev,re,r,rp) - local a=Duel.GetAttacker() - local d=Duel.GetAttackTarget() - if not d then return end - if a:IsControler(1-tp) and d:IsSetCard(0xc) then c60946968.addown(a,e) end - if d:IsControler(1-tp) and a:IsSetCard(0xc) then c60946968.addown(d,e) end -end diff --git a/script/c60950180.lua b/script/c60950180.lua deleted file mode 100644 index 9eb4bb111c..0000000000 --- a/script/c60950180.lua +++ /dev/null @@ -1,76 +0,0 @@ ---RR-インペイル・レイニアス -function c60950180.initial_effect(c) - --pos - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(60950180,0)) - e1:SetCategory(CATEGORY_POSITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCondition(c60950180.poscon) - e1:SetTarget(c60950180.postg) - e1:SetOperation(c60950180.posop) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(60950180,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,60950180) - e2:SetCondition(c60950180.spcon) - e2:SetTarget(c60950180.sptg) - e2:SetOperation(c60950180.spop) - c:RegisterEffect(e2) - if not c60950180.global_check then - c60950180.global_check=true - local ge1=Effect.CreateEffect(c) - ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - ge1:SetCode(EVENT_SUMMON_SUCCESS) - ge1:SetLabel(60950180) - ge1:SetOperation(aux.sumreg) - Duel.RegisterEffect(ge1,0) - local ge2=ge1:Clone() - ge2:SetCode(EVENT_SPSUMMON_SUCCESS) - ge2:SetLabel(60950180) - Duel.RegisterEffect(ge2,0) - end -end -function c60950180.poscon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetFlagEffect(60950180)>0 -end -function c60950180.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsPosition(POS_FACEUP_ATTACK) end - if chk==0 then return Duel.IsExistingTarget(Card.IsPosition,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,POS_FACEUP_ATTACK) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE) - local g=Duel.SelectTarget(tp,Card.IsPosition,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,POS_FACEUP_ATTACK) - Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0) -end -function c60950180.posop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.ChangePosition(tc,POS_FACEUP_DEFENCE) - end -end -function c60950180.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetAttackedCount()>0 and Duel.GetCurrentPhase()==PHASE_MAIN2 -end -function c60950180.spfilter(c,e,tp) - return c:IsSetCard(0xba) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c60950180.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c60950180.spfilter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c60950180.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c60950180.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c60950180.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c60953118.lua b/script/c60953118.lua deleted file mode 100644 index 69b4d1e378..0000000000 --- a/script/c60953118.lua +++ /dev/null @@ -1,90 +0,0 @@ ---アルカナフォースXIV-TEMPERANCE -function c60953118.initial_effect(c) - --no damage - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(60953118,1)) - e1:SetType(EFFECT_TYPE_QUICK_O+EFFECT_TYPE_FIELD) - e1:SetRange(LOCATION_HAND) - e1:SetCode(EVENT_PRE_DAMAGE_CALCULATE) - e1:SetCondition(c60953118.damcon) - e1:SetCost(c60953118.damcost) - e1:SetOperation(c60953118.damop) - c:RegisterEffect(e1) - --coin - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(60953118,0)) - e2:SetCategory(CATEGORY_COIN) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_SUMMON_SUCCESS) - e2:SetTarget(c60953118.cointg) - e2:SetOperation(c60953118.coinop) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e3) - local e4=e2:Clone() - e4:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - c:RegisterEffect(e4) -end -function c60953118.damcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetBattleDamage(tp)>0 -end -function c60953118.damcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end -function c60953118.damop(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PRE_BATTLE_DAMAGE) - e1:SetOperation(c60953118.dop) - e1:SetReset(RESET_PHASE+PHASE_DAMAGE) - Duel.RegisterEffect(e1,tp) -end -function c60953118.dop(e,tp,eg,ep,ev,re,r,rp) - Duel.ChangeBattleDamage(tp,0) -end -function c60953118.cointg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_COIN,nil,0,tp,1) -end -function c60953118.coinop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) or c:IsFacedown() then return end - local res=0 - if c:IsHasEffect(73206827) then - res=1-Duel.SelectOption(tp,60,61) - else res=Duel.TossCoin(tp,1) end - c60953118.arcanareg(c,res) -end -function c60953118.arcanareg(c,coin) - --coin effect - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_AVAILABLE_BD) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(1,0) - e1:SetCode(EFFECT_CHANGE_DAMAGE) - e1:SetCondition(c60953118.rdcon1) - e1:SetValue(c60953118.rdval) - e1:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetTargetRange(0,1) - e2:SetCondition(c60953118.rdcon2) - c:RegisterEffect(e2) - c:RegisterFlagEffect(36690018,RESET_EVENT+0x1ff0000,EFFECT_FLAG_CLIENT_HINT,1,coin,63-coin) -end -function c60953118.rdcon1(e) - return e:GetHandler():GetFlagEffectLabel(36690018)==1 -end -function c60953118.rdcon2(e) - return e:GetHandler():GetFlagEffectLabel(36690018)==0 -end -function c60953118.rdval(e,re,val,r,rp,rc) - if bit.band(r,REASON_BATTLE)~=0 then - return val/2 - else - return val - end -end diff --git a/script/c60953949.lua b/script/c60953949.lua deleted file mode 100644 index e62682c439..0000000000 --- a/script/c60953949.lua +++ /dev/null @@ -1,35 +0,0 @@ ---古代の機械箱 -function c60953949.initial_effect(c) - --tohand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(60953949,0)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_TO_HAND) - e1:SetCountLimit(1,60953949) - e1:SetCondition(c60953949.thcon) - e1:SetTarget(c60953949.thtg) - e1:SetOperation(c60953949.thop) - c:RegisterEffect(e1) -end -function c60953949.thcon(e,tp,eg,ep,ev,re,r,rp) - return not e:GetHandler():IsReason(REASON_DRAW) - and e:GetHandler():IsPreviousLocation(LOCATION_DECK+LOCATION_GRAVE) -end -function c60953949.filter(c) - return (c:GetAttack()==500 or c:GetDefence()==500) and c:GetCode()~=60953949 - and c:IsRace(RACE_MACHINE) and c:IsAttribute(ATTRIBUTE_EARTH) and c:IsAbleToHand() -end -function c60953949.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c60953949.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c60953949.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c60953949.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c60990740.lua b/script/c60990740.lua deleted file mode 100644 index 593194ded8..0000000000 --- a/script/c60990740.lua +++ /dev/null @@ -1,58 +0,0 @@ ---絶対王 バック・ジャック -function c60990740.initial_effect(c) - --sset - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetRange(LOCATION_GRAVE) - e1:SetCountLimit(1,60990740) - e1:SetCondition(c60990740.condition) - e1:SetCost(c60990740.cost) - e1:SetTarget(c60990740.target) - e1:SetOperation(c60990740.operation) - c:RegisterEffect(e1) - --sort - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e2:SetCountLimit(1,60990741) - e2:SetTarget(c60990740.sdtg) - e2:SetOperation(c60990740.sdop) - c:RegisterEffect(e2) -end -function c60990740.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp -end -function c60990740.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) -end -function c60990740.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,1) - and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and not Duel.IsPlayerAffectedByEffect(tp,EFFECT_CANNOT_SSET) end -end -function c60990740.operation(e,tp,eg,ep,ev,re,r,rp) - if not Duel.IsPlayerCanDiscardDeck(tp,1) then return end - Duel.ConfirmDecktop(tp,1) - local tc=Duel.GetDecktopGroup(tp,1):GetFirst() - Duel.DisableShuffleCheck() - if tc:GetType()==TYPE_TRAP and tc:IsSSetable() then - Duel.SSet(tp,tc) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN) - e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - else - Duel.SendtoGrave(tc,REASON_EFFECT+REASON_REVEAL) - end -end -function c60990740.sdtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)>2 end -end -function c60990740.sdop(e,tp,eg,ep,ev,re,r,rp) - Duel.SortDecktop(tp,tp,3) -end diff --git a/script/c60992105.lua b/script/c60992105.lua deleted file mode 100644 index ae347f2100..0000000000 --- a/script/c60992105.lua +++ /dev/null @@ -1,48 +0,0 @@ ---玄翼竜 ブラック・フェザー -function c60992105.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1) - c:EnableReviveLimit() - --atk - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(60992105,0)) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EVENT_DAMAGE) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e1:SetCountLimit(1) - e1:SetCondition(c60992105.condition) - e1:SetTarget(c60992105.target) - e1:SetOperation(c60992105.operation) - c:RegisterEffect(e1) -end -function c60992105.condition(e,tp,eg,ep,ev,re,r,rp) - return ep==tp -end -function c60992105.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,1) end - Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,1) -end -function c60992105.filter(c) - return c:IsLocation(LOCATION_GRAVE) and c:IsType(TYPE_MONSTER) -end -function c60992105.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local ct=Duel.GetFieldGroupCount(tp,LOCATION_DECK,0) - if ct==0 then return end - if ct>5 then ct=5 end - local t={} - for i=1,ct do t[i]=i end - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(60992105,1)) - local ac=Duel.AnnounceNumber(tp,table.unpack(t)) - Duel.DiscardDeck(tp,ac,REASON_EFFECT) - local g=Duel.GetOperatedGroup() - if g:IsExists(c60992105.filter,1,nil) and c:IsFaceup() and c:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(400) - e1:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e1) - end -end diff --git a/script/c60992364.lua b/script/c60992364.lua deleted file mode 100644 index d79521da87..0000000000 --- a/script/c60992364.lua +++ /dev/null @@ -1,129 +0,0 @@ ---ZW-獣王獅子武装 -function c60992364.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,5,2) - c:EnableReviveLimit() - -- - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_DIRECT_ATTACK) - c:RegisterEffect(e1) - --search - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e2:SetDescription(aux.Stringid(60992364,0)) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetCountLimit(1) - e2:SetRange(LOCATION_MZONE) - e2:SetCost(c60992364.cost) - e2:SetTarget(c60992364.target) - e2:SetOperation(c60992364.operation) - c:RegisterEffect(e2) - --equip - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(60992364,1)) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetCategory(CATEGORY_EQUIP) - e3:SetRange(LOCATION_MZONE) - e3:SetTarget(c60992364.eqtg) - e3:SetOperation(c60992364.eqop) - c:RegisterEffect(e3) - -- - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(60992364,2)) - e4:SetType(EFFECT_TYPE_QUICK_O) - e4:SetCode(EVENT_FREE_CHAIN) - e4:SetRange(LOCATION_SZONE) - e4:SetCondition(c60992364.atcon) - e4:SetCost(c60992364.atcost) - e4:SetTarget(c60992364.attg) - e4:SetOperation(c60992364.atop) - c:RegisterEffect(e4) -end -function c60992364.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c60992364.thfilter(c) - return c:IsSetCard(0x7e) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() -end -function c60992364.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c60992364.thfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c60992364.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c60992364.thfilter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end -function c60992364.filter(c) - return c:IsFaceup() and c:IsSetCard(0x7f) -end -function c60992364.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c60992364.filter(chkc) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingTarget(c60992364.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c60992364.filter,tp,LOCATION_MZONE,0,1,1,nil) -end -function c60992364.eqop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) or c:IsFacedown() then return end - local tc=Duel.GetFirstTarget() - if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or tc:GetControler()~=tp or tc:IsFacedown() or not tc:IsRelateToEffect(e) then - Duel.SendtoGrave(c,REASON_EFFECT) - return - end - Duel.Equip(tp,c,tc,true) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(c60992364.eqlimit) - e1:SetLabelObject(tc) - c:RegisterEffect(e1) - --atkup - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(3000) - e2:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e2) -end -function c60992364.eqlimit(e,c) - return c==e:GetLabelObject() -end -function c60992364.atcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp and Duel.GetCurrentPhase()==PHASE_BATTLE and Duel.GetCurrentChain()==0 -end -function c60992364.atcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - e:SetLabelObject(e:GetHandler():GetEquipTarget()) - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end -function c60992364.attg(e,tp,eg,ep,ev,re,r,rp,chk) - local eqc=e:GetHandler():GetEquipTarget() - if chk==0 then return eqc and eqc:GetAttackedCount()==1 and eqc:GetEffectCount(EFFECT_EXTRA_ATTACK)==0 end - Duel.SetTargetCard(e:GetLabelObject()) -end -function c60992364.atop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_EXTRA_ATTACK) - e1:SetValue(1) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_CANNOT_DIRECT_ATTACK) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e2) - end -end diff --git a/script/c60999392.lua b/script/c60999392.lua deleted file mode 100644 index 3af0d8c850..0000000000 --- a/script/c60999392.lua +++ /dev/null @@ -1,32 +0,0 @@ ---マシンナーズ・ソルジャー -function c60999392.initial_effect(c) - --summon success - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(60999392,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetCondition(c60999392.sumcon) - e1:SetTarget(c60999392.sumtg) - e1:SetOperation(c60999392.sumop) - c:RegisterEffect(e1) -end -function c60999392.sumcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==1 -end -function c60999392.filter(c,e,tp) - return c:IsSetCard(0x36) and c:GetCode()~=60999392 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c60999392.sumtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c60999392.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c60999392.sumop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c60999392.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c61011311.lua b/script/c61011311.lua deleted file mode 100644 index fee332e2aa..0000000000 --- a/script/c61011311.lua +++ /dev/null @@ -1,60 +0,0 @@ ---巻きすぎた発条 -function c61011311.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c61011311.target) - e1:SetOperation(c61011311.activate) - c:RegisterEffect(e1) -end -function c61011311.filter(c,e,tp) - return c:IsSetCard(0x58) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c61011311.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c61011311.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c61011311.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c61011311.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c61011311.activate(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP_DEFENCE) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1,true) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e2,true) - --cannot release - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e3:SetRange(LOCATION_MZONE) - e3:SetCode(EFFECT_UNRELEASABLE_SUM) - e3:SetValue(1) - e3:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e3,true) - local e4=e3:Clone() - e4:SetCode(EFFECT_UNRELEASABLE_NONSUM) - tc:RegisterEffect(e4,true) - --unsynchroable - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_SINGLE) - e5:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL) - e5:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e5:SetValue(1) - e5:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e5,true) - Duel.SpecialSummonComplete() - end -end diff --git a/script/c61019812.lua b/script/c61019812.lua deleted file mode 100644 index 0b9e2243f1..0000000000 --- a/script/c61019812.lua +++ /dev/null @@ -1,52 +0,0 @@ ---レッド・ダストン -function c61019812.initial_effect(c) - c:SetUniqueOnField(1,0,61019812) - --cannot release - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_UNRELEASABLE_SUM) - e1:SetValue(1) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_UNRELEASABLE_NONSUM) - c:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e3:SetCode(EFFECT_CANNOT_BE_FUSION_MATERIAL) - e3:SetValue(1) - c:RegisterEffect(e3) - local e4=e3:Clone() - e4:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL) - c:RegisterEffect(e4) - local e5=e3:Clone() - e5:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL) - c:RegisterEffect(e5) - --damage - local e6=Effect.CreateEffect(c) - e6:SetDescription(aux.Stringid(61019812,0)) - e6:SetCategory(CATEGORY_DAMAGE) - e6:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e6:SetCode(EVENT_DESTROYED) - e6:SetCondition(c61019812.dmcon) - e6:SetTarget(c61019812.dmtg) - e6:SetOperation(c61019812.dmop) - c:RegisterEffect(e6) -end -function c61019812.dmcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsReason(REASON_DESTROY) and c:IsPreviousLocation(LOCATION_ONFIELD) -end -function c61019812.dmtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local c=e:GetHandler() - Duel.SetTargetPlayer(c:GetPreviousControler()) - Duel.SetTargetParam(500) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,c:GetPreviousControler(),500) -end -function c61019812.dmop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c61032879.lua b/script/c61032879.lua deleted file mode 100644 index 7cca2c45cb..0000000000 --- a/script/c61032879.lua +++ /dev/null @@ -1,34 +0,0 @@ ---コモンメンタルワールド -function c61032879.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --damage - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(61032879,0)) - e2:SetCategory(CATEGORY_DAMAGE) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetRange(LOCATION_SZONE) - e2:SetCondition(c61032879.condition) - e2:SetTarget(c61032879.target) - e2:SetOperation(c61032879.operation) - c:RegisterEffect(e2) -end -function c61032879.condition(e,tp,eg,ep,ev,re,r,rp) - return eg:GetFirst():GetSummonType()==SUMMON_TYPE_SYNCHRO and eg:GetFirst():IsControler(tp) -end -function c61032879.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(500) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,0,0,1-tp,500) -end -function c61032879.operation(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) - end -end diff --git a/script/c6103294.lua b/script/c6103294.lua deleted file mode 100644 index c70fb88cfb..0000000000 --- a/script/c6103294.lua +++ /dev/null @@ -1,37 +0,0 @@ ---オアシスの使者 -function c6103294.initial_effect(c) - --atk target - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_CANNOT_BE_BATTLE_TARGET) - e1:SetCondition(c6103294.atkcon) - e1:SetValue(aux.imval1) - c:RegisterEffect(e1) - -- - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetRange(LOCATION_MZONE) - e2:SetTargetRange(LOCATION_MZONE,0) - e2:SetCode(EFFECT_AVOID_BATTLE_DAMAGE) - e2:SetTarget(c6103294.cfilter2) - e2:SetValue(1) - c:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetRange(LOCATION_MZONE) - e3:SetTargetRange(0,LOCATION_MZONE) - e3:SetCode(EFFECT_NO_BATTLE_DAMAGE) - e3:SetTarget(c6103294.cfilter2) - c:RegisterEffect(e3) -end -function c6103294.cfilter1(c) - return c:IsFaceup() and c:IsType(TYPE_NORMAL) and c:IsLevelBelow(3) -end -function c6103294.cfilter2(e,c) - return c:IsType(TYPE_NORMAL) and c:IsLevelBelow(3) -end -function c6103294.atkcon(e) - return Duel.IsExistingMatchingCard(c6103294.cfilter1,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) -end diff --git a/script/c61044390.lua b/script/c61044390.lua deleted file mode 100644 index 50efe46080..0000000000 --- a/script/c61044390.lua +++ /dev/null @@ -1,24 +0,0 @@ ---カオス・エンド -function c61044390.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c61044390.condition) - e1:SetTarget(c61044390.target) - e1:SetOperation(c61044390.activate) - c:RegisterEffect(e1) -end -function c61044390.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetFieldGroupCount(tp,LOCATION_REMOVED,0)>=7 -end -function c61044390.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDestructable,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c61044390.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - Duel.Destroy(g,REASON_EFFECT) -end diff --git a/script/c61049315.lua b/script/c61049315.lua deleted file mode 100644 index f45a84c98b..0000000000 --- a/script/c61049315.lua +++ /dev/null @@ -1,39 +0,0 @@ ---ナチュル・ローズウィップ -function c61049315.initial_effect(c) - --activate limit - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e1:SetCode(EVENT_CHAINING) - e1:SetRange(LOCATION_MZONE) - e1:SetOperation(c61049315.aclimit1) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e2:SetCode(EVENT_CHAIN_NEGATED) - e2:SetRange(LOCATION_MZONE) - e2:SetOperation(c61049315.aclimit2) - c:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetCode(EFFECT_CANNOT_ACTIVATE) - e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e3:SetRange(LOCATION_MZONE) - e3:SetTargetRange(0,1) - e3:SetCondition(c61049315.econ) - e3:SetValue(c61049315.elimit) - c:RegisterEffect(e3) -end -function c61049315.aclimit1(e,tp,eg,ep,ev,re,r,rp) - if ep==tp or not re:IsHasType(EFFECT_TYPE_ACTIVATE) then return end - e:GetHandler():RegisterFlagEffect(61049315,RESET_EVENT+0x3ff0000+RESET_PHASE+PHASE_END,0,1) -end -function c61049315.aclimit2(e,tp,eg,ep,ev,re,r,rp) - if ep==tp or not re:IsHasType(EFFECT_TYPE_ACTIVATE) then return end - e:GetHandler():ResetFlagEffect(61049315) -end -function c61049315.econ(e) - return e:GetHandler():GetFlagEffect(61049315)~=0 -end -function c61049315.elimit(e,te,tp) - return te:IsHasType(EFFECT_TYPE_ACTIVATE) -end diff --git a/script/c6104968.lua b/script/c6104968.lua deleted file mode 100644 index 82b34991a1..0000000000 --- a/script/c6104968.lua +++ /dev/null @@ -1,28 +0,0 @@ ---デスハムスター -function c6104968.initial_effect(c) - --flip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(6104968,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DELAY) - e1:SetTarget(c6104968.target) - e1:SetOperation(c6104968.operation) - c:RegisterEffect(e1) -end -function c6104968.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c6104968.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c6104968.filter(c,e,tp) - return c:IsCode(6104968) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN) -end -function c6104968.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local tc=Duel.GetFirstMatchingCard(c6104968.filter,tp,LOCATION_DECK,0,nil,e,tp) - if tc then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEDOWN_DEFENCE) - Duel.ConfirmCards(1-tp,tc) - end -end diff --git a/script/c61068510.lua b/script/c61068510.lua deleted file mode 100644 index e6ef8d37a0..0000000000 --- a/script/c61068510.lua +++ /dev/null @@ -1,36 +0,0 @@ ---トルネード -function c61068510.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetHintTiming(0,TIMING_END_PHASE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c61068510.condition) - e1:SetTarget(c61068510.target) - e1:SetOperation(c61068510.activate) - c:RegisterEffect(e1) -end -function c61068510.cfilter(c) - return c:GetSequence()<5 -end -function c61068510.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c61068510.cfilter,tp,0,LOCATION_SZONE,3,nil) -end -function c61068510.filter(c) - return c:IsDestructable() and c:GetSequence()<5 -end -function c61068510.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_SZONE) and chkc:IsControler(1-tp) and c61068510.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c61068510.filter,tp,0,LOCATION_SZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c61068510.filter,tp,0,LOCATION_SZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c61068510.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c6112401.lua b/script/c6112401.lua deleted file mode 100644 index 57825321e3..0000000000 --- a/script/c6112401.lua +++ /dev/null @@ -1,80 +0,0 @@ ---身剣一体 -function c6112401.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCondition(c6112401.condition) - e1:SetTarget(c6112401.target) - e1:SetOperation(c6112401.operation) - c:RegisterEffect(e1) -end -function c6112401.condition(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetCurrentPhase()==PHASE_DAMAGE and Duel.IsDamageCalculated() then return false end - local g=Duel.GetFieldGroup(tp,LOCATION_MZONE,0) - local tc=g:GetFirst() - e:SetLabelObject(tc) - return g:GetCount()==1 and tc:IsFaceup() and tc:IsSetCard(0x100d) -end -function c6112401.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - if chk==0 then return e:GetLabelObject():IsCanBeEffectTarget(e) end - Duel.SetTargetCard(e:GetLabelObject()) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c6112401.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsLocation(LOCATION_SZONE) then return end - local tc=e:GetLabelObject() - if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,c,tc) - c:CancelToGrave() - --draw - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetCategory(CATEGORY_DRAW) - e1:SetDescription(aux.Stringid(6112401,0)) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_BATTLE_DESTROYING) - e1:SetRange(LOCATION_SZONE) - e1:SetCondition(c6112401.drcon) - e1:SetTarget(c6112401.drtg) - e1:SetOperation(c6112401.drop) - e1:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e1) - --Atkup - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetReset(RESET_EVENT+0x1fe0000) - e2:SetValue(800) - c:RegisterEffect(e2) - --Equip limit - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_EQUIP_LIMIT) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e3:SetValue(c6112401.eqlimit) - e3:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e3) - end -end -function c6112401.eqlimit(e,c) - return c:IsSetCard(0x100d) -end -function c6112401.drcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsContains(e:GetHandler():GetEquipTarget()) -end -function c6112401.drtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(1) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c6112401.drop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end diff --git a/script/c61127349.lua b/script/c61127349.lua deleted file mode 100644 index 9bca506f77..0000000000 --- a/script/c61127349.lua +++ /dev/null @@ -1,57 +0,0 @@ ---ビッグバン・シュート -function c61127349.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c61127349.target) - e1:SetOperation(c61127349.operation) - c:RegisterEffect(e1) - --Atk down - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(400) - c:RegisterEffect(e2) - --Pierce - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_EQUIP) - e3:SetCode(EFFECT_PIERCE) - c:RegisterEffect(e3) - --Equip limit - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetCode(EFFECT_EQUIP_LIMIT) - e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e4:SetValue(1) - c:RegisterEffect(e4) - --Remove - local e5=Effect.CreateEffect(c) - e5:SetDescription(aux.Stringid(61127349,0)) - e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e5:SetCode(EVENT_LEAVE_FIELD) - e5:SetOperation(c61127349.rmop) - c:RegisterEffect(e5) -end -function c61127349.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) -end -function c61127349.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,c,tc) - end -end -function c61127349.rmop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=e:GetHandler():GetEquipTarget() - if tc then - Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) - end -end diff --git a/script/c61132951.lua b/script/c61132951.lua deleted file mode 100644 index 73672b7a28..0000000000 --- a/script/c61132951.lua +++ /dev/null @@ -1,24 +0,0 @@ ---H・C 夜襲のカンテラ -function c61132951.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(61132951,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_BATTLE_CONFIRM) - e1:SetTarget(c61132951.destg) - e1:SetOperation(c61132951.desop) - c:RegisterEffect(e1) -end -function c61132951.destg(e,tp,eg,ep,ev,re,r,rp,chk) - local d=Duel.GetAttackTarget() - if chk==0 then return Duel.GetAttacker()==e:GetHandler() - and d and d:IsDefencePos() and d:IsDestructable() end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,d,1,0,0) -end -function c61132951.desop(e,tp,eg,ep,ev,re,r,rp) - local d=Duel.GetAttackTarget() - if d~=nil and d:IsRelateToBattle() and d:IsDefencePos() then - Duel.Destroy(d,REASON_EFFECT) - end -end diff --git a/script/c61156777.lua b/script/c61156777.lua deleted file mode 100644 index bc9930f35c..0000000000 --- a/script/c61156777.lua +++ /dev/null @@ -1,63 +0,0 @@ ---BOXサー -function c61156777.initial_effect(c) - --Add counter - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(61156777,0)) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_BATTLE_DESTROYING) - e1:SetCondition(aux.bdogcon) - e1:SetOperation(c61156777.ctop) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(61156777,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCost(c61156777.spcost) - e2:SetTarget(c61156777.sptg) - e2:SetOperation(c61156777.spop) - c:RegisterEffect(e2) - --destroy replace - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE) - e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e3:SetRange(LOCATION_MZONE) - e3:SetCode(EFFECT_DESTROY_REPLACE) - e3:SetTarget(c61156777.reptg) - e3:SetOperation(c61156777.repop) - c:RegisterEffect(e3) -end -function c61156777.ctop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFaceup() and c:IsRelateToEffect(e) then - c:AddCounter(0x34,1) - end -end -function c61156777.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() and e:GetHandler():GetCounter(0x34)>1 end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end -function c61156777.filter(c,e,tp) - return c:IsAttribute(ATTRIBUTE_EARTH) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c61156777.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsExistingMatchingCard(c61156777.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c61156777.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c61156777.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end -function c61156777.reptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsCanRemoveCounter(tp,0x34,1,REASON_EFFECT) end - return Duel.SelectYesNo(tp,aux.Stringid(61156777,2)) -end -function c61156777.repop(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():RemoveCounter(tp,0x34,1,REASON_EFFECT) -end diff --git a/script/c61166988.lua b/script/c61166988.lua deleted file mode 100644 index 8233aa17a1..0000000000 --- a/script/c61166988.lua +++ /dev/null @@ -1,43 +0,0 @@ ---野性解放 -function c61166988.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c61166988.target) - e1:SetOperation(c61166988.activate) - c:RegisterEffect(e1) -end -function c61166988.filter(c) - return c:IsFaceup() and c:IsRace(RACE_BEAST+RACE_BEASTWARRIOR) -end -function c61166988.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c61166988.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c61166988.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c61166988.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) -end -function c61166988.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsFaceup() then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - e1:SetValue(tc:GetDefence()) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_PHASE+PHASE_END) - e2:SetRange(LOCATION_MZONE) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - e2:SetCountLimit(1) - e2:SetOperation(c61166988.desop) - tc:RegisterEffect(e2) - end -end -function c61166988.desop(e,tp,eg,ep,ev,re,r,rp) - Duel.Destroy(e:GetHandler(),REASON_EFFECT) -end diff --git a/script/c61173621.lua b/script/c61173621.lua deleted file mode 100644 index de6b3447c4..0000000000 --- a/script/c61173621.lua +++ /dev/null @@ -1,58 +0,0 @@ ---エッジインプ・チェーン -function c61173621.initial_effect(c) - --search - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(61173621,0)) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetCountLimit(1,61173621) - e1:SetTarget(c61173621.target) - e1:SetOperation(c61173621.operation) - c:RegisterEffect(e1) - --tohand - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(61173621,1)) - e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetCountLimit(1,61173621) - e2:SetCondition(c61173621.thcon) - e2:SetTarget(c61173621.thtg) - e2:SetOperation(c61173621.thop) - c:RegisterEffect(e2) -end -function c61173621.filter(c) - return c:IsCode(61173621) and c:IsAbleToHand() -end -function c61173621.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c61173621.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c61173621.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local tc=Duel.GetFirstMatchingCard(c61173621.filter,tp,LOCATION_DECK,0,nil) - if tc then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end -function c61173621.thcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_HAND+LOCATION_ONFIELD) -end -function c61173621.thfilter(c) - return c:IsSetCard(0xad) and c:IsAbleToHand() -end -function c61173621.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c61173621.thfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c61173621.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c61173621.thfilter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c61175706.lua b/script/c61175706.lua deleted file mode 100644 index 62b1f1e292..0000000000 --- a/script/c61175706.lua +++ /dev/null @@ -1,53 +0,0 @@ ---アルカナフォースIV-THE EMPEROR -function c61175706.initial_effect(c) - --coin - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(61175706,0)) - e1:SetCategory(CATEGORY_COIN) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c61175706.cointg) - e1:SetOperation(c61175706.coinop) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e2) - local e3=e1:Clone() - e3:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - c:RegisterEffect(e3) -end -function c61175706.cointg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_COIN,nil,0,tp,1) -end -function c61175706.coinop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) or c:IsFacedown() then return end - local res=0 - if c:IsHasEffect(73206827) then - res=1-Duel.SelectOption(tp,60,61) - else res=Duel.TossCoin(tp,1) end - c61175706.arcanareg(c,res) -end -function c61175706.arcanareg(c,coin) - --coin effect - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetTarget(c61175706.atktg) - e1:SetValue(c61175706.atkval) - e1:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e1) - -- - c:RegisterFlagEffect(36690018,RESET_EVENT+0x1ff0000,EFFECT_FLAG_CLIENT_HINT,1,coin,63-coin) -end -function c61175706.atktg(e,c) - return c:IsSetCard(0x5) -end -function c61175706.atkval(e,c) - if e:GetHandler():GetFlagEffectLabel(36690018)==1 then - return 500 - else return -500 end -end diff --git a/script/c61181383.lua b/script/c61181383.lua deleted file mode 100644 index 7aa8edea28..0000000000 --- a/script/c61181383.lua +++ /dev/null @@ -1,34 +0,0 @@ ---充電器 -function c61181383.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c61181383.cost) - e1:SetTarget(c61181383.target) - e1:SetOperation(c61181383.activate) - c:RegisterEffect(e1) -end -function c61181383.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,500) end - Duel.PayLPCost(tp,500) -end -function c61181383.filter(c,e,tp) - return c:IsSetCard(0x28) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c61181383.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c61181383.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c61181383.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c61181383.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c61181383.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c61204971.lua b/script/c61204971.lua deleted file mode 100644 index a939b33485..0000000000 --- a/script/c61204971.lua +++ /dev/null @@ -1,47 +0,0 @@ ---E・HERO サンダー・ジャイアント -function c61204971.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcCode2(c,20721928,84327329,true,true) - --spsummon condition - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(aux.fuslimit) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(61204971,0)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCost(c61204971.descost) - e2:SetTarget(c61204971.destg) - e2:SetOperation(c61204971.desop) - c:RegisterEffect(e2) -end -function c61204971.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) -end -function c61204971.filter(c,atk) - return c:IsFaceup() and c:GetBaseAttack()=(SUMMON_TYPE_SPECIAL+100) and st<(SUMMON_TYPE_SPECIAL+150) -end -function c612115.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(1-tp) and chkc:IsAbleToRemove() end - if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,0) -end -function c612115.rmop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) - end -end -function c612115.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetBattledGroupCount()>0 -end -function c612115.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToDeckAsCost() end - Duel.SendtoDeck(c,nil,2,REASON_COST) -end -function c612115.filter(c,e,tp) - return not c:IsCode(612115) and c:IsSetCard(0x19) and c:IsCanBeSpecialSummoned(e,109,tp,false,false) -end -function c612115.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsExistingMatchingCard(c612115.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c612115.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c612115.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - local tc=g:GetFirst() - if tc then - Duel.SpecialSummon(tc,109,tp,tp,false,false,POS_FACEUP) - tc:RegisterFlagEffect(tc:GetOriginalCode(),RESET_EVENT+0x1ff0000,0,0) - end -end diff --git a/script/c61231400.lua b/script/c61231400.lua deleted file mode 100644 index d7a25d54bd..0000000000 --- a/script/c61231400.lua +++ /dev/null @@ -1,53 +0,0 @@ ---炎神機-紫龍 -function c61231400.initial_effect(c) - --summon with 1 tribute - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(61231400,0)) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SUMMON_PROC) - e1:SetCondition(c61231400.otcon) - e1:SetOperation(c61231400.otop) - e1:SetValue(SUMMON_TYPE_ADVANCE) - c:RegisterEffect(e1) - --pierce - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_PIERCE) - c:RegisterEffect(e2) -end -function c61231400.otcon(e,c) - if c==nil then return true end - return c:GetLevel()>6 and Duel.GetTributeCount(c)>0 -end -function c61231400.otop(e,tp,eg,ep,ev,re,r,rp,c) - local g=Duel.SelectTribute(tp,c,1,1) - c:SetMaterial(g) - Duel.Release(g, REASON_SUMMON+REASON_MATERIAL) - --damage - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(61231400,1)) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetRange(LOCATION_MZONE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCountLimit(1) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetTarget(c61231400.damtg) - e1:SetOperation(c61231400.damop) - e1:SetReset(RESET_EVENT+0xc6e0000) - c:RegisterEffect(e1) -end -function c61231400.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(1000) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,tp,1000) -end -function c61231400.damop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) - end -end diff --git a/script/c61254509.lua b/script/c61254509.lua deleted file mode 100644 index d38a137c47..0000000000 --- a/script/c61254509.lua +++ /dev/null @@ -1,37 +0,0 @@ ---トライポッド・フィッシュ -function c61254509.initial_effect(c) - --lv up - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(61254509,0)) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(c61254509.condition) - e1:SetTarget(c61254509.target) - e1:SetOperation(c61254509.operation) - c:RegisterEffect(e1) -end -function c61254509.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_GRAVE) -end -function c61254509.filter(c) - return c:IsFaceup() and c:IsRace(RACE_FISH+RACE_SEASERPENT+RACE_AQUA) and c:IsLevelAbove(1) -end -function c61254509.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c61254509.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c61254509.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c61254509.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) -end -function c61254509.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_LEVEL) - e1:SetValue(1) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - end -end diff --git a/script/c61257789.lua b/script/c61257789.lua deleted file mode 100644 index 90613b2187..0000000000 --- a/script/c61257789.lua +++ /dev/null @@ -1,98 +0,0 @@ ---スターダスト・ドラゴン/バスター -function c61257789.initial_effect(c) - c:EnableReviveLimit() - --Cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(aux.FALSE) - c:RegisterEffect(e1) - --Negate - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(61257789,0)) - e2:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_CHAINING) - e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) - e2:SetRange(LOCATION_MZONE) - e2:SetCondition(c61257789.negcon) - e2:SetCost(c61257789.negcost) - e2:SetTarget(c61257789.negtg) - e2:SetOperation(c61257789.negop) - c:RegisterEffect(e2) - --Revive - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(61257789,1)) - e3:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_FIELD) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetCode(EVENT_PHASE+PHASE_END) - e3:SetRange(LOCATION_GRAVE) - e3:SetCountLimit(1) - e3:SetTarget(c61257789.sumtg) - e3:SetOperation(c61257789.sumop) - c:RegisterEffect(e3) - --Special summon - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(61257789,2)) - e4:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE) - e4:SetCategory(CATEGORY_SPECIAL_SUMMON) - e4:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e4:SetCode(EVENT_LEAVE_FIELD) - e4:SetCondition(c61257789.spcon) - e4:SetTarget(c61257789.sptg) - e4:SetOperation(c61257789.spop) - c:RegisterEffect(e4) -end -function c61257789.negcon(e,tp,eg,ep,ev,re,r,rp) - return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev) -end -function c61257789.negcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end -function c61257789.negtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) - end -end -function c61257789.negop(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateActivation(ev) - if re:GetHandler():IsRelateToEffect(re)then - Duel.Destroy(eg,REASON_EFFECT) - end - e:GetHandler():RegisterFlagEffect(61257789,RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END,0,0) -end -function c61257789.sumtg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:GetFlagEffect(61257789)>0 - and c:IsCanBeSpecialSummoned(e,0,tp,true,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0) -end -function c61257789.sumop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - Duel.SpecialSummon(e:GetHandler(),0,tp,tp,true,false,POS_FACEUP) - end -end -function c61257789.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsReason(REASON_DESTROY) -end -function c61257789.spfilter(c,e,tp) - return c:IsCode(44508094) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c61257789.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c61257789.spfilter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c61257789.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c61257789.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c61257789.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c61258740.lua b/script/c61258740.lua deleted file mode 100644 index 4a22e13472..0000000000 --- a/script/c61258740.lua +++ /dev/null @@ -1,47 +0,0 @@ ---水神の護符 -function c61258740.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c61258740.target) - c:RegisterEffect(e1) - --indes - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(LOCATION_MZONE,0) - e2:SetTarget(aux.TargetBoolFunction(Card.IsAttribute,ATTRIBUTE_WATER)) - e2:SetValue(c61258740.indval) - c:RegisterEffect(e2) -end -function c61258740.indval(e,re,tp) - return e:GetHandlerPlayer()==1-tp -end -function c61258740.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - e:GetHandler():SetTurnCounter(0) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_SZONE) - e1:SetCondition(c61258740.tgcon) - e1:SetOperation(c61258740.tgop) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END+RESET_OPPO_TURN,3) - e:GetHandler():RegisterEffect(e1) -end -function c61258740.tgcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp -end -function c61258740.tgop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local ct=c:GetTurnCounter() - ct=ct+1 - c:SetTurnCounter(ct) - if ct==3 then - Duel.SendtoGrave(c,REASON_RULE) - end -end diff --git a/script/c61307542.lua b/script/c61307542.lua deleted file mode 100644 index 47a6a1f533..0000000000 --- a/script/c61307542.lua +++ /dev/null @@ -1,87 +0,0 @@ ---버제스토마 아노말로카리스 -function c61307542.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,2,3,nil,nil,5) - c:EnableReviveLimit() - --immune - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_IMMUNE_EFFECT) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetValue(c61307542.efilter) - c:RegisterEffect(e1) - --reveal - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(61307542,0)) - e2:SetCategory(CATEGORY_TOHAND) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetRange(LOCATION_MZONE) - e2:SetProperty(EFFECT_FLAG_DELAY) - e2:SetCountLimit(1) - e2:SetCondition(c61307542.condition) - e2:SetTarget(c61307542.target) - e2:SetOperation(c61307542.operation) - c:RegisterEffect(e2) - --destroy - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(61307542,1)) - e3:SetCategory(CATEGORY_DESTROY) - e3:SetType(EFFECT_TYPE_QUICK_O) - e3:SetCode(EVENT_FREE_CHAIN) - e3:SetRange(LOCATION_MZONE) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetCountLimit(1) - e3:SetCondition(c61307542.descon) - e3:SetCost(c61307542.descost) - e3:SetTarget(c61307542.destg) - e3:SetOperation(c61307542.desop) - c:RegisterEffect(e3) -end -function c61307542.efilter(e,re) - return re:IsActiveType(TYPE_MONSTER) and re:GetOwner()~=e:GetOwner() -end -function c61307542.cfilter(c,tp) - return c:IsType(TYPE_TRAP) and c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_SZONE) and c:GetPreviousSequence()<5 -end -function c61307542.condition(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c61307542.cfilter,1,nil,tp) -end -function c61307542.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,1) end -end -function c61307542.operation(e,tp,eg,ep,ev,re,r,rp) - if not Duel.IsPlayerCanDiscardDeck(tp,1) then return end - Duel.ConfirmDecktop(tp,1) - local g=Duel.GetDecktopGroup(tp,1) - local tc=g:GetFirst() - if tc:IsType(TYPE_TRAP) and tc:IsAbleToHand() then - Duel.DisableShuffleCheck() - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ShuffleHand(tp) - else - Duel.DisableShuffleCheck() - Duel.SendtoGrave(tc,REASON_EFFECT+REASON_REVEAL) - end -end -function c61307542.descon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetOverlayGroup():IsExists(Card.IsType,1,nil,TYPE_TRAP) -end -function c61307542.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c61307542.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsDestructable() end - if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c61307542.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c61314842.lua b/script/c61314842.lua deleted file mode 100644 index 13e9c53888..0000000000 --- a/script/c61314842.lua +++ /dev/null @@ -1,58 +0,0 @@ ---高等紋章術 -function c61314842.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c61314842.target) - e1:SetOperation(c61314842.activate) - c:RegisterEffect(e1) -end -function c61314842.filter(c,e,tp) - return c:IsSetCard(0x76) and c:IsCanBeEffectTarget(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c61314842.xyzfilter(c,mg) - if c.xyz_count~=2 then return false end - return c:IsXyzSummonable(mg) -end -function c61314842.mfilter1(c,exg) - return exg:IsExists(c61314842.mfilter2,1,nil,c) -end -function c61314842.mfilter2(c,mc) - return c.xyz_filter(mc) -end -function c61314842.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - local mg=Duel.GetMatchingGroup(c61314842.filter,tp,LOCATION_GRAVE,0,nil,e,tp) - if chk==0 then return Duel.IsPlayerCanSpecialSummonCount(tp,2) - and Duel.GetLocationCount(tp,LOCATION_MZONE)>1 and mg:GetCount()>1 - and Duel.IsExistingMatchingCard(c61314842.xyzfilter,tp,LOCATION_EXTRA,0,1,nil,mg) end - local exg=Duel.GetMatchingGroup(c61314842.xyzfilter,tp,LOCATION_EXTRA,0,nil,mg) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg1=mg:FilterSelect(tp,c61314842.mfilter1,1,1,nil,exg) - local tc1=sg1:GetFirst() - local exg2=exg:Filter(c61314842.mfilter2,nil,tc1) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg2=mg:FilterSelect(tp,c61314842.mfilter1,1,1,tc1,exg2) - sg1:Merge(sg2) - Duel.SetTargetCard(sg1) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,sg1,2,0,0) -end -function c61314842.filter2(c,e,tp) - return c:IsRelateToEffect(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c61314842.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 then return end - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(c61314842.filter2,nil,e,tp) - if g:GetCount()<2 then return end - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - Duel.BreakEffect() - local xyzg=Duel.GetMatchingGroup(c61314842.xyzfilter,tp,LOCATION_EXTRA,0,nil,g) - if xyzg:GetCount()>0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local xyz=xyzg:Select(tp,1,1,nil):GetFirst() - Duel.XyzSummon(tp,xyz,g) - end -end diff --git a/script/c61318483.lua b/script/c61318483.lua deleted file mode 100644 index f5c34577e5..0000000000 --- a/script/c61318483.lua +++ /dev/null @@ -1,67 +0,0 @@ ---ゴーストリック・フロスト -function c61318483.initial_effect(c) - --summon limit - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_SUMMON) - e1:SetCondition(c61318483.sumcon) - c:RegisterEffect(e1) - --turn set - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(61318483,0)) - e2:SetCategory(CATEGORY_POSITION) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetTarget(c61318483.postg) - e2:SetOperation(c61318483.posop) - c:RegisterEffect(e2) - --pos - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(61318483,1)) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_POSITION) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_ATTACK_ANNOUNCE) - e3:SetRange(LOCATION_HAND) - e3:SetCondition(c61318483.spcon) - e3:SetTarget(c61318483.sptg) - e3:SetOperation(c61318483.spop) - c:RegisterEffect(e3) -end -function c61318483.sfilter(c) - return c:IsFaceup() and c:IsSetCard(0x8d) -end -function c61318483.sumcon(e) - return not Duel.IsExistingMatchingCard(c61318483.sfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) -end -function c61318483.postg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsCanTurnSet() and c:GetFlagEffect(61318483)==0 end - c:RegisterFlagEffect(61318483,RESET_EVENT+0x1fc0000+RESET_PHASE+PHASE_END,0,1) - Duel.SetOperationInfo(0,CATEGORY_POSITION,c,1,0,0) -end -function c61318483.posop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - Duel.ChangePosition(c,POS_FACEDOWN_DEFENCE) - end -end -function c61318483.spcon(e,tp,eg,ep,ev,re,r,rp) - local at=Duel.GetAttacker() - return at:GetControler()~=tp and Duel.GetAttackTarget()==nil -end -function c61318483.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - local at=Duel.GetAttacker() - if chk==0 then return at:IsCanTurnSet() and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) - Duel.SetOperationInfo(0,CATEGORY_POSITION,at,1,0,0) -end -function c61318483.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local at=Duel.GetAttacker() - if at:IsControler(1-tp) and at:IsRelateToBattle() and at:IsFaceup() and Duel.ChangePosition(at,POS_FACEDOWN_DEFENCE)>0 then - if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEDOWN_DEFENCE)>0 then - Duel.ConfirmCards(1-tp,c) - end - end -end diff --git a/script/c6133894.lua b/script/c6133894.lua deleted file mode 100644 index d847e55338..0000000000 --- a/script/c6133894.lua +++ /dev/null @@ -1,49 +0,0 @@ ---デビルマゼラ -function c6133894.initial_effect(c) - c:EnableReviveLimit() - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_SPSUMMON_PROC) - e2:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE) - e2:SetRange(LOCATION_HAND) - e2:SetCondition(c6133894.spcon) - e2:SetOperation(c6133894.spop) - c:RegisterEffect(e2) - --handes - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(6133894,0)) - e3:SetCategory(CATEGORY_HANDES) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - e3:SetTarget(c6133894.hdtg) - e3:SetOperation(c6133894.hdop) - c:RegisterEffect(e3) -end -function c6133894.rfilter(c,code) - return c:IsFaceup() and c:IsCode(code) -end -function c6133894.spcon(e,c) - if c==nil then return Duel.IsEnvironment(94585852) end - return Duel.CheckReleaseGroup(c:GetControler(),c6133894.rfilter,1,nil,66073051) -end -function c6133894.spop(e,tp,eg,ep,ev,re,r,rp,c) - local g=Duel.SelectReleaseGroup(tp,c6133894.rfilter,1,1,nil,66073051) - Duel.Release(g,REASON_COST) -end -function c6133894.hdtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,1-tp,3) -end -function c6133894.hdop(e,tp,eg,ep,ev,re,r,rp) - if Duel.IsEnvironment(94585852) then - local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND):RandomSelect(tp,3) - Duel.SendtoGrave(g,REASON_EFFECT+REASON_DISCARD) - end -end diff --git a/script/c61344030.lua b/script/c61344030.lua deleted file mode 100644 index 59f7f9f951..0000000000 --- a/script/c61344030.lua +++ /dev/null @@ -1,80 +0,0 @@ ---輝光子パラディオス -function c61344030.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_LIGHT),4,2) - c:EnableReviveLimit() - --negate - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(61344030,0)) - e1:SetCategory(CATEGORY_DISABLE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCost(c61344030.cost) - e1:SetTarget(c61344030.target) - e1:SetOperation(c61344030.operation) - c:RegisterEffect(e1) - --draw - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(61344030,1)) - e2:SetCategory(CATEGORY_DRAW) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetCondition(c61344030.drcon) - e2:SetTarget(c61344030.drtg) - e2:SetOperation(c61344030.drop) - c:RegisterEffect(e2) -end -function c61344030.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,2,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,2,2,REASON_COST) -end -function c61344030.filter(c) - return c:IsFaceup() and c:GetAttack()>0 -end -function c61344030.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and c61344030.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c61344030.filter,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - local g=Duel.SelectTarget(tp,c61344030.filter,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0) -end -function c61344030.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) and tc:GetAttack()>0 then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetValue(0) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE) - e2:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_DISABLE_EFFECT) - e3:SetValue(RESET_TURN_SET) - e3:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e3) - end -end -function c61344030.drcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsReason(REASON_DESTROY) - and c:GetPreviousControler()==tp and c:GetReasonPlayer()==1-tp -end -function c61344030.drtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(1) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c61344030.drop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end diff --git a/script/c61370518.lua b/script/c61370518.lua deleted file mode 100644 index dff0f91433..0000000000 --- a/script/c61370518.lua +++ /dev/null @@ -1,44 +0,0 @@ ---迅雷の魔王-スカル・デーモン -function c61370518.initial_effect(c) - --maintain - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCondition(c61370518.mtcon) - e1:SetOperation(c61370518.mtop) - c:RegisterEffect(e1) - --disable and destroy - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_CHAIN_SOLVING) - e2:SetRange(LOCATION_MZONE) - e2:SetOperation(c61370518.disop) - c:RegisterEffect(e2) -end -function c61370518.mtcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c61370518.mtop(e,tp,eg,ep,ev,re,r,rp) - if Duel.CheckLPCost(tp,500) then - Duel.PayLPCost(tp,500) - else - Duel.Destroy(e:GetHandler(),REASON_RULE) - end -end -function c61370518.disop(e,tp,eg,ep,ev,re,r,rp) - if ep==tp then return end - if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end - local tg=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) - if not tg or not tg:IsContains(e:GetHandler()) or not Duel.IsChainDisablable(ev) then return false end - local rc=re:GetHandler() - local dc=Duel.TossDice(tp,1) - if dc==1 or dc==3 or dc==6 then - Duel.NegateEffect(ev) - if rc:IsRelateToEffect(re) then - Duel.Destroy(rc,REASON_EFFECT) - end - end -end diff --git a/script/c6137095.lua b/script/c6137095.lua deleted file mode 100644 index d7d60dffdd..0000000000 --- a/script/c6137095.lua +++ /dev/null @@ -1,48 +0,0 @@ ---誤作動 -function c6137095.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_NEGATE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_CHAINING) - e1:SetCondition(c6137095.condition) - e1:SetCost(c6137095.cost) - e1:SetTarget(c6137095.target) - e1:SetOperation(c6137095.activate) - c:RegisterEffect(e1) -end -function c6137095.condition(e,tp,eg,ep,ev,re,r,rp) - return re:IsActiveType(TYPE_TRAP) and re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev) -end -function c6137095.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,500) end - Duel.PayLPCost(tp,500) -end -function c6137095.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - if not re:GetHandler():IsStatus(STATUS_ACT_FROM_HAND) then - return re:GetHandler():IsCanTurnSet() - else return true end - end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - if re:GetHandler():IsRelateToEffect(re) and re:GetHandler():IsStatus(STATUS_ACT_FROM_HAND) then - Duel.SetOperationInfo(0,CATEGORY_TOHAND,eg,1,0,0) - end -end -function c6137095.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateActivation(ev) - local rc=re:GetHandler() - if rc:IsRelateToEffect(re) then - if rc:IsStatus(STATUS_ACT_FROM_HAND) then - rc:CancelToGrave() - Duel.SendtoHand(rc,nil,REASON_EFFECT) - else - if rc:IsCanTurnSet() then - rc:CancelToGrave() - Duel.ChangePosition(rc,POS_FACEDOWN) - rc:SetStatus(STATUS_SET_TURN,false) - Duel.RaiseEvent(rc,EVENT_SSET,e,REASON_EFFECT,tp,tp,0) - end - end - end -end diff --git a/script/c61380658.lua b/script/c61380658.lua deleted file mode 100644 index f1bd59703f..0000000000 --- a/script/c61380658.lua +++ /dev/null @@ -1,23 +0,0 @@ ---エレキリギリス -function c61380658.initial_effect(c) - --untargetable - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(0,LOCATION_MZONE) - e1:SetValue(c61380658.atlimit) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_CANNOT_SELECT_EFFECT_TARGET) - e2:SetProperty(EFFECT_FLAG_SET_AVAILABLE) - e2:SetTargetRange(0,0xff) - e2:SetValue(c61380658.tglimit) - c:RegisterEffect(e2) -end -function c61380658.atlimit(e,c) - return c:IsFaceup() and c:IsSetCard(0xe) and c~=e:GetHandler() -end -function c61380658.tglimit(e,re,c) - return c:IsControler(e:GetHandlerPlayer()) and c:IsLocation(LOCATION_MZONE) and c:IsFaceup() and c:IsSetCard(0xe) and c~=e:GetHandler() -end diff --git a/script/c61405855.lua b/script/c61405855.lua deleted file mode 100644 index 677964693a..0000000000 --- a/script/c61405855.lua +++ /dev/null @@ -1,72 +0,0 @@ ---竜殺しの剣 -function c61405855.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c61405855.target) - e1:SetOperation(c61405855.operation) - c:RegisterEffect(e1) - --atkup - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(700) - c:RegisterEffect(e2) - --Equip limit - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_EQUIP_LIMIT) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e3:SetValue(c61405855.eqlimit) - c:RegisterEffect(e3) - --destroy - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(61405855,0)) - e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e4:SetCategory(CATEGORY_DESTROY) - e4:SetCode(EVENT_BATTLED) - e4:SetRange(LOCATION_SZONE) - e4:SetCondition(c61405855.descon) - e4:SetTarget(c61405855.destg) - e4:SetOperation(c61405855.desop) - c:RegisterEffect(e4) -end -function c61405855.eqlimit(e,c) - return c:IsRace(RACE_WARRIOR) -end -function c61405855.filter(c) - return c:IsFaceup() and c:IsRace(RACE_WARRIOR) -end -function c61405855.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c61405855.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c61405855.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c61405855.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c61405855.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,e:GetHandler(),tc) - end -end -function c61405855.descon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler():GetEquipTarget() - local bc=c:GetBattleTarget() - return bc and bc:IsRace(RACE_DRAGON) -end -function c61405855.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local bc=e:GetHandler():GetEquipTarget():GetBattleTarget() - Duel.SetTargetCard(bc) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,bc,1,0,0) -end -function c61405855.desop(e,tp,eg,ep,ev,re,r,rp) - local bc=Duel.GetFirstTarget() - if bc:IsRelateToEffect(e) then - Duel.Destroy(bc,REASON_EFFECT) - end -end diff --git a/script/c61411502.lua b/script/c61411502.lua deleted file mode 100644 index 1ed4a5ca0e..0000000000 --- a/script/c61411502.lua +++ /dev/null @@ -1,67 +0,0 @@ ---エレメンタルバースト -function c61411502.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,0x1c0) - e1:SetCost(c61411502.cost) - e1:SetTarget(c61411502.target) - e1:SetOperation(c61411502.activate) - c:RegisterEffect(e1) -end -function c61411502.cfilter1(c,rg) - if not c:IsAttribute(ATTRIBUTE_WIND) then return false end - rg:RemoveCard(c) - local ret=rg:IsExists(c61411502.cfilter2,1,nil,rg) - rg:AddCard(c) - return ret -end -function c61411502.cfilter2(c,rg) - if not c:IsAttribute(ATTRIBUTE_WATER) then return false end - rg:RemoveCard(c) - local ret=rg:IsExists(c61411502.cfilter3,1,nil,rg) - rg:AddCard(c) - return ret -end -function c61411502.cfilter3(c,rg) - if not c:IsAttribute(ATTRIBUTE_FIRE) then return false end - rg:RemoveCard(c) - local ret=rg:IsExists(Card.IsAttribute,1,nil,ATTRIBUTE_EARTH) - rg:AddCard(c) - return ret -end -function c61411502.rfilter(c) - return c:IsFaceup() and c:IsHasEffect(EFFECT_EXTRA_RELEASE) and c:IsReleasable() -end -function c61411502.cost(e,tp,eg,ep,ev,re,r,rp,chk) - local g1=Duel.GetMatchingGroup(Card.IsReleasable,tp,LOCATION_MZONE,0,nil) - local g2=Duel.GetMatchingGroup(c61411502.rfilter,tp,0,LOCATION_MZONE,nil) - g1:Merge(g2) - if chk==0 then return g1:GetCount()>3 and g1:IsExists(c61411502.cfilter1,1,nil,g1) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) - local rg1=g1:FilterSelect(tp,c61411502.cfilter1,1,1,nil,g1) - g1:Sub(rg1) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) - local rg2=g1:FilterSelect(tp,c61411502.cfilter2,1,1,nil,g1) - g1:Sub(rg2) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) - local rg3=g1:FilterSelect(tp,c61411502.cfilter3,1,1,nil,g1) - g1:Sub(rg3) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) - local rg4=g1:FilterSelect(tp,Card.IsAttribute,1,1,nil,ATTRIBUTE_EARTH) - rg1:Merge(rg2) - rg1:Merge(rg3) - rg1:Merge(rg4) - Duel.Release(rg1,REASON_COST) -end -function c61411502.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDestructable,tp,0,LOCATION_ONFIELD,1,nil) end - local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,0,LOCATION_ONFIELD,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c61411502.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,0,LOCATION_ONFIELD,nil) - Duel.Destroy(g,REASON_EFFECT) -end diff --git a/script/c61420130.lua b/script/c61420130.lua deleted file mode 100644 index 64ad3bad23..0000000000 --- a/script/c61420130.lua +++ /dev/null @@ -1,94 +0,0 @@ ---버제스토마 할루키게니아 -function c61420130.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetCondition(c61420130.condition) - e1:SetTarget(c61420130.target) - e1:SetOperation(c61420130.activate) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_CHAINING) - e2:SetRange(LOCATION_GRAVE) - e2:SetCondition(c61420130.spcon) - e2:SetTarget(c61420130.sptg) - e2:SetOperation(c61420130.spop) - c:RegisterEffect(e2) -end -function c61420130.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end -function c61420130.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) -end -function c61420130.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - e1:SetValue(tc:GetAttack()/2) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_SET_DEFENCE_FINAL) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - e2:SetValue(tc:GetDefence()/2) - tc:RegisterEffect(e2) - end -end -function c61420130.spcon(e,tp,eg,ep,ev,re,r,rp) - return re:IsActiveType(TYPE_TRAP) and re:IsHasType(EFFECT_TYPE_ACTIVATE) -end -function c61420130.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:GetFlagEffect(61420130)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsPlayerCanSpecialSummonMonster(tp,61420130,0xd4,0x11,1200,0,2,RACE_AQUA,ATTRIBUTE_WATER) end - c:RegisterFlagEffect(61420130,RESET_CHAIN,0,1) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0) -end -function c61420130.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local c=e:GetHandler() - if c:IsRelateToEffect(e) - and Duel.IsPlayerCanSpecialSummonMonster(tp,61420130,0xd4,0x11,1200,0,2,RACE_AQUA,ATTRIBUTE_WATER) then - c:SetStatus(STATUS_NO_LEVEL,false) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CHANGE_TYPE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetValue(TYPE_NORMAL+TYPE_MONSTER) - e1:SetReset(RESET_EVENT+0x47c0000) - c:RegisterEffect(e1,true) - Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_IMMUNE_EFFECT) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetValue(c61420130.efilter) - e2:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e3:SetReset(RESET_EVENT+0x47e0000) - e3:SetValue(LOCATION_REMOVED) - c:RegisterEffect(e3,true) - end -end -function c61420130.efilter(e,re) - return re:IsActiveType(TYPE_MONSTER) -end diff --git a/script/c6142213.lua b/script/c6142213.lua deleted file mode 100644 index 6374097db1..0000000000 --- a/script/c6142213.lua +++ /dev/null @@ -1,37 +0,0 @@ ---ワンショット・ロケット -function c6142213.initial_effect(c) - --damage - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(6142213,0)) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_BATTLED) - e1:SetCondition(c6142213.condition) - e1:SetTarget(c6142213.target) - e1:SetOperation(c6142213.operation) - c:RegisterEffect(e1) - --battle indestructable - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e2:SetCondition(c6142213.indcon) - e2:SetValue(1) - c:RegisterEffect(e2) -end -function c6142213.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler()==Duel.GetAttacker() and Duel.GetAttackTarget() -end -function c6142213.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local dam=Duel.GetAttackTarget():GetAttack()/2 - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(dam) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,0,0,1-tp,dam) -end -function c6142213.operation(e,tp,eg,ep,ev,re,r,rp) - local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) - Duel.Damage(p,Duel.GetAttackTarget():GetAttack()/2,REASON_EFFECT) -end -function c6142213.indcon(e) - return e:GetHandler()==Duel.GetAttacker() -end diff --git a/script/c6142488.lua b/script/c6142488.lua deleted file mode 100644 index 93e4691692..0000000000 --- a/script/c6142488.lua +++ /dev/null @@ -1,50 +0,0 @@ ---ファーニマル・マウス -function c6142488.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetProperty(EFFECT_FLAG_NO_TURN_RESET) - e1:SetCountLimit(1) - e1:SetCost(c6142488.spcost) - e1:SetTarget(c6142488.sptg) - e1:SetOperation(c6142488.spop) - c:RegisterEffect(e1) - Duel.AddCustomActivityCounter(6142488,ACTIVITY_SPSUMMON,c6142488.counterfilter) -end -function c6142488.counterfilter(c) - return c:IsSetCard(0xad) or c:GetSummonLocation()~=LOCATION_EXTRA -end -function c6142488.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetCustomActivityCount(6142488,tp,ACTIVITY_SPSUMMON)==0 end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) - e1:SetTargetRange(1,0) - e1:SetTarget(c6142488.splimit) - e1:SetReset(RESET_PHASE+RESET_END) - Duel.RegisterEffect(e1,tp) -end -function c6142488.splimit(e,c,sump,sumtype,sumpos,targetp,se) - return not c:IsSetCard(0xad) and c:IsLocation(LOCATION_EXTRA) -end -function c6142488.filter(c,e,tp) - return c:IsCode(6142488) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c6142488.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c6142488.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c6142488.spop(e,tp,eg,ep,ev,re,r,rp) - local ct=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ct==0 then return end - if ct>2 then ct=2 end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c6142488.filter,tp,LOCATION_DECK,0,1,ct,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c61441708.lua b/script/c61441708.lua deleted file mode 100644 index 22a0412dba..0000000000 --- a/script/c61441708.lua +++ /dev/null @@ -1,72 +0,0 @@ ---ネフティスの鳳凰神 -function c61441708.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetOperation(c61441708.spr) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(61441708,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetRange(LOCATION_GRAVE) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) - e2:SetCondition(c61441708.spcon) - e2:SetTarget(c61441708.sptg) - e2:SetOperation(c61441708.spop) - e2:SetLabelObject(e1) - c:RegisterEffect(e2) - --destroy - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(61441708,1)) - e3:SetCategory(CATEGORY_DESTROY) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - e3:SetCondition(c61441708.descon) - e3:SetTarget(c61441708.destg) - e3:SetOperation(c61441708.desop) - c:RegisterEffect(e3) -end -function c61441708.spr(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if bit.band(r,0x41)~=0x41 then return end - if Duel.GetTurnPlayer()==tp and Duel.GetCurrentPhase()==PHASE_STANDBY then - e:SetLabel(Duel.GetTurnCount()) - c:RegisterFlagEffect(61441708,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,0,2) - else - e:SetLabel(0) - c:RegisterFlagEffect(61441708,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,0,1) - end -end -function c61441708.spcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return e:GetLabelObject():GetLabel()~=Duel.GetTurnCount() and tp==Duel.GetTurnPlayer() and c:GetFlagEffect(61441708)>0 -end -function c61441708.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local c=e:GetHandler() - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0) - c:ResetFlagEffect(61441708) -end -function c61441708.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,1,tp,tp,false,false,POS_FACEUP) - end -end -function c61441708.descon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+1 -end -function c61441708.desfilter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable() -end -function c61441708.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local g=Duel.GetMatchingGroup(c61441708.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c61441708.desop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c61441708.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) - Duel.Destroy(g,REASON_EFFECT) -end diff --git a/script/c61466310.lua b/script/c61466310.lua deleted file mode 100644 index cc0789de22..0000000000 --- a/script/c61466310.lua +++ /dev/null @@ -1,64 +0,0 @@ ---帝王の開岩 -function c61466310.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --spsummon limit - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetRange(LOCATION_SZONE) - e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetTargetRange(1,0) - e2:SetTarget(c61466310.sumlimit) - c:RegisterEffect(e2) - --search - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(61466310,0)) - e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetRange(LOCATION_SZONE) - e3:SetCountLimit(1,61466310) - e3:SetCode(EVENT_SUMMON_SUCCESS) - e3:SetCondition(c61466310.thcon) - e3:SetTarget(c61466310.thtg) - e3:SetOperation(c61466310.thop) - c:RegisterEffect(e3) -end -function c61466310.sumlimit(e,c,sump,sumtype,sumpos,targetp) - return c:IsLocation(LOCATION_EXTRA) -end -function c61466310.thcon(e,tp,eg,ep,ev,re,r,rp) - return ep==tp and bit.band(eg:GetFirst():GetSummonType(),SUMMON_TYPE_ADVANCE)==SUMMON_TYPE_ADVANCE -end -function c61466310.filter(c,code) - return (c:GetAttack()==2400 or c:GetAttack()==2800) and c:GetDefence()==1000 and c:GetCode()~=code and c:IsAbleToHand() -end -function c61466310.filter2(c,atk,code) - return c:GetAttack()==atk and c:GetDefence()==1000 and c:GetCode()~=code and c:IsAbleToHand() -end -function c61466310.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsRelateToEffect(e) - and Duel.IsExistingMatchingCard(c61466310.filter,tp,LOCATION_DECK,0,1,nil,eg:GetFirst():GetCode()) end - local t1=Duel.IsExistingMatchingCard(c61466310.filter2,tp,LOCATION_DECK,0,1,nil,2400,eg:GetFirst():GetCode()) - local t2=Duel.IsExistingMatchingCard(c61466310.filter2,tp,LOCATION_DECK,0,1,nil,2800,eg:GetFirst():GetCode()) - if t1 and t2 then e:SetLabel(Duel.SelectOption(tp,aux.Stringid(61466310,1),aux.Stringid(61466310,2))) - elseif t1 then e:SetLabel(Duel.SelectOption(tp,aux.Stringid(61466310,1))) - else e:SetLabel(Duel.SelectOption(tp,aux.Stringid(61466310,2))+1) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) - eg:GetFirst():CreateEffectRelation(e) -end -function c61466310.thop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local ec=eg:GetFirst() - if ec:IsFacedown() or not ec:IsRelateToEffect(e) then return end - local atk=e:GetLabel()==0 and 2400 or 2800 - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c61466310.filter2,tp,LOCATION_DECK,0,1,1,nil,atk,ec:GetCode()) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c61468779.lua b/script/c61468779.lua deleted file mode 100644 index f94e2766fa..0000000000 --- a/script/c61468779.lua +++ /dev/null @@ -1,76 +0,0 @@ ---地霊神グランソイル -function c61468779.initial_effect(c) - c:EnableReviveLimit() - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_SPSUMMON_PROC) - e2:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e2:SetRange(LOCATION_HAND) - e2:SetCondition(c61468779.spcon) - c:RegisterEffect(e2) - --spsummon - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(61468779,0)) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetTarget(c61468779.sptg) - e3:SetOperation(c61468779.spop) - c:RegisterEffect(e3) - --leave - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e4:SetCode(EVENT_LEAVE_FIELD_P) - e4:SetOperation(c61468779.leaveop) - c:RegisterEffect(e4) -end -function c61468779.spcon(e,c) - if c==nil then return true end - return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and - Duel.GetMatchingGroupCount(Card.IsAttribute,c:GetControler(),LOCATION_GRAVE,0,nil,ATTRIBUTE_EARTH)==5 -end -function c61468779.filter(c,e,tp) - return c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c61468779.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and c61468779.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c61468779.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c61468779.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c61468779.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end -function c61468779.leaveop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsFacedown() then return end - local effp=e:GetHandler():GetControler() - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SKIP_BP) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetTargetRange(1,0) - if Duel.GetTurnPlayer()==effp then - e1:SetLabel(Duel.GetTurnCount()) - e1:SetCondition(c61468779.skipcon) - e1:SetReset(RESET_PHASE+PHASE_END+RESET_SELF_TURN,2) - else - e1:SetReset(RESET_PHASE+PHASE_END+RESET_SELF_TURN,1) - end - Duel.RegisterEffect(e1,effp) -end -function c61468779.skipcon(e) - return Duel.GetTurnCount()~=e:GetLabel() -end diff --git a/script/c6148016.lua b/script/c6148016.lua deleted file mode 100644 index 0b0b3ad66d..0000000000 --- a/script/c6148016.lua +++ /dev/null @@ -1,42 +0,0 @@ ---ギアギアギア -function c6148016.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_END_PHASE) - e1:SetCountLimit(1,6148016+EFFECT_COUNT_CODE_OATH) - e1:SetTarget(c6148016.sptg) - e1:SetOperation(c6148016.spop) - c:RegisterEffect(e1) -end -function c6148016.filter(c,e,tp) - return c:IsSetCard(0x1072) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c6148016.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>1 - and Duel.IsExistingMatchingCard(c6148016.filter,tp,LOCATION_DECK,0,2,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_DECK) -end -function c6148016.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 then return end - local g=Duel.GetMatchingGroup(c6148016.filter,tp,LOCATION_DECK,0,nil,e,tp) - if g:GetCount()>=2 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=g:Select(tp,2,2,nil) - local tc=sg:GetFirst() - Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_LEVEL) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(1) - tc:RegisterEffect(e1) - tc=sg:GetNext() - Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) - local e2=e1:Clone() - tc:RegisterEffect(e2) - Duel.SpecialSummonComplete() - end -end diff --git a/script/c61488417.lua b/script/c61488417.lua deleted file mode 100644 index 005d065210..0000000000 --- a/script/c61488417.lua +++ /dev/null @@ -1,72 +0,0 @@ ---光竜星-リフン -function c61488417.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(61488417,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCountLimit(1,61488417) - e1:SetCondition(c61488417.condition) - e1:SetTarget(c61488417.target) - e1:SetOperation(c61488417.operation) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(61488417,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e2:SetRange(LOCATION_GRAVE) - e2:SetCountLimit(1,61488417) - e2:SetCondition(c61488417.spcon) - e2:SetTarget(c61488417.sptg) - e2:SetOperation(c61488417.spop) - c:RegisterEffect(e2) -end -function c61488417.condition(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE+REASON_EFFECT) - and c:IsPreviousLocation(LOCATION_ONFIELD) and c:GetPreviousControler()==tp -end -function c61488417.filter(c,e,tp) - return c:IsSetCard(0x9e) and not c:IsCode(61488417) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c61488417.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c61488417.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c61488417.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c61488417.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) -end -function c61488417.cfilter(c,tp) - return c:IsSetCard(0x9e) and c:IsReason(REASON_DESTROY) - and c:IsPreviousLocation(LOCATION_MZONE) and c:GetPreviousControler()==tp -end -function c61488417.spcon(e,tp,eg,ep,ev,re,r,rp) - return not eg:IsContains(e:GetHandler()) and eg:IsExists(c61488417.cfilter,1,nil,tp) -end -function c61488417.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c61488417.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+0x47e0000) - e1:SetValue(LOCATION_REMOVED) - c:RegisterEffect(e1,true) - end -end diff --git a/script/c6150044.lua b/script/c6150044.lua deleted file mode 100644 index aafc3c867c..0000000000 --- a/script/c6150044.lua +++ /dev/null @@ -1,41 +0,0 @@ ---アルカナ ナイトジョーカー -function c6150044.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcCode3(c,25652259,90876561,64788463,false,false) - --negate - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(6150044,0)) - e1:SetCategory(CATEGORY_DISABLE) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_CHAINING) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCondition(c6150044.discon) - e1:SetCost(c6150044.discost) - e1:SetTarget(c6150044.distg) - e1:SetOperation(c6150044.disop) - c:RegisterEffect(e1) -end -function c6150044.discon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsStatus(STATUS_BATTLE_DESTROYED) then return false end - if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return end - local tg=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) - return tg and tg:IsContains(c) and Duel.IsChainDisablable(ev) -end -function c6150044.filter(c,tpe) - return c:IsType(tpe) and c:IsDiscardable() -end -function c6150044.discost(e,tp,eg,ep,ev,re,r,rp,chk) - local rtype=bit.band(re:GetActiveType(),0x7) - if chk==0 then return Duel.IsExistingMatchingCard(c6150044.filter,tp,LOCATION_HAND,0,1,nil,rtype) end - Duel.DiscardHand(tp,c6150044.filter,1,1,REASON_COST+REASON_DISCARD,nil,rtype) -end -function c6150044.distg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0) -end -function c6150044.disop(e,tp,eg,ep,ev,re,r,rp,chk) - Duel.NegateEffect(ev) -end diff --git a/script/c61505339.lua b/script/c61505339.lua deleted file mode 100644 index a3bc14b562..0000000000 --- a/script/c61505339.lua +++ /dev/null @@ -1,45 +0,0 @@ ---創世神 -function c61505339.initial_effect(c) - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_SINGLE_RANGE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetRange(LOCATION_GRAVE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(61505339,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetTarget(c61505339.sptg) - e2:SetOperation(c61505339.spop) - c:RegisterEffect(e2) -end -function c61505339.filter(c,e,tp) - return c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c61505339.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c61505339.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)>0 - and Duel.IsExistingTarget(c61505339.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c61505339.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_HAND) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c61505339.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local sg=Duel.SelectMatchingCard(tp,Card.IsAbleToGrave,tp,LOCATION_HAND,0,1,1,nil) - if sg:GetCount()==0 then return end - Duel.SendtoGrave(sg,REASON_EFFECT) - Duel.BreakEffect() - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c61528025.lua b/script/c61528025.lua deleted file mode 100644 index 52932e423b..0000000000 --- a/script/c61528025.lua +++ /dev/null @@ -1,12 +0,0 @@ ---光の追放者 -function c61528025.initial_effect(c) - --remove - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_RANGE) - e1:SetCode(EFFECT_TO_GRAVE_REDIRECT) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(0xff,0xff) - e1:SetValue(LOCATION_REMOVED) - c:RegisterEffect(e1) -end diff --git a/script/c61538782.lua b/script/c61538782.lua deleted file mode 100644 index 74df3ea58d..0000000000 --- a/script/c61538782.lua +++ /dev/null @@ -1,55 +0,0 @@ ---トラックロイド -function c61538782.initial_effect(c) - --equip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(61538782,0)) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetCode(EVENT_BATTLE_DESTROYING) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCondition(c61538782.eqcon) - e1:SetTarget(c61538782.eqtg) - e1:SetOperation(c61538782.eqop) - c:RegisterEffect(e1) -end -function c61538782.eqcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=c:GetBattleTarget() - if not c:IsRelateToBattle() or c:IsFacedown() then return false end - e:SetLabelObject(tc) - return tc:IsLocation(LOCATION_GRAVE) and tc:IsType(TYPE_MONSTER) and tc:IsReason(REASON_BATTLE) -end -function c61538782.eqtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local tc=e:GetLabelObject() - Duel.SetTargetCard(tc) - Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,tc,1,0,0) -end -function c61538782.eqop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and c:IsFaceup() and tc:IsRelateToEffect(e) then - local atk=tc:GetTextAttack() - if atk<0 then atk=0 end - if not Duel.Equip(tp,tc,c,false) then return end - --Add Equip limit - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_COPY_INHERIT+EFFECT_FLAG_OWNER_RELATE) - e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(c61538782.eqlimit) - tc:RegisterEffect(e1) - if atk>0 then - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_OWNER_RELATE) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetReset(RESET_EVENT+0x1fe0000) - e2:SetValue(atk) - tc:RegisterEffect(e2) - end - end -end -function c61538782.eqlimit(e,c) - return e:GetOwner()==c -end \ No newline at end of file diff --git a/script/c61587183.lua b/script/c61587183.lua deleted file mode 100644 index e49c5a35cd..0000000000 --- a/script/c61587183.lua +++ /dev/null @@ -1,55 +0,0 @@ ---黒蠍-逃げ足のチック -function c61587183.initial_effect(c) - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(61587183,0)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_BATTLE_DAMAGE) - e1:SetCondition(c61587183.condition) - e1:SetTarget(c61587183.target) - e1:SetOperation(c61587183.operation) - c:RegisterEffect(e1) -end -function c61587183.condition(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp -end -function c61587183.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsAbleToHand() end - if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)>0 - or Duel.IsExistingTarget(Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end - local op=0 - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(61587183,0)) - if Duel.IsExistingTarget(Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) - and Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)>0 then - op=Duel.SelectOption(tp,aux.Stringid(61587183,1),aux.Stringid(61587183,2)) - elseif Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)>0 then - Duel.SelectOption(tp,aux.Stringid(61587183,2)) - op=1 - else - Duel.SelectOption(tp,aux.Stringid(61587183,1)) - op=0 - end - e:SetLabel(op) - if op==0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g=Duel.SelectTarget(tp,Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) - e:SetProperty(EFFECT_FLAG_CARD_TARGET) - else e:SetProperty(0) end -end -function c61587183.operation(e,tp,eg,ep,ev,re,r,rp) - if e:GetLabel()==0 then - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - end - else - local g=Duel.GetDecktopGroup(1-tp,1) - if g:GetCount()>0 then - Duel.ConfirmCards(tp,g) - Duel.Hint(HINT_SELECTMSG,tp,0) - local ac=Duel.SelectOption(tp,aux.Stringid(61587183,3),aux.Stringid(61587183,4)) - if ac==1 then Duel.MoveSequence(g:GetFirst(),1) end - end - end -end diff --git a/script/c61592395.lua b/script/c61592395.lua deleted file mode 100644 index 3ed4ac5b51..0000000000 --- a/script/c61592395.lua +++ /dev/null @@ -1,30 +0,0 @@ ---アルマの魔導書 -function c61592395.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,61592395+EFFECT_COUNT_CODE_OATH) - e1:SetTarget(c61592395.target) - e1:SetOperation(c61592395.activate) - c:RegisterEffect(e1) -end -function c61592395.filter(c) - return c:IsFaceup() and c:IsSetCard(0x106e) and c:IsType(TYPE_SPELL) and c:GetCode()~=61592395 and c:IsAbleToHand() -end -function c61592395.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and c61592395.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c61592395.filter,tp,LOCATION_REMOVED,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c61592395.filter,tp,LOCATION_REMOVED,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0) -end -function c61592395.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end diff --git a/script/c61613388.lua b/script/c61613388.lua deleted file mode 100644 index 699bd470e0..0000000000 --- a/script/c61613388.lua +++ /dev/null @@ -1,78 +0,0 @@ ---U.A.ターンオーバー・タクティクス -function c61613388.initial_effect(c) - --activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TODECK+CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,61613388+EFFECT_COUNT_CODE_OATH) - e1:SetCondition(c61613388.condition) - e1:SetTarget(c61613388.target) - e1:SetOperation(c61613388.activate) - c:RegisterEffect(e1) -end -function c61613388.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0xb2) -end -function c61613388.condition(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c61613388.cfilter,tp,LOCATION_MZONE,0,nil) - return g:GetClassCount(Card.GetCode)>=2 -end -function c61613388.filter(c,e,tp) - return c:IsSetCard(0xb2) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c61613388.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) - and Duel.IsExistingMatchingCard(c61613388.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end - local g=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c61613388.locfilter(c,sp) - return c:IsLocation(LOCATION_DECK) and c:IsControler(sp) -end -function c61613388.activate(e,tp,eg,ep,ev,re,r,rp) - local tg=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - Duel.SendtoDeck(tg,nil,2,REASON_EFFECT) - Duel.ShuffleDeck(tp) - local ct1=Duel.GetOperatedGroup():FilterCount(c61613388.locfilter,nil,tp) - local ct2=Duel.GetOperatedGroup():FilterCount(c61613388.locfilter,nil,1-tp) - if ct1>Duel.GetLocationCount(tp,LOCATION_MZONE) then ct1=Duel.GetLocationCount(tp,LOCATION_MZONE) end - if ct2>Duel.GetLocationCount(1-tp,LOCATION_MZONE) then ct2=Duel.GetLocationCount(1-tp,LOCATION_MZONE) end - if ct1<=0 then return end - local g=Duel.GetMatchingGroup(c61613388.filter,tp,LOCATION_DECK,0,nil,e,tp) - if g:GetCount()==0 then return end - Duel.BreakEffect() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=g:Select(tp,1,1,nil) - g:Remove(Card.IsCode,nil,sg:GetFirst():GetCode()) - ct1=ct1-1 - while ct1>0 and g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(61613388,0)) do - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g1=g:Select(tp,1,1,nil) - g:Remove(Card.IsCode,nil,g1:GetFirst():GetCode()) - sg:Merge(g1) - ct1=ct1-1 - end - local sc=sg:GetFirst() - while sc do - if Duel.SpecialSummonStep(sc,0,tp,tp,false,false,POS_FACEUP) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - sc:RegisterEffect(e1) - end - sc=sg:GetNext() - end - Duel.SpecialSummonComplete() - if ct2>0 and Duel.IsExistingMatchingCard(Card.IsCanBeSpecialSummoned,tp,0,LOCATION_DECK,1,nil,e,0,1-tp,false,false) - and Duel.SelectYesNo(1-tp,aux.Stringid(61613388,1)) then - Duel.BreakEffect() - Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_SPSUMMON) - local sg2=Duel.SelectMatchingCard(1-tp,Card.IsCanBeSpecialSummoned,tp,0,LOCATION_DECK,1,ct2,nil,e,0,1-tp,false,false) - if sg2:GetCount()>0 then - Duel.SpecialSummon(sg2,0,1-tp,1-tp,false,false,POS_FACEUP) - end - end -end diff --git a/script/c61622107.lua b/script/c61622107.lua deleted file mode 100644 index 70babbc0e4..0000000000 --- a/script/c61622107.lua +++ /dev/null @@ -1,30 +0,0 @@ ---バブル・クラッシュ -function c61622107.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e1:SetCondition(c61622107.condition) - e1:SetOperation(c61622107.activate) - c:RegisterEffect(e1) -end -function c61622107.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetFieldGroupCount(tp,0xe,0)>=6 or Duel.GetFieldGroupCount(tp,0,0xe)>=6 -end -function c61622107.activate(e,tp,eg,ep,ev,re,r,rp) - local ct=Duel.GetFieldGroupCount(tp,0xe,0) - local g=Group.CreateGroup() - if ct>=6 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local sg=Duel.SelectMatchingCard(tp,nil,tp,0xe,0,ct-5,ct-5,nil) - g:Merge(sg) - end - ct=Duel.GetFieldGroupCount(1-tp,0xe,0) - if ct>=6 then - Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_TOGRAVE) - local sg=Duel.SelectMatchingCard(1-tp,nil,1-tp,0xe,0,ct-5,ct-5,nil) - g:Merge(sg) - end - Duel.SendtoGrave(g,REASON_EFFECT) -end diff --git a/script/c61623148.lua b/script/c61623148.lua deleted file mode 100644 index b60612a064..0000000000 --- a/script/c61623148.lua +++ /dev/null @@ -1,41 +0,0 @@ ---暗黒界の書物 -function c61623148.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(61623148,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetRange(LOCATION_SZONE) - e2:SetCondition(c61623148.spcon) - e2:SetTarget(c61623148.sptg) - e2:SetOperation(c61623148.spop) - c:RegisterEffect(e2) -end -function c61623148.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp and bit.band(r,REASON_ADJUST)~=0 -end -function c61623148.filter(c,e,tp) - return c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c61623148.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return eg:IsContains(chkc) and c61623148.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and eg:IsExists(c61623148.filter,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=eg:FilterSelect(tp,c61623148.filter,1,1,nil,e,tp) - Duel.SetTargetCard(g) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c61623148.spop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c61632317.lua b/script/c61632317.lua deleted file mode 100644 index 2c163cb433..0000000000 --- a/script/c61632317.lua +++ /dev/null @@ -1,34 +0,0 @@ ---ダーク・スプロケッター -function c61632317.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(61632317,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_BE_MATERIAL) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) - e1:SetCondition(c61632317.descon) - e1:SetTarget(c61632317.destg) - e1:SetOperation(c61632317.desop) - c:RegisterEffect(e1) -end -function c61632317.descon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsLocation(LOCATION_GRAVE) and r==REASON_SYNCHRO - and e:GetHandler():GetReasonCard():IsAttribute(ATTRIBUTE_DARK) -end -function c61632317.filter(c) - return c:IsFaceup() and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable() -end -function c61632317.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and c61632317.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c61632317.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c61632317.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c61632317.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c61639289.lua b/script/c61639289.lua deleted file mode 100644 index 690cfe2142..0000000000 --- a/script/c61639289.lua +++ /dev/null @@ -1,50 +0,0 @@ ---イグナイト・イーグル -function c61639289.initial_effect(c) - --pendulum summon - aux.AddPendulumProcedure(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --tohand - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_DESTROY+CATEGORY_TOHAND+CATEGORY_SEARCH) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_PZONE) - e2:SetCondition(c61639289.thcon) - e2:SetTarget(c61639289.thtg) - e2:SetOperation(c61639289.thop) - c:RegisterEffect(e2) -end -function c61639289.thcon(e,tp,eg,ep,ev,re,r,rp) - local seq=e:GetHandler():GetSequence() - local pc=Duel.GetFieldCard(tp,LOCATION_SZONE,13-seq) - return pc and pc:IsSetCard(0xc8) -end -function c61639289.filter(c) - return c:IsRace(RACE_WARRIOR) and c:IsAttribute(ATTRIBUTE_FIRE) and c:IsAbleToHand() -end -function c61639289.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - local pc=Duel.GetFieldCard(tp,LOCATION_SZONE,13-c:GetSequence()) - if chk==0 then return c:IsDestructable() and pc:IsDestructable() - and Duel.IsExistingMatchingCard(c61639289.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end - local g=Group.FromCards(c,pc) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,2,0,0) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE) -end -function c61639289.thop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) then return end - local pc=Duel.GetFieldCard(tp,LOCATION_SZONE,13-c:GetSequence()) - if not pc then return end - local dg=Group.FromCards(c,pc) - if Duel.Destroy(dg,REASON_EFFECT)~=2 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c61639289.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil) - if g:GetCount()>0 and not g:GetFirst():IsHasEffect(EFFECT_NECRO_VALLEY) then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c61650133.lua b/script/c61650133.lua deleted file mode 100644 index 689ad2e995..0000000000 --- a/script/c61650133.lua +++ /dev/null @@ -1,65 +0,0 @@ ---召喚の呪詛 -function c61650133.initial_effect(c) - --activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --maintain - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e2:SetCode(EVENT_PHASE+PHASE_END) - e2:SetRange(LOCATION_SZONE) - e2:SetCountLimit(1) - e2:SetCondition(c61650133.mtcon) - e2:SetOperation(c61650133.mtop) - c:RegisterEffect(e2) - --remove - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(61650133,0)) - e3:SetCategory(CATEGORY_REMOVE) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - e3:SetRange(LOCATION_SZONE) - e3:SetTarget(c61650133.rmtg) - e3:SetOperation(c61650133.rmop) - c:RegisterEffect(e3) -end -function c61650133.mtcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c61650133.mtop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLP(tp)>500 and Duel.SelectYesNo(tp,aux.Stringid(61650133,0)) then - Duel.PayLPCost(tp,500) - else - Duel.Destroy(e:GetHandler(),REASON_RULE) - end -end -function c61650133.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsRelateToEffect(e) end -end -function c61650133.rmop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local rm1=false - local rm2=false - local tc=eg:GetFirst() - while tc do - if tc:IsOnField() then - if tc:IsControler(tp) then rm1=true else rm2=true end - end - tc=eg:GetNext() - end - local g=Group.CreateGroup() - if rm1 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g1=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_HAND,0,1,1,nil) - g:Merge(g1) - end - if rm2 then - Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_REMOVE) - local g2=Duel.SelectMatchingCard(1-tp,Card.IsAbleToRemove,1-tp,LOCATION_HAND,0,1,1,nil) - g:Merge(g2) - end - Duel.Remove(g,POS_FACEUP,REASON_EFFECT) -end diff --git a/script/c6165656.lua b/script/c6165656.lua deleted file mode 100644 index 773290b8e7..0000000000 --- a/script/c6165656.lua +++ /dev/null @@ -1,68 +0,0 @@ ---CNo.88 ギミック・パペット-ディザスター・レオ -function c6165656.initial_effect(c) - --xyz summon - c:EnableReviveLimit() - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(c6165656.splimit) - c:RegisterEffect(e1) - -- - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) - e2:SetRange(LOCATION_MZONE) - e2:SetValue(aux.tgval) - c:RegisterEffect(e2) - --damage - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(6165656,0)) - e3:SetCategory(CATEGORY_DAMAGE) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1) - e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e3:SetCost(c6165656.cost) - e3:SetTarget(c6165656.target) - e3:SetOperation(c6165656.operation) - c:RegisterEffect(e3) - --win - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_DELAY) - e4:SetRange(LOCATION_MZONE) - e4:SetCode(EVENT_PHASE+PHASE_END) - e4:SetCountLimit(1) - e4:SetCondition(c6165656.wincon) - e4:SetOperation(c6165656.winop) - c:RegisterEffect(e4) -end -c6165656.xyz_number=88 ---target check is in RUM magic cards -function c6165656.splimit(e,se,sp,st) - return se:GetHandler():IsSetCard(0x95) and se:GetHandler():IsType(TYPE_SPELL) -end -function c6165656.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c6165656.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(1000) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,1000) -end -function c6165656.operation(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end -function c6165656.wincon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp and Duel.GetLP(1-tp)<=2000 and e:GetHandler():GetOverlayCount()==0 -end -function c6165656.winop(e,tp,eg,ep,ev,re,r,rp) - local WIN_REASON_DISASTER_LEO=0x18 - Duel.Win(tp,WIN_REASON_DISASTER_LEO) -end diff --git a/script/c61656650.lua b/script/c61656650.lua deleted file mode 100644 index f0ae24453e..0000000000 --- a/script/c61656650.lua +++ /dev/null @@ -1,38 +0,0 @@ ---悲劇の引き金 -function c61656650.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_CHAINING) - e1:SetCondition(c61656650.efcon) - e1:SetTarget(c61656650.eftg) - e1:SetOperation(c61656650.efop) - c:RegisterEffect(e1) -end -function c61656650.efcon(e,tp,eg,ep,ev,re,r,rp) - if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end - local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) - if not g or g:GetCount()~=1 then return false end - local tc=g:GetFirst() - local ex,dg=Duel.GetOperationInfo(0,CATEGORY_DESTROY) - return tc:IsControler(tp) and dg and dg:GetCount()==1 and dg:GetFirst()==tc and tc:IsType(TYPE_MONSTER) -end -function c61656650.filter(c,re,rp,tf) - return tf(re,rp,nil,nil,nil,nil,nil,nil,0,c) -end -function c61656650.eftg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - local tf=re:GetTarget() - if chk==0 then return Duel.IsExistingTarget(c61656650.filter,tp,0,LOCATION_MZONE,1,nil,re,rp,tf) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - Duel.SelectTarget(tp,c61656650.filter,tp,0,LOCATION_MZONE,1,1,nil,re,rp,tf) -end -function c61656650.efop(e,tp,eg,ep,ev,re,r,rp) - local tf=re:GetTarget() - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tf(re,rp,nil,nil,nil,nil,nil,nil,0,tc) then - local g=Group.FromCards(tc) - Duel.ChangeTargetCard(ev,g) - end -end diff --git a/script/c61679541.lua b/script/c61679541.lua deleted file mode 100644 index 8320de70ee..0000000000 --- a/script/c61679541.lua +++ /dev/null @@ -1,24 +0,0 @@ ---BK ラビット・パンチャー -function c61679541.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(61679541,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_BATTLE_START) - e1:SetTarget(c61679541.targ) - e1:SetOperation(c61679541.op) - c:RegisterEffect(e1) -end -function c61679541.targ(e,tp,eg,ep,ev,re,r,rp,chk) - local d=Duel.GetAttackTarget() - if chk ==0 then return Duel.GetAttacker()==e:GetHandler() - and d~=nil and d:IsDefencePos() and d:IsDestructable() end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,d,1,0,0) -end -function c61679541.op(e,tp,eg,ep,ev,re,r,rp) - local d=Duel.GetAttackTarget() - if d~=nil and d:IsRelateToBattle() and d:IsDefencePos() then - Duel.Destroy(d,REASON_EFFECT) - end -end diff --git a/script/c61692648.lua b/script/c61692648.lua deleted file mode 100644 index 79aa68f3e6..0000000000 --- a/script/c61692648.lua +++ /dev/null @@ -1,18 +0,0 @@ ---勇気機関車ブレイブポッポ -function c61692648.initial_effect(c) - --atkup - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetOperation(c61692648.atkop) - c:RegisterEffect(e1) -end -function c61692648.atkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetValue(math.ceil(c:GetBaseAttack()/2)) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_DAMAGE) - c:RegisterEffect(e1) -end \ No newline at end of file diff --git a/script/c61705417.lua b/script/c61705417.lua deleted file mode 100644 index d653a4dc1e..0000000000 --- a/script/c61705417.lua +++ /dev/null @@ -1,76 +0,0 @@ ---墓荒らし -function c61705417.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c61705417.target) - e1:SetOperation(c61705417.activate) - c:RegisterEffect(e1) -end -function c61705417.filter(c) - return c:IsType(TYPE_SPELL) and c:IsAbleToHand() -end -function c61705417.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_GRAVE) and c61705417.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c61705417.filter,tp,0,LOCATION_GRAVE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c61705417.filter,tp,0,LOCATION_GRAVE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c61705417.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,tp,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - tc:RegisterFlagEffect(61705417,RESET_EVENT+0x5c0000+RESET_PHASE+PHASE_END,0,1) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetCountLimit(1) - e1:SetCondition(c61705417.tgcon) - e1:SetOperation(c61705417.tgop) - e1:SetLabelObject(tc) - e1:SetReset(RESET_EVENT+0x5c0000+RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EFFECT_SEND_REPLACE) - e2:SetTarget(c61705417.reptg) - e2:SetReset(RESET_EVENT+0x5c0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e2) - local e3=Effect.CreateEffect(e:GetHandler()) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e3:SetCode(EVENT_CHAIN_SOLVED) - e3:SetCondition(c61705417.actcon) - e3:SetOperation(c61705417.actop) - e3:SetLabelObject(tc) - e3:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e3,tp) - end -end -function c61705417.tgcon(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetLabelObject() - return tc:GetControler()~=tc:GetOwner() and tc:GetFlagEffect(61705417)~=0 -end -function c61705417.tgop(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetLabelObject() - Duel.SendtoGrave(tc,REASON_EFFECT) -end -function c61705417.reptg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsReason(REASON_COST) and c:GetControler()~=c:GetOwner() - and not c:IsStatus(STATUS_CHAINING+STATUS_ACTIVATED) end - Duel.Damage(c:GetControler(),2000,REASON_EFFECT) - return false -end -function c61705417.actcon(e,tp,eg,ep,ev,re,r,rp) - return rp==tp and re:GetHandler()==e:GetLabelObject() and re:GetHandler():GetFlagEffect(61705417)~=0 -end -function c61705417.actop(e,tp,eg,ep,ev,re,r,rp) - Duel.Damage(tp,2000,REASON_EFFECT) - e:Reset() -end diff --git a/script/c6172122.lua b/script/c6172122.lua deleted file mode 100644 index 6640fa40d7..0000000000 --- a/script/c6172122.lua +++ /dev/null @@ -1,96 +0,0 @@ ---真紅眼融合 -function c6172122.initial_effect(c) - --activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,6172122+EFFECT_COUNT_CODE_OATH) - e1:SetCost(c6172122.cost) - e1:SetTarget(c6172122.target) - e1:SetOperation(c6172122.activate) - c:RegisterEffect(e1) -end -function c6172122.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_SUMMON)==0 and Duel.GetActivityCount(tp,ACTIVITY_SPSUMMON)==0 end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_SUMMON) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) - e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+RESET_END) - Duel.RegisterEffect(e1,tp) - local e2=e1:Clone() - e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e2:SetLabelObject(e) - e2:SetTarget(c6172122.splimit) - Duel.RegisterEffect(e2,tp) -end -function c6172122.splimit(e,c,sump,sumtype,sumpos,targetp,se) - return se~=e:GetLabelObject() -end -function c6172122.filter1(c,e) - return c:IsCanBeFusionMaterial() and c:IsAbleToGrave() and not c:IsImmuneToEffect(e) -end -function c6172122.filter2(c,e,tp,m,f,chkf) - return c:IsType(TYPE_FUSION) and c:IsSetCard(0x104) and (not f or f(c)) - and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf) -end -function c6172122.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp - local mg1=Duel.GetMatchingGroup(c6172122.filter1,tp,0x07,0,nil,e) - local res=Duel.IsExistingMatchingCard(c6172122.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf) - if not res then - local ce=Duel.GetChainMaterial(tp) - if ce~=nil then - local fgroup=ce:GetTarget() - local mg2=fgroup(ce,e,tp) - local mf=ce:GetValue() - res=Duel.IsExistingMatchingCard(c6172122.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,chkf) - end - end - return res - end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function c6172122.activate(e,tp,eg,ep,ev,re,r,rp) - local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp - local mg1=Duel.GetMatchingGroup(c6172122.filter1,tp,0x07,0,nil,e) - local sg1=Duel.GetMatchingGroup(c6172122.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf) - local mg2=nil - local sg2=nil - local ce=Duel.GetChainMaterial(tp) - if ce~=nil then - local fgroup=ce:GetTarget() - mg2=fgroup(ce,e,tp) - local mf=ce:GetValue() - sg2=Duel.GetMatchingGroup(c6172122.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,mf,chkf) - end - if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then - local sg=sg1:Clone() - if sg2 then sg:Merge(sg2) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local tg=sg:Select(tp,1,1,nil) - local tc=tg:GetFirst() - if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then - local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf) - tc:SetMaterial(mat1) - Duel.SendtoGrave(mat1,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION) - Duel.BreakEffect() - Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP) - else - local mat2=Duel.SelectFusionMaterial(tp,tc,mg2,nil,chkf) - local fop=ce:GetOperation() - fop(ce,e,tp,tc,mat2) - end - tc:CompleteProcedure() - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CHANGE_CODE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetValue(74677422) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - end -end diff --git a/script/c61737116.lua b/script/c61737116.lua deleted file mode 100644 index 1149ad873b..0000000000 --- a/script/c61737116.lua +++ /dev/null @@ -1,17 +0,0 @@ ---六武衆のご隠居 -function c61737116.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c61737116.spcon) - c:RegisterEffect(e1) -end -function c61737116.spcon(e,c) - if c==nil then return true end - return Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0,nil)==0 - and Duel.GetFieldGroupCount(c:GetControler(),0,LOCATION_MZONE,nil)>0 - and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 -end diff --git a/script/c61740673.lua b/script/c61740673.lua deleted file mode 100644 index b95049c6b6..0000000000 --- a/script/c61740673.lua +++ /dev/null @@ -1,52 +0,0 @@ ---王宮の勅命 -function c61740673.initial_effect(c) - --activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --disable - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_DISABLE) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(LOCATION_SZONE,LOCATION_SZONE) - e2:SetTarget(c61740673.distarget) - c:RegisterEffect(e2) - --disable effect - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e3:SetCode(EVENT_CHAIN_SOLVING) - e3:SetRange(LOCATION_SZONE) - e3:SetOperation(c61740673.disoperation) - c:RegisterEffect(e3) - --maintain - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e4:SetCode(EVENT_PHASE+PHASE_STANDBY) - e4:SetRange(LOCATION_SZONE) - e4:SetCountLimit(1) - e4:SetCondition(c61740673.mtcon) - e4:SetOperation(c61740673.mtop) - c:RegisterEffect(e4) -end -function c61740673.distarget(e,c) - return c~=e:GetHandler() and c:IsType(TYPE_SPELL) -end -function c61740673.disoperation(e,tp,eg,ep,ev,re,r,rp) - local tl=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION) - if tl==LOCATION_SZONE and re:IsActiveType(TYPE_SPELL) then - Duel.NegateEffect(ev) - end -end -function c61740673.mtcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c61740673.mtop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLP(tp)>700 and Duel.SelectYesNo(tp,aux.Stringid(61740673,0)) then - Duel.PayLPCost(tp,700) - else - Duel.Destroy(e:GetHandler(),REASON_RULE) - end -end diff --git a/script/c61757117.lua b/script/c61757117.lua deleted file mode 100644 index 0b0c909f35..0000000000 --- a/script/c61757117.lua +++ /dev/null @@ -1,47 +0,0 @@ ---救世の美神ノースウェムコ -function c61757117.initial_effect(c) - c:EnableReviveLimit() - --set target - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetDescription(aux.Stringid(61757117,0)) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(c61757117.condition) - e1:SetTarget(c61757117.target) - e1:SetOperation(c61757117.operation) - c:RegisterEffect(e1) - --indestructable - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - e2:SetCondition(c61757117.indcon) - e2:SetValue(1) - c:RegisterEffect(e2) -end -function c61757117.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_RITUAL -end -function c61757117.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsFaceup() and chkc~=e:GetHandler() end - if chk==0 then return true end - local c=e:GetHandler() - local ct=c:GetMaterialCount() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,ct,c) -end -function c61757117.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local tc=g:GetFirst() - local c=e:GetHandler() - if c:IsFacedown() or not c:IsRelateToEffect(e) then return end - while tc do - if tc:IsFaceup() and tc:IsRelateToEffect(e) then c:SetCardTarget(tc) end - tc=g:GetNext() - end -end -function c61757117.indcon(e) - return e:GetHandler():GetCardTargetCount()>0 -end diff --git a/script/c61777313.lua b/script/c61777313.lua deleted file mode 100644 index 10da7828b9..0000000000 --- a/script/c61777313.lua +++ /dev/null @@ -1,65 +0,0 @@ ---極星天ヴァナディース -function c61777313.initial_effect(c) - --synchro custom - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SYNCHRO_MATERIAL_CUSTOM) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetTarget(c61777313.syntg) - e1:SetValue(1) - e1:SetOperation(c61777313.synop) - c:RegisterEffect(e1) - --level change - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(61777313,0)) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetCountLimit(1) - e2:SetRange(LOCATION_MZONE) - e2:SetCost(c61777313.cost) - e2:SetOperation(c61777313.operation) - c:RegisterEffect(e2) -end -function c61777313.tuner_filter(c) - return c:IsSetCard(0x42) -end -function c61777313.synfilter(c,syncard,tuner,f) - return c:IsFaceup() and c:IsNotTuner() and c:IsCanBeSynchroMaterial(syncard,tuner) and c:IsSetCard(0x42) and (f==nil or f(c)) -end -function c61777313.syntg(e,syncard,f,minc,maxc) - local c=e:GetHandler() - local lv=syncard:GetLevel()-c:GetLevel() - if lv<=0 then return false end - local g=Duel.GetMatchingGroup(c61777313.synfilter,syncard:GetControler(),LOCATION_MZONE,LOCATION_MZONE,c,syncard,c,f) - return g:CheckWithSumEqual(Card.GetSynchroLevel,lv,minc,maxc,syncard) -end -function c61777313.synop(e,tp,eg,ep,ev,re,r,rp,syncard,f,minc,maxc) - local c=e:GetHandler() - local lv=syncard:GetLevel()-c:GetLevel() - local g=Duel.GetMatchingGroup(c61777313.synfilter,syncard:GetControler(),LOCATION_MZONE,LOCATION_MZONE,c,syncard,c,f) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SMATERIAL) - local sg=g:SelectWithSumEqual(tp,Card.GetSynchroLevel,lv,minc,maxc,syncard) - Duel.SetSynchroMaterial(sg) -end -function c61777313.cfilter(c,lv) - local clv=c:GetLevel() - return c:IsSetCard(0x42) and clv>0 and clv~=lv and c:IsAbleToGraveAsCost() -end -function c61777313.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c61777313.cfilter,tp,LOCATION_DECK,0,1,nil,e:GetHandler():GetLevel()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c61777313.cfilter,tp,LOCATION_DECK,0,1,1,nil,e:GetHandler():GetLevel()) - Duel.SendtoGrave(g,REASON_COST) - e:SetLabel(g:GetFirst():GetLevel()) -end -function c61777313.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CHANGE_LEVEL) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e1:SetValue(e:GetLabel()) - c:RegisterEffect(e1) - end -end diff --git a/script/c6178850.lua b/script/c6178850.lua deleted file mode 100644 index 981e98cb61..0000000000 --- a/script/c6178850.lua +++ /dev/null @@ -1,58 +0,0 @@ ---ファイティング・スピリッツ -function c6178850.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c6178850.target) - e1:SetOperation(c6178850.operation) - c:RegisterEffect(e1) - --Atk,def - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(c6178850.value) - c:RegisterEffect(e2) - --desrep - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_EQUIP) - e3:SetCode(EFFECT_DESTROY_REPLACE) - e3:SetTarget(c6178850.destg) - e3:SetOperation(c6178850.desop) - c:RegisterEffect(e3) - --Equip limit - local e4=Effect.CreateEffect(c) - e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetCode(EFFECT_EQUIP_LIMIT) - e4:SetValue(1) - c:RegisterEffect(e4) -end -function c6178850.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c6178850.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,e:GetHandler(),tc) - end -end -function c6178850.value(e,c) - return Duel.GetFieldGroupCount(e:GetHandlerPlayer(),0,LOCATION_MZONE)*300 -end -function c6178850.destg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - local tg=c:GetEquipTarget() - if chk==0 then return c and not c:IsStatus(STATUS_DESTROY_CONFIRMED) - and tg and tg:IsReason(REASON_BATTLE) end - return Duel.SelectYesNo(tp,aux.Stringid(6178850,0)) -end -function c6178850.desop(e,tp,eg,ep,ev,re,r,rp) - Duel.Destroy(e:GetHandler(),REASON_EFFECT+REASON_REPLACE) -end diff --git a/script/c61791132.lua b/script/c61791132.lua deleted file mode 100644 index 5fbb7c8d42..0000000000 --- a/script/c61791132.lua +++ /dev/null @@ -1,26 +0,0 @@ ---マリスボラス・フォーク -function c61791132.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c61791132.spcon) - e1:SetOperation(c61791132.spop) - c:RegisterEffect(e1) -end -function c61791132.spfilter(c) - return c:IsRace(RACE_FIEND) and c:IsAbleToGraveAsCost() -end -function c61791132.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c61791132.spfilter,tp,LOCATION_HAND,0,1,c) -end -function c61791132.spop(e,tp,eg,ep,ev,re,r,rp,c) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c61791132.spfilter,tp,LOCATION_HAND,0,1,1,c) - Duel.SendtoGrave(g,REASON_COST) -end diff --git a/script/c61802346.lua b/script/c61802346.lua deleted file mode 100644 index 5a818f87d6..0000000000 --- a/script/c61802346.lua +++ /dev/null @@ -1,34 +0,0 @@ ---ブリザード・ドラゴン -function c61802346.initial_effect(c) - -- - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(61802346,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetTarget(c61802346.target) - e1:SetOperation(c61802346.operation) - c:RegisterEffect(e1) -end -function c61802346.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) end - if chk==0 then return Duel.IsExistingTarget(nil,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - Duel.SelectTarget(tp,nil,tp,0,LOCATION_MZONE,1,1,nil) -end -function c61802346.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,2) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_CANNOT_CHANGE_POSITION) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,2) - tc:RegisterEffect(e2) - end -end diff --git a/script/c61807040.lua b/script/c61807040.lua deleted file mode 100644 index 101af5ad03..0000000000 --- a/script/c61807040.lua +++ /dev/null @@ -1,34 +0,0 @@ ---フルエルフ -function c61807040.initial_effect(c) - --lvup - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(61807040,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCost(c61807040.cost) - e1:SetOperation(c61807040.operation) - c:RegisterEffect(e1) -end -function c61807040.cfilter(c) - return c:IsType(TYPE_MONSTER) and not c:IsPublic() -end -function c61807040.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c61807040.cfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) - local g=Duel.SelectMatchingCard(tp,c61807040.cfilter,tp,LOCATION_HAND,0,1,1,nil) - Duel.ConfirmCards(1-tp,g) - Duel.ShuffleHand(tp) - e:SetLabel(g:GetFirst():GetLevel()) -end -function c61807040.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFaceup() and c:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_LEVEL) - e1:SetValue(e:GetLabel()) - e1:SetReset(RESET_EVENT+0x1ff0000+RESET_PHASE+PHASE_END) - c:RegisterEffect(e1) - end -end diff --git a/script/c61831093.lua b/script/c61831093.lua deleted file mode 100644 index ae763b9d0f..0000000000 --- a/script/c61831093.lua +++ /dev/null @@ -1,38 +0,0 @@ ---ドッペルゲンガー -function c61831093.initial_effect(c) - --flip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(61831093,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP) - e1:SetTarget(c61831093.target) - e1:SetOperation(c61831093.operation) - c:RegisterEffect(e1) -end -function c61831093.filter(c,e) - return c:IsFacedown() and c:IsDestructable() and c:IsCanBeEffectTarget(e) -end -function c61831093.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_SZONE) and c61831093.filter(chkc,e) end - if chk==0 then return true end - local g=Duel.GetMatchingGroup(c61831093.filter,tp,LOCATION_SZONE,LOCATION_SZONE,nil,e) - if g:GetCount()<2 then - g:Clear() - Duel.SetTargetCard(g) - return - end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local sg=g:Select(tp,2,2,nil) - Duel.SetTargetCard(sg) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,2,0,0) -end -function c61831093.dfilter(c,e) - return c:IsRelateToEffect(e) and c:IsFacedown() -end -function c61831093.operation(e,tp,eg,ep,ev,re,r,rp) - local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - if not tg then return end - local dg=tg:Filter(c61831093.dfilter,nil,e) - Duel.Destroy(dg,REASON_EFFECT) -end diff --git a/script/c61840587.lua b/script/c61840587.lua deleted file mode 100644 index 08d8c627f8..0000000000 --- a/script/c61840587.lua +++ /dev/null @@ -1,93 +0,0 @@ ---携帯型バッテリー -function c61840587.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_END_PHASE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c61840587.target) - e1:SetOperation(c61840587.operation) - c:RegisterEffect(e1) - --Destroy - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE) - e2:SetCode(EVENT_LEAVE_FIELD) - e2:SetOperation(c61840587.desop) - e2:SetLabelObject(e1) - c:RegisterEffect(e2) - --Destroy2 - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e3:SetRange(LOCATION_SZONE) - e3:SetCode(EVENT_LEAVE_FIELD) - e3:SetCondition(c61840587.descon2) - e3:SetOperation(c61840587.desop2) - e3:SetLabelObject(e1) - c:RegisterEffect(e3) -end -function c61840587.filter(c,e,tp) - return c:IsSetCard(0x28) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c61840587.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c61840587.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>1 - and Duel.IsExistingTarget(c61840587.filter,tp,LOCATION_GRAVE,0,2,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c61840587.filter,tp,LOCATION_GRAVE,0,2,2,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,2,0,0) - if e:GetLabelObject() then e:GetLabelObject():DeleteGroup() end - e:SetLabelObject(nil) -end -function c61840587.sfilter(c,e,tp) - return c:IsRelateToEffect(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c61840587.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) then return end - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local sg=g:Filter(c61840587.sfilter,nil,e,tp) - local sct=sg:GetCount() - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if sct==0 or ft<=0 then return end - if sct>ft then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - sg=sg:Select(tp,ft,ft,nil) - sct=ft - end - Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP_ATTACK) - local tc=sg:GetFirst() - c:SetCardTarget(tc) - tc:CreateRelation(c,RESET_EVENT+0x1020000) - if sct>1 then - local tc2=sg:GetNext() - c:SetCardTarget(tc2) - tc2:CreateRelation(c,RESET_EVENT+0x1020000) - end - e:SetLabelObject(sg) - sg:KeepAlive() -end -function c61840587.desfilter1(c,rc) - return c:IsRelateToCard(rc) and c:IsLocation(LOCATION_MZONE) and not c:IsStatus(STATUS_DESTROY_CONFIRMED+STATUS_BATTLE_DESTROYED) -end -function c61840587.desop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local sg=e:GetLabelObject():GetLabelObject() - if not sg then return end - Duel.Destroy(sg:Filter(c61840587.desfilter1,nil,c),REASON_EFFECT) - sg:DeleteGroup() - e:SetLabelObject(nil) -end -function c61840587.descon2(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local sg=e:GetLabelObject():GetLabelObject() - if not sg or c:IsStatus(STATUS_DESTROY_CONFIRMED) then return false end - local rg=eg:Filter(Card.IsRelateToCard,nil,c) - local tc=rg:GetFirst() - while tc do sg:RemoveCard(tc) tc=rg:GetNext() end - return sg:GetCount()==0 -end -function c61840587.desop2(e,tp,eg,ep,ev,re,r,rp) - Duel.Destroy(e:GetHandler(),REASON_EFFECT) -end diff --git a/script/c61844784.lua b/script/c61844784.lua deleted file mode 100644 index 9065e300f3..0000000000 --- a/script/c61844784.lua +++ /dev/null @@ -1,42 +0,0 @@ ---マジック・ガードナー -function c61844784.initial_effect(c) - --destroy rep - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_COUNTER) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c61844784.addct) - e1:SetOperation(c61844784.addc) - c:RegisterEffect(e1) -end -function c61844784.filter(c) - return c:IsFaceup() and c:IsType(TYPE_SPELL) -end -function c61844784.addct(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_SZONE) and chkc:IsControler(tp) and c61844784.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c61844784.filter,tp,LOCATION_SZONE,0,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(61844784,0)) - Duel.SelectTarget(tp,c61844784.filter,tp,LOCATION_SZONE,0,1,1,e:GetHandler()) -end -function c61844784.addc(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - tc:AddCounter(0x2a,1) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EFFECT_DESTROY_REPLACE) - e1:SetTarget(c61844784.reptg) - e1:SetOperation(c61844784.repop) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - end -end -function c61844784.reptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return bit.band(r,REASON_RULE)==0 - and e:GetHandler():GetCounter(0x2a)>0 end - return true -end -function c61844784.repop(e,tp,eg,ep,ev,re,r,rp,chk) - e:GetHandler():RemoveCounter(tp,0x2a,1,REASON_EFFECT) -end diff --git a/script/c61850482.lua b/script/c61850482.lua deleted file mode 100644 index e1dbd1da5e..0000000000 --- a/script/c61850482.lua +++ /dev/null @@ -1,47 +0,0 @@ ---レベル調整 -function c61850482.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DRAW) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c61850482.target) - e1:SetOperation(c61850482.activate) - c:RegisterEffect(e1) -end -function c61850482.filter(c,e,tp) - return c:IsSetCard(0x41) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) -end -function c61850482.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c61850482.filter(chkc,e,tp) end - if chk==0 then return Duel.IsPlayerCanDraw(1-tp,2) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c61850482.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c61850482.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_DRAW,0,0,1-tp,2) -end -function c61850482.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.Draw(1-tp,2,REASON_EFFECT) - Duel.BreakEffect() - local tc=Duel.GetFirstTarget() - if not tc:IsRelateToEffect(e) then return end - if Duel.SpecialSummon(tc,0,tp,tp,true,false,POS_FACEUP)==0 then return end - local c=e:GetHandler() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1,true) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e2,true) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_CANNOT_TRIGGER) - e3:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e3,true) -end diff --git a/script/c61854111.lua b/script/c61854111.lua deleted file mode 100644 index c447e38748..0000000000 --- a/script/c61854111.lua +++ /dev/null @@ -1,50 +0,0 @@ ---伝説の剣 -function c61854111.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c61854111.target) - e1:SetOperation(c61854111.operation) - c:RegisterEffect(e1) - --atk up - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(300) - c:RegisterEffect(e2) - --def up - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_EQUIP) - e3:SetCode(EFFECT_UPDATE_DEFENCE) - e3:SetValue(300) - c:RegisterEffect(e3) - --equip limit - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetCode(EFFECT_EQUIP_LIMIT) - e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e4:SetValue(c61854111.eqlimit) - c:RegisterEffect(e4) -end -function c61854111.eqlimit(e,c) - return c:IsRace(RACE_WARRIOR) -end -function c61854111.filter(c) - return c:IsFaceup() and c:IsRace(RACE_WARRIOR) -end -function c61854111.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c61854111.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c61854111.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c61854111.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c61854111.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,e:GetHandler(),tc) - end -end diff --git a/script/c61864793.lua b/script/c61864793.lua deleted file mode 100644 index 7f3d9b7343..0000000000 --- a/script/c61864793.lua +++ /dev/null @@ -1,31 +0,0 @@ ---アースクエイク・ジャイアント -function c61864793.initial_effect(c) - --pos - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(61864793,0)) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_CHANGE_POS) - e1:SetCondition(c61864793.poscon) - e1:SetTarget(c61864793.postg) - e1:SetOperation(c61864793.posop) - c:RegisterEffect(e1) -end -function c61864793.poscon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local np=c:GetPosition() - local pp=c:GetPreviousPosition() - return not c:IsStatus(STATUS_CONTINUOUS_POS) and (Duel.GetCurrentPhase()~=PHASE_DAMAGE or c~=Duel.GetAttackTarget()) -end -function c61864793.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) end - if chk==0 then return Duel.IsExistingTarget(nil,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - Duel.SelectTarget(tp,nil,tp,0,LOCATION_MZONE,1,1,nil) -end -function c61864793.posop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.ChangePosition(tc,POS_FACEUP_DEFENCE,POS_FACEDOWN_DEFENCE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK) - end -end diff --git a/script/c61901281.lua b/script/c61901281.lua deleted file mode 100644 index 104e60f2b8..0000000000 --- a/script/c61901281.lua +++ /dev/null @@ -1,63 +0,0 @@ ---暗黒竜 コラプサーペント -function c61901281.initial_effect(c) - c:EnableReviveLimit() - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_SPSUMMON_PROC) - e2:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e2:SetRange(LOCATION_HAND) - e2:SetCountLimit(1,61901281) - e2:SetCondition(c61901281.spcon) - e2:SetOperation(c61901281.spop) - c:RegisterEffect(e2) - --search - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(61901281,0)) - e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e3:SetCode(EVENT_TO_GRAVE) - e3:SetCondition(c61901281.condition) - e3:SetTarget(c61901281.target) - e3:SetOperation(c61901281.operation) - c:RegisterEffect(e3) -end -function c61901281.spfilter(c) - return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsAbleToRemoveAsCost() -end -function c61901281.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c61901281.spfilter,tp,LOCATION_GRAVE,0,1,nil) -end -function c61901281.spop(e,tp,eg,ep,ev,re,r,rp,c) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c61901281.spfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c61901281.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) -end -function c61901281.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c61901281.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c61901281.filter(c) - return c:IsCode(99234526) and c:IsAbleToHand() -end -function c61901281.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c61901281.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c61948106.lua b/script/c61948106.lua deleted file mode 100644 index ea81845bba..0000000000 --- a/script/c61948106.lua +++ /dev/null @@ -1,90 +0,0 @@ ---ガトムズの非常召集 -function c61948106.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCountLimit(1,61948106+EFFECT_COUNT_CODE_OATH) - e1:SetCondition(c61948106.spcon) - e1:SetCost(c61948106.spcost) - e1:SetTarget(c61948106.sptg) - e1:SetOperation(c61948106.spop) - c:RegisterEffect(e1) -end -function c61948106.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetCurrentPhase()~=PHASE_MAIN2 end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_BP) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) - e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function c61948106.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x100d) and c:IsType(TYPE_SYNCHRO) -end -function c61948106.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c61948106.cfilter,tp,LOCATION_MZONE,0,1,nil) -end -function c61948106.spfilter(c,e,tp) - return c:IsSetCard(0x100d) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) -end -function c61948106.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c61948106.spfilter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>1 - and Duel.IsExistingTarget(c61948106.spfilter,tp,LOCATION_GRAVE,0,2,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c61948106.spfilter,tp,LOCATION_GRAVE,0,2,2,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,2,0,0) -end -function c61948106.spop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) - if g:GetCount()~=2 then return end - if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 then return end - local c=e:GetHandler() - local fid=c:GetFieldID() - local tc=g:GetFirst() - while tc do - if Duel.SpecialSummonStep(tc,0,tp,tp,true,false,POS_FACEUP) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetValue(0) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - tc:RegisterFlagEffect(61948106,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1,fid) - end - tc=g:GetNext() - end - Duel.SpecialSummonComplete() - g:KeepAlive() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e1:SetReset(RESET_PHASE+PHASE_END) - e1:SetCountLimit(1) - e1:SetLabel(fid) - e1:SetLabelObject(g) - e1:SetCondition(c61948106.descon) - e1:SetOperation(c61948106.desop) - Duel.RegisterEffect(e1,tp) -end -function c61948106.desfilter(c,fid) - return c:GetFlagEffectLabel(61948106)==fid -end -function c61948106.descon(e,tp,eg,ep,ev,re,r,rp) - local g=e:GetLabelObject() - if not g:IsExists(c61948106.desfilter,1,nil,e:GetLabel()) then - g:DeleteGroup() - return false - else return true end -end -function c61948106.desop(e,tp,eg,ep,ev,re,r,rp) - local g=e:GetLabelObject() - local tg=g:Filter(c61948106.desfilter,nil,e:GetLabel()) - Duel.Destroy(tg,REASON_EFFECT) -end diff --git a/script/c61962135.lua b/script/c61962135.lua deleted file mode 100644 index 351421b1c8..0000000000 --- a/script/c61962135.lua +++ /dev/null @@ -1,83 +0,0 @@ ---閃光のイリュージョン -function c61962135.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_END_PHASE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c61962135.target) - e1:SetOperation(c61962135.operation) - c:RegisterEffect(e1) - --Destroy - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE) - e2:SetCode(EVENT_LEAVE_FIELD) - e2:SetOperation(c61962135.desop) - c:RegisterEffect(e2) - --Destroy2 - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e3:SetRange(LOCATION_SZONE) - e3:SetCode(EVENT_LEAVE_FIELD) - e3:SetCondition(c61962135.descon2) - e3:SetOperation(c61962135.desop2) - c:RegisterEffect(e3) - --discard deck - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e4:SetCategory(CATEGORY_DECKDES) - e4:SetDescription(aux.Stringid(61962135,0)) - e4:SetCode(EVENT_PHASE+PHASE_END) - e4:SetRange(LOCATION_SZONE) - e4:SetCountLimit(1) - e4:SetCondition(c61962135.discon) - e4:SetTarget(c61962135.distg) - e4:SetOperation(c61962135.disop) - c:RegisterEffect(e4) -end -function c61962135.filter(c,e,tp) - return c:IsSetCard(0x38) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c61962135.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c61962135.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c61962135.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c61962135.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c61962135.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then - if Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_ATTACK)==0 then return end - c:SetCardTarget(tc) - end -end -function c61962135.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetHandler():GetFirstCardTarget() - if tc and tc:IsLocation(LOCATION_MZONE) then - Duel.Destroy(tc,REASON_EFFECT) - end -end -function c61962135.descon2(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetHandler():GetFirstCardTarget() - return tc and eg:IsContains(tc) -end -function c61962135.desop2(e,tp,eg,ep,ev,re,r,rp) - Duel.Destroy(e:GetHandler(),REASON_EFFECT) -end -function c61962135.discon(e,tp,eg,ep,ev,re,r,rp) - return tp==Duel.GetTurnPlayer() -end -function c61962135.distg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,2) -end -function c61962135.disop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:GetControler()~=tp or not c:IsRelateToEffect(e) or c:IsFacedown() then return end - Duel.DiscardDeck(tp,2,REASON_EFFECT) -end diff --git a/script/c61965407.lua b/script/c61965407.lua deleted file mode 100644 index 97a4bddf71..0000000000 --- a/script/c61965407.lua +++ /dev/null @@ -1,132 +0,0 @@ ---遡洸する煉獄 -function c61965407.initial_effect(c) - Duel.EnableGlobalFlag(GLOBALFLAG_SELF_TOGRAVE) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(TIMING_STANDBY_PHASE,TIMING_STANDBY_PHASE) - e1:SetTarget(c61965407.target) - e1:SetOperation(c61965407.operation) - e1:SetLabel(0) - c:RegisterEffect(e1) - --tohand - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_TOHAND) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetRange(LOCATION_SZONE) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) - e2:SetCondition(c61965407.thcon) - e2:SetCost(c61965407.thcost) - e2:SetTarget(c61965407.thtg) - e2:SetOperation(c61965407.operation) - e2:SetLabel(1) - c:RegisterEffect(e2) - --tograve - local e3=Effect.CreateEffect(c) - e3:SetCategory(CATEGORY_TOGRAVE) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetRange(LOCATION_SZONE) - e3:SetCode(EVENT_PHASE+PHASE_STANDBY) - e3:SetCondition(c61965407.tgcon) - e3:SetCost(c61965407.tgcost) - e3:SetTarget(c61965407.tgtg) - e3:SetOperation(c61965407.operation) - e3:SetLabel(2) - c:RegisterEffect(e3) - --tograve - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e4:SetRange(LOCATION_SZONE) - e4:SetCode(EFFECT_SELF_TOGRAVE) - e4:SetCondition(c61965407.sdcon) - c:RegisterEffect(e4) -end -function c61965407.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then - if e:GetLabel()==1 then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c61965407.thfilter(chkc) end - if e:GetLabel()==2 then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and c61965407.tgfilter(chkc) end - end - if chk==0 then return true end - if Duel.GetTurnPlayer()~=tp and Duel.GetCurrentPhase()==PHASE_STANDBY - and Duel.IsExistingTarget(c61965407.thfilter,tp,LOCATION_GRAVE,0,1,nil) - and Duel.GetFlagEffect(tp,61965407)==0 - and Duel.SelectYesNo(tp,aux.Stringid(61965407,0)) then - e:SetCategory(CATEGORY_TOHAND) - e:SetProperty(EFFECT_FLAG_CARD_TARGET) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c61965407.thfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) - Duel.RegisterFlagEffect(tp,61965407,RESET_PHASE+PHASE_END,0,1) - e:SetLabel(1) - elseif Duel.GetTurnPlayer()==tp and Duel.GetCurrentPhase()==PHASE_STANDBY - and Duel.IsExistingTarget(c61965407.tgfilter,tp,LOCATION_REMOVED,0,1,nil) - and Duel.GetFlagEffect(tp,61965408)==0 - and Duel.SelectYesNo(tp,aux.Stringid(61965407,0)) then - e:SetCategory(CATEGORY_TOGRAVE) - e:SetProperty(EFFECT_FLAG_CARD_TARGET) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectTarget(tp,c61965407.tgfilter,tp,LOCATION_REMOVED,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,0,0) - Duel.RegisterFlagEffect(tp,61965408,RESET_PHASE+PHASE_END,0,1) - e:SetLabel(2) - else - e:SetCategory(0) - e:SetProperty(0) - e:SetLabel(0) - end -end -function c61965407.thcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp -end -function c61965407.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetFlagEffect(tp,61965407)==0 end - Duel.RegisterFlagEffect(tp,61965407,RESET_PHASE+PHASE_END,0,1) -end -function c61965407.thfilter(c) - return c:IsSetCard(0xbb) and c:IsAbleToHand() -end -function c61965407.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c61965407.thfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c61965407.thfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c61965407.thfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c61965407.tgcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c61965407.tgcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetFlagEffect(tp,61965408)==0 end - Duel.RegisterFlagEffect(tp,61965408,RESET_PHASE+PHASE_END,0,1) -end -function c61965407.tgfilter(c) - return c:IsFaceup() and c:IsSetCard(0xbb) -end -function c61965407.tgtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and c61965407.tgfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c61965407.tgfilter,tp,LOCATION_REMOVED,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectTarget(tp,c61965407.tgfilter,tp,LOCATION_REMOVED,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,0,0) -end -function c61965407.operation(e,tp,eg,ep,ev,re,r,rp) - if e:GetLabel()==0 or not e:GetHandler():IsRelateToEffect(e) then return end - local tc=Duel.GetFirstTarget() - if not tc:IsRelateToEffect(e) then return end - if e:GetLabel()==1 then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - else - Duel.SendtoGrave(tc,REASON_EFFECT+REASON_RETURN) - end -end -function c61965407.sdfilter(c) - return c:IsFacedown() or not c:IsSetCard(0xbb) -end -function c61965407.sdcon(e) - return Duel.IsExistingMatchingCard(c61965407.sdfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) -end diff --git a/script/c61968753.lua b/script/c61968753.lua deleted file mode 100644 index a1971e4b33..0000000000 --- a/script/c61968753.lua +++ /dev/null @@ -1,52 +0,0 @@ ---バブル・シャッフル -function c61968753.initial_effect(c) - --pos - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_POSITION+CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c61968753.postg) - e1:SetOperation(c61968753.posop) - c:RegisterEffect(e1) -end -function c61968753.filter1(c) - return c:IsPosition(POS_FACEUP_ATTACK) and c:IsCode(79979666) -end -function c61968753.filter2(c) - return c:IsPosition(POS_FACEUP_ATTACK) -end -function c61968753.spfilter(c,e,tp) - return c:IsSetCard(0x3008) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c61968753.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - if chk==0 then return Duel.IsExistingTarget(c61968753.filter1,tp,LOCATION_MZONE,0,1,nil) - and Duel.IsExistingTarget(c61968753.filter2,tp,0,LOCATION_MZONE,1,nil) - and Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsExistingMatchingCard(c61968753.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE) - local g1=Duel.SelectTarget(tp,c61968753.filter1,tp,LOCATION_MZONE,0,1,1,nil) - e:SetLabelObject(g1:GetFirst()) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE) - local g2=Duel.SelectTarget(tp,c61968753.filter2,tp,0,LOCATION_MZONE,1,1,nil) - g1:Merge(g2) - Duel.SetOperationInfo(0,CATEGORY_POSITION,g1,2,0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c61968753.pfilter(c,e) - return c:IsPosition(POS_FACEUP_ATTACK) and c:IsRelateToEffect(e) -end -function c61968753.posop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(c61968753.pfilter,nil,e) - if g:GetCount()==2 then - Duel.ChangePosition(g,POS_FACEUP_DEFENCE) - local tc=e:GetLabelObject() - if Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 and not tc:IsImmuneToEffect(e) and tc:IsReleasable() then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=Duel.SelectMatchingCard(tp,c61968753.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - Duel.Release(tc,REASON_EFFECT) - Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) - end - end -end diff --git a/script/c62007535.lua b/script/c62007535.lua deleted file mode 100644 index 9705c08fe8..0000000000 --- a/script/c62007535.lua +++ /dev/null @@ -1,60 +0,0 @@ ---インヴェルズ・ホーン -function c62007535.initial_effect(c) - --summon success - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetCondition(c62007535.regcon) - e1:SetOperation(c62007535.regop) - c:RegisterEffect(e1) - --tribute check - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_MATERIAL_CHECK) - e2:SetValue(c62007535.valcheck) - e2:SetLabelObject(e1) - c:RegisterEffect(e2) -end -function c62007535.valcheck(e,c) - local g=c:GetMaterial() - if g:IsExists(Card.IsSetCard,1,nil,0x100a) then - e:GetLabelObject():SetLabel(1) - else - e:GetLabelObject():SetLabel(0) - end -end -function c62007535.regcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_ADVANCE and e:GetLabel()==1 -end -function c62007535.regop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(62007535,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCost(c62007535.cost) - e1:SetTarget(c62007535.target) - e1:SetOperation(c62007535.operation) - e1:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e1) -end -function c62007535.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return not e:GetHandler():IsDisabled() and Duel.CheckLPCost(tp,1000) end - Duel.PayLPCost(tp,1000) -end -function c62007535.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsDestructable() end - if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c62007535.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c62017867.lua b/script/c62017867.lua deleted file mode 100644 index 484abb32fc..0000000000 --- a/script/c62017867.lua +++ /dev/null @@ -1,65 +0,0 @@ ---超重武者グロウ-V -function c62017867.initial_effect(c) - --sort decktop - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e1:SetCondition(c62017867.condition) - e1:SetTarget(c62017867.target) - e1:SetOperation(c62017867.operation) - c:RegisterEffect(e1) - --atk - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_TOHAND) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_ATTACK_ANNOUNCE) - e2:SetRange(LOCATION_GRAVE) - e2:SetCondition(c62017867.atkcon) - e2:SetCost(c62017867.atkcost) - e2:SetTarget(c62017867.atktg) - e2:SetOperation(c62017867.atkop) - c:RegisterEffect(e2) -end -function c62017867.condition(e,tp,eg,ep,ev,re,r,rp) - return not Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_GRAVE,0,1,nil,TYPE_SPELL+TYPE_TRAP) -end -function c62017867.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>=5 end -end -function c62017867.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)<5 then return end - Duel.SortDecktop(tp,tp,5) -end -function c62017867.atkcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetAttacker():IsControler(1-tp) and Duel.GetAttackTarget()==nil -end -function c62017867.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) -end -function c62017867.atktg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,1) end -end -function c62017867.atkop(e,tp,eg,ep,ev,re,r,rp) - if not Duel.IsPlayerCanDiscardDeck(tp,1) then return end - Duel.ConfirmDecktop(tp,1) - local g=Duel.GetDecktopGroup(tp,1) - local tc=g:GetFirst() - Duel.DisableShuffleCheck() - if tc:IsSetCard(0x9a) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ShuffleHand(tp) - local at=Duel.GetAttacker() - if at:IsFaceup() and at:IsRelateToBattle() then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetValue(0) - e1:SetReset(RESET_EVENT+0x1fe0000) - at:RegisterEffect(e1) - end - else - Duel.SendtoGrave(tc,REASON_EFFECT+REASON_REVEAL) - end -end diff --git a/script/c62023839.lua b/script/c62023839.lua deleted file mode 100644 index 4973cb119d..0000000000 --- a/script/c62023839.lua +++ /dev/null @@ -1,52 +0,0 @@ ---フィッシュボーグ-アーチャー -function c62023839.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(62023839,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_GRAVE) - e1:SetCountLimit(1,62023839) - e1:SetCondition(c62023839.spcon) - e1:SetCost(c62023839.spcost) - e1:SetTarget(c62023839.sptg) - e1:SetOperation(c62023839.spop) - c:RegisterEffect(e1) -end -function c62023839.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 -end -function c62023839.cfilter(c) - return c:IsAttribute(ATTRIBUTE_WATER) and c:IsDiscardable() -end -function c62023839.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c62023839.cfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,c62023839.cfilter,1,1,REASON_COST+REASON_DISCARD) -end -function c62023839.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c62023839.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE_START+PHASE_BATTLE) - e1:SetCountLimit(1) - e1:SetOperation(c62023839.desop) - e1:SetReset(RESET_PHASE+RESET_END) - Duel.RegisterEffect(e1,tp) - end -end -function c62023839.desfilter(c) - return c:IsFacedown() or not c:IsAttribute(ATTRIBUTE_WATER) -end -function c62023839.desop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c62023839.desfilter,tp,LOCATION_MZONE,0,nil) - if g:GetCount()>0 then - Duel.Hint(HINT_CARD,0,62023839) - Duel.Destroy(g,REASON_EFFECT) - end -end diff --git a/script/c62054060.lua b/script/c62054060.lua deleted file mode 100644 index 9469df19aa..0000000000 --- a/script/c62054060.lua +++ /dev/null @@ -1,33 +0,0 @@ ---平穏の賢者 -function c62054060.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(62054060,0)) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_BATTLE_DESTROYING) - e1:SetCondition(c62054060.condition) - e1:SetOperation(c62054060.operation) - c:RegisterEffect(e1) -end -function c62054060.condition(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsRelateToBattle() and c:GetBattleTarget():IsType(TYPE_MONSTER) -end -function c62054060.operation(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EFFECT_CANNOT_ACTIVATE) - e1:SetTargetRange(0,1) - e1:SetCondition(c62054060.accon) - e1:SetValue(c62054060.aclimit) - e1:SetLabel(Duel.GetTurnCount()) - e1:SetReset(RESET_PHASE+PHASE_END,2) - Duel.RegisterEffect(e1,tp) -end -function c62054060.accon(e) - return e:GetLabel()~=Duel.GetTurnCount() -end -function c62054060.aclimit(e,re,tp) - return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_TRAP) -end diff --git a/script/c62070231.lua b/script/c62070231.lua deleted file mode 100644 index 8fc53dc9d4..0000000000 --- a/script/c62070231.lua +++ /dev/null @@ -1,49 +0,0 @@ ---No.94 極氷姫クリスタル・ゼロ -function c62070231.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_WATER),5,2) - c:EnableReviveLimit() - --atk down - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(62070231,0)) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetRange(LOCATION_MZONE) - e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetCondition(c62070231.condition) - e1:SetCost(c62070231.cost) - e1:SetTarget(c62070231.target) - e1:SetOperation(c62070231.operation) - c:RegisterEffect(e1) -end -c62070231.xyz_number=94 -function c62070231.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end -function c62070231.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c62070231.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) -end -function c62070231.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetValue(tc:GetAttack()/2) - if Duel.GetTurnPlayer()~=tp then - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,2) - else - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,1) - end - tc:RegisterEffect(e1) - end -end diff --git a/script/c62107612.lua b/script/c62107612.lua deleted file mode 100644 index dd7bf90f69..0000000000 --- a/script/c62107612.lua +++ /dev/null @@ -1,33 +0,0 @@ ---ディメンション・ワンダラー -function c62107612.initial_effect(c) - --damage - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(62107612,0)) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_REMOVE) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(1,62107612) - e1:SetCondition(c62107612.condition) - e1:SetCost(c62107612.cost) - e1:SetTarget(c62107612.target) - e1:SetOperation(c62107612.operation) - c:RegisterEffect(e1) -end -function c62107612.condition(e,tp,eg,ep,ev,re,r,rp) - return bit.band(r,REASON_EFFECT)~=0 and re and re:GetHandler():GetCode()==93717133 -end -function c62107612.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end -function c62107612.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(3000) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,3000) -end -function c62107612.operation(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c62107981.lua b/script/c62107981.lua deleted file mode 100644 index 636882a642..0000000000 --- a/script/c62107981.lua +++ /dev/null @@ -1,51 +0,0 @@ ---E・HERO クノスペ -function c62107981.initial_effect(c) - --direct attack - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DIRECT_ATTACK) - e1:SetCondition(c62107981.atcon) - c:RegisterEffect(e1) - --atk/def - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(62107981,0)) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_BATTLE_DAMAGE) - e2:SetCondition(c62107981.adcon) - e2:SetOperation(c62107981.adop) - c:RegisterEffect(e2) - -- - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_CANNOT_BE_BATTLE_TARGET) - e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e3:SetRange(LOCATION_MZONE) - e3:SetCondition(c62107981.atcon) - e3:SetValue(aux.imval1) - c:RegisterEffect(e3) -end -function c62107981.adcon(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp -end -function c62107981.adop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() and c:GetDefence()>=100 then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetProperty(EFFECT_FLAG_COPY_INHERIT) - e1:SetValue(100) - e1:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_UPDATE_DEFENCE) - e2:SetValue(-100) - c:RegisterEffect(e2) - end -end -function c62107981.filter(c) - return c:IsFaceup() and c:IsSetCard(0x3008) -end -function c62107981.atcon(e) - return Duel.IsExistingMatchingCard(c62107981.filter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,e:GetHandler()) -end diff --git a/script/c62121.lua b/script/c62121.lua deleted file mode 100644 index 964bc388b0..0000000000 --- a/script/c62121.lua +++ /dev/null @@ -1,56 +0,0 @@ ---闇晦ましの城 -function c62121.initial_effect(c) - --flip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(62121,0)) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP) - e1:SetOperation(c62121.operation) - c:RegisterEffect(e1) -end -function c62121.atktg(e,c) - return c:GetFieldID()<=e:GetLabel() and c:IsRace(RACE_ZOMBIE) -end -function c62121.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - local g=Duel.GetFieldGroup(tp,LOCATION_MZONE,LOCATION_MZONE) - local mg,fid=g:GetMaxGroup(Card.GetFieldID) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e1:SetTarget(c62121.atktg) - e1:SetValue(200) - e1:SetLabel(fid) - e1:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_UPDATE_DEFENCE) - e2:SetLabelObject(e1) - c:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(62121,1)) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e3:SetCode(EVENT_PHASE+PHASE_STANDBY) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1) - e3:SetCondition(c62121.atkcon) - e3:SetOperation(c62121.atkop) - e3:SetLabelObject(e2) - e3:SetLabel(2) - e3:SetReset(RESET_EVENT+0x1ff0000+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,4) - c:RegisterEffect(e3) - end -end -function c62121.atkcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c62121.atkop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local ct=e:GetLabel() - e:GetLabelObject():SetValue(ct*200) - e:GetLabelObject():GetLabelObject():SetValue(ct*200) - e:SetLabel(ct+1) -end diff --git a/script/c62125438.lua b/script/c62125438.lua deleted file mode 100644 index 6dd5f863f2..0000000000 --- a/script/c62125438.lua +++ /dev/null @@ -1,41 +0,0 @@ ---シンクロン・キャリアー -function c62125438.initial_effect(c) - --extra summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_EXTRA_SUMMON_COUNT) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(LOCATION_HAND+LOCATION_MZONE,0) - e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x17)) - c:RegisterEffect(e1) - --search - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EVENT_BE_MATERIAL) - e2:SetCountLimit(1,62125438) - e2:SetCondition(c62125438.spcon) - e2:SetTarget(c62125438.sptg) - e2:SetOperation(c62125438.spop) - c:RegisterEffect(e2) -end -function c62125438.filter(c,tp) - return c:IsSetCard(0x17) and c:IsType(TYPE_MONSTER) and c:IsControler(tp) and c:IsLocation(LOCATION_GRAVE) -end -function c62125438.spcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c62125438.filter,1,nil,tp) and r==REASON_SYNCHRO and re:GetHandler():IsRace(RACE_WARRIOR+RACE_MACHINE) -end -function c62125438.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsPlayerCanSpecialSummonMonster(tp,62125439,0x17,0x4011,1000,0,2,RACE_MACHINE,ATTRIBUTE_EARTH) end - Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0) -end -function c62125438.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 - or not Duel.IsPlayerCanSpecialSummonMonster(tp,62125439,0x17,0x4011,1000,0,2,RACE_MACHINE,ATTRIBUTE_EARTH) then return end - local token=Duel.CreateToken(tp,62125439) - Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP) -end diff --git a/script/c6214884.lua b/script/c6214884.lua deleted file mode 100644 index 9c67e97e4c..0000000000 --- a/script/c6214884.lua +++ /dev/null @@ -1,23 +0,0 @@ ---暗黒界の狂王 ブロン -function c6214884.initial_effect(c) - --discard - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(6214884,0)) - e1:SetCategory(CATEGORY_HANDES) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_BATTLE_DAMAGE) - e1:SetCondition(c6214884.condition) - e1:SetTarget(c6214884.target) - e1:SetOperation(c6214884.operation) - c:RegisterEffect(e1) -end -function c6214884.condition(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp -end -function c6214884.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)>0 end - Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1) -end -function c6214884.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.DiscardHand(tp,aux.TRUE,1,1,REASON_EFFECT+REASON_DISCARD) -end diff --git a/script/c62154416.lua b/script/c62154416.lua deleted file mode 100644 index 82b46d748d..0000000000 --- a/script/c62154416.lua +++ /dev/null @@ -1,57 +0,0 @@ ---マジカルフィシアリスト -function c62154416.initial_effect(c) - c:EnableCounterPermit(0x3001) - c:SetCounterLimit(0x3001,1) - --summon success - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(62154416,0)) - e1:SetCategory(CATEGORY_COUNTER) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c62154416.addct) - e1:SetOperation(c62154416.addc) - c:RegisterEffect(e1) - --attackup - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(62154416,1)) - e2:SetCategory(CATEGORY_ATKCHANGE) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCost(c62154416.atkcost) - e2:SetTarget(c62154416.atktg) - e2:SetOperation(c62154416.atkop) - c:RegisterEffect(e2) -end -function c62154416.addct(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,1,0,0x3001) -end -function c62154416.addc(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - e:GetHandler():AddCounter(0x3001,1) - end -end -function c62154416.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsCanRemoveCounter(tp,0x3001,1,REASON_COST) end - e:GetHandler():RemoveCounter(tp,0x3001,1,REASON_COST) -end -function c62154416.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,nil) -end -function c62154416.atkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e1:SetValue(500) - tc:RegisterEffect(e1) - end -end diff --git a/script/c62161698.lua b/script/c62161698.lua deleted file mode 100644 index ef10c8c22c..0000000000 --- a/script/c62161698.lua +++ /dev/null @@ -1,54 +0,0 @@ ---イリュージョン・バルーン -function c62161698.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c62161698.condition) - e1:SetTarget(c62161698.target) - e1:SetOperation(c62161698.operation) - c:RegisterEffect(e1) - if not c62161698.global_check then - c62161698.global_check=true - local ge1=Effect.CreateEffect(c) - ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - ge1:SetCode(EVENT_DESTROYED) - ge1:SetOperation(c62161698.checkop) - Duel.RegisterEffect(ge1,0) - end -end -function c62161698.checkop(e,tp,eg,ep,ev,re,r,rp) - local tc=eg:GetFirst() - local p1=false - local p2=false - while tc do - if tc:IsPreviousLocation(LOCATION_MZONE) then - if tc:GetPreviousControler()==0 then p1=true else p2=true end - end - tc=eg:GetNext() - end - if p1 then Duel.RegisterFlagEffect(0,62161698,RESET_PHASE+PHASE_END,0,1) end - if p2 then Duel.RegisterFlagEffect(1,62161698,RESET_PHASE+PHASE_END,0,1) end -end -function c62161698.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetFlagEffect(tp,62161698)~=0 -end -function c62161698.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>4 end -end -function c62161698.filter(c,e,tp) - return c:IsSetCard(0x9f) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c62161698.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)==0 then return end - Duel.ConfirmDecktop(tp,5) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local g=Duel.GetDecktopGroup(tp,5):Filter(c62161698.filter,nil,e,tp) - if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(62161698,0)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=g:Select(tp,1,1,nil) - Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) - end - Duel.ShuffleDeck(tp) -end diff --git a/script/c62180201.lua b/script/c62180201.lua deleted file mode 100644 index ceece7901a..0000000000 --- a/script/c62180201.lua +++ /dev/null @@ -1,52 +0,0 @@ ---邪神ドレッド・ルート -function c62180201.initial_effect(c) - --summon with 3 tribute - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_LIMIT_SUMMON_PROC) - e1:SetCondition(c62180201.ttcon) - e1:SetOperation(c62180201.ttop) - e1:SetValue(SUMMON_TYPE_ADVANCE) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_LIMIT_SET_PROC) - c:RegisterEffect(e2) - --cannot special summon - local e3=Effect.CreateEffect(c) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_SPSUMMON_CONDITION) - c:RegisterEffect(e3) - --half atk - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_FIELD) - e4:SetCode(EFFECT_SET_ATTACK_FINAL) - e4:SetRange(LOCATION_MZONE) - e4:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e4:SetTarget(c62180201.atktg) - e4:SetValue(c62180201.atkval) - c:RegisterEffect(e4) - local e5=e4:Clone() - e5:SetCode(EFFECT_SET_DEFENCE_FINAL) - e5:SetValue(c62180201.defval) - c:RegisterEffect(e5) -end -function c62180201.ttcon(e,c) - if c==nil then return true end - return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-3 and Duel.GetTributeCount(c)>=3 -end -function c62180201.ttop(e,tp,eg,ep,ev,re,r,rp,c) - local g=Duel.SelectTribute(tp,c,3,3) - c:SetMaterial(g) - Duel.Release(g,REASON_SUMMON+REASON_MATERIAL) -end -function c62180201.atktg(e,c) - return c~=e:GetHandler() -end -function c62180201.atkval(e,c) - return c:GetAttack()/2 -end -function c62180201.defval(e,c) - return c:GetDefence()/2 -end \ No newline at end of file diff --git a/script/c62188962.lua b/script/c62188962.lua deleted file mode 100644 index 2210d39f15..0000000000 --- a/script/c62188962.lua +++ /dev/null @@ -1,65 +0,0 @@ ---ヴァンパイア帝国 -function c62188962.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --atk - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetRange(LOCATION_SZONE) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e2:SetTarget(aux.TargetBoolFunction(Card.IsRace,RACE_ZOMBIE)) - e2:SetCondition(c62188962.atkcon) - e2:SetValue(500) - c:RegisterEffect(e2) - --destroy - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(62188962,0)) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetCode(EVENT_TO_GRAVE) - e3:SetRange(LOCATION_SZONE) - e3:SetCountLimit(1) - e3:SetCondition(c62188962.descon) - e3:SetTarget(c62188962.destg) - e3:SetOperation(c62188962.desop) - c:RegisterEffect(e3) -end -function c62188962.atkcon(e) - return Duel.GetCurrentPhase()==PHASE_DAMAGE_CAL -end -function c62188962.cfilter(c,tp) - return c:IsPreviousLocation(LOCATION_DECK) and c:GetPreviousControler()==tp -end -function c62188962.descon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c62188962.cfilter,1,nil,1-tp) -end -function c62188962.tgfilter(c) - return c:IsSetCard(0x8e) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsAbleToGrave() -end -function c62188962.filter(c) - return c:IsDestructable() -end -function c62188962.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and c62188962.filter(chkc) end - if chk==0 then return e:GetHandler():IsRelateToEffect(e) and not e:GetHandler():IsStatus(STATUS_CHAINING) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c62188962.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_HAND+LOCATION_DECK) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c62188962.desop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c62188962.tgfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoGrave(g,REASON_EFFECT) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end - end -end diff --git a/script/c62242678.lua b/script/c62242678.lua deleted file mode 100644 index d5f96e53db..0000000000 --- a/script/c62242678.lua +++ /dev/null @@ -1,231 +0,0 @@ ---琰魔竜王 レッド・デーモン・カラミティ -function c62242678.initial_effect(c) - --synchro summon - c:EnableReviveLimit() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_IGNORE_IMMUNE) - e1:SetRange(LOCATION_EXTRA) - e1:SetCondition(c62242678.syncon) - e1:SetOperation(c62242678.synop) - e1:SetValue(SUMMON_TYPE_SYNCHRO) - c:RegisterEffect(e1) - --act limit - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(62242678,0)) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetCondition(c62242678.limcon) - e2:SetTarget(c62242678.limtg) - e2:SetOperation(c62242678.limop) - c:RegisterEffect(e2) - --damage - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(62242678,1)) - e3:SetCategory(CATEGORY_DAMAGE) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e3:SetCode(EVENT_BATTLE_DESTROYING) - e3:SetCondition(aux.bdcon) - e3:SetTarget(c62242678.damtg) - e3:SetOperation(c62242678.damop) - c:RegisterEffect(e3) - --spsummon - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(62242678,2)) - e4:SetCategory(CATEGORY_SPECIAL_SUMMON) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e4:SetCode(EVENT_DESTROYED) - e4:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e4:SetCondition(c62242678.spcon) - e4:SetTarget(c62242678.sptg) - e4:SetOperation(c62242678.spop) - c:RegisterEffect(e4) -end -function c62242678.matfilter1(c,syncard) - return c:IsType(TYPE_TUNER) and (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) and c:IsCanBeSynchroMaterial(syncard) -end -function c62242678.matfilter2(c,syncard) - return c:IsFaceup() and c:IsRace(RACE_DRAGON) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsType(TYPE_SYNCHRO) and c:IsCanBeSynchroMaterial(syncard) -end -function c62242678.synfilter1(c,syncard,lv,g1,g2,g3) - local tlv=c:GetSynchroLevel(syncard) - if lv-tlv<=0 then return false end - local f1=c.tuner_filter - if c:IsHasEffect(55863245) then - return g3:IsExists(c62242678.synfilter2,1,c,syncard,lv-tlv,g2,f1,c) - else - return g1:IsExists(c62242678.synfilter2,1,c,syncard,lv-tlv,g2,f1,c) - end -end -function c62242678.synfilter2(c,syncard,lv,g2,f1,tuner1) - local tlv=c:GetSynchroLevel(syncard) - if lv-tlv<=0 then return false end - local f2=c.tuner_filter - if f1 and not f1(c) then return false end - if f2 and not f2(tuner1) then return false end - return g2:IsExists(c62242678.synfilter3,1,nil,syncard,lv-tlv,f1,f2) -end -function c62242678.synfilter3(c,syncard,lv,f1,f2) - local mlv=c:GetSynchroLevel(syncard) - local lv1=bit.band(mlv,0xffff) - local lv2=bit.rshift(mlv,16) - return (lv1==lv or lv2==lv) and (not f1 or f1(c)) and (not f2 or f2(c)) -end -function c62242678.syncon(e,c,tuner,mg) - if c==nil then return true end - local tp=c:GetControler() - if Duel.GetLocationCount(tp,LOCATION_MZONE)<-2 then return false end - local g1=nil - local g2=nil - local g3=nil - if mg then - g1=mg:Filter(c62242678.matfilter1,nil,c) - g2=mg:Filter(c62242678.matfilter2,nil,c) - g3=mg:Filter(c62242678.matfilter1,nil,c) - else - g1=Duel.GetMatchingGroup(c62242678.matfilter1,tp,LOCATION_MZONE,LOCATION_MZONE,nil,c) - g2=Duel.GetMatchingGroup(c62242678.matfilter2,tp,LOCATION_MZONE,LOCATION_MZONE,nil,c) - g3=Duel.GetMatchingGroup(c62242678.matfilter1,tp,LOCATION_MZONE+LOCATION_HAND,LOCATION_MZONE,nil,c) - end - local pe=Duel.IsPlayerAffectedByEffect(tp,EFFECT_MUST_BE_SMATERIAL) - local lv=c:GetLevel() - if tuner then - local tlv=tuner:GetSynchroLevel(c) - if lv-tlv<=0 then return false end - local f1=tuner.tuner_filter - if not pe then - return g1:IsExists(c62242678.synfilter2,1,tuner,c,lv-tlv,g2,f1,tuner) - else - return c62242678.synfilter2(pe:GetOwner(),c,lv-tlv,g2,f1,tuner) - end - end - if not pe then - return g1:IsExists(c62242678.synfilter1,1,nil,c,lv,g1,g2,g3) - else - return c62242678.synfilter1(pe:GetOwner(),c,lv,g1,g2) - end -end -function c62242678.synop(e,tp,eg,ep,ev,re,r,rp,c,tuner,mg) - local g=Group.CreateGroup() - local g1=nil - local g2=nil - local g3=nil - if mg then - g1=mg:Filter(c62242678.matfilter1,nil,c) - g2=mg:Filter(c62242678.matfilter2,nil,c) - g3=mg:Filter(c62242678.matfilter1,nil,c) - else - g1=Duel.GetMatchingGroup(c62242678.matfilter1,tp,LOCATION_MZONE,LOCATION_MZONE,nil,c) - g2=Duel.GetMatchingGroup(c62242678.matfilter2,tp,LOCATION_MZONE,LOCATION_MZONE,nil,c) - g3=Duel.GetMatchingGroup(c62242678.matfilter1,tp,LOCATION_MZONE+LOCATION_HAND,LOCATION_MZONE,nil,c) - end - local pe=Duel.IsPlayerAffectedByEffect(tp,EFFECT_MUST_BE_SMATERIAL) - local lv=c:GetLevel() - if tuner then - g:AddCard(tuner) - local lv1=tuner:GetSynchroLevel(c) - local f1=tuner.tuner_filter - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SMATERIAL) - local tuner2=nil - if not pe then - local t2=g1:FilterSelect(tp,c62242678.synfilter2,1,1,tuner,c,lv-lv1,g2,f1,tuner) - tuner2=t2:GetFirst() - else - tuner2=pe:GetOwner() - Group.FromCards(tuner2):Select(tp,1,1,nil) - end - g:AddCard(tuner2) - local lv2=tuner2:GetSynchroLevel(c) - local f2=tuner2.tuner_filter - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SMATERIAL) - local m3=g2:FilterSelect(tp,c62242678.synfilter3,1,1,nil,c,lv-lv1-lv2,f1,f2) - g:Merge(m3) - else - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SMATERIAL) - local tuner1=nil - if not pe then - local t1=g1:FilterSelect(tp,c62242678.synfilter1,1,1,nil,c,lv,g1,g2,g3) - tuner1=t1:GetFirst() - else - tuner1=pe:GetOwner() - Group.FromCards(tuner1):Select(tp,1,1,nil) - end - g:AddCard(tuner1) - local lv1=tuner1:GetSynchroLevel(c) - local f1=tuner1.tuner_filter - local t2=nil - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SMATERIAL) - if tuner1:IsHasEffect(55863245) then - t2=g3:FilterSelect(tp,c62242678.synfilter2,1,1,tuner1,c,lv-lv1,g2,f1,tuner1) - else - t2=g1:FilterSelect(tp,c62242678.synfilter2,1,1,tuner1,c,lv-lv1,g2,f1,tuner1) - end - local tuner2=t2:GetFirst() - g:AddCard(tuner2) - local lv2=tuner2:GetSynchroLevel(c) - local f2=tuner2.tuner_filter - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SMATERIAL) - local m3=g2:FilterSelect(tp,c62242678.synfilter3,1,1,nil,c,lv-lv1-lv2,f1,f2) - g:Merge(m3) - end - c:SetMaterial(g) - Duel.SendtoGrave(g,REASON_MATERIAL+REASON_SYNCHRO) -end -function c62242678.limcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_SYNCHRO -end -function c62242678.limtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetChainLimit(c62242678.chainlm) -end -function c62242678.chainlm(e,rp,tp) - return tp==rp -end -function c62242678.limop(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetTargetRange(0,1) - e1:SetValue(c62242678.aclimit) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function c62242678.aclimit(e,re,tp) - return re:GetHandler():IsOnField() -end -function c62242678.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local dam=e:GetHandler():GetBattleTarget():GetBaseAttack() - if dam<0 then dam=0 end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(dam) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,dam) -end -function c62242678.damop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end -function c62242678.spcon(e,tp,eg,ep,ev,re,r,rp) - return rp~=tp and e:GetHandler():GetPreviousControler()==tp -end -function c62242678.spfilter(c,e,tp) - return c:IsLevelBelow(8) and c:IsRace(RACE_DRAGON) and c:IsAttribute(ATTRIBUTE_DARK) - and c:IsType(TYPE_SYNCHRO) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c62242678.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c62242678.spfilter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c62242678.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c62242678.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c62242678.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c62265044.lua b/script/c62265044.lua deleted file mode 100644 index 1d90520087..0000000000 --- a/script/c62265044.lua +++ /dev/null @@ -1,65 +0,0 @@ ---竜の渓谷 -function c62265044.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --search - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e2:SetDescription(aux.Stringid(62265044,1)) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_SZONE) - e2:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE) - e2:SetCost(c62265044.cost) - e2:SetTarget(c62265044.target1) - e2:SetOperation(c62265044.operation1) - c:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetCategory(CATEGORY_TOGRAVE) - e3:SetDescription(aux.Stringid(62265044,2)) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_SZONE) - e3:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE) - e3:SetCost(c62265044.cost) - e3:SetTarget(c62265044.target2) - e3:SetOperation(c62265044.operation2) - c:RegisterEffect(e3) -end -function c62265044.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end - Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) -end -function c62265044.filter1(c) - return c:IsLevelBelow(4) and c:IsSetCard(0x29) and c:IsAbleToHand() -end -function c62265044.filter2(c) - return c:IsRace(RACE_DRAGON) and c:IsAbleToGrave() -end -function c62265044.target1(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c62265044.filter1,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c62265044.target2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c62265044.filter2,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) -end -function c62265044.operation1(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c62265044.filter1,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end -function c62265044.operation2(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c62265044.filter2,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoGrave(g,REASON_EFFECT) - end -end diff --git a/script/c62271284.lua b/script/c62271284.lua deleted file mode 100644 index c9fd36c581..0000000000 --- a/script/c62271284.lua +++ /dev/null @@ -1,30 +0,0 @@ ---ジャスティブレイク -function c62271284.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetCondition(c62271284.condition) - e1:SetTarget(c62271284.target) - e1:SetOperation(c62271284.activate) - c:RegisterEffect(e1) -end -function c62271284.condition(e,tp,eg,ep,ev,re,r,rp) - local at=Duel.GetAttackTarget() - return tp~=Duel.GetTurnPlayer() and at and at:IsFaceup() and at:IsType(TYPE_NORMAL) -end -function c62271284.filter(c) - return not (c:IsFaceup() and c:IsType(TYPE_NORMAL) and c:IsAttackPos()) and c:IsDestructable() -end -function c62271284.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c62271284.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - local g=Duel.GetMatchingGroup(c62271284.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c62271284.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c62271284.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - if g:GetCount()>0 then - Duel.Destroy(g,REASON_EFFECT) - end -end diff --git a/script/c62279055.lua b/script/c62279055.lua deleted file mode 100644 index 69ddd4fc53..0000000000 --- a/script/c62279055.lua +++ /dev/null @@ -1,32 +0,0 @@ ---魔法の筒 -function c62279055.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetCondition(c62279055.condition) - e1:SetTarget(c62279055.target) - e1:SetOperation(c62279055.activate) - c:RegisterEffect(e1) -end -function c62279055.condition(e,tp,eg,ep,ev,re,r,rp) - return tp~=Duel.GetTurnPlayer() -end -function c62279055.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local tg=Duel.GetAttacker() - if chkc then return chkc==tg end - if chk==0 then return tg:IsOnField() and tg:IsCanBeEffectTarget(e) end - Duel.SetTargetCard(tg) - local dam=tg:GetAttack() - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,dam) -end -function c62279055.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - if Duel.NegateAttack() then - Duel.Damage(1-tp,tc:GetAttack(),REASON_EFFECT) - end - end -end diff --git a/script/c62315111.lua b/script/c62315111.lua deleted file mode 100644 index 759d7484bb..0000000000 --- a/script/c62315111.lua +++ /dev/null @@ -1,20 +0,0 @@ ---エーリアン・ハンター -function c62315111.initial_effect(c) - --chain attack - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(62315111,0)) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_BATTLED) - e1:SetCondition(c62315111.atcon) - e1:SetOperation(c62315111.atop) - c:RegisterEffect(e1) -end -function c62315111.atcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local bc=c:GetBattleTarget() - return bc and bc:IsStatus(STATUS_BATTLE_DESTROYED) and c:IsChainAttackable() - and bc:GetCounter(0xe)>0 -end -function c62315111.atop(e,tp,eg,ep,ev,re,r,rp) - Duel.ChainAttack() -end diff --git a/script/c62325062.lua b/script/c62325062.lua deleted file mode 100644 index 953c06234a..0000000000 --- a/script/c62325062.lua +++ /dev/null @@ -1,43 +0,0 @@ ---粘着落とし穴 -function c62325062.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c62325062.target) - e1:SetOperation(c62325062.activate) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - c:RegisterEffect(e2) - local e3=e1:Clone() - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e3) -end -function c62325062.filter(c,tp) - return c:IsFaceup() and c:GetSummonPlayer()~=tp -end -function c62325062.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return eg:IsExists(c62325062.filter,1,nil,tp) end - Duel.SetTargetCard(eg) -end -function c62325062.filter2(c,e,tp) - return c:IsFaceup() and c:GetSummonPlayer()~=tp and c:IsRelateToEffect(e) -end -function c62325062.activate(e,tp,eg,ep,ev,re,r,rp) - local g=eg:Filter(c62325062.filter2,nil,e,tp) - local tc=g:GetFirst() - while tc do - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetValue(c62325062.atkval) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - tc=g:GetNext() - end -end -function c62325062.atkval(e,c) - return c:GetBaseAttack()/2 -end diff --git a/script/c62337487.lua b/script/c62337487.lua deleted file mode 100644 index ba9053c669..0000000000 --- a/script/c62337487.lua +++ /dev/null @@ -1,4 +0,0 @@ ---要塞クジラ -function c62337487.initial_effect(c) - c:EnableReviveLimit() -end diff --git a/script/c62340868.lua b/script/c62340868.lua deleted file mode 100644 index 828f75fa34..0000000000 --- a/script/c62340868.lua +++ /dev/null @@ -1,34 +0,0 @@ ---風魔神-ヒューガ -function c62340868.initial_effect(c) - --atkdown - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(62340868,0)) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_QUICK_O) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EVENT_PRE_DAMAGE_CALCULATE) - e1:SetProperty(EFFECT_FLAG_NO_TURN_RESET) - e1:SetCountLimit(1) - e1:SetCondition(c62340868.condition) - e1:SetTarget(c62340868.target) - e1:SetOperation(c62340868.operation) - c:RegisterEffect(e1) -end -function c62340868.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp and Duel.GetAttackTarget()==e:GetHandler() -end -function c62340868.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetAttacker():IsCanBeEffectTarget(e) end - Duel.SetTargetCard(Duel.GetAttacker()) -end -function c62340868.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetReset(RESET_PHASE+RESET_DAMAGE_CAL) - e1:SetValue(0) - tc:RegisterEffect(e1) - end -end diff --git a/script/c62379337.lua b/script/c62379337.lua deleted file mode 100644 index f962cf3d1a..0000000000 --- a/script/c62379337.lua +++ /dev/null @@ -1,31 +0,0 @@ ---バイオレット・ウィッチ -function c62379337.initial_effect(c) - --search - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(62379337,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetCondition(c62379337.condition) - e1:SetTarget(c62379337.target) - e1:SetOperation(c62379337.operation) - c:RegisterEffect(e1) -end -function c62379337.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) -end -function c62379337.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c62379337.filter(c) - return c:IsDefenceBelow(1500) and c:IsRace(RACE_PLANT) and c:IsAbleToHand() -end -function c62379337.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c62379337.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c62420419.lua b/script/c62420419.lua deleted file mode 100644 index 7cb2f60e73..0000000000 --- a/script/c62420419.lua +++ /dev/null @@ -1,38 +0,0 @@ ---大邪神レシェフ -function c62420419.initial_effect(c) - c:EnableReviveLimit() - --control - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(62420419,0)) - e1:SetCategory(CATEGORY_CONTROL) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCost(c62420419.cost) - e1:SetTarget(c62420419.target) - e1:SetOperation(c62420419.operation) - c:RegisterEffect(e1) -end -function c62420419.cfilter(c) - return c:IsDiscardable() and c:IsType(TYPE_SPELL) -end -function c62420419.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c62420419.cfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,c62420419.cfilter,1,1,REASON_COST+REASON_DISCARD) -end -function c62420419.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsControlerCanBeChanged() end - if chk==0 then return Duel.IsExistingTarget(Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) - local g=Duel.SelectTarget(tp,Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0) -end -function c62420419.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and not Duel.GetControl(tc,tp,PHASE_END,1) then - if not tc:IsImmuneToEffect(e) and tc:IsAbleToChangeControler() then - Duel.Destroy(tc,REASON_EFFECT) - end - end -end diff --git a/script/c62434031.lua b/script/c62434031.lua deleted file mode 100644 index e005578d67..0000000000 --- a/script/c62434031.lua +++ /dev/null @@ -1,55 +0,0 @@ ---森羅の花卉士 ナルサス -function c62434031.initial_effect(c) - --deck check - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(62434031,0)) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c62434031.target) - e1:SetOperation(c62434031.operation) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(62434031,1)) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e2:SetCondition(c62434031.tdcon) - e2:SetTarget(c62434031.tdtg) - e2:SetOperation(c62434031.tdop) - c:RegisterEffect(e2) -end -function c62434031.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,1) end -end -function c62434031.operation(e,tp,eg,ep,ev,re,r,rp) - if not Duel.IsPlayerCanDiscardDeck(tp,1) then return end - Duel.ConfirmDecktop(tp,1) - local g=Duel.GetDecktopGroup(tp,1) - local tc=g:GetFirst() - if tc:IsRace(RACE_PLANT) then - Duel.DisableShuffleCheck() - Duel.SendtoGrave(g,REASON_EFFECT+REASON_REVEAL) - else - Duel.MoveSequence(tc,1) - end -end -function c62434031.tdcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsPreviousLocation(LOCATION_DECK) and - (c:IsReason(REASON_REVEAL) or c:GetPreviousPosition()==POS_FACEUP_DEFENCE or Duel.IsPlayerAffectedByEffect(tp,EFFECT_REVERSE_DECK)) -end -function c62434031.tdtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_DECK,0,1,nil,0x90) end -end -function c62434031.tdop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(62434031,2)) - local g=Duel.SelectMatchingCard(tp,Card.IsSetCard,tp,LOCATION_DECK,0,1,1,nil,0x90) - local tc=g:GetFirst() - if tc then - Duel.ShuffleDeck(tp) - Duel.MoveSequence(tc,0) - Duel.ConfirmDecktop(tp,1) - end -end diff --git a/script/c62437430.lua b/script/c62437430.lua deleted file mode 100644 index 303cb1ce11..0000000000 --- a/script/c62437430.lua +++ /dev/null @@ -1,58 +0,0 @@ ---異次元海溝 -function c62437430.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_REMOVE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c62437430.target) - e1:SetOperation(c62437430.operation) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(62437430,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_LEAVE_FIELD) - e2:SetCondition(c62437430.spcon) - e2:SetTarget(c62437430.sptg) - e2:SetOperation(c62437430.spop) - c:RegisterEffect(e2) - e1:SetLabelObject(e2) -end -function c62437430.filter(c) - return c:IsAttribute(ATTRIBUTE_WATER) and c:IsAbleToRemove() and not c:IsHasEffect(EFFECT_NECRO_VALLEY) - and (not c:IsLocation(LOCATION_MZONE) or c:IsFaceup()) -end -function c62437430.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c62437430.filter,tp,0x16,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,0x16) -end -function c62437430.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local tc=Duel.SelectMatchingCard(tp,c62437430.filter,tp,0x16,0,1,1,nil):GetFirst() - if tc then - Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) - tc:RegisterFlagEffect(62437430,RESET_EVENT+0x1fe0000,0,0) - e:GetLabelObject():SetLabelObject(tc) - end -end -function c62437430.spcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=e:GetLabelObject() - return tc and c:IsReason(REASON_DESTROY) and c:IsPreviousPosition(POS_FACEUP) -end -function c62437430.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetLabelObject():GetFlagEffect(62437430)~=0 - and e:GetLabelObject():GetReasonEffect():GetHandler()==e:GetHandler() end - Duel.SetTargetCard(e:GetLabelObject()) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetLabelObject(),1,0,0) -end -function c62437430.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c62437709.lua b/script/c62437709.lua deleted file mode 100644 index ad9582d500..0000000000 --- a/script/c62437709.lua +++ /dev/null @@ -1,84 +0,0 @@ ---エーリアン・グレイ -function c62437709.initial_effect(c) - --flip - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_COUNTER) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP) - e1:SetTarget(c62437709.target) - e1:SetOperation(c62437709.operation) - c:RegisterEffect(e1) - --draw - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_FLIP) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetOperation(c62437709.flop) - c:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(62437709,0)) - e3:SetCategory(CATEGORY_DRAW) - e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e3:SetCode(EVENT_BATTLE_DESTROYED) - e3:SetCondition(c62437709.drcon) - e3:SetTarget(c62437709.drtg) - e3:SetOperation(c62437709.drop) - c:RegisterEffect(e3) - --atk def - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e4:SetCode(EVENT_DAMAGE_CALCULATING) - e4:SetRange(LOCATION_MZONE) - e4:SetOperation(c62437709.adval) - c:RegisterEffect(e4) -end -function c62437709.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsFaceup() end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_COUNTER,g,1,0xe,1) -end -function c62437709.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) then - tc:AddCounter(0xe,1) - end -end -function c62437709.flop(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():RegisterFlagEffect(62437709,RESET_EVENT+0x17a0000,0,0) -end -function c62437709.drcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) - and e:GetHandler():GetFlagEffect(62437709)~=0 -end -function c62437709.drtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(1) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c62437709.drop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end -function c62437709.addown(c,e) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_PHASE+RESET_DAMAGE_CAL) - e1:SetValue(c:GetCounter(0xe)*-300) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_UPDATE_DEFENCE) - c:RegisterEffect(e2) -end -function c62437709.adval(e,tp,eg,ep,ev,re,r,rp) - local a=Duel.GetAttacker() - local d=Duel.GetAttackTarget() - if not d then return end - if a:GetCounter(0xe)>0 and d:IsSetCard(0xc) then c62437709.addown(a,e) end - if d:GetCounter(0xe)>0 and a:IsSetCard(0xc) then c62437709.addown(d,e) end -end diff --git a/script/c62472614.lua b/script/c62472614.lua deleted file mode 100644 index a0232a3bb9..0000000000 --- a/script/c62472614.lua +++ /dev/null @@ -1,72 +0,0 @@ ---疫病 -function c62472614.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c62472614.target) - e1:SetOperation(c62472614.operation) - c:RegisterEffect(e1) - --Atk,def - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_SET_ATTACK) - e2:SetValue(0) - c:RegisterEffect(e2) - --Equip limit - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_EQUIP_LIMIT) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e3:SetValue(c62472614.eqlimit) - c:RegisterEffect(e3) - --damage - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(62472614,0)) - e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e4:SetCode(EVENT_PHASE+PHASE_STANDBY) - e4:SetRange(LOCATION_SZONE) - e4:SetCountLimit(1) - e4:SetCondition(c62472614.damcon) - e4:SetTarget(c62472614.damtg) - e4:SetOperation(c62472614.damop) - c:RegisterEffect(e4) -end -function c62472614.eqlimit(e,c) - return c:IsRace(RACE_WARRIOR+RACE_BEASTWARRIOR+RACE_SPELLCASTER) -end -function c62472614.filter(c) - return c:IsFaceup() and c:IsRace(RACE_WARRIOR+RACE_BEASTWARRIOR+RACE_SPELLCASTER) -end -function c62472614.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() and c62472614.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c62472614.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c62472614.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c62472614.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,e:GetHandler(),tc) - end -end -function c62472614.damcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c62472614.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local damp=e:GetHandler():GetEquipTarget():GetControler() - Duel.SetTargetPlayer(damp) - Duel.SetTargetParam(500) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,damp,500) -end -function c62472614.damop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local damp=e:GetHandler():GetEquipTarget():GetControler() - local d=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM) - Duel.Damage(damp,d,REASON_EFFECT) -end diff --git a/script/c62473983.lua b/script/c62473983.lua deleted file mode 100644 index 1a94414527..0000000000 --- a/script/c62473983.lua +++ /dev/null @@ -1,41 +0,0 @@ ---墓守の長 -function c62473983.initial_effect(c) - c:SetUniqueOnField(1,0,62473983) - --immune to necro valley - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EFFECT_NECRO_VALLEY_IM) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(1,0) - c:RegisterEffect(e1) - --summon success - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_SUMMON_SUCCESS) - e2:SetCondition(c62473983.spcon) - e2:SetTarget(c62473983.sptg) - e2:SetOperation(c62473983.spop) - c:RegisterEffect(e2) -end -function c62473983.spcon(e,tp,eg,ep,ev,re,r,rp) - return bit.band(e:GetHandler():GetSummonType(),0xff000000)==SUMMON_TYPE_ADVANCE -end -function c62473983.filter(c,e,tp) - return c:IsSetCard(0x2e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c62473983.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c62473983.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c62473983.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c62473983.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c62473983.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c62476197.lua b/script/c62476197.lua deleted file mode 100644 index 4adcd6fa89..0000000000 --- a/script/c62476197.lua +++ /dev/null @@ -1,29 +0,0 @@ ---アチャチャチャンバラー -function c62476197.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(62476197,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetRange(LOCATION_HAND) - e1:SetCode(EVENT_CHAINING) - e1:SetCondition(c62476197.spcon) - e1:SetTarget(c62476197.sptg) - e1:SetOperation(c62476197.spop) - c:RegisterEffect(e1) -end -function c62476197.spcon(e,tp,eg,ep,ev,re,r,rp) - return aux.damcon1(e,tp,eg,ep,ev,re,r,rp) or aux.damcon1(e,1-tp,eg,ep,ev,re,r,rp) -end -function c62476197.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return not e:GetHandler():IsStatus(STATUS_CHAINING) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,400) -end -function c62476197.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then - Duel.Damage(1-tp,400,REASON_EFFECT) - end -end diff --git a/script/c62476815.lua b/script/c62476815.lua deleted file mode 100644 index b4f3c66ec0..0000000000 --- a/script/c62476815.lua +++ /dev/null @@ -1,15 +0,0 @@ ---ゴゴゴゴーレム -function c62476815.initial_effect(c) - --battle des rep - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DESTROY_REPLACE) - e1:SetCountLimit(1) - e1:SetTarget(c62476815.reptg) - c:RegisterEffect(e1) -end -function c62476815.reptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsDefencePos() - and e:GetHandler():IsReason(REASON_BATTLE) end - return true -end diff --git a/script/c62499965.lua b/script/c62499965.lua deleted file mode 100644 index 88ff50390b..0000000000 --- a/script/c62499965.lua +++ /dev/null @@ -1,36 +0,0 @@ ---Z-ONE -function c62499965.initial_effect(c) - --salvage - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(62499965,0)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCondition(c62499965.thcon) - e1:SetTarget(c62499965.thtg) - e1:SetOperation(c62499965.thop) - c:RegisterEffect(e1) -end -function c62499965.thcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsReason(REASON_DESTROY) - and e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) - and e:GetHandler():IsPreviousPosition(POS_FACEDOWN) -end -function c62499965.filter(c) - return c:IsType(TYPE_SPELL) and c:IsType(TYPE_FIELD+TYPE_CONTINUOUS) and c:IsAbleToHand() -end -function c62499965.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c62499965.filter(chkc) end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c62499965.filter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0) -end -function c62499965.thop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end diff --git a/script/c62543393.lua b/script/c62543393.lua deleted file mode 100644 index f3a9f9a8e2..0000000000 --- a/script/c62543393.lua +++ /dev/null @@ -1,35 +0,0 @@ ---レクンガ -function c62543393.initial_effect(c) - --token - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(62543393,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c62543393.cost) - e1:SetTarget(c62543393.target) - e1:SetOperation(c62543393.operation) - c:RegisterEffect(e1) -end -function c62543393.cfilter(c) - return c:IsAttribute(ATTRIBUTE_WATER) and c:IsAbleToRemoveAsCost() -end -function c62543393.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c62543393.cfilter,tp,LOCATION_GRAVE,0,2,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c62543393.cfilter,tp,LOCATION_GRAVE,0,2,2,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c62543393.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsPlayerCanSpecialSummonMonster(tp,62543394,0,0x4011,700,700,2,RACE_PLANT,ATTRIBUTE_WATER) end - Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0) -end -function c62543393.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsPlayerCanSpecialSummonMonster(tp,62543394,0,0x4011,700,700,2,RACE_PLANT,ATTRIBUTE_WATER) then - local token=Duel.CreateToken(tp,62543394) - Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP_ATTACK) - end -end diff --git a/script/c62560742.lua b/script/c62560742.lua deleted file mode 100644 index 35b37aaae7..0000000000 --- a/script/c62560742.lua +++ /dev/null @@ -1,48 +0,0 @@ ---TG レシプロ・ドラゴン・フライ -function c62560742.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure2(c,nil,aux.NonTuner(nil)) - c:EnableReviveLimit() - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(62560742,0)) - e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetTarget(c62560742.target) - e1:SetOperation(c62560742.operation) - c:RegisterEffect(e1) -end -function c62560742.filter(c) - return c:IsFaceup() and c:IsSetCard(0x27) and c:IsType(TYPE_SYNCHRO) -end -function c62560742.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c62560742.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c62560742.filter,tp,LOCATION_MZONE,0,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(62560742,2)) - local g=Duel.SelectTarget(tp,c62560742.filter,tp,LOCATION_MZONE,0,1,1,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,0,0) -end -function c62560742.mgfilter(c,e,tp,sync) - return not c:IsControler(tp) or not c:IsLocation(LOCATION_GRAVE) or not c:IsType(TYPE_SYNCHRO) - or bit.band(c:GetReason(),0x80008)~=0x80008 or c:GetReasonCard()~=sync - or not c:IsCanBeSpecialSummoned(e,0,tp,false,false) or c:IsHasEffect(EFFECT_NECRO_VALLEY) -end -function c62560742.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if not tc:IsRelateToEffect(e) then return end - local mg=tc:GetMaterial() - local sumable=true - local sumtype=tc:GetSummonType() - if Duel.SendtoGrave(tc,REASON_EFFECT)==0 or tc:GetSummonType()~=SUMMON_TYPE_SYNCHRO or mg:GetCount()==0 - or mg:GetCount()>Duel.GetLocationCount(tp,LOCATION_MZONE) - or mg:IsExists(c62560742.mgfilter,1,nil,e,tp,tc) then - sumable=false - end - if sumable and Duel.SelectYesNo(tp,aux.Stringid(62560742,1)) then - Duel.BreakEffect() - Duel.SpecialSummon(mg,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c6256844.lua b/script/c6256844.lua deleted file mode 100644 index 9b68310b28..0000000000 --- a/script/c6256844.lua +++ /dev/null @@ -1,28 +0,0 @@ ---レアル・ジェネクス・ターボ -function c6256844.initial_effect(c) - --search - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(6256844,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c6256844.target) - e1:SetOperation(c6256844.operation) - c:RegisterEffect(e1) -end -function c6256844.filter(c) - return c:GetLevel()==1 and c:IsSetCard(0x2) and c:IsAbleToHand() -end -function c6256844.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c6256844.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c6256844.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c6256844.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c6260554.lua b/script/c6260554.lua deleted file mode 100644 index 5438175035..0000000000 --- a/script/c6260554.lua +++ /dev/null @@ -1,37 +0,0 @@ ---弾幕回避 -function c6260554.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_CHAINING) - e1:SetCondition(c6260554.condition) - e1:SetCost(c6260554.cost) - e1:SetTarget(c6260554.target) - e1:SetOperation(c6260554.activate) - c:RegisterEffect(e1) -end -function c6260554.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsChainNegatable(ev) and (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE)) -end -function c6260554.filter(c) - return c:IsReleasable() and not c:IsStatus(STATUS_BATTLE_DESTROYED) -end -function c6260554.cost(e,tp,eg,ep,ev,re,r,rp,chk) - local g=Duel.GetMatchingGroup(Card.IsCode,tp,LOCATION_MZONE,0,nil,31533705) - if chk==0 then return g:GetCount()>0 and g:FilterCount(c6260554.filter,nil)==g:GetCount() end - Duel.Release(g,REASON_COST) -end -function c6260554.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) - end -end -function c6260554.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateActivation(ev) - if re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(eg,REASON_EFFECT) - end -end diff --git a/script/c62624486.lua b/script/c62624486.lua deleted file mode 100644 index b9181a8de3..0000000000 --- a/script/c62624486.lua +++ /dev/null @@ -1,43 +0,0 @@ ---M・HERO ダイアン -function c62624486.initial_effect(c) - c:EnableReviveLimit() - --spsummon condition - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(aux.FALSE) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(62624486,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_BATTLE_DESTROYED) - e2:SetRange(LOCATION_MZONE) - e2:SetCondition(c62624486.spcon) - e2:SetTarget(c62624486.sptg) - e2:SetOperation(c62624486.spop) - c:RegisterEffect(e2) -end -function c62624486.spcon(e,tp,eg,ep,ev,re,r,rp) - local tc=eg:GetFirst() - return eg:GetCount()==1 and tc:GetReasonCard()==e:GetHandler() - and tc:IsLocation(LOCATION_GRAVE) and tc:IsReason(REASON_BATTLE) -end -function c62624486.filter(c,e,tp) - return c:IsLevelBelow(4) and c:IsSetCard(0x8) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c62624486.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c62624486.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c62624486.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c62624486.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c62633180.lua b/script/c62633180.lua deleted file mode 100644 index 5002f8b8b1..0000000000 --- a/script/c62633180.lua +++ /dev/null @@ -1,27 +0,0 @@ ---本陣強襲 -function c62633180.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_DECKDES) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c62633180.target) - e1:SetOperation(c62633180.activate) - c:RegisterEffect(e1) -end -function c62633180.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:IsDestructable() end - if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,LOCATION_MZONE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,1-tp,2) -end -function c62633180.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)>0 then - Duel.BreakEffect() - Duel.DiscardDeck(1-tp,2,REASON_EFFECT) - end -end diff --git a/script/c62681049.lua b/script/c62681049.lua deleted file mode 100644 index 0b5865085e..0000000000 --- a/script/c62681049.lua +++ /dev/null @@ -1,35 +0,0 @@ ---妖仙郷の眩暈風 -function c62681049.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c62681049.condition) - c:RegisterEffect(e1) - --todeck - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetProperty(EFFECT_FLAG_SET_AVAILABLE) - e2:SetRange(LOCATION_SZONE) - e2:SetCode(EFFECT_TO_HAND_REDIRECT) - e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e2:SetTarget(c62681049.tdtg) - e2:SetCondition(c62681049.tdcon) - e2:SetValue(LOCATION_DECKSHF) - c:RegisterEffect(e2) -end -function c62681049.filter(c) - return c:IsFaceup() and c:IsLevelAbove(6) and c:IsSetCard(0xb3) -end -function c62681049.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c62681049.filter,tp,LOCATION_MZONE,0,1,nil) -end -function c62681049.tdtg(e,c) - return (c:IsFacedown() or not c:IsSetCard(0xb3)) and c:IsReason(REASON_EFFECT) -end -function c62681049.tdcon(e) - local tp=e:GetHandlerPlayer() - local tc1=Duel.GetFieldCard(tp,LOCATION_SZONE,6) - local tc2=Duel.GetFieldCard(tp,LOCATION_SZONE,7) - return (tc1 and tc1:IsSetCard(0xb3)) or (tc2 and tc2:IsSetCard(0xb3)) -end diff --git a/script/c62701967.lua b/script/c62701967.lua deleted file mode 100644 index d110db8436..0000000000 --- a/script/c62701967.lua +++ /dev/null @@ -1,44 +0,0 @@ ---ジュラック・ティラヌス -function c62701967.initial_effect(c) - --atkup - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(62701967,0)) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetLabel(500) - e1:SetCost(c62701967.atkcost) - e1:SetOperation(c62701967.operation) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(62701967,0)) - e2:SetCategory(CATEGORY_ATKCHANGE) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_BATTLE_DESTROYING) - e2:SetLabel(300) - e2:SetCondition(c62701967.atkcon) - e2:SetOperation(c62701967.operation) - c:RegisterEffect(e2) -end -function c62701967.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsRace,1,e:GetHandler(),RACE_DINOSAUR) end - local sg=Duel.SelectReleaseGroup(tp,Card.IsRace,1,1,e:GetHandler(),RACE_DINOSAUR) - Duel.Release(sg,REASON_COST) -end -function c62701967.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFaceup() and c:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(e:GetLabel()) - e1:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e1) - end -end -function c62701967.atkcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local bc=c:GetBattleTarget() - return c:IsFaceup() and c:IsRelateToBattle() - and bc:IsLocation(LOCATION_GRAVE) and bc:IsReason(REASON_BATTLE) and bc:IsType(TYPE_MONSTER) -end diff --git a/script/c62729173.lua b/script/c62729173.lua deleted file mode 100644 index d4aed4c5cd..0000000000 --- a/script/c62729173.lua +++ /dev/null @@ -1,12 +0,0 @@ ---インヴェルズ万能態 -function c62729173.initial_effect(c) - --double tribute - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DOUBLE_TRIBUTE) - e1:SetValue(c62729173.condition) - c:RegisterEffect(e1) -end -function c62729173.condition(e,c) - return c:IsSetCard(0x100a) -end diff --git a/script/c62742651.lua b/script/c62742651.lua deleted file mode 100644 index b13be44e30..0000000000 --- a/script/c62742651.lua +++ /dev/null @@ -1,55 +0,0 @@ ---アーマード・サイキッカー -function c62742651.initial_effect(c) - --summon with no tribute - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(62742651,0)) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SUMMON_PROC) - e1:SetCondition(c62742651.ntcon) - c:RegisterEffect(e1) - --damage - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(62742651,1)) - e2:SetCategory(CATEGORY_DAMAGE+CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_BATTLE_DESTROYING) - e2:SetCondition(c62742651.damcon) - e2:SetTarget(c62742651.damtg) - e2:SetOperation(c62742651.damop) - c:RegisterEffect(e2) -end -function c62742651.ntfilter(c) - return c:IsFaceup() and c:IsRace(RACE_PSYCHO) -end -function c62742651.ntcon(e,c,minc) - if c==nil then return true end - return minc==0 and c:GetLevel()>4 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c62742651.ntfilter,c:GetControler(),LOCATION_MZONE,0,1,nil) -end -function c62742651.damcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsRelateToBattle() and c:GetBattleTarget():IsType(TYPE_MONSTER) -end -function c62742651.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local bc=e:GetHandler():GetBattleTarget() - local dam=bc:GetAttack()/2 - if dam<0 then dam=0 end - Duel.SetTargetParam(dam) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,tp,dam) -end -function c62742651.spfilter(c,e,tp,atk) - return c:IsAttackBelow(atk) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsHasEffect(EFFECT_NECRO_VALLEY) -end -function c62742651.damop(e,tp,eg,ep,ev,re,r,rp) - local dam=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM) - if Duel.Damage(tp,dam,REASON_EFFECT)~=0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then - local g=Duel.GetMatchingGroup(c62742651.spfilter,tp,LOCATION_GRAVE,0,nil,e,tp,dam) - if g:GetCount()~=0 and Duel.SelectYesNo(tp,aux.Stringid(62742651,2)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=g:Select(tp,1,1,nil) - Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) - end - end -end diff --git a/script/c6276588.lua b/script/c6276588.lua deleted file mode 100644 index deaa5e9c2f..0000000000 --- a/script/c6276588.lua +++ /dev/null @@ -1,66 +0,0 @@ ---カラクリ忍者 九壱九 -function c6276588.initial_effect(c) - --must attack - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_MUST_ATTACK) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_CANNOT_EP) - e2:SetRange(LOCATION_MZONE) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetTargetRange(1,0) - e2:SetCondition(c6276588.becon) - c:RegisterEffect(e2) - --pos change - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(6276588,0)) - e3:SetCategory(CATEGORY_POSITION) - e3:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_SINGLE) - e3:SetCode(EVENT_BE_BATTLE_TARGET) - e3:SetOperation(c6276588.posop) - c:RegisterEffect(e3) - --special summon - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(6276588,1)) - e4:SetCategory(CATEGORY_SPECIAL_SUMMON) - e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e4:SetProperty(EFFECT_FLAG_CARD_TARGET) - e4:SetCode(EVENT_BATTLE_DESTROYED) - e4:SetRange(LOCATION_MZONE) - e4:SetCondition(c6276588.spcon) - e4:SetTarget(c6276588.sptg) - e4:SetOperation(c6276588.spop) - c:RegisterEffect(e4) -end -function c6276588.becon(e) - return e:GetHandler():IsAttackable() -end -function c6276588.posop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFaceup() and c:IsRelateToEffect(e) then - Duel.ChangePosition(c,POS_FACEUP_DEFENCE,0,POS_FACEUP_ATTACK,0) - end -end -function c6276588.spcon(e,tp,eg,ep,ev,re,r,rp) - local tc=eg:GetFirst() - return eg:GetCount()==1 and tc:GetReasonCard()==e:GetHandler() - and tc:IsLocation(LOCATION_GRAVE) and tc:IsReason(REASON_BATTLE) -end -function c6276588.filter(c,e,tp) - return c:IsLevelBelow(4) and c:IsSetCard(0x11) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c6276588.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c6276588.filter(chkc,e,tp) end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c6276588.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,g:GetCount(),0,0) -end -function c6276588.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENCE) - end -end diff --git a/script/c62782218.lua b/script/c62782218.lua deleted file mode 100644 index 9d4db70fa2..0000000000 --- a/script/c62782218.lua +++ /dev/null @@ -1,73 +0,0 @@ ---スカル・コンダクター -function c62782218.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(62782218,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCode(EVENT_PHASE+PHASE_BATTLE) - e1:SetTarget(c62782218.destg) - e1:SetOperation(c62782218.desop) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(62782218,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_HAND) - e2:SetCost(c62782218.spcost) - e2:SetTarget(c62782218.sptg) - e2:SetOperation(c62782218.spop) - c:RegisterEffect(e2) -end -function c62782218.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0) -end -function c62782218.desop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - Duel.Destroy(c,REASON_EFFECT) - end -end -function c62782218.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end -function c62782218.spfilter(c,e,tp,satk) - local atk=c:GetAttack() - return atk>=0 and (not satk or atk==satk) and c:IsRace(RACE_ZOMBIE) - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c62782218.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ft<=0 then return false end - if ft==1 then return Duel.IsExistingMatchingCard(c62782218.spfilter,tp,LOCATION_HAND,0,1,e:GetHandler(),e,tp,2000) - else - local g=Duel.GetMatchingGroup(c62782218.spfilter,tp,LOCATION_HAND,0,e:GetHandler(),e,tp) - return g:CheckWithSumEqual(Card.GetAttack,2000,1,2) - end - end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c62782218.spop(e,tp,eg,ep,ev,re,r,rp) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ft<=0 then return end - if ft==1 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c62782218.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp,2000) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end - else - local g=Duel.GetMatchingGroup(c62782218.spfilter,tp,LOCATION_HAND,0,nil,e,tp) - if g:CheckWithSumEqual(Card.GetAttack,2000,1,2) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=g:SelectWithSumEqual(tp,Card.GetAttack,2000,1,2) - Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) - end - end -end diff --git a/script/c62784717.lua b/script/c62784717.lua deleted file mode 100644 index 6532855c26..0000000000 --- a/script/c62784717.lua +++ /dev/null @@ -1,48 +0,0 @@ ---死神の巡遊 -function c62784717.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_STANDBY_PHASE) - c:RegisterEffect(e1) - --coin - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(62784717,0)) - e2:SetCategory(CATEGORY_COIN) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetRange(LOCATION_SZONE) - e2:SetCountLimit(1) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) - e2:SetCondition(c62784717.coincon) - e2:SetTarget(c62784717.cointg) - e2:SetOperation(c62784717.coinop) - c:RegisterEffect(e2) -end -function c62784717.coincon(e,tp,eg,ep,ev,re,r,rp) - return tp~=Duel.GetTurnPlayer() -end -function c62784717.cointg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_COIN,nil,0,tp,1) -end -function c62784717.coinop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) then return end - local res=Duel.TossCoin(tp,1) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EFFECT_CANNOT_SUMMON) - if res==0 then - e1:SetReset(RESET_PHASE+PHASE_END,2) - e1:SetTargetRange(1,0) - else - e1:SetReset(RESET_PHASE+PHASE_END) - e1:SetTargetRange(0,1) - end - Duel.RegisterEffect(e1,tp) - local e2=e1:Clone() - e2:SetCode(EFFECT_CANNOT_FLIP_SUMMON) - Duel.RegisterEffect(e2,tp) -end diff --git a/script/c62835876.lua b/script/c62835876.lua deleted file mode 100644 index 500255055c..0000000000 --- a/script/c62835876.lua +++ /dev/null @@ -1,39 +0,0 @@ ---善悪の彼岸 -function c62835876.initial_effect(c) - aux.AddRitualProcGreater(c,aux.FilterBoolFunction(Card.IsCode,35330871)) - --search - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_GRAVE) - e1:SetCountLimit(1,62835876) - e1:SetCondition(aux.exccon) - e1:SetCost(c62835876.thcost) - e1:SetTarget(c62835876.thtg) - e1:SetOperation(c62835876.thop) - c:RegisterEffect(e1) -end -function c62835876.cfilter(c) - return c:IsSetCard(0xb1) and c:IsType(TYPE_MONSTER) and c:IsAbleToGraveAsCost() -end -function c62835876.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() - and Duel.IsExistingMatchingCard(c62835876.cfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) - Duel.DiscardHand(tp,c62835876.cfilter,1,1,REASON_COST,nil) -end -function c62835876.filter(c) - return c:IsSetCard(0xb1) and c:IsAbleToHand() -end -function c62835876.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c62835876.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c62835876.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c62835876.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c6285791.lua b/script/c6285791.lua deleted file mode 100644 index 1b6411bd11..0000000000 --- a/script/c6285791.lua +++ /dev/null @@ -1,27 +0,0 @@ ---邪悪なるワーム・ビースト -function c6285791.initial_effect(c) - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(6285791,0)) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCondition(c6285791.retcon) - e1:SetTarget(c6285791.rettg) - e1:SetOperation(c6285791.retop) - c:RegisterEffect(e1) -end -function c6285791.retcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c6285791.rettg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0) -end -function c6285791.retop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - Duel.SendtoHand(c,nil,REASON_EFFECT) - end -end diff --git a/script/c62867251.lua b/script/c62867251.lua deleted file mode 100644 index 2b49ba2bd7..0000000000 --- a/script/c62867251.lua +++ /dev/null @@ -1,32 +0,0 @@ ---聖なる輝き -function c62867251.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_DRAW_PHASE) - c:RegisterEffect(e1) - --cannot mset - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetRange(LOCATION_SZONE) - e2:SetCode(EFFECT_CANNOT_MSET) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetTargetRange(1,1) - c:RegisterEffect(e2) - --devine light - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetRange(LOCATION_SZONE) - e3:SetCode(EFFECT_DEVINE_LIGHT) - e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e3:SetTargetRange(1,1) - c:RegisterEffect(e3) - --cannot turn set - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_FIELD) - e4:SetCode(EFFECT_CANNOT_TURN_SET) - e4:SetRange(LOCATION_SZONE) - e4:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - c:RegisterEffect(e4) -end diff --git a/script/c62868900.lua b/script/c62868900.lua deleted file mode 100644 index ccc9a04aab..0000000000 --- a/script/c62868900.lua +++ /dev/null @@ -1,52 +0,0 @@ ---D-シールド -function c62868900.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_BE_BATTLE_TARGET) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCondition(c62868900.condition) - e1:SetTarget(c62868900.target) - e1:SetOperation(c62868900.operation) - c:RegisterEffect(e1) -end -function c62868900.condition(e,tp,eg,ep,ev,re,r,rp) - local tc=eg:GetFirst() - return tc:IsControler(tp) and tc:IsPosition(POS_FACEUP_ATTACK) and tc:IsSetCard(0xc008) -end -function c62868900.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc==eg:GetFirst() end - if chk==0 then return eg:GetFirst():IsCanBeEffectTarget(e) end - Duel.SetTargetCard(eg) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c62868900.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsLocation(LOCATION_SZONE) then return end - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.ChangePosition(tc,POS_FACEUP_DEFENCE) - Duel.Equip(tp,c,tc) - c:CancelToGrave() - --Atkup - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_EQUIP) - e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e1:SetValue(1) - e1:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e1) - --Equip limit - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_EQUIP_LIMIT) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetValue(c62868900.eqlimit) - e2:SetLabelObject(tc) - e2:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e2) - end -end -function c62868900.eqlimit(e,c) - return c==e:GetLabelObject() -end diff --git a/script/c62873545.lua b/script/c62873545.lua deleted file mode 100644 index 345732fe29..0000000000 --- a/script/c62873545.lua +++ /dev/null @@ -1,27 +0,0 @@ ---究極竜騎士 -function c62873545.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcCode2(c,5405694,23995346,true,true) - --spsummon condition - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(aux.fuslimit) - c:RegisterEffect(e1) - --atk - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(c62873545.atkval) - c:RegisterEffect(e2) -end -function c62873545.filter(c) - return c:IsFaceup() and c:IsRace(RACE_DRAGON) -end -function c62873545.atkval(e,c) - return Duel.GetMatchingGroupCount(c62873545.filter,c:GetControler(),LOCATION_MZONE,0,c)*500 -end diff --git a/script/c62878208.lua b/script/c62878208.lua deleted file mode 100644 index 6e6dc88531..0000000000 --- a/script/c62878208.lua +++ /dev/null @@ -1,54 +0,0 @@ ---イクイップ・シュート -function c62878208.initial_effect(c) - --equip - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c62878208.eqcon) - e1:SetTarget(c62878208.eqtg) - e1:SetOperation(c62878208.eqop) - c:RegisterEffect(e1) -end -function c62878208.eqcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()==PHASE_BATTLE -end -function c62878208.filter1(c,e,tp) - local ec=c:GetEquipTarget() - return ec and ec:IsControler(tp) and ec:IsPosition(POS_FACEUP_ATTACK) - and Duel.IsExistingTarget(c62878208.filter2,tp,0,LOCATION_MZONE,1,nil,c) -end -function c62878208.filter2(c,ec) - return c:IsPosition(POS_FACEUP_ATTACK) and ec:CheckEquipTarget(c) -end -function c62878208.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - if chk==0 then return Duel.IsExistingTarget(c62878208.filter1,tp,LOCATION_SZONE,LOCATION_SZONE,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(62878208,2)) - local g1=Duel.SelectTarget(tp,c62878208.filter1,tp,LOCATION_SZONE,LOCATION_SZONE,1,1,nil,e,tp) - e:SetLabelObject(g1:GetFirst()) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUPATTACK) - local g2=Duel.SelectTarget(tp,c62878208.filter2,tp,0,LOCATION_MZONE,1,1,nil,g1:GetFirst()) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,g1,1,0,0) -end -function c62878208.eqop(e,tp,eg,ep,ev,re,r,rp) - local eq=e:GetLabelObject() - local eqc=eq:GetEquipTarget() - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local tc=g:GetFirst() - if eq==tc then tc=g:GetNext() end - if eqc and eq:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsRelateToEffect(e) then - if Duel.Equip(tp,eq,tc)==0 then return end - Duel.BreakEffect() - local a=eqc - local d=tc - if Duel.GetTurnPlayer()~=tp then - a=tc - d=eqc - end - if a:IsAttackable() and not a:IsImmuneToEffect(e) and not d:IsImmuneToEffect(e) then - Duel.CalculateDamage(a,d) - end - end -end diff --git a/script/c62892347.lua b/script/c62892347.lua deleted file mode 100644 index 077416ba9d..0000000000 --- a/script/c62892347.lua +++ /dev/null @@ -1,95 +0,0 @@ ---アルカナフォース0-THE FOOL -function c62892347.initial_effect(c) - --battle indestructable - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e1:SetValue(1) - c:RegisterEffect(e1) - -- - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_CANNOT_CHANGE_POSITION) - e2:SetCondition(c62892347.poscon) - c:RegisterEffect(e2) - --coin - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(62892347,0)) - e3:SetCategory(CATEGORY_COIN) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e3:SetCode(EVENT_SUMMON_SUCCESS) - e3:SetTarget(c62892347.cointg) - e3:SetOperation(c62892347.coinop) - c:RegisterEffect(e3) - local e4=e3:Clone() - e4:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e4) - local e5=e3:Clone() - e5:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - c:RegisterEffect(e5) -end -function c62892347.poscon(e) - return e:GetHandler():IsPosition(POS_FACEUP_ATTACK) -end -function c62892347.cointg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_COIN,nil,0,tp,1) -end -function c62892347.coinop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) or c:IsFacedown() then return end - local res=0 - if c:IsHasEffect(73206827) then - res=1-Duel.SelectOption(tp,60,61) - else res=Duel.TossCoin(tp,1) end - c62892347.arcanareg(c,res) -end -function c62892347.arcanareg(c,coin) - --disable - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_DISABLE) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(LOCATION_ONFIELD,LOCATION_ONFIELD) - e1:SetTarget(c62892347.distg) - e1:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e1) - --disable effect - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_CHAIN_SOLVING) - e2:SetRange(LOCATION_MZONE) - e2:SetOperation(c62892347.disop) - e2:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e2) - --self destroy - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetCode(EFFECT_SELF_DESTROY) - e3:SetRange(LOCATION_MZONE) - e3:SetTargetRange(LOCATION_ONFIELD,LOCATION_ONFIELD) - e3:SetTarget(c62892347.distg) - e3:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e3) - c:RegisterFlagEffect(36690018,RESET_EVENT+0x1ff0000,EFFECT_FLAG_CLIENT_HINT,1,coin,63-coin) -end -function c62892347.distg(e,c) - local ec=e:GetHandler() - if c==ec or c:GetCardTargetCount()==0 then return false end - local val=ec:GetFlagEffectLabel(36690018) - if val==1 then - return c:GetControler()==ec:GetControler() and c:GetCardTarget():IsContains(ec) - else return c:GetControler()~=ec:GetControler() and c:GetCardTarget():IsContains(ec) end -end -function c62892347.disop(e,tp,eg,ep,ev,re,r,rp) - local ec=e:GetHandler() - if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return end - local val=ec:GetFlagEffectLabel(36690018) - if (val==1 and rp~=ec:GetControler()) or (val==0 and rp==ec:GetControler()) then return end - local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) - if not g or not g:IsContains(ec) then return end - Duel.NegateEffect(ev) - if re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(re:GetHandler(),REASON_EFFECT) - end -end diff --git a/script/c62895219.lua b/script/c62895219.lua deleted file mode 100644 index 5598b4e47c..0000000000 --- a/script/c62895219.lua +++ /dev/null @@ -1,98 +0,0 @@ ---幻奏の歌姫ソプラノ -function c62895219.initial_effect(c) - --tohand - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCountLimit(1,62895219) - e1:SetTarget(c62895219.thtg) - e1:SetOperation(c62895219.thop) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetTarget(c62895219.target) - e2:SetOperation(c62895219.operation) - c:RegisterEffect(e2) -end -function c62895219.filter(c) - return c:IsSetCard(0x9b) and c:IsType(TYPE_MONSTER) and not c:IsCode(62895219) and c:IsAbleToHand() -end -function c62895219.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c62895219.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c62895219.filter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c62895219.filter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c62895219.thop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end -function c62895219.filter1(c,e) - return c:IsCanBeFusionMaterial() and not c:IsImmuneToEffect(e) -end -function c62895219.filter2(c,e,tp,m,f,gc) - return c:IsType(TYPE_FUSION) and c:IsSetCard(0x9b) and (not f or f(c)) - and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,gc) -end -function c62895219.target(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then - local mg1=Duel.GetMatchingGroup(Card.IsCanBeFusionMaterial,tp,LOCATION_MZONE,0,c) - local res=Duel.IsExistingMatchingCard(c62895219.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,c) - if not res then - local ce=Duel.GetChainMaterial(tp) - if ce~=nil then - local fgroup=ce:GetTarget() - local mg2=fgroup(ce,e,tp) - local mf=ce:GetValue() - res=Duel.IsExistingMatchingCard(c62895219.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,c) - end - end - return res - end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function c62895219.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFacedown() or not c:IsRelateToEffect(e) or c:IsImmuneToEffect(e) then return end - local mg1=Duel.GetMatchingGroup(c62895219.filter1,tp,LOCATION_MZONE,0,c,e) - local sg1=Duel.GetMatchingGroup(c62895219.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,c) - local mg2=nil - local sg2=nil - local ce=Duel.GetChainMaterial(tp) - if ce~=nil then - local fgroup=ce:GetTarget() - mg2=fgroup(ce,e,tp) - local mf=ce:GetValue() - sg2=Duel.GetMatchingGroup(c62895219.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,mf,c) - end - if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then - local sg=sg1:Clone() - if sg2 then sg:Merge(sg2) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local tg=sg:Select(tp,1,1,nil) - local tc=tg:GetFirst() - if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then - local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,c) - tc:SetMaterial(mat1) - Duel.SendtoGrave(mat1,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION) - Duel.BreakEffect() - Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP) - else - local mat2=Duel.SelectFusionMaterial(tp,tc,mg2,c) - local fop=ce:GetOperation() - fop(ce,e,tp,tc,mat2) - end - tc:CompleteProcedure() - end -end diff --git a/script/c62896588.lua b/script/c62896588.lua deleted file mode 100644 index f382c28e1f..0000000000 --- a/script/c62896588.lua +++ /dev/null @@ -1,31 +0,0 @@ ---ナチュラル・チューン -function c62896588.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c62896588.target) - e1:SetOperation(c62896588.activate) - c:RegisterEffect(e1) -end -function c62896588.filter(c) - return c:IsFaceup() and c:IsType(TYPE_NORMAL) and c:IsLevelBelow(4) and not c:IsType(TYPE_TUNER) -end -function c62896588.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c62896588.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c62896588.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - Duel.SelectTarget(tp,c62896588.filter,tp,LOCATION_MZONE,0,1,1,nil) -end -function c62896588.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and c62896588.filter(tc) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_ADD_TYPE) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(TYPE_TUNER) - tc:RegisterEffect(e1) - end -end diff --git a/script/c62950604.lua b/script/c62950604.lua deleted file mode 100644 index ba32819bd3..0000000000 --- a/script/c62950604.lua +++ /dev/null @@ -1,64 +0,0 @@ ---沈黙のサイコウィザード -function c62950604.initial_effect(c) - --remove - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(62950604,0)) - e1:SetCategory(CATEGORY_REMOVE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c62950604.rmtg) - e1:SetOperation(c62950604.rmop) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(62950604,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetCondition(c62950604.spcon) - e2:SetTarget(c62950604.sptg) - e2:SetOperation(c62950604.spop) - c:RegisterEffect(e2) - e1:SetLabelObject(e2) -end -function c62950604.filter(c) - return c:IsRace(RACE_PSYCHO) and c:IsAbleToRemove() -end -function c62950604.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c62950604.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c62950604.filter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,c62950604.filter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) -end -function c62950604.rmop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - local c=e:GetHandler() - if tc:IsRelateToEffect(e) and Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)~=0 and c:IsRelateToEffect(e) then - c:RegisterFlagEffect(62950604,RESET_EVENT+0x1680000,0,0) - tc:RegisterFlagEffect(62950604,RESET_EVENT+0x1fe0000,0,0) - e:GetLabelObject():SetLabelObject(tc) - e:GetLabelObject():SetLabel(1) - end -end -function c62950604.spcon(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetLabelObject() - local act=e:GetLabel() - local c=e:GetHandler() - e:SetLabel(0) - return tc and act==1 and e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) - and c:GetFlagEffect(62950604)~=0 -end -function c62950604.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - local tc=e:GetLabelObject() - if chk==0 then return tc:GetFlagEffect(62950604)~=0 end - tc:CreateEffectRelation(e) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,tc,1,0,0) -end -function c62950604.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetLabelObject() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c62953041.lua b/script/c62953041.lua deleted file mode 100644 index ae4fd21918..0000000000 --- a/script/c62953041.lua +++ /dev/null @@ -1,64 +0,0 @@ ---稲荷火 -function c62953041.initial_effect(c) - c:SetUniqueOnField(1,0,62953041) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c62953041.hspcon) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetOperation(c62953041.spreg) - c:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(62953041,0)) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e3:SetRange(LOCATION_GRAVE) - e3:SetCode(EVENT_PHASE+PHASE_STANDBY) - e3:SetCondition(c62953041.spcon) - e3:SetTarget(c62953041.sptg) - e3:SetOperation(c62953041.spop) - e3:SetLabelObject(e2) - c:RegisterEffect(e3) -end -function c62953041.filter(c) - return c:IsFaceup() and c:IsRace(RACE_SPELLCASTER) -end -function c62953041.hspcon(e,c) - if c==nil then return true end - return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c62953041.filter,c:GetControler(),LOCATION_MZONE,0,1,nil) -end -function c62953041.spreg(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if bit.band(r,0x41)~=0x41 or not c:IsPreviousPosition(POS_FACEUP) or not c:IsPreviousLocation(LOCATION_ONFIELD) then return end - if Duel.GetTurnPlayer()==tp and Duel.GetCurrentPhase()==PHASE_STANDBY then - e:SetLabel(Duel.GetTurnCount()) - c:RegisterFlagEffect(62953041,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,0,2) - else - e:SetLabel(0) - c:RegisterFlagEffect(62953041,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,0,1) - end -end -function c62953041.spcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return e:GetLabelObject():GetLabel()~=Duel.GetTurnCount() and tp==Duel.GetTurnPlayer() and c:GetFlagEffect(62953041)>0 -end -function c62953041.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local c=e:GetHandler() - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0) - c:ResetFlagEffect(62953041) -end -function c62953041.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c62957424.lua b/script/c62957424.lua deleted file mode 100644 index de11456122..0000000000 --- a/script/c62957424.lua +++ /dev/null @@ -1,82 +0,0 @@ ---彼岸の悪鬼 リビオッコ -function c62957424.initial_effect(c) - --self destroy - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_SELF_DESTROY) - e1:SetCondition(c62957424.sdcon) - c:RegisterEffect(e1) - --Special Summon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(62957424,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_HAND) - e2:SetCountLimit(1,62957424) - e2:SetCondition(c62957424.sscon) - e2:SetTarget(c62957424.sstg) - e2:SetOperation(c62957424.ssop) - c:RegisterEffect(e2) - --spsummon - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(62957424,1)) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_TO_GRAVE) - e3:SetProperty(EFFECT_FLAG_DELAY) - e3:SetCountLimit(1,62957424) - e3:SetTarget(c62957424.sptg) - e3:SetOperation(c62957424.spop) - c:RegisterEffect(e3) -end -function c62957424.sdfilter(c) - return not c:IsFaceup() or not c:IsSetCard(0xb1) -end -function c62957424.sdcon(e) - return Duel.IsExistingMatchingCard(c62957424.sdfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) -end -function c62957424.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) -end -function c62957424.sscon(e,tp,eg,ep,ev,re,r,rp) - return not Duel.IsExistingMatchingCard(c62957424.filter,tp,LOCATION_ONFIELD,0,1,nil) -end -function c62957424.sstg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c62957424.ssop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP) - end -end -function c62957424.spfilter(c,e,tp) - return c:GetLevel()==3 and c:IsAttribute(ATTRIBUTE_DARK) and c:IsRace(RACE_FIEND) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c62957424.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c62957424.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c62957424.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c62957424.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - local tc=g:GetFirst() - if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1,true) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e2,true) - Duel.SpecialSummonComplete() - end -end diff --git a/script/c62966332.lua b/script/c62966332.lua deleted file mode 100644 index b230f0670e..0000000000 --- a/script/c62966332.lua +++ /dev/null @@ -1,17 +0,0 @@ ---天変地異 -function c62966332.initial_effect(c) - Duel.EnableGlobalFlag(GLOBALFLAG_DECK_REVERSE_CHECK) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - -- - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_REVERSE_DECK) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(1,1) - c:RegisterEffect(e2) -end diff --git a/script/c62980542.lua b/script/c62980542.lua deleted file mode 100644 index 7253560e3b..0000000000 --- a/script/c62980542.lua +++ /dev/null @@ -1,30 +0,0 @@ ---デステニー・デストロイ -function c62980542.initial_effect(c) - --discard deck - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCategory(CATEGORY_DECKDES+CATEGORY_DAMAGE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetTarget(c62980542.distg) - e1:SetOperation(c62980542.disop) - c:RegisterEffect(e1) -end -function c62980542.distg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,3) end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(3) - Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,3) -end -function c62980542.filter(c) - return c:IsLocation(LOCATION_GRAVE) and c:IsType(TYPE_SPELL+TYPE_TRAP) -end -function c62980542.disop(e,tp,eg,ep,ev,re,r,rp) - local p,val=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.DiscardDeck(p,val,REASON_EFFECT) - local g=Duel.GetOperatedGroup() - local ct=g:FilterCount(c62980542.filter,nil) - if ct>0 then - Duel.Damage(tp,ct*1000,REASON_EFFECT) - end -end diff --git a/script/c62991886.lua b/script/c62991886.lua deleted file mode 100644 index e32ac2cc3d..0000000000 --- a/script/c62991886.lua +++ /dev/null @@ -1,50 +0,0 @@ ---進化する人類 -function c62991886.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c62991886.target) - e1:SetOperation(c62991886.operation) - c:RegisterEffect(e1) - --Atk Change - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_SET_BASE_ATTACK) - e2:SetCondition(c62991886.condition) - e2:SetValue(c62991886.value) - c:RegisterEffect(e2) - --Equip limit - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_EQUIP_LIMIT) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e3:SetValue(1) - c:RegisterEffect(e3) -end -function c62991886.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c62991886.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,e:GetHandler(),tc) - end -end -function c62991886.condition(e) - return Duel.GetLP(0)~=Duel.GetLP(1) -end -function c62991886.value(e,c) - local p=e:GetHandler():GetControler() - if Duel.GetLP(p)Duel.GetLP(1-p) then - return 1000 - end -end diff --git a/script/c63012333.lua b/script/c63012333.lua deleted file mode 100644 index faec5f577c..0000000000 --- a/script/c63012333.lua +++ /dev/null @@ -1,40 +0,0 @@ ---精気を吸う骨の塔 -function c63012333.initial_effect(c) - --cannot be target - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_BE_BATTLE_TARGET) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c63012333.atklm) - e1:SetValue(aux.imval1) - c:RegisterEffect(e1) - --damage - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(63012333,0)) - e2:SetCategory(CATEGORY_DECKDES) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetRange(LOCATION_MZONE) - e2:SetCondition(c63012333.condition) - e2:SetTarget(c63012333.target) - e2:SetOperation(c63012333.operation) - c:RegisterEffect(e2) -end -function c63012333.filter(c) - return c:IsFaceup() and c:IsRace(RACE_ZOMBIE) -end -function c63012333.atklm(e) - local c=e:GetHandler() - return Duel.IsExistingMatchingCard(c63012333.filter,c:GetControler(),LOCATION_MZONE,0,1,c) -end -function c63012333.condition(e,tp,eg,ep,ev,re,r,rp) - return not eg:IsContains(e:GetHandler()) and eg:IsExists(c63012333.filter,1,nil) -end -function c63012333.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,1-tp,2) -end -function c63012333.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.DiscardDeck(1-tp,2,REASON_EFFECT) -end diff --git a/script/c63014935.lua b/script/c63014935.lua deleted file mode 100644 index b2cd158b74..0000000000 --- a/script/c63014935.lua +++ /dev/null @@ -1,95 +0,0 @@ ---ヴォルカニック・クイーン -function c63014935.initial_effect(c) - c:EnableReviveLimit() - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_SPSUM_PARAM) - e1:SetRange(LOCATION_HAND) - e1:SetTargetRange(POS_FACEUP,1) - e1:SetCondition(c63014935.spcon) - e1:SetOperation(c63014935.spop) - c:RegisterEffect(e1) - --damage - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(63014935,0)) - e2:SetCategory(CATEGORY_DAMAGE) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetCountLimit(1) - e2:SetRange(LOCATION_MZONE) - e2:SetCost(c63014935.damcost) - e2:SetTarget(c63014935.damtg) - e2:SetOperation(c63014935.damop) - c:RegisterEffect(e2) - --release or damage - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(63014935,1)) - e3:SetCategory(CATEGORY_RELEASE+CATEGORY_DAMAGE) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e3:SetCode(EVENT_PHASE+PHASE_END) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1) - e3:SetCondition(c63014935.phcon) - e3:SetOperation(c63014935.phop) - c:RegisterEffect(e3) - --spsummon cost - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetCode(EFFECT_SPSUMMON_COST) - e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e4:SetCost(c63014935.spcost) - e4:SetOperation(c63014935.spcop) - c:RegisterEffect(e4) -end -function c63014935.spcon(e,c) - if c==nil then return true end - return Duel.GetLocationCount(1-c:GetControler(),LOCATION_MZONE)>-1 - and Duel.IsExistingMatchingCard(Card.IsReleasable,c:GetControler(),0,LOCATION_MZONE,1,nil) -end -function c63014935.spop(e,tp,eg,ep,ev,re,r,rp,c) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) - local g=Duel.SelectMatchingCard(tp,Card.IsReleasable,tp,0,LOCATION_MZONE,1,1,nil) - Duel.Release(g,REASON_COST) -end -function c63014935.damcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_ONFIELD,0,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,Card.IsAbleToGraveAsCost,tp,LOCATION_ONFIELD,0,1,1,e:GetHandler()) - Duel.SendtoGrave(g,REASON_COST) -end -function c63014935.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(1000) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,0,0,1-tp,1000) -end -function c63014935.damop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end -function c63014935.phcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c63014935.phop(e,tp,eg,ep,ev,re,r,rp) - if Duel.CheckReleaseGroup(tp,aux.TRUE,1,e:GetHandler()) and Duel.SelectYesNo(tp,aux.Stringid(63014935,2)) then - Duel.Release(Duel.SelectReleaseGroup(tp,aux.TRUE,1,1,e:GetHandler()),REASON_EFFECT) - else Duel.Damage(tp,1000,REASON_EFFECT) end -end -function c63014935.spcost(e,c,tp) - return Duel.GetActivityCount(tp,ACTIVITY_NORMALSUMMON)==0 -end -function c63014935.spcop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_SUMMON) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetReset(RESET_PHASE+RESET_END) - e1:SetTargetRange(1,0) - Duel.RegisterEffect(e1,tp) - local e2=e1:Clone() - e2:SetCode(EFFECT_CANNOT_MSET) - Duel.RegisterEffect(e2,tp) -end diff --git a/script/c63018036.lua b/script/c63018036.lua deleted file mode 100644 index 3914dc5d57..0000000000 --- a/script/c63018036.lua +++ /dev/null @@ -1,25 +0,0 @@ ---緊急鋼核処分 -function c63018036.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOGRAVE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c63018036.target) - e1:SetOperation(c63018036.activate) - c:RegisterEffect(e1) -end -function c63018036.tgfilter(c) - return c:IsCode(36623431) and c:IsAbleToGrave() -end -function c63018036.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c63018036.tgfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) -end -function c63018036.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c63018036.tgfilter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoGrave(g,REASON_EFFECT) - end -end diff --git a/script/c63018132.lua b/script/c63018132.lua deleted file mode 100644 index 50a5ffaa39..0000000000 --- a/script/c63018132.lua +++ /dev/null @@ -1,30 +0,0 @@ ---ドラゴン・ライダー -function c63018132.initial_effect(c) - --flip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(63018132,0)) - e1:SetCategory(CATEGORY_CONTROL) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c63018132.target) - e1:SetOperation(c63018132.operation) - c:RegisterEffect(e1) -end -function c63018132.filter(c) - return c:IsFaceup() and c:IsRace(RACE_DRAGON) and c:IsControlerCanBeChanged() -end -function c63018132.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c63018132.filter(chkc) end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) - local g=Duel.SelectTarget(tp,c63018132.filter,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0) -end -function c63018132.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) and tc:IsFaceup() and not Duel.GetControl(tc,tp,PHASE_END,1) then - if not tc:IsImmuneToEffect(e) and tc:IsAbleToChangeControler() then - Duel.Destroy(tc,REASON_EFFECT) - end - end -end diff --git a/script/c63035430.lua b/script/c63035430.lua deleted file mode 100644 index 7e8e4c10e9..0000000000 --- a/script/c63035430.lua +++ /dev/null @@ -1,26 +0,0 @@ ---摩天楼 -スカイスクレイパー- -function c63035430.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --atk up - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_DAMAGE_CALCULATING) - e2:SetRange(LOCATION_SZONE) - e2:SetOperation(c63035430.atkup) - c:RegisterEffect(e2) -end -function c63035430.atkup(e,tp,eg,ep,ev,re,r,rp,chk) - local a=Duel.GetAttacker() - local d=Duel.GetAttackTarget() - if not a:IsSetCard(0x3008) or not d or a:GetAttack()>=d:GetAttack() then return end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_PHASE+RESET_DAMAGE_CAL) - e1:SetValue(1000) - a:RegisterEffect(e1) -end diff --git a/script/c63049052.lua b/script/c63049052.lua deleted file mode 100644 index a4ce8122e9..0000000000 --- a/script/c63049052.lua +++ /dev/null @@ -1,84 +0,0 @@ ---璽律する武神 -function c63049052.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCondition(c63049052.condition) - e1:SetTarget(c63049052.target) - e1:SetOperation(c63049052.operation) - c:RegisterEffect(e1) -end -function c63049052.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end -function c63049052.filter(c) - return c:IsFaceup() and c:GetRank()==4 -end -function c63049052.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c63049052.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c63049052.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c63049052.filter,tp,LOCATION_MZONE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c63049052.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsLocation(LOCATION_SZONE) then return end - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsControler(tp) then - Duel.Equip(tp,c,tc) - c:CancelToGrave() - --Atk up - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_EQUIP) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(c63049052.atkval) - e1:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e1) - --material - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(63049052,0)) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetRange(LOCATION_SZONE) - e2:SetCountLimit(1) - e2:SetTarget(c63049052.mattg) - e2:SetOperation(c63049052.matop) - e2:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e2) - --Equip limit - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_EQUIP_LIMIT) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e3:SetValue(c63049052.eqlimit) - e3:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e3) - end -end -function c63049052.atkval(e,c) - return c:GetOverlayCount()*300 -end -function c63049052.eqlimit(e,c) - return c:GetControler()==e:GetOwnerPlayer() and c:IsType(TYPE_XYZ) -end -function c63049052.mfilter(c) - return c:IsSetCard(0x88) and c:IsType(TYPE_MONSTER) -end -function c63049052.mattg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c63049052.mfilter,tp,LOCATION_HAND,0,1,nil) end -end -function c63049052.matop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local ec=e:GetHandler():GetEquipTarget() - if not ec then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL) - local g=Duel.SelectMatchingCard(tp,c63049052.mfilter,tp,LOCATION_HAND,0,1,1,nil) - if g:GetCount()>0 then - Duel.Overlay(ec,g) - end -end diff --git a/script/c63060238.lua b/script/c63060238.lua deleted file mode 100644 index 2403307616..0000000000 --- a/script/c63060238.lua +++ /dev/null @@ -1,83 +0,0 @@ ---E・HERO ブレイズマン -function c63060238.initial_effect(c) - --search - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(63060238,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e1:SetCountLimit(1,63060238) - e1:SetTarget(c63060238.thtg) - e1:SetOperation(c63060238.thop) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e2) - --to grave - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(63060238,1)) - e3:SetCategory(CATEGORY_TOGRAVE) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1,63060238) - e3:SetTarget(c63060238.tgtg) - e3:SetOperation(c63060238.tgop) - c:RegisterEffect(e3) -end -function c63060238.filter(c) - return c:IsCode(24094653) and c:IsAbleToHand() -end -function c63060238.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c63060238.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c63060238.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c63060238.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end -function c63060238.tgfilter(c) - return c:IsSetCard(0x3008) and not c:IsCode(63060238) and c:IsAbleToGrave() -end -function c63060238.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c63060238.tgfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) -end -function c63060238.tgop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c63060238.tgfilter,tp,LOCATION_DECK,0,1,1,nil) - local tc=g:GetFirst() - if tc and Duel.SendtoGrave(tc,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_GRAVE) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CHANGE_ATTRIBUTE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetValue(tc:GetAttribute()) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_SET_ATTACK_FINAL) - e2:SetValue(tc:GetAttack()) - c:RegisterEffect(e2) - local e3=e1:Clone() - e3:SetCode(EFFECT_SET_DEFENCE_FINAL) - e3:SetValue(tc:GetDefence()) - c:RegisterEffect(e3) - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_FIELD) - e4:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e4:SetTargetRange(1,0) - e4:SetTarget(c63060238.splimit) - e4:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e4,tp) - end -end -function c63060238.splimit(e,c,tp,sumtp,sumpos) - return not c:IsType(TYPE_FUSION) -end diff --git a/script/c63101919.lua b/script/c63101919.lua deleted file mode 100644 index f4dc895a29..0000000000 --- a/script/c63101919.lua +++ /dev/null @@ -1,98 +0,0 @@ ---マジックテンペスター -function c63101919.initial_effect(c) - c:EnableCounterPermit(0x3001) - --synchro summon - aux.AddSynchroProcedure(c,nil,aux.NonTuner(Card.IsRace,RACE_SPELLCASTER),1) - c:EnableReviveLimit() - --synchro success - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(63101919,0)) - e1:SetCategory(CATEGORY_COUNTER) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(c63101919.addcc1) - e1:SetTarget(c63101919.addct1) - e1:SetOperation(c63101919.addc1) - c:RegisterEffect(e1) - --add counter - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(63101919,1)) - e2:SetCategory(CATEGORY_COUNTER) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetCountLimit(1) - e2:SetRange(LOCATION_MZONE) - e2:SetCost(c63101919.ctcost) - e2:SetTarget(c63101919.cttg) - e2:SetOperation(c63101919.ctop) - c:RegisterEffect(e2) - --damage - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(63101919,2)) - e3:SetCategory(CATEGORY_DAMAGE) - e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_MZONE) - e3:SetCost(c63101919.damcost) - e3:SetTarget(c63101919.damtg) - e3:SetOperation(c63101919.damop) - c:RegisterEffect(e3) -end -function c63101919.addcc1(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_SYNCHRO -end -function c63101919.addct1(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,2,0,0x3001) -end -function c63101919.addc1(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - e:GetHandler():AddCounter(0x3001,1) - end -end -function c63101919.ctcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,1,63,nil) - Duel.SendtoGrave(g,REASON_COST) - e:SetLabel(g:GetCount()) -end -function c63101919.cttg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,e:GetLabel(),0,0x3001) -end -function c63101919.ctop(e,tp,eg,ep,ev,re,r,rp) - local ct=e:GetLabel() - for i=1,ct do - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(63101919,3)) - local g=Duel.SelectMatchingCard(tp,Card.IsCanAddCounter,tp,LOCATION_MZONE,0,1,1,nil,0x3001,1) - if g:GetCount()==0 then return end - g:GetFirst():AddCounter(0x3001,1) - end -end -function c63101919.damfilter(c) - return c:GetCounter(0x3001)>0 -end -function c63101919.damcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetCounter(tp,1,1,0x3001)>0 end - local g=Duel.GetMatchingGroup(c63101919.damfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) - local tc=g:GetFirst() - local sum=0 - while tc do - local sct=tc:GetCounter(0x3001) - tc:RemoveCounter(tp,0x3001,sct,0) - sum=sum+sct - tc=g:GetNext() - end - e:SetLabel(sum) -end -function c63101919.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local ct=e:GetLabel() - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(ct*500) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,ct*500) -end -function c63101919.damop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c63102017.lua b/script/c63102017.lua deleted file mode 100644 index 96f7246de5..0000000000 --- a/script/c63102017.lua +++ /dev/null @@ -1,25 +0,0 @@ ---『守備』封じ -function c63102017.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_POSITION) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c63102017.target) - e1:SetOperation(c63102017.activate) - c:RegisterEffect(e1) -end -function c63102017.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsDefencePos() end - if chk==0 then return Duel.IsExistingTarget(Card.IsDefencePos,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE) - local g=Duel.SelectTarget(tp,Card.IsDefencePos,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0) -end -function c63102017.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and not tc:IsAttackPos() then - Duel.ChangePosition(tc,0,0,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK) - end -end diff --git a/script/c63120904.lua b/script/c63120904.lua deleted file mode 100644 index 36e010e850..0000000000 --- a/script/c63120904.lua +++ /dev/null @@ -1,59 +0,0 @@ ---暗黒大要塞鯱 -function c63120904.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(63120904,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetTarget(c63120904.target) - e1:SetOperation(c63120904.operation) - c:RegisterEffect(e1) -end -function c63120904.rfilter(c) - local code=c:GetCode() - return code==90337190 or code==95614612 -end -function c63120904.dfilter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable() -end -function c63120904.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then - if e:GetLabel()==90337190 then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsDestructable() - else return chkc:IsOnField() and c63120904.dfilter(chkc) end - end - local b1=Duel.CheckReleaseGroup(tp,Card.IsCode,1,nil,90337190) and Duel.IsExistingTarget(Card.IsDestructable,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) - local b2=Duel.CheckReleaseGroup(tp,Card.IsCode,1,nil,95614612) and Duel.IsExistingTarget(c63120904.dfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) - if chk==0 then return b1 or b2 end - local code=0 - if b1 and b2 then - local rg=Duel.SelectReleaseGroup(tp,c63120904.rfilter,1,1,nil) - code=rg:GetFirst():GetCode() - Duel.Release(rg,REASON_COST) - elseif b1 then - local rg=Duel.SelectReleaseGroup(tp,Card.IsCode,1,1,nil,90337190) - code=90337190 - Duel.Release(rg,REASON_COST) - else - local rg=Duel.SelectReleaseGroup(tp,Card.IsCode,1,1,nil,95614612) - code=95614612 - Duel.Release(rg,REASON_COST) - end - e:SetLabel(code) - if code==90337190 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) - else - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c63120904.dfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) - end -end -function c63120904.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c63142001.lua b/script/c63142001.lua deleted file mode 100644 index dcf569af8c..0000000000 --- a/script/c63142001.lua +++ /dev/null @@ -1,28 +0,0 @@ ---電池メン-単三型 -function c63142001.initial_effect(c) - --atk,def - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetValue(c63142001.atkval) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_UPDATE_DEFENCE) - e2:SetValue(c63142001.defval) - c:RegisterEffect(e2) -end -function c63142001.filter(c) - return c:IsFaceup() and c:IsCode(63142001) -end -function c63142001.atkval(e,c) - local g=Duel.GetMatchingGroup(c63142001.filter,c:GetControler(),LOCATION_MZONE,0,nil) - if g:IsExists(Card.IsDefencePos,1,nil) then return 0 end - return g:GetCount()*1000 -end -function c63142001.defval(e,c) - local g=Duel.GetMatchingGroup(c63142001.filter,c:GetControler(),LOCATION_MZONE,0,nil) - if g:IsExists(Card.IsAttackPos,1,nil) then return 0 end - return g:GetCount()*1000 -end diff --git a/script/c63162310.lua b/script/c63162310.lua deleted file mode 100644 index e77929a77e..0000000000 --- a/script/c63162310.lua +++ /dev/null @@ -1,4 +0,0 @@ ---ウォール・シャドウ -function c63162310.initial_effect(c) - c:EnableReviveLimit() -end diff --git a/script/c63175639.lua b/script/c63175639.lua deleted file mode 100644 index f88fdf1f69..0000000000 --- a/script/c63175639.lua +++ /dev/null @@ -1,69 +0,0 @@ ---魔導化士 マット -function c63175639.initial_effect(c) - --to grave - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(63175639,0)) - e1:SetCategory(CATEGORY_TOGRAVE) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_MZONE) - e1:SetTarget(c63175639.sgtg) - e1:SetOperation(c63175639.sgop) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(63175639,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_PHASE+PHASE_END) - e2:SetRange(LOCATION_MZONE) - e2:SetCondition(c63175639.spcon) - e2:SetCost(c63175639.spcost) - e2:SetTarget(c63175639.sptg) - e2:SetOperation(c63175639.spop) - c:RegisterEffect(e2) -end -function c63175639.filter(c) - return c:IsSetCard(0x106e) and c:IsType(TYPE_SPELL) and c:IsAbleToGrave() -end -function c63175639.sgtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c63175639.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) - e:GetHandler():RegisterFlagEffect(63175639,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) -end -function c63175639.sgop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c63175639.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoGrave(g,REASON_EFFECT) - end -end -function c63175639.cfilter(c) - return c:IsSetCard(0x106e) and c:IsType(TYPE_SPELL) -end -function c63175639.spcon(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():GetFlagEffect(63175639)==0 then return false end - local g=Duel.GetMatchingGroup(c63175639.cfilter,tp,LOCATION_GRAVE,0,nil) - return g:GetClassCount(Card.GetCode)>=5 -end -function c63175639.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end -function c63175639.spfilter(c,e,tp) - return c:IsRace(RACE_SPELLCASTER) and c:IsAttribute(ATTRIBUTE_DARK) - and c:IsLevelAbove(5) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c63175639.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsExistingMatchingCard(c63175639.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c63175639.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c63175639.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c63176202.lua b/script/c63176202.lua deleted file mode 100644 index 8207ea2db6..0000000000 --- a/script/c63176202.lua +++ /dev/null @@ -1,86 +0,0 @@ ---大将軍 紫炎 -function c63176202.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c63176202.spcon) - c:RegisterEffect(e1) - --Destroy replace - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DESTROY_REPLACE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetTarget(c63176202.desreptg) - e2:SetOperation(c63176202.desrepop) - c:RegisterEffect(e2) - --activate limit - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e3:SetCode(EVENT_CHAINING) - e3:SetRange(LOCATION_MZONE) - e3:SetOperation(c63176202.aclimit1) - c:RegisterEffect(e3) - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e4:SetCode(EVENT_CHAIN_NEGATED) - e4:SetRange(LOCATION_MZONE) - e4:SetOperation(c63176202.aclimit2) - c:RegisterEffect(e4) - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_FIELD) - e5:SetCode(EFFECT_CANNOT_ACTIVATE) - e5:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e5:SetRange(LOCATION_MZONE) - e5:SetTargetRange(0,1) - e5:SetCondition(c63176202.econ) - e5:SetValue(c63176202.elimit) - c:RegisterEffect(e5) -end -function c63176202.spfilter(c) - return c:IsFaceup() and c:IsSetCard(0x3d) -end -function c63176202.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c63176202.spfilter,tp,LOCATION_MZONE,0,2,nil) -end -function c63176202.repfilter(c) - return c:IsFaceup() and c:IsSetCard(0x3d) and not c:IsStatus(STATUS_DESTROY_CONFIRMED+STATUS_BATTLE_DESTROYED) -end -function c63176202.desreptg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return not c:IsReason(REASON_REPLACE) and c:IsOnField() and c:IsFaceup() - and Duel.IsExistingMatchingCard(c63176202.repfilter,tp,LOCATION_MZONE,0,1,c) end - if Duel.SelectYesNo(tp,aux.Stringid(63176202,0)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESREPLACE) - local g=Duel.SelectMatchingCard(tp,c63176202.repfilter,tp,LOCATION_MZONE,0,1,1,c) - e:SetLabelObject(g:GetFirst()) - Duel.HintSelection(g) - g:GetFirst():SetStatus(STATUS_DESTROY_CONFIRMED,true) - return true - else return false end -end -function c63176202.desrepop(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetLabelObject() - tc:SetStatus(STATUS_DESTROY_CONFIRMED,false) - Duel.Destroy(tc,REASON_EFFECT+REASON_REPLACE) -end -function c63176202.aclimit1(e,tp,eg,ep,ev,re,r,rp) - if ep==tp or not re:IsHasType(EFFECT_TYPE_ACTIVATE) then return end - e:GetHandler():RegisterFlagEffect(63176202,RESET_EVENT+0x3ff0000+RESET_PHASE+PHASE_END,0,1) -end -function c63176202.aclimit2(e,tp,eg,ep,ev,re,r,rp) - if ep==tp or not re:IsHasType(EFFECT_TYPE_ACTIVATE) then return end - e:GetHandler():ResetFlagEffect(63176202) -end -function c63176202.econ(e) - return e:GetHandler():GetFlagEffect(63176202)~=0 -end -function c63176202.elimit(e,te,tp) - return te:IsHasType(EFFECT_TYPE_ACTIVATE) -end diff --git a/script/c63193536.lua b/script/c63193536.lua deleted file mode 100644 index 5789de0d42..0000000000 --- a/script/c63193536.lua +++ /dev/null @@ -1,31 +0,0 @@ ---重量オーバー -function c63193536.initial_effect(c) - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_REMOVE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(c63193536.condition) - e1:SetTarget(c63193536.target) - e1:SetOperation(c63193536.activate) - c:RegisterEffect(e1) -end -function c63193536.cfilter(c,tp) - return c:GetSummonPlayer()==tp -end -function c63193536.condition(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c63193536.cfilter,1,nil,1-tp) -end -function c63193536.filter(c) - return c:IsFaceup() and c:IsLevelBelow(2) and c:IsAbleToRemove() -end -function c63193536.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c63193536.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - local g=Duel.GetMatchingGroup(c63193536.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,0) -end -function c63193536.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c63193536.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - if g:GetCount()>0 then - Duel.Remove(g,POS_FACEUP,REASON_EFFECT) - end -end diff --git a/script/c63193879.lua b/script/c63193879.lua deleted file mode 100644 index 6ced2ac52b..0000000000 --- a/script/c63193879.lua +++ /dev/null @@ -1,66 +0,0 @@ ---セイバー・シャーク -function c63193879.initial_effect(c) - --lv change - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(63193879,0)) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(2) - e1:SetCost(c63193879.cost) - e1:SetTarget(c63193879.target) - e1:SetOperation(c63193879.operation) - c:RegisterEffect(e1) - --unsynchroable - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e2:SetValue(1) - c:RegisterEffect(e2) - Duel.AddCustomActivityCounter(63193879,ACTIVITY_SPSUMMON,c63193879.counterfilter) -end -function c63193879.counterfilter(c) - return c:IsAttribute(ATTRIBUTE_WATER) -end -function c63193879.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetCustomActivityCount(63193879,tp,ACTIVITY_SPSUMMON)==0 end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) - e1:SetTargetRange(1,0) - e1:SetTarget(c63193879.splimit) - Duel.RegisterEffect(e1,tp) -end -function c63193879.splimit(e,c) - return c:GetAttribute()~=ATTRIBUTE_WATER -end -function c63193879.filter(c) - return c:IsFaceup() and c:IsRace(RACE_FISH) and c:GetLevel()>0 -end -function c63193879.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c63193879.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c63193879.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - local g=Duel.SelectTarget(tp,c63193879.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - local op=0 - if g:GetFirst():GetLevel()==1 then op=Duel.SelectOption(tp,aux.Stringid(63193879,1)) - else op=Duel.SelectOption(tp,aux.Stringid(63193879,1),aux.Stringid(63193879,2)) end - e:SetLabel(op) -end -function c63193879.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_UPDATE_LEVEL) - e1:SetReset(RESET_EVENT+0x1fe0000) - if e:GetLabel()==0 then - e1:SetValue(1) - else e1:SetValue(-1) end - tc:RegisterEffect(e1) - end -end diff --git a/script/c6320631.lua b/script/c6320631.lua deleted file mode 100644 index ba8b49d321..0000000000 --- a/script/c6320631.lua +++ /dev/null @@ -1,31 +0,0 @@ ---コアキメイル・ロック -function c6320631.initial_effect(c) - --search - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(6320631,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetCondition(c6320631.condition) - e1:SetTarget(c6320631.target) - e1:SetOperation(c6320631.operation) - c:RegisterEffect(e1) -end -function c6320631.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) -end -function c6320631.filter(c) - return (c:IsCode(36623431) or (c:IsLevelBelow(4) and c:IsSetCard(0x1d))) and c:IsAbleToHand() -end -function c6320631.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c6320631.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c6320631.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c6320631.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c63211608.lua b/script/c63211608.lua deleted file mode 100644 index bfdf14155a..0000000000 --- a/script/c63211608.lua +++ /dev/null @@ -1,54 +0,0 @@ ---A・ジェネクス・リバイバー -function c63211608.initial_effect(c) - --counter - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_CHAINING) - e1:SetRange(LOCATION_HAND) - e1:SetOperation(c63211608.chop1) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_CHAIN_NEGATED) - e2:SetRange(LOCATION_HAND) - e2:SetOperation(c63211608.chop2) - c:RegisterEffect(e2) - e1:SetLabelObject(e2) - --special summon - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(63211608,0)) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_DELAY) - e3:SetCode(EVENT_CHAIN_END) - e3:SetRange(LOCATION_HAND) - e3:SetCondition(c63211608.sumcon) - e3:SetTarget(c63211608.sumtg) - e3:SetOperation(c63211608.sumop) - e3:SetLabelObject(e2) - c:RegisterEffect(e3) -end -function c63211608.chop1(e,tp,eg,ep,ev,re,r,rp) - e:GetLabelObject():SetLabel(0) -end -function c63211608.chop2(e,tp,eg,ep,ev,re,r,rp) - if rp==tp then return end - local de,dp=Duel.GetChainInfo(ev,CHAININFO_DISABLE_REASON,CHAININFO_DISABLE_PLAYER) - if dp==tp then - e:SetLabel(1) - end -end -function c63211608.sumcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetLabelObject():GetLabel()~=0 -end -function c63211608.sumtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c63211608.sumop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c63223260.lua b/script/c63223260.lua deleted file mode 100644 index 9c8b172f7e..0000000000 --- a/script/c63223260.lua +++ /dev/null @@ -1,38 +0,0 @@ ---フォトン・サテライト -function c63223260.initial_effect(c) - --atkup - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(63223260,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCountLimit(1) - e1:SetTarget(c63223260.target) - e1:SetOperation(c63223260.operation) - c:RegisterEffect(e1) -end -function c63223260.filter(c) - return c:IsFaceup() and c:IsSetCard(0x55) and c:IsLevelAbove(1) -end -function c63223260.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c63223260.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c63223260.filter,tp,LOCATION_MZONE,0,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c63223260.filter,tp,LOCATION_MZONE,0,1,1,e:GetHandler()) -end -function c63223260.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsFaceup() and c:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsRelateToEffect(e) then - local lv=c:GetLevel()+tc:GetLevel() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_CHANGE_LEVEL) - e1:SetValue(lv) - e1:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e1) - local e2=e1:Clone() - tc:RegisterEffect(e2) - end -end diff --git a/script/c63223467.lua b/script/c63223467.lua deleted file mode 100644 index ce352ce32a..0000000000 --- a/script/c63223467.lua +++ /dev/null @@ -1,31 +0,0 @@ ---RAI-MEI -function c63223467.initial_effect(c) - --search - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(63223467,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetCondition(c63223467.condition) - e1:SetTarget(c63223467.target) - e1:SetOperation(c63223467.operation) - c:RegisterEffect(e1) -end -function c63223467.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) -end -function c63223467.filter(c) - return c:IsLevelBelow(2) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsAbleToHand() -end -function c63223467.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c63223467.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c63223467.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c63223467.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c63224564.lua b/script/c63224564.lua deleted file mode 100644 index d2db2ebef4..0000000000 --- a/script/c63224564.lua +++ /dev/null @@ -1,46 +0,0 @@ ---サイバー・ボンテージ -function c63224564.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c63224564.target) - e1:SetOperation(c63224564.operation) - c:RegisterEffect(e1) - --Atk up - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(500) - c:RegisterEffect(e2) - --Equip limit - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetCode(EFFECT_EQUIP_LIMIT) - e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e4:SetValue(c63224564.eqlimit) - c:RegisterEffect(e4) -end -function c63224564.eqlimit(e,c) - local code=c:GetCode() - return code==76812113 or code==12206212 -end -function c63224564.filter(c) - local code=c:GetCode() - return c:IsFaceup() and (code==76812113 or code==12206212) -end -function c63224564.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c63224564.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c63224564.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c63224564.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c63224564.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,e:GetHandler(),tc) - end -end diff --git a/script/c63227401.lua b/script/c63227401.lua deleted file mode 100644 index 730e53109d..0000000000 --- a/script/c63227401.lua +++ /dev/null @@ -1,60 +0,0 @@ ---スキル・プリズナー -function c63227401.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DISABLE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,0x1c0) - e1:SetTarget(c63227401.target) - e1:SetOperation(c63227401.activate) - c:RegisterEffect(e1) - -- - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(63227401,0)) - e2:SetCategory(CATEGORY_DISABLE) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetRange(LOCATION_GRAVE) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetCondition(aux.exccon) - e2:SetCost(c63227401.cost) - e2:SetTarget(c63227401.target) - e2:SetOperation(c63227401.activate) - c:RegisterEffect(e2) -end -function c63227401.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsControler(tp) and chkc~=e:GetHandler() end - if chk==0 then return Duel.IsExistingTarget(nil,tp,LOCATION_ONFIELD,0,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - Duel.SelectTarget(tp,nil,tp,LOCATION_ONFIELD,0,1,1,e:GetHandler()) -end -function c63227401.activate(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - tc:RegisterFlagEffect(63227401,RESET_EVENT+0x1fc0000+RESET_PHASE+PHASE_END,0,1) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_CHAIN_SOLVING) - e1:SetCondition(c63227401.discon) - e1:SetOperation(c63227401.disop) - e1:SetReset(RESET_PHASE+PHASE_END) - e1:SetLabelObject(tc) - Duel.RegisterEffect(e1,tp) - end -end -function c63227401.discon(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetLabelObject() - if tc:GetFlagEffect(63227401)==0 or not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end - local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) - return g and g:IsContains(tc) and re:IsActiveType(TYPE_MONSTER) -end -function c63227401.disop(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateEffect(ev) -end -function c63227401.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) -end diff --git a/script/c63253763.lua b/script/c63253763.lua deleted file mode 100644 index 5b58a47e45..0000000000 --- a/script/c63253763.lua +++ /dev/null @@ -1,68 +0,0 @@ ---エーリアン・リベンジャー -function c63253763.initial_effect(c) - c:SetUniqueOnField(1,0,63253763) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c63253763.spcon) - e1:SetOperation(c63253763.spop) - c:RegisterEffect(e1) - --counter - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(63253763,0)) - e2:SetCategory(CATEGORY_COUNTER) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetTarget(c63253763.cttg) - e2:SetOperation(c63253763.ctop) - c:RegisterEffect(e2) - --atk def - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e3:SetCode(EVENT_DAMAGE_CALCULATING) - e3:SetRange(LOCATION_MZONE) - e3:SetOperation(c63253763.adval) - c:RegisterEffect(e3) -end -function c63253763.spcon(e,c) - if c==nil then return true end - return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 - and Duel.IsCanRemoveCounter(c:GetControler(),1,1,0xe,2,REASON_COST) -end -function c63253763.spop(e,tp,eg,ep,ev,re,r,rp,c) - Duel.RemoveCounter(tp,1,1,0xe,2,REASON_COST) -end -function c63253763.cttg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end -end -function c63253763.ctop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil) - local tc=g:GetFirst() - while tc do - tc:AddCounter(0xe,1) - tc=g:GetNext() - end -end -function c63253763.addown(c,e) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_PHASE+RESET_DAMAGE_CAL) - e1:SetValue(c:GetCounter(0xe)*-300) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_UPDATE_DEFENCE) - c:RegisterEffect(e2) -end -function c63253763.adval(e,tp,eg,ep,ev,re,r,rp) - local a=Duel.GetAttacker() - local d=Duel.GetAttackTarget() - if not d then return end - if a:GetCounter(0xe)>0 and d:IsSetCard(0xc) then c63253763.addown(a,e) end - if d:GetCounter(0xe)>0 and a:IsSetCard(0xc) then c63253763.addown(d,e) end -end diff --git a/script/c63257623.lua b/script/c63257623.lua deleted file mode 100644 index 9d5b137929..0000000000 --- a/script/c63257623.lua +++ /dev/null @@ -1,64 +0,0 @@ ---森羅の実張り ピース -function c63257623.initial_effect(c) - --deck check - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(63257623,0)) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c63257623.target) - e1:SetOperation(c63257623.operation) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e2) - --special summon - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(63257623,1)) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) - e3:SetCode(EVENT_TO_GRAVE) - e3:SetCountLimit(1,63257623) - e3:SetCondition(c63257623.spcon) - e3:SetTarget(c63257623.sptg) - e3:SetOperation(c63257623.spop) - c:RegisterEffect(e3) -end -function c63257623.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,1) end -end -function c63257623.operation(e,tp,eg,ep,ev,re,r,rp) - if not Duel.IsPlayerCanDiscardDeck(tp,1) then return end - Duel.ConfirmDecktop(tp,1) - local g=Duel.GetDecktopGroup(tp,1) - local tc=g:GetFirst() - if tc:IsRace(RACE_PLANT) then - Duel.DisableShuffleCheck() - Duel.SendtoGrave(g,REASON_EFFECT+REASON_REVEAL) - else - Duel.MoveSequence(tc,1) - end -end -function c63257623.spcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsPreviousLocation(LOCATION_DECK) and - (c:IsReason(REASON_REVEAL) or c:GetPreviousPosition()==POS_FACEUP_DEFENCE or Duel.IsPlayerAffectedByEffect(tp,EFFECT_REVERSE_DECK)) -end -function c63257623.filter(c,e,tp) - return c:IsLevelBelow(4) and c:IsRace(RACE_PLANT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c63257623.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c63257623.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c63257623.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c63257623.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c63257623.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c63259351.lua b/script/c63259351.lua deleted file mode 100644 index 53186fad2a..0000000000 --- a/script/c63259351.lua +++ /dev/null @@ -1,56 +0,0 @@ ---奇跡のジュラシック・エッグ -function c63259351.initial_effect(c) - --cannot remove - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetCode(EFFECT_CANNOT_REMOVE) - e1:SetRange(LOCATION_MZONE) - c:RegisterEffect(e1) - --add counter - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetOperation(c63259351.ctop) - c:RegisterEffect(e2) - --special summon - local e3=Effect.CreateEffect(c) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetDescription(aux.Stringid(63259351,0)) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_MZONE) - e3:SetCost(c63259351.spcost) - e3:SetTarget(c63259351.sptg) - e3:SetOperation(c63259351.spop) - c:RegisterEffect(e3) -end -function c63259351.ctfilter(c,tp) - return c:IsControler(tp) and c:IsRace(RACE_DINOSAUR) -end -function c63259351.ctop(e,tp,eg,ep,ev,re,r,rp) - if eg:IsExists(c63259351.ctfilter,1,nil,tp) then - e:GetHandler():AddCounter(0x14,2) - end -end -function c63259351.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - e:SetLabel(e:GetHandler():GetCounter(0x14)) - Duel.Release(e:GetHandler(),REASON_COST) -end -function c63259351.spfilter(c,lv,e,tp) - return c:IsLevelBelow(lv) and c:IsRace(RACE_DINOSAUR) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c63259351.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsExistingMatchingCard(c63259351.spfilter,tp,LOCATION_DECK,0,1,nil,e:GetHandler():GetCounter(0x14),e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c63259351.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c63259351.spfilter,tp,LOCATION_DECK,0,1,1,nil,e:GetLabel(),e,tp) - if g:GetCount()~=0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c63274863.lua b/script/c63274863.lua deleted file mode 100644 index 5a235d1033..0000000000 --- a/script/c63274863.lua +++ /dev/null @@ -1,44 +0,0 @@ ---星因士 シリウス -function c63274863.initial_effect(c) - --todeck - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(63274863,0)) - e1:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) - e1:SetCountLimit(1,63274863) - e1:SetTarget(c63274863.target) - e1:SetOperation(c63274863.operation) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - c:RegisterEffect(e2) - local e3=e1:Clone() - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e3) -end -function c63274863.filter(c) - return c:IsSetCard(0x9c) and c:IsType(TYPE_MONSTER) and c:IsAbleToDeck() -end -function c63274863.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c63274863.filter(chkc) end - if chk==0 then return Duel.IsPlayerCanDraw(tp,1) - and Duel.IsExistingTarget(c63274863.filter,tp,LOCATION_GRAVE,0,5,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectTarget(tp,c63274863.filter,tp,LOCATION_GRAVE,0,5,5,nil) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,5,0,0) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c63274863.operation(e,tp,eg,ep,ev,re,r,rp) - local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - if not tg or tg:FilterCount(Card.IsRelateToEffect,nil,e)~=5 then return end - Duel.SendtoDeck(tg,nil,0,REASON_EFFECT) - local g=Duel.GetOperatedGroup() - local ct=g:FilterCount(Card.IsLocation,nil,LOCATION_DECK+LOCATION_EXTRA) - if ct==5 then - Duel.ShuffleDeck(tp) - Duel.BreakEffect() - Duel.Draw(tp,1,REASON_EFFECT) - end -end diff --git a/script/c63300440.lua b/script/c63300440.lua deleted file mode 100644 index 51cdcd3c51..0000000000 --- a/script/c63300440.lua +++ /dev/null @@ -1,53 +0,0 @@ ---ドラゴン・シールド -function c63300440.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c63300440.target) - e1:SetOperation(c63300440.operation) - c:RegisterEffect(e1) - --Equip limit - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_EQUIP_LIMIT) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetValue(c63300440.eqlimit) - c:RegisterEffect(e2) - -- - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_EQUIP) - e3:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e3:SetValue(1) - c:RegisterEffect(e3) - local e4=e3:Clone() - e4:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - c:RegisterEffect(e4) - local e5=e3:Clone() - e5:SetCode(EFFECT_NO_BATTLE_DAMAGE) - c:RegisterEffect(e5) - local e6=e3:Clone() - e6:SetCode(EFFECT_AVOID_BATTLE_DAMAGE) - c:RegisterEffect(e6) -end -function c63300440.eqlimit(e,c) - return c:IsRace(RACE_DRAGON) -end -function c63300440.filter(c) - return c:IsFaceup() and c:IsRace(RACE_DRAGON) -end -function c63300440.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c63300440.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c63300440.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c63300440.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c63300440.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,e:GetHandler(),tc) - end -end diff --git a/script/c6330307.lua b/script/c6330307.lua deleted file mode 100644 index cc1c09fbfc..0000000000 --- a/script/c6330307.lua +++ /dev/null @@ -1,79 +0,0 @@ ---DZW-魔装鵺妖衣 -function c6330307.initial_effect(c) - --equip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(6330307,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetRange(LOCATION_HAND+LOCATION_MZONE) - e1:SetTarget(c6330307.eqtg) - e1:SetOperation(c6330307.eqop) - c:RegisterEffect(e1) - --destroy sub - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e2:SetValue(1) - c:RegisterEffect(e2) - --chain attack - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(6330307,1)) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_DAMAGE_STEP_END) - e3:SetRange(LOCATION_SZONE) - e3:SetCondition(c6330307.atkcon) - e3:SetOperation(c6330307.atkop) - c:RegisterEffect(e3) -end -function c6330307.filter(c) - return c:IsFaceup() and c:IsSetCard(0x7f) and c:IsSetCard(0x1048) -end -function c6330307.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c6330307.filter(chkc) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingTarget(c6330307.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c6330307.filter,tp,LOCATION_MZONE,0,1,1,nil) -end -function c6330307.eqop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) then return end - if c:IsLocation(LOCATION_MZONE) and c:IsFacedown() then return end - local tc=Duel.GetFirstTarget() - if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or tc:GetControler()~=tp or tc:IsFacedown() or not tc:IsRelateToEffect(e) or not c:CheckUniqueOnField(tp) then - Duel.SendtoGrave(c,REASON_EFFECT) - return - end - Duel.Equip(tp,c,tc,true) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(c6330307.eqlimit) - e1:SetLabelObject(tc) - c:RegisterEffect(e1) -end -function c6330307.eqlimit(e,c) - return c==e:GetLabelObject() -end -function c6330307.atkcon(e,tp,eg,ep,ev,re,r,rp) - local a=Duel.GetAttacker() - local at=Duel.GetAttackTarget() - return at and a==e:GetHandler():GetEquipTarget() and at:IsRelateToBattle() and at:GetAttack()>0 and a:IsChainAttackable() -end -function c6330307.atkop(e,tp,eg,ep,ev,re,r,rp) - local at=Duel.GetAttackTarget() - local c=e:GetHandler() - local ec=c:GetEquipTarget() - if at:IsRelateToBattle() and not at:IsImmuneToEffect(e) and at:GetAttack()>0 then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetValue(0) - e1:SetReset(RESET_EVENT+0x1fe0000) - at:RegisterEffect(e1) - Duel.ChainAttack(at) - end -end diff --git a/script/c63323539.lua b/script/c63323539.lua deleted file mode 100644 index 4f3ace56f9..0000000000 --- a/script/c63323539.lua +++ /dev/null @@ -1,32 +0,0 @@ ---トロイボム -function c63323539.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_CONTROL_CHANGED) - e1:SetTarget(c63323539.target) - e1:SetOperation(c63323539.operation) - c:RegisterEffect(e1) -end -function c63323539.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return r==REASON_EFFECT and rp==1-tp - and eg:IsExists(Card.IsControler,1,nil,1-tp) end - Duel.SetTargetCard(eg) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,0) -end -function c63323539.filter(c,e,tp) - return c:IsRelateToEffect(e) and c:IsControler(1-tp) -end -function c63323539.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=eg:FilterSelect(tp,c63323539.filter,1,1,nil,e,tp) - local tc=g:GetFirst() - if not tc then return end - local atk=tc:GetAttack() - if atk<0 or tc:IsFacedown() then atk=0 end - if Duel.Destroy(tc,REASON_EFFECT)~=0 then - Duel.Damage(1-tp,atk,REASON_EFFECT) - end -end diff --git a/script/c63356631.lua b/script/c63356631.lua deleted file mode 100644 index 1ec60469d0..0000000000 --- a/script/c63356631.lua +++ /dev/null @@ -1,32 +0,0 @@ ---鳳翼の爆風 -function c63356631.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TODECK) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,0x1e0) - e1:SetCost(c63356631.cost) - e1:SetTarget(c63356631.target) - e1:SetOperation(c63356631.activate) - c:RegisterEffect(e1) -end -function c63356631.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) -end -function c63356631.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local c=e:GetHandler() - if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and chkc:IsAbleToDeck() and chkc~=c end - if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToDeck,tp,0,LOCATION_ONFIELD,1,c) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectTarget(tp,Card.IsAbleToDeck,tp,0,LOCATION_ONFIELD,1,1,c) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0) -end -function c63356631.activate(e) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.SendtoDeck(tc,nil,0,REASON_EFFECT) - end -end diff --git a/script/c63364266.lua b/script/c63364266.lua deleted file mode 100644 index de0f3db2a6..0000000000 --- a/script/c63364266.lua +++ /dev/null @@ -1,53 +0,0 @@ ---ゴヨウ・チェイサー -function c63364266.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1) - c:EnableReviveLimit() - --atkup - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(c63364266.val) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(63364266,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetCode(EVENT_BATTLE_DESTROYING) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCondition(aux.bdogcon) - e2:SetTarget(c63364266.sptg) - e2:SetOperation(c63364266.spop) - c:RegisterEffect(e2) -end -function c63364266.atkfilter(c) - return c:IsFaceup() and c:IsRace(RACE_WARRIOR) and c:IsAttribute(ATTRIBUTE_EARTH) and c:IsType(TYPE_SYNCHRO) -end -function c63364266.val(e,c) - return Duel.GetMatchingGroupCount(c63364266.atkfilter,0,LOCATION_MZONE,LOCATION_MZONE,c)*300 -end -function c63364266.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - local bc=e:GetHandler():GetBattleTarget() - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and bc:IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetTargetCard(bc) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,bc,1,0,LOCATION_GRAVE) -end -function c63364266.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - local atk=tc:GetAttack() - if Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e1:SetCode(EFFECT_SET_ATTACK) - e1:SetValue(atk/2) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1,true) - Duel.SpecialSummonComplete() - end - end -end diff --git a/script/c6337436.lua b/script/c6337436.lua deleted file mode 100644 index c094aab616..0000000000 --- a/script/c6337436.lua +++ /dev/null @@ -1,15 +0,0 @@ ---連弾の魔術師 -function c6337436.initial_effect(c) - --damage - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_CHAIN_SOLVED) - e1:SetRange(LOCATION_MZONE) - e1:SetOperation(c6337436.damop) - c:RegisterEffect(e1) -end -function c6337436.damop(e,tp,eg,ep,ev,re,r,rp) - if re:GetActiveType()==TYPE_SPELL and re:IsHasType(EFFECT_TYPE_ACTIVATE) and rp==tp then - Duel.Damage(1-tp,400,REASON_EFFECT) - end -end diff --git a/script/c63391643.lua b/script/c63391643.lua deleted file mode 100644 index 5cf905a3b2..0000000000 --- a/script/c63391643.lua +++ /dev/null @@ -1,32 +0,0 @@ ---千本ナイフ -function c63391643.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c63391643.condition) - e1:SetTarget(c63391643.target) - e1:SetOperation(c63391643.activate) - c:RegisterEffect(e1) -end -function c63391643.cfilter(c) - return c:IsFaceup() and c:IsCode(46986414) -end -function c63391643.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c63391643.cfilter,tp,LOCATION_ONFIELD,0,1,nil) -end -function c63391643.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsDestructable() end - if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c63391643.activate(e) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c63394872.lua b/script/c63394872.lua deleted file mode 100644 index 6af20bd0da..0000000000 --- a/script/c63394872.lua +++ /dev/null @@ -1,50 +0,0 @@ ---ポジションチェンジ -function c63394872.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --move - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(63394872,0)) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_SZONE) - e2:SetCountLimit(1) - e2:SetTarget(c63394872.seqtg) - e2:SetOperation(c63394872.seqop) - c:RegisterEffect(e2) -end -function c63394872.filter(c,tp) - local seq=c:GetSequence() - return (seq>0 and Duel.CheckLocation(tp,LOCATION_MZONE,seq-1)) - or (seq<4 and Duel.CheckLocation(tp,LOCATION_MZONE,seq+1)) -end -function c63394872.seqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c63394872.filter(chkc,tp) end - if chk==0 then return Duel.IsExistingTarget(c63394872.filter,tp,LOCATION_MZONE,0,1,nil,tp) end - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(63394872,1)) - Duel.SelectTarget(tp,c63394872.filter,tp,LOCATION_MZONE,0,1,1,nil,tp) -end -function c63394872.seqop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local tc=Duel.GetFirstTarget() - if not tc:IsRelateToEffect(e) or tc:IsControler(1-tp) then return end - local seq=tc:GetSequence() - if (seq>0 and Duel.CheckLocation(tp,LOCATION_MZONE,seq-1)) - or (seq<4 and Duel.CheckLocation(tp,LOCATION_MZONE,seq+1)) then - local flag=0 - if seq>0 and Duel.CheckLocation(tp,LOCATION_MZONE,seq-1) then flag=bit.bor(flag,bit.lshift(0x1,seq-1)) end - if seq<4 and Duel.CheckLocation(tp,LOCATION_MZONE,seq+1) then flag=bit.bor(flag,bit.lshift(0x1,seq+1)) end - flag=bit.bxor(flag,0xff) - local s=Duel.SelectDisableField(tp,1,LOCATION_MZONE,0,flag) - local nseq=0 - if s==1 then nseq=0 - elseif s==2 then nseq=1 - elseif s==4 then nseq=2 - elseif s==8 then nseq=3 - else nseq=4 end - Duel.MoveSequence(tc,nseq) - end -end diff --git a/script/c63422098.lua b/script/c63422098.lua deleted file mode 100644 index fd1ab65fd5..0000000000 --- a/script/c63422098.lua +++ /dev/null @@ -1,36 +0,0 @@ ---鬼岩城 -function c63422098.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1) - c:EnableReviveLimit() - -- - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(c63422098.val) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_UPDATE_DEFENCE) - c:RegisterEffect(e2) - -- - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - e3:SetOperation(c63422098.regop) - c:RegisterEffect(e3) -end -function c63422098.val(e,c) - local ct=e:GetHandler():GetFlagEffectLabel(63422098) - if not ct then return 0 end - return ct -end -function c63422098.regop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:GetSummonType()==SUMMON_TYPE_SYNCHRO then - local ct=c:GetMaterialCount()-1 - c:RegisterFlagEffect(63422098,RESET_EVENT+0x1fe0000,0,0,ct*200) - end -end diff --git a/script/c6343408.lua b/script/c6343408.lua deleted file mode 100644 index 10920519f7..0000000000 --- a/script/c6343408.lua +++ /dev/null @@ -1,33 +0,0 @@ ---奇跡の発掘 -function c6343408.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOGRAVE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c6343408.condition) - e1:SetTarget(c6343408.target) - e1:SetOperation(c6343408.activate) - c:RegisterEffect(e1) -end -function c6343408.filter(c) - return c:IsFaceup() and c:IsType(TYPE_MONSTER) -end -function c6343408.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c6343408.filter,tp,LOCATION_REMOVED,0,5,nil) -end -function c6343408.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and c6343408.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c6343408.filter,tp,LOCATION_REMOVED,0,3,nil) end - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(6343408,0)) - local g=Duel.SelectTarget(tp,c6343408.filter,tp,LOCATION_REMOVED,0,3,3,nil) - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,3,0,0) -end -function c6343408.activate(e,tp,eg,ep,ev,re,r,rp) - local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local sg=tg:Filter(Card.IsRelateToEffect,nil,e) - if sg:GetCount()>0 then - Duel.SendtoGrave(sg,REASON_EFFECT+REASON_RETURN) - end -end diff --git a/script/c63442604.lua b/script/c63442604.lua deleted file mode 100644 index dac377d832..0000000000 --- a/script/c63442604.lua +++ /dev/null @@ -1,72 +0,0 @@ ---物理分身 -function c63442604.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,0x1c0) - e1:SetCondition(c63442604.condition) - e1:SetTarget(c63442604.target) - e1:SetOperation(c63442604.activate) - c:RegisterEffect(e1) -end -function c63442604.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp -end -function c63442604.cfilter(c,tp) - return c:IsFaceup() and c:GetLevel()>0 - and Duel.IsPlayerCanSpecialSummonMonster(tp,63442605,0,0x4011,c:GetAttack(),c:GetDefence(),c:GetLevel(),c:GetRace(),c:GetAttribute()) -end -function c63442604.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c63442604.cfilter(chkc,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and - Duel.IsExistingTarget(c63442604.cfilter,tp,0,LOCATION_MZONE,1,nil,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - local g=Duel.SelectTarget(tp,c63442604.cfilter,tp,0,LOCATION_MZONE,1,1,nil,tp) - Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0) -end -function c63442604.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if not tc:IsRelateToEffect(e) or tc:IsFacedown() then return end - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 - or not Duel.IsPlayerCanSpecialSummonMonster(tp,63442605,0,0x4011,tc:GetAttack(),tc:GetDefence(), - tc:GetLevel(),tc:GetRace(),tc:GetAttribute()) then return end - local token=Duel.CreateToken(tp,63442605) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_BASE_ATTACK) - e1:SetValue(tc:GetAttack()) - e1:SetReset(RESET_EVENT+0xfe0000) - token:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_SET_BASE_DEFENCE) - e2:SetValue(tc:GetDefence()) - token:RegisterEffect(e2) - local e3=e1:Clone() - e3:SetCode(EFFECT_CHANGE_LEVEL) - e3:SetValue(tc:GetLevel()) - token:RegisterEffect(e3) - local e4=e1:Clone() - e4:SetCode(EFFECT_CHANGE_RACE) - e4:SetValue(tc:GetRace()) - token:RegisterEffect(e4) - local e5=e1:Clone() - e5:SetCode(EFFECT_CHANGE_ATTRIBUTE) - e5:SetValue(tc:GetAttribute()) - token:RegisterEffect(e5) - Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP) - local de=Effect.CreateEffect(e:GetHandler()) - de:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - de:SetRange(LOCATION_MZONE) - de:SetCode(EVENT_PHASE+PHASE_END) - de:SetCountLimit(1) - de:SetOperation(c63442604.desop) - de:SetReset(RESET_EVENT+0x1fe0000) - token:RegisterEffect(de) -end -function c63442604.desop(e,tp,eg,ep,ev,re,r,rp) - Duel.Destroy(e:GetHandler(),REASON_EFFECT) -end \ No newline at end of file diff --git a/script/c63465535.lua b/script/c63465535.lua deleted file mode 100644 index b7f74ecbcd..0000000000 --- a/script/c63465535.lua +++ /dev/null @@ -1,95 +0,0 @@ ---地底のアラクネー -function c63465535.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure2(c,aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_DARK),aux.NonTuner(Card.IsRace,RACE_INSECT)) - c:EnableReviveLimit() - --actlimit - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetOperation(c63465535.operation) - c:RegisterEffect(e1) - --equip - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(63465535,0)) - e2:SetCategory(CATEGORY_EQUIP) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCondition(c63465535.eqcon) - e2:SetTarget(c63465535.eqtg) - e2:SetOperation(c63465535.eqop) - c:RegisterEffect(e2) - --Destroy replace - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE) - e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e3:SetRange(LOCATION_MZONE) - e3:SetCode(EFFECT_DESTROY_REPLACE) - e3:SetTarget(c63465535.desreptg) - e3:SetOperation(c63465535.desrepop) - e3:SetLabelObject(e2) - c:RegisterEffect(e3) -end -function c63465535.operation(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EFFECT_CANNOT_ACTIVATE) - e1:SetTargetRange(0,1) - e1:SetValue(c63465535.aclimit) - e1:SetReset(RESET_PHASE+PHASE_DAMAGE) - Duel.RegisterEffect(e1,tp) -end -function c63465535.aclimit(e,re,tp) - return re:IsHasType(EFFECT_TYPE_ACTIVATE) -end -function c63465535.eqcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local ec=e:GetLabelObject() - return ec==nil or not ec:IsHasCardTarget(c) or ec:GetFlagEffect(63465535)==0 -end -function c63465535.filter(c) - return c:IsFaceup() and c:IsAbleToChangeControler() -end -function c63465535.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c63465535.filter(chkc) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingTarget(c63465535.filter,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local g=Duel.SelectTarget(tp,c63465535.filter,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0) -end -function c63465535.eqlimit(e,c) - return e:GetOwner()==c -end -function c63465535.eqop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) and tc:IsType(TYPE_MONSTER) then - if c:IsFaceup() and c:IsRelateToEffect(e) then - if not Duel.Equip(tp,tc,c,false) then return end - --Add Equip limit - tc:RegisterFlagEffect(63465535,RESET_EVENT+0x1fe0000,0,0) - e:SetLabelObject(tc) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetProperty(EFFECT_FLAG_COPY_INHERIT+EFFECT_FLAG_OWNER_RELATE) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(c63465535.eqlimit) - tc:RegisterEffect(e1) - else Duel.SendtoGrave(tc,REASON_EFFECT) end - end -end -function c63465535.desreptg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - local ec=e:GetLabelObject():GetLabelObject() - if chk==0 then return c:IsReason(REASON_BATTLE) and ec and ec:IsHasCardTarget(c) - and not ec:IsStatus(STATUS_DESTROY_CONFIRMED) and ec:GetFlagEffect(63465535)~=0 end - return Duel.SelectYesNo(tp,aux.Stringid(63465535,1)) -end -function c63465535.desrepop(e,tp,eg,ep,ev,re,r,rp) - Duel.Destroy(e:GetLabelObject():GetLabelObject(),REASON_EFFECT+REASON_REPLACE) -end diff --git a/script/c63468625.lua b/script/c63468625.lua deleted file mode 100644 index a282462fb9..0000000000 --- a/script/c63468625.lua +++ /dev/null @@ -1,130 +0,0 @@ ---機皇神マシニクル∞ -function c63468625.initial_effect(c) - c:EnableReviveLimit() - --special summon condition - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(0) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_SPSUMMON_PROC) - e2:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e2:SetRange(LOCATION_HAND) - e2:SetCondition(c63468625.spcon) - e2:SetOperation(c63468625.spop) - c:RegisterEffect(e2) - --equip - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(63468625,0)) - e3:SetCategory(CATEGORY_EQUIP) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1) - e3:SetTarget(c63468625.eqtg) - e3:SetOperation(c63468625.eqop) - c:RegisterEffect(e3) - --damage - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(63468625,1)) - e4:SetCategory(CATEGORY_DAMAGE) - e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e4:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_FIELD) - e4:SetCode(EVENT_PHASE+PHASE_STANDBY) - e4:SetRange(LOCATION_MZONE) - e4:SetCountLimit(1) - e4:SetCondition(c63468625.damcon) - e4:SetCost(c63468625.damcost) - e4:SetTarget(c63468625.damtg) - e4:SetOperation(c63468625.damop) - c:RegisterEffect(e4) -end -function c63468625.spfilter(c) - return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x13) and c:IsAbleToGraveAsCost() -end -function c63468625.spcon(e,c) - if c==nil then return true end - return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c63468625.spfilter,c:GetControler(),LOCATION_HAND,0,3,c) -end -function c63468625.spop(e,tp,eg,ep,ev,re,r,rp,c) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c63468625.spfilter,tp,LOCATION_HAND,0,3,3,c) - Duel.SendtoGrave(g,REASON_COST) -end -function c63468625.eqfilter(c) - return c:IsFaceup() and c:IsType(TYPE_SYNCHRO) and c:IsAbleToChangeControler() -end -function c63468625.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c63468625.eqfilter(chkc) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingTarget(c63468625.eqfilter,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local g=Duel.SelectTarget(tp,c63468625.eqfilter,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0) -end -function c63468625.eqlimit(e,c) - return e:GetOwner()==c and not c:IsDisabled() -end -function c63468625.eqop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) and tc:IsType(TYPE_MONSTER) then - if c:IsFaceup() and c:IsRelateToEffect(e) then - local atk=tc:GetTextAttack() - if atk<0 then atk=0 end - if not Duel.Equip(tp,tc,c,false) then return end - --Add Equip limit - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_COPY_INHERIT) - e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(c63468625.eqlimit) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetReset(RESET_EVENT+0x1fe0000) - e2:SetValue(atk) - tc:RegisterEffect(e2) - tc:RegisterFlagEffect(63468625,RESET_EVENT+0x1fe0000,0,1) - else Duel.SendtoGrave(tc,REASON_EFFECT) end - end -end -function c63468625.damcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c63468625.dcfilter(c) - return c:GetFlagEffect(63468625)~=0 and c:IsAbleToGraveAsCost() -end -function c63468625.damcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():GetEquipGroup():IsExists(c63468625.dcfilter,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=e:GetHandler():GetEquipGroup():FilterSelect(tp,c63468625.dcfilter,1,1,nil) - Duel.SendtoGrave(g,REASON_COST) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_BP) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) - e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) - local atk=g:GetFirst():GetTextAttack() - if atk<0 then atk=0 end - e:SetLabel(atk) -end -function c63468625.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(e:GetLabel()) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,e:GetLabel()) -end -function c63468625.damop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c63477921.lua b/script/c63477921.lua deleted file mode 100644 index e7ab161caa..0000000000 --- a/script/c63477921.lua +++ /dev/null @@ -1,37 +0,0 @@ ---サイバー・サモン・ブラスター -function c63477921.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --damage - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(63477921,0)) - e2:SetCategory(CATEGORY_DAMAGE) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetRange(LOCATION_SZONE) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetCondition(c63477921.damcon) - e2:SetTarget(c63477921.damtg) - e2:SetOperation(c63477921.damop) - c:RegisterEffect(e2) -end -function c63477921.filter(c) - return c:IsFaceup() and c:IsRace(RACE_MACHINE) -end -function c63477921.damcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c63477921.filter,1,nil) -end -function c63477921.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(300) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,300) -end -function c63477921.damop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c63485233.lua b/script/c63485233.lua deleted file mode 100644 index 4fbf1ab270..0000000000 --- a/script/c63485233.lua +++ /dev/null @@ -1,39 +0,0 @@ ---スター・チェンジャー -function c63485233.initial_effect(c) - --lv change - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c63485233.target) - e1:SetOperation(c63485233.operation) - c:RegisterEffect(e1) -end -function c63485233.filter(c) - return c:IsFaceup() and c:IsLevelAbove(1) -end -function c63485233.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c63485233.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c63485233.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - local g=Duel.SelectTarget(tp,c63485233.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - local tc=g:GetFirst() - local op=0 - if tc:GetLevel()==1 then op=Duel.SelectOption(tp,aux.Stringid(63485233,0)) - else op=Duel.SelectOption(tp,aux.Stringid(63485233,0),aux.Stringid(63485233,1)) end - e:SetLabel(op) -end -function c63485233.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_LEVEL) - e1:SetReset(RESET_EVENT+0x1fe0000) - if e:GetLabel()==0 then - e1:SetValue(1) - else e1:SetValue(-1) end - tc:RegisterEffect(e1) - end -end diff --git a/script/c63487632.lua b/script/c63487632.lua deleted file mode 100644 index f7ec328f2d..0000000000 --- a/script/c63487632.lua +++ /dev/null @@ -1,115 +0,0 @@ ---ドラグニティアームズ-レヴァテイン -function c63487632.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND+LOCATION_GRAVE) - e1:SetCondition(c63487632.spcon) - e1:SetOperation(c63487632.spop) - c:RegisterEffect(e1) - --equip - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(63487632,0)) - e2:SetCategory(CATEGORY_LEAVE_GRAVE+CATEGORY_EQUIP) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_SUMMON_SUCCESS) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e2:SetTarget(c63487632.eqtg) - e2:SetOperation(c63487632.eqop) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e3) - --special summon - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e4:SetCode(EVENT_LEAVE_FIELD_P) - e4:SetOperation(c63487632.eqcheck) - c:RegisterEffect(e4) - local e5=Effect.CreateEffect(c) - e5:SetDescription(aux.Stringid(63487632,1)) - e5:SetCategory(CATEGORY_SPECIAL_SUMMON) - e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e5:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e5:SetCode(EVENT_TO_GRAVE) - e5:SetCondition(c63487632.spcon2) - e5:SetTarget(c63487632.sptg2) - e5:SetOperation(c63487632.spop2) - e5:SetLabelObject(e4) - c:RegisterEffect(e5) -end -function c63487632.spfilter(c) - return c:GetEquipGroup():IsExists(Card.IsSetCard,1,nil,0x29) and c:IsAbleToRemoveAsCost() -end -function c63487632.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsExistingMatchingCard(c63487632.spfilter,tp,LOCATION_MZONE,0,1,nil) -end -function c63487632.spop(e,tp,eg,ep,ev,re,r,rp,c) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c63487632.spfilter,tp,LOCATION_MZONE,0,1,1,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c63487632.filter(c) - return c:GetCode()~=63487632 and c:IsRace(RACE_DRAGON) -end -function c63487632.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c63487632.filter(chkc) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingTarget(c63487632.filter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local g=Duel.SelectTarget(tp,c63487632.filter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0) -end -function c63487632.eqop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsFaceup() and c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then - if not Duel.Equip(tp,tc,c,false) then return end - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(c63487632.eqlimit) - tc:RegisterEffect(e1) - end -end -function c63487632.eqlimit(e,c) - return e:GetOwner()==c and not c:IsDisabled() -end -function c63487632.eqcheck(e,tp,eg,ep,ev,re,r,rp) - if e:GetLabelObject() then e:GetLabelObject():DeleteGroup() end - local g=e:GetHandler():GetEquipGroup() - g:KeepAlive() - e:SetLabelObject(g) -end -function c63487632.spcon2(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsReason(REASON_EFFECT) and rp~=tp and c:GetPreviousLocation()==LOCATION_MZONE -end -function c63487632.spfilter2(c,e,tp) - return c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c63487632.sptg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local g=e:GetLabelObject():GetLabelObject() - if chkc then return g:IsContains(chkc) and c63487632.spfilter2(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and g:IsExists(c63487632.spfilter2,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=g:FilterSelect(tp,c63487632.spfilter2,1,1,nil,e,tp) - Duel.SetTargetCard(sg) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,sg,1,0,0) -end -function c63487632.spop2(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c63504681.lua b/script/c63504681.lua deleted file mode 100644 index a89b9b97a9..0000000000 --- a/script/c63504681.lua +++ /dev/null @@ -1,97 +0,0 @@ ---No.86 H-C ロンゴミアント -function c63504681.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsRace,RACE_WARRIOR),4,2,nil,nil,5) - c:EnableReviveLimit() - --remove material - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(63504681,0)) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCondition(c63504681.rmcon) - e1:SetOperation(c63504681.rmop) - c:RegisterEffect(e1) - --battle indestructable - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e2:SetValue(1) - e2:SetCondition(c63504681.effcon) - e2:SetLabel(1) - c:RegisterEffect(e2) - --atk/def - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e3:SetRange(LOCATION_MZONE) - e3:SetCode(EFFECT_UPDATE_ATTACK) - e3:SetValue(1500) - e3:SetCondition(c63504681.effcon) - e3:SetLabel(2) - c:RegisterEffect(e3) - local e4=e3:Clone() - e4:SetCode(EFFECT_UPDATE_DEFENCE) - c:RegisterEffect(e4) - --immune - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_SINGLE) - e5:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e5:SetRange(LOCATION_MZONE) - e5:SetCode(EFFECT_IMMUNE_EFFECT) - e5:SetValue(c63504681.efilter) - e5:SetCondition(c63504681.effcon) - e5:SetLabel(3) - c:RegisterEffect(e5) - --disable spsummon - local e6=Effect.CreateEffect(c) - e6:SetType(EFFECT_TYPE_FIELD) - e6:SetRange(LOCATION_MZONE) - e6:SetCode(EFFECT_CANNOT_SUMMON) - e6:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e6:SetTargetRange(0,1) - e6:SetCondition(c63504681.effcon) - e6:SetLabel(4) - c:RegisterEffect(e6) - local e7=e6:Clone() - e7:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - c:RegisterEffect(e7) - --destroy - local e8=Effect.CreateEffect(c) - e8:SetDescription(aux.Stringid(63504681,1)) - e8:SetCategory(CATEGORY_DESTROY) - e8:SetType(EFFECT_TYPE_IGNITION) - e8:SetCountLimit(1) - e8:SetRange(LOCATION_MZONE) - e8:SetCondition(c63504681.effcon) - e8:SetTarget(c63504681.destg) - e8:SetOperation(c63504681.desop) - e8:SetLabel(5) - c:RegisterEffect(e8) -end -c63504681.xyz_number=86 -function c63504681.rmcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp -end -function c63504681.rmop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:GetOverlayCount()>0 then - c:RemoveOverlayCard(tp,1,1,REASON_EFFECT) - end -end -function c63504681.effcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetOverlayCount()>=e:GetLabel() -end -function c63504681.efilter(e,te) - return te:GetOwner()~=e:GetOwner() -end -function c63504681.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDestructable,tp,0,LOCATION_ONFIELD,1,nil) end - local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,0,LOCATION_ONFIELD,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c63504681.desop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,0,LOCATION_ONFIELD,nil) - Duel.Destroy(g,REASON_EFFECT) -end diff --git a/script/c6351548.lua b/script/c6351548.lua deleted file mode 100644 index f3cbfd5b89..0000000000 --- a/script/c6351548.lua +++ /dev/null @@ -1,63 +0,0 @@ ---曙光の騎士 -function c6351548.initial_effect(c) - --to grave - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(6351548,0)) - e1:SetCategory(CATEGORY_TOGRAVE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e1:SetCountLimit(1,6351548) - e1:SetCondition(c6351548.condition) - e1:SetTarget(c6351548.target) - e1:SetOperation(c6351548.operation) - c:RegisterEffect(e1) - --to deck - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(6351548,1)) - e2:SetCategory(CATEGORY_TODECK) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCountLimit(1,6351548) - e2:SetCondition(c6351548.tdcon) - e2:SetTarget(c6351548.tdtg) - e2:SetOperation(c6351548.tdop) - c:RegisterEffect(e2) -end -function c6351548.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) -end -function c6351548.tgfilter(c) - return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsAbleToGrave() -end -function c6351548.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c6351548.tgfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) -end -function c6351548.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c6351548.tgfilter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoGrave(g,REASON_EFFECT) - end -end -function c6351548.tdcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_DECK) -end -function c6351548.tdfilter(c) - return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsAbleToDeck() -end -function c6351548.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c6351548.tdfilter(chkc) end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectTarget(tp,c6351548.tdfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0) -end -function c6351548.tdop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.SendtoDeck(tc,nil,0,REASON_EFFECT) - end -end diff --git a/script/c63516460.lua b/script/c63516460.lua deleted file mode 100644 index 55f6c0af62..0000000000 --- a/script/c63516460.lua +++ /dev/null @@ -1,33 +0,0 @@ ---一陣の風 -function c63516460.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_END_PHASE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCondition(c63516460.condition) - e1:SetTarget(c63516460.target) - e1:SetOperation(c63516460.activate) - c:RegisterEffect(e1) -end -function c63516460.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentChain()>1 and Duel.CheckChainUniqueness() -end -function c63516460.filter(c) - return c:IsDestructable() and c:IsType(TYPE_SPELL+TYPE_TRAP) -end -function c63516460.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and c63516460.filter(chkc) and chkc~=e:GetHandler() end - if chk==0 then return Duel.IsExistingTarget(c63516460.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c63516460.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c63516460.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c63519819.lua b/script/c63519819.lua deleted file mode 100644 index bd09ae135f..0000000000 --- a/script/c63519819.lua +++ /dev/null @@ -1,100 +0,0 @@ ---サウザンド・アイズ・サクリファイス -function c63519819.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcCode2(c,64631466,27125110,true,true) - --equip - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(63519819,0)) - e2:SetCategory(CATEGORY_EQUIP) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCondition(c63519819.eqcon) - e2:SetTarget(c63519819.eqtg) - e2:SetOperation(c63519819.eqop) - c:RegisterEffect(e2) - --cannot attack announce - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetRange(LOCATION_MZONE) - e3:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE) - e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e3:SetTarget(c63519819.antarget) - c:RegisterEffect(e3) - local e4=e3:Clone() - e4:SetCode(EFFECT_CANNOT_CHANGE_POSITION) - e4:SetProperty(EFFECT_FLAG_SET_AVAILABLE) - c:RegisterEffect(e4) -end -function c63519819.eqcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local ec=e:GetLabelObject() - return ec==nil or ec:GetFlagEffect(63519819)==0 -end -function c63519819.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsAbleToChangeControler() end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingTarget(Card.IsAbleToChangeControler,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local g=Duel.SelectTarget(tp,Card.IsAbleToChangeControler,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0) -end -function c63519819.eqlimit(e,c) - return e:GetOwner()==c -end -function c63519819.eqop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - if c:IsFaceup() and c:IsRelateToEffect(e) then - local atk=tc:GetTextAttack() - local def=tc:GetTextDefence() - if tc:IsFacedown() or atk<0 then atk=0 end - if tc:IsFacedown() or def<0 then def=0 end - if not Duel.Equip(tp,tc,c,false) then return end - --Add Equip limit - tc:RegisterFlagEffect(63519819,RESET_EVENT+0x1fe0000,0,0) - e:SetLabelObject(tc) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_COPY_INHERIT+EFFECT_FLAG_OWNER_RELATE) - e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(c63519819.eqlimit) - tc:RegisterEffect(e1) - if atk>0 then - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_OWNER_RELATE) - e2:SetCode(EFFECT_SET_ATTACK) - e2:SetReset(RESET_EVENT+0x1fe0000) - e2:SetValue(atk) - tc:RegisterEffect(e2) - end - if def>0 then - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_EQUIP) - e3:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_OWNER_RELATE) - e3:SetCode(EFFECT_SET_DEFENCE) - e3:SetReset(RESET_EVENT+0x1fe0000) - e3:SetValue(def) - tc:RegisterEffect(e3) - end - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_EQUIP) - e4:SetCode(EFFECT_DESTROY_SUBSTITUTE) - e4:SetProperty(EFFECT_FLAG_SET_AVAILABLE) - e4:SetReset(RESET_EVENT+0x1fe0000) - e4:SetValue(c63519819.repval) - tc:RegisterEffect(e4) - else Duel.SendtoGrave(tc,REASON_EFFECT) end - end -end -function c63519819.repval(e,re,r,rp) - return bit.band(r,REASON_BATTLE)~=0 -end -function c63519819.antarget(e,c) - return c~=e:GetHandler() -end diff --git a/script/c6353603.lua b/script/c6353603.lua deleted file mode 100644 index 0c18373b8b..0000000000 --- a/script/c6353603.lua +++ /dev/null @@ -1,65 +0,0 @@ ---暗炎星-ユウシ -function c6353603.initial_effect(c) - --set - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(6353603,0)) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_BATTLE_DAMAGE) - e1:SetCountLimit(1) - e1:SetCondition(c6353603.setcon) - e1:SetTarget(c6353603.settg) - e1:SetOperation(c6353603.setop) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(6353603,1)) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetTarget(c6353603.destg) - e2:SetOperation(c6353603.desop) - c:RegisterEffect(e2) -end -function c6353603.setcon(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp -end -function c6353603.filter(c) - return c:IsSetCard(0x7c) and c:IsType(TYPE_SPELL) and c:IsSSetable() -end -function c6353603.settg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingMatchingCard(c6353603.filter,tp,LOCATION_DECK,0,1,nil) end -end -function c6353603.setop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) - local g=Duel.SelectMatchingCard(tp,c6353603.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SSet(tp,g:GetFirst()) - Duel.ConfirmCards(1-tp,g) - end -end -function c6353603.filter1(c) - return c:IsFaceup() and c:IsSetCard(0x7c) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToGraveAsCost() - and Duel.IsExistingTarget(c6353603.filter2,0,LOCATION_MZONE,LOCATION_MZONE,1,c) -end -function c6353603.filter2(c) - return c:IsDestructable() -end -function c6353603.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c6353603.filter2(chkc) end - if chk==0 then return Duel.IsExistingMatchingCard(c6353603.filter1,tp,LOCATION_ONFIELD,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g1=Duel.SelectMatchingCard(tp,c6353603.filter1,tp,LOCATION_ONFIELD,0,1,1,nil) - Duel.SendtoGrave(g1,REASON_COST) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g2=Duel.SelectTarget(tp,c6353603.filter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g2,1,0,0) -end -function c6353603.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c63545861.lua b/script/c63545861.lua deleted file mode 100644 index fa84915ae0..0000000000 --- a/script/c63545861.lua +++ /dev/null @@ -1,25 +0,0 @@ ---セイクリッドの流星 -function c63545861.initial_effect(c) - -- - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetOperation(c63545861.regop) - c:RegisterEffect(e1) -end -function c63545861.regop(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_DAMAGE_STEP_END) - e1:SetOperation(c63545861.retop) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function c63545861.retop(e,tp,eg,ep,ev,re,r,rp) - local a=Duel.GetAttacker() - local d=Duel.GetAttackTarget() - local g=Group.CreateGroup() - if a:IsSetCard(0x53) and d and d:IsControler(1-tp) and d:IsRelateToBattle() then g:AddCard(d) end - if d and d:IsSetCard(0x53) and a:IsControler(1-tp) and a:IsRelateToBattle() then g:AddCard(a) end - Duel.SendtoDeck(g,nil,2,REASON_EFFECT) -end diff --git a/script/c63571750.lua b/script/c63571750.lua deleted file mode 100644 index 0fcd9f136e..0000000000 --- a/script/c63571750.lua +++ /dev/null @@ -1,56 +0,0 @@ ---王家の財宝 -function c63571750.initial_effect(c) - Duel.EnableGlobalFlag(GLOBALFLAG_DECK_REVERSE_CHECK) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TODECK) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c63571750.target) - e1:SetOperation(c63571750.activate) - c:RegisterEffect(e1) -end -function c63571750.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToDeck() end - Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0) -end -function c63571750.activate(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) then return end - c:CancelToGrave() - Duel.SendtoDeck(c,nil,2,REASON_EFFECT) - Duel.ShuffleDeck(tp) - c:ReverseInDeck() - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(63571750,0)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_TO_HAND) - e1:SetCondition(c63571750.thcon) - e1:SetTarget(c63571750.thtg) - e1:SetOperation(c63571750.thop) - e1:SetReset(RESET_EVENT+0x1de0000) - c:RegisterEffect(e1) -end -function c63571750.thcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsReason(REASON_DRAW) -end -function c63571750.filter(c) - return c:IsAbleToHand() and not c:IsHasEffect(EFFECT_NECRO_VALLEY) -end -function c63571750.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsRelateToEffect(e) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE) -end -function c63571750.thop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SendtoGrave(c,REASON_EFFECT) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c63571750.filter,tp,LOCATION_GRAVE,0,1,1,c) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end - end -end diff --git a/script/c63583431.lua b/script/c63583431.lua deleted file mode 100644 index fc9d9f53d2..0000000000 --- a/script/c63583431.lua +++ /dev/null @@ -1,65 +0,0 @@ ---ゴゴゴ護符 -function c63583431.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --reduce - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_CHANGE_DAMAGE) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(1,0) - e2:SetCondition(c63583431.damcon) - e2:SetValue(c63583431.damval) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EFFECT_NO_EFFECT_DAMAGE) - c:RegisterEffect(e3) - --indes - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(63583431,0)) - e4:SetType(EFFECT_TYPE_QUICK_O) - e4:SetRange(LOCATION_SZONE) - e4:SetCode(EVENT_ATTACK_ANNOUNCE) - e4:SetHintTiming(TIMING_BATTLE_PHASE) - e4:SetCountLimit(1) - e4:SetCondition(c63583431.indcon) - e4:SetTarget(c63583431.indtg) - e4:SetOperation(c63583431.indop) - c:RegisterEffect(e4) -end -function c63583431.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x59) -end -function c63583431.damcon(e) - return Duel.IsExistingMatchingCard(c63583431.cfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,2,nil) -end -function c63583431.damval(e,re,val,r,rp,rc) - if bit.band(r,REASON_EFFECT)~=0 then return 0 end - return val -end -function c63583431.indcon(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetAttacker() - if tc:IsControler(1-tp) then tc=Duel.GetAttackTarget() end - e:SetLabelObject(tc) - return tc and tc:IsFaceup() and tc:IsControler(tp) and tc:IsSetCard(0x59) -end -function c63583431.indtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetCard(e:GetLabelObject()) -end -function c63583431.indop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e1:SetValue(1) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_DAMAGE) - tc:RegisterEffect(e1) - end -end diff --git a/script/c63595262.lua b/script/c63595262.lua deleted file mode 100644 index a8d84f1d52..0000000000 --- a/script/c63595262.lua +++ /dev/null @@ -1,36 +0,0 @@ ---ユニコーンの導き -function c63595262.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_REMOVE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c63595262.target) - e1:SetOperation(c63595262.activate) - c:RegisterEffect(e1) -end -function c63595262.filter(c,e,tp) - return c:IsFaceup() and c:IsLevelBelow(5) and c:IsRace(RACE_BEAST+RACE_WINDBEAST) - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c63595262.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_REMOVED) and c63595262.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_HAND,0,1,e:GetHandler()) - and Duel.IsExistingTarget(c63595262.filter,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c63595262.filter,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_HAND) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c63595262.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_HAND,0,1,1,nil) - if g:GetCount()==0 then return end - Duel.Remove(g,POS_FACEUP,REASON_EFFECT) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_ATTACK) - end -end diff --git a/script/c63612442.lua b/script/c63612442.lua deleted file mode 100644 index a48d167d80..0000000000 --- a/script/c63612442.lua +++ /dev/null @@ -1,78 +0,0 @@ ---X-セイバー ソウザ -function c63612442.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,nil,aux.NonTuner(Card.IsSetCard,0x100d),1) - c:EnableReviveLimit() - --get effect - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(63612442,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c63612442.cost) - e1:SetTarget(c63612442.target) - e1:SetOperation(c63612442.operation) - c:RegisterEffect(e1) -end -function c63612442.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsSetCard,1,e:GetHandler(),0x100d) end - local g=Duel.SelectReleaseGroup(tp,Card.IsSetCard,1,1,e:GetHandler(),0x100d) - Duel.Release(g,REASON_COST) -end -function c63612442.target(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:GetFlagEffect(63612442)==0 or c:GetFlagEffect(63612443)==0 end - local t1=c:GetFlagEffect(63612442) - local t2=c:GetFlagEffect(63612443) - local op=0 - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(63612442,0)) - if t1==0 and t2==0 then - op=Duel.SelectOption(tp,aux.Stringid(63612442,1),aux.Stringid(63612442,2)) - elseif t1==0 then op=Duel.SelectOption(tp,aux.Stringid(63612442,1)) - else Duel.SelectOption(tp,aux.Stringid(63612442,2)) op=1 end - e:SetLabel(op) - if op==0 then c:RegisterFlagEffect(63612442,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) - else c:RegisterFlagEffect(63612443,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) end -end -function c63612442.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if e:GetLabel()==0 then - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(63612442,3)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_BATTLE_START) - e1:SetReset(RESET_EVENT+0x1ff0000+RESET_PHASE+PHASE_END) - e1:SetCondition(c63612442.descon) - e1:SetTarget(c63612442.destg) - e1:SetOperation(c63612442.desop) - c:RegisterEffect(e1) - else - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetReset(RESET_EVENT+0x1ff0000+RESET_PHASE+PHASE_END) - e1:SetRange(LOCATION_MZONE) - e1:SetValue(c63612442.efilter) - c:RegisterEffect(e1) - end -end -function c63612442.descon(e,tp,eg,ep,ev,re,r,rp) - local d=Duel.GetAttackTarget() - if d==e:GetHandler() then d=Duel.GetAttacker() end - e:SetLabelObject(d) - return d~=nil -end -function c63612442.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetLabelObject(),1,0,0) -end -function c63612442.desop(e,tp,eg,ep,ev,re,r,rp) - local d=e:GetLabelObject() - if d:IsRelateToBattle() then - Duel.Destroy(d,REASON_EFFECT) - end -end -function c63612442.efilter(e,re) - return re:GetOwner():IsType(TYPE_TRAP) -end diff --git a/script/c63630268.lua b/script/c63630268.lua deleted file mode 100644 index 96a1f1c986..0000000000 --- a/script/c63630268.lua +++ /dev/null @@ -1,35 +0,0 @@ ---幻蝶の護り -function c63630268.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_POSITION) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c63630268.target) - e1:SetOperation(c63630268.operation) - c:RegisterEffect(e1) -end -function c63630268.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsPosition(POS_FACEUP_ATTACK) end - if chk==0 then return Duel.IsExistingTarget(Card.IsPosition,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,POS_FACEUP_ATTACK) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE) - Duel.SelectTarget(tp,Card.IsPosition,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,POS_FACEUP_ATTACK) -end -function c63630268.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsPosition(POS_FACEUP_ATTACK) then - Duel.ChangePosition(tc,POS_FACEUP_DEFENCE) - end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CHANGE_DAMAGE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetTargetRange(1,0) - e1:SetValue(c63630268.damval) - e1:SetReset(RESET_PHASE+PHASE_END,1) - Duel.RegisterEffect(e1,tp) -end -function c63630268.damval(e,re,val,r,rp,rc) - return val/2 -end diff --git a/script/c63665606.lua b/script/c63665606.lua deleted file mode 100644 index ac52d672a0..0000000000 --- a/script/c63665606.lua +++ /dev/null @@ -1,46 +0,0 @@ ---虚無の波動 -function c63665606.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --atk,def - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(LOCATION_MZONE,0) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetCondition(c63665606.atcon) - e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0xb)) - e2:SetValue(400) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EFFECT_UPDATE_DEFENCE) - c:RegisterEffect(e3) - --discard - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(63665606,0)) - e4:SetCategory(CATEGORY_TOGRAVE) - e4:SetType(EFFECT_TYPE_IGNITION) - e4:SetRange(LOCATION_SZONE) - e4:SetCost(c63665606.discost) - e4:SetTarget(c63665606.distg) - e4:SetOperation(c63665606.disop) - c:RegisterEffect(e4) -end -function c63665606.atcon(e) - return Duel.GetFieldGroupCount(e:GetHandlerPlayer(),LOCATION_HAND,0)==0 -end -function c63665606.discost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end -function c63665606.distg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)>0 end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,0,LOCATION_HAND) -end -function c63665606.disop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetFieldGroup(tp,LOCATION_HAND,0) - Duel.SendtoGrave(g,REASON_EFFECT) -end diff --git a/script/c63665875.lua b/script/c63665875.lua deleted file mode 100644 index ee15a02c17..0000000000 --- a/script/c63665875.lua +++ /dev/null @@ -1,51 +0,0 @@ ---ゴブリンゾンビ -function c63665875.initial_effect(c) - --handes - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(63665875,0)) - e1:SetCategory(CATEGORY_DECKDES) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_BATTLE_DAMAGE) - e1:SetCondition(c63665875.ddcon) - e1:SetTarget(c63665875.ddtg) - e1:SetOperation(c63665875.ddop) - c:RegisterEffect(e1) - --search - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(63665875,1)) - e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetCondition(c63665875.srcon) - e2:SetTarget(c63665875.srtg) - e2:SetOperation(c63665875.srop) - c:RegisterEffect(e2) -end -function c63665875.ddcon(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp -end -function c63665875.ddtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DECKDES,0,0,1-tp,1) -end -function c63665875.ddop(e,tp,eg,ep,ev,re,r,rp) - Duel.DiscardDeck(1-tp,1,REASON_EFFECT) -end -function c63665875.srcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) -end -function c63665875.srtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c63665875.filter(c) - return c:IsDefenceBelow(1200) and c:IsRace(RACE_ZOMBIE) and c:IsAbleToHand() -end -function c63665875.srop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c63665875.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c63676256.lua b/script/c63676256.lua deleted file mode 100644 index 1623d43101..0000000000 --- a/script/c63676256.lua +++ /dev/null @@ -1,115 +0,0 @@ ---バスター・ショットマン -function c63676256.initial_effect(c) - --equip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(63676256,0)) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetTarget(c63676256.eqtg) - e1:SetOperation(c63676256.eqop) - c:RegisterEffect(e1) - --unequip - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(63676256,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_SZONE) - e2:SetCondition(c63676256.uncon) - e2:SetTarget(c63676256.sptg) - e2:SetOperation(c63676256.spop) - c:RegisterEffect(e2) - --destroy sub - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_EQUIP) - e3:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e3:SetCode(EFFECT_DESTROY_SUBSTITUTE) - e3:SetCondition(c63676256.uncon) - e3:SetValue(1) - c:RegisterEffect(e3) - --eqlimit - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetCode(EFFECT_EQUIP_LIMIT) - e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e4:SetValue(1) - c:RegisterEffect(e4) - --atk,def - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_EQUIP) - e5:SetCode(EFFECT_UPDATE_ATTACK) - e5:SetCondition(c63676256.uncon) - e5:SetValue(-500) - c:RegisterEffect(e5) - local e6=e5:Clone() - e6:SetCode(EFFECT_UPDATE_DEFENCE) - c:RegisterEffect(e6) - --search - local e7=Effect.CreateEffect(c) - e7:SetDescription(aux.Stringid(63676256,2)) - e7:SetCategory(CATEGORY_DESTROY) - e7:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e7:SetRange(LOCATION_SZONE) - e7:SetCode(EVENT_BATTLE_DESTROYING) - e7:SetCondition(c63676256.descon) - e7:SetTarget(c63676256.destg) - e7:SetOperation(c63676256.desop) - c:RegisterEffect(e7) -end -function c63676256.uncon(e) - return e:GetHandler():IsStatus(STATUS_UNION) -end -function c63676256.filter(c) - return c:IsFaceup() and c:GetUnionCount()==0 -end -function c63676256.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c63676256.filter(chkc) end - if chk==0 then return e:GetHandler():GetFlagEffect(63676256)==0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingTarget(c63676256.filter,tp,LOCATION_MZONE,0,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local g=Duel.SelectTarget(tp,c63676256.filter,tp,LOCATION_MZONE,0,1,1,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0) - e:GetHandler():RegisterFlagEffect(63676256,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1) -end -function c63676256.eqop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if not c:IsRelateToEffect(e) or c:IsFacedown() then return end - if not tc:IsRelateToEffect(e) or not c63676256.filter(tc) then - Duel.SendtoGrave(c,REASON_EFFECT) - return - end - if not Duel.Equip(tp,c,tc,false) then return end - c:SetStatus(STATUS_UNION,true) -end -function c63676256.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():GetFlagEffect(63676256)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) - e:GetHandler():RegisterFlagEffect(63676256,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1) -end -function c63676256.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP_ATTACK) - end -end -function c63676256.descon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsStatus(STATUS_UNION) and eg:GetCount()==1 and eg:GetFirst()==e:GetHandler():GetEquipTarget() -end -function c63676256.dfilter(c,rac) - return c:IsFaceup() and c:IsRace(rac) and c:IsDestructable() -end -function c63676256.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local tc=eg:GetFirst():GetBattleTarget() - local desg=Duel.GetMatchingGroup(c63676256.dfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tc:GetRace()) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,desg,desg:GetCount(),0,0) -end -function c63676256.desop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local tc=eg:GetFirst():GetBattleTarget() - local desg=Duel.GetMatchingGroup(c63676256.dfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tc:GetRace()) - Duel.Destroy(desg,REASON_EFFECT) -end diff --git a/script/c63689843.lua b/script/c63689843.lua deleted file mode 100644 index a19b3464b9..0000000000 --- a/script/c63689843.lua +++ /dev/null @@ -1,26 +0,0 @@ ---白兵戦 -function c63689843.initial_effect(c) - --Damage - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_DAMAGE) - e1:SetTarget(c63689843.rectg) - e1:SetOperation(c63689843.recop) - c:RegisterEffect(e1) -end -function c63689843.rectg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return ep==tp end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(700) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,700) -end -function c63689843.recop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) - local gc=Duel.GetMatchingGroupCount(Card.IsCode,tp,LOCATION_GRAVE,0,nil,63689843) - if gc>0 then - Duel.Damage(p,300*gc,REASON_EFFECT) - end -end diff --git a/script/c63695531.lua b/script/c63695531.lua deleted file mode 100644 index 76799f0c19..0000000000 --- a/script/c63695531.lua +++ /dev/null @@ -1,8 +0,0 @@ ---墓守の長槍兵 -function c63695531.initial_effect(c) - --pierce - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_PIERCE) - c:RegisterEffect(e1) -end diff --git a/script/c63703130.lua b/script/c63703130.lua deleted file mode 100644 index 752e4c3d38..0000000000 --- a/script/c63703130.lua +++ /dev/null @@ -1,30 +0,0 @@ ---O-オーバーソウル -function c63703130.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c63703130.target) - e1:SetOperation(c63703130.activate) - c:RegisterEffect(e1) -end -function c63703130.filter(c,e,tp) - return c:IsSetCard(0x3008) and c:IsType(TYPE_NORMAL) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c63703130.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c63703130.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c63703130.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c63703130.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c63703130.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c63730624.lua b/script/c63730624.lua deleted file mode 100644 index 788ddcad9c..0000000000 --- a/script/c63730624.lua +++ /dev/null @@ -1,117 +0,0 @@ ---ダブルツールD&C -function c63730624.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c63730624.target) - e1:SetOperation(c63730624.operation) - c:RegisterEffect(e1) - --Equip limit - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_EQUIP_LIMIT) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetValue(c63730624.eqlimit) - c:RegisterEffect(e2) - --atk - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_EQUIP) - e3:SetCode(EFFECT_UPDATE_ATTACK) - e3:SetCondition(c63730624.scon1) - e3:SetValue(1000) - c:RegisterEffect(e3) - --disable - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e4:SetRange(LOCATION_SZONE) - e4:SetCode(EVENT_BE_BATTLE_TARGET) - e4:SetCondition(c63730624.scon2) - e4:SetOperation(c63730624.sop2) - c:RegisterEffect(e4) - --atk - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_FIELD) - e5:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET) - e5:SetRange(LOCATION_SZONE) - e5:SetTargetRange(0,LOCATION_MZONE) - e5:SetCondition(c63730624.ocon1) - e5:SetValue(c63730624.atlimit) - c:RegisterEffect(e5) - --destroy - local e6=Effect.CreateEffect(c) - e6:SetCategory(CATEGORY_DESTROY) - e6:SetDescription(aux.Stringid(63730624,0)) - e6:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e6:SetCode(EVENT_DAMAGE_STEP_END) - e6:SetRange(LOCATION_SZONE) - e6:SetCondition(c63730624.ocon2) - e6:SetTarget(c63730624.otg2) - e6:SetOperation(c63730624.oop2) - c:RegisterEffect(e6) -end -function c63730624.eqlimit(e,c) - return c:GetControler()==e:GetHandler():GetControler() - and (c:IsCode(2403771) or (c:IsSetCard(0x26) and c:GetLevel()>=4 and c:IsRace(RACE_MACHINE))) -end -function c63730624.filter(c,tp) - return c:IsControler(tp) and c:IsFaceup() - and (c:IsCode(2403771) or (c:IsSetCard(0x26) and c:GetLevel()>=4 and c:IsRace(RACE_MACHINE))) -end -function c63730624.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c63730624.filter(chkc,tp) end - if chk==0 then return Duel.IsExistingTarget(c63730624.filter,tp,LOCATION_MZONE,0,1,nil,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c63730624.filter,tp,LOCATION_MZONE,0,1,1,nil,tp) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c63730624.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsControler(tp) and tc:IsFaceup() then - Duel.Equip(tp,c,tc) - end -end -function c63730624.scon1(e) - return e:GetHandler():GetEquipTarget() and Duel.GetTurnPlayer()==e:GetHandler():GetControler() -end -function c63730624.scon2(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp and Duel.GetAttacker()==e:GetHandler():GetEquipTarget() -end -function c63730624.sop2(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local d=Duel.GetAttackTarget() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_BATTLE) - d:RegisterEffect(e1,true) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_BATTLE) - d:RegisterEffect(e2,true) -end -function c63730624.ocon1(e) - return Duel.GetTurnPlayer()~=e:GetHandler():GetControler() -end -function c63730624.atlimit(e,c) - return c~=e:GetHandler():GetEquipTarget() -end -function c63730624.ocon2(e,tp,eg,ep,ev,re,r,rp) - local a=Duel.GetAttacker() - local d=Duel.GetAttackTarget() - return Duel.GetTurnPlayer()~=tp and d==e:GetHandler():GetEquipTarget() and a:IsRelateToBattle() -end -function c63730624.otg2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,Duel.GetAttacker(),1,0,0) -end -function c63730624.oop2(e,tp,eg,ep,ev,re,r,rp) - local a=Duel.GetAttacker() - if a:IsRelateToBattle() then - Duel.Destroy(a,REASON_EFFECT) - end -end diff --git a/script/c63741331.lua b/script/c63741331.lua deleted file mode 100644 index f985168cc3..0000000000 --- a/script/c63741331.lua +++ /dev/null @@ -1,32 +0,0 @@ ---フォッグ・コントロール -function c63741331.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCost(c63741331.cost) - e1:SetTarget(c63741331.target) - e1:SetOperation(c63741331.activate) - c:RegisterEffect(e1) -end -function c63741331.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x18) -end -function c63741331.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,c63741331.cfilter,1,nil) end - local g=Duel.SelectReleaseGroup(tp,c63741331.cfilter,1,1,nil) - Duel.Release(g,REASON_COST) -end -function c63741331.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,2,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) -end -function c63741331.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - tc:AddCounter(0x19,3) - end -end diff --git a/script/c63746411.lua b/script/c63746411.lua deleted file mode 100644 index 79a51ab9c7..0000000000 --- a/script/c63746411.lua +++ /dev/null @@ -1,58 +0,0 @@ ---No.106 巨岩掌ジャイアント・ハンド -function c63746411.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,4,2) - c:EnableReviveLimit() - --negate - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(63746411,0)) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_CHAINING) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c63746411.condition) - e1:SetCost(c63746411.cost) - e1:SetTarget(c63746411.target) - e1:SetOperation(c63746411.operation) - c:RegisterEffect(e1) -end -c63746411.xyz_number=106 -function c63746411.condition(e,tp,eg,ep,ev,re,r,rp) - return rp~=tp and re:IsActiveType(TYPE_MONSTER) - and Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)==LOCATION_MZONE -end -function c63746411.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,2,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,2,2,REASON_COST) -end -function c63746411.filter(c) - return c:IsFaceup() and c:IsType(TYPE_EFFECT) -end -function c63746411.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c63746411.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c63746411.filter,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - local g=Duel.SelectTarget(tp,c63746411.filter,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0) -end -function c63746411.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsFaceup() and c:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsRelateToEffect(e) and tc:IsType(TYPE_EFFECT) then - c:SetCardTarget(tc) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_OWNER_RELATE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetCondition(c63746411.rcon) - tc:RegisterEffect(e1,true) - local e2=e1:Clone() - e2:SetCode(EFFECT_CANNOT_CHANGE_POSITION) - tc:RegisterEffect(e2,true) - end -end -function c63746411.rcon(e) - return e:GetOwner():IsHasCardTarget(e:GetHandler()) -end diff --git a/script/c63749102.lua b/script/c63749102.lua deleted file mode 100644 index b9e8f5b559..0000000000 --- a/script/c63749102.lua +++ /dev/null @@ -1,32 +0,0 @@ ---イグザリオン・ユニバース -function c63749102.initial_effect(c) - --pierce - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(63749102,0)) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetHintTiming(0,TIMING_BATTLE_PHASE) - e1:SetCondition(c63749102.atkcon) - e1:SetOperation(c63749102.atkop) - c:RegisterEffect(e1) -end -function c63749102.atkcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentChain()==0 and e:GetHandler()==Duel.GetAttacker() and Duel.GetAttackTarget() and Duel.GetAttackTarget():IsDefencePos() -end -function c63749102.atkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFaceup() and c:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetValue(-400) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_PIERCE) - c:RegisterEffect(e2) - end -end diff --git a/script/c63789924.lua b/script/c63789924.lua deleted file mode 100644 index 1d9bf60450..0000000000 --- a/script/c63789924.lua +++ /dev/null @@ -1,62 +0,0 @@ ---盗人の煙玉 -function c63789924.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c63789924.target) - e1:SetOperation(c63789924.operation) - c:RegisterEffect(e1) - --Equip limit - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_EQUIP_LIMIT) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetValue(1) - c:RegisterEffect(e2) - --Check & Discard - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(63789924,0)) - e3:SetCategory(CATEGORY_HANDES) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e3:SetCode(EVENT_LEAVE_FIELD) - e3:SetCondition(c63789924.discon) - e3:SetTarget(c63789924.distg) - e3:SetOperation(c63789924.disop) - c:RegisterEffect(e3) -end -function c63789924.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c63789924.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,e:GetHandler(),tc) - end -end -function c63789924.discon(e,tp,eg,ep,ev,re,r,rp) - return bit.band(r,0x41)==0x41 and e:GetHandler():GetEquipTarget()~=nil and e:GetHandler():IsLocation(LOCATION_GRAVE) -end -function c63789924.distg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(tp) - Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,1-tp,1) -end -function c63789924.disop(e,tp,eg,ep,ev,re,r,rp) - local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) - local g=Duel.GetFieldGroup(p,0,LOCATION_HAND) - if g:GetCount()>0 then - Duel.ConfirmCards(p,g) - Duel.Hint(HINT_SELECTMSG,p,HINTMSG_DISCARD) - local sg=g:Select(p,1,1,nil) - Duel.SendtoGrave(sg,REASON_EFFECT+REASON_DISCARD) - Duel.ShuffleHand(1-p) - end -end diff --git a/script/c63804637.lua b/script/c63804637.lua deleted file mode 100644 index 37e3996d3b..0000000000 --- a/script/c63804637.lua +++ /dev/null @@ -1,44 +0,0 @@ ---幻奏のイリュージョン -function c63804637.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c63804637.target) - e1:SetOperation(c63804637.activate) - c:RegisterEffect(e1) -end -function c63804637.filter(c) - return c:IsFaceup() and c:IsSetCard(0x9b) -end -function c63804637.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c63804637.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c63804637.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c63804637.filter,tp,LOCATION_MZONE,0,1,1,nil) -end -function c63804637.activate(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsControler(tp) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_IMMUNE_EFFECT) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e1:SetValue(c63804637.efilter) - e1:SetOwnerPlayer(tp) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_EXTRA_ATTACK) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e2:SetValue(1) - tc:RegisterEffect(e2) - end -end -function c63804637.efilter(e,re) - return e:GetOwnerPlayer()~=re:GetOwnerPlayer() and re:IsActiveType(TYPE_SPELL+TYPE_TRAP) -end diff --git a/script/c63804806.lua b/script/c63804806.lua deleted file mode 100644 index 3b9c26a99c..0000000000 --- a/script/c63804806.lua +++ /dev/null @@ -1,81 +0,0 @@ ---スピード・キング☆スカル・フレイム -function c63804806.initial_effect(c) - c:EnableReviveLimit() - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c63804806.spcon) - e1:SetOperation(c63804806.spop) - c:RegisterEffect(e1) - --damage - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(63804806,0)) - e2:SetCategory(CATEGORY_DAMAGE) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetTarget(c63804806.damtg) - e2:SetOperation(c63804806.damop) - c:RegisterEffect(e2) - --special summon - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(63804806,1)) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e3:SetCode(EVENT_TO_GRAVE) - e3:SetCondition(c63804806.spcon2) - e3:SetTarget(c63804806.sptg2) - e3:SetOperation(c63804806.spop2) - c:RegisterEffect(e3) -end -function c63804806.spfilter(c) - return c:IsCode(99899504) and c:IsAbleToRemoveAsCost() -end -function c63804806.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c63804806.spfilter,tp,LOCATION_GRAVE,0,1,nil) -end -function c63804806.spop(e,tp,eg,ep,ev,re,r,rp,c) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c63804806.spfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c63804806.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_GRAVE,0,1,nil,26293219) end - local dam=Duel.GetMatchingGroupCount(Card.IsCode,tp,LOCATION_GRAVE,0,nil,26293219)*400 - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(dam) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,dam) -end -function c63804806.damop(e,tp,eg,ep,ev,re,r,rp) - local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) - local d=Duel.GetMatchingGroupCount(Card.IsCode,tp,LOCATION_GRAVE,0,nil,26293219)*400 - Duel.Damage(p,d,REASON_EFFECT) -end -function c63804806.spcon2(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) -end -function c63804806.spfilter2(c,e,tp) - return c:IsCode(99899504) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c63804806.sptg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c63804806.spfilter2(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c63804806.spfilter2,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c63804806.spfilter2,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c63804806.spop2(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c63806265.lua b/script/c63806265.lua deleted file mode 100644 index 57b3b09bba..0000000000 --- a/script/c63806265.lua +++ /dev/null @@ -1,38 +0,0 @@ ---虹の引力 -function c63806265.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_END_PHASE) - e1:SetCondition(c63806265.condition) - e1:SetTarget(c63806265.target) - e1:SetOperation(c63806265.activate) - c:RegisterEffect(e1) -end -function c63806265.cfilter(c) - return c:IsSetCard(0x1034) and (not c:IsOnField() or c:IsFaceup()) -end -function c63806265.condition(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c63806265.cfilter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,nil) - local ct=g:GetClassCount(Card.GetCode) - return ct>6 -end -function c63806265.filter(c,e,tp) - local code=c:GetCode() - return (code==79856792 or code==79407975) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) and not c:IsHasEffect(EFFECT_NECRO_VALLEY) -end -function c63806265.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c63806265.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,LOCATION_DECK+LOCATION_GRAVE) -end -function c63806265.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c63806265.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP) - end -end diff --git a/script/c63851864.lua b/script/c63851864.lua deleted file mode 100644 index c134c3da86..0000000000 --- a/script/c63851864.lua +++ /dev/null @@ -1,93 +0,0 @@ ---ブレイク・ドロー -function c63851864.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c63851864.target) - e1:SetOperation(c63851864.operation) - c:RegisterEffect(e1) - --Equip limit - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_EQUIP_LIMIT) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetValue(c63851864.eqlimit) - c:RegisterEffect(e2) - --draw - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(63851864,0)) - e3:SetCategory(CATEGORY_DRAW) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e3:SetCode(EVENT_BATTLE_DESTROYING) - e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e3:SetRange(LOCATION_SZONE) - e3:SetCondition(c63851864.drcon) - e3:SetTarget(c63851864.drtg) - e3:SetOperation(c63851864.drop) - c:RegisterEffect(e3) -end -function c63851864.eqlimit(e,c) - return c:IsRace(RACE_MACHINE) -end -function c63851864.filter(c) - return c:IsFaceup() and c:IsRace(RACE_MACHINE) -end -function c63851864.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c63851864.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c63851864.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - local c=e:GetHandler() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c63851864.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,c,1,0,0) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_SZONE) - e1:SetCondition(c63851864.descon) - e1:SetOperation(c63851864.desop) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END+RESET_SELF_TURN,3) - c:SetTurnCounter(0) - c:RegisterEffect(e1) -end -function c63851864.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,c,tc) - end -end -function c63851864.descon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c63851864.desop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local ct=c:GetTurnCounter() - ct=ct+1 - c:SetTurnCounter(ct) - if ct==3 then - Duel.Destroy(c,REASON_EFFECT) - end -end -function c63851864.drcon(e,tp,eg,ep,ev,re,r,rp) - local ec=eg:GetFirst() - local bc=ec:GetBattleTarget() - return e:GetHandler():GetEquipTarget()==eg:GetFirst() and ec:IsControler(tp) - and bc:IsLocation(LOCATION_GRAVE) and bc:IsReason(REASON_BATTLE) -end -function c63851864.drtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(1) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c63851864.drop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end diff --git a/script/c6387204.lua b/script/c6387204.lua deleted file mode 100644 index b518cb8c4f..0000000000 --- a/script/c6387204.lua +++ /dev/null @@ -1,98 +0,0 @@ ---CNo.6 先史遺産カオス・アトランタル -function c6387204.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,7,3) - c:EnableReviveLimit() - --equip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(6387204,0)) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetTarget(c6387204.eqtg) - e1:SetOperation(c6387204.eqop) - c:RegisterEffect(e1) - --lp - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(6387204,1)) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCondition(c6387204.lpcon) - e2:SetCost(c6387204.lpcost) - e2:SetOperation(c6387204.lpop) - c:RegisterEffect(e2) -end -c6387204.xyz_number=6 -function c6387204.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsAbleToChangeControler() end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingTarget(Card.IsAbleToChangeControler,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local g=Duel.SelectTarget(tp,Card.IsAbleToChangeControler,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0) -end -function c6387204.eqop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - if c:IsFaceup() and c:IsRelateToEffect(e) then - if not Duel.Equip(tp,tc,c,false) then return end - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_OWNER_RELATE) - e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(c6387204.eqlimit) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetProperty(EFFECT_FLAG_OWNER_RELATE+EFFECT_FLAG_IGNORE_IMMUNE) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetReset(RESET_EVENT+0x1fe0000) - e2:SetValue(1000) - tc:RegisterEffect(e2) - tc:RegisterFlagEffect(6387204,RESET_EVENT+0x1fe0000,0,0) - else Duel.SendtoGrave(tc,REASON_EFFECT) end - end - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetCode(EFFECT_CHANGE_DAMAGE) - e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e3:SetTargetRange(0,1) - e3:SetValue(0) - e3:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e3,tp) - local e4=e3:Clone() - e4:SetCode(EFFECT_NO_EFFECT_DAMAGE) - e4:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e4,tp) -end -function c6387204.eqlimit(e,c) - return e:GetOwner()==c -end -function c6387204.lpcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetLP(1-tp)~=100 and e:GetHandler():GetOverlayGroup():IsExists(Card.IsCode,1,nil,9161357) -end -function c6387204.filter(c) - return c:GetFlagEffect(6387204)~=0 and c:IsSetCard(0x48) and c:IsFaceup() and c:IsAbleToGraveAsCost() -end -function c6387204.lpcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,3,REASON_COST) - and e:GetHandler():GetEquipGroup():IsExists(c6387204.filter,1,nil) end - e:GetHandler():RemoveOverlayCard(tp,3,3,REASON_COST) - local g=e:GetHandler():GetEquipGroup():Filter(c6387204.filter,nil) - Duel.SendtoGrave(g,REASON_COST) -end -function c6387204.lpop(e,tp,eg,ep,ev,re,r,rp) - Duel.SetLP(1-tp,100) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CHANGE_DAMAGE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetTargetRange(0,1) - e1:SetValue(0) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) -end diff --git a/script/c63881033.lua b/script/c63881033.lua deleted file mode 100644 index 6ba457f729..0000000000 --- a/script/c63881033.lua +++ /dev/null @@ -1,123 +0,0 @@ ---マーシャリング・フィールド -function c63881033.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c63881033.lvtg1) - e1:SetOperation(c63881033.lvop) - c:RegisterEffect(e1) - --disable spsummon - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetRange(LOCATION_SZONE) - e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetTargetRange(1,0) - e2:SetTarget(c63881033.splimit) - c:RegisterEffect(e2) - --lv change - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(63881033,0)) - e3:SetType(EFFECT_TYPE_QUICK_O) - e3:SetCountLimit(1) - e3:SetRange(LOCATION_SZONE) - e3:SetCode(EVENT_FREE_CHAIN) - e3:SetTarget(c63881033.lvtg2) - e3:SetOperation(c63881033.lvop) - c:RegisterEffect(e3) - --destroy replace - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e4:SetCode(EFFECT_DESTROY_REPLACE) - e4:SetRange(LOCATION_SZONE) - e4:SetTarget(c63881033.reptg) - e4:SetValue(c63881033.repval) - e4:SetOperation(c63881033.repop) - c:RegisterEffect(e4) - --tohand - local e5=Effect.CreateEffect(c) - e5:SetDescription(aux.Stringid(63881033,3)) - e5:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e5:SetCode(EVENT_TO_GRAVE) - e5:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e5:SetCondition(c63881033.thcon) - e5:SetTarget(c63881033.thtg) - e5:SetOperation(c63881033.thop) - c:RegisterEffect(e5) -end -function c63881033.lvtg1(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - if Duel.IsExistingMatchingCard(c63881033.filter,tp,LOCATION_MZONE,0,1,nil) - and Duel.SelectYesNo(tp,aux.Stringid(63881033,4)) then - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(63881033,1)) - local lv=Duel.AnnounceNumber(tp,5,6,7,8,9) - e:SetLabel(lv) - e:GetHandler():RegisterFlagEffect(63881033,RESET_PHASE+PHASE_END,0,1) - else - e:SetLabel(0) - end -end -function c63881033.splimit(e,c) - return c:GetRace()~=RACE_MACHINE -end -function c63881033.filter(c) - return c:IsFaceup() and c:IsLevelAbove(5) and c:IsRace(RACE_MACHINE) -end -function c63881033.lvtg2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():GetFlagEffect(63881033)==0 - and Duel.IsExistingMatchingCard(c63881033.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(63881033,1)) - local lv=Duel.AnnounceNumber(tp,5,6,7,8,9) - e:SetLabel(lv) - e:GetHandler():RegisterFlagEffect(63881033,RESET_PHASE+PHASE_END,0,1) -end -function c63881033.lvop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) then return end - if e:GetLabel()==0 then return end - local g=Duel.GetMatchingGroup(c63881033.filter,tp,LOCATION_MZONE,0,nil) - local tc=g:GetFirst() - while tc do - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CHANGE_LEVEL_FINAL) - e1:SetValue(e:GetLabel()) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - tc=g:GetNext() - end -end -function c63881033.repfilter(c,tp) - return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) - and c:IsType(TYPE_XYZ) and c:IsRace(RACE_MACHINE) and not c:IsReason(REASON_REPLACE) -end -function c63881033.reptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return eg:IsExists(c63881033.repfilter,1,nil,tp) end - return Duel.SelectYesNo(tp,aux.Stringid(63881033,2)) -end -function c63881033.repval(e,c) - return c63881033.repfilter(c,e:GetHandlerPlayer()) -end -function c63881033.repop(e,tp,eg,ep,ev,re,r,rp) - Duel.SendtoGrave(e:GetHandler(),REASON_EFFECT) -end -function c63881033.thcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) -end -function c63881033.thfilter(c) - return c:IsCode(94220427) and c:IsAbleToHand() and not c:IsHasEffect(EFFECT_NECRO_VALLEY) -end -function c63881033.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c63881033.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE) -end -function c63881033.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c63881033.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c63883999.lua b/script/c63883999.lua deleted file mode 100644 index 1764a5cdcc..0000000000 --- a/script/c63883999.lua +++ /dev/null @@ -1,63 +0,0 @@ ---伏魔殿-悪魔の迷宮- -function c63883999.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --atkup - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(LOCATION_MZONE,0) - e2:SetTarget(aux.TargetBoolFunction(Card.IsRace,RACE_FIEND)) - e2:SetValue(500) - c:RegisterEffect(e2) - --spsummon - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(63883999,0)) - e3:SetCategory(CATEGORY_REMOVE+CATEGORY_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetRange(LOCATION_SZONE) - e3:SetCountLimit(1,63883999) - e3:SetTarget(c63883999.target) - e3:SetOperation(c63883999.operation) - c:RegisterEffect(e3) -end -function c63883999.filter(c,e,tp) - local lv=c:GetLevel() - return lv>0 and c:IsFaceup() and c:IsSetCard(0x45) - and Duel.IsExistingMatchingCard(c63883999.rfilter,tp,LOCATION_MZONE,0,1,c) - and Duel.IsExistingMatchingCard(c63883999.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_DECK,0,1,nil,lv,e,tp) -end -function c63883999.rfilter(c) - return c:IsFaceup() and c:IsRace(RACE_FIEND) and c:IsAbleToRemove() -end -function c63883999.spfilter(c,lv,e,tp) - return c:IsSetCard(0x45) and c:GetLevel()==lv and c:IsCanBeSpecialSummoned(e,0,tp,false,false) - and not c:IsHasEffect(EFFECT_NECRO_VALLEY) -end -function c63883999.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c63883999.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsExistingTarget(c63883999.filter,tp,LOCATION_MZONE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - Duel.SelectTarget(tp,c63883999.filter,tp,LOCATION_MZONE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_DECK) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_MZONE) -end -function c63883999.operation(e,tp,eg,ep,ev,re,r,rp,chk) - if not e:GetHandler():IsRelateToEffect(e) then return end - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local rg=Duel.SelectMatchingCard(tp,c63883999.rfilter,tp,LOCATION_MZONE,0,1,1,tc) - if rg:GetCount()>0 and Duel.Remove(rg,POS_FACEUP,REASON_EFFECT)>0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=Duel.SelectMatchingCard(tp,c63883999.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_DECK,0,1,1,nil,tc:GetLevel(),e,tp) - Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) - end - end -end diff --git a/script/c6390406.lua b/script/c6390406.lua deleted file mode 100644 index f54a39a42f..0000000000 --- a/script/c6390406.lua +++ /dev/null @@ -1,26 +0,0 @@ ---竜破壊の証 -function c6390406.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c6390406.target) - e1:SetOperation(c6390406.activate) - c:RegisterEffect(e1) -end -function c6390406.filter(c) - return c:IsCode(78193831) and c:IsAbleToHand() and not c:IsHasEffect(EFFECT_NECRO_VALLEY) -end -function c6390406.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c6390406.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE) -end -function c6390406.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c6390406.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c63942761.lua b/script/c63942761.lua deleted file mode 100644 index 109c263f32..0000000000 --- a/script/c63942761.lua +++ /dev/null @@ -1,33 +0,0 @@ ---リチュア・ノエリア -function c63942761.initial_effect(c) - --to hand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(63942761,0)) - e1:SetCategory(CATEGORY_TOGRAVE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c63942761.target) - e1:SetOperation(c63942761.operation) - c:RegisterEffect(e1) -end -function c63942761.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,5) end -end -function c63942761.filter(c) - return c:GetType()==0x82 or (c:IsSetCard(0x3a) and c:IsType(TYPE_MONSTER)) -end -function c63942761.operation(e,tp,eg,ep,ev,re,r,rp) - if not Duel.IsPlayerCanDiscardDeck(tp,5) then return end - Duel.ConfirmDecktop(tp,5) - local g=Duel.GetDecktopGroup(tp,5) - local sg=g:Filter(c63942761.filter,nil) - if sg:GetCount()>0 then - Duel.DisableShuffleCheck() - Duel.SendtoGrave(sg,REASON_EFFECT+REASON_REVEAL) - end - Duel.SortDecktop(tp,tp,5-sg:GetCount()) - for i=1,5-sg:GetCount() do - local mg=Duel.GetDecktopGroup(tp,1) - Duel.MoveSequence(mg:GetFirst(),1) - end -end diff --git a/script/c63948258.lua b/script/c63948258.lua deleted file mode 100644 index 7f1a432ba0..0000000000 --- a/script/c63948258.lua +++ /dev/null @@ -1,8 +0,0 @@ ---未知ガエル -function c63948258.initial_effect(c) - --Pierce - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_PIERCE) - c:RegisterEffect(e1) -end diff --git a/script/c63977008.lua b/script/c63977008.lua deleted file mode 100644 index 36abff9128..0000000000 --- a/script/c63977008.lua +++ /dev/null @@ -1,41 +0,0 @@ ---ジャンク・シンクロン -function c63977008.initial_effect(c) - --summon success - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(63977008,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c63977008.sumtg) - e1:SetOperation(c63977008.sumop) - c:RegisterEffect(e1) -end -function c63977008.filter(c,e,tp) - return c:IsLevelBelow(2) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c63977008.sumtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c63977008.filter(chkc,e,tp) end - if chk==0 then return Duel.IsExistingTarget(c63977008.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) - and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c63977008.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c63977008.sumop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP_DEFENCE) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e2) - end - Duel.SpecialSummonComplete() -end diff --git a/script/c63995093.lua b/script/c63995093.lua deleted file mode 100644 index 2ae7d20dc9..0000000000 --- a/script/c63995093.lua +++ /dev/null @@ -1,40 +0,0 @@ ---機械複製術 -function c63995093.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c63995093.target) - e1:SetOperation(c63995093.activate) - c:RegisterEffect(e1) -end -function c63995093.filter(c,e,tp) - return c:IsFaceup() and c:IsAttackBelow(500) and c:IsRace(RACE_MACHINE) - and Duel.IsExistingMatchingCard(c63995093.filter2,tp,LOCATION_DECK,0,1,nil,c:GetCode(),e,tp) -end -function c63995093.filter2(c,code,e,tp) - return c:IsCode(code) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c63995093.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c63995093.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c63995093.filter,tp,LOCATION_MZONE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(63995093,0)) - local g=Duel.SelectTarget(tp,c63995093.filter,tp,LOCATION_MZONE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c63995093.activate(e,tp,eg,ep,ev,re,r,rp) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ft<=0 then return end - if ft>2 then ft=2 end - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=Duel.SelectMatchingCard(tp,c63995093.filter2,tp,LOCATION_DECK,0,1,ft,nil,tc:GetCode(),e,tp) - if sg:GetCount()>0 then - Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) - end - end -end diff --git a/script/c64034255.lua b/script/c64034255.lua deleted file mode 100644 index 744a5dfe2b..0000000000 --- a/script/c64034255.lua +++ /dev/null @@ -1,52 +0,0 @@ ---A・ジェネクス・バードマン -function c64034255.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(64034255,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND) - e1:SetCost(c64034255.spcost) - e1:SetTarget(c64034255.sptg) - e1:SetOperation(c64034255.spop) - c:RegisterEffect(e1) -end -function c64034255.cfilter(c) - return c:IsFaceup() and c:IsAbleToHandAsCost() -end -function c64034255.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c64034255.cfilter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g=Duel.SelectMatchingCard(tp,c64034255.cfilter,tp,LOCATION_MZONE,0,1,1,nil) - if g:GetFirst():IsAttribute(ATTRIBUTE_WIND) then e:SetLabel(1) else e:SetLabel(0) end - Duel.SendtoHand(g,nil,REASON_COST) -end -function c64034255.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c64034255.spop(e,tp,eg,ep,ev,re,r,rp,c) - local c=e:GetHandler() - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - if not c:IsRelateToEffect(e) or not c:IsCanBeSpecialSummoned(e,0,tp,false,false) then return end - if e:GetLabel()==1 then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+0xfe0000) - e1:SetValue(500) - c:RegisterEffect(e1) - end - if Duel.SpecialSummonStep(c,0,tp,tp,false,false,POS_FACEUP) then - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetReset(RESET_EVENT+0x47e0000) - e2:SetValue(LOCATION_REMOVED) - c:RegisterEffect(e2,true) - end - Duel.SpecialSummonComplete() -end diff --git a/script/c64038662.lua b/script/c64038662.lua deleted file mode 100644 index 5a4aee8ac2..0000000000 --- a/script/c64038662.lua +++ /dev/null @@ -1,104 +0,0 @@ ---ヴァリュアブル・フォーム -function c64038662.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c64038662.eftg1) - e1:SetOperation(c64038662.efop) - c:RegisterEffect(e1) - --equip or spsummon - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetDescription(aux.Stringid(64038662,0)) - e2:SetRange(LOCATION_SZONE) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetTarget(c64038662.eftg2) - e2:SetOperation(c64038662.efop) - c:RegisterEffect(e2) -end -function c64038662.filter1(c) - return c:IsFaceup() and c:IsSetCard(0x56) -end -function c64038662.filter2(c,e,tp) - return c:IsFaceup() and c:IsSetCard(0x56) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c64038662.select(e,tp,b1,b2) - local op=0 - if b1 and b2 then - op=Duel.SelectOption(tp,aux.Stringid(64038662,2),aux.Stringid(64038662,3))+1 - elseif b1 then - op=Duel.SelectOption(tp,aux.Stringid(64038662,2))+1 - else op=Duel.SelectOption(tp,aux.Stringid(64038662,3))+2 end - e:SetLabel(op) - if op==1 then - e:SetCategory(CATEGORY_EQUIP) - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(64038662,4)) - local g1=Duel.SelectTarget(tp,c64038662.filter1,tp,LOCATION_MZONE,0,1,1,nil) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local g2=Duel.SelectTarget(tp,c64038662.filter1,tp,LOCATION_MZONE,0,1,1,g1:GetFirst()) - e:SetLabelObject(g1:GetFirst()) - else - e:SetCategory(CATEGORY_SPECIAL_SUMMON) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c64038662.filter2,tp,LOCATION_SZONE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) - end - e:GetHandler():RegisterFlagEffect(64038662,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) -end -function c64038662.eftg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then - if e:GetLabel()==0 or e:GetLabel()==1 then return false - else return chkc:IsLocation(LOCATION_SZONE) and chkc:IsControler(tp) and c64038662.filter2(chkc,e,tp) end - end - if chk==0 then return true end - local b1=Duel.IsExistingTarget(c64038662.filter1,tp,LOCATION_MZONE,0,2,nil) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - local b2=Duel.IsExistingTarget(c64038662.filter2,tp,LOCATION_SZONE,0,1,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - if (not b1 and not b2) or not Duel.SelectYesNo(tp,aux.Stringid(64038662,1)) then - e:SetProperty(0) - e:SetCategory(0) - e:SetLabel(0) - return - end - e:SetProperty(EFFECT_FLAG_CARD_TARGET) - c64038662.select(e,tp,b1,b2) -end -function c64038662.eftg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then - if e:GetLabel()==0 or e:GetLabel()==1 then return false - else return chkc:IsLocation(LOCATION_SZONE) and chkc:IsControler(tp) and c64038662.filter2(chkc,e,tp) end - end - local b1=Duel.IsExistingTarget(c64038662.filter1,tp,LOCATION_MZONE,0,2,nil) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - local b2=Duel.IsExistingTarget(c64038662.filter2,tp,LOCATION_SZONE,0,1,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - if chk==0 then return e:GetHandler():GetFlagEffect(64038662)==0 and (b1 or b2) end - c64038662.select(e,tp,b1,b2) -end -function c64038662.efop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - if e:GetLabel()==0 then return - elseif e:GetLabel()==1 then - local tc1=e:GetLabelObject() - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local tc2=g:GetFirst() - if tc1==tc2 then tc2=g:GetNext() end - if tc1:IsFaceup() and tc2:IsFaceup() and tc1:IsRelateToEffect(e) and tc2:IsRelateToEffect(e) and Duel.Equip(tp,tc1,tc2,false) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(c64038662.eqlimit) - e1:SetLabelObject(tc2) - tc1:RegisterEffect(e1) - end - else - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENCE) - end - end -end -function c64038662.eqlimit(e,c) - return c==e:GetLabelObject() -end diff --git a/script/c64047146.lua b/script/c64047146.lua deleted file mode 100644 index 533a7dcd38..0000000000 --- a/script/c64047146.lua +++ /dev/null @@ -1,66 +0,0 @@ ---一角獣のホーン -function c64047146.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c64047146.target) - e1:SetOperation(c64047146.operation) - c:RegisterEffect(e1) - --atk up - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(700) - c:RegisterEffect(e2) - --def up - local e3=e2:Clone() - e3:SetCode(EFFECT_UPDATE_DEFENCE) - c:RegisterEffect(e3) - --Equip limit - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetCode(EFFECT_EQUIP_LIMIT) - e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e4:SetValue(1) - c:RegisterEffect(e4) - --to deck - local e5=Effect.CreateEffect(c) - e5:SetDescription(aux.Stringid(64047146,0)) - e5:SetCategory(CATEGORY_TODECK) - e5:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e5:SetCode(EVENT_TO_GRAVE) - e5:SetCondition(c64047146.tdcon) - e5:SetTarget(c64047146.tdtg) - e5:SetOperation(c64047146.tdop) - c:RegisterEffect(e5) -end -function c64047146.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c64047146.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,c,tc) - end -end -function c64047146.tdcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) -end -function c64047146.tdtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0) -end -function c64047146.tdop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - Duel.SendtoDeck(e:GetHandler(),nil,0,REASON_EFFECT) - end -end diff --git a/script/c64107820.lua b/script/c64107820.lua deleted file mode 100644 index c7a972a8d3..0000000000 --- a/script/c64107820.lua +++ /dev/null @@ -1,37 +0,0 @@ ---フューチャー・グロウ -function c64107820.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c64107820.cost) - e1:SetOperation(c64107820.operation) - c:RegisterEffect(e1) - --atk up - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(LOCATION_MZONE,0) - e2:SetTarget(aux.TargetBoolFunction(Card.IsRace,RACE_PSYCHO)) - e2:SetValue(c64107820.val) - c:RegisterEffect(e2) - e1:SetLabelObject(e2) -end -function c64107820.cfilter(c) - return c:IsRace(RACE_PSYCHO) and c:IsAbleToRemoveAsCost() -end -function c64107820.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c64107820.cfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c64107820.cfilter,tp,LOCATION_GRAVE,0,1,1,nil) - e:SetLabel(g:GetFirst():GetLevel()*200) - e:GetLabelObject():SetLabel(0) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c64107820.operation(e,tp,eg,ep,ev,re,r,rp) - e:GetLabelObject():SetLabel(e:GetLabel()) -end -function c64107820.val(e,c) - return e:GetLabel() -end diff --git a/script/c64145892.lua b/script/c64145892.lua deleted file mode 100644 index 7580f92daf..0000000000 --- a/script/c64145892.lua +++ /dev/null @@ -1,16 +0,0 @@ ---フォトン・サークラー -function c64145892.initial_effect(c) - --damage reduce - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE) - e1:SetCode(EVENT_PRE_BATTLE_DAMAGE) - e1:SetCondition(c64145892.rdcon) - e1:SetOperation(c64145892.rdop) - c:RegisterEffect(e1) -end -function c64145892.rdcon(e,tp,eg,ep,ev,re,r,rp) - return ep==tp -end -function c64145892.rdop(e,tp,eg,ep,ev,re,r,rp) - Duel.ChangeBattleDamage(ep,ev/2) -end diff --git a/script/c64160836.lua b/script/c64160836.lua deleted file mode 100644 index 404a05a890..0000000000 --- a/script/c64160836.lua +++ /dev/null @@ -1,45 +0,0 @@ ---エーリアン・キッズ -function c64160836.initial_effect(c) - --counter - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetOperation(c64160836.ctop) - c:RegisterEffect(e1) - --atk def - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_DAMAGE_CALCULATING) - e2:SetRange(LOCATION_MZONE) - e2:SetOperation(c64160836.adval) - c:RegisterEffect(e2) -end -function c64160836.ctop(e,tp,eg,ep,ev,re,r,rp) - local tc=eg:GetFirst() - while tc do - if tc:IsFaceup() and tc:IsControler(1-tp) then - tc:AddCounter(0xe,1) - end - tc=eg:GetNext() - end -end -function c64160836.addown(c,e) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_PHASE+RESET_DAMAGE_CAL) - e1:SetValue(c:GetCounter(0xe)*-300) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_UPDATE_DEFENCE) - c:RegisterEffect(e2) -end -function c64160836.adval(e,tp,eg,ep,ev,re,r,rp) - local a=Duel.GetAttacker() - local d=Duel.GetAttackTarget() - if not d then return end - if a:GetCounter(0xe)>0 and d:IsSetCard(0xc) then c64160836.addown(a,e) end - if d:GetCounter(0xe)>0 and a:IsSetCard(0xc) then c64160836.addown(d,e) end -end diff --git a/script/c64161630.lua b/script/c64161630.lua deleted file mode 100644 index 5f84c720f3..0000000000 --- a/script/c64161630.lua +++ /dev/null @@ -1,60 +0,0 @@ ---パージ・レイ -function c64161630.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c64161630.cost) - e1:SetTarget(c64161630.target) - e1:SetOperation(c64161630.activate) - c:RegisterEffect(e1) -end -function c64161630.cfilter(c,e,tp) - local rk=c:GetRank() - return rk>1 and c:IsType(TYPE_XYZ) - and Duel.IsExistingMatchingCard(c64161630.filter,tp,LOCATION_EXTRA,0,1,nil,rk-1,c:GetRace(),e,tp) -end -function c64161630.filter(c,rk,rc,e,tp) - return c:IsType(TYPE_XYZ) and c:IsSetCard(0x48) - and c:GetRank()==rk and c:IsRace(rc) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c64161630.cost(e,tp,eg,ep,ev,re,r,rp,chk) - e:SetLabel(100) - if chk==0 then return Duel.CheckReleaseGroup(tp,c64161630.cfilter,1,nil,e,tp) end - local g=Duel.SelectReleaseGroup(tp,c64161630.cfilter,1,1,nil,e,tp) - e:SetLabel(g:GetFirst():GetRank()) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetReset(RESET_PHASE+PHASE_END) - e1:SetLabel(g:GetFirst():GetRace()) - Duel.RegisterEffect(e1,tp) - e:SetLabelObject(e1) - Duel.Release(g,REASON_COST) -end -function c64161630.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - if e:GetLabel()~=100 then return false end - e:SetLabel(0) - return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - end -end -function c64161630.activate(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetCountLimit(1) - e1:SetOperation(c64161630.spop) - e1:SetReset(RESET_PHASE+PHASE_END) - e1:SetLabel(e:GetLabel()) - e1:SetLabelObject(e:GetLabelObject()) - Duel.RegisterEffect(e1,tp) -end -function c64161630.spop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_CARD,0,64161630) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local rk=e:GetLabel() - local rc=e:GetLabelObject():GetLabel() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c64161630.filter,tp,LOCATION_EXTRA,0,1,1,nil,rk-1,rc,e,tp) - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) -end diff --git a/script/c64163367.lua b/script/c64163367.lua deleted file mode 100644 index 68f76bbf76..0000000000 --- a/script/c64163367.lua +++ /dev/null @@ -1,41 +0,0 @@ ---「A」細胞培養装置 -function c64163367.initial_effect(c) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --counter1 - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetRange(LOCATION_SZONE) - e2:SetCode(EVENT_REMOVE_COUNTER+0xe) - e2:SetOperation(c64163367.ctop1) - c:RegisterEffect(e2) - --counter2 - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(64163367,0)) - e2:SetCategory(CATEGORY_COUNTER) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_LEAVE_FIELD) - e2:SetCondition(c64163367.ctcon2) - e2:SetOperation(c64163367.ctop2) - c:RegisterEffect(e2) -end -function c64163367.ctop1(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():AddCounter(0xe,1) -end -function c64163367.ctcon2(e,tp,eg,ep,ev,re,r,rp) - local ct=e:GetHandler():GetCounter(0xe) - e:SetLabel(ct) - return e:GetHandler():IsReason(REASON_DESTROY) and ct>0 -end -function c64163367.ctop2(e,tp,eg,ep,ev,re,r,rp) - local ct=e:GetLabel() - local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - if g:GetCount()==0 then return end - for i=1,ct do - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(64163367,1)) - local sg=g:Select(tp,1,1,nil) - sg:GetFirst():AddCounter(0xe,1) - end -end diff --git a/script/c6417578.lua b/script/c6417578.lua deleted file mode 100644 index ee24e967b6..0000000000 --- a/script/c6417578.lua +++ /dev/null @@ -1,80 +0,0 @@ ---神の写し身との接触 -function c6417578.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_END_PHASE) - e1:SetCountLimit(1,6417578+EFFECT_COUNT_CODE_OATH) - e1:SetTarget(c6417578.target) - e1:SetOperation(c6417578.activate) - c:RegisterEffect(e1) -end -function c6417578.filter1(c,e) - return c:IsCanBeFusionMaterial() and not c:IsImmuneToEffect(e) -end -function c6417578.filter2(c,e,tp,m,f,chkf) - return c:IsType(TYPE_FUSION) and c:IsSetCard(0x9d) and (not f or f(c)) - and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf) -end -function c6417578.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp - local mg1=Duel.GetMatchingGroup(Card.IsCanBeFusionMaterial,tp,LOCATION_HAND+LOCATION_MZONE,0,nil) - local res=Duel.IsExistingMatchingCard(c6417578.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf) - if not res then - local ce=Duel.GetChainMaterial(tp) - if ce~=nil then - local fgroup=ce:GetTarget() - local mg2=fgroup(ce,e,tp) - local mf=ce:GetValue() - res=Duel.IsExistingMatchingCard(c6417578.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,chkf) - end - end - return res - end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function c6417578.activate(e,tp,eg,ep,ev,re,r,rp) - local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp - local mg1=Duel.GetMatchingGroup(c6417578.filter1,tp,LOCATION_HAND+LOCATION_MZONE,0,nil,e) - local sg1=Duel.GetMatchingGroup(c6417578.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf) - local mg2=nil - local sg2=nil - local ce=Duel.GetChainMaterial(tp) - if ce~=nil then - local fgroup=ce:GetTarget() - mg2=fgroup(ce,e,tp) - local mf=ce:GetValue() - sg2=Duel.GetMatchingGroup(c6417578.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,mf,chkf) - end - if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then - local sg=sg1:Clone() - if sg2 then sg:Merge(sg2) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local tg=sg:Select(tp,1,1,nil) - local tc=tg:GetFirst() - if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then - local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf) - tc:SetMaterial(mat1) - Duel.SendtoGrave(mat1,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION) - Duel.BreakEffect() - Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP) - else - local mat2=Duel.SelectFusionMaterial(tp,tc,mg2,nil,chkf) - local fop=ce:GetOperation() - fop(ce,e,tp,tc,mat2) - end - tc:CompleteProcedure() - else - local cg1=Duel.GetFieldGroup(tp,LOCATION_HAND+LOCATION_MZONE,0) - local cg2=Duel.GetFieldGroup(tp,LOCATION_EXTRA,0) - if cg1:GetCount()>1 and cg2:IsExists(Card.IsFacedown,1,nil) - and Duel.IsPlayerCanSpecialSummon(tp) and not Duel.IsPlayerAffectedByEffect(tp,27581098) then - Duel.ConfirmCards(1-tp,cg1) - Duel.ConfirmCards(1-tp,cg2) - Duel.ShuffleHand(tp) - end - end -end diff --git a/script/c64187086.lua b/script/c64187086.lua deleted file mode 100644 index 463d93bd0e..0000000000 --- a/script/c64187086.lua +++ /dev/null @@ -1,42 +0,0 @@ ---地縛神の復活 -function c64187086.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c64187086.cost) - e1:SetTarget(c64187086.target) - e1:SetOperation(c64187086.activate) - c:RegisterEffect(e1) -end -function c64187086.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) -end -function c64187086.filter1(c) - return c:IsSetCard(0x21) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() -end -function c64187086.filter2(c) - return c:IsType(TYPE_FIELD) and c:IsAbleToHand() -end -function c64187086.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - if chk==0 then return Duel.IsExistingTarget(c64187086.filter1,tp,LOCATION_GRAVE,0,1,nil) - and Duel.IsExistingTarget(c64187086.filter2,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g1=Duel.SelectTarget(tp,c64187086.filter1,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g2=Duel.SelectTarget(tp,c64187086.filter2,tp,LOCATION_GRAVE,0,1,1,nil) - g1:Merge(g2) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g1,2,0,0) -end -function c64187086.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local sg=g:Filter(Card.IsRelateToEffect,nil,e) - if sg:GetCount()>0 then - Duel.SendtoHand(sg,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,sg) - end -end diff --git a/script/c64203620.lua b/script/c64203620.lua deleted file mode 100644 index a6b027e6f9..0000000000 --- a/script/c64203620.lua +++ /dev/null @@ -1,59 +0,0 @@ ---極星邪竜ヨルムンガンド -function c64203620.initial_effect(c) - c:EnableReviveLimit() - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(64203620,0)) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_SPSUM_PARAM) - e1:SetRange(LOCATION_HAND) - e1:SetTargetRange(POS_FACEUP_DEFENCE,1) - e1:SetCondition(c64203620.spcon) - c:RegisterEffect(e1) - --self destory - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e4:SetRange(LOCATION_MZONE) - e4:SetCode(EFFECT_SELF_DESTROY) - e4:SetCondition(c64203620.descon) - c:RegisterEffect(e4) - --damage - local e5=Effect.CreateEffect(c) - e5:SetDescription(aux.Stringid(64203620,1)) - e5:SetCategory(CATEGORY_DAMAGE) - e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e5:SetProperty(EFFECT_FLAG_NO_TURN_RESET) - e5:SetCode(EVENT_CHANGE_POS) - e5:SetCountLimit(1) - e5:SetCondition(c64203620.damcon) - e5:SetTarget(c64203620.damtg) - e5:SetOperation(c64203620.damop) - c:RegisterEffect(e5) -end -function c64203620.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c64203620.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) -end -function c64203620.filter(c) - return c:IsFaceup() and c:IsSetCard(0x4b) -end -function c64203620.descon(e) - return not Duel.IsExistingMatchingCard(c64203620.filter,0,LOCATION_MZONE,LOCATION_MZONE,1,nil) -end -function c64203620.damcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPosition(POS_FACEUP_ATTACK) and e:GetHandler():IsPreviousPosition(POS_FACEUP_DEFENCE) -end -function c64203620.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(3000) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,tp,3000) -end -function c64203620.damop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c64238008.lua b/script/c64238008.lua deleted file mode 100644 index 9ed18469c2..0000000000 --- a/script/c64238008.lua +++ /dev/null @@ -1,52 +0,0 @@ ---リニアキャノン -function c64238008.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c64238008.cost) - e1:SetTarget(c64238008.target) - e1:SetOperation(c64238008.activate) - c:RegisterEffect(e1) - Duel.AddCustomActivityCounter(64238008,ACTIVITY_CHAIN,c64238008.chainfilter) -end -function c64238008.chainfilter(re,tp,cid) - return not (re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL)) -end -function c64238008.cost(e,tp,eg,ep,ev,re,r,rp,chk) - e:SetLabel(1) - if chk==0 then return Duel.GetCustomActivityCount(64238008,tp,ACTIVITY_CHAIN)==0 and Duel.CheckReleaseGroup(tp,nil,1,nil) end - local g=Duel.SelectReleaseGroup(tp,nil,1,1,nil) - local atk=g:GetFirst():GetTextAttack()/2 - if atk<0 then atk=0 end - e:SetLabel(atk) - Duel.Release(g,REASON_COST) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EFFECT_CANNOT_ACTIVATE) - e1:SetTargetRange(1,1) - e1:SetValue(c64238008.aclimit) - e1:SetReset(RESET_PHASE+PHASE_END,1) - Duel.RegisterEffect(e1,tp) -end -function c64238008.aclimit(e,re,tp) - return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL) -end -function c64238008.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local res=e:GetLabel()~=0 - e:SetLabel(0) - return res - end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(e:GetLabel()) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,e:GetLabel()) - e:SetLabel(0) -end -function c64238008.activate(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c64245689.lua b/script/c64245689.lua deleted file mode 100644 index 7d4f119327..0000000000 --- a/script/c64245689.lua +++ /dev/null @@ -1,65 +0,0 @@ ---メリアスの木霊 -function c64245689.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_EARTH),3,2) - c:EnableReviveLimit() - --to grave - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(64245689,0)) - e1:SetCategory(CATEGORY_TOGRAVE) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE) - e1:SetCost(c64245689.cost) - e1:SetTarget(c64245689.tgtg) - e1:SetOperation(c64245689.tgop) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(64245689,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE) - e2:SetCost(c64245689.cost) - e2:SetTarget(c64245689.sptg) - e2:SetOperation(c64245689.spop) - c:RegisterEffect(e2) -end -function c64245689.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c64245689.tgfilter(c) - return c:IsRace(RACE_PLANT) and c:IsAbleToGrave() -end -function c64245689.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c64245689.tgfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) -end -function c64245689.tgop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c64245689.tgfilter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoGrave(g,REASON_EFFECT) - end -end -function c64245689.spfilter(c,e,tp) - return c:IsRace(RACE_PLANT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c64245689.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c64245689.spfilter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c64245689.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c64245689.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c64245689.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENCE) - end -end diff --git a/script/c64262809.lua b/script/c64262809.lua deleted file mode 100644 index b57b8c56cc..0000000000 --- a/script/c64262809.lua +++ /dev/null @@ -1,39 +0,0 @@ ---ドラゴン・アイス -function c64262809.initial_effect(c) - c:SetUniqueOnField(1,1,64262809) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(64262809,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_CHAIN_UNIQUE) - e1:SetRange(LOCATION_HAND+LOCATION_GRAVE) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(c64262809.spcon) - e1:SetCost(c64262809.spcost) - e1:SetTarget(c64262809.sptg) - e1:SetOperation(c64262809.spop) - c:RegisterEffect(e1) -end -function c64262809.cfilter(c,tp) - return c:GetSummonPlayer()==1-tp -end -function c64262809.spcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c64262809.cfilter,1,nil,tp) -end -function c64262809.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - local exc=(e:GetHandler():IsLocation(LOCATION_HAND) and not e:GetHandler():IsAbleToGraveAsCost()) and e:GetHandler() or nil - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,exc) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD,exc) -end -function c64262809.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c64262809.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsLocation(LOCATION_HAND+LOCATION_GRAVE) then - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c64268668.lua b/script/c64268668.lua deleted file mode 100644 index e2caf88a3d..0000000000 --- a/script/c64268668.lua +++ /dev/null @@ -1,62 +0,0 @@ ---サイバー・オーガ -function c64268668.initial_effect(c) - --atkup - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(64268668,0)) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetHintTiming(TIMING_BATTLE_PHASE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c64268668.atkcon) - e1:SetCost(c64268668.atkcost) - e1:SetTarget(c64268668.atktg) - e1:SetOperation(c64268668.atkop) - c:RegisterEffect(e1) -end -function c64268668.atkcon(e,tp,eg,ep,ev,re,r,rp) - local a=Duel.GetAttacker() - local d=Duel.GetAttackTarget() - return Duel.GetCurrentPhase()==PHASE_BATTLE - and ((a and a:IsControler(tp) and a:IsFaceup() and a:IsCode(64268668)) - or (d and d:IsControler(tp) and d:IsFaceup() and d:IsCode(64268668))) -end -function c64268668.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD) -end -function c64268668.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - local a=Duel.GetAttacker() - local d=Duel.GetAttackTarget() - if chk==0 then - if a:IsControler(tp) then return a:IsCanBeEffectTarget(e) - else return d:IsCanBeEffectTarget(e) end - end - if a:IsControler(tp) then return Duel.SetTargetCard(a) - else return Duel.SetTargetCard(d) end -end -function c64268668.atkop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.NegateAttack() - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(2000) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_DAMAGE_STEP_END) - e2:SetReset(RESET_EVENT+0x1fe0000) - e2:SetOperation(c64268668.resetop) - e2:SetLabelObject(e1) - tc:RegisterEffect(e2) - end -end -function c64268668.resetop(e,tp,eg,ep,ev,re,r,rp) - e:GetLabelObject():Reset() - e:Reset() -end diff --git a/script/c64274292.lua b/script/c64274292.lua deleted file mode 100644 index f328f6f6b2..0000000000 --- a/script/c64274292.lua +++ /dev/null @@ -1,21 +0,0 @@ ---メテオ・レイン -function c64274292.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c64274292.condition) - e1:SetOperation(c64274292.activate) - c:RegisterEffect(e1) -end -function c64274292.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c64274292.activate(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_PIERCE) - e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) -end diff --git a/script/c64283880.lua b/script/c64283880.lua deleted file mode 100644 index 613d024c28..0000000000 --- a/script/c64283880.lua +++ /dev/null @@ -1,45 +0,0 @@ ---ガードゴー! -function c64283880.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetTarget(c64283880.sptg) - e1:SetOperation(c64283880.spop) - c:RegisterEffect(e1) -end -function c64283880.filter(c,e,tp) - return c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE+REASON_EFFECT) - and c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousPosition(POS_FACEUP) - and c:GetPreviousControler()==tp and (c:IsSetCard(0x54) or c:IsSetCard(0x82) or c:IsSetCard(0x59)) - and c:IsCanBeEffectTarget(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c64283880.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return eg:IsContains(chkc) and c64283880.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and eg:IsExists(c64283880.filter,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=eg:FilterSelect(tp,c64283880.filter,1,1,nil,e,tp) - Duel.SetTargetCard(g) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c64283880.spfilter(c,e,tp) - return (c:IsSetCard(0x54) or c:IsSetCard(0x82) or c:IsSetCard(0x59)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c64283880.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)~=0 then - local ct=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ct<=0 then return end - local g=Duel.GetMatchingGroup(c64283880.spfilter,tp,LOCATION_HAND,0,nil,e,tp) - if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(64283880,0)) then - Duel.BreakEffect() - if ct>2 then ct=2 end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=g:Select(tp,1,ct,nil) - Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP_DEFENCE) - end - end -end diff --git a/script/c64306248.lua b/script/c64306248.lua deleted file mode 100644 index 512242731b..0000000000 --- a/script/c64306248.lua +++ /dev/null @@ -1,23 +0,0 @@ ---髑髏顔・天道虫 -function c64306248.initial_effect(c) - --recover - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(64306248,0)) - e1:SetCategory(CATEGORY_RECOVER) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetTarget(c64306248.target) - e1:SetOperation(c64306248.operation) - c:RegisterEffect(e1) -end -function c64306248.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(1000) - Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,1000) -end -function c64306248.operation(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Recover(p,d,REASON_EFFECT) -end diff --git a/script/c6430659.lua b/script/c6430659.lua deleted file mode 100644 index c11a6b188e..0000000000 --- a/script/c6430659.lua +++ /dev/null @@ -1,55 +0,0 @@ ---ウィルスメール -function c6430659.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --direct attack - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(6430659,0)) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetRange(LOCATION_SZONE) - e2:SetCountLimit(1) - e2:SetCondition(c6430659.atcon) - e2:SetTarget(c6430659.attg) - e2:SetOperation(c6430659.atop) - c:RegisterEffect(e2) -end -function c6430659.atcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsAbleToEnterBP() -end -function c6430659.filter(c) - return c:IsFaceup() and c:IsLevelBelow(4) and c:IsAttackable() and not c:IsHasEffect(EFFECT_DIRECT_ATTACK) -end -function c6430659.attg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c6430659.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c6430659.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c6430659.filter,tp,LOCATION_MZONE,0,1,1,nil) -end -function c6430659.atop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) then return end - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DIRECT_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_PHASE+PHASE_BATTLE) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e2:SetOperation(c6430659.tgop) - tc:RegisterEffect(e2) - end -end -function c6430659.tgop(e,tp,eg,ep,ev,re,r,rp) - Duel.SendtoGrave(e:GetHandler(),REASON_EFFECT) -end diff --git a/script/c64319467.lua b/script/c64319467.lua deleted file mode 100644 index 5fade4c4b6..0000000000 --- a/script/c64319467.lua +++ /dev/null @@ -1,61 +0,0 @@ ---ダブルフィン・シャーク -function c64319467.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(64319467,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetCost(c64319467.spcost) - e1:SetTarget(c64319467.sptg) - e1:SetOperation(c64319467.spop) - c:RegisterEffect(e1) - Duel.AddCustomActivityCounter(64319467,ACTIVITY_SPSUMMON,c64319467.counterfilter) -end -function c64319467.counterfilter(c) - return c:IsAttribute(ATTRIBUTE_WATER) -end -function c64319467.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetCustomActivityCount(64319467,tp,ACTIVITY_SPSUMMON)==0 end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) - e1:SetTargetRange(1,0) - e1:SetTarget(c64319467.splimit) - Duel.RegisterEffect(e1,tp) -end -function c64319467.splimit(e,c) - return c:GetAttribute()~=ATTRIBUTE_WATER -end -function c64319467.filter(c,e,tp) - local lv=c:GetLevel() - return (lv==3 or lv==4) and c:IsRace(RACE_FISH) and c:IsAttribute(ATTRIBUTE_WATER) - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c64319467.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c64319467.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c64319467.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c64319467.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c64319467.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP_DEFENCE) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e2) - Duel.SpecialSummonComplete() - end -end diff --git a/script/c64332231.lua b/script/c64332231.lua deleted file mode 100644 index 688ce3f747..0000000000 --- a/script/c64332231.lua +++ /dev/null @@ -1,38 +0,0 @@ ---聖刻神龍-エネアード -function c64332231.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,8,2) - c:EnableReviveLimit() - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(64332231,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCost(c64332231.descost) - e1:SetTarget(c64332231.destg) - e1:SetOperation(c64332231.desop) - c:RegisterEffect(e1) -end -function c64332231.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c64332231.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroupEx(tp,Card.IsReleasableByEffect,1,nil) - and Duel.IsExistingMatchingCard(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end - local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c64332231.desop(e,tp,eg,ep,ev,re,r,rp) - local ct1=Duel.GetMatchingGroupCount(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) - local rg=Duel.SelectReleaseGroupEx(tp,Card.IsReleasableByEffect,1,ct1,nil) - local ct2=Duel.Release(rg,REASON_EFFECT) - if ct2==0 then return end - Duel.BreakEffect() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local dg=Duel.SelectMatchingCard(tp,Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,ct2,ct2,nil) - Duel.HintSelection(dg) - Duel.Destroy(dg,REASON_EFFECT) -end diff --git a/script/c64335804.lua b/script/c64335804.lua deleted file mode 100644 index dcee4f2377..0000000000 --- a/script/c64335804.lua +++ /dev/null @@ -1,27 +0,0 @@ ---レッドアイズ・ブラックメタルドラゴン -function c64335804.initial_effect(c) - c:EnableReviveLimit() - --spsummon proc - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_DECK) - e1:SetCondition(c64335804.spcon) - e1:SetOperation(c64335804.spop) - c:RegisterEffect(e1) -end -function c64335804.spfilter(c) - return c:IsCode(74677422) and c:GetEquipGroup():IsExists(Card.IsCode,1,nil,68540058) -end -function c64335804.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.CheckReleaseGroup(tp,c64335804.spfilter,1,nil) -end -function c64335804.spop(e,tp,eg,ep,ev,re,r,rp,c) - local g=Duel.SelectReleaseGroup(tp,c64335804.spfilter,1,1,nil) - Duel.Release(g,REASON_COST) - Duel.ShuffleDeck(tp) -end diff --git a/script/c64342551.lua b/script/c64342551.lua deleted file mode 100644 index 00921f7c90..0000000000 --- a/script/c64342551.lua +++ /dev/null @@ -1,15 +0,0 @@ ---水陸両用バグロス MK-3 -function c64342551.initial_effect(c) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DIRECT_ATTACK) - e1:SetCondition(c64342551.dircon) - c:RegisterEffect(e1) -end -function c64342551.filter(c) - return c:IsFaceup() and c:IsCode(22702055) -end -function c64342551.dircon(e) - return Duel.IsExistingMatchingCard(c64342551.filter,0,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) - or Duel.IsEnvironment(22702055) -end diff --git a/script/c64373401.lua b/script/c64373401.lua deleted file mode 100644 index d279656bb5..0000000000 --- a/script/c64373401.lua +++ /dev/null @@ -1,71 +0,0 @@ ---超重武者ホラガ-E -function c64373401.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c64373401.hspcon) - e1:SetValue(1) - c:RegisterEffect(e1) - --spsummon limit - local e2=Effect.CreateEffect(c) - e2:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetCondition(c64373401.hspcon2) - e2:SetOperation(c64373401.hspop) - c:RegisterEffect(e2) - --spsummon - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(64373401,0)) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_BE_MATERIAL) - e3:SetCondition(c64373401.spcon) - e3:SetTarget(c64373401.sptg) - e3:SetOperation(c64373401.spop) - c:RegisterEffect(e3) -end -function c64373401.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) -end -function c64373401.hspcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and not Duel.IsExistingMatchingCard(c64373401.filter,tp,LOCATION_GRAVE,0,1,nil) -end -function c64373401.hspcon2(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+1 -end -function c64373401.hspop(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetTargetRange(1,0) - e1:SetTarget(c64373401.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function c64373401.splimit(e,c,sump,sumtype,sumpos,targetp,se) - return not c:IsSetCard(0x9a) -end -function c64373401.spcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsLocation(LOCATION_GRAVE) and r==REASON_SUMMON and c:GetReasonCard():IsSetCard(0x9a) - and not Duel.IsExistingMatchingCard(c64373401.filter,tp,LOCATION_GRAVE,0,1,nil) -end -function c64373401.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c64373401.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c64379261.lua b/script/c64379261.lua deleted file mode 100644 index 30f588e511..0000000000 --- a/script/c64379261.lua +++ /dev/null @@ -1,27 +0,0 @@ ---ゴルゴニック・ガーゴイル -function c64379261.initial_effect(c) - --summon success - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(64379261,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c64379261.spcon) - e1:SetTarget(c64379261.sptg) - e1:SetOperation(c64379261.spop) - c:RegisterEffect(e1) -end -function c64379261.spcon(e,tp,eg,ep,ev,re,r,rp) - return ep==tp and eg:GetFirst():IsRace(RACE_ROCK) -end -function c64379261.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c64379261.spop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c64379430.lua b/script/c64379430.lua deleted file mode 100644 index 7b15085178..0000000000 --- a/script/c64379430.lua +++ /dev/null @@ -1,45 +0,0 @@ ---終焉の精霊 -function c64379430.initial_effect(c) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_SET_ATTACK) - e1:SetValue(c64379430.value) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EFFECT_SET_DEFENCE) - e2:SetValue(c64379430.value) - c:RegisterEffect(e2) - --return - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(64379430,0)) - e3:SetCategory(CATEGORY_TOGRAVE) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e3:SetCode(EVENT_TO_GRAVE) - e3:SetCondition(c64379430.retcon) - e3:SetTarget(c64379430.rettg) - e3:SetOperation(c64379430.retop) - c:RegisterEffect(e3) -end -function c64379430.filter(c) - return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_DARK) -end -function c64379430.value(e,c) - return Duel.GetMatchingGroupCount(c64379430.filter,0,LOCATION_REMOVED,LOCATION_REMOVED,nil)*300 -end -function c64379430.retcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsReason(REASON_DESTROY) -end -function c64379430.rettg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local g=Duel.GetMatchingGroup(c64379430.filter,0,LOCATION_REMOVED,LOCATION_REMOVED,nil) - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,g:GetCount(),0,0) -end -function c64379430.retop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c64379430.filter,0,LOCATION_REMOVED,LOCATION_REMOVED,nil) - Duel.SendtoGrave(g,REASON_EFFECT+REASON_RETURN) -end diff --git a/script/c64382839.lua b/script/c64382839.lua deleted file mode 100644 index d3cb9c63f6..0000000000 --- a/script/c64382839.lua +++ /dev/null @@ -1,50 +0,0 @@ ---ゼータ・レティキュラント -function c64382839.initial_effect(c) - --token - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(64382839,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetRange(LOCATION_GRAVE) - e1:SetCode(EVENT_REMOVE) - e1:SetCondition(c64382839.spcon) - e1:SetTarget(c64382839.sptg) - e1:SetOperation(c64382839.spop) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_SPSUMMON_PROC) - e2:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e2:SetRange(LOCATION_HAND) - e2:SetCondition(c64382839.hspcon) - e2:SetOperation(c64382839.hspop) - c:RegisterEffect(e2) -end -function c64382839.cfilter(c,tp) - return c:GetPreviousControler()==1-tp and c:IsPreviousLocation(LOCATION_ONFIELD) - and c:IsType(TYPE_MONSTER) and not c:IsType(TYPE_TOKEN) -end -function c64382839.spcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c64382839.cfilter,1,nil,tp) -end -function c64382839.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0) -end -function c64382839.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - if not Duel.IsPlayerCanSpecialSummonMonster(tp,64382840,0,0x4011,500,500,2,RACE_FIEND,ATTRIBUTE_DARK) then return end - local token=Duel.CreateToken(tp,64382840) - Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP) -end -function c64382839.hspcon(e,c) - if c==nil then return true end - return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-1 - and Duel.CheckReleaseGroup(c:GetControler(),Card.IsCode,1,nil,64382840) -end -function c64382839.hspop(e,tp,eg,ep,ev,re,r,rp,c) - local g=Duel.SelectReleaseGroup(tp,Card.IsCode,1,1,nil,64382840) - Duel.Release(g,REASON_COST) -end diff --git a/script/c64389297.lua b/script/c64389297.lua deleted file mode 100644 index 90b3840007..0000000000 --- a/script/c64389297.lua +++ /dev/null @@ -1,77 +0,0 @@ ---迷宮変化 -function c64389297.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c64389297.target) - e1:SetOperation(c64389297.operation) - c:RegisterEffect(e1) - --Equip limit - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_EQUIP_LIMIT) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetValue(c64389297.eqfilter) - c:RegisterEffect(e2) - --spsummon - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(64389297,0)) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetProperty(EFFECT_FLAG_BOTH_SIDE) - e3:SetRange(LOCATION_SZONE) - e3:SetCondition(c64389297.spcon) - e3:SetCost(c64389297.spcost) - e3:SetTarget(c64389297.sptg) - e3:SetOperation(c64389297.spop) - c:RegisterEffect(e3) -end -function c64389297.eqfilter(e,c) - return c:IsCode(67284908) -end -function c64389297.filter(c) - return c:IsFaceup() and c:IsCode(67284908) -end -function c64389297.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c64389297.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c64389297.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c64389297.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c64389297.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,e:GetHandler(),tc) - end -end -function c64389297.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetEquipTarget():GetControler()==tp -end -function c64389297.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - local tc=c:GetEquipTarget() - if chk==0 then return c:IsReleasable() and tc:IsReleasable() end - local g=Group.FromCards(c,tc) - Duel.Release(g,REASON_COST) -end -function c64389297.spfilter(c,e,tp) - return c:IsCode(63162310) and c:IsCanBeSpecialSummoned(e,0,tp,true,true) -end -function c64389297.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsExistingMatchingCard(c64389297.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c64389297.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c64389297.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()~=0 then - Duel.SpecialSummon(g,0,tp,tp,true,true,POS_FACEUP) - g:GetFirst():CompleteProcedure() - end -end diff --git a/script/c64398890.lua b/script/c64398890.lua deleted file mode 100644 index 21fd3c4f98..0000000000 --- a/script/c64398890.lua +++ /dev/null @@ -1,78 +0,0 @@ ---六武衆-ヤイチ -function c64398890.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(64398890,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCondition(c64398890.descon) - e1:SetCost(c64398890.descost) - e1:SetTarget(c64398890.destg) - e1:SetOperation(c64398890.desop) - c:RegisterEffect(e1) - --Destroy replace - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DESTROY_REPLACE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetTarget(c64398890.desreptg) - e2:SetOperation(c64398890.desrepop) - c:RegisterEffect(e2) -end -function c64398890.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x3d) and c:GetCode()~=64398890 -end -function c64398890.descon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c64398890.cfilter,tp,LOCATION_MZONE,0,1,nil) -end -function c64398890.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():GetAttackAnnouncedCount()==0 end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e1:SetProperty(EFFECT_FLAG_OATH) - e:GetHandler():RegisterEffect(e1) -end -function c64398890.desfilter(c) - return c:IsDestructable() and c:IsFacedown() -end -function c64398890.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_SZONE) and c64398890.desfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c64398890.desfilter,tp,LOCATION_SZONE,LOCATION_SZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c64398890.desfilter,tp,LOCATION_SZONE,LOCATION_SZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c64398890.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if not Duel.IsExistingMatchingCard(c64398890.cfilter,tp,LOCATION_MZONE,0,1,nil) then return end - if tc:IsFacedown() and tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end -function c64398890.repfilter(c) - return c:IsFaceup() and c:IsSetCard(0x3d) and not c:IsStatus(STATUS_DESTROY_CONFIRMED+STATUS_BATTLE_DESTROYED) -end -function c64398890.desreptg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return not c:IsReason(REASON_REPLACE) and c:IsOnField() and c:IsFaceup() - and Duel.IsExistingMatchingCard(c64398890.repfilter,tp,LOCATION_MZONE,0,1,c) end - if Duel.SelectYesNo(tp,aux.Stringid(64398890,1)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESREPLACE) - local g=Duel.SelectMatchingCard(tp,c64398890.repfilter,tp,LOCATION_MZONE,0,1,1,c) - e:SetLabelObject(g:GetFirst()) - Duel.HintSelection(g) - g:GetFirst():SetStatus(STATUS_DESTROY_CONFIRMED,true) - return true - else return false end -end -function c64398890.desrepop(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetLabelObject() - tc:SetStatus(STATUS_DESTROY_CONFIRMED,false) - Duel.Destroy(tc,REASON_EFFECT+REASON_REPLACE) -end diff --git a/script/c6442944.lua b/script/c6442944.lua deleted file mode 100644 index 23147dcebe..0000000000 --- a/script/c6442944.lua +++ /dev/null @@ -1,84 +0,0 @@ ---カイザー・シースネーク -function c6442944.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetValue(1) - e1:SetCountLimit(1,6442944) - e1:SetCondition(c6442944.hspcon) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(6442944,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetCondition(c6442944.spcon) - e2:SetTarget(c6442944.sptg) - e2:SetOperation(c6442944.spop) - c:RegisterEffect(e2) - --change level - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_SPSUMMON_COST) - e3:SetOperation(c6442944.lvop) - c:RegisterEffect(e3) -end -function c6442944.hspcon(e,c) - if c==nil then return true end - return Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0)==0 - and Duel.GetFieldGroupCount(c:GetControler(),0,LOCATION_MZONE)>0 - and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 -end -function c6442944.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+1 -end -function c6442944.spfilter(c,e,tp) - return c:IsRace(RACE_SEASERPENT) and c:GetLevel()==8 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) - and not c:IsHasEffect(EFFECT_NECRO_VALLEY) -end -function c6442944.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c6442944.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE) -end -function c6442944.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c6442944.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp) - local tc=g:GetFirst() - if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetValue(0) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1,true) - local e2=e1:Clone() - e2:SetCode(EFFECT_SET_DEFENCE_FINAL) - tc:RegisterEffect(e2,true) - Duel.SpecialSummonComplete() - end -end -function c6442944.lvop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CHANGE_LEVEL) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetValue(4) - e1:SetReset(RESET_EVENT+0xff0000) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_SET_BASE_ATTACK) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetValue(0) - e2:SetReset(RESET_EVENT+0xff0000) - c:RegisterEffect(e2) -end diff --git a/script/c64437633.lua b/script/c64437633.lua deleted file mode 100644 index 77098a5962..0000000000 --- a/script/c64437633.lua +++ /dev/null @@ -1,45 +0,0 @@ ---儀水鏡の幻影術 -function c64437633.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c64437633.target) - e1:SetOperation(c64437633.activate) - c:RegisterEffect(e1) -end -function c64437633.filter(c,e,tp) - return c:IsSetCard(0x3a) and bit.band(c:GetType(),0x81)==0x81 and c:IsCanBeSpecialSummoned(e,0,tp,false,true) -end -function c64437633.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c64437633.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,LOCATION_HAND) -end -function c64437633.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c64437633.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - local tc=g:GetFirst() - if tc then - Duel.SpecialSummon(tc,0,tp,tp,false,true,POS_FACEUP) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1,true) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EVENT_PHASE+PHASE_END) - e2:SetOperation(c64437633.retop) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e2:SetCountLimit(1) - tc:RegisterEffect(e2,true) - end -end -function c64437633.retop(e,tp,eg,ep,ev,re,r,rp) - Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT) -end diff --git a/script/c64463828.lua b/script/c64463828.lua deleted file mode 100644 index b301d26433..0000000000 --- a/script/c64463828.lua +++ /dev/null @@ -1,14 +0,0 @@ ---超合魔獣ラプテノス -function c64463828.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcFunRep(c,aux.FilterBoolFunction(Card.IsType,TYPE_DUAL),2,false) - --duel status - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e1:SetTarget(aux.TargetBoolFunction(Card.IsType,TYPE_DUAL)) - e1:SetCode(EFFECT_DUAL_STATUS) - c:RegisterEffect(e1) -end diff --git a/script/c64496451.lua b/script/c64496451.lua deleted file mode 100644 index 3aedf229fa..0000000000 --- a/script/c64496451.lua +++ /dev/null @@ -1,186 +0,0 @@ ---クリフォート・ディスク -function c64496451.initial_effect(c) - --pendulum summon - aux.AddPendulumProcedure(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --splimit - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE) - e2:SetRange(LOCATION_PZONE) - e2:SetTargetRange(1,0) - e2:SetCondition(aux.nfbdncon) - e2:SetTarget(c64496451.splimit) - c:RegisterEffect(e2) - --atk up - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetRange(LOCATION_PZONE) - e3:SetCode(EFFECT_UPDATE_ATTACK) - e3:SetTargetRange(LOCATION_MZONE,0) - e3:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0xaa)) - e3:SetValue(300) - c:RegisterEffect(e3) - --summon with no tribute - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(64496451,0)) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e4:SetCode(EFFECT_SUMMON_PROC) - e4:SetCondition(c64496451.ntcon) - c:RegisterEffect(e4) - --change level - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_SINGLE) - e5:SetCode(EFFECT_SUMMON_COST) - e5:SetOperation(c64496451.lvop) - c:RegisterEffect(e5) - local e6=Effect.CreateEffect(c) - e6:SetType(EFFECT_TYPE_SINGLE) - e6:SetCode(EFFECT_SPSUMMON_COST) - e6:SetOperation(c64496451.lvop2) - c:RegisterEffect(e6) - --immune - local e7=Effect.CreateEffect(c) - e7:SetType(EFFECT_TYPE_SINGLE) - e7:SetCode(EFFECT_IMMUNE_EFFECT) - e7:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_UNCOPYABLE) - e7:SetRange(LOCATION_MZONE) - e7:SetCondition(c64496451.immcon) - e7:SetValue(aux.qlifilter) - c:RegisterEffect(e7) - --summon success - local e8=Effect.CreateEffect(c) - e8:SetDescription(aux.Stringid(64496451,1)) - e8:SetCategory(CATEGORY_SPECIAL_SUMMON) - e8:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e8:SetCode(EVENT_SUMMON_SUCCESS) - e8:SetCondition(c64496451.spcon) - e8:SetTarget(c64496451.sptg) - e8:SetOperation(c64496451.spop) - c:RegisterEffect(e8) - --tribute check - local e9=Effect.CreateEffect(c) - e9:SetType(EFFECT_TYPE_SINGLE) - e9:SetCode(EFFECT_MATERIAL_CHECK) - e9:SetValue(c64496451.valcheck) - e9:SetLabelObject(e8) - c:RegisterEffect(e9) -end -function c64496451.splimit(e,c) - return not c:IsSetCard(0xaa) -end -function c64496451.ntcon(e,c,minc) - if c==nil then return true end - return minc==0 and c:GetLevel()>4 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 -end -function c64496451.lvcon(e) - return e:GetHandler():GetMaterialCount()==0 -end -function c64496451.lvop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CHANGE_LEVEL) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c64496451.lvcon) - e1:SetValue(4) - e1:SetReset(RESET_EVENT+0xff0000) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_SET_BASE_ATTACK) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetCondition(c64496451.lvcon) - e2:SetValue(1800) - e2:SetReset(RESET_EVENT+0xff0000) - c:RegisterEffect(e2) -end -function c64496451.lvop2(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CHANGE_LEVEL) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetValue(4) - e1:SetReset(RESET_EVENT+0xff0000) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_SET_BASE_ATTACK) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetValue(1800) - e2:SetReset(RESET_EVENT+0xff0000) - c:RegisterEffect(e2) -end -function c64496451.immcon(e) - return bit.band(e:GetHandler():GetSummonType(),SUMMON_TYPE_NORMAL)==SUMMON_TYPE_NORMAL -end -function c64496451.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_ADVANCE and e:GetLabel()==1 -end -function c64496451.spfilter(c,e,tp) - return c:IsSetCard(0xaa) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c64496451.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>1 - and Duel.IsExistingMatchingCard(c64496451.spfilter,tp,LOCATION_DECK,0,2,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_DECK) -end -function c64496451.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 then return end - local c=e:GetHandler() - local fid=c:GetFieldID() - local g=Duel.GetMatchingGroup(c64496451.spfilter,tp,LOCATION_DECK,0,nil,e,tp) - if g:GetCount()>=2 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=g:Select(tp,2,2,nil) - Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) - sg:GetFirst():RegisterFlagEffect(64496451,RESET_EVENT+0x1fe0000,0,0,fid) - sg:GetNext():RegisterFlagEffect(64496451,RESET_EVENT+0x1fe0000,0,0,fid) - sg:KeepAlive() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e1:SetCountLimit(1) - e1:SetLabel(fid) - e1:SetLabelObject(sg) - e1:SetCondition(c64496451.descon) - e1:SetOperation(c64496451.desop) - Duel.RegisterEffect(e1,tp) - end -end -function c64496451.desfilter(c,fid) - return c:GetFlagEffectLabel(64496451)==fid -end -function c64496451.descon(e,tp,eg,ep,ev,re,r,rp) - local g=e:GetLabelObject() - if not g:IsExists(c64496451.desfilter,1,nil,e:GetLabel()) then - g:DeleteGroup() - e:Reset() - return false - else return true end -end -function c64496451.desop(e,tp,eg,ep,ev,re,r,rp) - local g=e:GetLabelObject() - local tg=g:Filter(c64496451.desfilter,nil,e:GetLabel()) - Duel.Destroy(tg,REASON_EFFECT) -end -function c64496451.valcheck(e,c) - local g=c:GetMaterial() - if g:IsExists(Card.IsSetCard,1,nil,0xaa) then - e:GetLabelObject():SetLabel(1) - else - e:GetLabelObject():SetLabel(0) - end -end diff --git a/script/c64500000.lua b/script/c64500000.lua deleted file mode 100644 index ab7bbec4b8..0000000000 --- a/script/c64500000.lua +++ /dev/null @@ -1,98 +0,0 @@ ---Z-メタル・キャタピラー -function c64500000.initial_effect(c) - --equip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(64500000,0)) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetTarget(c64500000.eqtg) - e1:SetOperation(c64500000.eqop) - c:RegisterEffect(e1) - --unequip - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(64500000,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_SZONE) - e2:SetCondition(c64500000.uncon) - e2:SetTarget(c64500000.sptg) - e2:SetOperation(c64500000.spop) - c:RegisterEffect(e2) - --Atk up - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_EQUIP) - e3:SetCode(EFFECT_UPDATE_ATTACK) - e3:SetValue(600) - e3:SetCondition(c64500000.uncon) - c:RegisterEffect(e3) - --Def up - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_EQUIP) - e4:SetCode(EFFECT_UPDATE_DEFENCE) - e4:SetValue(600) - e4:SetCondition(c64500000.uncon) - c:RegisterEffect(e4) - --destroy sub - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_EQUIP) - e5:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e5:SetCode(EFFECT_DESTROY_SUBSTITUTE) - e5:SetCondition(c64500000.uncon) - e5:SetValue(c64500000.repval) - c:RegisterEffect(e5) - --eqlimit - local e6=Effect.CreateEffect(c) - e6:SetType(EFFECT_TYPE_SINGLE) - e6:SetCode(EFFECT_EQUIP_LIMIT) - e6:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e6:SetValue(c64500000.eqlimit) - c:RegisterEffect(e6) -end -function c64500000.uncon(e) - return e:GetHandler():IsStatus(STATUS_UNION) -end -function c64500000.repval(e,re,r,rp) - return bit.band(r,REASON_BATTLE)~=0 -end -function c64500000.eqlimit(e,c) - local code=c:GetCode() - return code==62651957 or code==65622692 -end -function c64500000.filter(c) - local code=c:GetCode() - return c:IsFaceup() and (code==62651957 or code==65622692) and c:GetUnionCount()==0 -end -function c64500000.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c64500000.filter(chkc) end - if chk==0 then return e:GetHandler():GetFlagEffect(64500000)==0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingTarget(c64500000.filter,tp,LOCATION_MZONE,0,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local g=Duel.SelectTarget(tp,c64500000.filter,tp,LOCATION_MZONE,0,1,1,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0) - e:GetHandler():RegisterFlagEffect(64500000,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1) -end -function c64500000.eqop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if not c:IsRelateToEffect(e) or c:IsFacedown() then return end - if not tc:IsRelateToEffect(e) or not c64500000.filter(tc) then - Duel.SendtoGrave(c,REASON_EFFECT) - return - end - if not Duel.Equip(tp,c,tc,false) then return end - c:SetStatus(STATUS_UNION,true) -end -function c64500000.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():GetFlagEffect(64500000)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) - e:GetHandler():RegisterFlagEffect(64500000,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1) -end -function c64500000.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP_ATTACK) - end -end diff --git a/script/c64514622.lua b/script/c64514622.lua deleted file mode 100644 index 01bb6923a5..0000000000 --- a/script/c64514622.lua +++ /dev/null @@ -1,36 +0,0 @@ ---龍王の聖刻印 -function c64514622.initial_effect(c) - aux.EnableDualAttribute(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetDescription(aux.Stringid(64514622,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(aux.IsDualState) - e1:SetCost(c64514622.cost) - e1:SetTarget(c64514622.target) - e1:SetOperation(c64514622.operation) - c:RegisterEffect(e1) -end -function c64514622.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end -function c64514622.filter(c,e,tp) - return c:IsSetCard(0x69) and c:GetCode()~=64514622 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) - and not c:IsHasEffect(EFFECT_NECRO_VALLEY) -end -function c64514622.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsExistingMatchingCard(c64514622.filter,tp,0x13,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,0x13) -end -function c64514622.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c64514622.filter,tp,0x13,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENCE) - end -end diff --git a/script/c64538655.lua b/script/c64538655.lua deleted file mode 100644 index 2faf2c5a59..0000000000 --- a/script/c64538655.lua +++ /dev/null @@ -1,32 +0,0 @@ ---一撃必殺侍 -function c64538655.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(64538655,0)) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_COIN) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_BATTLE_START) - e1:SetCondition(c64538655.descon) - e1:SetTarget(c64538655.destg) - e1:SetOperation(c64538655.desop) - c:RegisterEffect(e1) -end -function c64538655.descon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetAttackTarget()~=nil -end -function c64538655.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_COIN,nil,0,tp,1) -end -function c64538655.desop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetAttackTarget() - if c==tc then tc=Duel.GetAttacker() end - if not tc:IsRelateToBattle() then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_COIN) - local coin=Duel.SelectOption(tp,60,61) - local res=Duel.TossCoin(tp,1) - if coin~=res then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c64550682.lua b/script/c64550682.lua deleted file mode 100644 index 53739fd83a..0000000000 --- a/script/c64550682.lua +++ /dev/null @@ -1,83 +0,0 @@ ---スクラップ・オルトロス -function c64550682.initial_effect(c) - c:EnableReviveLimit() - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c64550682.spcon) - e1:SetValue(1) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(64550682,0)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetCondition(c64550682.descon) - e2:SetTarget(c64550682.destg) - e2:SetOperation(c64550682.desop) - c:RegisterEffect(e2) - --search - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(64550682,1)) - e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_TO_GRAVE) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) - e3:SetCondition(c64550682.thcon) - e3:SetTarget(c64550682.thtg) - e3:SetOperation(c64550682.thop) - c:RegisterEffect(e3) -end -function c64550682.spfilter(c) - return c:IsFaceup() and c:IsSetCard(0x24) -end -function c64550682.spcon(e,c) - if c==nil then return true end - return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c64550682.spfilter,c:GetControler(),LOCATION_MZONE,0,1,nil) -end -function c64550682.descon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+1 -end -function c64550682.desfilter(c) - return c:IsFaceup() and c:IsSetCard(0x24) and c:IsDestructable() -end -function c64550682.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c64550682.desfilter(chkc) end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c64550682.desfilter,tp,LOCATION_MZONE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c64550682.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end -function c64550682.thcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return bit.band(c:GetReason(),0x41)==0x41 and re:GetOwner():IsSetCard(0x24) -end -function c64550682.filter(c) - return c:IsSetCard(0x24) and c:IsType(TYPE_MONSTER) and c:GetCode()~=64550682 and c:IsAbleToHand() -end -function c64550682.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c64550682.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c64550682.filter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c64550682.filter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c64550682.thop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end diff --git a/script/c64554883.lua b/script/c64554883.lua deleted file mode 100644 index acdb8f9cf6..0000000000 --- a/script/c64554883.lua +++ /dev/null @@ -1,51 +0,0 @@ ---No.25 重装光学撮影機フォーカス・フォース -function c64554883.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,6,2) - c:EnableReviveLimit() - --disable - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(64554883,0)) - e1:SetCategory(CATEGORY_DISABLE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,0x1c0) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCost(c64554883.cost) - e1:SetTarget(c64554883.target) - e1:SetOperation(c64554883.operation) - c:RegisterEffect(e1) -end -c64554883.xyz_number=25 -function c64554883.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c64554883.filter(c) - return c:IsFaceup() and c:IsLevelAbove(5) and not c:IsDisabled() and c:IsType(TYPE_EFFECT) -end -function c64554883.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and c64554883.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c64554883.filter,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - local g=Duel.SelectTarget(tp,c64554883.filter,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0) -end -function c64554883.operation(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - tc:RegisterEffect(e2) - end -end diff --git a/script/c6459419.lua b/script/c6459419.lua deleted file mode 100644 index 8d72d7f906..0000000000 --- a/script/c6459419.lua +++ /dev/null @@ -1,36 +0,0 @@ ---アマゾネス転生術 -function c6459419.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c6459419.target) - e1:SetOperation(c6459419.activate) - c:RegisterEffect(e1) -end -function c6459419.dfilter(c) - return c:IsFaceup() and c:IsSetCard(0x4) and c:IsDestructable() -end -function c6459419.spfilter(c,e,tp) - return c:IsLevelBelow(4) and c:IsSetCard(0x4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsHasEffect(EFFECT_NECRO_VALLEY) -end -function c6459419.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c6459419.dfilter,tp,LOCATION_MZONE,0,1,nil) end - local g=Duel.GetMatchingGroup(c6459419.dfilter,tp,LOCATION_MZONE,0,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c6459419.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c6459419.dfilter,tp,LOCATION_MZONE,0,nil) - local ct=Duel.Destroy(g,REASON_EFFECT) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ct==0 or ft<=0 then return end - if ft>ct then ft=ct end - local sg=Duel.GetMatchingGroup(c6459419.spfilter,tp,LOCATION_GRAVE,0,nil,e,tp) - if sg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(6459419,0)) then - Duel.BreakEffect() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local fg=sg:Select(tp,ft,ft,nil) - Duel.SpecialSummon(fg,0,tp,tp,false,false,POS_FACEUP_DEFENCE) - end -end diff --git a/script/c64599569.lua b/script/c64599569.lua deleted file mode 100644 index 45043e0be4..0000000000 --- a/script/c64599569.lua +++ /dev/null @@ -1,83 +0,0 @@ ---キメラテック・オーバー・ドラゴン -function c64599569.initial_effect(c) - c:EnableReviveLimit() - --fusion material - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_FUSION_MATERIAL) - e1:SetCondition(c64599569.fscondition) - e1:SetOperation(c64599569.fsoperation) - c:RegisterEffect(e1) - --spsummon condition - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e2:SetCode(EFFECT_SPSUMMON_CONDITION) - e2:SetValue(aux.fuslimit) - c:RegisterEffect(e2) - --spsummon success - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - e3:SetOperation(c64599569.sucop) - c:RegisterEffect(e3) - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e4:SetCode(EVENT_SPSUMMON_SUCCESS) - e4:SetOperation(c64599569.tgop) - c:RegisterEffect(e4) -end -c64599569.material_count=1 -c64599569.material={70095154} -function c64599569.spfilter(c,mg) - return (c:IsCode(70095154) or c:IsHasEffect(EFFECT_FUSION_SUBSTITUTE)) - and mg:IsExists(Card.IsRace,1,c,RACE_MACHINE) -end -function c64599569.fscondition(e,mg,gc) - if mg==nil then return false end - if gc then return false end - return mg:IsExists(c64599569.spfilter,1,nil,mg) -end -function c64599569.fsoperation(e,tp,eg,ep,ev,re,r,rp,gc) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL) - local g1=eg:FilterSelect(tp,c64599569.spfilter,1,1,nil,eg) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL) - local g2=eg:FilterSelect(tp,Card.IsRace,1,63,g1:GetFirst(),RACE_MACHINE) - g1:Merge(g2) - Duel.SetFusionMaterial(g1) -end -function c64599569.sucop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_BASE_ATTACK) - e1:SetValue(c:GetMaterialCount()*800) - e1:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_SET_BASE_DEFENCE) - c:RegisterEffect(e2) - local e3=e1:Clone() - e3:SetCode(EFFECT_EXTRA_ATTACK) - e3:SetValue(c:GetMaterialCount()-1) - c:RegisterEffect(e3) - local e4=e1:Clone() - e4:SetCode(EFFECT_CANNOT_DIRECT_ATTACK) - e4:SetCondition(c64599569.dircon) - c:RegisterEffect(e4) - local e5=e1:Clone() - e5:SetCode(EFFECT_CANNOT_ATTACK) - e5:SetCondition(c64599569.atkcon) - c:RegisterEffect(e5) -end -function c64599569.dircon(e) - return e:GetHandler():GetAttackAnnouncedCount()>0 -end -function c64599569.atkcon(e) - return e:GetHandler():IsDirectAttacked() -end -function c64599569.tgop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(nil,tp,LOCATION_ONFIELD,0,e:GetHandler()) - Duel.SendtoGrave(g,REASON_EFFECT) -end diff --git a/script/c64605089.lua b/script/c64605089.lua deleted file mode 100644 index 2b1bffe280..0000000000 --- a/script/c64605089.lua +++ /dev/null @@ -1,69 +0,0 @@ ---護封剣の剣士 -function c64605089.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(64605089,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c64605089.condition) - e1:SetTarget(c64605089.target) - e1:SetOperation(c64605089.operation) - c:RegisterEffect(e1) - --effect gain - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_BE_MATERIAL) - e2:SetCondition(c64605089.efcon) - e2:SetOperation(c64605089.efop) - c:RegisterEffect(e2) -end -function c64605089.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetAttacker():IsControler(1-tp) and Duel.GetAttackTarget()==nil -end -function c64605089.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) - if Duel.GetAttacker():GetAttack()0 - and at:IsFaceup() and at:IsRelateToBattle() and at:GetAttack()1 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local sg=g:Select(tp,2,2,nil) - Duel.SendtoHand(sg,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,sg) - end -end diff --git a/script/c64631466.lua b/script/c64631466.lua deleted file mode 100644 index bd27204c97..0000000000 --- a/script/c64631466.lua +++ /dev/null @@ -1,101 +0,0 @@ ---サクリファイス -function c64631466.initial_effect(c) - c:EnableReviveLimit() - --equip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(64631466,0)) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCondition(c64631466.eqcon) - e1:SetTarget(c64631466.eqtg) - e1:SetOperation(c64631466.eqop) - c:RegisterEffect(e1) - --damage - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetProperty(EFFECT_FLAG_AVAILABLE_BD) - e2:SetCode(EVENT_DAMAGE) - e2:SetRange(LOCATION_MZONE) - e2:SetCondition(c64631466.damcon) - e2:SetOperation(c64631466.damop) - e2:SetLabelObject(e1) - c:RegisterEffect(e2) -end -function c64631466.eqcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local ec=e:GetLabelObject() - return ec==nil or ec:GetFlagEffect(64631466)==0 -end -function c64631466.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsAbleToChangeControler() end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingTarget(Card.IsAbleToChangeControler,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local g=Duel.SelectTarget(tp,Card.IsAbleToChangeControler,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0) -end -function c64631466.eqlimit(e,c) - return e:GetOwner()==c -end -function c64631466.eqop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsType(TYPE_MONSTER) then - if c:IsFaceup() and c:IsRelateToEffect(e) then - local atk=tc:GetTextAttack() - local def=tc:GetTextDefence() - if tc:IsFacedown() or atk<0 then atk=0 end - if tc:IsFacedown() or def<0 then def=0 end - if not Duel.Equip(tp,tc,c,false) then return end - --Add Equip limit - tc:RegisterFlagEffect(64631466,RESET_EVENT+0x1fe0000,0,0) - e:SetLabelObject(tc) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_COPY_INHERIT+EFFECT_FLAG_OWNER_RELATE) - e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(c64631466.eqlimit) - tc:RegisterEffect(e1) - if atk>0 then - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_OWNER_RELATE) - e2:SetCode(EFFECT_SET_ATTACK) - e2:SetReset(RESET_EVENT+0x1fe0000) - e2:SetValue(atk) - tc:RegisterEffect(e2) - end - if def>0 then - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_EQUIP) - e3:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_OWNER_RELATE) - e3:SetCode(EFFECT_SET_DEFENCE) - e3:SetReset(RESET_EVENT+0x1fe0000) - e3:SetValue(def) - tc:RegisterEffect(e3) - end - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_EQUIP) - e4:SetCode(EFFECT_DESTROY_SUBSTITUTE) - e4:SetProperty(EFFECT_FLAG_SET_AVAILABLE) - e4:SetReset(RESET_EVENT+0x1fe0000) - e4:SetValue(c64631466.repval) - tc:RegisterEffect(e4) - else Duel.SendtoGrave(tc,REASON_EFFECT) end - end -end -function c64631466.repval(e,re,r,rp) - return bit.band(r,REASON_BATTLE)~=0 -end -function c64631466.damcon(e,tp,eg,ep,ev,re,r,rp) - local ec=e:GetLabelObject():GetLabelObject() - return ec and ec:GetFlagEffect(64631466)~=0 and ep==tp and bit.band(r,REASON_BATTLE)~=0 - and (Duel.GetAttacker()==e:GetHandler() or Duel.GetAttackTarget()==e:GetHandler()) -end -function c64631466.damop(e,tp,eg,ep,ev,re,r,rp) - Duel.Damage(1-tp,ev,REASON_EFFECT) -end diff --git a/script/c64662453.lua b/script/c64662453.lua deleted file mode 100644 index bff4524224..0000000000 --- a/script/c64662453.lua +++ /dev/null @@ -1,60 +0,0 @@ ---アイアンコール -function c64662453.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c64662453.condition) - e1:SetTarget(c64662453.target) - e1:SetOperation(c64662453.activate) - c:RegisterEffect(e1) -end -function c64662453.cfilter(c) - return c:IsFaceup() and c:IsRace(RACE_MACHINE) -end -function c64662453.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c64662453.cfilter,tp,LOCATION_MZONE,0,1,nil) -end -function c64662453.filter(c,e,tp) - return c:IsLevelBelow(4) and c:IsRace(RACE_MACHINE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c64662453.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c64662453.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c64662453.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c64662453.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c64662453.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1,true) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e2,true) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e3:SetRange(LOCATION_MZONE) - e3:SetCode(EVENT_PHASE+PHASE_END) - e3:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e3:SetOperation(c64662453.desop) - e3:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e3:SetCountLimit(1) - tc:RegisterEffect(e3,true) - Duel.SpecialSummonComplete() - end -end -function c64662453.desop(e,tp,eg,ep,ev,re,r,rp) - Duel.Destroy(e:GetHandler(),REASON_EFFECT) -end \ No newline at end of file diff --git a/script/c64681263.lua b/script/c64681263.lua deleted file mode 100644 index cbac0086c2..0000000000 --- a/script/c64681263.lua +++ /dev/null @@ -1,20 +0,0 @@ ---局地的大ハリケーン -function c64681263.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TODECK) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c64681263.target) - e1:SetOperation(c64681263.operation) - c:RegisterEffect(e1) -end -function c64681263.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_HAND+LOCATION_GRAVE,0)>0 end - local g=Duel.GetFieldGroup(tp,LOCATION_HAND+LOCATION_GRAVE,0) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0) -end -function c64681263.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetFieldGroup(tp,LOCATION_HAND+LOCATION_GRAVE,0) - Duel.SendtoDeck(g,nil,2,REASON_EFFECT) -end diff --git a/script/c64681432.lua b/script/c64681432.lua deleted file mode 100644 index 549a0a7382..0000000000 --- a/script/c64681432.lua +++ /dev/null @@ -1,84 +0,0 @@ ---破壊竜ガンドラ -function c64681432.initial_effect(c) - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - c:RegisterEffect(e1) - --summon,flip - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetCode(EVENT_SUMMON_SUCCESS) - e2:SetOperation(c64681432.tgreg1) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - e3:SetOperation(c64681432.tgreg2) - c:RegisterEffect(e3) - --destroy - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(64681432,0)) - e4:SetCategory(CATEGORY_DESTROY) - e4:SetType(EFFECT_TYPE_IGNITION) - e4:SetRange(LOCATION_MZONE) - e4:SetCost(c64681432.descost) - e4:SetTarget(c64681432.destg) - e4:SetOperation(c64681432.desop) - c:RegisterEffect(e4) - --to grave - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e5:SetDescription(aux.Stringid(64681432,1)) - e5:SetCategory(CATEGORY_TOGRAVE) - e5:SetCode(EVENT_PHASE+PHASE_END) - e5:SetRange(LOCATION_MZONE) - e5:SetCountLimit(1) - e5:SetCondition(c64681432.tgcon) - e5:SetTarget(c64681432.tgtg) - e5:SetOperation(c64681432.tgop) - c:RegisterEffect(e5) -end -function c64681432.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.PayLPCost(tp,math.floor(Duel.GetLP(tp)/2)) -end -function c64681432.destg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c) end - local sg=Duel.GetMatchingGroup(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,c) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,sg:GetCount(),0,0) -end -function c64681432.desop(e,tp,eg,ep,ev,re,r,rp) - local sg=Duel.GetMatchingGroup(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler()) - local ct=Duel.Destroy(sg,REASON_EFFECT,LOCATION_REMOVED) - if ct>0 then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetProperty(EFFECT_FLAG_COPY_INHERIT) - e1:SetValue(ct*300) - e1:SetReset(RESET_EVENT+0x1ff0000) - e:GetHandler():RegisterEffect(e1) - end -end -function c64681432.tgreg1(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():RegisterFlagEffect(64681432,RESET_EVENT+0x1ec0000+RESET_PHASE+PHASE_END,0,1) -end -function c64681432.tgreg2(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():RegisterFlagEffect(64681432,RESET_EVENT+0x1fc0000+RESET_PHASE+PHASE_END,0,1) -end -function c64681432.tgcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetFlagEffect(64681432)~=0 -end -function c64681432.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,e:GetHandler(),1,0,0) -end -function c64681432.tgop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - Duel.SendtoGrave(c,REASON_EFFECT) - end -end diff --git a/script/c64689404.lua b/script/c64689404.lua deleted file mode 100644 index e6cf06a03f..0000000000 --- a/script/c64689404.lua +++ /dev/null @@ -1,66 +0,0 @@ ---ソードブレイカー -function c64689404.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,6,2) - c:EnableReviveLimit() - --equip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(64689404,0)) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCost(c64689404.raccost) - e1:SetTarget(c64689404.ractg) - e1:SetOperation(c64689404.racop) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(64689404,1)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_BATTLE_START) - e2:SetCondition(c64689404.descon) - e2:SetTarget(c64689404.destg) - e2:SetOperation(c64689404.desop) - c:RegisterEffect(e2) - e1:SetLabelObject(e2) -end -function c64689404.raccost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c64689404.ractg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetLabelObject():GetLabel()~=RACE_ALL end - if e:GetHandler():GetFlagEffect(64689404)==0 then - e:GetHandler():RegisterFlagEffect(64689404,RESET_EVENT+0x1fe0000,0,0) - e:GetLabelObject():SetLabel(0) - end - local prc=e:GetLabelObject():GetLabel() - Duel.Hint(HINT_SELECTMSG,tp,563) - local rc=Duel.AnnounceRace(tp,1,RACE_ALL-prc) - e:SetLabel(rc) -end -function c64689404.racop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) and e:GetHandler():IsFaceup() then - local prc=e:GetLabelObject():GetLabel() - local rc=bit.bor(e:GetLabel(),prc) - e:GetLabelObject():SetLabel(rc) - e:GetHandler():SetHint(CHINT_RACE,rc) - end -end -function c64689404.descon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local bc=c:GetBattleTarget() - return c:GetFlagEffect(64689404)~=0 and bc and bc:IsFaceup() and bc:IsRace(e:GetLabel()) -end -function c64689404.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler():GetBattleTarget(),1,0,0) -end -function c64689404.desop(e,tp,eg,ep,ev,re,r,rp) - local bc=e:GetHandler():GetBattleTarget() - if bc:IsRelateToBattle() then - Duel.Destroy(bc,REASON_EFFECT) - end -end diff --git a/script/c64697231.lua b/script/c64697231.lua deleted file mode 100644 index 2e96d5bc78..0000000000 --- a/script/c64697231.lua +++ /dev/null @@ -1,35 +0,0 @@ ---ダスト・シュート -function c64697231.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TODECK) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetHintTiming(0,TIMING_TOHAND) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c64697231.condition) - e1:SetTarget(c64697231.target) - e1:SetOperation(c64697231.activate) - c:RegisterEffect(e1) -end -function c64697231.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>3 -end -function c64697231.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(tp) -end -function c64697231.activate(e,tp,eg,ep,ev,re,r,rp) - local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) - local g=Duel.GetFieldGroup(p,0,LOCATION_HAND) - if g:GetCount()>0 then - Duel.ConfirmCards(p,g) - local tg=g:Filter(Card.IsType,nil,TYPE_MONSTER) - if tg:GetCount()>0 then - Duel.Hint(HINT_SELECTMSG,p,HINTMSG_TODECK) - local sg=tg:Select(p,1,1,nil) - Duel.SendtoDeck(sg,nil,2,REASON_EFFECT) - end - Duel.ShuffleHand(1-p) - end -end diff --git a/script/c64726269.lua b/script/c64726269.lua deleted file mode 100644 index ddb939f4e6..0000000000 --- a/script/c64726269.lua +++ /dev/null @@ -1,79 +0,0 @@ ---光天使スケール -function c64726269.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(64726269,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetTarget(c64726269.sptg) - e1:SetOperation(c64726269.spop) - c:RegisterEffect(e1) - --effect gain - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_BE_MATERIAL) - e2:SetCondition(c64726269.effcon) - e2:SetOperation(c64726269.effop) - c:RegisterEffect(e2) -end -function c64726269.filter(c,e,tp) - return c:IsSetCard(0x86) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c64726269.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c64726269.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c64726269.tdfilter(c) - return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsAbleToDeck() and not c:IsHasEffect(EFFECT_NECRO_VALLEY) -end -function c64726269.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c64726269.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - local sg=Duel.GetMatchingGroup(c64726269.tdfilter,tp,LOCATION_GRAVE,0,nil) - if sg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(64726269,1)) then - Duel.BreakEffect() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local tg=sg:Select(tp,1,1,nil) - Duel.HintSelection(tg) - Duel.SendtoDeck(tg,nil,0,REASON_EFFECT) - end - end -end -function c64726269.effcon(e,tp,eg,ep,ev,re,r,rp) - return r==REASON_XYZ and e:GetHandler():GetReasonCard():GetMaterial():IsExists(Card.IsPreviousLocation,3,nil,LOCATION_MZONE) -end -function c64726269.effop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local rc=c:GetReasonCard() - local e1=Effect.CreateEffect(rc) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetProperty(EFFECT_FLAG_DELAY) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCondition(c64726269.drcon) - e1:SetOperation(c64726269.drop) - e1:SetReset(RESET_EVENT+0x1fe0000) - rc:RegisterEffect(e1,true) - if not rc:IsType(TYPE_EFFECT) then - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_ADD_TYPE) - e2:SetValue(TYPE_EFFECT) - e2:SetReset(RESET_EVENT+0x1fe0000) - rc:RegisterEffect(e2,true) - end -end -function c64726269.drcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetOverlayCount()~=0 and eg:IsExists(Card.IsPreviousLocation,1,nil,LOCATION_HAND) -end -function c64726269.drop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_CARD,0,64726269) - Duel.Draw(tp,1,REASON_EFFECT) -end diff --git a/script/c64734090.lua b/script/c64734090.lua deleted file mode 100644 index fecdfcaf20..0000000000 --- a/script/c64734090.lua +++ /dev/null @@ -1,28 +0,0 @@ ---ジェムタートル -function c64734090.initial_effect(c) - --search - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(64734090,0)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DELAY) - e1:SetTarget(c64734090.tg) - e1:SetOperation(c64734090.op) - c:RegisterEffect(e1) -end -function c64734090.filter(c) - return c:IsCode(1264319) and c:IsAbleToHand() -end -function c64734090.tg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c64734090.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c64734090.op(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c64734090.filter,tp,LOCATION_DECK,0,nil) - if g:GetCount()>0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local sg=g:Select(tp,1,1,nil) - Duel.SendtoHand(sg,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,sg) - end -end diff --git a/script/c64734921.lua b/script/c64734921.lua deleted file mode 100644 index 4a622cb196..0000000000 --- a/script/c64734921.lua +++ /dev/null @@ -1,33 +0,0 @@ ---創造の代行者 ヴィーナス -function c64734921.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(64734921,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c64734921.spcost) - e1:SetTarget(c64734921.sptg) - e1:SetOperation(c64734921.spop) - c:RegisterEffect(e1) -end -function c64734921.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,500) end - Duel.PayLPCost(tp,500) -end -function c64734921.filter(c,e,tp) - return c:IsCode(39552864) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c64734921.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c64734921.filter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_HAND) -end -function c64734921.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c64734921.filter,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c64751286.lua b/script/c64751286.lua deleted file mode 100644 index fbc0291c10..0000000000 --- a/script/c64751286.lua +++ /dev/null @@ -1,18 +0,0 @@ ---月の女戦士 -function c64751286.initial_effect(c) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetCondition(c64751286.condtion) - e1:SetValue(1000) - c:RegisterEffect(e1) -end -function c64751286.condtion(e) - local c=e:GetHandler() - local ph=Duel.GetCurrentPhase() - local bc=c:GetBattleTarget() - return (ph==PHASE_DAMAGE or ph==PHASE_DAMAGE_CAL) - and c:IsRelateToBattle() and bc and bc:IsFaceup() and bc:IsAttribute(ATTRIBUTE_LIGHT) -end diff --git a/script/c64752646.lua b/script/c64752646.lua deleted file mode 100644 index 953adce953..0000000000 --- a/script/c64752646.lua +++ /dev/null @@ -1,18 +0,0 @@ ---ビッグバンガール -function c64752646.initial_effect(c) - --damage - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(64752646,0)) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EVENT_RECOVER) - e1:SetCondition(c64752646.cd) - e1:SetOperation(c64752646.op) - c:RegisterEffect(e1) -end -function c64752646.cd(e,tp,eg,ep,ev,re,r,rp) - return tp==ep -end -function c64752646.op(e,tp,eg,ep,ev,re,r,rp) - Duel.Damage(1-tp,500,REASON_EFFECT) -end diff --git a/script/c64788463.lua b/script/c64788463.lua deleted file mode 100644 index 47cf470fa4..0000000000 --- a/script/c64788463.lua +++ /dev/null @@ -1,35 +0,0 @@ ---キングス・ナイト -function c64788463.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(64788463,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetCondition(c64788463.spcon) - e1:SetTarget(c64788463.sptg) - e1:SetOperation(c64788463.spop) - c:RegisterEffect(e1) -end -function c64788463.cfilter(c) - return c:IsFaceup() and c:IsCode(25652259) -end -function c64788463.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c64788463.cfilter,tp,LOCATION_MZONE,0,1,nil) -end -function c64788463.filter(c,e,tp) - return c:IsCode(90876561) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c64788463.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c64788463.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c64788463.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c64788463.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c64801562.lua b/script/c64801562.lua deleted file mode 100644 index ea14818906..0000000000 --- a/script/c64801562.lua +++ /dev/null @@ -1,61 +0,0 @@ ---明鏡止水の心 -function c64801562.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c64801562.target) - e1:SetOperation(c64801562.operation) - c:RegisterEffect(e1) - --Indes - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e2:SetValue(1) - c:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_EQUIP) - e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - e3:SetValue(c64801562.indval) - c:RegisterEffect(e3) - --Equip limit - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetCode(EFFECT_EQUIP_LIMIT) - e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e4:SetValue(1) - c:RegisterEffect(e4) - --selfdes - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_SINGLE) - e5:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e5:SetRange(LOCATION_SZONE) - e5:SetCode(EFFECT_SELF_DESTROY) - e5:SetCondition(c64801562.descon) - c:RegisterEffect(e5) -end -function c64801562.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c64801562.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,e:GetHandler(),tc) - end -end -function c64801562.indval(e,re,rp) - local tc=e:GetHandler():GetEquipTarget() - local rc=re:GetHandler() - return (re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) and Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):IsContains(tc)) - or (re:IsHasType(EFFECT_TYPE_CONTINUOUS) and rc:IsHasCardTarget(tc)) -end -function c64801562.descon(e) - local tc=e:GetHandler():GetEquipTarget() - return tc and tc:GetAttack()>=1300 -end diff --git a/script/c6480253.lua b/script/c6480253.lua deleted file mode 100644 index 902fa1649a..0000000000 --- a/script/c6480253.lua +++ /dev/null @@ -1,45 +0,0 @@ ---フレンドッグ -function c6480253.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(6480253,0)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetCondition(c6480253.condition) - e1:SetTarget(c6480253.target) - e1:SetOperation(c6480253.activate) - c:RegisterEffect(e1) -end -function c6480253.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) -end -function c6480253.filter1(c) - return c:IsSetCard(0x3008) and c:IsAbleToHand() -end -function c6480253.filter2(c) - return c:IsCode(24094653) and c:IsAbleToHand() -end -function c6480253.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - if chk==0 then return true end - if Duel.IsExistingTarget(c6480253.filter1,tp,LOCATION_GRAVE,0,1,nil) - and Duel.IsExistingTarget(c6480253.filter2,tp,LOCATION_GRAVE,0,1,nil) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g1=Duel.SelectTarget(tp,c6480253.filter1,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g2=Duel.SelectTarget(tp,c6480253.filter2,tp,LOCATION_GRAVE,0,1,1,nil) - g1:Merge(g2) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g1,2,0,0) - end -end -function c6480253.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - if not g then return end - local sg=g:Filter(Card.IsRelateToEffect,nil,e) - if sg:GetCount()==2 then - Duel.SendtoHand(sg,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,sg) - end -end diff --git a/script/c64815084.lua b/script/c64815084.lua deleted file mode 100644 index 6fcb7134a6..0000000000 --- a/script/c64815084.lua +++ /dev/null @@ -1,37 +0,0 @@ ---進化の分岐点 -function c64815084.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_END_PHASE) - e1:SetTarget(c64815084.target) - e1:SetOperation(c64815084.activate) - c:RegisterEffect(e1) -end -function c64815084.filter(c) - return c:IsFaceup() and c:IsRace(RACE_REPTILE) and c:IsDestructable() -end -function c64815084.spfilter(c,e,tp) - return c:IsSetCard(0x304e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN) -end -function c64815084.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c64815084.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c64815084.filter,tp,LOCATION_MZONE,0,1,nil) - and Duel.IsExistingMatchingCard(c64815084.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c64815084.filter,tp,LOCATION_MZONE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c64815084.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)~=0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c64815084.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEDOWN_DEFENCE) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c6483224.lua b/script/c6483224.lua deleted file mode 100644 index 13cb328e06..0000000000 --- a/script/c6483224.lua +++ /dev/null @@ -1,31 +0,0 @@ ---半月竜ラディウス -function c6483224.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetRange(LOCATION_HAND) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetCondition(c6483224.spcon) - e1:SetOperation(c6483224.spop) - c:RegisterEffect(e1) -end -function c6483224.filter(c) - return c:IsFaceup() and c:IsType(TYPE_XYZ) -end -function c6483224.spcon(e,c) - if c==nil then return true end - return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c6483224.filter,c:GetControler(),0,LOCATION_MZONE,1,nil) -end -function c6483224.spop(e,tp,eg,ep,ev,re,r,rp,c) - --change base attack - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_CHANGE_LEVEL) - e1:SetValue(8) - e1:SetReset(RESET_EVENT+0xff0000) - c:RegisterEffect(e1) -end diff --git a/script/c64892035.lua b/script/c64892035.lua deleted file mode 100644 index eefd3ba599..0000000000 --- a/script/c64892035.lua +++ /dev/null @@ -1,16 +0,0 @@ ---遅すぎたオーク -function c64892035.initial_effect(c) - --cannot attack - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetOperation(c64892035.atklimit) - c:RegisterEffect(e1) -end -function c64892035.atklimit(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e:GetHandler():RegisterEffect(e1) -end diff --git a/script/c64898834.lua b/script/c64898834.lua deleted file mode 100644 index 20a7f2f657..0000000000 --- a/script/c64898834.lua +++ /dev/null @@ -1,30 +0,0 @@ ---TG カタパルト・ドラゴン -function c64898834.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(64898834,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetTarget(c64898834.sptg) - e1:SetOperation(c64898834.spop) - c:RegisterEffect(e1) -end -function c64898834.filter(c,e,tp) - return c:IsSetCard(0x27) and c:IsLevelBelow(3) and c:IsType(TYPE_TUNER) - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c64898834.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c64898834.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c64898834.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c64898834.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c64910482.lua b/script/c64910482.lua deleted file mode 100644 index b45058c53f..0000000000 --- a/script/c64910482.lua +++ /dev/null @@ -1,78 +0,0 @@ ---TG サイバー・マジシャン -function c64910482.initial_effect(c) - --synchro custom - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SYNCHRO_MATERIAL_CUSTOM) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetTarget(c64910482.syntg) - e1:SetValue(1) - e1:SetOperation(c64910482.synop) - c:RegisterEffect(e1) - --to grave - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetOperation(c64910482.regop) - c:RegisterEffect(e2) -end -function c64910482.synfilter1(c,syncard,tuner,f) - return c:IsFaceup() and c:IsNotTuner() and c:IsCanBeSynchroMaterial(syncard,tuner) and (f==nil or f(c)) -end -function c64910482.synfilter2(c,syncard,tuner,f) - return c:IsSetCard(0x27) and c:IsNotTuner() and c:IsCanBeSynchroMaterial(syncard,tuner) and (f==nil or f(c)) -end -function c64910482.syntg(e,syncard,f,minc,maxc) - local c=e:GetHandler() - local lv=syncard:GetLevel()-c:GetLevel() - if lv<=0 then return false end - local g=Duel.GetMatchingGroup(c64910482.synfilter1,syncard:GetControler(),LOCATION_MZONE,LOCATION_MZONE,c,syncard,c,f) - if syncard:IsSetCard(0x27) then - local exg=Duel.GetMatchingGroup(c64910482.synfilter2,syncard:GetControler(),LOCATION_HAND,0,c,syncard,c,f) - g:Merge(exg) - end - return g:CheckWithSumEqual(Card.GetSynchroLevel,lv,minc,maxc,syncard) -end -function c64910482.synop(e,tp,eg,ep,ev,re,r,rp,syncard,f,minc,maxc) - local c=e:GetHandler() - local lv=syncard:GetLevel()-c:GetLevel() - local g=Duel.GetMatchingGroup(c64910482.synfilter1,syncard:GetControler(),LOCATION_MZONE,LOCATION_MZONE,c,syncard,c,f) - if syncard:IsSetCard(0x27) then - local exg=Duel.GetMatchingGroup(c64910482.synfilter2,syncard:GetControler(),LOCATION_HAND,0,c,syncard,c,f) - g:Merge(exg) - end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SMATERIAL) - local sg=g:SelectWithSumEqual(tp,Card.GetSynchroLevel,lv,minc,maxc,syncard) - Duel.SetSynchroMaterial(sg) -end -function c64910482.regop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsReason(REASON_DESTROY) then - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(64910482,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_GRAVE) - e1:SetTarget(c64910482.thtg) - e1:SetOperation(c64910482.thop) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - c:RegisterEffect(e1) - end -end -function c64910482.filter(c) - return c:IsSetCard(0x27) and c:GetCode()~=64910482 and c:IsAbleToHand() -end -function c64910482.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c64910482.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c64910482.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c64910482.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c64926005.lua b/script/c64926005.lua deleted file mode 100644 index f6e447e41e..0000000000 --- a/script/c64926005.lua +++ /dev/null @@ -1,28 +0,0 @@ ---氷結界の武士 -function c64926005.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(64926005,0)) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_CHANGE_POS) - e1:SetCondition(c64926005.condition) - e1:SetTarget(c64926005.target) - e1:SetOperation(c64926005.operation) - c:RegisterEffect(e1) -end -function c64926005.condition(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsPreviousPosition(POS_FACEUP_ATTACK) and c:IsPosition(POS_FACEUP_DEFENCE) -end -function c64926005.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c64926005.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.Destroy(c,REASON_EFFECT)~=0 then - Duel.Draw(tp,1,REASON_EFFECT) - end -end diff --git a/script/c64952266.lua b/script/c64952266.lua deleted file mode 100644 index 68eb07c904..0000000000 --- a/script/c64952266.lua +++ /dev/null @@ -1,30 +0,0 @@ ---アゲインスト・ウィンド -function c64952266.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_DAMAGE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c64952266.target) - e1:SetOperation(c64952266.activate) - c:RegisterEffect(e1) -end -function c64952266.filter(c) - return c:IsSetCard(0x33) and c:IsType(TYPE_MONSTER) and c:GetAttack()>0 and c:IsAbleToHand() -end -function c64952266.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c64952266.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c64952266.filter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c64952266.filter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,tp,0) -end -function c64952266.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) and Duel.Damage(tp,tc:GetAttack(),REASON_EFFECT)~=0 then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end diff --git a/script/c64973456.lua b/script/c64973456.lua deleted file mode 100644 index 21a0387167..0000000000 --- a/script/c64973456.lua +++ /dev/null @@ -1,47 +0,0 @@ ---ヴァイパー・リボーン -function c64973456.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c64973456.condition) - e1:SetTarget(c64973456.target) - e1:SetOperation(c64973456.activate) - c:RegisterEffect(e1) -end -function c64973456.cfilter(c) - return c:IsType(TYPE_MONSTER) and c:GetRace()~=RACE_REPTILE -end -function c64973456.condition(e,tp,eg,ep,ev,re,r,rp) - return not Duel.IsExistingMatchingCard(c64973456.cfilter,tp,LOCATION_GRAVE,0,1,nil) -end -function c64973456.filter(c,e,tp) - return not c:IsType(TYPE_TUNER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c64973456.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c64973456.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c64973456.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c64973456.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c64973456.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)~=0 then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetOperation(c64973456.desop) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e1:SetCountLimit(1) - tc:RegisterEffect(e1) - end -end -function c64973456.desop(e,tp,eg,ep,ev,re,r,rp) - Duel.Destroy(e:GetHandler(),REASON_EFFECT) -end diff --git a/script/c64990807.lua b/script/c64990807.lua deleted file mode 100644 index c4ecd18346..0000000000 --- a/script/c64990807.lua +++ /dev/null @@ -1,53 +0,0 @@ ---氷結界の三方陣 -function c64990807.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCost(c64990807.cost) - e1:SetTarget(c64990807.target) - e1:SetOperation(c64990807.activate) - c:RegisterEffect(e1) -end -function c64990807.cfilter(c) - return c:IsSetCard(0x2f) and c:IsType(TYPE_MONSTER) and not c:IsPublic() -end -function c64990807.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetMatchingGroup(c64990807.cfilter,tp,LOCATION_HAND,0,nil):GetClassCount(Card.GetCode)>=3 end - local g=Duel.GetMatchingGroup(c64990807.cfilter,tp,LOCATION_HAND,0,nil) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) - local tc1=g:Select(tp,1,1,nil):GetFirst() - g:Remove(Card.IsCode,nil,tc1:GetCode()) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) - local tc2=g:Select(tp,1,1,nil):GetFirst() - g:Remove(Card.IsCode,nil,tc2:GetCode()) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) - local tc3=g:Select(tp,1,1,nil):GetFirst() - local cg=Group.FromCards(tc1,tc2,tc3) - Duel.ConfirmCards(1-tp,cg) - Duel.ShuffleHand(tp) -end -function c64990807.spfilter(c,e,tp) - return c:IsSetCard(0x2f) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c64990807.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() and chkc:IsDestructable() end - if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,0,LOCATION_ONFIELD,1,nil) - and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c64990807.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,0,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c64990807.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)~=0 then - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c64990807.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c65025250.lua b/script/c65025250.lua deleted file mode 100644 index e05b194ab3..0000000000 --- a/script/c65025250.lua +++ /dev/null @@ -1,64 +0,0 @@ ---妖仙獣 左鎌神柱 -function c65025250.initial_effect(c) - --pendulum summon - aux.AddPendulumProcedure(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --destroy replace - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_DESTROY_REPLACE) - e2:SetRange(LOCATION_PZONE) - e2:SetTarget(c65025250.reptg) - e2:SetValue(c65025250.repval) - e2:SetOperation(c65025250.repop) - c:RegisterEffect(e2) - --to defence - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(65025250,0)) - e3:SetCategory(CATEGORY_POSITION) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e3:SetCode(EVENT_SUMMON_SUCCESS) - e3:SetTarget(c65025250.postg) - e3:SetOperation(c65025250.posop) - c:RegisterEffect(e3) - --cannot be target - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_FIELD) - e4:SetCode(EFFECT_CANNOT_SELECT_EFFECT_TARGET) - e4:SetProperty(EFFECT_FLAG_SET_AVAILABLE) - e4:SetRange(LOCATION_MZONE) - e4:SetTargetRange(0,0xff) - e4:SetValue(c65025250.tgtg) - c:RegisterEffect(e4) -end -function c65025250.filter(c,tp) - return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) - and c:IsSetCard(0xb3) and not c:IsReason(REASON_REPLACE) -end -function c65025250.reptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return eg:IsExists(c65025250.filter,1,nil,tp) and not e:GetHandler():IsStatus(STATUS_DESTROY_CONFIRMED) end - return Duel.SelectYesNo(tp,aux.Stringid(65025250,1)) -end -function c65025250.repval(e,c) - return c65025250.filter(c,e:GetHandlerPlayer()) -end -function c65025250.repop(e,tp,eg,ep,ev,re,r,rp) - Duel.Destroy(e:GetHandler(),REASON_EFFECT+REASON_REPLACE) -end -function c65025250.postg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAttackPos() end - Duel.SetOperationInfo(0,CATEGORY_POSITION,e:GetHandler(),1,0,0) -end -function c65025250.posop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsPosition(POS_FACEUP_ATTACK) and c:IsRelateToEffect(e) then - Duel.ChangePosition(c,POS_FACEUP_DEFENCE) - end -end -function c65025250.tgtg(e,re,c) - return c~=e:GetHandler() and c:IsControler(e:GetHandlerPlayer()) and c:IsLocation(LOCATION_MZONE) and c:IsFaceup() and c:IsSetCard(0xb3) -end diff --git a/script/c65026212.lua b/script/c65026212.lua deleted file mode 100644 index cbcaf8f6ba..0000000000 --- a/script/c65026212.lua +++ /dev/null @@ -1,95 +0,0 @@ ---コアキメイル・マキシマム -function c65026212.initial_effect(c) - c:EnableReviveLimit() - --cost - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c65026212.mtcon) - e1:SetOperation(c65026212.mtop) - c:RegisterEffect(e1) - --spsummon proc - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_SPSUMMON_PROC) - e2:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e2:SetRange(LOCATION_HAND) - e2:SetCondition(c65026212.spcon) - e2:SetOperation(c65026212.spop) - c:RegisterEffect(e2) - --destroy - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(65026212,3)) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetCategory(CATEGORY_DESTROY) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1) - e3:SetTarget(c65026212.destg) - e3:SetOperation(c65026212.desop) - c:RegisterEffect(e3) -end -function c65026212.mtcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c65026212.cfilter1(c) - return c:IsCode(36623431) and c:IsAbleToGraveAsCost() -end -function c65026212.cfilter2(c) - return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x1d) and c:IsAbleToGraveAsCost() -end -function c65026212.mtop(e,tp,eg,ep,ev,re,r,rp) - local g1=Duel.GetMatchingGroup(c65026212.cfilter1,tp,LOCATION_HAND,0,nil) - local g2=Duel.GetMatchingGroup(c65026212.cfilter2,tp,LOCATION_HAND,0,nil) - local select=2 - if g1:GetCount()>0 and g2:GetCount()>0 then - select=Duel.SelectOption(tp,aux.Stringid(65026212,0),aux.Stringid(65026212,1),aux.Stringid(65026212,2)) - elseif g1:GetCount()>0 then - select=Duel.SelectOption(tp,aux.Stringid(65026212,0),aux.Stringid(65026212,2)) - if select==1 then select=2 end - elseif g2:GetCount()>0 then - select=Duel.SelectOption(tp,aux.Stringid(65026212,1),aux.Stringid(65026212,2)) - select=select+1 - end - if select==0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=g1:Select(tp,1,1,nil) - Duel.SendtoGrave(g,REASON_COST) - elseif select==1 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=g2:Select(tp,1,1,nil) - Duel.SendtoGrave(g,REASON_COST) - else - Duel.Destroy(e:GetHandler(),REASON_RULE) - end -end -function c65026212.spfilter(c) - return c:IsCode(36623431) and c:IsAbleToRemoveAsCost() -end -function c65026212.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c65026212.spfilter,tp,LOCATION_HAND,0,1,nil) -end -function c65026212.spop(e,tp,eg,ep,ev,re,r,rp,c) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c65026212.spfilter,tp,LOCATION_HAND,0,1,1,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c65026212.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and chkc:IsDestructable() end - if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,0,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,0,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c65026212.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c65056481.lua b/script/c65056481.lua deleted file mode 100644 index 8ba34afd75..0000000000 --- a/script/c65056481.lua +++ /dev/null @@ -1,30 +0,0 @@ ---星因士 シャム -function c65056481.initial_effect(c) - --damage - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(65056481,0)) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_DELAY) - e1:SetCountLimit(1,65056481) - e1:SetTarget(c65056481.damtg) - e1:SetOperation(c65056481.damop) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - c:RegisterEffect(e2) - local e3=e1:Clone() - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e3) -end -function c65056481.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(1000) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,1000) -end -function c65056481.damop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c65064143.lua b/script/c65064143.lua deleted file mode 100644 index b69a1edde4..0000000000 --- a/script/c65064143.lua +++ /dev/null @@ -1,29 +0,0 @@ ---対空放花 -function c65064143.initial_effect(c) - --damage - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(65064143,0)) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c65064143.damcost) - e1:SetTarget(c65064143.damtg) - e1:SetOperation(c65064143.damop) - c:RegisterEffect(e1) -end -function c65064143.damcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsRace,1,nil,RACE_INSECT) end - local g=Duel.SelectReleaseGroup(tp,Card.IsRace,1,1,nil,RACE_INSECT) - Duel.Release(g,REASON_COST) -end -function c65064143.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(800) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,0,0,1-tp,800) -end -function c65064143.damop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c65079854.lua b/script/c65079854.lua deleted file mode 100644 index a7815665a6..0000000000 --- a/script/c65079854.lua +++ /dev/null @@ -1,94 +0,0 @@ ---憎悪の棘 -function c65079854.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c65079854.target) - e1:SetOperation(c65079854.operation) - c:RegisterEffect(e1) - --Atk - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(600) - c:RegisterEffect(e2) - --Pierce - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_EQUIP) - e3:SetCode(EFFECT_PIERCE) - c:RegisterEffect(e3) - --Equip limit - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetCode(EFFECT_EQUIP_LIMIT) - e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e4:SetValue(c65079854.eqlimit) - c:RegisterEffect(e4) - --battle - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e5:SetRange(LOCATION_SZONE) - e5:SetCode(EVENT_DAMAGE_CALCULATING) - e5:SetCondition(c65079854.indescon) - e5:SetOperation(c65079854.indesop) - c:RegisterEffect(e5) - local e6=Effect.CreateEffect(c) - e6:SetDescription(aux.Stringid(65079854,0)) - e6:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e6:SetRange(LOCATION_SZONE) - e6:SetCode(EVENT_BATTLED) - e6:SetCondition(c65079854.adcon) - e6:SetOperation(c65079854.adop) - c:RegisterEffect(e6) -end -function c65079854.eqlimit(e,c) - return c:IsCode(73580471) or c:IsRace(RACE_PLANT) -end -function c65079854.filter(c) - return c:IsFaceup() and (c:IsCode(73580471) or c:IsRace(RACE_PLANT)) -end -function c65079854.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c65079854.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c65079854.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c65079854.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c65079854.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,c,tc) - end -end -function c65079854.indescon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetEquipTarget():GetBattleTarget()~=nil -end -function c65079854.indesop(e,tp,eg,ep,ev,re,r,rp) - local bc=e:GetHandler():GetEquipTarget():GetBattleTarget() - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e1:SetValue(1) - e1:SetReset(RESET_PHASE+PHASE_DAMAGE_CAL) - bc:RegisterEffect(e1,true) -end -function c65079854.adcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetAttacker()==e:GetHandler():GetEquipTarget() and Duel.GetAttackTarget()~=nil -end -function c65079854.adop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local bc=Duel.GetAttackTarget() - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(-600) - e1:SetReset(RESET_EVENT+0x1fe0000) - bc:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_UPDATE_DEFENCE) - bc:RegisterEffect(e2) -end diff --git a/script/c6511113.lua b/script/c6511113.lua deleted file mode 100644 index 3c8458043f..0000000000 --- a/script/c6511113.lua +++ /dev/null @@ -1,149 +0,0 @@ ---フレシアの蟲惑魔 -function c6511113.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,4,2) - c:EnableReviveLimit() - --immune - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_IMMUNE_EFFECT) - e1:SetCondition(c6511113.imcon) - e1:SetValue(c6511113.efilter) - c:RegisterEffect(e1) - --indes - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e2:SetRange(LOCATION_MZONE) - e2:SetTargetRange(LOCATION_MZONE,0) - e2:SetTarget(c6511113.imtg) - e2:SetValue(1) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - c:RegisterEffect(e3) - --cannot be target - local e4=e3:Clone() - e4:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) - e4:SetValue(aux.tgoval) - c:RegisterEffect(e4) - --copy trap - local e5=Effect.CreateEffect(c) - e5:SetDescription(aux.Stringid(6511113,0)) - e5:SetType(EFFECT_TYPE_QUICK_O) - e5:SetRange(LOCATION_MZONE) - e5:SetCode(EVENT_FREE_CHAIN) - e5:SetHintTiming(0x3c0) - e5:SetCountLimit(1) - e5:SetCondition(c6511113.condition) - e5:SetCost(c6511113.cost) - e5:SetTarget(c6511113.target) - e5:SetOperation(c6511113.operation) - c:RegisterEffect(e5) - local e6=Effect.CreateEffect(c) - e6:SetDescription(aux.Stringid(6511113,1)) - e6:SetType(EFFECT_TYPE_QUICK_O) - e6:SetRange(LOCATION_MZONE) - e6:SetCode(EVENT_CHAINING) - e6:SetCountLimit(1) - e6:SetCost(c6511113.cost) - e6:SetTarget(c6511113.target2) - e6:SetOperation(c6511113.operation) - c:RegisterEffect(e6) -end -function c6511113.imcon(e) - return e:GetHandler():GetOverlayCount()>0 -end -function c6511113.efilter(e,te) - return te:IsActiveType(TYPE_TRAP) -end -function c6511113.imtg(e,c) - return c:IsSetCard(0x108a) and not c:IsCode(6511113) -end -function c6511113.condition(e,tp,eg,ep,ev,re,r,rp) - return not Duel.CheckEvent(EVENT_CHAINING) -end -function c6511113.cost(e,tp,eg,ep,ev,re,r,rp,chk) - e:SetLabel(1) - if chk==0 then return e:GetHandler():GetFlagEffect(6511113)==0 end - e:GetHandler():RegisterFlagEffect(6511113,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) -end -function c6511113.filter1(c) - return c:GetType()==TYPE_TRAP and (c:IsSetCard(0x4c) or c:IsSetCard(0x89)) and c:IsAbleToGraveAsCost() - and c:CheckActivateEffect(false,true,false)~=nil -end -function c6511113.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - if e:GetLabel()==0 then return false end - e:SetLabel(0) - return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) - and Duel.IsExistingMatchingCard(c6511113.filter1,tp,LOCATION_DECK,0,1,nil) - end - e:SetLabel(0) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c6511113.filter1,tp,LOCATION_DECK,0,1,1,nil) - local te,ceg,cep,cev,cre,cr,crp=g:GetFirst():CheckActivateEffect(false,true,true) - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) - Duel.SendtoGrave(g,REASON_COST) - e:SetCategory(te:GetCategory()) - e:SetProperty(te:GetProperty()) - local tg=te:GetTarget() - if tg then tg(e,tp,ceg,cep,cev,cre,cr,crp,1) end - te:SetLabelObject(e:GetLabelObject()) - e:SetLabelObject(te) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,0,0,0) -end -function c6511113.operation(e,tp,eg,ep,ev,re,r,rp) - local te=e:GetLabelObject() - if not te then return end - e:SetLabelObject(te:GetLabelObject()) - local op=te:GetOperation() - if op then op(e,tp,eg,ep,ev,re,r,rp) end -end -function c6511113.filter2(c,e,tp,eg,ep,ev,re,r,rp) - if c:GetType()==TYPE_TRAP and (c:IsSetCard(0x4c) or c:IsSetCard(0x89)) and c:IsAbleToGraveAsCost() then - if c:CheckActivateEffect(false,true,false)~=nil then return true end - local te=c:GetActivateEffect() - if te:GetCode()~=EVENT_CHAINING then return false end - local con=te:GetCondition() - if con and not con(e,tp,eg,ep,ev,re,r,rp) then return false end - local tg=te:GetTarget() - if tg and not tg(e,tp,eg,ep,ev,re,r,rp,0) then return false end - return true - else return false end -end -function c6511113.target2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - if e:GetLabel()==0 then return false end - e:SetLabel(0) - return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) - and Duel.IsExistingMatchingCard(c6511113.filter2,tp,LOCATION_DECK,0,1,nil,e,tp,eg,ep,ev,re,r,rp) - end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c6511113.filter2,tp,LOCATION_DECK,0,1,1,nil,e,tp,eg,ep,ev,re,r,rp) - local tc=g:GetFirst() - local te,ceg,cep,cev,cre,cr,crp - local fchain=c6511113.filter1(tc) - if fchain then - te,ceg,cep,cev,cre,cr,crp=tc:CheckActivateEffect(false,true,true) - else - te=tc:GetActivateEffect() - end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) - Duel.SendtoGrave(g,REASON_COST) - e:SetCategory(te:GetCategory()) - e:SetProperty(te:GetProperty()) - local tg=te:GetTarget() - if tg then - if fchain then - tg(e,tp,ceg,cep,cev,cre,cr,crp,1) - else - tg(e,tp,eg,ep,ev,re,r,rp,1) - end - end - te:SetLabelObject(e:GetLabelObject()) - e:SetLabelObject(te) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,0,0,0) -end diff --git a/script/c65149697.lua b/script/c65149697.lua deleted file mode 100644 index 3556e6dc5c..0000000000 --- a/script/c65149697.lua +++ /dev/null @@ -1,28 +0,0 @@ ---レアル・ジェネクス・クラッシャー -function c65149697.initial_effect(c) - --search - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(65149697,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c65149697.target) - e1:SetOperation(c65149697.operation) - c:RegisterEffect(e1) -end -function c65149697.filter(c) - return c:GetLevel()==4 and c:IsSetCard(0x1002) and c:IsAbleToHand() -end -function c65149697.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c65149697.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c65149697.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c65149697.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c65150219.lua b/script/c65150219.lua deleted file mode 100644 index 3d6bd9b439..0000000000 --- a/script/c65150219.lua +++ /dev/null @@ -1,34 +0,0 @@ ---機甲忍法フリーズ・ロック -function c65150219.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetCondition(c65150219.condition) - e1:SetOperation(c65150219.activate) - c:RegisterEffect(e1) - --pos limit - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_CANNOT_CHANGE_POSITION) - e2:SetProperty(EFFECT_FLAG_SET_AVAILABLE) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(0,LOCATION_MZONE) - e2:SetCondition(c65150219.poscon) - c:RegisterEffect(e2) -end -function c65150219.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x2b) -end -function c65150219.condition(e,tp,eg,ep,ev,re,r,rp) - return tp~=Duel.GetTurnPlayer() and Duel.IsExistingMatchingCard(c65150219.cfilter,tp,LOCATION_MZONE,0,1,nil) -end -function c65150219.activate(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - if Duel.NegateAttack() then - Duel.SkipPhase(1-tp,PHASE_BATTLE,RESET_PHASE+PHASE_BATTLE,1) - end -end -function c65150219.poscon(e) - return Duel.IsExistingMatchingCard(c65150219.cfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) -end diff --git a/script/c65156847.lua b/script/c65156847.lua deleted file mode 100644 index 0c07e29a3a..0000000000 --- a/script/c65156847.lua +++ /dev/null @@ -1,36 +0,0 @@ ---ネオフレムベル・ガルーダ -function c65156847.initial_effect(c) - --remove - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(65156847,0)) - e1:SetCategory(CATEGORY_REMOVE) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetCondition(c65156847.rmcon) - e1:SetTarget(c65156847.rmtg) - e1:SetOperation(c65156847.rmop) - c:RegisterEffect(e1) -end -function c65156847.filter(c) - return c:IsFaceup() and c:IsSetCard(0x2c) -end -function c65156847.rmcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp - and Duel.IsExistingMatchingCard(c65156847.filter,tp,LOCATION_MZONE,0,1,e:GetHandler()) -end -function c65156847.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(1-tp) and chkc:IsAbleToRemove() end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,0) -end -function c65156847.rmop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) - end -end diff --git a/script/c65169794.lua b/script/c65169794.lua deleted file mode 100644 index 53cc8c627f..0000000000 --- a/script/c65169794.lua +++ /dev/null @@ -1,62 +0,0 @@ ---黒いペンダント -function c65169794.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c65169794.target) - e1:SetOperation(c65169794.operation) - c:RegisterEffect(e1) - --Atk up - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(500) - c:RegisterEffect(e2) - --Equip limit - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_EQUIP_LIMIT) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e3:SetValue(1) - c:RegisterEffect(e3) - --damage - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(65169794,0)) - e4:SetCategory(CATEGORY_DAMAGE) - e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e4:SetCode(EVENT_TO_GRAVE) - e4:SetCondition(c65169794.damcon) - e4:SetTarget(c65169794.damtg) - e4:SetOperation(c65169794.damop) - c:RegisterEffect(e4) -end -function c65169794.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c65169794.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,e:GetHandler(),tc) - end -end -function c65169794.damcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) -end -function c65169794.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(500) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,500) -end -function c65169794.damop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c65192027.lua b/script/c65192027.lua deleted file mode 100644 index 5ffda2314c..0000000000 --- a/script/c65192027.lua +++ /dev/null @@ -1,58 +0,0 @@ ---ダーク・アームド・ドラゴン -function c65192027.initial_effect(c) - c:EnableReviveLimit() - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(aux.FALSE) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(65192027,1)) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_SPSUMMON_PROC) - e2:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e2:SetRange(LOCATION_HAND) - e2:SetCondition(c65192027.spcon) - c:RegisterEffect(e2) - --destroy - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(65192027,2)) - e3:SetCategory(CATEGORY_DESTROY) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetRange(LOCATION_MZONE) - e3:SetCost(c65192027.cost) - e3:SetTarget(c65192027.target) - e3:SetOperation(c65192027.activate) - c:RegisterEffect(e3) -end -function c65192027.spcon(e,c) - if c==nil then return true end - return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and - Duel.GetMatchingGroupCount(Card.IsAttribute,c:GetControler(),LOCATION_GRAVE,0,nil,ATTRIBUTE_DARK)==3 -end -function c65192027.costfilter(c) - return c:IsAttribute(ATTRIBUTE_DARK) and c:IsAbleToRemoveAsCost() -end -function c65192027.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c65192027.costfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c65192027.costfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c65192027.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsDestructable() end - if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c65192027.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c65195959.lua b/script/c65195959.lua deleted file mode 100644 index 3624e4b5ba..0000000000 --- a/script/c65195959.lua +++ /dev/null @@ -1,36 +0,0 @@ ---EMプラスタートル -function c65195959.initial_effect(c) - --lv - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(65195959,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCountLimit(1) - e1:SetTarget(c65195959.target) - e1:SetOperation(c65195959.operation) - c:RegisterEffect(e1) -end -function c65195959.filter(c) - return c:IsFaceup() and c:GetLevel()>0 -end -function c65195959.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c65195959.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c65195959.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c65195959.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,2,nil) -end -function c65195959.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) - local tc=g:GetFirst() - while tc do - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_LEVEL) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetValue(1) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - tc=g:GetNext() - end -end diff --git a/script/c65196094.lua b/script/c65196094.lua deleted file mode 100644 index 8931ab7ac0..0000000000 --- a/script/c65196094.lua +++ /dev/null @@ -1,66 +0,0 @@ ---バラエティ・アウト -function c65196094.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c65196094.cost) - e1:SetTarget(c65196094.target) - e1:SetOperation(c65196094.activate) - c:RegisterEffect(e1) - Duel.AddCustomActivityCounter(65196094,ACTIVITY_SPSUMMON,c65196094.counterfilter) -end -function c65196094.counterfilter(c) - return c:GetSummonType()~=SUMMON_TYPE_SYNCHRO -end -function c65196094.cost(e,tp,eg,ep,ev,re,r,rp,chk) - e:SetLabel(1) - if chk==0 then return Duel.GetCustomActivityCount(65196094,tp,ACTIVITY_SPSUMMON)==0 end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) - e1:SetTargetRange(1,0) - e1:SetTarget(c65196094.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function c65196094.splimit(e,c,tp,sumtp,sumpos) - return bit.band(sumtp,SUMMON_TYPE_SYNCHRO)==SUMMON_TYPE_SYNCHRO -end -function c65196094.cfilter(c,e,tp,g,maxc) - return c:IsFaceup() and c:IsType(TYPE_SYNCHRO) and c:IsAbleToExtraAsCost() - and g:CheckWithSumEqual(Card.GetLevel,c:GetLevel(),1,maxc) -end -function c65196094.spfilter(c,e,tp) - return c:IsType(TYPE_TUNER) and c:IsCanBeEffectTarget(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c65196094.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if chk==0 then - if e:GetLabel()==0 then return false end - e:SetLabel(0) - if ft<0 then return end - local spg=Duel.GetMatchingGroup(c65196094.spfilter,tp,LOCATION_GRAVE,0,nil,e,tp) - return Duel.IsExistingMatchingCard(c65196094.cfilter,tp,LOCATION_MZONE,0,1,nil,e,tp,spg,ft+1) - end - e:SetLabel(0) - local spg=Duel.GetMatchingGroup(c65196094.spfilter,tp,LOCATION_GRAVE,0,nil,e,tp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local cg=Duel.SelectMatchingCard(tp,c65196094.cfilter,tp,LOCATION_MZONE,0,1,1,nil,e,tp,spg,ft+1) - local lv=cg:GetFirst():GetLevel() - Duel.SendtoDeck(cg,nil,0,REASON_COST) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=spg:SelectWithSumEqual(tp,Card.GetLevel,lv,1,ft+1) - Duel.SetTargetCard(sg) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,sg,sg:GetCount(),0,0) -end -function c65196094.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) - if g:GetCount()==0 or g:GetCount()>Duel.GetLocationCount(tp,LOCATION_MZONE) then return end - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) -end diff --git a/script/c652362.lua b/script/c652362.lua deleted file mode 100644 index ae3e742c99..0000000000 --- a/script/c652362.lua +++ /dev/null @@ -1,41 +0,0 @@ ---エーリアンモナイト -function c652362.initial_effect(c) - --summon success - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(652362,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c652362.sptg) - e1:SetOperation(c652362.spop) - c:RegisterEffect(e1) -end -function c652362.filter(c,e,tp) - local lv=c:GetLevel() - return lv>0 and lv<=4 and c:IsSetCard(0xc) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c652362.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c652362.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c652362.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c652362.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c652362.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)~=0 then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetOperation(c652362.desop) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e1:SetCountLimit(1) - tc:RegisterEffect(e1) - end -end -function c652362.desop(e,tp,eg,ep,ev,re,r,rp) - Duel.Destroy(e:GetHandler(),REASON_EFFECT) -end diff --git a/script/c65240384.lua b/script/c65240384.lua deleted file mode 100644 index 3ee8c8ef0c..0000000000 --- a/script/c65240384.lua +++ /dev/null @@ -1,36 +0,0 @@ ---ビッグ・シールド・ガードナー -function c65240384.initial_effect(c) - --to attack - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_DAMAGE_STEP_END) - e1:SetOperation(c65240384.posop) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_QUICK_F) - e2:SetCode(EVENT_CHAINING) - e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL+EFFECT_FLAG_SET_AVAILABLE) - e2:SetRange(LOCATION_MZONE) - e2:SetCondition(c65240384.negcon) - e2:SetOperation(c65240384.negop) - c:RegisterEffect(e2) -end -function c65240384.posop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c==Duel.GetAttackTarget() and c:IsDefencePos() and c:IsRelateToBattle() then - Duel.ChangePosition(c,POS_FACEUP_ATTACK) - end -end -function c65240384.negcon(e,tp,eg,ep,ev,re,r,rp) - if re:IsActiveType(TYPE_SPELL) and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then - local tg=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) - return tg:GetCount()==1 and tg:GetFirst()==e:GetHandler() and e:GetHandler():IsFacedown() - else - return false - end -end -function c65240384.negop(e,tp,eg,ep,ev,re,r,rp) - if Duel.ChangePosition(e:GetHandler(),POS_FACEUP_DEFENCE) then - Duel.NegateActivation(ev) - end -end diff --git a/script/c65247798.lua b/script/c65247798.lua deleted file mode 100644 index c20525970d..0000000000 --- a/script/c65247798.lua +++ /dev/null @@ -1,91 +0,0 @@ ---妖仙獣 鎌壱太刀 -function c65247798.initial_effect(c) - --summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(65247798,0)) - e1:SetCategory(CATEGORY_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DELAY) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c65247798.sumtg) - e1:SetOperation(c65247798.sumop) - c:RegisterEffect(e1) - --to hand - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(65247798,1)) - e2:SetCategory(CATEGORY_TOHAND) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_NO_TURN_RESET) - e2:SetCountLimit(1) - e2:SetCondition(c65247798.thcon) - e2:SetTarget(c65247798.thtg) - e2:SetOperation(c65247798.thop) - c:RegisterEffect(e2) - --return - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e3:SetCode(EVENT_SUMMON_SUCCESS) - e3:SetOperation(c65247798.regop) - c:RegisterEffect(e3) -end -function c65247798.filter(c) - return c:IsSetCard(0xb3) and not c:IsCode(65247798) and c:IsSummonable(true,nil) -end -function c65247798.sumtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c65247798.filter,tp,LOCATION_HAND,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,0,0) -end -function c65247798.sumop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON) - local g=Duel.SelectMatchingCard(tp,c65247798.filter,tp,LOCATION_HAND,0,1,1,nil) - if g:GetCount()>0 then - Duel.Summon(tp,g:GetFirst(),true,nil) - end -end -function c65247798.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0xb3) -end -function c65247798.thcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c65247798.cfilter,tp,LOCATION_MZONE,0,1,e:GetHandler()) -end -function c65247798.thfilter(c) - return c:IsFaceup() and c:IsAbleToHand() -end -function c65247798.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_ONFIELD) and chkc:IsControler(1-tp) and c65247798.thfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c65247798.thfilter,tp,0,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g=Duel.SelectTarget(tp,c65247798.thfilter,tp,0,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c65247798.thop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - end -end -function c65247798.regop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(65247798,2)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetTarget(c65247798.rettg) - e1:SetOperation(c65247798.retop) - e1:SetReset(RESET_EVENT+0x1ec0000+RESET_PHASE+PHASE_END) - c:RegisterEffect(e1) -end -function c65247798.rettg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0) -end -function c65247798.retop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SendtoHand(c,nil,REASON_EFFECT) - end -end diff --git a/script/c65260293.lua b/script/c65260293.lua deleted file mode 100644 index 53590a76e0..0000000000 --- a/script/c65260293.lua +++ /dev/null @@ -1,34 +0,0 @@ ---エレメント・マジシャン -function c65260293.initial_effect(c) - --control - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_CANNOT_CHANGE_CONTROL) - e1:SetCondition(c65260293.ctlcon) - c:RegisterEffect(e1) - --chain attack - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(65260293,0)) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_BATTLED) - e2:SetCondition(c65260293.atcon) - e2:SetOperation(c65260293.atop) - c:RegisterEffect(e2) -end -function c65260293.filter(c,att) - return c:IsFaceup() and c:IsAttribute(att) -end -function c65260293.ctlcon(e) - return Duel.IsExistingMatchingCard(c65260293.filter,0,LOCATION_MZONE,LOCATION_MZONE,1,nil,ATTRIBUTE_WATER) -end -function c65260293.atcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local bc=c:GetBattleTarget() - return bc and bc:IsStatus(STATUS_BATTLE_DESTROYED) and c:IsChainAttackable() and c:IsStatus(STATUS_OPPO_BATTLE) - and not c:IsDisabled() and Duel.IsExistingMatchingCard(c65260293.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,ATTRIBUTE_WIND) -end -function c65260293.atop(e,tp,eg,ep,ev,re,r,rp) - Duel.ChainAttack() -end diff --git a/script/c65277087.lua b/script/c65277087.lua deleted file mode 100644 index 85fd020163..0000000000 --- a/script/c65277087.lua +++ /dev/null @@ -1,33 +0,0 @@ ---ガスタ・ガルド -function c65277087.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(65277087,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCondition(c65277087.condition) - e1:SetTarget(c65277087.target) - e1:SetOperation(c65277087.operation) - c:RegisterEffect(e1) -end -function c65277087.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) -end -function c65277087.filter(c,e,tp) - return c:IsLevelBelow(2) and c:IsSetCard(0x10) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c65277087.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c65277087.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c65277087.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c65277087.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c65282484.lua b/script/c65282484.lua deleted file mode 100644 index 02350f5840..0000000000 --- a/script/c65282484.lua +++ /dev/null @@ -1,84 +0,0 @@ ---ダーク・ボルテニス -function c65282484.initial_effect(c) - --counter - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_CHAINING) - e1:SetRange(LOCATION_HAND) - e1:SetOperation(c65282484.chop1) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_CHAIN_SOLVED) - e2:SetRange(LOCATION_HAND) - e2:SetOperation(c65282484.chop2) - c:RegisterEffect(e2) - --special summon - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(65282484,0)) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_DELAY) - e3:SetCode(EVENT_CHAIN_END) - e3:SetRange(LOCATION_HAND) - e3:SetCondition(c65282484.spcon) - e3:SetCost(c65282484.spcost) - e3:SetTarget(c65282484.sptg) - e3:SetOperation(c65282484.spop) - c:RegisterEffect(e3) - e1:SetLabelObject(e3) - e2:SetLabelObject(e3) - --destroy - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(65282484,1)) - e4:SetCategory(CATEGORY_DESTROY) - e4:SetProperty(EFFECT_FLAG_CARD_TARGET) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e4:SetCode(EVENT_SPSUMMON_SUCCESS) - e4:SetCondition(c65282484.descon) - e4:SetTarget(c65282484.destg) - e4:SetOperation(c65282484.desop) - c:RegisterEffect(e4) -end -function c65282484.chop1(e,tp,eg,ep,ev,re,r,rp) - e:GetLabelObject():SetLabel(0) -end -function c65282484.chop2(e,tp,eg,ep,ev,re,r,rp) - if rp~=tp or not re:IsActiveType(TYPE_COUNTER) then return end - e:GetLabelObject():SetLabel(1) -end -function c65282484.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetLabel()==1 -end -function c65282484.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsAttribute,1,nil,ATTRIBUTE_DARK) end - local g=Duel.SelectReleaseGroup(tp,Card.IsAttribute,1,1,nil,ATTRIBUTE_DARK) - Duel.Release(g,REASON_COST) -end -function c65282484.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c65282484.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,1,tp,tp,false,false,POS_FACEUP) - end -end -function c65282484.descon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+1 -end -function c65282484.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsDestructable() end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c65282484.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c65287621.lua b/script/c65287621.lua deleted file mode 100644 index e1fa7c67aa..0000000000 --- a/script/c65287621.lua +++ /dev/null @@ -1,8 +0,0 @@ ---暗黒ドリケラトプス -function c65287621.initial_effect(c) - --pierce - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_PIERCE) - c:RegisterEffect(e1) -end diff --git a/script/c65301952.lua b/script/c65301952.lua deleted file mode 100644 index c8e96f8449..0000000000 --- a/script/c65301952.lua +++ /dev/null @@ -1,56 +0,0 @@ ---アルケミック・マジシャン -function c65301952.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsRace,RACE_SPELLCASTER),4,3) - c:EnableReviveLimit() - --atkup - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(c65301952.atkval) - c:RegisterEffect(e1) - --set - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(65301952,0)) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_PHASE+PHASE_END) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCondition(c65301952.setcon) - e2:SetCost(c65301952.setcost) - e2:SetTarget(c65301952.settg) - e2:SetOperation(c65301952.setop) - c:RegisterEffect(e2) -end -function c65301952.atkval(e,c) - return Duel.GetMatchingGroupCount(Card.IsType,c:GetControler(),LOCATION_GRAVE,0,nil,TYPE_SPELL)*200 -end -function c65301952.setcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c65301952.setcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) - and Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,1,nil) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,1,1,nil) - Duel.SendtoGrave(g,REASON_COST) -end -function c65301952.filter(c) - return c:IsType(TYPE_SPELL) and not c:IsType(TYPE_FIELD) and c:IsSSetable() -end -function c65301952.settg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingMatchingCard(c65301952.filter,tp,LOCATION_DECK,0,1,nil) end -end -function c65301952.setop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) - local g=Duel.SelectMatchingCard(tp,c65301952.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SSet(tp,g:GetFirst()) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c65303664.lua b/script/c65303664.lua deleted file mode 100644 index 700cd9e71e..0000000000 --- a/script/c65303664.lua +++ /dev/null @@ -1,43 +0,0 @@ ---森の狩人イエロー・バブーン -function c65303664.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(65303664,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetRange(LOCATION_HAND) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetCondition(c65303664.condition) - e1:SetCost(c65303664.cost) - e1:SetTarget(c65303664.target) - e1:SetOperation(c65303664.operation) - c:RegisterEffect(e1) -end -function c65303664.cfilter(c,tp) - return c:IsLocation(LOCATION_GRAVE) and c:IsType(TYPE_MONSTER) and c:IsRace(RACE_BEAST) and c:IsReason(REASON_BATTLE) - and c:IsPreviousPosition(POS_FACEUP) and c:GetPreviousControler()==tp - and bit.band(c:GetPreviousRaceOnField(),RACE_BEAST)~=0 -end -function c65303664.condition(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c65303664.cfilter,1,nil,tp) -end -function c65303664.rfiletr(c) - return c:IsRace(RACE_BEAST) and c:IsAbleToRemoveAsCost() -end -function c65303664.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c65303664.rfiletr,tp,LOCATION_GRAVE,0,2,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c65303664.rfiletr,tp,LOCATION_GRAVE,0,2,2,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c65303664.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c65303664.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c65305468.lua b/script/c65305468.lua deleted file mode 100644 index 7569c2637b..0000000000 --- a/script/c65305468.lua +++ /dev/null @@ -1,120 +0,0 @@ ---FNo.0 未来皇ホープ -function c65305468.initial_effect(c) - --xyz summon - c:EnableReviveLimit() - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetRange(LOCATION_EXTRA) - e1:SetCondition(c65305468.xyzcon) - e1:SetOperation(c65305468.xyzop) - e1:SetValue(SUMMON_TYPE_XYZ) - c:RegisterEffect(e1) - --indes - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e3:SetValue(1) - c:RegisterEffect(e3) - --avoid damage - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetCode(EFFECT_NO_BATTLE_DAMAGE) - c:RegisterEffect(e4) - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_SINGLE) - e5:SetCode(EFFECT_AVOID_BATTLE_DAMAGE) - e5:SetValue(1) - c:RegisterEffect(e5) - --control - local e6=Effect.CreateEffect(c) - e6:SetDescription(aux.Stringid(65305468,0)) - e6:SetCategory(CATEGORY_CONTROL) - e6:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e6:SetCode(EVENT_DAMAGE_STEP_END) - e6:SetTarget(c65305468.cttg) - e6:SetOperation(c65305468.ctop) - c:RegisterEffect(e6) - --destroy replace - local e7=Effect.CreateEffect(c) - e7:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e7:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e7:SetCode(EFFECT_DESTROY_REPLACE) - e7:SetRange(LOCATION_MZONE) - e7:SetTarget(c65305468.reptg) - c:RegisterEffect(e7) - if not c65305468.xyz_filter then - c65305468.xyz_filter=function(mc) return mc:IsType(TYPE_XYZ) and not mc:IsSetCard(0x48) and mc:IsCanBeXyzMaterial(c) end - end -end -c65305468.xyz_number=0 -c65305468.xyz_count=2 -function c65305468.mfilter(c,xyzc) - return c:IsFaceup() and c:IsType(TYPE_XYZ) and not c:IsSetCard(0x48) and c:IsCanBeXyzMaterial(xyzc) -end -function c65305468.xyzfilter1(c,g) - return g:IsExists(c65305468.xyzfilter2,1,c,c:GetRank()) -end -function c65305468.xyzfilter2(c,rk) - return c:GetRank()==rk -end -function c65305468.xyzcon(e,c,og) - if c==nil then return true end - local tp=c:GetControler() - local mg=nil - if og then - mg=og:Filter(c65305468.mfilter,nil,c) - else - mg=Duel.GetMatchingGroup(c65305468.mfilter,tp,LOCATION_MZONE,0,nil,c) - end - return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and mg:IsExists(c65305468.xyzfilter1,1,nil,mg) -end -function c65305468.xyzop(e,tp,eg,ep,ev,re,r,rp,c,og) - local g=nil - local sg=Group.CreateGroup() - if og then - g=og - local tc=og:GetFirst() - while tc do - sg:Merge(tc:GetOverlayGroup()) - tc=og:GetNext() - end - else - local mg=Duel.GetMatchingGroup(c65305468.mfilter,tp,LOCATION_MZONE,0,nil) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL) - g=mg:FilterSelect(tp,c65305468.xyzfilter1,1,1,nil,mg) - local tc1=g:GetFirst() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL) - local g2=mg:FilterSelect(tp,c65305468.xyzfilter2,1,1,tc1,tc1:GetRank()) - local tc2=g2:GetFirst() - g:Merge(g2) - sg:Merge(tc1:GetOverlayGroup()) - sg:Merge(tc2:GetOverlayGroup()) - end - Duel.SendtoGrave(sg,REASON_RULE) - c:SetMaterial(g) - Duel.Overlay(c,g) -end -function c65305468.cttg(e,tp,eg,ep,ev,re,r,rp,chk) - local tc=e:GetHandler():GetBattleTarget() - if chk==0 then return tc and tc:IsRelateToBattle() and tc:IsControlerCanBeChanged() end - Duel.SetOperationInfo(0,CATEGORY_CONTROL,tc,1,0,0) -end -function c65305468.ctop(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetHandler():GetBattleTarget() - if tc:IsRelateToBattle() and not Duel.GetControl(tc,tp,PHASE_BATTLE,1) then - if not tc:IsImmuneToEffect(e) and tc:IsAbleToChangeControler() then - Duel.Destroy(tc,REASON_EFFECT) - end - end -end -function c65305468.reptg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsReason(REASON_EFFECT) and c:CheckRemoveOverlayCard(tp,1,REASON_EFFECT) end - if Duel.SelectYesNo(tp,aux.Stringid(65305468,1)) then - c:RemoveOverlayCard(tp,1,1,REASON_EFFECT) - return true - else return false end -end diff --git a/script/c65331686.lua b/script/c65331686.lua deleted file mode 100644 index 40d6a7e2de..0000000000 --- a/script/c65331686.lua +++ /dev/null @@ -1,118 +0,0 @@ ---ファーニマル・オウル -function c65331686.initial_effect(c) - --search - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(65331686,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e1:SetCountLimit(1,65331686) - e1:SetCondition(c65331686.thcon) - e1:SetTarget(c65331686.thtg) - e1:SetOperation(c65331686.thop) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e2) - --spsummon - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(65331686,1)) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1,65331686) - e3:SetCost(c65331686.cost) - e3:SetTarget(c65331686.target) - e3:SetOperation(c65331686.operation) - c:RegisterEffect(e3) -end -function c65331686.thcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_HAND) -end -function c65331686.thfilter(c) - return c:IsCode(24094653) and c:IsAbleToHand() -end -function c65331686.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chk==0 then return Duel.IsExistingMatchingCard(c65331686.thfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c65331686.thop(e,tp,eg,ep,ev,re,r,rp,chk) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c65331686.thfilter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end -function c65331686.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,500) end - Duel.PayLPCost(tp,500) -end -function c65331686.filter1(c,e) - return c:IsCanBeFusionMaterial() and not c:IsImmuneToEffect(e) -end -function c65331686.filter2(c,e,tp,m,f,chkf) - return c:IsType(TYPE_FUSION) and c:IsSetCard(0xad) and (not f or f(c)) - and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf) -end -function c65331686.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp - local mg1=Duel.GetMatchingGroup(Card.IsCanBeFusionMaterial,tp,LOCATION_HAND+LOCATION_MZONE,0,nil) - local res=Duel.IsExistingMatchingCard(c65331686.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf) - if not res then - local ce=Duel.GetChainMaterial(tp) - if ce~=nil then - local fgroup=ce:GetTarget() - local mg2=fgroup(ce,e,tp) - local mf=ce:GetValue() - res=Duel.IsExistingMatchingCard(c65331686.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,chkf) - end - end - return res - end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function c65331686.operation(e,tp,eg,ep,ev,re,r,rp) - local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp - local mg1=Duel.GetMatchingGroup(c65331686.filter1,tp,LOCATION_HAND+LOCATION_MZONE,0,nil,e) - local sg1=Duel.GetMatchingGroup(c65331686.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf) - local mg2=nil - local sg2=nil - local ce=Duel.GetChainMaterial(tp) - if ce~=nil then - local fgroup=ce:GetTarget() - mg2=fgroup(ce,e,tp) - local mf=ce:GetValue() - sg2=Duel.GetMatchingGroup(c65331686.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,mf,chkf) - end - if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then - local sg=sg1:Clone() - if sg2 then sg:Merge(sg2) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local tg=sg:Select(tp,1,1,nil) - local tc=tg:GetFirst() - if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then - local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf) - tc:SetMaterial(mat1) - Duel.SendtoGrave(mat1,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION) - Duel.BreakEffect() - Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP) - else - local mat2=Duel.SelectFusionMaterial(tp,tc,mg2,nil,chkf) - local fop=ce:GetOperation() - fop(ce,e,tp,tc,mat2) - end - tc:CompleteProcedure() - else - local cg1=Duel.GetFieldGroup(tp,LOCATION_HAND+LOCATION_MZONE,0) - local cg2=Duel.GetFieldGroup(tp,LOCATION_EXTRA,0) - if cg1:GetCount()>1 and cg2:IsExists(Card.IsFacedown,1,nil) - and Duel.IsPlayerCanSpecialSummon(tp) and not Duel.IsPlayerAffectedByEffect(tp,27581098) then - Duel.ConfirmCards(1-tp,cg1) - Duel.ConfirmCards(1-tp,cg2) - Duel.ShuffleHand(tp) - end - end -end diff --git a/script/c65338781.lua b/script/c65338781.lua deleted file mode 100644 index 2438e3c997..0000000000 --- a/script/c65338781.lua +++ /dev/null @@ -1,85 +0,0 @@ ---熟練の赤魔術士 -function c65338781.initial_effect(c) - c:EnableCounterPermit(0x3001) - c:SetCounterLimit(0x3001,3) - --add counter - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EVENT_CHAINING) - e1:SetRange(LOCATION_MZONE) - e1:SetOperation(aux.chainreg) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_CHAIN_SOLVED) - e2:SetRange(LOCATION_MZONE) - e2:SetOperation(c65338781.acop) - c:RegisterEffect(e2) - --special summon - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(65338781,0)) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_MZONE) - e3:SetCost(c65338781.spcost) - e3:SetTarget(c65338781.sptg) - e3:SetOperation(c65338781.spop) - c:RegisterEffect(e3) - --counter - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(65338781,1)) - e4:SetType(EFFECT_TYPE_IGNITION) - e4:SetRange(LOCATION_GRAVE) - e4:SetProperty(EFFECT_FLAG_CARD_TARGET) - e4:SetCost(c65338781.ctcost) - e4:SetTarget(c65338781.cttg) - e4:SetOperation(c65338781.ctop) - c:RegisterEffect(e4) -end -function c65338781.acop(e,tp,eg,ep,ev,re,r,rp) - if re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL) and e:GetHandler():GetFlagEffect(1)>0 then - e:GetHandler():AddCounter(0x3001,1) - end -end -function c65338781.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():GetCounter(0x3001)==3 and e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end -function c65338781.filter(c,e,tp) - return c:IsSetCard(0x45) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) - and not c:IsHasEffect(EFFECT_NECRO_VALLEY) -end -function c65338781.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsExistingMatchingCard(c65338781.filter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE) -end -function c65338781.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c65338781.filter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end -function c65338781.ctcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) -end -function c65338781.ctfilter(c) - return c:IsFaceup() and c:IsCanAddCounter(0x3001,1) -end -function c65338781.cttg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsControler(tp) and c65338781.ctfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c65338781.ctfilter,tp,LOCATION_ONFIELD,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(65338781,2)) - Duel.SelectTarget(tp,c65338781.ctfilter,tp,LOCATION_ONFIELD,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,1,0,0x3001) -end -function c65338781.ctop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - tc:AddCounter(0x3001,1) - end -end diff --git a/script/c65367484.lua b/script/c65367484.lua deleted file mode 100644 index 860709603d..0000000000 --- a/script/c65367484.lua +++ /dev/null @@ -1,26 +0,0 @@ ---フォトン・スラッシャー -function c65367484.initial_effect(c) - c:EnableReviveLimit() - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c65367484.spcon) - c:RegisterEffect(e1) - --cannot attack - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_CANNOT_ATTACK) - e2:SetCondition(c65367484.atcon) - c:RegisterEffect(e2) -end -function c65367484.spcon(e,c) - if c==nil then return true end - return Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0,nil)==0 - and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 -end -function c65367484.atcon(e) - return Duel.GetFieldGroupCount(e:GetHandlerPlayer(),LOCATION_MZONE,0)>1 -end diff --git a/script/c65384019.lua b/script/c65384019.lua deleted file mode 100644 index 4fa036b82a..0000000000 --- a/script/c65384019.lua +++ /dev/null @@ -1,69 +0,0 @@ ---アルケミー・サイクル -function c65384019.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetCondition(c65384019.condition) - e1:SetTarget(c65384019.target) - e1:SetOperation(c65384019.activate) - c:RegisterEffect(e1) -end -function c65384019.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end -function c65384019.filter(c) - return c:IsFaceup() and c:GetBaseAttack()~=0 -end -function c65384019.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c65384019.filter,tp,LOCATION_MZONE,0,1,nil) end -end -function c65384019.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c65384019.filter,tp,LOCATION_MZONE,0,nil) - local c=e:GetHandler() - local fid=c:GetFieldID() - local tc=g:GetFirst() - while tc do - if not tc:IsImmuneToEffect(e) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_BASE_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e1:SetValue(0) - tc:RegisterEffect(e1) - tc:RegisterFlagEffect(65384019,RESET_EVENT+0x17a0000+RESET_PHASE+PHASE_END,0,1,fid) - end - tc=g:GetNext() - end - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(65384019,0)) - e2:SetCategory(CATEGORY_DRAW) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetCode(EVENT_BATTLE_DESTROYED) - e2:SetCondition(c65384019.drcon) - e2:SetTarget(c65384019.drtg) - e2:SetOperation(c65384019.drop) - e2:SetReset(RESET_PHASE+PHASE_END) - e2:SetLabel(fid) - Duel.RegisterEffect(e2,tp) -end -function c65384019.drfilter(c,fid) - return c:GetFlagEffectLabel(65384019)==fid -end -function c65384019.drcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c65384019.drfilter,1,nil,e:GetLabel()) -end -function c65384019.drtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(1) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c65384019.drop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end diff --git a/script/c65384188.lua b/script/c65384188.lua deleted file mode 100644 index 995fb534c4..0000000000 --- a/script/c65384188.lua +++ /dev/null @@ -1,94 +0,0 @@ ---実力伯仲 -function c65384188.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c65384188.target) - e1:SetOperation(c65384188.activate) - c:RegisterEffect(e1) -end -function c65384188.filter(c) - return c:IsPosition(POS_FACEUP_ATTACK) and c:IsType(TYPE_EFFECT) -end -function c65384188.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - if chk==0 then return Duel.IsExistingTarget(c65384188.filter,tp,LOCATION_MZONE,0,1,nil) - and Duel.IsExistingTarget(c65384188.filter,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUPATTACK) - Duel.SelectTarget(tp,c65384188.filter,tp,LOCATION_MZONE,0,1,1,nil) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUPATTACK) - Duel.SelectTarget(tp,c65384188.filter,tp,0,LOCATION_MZONE,1,1,nil) -end -function c65384188.activate(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc1,tc2=Duel.GetFirstTarget() - if tc1:IsRelateToEffect(e) and tc1:IsFaceup() and tc2:IsRelateToEffect(e) and tc2:IsFaceup() then - local a=0 - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+0x1fe0000) - if not tc1:IsDisabled() then - tc1:RegisterEffect(e1) - tc1:RegisterEffect(e2) - a=a+1 - end - if not tc2:IsDisabled() then - local e3=e1:Clone() - local e4=e2:Clone() - tc2:RegisterEffect(e3) - tc2:RegisterEffect(e4) - a=a+1 - end - if tc1:IsDefencePos() or tc2:IsDefencePos() or a~=2 then return end - Duel.BreakEffect() - c65384188.reg(c,tc1,tc2) - c65384188.reg(c,tc2,tc1) - end -end -function c65384188.reg(c,tc1,tc2) - tc1:RegisterFlagEffect(65384188,RESET_EVENT+0x1fe0000,0,0) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_CHANGE_POS) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetOperation(c65384188.posop) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc1:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e2:SetCondition(c65384188.effcon) - e2:SetValue(1) - e2:SetReset(RESET_EVENT+0x1fe0000) - e2:SetLabelObject(tc2) - tc1:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EFFECT_CANNOT_CHANGE_POSITION) - tc1:RegisterEffect(e3) - local e4=e2:Clone() - e4:SetCode(EFFECT_CANNOT_ATTACK) - tc1:RegisterEffect(e4) - local e5=e2:Clone() - e5:SetCode(EFFECT_IMMUNE_EFFECT) - e5:SetValue(c65384188.efilter) - tc1:RegisterEffect(e5) -end -function c65384188.posop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:GetFlagEffect(65384188)~=0 and not c:IsPosition(POS_FACEUP_ATTACK) then - c:ResetFlagEffect(65384188) - end -end -function c65384188.effcon(e) - return e:GetHandler():GetFlagEffect(65384188)~=0 and e:GetLabelObject():GetFlagEffect(65384188)~=0 -end -function c65384188.efilter(e,te) - return te:GetOwner()~=e:GetOwner() -end diff --git a/script/c65393205.lua b/script/c65393205.lua deleted file mode 100644 index 9d1b3aed00..0000000000 --- a/script/c65393205.lua +++ /dev/null @@ -1,4 +0,0 @@ ---チャクラ -function c65393205.initial_effect(c) - c:EnableReviveLimit() -end diff --git a/script/c65396880.lua b/script/c65396880.lua deleted file mode 100644 index 652d8f982e..0000000000 --- a/script/c65396880.lua +++ /dev/null @@ -1,36 +0,0 @@ ---大革命 -function c65396880.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_TOGRAVE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c65396880.condition) - e1:SetTarget(c65396880.target) - e1:SetOperation(c65396880.activate) - c:RegisterEffect(e1) -end -function c65396880.cfilter(c,code) - return c:IsFaceup() and c:IsCode(code) -end -function c65396880.condition(e,tp,eg,ep,ev,re,r,rp) - local ph=Duel.GetCurrentPhase() - return Duel.GetTurnPlayer()==tp and (ph==PHASE_MAIN1 or ph==PHASE_MAIN2) - and Duel.IsExistingMatchingCard(c65396880.cfilter,tp,LOCATION_ONFIELD,0,1,nil,58538870) - and Duel.IsExistingMatchingCard(c65396880.cfilter,tp,LOCATION_ONFIELD,0,1,nil,12143771) - and Duel.IsExistingMatchingCard(c65396880.cfilter,tp,LOCATION_ONFIELD,0,1,nil,85936485) -end -function c65396880.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDestructable,tp,0,LOCATION_ONFIELD,1,nil) - or Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)~=0 end - local g1=Duel.GetMatchingGroup(Card.IsDestructable,tp,0,LOCATION_ONFIELD,nil) - local g2=Duel.GetFieldGroup(tp,0,LOCATION_HAND) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g1,g1:GetCount(),0,0) - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g2,g2:GetCount(),0,0) -end -function c65396880.activate(e,tp,eg,ep,ev,re,r,rp) - local g1=Duel.GetMatchingGroup(Card.IsDestructable,tp,0,LOCATION_ONFIELD,nil) - Duel.Destroy(g1,REASON_EFFECT) - local g2=Duel.GetFieldGroup(tp,0,LOCATION_HAND) - Duel.SendtoGrave(g2,REASON_EFFECT) -end diff --git a/script/c65403020.lua b/script/c65403020.lua deleted file mode 100644 index c4f46eb2b0..0000000000 --- a/script/c65403020.lua +++ /dev/null @@ -1,24 +0,0 @@ ---エンド・オブ・アヌビス -function c65403020.initial_effect(c) - --negate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EVENT_CHAIN_SOLVING) - e1:SetCondition(c65403020.condition) - e1:SetOperation(c65403020.operation) - c:RegisterEffect(e1) -end -function c65403020.gfilter(c) - return c:IsLocation(LOCATION_GRAVE) -end -function c65403020.condition(e,tp,eg,ep,ev,re,r,rp) - local loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION) - if loc==LOCATION_GRAVE then return true end - if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end - local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) - return g and g:IsExists(c65403020.gfilter,1,nil) -end -function c65403020.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateEffect(ev) -end diff --git a/script/c6540606.lua b/script/c6540606.lua deleted file mode 100644 index 2597354adc..0000000000 --- a/script/c6540606.lua +++ /dev/null @@ -1,35 +0,0 @@ ---水霊術-「葵」 -function c6540606.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOGRAVE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_TOHAND) - e1:SetCost(c6540606.cost) - e1:SetTarget(c6540606.target) - e1:SetOperation(c6540606.activate) - c:RegisterEffect(e1) -end -function c6540606.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsAttribute,1,nil,ATTRIBUTE_WATER) end - local g=Duel.SelectReleaseGroup(tp,Card.IsAttribute,1,1,nil,ATTRIBUTE_WATER) - Duel.Release(g,REASON_COST) -end -function c6540606.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0 end - Duel.SetTargetPlayer(tp) - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,1-tp,LOCATION_HAND) -end -function c6540606.activate(e,tp,eg,ep,ev,re,r,rp) - local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) - local g=Duel.GetFieldGroup(p,0,LOCATION_HAND) - if g:GetCount()>0 then - Duel.ConfirmCards(p,g) - Duel.Hint(HINT_SELECTMSG,p,HINTMSG_TOGRAVE) - local sg=g:Select(p,1,1,nil) - Duel.SendtoGrave(sg,REASON_EFFECT) - Duel.ShuffleHand(1-p) - end -end diff --git a/script/c65422840.lua b/script/c65422840.lua deleted file mode 100644 index b3628e83a8..0000000000 --- a/script/c65422840.lua +++ /dev/null @@ -1,63 +0,0 @@ ---酒呑童子 -function c65422840.initial_effect(c) - --Draw - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(65422840,0)) - e1:SetCategory(CATEGORY_DRAW) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE) - e1:SetCost(c65422840.drcost) - e1:SetTarget(c65422840.drtg) - e1:SetOperation(c65422840.drop) - c:RegisterEffect(e1) - --todeck - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(65422840,1)) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCategory(CATEGORY_TODECK) - e2:SetRange(LOCATION_MZONE) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE) - e2:SetTarget(c65422840.tdtg) - e2:SetOperation(c65422840.tdop) - c:RegisterEffect(e2) -end -function c65422840.cfilter(c) - return c:IsRace(RACE_ZOMBIE) and c:IsAbleToRemoveAsCost() -end -function c65422840.drcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c65422840.cfilter,tp,LOCATION_GRAVE,0,2,nil) end - Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c65422840.cfilter,tp,LOCATION_GRAVE,0,2,2,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c65422840.drtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(1) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c65422840.drop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end -function c65422840.filter(c) - return c:IsFaceup() and c:IsRace(RACE_ZOMBIE) and c:IsAbleToDeck() -end -function c65422840.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and c65422840.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c65422840.filter,tp,LOCATION_REMOVED,0,1,nil) end - Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectTarget(tp,c65422840.filter,tp,LOCATION_REMOVED,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0) -end -function c65422840.tdop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoDeck(tc,nil,0,REASON_EFFECT) - end -end diff --git a/script/c6544078.lua b/script/c6544078.lua deleted file mode 100644 index f1e9502183..0000000000 --- a/script/c6544078.lua +++ /dev/null @@ -1,33 +0,0 @@ ---伊弉凪 -function c6544078.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(6544078,0)) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c6544078.spcon) - e1:SetOperation(c6544078.spop) - c:RegisterEffect(e1) - --spirit may not return - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_SPIRIT_MAYNOT_RETURN) - e2:SetRange(LOCATION_MZONE) - e2:SetTargetRange(LOCATION_MZONE,0) - c:RegisterEffect(e2) -end -function c6544078.filter(c) - return c:IsType(TYPE_SPIRIT) and c:IsAbleToRemoveAsCost() -end -function c6544078.spcon(e,c) - if c==nil then return true end - return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c6544078.filter,c:GetControler(),LOCATION_HAND,0,1,nil) -end -function c6544078.spop(e,tp,eg,ep,ev,re,r,rp,c) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c6544078.filter,tp,LOCATION_HAND,0,1,1,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end diff --git a/script/c65446452.lua b/script/c65446452.lua deleted file mode 100644 index 307f0f944e..0000000000 --- a/script/c65446452.lua +++ /dev/null @@ -1,67 +0,0 @@ ---水舞台装置 -function c65446452.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --atk & def - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(LOCATION_MZONE,0) - e2:SetTarget(aux.TargetBoolFunction(Card.IsAttribute,ATTRIBUTE_WATER)) - e2:SetValue(300) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EFFECT_UPDATE_DEFENCE) - c:RegisterEffect(e3) - local e4=e2:Clone() - e4:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0xcd)) - c:RegisterEffect(e4) - local e5=e4:Clone() - e5:SetCode(EFFECT_UPDATE_DEFENCE) - c:RegisterEffect(e5) - --spsummon - local e6=Effect.CreateEffect(c) - e6:SetCategory(CATEGORY_SPECIAL_SUMMON) - e6:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e6:SetCode(EVENT_TO_GRAVE) - e6:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e6:SetCondition(c65446452.spcon) - e6:SetTarget(c65446452.sptg) - e6:SetOperation(c65446452.spop) - c:RegisterEffect(e6) -end -function c65446452.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) -end -function c65446452.spfilter(c,e,tp) - return c:IsRace(RACE_AQUA) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c65446452.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c65446452.spfilter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c65446452.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c65446452.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c65446452.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetTargetRange(1,0) - e1:SetTarget(c65446452.splimit) - e1:SetReset(RESET_PHASE+RESET_END) - Duel.RegisterEffect(e1,tp) -end -function c65446452.splimit(e,c,sump,sumtype,sumpos,targetp,se) - return c:GetRace()~=RACE_AQUA -end diff --git a/script/c65450690.lua b/script/c65450690.lua deleted file mode 100644 index ab13314453..0000000000 --- a/script/c65450690.lua +++ /dev/null @@ -1,63 +0,0 @@ ---限定解除 -function c65450690.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,65450690+EFFECT_COUNT_CODE_OATH) - e1:SetCost(c65450690.cost) - e1:SetTarget(c65450690.target) - e1:SetOperation(c65450690.activate) - c:RegisterEffect(e1) -end -function c65450690.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,1000) end - Duel.PayLPCost(tp,1000) -end -function c65450690.filter(c,e,tp) - return bit.band(c:GetType(),0x81)==0x81 and c:IsCanBeSpecialSummoned(e,0,tp,false,true) -end -function c65450690.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c65450690.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,LOCATION_HAND) -end -function c65450690.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c65450690.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - local tc=g:GetFirst() - if tc then - Duel.SpecialSummon(tc,0,tp,tp,false,true,POS_FACEUP) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1,true) - tc:RegisterFlagEffect(65450690,RESET_EVENT+0x1fe0000,0,1) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_PHASE+PHASE_END) - e2:SetCountLimit(1) - e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e2:SetLabelObject(tc) - e2:SetCondition(c65450690.descon) - e2:SetOperation(c65450690.desop) - Duel.RegisterEffect(e2,tp) - end -end -function c65450690.descon(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetLabelObject() - if tc:GetFlagEffect(65450690)~=0 then - return true - else - e:Reset() - return false - end -end -function c65450690.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetLabelObject() - Duel.Destroy(tc,REASON_EFFECT) -end diff --git a/script/c65458948.lua b/script/c65458948.lua deleted file mode 100644 index 2ba84ac781..0000000000 --- a/script/c65458948.lua +++ /dev/null @@ -1,93 +0,0 @@ ---トゥーン・マーメイド -function c65458948.initial_effect(c) - c:EnableReviveLimit() - --special summon rule - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_SPSUMMON_PROC) - e2:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e2:SetRange(LOCATION_HAND) - e2:SetCondition(c65458948.spcon) - c:RegisterEffect(e2) - --destroy - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e3:SetRange(LOCATION_MZONE) - e3:SetCode(EVENT_LEAVE_FIELD) - e3:SetCondition(c65458948.sdescon) - e3:SetOperation(c65458948.sdesop) - c:RegisterEffect(e3) - --direct attack - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetCode(EFFECT_DIRECT_ATTACK) - e4:SetCondition(c65458948.dircon) - c:RegisterEffect(e4) - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_SINGLE) - e5:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET) - e5:SetCondition(c65458948.atcon) - e5:SetValue(c65458948.atlimit) - c:RegisterEffect(e5) - local e6=Effect.CreateEffect(c) - e6:SetType(EFFECT_TYPE_SINGLE) - e6:SetCode(EFFECT_CANNOT_DIRECT_ATTACK) - e6:SetCondition(c65458948.atcon) - c:RegisterEffect(e6) - --cannot attack - local e7=Effect.CreateEffect(c) - e7:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e7:SetCode(EVENT_SPSUMMON_SUCCESS) - e7:SetOperation(c65458948.atklimit) - c:RegisterEffect(e7) - --attack cost - local e8=Effect.CreateEffect(c) - e8:SetType(EFFECT_TYPE_SINGLE) - e8:SetCode(EFFECT_ATTACK_COST) - e8:SetCost(c65458948.atcost) - e8:SetOperation(c65458948.atop) - c:RegisterEffect(e8) -end -function c65458948.cfilter(c) - return c:IsFaceup() and c:IsCode(15259703) -end -function c65458948.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c65458948.cfilter,tp,LOCATION_ONFIELD,0,1,nil) -end -function c65458948.sfilter(c) - return c:IsReason(REASON_DESTROY) and c:IsPreviousPosition(POS_FACEUP) and c:GetPreviousCodeOnField()==15259703 and c:IsPreviousLocation(LOCATION_ONFIELD) -end -function c65458948.sdescon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c65458948.sfilter,1,nil) -end -function c65458948.sdesop(e,tp,eg,ep,ev,re,r,rp) - Duel.Destroy(e:GetHandler(),REASON_EFFECT) -end -function c65458948.atkfilter(c) - return c:IsFaceup() and c:IsType(TYPE_TOON) -end -function c65458948.dircon(e) - return not Duel.IsExistingMatchingCard(c65458948.atkfilter,e:GetHandlerPlayer(),0,LOCATION_MZONE,1,nil) -end -function c65458948.atcon(e) - return Duel.IsExistingMatchingCard(c65458948.atkfilter,e:GetHandlerPlayer(),0,LOCATION_MZONE,1,nil) -end -function c65458948.atlimit(e,c) - return not c:IsType(TYPE_TOON) or c:IsFacedown() -end -function c65458948.atklimit(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e:GetHandler():RegisterEffect(e1) -end -function c65458948.atcost(e,c,tp) - return Duel.CheckLPCost(tp,500) -end -function c65458948.atop(e,tp,eg,ep,ev,re,r,rp) - Duel.PayLPCost(tp,500) -end diff --git a/script/c65472618.lua b/script/c65472618.lua deleted file mode 100644 index 002ea7d8e7..0000000000 --- a/script/c65472618.lua +++ /dev/null @@ -1,93 +0,0 @@ ---魔装戦士 ドラゴディウス -function c65472618.initial_effect(c) - --pendulum summon - aux.AddPendulumProcedure(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --atk - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_ATKCHANGE) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_BATTLE_START) - e2:SetRange(LOCATION_PZONE) - e2:SetCondition(c65472618.atkcon) - e2:SetCost(c65472618.atkcost) - e2:SetOperation(c65472618.atkop) - c:RegisterEffect(e2) - --to hand - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_DESTROYED) - e3:SetProperty(EFFECT_FLAG_DELAY) - e3:SetCondition(c65472618.regcon) - e3:SetTarget(c65472618.regtg) - e3:SetOperation(c65472618.regop) - c:RegisterEffect(e3) -end -function c65472618.atkcon(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetAttacker() - local bc=Duel.GetAttackTarget() - if not bc then return false end - if tc:IsControler(1-tp) then bc=tc end - e:SetLabelObject(bc) - return bc:IsFaceup() -end -function c65472618.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_DISCARD+REASON_COST,nil) -end -function c65472618.atkop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local bc=e:GetLabelObject() - if bc:IsRelateToBattle() and bc:IsFaceup() and bc:IsControler(1-tp) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetValue(bc:GetAttack()/2) - e1:SetReset(RESET_EVENT+0x1fe0000) - bc:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_SET_DEFENCE_FINAL) - e2:SetValue(bc:GetDefence()/2) - bc:RegisterEffect(e2) - end -end -function c65472618.regcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return rp~=tp and c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_MZONE) - and (c:IsReason(REASON_EFFECT) or (c:IsReason(REASON_BATTLE) and Duel.GetAttacker():IsControler(1-tp))) -end -function c65472618.thfilter(c) - return c:IsAttackBelow(2000) and c:IsRace(RACE_WARRIOR+RACE_SPELLCASTER) and not c:IsCode(65472618) -end -function c65472618.regtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c65472618.thfilter,tp,LOCATION_DECK,0,1,nil) end -end -function c65472618.regop(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetCountLimit(1) - e1:SetCondition(c65472618.thcon) - e1:SetOperation(c65472618.thop) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function c65472618.thfilter2(c) - return c65472618.thfilter(c) and c:IsAbleToHand() -end -function c65472618.thcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c65472618.thfilter2,tp,LOCATION_DECK,0,1,nil) -end -function c65472618.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_CARD,0,65472618) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c65472618.thfilter2,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c65475294.lua b/script/c65475294.lua deleted file mode 100644 index accf8d8ea8..0000000000 --- a/script/c65475294.lua +++ /dev/null @@ -1,25 +0,0 @@ ---味方殺しの女騎士 -function c65475294.initial_effect(c) - --cost - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c65475294.costcon) - e1:SetOperation(c65475294.costop) - c:RegisterEffect(e1) -end -function c65475294.costcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c65475294.costop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if Duel.CheckReleaseGroup(tp,nil,1,c) and Duel.SelectYesNo(tp,aux.Stringid(65475294,0)) then - local g=Duel.SelectReleaseGroup(tp,nil,1,1,c) - Duel.Release(g,REASON_COST) - else - Duel.Destroy(c,REASON_RULE) - end -end diff --git a/script/c65496056.lua b/script/c65496056.lua deleted file mode 100644 index 09a0bbd34f..0000000000 --- a/script/c65496056.lua +++ /dev/null @@ -1,34 +0,0 @@ ---コダロス -function c65496056.initial_effect(c) - --send to grave - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(65496056,0)) - e1:SetCategory(CATEGORY_TOGRAVE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c65496056.cost) - e1:SetTarget(c65496056.target) - e1:SetOperation(c65496056.operation) - c:RegisterEffect(e1) -end -function c65496056.cfilter(c) - return c:IsFaceup() and c:IsCode(22702055) and c:IsAbleToGraveAsCost() -end -function c65496056.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c65496056.cfilter,tp,LOCATION_SZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c65496056.cfilter,tp,LOCATION_SZONE,0,1,1,nil) - Duel.SendtoGrave(g,REASON_COST) -end -function c65496056.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() and chkc:IsAbleToGrave() end - if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToGrave,tp,0,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectTarget(tp,Card.IsAbleToGrave,tp,0,LOCATION_ONFIELD,1,2,nil) - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,g:GetCount(),0,0) -end -function c65496056.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) - Duel.SendtoGrave(g,REASON_EFFECT) -end diff --git a/script/c65503206.lua b/script/c65503206.lua deleted file mode 100644 index 4aeb8b7cbb..0000000000 --- a/script/c65503206.lua +++ /dev/null @@ -1,77 +0,0 @@ ---スクラップ・ソルジャー -function c65503206.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EVENT_BE_BATTLE_TARGET) - e1:SetOperation(c65503206.regop) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(65503206,0)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EVENT_PHASE+PHASE_BATTLE) - e2:SetCountLimit(1) - e2:SetTarget(c65503206.destg) - e2:SetOperation(c65503206.desop) - c:RegisterEffect(e2) - --search - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(65503206,1)) - e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_TO_GRAVE) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) - e3:SetCondition(c65503206.thcon) - e3:SetTarget(c65503206.thtg) - e3:SetOperation(c65503206.thop) - c:RegisterEffect(e3) - --synchro limit - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e2:SetValue(c65503206.synlimit) - c:RegisterEffect(e2) -end -function c65503206.regop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsDefencePos() and e:GetHandler():IsFaceup() then - e:GetHandler():RegisterFlagEffect(65503206,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_BATTLE,0,1) - end -end -function c65503206.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():GetFlagEffect(65503206)~=0 end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0) -end -function c65503206.desop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - Duel.Destroy(e:GetHandler(),REASON_EFFECT) - end -end -function c65503206.thcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return bit.band(c:GetReason(),0x41)==0x41 and re:GetOwner():IsSetCard(0x24) -end -function c65503206.filter(c) - return c:IsSetCard(0x24) and c:IsType(TYPE_MONSTER) and c:GetCode()~=65503206 and c:IsAbleToHand() -end -function c65503206.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c65503206.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c65503206.filter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c65503206.filter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c65503206.thop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end -function c65503206.synlimit(e,c) - if not c then return false end - return not c:IsSetCard(0x24) -end diff --git a/script/c65518099.lua b/script/c65518099.lua deleted file mode 100644 index 1728d66f6a..0000000000 --- a/script/c65518099.lua +++ /dev/null @@ -1,54 +0,0 @@ ---クリフォート・ツール -function c65518099.initial_effect(c) - --pendulum summon - aux.AddPendulumProcedure(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --splimit - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE) - e2:SetRange(LOCATION_PZONE) - e2:SetTargetRange(1,0) - e2:SetCondition(aux.nfbdncon) - e2:SetTarget(c65518099.splimit) - c:RegisterEffect(e2) - --tohand - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(65518099,0)) - e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_PZONE) - e3:SetCountLimit(1) - e3:SetCost(c65518099.cost) - e3:SetTarget(c65518099.target) - e3:SetOperation(c65518099.operation) - c:RegisterEffect(e3) -end -function c65518099.splimit(e,c,tp,sumtp,sumpos) - return not c:IsSetCard(0xaa) -end -function c65518099.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,800) end - Duel.PayLPCost(tp,800) -end -function c65518099.filter(c) - return c:IsSetCard(0xaa) and not c:IsCode(65518099) and c:IsAbleToHand() -end -function c65518099.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c65518099.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c65518099.operation(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c65518099.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c65549080.lua b/script/c65549080.lua deleted file mode 100644 index 34d49f0ac7..0000000000 --- a/script/c65549080.lua +++ /dev/null @@ -1,32 +0,0 @@ ---ミスト・コンドル -function c65549080.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c65549080.spcon) - e1:SetOperation(c65549080.spop) - c:RegisterEffect(e1) -end -function c65549080.spfilter(c) - return c:IsFaceup() and c:IsSetCard(0x37) and c:IsAbleToHandAsCost() -end -function c65549080.spcon(e,c) - if c==nil then return true end - return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-1 - and Duel.IsExistingMatchingCard(c65549080.spfilter,c:GetControler(),LOCATION_MZONE,0,1,nil) -end -function c65549080.spop(e,tp,eg,ep,ev,re,r,rp,c) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g=Duel.SelectMatchingCard(tp,c65549080.spfilter,tp,LOCATION_MZONE,0,1,1,nil) - Duel.SendtoHand(g,nil,REASON_COST) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_SET_ATTACK) - e1:SetValue(1700) - e1:SetReset(RESET_EVENT+0xff0000) - c:RegisterEffect(e1) -end diff --git a/script/c65591858.lua b/script/c65591858.lua deleted file mode 100644 index 01db36ead4..0000000000 --- a/script/c65591858.lua +++ /dev/null @@ -1,49 +0,0 @@ ---先史遺産ウィングス・スフィンクス -function c65591858.initial_effect(c) - --summon success - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(65591858,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCost(c65591858.spcost) - e1:SetTarget(c65591858.sptg) - e1:SetOperation(c65591858.spop) - c:RegisterEffect(e1) - Duel.AddCustomActivityCounter(65591858,ACTIVITY_SPSUMMON,c65591858.counterfilter) -end -function c65591858.counterfilter(c) - return c:IsSetCard(0x70) -end -function c65591858.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetCustomActivityCount(65591858,tp,ACTIVITY_SPSUMMON)==0 end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) - e1:SetTargetRange(1,0) - e1:SetTarget(c65591858.splimit) - Duel.RegisterEffect(e1,tp) -end -function c65591858.splimit(e,c,sump,sumtype,sumpos,targetp,se) - return not c:IsSetCard(0x70) -end -function c65591858.filter(c,e,tp) - return c:GetLevel()==5 and c:IsSetCard(0x70) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c65591858.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c65591858.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c65591858.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c65591858.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c65591858.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c65612454.lua b/script/c65612454.lua deleted file mode 100644 index ce12b03273..0000000000 --- a/script/c65612454.lua +++ /dev/null @@ -1,79 +0,0 @@ ---エレキューブ -function c65612454.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c65612454.target) - e1:SetOperation(c65612454.operation) - c:RegisterEffect(e1) - --Atk up - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(c65612454.val) - c:RegisterEffect(e2) - --Equip limit - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_EQUIP_LIMIT) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e3:SetValue(c65612454.eqlimit) - c:RegisterEffect(e3) - --atkup - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(65612454,0)) - e4:SetCategory(CATEGORY_ATKCHANGE) - e4:SetType(EFFECT_TYPE_IGNITION) - e4:SetRange(LOCATION_SZONE) - e4:SetProperty(EFFECT_FLAG_CARD_TARGET) - e4:SetCost(c65612454.atkcost) - e4:SetTarget(c65612454.atktg) - e4:SetOperation(c65612454.atkop) - c:RegisterEffect(e4) -end -function c65612454.eqlimit(e,c) - return c:IsRace(RACE_THUNDER) -end -function c65612454.filter(c) - return c:IsFaceup() and c:IsRace(RACE_THUNDER) -end -function c65612454.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c65612454.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c65612454.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c65612454.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c65612454.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,e:GetHandler(),tc) - end -end -function c65612454.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end -function c65612454.val(e,c) - return Duel.GetMatchingGroupCount(Card.IsRace,c:GetControler(),LOCATION_GRAVE,0,nil,RACE_THUNDER)*100 -end -function c65612454.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c65612454.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c65612454.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - local g=Duel.SelectTarget(tp,c65612454.filter,tp,LOCATION_MZONE,0,1,1,nil) -end -function c65612454.atkop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and c65612454.filter(tc) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(1000) - tc:RegisterEffect(e1) - end -end diff --git a/script/c65622692.lua b/script/c65622692.lua deleted file mode 100644 index 83e3c06185..0000000000 --- a/script/c65622692.lua +++ /dev/null @@ -1,96 +0,0 @@ ---Y-ドラゴン・ヘッド -function c65622692.initial_effect(c) - --equip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(65622692,0)) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetTarget(c65622692.eqtg) - e1:SetOperation(c65622692.eqop) - c:RegisterEffect(e1) - --unequip - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(65622692,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_SZONE) - e2:SetCondition(c65622692.uncon) - e2:SetTarget(c65622692.sptg) - e2:SetOperation(c65622692.spop) - c:RegisterEffect(e2) - --Atk up - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_EQUIP) - e3:SetCode(EFFECT_UPDATE_ATTACK) - e3:SetValue(400) - e3:SetCondition(c65622692.uncon) - c:RegisterEffect(e3) - --Def up - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_EQUIP) - e4:SetCode(EFFECT_UPDATE_DEFENCE) - e4:SetValue(400) - e4:SetCondition(c65622692.uncon) - c:RegisterEffect(e4) - --destroy sub - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_EQUIP) - e5:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e5:SetCode(EFFECT_DESTROY_SUBSTITUTE) - e5:SetCondition(c65622692.uncon) - e5:SetValue(c65622692.repval) - c:RegisterEffect(e5) - --eqlimit - local e6=Effect.CreateEffect(c) - e6:SetType(EFFECT_TYPE_SINGLE) - e6:SetCode(EFFECT_EQUIP_LIMIT) - e6:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e6:SetValue(c65622692.eqlimit) - c:RegisterEffect(e6) -end -function c65622692.uncon(e) - return e:GetHandler():IsStatus(STATUS_UNION) -end -function c65622692.repval(e,re,r,rp) - return bit.band(r,REASON_BATTLE)~=0 -end -function c65622692.eqlimit(e,c) - return c:IsCode(62651957) -end -function c65622692.filter(c) - return c:IsFaceup() and c:IsCode(62651957) and c:GetUnionCount()==0 -end -function c65622692.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c65622692.filter(chkc) end - if chk==0 then return e:GetHandler():GetFlagEffect(65622692)==0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingTarget(c65622692.filter,tp,LOCATION_MZONE,0,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local g=Duel.SelectTarget(tp,c65622692.filter,tp,LOCATION_MZONE,0,1,1,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0) - e:GetHandler():RegisterFlagEffect(65622692,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1) -end -function c65622692.eqop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if not c:IsRelateToEffect(e) or c:IsFacedown() then return end - if not tc:IsRelateToEffect(e) or not c65622692.filter(tc) then - Duel.SendtoGrave(c,REASON_EFFECT) - return - end - if not Duel.Equip(tp,c,tc,false) then return end - c:SetStatus(STATUS_UNION,true) -end -function c65622692.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():GetFlagEffect(65622692)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) - e:GetHandler():RegisterFlagEffect(65622692,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1) -end -function c65622692.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP_ATTACK) - end -end diff --git a/script/c65659181.lua b/script/c65659181.lua deleted file mode 100644 index 08a1adab56..0000000000 --- a/script/c65659181.lua +++ /dev/null @@ -1,60 +0,0 @@ ---ヴァイロン・ポリトープ -function c65659181.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c65659181.sptg) - e1:SetOperation(c65659181.spop) - c:RegisterEffect(e1) -end -function c65659181.filter(c,e,tp) - return c:IsFaceup() and c:IsSetCard(0x30) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c65659181.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_SZONE) and chkc:IsControler(tp) and c65659181.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c65659181.filter,tp,LOCATION_SZONE,0,1,nil,e,tp) end - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c65659181.filter,tp,LOCATION_SZONE,0,1,ft,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,g:GetCount(),0,0) -end -function c65659181.spop(e,tp,eg,ep,ev,re,r,rp) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local sg=g:Filter(Card.IsCanBeSpecialSummoned,nil,e,0,tp,false,false) - if sg:GetCount()<=ft then - local tc=sg:GetFirst() - while tc do - Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP_DEFENCE) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) - e1:SetReset(RESET_EVENT+0x47e0000) - e1:SetValue(LOCATION_REMOVED) - tc:RegisterEffect(e1,true) - tc=sg:GetNext() - end - Duel.SpecialSummonComplete() - else - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local fg=sg:Select(tp,ft,ft,nil) - local tc=fg:GetFirst() - while tc do - Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP_DEFENCE) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) - e1:SetReset(RESET_EVENT+0x47e0000) - e1:SetValue(LOCATION_REMOVED) - tc:RegisterEffect(e1,true) - tc=fg:GetNext() - end - Duel.SpecialSummonComplete() - sg:Sub(fg) - Duel.SendtoGrave(sg,REASON_EFFECT) - end -end diff --git a/script/c65676461.lua b/script/c65676461.lua deleted file mode 100644 index b4049cba61..0000000000 --- a/script/c65676461.lua +++ /dev/null @@ -1,59 +0,0 @@ ---No.32 海咬龍シャーク・ドレイク -function c65676461.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,4,3) - c:EnableReviveLimit() - --chain attack - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(65676461,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCountLimit(1) - e1:SetCode(EVENT_BATTLE_DESTROYING) - e1:SetCondition(c65676461.atcon) - e1:SetCost(c65676461.atcost) - e1:SetTarget(c65676461.attg) - e1:SetOperation(c65676461.atop) - c:RegisterEffect(e1) -end -c65676461.xyz_number=32 -function c65676461.atcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local bc=c:GetBattleTarget() - return c==Duel.GetAttacker() and c:IsRelateToBattle() and c:IsStatus(STATUS_OPPO_BATTLE) - and bc:IsLocation(LOCATION_GRAVE) and bc:IsType(TYPE_MONSTER) -end -function c65676461.atcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c65676461.attg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0 - and Duel.GetAttackTarget():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK,1-tp) end - Duel.GetAttackTarget():CreateEffectRelation(e) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,Duel.GetAttackTarget(),1,0,0) -end -function c65676461.atop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local bc=Duel.GetAttackTarget() - if not bc:IsRelateToEffect(e) then return end - if Duel.SpecialSummonStep(bc,0,tp,1-tp,false,false,POS_FACEUP_ATTACK) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(-1000) - e1:SetReset(RESET_EVENT+0x1fe0000) - bc:RegisterEffect(e1) - Duel.SpecialSummonComplete() - if c:IsFaceup() and c:IsRelateToEffect(e) then - Duel.BreakEffect() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_EXTRA_ATTACK) - e1:SetValue(1) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - c:RegisterEffect(e1) - end - end -end diff --git a/script/c65685470.lua b/script/c65685470.lua deleted file mode 100644 index 7193047537..0000000000 --- a/script/c65685470.lua +++ /dev/null @@ -1,119 +0,0 @@ ---六武衆の御霊代 -function c65685470.initial_effect(c) - --equip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(65685470,0)) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetTarget(c65685470.eqtg) - e1:SetOperation(c65685470.eqop) - c:RegisterEffect(e1) - --unequip - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(65685470,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_SZONE) - e2:SetCondition(c65685470.uncon) - e2:SetTarget(c65685470.sptg) - e2:SetOperation(c65685470.spop) - c:RegisterEffect(e2) - --Atk up - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_EQUIP) - e3:SetCode(EFFECT_UPDATE_ATTACK) - e3:SetValue(500) - e3:SetCondition(c65685470.uncon) - c:RegisterEffect(e3) - --Def up - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_EQUIP) - e4:SetCode(EFFECT_UPDATE_DEFENCE) - e4:SetValue(500) - e4:SetCondition(c65685470.uncon) - c:RegisterEffect(e4) - --destroy sub - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_EQUIP) - e5:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e5:SetCode(EFFECT_DESTROY_SUBSTITUTE) - e5:SetCondition(c65685470.uncon) - e5:SetValue(1) - c:RegisterEffect(e5) - --draw - local e6=Effect.CreateEffect(c) - e6:SetDescription(aux.Stringid(65685470,2)) - e6:SetCategory(CATEGORY_DRAW) - e6:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e6:SetCode(EVENT_BATTLE_DESTROYING) - e6:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e6:SetRange(LOCATION_SZONE) - e6:SetCondition(c65685470.drcon) - e6:SetTarget(c65685470.drtg) - e6:SetOperation(c65685470.drop) - c:RegisterEffect(e6) - --eqlimit - local e7=Effect.CreateEffect(c) - e7:SetType(EFFECT_TYPE_SINGLE) - e7:SetCode(EFFECT_EQUIP_LIMIT) - e7:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e7:SetValue(c65685470.eqlimit) - c:RegisterEffect(e7) -end -function c65685470.uncon(e) - return e:GetHandler():IsStatus(STATUS_UNION) -end -function c65685470.eqlimit(e,c) - return c:IsSetCard(0x3d) -end -function c65685470.filter(c) - return c:IsFaceup() and c:IsSetCard(0x3d) and c:GetUnionCount()==0 -end -function c65685470.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c65685470.filter(chkc) end - if chk==0 then return e:GetHandler():GetFlagEffect(65685470)==0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingTarget(c65685470.filter,tp,LOCATION_MZONE,0,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local g=Duel.SelectTarget(tp,c65685470.filter,tp,LOCATION_MZONE,0,1,1,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0) - e:GetHandler():RegisterFlagEffect(65685470,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1) -end -function c65685470.eqop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if not c:IsRelateToEffect(e) or c:IsFacedown() then return end - if not tc:IsRelateToEffect(e) or not c65685470.filter(tc) then - Duel.SendtoGrave(c,REASON_EFFECT) - return - end - if not Duel.Equip(tp,c,tc,false) then return end - c:SetStatus(STATUS_UNION,true) -end -function c65685470.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():GetFlagEffect(65685470)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) - e:GetHandler():RegisterFlagEffect(65685470,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1) -end -function c65685470.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP_ATTACK) - end -end -function c65685470.drcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsStatus(STATUS_UNION) and e:GetHandler():GetEquipTarget()==eg:GetFirst() -end -function c65685470.drtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(1) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c65685470.drop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end diff --git a/script/c65703851.lua b/script/c65703851.lua deleted file mode 100644 index 35c4983186..0000000000 --- a/script/c65703851.lua +++ /dev/null @@ -1,29 +0,0 @@ ---透破抜き -function c65703851.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_NEGATE+CATEGORY_REMOVE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_CHAINING) - e1:SetCondition(c65703851.condition) - e1:SetTarget(c65703851.target) - e1:SetOperation(c65703851.activate) - c:RegisterEffect(e1) -end -function c65703851.condition(e,tp,eg,ep,ev,re,r,rp) - local loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION) - return (loc==LOCATION_HAND or loc==LOCATION_GRAVE) and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainNegatable(ev) -end -function c65703851.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return re:GetHandler():IsAbleToRemove() end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - if re:GetHandler():IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_REMOVE,eg,1,0,0) - end -end -function c65703851.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateActivation(ev) - if re:GetHandler():IsRelateToEffect(re) then - Duel.Remove(eg,POS_FACEUP,REASON_EFFECT) - end -end diff --git a/script/c65737274.lua b/script/c65737274.lua deleted file mode 100644 index 10973976a5..0000000000 --- a/script/c65737274.lua +++ /dev/null @@ -1,76 +0,0 @@ ---ドラゴラド -function c65737274.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(65737274,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c65737274.sptg) - e1:SetOperation(c65737274.spop) - c:RegisterEffect(e1) - --lvatkup - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(65737274,1)) - e2:SetCategory(CATEGORY_ATKCHANGE) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCost(c65737274.lvcost) - e2:SetTarget(c65737274.lvtg) - e2:SetOperation(c65737274.lvop) - c:RegisterEffect(e2) -end -function c65737274.spfilter(c,e,tp) - return c:IsAttackBelow(1000) and c:IsType(TYPE_NORMAL) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c65737274.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c65737274.spfilter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c65737274.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c65737274.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c65737274.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENCE) - end -end -function c65737274.cfilter(c,tp) - return c:IsRace(RACE_DRAGON) and Duel.IsExistingTarget(c65737274.lvfilter,tp,LOCATION_MZONE,0,1,c) -end -function c65737274.lvfilter(c) - local lv=c:GetLevel() - return c:IsFaceup() and lv>0 and lv~=8 -end -function c65737274.lvcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,c65737274.cfilter,1,nil,tp) end - local g=Duel.SelectReleaseGroup(tp,c65737274.cfilter,1,1,nil,tp) - Duel.Release(g,REASON_COST) -end -function c65737274.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c65737274.lvfilter(chkc) end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c65737274.lvfilter,tp,LOCATION_MZONE,0,1,1,nil) -end -function c65737274.lvop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:GetLevel()~=8 then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_CHANGE_LEVEL) - e1:SetValue(8) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(800) - tc:RegisterEffect(e2) - end -end diff --git a/script/c65743242.lua b/script/c65743242.lua deleted file mode 100644 index 5f4b5a421d..0000000000 --- a/script/c65743242.lua +++ /dev/null @@ -1,33 +0,0 @@ ---地縛霊の誘い -function c65743242.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetCondition(c65743242.condition) - e1:SetTarget(c65743242.target) - e1:SetOperation(c65743242.activate) - c:RegisterEffect(e1) -end -function c65743242.condition(e,tp,eg,ep,ev,re,r,rp) - return tp~=Duel.GetTurnPlayer() -end -function c65743242.filter(c,e) - return c:IsCanBeEffectTarget(e) -end -function c65743242.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - local ag=eg:GetFirst():GetAttackableTarget() - local at=Duel.GetAttackTarget() - if chk==0 then return ag:IsExists(c65743242.filter,1,at,e) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - local g=ag:FilterSelect(tp,c65743242.filter,1,1,at,e) - Duel.SetTargetCard(g) -end -function c65743242.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.ChangeAttackTarget(tc) - end -end diff --git a/script/c65749035.lua b/script/c65749035.lua deleted file mode 100644 index 7b09d827a1..0000000000 --- a/script/c65749035.lua +++ /dev/null @@ -1,45 +0,0 @@ ---氷結界の龍 グングニール -function c65749035.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,nil,aux.NonTuner(Card.IsAttribute,ATTRIBUTE_WATER),1) - c:EnableReviveLimit() - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(65749035,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetCountLimit(1) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c65749035.cost) - e1:SetTarget(c65749035.target) - e1:SetOperation(c65749035.operation) - c:RegisterEffect(e1) -end -function c65749035.costfilter(c) - return c:IsDiscardable() and c:IsAbleToGraveAsCost() -end -function c65749035.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c65749035.costfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end - local rt=Duel.GetTargetCount(Card.IsDestructable,tp,0,LOCATION_ONFIELD,nil) - if rt>2 then rt=2 end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) - local cg=Duel.SelectMatchingCard(tp,c65749035.costfilter,tp,LOCATION_HAND,0,1,rt,nil) - Duel.SendtoGrave(cg,REASON_COST+REASON_DISCARD) - e:SetLabel(cg:GetCount()) -end -function c65749035.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and chkc:IsDestructable() end - if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,0,LOCATION_ONFIELD,1,nil) end - local ct=e:GetLabel() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local eg=Duel.SelectTarget(tp,Card.IsDestructable,tp,0,LOCATION_ONFIELD,ct,ct,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,ct,0,0) -end -function c65749035.operation(e,tp,eg,ep,ev,re,r,rp,chk) - local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local rg=tg:Filter(Card.IsRelateToEffect,nil,e) - if rg:GetCount()>0 then - Duel.Destroy(rg,REASON_EFFECT) - end -end diff --git a/script/c65758454.lua b/script/c65758454.lua deleted file mode 100644 index 7b164bba91..0000000000 --- a/script/c65758454.lua +++ /dev/null @@ -1,29 +0,0 @@ ---ガンバランサー -function c65758454.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(65758454,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c65758454.sptg) - e1:SetOperation(c65758454.spop) - c:RegisterEffect(e1) -end -function c65758454.filter(c,e,tp) - return c:IsCode(65758454) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) - and not c:IsHasEffect(EFFECT_NECRO_VALLEY) -end -function c65758454.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c65758454.filter,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_HAND) -end -function c65758454.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c65758454.filter,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENCE) - end -end diff --git a/script/c65810489.lua b/script/c65810489.lua deleted file mode 100644 index ce3367842e..0000000000 --- a/script/c65810489.lua +++ /dev/null @@ -1,29 +0,0 @@ ---黄金の邪神像 -function c65810489.initial_effect(c) - --token - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(65810489,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCondition(c65810489.spcon) - e1:SetTarget(c65810489.sptg) - e1:SetOperation(c65810489.spop) - c:RegisterEffect(e1) -end -function c65810489.spcon(e,tp,eg,ep,ev,re,r,rp) - return bit.band(r,REASON_DESTROY)~=0 - and e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) - and e:GetHandler():IsPreviousPosition(POS_FACEDOWN) -end -function c65810489.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0) -end -function c65810489.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 then return end - if not Duel.IsPlayerCanSpecialSummonMonster(tp,65810490,0,0x4011,1000,1000,4,RACE_FIEND,ATTRIBUTE_DARK) then return end - local token=Duel.CreateToken(tp,65810490) - Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP) -end diff --git a/script/c65824822.lua b/script/c65824822.lua deleted file mode 100644 index 8788cd28b6..0000000000 --- a/script/c65824822.lua +++ /dev/null @@ -1,33 +0,0 @@ ---闇の取引 -function c65824822.initial_effect(c) - --change effect - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_CHAINING) - e1:SetCondition(c65824822.condition) - e1:SetCost(c65824822.cost) - e1:SetOperation(c65824822.activate) - c:RegisterEffect(e1) -end -function c65824822.repop(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():CancelToGrave(false) - local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND) - if g:GetCount()>0 then - local sg=g:RandomSelect(1-tp,1,nil) - Duel.SendtoGrave(sg,REASON_EFFECT+REASON_DISCARD) - end -end -function c65824822.condition(e,tp,eg,ep,ev,re,r,rp) - local rc=re:GetHandler() - return ep~=tp and rc:GetType()==TYPE_SPELL and re:IsHasType(EFFECT_TYPE_ACTIVATE) - and Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)~=0 -end -function c65824822.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,1000) end - Duel.PayLPCost(tp,1000) -end -function c65824822.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Group.CreateGroup() - Duel.ChangeTargetCard(ev,g) - Duel.ChangeChainOperation(ev,c65824822.repop) -end diff --git a/script/c65830223.lua b/script/c65830223.lua deleted file mode 100644 index 04f77945d9..0000000000 --- a/script/c65830223.lua +++ /dev/null @@ -1,36 +0,0 @@ ---棺桶売り -function c65830223.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --damage - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(65830223,0)) - e2:SetCategory(CATEGORY_DAMAGE) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetRange(LOCATION_SZONE) - e2:SetCondition(c65830223.condition) - e2:SetTarget(c65830223.target) - e2:SetOperation(c65830223.operation) - c:RegisterEffect(e2) -end -function c65830223.filter(c,tp) - return c:IsType(TYPE_MONSTER) and c:GetControler()==1-tp -end -function c65830223.condition(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c65830223.filter,1,nil,tp) -end -function c65830223.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsRelateToEffect(e) end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(300) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,0,0,1-tp,300) -end -function c65830223.operation(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c65844845.lua b/script/c65844845.lua deleted file mode 100644 index b94950a813..0000000000 --- a/script/c65844845.lua +++ /dev/null @@ -1,63 +0,0 @@ ---甲虫装機 ギガグリオル -function c65844845.initial_effect(c) - --equip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(65844845,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetRange(LOCATION_GRAVE) - e1:SetCountLimit(1,65844845) - e1:SetCost(c65844845.eqcost) - e1:SetTarget(c65844845.eqtg) - e1:SetOperation(c65844845.eqop) - c:RegisterEffect(e1) - --equip effect - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_SET_BASE_ATTACK) - e2:SetValue(2000) - c:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_EQUIP) - e3:SetCode(EFFECT_PIERCE) - c:RegisterEffect(e3) -end -function c65844845.cfilter(c) - return c:IsRace(RACE_INSECT) and c:IsAbleToRemoveAsCost() -end -function c65844845.eqcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c65844845.cfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c65844845.cfilter,tp,LOCATION_GRAVE,0,1,1,e:GetHandler()) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c65844845.filter(c) - return c:IsFaceup() and c:IsSetCard(0x56) -end -function c65844845.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c65844845.filter(chkc) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingTarget(c65844845.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c65844845.filter,tp,LOCATION_MZONE,0,1,1,nil) -end -function c65844845.eqop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) then return end - local tc=Duel.GetFirstTarget() - if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or tc:IsFacedown() or not tc:IsRelateToEffect(e) then - return - end - Duel.Equip(tp,c,tc,true) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(c65844845.eqlimit) - e1:SetLabelObject(tc) - c:RegisterEffect(e1) -end -function c65844845.eqlimit(e,c) - return c==e:GetLabelObject() -end diff --git a/script/c65848811.lua b/script/c65848811.lua deleted file mode 100644 index 7f3659a385..0000000000 --- a/script/c65848811.lua +++ /dev/null @@ -1,50 +0,0 @@ ---H・C 強襲のハルベルト -function c65848811.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c65848811.spcon) - c:RegisterEffect(e1) - --pierce - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_PIERCE) - c:RegisterEffect(e2) - --special summon - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(65848811,0)) - e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_BATTLE_DAMAGE) - e3:SetCondition(c65848811.thcon) - e3:SetTarget(c65848811.thtg) - e3:SetOperation(c65848811.thop) - c:RegisterEffect(e3) -end -function c65848811.spcon(e,c) - if c==nil then return true end - return Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0)==0 - and Duel.GetFieldGroupCount(c:GetControler(),0,LOCATION_MZONE)>0 - and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 -end -function c65848811.thcon(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp -end -function c65848811.filter(c) - return c:IsSetCard(0x6f) and c:IsAbleToHand() -end -function c65848811.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c65848811.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c65848811.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c65848811.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c65872270.lua b/script/c65872270.lua deleted file mode 100644 index 4f2dc36583..0000000000 --- a/script/c65872270.lua +++ /dev/null @@ -1,85 +0,0 @@ ---イグナイト・バースト -function c65872270.initial_effect(c) - --activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c65872270.target) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_DESTROY+CATEGORY_TOHAND) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetRange(LOCATION_SZONE) - e2:SetCountLimit(1) - e2:SetCondition(c65872270.descon) - e2:SetTarget(c65872270.destg) - e2:SetOperation(c65872270.desop) - c:RegisterEffect(e2) - --to hand - local e3=Effect.CreateEffect(c) - e3:SetCategory(CATEGORY_TOHAND) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_TO_GRAVE) - e3:SetProperty(EFFECT_FLAG_DELAY) - e3:SetTarget(c65872270.thtg) - e3:SetOperation(c65872270.thop) - c:RegisterEffect(e3) -end -function c65872270.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - if c65872270.descon(e,tp,eg,ep,ev,re,r,rp) and c65872270.destg(e,tp,eg,ep,ev,re,r,rp,0) and Duel.SelectYesNo(tp,aux.Stringid(65872270,0)) then - e:SetCategory(CATEGORY_DESTROY+CATEGORY_TOHAND) - e:SetOperation(c65872270.desop) - c65872270.destg(e,tp,eg,ep,ev,re,r,rp,1) - else - e:SetCategory(0) - e:SetOperation(nil) - end -end -function c65872270.descon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp - and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2) -end -function c65872270.desfilter(c) - return c:IsFaceup() and c:IsSetCard(0xc8) and c:IsDestructable() -end -function c65872270.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c65872270.desfilter,tp,LOCATION_ONFIELD,0,1,e:GetHandler()) - and Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,1,nil) - and e:GetHandler():GetFlagEffect(65872270)==0 end - e:GetHandler():RegisterFlagEffect(65872270,RESET_PHASE+RESET_END,0,1) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,tp,LOCATION_ONFIELD) -end -function c65872270.desop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local g=Duel.GetMatchingGroup(Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,nil) - local ct=g:GetCount() - if ct==0 then return end - if ct>3 then ct=3 end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local dg=Duel.SelectMatchingCard(tp,c65872270.desfilter,tp,LOCATION_ONFIELD,0,1,ct,e:GetHandler()) - local ct2=Duel.Destroy(dg,REASON_EFFECT) - if ct2>0 then - Duel.BreakEffect() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local rg=g:Select(tp,ct2,ct2,nil) - Duel.SendtoHand(rg,nil,REASON_EFFECT) - end -end -function c65872270.thfilter(c) - return c:IsFaceup() and c:IsSetCard(0xc8) and c:IsAbleToHand() -end -function c65872270.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c65872270.thfilter,tp,LOCATION_EXTRA,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_EXTRA) -end -function c65872270.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c65872270.thfilter,tp,LOCATION_EXTRA,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c65878864.lua b/script/c65878864.lua deleted file mode 100644 index 17c8512b91..0000000000 --- a/script/c65878864.lua +++ /dev/null @@ -1,27 +0,0 @@ ---使徒喰い虫 -function c65878864.initial_effect(c) - --flip - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP) - e1:SetTarget(c65878864.target) - e1:SetOperation(c65878864.operation) - c:RegisterEffect(e1) -end -function c65878864.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsDestructable() end - if chk==0 then return true end - if Duel.IsExistingTarget(Card.IsDestructable,tp,LOCATION_MZONE,LOCATION_MZONE,2,nil) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,LOCATION_MZONE,LOCATION_MZONE,2,2,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) - end -end -function c65878864.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - if not g then return end - local sg=g:Filter(Card.IsRelateToEffect,nil,e) - if sg:GetCount()~=2 then return end - Duel.Destroy(g,REASON_EFFECT) -end diff --git a/script/c65884091.lua b/script/c65884091.lua deleted file mode 100644 index 67e97c05f0..0000000000 --- a/script/c65884091.lua +++ /dev/null @@ -1,36 +0,0 @@ ---ヴェルズ・タナトス -function c65884091.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_DARK),4,2) - c:EnableReviveLimit() - --immune - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(65884091,0)) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c65884091.cost) - e1:SetOperation(c65884091.operation) - c:RegisterEffect(e1) -end -function c65884091.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c65884091.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFaceup() and c:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_IMMUNE_EFFECT) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - e1:SetValue(c65884091.efilter) - c:RegisterEffect(e1) - end -end -function c65884091.efilter(e,te) - return te:IsActiveType(TYPE_EFFECT) and te:GetOwner()~=e:GetOwner() -end diff --git a/script/c6588580.lua b/script/c6588580.lua deleted file mode 100644 index 7de74bd793..0000000000 --- a/script/c6588580.lua +++ /dev/null @@ -1,42 +0,0 @@ ---サーマル・ジェネクス -function c6588580.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsCode,68505803),aux.NonTuner(Card.IsAttribute,ATTRIBUTE_FIRE),1) - c:EnableReviveLimit() - --atkup - local e1=Effect.CreateEffect(c) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetValue(c6588580.val) - c:RegisterEffect(e1) - --damage - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(6588580,0)) - e2:SetCategory(CATEGORY_DAMAGE) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetCode(EVENT_BATTLE_DESTROYING) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCondition(c6588580.damcon) - e2:SetTarget(c6588580.damtg) - e2:SetOperation(c6588580.damop) - c:RegisterEffect(e2) -end -function c6588580.val(e,c) - return Duel.GetMatchingGroupCount(Card.IsAttribute,c:GetControler(),LOCATION_GRAVE,0,nil,ATTRIBUTE_FIRE)*200 -end -function c6588580.damcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsRelateToBattle() and c:GetBattleTarget():IsType(TYPE_MONSTER) -end -function c6588580.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,0) -end -function c6588580.damop(e,tp,eg,ep,ev,re,r,rp) - local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) - local d=Duel.GetMatchingGroupCount(Card.IsSetCard,tp,LOCATION_GRAVE,0,nil,0x2)*200 - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c6595475.lua b/script/c6595475.lua deleted file mode 100644 index aa5eecbcc1..0000000000 --- a/script/c6595475.lua +++ /dev/null @@ -1,41 +0,0 @@ ---オノマト連携 -function c6595475.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,6595475+EFFECT_COUNT_CODE_OATH) - e1:SetCost(c6595475.cost) - e1:SetTarget(c6595475.target) - e1:SetOperation(c6595475.activate) - c:RegisterEffect(e1) -end -function c6595475.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,Card.IsAbleToGraveAsCost,1,1,REASON_COST) -end -function c6595475.filter(c) - return c:IsType(TYPE_MONSTER) and (c:IsSetCard(0x54) or c:IsSetCard(0x59) or c:IsSetCard(0x82) or c:IsSetCard(0x8f)) and c:IsAbleToHand() -end -function c6595475.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c6595475.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c6595475.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c6595475.filter,tp,LOCATION_DECK,0,nil) - if g:GetCount()==0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g1=g:Select(tp,1,1,nil) - local t={0x54,0x59,0x82,0x8f} - for i=1,4 do - if g1:GetFirst():IsSetCard(t[i]) then g:Remove(Card.IsSetCard,nil,t[i]) end - end - if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(6595475,0)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g2=g:Select(tp,1,1,nil) - g1:Merge(g2) - end - Duel.SendtoHand(g1,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g1) -end diff --git a/script/c65961085.lua b/script/c65961085.lua deleted file mode 100644 index 307cf632b0..0000000000 --- a/script/c65961085.lua +++ /dev/null @@ -1,41 +0,0 @@ ---魔導獣士 ルード -function c65961085.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(65961085,0)) - e1:SetCategory(CATEGORY_TODECK) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCountLimit(1,65961085) - e1:SetCondition(c65961085.retcon) - e1:SetTarget(c65961085.rettg) - e1:SetOperation(c65961085.retop) - c:RegisterEffect(e1) -end -function c65961085.retcon(e,tp,eg,ep,ev,re,r,rp) - return re and re:GetHandler():IsRace(RACE_SPELLCASTER) -end -function c65961085.filter(c) - return c:IsFaceup() and c:IsSetCard(0x106e) and c:IsType(TYPE_SPELL) and c:IsAbleToDeck() -end -function c65961085.rettg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and c65961085.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c65961085.filter,tp,LOCATION_REMOVED,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectTarget(tp,c65961085.filter,tp,LOCATION_REMOVED,0,1,99,nil) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0) -end -function c65961085.filter2(c) - return c:IsFaceup() and c:IsSetCard(0x106e) and c:IsType(TYPE_SPELL) -end -function c65961085.retop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) - if g:GetCount()>0 then - Duel.SendtoDeck(g,nil,2,REASON_EFFECT) - end - local g2=Duel.GetMatchingGroup(c65961085.filter2,tp,LOCATION_REMOVED,0,nil) - if g2:GetCount()>0 then - Duel.SendtoGrave(g2,REASON_EFFECT+REASON_RETURN) - end -end diff --git a/script/c65961683.lua b/script/c65961683.lua deleted file mode 100644 index 2c2f2e826d..0000000000 --- a/script/c65961683.lua +++ /dev/null @@ -1,58 +0,0 @@ ---ジュラック・ヴェルヒプト -function c65961683.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,nil,aux.NonTuner(Card.IsRace,RACE_DINOSAUR),1) - c:EnableReviveLimit() - --Atk - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetOperation(c65961683.valop) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(65961683,0)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_BATTLE_START) - e2:SetCondition(c65961683.descon) - e2:SetTarget(c65961683.destg) - e2:SetOperation(c65961683.desop) - c:RegisterEffect(e2) -end -function c65961683.valop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:GetSummonType()~=SUMMON_TYPE_SYNCHRO then return end - local g=c:GetMaterial() - local tc=g:GetFirst() - local atk=0 - while tc do - local tatk=tc:GetTextAttack() - if tatk<0 then tatk=0 end - atk=atk+tatk - tc=g:GetNext() - end - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK) - e1:SetValue(atk) - e1:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_SET_DEFENCE) - c:RegisterEffect(e2) -end -function c65961683.descon(e,tp,eg,ep,ev,re,r,rp) - local d=Duel.GetAttackTarget() - return e:GetHandler()==Duel.GetAttacker() and d and d:IsPosition(POS_FACEDOWN_DEFENCE) -end -function c65961683.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetAttackTarget():IsDestructable() end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,Duel.GetAttackTarget(),1,0,0) -end -function c65961683.desop(e,tp,eg,ep,ev,re,r,rp) - local d=Duel.GetAttackTarget() - if d:IsRelateToBattle() then - Duel.Destroy(d,REASON_EFFECT) - end -end diff --git a/script/c65984457.lua b/script/c65984457.lua deleted file mode 100644 index 64f860680d..0000000000 --- a/script/c65984457.lua +++ /dev/null @@ -1,33 +0,0 @@ ---剣闘獣トラケス -function c65984457.initial_effect(c) - --draw - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(65984457,0)) - e1:SetCategory(CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_PHASE+PHASE_BATTLE) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c65984457.spcon) - e1:SetCost(c65984457.spcost) - e1:SetTarget(c65984457.sptg) - e1:SetOperation(c65984457.spop) - c:RegisterEffect(e1) -end -function c65984457.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetFlagEffect(65984457)>0 and e:GetHandler():GetBattledGroupCount()>0 -end -function c65984457.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToDeckAsCost() end - Duel.SendtoDeck(c,nil,2,REASON_COST) -end -function c65984457.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(1) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c65984457.spop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end diff --git a/script/c6602300.lua b/script/c6602300.lua deleted file mode 100644 index f94c7b4ef7..0000000000 --- a/script/c6602300.lua +++ /dev/null @@ -1,38 +0,0 @@ ---重爆撃禽 ボム・フェネクス -function c6602300.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcFun2(c,aux.FilterBoolFunction(Card.IsRace,RACE_MACHINE),aux.FilterBoolFunction(Card.IsRace,RACE_PYRO),true) - --damage - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(6602300,0)) - e2:SetCategory(CATEGORY_DAMAGE) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCost(c6602300.damcost) - e2:SetTarget(c6602300.damtg) - e2:SetOperation(c6602300.damop) - c:RegisterEffect(e2) -end -function c6602300.damcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():GetAttackAnnouncedCount()==0 end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e:GetHandler():RegisterEffect(e1,true) -end -function c6602300.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local ct=Duel.GetFieldGroupCount(tp,0xc,0xc) - Duel.SetTargetPlayer(1-tp) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,ct*300) -end -function c6602300.damop(e,tp,eg,ep,ev,re,r,rp) - local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) - local ct=Duel.GetFieldGroupCount(tp,0xc,0xc) - Duel.Damage(p,ct*300,REASON_EFFECT) -end diff --git a/script/c66066482.lua b/script/c66066482.lua deleted file mode 100644 index a09f9f43c0..0000000000 --- a/script/c66066482.lua +++ /dev/null @@ -1,83 +0,0 @@ ---甲虫装機 リュシオル -function c66066482.initial_effect(c) - --equip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(66066482,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetTarget(c66066482.eqtg) - e1:SetOperation(c66066482.eqop) - c:RegisterEffect(e1) - --equip effect - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_UPDATE_LEVEL) - e2:SetValue(1) - c:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_EQUIP) - e3:SetCode(EFFECT_UPDATE_ATTACK) - e3:SetValue(100) - c:RegisterEffect(e3) - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_EQUIP) - e4:SetCode(EFFECT_UPDATE_DEFENCE) - e4:SetValue(100) - c:RegisterEffect(e4) - --confirm - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(66066482,1)) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_EQUIP) - e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP) - e3:SetRange(LOCATION_MZONE) - e3:SetCondition(c66066482.cfcon) - e3:SetTarget(c66066482.cftg) - e3:SetOperation(c66066482.cfop) - c:RegisterEffect(e3) -end -function c66066482.filter(c) - return c:IsSetCard(0x56) and c:IsType(TYPE_MONSTER) and not c:IsHasEffect(EFFECT_NECRO_VALLEY) -end -function c66066482.eqtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingMatchingCard(c66066482.filter,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,nil,1,tp,LOCATION_GRAVE+LOCATION_HAND) -end -function c66066482.eqop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end - if c:IsFacedown() or not c:IsRelateToEffect(e) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local g=Duel.SelectMatchingCard(tp,c66066482.filter,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,1,nil) - local tc=g:GetFirst() - if tc then - if not Duel.Equip(tp,tc,c,true) then return end - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(c66066482.eqlimit) - tc:RegisterEffect(e1) - end -end -function c66066482.eqlimit(e,c) - return e:GetOwner()==c and not c:IsDisabled() -end -function c66066482.eqfilter(c,ec) - return c:IsFaceup() and c:GetEquipTarget()==ec and c:IsSetCard(0x56) -end -function c66066482.cfcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c66066482.eqfilter,1,nil,e:GetHandler()) -end -function c66066482.cftg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFacedown,tp,0,LOCATION_ONFIELD,1,nil) end -end -function c66066482.cfop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsFacedown,tp,0,LOCATION_ONFIELD,nil) - if g:GetCount()>0 then - Duel.ConfirmCards(tp,g) - end -end diff --git a/script/c66084673.lua b/script/c66084673.lua deleted file mode 100644 index 9b45c3a261..0000000000 --- a/script/c66084673.lua +++ /dev/null @@ -1,47 +0,0 @@ ---空炎星-サイチョウ -function c66084673.initial_effect(c) - --attack up - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(66084673,0)) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_QUICK_O+EFFECT_TYPE_FIELD) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EVENT_PRE_DAMAGE_CALCULATE) - e1:SetCondition(c66084673.atkcon) - e1:SetCost(c66084673.atkcost) - e1:SetOperation(c66084673.atkop) - c:RegisterEffect(e1) -end -function c66084673.atkcon(e,tp,eg,ep,ev,re,r,rp) - return (Duel.GetAttacker():IsControler(tp) and Duel.GetAttacker():IsSetCard(0x79)) - or (Duel.GetAttackTarget() and Duel.GetAttackTarget():IsControler(tp) and Duel.GetAttackTarget():IsSetCard(0x79)) -end -function c66084673.filter1(c) - return c:IsFaceup() and c:IsSetCard(0x7c) and c:IsAbleToGraveAsCost() -end -function c66084673.filter2(c) - return c:IsSetCard(0x79) and c:GetBaseAttack()>0 and c:IsAbleToGraveAsCost() -end -function c66084673.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():GetFlagEffect(66084673)==0 - and Duel.IsExistingMatchingCard(c66084673.filter1,tp,LOCATION_ONFIELD,0,1,nil) - and Duel.IsExistingMatchingCard(c66084673.filter2,tp,LOCATION_HAND,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g1=Duel.SelectMatchingCard(tp,c66084673.filter1,tp,LOCATION_ONFIELD,0,1,1,nil) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g2=Duel.SelectMatchingCard(tp,c66084673.filter2,tp,LOCATION_HAND,0,1,1,nil) - e:SetLabel(g2:GetFirst():GetBaseAttack()) - g1:Merge(g2) - Duel.SendtoGrave(g1,REASON_COST) - e:GetHandler():RegisterFlagEffect(66084673,RESET_PHASE+RESET_DAMAGE_CAL,0,1) -end -function c66084673.atkop(e,tp,eg,ep,ev,re,r,rp) - local c=Duel.GetAttacker() - if c:IsControler(1-tp) then c=Duel.GetAttackTarget() end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_PHASE+RESET_DAMAGE_CAL) - e1:SetValue(e:GetLabel()) - c:RegisterEffect(e1) -end diff --git a/script/c66094973.lua b/script/c66094973.lua deleted file mode 100644 index 7cc1ff0240..0000000000 --- a/script/c66094973.lua +++ /dev/null @@ -1,118 +0,0 @@ ---トランスフォーム・スフィア -function c66094973.initial_effect(c) - --equip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(66094973,0)) - e1:SetCategory(CATEGORY_HANDES+CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCondition(c66094973.eqcon) - e1:SetTarget(c66094973.eqtg) - e1:SetOperation(c66094973.eqop) - c:RegisterEffect(e1) - --to defence - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_PHASE+PHASE_BATTLE) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCondition(c66094973.poscon) - e2:SetOperation(c66094973.posop) - c:RegisterEffect(e2) - --spsummon - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(66094973,1)) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e3:SetCode(EVENT_PHASE+PHASE_END) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1) - e3:SetCondition(c66094973.spcon) - e3:SetTarget(c66094973.sptg) - e3:SetOperation(c66094973.spop) - e3:SetLabelObject(e1) - c:RegisterEffect(e3) -end -function c66094973.eqcon(e,tp,eg,ep,ev,re,r,rp) - return not e:GetHandler():IsHasEffect(66094973) -end -function c66094973.filter(c) - return c:IsPosition(POS_FACEUP_DEFENCE) and c:IsAbleToChangeControler() -end -function c66094973.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c66094973.filter(chkc) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.GetFieldGroup(tp,LOCATION_HAND,0)~=0 - and Duel.IsExistingTarget(c66094973.filter,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local g=Duel.SelectTarget(tp,c66094973.filter,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0) -end -function c66094973.eqlimit(e,c) - return e:GetOwner()==c -end -function c66094973.eqop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if Duel.GetFieldGroup(tp,LOCATION_HAND,0)==0 then return end - Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT+REASON_DISCARD) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - if c:IsFaceup() and c:IsRelateToEffect(e) then - local atk=tc:GetTextAttack() - if atk<0 then atk=0 end - if not Duel.Equip(tp,tc,c,false) then return end - --Add Equip limit - e:SetLabelObject(tc) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_COPY_INHERIT+EFFECT_FLAG_OWNER_RELATE) - e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(c66094973.eqlimit) - tc:RegisterEffect(e1) - if atk>0 then - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_OWNER_RELATE+EFFECT_FLAG_SET_AVAILABLE) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetReset(RESET_EVENT+0x1fe0000) - e2:SetValue(atk) - tc:RegisterEffect(e2) - end - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_EQUIP) - e3:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_SET_AVAILABLE) - e3:SetCode(66094973) - e3:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e3) - else Duel.SendtoGrave(tc,REASON_EFFECT) end - end -end -function c66094973.poscon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetAttackedCount()>0 -end -function c66094973.posop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsAttackPos() then - Duel.ChangePosition(c,POS_FACEUP_DEFENCE) - end -end -function c66094973.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsHasEffect(66094973) -end -function c66094973.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local tc=e:GetLabelObject():GetLabelObject() - Duel.SetTargetCard(tc) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,tc,1,0,0) -end -function c66094973.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.IsPlayerCanSpecialSummon(tp) then - if Duel.SpecialSummon(tc,0,tp,1-tp,false,false,POS_FACEUP_DEFENCE)==0 then - Duel.SendtoGrave(tc,REASON_EFFECT) - end - end -end diff --git a/script/c66100045.lua b/script/c66100045.lua deleted file mode 100644 index c0bda66528..0000000000 --- a/script/c66100045.lua +++ /dev/null @@ -1,16 +0,0 @@ ---転生断絶 -function c66100045.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --remove - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(LOCATION_GRAVE,LOCATION_GRAVE) - e2:SetCode(EFFECT_TO_DECK_REDIRECT) - e2:SetValue(LOCATION_REMOVED) - c:RegisterEffect(e2) -end diff --git a/script/c66127916.lua b/script/c66127916.lua deleted file mode 100644 index cc054eb9d7..0000000000 --- a/script/c66127916.lua +++ /dev/null @@ -1,49 +0,0 @@ ---融合準備 -function c66127916.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetHintTiming(0,TIMING_END_PHASE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c66127916.target) - e1:SetOperation(c66127916.activate) - c:RegisterEffect(e1) -end -function c66127916.filter1(c,tp) - return c.material_count and Duel.IsExistingMatchingCard(c66127916.filter2,tp,LOCATION_DECK,0,1,nil,c) -end -function c66127916.filter2(c,fc) - if c:IsHasEffect(EFFECT_FORBIDDEN) or not c:IsAbleToHand() then return false end - for i=1,fc.material_count do - if c:IsCode(fc.material[i]) then return true end - end - return false -end -function c66127916.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c66127916.filter1,tp,LOCATION_EXTRA,0,1,nil,tp) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c66127916.filter3(c) - return c:IsCode(24094653) and c:IsAbleToHand() and not c:IsHasEffect(EFFECT_NECRO_VALLEY) -end -function c66127916.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) - local cg=Duel.SelectMatchingCard(tp,c66127916.filter1,tp,LOCATION_EXTRA,0,1,1,nil,tp) - if cg:GetCount()==0 then return end - Duel.ConfirmCards(1-tp,cg) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c66127916.filter2,tp,LOCATION_DECK,0,1,1,nil,cg:GetFirst()) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - local tg=Duel.GetMatchingGroup(c66127916.filter3,tp,LOCATION_GRAVE,0,nil) - if tg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(66127916,0)) then - Duel.BreakEffect() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local sg=tg:Select(tp,1,1,nil) - Duel.SendtoHand(sg,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,sg) - end - end -end diff --git a/script/c6614221.lua b/script/c6614221.lua deleted file mode 100644 index 969192c86f..0000000000 --- a/script/c6614221.lua +++ /dev/null @@ -1,52 +0,0 @@ ---霧の王 -function c6614221.initial_effect(c) - --decrease tribute - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DECREASE_TRIBUTE) - e1:SetValue(0x2) - c:RegisterEffect(e1) - --tribute check - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_MATERIAL_CHECK) - e2:SetValue(c6614221.valcheck) - c:RegisterEffect(e2) - --give atk effect only when summon - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_SUMMON_COST) - e3:SetOperation(c6614221.facechk) - e3:SetLabelObject(e2) - c:RegisterEffect(e3) - --cannot release - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_FIELD) - e4:SetRange(LOCATION_MZONE) - e4:SetCode(EFFECT_CANNOT_RELEASE) - e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e4:SetTargetRange(1,1) - c:RegisterEffect(e4) -end -function c6614221.valcheck(e,c) - local g=c:GetMaterial() - local tc=g:GetFirst() - local atk=0 - while tc do - local catk=tc:GetTextAttack() - atk=atk+(catk>=0 and catk or 0) - tc=g:GetNext() - end - if e:GetLabel()==1 then - e:SetLabel(0) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK) - e1:SetValue(atk) - e1:SetReset(RESET_EVENT+0xff0000) - c:RegisterEffect(e1) - end -end -function c6614221.facechk(e,tp,eg,ep,ev,re,r,rp) - e:GetLabelObject():SetLabel(1) -end diff --git a/script/c66165755.lua b/script/c66165755.lua deleted file mode 100644 index a251e97f2d..0000000000 --- a/script/c66165755.lua +++ /dev/null @@ -1,65 +0,0 @@ ---A・ジェネクス・アクセル -function c66165755.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0x2),aux.NonTuner(nil),1) - c:EnableReviveLimit() - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(66165755,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCost(c66165755.spcost) - e1:SetTarget(c66165755.sptg) - e1:SetOperation(c66165755.spop) - c:RegisterEffect(e1) -end -function c66165755.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) -end -function c66165755.spfilter(c,e,tp) - return c:IsLevelBelow(4) and c:IsRace(RACE_MACHINE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c66165755.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c66165755.spfilter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c66165755.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c66165755.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c66165755.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if not tc:IsRelateToEffect(e) or Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 - or not tc:IsCanBeSpecialSummoned(e,0,tp,false,false) then return end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK) - e1:SetValue(tc:GetTextAttack()*2) - e1:SetReset(RESET_EVENT+0xfe0000) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_CANNOT_DIRECT_ATTACK) - e2:SetReset(RESET_EVENT+0xfe0000) - tc:RegisterEffect(e2) - local e3=Effect.CreateEffect(e:GetHandler()) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e3:SetRange(LOCATION_MZONE) - e3:SetCode(EVENT_PHASE+PHASE_END) - e3:SetCondition(c66165755.rmcon) - e3:SetOperation(c66165755.rmop) - e3:SetReset(RESET_EVENT+0xfe0000) - e3:SetCountLimit(1) - tc:RegisterEffect(e3) - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) -end -function c66165755.rmcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c66165755.rmop(e,tp,eg,ep,ev,re,r,rp) - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT) -end diff --git a/script/c66194206.lua b/script/c66194206.lua deleted file mode 100644 index 26b3b075c1..0000000000 --- a/script/c66194206.lua +++ /dev/null @@ -1,50 +0,0 @@ ---ライトロードの裁き -function c66194206.initial_effect(c) - --activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TODECK) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c66194206.target) - e1:SetOperation(c66194206.activate) - c:RegisterEffect(e1) - --to hand - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetProperty(EFFECT_FLAG_DELAY) - e2:SetCondition(c66194206.thcon) - e2:SetTarget(c66194206.thtg) - e2:SetOperation(c66194206.thop) - c:RegisterEffect(e2) -end -function c66194206.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToDeck() end - Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0) -end -function c66194206.activate(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - c:CancelToGrave() - Duel.SendtoDeck(c,nil,0,REASON_EFFECT) - end -end -function c66194206.thcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_DECK) and re:IsActiveType(TYPE_MONSTER) and re:GetHandler():IsSetCard(0x38) - and bit.band(r,REASON_EFFECT)~=0 -end -function c66194206.thfilter(c) - return c:IsCode(57774843) and c:IsAbleToHand() -end -function c66194206.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c66194206.thfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c66194206.thop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstMatchingCard(c66194206.thfilter,tp,LOCATION_DECK,0,nil) - if tc then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end diff --git a/script/c66200210.lua b/script/c66200210.lua deleted file mode 100644 index d8c0f9cdc1..0000000000 --- a/script/c66200210.lua +++ /dev/null @@ -1,93 +0,0 @@ ---幻獣機ハムストラット -function c66200210.initial_effect(c) - --level - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_UPDATE_LEVEL) - e1:SetValue(c66200210.lvval) - c:RegisterEffect(e1) - -- - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e2:SetCondition(c66200210.indcon) - e2:SetValue(1) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - c:RegisterEffect(e3) - --token - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(66200210,0)) - e4:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e4:SetCode(EVENT_FLIP) - e4:SetTarget(c66200210.sptg) - e4:SetOperation(c66200210.spop) - c:RegisterEffect(e4) - --spsummon - local e5=Effect.CreateEffect(c) - e5:SetDescription(aux.Stringid(66200210,1)) - e5:SetCategory(CATEGORY_SPECIAL_SUMMON) - e5:SetType(EFFECT_TYPE_IGNITION) - e5:SetRange(LOCATION_MZONE) - e5:SetProperty(EFFECT_FLAG_CARD_TARGET) - e5:SetCountLimit(1,66200210) - e5:SetCost(c66200210.spcost2) - e5:SetTarget(c66200210.sptg2) - e5:SetOperation(c66200210.spop2) - c:RegisterEffect(e5) -end -function c66200210.lvval(e,c) - local tp=c:GetControler() - local lv=0 - for i=0,4 do - local tc=Duel.GetFieldCard(tp,LOCATION_MZONE,i) - if tc and tc:IsCode(31533705) then lv=lv+tc:GetLevel() end - end - return lv -end -function c66200210.indcon(e) - return Duel.IsExistingMatchingCard(Card.IsType,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil,TYPE_TOKEN) -end -function c66200210.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,2,0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,0,0) -end -function c66200210.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=1 then return end - if Duel.IsPlayerCanSpecialSummonMonster(tp,31533705,0x101b,0x4011,0,0,3,RACE_MACHINE,ATTRIBUTE_WIND) then - local token1=Duel.CreateToken(tp,66200211) - Duel.SpecialSummonStep(token1,0,tp,tp,false,false,POS_FACEUP) - local token2=Duel.CreateToken(tp,66200211) - Duel.SpecialSummonStep(token2,0,tp,tp,false,false,POS_FACEUP) - Duel.SpecialSummonComplete() - end -end -function c66200210.spcost2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsType,1,nil,TYPE_TOKEN) end - local g=Duel.SelectReleaseGroup(tp,Card.IsType,1,1,nil,TYPE_TOKEN) - Duel.Release(g,REASON_COST) -end -function c66200210.filter(c,e,tp) - return c:IsSetCard(0x101b) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c66200210.sptg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c66200210.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsExistingTarget(c66200210.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c66200210.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c66200210.spop2(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c66214679.lua b/script/c66214679.lua deleted file mode 100644 index 55848a4dc3..0000000000 --- a/script/c66214679.lua +++ /dev/null @@ -1,38 +0,0 @@ ---ダーク・ホルス・ドラゴン -function c66214679.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(66214679,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) - e1:SetCode(EVENT_CHAINING) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCondition(c66214679.spcon) - e1:SetTarget(c66214679.sptg) - e1:SetOperation(c66214679.spop) - c:RegisterEffect(e1) -end -function c66214679.spcon(e,tp,eg,ep,ev,re,r,rp) - local ph=Duel.GetCurrentPhase() - return Duel.GetTurnPlayer()~=tp and (ph==PHASE_MAIN1 or ph==PHASE_MAIN2) - and re:IsActiveType(TYPE_SPELL) and re:IsHasType(EFFECT_TYPE_ACTIVATE) -end -function c66214679.filter(c,e,tp) - return c:GetLevel()==4 and c:IsAttribute(ATTRIBUTE_DARK) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c66214679.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c66214679.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsRelateToEffect(e) - and e:GetHandler():IsFaceup() and Duel.IsExistingTarget(c66214679.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c66214679.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c66214679.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if e:GetHandler():IsRelateToEffect(e) and e:GetHandler():IsFaceup() and tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c66235877.lua b/script/c66235877.lua deleted file mode 100644 index 1bf54ddb8b..0000000000 --- a/script/c66235877.lua +++ /dev/null @@ -1,40 +0,0 @@ ---デス・デーモン・ドラゴン -function c66235877.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcCode2(c,93220472,16475472,false,false) - --disable - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_DISABLE) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e1:SetTarget(c66235877.distg) - c:RegisterEffect(e1) - --disable effect - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_CHAIN_SOLVING) - e2:SetRange(LOCATION_MZONE) - e2:SetOperation(c66235877.disop) - c:RegisterEffect(e2) - -- - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetCode(66235877) - e3:SetRange(LOCATION_MZONE) - e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - c:RegisterEffect(e3) -end -function c66235877.distg(e,c) - return c:IsType(TYPE_FLIP) -end -function c66235877.disop(e,tp,eg,ep,ev,re,r,rp) - if re:IsActiveType(TYPE_FLIP) then Duel.NegateEffect(ev) end - if re:IsActiveType(TYPE_TRAP) and re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then - local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) - if g and g:IsContains(e:GetHandler()) then - Duel.NegateEffect(ev) - end - end -end diff --git a/script/c6625096.lua b/script/c6625096.lua deleted file mode 100644 index 043aeff81c..0000000000 --- a/script/c6625096.lua +++ /dev/null @@ -1,38 +0,0 @@ ---鰤っ子姫 -function c6625096.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(6625096,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetCountLimit(1,6625096) - e1:SetCost(c6625096.spcost) - e1:SetTarget(c6625096.sptg) - e1:SetOperation(c6625096.spop) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e2) -end -function c6625096.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) -end -function c6625096.filter(c,e,tp) - return c:IsLevelBelow(4) and c:IsRace(RACE_FISH) and not c:IsCode(6625096) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c6625096.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsExistingMatchingCard(c6625096.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c6625096.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c6625096.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c6628343.lua b/script/c6628343.lua deleted file mode 100644 index f6df3b07ef..0000000000 --- a/script/c6628343.lua +++ /dev/null @@ -1,97 +0,0 @@ ---開闢の騎士 -function c6628343.initial_effect(c) - --gain - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EVENT_BE_MATERIAL) - e1:SetCondition(c6628343.mtcon) - e1:SetOperation(c6628343.mtop) - c:RegisterEffect(e1) - --tohand - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_REMOVE) - e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e2:SetCountLimit(1,6628343) - e2:SetCondition(c6628343.thcon) - e2:SetTarget(c6628343.thtg) - e2:SetOperation(c6628343.thop) - c:RegisterEffect(e2) -end -function c6628343.mtcon(e,tp,eg,ep,ev,re,r,rp) - return r==REASON_RITUAL -end -function c6628343.mtop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetFlagEffect(tp,6628343)~=0 then return end - local c=e:GetHandler() - local g=eg:Filter(Card.IsSetCard,nil,0xcf) - local rc=g:GetFirst() - if not rc then return end - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(6628343,0)) - e1:SetCategory(CATEGORY_REMOVE) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetTarget(c6628343.rmtg) - e1:SetOperation(c6628343.rmop) - e1:SetReset(RESET_EVENT+0x1fe0000) - rc:RegisterEffect(e1,true) - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(6628343,1)) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_BATTLE_DESTROYING) - e2:SetCondition(c6628343.atcon) - e2:SetOperation(c6628343.atop) - e2:SetReset(RESET_EVENT+0x1fe0000) - rc:RegisterEffect(e2,true) - if not rc:IsType(TYPE_EFFECT) then - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_ADD_TYPE) - e3:SetValue(TYPE_EFFECT) - e3:SetReset(RESET_EVENT+0x1fe0000) - rc:RegisterEffect(e3,true) - end - Duel.RegisterFlagEffect(tp,6628343,RESET_PHASE+PHASE_END,0,1) -end -function c6628343.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsAbleToRemove() end - if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) -end -function c6628343.rmop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) - end -end -function c6628343.atcon(e,tp,eg,ep,ev,re,r,rp) - return aux.bdogcon(e,tp,eg,ep,ev,re,r,rp) and e:GetHandler():IsChainAttackable() -end -function c6628343.atop(e,tp,eg,ep,ev,re,r,rp) - Duel.ChainAttack() -end -function c6628343.thcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_GRAVE) -end -function c6628343.thfilter(c) - return c:GetType()==TYPE_SPELL+TYPE_RITUAL and c:IsAbleToHand() -end -function c6628343.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c6628343.thfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c6628343.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c6628343.thfilter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c66288028.lua b/script/c66288028.lua deleted file mode 100644 index 0a6bd2ed1b..0000000000 --- a/script/c66288028.lua +++ /dev/null @@ -1,21 +0,0 @@ ---マッシブ・ウォリアー -function c66288028.initial_effect(c) - --battle indes - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_INDESTRUCTABLE_COUNT) - e1:SetCountLimit(1) - e1:SetValue(c66288028.valcon) - c:RegisterEffect(e1) - -- - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_AVOID_BATTLE_DAMAGE) - e2:SetValue(1) - c:RegisterEffect(e2) -end -function c66288028.valcon(e,re,r,rp) - return bit.band(r,REASON_BATTLE)~=0 -end diff --git a/script/c66331855.lua b/script/c66331855.lua deleted file mode 100644 index 858edc4a2c..0000000000 --- a/script/c66331855.lua +++ /dev/null @@ -1,55 +0,0 @@ ---D・チャッカン -function c66331855.initial_effect(c) - --damagea - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(66331855,0)) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c66331855.cona) - e1:SetCost(c66331855.costa) - e1:SetTarget(c66331855.tga) - e1:SetOperation(c66331855.op) - c:RegisterEffect(e1) - --damaged - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(66331855,1)) - e2:SetCategory(CATEGORY_DAMAGE) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetCountLimit(1) - e2:SetRange(LOCATION_MZONE) - e2:SetCondition(c66331855.cond) - e2:SetTarget(c66331855.tgd) - e2:SetOperation(c66331855.op) - c:RegisterEffect(e2) -end -function c66331855.cona(e,tp,eg,ep,ev,re,r,rp) - return not e:GetHandler():IsDisabled() and e:GetHandler():IsAttackPos() -end -function c66331855.cond(e,tp,eg,ep,ev,re,r,rp) - return not e:GetHandler():IsDisabled() and e:GetHandler():IsDefencePos() -end -function c66331855.costa(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,aux.TRUE,1,nil) end - local g=Duel.SelectReleaseGroup(tp,aux.TRUE,1,1,nil) - Duel.Release(g,REASON_COST) -end -function c66331855.tga(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(600) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,600) -end -function c66331855.tgd(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(300) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,300) -end -function c66331855.op(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c66337215.lua b/script/c66337215.lua deleted file mode 100644 index cd21289f95..0000000000 --- a/script/c66337215.lua +++ /dev/null @@ -1,36 +0,0 @@ ---創世の預言者 -function c66337215.initial_effect(c) - --salvage - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(66337215,0)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c66337215.thcost) - e1:SetTarget(c66337215.thtg) - e1:SetOperation(c66337215.thop) - c:RegisterEffect(e1) -end -function c66337215.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) -end -function c66337215.filter(c) - return c:IsLevelAbove(7) and c:IsAbleToHand() -end -function c66337215.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:GetLocation()==LOCATION_GRAVE and chkc:GetControler()==tp and c66337215.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c66337215.filter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c66337215.filter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c66337215.thop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end diff --git a/script/c66362965.lua b/script/c66362965.lua deleted file mode 100644 index f831a36b71..0000000000 --- a/script/c66362965.lua +++ /dev/null @@ -1,16 +0,0 @@ ---魔導ギガサイバー -function c66362965.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c66362965.spcon) - c:RegisterEffect(e1) -end -function c66362965.spcon(e,c) - if c==nil then return true end - return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 - and Duel.GetFieldGroupCount(c:GetControler(),0,LOCATION_MZONE,nil)-Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0,nil)>=2 -end diff --git a/script/c66378485.lua b/script/c66378485.lua deleted file mode 100644 index 04e73bf737..0000000000 --- a/script/c66378485.lua +++ /dev/null @@ -1,20 +0,0 @@ ---ネオフレムベル・オリジン -function c66378485.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c66378485.spcon) - c:RegisterEffect(e1) -end -function c66378485.filter(c) - return c:IsFaceup() and c:IsSetCard(0x2c) and c:GetCode()~=66378485 -end -function c66378485.spcon(e,c) - if c==nil then return true end - return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c66378485.filter,c:GetControler(),LOCATION_MZONE,0,1,nil) - and Duel.GetFieldGroupCount(c:GetControler(),0,LOCATION_GRAVE)<=3 -end diff --git a/script/c66395299.lua b/script/c66395299.lua deleted file mode 100644 index d7cd80686e..0000000000 --- a/script/c66395299.lua +++ /dev/null @@ -1,34 +0,0 @@ ---ドッペル・ゲイナー -function c66395299.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --damage - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(66395299,0)) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetRange(LOCATION_SZONE) - e2:SetCategory(CATEGORY_DAMAGE) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetCode(EVENT_DAMAGE) - e2:SetCondition(c66395299.damcon) - e2:SetTarget(c66395299.damtg) - e2:SetOperation(c66395299.damop) - c:RegisterEffect(e2) -end -function c66395299.damcon(e,tp,eg,ep,ev,re,r,rp) - return bit.band(r,REASON_EFFECT)~=0 and re:GetHandler():IsLocation(LOCATION_MZONE) and re:GetHandler():IsControler(1-tp) -end -function c66395299.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(ev) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,ev) -end -function c66395299.damop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c66399675.lua b/script/c66399675.lua deleted file mode 100644 index ce1307baa3..0000000000 --- a/script/c66399675.lua +++ /dev/null @@ -1,28 +0,0 @@ ---リチュア・チェイン -function c66399675.initial_effect(c) - --to hand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(66399675,0)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetOperation(c66399675.operation) - c:RegisterEffect(e1) -end -function c66399675.filter(c) - return c:IsType(TYPE_RITUAL) and c:IsAbleToHand() -end -function c66399675.operation(e,tp,eg,ep,ev,re,r,rp,chk) - if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)<3 then return end - local g=Duel.GetDecktopGroup(tp,3) - Duel.ConfirmCards(tp,g) - if g:IsExists(c66399675.filter,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(66399675,1)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local sg=g:FilterSelect(tp,c66399675.filter,1,1,nil) - Duel.DisableShuffleCheck() - Duel.SendtoHand(sg,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,sg) - Duel.ShuffleHand(tp) - Duel.SortDecktop(tp,tp,2) - else Duel.SortDecktop(tp,tp,3) end -end diff --git a/script/c66413481.lua b/script/c66413481.lua deleted file mode 100644 index c62eab099e..0000000000 --- a/script/c66413481.lua +++ /dev/null @@ -1,61 +0,0 @@ ---炎王獣 ヤクシャ -function c66413481.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(66413481,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DELAY) - e1:SetRange(LOCATION_HAND) - e1:SetCode(EVENT_DESTROYED) - e1:SetCondition(c66413481.spcon) - e1:SetTarget(c66413481.sptg) - e1:SetOperation(c66413481.spop) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(66413481,1)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetCountLimit(1,66413481) - e2:SetCondition(c66413481.descon) - e2:SetTarget(c66413481.destg) - e2:SetOperation(c66413481.desop) - c:RegisterEffect(e2) -end -function c66413481.cfilter(c,tp) - return c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP) and c:GetPreviousControler()==tp - and c:IsReason(REASON_EFFECT) and c:IsSetCard(0x81) -end -function c66413481.spcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c66413481.cfilter,1,nil,tp) -end -function c66413481.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsRelateToEffect(e) - and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c66413481.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) - end -end -function c66413481.descon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsReason(REASON_DESTROY) -end -function c66413481.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDestructable,tp,LOCATION_ONFIELD+LOCATION_HAND,0,1,nil) end - local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,LOCATION_ONFIELD+LOCATION_HAND,0,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c66413481.desop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectMatchingCard(tp,Card.IsDestructable,tp,LOCATION_ONFIELD+LOCATION_HAND,0,1,1,nil) - if g:GetCount()>0 then - Duel.Destroy(g,REASON_EFFECT) - end -end diff --git a/script/c66436257.lua b/script/c66436257.lua deleted file mode 100644 index 051537b45e..0000000000 --- a/script/c66436257.lua +++ /dev/null @@ -1,30 +0,0 @@ ---ヴォルカニック・カウンター -function c66436257.initial_effect(c) - --remove - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(66436257,0)) - e1:SetCategory(CATEGORY_REMOVE) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetRange(LOCATION_GRAVE) - e1:SetCode(EVENT_BATTLE_DAMAGE) - e1:SetCondition(c66436257.condition) - e1:SetTarget(c66436257.target) - e1:SetOperation(c66436257.operation) - c:RegisterEffect(e1) -end -function c66436257.condition(e,tp,eg,ep,ev,re,r,rp) - return ep==tp -end -function c66436257.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_REMOVE,e:GetHandler(),1,0,0) -end -function c66436257.filter(c) - return c:IsAttribute(ATTRIBUTE_FIRE) and c:GetCode()~=66436257 -end -function c66436257.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT)~=0 - and Duel.IsExistingMatchingCard(c66436257.filter,tp,LOCATION_GRAVE,0,1,nil) then - Duel.Damage(1-tp,ev,REASON_EFFECT) - end -end diff --git a/script/c66451379.lua b/script/c66451379.lua deleted file mode 100644 index 71dd3ee772..0000000000 --- a/script/c66451379.lua +++ /dev/null @@ -1,79 +0,0 @@ ---グレイドル・アリゲーター -function c66451379.initial_effect(c) - --equip - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCondition(c66451379.eqcon) - e1:SetTarget(c66451379.eqtg) - e1:SetOperation(c66451379.eqop) - c:RegisterEffect(e1) -end -function c66451379.eqcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return (c:IsReason(REASON_BATTLE) or (c:IsReason(REASON_EFFECT) and re:IsActiveType(TYPE_SPELL))) - and c:IsReason(REASON_DESTROY) and c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_MZONE) -end -function c66451379.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsFaceup() end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil) -end -function c66451379.eqlimit(e,c) - return c==e:GetLabelObject() -end -function c66451379.eqop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsRelateToEffect(e) and tc:IsControler(1-tp) then - Duel.Equip(tp,c,tc,true) - --Add Equip limit - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(c66451379.eqlimit) - e1:SetLabelObject(tc) - c:RegisterEffect(e1) - --control - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_SET_CONTROL) - e2:SetValue(tp) - e2:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e2) - --Destroy - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e3:SetCode(EVENT_LEAVE_FIELD_P) - e3:SetOperation(c66451379.checkop) - e3:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e3) - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE) - e4:SetCode(EVENT_LEAVE_FIELD) - e4:SetOperation(c66451379.desop) - e4:SetReset(RESET_EVENT+0x17e0000) - e4:SetLabelObject(e3) - c:RegisterEffect(e4) - end -end -function c66451379.checkop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsDisabled() then - e:SetLabel(1) - else e:SetLabel(0) end -end -function c66451379.desop(e,tp,eg,ep,ev,re,r,rp) - if e:GetLabelObject():GetLabel()~=0 then return end - local tc=e:GetHandler():GetEquipTarget() - if tc and tc:IsLocation(LOCATION_MZONE) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c66457138.lua b/script/c66457138.lua deleted file mode 100644 index 81bef32a30..0000000000 --- a/script/c66457138.lua +++ /dev/null @@ -1,20 +0,0 @@ ---ファーニマル・ライオ -function c66457138.initial_effect(c) - --atk - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetOperation(c66457138.atkop) - c:RegisterEffect(e1) -end -function c66457138.atkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(500) - e1:SetReset(RESET_EVENT+0x1ff0000+RESET_PHASE+PHASE_BATTLE) - c:RegisterEffect(e1) - end -end diff --git a/script/c66457407.lua b/script/c66457407.lua deleted file mode 100644 index 30fc90c105..0000000000 --- a/script/c66457407.lua +++ /dev/null @@ -1,35 +0,0 @@ ---コピー・プラント -function c66457407.initial_effect(c) - --lvchange - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(66457407,0)) - e1:SetCategory(CATEGORY_LVCHANGE) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c66457407.lvtg) - e1:SetOperation(c66457407.lvop) - c:RegisterEffect(e1) -end -function c66457407.lvfilter(c) - return c:IsFaceup() and c:IsRace(RACE_PLANT) and c:GetLevel()>0 -end -function c66457407.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c66457407.lvfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c66457407.lvfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c66457407.lvfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,e:GetHandler()) -end -function c66457407.lvop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsFaceup() and c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CHANGE_LEVEL) - e1:SetValue(tc:GetLevel()) - e1:SetReset(RESET_EVENT+0x1ff0000+RESET_PHASE+PHASE_END) - c:RegisterEffect(e1) - end -end diff --git a/script/c66499018.lua b/script/c66499018.lua deleted file mode 100644 index ca3e02508b..0000000000 --- a/script/c66499018.lua +++ /dev/null @@ -1,48 +0,0 @@ ---焔虎 -function c66499018.initial_effect(c) - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(66499018,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_PREDRAW) - e1:SetRange(LOCATION_GRAVE) - e1:SetCondition(c66499018.condition) - e1:SetTarget(c66499018.target) - e1:SetOperation(c66499018.operation) - c:RegisterEffect(e1) -end -function c66499018.condition(e,tp,eg,ep,ev,re,r,rp) - return tp==Duel.GetTurnPlayer() and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0 - and Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 and Duel.GetDrawCount(tp)>0 -end -function c66499018.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - local dt=Duel.GetDrawCount(tp) - if dt~=0 then - _replace_count=0 - _replace_max=dt - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EFFECT_DRAW_COUNT) - e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_DRAW) - e1:SetValue(0) - Duel.RegisterEffect(e1,tp) - end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c66499018.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - _replace_count=_replace_count+1 - if _replace_count<=_replace_max and c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+0x47e0000) - e1:SetValue(LOCATION_REMOVED) - c:RegisterEffect(e1,true) - end -end diff --git a/script/c66500065.lua b/script/c66500065.lua deleted file mode 100644 index 3ef6553438..0000000000 --- a/script/c66500065.lua +++ /dev/null @@ -1,92 +0,0 @@ ---地竜星-ヘイカン -function c66500065.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(66500065,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCountLimit(1,66500065) - e1:SetCondition(c66500065.condition) - e1:SetTarget(c66500065.target) - e1:SetOperation(c66500065.operation) - c:RegisterEffect(e1) - --synchro effect - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetRange(LOCATION_MZONE) - e2:SetHintTiming(0,TIMING_BATTLE_START+TIMING_BATTLE_END) - e2:SetCountLimit(1) - e2:SetCondition(c66500065.sccon) - e2:SetTarget(c66500065.sctg) - e2:SetOperation(c66500065.scop) - c:RegisterEffect(e2) - -- - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e3:SetCode(EVENT_BE_MATERIAL) - e3:SetCondition(c66500065.indcon) - e3:SetOperation(c66500065.indop) - c:RegisterEffect(e3) -end -function c66500065.condition(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE+REASON_EFFECT) - and c:IsPreviousLocation(LOCATION_ONFIELD) and c:GetPreviousControler()==tp -end -function c66500065.filter(c,e,tp) - return c:IsSetCard(0x9e) and not c:IsCode(66500065) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c66500065.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c66500065.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c66500065.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c66500065.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENCE) -end -function c66500065.sccon(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetTurnPlayer()==tp then return false end - local ph=Duel.GetCurrentPhase() - return ph==PHASE_MAIN1 or ph==PHASE_BATTLE or ph==PHASE_MAIN2 -end -function c66500065.mfilter(c) - return c:IsSetCard(0x9e) -end -function c66500065.sctg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local mg=Duel.GetMatchingGroup(c66500065.mfilter,tp,LOCATION_MZONE,0,nil) - return Duel.IsExistingMatchingCard(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,1,nil,nil,mg) - end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function c66500065.scop(e,tp,eg,ep,ev,re,r,rp) - local mg=Duel.GetMatchingGroup(c66500065.mfilter,tp,LOCATION_MZONE,0,nil) - local g=Duel.GetMatchingGroup(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,nil,nil,mg) - if g:GetCount()>0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=g:Select(tp,1,1,nil) - Duel.SynchroSummon(tp,sg:GetFirst(),nil,mg) - end -end -function c66500065.indcon(e,tp,eg,ep,ev,re,r,rp) - return r==REASON_SYNCHRO -end -function c66500065.indop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local rc=c:GetReasonCard() - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(66500065,1)) - e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e1:SetValue(1) - e1:SetReset(RESET_EVENT+0x1fe0000) - rc:RegisterEffect(e1) -end diff --git a/script/c66506689.lua b/script/c66506689.lua deleted file mode 100644 index 169c85adda..0000000000 --- a/script/c66506689.lua +++ /dev/null @@ -1,37 +0,0 @@ ---ブリキの大公 -function c66506689.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,4,3) - c:EnableReviveLimit() - --tohand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(66506689,0)) - e1:SetCategory(CATEGORY_POSITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetCountLimit(1) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,0x1c0) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c66506689.cost) - e1:SetTarget(c66506689.tg) - e1:SetOperation(c66506689.op) - c:RegisterEffect(e1) -end -function c66506689.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c66506689.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) end - if chk==0 then return Duel.IsExistingTarget(nil,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - local g=Duel.SelectTarget(tp,nil,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_POSITION,g,g:GetCount(),0,0) -end -function c66506689.op(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.ChangePosition(tc,POS_FACEUP_DEFENCE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK,true) - end -end diff --git a/script/c66518841.lua b/script/c66518841.lua deleted file mode 100644 index e644af8118..0000000000 --- a/script/c66518841.lua +++ /dev/null @@ -1,41 +0,0 @@ ---プライドの咆哮 -function c66518841.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_PRE_DAMAGE_CALCULATE) - e1:SetCondition(c66518841.condition) - e1:SetCost(c66518841.cost) - e1:SetOperation(c66518841.activate) - c:RegisterEffect(e1) -end -function c66518841.condition(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetAttacker() - if tc:IsControler(1-tp) then tc=Duel.GetAttackTarget() end - if not tc then return false end - local bc=tc:GetBattleTarget() - if tc and bc then - local dif=bc:GetAttack()-tc:GetAttack() - e:SetLabel(dif) - return dif>0 - else return false end -end -function c66518841.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,e:GetLabel()) end - Duel.PayLPCost(tp,e:GetLabel()) -end -function c66518841.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetAttacker() - if tc:IsControler(1-tp) then tc=Duel.GetAttackTarget() end - local bc=tc:GetBattleTarget() - local dif=bc:GetAttack()-tc:GetAttack() - if dif>0 and tc:IsRelateToBattle() and bc:IsRelateToBattle() and tc:IsFaceup() and bc:IsFaceup() then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_DAMAGE_CAL) - e1:SetValue(dif+300) - tc:RegisterEffect(e1) - end -end diff --git a/script/c66523544.lua b/script/c66523544.lua deleted file mode 100644 index 68cf420f7a..0000000000 --- a/script/c66523544.lua +++ /dev/null @@ -1,37 +0,0 @@ ---超次元ロボ ギャラクシー・デストロイヤー -function c66523544.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,10,3) - c:EnableReviveLimit() - --damage - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(66523544,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCost(c66523544.cost) - e1:SetTarget(c66523544.target) - e1:SetOperation(c66523544.operation) - c:RegisterEffect(e1) -end -function c66523544.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c66523544.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable() -end -function c66523544.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c66523544.filter,tp,0,LOCATION_ONFIELD,1,nil) end - local g=Duel.GetMatchingGroup(c66523544.filter,tp,0,LOCATION_ONFIELD,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) - Duel.SetChainLimit(c66523544.climit) -end -function c66523544.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c66523544.filter,tp,0,LOCATION_ONFIELD,nil) - Duel.Destroy(g,REASON_EFFECT) -end -function c66523544.climit(e,lp,tp) - return lp==tp or not e:IsHasType(EFFECT_TYPE_ACTIVATE) -end diff --git a/script/c66526672.lua b/script/c66526672.lua deleted file mode 100644 index ee3733dfa2..0000000000 --- a/script/c66526672.lua +++ /dev/null @@ -1,29 +0,0 @@ ---悪夢の迷宮 -function c66526672.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_END_PHASE) - c:RegisterEffect(e1) - --position - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(66526672,0)) - e2:SetCategory(CATEGORY_POSITION) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetRange(LOCATION_SZONE) - e2:SetCountLimit(1) - e2:SetCode(EVENT_PHASE+PHASE_END) - e2:SetTarget(c66526672.postg) - e2:SetOperation(c66526672.posop) - c:RegisterEffect(e2) -end -function c66526672.postg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,Duel.GetTurnPlayer(),LOCATION_MZONE,0,1,nil) end - local g=Duel.GetMatchingGroup(Card.IsFaceup,Duel.GetTurnPlayer(),LOCATION_MZONE,0,nil) - Duel.SetOperationInfo(0,CATEGORY_POSITION,g,g:GetCount(),0,0) -end -function c66526672.posop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsFaceup,Duel.GetTurnPlayer(),LOCATION_MZONE,0,nil) - Duel.ChangePosition(g,POS_FACEUP_DEFENCE,0,POS_FACEUP_ATTACK,0) -end diff --git a/script/c66540884.lua b/script/c66540884.lua deleted file mode 100644 index a16efe386d..0000000000 --- a/script/c66540884.lua +++ /dev/null @@ -1,34 +0,0 @@ ---トリック・デーモン -function c66540884.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(66540884,0)) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCountLimit(1,66540884) - e1:SetCondition(c66540884.thcon) - e1:SetTarget(c66540884.thtg) - e1:SetOperation(c66540884.thop) - c:RegisterEffect(e1) -end -function c66540884.thcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsReason(REASON_EFFECT) or c:IsReason(REASON_BATTLE) -end -function c66540884.thfilter(c) - return c:IsSetCard(0x45) and c:GetCode()~=66540884 and c:IsAbleToHand() -end -function c66540884.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c66540884.thfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c66540884.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c66540884.thfilter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c66547759.lua b/script/c66547759.lua deleted file mode 100644 index 065b4f73e4..0000000000 --- a/script/c66547759.lua +++ /dev/null @@ -1,73 +0,0 @@ ---No.23 冥界の霊騎士ランスロット -function c66547759.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,8,2) - c:EnableReviveLimit() - --direct attack - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DIRECT_ATTACK) - e1:SetCondition(c66547759.dacon) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_BATTLE_DAMAGE) - e2:SetCondition(c66547759.descon) - e2:SetTarget(c66547759.destg) - e2:SetOperation(c66547759.desop) - c:RegisterEffect(e2) - --negate - local e3=Effect.CreateEffect(c) - e3:SetCategory(CATEGORY_NEGATE) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_QUICK_F) - e3:SetCode(EVENT_CHAINING) - e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1) - e3:SetCondition(c66547759.discon) - e3:SetCost(c66547759.discost) - e3:SetTarget(c66547759.distg) - e3:SetOperation(c66547759.disop) - c:RegisterEffect(e3) -end -c66547759.xyz_number=23 -function c66547759.dacon(e) - return e:GetHandler():GetOverlayCount()>0 -end -function c66547759.descon(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp -end -function c66547759.filter(c) - return c:IsFaceup() and c:IsDestructable() -end -function c66547759.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and c66547759.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c66547759.filter,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c66547759.filter,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c66547759.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Destroy(tc,REASON_EFFECT) - end -end -function c66547759.discon(e,tp,eg,ep,ev,re,r,rp) - return (re:IsHasType(EFFECT_TYPE_ACTIVATE) or re:IsActiveType(TYPE_MONSTER)) - and re:GetHandler()~=e:GetHandler() -end -function c66547759.discost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c66547759.distg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) -end -function c66547759.disop(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateActivation(ev) -end diff --git a/script/c66574418.lua b/script/c66574418.lua deleted file mode 100644 index 77a61c3a1c..0000000000 --- a/script/c66574418.lua +++ /dev/null @@ -1,63 +0,0 @@ ---伝説の黒石 -function c66574418.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1,66574418) - e1:SetCost(c66574418.spcost) - e1:SetTarget(c66574418.sptg) - e1:SetOperation(c66574418.spop) - c:RegisterEffect(e1) - --to deck - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_TODECK+CATEGORY_TOHAND) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_GRAVE) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCountLimit(1,66574418) - e2:SetTarget(c66574418.tdtg) - e2:SetOperation(c66574418.tdop) - c:RegisterEffect(e2) -end -function c66574418.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end -function c66574418.spfilter(c,e,tp) - return c:IsSetCard(0x3b) and c:IsLevelBelow(7) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c66574418.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsExistingMatchingCard(c66574418.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c66574418.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c66574418.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end -function c66574418.tdfilter(c) - return c:IsSetCard(0x3b) and c:IsLevelBelow(7) and c:IsAbleToDeck() -end -function c66574418.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c66574418.tdfilter(chkc) end - if chk==0 then return e:GetHandler():IsAbleToHand() - and Duel.IsExistingTarget(c66574418.tdfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectTarget(tp,c66574418.tdfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0) -end -function c66574418.tdop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - local c=e:GetHandler() - if tc:IsRelateToEffect(e) and Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)~=0 - and tc:IsLocation(LOCATION_DECK+LOCATION_EXTRA) and c:IsRelateToEffect(e) then - Duel.SendtoHand(c,nil,REASON_EFFECT) - end -end diff --git a/script/c66604523.lua b/script/c66604523.lua deleted file mode 100644 index 4d37cf2463..0000000000 --- a/script/c66604523.lua +++ /dev/null @@ -1,35 +0,0 @@ ---エクシーズ・リバーサル -function c66604523.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_CONTROL) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,0x1e0) - e1:SetTarget(c66604523.target) - e1:SetOperation(c66604523.activate) - c:RegisterEffect(e1) -end -function c66604523.filter(c) - return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:IsAbleToChangeControler() -end -function c66604523.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - if chk==0 then return Duel.IsExistingTarget(c66604523.filter,tp,0,LOCATION_MZONE,1,nil) - and Duel.IsExistingTarget(c66604523.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) - local g2=Duel.SelectTarget(tp,c66604523.filter,tp,0,LOCATION_MZONE,1,1,nil) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) - local g1=Duel.SelectTarget(tp,c66604523.filter,tp,LOCATION_MZONE,0,1,1,nil) - g1:Merge(g2) - Duel.SetOperationInfo(0,CATEGORY_CONTROL,g1,2,0,0) -end -function c66604523.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local a=g:GetFirst() - local b=g:GetNext() - if a:IsRelateToEffect(e) and b:IsRelateToEffect(e) then - Duel.SwapControl(a,b) - end -end diff --git a/script/c66607691.lua b/script/c66607691.lua deleted file mode 100644 index 0d7414c343..0000000000 --- a/script/c66607691.lua +++ /dev/null @@ -1,34 +0,0 @@ ---フォトン・ジェネレーター・ユニット -function c66607691.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c66607691.cost) - e1:SetTarget(c66607691.target) - e1:SetOperation(c66607691.activate) - c:RegisterEffect(e1) -end -function c66607691.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsCode,2,nil,70095154) end - local g=Duel.SelectReleaseGroup(tp,Card.IsCode,2,2,nil,70095154) - Duel.Release(g,REASON_COST) -end -function c66607691.spfilter(c,e,tp) - return c:IsCode(4162088) and c:IsCanBeSpecialSummoned(e,0,tp,true,true) and not c:IsHasEffect(EFFECT_NECRO_VALLEY) -end -function c66607691.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-2 - and Duel.IsExistingMatchingCard(c66607691.spfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE) -end -function c66607691.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c66607691.spfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp) - if g:GetCount()~=0 then - Duel.SpecialSummon(g,0,tp,tp,true,true,POS_FACEUP) - g:GetFirst():CompleteProcedure() - end -end diff --git a/script/c66625883.lua b/script/c66625883.lua deleted file mode 100644 index 8893c2cef3..0000000000 --- a/script/c66625883.lua +++ /dev/null @@ -1,63 +0,0 @@ ---カラクリ参謀 弐四八 -function c66625883.initial_effect(c) - --must attack - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_MUST_ATTACK) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_CANNOT_EP) - e2:SetRange(LOCATION_MZONE) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetTargetRange(1,0) - e2:SetCondition(c66625883.becon) - c:RegisterEffect(e2) - --to defence - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(66625883,0)) - e3:SetCategory(CATEGORY_POSITION) - e3:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_SINGLE) - e3:SetCode(EVENT_BE_BATTLE_TARGET) - e3:SetCondition(c66625883.poscon) - e3:SetOperation(c66625883.posop) - c:RegisterEffect(e3) - --pos - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(66625883,1)) - e4:SetCategory(CATEGORY_POSITION) - e4:SetProperty(EFFECT_FLAG_CARD_TARGET) - e4:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_SINGLE) - e4:SetCode(EVENT_SUMMON_SUCCESS) - e4:SetTarget(c66625883.tg) - e4:SetOperation(c66625883.op) - c:RegisterEffect(e4) - local e5=e4:Clone() - e5:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e5) -end -function c66625883.becon(e) - return e:GetHandler():IsAttackable() -end -function c66625883.poscon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsAttackPos() -end -function c66625883.posop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFaceup() and c:IsRelateToEffect(e) then - Duel.ChangePosition(c,POS_FACEUP_DEFENCE) - end -end -function c66625883.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - local g=Duel.SelectTarget(tp,aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0) -end -function c66625883.op(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.ChangePosition(tc,POS_FACEUP_DEFENCE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK) - end -end diff --git a/script/c66661678.lua b/script/c66661678.lua deleted file mode 100644 index e98ff279e6..0000000000 --- a/script/c66661678.lua +++ /dev/null @@ -1,35 +0,0 @@ ---氷結界のロイヤル・ナイト -function c66661678.initial_effect(c) - --token - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(66661678,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetCondition(c66661678.condition) - e1:SetTarget(c66661678.target) - e1:SetOperation(c66661678.operation) - c:RegisterEffect(e1) -end -function c66661678.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_ADVANCE -end -function c66661678.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,0) - Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,tp,0) -end -function c66661678.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(1-tp,LOCATION_MZONE,tp)<=0 - or not Duel.IsPlayerCanSpecialSummonMonster(tp,66661679,0,0x4011,1000,0,1,RACE_AQUA,ATTRIBUTE_WATER,POS_FACEUP_ATTACK,1-tp) then return end - local token=Duel.CreateToken(tp,66661679) - Duel.SpecialSummonStep(token,0,tp,1-tp,false,false,POS_FACEUP_ATTACK) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UNRELEASABLE_SUM) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetValue(1) - e1:SetReset(RESET_EVENT+0x1fe0000) - token:RegisterEffect(e1,true) - Duel.SpecialSummonComplete() -end diff --git a/script/c66668900.lua b/script/c66668900.lua deleted file mode 100644 index d709ea6239..0000000000 --- a/script/c66668900.lua +++ /dev/null @@ -1,28 +0,0 @@ ---アクアアクトレス・グッピー -function c66668900.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetTarget(c66668900.sptg) - e1:SetOperation(c66668900.spop) - c:RegisterEffect(e1) -end -function c66668900.filter(c,e,tp) - return c:IsSetCard(0xcd) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c66668900.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c66668900.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c66668900.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c66668900.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c66690411.lua b/script/c66690411.lua deleted file mode 100644 index efef400480..0000000000 --- a/script/c66690411.lua +++ /dev/null @@ -1,9 +0,0 @@ ---マインド・オン・エア -function c66690411.initial_effect(c) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_PUBLIC) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(0,LOCATION_HAND) - c:RegisterEffect(e1) -end diff --git a/script/c66707058.lua b/script/c66707058.lua deleted file mode 100644 index e7adaad787..0000000000 --- a/script/c66707058.lua +++ /dev/null @@ -1,32 +0,0 @@ ---ゴブリン暗殺部隊 -function c66707058.initial_effect(c) - --to defence - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE+PHASE_BATTLE) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCondition(c66707058.poscon) - e1:SetOperation(c66707058.posop) - c:RegisterEffect(e1) - --direct - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DIRECT_ATTACK) - c:RegisterEffect(e2) -end -function c66707058.poscon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetAttackedCount()>0 -end -function c66707058.posop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsAttackPos() then - Duel.ChangePosition(c,POS_FACEUP_DEFENCE) - end - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_CHANGE_POSITION) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_COPY_INHERIT) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,3) - c:RegisterEffect(e1) -end diff --git a/script/c66712593.lua b/script/c66712593.lua deleted file mode 100644 index dcca716f01..0000000000 --- a/script/c66712593.lua +++ /dev/null @@ -1,44 +0,0 @@ ---エレメント・ソルジャー -function c66712593.initial_effect(c) - --control - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_CANNOT_CHANGE_CONTROL) - e1:SetCondition(c66712593.ctlcon) - c:RegisterEffect(e1) - --disable - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_BATTLED) - e2:SetCondition(c66712593.discon) - e2:SetOperation(c66712593.disop) - c:RegisterEffect(e2) -end -function c66712593.filter(c,att) - return c:IsFaceup() and c:IsAttribute(att) -end -function c66712593.ctlcon(e) - return Duel.IsExistingMatchingCard(c66712593.filter,0,LOCATION_MZONE,LOCATION_MZONE,1,nil,ATTRIBUTE_WATER) -end -function c66712593.discon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local bc=c:GetBattleTarget() - return bc and bc:IsStatus(STATUS_BATTLE_DESTROYED) and not c:IsStatus(STATUS_BATTLE_DESTROYED) - and Duel.IsExistingMatchingCard(c66712593.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,ATTRIBUTE_EARTH) -end -function c66712593.disop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local bc=c:GetBattleTarget() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0x17a0000) - bc:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+0x17a0000) - bc:RegisterEffect(e2) -end diff --git a/script/c66719324.lua b/script/c66719324.lua deleted file mode 100644 index d124b2a9e2..0000000000 --- a/script/c66719324.lua +++ /dev/null @@ -1,19 +0,0 @@ ---恵みの雨 -function c66719324.initial_effect(c) - --recover - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCategory(CATEGORY_RECOVER) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c66719324.target) - e1:SetOperation(c66719324.operation) - c:RegisterEffect(e1) -end -function c66719324.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,PLAYER_ALL,1000) -end -function c66719324.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.Recover(tp,1000,REASON_EFFECT) - Duel.Recover(1-tp,1000,REASON_EFFECT) -end diff --git a/script/c66727115.lua b/script/c66727115.lua deleted file mode 100644 index 7bbea37a69..0000000000 --- a/script/c66727115.lua +++ /dev/null @@ -1,46 +0,0 @@ ---武神逐 -function c66727115.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c66727115.cost) - e1:SetTarget(c66727115.target) - e1:SetOperation(c66727115.activate) - c:RegisterEffect(e1) -end -function c66727115.rfilter(c,e,tp) - return c:IsSetCard(0x88) and c:IsRace(RACE_BEASTWARRIOR) - and Duel.IsExistingTarget(c66727115.spfilter,tp,LOCATION_GRAVE,0,1,nil,c:GetCode(),e,tp) -end -function c66727115.spfilter(c,code,e,tp) - return c:IsSetCard(0x88) and c:GetCode()~=code and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c66727115.cost(e,tp,eg,ep,ev,re,r,rp,chk) - e:SetLabel(1) - return true -end -function c66727115.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c66727115.spfilter(chkc,e:GetLabel(),e,tp) end - if chk==0 then - if e:GetLabel()~=1 then return false end - e:SetLabel(0) - return Duel.CheckReleaseGroup(tp,c66727115.rfilter,1,nil,e,tp) - end - local g=Duel.SelectReleaseGroup(tp,c66727115.rfilter,1,1,nil,e,tp) - local code=g:GetFirst():GetCode() - e:SetLabel(code) - Duel.Release(g,REASON_COST) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=Duel.SelectTarget(tp,c66727115.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,code,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,sg,sg:GetCount(),0,0) -end -function c66727115.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c66729231.lua b/script/c66729231.lua deleted file mode 100644 index 499b583376..0000000000 --- a/script/c66729231.lua +++ /dev/null @@ -1,34 +0,0 @@ ---イビリチュア・ジールギガス -function c66729231.initial_effect(c) - c:EnableReviveLimit() - --draw - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(66729231,0)) - e1:SetCategory(CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCost(c66729231.cost) - e1:SetTarget(c66729231.target) - e1:SetOperation(c66729231.operation) - c:RegisterEffect(e1) -end -function c66729231.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,1000) end - Duel.PayLPCost(tp,1000) -end -function c66729231.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c66729231.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.Draw(tp,1,REASON_EFFECT)==0 then return end - local tc=Duel.GetOperatedGroup():GetFirst() - Duel.ConfirmCards(1-tp,tc) - if tc:IsSetCard(0x3a) and tc:IsType(TYPE_MONSTER) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local dg=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - Duel.SendtoDeck(dg,nil,2,REASON_EFFECT) - end - Duel.ShuffleHand(tp) -end diff --git a/script/c66742250.lua b/script/c66742250.lua deleted file mode 100644 index f593d8465d..0000000000 --- a/script/c66742250.lua +++ /dev/null @@ -1,39 +0,0 @@ ---アヌビスの呪い -function c66742250.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_POSITION) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,0x1c0) - e1:SetTarget(c66742250.postg) - e1:SetOperation(c66742250.posop) - c:RegisterEffect(e1) -end -function c66742250.filter(c) - return c:IsPosition(POS_FACEUP_ATTACK) and c:IsType(TYPE_EFFECT) -end -function c66742250.postg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c66742250.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - local g=Duel.GetMatchingGroup(c66742250.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_POSITION,g,g:GetCount(),0,0) -end -function c66742250.posop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c66742250.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - Duel.ChangePosition(g,POS_FACEUP_DEFENCE,0,POS_FACEUP_DEFENCE,0) - local tc=g:GetFirst() - while tc do - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_BASE_DEFENCE) - e1:SetValue(0) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_CANNOT_CHANGE_POSITION) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e2) - tc=g:GetNext() - end -end diff --git a/script/c66752837.lua b/script/c66752837.lua deleted file mode 100644 index d2f20eff8b..0000000000 --- a/script/c66752837.lua +++ /dev/null @@ -1,60 +0,0 @@ ---霊廟の守護者 -function c66752837.initial_effect(c) - --double tribute - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DOUBLE_TRIBUTE) - e1:SetValue(c66752837.tricon) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOHAND) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetRange(LOCATION_HAND+LOCATION_GRAVE) - e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e2:SetCountLimit(1,66752837) - e2:SetCondition(c66752837.spcon) - e2:SetTarget(c66752837.sptg) - e2:SetOperation(c66752837.spop) - c:RegisterEffect(e2) -end -function c66752837.tricon(e,c) - return c:IsRace(RACE_DRAGON) -end -function c66752837.cfilter(c) - return c:IsRace(RACE_DRAGON) and c:GetPreviousRaceOnField()==RACE_DRAGON - and c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousLocation(LOCATION_MZONE) - and c:IsReason(REASON_EFFECT+REASON_BATTLE) and not c:IsCode(66752837) -end -function c66752837.spcon(e,tp,eg,ep,ev,re,r,rp) - if eg:IsContains(e:GetHandler()) then return false end - local g=eg:Filter(c66752837.cfilter,nil) - if g:GetCount()==0 then return false end - e:SetLabel(0) - if g:IsExists(Card.IsType,1,nil,TYPE_NORMAL) then - e:SetLabel(1) - end - return true -end -function c66752837.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c66752837.thfilter(c) - return c:IsRace(RACE_DRAGON) and c:IsType(TYPE_NORMAL) and c:IsAbleToHand() and not c:IsHasEffect(EFFECT_NECRO_VALLEY) -end -function c66752837.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local c=e:GetHandler() - local g=Duel.GetMatchingGroup(c66752837.thfilter,tp,LOCATION_GRAVE,0,nil) - if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 and e:GetLabel()==1 - and g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(66752837,0)) then - Duel.BreakEffect() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local sg=g:Select(tp,1,1,nil) - Duel.SendtoHand(sg,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,sg) - end -end diff --git a/script/c66762372.lua b/script/c66762372.lua deleted file mode 100644 index a5fc3ea1c2..0000000000 --- a/script/c66762372.lua +++ /dev/null @@ -1,75 +0,0 @@ ---孤炎星-ロシシン -function c66762372.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(66762372,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetCondition(c66762372.spcon) - e1:SetTarget(c66762372.sptg) - e1:SetOperation(c66762372.spop) - c:RegisterEffect(e1) - --set - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(66762372,1)) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCondition(c66762372.setcon) - e2:SetTarget(c66762372.settg) - e2:SetOperation(c66762372.setop) - c:RegisterEffect(e2) - --synlimit - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e3:SetValue(c66762372.synlimit) - c:RegisterEffect(e3) -end -function c66762372.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) -end -function c66762372.spfilter(c,e,tp) - return c:IsSetCard(0x79) and c:GetLevel()==4 and c:GetCode()~=66762372 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c66762372.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c66762372.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c66762372.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c66762372.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end -function c66762372.cfilter(c,tp) - return c:IsFaceup() and c:IsSetCard(0x79) and c:GetSummonLocation()==LOCATION_EXTRA and c:GetPreviousControler()==tp -end -function c66762372.setcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c66762372.cfilter,1,nil,tp) -end -function c66762372.filter(c) - return c:IsSetCard(0x7c) and c:IsType(TYPE_SPELL) and c:IsSSetable() -end -function c66762372.settg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingMatchingCard(c66762372.filter,tp,LOCATION_DECK,0,1,nil) end -end -function c66762372.setop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) - local g=Duel.SelectMatchingCard(tp,c66762372.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SSet(tp,g:GetFirst()) - Duel.ConfirmCards(1-tp,g) - end -end -function c66762372.synlimit(e,c) - if not c then return false end - return not c:IsAttribute(ATTRIBUTE_FIRE) -end diff --git a/script/c66788016.lua b/script/c66788016.lua deleted file mode 100644 index 199c6ede1f..0000000000 --- a/script/c66788016.lua +++ /dev/null @@ -1,32 +0,0 @@ ---地割れ -function c66788016.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c66788016.target) - e1:SetOperation(c66788016.activate) - c:RegisterEffect(e1) -end -function c66788016.filter(c) - return c:IsFaceup() and c:IsDestructable() -end -function c66788016.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c66788016.filter,tp,0,LOCATION_MZONE,1,nil) end - local g=Duel.GetMatchingGroup(c66788016.filter,tp,0,LOCATION_MZONE,nil) - local tg=g:GetMinGroup(Card.GetAttack) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,tg,1,0,0) -end -function c66788016.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c66788016.filter,tp,0,LOCATION_MZONE,nil) - if g:GetCount()>0 then - local tg=g:GetMinGroup(Card.GetAttack) - if tg:GetCount()>1 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local sg=tg:Select(tp,1,1,nil) - Duel.HintSelection(sg) - Duel.Destroy(sg,REASON_EFFECT) - else Duel.Destroy(tg,REASON_EFFECT) end - end -end diff --git a/script/c66789970.lua b/script/c66789970.lua deleted file mode 100644 index 37f078fb3b..0000000000 --- a/script/c66789970.lua +++ /dev/null @@ -1,61 +0,0 @@ ---聖刻龍-セテクドラゴン -function c66789970.initial_effect(c) - c:EnableReviveLimit() - --spsummon from hand - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetRange(LOCATION_HAND) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetCondition(c66789970.hspcon) - e1:SetOperation(c66789970.hspop) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(66789970,0)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCost(c66789970.descost) - e2:SetTarget(c66789970.destg) - e2:SetOperation(c66789970.desop) - c:RegisterEffect(e2) -end -function c66789970.rfilter(c) - return c:IsType(TYPE_NORMAL) and c:IsRace(RACE_DRAGON) and c:IsAbleToRemoveAsCost() -end -function c66789970.hspcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c66789970.rfilter,tp,LOCATION_GRAVE,0,3,nil) -end -function c66789970.hspop(e,tp,eg,ep,ev,re,r,rp,c) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c66789970.rfilter,tp,LOCATION_GRAVE,0,3,3,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c66789970.cfilter(c) - return c:IsRace(RACE_DRAGON) and c:IsAbleToRemoveAsCost() -end -function c66789970.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c66789970.cfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c66789970.cfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c66789970.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsDestructable() end - if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c66789970.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c66816282.lua b/script/c66816282.lua deleted file mode 100644 index 19e4698f39..0000000000 --- a/script/c66816282.lua +++ /dev/null @@ -1,83 +0,0 @@ ---コアキメイル・ウォール -function c66816282.initial_effect(c) - --cost - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c66816282.mtcon) - e1:SetOperation(c66816282.mtop) - c:RegisterEffect(e1) - --Negate - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(66816282,3)) - e2:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_QUICK_O) - e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) - e2:SetCode(EVENT_CHAINING) - e2:SetRange(LOCATION_MZONE) - e2:SetCondition(c66816282.condition) - e2:SetCost(c66816282.cost) - e2:SetTarget(c66816282.target) - e2:SetOperation(c66816282.operation) - c:RegisterEffect(e2) -end -function c66816282.mtcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c66816282.cfilter1(c) - return c:IsCode(36623431) and c:IsAbleToGraveAsCost() -end -function c66816282.cfilter2(c) - return c:IsType(TYPE_MONSTER) and c:IsRace(RACE_ROCK) and not c:IsPublic() -end -function c66816282.mtop(e,tp,eg,ep,ev,re,r,rp) - local g1=Duel.GetMatchingGroup(c66816282.cfilter1,tp,LOCATION_HAND,0,nil) - local g2=Duel.GetMatchingGroup(c66816282.cfilter2,tp,LOCATION_HAND,0,nil) - local select=2 - Duel.Hint(HINT_SELECTMSG,tp,0) - if g1:GetCount()>0 and g2:GetCount()>0 then - select=Duel.SelectOption(tp,aux.Stringid(66816282,0),aux.Stringid(66816282,1),aux.Stringid(66816282,2)) - elseif g1:GetCount()>0 then - select=Duel.SelectOption(tp,aux.Stringid(66816282,0),aux.Stringid(66816282,2)) - if select==1 then select=2 end - elseif g2:GetCount()>0 then - select=Duel.SelectOption(tp,aux.Stringid(66816282,1),aux.Stringid(66816282,2)) - select=select+1 - end - if select==0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=g1:Select(tp,1,1,nil) - Duel.SendtoGrave(g,REASON_COST) - elseif select==1 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) - local g=g2:Select(tp,1,1,nil) - Duel.ConfirmCards(1-tp,g) - Duel.ShuffleHand(tp) - else - Duel.Destroy(e:GetHandler(),REASON_RULE) - end -end -function c66816282.condition(e,tp,eg,ep,ev,re,r,rp) - return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and ep~=tp - and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL) and Duel.IsChainNegatable(ev) -end -function c66816282.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end -function c66816282.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) - end -end -function c66816282.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateActivation(ev) - if re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(eg,REASON_EFFECT) - end -end diff --git a/script/c66818682.lua b/script/c66818682.lua deleted file mode 100644 index ea0def50e7..0000000000 --- a/script/c66818682.lua +++ /dev/null @@ -1,58 +0,0 @@ ---月影龍クイラ -function c66818682.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsCode,78552773),aux.NonTuner(nil),1) - c:EnableReviveLimit() - --recover - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(66818682,0)) - e1:SetCategory(CATEGORY_RECOVER) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_BE_BATTLE_TARGET) - e1:SetTarget(c66818682.rectg) - e1:SetOperation(c66818682.recop) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(66818682,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_DESTROYED) - e2:SetCondition(c66818682.spcon) - e2:SetTarget(c66818682.sptg) - e2:SetOperation(c66818682.spop) - c:RegisterEffect(e2) -end -function c66818682.rectg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local tc=Duel.GetAttacker() - tc:CreateEffectRelation(e) - Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,tc:GetAttack()/2) -end -function c66818682.recop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetAttacker() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Recover(tp,tc:GetAttack()/2,REASON_EFFECT) - end -end -function c66818682.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) -end -function c66818682.spfilter(c,e,tp) - return c:IsCode(39823987) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c66818682.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c66818682.spfilter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c66818682.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c66818682.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c66818682.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c66835946.lua b/script/c66835946.lua deleted file mode 100644 index 4108084b2f..0000000000 --- a/script/c66835946.lua +++ /dev/null @@ -1,40 +0,0 @@ ---奇跡のピラミッド -function c66835946.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --atk up - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(LOCATION_MZONE,0) - e2:SetTarget(aux.TargetBoolFunction(Card.IsRace,RACE_ZOMBIE)) - e2:SetValue(c66835946.val) - c:RegisterEffect(e2) - --destroy replace - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e3:SetCode(EFFECT_DESTROY_REPLACE) - e3:SetRange(LOCATION_SZONE) - e3:SetCountLimit(1) - e3:SetTarget(c66835946.destg) - e3:SetValue(1) - e3:SetOperation(c66835946.desop) - c:RegisterEffect(e3) -end -function c66835946.val(e,c) - return Duel.GetFieldGroupCount(e:GetHandlerPlayer(),0,LOCATION_MZONE)*200 -end -function c66835946.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local tc=eg:GetFirst() - return eg:GetCount()==1 and tc:IsLocation(LOCATION_MZONE) and tc:IsControler(tp) and tc:IsFaceup() and tc:IsRace(RACE_ZOMBIE) - end - return Duel.SelectYesNo(tp,aux.Stringid(66835946,0)) -end -function c66835946.desop(e,tp,eg,ep,ev,re,r,rp) - Duel.SendtoGrave(e:GetHandler(),REASON_EFFECT) -end diff --git a/script/c66853752.lua b/script/c66853752.lua deleted file mode 100644 index 0fdab0bd06..0000000000 --- a/script/c66853752.lua +++ /dev/null @@ -1,53 +0,0 @@ ---フィッシュボーグ-ランチャー -function c66853752.initial_effect(c) - --Special Summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(66853752,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetRange(LOCATION_GRAVE) - e1:SetCountLimit(1,66853752) - e1:SetCondition(c66853752.condition) - e1:SetTarget(c66853752.target) - e1:SetOperation(c66853752.operation) - c:RegisterEffect(e1) - --synchro limit - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e2:SetValue(c66853752.synlimit) - c:RegisterEffect(e2) -end -function c66853752.cfilter(c) - return c:GetCode()~=66853752 and c:IsType(TYPE_MONSTER) -end -function c66853752.condition(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c66853752.cfilter,tp,LOCATION_GRAVE,0,nil) - return g:GetCount()>0 and g:FilterCount(Card.IsAttribute,nil,ATTRIBUTE_WATER)==g:GetCount() -end -function c66853752.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c66853752.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then - local g=Duel.GetMatchingGroup(c66853752.cfilter,tp,LOCATION_GRAVE,0,nil) - if g:GetCount()>0 and g:FilterCount(Card.IsAttribute,nil,ATTRIBUTE_WATER)==g:GetCount() - and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+0x47e0000) - e1:SetValue(LOCATION_REMOVED) - c:RegisterEffect(e1,true) - end - end -end -function c66853752.synlimit(e,c) - if not c then return false end - return not c:IsAttribute(ATTRIBUTE_WATER) -end diff --git a/script/c66865880.lua b/script/c66865880.lua deleted file mode 100644 index 02037d09d4..0000000000 --- a/script/c66865880.lua +++ /dev/null @@ -1,26 +0,0 @@ ---マシュマロンのメガネ -function c66865880.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - -- - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(0,LOCATION_MZONE) - e2:SetCondition(c66865880.con) - e2:SetValue(c66865880.atlimit) - c:RegisterEffect(e2) -end -function c66865880.cfilter(c) - return c:IsFaceup() and c:IsCode(31305911) -end -function c66865880.con(e) - return Duel.IsExistingMatchingCard(c66865880.cfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) -end -function c66865880.atlimit(e,c) - return c:IsFacedown() or c:GetCode()~=31305911 -end diff --git a/script/c66889139.lua b/script/c66889139.lua deleted file mode 100644 index c6724fc28c..0000000000 --- a/script/c66889139.lua +++ /dev/null @@ -1,6 +0,0 @@ ---竜騎士ガイア -function c66889139.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcCode2(c,6368038,28279543,true,true) -end diff --git a/script/c6691855.lua b/script/c6691855.lua deleted file mode 100644 index 3badca61ef..0000000000 --- a/script/c6691855.lua +++ /dev/null @@ -1,65 +0,0 @@ ---鎖付き尖盾 -function c6691855.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCondition(c6691855.condition) - e1:SetTarget(c6691855.target) - e1:SetOperation(c6691855.operation) - c:RegisterEffect(e1) -end -function c6691855.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end -function c6691855.filter(c) - return c:IsFaceup() -end -function c6691855.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c6691855.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c6691855.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local g=Duel.SelectTarget(tp,c6691855.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c6691855.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsLocation(LOCATION_SZONE) then return end - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,c,tc) - c:CancelToGrave() - --Atkup - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_EQUIP) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(500) - e1:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_UPDATE_DEFENCE) - e2:SetCondition(c6691855.defcon) - e2:SetValue(c6691855.defval) - e2:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e2) - --Equip limit - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_EQUIP_LIMIT) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e3:SetValue(1) - e3:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e3) - end -end -function c6691855.defcon(e) - local eq=e:GetHandler():GetEquipTarget() - return Duel.GetCurrentPhase()==PHASE_DAMAGE_CAL and eq:IsRelateToBattle() and eq:IsDefencePos() -end -function c6691855.defval(e,c) - return c:GetAttack() -end diff --git a/script/c66926224.lua b/script/c66926224.lua deleted file mode 100644 index ea0b7c3cea..0000000000 --- a/script/c66926224.lua +++ /dev/null @@ -1,35 +0,0 @@ ---弱肉一色 -function c66926224.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_HANDES) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c66926224.condition) - e1:SetTarget(c66926224.target) - e1:SetOperation(c66926224.activate) - c:RegisterEffect(e1) -end -function c66926224.cfilter(c) - return c:IsFaceup() and c:IsType(TYPE_NORMAL) and c:IsLevelBelow(2) -end -function c66926224.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c66926224.cfilter,tp,LOCATION_MZONE,0,5,nil) -end -function c66926224.dfilter(c) - return not (c:IsFaceup() and c:IsType(TYPE_NORMAL) and c:IsLevelBelow(2)) and c:IsDestructable() -end -function c66926224.target(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return Duel.IsExistingMatchingCard(nil,tp,LOCATION_HAND,LOCATION_HAND,1,c) - or Duel.IsExistingMatchingCard(c66926224.dfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c) end - local g=Duel.GetMatchingGroup(c66926224.dfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,c) - Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,PLAYER_ALL,1) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c66926224.activate(e,tp,eg,ep,ev,re,r,rp) - local g1=Duel.GetFieldGroup(tp,LOCATION_HAND,LOCATION_HAND) - Duel.SendtoGrave(g1,REASON_EFFECT+REASON_DISCARD) - local g2=Duel.GetMatchingGroup(c66926224.dfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) - Duel.Destroy(g2,REASON_EFFECT) -end diff --git a/script/c66947414.lua b/script/c66947414.lua deleted file mode 100644 index 3e0d761805..0000000000 --- a/script/c66947414.lua +++ /dev/null @@ -1,68 +0,0 @@ ---ボスラッシュ -function c66947414.initial_effect(c) - --activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c66947414.condition) - c:RegisterEffect(e1) - --cannot normal summon - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(1,0) - e2:SetCode(EFFECT_CANNOT_SUMMON) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EFFECT_CANNOT_MSET) - c:RegisterEffect(e3) - --special summon - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e4:SetRange(LOCATION_SZONE) - e4:SetCode(EVENT_TO_GRAVE) - e4:SetOperation(c66947414.checkop) - c:RegisterEffect(e4,0) - local e5=Effect.CreateEffect(c) - e5:SetDescription(aux.Stringid(66947414,0)) - e5:SetCategory(CATEGORY_SPECIAL_SUMMON) - e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e5:SetCode(EVENT_PHASE+PHASE_END) - e5:SetRange(LOCATION_SZONE) - e5:SetCountLimit(1) - e5:SetCondition(c66947414.spcon) - e5:SetTarget(c66947414.sptg) - e5:SetOperation(c66947414.spop) - c:RegisterEffect(e5) -end -function c66947414.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetActivityCount(tp,ACTIVITY_NORMALSUMMON)==0 -end -function c66947414.chkfilter(c,tp) - return c:IsSetCard(0x15) and c:IsReason(REASON_DESTROY) and c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_MZONE) -end -function c66947414.checkop(e,tp,eg,ep,ev,re,r,rp) - if eg:IsExists(c66947414.chkfilter,1,nil,tp) then - e:GetHandler():RegisterFlagEffect(66947414,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) - end -end -function c66947414.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetFlagEffect(66947414)~=0 -end -function c66947414.filter(c,e,tp) - return c:IsSetCard(0x15) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c66947414.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c66947414.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c66947414.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c66947414.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c66957584.lua b/script/c66957584.lua deleted file mode 100644 index e99ab898a5..0000000000 --- a/script/c66957584.lua +++ /dev/null @@ -1,73 +0,0 @@ ---インフェルニティガン -function c66957584.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --discard - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(66957584,0)) - e2:SetCategory(CATEGORY_TOGRAVE) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_SZONE) - e2:SetCountLimit(1) - e2:SetTarget(c66957584.distg) - e2:SetOperation(c66957584.disop) - c:RegisterEffect(e2) - --special summon - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(66957584,1)) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_SZONE) - e3:SetCondition(c66957584.spcon) - e3:SetCost(c66957584.spcost) - e3:SetTarget(c66957584.sptg) - e3:SetOperation(c66957584.spop) - c:RegisterEffect(e3) -end -function c66957584.disfilter(c) - return c:IsSetCard(0xb) and c:IsType(TYPE_MONSTER) and c:IsAbleToGrave() -end -function c66957584.distg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c66957584.disfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,0,0) -end -function c66957584.disop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c66957584.disfilter,tp,LOCATION_HAND,0,1,1,nil) - if g:GetCount()>0 then Duel.SendtoGrave(g,REASON_EFFECT) end -end -function c66957584.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)==0 -end -function c66957584.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end -function c66957584.filter(c,e,tp) - return c:IsSetCard(0xb) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c66957584.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c66957584.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c66957584.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - local ct=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ct>2 then ct=2 end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c66957584.filter,tp,LOCATION_GRAVE,0,1,ct,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,g:GetCount(),0,0) -end -function c66957584.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)>0 then return end - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local sg=g:Filter(Card.IsRelateToEffect,nil,e) - if sg:GetCount()==0 or ft0 -end -function c66970385.filter(c,e,tp) - return c:IsSetCard(0x107a) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) - and Duel.IsExistingTarget(c66970385.eqfilter,tp,LOCATION_GRAVE,0,1,nil,tp,c) -end -function c66970385.eqfilter(c,tp,ec) - return c:IsSetCard(0x207a) and c:CheckUniqueOnField(tp) and c:CheckEquipTarget(ec) -end -function c66970385.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c66970385.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g1=Duel.SelectTarget(tp,c66970385.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - e:SetLabelObject(g1:GetFirst()) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local g2=Duel.SelectTarget(tp,c66970385.eqfilter,tp,LOCATION_GRAVE,0,1,1,nil,tp,g1:GetFirst()) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g1,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g2,1,0,0) -end -function c66970385.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 or Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end - local tc=e:GetLabelObject() - local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local ec=tg:GetFirst() - if ec==tc then ec=tg:GetNext() end - if tc:IsRelateToEffect(e) and ec:IsRelateToEffect(e) and ec:CheckUniqueOnField(tp) and ec:CheckEquipTarget(tc) - and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)>0 then - Duel.Equip(tp,ec,tc) - end -end diff --git a/script/c66973070.lua b/script/c66973070.lua deleted file mode 100644 index 8151d3a0f8..0000000000 --- a/script/c66973070.lua +++ /dev/null @@ -1,28 +0,0 @@ ---デスサイズ・キラー -function c66973070.initial_effect(c) - --atkup - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(66973070,0)) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c66973070.atkcost) - e1:SetOperation(c66973070.operation) - c:RegisterEffect(e1) -end -function c66973070.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsRace,1,e:GetHandler(),RACE_INSECT) end - local sg=Duel.SelectReleaseGroup(tp,Card.IsRace,1,1,e:GetHandler(),RACE_INSECT) - Duel.Release(sg,REASON_COST) -end -function c66973070.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFaceup() and c:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(500) - e1:SetReset(RESET_EVENT+0x1ff0000+RESET_PHASE+PHASE_END) - c:RegisterEffect(e1) - end -end diff --git a/script/c66976526.lua b/script/c66976526.lua deleted file mode 100644 index f18fa9a2db..0000000000 --- a/script/c66976526.lua +++ /dev/null @@ -1,66 +0,0 @@ ---カラクリ大将軍 無零怒 -function c66976526.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,nil,aux.NonTuner(Card.IsRace,RACE_MACHINE),1) - c:EnableReviveLimit() - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(66976526,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(c66976526.spcon) - e1:SetTarget(c66976526.sptg) - e1:SetOperation(c66976526.spop) - c:RegisterEffect(e1) - --draw - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(66976526,1)) - e2:SetCategory(CATEGORY_DRAW) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_FIELD) - e2:SetCode(EVENT_CHANGE_POS) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCondition(c66976526.drcon) - e2:SetTarget(c66976526.drtg) - e2:SetOperation(c66976526.drop) - c:RegisterEffect(e2) -end -function c66976526.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_SYNCHRO -end -function c66976526.spfilter(c,e,tp) - return c:IsSetCard(0x11) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c66976526.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c66976526.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c66976526.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c66976526.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end -function c66976526.cfilter(c,tp) - local np=c:GetPosition() - local pp=c:GetPreviousPosition() - return c:IsSetCard(0x11) and c:IsControler(tp) and ((pp==0x1 and np==0x4) or (pp==0x4 and np==0x1)) -end -function c66976526.drcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c66976526.cfilter,1,nil,tp) -end -function c66976526.drtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return not e:GetHandler():IsStatus(STATUS_CHAINING) and Duel.IsPlayerCanDraw(tp,1) end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(1) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c66976526.drop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end diff --git a/script/c66994718.lua b/script/c66994718.lua deleted file mode 100644 index bae778fff2..0000000000 --- a/script/c66994718.lua +++ /dev/null @@ -1,32 +0,0 @@ ---ラプターズ・ガスト -function c66994718.initial_effect(c) - --activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_CHAINING) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) - e1:SetCondition(c66994718.condition) - e1:SetTarget(c66994718.target) - e1:SetOperation(c66994718.activate) - c:RegisterEffect(e1) -end -function c66994718.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0xba) -end -function c66994718.condition(e,tp,eg,ep,ev,re,r,rp) - return re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev) - and Duel.IsExistingMatchingCard(c66994718.cfilter,tp,LOCATION_ONFIELD,0,1,nil) -end -function c66994718.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - if re:GetHandler():IsRelateToEffect(re) and re:GetHandler():IsDestructable() then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,re:GetHandler(),1,0,0) - end -end -function c66994718.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateActivation(ev) - if re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(re:GetHandler(),REASON_EFFECT) - end -end diff --git a/script/c67030233.lua b/script/c67030233.lua deleted file mode 100644 index 53c52ce131..0000000000 --- a/script/c67030233.lua +++ /dev/null @@ -1,182 +0,0 @@ ---セイヴァー・デモン・ドラゴン -function c67030233.initial_effect(c) - --synchro summon - c:EnableReviveLimit() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_IGNORE_IMMUNE) - e1:SetRange(LOCATION_EXTRA) - e1:SetCondition(c67030233.syncon) - e1:SetOperation(c67030233.synop) - e1:SetValue(SUMMON_TYPE_SYNCHRO) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(67030233,0)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_BATTLED) - e2:SetCondition(c67030233.descon) - e2:SetTarget(c67030233.destg) - e2:SetOperation(c67030233.desop) - c:RegisterEffect(e2) - --Disable - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(67030233,1)) - e3:SetCategory(CATEGORY_DISABLE+CATEGORY_ATKCHANGE) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetCountLimit(1) - e3:SetRange(LOCATION_MZONE) - e3:SetTarget(c67030233.distg) - e3:SetOperation(c67030233.disop) - c:RegisterEffect(e3) - --to extra & Special summon - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(67030233,2)) - e4:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_FIELD) - e4:SetCategory(CATEGORY_SPECIAL_SUMMON) - e4:SetRange(LOCATION_MZONE) - e4:SetProperty(EFFECT_FLAG_CARD_TARGET) - e4:SetCountLimit(1) - e4:SetCode(EVENT_PHASE+PHASE_END) - e4:SetTarget(c67030233.sptg) - e4:SetOperation(c67030233.spop) - c:RegisterEffect(e4) - -- - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_SINGLE) - e5:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e5:SetRange(LOCATION_MZONE) - e5:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - e5:SetValue(1) - c:RegisterEffect(e5) -end -function c67030233.matfilter(c,syncard) - return c:IsFaceup() and c:IsCanBeSynchroMaterial(syncard) -end -function c67030233.synfilter1(c,syncard,lv,g) - if not c:IsCode(21159309) then return false end - local tlv=c:GetSynchroLevel(syncard) - if lv-tlv<=0 then return false end - local t=false - if c:IsType(TYPE_TUNER) then t=true end - local wg=g:Clone() - wg:RemoveCard(c) - return wg:IsExists(c67030233.synfilter2,1,nil,syncard,lv-tlv,wg,t) -end -function c67030233.synfilter2(c,syncard,lv,g,tuner) - if not c:IsCode(70902743) then return false end - local tlv=c:GetSynchroLevel(syncard) - if lv-tlv<=0 then return false end - if not tuner and not c:IsType(TYPE_TUNER) then return false end - return g:IsExists(c67030233.synfilter3,1,c,syncard,lv-tlv) -end -function c67030233.synfilter3(c,syncard,lv) - local mlv=c:GetSynchroLevel(syncard) - local lv1=bit.band(mlv,0xffff) - local lv2=bit.rshift(mlv,16) - return c:IsNotTuner() and (lv1==lv or lv2==lv) -end -function c67030233.syncon(e,c,tuner) - if c==nil then return true end - local tp=c:GetControler() - local mg=Duel.GetMatchingGroup(c67030233.matfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,c) - local lv=c:GetLevel() - if tuner then return c67030233.synfilter1(tuner,c,lv,mg) end - return mg:IsExists(c67030233.synfilter1,1,nil,c,lv,mg) -end -function c67030233.synop(e,tp,eg,ep,ev,re,r,rp,c,tuner) - local g=Group.CreateGroup() - local mg=Duel.GetMatchingGroup(c67030233.matfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,c) - local lv=c:GetLevel() - local m1=tuner - if not tuner then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SMATERIAL) - local t1=mg:FilterSelect(tp,c67030233.synfilter1,1,1,nil,c,lv,mg) - m1=t1:GetFirst() - g:AddCard(m1) - end - lv=lv-m1:GetSynchroLevel(c) - local t=false - if m1:IsType(TYPE_TUNER) then t=true end - mg:RemoveCard(m1) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SMATERIAL) - local t2=mg:FilterSelect(tp,c67030233.synfilter2,1,1,nil,c,lv,mg,t) - local m2=t2:GetFirst() - g:AddCard(m2) - lv=lv-m2:GetSynchroLevel(c) - mg:RemoveCard(m2) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SMATERIAL) - local t3=mg:FilterSelect(tp,c67030233.synfilter3,1,1,nil,c,lv) - g:Merge(t3) - c:SetMaterial(g) - Duel.SendtoGrave(g,REASON_MATERIAL+REASON_SYNCHRO) -end -function c67030233.descon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler()==Duel.GetAttacker() -end -function c67030233.desfilter(c) - return c:IsDefencePos() and c:IsDestructable() -end -function c67030233.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local g=Duel.GetMatchingGroup(c67030233.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c67030233.desop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c67030233.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - Duel.Destroy(g,REASON_EFFECT) -end -function c67030233.disfilter(c) - return c:IsFaceup() and c:IsType(TYPE_EFFECT) and not c:IsDisabled() -end -function c67030233.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c67030233.disfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c67030233.disfilter,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - local g=Duel.SelectTarget(tp,c67030233.disfilter,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0) -end -function c67030233.disop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - local c=e:GetHandler() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - local atk=tc:GetAttack() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_UPDATE_ATTACK) - e3:SetValue(atk) - e3:SetReset(RESET_EVENT+0x1ff0000+RESET_PHASE+PHASE_END) - c:RegisterEffect(e3) - end -end -function c67030233.spfilter(c,e,tp) - return c:IsCode(70902743) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c67030233.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c67030233.spfilter(chkc,e,tp) end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c67030233.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,g:GetCount(),0,0) -end -function c67030233.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - local c=e:GetHandler() - if bit.band(c:GetOriginalType(),0x802040)~=0 and Duel.SendtoDeck(c,nil,0,REASON_EFFECT)~=0 - and c:IsLocation(LOCATION_EXTRA) and tc and tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c67038874.lua b/script/c67038874.lua deleted file mode 100644 index 215c09c4e9..0000000000 --- a/script/c67038874.lua +++ /dev/null @@ -1,73 +0,0 @@ ---スクラップ・マインドリーダー -function c67038874.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(67038874,0)) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_GRAVE) - e1:SetCondition(c67038874.condition) - e1:SetTarget(c67038874.target) - e1:SetOperation(c67038874.operation) - c:RegisterEffect(e1) - --synchro custom - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_SYNCHRO_MATERIAL_CUSTOM) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e2:SetTarget(c67038874.syntg) - e2:SetValue(1) - e2:SetOperation(c67038874.synop) - c:RegisterEffect(e2) -end -function c67038874.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()==PHASE_MAIN2 -end -function c67038874.filter(c) - return c:IsFaceup() and c:IsSetCard(0x24) and c:GetCode()~=67038874 and c:IsDestructable() -end -function c67038874.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingTarget(c67038874.filter,tp,LOCATION_MZONE,0,1,nil) - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c67038874.filter,tp,LOCATION_MZONE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c67038874.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)~=0 - and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+0x47e0000) - e1:SetValue(LOCATION_REMOVED) - c:RegisterEffect(e1,true) - end -end -function c67038874.tuner_filter(c) - return c:IsSetCard(0x24) -end -function c67038874.synfilter(c,syncard,tuner,f) - return c:IsFaceup() and c:IsNotTuner() and c:IsCanBeSynchroMaterial(syncard,tuner) and c:IsSetCard(0x24) and (f==nil or f(c)) -end -function c67038874.syntg(e,syncard,f,minc,maxc) - local c=e:GetHandler() - local lv=syncard:GetLevel()-c:GetLevel() - if lv<=0 then return false end - local g=Duel.GetMatchingGroup(c67038874.synfilter,syncard:GetControler(),LOCATION_MZONE,LOCATION_MZONE,c,syncard,c,f) - local res=g:CheckWithSumEqual(Card.GetSynchroLevel,lv,minc,maxc,syncard) - return res -end -function c67038874.synop(e,tp,eg,ep,ev,re,r,rp,syncard,f,minc,maxc) - local c=e:GetHandler() - local lv=syncard:GetLevel()-c:GetLevel() - local g=Duel.GetMatchingGroup(c67038874.synfilter,syncard:GetControler(),LOCATION_MZONE,LOCATION_MZONE,c,syncard,c,f) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SMATERIAL) - local sg=g:SelectWithSumEqual(tp,Card.GetSynchroLevel,lv,minc,maxc,syncard) - Duel.SetSynchroMaterial(sg) -end diff --git a/script/c67045174.lua b/script/c67045174.lua deleted file mode 100644 index fdd5826d01..0000000000 --- a/script/c67045174.lua +++ /dev/null @@ -1,45 +0,0 @@ ---二重の落とし穴 -function c67045174.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetCondition(c67045174.condition) - e1:SetTarget(c67045174.target) - e1:SetOperation(c67045174.activate) - c:RegisterEffect(e1) - if not c67045174.global_check then - c67045174.global_check=true - local ge1=Effect.CreateEffect(c) - ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - ge1:SetCode(EVENT_BATTLED) - ge1:SetOperation(c67045174.checkop) - Duel.RegisterEffect(ge1,0) - end -end -function c67045174.checkop(e,tp,eg,ep,ev,re,r,rp) - local a=Duel.GetAttacker() - local t=Duel.GetAttackTarget() - if a and a:IsDualState() and a:IsStatus(STATUS_BATTLE_DESTROYED) then - a:RegisterFlagEffect(67045174,RESET_PHASE+PHASE_DAMAGE,0,1) - end - if t and t:IsDualState() and t:IsStatus(STATUS_BATTLE_DESTROYED) then - t:RegisterFlagEffect(67045174,RESET_PHASE+PHASE_DAMAGE,0,1) - end -end -function c67045174.filter(c) - return c:GetFlagEffect(67045174)~=0 -end -function c67045174.condition(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c67045174.filter,1,nil) -end -function c67045174.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDestructable,tp,0,LOCATION_MZONE,1,nil) end - local sg=Duel.GetMatchingGroup(Card.IsDestructable,tp,0,LOCATION_MZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,sg:GetCount(),0,0) -end -function c67045174.activate(e,tp,eg,ep,ev,re,r,rp) - local sg=Duel.GetMatchingGroup(Card.IsDestructable,tp,0,LOCATION_MZONE,nil) - Duel.Destroy(sg,REASON_EFFECT) -end diff --git a/script/c67048711.lua b/script/c67048711.lua deleted file mode 100644 index 55c4eec447..0000000000 --- a/script/c67048711.lua +++ /dev/null @@ -1,66 +0,0 @@ ---7 -function c67048711.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetOperation(c67048711.operation) - c:RegisterEffect(e1) - --draw - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(67048711,0)) - e2:SetCategory(CATEGORY_DRAW+CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(67048711) - e2:SetTarget(c67048711.drtg) - e2:SetOperation(c67048711.drop) - c:RegisterEffect(e2) - --recover - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(67048711,1)) - e3:SetCategory(CATEGORY_RECOVER) - e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e3:SetCode(EVENT_TO_GRAVE) - e3:SetCondition(c67048711.reccon) - e3:SetTarget(c67048711.rectg) - e3:SetOperation(c67048711.recop) - c:RegisterEffect(e3) -end -function c67048711.filter(c) - return c:IsFaceup() and c:IsCode(67048711) -end -function c67048711.operation(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - if Duel.GetMatchingGroupCount(c67048711.filter,tp,LOCATION_SZONE,0,nil)==3 then - Duel.RaiseSingleEvent(e:GetHandler(),67048711,e,0,0,0,0) - end -end -function c67048711.drtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local g=Duel.GetMatchingGroup(c67048711.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,3) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c67048711.drop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - if Duel.GetMatchingGroupCount(c67048711.filter,tp,LOCATION_SZONE,0,nil)==3 then - Duel.Draw(tp,3,REASON_EFFECT) - end - Duel.BreakEffect() - local g=Duel.GetMatchingGroup(c67048711.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) - Duel.Destroy(g,REASON_EFFECT) -end -function c67048711.reccon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) -end -function c67048711.rectg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(700) - Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,700) -end -function c67048711.recop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Recover(p,d,REASON_EFFECT) -end diff --git a/script/c67050396.lua b/script/c67050396.lua deleted file mode 100644 index 830ea71589..0000000000 --- a/script/c67050396.lua +++ /dev/null @@ -1,67 +0,0 @@ ---Kozmo Goodwitch -function c67050396.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(67050396,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1,67050396) - e1:SetCost(c67050396.spcost) - e1:SetTarget(c67050396.sptg) - e1:SetOperation(c67050396.spop) - c:RegisterEffect(e1) - --pos - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(67050396,1)) - e2:SetCategory(CATEGORY_POSITION) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCountLimit(1) - e2:SetCost(c67050396.poscost) - e2:SetTarget(c67050396.postg) - e2:SetOperation(c67050396.posop) - c:RegisterEffect(e2) -end -function c67050396.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) -end -function c67050396.spfilter(c,e,tp) - return c:IsSetCard(0xd2) and c:IsLevelAbove(5) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c67050396.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsExistingMatchingCard(c67050396.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c67050396.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c67050396.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end -function c67050396.poscost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,500) end - Duel.PayLPCost(tp,500) -end -function c67050396.posfilter(c) - return c:IsFaceup() and c:IsCanTurnSet() -end -function c67050396.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and c67050396.posfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c67050396.posfilter,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - local g=Duel.SelectTarget(tp,c67050396.posfilter,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0) -end -function c67050396.posop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.ChangePosition(tc,POS_FACEDOWN_DEFENCE) - end -end diff --git a/script/c67095270.lua b/script/c67095270.lua deleted file mode 100644 index 7419317de0..0000000000 --- a/script/c67095270.lua +++ /dev/null @@ -1,22 +0,0 @@ ---ディメンション・ウォール -function c67095270.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetCondition(c67095270.condition) - e1:SetOperation(c67095270.activate) - c:RegisterEffect(e1) -end -function c67095270.condition(e,tp,eg,ep,ev,re,r,rp) - return tp~=Duel.GetTurnPlayer() -end -function c67095270.activate(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_REFLECT_BATTLE_DAMAGE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_DAMAGE) - Duel.RegisterEffect(e1,tp) -end diff --git a/script/c67098114.lua b/script/c67098114.lua deleted file mode 100644 index 0d1cfd7eb5..0000000000 --- a/script/c67098114.lua +++ /dev/null @@ -1,119 +0,0 @@ ---極神皇ロキ -function c67098114.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,c67098114.tfilter,aux.NonTuner(nil),2) - c:EnableReviveLimit() - --negate - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(67098114,0)) - e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_CHAINING) - e1:SetCountLimit(1) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c67098114.discon) - e1:SetTarget(c67098114.distg) - e1:SetOperation(c67098114.disop) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetOperation(c67098114.regop) - c:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(67098114,1)) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_PHASE+PHASE_END) - e3:SetRange(LOCATION_GRAVE) - e3:SetCountLimit(1) - e3:SetCondition(c67098114.spcon) - e3:SetCost(c67098114.spcost) - e3:SetTarget(c67098114.sptg) - e3:SetOperation(c67098114.spop) - c:RegisterEffect(e3) - --salvage - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(67098114,2)) - e4:SetCategory(CATEGORY_TOHAND) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e4:SetProperty(EFFECT_FLAG_CARD_TARGET) - e4:SetCode(EVENT_SPSUMMON_SUCCESS) - e4:SetCondition(c67098114.thcon) - e4:SetTarget(c67098114.thtg) - e4:SetOperation(c67098114.thop) - c:RegisterEffect(e4) -end -function c67098114.tfilter(c) - return c:IsSetCard(0xa042) or c:IsCode(61777313) -end -function c67098114.discon(e,tp,eg,ep,ev,re,r,rp) - return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.GetTurnPlayer()==tp - and ep~=tp and bit.band(Duel.GetCurrentPhase(),0x38)~=0 and re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev) -end -function c67098114.distg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) - end -end -function c67098114.disop(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateActivation(ev) - if re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(eg,REASON_EFFECT) - end -end -function c67098114.regop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local pos=c:GetPreviousPosition() - if c:IsReason(REASON_BATTLE) then pos=c:GetBattlePosition() end - if rp~=tp and c:GetPreviousControler()==tp and c:IsReason(REASON_DESTROY) - and c:IsPreviousLocation(LOCATION_ONFIELD) and bit.band(pos,POS_FACEUP)~=0 then - c:RegisterFlagEffect(67098114,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) - end -end -function c67098114.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetFlagEffect(67098114)~=0 -end -function c67098114.cfilter(c) - return c:IsSetCard(0xa042) and c:IsType(TYPE_TUNER) and c:IsAbleToRemoveAsCost() -end -function c67098114.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c67098114.cfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c67098114.cfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c67098114.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,1,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c67098114.spop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - Duel.SpecialSummon(e:GetHandler(),1,tp,tp,false,false,POS_FACEUP) - end -end -function c67098114.thcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+1 -end -function c67098114.thfilter(c) - return c:IsType(TYPE_TRAP) and c:IsAbleToHand() -end -function c67098114.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c67098114.thfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c67098114.thfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c67098114.thfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c67098114.thop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end diff --git a/script/c67111213.lua b/script/c67111213.lua deleted file mode 100644 index 7fe43953a7..0000000000 --- a/script/c67111213.lua +++ /dev/null @@ -1,34 +0,0 @@ ---リチュア・アビス -function c67111213.initial_effect(c) - --search - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(67111213,0)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c67111213.tg) - e1:SetOperation(c67111213.op) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - c:RegisterEffect(e2) - local e3=e1:Clone() - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e3) -end -function c67111213.filter(c) - return c:IsDefenceBelow(1000) and c:IsSetCard(0x3a) and c:IsType(TYPE_MONSTER) and c:GetCode()~=67111213 and c:IsAbleToHand() -end -function c67111213.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chk==0 then return Duel.IsExistingMatchingCard(c67111213.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c67111213.op(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c67111213.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c67113830.lua b/script/c67113830.lua deleted file mode 100644 index 118528d47b..0000000000 --- a/script/c67113830.lua +++ /dev/null @@ -1,36 +0,0 @@ ---墓地墓地の恨み -function c67113830.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetCondition(c67113830.condition) - e1:SetTarget(c67113830.target) - e1:SetOperation(c67113830.activate) - c:RegisterEffect(e1) -end -function c67113830.condition(e,tp,eg,ep,ev,re,r,rp) - return (Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()) - and Duel.GetFieldGroupCount(tp,0,LOCATION_GRAVE)>7 -end -function c67113830.filter(c) - return c:IsFaceup() and c:GetAttack()>0 -end -function c67113830.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c67113830.filter,tp,0,LOCATION_MZONE,1,nil) end -end -function c67113830.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c67113830.filter,tp,0,LOCATION_MZONE,nil) - local tc=g:GetFirst() - while tc do - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetValue(0) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - tc=g:GetNext() - end -end diff --git a/script/c6713443.lua b/script/c6713443.lua deleted file mode 100644 index a2fdabf4cc..0000000000 --- a/script/c6713443.lua +++ /dev/null @@ -1,53 +0,0 @@ ---極炎舞-「星斗」 -function c6713443.initial_effect(c) - --activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c6713443.spcost) - e1:SetTarget(c6713443.sptg) - e1:SetOperation(c6713443.spop) - c:RegisterEffect(e1) -end -function c6713443.cfilter(c) - return c:IsSetCard(0x7c) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToRemoveAsCost() -end -function c6713443.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c6713443.cfilter,tp,LOCATION_GRAVE,0,7,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c6713443.cfilter,tp,LOCATION_GRAVE,0,7,7,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c6713443.filter(c,e,tp) - return c:IsSetCard(0x79) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c6713443.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c6713443.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE) -end -function c6713443.sfilter(c) - return c:IsSetCard(0x7c) and c:GetCode()~=6713443 and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSSetable() -end -function c6713443.spop(e,tp,eg,ep,ev,re,r,rp) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ft<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c6713443.filter,tp,LOCATION_GRAVE,0,ft,ft,nil,e,tp) - if g:GetCount()==0 then return end - local ct=Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - if ct>0 then - local ft2=Duel.GetLocationCount(tp,LOCATION_SZONE) - if ft2>ct then ft2=ct end - if ft2<=0 then return end - local sg=Duel.GetMatchingGroup(c6713443.sfilter,tp,LOCATION_DECK,0,nil) - if sg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(6713443,0)) then - Duel.BreakEffect() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) - local setg=sg:Select(tp,1,ft2,nil) - Duel.SSet(tp,setg) - Duel.ConfirmCards(1-tp,setg) - end - end -end diff --git a/script/c67136033.lua b/script/c67136033.lua deleted file mode 100644 index 6fecf2ca6b..0000000000 --- a/script/c67136033.lua +++ /dev/null @@ -1,68 +0,0 @@ ---熱血獣王ベアーマン -function c67136033.initial_effect(c) - --summon with no tribute - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(67136033,0)) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SUMMON_PROC) - e1:SetCondition(c67136033.ntcon) - e1:SetOperation(c67136033.ntop) - c:RegisterEffect(e1) - --lvchange - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(67136033,1)) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetTarget(c67136033.lvtg) - e2:SetOperation(c67136033.lvop) - c:RegisterEffect(e2) - --xyz limit - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE) - e3:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL) - e3:SetValue(c67136033.xyzlimit) - c:RegisterEffect(e3) -end -function c67136033.ntcon(e,c,minc) - if c==nil then return true end - return minc==0 and c:GetLevel()>4 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 -end -function c67136033.ntop(e,tp,eg,ep,ev,re,r,rp,c) - --change base attack - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetReset(RESET_EVENT+0xff0000) - e1:SetCode(EFFECT_SET_BASE_ATTACK) - e1:SetValue(1300) - c:RegisterEffect(e1) -end -function c67136033.filter(c) - return c:IsRace(RACE_BEASTWARRIOR) and c:GetLevel()==4 -end -function c67136033.lvtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c67136033.filter,tp,LOCATION_MZONE,0,1,nil) end -end -function c67136033.lvop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local g=Duel.GetMatchingGroup(c67136033.filter,tp,LOCATION_MZONE,0,nil) - local tc=g:GetFirst() - while tc do - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_CHANGE_LEVEL) - e1:SetValue(8) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - tc=g:GetNext() - end -end -function c67136033.xyzlimit(e,c) - if not c then return false end - return not c:IsAttribute(ATTRIBUTE_FIRE) or not c:IsRace(RACE_WARRIOR) -end diff --git a/script/c67159705.lua b/script/c67159705.lua deleted file mode 100644 index 821036f721..0000000000 --- a/script/c67159705.lua +++ /dev/null @@ -1,120 +0,0 @@ ---アーマード・サイバーン -function c67159705.initial_effect(c) - --equip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(67159705,0)) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetTarget(c67159705.eqtg) - e1:SetOperation(c67159705.eqop) - c:RegisterEffect(e1) - --unequip - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(67159705,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_SZONE) - e2:SetCondition(c67159705.uncon) - e2:SetTarget(c67159705.sptg) - e2:SetOperation(c67159705.spop) - c:RegisterEffect(e2) - --destroy sub - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_EQUIP) - e3:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e3:SetCode(EFFECT_DESTROY_SUBSTITUTE) - e3:SetCondition(c67159705.uncon) - e3:SetValue(1) - c:RegisterEffect(e3) - --eqlimit - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetCode(EFFECT_EQUIP_LIMIT) - e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e4:SetValue(c67159705.eqlimit) - c:RegisterEffect(e4) - --destroy - local e5=Effect.CreateEffect(c) - e5:SetDescription(aux.Stringid(67159705,2)) - e5:SetCategory(CATEGORY_DESTROY) - e5:SetProperty(EFFECT_FLAG_CARD_TARGET) - e5:SetType(EFFECT_TYPE_IGNITION) - e5:SetRange(LOCATION_SZONE) - e5:SetCountLimit(1) - e5:SetCondition(c67159705.uncon) - e5:SetTarget(c67159705.destg) - e5:SetOperation(c67159705.desop) - c:RegisterEffect(e5) -end -function c67159705.uncon(e) - return e:GetHandler():IsStatus(STATUS_UNION) -end -function c67159705.repval(e,re,r,rp) - return bit.band(r,REASON_BATTLE)~=0 -end -function c67159705.eqlimit(e,c) - return c:IsSetCard(0x103) -end -function c67159705.filter(c) - return c:IsFaceup() and c:IsSetCard(0x103) and c:GetUnionCount()==0 -end -function c67159705.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c67159705.filter(chkc) end - if chk==0 then return e:GetHandler():GetFlagEffect(67159705)==0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingTarget(c67159705.filter,tp,LOCATION_MZONE,0,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local g=Duel.SelectTarget(tp,c67159705.filter,tp,LOCATION_MZONE,0,1,1,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0) - e:GetHandler():RegisterFlagEffect(67159705,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1) -end -function c67159705.eqop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if not c:IsRelateToEffect(e) or c:IsFacedown() then return end - if not tc:IsRelateToEffect(e) or not c67159705.filter(tc) then - Duel.SendtoGrave(c,REASON_EFFECT) - return - end - if not Duel.Equip(tp,c,tc,false) then return end - c:SetStatus(STATUS_UNION,true) -end -function c67159705.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():GetFlagEffect(67159705)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) - e:GetHandler():RegisterFlagEffect(67159705,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1) -end -function c67159705.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP_ATTACK) - end -end -function c67159705.desfilter(c) - return c:IsFaceup() and c:IsDestructable() -end -function c67159705.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c67159705.desfilter(chkc) end - if chk==0 then return e:GetHandler():GetEquipTarget():GetAttack()>=1000 - and Duel.IsExistingTarget(c67159705.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c67159705.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c67159705.desop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) then return end - if c:GetEquipTarget():GetAttack()<1000 then return end - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_EQUIP) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(-1000) - e1:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e1) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c67169062.lua b/script/c67169062.lua deleted file mode 100644 index 83c86465e3..0000000000 --- a/script/c67169062.lua +++ /dev/null @@ -1,36 +0,0 @@ ---貪欲な壺 -function c67169062.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c67169062.target) - e1:SetOperation(c67169062.activate) - c:RegisterEffect(e1) -end -function c67169062.filter(c) - return c:IsType(TYPE_MONSTER) and c:IsAbleToDeck() -end -function c67169062.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c67169062.filter(chkc) end - if chk==0 then return Duel.IsPlayerCanDraw(tp,2) - and Duel.IsExistingTarget(c67169062.filter,tp,LOCATION_GRAVE,0,5,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectTarget(tp,c67169062.filter,tp,LOCATION_GRAVE,0,5,5,nil) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2) -end -function c67169062.activate(e,tp,eg,ep,ev,re,r,rp) - local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - if not tg or tg:FilterCount(Card.IsRelateToEffect,nil,e)~=5 then return end - Duel.SendtoDeck(tg,nil,0,REASON_EFFECT) - local g=Duel.GetOperatedGroup() - local ct=g:FilterCount(Card.IsLocation,nil,LOCATION_DECK+LOCATION_EXTRA) - if ct==5 then - Duel.ShuffleDeck(tp) - Duel.BreakEffect() - Duel.Draw(tp,2,REASON_EFFECT) - end -end diff --git a/script/c67173574.lua b/script/c67173574.lua deleted file mode 100644 index 1ffa808f6e..0000000000 --- a/script/c67173574.lua +++ /dev/null @@ -1,96 +0,0 @@ ---CNo.102 光堕天使ノーブル・デーモン -function c67173574.initial_effect(c) - Duel.EnableGlobalFlag(GLOBALFLAG_DETACH_EVENT) - --xyz summon - aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_LIGHT),5,4) - c:EnableReviveLimit() - --destroy replace - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetCode(EFFECT_DESTROY_REPLACE) - e1:SetRange(LOCATION_MZONE) - e1:SetTarget(c67173574.reptg) - c:RegisterEffect(e1) - --damage - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(67173574,1)) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCategory(CATEGORY_DAMAGE) - e2:SetCode(EVENT_DETACH_MATERIAL) - e2:SetCondition(c67173574.damcon) - e2:SetTarget(c67173574.damtg) - e2:SetOperation(c67173574.damop) - c:RegisterEffect(e2) - --disable - local e3=Effect.CreateEffect(c) - e3:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DISABLE) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_MZONE) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetCountLimit(1) - e3:SetCondition(c67173574.condition) - e3:SetCost(c67173574.cost) - e3:SetTarget(c67173574.target) - e3:SetOperation(c67173574.operation) - c:RegisterEffect(e3) -end -c67173574.xyz_number=102 -function c67173574.reptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,2,REASON_EFFECT) end - if Duel.SelectYesNo(tp,aux.Stringid(67173574,0)) then - e:GetHandler():RemoveOverlayCard(tp,2,2,REASON_EFFECT) - return true - else return false end -end -function c67173574.damcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetOverlayCount()==0 -end -function c67173574.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsRelateToEffect(e) and e:GetHandler():IsFaceup() end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(1500) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,0,0,1-tp,1500) -end -function c67173574.damop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end -function c67173574.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetOverlayGroup():IsExists(Card.IsCode,1,nil,49678559) -end -function c67173574.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c67173574.filter(c) - return c:IsFaceup() and c:GetAttack()>0 -end -function c67173574.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c67173574.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c67173574.filter,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c67173574.filter,tp,0,LOCATION_MZONE,1,1,nil) -end -function c67173574.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:GetAttack()>0 and tc:IsControler(1-tp) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetValue(0) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE) - e2:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_DISABLE_EFFECT) - e3:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e3) - end -end diff --git a/script/c67196946.lua b/script/c67196946.lua deleted file mode 100644 index 0424f08f3c..0000000000 --- a/script/c67196946.lua +++ /dev/null @@ -1,58 +0,0 @@ ---スター・ブラスト -function c67196946.initial_effect(c) - --activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c67196946.con) - e1:SetCost(c67196946.cost) - e1:SetTarget(c67196946.tg) - e1:SetOperation(c67196946.op) - c:RegisterEffect(e1) -end -function c67196946.con(e,tp,eg,ep,ev,re,r,rp) - return not Duel.IsPlayerAffectedByEffect(tp,EFFECT_LPCOST_CHANGE) -end -function c67196946.filter(c,lv) - return c:GetLevel()>lv -end -function c67196946.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,500) end - local lp=Duel.GetLP(tp) - local g=Duel.GetMatchingGroup(c67196946.filter,tp,LOCATION_HAND+LOCATION_MZONE,0,nil,1) - local tg=g:GetMaxGroup(Card.GetLevel) - local maxlv=tg:GetFirst():GetLevel() - local t={} - local l=1 - while l0 then - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(67196946,1)) - local sg=g:Select(tp,1,1,nil) - local tc=sg:GetFirst() - if tc:IsLocation(LOCATION_MZONE) then - Duel.HintSelection(sg) - end - Duel.ConfirmCards(1-tp,sg) - if tc:IsLocation(LOCATION_HAND) then Duel.ShuffleHand(tp) end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_LEVEL) - e1:SetReset(RESET_EVENT+0xfe0000+RESET_PHASE+PHASE_END) - e1:SetValue(-ct) - tc:RegisterEffect(e1) - end -end diff --git a/script/c67211766.lua b/script/c67211766.lua deleted file mode 100644 index b6953f1634..0000000000 --- a/script/c67211766.lua +++ /dev/null @@ -1,20 +0,0 @@ ---マジオシャレオン -function c67211766.initial_effect(c) - --cannot be battle target - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_CANNOT_BE_BATTLE_TARGET) - e1:SetCondition(c67211766.ccon) - e1:SetValue(aux.imval1) - c:RegisterEffect(e1) - --pierce - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_PIERCE) - c:RegisterEffect(e2) -end -function c67211766.ccon(e) - return Duel.IsExistingMatchingCard(Card.IsType,e:GetHandlerPlayer(),0,LOCATION_ONFIELD,1,nil,TYPE_SPELL+TYPE_TRAP) -end diff --git a/script/c67223587.lua b/script/c67223587.lua deleted file mode 100644 index aa1e844eef..0000000000 --- a/script/c67223587.lua +++ /dev/null @@ -1,34 +0,0 @@ ---ハンディキャップマッチ! -function c67223587.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(c67223587.condition) - e1:SetTarget(c67223587.target) - e1:SetOperation(c67223587.activate) - c:RegisterEffect(e1) -end -function c67223587.cfilter(c,tp) - return c:IsFaceup() and c:GetSummonPlayer()==tp and c:IsSetCard(0x19) -end -function c67223587.condition(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c67223587.cfilter,1,nil,tp) -end -function c67223587.filter(c,e,tp) - return c:IsLevelBelow(4) and c:IsSetCard(0x19) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c67223587.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c67223587.filter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,0,tp,LOCATION_HAND+LOCATION_DECK) -end -function c67223587.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c67223587.filter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c67227834.lua b/script/c67227834.lua deleted file mode 100644 index f8a9463be0..0000000000 --- a/script/c67227834.lua +++ /dev/null @@ -1,70 +0,0 @@ ---魔術の呪文書 -function c67227834.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c67227834.target) - e1:SetOperation(c67227834.operation) - c:RegisterEffect(e1) - --Atk up - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(700) - c:RegisterEffect(e2) - --Equip limit - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_EQUIP_LIMIT) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e3:SetValue(c67227834.eqlimit) - c:RegisterEffect(e3) - --recover - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(67227834,0)) - e4:SetCategory(CATEGORY_RECOVER) - e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e4:SetCode(EVENT_TO_GRAVE) - e4:SetCondition(c67227834.reccon) - e4:SetTarget(c67227834.rectg) - e4:SetOperation(c67227834.recop) - c:RegisterEffect(e4) -end -function c67227834.eqlimit(e,c) - local code=c:GetCode() - return code==46986414 or code==38033121 -end -function c67227834.filter(c) - local code=c:GetCode() - return c:IsFaceup() and (code==46986414 or code==38033121) -end -function c67227834.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c67227834.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c67227834.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c67227834.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c67227834.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,e:GetHandler(),tc) - end -end -function c67227834.reccon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) -end -function c67227834.rectg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(1000) - Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,1000) -end -function c67227834.recop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Recover(p,d,REASON_EFFECT) -end diff --git a/script/c67232306.lua b/script/c67232306.lua deleted file mode 100644 index bdcb18e624..0000000000 --- a/script/c67232306.lua +++ /dev/null @@ -1,29 +0,0 @@ ---聖なる鎧 -ミラーメール- -function c67232306.initial_effect(c) - --atk - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_BE_BATTLE_TARGET) - e1:SetTarget(c67232306.target) - e1:SetOperation(c67232306.operation) - c:RegisterEffect(e1) -end -function c67232306.target(e,tp,eg,ep,ev,re,r,rp,chk) - local at=eg:GetFirst() - local a=Duel.GetAttacker() - if chk==0 then return at:IsControler(tp) and at:IsOnField() and at:IsFaceup() and a:IsOnField() end - at:CreateEffectRelation(e) - a:CreateEffectRelation(e) -end -function c67232306.operation(e,tp,eg,ep,ev,re,r,rp) - local at=eg:GetFirst() - local a=Duel.GetAttacker() - if not a:IsRelateToEffect(e) or not at:IsRelateToEffect(e) or a:IsFacedown() or at:IsFacedown() then return end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetValue(a:GetAttack()) - e1:SetReset(RESET_EVENT+0x1fe0000) - at:RegisterEffect(e1) -end diff --git a/script/c67234805.lua b/script/c67234805.lua deleted file mode 100644 index 2b9a2e675b..0000000000 --- a/script/c67234805.lua +++ /dev/null @@ -1,59 +0,0 @@ ---能力吸収石 -function c67234805.initial_effect(c) - c:SetCounterLimit(0x16,2) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --Add counter - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e2:SetCode(EVENT_CHAIN_SOLVING) - e2:SetProperty(EFFECT_FLAG_DELAY) - e2:SetRange(LOCATION_SZONE) - e2:SetOperation(c67234805.ctop) - c:RegisterEffect(e2) - --negate - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetCode(EFFECT_CANNOT_TRIGGER) - e3:SetRange(LOCATION_SZONE) - e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e3:SetCondition(c67234805.discon) - c:RegisterEffect(e3) - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_FIELD) - e4:SetCode(EFFECT_DISABLE) - e4:SetRange(LOCATION_SZONE) - e4:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e4:SetCondition(c67234805.discon) - e4:SetTarget(c67234805.distg) - c:RegisterEffect(e4) - --remove counter - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e5:SetCode(EVENT_PHASE+PHASE_END) - e5:SetRange(LOCATION_SZONE) - e5:SetCondition(c67234805.rmcon) - e5:SetOperation(c67234805.rmop) - c:RegisterEffect(e5) -end -function c67234805.ctop(e,tp,eg,ep,ev,re,r,rp) - local c=re:GetHandler() - if c:IsType(TYPE_MONSTER) then - e:GetHandler():AddCounter(0x16,1) - end -end -function c67234805.discon(e) - return e:GetHandler():GetCounter(0x16)==2 -end -function c67234805.distg(e,c) - return c:IsType(TYPE_EFFECT) -end -function c67234805.rmcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetCounter(0x16)>0 -end -function c67234805.rmop(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():RemoveCounter(tp,0x16,e:GetHandler():GetCounter(0x16),REASON_EFFECT) -end diff --git a/script/c67237709.lua b/script/c67237709.lua deleted file mode 100644 index a6ad5b0d3e..0000000000 --- a/script/c67237709.lua +++ /dev/null @@ -1,103 +0,0 @@ ---Kozmotown -function c67237709.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --to hand - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(67237709,0)) - e2:SetCategory(CATEGORY_TOHAND) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_FZONE) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCountLimit(1) - e2:SetTarget(c67237709.thtg) - e2:SetOperation(c67237709.thop) - c:RegisterEffect(e2) - --draw - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(67237709,1)) - e3:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_FZONE) - e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e3:SetCountLimit(1) - e3:SetTarget(c67237709.drtg) - e3:SetOperation(c67237709.drop) - c:RegisterEffect(e3) - --to hand - local e4=Effect.CreateEffect(c) - e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e4:SetCode(EVENT_DESTROYED) - e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e4:SetCondition(c67237709.thcon2) - e4:SetTarget(c67237709.thtg2) - e4:SetOperation(c67237709.thop2) - c:RegisterEffect(e4) -end -function c67237709.thfilter(c) - return c:IsFaceup() and c:IsSetCard(0xd2) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() -end -function c67237709.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_REMOVED) and c67237709.thfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c67237709.thfilter,tp,LOCATION_REMOVED,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c67237709.thfilter,tp,LOCATION_REMOVED,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c67237709.thop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - local lv=tc:GetOriginalLevel() - local lp=Duel.GetLP(tp) - Duel.SetLP(tp,lp-lv*100) - end -end -function c67237709.drfilter(c) - return c:IsSetCard(0xd2) and c:IsType(TYPE_MONSTER) and c:IsAbleToDeck() -end -function c67237709.drtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp) - and Duel.IsExistingMatchingCard(c67237709.drfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.SetTargetPlayer(tp) - Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_HAND) -end -function c67237709.drop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) - Duel.Hint(HINT_SELECTMSG,p,HINTMSG_TODECK) - local g=Duel.SelectMatchingCard(p,c67237709.drfilter,p,LOCATION_HAND,0,1,63,nil) - if g:GetCount()>0 then - Duel.ConfirmCards(1-p,g) - local ct=Duel.SendtoDeck(g,nil,2,REASON_EFFECT) - Duel.ShuffleDeck(p) - Duel.BreakEffect() - Duel.Draw(p,ct,REASON_EFFECT) - end -end -function c67237709.thcon2(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsReason(REASON_EFFECT) - and c:IsPreviousLocation(LOCATION_SZONE) and c:GetPreviousSequence()==5 -end -function c67237709.thfilter2(c) - return c:IsSetCard(0xd2) and c:IsAbleToHand() -end -function c67237709.thtg2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c67237709.thfilter2,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c67237709.thop2(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c67237709.thfilter2,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c67249508.lua b/script/c67249508.lua deleted file mode 100644 index 7dfd057dfa..0000000000 --- a/script/c67249508.lua +++ /dev/null @@ -1,47 +0,0 @@ ---竜星の凶暴化 -function c67249508.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_PRE_DAMAGE_CALCULATE) - e1:SetCondition(c67249508.condition) - e1:SetOperation(c67249508.activate) - c:RegisterEffect(e1) -end -function c67249508.condition(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetAttacker() - local at=Duel.GetAttackTarget() - if not at or tc:IsFacedown() or at:IsFacedown() then return false end - if tc:IsControler(1-tp) then tc=at end - e:SetLabelObject(tc) - return tc:IsControler(tp) and tc:IsLocation(LOCATION_MZONE) and tc:IsSetCard(0x9e) -end -function c67249508.activate(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=e:GetLabelObject() - if tc:IsRelateToBattle() then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetValue(tc:GetBaseAttack()*2) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_DAMAGE) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_SET_DEFENCE_FINAL) - e2:SetValue(tc:GetBaseDefence()*2) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_DAMAGE) - tc:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e3:SetRange(LOCATION_MZONE) - e3:SetCode(EVENT_DAMAGE_STEP_END) - e3:SetCountLimit(1) - e3:SetOperation(c67249508.desop) - e3:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_DAMAGE) - tc:RegisterEffect(e3) - end -end -function c67249508.desop(e,tp,eg,ep,ev,re,r,rp) - Duel.Destroy(e:GetHandler(),REASON_EFFECT) -end diff --git a/script/c67270095.lua b/script/c67270095.lua deleted file mode 100644 index f0f763adc9..0000000000 --- a/script/c67270095.lua +++ /dev/null @@ -1,57 +0,0 @@ ---ターボ・シンクロン -function c67270095.initial_effect(c) - --pos - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(67270095,0)) - e1:SetCategory(CATEGORY_POSITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetTarget(c67270095.postg) - e1:SetOperation(c67270095.posop) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(67270095,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EVENT_DAMAGE) - e2:SetCondition(c67270095.spcon) - e2:SetTarget(c67270095.sptg) - e2:SetOperation(c67270095.spop) - c:RegisterEffect(e2) -end -function c67270095.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local d=Duel.GetAttackTarget() - if chkc then return chkc==d end - if chk==0 then return d and d:IsAttackPos() and d:IsCanBeEffectTarget(e) end - Duel.SetTargetCard(d) - Duel.SetOperationInfo(0,CATEGORY_POSITION,d,1,0,0) -end -function c67270095.posop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) and tc:IsAttackPos() then - Duel.ChangePosition(tc,POS_FACEUP_DEFENCE) - end -end -function c67270095.spcon(e,tp,eg,ep,ev,re,r,rp) - return r==REASON_BATTLE and ep==tp and Duel.GetAttacker()==e:GetHandler() -end -function c67270095.filter(c,e,tp,dam) - return c:IsAttackBelow(dam) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c67270095.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c67270095.filter,tp,LOCATION_HAND,0,1,nil,e,tp,ev) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c67270095.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c67270095.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp,ev) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c67273917.lua b/script/c67273917.lua deleted file mode 100644 index 6d35b0778e..0000000000 --- a/script/c67273917.lua +++ /dev/null @@ -1,50 +0,0 @@ ---イグナイト・デリンジャー -function c67273917.initial_effect(c) - --pendulum summon - aux.AddPendulumProcedure(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --tohand - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_DESTROY+CATEGORY_TOHAND+CATEGORY_SEARCH) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_PZONE) - e2:SetCondition(c67273917.thcon) - e2:SetTarget(c67273917.thtg) - e2:SetOperation(c67273917.thop) - c:RegisterEffect(e2) -end -function c67273917.thcon(e,tp,eg,ep,ev,re,r,rp) - local seq=e:GetHandler():GetSequence() - local pc=Duel.GetFieldCard(tp,LOCATION_SZONE,13-seq) - return pc and pc:IsSetCard(0xc8) -end -function c67273917.filter(c) - return c:IsRace(RACE_WARRIOR) and c:IsAttribute(ATTRIBUTE_FIRE) and c:IsAbleToHand() -end -function c67273917.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - local pc=Duel.GetFieldCard(tp,LOCATION_SZONE,13-c:GetSequence()) - if chk==0 then return c:IsDestructable() and pc:IsDestructable() - and Duel.IsExistingMatchingCard(c67273917.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end - local g=Group.FromCards(c,pc) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,2,0,0) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE) -end -function c67273917.thop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) then return end - local pc=Duel.GetFieldCard(tp,LOCATION_SZONE,13-c:GetSequence()) - if not pc then return end - local dg=Group.FromCards(c,pc) - if Duel.Destroy(dg,REASON_EFFECT)~=2 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c67273917.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil) - if g:GetCount()>0 and not g:GetFirst():IsHasEffect(EFFECT_NECRO_VALLEY) then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c67287533.lua b/script/c67287533.lua deleted file mode 100644 index a0d6ee6906..0000000000 --- a/script/c67287533.lua +++ /dev/null @@ -1,11 +0,0 @@ ---死のメッセージ「A」 -function c67287533.initial_effect(c) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_SSET) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - c:RegisterEffect(e2) -end diff --git a/script/c67300516.lua b/script/c67300516.lua deleted file mode 100644 index 34f689dad4..0000000000 --- a/script/c67300516.lua +++ /dev/null @@ -1,41 +0,0 @@ ---真紅眼の飛竜 -function c67300516.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(67300516,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetRange(LOCATION_GRAVE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetCondition(c67300516.spcon) - e1:SetCost(c67300516.spcost) - e1:SetTarget(c67300516.sptg) - e1:SetOperation(c67300516.spop) - c:RegisterEffect(e1) -end -function c67300516.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp and Duel.GetActivityCount(tp,ACTIVITY_NORMALSUMMON)==0 -end -function c67300516.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) -end -function c67300516.filter(c,e,tp) - return c:IsSetCard(0x3b) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c67300516.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c67300516.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c67300516.filter,tp,LOCATION_GRAVE,0,1,e:GetHandler(),e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c67300516.filter,tp,LOCATION_GRAVE,0,1,1,e:GetHandler(),e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,g:GetCount(),0,0) -end -function c67300516.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c67310848.lua b/script/c67310848.lua deleted file mode 100644 index 78309f99a1..0000000000 --- a/script/c67310848.lua +++ /dev/null @@ -1,41 +0,0 @@ ---矮星竜 プラネター -function c67310848.initial_effect(c) - --to hand - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetOperation(c67310848.sumsuc) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_PHASE+PHASE_END) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCondition(c67310848.thcon) - e2:SetTarget(c67310848.thtg) - e2:SetOperation(c67310848.thop) - c:RegisterEffect(e2) -end -function c67310848.sumsuc(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():RegisterFlagEffect(67310848,RESET_EVENT+0x1ec0000+RESET_PHASE+PHASE_END,0,1) -end -function c67310848.thcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetFlagEffect(67310848)~=0 -end -function c67310848.thfilter(c) - return c:GetLevel()==7 and c:IsAttribute(ATTRIBUTE_LIGHT+ATTRIBUTE_DARK) and c:IsAbleToHand() -end -function c67310848.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c67310848.thfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c67310848.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c67310848.thfilter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c67316075.lua b/script/c67316075.lua deleted file mode 100644 index eb4d3a2549..0000000000 --- a/script/c67316075.lua +++ /dev/null @@ -1,12 +0,0 @@ ---堕天使ナース-レフィキュル -function c67316075.initial_effect(c) - --recover conversion - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EFFECT_REVERSE_RECOVER) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(0,1) - e1:SetValue(1) - c:RegisterEffect(e1) -end diff --git a/script/c67328336.lua b/script/c67328336.lua deleted file mode 100644 index e97c6693a1..0000000000 --- a/script/c67328336.lua +++ /dev/null @@ -1,50 +0,0 @@ ---機皇城 -function c67328336.initial_effect(c) - --activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --untargetable - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(LOCATION_MZONE,0) - e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x3013)) - e2:SetValue(c67328336.effval) - c:RegisterEffect(e2) - --search - local e3=Effect.CreateEffect(c) - e3:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND) - e3:SetDescription(aux.Stringid(67328336,0)) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e3:SetCode(EVENT_TO_GRAVE) - e3:SetCondition(c67328336.thcon) - e3:SetTarget(c67328336.thtg) - e3:SetOperation(c67328336.thop) - c:RegisterEffect(e3) -end -function c67328336.effval(e,re,rp) - return re:GetHandler():IsType(TYPE_SYNCHRO) and aux.tgval(e,re,rp) -end -function c67328336.thcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsReason(REASON_DESTROY) and bit.band(c:GetPreviousLocation(),LOCATION_ONFIELD)~=0 -end -function c67328336.filter(c) - return c:IsSetCard(0x3013) and c:IsAbleToHand() -end -function c67328336.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c67328336.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c67328336.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c67328336.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c6733059.lua b/script/c6733059.lua deleted file mode 100644 index ba82414c28..0000000000 --- a/script/c6733059.lua +++ /dev/null @@ -1,95 +0,0 @@ ---死霊の巣 -function c6733059.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,0x1c0) - e1:SetCost(c6733059.cost1) - e1:SetOperation(c6733059.operation) - c:RegisterEffect(e1) - --instant(chain) - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(6733059,1)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetRange(LOCATION_SZONE) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetHintTiming(0,0x1c0) - e2:SetCost(c6733059.cost2) - e2:SetOperation(c6733059.operation) - c:RegisterEffect(e2) -end -function c6733059.cfilter(c) - return c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost() -end -function c6733059.tfilter(c,lv) - return c:IsFaceup() and c:IsLevelBelow(lv) and c:IsDestructable() -end -function c6733059.cost1(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - e:SetLabel(0) - local cg=Duel.GetMatchingGroup(c6733059.cfilter,tp,LOCATION_GRAVE,0,nil) - local tg=Duel.GetMatchingGroup(c6733059.tfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,cg:GetCount()) - if tg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(6733059,0)) then - local lvt={} - local tc=tg:GetFirst() - while tc do - local tlv=tc:GetLevel() - lvt[tlv]=tlv - tc=tg:GetNext() - end - local pc=1 - for i=1,12 do - if lvt[i] then lvt[i]=nil lvt[pc]=i pc=pc+1 end - end - lvt[pc]=nil - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(6733059,2)) - local lv=Duel.AnnounceNumber(tp,table.unpack(lvt)) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local rg=cg:Select(tp,lv,lv,nil) - Duel.Remove(rg,POS_FACEUP,REASON_COST) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,tg,1,0,0) - Duel.SetTargetParam(lv) - end -end -function c6733059.cost2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local cg=Duel.GetMatchingGroup(c6733059.cfilter,tp,LOCATION_GRAVE,0,nil) - local tg=Duel.GetMatchingGroup(c6733059.tfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,cg:GetCount()) - return tg:GetCount()>0 - end - e:SetLabel(0) - local cg=Duel.GetMatchingGroup(c6733059.cfilter,tp,LOCATION_GRAVE,0,nil) - local tg=Duel.GetMatchingGroup(c6733059.tfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,cg:GetCount()) - local lvt={} - local tc=tg:GetFirst() - while tc do - local tlv=tc:GetLevel() - lvt[tlv]=tlv - tc=tg:GetNext() - end - local pc=1 - for i=1,12 do - if lvt[i] then lvt[i]=nil lvt[pc]=i pc=pc+1 end - end - lvt[pc]=nil - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(6733059,2)) - local lv=Duel.AnnounceNumber(tp,table.unpack(lvt)) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local rg=cg:Select(tp,lv,lv,nil) - Duel.Remove(rg,POS_FACEUP,REASON_COST) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,tg,1,0,0) - Duel.SetTargetParam(lv) -end -function c6733059.dfilter(c,lv) - return c:IsFaceup() and c:GetLevel()==lv and c:IsDestructable() -end -function c6733059.operation(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local lv=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM) - if lv==0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectMatchingCard(tp,c6733059.dfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,lv) - Duel.Destroy(g,REASON_EFFECT) -end diff --git a/script/c67381587.lua b/script/c67381587.lua deleted file mode 100644 index fdf77a9342..0000000000 --- a/script/c67381587.lua +++ /dev/null @@ -1,55 +0,0 @@ ---黒猫の睨み -function c67381587.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c67381587.condition) - e1:SetOperation(c67381587.activate) - c:RegisterEffect(e1) - --position change - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_POSITION) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetRange(LOCATION_GRAVE) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCost(c67381587.poscost) - e2:SetTarget(c67381587.postg) - e2:SetOperation(c67381587.posop) - c:RegisterEffect(e2) -end -function c67381587.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp and Duel.GetCurrentPhase()==PHASE_BATTLE - and Duel.IsExistingMatchingCard(Card.IsPosition,tp,LOCATION_MZONE,0,2,nil,POS_FACEDOWN_DEFENCE) -end -function c67381587.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.SkipPhase(1-tp,PHASE_BATTLE,RESET_PHASE+RESET_BATTLE,1) -end -function c67381587.poscost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) -end -function c67381587.posfilter1(c) - return c:IsFaceup() and c:IsSetCard(0xcc) and c:IsCanTurnSet() - and Duel.IsExistingTarget(c67381587.posfilter2,0,LOCATION_MZONE,LOCATION_MZONE,1,c) -end -function c67381587.posfilter2(c) - return c:IsFaceup() and c:IsCanTurnSet() -end -function c67381587.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - if chk==0 then return Duel.IsExistingTarget(c67381587.posfilter1,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE) - local g1=Duel.SelectTarget(tp,c67381587.posfilter1,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE) - local g2=Duel.SelectTarget(tp,c67381587.posfilter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,g1:GetFirst()) - g1:Merge(g2) - Duel.SetOperationInfo(0,CATEGORY_POSITION,g1,2,0,0) -end -function c67381587.posop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) - if g:GetCount()>0 then - Duel.ChangePosition(g,POS_FACEDOWN_DEFENCE) - end -end diff --git a/script/c67441435.lua b/script/c67441435.lua deleted file mode 100644 index 342fa50d6f..0000000000 --- a/script/c67441435.lua +++ /dev/null @@ -1,27 +0,0 @@ ---グローアップ・バルブ -function c67441435.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(67441435,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_GRAVE) - e1:SetCountLimit(1,67441435+EFFECT_COUNT_CODE_DUEL) - e1:SetTarget(c67441435.target) - e1:SetOperation(c67441435.operation) - c:RegisterEffect(e1) -end -function c67441435.target(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,1) - and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,1) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0) -end -function c67441435.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)==0 then return end - Duel.DiscardDeck(tp,1,REASON_EFFECT) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) then return end - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) -end diff --git a/script/c67443336.lua b/script/c67443336.lua deleted file mode 100644 index 7b1c89e390..0000000000 --- a/script/c67443336.lua +++ /dev/null @@ -1,35 +0,0 @@ ---裁きの天秤 -function c67443336.initial_effect(c) - --activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCountLimit(1,67443336+EFFECT_COUNT_CODE_OATH) - e1:SetCondition(c67443336.condition) - e1:SetTarget(c67443336.target) - e1:SetOperation(c67443336.activate) - c:RegisterEffect(e1) -end -function c67443336.condition(e,tp,eg,ep,ev,re,r,rp) - local t=Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD) - local s=Duel.GetFieldGroupCount(tp,LOCATION_HAND+LOCATION_ONFIELD,0) - return t>s -end -function c67443336.target(e,tp,eg,ep,ev,re,r,rp,chk) - local t=Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD) - local s=Duel.GetFieldGroupCount(tp,LOCATION_HAND+LOCATION_ONFIELD,0) - if chk==0 then return Duel.IsPlayerCanDraw(tp,t-s) end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(t-s) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,t-s) -end -function c67443336.activate(e,tp,eg,ep,ev,re,r,rp) - local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) - local t=Duel.GetFieldGroupCount(p,0,LOCATION_ONFIELD) - local s=Duel.GetFieldGroupCount(p,LOCATION_HAND+LOCATION_ONFIELD,0) - if t>s then - Duel.Draw(p,t-s,REASON_EFFECT) - end -end diff --git a/script/c67445676.lua b/script/c67445676.lua deleted file mode 100644 index 6478a78ffe..0000000000 --- a/script/c67445676.lua +++ /dev/null @@ -1,26 +0,0 @@ ---マツボックル -function c67445676.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(67445676,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCondition(c67445676.spcon) - e1:SetTarget(c67445676.sptg) - e1:SetOperation(c67445676.spop) - c:RegisterEffect(e1) -end -function c67445676.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsReason(REASON_EFFECT) and re and re:GetHandler():IsCode(21051977) -end -function c67445676.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c67445676.spop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c674561.lua b/script/c674561.lua deleted file mode 100644 index 6d7436b115..0000000000 --- a/script/c674561.lua +++ /dev/null @@ -1,29 +0,0 @@ ---ダーク・バースト -function c674561.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c674561.target) - e1:SetOperation(c674561.activate) - c:RegisterEffect(e1) -end -function c674561.filter(c) - return c:IsAttackBelow(1500) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsAbleToHand() -end -function c674561.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c674561.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c674561.filter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c674561.filter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c674561.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end diff --git a/script/c67464807.lua b/script/c67464807.lua deleted file mode 100644 index 0b77c2e2a8..0000000000 --- a/script/c67464807.lua +++ /dev/null @@ -1,48 +0,0 @@ ---運命のドラ -function c67464807.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(TIMING_ATTACK,0x1e0) - e1:SetCondition(c67464807.condition) - e1:SetTarget(c67464807.target) - e1:SetOperation(c67464807.activate) - c:RegisterEffect(e1) -end -function c67464807.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp -end -function c67464807.filter(c) - return c:IsFaceup() and c:GetLevel()>1 -end -function c67464807.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c67464807.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c67464807.filter,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c67464807.filter,tp,0,LOCATION_MZONE,1,1,nil) -end -function c67464807.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - local lv=tc:GetLevel() - if lv>1 then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetCountLimit(1) - e1:SetCondition(c67464807.damcon) - e1:SetOperation(c67464807.damop) - e1:SetLabel(lv) - e1:SetReset(RESET_PHASE+PHASE_END,2) - Duel.RegisterEffect(e1,tp) - end - end -end -function c67464807.damcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp and ep==tp and eg:GetFirst():GetLevel()==e:GetLabel()-1 -end -function c67464807.damop(e,tp,eg,ep,ev,re,r,rp) - Duel.Damage(1-tp,e:GetLabel()*500,REASON_EFFECT) -end diff --git a/script/c67468948.lua b/script/c67468948.lua deleted file mode 100644 index c2ebdb1d96..0000000000 --- a/script/c67468948.lua +++ /dev/null @@ -1,23 +0,0 @@ ---救済のレイヤード -function c67468948.initial_effect(c) - --tohand - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_CHAIN_SOLVED) - e1:SetRange(LOCATION_MZONE) - e1:SetOperation(c67468948.drop) - c:RegisterEffect(e1) -end -function c67468948.filter(c) - return c:IsFaceup() and c:IsRace(RACE_FAIRY) and c:IsAbleToHand() -end -function c67468948.drop(e,tp,eg,ep,ev,re,r,rp) - if not re:GetHandler():IsType(TYPE_COUNTER) then return end - Duel.BreakEffect() - local g=Duel.GetMatchingGroup(c67468948.filter,tp,LOCATION_REMOVED,0,nil) - if g:GetCount()<2 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local sg=g:Select(tp,2,2,nil) - Duel.SendtoHand(sg,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,sg) -end diff --git a/script/c67483216.lua b/script/c67483216.lua deleted file mode 100644 index 746f5156ee..0000000000 --- a/script/c67483216.lua +++ /dev/null @@ -1,32 +0,0 @@ ---ジェネクス・サーチャー -function c67483216.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(67483216,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetCondition(c67483216.condition) - e1:SetTarget(c67483216.target) - e1:SetOperation(c67483216.operation) - c:RegisterEffect(e1) -end -function c67483216.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) -end -function c67483216.filter(c,e,tp) - return c:IsAttackBelow(1500) and c:IsSetCard(0x2) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c67483216.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c67483216.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c67483216.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c67483216.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_ATTACK) - end -end diff --git a/script/c67489919.lua b/script/c67489919.lua deleted file mode 100644 index 5eeaaeebc0..0000000000 --- a/script/c67489919.lua +++ /dev/null @@ -1,89 +0,0 @@ ---幻獣機ブルーインパラス -function c67489919.initial_effect(c) - -- - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e1:SetCondition(c67489919.indcon) - e1:SetValue(1) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - c:RegisterEffect(e2) - --token - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(67489919,0)) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_GRAVE) - e3:SetCondition(c67489919.spcon) - e3:SetCost(c67489919.spcost) - e3:SetTarget(c67489919.sptg) - e3:SetOperation(c67489919.spop) - c:RegisterEffect(e3) - --synchro custom - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetCode(EFFECT_SYNCHRO_MATERIAL_CUSTOM) - e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e4:SetTarget(c67489919.syntg) - e4:SetValue(1) - e4:SetOperation(c67489919.synop) - c:RegisterEffect(e4) - --synlimit - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_SINGLE) - e5:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL) - e5:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e5:SetValue(c67489919.synlimit) - c:RegisterEffect(e5) -end -function c67489919.indcon(e) - return Duel.IsExistingMatchingCard(Card.IsType,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil,TYPE_TOKEN) -end -function c67489919.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 - and Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0 -end -function c67489919.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT) -end -function c67489919.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsPlayerCanSpecialSummonMonster(tp,31533705,0x101b,0x4011,0,0,3,RACE_MACHINE,ATTRIBUTE_WIND) end - Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0) -end -function c67489919.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - if Duel.IsPlayerCanSpecialSummonMonster(tp,31533705,0x101b,0x4011,0,0,3,RACE_MACHINE,ATTRIBUTE_WIND) then - local token=Duel.CreateToken(tp,67489920) - Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP) - end -end -function c67489919.synfilter(c,syncard,tuner,f) - return (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) and c:IsSetCard(0x101b) and c:IsNotTuner() - and c:IsCanBeSynchroMaterial(syncard,tuner) and (f==nil or f(c)) -end -function c67489919.syntg(e,syncard,f,minc,maxc) - local c=e:GetHandler() - local lv=syncard:GetLevel()-c:GetLevel() - if lv<=0 then return false end - local g=Duel.GetMatchingGroup(c67489919.synfilter,syncard:GetControler(),LOCATION_MZONE+LOCATION_HAND,LOCATION_MZONE,c,syncard,c,f) - return g:CheckWithSumEqual(Card.GetSynchroLevel,lv,minc,maxc,syncard) -end -function c67489919.synop(e,tp,eg,ep,ev,re,r,rp,syncard,f,minc,maxc) - local c=e:GetHandler() - local lv=syncard:GetLevel()-c:GetLevel() - local g=Duel.GetMatchingGroup(c67489919.synfilter,syncard:GetControler(),LOCATION_MZONE+LOCATION_HAND,LOCATION_MZONE,c,syncard,c,f) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SMATERIAL) - local sg=g:SelectWithSumEqual(tp,Card.GetSynchroLevel,lv,minc,maxc,syncard) - Duel.SetSynchroMaterial(sg) -end -function c67489919.synlimit(e,c) - if not c then return false end - return not c:IsRace(RACE_MACHINE) -end diff --git a/script/c67503139.lua b/script/c67503139.lua deleted file mode 100644 index 2507b1c34b..0000000000 --- a/script/c67503139.lua +++ /dev/null @@ -1,27 +0,0 @@ ---占術姫クリスタルウンディーネ -function c67503139.initial_effect(c) - --to hand - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DELAY) - e1:SetTarget(c67503139.thtg) - e1:SetOperation(c67503139.thop) - c:RegisterEffect(e1) -end -function c67503139.thfilter(c) - return bit.band(c:GetType(),0x81)==0x81 and c:IsAbleToHand() - and not c:IsHasEffect(EFFECT_NECRO_VALLEY) -end -function c67503139.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c67503139.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE) -end -function c67503139.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c67503139.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c67511500.lua b/script/c67511500.lua deleted file mode 100644 index 9644f91e0f..0000000000 --- a/script/c67511500.lua +++ /dev/null @@ -1,33 +0,0 @@ ---ドラゴン・ウィッチ-ドラゴンの守護者- -function c67511500.initial_effect(c) - --cannot be battle target - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(0,LOCATION_MZONE) - e1:SetValue(c67511500.atlimit) - c:RegisterEffect(e1) - --destroy replace - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EFFECT_DESTROY_REPLACE) - e2:SetTarget(c67511500.desreptg) - c:RegisterEffect(e2) -end -function c67511500.atlimit(e,c) - return c:IsFaceup() and c:IsRace(RACE_DRAGON) -end -function c67511500.desreptg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return not c:IsReason(REASON_REPLACE) - and Duel.IsExistingMatchingCard(Card.IsRace,tp,LOCATION_HAND,0,1,nil,RACE_DRAGON) end - if Duel.SelectYesNo(tp,aux.Stringid(67511500,0)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,Card.IsRace,tp,LOCATION_HAND,0,1,1,nil,RACE_DRAGON) - Duel.SendtoGrave(g,REASON_EFFECT+REASON_REPLACE) - return true - else return false end -end diff --git a/script/c67556500.lua b/script/c67556500.lua deleted file mode 100644 index e66eaf4764..0000000000 --- a/script/c67556500.lua +++ /dev/null @@ -1,59 +0,0 @@ ---波動竜フォノン・ドラゴン -function c67556500.initial_effect(c) - Duel.EnableGlobalFlag(GLOBALFLAG_MUST_BE_SMATERIAL) - c:SetSPSummonOnce(67556500) - --synchro summon - aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1) - c:EnableReviveLimit() - --level - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(67556500,0)) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(c67556500.lvcon) - e1:SetTarget(c67556500.lvtg) - e1:SetOperation(c67556500.lvop) - c:RegisterEffect(e1) -end -function c67556500.lvcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_SYNCHRO -end -function c67556500.lvtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,567) - local lv=Duel.AnnounceNumber(tp,1,2,3) - e:SetLabel(lv) -end -function c67556500.lvop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local fid=0 - if c:IsFaceup() and c:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CHANGE_LEVEL) - e1:SetValue(e:GetLabel()) - e1:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e1) - fid=c:GetRealFieldID() - end - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetTargetRange(1,0) - e2:SetReset(RESET_PHASE+PHASE_END) - e2:SetTarget(c67556500.splimit) - e2:SetLabel(fid) - Duel.RegisterEffect(e2,tp) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetRange(LOCATION_MZONE) - e3:SetCode(EFFECT_MUST_BE_SMATERIAL) - e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE) - e3:SetTargetRange(1,0) - e3:SetReset(RESET_EVENT+0x1fc0000+RESET_PHASE+PHASE_END) - c:RegisterEffect(e3) -end -function c67556500.splimit(e,c,sump,sumtype,sumpos,targetp,se) - return sumtype~=SUMMON_TYPE_SYNCHRO or e:GetOwner():GetRealFieldID()~=e:GetLabel() or e:GetOwner():IsFacedown() -end diff --git a/script/c67559101.lua b/script/c67559101.lua deleted file mode 100644 index a1ff145656..0000000000 --- a/script/c67559101.lua +++ /dev/null @@ -1,14 +0,0 @@ ---先史遺産マッドゴーレム・シャコウキ -function c67559101.initial_effect(c) - --pierce - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_PIERCE) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetTarget(c67559101.target) - c:RegisterEffect(e1) -end -function c67559101.target(e,c) - return c:IsSetCard(0x70) -end diff --git a/script/c67616300.lua b/script/c67616300.lua deleted file mode 100644 index 932d2e4ecf..0000000000 --- a/script/c67616300.lua +++ /dev/null @@ -1,110 +0,0 @@ ---チキンレース -function c67616300.initial_effect(c) - --activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --change damage - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetRange(LOCATION_FZONE) - e2:SetCode(EFFECT_CHANGE_DAMAGE) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetTargetRange(1,0) - e2:SetCondition(c67616300.damcon1) - e2:SetValue(0) - c:RegisterEffect(e2) - local e7=e2:Clone() - e7:SetCode(EFFECT_NO_EFFECT_DAMAGE) - c:RegisterEffect(e7) - local e3=e2:Clone() - e3:SetTargetRange(0,1) - e3:SetCondition(c67616300.damcon2) - c:RegisterEffect(e3) - local e8=e3:Clone() - e8:SetCode(EFFECT_NO_EFFECT_DAMAGE) - c:RegisterEffect(e8) - --draw - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(67616300,0)) - e4:SetCategory(CATEGORY_DRAW) - e4:SetType(EFFECT_TYPE_IGNITION) - e4:SetRange(LOCATION_FZONE) - e4:SetProperty(EFFECT_FLAG_BOTH_SIDE+EFFECT_FLAG_PLAYER_TARGET) - e4:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE) - e4:SetCost(c67616300.effcost) - e4:SetTarget(c67616300.drtg) - e4:SetOperation(c67616300.drop) - c:RegisterEffect(e4) - --destroy - local e5=Effect.CreateEffect(c) - e5:SetDescription(aux.Stringid(67616300,1)) - e5:SetCategory(CATEGORY_DESTROY) - e5:SetType(EFFECT_TYPE_IGNITION) - e5:SetRange(LOCATION_FZONE) - e5:SetProperty(EFFECT_FLAG_BOTH_SIDE) - e5:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE) - e5:SetCost(c67616300.effcost) - e5:SetTarget(c67616300.destg) - e5:SetOperation(c67616300.desop) - c:RegisterEffect(e5) - --recover - local e6=Effect.CreateEffect(c) - e6:SetDescription(aux.Stringid(67616300,2)) - e6:SetCategory(CATEGORY_RECOVER) - e6:SetType(EFFECT_TYPE_IGNITION) - e6:SetRange(LOCATION_FZONE) - e6:SetProperty(EFFECT_FLAG_BOTH_SIDE+EFFECT_FLAG_PLAYER_TARGET) - e6:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE) - e6:SetCost(c67616300.effcost) - e6:SetTarget(c67616300.rectg) - e6:SetOperation(c67616300.recop) - c:RegisterEffect(e6) -end -function c67616300.damcon1(e) - local tp=e:GetHandlerPlayer() - return Duel.GetLP(tp)0 -end diff --git a/script/c67675300.lua b/script/c67675300.lua deleted file mode 100644 index 3df96c5ada..0000000000 --- a/script/c67675300.lua +++ /dev/null @@ -1,33 +0,0 @@ ---スノーダスト・ドラゴン -function c67675300.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c67675300.spcon) - e1:SetOperation(c67675300.spop) - c:RegisterEffect(e1) - --atk,pos limit - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_CANNOT_ATTACK) - e2:SetRange(LOCATION_MZONE) - e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e2:SetTarget(c67675300.target) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EFFECT_CANNOT_CHANGE_POSITION) - c:RegisterEffect(e3) -end -function c67675300.spcon(e,c) - if c==nil then return true end - return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and Duel.IsCanRemoveCounter(c:GetControler(),1,1,0x15,4,REASON_COST) -end -function c67675300.spop(e,tp,eg,ep,ev,re,r,rp,c) - Duel.RemoveCounter(tp,1,1,0x15,4,REASON_RULE) -end -function c67675300.target(e,c) - return c~=e:GetHandler() and c:GetCounter(0x15)~=0 -end diff --git a/script/c67688478.lua b/script/c67688478.lua deleted file mode 100644 index db11028d25..0000000000 --- a/script/c67688478.lua +++ /dev/null @@ -1,41 +0,0 @@ ---ヂェミナイ・デビル -function c67688478.initial_effect(c) - --Negate - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(67688478,0)) - e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY+CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_CHAINING) - e1:SetRange(LOCATION_HAND) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e1:SetCondition(c67688478.condition) - e1:SetCost(c67688478.cost) - e1:SetTarget(c67688478.target) - e1:SetOperation(c67688478.operation) - c:RegisterEffect(e1) -end -function c67688478.condition(e,tp,eg,ep,ev,re,r,rp) - if ep==tp or (not re:IsHasType(EFFECT_TYPE_ACTIVATE) and not re:IsActiveType(TYPE_MONSTER)) - or (not Duel.IsChainNegatable(ev)) then return false end - local ex,tg,tc,p=Duel.GetOperationInfo(ev,CATEGORY_HANDES) - return re:IsHasCategory(CATEGORY_HANDES) and (not ex or p~=1-tp) -end -function c67688478.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end -function c67688478.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) - end -end -function c67688478.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateActivation(ev) - if re:GetHandler():IsRelateToEffect(re) and Duel.Destroy(eg,REASON_EFFECT)~=0 then - Duel.BreakEffect() - Duel.Draw(tp,1,REASON_EFFECT) - end -end diff --git a/script/c67692580.lua b/script/c67692580.lua deleted file mode 100644 index f2bad303a5..0000000000 --- a/script/c67692580.lua +++ /dev/null @@ -1,21 +0,0 @@ ---クロクロークロウ -function c67692580.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(1,67692580) - e1:SetCondition(c67692580.spcon) - c:RegisterEffect(e1) -end -function c67692580.filter(c) - return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_DARK) -end -function c67692580.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c67692580.filter,tp,LOCATION_MZONE,0,1,nil) -end diff --git a/script/c67696066.lua b/script/c67696066.lua deleted file mode 100644 index d436b931be..0000000000 --- a/script/c67696066.lua +++ /dev/null @@ -1,43 +0,0 @@ ---Emトリック・クラウン -function c67696066.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) - e1:SetCountLimit(1,67696066) - e1:SetTarget(c67696066.sptg) - e1:SetOperation(c67696066.spop) - c:RegisterEffect(e1) -end -function c67696066.filter(c,e,tp) - return c:IsSetCard(0xc6) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c67696066.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c67696066.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c67696066.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c67696066.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,tp,1000) -end -function c67696066.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetValue(0) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_SET_DEFENCE) - tc:RegisterEffect(e2) - Duel.SpecialSummonComplete() - Duel.BreakEffect() - Duel.Damage(tp,1000,REASON_EFFECT) - end -end diff --git a/script/c67723438.lua b/script/c67723438.lua deleted file mode 100644 index 95a11367c9..0000000000 --- a/script/c67723438.lua +++ /dev/null @@ -1,39 +0,0 @@ ---緊急テレポート -function c67723438.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c67723438.target) - e1:SetOperation(c67723438.activate) - c:RegisterEffect(e1) -end -function c67723438.filter(c,e,tp) - return c:IsLevelBelow(3) and c:IsRace(RACE_PSYCHO) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c67723438.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c67723438.filter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,LOCATION_DECK+LOCATION_HAND) -end -function c67723438.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c67723438.filter,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil,e,tp) - local tc=g:GetFirst() - if tc then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetOperation(c67723438.rmop) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e1:SetCountLimit(1) - tc:RegisterEffect(e1) - end -end -function c67723438.rmop(e,tp,eg,ep,ev,re,r,rp) - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT) -end diff --git a/script/c67750322.lua b/script/c67750322.lua deleted file mode 100644 index 03cc1164c2..0000000000 --- a/script/c67750322.lua +++ /dev/null @@ -1,30 +0,0 @@ ---スカル・マイスター -function c67750322.initial_effect(c) - --Inactivate - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(67750322,0)) - e1:SetCategory(CATEGORY_DISABLE) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_CHAINING) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c67750322.discon) - e1:SetCost(c67750322.discost) - e1:SetTarget(c67750322.distg) - e1:SetOperation(c67750322.disop) - c:RegisterEffect(e1) -end -function c67750322.discon(e,tp,eg,ep,ev,re,r,rp) - local loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION) - return ep~=tp and Duel.IsChainNegatable(ev) and loc==LOCATION_GRAVE -end -function c67750322.discost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end -function c67750322.distg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0) -end -function c67750322.disop(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateEffect(ev) -end diff --git a/script/c67757079.lua b/script/c67757079.lua deleted file mode 100644 index ec89ffed33..0000000000 --- a/script/c67757079.lua +++ /dev/null @@ -1,33 +0,0 @@ ---キング・オブ・ビースト -function c67757079.initial_effect(c) - c:SetUniqueOnField(1,1,67757079) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(67757079,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND+LOCATION_GRAVE) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetCost(c67757079.spcost) - e1:SetTarget(c67757079.sptg) - e1:SetOperation(c67757079.spop) - c:RegisterEffect(e1) -end -function c67757079.cfilter(c) - return c:IsFaceup() and c:GetCode()==94878265 -end -function c67757079.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,c67757079.cfilter,1,nil) end - local g=Duel.SelectReleaseGroup(tp,c67757079.cfilter,1,1,nil) - Duel.Release(g,REASON_COST) -end -function c67757079.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c67757079.spop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c67775894.lua b/script/c67775894.lua deleted file mode 100644 index 225f234ee7..0000000000 --- a/script/c67775894.lua +++ /dev/null @@ -1,72 +0,0 @@ ---ワンダー・ワンド -function c67775894.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c67775894.target) - e1:SetOperation(c67775894.operation) - c:RegisterEffect(e1) - --Atk up - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(500) - c:RegisterEffect(e2) - --Equip limit - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_EQUIP_LIMIT) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e3:SetValue(c67775894.eqlimit) - c:RegisterEffect(e3) - --draw - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(67775894,0)) - e4:SetCategory(CATEGORY_DRAW) - e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e4:SetType(EFFECT_TYPE_IGNITION) - e4:SetRange(LOCATION_SZONE) - e4:SetCost(c67775894.drcost) - e4:SetTarget(c67775894.drtg) - e4:SetOperation(c67775894.drop) - c:RegisterEffect(e4) -end -function c67775894.eqlimit(e,c) - return c:IsRace(RACE_SPELLCASTER) -end -function c67775894.filter(c) - return c:IsFaceup() and c:IsRace(RACE_SPELLCASTER) -end -function c67775894.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c67775894.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c67775894.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c67775894.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c67775894.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,e:GetHandler(),tc) - end -end -function c67775894.drcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToGraveAsCost() and c:GetControler()==c:GetEquipTarget():GetControler() - and c:GetEquipTarget():IsAbleToGraveAsCost() end - local g=Group.FromCards(c,c:GetEquipTarget()) - Duel.SendtoGrave(g,REASON_COST) -end -function c67775894.drtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp,2) end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(2) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2) -end -function c67775894.drop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end diff --git a/script/c67779172.lua b/script/c67779172.lua deleted file mode 100644 index a4de2219d1..0000000000 --- a/script/c67779172.lua +++ /dev/null @@ -1,35 +0,0 @@ ---ブラックフェザー・シュート -function c67779172.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOGRAVE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c67779172.cost) - e1:SetTarget(c67779172.target) - e1:SetOperation(c67779172.activate) - c:RegisterEffect(e1) -end -function c67779172.costfilter(c) - return c:IsSetCard(0x33) and c:IsType(TYPE_MONSTER) and c:IsAbleToGraveAsCost() -end -function c67779172.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c67779172.costfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c67779172.costfilter,tp,LOCATION_HAND,0,1,1,nil) - Duel.SendtoGrave(g,REASON_COST) -end -function c67779172.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsDefencePos() end - if chk==0 then return Duel.IsExistingTarget(Card.IsDefencePos,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectTarget(tp,Card.IsDefencePos,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,0,0) -end -function c67779172.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.SendtoGrave(tc,REASON_EFFECT) - end -end diff --git a/script/c67829249.lua b/script/c67829249.lua deleted file mode 100644 index 25641f1952..0000000000 --- a/script/c67829249.lua +++ /dev/null @@ -1,47 +0,0 @@ ---古代の採掘機 -function c67829249.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c67829249.condition) - e1:SetCost(c67829249.cost) - e1:SetTarget(c67829249.target) - e1:SetOperation(c67829249.operation) - c:RegisterEffect(e1) -end -function c67829249.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x7) -end -function c67829249.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c67829249.cfilter,tp,LOCATION_MZONE,0,1,nil) -end -function c67829249.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) -end -function c67829249.filter(c) - return c:IsType(TYPE_SPELL) and c:IsSSetable() -end -function c67829249.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c67829249.filter,tp,LOCATION_DECK,0,1,nil) end -end -function c67829249.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) - local g=Duel.SelectMatchingCard(tp,c67829249.filter,tp,LOCATION_DECK,0,1,1,nil) - local tc=g:GetFirst() - if tc then - Duel.SSet(tp,tc) - Duel.ConfirmCards(1-tp,tc) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_TRIGGER) - e1:SetReset(RESET_EVENT+0x17a0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_CANNOT_USE_AS_COST) - e2:SetReset(RESET_EVENT+0x17a0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e2) - end -end diff --git a/script/c67904682.lua b/script/c67904682.lua deleted file mode 100644 index fddf72ba05..0000000000 --- a/script/c67904682.lua +++ /dev/null @@ -1,64 +0,0 @@ ---ダーク・フラット・トップ -function c67904682.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_DARK),aux.NonTuner(Card.IsRace,RACE_MACHINE),1) - c:EnableReviveLimit() - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(67904682,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c67904682.sptg1) - e1:SetOperation(c67904682.spop1) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(67904682,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetCondition(c67904682.spcon2) - e2:SetTarget(c67904682.sptg2) - e2:SetOperation(c67904682.spop2) - c:RegisterEffect(e2) -end -function c67904682.spfilter1(c,e,tp) - return (c:IsSetCard(0x63) or c:IsCode(16898077)) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) -end -function c67904682.sptg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c67904682.spfilter1(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c67904682.spfilter1,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c67904682.spfilter1,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c67904682.spop1(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,true,false,POS_FACEUP) - end -end -function c67904682.spcon2(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsReason(REASON_DESTROY) -end -function c67904682.spfilter2(c,e,tp) - return c:IsLevelBelow(5) and c:IsRace(RACE_MACHINE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c67904682.sptg2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c67904682.spfilter2,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c67904682.spop2(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c67904682.spfilter2,tp,LOCATION_HAND,0,1,1,nil,e,tp) - if g:GetCount()~=0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c67922702.lua b/script/c67922702.lua deleted file mode 100644 index 126cb6b9b7..0000000000 --- a/script/c67922702.lua +++ /dev/null @@ -1,89 +0,0 @@ ---幻獣機テザーウルフ -function c67922702.initial_effect(c) - --level - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_UPDATE_LEVEL) - e1:SetValue(c67922702.lvval) - c:RegisterEffect(e1) - -- - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e2:SetCondition(c67922702.indcon) - e2:SetValue(1) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - c:RegisterEffect(e3) - --token - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(67922702,0)) - e4:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e4:SetCode(EVENT_SUMMON_SUCCESS) - e4:SetTarget(c67922702.sptg) - e4:SetOperation(c67922702.spop) - c:RegisterEffect(e4) - --atkup - local e5=Effect.CreateEffect(c) - e5:SetDescription(aux.Stringid(67922702,1)) - e5:SetCategory(CATEGORY_ATKCHANGE) - e5:SetType(EFFECT_TYPE_QUICK_O) - e5:SetRange(LOCATION_MZONE) - e5:SetCode(EVENT_FREE_CHAIN) - e5:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e5:SetHintTiming(TIMING_DAMAGE_STEP) - e5:SetCondition(c67922702.atkcon) - e5:SetCost(c67922702.atkcost) - e5:SetOperation(c67922702.atkop) - c:RegisterEffect(e5) -end -function c67922702.lvval(e,c) - local tp=c:GetControler() - local lv=0 - for i=0,4 do - local tc=Duel.GetFieldCard(tp,LOCATION_MZONE,i) - if tc and tc:IsCode(31533705) then lv=lv+tc:GetLevel() end - end - return lv -end -function c67922702.indcon(e) - return Duel.IsExistingMatchingCard(Card.IsType,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil,TYPE_TOKEN) -end -function c67922702.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0) -end -function c67922702.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - if Duel.IsPlayerCanSpecialSummonMonster(tp,31533705,0x101b,0x4011,0,0,3,RACE_MACHINE,ATTRIBUTE_WIND) then - local token=Duel.CreateToken(tp,67922703) - Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP) - end -end -function c67922702.atkcon(e,tp,eg,ep,ev,re,r,rp) - local phase=Duel.GetCurrentPhase() - return e:GetHandler():GetBattleTarget()~=nil and phase==PHASE_DAMAGE and not Duel.IsDamageCalculated() -end -function c67922702.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():GetFlagEffect(67922702)==0 - and Duel.CheckReleaseGroup(tp,Card.IsType,1,nil,TYPE_TOKEN) end - local g=Duel.SelectReleaseGroup(tp,Card.IsType,1,1,nil,TYPE_TOKEN) - Duel.Release(g,REASON_COST) - e:GetHandler():RegisterFlagEffect(67922702,RESET_PHASE+RESET_DAMAGE_CAL,0,1) -end -function c67922702.atkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(800) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - c:RegisterEffect(e1) -end diff --git a/script/c67926903.lua b/script/c67926903.lua deleted file mode 100644 index 3fd38eb6ee..0000000000 --- a/script/c67926903.lua +++ /dev/null @@ -1,85 +0,0 @@ ---CX 冀望皇バリアン -function c67926903.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,7,3,c67926903.ovfilter,aux.Stringid(67926903,0),5) - c:EnableReviveLimit() - --atk - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetValue(c67926903.atkval) - c:RegisterEffect(e1) - --copy - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(67926903,1)) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCountLimit(1,67926903) - e2:SetTarget(c67926903.copytg) - e2:SetOperation(c67926903.copyop) - c:RegisterEffect(e2) -end -function c67926903.ovfilter(c) - local code=c:GetCode() - local class=_G["c"..code] - if class==nil then return false end - local no=class.xyz_number - return c:IsFaceup() and no and no>=101 and no<=107 and c:IsSetCard(0x1048) -end -function c67926903.atkval(e,c) - return c:GetOverlayCount()*1000 -end -function c67926903.filter(c) - return c:IsSetCard(0x48) and c:IsType(TYPE_EFFECT) -end -function c67926903.copytg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c67926903.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c67926903.filter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - Duel.SelectTarget(tp,c67926903.filter,tp,LOCATION_GRAVE,0,1,1,nil) -end -function c67926903.copyop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and c:IsFaceup() and tc:IsRelateToEffect(e) then - local code=tc:GetOriginalCode() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CHANGE_CODE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetValue(code) - e1:SetLabel(tp) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END+RESET_OPPO_TURN) - c:RegisterEffect(e1) - local cid=c:CopyEffect(code,RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END+RESET_OPPO_TURN) - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(67926903,2)) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_PHASE+PHASE_END) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e2:SetCountLimit(1) - e2:SetRange(LOCATION_MZONE) - e2:SetCondition(c67926903.rstcon) - e2:SetOperation(c67926903.rstop) - e2:SetLabel(cid) - e2:SetLabelObject(e1) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END+RESET_OPPO_TURN) - c:RegisterEffect(e2) - end -end -function c67926903.rstcon(e,tp,eg,ep,ev,re,r,rp) - local e1=e:GetLabelObject() - return Duel.GetTurnPlayer()~=e1:GetLabel() -end -function c67926903.rstop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local cid=e:GetLabel() - c:ResetEffect(cid,RESET_COPY) - local e1=e:GetLabelObject() - e1:Reset() - Duel.HintSelection(Group.FromCards(c)) - Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) -end diff --git a/script/c67934141.lua b/script/c67934141.lua deleted file mode 100644 index 3b9140a229..0000000000 --- a/script/c67934141.lua +++ /dev/null @@ -1,47 +0,0 @@ ---超熱血球児 -function c67934141.initial_effect(c) - --atkup - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(c67934141.val) - c:RegisterEffect(e1) - --damage - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(67934141,0)) - e2:SetCategory(CATEGORY_DAMAGE) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCost(c67934141.damcost) - e2:SetTarget(c67934141.damtg) - e2:SetOperation(c67934141.damop) - c:RegisterEffect(e2) -end -function c67934141.filter(c) - return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_FIRE) -end -function c67934141.val(e,c) - return Duel.GetMatchingGroupCount(c67934141.filter,c:GetControler(),LOCATION_MZONE,LOCATION_MZONE,c)*1000 -end -function c67934141.costfilter(c) - return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_FIRE) and c:IsAbleToGraveAsCost() -end -function c67934141.damcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c67934141.costfilter,tp,LOCATION_MZONE,0,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c67934141.costfilter,tp,LOCATION_MZONE,0,1,1,e:GetHandler()) - Duel.SendtoGrave(g,REASON_COST) -end -function c67934141.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(500) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,0,0,1-tp,500) -end -function c67934141.damop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c67949763.lua b/script/c67949763.lua deleted file mode 100644 index e789450825..0000000000 --- a/script/c67949763.lua +++ /dev/null @@ -1,83 +0,0 @@ ---罪鍵の法-シン・キー・ロウ -function c67949763.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetHintTiming(0,TIMING_END_PHASE) - e1:SetTarget(c67949763.target) - e1:SetOperation(c67949763.activate) - c:RegisterEffect(e1) -end -function c67949763.filter(c,tp) - return c:IsFaceup() and c:IsType(TYPE_XYZ) - and Duel.IsPlayerCanSpecialSummonMonster(tp,67949764,0x87,0x4011,-2,0,1,RACE_FIEND,ATTRIBUTE_DARK) -end -function c67949763.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c67949763.filter(chkc,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>2 - and Duel.IsExistingTarget(c67949763.filter,tp,LOCATION_MZONE,0,1,nil,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - Duel.SelectTarget(tp,c67949763.filter,tp,LOCATION_MZONE,0,1,1,nil,tp) - Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,3,0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,3,0,0) -end -function c67949763.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if Duel.GetLocationCount(tp,LOCATION_MZONE)>2 then - local rfid=tc:GetRealFieldID() - local atk=0 - local cr=false - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - atk=tc:GetAttack() - cr=true - end - if not Duel.IsPlayerCanSpecialSummonMonster(tp,67949764,0x87,0x4011,-2,0,1,RACE_FIEND,ATTRIBUTE_DARK) then return end - if cr then - local de=Effect.CreateEffect(e:GetHandler()) - de:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - de:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - de:SetCode(EVENT_LEAVE_FIELD) - de:SetOperation(c67949763.desop) - de:SetLabel(rfid) - tc:RegisterEffect(de,true) - end - for i=1,3 do - local token=Duel.CreateToken(tp,67949764) - Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_DIRECT_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000) - token:RegisterEffect(e1,true) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_UNRELEASABLE_NONSUM) - e2:SetValue(1) - e2:SetReset(RESET_EVENT+0x1fe0000) - token:RegisterEffect(e2,true) - local e3=Effect.CreateEffect(e:GetHandler()) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_SET_ATTACK) - e3:SetValue(atk) - e3:SetLabelObject(tc) - e3:SetReset(RESET_EVENT+0x1fe0000) - token:RegisterEffect(e3,true) - if cr then - token:RegisterFlagEffect(67949764,RESET_EVENT+0x1fe0000,0,0,rfid) - tc:CreateRelation(token,RESET_EVENT+0x1fc0000) - end - end - Duel.SpecialSummonComplete() - end -end -function c67949763.desfilter(c,rfid) - return c:GetFlagEffectLabel(67949764)==rfid -end -function c67949763.desop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c67949763.desfilter,tp,LOCATION_MZONE,0,nil,e:GetLabel()) - Duel.Destroy(g,REASON_EFFECT) - e:Reset() -end diff --git a/script/c67951831.lua b/script/c67951831.lua deleted file mode 100644 index f803dbac7d..0000000000 --- a/script/c67951831.lua +++ /dev/null @@ -1,37 +0,0 @@ ---ヒーローハート -function c67951831.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c67951831.target) - e1:SetOperation(c67951831.activate) - c:RegisterEffect(e1) -end -function c67951831.filter(c) - return c:IsFaceup() and c:IsSetCard(0x3008) -end -function c67951831.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c67951831.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c67951831.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c67951831.filter,tp,LOCATION_MZONE,0,1,1,nil) -end -function c67951831.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetValue(tc:GetAttack()/2) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_EXTRA_ATTACK) - e2:SetValue(1) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - tc:RegisterEffect(e2) - end -end diff --git a/script/c6795211.lua b/script/c6795211.lua deleted file mode 100644 index 7aa6d45308..0000000000 --- a/script/c6795211.lua +++ /dev/null @@ -1,47 +0,0 @@ ---アポート -function c6795211.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(6795211,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_SZONE) - e1:SetCondition(c6795211.condition) - e1:SetCost(c6795211.cost) - e1:SetTarget(c6795211.target) - e1:SetOperation(c6795211.operation) - c:RegisterEffect(e1) -end -function c6795211.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 - and Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)~=0 -end -function c6795211.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,800) end - Duel.PayLPCost(tp,800) -end -function c6795211.filter(c,e,sp) - return c:IsRace(RACE_PSYCHO) and c:IsCanBeSpecialSummoned(e,0,sp,false,false) -end -function c6795211.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c6795211.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c6795211.operation(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - if Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)>0 - or Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)==0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c6795211.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c67957315.lua b/script/c67957315.lua deleted file mode 100644 index edf2a3954a..0000000000 --- a/script/c67957315.lua +++ /dev/null @@ -1,40 +0,0 @@ ---スピリット・ドラゴン -function c67957315.initial_effect(c) - --atk up - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(67957315,0)) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetRange(LOCATION_MZONE) - e1:SetHintTiming(TIMING_BATTLE_PHASE) - e1:SetCondition(c67957315.adcon) - e1:SetCost(c67957315.adcost) - e1:SetOperation(c67957315.adop) - c:RegisterEffect(e1) -end -function c67957315.adcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp and Duel.GetCurrentPhase()==PHASE_BATTLE and Duel.GetCurrentChain()==0 - and (e:GetHandler()==Duel.GetAttacker() or e:GetHandler()==Duel.GetAttackTarget()) -end -function c67957315.cfilter(c) - return c:IsRace(RACE_DRAGON) and c:IsDiscardable() and c:IsAbleToGraveAsCost() -end -function c67957315.adcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c67957315.cfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,c67957315.cfilter,1,1,REASON_COST+REASON_DISCARD) -end -function c67957315.adop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(1000) - e1:SetReset(RESET_EVENT+0x1ff0000+RESET_PHASE+PHASE_BATTLE) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_UPDATE_DEFENCE) - c:RegisterEffect(e2) - end -end diff --git a/script/c67959180.lua b/script/c67959180.lua deleted file mode 100644 index 016f3fef53..0000000000 --- a/script/c67959180.lua +++ /dev/null @@ -1,34 +0,0 @@ ---きまぐれの女神 -function c67959180.initial_effect(c) - --dice - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(67959180,0)) - e1:SetCategory(CATEGORY_COIN) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetTarget(c67959180.target) - e1:SetOperation(c67959180.operation) - c:RegisterEffect(e1) -end -function c67959180.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_COIN,nil,0,tp,1) -end -function c67959180.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - local opt=Duel.SelectOption(tp,60,61) - local coin=Duel.TossCoin(tp,1) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetReset(RESET_EVENT+0x1ff0000+RESET_PHASE+PHASE_END) - if opt==coin then - e1:SetValue(c:GetAttack()/2) - else - e1:SetValue(c:GetAttack()*2) - end - c:RegisterEffect(e1) - end -end diff --git a/script/c67964209.lua b/script/c67964209.lua deleted file mode 100644 index e3c892e317..0000000000 --- a/script/c67964209.lua +++ /dev/null @@ -1,40 +0,0 @@ ---神竜アクアバザル -function c67964209.initial_effect(c) - --todeck - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(67964209,0)) - e1:SetCategory(CATEGORY_TODECK) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCost(c67964209.tdcost) - e1:SetTarget(c67964209.tdtg) - e1:SetOperation(c67964209.tdop) - c:RegisterEffect(e1) -end -function c67964209.cfilter(c) - return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_WATER) -end -function c67964209.tdcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,c67964209.cfilter,1,e:GetHandler()) end - local g=Duel.SelectReleaseGroup(tp,c67964209.cfilter,1,1,e:GetHandler()) - Duel.Release(g,REASON_COST) -end -function c67964209.filter(c) - local tpe=c:GetType() - return bit.band(tpe,TYPE_SPELL)~=0 and bit.band(tpe,TYPE_CONTINUOUS+TYPE_FIELD)~=0 and c:IsAbleToDeck() -end -function c67964209.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c67964209.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c67964209.filter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectTarget(tp,c67964209.filter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0) -end -function c67964209.tdop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoDeck(tc,nil,0,REASON_EFFECT) - end -end diff --git a/script/c67968069.lua b/script/c67968069.lua deleted file mode 100644 index 945d930694..0000000000 --- a/script/c67968069.lua +++ /dev/null @@ -1,30 +0,0 @@ ---ジャンク・パペット -function c67968069.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,67968069+EFFECT_COUNT_CODE_OATH) - e1:SetTarget(c67968069.target) - e1:SetOperation(c67968069.activate) - c:RegisterEffect(e1) -end -function c67968069.filter(c,e,tp) - return c:IsSetCard(0x83) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c67968069.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c67968069.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c67968069.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c67968069.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c67968069.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c67985943.lua b/script/c67985943.lua deleted file mode 100644 index 94d7b67f0f..0000000000 --- a/script/c67985943.lua +++ /dev/null @@ -1,32 +0,0 @@ ---ジェムナイト・マディラ -function c67985943.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcFun2(c,aux.FilterBoolFunction(Card.IsSetCard,0x1047),aux.FilterBoolFunction(Card.IsRace,RACE_PYRO),true) - --spsummon condition - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e2:SetCode(EFFECT_SPSUMMON_CONDITION) - e2:SetValue(c67985943.splimit) - c:RegisterEffect(e2) - --actlimit - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e3:SetCode(EFFECT_CANNOT_ACTIVATE) - e3:SetRange(LOCATION_MZONE) - e3:SetTargetRange(0,1) - e3:SetValue(c67985943.aclimit) - e3:SetCondition(c67985943.actcon) - c:RegisterEffect(e3) -end -function c67985943.splimit(e,se,sp,st) - return not e:GetHandler():IsLocation(LOCATION_EXTRA) or bit.band(st,SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION -end -function c67985943.aclimit(e,re,tp) - return not re:GetHandler():IsImmuneToEffect(e) -end -function c67985943.actcon(e) - return Duel.GetAttacker()==e:GetHandler() or Duel.GetAttackTarget()==e:GetHandler() -end diff --git a/script/c67987302.lua b/script/c67987302.lua deleted file mode 100644 index 283506189e..0000000000 --- a/script/c67987302.lua +++ /dev/null @@ -1,15 +0,0 @@ ---地縛大神官 -function c67987302.initial_effect(c) - --indes - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x21)) - e1:SetValue(c67987302.efilter) - c:RegisterEffect(e1) -end -function c67987302.efilter(e,re,rp,c) - return re:GetHandler()==c -end diff --git a/script/c67987611.lua b/script/c67987611.lua deleted file mode 100644 index 19d66f01f0..0000000000 --- a/script/c67987611.lua +++ /dev/null @@ -1,46 +0,0 @@ ---アマゾネスの弩弓隊 -function c67987611.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_POSITION) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetCondition(c67987611.condition) - e1:SetTarget(c67987611.target) - e1:SetOperation(c67987611.activate) - c:RegisterEffect(e1) -end -function c67987611.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x4) -end -function c67987611.condition(e,tp,eg,ep,ev,re,r,rp) - return tp~=Duel.GetTurnPlayer() and Duel.IsExistingMatchingCard(c67987611.cfilter,tp,LOCATION_MZONE,0,1,nil) -end -function c67987611.filter(c) - return not c:IsPosition(POS_FACEUP_ATTACK) -end -function c67987611.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local g=Duel.GetMatchingGroup(c67987611.filter,tp,0,LOCATION_MZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_POSITION,g,g:GetCount(),0,0) -end -function c67987611.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c67987611.filter,tp,0,LOCATION_MZONE,nil) - Duel.ChangePosition(g,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK,true) - local fg=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil) - local tc=fg:GetFirst() - while tc do - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(-500) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_MUST_ATTACK) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e2) - tc=fg:GetNext() - end -end diff --git a/script/c6799227.lua b/script/c6799227.lua deleted file mode 100644 index 02fbd86deb..0000000000 --- a/script/c6799227.lua +++ /dev/null @@ -1,35 +0,0 @@ ---ハーフ・カウンター -function c6799227.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_PRE_DAMAGE_CALCULATE) - e1:SetCondition(c6799227.condition) - e1:SetTarget(c6799227.target) - e1:SetOperation(c6799227.activate) - c:RegisterEffect(e1) -end -function c6799227.condition(e,tp,eg,ep,ev,re,r,rp) - local t=Duel.GetAttackTarget() - return t and t:IsControler(tp) -end -function c6799227.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local tg=Duel.GetAttackTarget() - if chkc then return chkc==tg end - if chk==0 then return Duel.GetAttacker():IsOnField() and tg:IsCanBeEffectTarget(e) end - Duel.SetTargetCard(tg) -end -function c6799227.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - local atk=Duel.GetAttacker():GetBaseAttack() - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e1:SetValue(atk/2) - tc:RegisterEffect(e1) - end -end diff --git a/script/c68005187.lua b/script/c68005187.lua deleted file mode 100644 index 46a37f491e..0000000000 --- a/script/c68005187.lua +++ /dev/null @@ -1,41 +0,0 @@ ---クロス・ソウル -function c68005187.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c68005187.cost) - e1:SetTarget(c68005187.target) - e1:SetOperation(c68005187.activate) - c:RegisterEffect(e1) -end -function c68005187.filter(c) - return not (c:IsHasEffect(EFFECT_UNRELEASABLE_SUM) and c:IsHasEffect(EFFECT_UNRELEASABLE_NONSUM)) -end -function c68005187.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetCurrentPhase()~=PHASE_MAIN2 end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_BP) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) - e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function c68005187.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c68005187.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c68005187.filter,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - Duel.SelectTarget(tp,c68005187.filter,tp,0,LOCATION_MZONE,1,1,nil) -end -function c68005187.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_EXTRA_RELEASE) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - end -end diff --git a/script/c68007326.lua b/script/c68007326.lua deleted file mode 100644 index f8d785f14a..0000000000 --- a/script/c68007326.lua +++ /dev/null @@ -1,33 +0,0 @@ ---守護天使 ジャンヌ -function c68007326.initial_effect(c) - --recover - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(68007326,0)) - e1:SetCategory(CATEGORY_RECOVER) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_BATTLE_DESTROYING) - e1:SetCondition(c68007326.reccon) - e1:SetTarget(c68007326.rectg) - e1:SetOperation(c68007326.recop) - c:RegisterEffect(e1) -end -function c68007326.reccon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local bc=c:GetBattleTarget() - return c:IsRelateToBattle() and bc:IsLocation(LOCATION_GRAVE) -end -function c68007326.rectg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local c=e:GetHandler() - local bc=c:GetBattleTarget() - local rec=bc:GetBaseAttack() - if rec<0 then rec=0 end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(rec) - Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,rec) -end -function c68007326.recop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Recover(p,d,REASON_EFFECT) -end diff --git a/script/c68018709.lua b/script/c68018709.lua deleted file mode 100644 index 9b8d77350f..0000000000 --- a/script/c68018709.lua +++ /dev/null @@ -1,11 +0,0 @@ ---失楽の聖女 -function c68018709.initial_effect(c) - --act qp in hand - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_QP_ACT_IN_NTPHAND) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(LOCATION_HAND,0) - e1:SetCountLimit(1,68018709+EFFECT_COUNT_CODE_DUEL) - c:RegisterEffect(e1) -end diff --git a/script/c68054593.lua b/script/c68054593.lua deleted file mode 100644 index 8e41b93e4e..0000000000 --- a/script/c68054593.lua +++ /dev/null @@ -1,65 +0,0 @@ ---燃える闘志 -function c68054593.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCondition(c68054593.condition) - e1:SetTarget(c68054593.target) - e1:SetOperation(c68054593.operation) - c:RegisterEffect(e1) -end -function c68054593.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end -function c68054593.filter(c) - return c:IsFaceup() -end -function c68054593.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c68054593.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c68054593.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local g=Duel.SelectTarget(tp,c68054593.filter,tp,LOCATION_MZONE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c68054593.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsLocation(LOCATION_SZONE) then return end - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,c,tc) - c:CancelToGrave() - --Atkup - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_EQUIP) - e1:SetCode(EFFECT_SET_ATTACK) - e1:SetCondition(c68054593.atkcon) - e1:SetValue(c68054593.atkval) - e1:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e1) - --Equip limit - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_EQUIP_LIMIT) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetValue(c68054593.eqlimit) - e2:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e2) - end -end -function c68054593.eqlimit(e,c) - return c:GetControler()==e:GetOwnerPlayer() -end -function c68054593.atkfilter(c) - return c:IsFaceup() and c:GetAttack()>c:GetBaseAttack() -end -function c68054593.atkcon(e) - return (Duel.GetCurrentPhase()==PHASE_DAMAGE or Duel.GetCurrentPhase()==PHASE_DAMAGE_CAL) - and Duel.IsExistingMatchingCard(c68054593.atkfilter,e:GetHandlerPlayer(),0,LOCATION_MZONE,1,nil) -end -function c68054593.atkval(e,c) - return c:GetBaseAttack()*2 -end diff --git a/script/c68057622.lua b/script/c68057622.lua deleted file mode 100644 index c17adba6fb..0000000000 --- a/script/c68057622.lua +++ /dev/null @@ -1,25 +0,0 @@ ---カウンターマシンガンパンチ -function c68057622.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_DAMAGE_STEP_END) - e2:SetRange(LOCATION_SZONE) - e2:SetCondition(c68057622.descon) - e2:SetOperation(c68057622.desop) - c:RegisterEffect(e2) -end -function c68057622.descon(e,tp,eg,ep,ev,re,r,rp) - local a=Duel.GetAttacker() - local at=Duel.GetAttackTarget() - return at and a:IsControler(1-tp) and a:IsRelateToBattle() - and at:IsDefencePos() and at:IsRelateToBattle() and a:GetAttack()0 - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.ConfirmCards(1-tp,c) - Duel.ShuffleHand(tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0) -end -function c68120130.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) - end -end -function c68120130.defcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end -function c68120130.defup(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_DEFENCE) - e1:SetValue(300) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - c:RegisterEffect(e1) -end diff --git a/script/c68124775.lua b/script/c68124775.lua deleted file mode 100644 index 8141ccfedf..0000000000 --- a/script/c68124775.lua +++ /dev/null @@ -1,36 +0,0 @@ ---オリエント・ドラゴン -function c68124775.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1) - c:EnableReviveLimit() - --remove - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(68124775,0)) - e1:SetCategory(CATEGORY_REMOVE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(c68124775.condition) - e1:SetTarget(c68124775.target) - e1:SetOperation(c68124775.operation) - c:RegisterEffect(e1) -end -function c68124775.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_SYNCHRO -end -function c68124775.filter(c) - return c:IsFaceup() and c:IsType(TYPE_SYNCHRO) and c:IsAbleToRemove() -end -function c68124775.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and c68124775.filter(chkc) end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,c68124775.filter,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,0) -end -function c68124775.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) then - Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) - end -end diff --git a/script/c68140974.lua b/script/c68140974.lua deleted file mode 100644 index 7885c5b37e..0000000000 --- a/script/c68140974.lua +++ /dev/null @@ -1,134 +0,0 @@ ---機皇帝ワイゼル∞ -function c68140974.initial_effect(c) - c:EnableReviveLimit() - --special summon condition - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(0) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(68140974,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetRange(LOCATION_HAND) - e2:SetCondition(c68140974.spcon) - e2:SetTarget(c68140974.sptg) - e2:SetOperation(c68140974.spop) - c:RegisterEffect(e2) - --cannot attack announce - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetRange(LOCATION_MZONE) - e3:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE) - e3:SetTargetRange(LOCATION_MZONE,0) - e3:SetTarget(c68140974.antarget) - c:RegisterEffect(e3) - --equip - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(68140974,1)) - e4:SetCategory(CATEGORY_EQUIP) - e4:SetType(EFFECT_TYPE_IGNITION) - e4:SetProperty(EFFECT_FLAG_CARD_TARGET) - e4:SetRange(LOCATION_MZONE) - e4:SetCountLimit(1) - e4:SetTarget(c68140974.eqtg) - e4:SetOperation(c68140974.eqop) - c:RegisterEffect(e4) - --negate spell - local e5=Effect.CreateEffect(c) - e5:SetDescription(aux.Stringid(68140974,2)) - e5:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) - e5:SetType(EFFECT_TYPE_QUICK_O) - e5:SetCode(EVENT_CHAINING) - e5:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) - e5:SetRange(LOCATION_MZONE) - e5:SetCountLimit(1) - e5:SetCondition(c68140974.negcon) - e5:SetTarget(c68140974.negtg) - e5:SetOperation(c68140974.negop) - c:RegisterEffect(e5) -end -function c68140974.filter(c,tp) - return c:IsType(TYPE_MONSTER) and bit.band(c:GetReason(),0x41)==0x41 and c:GetPreviousControler()==tp - and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP) -end -function c68140974.spcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c68140974.filter,1,nil,tp) -end -function c68140974.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,true) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c68140974.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,true,true,POS_FACEUP)>0 then - c:CompleteProcedure() - end -end -function c68140974.antarget(e,c) - return c~=e:GetHandler() -end -function c68140974.eqfilter(c) - return c:IsFaceup() and c:IsType(TYPE_SYNCHRO) and c:IsAbleToChangeControler() -end -function c68140974.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c68140974.eqfilter(chkc) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingTarget(c68140974.eqfilter,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local g=Duel.SelectTarget(tp,c68140974.eqfilter,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0) -end -function c68140974.eqlimit(e,c) - return e:GetOwner()==c -end -function c68140974.eqop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) and tc:IsType(TYPE_MONSTER) then - if c:IsFaceup() and c:IsRelateToEffect(e) then - local atk=tc:GetTextAttack() - if atk<0 then atk=0 end - if not Duel.Equip(tp,tc,c,false) then return end - --Add Equip limit - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_COPY_INHERIT+EFFECT_FLAG_OWNER_RELATE) - e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(c68140974.eqlimit) - tc:RegisterEffect(e1) - if atk>0 then - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_OWNER_RELATE) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetReset(RESET_EVENT+0x1fe0000) - e2:SetValue(atk) - tc:RegisterEffect(e2) - end - else Duel.SendtoGrave(tc,REASON_EFFECT) end - end -end -function c68140974.negcon(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) then return false end - return ep~=tp and re:IsActiveType(TYPE_SPELL) and re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev) -end -function c68140974.negtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) - end -end -function c68140974.negop(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateActivation(ev) - if re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(eg,REASON_EFFECT) - end -end diff --git a/script/c68144350.lua b/script/c68144350.lua deleted file mode 100644 index 45fa272643..0000000000 --- a/script/c68144350.lua +++ /dev/null @@ -1,50 +0,0 @@ ---BK スイッチヒッター -function c68144350.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(68144350,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetCost(c68144350.spcost) - e1:SetTarget(c68144350.sptg) - e1:SetOperation(c68144350.spop) - c:RegisterEffect(e1) - Duel.AddCustomActivityCounter(68144350,ACTIVITY_SPSUMMON,c68144350.counterfilter) -end -function c68144350.counterfilter(c) - return c:IsSetCard(0x84) -end -function c68144350.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetCustomActivityCount(68144350,tp,ACTIVITY_SPSUMMON)==0 end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) - e1:SetTargetRange(1,0) - e1:SetTarget(c68144350.splimit) - e1:SetLabelObject(e) - Duel.RegisterEffect(e1,tp) -end -function c68144350.splimit(e,c,sump,sumtype,sumpos,targetp,se) - return not c:IsSetCard(0x84) -end -function c68144350.filter(c,e,tp) - return c:IsSetCard(0x84) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c68144350.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c68144350.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and - Duel.IsExistingTarget(c68144350.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c68144350.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c68144350.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c68167124.lua b/script/c68167124.lua deleted file mode 100644 index a3b4d1422b..0000000000 --- a/script/c68167124.lua +++ /dev/null @@ -1,28 +0,0 @@ ---針剣士 -function c68167124.initial_effect(c) - --return - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(68167124,0)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_BATTLE_DAMAGE) - e1:SetCondition(c68167124.condition) - e1:SetTarget(c68167124.target) - e1:SetOperation(c68167124.operation) - c:RegisterEffect(e1) -end -function c68167124.condition(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp -end -function c68167124.filter(c) - return c:IsFaceup() and c:GetSequence()<5 -end -function c68167124.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local g=Duel.GetMatchingGroup(c68167124.filter,tp,0,LOCATION_SZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0) -end -function c68167124.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c68167124.filter,tp,0,LOCATION_SZONE,nil) - Duel.SendtoHand(g,nil,REASON_EFFECT) -end diff --git a/script/c68170903.lua b/script/c68170903.lua deleted file mode 100644 index 0d2ed3f68e..0000000000 --- a/script/c68170903.lua +++ /dev/null @@ -1,22 +0,0 @@ ---陽動作戦 -function c68170903.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_BATTLE_START) - e1:SetOperation(c68170903.activate) - c:RegisterEffect(e1) -end -function c68170903.activate(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET) - e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e1:SetValue(c68170903.atlimit) - e1:SetReset(RESET_PHASE+PHASE_END,1) - Duel.RegisterEffect(e1,tp) -end -function c68170903.atlimit(e,c) - return c:IsFacedown() -end diff --git a/script/c68182934.lua b/script/c68182934.lua deleted file mode 100644 index 0b88ccf50d..0000000000 --- a/script/c68182934.lua +++ /dev/null @@ -1,40 +0,0 @@ ---Sky Dragoons of Draconia -function c68182934.initial_effect(c) - --pendulum summon - aux.AddPendulumProcedure(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_BATTLE_DAMAGE) - e2:SetRange(LOCATION_PZONE) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCountLimit(1) - e2:SetCondition(c68182934.descon) - e2:SetTarget(c68182934.destg) - e2:SetOperation(c68182934.desop) - c:RegisterEffect(e2) -end -function c68182934.descon(e,tp,eg,ep,ev,re,r,rp) - local tc=eg:GetFirst() - return ep~=tp and tc:IsControler(tp) and tc:IsType(TYPE_NORMAL) -end -function c68182934.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsDestructable() end - if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c68182934.desop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c68184115.lua b/script/c68184115.lua deleted file mode 100644 index 686ca6f332..0000000000 --- a/script/c68184115.lua +++ /dev/null @@ -1,81 +0,0 @@ ---甲虫装機 ダンセル -function c68184115.initial_effect(c) - --equip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(68184115,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetTarget(c68184115.eqtg) - e1:SetOperation(c68184115.eqop) - c:RegisterEffect(e1) - --equip effect - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_UPDATE_LEVEL) - e2:SetValue(3) - c:RegisterEffect(e2) - --special summon - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(68184115,1)) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_LEAVE_FIELD) - e3:SetProperty(EFFECT_FLAG_DELAY) - e3:SetRange(LOCATION_MZONE) - e3:SetCondition(c68184115.spcon) - e3:SetTarget(c68184115.sptg) - e3:SetOperation(c68184115.spop) - c:RegisterEffect(e3) -end -function c68184115.filter(c) - return c:IsSetCard(0x56) and c:IsType(TYPE_MONSTER) and not c:IsHasEffect(EFFECT_NECRO_VALLEY) -end -function c68184115.eqtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingMatchingCard(c68184115.filter,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,nil,1,tp,LOCATION_GRAVE+LOCATION_HAND) -end -function c68184115.eqop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end - if c:IsFacedown() or not c:IsRelateToEffect(e) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local g=Duel.SelectMatchingCard(tp,c68184115.filter,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,1,nil) - local tc=g:GetFirst() - if tc then - if not Duel.Equip(tp,tc,c,true) then return end - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_COPY_INHERIT+EFFECT_FLAG_OWNER_RELATE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(c68184115.eqlimit) - tc:RegisterEffect(e1) - end -end -function c68184115.eqlimit(e,c) - return e:GetOwner()==c -end -function c68184115.cfilter(c,ec,tp) - return c:IsLocation(LOCATION_GRAVE) and c:IsControler(tp) and c:GetEquipTarget()==ec -end -function c68184115.spcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c68184115.cfilter,1,nil,e:GetHandler(),tp) -end -function c68184115.spfilter(c,e,tp) - return c:IsSetCard(0x56) and c:GetCode()~=68184115 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c68184115.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsRelateToEffect(e) and e:GetHandler():IsFaceup() - and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c68184115.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c68184115.spop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c68184115.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c68191243.lua b/script/c68191243.lua deleted file mode 100644 index 7fb2dd8b4f..0000000000 --- a/script/c68191243.lua +++ /dev/null @@ -1,41 +0,0 @@ ---黒蠍団召集 -function c68191243.initial_effect(c) - --activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c68191243.con) - e1:SetTarget(c68191243.tg) - e1:SetOperation(c68191243.op) - c:RegisterEffect(e1) -end -function c68191243.cfilter(c) - return c:IsFaceup() and c:IsCode(76922029) -end -function c68191243.con(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c68191243.cfilter,tp,LOCATION_ONFIELD,0,1,nil) -end -function c68191243.filter(c,e,tp) - return c:IsSetCard(0x1a) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c68191243.tg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c68191243.filter,tp,LOCATION_HAND,0,1,nil,e,tp) - end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c68191243.op(e,tp,eg,ep,ev,re,r,rp) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ft<=0 then return end - local g=Duel.GetMatchingGroup(c68191243.filter,tp,LOCATION_HAND,0,nil,e,tp) - while g:GetCount()>0 and ft>0 do - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=g:Select(tp,1,1,nil) - Duel.SpecialSummonStep(sg:GetFirst(),0,tp,tp,false,false,POS_FACEUP) - ft=ft-1 - g:Remove(Card.IsCode,nil,sg:GetFirst():GetCode()) - if g:GetCount()>0 and ft>0 and not Duel.SelectYesNo(tp,aux.Stringid(68191243,0)) then ft=0 end - end - Duel.SpecialSummonComplete() -end diff --git a/script/c68215963.lua b/script/c68215963.lua deleted file mode 100644 index a726327cdb..0000000000 --- a/script/c68215963.lua +++ /dev/null @@ -1,53 +0,0 @@ ---宝玉獣 エメラルド・タートル -function c68215963.initial_effect(c) - --send replace - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_TO_GRAVE_REDIRECT_CB) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetCondition(c68215963.repcon) - e1:SetOperation(c68215963.repop) - c:RegisterEffect(e1) - --change pos - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(68215963,1)) - e2:SetCategory(CATEGORY_POSITION) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetTarget(c68215963.target) - e2:SetOperation(c68215963.operation) - c:RegisterEffect(e2) -end -function c68215963.repcon(e) - local c=e:GetHandler() - return c:IsFaceup() and c:IsLocation(LOCATION_MZONE) and c:IsReason(REASON_DESTROY) -end -function c68215963.repop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local e1=Effect.CreateEffect(c) - e1:SetCode(EFFECT_CHANGE_TYPE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fc0000) - e1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS) - c:RegisterEffect(e1) - Duel.RaiseEvent(c,47408488,e,0,tp,0,0) -end -function c68215963.filter(c) - return c:IsAttackPos() and c:GetAttackedCount()>0 -end -function c68215963.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c68215963.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c68215963.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE) - local g=Duel.SelectTarget(tp,c68215963.filter,tp,LOCATION_MZONE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0) -end -function c68215963.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.ChangePosition(tc,POS_FACEUP_DEFENCE,POS_FACEDOWN_DEFENCE,0,0) - end -end diff --git a/script/c68226653.lua b/script/c68226653.lua deleted file mode 100644 index 990a930e5f..0000000000 --- a/script/c68226653.lua +++ /dev/null @@ -1,63 +0,0 @@ ---フレムベル・ドラグノフ -function c68226653.initial_effect(c) - --damage - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(68226653,0)) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetCondition(c68226653.damcon) - e1:SetTarget(c68226653.damtg) - e1:SetOperation(c68226653.damop) - c:RegisterEffect(e1) - --search - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(68226653,1)) - e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_GRAVE) - e2:SetCost(c68226653.thcost) - e2:SetTarget(c68226653.thtg) - e2:SetOperation(c68226653.thop) - c:RegisterEffect(e2) -end -function c68226653.damcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsLocation(LOCATION_GRAVE) - and e:GetHandler():IsReason(REASON_BATTLE) -end -function c68226653.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(500) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,500) -end -function c68226653.damop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end -function c68226653.cfilter(c) - return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_FIRE) and c:IsAbleToRemoveAsCost() -end -function c68226653.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() - and Duel.IsExistingMatchingCard(c68226653.cfilter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c68226653.cfilter,tp,LOCATION_MZONE,0,1,1,nil) - g:AddCard(e:GetHandler()) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c68226653.filter(c) - return c:IsCode(68226653) and c:IsAbleToHand() -end -function c68226653.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c68226653.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c68226653.thop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstMatchingCard(c68226653.filter,tp,LOCATION_DECK,0,nil) - if tc then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end diff --git a/script/c68280530.lua b/script/c68280530.lua deleted file mode 100644 index 7081449d67..0000000000 --- a/script/c68280530.lua +++ /dev/null @@ -1,33 +0,0 @@ ---ロイヤルナイツ -function c68280530.initial_effect(c) - --recover - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(68280530,0)) - e1:SetCategory(CATEGORY_RECOVER) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_BATTLE_DESTROYING) - e1:SetCondition(c68280530.reccon) - e1:SetTarget(c68280530.rectg) - e1:SetOperation(c68280530.recop) - c:RegisterEffect(e1) -end -function c68280530.reccon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local bc=c:GetBattleTarget() - return c:IsRelateToBattle() and bc:IsLocation(LOCATION_GRAVE) and bc:IsType(TYPE_MONSTER) -end -function c68280530.rectg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local c=e:GetHandler() - local bc=c:GetBattleTarget() - local rec=bc:GetDefence() - if rec<0 then rec=0 end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(rec) - Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,rec) -end -function c68280530.recop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Recover(p,d,REASON_EFFECT) -end diff --git a/script/c68304813.lua b/script/c68304813.lua deleted file mode 100644 index 235e4d1633..0000000000 --- a/script/c68304813.lua +++ /dev/null @@ -1,37 +0,0 @@ ---冥界の宝札 -function c68304813.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --draw - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(68304813,0)) - e2:SetCategory(CATEGORY_DRAW) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_SUMMON_SUCCESS) - e2:SetRange(LOCATION_SZONE) - e2:SetCondition(c68304813.condition) - e2:SetTarget(c68304813.target) - e2:SetOperation(c68304813.operation) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EVENT_MSET) - c:RegisterEffect(e3) -end -function c68304813.condition(e,tp,eg,ep,ev,re,r,rp) - local tc=eg:GetFirst() - return bit.band(tc:GetSummonType(),SUMMON_TYPE_ADVANCE)==SUMMON_TYPE_ADVANCE and tc:GetMaterialCount()>=2 and tc:GetSummonPlayer()==tp -end -function c68304813.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(2) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2) -end -function c68304813.operation(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end diff --git a/script/c68319538.lua b/script/c68319538.lua deleted file mode 100644 index 4a68a215f6..0000000000 --- a/script/c68319538.lua +++ /dev/null @@ -1,69 +0,0 @@ ---宇宙砦ゴルガー -function c68319538.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsCode,652362),aux.NonTuner(Card.IsSetCard,0xc),1) - c:EnableReviveLimit() - --to hand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(68319538,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_COUNTER) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetCountLimit(1) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetTarget(c68319538.target) - e1:SetOperation(c68319538.operation) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(68319538,1)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCost(c68319538.descost) - e2:SetTarget(c68319538.destg) - e2:SetOperation(c68319538.desop) - c:RegisterEffect(e2) -end -function c68319538.filter(c) - return c:IsFaceup() and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand() -end -function c68319538.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and c68319538.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c68319538.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local eg=Duel.SelectTarget(tp,c68319538.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,11,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,eg,eg:GetCount(),0,0) -end -function c68319538.operation(e,tp,eg,ep,ev,re,r,rp) - local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local rg=tg:Filter(Card.IsRelateToEffect,nil,e) - local ct=Duel.SendtoHand(rg,nil,REASON_EFFECT) - if ct==0 then return end - local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - if g:GetCount()==0 then return end - for i=1,ct do - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(68319538,2)) - local sg=g:Select(tp,1,1,nil) - sg:GetFirst():AddCounter(0xe,1) - end -end -function c68319538.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsCanRemoveCounter(tp,1,1,0xe,2,REASON_COST) end - Duel.RemoveCounter(tp,1,1,0xe,2,REASON_COST) -end -function c68319538.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and chkc:IsDestructable() end - if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,0,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,0,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c68319538.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c68334074.lua b/script/c68334074.lua deleted file mode 100644 index 7baa803158..0000000000 --- a/script/c68334074.lua +++ /dev/null @@ -1,36 +0,0 @@ ---奇跡の復活 -function c68334074.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_END_PHASE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCost(c68334074.cost) - e1:SetTarget(c68334074.target) - e1:SetOperation(c68334074.activate) - c:RegisterEffect(e1) -end -function c68334074.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsCanRemoveCounter(tp,1,0,0x3001,2,REASON_COST) end - Duel.RemoveCounter(tp,1,0,0x3001,2,REASON_COST) -end -function c68334074.filter(c,e,tp) - local code=c:GetCode() - return (code==46986414 or code==78193831) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c68334074.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c68334074.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c68334074.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c68334074.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,g:GetCount(),0,0) -end -function c68334074.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c6836211.lua b/script/c6836211.lua deleted file mode 100644 index 7cbc056662..0000000000 --- a/script/c6836211.lua +++ /dev/null @@ -1,35 +0,0 @@ ---大皇帝ペンギン -function c6836211.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(6836211,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c6836211.spcost) - e1:SetTarget(c6836211.sptg) - e1:SetOperation(c6836211.spop) - c:RegisterEffect(e1) -end -function c6836211.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end -function c6836211.filter(c,e,tp) - return c:IsSetCard(0x5a) and not c:IsCode(6836211) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c6836211.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsExistingMatchingCard(c6836211.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c6836211.spop(e,tp,eg,ep,ev,re,r,rp) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ft<=0 then return end - if ft>2 then ft=2 end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c6836211.filter,tp,LOCATION_DECK,0,1,ft,nil,e,tp) - if g:GetCount()~=0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c68366996.lua b/script/c68366996.lua deleted file mode 100644 index 51dbd01250..0000000000 --- a/script/c68366996.lua +++ /dev/null @@ -1,43 +0,0 @@ ---デュアル・ソルジャー -function c68366996.initial_effect(c) - aux.EnableDualAttribute(c) - --battle indes - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_INDESTRUCTABLE_COUNT) - e1:SetCondition(aux.IsDualState) - e1:SetCountLimit(1) - e1:SetValue(c68366996.valcon) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(68366996,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_BATTLED) - e2:SetCondition(aux.IsDualState) - e2:SetTarget(c68366996.target) - e2:SetOperation(c68366996.operation) - c:RegisterEffect(e2) -end -function c68366996.valcon(e,re,r,rp) - return bit.band(r,REASON_BATTLE)~=0 -end -function c68366996.filter(c,e,tp) - return not c:IsCode(68366996) and c:IsLevelBelow(4) and c:IsType(TYPE_DUAL) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c68366996.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c68366996.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c68366996.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c68366996.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c68371799.lua b/script/c68371799.lua deleted file mode 100644 index 33b589fdc7..0000000000 --- a/script/c68371799.lua +++ /dev/null @@ -1,93 +0,0 @@ ---デーモンの将星 -function c68371799.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(1,68371799) - e1:SetCondition(c68371799.spcon) - e1:SetOperation(c68371799.spop) - e1:SetValue(1) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(68371799,0)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetCondition(c68371799.descon) - e2:SetTarget(c68371799.destg) - e2:SetOperation(c68371799.desop) - c:RegisterEffect(e2) - --spsummon - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(68371799,1)) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_SUMMON_SUCCESS) - e3:SetCondition(c68371799.spcon2) - e3:SetTarget(c68371799.sptg2) - e3:SetOperation(c68371799.spop2) - c:RegisterEffect(e3) -end -function c68371799.filter(c) - return c:IsFaceup() and c:IsSetCard(0x45) -end -function c68371799.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c68371799.filter,tp,LOCATION_ONFIELD,0,1,nil) -end -function c68371799.spop(e,tp,eg,ep,ev,re,r,rp,c) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_OATH) - e1:SetReset(RESET_EVENT+0xfe0000+RESET_PHASE+PHASE_END) - c:RegisterEffect(e1) -end -function c68371799.descon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+1 -end -function c68371799.desfilter(c) - return c:IsFaceup() and c:IsSetCard(0x45) and c:IsDestructable() -end -function c68371799.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsOnField() and c68371799.desfilter(chkc) end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c68371799.desfilter,tp,LOCATION_ONFIELD,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c68371799.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end -function c68371799.spcon2(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_ADVANCE -end -function c68371799.spfilter(c,e,tp) - return c:GetLevel()==6 and c:IsSetCard(0x45) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c68371799.sptg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c68371799.spfilter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c68371799.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c68371799.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,g:GetCount(),0,0) -end -function c68371799.spop2(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENCE) - end -end diff --git a/script/c68392533.lua b/script/c68392533.lua deleted file mode 100644 index 909dc60f00..0000000000 --- a/script/c68392533.lua +++ /dev/null @@ -1,85 +0,0 @@ ---念動増幅装置 -function c68392533.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c68392533.target) - e1:SetOperation(c68392533.operation) - c:RegisterEffect(e1) - --Cost Change - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_LPCOST_CHANGE) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(1,1) - e2:SetValue(c68392533.costchange) - c:RegisterEffect(e2) - --Equip limit - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_EQUIP_LIMIT) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e3:SetValue(c68392533.eqlimit) - c:RegisterEffect(e3) - --tohand - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(68392533,0)) - e4:SetCategory(CATEGORY_TOHAND) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e4:SetCode(EVENT_TO_GRAVE) - e4:SetCondition(c68392533.thcon) - e4:SetCost(c68392533.thcost) - e4:SetTarget(c68392533.thtg) - e4:SetOperation(c68392533.thop) - c:RegisterEffect(e4) -end -function c68392533.eqlimit(e,c) - return c:IsRace(RACE_PSYCHO) -end -function c68392533.filter(c) - return c:IsFaceup() and c:IsRace(RACE_PSYCHO) -end -function c68392533.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c68392533.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c68392533.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c68392533.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c68392533.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,c,tc) - end -end -function c68392533.costchange(e,re,rp,val) - if re:GetHandler()==e:GetHandler():GetEquipTarget() then - return 0 - else return val end -end -function c68392533.thcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local ec=c:GetPreviousEquipTarget() - return c:IsReason(REASON_LOST_TARGET) and ec and ec:IsReason(REASON_DESTROY) -end -function c68392533.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,1000) end - Duel.PayLPCost(tp,1000) -end -function c68392533.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToHand() end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0) -end -function c68392533.thop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SendtoHand(c,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,c) - end -end diff --git a/script/c68395509.lua b/script/c68395509.lua deleted file mode 100644 index 94eca286c4..0000000000 --- a/script/c68395509.lua +++ /dev/null @@ -1,57 +0,0 @@ ---マジェスペクター・クロウ -function c68395509.initial_effect(c) - --pendulum summon - aux.AddPendulumProcedure(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --search - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_SUMMON_SUCCESS) - e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e2:SetCountLimit(1,68395509) - e2:SetTarget(c68395509.thtg) - e2:SetOperation(c68395509.thop) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e3) - --cannot target - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e4:SetRange(LOCATION_MZONE) - e4:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) - e4:SetValue(aux.tgoval) - c:RegisterEffect(e4) - --indes - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_SINGLE) - e5:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e5:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - e5:SetRange(LOCATION_MZONE) - e5:SetValue(c68395509.indval) - c:RegisterEffect(e5) -end -function c68395509.thfilter(c) - return c:IsSetCard(0xd0) and c:IsType(TYPE_SPELL) and c:IsAbleToHand() -end -function c68395509.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c68395509.thfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c68395509.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c68395509.thfilter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end -function c68395509.indval(e,re,tp) - return tp~=e:GetHandlerPlayer() -end diff --git a/script/c68396121.lua b/script/c68396121.lua deleted file mode 100644 index 6db35540b3..0000000000 --- a/script/c68396121.lua +++ /dev/null @@ -1,101 +0,0 @@ ---CNo.107 超銀河眼の時空龍 -function c68396121.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,9,3) - c:EnableReviveLimit() - --negate - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(68396121,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCost(c68396121.negcost) - e1:SetOperation(c68396121.negop) - c:RegisterEffect(e1) - --atk - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(68396121,1)) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCondition(c68396121.atkcon) - e2:SetCost(c68396121.atkcost) - e2:SetTarget(c68396121.atktg) - e2:SetOperation(c68396121.atkop) - c:RegisterEffect(e2) -end -c68396121.xyz_number=107 -function c68396121.negcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c68396121.filter(c) - return c:IsFaceup() and (c:IsLocation(LOCATION_SZONE) or c:IsType(TYPE_EFFECT)) and not c:IsDisabled() -end -function c68396121.negop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local g=Duel.GetMatchingGroup(c68396121.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,c) - local tc=g:GetFirst() - while tc do - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e2) - tc=g:GetNext() - end - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetTargetRange(0,1) - e1:SetValue(c68396121.aclimit) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function c68396121.aclimit(e,re,tp) - return re:GetHandler():IsOnField() and not re:GetHandler():IsImmuneToEffect(e) -end -function c68396121.atkcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsAbleToEnterBP() - and e:GetHandler():GetOverlayGroup():IsExists(Card.IsCode,1,nil,88177324) -end -function c68396121.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,nil,2,e:GetHandler()) end - local g=Duel.SelectReleaseGroup(tp,nil,2,2,e:GetHandler()) - Duel.Release(g,REASON_COST) -end -function c68396121.atktg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():GetEffectCount(EFFECT_EXTRA_ATTACK)==0 end -end -function c68396121.atkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_EXTRA_ATTACK) - e1:SetValue(2) - e1:SetReset(RESET_EVENT+0x1ff0000+RESET_PHASE+PHASE_END) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_CANNOT_DIRECT_ATTACK) - e2:SetReset(RESET_EVENT+0x1ff0000+RESET_PHASE+RESET_END) - e2:SetCondition(c68396121.dircon) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EFFECT_CANNOT_ATTACK) - e3:SetCondition(c68396121.dircon2) - c:RegisterEffect(e3) - end -end -function c68396121.dircon(e) - return e:GetHandler():GetAttackAnnouncedCount()>0 -end -function c68396121.dircon2(e) - return e:GetHandler():IsDirectAttacked() -end diff --git a/script/c68396778.lua b/script/c68396778.lua deleted file mode 100644 index c9228bbe80..0000000000 --- a/script/c68396778.lua +++ /dev/null @@ -1,42 +0,0 @@ ---悪魔への貢物 -function c68396778.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c68396778.target) - e1:SetOperation(c68396778.activate) - c:RegisterEffect(e1) -end -function c68396778.filter(c) - return bit.band(c:GetSummonType(),SUMMON_TYPE_SPECIAL)==SUMMON_TYPE_SPECIAL -end -function c68396778.spfilter(c,e,tp) - return c:IsLevelBelow(4) and c:IsType(TYPE_NORMAL) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c68396778.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c68396778.filter(chkc) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c68396778.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) - and Duel.IsExistingMatchingCard(c68396778.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectTarget(tp,c68396778.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c68396778.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoGrave(tc,REASON_EFFECT) - if tc:IsLocation(LOCATION_GRAVE) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then - Duel.BreakEffect() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c68396778.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end - end - end -end diff --git a/script/c68400115.lua b/script/c68400115.lua deleted file mode 100644 index 4db433acf2..0000000000 --- a/script/c68400115.lua +++ /dev/null @@ -1,33 +0,0 @@ ---裸の王様 -function c68400115.initial_effect(c) - --activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_END_PHASE) - c:RegisterEffect(e1) - --disable - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_DISABLE) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(LOCATION_SZONE,LOCATION_SZONE) - e2:SetTarget(c68400115.distarget) - c:RegisterEffect(e2) - --disable effect - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e3:SetCode(EVENT_CHAIN_SOLVING) - e3:SetRange(LOCATION_SZONE) - e3:SetOperation(c68400115.disop) - c:RegisterEffect(e3) -end -function c68400115.distarget(e,c) - return c~=e:GetHandler() and c:IsType(TYPE_EQUIP) -end -function c68400115.disop(e,tp,eg,ep,ev,re,r,rp) - local tl=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION) - if tl==LOCATION_SZONE and re:IsActiveType(TYPE_EQUIP) and re:GetHandler()~=e:GetHandler() then - Duel.NegateEffect(ev) - end -end diff --git a/script/c6840573.lua b/script/c6840573.lua deleted file mode 100644 index f343f94d4d..0000000000 --- a/script/c6840573.lua +++ /dev/null @@ -1,6 +0,0 @@ ---バロックス -function c6840573.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcCode2(c,98818516,15303296,true,true) -end diff --git a/script/c68427465.lua b/script/c68427465.lua deleted file mode 100644 index d2aeccdf50..0000000000 --- a/script/c68427465.lua +++ /dev/null @@ -1,67 +0,0 @@ ---破邪の大剣-バオウ -function c68427465.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCost(c68427465.cost) - e1:SetTarget(c68427465.target) - e1:SetOperation(c68427465.operation) - c:RegisterEffect(e1) - --Atkup - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(500) - c:RegisterEffect(e2) - --Equip limit - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_EQUIP_LIMIT) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e3:SetValue(1) - c:RegisterEffect(e3) - --negate - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e4:SetCode(EVENT_BATTLED) - e4:SetRange(LOCATION_SZONE) - e4:SetOperation(c68427465.negop) - c:RegisterEffect(e4) -end -function c68427465.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,Card.IsAbleToGraveAsCost,1,1,REASON_COST) -end -function c68427465.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c68427465.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,e:GetHandler(),tc) - end -end -function c68427465.negop(e,tp,eg,ep,ev,re,r,rp) - local ec=e:GetHandler():GetEquipTarget() - if not ec:IsRelateToBattle() then return end - local bc=ec:GetBattleTarget() - if bc and bc:IsType(TYPE_EFFECT) and bc:IsStatus(STATUS_BATTLE_DESTROYED) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0x17a0000) - bc:RegisterEffect(e1) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+0x17a0000) - bc:RegisterEffect(e2) - end -end diff --git a/script/c68450517.lua b/script/c68450517.lua deleted file mode 100644 index 8df16c118d..0000000000 --- a/script/c68450517.lua +++ /dev/null @@ -1,42 +0,0 @@ ---A・ジェネクス・ドゥルダーク -function c68450517.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(68450517,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCost(c68450517.descost) - e1:SetTarget(c68450517.destg) - e1:SetOperation(c68450517.desop) - c:RegisterEffect(e1) -end -function c68450517.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():GetAttackAnnouncedCount()==0 end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_OATH) - e1:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - e:GetHandler():RegisterEffect(e1) -end -function c68450517.filter(c,att) - return c:IsPosition(POS_FACEUP_ATTACK) and c:IsAttribute(att) and c:IsDestructable() -end -function c68450517.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) - and c68450517.filter(chkc,e:GetHandler():GetAttribute()) end - if chk==0 then return Duel.IsExistingTarget(c68450517.filter,tp,0,LOCATION_MZONE,1,nil,e:GetHandler():GetAttribute()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c68450517.filter,tp,0,LOCATION_MZONE,1,1,nil,e:GetHandler():GetAttribute()) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c68450517.desop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and c:IsFaceup() and tc:IsRelateToEffect(e) and tc:IsControler(1-tp) and c68450517.filter(tc,c:GetAttribute()) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c68456353.lua b/script/c68456353.lua deleted file mode 100644 index 30c6c65e60..0000000000 --- a/script/c68456353.lua +++ /dev/null @@ -1,34 +0,0 @@ ---エクストリオの牙 -function c68456353.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY+CATEGORY_TOGRAVE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_CHAINING) - e1:SetCondition(c68456353.condition) - e1:SetTarget(c68456353.target) - e1:SetOperation(c68456353.activate) - c:RegisterEffect(e1) -end -function c68456353.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x2a) -end -function c68456353.condition(e,tp,eg,ep,ev,re,r,rp) - return re:IsHasType(EFFECT_TYPE_ACTIVATE) and rp~=tp and Duel.IsChainNegatable(ev) - and Duel.IsExistingMatchingCard(c68456353.cfilter,tp,LOCATION_MZONE,0,1,nil) -end -function c68456353.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)>0 end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) - end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_HAND) -end -function c68456353.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateActivation(ev) - if re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(eg,REASON_EFFECT) - end - Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT,nil) -end diff --git a/script/c68462976.lua b/script/c68462976.lua deleted file mode 100644 index 999c98ebd9..0000000000 --- a/script/c68462976.lua +++ /dev/null @@ -1,42 +0,0 @@ ---魔法族の里 -function c68462976.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --adjust - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_ADJUST) - e2:SetRange(LOCATION_SZONE) - e2:SetOperation(c68462976.adjustop) - c:RegisterEffect(e2) - --cannot activate - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetCode(EFFECT_CANNOT_ACTIVATE) - e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e3:SetRange(LOCATION_SZONE) - e3:SetTargetRange(1,1) - e3:SetLabel(0) - e3:SetValue(c68462976.actlimit) - c:RegisterEffect(e3) - e2:SetLabelObject(e3) -end -function c68462976.actlimit(e,te,tp) - if not te:IsHasType(EFFECT_TYPE_ACTIVATE) or not te:IsActiveType(TYPE_SPELL) then return false end - if tp==e:GetHandlerPlayer() then return e:GetLabel()==1 - else return e:GetLabel()==2 end -end -function c68462976.filter(c) - return c:IsFaceup() and c:IsRace(RACE_SPELLCASTER) -end -function c68462976.adjustop(e,tp,eg,ep,ev,re,r,rp) - local b1=Duel.IsExistingMatchingCard(c68462976.filter,tp,LOCATION_MZONE,0,1,nil) - local b2=Duel.IsExistingMatchingCard(c68462976.filter,tp,0,LOCATION_MZONE,1,nil) - local te=e:GetLabelObject() - if not b1 then te:SetLabel(1) - elseif b1 and not b2 then te:SetLabel(2) - else te:SetLabel(0) end -end diff --git a/script/c68473226.lua b/script/c68473226.lua deleted file mode 100644 index 2dee920c1c..0000000000 --- a/script/c68473226.lua +++ /dev/null @@ -1,52 +0,0 @@ ---ハードアームドラゴン -function c68473226.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c68473226.spcon) - e1:SetOperation(c68473226.spop) - c:RegisterEffect(e1) - --effect reg - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_BE_PRE_MATERIAL) - e2:SetCondition(c68473226.regcon) - e2:SetOperation(c68473226.regop) - c:RegisterEffect(e2) -end -function c68473226.spfilter(c) - return c:IsLevelAbove(8) and c:IsAbleToGraveAsCost() -end -function c68473226.spcon(e,c) - if c==nil then return true end - return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c68473226.spfilter,c:GetControler(),LOCATION_HAND,0,1,c) -end -function c68473226.spop(e,tp,eg,ep,ev,re,r,rp,c) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c68473226.spfilter,tp,LOCATION_HAND,0,1,1,c) - Duel.SendtoGrave(g,REASON_COST) -end -function c68473226.regcon(e,tp,eg,ep,ev,re,r,rp) - local rc=e:GetHandler():GetReasonCard() - return r==REASON_SUMMON and rc:IsFaceup() and rc:IsLevelAbove(7) -end -function c68473226.regop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local rc=c:GetReasonCard() - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(68473226,0)) - e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - e1:SetValue(1) - e1:SetCondition(c68473226.indcon) - e1:SetReset(RESET_EVENT+0x1fe0000) - rc:RegisterEffect(e1) -end -function c68473226.indcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsLocation(LOCATION_MZONE) -end diff --git a/script/c6849042.lua b/script/c6849042.lua deleted file mode 100644 index b529fa95ff..0000000000 --- a/script/c6849042.lua +++ /dev/null @@ -1,56 +0,0 @@ ---超古代恐獣 -function c6849042.initial_effect(c) - --summon with 1 tribute - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(6849042,0)) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SUMMON_PROC) - e1:SetCondition(c6849042.otcon) - e1:SetOperation(c6849042.otop) - e1:SetValue(SUMMON_TYPE_ADVANCE) - c:RegisterEffect(e1) - --draw - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(6849042,1)) - e2:SetCategory(CATEGORY_DRAW) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetCondition(c6849042.drcon) - e2:SetTarget(c6849042.drtg) - e2:SetOperation(c6849042.drop) - c:RegisterEffect(e2) -end -function c6849042.otfilter(c,tp) - return c:IsRace(RACE_DINOSAUR) and (c:IsControler(tp) or c:IsFaceup()) -end -function c6849042.otcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - local mg=Duel.GetMatchingGroup(c6849042.otfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp) - return c:GetLevel()>6 and Duel.GetTributeCount(c,mg)>0 -end -function c6849042.otop(e,tp,eg,ep,ev,re,r,rp,c) - local mg=Duel.GetMatchingGroup(c6849042.otfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp) - local sg=Duel.SelectTribute(tp,c,1,1,mg) - c:SetMaterial(sg) - Duel.Release(sg,REASON_SUMMON+REASON_MATERIAL) -end -function c6849042.cfilter(c,tp) - return c:IsRace(RACE_DINOSAUR) and c:IsPreviousLocation(LOCATION_GRAVE) - and c:GetPreviousControler()==tp -end -function c6849042.drcon(e,tp,eg,ep,ev,re,r,rp) - return not eg:IsContains(e:GetHandler()) and eg:IsExists(c6849042.cfilter,1,nil,tp) -end -function c6849042.drtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(1) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c6849042.drop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end diff --git a/script/c6850209.lua b/script/c6850209.lua deleted file mode 100644 index 732356b0ea..0000000000 --- a/script/c6850209.lua +++ /dev/null @@ -1,55 +0,0 @@ ---デーモンとの駆け引き -function c6850209.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c6850209.target) - e1:SetOperation(c6850209.activate) - c:RegisterEffect(e1) - if not c6850209.global_check then - c6850209.global_check=true - c6850209[0]=false - c6850209[1]=false - local ge1=Effect.CreateEffect(c) - ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - ge1:SetCode(EVENT_TO_GRAVE) - ge1:SetOperation(c6850209.checkop) - Duel.RegisterEffect(ge1,0) - local ge2=Effect.CreateEffect(c) - ge2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - ge2:SetCode(EVENT_PHASE_START+PHASE_DRAW) - ge2:SetOperation(c6850209.clear) - Duel.RegisterEffect(ge2,0) - end -end -function c6850209.checkop(e,tp,eg,ep,ev,re,r,rp) - local tc=eg:GetFirst() - while tc do - if tc:IsLevelAbove(8) and tc:IsPreviousLocation(LOCATION_ONFIELD) then - c6850209[tc:GetPreviousControler()]=true - end - tc=eg:GetNext() - end -end -function c6850209.clear(e,tp,eg,ep,ev,re,r,rp) - c6850209[0]=false - c6850209[1]=false -end -function c6850209.filter(c,e,tp) - return c:IsCode(85605684) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) -end -function c6850209.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return c6850209[tp] and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and - Duel.IsExistingMatchingCard(c6850209.filter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_HAND) -end -function c6850209.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c6850209.filter,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP) - end -end diff --git a/script/c68535320.lua b/script/c68535320.lua deleted file mode 100644 index 092ab97674..0000000000 --- a/script/c68535320.lua +++ /dev/null @@ -1,41 +0,0 @@ ---ファイヤー・ハンド -function c68535320.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(68535320,0)) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCondition(c68535320.condition) - e1:SetTarget(c68535320.target) - e1:SetOperation(c68535320.operation) - c:RegisterEffect(e1) -end -function c68535320.condition(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:GetPreviousControler()==tp and c:IsReason(REASON_DESTROY) and rp~=tp -end -function c68535320.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsDestructable() end - if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c68535320.spfilter(c,e,tp) - return c:IsCode(95929069) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c68535320.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)~=0 then - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local g=Duel.GetMatchingGroup(c68535320.spfilter,tp,LOCATION_DECK,0,nil,e,tp) - if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(68535320,1)) then - Duel.BreakEffect() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=g:Select(tp,1,1,nil) - Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) - end - end -end diff --git a/script/c68540058.lua b/script/c68540058.lua deleted file mode 100644 index 1164e331b7..0000000000 --- a/script/c68540058.lua +++ /dev/null @@ -1,73 +0,0 @@ ---メタル化・魔法反射装甲 -function c68540058.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCondition(c68540058.condition) - e1:SetTarget(c68540058.target) - e1:SetOperation(c68540058.operation) - c:RegisterEffect(e1) - --atk up - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_DAMAGE_CALCULATING) - e2:SetRange(LOCATION_SZONE) - e2:SetOperation(c68540058.atkup) - c:RegisterEffect(e2) -end -function c68540058.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end -function c68540058.filter(c) - return c:IsFaceup() -end -function c68540058.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c68540058.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c68540058.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local g=Duel.SelectTarget(tp,c68540058.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c68540058.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsLocation(LOCATION_SZONE) then return end - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,c,tc) - c:CancelToGrave() - --Atkup - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_EQUIP) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(300) - e1:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_UPDATE_DEFENCE) - c:RegisterEffect(e2) - --Equip limit - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_EQUIP_LIMIT) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e3:SetValue(1) - e3:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e3) - end -end -function c68540058.atkup(e,tp,eg,ep,ev,re,r,rp) - local eqc=e:GetHandler():GetEquipTarget() - local bc=eqc:GetBattleTarget() - if eqc==Duel.GetAttacker() and bc then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_PHASE+RESET_DAMAGE_CAL) - e1:SetValue(bc:GetAttack()/2) - eqc:RegisterEffect(e1) - end -end diff --git a/script/c68543408.lua b/script/c68543408.lua deleted file mode 100644 index a07eab65b7..0000000000 --- a/script/c68543408.lua +++ /dev/null @@ -1,41 +0,0 @@ ---スターダスト・シャオロン -function c68543408.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(68543408,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetRange(LOCATION_GRAVE) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(c68543408.spcon) - e1:SetTarget(c68543408.sptg) - e1:SetOperation(c68543408.spop) - c:RegisterEffect(e1) - --battle indes - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EFFECT_INDESTRUCTABLE_COUNT) - e2:SetCountLimit(1) - e2:SetValue(c68543408.valcon) - c:RegisterEffect(e2) -end -function c68543408.spcon(e,tp,eg,ep,ev,re,r,rp) - local tc=eg:GetFirst() - return tc:IsControler(tp) and tc:IsCode(44508094) and tc:GetSummonType()==SUMMON_TYPE_SYNCHRO -end -function c68543408.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c68543408.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP_ATTACK) - end -end -function c68543408.valcon(e,re,r,rp) - return bit.band(r,REASON_BATTLE)~=0 -end diff --git a/script/c6859683.lua b/script/c6859683.lua deleted file mode 100644 index aa1265ba5b..0000000000 --- a/script/c6859683.lua +++ /dev/null @@ -1,25 +0,0 @@ ---成功確率0% -function c6859683.initial_effect(c) - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_REMOVE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c6859683.target) - e1:SetOperation(c6859683.operation) - c:RegisterEffect(e1) -end -function c6859683.filter(c) - return c:IsFacedown() or not c:IsType(TYPE_PENDULUM) -end -function c6859683.target(e,tp,eg,ep,ev,re,r,rp,chk) - local g=Duel.GetFieldGroup(tp,0,LOCATION_EXTRA) - if chk==0 then return g:FilterCount(c6859683.filter,nil)>=2 end -end -function c6859683.operation(e,tp,eg,ep,ev,re,r,rp) - local cg=Duel.GetFieldGroup(tp,0,LOCATION_EXTRA) - Duel.ConfirmCards(tp,cg) - local g=Duel.GetMatchingGroup(Card.IsType,1-tp,LOCATION_EXTRA,0,nil,TYPE_FUSION) - if g:GetCount()<2 then return end - local rg=g:RandomSelect(tp,2) - Duel.SendtoGrave(rg,REASON_EFFECT) -end diff --git a/script/c68597372.lua b/script/c68597372.lua deleted file mode 100644 index d95051c94f..0000000000 --- a/script/c68597372.lua +++ /dev/null @@ -1,67 +0,0 @@ ---発条機甲ゼンマイスター -function c68597372.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,4,2) - c:EnableReviveLimit() - --atk - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(c68597372.atkval) - c:RegisterEffect(e1) - --pos - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_POSITION) - e2:SetDescription(aux.Stringid(68597372,0)) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCountLimit(1) - e2:SetRange(LOCATION_MZONE) - e2:SetCost(c68597372.cost) - e2:SetTarget(c68597372.target) - e2:SetOperation(c68597372.operation) - c:RegisterEffect(e2) -end -function c68597372.atkval(e,c) - return c:GetOverlayCount()*300 -end -function c68597372.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c68597372.filter(c) - return c:IsFaceup() and c:IsCanTurnSet() -end -function c68597372.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c68597372.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c68597372.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - local g=Duel.SelectTarget(tp,c68597372.filter,tp,LOCATION_MZONE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0) -end -function c68597372.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.ChangePosition(tc,POS_FACEDOWN_DEFENCE) - tc:RegisterFlagEffect(68597372,RESET_EVENT+0x1fc0000+RESET_PHASE+PHASE_END,0,1) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetCountLimit(1) - e1:SetReset(RESET_PHASE+PHASE_END) - e1:SetCondition(c68597372.flipcon) - e1:SetOperation(c68597372.flipop) - e1:SetLabelObject(tc) - Duel.RegisterEffect(e1,tp) - end -end -function c68597372.flipcon(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetLabelObject() - return tc:IsFacedown() and tc:GetFlagEffect(68597372)~=0 -end -function c68597372.flipop(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetLabelObject() - Duel.ChangePosition(tc,POS_FACEUP_ATTACK) -end diff --git a/script/c68601507.lua b/script/c68601507.lua deleted file mode 100644 index c546c8f3c6..0000000000 --- a/script/c68601507.lua +++ /dev/null @@ -1,36 +0,0 @@ ---武神器-ハバキリ -function c68601507.initial_effect(c) - --atkup - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(68601507,0)) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_PRE_DAMAGE_CALCULATE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c68601507.atkcon) - e1:SetCost(c68601507.atkcost) - e1:SetOperation(c68601507.atkop) - c:RegisterEffect(e1) -end -function c68601507.atkcon(e,tp,eg,ep,ev,re,r,rp) - local c=Duel.GetAttackTarget() - if not c then return false end - if c:IsControler(1-tp) then c=Duel.GetAttacker() end - e:SetLabelObject(c) - return c and c:IsSetCard(0x88) and c:IsRace(RACE_BEASTWARRIOR) and c:IsRelateToBattle() -end -function c68601507.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end -function c68601507.atkop(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetLabelObject() - if c:IsFaceup() and c:IsRelateToBattle() then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_DAMAGE_CAL) - e1:SetValue(c:GetBaseAttack()*2) - c:RegisterEffect(e1) - end -end diff --git a/script/c68618157.lua b/script/c68618157.lua deleted file mode 100644 index ba314944a1..0000000000 --- a/script/c68618157.lua +++ /dev/null @@ -1,79 +0,0 @@ ---武神姫-アマテラス -function c68618157.initial_effect(c) - c:SetUniqueOnField(1,0,68618157) - --xyz summon - aux.AddXyzProcedure(c,nil,4,3) - c:EnableReviveLimit() - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(68618157,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCondition(c68618157.spcon) - e1:SetCost(c68618157.cost) - e1:SetTarget(c68618157.sptg) - e1:SetOperation(c68618157.spop) - c:RegisterEffect(e1) - --tohand - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(68618157,1)) - e2:SetCategory(CATEGORY_TOHAND) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCondition(c68618157.thcon) - e2:SetCost(c68618157.cost) - e2:SetTarget(c68618157.thtg) - e2:SetOperation(c68618157.thop) - c:RegisterEffect(e2) -end -function c68618157.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c68618157.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c68618157.spfilter(c,e,tp) - return c:IsFaceup() and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c68618157.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and c68618157.spfilter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c68618157.spfilter,tp,LOCATION_REMOVED,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c68618157.spfilter,tp,LOCATION_REMOVED,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c68618157.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end -function c68618157.thcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp -end -function c68618157.thfilter(c) - return c:IsFaceup() and c:IsLevelBelow(4) and c:IsAbleToHand() -end -function c68618157.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and c68618157.thfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c68618157.thfilter,tp,LOCATION_REMOVED,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c68618157.thfilter,tp,LOCATION_REMOVED,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c68618157.thop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end diff --git a/script/c68625727.lua b/script/c68625727.lua deleted file mode 100644 index 9d96362888..0000000000 --- a/script/c68625727.lua +++ /dev/null @@ -1,31 +0,0 @@ ---占術姫ペタルエルフ -function c68625727.initial_effect(c) - --position - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_POSITION) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DELAY) - e1:SetTarget(c68625727.postg) - e1:SetOperation(c68625727.posop) - c:RegisterEffect(e1) -end -function c68625727.postg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsPosition,tp,0,LOCATION_MZONE,1,nil,POS_FACEUP_ATTACK) end - local g=Duel.GetMatchingGroup(Card.IsPosition,tp,0,LOCATION_MZONE,nil,POS_FACEUP_ATTACK) - Duel.SetOperationInfo(0,CATEGORY_POSITION,g,g:GetCount(),0,0) -end -function c68625727.posop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsPosition,tp,0,LOCATION_MZONE,nil,POS_FACEUP_ATTACK) - if Duel.ChangePosition(g,POS_FACEUP_DEFENCE)~=0 then - local og=Duel.GetOperatedGroup() - local oc=og:GetFirst() - while oc do - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_CHANGE_POSITION) - e1:SetReset(RESET_EVENT+0x1fe0000) - oc:RegisterEffect(e1) - oc=og:GetNext() - end - end -end diff --git a/script/c68658728.lua b/script/c68658728.lua deleted file mode 100644 index df76633453..0000000000 --- a/script/c68658728.lua +++ /dev/null @@ -1,21 +0,0 @@ ---リトル・キメラ -function c68658728.initial_effect(c) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetTarget(c68658728.tg1) - e1:SetValue(500) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetTarget(c68658728.tg2) - e2:SetValue(-400) - c:RegisterEffect(e2) -end -function c68658728.tg1(e,c) - return c:IsAttribute(ATTRIBUTE_FIRE) -end -function c68658728.tg2(e,c) - return c:IsAttribute(ATTRIBUTE_WATER) -end diff --git a/script/c68661341.lua b/script/c68661341.lua deleted file mode 100644 index 6ed89c1156..0000000000 --- a/script/c68661341.lua +++ /dev/null @@ -1,51 +0,0 @@ ---一点買い -function c68661341.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c68661341.cost) - e1:SetTarget(c68661341.target) - e1:SetOperation(c68661341.activate) - c:RegisterEffect(e1) -end -function c68661341.cfilter(c) - return c:IsType(TYPE_MONSTER) or not c:IsAbleToRemoveAsCost() -end -function c68661341.cost(e,tp,eg,ep,ev,re,r,rp,chk) - local g=Duel.GetFieldGroup(tp,LOCATION_HAND,0) - g:RemoveCard(e:GetHandler()) - if chk==0 then return g:GetCount()>=3 and not g:IsExists(c68661341.cfilter,1,nil) end - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c68661341.filter(c) - return c:IsType(TYPE_MONSTER) and c:IsAbleToHand() -end -function c68661341.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c68661341.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c68661341.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c68661341.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EFFECT_CANNOT_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) - e1:SetTargetRange(1,0) - e1:SetTarget(c68661341.sumlimit) - e1:SetLabel(g:GetFirst():GetCode()) - Duel.RegisterEffect(e1,tp) - local e2=e1:Clone() - e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - Duel.RegisterEffect(e2,tp) - end -end -function c68661341.sumlimit(e,c) - return c:GetCode()~=e:GetLabel() -end diff --git a/script/c68663748.lua b/script/c68663748.lua deleted file mode 100644 index 56d6b95558..0000000000 --- a/script/c68663748.lua +++ /dev/null @@ -1,32 +0,0 @@ ---フォーチュンフューチャー -function c68663748.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c68663748.target) - e1:SetOperation(c68663748.activate) - c:RegisterEffect(e1) -end -function c68663748.filter(c) - return c:IsFaceup() and c:IsSetCard(0x31) -end -function c68663748.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and c68663748.filter(chkc) end - if chk==0 then return Duel.IsPlayerCanDraw(tp,2) - and Duel.IsExistingTarget(c68663748.filter,tp,LOCATION_REMOVED,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(68663748,0)) - local g=Duel.SelectTarget(tp,c68663748.filter,tp,LOCATION_REMOVED,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2) -end -function c68663748.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoGrave(tc,REASON_EFFECT+REASON_RETURN) - Duel.BreakEffect() - Duel.Draw(tp,2,REASON_EFFECT) - end -end diff --git a/script/c68670547.lua b/script/c68670547.lua deleted file mode 100644 index 10c7fd2f86..0000000000 --- a/script/c68670547.lua +++ /dev/null @@ -1,32 +0,0 @@ ---闇竜の黒騎士 -function c68670547.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(68670547,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetTarget(c68670547.sptg) - e1:SetOperation(c68670547.spop) - c:RegisterEffect(e1) -end -function c68670547.filter(c,e,tp) - return c:IsLevelBelow(4) and c:IsRace(RACE_ZOMBIE) - and c:IsReason(REASON_BATTLE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c68670547.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(1-tp) and c68670547.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c68670547.filter,tp,0,LOCATION_GRAVE,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c68670547.filter,tp,0,LOCATION_GRAVE,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c68670547.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsRace(RACE_ZOMBIE) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c68722455.lua b/script/c68722455.lua deleted file mode 100644 index 388a1cb88a..0000000000 --- a/script/c68722455.lua +++ /dev/null @@ -1,40 +0,0 @@ ---赤鬼 -function c68722455.initial_effect(c) - --to hand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(68722455,0)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetCost(c68722455.cost) - e1:SetTarget(c68722455.target) - e1:SetOperation(c68722455.operation) - c:RegisterEffect(e1) -end -function c68722455.costfilter(c) - return c:IsAbleToGraveAsCost() -end -function c68722455.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c68722455.costfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end - local rt=Duel.GetTargetCount(Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local cg=Duel.SelectMatchingCard(tp,c68722455.costfilter,tp,LOCATION_HAND,0,1,rt,nil) - Duel.SendtoGrave(cg,REASON_COST) - e:SetLabel(cg:GetCount()) -end -function c68722455.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsAbleToHand() end - if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end - local ct=e:GetLabel() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local eg=Duel.SelectTarget(tp,Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,ct,ct,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,eg,ct,0,0) -end -function c68722455.operation(e,tp,eg,ep,ev,re,r,rp,chk) - local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local rg=tg:Filter(Card.IsRelateToEffect,nil,e) - if rg:GetCount()>0 then - Duel.SendtoHand(rg,nil,REASON_EFFECT) - end -end diff --git a/script/c68745629.lua b/script/c68745629.lua deleted file mode 100644 index a6d0f3a4c0..0000000000 --- a/script/c68745629.lua +++ /dev/null @@ -1,28 +0,0 @@ ---E・HERO フレイム・ブラスト -function c68745629.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcCode2(c,98266377,95362816,true,true) - --spsummon condition - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(aux.fuslimit) - c:RegisterEffect(e1) - --atkup - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetCondition(c68745629.atkcon) - e2:SetValue(1000) - c:RegisterEffect(e2) -end -function c68745629.atkcon(e) - local ph=Duel.GetCurrentPhase() - if ph~=PHASE_DAMAGE and ph~=PHASE_DAMAGE_CAL then return false end - local bc=e:GetHandler():GetBattleTarget() - return bc and bc:IsFaceup() and bc:IsAttribute(ATTRIBUTE_WATER) -end diff --git a/script/c68762510.lua b/script/c68762510.lua deleted file mode 100644 index 0ecb33e72e..0000000000 --- a/script/c68762510.lua +++ /dev/null @@ -1,32 +0,0 @@ ---幸運の笛吹き -function c68762510.initial_effect(c) - aux.EnableDualAttribute(c) - --draw - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(68762510,0)) - e1:SetCategory(CATEGORY_DRAW) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_BATTLE_DESTROYING) - e1:SetCondition(c68762510.con) - e1:SetTarget(c68762510.tg) - e1:SetOperation(c68762510.op) - c:RegisterEffect(e1) -end -function c68762510.con(e,tp,eg,ep,ev,re,r,rp) - if not aux.IsDualState(e) then return false end - local c=e:GetHandler() - local bc=c:GetBattleTarget() - if not c:IsRelateToBattle() or c:IsFacedown() then return false end - return bc:IsLocation(LOCATION_GRAVE) and bc:IsReason(REASON_BATTLE) and bc:IsType(TYPE_MONSTER) -end -function c68762510.tg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(1) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c68762510.op(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end diff --git a/script/c68774379.lua b/script/c68774379.lua deleted file mode 100644 index 38c0fd44d2..0000000000 --- a/script/c68774379.lua +++ /dev/null @@ -1,25 +0,0 @@ ---サイバー・バリア・ドラゴン -function c68774379.initial_effect(c) - c:EnableReviveLimit() - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - c:RegisterEffect(e1) - --Negate attack - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_ATTACK_ANNOUNCE) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCondition(c68774379.discon) - e2:SetOperation(c68774379.disop) - c:RegisterEffect(e2) -end -function c68774379.discon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPosition(POS_FACEUP_ATTACK) and eg:GetFirst():IsControler(1-tp) -end -function c68774379.disop(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateAttack() -end diff --git a/script/c68786330.lua b/script/c68786330.lua deleted file mode 100644 index 713b393c3b..0000000000 --- a/script/c68786330.lua +++ /dev/null @@ -1,28 +0,0 @@ ---アタック・フェロモン -function c68786330.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --to defence - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(68786330,0)) - e2:SetCategory(CATEGORY_POSITION) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_DAMAGE_STEP_END) - e2:SetRange(LOCATION_SZONE) - e2:SetCondition(c68786330.poscon) - e2:SetOperation(c68786330.posop) - c:RegisterEffect(e2) -end -function c68786330.poscon(e,tp,eg,ep,ev,re,r,rp) - local a=Duel.GetAttacker() - local d=Duel.GetAttackTarget() - return a and d and a:IsRelateToBattle() and d:IsRelateToBattle() and a:IsRace(RACE_REPTILE) and d:IsDefencePos() -end -function c68786330.posop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local a=Duel.GetAttackTarget() - Duel.ChangePosition(a,POS_FACEUP_ATTACK) -end diff --git a/script/c68809475.lua b/script/c68809475.lua deleted file mode 100644 index 13a717d423..0000000000 --- a/script/c68809475.lua +++ /dev/null @@ -1,90 +0,0 @@ ---コアキメイル・スピード -function c68809475.initial_effect(c) - --cost - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c68809475.mtcon) - e1:SetOperation(c68809475.mtop) - c:RegisterEffect(e1) - --draw - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(68809475,3)) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetRange(LOCATION_MZONE) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_DRAW) - e2:SetCondition(c68809475.drcon) - e2:SetCost(c68809475.drcost) - e2:SetTarget(c68809475.drtg) - e2:SetOperation(c68809475.drop) - c:RegisterEffect(e2) -end -function c68809475.mtcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c68809475.cfilter1(c) - return c:IsCode(36623431) and c:IsAbleToGraveAsCost() -end -function c68809475.cfilter2(c) - return c:IsType(TYPE_MONSTER) and c:IsRace(RACE_MACHINE) and not c:IsPublic() -end -function c68809475.mtop(e,tp,eg,ep,ev,re,r,rp) - local g1=Duel.GetMatchingGroup(c68809475.cfilter1,tp,LOCATION_HAND,0,nil) - local g2=Duel.GetMatchingGroup(c68809475.cfilter2,tp,LOCATION_HAND,0,nil) - local select=2 - if g1:GetCount()>0 and g2:GetCount()>0 then - select=Duel.SelectOption(tp,aux.Stringid(68809475,0),aux.Stringid(68809475,1),aux.Stringid(68809475,2)) - elseif g1:GetCount()>0 then - select=Duel.SelectOption(tp,aux.Stringid(68809475,0),aux.Stringid(68809475,2)) - if select==1 then select=2 end - elseif g2:GetCount()>0 then - select=Duel.SelectOption(tp,aux.Stringid(68809475,1),aux.Stringid(68809475,2)) - select=select+1 - end - if select==0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=g1:Select(tp,1,1,nil) - Duel.SendtoGrave(g,REASON_COST) - elseif select==1 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) - local g=g2:Select(tp,1,1,nil) - Duel.ConfirmCards(1-tp,g) - Duel.ShuffleHand(tp) - else - Duel.Destroy(e:GetHandler(),REASON_RULE) - end -end -function c68809475.filter(c) - return c:IsCode(36623431) and not c:IsPublic() -end -function c68809475.drcon(e,tp,eg,ep,ev,re,r,rp) - return ep==tp and Duel.GetTurnPlayer()==tp and Duel.GetCurrentPhase()==PHASE_DRAW -end -function c68809475.drcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return eg:IsExists(c68809475.filter,1,nil) end - local g=eg:Filter(c68809475.filter,nil) - if g:GetCount()==1 then - Duel.ConfirmCards(1-tp,g) - Duel.ShuffleHand(tp) - else - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) - local sg=g:Select(tp,1,1,nil) - Duel.ConfirmCards(1-tp,sg) - Duel.ShuffleHand(tp) - end -end -function c68809475.drtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(1) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c68809475.drop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsFacedown() or not e:GetHandler():IsRelateToEffect(e) then return end - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end diff --git a/script/c68811206.lua b/script/c68811206.lua deleted file mode 100644 index f712eb5a42..0000000000 --- a/script/c68811206.lua +++ /dev/null @@ -1,39 +0,0 @@ ---Tyler the Great Warrior -function c68811206.initial_effect(c) - --spsummon condition - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - c:RegisterEffect(e1) - --damage - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(68811206,0)) - e2:SetCategory(CATEGORY_DAMAGE) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetCode(EVENT_BATTLE_DESTROYING) - e2:SetCondition(c68811206.damcon) - e2:SetTarget(c68811206.damtg) - e2:SetOperation(c68811206.damop) - c:RegisterEffect(e2) -end -function c68811206.damcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local bc=c:GetBattleTarget() - return c:IsRelateToBattle() and bc:IsLocation(LOCATION_GRAVE) and bc:IsType(TYPE_MONSTER) -end -function c68811206.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local c=e:GetHandler() - local bc=c:GetBattleTarget() - local dam=bc:GetAttack() - if dam<0 then dam=0 end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(dam) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,dam) -end -function c68811206.damop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c68812773.lua b/script/c68812773.lua deleted file mode 100644 index f791ae653c..0000000000 --- a/script/c68812773.lua +++ /dev/null @@ -1,78 +0,0 @@ ---オボミ -function c68812773.initial_effect(c) - --summon,flip - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c68812773.sptg) - e1:SetOperation(c68812773.spop) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_FLIP) - c:RegisterEffect(e2) - -- - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(68812773,0)) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1) - e3:SetCost(c68812773.spcost) - e3:SetTarget(c68812773.sptg2) - e3:SetOperation(c68812773.spop2) - c:RegisterEffect(e3) -end -function c68812773.filter(c,e,tp) - return c:IsCode(71071546) - and (c:IsCanBeSpecialSummoned(e,0,tp,false,false) or c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN)) -end -function c68812773.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c68812773.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c68812773.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c68812773.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c68812773.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - local spos=0 - if tc:IsCanBeSpecialSummoned(e,0,tp,false,false) then spos=spos+POS_FACEUP_ATTACK end - if tc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN) then spos=spos+POS_FACEDOWN_DEFENCE end - Duel.SpecialSummon(tc,0,tp,tp,false,false,spos) - if tc:IsFacedown() then - Duel.ConfirmCards(1-tp,tc) - end - end -end -function c68812773.spfilter(c,e,tp) - return (c:IsSetCard(0x7b) or c:IsSetCard(0x55)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c68812773.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsRace,1,nil,RACE_MACHINE) end - local ct=Duel.GetMatchingGroupCount(c68812773.spfilter,tp,LOCATION_HAND,0,nil,e,tp) - local rg=Duel.SelectReleaseGroup(tp,Card.IsRace,1,ct,nil,RACE_MACHINE) - ct=Duel.Release(rg,REASON_COST) - e:SetLabel(ct) -end -function c68812773.sptg2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsExistingMatchingCard(c68812773.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end - local ct=e:GetLabel() - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,ct,0,0) -end -function c68812773.spop2(e,tp,eg,ep,ev,re,r,rp) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ft<=0 then return end - local ct=e:GetLabel() - local ct1=Duel.GetMatchingGroupCount(c68812773.spfilter,tp,LOCATION_HAND,0,nil,e,tp) - if ct10 then - Duel.SpecialSummon(dg,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c68815132.lua b/script/c68815132.lua deleted file mode 100644 index 4bdbec010c..0000000000 --- a/script/c68815132.lua +++ /dev/null @@ -1,47 +0,0 @@ ---ハーピィ・ダンサー -function c68815132.initial_effect(c) - --return - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(68815132,0)) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1,68815132) - e1:SetTarget(c68815132.target) - e1:SetOperation(c68815132.operation) - c:RegisterEffect(e1) - --change name - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetCode(EFFECT_CHANGE_CODE) - e2:SetRange(LOCATION_MZONE+LOCATION_GRAVE) - e2:SetValue(76812113) - c:RegisterEffect(e2) -end -function c68815132.filter(c) - return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_WIND) and c:IsAbleToHand() -end -function c68815132.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c68815132.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c68815132.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g=Duel.SelectTarget(tp,c68815132.filter,tp,LOCATION_MZONE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c68815132.sumfilter(c) - return c:IsAttribute(ATTRIBUTE_WIND) and c:IsSummonable(true,nil) -end -function c68815132.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.SendtoHand(tc,nil,REASON_EFFECT)>0 and tc:IsLocation(LOCATION_HAND+LOCATION_EXTRA) then - if Duel.IsExistingMatchingCard(c68815132.sumfilter,tp,LOCATION_HAND,0,1,nil) - and Duel.SelectYesNo(tp,aux.Stringid(68815132,1)) then - Duel.BreakEffect() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON) - local g=Duel.SelectMatchingCard(tp,c68815132.sumfilter,tp,LOCATION_HAND,0,1,1,nil) - Duel.Summon(tp,g:GetFirst(),true,nil) - end - end -end diff --git a/script/c68815401.lua b/script/c68815401.lua deleted file mode 100644 index 95e2521a44..0000000000 --- a/script/c68815401.lua +++ /dev/null @@ -1,50 +0,0 @@ ---クレイジー・ファイヤー -function c68815401.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,0x1c0) - e1:SetCost(c68815401.cost) - e1:SetTarget(c68815401.target) - e1:SetOperation(c68815401.activate) - c:RegisterEffect(e1) -end -function c68815401.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,500) and Duel.GetActivityCount(tp,ACTIVITY_ATTACK)==0 end - Duel.PayLPCost(tp,500) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) - e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function c68815401.filter1(c) - return c:IsFaceup() and c:IsSetCard(0xb9) and c:IsDestructable() -end -function c68815401.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c68815401.filter1,tp,LOCATION_SZONE,0,1,nil) - and Duel.IsExistingMatchingCard(Card.IsDestructable,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) - and Duel.IsPlayerCanSpecialSummonMonster(tp,68815402,0,0x4011,1000,1000,3,RACE_PYRO,ATTRIBUTE_FIRE) end - local dg1=Duel.GetMatchingGroup(c68815401.filter1,tp,LOCATION_SZONE,0,nil) - local dg2=Duel.GetMatchingGroup(Card.IsDestructable,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - dg1:Merge(dg2) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,dg1,dg1:GetCount(),0,0) - Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0) -end -function c68815401.activate(e,tp,eg,ep,ev,re,r,rp) - local dg1=Duel.GetMatchingGroup(c68815401.filter1,tp,LOCATION_SZONE,0,nil) - if Duel.Destroy(dg1,REASON_EFFECT)>0 then - local dg2=Duel.GetMatchingGroup(Card.IsDestructable,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - if Duel.Destroy(dg2,REASON_EFFECT)>0 - and Duel.IsPlayerCanSpecialSummonMonster(tp,68815402,0,0x4011,1000,1000,3,RACE_PYRO,ATTRIBUTE_FIRE) then - Duel.BreakEffect() - local token=Duel.CreateToken(tp,68815402) - Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP_ATTACK) - end - end -end diff --git a/script/c68819554.lua b/script/c68819554.lua deleted file mode 100644 index 03d571ba5b..0000000000 --- a/script/c68819554.lua +++ /dev/null @@ -1,96 +0,0 @@ ---Emダメージ・ジャグラー -function c68819554.initial_effect(c) - --negate - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(68819554,0)) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_NEGATE) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_CHAINING) - e1:SetRange(LOCATION_HAND) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) - e1:SetCondition(c68819554.negcon) - e1:SetCost(c68819554.effcost) - e1:SetTarget(c68819554.negtg) - e1:SetOperation(c68819554.negop) - c:RegisterEffect(e1) - --reduce damage - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(68819554,1)) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetRange(LOCATION_HAND) - e2:SetCondition(c68819554.damcon) - e2:SetCost(c68819554.effcost) - e2:SetOperation(c68819554.damop) - c:RegisterEffect(e2) - --search - local e3=Effect.CreateEffect(c) - e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_GRAVE) - e3:SetCountLimit(1,68819554) - e3:SetCost(c68819554.thcost) - e3:SetTarget(c68819554.thtg) - e3:SetOperation(c68819554.thop) - c:RegisterEffect(e3) -end -function c68819554.effcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsDiscardable() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD) - Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) -end -function c68819554.negcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsChainNegatable(ev) and aux.damcon1(e,tp,eg,ep,ev,re,r,rp) -end -function c68819554.negtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - if re:GetHandler():IsRelateToEffect(re) and re:GetHandler():IsDestructable() then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) - end -end -function c68819554.negop(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateActivation(ev) - if re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(eg,REASON_EFFECT) - end -end -function c68819554.damcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()==PHASE_BATTLE -end -function c68819554.damop(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CHANGE_DAMAGE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetTargetRange(1,0) - e1:SetValue(c68819554.damval) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) - Duel.RegisterFlagEffect(tp,68819554,RESET_PHASE+PHASE_END,0,1) -end -function c68819554.damval(e,re,val,r,rp,rc) - local tp=e:GetHandlerPlayer() - if Duel.GetFlagEffect(tp,68819554)==0 or bit.band(r,REASON_BATTLE)==0 then return val end - Duel.ResetFlagEffect(tp,68819554) - return 0 -end -function c68819554.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) -end -function c68819554.thfilter(c) - return c:IsSetCard(0xc6) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() and not c:IsCode(68819554) -end -function c68819554.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c68819554.thfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c68819554.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c68819554.thfilter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c68833958.lua b/script/c68833958.lua deleted file mode 100644 index 229fbecb8c..0000000000 --- a/script/c68833958.lua +++ /dev/null @@ -1,29 +0,0 @@ ---一騎加勢 -function c68833958.initial_effect(c) - --activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c68833958.target) - e1:SetOperation(c68833958.activate) - c:RegisterEffect(e1) -end -function c68833958.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) -end -function c68833958.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(1500) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - tc:RegisterEffect(e1) - end -end diff --git a/script/c68836428.lua b/script/c68836428.lua deleted file mode 100644 index c5bb468303..0000000000 --- a/script/c68836428.lua +++ /dev/null @@ -1,69 +0,0 @@ ---トライエッジ・リヴァイア -function c68836428.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,3,3) - c:EnableReviveLimit() - --remove - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_BATTLE_DESTROY_REDIRECT) - e1:SetValue(LOCATION_REMOVED) - c:RegisterEffect(e1) - --negate - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(68836428,1)) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetHintTiming(TIMING_DAMAGE_STEP) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCondition(c68836428.condition) - e2:SetCost(c68836428.cost) - e2:SetTarget(c68836428.target) - e2:SetOperation(c68836428.operation) - c:RegisterEffect(e2) -end -function c68836428.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end -function c68836428.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c68836428.filter(c) - return c:IsFaceup() and (c:IsType(TYPE_EFFECT) or c:GetAttack()>0) -end -function c68836428.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c68836428.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c68836428.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c68836428.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) -end -function c68836428.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - Duel.NegateRelatedChain(tc,RESET_TURN_SET) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetValue(RESET_TURN_SET) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - tc:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_UPDATE_ATTACK) - e3:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e3:SetValue(-800) - tc:RegisterEffect(e3) - end -end diff --git a/script/c68875140.lua b/script/c68875140.lua deleted file mode 100644 index e0a5df39d8..0000000000 --- a/script/c68875140.lua +++ /dev/null @@ -1,42 +0,0 @@ ---押し売りゴブリン -function c68875140.initial_effect(c) - --activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --todeck - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(68875140,0)) - e2:SetCategory(CATEGORY_TOHAND) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetRange(LOCATION_SZONE) - e2:SetCode(EVENT_BATTLE_DAMAGE) - e2:SetCondition(c68875140.condition) - e2:SetTarget(c68875140.target) - e2:SetOperation(c68875140.operation) - c:RegisterEffect(e2) -end -function c68875140.condition(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp and eg:GetFirst():GetControler()==tp -end -function c68875140.filter(c) - return c:GetSequence()<5 and c:IsAbleToHand() -end -function c68875140.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_SZONE) and chkc:IsControler(1-tp) and c68875140.filter(chkc) end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g=Duel.SelectTarget(tp,c68875140.filter,tp,0,LOCATION_SZONE,1,1,nil) - if g:GetCount()>0 then - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) - end -end -function c68875140.operation(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - end -end diff --git a/script/c68881649.lua b/script/c68881649.lua deleted file mode 100644 index 33161df79a..0000000000 --- a/script/c68881649.lua +++ /dev/null @@ -1,40 +0,0 @@ ---憑依装着-エリア -function c68881649.initial_effect(c) - --spsummon proc - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND+LOCATION_DECK) - e1:SetCondition(c68881649.spcon) - e1:SetOperation(c68881649.spop) - c:RegisterEffect(e1) -end -function c68881649.spfilter1(c,tp) - return c:IsFaceup() and c:IsCode(74364659) and c:IsAbleToGraveAsCost() - and Duel.IsExistingMatchingCard(c68881649.spfilter2,tp,LOCATION_MZONE,0,1,c) -end -function c68881649.spfilter2(c) - return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_WATER) and c:IsAbleToGraveAsCost() -end -function c68881649.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.GetLocationCount(tp,LOCATION_MZONE)>-2 - and Duel.IsExistingMatchingCard(c68881649.spfilter1,tp,LOCATION_MZONE,0,1,nil,tp) -end -function c68881649.spop(e,tp,eg,ep,ev,re,r,rp,c) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g1=Duel.SelectMatchingCard(tp,c68881649.spfilter1,tp,LOCATION_MZONE,0,1,1,nil,tp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g2=Duel.SelectMatchingCard(tp,c68881649.spfilter2,tp,LOCATION_MZONE,0,1,1,g1:GetFirst()) - g1:Merge(g2) - Duel.SendtoGrave(g1,REASON_COST) - Duel.ShuffleDeck(tp) - --pierce - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_PIERCE) - e1:SetReset(RESET_EVENT+0xff0000) - c:RegisterEffect(e1) -end diff --git a/script/c68933343.lua b/script/c68933343.lua deleted file mode 100644 index dac58a8160..0000000000 --- a/script/c68933343.lua +++ /dev/null @@ -1,56 +0,0 @@ ---音響戦士ベーシス -function c68933343.initial_effect(c) - --lv up - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(68933343,0)) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetTarget(c68933343.target1) - e1:SetOperation(c68933343.operation) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(68933343,0)) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_GRAVE) - e2:SetCost(c68933343.cost) - e2:SetTarget(c68933343.target2) - e2:SetOperation(c68933343.operation) - c:RegisterEffect(e2) -end -function c68933343.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) -end -function c68933343.filter(c) - return c:IsFaceup() and c:IsSetCard(0x1066) and c:IsLevelAbove(1) -end -function c68933343.target1(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c68933343.filter(chkc) end - if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)>0 - and Duel.IsExistingTarget(c68933343.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c68933343.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) -end -function c68933343.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c68933343.filter(chkc) end - if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)>0 - and Duel.IsExistingTarget(c68933343.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c68933343.filter,tp,LOCATION_MZONE,0,1,1,nil) -end -function c68933343.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - local ct=Duel.GetFieldGroupCount(tp,LOCATION_HAND,0) - if ct>0 and tc:IsFaceup() and tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_LEVEL) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e1:SetValue(ct) - tc:RegisterEffect(e1) - end -end diff --git a/script/c68937720.lua b/script/c68937720.lua deleted file mode 100644 index 07ba41388b..0000000000 --- a/script/c68937720.lua +++ /dev/null @@ -1,27 +0,0 @@ ---メンタルドレイン -function c68937720.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_DRAW_PHASE) - e1:SetCost(c68937720.cost) - c:RegisterEffect(e1) - -- - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetCode(EFFECT_CANNOT_ACTIVATE) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(1,1) - e2:SetValue(c68937720.aclimit) - c:RegisterEffect(e2) -end -function c68937720.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,1000) end - Duel.PayLPCost(tp,1000) -end -function c68937720.aclimit(e,re,tp) - local loc=re:GetActivateLocation() - return loc==LOCATION_HAND and re:IsActiveType(TYPE_MONSTER) and not re:GetHandler():IsImmuneToEffect(e) -end diff --git a/script/c69000994.lua b/script/c69000994.lua deleted file mode 100644 index e3d7c103b5..0000000000 --- a/script/c69000994.lua +++ /dev/null @@ -1,81 +0,0 @@ ---炎王獣 バロン -function c69000994.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(69000994,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DELAY) - e1:SetRange(LOCATION_HAND) - e1:SetCode(EVENT_DESTROYED) - e1:SetCondition(c69000994.spcon) - e1:SetTarget(c69000994.sptg) - e1:SetOperation(c69000994.spop) - c:RegisterEffect(e1) - --search - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetOperation(c69000994.threg) - c:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(69000994,1)) - e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e3:SetRange(LOCATION_GRAVE) - e3:SetCode(EVENT_PHASE+PHASE_STANDBY) - e3:SetCondition(c69000994.thcon) - e3:SetTarget(c69000994.thtg) - e3:SetOperation(c69000994.thop) - e3:SetLabelObject(e2) - c:RegisterEffect(e3) -end -function c69000994.cfilter(c,tp) - return c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP) and c:GetPreviousControler()==tp - and c:IsReason(REASON_EFFECT) and c:IsSetCard(0x81) -end -function c69000994.spcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c69000994.cfilter,1,nil,tp) -end -function c69000994.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsRelateToEffect(e) - and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c69000994.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) - end -end -function c69000994.threg(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if bit.band(r,0x41)~=0x41 then return end - if Duel.GetCurrentPhase()==PHASE_STANDBY then - e:SetLabel(Duel.GetTurnCount()) - c:RegisterFlagEffect(69000994,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_STANDBY,0,2) - else - e:SetLabel(0) - c:RegisterFlagEffect(69000994,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_STANDBY,0,1) - end -end -function c69000994.thcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetLabelObject():GetLabel()~=Duel.GetTurnCount() and e:GetHandler():GetFlagEffect(69000994)>0 -end -function c69000994.thfilter(c) - return c:IsSetCard(0x81) and c:GetCode()~=69000994 and c:IsAbleToHand() -end -function c69000994.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) - e:GetHandler():ResetFlagEffect(69000994) -end -function c69000994.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c69000994.thfilter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c6901008.lua b/script/c6901008.lua deleted file mode 100644 index c2d121211b..0000000000 --- a/script/c6901008.lua +++ /dev/null @@ -1,10 +0,0 @@ ---幻影王 ハイド・ライド -function c6901008.initial_effect(c) - --nontuner - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_NONTUNER) - c:RegisterEffect(e1) -end diff --git a/script/c69015963.lua b/script/c69015963.lua deleted file mode 100644 index 0dab1f4ac5..0000000000 --- a/script/c69015963.lua +++ /dev/null @@ -1,33 +0,0 @@ ---デビル・フランケン -function c69015963.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetDescription(aux.Stringid(69015963,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c69015963.cost) - e1:SetTarget(c69015963.target) - e1:SetOperation(c69015963.operation) - c:RegisterEffect(e1) -end -function c69015963.filter(c,e,tp) - return c:IsType(TYPE_FUSION) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c69015963.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,5000) end - Duel.PayLPCost(tp,5000) -end -function c69015963.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c69015963.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function c69015963.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c69015963.filter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_ATTACK) - end -end diff --git a/script/c69023354.lua b/script/c69023354.lua deleted file mode 100644 index 39b2ab557e..0000000000 --- a/script/c69023354.lua +++ /dev/null @@ -1,39 +0,0 @@ ---機甲忍者エアー -function c69023354.initial_effect(c) - --lv down - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(69023354,0)) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c69023354.target) - e1:SetOperation(c69023354.operation) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e3) -end -function c69023354.filter(c) - return c:IsFaceup() and c:GetLevel()~=0 and c:IsSetCard(0x2b) -end -function c69023354.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c69023354.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c69023354.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - local g=Duel.SelectTarget(tp,c69023354.filter,tp,LOCATION_MZONE,0,1,1,nil) -end -function c69023354.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_LEVEL) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(-1) - tc:RegisterEffect(e1) - end -end diff --git a/script/c69025477.lua b/script/c69025477.lua deleted file mode 100644 index c5fac84a50..0000000000 --- a/script/c69025477.lua +++ /dev/null @@ -1,45 +0,0 @@ ---六武衆-ヤリザ -function c69025477.initial_effect(c) - --diratk - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DIRECT_ATTACK) - e1:SetCondition(c69025477.dircon) - c:RegisterEffect(e1) - --Destroy replace - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DESTROY_REPLACE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetTarget(c69025477.desreptg) - e2:SetOperation(c69025477.desrepop) - c:RegisterEffect(e2) -end -function c69025477.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x3d) and c:GetCode()~=69025477 -end -function c69025477.dircon(e) - return Duel.IsExistingMatchingCard(c69025477.cfilter,e:GetHandler():GetControler(),LOCATION_MZONE,0,1,nil) -end -function c69025477.repfilter(c) - return c:IsFaceup() and c:IsSetCard(0x3d) and not c:IsStatus(STATUS_DESTROY_CONFIRMED+STATUS_BATTLE_DESTROYED) -end -function c69025477.desreptg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return not c:IsReason(REASON_REPLACE) and c:IsOnField() and c:IsFaceup() - and Duel.IsExistingMatchingCard(c69025477.repfilter,tp,LOCATION_MZONE,0,1,c) end - if Duel.SelectYesNo(tp,aux.Stringid(69025477,0)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESREPLACE) - local g=Duel.SelectMatchingCard(tp,c69025477.repfilter,tp,LOCATION_MZONE,0,1,1,c) - e:SetLabelObject(g:GetFirst()) - Duel.HintSelection(g) - g:GetFirst():SetStatus(STATUS_DESTROY_CONFIRMED,true) - return true - else return false end -end -function c69025477.desrepop(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetLabelObject() - tc:SetStatus(STATUS_DESTROY_CONFIRMED,false) - Duel.Destroy(tc,REASON_EFFECT+REASON_REPLACE) -end diff --git a/script/c69031175.lua b/script/c69031175.lua deleted file mode 100644 index b9a8d3b76a..0000000000 --- a/script/c69031175.lua +++ /dev/null @@ -1,80 +0,0 @@ ---BF-アーマード・ウィング -function c69031175.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0x33),aux.NonTuner(nil),1) - c:EnableReviveLimit() - -- - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e1:SetValue(1) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_AVOID_BATTLE_DAMAGE) - e2:SetValue(1) - c:RegisterEffect(e2) - --counter - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(69031175,0)) - e3:SetCategory(CATEGORY_COUNTER) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_DAMAGE_STEP_END) - e3:SetRange(LOCATION_MZONE) - e3:SetCondition(c69031175.condition1) - e3:SetOperation(c69031175.operation1) - c:RegisterEffect(e3) - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(69031175,1)) - e4:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE) - e4:SetType(EFFECT_TYPE_IGNITION) - e4:SetRange(LOCATION_MZONE) - e4:SetCost(c69031175.cost2) - e4:SetOperation(c69031175.operation2) - c:RegisterEffect(e4) -end -function c69031175.condition1(e,tp,eg,ep,ev,re,r,rp) - local atg=Duel.GetAttackTarget() - return Duel.GetAttacker()==e:GetHandler() and atg and atg:IsRelateToBattle() and atg:GetCounter(0x2)==0 -end -function c69031175.operation1(e,tp,eg,ep,ev,re,r,rp) - local atg=Duel.GetAttackTarget() - if atg:IsRelateToBattle() then - atg:AddCounter(0x2,1) - end -end -function c69031175.filter(c) - return c:GetCounter(0x2)>0 -end -function c69031175.cost2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c69031175.filter,tp,0,LOCATION_MZONE,1,nil) end - local g=Duel.GetMatchingGroup(c69031175.filter,tp,0,LOCATION_MZONE,nil) - local t=g:GetFirst() - while t do - t:RemoveCounter(tp,0x2,t:GetCounter(0x2),REASON_COST) - t=g:GetNext() - end - Duel.SetTargetCard(g) -end -function c69031175.operation2(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local t=g:GetFirst() - while t do - if t:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetValue(0) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - t:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_SET_DEFENCE_FINAL) - e2:SetValue(0) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - t:RegisterEffect(e2) - end - t=g:GetNext() - end -end diff --git a/script/c69035382.lua b/script/c69035382.lua deleted file mode 100644 index 9615b72b6e..0000000000 --- a/script/c69035382.lua +++ /dev/null @@ -1,7 +0,0 @@ ---奈落との契約 -function c69035382.initial_effect(c) - aux.AddRitualProcEqual2(c,c69035382.ritual_filter) -end -function c69035382.ritual_filter(c) - return c:IsType(TYPE_RITUAL) and c:IsAttribute(ATTRIBUTE_DARK) -end diff --git a/script/c6903857.lua b/script/c6903857.lua deleted file mode 100644 index 5238223745..0000000000 --- a/script/c6903857.lua +++ /dev/null @@ -1,52 +0,0 @@ ---パワー・ブレイカー -function c6903857.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(6903857,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCondition(c6903857.condition) - e1:SetTarget(c6903857.target) - e1:SetOperation(c6903857.operation) - c:RegisterEffect(e1) - --to defence - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(6903857,1)) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_DAMAGE_STEP_END) - e2:SetCondition(c6903857.poscon) - e2:SetOperation(c6903857.posop) - c:RegisterEffect(e2) -end -function c6903857.condition(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:GetPreviousControler()==tp and c:IsReason(REASON_DESTROY) and rp~=tp - and (not c:IsReason(REASON_BATTLE) or c==Duel.GetAttackTarget()) -end -function c6903857.dfilter(c) - return c:IsFaceup() and c:IsDestructable() and c:IsType(TYPE_SPELL+TYPE_TRAP) -end -function c6903857.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and c6903857.dfilter(chkc) end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c6903857.dfilter,tp,0,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c6903857.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end -function c6903857.poscon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler()==Duel.GetAttacker() and e:GetHandler():IsRelateToBattle() -end -function c6903857.posop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsAttackPos() and c:IsRelateToBattle() then - Duel.ChangePosition(c,POS_FACEUP_DEFENCE) - end -end diff --git a/script/c69042950.lua b/script/c69042950.lua deleted file mode 100644 index e107474cf0..0000000000 --- a/script/c69042950.lua +++ /dev/null @@ -1,47 +0,0 @@ ---バグ・ロード -function c69042950.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c69042950.target) - e1:SetOperation(c69042950.activate) - c:RegisterEffect(e1) -end -function c69042950.mfilter(c,clv) - return c:IsFaceup() and c:GetLevel()==clv -end -function c69042950.mfilter2(c) - return c:IsFaceup() and c:IsLevelBelow(4) -end -function c69042950.spfilter(c,e,tp) - local lv=c:GetLevel() - return lv>0 and lv<=4 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) - and Duel.IsExistingMatchingCard(c69042950.mfilter,tp,LOCATION_MZONE,0,1,nil,lv) -end -function c69042950.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c69042950.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) - and Duel.IsExistingMatchingCard(c69042950.mfilter2,tp,0,LOCATION_MZONE,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c69042950.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c69042950.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - if g:GetCount()~=0 then - Duel.SpecialSummonStep(g:GetFirst(),0,tp,tp,false,false,POS_FACEUP) - end - end - if Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c69042950.spfilter,1-tp,LOCATION_HAND,0,1,nil,e,1-tp) - and Duel.SelectYesNo(1-tp,aux.Stringid(69042950,0)) then - Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(1-tp,c69042950.spfilter,1-tp,LOCATION_HAND,0,1,1,nil,e,1-tp) - if g:GetCount()~=0 then - Duel.SpecialSummonStep(g:GetFirst(),0,1-tp,1-tp,false,false,POS_FACEUP) - end - end - Duel.SpecialSummonComplete() -end diff --git a/script/c69058960.lua b/script/c69058960.lua deleted file mode 100644 index 93187d70ff..0000000000 --- a/script/c69058960.lua +++ /dev/null @@ -1,106 +0,0 @@ ---No.13 ケインズ・デビル -function c69058960.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,1,2) - c:EnableReviveLimit() - --pos - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(69058960,0)) - e1:SetCategory(CATEGORY_POSITION) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c69058960.cost) - e1:SetTarget(c69058960.target) - e1:SetOperation(c69058960.operation) - c:RegisterEffect(e1) - -- - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e2:SetCondition(c69058960.indcon) - e2:SetValue(1) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - c:RegisterEffect(e3) - --reflect - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetCode(EFFECT_REFLECT_BATTLE_DAMAGE) - e4:SetCondition(c69058960.refcon) - e4:SetValue(1) - c:RegisterEffect(e4) -end -c69058960.xyz_number=13 -function c69058960.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c69058960.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0 end -end -function c69058960.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local g=Duel.GetFieldGroup(tp,0,LOCATION_MZONE) - if g:GetCount()>0 then - Duel.ChangePosition(g,POS_FACEUP_ATTACK) - c:RegisterFlagEffect(69058960,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) - local tc=g:GetFirst() - while tc do - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_MUST_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_CANNOT_EP) - e2:SetRange(LOCATION_MZONE) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetTargetRange(1,0) - e2:SetCondition(c69058960.becon) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetRange(LOCATION_MZONE) - e3:SetTargetRange(0,LOCATION_MZONE) - e3:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_IMMUNE) - e3:SetCode(EFFECT_CANNOT_BE_BATTLE_TARGET) - e3:SetTarget(c69058960.bttg) - e3:SetValue(c69058960.vala) - e3:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e3) - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetCode(EFFECT_CANNOT_DIRECT_ATTACK) - e4:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e4) - tc=g:GetNext() - end - end -end -function c69058960.filter(c) - return c:IsFaceup() and c:IsCode(95442074) -end -function c69058960.indcon(e) - return Duel.IsExistingMatchingCard(c69058960.filter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) - and e:GetHandler():GetOverlayCount()~=0 -end -function c69058960.refcon(e) - return Duel.IsExistingMatchingCard(c69058960.filter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) - and Duel.GetAttackTarget()==e:GetHandler() -end -function c69058960.becon(e) - return e:GetHandler():IsAttackable() -end -function c69058960.bttg(e,c) - return c:GetFlagEffect(69058960)==0 -end -function c69058960.vala(e,c) - return c==e:GetHandler() -end diff --git a/script/c69069911.lua b/script/c69069911.lua deleted file mode 100644 index f7e6153d30..0000000000 --- a/script/c69069911.lua +++ /dev/null @@ -1,28 +0,0 @@ ---カチコチドラゴン -function c69069911.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,4,2) - c:EnableReviveLimit() - --chain attack - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(69069911,0)) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_BATTLE_DESTROYING) - e1:SetCountLimit(1) - e1:SetCondition(c69069911.atcon) - e1:SetCost(c69069911.atcost) - e1:SetOperation(c69069911.atop) - c:RegisterEffect(e1) -end -function c69069911.atcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local bc=c:GetBattleTarget() - return bc:IsLocation(LOCATION_GRAVE) and bc:IsType(TYPE_MONSTER) and c:IsChainAttackable() and c:IsStatus(STATUS_OPPO_BATTLE) -end -function c69069911.atcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c69069911.atop(e,tp,eg,ep,ev,re,r,rp) - Duel.ChainAttack() -end diff --git a/script/c69091732.lua b/script/c69091732.lua deleted file mode 100644 index 4f8b40ced5..0000000000 --- a/script/c69091732.lua +++ /dev/null @@ -1,28 +0,0 @@ ---義賊の入門書 -function c69091732.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_HANDES) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetHintTiming(0,TIMING_TOHAND) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c69091732.condition) - e1:SetTarget(c69091732.target) - e1:SetOperation(c69091732.activate) - c:RegisterEffect(e1) -end -function c69091732.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>4 -end -function c69091732.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,1-tp,1) -end -function c69091732.activate(e,tp,eg,ep,ev,re,r,rp) - local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) - local g=Duel.GetFieldGroup(p,LOCATION_HAND,0) - local dg=g:RandomSelect(tp,1) - Duel.SendtoGrave(dg,REASON_EFFECT+REASON_DISCARD) -end diff --git a/script/c69112325.lua b/script/c69112325.lua deleted file mode 100644 index 2b7d5069f7..0000000000 --- a/script/c69112325.lua +++ /dev/null @@ -1,24 +0,0 @@ ---神聖なる森 -function c69112325.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - -- - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_INDESTRUCTABLE_COUNT) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(LOCATION_MZONE,0) - e2:SetTarget(c69112325.indtg) - e2:SetCountLimit(1) - e2:SetValue(c69112325.valcon) - c:RegisterEffect(e2) -end -function c69112325.indtg(e,c) - return c:IsRace(RACE_PLANT+RACE_BEAST+RACE_BEASTWARRIOR) -end -function c69112325.valcon(e,re,r,rp) - return bit.band(r,REASON_BATTLE)~=0 -end diff --git a/script/c69122763.lua b/script/c69122763.lua deleted file mode 100644 index 4fa5adb61b..0000000000 --- a/script/c69122763.lua +++ /dev/null @@ -1,34 +0,0 @@ ---守護霊のお守り -function c69122763.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetCondition(c69122763.condition) - e1:SetTarget(c69122763.target) - e1:SetOperation(c69122763.activate) - c:RegisterEffect(e1) -end -function c69122763.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end -function c69122763.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) -end -function c69122763.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - e1:SetValue(Duel.GetMatchingGroupCount(Card.IsType,tp,LOCATION_GRAVE,0,nil,TYPE_MONSTER)*100) - tc:RegisterEffect(e1) - end -end diff --git a/script/c69123138.lua b/script/c69123138.lua deleted file mode 100644 index 1bdb9bd597..0000000000 --- a/script/c69123138.lua +++ /dev/null @@ -1,4 +0,0 @@ ---ゼラ -function c69123138.initial_effect(c) - c:EnableReviveLimit() -end diff --git a/script/c69155991.lua b/script/c69155991.lua deleted file mode 100644 index 19c7270891..0000000000 --- a/script/c69155991.lua +++ /dev/null @@ -1,75 +0,0 @@ ---スクラップ・シャーク -function c69155991.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_CHAINING) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetRange(LOCATION_MZONE) - e1:SetOperation(c69155991.chop) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EVENT_CHAIN_SOLVED) - e2:SetOperation(c69155991.desop1) - c:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e3:SetRange(LOCATION_MZONE) - e3:SetCode(EVENT_BATTLED) - e3:SetProperty(EFFECT_FLAG_AVAILABLE_BD) - e3:SetOperation(c69155991.desop2) - e3:SetLabelObject(e2) - c:RegisterEffect(e3) - --to grave - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(69155991,0)) - e4:SetCategory(CATEGORY_TOGRAVE) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e4:SetCode(EVENT_TO_GRAVE) - e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e4:SetCondition(c69155991.tgcon) - e4:SetTarget(c69155991.tgtg) - e4:SetOperation(c69155991.tgop) - c:RegisterEffect(e4) -end -function c69155991.chop(e,tp,eg,ep,ev,re,r,rp) - if re:IsHasType(EFFECT_TYPE_ACTIVATE) or re:GetHandler():IsType(TYPE_MONSTER) then - e:GetHandler():RegisterFlagEffect(69155991,RESET_EVENT+0x1fe0000+RESET_CHAIN,0,1) - end -end -function c69155991.desop1(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:GetFlagEffect(69155991)==0 then return end - c:ResetFlagEffect(69155991) - local ph=Duel.GetCurrentPhase() - if (ph==PHASE_DAMAGE or ph==PHASE_DAMAGE_CAL) and not Duel.IsDamageCalculated() then - c:RegisterFlagEffect(69155992,RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_DAMAGE,0,1) - else - Duel.Destroy(c,REASON_EFFECT) - end -end -function c69155991.desop2(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():GetFlagEffect(69155992)~=0 then - Duel.Destroy(e:GetHandler(),REASON_EFFECT) - end -end -function c69155991.tgcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return bit.band(c:GetReason(),0x41)==0x41 and re:GetOwner():IsSetCard(0x24) -end -function c69155991.filter(c) - return c:IsSetCard(0x24) and c:IsType(TYPE_MONSTER) and c:IsAbleToGrave() -end -function c69155991.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c69155991.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) -end -function c69155991.tgop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c69155991.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoGrave(g,REASON_EFFECT) - end -end diff --git a/script/c69162969.lua b/script/c69162969.lua deleted file mode 100644 index 673b5718cc..0000000000 --- a/script/c69162969.lua +++ /dev/null @@ -1,28 +0,0 @@ ---ライトニング・ボルテックス -function c69162969.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c69162969.cost) - e1:SetTarget(c69162969.target) - e1:SetOperation(c69162969.activate) - c:RegisterEffect(e1) -end -function c69162969.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) -end -function c69162969.filter(c) - return c:IsFaceup() and c:IsDestructable() -end -function c69162969.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c69162969.filter,tp,0,LOCATION_MZONE,1,nil) end - local sg=Duel.GetMatchingGroup(c69162969.filter,tp,0,LOCATION_MZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,sg:GetCount(),0,0) -end -function c69162969.activate(e,tp,eg,ep,ev,re,r,rp) - local sg=Duel.GetMatchingGroup(c69162969.filter,tp,0,LOCATION_MZONE,nil) - Duel.Destroy(sg,REASON_EFFECT) -end diff --git a/script/c69170557.lua b/script/c69170557.lua deleted file mode 100644 index 39464e9cdb..0000000000 --- a/script/c69170557.lua +++ /dev/null @@ -1,63 +0,0 @@ ---CNo.40 ギミック・パペット-デビルズ・ストリングス -function c69170557.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,9,3) - c:EnableReviveLimit() - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(69170557,0)) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetTarget(c69170557.destg) - e1:SetOperation(c69170557.desop) - c:RegisterEffect(e1) - --counter - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(69170557,1)) - e2:SetCategory(CATEGORY_COUNTER) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCost(c69170557.ctcost) - e2:SetTarget(c69170557.cttg) - e2:SetOperation(c69170557.ctop) - c:RegisterEffect(e2) -end -c69170557.xyz_number=40 -function c69170557.desfilter(c) - return c:GetCounter(0x24)~=0 and c:IsDestructable() -end -function c69170557.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local g=Duel.GetMatchingGroup(c69170557.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c69170557.desop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c69170557.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - if Duel.Destroy(g,REASON_EFFECT)==0 then return end - local og=Duel.GetOperatedGroup():Filter(Card.IsLocation,nil,LOCATION_GRAVE) - if Duel.Draw(tp,1,REASON_EFFECT)~=0 and og:GetCount()>0 then - Duel.BreakEffect() - local mg,matk=og:GetMaxGroup(Card.GetBaseAttack) - if matk>0 then - Duel.Damage(1-tp,matk,REASON_EFFECT) - end - end -end -function c69170557.ctcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c69170557.cttg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end -end -function c69170557.ctop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil) - local tc=g:GetFirst() - while tc do - tc:AddCounter(0x24,1) - tc=g:GetNext() - end -end diff --git a/script/c69176131.lua b/script/c69176131.lua deleted file mode 100644 index 0adaaae0f9..0000000000 --- a/script/c69176131.lua +++ /dev/null @@ -1,23 +0,0 @@ ---スペース・サイクロン -function c69176131.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c69176131.target) - e1:SetOperation(c69176131.activate) - c:RegisterEffect(e1) -end -function c69176131.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckRemoveOverlayCard(tp,1,1,1,REASON_EFFECT) end -end -function c69176131.activate(e,tp,eg,ep,ev,re,r,rp) - local sg=Duel.GetMatchingGroup(Card.CheckRemoveOverlayCard,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp,1,REASON_EFFECT) - if sg:GetCount()==0 then return end - if sg:GetCount()>1 then - Duel.Hint(HINT_SELECTMSG,tp,532) - sg=sg:Select(tp,1,1,nil) - Duel.HintSelection(sg) - end - sg:GetFirst():RemoveOverlayCard(tp,1,1,REASON_EFFECT) -end diff --git a/script/c691925.lua b/script/c691925.lua deleted file mode 100644 index 2e750ce7a0..0000000000 --- a/script/c691925.lua +++ /dev/null @@ -1,33 +0,0 @@ ---ソーラー・エクスチェンジ -function c691925.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DRAW+CATEGORY_DECKDES) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c691925.cost) - e1:SetTarget(c691925.target) - e1:SetOperation(c691925.activate) - c:RegisterEffect(e1) -end -function c691925.costfilter(c) - return c:IsSetCard(0x38) and c:IsType(TYPE_MONSTER) and c:IsDiscardable() -end -function c691925.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c691925.costfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,c691925.costfilter,1,1,REASON_COST+REASON_DISCARD,nil) -end -function c691925.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp,4) and Duel.IsPlayerCanDiscardDeck(tp,2) end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(2) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2) - Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,2) -end -function c691925.activate(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) - Duel.BreakEffect() - Duel.DiscardDeck(tp,2,REASON_EFFECT) -end diff --git a/script/c69196160.lua b/script/c69196160.lua deleted file mode 100644 index 4257fd4ac7..0000000000 --- a/script/c69196160.lua +++ /dev/null @@ -1,22 +0,0 @@ ---サンダー・クラッシュ -function c69196160.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c69196160.target) - e1:SetOperation(c69196160.activate) - c:RegisterEffect(e1) -end -function c69196160.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDestructable,tp,LOCATION_MZONE,0,1,nil) end - local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,LOCATION_MZONE,0,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,g:GetCount()*300) -end -function c69196160.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,LOCATION_MZONE,0,nil) - local ct=Duel.Destroy(g,REASON_EFFECT) - Duel.Damage(1-tp,ct*300,REASON_EFFECT) -end diff --git a/script/c69207766.lua b/script/c69207766.lua deleted file mode 100644 index c053ea931f..0000000000 --- a/script/c69207766.lua +++ /dev/null @@ -1,86 +0,0 @@ ---甲虫装機 ホーネット -function c69207766.initial_effect(c) - --equip - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetDescription(aux.Stringid(69207766,0)) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetTarget(c69207766.eqtg) - e1:SetOperation(c69207766.eqop) - c:RegisterEffect(e1) - --equip effect - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(500) - c:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_EQUIP) - e3:SetCode(EFFECT_UPDATE_DEFENCE) - e3:SetValue(200) - c:RegisterEffect(e3) - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_EQUIP) - e4:SetCode(EFFECT_UPDATE_LEVEL) - e4:SetValue(3) - c:RegisterEffect(e4) - --destroy - local e5=Effect.CreateEffect(c) - e5:SetDescription(aux.Stringid(69207766,1)) - e5:SetCategory(CATEGORY_DESTROY) - e5:SetProperty(EFFECT_FLAG_CARD_TARGET) - e5:SetType(EFFECT_TYPE_IGNITION) - e5:SetRange(LOCATION_SZONE) - e5:SetCost(c69207766.descost) - e5:SetTarget(c69207766.destg) - e5:SetOperation(c69207766.desop) - c:RegisterEffect(e5) -end -function c69207766.filter(c) - return c:IsSetCard(0x56) and c:IsType(TYPE_MONSTER) and not c:IsHasEffect(EFFECT_NECRO_VALLEY) -end -function c69207766.eqtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingMatchingCard(c69207766.filter,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,nil,1,tp,LOCATION_GRAVE+LOCATION_HAND) -end -function c69207766.eqop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end - if c:IsFacedown() or not c:IsRelateToEffect(e) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local g=Duel.SelectMatchingCard(tp,c69207766.filter,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,1,nil) - local tc=g:GetFirst() - if tc then - if not Duel.Equip(tp,tc,c,true) then return end - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_COPY_INHERIT+EFFECT_FLAG_OWNER_RELATE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(c69207766.eqlimit) - tc:RegisterEffect(e1) - end -end -function c69207766.eqlimit(e,c) - return e:GetOwner()==c -end -function c69207766.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end -function c69207766.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsDestructable() end - if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c69207766.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c69211541.lua b/script/c69211541.lua deleted file mode 100644 index d0ecdf7315..0000000000 --- a/script/c69211541.lua +++ /dev/null @@ -1,76 +0,0 @@ ---EMパートナーガ -function c69211541.initial_effect(c) - --pendulum summon - aux.AddPendulumProcedure(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --atk - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(69211541,0)) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_PZONE) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCountLimit(1) - e2:SetTarget(c69211541.atktg) - e2:SetOperation(c69211541.atkop1) - c:RegisterEffect(e2) - --atk - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(69211541,1)) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_SUMMON_SUCCESS) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e3:SetTarget(c69211541.atktg) - e3:SetOperation(c69211541.atkop2) - c:RegisterEffect(e3) - local e4=e3:Clone() - e4:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e4) - --cannot attack - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_FIELD) - e5:SetCode(EFFECT_CANNOT_ATTACK) - e5:SetRange(LOCATION_MZONE) - e5:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e5:SetTarget(aux.TargetBoolFunction(Card.IsLevelBelow,5)) - c:RegisterEffect(e5) -end -function c69211541.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,nil) -end -function c69211541.filter(c) - return c:IsFaceup() and c:IsSetCard(0x9f) -end -function c69211541.atkop1(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) then return end - local tc=Duel.GetFirstTarget() - local ct=Duel.GetMatchingGroupCount(c69211541.filter,tp,LOCATION_ONFIELD,0,nil) - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(ct*300) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - end -end -function c69211541.atkop2(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - local ct=Duel.GetMatchingGroupCount(c69211541.filter,tp,LOCATION_MZONE,0,nil) - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetValue(ct*300) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - end -end diff --git a/script/c69230391.lua b/script/c69230391.lua deleted file mode 100644 index e040c1afdf..0000000000 --- a/script/c69230391.lua +++ /dev/null @@ -1,81 +0,0 @@ ---爆炎帝テスタロス -function c69230391.initial_effect(c) - --summon with 1 tribute - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(69230391,0)) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SUMMON_PROC) - e1:SetCondition(c69230391.otcon) - e1:SetOperation(c69230391.otop) - e1:SetValue(SUMMON_TYPE_ADVANCE) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_SET_PROC) - c:RegisterEffect(e2) - --handes - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(69230391,1)) - e3:SetCategory(CATEGORY_HANDES+CATEGORY_DAMAGE) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e3:SetCode(EVENT_SUMMON_SUCCESS) - e3:SetCondition(c69230391.condition) - e3:SetTarget(c69230391.target) - e3:SetOperation(c69230391.operation) - c:RegisterEffect(e3) - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetCode(EFFECT_MATERIAL_CHECK) - e4:SetValue(c69230391.valcheck) - e4:SetLabelObject(e3) - c:RegisterEffect(e4) -end -function c69230391.otfilter(c) - return bit.band(c:GetSummonType(),SUMMON_TYPE_ADVANCE)==SUMMON_TYPE_ADVANCE -end -function c69230391.otcon(e,c) - if c==nil then return true end - local mg=Duel.GetMatchingGroup(c69230391.otfilter,0,LOCATION_MZONE,LOCATION_MZONE,nil) - return c:GetLevel()>6 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-1 - and Duel.GetTributeCount(c,mg)>0 -end -function c69230391.otop(e,tp,eg,ep,ev,re,r,rp,c) - local mg=Duel.GetMatchingGroup(c69230391.otfilter,0,LOCATION_MZONE,LOCATION_MZONE,nil) - local sg=Duel.SelectTribute(tp,c,1,1,mg) - c:SetMaterial(sg) - Duel.Release(sg,REASON_SUMMON+REASON_MATERIAL) -end -function c69230391.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_ADVANCE -end -function c69230391.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,1-tp,1) - if e:GetLabel()==1 then - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,1000) - end -end -function c69230391.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND) - if g:GetCount()==0 then return end - Duel.ConfirmCards(tp,g) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) - local hg=g:Select(tp,1,1,nil) - Duel.SendtoGrave(hg,REASON_EFFECT+REASON_DISCARD) - Duel.ShuffleHand(1-tp) - local tc=hg:GetFirst() - if tc:IsType(TYPE_MONSTER) then - Duel.Damage(1-tp,tc:GetLevel()*200,REASON_EFFECT) - end - if e:GetLabel()==1 then - Duel.Damage(1-tp,1000,REASON_EFFECT) - end -end -function c69230391.valcheck(e,c) - local g=c:GetMaterial() - if g:IsExists(Card.IsAttribute,1,nil,ATTRIBUTE_FIRE) then - e:GetLabelObject():SetLabel(1) - else - e:GetLabelObject():SetLabel(0) - end -end diff --git a/script/c69243722.lua b/script/c69243722.lua deleted file mode 100644 index e54d0efb91..0000000000 --- a/script/c69243722.lua +++ /dev/null @@ -1,42 +0,0 @@ ---ジェムナイト・エメラル -function c69243722.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(69243722,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c69243722.cost) - e1:SetTarget(c69243722.target) - e1:SetOperation(c69243722.operation) - c:RegisterEffect(e1) -end -function c69243722.costfilter(c) - return c:IsFaceup() and c:IsType(TYPE_NORMAL) and c:IsAbleToRemoveAsCost() -end -function c69243722.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() - and Duel.IsExistingMatchingCard(c69243722.costfilter,tp,LOCATION_MZONE,0,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local rg=Duel.SelectMatchingCard(tp,c69243722.costfilter,tp,LOCATION_MZONE,0,1,1,e:GetHandler()) - rg:AddCard(e:GetHandler()) - Duel.Remove(rg,POS_FACEUP,REASON_COST) -end -function c69243722.filter(c,e,tp) - return c:IsSetCard(0x1047) and c:IsType(TYPE_FUSION) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c69243722.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c69243722.filter(chkc,e,tp) end - if chk==0 then return Duel.IsExistingTarget(c69243722.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c69243722.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,g:GetCount(),0,0) -end -function c69243722.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c69243953.lua b/script/c69243953.lua deleted file mode 100644 index b9cd464d9a..0000000000 --- a/script/c69243953.lua +++ /dev/null @@ -1,70 +0,0 @@ ---蝶の短剣-エルマ -function c69243953.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c69243953.target) - e1:SetOperation(c69243953.operation) - c:RegisterEffect(e1) - --Atk - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(300) - c:RegisterEffect(e2) - --Equip limit - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_EQUIP_LIMIT) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e3:SetValue(1) - c:RegisterEffect(e3) - --tohand - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(69243953,0)) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e4:SetCategory(CATEGORY_TOHAND) - e4:SetCode(EVENT_LEAVE_FIELD) - e4:SetCondition(c69243953.retcon) - e4:SetTarget(c69243953.rettg) - e4:SetOperation(c69243953.retop) - c:RegisterEffect(e4) -end -function c69243953.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c69243953.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,c,tc) - end -end -function c69243953.checkeq(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():GetEquipTarget() then - e:SetLabel(1) - else e:SetLabel(0) end -end -function c69243953.retcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsLocation(LOCATION_GRAVE) and c:IsReason(REASON_DESTROY) and c:GetEquipTarget()~=nil -end -function c69243953.rettg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToHand() end - e:GetHandler():CreateEffectRelation(e) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0) -end -function c69243953.retop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SendtoHand(c,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,c) - end -end diff --git a/script/c6924874.lua b/script/c6924874.lua deleted file mode 100644 index b6a965d237..0000000000 --- a/script/c6924874.lua +++ /dev/null @@ -1,61 +0,0 @@ ---ハーピィズペット仔竜 -function c6924874.initial_effect(c) - --at limit - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(0,LOCATION_MZONE) - e1:SetValue(c6924874.atlimit) - c:RegisterEffect(e1) - --atk/def - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EFFECT_SET_BASE_ATTACK) - e2:SetCondition(c6924874.adcon) - e2:SetValue(2400) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EFFECT_SET_BASE_DEFENCE) - e3:SetValue(1200) - c:RegisterEffect(e3) - --destroy - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(6924874,0)) - e4:SetCategory(CATEGORY_DESTROY) - e4:SetType(EFFECT_TYPE_IGNITION) - e4:SetRange(LOCATION_MZONE) - e4:SetCountLimit(1) - e4:SetProperty(EFFECT_FLAG_CARD_TARGET) - e4:SetCondition(c6924874.descon) - e4:SetTarget(c6924874.destg) - e4:SetOperation(c6924874.desop) - c:RegisterEffect(e4) -end -function c6924874.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x64) and c:GetCode()~=6924874 -end -function c6924874.atlimit(e,c) - return c:IsFaceup() and c:IsSetCard(0x64) and c:GetCode()~=6924874 -end -function c6924874.adcon(e) - return Duel.IsExistingMatchingCard(c6924874.cfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,2,nil) -end -function c6924874.descon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c6924874.cfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,3,nil) -end -function c6924874.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and chkc:IsDestructable() end - if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,0,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,0,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c6924874.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c69257165.lua b/script/c69257165.lua deleted file mode 100644 index 731479daef..0000000000 --- a/script/c69257165.lua +++ /dev/null @@ -1,48 +0,0 @@ ---精神汚染 -function c69257165.initial_effect(c) - --control - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCategory(CATEGORY_CONTROL) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCost(c69257165.cost) - e1:SetTarget(c69257165.target) - e1:SetOperation(c69257165.operation) - c:RegisterEffect(e1) -end -function c69257165.ctffilter(c,lv) - return c:IsFaceup() and c:IsControlerCanBeChanged() and c:GetLevel()==lv -end -function c69257165.ctfilter(c,tp) - return c:IsType(TYPE_MONSTER) and c:IsDiscardable() - and Duel.IsExistingTarget(c69257165.ctffilter,tp,0,LOCATION_MZONE,1,nil,c:GetLevel()) -end -function c69257165.cost(e,tp,eg,ep,ev,re,r,rp,chk) - e:SetLabel(100) - return true -end -function c69257165.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c69257165.ctffilter(chkc,e:GetLabel()) end - if chk==0 then - if e:GetLabel()~=100 then return false end - e:SetLabel(0) - return Duel.IsExistingMatchingCard(c69257165.ctfilter,tp,LOCATION_HAND,0,1,nil,tp) - end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) - local sg=Duel.SelectMatchingCard(tp,c69257165.ctfilter,tp,LOCATION_HAND,0,1,1,nil,tp) - local lv=sg:GetFirst():GetLevel() - e:SetLabel(lv) - Duel.SendtoGrave(sg,REASON_COST+REASON_DISCARD) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) - local g=Duel.SelectTarget(tp,c69257165.ctffilter,tp,0,LOCATION_MZONE,1,1,nil,lv) - Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0) -end -function c69257165.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:GetLevel()==e:GetLabel() and not Duel.GetControl(tc,tp,PHASE_END,1) then - if not tc:IsImmuneToEffect(e) and tc:IsAbleToChangeControler() then - Duel.Destroy(tc,REASON_EFFECT) - end - end -end diff --git a/script/c69270537.lua b/script/c69270537.lua deleted file mode 100644 index 57a518ac96..0000000000 --- a/script/c69270537.lua +++ /dev/null @@ -1,40 +0,0 @@ ---コンタクト・アウト -function c69270537.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TODECK+CATEGORY_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c69270537.target) - e1:SetOperation(c69270537.activate) - c:RegisterEffect(e1) -end -function c69270537.tdfilter(c) - return c:IsFaceup() and c:IsSetCard(0x9) and c:IsType(TYPE_FUSION) and c:IsAbleToExtra() -end -function c69270537.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c69270537.tdfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c69270537.tdfilter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectTarget(tp,c69270537.tdfilter,tp,LOCATION_MZONE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0) -end -function c69270537.spfilter(c,e,tp,fc) - for i=1,fc.material_count do - if c:GetCode()==fc.material[i] then return c:IsCanBeSpecialSummoned(e,0,tp,false,false) end - end - return false -end -function c69270537.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() and Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)~=0 - and Duel.GetLocationCount(tp,LOCATION_MZONE)>1 and tc:IsLocation(LOCATION_EXTRA) then - local sg=Duel.GetMatchingGroup(c69270537.spfilter,tp,LOCATION_DECK,0,nil,e,tp,tc) - if tc:CheckFusionMaterial(sg,nil,PLAYER_NONE) and Duel.SelectYesNo(tp,aux.Stringid(69270537,0)) then - Duel.BreakEffect() - local mats=Duel.SelectFusionMaterial(tp,tc,sg,nil,PLAYER_NONE) - Duel.SpecialSummon(mats,0,tp,tp,false,false,POS_FACEUP) - end - end -end diff --git a/script/c69279219.lua b/script/c69279219.lua deleted file mode 100644 index d145420b77..0000000000 --- a/script/c69279219.lua +++ /dev/null @@ -1,39 +0,0 @@ ---我が身を盾に -function c69279219.initial_effect(c) - --Negate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_CHAINING) - e1:SetCondition(c69279219.condition) - e1:SetCost(c69279219.cost) - e1:SetTarget(c69279219.target) - e1:SetOperation(c69279219.operation) - c:RegisterEffect(e1) -end -function c69279219.cfilter(c) - return c:IsOnField() and c:IsType(TYPE_MONSTER) -end -function c69279219.condition(e,tp,eg,ep,ev,re,r,rp) - if tp==ep or not Duel.IsChainNegatable(ev) then return false end - if not re:IsActiveType(TYPE_MONSTER) and not re:IsHasType(EFFECT_TYPE_ACTIVATE) then return false end - local ex,tg,tc=Duel.GetOperationInfo(ev,CATEGORY_DESTROY) - return ex and tg~=nil and tc+tg:FilterCount(c69279219.cfilter,nil)-tg:GetCount()>0 -end -function c69279219.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,1500) end - Duel.PayLPCost(tp,1500) -end -function c69279219.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) - end -end -function c69279219.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateActivation(ev) - if re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(eg,REASON_EFFECT) - end -end diff --git a/script/c69293721.lua b/script/c69293721.lua deleted file mode 100644 index f77e0a8b2d..0000000000 --- a/script/c69293721.lua +++ /dev/null @@ -1,36 +0,0 @@ ---水精鱗-アビスグンデ -function c69293721.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(69293721,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCountLimit(1,69293721) - e1:SetCondition(c69293721.condition) - e1:SetTarget(c69293721.target) - e1:SetOperation(c69293721.operation) - c:RegisterEffect(e1) -end -function c69293721.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsReason(REASON_DISCARD) and e:GetHandler():IsPreviousLocation(LOCATION_HAND) -end -function c69293721.filter(c,e,tp) - return c:IsSetCard(0x74) and c:GetCode()~=69293721 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c69293721.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c69293721.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c69293721.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c69293721.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c69293721.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c69296555.lua b/script/c69296555.lua deleted file mode 100644 index b6a52d9518..0000000000 --- a/script/c69296555.lua +++ /dev/null @@ -1,28 +0,0 @@ ---光の護封陣 -function c69296555.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c69296555.target) - c:RegisterEffect(e1) - --race - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_CANNOT_ATTACK) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e2:SetTarget(c69296555.atktg) - c:RegisterEffect(e2) - e1:SetLabelObject(e2) -end -function c69296555.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,563) - local rc=Duel.AnnounceRace(tp,1,0xffffff) - e:GetLabelObject():SetLabel(rc) - e:GetHandler():SetHint(CHINT_RACE,rc) -end -function c69296555.atktg(e,c) - return c:IsStatus(STATUS_SUMMON_TURN+STATUS_FLIP_SUMMON_TURN+STATUS_SPSUMMON_TURN) and c:IsRace(e:GetLabel()) -end diff --git a/script/c69303178.lua b/script/c69303178.lua deleted file mode 100644 index 99d19b1071..0000000000 --- a/script/c69303178.lua +++ /dev/null @@ -1,40 +0,0 @@ ---光神機-桜火 -function c69303178.initial_effect(c) - --summon with no tribute - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(69303178,0)) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SUMMON_PROC) - e1:SetCondition(c69303178.ntcon) - e1:SetOperation(c69303178.ntop) - c:RegisterEffect(e1) -end -function c69303178.ntcon(e,c,minc) - if c==nil then return true end - return minc==0 and c:GetLevel()>4 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 -end -function c69303178.ntop(e,tp,eg,ep,ev,re,r,rp,c) - --to grave - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(69303178,1)) - e1:SetCategory(CATEGORY_TOGRAVE) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetTarget(c69303178.tgtg) - e1:SetOperation(c69303178.tgop) - e1:SetReset(RESET_EVENT+0xc6e0000) - c:RegisterEffect(e1) -end -function c69303178.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,e:GetHandler(),1,0,0) -end -function c69303178.tgop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - Duel.SendtoGrave(c,REASON_EFFECT) - end -end diff --git a/script/c69304426.lua b/script/c69304426.lua deleted file mode 100644 index a844664993..0000000000 --- a/script/c69304426.lua +++ /dev/null @@ -1,81 +0,0 @@ ---アーティファクト-ヴァジュラ -function c69304426.initial_effect(c) - --set - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_MONSTER_SSET) - e1:SetValue(TYPE_SPELL) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetCondition(c69304426.spcon) - e2:SetTarget(c69304426.sptg) - e2:SetOperation(c69304426.spop) - c:RegisterEffect(e2) - --destroy - local e3=Effect.CreateEffect(c) - e3:SetCategory(CATEGORY_DESTROY) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - e3:SetCondition(c69304426.descon) - e3:SetTarget(c69304426.destg) - e3:SetOperation(c69304426.desop) - c:RegisterEffect(e3) - --spsummon - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(69304426,0)) - e4:SetCategory(CATEGORY_SPECIAL_SUMMON) - e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e4:SetCode(EVENT_ATTACK_ANNOUNCE) - e4:SetRange(LOCATION_HAND) - e4:SetCondition(c69304426.hspcon) - e4:SetTarget(c69304426.hsptg) - e4:SetOperation(c69304426.hspop) - c:RegisterEffect(e4) -end -function c69304426.spcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsPreviousLocation(LOCATION_SZONE) and c:IsPreviousPosition(POS_FACEDOWN) - and c:IsReason(REASON_DESTROY) and Duel.GetTurnPlayer()~=tp -end -function c69304426.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c69304426.spop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP) - end -end -function c69304426.descon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp -end -function c69304426.filter(c) - return c:GetSequence()<5 and c:IsDestructable() -end -function c69304426.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local g=Duel.GetMatchingGroup(c69304426.filter,tp,LOCATION_SZONE,0,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c69304426.desop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c69304426.filter,tp,LOCATION_SZONE,0,nil) - Duel.Destroy(g,REASON_EFFECT) -end -function c69304426.hspcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetAttacker():IsControler(1-tp) and Duel.GetAttackTarget()==nil -end -function c69304426.hsptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c69304426.hspop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c6930746.lua b/script/c6930746.lua deleted file mode 100644 index 03f7e9a7da..0000000000 --- a/script/c6930746.lua +++ /dev/null @@ -1,20 +0,0 @@ ---限界竜シュヴァルツシルト -function c6930746.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c6930746.spcon) - c:RegisterEffect(e1) -end -function c6930746.filter(c) - return c:IsFaceup() and c:IsAttackAbove(2000) -end -function c6930746.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c6930746.filter,tp,0,LOCATION_MZONE,1,nil) -end diff --git a/script/c69313735.lua b/script/c69313735.lua deleted file mode 100644 index 6a4d3c77e0..0000000000 --- a/script/c69313735.lua +++ /dev/null @@ -1,47 +0,0 @@ ---ディスカバード・アタック -function c69313735.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c69313735.cost) - e1:SetTarget(c69313735.target) - e1:SetOperation(c69313735.activate) - c:RegisterEffect(e1) -end -function c69313735.cost(e,tp,eg,ep,ev,re,r,rp,chk) - e:SetLabel(1) - return true -end -function c69313735.rfilter(c,tp) - return c:IsSetCard(0x45) and Duel.IsExistingTarget(c69313735.filter,tp,LOCATION_MZONE,0,1,c) -end -function c69313735.filter(c) - return c:IsFaceup() and c:IsCode(35975813) -end -function c69313735.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c69313735.filter(chkc) end - if chk==0 then - if e:GetLabel()==0 then return Duel.IsExistingTarget(c69313735.filter,tp,LOCATION_MZONE,0,1,nil) end - e:SetLabel(0) - return Duel.CheckReleaseGroup(tp,c69313735.rfilter,1,nil,tp) - end - if e:GetLabel()~=0 then - e:SetLabel(0) - local rg=Duel.SelectReleaseGroup(tp,c69313735.rfilter,1,1,nil,tp) - Duel.Release(rg,REASON_COST) - end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c69313735.filter,tp,LOCATION_MZONE,0,1,1,nil) -end -function c69313735.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DIRECT_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - end -end diff --git a/script/c69320362.lua b/script/c69320362.lua deleted file mode 100644 index 01cca1ff9a..0000000000 --- a/script/c69320362.lua +++ /dev/null @@ -1,26 +0,0 @@ ---伝説のゼンマイ -function c69320362.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_POSITION) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_END_PHASE) - e1:SetTarget(c69320362.target) - e1:SetOperation(c69320362.activate) - c:RegisterEffect(e1) -end -function c69320362.filter(c) - return c:IsFaceup() and c:IsSetCard(0x58) and c:IsCanTurnSet() -end -function c69320362.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c69320362.filter,tp,LOCATION_MZONE,0,1,nil) end - local g=Duel.GetMatchingGroup(c69320362.filter,tp,LOCATION_MZONE,0,nil) - Duel.SetOperationInfo(0,CATEGORY_POSITION,g,g:GetCount(),0,0) -end -function c69320362.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c69320362.filter,tp,LOCATION_MZONE,0,nil) - if g:GetCount()>0 then - Duel.ChangePosition(g,POS_FACEDOWN_DEFENCE) - end -end diff --git a/script/c69327790.lua b/script/c69327790.lua deleted file mode 100644 index 6c4aec2817..0000000000 --- a/script/c69327790.lua +++ /dev/null @@ -1,94 +0,0 @@ ---烈風帝ライザー -function c69327790.initial_effect(c) - --summon with 1 tribute - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(69327790,0)) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SUMMON_PROC) - e1:SetCondition(c69327790.otcon) - e1:SetOperation(c69327790.otop) - e1:SetValue(SUMMON_TYPE_ADVANCE) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_SET_PROC) - c:RegisterEffect(e2) - --todeck - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(69327790,1)) - e3:SetCategory(CATEGORY_TODECK) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e3:SetCode(EVENT_SUMMON_SUCCESS) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetCondition(c69327790.tdcon) - e3:SetTarget(c69327790.tdtg) - e3:SetOperation(c69327790.tdop) - c:RegisterEffect(e3) - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetCode(EFFECT_MATERIAL_CHECK) - e4:SetValue(c69327790.valcheck) - e4:SetLabelObject(e3) - c:RegisterEffect(e4) -end -function c69327790.otfilter(c) - return bit.band(c:GetSummonType(),SUMMON_TYPE_ADVANCE)==SUMMON_TYPE_ADVANCE -end -function c69327790.otcon(e,c) - if c==nil then return true end - local mg=Duel.GetMatchingGroup(c69327790.otfilter,0,LOCATION_MZONE,LOCATION_MZONE,nil) - return c:GetLevel()>6 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-1 - and Duel.GetTributeCount(c,mg)>0 -end -function c69327790.otop(e,tp,eg,ep,ev,re,r,rp,c) - local mg=Duel.GetMatchingGroup(c69327790.otfilter,0,LOCATION_MZONE,LOCATION_MZONE,nil) - local sg=Duel.SelectTribute(tp,c,1,1,mg) - c:SetMaterial(sg) - Duel.Release(sg,REASON_SUMMON+REASON_MATERIAL) -end -function c69327790.tdcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_ADVANCE -end -function c69327790.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g1=Duel.SelectTarget(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g2=Duel.SelectTarget(tp,nil,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil) - if e:GetLabel()==1 - and Duel.IsExistingTarget(Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,g1:GetFirst()) - and Duel.SelectYesNo(tp,aux.Stringid(69327790,2)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g3=Duel.SelectTarget(tp,Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,g1:GetFirst()) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g3,1,0,0) - end - g1:Merge(g2) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g1,2,0,0) -end -function c69327790.tdop(e,tp,eg,ep,ev,re,r,rp) - local ex,g1=Duel.GetOperationInfo(0,CATEGORY_TODECK) - local ex2,g2=Duel.GetOperationInfo(0,CATEGORY_TOHAND) - local sg1=g1:Filter(Card.IsRelateToEffect,nil,e) - if sg1:GetCount()>0 and Duel.SendtoDeck(sg1,nil,0,REASON_EFFECT)>1 then - local tc1=sg1:GetFirst() - local tc2=sg1:GetNext() - if tc1:GetControler()==tc2:GetControler() and tc1:IsLocation(LOCATION_DECK) and tc2:IsLocation(LOCATION_DECK) then - Duel.SortDecktop(tp,tc1:GetControler(),2) - end - end - if e:GetLabel()==1 and g2 then - local tc=g2:GetFirst() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(g2,nil,REASON_EFFECT) - end - end -end -function c69327790.valcheck(e,c) - local g=c:GetMaterial() - if g:IsExists(Card.IsAttribute,1,nil,ATTRIBUTE_WIND) then - e:GetLabelObject():SetLabel(1) - else - e:GetLabelObject():SetLabel(0) - end -end diff --git a/script/c69402394.lua b/script/c69402394.lua deleted file mode 100644 index 86bdeec0bf..0000000000 --- a/script/c69402394.lua +++ /dev/null @@ -1,42 +0,0 @@ ---暗黒の謀略 -function c69402394.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c69402394.target) - e1:SetOperation(c69402394.activate) - c:RegisterEffect(e1) -end -function c69402394.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local h1=Duel.GetFieldGroupCount(tp,LOCATION_HAND,0) - if e:GetHandler():IsLocation(LOCATION_HAND) then h1=h1-1 end - local h2=Duel.GetFieldGroupCount(tp,0,LOCATION_HAND) - local d1=Duel.GetFieldGroupCount(tp,LOCATION_DECK,0) - local d2=Duel.GetFieldGroupCount(tp,0,LOCATION_DECK) - return h1>1 and h2>1 and d1>1 and d2>1 - end - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,PLAYER_ALL,2) -end -function c69402394.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)<2 or Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)<2 then return end - if Duel.SelectYesNo(1-tp,aux.Stringid(69402394,0)) then - Duel.DiscardHand(1-tp,aux.TRUE,1,1,REASON_EFFECT+REASON_DISCARD,nil) - if Duel.IsChainDisablable(0) then - Duel.NegateEffect(0) - return - end - end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) - local g1=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_HAND,0,2,2,nil) - Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_DISCARD) - local g2=Duel.SelectMatchingCard(1-tp,aux.TRUE,1-tp,LOCATION_HAND,0,2,2,nil) - g1:Merge(g2) - Duel.SendtoGrave(g1,REASON_EFFECT+REASON_DISCARD) - Duel.BreakEffect() - Duel.Draw(tp,2,REASON_EFFECT) - Duel.Draw(1-tp,2,REASON_EFFECT) -end diff --git a/script/c69408987.lua b/script/c69408987.lua deleted file mode 100644 index 61adba185a..0000000000 --- a/script/c69408987.lua +++ /dev/null @@ -1,35 +0,0 @@ ---スパイダー・ウェブ -function c69408987.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --to defence - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_DAMAGE_STEP_END) - e2:SetRange(LOCATION_SZONE) - e2:SetCondition(c69408987.poscon) - e2:SetOperation(c69408987.posop) - c:RegisterEffect(e2) -end -function c69408987.poscon(e,tp,eg,ep,ev,re,r,rp) - local a=Duel.GetAttacker() - return a:IsPosition(POS_FACEUP_ATTACK) and a:IsRelateToBattle() -end -function c69408987.posop(e,tp,eg,ep,ev,re,r,rp) - local a=Duel.GetAttacker() - if Duel.ChangePosition(a,POS_FACEUP_DEFENCE)~=0 then - e:GetHandler():CreateRelation(a,RESET_EVENT+0x1fe0000) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_CHANGE_POSITION) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,3) - e1:SetCondition(c69408987.poscon2) - a:RegisterEffect(e1) - end -end -function c69408987.poscon2(e) - return e:GetOwner():IsRelateToCard(e:GetHandler()) -end diff --git a/script/c69448290.lua b/script/c69448290.lua deleted file mode 100644 index ebfe0d7f57..0000000000 --- a/script/c69448290.lua +++ /dev/null @@ -1,37 +0,0 @@ ---霞の谷の雷鳥 -function c69448290.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(69448290,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_TO_HAND) - e1:SetCondition(c69448290.spcon) - e1:SetTarget(c69448290.sptg) - e1:SetOperation(c69448290.spop) - c:RegisterEffect(e1) -end -function c69448290.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) - and e:GetHandler():IsPreviousPosition(POS_FACEUP) -end -function c69448290.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c69448290.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) then return end - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then - Duel.SendtoGrave(c,REASON_EFFECT) - return - end - if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - c:RegisterEffect(e1) - end -end diff --git a/script/c69456283.lua b/script/c69456283.lua deleted file mode 100644 index 5c71ac8e31..0000000000 --- a/script/c69456283.lua +++ /dev/null @@ -1,95 +0,0 @@ ---コイツ -function c69456283.initial_effect(c) - --equip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(69456283,0)) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetTarget(c69456283.eqtg) - e1:SetOperation(c69456283.eqop) - c:RegisterEffect(e1) - --unequip - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(69456283,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_SZONE) - e2:SetCondition(c69456283.uncon) - e2:SetTarget(c69456283.sptg) - e2:SetOperation(c69456283.spop) - c:RegisterEffect(e2) - --atk up - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_EQUIP) - e3:SetCode(EFFECT_UPDATE_ATTACK) - e3:SetValue(3000) - e3:SetCondition(c69456283.uncon) - c:RegisterEffect(e3) - --pierce - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_EQUIP) - e4:SetCode(EFFECT_PIERCE) - e4:SetCondition(c69456283.uncon) - c:RegisterEffect(e4) - --destroy sub - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_EQUIP) - e5:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e5:SetCode(EFFECT_DESTROY_SUBSTITUTE) - e5:SetCondition(c69456283.uncon) - e5:SetValue(c69456283.repval) - c:RegisterEffect(e5) - --eqlimit - local e6=Effect.CreateEffect(c) - e6:SetType(EFFECT_TYPE_SINGLE) - e6:SetCode(EFFECT_EQUIP_LIMIT) - e6:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e6:SetValue(c69456283.eqlimit) - c:RegisterEffect(e6) -end -function c69456283.uncon(e) - return e:GetHandler():IsStatus(STATUS_UNION) -end -function c69456283.repval(e,re,r,rp) - return bit.band(r,REASON_BATTLE)~=0 -end -function c69456283.eqlimit(e,c) - return c:IsCode(48202661) -end -function c69456283.filter(c) - return c:IsFaceup() and c:IsCode(48202661) and c:GetUnionCount()==0 -end -function c69456283.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c69456283.filter(chkc) end - if chk==0 then return e:GetHandler():GetFlagEffect(69456283)==0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingTarget(c69456283.filter,tp,LOCATION_MZONE,0,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local g=Duel.SelectTarget(tp,c69456283.filter,tp,LOCATION_MZONE,0,1,1,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0) - e:GetHandler():RegisterFlagEffect(69456283,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1) -end -function c69456283.eqop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if not c:IsRelateToEffect(e) or c:IsFacedown() then return end - if not tc:IsRelateToEffect(e) or not c69456283.filter(tc) then - Duel.SendtoGrave(c,REASON_EFFECT) - return - end - if not Duel.Equip(tp,c,tc,false) then return end - c:SetStatus(STATUS_UNION,true) -end -function c69456283.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():GetFlagEffect(69456283)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) - e:GetHandler():RegisterFlagEffect(69456283,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1) -end -function c69456283.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP_ATTACK) - end -end diff --git a/script/c69461394.lua b/script/c69461394.lua deleted file mode 100644 index 5252582edf..0000000000 --- a/script/c69461394.lua +++ /dev/null @@ -1,39 +0,0 @@ ---A・O・J フィールド・マーシャル -function c69461394.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),2) - c:EnableReviveLimit() - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - c:RegisterEffect(e1) - --draw - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(69461394,0)) - e2:SetCategory(CATEGORY_DRAW) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetRange(LOCATION_MZONE) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetCode(EVENT_BATTLE_DESTROYED) - e2:SetCondition(c69461394.condition) - e2:SetTarget(c69461394.target) - e2:SetOperation(c69461394.operation) - c:RegisterEffect(e2) -end -function c69461394.condition(e,tp,eg,ep,ev,re,r,rp) - local dg=eg:GetFirst() - return eg:GetCount()==1 and dg:IsLocation(LOCATION_GRAVE) and dg:IsReason(REASON_BATTLE) - and dg:GetBattlePosition()==POS_FACEDOWN_DEFENCE and dg:GetReasonCard()==e:GetHandler() -end -function c69461394.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(1) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c69461394.operation(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end diff --git a/script/c69488544.lua b/script/c69488544.lua deleted file mode 100644 index 8e5e43c183..0000000000 --- a/script/c69488544.lua +++ /dev/null @@ -1,78 +0,0 @@ ---フェニックス・ギア・フリード -function c69488544.initial_effect(c) - aux.EnableDualAttribute(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(69488544,0)) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) - e1:SetCode(EVENT_CHAINING) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c69488544.spcon) - e1:SetTarget(c69488544.sptg) - e1:SetOperation(c69488544.spop) - c:RegisterEffect(e1) - --negate - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(69488544,1)) - e2:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_CHAINING) - e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) - e2:SetRange(LOCATION_MZONE) - e2:SetCondition(c69488544.negcon) - e2:SetCost(c69488544.negcost) - e2:SetTarget(c69488544.negtg) - e2:SetOperation(c69488544.negop) - c:RegisterEffect(e2) -end -function c69488544.spcon(e,tp,eg,ep,ev,re,r,rp) - return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) - and aux.IsDualState(e) and rp~=tp and re:IsActiveType(TYPE_SPELL) and re:IsHasType(EFFECT_TYPE_ACTIVATE) -end -function c69488544.filter(c,e,tp) - return c:IsType(TYPE_DUAL) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c69488544.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c69488544.filter(chkc,e,tp) end - if chk==0 then return e:GetHandler():IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c69488544.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c69488544.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c69488544.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end -function c69488544.negcon(e,tp,eg,ep,ev,re,r,rp) - if not aux.IsDualState(e) or not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end - local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) - if not g or not g:IsExists(Card.IsLocation,1,nil,LOCATION_MZONE) then return false end - return re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev) -end -function c69488544.cfilter(c) - return c:IsFaceup() and c:IsType(TYPE_EQUIP) and c:IsAbleToGraveAsCost() -end -function c69488544.negcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c69488544.cfilter,tp,LOCATION_ONFIELD,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c69488544.cfilter,tp,LOCATION_ONFIELD,0,1,1,nil) - Duel.SendtoGrave(g,REASON_COST) -end -function c69488544.negtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - if re:GetHandler():IsRelateToEffect(re) and re:GetHandler():IsDestructable() then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) - end -end -function c69488544.negop(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateActivation(ev) - if re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(re:GetHandler(),REASON_EFFECT) - end -end diff --git a/script/c69512157.lua b/script/c69512157.lua deleted file mode 100644 index 0f2c602085..0000000000 --- a/script/c69512157.lua +++ /dev/null @@ -1,34 +0,0 @@ ---竜魔王ベクターP -function c69512157.initial_effect(c) - --pendulum summon - aux.AddPendulumProcedure(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --disable - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_DISABLE) - e2:SetRange(LOCATION_PZONE) - e2:SetTargetRange(0,LOCATION_SZONE) - e2:SetTarget(c69512157.distg) - c:RegisterEffect(e2) - --disable effect - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e3:SetCode(EVENT_CHAIN_SOLVING) - e3:SetRange(LOCATION_PZONE) - e3:SetOperation(c69512157.disop) - c:RegisterEffect(e3) -end -function c69512157.distg(e,c) - return c:IsType(TYPE_SPELL) and (c:GetSequence()==6 or c:GetSequence()==7) -end -function c69512157.disop(e,tp,eg,ep,ev,re,r,rp) - local p,loc,seq=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_CONTROLER,CHAININFO_TRIGGERING_LOCATION,CHAININFO_TRIGGERING_SEQUENCE) - if re:IsActiveType(TYPE_SPELL) and p~=tp and loc==LOCATION_SZONE and (seq==6 or seq==7) then - Duel.NegateEffect(ev) - end -end diff --git a/script/c69514125.lua b/script/c69514125.lua deleted file mode 100644 index c2509f469e..0000000000 --- a/script/c69514125.lua +++ /dev/null @@ -1,35 +0,0 @@ ---神聖騎士パーシアス -function c69514125.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,nil,aux.NonTuner(Card.IsAttribute,ATTRIBUTE_LIGHT),1) - c:EnableReviveLimit() - --pos - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(69514125,0)) - e1:SetCategory(CATEGORY_POSITION) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c69514125.postg) - e1:SetOperation(c69514125.posop) - c:RegisterEffect(e1) - --pierce - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_PIERCE) - c:RegisterEffect(e2) -end -function c69514125.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0) -end -function c69514125.posop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.ChangePosition(tc,POS_FACEUP_DEFENCE,0,POS_FACEUP_ATTACK,0) - end -end diff --git a/script/c69529567.lua b/script/c69529567.lua deleted file mode 100644 index e7d1d63876..0000000000 --- a/script/c69529567.lua +++ /dev/null @@ -1,52 +0,0 @@ ---おとぼけオポッサム -function c69529567.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(69529567,0)) - e1:SetCategory(CATEGORY_REMOVE) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c69529567.descon) - e1:SetTarget(c69529567.destg) - e1:SetOperation(c69529567.desop) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(69529567,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) - e2:SetRange(LOCATION_GRAVE) - e2:SetCondition(c69529567.spcon) - e2:SetTarget(c69529567.sptg) - e2:SetOperation(c69529567.spop) - c:RegisterEffect(e2) -end -function c69529567.desfilter(c,atk) - return c:IsFaceup() and c:GetAttack()>atk -end -function c69529567.descon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c69529567.desfilter,tp,0,LOCATION_MZONE,1,nil,e:GetHandler():GetAttack()) -end -function c69529567.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsDestructable() end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0) -end -function c69529567.desop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.Destroy(e:GetHandler(),REASON_EFFECT)~=0 then - e:GetHandler():RegisterFlagEffect(69529567,RESET_EVENT+0x1fe0000,0,1) - end -end -function c69529567.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c69529567.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():GetFlagEffect(69529567)~=0 end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c69529567.spop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c69537999.lua b/script/c69537999.lua deleted file mode 100644 index 3fccdd8f56..0000000000 --- a/script/c69537999.lua +++ /dev/null @@ -1,53 +0,0 @@ ---ブレイズ・キャノン -function c69537999.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(69537999,0)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_SZONE) - e2:SetCost(c69537999.descost) - e2:SetTarget(c69537999.destg) - e2:SetOperation(c69537999.desop) - c:RegisterEffect(e2) -end -function c69537999.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_ATTACK)==0 end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) - e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+RESET_END) - Duel.RegisterEffect(e1,tp) -end -function c69537999.disfilter(c) - return c:IsAttackBelow(500) and c:IsRace(RACE_PYRO) -end -function c69537999.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsDestructable() end - if chk==0 then return Duel.IsExistingMatchingCard(c69537999.disfilter,tp,LOCATION_HAND,0,1,nil) - and Duel.IsExistingTarget(Card.IsDestructable,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_HAND) -end -function c69537999.desop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c69537999.disfilter,tp,LOCATION_HAND,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoGrave(g,REASON_EFFECT) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end - end -end diff --git a/script/c69542930.lua b/script/c69542930.lua deleted file mode 100644 index a63e93b6ea..0000000000 --- a/script/c69542930.lua +++ /dev/null @@ -1,33 +0,0 @@ ---光と闇の洗礼 -function c69542930.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c69542930.cost) - e1:SetTarget(c69542930.target) - e1:SetOperation(c69542930.activate) - c:RegisterEffect(e1) -end -function c69542930.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsCode,1,nil,46986414) end - local g=Duel.SelectReleaseGroup(tp,Card.IsCode,1,1,nil,46986414) - Duel.Release(g,REASON_COST) -end -function c69542930.filter(c,e,tp) - return c:IsCode(40737112) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsHasEffect(EFFECT_NECRO_VALLEY) -end -function c69542930.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsExistingMatchingCard(c69542930.filter,tp,0x13,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,0x13) -end -function c69542930.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c69542930.filter,tp,0x13,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c69572169.lua b/script/c69572169.lua deleted file mode 100644 index b4481ecae9..0000000000 --- a/script/c69572169.lua +++ /dev/null @@ -1,51 +0,0 @@ ---E・HERO フラッシュ -function c69572169.initial_effect(c) - --flip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(69572169,0)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetCondition(c69572169.condition) - e1:SetCost(c69572169.cost) - e1:SetTarget(c69572169.target) - e1:SetOperation(c69572169.operation) - c:RegisterEffect(e1) -end -function c69572169.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) -end -function c69572169.rfilter(c) - return c:IsSetCard(0x3008) and c:IsAbleToRemoveAsCost() -end -function c69572169.cost(e,tp,eg,ep,ev,re,r,rp,chk) - local rg=Duel.GetMatchingGroup(c69572169.rfilter,tp,LOCATION_GRAVE,0,e:GetHandler()) - if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() and rg:GetClassCount(Card.GetCode)>=3 end - local g=Group.CreateGroup() - for i=1,3 do - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local tc=rg:Select(tp,1,1,nil):GetFirst() - rg:Remove(Card.IsCode,nil,tc:GetCode()) - g:AddCard(tc) - end - g:AddCard(e:GetHandler()) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c69572169.filter(c) - return c:GetType()==TYPE_SPELL and c:IsAbleToHand() -end -function c69572169.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c69572169.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c69572169.filter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c69572169.filter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0) -end -function c69572169.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end diff --git a/script/c69579761.lua b/script/c69579761.lua deleted file mode 100644 index b73897a855..0000000000 --- a/script/c69579761.lua +++ /dev/null @@ -1,24 +0,0 @@ ---デス・コアラ -function c69579761.initial_effect(c) - --flip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(69579761,0)) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP) - e1:SetTarget(c69579761.target) - e1:SetOperation(c69579761.operation) - c:RegisterEffect(e1) -end -function c69579761.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - local dam=Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)*400 - Duel.SetTargetParam(dam) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,dam) -end -function c69579761.operation(e,tp,eg,ep,ev,re,r,rp) - local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) - local dam=Duel.GetFieldGroupCount(p,LOCATION_HAND,0)*400 - Duel.Damage(p,dam,REASON_EFFECT) -end diff --git a/script/c69584564.lua b/script/c69584564.lua deleted file mode 100644 index 390fd0b21f..0000000000 --- a/script/c69584564.lua +++ /dev/null @@ -1,39 +0,0 @@ ---フレグランス・ストーム -function c69584564.initial_effect(c) - --draw - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DRAW+CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c69584564.target) - e1:SetOperation(c69584564.operation) - c:RegisterEffect(e1) -end -function c69584564.filter(c) - return c:IsFaceup() and c:IsRace(RACE_PLANT) and c:IsDestructable() -end -function c69584564.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c69584564.filter(chkc) end - if chk==0 then return Duel.IsPlayerCanDraw(tp,1) - and Duel.IsExistingTarget(c69584564.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c69584564.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c69584564.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() and Duel.Destroy(tc,REASON_EFFECT)~=0 then - local ct=Duel.Draw(tp,1,REASON_EFFECT) - if ct==0 then return end - local dc=Duel.GetOperatedGroup():GetFirst() - if dc:IsRace(RACE_PLANT) and Duel.IsPlayerCanDraw(tp,1) - and Duel.SelectYesNo(tp,aux.Stringid(69584564,0)) then - Duel.BreakEffect() - Duel.ConfirmCards(1-tp,dc) - Duel.Draw(tp,1,REASON_EFFECT) - Duel.ShuffleHand(tp) - end - end -end diff --git a/script/c6958551.lua b/script/c6958551.lua deleted file mode 100644 index 44b10d4249..0000000000 --- a/script/c6958551.lua +++ /dev/null @@ -1,36 +0,0 @@ ---シャドー・トゥーン -function c6958551.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCountLimit(1,6958551+EFFECT_COUNT_CODE_OATH) - e1:SetCondition(c6958551.condition) - e1:SetTarget(c6958551.target) - e1:SetOperation(c6958551.activate) - c:RegisterEffect(e1) -end -function c6958551.cfilter(c) - return c:IsFaceup() and c:IsCode(15259703) -end -function c6958551.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c6958551.cfilter,tp,LOCATION_ONFIELD,0,1,nil) -end -function c6958551.filter(c) - return c:IsFaceup() and c:GetAttack()>0 -end -function c6958551.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c6958551.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c6958551.filter,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - local g=Duel.SelectTarget(tp,c6958551.filter,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,g:GetFirst():GetAttack()) -end -function c6958551.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:GetAttack()>0 then - Duel.Damage(1-tp,tc:GetAttack(),REASON_EFFECT) - end -end diff --git a/script/c69610924.lua b/script/c69610924.lua deleted file mode 100644 index a46748b6b1..0000000000 --- a/script/c69610924.lua +++ /dev/null @@ -1,42 +0,0 @@ ---No.17 リバイス・ドラゴン -function c69610924.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,3,2) - c:EnableReviveLimit() - --attack up - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetDescription(aux.Stringid(69610924,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c69610924.cost) - e1:SetOperation(c69610924.operation) - c:RegisterEffect(e1) - --cannot direct attack - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_CANNOT_DIRECT_ATTACK) - e2:SetCondition(c69610924.dircon) - c:RegisterEffect(e2) -end -c69610924.xyz_number=17 -function c69610924.dircon(e) - return e:GetHandler():GetOverlayCount()==0 -end -function c69610924.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c69610924.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_COPY_INHERIT) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(500) - e1:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e1) - end -end diff --git a/script/c69632396.lua b/script/c69632396.lua deleted file mode 100644 index b65e75ea3b..0000000000 --- a/script/c69632396.lua +++ /dev/null @@ -1,35 +0,0 @@ ---ゴブリンのその場しのぎ -function c69632396.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_NEGATE+CATEGORY_TOHAND) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_CHAINING) - e1:SetCondition(c69632396.condition) - e1:SetCost(c69632396.cost) - e1:SetTarget(c69632396.target) - e1:SetOperation(c69632396.activate) - c:RegisterEffect(e1) -end -function c69632396.condition(e,tp,eg,ep,ev,re,r,rp) - return re:IsActiveType(TYPE_SPELL) and re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev) -end -function c69632396.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,500) end - Duel.PayLPCost(tp,500) -end -function c69632396.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - if re:GetHandler():IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_TOHAND,eg,1,0,0) - end -end -function c69632396.activate(e,tp,eg,ep,ev,re,r,rp) - local ec=re:GetHandler() - Duel.NegateActivation(ev) - if re:GetHandler():IsRelateToEffect(re) then - ec:CancelToGrave() - Duel.SendtoHand(ec,nil,REASON_EFFECT) - end -end diff --git a/script/c69633792.lua b/script/c69633792.lua deleted file mode 100644 index 5318d93b04..0000000000 --- a/script/c69633792.lua +++ /dev/null @@ -1,28 +0,0 @@ ---エヴォルダー・テリアス -function c69633792.initial_effect(c) - --atkdown - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(69633792,0)) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(c69633792.atkcon) - e1:SetOperation(c69633792.atkop) - c:RegisterEffect(e1) -end -function c69633792.atkcon(e,tp,eg,ep,ev,re,r,rp) - local st=e:GetHandler():GetSummonType() - return st>=(SUMMON_TYPE_SPECIAL+150) and st<(SUMMON_TYPE_SPECIAL+180) -end -function c69633792.atkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFaceup() and c:IsRelateToEffect(e) then - --atkup - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(-500) - e1:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e1) - end -end diff --git a/script/c6967870.lua b/script/c6967870.lua deleted file mode 100644 index 11e265d969..0000000000 --- a/script/c6967870.lua +++ /dev/null @@ -1,54 +0,0 @@ ---黒蠍-罠はずしのクリフ -function c6967870.initial_effect(c) - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(6967870,0)) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_DECKDES) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_BATTLE_DAMAGE) - e1:SetCondition(c6967870.condition) - e1:SetTarget(c6967870.target) - e1:SetOperation(c6967870.operation) - c:RegisterEffect(e1) -end -function c6967870.condition(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp -end -function c6967870.filter(c) - return c:IsType(TYPE_TRAP+TYPE_SPELL) and c:IsDestructable() -end -function c6967870.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and c6967870.filter(chkc) end - if chk==0 then return Duel.IsPlayerCanDiscardDeck(1-tp,2) - or Duel.IsExistingTarget(c6967870.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end - local op=0 - if Duel.IsExistingTarget(c6967870.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) - and Duel.IsPlayerCanDiscardDeck(1-tp,2) then - op=Duel.SelectOption(tp,aux.Stringid(6967870,1),aux.Stringid(6967870,2)) - elseif Duel.IsPlayerCanDiscardDeck(1-tp,2) then - Duel.SelectOption(tp,aux.Stringid(6967870,2)) - op=1 - else - Duel.SelectOption(tp,aux.Stringid(6967870,1)) - op=0 - end - e:SetLabel(op) - if op==0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c6967870.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) - e:SetProperty(EFFECT_FLAG_CARD_TARGET) - else - Duel.SetOperationInfo(0,CATEGORY_DECKDES,0,0,1-tp,1) - e:SetProperty(0) - end -end -function c6967870.operation(e,tp,eg,ep,ev,re,r,rp) - if e:GetLabel()==0 then - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end - else - Duel.DiscardDeck(1-tp,2,REASON_EFFECT) - end -end diff --git a/script/c69695704.lua b/script/c69695704.lua deleted file mode 100644 index 516543a6ca..0000000000 --- a/script/c69695704.lua +++ /dev/null @@ -1,49 +0,0 @@ ---ブラッドストーム -function c69695704.initial_effect(c) - --attackup - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(c69695704.atkval) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(69695704,0)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCondition(c69695704.descon) - e2:SetTarget(c69695704.destg) - e2:SetOperation(c69695704.desop) - c:RegisterEffect(e2) -end -function c69695704.cfilter(c) - return c:IsFaceup() and c:IsRace(RACE_WINDBEAST) -end -function c69695704.atkval(e,c) - return Duel.GetMatchingGroupCount(c69695704.cfilter,c:GetControler(),LOCATION_MZONE,0,nil)*100 -end -function c69695704.descon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c69695704.cfilter,tp,LOCATION_MZONE,0,3,nil) -end -function c69695704.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable() -end -function c69695704.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and c69695704.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c69695704.filter,tp,0,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c69695704.filter,tp,0,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c69695704.desop(e,tp,eg,ep,ev,re,r,rp) - if not Duel.IsExistingMatchingCard(c69695704.cfilter,tp,LOCATION_MZONE,0,3,nil) then return end - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c69723159.lua b/script/c69723159.lua deleted file mode 100644 index c7517b32b6..0000000000 --- a/script/c69723159.lua +++ /dev/null @@ -1,42 +0,0 @@ ---武神器-ムラクモ -function c69723159.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(69723159,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_GRAVE) - e1:SetCountLimit(1,69723159) - e1:SetCondition(c69723159.descon) - e1:SetCost(c69723159.descost) - e1:SetTarget(c69723159.destg) - e1:SetOperation(c69723159.desop) - c:RegisterEffect(e1) -end -function c69723159.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x88) and c:IsRace(RACE_BEASTWARRIOR) -end -function c69723159.descon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c69723159.cfilter,tp,LOCATION_MZONE,0,1,nil) -end -function c69723159.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) -end -function c69723159.filter(c) - return c:IsFaceup() and c:IsDestructable() -end -function c69723159.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and c69723159.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c69723159.filter,tp,0,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c69723159.filter,tp,0,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c69723159.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c69724380.lua b/script/c69724380.lua deleted file mode 100644 index d8bbf09968..0000000000 --- a/script/c69724380.lua +++ /dev/null @@ -1,31 +0,0 @@ ---魔の取引 -function c69724380.initial_effect(c) - --handes - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_HANDES) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_CHAINING) - e1:SetCondition(c69724380.condition) - e1:SetCost(c69724380.cost) - e1:SetTarget(c69724380.target) - e1:SetOperation(c69724380.activate) - c:RegisterEffect(e1) -end -function c69724380.condition(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp and re:IsActiveType(TYPE_SPELL) and re:IsHasType(EFFECT_TYPE_ACTIVATE) -end -function c69724380.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,1000) end - Duel.PayLPCost(tp,1000) -end -function c69724380.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0 end - Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,1-tp,1) -end -function c69724380.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND) - if g:GetCount()>0 then - local sg=g:RandomSelect(1-tp,1,nil) - Duel.SendtoGrave(sg,REASON_EFFECT+REASON_DISCARD) - end -end diff --git a/script/c69750546.lua b/script/c69750546.lua deleted file mode 100644 index d2e1c84df4..0000000000 --- a/script/c69750546.lua +++ /dev/null @@ -1,60 +0,0 @@ ---ヴォルカニック・バックショット -function c69750546.initial_effect(c) - --damage - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(69750546,0)) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetTarget(c69750546.target) - e1:SetOperation(c69750546.operation) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(69750546,1)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetCondition(c69750546.descon) - e2:SetCost(c69750546.descost) - e2:SetTarget(c69750546.destg) - e2:SetOperation(c69750546.desop) - c:RegisterEffect(e2) -end -function c69750546.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(500) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,500) -end -function c69750546.operation(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end -function c69750546.descon(e,tp,eg,ep,ev,re,r,rp) - return re and re:GetHandler():IsSetCard(0xb9) -end -function c69750546.costfilter(c) - return c:IsCode(69750546) and c:IsAbleToGraveAsCost() -end -function c69750546.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c69750546.costfilter,tp,LOCATION_DECK+LOCATION_HAND,0,2,nil) end - local g=Duel.GetMatchingGroup(c69750546.costfilter,tp,LOCATION_DECK+LOCATION_HAND,0,nil) - if g:GetCount()>2 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - g=g:Select(tp,2,2,nil) - end - Duel.SendtoGrave(g,REASON_COST) -end -function c69750546.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDestructable,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) - local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,0,LOCATION_MZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c69750546.desop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,0,LOCATION_MZONE,nil) - Duel.Destroy(g,REASON_EFFECT) -end diff --git a/script/c69757518.lua b/script/c69757518.lua deleted file mode 100644 index f79d229700..0000000000 --- a/script/c69757518.lua +++ /dev/null @@ -1,82 +0,0 @@ ---CNo.5 亡朧龍カオス・キマイラ・ドラゴン -function c69757518.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,6,3,nil,nil,5) - c:EnableReviveLimit() - --atk - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetValue(c69757518.atkval) - c:RegisterEffect(e1) - --chain attack - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(69757518,0)) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_DAMAGE_STEP_END) - e2:SetCondition(c69757518.atcon) - e2:SetCost(c69757518.atcost) - e2:SetOperation(c69757518.atop) - c:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetCategory(CATEGORY_TODECK) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetCode(EVENT_PHASE+PHASE_BATTLE) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1) - e3:SetCost(c69757518.cost) - e3:SetTarget(c69757518.target) - e3:SetOperation(c69757518.operation) - c:RegisterEffect(e3) -end -c69757518.xyz_number=5 -function c69757518.atkval(e,c) - return c:GetOverlayCount()*1000 -end -function c69757518.atcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return Duel.GetAttacker()==c and c:IsChainAttackable(0,true) -end -function c69757518.atcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c69757518.atop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToBattle() then return end - Duel.ChainAttack() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_DIRECT_ATTACK) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_DAMAGE_CAL) - c:RegisterEffect(e1) -end -function c69757518.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.PayLPCost(tp,math.floor(Duel.GetLP(tp)/2)) -end -function c69757518.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToDeck,tp,LOCATION_GRAVE,LOCATION_GRAVE,2,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - local g=Duel.SelectTarget(tp,Card.IsAbleToDeck,tp,LOCATION_GRAVE,LOCATION_GRAVE,2,2,nil) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g,2,0,0) -end -function c69757518.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local sg=g:Filter(Card.IsRelateToEffect,nil,e) - if sg:GetCount()>1 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local sg1=sg:Select(tp,1,1,nil) - local c=e:GetHandler() - if Duel.SendtoDeck(sg1,nil,0,REASON_EFFECT)~=0 and c:IsRelateToEffect(e) then - sg:Sub(sg1) - Duel.Overlay(c,sg) - end - end -end diff --git a/script/c69764158.lua b/script/c69764158.lua deleted file mode 100644 index 82b1bfc6e3..0000000000 --- a/script/c69764158.lua +++ /dev/null @@ -1,37 +0,0 @@ ---ペロペロケルペロス -function c69764158.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(69764158,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_DAMAGE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e1:SetRange(LOCATION_GRAVE) - e1:SetCountLimit(1) - e1:SetCondition(c69764158.descon) - e1:SetCost(c69764158.descost) - e1:SetTarget(c69764158.destg) - e1:SetOperation(c69764158.desop) - c:RegisterEffect(e1) -end -function c69764158.descon(e,tp,eg,ep,ev,re,r,rp) - return ep==tp and (bit.band(r,REASON_BATTLE)~=0 or (bit.band(r,REASON_EFFECT)~=0 and rp~=tp)) -end -function c69764158.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) -end -function c69764158.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsDestructable() end - if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c69764158.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c6979239.lua b/script/c6979239.lua deleted file mode 100644 index 6044ef509a..0000000000 --- a/script/c6979239.lua +++ /dev/null @@ -1,33 +0,0 @@ ---リーフ・フェアリー -function c6979239.initial_effect(c) - --damage - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(6979239,0)) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c6979239.cost) - e1:SetTarget(c6979239.target) - e1:SetOperation(c6979239.operation) - c:RegisterEffect(e1) -end -function c6979239.filter(c,ec) - return c:GetEquipTarget()==ec and c:IsAbleToGraveAsCost() -end -function c6979239.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c6979239.filter,tp,LOCATION_SZONE,LOCATION_SZONE,1,nil,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c6979239.filter,tp,LOCATION_SZONE,LOCATION_SZONE,1,1,nil,e:GetHandler()) - Duel.SendtoGrave(g,REASON_COST) -end -function c6979239.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(500) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,500) -end -function c6979239.operation(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c69831560.lua b/script/c69831560.lua deleted file mode 100644 index 9a2c6cf78d..0000000000 --- a/script/c69831560.lua +++ /dev/null @@ -1,115 +0,0 @@ ---アルカナフォースEX-THE DARK RULER -function c69831560.initial_effect(c) - c:EnableReviveLimit() - --spsummon proc - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c69831560.spcon) - e1:SetOperation(c69831560.spop) - c:RegisterEffect(e1) - --cannot special summon - local e2=Effect.CreateEffect(c) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_SPSUMMON_CONDITION) - c:RegisterEffect(e2) - --coin - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(69831560,0)) - e3:SetCategory(CATEGORY_COIN) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - e3:SetTarget(c69831560.cointg) - e3:SetOperation(c69831560.coinop) - c:RegisterEffect(e3) -end -function c69831560.spcon(e,c) - if c==nil then return true end - return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-3 - and Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,c:GetControler(),LOCATION_MZONE,0,3,nil) -end -function c69831560.spop(e,tp,eg,ep,ev,re,r,rp,c) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,Card.IsAbleToGraveAsCost,c:GetControler(),LOCATION_MZONE,0,3,3,nil) - Duel.SendtoGrave(g,REASON_COST) -end -function c69831560.cointg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_COIN,nil,0,tp,1) -end -function c69831560.coinop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) or c:IsFacedown() then return end - local res=0 - if c:IsHasEffect(73206827) then - res=1-Duel.SelectOption(tp,60,61) - else res=Duel.TossCoin(tp,1) end - c69831560.arcanareg(c,res) -end -function c69831560.arcanareg(c,coin) - --coin effect - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_EXTRA_ATTACK) - e1:SetCondition(c69831560.macon) - e1:SetValue(1) - e1:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EVENT_PHASE+PHASE_BATTLE) - e2:SetCountLimit(1) - e2:SetCondition(c69831560.poscon) - e2:SetOperation(c69831560.posop) - e2:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e2) - -- - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e3:SetCode(EVENT_LEAVE_FIELD_P) - e3:SetOperation(c69831560.desop1) - e3:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e3) - -- - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e4:SetCode(EVENT_LEAVE_FIELD) - e4:SetOperation(c69831560.desop2) - e4:SetReset(RESET_EVENT+0x17f0000) - c:RegisterEffect(e4) - c:RegisterFlagEffect(36690018,RESET_EVENT+0x1ff0000,EFFECT_FLAG_CLIENT_HINT,1,coin,63-coin) -end -function c69831560.macon(e) - return e:GetHandler():GetFlagEffectLabel(36690018)==1 -end -function c69831560.poscon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:GetFlagEffectLabel(36690018)==1 and c:GetAttackAnnouncedCount()>=2 -end -function c69831560.posop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsAttackPos() then - Duel.ChangePosition(c,POS_FACEUP_DEFENCE) - end - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_CHANGE_POSITION) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_COPY_INHERIT) - e1:SetReset(RESET_EVENT+0x1ff0000+RESET_PHASE+PHASE_END+RESET_SELF_TURN,2) - c:RegisterEffect(e1) -end -function c69831560.desop1(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsReason(REASON_DESTROY) and e:GetHandler():GetFlagEffectLabel(36690018)==0 then - e:GetHandler():RegisterFlagEffect(69831560,RESET_EVENT+0x17f0000,0,1) - end -end -function c69831560.desop2(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():GetFlagEffect(69831560)~=0 then - local g=Duel.GetFieldGroup(tp,LOCATION_ONFIELD,LOCATION_ONFIELD) - Duel.Destroy(g,REASON_EFFECT) - end -end diff --git a/script/c69832741.lua b/script/c69832741.lua deleted file mode 100644 index 4205ebd68d..0000000000 --- a/script/c69832741.lua +++ /dev/null @@ -1,36 +0,0 @@ ---霊魂消滅 ---not fully implemented -function c69832741.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetOperation(c69832741.activate) - c:RegisterEffect(e1) -end -function c69832741.activate(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EFFECT_SEND_REPLACE) - e1:SetTarget(c69832741.reptg) - e1:SetValue(c69832741.repval) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function c69832741.repfilter(c) - return c:IsLocation(LOCATION_GRAVE) and c:GetDestination()==LOCATION_REMOVED and c:IsType(TYPE_MONSTER) -end -function c69832741.reptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local count=eg:FilterCount(c69832741.repfilter,nil) - return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_MZONE,0,count,nil) - end - local count=eg:FilterCount(c69832741.repfilter,nil) - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(69832741,0)) - local rg=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_MZONE,0,count,count,nil) - Duel.Remove(rg,POS_FACEUP,REASON_EFFECT) - return true -end -function c69832741.repval(e,c) - return c69832741.repfilter(c) -end diff --git a/script/c69838592.lua b/script/c69838592.lua deleted file mode 100644 index b94e2694ca..0000000000 --- a/script/c69838592.lua +++ /dev/null @@ -1,96 +0,0 @@ ---妖仙獣 大幽谷響 -function c69838592.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(69838592,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(1,69838592) - e1:SetCondition(c69838592.spcon) - e1:SetCost(c69838592.spcost) - e1:SetTarget(c69838592.sptg) - e1:SetOperation(c69838592.spop) - c:RegisterEffect(e1) - --atk - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(69838592,1)) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_BATTLE_START) - e2:SetCondition(c69838592.condition) - e2:SetOperation(c69838592.operation) - c:RegisterEffect(e2) - --tohand - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(69838592,2)) - e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_BATTLE_DESTROYED) - e3:SetCondition(c69838592.thcon) - e3:SetTarget(c69838592.thtg) - e3:SetOperation(c69838592.thop) - c:RegisterEffect(e3) -end -function c69838592.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetAttacker():IsControler(1-tp) and Duel.GetAttackTarget()==nil -end -function c69838592.cfilter(c) - return c:IsSetCard(0xb3) and c:IsType(TYPE_MONSTER) and not c:IsCode(69838592) and c:IsAbleToGraveAsCost() -end -function c69838592.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c69838592.cfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,c69838592.cfilter,1,1,REASON_COST) -end -function c69838592.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c69838592.spop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP) - end -end -function c69838592.filter(c,tc) - if not c:IsFaceup() then return false end - return tc:GetBaseAttack()~=c:GetAttack() or tc:GetBaseAttack()~=c:GetDefence() -end -function c69838592.condition(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local bc=c:GetBattleTarget() - return c:IsRelateToBattle() and bc and c69838592.filter(c,bc) and bc:IsFaceup() and bc:IsRelateToBattle() -end -function c69838592.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local bc=c:GetBattleTarget() - if c:IsFaceup() and c:IsRelateToBattle() and bc:IsFaceup() and bc:IsRelateToBattle() then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetValue(bc:GetBaseAttack()) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_SET_DEFENCE_FINAL) - c:RegisterEffect(e2) - end -end -function c69838592.thcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) -end -function c69838592.thfilter(c) - return c:IsSetCard(0xb3) and c:IsAbleToHand() -end -function c69838592.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c69838592.thfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c69838592.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c69838592.thfilter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c69840739.lua b/script/c69840739.lua deleted file mode 100644 index d5097367fc..0000000000 --- a/script/c69840739.lua +++ /dev/null @@ -1,88 +0,0 @@ ---アーティファクト-デュランダル -function c69840739.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,5,2) - c:EnableReviveLimit() - --change effect - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(69840739,0)) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_CHAINING) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE) - e1:SetCondition(c69840739.chcon) - e1:SetCost(c69840739.cost) - e1:SetTarget(c69840739.chtg) - e1:SetOperation(c69840739.chop) - c:RegisterEffect(e1) - --reload - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(69840739,1)) - e2:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE) - e2:SetCost(c69840739.cost) - e2:SetTarget(c69840739.drtg) - e2:SetOperation(c69840739.drop) - c:RegisterEffect(e2) -end -function c69840739.chcon(e,tp,eg,ep,ev,re,r,rp) - local rc=re:GetHandler() - local loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION) - return (re:IsActiveType(TYPE_MONSTER) and loc==LOCATION_MZONE) - or ((rc:GetType()==TYPE_SPELL or rc:GetType()==TYPE_TRAP) and re:IsHasType(EFFECT_TYPE_ACTIVATE)) -end -function c69840739.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c69840739.chtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c69840739.filter,rp,0,LOCATION_ONFIELD,1,nil) end -end -function c69840739.chop(e,tp,eg,ep,ev,re,r,rp) - local g=Group.CreateGroup() - Duel.ChangeTargetCard(ev,g) - Duel.ChangeChainOperation(ev,c69840739.repop) -end -function c69840739.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable() -end -function c69840739.repop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:GetType()==TYPE_SPELL or c:GetType()==TYPE_TRAP then - c:CancelToGrave(false) - end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectMatchingCard(tp,c69840739.filter,tp,0,LOCATION_ONFIELD,1,1,nil) - if g:GetCount()>0 then - Duel.HintSelection(g) - Duel.Destroy(g,REASON_EFFECT) - end -end -function c69840739.drtg(e,tp,eg,ep,ev,re,r,rp,chk) - local h1=Duel.GetFieldGroupCount(tp,LOCATION_HAND,0) - local h2=Duel.GetFieldGroupCount(tp,0,LOCATION_HAND) - if chk==0 then return (Duel.IsPlayerCanDraw(tp) or h1==0) - and (Duel.IsPlayerCanDraw(1-tp) or h2==0) - and Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,LOCATION_HAND,LOCATION_HAND,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,PLAYER_ALL,LOCATION_HAND) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,PLAYER_ALL,1) -end -function c69840739.drfilter(c,tp) - return c:IsLocation(LOCATION_DECK) and c:GetPreviousControler()==tp -end -function c69840739.drop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetFieldGroup(tp,LOCATION_HAND,LOCATION_HAND) - if Duel.SendtoDeck(g,nil,0,REASON_EFFECT)~=0 then - Duel.ShuffleDeck(tp) - Duel.ShuffleDeck(1-tp) - Duel.BreakEffect() - local ct1=g:FilterCount(c69840739.drfilter,nil,tp) - local ct2=g:FilterCount(c69840739.drfilter,nil,1-tp) - Duel.Draw(tp,ct1,REASON_EFFECT) - Duel.Draw(1-tp,ct2,REASON_EFFECT) - end -end diff --git a/script/c69846323.lua b/script/c69846323.lua deleted file mode 100644 index 1d54bbdb15..0000000000 --- a/script/c69846323.lua +++ /dev/null @@ -1,37 +0,0 @@ ---カンツウツボ -function c69846323.initial_effect(c) - --atkup - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(69846323,0)) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCost(c69846323.cost) - e1:SetOperation(c69846323.operation) - c:RegisterEffect(e1) - --pierce - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_PIERCE) - c:RegisterEffect(e2) -end -function c69846323.cfilter(c) - return c:IsRace(RACE_FISH+RACE_AQUA+RACE_SEASERPENT) -end -function c69846323.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,c69846323.cfilter,1,e:GetHandler()) end - local sg=Duel.SelectReleaseGroup(tp,c69846323.cfilter,1,1,e:GetHandler()) - Duel.Release(sg,REASON_COST) -end -function c69846323.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFaceup() and c:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(600) - e1:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e1) - end -end diff --git a/script/c69865139.lua b/script/c69865139.lua deleted file mode 100644 index f7a4fd61fa..0000000000 --- a/script/c69865139.lua +++ /dev/null @@ -1,30 +0,0 @@ ---天輪の葬送士 -function c69865139.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(69865139,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c69865139.target) - e1:SetOperation(c69865139.operation) - c:RegisterEffect(e1) -end -function c69865139.filter(c,e,tp) - return c:GetLevel()==1 and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c69865139.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c69865139.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c69865139.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c69865139.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c69865139.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c698785.lua b/script/c698785.lua deleted file mode 100644 index 2f0e612634..0000000000 --- a/script/c698785.lua +++ /dev/null @@ -1,30 +0,0 @@ ---サンダーエンド・ドラゴン -function c698785.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsType,TYPE_NORMAL),8,2) - c:EnableReviveLimit() - --negate activate - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(698785,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCost(c698785.cost) - e1:SetTarget(c698785.target) - e1:SetOperation(c698785.operation) - c:RegisterEffect(e1) -end -function c698785.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c698785.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDestructable,tp,LOCATION_MZONE,LOCATION_MZONE,1,e:GetHandler()) end - local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,LOCATION_MZONE,LOCATION_MZONE,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c698785.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,LOCATION_MZONE,LOCATION_MZONE,e:GetHandler()) - Duel.Destroy(g,REASON_EFFECT) -end diff --git a/script/c69884162.lua b/script/c69884162.lua deleted file mode 100644 index 254af5d145..0000000000 --- a/script/c69884162.lua +++ /dev/null @@ -1,13 +0,0 @@ ---E・HERO アナザー・ネオス -function c69884162.initial_effect(c) - aux.EnableDualAttribute(c) - --code - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_CHANGE_CODE) - e1:SetCondition(aux.IsDualState) - e1:SetValue(89943723) - c:RegisterEffect(e1) -end diff --git a/script/c69890967.lua b/script/c69890967.lua deleted file mode 100644 index 4e9b09a596..0000000000 --- a/script/c69890967.lua +++ /dev/null @@ -1,88 +0,0 @@ ---幻魔皇ラビエル -function c69890967.initial_effect(c) - c:EnableReviveLimit() - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(aux.FALSE) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_SPSUMMON_PROC) - e2:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e2:SetRange(LOCATION_HAND) - e2:SetCondition(c69890967.spcon) - e2:SetOperation(c69890967.spop) - c:RegisterEffect(e2) - --token - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(69890967,0)) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e3:SetRange(LOCATION_MZONE) - e3:SetCode(EVENT_SUMMON_SUCCESS) - e3:SetCondition(c69890967.tkcon) - e3:SetTarget(c69890967.tktg) - e3:SetOperation(c69890967.tkop) - c:RegisterEffect(e3) - --atkup - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(69890967,1)) - e4:SetCategory(CATEGORY_ATKCHANGE) - e4:SetType(EFFECT_TYPE_IGNITION) - e4:SetRange(LOCATION_MZONE) - e4:SetCountLimit(1) - e4:SetCost(c69890967.atcost) - e4:SetOperation(c69890967.atop) - c:RegisterEffect(e4) -end -function c69890967.spcon(e,c) - if c==nil then return true end - return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-3 - and Duel.CheckReleaseGroup(c:GetControler(),Card.IsRace,3,nil,RACE_FIEND) -end -function c69890967.spop(e,tp,eg,ep,ev,re,r,rp,c) - local g=Duel.SelectReleaseGroup(c:GetControler(),Card.IsRace,3,3,nil,RACE_FIEND) - Duel.Release(g,REASON_COST) -end -function c69890967.tkcon(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp -end -function c69890967.tktg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0) -end -function c69890967.tkop(e,tp,eg,ep,ev,re,r,rp) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ft<=0 or not Duel.IsPlayerCanSpecialSummonMonster(tp,69890968,0,0x4011,1000,1000,1,RACE_FIEND,ATTRIBUTE_DARK) then return end - local token=Duel.CreateToken(tp,69890968) - Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE) - e1:SetReset(RESET_EVENT+0x1fe0000) - token:RegisterEffect(e1,true) -end -function c69890967.atcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,nil,1,e:GetHandler()) end - local g=Duel.SelectReleaseGroup(tp,nil,1,1,e:GetHandler()) - local atk=g:GetFirst():GetTextAttack() - if atk<0 then atk=0 end - e:SetLabel(atk) - Duel.Release(g,REASON_COST) -end -function c69890967.atop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFaceup() and c:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(e:GetLabel()) - e1:SetReset(RESET_EVENT+0x1ff0000+RESET_PHASE+PHASE_END) - c:RegisterEffect(e1) - end -end diff --git a/script/c69931927.lua b/script/c69931927.lua deleted file mode 100644 index 62f369fa1a..0000000000 --- a/script/c69931927.lua +++ /dev/null @@ -1,75 +0,0 @@ ---地縛神 Chacu Challhua -function c69931927.initial_effect(c) - c:SetUniqueOnField(1,1,10000000) - -- - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e4:SetRange(LOCATION_MZONE) - e4:SetCode(EFFECT_SELF_DESTROY) - e4:SetCondition(c69931927.sdcon) - c:RegisterEffect(e4) - --battle target - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_SINGLE) - e5:SetCode(EFFECT_CANNOT_BE_BATTLE_TARGET) - e5:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e5:SetRange(LOCATION_MZONE) - e5:SetValue(aux.imval1) - c:RegisterEffect(e5) - --direct atk - local e6=Effect.CreateEffect(c) - e6:SetType(EFFECT_TYPE_SINGLE) - e6:SetCode(EFFECT_DIRECT_ATTACK) - c:RegisterEffect(e6) - --damage - local e7=Effect.CreateEffect(c) - e7:SetDescription(aux.Stringid(69931927,0)) - e7:SetCategory(CATEGORY_DAMAGE) - e7:SetType(EFFECT_TYPE_IGNITION) - e7:SetRange(LOCATION_MZONE) - e7:SetCountLimit(1) - e7:SetCost(c69931927.damcost) - e7:SetTarget(c69931927.damtg) - e7:SetOperation(c69931927.damop) - c:RegisterEffect(e7) - --bp - local e8=Effect.CreateEffect(c) - e8:SetType(EFFECT_TYPE_FIELD) - e8:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e8:SetCode(EFFECT_CANNOT_BP) - e8:SetRange(LOCATION_MZONE) - e8:SetTargetRange(0,1) - e8:SetCondition(c69931927.bpcon) - c:RegisterEffect(e8) -end -function c69931927.sdcon(e) - local c=e:GetHandler() - if c:IsStatus(STATUS_BATTLE_DESTROYED) then return false end - local f1=Duel.GetFieldCard(0,LOCATION_SZONE,5) - local f2=Duel.GetFieldCard(1,LOCATION_SZONE,5) - return ((f1==nil or not f1:IsFaceup()) and (f2==nil or not f2:IsFaceup())) -end -function c69931927.damcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():GetAttackAnnouncedCount()==0 end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_OATH) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e:GetHandler():RegisterEffect(e1) -end -function c69931927.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local dam=e:GetHandler():GetDefence()/2 - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(dam) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,dam) -end -function c69931927.damop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end -function c69931927.bpcon(e) - return e:GetHandler():IsPosition(POS_FACEUP_DEFENCE) -end diff --git a/script/c69933858.lua b/script/c69933858.lua deleted file mode 100644 index 2a2dea31ba..0000000000 --- a/script/c69933858.lua +++ /dev/null @@ -1,51 +0,0 @@ ---ギルフォード・ザ・レジェンド -function c69933858.initial_effect(c) - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - c:RegisterEffect(e1) - --equip - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(69933858,0)) - e2:SetCategory(CATEGORY_EQUIP) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_SUMMON_SUCCESS) - e2:SetTarget(c69933858.target) - e2:SetOperation(c69933858.operation) - c:RegisterEffect(e2) -end -function c69933858.efilter(c) - return c:IsFaceup() and c:IsRace(RACE_WARRIOR) -end -function c69933858.eqfilter(c,g) - return c:IsType(TYPE_EQUIP) and g:IsExists(c69933858.eqcheck,1,nil,c) -end -function c69933858.eqcheck(c,ec) - return ec:CheckEquipTarget(c) -end -function c69933858.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return false end - local g=Duel.GetMatchingGroup(c69933858.efilter,tp,LOCATION_MZONE,0,nil) - return Duel.IsExistingMatchingCard(c69933858.eqfilter,tp,LOCATION_GRAVE,0,1,nil,g) - end - Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,nil,1,tp,0) -end -function c69933858.operation(e,tp,eg,ep,ev,re,r,rp) - local ft=Duel.GetLocationCount(tp,LOCATION_SZONE) - if ft<=0 then return end - local g=Duel.GetMatchingGroup(c69933858.efilter,tp,LOCATION_MZONE,0,nil) - local eq=Duel.GetMatchingGroup(c69933858.eqfilter,tp,LOCATION_GRAVE,0,nil,g) - if ft>eq:GetCount() then ft=eq:GetCount() end - if ft==0 then return end - for i=1,ft do - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(69933858,1)) - local ec=eq:Select(tp,1,1,nil):GetFirst() - eq:RemoveCard(ec) - local tc=g:FilterSelect(tp,c69933858.eqcheck,1,1,nil,ec):GetFirst() - Duel.Equip(tp,ec,tc,true,true) - end - Duel.EquipComplete() -end diff --git a/script/c69937550.lua b/script/c69937550.lua deleted file mode 100644 index bf8c18da2b..0000000000 --- a/script/c69937550.lua +++ /dev/null @@ -1,43 +0,0 @@ ---宝玉獣 アンバー・マンモス -function c69937550.initial_effect(c) - --send replace - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_TO_GRAVE_REDIRECT_CB) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetCondition(c69937550.repcon) - e1:SetOperation(c69937550.repop) - c:RegisterEffect(e1) - --change battle target - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(69937550,1)) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_BE_BATTLE_TARGET) - e2:SetRange(LOCATION_MZONE) - e2:SetCondition(c69937550.cbcondition) - e2:SetOperation(c69937550.cboperation) - c:RegisterEffect(e2) -end -function c69937550.repcon(e) - local c=e:GetHandler() - return c:IsFaceup() and c:IsLocation(LOCATION_MZONE) and c:IsReason(REASON_DESTROY) -end -function c69937550.repop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local e1=Effect.CreateEffect(c) - e1:SetCode(EFFECT_CHANGE_TYPE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fc0000) - e1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS) - c:RegisterEffect(e1) - Duel.RaiseEvent(c,47408488,e,0,tp,0,0) -end -function c69937550.cbcondition(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local bt=eg:GetFirst() - return r~=REASON_REPLACE and c~=bt and bt:IsFaceup() and bt:IsSetCard(0x1034) and bt:GetControler()==c:GetControler() -end -function c69937550.cboperation(e,tp,eg,ep,ev,re,r,rp) - Duel.ChangeAttackTarget(e:GetHandler()) -end diff --git a/script/c69954399.lua b/script/c69954399.lua deleted file mode 100644 index 14e64a4efe..0000000000 --- a/script/c69954399.lua +++ /dev/null @@ -1,102 +0,0 @@ ---疫病ウィルス ブラックダスト -function c69954399.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c69954399.target) - e1:SetOperation(c69954399.operation) - c:RegisterEffect(e1) - --Cannot attack - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_CANNOT_ATTACK) - c:RegisterEffect(e2) - --Equip limit - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_EQUIP_LIMIT) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e3:SetValue(1) - c:RegisterEffect(e3) - --destroy - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e4:SetCode(EVENT_PHASE+PHASE_END) - e4:SetCountLimit(1) - e4:SetRange(LOCATION_SZONE) - e4:SetCondition(c69954399.turncon) - e4:SetOperation(c69954399.turnop) - c:RegisterEffect(e4) - local e5=Effect.CreateEffect(c) - e5:SetDescription(aux.Stringid(69954399,0)) - e5:SetCategory(CATEGORY_DESTROY) - e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e5:SetCode(EVENT_PHASE+PHASE_END) - e5:SetCountLimit(1) - e5:SetRange(LOCATION_SZONE) - e5:SetCondition(c69954399.descon) - e5:SetTarget(c69954399.destg) - e5:SetOperation(c69954399.desop) - c:RegisterEffect(e5) - --tohand - local e6=Effect.CreateEffect(c) - e6:SetDescription(aux.Stringid(69954399,1)) - e6:SetCategory(CATEGORY_TOHAND) - e6:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e6:SetCode(69954400) - e6:SetTarget(c69954399.rettg) - e6:SetOperation(c69954399.retop) - c:RegisterEffect(e6) -end -function c69954399.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c69954399.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,e:GetHandler(),tc) - e:GetHandler():SetTurnCounter(0) - end -end -function c69954399.turncon(e,tp,eg,ep,ev,re,r,rp) - local ec=e:GetHandler():GetEquipTarget() - return ec:GetControler()==Duel.GetTurnPlayer() -end -function c69954399.turnop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local ct=c:GetTurnCounter() - c:SetTurnCounter(ct+1) -end -function c69954399.descon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetTurnCounter()==2 -end -function c69954399.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local ec=e:GetHandler():GetEquipTarget() - ec:CreateEffectRelation(e) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,ec,1,0,0) -end -function c69954399.desop(e,tp,eg,ep,ev,re,r,rp) - local ec=e:GetHandler():GetEquipTarget() - if ec and ec:IsRelateToEffect(e) and Duel.Destroy(ec,REASON_EFFECT)~=0 then - Duel.RaiseSingleEvent(e:GetHandler(),69954400,e,0,0,0,0) - end -end -function c69954399.rettg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0) -end -function c69954399.retop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,e:GetHandler()) - end -end diff --git a/script/c69982329.lua b/script/c69982329.lua deleted file mode 100644 index db5c6c004e..0000000000 --- a/script/c69982329.lua +++ /dev/null @@ -1,45 +0,0 @@ ---ペンデュラム・ターン -function c69982329.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c69982329.target) - e1:SetOperation(c69982329.activate) - c:RegisterEffect(e1) -end -function c69982329.filter(c) - return c:IsFaceup() and (c:GetSequence()==6 or c:GetSequence()==7) -end -function c69982329.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_SZONE) and c69982329.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c69982329.filter,tp,LOCATION_SZONE,LOCATION_SZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - local g=Duel.SelectTarget(tp,c69982329.filter,tp,LOCATION_SZONE,LOCATION_SZONE,1,1,nil) - local tc=g:GetFirst() - local t={} - local p=1 - for i=1,10 do - if i~=tc:GetLeftScale() then - t[p]=i - p=p+1 - end - end - local ac=Duel.AnnounceNumber(tp,table.unpack(t)) - e:SetLabel(ac) -end -function c69982329.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CHANGE_LSCALE) - e1:SetValue(e:GetLabel()) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - tc:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_CHANGE_RSCALE) - tc:RegisterEffect(e2) - end -end diff --git a/script/c70000776.lua b/script/c70000776.lua deleted file mode 100644 index 15ef84c147..0000000000 --- a/script/c70000776.lua +++ /dev/null @@ -1,45 +0,0 @@ ---ネクロバレーの祭殿 -function c70000776.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c70000776.actcon) - c:RegisterEffect(e1) - --disable spsummon - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e2:SetRange(LOCATION_SZONE) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetTargetRange(1,1) - e2:SetTarget(c70000776.sumlimit) - c:RegisterEffect(e2) - --self destroy - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e3:SetRange(LOCATION_SZONE) - e3:SetCode(EFFECT_SELF_DESTROY) - e3:SetCondition(c70000776.sdcon) - c:RegisterEffect(e3) -end -function c70000776.cfilter1(c) - return c:IsFaceup() and c:IsSetCard(0x2e) -end -function c70000776.cfilter2(c) - return c:IsFaceup() and c:IsCode(47355498) -end -function c70000776.actcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c70000776.cfilter1,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) - and (Duel.IsExistingMatchingCard(c70000776.cfilter2,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) - or Duel.IsEnvironment(47355498)) -end -function c70000776.sumlimit(e,c,sump,sumtype,sumpos,targetp) - return not c:IsSetCard(0x2e) -end -function c70000776.sdcon(e) - return not Duel.IsExistingMatchingCard(c70000776.cfilter1,0,LOCATION_MZONE,LOCATION_MZONE,1,nil) - or (not Duel.IsExistingMatchingCard(c70000776.cfilter2,0,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) - and not Duel.IsEnvironment(47355498)) -end diff --git a/script/c70026064.lua b/script/c70026064.lua deleted file mode 100644 index 17838252e2..0000000000 --- a/script/c70026064.lua +++ /dev/null @@ -1,58 +0,0 @@ ---武神-ヒルコ -function c70026064.initial_effect(c) - --pendulum summon - aux.AddPendulumProcedure(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetRange(LOCATION_PZONE) - e2:SetCost(c70026064.spcost) - e2:SetTarget(c70026064.sptg) - e2:SetOperation(c70026064.spop) - c:RegisterEffect(e2) -end -function c70026064.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) -end -function c70026064.filter1(c,e,tp) - return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:IsSetCard(0x88) - and Duel.IsExistingMatchingCard(c70026064.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,c,c:GetCode()) -end -function c70026064.filter2(c,e,tp,mc,code) - return c:IsType(TYPE_XYZ) and c:IsSetCard(0x88) and not c:IsCode(code) and mc:IsCanBeXyzMaterial(c) - and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) -end -function c70026064.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c70026064.filter1(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsExistingTarget(c70026064.filter1,tp,LOCATION_MZONE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - Duel.SelectTarget(tp,c70026064.filter1,tp,LOCATION_MZONE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function c70026064.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<0 then return end - local tc=Duel.GetFirstTarget() - if tc:IsFacedown() or not tc:IsRelateToEffect(e) or tc:IsControler(1-tp) or tc:IsImmuneToEffect(e) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c70026064.filter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc,tc:GetCode()) - local sc=g:GetFirst() - if sc then - local mg=tc:GetOverlayGroup() - if mg:GetCount()~=0 then - Duel.Overlay(sc,mg) - end - sc:SetMaterial(Group.FromCards(tc)) - Duel.Overlay(sc,Group.FromCards(tc)) - Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP) - sc:CompleteProcedure() - end -end diff --git a/script/c70043345.lua b/script/c70043345.lua deleted file mode 100644 index fa9258ed64..0000000000 --- a/script/c70043345.lua +++ /dev/null @@ -1,91 +0,0 @@ ---U.A.ペナルティ -function c70043345.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --remove - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_REMOVE) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_BATTLE_START) - e2:SetRange(LOCATION_SZONE) - e2:SetCountLimit(1,70043345) - e2:SetCondition(c70043345.rmcon) - e2:SetTarget(c70043345.rmtg) - e2:SetOperation(c70043345.rmop) - c:RegisterEffect(e2) - --to hand - local e3=Effect.CreateEffect(c) - e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e3:SetType(EFFECT_TYPE_QUICK_O) - e3:SetCode(EVENT_FREE_CHAIN) - e3:SetRange(LOCATION_GRAVE) - e3:SetCost(c70043345.thcost) - e3:SetTarget(c70043345.thtg) - e3:SetOperation(c70043345.thop) - c:RegisterEffect(e3) -end -function c70043345.rmcon(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetAttacker() - local bc=Duel.GetAttackTarget() - if not bc then return false end - if tc:IsControler(1-tp) then tc,bc=bc,tc end - if tc:IsSetCard(0xb2) then - e:SetLabelObject(bc) - return true - else return false end -end -function c70043345.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) - local bc=e:GetLabelObject() - if chk==0 then return bc:IsAbleToRemove() end - Duel.SetOperationInfo(0,CATEGORY_REMOVE,bc,1,0,0) -end -function c70043345.rmop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local bc=e:GetLabelObject() - if bc:IsRelateToBattle() and bc:IsControler(1-tp) and Duel.Remove(bc,0,REASON_EFFECT+REASON_TEMPORARY)~=0 then - bc:SetTurnCounter(0) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetReset(RESET_PHASE+RESET_END+RESET_OPPO_TURN,2) - e1:SetLabelObject(bc) - e1:SetCountLimit(1) - e1:SetCondition(c70043345.retcon) - e1:SetOperation(c70043345.retop) - Duel.RegisterEffect(e1,tp) - end -end -function c70043345.retcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp -end -function c70043345.retop(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetLabelObject() - local ct=tc:GetTurnCounter() - ct=ct+1 - tc:SetTurnCounter(ct) - if ct==2 then - Duel.ReturnToField(tc) - end -end -function c70043345.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT) -end -function c70043345.thfilter(c) - return c:IsSetCard(0xb2) and c:IsType(TYPE_SPELL) and c:IsAbleToHand() -end -function c70043345.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c70043345.thfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c70043345.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c70043345.thfilter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c70046172.lua b/script/c70046172.lua deleted file mode 100644 index e5258b0f49..0000000000 --- a/script/c70046172.lua +++ /dev/null @@ -1,34 +0,0 @@ ---突進 -function c70046172.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetCondition(c70046172.condition) - e1:SetTarget(c70046172.target) - e1:SetOperation(c70046172.activate) - c:RegisterEffect(e1) -end -function c70046172.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end -function c70046172.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) -end -function c70046172.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - e1:SetValue(700) - tc:RegisterEffect(e1) - end -end diff --git a/script/c70050374.lua b/script/c70050374.lua deleted file mode 100644 index 8edb3488dd..0000000000 --- a/script/c70050374.lua +++ /dev/null @@ -1,34 +0,0 @@ ---ツインバレル・ドラゴン -function c70050374.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(70050374,0)) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_COIN) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c70050374.destg) - e1:SetOperation(c70050374.desop) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - c:RegisterEffect(e2) - local e3=e1:Clone() - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e3) -end -function c70050374.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and chkc:IsDestructable() end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,0,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_COIN,nil,0,tp,2) -end -function c70050374.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - local c1,c2=Duel.TossCoin(tp,2) - if c1+c2<2 then return end - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c70054514.lua b/script/c70054514.lua deleted file mode 100644 index 6a1b8475f9..0000000000 --- a/script/c70054514.lua +++ /dev/null @@ -1,28 +0,0 @@ ---ダークシー・フロート -function c70054514.initial_effect(c) - --draw - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(70054514,0)) - e1:SetCategory(CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCondition(c70054514.drcon) - e1:SetTarget(c70054514.drtg) - e1:SetOperation(c70054514.drop) - c:RegisterEffect(e1) -end -function c70054514.drcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsReason(REASON_DESTROY) and c:IsReason(REASON_EFFECT) and c:IsPreviousLocation(LOCATION_ONFIELD) -end -function c70054514.drtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(1) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c70054514.drop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end diff --git a/script/c70074904.lua b/script/c70074904.lua deleted file mode 100644 index fa3e5b3dd6..0000000000 --- a/script/c70074904.lua +++ /dev/null @@ -1,36 +0,0 @@ ---D.D.アサイラント -function c70074904.initial_effect(c) - --remove - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(70074904,0)) - e1:SetCategory(CATEGORY_REMOVE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_BATTLED) - e1:SetCondition(c70074904.condition) - e1:SetTarget(c70074904.target) - e1:SetOperation(c70074904.operation) - c:RegisterEffect(e1) -end -function c70074904.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) -end -function c70074904.target(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - local a=Duel.GetAttacker() - local t=Duel.GetAttackTarget() - if chk==0 then - return (t==c and a:IsAbleToRemove()) - or (a==c and t~=nil and t:IsAbleToRemove()) - end - local g=Group.CreateGroup() - if a:IsRelateToBattle() then g:AddCard(a) end - if t~=nil and t:IsRelateToBattle() then g:AddCard(t) end - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,0) -end -function c70074904.operation(e,tp,eg,ep,ev,re,r,rp) - local a=Duel.GetAttacker() - local d=Duel.GetAttackTarget() - local g=Group.FromCards(a,d) - local rg=g:Filter(Card.IsRelateToBattle,nil) - Duel.Remove(rg,POS_FACEUP,REASON_EFFECT) -end diff --git a/script/c70083592.lua b/script/c70083592.lua deleted file mode 100644 index 3a18d01ee5..0000000000 --- a/script/c70083592.lua +++ /dev/null @@ -1,41 +0,0 @@ ---縫合蘇生 -function c70083592.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,70083592+EFFECT_COUNT_CODE_OATH) - e1:SetTarget(c70083592.target) - e1:SetOperation(c70083592.activate) - c:RegisterEffect(e1) -end -function c70083592.filter(c,e,tp) - return (c:IsSetCard(0xa9) or c:IsSetCard(0xad)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c70083592.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c70083592.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c70083592.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c70083592.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c70083592.activate(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e2) - Duel.SpecialSummonComplete() - end -end diff --git a/script/c70083723.lua b/script/c70083723.lua deleted file mode 100644 index bb81549eb2..0000000000 --- a/script/c70083723.lua +++ /dev/null @@ -1,26 +0,0 @@ ---ナチュル・ドラゴンフライ -function c70083723.initial_effect(c) - --indes - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e1:SetValue(c70083723.indes) - c:RegisterEffect(e1) - --atkup - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(c70083723.atkval) - c:RegisterEffect(e1) -end -function c70083723.indes(e,c) - return c:GetAttack()>=2000 -end -function c70083723.filter(c) - return c:IsSetCard(0x2a) and c:IsType(TYPE_MONSTER) -end -function c70083723.atkval(e,c) - return Duel.GetMatchingGroupCount(c70083723.filter,c:GetControler(),LOCATION_GRAVE,0,nil)*200 -end diff --git a/script/c70089580.lua b/script/c70089580.lua deleted file mode 100644 index 155c197a8f..0000000000 --- a/script/c70089580.lua +++ /dev/null @@ -1,28 +0,0 @@ ---オーロラ・ウィング -function c70089580.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(70089580,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetCountLimit(1,70089580) - e1:SetCondition(c70089580.condition) - e1:SetTarget(c70089580.target) - e1:SetOperation(c70089580.operation) - c:RegisterEffect(e1) -end -function c70089580.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) -end -function c70089580.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c70089580.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - if e:GetHandler():IsRelateToEffect(e) then - Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP_ATTACK) - end -end diff --git a/script/c70095154.lua b/script/c70095154.lua deleted file mode 100644 index 86335d5899..0000000000 --- a/script/c70095154.lua +++ /dev/null @@ -1,17 +0,0 @@ ---サイバー・ドラゴン -function c70095154.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c70095154.spcon) - c:RegisterEffect(e1) -end -function c70095154.spcon(e,c) - if c==nil then return true end - return Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0)==0 - and Duel.GetFieldGroupCount(c:GetControler(),0,LOCATION_MZONE)>0 - and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 -end diff --git a/script/c70101178.lua b/script/c70101178.lua deleted file mode 100644 index 1fd6075177..0000000000 --- a/script/c70101178.lua +++ /dev/null @@ -1,33 +0,0 @@ ---パンサー・シャーク -function c70101178.initial_effect(c) - c:SetUniqueOnField(1,0,70101178) - --summon with no tribute - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(70101178,0)) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SUMMON_PROC) - e1:SetCondition(c70101178.ntcon) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetRange(LOCATION_HAND) - e2:SetCode(EFFECT_SPSUMMON_PROC) - e2:SetCondition(c70101178.spcon) - c:RegisterEffect(e2) -end -function c70101178.ntcon(e,c,minc) - if c==nil then return true end - return minc==0 and c:GetLevel()>4 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 - and Duel.GetFieldGroupCount(c:GetControler(),0,LOCATION_MZONE)>1 -end -function c70101178.filter(c) - return c:IsFaceup() and c:IsCode(7500772) -end -function c70101178.spcon(e,c) - if c==nil then return true end - return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c70101178.filter,c:GetControler(),LOCATION_MZONE,0,1,nil) -end diff --git a/script/c70138455.lua b/script/c70138455.lua deleted file mode 100644 index 4279709d93..0000000000 --- a/script/c70138455.lua +++ /dev/null @@ -1,40 +0,0 @@ ---ミスター・ボンバー -function c70138455.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(70138455,0)) - e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_FIELD) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c70138455.condition) - e1:SetCost(c70138455.cost) - e1:SetTarget(c70138455.target) - e1:SetOperation(c70138455.operation) - c:RegisterEffect(e1) -end -function c70138455.condition(e,tp,eg,ep,ev,re,r,rp) - return tp==Duel.GetTurnPlayer() -end -function c70138455.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end -function c70138455.filter(c) - return c:IsFaceup() and c:IsDestructable() and c:IsAttackBelow(1000) -end -function c70138455.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c70138455.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c70138455.filter,tp,LOCATION_MZONE,LOCATION_MZONE,2,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c70138455.filter,tp,LOCATION_MZONE,LOCATION_MZONE,2,2,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,2,0,0) -end -function c70138455.desfilter(c,e) - return c:IsRelateToEffect(e) and c:IsFaceup() and c:IsDestructable() and c:IsAttackBelow(1000) -end -function c70138455.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local sg=g:Filter(c70138455.desfilter,nil,e) - Duel.Destroy(sg,REASON_EFFECT) -end diff --git a/script/c70156997.lua b/script/c70156997.lua deleted file mode 100644 index 4d96c3cd54..0000000000 --- a/script/c70156997.lua +++ /dev/null @@ -1,51 +0,0 @@ ---地霊術-「鉄」 -function c70156997.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c70156997.cost) - e1:SetTarget(c70156997.target) - e1:SetOperation(c70156997.activate) - c:RegisterEffect(e1) -end -function c70156997.cost(e,tp,eg,ep,ev,re,r,rp,chk) - e:SetLabel(1) - if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsAttribute,1,nil,ATTRIBUTE_EARTH) end - local g=Duel.SelectReleaseGroup(tp,Card.IsAttribute,1,1,nil,ATTRIBUTE_EARTH) - Duel.Release(g,REASON_COST) - e:SetLabelObject(g:GetFirst()) -end -function c70156997.filter(c,e,tp) - return c:IsLevelBelow(4) and c:IsAttribute(ATTRIBUTE_EARTH) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c70156997.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c70156997.filter(chkc,e,tp) end - if chk==0 then - if e:GetLabel()==1 then - e:SetLabel(0) - return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsExistingTarget(c70156997.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) - else - return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c70156997.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) - end - end - local ex=nil - if e:GetLabel()==1 then - ex=e:GetLabelObject() - end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c70156997.filter,tp,LOCATION_GRAVE,0,1,1,ex,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,g:GetCount(),0,0) - e:SetLabel(0) -end -function c70156997.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c70187958.lua b/script/c70187958.lua deleted file mode 100644 index 382bbe1c4d..0000000000 --- a/script/c70187958.lua +++ /dev/null @@ -1,29 +0,0 @@ ---ダーク砂バク -function c70187958.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(70187958,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_REMOVE) - e1:SetTarget(c70187958.target) - e1:SetOperation(c70187958.operation) - c:RegisterEffect(e1) -end -function c70187958.filter(c,e,tp) - return c:IsLevelBelow(4) and c:IsRace(RACE_BEAST) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c70187958.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c70187958.filter(chkc,e,tp) end - if chk==0 then return Duel.IsExistingTarget(c70187958.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c70187958.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,g:GetCount(),0,0) -end -function c70187958.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c70194827.lua b/script/c70194827.lua deleted file mode 100644 index 8fafc2fd9a..0000000000 --- a/script/c70194827.lua +++ /dev/null @@ -1,32 +0,0 @@ ---ブレード・バウンサー -function c70194827.initial_effect(c) - --chain attack - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(70194827,0)) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCountLimit(1) - e1:SetCode(EVENT_DAMAGE_STEP_END) - e1:SetCondition(c70194827.atcon) - e1:SetCost(c70194827.atcost) - e1:SetOperation(c70194827.atop) - c:RegisterEffect(e1) -end -function c70194827.atcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler()==Duel.GetAttacker() and e:GetHandler():IsChainAttackable(2,true) - and Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)~=0 -end -function c70194827.atcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) -end -function c70194827.atop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToBattle() then return end - Duel.ChainAttack() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_DIRECT_ATTACK) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_BATTLE) - c:RegisterEffect(e1) -end diff --git a/script/c7019529.lua b/script/c7019529.lua deleted file mode 100644 index 2c4d893715..0000000000 --- a/script/c7019529.lua +++ /dev/null @@ -1,17 +0,0 @@ ---空の昆虫兵 -function c7019529.initial_effect(c) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetCondition(c7019529.condtion) - e1:SetValue(1000) - c:RegisterEffect(e1) -end -function c7019529.condtion(e) - local ph=Duel.GetCurrentPhase() - return (ph==PHASE_DAMAGE or ph==PHASE_DAMAGE_CAL) - and Duel.GetAttacker()==e:GetHandler() and Duel.GetAttackTarget()~=nil - and Duel.GetAttackTarget():IsFaceup() and Duel.GetAttackTarget():IsAttribute(ATTRIBUTE_WIND) -end diff --git a/script/c70222318.lua b/script/c70222318.lua deleted file mode 100644 index 336992b613..0000000000 --- a/script/c70222318.lua +++ /dev/null @@ -1,73 +0,0 @@ ---森羅の霊峰 -function c70222318.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - -- - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_SZONE) - e2:SetCountLimit(1,70222318) - e2:SetCost(c70222318.cost) - e2:SetTarget(c70222318.target) - e2:SetOperation(c70222318.operation) - c:RegisterEffect(e2) - --deck check - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(70222318,3)) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetRange(LOCATION_SZONE) - e3:SetCode(EVENT_PHASE+PHASE_END) - e3:SetCountLimit(1) - e3:SetCondition(c70222318.tgcon) - e3:SetTarget(c70222318.tgtg) - e3:SetOperation(c70222318.tgop) - c:RegisterEffect(e3) -end -function c70222318.cfilter(c) - return c:IsRace(RACE_PLANT) and (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) and c:IsAbleToGraveAsCost() -end -function c70222318.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c70222318.cfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c70222318.cfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil) - Duel.SendtoGrave(g,REASON_COST) -end -function c70222318.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_DECK,0,1,nil,0x90) end -end -function c70222318.operation(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(70222318,0)) - local g=Duel.SelectMatchingCard(tp,Card.IsSetCard,tp,LOCATION_DECK,0,1,1,nil,0x90) - local tc=g:GetFirst() - if tc then - Duel.ShuffleDeck(tp) - Duel.MoveSequence(tc,0) - Duel.ConfirmDecktop(tp,1) - end -end -function c70222318.tgcon(e,tp,eg,ep,ev,re,r,rp) - return tp~=Duel.GetTurnPlayer() -end -function c70222318.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,1) end -end -function c70222318.tgop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - if not Duel.IsPlayerCanDiscardDeck(tp,1) then return end - Duel.ConfirmDecktop(tp,1) - local g=Duel.GetDecktopGroup(tp,1) - local tc=g:GetFirst() - if tc:IsRace(RACE_PLANT) then - Duel.DisableShuffleCheck() - Duel.SendtoGrave(g,REASON_EFFECT+REASON_REVEAL) - else - local opt=Duel.SelectOption(tp,aux.Stringid(70222318,1),aux.Stringid(70222318,2)) - if opt==1 then - Duel.MoveSequence(tc,opt) - end - end -end diff --git a/script/c70231910.lua b/script/c70231910.lua deleted file mode 100644 index 6475f3a7d7..0000000000 --- a/script/c70231910.lua +++ /dev/null @@ -1,33 +0,0 @@ ---ブラック・コア -function c70231910.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_REMOVE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c70231910.cost) - e1:SetTarget(c70231910.target) - e1:SetOperation(c70231910.activate) - c:RegisterEffect(e1) -end -function c70231910.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) -end -function c70231910.filter(c) - return c:IsFaceup() and c:IsAbleToRemove() -end -function c70231910.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c70231910.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c70231910.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,c70231910.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) -end -function c70231910.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) then - Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) - end -end diff --git a/script/c70245411.lua b/script/c70245411.lua deleted file mode 100644 index 92058e80c1..0000000000 --- a/script/c70245411.lua +++ /dev/null @@ -1,75 +0,0 @@ ---トイポット -function c70245411.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(70245411,0)) - e2:SetCategory(CATEGORY_DRAW+CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_SZONE) - e2:SetCountLimit(1) - e2:SetCost(c70245411.spcost) - e2:SetTarget(c70245411.sptg) - e2:SetOperation(c70245411.spop) - c:RegisterEffect(e2) - --search - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(70245411,1)) - e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_DELAY) - e3:SetCode(EVENT_TO_GRAVE) - e3:SetTarget(c70245411.thtg) - e3:SetOperation(c70245411.thop) - c:RegisterEffect(e3) -end -function c70245411.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) -end -function c70245411.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c70245411.spfilter(c,e,tp) - return c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c70245411.spop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - if Duel.Draw(tp,1,REASON_EFFECT)==0 then return end - local tc=Duel.GetOperatedGroup():GetFirst() - Duel.ConfirmCards(1-tp,tc) - if tc:IsSetCard(0xa9) and tc:IsType(TYPE_MONSTER) then - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local g=Duel.GetMatchingGroup(c70245411.spfilter,tp,LOCATION_HAND,0,nil,e,tp) - if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(70245411,2)) then - Duel.BreakEffect() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sc=g:Select(tp,1,1,nil) - Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP) - end - else - Duel.BreakEffect() - Duel.SendtoGrave(tc,REASON_EFFECT+REASON_DISCARD) - end - Duel.ShuffleHand(tp) -end -function c70245411.filter(c) - return (c:IsCode(30068120) or (c:IsSetCard(0xa9) and c:IsType(TYPE_MONSTER))) and c:IsAbleToHand() -end -function c70245411.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c70245411.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c70245411.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c70245411.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c7025445.lua b/script/c7025445.lua deleted file mode 100644 index b1e2763f7a..0000000000 --- a/script/c7025445.lua +++ /dev/null @@ -1,76 +0,0 @@ ---パワー・ジャイアント -function c7025445.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c7025445.spcon) - e1:SetOperation(c7025445.spop) - e1:SetValue(1) - c:RegisterEffect(e1) - --level change - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetCondition(c7025445.lvcon) - e2:SetOperation(c7025445.lvop) - e2:SetLabelObject(e1) - c:RegisterEffect(e2) - --dam reduce - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e3:SetCode(EVENT_ATTACK_ANNOUNCE) - e3:SetOperation(c7025445.damop) - c:RegisterEffect(e3) - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e4:SetCode(EVENT_BE_BATTLE_TARGET) - e4:SetOperation(c7025445.damop) - c:RegisterEffect(e4) -end -function c7025445.cfilter(c) - return c:IsLevelBelow(4) and c:IsAbleToGraveAsCost() -end -function c7025445.spcon(e,c) - if c==nil then return true end - return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c7025445.cfilter,c:GetControler(),LOCATION_HAND,0,1,c) -end -function c7025445.spop(e,tp,eg,ep,ev,re,r,rp,c) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c7025445.cfilter,tp,LOCATION_HAND,0,1,1,c) - Duel.SendtoGrave(g,REASON_COST) - e:SetLabel(g:GetFirst():GetLevel()) -end -function c7025445.lvcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+1 -end -function c7025445.lvop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_LEVEL) - e1:SetValue(-e:GetLabelObject():GetLabel()) - e1:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e1) -end -function c7025445.damop(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CHANGE_DAMAGE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetTargetRange(1,0) - e1:SetValue(c7025445.damval) - e1:SetReset(RESET_PHASE+PHASE_DAMAGE) - Duel.RegisterEffect(e1,tp) - local e2=e1:Clone() - e2:SetCode(EFFECT_NO_EFFECT_DAMAGE) - e2:SetReset(RESET_PHASE+PHASE_DAMAGE) - Duel.RegisterEffect(e2,tp) -end -function c7025445.damval(e,re,val,r,rp,rc) - if bit.band(r,REASON_EFFECT)~=0 then return 0 - else return val end -end diff --git a/script/c70261145.lua b/script/c70261145.lua deleted file mode 100644 index 39f1947f88..0000000000 --- a/script/c70261145.lua +++ /dev/null @@ -1,27 +0,0 @@ ---ナチュル・トライアンフ -function c70261145.initial_effect(c) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EVENT_CHAIN_SOLVED) - e1:SetOperation(c70261145.chop) - c:RegisterEffect(e1) -end -function c70261145.filter(c) - return c:IsFaceup() and c:IsSetCard(0x2a) -end -function c70261145.chop(e,tp,eg,ep,ev,re,r,rp) - if rp==tp or not re:IsHasType(EFFECT_TYPE_ACTIVATE) then return end - local g=Duel.GetMatchingGroup(c70261145.filter,tp,LOCATION_MZONE,0,nil) - local tc=g:GetFirst() - while tc do - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(500) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - tc=g:GetNext() - end -end diff --git a/script/c70271583.lua b/script/c70271583.lua deleted file mode 100644 index 2cc89c5279..0000000000 --- a/script/c70271583.lua +++ /dev/null @@ -1,77 +0,0 @@ ---カラクリ守衛 参壱参 -function c70271583.initial_effect(c) - --must attack - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_MUST_ATTACK) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_CANNOT_EP) - e2:SetRange(LOCATION_MZONE) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetTargetRange(1,0) - e2:SetCondition(c70271583.becon) - c:RegisterEffect(e2) - --pos change - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(70271583,0)) - e3:SetCategory(CATEGORY_POSITION) - e3:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_SINGLE) - e3:SetCode(EVENT_BE_BATTLE_TARGET) - e3:SetOperation(c70271583.posop) - c:RegisterEffect(e3) - --atkup - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(70271583,1)) - e4:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_FIELD) - e4:SetRange(LOCATION_MZONE) - e4:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE) - e4:SetCode(EVENT_BATTLE_DAMAGE) - e4:SetCondition(c70271583.atkcon) - e4:SetOperation(c70271583.atkop) - c:RegisterEffect(e4) - --indes - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_SINGLE) - e5:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e5:SetCondition(c70271583.indcon) - e5:SetValue(1) - c:RegisterEffect(e5) -end -function c70271583.becon(e) - return e:GetHandler():IsAttackable() -end -function c70271583.posop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFaceup() and c:IsRelateToEffect(e) then - Duel.ChangePosition(c,POS_FACEUP_DEFENCE,0,POS_FACEUP_ATTACK,0) - end -end -function c70271583.atkcon(e,tp,eg,ep,ev,re,r,rp) - return ep==tp and (e:GetHandler()==Duel.GetAttacker() or e:GetHandler()==Duel.GetAttackTarget()) -end -function c70271583.filter(c) - return c:IsFaceup() and c:IsSetCard(0x11) -end -function c70271583.atkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local g=Duel.GetMatchingGroup(c70271583.filter,tp,LOCATION_MZONE,0,nil) - local tc=g:GetFirst() - while tc do - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e1:SetValue(800) - tc:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_UPDATE_DEFENCE) - tc:RegisterEffect(e2) - tc=g:GetNext() - end -end -function c70271583.indcon(e) - return e:GetHandler():IsPosition(POS_FACEUP_ATTACK) -end diff --git a/script/c70278545.lua b/script/c70278545.lua deleted file mode 100644 index 3f6438cad8..0000000000 --- a/script/c70278545.lua +++ /dev/null @@ -1,26 +0,0 @@ ---謙虚な壺 -function c70278545.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TODECK) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c70278545.target) - e1:SetOperation(c70278545.activate) - c:RegisterEffect(e1) -end -function c70278545.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,LOCATION_HAND,0,2,e:GetHandler()) end - Duel.SetTargetPlayer(tp) - Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,2,tp,LOCATION_HAND) -end -function c70278545.activate(e,tp,eg,ep,ev,re,r,rp) - local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) - local g=Duel.GetMatchingGroup(Card.IsAbleToDeck,p,LOCATION_HAND,0,nil) - if g:GetCount()>=2 then - Duel.Hint(HINT_SELECTMSG,p,HINTMSG_TODECK) - local sg=g:Select(p,2,2,nil) - Duel.SendtoDeck(sg,nil,2,REASON_EFFECT) - end -end diff --git a/script/c70284332.lua b/script/c70284332.lua deleted file mode 100644 index 0a306a8b35..0000000000 --- a/script/c70284332.lua +++ /dev/null @@ -1,70 +0,0 @@ ---調律師の陰謀 -function c70284332.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_CONTROL) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c70284332.target) - e1:SetOperation(c70284332.operation) - c:RegisterEffect(e1) - --Destroy - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e2:SetRange(LOCATION_SZONE) - e2:SetCode(EVENT_LEAVE_FIELD) - e2:SetCondition(c70284332.descon) - e2:SetOperation(c70284332.desop) - c:RegisterEffect(e2) -end -function c70284332.filter(c,e,tp) - return c:IsFaceup() and c:IsControler(tp) and c:IsType(TYPE_SYNCHRO) and c:IsCanBeEffectTarget(e) and c:IsControlerCanBeChanged() -end -function c70284332.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return eg:IsContains(chkc) and c70284332.filter(chkc,e,1-tp) end - if chk==0 then return eg:IsExists(c70284332.filter,1,nil,e,1-tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) - local g=eg:FilterSelect(tp,c70284332.filter,1,1,nil,e,1-tp) - Duel.SetTargetCard(g) - Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0) -end -function c70284332.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsRelateToEffect(e) then - c:SetCardTarget(tc) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_CONTROL) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_OWNER_RELATE) - e1:SetRange(LOCATION_MZONE) - e1:SetValue(tp) - e1:SetReset(RESET_EVENT+0x1fc0000) - e1:SetCondition(c70284332.con) - tc:RegisterEffect(e1) - --redirect - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) - e2:SetCondition(c70284332.dircon) - e2:SetValue(LOCATION_REMOVED) - e2:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e2) - end -end -function c70284332.con(e) - local c=e:GetOwner() - local h=e:GetHandler() - return c:IsHasCardTarget(h) -end -function c70284332.dircon(e) - return e:GetHandler():IsReason(REASON_DESTROY) -end -function c70284332.descon(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetHandler():GetFirstCardTarget() - return tc and eg:IsContains(tc) -end -function c70284332.desop(e,tp,eg,ep,ev,re,r,rp) - Duel.Destroy(e:GetHandler(),REASON_EFFECT) -end diff --git a/script/c7030340.lua b/script/c7030340.lua deleted file mode 100644 index bb0162fa95..0000000000 --- a/script/c7030340.lua +++ /dev/null @@ -1,40 +0,0 @@ ---百機夜工 -function c7030340.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_REMOVE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c7030340.target) - e1:SetOperation(c7030340.activate) - c:RegisterEffect(e1) -end -function c7030340.filter1(c) - return c:IsSetCard(0x26) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemove() -end -function c7030340.filter2(c) - return c:IsFaceup() and c:IsRace(RACE_MACHINE) -end -function c7030340.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c7030340.filter2(chkc) end - if chk==0 then return Duel.IsExistingMatchingCard(c7030340.filter1,tp,LOCATION_GRAVE,0,1,nil) - and Duel.IsExistingTarget(c7030340.filter2,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c7030340.filter2,tp,LOCATION_MZONE,0,1,1,nil) - local rg=Duel.GetMatchingGroup(c7030340.filter1,tp,LOCATION_GRAVE,0,nil) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,rg,rg:GetCount(),0,0) -end -function c7030340.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c7030340.filter1,tp,LOCATION_GRAVE,0,nil) - Duel.Remove(g,POS_FACEUP,REASON_EFFECT) - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(g:GetCount()*200) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - end -end diff --git a/script/c70307656.lua b/script/c70307656.lua deleted file mode 100644 index 41be07795a..0000000000 --- a/script/c70307656.lua +++ /dev/null @@ -1,41 +0,0 @@ ---グラッジ -function c70307656.initial_effect(c) - --direct attack - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DIRECT_ATTACK) - c:RegisterEffect(e1) - --atkup - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_BATTLE_DAMAGE) - e2:SetOperation(c70307656.regop) - c:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(70307656,0)) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e3:SetRange(LOCATION_MZONE) - e3:SetCode(EVENT_PHASE+PHASE_STANDBY) - e3:SetCountLimit(1) - e3:SetCondition(c70307656.atkcon) - e3:SetOperation(c70307656.atkop) - c:RegisterEffect(e3) -end -function c70307656.regop(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():RegisterFlagEffect(70307656,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,0,1) -end -function c70307656.atkcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp and e:GetHandler():GetFlagEffect(70307656)~=0 -end -function c70307656.atkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetProperty(EFFECT_FLAG_COPY_INHERIT) - e1:SetValue(1000) - e1:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e1) - end -end diff --git a/script/c70329348.lua b/script/c70329348.lua deleted file mode 100644 index 4e29f719c5..0000000000 --- a/script/c70329348.lua +++ /dev/null @@ -1,64 +0,0 @@ ---炎舞-「天権」 -function c70329348.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(TIMING_MAIN_END) - e1:SetCondition(c70329348.condition) - e1:SetTarget(c70329348.target) - e1:SetOperation(c70329348.activate) - c:RegisterEffect(e1) - -- - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetRange(LOCATION_SZONE) - e3:SetTargetRange(LOCATION_MZONE,0) - e3:SetCode(EFFECT_UPDATE_ATTACK) - e3:SetTarget(aux.TargetBoolFunction(Card.IsRace,RACE_BEASTWARRIOR)) - e3:SetValue(300) - c:RegisterEffect(e3) -end -function c70329348.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()==PHASE_MAIN1 -end -function c70329348.filter(c) - return c:IsFaceup() and c:IsRace(RACE_BEASTWARRIOR) -end -function c70329348.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c70329348.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c70329348.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c70329348.filter,tp,LOCATION_MZONE,0,1,1,nil) -end -function c70329348.activate(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.NegateRelatedChain(tc,RESET_TURN_SET) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_MAIN1) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetValue(RESET_TURN_SET) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_MAIN1) - tc:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e3:SetRange(LOCATION_MZONE) - e3:SetCode(EFFECT_IMMUNE_EFFECT) - e3:SetValue(c70329348.efilter) - e3:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_MAIN1) - tc:RegisterEffect(e3) - end -end -function c70329348.efilter(e,te) - return te:GetOwner()~=e:GetOwner() -end diff --git a/script/c70342110.lua b/script/c70342110.lua deleted file mode 100644 index 0d8b5742fc..0000000000 --- a/script/c70342110.lua +++ /dev/null @@ -1,29 +0,0 @@ ---次元幽閉 -function c70342110.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_REMOVE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetCondition(c70342110.condition) - e1:SetTarget(c70342110.target) - e1:SetOperation(c70342110.activate) - c:RegisterEffect(e1) -end -function c70342110.condition(e,tp,eg,ep,ev,re,r,rp) - return tp~=Duel.GetTurnPlayer() -end -function c70342110.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local tg=Duel.GetAttacker() - if chkc then return chkc==tg end - if chk==0 then return tg:IsOnField() and tg:IsAbleToRemove() and tg:IsCanBeEffectTarget(e) end - Duel.SetTargetCard(tg) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,tg,1,0,0) -end -function c70342110.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsAttackable() and not tc:IsStatus(STATUS_ATTACK_CANCELED) then - Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) - end -end diff --git a/script/c70344351.lua b/script/c70344351.lua deleted file mode 100644 index 87d8867028..0000000000 --- a/script/c70344351.lua +++ /dev/null @@ -1,32 +0,0 @@ ---フォースフィールド -function c70344351.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(70344351,0)) - e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_CHAINING) - e1:SetCondition(c70344351.condition) - e1:SetTarget(c70344351.target) - e1:SetOperation(c70344351.activate) - c:RegisterEffect(e1) -end -function c70344351.condition(e,tp,eg,ep,ev,re,r,rp) - if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end - local tg=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) - return tg and tg:GetCount()==1 and tg:GetFirst():IsLocation(LOCATION_MZONE) - and re:IsActiveType(TYPE_SPELL) and re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev) -end -function c70344351.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) - end -end -function c70344351.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateActivation(ev) - if re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(eg,REASON_EFFECT) - end -end diff --git a/script/c70355994.lua b/script/c70355994.lua deleted file mode 100644 index 62d14e01a4..0000000000 --- a/script/c70355994.lua +++ /dev/null @@ -1,71 +0,0 @@ ---勇炎星-エンショウ -function c70355994.initial_effect(c) - --set - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(70355994,0)) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_BATTLE_DESTROYING) - e1:SetCountLimit(1) - e1:SetCondition(c70355994.setcon) - e1:SetTarget(c70355994.settg) - e1:SetOperation(c70355994.setop) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(70355994,1)) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCost(c70355994.descost) - e2:SetTarget(c70355994.destg) - e2:SetOperation(c70355994.desop) - c:RegisterEffect(e2) -end -function c70355994.setcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local bc=c:GetBattleTarget() - return c:IsRelateToBattle() and bc:IsLocation(LOCATION_GRAVE) and bc:IsReason(REASON_BATTLE) -end -function c70355994.filter(c) - return c:IsSetCard(0x7c) and c:IsType(TYPE_SPELL) and c:IsSSetable() -end -function c70355994.settg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingMatchingCard(c70355994.filter,tp,LOCATION_DECK,0,1,nil) end -end -function c70355994.setop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) - local g=Duel.SelectMatchingCard(tp,c70355994.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SSet(tp,g:GetFirst()) - Duel.ConfirmCards(1-tp,g) - end -end -function c70355994.filter1(c) - return c:IsFaceup() and c:IsSetCard(0x7c) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToGraveAsCost() - and Duel.IsExistingTarget(c70355994.filter2,0,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c) -end -function c70355994.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c70355994.filter1,tp,LOCATION_ONFIELD,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c70355994.filter1,tp,LOCATION_ONFIELD,0,1,1,nil) - Duel.SendtoGrave(g,REASON_COST) -end -function c70355994.filter2(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable() -end -function c70355994.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and c70355994.filter2(chkc) end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g2=Duel.SelectTarget(tp,c70355994.filter2,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g2,1,0,0) -end -function c70355994.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c70368879.lua b/script/c70368879.lua deleted file mode 100644 index 714e4dd090..0000000000 --- a/script/c70368879.lua +++ /dev/null @@ -1,25 +0,0 @@ ---成金ゴブリン -function c70368879.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DRAW+CATEGORY_RECOVER) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c70368879.target) - e1:SetOperation(c70368879.activate) - c:RegisterEffect(e1) -end -function c70368879.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(1) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) - Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,1-tp,1000) -end -function c70368879.activate(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - if Duel.Draw(p,d,REASON_EFFECT)>0 then - Duel.BreakEffect() - Duel.Recover(1-tp,1000,REASON_EFFECT) - end -end diff --git a/script/c70391588.lua b/script/c70391588.lua deleted file mode 100644 index 3c3fed916f..0000000000 --- a/script/c70391588.lua +++ /dev/null @@ -1,49 +0,0 @@ ---星蝕-レベル・クライム- -function c70391588.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetTarget(c70391588.target) - e1:SetOperation(c70391588.activate) - c:RegisterEffect(e1) -end -function c70391588.filter(c,e,tp) - return c:IsFaceup() and c:IsType(TYPE_SYNCHRO) and c:IsCanBeEffectTarget(e) - and Duel.IsPlayerCanSpecialSummonMonster(tp,70391589,0,0x4011,0,0,c:GetLevel(),RACE_SPELLCASTER,ATTRIBUTE_DARK) -end -function c70391588.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return eg:IsContains(chkc) and c70391588.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and eg:IsExists(c70391588.filter,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - local g=eg:FilterSelect(tp,c70391588.filter,1,1,nil,e,tp) - Duel.SetTargetCard(g) - Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0) -end -function c70391588.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local tc=Duel.GetFirstTarget() - local lv=1 - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - lv=tc:GetLevel() - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CHANGE_LEVEL) - e1:SetValue(1) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - end - if not Duel.IsPlayerCanSpecialSummonMonster(tp,70391589,0,0x4011,0,0,lv,RACE_SPELLCASTER,ATTRIBUTE_DARK) then return end - local token=Duel.CreateToken(tp,70391589) - Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_CHANGE_LEVEL) - e2:SetValue(lv) - e2:SetReset(RESET_EVENT+0x1fe0000) - token:RegisterEffect(e2) - Duel.SpecialSummonComplete() -end diff --git a/script/c70406920.lua b/script/c70406920.lua deleted file mode 100644 index 2b5bf892ea..0000000000 --- a/script/c70406920.lua +++ /dev/null @@ -1,76 +0,0 @@ ---機械王-B.C.3000 -function c70406920.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_END_PHASE) - e1:SetCost(c70406920.cost) - e1:SetTarget(c70406920.target) - e1:SetOperation(c70406920.activate) - c:RegisterEffect(e1) -end -function c70406920.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_SUMMON)==0 and Duel.GetActivityCount(tp,ACTIVITY_SPSUMMON)==0 end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) - e1:SetTargetRange(1,0) - e1:SetLabelObject(e) - e1:SetTarget(c70406920.sumlimit) - Duel.RegisterEffect(e1,tp) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) - e2:SetCode(EFFECT_CANNOT_SUMMON) - e2:SetReset(RESET_PHASE+PHASE_END) - e2:SetTargetRange(1,0) - Duel.RegisterEffect(e2,tp) -end -function c70406920.sumlimit(e,c,sump,sumtype,sumpos,targetp,se) - return e:GetLabelObject()~=se -end -function c70406920.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and - Duel.IsPlayerCanSpecialSummonMonster(tp,70406920,0,0x21,1000,1000,4,RACE_MACHINE,ATTRIBUTE_EARTH) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c70406920.activate(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) then return end - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 - or not Duel.IsPlayerCanSpecialSummonMonster(tp,70406920,0,0x21,1000,1000,4,RACE_MACHINE,ATTRIBUTE_EARTH) then return end - c:AddTrapMonsterAttribute(TYPE_EFFECT,ATTRIBUTE_EARTH,RACE_MACHINE,4,1000,1000) - Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP) - c:TrapMonsterBlock() - --atkup - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(70406920,0)) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCost(c70406920.atkcost) - e1:SetOperation(c70406920.atkop) - e1:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e1) -end -function c70406920.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsRace,1,e:GetHandler(),RACE_MACHINE) end - local g=Duel.SelectReleaseGroup(tp,Card.IsRace,1,1,e:GetHandler(),RACE_MACHINE) - e:SetLabel(g:GetFirst():GetAttack()) - Duel.Release(g,REASON_COST) -end -function c70406920.atkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFacedown() or not c:IsRelateToEffect(e) then return end - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(e:GetLabel()) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - c:RegisterEffect(e1) -end diff --git a/script/c70422863.lua b/script/c70422863.lua deleted file mode 100644 index 2a0a96dd78..0000000000 --- a/script/c70422863.lua +++ /dev/null @@ -1,51 +0,0 @@ ---星守る結界 -function c70422863.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --atk/def - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e2:SetTarget(c70422863.atktg) - e2:SetValue(c70422863.atkval) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EFFECT_UPDATE_DEFENCE) - c:RegisterEffect(e3) - --negate - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e4:SetRange(LOCATION_SZONE) - e4:SetCode(EVENT_BE_BATTLE_TARGET) - e4:SetCondition(c70422863.negcon) - e4:SetCost(c70422863.negcost) - e4:SetOperation(c70422863.negop) - c:RegisterEffect(e4) -end -function c70422863.atktg(e,c) - return c:IsType(TYPE_XYZ) and c:IsSetCard(0x9c) -end -function c70422863.atkval(e,c) - return c:GetOverlayCount()*200 -end -function c70422863.negcon(e,tp,eg,ep,ev,re,r,rp) - local tc=eg:GetFirst() - return tc:IsFaceup() and tc:IsType(TYPE_XYZ) and tc:IsSetCard(0x9c) - and tc:IsControler(tp) and tc:IsLocation(LOCATION_MZONE) -end -function c70422863.cfilter(c) - return c:IsSetCard(0x9c) and c:IsAbleToGraveAsCost() -end -function c70422863.negcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c70422863.cfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,c70422863.cfilter,1,1,REASON_COST) -end -function c70422863.negop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - Duel.NegateAttack() -end diff --git a/script/c70423794.lua b/script/c70423794.lua deleted file mode 100644 index e3d4176eea..0000000000 --- a/script/c70423794.lua +++ /dev/null @@ -1,71 +0,0 @@ ---D・コード -function c70423794.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c70423794.target) - e1:SetOperation(c70423794.operation) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetDescription(aux.Stringid(70423794,0)) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_CHANGE_POS) - e2:SetRange(LOCATION_SZONE) - e2:SetCondition(c70423794.descon) - e2:SetTarget(c70423794.destg) - e2:SetOperation(c70423794.desop) - c:RegisterEffect(e2) - --Equip limit - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_EQUIP_LIMIT) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e3:SetValue(c70423794.eqlimit) - c:RegisterEffect(e3) -end -function c70423794.eqlimit(e,c) - return c:IsSetCard(0x26) -end -function c70423794.filter(c) - return c:IsFaceup() and c:IsSetCard(0x26) -end -function c70423794.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:GetLocation()==LOCATION_MZONE and c70423794.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c70423794.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c70423794.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c70423794.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,c,tc) - end -end -function c70423794.descon(e,tp,eg,ep,ev,re,r,rp) - local tg=e:GetHandler():GetEquipTarget() - return tg and eg:IsContains(tg) -end -function c70423794.desfilter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable() -end -function c70423794.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and c70423794.desfilter(chkc) end - if chk==0 then return not e:GetHandler():IsStatus(STATUS_CHAINING) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c70423794.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c70423794.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c70456282.lua b/script/c70456282.lua deleted file mode 100644 index a4c87a0266..0000000000 --- a/script/c70456282.lua +++ /dev/null @@ -1,67 +0,0 @@ ---A BF-霧雨のクナイ -function c70456282.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c70456282.spcon) - e1:SetOperation(c70456282.spop) - c:RegisterEffect(e1) - --lv change - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetTarget(c70456282.lvtg) - e2:SetOperation(c70456282.lvop) - c:RegisterEffect(e2) -end -function c70456282.spcon(e,c) - if c==nil then return true end - return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-1 - and Duel.CheckReleaseGroup(c:GetControler(),Card.IsSetCard,1,nil,0x33) -end -function c70456282.spop(e,tp,eg,ep,ev,re,r,rp,c) - local g=Duel.SelectReleaseGroup(tp,Card.IsSetCard,1,1,nil,0x33) - Duel.Release(g,REASON_COST) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_ADD_TYPE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetValue(TYPE_TUNER) - e1:SetReset(RESET_EVENT+0xfe0000) - c:RegisterEffect(e1) -end -function c70456282.filter(c) - return c:IsFaceup() and c:IsType(TYPE_SYNCHRO) and c:GetLevel()>0 -end -function c70456282.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c70456282.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c70456282.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - local g=Duel.SelectTarget(tp,c70456282.filter,tp,LOCATION_MZONE,0,1,1,nil) - local t={} - local i=1 - local p=1 - local lv=g:GetFirst():GetLevel() - for i=1,8 do - if lv~=i then t[p]=i p=p+1 end - end - t[p]=nil - Duel.Hint(HINT_SELECTMSG,tp,567) - e:SetLabel(Duel.AnnounceNumber(tp,table.unpack(t))) -end -function c70456282.lvop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CHANGE_LEVEL) - e1:SetValue(e:GetLabel()) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - end -end diff --git a/script/c70458081.lua b/script/c70458081.lua deleted file mode 100644 index a844a6375b..0000000000 --- a/script/c70458081.lua +++ /dev/null @@ -1,37 +0,0 @@ ---EMジンライノ -function c70458081.initial_effect(c) - --cannot be battle target - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(0,LOCATION_MZONE) - e1:SetValue(c70458081.atlimit) - c:RegisterEffect(e1) - --destroy replace - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EFFECT_DESTROY_REPLACE) - e2:SetRange(LOCATION_GRAVE) - e2:SetTarget(c70458081.reptg) - e2:SetValue(c70458081.repval) - e2:SetOperation(c70458081.repop) - c:RegisterEffect(e2) -end -function c70458081.atlimit(e,c) - return c:IsFaceup() and c:IsSetCard(0x9f) and c~=e:GetHandler() -end -function c70458081.repfilter(c,tp) - return c:IsFaceup() and c:IsSetCard(0x9f) and not c:IsCode(70458081) - and c:IsOnField() and c:IsControler(tp) and c:IsReason(REASON_EFFECT+REASON_BATTLE) -end -function c70458081.reptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemove() and eg:IsExists(c70458081.repfilter,1,nil,tp) end - return Duel.SelectYesNo(tp,aux.Stringid(70458081,0)) -end -function c70458081.repval(e,c) - return c70458081.repfilter(c,e:GetHandlerPlayer()) -end -function c70458081.repop(e,tp,eg,ep,ev,re,r,rp) - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT) -end diff --git a/script/c70479321.lua b/script/c70479321.lua deleted file mode 100644 index 6442d321d0..0000000000 --- a/script/c70479321.lua +++ /dev/null @@ -1,99 +0,0 @@ ---EMドラミング・コング -function c70479321.initial_effect(c) - --pendulum summon - aux.AddPendulumProcedure(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --atk - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_ATKCHANGE) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_ATTACK_ANNOUNCE) - e2:SetRange(LOCATION_PZONE) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCountLimit(1) - e2:SetCondition(c70479321.atkcon) - e2:SetTarget(c70479321.atktg) - e2:SetOperation(c70479321.atkop) - c:RegisterEffect(e2) - --summon with no tribute - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(70479321,0)) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e3:SetCode(EFFECT_SUMMON_PROC) - e3:SetCondition(c70479321.ntcon) - c:RegisterEffect(e3) - --change level - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetCode(EFFECT_SUMMON_COST) - e4:SetOperation(c70479321.lvop) - c:RegisterEffect(e4) - --atk - local e5=e2:Clone() - e5:SetRange(LOCATION_MZONE) - e5:SetOperation(c70479321.atkop2) - c:RegisterEffect(e5) -end -function c70479321.atkcon(e,tp,eg,ep,ev,re,r,rp) - local a=Duel.GetAttacker() - local d=Duel.GetAttackTarget() - if d and a:GetControler()~=d:GetControler() then - if a:IsControler(tp) then e:SetLabelObject(a) - else e:SetLabelObject(d) end - return true - else return false end -end -function c70479321.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local tc=e:GetLabelObject() - if chkc then return chkc==tc end - if chk==0 then return tc:IsOnField() and tc:IsCanBeEffectTarget(e) end - Duel.SetTargetCard(tc) -end -function c70479321.atkop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(600) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_BATTLE) - tc:RegisterEffect(e1) - end -end -function c70479321.ntcon(e,c,minc) - if c==nil then return true end - return minc==0 and c:GetLevel()>4 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 - and Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,LOCATION_MZONE)==0 -end -function c70479321.lvcon(e) - return e:GetHandler():GetMaterialCount()==0 -end -function c70479321.lvop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CHANGE_LEVEL) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c70479321.lvcon) - e1:SetValue(4) - e1:SetReset(RESET_EVENT+0xff0000) - c:RegisterEffect(e1) -end -function c70479321.atkop2(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(600) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_BATTLE) - tc:RegisterEffect(e1) - end -end diff --git a/script/c70546737.lua b/script/c70546737.lua deleted file mode 100644 index e2e789d61b..0000000000 --- a/script/c70546737.lua +++ /dev/null @@ -1,65 +0,0 @@ ---アンブラル・ウィル・オ・ザ・ウィスプ -function c70546737.initial_effect(c) - --lv change - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(70546737,0)) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c70546737.lvtg) - e1:SetOperation(c70546737.lvop) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e2) - --destroy - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(70546737,1)) - e3:SetCategory(CATEGORY_DESTROY) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e3:SetCode(EVENT_BATTLE_DESTROYED) - e3:SetCondition(c70546737.descon) - e3:SetTarget(c70546737.destg) - e3:SetOperation(c70546737.desop) - c:RegisterEffect(e3) -end -function c70546737.filter(c,clv) - local lv=c:GetLevel() - return c:IsSetCard(0x87) and lv~=0 and lv~=clv - and ((c:IsLocation(LOCATION_MZONE) and c:IsFaceup()) or c:IsLocation(LOCATION_GRAVE)) -end -function c70546737.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE+LOCATION_GRAVE) and c70546737.filter(chkc,e:GetHandler():GetLevel()) end - if chk==0 then return Duel.IsExistingTarget(c70546737.filter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,e:GetHandler(),e:GetHandler():GetLevel()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - Duel.SelectTarget(tp,c70546737.filter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,e:GetHandler(),e:GetHandler():GetLevel()) -end -function c70546737.lvop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and c:IsFaceup() and tc:IsRelateToEffect(e) - and (not tc:IsLocation(LOCATION_MZONE) or tc:IsFaceup()) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CHANGE_LEVEL) - e1:SetValue(tc:GetLevel()) - e1:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e1) - end -end -function c70546737.descon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:GetBattlePosition()==POS_FACEUP_ATTACK and c:IsLocation(LOCATION_GRAVE) and c:IsReason(REASON_BATTLE) -end -function c70546737.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local rc=e:GetHandler():GetReasonCard() - Duel.SetTargetCard(rc) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,rc,1,0,0) -end -function c70546737.desop(e,tp,eg,ep,ev,re,r,rp) - local rc=Duel.GetFirstTarget() - if rc:IsRelateToEffect(e) then - Duel.Destroy(rc,REASON_EFFECT) - end -end diff --git a/script/c70560957.lua b/script/c70560957.lua deleted file mode 100644 index 19d9a65bd7..0000000000 --- a/script/c70560957.lua +++ /dev/null @@ -1,36 +0,0 @@ ---トゥーン・ロールバック -function c70560957.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCondition(c70560957.condition) - e1:SetTarget(c70560957.target) - e1:SetOperation(c70560957.activate) - c:RegisterEffect(e1) -end -function c70560957.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsAbleToEnterBP() -end -function c70560957.filter(c) - return c:IsFaceup() and c:IsType(TYPE_TOON) and not c:IsHasEffect(EFFECT_EXTRA_ATTACK) -end -function c70560957.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c70560957.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c70560957.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - Duel.SelectTarget(tp,c70560957.filter,tp,LOCATION_MZONE,0,1,1,nil) -end -function c70560957.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_EXTRA_ATTACK) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetValue(1) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - tc:RegisterEffect(e1) - end -end diff --git a/script/c70583986.lua b/script/c70583986.lua deleted file mode 100644 index 60e71ce53a..0000000000 --- a/script/c70583986.lua +++ /dev/null @@ -1,46 +0,0 @@ ---氷結界の虎王ドゥローレン -function c70583986.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,nil,aux.NonTuner(Card.IsAttribute,ATTRIBUTE_WATER),1) - c:EnableReviveLimit() - --to hand, atkup - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(70583986,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetCountLimit(1) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetTarget(c70583986.target) - e1:SetOperation(c70583986.operation) - c:RegisterEffect(e1) -end -function c70583986.filter(c) - return c:IsFaceup() and c:IsAbleToHand() -end -function c70583986.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsControler(tp) and c70583986.filter(chkc) and chkc~=e:GetHandler() end - if chk==0 then return Duel.IsExistingTarget(c70583986.filter,tp,LOCATION_ONFIELD,0,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g=Duel.SelectTarget(tp,c70583986.filter,tp,LOCATION_ONFIELD,0,1,12,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0) -end -function c70583986.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local rg=tg:Filter(Card.IsRelateToEffect,nil,e) - Duel.SendtoHand(rg,nil,REASON_EFFECT) - if c:IsRelateToEffect(e) and c:IsFaceup() then - Duel.BreakEffect() - local og=Duel.GetOperatedGroup() - local ct=og:FilterCount(Card.IsLocation,nil,LOCATION_HAND) - if ct>0 then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+0x1ff0000+RESET_PHASE+PHASE_END) - e1:SetValue(ct*500) - c:RegisterEffect(e1) - end - end -end diff --git a/script/c70595331.lua b/script/c70595331.lua deleted file mode 100644 index 5cd0e6181a..0000000000 --- a/script/c70595331.lua +++ /dev/null @@ -1,50 +0,0 @@ ---地獄の門番イル・ブラッド -function c70595331.initial_effect(c) - aux.EnableDualAttribute(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetDescription(aux.Stringid(70595331,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCondition(aux.IsDualState) - e1:SetTarget(c70595331.target) - e1:SetOperation(c70595331.operation) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_LEAVE_FIELD) - e2:SetOperation(c70595331.desop) - c:RegisterEffect(e2) -end -function c70595331.filter(c,e,tp) - return c:IsRace(RACE_ZOMBIE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsHasEffect(EFFECT_NECRO_VALLEY) -end -function c70595331.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c70595331.filter,tp,LOCATION_GRAVE+LOCATION_HAND,LOCATION_GRAVE,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_HAND) -end -function c70595331.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c70595331.filter,tp,LOCATION_GRAVE+LOCATION_HAND,LOCATION_GRAVE,1,1,nil,e,tp) - local c=e:GetHandler() - local tc=g:GetFirst() - if tc then - if Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)==0 then return end - if c:IsFaceup() and c:IsRelateToEffect(e) then c:SetCardTarget(tc) end - end -end -function c70595331.desfilter(c,rc) - return rc:GetCardTarget():IsContains(c) and c:IsRace(RACE_ZOMBIE) -end -function c70595331.desop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:GetCardTargetCount()>0 then - local dg=Duel.GetMatchingGroup(c70595331.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,c) - Duel.Destroy(dg,REASON_EFFECT) - end -end diff --git a/script/c70624184.lua b/script/c70624184.lua deleted file mode 100644 index 6595c22084..0000000000 --- a/script/c70624184.lua +++ /dev/null @@ -1,31 +0,0 @@ ---セイクリッド・ハワー -function c70624184.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(70624184,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c70624184.spcost) - e1:SetTarget(c70624184.sptg) - e1:SetOperation(c70624184.spop) - c:RegisterEffect(e1) -end -function c70624184.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end -function c70624184.filter(c,e,tp) - return c:IsSetCard(0x53) and c:GetCode()~=70624184 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsHasEffect(EFFECT_NECRO_VALLEY) -end -function c70624184.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsExistingMatchingCard(c70624184.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE) -end -function c70624184.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c70624184.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENCE) -end diff --git a/script/c70630741.lua b/script/c70630741.lua deleted file mode 100644 index c4af788a38..0000000000 --- a/script/c70630741.lua +++ /dev/null @@ -1,41 +0,0 @@ ---レスキュー・ウォリアー -function c70630741.initial_effect(c) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_AVOID_BATTLE_DAMAGE) - e1:SetValue(1) - c:RegisterEffect(e1) - --control - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(70630741,0)) - e2:SetCategory(CATEGORY_CONTROL) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_BATTLE_DESTROYED) - e2:SetCondition(c70630741.condition) - e2:SetTarget(c70630741.target) - e2:SetOperation(c70630741.operation) - c:RegisterEffect(e2) -end -function c70630741.condition(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return not c:IsLocation(LOCATION_DECK) and c:IsReason(REASON_BATTLE) -end -function c70630741.filter(c,tp) - return c:IsFaceup() and c:GetOwner()==tp and c:IsControlerCanBeChanged() -end -function c70630741.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c70630741.filter(chkc,tp) end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) - local g=Duel.SelectTarget(tp,c70630741.filter,tp,0,LOCATION_MZONE,1,1,nil,tp) - Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0) -end -function c70630741.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) and not Duel.GetControl(tc,tp) then - if not tc:IsImmuneToEffect(e) and tc:IsAbleToChangeControler() then - Duel.Destroy(tc,REASON_EFFECT) - end - end -end diff --git a/script/c70655556.lua b/script/c70655556.lua deleted file mode 100644 index 51f9ac32c4..0000000000 --- a/script/c70655556.lua +++ /dev/null @@ -1,36 +0,0 @@ ---スピア・シャーク -function c70655556.initial_effect(c) - --lvup - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(70655556,0)) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c70655556.lvtg) - e1:SetOperation(c70655556.lvop) - c:RegisterEffect(e1) - --pierce - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_PIERCE) - c:RegisterEffect(e2) -end -function c70655556.filter(c) - return c:IsFaceup() and c:GetLevel()==3 and c:IsRace(RACE_FISH) -end -function c70655556.lvtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c70655556.filter,tp,LOCATION_MZONE,0,1,nil) end -end -function c70655556.lvop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c70655556.filter,tp,LOCATION_MZONE,0,nil) - local tc=g:GetFirst() - while tc do - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_LEVEL) - e1:SetValue(1) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - tc=g:GetNext() - end -end diff --git a/script/c70668285.lua b/script/c70668285.lua deleted file mode 100644 index d811cc5d36..0000000000 --- a/script/c70668285.lua +++ /dev/null @@ -1,34 +0,0 @@ ---光天使ソード -function c70668285.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(70668285,0)) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCost(c70668285.atkcost) - e1:SetOperation(c70668285.atkop) - c:RegisterEffect(e1) -end -function c70668285.cfilter(c) - return c:IsSetCard(0x86) and c:GetBaseAttack()>0 and c:IsAbleToGraveAsCost() -end -function c70668285.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c70668285.cfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c70668285.cfilter,tp,LOCATION_HAND,0,1,1,nil) - Duel.SendtoGrave(g,REASON_COST) - e:SetLabel(g:GetFirst():GetBaseAttack()) -end -function c70668285.atkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFaceup() and c:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(e:GetLabel()) - e1:SetReset(RESET_EVENT+0x1ff0000+RESET_PHASE+PHASE_END) - c:RegisterEffect(e1) - end -end diff --git a/script/c70676581.lua b/script/c70676581.lua deleted file mode 100644 index ec1a23b406..0000000000 --- a/script/c70676581.lua +++ /dev/null @@ -1,96 +0,0 @@ ---ダーク・ジェネラル フリード -function c70676581.initial_effect(c) - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - c:RegisterEffect(e1) - --disable - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_DISABLE) - e2:SetRange(LOCATION_MZONE) - e2:SetTargetRange(LOCATION_SZONE,LOCATION_SZONE) - e2:SetTarget(c70676581.distg) - c:RegisterEffect(e2) - --disable effect - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e3:SetCode(EVENT_CHAIN_SOLVING) - e3:SetRange(LOCATION_MZONE) - e3:SetOperation(c70676581.disop) - c:RegisterEffect(e3) - --self destroy - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_FIELD) - e4:SetCode(EFFECT_SELF_DESTROY) - e4:SetRange(LOCATION_MZONE) - e4:SetTargetRange(LOCATION_SZONE,LOCATION_SZONE) - e4:SetTarget(c70676581.distg) - c:RegisterEffect(e4) - --search - local e5=Effect.CreateEffect(c) - e5:SetDescription(aux.Stringid(70676581,1)) - e5:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e5:SetCode(EVENT_PREDRAW) - e5:SetRange(LOCATION_MZONE) - e5:SetCondition(c70676581.condition) - e5:SetTarget(c70676581.target) - e5:SetOperation(c70676581.operation) - c:RegisterEffect(e5) -end -function c70676581.distg(e,c) - if c:GetCardTargetCount()==0 or not c:IsType(TYPE_SPELL) then return false end - return c:GetCardTarget():IsExists(c70676581.disfilter,1,nil,e:GetHandlerPlayer()) -end -function c70676581.disfilter(c,tp) - return c:IsControler(tp) and c:IsFaceup() and c:IsLocation(LOCATION_MZONE) and c:IsAttribute(ATTRIBUTE_DARK) -end -function c70676581.disop(e,tp,eg,ep,ev,re,r,rp) - if not re:IsActiveType(TYPE_SPELL) then return end - if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return end - local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) - if not g or g:GetCount()==0 then return end - if g:IsExists(c70676581.disfilter,1,nil,tp) then - Duel.NegateEffect(ev) - if re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(re:GetHandler(),REASON_EFFECT) - end - end -end -function c70676581.condition(e,tp,eg,ep,ev,re,r,rp) - return tp==Duel.GetTurnPlayer() and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0 - and Duel.GetDrawCount(tp)>0 -end -function c70676581.filter(c) - return c:GetLevel()==4 and c:IsAttribute(ATTRIBUTE_DARK) and c:IsAbleToHand() -end -function c70676581.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c70676581.filter,tp,LOCATION_DECK,0,1,nil) end - local dt=Duel.GetDrawCount(tp) - if dt~=0 then - _replace_count=0 - _replace_max=dt - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EFFECT_DRAW_COUNT) - e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_DRAW) - e1:SetValue(0) - Duel.RegisterEffect(e1,tp) - end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,LOCATION_DECK) -end -function c70676581.operation(e,tp,eg,ep,ev,re,r,rp) - _replace_count=_replace_count+1 - if _replace_count>_replace_max or not e:GetHandler():IsRelateToEffect(e) or e:GetHandler():IsFacedown() then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c70676581.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()~=0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c70681994.lua b/script/c70681994.lua deleted file mode 100644 index a046736f33..0000000000 --- a/script/c70681994.lua +++ /dev/null @@ -1,6 +0,0 @@ ---魔装騎士ドラゴネス -function c70681994.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcCode2(c,53153481,33064647,true,true) -end diff --git a/script/c706925.lua b/script/c706925.lua deleted file mode 100644 index f738f8c1be..0000000000 --- a/script/c706925.lua +++ /dev/null @@ -1,64 +0,0 @@ ---海皇の狙撃兵 -function c706925.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(706925,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetCode(EVENT_BATTLE_DAMAGE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCondition(c706925.spcon) - e1:SetTarget(c706925.sptg) - e1:SetOperation(c706925.spop) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(706925,1)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetCondition(c706925.descon) - e2:SetTarget(c706925.destg) - e2:SetOperation(c706925.desop) - c:RegisterEffect(e2) -end -function c706925.spcon(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp -end -function c706925.spfilter(c,e,tp) - return not c:IsCode(706925) and c:IsLevelBelow(4) and c:IsSetCard(0x77) and c:IsRace(RACE_SEASERPENT) - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c706925.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c706925.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c706925.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c706925.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end -function c706925.descon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsReason(REASON_COST) and re:IsHasType(0x7e0) and re:IsActiveType(TYPE_MONSTER) - and re:GetHandler():IsAttribute(ATTRIBUTE_WATER) -end -function c706925.desfilter(c) - return c:IsFacedown() and c:IsDestructable() -end -function c706925.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and c706925.desfilter(chkc) end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c706925.desfilter,tp,0,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c706925.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) and tc:IsFacedown() then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c7076131.lua b/script/c7076131.lua deleted file mode 100644 index c01551089b..0000000000 --- a/script/c7076131.lua +++ /dev/null @@ -1,32 +0,0 @@ ---ロスト・ネクスト -function c7076131.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOGRAVE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c7076131.target) - e1:SetOperation(c7076131.activate) - c:RegisterEffect(e1) -end -function c7076131.filter(c,code) - return c:IsCode(code) and c:IsAbleToGrave() -end -function c7076131.tgfilter(c,tp) - return c:IsFaceup() and Duel.IsExistingMatchingCard(c7076131.filter,tp,LOCATION_DECK,0,1,nil,c:GetCode()) -end -function c7076131.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c7076131.tgfilter(chkc,tp) end - if chk==0 then return Duel.IsExistingTarget(c7076131.tgfilter,tp,LOCATION_MZONE,0,1,nil,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c7076131.tgfilter,tp,LOCATION_MZONE,0,1,1,nil,tp) -end -function c7076131.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c7076131.filter,tp,LOCATION_DECK,0,1,1,nil,tc:GetCode()) - Duel.SendtoGrave(g,REASON_EFFECT) - end -end diff --git a/script/c70780151.lua b/script/c70780151.lua deleted file mode 100644 index 19c86a123e..0000000000 --- a/script/c70780151.lua +++ /dev/null @@ -1,74 +0,0 @@ ---メンタルスフィア・デーモン -function c70780151.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1) - c:EnableReviveLimit() - --recover - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(70780151,0)) - e1:SetCategory(CATEGORY_RECOVER) - e1:SetCode(EVENT_BATTLE_DESTROYING) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCondition(c70780151.condition) - e1:SetTarget(c70780151.target) - e1:SetOperation(c70780151.operation) - c:RegisterEffect(e1) - --negate - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(70780151,1)) - e2:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetRange(LOCATION_MZONE) - e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) - e2:SetCode(EVENT_CHAINING) - e2:SetCondition(c70780151.discon) - e2:SetCost(c70780151.discost) - e2:SetTarget(c70780151.distg) - e2:SetOperation(c70780151.disop) - c:RegisterEffect(e2) -end -function c70780151.condition(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local bc=c:GetBattleTarget() - return c:IsRelateToBattle() and bc:IsLocation(LOCATION_GRAVE) and bc:IsType(TYPE_MONSTER) -end -function c70780151.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local c=e:GetHandler() - local bc=c:GetBattleTarget() - local dam=bc:GetAttack() - if dam<0 then dam=0 end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(dam) - Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,dam) -end -function c70780151.operation(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Recover(p,d,REASON_EFFECT) -end -function c70780151.discon(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) then return false end - if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end - local tg=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) - if not tg or tg:GetCount()~=1 or not tg:GetFirst():IsRace(RACE_PSYCHO) then return false end - return re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev) -end -function c70780151.discost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,1000) end - Duel.PayLPCost(tp,1000) -end -function c70780151.distg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) - end -end -function c70780151.disop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsFaceup() or not c:IsRelateToEffect(e) then return end - Duel.NegateActivation(ev) - if re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(eg,REASON_EFFECT) - end -end diff --git a/script/c70791313.lua b/script/c70791313.lua deleted file mode 100644 index fd0ee0074c..0000000000 --- a/script/c70791313.lua +++ /dev/null @@ -1,49 +0,0 @@ ---王立魔法図書館 -function c70791313.initial_effect(c) - c:EnableCounterPermit(0x3001) - c:SetCounterLimit(0x3001,3) - --add counter - local e0=Effect.CreateEffect(c) - e0:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e0:SetCode(EVENT_CHAINING) - e0:SetRange(LOCATION_MZONE) - e0:SetOperation(aux.chainreg) - c:RegisterEffect(e0) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e1:SetCode(EVENT_CHAIN_SOLVED) - e1:SetRange(LOCATION_MZONE) - e1:SetOperation(c70791313.acop) - c:RegisterEffect(e1) - --draw - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(70791313,0)) - e2:SetCategory(CATEGORY_DRAW) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetCost(c70791313.drcost) - e2:SetTarget(c70791313.drtg) - e2:SetOperation(c70791313.drop) - c:RegisterEffect(e2) -end -function c70791313.acop(e,tp,eg,ep,ev,re,r,rp) - if re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL) and e:GetHandler():GetFlagEffect(1)>0 then - e:GetHandler():AddCounter(0x3001,1) - end -end -function c70791313.drcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsCanRemoveCounter(tp,0x3001,3,REASON_COST) end - e:GetHandler():RemoveCounter(tp,0x3001,3,REASON_COST) -end -function c70791313.drtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(1) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c70791313.drop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end diff --git a/script/c70797118.lua b/script/c70797118.lua deleted file mode 100644 index 5ba75a096b..0000000000 --- a/script/c70797118.lua +++ /dev/null @@ -1,17 +0,0 @@ ---雷電娘々 -function c70797118.initial_effect(c) - --self destroy - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_SELF_DESTROY) - e1:SetCondition(c70797118.sdcon) - c:RegisterEffect(e1) -end -function c70797118.sdfilter(c) - return c:IsFaceup() and c:GetAttribute()~=ATTRIBUTE_LIGHT -end -function c70797118.sdcon(e) - return Duel.IsExistingMatchingCard(c70797118.sdfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) -end diff --git a/script/c7080743.lua b/script/c7080743.lua deleted file mode 100644 index 4f76a664cf..0000000000 --- a/script/c7080743.lua +++ /dev/null @@ -1,48 +0,0 @@ ---豪腕特急トロッコロッコ -function c7080743.initial_effect(c) - --effect gain - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_BE_MATERIAL) - e1:SetCondition(c7080743.efcon) - e1:SetOperation(c7080743.efop) - c:RegisterEffect(e1) -end -function c7080743.efcon(e,tp,eg,ep,ev,re,r,rp) - return r==REASON_XYZ -end -function c7080743.efop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local rc=c:GetReasonCard() - local e1=Effect.CreateEffect(rc) - e1:SetDescription(aux.Stringid(7080743,0)) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(c7080743.atkcon) - e1:SetOperation(c7080743.atkop) - e1:SetReset(RESET_EVENT+0x1fe0000) - rc:RegisterEffect(e1,true) - if not rc:IsType(TYPE_EFFECT) then - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_ADD_TYPE) - e2:SetValue(TYPE_EFFECT) - e2:SetReset(RESET_EVENT+0x1fe0000) - rc:RegisterEffect(e2,true) - end -end -function c7080743.atkcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_XYZ -end -function c7080743.atkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(800) - e1:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e1) - end -end diff --git a/script/c70821187.lua b/script/c70821187.lua deleted file mode 100644 index e3e28e1803..0000000000 --- a/script/c70821187.lua +++ /dev/null @@ -1,25 +0,0 @@ ---再生ミイラ -function c70821187.initial_effect(c) - --damage - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(70821187,0)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCondition(c70821187.condition) - e1:SetTarget(c70821187.target) - e1:SetOperation(c70821187.operation) - c:RegisterEffect(e1) -end -function c70821187.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_HAND) and rp~=tp and bit.band(r,REASON_EFFECT)==REASON_EFFECT -end -function c70821187.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsRelateToEffect(e) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0) -end -function c70821187.operation(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) and Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT)==1 then - Duel.ConfirmCards(1-tp,e:GetHandler()) - end -end diff --git a/script/c70828912.lua b/script/c70828912.lua deleted file mode 100644 index 82ec9c5131..0000000000 --- a/script/c70828912.lua +++ /dev/null @@ -1,62 +0,0 @@ ---早すぎた埋葬 -function c70828912.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCost(c70828912.cost) - e1:SetTarget(c70828912.target) - e1:SetOperation(c70828912.operation) - c:RegisterEffect(e1) - --Destroy - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE) - e2:SetCode(EVENT_LEAVE_FIELD) - e2:SetOperation(c70828912.desop) - c:RegisterEffect(e2) -end -function c70828912.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,800) - else Duel.PayLPCost(tp,800) end -end -function c70828912.spfilter(c,e,tp) - return c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c70828912.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c70828912.spfilter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c70828912.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c70828912.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c70828912.eqlimit(e,c) - return e:GetLabelObject()==c -end -function c70828912.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then - if Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_ATTACK)==0 then return end - Duel.Equip(tp,c,tc) - --Add Equip limit - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(c70828912.eqlimit) - e1:SetLabelObject(tc) - c:RegisterEffect(e1) - end -end -function c70828912.desop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=c:GetFirstCardTarget() - if c:IsReason(REASON_DESTROY) and tc and tc:IsLocation(LOCATION_MZONE) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c70832512.lua b/script/c70832512.lua deleted file mode 100644 index 832af3f4c9..0000000000 --- a/script/c70832512.lua +++ /dev/null @@ -1,36 +0,0 @@ ---レアル・クルセイダー -function c70832512.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(70832512,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_FIELD) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCost(c70832512.cost) - e1:SetTarget(c70832512.target) - e1:SetOperation(c70832512.operation) - c:RegisterEffect(e1) -end -function c70832512.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsRelateToEffect(e) and e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end -function c70832512.dfilter(c,e) - return c:IsFaceup() and c:IsLevelAbove(5) and (not e or c:IsRelateToEffect(e)) -end -function c70832512.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - if not eg:IsExists(c70832512.dfilter,1,nil) then return false end - if e:GetHandler():IsStatus(STATUS_CHAINING) then return false end - e:GetHandler():SetStatus(STATUS_CHAINING,true) - return true - end - Duel.SetTargetCard(eg) -end -function c70832512.operation(e,tp,eg,ep,ev,re,r,rp) - local g=eg:Filter(c70832512.dfilter,nil,e) - if g:GetCount()~=0 then - Duel.Destroy(g,REASON_EFFECT) - end -end diff --git a/script/c70861343.lua b/script/c70861343.lua deleted file mode 100644 index 2c389086b7..0000000000 --- a/script/c70861343.lua +++ /dev/null @@ -1,52 +0,0 @@ ---忍法 変化の術 -function c70861343.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,0x1c0+TIMING_DRAW_PHASE) - e1:SetTarget(c70861343.target) - e1:SetOperation(c70861343.operation) - c:RegisterEffect(e1) - --Destroy - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE) - e2:SetCode(EVENT_LEAVE_FIELD) - e2:SetOperation(c70861343.desop) - c:RegisterEffect(e2) -end -function c70861343.cfilter(c,e,tp) - local lv=c:GetLevel() - return c:IsFaceup() and lv>0 and c:IsSetCard(0x2b) - and Duel.IsExistingMatchingCard(c70861343.filter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,lv+3,e,tp) -end -function c70861343.filter(c,lv,e,tp) - return c:IsLevelBelow(lv) and c:IsRace(RACE_BEAST+RACE_WINDBEAST+RACE_INSECT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c70861343.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.CheckReleaseGroup(tp,c70861343.cfilter,1,nil,e,tp) end - local rg=Duel.SelectReleaseGroup(tp,c70861343.cfilter,1,1,nil,e,tp) - e:SetLabel(rg:GetFirst():GetLevel()+3) - Duel.Release(rg,REASON_COST) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) -end -function c70861343.operation(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local c=e:GetHandler() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c70861343.filter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e:GetLabel(),e,tp) - local tc=g:GetFirst() - if tc then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - c:SetCardTarget(tc) - end -end -function c70861343.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetHandler():GetFirstCardTarget() - if tc and tc:IsLocation(LOCATION_MZONE) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c70865988.lua b/script/c70865988.lua deleted file mode 100644 index a860876817..0000000000 --- a/script/c70865988.lua +++ /dev/null @@ -1,29 +0,0 @@ ---全弾発射 -function c70865988.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_DRAW_PHASE) - e1:SetTarget(c70865988.target) - e1:SetOperation(c70865988.activate) - c:RegisterEffect(e1) -end -function c70865988.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)>0 end - Duel.SetTargetPlayer(1-tp) - local dam=Duel.GetFieldGroupCount(1-tp,LOCATION_HAND,0)*200 - Duel.SetTargetParam(dam) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,dam) -end -function c70865988.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetFieldGroup(tp,LOCATION_HAND,0) - if Duel.SendtoGrave(g,REASON_EFFECT)>0 then - local og=Duel.GetOperatedGroup() - local dam=og:FilterCount(Card.IsLocation,nil,LOCATION_GRAVE)*200 - local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) - Duel.Damage(p,dam,REASON_EFFECT) - end -end diff --git a/script/c70875955.lua b/script/c70875955.lua deleted file mode 100644 index 52013ce00a..0000000000 --- a/script/c70875955.lua +++ /dev/null @@ -1,72 +0,0 @@ ---空中補給 -function c70875955.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c70875955.sptg1) - e1:SetOperation(c70875955.spop) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetDescription(aux.Stringid(70875955,0)) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetRange(LOCATION_SZONE) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetHintTiming(0,TIMING_END_PHASE) - e2:SetTarget(c70875955.sptg2) - e2:SetOperation(c70875955.spop) - e2:SetLabel(1) - c:RegisterEffect(e2) - --spsummon - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e3:SetRange(LOCATION_SZONE) - e3:SetCode(EVENT_PHASE+PHASE_END) - e3:SetCountLimit(1) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_IGNORE_IMMUNE) - e3:SetOperation(c70875955.mtop) - c:RegisterEffect(e3) -end -function c70875955.sptg1(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsPlayerCanSpecialSummonMonster(tp,31533705,0x101b,0x4011,0,0,3,RACE_MACHINE,ATTRIBUTE_WIND) - and Duel.SelectYesNo(tp,aux.Stringid(70875955,1)) then - e:SetCategory(CATEGORY_SPECIAL_SUMMON) - e:SetLabel(1) - e:GetHandler():RegisterFlagEffect(70875955,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) - e:GetHandler():RegisterFlagEffect(0,RESET_CHAIN,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(70875955,3)) - else - e:SetCategory(0) - e:SetLabel(0) - end -end -function c70875955.sptg2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():GetFlagEffect(70875955)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsPlayerCanSpecialSummonMonster(tp,31533705,0x101b,0x4011,0,0,3,RACE_MACHINE,ATTRIBUTE_WIND) end - Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0) - e:GetHandler():RegisterFlagEffect(70875955,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) -end -function c70875955.spop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - if e:GetLabel()==0 or Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - if Duel.IsPlayerCanSpecialSummonMonster(tp,31533705,0x101b,0x4011,0,0,3,RACE_MACHINE,ATTRIBUTE_WIND) then - local token=Duel.CreateToken(tp,70875956) - Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP) - end -end -function c70875955.rfilter(c) - return c:IsType(TYPE_TOKEN) or c:IsSetCard(0x101b) -end -function c70875955.mtop(e,tp,eg,ep,ev,re,r,rp) - if Duel.CheckReleaseGroup(tp,c70875955.rfilter,1,nil) - and Duel.SelectYesNo(tp,aux.Stringid(70875955,2)) then - local g=Duel.SelectReleaseGroup(tp,c70875955.rfilter,1,1,nil) - Duel.Release(g,REASON_RULE) - else - Duel.SendtoGrave(e:GetHandler(),REASON_RULE) - end -end diff --git a/script/c7089711.lua b/script/c7089711.lua deleted file mode 100644 index 0115c70e17..0000000000 --- a/script/c7089711.lua +++ /dev/null @@ -1,25 +0,0 @@ ---ハネハネ -function c7089711.initial_effect(c) - --flip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(7089711,0)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP) - e1:SetTarget(c7089711.target) - e1:SetOperation(c7089711.operation) - c:RegisterEffect(e1) -end -function c7089711.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:GetLocation()==LOCATION_MZONE and chkc:IsAbleToHand() end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g=Duel.SelectTarget(tp,Card.IsAbleToHand,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0) -end -function c7089711.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - end -end diff --git a/script/c70899775.lua b/script/c70899775.lua deleted file mode 100644 index b950174e9a..0000000000 --- a/script/c70899775.lua +++ /dev/null @@ -1,47 +0,0 @@ ---ピアニッシモ -function c70899775.initial_effect(c) - --activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetCondition(c70899775.condition) - e1:SetTarget(c70899775.target) - e1:SetOperation(c70899775.activate) - c:RegisterEffect(e1) -end -function c70899775.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end -function c70899775.filter(c) - return c:IsFaceup() and c:GetFlagEffect(70899775)==0 -end -function c70899775.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c70899775.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c70899775.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - Duel.SelectTarget(tp,c70899775.filter,tp,LOCATION_MZONE,0,1,1,nil) -end -function c70899775.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsType(TYPE_MONSTER) and tc:GetFlagEffect(70899775)==0 then - tc:RegisterFlagEffect(70899775,RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END,0,1) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_BASE_ATTACK) - e1:SetValue(100) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e2:SetValue(1) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - tc:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - tc:RegisterEffect(e3) - end -end diff --git a/script/c70902743.lua b/script/c70902743.lua deleted file mode 100644 index 36aa5da649..0000000000 --- a/script/c70902743.lua +++ /dev/null @@ -1,88 +0,0 @@ ---レッド・デーモンズ・ドラゴン -function c70902743.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1) - c:EnableReviveLimit() - --destroy1 - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(70902743,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_BATTLED) - e1:SetCondition(c70902743.condition1) - e1:SetTarget(c70902743.target1) - e1:SetOperation(c70902743.operation1) - c:RegisterEffect(e1) - --destroy2 - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(70902743,1)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCode(EVENT_PHASE+PHASE_END) - e2:SetCondition(c70902743.condition2) - e2:SetTarget(c70902743.target2) - e2:SetOperation(c70902743.operation2) - c:RegisterEffect(e2) - if not c70902743.global_check then - c70902743.global_check=true - local ge1=Effect.CreateEffect(c) - ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - ge1:SetCode(EVENT_ATTACK_ANNOUNCE) - ge1:SetOperation(c70902743.check) - Duel.RegisterEffect(ge1,0) - local ge2=Effect.CreateEffect(c) - ge2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - ge2:SetCode(EVENT_ATTACK_DISABLED) - ge2:SetOperation(c70902743.check2) - Duel.RegisterEffect(ge2,0) - end -end -function c70902743.check(e,tp,eg,ep,ev,re,r,rp) - local tc=eg:GetFirst() - local ct=tc:GetFlagEffectLabel(70902743) - if ct then - tc:SetFlagEffectLabel(70902743,ct+1) - else - tc:RegisterFlagEffect(70902743,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1,1) - end -end -function c70902743.check2(e,tp,eg,ep,ev,re,r,rp) - local tc=eg:GetFirst() - local ct=tc:GetFlagEffectLabel(70902743) - if ct then - tc:SetFlagEffectLabel(70902743,ct-1) - end -end -function c70902743.condition1(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetAttacker()==e:GetHandler() and Duel.GetAttackTarget() and not Duel.GetAttackTarget():IsAttackPos() -end -function c70902743.filter1(c) - return not c:IsAttackPos() and c:IsDestructable() -end -function c70902743.target1(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local g=Duel.GetMatchingGroup(c70902743.filter1,tp,0,LOCATION_MZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c70902743.operation1(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c70902743.filter1,tp,0,LOCATION_MZONE,nil) - Duel.Destroy(g,REASON_EFFECT) -end -function c70902743.filter2(c) - local ct=c:GetFlagEffectLabel(70902743) - return (not ct or ct==0) and c:IsDestructable() -end -function c70902743.condition2(e,tp,eg,ep,ev,re,r,rp) - return tp==Duel.GetTurnPlayer() -end -function c70902743.target2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local g=Duel.GetMatchingGroup(c70902743.filter2,tp,LOCATION_MZONE,0,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c70902743.operation2(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c70902743.filter2,tp,LOCATION_MZONE,0,e:GetHandler()) - Duel.Destroy(g,REASON_EFFECT) -end diff --git a/script/c70908596.lua b/script/c70908596.lua deleted file mode 100644 index 57db1ed08b..0000000000 --- a/script/c70908596.lua +++ /dev/null @@ -1,49 +0,0 @@ ---セイクリッド・カウスト -function c70908596.initial_effect(c) - --lv change - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(70908596,0)) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(2) - e1:SetTarget(c70908596.target) - e1:SetOperation(c70908596.operation) - c:RegisterEffect(e1) - -- - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e2:SetValue(1) - c:RegisterEffect(e2) -end -function c70908596.filter(c) - return c:IsFaceup() and c:IsSetCard(0x53) and c:IsLevelAbove(1) -end -function c70908596.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c70908596.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c70908596.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - local g=Duel.SelectTarget(tp,c70908596.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - local tc=g:GetFirst() - local op=0 - if tc:GetLevel()==1 then op=Duel.SelectOption(tp,aux.Stringid(70908596,1)) - else op=Duel.SelectOption(tp,aux.Stringid(70908596,1),aux.Stringid(70908596,2)) end - e:SetLabel(op) -end -function c70908596.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_UPDATE_LEVEL) - e1:SetReset(RESET_EVENT+0x1fe0000) - if e:GetLabel()==0 then - e1:SetValue(1) - else e1:SetValue(-1) end - tc:RegisterEffect(e1) - end -end diff --git a/script/c70913714.lua b/script/c70913714.lua deleted file mode 100644 index 1d952a696b..0000000000 --- a/script/c70913714.lua +++ /dev/null @@ -1,80 +0,0 @@ ---古神ハストール -function c70913714.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1) - c:EnableReviveLimit() - --equip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(70913714,0)) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCondition(c70913714.eqcon) - e1:SetTarget(c70913714.eqtg) - e1:SetOperation(c70913714.eqop) - c:RegisterEffect(e1) -end -function c70913714.eqcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_MZONE) -end -function c70913714.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsFaceup() end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil) -end -function c70913714.eqlimit(e,c) - return e:GetOwner()==c -end -function c70913714.eqop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsRelateToEffect(e) then - Duel.Equip(tp,c,tc,true) - --Add Equip limit - local e1=Effect.CreateEffect(tc) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(c70913714.eqlimit) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_DISABLE) - e2:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EFFECT_CANNOT_ATTACK) - c:RegisterEffect(e3) - --control - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(70913714,1)) - e4:SetCategory(CATEGORY_CONTROL) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e4:SetCode(EVENT_LEAVE_FIELD) - e4:SetTarget(c70913714.cttg) - e4:SetOperation(c70913714.ctop) - e4:SetReset(RESET_EVENT+0x1020000) - c:RegisterEffect(e4) - end -end -function c70913714.cttg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local ec=e:GetHandler():GetPreviousEquipTarget() - if ec:IsLocation(LOCATION_MZONE) and ec:IsControlerCanBeChanged() then - Duel.SetTargetCard(ec) - Duel.SetOperationInfo(0,CATEGORY_CONTROL,ec,1,0,0) - end -end -function c70913714.ctop(e,tp,eg,ep,ev,re,r,rp) - local ec=Duel.GetFirstTarget() - if ec and ec:IsRelateToEffect(e) and not Duel.GetControl(ec,tp) then - if not ec:IsImmuneToEffect(e) and ec:IsAbleToChangeControler() then - Duel.Destroy(ec,REASON_EFFECT) - end - end -end diff --git a/script/c7092142.lua b/script/c7092142.lua deleted file mode 100644 index 813a177a7b..0000000000 --- a/script/c7092142.lua +++ /dev/null @@ -1,43 +0,0 @@ ---激流蘇生 -function c7092142.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e1:SetCountLimit(1,7092142+EFFECT_COUNT_CODE_OATH) - e1:SetCondition(c7092142.condition) - e1:SetTarget(c7092142.target) - e1:SetOperation(c7092142.operation) - c:RegisterEffect(e1) -end -function c7092142.cfilter(c,tp) - return c:IsReason(REASON_DESTROY) and c:IsPreviousLocation(LOCATION_MZONE) and c:GetPreviousControler()==tp and c:IsPreviousPosition(POS_FACEUP) - and c:IsAttribute(ATTRIBUTE_WATER) and bit.band(c:GetPreviousAttributeOnField(),ATTRIBUTE_WATER)~=0 -end -function c7092142.condition(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c7092142.cfilter,1,nil,tp) -end -function c7092142.spfilter(c,e,tp) - return c:IsPreviousLocation(LOCATION_MZONE) and c:IsControler(tp) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c7092142.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local ct=eg:FilterCount(c7092142.spfilter,nil,e,tp) - return ct>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>=ct - end - Duel.SetTargetCard(eg) - local g=eg:Filter(c7092142.spfilter,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,g:GetCount(),0,0) -end -function c7092142.spfilter2(c,e,tp) - return c:IsPreviousLocation(LOCATION_MZONE) and c:IsControler(tp) and c:IsRelateToEffect(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c7092142.operation(e,tp,eg,ep,ev,re,r,rp) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - local sg=eg:Filter(c7092142.spfilter2,nil,e,tp) - if ft0 end -end -function c7093411.operation(e,tp,eg,ep,ev,re,r,rp,chk) - if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) - local g=Duel.SelectMatchingCard(tp,Card.IsSetCard,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_HAND,0,1,1,nil,0x1034) - if g:GetCount()>0 then - local tc=g:GetFirst() - Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) - local e1=Effect.CreateEffect(tc) - e1:SetCode(EFFECT_CHANGE_TYPE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fc0000) - e1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS) - tc:RegisterEffect(e1) - Duel.RaiseEvent(tc,47408488,e,0,tp,0,0) - end -end diff --git a/script/c70946699.lua b/script/c70946699.lua deleted file mode 100644 index 9e5c70de78..0000000000 --- a/script/c70946699.lua +++ /dev/null @@ -1 +0,0 @@ ---炎虎梁山爆 function c70946699.initial_effect(c) --recover local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCategory(CATEGORY_RECOVER) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetCode(EVENT_FREE_CHAIN) e1:SetTarget(c70946699.target) e1:SetOperation(c70946699.operation) c:RegisterEffect(e1) --damage local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(70946699,0)) e2:SetCategory(CATEGORY_DAMAGE) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e2:SetCode(EVENT_TO_GRAVE) e2:SetCondition(c70946699.damcon) e2:SetTarget(c70946699.damtg) e2:SetOperation(c70946699.damop) c:RegisterEffect(e2) end function c70946699.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetTargetPlayer(tp) local rec=Duel.GetMatchingGroupCount(c70946699.filter,tp,LOCATION_ONFIELD,0,nil)*500 Duel.SetTargetParam(rec) Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,rec) end function c70946699.filter(c) return c:IsType(TYPE_CONTINUOUS) and c:IsFaceup() end function c70946699.operation(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end local rec=Duel.GetMatchingGroupCount(c70946699.filter,tp,LOCATION_ONFIELD,0,nil)*500 local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) Duel.Recover(p,rec,REASON_EFFECT) end function c70946699.damcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() return c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousPosition(POS_FACEUP) and c:IsReason(REASON_EFFECT) and c:GetReasonPlayer()~=tp and c:GetPreviousControler()==tp end function c70946699.damtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetTargetPlayer(1-tp) local dam=Duel.GetMatchingGroupCount(c70946699.filter,tp,LOCATION_GRAVE,0,nil)*500 Duel.SetTargetParam(dam) Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,500) end function c70946699.damop(e,tp,eg,ep,ev,re,r,rp) local dam=Duel.GetMatchingGroupCount(c70946699.filter,tp,LOCATION_GRAVE,0,nil)*500 local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) Duel.Damage(p,dam,REASON_EFFECT) end \ No newline at end of file diff --git a/script/c70948327.lua b/script/c70948327.lua deleted file mode 100644 index 5e2f33b2e3..0000000000 --- a/script/c70948327.lua +++ /dev/null @@ -1,24 +0,0 @@ ---ナノブレイカー -function c70948327.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(70948327,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_BATTLE_START) - e1:SetTarget(c70948327.destg) - e1:SetOperation(c70948327.desop) - c:RegisterEffect(e1) -end -function c70948327.destg(e,tp,eg,ep,ev,re,r,rp,chk) - local d=Duel.GetAttackTarget() - if chk ==0 then return Duel.GetAttacker()==e:GetHandler() - and d~=nil and d:IsFaceup() and d:IsLevelBelow(3) and d:IsDestructable() end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,d,1,0,0) -end -function c70948327.desop(e,tp,eg,ep,ev,re,r,rp) - local d=Duel.GetAttackTarget() - if d:IsRelateToBattle() and d:IsFaceup() and d:IsLevelBelow(3) then - Duel.Destroy(d,REASON_EFFECT) - end -end diff --git a/script/c70969517.lua b/script/c70969517.lua deleted file mode 100644 index 39dc2163ab..0000000000 --- a/script/c70969517.lua +++ /dev/null @@ -1,68 +0,0 @@ ---幻獣ロックリザード -function c70969517.initial_effect(c) - --summon with 1 tribute - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(70969517,0)) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SUMMON_PROC) - e1:SetCondition(c70969517.otcon) - e1:SetOperation(c70969517.otop) - e1:SetValue(SUMMON_TYPE_ADVANCE) - c:RegisterEffect(e1) - --damage1 - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(70969517,1)) - e2:SetCategory(CATEGORY_DAMAGE) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetCode(EVENT_BATTLE_DESTROYING) - e2:SetTarget(c70969517.damtg1) - e2:SetOperation(c70969517.damop) - c:RegisterEffect(e2) - --damage2 - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(70969517,2)) - e2:SetCategory(CATEGORY_DAMAGE) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetCondition(c70969517.damcon2) - e2:SetTarget(c70969517.damtg2) - e2:SetOperation(c70969517.damop) - c:RegisterEffect(e2) -end -function c70969517.otfilter(c,tp) - return c:IsSetCard(0x1b) and (c:IsControler(tp) or c:IsFaceup()) -end -function c70969517.otcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - local mg=Duel.GetMatchingGroup(c70969517.otfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp) - return c:GetLevel()>6 and Duel.GetTributeCount(c,mg)>0 -end -function c70969517.otop(e,tp,eg,ep,ev,re,r,rp,c) - local mg=Duel.GetMatchingGroup(c70969517.otfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp) - local sg=Duel.SelectTribute(tp,c,1,1,mg) - c:SetMaterial(sg) - Duel.Release(sg,REASON_SUMMON+REASON_MATERIAL) -end -function c70969517.damtg1(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(500) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,500) -end -function c70969517.damcon2(e,tp,eg,ep,ev,re,r,rp) - return bit.band(r,0x41)==0x41 and rp~=tp and e:GetHandler():GetPreviousControler()==tp -end -function c70969517.damtg2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(2000) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,2000) -end -function c70969517.damop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c71015787.lua b/script/c71015787.lua deleted file mode 100644 index 1d13a08706..0000000000 --- a/script/c71015787.lua +++ /dev/null @@ -1,55 +0,0 @@ ---サイレント・ウォビー -function c71015787.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(71015787,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND) - e1:SetTarget(c71015787.sptg) - e1:SetOperation(c71015787.spop) - c:RegisterEffect(e1) - --draw/recover - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(71015787,1)) - e2:SetCategory(CATEGORY_DRAW+CATEGORY_RECOVER) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetCountLimit(1,71015787) - e2:SetCondition(c71015787.effcon) - e2:SetTarget(c71015787.efftg) - e2:SetOperation(c71015787.effop) - c:RegisterEffect(e2) - --limit - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetCode(EFFECT_HAND_LIMIT) - e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e3:SetRange(LOCATION_MZONE) - e3:SetTargetRange(1,0) - e3:SetValue(3) - c:RegisterEffect(e3) -end -function c71015787.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(1-tp,LOCATION_MZONE,tp)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,1,tp,false,false,POS_FACEUP,1-tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c71015787.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,1,tp,1-tp,false,false,POS_FACEUP) - end -end -function c71015787.effcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+1 -end -function c71015787.efftg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) - Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,1-tp,2000) -end -function c71015787.effop(e,tp,eg,ep,ev,re,r,rp) - Duel.Draw(tp,1,REASON_EFFECT) - Duel.Recover(1-tp,2000,REASON_EFFECT) -end diff --git a/script/c71044499.lua b/script/c71044499.lua deleted file mode 100644 index e249ed579f..0000000000 --- a/script/c71044499.lua +++ /dev/null @@ -1,40 +0,0 @@ ---抹殺の使徒 -function c71044499.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_REMOVE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c71044499.target) - e1:SetOperation(c71044499.activate) - c:RegisterEffect(e1) -end -function c71044499.filter(c) - return c:IsFacedown() and c:IsDestructable() and c:IsAbleToRemove() -end -function c71044499.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c71044499.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c71044499.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c71044499.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) -end -function c71044499.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsFacedown() and tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT,LOCATION_REMOVED) - if tc:IsType(TYPE_FLIP) then - local code=tc:GetCode() - local g=Duel.GetMatchingGroup(Card.IsCode,tp,LOCATION_DECK,LOCATION_DECK,nil,code) - Duel.Remove(g,POS_FACEUP,REASON_EFFECT) - g=Duel.GetFieldGroup(tp,0,LOCATION_DECK) - Duel.ConfirmCards(tp,g) - g=Duel.GetFieldGroup(tp,LOCATION_DECK,0) - Duel.ConfirmCards(1-tp,g) - Duel.ShuffleDeck(tp) - Duel.ShuffleDeck(1-tp) - end - end -end diff --git a/script/c71060915.lua b/script/c71060915.lua deleted file mode 100644 index ec2d382806..0000000000 --- a/script/c71060915.lua +++ /dev/null @@ -1,32 +0,0 @@ ---フェザー・ウィンド -function c71060915.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_CHAINING) - e1:SetCondition(c71060915.condition) - e1:SetTarget(c71060915.target) - e1:SetOperation(c71060915.activate) - c:RegisterEffect(e1) -end -function c71060915.filter(c) - return c:IsFaceup() and c:IsCode(21844576) -end -function c71060915.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c71060915.filter,tp,LOCATION_ONFIELD,0,1,nil) - and re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev) -end -function c71060915.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) - end -end -function c71060915.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateActivation(ev) - if re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(eg,REASON_EFFECT) - end -end diff --git a/script/c71068247.lua b/script/c71068247.lua deleted file mode 100644 index a67af0f6d2..0000000000 --- a/script/c71068247.lua +++ /dev/null @@ -1,51 +0,0 @@ ---トーテムバード -function c71068247.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_WIND),3,2) - c:EnableReviveLimit() - --negate activate - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(71068247,0)) - e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EVENT_CHAINING) - e1:SetCondition(c71068247.condition) - e1:SetCost(c71068247.cost) - e1:SetTarget(c71068247.target) - e1:SetOperation(c71068247.operation) - c:RegisterEffect(e1) - --atkdown - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetCondition(c71068247.adcon) - e2:SetValue(-300) - c:RegisterEffect(e2) -end -function c71068247.condition(e,tp,eg,ep,ev,re,r,rp,chk) - return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) - and re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev) -end -function c71068247.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,2,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,2,2,REASON_COST) -end -function c71068247.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) - end -end -function c71068247.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(eg,REASON_EFFECT) - end -end -function c71068247.adcon(e) - return e:GetHandler():GetOverlayCount()==0 -end diff --git a/script/c71071546.lua b/script/c71071546.lua deleted file mode 100644 index 729f65c477..0000000000 --- a/script/c71071546.lua +++ /dev/null @@ -1,91 +0,0 @@ ---オービタル 7 -function c71071546.initial_effect(c) - --counter - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(71071546,0)) - e1:SetCategory(CATEGORY_COUNTER) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_FLIP) - e1:SetOperation(c71071546.ctop) - c:RegisterEffect(e1) - --atkchange - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_ATKCHANGE) - e2:SetDescription(aux.Stringid(71071546,1)) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCost(c71071546.atkcost) - e2:SetOperation(c71071546.atkop) - c:RegisterEffect(e2) - --salvage - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(71071546,2)) - e3:SetCategory(CATEGORY_TOHAND) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_MZONE) - e3:SetCost(c71071546.thcost) - e3:SetTarget(c71071546.thtg) - e3:SetOperation(c71071546.thop) - c:RegisterEffect(e3) -end -function c71071546.ctop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - c:AddCounter(0x2c,1) - end -end -function c71071546.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - local ct=e:GetHandler():GetCounter(0x2c) - if chk==0 then return ct>0 and e:GetHandler():IsCanRemoveCounter(tp,0x2c,ct,REASON_COST) end - e:GetHandler():RemoveCounter(tp,0x2c,ct,REASON_COST) -end -function c71071546.atkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_COPY_INHERIT) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetValue(2000) - e1:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_CANNOT_DIRECT_ATTACK) - e2:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1) - e3:SetCode(EVENT_PHASE+PHASE_END) - e3:SetOperation(c71071546.tgop) - e3:SetReset(RESET_EVENT+0xc6e0000) - c:RegisterEffect(e3) - end -end -function c71071546.tgop(e,tp,eg,ep,ev,re,r,rp) - Duel.SendtoGrave(e:GetHandler(),REASON_EFFECT) -end -function c71071546.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end -function c71071546.filter(c) - return (c:IsSetCard(0x55) or c:IsSetCard(0x7b)) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() -end -function c71071546.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c71071546.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c71071546.filter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c71071546.filter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c71071546.thop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end diff --git a/script/c71098407.lua b/script/c71098407.lua deleted file mode 100644 index 9d6f0bb6e2..0000000000 --- a/script/c71098407.lua +++ /dev/null @@ -1,27 +0,0 @@ ---もの忘れ -function c71098407.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DISABLE+CATEGORY_POSITION) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_CHAINING) - e1:SetCondition(c71098407.condition) - e1:SetTarget(c71098407.target) - e1:SetOperation(c71098407.activate) - c:RegisterEffect(e1) -end -function c71098407.condition(e,tp,eg,ep,ev,re,r,rp) - return rp~=tp and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainDisablable(ev) - and re:GetHandler():IsLocation(LOCATION_MZONE) and re:GetHandler():IsPosition(POS_FACEUP_ATTACK) -end -function c71098407.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetCard(re:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0) -end -function c71098407.activate(e,tp,eg,ep,ev,re,r,rp) - local rc=re:GetHandler() - if Duel.NegateEffect(ev) and rc:IsRelateToEffect(e) then - Duel.ChangePosition(rc,POS_FACEUP_DEFENCE) - end -end diff --git a/script/c71106375.lua b/script/c71106375.lua deleted file mode 100644 index f8d891c069..0000000000 --- a/script/c71106375.lua +++ /dev/null @@ -1,33 +0,0 @@ ---ジュラック・イグアノン -function c71106375.initial_effect(c) - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(71106375,0)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_BATTLE_DESTROYING) - e1:SetCondition(c71106375.thcon) - e1:SetTarget(c71106375.thtg) - e1:SetOperation(c71106375.thop) - c:RegisterEffect(e1) -end -function c71106375.thcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsRelateToBattle() and c:GetBattleTarget():IsType(TYPE_MONSTER) -end -function c71106375.filter(c) - return c:IsFacedown() and c:IsAbleToHand() -end -function c71106375.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() and c71106375.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c71106375.filter,tp,0,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g=Duel.SelectTarget(tp,c71106375.filter,tp,0,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c71106375.thop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsFacedown() and tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - end -end diff --git a/script/c71107816.lua b/script/c71107816.lua deleted file mode 100644 index 8813b6ca94..0000000000 --- a/script/c71107816.lua +++ /dev/null @@ -1,27 +0,0 @@ ---悪魔の調理師 -function c71107816.initial_effect(c) - --draw - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(71107816,0)) - e1:SetCategory(CATEGORY_DRAW) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_BATTLE_DAMAGE) - e1:SetCondition(c71107816.condition) - e1:SetTarget(c71107816.target) - e1:SetOperation(c71107816.operation) - c:RegisterEffect(e1) -end -function c71107816.condition(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp -end -function c71107816.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(2) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,1-tp,2) -end -function c71107816.operation(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end diff --git a/script/c71175527.lua b/script/c71175527.lua deleted file mode 100644 index 00a1b9c1df..0000000000 --- a/script/c71175527.lua +++ /dev/null @@ -1,56 +0,0 @@ ---ガスタの神裔 ピリカ -function c71175527.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(71175527,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_CARD_TARGET) - e1:SetCountLimit(1,71175527) - e1:SetTarget(c71175527.sptg) - e1:SetOperation(c71175527.spop) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e2) -end -function c71175527.filter(c,e,tp) - return c:IsAttribute(ATTRIBUTE_WIND) and c:IsType(TYPE_TUNER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c71175527.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c71175527.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c71175527.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c71175527.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c71175527.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP_DEFENCE) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e2) - end - Duel.SpecialSummonComplete() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetTargetRange(1,0) - e1:SetTarget(c71175527.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function c71175527.splimit(e,c,tp,sumtp,sumpos) - return c:GetAttribute()~=ATTRIBUTE_WIND -end diff --git a/script/c71181155.lua b/script/c71181155.lua deleted file mode 100644 index 0b99a2096d..0000000000 --- a/script/c71181155.lua +++ /dev/null @@ -1,12 +0,0 @@ ---幻獣クロスウィング -function c71181155.initial_effect(c) - --atkup - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetRange(LOCATION_GRAVE) - e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x1b)) - e1:SetValue(300) - c:RegisterEffect(e1) -end diff --git a/script/c71200730.lua b/script/c71200730.lua deleted file mode 100644 index 4dfa89f79d..0000000000 --- a/script/c71200730.lua +++ /dev/null @@ -1,26 +0,0 @@ ---闇より出でし絶望 -function c71200730.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(71200730,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCondition(c71200730.spcon) - e1:SetTarget(c71200730.sptg) - e1:SetOperation(c71200730.spop) - c:RegisterEffect(e1) -end -function c71200730.spcon(e,tp,eg,ep,ev,re,r,rp) - local loc=e:GetHandler():GetPreviousLocation() - return (loc==LOCATION_HAND or loc==LOCATION_DECK) and bit.band(r,REASON_EFFECT)~=0 and rp~=tp -end -function c71200730.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c71200730.spop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - Duel.SpecialSummon(e:GetHandler(),1,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c71203602.lua b/script/c71203602.lua deleted file mode 100644 index 06e0332567..0000000000 --- a/script/c71203602.lua +++ /dev/null @@ -1,33 +0,0 @@ ---イビリチュア・リヴァイアニマ -function c71203602.initial_effect(c) - c:EnableReviveLimit() - --confirm - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(71203602,0)) - e1:SetCategory(CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetTarget(c71203602.target) - e1:SetOperation(c71203602.operation) - c:RegisterEffect(e1) -end -function c71203602.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c71203602.operation(e,tp,eg,ep,ev,re,r,rp) - local ct=Duel.Draw(tp,1,REASON_EFFECT) - if ct==0 then return end - local tc=Duel.GetOperatedGroup():GetFirst() - Duel.ConfirmCards(1-tp,tc) - Duel.ShuffleHand(tp) - if tc:IsSetCard(0x3a) and tc:IsType(TYPE_MONSTER) then - Duel.BreakEffect() - local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND) - if g:GetCount()>0 then - local sg=g:RandomSelect(tp,1) - Duel.ConfirmCards(tp,sg) - end - Duel.ShuffleHand(1-tp) - end -end diff --git a/script/c71209500.lua b/script/c71209500.lua deleted file mode 100644 index a4679e07d3..0000000000 --- a/script/c71209500.lua +++ /dev/null @@ -1,47 +0,0 @@ ---アマゾネス・スカウト -function c71209500.initial_effect(c) - --effects - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(71209500,0)) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,0x1c0+TIMING_DRAW_PHASE) - e1:SetCost(c71209500.efcost) - e1:SetTarget(c71209500.eftg) - e1:SetOperation(c71209500.efop) - c:RegisterEffect(e1) -end -function c71209500.efcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end -function c71209500.filter(c) - return c:IsFaceup() and c:IsSetCard(0x4) -end -function c71209500.eftg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c71209500.filter,tp,LOCATION_MZONE,0,1,e:GetHandler()) end -end -function c71209500.efop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local g=Duel.GetMatchingGroup(c71209500.filter,tp,LOCATION_MZONE,0,nil) - local tc=g:GetFirst() - while tc do - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) - e1:SetValue(c71209500.efilter) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - e2:SetValue(1) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e2) - tc=g:GetNext() - end -end -function c71209500.efilter(e,re,rp) - return re:IsActiveType(TYPE_MONSTER) and aux.tgval(e,re,rp) -end \ No newline at end of file diff --git a/script/c71218746.lua b/script/c71218746.lua deleted file mode 100644 index ff791e780d..0000000000 --- a/script/c71218746.lua +++ /dev/null @@ -1,23 +0,0 @@ ---ドリルロイド -function c71218746.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(71218746,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_BATTLE_CONFIRM) - e1:SetTarget(c71218746.targ) - e1:SetOperation(c71218746.op) - c:RegisterEffect(e1) -end -function c71218746.targ(e,tp,eg,ep,ev,re,r,rp,chk) - local t=Duel.GetAttackTarget() - if chk ==0 then return Duel.GetAttacker()==e:GetHandler() and t~=nil and not t:IsAttackPos() and t:IsDestructable() end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,t,1,0,0) -end -function c71218746.op(e,tp,eg,ep,ev,re,r,rp) - local t=Duel.GetAttackTarget() - if t~=nil and t:IsRelateToBattle() and not t:IsAttackPos() then - Duel.Destroy(t,REASON_EFFECT) - end -end diff --git a/script/c71233859.lua b/script/c71233859.lua deleted file mode 100644 index 47b7fd7ab8..0000000000 --- a/script/c71233859.lua +++ /dev/null @@ -1,39 +0,0 @@ ---フォトン・ブースター -function c71233859.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c71233859.target) - e1:SetOperation(c71233859.activate) - c:RegisterEffect(e1) -end -function c71233859.filter(c) - return c:IsFaceup() and not c:IsType(TYPE_TOKEN) and c:IsLevelBelow(4) and c:IsAttribute(ATTRIBUTE_LIGHT) -end -function c71233859.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c71233859.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c71233859.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - local g=Duel.SelectTarget(tp,c71233859.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) -end -function c71233859.afilter(c,code) - return c:IsFaceup() and c:IsCode(code) -end -function c71233859.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsFacedown() or not tc:IsRelateToEffect(e) then return end - local g=Duel.GetMatchingGroup(c71233859.afilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tc:GetCode()) - local tc=g:GetFirst() - while tc do - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - e1:SetValue(2000) - tc:RegisterEffect(e1) - tc=g:GetNext() - end -end diff --git a/script/c71249758.lua b/script/c71249758.lua deleted file mode 100644 index 8c6a37bdd7..0000000000 --- a/script/c71249758.lua +++ /dev/null @@ -1,35 +0,0 @@ ---D2シールド -function c71249758.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c71249758.condition) - e1:SetTarget(c71249758.target) - e1:SetOperation(c71249758.activate) - c:RegisterEffect(e1) -end -function c71249758.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end -function c71249758.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:IsPosition(POS_FACEUP_DEFENCE) end - if chk==0 then return Duel.IsExistingTarget(Card.IsPosition,tp,LOCATION_MZONE,0,1,nil,POS_FACEUP_DEFENCE) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - local g=Duel.SelectTarget(tp,Card.IsPosition,tp,LOCATION_MZONE,0,1,1,nil,POS_FACEUP_DEFENCE) -end -function c71249758.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - local def=tc:GetBaseDefence() - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_DEFENCE_FINAL) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(def*2) - tc:RegisterEffect(e1) - end -end diff --git a/script/c712559.lua b/script/c712559.lua deleted file mode 100644 index c9a6b0887f..0000000000 --- a/script/c712559.lua +++ /dev/null @@ -1,61 +0,0 @@ ---アマゾネスの里 -function c712559.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --atkup - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x4)) - e2:SetValue(200) - c:RegisterEffect(e2) - --special summon - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(712559,0)) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e3:SetRange(LOCATION_SZONE) - e3:SetCode(EVENT_TO_GRAVE) - e3:SetCountLimit(1) - e3:SetCondition(c712559.condition) - e3:SetTarget(c712559.target) - e3:SetOperation(c712559.operation) - c:RegisterEffect(e3) -end -function c712559.condition(e,tp,eg,ep,ev,re,r,rp) - local lv=0 - local tc=eg:GetFirst() - while tc do - if tc:IsReason(REASON_DESTROY) and tc:IsSetCard(0x4) and not tc:IsPreviousLocation(LOCATION_SZONE) then - local tlv=tc:GetLevel() - if tlv>lv then lv=tlv end - end - tc=eg:GetNext() - end - if lv>0 then e:SetLabel(lv) end - return lv>0 -end -function c712559.spfilter(c,e,tp,lv) - return c:IsLevelBelow(lv) and c:IsSetCard(0x4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c712559.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsRelateToEffect(e) and not e:GetHandler():IsStatus(STATUS_CHAINING) - and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c712559.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp,e:GetLabel()) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c712559.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - if not e:GetHandler():IsRelateToEffect(e) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c712559.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,e:GetLabel()) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c71272951.lua b/script/c71272951.lua deleted file mode 100644 index e4320ca9eb..0000000000 --- a/script/c71272951.lua +++ /dev/null @@ -1,24 +0,0 @@ ---オーバースペック -function c71272951.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,0x1c0) - e1:SetTarget(c71272951.target) - e1:SetOperation(c71272951.activate) - c:RegisterEffect(e1) -end -function c71272951.filter(c) - return c:IsFaceup() and c:GetAttack()>c:GetBaseAttack() and c:IsDestructable() -end -function c71272951.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c71272951.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - local g=Duel.GetMatchingGroup(c71272951.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c71272951.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c71272951.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - Duel.Destroy(g,REASON_EFFECT) -end diff --git a/script/c71279983.lua b/script/c71279983.lua deleted file mode 100644 index 708b028c3e..0000000000 --- a/script/c71279983.lua +++ /dev/null @@ -1,57 +0,0 @@ ---U.A.ドレッドノートダンカー -function c71279983.initial_effect(c) - --special summon rule - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetRange(LOCATION_HAND) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetCountLimit(1,71279983) - e1:SetCondition(c71279983.spcon) - e1:SetOperation(c71279983.spop) - c:RegisterEffect(e1) - --pierce - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_PIERCE) - c:RegisterEffect(e2) - --destroy - local e3=Effect.CreateEffect(c) - e3:SetCategory(CATEGORY_DESTROY) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_BATTLE_DAMAGE) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetCondition(c71279983.descon) - e3:SetTarget(c71279983.destg) - e3:SetOperation(c71279983.desop) - c:RegisterEffect(e3) -end -function c71279983.spfilter(c) - return c:IsFaceup() and c:IsSetCard(0xb2) and not c:IsCode(71279983) and c:IsAbleToHandAsCost() -end -function c71279983.spcon(e,c) - if c==nil then return true end - return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-1 - and Duel.IsExistingMatchingCard(c71279983.spfilter,c:GetControler(),LOCATION_MZONE,0,1,nil) -end -function c71279983.spop(e,tp,eg,ep,ev,re,r,rp,c) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g=Duel.SelectMatchingCard(tp,c71279983.spfilter,tp,LOCATION_MZONE,0,1,1,nil) - Duel.SendtoHand(g,nil,REASON_COST) -end -function c71279983.descon(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp -end -function c71279983.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsDestructable() end - if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c71279983.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c71283180.lua b/script/c71283180.lua deleted file mode 100644 index 8e5ebf3bb2..0000000000 --- a/script/c71283180.lua +++ /dev/null @@ -1,37 +0,0 @@ ---トルネード・バード -function c71283180.initial_effect(c) - --flip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(71283180,0)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP) - e1:SetTarget(c71283180.target) - e1:SetOperation(c71283180.operation) - c:RegisterEffect(e1) -end -function c71283180.filter(c,e) - return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand() and c:IsCanBeEffectTarget(e) -end -function c71283180.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and c71283180.filter(chkc,e) end - if chk==0 then return true end - local g=Duel.GetMatchingGroup(c71283180.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,e) - if g:GetCount()<2 then - g:Clear() - Duel.SetTargetCard(g) - return - end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local sg=g:Select(tp,2,2,nil) - Duel.SetTargetCard(sg) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,sg,2,0,0) -end -function c71283180.operation(e,tp,eg,ep,ev,re,r,rp) - local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - if not tg then return end - local dg=tg:Filter(Card.IsRelateToEffect,nil,e) - if dg:GetCount()==2 then - Duel.SendtoHand(dg,nil,REASON_EFFECT) - end -end diff --git a/script/c71315423.lua b/script/c71315423.lua deleted file mode 100644 index 32ca8c9ebd..0000000000 --- a/script/c71315423.lua +++ /dev/null @@ -1,64 +0,0 @@ ---ワーム・ミリディス -function c71315423.initial_effect(c) - --flip - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) - e1:SetTarget(c71315423.eqtg) - e1:SetOperation(c71315423.eqop) - c:RegisterEffect(e1) -end -function c71315423.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsFaceup() end - if chk==0 then return e:GetHandler():IsRelateToEffect(e) and e:GetHandler():IsFaceup() - and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c71315423.eqop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if not tc or c:IsFacedown() or not c:IsRelateToEffect(e) then return end - if tc:IsFacedown() or not tc:IsRelateToEffect(e) then - Duel.SendtoGrave(c,REASON_EFFECT) - return - end - if not Duel.Equip(tp,c,tc,false) then return end - --damage - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(71315423,0)) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_SZONE) - e1:SetTarget(c71315423.damtg) - e1:SetOperation(c71315423.damop) - e1:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e1) - --eqlimit - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_EQUIP_LIMIT) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetValue(c71315423.eqlimit) - e2:SetLabelObject(tc) - e2:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e2) -end -function c71315423.eqlimit(e,c) - return c==e:GetLabelObject() -end -function c71315423.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,e:GetHandler():GetEquipTarget():GetControler(),400) -end -function c71315423.damop(e,tp,eg,ep,ev,re,r,rp) - local tg=e:GetHandler():GetEquipTarget() - if tg then - Duel.Damage(tg:GetControler(),400,REASON_EFFECT) - end -end diff --git a/script/c71341529.lua b/script/c71341529.lua deleted file mode 100644 index eeb1907772..0000000000 --- a/script/c71341529.lua +++ /dev/null @@ -1,44 +0,0 @@ ---インフェルニティ・ナイト -function c71341529.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(71341529,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_CVAL_CHECK) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCondition(c71341529.spcon) - e1:SetCost(c71341529.spcost) - e1:SetTarget(c71341529.sptg) - e1:SetOperation(c71341529.spop) - e1:SetValue(c71341529.valcheck) - c:RegisterEffect(e1) -end -function c71341529.spcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsReason(REASON_DESTROY) and bit.band(c:GetPreviousLocation(),LOCATION_ONFIELD)~=0 -end -function c71341529.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - if Duel.GetFlagEffect(tp,71341529)==0 then - Duel.RegisterFlagEffect(tp,71341529,RESET_CHAIN,0,1) - c71341529[0]=Duel.GetMatchingGroupCount(Card.IsDiscardable,tp,LOCATION_HAND,0,e:GetHandler()) - c71341529[1]=0 - end - return c71341529[0]-c71341529[1]>=2 - end - Duel.DiscardHand(tp,Card.IsDiscardable,2,2,REASON_COST+REASON_DISCARD) -end -function c71341529.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c71341529.spop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP) - end -end -function c71341529.valcheck(e) - c71341529[1]=c71341529[1]+2 -end diff --git a/script/c71345905.lua b/script/c71345905.lua deleted file mode 100644 index 19c659ef98..0000000000 --- a/script/c71345905.lua +++ /dev/null @@ -1,73 +0,0 @@ ---RDM-ヌメロン・フォール -function c71345905.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c71345905.target) - e1:SetOperation(c71345905.activate) - c:RegisterEffect(e1) -end -function c71345905.filter1(c,e,tp) - local rk=c:GetRank() - return rk>1 and c:IsFaceup() and c:IsSetCard(0x7f) - and Duel.IsExistingMatchingCard(c71345905.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,c,rk) -end -function c71345905.filter2(c,e,tp,mc,rk) - return c:IsRankBelow(rk-1) and c:IsSetCard(0x7f) and mc:IsCanBeXyzMaterial(c) - and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) -end -function c71345905.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c71345905.filter1(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsExistingTarget(c71345905.filter1,tp,LOCATION_MZONE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - Duel.SelectTarget(tp,c71345905.filter1,tp,LOCATION_MZONE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function c71345905.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<0 then return end - local tc=Duel.GetFirstTarget() - if tc:IsFacedown() or not tc:IsRelateToEffect(e) or tc:IsControler(1-tp) or tc:IsImmuneToEffect(e) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c71345905.filter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc,tc:GetRank()) - local sc=g:GetFirst() - if sc then - local mg=tc:GetOverlayGroup() - if mg:GetCount()~=0 then - Duel.Overlay(sc,mg) - end - sc:SetMaterial(Group.FromCards(tc)) - Duel.Overlay(sc,Group.FromCards(tc)) - Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP) - sc:CompleteProcedure() - --disable - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetOperation(c71345905.disop) - e1:SetReset(RESET_EVENT+0x1fe0000) - sc:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_BE_BATTLE_TARGET) - sc:RegisterEffect(e2) - end -end -function c71345905.disop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local bc=c:GetBattleTarget() - if bc then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_BATTLE) - bc:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_BATTLE) - bc:RegisterEffect(e2) - end -end diff --git a/script/c71353388.lua b/script/c71353388.lua deleted file mode 100644 index f479e0583c..0000000000 --- a/script/c71353388.lua +++ /dev/null @@ -1,20 +0,0 @@ ---リード・バタフライ -function c71353388.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c71353388.spcon) - c:RegisterEffect(e1) -end -function c71353388.cfilter(c) - return c:IsFaceup() and c:IsType(TYPE_SYNCHRO) -end -function c71353388.spcon(e,c) - if c==nil then return true end - return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c71353388.cfilter,c:GetControler(),0,LOCATION_MZONE,1,nil) - and not Duel.IsExistingMatchingCard(c71353388.cfilter,c:GetControler(),LOCATION_MZONE,0,1,nil) -end diff --git a/script/c71395725.lua b/script/c71395725.lua deleted file mode 100644 index c0eb53a714..0000000000 --- a/script/c71395725.lua +++ /dev/null @@ -1,42 +0,0 @@ ---獣人アレス -function c71395725.initial_effect(c) - --chain - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EVENT_CHAINING) - e1:SetRange(LOCATION_MZONE) - e1:SetOperation(c71395725.chop) - c:RegisterEffect(e1) - --atkup - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_CHAIN_END) - e2:SetRange(LOCATION_MZONE) - e2:SetCondition(c71395725.atkcon) - e2:SetOperation(c71395725.atkop) - e2:SetLabelObject(e1) - c:RegisterEffect(e2) -end -function c71395725.chop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetCurrentChain()==1 then - e:SetLabel(0) - else - e:SetLabel(1) - end -end -function c71395725.atkcon(e,tp,eg,ep,ev,re,r,rp) - local res=e:GetLabelObject():GetLabel() - e:GetLabelObject():SetLabel(0) - return res==1 -end -function c71395725.atkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_COPY_INHERIT) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(500) - e1:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e1) -end diff --git a/script/c71408082.lua b/script/c71408082.lua deleted file mode 100644 index 4cf1933965..0000000000 --- a/script/c71408082.lua +++ /dev/null @@ -1,59 +0,0 @@ ---黒竜の聖騎士 -function c71408082.initial_effect(c) - c:EnableReviveLimit() - --destroy - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_BATTLE_START) - e1:SetCondition(c71408082.descon) - e1:SetTarget(c71408082.destg) - e1:SetOperation(c71408082.desop) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,71408082) - e2:SetCost(c71408082.spcost) - e2:SetTarget(c71408082.sptg) - e2:SetOperation(c71408082.spop) - c:RegisterEffect(e2) -end -function c71408082.descon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetAttackTarget() - return tc and tc~=c and tc:IsDefencePos() -end -function c71408082.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local tc=Duel.GetAttackTarget() - Duel.SetOperationInfo(0,CATEGORY_DESTROY,tc,1,0,0) -end -function c71408082.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetAttackTarget() - if tc:IsRelateToBattle() then - Duel.Destroy(tc,REASON_EFFECT) - end -end -function c71408082.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end -function c71408082.spfilter(c,e,tp) - return c:IsSetCard(0x3b) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c71408082.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsExistingMatchingCard(c71408082.spfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_HAND) -end -function c71408082.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c71408082.spfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c71411377.lua b/script/c71411377.lua deleted file mode 100644 index 1933742fb6..0000000000 --- a/script/c71411377.lua +++ /dev/null @@ -1,16 +0,0 @@ ---女王親衛隊 -function c71411377.initial_effect(c) - --at limit - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetCode(EFFECT_CANNOT_BE_BATTLE_TARGET) - e1:SetTarget(c71411377.atlimit) - e1:SetValue(aux.imval1) - c:RegisterEffect(e1) -end -function c71411377.atlimit(e,c) - local code=c:GetCode() - return code==87257460 or code==23756165 or code==50140163 -end diff --git a/script/c71413901.lua b/script/c71413901.lua deleted file mode 100644 index 16982b8522..0000000000 --- a/script/c71413901.lua +++ /dev/null @@ -1,65 +0,0 @@ ---魔導戦士 ブレイカー -function c71413901.initial_effect(c) - c:EnableCounterPermit(0x3001) - c:SetCounterLimit(0x3001,1) - --summon success - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(71413901,0)) - e1:SetCategory(CATEGORY_COUNTER) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c71413901.addct) - e1:SetOperation(c71413901.addc) - c:RegisterEffect(e1) - --attackup - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(c71413901.attackup) - c:RegisterEffect(e2) - --destroy - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(71413901,2)) - e3:SetCategory(CATEGORY_DESTROY) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_MZONE) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetCost(c71413901.descost) - e3:SetTarget(c71413901.destg) - e3:SetOperation(c71413901.desop) - c:RegisterEffect(e3) -end -function c71413901.addct(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,1,0,0x3001) -end -function c71413901.addc(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - e:GetHandler():AddCounter(0x3001,1) - end -end -function c71413901.attackup(e,c) - return c:GetCounter(0x3001)*300 -end -function c71413901.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsCanRemoveCounter(tp,0x3001,1,REASON_COST) end - e:GetHandler():RemoveCounter(tp,0x3001,1,REASON_COST) -end -function c71413901.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable() -end -function c71413901.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and c71413901.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c71413901.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c71413901.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c71413901.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c71415349.lua b/script/c71415349.lua deleted file mode 100644 index 728f35763d..0000000000 --- a/script/c71415349.lua +++ /dev/null @@ -1,43 +0,0 @@ ---ハンプティ・ダンディ -function c71415349.initial_effect(c) - --turn set - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(71415349,0)) - e1:SetCategory(CATEGORY_POSITION) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetTarget(c71415349.target) - e1:SetOperation(c71415349.operation) - c:RegisterEffect(e1) - --atkup - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(71415349,1)) - e2:SetCategory(CATEGORY_ATKCHANGE) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - e2:SetOperation(c71415349.atkop) - c:RegisterEffect(e2) -end -function c71415349.target(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsCanTurnSet() and c:GetFlagEffect(71415349)==0 end - c:RegisterFlagEffect(71415349,RESET_EVENT+0x1fc0000+RESET_PHASE+PHASE_END,0,1) - Duel.SetOperationInfo(0,CATEGORY_POSITION,c,1,0,0) -end -function c71415349.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - Duel.ChangePosition(c,POS_FACEDOWN_DEFENCE) - end -end -function c71415349.atkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(800) - e1:SetReset(RESET_EVENT+0x1ff0000+RESET_PHASE+PHASE_END) - c:RegisterEffect(e1) - end -end diff --git a/script/c71417170.lua b/script/c71417170.lua deleted file mode 100644 index a4bd2ab4ee..0000000000 --- a/script/c71417170.lua +++ /dev/null @@ -1,39 +0,0 @@ ---ディフェンダーズ・クロス -function c71417170.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_POSITION) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c71417170.condition) - e1:SetTarget(c71417170.target) - e1:SetOperation(c71417170.activate) - c:RegisterEffect(e1) -end -function c71417170.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()==PHASE_BATTLE -end -function c71417170.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDefencePos,tp,0,LOCATION_MZONE,1,nil) end - local g=Duel.GetMatchingGroup(Card.IsDefencePos,tp,0,LOCATION_MZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_POSITION,g,g:GetCount(),0,0) -end -function c71417170.activate(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local g=Duel.GetMatchingGroup(Card.IsDefencePos,tp,0,LOCATION_MZONE,nil) - Duel.ChangePosition(g,0,0,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK) - local tc=g:GetFirst() - while tc do - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e2) - tc=g:GetNext() - end -end diff --git a/script/c71422989.lua b/script/c71422989.lua deleted file mode 100644 index 8c49418374..0000000000 --- a/script/c71422989.lua +++ /dev/null @@ -1,85 +0,0 @@ ---吸光融合 -function c71422989.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,71422989+EFFECT_COUNT_CODE_OATH) - e1:SetCost(c71422989.cost) - e1:SetTarget(c71422989.target) - e1:SetOperation(c71422989.activate) - c:RegisterEffect(e1) - Duel.AddCustomActivityCounter(71422989,ACTIVITY_SPSUMMON,c71422989.counterfilter) -end -function c71422989.counterfilter(c) - return c:IsSetCard(0x1047) -end -function c71422989.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetCustomActivityCount(71422989,tp,ACTIVITY_SPSUMMON)==0 end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) - e1:SetTargetRange(1,0) - e1:SetTarget(c71422989.splimit) - Duel.RegisterEffect(e1,tp) -end -function c71422989.splimit(e,c,sump,sumtype,sumpos,targetp,se) - return not c:IsSetCard(0x1047) -end -function c71422989.filter(c) - return c:IsSetCard(0x1047) and c:IsAbleToHand() -end -function c71422989.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c71422989.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c71422989.filter1(c,e) - return c:IsCanBeFusionMaterial() and c:IsAbleToRemove() and not c:IsImmuneToEffect(e) -end -function c71422989.filter2(c,e,tp,m,f,chkf) - return c:IsType(TYPE_FUSION) and c:IsSetCard(0x1047) and (not f or f(c)) - and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf) -end -function c71422989.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c71422989.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp - local mg1=Duel.GetMatchingGroup(c71422989.filter1,tp,LOCATION_HAND+LOCATION_MZONE,0,nil,e) - local sg1=Duel.GetMatchingGroup(c71422989.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf) - local mg2=nil - local sg2=nil - local ce=Duel.GetChainMaterial(tp) - if ce~=nil then - local fgroup=ce:GetTarget() - mg2=fgroup(ce,e,tp) - local mf=ce:GetValue() - sg2=Duel.GetMatchingGroup(c71422989.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,mf,chkf) - end - if (sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0)) and Duel.SelectYesNo(tp,aux.Stringid(71422989,0)) then - Duel.BreakEffect() - local sg=sg1:Clone() - if sg2 then sg:Merge(sg2) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local tg=sg:Select(tp,1,1,nil) - local tc=tg:GetFirst() - if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then - local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf) - tc:SetMaterial(mat1) - Duel.Remove(mat1,POS_FACEUP,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION) - Duel.BreakEffect() - Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP) - else - local mat2=Duel.SelectFusionMaterial(tp,tc,mg2,nil,chkf) - local fop=ce:GetOperation() - fop(ce,e,tp,tc,mat2) - end - tc:CompleteProcedure() - end - end -end diff --git a/script/c71438011.lua b/script/c71438011.lua deleted file mode 100644 index be2d037423..0000000000 --- a/script/c71438011.lua +++ /dev/null @@ -1,17 +0,0 @@ ---A・O・J サンダー・アーマー -function c71438011.initial_effect(c) - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - c:RegisterEffect(e1) - --pierce - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_PIERCE) - e2:SetRange(LOCATION_MZONE) - e2:SetTargetRange(LOCATION_MZONE,0) - e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x1)) - c:RegisterEffect(e2) -end diff --git a/script/c71453557.lua b/script/c71453557.lua deleted file mode 100644 index c8d9bde841..0000000000 --- a/script/c71453557.lua +++ /dev/null @@ -1,58 +0,0 @@ ---自律行動ユニット -function c71453557.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCost(c71453557.cost) - e1:SetTarget(c71453557.target) - e1:SetOperation(c71453557.operation) - c:RegisterEffect(e1) - --Destroy - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE) - e2:SetCode(EVENT_LEAVE_FIELD) - e2:SetOperation(c71453557.desop) - c:RegisterEffect(e2) -end -function c71453557.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,1500) end - Duel.PayLPCost(tp,1500) -end -function c71453557.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:GetLocation()==LOCATION_GRAVE and chkc:GetControler()==1-tp - and chkc:IsCanBeSpecialSummoned(e,0,tp,false,false) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(Card.IsCanBeSpecialSummoned,tp,0,LOCATION_GRAVE,1,nil,e,0,tp,false,false) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,Card.IsCanBeSpecialSummoned,tp,0,LOCATION_GRAVE,1,1,nil,e,0,tp,false,false) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c71453557.eqlimit(e,c) - return e:GetOwner()==c -end -function c71453557.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then - if Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_ATTACK)==0 then return end - Duel.Equip(tp,c,tc) - --Add Equip limit - local e1=Effect.CreateEffect(tc) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(c71453557.eqlimit) - c:RegisterEffect(e1) - end -end -function c71453557.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetHandler():GetFirstCardTarget() - if tc and tc:IsLocation(LOCATION_MZONE) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c71466592.lua b/script/c71466592.lua deleted file mode 100644 index e426bb5db2..0000000000 --- a/script/c71466592.lua +++ /dev/null @@ -1,37 +0,0 @@ ---魔力吸収球体 -function c71466592.initial_effect(c) - --Negate - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(71466592,0)) - e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EVENT_CHAINING) - e1:SetCondition(c71466592.condition) - e1:SetCost(c71466592.cost) - e1:SetTarget(c71466592.target) - e1:SetOperation(c71466592.activate) - c:RegisterEffect(e1) -end -function c71466592.condition(e,tp,eg,ep,ev,re,r,rp) - return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and rp~=tp - and re:IsActiveType(TYPE_SPELL) and re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev) - and Duel.GetTurnPlayer()~=tp -end -function c71466592.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end -function c71466592.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) - end -end -function c71466592.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateActivation(ev) - if re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(eg,REASON_EFFECT) - end -end diff --git a/script/c71490127.lua b/script/c71490127.lua deleted file mode 100644 index e9dc2eed18..0000000000 --- a/script/c71490127.lua +++ /dev/null @@ -1,72 +0,0 @@ ---龍の鏡 -function c71490127.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c71490127.target) - e1:SetOperation(c71490127.activate) - c:RegisterEffect(e1) -end -function c71490127.filter0(c) - return c:IsCanBeFusionMaterial() and c:IsAbleToRemove() -end -function c71490127.filter1(c,e) - return c:IsCanBeFusionMaterial() and c:IsAbleToRemove() and not c:IsImmuneToEffect(e) -end -function c71490127.filter2(c,e,tp,m,f,chkf) - return c:IsType(TYPE_FUSION) and c:IsRace(RACE_DRAGON) and (not f or f(c)) - and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf) -end -function c71490127.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp - local mg1=Duel.GetMatchingGroup(c71490127.filter0,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil) - local res=Duel.IsExistingMatchingCard(c71490127.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf) - if not res then - local ce=Duel.GetChainMaterial(tp) - if ce~=nil then - local fgroup=ce:GetTarget() - local mg2=fgroup(ce,e,tp) - local mf=ce:GetValue() - res=Duel.IsExistingMatchingCard(c71490127.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,chkf) - end - end - return res - end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function c71490127.activate(e,tp,eg,ep,ev,re,r,rp) - local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp - local mg1=Duel.GetMatchingGroup(c71490127.filter1,tp,LOCATION_GRAVE+LOCATION_MZONE,0,nil,e) - local sg1=Duel.GetMatchingGroup(c71490127.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf) - local mg2=nil - local sg2=nil - local ce=Duel.GetChainMaterial(tp) - if ce~=nil then - local fgroup=ce:GetTarget() - mg2=fgroup(ce,e,tp) - local mf=ce:GetValue() - sg2=Duel.GetMatchingGroup(c71490127.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,mf,chkf) - end - if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then - local sg=sg1:Clone() - if sg2 then sg:Merge(sg2) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local tg=sg:Select(tp,1,1,nil) - local tc=tg:GetFirst() - if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then - local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf) - tc:SetMaterial(mat1) - Duel.Remove(mat1,POS_FACEUP,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION) - Duel.BreakEffect() - Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP) - else - local mat2=Duel.SelectFusionMaterial(tp,tc,mg2,nil,chkf) - local fop=ce:GetOperation() - fop(ce,e,tp,tc,mat2) - end - tc:CompleteProcedure() - end -end diff --git a/script/c71519605.lua b/script/c71519605.lua deleted file mode 100644 index f004410aad..0000000000 --- a/script/c71519605.lua +++ /dev/null @@ -1,46 +0,0 @@ ---オシャレオン -function c71519605.initial_effect(c) - --search - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(71519605,0)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetCondition(c71519605.condition) - e1:SetTarget(c71519605.target) - e1:SetOperation(c71519605.operation) - c:RegisterEffect(e1) - --attack limit - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET) - e2:SetRange(LOCATION_MZONE) - e2:SetTargetRange(0,LOCATION_MZONE) - e2:SetCondition(c71519605.atcon) - e2:SetValue(c71519605.atlimit) - c:RegisterEffect(e2) -end -function c71519605.atcon(e) - return e:GetHandler():IsAttackPos() -end -function c71519605.atlimit(e,c) - return c:IsFacedown() or c:GetCode()~=71519605 -end -function c71519605.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) -end -function c71519605.filter(c) - return c:IsAttackBelow(500) and c:IsRace(RACE_REPTILE) and c:IsAbleToHand() -end -function c71519605.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c71519605.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c71519605.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c71519605.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c7152333.lua b/script/c7152333.lua deleted file mode 100644 index 24febfe133..0000000000 --- a/script/c7152333.lua +++ /dev/null @@ -1,37 +0,0 @@ ---アンブラル・グール -function c7152333.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(7152333,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetTarget(c7152333.sptg) - e1:SetOperation(c7152333.spop) - c:RegisterEffect(e1) -end -function c7152333.spfilter(c,e,tp) - return c:IsSetCard(0x87) and c:GetAttack()==0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c7152333.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():GetAttack()>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c7152333.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c7152333.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFacedown() or not c:IsRelateToEffect(e) or c:GetAttack()==0 then return end - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetValue(0) - e1:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e1) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c7152333.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c7153114.lua b/script/c7153114.lua deleted file mode 100644 index 69a9898723..0000000000 --- a/script/c7153114.lua +++ /dev/null @@ -1,44 +0,0 @@ ---フィールドバリア -function c7153114.initial_effect(c) - c:SetUniqueOnField(1,0,7153114) - --activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --indestructable - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_INDESTRUCTABLE) - e2:SetRange(LOCATION_SZONE) - e2:SetProperty(EFFECT_FLAG_IGNORE_RANGE+EFFECT_FLAG_SET_AVAILABLE) - e2:SetTarget(c7153114.infilter) - c:RegisterEffect(e2) - --cannot activate - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetCode(EFFECT_CANNOT_ACTIVATE) - e3:SetRange(LOCATION_SZONE) - e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e3:SetTargetRange(1,1) - e3:SetValue(c7153114.filter) - c:RegisterEffect(e3) - --cannot set - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_FIELD) - e4:SetCode(EFFECT_CANNOT_SSET) - e4:SetRange(LOCATION_SZONE) - e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e4:SetTargetRange(1,1) - e4:SetTarget(c7153114.sfilter) - c:RegisterEffect(e4) -end -function c7153114.infilter(e,c) - return c:IsType(TYPE_FIELD) -end -function c7153114.filter(e,re,tp) - return re:GetHandler():IsType(TYPE_FIELD) and re:IsHasType(EFFECT_TYPE_ACTIVATE) -end -function c7153114.sfilter(e,c,tp) - return c:IsType(TYPE_FIELD) and Duel.GetFieldCard(tp,LOCATION_SZONE,5)~=nil -end diff --git a/script/c71541986.lua b/script/c71541986.lua deleted file mode 100644 index e82212bac7..0000000000 --- a/script/c71541986.lua +++ /dev/null @@ -1,66 +0,0 @@ ---エクシーズ・ディメンション・スプラッシュ -function c71541986.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(71541986,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DELAY) - e1:SetCode(EVENT_REMOVE) - e1:SetCondition(c71541986.spcon) - e1:SetTarget(c71541986.sptg) - e1:SetOperation(c71541986.spop) - c:RegisterEffect(e1) -end -function c71541986.spcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousPosition(POS_FACEDOWN) -end -function c71541986.spfilter(c,e,tp) - return c:IsAttribute(ATTRIBUTE_WATER) and c:GetLevel()==8 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c71541986.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>1 - and Duel.IsExistingMatchingCard(c71541986.spfilter,tp,LOCATION_DECK,0,2,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_DECK) -end -function c71541986.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 then return end - local g=Duel.GetMatchingGroup(c71541986.spfilter,tp,LOCATION_DECK,0,nil,e,tp) - if g:GetCount()<2 then return end - local c=e:GetHandler() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=g:Select(tp,2,2,nil) - local tc=sg:GetFirst() - while tc do - Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE) - e2:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_DISABLE_EFFECT) - e3:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e3) - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e4:SetRange(LOCATION_MZONE) - e4:SetCode(EFFECT_UNRELEASABLE_SUM) - e4:SetValue(1) - e4:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e4) - local e5=e4:Clone() - e5:SetCode(EFFECT_UNRELEASABLE_NONSUM) - tc:RegisterEffect(e5) - tc=sg:GetNext() - end - Duel.SpecialSummonComplete() -end diff --git a/script/c71544954.lua b/script/c71544954.lua deleted file mode 100644 index 1ec20f1b07..0000000000 --- a/script/c71544954.lua +++ /dev/null @@ -1,46 +0,0 @@ ---メガロック・ドラゴン -function c71544954.initial_effect(c) - c:EnableReviveLimit() - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(71544954,0)) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c71544954.spcon) - e1:SetOperation(c71544954.spop) - c:RegisterEffect(e1) - --cannot special summon - local e2=Effect.CreateEffect(c) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_SPSUMMON_CONDITION) - c:RegisterEffect(e2) -end -function c71544954.spfilter(c) - return c:IsRace(RACE_ROCK) and c:IsAbleToRemoveAsCost() -end -function c71544954.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c71544954.spfilter,tp,LOCATION_GRAVE,0,1,nil) -end -function c71544954.spop(e,tp,eg,ep,ev,re,r,rp,c) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c71544954.spfilter,tp,LOCATION_GRAVE,0,1,63,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) - local val=g:GetCount()*700 - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetReset(RESET_EVENT+0xff0000) - e1:SetCode(EFFECT_SET_BASE_ATTACK) - e1:SetValue(val) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_SET_BASE_DEFENCE) - c:RegisterEffect(e2) -end diff --git a/script/c71564150.lua b/script/c71564150.lua deleted file mode 100644 index 7fc0d0a371..0000000000 --- a/script/c71564150.lua +++ /dev/null @@ -1,61 +0,0 @@ ---地獄の傀儡魔人 -function c71564150.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_CONTROL) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCost(c71564150.cost) - e1:SetTarget(c71564150.target) - e1:SetOperation(c71564150.operation) - c:RegisterEffect(e1) -end -function c71564150.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) -end -function c71564150.filter(c) - return c:IsFaceup() and c:IsLevelBelow(3) and c:IsControlerCanBeChanged() -end -function c71564150.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c71564150.filter,tp,0,LOCATION_MZONE,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_CONTROL,nil,1,1-tp,LOCATION_MZONE) -end -function c71564150.operation(e,tp,eg,ep,ev,re,r,rp) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - local c=e:GetHandler() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) - local g=Duel.SelectMatchingCard(tp,c71564150.filter,tp,0,LOCATION_MZONE,ft,ft,nil) - local tc=g:GetFirst() - while tc do - if Duel.GetControl(tc,tp,PHASE_END,1) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UNRELEASABLE_SUM) - e1:SetReset(RESET_EVENT+0x1fc0000+RESET_PHASE+PHASE_END) - e1:SetValue(1) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_UNRELEASABLE_NONSUM) - e2:SetReset(RESET_EVENT+0x1fc0000+RESET_PHASE+PHASE_END) - e2:SetValue(1) - tc:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_CANNOT_TRIGGER) - e3:SetReset(RESET_EVENT+0x1fc0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e3) - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL) - e4:SetReset(RESET_EVENT+0x1fc0000+RESET_PHASE+PHASE_END) - e4:SetValue(1) - tc:RegisterEffect(e4) - elseif not tc:IsImmuneToEffect(e) and tc:IsAbleToChangeControler() then - Duel.Destroy(tc,REASON_EFFECT) - end - tc=g:GetNext() - end -end diff --git a/script/c71564252.lua b/script/c71564252.lua deleted file mode 100644 index cb24cbf77a..0000000000 --- a/script/c71564252.lua +++ /dev/null @@ -1,38 +0,0 @@ ---ライオウ -function c71564252.initial_effect(c) - --disable search - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_TO_HAND) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(LOCATION_DECK,LOCATION_DECK) - c:RegisterEffect(e1) - --disable spsummon - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_DISABLE_SUMMON+CATEGORY_DESTROY) - e2:SetDescription(aux.Stringid(71564252,0)) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EVENT_SPSUMMON) - e2:SetCondition(c71564252.condition) - e2:SetCost(c71564252.cost) - e2:SetTarget(c71564252.target) - e2:SetOperation(c71564252.operation) - c:RegisterEffect(e2) -end -function c71564252.condition(e,tp,eg,ep,ev,re,r,rp) - return tp~=ep and eg:GetCount()==1 and Duel.GetCurrentChain()==0 -end -function c71564252.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end -function c71564252.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DISABLE_SUMMON,eg,eg:GetCount(),0,0) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,eg:GetCount(),0,0) -end -function c71564252.operation(e,tp,eg,ep,ev,re,r,rp,chk) - Duel.NegateSummon(eg) - Duel.Destroy(eg,REASON_EFFECT) -end diff --git a/script/c71578874.lua b/script/c71578874.lua deleted file mode 100644 index d1b76fc800..0000000000 --- a/script/c71578874.lua +++ /dev/null @@ -1,81 +0,0 @@ ---Emミラー・コンダクター -function c71578874.initial_effect(c) - --pendulum summon - aux.AddPendulumProcedure(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --atk/def - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_PZONE) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCountLimit(1) - e2:SetTarget(c71578874.adtg) - e2:SetOperation(c71578874.adop) - c:RegisterEffect(e2) - --swap - local e3=Effect.CreateEffect(c) - e3:SetCategory(CATEGORY_DAMAGE) - e3:SetType(EFFECT_TYPE_QUICK_O) - e3:SetCode(EVENT_FREE_CHAIN) - e3:SetRange(LOCATION_MZONE) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e3:SetHintTiming(TIMING_DAMAGE_STEP) - e3:SetCountLimit(1) - e3:SetCondition(c71578874.swcon) - e3:SetTarget(c71578874.swtg) - e3:SetOperation(c71578874.swop) - c:RegisterEffect(e3) -end -function c71578874.filter(c) - return c:IsFaceup() and c:GetAttack()~=c:GetDefence() - and bit.band(c:GetSummonType(),SUMMON_TYPE_SPECIAL)==SUMMON_TYPE_SPECIAL -end -function c71578874.adtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c71578874.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c71578874.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c71578874.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) -end -function c71578874.adop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - local val=math.min(tc:GetAttack(),tc:GetDefence()) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e1:SetValue(val) - tc:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_SET_DEFENCE_FINAL) - tc:RegisterEffect(e2) - end -end -function c71578874.swcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end -function c71578874.swtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,0,0,tp,500) -end -function c71578874.swop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SWAP_AD) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - Duel.BreakEffect() - Duel.Damage(tp,500,REASON_EFFECT) - end -end diff --git a/script/c71587526.lua b/script/c71587526.lua deleted file mode 100644 index c9abc5ffe6..0000000000 --- a/script/c71587526.lua +++ /dev/null @@ -1,38 +0,0 @@ ---因果切断 -function c71587526.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_REMOVE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,0x1e0) - e1:SetCost(c71587526.cost) - e1:SetTarget(c71587526.target) - e1:SetOperation(c71587526.activate) - c:RegisterEffect(e1) -end -function c71587526.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) -end -function c71587526.filter(c) - return c:IsFaceup() and c:IsAbleToRemove() -end -function c71587526.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and c71587526.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c71587526.filter,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,c71587526.filter,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) -end -function c71587526.rfilter(c,code) - return c:GetCode()==code and c:IsAbleToRemove() -end -function c71587526.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) and Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)~=0 then - local rg=Duel.GetMatchingGroup(c71587526.rfilter,tp,0,LOCATION_GRAVE,nil,tc:GetCode()) - Duel.Remove(rg,POS_FACEUP,REASON_EFFECT) - end -end diff --git a/script/c71594310.lua b/script/c71594310.lua deleted file mode 100644 index 2f6ca3cdaa..0000000000 --- a/script/c71594310.lua +++ /dev/null @@ -1,6 +0,0 @@ ---ジェムナイト・パール -function c71594310.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,4,2) - c:EnableReviveLimit() -end diff --git a/script/c71612253.lua b/script/c71612253.lua deleted file mode 100644 index 1e5f344c73..0000000000 --- a/script/c71612253.lua +++ /dev/null @@ -1,92 +0,0 @@ ---DDD狙撃王テル -function c71612253.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,5,2,c71612253.ovfilter,aux.Stringid(71612253,0)) - c:EnableReviveLimit() - --atk & def - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE+CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetRange(LOCATION_MZONE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetHintTiming(TIMING_DAMAGE) - e1:SetCountLimit(1) - e1:SetCondition(c71612253.condition) - e1:SetCost(c71612253.cost) - e1:SetTarget(c71612253.target) - e1:SetOperation(c71612253.operation) - c:RegisterEffect(e1) - --to grave - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_TOGRAVE) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e2:SetCondition(c71612253.tgcon) - e2:SetTarget(c71612253.tgtg) - e2:SetOperation(c71612253.tgop) - c:RegisterEffect(e2) - if not c71612253.global_check then - c71612253.global_check=true - local ge1=Effect.CreateEffect(c) - ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - ge1:SetCode(EVENT_DAMAGE) - ge1:SetOperation(c71612253.checkop) - Duel.RegisterEffect(ge1,0) - end -end -function c71612253.ovfilter(c) - return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:IsSetCard(0x10af) and c:GetRank()==4 -end -function c71612253.checkop(e,tp,eg,ep,ev,re,r,rp) - if bit.band(r,REASON_EFFECT)~=0 then - Duel.RegisterFlagEffect(ep,71612253,RESET_PHASE+RESET_END,0,1) - end -end -function c71612253.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetFlagEffect(tp,71612253)~=0 and (Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()) -end -function c71612253.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c71612253.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,1000) -end -function c71612253.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsType(TYPE_MONSTER) and not tc:IsImmuneToEffect(e) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(-1000) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_UPDATE_DEFENCE) - tc:RegisterEffect(e2) - Duel.Damage(1-tp,1000,REASON_EFFECT) - end -end -function c71612253.tgcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) -end -function c71612253.tgfilter(c) - return (c:IsSetCard(0xaf) or c:IsSetCard(0xae)) and c:IsAbleToGrave() -end -function c71612253.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c71612253.tgfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) -end -function c71612253.tgop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c71612253.tgfilter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoGrave(g,REASON_EFFECT) - end -end diff --git a/script/c71616908.lua b/script/c71616908.lua deleted file mode 100644 index 995584d794..0000000000 --- a/script/c71616908.lua +++ /dev/null @@ -1,38 +0,0 @@ ---ジェムナイト・アメジス -function c71616908.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcFun2(c,aux.FilterBoolFunction(Card.IsSetCard,0x1047),aux.FilterBoolFunction(Card.IsRace,RACE_AQUA),true) - --spsummon condition - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e2:SetCode(EFFECT_SPSUMMON_CONDITION) - e2:SetValue(c71616908.splimit) - c:RegisterEffect(e2) - --to hand - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(71616908,0)) - e3:SetCategory(CATEGORY_TOHAND) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e3:SetCode(EVENT_TO_GRAVE) - e3:SetCondition(c71616908.thcon) - e3:SetTarget(c71616908.thtg) - e3:SetOperation(c71616908.thop) - c:RegisterEffect(e3) -end -function c71616908.splimit(e,se,sp,st) - return not e:GetHandler():IsLocation(LOCATION_EXTRA) or bit.band(st,SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION -end -function c71616908.thcon(e,tp,eg,ep,ev,re,r,rp) - return bit.band(e:GetHandler():GetPreviousLocation(),LOCATION_ONFIELD)~=0 -end -function c71616908.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chk==0 then return true end - local g=Duel.GetMatchingGroup(Card.IsFacedown,tp,LOCATION_SZONE,LOCATION_SZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0) -end -function c71616908.thop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsFacedown,tp,LOCATION_SZONE,LOCATION_SZONE,nil) - Duel.SendtoHand(g,nil,REASON_EFFECT) -end diff --git a/script/c71625222.lua b/script/c71625222.lua deleted file mode 100644 index 9d31724735..0000000000 --- a/script/c71625222.lua +++ /dev/null @@ -1,35 +0,0 @@ ---時の魔術師 -function c71625222.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(71625222,0)) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_COIN+CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetTarget(c71625222.destg) - e1:SetOperation(c71625222.desop) - c:RegisterEffect(e1) -end -function c71625222.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_COIN,nil,0,tp,1) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c71625222.desop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(71625222,1)) - local coin=Duel.SelectOption(tp,60,61) - local res=Duel.TossCoin(tp,1) - if coin~=res then - local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,0,LOCATION_MZONE,nil) - Duel.Destroy(g,REASON_EFFECT) - Duel.RaiseEvent(e:GetHandler(),71625222,e,0,0,tp,0) - else - local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,LOCATION_MZONE,0,nil) - Duel.Destroy(g,REASON_EFFECT) - local dg=Duel.GetOperatedGroup() - local sum=dg:GetSum(Card.GetAttack) - Duel.Damage(tp,sum/2,REASON_EFFECT) - end -end diff --git a/script/c71628381.lua b/script/c71628381.lua deleted file mode 100644 index d7da8db9a1..0000000000 --- a/script/c71628381.lua +++ /dev/null @@ -1,45 +0,0 @@ ---マルチ・ピース・ゴーレム -function c71628381.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcCode2(c,25247218,58843503,true,true) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(71628381,0)) - e1:SetCategory(CATEGORY_TODECK+CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_PHASE+PHASE_BATTLE) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c71628381.spcon) - e1:SetTarget(c71628381.sptg) - e1:SetOperation(c71628381.spop) - c:RegisterEffect(e1) -end -function c71628381.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetBattledGroupCount()>0 -end -function c71628381.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToDeck() end - Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0) -end -function c71628381.mgfilter(c,e,tp,fusc) - return not c:IsControler(tp) or not c:IsLocation(LOCATION_GRAVE) - or bit.band(c:GetReason(),0x40008)~=0x40008 or c:GetReasonCard()~=fusc - or not c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c71628381.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) then return end - local mg=c:GetMaterial() - local sumable=true - local sumtype=c:GetSummonType() - if Duel.SendtoDeck(c,nil,0,REASON_EFFECT)==0 or bit.band(sumtype,SUMMON_TYPE_FUSION)~=SUMMON_TYPE_FUSION or mg:GetCount()==0 - or mg:GetCount()>Duel.GetLocationCount(tp,LOCATION_MZONE) - or mg:IsExists(c71628381.mgfilter,1,nil,e,tp,c) then - sumable=false - end - if sumable and Duel.SelectYesNo(tp,aux.Stringid(71628381,1)) then - Duel.BreakEffect() - Duel.SpecialSummon(mg,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c71645242.lua b/script/c71645242.lua deleted file mode 100644 index 2e42dc7f86..0000000000 --- a/script/c71645242.lua +++ /dev/null @@ -1,127 +0,0 @@ ---ブラック・ガーデン -function c71645242.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --token - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(71645242,0)) - e4:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN) - e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e4:SetRange(LOCATION_FZONE) - e4:SetCode(71645242) - e4:SetTarget(c71645242.sptg) - e4:SetOperation(c71645242.spop) - c:RegisterEffect(e4) - --special summon - local e5=Effect.CreateEffect(c) - e5:SetDescription(aux.Stringid(71645242,1)) - e5:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON) - e5:SetProperty(EFFECT_FLAG_CARD_TARGET) - e5:SetType(EFFECT_TYPE_IGNITION) - e5:SetRange(LOCATION_FZONE) - e5:SetTarget(c71645242.sptg2) - e5:SetOperation(c71645242.spop2) - c:RegisterEffect(e5) - if not c71645242.global_check then - c71645242.global_check=true - local ge1=Effect.CreateEffect(c) - ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - ge1:SetCode(EVENT_SUMMON_SUCCESS) - ge1:SetCondition(c71645242.regcon) - ge1:SetOperation(c71645242.regop) - Duel.RegisterEffect(ge1,0) - local ge2=ge1:Clone() - ge2:SetCode(EVENT_SPSUMMON_SUCCESS) - Duel.RegisterEffect(ge2,0) - end -end -function c71645242.cfilter(c,tp) - return c:IsControler(tp) and c:GetSummonType()~=SUMMON_TYPE_SPECIAL+0x20 -end -function c71645242.regcon(e,tp,eg,ep,ev,re,r,rp) - local sf=0 - if eg:IsExists(c71645242.cfilter,1,nil,0) then - sf=sf+1 - end - if eg:IsExists(c71645242.cfilter,1,nil,1) then - sf=sf+2 - end - e:SetLabel(sf) - return sf~=0 -end -function c71645242.regop(e,tp,eg,ep,ev,re,r,rp) - Duel.RaiseEvent(eg,71645242,e,r,rp,ep,e:GetLabel()) -end -function c71645242.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsRelateToEffect(e) end - Duel.SetTargetCard(eg) - Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0) -end -function c71645242.spop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local g=eg:Filter(Card.IsRelateToEffect,nil,e) - local tc=g:GetFirst() - while tc do - if tc:IsFaceup() then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetValue(math.ceil(tc:GetAttack()/2)) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - end - tc=g:GetNext() - end - if bit.band(bit.rshift(ev,tp),1)~=0 and Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0 - and Duel.IsPlayerCanSpecialSummonMonster(tp,71645243,0,0x4011,800,800,2,RACE_PLANT,ATTRIBUTE_DARK,POS_FACEUP_ATTACK,1-tp) then - local token=Duel.CreateToken(tp,71645243) - Duel.SpecialSummonStep(token,0x20,tp,1-tp,false,false,POS_FACEUP_ATTACK) - end - if bit.band(bit.rshift(ev,1-tp),1)~=0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsPlayerCanSpecialSummonMonster(tp,71645243,0,0x4011,800,800,2,RACE_PLANT,ATTRIBUTE_DARK) then - local token=Duel.CreateToken(1-tp,71645243) - Duel.SpecialSummonStep(token,0x20,tp,tp,false,false,POS_FACEUP_ATTACK) - end - Duel.SpecialSummonComplete() -end -function c71645242.desfilter(c) - return c:IsFaceup() and c:IsRace(RACE_PLANT) and c:IsDestructable() -end -function c71645242.filter2(c,atk,e,tp) - return c:GetAttack()==atk and c:IsCanBeSpecialSummoned(e,0x20,tp,false,false) -end -function c71645242.sptg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c71645242.filter2(chkc,e:GetLabel(),e,tp) end - local g=Duel.GetMatchingGroup(c71645242.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - local atk=g:GetSum(Card.GetAttack) - local sc=g:FilterCount(Card.IsControler,nil,tp) - if chk==0 then return e:GetHandler():IsDestructable() and e:GetHandler():IsDestructable(e) and g:GetCount()>0 - and Duel.GetLocationCount(tp,LOCATION_MZONE)>-sc - and Duel.IsExistingTarget(c71645242.filter2,tp,LOCATION_GRAVE,0,1,nil,atk,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local tg=Duel.SelectTarget(tp,c71645242.filter2,tp,LOCATION_GRAVE,0,1,1,nil,atk,e,tp) - e:SetLabel(atk) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,tg,1,0,0) - g:AddCard(e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c71645242.spop2(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not (c:IsRelateToEffect(e) and c:IsDestructable() and c:IsDestructable(e)) then return end - local dg=Duel.GetMatchingGroup(c71645242.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - dg:AddCard(c) - Duel.Destroy(dg,REASON_EFFECT) - Duel.BreakEffect() - local og=Duel.GetOperatedGroup() - if not og:IsContains(c) then return end - og:RemoveCard(c) - local atk=og:GetSum(Card.GetPreviousAttackOnField) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:GetAttack()==atk then - Duel.SpecialSummon(tc,0x20,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c7165085.lua b/script/c7165085.lua deleted file mode 100644 index 6d0015710f..0000000000 --- a/script/c7165085.lua +++ /dev/null @@ -1,80 +0,0 @@ ---おとり人形 -function c7165085.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c7165085.target) - e1:SetOperation(c7165085.activate) - c:RegisterEffect(e1) -end -function c7165085.filter(c) - return c:IsFacedown() and c:GetSequence()~=5 -end -function c7165085.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_SZONE) and c7165085.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c7165085.filter,tp,LOCATION_SZONE,LOCATION_SZONE,1,e:GetHandler()) end - e:SetProperty(EFFECT_FLAG_CARD_TARGET) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEDOWN) - Duel.SelectTarget(tp,c7165085.filter,tp,LOCATION_SZONE,LOCATION_SZONE,1,1,e:GetHandler()) -end -function c7165085.activate(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if not tc:IsRelateToEffect(e) or tc:IsFaceup() then - if c:IsRelateToEffect(e) then - c:CancelToGrave() - Duel.SendtoDeck(c,nil,2,REASON_EFFECT) - end - return - end - Duel.ConfirmCards(tp,tc) - if tc:IsType(TYPE_TRAP) then - local te=tc:GetActivateEffect() - local tep=tc:GetControler() - if not te then - Duel.Destroy(tc,REASON_EFFECT) - else - local condition=te:GetCondition() - local cost=te:GetCost() - local target=te:GetTarget() - local operation=te:GetOperation() - if te:GetCode()==EVENT_FREE_CHAIN and te:IsActivatable(tep) - and (not condition or condition(te,tep,eg,ep,ev,re,r,rp)) - and (not cost or cost(te,tep,eg,ep,ev,re,r,rp,0)) - and (not target or target(te,tep,eg,ep,ev,re,r,rp,0)) then - Duel.ClearTargetCard() - e:SetProperty(te:GetProperty()) - Duel.Hint(HINT_CARD,0,tc:GetOriginalCode()) - Duel.ChangePosition(tc,POS_FACEUP) - if tc:GetType()==TYPE_TRAP then - tc:CancelToGrave(false) - end - tc:CreateEffectRelation(te) - if cost then cost(te,tep,eg,ep,ev,re,r,rp,1) end - if target then target(te,tep,eg,ep,ev,re,r,rp,1) end - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local tg=g:GetFirst() - while tg do - tg:CreateEffectRelation(te) - tg=g:GetNext() - end - tc:SetStatus(STATUS_ACTIVATED,true) - if operation then operation(te,tep,eg,ep,ev,re,r,rp) end - tc:ReleaseEffectRelation(te) - tg=g:GetFirst() - while tg do - tg:ReleaseEffectRelation(te) - tg=g:GetNext() - end - else - Duel.Destroy(tc,REASON_EFFECT) - end - end - end - if c:IsRelateToEffect(e) then - c:CancelToGrave() - Duel.SendtoDeck(c,nil,2,REASON_EFFECT) - end -end diff --git a/script/c71652522.lua b/script/c71652522.lua deleted file mode 100644 index 3bbbbb7a82..0000000000 --- a/script/c71652522.lua +++ /dev/null @@ -1,51 +0,0 @@ ---バトル・テレポーテーション -function c71652522.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c71652522.condition) - e1:SetTarget(c71652522.target) - e1:SetOperation(c71652522.activate) - c:RegisterEffect(e1) -end -function c71652522.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()<=PHASE_BATTLE -end -function c71652522.filter(c) - return c:IsFaceup() and c:IsRace(RACE_PSYCHO) -end -function c71652522.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - if chk==0 then return Duel.GetMatchingGroupCount(c71652522.filter,tp,LOCATION_MZONE,0,nil)==1 end - local tc=Duel.GetMatchingGroup(c71652522.filter,tp,LOCATION_MZONE,0,nil):GetFirst() - Duel.SetTargetCard(tc) -end -function c71652522.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DIRECT_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_PHASE+PHASE_BATTLE) - e2:SetCountLimit(1) - e2:SetReset(RESET_PHASE+PHASE_BATTLE) - e2:SetOperation(c71652522.ctop) - e2:SetLabelObject(tc) - Duel.RegisterEffect(e2,tp) - tc:RegisterFlagEffect(71652522,RESET_EVENT+0x1fc0000+RESET_PHASE+PHASE_BATTLE,0,1) - end -end -function c71652522.ctop(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetLabelObject() - if tc:GetFlagEffect(71652522)~=0 and not Duel.GetControl(tc,1-tp) then - if not tc:IsImmuneToEffect(e) and tc:IsAbleToChangeControler() then - Duel.Destroy(tc,REASON_EFFECT) - end - end -end diff --git a/script/c71692913.lua b/script/c71692913.lua deleted file mode 100644 index ba68aa8867..0000000000 --- a/script/c71692913.lua +++ /dev/null @@ -1,81 +0,0 @@ ---相克の魔術師 -function c71692913.initial_effect(c) - --pendulum summon - aux.AddPendulumProcedure(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --xyz level - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_PZONE) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCountLimit(1) - e2:SetTarget(c71692913.xyztg) - e2:SetOperation(c71692913.xyzop) - c:RegisterEffect(e2) - --disable - local e3=Effect.CreateEffect(c) - e3:SetCategory(CATEGORY_DISABLE) - e3:SetType(EFFECT_TYPE_QUICK_O) - e3:SetCode(EVENT_FREE_CHAIN) - e3:SetRange(LOCATION_MZONE) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetCountLimit(1) - e3:SetTarget(c71692913.distg) - e3:SetOperation(c71692913.disop) - c:RegisterEffect(e3) -end -function c71692913.xyzfilter(c) - return c:IsFaceup() and c:IsType(TYPE_XYZ) -end -function c71692913.xyztg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c71692913.xyzfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c71692913.xyzfilter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - Duel.SelectTarget(tp,c71692913.xyzfilter,tp,LOCATION_MZONE,0,1,1,nil) -end -function c71692913.xyzop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_XYZ_LEVEL) - e1:SetValue(c71692913.xyzlv) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - tc:RegisterEffect(e1) - end -end -function c71692913.xyzlv(e,c,rc) - return c:GetRank() -end -function c71692913.disfilter(c) - return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_LIGHT) and not c:IsDisabled() -end -function c71692913.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c71692913.disfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c71692913.disfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - local g=Duel.SelectTarget(tp,c71692913.disfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0) -end -function c71692913.disop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - Duel.NegateRelatedChain(tc,RESET_TURN_SET) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetValue(RESET_TURN_SET) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - tc:RegisterEffect(e2) - end -end diff --git a/script/c71705144.lua b/script/c71705144.lua deleted file mode 100644 index 8da50eacb6..0000000000 --- a/script/c71705144.lua +++ /dev/null @@ -1,34 +0,0 @@ ---EMキャスト・チェンジ -function c71705144.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,71705144+EFFECT_COUNT_CODE_OATH) - e1:SetTarget(c71705144.target) - e1:SetOperation(c71705144.activate) - c:RegisterEffect(e1) -end -function c71705144.filter(c) - return c:IsSetCard(0x9f) and c:IsType(TYPE_MONSTER) and c:IsAbleToDeck() and not c:IsPublic() -end -function c71705144.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp) - and Duel.IsExistingMatchingCard(c71705144.filter,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.SetTargetPlayer(tp) - Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_HAND) -end -function c71705144.activate(e,tp,eg,ep,ev,re,r,rp) - local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) - Duel.Hint(HINT_SELECTMSG,p,HINTMSG_TODECK) - local g=Duel.SelectMatchingCard(p,c71705144.filter,p,LOCATION_HAND,0,1,63,nil) - if g:GetCount()>0 then - Duel.ConfirmCards(1-p,g) - local ct=Duel.SendtoDeck(g,nil,2,REASON_EFFECT) - Duel.ShuffleDeck(p) - Duel.BreakEffect() - Duel.Draw(p,ct+1,REASON_EFFECT) - end -end diff --git a/script/c7171149.lua b/script/c7171149.lua deleted file mode 100644 index 4f92cfcc2c..0000000000 --- a/script/c7171149.lua +++ /dev/null @@ -1,63 +0,0 @@ ---トゥーン・アンティーク・ギアゴーレム -function c7171149.initial_effect(c) - --cannot attack - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetOperation(c7171149.atklimit) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - c:RegisterEffect(e2) - local e3=e1:Clone() - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e3) - --direct attack - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetCode(EFFECT_DIRECT_ATTACK) - e4:SetCondition(c7171149.dircon) - c:RegisterEffect(e4) - --actlimit - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e5:SetCode(EVENT_ATTACK_ANNOUNCE) - e5:SetOperation(c7171149.atkop) - c:RegisterEffect(e5) - --pierce - local e6=Effect.CreateEffect(c) - e6:SetType(EFFECT_TYPE_SINGLE) - e6:SetCode(EFFECT_PIERCE) - c:RegisterEffect(e6) -end -function c7171149.atklimit(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e:GetHandler():RegisterEffect(e1) -end -function c7171149.cfilter1(c) - return c:IsFaceup() and c:IsCode(15259703) -end -function c7171149.cfilter2(c) - return c:IsFaceup() and c:IsType(TYPE_TOON) -end -function c7171149.dircon(e) - local tp=e:GetHandlerPlayer() - return Duel.IsExistingMatchingCard(c7171149.cfilter1,tp,LOCATION_ONFIELD,0,1,nil) - and not Duel.IsExistingMatchingCard(c7171149.cfilter2,tp,0,LOCATION_MZONE,1,nil) -end -function c7171149.atkop(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EFFECT_CANNOT_ACTIVATE) - e1:SetTargetRange(0,1) - e1:SetValue(c7171149.aclimit) - e1:SetReset(RESET_PHASE+PHASE_DAMAGE) - Duel.RegisterEffect(e1,tp) -end -function c7171149.aclimit(e,re,tp) - return re:IsHasType(EFFECT_TYPE_ACTIVATE) -end diff --git a/script/c71717923.lua b/script/c71717923.lua deleted file mode 100644 index 151fcb46bf..0000000000 --- a/script/c71717923.lua +++ /dev/null @@ -1,35 +0,0 @@ ---モーム -function c71717923.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(71717923,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c71717923.descost) - e1:SetTarget(c71717923.destg) - e1:SetOperation(c71717923.desop) - c:RegisterEffect(e1) -end -function c71717923.costfilter(c) - return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_EARTH) - and Duel.IsExistingMatchingCard(c71717923.filter,0,LOCATION_MZONE,LOCATION_MZONE,1,c,c:GetAttack()) -end -function c71717923.filter(c,atk) - return c:IsFaceup() and c:IsDestructable() and c:GetDefence()<=atk -end -function c71717923.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,c71717923.costfilter,1,nil) end - local g=Duel.SelectReleaseGroup(tp,c71717923.costfilter,1,1,nil) - e:SetLabel(g:GetFirst():GetAttack()) - Duel.Release(g,REASON_COST) -end -function c71717923.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local g=Duel.GetMatchingGroup(c71717923.filter,0,LOCATION_MZONE,LOCATION_MZONE,nil,e:GetLabel()) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c71717923.desop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c71717923.filter,0,LOCATION_MZONE,LOCATION_MZONE,nil,e:GetLabel()) - Duel.Destroy(g,REASON_EFFECT) -end diff --git a/script/c71759912.lua b/script/c71759912.lua deleted file mode 100644 index f8e92a0a77..0000000000 --- a/script/c71759912.lua +++ /dev/null @@ -1,39 +0,0 @@ ---ラッコアラ -function c71759912.initial_effect(c) - --atk up - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(71759912,0)) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCondition(c71759912.condition) - e1:SetTarget(c71759912.target) - e1:SetOperation(c71759912.operation) - c:RegisterEffect(e1) -end -function c71759912.cfilter(c) - return c:IsFaceup() and c:IsRace(RACE_BEAST) -end -function c71759912.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c71759912.cfilter,tp,LOCATION_MZONE,0,1,e:GetHandler()) -end -function c71759912.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsFaceup() and chkc:IsControler(tp) and chkc:GetLocation()==LOCATION_MZONE end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,nil) -end -function c71759912.operation(e,tp,eg,ep,ev,re,r,rp) - if not Duel.IsExistingMatchingCard(c71759912.cfilter,tp,LOCATION_MZONE,0,1,e:GetHandler()) then return end - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(1000) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - end -end diff --git a/script/c71782404.lua b/script/c71782404.lua deleted file mode 100644 index 95ab1a611a..0000000000 --- a/script/c71782404.lua +++ /dev/null @@ -1,33 +0,0 @@ ---レッドアイズ・バーン -function c71782404.initial_effect(c) - Duel.EnableGlobalFlag(GLOBALFLAG_DELAYED_QUICKEFFECT) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_DESTROYED) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e1:SetCountLimit(1,71782404+EFFECT_COUNT_CODE_OATH) - e1:SetTarget(c71782404.target) - e1:SetOperation(c71782404.activate) - c:RegisterEffect(e1) -end -function c71782404.cfilter(c,e,tp) - return c:IsPreviousPosition(POS_FACEUP) and c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_MZONE) and c:IsReason(REASON_EFFECT+REASON_BATTLE) - and c:IsSetCard(0x3b) and c:GetBaseAttack()>0 and c:IsCanBeEffectTarget(e) and c:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) -end -function c71782404.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return eg:IsContains(chkc) and c71782404.cfilter(chkc,e,tp) end - if chk==0 then return eg:IsExists(c71782404.cfilter,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - local g=eg:FilterSelect(tp,c71782404.cfilter,1,1,nil,e,tp) - Duel.SetTargetCard(g) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,0,nil,PLAYER_ALL,0) -end -function c71782404.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Damage(1-tp,tc:GetBaseAttack(),REASON_EFFECT) - Duel.Damage(tp,tc:GetBaseAttack(),REASON_EFFECT) - end -end diff --git a/script/c71786742.lua b/script/c71786742.lua deleted file mode 100644 index 64559cf9fe..0000000000 --- a/script/c71786742.lua +++ /dev/null @@ -1,46 +0,0 @@ ---ギアギアーノ -function c71786742.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c71786742.cost) - e1:SetTarget(c71786742.target) - e1:SetOperation(c71786742.activate) - c:RegisterEffect(e1) -end -function c71786742.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end -function c71786742.filter(c,e,tp) - return c:GetLevel()==4 and c:IsRace(RACE_MACHINE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c71786742.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c71786742.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsExistingTarget(c71786742.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c71786742.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c71786742.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1,true) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e2,true) - Duel.SpecialSummonComplete() - end -end diff --git a/script/c71799173.lua b/script/c71799173.lua deleted file mode 100644 index 68e1bb04c8..0000000000 --- a/script/c71799173.lua +++ /dev/null @@ -1,20 +0,0 @@ ---ガーディアン・オブ・オーダー -function c71799173.initial_effect(c) - c:SetUniqueOnField(1,0,71799173) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c71799173.spcon) - c:RegisterEffect(e1) -end -function c71799173.spfilter(c) - return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_LIGHT) -end -function c71799173.spcon(e,c) - if c==nil then return true end - return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c71799173.spfilter,c:GetControler(),LOCATION_MZONE,0,2,nil) -end diff --git a/script/c7180418.lua b/script/c7180418.lua deleted file mode 100644 index 91cd76abc9..0000000000 --- a/script/c7180418.lua +++ /dev/null @@ -1,38 +0,0 @@ ---魔導アーマー エグゼ -function c7180418.initial_effect(c) - --cannot attack - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetOperation(c7180418.atklimit) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e2) - local e3=e1:Clone() - e3:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - c:RegisterEffect(e3) - --cost - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e4:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE) - e4:SetCode(EVENT_PHASE+PHASE_STANDBY) - e4:SetCountLimit(1) - e4:SetRange(LOCATION_MZONE) - e4:SetOperation(c7180418.ccost) - c:RegisterEffect(e4) -end -function c7180418.atklimit(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e:GetHandler():RegisterEffect(e1) -end -function c7180418.ccost(e,tp,eg,ep,ev,re,r,rp) - if Duel.IsCanRemoveCounter(tp,1,0,0x3001,1,REASON_COST) and Duel.SelectYesNo(tp,aux.Stringid(7180418,0)) then - Duel.RemoveCounter(tp,1,0,0x3001,1,REASON_COST) - else - Duel.Destroy(e:GetHandler(),REASON_RULE) - end -end diff --git a/script/c71829750.lua b/script/c71829750.lua deleted file mode 100644 index 6aa7346eca..0000000000 --- a/script/c71829750.lua +++ /dev/null @@ -1,32 +0,0 @@ ---ナーガ -function c71829750.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(71829750,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetProperty(EFFECT_FLAG_NAGA) - e1:SetCode(EVENT_TO_DECK) - e1:SetCondition(c71829750.spcon) - e1:SetTarget(c71829750.sptg) - e1:SetOperation(c71829750.spop) - c:RegisterEffect(e1) -end -function c71829750.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousPosition(POS_FACEUP) - and e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) -end -function c71829750.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c71829750.spfilter(c,e,tp) - return c:IsLevelBelow(3) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c71829750.spop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c71829750.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c7183277.lua b/script/c7183277.lua deleted file mode 100644 index 88c3942971..0000000000 --- a/script/c7183277.lua +++ /dev/null @@ -1,37 +0,0 @@ ---ライトロード・ドルイド オルクス -function c7183277.initial_effect(c) - --cannot be target - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) - e1:SetProperty(EFFECT_FLAG_IGNORE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetTarget(c7183277.etarget) - e1:SetValue(aux.tgval) - c:RegisterEffect(e1) - --discard deck - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetDescription(aux.Stringid(7183277,0)) - e2:SetCategory(CATEGORY_DECKDES) - e2:SetCode(EVENT_PHASE+PHASE_END) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCondition(c7183277.discon) - e2:SetTarget(c7183277.distg) - e2:SetOperation(c7183277.disop) - c:RegisterEffect(e2) -end -function c7183277.etarget(e,c) - return c:IsSetCard(0x38) and c:IsType(TYPE_MONSTER) -end -function c7183277.discon(e,tp,eg,ep,ev,re,r,rp) - return tp==Duel.GetTurnPlayer() -end -function c7183277.distg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,2) -end -function c7183277.disop(e,tp,eg,ep,ev,re,r,rp) - Duel.DiscardDeck(tp,2,REASON_EFFECT) -end diff --git a/script/c71870152.lua b/script/c71870152.lua deleted file mode 100644 index b50cdcea71..0000000000 --- a/script/c71870152.lua +++ /dev/null @@ -1,74 +0,0 @@ ---フォーチュンレディ・ファイリー -function c71870152.initial_effect(c) - --atk,def - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_SET_ATTACK) - e1:SetValue(c71870152.value) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_SET_DEFENCE) - c:RegisterEffect(e2) - --level up - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(71870152,0)) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1) - e3:SetCode(EVENT_PHASE+PHASE_STANDBY) - e3:SetCondition(c71870152.lvcon) - e3:SetOperation(c71870152.lvop) - c:RegisterEffect(e3) - --destroy - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(71870152,1)) - e4:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e4:SetProperty(EFFECT_FLAG_CARD_TARGET) - e4:SetCode(EVENT_SPSUMMON_SUCCESS) - e4:SetCondition(c71870152.descon) - e4:SetTarget(c71870152.destg) - e4:SetOperation(c71870152.desop) - c:RegisterEffect(e4) -end -function c71870152.value(e,c) - return c:GetLevel()*200 -end -function c71870152.lvcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp and e:GetHandler():IsLevelAbove(1) and e:GetHandler():IsLevelBelow(11) -end -function c71870152.lvop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFacedown() or not c:IsRelateToEffect(e) or c:IsLevelAbove(12) then return end - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_LEVEL) - e1:SetValue(1) - e1:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e1) -end -function c71870152.descon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsFaceup() and c:IsAttackPos() and c:GetSummonType()==SUMMON_TYPE_SPECIAL+0x8 -end -function c71870152.filter(c) - return c:IsFaceup() and c:IsDestructable() -end -function c71870152.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c71870152.filter(chkc) end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c71870152.filter,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,0) -end -function c71870152.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if not tc then return end - local atk=tc:GetAttack() - if tc:IsFaceup() and tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)~=0 then - Duel.Damage(1-tp,atk,REASON_EFFECT) - end -end diff --git a/script/c71880877.lua b/script/c71880877.lua deleted file mode 100644 index 3c78e370d3..0000000000 --- a/script/c71880877.lua +++ /dev/null @@ -1,67 +0,0 @@ ---SDロボ・モンキ -function c71880877.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(71880877,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c71880877.sumtg) - e1:SetOperation(c71880877.sumop) - c:RegisterEffect(e1) - --salvage - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(71880877,1)) - e2:SetCategory(CATEGORY_TOHAND) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCost(c71880877.thcost) - e2:SetTarget(c71880877.thtg) - e2:SetOperation(c71880877.thop) - c:RegisterEffect(e2) -end -function c71880877.filter(c,e,tp) - return (c:IsSetCard(0x85) or c:IsCode(71071546)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c71880877.sumtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c71880877.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c71880877.sumop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c71880877.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end -function c71880877.rmfilter(c,tp) - return c:IsRace(RACE_MACHINE) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost() - and Duel.IsExistingTarget(c71880877.thfilter,tp,LOCATION_GRAVE,0,1,c) -end -function c71880877.thfilter(c) - return (c:IsSetCard(0x85) or c:IsCode(71071546)) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() -end -function c71880877.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c71880877.rmfilter,tp,LOCATION_GRAVE,0,1,nil,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c71880877.rmfilter,tp,LOCATION_GRAVE,0,1,1,nil,tp) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c71880877.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c71880877.thfilter(chkc) end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c71880877.thfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c71880877.thop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end diff --git a/script/c71921856.lua b/script/c71921856.lua deleted file mode 100644 index b186cd333a..0000000000 --- a/script/c71921856.lua +++ /dev/null @@ -1,81 +0,0 @@ ---No.79 BK 新星のカイザー -function c71921856.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,4,2) - c:EnableReviveLimit() - --material - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(71921856,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetTarget(c71921856.target) - e1:SetOperation(c71921856.operation) - c:RegisterEffect(e1) - --atk - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(c71921856.atkval) - c:RegisterEffect(e2) - --spsummon - local e3=Effect.CreateEffect(c) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_TO_GRAVE) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e3:SetCondition(c71921856.spcon) - e3:SetTarget(c71921856.sptg) - e3:SetOperation(c71921856.spop) - c:RegisterEffect(e3) -end -c71921856.xyz_number=79 -function c71921856.filter(c) - return c:IsSetCard(0x84) and c:IsType(TYPE_MONSTER) -end -function c71921856.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c71921856.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil) end -end -function c71921856.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL) - local g=Duel.SelectMatchingCard(tp,c71921856.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil) - if g:GetCount()>0 and not g:GetFirst():IsHasEffect(EFFECT_NECRO_VALLEY) then - Duel.Overlay(c,g) - end -end -function c71921856.atkval(e,c) - return c:GetOverlayCount()*100 -end -function c71921856.spcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local ct=c:GetOverlayCount() - e:SetLabel(ct) - return c:IsReason(REASON_DESTROY) and c:GetReasonPlayer()~=tp - and c:IsPreviousLocation(LOCATION_MZONE) and c:GetPreviousControler()==tp and ct>0 -end -function c71921856.spfilter(c,e,tp) - return c:IsLevelBelow(4) and c:IsSetCard(0x84) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c71921856.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c71921856.spfilter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c71921856.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - local ct=e:GetLabel() - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ct>ft then ct=ft end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c71921856.spfilter,tp,LOCATION_GRAVE,0,1,ct,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,g:GetCount(),0,0) -end -function c71921856.spop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ft0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c71923655.lua b/script/c71923655.lua deleted file mode 100644 index 15a7628553..0000000000 --- a/script/c71923655.lua +++ /dev/null @@ -1,21 +0,0 @@ ---シャークラーケン -function c71923655.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c71923655.spcon) - e1:SetOperation(c71923655.spop) - c:RegisterEffect(e1) -end -function c71923655.spcon(e,c) - if c==nil then return true end - return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-1 - and Duel.CheckReleaseGroup(c:GetControler(),Card.IsAttribute,1,nil,ATTRIBUTE_WATER) -end -function c71923655.spop(e,tp,eg,ep,ev,re,r,rp,c) - local g=Duel.SelectReleaseGroup(c:GetControler(),Card.IsAttribute,1,1,nil,ATTRIBUTE_WATER) - Duel.Release(g,REASON_COST) -end diff --git a/script/c71930383.lua b/script/c71930383.lua deleted file mode 100644 index 2e602c0c3d..0000000000 --- a/script/c71930383.lua +++ /dev/null @@ -1,25 +0,0 @@ ---パトロイド -function c71930383.initial_effect(c) - --confirm - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(71930383,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetTarget(c71930383.target) - e1:SetOperation(c71930383.operation) - c:RegisterEffect(e1) -end -function c71930383.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() and chkc:IsFacedown() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFacedown,tp,0,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEDOWN) - Duel.SelectTarget(tp,Card.IsFacedown,tp,0,LOCATION_ONFIELD,1,1,nil) -end -function c71930383.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) and tc:IsFacedown() then - Duel.ConfirmCards(tp,tc) - end -end diff --git a/script/c71934924.lua b/script/c71934924.lua deleted file mode 100644 index 00bb46d3c5..0000000000 --- a/script/c71934924.lua +++ /dev/null @@ -1,50 +0,0 @@ ---疾風!凶殺陣 -function c71934924.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --damage cal - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetRange(LOCATION_SZONE) - e2:SetCode(EVENT_BATTLED) - e2:SetOperation(c71934924.atop) - c:RegisterEffect(e2) - --atkup - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e3:SetRange(LOCATION_SZONE) - e3:SetCode(EVENT_DAMAGE_STEP_END) - e3:SetOperation(c71934924.upop) - c:RegisterEffect(e3) -end -function c71934924.check(c,tp) - return c and c:IsSetCard(0x3d) and c:IsControler(tp) -end -function c71934924.atop(e,tp,eg,ep,ev,re,r,rp) - if c71934924.check(Duel.GetAttacker(),tp) or c71934924.check(Duel.GetAttackTarget(),tp) then - e:GetHandler():RegisterFlagEffect(71934924,RESET_PHASE+PHASE_DAMAGE,0,1) - end -end -function c71934924.filter(c) - return c:IsFaceup() and c:IsSetCard(0x3d) and c:GetFlagEffect(71934924)==0 -end -function c71934924.upop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:GetFlagEffect(71934924)==0 then return end - local g=Duel.GetMatchingGroup(c71934924.filter,tp,LOCATION_MZONE,0,nil) - local tc=g:GetFirst() - while tc do - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(300) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - tc:RegisterFlagEffect(71934924,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) - tc=g:GetNext() - end -end diff --git a/script/c7194917.lua b/script/c7194917.lua deleted file mode 100644 index a6d17e2d41..0000000000 --- a/script/c7194917.lua +++ /dev/null @@ -1,71 +0,0 @@ ---No.52 ダイヤモンド・クラブ・キング -function c7194917.initial_effect(c) - c:SetUniqueOnField(1,0,7194917) - --xyz summon - aux.AddXyzProcedure(c,nil,4,2) - c:EnableReviveLimit() - --atk/def - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(7194917,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCost(c7194917.adcost) - e1:SetOperation(c7194917.adop) - c:RegisterEffect(e1) - --pos - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_PHASE+PHASE_BATTLE) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCondition(c7194917.poscon1) - e2:SetOperation(c7194917.posop1) - c:RegisterEffect(e2) - --pos - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e3:SetCode(EVENT_DAMAGE_STEP_END) - e3:SetCondition(c7194917.poscon2) - e3:SetOperation(c7194917.posop2) - c:RegisterEffect(e3) -end -c7194917.xyz_number=52 -function c7194917.adcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c7194917.adop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetValue(3000) - e1:SetReset(RESET_EVENT+0x1ff0000+RESET_PHASE+RESET_END) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_SET_DEFENCE_FINAL) - e2:SetValue(0) - e2:SetReset(RESET_EVENT+0x1ff0000+RESET_PHASE+RESET_END) - c:RegisterEffect(e2) - end -end -function c7194917.poscon1(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetAttackedCount()>0 -end -function c7194917.posop1(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsAttackPos() then - Duel.ChangePosition(e:GetHandler(),POS_FACEUP_DEFENCE) - end -end -function c7194917.poscon2(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler()==Duel.GetAttackTarget() and e:GetHandler():GetOverlayCount()==0 -end -function c7194917.posop2(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToBattle() and c:IsDefencePos() then - Duel.ChangePosition(c,POS_FACEUP_ATTACK) - end -end diff --git a/script/c71971554.lua b/script/c71971554.lua deleted file mode 100644 index c8d79bf1a9..0000000000 --- a/script/c71971554.lua +++ /dev/null @@ -1,38 +0,0 @@ ---ロード・シンクロン -function c71971554.initial_effect(c) - --summon success - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(71971554,0)) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EVENT_DAMAGE_STEP_END) - e1:SetCondition(c71971554.lvcon) - e1:SetOperation(c71971554.lvop) - c:RegisterEffect(e1) - --lv up - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_SYNCHRO_LEVEL) - e2:SetValue(c71971554.lvval) - c:RegisterEffect(e2) -end -function c71971554.lvcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetAttacker()==e:GetHandler() -end -function c71971554.lvop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_LEVEL) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e1:SetValue(1) - c:RegisterEffect(e1) -end -function c71971554.lvval(e,c) - local lv=e:GetHandler():GetLevel() - if c:IsCode(2322421) then return lv - else - if lv<=2 then return 16 end - return lv-2 - end -end diff --git a/script/c71983925.lua b/script/c71983925.lua deleted file mode 100644 index f4fb0cbb65..0000000000 --- a/script/c71983925.lua +++ /dev/null @@ -1,59 +0,0 @@ ---魔法封印の呪符 -function c71983925.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c71983925.actcon) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_SZONE) - e2:SetCode(EFFECT_SELF_DESTROY) - e2:SetCondition(c71983925.descon) - c:RegisterEffect(e2) - --cannot trigger - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetCode(EFFECT_CANNOT_TRIGGER) - e3:SetProperty(EFFECT_FLAG_SET_AVAILABLE) - e3:SetRange(LOCATION_SZONE) - e3:SetTargetRange(0xa,0xa) - e3:SetTarget(c71983925.distg) - c:RegisterEffect(e3) - --disable - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_FIELD) - e4:SetCode(EFFECT_DISABLE) - e4:SetRange(LOCATION_SZONE) - e4:SetTargetRange(LOCATION_SZONE,LOCATION_SZONE) - e4:SetTarget(c71983925.distg) - c:RegisterEffect(e4) - --disable effect - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e5:SetCode(EVENT_CHAIN_SOLVING) - e5:SetRange(LOCATION_SZONE) - e5:SetOperation(c71983925.disop) - c:RegisterEffect(e5) -end -function c71983925.filter(c) - return c:IsFaceup() and c:IsCode(2468169) -end -function c71983925.actcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c71983925.filter,tp,LOCATION_MZONE,0,1,nil) -end -function c71983925.descon(e) - return not Duel.IsExistingMatchingCard(c71983925.filter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) -end -function c71983925.distg(e,c) - return c:IsType(TYPE_SPELL) -end -function c71983925.disop(e,tp,eg,ep,ev,re,r,rp) - local tl=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION) - if tl==LOCATION_SZONE and re:IsActiveType(TYPE_SPELL) then - Duel.NegateEffect(ev) - end -end diff --git a/script/c7200041.lua b/script/c7200041.lua deleted file mode 100644 index c3711f7387..0000000000 --- a/script/c7200041.lua +++ /dev/null @@ -1,46 +0,0 @@ ---メタル・シューター -function c7200041.initial_effect(c) - --summon success - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(7200041,0)) - e1:SetCategory(CATEGORY_COUNTER) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c7200041.addct) - e1:SetOperation(c7200041.addc) - c:RegisterEffect(e1) - --attackup - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(c7200041.attackup) - c:RegisterEffect(e2) - --destroy replace - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE) - e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e3:SetCode(EFFECT_DESTROY_REPLACE) - e3:SetRange(LOCATION_MZONE) - e3:SetTarget(c7200041.reptg) - c:RegisterEffect(e3) -end -function c7200041.addct(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,1,0,0x26) -end -function c7200041.addc(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - e:GetHandler():AddCounter(0x26,2) - end -end -function c7200041.attackup(e,c) - return c:GetCounter(0x26)*800 -end -function c7200041.reptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReason(REASON_EFFECT) - and e:GetHandler():IsCanRemoveCounter(tp,0x26,1,REASON_COST) end - e:GetHandler():RemoveCounter(tp,0x26,1,REASON_EFFECT) - return true -end diff --git a/script/c72022087.lua b/script/c72022087.lua deleted file mode 100644 index 5bf6c3ae75..0000000000 --- a/script/c72022087.lua +++ /dev/null @@ -1,36 +0,0 @@ ---自由解放 -function c72022087.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TODECK) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetCondition(c72022087.condition) - e1:SetTarget(c72022087.target) - e1:SetOperation(c72022087.activate) - c:RegisterEffect(e1) -end -function c72022087.cfilter(c,tp) - return c:IsReason(REASON_BATTLE) and c:IsLocation(LOCATION_GRAVE) and c:GetPreviousControler()==tp -end -function c72022087.condition(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c72022087.cfilter,1,nil,tp) -end -function c72022087.filter(c) - return c:IsFaceup() and c:IsAbleToDeck() -end -function c72022087.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c72022087.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c72022087.filter,tp,LOCATION_MZONE,LOCATION_MZONE,2,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectTarget(tp, c72022087.filter,tp,LOCATION_MZONE,LOCATION_MZONE,2,2,nil) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,2,0,0) -end -function c72022087.acfilter(c,e) - return c:IsFaceup() and c:IsRelateToEffect(e) -end -function c72022087.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(c72022087.acfilter,nil,e) - Duel.SendtoDeck(g,nil,2,REASON_EFFECT) -end diff --git a/script/c72029628.lua b/script/c72029628.lua deleted file mode 100644 index 557077019e..0000000000 --- a/script/c72029628.lua +++ /dev/null @@ -1,84 +0,0 @@ ---廃石融合 -function c72029628.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c72029628.target) - e1:SetOperation(c72029628.activate) - c:RegisterEffect(e1) -end -function c72029628.filter0(c) - return c:IsCanBeFusionMaterial() and c:IsAbleToRemove() -end -function c72029628.filter1(c,e) - return c:IsCanBeFusionMaterial() and c:IsAbleToRemove() and not c:IsImmuneToEffect(e) -end -function c72029628.filter2(c,e,tp,m,f,chkf) - return c:IsType(TYPE_FUSION) and c:IsSetCard(0x1047) and (not f or f(c)) - and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf) -end -function c72029628.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp - local mg1=Duel.GetMatchingGroup(c72029628.filter0,tp,LOCATION_GRAVE,0,nil) - local res=Duel.IsExistingMatchingCard(c72029628.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf) - if not res then - local ce=Duel.GetChainMaterial(tp) - if ce~=nil then - local fgroup=ce:GetTarget() - local mg2=fgroup(ce,e,tp) - local mf=ce:GetValue() - res=Duel.IsExistingMatchingCard(c72029628.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,chkf) - end - end - return res - end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function c72029628.activate(e,tp,eg,ep,ev,re,r,rp) - local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp - local mg1=Duel.GetMatchingGroup(c72029628.filter1,tp,LOCATION_GRAVE,0,nil,e) - local sg1=Duel.GetMatchingGroup(c72029628.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf) - local mg2=nil - local sg2=nil - local ce=Duel.GetChainMaterial(tp) - if ce~=nil then - local fgroup=ce:GetTarget() - mg2=fgroup(ce,e,tp) - local mf=ce:GetValue() - sg2=Duel.GetMatchingGroup(c72029628.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,mf,chkf) - end - if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then - local sg=sg1:Clone() - if sg2 then sg:Merge(sg2) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local tg=sg:Select(tp,1,1,nil) - local tc=tg:GetFirst() - if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then - local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf) - tc:SetMaterial(mat1) - Duel.Remove(mat1,POS_FACEUP,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION) - Duel.BreakEffect() - Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP) - else - local mat2=Duel.SelectFusionMaterial(tp,tc,mg2,nil,chkf) - local fop=ce:GetOperation() - fop(ce,e,tp,tc,mat2) - end - tc:CompleteProcedure() - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e1:SetOperation(c72029628.desop) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetCountLimit(1) - tc:RegisterEffect(e1,true) - end -end -function c72029628.desop(e,tp,eg,ep,ev,re,r,rp) - Duel.Destroy(e:GetHandler(),REASON_EFFECT) -end diff --git a/script/c72044448.lua b/script/c72044448.lua deleted file mode 100644 index b03f6ebde6..0000000000 --- a/script/c72044448.lua +++ /dev/null @@ -1,37 +0,0 @@ ---破滅のフォトン・ストリーム -function c72044448.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_REMOVE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,0x1e0) - e1:SetCondition(c72044448.condition) - e1:SetTarget(c72044448.target) - e1:SetOperation(c72044448.activate) - c:RegisterEffect(e1) -end -function c72044448.cfilter1(c) - return c:IsFaceup() and c:IsSetCard(0x107b) -end -function c72044448.cfilter2(c) - return c:IsFaceup() and c:IsCode(93717133) -end -function c72044448.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c72044448.cfilter1,tp,LOCATION_MZONE,0,1,nil) - and (Duel.GetTurnPlayer()==tp or Duel.IsExistingMatchingCard(c72044448.cfilter2,tp,LOCATION_ONFIELD,0,1,nil)) -end -function c72044448.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsAbleToRemove() end - if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) -end -function c72044448.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) - end -end diff --git a/script/c72053645.lua b/script/c72053645.lua deleted file mode 100644 index c3d7d9ee85..0000000000 --- a/script/c72053645.lua +++ /dev/null @@ -1,40 +0,0 @@ ---ウェザー・レポート -function c72053645.initial_effect(c) - --flip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(72053645,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP) - e1:SetTarget(c72053645.target) - e1:SetOperation(c72053645.operation) - c:RegisterEffect(e1) -end -function c72053645.filter(c) - return c:IsFaceup() and c:IsCode(72302403) and c:IsDestructable() -end -function c72053645.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local g=Duel.GetMatchingGroup(c72053645.filter,tp,0,LOCATION_ONFIELD,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c72053645.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c72053645.filter,tp,0,LOCATION_ONFIELD,nil) - if Duel.Destroy(g,REASON_EFFECT)>0 then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_BP_TWICE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetTargetRange(1,0) - if Duel.GetTurnPlayer()==tp and Duel.GetCurrentPhase()==PHASE_BATTLE then - e1:SetLabel(Duel.GetTurnCount()) - e1:SetCondition(c72053645.bpcon) - e1:SetReset(RESET_PHASE+PHASE_BATTLE+RESET_SELF_TURN,2) - else - e1:SetReset(RESET_PHASE+PHASE_BATTLE+RESET_SELF_TURN,1) - end - Duel.RegisterEffect(e1,tp) - end -end -function c72053645.bpcon(e) - return Duel.GetTurnCount()~=e:GetLabel() -end diff --git a/script/c72056560.lua b/script/c72056560.lua deleted file mode 100644 index c7c55e0fa6..0000000000 --- a/script/c72056560.lua +++ /dev/null @@ -1,43 +0,0 @@ ---ジェムナイト・アンバー -function c72056560.initial_effect(c) - aux.EnableDualAttribute(c) - --salvage - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetDescription(aux.Stringid(72056560,0)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCondition(aux.IsDualState) - e1:SetCost(c72056560.cost) - e1:SetTarget(c72056560.target) - e1:SetOperation(c72056560.operation) - c:RegisterEffect(e1) -end -function c72056560.costfilter(c) - return c:IsSetCard(0x1047) and c:IsAbleToGraveAsCost() -end -function c72056560.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c72056560.costfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c72056560.costfilter,tp,LOCATION_HAND,0,1,1,nil) - Duel.SendtoGrave(g,REASON_COST) -end -function c72056560.tgfilter(c) - return c:IsFaceup() and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() -end -function c72056560.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and c72056560.tgfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c72056560.tgfilter,tp,LOCATION_REMOVED,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c72056560.tgfilter,tp,LOCATION_REMOVED,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c72056560.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end diff --git a/script/c72142276.lua b/script/c72142276.lua deleted file mode 100644 index ad7d74b57d..0000000000 --- a/script/c72142276.lua +++ /dev/null @@ -1,26 +0,0 @@ ---炎熱伝導場 -function c72142276.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOGRAVE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c72142276.target) - e1:SetOperation(c72142276.activate) - c:RegisterEffect(e1) -end -function c72142276.tgfilter(c) - return c:IsSetCard(0x39) and c:IsType(TYPE_MONSTER) and c:IsAbleToGrave() -end -function c72142276.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c72142276.tgfilter,tp,LOCATION_DECK,0,2,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,2,tp,LOCATION_DECK) -end -function c72142276.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c72142276.tgfilter,tp,LOCATION_DECK,0,nil) - if g:GetCount()>=2 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local sg=g:Select(tp,2,2,nil) - Duel.SendtoGrave(sg,REASON_EFFECT) - end -end diff --git a/script/c72144675.lua b/script/c72144675.lua deleted file mode 100644 index c9c2f2dcbe..0000000000 --- a/script/c72144675.lua +++ /dev/null @@ -1,23 +0,0 @@ ---トラファスフィア -function c72144675.initial_effect(c) - --tribute limit - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_TRIBUTE_LIMIT) - e1:SetValue(c72144675.tlimit) - c:RegisterEffect(e1) - --immune - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EFFECT_IMMUNE_EFFECT) - e2:SetValue(c72144675.efilter) - c:RegisterEffect(e2) -end -function c72144675.tlimit(e,c) - return not c:IsRace(RACE_WINDBEAST) -end -function c72144675.efilter(e,te) - return te:IsActiveType(TYPE_TRAP) -end diff --git a/script/c72150572.lua b/script/c72150572.lua deleted file mode 100644 index d39eb0bfac..0000000000 --- a/script/c72150572.lua +++ /dev/null @@ -1,29 +0,0 @@ ---融合体駆除装置 -function c72150572.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,0x1e0) - e1:SetTarget(c72150572.target) - e1:SetOperation(c72150572.activate) - c:RegisterEffect(e1) -end -function c72150572.filter(c) - return c:IsFaceup() and c:IsType(TYPE_FUSION) and c:IsDestructable() -end -function c72150572.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c72150572.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c72150572.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c72150572.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c72150572.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c72167543.lua b/script/c72167543.lua deleted file mode 100644 index 044d099c01..0000000000 --- a/script/c72167543.lua +++ /dev/null @@ -1,35 +0,0 @@ ---ダウナード・マジシャン -function c72167543.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsRace,RACE_SPELLCASTER),4,2,c72167543.ovfilter,aux.Stringid(72167543,0)) - c:EnableReviveLimit() - --pierce - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_PIERCE) - c:RegisterEffect(e1) - --atkup - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(c72167543.atkval) - c:RegisterEffect(e2) - --remove material - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(72167543,1)) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e3:SetCode(EVENT_BATTLED) - e3:SetOperation(c72167543.rmop) - c:RegisterEffect(e3) -end -function c72167543.ovfilter(c) - return c:IsFaceup() and c:IsRankBelow(3) and Duel.GetCurrentPhase()==PHASE_MAIN2 -end -function c72167543.atkval(e,c) - return c:GetOverlayCount()*200 -end -function c72167543.rmop(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_EFFECT) -end diff --git a/script/c72192100.lua b/script/c72192100.lua deleted file mode 100644 index 2ddfce8526..0000000000 --- a/script/c72192100.lua +++ /dev/null @@ -1,79 +0,0 @@ ---デスルークデーモン -function c72192100.initial_effect(c) - --maintain - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCondition(c72192100.mtcon) - e1:SetOperation(c72192100.mtop) - c:RegisterEffect(e1) - --disable and destroy - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_CHAIN_SOLVING) - e2:SetRange(LOCATION_MZONE) - e2:SetOperation(c72192100.disop) - c:RegisterEffect(e2) - --special summon - local e3=Effect.CreateEffect(c) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetDescription(aux.Stringid(72192100,0)) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_QUICK_O) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e3:SetCode(EVENT_TO_GRAVE) - e3:SetRange(LOCATION_HAND) - e3:SetCost(c72192100.spcost) - e3:SetTarget(c72192100.sptg) - e3:SetOperation(c72192100.spop) - c:RegisterEffect(e3) -end -function c72192100.mtcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c72192100.mtop(e,tp,eg,ep,ev,re,r,rp) - if Duel.CheckLPCost(tp,500) then - Duel.PayLPCost(tp,500) - else - Duel.Destroy(e:GetHandler(),REASON_RULE) - end -end -function c72192100.disop(e,tp,eg,ep,ev,re,r,rp) - if ep==tp then return end - if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end - local tg=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) - if not tg or not tg:IsContains(e:GetHandler()) or not Duel.IsChainDisablable(ev) then return false end - local rc=re:GetHandler() - local dc=Duel.TossDice(tp,1) - if dc~=3 then return end - Duel.NegateEffect(ev) - if rc:IsRelateToEffect(re) then - Duel.Destroy(rc,REASON_EFFECT) - end -end -function c72192100.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end -function c72192100.filter(c,e,tp) - return c:IsCode(35975813) and c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_ONFIELD) - and c:IsCanBeEffectTarget(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c72192100.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return eg:IsContains(chkc) and c72192100.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and eg:IsExists(c72192100.filter,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=eg:FilterSelect(tp,c72192100.filter,1,1,nil,e,tp) - Duel.SetTargetCard(g) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c72192100.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c72204747.lua b/script/c72204747.lua deleted file mode 100644 index 740cc5e509..0000000000 --- a/script/c72204747.lua +++ /dev/null @@ -1,50 +0,0 @@ ---オーバー・デステニー -function c72204747.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c72204747.target) - e1:SetOperation(c72204747.activate) - c:RegisterEffect(e1) -end -function c72204747.filter1(c,e,sp) - local lv=c:GetLevel()/2 - return lv>1 and c:IsSetCard(0xc008) - and Duel.IsExistingMatchingCard(c72204747.filter2,sp,LOCATION_DECK,0,1,nil,lv,e,sp) -end -function c72204747.filter2(c,lv,e,sp) - return c:IsLevelBelow(lv) and c:IsSetCard(0xc008) and c:IsCanBeSpecialSummoned(e,0,sp,false,false) -end -function c72204747.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c72204747.filter1(chkc,e,tp) end - if chk==0 then return Duel.IsExistingTarget(c72204747.filter1,tp,LOCATION_GRAVE,0,1,nil,e,tp) - and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(72204747,0)) - Duel.SelectTarget(tp,c72204747.filter1,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c72204747.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local tc=Duel.GetFirstTarget() - if not tc or not tc:IsRelateToEffect(e) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local cg=Duel.SelectMatchingCard(tp,c72204747.filter2,tp,LOCATION_DECK,0,1,1,nil,tc:GetLevel()/2,e,tp) - if cg:GetCount()==0 then return end - local sc=cg:GetFirst() - Duel.SpecialSummon(cg,0,tp,tp,false,false,POS_FACEUP); - --destroy - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetCountLimit(1) - e1:SetReset(RESET_PHASE+RESET_END+RESET_EVENT+0x1fe0000) - e1:SetOperation(c72204747.des) - sc:RegisterEffect(e1) -end -function c72204747.des(e,tp,eg,ep,ev,re,r,rp) - Duel.Destroy(e:GetHandler(), REASON_EFFECT) -end diff --git a/script/c72237166.lua b/script/c72237166.lua deleted file mode 100644 index c517001682..0000000000 --- a/script/c72237166.lua +++ /dev/null @@ -1,26 +0,0 @@ ---カイザー・サクリファイス -function c72237166.initial_effect(c) - --to hand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(72237166,0)) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_RELEASE) - e1:SetCondition(c72237166.retcon) - e1:SetTarget(c72237166.rettg) - e1:SetOperation(c72237166.retop) - c:RegisterEffect(e1) -end -function c72237166.retcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsReason(REASON_SUMMON) -end -function c72237166.rettg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0) -end -function c72237166.retop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SendtoHand(c,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,c) - end -end diff --git a/script/c72258771.lua b/script/c72258771.lua deleted file mode 100644 index 6ed0a3149c..0000000000 --- a/script/c72258771.lua +++ /dev/null @@ -1,77 +0,0 @@ ---コアキメイル・ヴァラファール -function c72258771.initial_effect(c) - --cost - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c72258771.mtcon) - e1:SetOperation(c72258771.mtop) - c:RegisterEffect(e1) - --summon with 1 tribute - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(72258771,2)) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_SUMMON_PROC) - e2:SetCondition(c72258771.otcon) - e2:SetOperation(c72258771.otop) - e2:SetValue(SUMMON_TYPE_ADVANCE) - c:RegisterEffect(e2) - --pierce - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_PIERCE) - c:RegisterEffect(e3) - --indes - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e4:SetRange(LOCATION_MZONE) - e4:SetValue(c72258771.efilter) - c:RegisterEffect(e4) -end -function c72258771.mtcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c72258771.cfilter1(c) - return c:IsCode(36623431) and c:IsAbleToGraveAsCost() -end -function c72258771.mtop(e,tp,eg,ep,ev,re,r,rp) - local g1=Duel.GetMatchingGroup(c72258771.cfilter1,tp,LOCATION_HAND,0,nil) - local select=1 - if g1:GetCount()>0 then - select=Duel.SelectOption(tp,aux.Stringid(72258771,0),aux.Stringid(72258771,1)) - else - select=Duel.SelectOption(tp,aux.Stringid(72258771,1))+1 - end - if select==0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=g1:Select(tp,1,1,nil) - Duel.SendtoGrave(g,REASON_COST) - else - Duel.Destroy(e:GetHandler(),REASON_COST) - end -end -function c72258771.otfilter(c,tp) - return c:IsSetCard(0x1d) and (c:IsControler(tp) or c:IsFaceup()) -end -function c72258771.otcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - local mg=Duel.GetMatchingGroup(c72258771.otfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp) - return c:GetLevel()>6 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-1 - and Duel.GetTributeCount(c,mg)>0 -end -function c72258771.otop(e,tp,eg,ep,ev,re,r,rp,c) - local mg=Duel.GetMatchingGroup(c72258771.otfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp) - local sg=Duel.SelectTribute(tp,c,1,1,mg) - c:SetMaterial(sg) - Duel.Release(sg,REASON_SUMMON+REASON_MATERIAL) -end -function c72258771.efilter(e,re,rp) - return re:IsActiveType(TYPE_TRAP) -end diff --git a/script/c72278479.lua b/script/c72278479.lua deleted file mode 100644 index 7a70a3a406..0000000000 --- a/script/c72278479.lua +++ /dev/null @@ -1,34 +0,0 @@ ---ブラック・リターン -function c72278479.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_RECOVER) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(c72278479.condition) - e1:SetTarget(c72278479.target) - e1:SetOperation(c72278479.activate) - c:RegisterEffect(e1) -end -function c72278479.condition(e,tp,eg,ep,ev,re,r,rp) - return eg:GetCount()==1 and eg:GetFirst():IsSetCard(0x33) -end -function c72278479.filter(c) - return c:IsFaceup() and c:IsAbleToHand() and c:GetAttack()>0 -end -function c72278479.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c72278479.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c72278479.filter,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPPO) - local g=Duel.SelectTarget(tp,c72278479.filter,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,0) -end -function c72278479.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:GetAttack()>0 then - Duel.Recover(tp,tc:GetAttack(),REASON_EFFECT) - Duel.SendtoHand(tc,nil,REASON_EFFECT) - end -end diff --git a/script/c72287557.lua b/script/c72287557.lua deleted file mode 100644 index ea4934eae0..0000000000 --- a/script/c72287557.lua +++ /dev/null @@ -1,37 +0,0 @@ ---ヘル・ポリマー -function c72287557.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_CONTROL) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(c72287557.condition) - e1:SetCost(c72287557.cost) - e1:SetTarget(c72287557.target) - e1:SetOperation(c72287557.activate) - c:RegisterEffect(e1) -end -function c72287557.condition(e,tp,eg,ep,ev,re,r,rp) - local tc=eg:GetFirst() - return eg:GetCount()==1 and tc:IsControler(1-tp) and bit.band(tc:GetSummonType(),SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION -end -function c72287557.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,nil,1,nil) end - local g=Duel.SelectReleaseGroup(tp,nil,1,1,nil) - Duel.Release(g,REASON_COST) -end -function c72287557.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - if chk==0 then return eg:GetFirst():IsCanBeEffectTarget(e) and eg:GetFirst():IsControlerCanBeChanged() end - Duel.SetTargetCard(eg) - Duel.SetOperationInfo(0,CATEGORY_CONTROL,eg,1,0,0) -end -function c72287557.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and not Duel.GetControl(tc,tp,0,0) then - if not tc:IsImmuneToEffect(e) and tc:IsAbleToChangeControler() then - Duel.Destroy(tc,REASON_EFFECT) - end - end -end diff --git a/script/c72291078.lua b/script/c72291078.lua deleted file mode 100644 index c478fc0bf8..0000000000 --- a/script/c72291078.lua +++ /dev/null @@ -1,72 +0,0 @@ ---幻獣機オライオン -function c72291078.initial_effect(c) - -- - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e1:SetCondition(c72291078.indcon) - e1:SetValue(1) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - c:RegisterEffect(e2) - --summon - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(72291078,0)) - e3:SetCategory(CATEGORY_SUMMON) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_GRAVE) - e3:SetCost(c72291078.cost) - e3:SetTarget(c72291078.target) - e3:SetOperation(c72291078.operation) - c:RegisterEffect(e3) - --token - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(72291078,1)) - e4:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e4:SetProperty(EFFECT_FLAG_DELAY) - e4:SetCode(EVENT_TO_GRAVE) - e4:SetCountLimit(1,72291078) - e4:SetTarget(c72291078.sptg) - e4:SetOperation(c72291078.spop) - c:RegisterEffect(e4) -end -function c72291078.indcon(e) - return Duel.IsExistingMatchingCard(Card.IsType,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil,TYPE_TOKEN) -end -function c72291078.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) -end -function c72291078.filter(c) - return c:IsSetCard(0x101b) and c:IsSummonable(true,nil) -end -function c72291078.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c72291078.filter,tp,LOCATION_HAND,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,0,0) -end -function c72291078.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON) - local g=Duel.SelectMatchingCard(tp,c72291078.filter,tp,LOCATION_HAND,0,1,1,nil) - local tc=g:GetFirst() - if tc then - Duel.Summon(tp,tc,true,nil) - end -end -function c72291078.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsPlayerCanSpecialSummonMonster(tp,31533705,0x101b,0x4011,0,0,3,RACE_MACHINE,ATTRIBUTE_WIND) end - Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0) -end -function c72291078.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - if Duel.IsPlayerCanSpecialSummonMonster(tp,31533705,0x101b,0x4011,0,0,3,RACE_MACHINE,ATTRIBUTE_WIND) then - local token=Duel.CreateToken(tp,72291079) - Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c72291412.lua b/script/c72291412.lua deleted file mode 100644 index 5d226fe38c..0000000000 --- a/script/c72291412.lua +++ /dev/null @@ -1,75 +0,0 @@ ---DDネクロ・スライム -function c72291412.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_GRAVE) - e1:SetCountLimit(1,72291412) - e1:SetTarget(c72291412.target) - e1:SetOperation(c72291412.operation) - c:RegisterEffect(e1) -end -function c72291412.filter0(c) - return c:IsCanBeFusionMaterial() and c:IsAbleToRemove() -end -function c72291412.filter1(c,e) - return c:IsCanBeFusionMaterial() and c:IsAbleToRemove() and not c:IsImmuneToEffect(e) -end -function c72291412.filter2(c,e,tp,m,f,gc) - return c:IsType(TYPE_FUSION) and c:IsSetCard(0x10af) and (not f or f(c)) - and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,gc) -end -function c72291412.target(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then - local mg1=Duel.GetMatchingGroup(c72291412.filter0,tp,LOCATION_GRAVE,0,c) - local res=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c72291412.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,c) - if not res then - local ce=Duel.GetChainMaterial(tp) - if ce~=nil then - local fgroup=ce:GetTarget() - local mg2=fgroup(ce,e,tp) - local mf=ce:GetValue() - res=Duel.IsExistingMatchingCard(c72291412.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,c) - end - end - return res - end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function c72291412.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) or c:IsImmuneToEffect(e) then return end - local mg1=Duel.GetMatchingGroup(c72291412.filter1,tp,LOCATION_GRAVE,0,c,e) - local sg1=Duel.GetMatchingGroup(c72291412.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,c) - local mg2=nil - local sg2=nil - local ce=Duel.GetChainMaterial(tp) - if ce~=nil then - local fgroup=ce:GetTarget() - mg2=fgroup(ce,e,tp) - local mf=ce:GetValue() - sg2=Duel.GetMatchingGroup(c72291412.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,mf,c) - end - if (Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and sg1:GetCount()>0) or (sg2~=nil and sg2:GetCount()>0) then - local sg=sg1:Clone() - if sg2 then sg:Merge(sg2) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local tg=sg:Select(tp,1,1,nil) - local tc=tg:GetFirst() - if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then - local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,c) - tc:SetMaterial(mat1) - Duel.Remove(mat1,POS_FACEUP,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION) - Duel.BreakEffect() - Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP) - else - local mat2=Duel.SelectFusionMaterial(tp,tc,mg2,c) - local fop=ce:GetOperation() - fop(ce,e,tp,tc,mat2) - end - tc:CompleteProcedure() - end -end diff --git a/script/c72302403.lua b/script/c72302403.lua deleted file mode 100644 index 6c24506c57..0000000000 --- a/script/c72302403.lua +++ /dev/null @@ -1,61 +0,0 @@ ---光の護封剣 -function c72302403.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_POSITION) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c72302403.target) - e1:SetOperation(c72302403.activate) - c:RegisterEffect(e1) - --cannot attack - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(0,LOCATION_MZONE) - c:RegisterEffect(e2) - --remain field - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_REMAIN_FIELD) - c:RegisterEffect(e3) -end -function c72302403.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - e:GetHandler():SetTurnCounter(0) - local sg=Duel.GetMatchingGroup(Card.IsFacedown,tp,0,LOCATION_MZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_POSITION,sg,sg:GetCount(),0,0) - --destroy - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_SZONE) - e1:SetCondition(c72302403.descon) - e1:SetOperation(c72302403.desop) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END+RESET_OPPO_TURN,3) - e:GetHandler():RegisterEffect(e1) - e:GetHandler():RegisterFlagEffect(1082946,RESET_PHASE+PHASE_END+RESET_OPPO_TURN,0,3) - c72302403[e:GetHandler()]=e1 -end -function c72302403.activate(e,tp,eg,ep,ev,re,r,rp) - local sg=Duel.GetMatchingGroup(Card.IsFacedown,tp,0,LOCATION_MZONE,nil) - if sg:GetCount()>0 then - Duel.ChangePosition(sg,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK,POS_FACEUP_DEFENCE,POS_FACEUP_DEFENCE) - end -end -function c72302403.descon(e,tp,eg,ep,ev,re,r,rp) - return tp~=Duel.GetTurnPlayer() -end -function c72302403.desop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local ct=c:GetTurnCounter() - ct=ct+1 - c:SetTurnCounter(ct) - if ct==3 then - Duel.Destroy(c,REASON_RULE) - c:ResetFlagEffect(1082946) - end -end diff --git a/script/c72328962.lua b/script/c72328962.lua deleted file mode 100644 index b82de48490..0000000000 --- a/script/c72328962.lua +++ /dev/null @@ -1,32 +0,0 @@ ---魔轟神ソルキウス -function c72328962.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(72328962,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_GRAVE) - e1:SetCost(c72328962.cost) - e1:SetTarget(c72328962.tg) - e1:SetOperation(c72328962.op) - c:RegisterEffect(e1) -end -function c72328962.costfilter(c) - return c:GetCode()~=72328962 and c:IsAbleToGraveAsCost() -end -function c72328962.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c72328962.costfilter,tp,LOCATION_HAND,0,2,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c72328962.costfilter,tp,LOCATION_HAND,0,2,2,nil) - Duel.SendtoGrave(g,REASON_COST) -end -function c72328962.tg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c72328962.op(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c72345736.lua b/script/c72345736.lua deleted file mode 100644 index 81b342b678..0000000000 --- a/script/c72345736.lua +++ /dev/null @@ -1,56 +0,0 @@ ---六武衆の結束 -function c72345736.initial_effect(c) - c:EnableCounterPermit(0x3003) - c:SetCounterLimit(0x3003,2) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --add counter - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetRange(LOCATION_SZONE) - e2:SetCode(EVENT_SUMMON_SUCCESS) - e2:SetOperation(c72345736.ctop) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e3) - --draw - local e4=Effect.CreateEffect(c) - e4:SetCategory(CATEGORY_DRAW) - e4:SetDescription(aux.Stringid(72345736,0)) - e4:SetType(EFFECT_TYPE_IGNITION) - e4:SetRange(LOCATION_SZONE) - e4:SetCost(c72345736.drcost) - e4:SetTarget(c72345736.drtg) - e4:SetOperation(c72345736.drop) - c:RegisterEffect(e4) -end -function c72345736.ctfilter(c) - return c:IsFaceup() and c:IsSetCard(0x3d) -end -function c72345736.ctop(e,tp,eg,ep,ev,re,r,rp) - if eg:IsExists(c72345736.ctfilter,1,nil) then - e:GetHandler():AddCounter(0x3003,1) - end -end -function c72345736.drcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - local ct=e:GetHandler():GetCounter(0x3003) - e:SetLabel(ct) - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end -function c72345736.drtg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:GetCounter(0x3003)>0 and Duel.IsPlayerCanDraw(tp,c:GetCounter(0x3003)) end - local ct=e:GetLabel() - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(ct) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,ct) -end -function c72345736.drop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end diff --git a/script/c72355441.lua b/script/c72355441.lua deleted file mode 100644 index 5f352005da..0000000000 --- a/script/c72355441.lua +++ /dev/null @@ -1,27 +0,0 @@ ---エクシーズ・ギフト -function c72355441.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c72355441.condition) - e1:SetTarget(c72355441.target) - e1:SetOperation(c72355441.activate) - c:RegisterEffect(e1) -end -function c72355441.cfilter(c) - return c:IsFaceup() and c:IsType(TYPE_XYZ) -end -function c72355441.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c72355441.cfilter,tp,LOCATION_MZONE,0,2,nil) -end -function c72355441.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp,2) and Duel.CheckRemoveOverlayCard(tp,1,0,2,REASON_EFFECT) end - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2) -end -function c72355441.activate(e,tp,eg,ep,ev,re,r,rp) - if not Duel.CheckRemoveOverlayCard(tp,1,0,2,REASON_EFFECT) then return end - Duel.RemoveOverlayCard(tp,1,0,2,2,REASON_EFFECT) - Duel.Draw(tp,2,REASON_EFFECT) -end diff --git a/script/c72370114.lua b/script/c72370114.lua deleted file mode 100644 index 50a58a8de0..0000000000 --- a/script/c72370114.lua +++ /dev/null @@ -1,56 +0,0 @@ ---ギアギアタッカー -function c72370114.initial_effect(c) - --turn set - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(72370114,0)) - e1:SetCategory(CATEGORY_POSITION) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetTarget(c72370114.target) - e1:SetOperation(c72370114.operation) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(72370114,1)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e2:SetCode(EVENT_FLIP) - e2:SetTarget(c72370114.destg) - e2:SetOperation(c72370114.desop) - c:RegisterEffect(e2) -end -function c72370114.target(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsCanTurnSet() and c:GetFlagEffect(72370114)==0 end - c:RegisterFlagEffect(72370114,RESET_EVENT+0x1fc0000+RESET_PHASE+PHASE_END,0,1) - Duel.SetOperationInfo(0,CATEGORY_POSITION,c,1,0,0) -end -function c72370114.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - Duel.ChangePosition(c,POS_FACEDOWN_DEFENCE) - end -end -function c72370114.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x72) -end -function c72370114.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable() -end -function c72370114.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c72370114.cfilter,tp,LOCATION_MZONE,0,1,e:GetHandler()) - and Duel.IsExistingMatchingCard(c72370114.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end - local g=Duel.GetMatchingGroup(c72370114.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c72370114.desop(e,tp,eg,ep,ev,re,r,rp) - local ct=Duel.GetMatchingGroupCount(c72370114.cfilter,tp,LOCATION_MZONE,0,e:GetHandler()) - local g=Duel.GetMatchingGroup(c72370114.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) - if ct>0 and g:GetCount()>0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local dg=g:Select(tp,1,ct,nil) - Duel.HintSelection(dg) - Duel.Destroy(dg,REASON_EFFECT) - end -end diff --git a/script/c72378329.lua b/script/c72378329.lua deleted file mode 100644 index a7904d8712..0000000000 --- a/script/c72378329.lua +++ /dev/null @@ -1,89 +0,0 @@ ---ビーストアイズ・ペンデュラム・ドラゴン -function c72378329.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcFun2(c,c72378329.ffilter,aux.FilterBoolFunction(Card.IsRace,RACE_BEAST),false) - --spsummon condition - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(c72378329.splimit) - c:RegisterEffect(e1) - --special summon rule - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_SPSUMMON_PROC) - e2:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e2:SetRange(LOCATION_EXTRA) - e2:SetCondition(c72378329.spcon) - e2:SetOperation(c72378329.spop) - c:RegisterEffect(e2) - --damage - local e3=Effect.CreateEffect(c) - e3:SetCategory(CATEGORY_DAMAGE) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e3:SetCode(EVENT_BATTLE_DESTROYING) - e3:SetCondition(c72378329.damcon) - e3:SetTarget(c72378329.damtg) - e3:SetOperation(c72378329.damop) - c:RegisterEffect(e3) - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetCode(EFFECT_MATERIAL_CHECK) - e4:SetValue(c72378329.valcheck) - e4:SetLabelObject(e3) - c:RegisterEffect(e4) -end -function c72378329.ffilter(c) - return c:IsRace(RACE_DRAGON) and c:IsAttribute(ATTRIBUTE_DARK) -end -function c72378329.splimit(e,se,sp,st) - return bit.band(st,SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION -end -function c72378329.spfilter1(c,tp) - return c:IsRace(RACE_DRAGON) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsCanBeFusionMaterial() - and Duel.CheckReleaseGroup(tp,c72378329.spfilter2,1,c) -end -function c72378329.spfilter2(c) - return c:IsRace(RACE_BEAST) and c:IsCanBeFusionMaterial() -end -function c72378329.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.GetLocationCount(tp,LOCATION_MZONE)>-2 - and Duel.CheckReleaseGroup(tp,c72378329.spfilter1,1,nil,tp) -end -function c72378329.spop(e,tp,eg,ep,ev,re,r,rp,c) - local g1=Duel.SelectReleaseGroup(tp,c72378329.spfilter1,1,1,nil,tp) - local g2=Duel.SelectReleaseGroup(tp,c72378329.spfilter2,1,1,g1:GetFirst()) - g1:Merge(g2) - c:SetMaterial(g1) - Duel.Release(g1,REASON_COST+REASON_FUSION+REASON_MATERIAL) -end -function c72378329.damcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local bc=c:GetBattleTarget() - return c:IsRelateToBattle() and bc:IsType(TYPE_MONSTER) -end -function c72378329.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local dam=e:GetLabel() - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(dam) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,dam) -end -function c72378329.damop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end -function c72378329.valcheck(e,c) - local g=c:GetMaterial():Filter(Card.IsRace,nil,RACE_BEAST) - local atk=0 - if g:GetCount()>0 then - atk=g:GetFirst():GetTextAttack() - if atk<0 then atk=0 end - end - e:GetLabelObject():SetLabel(atk) -end diff --git a/script/c72403299.lua b/script/c72403299.lua deleted file mode 100644 index 8dd770a2c6..0000000000 --- a/script/c72403299.lua +++ /dev/null @@ -1,30 +0,0 @@ ---リチュア・ディバイナー -function c72403299.initial_effect(c) - --announce - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(72403299,0)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetTarget(c72403299.target) - e1:SetOperation(c72403299.operation) - c:RegisterEffect(e1) -end -function c72403299.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,LOCATION_DECK,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,0) - local ac=Duel.AnnounceCard(tp) - e:SetLabel(ac) -end -function c72403299.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)==0 then return end - Duel.ConfirmDecktop(tp,1) - local g=Duel.GetDecktopGroup(tp,1) - local tc=g:GetFirst() - if tc:GetCode()==e:GetLabel() and tc:IsAbleToHand() then - Duel.DisableShuffleCheck() - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ShuffleHand(tp) - end -end diff --git a/script/c72405967.lua b/script/c72405967.lua deleted file mode 100644 index efd07a5801..0000000000 --- a/script/c72405967.lua +++ /dev/null @@ -1,32 +0,0 @@ ---王家の生け贄 -function c72405967.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_HANDES+CATEGORY_TOGRAVE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c72405967.condition) - e1:SetTarget(c72405967.target) - e1:SetOperation(c72405967.activate) - c:RegisterEffect(e1) -end -function c72405967.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsEnvironment(47355498,tp) -end -function c72405967.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(nil,tp,LOCATION_HAND,LOCATION_HAND,1,e:GetHandler()) end - Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,PLAYER_ALL,0) - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,PLAYER_ALL,LOCATION_HAND) -end -function c72405967.activate(e,tp,eg,ep,ev,re,r,rp) - local g1=Duel.GetFieldGroup(tp,LOCATION_HAND,0) - local g2=Duel.GetFieldGroup(tp,0,LOCATION_HAND) - Duel.ConfirmCards(tp,g2) - Duel.ConfirmCards(1-tp,g1) - local dg1=g1:Filter(Card.IsType,nil,TYPE_MONSTER) - local dg2=g2:Filter(Card.IsType,nil,TYPE_MONSTER) - dg1:Merge(dg2) - if dg1:GetCount()>0 then Duel.SendtoGrave(dg1,REASON_EFFECT+REASON_DISCARD) end - Duel.ShuffleHand(tp) - Duel.ShuffleHand(1-tp) -end diff --git a/script/c72413000.lua b/script/c72413000.lua deleted file mode 100644 index a0eebb9b79..0000000000 --- a/script/c72413000.lua +++ /dev/null @@ -1,52 +0,0 @@ ---ファーニマル・ウィング -function c72413000.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_REMOVE+CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_GRAVE) - e1:SetCountLimit(1,72413000) - e1:SetCondition(c72413000.condition) - e1:SetCost(c72413000.cost) - e1:SetTarget(c72413000.target) - e1:SetOperation(c72413000.operation) - c:RegisterEffect(e1) -end -function c72413000.cfilter(c) - return c:IsFaceup() and c:IsCode(70245411) -end -function c72413000.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c72413000.cfilter,tp,LOCATION_ONFIELD,0,1,nil) -end -function c72413000.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) -end -function c72413000.filter(c) - return c:IsSetCard(0xa9) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemove() -end -function c72413000.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c72413000.filter(chkc) end - if chk==0 then return Duel.IsPlayerCanDraw(tp,1) and Duel.IsExistingTarget(c72413000.filter,tp,LOCATION_GRAVE,0,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,c72413000.filter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c72413000.tgfilter(c) - return c:IsFaceup() and c:IsCode(70245411) and c:IsAbleToGrave() -end -function c72413000.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)~=0 - and Duel.Draw(tp,1,REASON_EFFECT)~=0 and Duel.IsExistingMatchingCard(c72413000.tgfilter,tp,LOCATION_ONFIELD,0,1,nil) - and Duel.IsPlayerCanDraw(tp,1) and Duel.SelectYesNo(tp,aux.Stringid(72413000,0)) then - Duel.BreakEffect() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c72413000.tgfilter,tp,LOCATION_ONFIELD,0,1,1,nil) - if Duel.SendtoGrave(g,REASON_EFFECT)~=0 and g:GetFirst():IsLocation(LOCATION_GRAVE) then - Duel.Draw(tp,1,REASON_EFFECT) - end - end -end diff --git a/script/c72426662.lua b/script/c72426662.lua deleted file mode 100644 index 725aac898c..0000000000 --- a/script/c72426662.lua +++ /dev/null @@ -1,28 +0,0 @@ ---終焉の王デミス -function c72426662.initial_effect(c) - c:EnableReviveLimit() - --destroy - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetDescription(aux.Stringid(72426662,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c72426662.cost) - e1:SetTarget(c72426662.target) - e1:SetOperation(c72426662.operation) - c:RegisterEffect(e1) -end -function c72426662.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,2000) - else Duel.PayLPCost(tp,2000) end -end -function c72426662.target(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c) end - local sg=Duel.GetMatchingGroup(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,c) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,sg:GetCount(),0,0) -end -function c72426662.operation(e,tp,eg,ep,ev,re,r,rp) - local sg=Duel.GetMatchingGroup(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler()) - Duel.Destroy(sg,REASON_EFFECT) -end diff --git a/script/c72429240.lua b/script/c72429240.lua deleted file mode 100644 index f211a8a048..0000000000 --- a/script/c72429240.lua +++ /dev/null @@ -1,34 +0,0 @@ ---ヴェルズ・オランタ -function c72429240.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(72429240,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c72429240.cost) - e1:SetTarget(c72429240.target) - e1:SetOperation(c72429240.operation) - c:RegisterEffect(e1) -end -function c72429240.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end -function c72429240.filter(c) - return c:IsFaceup() and c:IsDestructable() -end -function c72429240.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c72429240.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c72429240.filter,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c72429240.filter,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c72429240.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c7243511.lua b/script/c7243511.lua deleted file mode 100644 index a82426fae1..0000000000 --- a/script/c7243511.lua +++ /dev/null @@ -1,39 +0,0 @@ ---コアラッコアラ -function c7243511.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcCode2(c,87685879,71759912,true,true) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(7243511,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c7243511.cost) - e1:SetTarget(c7243511.target) - e1:SetOperation(c7243511.operation) - c:RegisterEffect(e1) -end -function c7243511.cfilter(c) - return c:IsRace(RACE_BEAST) and c:IsAbleToGraveAsCost() -end -function c7243511.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c7243511.cfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local cg=Duel.SelectMatchingCard(tp,c7243511.cfilter,tp,LOCATION_HAND,0,1,1,nil) - Duel.SendtoGrave(cg,REASON_COST) -end -function c7243511.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsDestructable() end - if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c7243511.operation(e,tp,eg,ep,ev,re,r,rp,chk) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c72439556.lua b/script/c72439556.lua deleted file mode 100644 index 53a8b41749..0000000000 --- a/script/c72439556.lua +++ /dev/null @@ -1,26 +0,0 @@ ---ガスタの希望 カムイ -function c72439556.initial_effect(c) - --flip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(72439556,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP) - e1:SetTarget(c72439556.target) - e1:SetOperation(c72439556.operation) - c:RegisterEffect(e1) -end -function c72439556.filter(c,e,tp) - return c:IsSetCard(0x10) and c:IsType(TYPE_TUNER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c72439556.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c72439556.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c72439556.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c72443568.lua b/script/c72443568.lua deleted file mode 100644 index 05918af71a..0000000000 --- a/script/c72443568.lua +++ /dev/null @@ -1,26 +0,0 @@ ---サイレント・マジシャン LV8 -function c72443568.initial_effect(c) - c:EnableReviveLimit() - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(aux.FALSE) - c:RegisterEffect(e1) - --immune spell - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_IMMUNE_EFFECT) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetValue(c72443568.efilter) - c:RegisterEffect(e2) -end -c72443568.lvupcount=1 -c72443568.lvup={73665146} -c72443568.lvdncount=1 -c72443568.lvdn={73665146} -function c72443568.efilter(e,te) - return te:IsActiveType(TYPE_SPELL) and te:GetOwnerPlayer()~=e:GetHandlerPlayer() -end diff --git a/script/c72446038.lua b/script/c72446038.lua deleted file mode 100644 index e3e13ff51b..0000000000 --- a/script/c72446038.lua +++ /dev/null @@ -1,4 +0,0 @@ ---合成魔術 -function c72446038.initial_effect(c) - aux.AddRitualProcGreater(c,aux.FilterBoolFunction(Card.IsCode,84385264)) -end diff --git a/script/c72491806.lua b/script/c72491806.lua deleted file mode 100644 index b869dedecc..0000000000 --- a/script/c72491806.lua +++ /dev/null @@ -1,66 +0,0 @@ ---U.A.ファンタジスタ -function c72491806.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(1,72491806) - e1:SetCondition(c72491806.spcon) - e1:SetOperation(c72491806.spop) - c:RegisterEffect(e1) - --to hand and spsummon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(72491806,0)) - e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,72491807) - e2:SetTarget(c72491806.tstg) - e2:SetOperation(c72491806.tsop) - c:RegisterEffect(e2) -end -function c72491806.spfilter(c) - return c:IsFaceup() and c:IsSetCard(0xb2) and not c:IsCode(72491806) and c:IsAbleToHandAsCost() -end -function c72491806.spcon(e,c) - if c==nil then return true end - return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-1 - and Duel.IsExistingMatchingCard(c72491806.spfilter,c:GetControler(),LOCATION_MZONE,0,1,nil) -end -function c72491806.spop(e,tp,eg,ep,ev,re,r,rp,c) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g=Duel.SelectMatchingCard(tp,c72491806.spfilter,tp,LOCATION_MZONE,0,1,1,nil) - Duel.SendtoHand(g,nil,REASON_COST) -end -function c72491806.thfilter(c,e,tp) - return c:IsFaceup() and c:IsSetCard(0xb2) and c:IsAbleToHand() - and Duel.IsExistingMatchingCard(c72491806.spfilter2,tp,LOCATION_HAND,0,1,nil,e,tp,c:GetCode()) -end -function c72491806.spfilter2(c,e,tp,code) - return c:IsSetCard(0xb2) and not c:IsCode(code) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c72491806.tstg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c72491806.thfilter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsExistingTarget(c72491806.thfilter,tp,LOCATION_MZONE,0,1,e:GetHandler(),e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g=Duel.SelectTarget(tp,c72491806.thfilter,tp,LOCATION_MZONE,0,1,1,e:GetHandler(),e,tp) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c72491806.tsop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() and Duel.SendtoHand(tc,nil,REASON_EFFECT)~=0 then - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=Duel.SelectMatchingCard(tp,c72491806.spfilter2,tp,LOCATION_HAND,0,1,1,nil,e,tp,tc:GetCode()) - if sg:GetCount()>0 then - Duel.BreakEffect() - Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) - end - end -end diff --git a/script/c72497366.lua b/script/c72497366.lua deleted file mode 100644 index a4b3b9bc09..0000000000 --- a/script/c72497366.lua +++ /dev/null @@ -1,43 +0,0 @@ ---悪魔の憑代 -function c72497366.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --decrease tribute - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(72497366,0)) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_SUMMON_PROC) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(LOCATION_HAND,0) - e2:SetCountLimit(1) - e2:SetCondition(c72497366.ntcon) - e2:SetTarget(c72497366.nttg) - c:RegisterEffect(e2) - --destroy replace - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e3:SetCode(EFFECT_DESTROY_REPLACE) - e3:SetRange(LOCATION_SZONE) - e3:SetTarget(c72497366.reptg) - e3:SetValue(1) - c:RegisterEffect(e3) -end -function c72497366.ntcon(e,c) - if c==nil then return true end - return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 -end -function c72497366.nttg(e,c) - return c:IsLevelAbove(5) and c:IsRace(RACE_FIEND) -end -function c72497366.reptg(e,tp,eg,ep,ev,re,r,rp,chk) - local tc=eg:GetFirst() - if chk==0 then return eg:GetCount()==1 and tc:IsFaceup() and tc:IsLocation(LOCATION_MZONE) - and tc:IsRace(RACE_FIEND) and tc:IsLevelAbove(5) and bit.band(tc:GetSummonType(),SUMMON_TYPE_NORMAL)~=0 end - if Duel.SelectYesNo(tp,aux.Stringid(72497366,1)) then - Duel.SendtoGrave(e:GetHandler(),REASON_EFFECT) - return true - else return false end -end diff --git a/script/c72502414.lua b/script/c72502414.lua deleted file mode 100644 index ed70bd4fa2..0000000000 --- a/script/c72502414.lua +++ /dev/null @@ -1,30 +0,0 @@ ---エクシーズ・エージェント -function c72502414.initial_effect(c) - --material - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(72502414,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_GRAVE) - e1:SetCountLimit(1,72502414+EFFECT_COUNT_CODE_DUEL) - e1:SetTarget(c72502414.target) - e1:SetOperation(c72502414.operation) - c:RegisterEffect(e1) -end -function c72502414.filter(c) - return c:IsFaceup() and c:IsSetCard(0x7f) and c:IsType(TYPE_XYZ) -end -function c72502414.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c72502414.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c72502414.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - Duel.SelectTarget(tp,c72502414.filter,tp,LOCATION_MZONE,0,1,1,nil) -end -function c72502414.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then - Duel.Overlay(tc,Group.FromCards(c)) - end -end diff --git a/script/c72520073.lua b/script/c72520073.lua deleted file mode 100644 index 050b0832c1..0000000000 --- a/script/c72520073.lua +++ /dev/null @@ -1,27 +0,0 @@ ---闇の芸術家 -function c72520073.initial_effect(c) - --defdown - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(72520073,0)) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_BATTLE_START) - e1:SetCondition(c72520073.defcon) - e1:SetOperation(c72520073.defop) - c:RegisterEffect(e1) -end -function c72520073.defcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local bc=c:GetBattleTarget() - return c==Duel.GetAttackTarget() and bc:IsAttribute(ATTRIBUTE_LIGHT) -end -function c72520073.defop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_DEFENCE) - e1:SetValue(c:GetDefence()/2) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_DAMAGE) - c:RegisterEffect(e1) - end -end diff --git a/script/c72537897.lua b/script/c72537897.lua deleted file mode 100644 index a3abbe23c9..0000000000 --- a/script/c72537897.lua +++ /dev/null @@ -1,101 +0,0 @@ ---魔獣の懐柔 -function c72537897.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c72537897.condition) - e1:SetCost(c72537897.cost) - e1:SetTarget(c72537897.target) - e1:SetOperation(c72537897.activate) - c:RegisterEffect(e1) -end -function c72537897.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 -end -function c72537897.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetTargetRange(1,0) - e1:SetTarget(c72537897.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function c72537897.splimit(e,c) - return c:GetRace()~=RACE_BEAST -end -function c72537897.spfilter(c,e,tp) - return c:IsRace(RACE_BEAST) and c:IsLevelBelow(2) and c:IsType(TYPE_EFFECT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c72537897.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local g=Duel.GetMatchingGroup(c72537897.spfilter,tp,LOCATION_DECK,0,nil,e,tp) - return Duel.GetLocationCount(tp,LOCATION_MZONE)>2 and g:GetClassCount(Card.GetCode)>=3 end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,3,tp,LOCATION_DECK) -end -function c72537897.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=2 then return end - local g=Duel.GetMatchingGroup(c72537897.spfilter,tp,LOCATION_DECK,0,nil,e,tp) - if g:GetClassCount(Card.GetCode)>=3 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg1=g:Select(tp,1,1,nil) - g:Remove(Card.IsCode,nil,sg1:GetFirst():GetCode()) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg2=g:Select(tp,1,1,nil) - g:Remove(Card.IsCode,nil,sg2:GetFirst():GetCode()) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg3=g:Select(tp,1,1,nil) - sg1:Merge(sg2) - sg1:Merge(sg3) - local c=e:GetHandler() - local fid=c:GetFieldID() - local tc=sg1:GetFirst() - while tc do - Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) - tc:RegisterFlagEffect(72537897,RESET_EVENT+0x1fe0000,0,1,fid) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e2) - tc=sg1:GetNext() - end - sg1:KeepAlive() - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e3:SetCode(EVENT_PHASE+PHASE_END) - e3:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e3:SetCountLimit(1) - e3:SetLabel(fid) - e3:SetLabelObject(sg1) - e3:SetCondition(c72537897.descon) - e3:SetOperation(c72537897.desop) - Duel.RegisterEffect(e3,tp) - Duel.SpecialSummonComplete() - end -end -function c72537897.desfilter(c,fid) - return c:GetFlagEffectLabel(72537897)==fid -end -function c72537897.descon(e,tp,eg,ep,ev,re,r,rp) - local g=e:GetLabelObject() - if not g:IsExists(c72537897.desfilter,1,nil,e:GetLabel()) then - g:DeleteGroup() - e:Reset() - return false - else return true end -end -function c72537897.desop(e,tp,eg,ep,ev,re,r,rp) - local g=e:GetLabelObject() - local tg=g:Filter(c72537897.desfilter,nil,e:GetLabel()) - Duel.Destroy(tg,REASON_EFFECT) -end diff --git a/script/c72549351.lua b/script/c72549351.lua deleted file mode 100644 index d5e32ceb11..0000000000 --- a/script/c72549351.lua +++ /dev/null @@ -1,41 +0,0 @@ ---ドラゴニック・タクティクス -function c72549351.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c72549351.cost) - e1:SetTarget(c72549351.target) - e1:SetOperation(c72549351.activate) - c:RegisterEffect(e1) -end -function c72549351.cost(e,tp,eg,ep,ev,re,r,rp,chk) - e:SetLabel(1) - return true -end -function c72549351.spfilter(c,e,tp) - return c:IsRace(RACE_DRAGON) and c:GetLevel()==8 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c72549351.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - if e:GetLabel()==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c72549351.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end - e:SetLabel(0) - return Duel.CheckReleaseGroup(tp,Card.IsRace,2,nil,RACE_DRAGON) - end - if e:GetLabel()~=0 then - local rg=Duel.SelectReleaseGroup(tp,Card.IsRace,2,2,nil,RACE_DRAGON) - Duel.Release(rg,REASON_COST) - e:SetLabel(0) - end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c72549351.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c72549351.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c72563071.lua b/script/c72563071.lua deleted file mode 100644 index f92eabd228..0000000000 --- a/script/c72563071.lua +++ /dev/null @@ -1,40 +0,0 @@ ---サイコ・ショックウェーブ -function c72563071.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_CHAINING) - e1:SetCondition(c72563071.condition) - e1:SetCost(c72563071.cost) - e1:SetTarget(c72563071.target) - e1:SetOperation(c72563071.activate) - c:RegisterEffect(e1) -end -function c72563071.condition(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp and re:IsActiveType(TYPE_TRAP) and re:IsHasType(EFFECT_TYPE_ACTIVATE) -end -function c72563071.cfilter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDiscardable() -end -function c72563071.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c72563071.cfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,c72563071.cfilter,1,1,REASON_COST+REASON_DISCARD) -end -function c72563071.spfilter(c,e,tp) - return c:GetLevel()==6 and c:IsAttribute(ATTRIBUTE_DARK) and c:IsRace(RACE_MACHINE) - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c72563071.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c72563071.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c72563071.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c72563071.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()~=0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c72575145.lua b/script/c72575145.lua deleted file mode 100644 index 252c519bb1..0000000000 --- a/script/c72575145.lua +++ /dev/null @@ -1,44 +0,0 @@ ---降格処分 -function c72575145.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c72575145.target) - e1:SetOperation(c72575145.operation) - c:RegisterEffect(e1) - --Atk,def - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_UPDATE_LEVEL) - e2:SetValue(-2) - c:RegisterEffect(e2) - --Equip limit - local e4=Effect.CreateEffect(c) - e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetCode(EFFECT_EQUIP_LIMIT) - e4:SetValue(c72575145.eqlimit) - c:RegisterEffect(e4) -end -function c72575145.eqlimit(e,c) - return c:GetLevel()>0 -end -function c72575145.filter(c) - return c:IsFaceup() and c:GetLevel()>0 -end -function c72575145.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c72575145.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c72575145.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c72575145.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c72575145.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,e:GetHandler(),tc) - end -end diff --git a/script/c72580321.lua b/script/c72580321.lua deleted file mode 100644 index 81ce3aa7e4..0000000000 --- a/script/c72580321.lua +++ /dev/null @@ -1,53 +0,0 @@ ---ブロック・ゴーレム -function c72580321.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(72580321,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c72580321.spcon) - e1:SetCost(c72580321.spcost) - e1:SetTarget(c72580321.sptg) - e1:SetOperation(c72580321.spop) - c:RegisterEffect(e1) -end -function c72580321.cfilter(c) - return c:GetAttribute()~=ATTRIBUTE_EARTH -end -function c72580321.spcon(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsType,tp,LOCATION_GRAVE,0,nil,TYPE_MONSTER) - return g:GetCount()>0 and not g:IsExists(c72580321.cfilter,1,nil) -end -function c72580321.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end -function c72580321.filter(c,e,tp) - return c:IsLevelBelow(4) and not c:IsCode(72580321) and c:IsRace(RACE_ROCK) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c72580321.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c72580321.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c72580321.filter,tp,LOCATION_GRAVE,0,2,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c72580321.filter,tp,LOCATION_GRAVE,0,2,2,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,2,0,0) -end -function c72580321.spop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) - if Duel.GetLocationCount(tp,LOCATION_MZONE)=0 - and Duel.IsExistingTarget(c72621670.filter,tp,0,LOCATION_MZONE,2,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) - local g=Duel.SelectTarget(tp,c72621670.filter,tp,0,LOCATION_MZONE,2,2,nil) - Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,2,0,0) -end -function c72621670.tfilter(c,e) - return c:IsRelateToEffect(e) and c:IsFaceup() -end -function c72621670.tfilter2(c,e) - return not c:IsImmuneToEffect(e) and c:IsAbleToChangeControler() -end -function c72621670.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(c72621670.tfilter,nil,e) - if g:GetCount()<2 then return end - local ct=Duel.GetLocationCount(tp,LOCATION_MZONE,1-tp,LOCATION_REASON_CONTROL) - local g1=g:Filter(c72621670.tfilter2,nil,e) - local sg=nil - local dg=g1:Clone() - if g1:GetCount()>ct then - if ct>0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) - sg=g1:Select(tp,1,1,nil) - else - sg=Group.CreateGroup() - end - dg:Sub(sg) - else - sg=g1:Clone() - dg:Clear() - end - local tc=sg:GetFirst() - while tc do - Duel.GetControl(tc,tp,PHASE_END+RESET_SELF_TURN,1) - tc=sg:GetNext() - end - if dg:GetCount()>0 then Duel.Destroy(dg,REASON_RULE) end -end diff --git a/script/c72630549.lua b/script/c72630549.lua deleted file mode 100644 index 164bfdbd36..0000000000 --- a/script/c72630549.lua +++ /dev/null @@ -1,31 +0,0 @@ ---カオス・マジシャン -function c72630549.initial_effect(c) - --disable - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_DISABLE) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e1:SetTarget(c72630549.distg) - c:RegisterEffect(e1) - --disable effect - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_CHAIN_SOLVING) - e2:SetRange(LOCATION_MZONE) - e2:SetOperation(c72630549.disop) - c:RegisterEffect(e2) -end -function c72630549.distg(e,c) - if c:GetCardTargetCount()~=1 then return false end - return c:GetFirstCardTarget()==e:GetHandler() -end -function c72630549.disop(e,tp,eg,ep,ev,re,r,rp) - if not re:IsActiveType(TYPE_EFFECT) then return end - if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return end - local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) - if not g or g:GetCount()~=1 then return end - if g:GetFirst()==e:GetHandler() then - Duel.NegateEffect(ev) - end -end diff --git a/script/c72631243.lua b/script/c72631243.lua deleted file mode 100644 index 270fc911f6..0000000000 --- a/script/c72631243.lua +++ /dev/null @@ -1,15 +0,0 @@ ---エナジー・ブレイブ -function c72631243.initial_effect(c) - --indes - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetTarget(c72631243.indtg) - e1:SetValue(1) - c:RegisterEffect(e1) -end -function c72631243.indtg(e,c) - return c:IsDualState() -end diff --git a/script/c72634965.lua b/script/c72634965.lua deleted file mode 100644 index 00b4e1be90..0000000000 --- a/script/c72634965.lua +++ /dev/null @@ -1,18 +0,0 @@ ---虚無の統括者 -function c72634965.initial_effect(c) - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(aux.FALSE) - c:RegisterEffect(e1) - --disable spsummon - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetTargetRange(0,1) - c:RegisterEffect(e2) -end diff --git a/script/c72648577.lua b/script/c72648577.lua deleted file mode 100644 index 2892e01ddd..0000000000 --- a/script/c72648577.lua +++ /dev/null @@ -1,46 +0,0 @@ ---DDDの人事権 -function c72648577.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TODECK+CATEGORY_TOHAND) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c72648577.target) - e1:SetOperation(c72648577.operation) - c:RegisterEffect(e1) -end -function c72648577.filter(c) - if c:IsLocation(LOCATION_MZONE) and c:IsFacedown() then return false end - if c:IsLocation(LOCATION_SZONE) then - if c:GetSequence()<6 then return false end - elseif not c:IsType(TYPE_MONSTER) then return false end - return c:IsSetCard(0xaf) and c:IsAbleToDeck() -end -function c72648577.thfilter(c) - return c:IsSetCard(0xaf) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() and not c:IsHasEffect(EFFECT_NECRO_VALLEY) -end -function c72648577.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c72648577.filter,tp,LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_HAND,0,3,nil) end - Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,3,tp,LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_HAND) -end -function c72648577.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c72648577.filter,tp,LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_HAND,0,nil) - if g:GetCount()<3 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local sg=g:Select(tp,3,3,nil) - local cg=sg:Filter(Card.IsLocation,nil,LOCATION_HAND) - Duel.ConfirmCards(1-tp,cg) - Duel.SendtoDeck(sg,nil,0,REASON_EFFECT) - local dg=Duel.GetMatchingGroup(c72648577.thfilter,tp,LOCATION_DECK,0,nil) - if dg:GetCount()>1 and Duel.SelectYesNo(tp,aux.Stringid(72648577,0)) then - Duel.BreakEffect() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local tg=dg:Select(tp,2,2,nil) - Duel.SendtoHand(tg,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tg) - else - if sg:IsExists(Card.IsLocation,1,nil,LOCATION_DECK) then - Duel.ShuffleDeck(tp) - end - end -end diff --git a/script/c7264861.lua b/script/c7264861.lua deleted file mode 100644 index cf11edce51..0000000000 --- a/script/c7264861.lua +++ /dev/null @@ -1,26 +0,0 @@ ---インフェルニティ・ビースト -function c7264861.initial_effect(c) - --actlimit - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetCondition(c7264861.condition) - e1:SetOperation(c7264861.operation) - c:RegisterEffect(e1) -end -function c7264861.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)==0 -end -function c7264861.operation(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EFFECT_CANNOT_ACTIVATE) - e1:SetTargetRange(0,1) - e1:SetValue(c7264861.aclimit) - e1:SetReset(RESET_PHASE+PHASE_DAMAGE) - Duel.RegisterEffect(e1,tp) -end -function c7264861.aclimit(e,re,tp) - return re:IsHasType(EFFECT_TYPE_ACTIVATE) -end diff --git a/script/c72657739.lua b/script/c72657739.lua deleted file mode 100644 index 37ca908765..0000000000 --- a/script/c72657739.lua +++ /dev/null @@ -1,40 +0,0 @@ ---怨念のキラードール -function c72657739.initial_effect(c) - --register - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetOperation(c72657739.regop) - c:RegisterEffect(e1) -end -function c72657739.regop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsReason(REASON_EFFECT) - and re:GetActiveType()==TYPE_CONTINUOUS+TYPE_SPELL then - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(72657739,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_GRAVE) - e1:SetCondition(c72657739.spcon) - e1:SetTarget(c72657739.sptg) - e1:SetOperation(c72657739.spop) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN) - c:RegisterEffect(e1) - end -end -function c72657739.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c72657739.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c72657739.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - if e:GetHandler():IsRelateToEffect(e) then - Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c72677437.lua b/script/c72677437.lua deleted file mode 100644 index 3e9cd977a6..0000000000 --- a/script/c72677437.lua +++ /dev/null @@ -1,67 +0,0 @@ ---毒蛇王ヴェノミノン -function c72677437.initial_effect(c) - --spsummon condition - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(c72677437.splimit) - c:RegisterEffect(e1) - --atkup - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetValue(c72677437.atkval) - c:RegisterEffect(e2) - --special summon - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(72677437,0)) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_BATTLE_DESTROYED) - e3:SetCondition(c72677437.condition) - e3:SetCost(c72677437.cost) - e3:SetTarget(c72677437.target) - e3:SetOperation(c72677437.operation) - c:RegisterEffect(e3) - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e4:SetRange(LOCATION_MZONE) - e4:SetCode(EFFECT_IMMUNE_EFFECT) - e4:SetValue(c72677437.efilter) - c:RegisterEffect(e4) -end -function c72677437.splimit(e,se,sp,st) - return not se:GetHandler():IsType(TYPE_MONSTER) -end -function c72677437.atkval(e,c) - return Duel.GetMatchingGroupCount(Card.IsRace,c:GetControler(),LOCATION_GRAVE,0,nil,RACE_REPTILE)*500 -end -function c72677437.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) -end -function c72677437.cfilter(c) - return c:IsRace(RACE_REPTILE) and c:IsAbleToRemoveAsCost() -end -function c72677437.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c72677437.cfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c72677437.cfilter,tp,LOCATION_GRAVE,0,1,1,e:GetHandler()) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c72677437.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c72677437.operation(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - Duel.SpecialSummon(e:GetHandler(),0,tp,tp,true,false,POS_FACEUP) - end -end -function c72677437.efilter(e,te) - return te:GetHandler():IsCode(54306223) -end diff --git a/script/c72709014.lua b/script/c72709014.lua deleted file mode 100644 index 12d94ed5d6..0000000000 --- a/script/c72709014.lua +++ /dev/null @@ -1,99 +0,0 @@ ---王女の試練 -function c72709014.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c72709014.target) - e1:SetOperation(c72709014.operation) - c:RegisterEffect(e1) - --Atk up - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(800) - c:RegisterEffect(e2) - --Equip limit - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_EQUIP_LIMIT) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e3:SetValue(c72709014.eqlimit) - c:RegisterEffect(e3) - --equip - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e4:SetCode(EVENT_BATTLE_DESTROYING) - e4:SetRange(LOCATION_SZONE) - e4:SetOperation(c72709014.regop) - c:RegisterEffect(e4) - local e5=Effect.CreateEffect(c) - e5:SetDescription(aux.Stringid(72709014,0)) - e5:SetType(EFFECT_TYPE_IGNITION) - e5:SetCategory(CATEGORY_SPECIAL_SUMMON) - e5:SetRange(LOCATION_SZONE) - e5:SetCondition(c72709014.spcon) - e5:SetCost(c72709014.spcost) - e5:SetTarget(c72709014.sptg) - e5:SetOperation(c72709014.spop) - c:RegisterEffect(e5) -end -function c72709014.eqlimit(e,c) - local code=c:GetCode() - return code==81383947 or code==46128076 -end -function c72709014.filter(c) - local code=c:GetCode() - return c:IsFaceup() and (code==81383947 or code==46128076) -end -function c72709014.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c72709014.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c72709014.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c72709014.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c72709014.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,e:GetHandler(),tc) - end -end -function c72709014.regfilter(c,ec) - return c==ec and c:GetBattleTarget():IsLevelAbove(5) -end -function c72709014.regop(e,tp,eg,ep,ev,re,r,rp) - if eg:IsExists(c72709014.regfilter,1,nil,e:GetHandler():GetEquipTarget()) then - e:GetHandler():RegisterFlagEffect(72709014,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) - end -end -function c72709014.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetFlagEffect(72709014)~=0 -end -function c72709014.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - local ec=e:GetHandler():GetEquipTarget() - if chk==0 then return ec:IsReleasable() end - e:SetLabel(ec:GetCode()) - Duel.Release(ec,REASON_COST) -end -function c72709014.spfilter(c,e,tp,code) - return ((code==81383947 and c:IsCode(75917088)) or (code==46128076 and c:IsCode(2316186))) - and c:IsCanBeSpecialSummoned(e,0,tp,true,false) -end -function c72709014.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>-1 - and Duel.IsExistingMatchingCard(c72709014.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp,e:GetHandler():GetEquipTarget():GetCode()) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) -end -function c72709014.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c72709014.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp,e:GetLabel()) - if g:GetCount()~=0 then - Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP) - g:GetFirst():CompleteProcedure() - end -end diff --git a/script/c72710085.lua b/script/c72710085.lua deleted file mode 100644 index de910f64cd..0000000000 --- a/script/c72710085.lua +++ /dev/null @@ -1,41 +0,0 @@ ---星邪の神喰 -function c72710085.initial_effect(c) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - -- - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(72710085,0)) - e2:SetCategory(CATEGORY_TOGRAVE) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetRange(LOCATION_SZONE) - e2:SetProperty(EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_REMOVE) - e2:SetCountLimit(1,72710085) - e2:SetCondition(c72710085.tgcon) - e2:SetTarget(c72710085.tgtg) - e2:SetOperation(c72710085.tgop) - c:RegisterEffect(e2) -end -function c72710085.tgcon(e,tp,eg,ep,ev,re,r,rp) - local tc=eg:GetFirst() - return eg:GetCount()==1 and tc:IsPreviousLocation(LOCATION_GRAVE) and tc:IsControler(tp) and tc:IsType(TYPE_MONSTER) -end -function c72710085.filter(c,att) - return not c:IsAttribute(att) and c:IsType(TYPE_MONSTER) and c:IsAbleToGrave() -end -function c72710085.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsRelateToEffect(e) - and Duel.IsExistingMatchingCard(c72710085.filter,tp,LOCATION_DECK,0,1,nil,eg:GetFirst():GetAttribute()) end - e:SetLabel(eg:GetFirst():GetAttribute()) - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) -end -function c72710085.tgop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c72710085.filter,tp,LOCATION_DECK,0,1,1,nil,e:GetLabel()) - if g:GetCount()>0 then - Duel.SendtoGrave(g,REASON_EFFECT) - end -end diff --git a/script/c72714226.lua b/script/c72714226.lua deleted file mode 100644 index fa837b0262..0000000000 --- a/script/c72714226.lua +++ /dev/null @@ -1,38 +0,0 @@ ---アサルト・ガンドッグ -function c72714226.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(72714226,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetCondition(c72714226.condition) - e1:SetTarget(c72714226.target) - e1:SetOperation(c72714226.operation) - c:RegisterEffect(e1) -end -function c72714226.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) -end -function c72714226.filter(c,e,tp) - return c:IsCode(72714226) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c72714226.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c72714226.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c72714226.operation(e,tp,eg,ep,ev,re,r,rp) - local ct=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ct<=0 then return end - local g=Duel.GetMatchingGroup(c72714226.filter,tp,LOCATION_DECK,0,nil,e,tp) - if g:GetCount()>0 then - local tc1=g:GetFirst() - local tc2=g:GetNext() - Duel.SpecialSummonStep(tc1,0,tp,tp,false,false,POS_FACEUP) - if tc2 and ct>1 and Duel.SelectYesNo(tp,aux.Stringid(72714226,1)) then - Duel.SpecialSummonStep(tc2,0,tp,tp,false,false,POS_FACEUP) - end - Duel.SpecialSummonComplete() - end -end diff --git a/script/c72714392.lua b/script/c72714392.lua deleted file mode 100644 index 9045e39314..0000000000 --- a/script/c72714392.lua +++ /dev/null @@ -1,59 +0,0 @@ ---BF-大旆のヴァーユ -function c72714392.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(72714392,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_REMOVE) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_GRAVE) - e1:SetTarget(c72714392.target) - e1:SetOperation(c72714392.operation) - c:RegisterEffect(e1) - --synchro limit - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL) - e2:SetValue(aux.TRUE) - c:RegisterEffect(e2) -end -function c72714392.filter(c,e,tp) - local lv=c:GetLevel() - return lv>0 and c:IsSetCard(0x33) and not c:IsType(TYPE_TUNER) and c:IsAbleToRemove() - and Duel.IsExistingMatchingCard(c72714392.exfilter,tp,LOCATION_EXTRA,0,1,nil,lv+1,e,tp) -end -function c72714392.exfilter(c,lv,e,tp) - return c:IsSetCard(0x33) and c:GetLevel()==lv and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c72714392.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c72714392.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c72714392.filter,tp,LOCATION_GRAVE,0,1,e:GetHandler(),e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,c72714392.filter,tp,LOCATION_GRAVE,0,1,1,e:GetHandler(),e,tp) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function c72714392.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if not tc:IsRelateToEffect(e) or not c:IsRelateToEffect(e) then return end - local rg=Group.FromCards(c,tc) - if Duel.Remove(rg,POS_FACEUP,REASON_EFFECT)==2 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=Duel.SelectMatchingCard(tp,c72714392.exfilter,tp,LOCATION_EXTRA,0,1,1,nil,tc:GetLevel()+1,e,tp) - local sc=sg:GetFirst() - if sc and Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)>0 then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000) - sc:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+0x1fe0000) - sc:RegisterEffect(e2) - end - end -end diff --git a/script/c72714461.lua b/script/c72714461.lua deleted file mode 100644 index 9130fb96c3..0000000000 --- a/script/c72714461.lua +++ /dev/null @@ -1,83 +0,0 @@ ---慧眼の魔術師 -function c72714461.initial_effect(c) - --pendulum summon - aux.AddPendulumProcedure(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(72714461,0)) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --pendulum set - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_PZONE) - e2:SetCondition(c72714461.pencon) - e2:SetTarget(c72714461.pentg) - e2:SetOperation(c72714461.penop) - c:RegisterEffect(e2) - --scale - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(72714461,1)) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_HAND) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetCost(c72714461.sccost) - e3:SetTarget(c72714461.sctg) - e3:SetOperation(c72714461.scop) - c:RegisterEffect(e3) -end -function c72714461.pencon(e,tp,eg,ep,ev,re,r,rp) - local seq=e:GetHandler():GetSequence() - local sc=Duel.GetFieldCard(tp,LOCATION_SZONE,13-seq) - return sc and (sc:IsSetCard(0x98) or sc:IsSetCard(0x9f)) -end -function c72714461.penfilter(c) - return c:IsSetCard(0x98) and c:IsType(TYPE_PENDULUM) and not c:IsCode(72714461) and not c:IsForbidden() -end -function c72714461.pentg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsDestructable() - and Duel.IsExistingMatchingCard(c72714461.penfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0) -end -function c72714461.penop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - if Duel.Destroy(e:GetHandler(),REASON_EFFECT)~=0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) - local g=Duel.SelectMatchingCard(tp,c72714461.penfilter,tp,LOCATION_DECK,0,1,1,nil) - local tc=g:GetFirst() - if tc then - Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) - end - end -end -function c72714461.sccost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsDiscardable() end - Duel.SendtoGrave(e:GetHandler(),REASON_DISCARD+REASON_COST) -end -function c72714461.scfilter(c) - return (c:GetSequence()==6 and c:GetLeftScale()~=c:GetOriginalLeftScale()) - or (c:GetSequence()==7 and c:GetRightScale()~=c:GetOriginalRightScale()) -end -function c72714461.sctg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_SZONE) and chkc:IsControler(tp) and c72714461.scfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c72714461.scfilter,tp,LOCATION_SZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - Duel.SelectTarget(tp,c72714461.scfilter,tp,LOCATION_SZONE,0,1,1,nil) -end -function c72714461.scop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CHANGE_LSCALE) - e1:SetValue(tc:GetOriginalLeftScale()) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - tc:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_CHANGE_RSCALE) - e2:SetValue(tc:GetOriginalRightScale()) - tc:RegisterEffect(e2) - end -end diff --git a/script/c72767833.lua b/script/c72767833.lua deleted file mode 100644 index 94e39c33d5..0000000000 --- a/script/c72767833.lua +++ /dev/null @@ -1,30 +0,0 @@ ---カード・フリッパー -function c72767833.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_POSITION) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c72767833.cost) - e1:SetTarget(c72767833.target) - e1:SetOperation(c72767833.activate) - c:RegisterEffect(e1) -end -function c72767833.costfilter(c) - return c:IsDiscardable() and c:IsAbleToGraveAsCost() -end -function c72767833.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c72767833.costfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,c72767833.costfilter,1,1,REASON_COST) -end -function c72767833.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE,nil)>0 end - local sg=Duel.GetFieldGroup(tp,0,LOCATION_MZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_POSITION,sg,sg:GetCount(),0,0) -end -function c72767833.activate(e,tp,eg,ep,ev,re,r,rp) - local sg=Duel.GetFieldGroup(tp,0,LOCATION_MZONE,nil) - if sg:GetCount()>0 then - Duel.ChangePosition(sg,POS_FACEUP_DEFENCE,POS_FACEDOWN_DEFENCE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK) - end -end diff --git a/script/c72837335.lua b/script/c72837335.lua deleted file mode 100644 index 352294ed0c..0000000000 --- a/script/c72837335.lua +++ /dev/null @@ -1,37 +0,0 @@ ---先史遺産ゴルディアス・ユナイト -function c72837335.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(72837335,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c72837335.sptg) - e1:SetOperation(c72837335.spop) - c:RegisterEffect(e1) -end -function c72837335.filter(c,e,tp) - return c:IsSetCard(0x70) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c72837335.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c72837335.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c72837335.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local c=e:GetHandler() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c72837335.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - if c:IsRelateToEffect(e) and c:IsFaceup() then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CHANGE_LEVEL) - e1:SetValue(g:GetFirst():GetLevel()) - e1:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e1) - end - end -end diff --git a/script/c72845813.lua b/script/c72845813.lua deleted file mode 100644 index a9541755d7..0000000000 --- a/script/c72845813.lua +++ /dev/null @@ -1,12 +0,0 @@ ---A・O・J D.D.チェッカー -function c72845813.initial_effect(c) - --disable spsummon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetTargetRange(1,1) - e1:SetTarget(aux.TargetBoolFunction(Card.IsAttribute,ATTRIBUTE_LIGHT)) - c:RegisterEffect(e1) -end diff --git a/script/c72869010.lua b/script/c72869010.lua deleted file mode 100644 index b86ca924f3..0000000000 --- a/script/c72869010.lua +++ /dev/null @@ -1,6 +0,0 @@ ---ソウル・ハンター -function c72869010.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcCode2(c,99510761,28450915,true,true) -end diff --git a/script/c72881007.lua b/script/c72881007.lua deleted file mode 100644 index 623e482571..0000000000 --- a/script/c72881007.lua +++ /dev/null @@ -1,54 +0,0 @@ ---宝玉の氾濫 -function c72881007.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c72881007.cost) - e1:SetTarget(c72881007.target) - e1:SetOperation(c72881007.activate) - c:RegisterEffect(e1) -end -function c72881007.costfilter(c) - return c:IsFaceup() and c:IsSetCard(0x1034) and c:IsAbleToGraveAsCost() -end -function c72881007.cost(e,tp,eg,ep,ev,re,r,rp,chk) - e:SetLabel(1) - if chk==0 then return Duel.IsExistingMatchingCard(c72881007.costfilter,tp,LOCATION_SZONE,0,4,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c72881007.costfilter,tp,LOCATION_SZONE,0,4,4,nil) - Duel.SendtoGrave(g,REASON_COST) -end -function c72881007.filter(c,e,tp) - return c:IsSetCard(0x1034) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c72881007.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - if e:GetLabel()~=1 then - return Duel.IsExistingMatchingCard(c72881007.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) - else - e:SetLabel(0) - return Duel.IsExistingMatchingCard(c72881007.filter,tp,LOCATION_SZONE,0,1,nil,e,tp) - end - end - e:SetLabel(0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE) -end -function c72881007.ctfilter(c,tp) - return c:GetPreviousControler()==tp and c:IsLocation(LOCATION_GRAVE) -end -function c72881007.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetFieldGroup(tp,LOCATION_ONFIELD,LOCATION_ONFIELD) - Duel.SendtoGrave(g,REASON_EFFECT) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - g=Duel.GetOperatedGroup() - local ct=g:FilterCount(c72881007.ctfilter,nil,1-tp) - if ft>ct then ft=ct end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - g=Duel.SelectMatchingCard(tp,c72881007.filter,tp,LOCATION_GRAVE,0,ft,ft,nil,e,tp) - if g:GetCount()>0 then - Duel.BreakEffect() - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c72885174.lua b/script/c72885174.lua deleted file mode 100644 index 6a8efdcc39..0000000000 --- a/script/c72885174.lua +++ /dev/null @@ -1,44 +0,0 @@ ---フォーチュン・スリップ -function c72885174.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_REMOVE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetCondition(c72885174.condition) - e1:SetTarget(c72885174.target) - e1:SetOperation(c72885174.activate) - c:RegisterEffect(e1) -end -function c72885174.condition(e,tp,eg,ep,ev,re,r,rp) - return tp~=Duel.GetTurnPlayer() and Duel.GetAttackTarget() -end -function c72885174.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - local a=Duel.GetAttacker() - local d=Duel.GetAttackTarget() - if chk==0 then return a:IsOnField() and a:IsCanBeEffectTarget(e) - and d:IsOnField() and d:IsAbleToRemove() and d:IsCanBeEffectTarget(e) end - local g=Group.FromCards(a,d) - Duel.SetTargetCard(g) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,d,1,0,0) -end -function c72885174.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateAttack() - local a=Duel.GetAttacker() - local tc=Duel.GetAttackTarget() - if a:IsRelateToEffect(e) and a:IsFaceup() and tc:IsRelateToEffect(e) and Duel.Remove(tc,0,REASON_EFFECT+REASON_TEMPORARY)~=0 then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) - e1:SetReset(RESET_PHASE+PHASE_STANDBY) - e1:SetLabelObject(tc) - e1:SetCountLimit(1) - e1:SetOperation(c72885174.retop) - Duel.RegisterEffect(e1,tp) - end -end -function c72885174.retop(e,tp,eg,ep,ev,re,r,rp) - Duel.ReturnToField(e:GetLabelObject()) -end diff --git a/script/c72892473.lua b/script/c72892473.lua deleted file mode 100644 index 71c86b9f27..0000000000 --- a/script/c72892473.lua +++ /dev/null @@ -1,30 +0,0 @@ ---手札抹殺 -function c72892473.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_HANDES+CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c72892473.target) - e1:SetOperation(c72892473.activate) - c:RegisterEffect(e1) -end -function c72892473.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local h1=Duel.GetFieldGroupCount(tp,LOCATION_HAND,0) - if e:GetHandler():IsLocation(LOCATION_HAND) then h1=h1-1 end - local h2=Duel.GetFieldGroupCount(tp,0,LOCATION_HAND) - return (h1+h2>0) and (Duel.IsPlayerCanDraw(tp,h1) or h1==0) and (Duel.IsPlayerCanDraw(1-tp) or h2==0) - end - Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,PLAYER_ALL,1) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,PLAYER_ALL,1) -end -function c72892473.activate(e,tp,eg,ep,ev,re,r,rp) - local h1=Duel.GetFieldGroupCount(tp,LOCATION_HAND,0) - local h2=Duel.GetFieldGroupCount(tp,0,LOCATION_HAND) - local g=Duel.GetFieldGroup(tp,LOCATION_HAND,LOCATION_HAND) - Duel.SendtoGrave(g,REASON_EFFECT+REASON_DISCARD) - Duel.BreakEffect() - Duel.Draw(tp,h1,REASON_EFFECT) - Duel.Draw(1-tp,h2,REASON_EFFECT) -end diff --git a/script/c72896720.lua b/script/c72896720.lua deleted file mode 100644 index ea56afebf7..0000000000 --- a/script/c72896720.lua +++ /dev/null @@ -1,51 +0,0 @@ ---インフェルニティ・デス・ドラゴン -function c72896720.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_DARK),aux.NonTuner(nil),1) - c:EnableReviveLimit() - --destroy - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCategory(CATEGORY_DAMAGE+CATEGORY_DESTROY) - e1:SetDescription(aux.Stringid(72896720,0)) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c72896720.descon) - e1:SetCost(c72896720.descost) - e1:SetTarget(c72896720.destg) - e1:SetOperation(c72896720.desop) - c:RegisterEffect(e1) -end -function c72896720.descon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)==0 -end -function c72896720.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():GetAttackAnnouncedCount()==0 end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_OATH) - e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e:GetHandler():RegisterEffect(e1,true) -end -function c72896720.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsDestructable() end - if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,0,LOCATION_MZONE,1,1,nil) - local d=g:GetFirst() - local atk=0 - if d:IsFaceup() then atk=d:GetAttack() end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,atk/2) -end -function c72896720.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - local atk=0 - if tc:IsFaceup() then atk=tc:GetAttack() end - if Duel.Destroy(tc,REASON_EFFECT)==0 then return end - Duel.Damage(1-tp,atk/2,REASON_EFFECT) - end -end diff --git a/script/c72903645.lua b/script/c72903645.lua deleted file mode 100644 index 268ddca7bf..0000000000 --- a/script/c72903645.lua +++ /dev/null @@ -1,39 +0,0 @@ ---マグナ・スラッシュドラゴン -function c72903645.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(72903645,0)) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c72903645.descost) - e1:SetTarget(c72903645.destg) - e1:SetOperation(c72903645.desop) - c:RegisterEffect(e1) -end -function c72903645.cfilter(c) - return c:IsFaceup() and c:GetType()==TYPE_SPELL+TYPE_CONTINUOUS and c:IsAbleToGraveAsCost() -end -function c72903645.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c72903645.cfilter,tp,LOCATION_SZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c72903645.cfilter,tp,LOCATION_SZONE,0,1,1,nil) - Duel.SendtoGrave(g,REASON_COST) -end -function c72903645.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable() -end -function c72903645.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and c72903645.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c72903645.filter,tp,0,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c72903645.filter,tp,0,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c72903645.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c72913666.lua b/script/c72913666.lua deleted file mode 100644 index 3e9c406d8f..0000000000 --- a/script/c72913666.lua +++ /dev/null @@ -1,58 +0,0 @@ ---ゴーストリック・ワーウルフ -function c72913666.initial_effect(c) - --summon limit - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_SUMMON) - e1:SetCondition(c72913666.sumcon) - c:RegisterEffect(e1) - --turn set - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(72913666,0)) - e2:SetCategory(CATEGORY_POSITION) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetTarget(c72913666.postg) - e2:SetOperation(c72913666.posop) - c:RegisterEffect(e2) - --damage - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(72913666,1)) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e3:SetCategory(CATEGORY_DAMAGE) - e3:SetCode(EVENT_FLIP) - e3:SetCountLimit(1,72913666) - e3:SetTarget(c72913666.damtg) - e3:SetOperation(c72913666.damop) - c:RegisterEffect(e3) -end -function c72913666.sfilter(c) - return c:IsFaceup() and c:IsSetCard(0x8d) -end -function c72913666.sumcon(e) - return not Duel.IsExistingMatchingCard(c72913666.sfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) -end -function c72913666.postg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsCanTurnSet() and c:GetFlagEffect(72913666)==0 end - c:RegisterFlagEffect(72913666,RESET_EVENT+0x1fc0000+RESET_PHASE+PHASE_END,0,1) - Duel.SetOperationInfo(0,CATEGORY_POSITION,c,1,0,0) -end -function c72913666.posop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - Duel.ChangePosition(c,POS_FACEDOWN_DEFENCE) - end -end -function c72913666.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local ct=Duel.GetMatchingGroupCount(Card.IsFacedown,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(ct*100) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,0,0,1-tp,ct*100) -end -function c72913666.damop(e,tp,eg,ep,ev,re,r,rp) - local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) - local ct=Duel.GetMatchingGroupCount(Card.IsFacedown,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) - Duel.Damage(p,ct*100,REASON_EFFECT) -end diff --git a/script/c72926163.lua b/script/c72926163.lua deleted file mode 100644 index 7ff125546a..0000000000 --- a/script/c72926163.lua +++ /dev/null @@ -1,62 +0,0 @@ ---E・HERO ネオス・ナイト -function c72926163.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcCodeFun(c,89943723,aux.FilterBoolFunction(Card.IsRace,RACE_WARRIOR),1,true,true) - --spsummon condition - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(aux.fuslimit) - c:RegisterEffect(e1) - --atk - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_MATERIAL_CHECK) - e2:SetValue(c72926163.valcheck) - c:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - e3:SetCondition(c72926163.atkcon) - e3:SetOperation(c72926163.atkop) - e3:SetLabelObject(e2) - c:RegisterEffect(e3) - --multiatk - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetCode(EFFECT_EXTRA_ATTACK) - e4:SetValue(1) - c:RegisterEffect(e4) - --no battle damage - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_SINGLE) - e5:SetCode(EFFECT_NO_BATTLE_DAMAGE) - c:RegisterEffect(e5) -end -function c72926163.valcheck(e,c) - local g=c:GetMaterial() - local atk=-1 - local tc=g:GetFirst() - if tc:IsCode(89943723) or tc:IsHasEffect(EFFECT_FUSION_SUBSTITUTE) then tc=g:GetNext() end - if not tc:IsCode(89943723) then - atk=tc:GetTextAttack()/2 - end - e:SetLabel(atk) -end -function c72926163.atkcon(e,tp,eg,ep,ev,re,r,rp) - return bit.band(e:GetHandler():GetSummonType(),SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION -end -function c72926163.atkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local atk=e:GetLabelObject():GetLabel() - if atk>0 then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(atk) - e1:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e1) - end -end diff --git a/script/c72930878.lua b/script/c72930878.lua deleted file mode 100644 index fdb571b2f5..0000000000 --- a/script/c72930878.lua +++ /dev/null @@ -1,43 +0,0 @@ ---ブラック・ソニック -function c72930878.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_REMOVE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetCondition(c72930878.condition) - e1:SetTarget(c72930878.target) - e1:SetOperation(c72930878.activate) - c:RegisterEffect(e1) - --act in hand - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_TRAP_ACT_IN_HAND) - e2:SetCondition(c72930878.handcon) - c:RegisterEffect(e2) -end -function c72930878.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x33) -end -function c72930878.handcon(e) - local g=Duel.GetFieldGroup(e:GetHandlerPlayer(),LOCATION_MZONE,0) - return g:GetCount()==3 and g:IsExists(c72930878.cfilter,3,nil) -end -function c72930878.condition(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetAttackTarget() - return tc and tc:IsFaceup() and tc:IsControler(tp) and tc:IsSetCard(0x33) -end -function c72930878.filter(c) - return c:IsPosition(POS_FACEUP_ATTACK) and c:IsAbleToRemove() -end -function c72930878.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c72930878.filter,tp,0,LOCATION_MZONE,1,nil) end - local g=Duel.GetMatchingGroup(c72930878.filter,tp,0,LOCATION_MZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,0) -end -function c72930878.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c72930878.filter,tp,0,LOCATION_MZONE,nil) - if g:GetCount()>0 then - Duel.Remove(g,POS_FACEUP,REASON_EFFECT) - end -end diff --git a/script/c72932673.lua b/script/c72932673.lua deleted file mode 100644 index 984f0f2deb..0000000000 --- a/script/c72932673.lua +++ /dev/null @@ -1,60 +0,0 @@ ---アビスケイル-ミヅチ -function c72932673.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c72932673.target) - e1:SetOperation(c72932673.operation) - c:RegisterEffect(e1) - --Atk up - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(800) - c:RegisterEffect(e2) - --Equip limit - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_EQUIP_LIMIT) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e3:SetValue(c72932673.eqlimit) - c:RegisterEffect(e3) - --negate - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e4:SetCode(EVENT_CHAIN_SOLVING) - e4:SetRange(LOCATION_SZONE) - e4:SetCondition(c72932673.negcon) - e4:SetOperation(c72932673.negop) - c:RegisterEffect(e4) -end -function c72932673.eqlimit(e,c) - return c:IsSetCard(0x74) -end -function c72932673.filter(c) - return c:IsFaceup() and c:IsSetCard(0x74) -end -function c72932673.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c72932673.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c72932673.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c72932673.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c72932673.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,e:GetHandler(),tc) - end -end -function c72932673.negcon(e,tp,eg,ep,ev,re,r,rp) - return rp~=tp and Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)==LOCATION_SZONE - and re:IsActiveType(TYPE_SPELL) and Duel.IsChainDisablable(ev) -end -function c72932673.negop(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateEffect(ev) - Duel.SendtoGrave(e:GetHandler(),REASON_EFFECT) -end diff --git a/script/c72959823.lua b/script/c72959823.lua deleted file mode 100644 index c6dea52fd7..0000000000 --- a/script/c72959823.lua +++ /dev/null @@ -1,33 +0,0 @@ ---重装機甲 パンツァードラゴン -function c72959823.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcFun2(c,aux.FilterBoolFunction(Card.IsRace,RACE_MACHINE),aux.FilterBoolFunction(Card.IsRace,RACE_DRAGON),true) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(72959823,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCondition(c72959823.descon) - e1:SetTarget(c72959823.destg) - e1:SetOperation(c72959823.desop) - c:RegisterEffect(e1) -end -function c72959823.descon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsReason(REASON_DESTROY) -end -function c72959823.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsDestructable() end - if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c72959823.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c72989439.lua b/script/c72989439.lua deleted file mode 100644 index e4c151d3dc..0000000000 --- a/script/c72989439.lua +++ /dev/null @@ -1,85 +0,0 @@ ---カオス・ソルジャー -開闢の使者- -function c72989439.initial_effect(c) - c:EnableReviveLimit() - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(72989439,0)) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c72989439.spcon) - e1:SetOperation(c72989439.spop) - c:RegisterEffect(e1) - --remove - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(72989439,1)) - e2:SetCategory(CATEGORY_REMOVE) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetCountLimit(1) - e2:SetRange(LOCATION_MZONE) - e2:SetCost(c72989439.rmcost) - e2:SetTarget(c72989439.rmtg) - e2:SetOperation(c72989439.rmop) - c:RegisterEffect(e2) - --chain attack - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(72989439,2)) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_BATTLED) - e3:SetCondition(c72989439.atcon) - e3:SetOperation(c72989439.atop) - c:RegisterEffect(e3) -end -function c72989439.spfilter(c,att) - return c:IsAttribute(att) and c:IsAbleToRemoveAsCost() -end -function c72989439.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c72989439.spfilter,tp,LOCATION_GRAVE,0,1,nil,ATTRIBUTE_LIGHT) - and Duel.IsExistingMatchingCard(c72989439.spfilter,tp,LOCATION_GRAVE,0,1,nil,ATTRIBUTE_DARK) -end -function c72989439.spop(e,tp,eg,ep,ev,re,r,rp,c) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g1=Duel.SelectMatchingCard(tp,c72989439.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,ATTRIBUTE_LIGHT) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g2=Duel.SelectMatchingCard(tp,c72989439.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,ATTRIBUTE_DARK) - g1:Merge(g2) - Duel.Remove(g1,POS_FACEUP,REASON_COST) -end -function c72989439.rmcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:GetAttackAnnouncedCount()==0 end - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_OATH) - e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - c:RegisterEffect(e1,true) - c:RegisterFlagEffect(72989439,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) -end -function c72989439.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:GetLocation()==LOCATION_MZONE and chkc:IsAbleToRemove() end - if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) -end -function c72989439.rmop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) - end -end -function c72989439.atcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local bc=c:GetBattleTarget() - return bc and bc:IsStatus(STATUS_BATTLE_DESTROYED) and c:GetFlagEffect(72989439)==0 - and c:IsChainAttackable() and c:IsStatus(STATUS_OPPO_BATTLE) -end -function c72989439.atop(e,tp,eg,ep,ev,re,r,rp) - Duel.ChainAttack() -end diff --git a/script/c72992744.lua b/script/c72992744.lua deleted file mode 100644 index 867239d682..0000000000 --- a/script/c72992744.lua +++ /dev/null @@ -1,21 +0,0 @@ ---ジェスター・ロード -function c72992744.initial_effect(c) - -- - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c72992744.atkcon) - e1:SetValue(c72992744.atkval) - c:RegisterEffect(e1) -end -function c72992744.atkcon(e) - return not Duel.IsExistingMatchingCard(nil,0,LOCATION_MZONE,LOCATION_MZONE,1,e:GetHandler()) -end -function c72992744.filter(c) - return c:GetSequence()<5 -end -function c72992744.atkval(e,c) - return Duel.GetMatchingGroupCount(c72992744.filter,0,LOCATION_SZONE,LOCATION_SZONE,nil)*1000 -end diff --git a/script/c73001017.lua b/script/c73001017.lua deleted file mode 100644 index c55ee30ca4..0000000000 --- a/script/c73001017.lua +++ /dev/null @@ -1,50 +0,0 @@ ---シルフィード -function c73001017.initial_effect(c) - c:EnableReviveLimit() - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c73001017.spcon) - e1:SetOperation(c73001017.spop) - c:RegisterEffect(e1) - --handes - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(73001017,0)) - e2:SetCategory(CATEGORY_HANDES) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_BATTLE_DESTROYED) - e2:SetCondition(c73001017.condition) - e2:SetTarget(c73001017.target) - e2:SetOperation(c73001017.operation) - c:RegisterEffect(e2) -end -function c73001017.spfilter(c) - return c:IsAttribute(ATTRIBUTE_WIND) and c:IsAbleToRemoveAsCost() -end -function c73001017.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c73001017.spfilter,tp,LOCATION_GRAVE,0,1,nil) -end -function c73001017.spop(e,tp,eg,ep,ev,re,r,rp,c) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c73001017.spfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c73001017.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) -end -function c73001017.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_HANDES,0,0,1-tp,1) -end -function c73001017.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND) - if g:GetCount()==0 then return end - local sg=g:RandomSelect(1-tp,1) - Duel.SendtoGrave(sg,REASON_DISCARD+REASON_EFFECT) -end diff --git a/script/c73018302.lua b/script/c73018302.lua deleted file mode 100644 index f3f4256e4f..0000000000 --- a/script/c73018302.lua +++ /dev/null @@ -1,49 +0,0 @@ ---黒羽を狩る者 -function c73018302.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(73018302,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c73018302.descon) - e1:SetCost(c73018302.descost) - e1:SetTarget(c73018302.destg) - e1:SetOperation(c73018302.desop) - c:RegisterEffect(e1) -end -function c73018302.check(tp) - local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil) - if g:GetCount()<2 then return false end - local rac=g:GetFirst():GetRace() - local tc=g:GetNext() - while tc do - if tc:GetRace()~=rac then return false end - tc=g:GetNext() - end - return true -end -function c73018302.descon(e,tp,eg,ep,ev,re,r,rp) - return c73018302.check(tp) -end -function c73018302.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,Card.IsAbleToGraveAsCost,1,1,REASON_COST) -end -function c73018302.filter(c) - return c:IsFaceup() and c:IsDestructable() -end -function c73018302.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and c73018302.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c73018302.filter,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c73018302.filter,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c73018302.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) and c73018302.check(tp) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c73026394.lua b/script/c73026394.lua deleted file mode 100644 index 43ab68fb07..0000000000 --- a/script/c73026394.lua +++ /dev/null @@ -1,29 +0,0 @@ ---フュージョン・ガード -function c73026394.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_NEGATE+CATEGORY_TOGRAVE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_CHAINING) - e1:SetCondition(c73026394.condition) - e1:SetTarget(c73026394.target) - e1:SetOperation(c73026394.activate) - c:RegisterEffect(e1) -end -function c73026394.condition(e,tp,eg,ep,ev,re,r,rp) - local ex=Duel.GetOperationInfo(ev,CATEGORY_DAMAGE) - return ex and (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE)) and Duel.IsChainNegatable(ev) -end -function c73026394.filter(c) - return c:IsType(TYPE_FUSION) and c:IsAbleToGrave() -end -function c73026394.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c73026394.filter,tp,LOCATION_EXTRA,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_EXTRA) -end -function c73026394.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateActivation(ev) - local g=Duel.GetMatchingGroup(c73026394.filter,tp,LOCATION_EXTRA,0,nil):RandomSelect(tp,1) - Duel.SendtoGrave(g,REASON_EFFECT) -end diff --git a/script/c73040500.lua b/script/c73040500.lua deleted file mode 100644 index dfc7be9999..0000000000 --- a/script/c73040500.lua +++ /dev/null @@ -1,18 +0,0 @@ ---魔轟神ウルストス -function c73040500.initial_effect(c) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetCondition(c73040500.con) - e1:SetTarget(c73040500.tg) - e1:SetValue(400) - c:RegisterEffect(e1) -end -function c73040500.con(e) - return Duel.GetFieldGroupCount(e:GetHandler():GetControler(),LOCATION_HAND,0)<=2 -end -function c73040500.tg(e,c) - return c:IsFaceup() and c:IsSetCard(0x35) -end diff --git a/script/c7304544.lua b/script/c7304544.lua deleted file mode 100644 index df9eaa8363..0000000000 --- a/script/c7304544.lua +++ /dev/null @@ -1,45 +0,0 @@ ---ナチュル・パイナポー -function c7304544.initial_effect(c) - --Change race - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CHANGE_RACE) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetValue(RACE_PLANT) - c:RegisterEffect(e1) - --Special Summon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(7304544,0)) - e2:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_FIELD) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) - e2:SetRange(LOCATION_GRAVE) - e2:SetCountLimit(1) - e2:SetCondition(c7304544.condition) - e2:SetTarget(c7304544.target) - e2:SetOperation(c7304544.operation) - c:RegisterEffect(e2) -end -function c7304544.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) or (c:GetCode()==7304544 and c:IsFaceup()) -end -function c7304544.filter2(c) - return c:IsType(TYPE_MONSTER) and not c:IsRace(RACE_PLANT+RACE_BEAST) -end -function c7304544.condition(e,tp,eg,ep,ev,re,r,rp) - return tp==Duel.GetTurnPlayer() and not Duel.IsExistingMatchingCard(c7304544.filter,tp,LOCATION_ONFIELD,0,1,nil) - and not Duel.IsExistingMatchingCard(c7304544.filter2,tp,LOCATION_GRAVE,0,1,nil) -end -function c7304544.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c7304544.operation(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) - and not Duel.IsExistingMatchingCard(c7304544.filter,tp,LOCATION_ONFIELD,0,1,nil) - and not Duel.IsExistingMatchingCard(c7304544.filter2,tp,LOCATION_GRAVE,0,1,nil) then - Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c73048641.lua b/script/c73048641.lua deleted file mode 100644 index 0d90fdcc88..0000000000 --- a/script/c73048641.lua +++ /dev/null @@ -1,41 +0,0 @@ ---ハーフ・シャット -function c73048641.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c73048641.condition) - e1:SetTarget(c73048641.target) - e1:SetOperation(c73048641.activate) - c:RegisterEffect(e1) -end -function c73048641.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end -function c73048641.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) -end -function c73048641.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - local atk=tc:GetAttack() - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - e1:SetValue(atk/2) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - e2:SetValue(1) - tc:RegisterEffect(e2) - end -end diff --git a/script/c73061465.lua b/script/c73061465.lua deleted file mode 100644 index 79dff53bd7..0000000000 --- a/script/c73061465.lua +++ /dev/null @@ -1,37 +0,0 @@ ---氷結界の封魔団 -function c73061465.initial_effect(c) - --act limit - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(73061465,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCost(c73061465.cost) - e1:SetOperation(c73061465.operation) - c:RegisterEffect(e1) -end -function c73061465.cfilter(c) - return c:IsSetCard(0x2f) and c:IsType(TYPE_MONSTER) and c:IsAbleToGraveAsCost() -end -function c73061465.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c73061465.cfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c73061465.cfilter,tp,LOCATION_HAND,0,1,1,nil) - Duel.SendtoGrave(g,REASON_COST) -end -function c73061465.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFacedown() or not c:IsRelateToEffect(e) then return end - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(1,1) - e1:SetValue(c73061465.tgval) - e1:SetReset(RESET_EVENT+0x1ff0000+RESET_PHASE+PHASE_END,3) - c:RegisterEffect(e1) -end -function c73061465.tgval(e,re,rp) - return re:IsActiveType(TYPE_SPELL) and re:IsHasType(EFFECT_TYPE_ACTIVATE) -end diff --git a/script/c73079365.lua b/script/c73079365.lua deleted file mode 100644 index ca4afed160..0000000000 --- a/script/c73079365.lua +++ /dev/null @@ -1,35 +0,0 @@ ---突風 -function c73079365.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCondition(c73079365.condition) - e1:SetTarget(c73079365.target) - e1:SetOperation(c73079365.activate) - c:RegisterEffect(e1) -end -function c73079365.filter(c,tp) - return c:IsType(TYPE_SPELL) and c:IsPreviousLocation(LOCATION_SZONE) and c:GetPreviousControler()==tp - and bit.band(c:GetReason(),0x41)==0x41 -end -function c73079365.condition(e,tp,eg,ep,ev,re,r,rp) - return rp==1-tp and eg:IsExists(c73079365.filter,1,nil,tp) -end -function c73079365.desfilter(c) - return c:IsDestructable() and c:IsType(TYPE_SPELL+TYPE_TRAP) -end -function c73079365.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and c73079365.desfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c73079365.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c73079365.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c73079365.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c73125233.lua b/script/c73125233.lua deleted file mode 100644 index 2b35d2020c..0000000000 --- a/script/c73125233.lua +++ /dev/null @@ -1,33 +0,0 @@ ---風帝ライザー -function c73125233.initial_effect(c) - --to deck - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(73125233,0)) - e1:SetCategory(CATEGORY_TODECK) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetCondition(c73125233.condition) - e1:SetTarget(c73125233.target) - e1:SetOperation(c73125233.operation) - c:RegisterEffect(e1) -end -function c73125233.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_ADVANCE -end -function c73125233.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectTarget(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - local tc=g:GetFirst() - if tc and tc:IsAbleToDeck() then - Duel.SetOperationInfo(0,CATEGORY_TODECK,tc,1,0,0) - end -end -function c73125233.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.SendtoDeck(tc,nil,0,REASON_EFFECT) - end -end diff --git a/script/c73130445.lua b/script/c73130445.lua deleted file mode 100644 index c8650202e0..0000000000 --- a/script/c73130445.lua +++ /dev/null @@ -1,63 +0,0 @@ ---EMリザードロー -function c73130445.initial_effect(c) - --pendulum summon - aux.AddPendulumProcedure(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_DESTROY+CATEGORY_DRAW) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_PZONE) - e2:SetCountLimit(1,73130445) - e2:SetTarget(c73130445.destg) - e2:SetOperation(c73130445.desop) - c:RegisterEffect(e2) - --draw - local e3=Effect.CreateEffect(c) - e3:SetCategory(CATEGORY_DRAW) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetRange(LOCATION_MZONE) - e3:SetCode(EVENT_DESTROYED) - e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e3:SetCountLimit(1,73130446) - e3:SetCondition(c73130445.drcon) - e3:SetTarget(c73130445.drtg) - e3:SetOperation(c73130445.drop) - c:RegisterEffect(e3) -end -function c73130445.destg(e,tp,eg,ep,ev,re,r,rp,chk) - local seq=e:GetHandler():GetSequence() - local tc=Duel.GetFieldCard(tp,LOCATION_SZONE,13-seq) - if chk==0 then return Duel.IsPlayerCanDraw(tp,1) - and tc and tc:IsSetCard(0x9f) and not tc:IsCode(73130445) and e:GetHandler():IsDestructable() end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0) -end -function c73130445.desop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - if Duel.Destroy(e:GetHandler(),REASON_EFFECT)~=0 then - Duel.Draw(tp,1,REASON_EFFECT) - end -end -function c73130445.cfilter(c,tp) - return c:IsPreviousPosition(POS_FACEUP) and c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_MZONE) - and (c:IsReason(REASON_EFFECT) or (c:IsReason(REASON_BATTLE) and Duel.GetAttacker():IsControler(1-tp))) -end -function c73130445.drcon(e,tp,eg,ep,ev,re,r,rp) - return rp~=tp and eg:IsExists(c73130445.cfilter,1,nil,tp) -end -function c73130445.filter(c) - return c:IsFaceup() and c:IsSetCard(0x9f) -end -function c73130445.drtg(e,tp,eg,ep,ev,re,r,rp,chk) - local ct=Duel.GetMatchingGroupCount(c73130445.filter,tp,LOCATION_MZONE,0,nil) - if chk==0 then return ct>0 and Duel.IsPlayerCanDraw(tp,ct) end - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,ct) -end -function c73130445.drop(e,tp,eg,ep,ev,re,r,rp) - local ct=Duel.GetMatchingGroupCount(c73130445.filter,tp,LOCATION_MZONE,0,nil) - Duel.Draw(tp,ct,REASON_EFFECT) -end diff --git a/script/c73134081.lua b/script/c73134081.lua deleted file mode 100644 index 101fabd87e..0000000000 --- a/script/c73134081.lua +++ /dev/null @@ -1,22 +0,0 @@ ---火あぶりの刑 -function c73134081.initial_effect(c) - --damage - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c73134081.damtg) - e1:SetOperation(c73134081.damop) - c:RegisterEffect(e1) -end -function c73134081.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(600) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,600) -end -function c73134081.damop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c73136204.lua b/script/c73136204.lua deleted file mode 100644 index 1af784db26..0000000000 --- a/script/c73136204.lua +++ /dev/null @@ -1,79 +0,0 @@ ---森羅の渡し守 ロータス -function c73136204.initial_effect(c) - --deck - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(73136204,0)) - e1:SetCategory(CATEGORY_TOGRAVE) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetTarget(c73136204.target) - e1:SetOperation(c73136204.operation) - c:RegisterEffect(e1) - --todeck - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(73136204,2)) - e2:SetCategory(CATEGORY_TODECK) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetCondition(c73136204.tdcon) - e2:SetTarget(c73136204.tdtg) - e2:SetOperation(c73136204.tdop) - c:RegisterEffect(e2) -end -function c73136204.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local ac=Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD) - return ac>0 and Duel.IsPlayerCanDiscardDeck(tp,ac) - end -end -function c73136204.operation(e,tp,eg,ep,ev,re,r,rp) - local ac=Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD) - if ac==0 or not Duel.IsPlayerCanDiscardDeck(tp,ac) then return end - Duel.ConfirmDecktop(tp,ac) - local g=Duel.GetDecktopGroup(tp,ac) - local sg=g:Filter(Card.IsRace,nil,RACE_PLANT) - if sg:GetCount()>0 then - Duel.DisableShuffleCheck() - Duel.SendtoGrave(sg,REASON_EFFECT+REASON_REVEAL) - end - ac=ac-sg:GetCount() - if ac>0 then - Duel.SortDecktop(tp,tp,ac) - for i=1,ac do - local mg=Duel.GetDecktopGroup(tp,1) - Duel.MoveSequence(mg:GetFirst(),1) - end - end -end -function c73136204.tdcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsPreviousLocation(LOCATION_DECK) and - (c:IsReason(REASON_REVEAL) or c:GetPreviousPosition()==POS_FACEUP_DEFENCE or Duel.IsPlayerAffectedByEffect(tp,EFFECT_REVERSE_DECK)) -end -function c73136204.filter(c) - return c:IsSetCard(0x90) and not c:IsCode(73136204) and c:IsAbleToDeck() -end -function c73136204.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c73136204.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c73136204.filter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectTarget(tp,c73136204.filter,tp,LOCATION_GRAVE,0,1,5,nil) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0) -end -function c73136204.tdop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local sg=g:Filter(Card.IsRelateToEffect,nil,e) - if sg:GetCount()>0 then - Duel.SendtoDeck(sg,nil,0,REASON_EFFECT) - local og=Duel.GetOperatedGroup() - local ct=og:FilterCount(Card.IsLocation,nil,LOCATION_DECK) - if ct==0 then return end - Duel.SortDecktop(tp,tp,ct) - for i=1,ct do - local mg=Duel.GetDecktopGroup(tp,1) - Duel.MoveSequence(mg:GetFirst(),1) - end - end -end diff --git a/script/c73146473.lua b/script/c73146473.lua deleted file mode 100644 index 2d78c1783d..0000000000 --- a/script/c73146473.lua +++ /dev/null @@ -1,62 +0,0 @@ ---クロス・ポーター -function c73146473.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(73146473,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetTarget(c73146473.sptg) - e1:SetOperation(c73146473.spop) - c:RegisterEffect(e1) - --search - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(73146473,1)) - e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetTarget(c73146473.thtg) - e2:SetOperation(c73146473.thop) - c:RegisterEffect(e2) -end -function c73146473.filter(c,e,tp) - return c:IsSetCard(0x1f) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c73146473.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsExistingTarget(nil,tp,LOCATION_MZONE,0,1,nil) - and Duel.IsExistingMatchingCard(c73146473.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectTarget(tp,nil,tp,LOCATION_MZONE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c73146473.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if not tc:IsRelateToEffect(e) then return end - Duel.SendtoGrave(tc,REASON_EFFECT) - if not tc:IsLocation(LOCATION_GRAVE) or Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c73146473.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.BreakEffect() - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end -function c73146473.sfilter(c) - return c:IsSetCard(0x1f) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() -end -function c73146473.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c73146473.sfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c73146473.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c73146473.sfilter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c73148972.lua b/script/c73148972.lua deleted file mode 100644 index bfa83b1df6..0000000000 --- a/script/c73148972.lua +++ /dev/null @@ -1,27 +0,0 @@ ---無情の抹殺 -function c73148972.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOGRAVE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c73148972.target) - e1:SetOperation(c73148972.activate) - c:RegisterEffect(e1) -end -function c73148972.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) end - if chk==0 then return Duel.IsExistingTarget(nil,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectTarget(tp,nil,tp,LOCATION_MZONE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,0,0) -end -function c73148972.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsControler(tp) then - Duel.SendtoGrave(tc,REASON_EFFECT) - local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND):RandomSelect(tp,1) - Duel.SendtoGrave(g,REASON_EFFECT) - end -end diff --git a/script/c73176465.lua b/script/c73176465.lua deleted file mode 100644 index 078599299b..0000000000 --- a/script/c73176465.lua +++ /dev/null @@ -1,68 +0,0 @@ ---ライトロード・アーチャー フェリス -function c73176465.initial_effect(c) - c:EnableUnsummonable() - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(73176465,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCondition(c73176465.condtion) - e1:SetTarget(c73176465.target) - e1:SetOperation(c73176465.operation) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(73176465,1)) - e2:SetCategory(CATEGORY_DESTROY+CATEGORY_DECKDES) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetRange(LOCATION_MZONE) - e2:SetCost(c73176465.descost) - e2:SetTarget(c73176465.destg) - e2:SetOperation(c73176465.desop) - c:RegisterEffect(e2) - --splimit - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e3:SetCode(EFFECT_SPSUMMON_CONDITION) - e3:SetValue(c73176465.splimit) - c:RegisterEffect(e3) -end -function c73176465.splimit(e,se,sp,st) - return se:IsHasType(EFFECT_TYPE_ACTIONS) -end -function c73176465.condtion(e,tp,eg,ep,ev,re,r,rp) - return bit.band(r,REASON_EFFECT)~=0 and re:IsActiveType(TYPE_MONSTER) - and e:GetHandler():IsPreviousLocation(LOCATION_DECK) -end -function c73176465.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c73176465.operation(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP) - end -end -function c73176465.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end -function c73176465.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsDestructable() end - if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,3) - and Duel.IsExistingTarget(Card.IsDestructable,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_DECKDES,0,0,tp,3) -end -function c73176465.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)~=0 then - Duel.BreakEffect() - Duel.DiscardDeck(tp,3,REASON_EFFECT) - end -end diff --git a/script/c73178098.lua b/script/c73178098.lua deleted file mode 100644 index 5aabb90cf4..0000000000 --- a/script/c73178098.lua +++ /dev/null @@ -1,29 +0,0 @@ ---虚栄巨影 -function c73178098.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetTarget(c73178098.target) - e1:SetOperation(c73178098.activate) - c:RegisterEffect(e1) -end -function c73178098.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) -end -function c73178098.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_BATTLE) - e1:SetValue(1000) - tc:RegisterEffect(e1) - end -end diff --git a/script/c73199638.lua b/script/c73199638.lua deleted file mode 100644 index bb56717c51..0000000000 --- a/script/c73199638.lua +++ /dev/null @@ -1,50 +0,0 @@ ---海皇の咆哮 -function c73199638.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_END_PHASE) - e1:SetCost(c73199638.cost) - e1:SetTarget(c73199638.target) - e1:SetOperation(c73199638.activate) - c:RegisterEffect(e1) -end -function c73199638.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_SPSUMMON)==0 end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) - e1:SetTargetRange(1,0) - e1:SetLabelObject(e) - e1:SetTarget(c73199638.sumlimit) - Duel.RegisterEffect(e1,tp) -end -function c73199638.sumlimit(e,c,sump,sumtype,sumpos,targetp,se) - return e:GetLabelObject()~=se -end -function c73199638.filter(c,e,tp) - return c:IsLevelBelow(3) and c:IsRace(RACE_SEASERPENT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c73199638.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c73199638.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>2 - and Duel.IsExistingTarget(c73199638.filter,tp,LOCATION_GRAVE,0,3,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c73199638.filter,tp,LOCATION_GRAVE,0,3,3,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,3,0,0) -end -function c73199638.rfilter(c,e,tp) - return c:IsRelateToEffect(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c73199638.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ft<=2 then return end - if g:FilterCount(c73199638.rfilter,nil,e,tp)~=3 then return end - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) -end diff --git a/script/c73206827.lua b/script/c73206827.lua deleted file mode 100644 index e2dfdfeeee..0000000000 --- a/script/c73206827.lua +++ /dev/null @@ -1,79 +0,0 @@ ---光の結界 -function c73206827.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --coin - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(73206827,0)) - e2:SetCategory(CATEGORY_COIN) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetRange(LOCATION_SZONE) - e2:SetCountLimit(1) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) - e2:SetCondition(c73206827.coincon) - e2:SetTarget(c73206827.cointg) - e2:SetOperation(c73206827.coinop) - c:RegisterEffect(e2) - -- - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetCode(73206827) - e3:SetRange(LOCATION_SZONE) - e3:SetTargetRange(LOCATION_MZONE,0) - e3:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x5)) - e3:SetCondition(c73206827.effectcon) - c:RegisterEffect(e3) - -- - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(73206827,1)) - e4:SetCategory(CATEGORY_RECOVER) - e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e4:SetRange(LOCATION_SZONE) - e4:SetCode(EVENT_BATTLE_DESTROYING) - e4:SetCondition(c73206827.reccon) - e4:SetTarget(c73206827.rectg) - e4:SetOperation(c73206827.recop) - c:RegisterEffect(e4) -end -function c73206827.coincon(e,tp,eg,ep,ev,re,r,rp) - return tp==Duel.GetTurnPlayer() -end -function c73206827.cointg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_COIN,nil,0,tp,1) -end -function c73206827.coinop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) then return end - local res=Duel.TossCoin(tp,1) - if res==0 then - c:RegisterFlagEffect(73206828,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,0,2) - end -end -function c73206827.effectcon(e) - local c=e:GetHandler() - return c:GetFlagEffect(73206828)==0 or c:IsHasEffect(EFFECT_CANNOT_DISABLE) -end -function c73206827.reccon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local rc=eg:GetFirst() - return rc:IsRelateToBattle() and rc:IsSetCard(0x5) and rc:IsFaceup() and rc:IsControler(tp) - and (c:GetFlagEffect(73206828)==0 or c:IsHasEffect(EFFECT_CANNOT_DISABLE)) -end -function c73206827.rectg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local tc=eg:GetFirst():GetBattleTarget() - local atk=tc:GetBaseAttack() - if atk<0 then atk=0 end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(atk) - Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,atk) -end -function c73206827.recop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Recover(p,d,REASON_EFFECT) -end diff --git a/script/c73213494.lua b/script/c73213494.lua deleted file mode 100644 index 5a2731cd7b..0000000000 --- a/script/c73213494.lua +++ /dev/null @@ -1,71 +0,0 @@ ---彼岸の悪鬼 ハックルスパー -function c73213494.initial_effect(c) - --self destroy - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_SELF_DESTROY) - e1:SetCondition(c73213494.sdcon) - c:RegisterEffect(e1) - --Special Summon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(73213494,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_HAND) - e2:SetCountLimit(1,73213494) - e2:SetCondition(c73213494.sscon) - e2:SetTarget(c73213494.sstg) - e2:SetOperation(c73213494.ssop) - c:RegisterEffect(e2) - --to hand - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(73213494,1)) - e3:SetCategory(CATEGORY_TOHAND) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) - e3:SetCode(EVENT_TO_GRAVE) - e3:SetCountLimit(1,73213494) - e3:SetTarget(c73213494.thtg) - e3:SetOperation(c73213494.thop) - c:RegisterEffect(e3) -end -function c73213494.sdfilter(c) - return not c:IsFaceup() or not c:IsSetCard(0xb1) -end -function c73213494.sdcon(e) - return Duel.IsExistingMatchingCard(c73213494.sdfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) -end -function c73213494.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) -end -function c73213494.sscon(e,tp,eg,ep,ev,re,r,rp) - return not Duel.IsExistingMatchingCard(c73213494.filter,tp,LOCATION_ONFIELD,0,1,nil) -end -function c73213494.sstg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c73213494.ssop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP) - end -end -function c73213494.thfilter(c) - return c:IsFacedown() and c:IsAbleToHand() -end -function c73213494.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_SZONE) and c73213494.thfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c73213494.thfilter,tp,LOCATION_SZONE,LOCATION_SZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g=Duel.SelectTarget(tp,c73213494.thfilter,tp,LOCATION_SZONE,LOCATION_SZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c73213494.thop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFacedown() then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - end -end diff --git a/script/c73219648.lua b/script/c73219648.lua deleted file mode 100644 index e9638ad8b4..0000000000 --- a/script/c73219648.lua +++ /dev/null @@ -1,54 +0,0 @@ ---ヘルポーンデーモン -function c73219648.initial_effect(c) - --maintain - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCondition(c73219648.mtcon) - e1:SetOperation(c73219648.mtop) - c:RegisterEffect(e1) - --disable and destroy - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_CHAIN_SOLVING) - e2:SetRange(LOCATION_MZONE) - e2:SetOperation(c73219648.disop) - c:RegisterEffect(e2) - --cannot be battle target - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET) - e3:SetRange(LOCATION_MZONE) - e3:SetTargetRange(0,LOCATION_MZONE) - e3:SetValue(c73219648.atktg) - c:RegisterEffect(e3) -end -function c73219648.mtcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c73219648.mtop(e,tp,eg,ep,ev,re,r,rp) - if Duel.CheckLPCost(tp,500) then - Duel.PayLPCost(tp,500) - else - Duel.Destroy(e:GetHandler(),REASON_RULE) - end -end -function c73219648.disop(e,tp,eg,ep,ev,re,r,rp) - if ep==tp then return end - if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end - local tg=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) - if not tg or not tg:IsContains(e:GetHandler()) or not Duel.IsChainDisablable(ev) then return false end - local rc=re:GetHandler() - local dc=Duel.TossDice(tp,1) - if dc~=3 then return end - Duel.NegateEffect(ev) - if rc:IsRelateToEffect(re) then - Duel.Destroy(rc,REASON_EFFECT) - end -end -function c73219648.atktg(e,c) - return c:IsFaceup() and c:IsSetCard(0x45) and c:GetCode()~=73219648 -end diff --git a/script/c73262676.lua b/script/c73262676.lua deleted file mode 100644 index 8db8cfc0c0..0000000000 --- a/script/c73262676.lua +++ /dev/null @@ -1,36 +0,0 @@ ---「A」細胞散布爆弾 -function c73262676.initial_effect(c) - --counter - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_COUNTER+CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c73262676.target) - e1:SetOperation(c73262676.operation) - c:RegisterEffect(e1) -end -function c73262676.filter(c) - return c:IsFaceup() and c:IsSetCard(0xc) and c:GetLevel()>0 and c:IsDestructable() -end -function c73262676.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c73262676.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c73262676.filter,tp,LOCATION_MZONE,0,1,nil) - and Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c73262676.filter,tp,LOCATION_MZONE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c73262676.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - local lv=tc:GetLevel() - if Duel.Destroy(tc,REASON_EFFECT)==0 then return end - local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil) - if g:GetCount()==0 then return end - for i=1,lv do - local sg=g:Select(tp,1,1,nil) - sg:GetFirst():AddCounter(0xe,1) - end - end -end diff --git a/script/c73285669.lua b/script/c73285669.lua deleted file mode 100644 index 79e55f46dd..0000000000 --- a/script/c73285669.lua +++ /dev/null @@ -1,44 +0,0 @@ ---剣闘獣エセダリ -function c73285669.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcFunRep(c,aux.FilterBoolFunction(Card.IsSetCard,0x19),2,true) - --spsummon condition - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(c73285669.splimit) - c:RegisterEffect(e1) - --special summon rule - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_SPSUMMON_PROC) - e2:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e2:SetRange(LOCATION_EXTRA) - e2:SetCondition(c73285669.sprcon) - e2:SetOperation(c73285669.sprop) - c:RegisterEffect(e2) -end -function c73285669.splimit(e,se,sp,st) - return e:GetHandler():GetLocation()~=LOCATION_EXTRA -end -function c73285669.spfilter(c) - return c:IsSetCard(0x19) and c:IsCanBeFusionMaterial() and c:IsAbleToDeckOrExtraAsCost() -end -function c73285669.sprcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.GetLocationCount(tp,LOCATION_MZONE)>-2 - and Duel.IsExistingMatchingCard(c73285669.spfilter,tp,LOCATION_MZONE,0,2,nil) -end -function c73285669.sprop(e,tp,eg,ep,ev,re,r,rp,c) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectMatchingCard(tp,c73285669.spfilter,tp,LOCATION_MZONE,0,2,2,nil) - local tc=g:GetFirst() - while tc do - if not tc:IsFaceup() then Duel.ConfirmCards(1-tp,tc) end - tc=g:GetNext() - end - Duel.SendtoDeck(g,nil,2,REASON_COST) -end diff --git a/script/c73289035.lua b/script/c73289035.lua deleted file mode 100644 index a5e5e5a83a..0000000000 --- a/script/c73289035.lua +++ /dev/null @@ -1,78 +0,0 @@ ---武神帝-ツクヨミ -function c73289035.initial_effect(c) - c:SetUniqueOnField(1,0,73289035) - --xyz summon - aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_LIGHT),4,2) - c:EnableReviveLimit() - --draw - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(73289035,0)) - e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCost(c73289035.cost) - e1:SetTarget(c73289035.target) - e1:SetOperation(c73289035.operation) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e2:SetCondition(c73289035.spcon) - e2:SetTarget(c73289035.sptg) - e2:SetOperation(c73289035.spop) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EVENT_REMOVE) - c:RegisterEffect(e3) - local e4=e2:Clone() - e4:SetCode(EVENT_TO_DECK) - c:RegisterEffect(e4) -end -function c73289035.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c73289035.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp,2) and Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)>0 end - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2) - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,0,LOCATION_HAND) -end -function c73289035.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetFieldGroup(tp,LOCATION_HAND,0) - if g:GetCount()>0 then - Duel.SendtoGrave(g,REASON_EFFECT) - Duel.Draw(tp,2,REASON_EFFECT) - end -end -function c73289035.spcon(e,tp,eg,ep,ev,re,r,rp) - local ct=e:GetHandler():GetOverlayCount() - e:SetLabel(ct) - return rp~=tp and bit.band(r,REASON_EFFECT)~=0 and ct>0 - and e:GetHandler():IsPreviousPosition(POS_FACEUP) and e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) -end -function c73289035.spfilter(c,e,tp) - return c:GetLevel()==4 and c:IsSetCard(0x88) and c:IsRace(RACE_BEASTWARRIOR) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c73289035.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c73289035.spfilter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c73289035.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - local ct=e:GetLabel() - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ct>ft then ct=ft end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c73289035.spfilter,tp,LOCATION_GRAVE,0,1,ct,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,g:GetCount(),0,0) -end -function c73289035.spop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ft0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c73318863.lua b/script/c73318863.lua deleted file mode 100644 index d7dd63f073..0000000000 --- a/script/c73318863.lua +++ /dev/null @@ -1,46 +0,0 @@ ---光霊使いライナ -function c73318863.initial_effect(c) - --flip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(73318863,0)) - e1:SetCategory(CATEGORY_CONTROL) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP) - e1:SetTarget(c73318863.target) - e1:SetOperation(c73318863.operation) - c:RegisterEffect(e1) -end -function c73318863.filter(c) - return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsControlerCanBeChanged() -end -function c73318863.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c73318863.filter(chkc) end - if chk==0 then return true end - if not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) - local g=Duel.SelectTarget(tp,c73318863.filter,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,g:GetCount(),0,0) - end -end -function c73318863.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and c:IsFaceup() and tc and tc:IsRelateToEffect(e) and c73318863.filter(tc) then - c:SetCardTarget(tc) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_CONTROL) - e1:SetProperty(EFFECT_FLAG_OWNER_RELATE+EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetValue(tp) - e1:SetLabel(0) - e1:SetReset(RESET_EVENT+0x1fc0000) - e1:SetCondition(c73318863.ctcon) - tc:RegisterEffect(e1) - end -end -function c73318863.ctcon(e) - local c=e:GetOwner() - local h=e:GetHandler() - return h:IsAttribute(ATTRIBUTE_LIGHT) and c:IsHasCardTarget(h) -end diff --git a/script/c73333463.lua b/script/c73333463.lua deleted file mode 100644 index 76f8c64b2d..0000000000 --- a/script/c73333463.lua +++ /dev/null @@ -1,45 +0,0 @@ ---アーマロイドガイデンゴー -function c73333463.initial_effect(c) - --summon success - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(73333463,0)) - e1:SetCategory(CATEGORY_REMOVE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetCondition(c73333463.condition) - e1:SetTarget(c73333463.target) - e1:SetOperation(c73333463.operation) - c:RegisterEffect(e1) - --tribute check - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_MATERIAL_CHECK) - e2:SetValue(c73333463.valcheck) - e2:SetLabelObject(e1) - c:RegisterEffect(e2) -end -function c73333463.valcheck(e,c) - local g=c:GetMaterial() - if g:IsExists(Card.IsSetCard,1,nil,0x16) then - e:GetLabelObject():SetLabel(1) - else - e:GetLabelObject():SetLabel(0) - end -end -function c73333463.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_ADVANCE and e:GetLabel()==1 -end -function c73333463.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToRemove() -end -function c73333463.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local g=Duel.GetMatchingGroup(c73333463.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,0) -end -function c73333463.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c73333463.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) - if g:GetCount()>0 then - Duel.Remove(g,POS_FACEUP,REASON_EFFECT) - end -end diff --git a/script/c73347079.lua b/script/c73347079.lua deleted file mode 100644 index be548d8df0..0000000000 --- a/script/c73347079.lua +++ /dev/null @@ -1,52 +0,0 @@ ---RR-フォース・ストリクス -function c73347079.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,4,2) - c:EnableReviveLimit() - --atk/def - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(c73347079.adval) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_UPDATE_DEFENCE) - c:RegisterEffect(e2) - --search - local e3=Effect.CreateEffect(c) - e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1) - e3:SetCost(c73347079.thcost) - e3:SetTarget(c73347079.thtg) - e3:SetOperation(c73347079.thop) - c:RegisterEffect(e3) -end -function c73347079.filter(c) - return c:IsFaceup() and c:IsRace(RACE_WINDBEAST) -end -function c73347079.adval(e,c) - return Duel.GetMatchingGroupCount(c73347079.filter,c:GetControler(),LOCATION_MZONE,0,c)*500 -end -function c73347079.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c73347079.thfilter(c) - return c:GetLevel()==4 and c:IsRace(RACE_WINDBEAST) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsAbleToHand() -end -function c73347079.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c73347079.thfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c73347079.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c73347079.thfilter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c73356503.lua b/script/c73356503.lua deleted file mode 100644 index a4c4552d4b..0000000000 --- a/script/c73356503.lua +++ /dev/null @@ -1,15 +0,0 @@ ---烈風の結界像 -function c73356503.initial_effect(c) - --disable spsummon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetTargetRange(1,1) - e1:SetTarget(c73356503.sumlimit) - c:RegisterEffect(e1) -end -function c73356503.sumlimit(e,c,sump,sumtype,sumpos,targetp) - return c:GetAttribute()~=ATTRIBUTE_WIND -end diff --git a/script/c73359475.lua b/script/c73359475.lua deleted file mode 100644 index a4cd1be5ca..0000000000 --- a/script/c73359475.lua +++ /dev/null @@ -1,50 +0,0 @@ ---聖騎士パーシヴァル -function c73359475.initial_effect(c) - --Attribute Dark - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetCode(EFFECT_CHANGE_ATTRIBUTE) - e2:SetRange(LOCATION_MZONE) - e2:SetCondition(c73359475.eqcon2) - e2:SetValue(ATTRIBUTE_DARK) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EFFECT_UPDATE_LEVEL) - e3:SetValue(1) - c:RegisterEffect(e3) - --tohand - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(73359475,0)) - e4:SetCategory(CATEGORY_TOHAND) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e4:SetProperty(EFFECT_FLAG_CARD_TARGET) - e4:SetCode(EVENT_LEAVE_FIELD) - e4:SetCondition(c73359475.thcon) - e4:SetTarget(c73359475.thtg) - e4:SetOperation(c73359475.thop) - c:RegisterEffect(e4) -end -function c73359475.eqcon2(e) - return e:GetHandler():GetEquipGroup():IsExists(Card.IsSetCard,1,nil,0x207a) -end -function c73359475.thcon(e,tp,eg,ep,ev,re,r,rp) - return c73359475.eqcon2(e) and e:GetHandler():IsLocation(LOCATION_GRAVE) -end -function c73359475.thfilter(c) - return c:IsSetCard(0x207a) and c:IsAbleToHand() -end -function c73359475.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c73359475.thfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c73359475.thfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c73359475.thfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c73359475.thop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end diff --git a/script/c73360025.lua b/script/c73360025.lua deleted file mode 100644 index a3ba054f6c..0000000000 --- a/script/c73360025.lua +++ /dev/null @@ -1,145 +0,0 @@ ---魔神王の契約書 -function c73360025.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(73360025,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_SZONE) - e2:SetCountLimit(1,73360025) - e2:SetTarget(c73360025.sptg) - e2:SetOperation(c73360025.spop) - c:RegisterEffect(e2) - --damage - local e3=Effect.CreateEffect(c) - e3:SetCategory(CATEGORY_DAMAGE) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e3:SetCode(EVENT_PHASE+PHASE_STANDBY) - e3:SetRange(LOCATION_SZONE) - e3:SetCountLimit(1) - e3:SetCondition(c73360025.damcon) - e3:SetTarget(c73360025.damtg) - e3:SetOperation(c73360025.damop) - c:RegisterEffect(e3) -end -function c73360025.mfilter0(c) - return c:IsCanBeFusionMaterial() and c:IsAbleToRemove() -end -function c73360025.mfilter1(c,e) - return c:IsCanBeFusionMaterial() and not c:IsImmuneToEffect(e) -end -function c73360025.mfilter2(c,e) - return c:IsCanBeFusionMaterial() and c:IsAbleToRemove() and not c:IsImmuneToEffect(e) -end -function c73360025.spfilter1(c,e,tp,m,f,chkf) - return c:IsType(TYPE_FUSION) and c:IsRace(RACE_FIEND) and (not f or f(c)) - and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf) -end -function c73360025.spfilter2(c,e,tp,m,f,chkf) - return c:IsType(TYPE_FUSION) and c:IsRace(RACE_FIEND) and c:IsSetCard(0xaf) and (not f or f(c)) - and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf) -end -function c73360025.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp - local mg1=Duel.GetMatchingGroup(Card.IsCanBeFusionMaterial,tp,LOCATION_HAND+LOCATION_MZONE,0,nil) - local res=Duel.IsExistingMatchingCard(c73360025.spfilter1,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf) - if res then return true end - local mg2=Duel.GetMatchingGroup(c73360025.mfilter0,tp,LOCATION_GRAVE,0,nil) - mg2:Merge(mg1) - res=Duel.IsExistingMatchingCard(c73360025.spfilter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,nil,chkf) - if not res then - local ce=Duel.GetChainMaterial(tp) - if ce~=nil then - local fgroup=ce:GetTarget() - local mg3=fgroup(ce,e,tp) - local mf=ce:GetValue() - res=Duel.IsExistingMatchingCard(c73360025.spfilter1,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg3,mf,chkf) - end - end - return res - end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function c73360025.spop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp - local mg1=Duel.GetMatchingGroup(c73360025.mfilter1,tp,LOCATION_HAND+LOCATION_MZONE,0,nil,e) - local sg1=Duel.GetMatchingGroup(c73360025.spfilter1,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf) - local mg2=Duel.GetMatchingGroup(c73360025.mfilter2,tp,LOCATION_GRAVE,0,nil,e) - mg2:Merge(mg1) - local sg2=Duel.GetMatchingGroup(c73360025.spfilter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,nil,chkf) - sg1:Merge(sg2) - local mg3=nil - local sg3=nil - local ce=Duel.GetChainMaterial(tp) - if ce~=nil then - local fgroup=ce:GetTarget() - mg3=fgroup(ce,e,tp) - local mf=ce:GetValue() - sg3=Duel.GetMatchingGroup(c73360025.spfilter1,tp,LOCATION_EXTRA,0,nil,e,tp,mg3,mf,chkf) - end - if sg1:GetCount()>0 or (sg3~=nil and sg3:GetCount()>0) then - local sg=sg1:Clone() - if sg3 then sg:Merge(sg3) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local tg=sg:Select(tp,1,1,nil) - local tc=tg:GetFirst() - if sg1:IsContains(tc) and (sg3==nil or not sg3:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then - if tc:IsSetCard(0xaf) then - local mat1=Duel.SelectFusionMaterial(tp,tc,mg2,nil,chkf) - tc:SetMaterial(mat1) - local mat2=mat1:Filter(Card.IsLocation,nil,LOCATION_GRAVE) - mat1:Sub(mat2) - Duel.SendtoGrave(mat1,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION) - Duel.Remove(mat2,POS_FACEUP,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION) - else - local mat2=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf) - tc:SetMaterial(mat2) - Duel.SendtoGrave(mat2,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION) - end - Duel.BreakEffect() - Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP) - else - local mat=Duel.SelectFusionMaterial(tp,tc,mg3,nil,chkf) - local fop=ce:GetOperation() - fop(ce,e,tp,tc,mat) - end - tc:CompleteProcedure() - else - local cg1=Duel.GetFieldGroup(tp,LOCATION_HAND+LOCATION_MZONE,0) - local cg2=Duel.GetFieldGroup(tp,LOCATION_EXTRA,0) - local ct=cg1:GetCount() - if not Duel.IsPlayerAffectedByEffect(tp,30459350) then - ct=ct+Duel.GetMatchingGroupCount(c73360025.ctfilter,tp,LOCATION_GRAVE,0,nil) - end - if ct>1 and cg2:IsExists(Card.IsFacedown,1,nil) - and Duel.IsPlayerCanSpecialSummon(tp) and not Duel.IsPlayerAffectedByEffect(tp,27581098) then - Duel.ConfirmCards(1-tp,cg1) - Duel.ConfirmCards(1-tp,cg2) - Duel.ShuffleHand(tp) - end - end -end -function c73360025.ctfilter(c) - return c:IsType(TYPE_MONSTER) and c:IsSetCard(0xaf) -end -function c73360025.damcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c73360025.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(1000) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,0,0,tp,1000) -end -function c73360025.damop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c73398797.lua b/script/c73398797.lua deleted file mode 100644 index f16bb57c24..0000000000 --- a/script/c73398797.lua +++ /dev/null @@ -1,63 +0,0 @@ ---白竜の聖騎士 -function c73398797.initial_effect(c) - c:EnableReviveLimit() - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(73398797,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_BATTLE_START) - e1:SetCondition(c73398797.descon) - e1:SetTarget(c73398797.destg) - e1:SetOperation(c73398797.desop) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(73398797,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCost(c73398797.spcost) - e2:SetTarget(c73398797.sptg) - e2:SetOperation(c73398797.spop) - c:RegisterEffect(e2) -end -function c73398797.descon(e,tp,eg,ep,ev,re,r,rp) - local d=Duel.GetAttackTarget() - return e:GetHandler()==Duel.GetAttacker() and d and d:IsPosition(POS_FACEDOWN_DEFENCE) -end -function c73398797.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,Duel.GetAttackTarget(),1,0,0) -end -function c73398797.desop(e,tp,eg,ep,ev,re,r,rp) - local d=Duel.GetAttackTarget() - if d:IsRelateToBattle() then - Duel.Destroy(d,REASON_EFFECT) - end -end -function c73398797.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end -function c73398797.spfilter(c,e,tp) - return c:IsCode(89631139) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c73398797.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsExistingMatchingCard(c73398797.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) -end -function c73398797.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c73398797.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp) - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetTarget(aux.TargetBoolFunction(Card.IsCode,89631139)) - e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e1:SetReset(RESET_PHASE+RESET_END) - Duel.RegisterEffect(e1,tp) -end diff --git a/script/c73414375.lua b/script/c73414375.lua deleted file mode 100644 index 88c1120bf8..0000000000 --- a/script/c73414375.lua +++ /dev/null @@ -1,34 +0,0 @@ ---ディメンション・ポッド -function c73414375.initial_effect(c) - --flip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(73414375,0)) - e1:SetCategory(CATEGORY_REMOVE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP) - e1:SetTarget(c73414375.target) - e1:SetOperation(c73414375.operation) - c:RegisterEffect(e1) -end -function c73414375.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - if chk==0 then return true end - local g=Group.CreateGroup() - if Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(73414375,1)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local rg=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,3,nil) - g:Merge(rg) - end - if Duel.IsExistingTarget(Card.IsAbleToRemove,1-tp,0,LOCATION_GRAVE,1,nil) and Duel.SelectYesNo(1-tp,aux.Stringid(73414375,1)) then - Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_REMOVE) - local rg=Duel.SelectTarget(1-tp,Card.IsAbleToRemove,1-tp,0,LOCATION_GRAVE,1,3,nil) - g:Merge(rg) - end - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,0) -end -function c73414375.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - if not g then return end - local rg=g:Filter(Card.IsRelateToEffect,nil,e) - Duel.Remove(rg,POS_FACEUP,REASON_EFFECT) -end diff --git a/script/c73417207.lua b/script/c73417207.lua deleted file mode 100644 index 810e3783cd..0000000000 --- a/script/c73417207.lua +++ /dev/null @@ -1,32 +0,0 @@ ---極星霊スヴァルトアールヴ -function c73417207.initial_effect(c) - --synchro custom - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SYNCHRO_MATERIAL_CUSTOM) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetTarget(c73417207.target) - e1:SetValue(1) - e1:SetOperation(c73417207.operation) - c:RegisterEffect(e1) -end -c73417207.tuner_filter=aux.FALSE -function c73417207.filter(c,syncard,tuner,f) - return c:IsSetCard(0x42) and c:IsNotTuner() and c:IsCanBeSynchroMaterial(syncard,tuner) and (f==nil or f(c)) -end -function c73417207.target(e,syncard,f,minc,maxc) - local c=e:GetHandler() - if minc>2 or maxc<2 then return false end - local lv=syncard:GetLevel()-c:GetLevel() - if lv<=0 then return false end - local g=Duel.GetMatchingGroup(c73417207.filter,syncard:GetControler(),LOCATION_HAND,0,c,syncard,c,f) - return g:CheckWithSumEqual(Card.GetSynchroLevel,lv,2,2,syncard) -end -function c73417207.operation(e,tp,eg,ep,ev,re,r,rp,syncard,f,minc,maxc) - local c=e:GetHandler() - local lv=syncard:GetLevel()-c:GetLevel() - local g=Duel.GetMatchingGroup(c73417207.filter,syncard:GetControler(),LOCATION_HAND,0,c,syncard,c,f) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SMATERIAL) - local sg=g:SelectWithSumEqual(tp,Card.GetSynchroLevel,lv,2,2,syncard) - Duel.SetSynchroMaterial(sg) -end diff --git a/script/c73428497.lua b/script/c73428497.lua deleted file mode 100644 index 1c5f9fcfde..0000000000 --- a/script/c73428497.lua +++ /dev/null @@ -1,47 +0,0 @@ ---ギアギアーセナル -function c73428497.initial_effect(c) - --atkup - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(c73428497.atkval) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(73428497,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCost(c73428497.spcost) - e2:SetTarget(c73428497.sptg) - e2:SetOperation(c73428497.spop) - c:RegisterEffect(e2) -end -function c73428497.atkfilter(c) - return c:IsFaceup() and c:IsSetCard(0x72) -end -function c73428497.atkval(e,c) - return Duel.GetMatchingGroupCount(c73428497.atkfilter,c:GetControler(),LOCATION_MZONE,0,nil)*200 -end -function c73428497.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end -function c73428497.filter(c,e,tp) - return c:IsSetCard(0x72) and c:GetCode()~=73428497 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c73428497.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsExistingMatchingCard(c73428497.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c73428497.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c73428497.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENCE) - end -end diff --git a/script/c73431236.lua b/script/c73431236.lua deleted file mode 100644 index 0b144ceec2..0000000000 --- a/script/c73431236.lua +++ /dev/null @@ -1,26 +0,0 @@ ---名工 虎鉄 -function c73431236.initial_effect(c) - --flip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(73431236,0)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP) - e1:SetTarget(c73431236.target) - e1:SetOperation(c73431236.operation) - c:RegisterEffect(e1) -end -function c73431236.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c73431236.filter(c) - return c:IsType(TYPE_EQUIP) and c:IsAbleToHand() -end -function c73431236.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c73431236.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c73445448.lua b/script/c73445448.lua deleted file mode 100644 index c094f7c344..0000000000 --- a/script/c73445448.lua +++ /dev/null @@ -1,69 +0,0 @@ ---No.22 不乱健 -function c73445448.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_DARK),8,2) - c:EnableReviveLimit() - --spsummon limit - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(aux.xyzlimit) - c:RegisterEffect(e1) - --negate - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(73445448,0)) - e2:SetCategory(CATEGORY_DISABLE) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetHintTiming(0,0x1c0) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCost(c73445448.cost) - e2:SetTarget(c73445448.target) - e2:SetOperation(c73445448.operation) - c:RegisterEffect(e2) -end -c73445448.xyz_number=22 -function c73445448.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) - and Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,1,nil) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) - Duel.DiscardHand(tp,Card.IsAbleToGraveAsCost,1,1,REASON_COST) -end -function c73445448.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() and aux.disfilter1(chkc) end - if chk==0 then return e:GetHandler():IsAttackPos() - and Duel.IsExistingTarget(aux.disfilter1,tp,0,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - local g=Duel.SelectTarget(tp,aux.disfilter1,tp,0,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0) -end -function c73445448.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) or c:IsDefencePos() then return end - Duel.ChangePosition(c,POS_FACEUP_DEFENCE,POS_FACEDOWN_DEFENCE,0,0) - local tc=Duel.GetFirstTarget() - if ((tc:IsFaceup() and not tc:IsDisabled()) or tc:IsType(TYPE_TRAPMONSTER)) and tc:IsRelateToEffect(e) then - Duel.NegateRelatedChain(tc,RESET_TURN_SET) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetValue(RESET_TURN_SET) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - tc:RegisterEffect(e2) - if tc:IsType(TYPE_TRAPMONSTER) then - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_DISABLE_TRAPMONSTER) - e3:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - tc:RegisterEffect(e3) - end - end -end diff --git a/script/c734741.lua b/script/c734741.lua deleted file mode 100644 index 9be9eb77cf..0000000000 --- a/script/c734741.lua +++ /dev/null @@ -1,55 +0,0 @@ ---彼岸の悪鬼 ラビキャント -function c734741.initial_effect(c) - --self destroy - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_SELF_DESTROY) - e1:SetCondition(c734741.sdcon) - c:RegisterEffect(e1) - --Special Summon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(734741,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_HAND) - e2:SetCountLimit(1,734741) - e2:SetCondition(c734741.sscon) - e2:SetTarget(c734741.sstg) - e2:SetOperation(c734741.ssop) - c:RegisterEffect(e2) - -- - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e3:SetValue(c734741.synlimit) - c:RegisterEffect(e3) -end -function c734741.synlimit(e,c) - if not c then return false end - return not c:IsSetCard(0xb1) -end -function c734741.sdfilter(c) - return not c:IsFaceup() or not c:IsSetCard(0xb1) -end -function c734741.sdcon(e) - return Duel.IsExistingMatchingCard(c734741.sdfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) -end -function c734741.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) -end -function c734741.sscon(e,tp,eg,ep,ev,re,r,rp) - return not Duel.IsExistingMatchingCard(c734741.filter,tp,LOCATION_ONFIELD,0,1,nil) -end -function c734741.sstg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c734741.ssop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c73483491.lua b/script/c73483491.lua deleted file mode 100644 index e3b37ada69..0000000000 --- a/script/c73483491.lua +++ /dev/null @@ -1,43 +0,0 @@ ---レアル・ジェネクス・ヴィンディカイト -function c73483491.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0x2),aux.NonTuner(Card.IsAttribute,ATTRIBUTE_WIND),1) - c:EnableReviveLimit() - --untargetable - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_CANNOT_BE_BATTLE_TARGET) - e1:SetValue(aux.imval1) - c:RegisterEffect(e1) - --search - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(73483491,0)) - e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_BATTLE_DESTROYING) - e2:SetCondition(c73483491.thcon) - e2:SetTarget(c73483491.thtg) - e2:SetOperation(c73483491.thop) - c:RegisterEffect(e2) -end -function c73483491.thcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsRelateToBattle() and c:GetBattleTarget():IsType(TYPE_MONSTER) -end -function c73483491.filter(c) - return c:IsSetCard(0x2) and c:IsAbleToHand() -end -function c73483491.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c73483491.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c73483491.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c73483491.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c73507661.lua b/script/c73507661.lua deleted file mode 100644 index e8043b7985..0000000000 --- a/script/c73507661.lua +++ /dev/null @@ -1,28 +0,0 @@ ---妖精の風 -function c73507661.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_END_PHASE) - e1:SetTarget(c73507661.target) - e1:SetOperation(c73507661.activate) - c:RegisterEffect(e1) -end -function c73507661.filter(c) - return c:IsFaceup() and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable() -end -function c73507661.target(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return Duel.IsExistingMatchingCard(c73507661.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c) end - local sg=Duel.GetMatchingGroup(c73507661.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,c) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,sg:GetCount(),0,0) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,PLAYER_ALL,sg:GetCount()*300) -end -function c73507661.activate(e,tp,eg,ep,ev,re,r,rp) - local sg=Duel.GetMatchingGroup(c73507661.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler()) - local ct=Duel.Destroy(sg,REASON_EFFECT) - Duel.Damage(tp,ct*300,REASON_EFFECT) - Duel.Damage(1-tp,ct*300,REASON_EFFECT) -end diff --git a/script/c73544866.lua b/script/c73544866.lua deleted file mode 100644 index 222b210f24..0000000000 --- a/script/c73544866.lua +++ /dev/null @@ -1,70 +0,0 @@ ---ガーディアン・バオウ -function c73544866.initial_effect(c) - --sum limit - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_SUMMON) - e1:SetCondition(c73544866.sumlimit) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_CANNOT_FLIP_SUMMON) - c:RegisterEffect(e2) - local e3=e1:Clone() - e3:SetCode(EFFECT_SPSUMMON_CONDITION) - c:RegisterEffect(e3) - --negate - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e4:SetCode(EVENT_BATTLED) - e4:SetOperation(c73544866.negop) - c:RegisterEffect(e4) - --atkup - local e5=Effect.CreateEffect(c) - e5:SetDescription(aux.Stringid(73544866,0)) - e5:SetCategory(CATEGORY_ATKCHANGE) - e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e5:SetCode(EVENT_BATTLE_DESTROYING) - e5:SetCondition(c73544866.atkcon) - e5:SetOperation(c73544866.atkop) - c:RegisterEffect(e5) -end -function c73544866.cfilter(c) - return c:IsFaceup() and c:IsCode(68427465) -end -function c73544866.sumlimit(e) - return not Duel.IsExistingMatchingCard(c73544866.cfilter,e:GetHandlerPlayer(),LOCATION_ONFIELD,0,1,nil) -end -function c73544866.negop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local bc=c:GetBattleTarget() - if bc and bc:IsType(TYPE_EFFECT) and bc:IsStatus(STATUS_BATTLE_DESTROYED) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0x17a0000) - bc:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+0x17a0000) - bc:RegisterEffect(e2) - end -end -function c73544866.atkcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local bc=c:GetBattleTarget() - return bc and c:IsRelateToBattle() and bc:IsLocation(LOCATION_GRAVE) and bc:IsReason(REASON_BATTLE) and bc:IsType(TYPE_MONSTER) -end -function c73544866.atkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_COPY_INHERIT) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(1000) - e1:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e1) - end -end diff --git a/script/c73551138.lua b/script/c73551138.lua deleted file mode 100644 index 63f7109a8f..0000000000 --- a/script/c73551138.lua +++ /dev/null @@ -1,107 +0,0 @@ ---リチュア・エミリア -function c73551138.initial_effect(c) - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(aux.FALSE) - c:RegisterEffect(e1) - --summon,flip - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(73551138,0)) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetCode(EVENT_SUMMON_SUCCESS) - e2:SetOperation(c73551138.retreg) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EVENT_FLIP) - c:RegisterEffect(e3) - --negate trap - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(73551138,1)) - e4:SetCategory(CATEGORY_DISABLE) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e4:SetCode(EVENT_SUMMON_SUCCESS) - e4:SetOperation(c73551138.negop) - c:RegisterEffect(e4) - local e5=e4:Clone() - e5:SetCode(EVENT_FLIP) - c:RegisterEffect(e5) -end -function c73551138.filter(c) - return c:IsFaceup() and c:IsSetCard(0x3a) -end -function c73551138.negop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not Duel.IsExistingMatchingCard(c73551138.filter,tp,LOCATION_MZONE,0,1,c) then return end - --disable - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_DISABLE) - e1:SetTargetRange(LOCATION_SZONE,LOCATION_SZONE) - e1:SetTarget(c73551138.distg) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) - --disable effect - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_CHAIN_SOLVING) - e2:SetOperation(c73551138.disop) - e2:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e2,tp) - --disable trap monster - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetCode(EFFECT_DISABLE_TRAPMONSTER) - e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e3:SetTarget(c73551138.distg) - e3:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e3,tp) -end -function c73551138.distg(e,c) - return c~=e:GetHandler() and c:IsType(TYPE_TRAP) -end -function c73551138.disop(e,tp,eg,ep,ev,re,r,rp) - local tl=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION) - if tl==LOCATION_SZONE and re:IsActiveType(TYPE_TRAP) then - Duel.NegateEffect(ev) - end -end -function c73551138.retreg(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - --to hand - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetDescription(aux.Stringid(73551138,0)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetReset(RESET_EVENT+0x1ee0000+RESET_PHASE+PHASE_END) - e1:SetCondition(c73551138.retcon) - e1:SetTarget(c73551138.rettg) - e1:SetOperation(c73551138.retop) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - c:RegisterEffect(e2) -end -function c73551138.retcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsHasEffect(EFFECT_SPIRIT_DONOT_RETURN) then return false end - if e:IsHasType(EFFECT_TYPE_TRIGGER_F) then - return not c:IsHasEffect(EFFECT_SPIRIT_MAYNOT_RETURN) - else return c:IsHasEffect(EFFECT_SPIRIT_MAYNOT_RETURN) end -end -function c73551138.rettg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0) -end -function c73551138.retop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - Duel.SendtoHand(c,nil,REASON_EFFECT) - end -end diff --git a/script/c73567374.lua b/script/c73567374.lua deleted file mode 100644 index e57d3041a1..0000000000 --- a/script/c73567374.lua +++ /dev/null @@ -1,40 +0,0 @@ ---フォース・リリース -function c73567374.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_POSITION) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c73567374.target) - e1:SetOperation(c73567374.operation) - c:RegisterEffect(e1) -end -function c73567374.filter(c) - return c:IsFaceup() and c:IsType(TYPE_DUAL) and not c:IsDualState() -end -function c73567374.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c73567374.filter,tp,LOCATION_MZONE,0,1,nil) end -end -function c73567374.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c73567374.filter,tp,LOCATION_MZONE,0,nil) - local tc=g:GetFirst() - while tc do - tc:EnableDualState() - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCondition(c73567374.flipcon) - e1:SetOperation(c73567374.flipop) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1,true) - tc=g:GetNext() - end -end -function c73567374.flipcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsCanTurnSet() -end -function c73567374.flipop(e,tp,eg,ep,ev,re,r,rp) - Duel.ChangePosition(e:GetHandler(),POS_FACEDOWN_DEFENCE) -end diff --git a/script/c73574678.lua b/script/c73574678.lua deleted file mode 100644 index ff5660bd62..0000000000 --- a/script/c73574678.lua +++ /dev/null @@ -1,36 +0,0 @@ ---アマゾネスの吹き矢兵 -function c73574678.initial_effect(c) - --atkdown - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(73574678,0)) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCondition(c73574678.condition) - e1:SetTarget(c73574678.target) - e1:SetOperation(c73574678.operation) - c:RegisterEffect(e1) -end -function c73574678.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c73574678.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil) -end -function c73574678.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) and tc:IsFaceup() then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(-500) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - end -end diff --git a/script/c73578229.lua b/script/c73578229.lua deleted file mode 100644 index ab23eb44c6..0000000000 --- a/script/c73578229.lua +++ /dev/null @@ -1,64 +0,0 @@ ---ポールポジション -function c73578229.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - local g=Group.CreateGroup() - g:KeepAlive() - --adjust - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e2:SetCode(EVENT_ADJUST) - e2:SetRange(LOCATION_SZONE) - e2:SetOperation(c73578229.adjustop) - e2:SetLabelObject(g) - c:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetRange(LOCATION_SZONE) - e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e3:SetCode(EFFECT_IMMUNE_EFFECT) - e3:SetTarget(c73578229.etarget) - e3:SetValue(c73578229.efilter) - e3:SetLabelObject(g) - c:RegisterEffect(e3) - --destroy - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e4:SetCode(EVENT_LEAVE_FIELD) - e4:SetOperation(c73578229.desop) - c:RegisterEffect(e4) -end -function c73578229.etarget(e,c) - return e:GetLabelObject():IsContains(c) -end -function c73578229.efilter(e,te) - return te:IsActiveType(TYPE_SPELL) -end -function c73578229.adjustop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - local preg=e:GetLabelObject() - if g:GetCount()>0 then - local ag=g:GetMaxGroup(Card.GetAttack) - if ag:Equal(preg) then return end - preg:Clear() - preg:Merge(ag) - else - if preg:GetCount()==0 then return end - preg:Clear() - end - Duel.AdjustInstantly(e:GetHandler()) - Duel.Readjust() -end -function c73578229.desop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsStatus(STATUS_ACTIVATED) then - local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - if g:GetCount()>0 then - local ag=g:GetMaxGroup(Card.GetAttack) - Duel.Destroy(ag,REASON_EFFECT) - end - end -end diff --git a/script/c73580471.lua b/script/c73580471.lua deleted file mode 100644 index d02298bc15..0000000000 --- a/script/c73580471.lua +++ /dev/null @@ -1,69 +0,0 @@ ---ブラック・ローズ・ドラゴン -function c73580471.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1) - c:EnableReviveLimit() - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(73580471,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(c73580471.descon) - e1:SetTarget(c73580471.destg) - e1:SetOperation(c73580471.desop) - c:RegisterEffect(e1) - --pos - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(73580471,1)) - e2:SetCategory(CATEGORY_POSITION+CATEGORY_ATKCHANGE) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCost(c73580471.poscost) - e2:SetTarget(c73580471.postg) - e2:SetOperation(c73580471.posop) - c:RegisterEffect(e2) -end -function c73580471.descon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_SYNCHRO -end -function c73580471.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end - local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c73580471.desop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) - if g:GetCount()>0 then - Duel.Destroy(g,REASON_EFFECT) - end -end -function c73580471.costfilter(c) - return c:IsRace(RACE_PLANT) and c:IsAbleToRemoveAsCost() -end -function c73580471.poscost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c73580471.costfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c73580471.costfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c73580471.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsDefencePos() end - if chk==0 then return Duel.IsExistingTarget(Card.IsDefencePos,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DEFENCE) - local g=Duel.SelectTarget(tp,Card.IsDefencePos,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0) -end -function c73580471.posop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if not tc or tc:IsAttackPos() or not tc:IsRelateToEffect(e) then return end - if Duel.ChangePosition(tc,POS_FACEUP_ATTACK)==0 then return end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e1:SetValue(0) - tc:RegisterEffect(e1) -end diff --git a/script/c73599290.lua b/script/c73599290.lua deleted file mode 100644 index a00c744af4..0000000000 --- a/script/c73599290.lua +++ /dev/null @@ -1,27 +0,0 @@ ---ソウルドレイン -function c73599290.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_DRAW_PHASE) - e1:SetCost(c73599290.cost) - c:RegisterEffect(e1) - -- - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetCode(EFFECT_CANNOT_ACTIVATE) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(1,1) - e2:SetValue(c73599290.aclimit) - c:RegisterEffect(e2) -end -function c73599290.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,1000) end - Duel.PayLPCost(tp,1000) -end -function c73599290.aclimit(e,re,tp) - local loc=re:GetActivateLocation() - return (loc==LOCATION_GRAVE or loc==LOCATION_REMOVED) and re:IsActiveType(TYPE_MONSTER) and not re:GetHandler():IsImmuneToEffect(e) -end diff --git a/script/c73625877.lua b/script/c73625877.lua deleted file mode 100644 index d66abf27ba..0000000000 --- a/script/c73625877.lua +++ /dev/null @@ -1,56 +0,0 @@ ---タイム・エスケーパー -function c73625877.initial_effect(c) - --remove - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(73625877,0)) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCategory(CATEGORY_REMOVE) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetRange(LOCATION_HAND) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c73625877.rmcost) - e1:SetTarget(c73625877.rmtg) - e1:SetOperation(c73625877.rmop) - c:RegisterEffect(e1) -end -function c73625877.rmcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsDiscardable() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD) -end -function c73625877.filter(c) - return c:IsFaceup() and c:IsRace(RACE_PSYCHO) and c:IsAbleToRemove() -end -function c73625877.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c73625877.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c73625877.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,c73625877.filter,tp,LOCATION_MZONE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) -end -function c73625877.rmop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - if Duel.Remove(tc,0,REASON_EFFECT+REASON_TEMPORARY)==0 then return end - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) - e1:SetCountLimit(1) - e1:SetLabelObject(tc) - e1:SetCondition(c73625877.retcon) - e1:SetOperation(c73625877.retop) - if Duel.GetTurnPlayer()==tp and Duel.GetCurrentPhase()==PHASE_DRAW then - e1:SetLabel(0) - else - e1:SetLabel(Duel.GetTurnCount()) - end - Duel.RegisterEffect(e1,tp) - end -end -function c73625877.retcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp and Duel.GetTurnCount()~=e:GetLabel() -end -function c73625877.retop(e,tp,eg,ep,ev,re,r,rp) - Duel.ReturnToField(e:GetLabelObject()) - e:Reset() -end diff --git a/script/c73628505.lua b/script/c73628505.lua deleted file mode 100644 index 9ed22183c5..0000000000 --- a/script/c73628505.lua +++ /dev/null @@ -1,26 +0,0 @@ ---テラ・フォーミング -function c73628505.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c73628505.target) - e1:SetOperation(c73628505.activate) - c:RegisterEffect(e1) -end -function c73628505.filter(c) - return c:IsType(TYPE_FIELD) and c:IsAbleToHand() -end -function c73628505.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c73628505.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c73628505.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c73628505.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c73632127.lua b/script/c73632127.lua deleted file mode 100644 index 1f218460dc..0000000000 --- a/script/c73632127.lua +++ /dev/null @@ -1,45 +0,0 @@ ---ディメンション・スライド -function c73632127.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_REMOVE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(c73632127.condition) - e1:SetTarget(c73632127.target) - e1:SetOperation(c73632127.activate) - c:RegisterEffect(e1) - -- - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN) - e2:SetProperty(EFFECT_FLAG_SET_AVAILABLE) - e2:SetCondition(c73632127.actcon) - c:RegisterEffect(e2) -end -function c73632127.condition(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(Card.IsControler,1,nil,tp) -end -function c73632127.filter(c) - return c:IsFaceup() and c:IsAbleToRemove() -end -function c73632127.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c73632127.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c73632127.filter,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,c73632127.filter,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) -end -function c73632127.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) then - Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) - end -end -function c73632127.actcon(e) - local res,teg,tep,tev,tre,tr,trp=Duel.CheckEvent(EVENT_SPSUMMON_SUCCESS,true) - if res then - return teg:GetCount()==1 and teg:GetFirst():GetSummonType()==SUMMON_TYPE_XYZ - end -end diff --git a/script/c73648243.lua b/script/c73648243.lua deleted file mode 100644 index 80e07e4291..0000000000 --- a/script/c73648243.lua +++ /dev/null @@ -1,41 +0,0 @@ ---サンドモス -function c73648243.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(73648243,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCondition(c73648243.spcon) - e1:SetTarget(c73648243.sptg) - e1:SetOperation(c73648243.spop) - c:RegisterEffect(e1) -end -function c73648243.spcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return bit.band(c:GetReason(),0x41)==0x41 and c:IsPreviousLocation(LOCATION_MZONE) - and c:IsPreviousPosition(POS_FACEDOWN_DEFENCE) -end -function c73648243.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c73648243.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.SpecialSummonStep(c,0,tp,tp,false,false,POS_FACEUP) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_BASE_ATTACK) - e1:SetValue(2000) - e1:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_SET_BASE_DEFENCE) - e2:SetValue(1000) - e2:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e2) - Duel.SpecialSummonComplete() - end -end diff --git a/script/c73652465.lua b/script/c73652465.lua deleted file mode 100644 index 3e3439d196..0000000000 --- a/script/c73652465.lua +++ /dev/null @@ -1,47 +0,0 @@ ---BF-突風のオロシ -function c73652465.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(1,73652465) - e1:SetCondition(c73652465.spcon) - c:RegisterEffect(e1) - --position - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(73652465,0)) - e2:SetCategory(CATEGORY_POSITION) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_BE_MATERIAL) - e2:SetCondition(c73652465.condition) - e2:SetTarget(c73652465.target) - e2:SetOperation(c73652465.operation) - c:RegisterEffect(e2) -end -function c73652465.filter(c) - return c:IsFaceup() and c:IsSetCard(0x33) and c:GetCode()~=73652465 -end -function c73652465.spcon(e,c) - if c==nil then return true end - return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c73652465.filter,c:GetControler(),LOCATION_MZONE,0,1,nil) -end -function c73652465.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsLocation(LOCATION_GRAVE) and r==REASON_SYNCHRO -end -function c73652465.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) end - if chk==0 then return Duel.IsExistingTarget(nil,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE) - local g=Duel.SelectTarget(tp,nil,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0) -end -function c73652465.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.ChangePosition(tc,POS_FACEUP_DEFENCE,POS_FACEDOWN_DEFENCE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK) - end -end diff --git a/script/c73659078.lua b/script/c73659078.lua deleted file mode 100644 index e8f1ebbd1e..0000000000 --- a/script/c73659078.lua +++ /dev/null @@ -1,55 +0,0 @@ ---スノーダスト・ジャイアント -function c73659078.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_WATER),4,2) - c:EnableReviveLimit() - --counter - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(73659078,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c73659078.cost) - e1:SetTarget(c73659078.target) - e1:SetOperation(c73659078.operation) - c:RegisterEffect(e1) - --atkdown - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetRange(LOCATION_MZONE) - e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e2:SetTarget(c73659078.atktg) - e2:SetValue(c73659078.atkval) - c:RegisterEffect(e2) -end -function c73659078.cfilter(c) - return c:IsAttribute(ATTRIBUTE_WATER) and not c:IsPublic() -end -function c73659078.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c73659078.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c73659078.cfilter,tp,LOCATION_HAND,0,1,nil) end -end -function c73659078.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - if g:GetCount()==0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) - local cg=Duel.SelectMatchingCard(tp,c73659078.cfilter,tp,LOCATION_HAND,0,1,99,nil) - Duel.ConfirmCards(1-tp,cg) - Duel.ShuffleHand(tp) - local ct=cg:GetCount() - for i=1,ct do - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(73659078,1)) - local tc=g:Select(tp,1,1,nil):GetFirst() - tc:AddCounter(0x15,1) - end -end -function c73659078.atktg(e,c) - return not c:IsAttribute(ATTRIBUTE_WATER) -end -function c73659078.atkval(e,c) - return Duel.GetCounter(0,1,1,0x15)*-200 -end diff --git a/script/c73665146.lua b/script/c73665146.lua deleted file mode 100644 index b1b5aecd1f..0000000000 --- a/script/c73665146.lua +++ /dev/null @@ -1,65 +0,0 @@ ---サイレント・マジシャン LV4 -function c73665146.initial_effect(c) - c:EnableCounterPermit(0x3001) - c:SetCounterLimit(0x3001,5) - --draw - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_DRAW) - e1:SetRange(LOCATION_MZONE) - e1:SetOperation(c73665146.addc) - c:RegisterEffect(e1) - --attackup - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(c73665146.attackup) - c:RegisterEffect(e2) - --special summon - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(73665146,0)) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetRange(LOCATION_MZONE) - e3:SetCode(EVENT_PHASE+PHASE_STANDBY) - e3:SetCondition(c73665146.spcon) - e3:SetCost(c73665146.spcost) - e3:SetTarget(c73665146.sptg) - e3:SetOperation(c73665146.spop) - c:RegisterEffect(e3) -end -c73665146.lvupcount=1 -c73665146.lvup={72443568} -function c73665146.addc(e,tp,eg,ep,ev,re,r,rp) - if ep~=tp then - e:GetHandler():AddCounter(0x3001,1) - end -end -function c73665146.attackup(e,c) - return c:GetCounter(0x3001)*500 -end -function c73665146.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetCounter(0x3001)==5 and tp==Duel.GetTurnPlayer() -end -function c73665146.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end -function c73665146.spfilter(c,e,tp) - return c:IsCode(72443568) and c:IsCanBeSpecialSummoned(e,0,tp,true,true) -end -function c73665146.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsExistingMatchingCard(c73665146.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) -end -function c73665146.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c73665146.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp) - local tc=g:GetFirst() - if tc then - Duel.SpecialSummon(tc,0,tp,tp,true,true,POS_FACEUP) - tc:CompleteProcedure() - end -end diff --git a/script/c73680966.lua b/script/c73680966.lua deleted file mode 100644 index 4c0850b502..0000000000 --- a/script/c73680966.lua +++ /dev/null @@ -1,36 +0,0 @@ ---終わりの始まり -function c73680966.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c73680966.condition) - e1:SetCost(c73680966.cost) - e1:SetTarget(c73680966.target) - e1:SetOperation(c73680966.activate) - c:RegisterEffect(e1) -end -function c73680966.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(Card.IsAttribute,tp,LOCATION_GRAVE,0,7,nil,ATTRIBUTE_DARK) -end -function c73680966.cfilter(c) - return c:IsAttribute(ATTRIBUTE_DARK) and c:IsAbleToRemove() -end -function c73680966.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c73680966.cfilter,tp,LOCATION_GRAVE,0,5,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c73680966.cfilter,tp,LOCATION_GRAVE,0,5,5,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c73680966.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp,3) end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(3) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,3) -end -function c73680966.activate(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end diff --git a/script/c7369217.lua b/script/c7369217.lua deleted file mode 100644 index 33e77a0def..0000000000 --- a/script/c7369217.lua +++ /dev/null @@ -1,89 +0,0 @@ ---メタル化寄生生物-ルナタイト -function c7369217.initial_effect(c) - --equip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(7369217,0)) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetTarget(c7369217.eqtg) - e1:SetOperation(c7369217.eqop) - c:RegisterEffect(e1) - --unequip - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(7369217,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_SZONE) - e2:SetCondition(c7369217.uncon) - e2:SetTarget(c7369217.sptg) - e2:SetOperation(c7369217.spop) - c:RegisterEffect(e2) - --immune - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_EQUIP) - e3:SetCode(EFFECT_IMMUNE_EFFECT) - e3:SetCondition(c7369217.uncon) - e3:SetValue(c7369217.efilter) - c:RegisterEffect(e3) - --destroy sub - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_EQUIP) - e5:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e5:SetCode(EFFECT_DESTROY_SUBSTITUTE) - e5:SetCondition(c7369217.uncon) - e5:SetValue(c7369217.repval) - c:RegisterEffect(e5) - --eqlimit - local e6=Effect.CreateEffect(c) - e6:SetType(EFFECT_TYPE_SINGLE) - e6:SetCode(EFFECT_EQUIP_LIMIT) - e6:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e6:SetValue(1) - c:RegisterEffect(e6) -end -function c7369217.uncon(e) - return e:GetHandler():IsStatus(STATUS_UNION) -end -function c7369217.repval(e,re,r,rp) - return bit.band(r,REASON_BATTLE)~=0 -end -function c7369217.filter(c) - return c:IsFaceup() and c:GetUnionCount()==0 -end -function c7369217.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c7369217.filter(chkc) end - if chk==0 then return e:GetHandler():GetFlagEffect(7369217)==0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingTarget(c7369217.filter,tp,LOCATION_MZONE,0,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local g=Duel.SelectTarget(tp,c7369217.filter,tp,LOCATION_MZONE,0,1,1,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0) - e:GetHandler():RegisterFlagEffect(7369217,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1) -end -function c7369217.eqop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if not c:IsRelateToEffect(e) or c:IsFacedown() then return end - if not tc:IsRelateToEffect(e) or not c7369217.filter(tc) then - Duel.SendtoGrave(c,REASON_EFFECT) - return - end - if not Duel.Equip(tp,c,tc,false) then return end - c:SetStatus(STATUS_UNION,true) -end -function c7369217.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():GetFlagEffect(7369217)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) - e:GetHandler():RegisterFlagEffect(7369217,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1) -end -function c7369217.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP_ATTACK) - end -end -function c7369217.efilter(e,te) - return te:GetOwnerPlayer()~=e:GetHandlerPlayer() and te:IsActiveType(TYPE_SPELL) -end diff --git a/script/c73694478.lua b/script/c73694478.lua deleted file mode 100644 index fec0ede45a..0000000000 --- a/script/c73694478.lua +++ /dev/null @@ -1,77 +0,0 @@ ---転生の超戦士 -function c73694478.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetHintTiming(0,TIMING_END_PHASE) - e1:SetCountLimit(1,73694478+EFFECT_COUNT_CODE_OATH) - e1:SetTarget(c73694478.target) - e1:SetOperation(c73694478.activate) - c:RegisterEffect(e1) - --tohand - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_TOHAND) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetRange(LOCATION_GRAVE) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetCondition(c73694478.thcon) - e2:SetCost(c73694478.thcost) - e2:SetTarget(c73694478.thtg) - e2:SetOperation(c73694478.thop) - c:RegisterEffect(e2) -end -function c73694478.filter(c,e,tp) - return c:IsFaceup() and c:IsSetCard(0xcf) - and Duel.IsExistingMatchingCard(c73694478.spfilter,tp,LOCATION_HAND,0,1,nil,c:GetCode(),e,tp) -end -function c73694478.spfilter(c,code,e,tp) - return c:IsSetCard(0xcf) and not c:IsCode(code) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) -end -function c73694478.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c73694478.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsExistingTarget(c73694478.filter,tp,LOCATION_MZONE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectTarget(tp,c73694478.filter,tp,LOCATION_MZONE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c73694478.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if not tc:IsRelateToEffect(e) then return end - local code=tc:GetCode() - if Duel.SendtoGrave(tc,REASON_EFFECT)==0 or not tc:IsLocation(LOCATION_GRAVE) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c73694478.spfilter,tp,LOCATION_HAND,0,1,1,nil,code,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP) - end -end -function c73694478.thcon(e,tp,eg,ep,ev,re,r,rp) - return aux.exccon(e) and Duel.GetTurnPlayer()==tp and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2) -end -function c73694478.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) -end -function c73694478.thfilter(c) - return c:IsSetCard(0xcf) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() -end -function c73694478.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c73694478.thfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c73694478.thfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c73694478.thfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c73694478.thop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end diff --git a/script/c73698349.lua b/script/c73698349.lua deleted file mode 100644 index 2c5378da51..0000000000 --- a/script/c73698349.lua +++ /dev/null @@ -1,27 +0,0 @@ ---ジャイアント・オーク -function c73698349.initial_effect(c) - --to defence - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE+PHASE_BATTLE) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCondition(c73698349.poscon) - e1:SetOperation(c73698349.posop) - c:RegisterEffect(e1) -end -function c73698349.poscon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetAttackedCount()>0 -end -function c73698349.posop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsAttackPos() then - Duel.ChangePosition(c,POS_FACEUP_DEFENCE) - end - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_CHANGE_POSITION) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_COPY_INHERIT) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,3) - c:RegisterEffect(e1) -end diff --git a/script/c73702909.lua b/script/c73702909.lua deleted file mode 100644 index 6d44ae3358..0000000000 --- a/script/c73702909.lua +++ /dev/null @@ -1,33 +0,0 @@ ---リトルトルーパー -function c73702909.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(73702909,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetCondition(c73702909.condition) - e1:SetTarget(c73702909.target) - e1:SetOperation(c73702909.operation) - c:RegisterEffect(e1) -end -function c73702909.condition(e,tp,eg,ep,ev,re,r,rp) - return not e:GetHandler():IsLocation(LOCATION_DECK) -end -function c73702909.spfilter(c,e,tp) - return c:IsLevelBelow(2) and c:IsRace(RACE_WARRIOR) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN) -end -function c73702909.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c73702909.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c73702909.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c73702909.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEDOWN_DEFENCE) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c73729209.lua b/script/c73729209.lua deleted file mode 100644 index cc0876db87..0000000000 --- a/script/c73729209.lua +++ /dev/null @@ -1,57 +0,0 @@ ---スキル・サクセサー -function c73729209.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetCondition(c73729209.condition) - e1:SetTarget(c73729209.target) - e1:SetOperation(c73729209.activate) - e1:SetLabel(400) - c:RegisterEffect(e1) - --atk - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(73729209,0)) - e2:SetCategory(CATEGORY_ATKCHANGE) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetRange(LOCATION_GRAVE) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetHintTiming(TIMING_DAMAGE_STEP) - e2:SetCondition(c73729209.atkcon) - e2:SetCost(c73729209.atkcost) - e2:SetTarget(c73729209.target) - e2:SetOperation(c73729209.activate) - e2:SetLabel(800) - c:RegisterEffect(e2) -end -function c73729209.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end -function c73729209.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,nil) -end -function c73729209.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - e1:SetValue(e:GetLabel()) - tc:RegisterEffect(e1) - end -end -function c73729209.atkcon(e,tp,eg,ep,ev,re,r,rp) - return aux.exccon(e) and Duel.GetTurnPlayer()==tp and (Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()) -end -function c73729209.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) -end diff --git a/script/c73752131.lua b/script/c73752131.lua deleted file mode 100644 index d4d6277fe9..0000000000 --- a/script/c73752131.lua +++ /dev/null @@ -1,54 +0,0 @@ ---熟練の黒魔術師 -function c73752131.initial_effect(c) - c:EnableCounterPermit(0x3001) - c:SetCounterLimit(0x3001,3) - --add counter - local e0=Effect.CreateEffect(c) - e0:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e0:SetCode(EVENT_CHAINING) - e0:SetRange(LOCATION_MZONE) - e0:SetOperation(aux.chainreg) - c:RegisterEffect(e0) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e1:SetCode(EVENT_CHAIN_SOLVED) - e1:SetRange(LOCATION_MZONE) - e1:SetOperation(c73752131.acop) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(73752131,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCost(c73752131.spcost) - e2:SetTarget(c73752131.sptg) - e2:SetOperation(c73752131.spop) - c:RegisterEffect(e2) -end -function c73752131.acop(e,tp,eg,ep,ev,re,r,rp) - if re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL) and e:GetHandler():GetFlagEffect(1)>0 then - e:GetHandler():AddCounter(0x3001,1) - end -end -function c73752131.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():GetCounter(0x3001)==3 and e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end -function c73752131.filter(c,e,tp) - return c:IsCode(46986414) and not c:IsHasEffect(EFFECT_NECRO_VALLEY) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c73752131.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsExistingMatchingCard(c73752131.filter,tp,0x13,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,0,tp,0x13) -end -function c73752131.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c73752131.filter,tp,0x13,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c73776643.lua b/script/c73776643.lua deleted file mode 100644 index 6ec56faa5c..0000000000 --- a/script/c73776643.lua +++ /dev/null @@ -1,17 +0,0 @@ ---オヤコーン -function c73776643.initial_effect(c) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetCondition(c73776643.condtion) - e1:SetValue(1000) - c:RegisterEffect(e1) -end -function c73776643.condtion(e) - local tc=Duel.GetFieldCard(0,LOCATION_SZONE,5) - if tc and tc:IsFaceup() then return true end - tc=Duel.GetFieldCard(1,LOCATION_SZONE,5) - return tc and tc:IsFaceup() -end diff --git a/script/c73778008.lua b/script/c73778008.lua deleted file mode 100644 index 7dac0deba0..0000000000 --- a/script/c73778008.lua +++ /dev/null @@ -1,17 +0,0 @@ ---深海の怒り -function c73778008.initial_effect(c) - --atkup - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(c73778008.atkup) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_UPDATE_DEFENCE) - c:RegisterEffect(e2) -end -function c73778008.atkup(e,c) - return Duel.GetMatchingGroupCount(Card.IsRace,c:GetControler(),LOCATION_GRAVE,0,nil,RACE_FISH+RACE_SEASERPENT+RACE_AQUA)*500 -end diff --git a/script/c73779005.lua b/script/c73779005.lua deleted file mode 100644 index 76b80f12b2..0000000000 --- a/script/c73779005.lua +++ /dev/null @@ -1,45 +0,0 @@ ---ドラコニアの獣竜騎兵 -function c73779005.initial_effect(c) - --pendulum summon - aux.AddPendulumProcedure(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --to hand - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_BATTLED) - e2:SetRange(LOCATION_PZONE) - e2:SetCountLimit(1) - e2:SetCondition(c73779005.thcon) - e2:SetTarget(c73779005.thtg) - e2:SetOperation(c73779005.thop) - c:RegisterEffect(e2) -end -function c73779005.thcon(e,tp,eg,ep,ev,re,r,rp) - local a=Duel.GetAttacker() - local d=Duel.GetAttackTarget() - if not d then return false end - if d:IsControler(tp) then a,d=d,a end - return a:IsType(TYPE_NORMAL) - and not a:IsStatus(STATUS_BATTLE_DESTROYED) and d:IsStatus(STATUS_BATTLE_DESTROYED) -end -function c73779005.filter(c) - return c:IsType(TYPE_NORMAL) and c:IsLevelAbove(4) and c:IsAbleToHand() -end -function c73779005.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c73779005.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c73779005.thop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c73779005.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c73783043.lua b/script/c73783043.lua deleted file mode 100644 index 36b6c10f84..0000000000 --- a/script/c73783043.lua +++ /dev/null @@ -1,40 +0,0 @@ ---レアル・ジェネクス・アクセラレーター -function c73783043.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(73783043,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetRange(LOCATION_MZONE) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_TO_HAND) - e1:SetTarget(c73783043.sptg) - e1:SetOperation(c73783043.spop) - c:RegisterEffect(e1) -end -function c73783043.filter(c,e,tp) - return c:IsSetCard(0x2) and c:IsControler(tp) and c:IsPreviousLocation(LOCATION_DECK) and not c:IsPublic() - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c73783043.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and eg:IsExists(c73783043.filter,1,nil,e,tp) end - local g=eg:Filter(c73783043.filter,nil,e,tp) - if g:GetCount()==1 then - Duel.ConfirmCards(1-tp,g) - Duel.ShuffleHand(tp) - Duel.SetTargetCard(g) - else - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=g:Select(tp,1,1,nil) - Duel.ConfirmCards(1-tp,sg) - Duel.ShuffleHand(tp) - Duel.SetTargetCard(sg) - end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c73783043.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c73787254.lua b/script/c73787254.lua deleted file mode 100644 index a8d089ec4c..0000000000 --- a/script/c73787254.lua +++ /dev/null @@ -1,30 +0,0 @@ ---セイバー・ヴォールト -function c73787254.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --atk,def - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e2:SetTarget(c73787254.target) - e2:SetValue(c73787254.val1) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EFFECT_UPDATE_DEFENCE) - e3:SetValue(c73787254.val2) - c:RegisterEffect(e3) -end -function c73787254.target(e,c) - return c:IsSetCard(0x100d) -end -function c73787254.val1(e,c) - return c:GetLevel()*100 -end -function c73787254.val2(e,c) - return -c:GetLevel()*100 -end diff --git a/script/c73837870.lua b/script/c73837870.lua deleted file mode 100644 index 5bd130a023..0000000000 --- a/script/c73837870.lua +++ /dev/null @@ -1,28 +0,0 @@ ---サニー・ピクシー -function c73837870.initial_effect(c) - --lp rec - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(73837870,0)) - e1:SetCategory(CATEGORY_RECOVER) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_BE_MATERIAL) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_DELAY) - e1:SetCondition(c73837870.reccon) - e1:SetTarget(c73837870.rectg) - e1:SetOperation(c73837870.recop) - c:RegisterEffect(e1) -end -function c73837870.reccon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsLocation(LOCATION_GRAVE) and r==REASON_SYNCHRO - and e:GetHandler():GetReasonCard():IsAttribute(ATTRIBUTE_LIGHT) -end -function c73837870.rectg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(1000) - Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,1000) -end -function c73837870.recop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Recover(p,d,REASON_EFFECT) -end diff --git a/script/c73853830.lua b/script/c73853830.lua deleted file mode 100644 index 96c3ee338a..0000000000 --- a/script/c73853830.lua +++ /dev/null @@ -1,36 +0,0 @@ ---クルセイダー・オブ・エンディミオン -function c73853830.initial_effect(c) - aux.EnableDualAttribute(c) - --add counter - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(73853830,0)) - e1:SetCategory(CATEGORY_COUNTER) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(aux.IsDualState) - e1:SetTarget(c73853830.target) - e1:SetOperation(c73853830.operation) - c:RegisterEffect(e1) -end -function c73853830.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsCanAddCounter(0x3001,1) end - if chk==0 then return Duel.IsExistingTarget(Card.IsCanAddCounter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil,0x3001,1) end - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(73853830,1)) - local g=Duel.SelectTarget(tp,Card.IsCanAddCounter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil,0x3001,1) - Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,1,0,0) -end -function c73853830.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) and tc:IsCanAddCounter(0x3001,1) then - tc:AddCounter(0x3001,1) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+0x1ff0000+RESET_PHASE+PHASE_END) - e1:SetValue(600) - c:RegisterEffect(e1) - end -end diff --git a/script/c73866096.lua b/script/c73866096.lua deleted file mode 100644 index 7e280b9490..0000000000 --- a/script/c73866096.lua +++ /dev/null @@ -1,33 +0,0 @@ ---ドドドドロー -function c73866096.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,73866096+EFFECT_COUNT_CODE_OATH) - e1:SetCost(c73866096.cost) - e1:SetTarget(c73866096.target) - e1:SetOperation(c73866096.activate) - c:RegisterEffect(e1) -end -function c73866096.cfilter(c) - return c:IsSetCard(0x82) and c:IsType(TYPE_MONSTER) and c:IsAbleToGraveAsCost() - and (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) -end -function c73866096.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c73866096.cfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c73866096.cfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil) - Duel.SendtoGrave(g,REASON_COST) -end -function c73866096.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp,2) end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(2) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2) -end -function c73866096.activate(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end diff --git a/script/c73872164.lua b/script/c73872164.lua deleted file mode 100644 index 3e9cca9d13..0000000000 --- a/script/c73872164.lua +++ /dev/null @@ -1,45 +0,0 @@ ---お家おとりつぶし -function c73872164.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,0x1e0) - e1:SetCost(c73872164.cost) - e1:SetTarget(c73872164.target) - e1:SetOperation(c73872164.activate) - c:RegisterEffect(e1) -end -function c73872164.cfilter(c) - return c:IsType(TYPE_SPELL) and c:IsDiscardable() -end -function c73872164.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c73872164.cfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,c73872164.cfilter,1,1,REASON_COST+REASON_DISCARD) -end -function c73872164.filter(c) - return c:IsFaceup() and c:IsDestructable() -end -function c73872164.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c73872164.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c73872164.filter,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c73872164.filter,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c73872164.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() and Duel.Destroy(tc,REASON_EFFECT)~=0 then - Duel.BreakEffect() - local code=tc:GetCode() - local g=Duel.GetMatchingGroup(Card.IsCode,tp,0,LOCATION_HAND,nil,code) - local hg=Duel.GetFieldGroup(tp,0,LOCATION_HAND) - Duel.ConfirmCards(tp,hg) - if g:GetCount()>0 then - Duel.SendtoGrave(g,REASON_EFFECT) - end - Duel.ShuffleHand(1-tp) - end -end diff --git a/script/c73879377.lua b/script/c73879377.lua deleted file mode 100644 index 2cb11092d1..0000000000 --- a/script/c73879377.lua +++ /dev/null @@ -1,52 +0,0 @@ ---アームド・ドラゴン LV7 -function c73879377.initial_effect(c) - c:EnableReviveLimit() - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(aux.FALSE) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(73879377,0)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCost(c73879377.descost) - e2:SetTarget(c73879377.destg) - e2:SetOperation(c73879377.desop) - c:RegisterEffect(e2) -end -c73879377.lvupcount=1 -c73879377.lvup={46384672} -c73879377.lvdncount=2 -c73879377.lvdn={46384672,980973} -function c73879377.cfilter(c,tp) - local atk=c:GetAttack() - if atk<0 then atk=0 end - return c:IsType(TYPE_MONSTER) and c:IsAbleToGraveAsCost() - and Duel.IsExistingMatchingCard(c73879377.dfilter,tp,0,LOCATION_MZONE,1,nil,atk) -end -function c73879377.dfilter(c,atk) - return c:IsFaceup() and c:GetAttack()<=atk and c:IsDestructable() -end -function c73879377.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c73879377.cfilter,tp,LOCATION_HAND,0,1,nil,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c73879377.cfilter,tp,LOCATION_HAND,0,1,1,nil,tp) - local atk=g:GetFirst():GetAttack() - if atk<0 then atk=0 end - e:SetLabel(atk) - Duel.SendtoGrave(g,REASON_COST) -end -function c73879377.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local g=Duel.GetMatchingGroup(c73879377.dfilter,tp,0,LOCATION_MZONE,nil,e:GetLabel()) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c73879377.desop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c73879377.dfilter,tp,0,LOCATION_MZONE,nil,e:GetLabel()) - Duel.Destroy(g,REASON_EFFECT) -end diff --git a/script/c73887236.lua b/script/c73887236.lua deleted file mode 100644 index d4334b325a..0000000000 --- a/script/c73887236.lua +++ /dev/null @@ -1,52 +0,0 @@ ---RR-ライズ・ファルコン -function c73887236.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsRace,RACE_WINDBEAST),4,3) - c:EnableReviveLimit() - --attack all - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_ATTACK_ALL) - e1:SetValue(c73887236.atkfilter) - c:RegisterEffect(e1) - --atk - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(73887236,0)) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCountLimit(1) - e2:SetCost(c73887236.cost) - e2:SetTarget(c73887236.target) - e2:SetOperation(c73887236.operation) - c:RegisterEffect(e2) -end -function c73887236.atkfilter(e,c) - return bit.band(c:GetSummonType(),SUMMON_TYPE_SPECIAL)==SUMMON_TYPE_SPECIAL -end -function c73887236.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c73887236.filter(c) - return c:IsFaceup() and c:GetAttack()>0 - and bit.band(c:GetSummonType(),SUMMON_TYPE_SPECIAL)==SUMMON_TYPE_SPECIAL -end -function c73887236.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and c73887236.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c73887236.filter,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c73887236.filter,tp,0,LOCATION_MZONE,1,1,nil) -end -function c73887236.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(tc:GetAttack()) - e1:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e1) - end -end diff --git a/script/c73891874.lua b/script/c73891874.lua deleted file mode 100644 index 3cdac0cbd0..0000000000 --- a/script/c73891874.lua +++ /dev/null @@ -1,39 +0,0 @@ ---ホワイト・ホーンズ・ドラゴン -function c73891874.initial_effect(c) - --atk - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(73891874,0)) - e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_REMOVE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c73891874.target) - e1:SetOperation(c73891874.operation) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e2) -end -function c73891874.filter(c) - return c:IsType(TYPE_SPELL) and c:IsAbleToRemove() -end -function c73891874.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(1-tp) and c73891874.filter(chkc) end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,c73891874.filter,tp,0,LOCATION_GRAVE,1,5,nil) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,0) -end -function c73891874.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) - local ct=Duel.Remove(g,POS_FACEUP,REASON_EFFECT) - local c=e:GetHandler() - if ct>0 and c:IsFaceup() and c:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+0x1ff0000) - e1:SetValue(ct*300) - c:RegisterEffect(e1) - end -end diff --git a/script/c73899015.lua b/script/c73899015.lua deleted file mode 100644 index 757f1ade2f..0000000000 --- a/script/c73899015.lua +++ /dev/null @@ -1,37 +0,0 @@ ---ヴェノム・スネーク -function c73899015.initial_effect(c) - --add counter - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(73899015,0)) - e1:SetCategory(CATEGORY_COUNTER) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c73899015.cost) - e1:SetTarget(c73899015.target) - e1:SetOperation(c73899015.operation) - c:RegisterEffect(e1) -end -function c73899015.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():GetAttackAnnouncedCount()==0 end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_OATH) - e1:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - e:GetHandler():RegisterEffect(e1) -end -function c73899015.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsCanAddCounter(0x9,1) end - if chk==0 then return Duel.IsExistingTarget(Card.IsCanAddCounter,tp,0,LOCATION_MZONE,1,nil,0x9,1) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPPO) - local g=Duel.SelectTarget(tp,Card.IsCanAddCounter,tp,0,LOCATION_MZONE,1,1,nil,0x9,1) - Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,1,0,0) -end -function c73899015.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsCanAddCounter(0x9,1) then - tc:AddCounter(0x9,1) - end -end diff --git a/script/c73906480.lua b/script/c73906480.lua deleted file mode 100644 index 10627d43bf..0000000000 --- a/script/c73906480.lua +++ /dev/null @@ -1,58 +0,0 @@ ---武神降臨 -function c73906480.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c73906480.condition) - e1:SetTarget(c73906480.target) - e1:SetOperation(c73906480.activate) - c:RegisterEffect(e1) -end -function c73906480.condition(e,tp,eg,ep,ev,re,r,rp,chk) - return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 and Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0 -end -function c73906480.spfilter1(c,e,tp) - return c:IsSetCard(0x88) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c73906480.spfilter2(c,e,tp) - return c:IsFaceup() and c:IsSetCard(0x88) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c73906480.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>1 - and Duel.IsExistingTarget(c73906480.spfilter1,tp,LOCATION_GRAVE,0,1,nil,e,tp) - and Duel.IsExistingTarget(c73906480.spfilter2,tp,LOCATION_REMOVED,0,1,nil,e,tp) - end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g1=Duel.SelectTarget(tp,c73906480.spfilter1,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g2=Duel.SelectTarget(tp,c73906480.spfilter2,tp,LOCATION_REMOVED,0,1,1,nil,e,tp) - g1:Merge(g2) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g1,g1:GetCount(),0,0) -end -function c73906480.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 then return end - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) - if g:GetCount()~=2 then return end - local tc=g:GetFirst() - local c=e:GetHandler() - while tc do - Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetValue(c73906480.xyzlimit) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - tc=g:GetNext() - end - Duel.SpecialSummonComplete() -end -function c73906480.xyzlimit(e,c) - if not c then return false end - return not c:IsRace(RACE_BEAST+RACE_BEASTWARRIOR+RACE_WINDBEAST) -end diff --git a/script/c7391448.lua b/script/c7391448.lua deleted file mode 100644 index 3684392420..0000000000 --- a/script/c7391448.lua +++ /dev/null @@ -1,35 +0,0 @@ ---ゴヨウ・ガーディアン -function c7391448.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1) - c:EnableReviveLimit() - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(7391448,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetCode(EVENT_BATTLE_DESTROYING) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCondition(c7391448.spcon) - e1:SetTarget(c7391448.sptg) - e1:SetOperation(c7391448.spop) - c:RegisterEffect(e1) -end -function c7391448.spcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local bc=c:GetBattleTarget() - if not c:IsRelateToBattle() or c:IsFacedown() then return false end - return bc:IsLocation(LOCATION_GRAVE) and bc:IsType(TYPE_MONSTER) -end -function c7391448.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - local bc=e:GetHandler():GetBattleTarget() - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and bc:IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetTargetCard(bc) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,bc,1,0,LOCATION_GRAVE) -end -function c7391448.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENCE) - end -end diff --git a/script/c73915051.lua b/script/c73915051.lua deleted file mode 100644 index e11d3ec1aa..0000000000 --- a/script/c73915051.lua +++ /dev/null @@ -1,62 +0,0 @@ ---スケープ・ゴート -function c73915051.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_END_PHASE) - e1:SetCost(c73915051.cost) - e1:SetTarget(c73915051.target) - e1:SetOperation(c73915051.activate) - c:RegisterEffect(e1) -end -function c73915051.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_SUMMON)==0 - and Duel.GetActivityCount(tp,ACTIVITY_FLIPSUMMON)==0 and Duel.GetActivityCount(tp,ACTIVITY_SPSUMMON)==0 end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) - e1:SetTargetRange(1,0) - e1:SetLabelObject(e) - e1:SetTarget(c73915051.sumlimit) - Duel.RegisterEffect(e1,tp) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) - e2:SetCode(EFFECT_CANNOT_SUMMON) - e2:SetReset(RESET_PHASE+PHASE_END) - e2:SetTargetRange(1,0) - Duel.RegisterEffect(e2,tp) - local e3=e2:Clone() - e3:SetCode(EFFECT_CANNOT_FLIP_SUMMON) - Duel.RegisterEffect(e3,tp) -end -function c73915051.sumlimit(e,c,sump,sumtype,sumpos,targetp,se) - return e:GetLabelObject()~=se -end -function c73915051.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>3 - and Duel.IsPlayerCanSpecialSummonMonster(tp,73915052,0,0x4011,0,0,1,RACE_BEAST,ATTRIBUTE_EARTH) end - Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,4,0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,4,0,0) -end -function c73915051.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)>3 - and Duel.IsPlayerCanSpecialSummonMonster(tp,73915052,0,0x4011,0,0,1,RACE_BEAST,ATTRIBUTE_EARTH) then - for i=1,4 do - local token=Duel.CreateToken(tp,73915051+i) - Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP_DEFENCE) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UNRELEASABLE_SUM) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetValue(1) - e1:SetReset(RESET_EVENT+0x1fe0000) - token:RegisterEffect(e1,true) - end - Duel.SpecialSummonComplete() - end -end diff --git a/script/c7392745.lua b/script/c7392745.lua deleted file mode 100644 index 082442c563..0000000000 --- a/script/c7392745.lua +++ /dev/null @@ -1,25 +0,0 @@ ---チュウボーン -function c7392745.initial_effect(c) - --flip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(7392745,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP) - e1:SetTarget(c7392745.target) - e1:SetOperation(c7392745.operation) - c:RegisterEffect(e1) -end -function c7392745.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,3,0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,3,0,0) -end -function c7392745.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(1-tp,LOCATION_MZONE)<3 then return end - if not Duel.IsPlayerCanSpecialSummonMonster(tp,7392746,0,0x4011,100,300,1,RACE_ZOMBIE,ATTRIBUTE_EARTH,POS_FACEUP_DEFENCE,1-tp) then return end - for i=1,3 do - local token=Duel.CreateToken(tp,7392746) - Duel.SpecialSummonStep(token,0,tp,1-tp,false,false,POS_FACEUP_DEFENCE) - end - Duel.SpecialSummonComplete() -end diff --git a/script/c7394770.lua b/script/c7394770.lua deleted file mode 100644 index 3c49859b84..0000000000 --- a/script/c7394770.lua +++ /dev/null @@ -1,133 +0,0 @@ ---ブリリアント・フュージョン -function c7394770.initial_effect(c) - --activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,7394770+EFFECT_COUNT_CODE_OATH) - e1:SetTarget(c7394770.target) - e1:SetOperation(c7394770.activate) - c:RegisterEffect(e1) - --Destroy - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE) - e2:SetCode(EVENT_LEAVE_FIELD) - e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e2:SetOperation(c7394770.desop) - c:RegisterEffect(e2) - --atk - local e3=Effect.CreateEffect(c) - e3:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_SZONE) - e3:SetCountLimit(1) - e3:SetCondition(c7394770.atkcon) - e3:SetCost(c7394770.atkcost) - e3:SetTarget(c7394770.atktg) - e3:SetOperation(c7394770.atkop) - c:RegisterEffect(e3) -end -function c7394770.filter1(c,e) - return c:IsCanBeFusionMaterial() and c:IsAbleToGrave() and not c:IsImmuneToEffect(e) -end -function c7394770.filter2(c,e,tp,m,f,chkf) - return c:IsType(TYPE_FUSION) and c:IsSetCard(0x1047) and (not f or f(c)) - and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf) -end -function c7394770.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp - local mg1=Duel.GetMatchingGroup(Card.IsCanBeFusionMaterial,tp,LOCATION_DECK,0,nil) - local res=Duel.IsExistingMatchingCard(c7394770.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf) - if not res then - local ce=Duel.GetChainMaterial(tp) - if ce~=nil then - local fgroup=ce:GetTarget() - local mg2=fgroup(ce,e,tp) - local mf=ce:GetValue() - res=Duel.IsExistingMatchingCard(c7394770.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,chkf) - end - end - return res - end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function c7394770.activate(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp - local mg1=Duel.GetMatchingGroup(c7394770.filter1,tp,LOCATION_DECK,0,nil,e) - local sg1=Duel.GetMatchingGroup(c7394770.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf) - local mg2=nil - local sg2=nil - local ce=Duel.GetChainMaterial(tp) - if ce~=nil then - local fgroup=ce:GetTarget() - mg2=fgroup(ce,e,tp) - local mf=ce:GetValue() - sg2=Duel.GetMatchingGroup(c7394770.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,mf,chkf) - end - if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then - local sg=sg1:Clone() - if sg2 then sg:Merge(sg2) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local tg=sg:Select(tp,1,1,nil) - local tc=tg:GetFirst() - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetValue(0) - e1:SetReset(RESET_EVENT+0xfe0000) - tc:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_SET_DEFENCE_FINAL) - tc:RegisterEffect(e2) - if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then - local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf) - tc:SetMaterial(mat1) - Duel.SendtoGrave(mat1,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION) - Duel.BreakEffect() - Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP) - else - local mat2=Duel.SelectFusionMaterial(tp,tc,mg2,nil,chkf) - local fop=ce:GetOperation() - fop(ce,e,tp,tc,mat2) - end - tc:CompleteProcedure() - e:GetHandler():SetCardTarget(tc) - end -end -function c7394770.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetHandler():GetFirstCardTarget() - if tc and tc:IsLocation(LOCATION_MZONE) then - Duel.Destroy(tc,REASON_EFFECT) - end -end -function c7394770.atkcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetFirstCardTarget() -end -function c7394770.cfilter(c) - return c:IsType(TYPE_SPELL) and c:IsDiscardable() -end -function c7394770.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c7394770.cfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,c7394770.cfilter,1,1,REASON_COST+REASON_DISCARD,nil) -end -function c7394770.atktg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():GetFirstCardTarget() end -end -function c7394770.atkop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local tc=e:GetHandler():GetFirstCardTarget() - if not tc then return end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(tc:GetBaseAttack()) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END+RESET_OPPO_TURN) - tc:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_UPDATE_DEFENCE) - e2:SetValue(tc:GetBaseDefence()) - tc:RegisterEffect(e2) -end diff --git a/script/c73964868.lua b/script/c73964868.lua deleted file mode 100644 index c43c40d764..0000000000 --- a/script/c73964868.lua +++ /dev/null @@ -1,37 +0,0 @@ ---セイクリッド・プレアデス -function c73964868.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_LIGHT),5,2) - c:EnableReviveLimit() - --to hand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(73964868,0)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,0x1e0) - e1:SetCost(c73964868.thcost) - e1:SetTarget(c73964868.thtg) - e1:SetOperation(c73964868.thop) - c:RegisterEffect(e1) -end -function c73964868.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c73964868.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsAbleToHand() end - if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g=Duel.SelectTarget(tp,Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c73964868.thop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - end -end diff --git a/script/c73988674.lua b/script/c73988674.lua deleted file mode 100644 index c0fb137d59..0000000000 --- a/script/c73988674.lua +++ /dev/null @@ -1,32 +0,0 @@ ---三位一択 -function c73988674.initial_effect(c) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c73988674.target) - e1:SetOperation(c73988674.operation) - c:RegisterEffect(e1) -end -function c73988674.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_EXTRA,LOCATION_EXTRA)>0 end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CARDTYPE) - local op=Duel.SelectOption(tp,aux.Stringid(73988674,0),aux.Stringid(73988674,1),aux.Stringid(73988674,2)) - e:SetLabel(op) -end -function c73988674.operation(e,tp,eg,ep,ev,re,r,rp) - local g1=Duel.GetFieldGroup(tp,LOCATION_EXTRA,0) - Duel.ConfirmCards(1-tp,g1) - local g2=Duel.GetFieldGroup(tp,0,LOCATION_EXTRA) - Duel.ConfirmCards(tp,g2) - local tpe=0 - if e:GetLabel()==0 then tpe=TYPE_FUSION - elseif e:GetLabel()==1 then tpe=TYPE_SYNCHRO - else tpe=TYPE_XYZ end - local ct1=g1:FilterCount(Card.IsType,nil,tpe) - local ct2=g2:FilterCount(Card.IsType,nil,tpe) - if ct1>ct2 then - Duel.Recover(tp,3000,REASON_EFFECT) - elseif ct10 and Duel.SelectYesNo(tp,aux.Stringid(81788994,0))) then - fc:RemoveCounter(tp,0x16,3,REASON_EFFECT) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL) - g1=sg2:Select(tp,1,1,nil) - else - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL) - g1=sg1:Select(tp,1,1,nil) - end - Duel.SetFusionMaterial(g1) - return - end - local sg=eg:Filter(aux.FConditionFilterF2c,nil,c74009824.ffilter1,c74009824.ffilter2) - local g1=nil - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL) - if chkf~=PLAYER_NONE then - g1=sg:FilterSelect(tp,aux.FConditionCheckF,1,1,nil,chkf) - else g1=sg:Select(tp,1,1,nil) end - local tc1=g1:GetFirst() - local sg1=Group.CreateGroup() - local sg2=Group.CreateGroup() - if c74009824.ffilter1(tc1) then - sg1:Merge(sg:Filter(c74009824.ffilter2,tc1)) - sg2:Merge(exg:Filter(c74009824.ffilter2,tc1)) - end - if c74009824.ffilter2(tc1) then - sg1:Merge(sg:Filter(c74009824.ffilter1,tc1)) - sg2:Merge(exg:Filter(c74009824.ffilter1,tc1)) - end - local g2=nil - if sg1:GetCount()==0 or (sg2:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(81788994,0))) then - fc:RemoveCounter(tp,0x16,3,REASON_EFFECT) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL) - g2=sg2:Select(tp,1,1,nil) - else - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL) - g2=sg1:Select(tp,1,1,nil) - end - g1:Merge(g2) - Duel.SetFusionMaterial(g1) -end -function c74009824.splimit(e,se,sp,st) - return bit.band(st,SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION -end -function c74009824.indtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) end - if chk==0 then return Duel.IsExistingTarget(nil,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - Duel.SelectTarget(tp,nil,tp,LOCATION_MZONE,0,1,1,nil) -end -function c74009824.indop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetValue(c74009824.indval) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - tc:RegisterEffect(e1) - end -end -function c74009824.indval(e,c) - return bit.band(c:GetSummonType(),SUMMON_TYPE_SPECIAL)==SUMMON_TYPE_SPECIAL -end -function c74009824.thfilter(c) - return c:IsSetCard(0x9d) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand() -end -function c74009824.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c74009824.thfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c74009824.thfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c74009824.thfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c74009824.thop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end diff --git a/script/c74010769.lua b/script/c74010769.lua deleted file mode 100644 index 772a5dbb14..0000000000 --- a/script/c74010769.lua +++ /dev/null @@ -1,28 +0,0 @@ ---陽炎獣 グリプス -function c74010769.initial_effect(c) - --cannot be target - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetValue(aux.tgoval) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_SPSUMMON_PROC) - e2:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e2:SetRange(LOCATION_HAND) - e2:SetCondition(c74010769.spcon) - c:RegisterEffect(e2) -end -function c74010769.cfilter(c) - return (c:IsFacedown() or not c:IsAttribute(ATTRIBUTE_FIRE)) and c:IsType(TYPE_MONSTER) -end -function c74010769.spcon(e,c) - if c==nil then return true end - return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 - and Duel.GetFieldGroupCount(c:GetControler(),0,LOCATION_MZONE)>0 - and not Duel.IsExistingMatchingCard(c74010769.cfilter,c:GetControler(),LOCATION_MZONE+LOCATION_GRAVE,0,1,nil) -end diff --git a/script/c74029853.lua b/script/c74029853.lua deleted file mode 100644 index b15280f578..0000000000 --- a/script/c74029853.lua +++ /dev/null @@ -1,29 +0,0 @@ ---黄金色の竹光 -function c74029853.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c74029853.condition) - e1:SetTarget(c74029853.target) - e1:SetOperation(c74029853.activate) - c:RegisterEffect(e1) -end -function c74029853.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x60) and c:IsType(TYPE_EQUIP) -end -function c74029853.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c74029853.cfilter,tp,LOCATION_ONFIELD,0,1,nil) -end -function c74029853.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp,2) end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(2) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2) -end -function c74029853.activate(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end diff --git a/script/c7405310.lua b/script/c7405310.lua deleted file mode 100644 index f350b92e5b..0000000000 --- a/script/c7405310.lua +++ /dev/null @@ -1,37 +0,0 @@ ---エクストラゲート -function c7405310.initial_effect(c) - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_REMOVE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c7405310.target) - e1:SetOperation(c7405310.operation) - c:RegisterEffect(e1) -end -function c7405310.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)~=0 - and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_EXTRA,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,567) - local lv=Duel.AnnounceNumber(tp,1,2,3,4,5,6,7,8,9,10,11,12) - e:SetLabel(lv) -end -function c7405310.filter(c,lv) - return c:GetLevel()==lv -end -function c7405310.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c7405310.filter,1-tp,LOCATION_EXTRA,0,nil,e:GetLabel()) - if g:GetCount()~=0 then - Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_REMOVE) - local rg=g:FilterSelect(1-tp,Card.IsAbleToRemove,1,1,nil) - if rg:GetCount()~=0 then - Duel.Remove(rg,POS_FACEUP,REASON_EFFECT) - else - local cg=Duel.GetFieldGroup(1-tp,LOCATION_EXTRA,0) - Duel.ConfirmCards(tp,cg) - end - else - local cg=Duel.GetFieldGroup(1-tp,LOCATION_EXTRA,0) - Duel.ConfirmCards(tp,cg) - Duel.DiscardHand(tp,aux.TRUE,1,1,REASON_EFFECT+REASON_DISCARD) - end -end diff --git a/script/c74064212.lua b/script/c74064212.lua deleted file mode 100644 index e4e22c4776..0000000000 --- a/script/c74064212.lua +++ /dev/null @@ -1,60 +0,0 @@ ---ヴァイロン・プリズム -function c74064212.initial_effect(c) - --equip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(74064212,0)) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCondition(c74064212.eqcon) - e1:SetCost(c74064212.eqcost) - e1:SetTarget(c74064212.eqtg) - e1:SetOperation(c74064212.eqop) - c:RegisterEffect(e1) - --atkup - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetCondition(c74064212.atkcon) - e2:SetValue(1000) - c:RegisterEffect(e2) -end -function c74064212.eqcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:GetPreviousLocation()==LOCATION_MZONE -end -function c74064212.eqcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,500) end - Duel.PayLPCost(tp,500) -end -function c74064212.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:IsFaceup() end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,nil) -end -function c74064212.eqop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsRelateToEffect(e) then - Duel.Equip(tp,c,tc) - --equip limit - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetValue(c74064212.eqlimit) - e1:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e1) - end -end -function c74064212.eqlimit(e,c) - return c:GetControler()==e:GetHandlerPlayer() or e:GetHandler():GetEquipTarget()==c -end -function c74064212.atkcon(e) - local ph=Duel.GetCurrentPhase() - local ec=e:GetHandler():GetEquipTarget() - return ec and (ph==PHASE_DAMAGE or ph==PHASE_DAMAGE_CAL) and ec:IsRelateToBattle() -end diff --git a/script/c74069667.lua b/script/c74069667.lua deleted file mode 100644 index e2dd0be41a..0000000000 --- a/script/c74069667.lua +++ /dev/null @@ -1,119 +0,0 @@ ---DDD壊薙王アビス・ラグナロク -function c74069667.initial_effect(c) - --pendulum summon - aux.AddPendulumProcedure(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) - e2:SetRange(LOCATION_PZONE) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetCountLimit(1,74069667) - e2:SetCondition(c74069667.spcon1) - e2:SetTarget(c74069667.sptg1) - e2:SetOperation(c74069667.spop1) - c:RegisterEffect(e2) - --spsummon - local e3=Effect.CreateEffect(c) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_SUMMON_SUCCESS) - e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) - e3:SetCountLimit(1,74069668) - e3:SetTarget(c74069667.sptg2) - e3:SetOperation(c74069667.spop2) - c:RegisterEffect(e3) - local e4=e3:Clone() - e4:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e4) - --remove - local e5=Effect.CreateEffect(c) - e5:SetCategory(CATEGORY_REMOVE) - e5:SetType(EFFECT_TYPE_IGNITION) - e5:SetProperty(EFFECT_FLAG_CARD_TARGET) - e5:SetRange(LOCATION_MZONE) - e5:SetCountLimit(1) - e5:SetCost(c74069667.rmcost) - e5:SetTarget(c74069667.rmtg) - e5:SetOperation(c74069667.rmop) - c:RegisterEffect(e5) -end -function c74069667.cfilter(c,tp) - return c:IsFaceup() and c:IsSetCard(0xaf) and c:GetSummonPlayer()==tp -end -function c74069667.spcon1(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c74069667.cfilter,1,nil,tp) -end -function c74069667.spfilter1(c,e,tp) - return c:IsSetCard(0xaf) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c74069667.sptg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c74069667.spfilter1(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c74069667.spfilter1,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c74069667.spfilter1,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,tp,1000) -end -function c74069667.spop1(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)~=0 then - Duel.Damage(tp,1000,REASON_EFFECT) - end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CHANGE_DAMAGE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetTargetRange(0,1) - e1:SetValue(c74069667.val) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function c74069667.val(e,re,dam,r,rp,rc) - if bit.band(r,REASON_BATTLE)~=0 then - return dam/2 - else return dam end -end -function c74069667.spfilter2(c,e,tp) - return c:IsSetCard(0x10af) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c74069667.sptg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c74069667.spfilter2(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c74069667.spfilter2,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c74069667.spfilter2,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c74069667.spop2(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end -function c74069667.rmcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsSetCard,1,e:GetHandler(),0xaf) end - local g=Duel.SelectReleaseGroup(tp,Card.IsSetCard,1,1,e:GetHandler(),0xaf) - Duel.Release(g,REASON_COST) -end -function c74069667.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsAbleToRemove() end - if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) -end -function c74069667.rmop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) - end -end diff --git a/script/c74094021.lua b/script/c74094021.lua deleted file mode 100644 index b7dd5713ce..0000000000 --- a/script/c74094021.lua +++ /dev/null @@ -1,49 +0,0 @@ ---真六武衆-ミズホ -function c74094021.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c74094021.spcon) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(74094021,0)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetCountLimit(1) - e2:SetRange(LOCATION_MZONE) - e2:SetCost(c74094021.cost) - e2:SetTarget(c74094021.target) - e2:SetOperation(c74094021.operation) - c:RegisterEffect(e2) -end -function c74094021.spfilter(c) - return c:IsFaceup() and c:IsCode(48505422) -end -function c74094021.spcon(e,c) - if c==nil then return true end - return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and - Duel.IsExistingMatchingCard(c74094021.spfilter,c:GetControler(),LOCATION_ONFIELD,0,1,nil) -end -function c74094021.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsSetCard,1,e:GetHandler(),0x3d) end - local sg=Duel.SelectReleaseGroup(tp,Card.IsSetCard,1,1,e:GetHandler(),0x3d) - Duel.Release(sg,REASON_COST) -end -function c74094021.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsDestructable() end - if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c74094021.operation(e,tp,eg,ep,ev,re,r,rp,chk) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c74095602.lua b/script/c74095602.lua deleted file mode 100644 index d308f76914..0000000000 --- a/script/c74095602.lua +++ /dev/null @@ -1,31 +0,0 @@ ---英雄変化-リフレクター・レイ -function c74095602.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetCondition(c74095602.condition) - e1:SetTarget(c74095602.target) - e1:SetOperation(c74095602.activate) - c:RegisterEffect(e1) -end -function c74095602.condition(e,tp,eg,ep,ev,re,r,rp,chk) - local tc=eg:GetFirst() - return tc:GetPreviousControler()==tp and tc:IsType(TYPE_FUSION) and tc:IsSetCard(0x3008) - and tc:IsLocation(LOCATION_GRAVE) and tc:IsReason(REASON_BATTLE) -end -function c74095602.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local tc=eg:GetFirst() - local lv=tc:GetLevel() - e:SetLabel(lv) - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(lv*300) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,lv*300) -end -function c74095602.activate(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c7409792.lua b/script/c7409792.lua deleted file mode 100644 index ec12dab921..0000000000 --- a/script/c7409792.lua +++ /dev/null @@ -1,56 +0,0 @@ ---俊足なカバ バリキテリウム -function c7409792.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(1,7409792) - e1:SetCondition(c7409792.spcon) - e1:SetValue(1) - c:RegisterEffect(e1) - --spsummon success - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetOperation(c7409792.trigop) - c:RegisterEffect(e2) - --spsummon - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(7409792,0)) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_EVENT_PLAYER) - e3:SetCode(7409792) - e3:SetTarget(c7409792.target) - e3:SetOperation(c7409792.operation) - c:RegisterEffect(e3) -end -function c7409792.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 -end -function c7409792.trigop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+1 then - Duel.RaiseSingleEvent(e:GetHandler(),7409792,e,r,rp,1-tp,0) - end -end -function c7409792.filter(c,e,tp) - return c:GetLevel()==4 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c7409792.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and c7409792.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c7409792.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c7409792.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c7409792.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c74100225.lua b/script/c74100225.lua deleted file mode 100644 index 8e1dcbd552..0000000000 --- a/script/c74100225.lua +++ /dev/null @@ -1,45 +0,0 @@ ---進化の特異点 -function c74100225.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c74100225.target) - e1:SetOperation(c74100225.activate) - c:RegisterEffect(e1) -end -function c74100225.filter(c,cat) - return c:IsSetCard(cat) and c:IsType(TYPE_MONSTER) -end -function c74100225.spfilter(c,e,tp) - return c:IsSetCard(0x504e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c74100225.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c74100225.filter,tp,LOCATION_GRAVE,0,1,nil,0x304e) - and Duel.IsExistingTarget(c74100225.filter,tp,LOCATION_GRAVE,0,1,nil,0x604e) - and Duel.IsExistingMatchingCard(c74100225.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL) - local g1=Duel.SelectTarget(tp,c74100225.filter,tp,LOCATION_GRAVE,0,1,1,nil,0x304e) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL) - local g2=Duel.SelectTarget(tp,c74100225.filter,tp,LOCATION_GRAVE,0,1,1,nil,0x604e) - g1:Merge(g2) - Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g1,2,0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function c74100225.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local g=Duel.GetMatchingGroup(c74100225.spfilter,tp,LOCATION_EXTRA,0,nil,e,tp) - if g:GetCount()==0 then return end - local mg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) - if mg:GetCount()~=2 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=g:Select(tp,1,1,nil) - local sc=sg:GetFirst() - if sc then - Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP) - Duel.Overlay(sc,mg) - end -end diff --git a/script/c74115234.lua b/script/c74115234.lua deleted file mode 100644 index c689165054..0000000000 --- a/script/c74115234.lua +++ /dev/null @@ -1,96 +0,0 @@ ---八尺勾玉 -function c74115234.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c74115234.target) - e1:SetOperation(c74115234.operation) - c:RegisterEffect(e1) - --recover - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(74115234,0)) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetCategory(CATEGORY_RECOVER) - e2:SetCode(EVENT_BATTLE_DESTROYING) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetRange(LOCATION_SZONE) - e2:SetCondition(c74115234.recon) - e2:SetTarget(c74115234.retg) - e2:SetOperation(c74115234.reop) - c:RegisterEffect(e2) - --Equip limit - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_EQUIP_LIMIT) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e3:SetValue(c74115234.eqlimit) - c:RegisterEffect(e3) - --tohand - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(74115234,1)) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e4:SetCategory(CATEGORY_TOHAND) - e4:SetCode(EVENT_TO_GRAVE) - e4:SetCondition(c74115234.retcon) - e4:SetTarget(c74115234.rettg) - e4:SetOperation(c74115234.retop) - c:RegisterEffect(e4) -end -function c74115234.eqlimit(e,c) - return c:IsType(TYPE_SPIRIT) -end -function c74115234.filter(c) - return c:IsFaceup() and c:IsType(TYPE_SPIRIT) -end -function c74115234.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c74115234.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c74115234.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c74115234.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) -end -function c74115234.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,c,tc) - end -end -function c74115234.recon(e,tp,eg,ep,ev,re,r,rp) - local ec=eg:GetFirst() - local bc=ec:GetBattleTarget() - e:SetLabelObject(bc) - return e:GetHandler():GetEquipTarget()==eg:GetFirst() and ec:IsControler(tp) - and bc:IsLocation(LOCATION_GRAVE) and bc:IsType(TYPE_MONSTER) and bc:IsReason(REASON_BATTLE) -end -function c74115234.retg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local v=e:GetLabelObject():GetBaseAttack() - if v<0 then v=0 end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(v) - Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,v) -end -function c74115234.reop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Recover(p,d,REASON_EFFECT) -end -function c74115234.retcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local ec=c:GetPreviousEquipTarget() - return c:IsReason(REASON_LOST_TARGET) and ec and ec:IsLocation(LOCATION_HAND) and ec:GetPreviousControler()==tp -end -function c74115234.rettg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToHand() end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0) -end -function c74115234.retop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SendtoHand(c,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,c) - end -end diff --git a/script/c74117290.lua b/script/c74117290.lua deleted file mode 100644 index db953e6df3..0000000000 --- a/script/c74117290.lua +++ /dev/null @@ -1,29 +0,0 @@ ---暗黒界の取引 -function c74117290.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_HANDES+CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c74117290.target) - e1:SetOperation(c74117290.activate) - c:RegisterEffect(e1) -end -function c74117290.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp,1) and Duel.IsPlayerCanDraw(1-tp,1) end - Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,PLAYER_ALL,1) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,PLAYER_ALL,1) -end -function c74117290.activate(e,tp,eg,ep,ev,re,r,rp) - local h1=Duel.Draw(tp,1,REASON_EFFECT) - local h2=Duel.Draw(1-tp,1,REASON_EFFECT) - if h1>0 or h2>0 then Duel.BreakEffect() end - if h1>0 then - Duel.ShuffleHand(tp) - Duel.DiscardHand(tp,aux.TRUE,1,1,REASON_EFFECT+REASON_DISCARD) - end - if h2>0 then - Duel.ShuffleHand(1-tp) - Duel.DiscardHand(1-tp,aux.TRUE,1,1,REASON_EFFECT+REASON_DISCARD) - end -end diff --git a/script/c74122412.lua b/script/c74122412.lua deleted file mode 100644 index 313a1881a5..0000000000 --- a/script/c74122412.lua +++ /dev/null @@ -1,84 +0,0 @@ ---グングニールの影霊衣 -function c74122412.initial_effect(c) - c:EnableReviveLimit() - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(aux.ritlimit) - c:RegisterEffect(e1) - --indes - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetRange(LOCATION_HAND) - e2:SetCountLimit(1,74122412) - e2:SetCost(c74122412.indcost) - e2:SetTarget(c74122412.indtg) - e2:SetOperation(c74122412.indop) - c:RegisterEffect(e2) - --destroy - local e3=Effect.CreateEffect(c) - e3:SetCategory(CATEGORY_DESTROY) - e3:SetType(EFFECT_TYPE_QUICK_O) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetCode(EVENT_FREE_CHAIN) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1,74122413) - e3:SetCost(c74122412.descost) - e3:SetTarget(c74122412.destg) - e3:SetOperation(c74122412.desop) - c:RegisterEffect(e3) -end -function c74122412.mat_filter(c) - return c:GetLevel()~=7 -end -function c74122412.indcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsDiscardable() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD) -end -function c74122412.filter(c) - return c:IsFaceup() and c:IsSetCard(0xb4) -end -function c74122412.indtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c74122412.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c74122412.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c74122412.filter,tp,LOCATION_MZONE,0,1,1,nil) -end -function c74122412.indop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - e1:SetValue(1) - tc:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - tc:RegisterEffect(e2) - end -end -function c74122412.cfilter(c) - return c:IsSetCard(0xb4) and c:IsDiscardable() -end -function c74122412.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c74122412.cfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,c74122412.cfilter,1,1,REASON_COST+REASON_DISCARD) -end -function c74122412.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsDestructable() end - if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c74122412.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c74130411.lua b/script/c74130411.lua deleted file mode 100644 index 52b7103a9e..0000000000 --- a/script/c74130411.lua +++ /dev/null @@ -1,37 +0,0 @@ ---バイオファルコン -function c74130411.initial_effect(c) - --search - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(74130411,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetRange(LOCATION_MZONE) - e1:SetProperty(EFFECT_FLAG_DELAY) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetCondition(c74130411.thcon) - e1:SetTarget(c74130411.thtg) - e1:SetOperation(c74130411.thop) - c:RegisterEffect(e1) -end -function c74130411.cfilter(c,tp) - return c:GetPreviousControler()==tp and c:IsLocation(LOCATION_GRAVE) and c:IsRace(RACE_MACHINE) and c:IsReason(REASON_BATTLE) -end -function c74130411.thcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c74130411.cfilter,1,nil,tp) -end -function c74130411.filter(c) - return c:IsAttackBelow(1000) and c:IsRace(RACE_MACHINE) and c:IsAbleToHand() -end -function c74130411.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsRelateToEffect(e) and e:GetHandler():IsFaceup() - and Duel.IsExistingMatchingCard(c74130411.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c74130411.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c74130411.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end \ No newline at end of file diff --git a/script/c74131780.lua b/script/c74131780.lua deleted file mode 100644 index c233c0769c..0000000000 --- a/script/c74131780.lua +++ /dev/null @@ -1,31 +0,0 @@ ---ならず者傭兵部隊 -function c74131780.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(74131780,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c74131780.cost) - e1:SetTarget(c74131780.target) - e1:SetOperation(c74131780.operation) - c:RegisterEffect(e1) -end -function c74131780.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end -function c74131780.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsDestructable() end - if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,LOCATION_MZONE,LOCATION_MZONE,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c74131780.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c74137509.lua b/script/c74137509.lua deleted file mode 100644 index 97a965cc5c..0000000000 --- a/script/c74137509.lua +++ /dev/null @@ -1,40 +0,0 @@ ---天使のサイコロ -function c74137509.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetCondition(c74137509.condition) - e1:SetTarget(c74137509.target) - e1:SetOperation(c74137509.activate) - c:RegisterEffect(e1) -end -function c74137509.condition(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetCurrentPhase()==PHASE_DAMAGE and Duel.IsDamageCalculated() then return false end - return true -end -function c74137509.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end -end -function c74137509.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil) - if g:GetCount()>0 then - local d=Duel.TossDice(tp,1) - local sc=g:GetFirst() - while sc do - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - e1:SetValue(d*100) - sc:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_UPDATE_DEFENCE) - sc:RegisterEffect(e2) - sc=g:GetNext() - end - end -end diff --git a/script/c74153887.lua b/script/c74153887.lua deleted file mode 100644 index bdd31a1f24..0000000000 --- a/script/c74153887.lua +++ /dev/null @@ -1,59 +0,0 @@ ---黒蠍-棘のミーネ -function c74153887.initial_effect(c) - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(74153887,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_BATTLE_DAMAGE) - e1:SetCondition(c74153887.condition) - e1:SetTarget(c74153887.target) - e1:SetOperation(c74153887.operation) - c:RegisterEffect(e1) -end -function c74153887.condition(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp -end -function c74153887.filter(c) - return c:IsSetCard(0x1a) and c:IsAbleToHand() -end -function c74153887.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c74153887.filter(chkc) end - if chk==0 then return Duel.IsExistingMatchingCard(c74153887.filter,tp,LOCATION_DECK,0,1,nil) - or Duel.IsExistingTarget(c74153887.filter,tp,LOCATION_GRAVE,0,1,nil) end - local op=0 - if Duel.IsExistingMatchingCard(c74153887.filter,tp,LOCATION_DECK,0,1,nil) - and Duel.IsExistingTarget(c74153887.filter,tp,LOCATION_GRAVE,0,1,nil) then - op=Duel.SelectOption(tp,aux.Stringid(74153887,1),aux.Stringid(74153887,2)) - elseif Duel.IsExistingTarget(c74153887.filter,tp,LOCATION_GRAVE,0,1,nil) then - Duel.SelectOption(tp,aux.Stringid(74153887,2)) - op=1 - else - Duel.SelectOption(tp,aux.Stringid(74153887,1)) - op=0 - end - e:SetLabel(op) - if op==1 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c74153887.filter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) - e:SetProperty(EFFECT_FLAG_CARD_TARGET) - else - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) - e:SetProperty(0) - end -end -function c74153887.operation(e,tp,eg,ep,ev,re,r,rp) - if e:GetLabel()==1 then - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - end - else - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c74153887.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end - end -end diff --git a/script/c74157028.lua b/script/c74157028.lua deleted file mode 100644 index 0856091005..0000000000 --- a/script/c74157028.lua +++ /dev/null @@ -1,12 +0,0 @@ ---サイバー・ツイン・ドラゴン -function c74157028.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcCodeRep(c,70095154,2,false,false) - --extra att - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_EXTRA_ATTACK) - e2:SetValue(1) - c:RegisterEffect(e2) -end diff --git a/script/c74168099.lua b/script/c74168099.lua deleted file mode 100644 index a4c9535708..0000000000 --- a/script/c74168099.lua +++ /dev/null @@ -1,56 +0,0 @@ ---炎星侯-ホウシン -function c74168099.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_FIRE),aux.NonTuner(nil),1) - c:EnableReviveLimit() - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(74168099,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(c74168099.spcon) - e1:SetTarget(c74168099.sptg) - e1:SetOperation(c74168099.spop) - c:RegisterEffect(e1) - --cannot spsummon - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetCondition(c74168099.spcon) - e2:SetOperation(c74168099.regop) - c:RegisterEffect(e2) -end -function c74168099.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_SYNCHRO -end -function c74168099.spfilter(c,e,tp) - return c:IsAttribute(ATTRIBUTE_FIRE) and c:GetLevel()==3 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c74168099.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c74168099.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c74168099.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c74168099.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end -function c74168099.regop(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) - e1:SetTargetRange(1,0) - e1:SetTarget(c74168099.splimit) - e1:SetLabelObject(e) - Duel.RegisterEffect(e1,tp) -end -function c74168099.splimit(e,c,sump,sumtype,sumpos,targetp,se) - return c:IsLevelAbove(5) -end diff --git a/script/c74191942.lua b/script/c74191942.lua deleted file mode 100644 index da39ca6b86..0000000000 --- a/script/c74191942.lua +++ /dev/null @@ -1,26 +0,0 @@ ---苦渋の選択 -function c74191942.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c74191942.target) - e1:SetOperation(c74191942.activate) - c:RegisterEffect(e1) -end -function c74191942.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,LOCATION_DECK,0,5,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c74191942.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(74191942,0)) - local g=Duel.SelectMatchingCard(tp,Card.IsAbleToHand,tp,LOCATION_DECK,0,5,5,nil) - if g:GetCount()<5 then return end - Duel.ConfirmCards(1-tp,g) - Duel.Hint(HINT_SELECTMSG,1-tp,aux.Stringid(74191942,1)) - local sg=g:Select(1-tp,1,1,nil) - Duel.SendtoHand(sg,nil,REASON_EFFECT) - g:Sub(sg) - Duel.SendtoGrave(g,REASON_EFFECT) -end diff --git a/script/c74203495.lua b/script/c74203495.lua deleted file mode 100644 index f0a6d610c0..0000000000 --- a/script/c74203495.lua +++ /dev/null @@ -1,88 +0,0 @@ ---PSYフレームギア・δ -function c74203495.initial_effect(c) - c:EnableUnsummonable() - --splimit - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(c74203495.splimit) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(74203495,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_NEGATE+CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_QUICK_O) - e2:SetRange(LOCATION_HAND) - e2:SetCode(EVENT_CHAINING) - e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) - e2:SetCondition(c74203495.condition) - e2:SetTarget(c74203495.target) - e2:SetOperation(c74203495.operation) - c:RegisterEffect(e2) -end -function c74203495.splimit(e,se,sp,st) - return se:IsHasType(EFFECT_TYPE_ACTIONS) -end -function c74203495.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 and ep~=tp and re:IsActiveType(TYPE_SPELL) and re:IsHasType(EFFECT_TYPE_ACTIVATE) - and Duel.IsChainNegatable(ev) -end -function c74203495.spfilter(c,e,tp) - return c:IsCode(49036338) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c74203495.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return not e:GetHandler():IsStatus(STATUS_CHAINING) and Duel.GetLocationCount(tp,LOCATION_MZONE)>1 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) - and Duel.IsExistingMatchingCard(c74203495.spfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE) - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) - end -end -function c74203495.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 or not e:GetHandler():IsRelateToEffect(e) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c74203495.spfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp) - if g:FilterCount(aux.nvfilter,nil)==0 then return end - local tc=g:GetFirst() - local c=e:GetHandler() - local fid=c:GetFieldID() - Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) - Duel.SpecialSummonStep(c,0,tp,tp,false,false,POS_FACEUP) - tc:RegisterFlagEffect(74203495,RESET_EVENT+0x1fe0000,0,1,fid) - c:RegisterFlagEffect(74203495,RESET_EVENT+0x1fe0000,0,1,fid) - Duel.SpecialSummonComplete() - g:AddCard(c) - g:KeepAlive() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetCountLimit(1) - e1:SetLabel(fid) - e1:SetLabelObject(g) - e1:SetCondition(c74203495.rmcon) - e1:SetOperation(c74203495.rmop) - Duel.RegisterEffect(e1,tp) - Duel.NegateActivation(ev) - if re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(eg,REASON_EFFECT) - end -end -function c74203495.rmfilter(c,fid) - return c:GetFlagEffectLabel(74203495)==fid -end -function c74203495.rmcon(e,tp,eg,ep,ev,re,r,rp) - local g=e:GetLabelObject() - if not g:IsExists(c74203495.rmfilter,1,nil,e:GetLabel()) then - g:DeleteGroup() - e:Reset() - return false - else return true end -end -function c74203495.rmop(e,tp,eg,ep,ev,re,r,rp) - local g=e:GetLabelObject() - local tg=g:Filter(c74203495.rmfilter,nil,e:GetLabel()) - Duel.Remove(tg,POS_FACEUP,REASON_EFFECT) -end diff --git a/script/c74270067.lua b/script/c74270067.lua deleted file mode 100644 index 6f51465e41..0000000000 --- a/script/c74270067.lua +++ /dev/null @@ -1,27 +0,0 @@ ---ピケルの魔法陣 -function c74270067.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetOperation(c74270067.operation) - c:RegisterEffect(e1) -end -function c74270067.operation(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CHANGE_DAMAGE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetTargetRange(1,0) - e1:SetValue(c74270067.damval) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) - local e2=e1:Clone() - e2:SetCode(EFFECT_NO_EFFECT_DAMAGE) - e2:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e2,tp) -end -function c74270067.damval(e,re,val,r,rp,rc) - if bit.band(r,REASON_EFFECT)~=0 then return 0 - else return val end -end diff --git a/script/c74294676.lua b/script/c74294676.lua deleted file mode 100644 index 923f41248a..0000000000 --- a/script/c74294676.lua +++ /dev/null @@ -1,72 +0,0 @@ ---エヴォルカイザー・ラギア -function c74294676.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsRace,RACE_DINOSAUR),4,2) - c:EnableReviveLimit() - --negate activate - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(74294676,0)) - e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EVENT_CHAINING) - e1:SetCondition(c74294676.condition1) - e1:SetCost(c74294676.cost1) - e1:SetTarget(c74294676.target1) - e1:SetOperation(c74294676.operation1) - c:RegisterEffect(e1) - --disable summon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(74294676,1)) - e2:SetCategory(CATEGORY_DISABLE_SUMMON+CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EVENT_SUMMON) - e2:SetCondition(c74294676.condition2) - e2:SetCost(c74294676.cost2) - e2:SetTarget(c74294676.target2) - e2:SetOperation(c74294676.operation2) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetDescription(aux.Stringid(74294676,2)) - e3:SetCode(EVENT_SPSUMMON) - c:RegisterEffect(e3) -end -function c74294676.condition1(e,tp,eg,ep,ev,re,r,rp) - return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) - and re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev) -end -function c74294676.cost1(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,2,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,2,2,REASON_COST) -end -function c74294676.target1(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) - end -end -function c74294676.operation1(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateActivation(ev) - if re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(eg,REASON_EFFECT) - end -end -function c74294676.condition2(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentChain()==0 -end -function c74294676.cost2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,2,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,2,2,REASON_COST) -end -function c74294676.target2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DISABLE_SUMMON,eg,eg:GetCount(),0,0) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,eg:GetCount(),0,0) -end -function c74294676.operation2(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateSummon(eg) - Duel.Destroy(eg,REASON_EFFECT) -end diff --git a/script/c74298287.lua b/script/c74298287.lua deleted file mode 100644 index 448b833b73..0000000000 --- a/script/c74298287.lua +++ /dev/null @@ -1,66 +0,0 @@ ---水精鱗-アビスディーネ -function c74298287.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(74298287,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DELAY) - e1:SetCode(EVENT_TO_HAND) - e1:SetCountLimit(1,74298287) - e1:SetCondition(c74298287.spcon1) - e1:SetTarget(c74298287.sptg1) - e1:SetOperation(c74298287.spop1) - c:RegisterEffect(e1) - -- - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(74298287,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetCountLimit(1,74298287) - e2:SetCondition(c74298287.spcon2) - e2:SetTarget(c74298287.sptg2) - e2:SetOperation(c74298287.spop2) - c:RegisterEffect(e2) -end -function c74298287.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x74) -end -function c74298287.spcon1(e,tp,eg,ep,ev,re,r,rp) - return bit.band(r,REASON_EFFECT)~=0 and e:GetHandler():IsPreviousLocation(LOCATION_DECK+LOCATION_GRAVE) - and Duel.IsExistingMatchingCard(c74298287.cfilter,tp,LOCATION_MZONE,0,1,nil) -end -function c74298287.sptg1(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c74298287.spop1(e,tp,eg,ep,ev,re,r,rp) - if not Duel.IsExistingMatchingCard(c74298287.cfilter,tp,LOCATION_MZONE,0,1,nil) then return end - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) - end -end -function c74298287.spcon2(e,tp,eg,ep,ev,re,r,rp) - return re:IsActiveType(TYPE_MONSTER) and re:GetHandler():IsSetCard(0x74) -end -function c74298287.spfilter(c,e,tp) - return c:IsSetCard(0x74) and c:IsLevelBelow(3) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c74298287.sptg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c74298287.spfilter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c74298287.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c74298287.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c74298287.spop2(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c74311226.lua b/script/c74311226.lua deleted file mode 100644 index 019361a229..0000000000 --- a/script/c74311226.lua +++ /dev/null @@ -1,43 +0,0 @@ ---海皇の竜騎隊 -function c74311226.initial_effect(c) - --direct attack - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_DIRECT_ATTACK) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetTarget(c74311226.datg) - c:RegisterEffect(e1) - --search - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(74311226,0)) - e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetCondition(c74311226.thcon) - e2:SetTarget(c74311226.thtg) - e2:SetOperation(c74311226.thop) - c:RegisterEffect(e2) -end -function c74311226.datg(e,c) - return c:IsLevelBelow(3) and c:IsRace(RACE_SEASERPENT) -end -function c74311226.thcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsReason(REASON_COST) and re:IsHasType(0x7e0) and re:IsActiveType(TYPE_MONSTER) - and re:GetHandler():IsAttribute(ATTRIBUTE_WATER) -end -function c74311226.thfilter(c) - return not c:IsCode(74311226) and c:IsRace(RACE_SEASERPENT) and c:IsAbleToHand() -end -function c74311226.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c74311226.thop(e,tp,eg,ep,ev,re,r,rp,c) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c74311226.thfilter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c74329404.lua b/script/c74329404.lua deleted file mode 100644 index 1c342579c1..0000000000 --- a/script/c74329404.lua +++ /dev/null @@ -1,73 +0,0 @@ ---D-フォーメーション -function c74329404.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --counter - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetRange(LOCATION_SZONE) - e2:SetCode(EVENT_DESTROYED) - e2:SetCondition(c74329404.ctcon) - e2:SetOperation(c74329404.ctop) - c:RegisterEffect(e2) - --search - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(74329404,0)) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e3:SetRange(LOCATION_SZONE) - e3:SetCode(EVENT_SUMMON_SUCCESS) - e3:SetCondition(c74329404.thcon) - e3:SetCost(c74329404.thcost) - e3:SetTarget(c74329404.thtg) - e3:SetOperation(c74329404.thop) - c:RegisterEffect(e3) - local e4=e3:Clone() - e4:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e4) -end -function c74329404.ctfilter(c,tp) - return c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousSetCard(0xc008) -end -function c74329404.ctcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c74329404.ctfilter,1,nil,tp) -end -function c74329404.ctop(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():AddCounter(0x1c,1) -end -function c74329404.thcon(e,tp,eg,ep,ev,re,r,rp) - local ph=Duel.GetCurrentPhase() - return Duel.GetTurnPlayer()==tp and (ph==PHASE_MAIN1 or ph==PHASE_MAIN2) -end -function c74329404.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() and e:GetHandler():GetCounter(0x1c)>=2 end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end -function c74329404.filter1(c,e,tp) - return c:IsFaceup() and (not e or c:IsRelateToEffect(e)) - and Duel.IsExistingMatchingCard(c74329404.filter2,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,c:GetCode()) -end -function c74329404.filter2(c,code) - return c:IsCode(code) and c:IsAbleToHand() and not c:IsHasEffect(EFFECT_NECRO_VALLEY) -end -function c74329404.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return eg:IsExists(c74329404.filter1,1,nil,nil,tp) end - Duel.SetTargetCard(eg) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE) -end -function c74329404.thop(e,tp,eg,ep,ev,re,r,rp) - local g=eg:Filter(c74329404.filter1,nil,e,tp) - if g:GetCount()==0 then return end - if g:GetCount()>1 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - g=g:Select(tp,1,1,nil) - end - local tc=g:GetFirst() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local ag=Duel.SelectMatchingCard(tp,c74329404.filter2,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,2,nil,tc:GetCode()) - Duel.SendtoHand(ag,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,ag) -end diff --git a/script/c74335036.lua b/script/c74335036.lua deleted file mode 100644 index 93bf099510..0000000000 --- a/script/c74335036.lua +++ /dev/null @@ -1,102 +0,0 @@ ---置換融合 -function c74335036.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c74335036.target) - e1:SetOperation(c74335036.activate) - c:RegisterEffect(e1) - --to deck - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(74335036,0)) - e2:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_GRAVE) - e2:SetCost(c74335036.tdcost) - e2:SetTarget(c74335036.tdtg) - e2:SetOperation(c74335036.tdop) - c:RegisterEffect(e2) -end -function c74335036.filter1(c,e) - return c:IsCanBeFusionMaterial() and not c:IsImmuneToEffect(e) -end -function c74335036.filter2(c,e,tp,m,f,chkf) - return c:IsType(TYPE_FUSION) and (not f or f(c)) - and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf) -end -function c74335036.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp - local mg1=Duel.GetMatchingGroup(c74335036.filter1,tp,LOCATION_MZONE,0,nil,e) - local res=Duel.IsExistingMatchingCard(c74335036.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf) - if not res then - local ce=Duel.GetChainMaterial(tp) - if ce~=nil then - local fgroup=ce:GetTarget() - local mg2=fgroup(ce,e,tp) - local mf=ce:GetValue() - res=Duel.IsExistingMatchingCard(c74335036.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,chkf) - end - end - return res - end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function c74335036.activate(e,tp,eg,ep,ev,re,r,rp) - local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp - local mg1=Duel.GetMatchingGroup(c74335036.filter1,tp,LOCATION_MZONE,0,nil,e) - local sg1=Duel.GetMatchingGroup(c74335036.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf) - local mg2=nil - local sg2=nil - local ce=Duel.GetChainMaterial(tp) - if ce~=nil then - local fgroup=ce:GetTarget() - mg2=fgroup(ce,e,tp) - local mf=ce:GetValue() - sg2=Duel.GetMatchingGroup(c74335036.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,mf,chkf) - end - if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then - local sg=sg1:Clone() - if sg2 then sg:Merge(sg2) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local tg=sg:Select(tp,1,1,nil) - local tc=tg:GetFirst() - if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then - local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf) - tc:SetMaterial(mat1) - Duel.SendtoGrave(mat1,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION) - Duel.BreakEffect() - Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP) - else - local mat2=Duel.SelectFusionMaterial(tp,tc,mg2,nil,chkf) - local fop=ce:GetOperation() - fop(ce,e,tp,tc,mat2) - end - tc:CompleteProcedure() - end -end -function c74335036.tdfilter(c) - return c:IsType(TYPE_FUSION) and c:IsAbleToExtra() -end -function c74335036.tdcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) -end -function c74335036.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c74335036.tdfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c74335036.tdfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectTarget(tp,c74335036.tdfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c74335036.tdop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.SendtoDeck(tc,nil,0,REASON_EFFECT)~=0 then - Duel.BreakEffect() - Duel.Draw(tp,1,REASON_EFFECT) - end -end diff --git a/script/c74364659.lua b/script/c74364659.lua deleted file mode 100644 index 4a52087553..0000000000 --- a/script/c74364659.lua +++ /dev/null @@ -1,46 +0,0 @@ ---水霊使いエリア -function c74364659.initial_effect(c) - --flip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(74364659,0)) - e1:SetCategory(CATEGORY_CONTROL) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP) - e1:SetTarget(c74364659.target) - e1:SetOperation(c74364659.operation) - c:RegisterEffect(e1) -end -function c74364659.filter(c) - return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_WATER) and c:IsControlerCanBeChanged() -end -function c74364659.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c74364659.filter(chkc) end - if chk==0 then return true end - if not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) - local g=Duel.SelectTarget(tp,c74364659.filter,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,g:GetCount(),0,0) - end -end -function c74364659.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and c:IsFaceup() and tc and tc:IsRelateToEffect(e) and c74364659.filter(tc) then - c:SetCardTarget(tc) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_CONTROL) - e1:SetProperty(EFFECT_FLAG_OWNER_RELATE+EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetValue(tp) - e1:SetLabel(0) - e1:SetReset(RESET_EVENT+0x1fc0000) - e1:SetCondition(c74364659.ctcon) - tc:RegisterEffect(e1) - end -end -function c74364659.ctcon(e) - local c=e:GetOwner() - local h=e:GetHandler() - return h:IsAttribute(ATTRIBUTE_WATER) and c:IsHasCardTarget(h) -end diff --git a/script/c74367458.lua b/script/c74367458.lua deleted file mode 100644 index 9439a8b6bb..0000000000 --- a/script/c74367458.lua +++ /dev/null @@ -1,54 +0,0 @@ ---ガーディアン・エルマ -function c74367458.initial_effect(c) - --sum limit - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_SUMMON) - e1:SetCondition(c74367458.sumlimit) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_CANNOT_FLIP_SUMMON) - c:RegisterEffect(e2) - local e3=e1:Clone() - e3:SetCode(EFFECT_SPSUMMON_CONDITION) - c:RegisterEffect(e3) - --equip - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(74367458,0)) - e4:SetCategory(CATEGORY_EQUIP) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e4:SetProperty(EFFECT_FLAG_CARD_TARGET) - e4:SetCode(EVENT_SUMMON_SUCCESS) - e4:SetTarget(c74367458.eqtg) - e4:SetOperation(c74367458.eqop) - c:RegisterEffect(e4) - local e5=e4:Clone() - e5:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e5) -end -function c74367458.cfilter(c) - return c:IsFaceup() and c:IsCode(69243953) -end -function c74367458.sumlimit(e) - return not Duel.IsExistingMatchingCard(c74367458.cfilter,e:GetHandlerPlayer(),LOCATION_ONFIELD,0,1,nil) -end -function c74367458.filter(c,ec) - return c:IsType(TYPE_EQUIP) and c:CheckEquipTarget(ec) -end -function c74367458.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c74367458.filter(chkc,e:GetHandler()) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingTarget(c74367458.filter,tp,LOCATION_GRAVE,0,1,nil,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local g=Duel.SelectTarget(tp,c74367458.filter,tp,LOCATION_GRAVE,0,1,1,nil,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0) -end -function c74367458.eqop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and c:IsFaceup() and c:IsRelateToEffect(e) then - Duel.Equip(tp,tc,c) - end -end diff --git a/script/c74371660.lua b/script/c74371660.lua deleted file mode 100644 index 2f9411a628..0000000000 --- a/script/c74371660.lua +++ /dev/null @@ -1,61 +0,0 @@ ---水精鱗-ガイオアビス -function c74371660.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_WATER),7,2) - c:EnableReviveLimit() - --atklimit - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e1:SetTarget(aux.TargetBoolFunction(Card.IsLevelAbove,5)) - e1:SetCondition(c74371660.dscon) - c:RegisterEffect(e1) - --negate - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(74371660,0)) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetCountLimit(1) - e2:SetRange(LOCATION_MZONE) - e2:SetHintTiming(0,0x1c0) - e2:SetCost(c74371660.cost) - e2:SetTarget(c74371660.target) - e2:SetOperation(c74371660.operation) - c:RegisterEffect(e2) -end -function c74371660.dscon(e) - return e:GetHandler():GetOverlayCount()~=0 -end -function c74371660.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c74371660.filter(c,atk) - return aux.disfilter1(c) and c:GetAttack()-1 - and Duel.IsExistingMatchingCard(c74388798.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) -end -function c74388798.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c74388798.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp) - local tc=g:GetFirst() - if tc then - Duel.SpecialSummon(tc,0,tp,tp,true,true,POS_FACEUP) - tc:CompleteProcedure() - end -end diff --git a/script/c74402414.lua b/script/c74402414.lua deleted file mode 100644 index e5f2d1a944..0000000000 --- a/script/c74402414.lua +++ /dev/null @@ -1,114 +0,0 @@ ---マジック・クロニクル -function c74402414.initial_effect(c) - local g=Group.CreateGroup() - g:KeepAlive() - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c74402414.cost) - e1:SetTarget(c74402414.target) - e1:SetOperation(c74402414.activate) - e1:SetLabelObject(g) - c:RegisterEffect(e1) - --add counter - local e0=Effect.CreateEffect(c) - e0:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e0:SetCode(EVENT_CHAINING) - e0:SetRange(LOCATION_SZONE) - e0:SetOperation(aux.chainreg) - c:RegisterEffect(e0) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e2:SetCode(EVENT_CHAIN_SOLVED) - e2:SetRange(LOCATION_SZONE) - e2:SetOperation(c74402414.ctop) - c:RegisterEffect(e2) - --salvage - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(74402414,0)) - e3:SetCategory(CATEGORY_TOHAND) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_SZONE) - e3:SetCost(c74402414.thcost) - e3:SetTarget(c74402414.thtg) - e3:SetOperation(c74402414.thop) - e3:SetLabelObject(g) - c:RegisterEffect(e3) - --damage - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e4:SetCode(EVENT_LEAVE_FIELD) - e4:SetCondition(c74402414.damcon) - e4:SetOperation(c74402414.damop) - e4:SetLabelObject(g) - c:RegisterEffect(e4) -end -function c74402414.cost(e,tp,eg,ep,ev,re,r,rp,chk) - local hg=Duel.GetFieldGroup(tp,LOCATION_HAND,0) - if chk==0 then return hg:GetCount()>0 and hg:FilterCount(Card.IsAbleToGraveAsCost,nil)==hg:GetCount() end - Duel.SendtoGrave(hg,REASON_COST) -end -function c74402414.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToRemove() -end -function c74402414.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c74402414.filter,tp,LOCATION_DECK,0,5,nil) end - Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,5,tp,LOCATION_DECK) -end -function c74402414.activate(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local g=Duel.GetMatchingGroup(c74402414.filter,tp,LOCATION_DECK,0,nil) - if g:GetCount()<5 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local rg=g:Select(tp,5,5,nil) - Duel.Remove(rg,POS_FACEUP,REASON_EFFECT) - local tc=rg:GetFirst() - while tc do - tc:RegisterFlagEffect(74402414,RESET_EVENT+0x1fe0000,0,0) - tc=rg:GetNext() - end - e:GetLabelObject():Clear() - e:GetLabelObject():Merge(rg) -end -function c74402414.ctop(e,tp,eg,ep,ev,re,r,rp) - if rp~=tp and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL) and e:GetHandler():GetFlagEffect(1)>0 then - e:GetHandler():AddCounter(0x25,1) - end -end -function c74402414.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsCanRemoveCounter(tp,0x25,2,REASON_COST) end - e:GetHandler():RemoveCounter(tp,0x25,2,REASON_COST) -end -function c74402414.thfilter(c) - return c:GetFlagEffect(74402414)~=0 and c:IsAbleToHand() -end -function c74402414.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return e:GetLabelObject():IsContains(chkc) and c74402414.thfilter(chkc) end - if chk==0 then return e:GetLabelObject():IsExists(c74402414.thfilter,1,nil) end - Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_ATOHAND) - local g=e:GetLabelObject():FilterSelect(1-tp,c74402414.thfilter,1,1,nil) - e:GetLabelObject():Sub(g) - Duel.SetTargetCard(g) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_REMOVED) -end -function c74402414.thop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end -function c74402414.dfilter(c) - return c:GetFlagEffect(74402414)~=0 -end -function c74402414.damcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsStatus(STATUS_ACTIVATED) -end -function c74402414.damop(e,tp,eg,ep,ev,re,r,rp) - local ct=e:GetLabelObject():FilterCount(c74402414.dfilter,nil) - Duel.Damage(tp,ct*500,REASON_EFFECT) -end diff --git a/script/c74416026.lua b/script/c74416026.lua deleted file mode 100644 index 2e6b8d72ed..0000000000 --- a/script/c74416026.lua +++ /dev/null @@ -1,71 +0,0 @@ ---デストーイ・マーチ -function c74416026.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_NEGATE+CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_CHAINING) - e1:SetCondition(c74416026.condition) - e1:SetTarget(c74416026.target) - e1:SetOperation(c74416026.activate) - c:RegisterEffect(e1) -end -function c74416026.filter(c,tp) - return c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) and c:IsSetCard(0xad) -end -function c74416026.condition(e,tp,eg,ep,ev,re,r,rp) - if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end - local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) - return g and g:IsExists(c74416026.filter,1,nil,tp) - and Duel.IsChainNegatable(ev) and (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE)) -end -function c74416026.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) - end -end -function c74416026.spfilter(c,e,tp) - return c:IsType(TYPE_FUSION) and c:IsLevelAbove(8) and c:IsSetCard(0xad) - and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) -end -function c74416026.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS):Filter(c74416026.filter,nil,tp) - Duel.NegateActivation(ev) - if re:GetHandler():IsRelateToEffect(re) and Duel.Destroy(eg,REASON_EFFECT)~=0 then - local tg=g:Filter(Card.IsRelateToEffect,nil,re) - local sg=Duel.GetMatchingGroup(c74416026.spfilter,tp,LOCATION_EXTRA,0,nil,e,tp) - if tg:GetCount()>0 and sg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(74416026,0)) then - Duel.BreakEffect() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local tc=tg:Select(tp,1,1,nil):GetFirst() - if Duel.SendtoGrave(tc,REASON_EFFECT)==0 or not tc:IsLocation(LOCATION_GRAVE) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sc=sg:Select(tp,1,1,nil):GetFirst() - if Duel.SpecialSummonStep(sc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetCountLimit(1) - e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e1:SetLabelObject(sc) - e1:SetCondition(c74416026.rmcon) - e1:SetOperation(c74416026.rmop) - e1:SetReset(RESET_PHASE+PHASE_END+RESET_SELF_TURN) - Duel.RegisterEffect(e1,tp) - Duel.SpecialSummonComplete() - sc:CompleteProcedure() - sc:RegisterFlagEffect(74416026,RESET_EVENT+0x1fe0000,0,1) - end - end - end -end -function c74416026.rmcon(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetLabelObject() - return Duel.GetTurnPlayer()==tp and tc:GetFlagEffect(74416026)~=0 -end -function c74416026.rmop(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetLabelObject() - Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) -end diff --git a/script/c74416224.lua b/script/c74416224.lua deleted file mode 100644 index 4c55898ce6..0000000000 --- a/script/c74416224.lua +++ /dev/null @@ -1,44 +0,0 @@ ---ブラック・レイ・ランサー -function c74416224.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_WATER),3,2) - c:EnableReviveLimit() - --disable - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DISABLE) - e1:SetDescription(aux.Stringid(74416224,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c74416224.cost) - e1:SetTarget(c74416224.target) - e1:SetOperation(c74416224.operation) - c:RegisterEffect(e1) -end -function c74416224.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c74416224.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0) -end -function c74416224.operation(e,tp,eg,ep,ev,re,r,rp,chk) - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e2) - end -end diff --git a/script/c74439492.lua b/script/c74439492.lua deleted file mode 100644 index 0acf3b76b2..0000000000 --- a/script/c74439492.lua +++ /dev/null @@ -1,39 +0,0 @@ ---スクラップ・ポリッシュ -function c74439492.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_ATKCHANGE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c74439492.target) - e1:SetOperation(c74439492.activate) - c:RegisterEffect(e1) -end -function c74439492.filter(c,des) - return c:IsFaceup() and c:IsSetCard(0x24) and (des or c:IsDestructable()) -end -function c74439492.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c74439492.filter(chkc,false) end - if chk==0 then return Duel.IsExistingTarget(c74439492.filter,tp,LOCATION_MZONE,0,1,nil,false) - and Duel.IsExistingMatchingCard(c74439492.filter,tp,LOCATION_MZONE,0,2,nil,true) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c74439492.filter,tp,LOCATION_MZONE,0,1,1,nil,false) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c74439492.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)~=0 then - local g=Duel.GetMatchingGroup(c74439492.filter,tp,LOCATION_MZONE,0,nil,true) - local ac=g:GetFirst() - while ac do - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(1000) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - ac:RegisterEffect(e1) - ac=g:GetNext() - end - end -end diff --git a/script/c74440055.lua b/script/c74440055.lua deleted file mode 100644 index ac3a600c55..0000000000 --- a/script/c74440055.lua +++ /dev/null @@ -1,29 +0,0 @@ ---サボウ・ファイター -function c74440055.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(74440055,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_BATTLE_DESTROYING) - e1:SetCondition(c74440055.condition) - e1:SetTarget(c74440055.target) - e1:SetOperation(c74440055.operation) - c:RegisterEffect(e1) -end -function c74440055.condition(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsRelateToBattle() and c:GetBattleTarget():IsType(TYPE_MONSTER) -end -function c74440055.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,tp,0) -end -function c74440055.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0 - and Duel.IsPlayerCanSpecialSummonMonster(tp,74440056,0,0x4011,500,500,1,RACE_PLANT,ATTRIBUTE_EARTH,POS_FACEUP_DEFENCE,1-tp) then - local token=Duel.CreateToken(tp,74440056) - Duel.SpecialSummon(token,0,tp,1-tp,false,false,POS_FACEUP_DEFENCE) - end -end diff --git a/script/c74458486.lua b/script/c74458486.lua deleted file mode 100644 index 435db1da8f..0000000000 --- a/script/c74458486.lua +++ /dev/null @@ -1,37 +0,0 @@ ---援護射撃 -function c74458486.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetCondition(c74458486.condition) - e1:SetTarget(c74458486.target) - e1:SetOperation(c74458486.activate) - c:RegisterEffect(e1) -end -function c74458486.condition(e,tp,eg,ep,ev,re,r,rp) - local phase=Duel.GetCurrentPhase() - return phase==PHASE_DAMAGE and not Duel.IsDamageCalculated() - and Duel.GetAttacker():IsControler(1-tp) and Duel.GetAttackTarget() -end -function c74458486.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,Duel.GetAttackTarget()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,Duel.GetAttackTarget()) -end -function c74458486.activate(e,tp,eg,ep,ev,re,r,rp) - local at=Duel.GetAttackTarget() - local tc=Duel.GetFirstTarget() - if at:IsFaceup() and at:IsRelateToBattle() and tc:IsRelateToEffect(e) and tc:IsFaceup() then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_DAMAGE_CAL) - e1:SetValue(tc:GetAttack()) - at:RegisterEffect(e1) - end -end diff --git a/script/c74506079.lua b/script/c74506079.lua deleted file mode 100644 index 5cd26a139f..0000000000 --- a/script/c74506079.lua +++ /dev/null @@ -1,130 +0,0 @@ ---ワーム・ゼロ -function c74506079.initial_effect(c) - --fusion material - c:EnableReviveLimit() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_FUSION_MATERIAL) - e1:SetCondition(c74506079.fscondition) - e1:SetOperation(c74506079.fsoperation) - c:RegisterEffect(e1) - --summon success - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_MATERIAL_CHECK) - e2:SetValue(c74506079.matcheck) - c:RegisterEffect(e2) -end -function c74506079.ffilter(c) - return c:IsSetCard(0x3e) and c:IsRace(RACE_REPTILE) -end -function c74506079.fscondition(e,g,gc) - if g==nil then return true end - if gc then return false end - return g:IsExists(c74506079.ffilter,2,nil) -end -function c74506079.fsoperation(e,tp,eg,ep,ev,re,r,rp,gc) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL) - Duel.SetFusionMaterial(eg:FilterSelect(tp,c74506079.ffilter,2,63,nil)) -end -function c74506079.matcheck(e,c) - local ct=c:GetMaterial():GetClassCount(Card.GetCode) - if ct>0 then - local ae=Effect.CreateEffect(c) - ae:SetType(EFFECT_TYPE_SINGLE) - ae:SetCode(EFFECT_SET_ATTACK) - ae:SetValue(ct*500) - ae:SetReset(RESET_EVENT+0xff0000) - c:RegisterEffect(ae) - end - if ct>=2 then - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(74506079,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetTarget(c74506079.sptg) - e1:SetOperation(c74506079.spop) - e1:SetReset(RESET_EVENT+0xfe0000) - c:RegisterEffect(e1) - end - if ct>=4 then - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(74506079,1)) - e1:SetCategory(CATEGORY_TOGRAVE) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c74506079.tgcost) - e1:SetTarget(c74506079.tgtg) - e1:SetOperation(c74506079.tgop) - e1:SetReset(RESET_EVENT+0xfe0000) - c:RegisterEffect(e1) - end - if ct>=6 then - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(74506079,2)) - e1:SetCategory(CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetTarget(c74506079.drtg) - e1:SetOperation(c74506079.drop) - e1:SetReset(RESET_EVENT+0xfe0000) - c:RegisterEffect(e1) - end -end -function c74506079.spfilter(c,e,tp) - return c:IsRace(RACE_REPTILE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENCE) -end -function c74506079.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c74506079.spfilter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c74506079.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c74506079.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c74506079.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEDOWN_DEFENCE) - Duel.ConfirmCards(1-tp,tc) - end -end -function c74506079.costfilter(c) - return c:IsRace(RACE_REPTILE) and c:IsAbleToRemoveAsCost() -end -function c74506079.tgcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c74506079.costfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local rg=Duel.SelectMatchingCard(tp,c74506079.costfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.Remove(rg,POS_FACEUP,REASON_COST) -end -function c74506079.tgtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) end - if chk==0 then return Duel.IsExistingTarget(nil,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectTarget(tp,nil,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,0,0) -end -function c74506079.tgop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoGrave(tc,REASON_EFFECT) - end -end -function c74506079.drtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(1) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c74506079.drop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end diff --git a/script/c74509280.lua b/script/c74509280.lua deleted file mode 100644 index 8a8405417a..0000000000 --- a/script/c74509280.lua +++ /dev/null @@ -1,30 +0,0 @@ ---Sin パラレルギア -function c74509280.initial_effect(c) - --synchro custom - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SYNCHRO_MATERIAL_CUSTOM) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetTarget(c74509280.target) - e1:SetValue(1) - e1:SetOperation(c74509280.operation) - c:RegisterEffect(e1) -end -c74509280.tuner_filter=aux.FALSE -function c74509280.synfilter(c,syncard,tuner,f,lv) - return c:IsSetCard(0x23) and c:IsCanBeSynchroMaterial(syncard,tuner) and (f==nil or f(c)) and c:GetLevel()==lv -end -function c74509280.target(e,syncard,f,minc) - local c=e:GetHandler() - if minc>1 then return false end - local lv=syncard:GetLevel()-c:GetLevel() - if lv<=0 then return false end - return Duel.IsExistingMatchingCard(c74509280.synfilter,syncard:GetControler(),LOCATION_HAND,0,1,nil,syncard,c,f,lv) -end -function c74509280.operation(e,tp,eg,ep,ev,re,r,rp,syncard,f,minc) - local c=e:GetHandler() - local lv=syncard:GetLevel()-c:GetLevel() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SMATERIAL) - local g=Duel.SelectMatchingCard(tp,c74509280.synfilter,tp,LOCATION_HAND,0,1,1,nil,syncard,c,f,lv) - Duel.SetSynchroMaterial(g) -end diff --git a/script/c74519184.lua b/script/c74519184.lua deleted file mode 100644 index d4d2a11de5..0000000000 --- a/script/c74519184.lua +++ /dev/null @@ -1,36 +0,0 @@ ---手札断殺 -function c74519184.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c74519184.target) - e1:SetOperation(c74519184.activate) - c:RegisterEffect(e1) -end -function c74519184.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local h1=Duel.GetFieldGroupCount(tp,LOCATION_HAND,0) - if e:GetHandler():IsLocation(LOCATION_HAND) then h1=h1-1 end - local h2=Duel.GetFieldGroupCount(tp,0,LOCATION_HAND) - return h1>1 and h2>1 and Duel.IsPlayerCanDraw(tp,2) and Duel.IsPlayerCanDraw(1-tp,2) - end - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,PLAYER_ALL,2) -end -function c74519184.activate(e,tp,eg,ep,ev,re,r,rp) - local h1=Duel.GetFieldGroupCount(tp,LOCATION_HAND,0) - local h2=Duel.GetFieldGroupCount(tp,0,LOCATION_HAND) - if h1<2 or h2<2 then return end - local turnp=Duel.GetTurnPlayer() - Duel.Hint(HINT_SELECTMSG,turnp,HINTMSG_TOGRAVE) - local g1=Duel.SelectMatchingCard(turnp,aux.TRUE,turnp,LOCATION_HAND,0,2,2,nil) - Duel.ConfirmCards(1-turnp,g1) - Duel.Hint(HINT_SELECTMSG,1-turnp,HINTMSG_TOGRAVE) - local g2=Duel.SelectMatchingCard(1-turnp,aux.TRUE,1-turnp,LOCATION_HAND,0,2,2,nil) - g1:Merge(g2) - Duel.SendtoGrave(g1,REASON_EFFECT) - Duel.BreakEffect() - Duel.Draw(turnp,2,REASON_EFFECT) - Duel.Draw(1-turnp,2,REASON_EFFECT) -end diff --git a/script/c7452945.lua b/script/c7452945.lua deleted file mode 100644 index cdccb38abc..0000000000 --- a/script/c7452945.lua +++ /dev/null @@ -1,77 +0,0 @@ ---天命の聖剣 -function c7452945.initial_effect(c) - c:SetUniqueOnField(1,0,7452945) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c7452945.target) - e1:SetOperation(c7452945.operation) - c:RegisterEffect(e1) - --cannot be destroyed - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_INDESTRUCTABLE_COUNT) - e2:SetValue(c7452945.valcon) - e2:SetCountLimit(1) - c:RegisterEffect(e2) - --Equip limit - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_EQUIP_LIMIT) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e3:SetValue(c7452945.eqlimit) - c:RegisterEffect(e3) - --equip - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(7452945,0)) - e4:SetCategory(CATEGORY_EQUIP) - e4:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e4:SetCode(EVENT_TO_GRAVE) - e4:SetCountLimit(1,7452945) - e4:SetCondition(c7452945.eqcon) - e4:SetTarget(c7452945.eqtg) - e4:SetOperation(c7452945.operation) - c:RegisterEffect(e4) -end -function c7452945.eqlimit(e,c) - return c:IsRace(RACE_WARRIOR) -end -function c7452945.eqfilter1(c) - return c:IsFaceup() and c:IsRace(RACE_WARRIOR) -end -function c7452945.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c7452945.eqfilter1(chkc) end - if chk==0 then return Duel.IsExistingTarget(c7452945.eqfilter1,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c7452945.eqfilter1,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c7452945.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() and c:CheckUniqueOnField(tp) then - Duel.Equip(tp,c,tc) - end -end -function c7452945.valcon(e,re,r,rp) - return bit.band(r,REASON_BATTLE+REASON_EFFECT)~=0 -end -function c7452945.eqcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousPosition(POS_FACEUP) and c:IsReason(REASON_DESTROY) and c:CheckUniqueOnField(tp) -end -function c7452945.eqfilter2(c) - return c:IsFaceup() and c:IsSetCard(0x107a) and c:IsRace(RACE_WARRIOR) -end -function c7452945.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c7452945.eqfilter2(chkc) end - if chk==0 then return e:GetHandler():IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingTarget(c7452945.eqfilter2,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c7452945.eqfilter2,tp,LOCATION_MZONE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end diff --git a/script/c74530899.lua b/script/c74530899.lua deleted file mode 100644 index 19c9430746..0000000000 --- a/script/c74530899.lua +++ /dev/null @@ -1,96 +0,0 @@ ---時械神メタイオン -function c74530899.initial_effect(c) - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_SINGLE_RANGE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetRange(LOCATION_DECK) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - c:RegisterEffect(e1) - --summon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(74530899,0)) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_SUMMON_PROC) - e2:SetCondition(c74530899.ntcon) - c:RegisterEffect(e2) - --indes - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e3:SetRange(LOCATION_MZONE) - e3:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e3:SetValue(1) - c:RegisterEffect(e3) - local e4=e3:Clone() - e4:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - c:RegisterEffect(e4) - local e5=e3:Clone() - e5:SetCondition(c74530899.damcon) - e5:SetCode(EFFECT_AVOID_BATTLE_DAMAGE) - c:RegisterEffect(e5) - --to hand - local e6=Effect.CreateEffect(c) - e6:SetDescription(aux.Stringid(74530899,1)) - e6:SetCategory(CATEGORY_TOHAND+CATEGORY_DAMAGE) - e6:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e6:SetCode(EVENT_PHASE+PHASE_BATTLE) - e6:SetCountLimit(1) - e6:SetRange(LOCATION_MZONE) - e6:SetCondition(c74530899.thcon) - e6:SetTarget(c74530899.thtg) - e6:SetOperation(c74530899.thop) - c:RegisterEffect(e6) - --to deck - local e7=Effect.CreateEffect(c) - e7:SetDescription(aux.Stringid(74530899,2)) - e7:SetCategory(CATEGORY_TODECK) - e7:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e7:SetCode(EVENT_PHASE+PHASE_STANDBY) - e7:SetCountLimit(1) - e7:SetRange(LOCATION_MZONE) - e7:SetCondition(c74530899.tdcon) - e7:SetTarget(c74530899.tdtg) - e7:SetOperation(c74530899.tdop) - c:RegisterEffect(e7) -end -function c74530899.ntcon(e,c,minc) - if c==nil then return true end - return minc==0 and c:GetLevel()>4 - and Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0)==0 - and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 -end -function c74530899.damcon(e) - return e:GetHandler():IsAttackPos() -end -function c74530899.thcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetBattledGroupCount()>0 -end -function c74530899.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local g=Duel.GetMatchingGroup(Card.IsAbleToHand,tp,LOCATION_MZONE,LOCATION_MZONE,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,g:GetCount()*300) -end -function c74530899.thop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsAbleToHand,tp,LOCATION_MZONE,LOCATION_MZONE,e:GetHandler()) - if g:GetCount()==0 then return end - Duel.SendtoHand(g,nil,REASON_EFFECT) - local og=Duel.GetOperatedGroup() - local ct=og:FilterCount(Card.IsLocation,nil,LOCATION_HAND+LOCATION_EXTRA) - Duel.Damage(1-tp,ct*300,REASON_EFFECT) -end -function c74530899.tdcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c74530899.tdtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0) -end -function c74530899.tdop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SendtoDeck(c,nil,2,REASON_EFFECT) - end -end diff --git a/script/c74576482.lua b/script/c74576482.lua deleted file mode 100644 index 02f38ab898..0000000000 --- a/script/c74576482.lua +++ /dev/null @@ -1,82 +0,0 @@ ---コアキメイル・シーパンサー -function c74576482.initial_effect(c) - --cost - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c74576482.mtcon) - e1:SetOperation(c74576482.mtop) - c:RegisterEffect(e1) - --to deck - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(74576482,3)) - e2:SetCategory(CATEGORY_TODECK) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCost(c74576482.tdcost) - e2:SetTarget(c74576482.tdtg) - e2:SetOperation(c74576482.tdop) - c:RegisterEffect(e2) -end -function c74576482.mtcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c74576482.cfilter1(c) - return c:IsCode(36623431) and c:IsAbleToGraveAsCost() -end -function c74576482.cfilter2(c) - return c:IsType(TYPE_MONSTER) and c:IsAttribute(ATTRIBUTE_WATER) and not c:IsPublic() -end -function c74576482.mtop(e,tp,eg,ep,ev,re,r,rp) - local g1=Duel.GetMatchingGroup(c74576482.cfilter1,tp,LOCATION_HAND,0,nil) - local g2=Duel.GetMatchingGroup(c74576482.cfilter2,tp,LOCATION_HAND,0,nil) - local select=2 - if g1:GetCount()>0 and g2:GetCount()>0 then - select=Duel.SelectOption(tp,aux.Stringid(74576482,0),aux.Stringid(74576482,1),aux.Stringid(74576482,2)) - elseif g1:GetCount()>0 then - select=Duel.SelectOption(tp,aux.Stringid(74576482,0),aux.Stringid(74576482,2)) - if select==1 then select=2 end - elseif g2:GetCount()>0 then - select=Duel.SelectOption(tp,aux.Stringid(74576482,1),aux.Stringid(74576482,2)) - select=select+1 - end - if select==0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=g1:Select(tp,1,1,nil) - Duel.SendtoGrave(g,REASON_COST) - elseif select==1 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) - local g=g2:Select(tp,1,1,nil) - Duel.ConfirmCards(1-tp,g) - Duel.ShuffleHand(tp) - else - Duel.Destroy(e:GetHandler(),REASON_RULE) - end -end -function c74576482.tdcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c74576482.cfilter1,tp,LOCATION_HAND,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c74576482.cfilter1,tp,LOCATION_HAND,0,1,1,nil) - Duel.SendtoGrave(g,REASON_COST) -end -function c74576482.filter(c) - return c:IsType(TYPE_SPELL) and c:IsAbleToDeck() -end -function c74576482.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c74576482.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c74576482.filter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectTarget(tp,c74576482.filter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0) -end -function c74576482.tdop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoDeck(tc,nil,0,REASON_EFFECT) - end -end diff --git a/script/c74583607.lua b/script/c74583607.lua deleted file mode 100644 index de376f976b..0000000000 --- a/script/c74583607.lua +++ /dev/null @@ -1,73 +0,0 @@ ---DDD烈火王テムジン -function c74583607.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcFunRep(c,aux.FilterBoolFunction(Card.IsSetCard,0xaf),2,true) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1,74583607) - e1:SetCondition(c74583607.spcon) - e1:SetTarget(c74583607.sptg) - e1:SetOperation(c74583607.spop) - c:RegisterEffect(e1) - --tohand - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_DESTROYED) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e2:SetCondition(c74583607.thcon) - e2:SetTarget(c74583607.thtg) - e2:SetOperation(c74583607.thop) - c:RegisterEffect(e2) -end -function c74583607.cfilter(c,tp) - return c:IsFaceup() and c:IsSetCard(0xaf) and c:IsControler(tp) -end -function c74583607.spcon(e,tp,eg,ep,ev,re,r,rp) - return not eg:IsContains(e:GetHandler()) and eg:IsExists(c74583607.cfilter,1,nil,tp) -end -function c74583607.spfilter(c,e,tp) - return c:IsSetCard(0xaf) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c74583607.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c74583607.spfilter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c74583607.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c74583607.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c74583607.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end -function c74583607.thcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsReason(REASON_BATTLE) - or (rp~=tp and c:IsReason(REASON_EFFECT) and c:GetPreviousControler()==tp) -end -function c74583607.thfilter(c) - return c:IsSetCard(0xae) and c:IsAbleToHand() -end -function c74583607.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c74583607.thfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c74583607.thfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c74583607.thfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c74583607.thop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end diff --git a/script/c74586817.lua b/script/c74586817.lua deleted file mode 100644 index a3cf0a1452..0000000000 --- a/script/c74586817.lua +++ /dev/null @@ -1,140 +0,0 @@ ---PSYフレームロード・Ω -function c74586817.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1) - c:EnableReviveLimit() - --remove - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(74586817,0)) - e1:SetCategory(CATEGORY_REMOVE) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1) - e1:SetCondition(c74586817.rmcon) - e1:SetTarget(c74586817.rmtg) - e1:SetOperation(c74586817.rmop) - c:RegisterEffect(e1) - --to grave - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(74586817,1)) - e2:SetCategory(CATEGORY_TOGRAVE) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) - e2:SetCountLimit(1) - e2:SetCondition(c74586817.tgcon) - e2:SetTarget(c74586817.tgtg) - e2:SetOperation(c74586817.tgop) - c:RegisterEffect(e2) - --to deck - local e3=Effect.CreateEffect(c) - e3:SetCategory(CATEGORY_TODECK) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_GRAVE) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetTarget(c74586817.tdtg) - e3:SetOperation(c74586817.tdop) - c:RegisterEffect(e3) -end -function c74586817.rmcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2 -end -function c74586817.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemove() - and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_HAND,1,nil) end - local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_HAND,nil) - g:AddCard(e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,2,0,0) -end -function c74586817.rmop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local g=Duel.GetFieldGroup(1-tp,LOCATION_HAND,0) - if g:GetCount()==0 or not c:IsRelateToEffect(e) or not c:IsFaceup() then return end - local rs=g:RandomSelect(1-tp,1) - local rg=Group.FromCards(c,rs:GetFirst()) - if Duel.Remove(rg,POS_FACEUP,REASON_EFFECT+REASON_TEMPORARY)~=0 then - local fid=c:GetFieldID() - local og=Duel.GetOperatedGroup() - local oc=og:GetFirst() - while oc do - if oc:IsControler(tp) then - oc:RegisterFlagEffect(74586817,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,0,1,fid) - else - oc:RegisterFlagEffect(74586817,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_STANDBY+RESET_OPPO_TURN,0,1,fid) - end - oc=og:GetNext() - end - og:KeepAlive() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) - e1:SetCountLimit(1) - e1:SetLabel(fid) - e1:SetLabelObject(og) - e1:SetCondition(c74586817.retcon) - e1:SetOperation(c74586817.retop) - e1:SetReset(RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN) - Duel.RegisterEffect(e1,tp) - end -end -function c74586817.tgcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp -end -function c74586817.tgtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_REMOVED) end - if chk==0 then return Duel.IsExistingTarget(nil,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(74586817,2)) - local g=Duel.SelectTarget(tp,nil,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,0,0) -end -function c74586817.tgop(e,tp,eg,ep,ev,re,r,rp) - local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local sg=tg:Filter(Card.IsRelateToEffect,nil,e) - if sg:GetCount()>0 then - Duel.SendtoGrave(sg,REASON_EFFECT+REASON_RETURN) - end -end -function c74586817.retfilter(c,fid) - return c:GetFlagEffectLabel(74586817)==fid -end -function c74586817.retcon(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetTurnPlayer()~=tp then return false end - local g=e:GetLabelObject() - if not g:IsExists(c74586817.retfilter,1,nil,e:GetLabel()) then - g:DeleteGroup() - e:Reset() - return false - else return true end -end -function c74586817.retop(e,tp,eg,ep,ev,re,r,rp) - local g=e:GetLabelObject() - local sg=g:Filter(c74586817.retfilter,nil,e:GetLabel()) - g:DeleteGroup() - local tc=sg:GetFirst() - while tc do - if tc==e:GetHandler() then - Duel.ReturnToField(tc) - else - Duel.SendtoHand(tc,tc:GetPreviousControler(),REASON_EFFECT) - end - tc=sg:GetNext() - end -end -function c74586817.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsAbleToDeck() and chkc~=e:GetHandler() end - if chk==0 then return e:GetHandler():IsAbleToExtra() - and Duel.IsExistingTarget(Card.IsAbleToDeck,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectTarget(tp,Card.IsAbleToDeck,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,e:GetHandler()) - g:AddCard(e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,2,0,0) -end -function c74586817.tdop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - local c=e:GetHandler() - local g=Group.FromCards(c,tc):Filter(Card.IsRelateToEffect,nil,e) - Duel.SendtoDeck(g,nil,2,REASON_EFFECT) -end diff --git a/script/c74591968.lua b/script/c74591968.lua deleted file mode 100644 index b8252b4566..0000000000 --- a/script/c74591968.lua +++ /dev/null @@ -1,87 +0,0 @@ ---ミスティック・ソードマン LV4 -function c74591968.initial_effect(c) - --battle destroy - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_BATTLE_DESTROYING) - e1:SetOperation(c74591968.bdop) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(74591968,0)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_BATTLE_START) - e2:SetCondition(c74591968.descon) - e2:SetTarget(c74591968.destg) - e2:SetOperation(c74591968.desop) - c:RegisterEffect(e2) - --special summon - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(74591968,1)) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetRange(LOCATION_MZONE) - e3:SetCode(EVENT_PHASE+PHASE_END) - e3:SetCondition(c74591968.spcon) - e3:SetCost(c74591968.spcost) - e3:SetTarget(c74591968.sptg) - e3:SetOperation(c74591968.spop) - c:RegisterEffect(e3) - --summon limit - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetCode(EFFECT_LIMIT_SUMMON_PROC) - e4:SetCondition(c74591968.sumcon) - c:RegisterEffect(e4) -end -c74591968.lvupcount=1 -c74591968.lvup={60482781} -c74591968.lvdncount=1 -c74591968.lvdn={47507260} -function c74591968.bdop(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():RegisterFlagEffect(74591968,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) -end -function c74591968.descon(e,tp,eg,ep,ev,re,r,rp) - local d=Duel.GetAttackTarget() - return e:GetHandler()==Duel.GetAttacker() and d and d:IsFacedown() and d:IsDefencePos() -end -function c74591968.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,Duel.GetAttackTarget(),1,0,0) -end -function c74591968.desop(e,tp,eg,ep,ev,re,r,rp) - local d=Duel.GetAttackTarget() - if d:IsRelateToBattle() then - Duel.Destroy(d,REASON_EFFECT) - end -end -function c74591968.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetFlagEffect(74591968)>0 -end -function c74591968.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end -function c74591968.spfilter(c,e,tp) - return c:IsCode(60482781) and c:IsCanBeSpecialSummoned(e,0,tp,true,true) -end -function c74591968.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsExistingMatchingCard(c74591968.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) -end -function c74591968.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c74591968.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp) - local tc=g:GetFirst() - if tc then - Duel.SpecialSummon(tc,0,tp,tp,true,true,POS_FACEUP) - tc:CompleteProcedure() - end -end -function c74591968.sumcon(e,c) - if not c then return true end - return false -end diff --git a/script/c74593218.lua b/script/c74593218.lua deleted file mode 100644 index 0df9e785b4..0000000000 --- a/script/c74593218.lua +++ /dev/null @@ -1,51 +0,0 @@ ---H-C クサナギ -function c74593218.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsRace,RACE_WARRIOR),4,3) - c:EnableReviveLimit() - --negate - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(74593218,0)) - e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY+CATEGORY_ATKCHANGE) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCode(EVENT_CHAINING) - e1:SetCondition(c74593218.negcon) - e1:SetCost(c74593218.negcost) - e1:SetTarget(c74593218.negtg) - e1:SetOperation(c74593218.negop) - c:RegisterEffect(e1) -end -function c74593218.negcon(e,tp,eg,ep,ev,re,r,rp) - return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) - and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_TRAP) and Duel.IsChainNegatable(ev) -end -function c74593218.negcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c74593218.negtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) - end -end -function c74593218.negop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - Duel.NegateActivation(ev) - if re:GetHandler():IsRelateToEffect(re) and Duel.Destroy(eg,REASON_EFFECT)>0 then - Duel.BreakEffect() - if c:IsRelateToEffect(e) and c:IsFaceup() then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_COPY_INHERIT) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(500) - e1:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e1) - end - end -end diff --git a/script/c74605254.lua b/script/c74605254.lua deleted file mode 100644 index d6faf6f33a..0000000000 --- a/script/c74605254.lua +++ /dev/null @@ -1,103 +0,0 @@ ---DD魔導賢者ガリレイ -function c74605254.initial_effect(c) - --pendulum summon - aux.AddPendulumProcedure(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(74605254,1)) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --splimit - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetRange(LOCATION_PZONE) - e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE) - e2:SetTargetRange(1,0) - e2:SetCondition(aux.nfbdncon) - e2:SetTarget(c74605254.splimit) - c:RegisterEffect(e2) - --scale change - local e3=Effect.CreateEffect(c) - e3:SetCategory(CATEGORY_DESTROY) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e3:SetRange(LOCATION_PZONE) - e3:SetCode(EVENT_PHASE+PHASE_STANDBY) - e3:SetCountLimit(1) - e3:SetCondition(c74605254.sccon) - e3:SetTarget(c74605254.sctg) - e3:SetOperation(c74605254.scop) - c:RegisterEffect(e3) - --tohand - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(74605254,0)) - e4:SetCategory(CATEGORY_TOHAND) - e4:SetType(EFFECT_TYPE_QUICK_O) - e4:SetCode(EVENT_FREE_CHAIN) - e4:SetRange(LOCATION_HAND) - e4:SetProperty(EFFECT_FLAG_CARD_TARGET) - e4:SetCountLimit(1,74605254) - e4:SetCost(c74605254.thcost) - e4:SetTarget(c74605254.thtg) - e4:SetOperation(c74605254.thop) - c:RegisterEffect(e4) -end -function c74605254.splimit(e,c,sump,sumtype,sumpos,targetp) - return not c:IsSetCard(0xaf) and bit.band(sumtype,SUMMON_TYPE_PENDULUM)==SUMMON_TYPE_PENDULUM -end -function c74605254.sccon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c74605254.filter(c,lv) - return c:IsFaceup() and not c:IsSetCard(0xaf) and c:IsLevelBelow(lv) and c:IsDestructable() -end -function c74605254.sctg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local scl=math.min(10,e:GetHandler():GetLeftScale()+2) - local g=Duel.GetMatchingGroup(c74605254.filter,tp,LOCATION_MZONE,0,nil,scl) - if e:GetHandler():GetLeftScale()<10 then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) - end -end -function c74605254.scop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) or c:GetLeftScale()>=10 then return end - local scl=2 - if c:GetLeftScale()==9 then scl=1 end - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_LSCALE) - e1:SetValue(scl) - e1:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_UPDATE_RSCALE) - c:RegisterEffect(e2) - local g=Duel.GetMatchingGroup(c74605254.filter,tp,LOCATION_MZONE,0,nil,c:GetLeftScale()) - if g:GetCount()>0 then - Duel.BreakEffect() - Duel.Destroy(g,REASON_EFFECT) - end -end -function c74605254.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsDiscardable() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD) -end -function c74605254.thfilter(c) - return c:IsFaceup() and (c:IsSetCard(0xae) or c:IsSetCard(0xaf)) and c:IsAbleToHand() -end -function c74605254.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsControler(tp) and c74605254.thfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c74605254.thfilter,tp,LOCATION_ONFIELD,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g=Duel.SelectTarget(tp,c74605254.thfilter,tp,LOCATION_ONFIELD,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c74605254.thop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end diff --git a/script/c74611888.lua b/script/c74611888.lua deleted file mode 100644 index f44926cf97..0000000000 --- a/script/c74611888.lua +++ /dev/null @@ -1,33 +0,0 @@ ---手のひら返し -function c74611888.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_POSITION) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,0x1e0) - e1:SetCondition(c74611888.condition) - e1:SetTarget(c74611888.target) - e1:SetOperation(c74611888.activate) - c:RegisterEffect(e1) -end -function c74611888.cfilter(c) - return c:IsFaceup() and c:GetLevel()~=c:GetOriginalLevel() -end -function c74611888.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c74611888.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) -end -function c74611888.filter(c) - return c:IsFaceup() and c:IsCanTurnSet() -end -function c74611888.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c74611888.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - local g=Duel.GetMatchingGroup(c74611888.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_POSITION,g,g:GetCount(),0,0) -end -function c74611888.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c74611888.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - if g:GetCount()>0 then - Duel.ChangePosition(g,POS_FACEDOWN_DEFENCE) - end -end diff --git a/script/c74641045.lua b/script/c74641045.lua deleted file mode 100644 index 1ccd934f5c..0000000000 --- a/script/c74641045.lua +++ /dev/null @@ -1,68 +0,0 @@ ---マドルチェ・プディンセス -function c74641045.initial_effect(c) - --to deck - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(74641045,0)) - e1:SetCategory(CATEGORY_TODECK) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCondition(c74641045.retcon) - e1:SetTarget(c74641045.rettg) - e1:SetOperation(c74641045.retop) - c:RegisterEffect(e1) - --atkup - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetCondition(c74641045.atkcon) - e2:SetValue(800) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EFFECT_UPDATE_DEFENCE) - c:RegisterEffect(e3) - --destroy - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(74641045,1)) - e4:SetCategory(CATEGORY_DESTROY) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e4:SetProperty(EFFECT_FLAG_CARD_TARGET) - e4:SetCode(EVENT_BATTLED) - e4:SetCondition(c74641045.descon) - e4:SetTarget(c74641045.destg) - e4:SetOperation(c74641045.desop) - c:RegisterEffect(e4) -end -function c74641045.retcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsReason(REASON_DESTROY) and e:GetHandler():GetReasonPlayer()~=tp - and e:GetHandler():GetPreviousControler()==tp -end -function c74641045.rettg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0) -end -function c74641045.retop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_EFFECT) - end -end -function c74641045.atkcon(e) - return not Duel.IsExistingMatchingCard(Card.IsType,e:GetHandlerPlayer(),LOCATION_GRAVE,0,1,nil,TYPE_MONSTER) -end -function c74641045.descon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetAttackTarget()~=nil -end -function c74641045.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and chkc:IsDestructable() end - if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,0,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,0,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c74641045.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c74657662.lua b/script/c74657662.lua deleted file mode 100644 index e3a59f31e6..0000000000 --- a/script/c74657662.lua +++ /dev/null @@ -1,75 +0,0 @@ ---ヴァイロン・マテリアル -function c74657662.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c74657662.target) - e1:SetOperation(c74657662.operation) - c:RegisterEffect(e1) - --Atk - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(600) - c:RegisterEffect(e2) - --Equip limit - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_EQUIP_LIMIT) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e3:SetValue(c74657662.eqlimit) - c:RegisterEffect(e3) - --Search - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(74657662,0)) - e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e4:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP) - e4:SetCode(EVENT_TO_GRAVE) - e4:SetCondition(c74657662.thcon) - e4:SetTarget(c74657662.thtg) - e4:SetOperation(c74657662.thop) - c:RegisterEffect(e4) -end -function c74657662.eqlimit(e,c) - return c:IsSetCard(0x30) -end -function c74657662.filter(c) - return c:IsFaceup() and c:IsSetCard(0x30) -end -function c74657662.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c74657662.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c74657662.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c74657662.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c74657662.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,c,tc) - end -end -function c74657662.thcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousPosition(POS_FACEUP) - and e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) -end -function c74657662.thfilter(c) - return c:IsSetCard(0x30) and c:IsType(TYPE_SPELL) and c:IsAbleToHand() -end -function c74657662.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c74657662.thfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c74657662.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c74657662.thfilter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c74694807.lua b/script/c74694807.lua deleted file mode 100644 index df7de5516d..0000000000 --- a/script/c74694807.lua +++ /dev/null @@ -1,61 +0,0 @@ ---再融合 -function c74694807.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCost(c74694807.cost) - e1:SetTarget(c74694807.target) - e1:SetOperation(c74694807.operation) - c:RegisterEffect(e1) - --Remove - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE) - e2:SetCode(EVENT_LEAVE_FIELD) - e2:SetOperation(c74694807.rmop) - c:RegisterEffect(e2) -end -function c74694807.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,800) - else Duel.PayLPCost(tp,800) end -end -function c74694807.filter(c,e,tp) - return bit.band(c:GetType(),0x41)==0x41 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c74694807.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c74694807.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c74694807.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c74694807.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c74694807.eqlimit(e,c) - return e:GetOwner()==c -end -function c74694807.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then - if Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)==0 then return end - Duel.Equip(tp,c,tc) - --Add Equip limit - local e1=Effect.CreateEffect(tc) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(c74694807.eqlimit) - c:RegisterEffect(e1) - end -end -function c74694807.rmop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=c:GetFirstCardTarget() - if c:IsReason(REASON_DESTROY) and tc and tc:IsLocation(LOCATION_MZONE) then - Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) - end -end diff --git a/script/c74701381.lua b/script/c74701381.lua deleted file mode 100644 index 49a61f76fb..0000000000 --- a/script/c74701381.lua +++ /dev/null @@ -1,28 +0,0 @@ ---DNA改造手術 -function c74701381.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c74701381.target) - c:RegisterEffect(e1) - --race - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e2:SetCode(EFFECT_CHANGE_RACE) - e2:SetValue(c74701381.value) - c:RegisterEffect(e2) - e1:SetLabelObject(e2) -end -function c74701381.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,563) - local rc=Duel.AnnounceRace(tp,1,0xffffff) - e:GetLabelObject():SetLabel(rc) - e:GetHandler():SetHint(CHINT_RACE,rc) -end -function c74701381.value(e,c) - return e:GetLabel() -end diff --git a/script/c74703140.lua b/script/c74703140.lua deleted file mode 100644 index 92df8e666b..0000000000 --- a/script/c74703140.lua +++ /dev/null @@ -1,6 +0,0 @@ ---裁きの鷹 -function c74703140.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcCode2(c,41396436,7805359,true,true) -end diff --git a/script/c74711057.lua b/script/c74711057.lua deleted file mode 100644 index 848684e47d..0000000000 --- a/script/c74711057.lua +++ /dev/null @@ -1,38 +0,0 @@ ---E・HERO ジ・アース -function c74711057.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcCode2(c,37195861,75434695,true,true) - --atkup - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(74711057,0)) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c74711057.atkcost) - e1:SetOperation(c74711057.atkop) - c:RegisterEffect(e1) - --spsummon condition - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e2:SetCode(EFFECT_SPSUMMON_CONDITION) - e2:SetValue(aux.fuslimit) - c:RegisterEffect(e2) -end -function c74711057.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsSetCard,1,e:GetHandler(),0x3008) end - local g=Duel.SelectReleaseGroup(tp,Card.IsSetCard,1,1,e:GetHandler(),0x3008) - e:SetLabel(g:GetFirst():GetAttack()) - Duel.Release(g,REASON_COST) -end -function c74711057.atkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFacedown() or not c:IsRelateToEffect(e) then return end - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(e:GetLabel()) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - c:RegisterEffect(e1) -end diff --git a/script/c74713516.lua b/script/c74713516.lua deleted file mode 100644 index 9a3d821b99..0000000000 --- a/script/c74713516.lua +++ /dev/null @@ -1,60 +0,0 @@ ---暗黒のミミック LV1 -function c74713516.initial_effect(c) - --flip - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DRAW) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP) - e1:SetTarget(c74713516.target) - e1:SetOperation(c74713516.operation) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(74713516,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) - e2:SetCondition(c74713516.spcon) - e2:SetCost(c74713516.spcost) - e2:SetTarget(c74713516.sptg) - e2:SetOperation(c74713516.spop) - c:RegisterEffect(e2) -end -c74713516.lvupcount=1 -c74713516.lvup={1102515} -function c74713516.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(1) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c74713516.operation(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end -function c74713516.spcon(e,tp,eg,ep,ev,re,r,rp) - return tp==Duel.GetTurnPlayer() -end -function c74713516.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end -function c74713516.spfilter(c,e,tp) - return c:IsCode(1102515) and c:IsCanBeSpecialSummoned(e,1,tp,true,true) -end -function c74713516.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsExistingMatchingCard(c74713516.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) -end -function c74713516.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c74713516.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp) - local tc=g:GetFirst() - if tc then - Duel.SpecialSummon(tc,1,tp,tp,true,true,POS_FACEUP) - tc:CompleteProcedure() - end -end diff --git a/script/c74717840.lua b/script/c74717840.lua deleted file mode 100644 index a6577388d7..0000000000 --- a/script/c74717840.lua +++ /dev/null @@ -1,29 +0,0 @@ ---ランドオルスのヒカリゴケ -function c74717840.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c74717840.condition) - e1:SetOperation(c74717840.operation) - c:RegisterEffect(e1) -end -function c74717840.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x2a) -end -function c74717840.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c74717840.cfilter,tp,LOCATION_MZONE,0,1,nil) -end -function c74717840.operation(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EFFECT_CANNOT_ACTIVATE) - e1:SetTargetRange(0,1) - e1:SetValue(c74717840.aclimit) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function c74717840.aclimit(e,re,tp) - return re:IsActiveType(TYPE_MONSTER) and not re:GetHandler():IsImmuneToEffect(e) -end diff --git a/script/c74728028.lua b/script/c74728028.lua deleted file mode 100644 index c5fad58f48..0000000000 --- a/script/c74728028.lua +++ /dev/null @@ -1,62 +0,0 @@ ---エクシーズ・レセプション -function c74728028.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c74728028.target) - e1:SetOperation(c74728028.operation) - c:RegisterEffect(e1) -end -function c74728028.filter1(c,e,tp) - local lv=c:GetLevel() - return lv>0 and c:IsFaceup() and Duel.IsExistingMatchingCard(c74728028.filter2,tp,LOCATION_HAND,0,1,nil,lv,e,tp) -end -function c74728028.filter2(c,lv,e,tp) - return c:GetLevel()==lv and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c74728028.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c74728028.filter1(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c74728028.filter1,tp,LOCATION_MZONE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - local g=Duel.SelectTarget(tp,c74728028.filter1,tp,LOCATION_MZONE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c74728028.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsFacedown() or not tc:IsRelateToEffect(e) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c74728028.filter2,tp,LOCATION_HAND,0,1,1,nil,tc:GetLevel(),e,tp) - local sc=g:GetFirst() - if sc then - Duel.SpecialSummonStep(sc,0,tp,tp,false,false,POS_FACEUP) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000) - sc:RegisterEffect(e1,true) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+0x1fe0000) - sc:RegisterEffect(e2,true) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_SET_ATTACK_FINAL) - e3:SetValue(0) - e3:SetReset(RESET_EVENT+0x1fe0000) - sc:RegisterEffect(e3,true) - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetCode(EFFECT_SET_DEFENCE_FINAL) - e4:SetValue(0) - e4:SetReset(RESET_EVENT+0x1fe0000) - sc:RegisterEffect(e4,true) - Duel.SpecialSummonComplete() - end -end diff --git a/script/c74730899.lua b/script/c74730899.lua deleted file mode 100644 index ba11571b83..0000000000 --- a/script/c74730899.lua +++ /dev/null @@ -1,50 +0,0 @@ ---燃料電池メン -function c74730899.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c74730899.spcon) - c:RegisterEffect(e1) - --return hand - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(74730899,0)) - e2:SetCategory(CATEGORY_TOHAND) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCountLimit(1) - e2:SetRange(LOCATION_MZONE) - e2:SetCost(c74730899.retcost) - e2:SetTarget(c74730899.rettg) - e2:SetOperation(c74730899.retop) - c:RegisterEffect(e2) -end -function c74730899.spfilter(c) - return c:IsFaceup() and c:IsSetCard(0x28) -end -function c74730899.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c74730899.spfilter,tp,LOCATION_MZONE,0,2,nil) -end -function c74730899.retcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsSetCard,1,e:GetHandler(),0x28) end - local g=Duel.SelectReleaseGroup(tp,Card.IsSetCard,1,1,e:GetHandler(),0x28) - Duel.Release(g,REASON_COST) -end -function c74730899.rettg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() and chkc:IsAbleToHand() end - if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g=Duel.SelectTarget(tp,Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c74730899.retop(e) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - end -end diff --git a/script/c74741494.lua b/script/c74741494.lua deleted file mode 100644 index b85faa0a30..0000000000 --- a/script/c74741494.lua +++ /dev/null @@ -1,29 +0,0 @@ ---能力調整 -function c74741494.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c74741494.target) - e1:SetOperation(c74741494.activate) - c:RegisterEffect(e1) -end -function c74741494.filter(c) - return c:IsFaceup() and c:IsLevelAbove(2) -end -function c74741494.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c74741494.filter,tp,LOCATION_MZONE,0,1,nil) end -end -function c74741494.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c74741494.filter,tp,LOCATION_MZONE,0,nil) - local tc=g:GetFirst() - while tc do - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_LEVEL) - e1:SetValue(-1) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - tc=g:GetNext() - end -end diff --git a/script/c7478431.lua b/script/c7478431.lua deleted file mode 100644 index bc07fc532f..0000000000 --- a/script/c7478431.lua +++ /dev/null @@ -1,43 +0,0 @@ ---ナチュル・サンフラワー -function c7478431.initial_effect(c) - --Negate - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(7478431,0)) - e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_CHAINING) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c7478431.discon) - e1:SetCost(c7478431.discost) - e1:SetTarget(c7478431.distg) - e1:SetOperation(c7478431.disop) - c:RegisterEffect(e1) -end -function c7478431.discon(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp and re:IsActiveType(TYPE_MONSTER) - and Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)~=LOCATION_DECK and Duel.IsChainNegatable(ev) -end -function c7478431.cfilter(c) - return c:IsSetCard(0x2a) and not c:IsStatus(STATUS_BATTLE_DESTROYED) -end -function c7478431.discost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsReleasable() and not c:IsStatus(STATUS_BATTLE_DESTROYED) and Duel.CheckReleaseGroup(tp,c7478431.cfilter,1,c) end - local g=Duel.SelectReleaseGroup(tp,c7478431.cfilter,1,1,c) - g:AddCard(c) - Duel.Release(g,REASON_COST) -end -function c7478431.distg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) - end -end -function c7478431.disop(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateActivation(ev) - if re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(eg,REASON_EFFECT) - end -end diff --git a/script/c74822425.lua b/script/c74822425.lua deleted file mode 100644 index 2d09d51751..0000000000 --- a/script/c74822425.lua +++ /dev/null @@ -1,199 +0,0 @@ ---エルシャドール・シェキナーガ -function c74822425.initial_effect(c) - c:EnableReviveLimit() - --fusion material - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_FUSION_MATERIAL) - e1:SetCondition(c74822425.fuscon) - e1:SetOperation(c74822425.fusop) - c:RegisterEffect(e1) - --cannot spsummon - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e2:SetCode(EFFECT_SPSUMMON_CONDITION) - e2:SetRange(LOCATION_EXTRA) - e2:SetValue(c74822425.splimit) - c:RegisterEffect(e2) - -- - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(74822425,0)) - e3:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) - e3:SetType(EFFECT_TYPE_QUICK_O) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1,74822425) - e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) - e3:SetCode(EVENT_CHAINING) - e3:SetCondition(c74822425.discon) - e3:SetTarget(c74822425.distg) - e3:SetOperation(c74822425.disop) - c:RegisterEffect(e3) - --tohand - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(74822425,1)) - e4:SetCategory(CATEGORY_TOHAND) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e4:SetCode(EVENT_TO_GRAVE) - e4:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) - e4:SetTarget(c74822425.thtg) - e4:SetOperation(c74822425.thop) - c:RegisterEffect(e4) -end -function c74822425.ffilter1(c) - return c:IsSetCard(0x9d) -end -function c74822425.ffilter2(c) - return c:IsAttribute(ATTRIBUTE_EARTH) or c:IsHasEffect(4904633) -end -function c74822425.exfilter(c,g) - return c:IsFaceup() and c:IsCanBeFusionMaterial() and not g:IsContains(c) -end -function c74822425.fuscon(e,g,gc,chkf) - if g==nil then return true end - local tp=e:GetHandlerPlayer() - local fc=Duel.GetFieldCard(tp,LOCATION_SZONE,5) - local exg=Group.CreateGroup() - if fc and fc:IsHasEffect(81788994) and fc:IsCanRemoveCounter(tp,0x16,3,REASON_EFFECT) then - local sg=Duel.GetMatchingGroup(c74822425.exfilter,tp,0,LOCATION_MZONE,nil,g) - exg:Merge(sg) - end - if gc then return (c74822425.ffilter1(gc) and (g:IsExists(c74822425.ffilter2,1,gc) or exg:IsExists(c74822425.ffilter2,1,gc))) - or (c74822425.ffilter2(gc) and (g:IsExists(c74822425.ffilter1,1,gc) or exg:IsExists(c74822425.ffilter1,1,gc))) end - local g1=Group.CreateGroup() - local g2=Group.CreateGroup() - local g3=Group.CreateGroup() - local g4=Group.CreateGroup() - local tc=g:GetFirst() - while tc do - if c74822425.ffilter1(tc) then - g1:AddCard(tc) - if aux.FConditionCheckF(tc,chkf) then g3:AddCard(tc) end - end - if c74822425.ffilter2(tc) then - g2:AddCard(tc) - if aux.FConditionCheckF(tc,chkf) then g4:AddCard(tc) end - end - tc=g:GetNext() - end - local exg1=exg:Filter(c74822425.ffilter1,nil) - local exg2=exg:Filter(c74822425.ffilter2,nil) - if chkf~=PLAYER_NONE then - return (g3:IsExists(aux.FConditionFilterF2,1,nil,g2) - or g3:IsExists(aux.FConditionFilterF2,1,nil,exg2) - or g4:IsExists(aux.FConditionFilterF2,1,nil,g1) - or g4:IsExists(aux.FConditionFilterF2,1,nil,exg1)) - else - return (g1:IsExists(aux.FConditionFilterF2,1,nil,g2) - or g1:IsExists(aux.FConditionFilterF2,1,nil,exg2) - or g2:IsExists(aux.FConditionFilterF2,1,nil,exg1)) - end -end -function c74822425.fusop(e,tp,eg,ep,ev,re,r,rp,gc,chkf) - local fc=Duel.GetFieldCard(tp,LOCATION_SZONE,5) - local exg=Group.CreateGroup() - if fc and fc:IsHasEffect(81788994) and fc:IsCanRemoveCounter(tp,0x16,3,REASON_EFFECT) then - local sg=Duel.GetMatchingGroup(c74822425.exfilter,tp,0,LOCATION_MZONE,nil,eg) - exg:Merge(sg) - end - if gc then - local sg1=Group.CreateGroup() - local sg2=Group.CreateGroup() - if c74822425.ffilter1(gc) then - sg1:Merge(eg:Filter(c74822425.ffilter2,gc)) - sg2:Merge(exg:Filter(c74822425.ffilter2,gc)) - end - if c74822425.ffilter2(gc) then - sg1:Merge(eg:Filter(c74822425.ffilter1,gc)) - sg2:Merge(exg:Filter(c74822425.ffilter1,gc)) - end - local g1=nil - if sg1:GetCount()==0 or (sg2:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(81788994,0))) then - fc:RemoveCounter(tp,0x16,3,REASON_EFFECT) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL) - g1=sg2:Select(tp,1,1,nil) - else - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL) - g1=sg1:Select(tp,1,1,nil) - end - Duel.SetFusionMaterial(g1) - return - end - local sg=eg:Filter(aux.FConditionFilterF2c,nil,c74822425.ffilter1,c74822425.ffilter2) - local g1=nil - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL) - if chkf~=PLAYER_NONE then - g1=sg:FilterSelect(tp,aux.FConditionCheckF,1,1,nil,chkf) - else g1=sg:Select(tp,1,1,nil) end - local tc1=g1:GetFirst() - local sg1=Group.CreateGroup() - local sg2=Group.CreateGroup() - if c74822425.ffilter1(tc1) then - sg1:Merge(sg:Filter(c74822425.ffilter2,tc1)) - sg2:Merge(exg:Filter(c74822425.ffilter2,tc1)) - end - if c74822425.ffilter2(tc1) then - sg1:Merge(sg:Filter(c74822425.ffilter1,tc1)) - sg2:Merge(exg:Filter(c74822425.ffilter1,tc1)) - end - local g2=nil - if sg1:GetCount()==0 or (sg2:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(81788994,0))) then - fc:RemoveCounter(tp,0x16,3,REASON_EFFECT) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL) - g2=sg2:Select(tp,1,1,nil) - else - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL) - g2=sg1:Select(tp,1,1,nil) - end - g1:Merge(g2) - Duel.SetFusionMaterial(g1) -end -function c74822425.splimit(e,se,sp,st) - return bit.band(st,SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION -end -function c74822425.discon(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) then return false end - local loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION) - return loc==LOCATION_MZONE and re:IsActiveType(TYPE_MONSTER) - and bit.band(re:GetHandler():GetSummonType(),SUMMON_TYPE_SPECIAL)==SUMMON_TYPE_SPECIAL - and Duel.IsChainNegatable(ev) -end -function c74822425.filter(c) - return c:IsSetCard(0x9d) -end -function c74822425.distg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c74822425.filter,tp,LOCATION_HAND,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) - end -end -function c74822425.disop(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateActivation(ev) - if re:GetHandler():IsRelateToEffect(re) and Duel.Destroy(eg,REASON_EFFECT)>0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c74822425.filter,tp,LOCATION_HAND,0,1,1,nil) - if g:GetCount()>0 then - Duel.BreakEffect() - Duel.SendtoGrave(g,REASON_EFFECT) - end - end -end -function c74822425.thfilter(c) - return c:IsSetCard(0x9d) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand() -end -function c74822425.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c74822425.thfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c74822425.thfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c74822425.thfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c74822425.thop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end diff --git a/script/c74823665.lua b/script/c74823665.lua deleted file mode 100644 index bfcc2ea3c6..0000000000 --- a/script/c74823665.lua +++ /dev/null @@ -1,52 +0,0 @@ ---インフェルノ -function c74823665.initial_effect(c) - c:EnableReviveLimit() - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c74823665.spcon) - e1:SetOperation(c74823665.spop) - c:RegisterEffect(e1) - --damage - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(74823665,0)) - e2:SetCategory(CATEGORY_DAMAGE) - e2:SetCode(EVENT_BATTLE_DESTROYING) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCondition(c74823665.damcon) - e2:SetTarget(c74823665.damtg) - e2:SetOperation(c74823665.damop) - c:RegisterEffect(e2) -end -function c74823665.spfilter(c) - return c:IsAttribute(ATTRIBUTE_FIRE) and c:IsAbleToRemoveAsCost() -end -function c74823665.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c74823665.spfilter,tp,LOCATION_GRAVE,0,1,nil) -end -function c74823665.spop(e,tp,eg,ep,ev,re,r,rp,c) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c74823665.spfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c74823665.damcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local bc=c:GetBattleTarget() - return c:IsRelateToBattle() and bc:IsLocation(LOCATION_GRAVE) and bc:IsReason(REASON_BATTLE) -end -function c74823665.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(1500) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,1500) -end -function c74823665.damop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c74825788.lua b/script/c74825788.lua deleted file mode 100644 index 44b59dad5f..0000000000 --- a/script/c74825788.lua +++ /dev/null @@ -1,34 +0,0 @@ ---H-ヒートハート -function c74825788.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c74825788.target) - e1:SetOperation(c74825788.activate) - c:RegisterEffect(e1) -end -function c74825788.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,nil) -end -function c74825788.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - e1:SetValue(500) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_PIERCE) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - tc:RegisterEffect(e2) - end -end diff --git a/script/c74841885.lua b/script/c74841885.lua deleted file mode 100644 index 01ab3a1bc9..0000000000 --- a/script/c74841885.lua +++ /dev/null @@ -1,89 +0,0 @@ ---天魔神 インヴィシル -function c74841885.initial_effect(c) - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - c:RegisterEffect(e1) - --tribute check - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_MATERIAL_CHECK) - e2:SetValue(c74841885.valcheck) - c:RegisterEffect(e2) - --give negate effect only when summon - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_SUMMON_COST) - e3:SetOperation(c74841885.facechk) - e3:SetLabelObject(e2) - c:RegisterEffect(e3) -end -function c74841885.chkfilter(c,rac,att) - return c:IsRace(rac) and c:IsAttribute(att) -end -function c74841885.valcheck(e,c) - if e:GetLabel()~=1 then return end - e:SetLabel(0) - local g=c:GetMaterial() - local lbl=0 - if g:IsExists(c74841885.chkfilter,1,nil,RACE_FAIRY,ATTRIBUTE_LIGHT) then - lbl=lbl+TYPE_SPELL - end - if g:IsExists(c74841885.chkfilter,1,nil,RACE_FIEND,ATTRIBUTE_DARK) then - lbl=lbl+TYPE_TRAP - end - if lbl~=0 then - --disable - local e1=Effect.CreateEffect(c) - if lbl==TYPE_SPELL then - e1:SetDescription(aux.Stringid(74841885,0)) - elseif lbl==TYPE_TRAP then - e1:SetDescription(aux.Stringid(74841885,1)) - else - e1:SetDescription(aux.Stringid(74841885,2)) - end - e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_DISABLE) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(LOCATION_SZONE,LOCATION_SZONE) - e1:SetTarget(c74841885.distg) - e1:SetLabel(lbl) - e1:SetReset(RESET_EVENT+0xff0000) - c:RegisterEffect(e1) - --disable effect - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_CHAIN_SOLVING) - e2:SetRange(LOCATION_MZONE) - e2:SetLabel(lbl) - e2:SetOperation(c74841885.disop) - e2:SetReset(RESET_EVENT+0xff0000) - c:RegisterEffect(e2) - if bit.band(lbl,TYPE_TRAP)~=0 then - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetCode(EFFECT_DISABLE_TRAPMONSTER) - e3:SetRange(LOCATION_MZONE) - e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e3:SetTarget(c74841885.distg) - e3:SetLabel(TYPE_TRAP) - e3:SetReset(RESET_EVENT+0xff0000) - c:RegisterEffect(e3) - end - end -end -function c74841885.distg(e,c) - return c:IsType(e:GetLabel()) -end -function c74841885.disop(e,tp,eg,ep,ev,re,r,rp) - local tl=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION) - if tl==LOCATION_SZONE and re:IsActiveType(e:GetLabel()) then - Duel.NegateEffect(ev) - end -end -function c74841885.facechk(e,tp,eg,ep,ev,re,r,rp) - e:GetLabelObject():SetLabel(1) -end diff --git a/script/c74845897.lua b/script/c74845897.lua deleted file mode 100644 index aa5f6624f5..0000000000 --- a/script/c74845897.lua +++ /dev/null @@ -1,64 +0,0 @@ ---真炎の爆発 -function c74845897.initial_effect(c) - --activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c74845897.tg) - e1:SetOperation(c74845897.op) - c:RegisterEffect(e1) -end -function c74845897.filter(c,e,tp) - return c:GetDefence()==200 and c:IsAttribute(ATTRIBUTE_FIRE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c74845897.tg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c74845897.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE) -end -function c74845897.op(e,tp,eg,ep,ev,re,r,rp) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ft<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c74845897.filter,tp,LOCATION_GRAVE,0,ft,ft,nil,e,tp) - if g:GetCount()>0 then - local fid=e:GetHandler():GetFieldID() - local tc=g:GetFirst() - while tc do - Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) - tc:RegisterFlagEffect(74845897,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1,fid) - tc=g:GetNext() - end - Duel.SpecialSummonComplete() - g:KeepAlive() - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e1:SetReset(RESET_PHASE+PHASE_END) - e1:SetCountLimit(1) - e1:SetLabel(fid) - e1:SetLabelObject(g) - e1:SetCondition(c74845897.rmcon) - e1:SetOperation(c74845897.rmop) - Duel.RegisterEffect(e1,tp) - end -end -function c74845897.rmfilter(c,fid) - return c:GetFlagEffectLabel(74845897)==fid -end -function c74845897.rmcon(e,tp,eg,ep,ev,re,r,rp) - local g=e:GetLabelObject() - if not g:IsExists(c74845897.rmfilter,1,nil,e:GetLabel()) then - g:DeleteGroup() - e:Reset() - return false - else return true end -end -function c74845897.rmop(e,tp,eg,ep,ev,re,r,rp) - local g=e:GetLabelObject() - local tg=g:Filter(c74845897.rmfilter,nil,e:GetLabel()) - g:DeleteGroup() - Duel.Remove(tg,POS_FACEUP,REASON_EFFECT) -end diff --git a/script/c74848038.lua b/script/c74848038.lua deleted file mode 100644 index e03d639c0e..0000000000 --- a/script/c74848038.lua +++ /dev/null @@ -1,34 +0,0 @@ ---死者転生 -function c74848038.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c74848038.cost) - e1:SetTarget(c74848038.target) - e1:SetOperation(c74848038.activate) - c:RegisterEffect(e1) -end -function c74848038.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) -end -function c74848038.tgfilter(c) - return c:IsType(TYPE_MONSTER) and c:IsAbleToHand() -end -function c74848038.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c74848038.tgfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c74848038.tgfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local sg=Duel.SelectTarget(tp,c74848038.tgfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,sg,sg:GetCount(),0,0) -end -function c74848038.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end diff --git a/script/c74852810.lua b/script/c74852810.lua deleted file mode 100644 index 0352a4bc5c..0000000000 --- a/script/c74852810.lua +++ /dev/null @@ -1,41 +0,0 @@ ---オーバーレイ・キャプチャー -function c74852810.initial_effect(c) - -- - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c74852810.target) - e1:SetOperation(c74852810.operation) - c:RegisterEffect(e1) -end -function c74852810.filter1(c) - return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:GetOverlayCount()>0 -end -function c74852810.filter2(c) - return c:IsFaceup() and c:IsType(TYPE_XYZ) -end -function c74852810.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - if chk==0 then return Duel.IsExistingTarget(c74852810.filter1,tp,0,LOCATION_MZONE,1,nil) - and Duel.IsExistingTarget(c74852810.filter2,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - local g1=Duel.SelectTarget(tp,c74852810.filter1,tp,0,LOCATION_MZONE,1,1,nil) - e:SetLabelObject(g1:GetFirst()) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - Duel.SelectTarget(tp,c74852810.filter2,tp,LOCATION_MZONE,0,1,1,nil) -end -function c74852810.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc1=e:GetLabelObject() - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local tc2=g:GetFirst() - if tc1==tc2 then tc2=g:GetNext() end - if tc1:IsFacedown() or not tc1:IsRelateToEffect(e) then return end - local og=tc1:GetOverlayGroup() - if og:GetCount()==0 then return end - if Duel.SendtoGrave(og,REASON_EFFECT)~=0 and tc2:IsFaceup() and tc2:IsRelateToEffect(e) and c:IsRelateToEffect(e) then - c:CancelToGrave() - Duel.Overlay(tc2,Group.FromCards(c)) - end -end diff --git a/script/c74854609.lua b/script/c74854609.lua deleted file mode 100644 index c18d8e163a..0000000000 --- a/script/c74854609.lua +++ /dev/null @@ -1,52 +0,0 @@ ---ゼクト・コンバージョン -function c74854609.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_BE_BATTLE_TARGET) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCondition(c74854609.condition) - e1:SetTarget(c74854609.target) - e1:SetOperation(c74854609.operation) - c:RegisterEffect(e1) -end -function c74854609.condition(e,tp,eg,ep,ev,re,r,rp) - local a=Duel.GetAttacker() - local d=Duel.GetAttackTarget() - return d:IsFaceup() and d:IsSetCard(0x56) and a:IsControler(1-tp) -end -function c74854609.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local a=Duel.GetAttacker() - if chkc then return a==chkc end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and a:IsOnField() and a:IsCanBeEffectTarget(e) end - Duel.SetTargetCard(a) -end -function c74854609.eqlimit(e,c) - return c==e:GetLabelObject() -end -function c74854609.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local ec=Duel.GetAttackTarget() - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsAttackable() and not tc:IsStatus(STATUS_ATTACK_CANCELED) - and ec:IsLocation(LOCATION_MZONE) and ec:IsFaceup() then - Duel.Equip(tp,ec,tc) - --Add Equip limit - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(c74854609.eqlimit) - e1:SetLabelObject(tc) - ec:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_SET_CONTROL) - e2:SetValue(tp) - e2:SetReset(RESET_EVENT+0x1fc0000) - ec:RegisterEffect(e2) - end -end diff --git a/script/c74860293.lua b/script/c74860293.lua deleted file mode 100644 index 0512438233..0000000000 --- a/script/c74860293.lua +++ /dev/null @@ -1,36 +0,0 @@ ---ジャンク・デストロイヤー -function c74860293.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,c74860293.tfilter,aux.NonTuner(nil),1) - c:EnableReviveLimit() - --atkup - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(74860293,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(c74860293.con) - e1:SetTarget(c74860293.tg) - e1:SetOperation(c74860293.op) - c:RegisterEffect(e1) -end -function c74860293.tfilter(c) - return c:IsCode(63977008) or c:IsHasEffect(20932152) -end -function c74860293.con(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_SYNCHRO -end -function c74860293.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsDestructable() end - if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end - local mc=e:GetHandler():GetMaterialCount() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,mc-1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c74860293.op(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local sg=g:Filter(Card.IsRelateToEffect,nil,e) - Duel.Destroy(sg,REASON_EFFECT) -end diff --git a/script/c74875003.lua b/script/c74875003.lua deleted file mode 100644 index 86d0617d59..0000000000 --- a/script/c74875003.lua +++ /dev/null @@ -1,63 +0,0 @@ ---ラーの使徒 -function c74875003.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(74875003,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c74875003.target) - e1:SetOperation(c74875003.operation) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e2) - local e3=e1:Clone() - e3:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - c:RegisterEffect(e3) - --release limit - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e4:SetRange(LOCATION_MZONE) - e4:SetCode(EFFECT_UNRELEASABLE_NONSUM) - e4:SetValue(1) - c:RegisterEffect(e4) - local e5=e4:Clone() - e5:SetCode(EFFECT_UNRELEASABLE_SUM) - e5:SetValue(c74875003.sumval) - c:RegisterEffect(e5) - -- - local e6=Effect.CreateEffect(c) - e6:SetType(EFFECT_TYPE_FIELD) - e6:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e6:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e6:SetRange(LOCATION_MZONE) - e6:SetTargetRange(1,0) - e6:SetTarget(c74875003.splimit) - c:RegisterEffect(e6) -end -function c74875003.filter(c,e,tp) - return c:IsCode(74875003) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c74875003.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c74875003.filter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_HAND) -end -function c74875003.operation(e,tp,eg,ep,ev,re,r,rp) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ft>2 then ft=2 end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c74875003.filter,tp,LOCATION_DECK+LOCATION_HAND,0,1,ft,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end -function c74875003.sumval(e,c) - return not c:IsCode(10000000) and not c:IsCode(10000010) and not c:IsCode(10000020) -end -function c74875003.splimit(e,c,sump,sumtype,sumpos,targetp,se) - return not se:GetHandler():IsCode(74875003) -end \ No newline at end of file diff --git a/script/c74892653.lua b/script/c74892653.lua deleted file mode 100644 index 6c0fa1296f..0000000000 --- a/script/c74892653.lua +++ /dev/null @@ -1,92 +0,0 @@ ---スターダスト・ウォリアー -function c74892653.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsType,TYPE_SYNCHRO),aux.NonTuner(Card.IsType,TYPE_SYNCHRO),1) - c:EnableReviveLimit() - --disable spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(74892653,0)) - e1:SetCategory(CATEGORY_DISABLE_SUMMON+CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_SPSUMMON) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c74892653.condition) - e1:SetCost(c74892653.cost) - e1:SetTarget(c74892653.target) - e1:SetOperation(c74892653.operation) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(74892653,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_PHASE+PHASE_END) - e2:SetRange(LOCATION_GRAVE) - e2:SetCountLimit(1) - e2:SetTarget(c74892653.sptg) - e2:SetOperation(c74892653.spop) - c:RegisterEffect(e2) - --synchro summon - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(74892653,2)) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_LEAVE_FIELD) - e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e3:SetCondition(c74892653.sccon) - e3:SetTarget(c74892653.sctg) - e3:SetOperation(c74892653.scop) - c:RegisterEffect(e3) -end -function c74892653.condition(e,tp,eg,ep,ev,re,r,rp) - return tp~=ep and Duel.GetCurrentChain()==0 -end -function c74892653.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end -function c74892653.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DISABLE_SUMMON,eg,eg:GetCount(),0,0) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,eg:GetCount(),0,0) -end -function c74892653.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateSummon(eg) - Duel.Destroy(eg,REASON_EFFECT) - e:GetHandler():RegisterFlagEffect(74892653,RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END,0,1) -end -function c74892653.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:GetFlagEffect(74892653)~=0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0) -end -function c74892653.spop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP) - end -end -function c74892653.sccon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return (c:IsReason(REASON_BATTLE) or (c:GetReasonPlayer()~=tp and c:IsReason(REASON_EFFECT))) - and c:IsPreviousPosition(POS_FACEUP) -end -function c74892653.filter(c,e,tp) - return c:IsSetCard(0x66) and c:IsLevelBelow(8) and c:IsType(TYPE_SYNCHRO) - and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_SYNCHRO,tp,false,false) -end -function c74892653.sctg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c74892653.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function c74892653.scop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c74892653.filter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp) - local tc=g:GetFirst() - if tc then - Duel.SpecialSummon(tc,SUMMON_TYPE_SYNCHRO,tp,tp,false,false,POS_FACEUP) - tc:CompleteProcedure() - end -end diff --git a/script/c7489323.lua b/script/c7489323.lua deleted file mode 100644 index 69002cfc7f..0000000000 --- a/script/c7489323.lua +++ /dev/null @@ -1,21 +0,0 @@ ---ミリス・レディエント -function c7489323.initial_effect(c) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetTarget(c7489323.tg1) - e1:SetValue(500) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetTarget(c7489323.tg2) - e2:SetValue(-400) - c:RegisterEffect(e2) -end -function c7489323.tg1(e,c) - return c:IsAttribute(ATTRIBUTE_EARTH) -end -function c7489323.tg2(e,c) - return c:IsAttribute(ATTRIBUTE_WIND) -end diff --git a/script/c74923978.lua b/script/c74923978.lua deleted file mode 100644 index 54f11ea08f..0000000000 --- a/script/c74923978.lua +++ /dev/null @@ -1,37 +0,0 @@ ---強制接収 -function c74923978.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_DISCARD) - e1:SetCondition(c74923978.condition) - c:RegisterEffect(e1) - --handes - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(74923978,0)) - e2:SetCategory(CATEGORY_HANDES) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetRange(LOCATION_SZONE) - e2:SetCode(EVENT_DISCARD) - e2:SetCondition(c74923978.condition) - e2:SetTarget(c74923978.target) - e2:SetOperation(c74923978.operation) - c:RegisterEffect(e2) -end -function c74923978.cfilter(c,tp) - return c:GetPreviousControler()==tp -end -function c74923978.condition(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c74923978.cfilter,1,nil,tp) -end -function c74923978.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsRelateToEffect(e) end - local ct=eg:FilterCount(c74923978.cfilter,nil,tp) - e:SetLabel(ct) - Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,1-tp,ct) -end -function c74923978.operation(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local ct=e:GetLabel() - Duel.DiscardHand(1-tp,nil,ct,ct,REASON_EFFECT+REASON_DISCARD) -end diff --git a/script/c74926274.lua b/script/c74926274.lua deleted file mode 100644 index 12aa74762b..0000000000 --- a/script/c74926274.lua +++ /dev/null @@ -1,60 +0,0 @@ ---ペンデュラム・アライズ -function c74926274.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,74926274+EFFECT_COUNT_CODE_OATH) - e1:SetCost(c74926274.cost) - e1:SetTarget(c74926274.target) - e1:SetOperation(c74926274.activate) - c:RegisterEffect(e1) -end -function c74926274.cost(e,tp,eg,ep,ev,re,r,rp,chk) - e:SetLabel(100) - return true -end -function c74926274.filter(c,e,tp) - local lv=c:GetOriginalLevel() - return lv>0 and c:IsAbleToGraveAsCost() - and Duel.IsExistingMatchingCard(c74926274.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp,lv) -end -function c74926274.spfilter(c,e,tp,lv) - return c:IsType(TYPE_PENDULUM) and c:GetLevel()==lv and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c74926274.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - if e:GetLabel()~=100 then return false end - e:SetLabel(0) - return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsExistingMatchingCard(c74926274.filter,tp,LOCATION_MZONE,0,1,nil,e,tp) - end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c74926274.filter,tp,LOCATION_MZONE,0,1,1,nil,e,tp) - e:SetLabel(g:GetFirst():GetOriginalLevel()) - Duel.SendtoGrave(g,REASON_COST) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c74926274.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local lv=e:GetLabel() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c74926274.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,lv) - local tc=g:GetFirst() - if tc then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetCountLimit(1) - e1:SetOperation(c74926274.desop) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1,true) - end -end -function c74926274.desop(e,tp,eg,ep,ev,re,r,rp) - Duel.Destroy(e:GetHandler(),REASON_EFFECT) -end diff --git a/script/c74952447.lua b/script/c74952447.lua deleted file mode 100644 index fc10a9c085..0000000000 --- a/script/c74952447.lua +++ /dev/null @@ -1,15 +0,0 @@ ---かつて神と呼ばれた亀 -function c74952447.initial_effect(c) - --disable spsummon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetTargetRange(1,1) - e1:SetTarget(c74952447.sumlimit) - c:RegisterEffect(e1) -end -function c74952447.sumlimit(e,c,sump,sumtype,sumpos,targetp) - return c:IsAttackAbove(1800) -end diff --git a/script/c74968065.lua b/script/c74968065.lua deleted file mode 100644 index 1f86340d0a..0000000000 --- a/script/c74968065.lua +++ /dev/null @@ -1,33 +0,0 @@ ---ヘカテリス -function c74968065.initial_effect(c) - --search - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(74968065,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND) - e1:SetCost(c74968065.cost) - e1:SetTarget(c74968065.target) - e1:SetOperation(c74968065.operation) - c:RegisterEffect(e1) -end -function c74968065.cost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToGraveAsCost() and c:IsDiscardable() end - Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD) -end -function c74968065.filter(c) - return c:GetCode()==1353770 and c:IsAbleToHand() -end -function c74968065.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chk==0 then return Duel.IsExistingMatchingCard(c74968065.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c74968065.operation(e,tp,eg,ep,ev,re,r,rp,chk) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local tg=Duel.GetFirstMatchingCard(c74968065.filter,tp,LOCATION_DECK,0,nil) - if tg then - Duel.SendtoHand(tg,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tg) - end -end diff --git a/script/c74976215.lua b/script/c74976215.lua deleted file mode 100644 index 65c04426c7..0000000000 --- a/script/c74976215.lua +++ /dev/null @@ -1,21 +0,0 @@ ---クロスソード・ハンター -function c74976215.initial_effect(c) - --pierce - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_PIERCE) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetCondition(c74976215.condition) - e1:SetTarget(c74976215.target) - c:RegisterEffect(e1) -end -function c74976215.filter(c) - return c:IsFaceup() and c:IsRace(RACE_INSECT) -end -function c74976215.condition(e) - return Duel.IsExistingMatchingCard(c74976215.filter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,e:GetHandler()) -end -function c74976215.target(e,c) - return c:IsRace(RACE_INSECT) -end diff --git a/script/c74983881.lua b/script/c74983881.lua deleted file mode 100644 index 0832e37ffa..0000000000 --- a/script/c74983881.lua +++ /dev/null @@ -1,34 +0,0 @@ ---モロコシーナ -function c74983881.initial_effect(c) - --coin effect - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(74983881,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCondition(c74983881.spcon) - e1:SetCost(c74983881.spcost) - e1:SetTarget(c74983881.sptg) - e1:SetOperation(c74983881.spop) - c:RegisterEffect(e1) -end -function c74983881.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()==PHASE_MAIN2 -end -function c74983881.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,500) end - Duel.PayLPCost(tp,500) -end -function c74983881.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsPlayerCanSpecialSummonMonster(tp,74983882,0,0x4011,0,0,1,RACE_PLANT,ATTRIBUTE_EARTH) end - Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0) -end -function c74983881.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - if not Duel.IsPlayerCanSpecialSummonMonster(tp,74983882,0,0x4011,0,0,1,RACE_PLANT,ATTRIBUTE_EARTH) then return end - local token=Duel.CreateToken(tp,74983882) - Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP) -end diff --git a/script/c7500772.lua b/script/c7500772.lua deleted file mode 100644 index cc63f8ffd3..0000000000 --- a/script/c7500772.lua +++ /dev/null @@ -1,33 +0,0 @@ ---イーグル・シャーク -function c7500772.initial_effect(c) - c:SetUniqueOnField(1,0,7500772) - --summon with no tribute - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(7500772,0)) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SUMMON_PROC) - e1:SetCondition(c7500772.ntcon) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetRange(LOCATION_HAND) - e2:SetCode(EFFECT_SPSUMMON_PROC) - e2:SetCondition(c7500772.spcon) - c:RegisterEffect(e2) -end -function c7500772.ntcon(e,c,minc) - if c==nil then return true end - return minc==0 and c:GetLevel()>4 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 - and Duel.GetFieldGroupCount(c:GetControler(),0,LOCATION_MZONE)>1 -end -function c7500772.filter(c) - return c:IsFaceup() and c:IsCode(70101178) -end -function c7500772.spcon(e,c) - if c==nil then return true end - return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c7500772.filter,c:GetControler(),LOCATION_MZONE,0,1,nil) -end diff --git a/script/c75014062.lua b/script/c75014062.lua deleted file mode 100644 index 0687f18734..0000000000 --- a/script/c75014062.lua +++ /dev/null @@ -1,36 +0,0 @@ ---魔力掌握 -function c75014062.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_COUNTER) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,75014062+EFFECT_COUNT_CODE_OATH) - e1:SetTarget(c75014062.target) - e1:SetOperation(c75014062.activate) - c:RegisterEffect(e1) -end -function c75014062.filter(c) - return c:IsFaceup() and c:IsCanAddCounter(0x3001,1) -end -function c75014062.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and c75014062.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c75014062.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(75014062,1)) - Duel.SelectTarget(tp,c75014062.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,1,0,0x3001) -end -function c75014062.tfilter(c) - return c:GetCode()==75014062 and c:IsAbleToHand() -end -function c75014062.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) and tc:AddCounter(0x3001,1) then - local th=Duel.GetFirstMatchingCard(c75014062.tfilter,tp,LOCATION_DECK,0,nil) - if th and Duel.SelectYesNo(tp,aux.Stringid(75014062,0)) then - Duel.SendtoHand(th,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,th) - end - end -end diff --git a/script/c75041269.lua b/script/c75041269.lua deleted file mode 100644 index 203664c815..0000000000 --- a/script/c75041269.lua +++ /dev/null @@ -1,66 +0,0 @@ ---幽獄の時計塔 -function c75041269.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --add counter - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(75041269,0)) - e2:SetCategory(CATEGORY_COUNTER) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetRange(LOCATION_SZONE) - e2:SetCountLimit(1) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) - e2:SetCondition(c75041269.ctcon) - e2:SetOperation(c75041269.ctop) - c:RegisterEffect(e2) - --avoid battle damage - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetCode(EFFECT_AVOID_BATTLE_DAMAGE) - e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e3:SetRange(LOCATION_SZONE) - e3:SetTargetRange(1,0) - e3:SetCondition(c75041269.dcon) - c:RegisterEffect(e3) - --spsummon - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(75041269,1)) - e4:SetCategory(CATEGORY_SPECIAL_SUMMON) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e4:SetCode(EVENT_LEAVE_FIELD) - e4:SetCondition(c75041269.spcon) - e4:SetTarget(c75041269.sptg) - e4:SetOperation(c75041269.spop) - c:RegisterEffect(e4) -end -function c75041269.dcon(e) - return e:GetHandler():GetCounter(0x1b)>=4 -end -function c75041269.ctcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp -end -function c75041269.ctop(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():AddCounter(0x1b,1) -end -function c75041269.spcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsReason(REASON_DESTROY) and c:IsLocation(LOCATION_GRAVE) and c:GetCounter(0x1b)>=4 -end -function c75041269.spfilter(c,e,tp) - return c:IsCode(40591390) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c75041269.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) -end -function c75041269.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c75041269.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()~=0 then - Duel.SpecialSummon(g,1,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c75043725.lua b/script/c75043725.lua deleted file mode 100644 index 518e8aba24..0000000000 --- a/script/c75043725.lua +++ /dev/null @@ -1,35 +0,0 @@ ---冥界の使者 -function c75043725.initial_effect(c) - --search - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(75043725,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCondition(c75043725.condition) - e1:SetTarget(c75043725.target) - e1:SetOperation(c75043725.operation) - c:RegisterEffect(e1) -end -function c75043725.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) -end -function c75043725.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c75043725.filter(c) - return c:IsLevelBelow(3) and c:IsType(TYPE_NORMAL) and c:IsAbleToHand() -end -function c75043725.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g1=Duel.SelectMatchingCard(tp,c75043725.filter,tp,LOCATION_DECK,0,1,1,nil) - local tc1=g1:GetFirst() - Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_ATOHAND) - local g2=Duel.SelectMatchingCard(1-tp,c75043725.filter,tp,0,LOCATION_DECK,1,1,nil) - local tc2=g2:GetFirst() - g1:Merge(g2) - Duel.SendtoHand(g1,nil,REASON_EFFECT) - if tc1 then Duel.ConfirmCards(1-tp,tc1) end - if tc2 then Duel.ConfirmCards(tp,tc2) end -end diff --git a/script/c75064463.lua b/script/c75064463.lua deleted file mode 100644 index d362cf63de..0000000000 --- a/script/c75064463.lua +++ /dev/null @@ -1,40 +0,0 @@ ---ハーピィ・クィーン -function c75064463.initial_effect(c) - --search - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(75064463,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND) - e1:SetCost(c75064463.cost) - e1:SetTarget(c75064463.target) - e1:SetOperation(c75064463.operation) - c:RegisterEffect(e1) - --change name - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetCode(EFFECT_CHANGE_CODE) - e2:SetRange(LOCATION_MZONE+LOCATION_GRAVE) - e2:SetValue(76812113) - c:RegisterEffect(e2) -end -function c75064463.cost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToGraveAsCost() and c:IsDiscardable() end - Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD) -end -function c75064463.filter(c) - return c:GetCode()==75782277 and c:IsAbleToHand() -end -function c75064463.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chk==0 then return Duel.IsExistingMatchingCard(c75064463.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c75064463.operation(e,tp,eg,ep,ev,re,r,rp,chk) - local tg=Duel.GetFirstMatchingCard(c75064463.filter,tp,LOCATION_DECK,0,nil) - if tg then - Duel.SendtoHand(tg,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tg) - end -end diff --git a/script/c75078585.lua b/script/c75078585.lua deleted file mode 100644 index 1cbd1f72a2..0000000000 --- a/script/c75078585.lua +++ /dev/null @@ -1,37 +0,0 @@ ---スクランブル・エッグ -function c75078585.initial_effect(c) - Duel.EnableGlobalFlag(GLOBALFLAG_DELAYED_QUICKEFFECT) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e1:SetCondition(c75078585.condition) - e1:SetTarget(c75078585.target) - e1:SetOperation(c75078585.operation) - c:RegisterEffect(e1) -end -function c75078585.cfilter(c,tp) - return c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE+REASON_EFFECT) and c:IsPreviousLocation(LOCATION_MZONE) and c:GetPreviousControler()==tp -end -function c75078585.condition(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c75078585.cfilter,1,nil,tp) -end -function c75078585.filter(c,e,tp) - return c:IsCode(36472900) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) - and not c:IsHasEffect(EFFECT_NECRO_VALLEY) -end -function c75078585.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c75078585.filter,tp,0x13,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,0x13) -end -function c75078585.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c75078585.filter,tp,0x13,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c75081613.lua b/script/c75081613.lua deleted file mode 100644 index ac90dc5988..0000000000 --- a/script/c75081613.lua +++ /dev/null @@ -1,52 +0,0 @@ ---ジャイアントワーム -function c75081613.initial_effect(c) - c:EnableReviveLimit() - -- - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_SPSUMMON_PROC) - e2:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e2:SetRange(LOCATION_HAND) - e2:SetCondition(c75081613.spcon) - e2:SetOperation(c75081613.spop) - c:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(75081613,0)) - e3:SetCategory(CATEGORY_DECKDES) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e3:SetCode(EVENT_BATTLE_DAMAGE) - e3:SetCondition(c75081613.condition) - e3:SetTarget(c75081613.target) - e3:SetOperation(c75081613.operation) - c:RegisterEffect(e3) -end -function c75081613.spfilter(c) - return c:IsRace(RACE_INSECT) and c:IsAbleToRemoveAsCost() -end -function c75081613.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c75081613.spfilter,tp,LOCATION_GRAVE,0,1,nil) -end -function c75081613.spop(e,tp,eg,ep,ev,re,r,rp,c) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c75081613.spfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c75081613.condition(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp -end -function c75081613.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DECKDES,0,0,1-tp,1) -end -function c75081613.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.DiscardDeck(1-tp,1,REASON_EFFECT) -end diff --git a/script/c75105429.lua b/script/c75105429.lua deleted file mode 100644 index 98499f4f27..0000000000 --- a/script/c75105429.lua +++ /dev/null @@ -1,30 +0,0 @@ ---シンクロ・イジェクション -function c75105429.initial_effect(c) - --remove - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_REMOVE+CATEGORY_DRAW) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c75105429.target) - e1:SetOperation(c75105429.operation) - c:RegisterEffect(e1) -end -function c75105429.filter(c) - return c:IsFaceup() and c:IsType(TYPE_SYNCHRO) and c:IsAbleToRemove() -end -function c75105429.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and c75105429.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c75105429.filter,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,c75105429.filter,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,1-tp,1) -end -function c75105429.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() and Duel.Remove(tc,0,REASON_EFFECT)~=0 then - Duel.BreakEffect() - Duel.Draw(1-tp,1,REASON_EFFECT) - end -end diff --git a/script/c75109441.lua b/script/c75109441.lua deleted file mode 100644 index 56a539a94e..0000000000 --- a/script/c75109441.lua +++ /dev/null @@ -1,37 +0,0 @@ ---半蛇人サクズィー -function c75109441.initial_effect(c) - --turn set - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(75109441,0)) - e1:SetCategory(CATEGORY_POSITION) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetTarget(c75109441.target) - e1:SetOperation(c75109441.operation) - c:RegisterEffect(e1) - --confirm - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(75109441,1)) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_FLIP) - e2:SetOperation(c75109441.cfop) - c:RegisterEffect(e2) -end -function c75109441.target(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsCanTurnSet() and c:GetFlagEffect(75109441)==0 end - c:RegisterFlagEffect(75109441,RESET_EVENT+0x1fc0000+RESET_PHASE+PHASE_END,0,1) - Duel.SetOperationInfo(0,CATEGORY_POSITION,c,1,0,0) -end -function c75109441.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - Duel.ChangePosition(c,POS_FACEDOWN_DEFENCE) - end -end -function c75109441.cfop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsFacedown,tp,0,LOCATION_SZONE,nil) - if g:GetCount()>0 then - Duel.ConfirmCards(tp,g) - end -end diff --git a/script/c75116619.lua b/script/c75116619.lua deleted file mode 100644 index 8f47ae3b35..0000000000 --- a/script/c75116619.lua +++ /dev/null @@ -1,68 +0,0 @@ ---真六武衆-エニシ -function c75116619.initial_effect(c) - --to hand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(75116619,0)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,0x1c0) - e1:SetCondition(c75116619.thcon) - e1:SetCost(c75116619.thcost) - e1:SetTarget(c75116619.thtg) - e1:SetOperation(c75116619.thop) - c:RegisterEffect(e1) - --atk,def - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetCondition(c75116619.valcon) - e2:SetValue(500) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EFFECT_UPDATE_DEFENCE) - c:RegisterEffect(e3) -end -function c75116619.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x3d) and c:GetCode()~=75116619 -end -function c75116619.thcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c75116619.cfilter,tp,LOCATION_MZONE,0,1,nil) -end -function c75116619.costfilter(c) - return c:IsSetCard(0x3d) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost() -end -function c75116619.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c75116619.costfilter,tp,LOCATION_GRAVE,0,2,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c75116619.costfilter,tp,LOCATION_GRAVE,0,2,2,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c75116619.filter(c) - return c:IsFaceup() and c:IsAbleToHand() -end -function c75116619.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c75116619.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c75116619.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g=Duel.SelectTarget(tp,c75116619.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c75116619.thop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - end -end -function c75116619.vfilter(c) - return c:IsFaceup() and c:IsSetCard(0x3d) and c:GetCode()~=75116619 -end -function c75116619.valcon(e) - local c=e:GetHandler() - return Duel.IsExistingMatchingCard(c75116619.vfilter,c:GetControler(),LOCATION_MZONE,0,2,c) -end diff --git a/script/c7512044.lua b/script/c7512044.lua deleted file mode 100644 index 16b6b089fd..0000000000 --- a/script/c7512044.lua +++ /dev/null @@ -1,27 +0,0 @@ ---精神統一 -function c7512044.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,7512044) - e1:SetTarget(c7512044.target) - e1:SetOperation(c7512044.activate) - c:RegisterEffect(e1) -end -function c7512044.filter(c) - return c:IsCode(7512044) and c:IsAbleToHand() -end -function c7512044.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c7512044.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c7512044.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c7512044.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c75132317.lua b/script/c75132317.lua deleted file mode 100644 index ff005128fe..0000000000 --- a/script/c75132317.lua +++ /dev/null @@ -1,72 +0,0 @@ ---雄炎星-スネイリン -function c75132317.initial_effect(c) - --set - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(75132317,0)) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetProperty(EFFECT_FLAG_DELAY) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCondition(c75132317.setcon) - e1:SetTarget(c75132317.settg) - e1:SetOperation(c75132317.setop) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(75132317,1)) - e2:SetCategory(CATEGORY_DRAW) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCondition(c75132317.drcon) - e2:SetCost(c75132317.drcost) - e2:SetTarget(c75132317.drtg) - e2:SetOperation(c75132317.drop) - c:RegisterEffect(e2) -end -function c75132317.tgfilter(c,tp) - return c:IsControler(tp) and c:IsSetCard(0x7c) and c:IsType(TYPE_SPELL+TYPE_TRAP) -end -function c75132317.setcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c75132317.tgfilter,1,nil,tp) -end -function c75132317.filter(c) - return c:IsSetCard(0x7c) and c:IsType(TYPE_TRAP) and c:IsSSetable() -end -function c75132317.settg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsRelateToEffect(e) and e:GetHandler():IsFaceup() - and not e:GetHandler():IsStatus(STATUS_CHAINING) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingMatchingCard(c75132317.filter,tp,LOCATION_DECK,0,1,nil) end -end -function c75132317.setop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) - local g=Duel.SelectMatchingCard(tp,c75132317.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SSet(tp,g:GetFirst()) - Duel.ConfirmCards(1-tp,g) - end -end -function c75132317.drcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==1 -end -function c75132317.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x7c) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToGraveAsCost() -end -function c75132317.drcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c75132317.cfilter,tp,LOCATION_ONFIELD,0,2,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c75132317.cfilter,tp,LOCATION_ONFIELD,0,2,2,nil) - Duel.SendtoGrave(g,REASON_COST) -end -function c75132317.drtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(1) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c75132317.drop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end diff --git a/script/c75141056.lua b/script/c75141056.lua deleted file mode 100644 index dc63f31055..0000000000 --- a/script/c75141056.lua +++ /dev/null @@ -1,44 +0,0 @@ ---ヒーロー・マスク -function c75141056.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c75141056.target) - e1:SetOperation(c75141056.activate) - c:RegisterEffect(e1) -end -function c75141056.tgfilter(c) - return c:IsFaceup() and Duel.IsExistingMatchingCard(c75141056.cfilter,c:GetControler(),LOCATION_DECK,0,1,nil,c) -end -function c75141056.cfilter(c,tc) - return c:IsSetCard(0x3008) and not c:IsCode(tc:GetCode()) and c:IsAbleToGrave() -end -function c75141056.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c75141056.tgfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c75141056.tgfilter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c75141056.tgfilter,tp,LOCATION_MZONE,0,1,1,nil) -end -function c75141056.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c75141056.cfilter,tp,LOCATION_DECK,0,1,1,nil,tc) - if g:GetCount()>0 then - local gc=g:GetFirst() - if Duel.SendtoGrave(gc,REASON_EFFECT)~=0 and gc:IsLocation(LOCATION_GRAVE) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CHANGE_CODE) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - e1:SetValue(gc:GetCode()) - tc:RegisterEffect(e1) - end - elseif Duel.IsPlayerCanDiscardDeck(tp,1) then - local cg=Duel.GetFieldGroup(tp,LOCATION_DECK,0) - Duel.ConfirmCards(1-tp,cg) - Duel.ConfirmCards(tp,cg) - Duel.ShuffleDeck(tp) - end -end diff --git a/script/c75162696.lua b/script/c75162696.lua deleted file mode 100644 index 6cd252a617..0000000000 --- a/script/c75162696.lua +++ /dev/null @@ -1,42 +0,0 @@ ---ウィクトーリア -function c75162696.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(75162696,1)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetTarget(c75162696.sptg) - e1:SetOperation(c75162696.spop) - c:RegisterEffect(e1) - --cannot be battle target - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET) - e2:SetRange(LOCATION_MZONE) - e2:SetTargetRange(0,LOCATION_MZONE) - e2:SetValue(c75162696.tg) - c:RegisterEffect(e2) -end -function c75162696.tg(e,c) - return c:IsFaceup() and c~=e:GetHandler() and c:IsRace(RACE_FAIRY) -end -function c75162696.filter(c,e,tp) - return c:IsRace(RACE_DRAGON) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c75162696.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(1-tp) and c75162696.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c75162696.filter,tp,0,LOCATION_GRAVE,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c75162696.filter,tp,0,LOCATION_GRAVE,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c75162696.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsRace(RACE_DRAGON) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c75180828.lua b/script/c75180828.lua deleted file mode 100644 index b622b366eb..0000000000 --- a/script/c75180828.lua +++ /dev/null @@ -1,126 +0,0 @@ ---水精鱗-サルフアビス -function c75180828.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(75180828,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND) - e1:SetCost(c75180828.spcost) - e1:SetTarget(c75180828.sptg) - e1:SetOperation(c75180828.spop) - c:RegisterEffect(e1) - --atkup & destroy - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(75180828,1)) - e2:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetCondition(c75180828.descon) - e2:SetTarget(c75180828.destg) - e2:SetOperation(c75180828.desop) - c:RegisterEffect(e2) - --destroy - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(75180828,2)) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_MZONE) - e3:SetCondition(c75180828.atkcon) - e3:SetCost(c75180828.atkcost) - e3:SetTarget(c75180828.atktg) - e3:SetOperation(c75180828.atkop) - c:RegisterEffect(e3) -end -function c75180828.cfilter(c) - return c:IsSetCard(0x74) and c:IsDiscardable() and c:IsAbleToGraveAsCost() -end -function c75180828.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c75180828.cfilter,tp,LOCATION_HAND,0,4,e:GetHandler()) end - Duel.DiscardHand(tp,c75180828.cfilter,4,4,REASON_COST+REASON_DISCARD,e:GetHandler()) -end -function c75180828.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c75180828.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,1,tp,tp,false,false,POS_FACEUP) - end -end -function c75180828.descon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+1 -end -function c75180828.descount(c) - return c:IsSetCard(0x74) and c:IsType(TYPE_MONSTER) -end -function c75180828.desfilter(c) - return c:IsDestructable() -end -function c75180828.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() and c75180828.desfilter(chkc) end - if chk==0 then return true end - local ct=Duel.GetMatchingGroupCount(c75180828.descount,tp,LOCATION_GRAVE,0,nil) - if ct>0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c75180828.desfilter,tp,0,LOCATION_ONFIELD,1,ct,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) - end -end -function c75180828.desop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFaceup() and c:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(500) - e1:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e1) - end - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) - Duel.Destroy(g,REASON_EFFECT) -end -function c75180828.atkcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()==PHASE_MAIN1 -end -function c75180828.rfilter(c) - return c:IsPosition(POS_FACEUP_ATTACK) and c:IsSetCard(0x74) -end -function c75180828.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,c75180828.rfilter,1,e:GetHandler()) end - local g=Duel.SelectReleaseGroup(tp,c75180828.rfilter,1,1,e:GetHandler()) - Duel.Release(g,REASON_COST) -end -function c75180828.atktg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():GetFlagEffect(75180828)==0 end -end -function c75180828.atkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(75180828,3)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_BATTLE_START) - e1:SetTarget(c75180828.destg2) - e1:SetOperation(c75180828.desop2) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,1) - c:RegisterEffect(e1) - c:RegisterFlagEffect(75180828,RESET_PHASE+PHASE_END,0,1) - end -end -function c75180828.destg2(e,tp,eg,ep,ev,re,r,rp,chk) - local d=Duel.GetAttackTarget() - if chk ==0 then return Duel.GetAttacker()==e:GetHandler() and d~=nil and d:IsDefencePos() end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,d,1,0,0) -end -function c75180828.desop2(e,tp,eg,ep,ev,re,r,rp) - local d=Duel.GetAttackTarget() - if d~=nil and d:IsRelateToBattle() and d:IsDefencePos() then - Duel.Destroy(d,REASON_EFFECT) - end -end diff --git a/script/c75190122.lua b/script/c75190122.lua deleted file mode 100644 index 0d3a737e17..0000000000 --- a/script/c75190122.lua +++ /dev/null @@ -1,29 +0,0 @@ ---黒・爆・裂・破・魔・導 -function c75190122.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c75190122.condition) - e1:SetTarget(c75190122.target) - e1:SetOperation(c75190122.activate) - c:RegisterEffect(e1) -end -function c75190122.cfilter(c,code) - local code1,code2=c:GetOriginalCodeRule() - return c:IsFaceup() and (code1==code or code2==code) -end -function c75190122.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c75190122.cfilter,tp,LOCATION_MZONE,0,1,nil,46986414) - and Duel.IsExistingMatchingCard(c75190122.cfilter,tp,LOCATION_MZONE,0,1,nil,38033121) -end -function c75190122.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDestructable,tp,0,LOCATION_ONFIELD,1,nil) end - local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,0,LOCATION_ONFIELD,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c75190122.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,0,LOCATION_ONFIELD,nil) - Duel.Destroy(g,REASON_EFFECT) -end diff --git a/script/c75198893.lua b/script/c75198893.lua deleted file mode 100644 index cacb4812d3..0000000000 --- a/script/c75198893.lua +++ /dev/null @@ -1,65 +0,0 @@ ---スキヤナー -function c75198893.initial_effect(c) - --copy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(75198893,0)) - e1:SetCategory(CATEGORY_REMOVE) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_MZONE) - e1:SetTarget(c75198893.target) - e1:SetOperation(c75198893.operation) - c:RegisterEffect(e1) -end -function c75198893.filter(c) - return c:IsFaceup() and c:IsType(TYPE_MONSTER) and not c:IsType(TYPE_XYZ) and not c:IsHasEffect(EFFECT_FORBIDDEN) -end -function c75198893.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(1-tp) and c75198893.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c75198893.filter,tp,0,LOCATION_REMOVED,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - Duel.SelectTarget(tp,c75198893.filter,tp,0,LOCATION_REMOVED,1,1,nil) -end -function c75198893.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and c:IsFaceup() and tc:IsRelateToEffect(e) then - local code=tc:GetOriginalCode() - local ba=tc:GetBaseAttack() - local bd=tc:GetBaseDefence() - local at=tc:GetAttribute() - local lv=tc:GetLevel() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_CHANGE_CODE) - e1:SetValue(code) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_SET_BASE_ATTACK) - e2:SetValue(ba) - c:RegisterEffect(e2) - local e3=e1:Clone() - e3:SetCode(EFFECT_SET_BASE_DEFENCE) - e3:SetValue(bd) - c:RegisterEffect(e3) - local e4=e1:Clone() - e4:SetCode(EFFECT_CHANGE_ATTRIBUTE) - e4:SetValue(at) - c:RegisterEffect(e4) - local e5=e1:Clone() - e5:SetCode(EFFECT_CHANGE_LEVEL) - e5:SetValue(lv) - c:RegisterEffect(e5) - --leave redir - local e6=Effect.CreateEffect(c) - e6:SetType(EFFECT_TYPE_SINGLE) - e6:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) - e6:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e6:SetReset(RESET_EVENT+0x47e0000+RESET_PHASE+RESET_END) - e6:SetValue(LOCATION_REMOVED) - c:RegisterEffect(e6) - end -end diff --git a/script/c75209824.lua b/script/c75209824.lua deleted file mode 100644 index ef7a8b1d65..0000000000 --- a/script/c75209824.lua +++ /dev/null @@ -1,47 +0,0 @@ ---ガーディアン・スタチュー -function c75209824.initial_effect(c) - --turn set - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(75209824,0)) - e1:SetCategory(CATEGORY_POSITION) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetTarget(c75209824.target) - e1:SetOperation(c75209824.operation) - c:RegisterEffect(e1) - --to hand - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(75209824,1)) - e2:SetCategory(CATEGORY_TOHAND) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - e2:SetTarget(c75209824.thtg) - e2:SetOperation(c75209824.thop) - c:RegisterEffect(e2) -end -function c75209824.target(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsCanTurnSet() and c:GetFlagEffect(75209824)==0 end - c:RegisterFlagEffect(75209824,RESET_EVENT+0x1fc0000+RESET_PHASE+PHASE_END,0,1) - Duel.SetOperationInfo(0,CATEGORY_POSITION,c,1,0,0) -end -function c75209824.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - Duel.ChangePosition(c,POS_FACEDOWN_DEFENCE) - end -end -function c75209824.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsAbleToHand() end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g=Duel.SelectTarget(tp,Card.IsAbleToHand,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0) -end -function c75209824.thop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/script/c75214390.lua b/script/c75214390.lua deleted file mode 100644 index c027957392..0000000000 --- a/script/c75214390.lua +++ /dev/null @@ -1,57 +0,0 @@ ---オーバーレイ・ブースター -function c75214390.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_SPSUM_PARAM) - e1:SetTargetRange(POS_FACEUP_DEFENCE,0) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(1,75214390) - e1:SetCondition(c75214390.spcon) - c:RegisterEffect(e1) - --atkup - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(75214390,0)) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_GRAVE) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCondition(aux.exccon) - e2:SetCost(c75214390.atkcost) - e2:SetTarget(c75214390.atktg) - e2:SetOperation(c75214390.atkop) - c:RegisterEffect(e2) -end -function c75214390.cfilter(c) - return c:IsFaceup() and c:IsAttackAbove(2000) -end -function c75214390.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c75214390.cfilter,tp,LOCATION_MZONE,0,1,nil) -end -function c75214390.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) -end -function c75214390.filter(c) - return c:IsFaceup() and c:GetOverlayCount()>0 -end -function c75214390.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c75214390.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c75214390.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c75214390.filter,tp,LOCATION_MZONE,0,1,1,nil) -end -function c75214390.atkop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(tc:GetOverlayCount()*500) - tc:RegisterEffect(e1) - end -end diff --git a/script/c75249652.lua b/script/c75249652.lua deleted file mode 100644 index dd0ff9e115..0000000000 --- a/script/c75249652.lua +++ /dev/null @@ -1,43 +0,0 @@ ---業炎のバリア -ファイヤー・フォース- -function c75249652.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetCondition(c75249652.condition) - e1:SetTarget(c75249652.target) - e1:SetOperation(c75249652.activate) - c:RegisterEffect(e1) -end -function c75249652.condition(e,tp,eg,ep,ev,re,r,rp) - return eg:GetFirst():IsControler(1-tp) -end -function c75249652.filter(c) - return c:IsAttackPos() and c:IsDestructable() -end -function c75249652.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c75249652.filter,tp,0,LOCATION_MZONE,1,nil) end - local g=Duel.GetMatchingGroup(c75249652.filter,tp,0,LOCATION_MZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,0) -end -function c75249652.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c75249652.filter,tp,0,LOCATION_MZONE,nil) - if g:GetCount()>0 then - Duel.Destroy(g,REASON_EFFECT) - local dg=Duel.GetOperatedGroup() - local tc=dg:GetFirst() - local atk=0 - while tc do - local tatk=tc:GetTextAttack() - if tatk>0 then atk=atk+tatk end - tc=dg:GetNext() - end - local dam=Duel.Damage(tp,atk/2,REASON_EFFECT) - if Duel.GetLP(tp)>0 and dam>0 then - Duel.BreakEffect() - Duel.Damage(1-tp,dam,REASON_EFFECT) - end - end -end diff --git a/script/c75252099.lua b/script/c75252099.lua deleted file mode 100644 index bf3c0efe6f..0000000000 --- a/script/c75252099.lua +++ /dev/null @@ -1,34 +0,0 @@ ---ローズ・バード -function c75252099.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(75252099,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetCondition(c75252099.spcon) - e1:SetTarget(c75252099.sptg) - e1:SetOperation(c75252099.spop) - c:RegisterEffect(e1) -end -function c75252099.spcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsLocation(LOCATION_GRAVE) and c:IsReason(REASON_BATTLE) and c==Duel.GetAttackTarget() - and c:GetPreviousControler()==tp and c:GetBattlePosition()==POS_FACEUP_ATTACK -end -function c75252099.filter(c,e,tp) - return c:IsRace(RACE_PLANT) and c:IsType(TYPE_TUNER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c75252099.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>1 - and Duel.IsExistingMatchingCard(c75252099.filter,tp,LOCATION_DECK,0,2,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_DECK) -end -function c75252099.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 then return end - local g=Duel.GetMatchingGroup(c75252099.filter,tp,LOCATION_DECK,0,nil,e,tp) - if g:GetCount()<2 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=g:Select(tp,2,2,nil) - Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP_DEFENCE) -end diff --git a/script/c75253697.lua b/script/c75253697.lua deleted file mode 100644 index bcdef8ef95..0000000000 --- a/script/c75253697.lua +++ /dev/null @@ -1,57 +0,0 @@ ---No.72 ラインモンスター チャリオッツ・飛車 -function c75253697.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,6,2) - c:EnableReviveLimit() - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(75253697,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCost(c75253697.descost) - e1:SetTarget(c75253697.destg) - e1:SetOperation(c75253697.desop) - c:RegisterEffect(e1) -end -c75253697.xyz_number=72 -function c75253697.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,2,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,2,2,REASON_COST) -end -function c75253697.dfilter(c,pos) - return c:IsPosition(pos) and c:IsDestructable() -end -function c75253697.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - if chk==0 then return Duel.IsExistingTarget(c75253697.dfilter,tp,0,LOCATION_MZONE,1,nil,POS_FACEUP) - and Duel.IsExistingTarget(c75253697.dfilter,tp,0,LOCATION_SZONE,1,nil,POS_FACEDOWN) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g1=Duel.SelectTarget(tp,c75253697.dfilter,tp,0,LOCATION_MZONE,1,1,nil,POS_FACEUP) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g2=Duel.SelectTarget(tp,c75253697.dfilter,tp,0,LOCATION_SZONE,1,1,nil,POS_FACEDOWN) - g1:Merge(g2) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g1,2,0,0) -end -function c75253697.desop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local tg=g:Filter(Card.IsRelateToEffect,nil,e) - if tg:GetCount()>0 then - Duel.Destroy(tg,REASON_EFFECT) - end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CHANGE_DAMAGE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetTargetRange(0,1) - e1:SetValue(c75253697.val) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function c75253697.val(e,re,dam,r,rp,rc) - if bit.band(r,REASON_BATTLE)~=0 then - return dam/2 - else return dam end -end diff --git a/script/c75285069.lua b/script/c75285069.lua deleted file mode 100644 index 91f590b17e..0000000000 --- a/script/c75285069.lua +++ /dev/null @@ -1,48 +0,0 @@ ---モイスチャー星人 -function c75285069.initial_effect(c) - --summon with 3 tribute - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(75285069,0)) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SUMMON_PROC) - e1:SetCondition(c75285069.ttcon) - e1:SetOperation(c75285069.ttop) - e1:SetValue(SUMMON_TYPE_ADVANCE+1) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(75285069,1)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_SUMMON_SUCCESS) - e2:SetCondition(c75285069.descon) - e2:SetTarget(c75285069.destg) - e2:SetOperation(c75285069.desop) - c:RegisterEffect(e2) -end -function c75285069.ttcon(e,c) - if c==nil then return true end - return Duel.GetTributeCount(c)>=3 -end -function c75285069.ttop(e,tp,eg,ep,ev,re,r,rp,c) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) - local g=Duel.SelectTribute(tp,c,3,3) - c:SetMaterial(g) - Duel.Release(g, REASON_SUMMON+REASON_MATERIAL) -end -function c75285069.descon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_ADVANCE+1 -end -function c75285069.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable() -end -function c75285069.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local g=Duel.GetMatchingGroup(c75285069.filter,tp,0,LOCATION_ONFIELD,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0,nil) -end -function c75285069.desop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c75285069.filter,tp,0,LOCATION_ONFIELD,nil) - Duel.Destroy(g,REASON_EFFECT) -end diff --git a/script/c75292259.lua b/script/c75292259.lua deleted file mode 100644 index f5aab2825e..0000000000 --- a/script/c75292259.lua +++ /dev/null @@ -1,19 +0,0 @@ ---ポセイドン・オオカブト -function c75292259.initial_effect(c) - --chain attack - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_DAMAGE_STEP_END) - e1:SetCondition(c75292259.atcon) - e1:SetOperation(c75292259.atop) - c:RegisterEffect(e1) -end -function c75292259.atcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local bc=c:GetBattleTarget() - return c==Duel.GetAttacker() and bc and bc:IsRelateToBattle() - and bc:GetBattlePosition()==POS_FACEUP_ATTACK and c:IsChainAttackable(3) -end -function c75292259.atop(e,tp,eg,ep,ev,re,r,rp) - Duel.ChainAttack(e:GetHandler():GetBattleTarget()) -end diff --git a/script/c75304793.lua b/script/c75304793.lua deleted file mode 100644 index ef0f402d13..0000000000 --- a/script/c75304793.lua +++ /dev/null @@ -1,88 +0,0 @@ ---アンプリファイヤー -function c75304793.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --counter - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_CHAIN_SOLVING) - e2:SetRange(LOCATION_FZONE) - e2:SetProperty(EFFECT_FLAG_DELAY) - e2:SetCondition(c75304793.ctcon) - e2:SetOperation(c75304793.ctop) - c:RegisterEffect(e2) - --atkup - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetCode(EFFECT_UPDATE_ATTACK) - e3:SetRange(LOCATION_FZONE) - e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e3:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x1066)) - e3:SetValue(c75304793.atkval) - c:RegisterEffect(e3) - --counter - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_IGNITION) - e4:SetRange(LOCATION_FZONE) - e4:SetCountLimit(1) - e4:SetTarget(c75304793.target) - e4:SetOperation(c75304793.operation) - c:RegisterEffect(e4) -end -function c75304793.ctcon(e,tp,eg,ep,ev,re,r,rp) - return re and re:GetHandler():IsSetCard(0x1066) and not re:IsHasType(EFFECT_TYPE_ACTIVATE) -end -function c75304793.ctop(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():AddCounter(0x35,1) -end -function c75304793.atkval(e,c) - return e:GetHandler():GetCounter(0x35)*100 -end -function c75304793.filter(c) - return c:IsFaceup() and c:IsSetCard(0x1066) -end -function c75304793.target(e,tp,eg,ep,ev,re,r,rp,chk) - local ct=Duel.GetMatchingGroupCount(c75304793.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) - local b1=e:GetHandler():IsCanRemoveCounter(tp,0x35,5,REASON_COST) - local b2=e:GetHandler():IsCanRemoveCounter(tp,0x35,7,REASON_COST) - and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,1,nil) - if chk==0 then return ct>0 and (b1 or b2) end - local op=0 - if b1 and b2 then - op=Duel.SelectOption(tp,aux.Stringid(75304793,0),aux.Stringid(75304793,1)) - elseif b1 then - op=Duel.SelectOption(tp,aux.Stringid(75304793,0)) - else - op=Duel.SelectOption(tp,aux.Stringid(75304793,1))+1 - end - e:SetLabel(op) - if op==0 then - e:SetCategory(CATEGORY_DAMAGE) - e:GetHandler():RemoveCounter(tp,0x35,5,REASON_COST) - Duel.SetTargetPlayer(1-tp) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,ct*300) - else - e:SetCategory(CATEGORY_REMOVE) - e:GetHandler():RemoveCounter(tp,0x35,7,REASON_COST) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,0,LOCATION_ONFIELD+LOCATION_GRAVE) - end -end -function c75304793.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) then return end - local ct=Duel.GetMatchingGroupCount(c75304793.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) - if ct==0 then return end - if e:GetLabel()==0 then - local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) - Duel.Damage(p,ct*300,REASON_EFFECT) - else - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,1,ct,nil) - if g:GetCount()>0 then - Duel.Remove(g,POS_FACEUP,REASON_EFFECT) - end - end -end diff --git a/script/c75326861.lua b/script/c75326861.lua deleted file mode 100644 index b4ce134de4..0000000000 --- a/script/c75326861.lua +++ /dev/null @@ -1,51 +0,0 @@ ---天刑王 ブラック・ハイランダー -function c75326861.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsRace,RACE_FIEND),aux.NonTuner(Card.IsRace,RACE_FIEND),1) - c:EnableReviveLimit() - --disable spsummon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetTargetRange(1,1) - e1:SetTarget(c75326861.splimit) - c:RegisterEffect(e1) - --send to grave - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(75326861,0)) - e2:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetCountLimit(1) - e2:SetRange(LOCATION_MZONE) - e2:SetTarget(c75326861.target) - e2:SetOperation(c75326861.operation) - c:RegisterEffect(e2) -end -function c75326861.splimit(e,c,tp,sumtp,sumpos) - return bit.band(sumtp,SUMMON_TYPE_SYNCHRO)==SUMMON_TYPE_SYNCHRO -end -function c75326861.filter(c) - return c:GetEquipCount()>0 -end -function c75326861.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and c75326861.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c75326861.filter,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPPO) - local g=Duel.SelectTarget(tp,c75326861.filter,tp,0,LOCATION_MZONE,1,1,nil) - local eqg=g:GetFirst():GetEquipGroup() - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eqg,eqg:GetCount(),0,0) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,eqg:GetCount()*400) -end -function c75326861.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - local eqg=tc:GetEquipGroup() - if eqg:GetCount()>0 then - local des=Duel.Destroy(eqg,REASON_EFFECT) - Duel.Damage(1-tp,des*400,REASON_EFFECT) - end - end -end diff --git a/script/c75347539.lua b/script/c75347539.lua deleted file mode 100644 index ba50a8e7ae..0000000000 --- a/script/c75347539.lua +++ /dev/null @@ -1,68 +0,0 @@ ---磁石の戦士マグネット・バルキリオン -function c75347539.initial_effect(c) - c:EnableReviveLimit() - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c75347539.spcon) - e1:SetOperation(c75347539.spop) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(75347539,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCost(c75347539.cost) - e2:SetTarget(c75347539.target) - e2:SetOperation(c75347539.operation) - c:RegisterEffect(e2) -end -function c75347539.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.CheckReleaseGroupEx(tp,Card.IsCode,1,nil,99785935) - and Duel.CheckReleaseGroupEx(tp,Card.IsCode,1,nil,39256679) - and Duel.CheckReleaseGroupEx(tp,Card.IsCode,1,nil,11549357) -end -function c75347539.spop(e,tp,eg,ep,ev,re,r,rp,c) - local g1=Duel.SelectReleaseGroupEx(tp,Card.IsCode,1,1,nil,99785935) - local g2=Duel.SelectReleaseGroupEx(tp,Card.IsCode,1,1,nil,39256679) - local g3=Duel.SelectReleaseGroupEx(tp,Card.IsCode,1,1,nil,11549357) - g1:Merge(g2) - g1:Merge(g3) - Duel.Release(g1,REASON_COST) -end -function c75347539.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end -function c75347539.spfilter(c,e,tp,code) - return c:IsCode(code) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c75347539.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>=2 - and Duel.IsExistingTarget(c75347539.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp,99785935) - and Duel.IsExistingTarget(c75347539.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp,39256679) - and Duel.IsExistingTarget(c75347539.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp,11549357) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g1=Duel.SelectTarget(tp,c75347539.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp,99785935) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g2=Duel.SelectTarget(tp,c75347539.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp,39256679) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g3=Duel.SelectTarget(tp,c75347539.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp,11549357) - g1:Merge(g2) - g1:Merge(g3) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g1,3,0,0) -end -function c75347539.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if g:GetCount()~=3 or ft<3 then return end - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) -end diff --git a/script/c75361204.lua b/script/c75361204.lua deleted file mode 100644 index 5db793f851..0000000000 --- a/script/c75361204.lua +++ /dev/null @@ -1,130 +0,0 @@ ---グレイドル・スプリット -function c75361204.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCondition(c75361204.condition) - e1:SetTarget(c75361204.target) - e1:SetOperation(c75361204.operation) - c:RegisterEffect(e1) -end -function c75361204.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end -function c75361204.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c75361204.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsLocation(LOCATION_SZONE) then return end - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsControler(tp) then - Duel.Equip(tp,c,tc) - c:CancelToGrave() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_EQUIP) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(500) - e1:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_EQUIP_LIMIT) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetValue(1) - e2:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_QUICK_O) - e3:SetRange(LOCATION_SZONE) - e3:SetCode(EVENT_FREE_CHAIN) - e3:SetCountLimit(1,75361204) - e3:SetCondition(c75361204.spcon) - e3:SetCost(c75361204.spcost) - e3:SetTarget(c75361204.sptg) - e3:SetOperation(c75361204.spop) - e3:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e3) - end -end -function c75361204.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetEquipTarget() and Duel.GetTurnPlayer()==tp - and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2) -end -function c75361204.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - e:SetLabelObject(e:GetHandler():GetEquipTarget()) - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end -function c75361204.spfilter1(c,e,tp) - return c:IsSetCard(0xd1) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) - and Duel.IsExistingMatchingCard(c75361204.spfilter2,tp,LOCATION_DECK,0,1,nil,e,tp,c:GetCode()) -end -function c75361204.spfilter2(c,e,tp,code) - return c:IsSetCard(0xd1) and not c:IsCode(code) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c75361204.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():GetEquipTarget():IsDestructable() - and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c75361204.spfilter1,tp,LOCATION_DECK,0,1,nil,e,tp) end - local ec=e:GetLabelObject() - ec:CreateEffectRelation(e) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,ec,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_DECK) -end -function c75361204.spop(e,tp,eg,ep,ev,re,r,rp) - local ec=e:GetLabelObject() - if ec:IsRelateToEffect(e) and ec:IsFaceup() and Duel.Destroy(ec,REASON_EFFECT)~=0 - and Duel.GetLocationCount(tp,LOCATION_MZONE)>1 then - local fid=e:GetHandler():GetFieldID() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g1=Duel.SelectMatchingCard(tp,c75361204.spfilter1,tp,LOCATION_DECK,0,1,1,nil,e,tp) - local tc1=g1:GetFirst() - if not tc1 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g2=Duel.SelectMatchingCard(tp,c75361204.spfilter2,tp,LOCATION_DECK,0,1,1,nil,e,tp,tc1:GetCode()) - local tc2=g2:GetFirst() - Duel.SpecialSummonStep(tc1,0,tp,tp,false,false,POS_FACEUP) - Duel.SpecialSummonStep(tc2,0,tp,tp,false,false,POS_FACEUP) - tc1:RegisterFlagEffect(75361204,RESET_EVENT+0x1fe0000,0,1,fid) - tc2:RegisterFlagEffect(75361204,RESET_EVENT+0x1fe0000,0,1,fid) - Duel.SpecialSummonComplete() - g1:Merge(g2) - g1:KeepAlive() - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetCountLimit(1) - e1:SetLabel(fid) - e1:SetLabelObject(g1) - e1:SetCondition(c75361204.descon) - e1:SetOperation(c75361204.desop) - Duel.RegisterEffect(e1,tp) - end -end -function c75361204.desfilter(c,fid) - return c:GetFlagEffectLabel(75361204)==fid -end -function c75361204.descon(e,tp,eg,ep,ev,re,r,rp) - local g=e:GetLabelObject() - if not g:IsExists(c75361204.desfilter,1,nil,e:GetLabel()) then - g:DeleteGroup() - e:Reset() - return false - else return true end -end -function c75361204.desop(e,tp,eg,ep,ev,re,r,rp) - local g=e:GetLabelObject() - local tg=g:Filter(c75361204.desfilter,nil,e:GetLabel()) - Duel.Destroy(tg,REASON_EFFECT) -end diff --git a/script/c75363626.lua b/script/c75363626.lua deleted file mode 100644 index 92f5e1d28d..0000000000 --- a/script/c75363626.lua +++ /dev/null @@ -1,37 +0,0 @@ ---マドルチェ・シューバリエ -function c75363626.initial_effect(c) - --to deck - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(75363626,0)) - e1:SetCategory(CATEGORY_TODECK) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCondition(c75363626.retcon) - e1:SetTarget(c75363626.rettg) - e1:SetOperation(c75363626.retop) - c:RegisterEffect(e1) - --cannot be battle target - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET) - e2:SetRange(LOCATION_MZONE) - e2:SetTargetRange(0,LOCATION_MZONE) - e2:SetValue(c75363626.atktg) - c:RegisterEffect(e2) -end -function c75363626.retcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsReason(REASON_DESTROY) and e:GetHandler():GetReasonPlayer()~=tp - and e:GetHandler():GetPreviousControler()==tp -end -function c75363626.rettg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0) -end -function c75363626.retop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_EFFECT) - end -end -function c75363626.atktg(e,c) - return c:IsFaceup() and c:GetCode()~=75363626 and c:IsSetCard(0x71) -end diff --git a/script/c75367227.lua b/script/c75367227.lua deleted file mode 100644 index edfa0df86b..0000000000 --- a/script/c75367227.lua +++ /dev/null @@ -1,76 +0,0 @@ ---ゴーストリック・アルカード -function c75367227.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,3,2) - c:EnableReviveLimit() - --cannot be battle target - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(0,LOCATION_MZONE) - e1:SetValue(c75367227.tg) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetDescription(aux.Stringid(75367227,0)) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,75367227) - e2:SetCost(c75367227.descost) - e2:SetTarget(c75367227.destg) - e2:SetOperation(c75367227.desop) - c:RegisterEffect(e2) - -- - local e3=Effect.CreateEffect(c) - e3:SetCategory(CATEGORY_TOHAND) - e3:SetDescription(aux.Stringid(75367227,1)) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) - e3:SetCode(EVENT_TO_GRAVE) - e3:SetTarget(c75367227.thtg) - e3:SetOperation(c75367227.thop) - c:RegisterEffect(e3) -end -function c75367227.tg(e,c) - return c~=e:GetHandler() and (c:IsFacedown() or c:IsSetCard(0x8d)) -end -function c75367227.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c75367227.desfilter(c) - return c:IsFacedown() and c:IsDestructable() -end -function c75367227.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and c75367227.desfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c75367227.desfilter,tp,0,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c75367227.desfilter,tp,0,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c75367227.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFacedown() then - Duel.Destroy(tc,REASON_EFFECT) - end -end -function c75367227.filter(c) - return c:IsSetCard(0x8d) and c:IsAbleToHand() -end -function c75367227.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c75367227.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c75367227.filter,tp,LOCATION_GRAVE,0,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g=Duel.SelectTarget(tp,c75367227.filter,tp,LOCATION_GRAVE,0,1,1,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c75367227.thop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end diff --git a/script/c75372290.lua b/script/c75372290.lua deleted file mode 100644 index d483a7dfcd..0000000000 --- a/script/c75372290.lua +++ /dev/null @@ -1,30 +0,0 @@ ---絶対防御将軍 -function c75372290.initial_effect(c) - --to defence - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(75372290,0)) - e1:SetCategory(CATEGORY_POSITION) - e1:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_SINGLE) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c75372290.postg) - e1:SetOperation(c75372290.posop) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - c:RegisterEffect(e2) - -- - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_DEFENCE_ATTACK) - c:RegisterEffect(e3) -end -function c75372290.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chk==0 then return e:GetHandler():IsAttackPos() end - Duel.SetOperationInfo(0,CATEGORY_POSITION,e:GetHandler(),1,0,0) -end -function c75372290.posop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFaceup() and c:IsAttackPos() and c:IsRelateToEffect(e) then - Duel.ChangePosition(c,POS_FACEUP_DEFENCE) - end -end diff --git a/script/c75375465.lua b/script/c75375465.lua deleted file mode 100644 index e29d62a780..0000000000 --- a/script/c75375465.lua +++ /dev/null @@ -1,18 +0,0 @@ ---地獄の番熊 -function c75375465.initial_effect(c) - --indes - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(LOCATION_SZONE,0) - e1:SetTarget(c75375465.indtg) - e1:SetValue(c75375465.indval) - c:RegisterEffect(e1) -end -function c75375465.indtg(e,c) - return c:IsFaceup() and c:IsCode(94585852) -end -function c75375465.indval(e,re,tp) - return e:GetHandler():GetControler()~=tp -end diff --git a/script/c75380687.lua b/script/c75380687.lua deleted file mode 100644 index f10aa6536c..0000000000 --- a/script/c75380687.lua +++ /dev/null @@ -1,76 +0,0 @@ ---呪符竜 -function c75380687.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcCodeFun(c,46986414,aux.FilterBoolFunction(Card.IsRace,RACE_DRAGON),1,false,false) - --spsummon condition - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(c75380687.splimit) - c:RegisterEffect(e1) - --remove - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(75380687,0)) - e2:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_REMOVE) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetTarget(c75380687.target) - e2:SetOperation(c75380687.operation) - c:RegisterEffect(e2) - --summon - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(75380687,1)) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP) - e3:SetCode(EVENT_DESTROYED) - e3:SetTarget(c75380687.sptg) - e3:SetOperation(c75380687.spop) - c:RegisterEffect(e3) -end -function c75380687.splimit(e,se,sp,st) - return bit.band(st,SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION or se:GetHandler():IsCode(1784686) -end -function c75380687.filter(c) - return c:IsType(TYPE_SPELL) and c:IsAbleToRemove() -end -function c75380687.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(1-tp) and c75380687.filter(chkc) end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,c75380687.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,120,nil) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,0) -end -function c75380687.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) - local ct=Duel.Remove(g,POS_FACEUP,REASON_EFFECT) - local c=e:GetHandler() - if ct>0 and c:IsFaceup() and c:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+0x1ff0000) - e1:SetValue(ct*100) - c:RegisterEffect(e1) - end -end -function c75380687.spfilter(c,e,tp) - return c:IsRace(RACE_SPELLCASTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c75380687.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c75380687.spfilter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c75380687.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c75380687.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c75380687.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c75392615.lua b/script/c75392615.lua deleted file mode 100644 index 35cf09850b..0000000000 --- a/script/c75392615.lua +++ /dev/null @@ -1,26 +0,0 @@ ---マインド・ハック -function c75392615.initial_effect(c) - --confirm - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c75392615.cost) - e1:SetTarget(c75392615.target) - e1:SetOperation(c75392615.operation) - c:RegisterEffect(e1) -end -function c75392615.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,500) end - Duel.PayLPCost(tp,500) -end -function c75392615.filter(c) - return (c:IsOnField() and c:IsFacedown()) or (c:IsLocation(LOCATION_HAND) and not c:IsPublic()) -end -function c75392615.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c75392615.filter,tp,0,LOCATION_HAND+LOCATION_ONFIELD,1,nil) end -end -function c75392615.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c75392615.filter,tp,0,LOCATION_HAND+LOCATION_ONFIELD,nil) - Duel.ConfirmCards(tp,g) - Duel.ShuffleHand(1-tp) -end diff --git a/script/c7541475.lua b/script/c7541475.lua deleted file mode 100644 index 1abe351349..0000000000 --- a/script/c7541475.lua +++ /dev/null @@ -1,25 +0,0 @@ ---カブキ・ドラゴン -function c7541475.initial_effect(c) - --position - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(7541475,0)) - e1:SetCategory(CATEGORY_POSITION) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_BATTLE_CONFIRM) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetTarget(c7541475.postg) - e1:SetOperation(c7541475.posop) - c:RegisterEffect(e1) -end -function c7541475.postg(e,tp,eg,ep,ev,re,r,rp,chk) - local d=Duel.GetAttackTarget() - if chk==0 then return d end - Duel.SetOperationInfo(0,CATEGORY_POSITION,d,1,0,0) -end -function c7541475.posop(e,tp,eg,ep,ev,re,r,rp) - local d=Duel.GetAttackTarget() - if d:IsRelateToBattle() then - Duel.ChangePosition(d,POS_FACEUP_DEFENCE,POS_FACEDOWN_DEFENCE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK) - end -end diff --git a/script/c75417459.lua b/script/c75417459.lua deleted file mode 100644 index 8c8fb80a6a..0000000000 --- a/script/c75417459.lua +++ /dev/null @@ -1,33 +0,0 @@ ---拘束解除 -function c75417459.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c75417459.cost) - e1:SetTarget(c75417459.target) - e1:SetOperation(c75417459.activate) - c:RegisterEffect(e1) -end -function c75417459.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsCode,1,nil,423705) end - local g=Duel.SelectReleaseGroup(tp,Card.IsCode,1,1,nil,423705) - Duel.Release(g,REASON_COST) -end -function c75417459.filter(c,e,tp) - return c:IsCode(57046845) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) -end -function c75417459.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsExistingMatchingCard(c75417459.filter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) -end -function c75417459.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c75417459.filter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 and Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP)>0 then - g:GetFirst():CompleteProcedure() - end -end diff --git a/script/c75421661.lua b/script/c75421661.lua deleted file mode 100644 index fbd482c3dd..0000000000 --- a/script/c75421661.lua +++ /dev/null @@ -1,43 +0,0 @@ ---ドドドガッサー -function c75421661.initial_effect(c) - --atkup - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - e1:SetOperation(c75421661.atkop) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(75421661,0)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_FLIP) - e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_CARD_TARGET) - e2:SetTarget(c75421661.destg) - e2:SetOperation(c75421661.desop) - c:RegisterEffect(e2) -end -function c75421661.atkop(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(3500) - e1:SetReset(RESET_EVENT+0x1ff0000) - e:GetHandler():RegisterEffect(e1) -end -function c75421661.filter(c,e) - return c:IsFaceup() and c:IsDestructable() and (not e or c:IsRelateToEffect(e)) -end -function c75421661.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c75421661.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c75421661.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c75421661.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,2,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c75421661.desop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(c75421661.filter,nil,e) - if g:GetCount()>0 then - Duel.Destroy(g,REASON_EFFECT) - end -end diff --git a/script/c75425043.lua b/script/c75425043.lua deleted file mode 100644 index 16546d870e..0000000000 --- a/script/c75425043.lua +++ /dev/null @@ -1,100 +0,0 @@ ---PSYフレームギア・α -function c75425043.initial_effect(c) - c:EnableUnsummonable() - --splimit - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(c75425043.splimit) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(75425043,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOHAND+CATEGORY_SEARCH) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetRange(LOCATION_HAND) - e2:SetCode(EVENT_SUMMON_SUCCESS) - e2:SetCondition(c75425043.condition) - e2:SetTarget(c75425043.target) - e2:SetOperation(c75425043.operation) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e3) -end -function c75425043.splimit(e,se,sp,st) - return se:IsHasType(EFFECT_TYPE_ACTIONS) -end -function c75425043.cfilter(c,tp) - return c:GetSummonPlayer()==tp -end -function c75425043.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 and eg:IsExists(c75425043.cfilter,1,nil,1-tp) -end -function c75425043.spfilter1(c,e,tp) - return c:IsCode(49036338) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.IsExistingMatchingCard(c75425043.thfilter,tp,LOCATION_DECK,0,1,c) -end -function c75425043.spfilter2(c,e,tp) - return c:IsCode(49036338) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.IsExistingMatchingCard(c75425043.thfilter0,tp,LOCATION_DECK,0,1,c) -end -function c75425043.thfilter0(c) - return c:IsSetCard(0xc1) and not c:IsCode(75425043) -end -function c75425043.thfilter(c) - return c:IsSetCard(0xc1) and not c:IsCode(75425043) and c:IsAbleToHand() -end -function c75425043.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>1 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) - and Duel.IsExistingMatchingCard(c75425043.spfilter1,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c75425043.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 or not e:GetHandler():IsRelateToEffect(e) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c75425043.spfilter2,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp) - if g:FilterCount(aux.nvfilter,nil)==0 then return end - local tc=g:GetFirst() - local c=e:GetHandler() - local fid=c:GetFieldID() - Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) - Duel.SpecialSummonStep(c,0,tp,tp,false,false,POS_FACEUP) - tc:RegisterFlagEffect(75425043,RESET_EVENT+0x1fe0000,0,1,fid) - c:RegisterFlagEffect(75425043,RESET_EVENT+0x1fe0000,0,1,fid) - Duel.SpecialSummonComplete() - g:AddCard(c) - g:KeepAlive() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetCountLimit(1) - e1:SetLabel(fid) - e1:SetLabelObject(g) - e1:SetCondition(c75425043.rmcon) - e1:SetOperation(c75425043.rmop) - Duel.RegisterEffect(e1,tp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g2=Duel.SelectMatchingCard(tp,c75425043.thfilter,tp,LOCATION_DECK,0,1,1,nil) - if g2:GetCount()>0 then - Duel.SendtoHand(g2,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g2) - end -end -function c75425043.rmfilter(c,fid) - return c:GetFlagEffectLabel(75425043)==fid -end -function c75425043.rmcon(e,tp,eg,ep,ev,re,r,rp) - local g=e:GetLabelObject() - if not g:IsExists(c75425043.rmfilter,1,nil,e:GetLabel()) then - g:DeleteGroup() - e:Reset() - return false - else return true end -end -function c75425043.rmop(e,tp,eg,ep,ev,re,r,rp) - local g=e:GetLabelObject() - local tg=g:Filter(c75425043.rmfilter,nil,e:GetLabel()) - Duel.Remove(tg,POS_FACEUP,REASON_EFFECT) -end diff --git a/script/c75433814.lua b/script/c75433814.lua deleted file mode 100644 index 69eacd6c6c..0000000000 --- a/script/c75433814.lua +++ /dev/null @@ -1,61 +0,0 @@ ---No.40 ギミック・パペット-ヘブンズ・ストリングス -function c75433814.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,8,2) - c:EnableReviveLimit() - --counter - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(75433814,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c75433814.ctcost) - e1:SetTarget(c75433814.cttg) - e1:SetOperation(c75433814.ctop) - c:RegisterEffect(e1) - --destroy & damage - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(75433814,1)) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_PHASE+PHASE_END) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCondition(c75433814.descon) - e2:SetTarget(c75433814.destg) - e2:SetOperation(c75433814.desop) - c:RegisterEffect(e2) -end -c75433814.xyz_number=40 -function c75433814.ctcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c75433814.cttg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,e:GetHandler()) end -end -function c75433814.ctop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,e:GetHandler()) - local tc=g:GetFirst() - while tc do - tc:AddCounter(0x24,1) - tc=g:GetNext() - end - Duel.RegisterFlagEffect(tp,75433814,RESET_PHASE+PHASE_END,0,2) -end -function c75433814.descon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetFlagEffect(tp,75433814)~=0 and Duel.GetTurnPlayer()~=tp -end -function c75433814.desfilter(c) - return c:GetCounter(0x24)~=0 and c:IsDestructable() -end -function c75433814.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c75433814.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - local g=Duel.GetMatchingGroup(c75433814.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,g:GetCount()*500) -end -function c75433814.desop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c75433814.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - local ct=Duel.Destroy(g,REASON_EFFECT) - Duel.Damage(1-tp,ct*500,REASON_EFFECT) -end diff --git a/script/c75434695.lua b/script/c75434695.lua deleted file mode 100644 index 98ba09bf92..0000000000 --- a/script/c75434695.lua +++ /dev/null @@ -1,33 +0,0 @@ ---E・HERO フォレストマン -function c75434695.initial_effect(c) - --to hand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(75434695,0)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_FIELD) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) - e1:SetCountLimit(1) - e1:SetCondition(c75434695.con) - e1:SetTarget(c75434695.tg) - e1:SetOperation(c75434695.op) - c:RegisterEffect(e1) -end -function c75434695.con(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c75434695.filter(c) - return c:IsCode(24094653) and c:IsAbleToHand() and not c:IsHasEffect(EFFECT_NECRO_VALLEY) -end -function c75434695.tg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c75434695.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,0,1,0,LOCATION_DECK+LOCATION_GRAVE) -end -function c75434695.op(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c75434695.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c75457624.lua b/script/c75457624.lua deleted file mode 100644 index d2e1f13a17..0000000000 --- a/script/c75457624.lua +++ /dev/null @@ -1,38 +0,0 @@ ---霊獣の相絆 -function c75457624.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_END_PHASE) - e1:SetCost(c75457624.cost) - e1:SetTarget(c75457624.target) - e1:SetOperation(c75457624.activate) - c:RegisterEffect(e1) -end -function c75457624.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0xb5) and c:IsAbleToRemoveAsCost() -end -function c75457624.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c75457624.cfilter,tp,LOCATION_MZONE,0,2,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c75457624.cfilter,tp,LOCATION_MZONE,0,2,2,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c75457624.filter(c,e,tp) - return c:IsSetCard(0xb5) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) -end -function c75457624.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsExistingMatchingCard(c75457624.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function c75457624.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c75457624.filter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP) - end -end diff --git a/script/c75487237.lua b/script/c75487237.lua deleted file mode 100644 index 8bc6beaac1..0000000000 --- a/script/c75487237.lua +++ /dev/null @@ -1,44 +0,0 @@ ---ミドル・シールド・ガードナー -function c75487237.initial_effect(c) - --turn set - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(75487237,0)) - e1:SetCategory(CATEGORY_POSITION) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetTarget(c75487237.target) - e1:SetOperation(c75487237.operation) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_QUICK_F) - e2:SetCode(EVENT_CHAINING) - e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL+EFFECT_FLAG_SET_AVAILABLE) - e2:SetRange(LOCATION_MZONE) - e2:SetCondition(c75487237.negcon) - e2:SetOperation(c75487237.negop) - c:RegisterEffect(e2) -end -function c75487237.target(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsCanTurnSet() and c:GetFlagEffect(75487237)==0 end - c:RegisterFlagEffect(75487237,RESET_EVENT+0x1fc0000+RESET_PHASE+PHASE_END,0,1) - Duel.SetOperationInfo(0,CATEGORY_POSITION,c,1,0,0) -end -function c75487237.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - Duel.ChangePosition(c,POS_FACEDOWN_DEFENCE) - end -end -function c75487237.negcon(e,tp,eg,ep,ev,re,r,rp) - if re:IsActiveType(TYPE_SPELL) and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then - local tg=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) - return tg:GetCount()==1 and tg:GetFirst()==e:GetHandler() and e:GetHandler():IsFacedown() - else - return false - end -end -function c75487237.negop(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateActivation(ev) - Duel.ChangePosition(e:GetHandler(),POS_FACEUP_DEFENCE) -end diff --git a/script/c75498415.lua b/script/c75498415.lua deleted file mode 100644 index 0ac1790a9d..0000000000 --- a/script/c75498415.lua +++ /dev/null @@ -1,74 +0,0 @@ ---BF-暁のシロッコ -function c75498415.initial_effect(c) - --summon & set with no tribute - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(75498415,0)) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SUMMON_PROC) - e1:SetCondition(c75498415.ntcon) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_SET_PROC) - c:RegisterEffect(e2) - --atkup - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(75498415,1)) - e3:SetCategory(CATEGORY_ATKCHANGE) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1) - e3:SetCondition(c75498415.condition) - e3:SetTarget(c75498415.target) - e3:SetOperation(c75498415.operation) - c:RegisterEffect(e3) -end -function c75498415.ntcon(e,c,minc) - if c==nil then return true end - return minc==0 and c:GetLevel()>4 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 - and Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0)==0 - and Duel.GetFieldGroupCount(c:GetControler(),0,LOCATION_MZONE)>0 -end -function c75498415.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()==PHASE_MAIN1 -end -function c75498415.filter(c) - return c:IsFaceup() and c:IsSetCard(0x33) -end -function c75498415.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c75498415.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c75498415.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - local g=Duel.SelectTarget(tp,c75498415.filter,tp,LOCATION_MZONE,0,1,1,nil) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_CANNOT_ATTACK) - e2:SetProperty(EFFECT_FLAG_OATH) - e2:SetTargetRange(LOCATION_MZONE,0) - e2:SetTarget(c75498415.ftarget) - e2:SetLabel(g:GetFirst():GetFieldID()) - e2:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e2,tp) -end -function c75498415.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - local atk=0 - local g=Duel.GetMatchingGroup(c75498415.filter,tp,LOCATION_MZONE,LOCATION_MZONE,tc) - local bc=g:GetFirst() - while bc do - atk=atk+bc:GetAttack() - bc=g:GetNext() - end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e1:SetValue(atk) - tc:RegisterEffect(e1) - end -end -function c75498415.ftarget(e,c) - return e:GetLabel()~=c:GetFieldID() -end diff --git a/script/c75500286.lua b/script/c75500286.lua deleted file mode 100644 index b8df753c52..0000000000 --- a/script/c75500286.lua +++ /dev/null @@ -1,43 +0,0 @@ ---封印の黄金櫃 -function c75500286.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_REMOVE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c75500286.target) - e1:SetOperation(c75500286.activate) - c:RegisterEffect(e1) -end -function c75500286.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_DECK) -end -function c75500286.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_DECK,0,1,1,nil) - local tg=g:GetFirst() - if tg==nil then return end - Duel.Remove(tg,POS_FACEUP,REASON_EFFECT) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetRange(LOCATION_REMOVED) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) - e1:SetCountLimit(1) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,2) - e1:SetCondition(c75500286.thcon) - e1:SetOperation(c75500286.thop) - e1:SetLabel(0) - tg:RegisterEffect(e1) -end -function c75500286.thcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c75500286.thop(e,tp,eg,ep,ev,re,r,rp) - local ct=e:GetLabel() - e:GetHandler():SetTurnCounter(ct+1) - if ct==1 then - Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,e:GetHandler()) - else e:SetLabel(1) end -end diff --git a/script/c75524092.lua b/script/c75524092.lua deleted file mode 100644 index 26bb496be6..0000000000 --- a/script/c75524092.lua +++ /dev/null @@ -1,90 +0,0 @@ ---ヴィシャス・クロー -function c75524092.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c75524092.target) - e1:SetOperation(c75524092.operation) - c:RegisterEffect(e1) - --atkup - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(300) - c:RegisterEffect(e2) - --Equip limit - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_EQUIP_LIMIT) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e3:SetValue(1) - c:RegisterEffect(e3) - --destroy sub - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_EQUIP+EFFECT_TYPE_CONTINUOUS) - e4:SetCode(EFFECT_DESTROY_REPLACE) - e4:SetTarget(c75524092.desreptg) - e4:SetOperation(c75524092.desrepop) - c:RegisterEffect(e4) - --tohand - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e5:SetCode(EVENT_TO_HAND) - e5:SetOperation(c75524092.thop) - c:RegisterEffect(e5) -end -function c75524092.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c75524092.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,e:GetHandler(),tc) - end -end -function c75524092.desreptg(e,tp,eg,ep,ev,re,r,rp,chk) - local tg=e:GetHandler():GetEquipTarget() - if chk==0 then return tg and tg:IsReason(REASON_BATTLE) end - return true -end -function c75524092.desrepop(e,tp,eg,ep,ev,re,r,rp) - local exc=e:GetHandler():GetEquipTarget():GetBattleTarget() - Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectMatchingCard(tp,Card.IsDestructable,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,exc) - if Duel.Destroy(g,REASON_EFFECT)>0 and Duel.Damage(1-tp,600,REASON_EFFECT)~=0 then - if Duel.GetLocationCount(1-tp,LOCATION_MZONE,tp)>0 - and Duel.IsPlayerCanSpecialSummonMonster(tp,75524093,0,0x4011,2500,2500,7,RACE_FIEND,ATTRIBUTE_DARK,POS_FACEUP,1-tp) then - local token=Duel.CreateToken(tp,75524093) - Duel.SpecialSummon(token,0,tp,1-tp,false,false,POS_FACEUP) - end - end -end -function c75524092.thop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsPreviousLocation(LOCATION_DECK) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_USE_AS_COST) - e1:SetTargetRange(LOCATION_HAND,0) - e1:SetTarget(c75524092.limittg) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) - local e2=e1:Clone() - e2:SetCode(EFFECT_CANNOT_TRIGGER) - Duel.RegisterEffect(e2,tp) - local e3=e1:Clone() - e3:SetCode(EFFECT_CANNOT_SSET) - Duel.RegisterEffect(e3,tp) - end -end -function c75524092.limittg(e,c) - return c:IsCode(75524092) -end diff --git a/script/c75525309.lua b/script/c75525309.lua deleted file mode 100644 index 269194876b..0000000000 --- a/script/c75525309.lua +++ /dev/null @@ -1,34 +0,0 @@ ---六武派二刀流 -function c75525309.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,0x1e0) - e1:SetCondition(c75525309.condition) - e1:SetTarget(c75525309.target) - e1:SetOperation(c75525309.activate) - c:RegisterEffect(e1) -end -function c75525309.condition(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetFieldGroup(tp,LOCATION_MZONE,0) - local ct=g:GetCount() - local tg=g:GetFirst() - return ct==1 and tg:IsFaceup() and tg:IsAttackPos() and tg:IsSetCard(0x3d) -end -function c75525309.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:GetControler()~=tp and chkc:IsOnField() and chkc:IsAbleToHand() end - if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,2,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g=Duel.SelectTarget(tp,Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,2,2,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0) -end -function c75525309.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local sg=g:Filter(Card.IsRelateToEffect,nil,e) - if sg:GetCount()>0 then - Duel.SendtoHand(sg,nil,REASON_EFFECT) - end -end diff --git a/script/c75539614.lua b/script/c75539614.lua deleted file mode 100644 index ab156eb689..0000000000 --- a/script/c75539614.lua +++ /dev/null @@ -1,61 +0,0 @@ ---サイコ・ブレイド -function c75539614.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCountLimit(1,75539614+EFFECT_COUNT_CODE_OATH) - e1:SetCost(c75539614.cost) - e1:SetTarget(c75539614.target) - e1:SetOperation(c75539614.operation) - c:RegisterEffect(e1) - --atk/def - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(c75539614.val) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EFFECT_UPDATE_DEFENCE) - c:RegisterEffect(e3) - --Equip limit - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetCode(EFFECT_EQUIP_LIMIT) - e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e4:SetValue(1) - c:RegisterEffect(e4) -end -function c75539614.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,100) end - local lp=Duel.GetLP(tp) - local m=math.floor(math.min(lp,2000)/100) - local t={} - for i=1,m do - t[i]=i*100 - end - local ac=Duel.AnnounceNumber(tp,table.unpack(t)) - Duel.PayLPCost(tp,ac) - e:GetHandler():RegisterFlagEffect(75539614,RESET_EVENT+0x1fe0000,0,1,ac) -end -function c75539614.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c75539614.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,c,tc) - end -end -function c75539614.val(e,c) - local ct=e:GetHandler():GetFlagEffectLabel(75539614) - if not ct then return 0 end - return ct -end diff --git a/script/c75560629.lua b/script/c75560629.lua deleted file mode 100644 index 56071f5c94..0000000000 --- a/script/c75560629.lua +++ /dev/null @@ -1,82 +0,0 @@ ---フリント -function c75560629.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c75560629.target) - e1:SetOperation(c75560629.operation) - c:RegisterEffect(e1) - --atkdown - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetCondition(c75560629.flcon) - e2:SetValue(-300) - c:RegisterEffect(e2) - --cannot attack - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_EQUIP) - e3:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE) - e3:SetCondition(c75560629.flcon) - c:RegisterEffect(e3) - --cannot change pos - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_EQUIP) - e4:SetCode(EFFECT_CANNOT_CHANGE_POSITION) - e4:SetCondition(c75560629.flcon) - c:RegisterEffect(e4) - --equip limit - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_SINGLE) - e5:SetCode(EFFECT_EQUIP_LIMIT) - e5:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e5:SetValue(c75560629.eqlimit) - c:RegisterEffect(e5) - --reequip - local e6=Effect.CreateEffect(c) - e6:SetDescription(aux.Stringid(75560629,0)) - e6:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e6:SetCode(EVENT_TO_GRAVE) - e6:SetProperty(EFFECT_FLAG_CARD_TARGET) - e6:SetCondition(c75560629.eqcon) - e6:SetTarget(c75560629.target) - e6:SetOperation(c75560629.operation) - c:RegisterEffect(e6) - local e7=e6:Clone() - e7:SetCode(EVENT_REMOVE) - c:RegisterEffect(e7) -end -function c75560629.flcon(e) - local tc=e:GetHandler():GetEquipTarget() - return tc:GetCode()~=83812099 or tc:IsDisabled() -end -function c75560629.eqlimit(e,c) - return c:GetCode()~=83812099 or c:IsDisabled() - or not c:GetEquipGroup():IsExists(Card.IsCode,1,e:GetHandler(),75560629) -end -function c75560629.filter(c) - return c:IsFaceup() and (c:GetCode()~=83812099 or c:IsDisabled() - or not c:GetEquipGroup():IsExists(Card.IsCode,1,nil,75560629)) -end -function c75560629.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c75560629.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c75560629.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c75560629.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c75560629.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,c,tc) - end -end -function c75560629.eqcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local ec=c:GetPreviousEquipTarget() - return c:IsReason(REASON_LOST_TARGET) and ec and ec:IsReason(REASON_DESTROY) -end diff --git a/script/c75574498.lua b/script/c75574498.lua deleted file mode 100644 index a53d2e44aa..0000000000 --- a/script/c75574498.lua +++ /dev/null @@ -1,93 +0,0 @@ ---プリンセス・コロン -function c75574498.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,4,2) - c:EnableReviveLimit() - --spsummon1 - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(75574498,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(c75574498.spcon) - e1:SetTarget(c75574498.sptg) - e1:SetOperation(c75574498.spop) - c:RegisterEffect(e1) - --cannot be target - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EFFECT_CANNOT_BE_BATTLE_TARGET) - e2:SetCondition(c75574498.tgcon) - e2:SetValue(aux.imval1) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) - e3:SetValue(aux.tgoval) - c:RegisterEffect(e3) - --spsummon - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(75574498,1)) - e4:SetCategory(CATEGORY_SPECIAL_SUMMON) - e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e4:SetRange(LOCATION_MZONE) - e4:SetCode(EVENT_TO_GRAVE) - e4:SetCondition(c75574498.spcon2) - e4:SetCost(c75574498.spcost2) - e4:SetTarget(c75574498.sptg2) - e4:SetOperation(c75574498.spop2) - c:RegisterEffect(e4) -end -function c75574498.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_XYZ -end -function c75574498.spfilter1(c,e,tp) - return c:IsCode(81587028) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c75574498.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c75574498.spfilter1(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c75574498.spfilter1,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c75574498.spfilter1,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c75574498.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end -function c75574498.tgcon(e) - return Duel.GetFieldGroupCount(e:GetHandlerPlayer(),LOCATION_MZONE,0)>=2 -end -function c75574498.cfilter(c,tp) - return c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_MZONE) and c:IsReason(REASON_DESTROY) - and bit.band(c:GetPreviousTypeOnField(),TYPE_NORMAL)~=0 -end -function c75574498.spcon2(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c75574498.cfilter,1,nil,tp) -end -function c75574498.spcost2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c75574498.spfilter2(c,e,tp) - return c:IsType(TYPE_NORMAL) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsHasEffect(EFFECT_NECRO_VALLEY) -end -function c75574498.sptg2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c75574498.spfilter2,tp,LOCATION_GRAVE+LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_DECK) -end -function c75574498.spop2(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c75574498.spfilter2,tp,LOCATION_GRAVE+LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENCE) - end -end diff --git a/script/c75620895.lua b/script/c75620895.lua deleted file mode 100644 index 15c837509c..0000000000 --- a/script/c75620895.lua +++ /dev/null @@ -1,46 +0,0 @@ ---隻眼のスキル・ゲイナー -function c75620895.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,4,3) - c:EnableReviveLimit() - --attack up - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetDescription(aux.Stringid(75620895,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetCountLimit(1) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_NO_TURN_RESET) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c75620895.cost) - e1:SetTarget(c75620895.target) - e1:SetOperation(c75620895.operation) - c:RegisterEffect(e1) -end -function c75620895.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c75620895.filter(c) - return c:IsFaceup() and c:IsType(TYPE_XYZ) -end -function c75620895.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and c75620895.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c75620895.filter,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c75620895.filter,tp,0,LOCATION_MZONE,1,1,nil) -end -function c75620895.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc and c:IsRelateToEffect(e) and c:IsFaceup() and tc:IsFaceup() and tc:IsRelateToEffect(e) then - local code=tc:GetOriginalCode() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetCode(EFFECT_CHANGE_CODE) - e1:SetValue(code) - c:RegisterEffect(e1) - c:CopyEffect(code,RESET_EVENT+0x1fe0000,1) - end -end diff --git a/script/c75622824.lua b/script/c75622824.lua deleted file mode 100644 index daf678beb9..0000000000 --- a/script/c75622824.lua +++ /dev/null @@ -1,43 +0,0 @@ ---トリッキーズ・マジック4 -function c75622824.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c75622824.cost) - e1:SetTarget(c75622824.target) - e1:SetOperation(c75622824.activate) - c:RegisterEffect(e1) -end -function c75622824.cfilter(c) - return c:IsFaceup() and c:IsCode(14778250) and c:IsAbleToGraveAsCost() -end -function c75622824.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c75622824.cfilter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c75622824.cfilter,tp,LOCATION_MZONE,0,1,1,nil) - Duel.SendtoGrave(g,REASON_COST) -end -function c75622824.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.GetFieldGroupCount(1-tp,LOCATION_MZONE,0)>0 end - local ct=Duel.GetFieldGroupCount(1-tp,LOCATION_MZONE,0) - Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,ct,0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,ct,0,0) -end -function c75622824.activate(e,tp,eg,ep,ev,re,r,rp) - local ct=Duel.GetFieldGroupCount(1-tp,LOCATION_MZONE,0) - if Duel.GetLocationCount(tp,LOCATION_MZONE)0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,0,0,tp,500) -end -function c7563579.spop1(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then - Duel.BreakEffect() - Duel.Damage(tp,500,REASON_EFFECT) - end -end -function c7563579.spcon2(e,tp,eg,ep,ev,re,r,rp) - return bit.band(r,REASON_EFFECT+REASON_BATTLE)~=0 and e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) -end -function c7563579.spfilter(c,e,tp) - return c:IsSetCard(0xc6) and not c:IsCode(7563579) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c7563579.sptg2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c7563579.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) -end -function c7563579.spop2(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c7563579.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c75646520.lua b/script/c75646520.lua deleted file mode 100644 index 59f8769839..0000000000 --- a/script/c75646520.lua +++ /dev/null @@ -1,27 +0,0 @@ ---金属探知器 -function c75646520.initial_effect(c) - --activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_CHAINING) - e1:SetCondition(c75646520.condition) - e1:SetOperation(c75646520.activate) - c:RegisterEffect(e1) -end -function c75646520.condition(e,tp,eg,ep,ev,re,r,rp) - return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:GetActiveType()==TYPE_CONTINUOUS+TYPE_TRAP -end -function c75646520.activate(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - --disable - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_DISABLE) - e1:SetTargetRange(LOCATION_SZONE,LOCATION_SZONE) - e1:SetTarget(c75646520.distarget) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function c75646520.distarget(e,c) - return c:GetType()==TYPE_CONTINUOUS+TYPE_TRAP -end diff --git a/script/c75652080.lua b/script/c75652080.lua deleted file mode 100644 index a81b8fabe3..0000000000 --- a/script/c75652080.lua +++ /dev/null @@ -1,34 +0,0 @@ ---ダブル・サイクロン -function c75652080.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_END_PHASE) - e1:SetTarget(c75652080.target) - e1:SetOperation(c75652080.activate) - c:RegisterEffect(e1) -end -function c75652080.filter(c) - return c:IsDestructable() and c:IsType(TYPE_SPELL+TYPE_TRAP) -end -function c75652080.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - if chk==0 then return Duel.IsExistingTarget(c75652080.filter,tp,0,LOCATION_ONFIELD,1,nil) - and Duel.IsExistingTarget(c75652080.filter,tp,LOCATION_ONFIELD,0,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g1=Duel.SelectTarget(tp,c75652080.filter,tp,LOCATION_ONFIELD,0,1,1,e:GetHandler()) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g2=Duel.SelectTarget(tp,c75652080.filter,tp,0,LOCATION_ONFIELD,1,1,nil) - g1:Merge(g2) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g1,2,0,0) -end -function c75652080.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local sg=g:Filter(Card.IsRelateToEffect,nil,e) - if sg:GetCount()>0 then - Duel.Destroy(sg,REASON_EFFECT) - end -end diff --git a/script/c7565547.lua b/script/c7565547.lua deleted file mode 100644 index bc03fe3f4a..0000000000 --- a/script/c7565547.lua +++ /dev/null @@ -1,34 +0,0 @@ ---力の集約 -function c7565547.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c7565547.target) - e1:SetOperation(c7565547.operation) - c:RegisterEffect(e1) -end -function c7565547.eqfilter(c) - return c:IsFaceup() and c:IsType(TYPE_EQUIP) -end -function c7565547.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) - and Duel.IsExistingMatchingCard(c7565547.eqfilter,tp,LOCATION_SZONE,LOCATION_SZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) -end -function c7565547.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - local g=Duel.GetMatchingGroup(c7565547.eqfilter,tp,LOCATION_SZONE,LOCATION_SZONE,nil) - local ec=g:GetFirst() - while ec do - Duel.Equip(tp,ec,tc) - ec=g:GetNext() - end - Duel.EquipComplete() - end -end diff --git a/script/c75673220.lua b/script/c75673220.lua deleted file mode 100644 index 02d20a32aa..0000000000 --- a/script/c75673220.lua +++ /dev/null @@ -1,47 +0,0 @@ ---スナップドラゴン -function c75673220.initial_effect(c) - --remove - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(75673220,0)) - e1:SetCategory(CATEGORY_REMOVE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCountLimit(1,75673220) - e1:SetTarget(c75673220.target) - e1:SetOperation(c75673220.operation) - c:RegisterEffect(e1) -end -function c75673220.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,1-tp,LOCATION_HAND) -end -function c75673220.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_HAND,nil) - if g:GetCount()==0 then return end - local rg=g:RandomSelect(tp,1) - local tc=rg:GetFirst() - Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) - tc:RegisterFlagEffect(75673220,RESET_EVENT+0x1fe0000,0,1) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetCountLimit(1) - e1:SetLabelObject(tc) - e1:SetCondition(c75673220.retcon) - e1:SetOperation(c75673220.retop) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function c75673220.retcon(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetLabelObject() - if tc:GetFlagEffect(75673220)==0 then - e:Reset() - return false - else - return true - end -end -function c75673220.retop(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetLabelObject() - Duel.SendtoHand(tc,1-tp,REASON_EFFECT) -end diff --git a/script/c75675029.lua b/script/c75675029.lua deleted file mode 100644 index bef35bd041..0000000000 --- a/script/c75675029.lua +++ /dev/null @@ -1,35 +0,0 @@ ---記憶破壊王 -function c75675029.initial_effect(c) - --remove - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(75675029,0)) - e1:SetCategory(CATEGORY_REMOVE+CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_BATTLE_DAMAGE) - e1:SetCondition(c75675029.condition) - e1:SetTarget(c75675029.target) - e1:SetOperation(c75675029.operation) - c:RegisterEffect(e1) -end -function c75675029.condition(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp and Duel.GetAttackTarget()==nil -end -function c75675029.filter(c) - return c:IsType(TYPE_SYNCHRO) and c:IsAbleToRemove() -end -function c75675029.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local g=Duel.GetMatchingGroup(c75675029.filter,tp,0,LOCATION_GRAVE,nil) - if g:GetCount()~=0 then - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,0) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,g:GetCount()*1000) - end -end -function c75675029.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c75675029.filter,tp,0,LOCATION_GRAVE,nil) - local ct=Duel.Remove(g,POS_FACEUP,REASON_EFFECT) - if ct~=0 then - Duel.BreakEffect() - Duel.Damage(1-tp,ct*1000,REASON_EFFECT) - end -end diff --git a/script/c7572887.lua b/script/c7572887.lua deleted file mode 100644 index d2ed46af26..0000000000 --- a/script/c7572887.lua +++ /dev/null @@ -1,32 +0,0 @@ ---異次元の女戦士 -function c7572887.initial_effect(c) - --remove - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(7572887,0)) - e1:SetCategory(CATEGORY_REMOVE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_BATTLED) - e1:SetTarget(c7572887.target) - e1:SetOperation(c7572887.operation) - c:RegisterEffect(e1) -end -function c7572887.target(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - local a=Duel.GetAttacker() - local t=Duel.GetAttackTarget() - if chk==0 then - return (t==c and a:IsAbleToRemove()) - or (a==c and t~=nil and t:IsAbleToRemove()) - end - local g=Group.CreateGroup() - if a:IsRelateToBattle() then g:AddCard(a) end - if t~=nil and t:IsRelateToBattle() then g:AddCard(t) end - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,0) -end -function c7572887.operation(e,tp,eg,ep,ev,re,r,rp) - local a=Duel.GetAttacker() - local d=Duel.GetAttackTarget() - local g=Group.FromCards(a,d) - local rg=g:Filter(Card.IsRelateToBattle,nil) - Duel.Remove(rg,POS_FACEUP,REASON_EFFECT) -end diff --git a/script/c7573135.lua b/script/c7573135.lua deleted file mode 100644 index 8aa919c187..0000000000 --- a/script/c7573135.lua +++ /dev/null @@ -1,90 +0,0 @@ ---剣闘獣アウグストル -function c7573135.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(7573135,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(c7573135.hspcon) - e1:SetTarget(c7573135.hsptg) - e1:SetOperation(c7573135.hspop) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(7573135,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_PHASE+PHASE_BATTLE) - e2:SetRange(LOCATION_MZONE) - e2:SetCondition(c7573135.spcon) - e2:SetCost(c7573135.spcost) - e2:SetTarget(c7573135.sptg) - e2:SetOperation(c7573135.spop) - c:RegisterEffect(e2) -end -function c7573135.hspcon(e,tp,eg,ep,ev,re,r,rp) - local st=e:GetHandler():GetSummonType() - return st>=(SUMMON_TYPE_SPECIAL+100) and st<(SUMMON_TYPE_SPECIAL+150) -end -function c7573135.hspfilter(c,e,tp) - return c:IsSetCard(0x19) and c:IsCanBeSpecialSummoned(e,113,tp,false,false) -end -function c7573135.hsptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c7573135.hspfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c7573135.hspop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c7573135.hspfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - local tc=g:GetFirst() - if tc then - Duel.SpecialSummon(tc,113,tp,tp,false,false,POS_FACEUP_DEFENCE) - tc:RegisterFlagEffect(7573135,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetCountLimit(1) - e1:SetLabelObject(tc) - e1:SetCondition(c7573135.retcon) - e1:SetOperation(c7573135.retop) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) - end -end -function c7573135.retcon(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetLabelObject() - return tc:GetFlagEffect(7573135)>0 -end -function c7573135.retop(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetLabelObject() - Duel.SendtoDeck(tc,nil,2,REASON_EFFECT) -end -function c7573135.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetBattledGroupCount()>0 -end -function c7573135.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToDeckAsCost() end - Duel.SendtoDeck(c,nil,2,REASON_COST) -end -function c7573135.filter(c,e,tp) - return c:IsSetCard(0x19) and not c:IsCode(7573135) and c:IsCanBeSpecialSummoned(e,113,tp,false,false) -end -function c7573135.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsExistingMatchingCard(c7573135.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c7573135.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c7573135.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - local tc=g:GetFirst() - if tc then - Duel.SpecialSummon(tc,113,tp,tp,false,false,POS_FACEUP) - tc:RegisterFlagEffect(tc:GetOriginalCode(),RESET_EVENT+0x1ff0000,0,0) - end -end diff --git a/script/c75732622.lua b/script/c75732622.lua deleted file mode 100644 index a98e93338e..0000000000 --- a/script/c75732622.lua +++ /dev/null @@ -1,52 +0,0 @@ ---トーチ・ゴーレム -function c75732622.initial_effect(c) - c:EnableReviveLimit() - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_SPSUM_PARAM) - e1:SetRange(LOCATION_HAND) - e1:SetTargetRange(POS_FACEUP,1) - e1:SetCondition(c75732622.spcon) - e1:SetOperation(c75732622.spop) - c:RegisterEffect(e1) - --spsummon cost - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_SPSUMMON_COST) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetCost(c75732622.spcost) - e2:SetOperation(c75732622.spcop) - c:RegisterEffect(e2) -end -function c75732622.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.GetLocationCount(tp,LOCATION_MZONE)>=2 and Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0 - and Duel.IsPlayerCanSpecialSummonCount(tp,2) - and Duel.IsPlayerCanSpecialSummonMonster(tp,75732623,0,0x4011,0,0,1,RACE_FIEND,ATTRIBUTE_DARK) -end -function c75732622.spop(e,tp,eg,ep,ev,re,r,rp,c) - for i=1,2 do - local token=Duel.CreateToken(tp,75732623) - Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP_ATTACK) - end - Duel.SpecialSummonComplete() -end -function c75732622.spcost(e,c,tp) - return Duel.GetActivityCount(tp,ACTIVITY_NORMALSUMMON)==0 -end -function c75732622.spcop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_SUMMON) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetReset(RESET_PHASE+RESET_END) - e1:SetTargetRange(1,0) - Duel.RegisterEffect(e1,tp) - local e2=e1:Clone() - e2:SetCode(EFFECT_CANNOT_MSET) - Duel.RegisterEffect(e2,tp) -end diff --git a/script/c75733063.lua b/script/c75733063.lua deleted file mode 100644 index 1f35fec06a..0000000000 --- a/script/c75733063.lua +++ /dev/null @@ -1,46 +0,0 @@ ---機皇兵スキエル・アイン -function c75733063.initial_effect(c) - --atkup - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(c75733063.val) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(75733063,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_BATTLE_DESTROYED) - e2:SetCondition(c75733063.condition) - e2:SetTarget(c75733063.target) - e2:SetOperation(c75733063.operation) - c:RegisterEffect(e2) -end -function c75733063.atkfilter(c) - return c:IsFaceup() and c:IsSetCard(0x13) -end -function c75733063.val(e,c) - return Duel.GetMatchingGroupCount(c75733063.atkfilter,0,LOCATION_MZONE,LOCATION_MZONE,c)*200 -end -function c75733063.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) -end -function c75733063.filter(c,e,tp) - return c:IsSetCard(0x6013) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c75733063.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c75733063.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c75733063.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c75733063.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c75745607.lua b/script/c75745607.lua deleted file mode 100644 index 5537b00a60..0000000000 --- a/script/c75745607.lua +++ /dev/null @@ -1,81 +0,0 @@ ---火之迦具土 -function c75745607.initial_effect(c) - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(aux.FALSE) - c:RegisterEffect(e1) - --summon,flip - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetCode(EVENT_SUMMON_SUCCESS) - e2:SetOperation(c75745607.retreg) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EVENT_FLIP) - c:RegisterEffect(e3) - --tograve - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(75745607,1)) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e4:SetCode(EVENT_BATTLE_DAMAGE) - e4:SetCondition(c75745607.hdcon) - e4:SetOperation(c75745607.hdreg) - c:RegisterEffect(e4) -end -function c75745607.retreg(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - --to hand - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetDescription(aux.Stringid(75745607,0)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetReset(RESET_EVENT+0x1ee0000+RESET_PHASE+PHASE_END) - e1:SetCondition(c75745607.retcon) - e1:SetTarget(c75745607.rettg) - e1:SetOperation(c75745607.retop) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - c:RegisterEffect(e2) -end -function c75745607.retcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsHasEffect(EFFECT_SPIRIT_DONOT_RETURN) then return false end - if e:IsHasType(EFFECT_TYPE_TRIGGER_F) then - return not c:IsHasEffect(EFFECT_SPIRIT_MAYNOT_RETURN) - else return c:IsHasEffect(EFFECT_SPIRIT_MAYNOT_RETURN) end -end -function c75745607.rettg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0) -end -function c75745607.retop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - Duel.SendtoHand(c,nil,REASON_EFFECT) - end -end -function c75745607.hdcon(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp -end -function c75745607.hdreg(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PREDRAW) - e1:SetReset(RESET_PHASE+PHASE_DRAW) - e1:SetOperation(c75745607.hdop) - Duel.RegisterEffect(e1,tp) -end -function c75745607.hdop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND) - if g:GetCount()>0 then - Duel.SendtoGrave(g,REASON_DISCARD+REASON_EFFECT) - end -end diff --git a/script/c7576264.lua b/script/c7576264.lua deleted file mode 100644 index 9b8ee21135..0000000000 --- a/script/c7576264.lua +++ /dev/null @@ -1,8 +0,0 @@ ---幻獣ワイルドホーン -function c7576264.initial_effect(c) - --pierce - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_PIERCE) - c:RegisterEffect(e1) -end diff --git a/script/c75775867.lua b/script/c75775867.lua deleted file mode 100644 index 30b470ed81..0000000000 --- a/script/c75775867.lua +++ /dev/null @@ -1,67 +0,0 @@ ---D・パッチン -function c75775867.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(75775867,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c75775867.descon) - e1:SetCost(c75775867.descost) - e1:SetTarget(c75775867.destg) - e1:SetOperation(c75775867.desop) - c:RegisterEffect(e1) - --Destroy replace - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DESTROY_REPLACE) - e2:SetTarget(c75775867.reptg) - e2:SetOperation(c75775867.repop) - c:RegisterEffect(e2) -end -function c75775867.descon(e,tp,eg,ep,ev,re,r,rp) - return not e:GetHandler():IsDisabled() and e:GetHandler():IsAttackPos() -end -function c75775867.cfilter(c) - return c:GetCode()~=75775867 and c:IsSetCard(0x26) -end -function c75775867.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,c75775867.cfilter,1,nil) end - local g=Duel.SelectReleaseGroup(tp,c75775867.cfilter,1,1,nil) - Duel.Release(g,REASON_COST) -end -function c75775867.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsDestructable() end - if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c75775867.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end -function c75775867.repfilter(c) - return c:IsFaceup() and c:IsSetCard(0x26) and not c:IsStatus(STATUS_DESTROY_CONFIRMED) -end -function c75775867.reptg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return not c:IsReason(REASON_REPLACE) and c:IsOnField() and c:IsFaceup() and c:IsDefencePos() - and Duel.IsExistingMatchingCard(c75775867.repfilter,tp,LOCATION_MZONE,0,1,c) end - if Duel.SelectYesNo(tp,aux.Stringid(75775867,1)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESREPLACE) - local g=Duel.SelectMatchingCard(tp,c75775867.repfilter,tp,LOCATION_MZONE,0,1,1,c) - Duel.SetTargetCard(g) - g:GetFirst():SetStatus(STATUS_DESTROY_CONFIRMED,true) - return true - else return false end -end -function c75775867.repop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - g:GetFirst():SetStatus(STATUS_DESTROY_CONFIRMED,false) - Duel.Destroy(g,REASON_EFFECT+REASON_REPLACE) -end diff --git a/script/c75779210.lua b/script/c75779210.lua deleted file mode 100644 index 116e08b923..0000000000 --- a/script/c75779210.lua +++ /dev/null @@ -1,49 +0,0 @@ ---ヴァイロン・エプシロン -function c75779210.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_LIGHT),aux.NonTuner(nil),1) - c:EnableReviveLimit() - --untargetable - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(LOCATION_SZONE,LOCATION_SZONE) - e1:SetTarget(c75779210.uttg) - e1:SetValue(aux.tgval) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(75779210,0)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCost(c75779210.descost) - e2:SetTarget(c75779210.destg) - e2:SetOperation(c75779210.desop) - c:RegisterEffect(e2) -end -function c75779210.uttg(e,c) - return e:GetHandler():GetEquipGroup():IsContains(c) -end -function c75779210.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():GetEquipGroup():IsExists(Card.IsAbleToGraveAsCost,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=e:GetHandler():GetEquipGroup():FilterSelect(tp,Card.IsAbleToGraveAsCost,1,1,nil) - Duel.SendtoGrave(g,REASON_COST) -end -function c75779210.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsDestructable() end - if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c75779210.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c75782277.lua b/script/c75782277.lua deleted file mode 100644 index 29bcd1dd91..0000000000 --- a/script/c75782277.lua +++ /dev/null @@ -1,71 +0,0 @@ ---ハーピィの狩場 -function c75782277.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --trigger - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetCode(EVENT_SUMMON_SUCCESS) - e2:SetRange(LOCATION_SZONE) - e2:SetOperation(c75782277.check) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e3) - local e4=Effect.CreateEffect(c) - e4:SetCategory(CATEGORY_DESTROY) - e4:SetDescription(aux.Stringid(75782277,0)) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e4:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_EVENT_PLAYER) - e4:SetCode(75782277) - e4:SetTarget(c75782277.target) - e4:SetOperation(c75782277.operation) - c:RegisterEffect(e4) - --atk/def - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_FIELD) - e5:SetCode(EFFECT_UPDATE_ATTACK) - e5:SetRange(LOCATION_SZONE) - e5:SetTarget(aux.TargetBoolFunction(Card.IsRace,RACE_WINDBEAST)) - e5:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e5:SetValue(200) - c:RegisterEffect(e5) - local e6=e5:Clone() - e6:SetCode(EFFECT_UPDATE_DEFENCE) - c:RegisterEffect(e6) -end -function c75782277.check(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=eg:GetFirst() - local tp1=false local tp2=false - while tc do - local code=tc:GetCode() - if tc:IsFaceup() and (code==76812113 or code==12206212) then - if tc:IsControler(tp) then tp1=true else tp2=true end - end - tc=eg:GetNext() - end - if tp1 then Duel.RaiseSingleEvent(c,75782277,e,r,rp,tp,0) end - if tp2 then Duel.RaiseSingleEvent(c,75782277,e,r,rp,1-tp,0) end -end -function c75782277.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable() -end -function c75782277.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and c75782277.filter(chkc) end - if chk==0 then return e:GetHandler():IsRelateToEffect(e) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c75782277.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c75782277.operation(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c75797046.lua b/script/c75797046.lua deleted file mode 100644 index 1a3431c4fa..0000000000 --- a/script/c75797046.lua +++ /dev/null @@ -1,38 +0,0 @@ ---フォトン・アレキサンドラ・クイーン -function c75797046.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0x6a),4,2) - c:EnableReviveLimit() - --return - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(75797046,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c75797046.retcost) - e1:SetTarget(c75797046.rettg) - e1:SetOperation(c75797046.retop) - c:RegisterEffect(e1) -end -function c75797046.retcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c75797046.rettg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - local g=Duel.GetMatchingGroup(Card.IsAbleToHand,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,PLAYER_ALL,0) -end -function c75797046.hfilter(c,tp) - return c:IsLocation(LOCATION_HAND) and c:IsControler(tp) -end -function c75797046.retop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsAbleToHand,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - if g:GetCount()==0 then return end - Duel.SendtoHand(g,nil,REASON_EFFECT) - local ct1=g:FilterCount(c75797046.hfilter,nil,tp) - local ct2=g:FilterCount(c75797046.hfilter,nil,1-tp) - Duel.Damage(tp,ct1*300,REASON_EFFECT) - Duel.Damage(1-tp,ct2*300,REASON_EFFECT) -end diff --git a/script/c7582066.lua b/script/c7582066.lua deleted file mode 100644 index 191938a804..0000000000 --- a/script/c7582066.lua +++ /dev/null @@ -1,37 +0,0 @@ ---サイコ・デビル -function c7582066.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,nil,aux.NonTuner(Card.IsRace,RACE_PSYCHO),1) - c:EnableReviveLimit() - --atk - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(7582066,0)) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCondition(c7582066.atkcon) - e1:SetOperation(c7582066.atkop) - c:RegisterEffect(e1) -end -function c7582066.atkcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)~=0 -end -function c7582066.atkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) or c:IsFacedown() or Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)==0 then return end - local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND):RandomSelect(tp,1,nil) - local tc=g:GetFirst() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CARDTYPE) - local op=Duel.SelectOption(tp,70,71,72) - Duel.ConfirmCards(tp,tc) - Duel.ShuffleHand(1-tp) - if (op==0 and tc:IsType(TYPE_MONSTER)) or (op==1 and tc:IsType(TYPE_SPELL)) or (op==2 and tc:IsType(TYPE_TRAP)) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(1000) - e1:SetReset(RESET_EVENT+0x1ff0000+RESET_PHASE+PHASE_END,2) - c:RegisterEffect(e1) - end -end diff --git a/script/c75830094.lua b/script/c75830094.lua deleted file mode 100644 index d4d1194770..0000000000 --- a/script/c75830094.lua +++ /dev/null @@ -1,58 +0,0 @@ ---ホルスの黒炎竜 LV4 -function c75830094.initial_effect(c) - --battle destroy - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_BATTLE_DESTROYING) - e1:SetOperation(c75830094.bdop) - c:RegisterEffect(e1) - --control - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EFFECT_CANNOT_CHANGE_CONTROL) - c:RegisterEffect(e2) - --special summon - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(75830094,0)) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetRange(LOCATION_MZONE) - e3:SetCode(EVENT_PHASE+PHASE_END) - e3:SetCondition(c75830094.spcon) - e3:SetCost(c75830094.spcost) - e3:SetTarget(c75830094.sptg) - e3:SetOperation(c75830094.spop) - c:RegisterEffect(e3) -end -c75830094.lvupcount=1 -c75830094.lvup={11224103} -function c75830094.bdop(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():RegisterFlagEffect(75830094,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) -end -function c75830094.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetFlagEffect(75830094)>0 -end -function c75830094.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end -function c75830094.spfilter(c,e,tp) - return c:IsCode(11224103) and c:IsCanBeSpecialSummoned(e,0,tp,true,true) -end -function c75830094.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsExistingMatchingCard(c75830094.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) -end -function c75830094.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c75830094.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp) - local tc=g:GetFirst() - if tc then - Duel.SpecialSummon(tc,0,tp,tp,true,true,POS_FACEUP) - tc:CompleteProcedure() - end -end diff --git a/script/c75833426.lua b/script/c75833426.lua deleted file mode 100644 index 57893f8898..0000000000 --- a/script/c75833426.lua +++ /dev/null @@ -1,42 +0,0 @@ ---マドルチェ・ティーブレイク -function c75833426.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_NEGATE+CATEGORY_TOHAND+CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_CHAINING) - e1:SetCondition(c75833426.condition) - e1:SetTarget(c75833426.target) - e1:SetOperation(c75833426.activate) - c:RegisterEffect(e1) -end -function c75833426.condition(e,tp,eg,ep,ev,re,r,rp) - return not Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_GRAVE,0,1,nil,TYPE_MONSTER) - and re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev) -end -function c75833426.cfilter(c) - return c:IsFaceup() and c:IsCode(74641045) -end -function c75833426.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - if re:GetHandler():IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_TOHAND,eg,1,0,0) - end -end -function c75833426.activate(e,tp,eg,ep,ev,re,r,rp) - local ec=re:GetHandler() - Duel.NegateActivation(ev) - if re:GetHandler():IsRelateToEffect(re) then - ec:CancelToGrave() - Duel.SendtoHand(ec,nil,REASON_EFFECT) - end - if Duel.IsExistingMatchingCard(c75833426.cfilter,tp,LOCATION_MZONE,0,1,nil) - and Duel.IsExistingMatchingCard(Card.IsDestructable,tp,0,LOCATION_ONFIELD,1,nil) - and Duel.SelectYesNo(tp,aux.Stringid(75833426,0)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectMatchingCard(tp,Card.IsDestructable,tp,0,LOCATION_ONFIELD,1,1,nil) - Duel.HintSelection(g) - Duel.Destroy(g,REASON_EFFECT) - end -end diff --git a/script/c75840616.lua b/script/c75840616.lua deleted file mode 100644 index ca22b4076b..0000000000 --- a/script/c75840616.lua +++ /dev/null @@ -1,44 +0,0 @@ ---武神帝-スサノヲ -function c75840616.initial_effect(c) - c:SetUniqueOnField(1,0,75840616) - --xyz summon - aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0x88),4,2) - c:EnableReviveLimit() - --search - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(75840616,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c75840616.cost) - e1:SetTarget(c75840616.target) - e1:SetOperation(c75840616.operation) - c:RegisterEffect(e1) - --attack all - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_ATTACK_ALL) - e2:SetValue(1) - c:RegisterEffect(e2) -end -function c75840616.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c75840616.filter(c) - return c:IsSetCard(0x88) and c:IsType(TYPE_MONSTER) and (c:IsAbleToHand() or c:IsAbleToGrave()) -end -function c75840616.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c75840616.filter,tp,LOCATION_DECK,0,1,nil) end -end -function c75840616.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c75840616.filter,tp,LOCATION_DECK,0,1,1,nil) - local tc=g:GetFirst() - if tc and tc:IsAbleToHand() and (not tc:IsAbleToGrave() or Duel.SelectYesNo(tp,aux.Stringid(75840616,1))) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - else - Duel.SendtoGrave(tc,REASON_EFFECT) - end -end diff --git a/script/c75878039.lua b/script/c75878039.lua deleted file mode 100644 index d638cd0c5f..0000000000 --- a/script/c75878039.lua +++ /dev/null @@ -1,35 +0,0 @@ ---星因士 デネブ -function c75878039.initial_effect(c) - --tohand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(75878039,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e1:SetCountLimit(1,75878039) - e1:SetTarget(c75878039.target) - e1:SetOperation(c75878039.operation) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - c:RegisterEffect(e2) - local e3=e1:Clone() - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e3) -end -function c75878039.filter(c) - return c:IsSetCard(0x9c) and c:IsType(TYPE_MONSTER) and not c:IsCode(75878039) and c:IsAbleToHand() -end -function c75878039.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c75878039.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c75878039.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c75878039.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c75886890.lua b/script/c75886890.lua deleted file mode 100644 index 8bf432fd7c..0000000000 --- a/script/c75886890.lua +++ /dev/null @@ -1,82 +0,0 @@ ---ヴァイロン・スフィア -function c75886890.initial_effect(c) - --equip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(75886890,0)) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCondition(c75886890.eqcon) - e1:SetCost(c75886890.eqcost) - e1:SetTarget(c75886890.eqtg) - e1:SetOperation(c75886890.eqop) - c:RegisterEffect(e1) - --equip2 - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(75886890,1)) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCategory(CATEGORY_EQUIP) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_SZONE) - e2:SetCost(c75886890.eqcost2) - e2:SetTarget(c75886890.eqtg2) - e2:SetOperation(c75886890.eqop2) - c:RegisterEffect(e2) -end -function c75886890.eqcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:GetPreviousLocation()==LOCATION_MZONE -end -function c75886890.eqcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,500) end - Duel.PayLPCost(tp,500) -end -function c75886890.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:IsFaceup() end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,nil) -end -function c75886890.eqop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsRelateToEffect(e) then - Duel.Equip(tp,c,tc) - --equip limit - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetValue(c75886890.eqlimit) - e1:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e1) - end -end -function c75886890.eqlimit(e,c) - return c:GetControler()==e:GetHandlerPlayer() or e:GetHandler():GetEquipTarget()==c -end -function c75886890.eqcost2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - e:SetLabelObject(e:GetHandler():GetEquipTarget()) - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end -function c75886890.filter2(c,ec) - return c:IsType(TYPE_EQUIP) and c:CheckEquipTarget(ec) -end -function c75886890.eqtg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local ec=e:GetHandler():GetEquipTarget() - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c75886890.filter2(chkc,ec) end - if chk==0 then return ec and Duel.IsExistingTarget(c75886890.filter2,tp,LOCATION_GRAVE,0,1,nil,ec) end - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(75886890,2)) - Duel.SelectTarget(tp,c75886890.filter2,tp,LOCATION_GRAVE,0,1,1,nil,e:GetLabelObject()) - e:GetLabelObject():CreateEffectRelation(e) -end -function c75886890.eqop2(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - local ec=e:GetLabelObject() - if tc:IsRelateToEffect(e) and ec:IsFaceup() and ec:IsRelateToEffect(e) then - Duel.Equip(tp,tc,ec) - end -end diff --git a/script/c75917088.lua b/script/c75917088.lua deleted file mode 100644 index f6c8d8f663..0000000000 --- a/script/c75917088.lua +++ /dev/null @@ -1,37 +0,0 @@ ---魔法の国の王女-ピケル -function c75917088.initial_effect(c) - c:EnableReviveLimit() - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - c:RegisterEffect(e1) - --recover - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(75917088,0)) - e2:SetCategory(CATEGORY_RECOVER) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCondition(c75917088.condition) - e2:SetTarget(c75917088.target) - e2:SetOperation(c75917088.operation) - c:RegisterEffect(e2) -end -function c75917088.condition(e,tp,eg,ep,ev,re,r,rp) - return tp==Duel.GetTurnPlayer() -end -function c75917088.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local ct=Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0) - Duel.SetTargetPlayer(tp) - Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,ct*800) -end -function c75917088.operation(e,tp,eg,ep,ev,re,r,rp) - local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) - local ct=Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0) - Duel.Recover(p,ct*800,REASON_EFFECT) -end diff --git a/script/c75923050.lua b/script/c75923050.lua deleted file mode 100644 index fd6077e612..0000000000 --- a/script/c75923050.lua +++ /dev/null @@ -1,56 +0,0 @@ ---レアメタル・ヴァルキリー -function c75923050.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcCode2(c,92421852,38916461,true,true) - --atk up - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(75923050,0)) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c75923050.atkcon) - e1:SetValue(1000) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(75923050,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCondition(c75923050.spcon) - e2:SetTarget(c75923050.sptg) - e2:SetOperation(c75923050.spop) - c:RegisterEffect(e2) -end -function c75923050.atkcon(e) - local ph=Duel.GetCurrentPhase() - if not (ph==PHASE_DAMAGE or ph==PHASE_DAMAGE_CAL) then return false end - local a=Duel.GetAttacker() - local d=Duel.GetAttackTarget() - return a==e:GetHandler() and d==nil -end -function c75923050.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetTurnID()~=Duel.GetTurnCount() -end -function c75923050.spfilter(c,e,tp) - return c:IsCode(1412158) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c75923050.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and e:GetHandler():IsAbleToExtra() - and Duel.IsExistingMatchingCard(c75923050.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function c75923050.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if Duel.GetLocationCount(tp,LOCATION_MZONE)<0 then return end - if c:IsRelateToEffect(e) and c:IsFaceup() and Duel.SendtoDeck(c,nil,2,REASON_EFFECT)~=0 then - local tc=Duel.GetFirstMatchingCard(c75923050.spfilter,tp,LOCATION_EXTRA,0,nil,e,tp) - if tc then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end - end -end diff --git a/script/c75937826.lua b/script/c75937826.lua deleted file mode 100644 index 41b44d4172..0000000000 --- a/script/c75937826.lua +++ /dev/null @@ -1,80 +0,0 @@ ---巨大戦艦 ビッグ・コアMk-II -function c75937826.initial_effect(c) - --spsummon success - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(75937826,0)) - e1:SetCategory(CATEGORY_COUNTER) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetTarget(c75937826.addct) - e1:SetOperation(c75937826.addc) - c:RegisterEffect(e1) - --indes - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e2:SetValue(1) - c:RegisterEffect(e2) - --remove counter - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(75937826,1)) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e3:SetCode(EVENT_DAMAGE_STEP_END) - e3:SetCondition(c75937826.rctcon) - e3:SetOperation(c75937826.rctop) - c:RegisterEffect(e3) - --destroy - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(75937826,2)) - e4:SetCategory(CATEGORY_DESTROY) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e4:SetCode(EVENT_DAMAGE_STEP_END) - e4:SetCondition(c75937826.descon) - e4:SetTarget(c75937826.destg) - e4:SetOperation(c75937826.desop) - c:RegisterEffect(e4) - --summon with no tribute - local e5=Effect.CreateEffect(c) - e5:SetDescription(aux.Stringid(75937826,3)) - e5:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e5:SetType(EFFECT_TYPE_SINGLE) - e5:SetCode(EFFECT_SUMMON_PROC) - e5:SetCondition(c75937826.ntcon) - c:RegisterEffect(e5) -end -function c75937826.addct(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,3,0,0x1f) -end -function c75937826.addc(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - e:GetHandler():AddCounter(0x1f,3) - end -end -function c75937826.rctcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetCounter(0x1f)~=0 -end -function c75937826.rctop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFaceup() and c:IsRelateToEffect(e) then - c:RemoveCounter(tp,0x1f,1,REASON_EFFECT) - end -end -function c75937826.descon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetCounter(0x1f)==0 -end -function c75937826.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0) -end -function c75937826.desop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFaceup() and c:IsRelateToEffect(e) then - Duel.Destroy(c,REASON_EFFECT) - end -end -function c75937826.ntcon(e,c,minc) - if c==nil then return true end - return minc==0 and c:GetLevel()>4 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 - and Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0)==0 -end diff --git a/script/c759393.lua b/script/c759393.lua deleted file mode 100644 index 5f6f6ad1be..0000000000 --- a/script/c759393.lua +++ /dev/null @@ -1,46 +0,0 @@ ---火霊使いヒータ -function c759393.initial_effect(c) - --flip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(759393,0)) - e1:SetCategory(CATEGORY_CONTROL) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP) - e1:SetTarget(c759393.target) - e1:SetOperation(c759393.operation) - c:RegisterEffect(e1) -end -function c759393.filter(c) - return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_FIRE) and c:IsControlerCanBeChanged() -end -function c759393.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c759393.filter(chkc) end - if chk==0 then return true end - if not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) - local g=Duel.SelectTarget(tp,c759393.filter,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,g:GetCount(),0,0) - end -end -function c759393.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and c:IsFaceup() and tc and tc:IsRelateToEffect(e) and c759393.filter(tc) then - c:SetCardTarget(tc) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_CONTROL) - e1:SetProperty(EFFECT_FLAG_OWNER_RELATE+EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetValue(tp) - e1:SetLabel(0) - e1:SetReset(RESET_EVENT+0x1fc0000) - e1:SetCondition(c759393.ctcon) - tc:RegisterEffect(e1) - end -end -function c759393.ctcon(e) - local c=e:GetOwner() - local h=e:GetHandler() - return h:IsAttribute(ATTRIBUTE_FIRE) and c:IsHasCardTarget(h) -end diff --git a/script/c75944053.lua b/script/c75944053.lua deleted file mode 100644 index 0a5e6c026b..0000000000 --- a/script/c75944053.lua +++ /dev/null @@ -1,68 +0,0 @@ ---ブンボーグ003 -function c75944053.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c75944053.sptg) - e1:SetOperation(c75944053.spop) - c:RegisterEffect(e1) - --atk - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_ATKCHANGE) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetRange(LOCATION_MZONE) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e2:SetHintTiming(TIMING_DAMAGE_STEP) - e2:SetCountLimit(1) - e2:SetCondition(c75944053.condition) - e2:SetTarget(c75944053.target) - e2:SetOperation(c75944053.operation) - c:RegisterEffect(e2) -end -function c75944053.spfilter(c,e,tp) - return c:IsSetCard(0xab) and not c:IsCode(75944053) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c75944053.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c75944053.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c75944053.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c75944053.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end -function c75944053.filter(c) - return c:IsFaceup() and c:IsSetCard(0xab) -end -function c75944053.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end -function c75944053.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c75944053.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c75944053.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c75944053.filter,tp,LOCATION_MZONE,0,1,1,nil) -end -function c75944053.operation(e,tp,eg,ep,ev,re,r,rp) - local val=Duel.GetMatchingGroupCount(c75944053.filter,tp,LOCATION_ONFIELD,0,nil)*500 - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetValue(val) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_UPDATE_DEFENCE) - tc:RegisterEffect(e2) - end -end diff --git a/script/c75946257.lua b/script/c75946257.lua deleted file mode 100644 index 5b0f8f352e..0000000000 --- a/script/c75946257.lua +++ /dev/null @@ -1,28 +0,0 @@ ---混沌の呪術師 -function c75946257.initial_effect(c) - --flip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(75946257,0)) - e1:SetCategory(CATEGORY_REMOVE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP) - e1:SetTarget(c75946257.target) - e1:SetOperation(c75946257.operation) - c:RegisterEffect(e1) -end -function c75946257.filter(c) - return c:IsType(TYPE_MONSTER) and c:IsAbleToRemove() -end -function c75946257.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and c75946257.filter(chkc) end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,c75946257.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,0) -end -function c75946257.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) - end -end diff --git a/script/c75967082.lua b/script/c75967082.lua deleted file mode 100644 index ef9ec5c3ec..0000000000 --- a/script/c75967082.lua +++ /dev/null @@ -1,27 +0,0 @@ ---漏電 -function c75967082.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c75967082.condition) - e1:SetTarget(c75967082.target) - e1:SetOperation(c75967082.activate) - c:RegisterEffect(e1) -end -function c75967082.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x28) -end -function c75967082.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c75967082.cfilter,tp,LOCATION_MZONE,0,3,nil) -end -function c75967082.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDestructable,tp,0,LOCATION_ONFIELD,1,nil) end - local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,0,LOCATION_ONFIELD,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c75967082.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,0,LOCATION_ONFIELD,nil) - Duel.Destroy(g,REASON_EFFECT) -end diff --git a/script/c75987257.lua b/script/c75987257.lua deleted file mode 100644 index 5db678c469..0000000000 --- a/script/c75987257.lua +++ /dev/null @@ -1,69 +0,0 @@ ---隷属の鱗粉 -function c75987257.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_POSITION+CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCondition(c75987257.condition) - e1:SetTarget(c75987257.target) - e1:SetOperation(c75987257.operation) - c:RegisterEffect(e1) - --pos - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(75987257,0)) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetCategory(CATEGORY_POSITION) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetRange(LOCATION_SZONE) - e2:SetCountLimit(1) - e2:SetCondition(c75987257.poscon) - e2:SetOperation(c75987257.posop) - c:RegisterEffect(e2) -end -function c75987257.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp -end -function c75987257.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local tg=Duel.GetAttacker() - if chkc then return chkc==tg end - if chk==0 then return tg:IsOnField() and tg:IsDestructable() and tg:IsCanBeEffectTarget(e) end - Duel.SetTargetCard(tg) -end -function c75987257.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsLocation(LOCATION_SZONE) then return end - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsAttackable() and not tc:IsStatus(STATUS_ATTACK_CANCELED) then - Duel.ChangePosition(tc,POS_FACEUP_DEFENCE) - if c:IsRelateToEffect(e) then - Duel.Equip(tp,c,tc) - c:CancelToGrave() - --Equip limit - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetValue(c75987257.eqlimit) - e1:SetLabelObject(tc) - e1:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e1) - end - end -end -function c75987257.eqlimit(e,c) - return c==e:GetLabelObject() -end -function c75987257.poscon(e,tp,eg,ep,ev,re,r,rp) - local ph=Duel.GetCurrentPhase() - return (ph==PHASE_MAIN1 or ph==PHASE_BATTLE or ph==PHASE_MAIN2) and e:GetHandler():GetEquipTarget() -end -function c75987257.posop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) then return end - local ec=c:GetEquipTarget() - if ec then - Duel.ChangePosition(ec,POS_FACEUP_DEFENCE,0,POS_FACEUP_ATTACK,0) - end -end diff --git a/script/c75991898.lua b/script/c75991898.lua deleted file mode 100644 index 16e179908a..0000000000 --- a/script/c75991898.lua +++ /dev/null @@ -1,39 +0,0 @@ ---ラヴァルバル・ドラゴン -function c75991898.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,nil,aux.NonTuner(Card.IsAttribute,ATTRIBUTE_FIRE),1) - c:EnableReviveLimit() - --to hand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(75991898,0)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c75991898.cost) - e1:SetTarget(c75991898.target) - e1:SetOperation(c75991898.operation) - c:RegisterEffect(e1) -end -function c75991898.costfilter(c) - return c:IsSetCard(0x39) and c:IsAbleToDeckAsCost() -end -function c75991898.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c75991898.costfilter,tp,LOCATION_GRAVE,0,2,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectMatchingCard(tp,c75991898.costfilter,tp,LOCATION_GRAVE,0,2,2,nil) - Duel.SendtoDeck(g,nil,2,REASON_COST) -end -function c75991898.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and chkc:IsAbleToHand() end - if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g=Duel.SelectTarget(tp,Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c75991898.operation(e,tp,eg,ep,ev,re,r,rp,chk) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - end -end diff --git a/script/c7602840.lua b/script/c7602840.lua deleted file mode 100644 index f1b6c74583..0000000000 --- a/script/c7602840.lua +++ /dev/null @@ -1,33 +0,0 @@ ---ユーフォロイド -function c7602840.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(7602840,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetCondition(c7602840.condition) - e1:SetTarget(c7602840.target) - e1:SetOperation(c7602840.operation) - c:RegisterEffect(e1) -end -function c7602840.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) -end -function c7602840.filter(c,e,tp) - return c:IsAttackBelow(1500) and c:IsRace(RACE_MACHINE) - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c7602840.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c7602840.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c7602840.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c7602840.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_ATTACK) - end -end diff --git a/script/c76039636.lua b/script/c76039636.lua deleted file mode 100644 index 0f5983bbaf..0000000000 --- a/script/c76039636.lua +++ /dev/null @@ -1,52 +0,0 @@ ---デビルドーザー -function c76039636.initial_effect(c) - c:EnableReviveLimit() - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - c:RegisterEffect(e1) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c76039636.spcon) - e1:SetOperation(c76039636.spop) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(76039636,0)) - e2:SetCategory(CATEGORY_DECKDES) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_BATTLE_DAMAGE) - e2:SetCondition(c76039636.condition) - e2:SetTarget(c76039636.target) - e2:SetOperation(c76039636.operation) - c:RegisterEffect(e2) -end -function c76039636.spfilter(c) - return c:IsRace(RACE_INSECT) and c:IsAbleToRemoveAsCost() -end -function c76039636.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c76039636.spfilter,tp,LOCATION_GRAVE,0,2,nil) -end -function c76039636.spop(e,tp,eg,ep,ev,re,r,rp,c) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c76039636.spfilter,tp,LOCATION_GRAVE,0,2,2,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c76039636.condition(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp -end -function c76039636.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DECKDES,0,0,1-tp,1) -end -function c76039636.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.DiscardDeck(1-tp,1,REASON_EFFECT) -end diff --git a/script/c76052811.lua b/script/c76052811.lua deleted file mode 100644 index ebdcb42c22..0000000000 --- a/script/c76052811.lua +++ /dev/null @@ -1,51 +0,0 @@ ---地獄詩人ヘルポエマー -function c76052811.initial_effect(c) - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_SINGLE_RANGE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetRange(LOCATION_GRAVE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - c:RegisterEffect(e1) - --reg - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_BATTLE_DESTROYED) - e2:SetOperation(c76052811.regop) - c:RegisterEffect(e2) - --handes - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(76052811,0)) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e3:SetCategory(CATEGORY_HANDES) - e3:SetCode(EVENT_PHASE+PHASE_BATTLE) - e3:SetRange(LOCATION_GRAVE) - e3:SetCountLimit(1) - e3:SetCondition(c76052811.hdcon) - e3:SetTarget(c76052811.hdtg) - e3:SetOperation(c76052811.hdop) - c:RegisterEffect(e3) -end -function c76052811.regop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsLocation(LOCATION_GRAVE) and c:IsReason(REASON_BATTLE) then - c:RegisterFlagEffect(76052811,RESET_EVENT+0x1fe0000,0,0) - end -end -function c76052811.hdcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp and e:GetHandler():GetFlagEffect(76052811)~=0 -end -function c76052811.hdtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - e:GetHandler():ResetFlagEffect(76052811) - Duel.SetOperationInfo(0,CATEGORY_HANDES,0,0,1-tp,1) -end -function c76052811.hdop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - e:GetHandler():RegisterFlagEffect(76052811,RESET_EVENT+0x1fe0000,0,0) - local g=Duel.GetFieldGroup(1-tp,LOCATION_HAND,0) - if g:GetCount()==0 then return end - local sg=g:RandomSelect(1-tp,1) - Duel.SendtoGrave(sg,REASON_DISCARD+REASON_EFFECT) - end -end diff --git a/script/c76066541.lua b/script/c76066541.lua deleted file mode 100644 index e24c518414..0000000000 --- a/script/c76066541.lua +++ /dev/null @@ -1,51 +0,0 @@ ---ドラゴンダウザー -function c76066541.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(76066541,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCountLimit(1,76066541) - e1:SetCondition(c76066541.condition) - e1:SetTarget(c76066541.target) - e1:SetOperation(c76066541.operation) - c:RegisterEffect(e1) -end -function c76066541.condition(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return (c:IsReason(REASON_BATTLE) - or rp~=tp and c:IsReason(REASON_DESTROY) and c:GetPreviousControler()==tp) - and c:IsPreviousLocation(LOCATION_ONFIELD) -end -function c76066541.filter(c,e,tp) - return c:IsType(TYPE_PENDULUM) and c:IsAttribute(ATTRIBUTE_EARTH) - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c76066541.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c76066541.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c76066541.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c76066541.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - local tc=g:GetFirst() - if tc then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENCE) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetOperation(c76066541.desop) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - end -end -function c76066541.desop(e,tp,eg,ep,ev,re,r,rp) - Duel.Destroy(e:GetHandler(),REASON_EFFECT) -end diff --git a/script/c76067258.lua b/script/c76067258.lua deleted file mode 100644 index a0640c5feb..0000000000 --- a/script/c76067258.lua +++ /dev/null @@ -1,73 +0,0 @@ ---No.66 覇鍵甲虫マスター・キー・ビートル -function c76067258.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_DARK),4,2) - c:EnableReviveLimit() - --target - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(76067258,0)) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCost(c76067258.cost) - e1:SetTarget(c76067258.target) - e1:SetOperation(c76067258.operation) - c:RegisterEffect(e1) - --indes - local e2=Effect.CreateEffect(c) - e2:SetProperty(EFFECT_FLAG_SET_AVAILABLE) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - e2:SetTargetRange(LOCATION_ONFIELD,LOCATION_ONFIELD) - e2:SetTarget(c76067258.indtg) - e2:SetValue(1) - c:RegisterEffect(e2) - --desrep - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE) - e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e3:SetCode(EFFECT_DESTROY_REPLACE) - e3:SetRange(LOCATION_MZONE) - e3:SetTarget(c76067258.reptg) - c:RegisterEffect(e3) -end -c76067258.xyz_number=66 -function c76067258.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c76067258.filter(c,ec) - return not ec:IsHasCardTarget(c) -end -function c76067258.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local c=e:GetHandler() - if chkc then return chkc:IsOnField() and chkc:IsControler(tp) and chkc~=c and c76067258.filter(chkc,c) end - if chk==0 then return Duel.IsExistingTarget(c76067258.filter,tp,LOCATION_ONFIELD,0,1,c,c) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - Duel.SelectTarget(tp,c76067258.filter,tp,LOCATION_ONFIELD,0,1,1,c,c) -end -function c76067258.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsFaceup() and c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then - c:SetCardTarget(tc) - tc:RegisterFlagEffect(76067258,RESET_EVENT+0x1fe0000,0,0) - end -end -function c76067258.indtg(e,c) - return e:GetHandler():IsHasCardTarget(c) and c:GetFlagEffect(76067258)~=0 -end -function c76067258.repfilter(c,tp) - return c:IsControler(tp) and c:GetFlagEffect(76067258)~=0 -end -function c76067258.reptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():GetCardTarget():IsExists(c76067258.repfilter,1,nil,tp) end - if Duel.SelectYesNo(tp,aux.Stringid(76067258,1)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=e:GetHandler():GetCardTarget():FilterSelect(tp,c76067258.repfilter,1,1,nil,tp) - Duel.SendtoGrave(g,REASON_EFFECT) - return true - else return false end -end diff --git a/script/c76075810.lua b/script/c76075810.lua deleted file mode 100644 index f056553fa5..0000000000 --- a/script/c76075810.lua +++ /dev/null @@ -1,42 +0,0 @@ ---投石部隊 -function c76075810.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(76075810,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c76075810.descost) - e1:SetTarget(c76075810.destg) - e1:SetOperation(c76075810.desop) - c:RegisterEffect(e1) -end -function c76075810.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsRace,1,nil,RACE_WARRIOR) end - local g=Duel.SelectReleaseGroup(tp,Card.IsRace,1,1,nil,RACE_WARRIOR) - Duel.Release(g,REASON_EFFECT) -end -function c76075810.filter(c,atk) - return c:IsFaceup() and c:GetDefence()0 - and Duel.IsExistingTarget(c76080032.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c76080032.filter,tp,LOCATION_MZONE,0,1,1,nil) -end -function c76080032.eqop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) then return end - local tc=Duel.GetFirstTarget() - if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or tc:GetControler()~=tp or tc:IsFacedown() or not tc:IsRelateToEffect(e) or not c:CheckUniqueOnField(tp) then - Duel.SendtoGrave(c,REASON_EFFECT) - return - end - Duel.Equip(tp,c,tc,true) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(c76080032.eqlimit) - e1:SetLabelObject(tc) - c:RegisterEffect(e1) - --atkup - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(1900) - e2:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e2) -end -function c76080032.discon(e,tp,eg,ep,ev,re,r,rp) - local ec=e:GetHandler():GetEquipTarget() - return ec and (ec==Duel.GetAttacker() or ec==Duel.GetAttackTarget()) and ec:GetBattleTarget() -end -function c76080032.disop(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetHandler():GetEquipTarget():GetBattleTarget() - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_BATTLE) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_BATTLE) - tc:RegisterEffect(e2) -end -function c76080032.eqlimit(e,c) - return c==e:GetLabelObject() -end diff --git a/script/c76103675.lua b/script/c76103675.lua deleted file mode 100644 index 776db6a6ce..0000000000 --- a/script/c76103675.lua +++ /dev/null @@ -1,22 +0,0 @@ ---火の粉 -function c76103675.initial_effect(c) - --damage - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c76103675.damtg) - e1:SetOperation(c76103675.damop) - c:RegisterEffect(e1) -end -function c76103675.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(200) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,200) -end -function c76103675.damop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c76136345.lua b/script/c76136345.lua deleted file mode 100644 index d45a7063dc..0000000000 --- a/script/c76136345.lua +++ /dev/null @@ -1,95 +0,0 @@ ---転回操車 -function c76136345.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(76136345,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_SUMMON_SUCCESS) - e2:SetRange(LOCATION_FZONE) - e2:SetProperty(EFFECT_FLAG_DELAY) - e2:SetCountLimit(1,76136345) - e2:SetCondition(c76136345.spcon) - e2:SetTarget(c76136345.sptg) - e2:SetOperation(c76136345.spop) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e3) - --tohand - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(76136345,1)) - e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e4:SetType(EFFECT_TYPE_IGNITION) - e4:SetRange(LOCATION_FZONE) - e4:SetCountLimit(1,76136345) - e4:SetCost(c76136345.thcost) - e4:SetTarget(c76136345.thtg) - e4:SetOperation(c76136345.thop) - c:RegisterEffect(e4) -end -function c76136345.cfilter(c,tp) - return c:IsFaceup() and c:GetLevel()==10 and c:IsControler(tp) and c:IsRace(RACE_MACHINE) and c:IsAttribute(ATTRIBUTE_EARTH) -end -function c76136345.spcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c76136345.cfilter,1,nil,tp) -end -function c76136345.filter(c,e,tp) - return c:GetLevel()==4 and c:IsAttackAbove(1800) and c:IsRace(RACE_MACHINE) and c:IsAttribute(ATTRIBUTE_EARTH) - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c76136345.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c76136345.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c76136345.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local c=e:GetHandler() - if not c:IsRelateToEffect(e) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c76136345.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - local tc=g:GetFirst() - if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CHANGE_LEVEL) - e1:SetValue(10) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - Duel.SpecialSummonComplete() - end - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_AVOID_BATTLE_DAMAGE) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetTargetRange(0,1) - e2:SetValue(1) - e2:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e2,tp) -end -function c76136345.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,Card.IsAbleToGraveAsCost,1,1,REASON_COST) -end -function c76136345.thfilter(c) - return c:GetLevel()==10 and c:IsRace(RACE_MACHINE) and c:IsAttribute(ATTRIBUTE_EARTH) and c:IsAbleToHand() -end -function c76136345.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c76136345.thfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c76136345.thop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c76136345.thfilter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c76137276.lua b/script/c76137276.lua deleted file mode 100644 index 29b1202fae..0000000000 --- a/script/c76137276.lua +++ /dev/null @@ -1,33 +0,0 @@ ---マジック・キャプチャー -function c76137276.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_CHAINING) - e1:SetCondition(c76137276.condition) - e1:SetCost(c76137276.cost) - e1:SetOperation(c76137276.activate) - c:RegisterEffect(e1) -end -function c76137276.condition(e,tp,eg,ep,ev,re,r,rp) - return rp==tp and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL) -end -function c76137276.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD,nil) -end -function c76137276.activate(e,tp,eg,ep,ev,re,r,rp) - if re:GetHandler():IsRelateToEffect(re) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetOperation(c76137276.thop) - e1:SetReset(RESET_EVENT+0x17a0000) - re:GetHandler():RegisterEffect(e1) - end -end -function c76137276.thop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsHasEffect(EFFECT_NECRO_VALLEY) then - Duel.SendtoHand(e:GetHandler(),tp,REASON_EFFECT) - end -end diff --git a/script/c76137614.lua b/script/c76137614.lua deleted file mode 100644 index ae2824b3c0..0000000000 --- a/script/c76137614.lua +++ /dev/null @@ -1,35 +0,0 @@ ---聖なる解呪師 -function c76137614.initial_effect(c) - --to hand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(76137614,0)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCost(c76137614.thcost) - e1:SetTarget(c76137614.thtg) - e1:SetOperation(c76137614.thop) - c:RegisterEffect(e1) -end -function c76137614.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsCanRemoveCounter(tp,1,1,0x3001,1,REASON_COST) end - Duel.RemoveCounter(tp,1,1,0x3001,1,REASON_COST) -end -function c76137614.filter(c) - return c:IsType(TYPE_SPELL) and c:IsFaceup() and c:IsAbleToHand() -end -function c76137614.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and c76137614.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c76137614.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g=Duel.SelectTarget(tp,c76137614.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c76137614.thop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - end -end diff --git a/script/c7617062.lua b/script/c7617062.lua deleted file mode 100644 index 79a0a1377c..0000000000 --- a/script/c7617062.lua +++ /dev/null @@ -1,73 +0,0 @@ ---ゴーストリック・ミュージアム -function c7617062.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --cannot attack - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_CANNOT_ATTACK) - e2:SetRange(LOCATION_FZONE) - e2:SetTargetRange(LOCATION_MZONE,0) - e2:SetTarget(c7617062.ftarget) - c:RegisterEffect(e2) - --atklimit - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET) - e3:SetRange(LOCATION_FZONE) - e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e3:SetValue(c7617062.bttg) - c:RegisterEffect(e3) - --direct attack - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_FIELD) - e4:SetCode(EFFECT_DIRECT_ATTACK) - e4:SetRange(LOCATION_FZONE) - e4:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e4:SetTarget(c7617062.dirtg) - c:RegisterEffect(e4) - --pos - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e5:SetRange(LOCATION_FZONE) - e5:SetCode(EVENT_BATTLE_DAMAGE) - e5:SetOperation(c7617062.regop) - c:RegisterEffect(e5) - local e6=Effect.CreateEffect(c) - e6:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e6:SetRange(LOCATION_FZONE) - e6:SetCode(EVENT_DAMAGE_STEP_END) - e6:SetCondition(c7617062.poscon) - e6:SetOperation(c7617062.posop) - e6:SetLabelObject(e5) - c:RegisterEffect(e6) -end -function c7617062.bttg(e,c) - return c:IsFacedown() -end -function c7617062.dirtg(e,c) - return not Duel.IsExistingMatchingCard(Card.IsFaceup,c:GetControler(),0,LOCATION_MZONE,1,nil) -end -function c7617062.ftarget(e,c) - return not c:IsSetCard(0x8d) -end -function c7617062.regop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - c:RegisterFlagEffect(7617062,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_DAMAGE,0,1) - eg:GetFirst():RegisterFlagEffect(7617063,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_DAMAGE,0,1) -end -function c7617062.poscon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetFlagEffect(7617062)>0 -end -function c7617062.filter(c) - return c:GetFlagEffect(7617063)>0 -end -function c7617062.posop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c7617062.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - if e:GetHandler():IsRelateToEffect(e) then - Duel.ChangePosition(g,POS_FACEDOWN_DEFENCE) - end -end diff --git a/script/c7617253.lua b/script/c7617253.lua deleted file mode 100644 index b302dc9ec9..0000000000 --- a/script/c7617253.lua +++ /dev/null @@ -1,49 +0,0 @@ ---虹の行方 -function c7617253.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetCondition(c7617253.condition) - e1:SetCost(c7617253.cost) - e1:SetTarget(c7617253.target) - e1:SetOperation(c7617253.activate) - c:RegisterEffect(e1) -end -function c7617253.condition(e,tp,eg,ep,ev,re,r,rp) - return tp~=Duel.GetTurnPlayer() -end -function c7617253.costfilter(c) - return c:IsFaceup() and c:IsSetCard(0x1034) and c:IsAbleToGraveAsCost() -end -function c7617253.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c7617253.costfilter,tp,LOCATION_SZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c7617253.costfilter,tp,LOCATION_SZONE,0,1,1,nil) - Duel.SendtoGrave(g,REASON_COST) -end -function c7617253.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local tg=Duel.GetAttacker() - if chkc then return chkc==tg end - if chk==0 then return tg:IsOnField() and tg:IsCanBeEffectTarget(e) end - Duel.SetTargetCard(tg) -end -function c7617253.filter(c) - local code=c:GetCode() - return (code==79856792 or code==79407975) and c:IsAbleToHand() -end -function c7617253.activate(e,tp,eg,ep,ev,re,r,rp) - local tg=Duel.GetAttacker() - if not tg:IsRelateToEffect(e) or tg:IsStatus(STATUS_ATTACK_CANCELED) - or not Duel.NegateAttack() then return end - local g=Duel.GetMatchingGroup(c7617253.filter,tp,LOCATION_DECK,0,nil) - if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(7617253,0)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local sg=g:Select(tp,1,1,nil) - Duel.BreakEffect() - Duel.SendtoHand(sg,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,sg) - end -end diff --git a/script/c76202610.lua b/script/c76202610.lua deleted file mode 100644 index 8cb42881ab..0000000000 --- a/script/c76202610.lua +++ /dev/null @@ -1,31 +0,0 @@ ---ダークロン -function c76202610.initial_effect(c) - --level,attribute - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(76202610,0)) - e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetOperation(c76202610.operation) - c:RegisterEffect(e1) -end -function c76202610.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil) - local tc=g:GetFirst() - while tc do - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_UPDATE_LEVEL) - e1:SetValue(1) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetCode(EFFECT_CHANGE_ATTRIBUTE) - e2:SetValue(ATTRIBUTE_DARK) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e2) - tc=g:GetNext() - end -end diff --git a/script/c76203291.lua b/script/c76203291.lua deleted file mode 100644 index 13731f5986..0000000000 --- a/script/c76203291.lua +++ /dev/null @@ -1,32 +0,0 @@ ---光鱗のトビウオ -function c76203291.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(76203291,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c76203291.cost) - e1:SetTarget(c76203291.target) - e1:SetOperation(c76203291.operation) - c:RegisterEffect(e1) -end -function c76203291.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsRace,1,e:GetHandler(),RACE_FISH) end - local g=Duel.SelectReleaseGroup(tp,Card.IsRace,1,1,e:GetHandler(),RACE_FISH) - Duel.Release(g,REASON_COST) -end -function c76203291.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsDestructable() end - if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c76203291.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c76214441.lua b/script/c76214441.lua deleted file mode 100644 index 1b5aa64d08..0000000000 --- a/script/c76214441.lua +++ /dev/null @@ -1,41 +0,0 @@ ---ライフ・コーディネイター -function c76214441.initial_effect(c) - --Negate - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(76214441,0)) - e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_CHAINING) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c76214441.discon) - e1:SetCost(c76214441.discost) - e1:SetTarget(c76214441.distg) - e1:SetOperation(c76214441.disop) - c:RegisterEffect(e1) -end -function c76214441.discon(e,tp,eg,ep,ev,re,r,rp) - if ep==tp or (re:GetHandler():IsType(TYPE_SPELL+TYPE_TRAP) and not re:IsHasType(EFFECT_TYPE_ACTIVATE)) or not Duel.IsChainNegatable(ev) then return false end - local ex,cg,ct,cp,cv=Duel.GetOperationInfo(ev,CATEGORY_DAMAGE) - if ex then return true end - ex,cg,ct,cp,cv=Duel.GetOperationInfo(ev,CATEGORY_RECOVER) - return ex and ((cp~=PLAYER_ALL and Duel.IsPlayerAffectedByEffect(cp,EFFECT_REVERSE_RECOVER)) or - (cp==PLAYER_ALL and (Duel.IsPlayerAffectedByEffect(0,EFFECT_REVERSE_RECOVER) or Duel.IsPlayerAffectedByEffect(1,EFFECT_REVERSE_RECOVER)))) -end -function c76214441.discost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsDiscardable() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD) -end -function c76214441.distg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) - end -end -function c76214441.disop(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateActivation(ev) - if re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(eg,REASON_EFFECT) - end -end diff --git a/script/c76218643.lua b/script/c76218643.lua deleted file mode 100644 index f0b8c23960..0000000000 --- a/script/c76218643.lua +++ /dev/null @@ -1,44 +0,0 @@ ---ブラックポータン -function c76218643.initial_effect(c) - --lp damage - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e1:SetCondition(c76218643.indcon) - e1:SetValue(1) - c:RegisterEffect(e1) - --lp recover - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(76218643,0)) - e2:SetCategory(CATEGORY_RECOVER) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_LEAVE_FIELD) - e2:SetRange(LOCATION_MZONE) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetCondition(c76218643.reccon) - e2:SetTarget(c76218643.rectg) - e2:SetOperation(c76218643.recop) - c:RegisterEffect(e2) -end -function c76218643.indfilter(c) - return c:IsFaceup() and c:IsType(TYPE_TUNER) -end -function c76218643.indcon(e) - return Duel.IsExistingMatchingCard(c76218643.indfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) -end -function c76218643.filter(c,tp) - return c:IsPreviousPosition(POS_FACEUP) and c:IsType(TYPE_TUNER) -end -function c76218643.reccon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c76218643.filter,1,nil,tp) -end -function c76218643.rectg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(800) - Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,800) -end -function c76218643.recop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Recover(p,d,REASON_EFFECT) -end diff --git a/script/c76224717.lua b/script/c76224717.lua deleted file mode 100644 index e3e7d76488..0000000000 --- a/script/c76224717.lua +++ /dev/null @@ -1,97 +0,0 @@ ---アドバンス・ゾーン -function c76224717.initial_effect(c) - --activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --destroy/draw/salvage - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(76224717,0)) - e2:SetCategory(CATEGORY_DESTROY+CATEGORY_DRAW+CATEGORY_TOHAND) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_PHASE+PHASE_END) - e2:SetRange(LOCATION_SZONE) - e2:SetCountLimit(1) - e2:SetTarget(c76224717.target) - e2:SetOperation(c76224717.operation) - c:RegisterEffect(e2) - if not c76224717.global_check then - c76224717.global_check=true - c76224717[0]=0 - c76224717[1]=0 - local ge1=Effect.CreateEffect(c) - ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - ge1:SetCode(EVENT_SUMMON_SUCCESS) - ge1:SetOperation(c76224717.checkop) - Duel.RegisterEffect(ge1,0) - local ge2=Effect.CreateEffect(c) - ge2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - ge2:SetCode(EVENT_MSET) - ge2:SetOperation(c76224717.checkop) - Duel.RegisterEffect(ge2,0) - local ge3=Effect.CreateEffect(c) - ge3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - ge3:SetCode(EVENT_PHASE_START+PHASE_DRAW) - ge3:SetOperation(c76224717.clear) - Duel.RegisterEffect(ge3,0) - end -end -function c76224717.checkop(e,tp,eg,ep,ev,re,r,rp) - local tc=eg:GetFirst() - if bit.band(tc:GetSummonType(),SUMMON_TYPE_ADVANCE)==SUMMON_TYPE_ADVANCE then - c76224717[ep]=c76224717[ep]+tc:GetMaterialCount() - end -end -function c76224717.clear(e,tp,eg,ep,ev,re,r,rp) - c76224717[0]=0 - c76224717[1]=0 -end -function c76224717.filter1(c) - return c:IsFacedown() and c:IsDestructable() -end -function c76224717.filter2(c) - return c:IsType(TYPE_MONSTER) and c:IsAbleToHand() -end -function c76224717.target(e,tp,eg,ep,ev,re,r,rp,chk) - local b1=c76224717[tp]>0 and Duel.IsExistingMatchingCard(c76224717.filter1,tp,0,LOCATION_ONFIELD,1,nil) - local b2=c76224717[tp]>1 and Duel.IsPlayerCanDraw(tp,1) - local b3=c76224717[tp]>2 and Duel.IsExistingMatchingCard(c76224717.filter2,tp,LOCATION_GRAVE,0,1,nil) - if chk==0 then return b1 or b2 or b3 end - if b1 then - local g=Duel.GetMatchingGroup(c76224717.filter1,tp,0,LOCATION_ONFIELD,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) - end - if b2 then - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) - end - if b3 then - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE) - end -end -function c76224717.operation(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local act=false - if c76224717[tp]>0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectMatchingCard(tp,c76224717.filter1,tp,0,LOCATION_ONFIELD,1,1,nil) - if g:GetCount()>0 then - Duel.Destroy(g,REASON_EFFECT) - act=true - end - end - if c76224717[tp]>1 and Duel.IsPlayerCanDraw(tp,1) then - if act then Duel.BreakEffect() end - Duel.Draw(tp,1,REASON_EFFECT) - act=true - end - if c76224717[tp]>2 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c76224717.filter2,tp,LOCATION_GRAVE,0,1,1,nil) - if g:GetCount()>0 then - if act then Duel.BreakEffect() end - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end - end -end diff --git a/script/c7623640.lua b/script/c7623640.lua deleted file mode 100644 index 080971590d..0000000000 --- a/script/c7623640.lua +++ /dev/null @@ -1,45 +0,0 @@ ---暗黒界の導師 セルリ -function c7623640.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(7623640,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCondition(c7623640.spcon) - e1:SetTarget(c7623640.sptg) - e1:SetOperation(c7623640.spop) - c:RegisterEffect(e1) - --spsummon success - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(7623640,1)) - e2:SetCategory(CATEGORY_HANDES) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetCondition(c7623640.hdcon) - e2:SetTarget(c7623640.hdtg) - e2:SetOperation(c7623640.hdop) - c:RegisterEffect(e2) -end -function c7623640.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_HAND) and bit.band(r,0x4040)==0x4040 -end -function c7623640.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c7623640.spop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - Duel.SpecialSummon(e:GetHandler(),0,tp,1-tp,false,false,POS_FACEUP_DEFENCE) - end -end -function c7623640.hdcon(e,tp,eg,ep,ev,re,r,rp) - return re:GetHandler():IsSetCard(0x6) -end -function c7623640.hdtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,1-tp,1) -end -function c7623640.hdop(e,tp,eg,ep,ev,re,r,rp) - Duel.DiscardHand(1-tp,aux.TRUE,1,1,REASON_EFFECT+REASON_DISCARD,nil) -end diff --git a/script/c7625614.lua b/script/c7625614.lua deleted file mode 100644 index 3c54021237..0000000000 --- a/script/c7625614.lua +++ /dev/null @@ -1,48 +0,0 @@ ---レアゴールド・アーマー -function c7625614.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c7625614.target) - e1:SetOperation(c7625614.operation) - c:RegisterEffect(e1) - --atk target - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(0,LOCATION_MZONE) - e2:SetCondition(c7625614.atkcon) - e2:SetValue(c7625614.atktg) - c:RegisterEffect(e2) - --Equip limit - local e4=Effect.CreateEffect(c) - e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetCode(EFFECT_EQUIP_LIMIT) - e4:SetValue(1) - c:RegisterEffect(e4) -end -function c7625614.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c7625614.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,e:GetHandler(),tc) - end -end -function c7625614.atkcon(e) - local ec=e:GetHandler():GetEquipTarget() - return ec and ec:GetControler()==e:GetHandlerPlayer() -end -function c7625614.atktg(e,c) - return c~=e:GetHandler():GetEquipTarget() -end diff --git a/script/c76263644.lua b/script/c76263644.lua deleted file mode 100644 index 20c2aa9833..0000000000 --- a/script/c76263644.lua +++ /dev/null @@ -1,82 +0,0 @@ ---Dragoon D-END -function c76263644.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcCode2(c,83965310,17132130,false,false) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCategory(CATEGORY_DAMAGE+CATEGORY_DESTROY) - e2:SetDescription(aux.Stringid(76263644,0)) - e2:SetCountLimit(1) - e2:SetRange(LOCATION_MZONE) - e2:SetCost(c76263644.descost) - e2:SetTarget(c76263644.destg) - e2:SetOperation(c76263644.desop) - c:RegisterEffect(e2) - --Special Summon - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_FIELD) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetCode(EVENT_PHASE+PHASE_STANDBY) - e3:SetRange(LOCATION_GRAVE) - e3:SetDescription(aux.Stringid(76263644,1)) - e3:SetCondition(c76263644.spcon) - e3:SetCost(c76263644.spcost) - e3:SetTarget(c76263644.sptg) - e3:SetOperation(c76263644.spop) - c:RegisterEffect(e3) -end -function c76263644.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_BATTLE_PHASE)==0 end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_BP) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function c76263644.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsDestructable() end - if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,0,LOCATION_MZONE,1,1,nil) - local d=g:GetFirst() - local atk=0 - if d:IsFaceup() then atk=d:GetAttack() end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,atk) -end -function c76263644.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - local atk=0 - if tc:IsFaceup() then atk=tc:GetAttack() end - if Duel.Destroy(tc,REASON_EFFECT)==0 then return end - Duel.Damage(1-tp,atk,REASON_EFFECT) - end -end -function c76263644.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c76263644.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c76263644.spfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c76263644.spfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c76263644.spfilter(c) - return c:IsSetCard(0xc008) and c:IsAbleToRemoveAsCost() -end -function c76263644.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c76263644.spop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c76297408.lua b/script/c76297408.lua deleted file mode 100644 index 6b4f1728f1..0000000000 --- a/script/c76297408.lua +++ /dev/null @@ -1,70 +0,0 @@ ---魂粉砕 -function c76297408.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c76297408.target1) - e1:SetOperation(c76297408.operation) - c:RegisterEffect(e1) - --remove - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(76297408,0)) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetRange(LOCATION_SZONE) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetCondition(c76297408.condition2) - e2:SetCost(c76297408.cost2) - e2:SetTarget(c76297408.target2) - e2:SetOperation(c76297408.operation) - c:RegisterEffect(e2) -end -function c76297408.cfilter(c) - return c:IsFaceup() and c:IsRace(RACE_FIEND) -end -function c76297408.rfilter(c) - return c:IsType(TYPE_MONSTER) and c:IsAbleToRemove() -end -function c76297408.target1(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - if chk==0 then return true end - if Duel.IsExistingMatchingCard(c76297408.cfilter,tp,LOCATION_MZONE,0,1,nil) and Duel.CheckLPCost(tp,500) - and Duel.IsExistingTarget(c76297408.rfilter,tp,0,LOCATION_GRAVE,1,nil) - and Duel.IsExistingTarget(c76297408.rfilter,tp,LOCATION_GRAVE,0,1,nil) - and Duel.SelectYesNo(tp,aux.Stringid(76297408,1)) then - e:SetProperty(EFFECT_FLAG_CARD_TARGET) - Duel.PayLPCost(tp,500) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g1=Duel.SelectTarget(tp,c76297408.rfilter,tp,0,LOCATION_GRAVE,1,1,nil) - Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_REMOVE) - local g2=Duel.SelectTarget(1-tp,c76297408.rfilter,1-tp,0,LOCATION_GRAVE,1,1,nil) - g1:Merge(g2) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g1,g1:GetCount(),0,0) - else e:SetProperty(0) end -end -function c76297408.condition2(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c76297408.cfilter,tp,LOCATION_MZONE,0,1,nil) -end -function c76297408.cost2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,500) end - Duel.PayLPCost(tp,500) -end -function c76297408.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - if chk==0 then return Duel.IsExistingTarget(c76297408.rfilter,tp,0,LOCATION_GRAVE,1,nil) - and Duel.IsExistingTarget(c76297408.rfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g1=Duel.SelectTarget(tp,c76297408.rfilter,tp,0,LOCATION_GRAVE,1,1,nil) - Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_REMOVE) - local g2=Duel.SelectTarget(1-tp,c76297408.rfilter,1-tp,0,LOCATION_GRAVE,1,1,nil) - g1:Merge(g2) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g1,g1:GetCount(),0,0) -end -function c76297408.operation(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - if not g then return end - g=g:Filter(Card.IsRelateToEffect,nil,e) - Duel.Remove(g,POS_FACEUP,REASON_EFFECT) -end diff --git a/script/c76305638.lua b/script/c76305638.lua deleted file mode 100644 index 756259d334..0000000000 --- a/script/c76305638.lua +++ /dev/null @@ -1,41 +0,0 @@ ---岩の精霊 タイタン -function c76305638.initial_effect(c) - c:EnableReviveLimit() - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c76305638.spcon) - e1:SetOperation(c76305638.spop) - c:RegisterEffect(e1) - --atk - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetCondition(c76305638.atkcon) - e2:SetValue(300) - c:RegisterEffect(e2) -end -function c76305638.atkcon(e) - local ph=Duel.GetCurrentPhase() - local tp=Duel.GetTurnPlayer() - return tp~=e:GetHandler():GetControler() and (ph==PHASE_BATTLE or ph==PHASE_DAMAGE or ph==PHASE_DAMAGE_CAL) -end -function c76305638.spfilter(c) - return c:IsAttribute(ATTRIBUTE_EARTH) and c:IsAbleToRemoveAsCost() -end -function c76305638.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c76305638.spfilter,tp,LOCATION_GRAVE,0,1,nil) -end -function c76305638.spop(e,tp,eg,ep,ev,re,r,rp,c) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c76305638.spfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end diff --git a/script/c76321376.lua b/script/c76321376.lua deleted file mode 100644 index fe5041a91b..0000000000 --- a/script/c76321376.lua +++ /dev/null @@ -1,26 +0,0 @@ ---マイン・ゴーレム -function c76321376.initial_effect(c) - --damage - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(76321376,0)) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetCondition(c76321376.damcon) - e1:SetTarget(c76321376.damtg) - e1:SetOperation(c76321376.damop) - c:RegisterEffect(e1) -end -function c76321376.damcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) -end -function c76321376.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(500) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,500) -end -function c76321376.damop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c7634581.lua b/script/c7634581.lua deleted file mode 100644 index 36a6723533..0000000000 --- a/script/c7634581.lua +++ /dev/null @@ -1,56 +0,0 @@ ---オレイカルコス・シュノロス -function c7634581.initial_effect(c) - c:EnableReviveLimit() - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(7634581,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e1:SetRange(LOCATION_HAND) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetCondition(c7634581.spcon) - e1:SetTarget(c7634581.sptg) - e1:SetOperation(c7634581.spop) - c:RegisterEffect(e1) - --atk - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(c7634581.value) - c:RegisterEffect(e2) - -- - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - e3:SetRange(LOCATION_MZONE) - e3:SetTargetRange(LOCATION_MZONE,0) - e3:SetTarget(c7634581.efilter) - e3:SetValue(1) - c:RegisterEffect(e3) -end -function c7634581.value(e,c) - return Duel.GetFieldGroupCount(c:GetControler(),0,LOCATION_MZONE)*1000 -end -function c7634581.efilter(e,c) - return c:IsType(TYPE_NORMAL) and c:GetLevel()==4 -end -function c7634581.cfilter(c,tp) - return c:IsType(TYPE_NORMAL) and c:GetPreviousControler()==tp -end -function c7634581.spcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c7634581.cfilter,1,nil,tp) -end -function c7634581.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c7634581.spop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - Duel.SpecialSummon(e:GetHandler(),0,tp,tp,true,false,POS_FACEUP) - e:GetHandler():CompleteProcedure() - end -end diff --git a/script/c76348260.lua b/script/c76348260.lua deleted file mode 100644 index 8f4c3824b2..0000000000 --- a/script/c76348260.lua +++ /dev/null @@ -1,42 +0,0 @@ ---極星天ミーミル -function c76348260.initial_effect(c) - --Special Summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(76348260,0)) - e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_FIELD) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) - e1:SetRange(LOCATION_GRAVE) - e1:SetCountLimit(1) - e1:SetCondition(c76348260.condition) - e1:SetCost(c76348260.cost) - e1:SetTarget(c76348260.target) - e1:SetOperation(c76348260.operation) - c:RegisterEffect(e1) -end -function c76348260.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x42) -end -function c76348260.condition(e,tp,eg,ep,ev,re,r,rp) - return tp==Duel.GetTurnPlayer() and not Duel.CheckPhaseActivity() - and Duel.IsExistingMatchingCard(c76348260.cfilter,tp,LOCATION_MZONE,0,1,nil) -end -function c76348260.costfilter(c) - return c:IsType(TYPE_SPELL) and c:IsAbleToGraveAsCost() -end -function c76348260.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c76348260.costfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c76348260.costfilter,tp,LOCATION_HAND,0,1,1,nil) - Duel.SendtoGrave(g,REASON_COST) -end -function c76348260.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c76348260.operation(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c76372778.lua b/script/c76372778.lua deleted file mode 100644 index f52aa26b76..0000000000 --- a/script/c76372778.lua +++ /dev/null @@ -1,46 +0,0 @@ ---イビリチュア・メロウガイスト -function c76372778.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,4,2) - c:EnableReviveLimit() - --to deck - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(76372778,0)) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_BATTLED) - e1:SetCondition(c76372778.condition) - e1:SetCost(c76372778.cost) - e1:SetOperation(c76372778.operation) - c:RegisterEffect(e1) -end -function c76372778.condition(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsStatus(STATUS_BATTLE_DESTROYED) then return false end - local bc=c:GetBattleTarget() - return bc and bc:IsStatus(STATUS_BATTLE_DESTROYED) and not bc:IsType(TYPE_TOKEN) and bc:GetLeaveFieldDest()==0 -end -function c76372778.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c76372778.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local bc=c:GetBattleTarget() - if bc:IsRelateToBattle() then - local e1=Effect.CreateEffect(c) - e1:SetCode(EFFECT_SEND_REPLACE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetTarget(c76372778.reptg) - e1:SetOperation(c76372778.repop) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_DAMAGE) - bc:RegisterEffect(e1) - end -end -function c76372778.reptg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:GetDestination()==LOCATION_GRAVE and c:IsReason(REASON_BATTLE) end - return true -end -function c76372778.repop(e,tp,eg,ep,ev,re,r,rp) - Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_EFFECT) -end diff --git a/script/c76384284.lua b/script/c76384284.lua deleted file mode 100644 index 5ef493de34..0000000000 --- a/script/c76384284.lua +++ /dev/null @@ -1,31 +0,0 @@ ---トロイの剣闘獣 -function c76384284.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DRAW) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_END_PHASE) - e1:SetTarget(c76384284.target) - e1:SetOperation(c76384284.activate) - c:RegisterEffect(e1) -end -function c76384284.filter(c,e,tp) - return c:IsSetCard(0x19) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,1-tp) -end -function c76384284.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(1-tp,LOCATION_MZONE,tp)>0 - and Duel.IsExistingMatchingCard(c76384284.filter,tp,LOCATION_HAND,0,1,nil,e,tp) - and Duel.IsPlayerCanDraw(tp,1) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,0,tp,LOCATION_HAND) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c76384284.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(1-tp,LOCATION_MZONE,tp)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c76384284.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - if g:GetCount()>0 and Duel.SpecialSummon(g,0,tp,1-tp,false,false,POS_FACEUP)~=0 then - Duel.BreakEffect() - Duel.Draw(tp,1,REASON_EFFECT) - end -end diff --git a/script/c76407432.lua b/script/c76407432.lua deleted file mode 100644 index 40bd25ef16..0000000000 --- a/script/c76407432.lua +++ /dev/null @@ -1,33 +0,0 @@ ---バスター・カウンター -function c76407432.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_CHAINING) - e1:SetCondition(c76407432.condition) - e1:SetTarget(c76407432.target) - e1:SetOperation(c76407432.activate) - c:RegisterEffect(e1) -end -function c76407432.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x104f) -end -function c76407432.condition(e,tp,eg,ep,ev,re,r,rp) - if not Duel.IsExistingMatchingCard(c76407432.cfilter,tp,LOCATION_MZONE,0,1,nil) then return false end - if not Duel.IsChainNegatable(ev) then return false end - return re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE) -end -function c76407432.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) - end -end -function c76407432.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateActivation(ev) - if re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(eg,REASON_EFFECT) - end -end diff --git a/script/c76419637.lua b/script/c76419637.lua deleted file mode 100644 index f6e790892b..0000000000 --- a/script/c76419637.lua +++ /dev/null @@ -1,61 +0,0 @@ ---CX 激烈華戦艦タオヤメ -function c76419637.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,4,4) - c:EnableReviveLimit() - --discard - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(76419637,0)) - e1:SetCategory(CATEGORY_HANDES) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCondition(c76419637.dccon) - e1:SetTarget(c76419637.dctg) - e1:SetOperation(c76419637.dcop) - c:RegisterEffect(e1) - --damage - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(76419637,1)) - e2:SetCategory(CATEGORY_DAMAGE) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,76419637) - e2:SetCondition(c76419637.damcon) - e2:SetCost(c76419637.damcost) - e2:SetTarget(c76419637.damtg) - e2:SetOperation(c76419637.damop) - c:RegisterEffect(e2) -end -function c76419637.dccon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp and Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>Duel.GetFieldGroupCount(tp,LOCATION_HAND,0) -end -function c76419637.dctg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(1) - Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,1-tp,1) -end -function c76419637.dcop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.DiscardHand(1-tp,nil,1,1,REASON_EFFECT+REASON_DISCARD) -end -function c76419637.damcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetOverlayGroup():IsExists(Card.IsCode,1,nil,40424929) -end -function c76419637.damcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c76419637.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local ct=Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,LOCATION_ONFIELD) - Duel.SetTargetPlayer(1-tp) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,ct*300) -end -function c76419637.damop(e,tp,eg,ep,ev,re,r,rp) - local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) - local ct=Duel.GetFieldGroupCount(p,LOCATION_ONFIELD,LOCATION_ONFIELD) - Duel.Damage(p,ct*300,REASON_EFFECT) -end diff --git a/script/c76436988.lua b/script/c76436988.lua deleted file mode 100644 index 864afb83d1..0000000000 --- a/script/c76436988.lua +++ /dev/null @@ -1,41 +0,0 @@ ---ギラギランサー -function c76436988.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c76436988.spcon) - c:RegisterEffect(e1) - --damage - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(76436988,0)) - e2:SetCategory(CATEGORY_DAMAGE) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_PHASE+PHASE_END) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetTarget(c76436988.damtg) - e2:SetOperation(c76436988.damop) - c:RegisterEffect(e2) -end -function c76436988.spcon(e,c) - if c==nil then return true end - return Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0)==0 - and Duel.GetFieldGroupCount(c:GetControler(),0,LOCATION_MZONE)>0 - and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 -end -function c76436988.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(500) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,tp,500) -end -function c76436988.damop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) - end -end diff --git a/script/c76442347.lua b/script/c76442347.lua deleted file mode 100644 index 2dab7c340d..0000000000 --- a/script/c76442347.lua +++ /dev/null @@ -1,47 +0,0 @@ ---子型ペンギン -function c76442347.initial_effect(c) - --flip effect - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_FLIP) - e1:SetOperation(c76442347.flipop) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(76442347,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetCondition(c76442347.spcon) - e2:SetTarget(c76442347.sptg) - e2:SetOperation(c76442347.spop) - c:RegisterEffect(e2) -end -function c76442347.flipop(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():RegisterFlagEffect(76442347,RESET_EVENT+0x57a0000,0,0) -end -function c76442347.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetFlagEffect(76442347)~=0 -end -function c76442347.filter(c,e,tp) - return c:IsSetCard(0x5a) and c:GetCode()~=76442347 - and (c:IsCanBeSpecialSummoned(e,0,tp,false,false) - or c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN)) -end -function c76442347.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c76442347.filter(chkc,e,tp) end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c76442347.filter,tp,LOCATION_GRAVE,0,1,1,e:GetHandler(),e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,g:GetCount(),0,0) -end -function c76442347.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then - local spos=0 - if tc:IsCanBeSpecialSummoned(e,0,tp,false,false) then spos=spos+POS_FACEUP_ATTACK end - if tc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN) then spos=spos+POS_FACEDOWN_DEFENCE end - if spos~=0 then Duel.SpecialSummon(tc,0,tp,tp,false,false,spos) end - end -end diff --git a/script/c76442616.lua b/script/c76442616.lua deleted file mode 100644 index df34b3f119..0000000000 --- a/script/c76442616.lua +++ /dev/null @@ -1,35 +0,0 @@ ---HERO'S ボンド -function c76442616.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c76442616.condition) - e1:SetTarget(c76442616.target) - e1:SetOperation(c76442616.activate) - c:RegisterEffect(e1) -end -function c76442616.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x8) -end -function c76442616.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c76442616.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) -end -function c76442616.filter(c,e,tp) - return c:IsLevelBelow(4) and c:IsSetCard(0x3008) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c76442616.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>1 - and Duel.IsExistingMatchingCard(c76442616.filter,tp,LOCATION_HAND,0,2,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_HAND) -end -function c76442616.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=1 then return end - local g=Duel.GetMatchingGroup(c76442616.filter,tp,LOCATION_HAND,0,nil,e,tp) - if g:GetCount()>=2 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=g:Select(tp,2,2,nil) - Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c76459806.lua b/script/c76459806.lua deleted file mode 100644 index 63eba6e441..0000000000 --- a/script/c76459806.lua +++ /dev/null @@ -1,33 +0,0 @@ ---ヴォルカニック・ロケット -function c76459806.initial_effect(c) - --search - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(76459806,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c76459806.tg) - e1:SetOperation(c76459806.op) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e2) - local e3=e1:Clone() - e3:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - c:RegisterEffect(e3) -end -function c76459806.filter(c) - return c:IsSetCard(0xb9) and c:IsAbleToHand() and not c:IsHasEffect(EFFECT_NECRO_VALLEY) -end -function c76459806.tg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c76459806.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE) -end -function c76459806.op(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c76459806.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c76473843.lua b/script/c76473843.lua deleted file mode 100644 index 167de9d49e..0000000000 --- a/script/c76473843.lua +++ /dev/null @@ -1,55 +0,0 @@ ---マジェスティックP -function c76473843.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --atk/def - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetRange(LOCATION_FZONE) - e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0xd0)) - e2:SetValue(300) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EFFECT_UPDATE_DEFENCE) - c:RegisterEffect(e3) - --spsummon - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(76473843,0)) - e4:SetCategory(CATEGORY_SPECIAL_SUMMON) - e4:SetType(EFFECT_TYPE_IGNITION) - e4:SetRange(LOCATION_FZONE) - e4:SetCountLimit(1,76473843) - e4:SetCost(c76473843.spcost) - e4:SetTarget(c76473843.sptg) - e4:SetOperation(c76473843.spop) - c:RegisterEffect(e4) -end -function c76473843.cfilter(c) - return c:IsRace(RACE_SPELLCASTER) and c:IsAttribute(ATTRIBUTE_WIND) -end -function c76473843.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,c76473843.cfilter,1,nil) end - local g=Duel.SelectReleaseGroup(tp,c76473843.cfilter,1,1,nil) - Duel.Release(g,REASON_COST) -end -function c76473843.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsExistingMatchingCard(c76473843.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c76473843.spfilter(c,e,tp) - return c:IsSetCard(0xd0) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c76473843.spop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) or Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c76473843.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c76515293.lua b/script/c76515293.lua deleted file mode 100644 index 64b5309555..0000000000 --- a/script/c76515293.lua +++ /dev/null @@ -1,40 +0,0 @@ ---心鎮壷 -function c76515293.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_END_PHASE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c76515293.target) - e1:SetOperation(c76515293.operation) - c:RegisterEffect(e1) -end -function c76515293.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_SZONE) and chkc:IsFacedown() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFacedown,tp,LOCATION_SZONE,LOCATION_SZONE,2,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEDOWN) - Duel.SelectTarget(tp,Card.IsFacedown,tp,LOCATION_SZONE,LOCATION_SZONE,2,2,e:GetHandler()) -end -function c76515293.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local tc=g:GetFirst() - while tc do - if c:IsRelateToEffect(e) and tc:IsFacedown() and tc:IsRelateToEffect(e) then - c:SetCardTarget(tc) - e:SetLabelObject(tc) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_TRIGGER) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetCondition(c76515293.rcon) - e1:SetValue(1) - tc:RegisterEffect(e1) - end - tc=g:GetNext() - end -end -function c76515293.rcon(e) - return e:GetOwner():IsHasCardTarget(e:GetHandler()) -end diff --git a/script/c76520646.lua b/script/c76520646.lua deleted file mode 100644 index 76c6db6738..0000000000 --- a/script/c76520646.lua +++ /dev/null @@ -1,28 +0,0 @@ ---インフィニティ・ダーク -function c76520646.initial_effect(c) - aux.EnableDualAttribute(c) - --pos - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(76520646,0)) - e1:SetCategory(CATEGORY_POSITION) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetCondition(aux.IsDualState) - e1:SetTarget(c76520646.postg) - e1:SetOperation(c76520646.posop) - c:RegisterEffect(e1) -end -function c76520646.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE) - local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0) -end -function c76520646.posop(e,tp,eg,ep,ev,re,r,rp,chk) - local tc=Duel.GetFirstTarget() - if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) then - Duel.ChangePosition(tc,POS_FACEUP_DEFENCE,0,POS_FACEUP_ATTACK,0) - end -end diff --git a/script/c7653207.lua b/script/c7653207.lua deleted file mode 100644 index c47108b120..0000000000 --- a/script/c7653207.lua +++ /dev/null @@ -1,32 +0,0 @@ ---アクア・ジェット -function c7653207.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c7653207.target) - e1:SetOperation(c7653207.activate) - c:RegisterEffect(e1) -end -function c7653207.filter(c) - return c:IsFaceup() and c:IsRace(RACE_FISH+RACE_SEASERPENT+RACE_AQUA) -end -function c7653207.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c7653207.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c7653207.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c7653207.filter,tp,LOCATION_MZONE,0,1,1,nil) -end -function c7653207.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(1000) - tc:RegisterEffect(e1) - end -end diff --git a/script/c76532077.lua b/script/c76532077.lua deleted file mode 100644 index 97b0a0c4be..0000000000 --- a/script/c76532077.lua +++ /dev/null @@ -1,54 +0,0 @@ ---底なし流砂 -function c76532077.initial_effect(c) - --activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_END_PHASE) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(76532077,0)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_PHASE+PHASE_END) - e2:SetRange(LOCATION_SZONE) - e2:SetCountLimit(1) - e2:SetCondition(c76532077.descon) - e2:SetTarget(c76532077.destg) - e2:SetOperation(c76532077.desop) - c:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e3:SetCode(EVENT_PHASE+PHASE_STANDBY) - e3:SetRange(LOCATION_SZONE) - e3:SetCountLimit(1) - e3:SetCondition(c76532077.descon2) - e3:SetOperation(c76532077.desop2) - c:RegisterEffect(e3) -end -function c76532077.descon(e,tp,eg,ep,ev,re,r,rp) - return tp~=Duel.GetTurnPlayer() -end -function c76532077.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - if g:GetCount()>0 then - local tg=g:GetMaxGroup(Card.GetAttack) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,tg,tg:GetCount(),0,0) - end -end -function c76532077.desop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - if g:GetCount()>0 then - local tg=g:GetMaxGroup(Card.GetAttack) - Duel.Destroy(tg,REASON_EFFECT) - end -end -function c76532077.descon2(e,tp,eg,ep,ev,re,r,rp) - return tp==Duel.GetTurnPlayer() and Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)<=4 -end -function c76532077.desop2(e,tp,eg,ep,ev,re,r,rp) - Duel.Destroy(e:GetHandler(),REASON_EFFECT) -end diff --git a/script/c76539047.lua b/script/c76539047.lua deleted file mode 100644 index d82d963655..0000000000 --- a/script/c76539047.lua +++ /dev/null @@ -1,33 +0,0 @@ ---ポイズン・ファング -function c76539047.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(76539047,0)) - e2:SetCategory(CATEGORY_DAMAGE) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetRange(LOCATION_SZONE) - e2:SetCode(EVENT_BATTLE_DAMAGE) - e2:SetCondition(c76539047.damcon) - e2:SetTarget(c76539047.damtg) - e2:SetOperation(c76539047.damop) - c:RegisterEffect(e2) -end -function c76539047.damcon(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp and eg:GetFirst():IsRace(RACE_BEAST) -end -function c76539047.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(500) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,500) -end -function c76539047.damop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c76543119.lua b/script/c76543119.lua deleted file mode 100644 index 11d2609772..0000000000 --- a/script/c76543119.lua +++ /dev/null @@ -1,62 +0,0 @@ ---ギミック・パペット-死の木馬 -function c76543119.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(76543119,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_NO_TURN_RESET) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetTarget(c76543119.target) - e1:SetOperation(c76543119.operation) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(76543119,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetCondition(c76543119.spcon) - e2:SetTarget(c76543119.sptg) - e2:SetOperation(c76543119.spop) - c:RegisterEffect(e2) -end -function c76543119.filter(c) - return c:IsFaceup() and c:IsSetCard(0x83) and c:IsDestructable() -end -function c76543119.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c76543119.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c76543119.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c76543119.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c76543119.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end -function c76543119.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) -end -function c76543119.spfilter(c,e,tp) - return c:IsSetCard(0x83) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c76543119.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c76543119.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c76543119.spop(e,tp,eg,ep,ev,re,r,rp) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ft<=0 then return end - if ft>2 then ft=2 end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c76543119.spfilter,tp,LOCATION_HAND,0,1,ft,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c76547525.lua b/script/c76547525.lua deleted file mode 100644 index 866747595b..0000000000 --- a/script/c76547525.lua +++ /dev/null @@ -1,47 +0,0 @@ ---レッド・ワイバーン -function c76547525.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1) - c:EnableReviveLimit() - --Destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(76547525,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetProperty(EFFECT_FLAG_NO_TURN_RESET) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c76547525.descon) - e1:SetTarget(c76547525.destg) - e1:SetOperation(c76547525.desop) - c:RegisterEffect(e1) -end -function c76547525.cfilter(c,atk) - return c:IsFaceup() and c:GetAttack()>atk -end -function c76547525.descon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_SYNCHRO - and Duel.IsExistingMatchingCard(c76547525.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,e:GetHandler():GetAttack()) -end -function c76547525.desfilter(c) - return c:IsFaceup() and c:IsDestructable() -end -function c76547525.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c76547525.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - local g=Duel.GetMatchingGroup(c76547525.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - local tg=g:GetMaxGroup(Card.GetAttack) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,tg,1,0,0) -end -function c76547525.desop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c76547525.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - if g:GetCount()>0 then - local tg=g:GetMaxGroup(Card.GetAttack) - if tg:GetCount()>1 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local sg=tg:Select(tp,1,1,nil) - Duel.HintSelection(sg) - Duel.Destroy(sg,REASON_EFFECT) - else Duel.Destroy(tg,REASON_EFFECT) end - end -end diff --git a/script/c76573247.lua b/script/c76573247.lua deleted file mode 100644 index 934003c9ad..0000000000 --- a/script/c76573247.lua +++ /dev/null @@ -1,46 +0,0 @@ ---エーリアン・ベーダー -function c76573247.initial_effect(c) - --counter - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(76573247,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCondition(c76573247.seqcon) - e1:SetOperation(c76573247.seqop) - c:RegisterEffect(e1) - --direct attack - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DIRECT_ATTACK) - e2:SetCondition(c76573247.dircon) - c:RegisterEffect(e2) -end -function c76573247.seqcon(e,tp,eg,ep,ev,re,r,rp) - local seq=e:GetHandler():GetSequence() - return (seq>0 and Duel.CheckLocation(tp,LOCATION_MZONE,seq-1)) - or (seq<4 and Duel.CheckLocation(tp,LOCATION_MZONE,seq+1)) -end -function c76573247.seqop(e,tp,eg,ep,ev,re,r,rp) - local seq=e:GetHandler():GetSequence() - if (seq>0 and Duel.CheckLocation(tp,LOCATION_MZONE,seq-1)) - or (seq<4 and Duel.CheckLocation(tp,LOCATION_MZONE,seq+1)) then - local flag=0 - if seq>0 and Duel.CheckLocation(tp,LOCATION_MZONE,seq-1) then flag=bit.bor(flag,bit.lshift(0x1,seq-1)) end - if seq<4 and Duel.CheckLocation(tp,LOCATION_MZONE,seq+1) then flag=bit.bor(flag,bit.lshift(0x1,seq+1)) end - flag=bit.bxor(flag,0xff) - local s=Duel.SelectDisableField(tp,1,LOCATION_MZONE,0,flag) - local nseq=0 - if s==1 then nseq=0 - elseif s==2 then nseq=1 - elseif s==4 then nseq=2 - elseif s==8 then nseq=3 - else nseq=4 end - Duel.MoveSequence(e:GetHandler(),nseq) - end -end -function c76573247.dircon(e) - local p=1-e:GetHandlerPlayer() - local seq=4-e:GetHandler():GetSequence() - return Duel.GetFieldCard(p,LOCATION_MZONE,seq)==nil and Duel.GetFieldCard(p,LOCATION_SZONE,seq)==nil -end diff --git a/script/c76589815.lua b/script/c76589815.lua deleted file mode 100644 index 3bff031fde..0000000000 --- a/script/c76589815.lua +++ /dev/null @@ -1,79 +0,0 @@ ---BK チート・コミッショナー -function c76589815.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,3,2) - c:EnableReviveLimit() - --must attack - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(0,LOCATION_MZONE) - e1:SetCode(EFFECT_MUST_ATTACK) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EFFECT_CANNOT_EP) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetTargetRange(0,1) - e2:SetCondition(c76589815.becon) - c:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_CANNOT_BE_BATTLE_TARGET) - e3:SetCondition(c76589815.atcon) - e3:SetValue(1) - c:RegisterEffect(e3) - --atk - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(76589815,0)) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_ATTACK_ANNOUNCE) - e3:SetRange(LOCATION_MZONE) - e3:SetCondition(c76589815.cfcon) - e3:SetCost(c76589815.cfcost) - e3:SetTarget(c76589815.cftg) - e3:SetOperation(c76589815.cfop) - c:RegisterEffect(e3) -end -function c76589815.becon(e) - return Duel.IsExistingMatchingCard(Card.IsAttackable,e:GetHandlerPlayer(),0,LOCATION_MZONE,1,nil) -end -function c76589815.atfilter(c) - return c:IsFaceup() and c:IsSetCard(0x84) -end -function c76589815.atcon(e) - return Duel.IsExistingMatchingCard(c76589815.atfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,e:GetHandler()) -end -function c76589815.cfcon(e,tp,eg,ep,ev,re,r,rp) - local a=Duel.GetAttacker() - local at=Duel.GetAttackTarget() - return (a:IsControler(tp) and a~=e:GetHandler() and a:IsSetCard(0x84)) - or (at and at:IsControler(tp) and at:IsFaceup() and at~=e:GetHandler() and at:IsSetCard(0x84)) -end -function c76589815.cfcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,2,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,2,2,REASON_COST) -end -function c76589815.cftg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0 - and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 end -end -function c76589815.cffilter(c) - return c:IsType(TYPE_SPELL) and c:IsSSetable() -end -function c76589815.cfop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND) - if g:GetCount()==0 then return end - Duel.ConfirmCards(tp,g) - if Duel.GetLocationCount(tp,LOCATION_SZONE)>0 then - local sg=g:Filter(c76589815.cffilter,nil) - if sg:GetCount()>0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) - local setg=sg:Select(tp,1,1,nil) - Duel.SSet(tp,setg:GetFirst()) - Duel.ConfirmCards(1-tp,setg) - end - end - Duel.ShuffleHand(1-tp) -end diff --git a/script/c76614003.lua b/script/c76614003.lua deleted file mode 100644 index 3498d0d2ff..0000000000 --- a/script/c76614003.lua +++ /dev/null @@ -1,23 +0,0 @@ ---ダーク・リペアラー -function c76614003.initial_effect(c) - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(76614003,0)) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCondition(c76614003.condition) - e1:SetOperation(c76614003.operation) - c:RegisterEffect(e1) -end -function c76614003.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) and e:GetHandler():GetPreviousControler()==tp -end -function c76614003.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)==0 then return end - local g=Duel.GetDecktopGroup(tp,1) - Duel.ConfirmCards(tp,g) - local tc=g:GetFirst() - local opt=Duel.SelectOption(tp,aux.Stringid(76614003,1),aux.Stringid(76614003,2)) - if opt==1 then - Duel.MoveSequence(tc,opt) - end -end diff --git a/script/c76614340.lua b/script/c76614340.lua deleted file mode 100644 index 50c3cc3a03..0000000000 --- a/script/c76614340.lua +++ /dev/null @@ -1,50 +0,0 @@ ---ジェムナイト・ルビーズ -function c76614340.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcCodeFun(c,91731841,aux.FilterBoolFunction(Card.IsSetCard,0x1047),1,false,false) - --spsummon condition - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e2:SetCode(EFFECT_SPSUMMON_CONDITION) - e2:SetValue(c76614340.splimit) - c:RegisterEffect(e2) - --atkup - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(76614340,0)) - e3:SetCategory(CATEGORY_ATKCHANGE) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1) - e3:SetCost(c76614340.atkcost) - e3:SetOperation(c76614340.atkop) - c:RegisterEffect(e3) - --pierce - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetCode(EFFECT_PIERCE) - c:RegisterEffect(e4) -end -function c76614340.splimit(e,se,sp,st) - return not e:GetHandler():IsLocation(LOCATION_EXTRA) or bit.band(st,SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION -end -function c76614340.costfilter(c) - return c:IsFaceup() and c:IsSetCard(0x47) -end -function c76614340.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,c76614340.costfilter,1,e:GetHandler()) end - local rg=Duel.SelectReleaseGroup(tp,c76614340.costfilter,1,1,e:GetHandler()) - e:SetLabel(rg:GetFirst():GetAttack()) - Duel.Release(rg,REASON_COST) -end -function c76614340.atkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFacedown() or not c:IsRelateToEffect(e) then return end - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(e:GetLabel()) - e1:SetReset(RESET_EVENT+0x1ff0000+RESET_PHASE+PHASE_END) - c:RegisterEffect(e1) -end diff --git a/script/c76641981.lua b/script/c76641981.lua deleted file mode 100644 index 757a335ebc..0000000000 --- a/script/c76641981.lua +++ /dev/null @@ -1,38 +0,0 @@ ---TG1-EM1 -function c76641981.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_CONTROL) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,0x1e0) - e1:SetTarget(c76641981.target) - e1:SetOperation(c76641981.activate) - c:RegisterEffect(e1) -end -function c76641981.filter1(c) - return c:IsFaceup() and c:IsSetCard(0x27) and c:IsAbleToChangeControler() -end -function c76641981.filter2(c) - return c:IsAbleToChangeControler() -end -function c76641981.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - if chk==0 then return Duel.IsExistingTarget(c76641981.filter2,tp,0,LOCATION_MZONE,1,nil) - and Duel.IsExistingTarget(c76641981.filter1,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) - local g2=Duel.SelectTarget(tp,c76641981.filter2,tp,0,LOCATION_MZONE,1,1,nil) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) - local g1=Duel.SelectTarget(tp,c76641981.filter1,tp,LOCATION_MZONE,0,1,1,nil) - g1:Merge(g2) - Duel.SetOperationInfo(0,CATEGORY_CONTROL,g1,2,0,0) -end -function c76641981.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local a=g:GetFirst() - local b=g:GetNext() - if a:IsRelateToEffect(e) and b:IsRelateToEffect(e) then - Duel.SwapControl(a,b) - end -end diff --git a/script/c76650663.lua b/script/c76650663.lua deleted file mode 100644 index 75816bc583..0000000000 --- a/script/c76650663.lua +++ /dev/null @@ -1,32 +0,0 @@ ---A・O・J ブラインド・サッカー -function c76650663.initial_effect(c) - --Disable - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(76650663,0)) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_BATTLED) - e1:SetCondition(c76650663.condition) - e1:SetOperation(c76650663.operation) - c:RegisterEffect(e1) -end -function c76650663.condition(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local a=Duel.GetAttacker() - if a==c then a=Duel.GetAttackTarget() end - e:SetLabelObject(a) - return a and a:IsAttribute(ATTRIBUTE_LIGHT) and a:IsRelateToBattle() -end -function c76650663.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetLabelObject() - if tc:IsFacedown() or not tc:IsRelateToBattle() then return end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0x57a0000) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+0x57a0000) - tc:RegisterEffect(e2) -end diff --git a/script/c76660409.lua b/script/c76660409.lua deleted file mode 100644 index 5fa27c88a4..0000000000 --- a/script/c76660409.lua +++ /dev/null @@ -1,38 +0,0 @@ ---ペンデュラム・バック -function c76660409.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCondition(c76660409.condition) - e1:SetTarget(c76660409.target) - e1:SetOperation(c76660409.activate) - c:RegisterEffect(e1) -end -function c76660409.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetFieldCard(tp,LOCATION_SZONE,6) and Duel.GetFieldCard(tp,LOCATION_SZONE,7) -end -function c76660409.filter(c,lsc,rsc) - local lv=c:GetLevel() - return lv>lsc and lvrsc then lsc,rsc=rsc,lsc end - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c76660409.filter(chkc,lsc,rsc) end - if chk==0 then return Duel.IsExistingTarget(c76660409.filter,tp,LOCATION_GRAVE,0,2,nil,lsc,rsc) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c76660409.filter,tp,LOCATION_GRAVE,0,2,2,nil,lsc,rsc) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,2,0,0) -end -function c76660409.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local sg=g:Filter(Card.IsRelateToEffect,nil,e) - if sg:GetCount()==2 then - Duel.SendtoHand(sg,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,sg) - end -end diff --git a/script/c76683171.lua b/script/c76683171.lua deleted file mode 100644 index 5ee7308095..0000000000 --- a/script/c76683171.lua +++ /dev/null @@ -1,28 +0,0 @@ ---ワーム・アグリィ -function c76683171.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(76683171,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_BE_MATERIAL) - e1:SetCondition(c76683171.spcon) - e1:SetTarget(c76683171.sptg) - e1:SetOperation(c76683171.spop) - c:RegisterEffect(e1) -end -function c76683171.spcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsLocation(LOCATION_GRAVE) and r==REASON_SUMMON and c:GetReasonCard():IsSetCard(0x3e) -end -function c76683171.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK,1-tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c76683171.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,1-tp,false,false,POS_FACEUP_ATTACK) - end -end diff --git a/script/c76714458.lua b/script/c76714458.lua deleted file mode 100644 index 761e373fde..0000000000 --- a/script/c76714458.lua +++ /dev/null @@ -1,31 +0,0 @@ ---痛魂の呪術 -function c76714458.initial_effect(c) - --reflect - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_CHAINING) - e1:SetCondition(c76714458.condition) - e1:SetOperation(c76714458.operation) - c:RegisterEffect(e1) -end -function c76714458.condition(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp and aux.damcon1(e,tp,eg,ep,ev,re,r,rp) -end -function c76714458.operation(e,tp,eg,ep,ev,re,r,rp) - local cid=Duel.GetChainInfo(ev,CHAININFO_CHAIN_ID) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_REFLECT_DAMAGE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetTargetRange(1,0) - e1:SetLabel(cid) - e1:SetValue(c76714458.refcon) - e1:SetReset(RESET_CHAIN) - Duel.RegisterEffect(e1,tp) -end -function c76714458.refcon(e,re,val,r,rp,rc) - local cc=Duel.GetCurrentChain() - if cc==0 or bit.band(r,REASON_EFFECT)==0 then return end - local cid=Duel.GetChainInfo(0,CHAININFO_CHAIN_ID) - return cid==e:GetLabel() -end diff --git a/script/c76721030.lua b/script/c76721030.lua deleted file mode 100644 index 11b1a92408..0000000000 --- a/script/c76721030.lua +++ /dev/null @@ -1,27 +0,0 @@ ---暴君の暴言 -function c76721030.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c76721030.cost) - c:RegisterEffect(e1) - --cannot trigger - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetCode(EFFECT_CANNOT_ACTIVATE) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(1,1) - e2:SetValue(c76721030.aclimit) - c:RegisterEffect(e2) -end -function c76721030.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,nil,2,nil) end - local rg=Duel.SelectReleaseGroup(tp,nil,2,2,nil) - Duel.Release(rg,REASON_COST) -end -function c76721030.aclimit(e,re,tp) - local loc=re:GetActivateLocation() - return (loc==LOCATION_MZONE or loc==LOCATION_HAND) and re:IsActiveType(TYPE_MONSTER) and not re:GetHandler():IsImmuneToEffect(e) -end diff --git a/script/c7672244.lua b/script/c7672244.lua deleted file mode 100644 index 810e004259..0000000000 --- a/script/c7672244.lua +++ /dev/null @@ -1,30 +0,0 @@ ---シエンの間者 -function c7672244.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_CONTROL) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c7672244.target) - e1:SetOperation(c7672244.activate) - c:RegisterEffect(e1) -end -function c7672244.filter(c) - return c:IsControlerCanBeChanged() and c:IsFaceup() -end -function c7672244.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:GetLocation()==LOCATION_MZONE and chkc:GetControler()==tp and c7672244.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c7672244.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) - local g=Duel.SelectTarget(tp,c7672244.filter,tp,LOCATION_MZONE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0) -end -function c7672244.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() and not Duel.GetControl(tc,1-tp,PHASE_END,1) then - if not tc:IsImmuneToEffect(e) and tc:IsAbleToChangeControler() then - Duel.Destroy(tc,REASON_EFFECT) - end - end -end diff --git a/script/c76751255.lua b/script/c76751255.lua deleted file mode 100644 index c90239867d..0000000000 --- a/script/c76751255.lua +++ /dev/null @@ -1,41 +0,0 @@ ---イグナイト・リロード -function c76751255.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,76751255+EFFECT_COUNT_CODE_OATH) - e1:SetTarget(c76751255.target) - e1:SetOperation(c76751255.activate) - c:RegisterEffect(e1) -end -function c76751255.filter(c) - return c:IsType(TYPE_PENDULUM) and c:IsAbleToDeck() and not c:IsPublic() -end -function c76751255.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp) - and Duel.IsExistingMatchingCard(c76751255.filter,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.SetTargetPlayer(tp) - Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_HAND) -end -function c76751255.activate(e,tp,eg,ep,ev,re,r,rp) - local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) - Duel.Hint(HINT_SELECTMSG,p,HINTMSG_TODECK) - local g=Duel.SelectMatchingCard(p,c76751255.filter,p,LOCATION_HAND,0,1,63,nil) - if g:GetCount()>0 then - Duel.ConfirmCards(1-p,g) - local ct=Duel.SendtoDeck(g,nil,2,REASON_EFFECT) - Duel.ShuffleDeck(p) - Duel.BreakEffect() - Duel.Draw(p,ct+1,REASON_EFFECT) - end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_DRAW) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+RESET_END) - Duel.RegisterEffect(e1,tp) -end diff --git a/script/c76754619.lua b/script/c76754619.lua deleted file mode 100644 index 953c8509c0..0000000000 --- a/script/c76754619.lua +++ /dev/null @@ -1,49 +0,0 @@ ---ピラミッドパワー -function c76754619.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetCondition(c76754619.condition) - e1:SetTarget(c76754619.target) - e1:SetOperation(c76754619.operation) - c:RegisterEffect(e1) -end -function c76754619.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end -function c76754619.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end - local op=Duel.SelectOption(tp,aux.Stringid(76754619,0),aux.Stringid(76754619,1)) - e:SetLabel(op) -end -function c76754619.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil) - if g:GetCount()==0 then return end - if e:GetLabel()==0 then - local sc=g:GetFirst() - while sc do - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - e1:SetValue(200) - sc:RegisterEffect(e1) - sc=g:GetNext() - end - else - local sc=g:GetFirst() - while sc do - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_DEFENCE) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - e1:SetValue(500) - sc:RegisterEffect(e1) - sc=g:GetNext() - end - end -end diff --git a/script/c76763417.lua b/script/c76763417.lua deleted file mode 100644 index bec11dd94d..0000000000 --- a/script/c76763417.lua +++ /dev/null @@ -1,35 +0,0 @@ ---サイバー・ジムナティクス -function c76763417.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(76763417,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCost(c76763417.descost) - e1:SetTarget(c76763417.destg) - e1:SetOperation(c76763417.desop) - c:RegisterEffect(e1) -end -function c76763417.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) -end -function c76763417.filter(c) - return c:IsPosition(POS_FACEUP_ATTACK) and c:IsDestructable() -end -function c76763417.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and c76763417.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c76763417.filter,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c76763417.filter,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c76763417.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsPosition(POS_FACEUP_ATTACK) and tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c76766706.lua b/script/c76766706.lua deleted file mode 100644 index f3ed93d8cf..0000000000 --- a/script/c76766706.lua +++ /dev/null @@ -1,38 +0,0 @@ ---混沌の種 -function c76766706.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,76766706+EFFECT_COUNT_CODE_OATH) - e1:SetCondition(c76766706.condition) - e1:SetTarget(c76766706.target) - e1:SetOperation(c76766706.activate) - c:RegisterEffect(e1) -end -function c76766706.cfilter(c,att) - return c:IsFaceup() and c:IsAttribute(att) -end -function c76766706.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c76766706.cfilter,tp,LOCATION_MZONE,0,1,nil,ATTRIBUTE_LIGHT) - and Duel.IsExistingMatchingCard(c76766706.cfilter,tp,LOCATION_MZONE,0,1,nil,ATTRIBUTE_DARK) -end -function c76766706.filter(c) - return c:IsFaceup() and c:IsRace(RACE_WARRIOR) and c:IsAttribute(ATTRIBUTE_LIGHT+ATTRIBUTE_DARK) and c:IsAbleToHand() -end -function c76766706.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_REMOVED) and c76766706.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c76766706.filter,tp,LOCATION_REMOVED,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c76766706.filter,tp,LOCATION_REMOVED,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c76766706.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end diff --git a/script/c76774528.lua b/script/c76774528.lua deleted file mode 100644 index 2538417229..0000000000 --- a/script/c76774528.lua +++ /dev/null @@ -1,67 +0,0 @@ ---スクラップ・ドラゴン -function c76774528.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1) - c:EnableReviveLimit() - --Destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(76774528,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_MZONE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetTarget(c76774528.destg) - e1:SetOperation(c76774528.desop) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(76774528,1)) - e2:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetCondition(c76774528.spcon) - e2:SetTarget(c76774528.sptg) - e2:SetOperation(c76774528.spop) - c:RegisterEffect(e2) -end -function c76774528.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,LOCATION_ONFIELD,0,1,nil) - and Duel.IsExistingTarget(Card.IsDestructable,tp,0,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g1=Duel.SelectTarget(tp,Card.IsDestructable,tp,LOCATION_ONFIELD,0,1,1,nil) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g2=Duel.SelectTarget(tp,Card.IsDestructable,tp,0,LOCATION_ONFIELD,1,1,nil) - g1:Merge(g2) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g1,2,0,0) -end -function c76774528.desop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local tg=g:Filter(Card.IsRelateToEffect,nil,e) - if tg:GetCount()>0 then - Duel.Destroy(tg,REASON_EFFECT) - end -end -function c76774528.spcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local crp=c:GetReasonPlayer() - return c:IsReason(REASON_DESTROY) and c:GetPreviousControler()==tp and tp~=crp and crp~=PLAYER_NONE -end -function c76774528.spfilter(c,e,tp) - return c:IsSetCard(0x24) and not c:IsType(TYPE_SYNCHRO) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c76774528.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c76774528.spfilter(chkc,e,tp) end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c76774528.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,g:GetCount(),0,0) -end -function c76774528.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c76775123.lua b/script/c76775123.lua deleted file mode 100644 index 98a2fb466b..0000000000 --- a/script/c76775123.lua +++ /dev/null @@ -1,32 +0,0 @@ ---パトロール・ロボ -function c76775123.initial_effect(c) - --confirm - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(76775123,0)) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCondition(c76775123.condition) - e1:SetTarget(c76775123.target) - e1:SetOperation(c76775123.operation) - c:RegisterEffect(e1) -end -function c76775123.condition(e,tp,eg,ep,ev,re,r,rp) - return tp==Duel.GetTurnPlayer() -end -function c76775123.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() and chkc:IsFacedown() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFacedown,tp,0,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEDOWN) - Duel.SelectTarget(tp,Card.IsFacedown,tp,0,LOCATION_ONFIELD,1,1,nil) -end -function c76775123.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFacedown() or not c:IsRelateToEffect(e) then return end - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) and tc:IsFacedown() then - Duel.ConfirmCards(tp,tc) - end -end diff --git a/script/c76792184.lua b/script/c76792184.lua deleted file mode 100644 index 50471bed8e..0000000000 --- a/script/c76792184.lua +++ /dev/null @@ -1,4 +0,0 @@ ---カオス-黒魔術の儀式 -function c76792184.initial_effect(c) - aux.AddRitualProcGreater(c,aux.FilterBoolFunction(Card.IsCode,30208479)) -end diff --git a/script/c76806714.lua b/script/c76806714.lua deleted file mode 100644 index 72daddb8ca..0000000000 --- a/script/c76806714.lua +++ /dev/null @@ -1,4 +0,0 @@ ---亀の誓い -function c76806714.initial_effect(c) - aux.AddRitualProcGreater(c,aux.FilterBoolFunction(Card.IsCode,91782219)) -end diff --git a/script/c76848240.lua b/script/c76848240.lua deleted file mode 100644 index fd2d47f6e3..0000000000 --- a/script/c76848240.lua +++ /dev/null @@ -1,39 +0,0 @@ ---絶対不可侵領域 -function c76848240.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(TIMING_STANDBY_PHASE) - e1:SetCondition(c76848240.condition) - e1:SetCost(c76848240.cost) - e1:SetOperation(c76848240.operation) - c:RegisterEffect(e1) -end -function c76848240.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()==PHASE_STANDBY and Duel.GetTurnPlayer()==tp -end -function c76848240.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) -end -function c76848240.operation(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_SUMMON) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetTargetRange(0,1) - e1:SetReset(RESET_PHASE+PHASE_END,2) - e1:SetCondition(c76848240.efcon) - e1:SetLabel(Duel.GetTurnCount()) - Duel.RegisterEffect(e1,tp) - local e2=e1:Clone() - e2:SetCode(EFFECT_CANNOT_MSET) - Duel.RegisterEffect(e2,tp) - local e3=e1:Clone() - e3:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - Duel.RegisterEffect(e3,tp) -end -function c76848240.efcon(e) - return Duel.GetTurnCount()~=e:GetLabel() -end diff --git a/script/c76862289.lua b/script/c76862289.lua deleted file mode 100644 index 682704e504..0000000000 --- a/script/c76862289.lua +++ /dev/null @@ -1,84 +0,0 @@ ---八俣大蛇 -function c76862289.initial_effect(c) - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(aux.FALSE) - c:RegisterEffect(e1) - --summon,flip - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetCode(EVENT_SUMMON_SUCCESS) - e2:SetOperation(c76862289.retreg) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EVENT_FLIP) - c:RegisterEffect(e3) - --draw - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(76862289,1)) - e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e4:SetCode(EVENT_BATTLE_DAMAGE) - e4:SetCondition(c76862289.drcon) - e4:SetTarget(c76862289.drtg) - e4:SetOperation(c76862289.drop) - c:RegisterEffect(e4) -end -function c76862289.retreg(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - --to hand - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetDescription(aux.Stringid(76862289,0)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetReset(RESET_EVENT+0x1ee0000+RESET_PHASE+PHASE_END) - e1:SetCondition(c76862289.retcon) - e1:SetTarget(c76862289.rettg) - e1:SetOperation(c76862289.retop) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - c:RegisterEffect(e2) -end -function c76862289.retcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsHasEffect(EFFECT_SPIRIT_DONOT_RETURN) then return false end - if e:IsHasType(EFFECT_TYPE_TRIGGER_F) then - return not c:IsHasEffect(EFFECT_SPIRIT_MAYNOT_RETURN) - else return c:IsHasEffect(EFFECT_SPIRIT_MAYNOT_RETURN) end -end -function c76862289.rettg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0) -end -function c76862289.retop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - Duel.SendtoHand(c,nil,REASON_EFFECT) - end -end -function c76862289.drcon(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp -end -function c76862289.drtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(tp) - local ht=Duel.GetFieldGroupCount(tp,LOCATION_HAND,0) - if ht<5 then - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,5-ht) - end -end -function c76862289.drop(e,tp,eg,ep,ev,re,r,rp) - local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) - local ht=Duel.GetFieldGroupCount(p,LOCATION_HAND,0) - if ht<5 then - Duel.Draw(p,5-ht,REASON_EFFECT) - end -end diff --git a/script/c76865611.lua b/script/c76865611.lua deleted file mode 100644 index 0c56f93220..0000000000 --- a/script/c76865611.lua +++ /dev/null @@ -1,53 +0,0 @@ ---D・ライトン -function c76865611.initial_effect(c) - --atk - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_REFLECT_DAMAGE) - e1:SetRange(LOCATION_MZONE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCondition(c76865611.cona) - e1:SetTargetRange(1,0) - e1:SetValue(c76865611.refval) - c:RegisterEffect(e1) - --def - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetCode(EVENT_LEAVE_FIELD_P) - e2:SetOperation(c76865611.check) - c:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(76865611,0)) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e3:SetCode(EVENT_BATTLE_DESTROYED) - e3:SetCondition(c76865611.cond) - e3:SetOperation(c76865611.opd) - e3:SetLabelObject(e2) - c:RegisterEffect(e3) -end -function c76865611.cona(e) - return e:GetHandler():IsAttackPos() -end -function c76865611.refval(e,re,val,r,rp,rc) - return rp~=e:GetHandlerPlayer() and bit.band(r,REASON_EFFECT)~=0 -end -function c76865611.check(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsDisabled() and c:IsDefencePos() then e:SetLabel(1) - else e:SetLabel(0) end -end -function c76865611.cond(e,tp,eg,ep,ev,re,r,rp) - return e:GetLabelObject():GetLabel()==1 - and e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) -end -function c76865611.opd(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_AVOID_BATTLE_DAMAGE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetTargetRange(1,0) - e1:SetValue(1) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) -end diff --git a/script/c76891401.lua b/script/c76891401.lua deleted file mode 100644 index 580aae8b5c..0000000000 --- a/script/c76891401.lua +++ /dev/null @@ -1,34 +0,0 @@ ---神海竜ギシルノドン -function c76891401.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure2(c,nil,aux.NonTuner(c76891401.synfilter)) - c:EnableReviveLimit() - --atk change - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(76891401,0)) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c76891401.atkcon) - e1:SetOperation(c76891401.atkop) - c:RegisterEffect(e1) -end -function c76891401.synfilter(c) - return c:GetLevel()==3 -end -function c76891401.filter(c) - return c:IsLevelBelow(3) and c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousPosition(POS_FACEUP) -end -function c76891401.atkcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c76891401.filter,1,nil) -end -function c76891401.atkop(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e1:SetValue(3000) - c:RegisterEffect(e1) -end diff --git a/script/c76895648.lua b/script/c76895648.lua deleted file mode 100644 index 557bad4ce8..0000000000 --- a/script/c76895648.lua +++ /dev/null @@ -1,46 +0,0 @@ ---デンジャラスマシン TYPE-6 -function c76895648.initial_effect(c) - --activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --dice - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(76895648,0)) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetCategory(CATEGORY_ATKCHANGE) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) - e2:SetRange(LOCATION_SZONE) - e2:SetCountLimit(1) - e2:SetCondition(c76895648.condition) - e2:SetTarget(c76895648.target) - e2:SetOperation(c76895648.operation) - c:RegisterEffect(e2) -end -function c76895648.condition(e,tp,eg,ep,ev,re,r,rp) - return tp==Duel.GetTurnPlayer() -end -function c76895648.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DICE,nil,0,tp,1) -end -function c76895648.operation(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local dice=Duel.TossDice(tp,1) - if dice==1 then - Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT+REASON_DISCARD) - elseif dice==2 then - Duel.DiscardHand(1-tp,nil,1,1,REASON_EFFECT+REASON_DISCARD) - elseif dice==3 then - Duel.Draw(tp,1,REASON_EFFECT) - elseif dice==4 then - Duel.Draw(1-tp,1,REASON_EFFECT) - elseif dice==5 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectMatchingCard(tp,Card.IsDestructable,tp,0,LOCATION_MZONE,1,1,nil) - Duel.Destroy(g,REASON_EFFECT) - else - Duel.Destroy(e:GetHandler(),REASON_EFFECT) - end -end diff --git a/script/c76902476.lua b/script/c76902476.lua deleted file mode 100644 index 78aef42701..0000000000 --- a/script/c76902476.lua +++ /dev/null @@ -1,51 +0,0 @@ ---幻獣機タートレーサー -function c76902476.initial_effect(c) - --level - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_UPDATE_LEVEL) - e1:SetValue(c76902476.lvval) - c:RegisterEffect(e1) - -- - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e2:SetCondition(c76902476.indcon) - e2:SetValue(1) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - c:RegisterEffect(e3) - -- - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_FIELD) - e4:SetCode(EFFECT_INDESTRUCTABLE_COUNT) - e4:SetRange(LOCATION_MZONE) - e4:SetTargetRange(LOCATION_MZONE,0) - e4:SetTarget(c76902476.indtg) - e4:SetCountLimit(1) - e4:SetValue(c76902476.valcon) - c:RegisterEffect(e4) -end -function c76902476.lvval(e,c) - local tp=c:GetControler() - local lv=0 - for i=0,4 do - local tc=Duel.GetFieldCard(tp,LOCATION_MZONE,i) - if tc and tc:IsCode(31533705) then lv=lv+tc:GetLevel() end - end - return lv -end -function c76902476.indcon(e) - return Duel.IsExistingMatchingCard(Card.IsType,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil,TYPE_TOKEN) -end -function c76902476.indtg(e,c) - return c:IsCode(31533705) -end -function c76902476.valcon(e,re,r,rp) - return bit.band(r,REASON_BATTLE)~=0 -end diff --git a/script/c76909279.lua b/script/c76909279.lua deleted file mode 100644 index 1b88bc4b14..0000000000 --- a/script/c76909279.lua +++ /dev/null @@ -1,14 +0,0 @@ ---激昂のミノタウルス -function c76909279.initial_effect(c) - --pierce - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_PIERCE) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetTarget(c76909279.target) - c:RegisterEffect(e1) -end -function c76909279.target(e,c) - return c:IsRace(RACE_BEASTWARRIOR+RACE_WINDBEAST+RACE_BEAST) -end diff --git a/script/c76913983.lua b/script/c76913983.lua deleted file mode 100644 index 8ac8be894e..0000000000 --- a/script/c76913983.lua +++ /dev/null @@ -1,27 +0,0 @@ ---BF-アームズ・ウィング -function c76913983.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0x33),aux.NonTuner(nil),1) - c:EnableReviveLimit() - --atkup - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetCondition(c76913983.atkcon) - e1:SetValue(500) - c:RegisterEffect(e1) - --pierce - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_PIERCE) - c:RegisterEffect(e2) -end -function c76913983.atkcon(e) - local ph=Duel.GetCurrentPhase() - if ph~=PHASE_DAMAGE and ph~=PHASE_DAMAGE_CAL then return false end - local a=Duel.GetAttacker() - local d=Duel.GetAttackTarget() - return e:GetHandler()==a and d and d:IsDefencePos() -end diff --git a/script/c76922029.lua b/script/c76922029.lua deleted file mode 100644 index 828c80c76c..0000000000 --- a/script/c76922029.lua +++ /dev/null @@ -1,41 +0,0 @@ ---首領・ザルーグ -function c76922029.initial_effect(c) - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(76922029,0)) - e1:SetCategory(CATEGORY_HANDES+CATEGORY_DECKDES) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_BATTLE_DAMAGE) - e1:SetCondition(c76922029.condition) - e1:SetTarget(c76922029.target) - e1:SetOperation(c76922029.operation) - c:RegisterEffect(e1) -end -function c76922029.condition(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp -end -function c76922029.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0 or Duel.IsPlayerCanDiscardDeck(1-tp,2) end - local op=0 - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(76922029,0)) - if Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0 and Duel.IsPlayerCanDiscardDeck(1-tp,2) then - op=Duel.SelectOption(tp,aux.Stringid(76922029,1),aux.Stringid(76922029,2)) - elseif Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0 then - Duel.SelectOption(tp,aux.Stringid(76922029,1)) - op=0 - else - Duel.SelectOption(tp,aux.Stringid(76922029,2)) - op=1 - end - e:SetLabel(op) - if op==0 then Duel.SetOperationInfo(0,CATEGORY_HANDES,0,0,1-tp,1) - else Duel.SetOperationInfo(0,CATEGORY_DECKDES,0,0,1-tp,2) end -end -function c76922029.operation(e,tp,eg,ep,ev,re,r,rp) - if e:GetLabel()==0 then - local g=Duel.GetFieldGroup(ep,LOCATION_HAND,0,nil) - local sg=g:RandomSelect(ep,1) - Duel.SendtoGrave(sg,REASON_DISCARD+REASON_EFFECT) - else - Duel.DiscardDeck(1-tp,2,REASON_EFFECT) - end -end diff --git a/script/c76925842.lua b/script/c76925842.lua deleted file mode 100644 index ab92b453f3..0000000000 --- a/script/c76925842.lua +++ /dev/null @@ -1,49 +0,0 @@ ---ダーク・パーシアス -function c76925842.initial_effect(c) - --atk - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(c76925842.atkval) - c:RegisterEffect(e1) - --draw - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(76925842,0)) - e2:SetCategory(CATEGORY_DRAW) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetCode(EVENT_BATTLE_DESTROYING) - e2:SetCondition(c76925842.drcon) - e2:SetCost(c76925842.drcost) - e2:SetTarget(c76925842.drtg) - e2:SetOperation(c76925842.drop) - c:RegisterEffect(e2) -end -function c76925842.atkval(e,c) - return Duel.GetMatchingGroupCount(Card.IsAttribute,c:GetControler(),LOCATION_GRAVE,0,nil,ATTRIBUTE_DARK)*100 -end -function c76925842.drcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsRelateToBattle() and c:GetBattleTarget():IsType(TYPE_MONSTER) -end -function c76925842.rfilter(c) - return c:IsAttribute(ATTRIBUTE_DARK) and c:IsAbleToRemoveAsCost() -end -function c76925842.drcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c76925842.rfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c76925842.rfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c76925842.drtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(1) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c76925842.drop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end diff --git a/script/c76972801.lua b/script/c76972801.lua deleted file mode 100644 index e750d88abe..0000000000 --- a/script/c76972801.lua +++ /dev/null @@ -1,29 +0,0 @@ ---ガガガガード -function c76972801.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c76972801.condition) - e1:SetOperation(c76972801.activate) - c:RegisterEffect(e1) -end -function c76972801.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x54) -end -function c76972801.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c76972801.cfilter,tp,LOCATION_MZONE,0,2,nil) -end -function c76972801.activate(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetReset(RESET_PHASE+PHASE_END) - e1:SetValue(1) - Duel.RegisterEffect(e1,tp) - local e2=e1:Clone() - e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - e2:SetProperty(EFFECT_FLAG_SET_AVAILABLE) - Duel.RegisterEffect(e2,tp) -end diff --git a/script/c76986005.lua b/script/c76986005.lua deleted file mode 100644 index eb7d940031..0000000000 --- a/script/c76986005.lua +++ /dev/null @@ -1,33 +0,0 @@ ---サイバー・ジラフ -function c76986005.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(76986005,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c76986005.cost) - e1:SetOperation(c76986005.operation) - c:RegisterEffect(e1) -end -function c76986005.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end -function c76986005.operation(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CHANGE_DAMAGE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetTargetRange(1,0) - e1:SetValue(c76986005.damval) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) - local e2=e1:Clone() - e2:SetCode(EFFECT_NO_EFFECT_DAMAGE) - e2:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e2,tp) -end -function c76986005.damval(e,re,val,r,rp,rc) - if bit.band(r,REASON_EFFECT)~=0 then return 0 - else return val end -end diff --git a/script/c76990617.lua b/script/c76990617.lua deleted file mode 100644 index 73cc82a38e..0000000000 --- a/script/c76990617.lua +++ /dev/null @@ -1,35 +0,0 @@ ---幻奏の音女ソナタ -function c76990617.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c76990617.spcon) - c:RegisterEffect(e1) - --atk/def - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetRange(LOCATION_MZONE) - e2:SetTargetRange(LOCATION_MZONE,0) - e2:SetTarget(aux.TargetBoolFunction(Card.IsRace,RACE_FAIRY)) - e2:SetValue(500) - e2:SetCondition(c76990617.tgcon) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EFFECT_UPDATE_DEFENCE) - c:RegisterEffect(e3) -end -function c76990617.filter(c) - return c:IsFaceup() and c:IsSetCard(0x9b) -end -function c76990617.spcon(e,c) - if c==nil then return true end - return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c76990617.filter,c:GetControler(),LOCATION_MZONE,0,1,nil) -end -function c76990617.tgcon(e) - return bit.band(e:GetHandler():GetSummonType(),SUMMON_TYPE_SPECIAL)==SUMMON_TYPE_SPECIAL -end diff --git a/script/c7700132.lua b/script/c7700132.lua deleted file mode 100644 index 1c76406a1a..0000000000 --- a/script/c7700132.lua +++ /dev/null @@ -1,25 +0,0 @@ ---ワーム・ノーブル -function c7700132.initial_effect(c) - --flip - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FLIP+EFFECT_TYPE_SINGLE) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetTarget(c7700132.damtg) - e1:SetOperation(c7700132.damop) - c:RegisterEffect(e1) -end -function c7700132.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - if Duel.GetCurrentPhase()==PHASE_DAMAGE and e:GetHandler()==Duel.GetAttackTarget() then - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(Duel.GetAttacker():GetAttack()/2) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,Duel.GetAttacker():GetAttack()/2) - end -end -function c7700132.damop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetCurrentPhase()==PHASE_DAMAGE and e:GetHandler()==Duel.GetAttackTarget() then - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) - end -end diff --git a/script/c77007920.lua b/script/c77007920.lua deleted file mode 100644 index b70d3cb270..0000000000 --- a/script/c77007920.lua +++ /dev/null @@ -1,47 +0,0 @@ ---レーザー砲機甲鎧 -function c77007920.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c77007920.target) - e1:SetOperation(c77007920.operation) - c:RegisterEffect(e1) - --Atk up - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(300) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EFFECT_UPDATE_DEFENCE) - c:RegisterEffect(e3) - --Equip limit - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetCode(EFFECT_EQUIP_LIMIT) - e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e4:SetValue(c77007920.eqlimit) - c:RegisterEffect(e4) -end -function c77007920.eqlimit(e,c) - return c:IsRace(RACE_INSECT) -end -function c77007920.filter(c) - return c:IsFaceup() and c:IsRace(RACE_INSECT) -end -function c77007920.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c77007920.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c77007920.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c77007920.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c77007920.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,e:GetHandler(),tc) - end -end diff --git a/script/c77013169.lua b/script/c77013169.lua deleted file mode 100644 index d0041c3f6b..0000000000 --- a/script/c77013169.lua +++ /dev/null @@ -1,56 +0,0 @@ ---超重武者ソード-999 -function c77013169.initial_effect(c) - --position - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(77013169,0)) - e1:SetCategory(CATEGORY_POSITION) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c77013169.postg) - e1:SetOperation(c77013169.posop) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e2) - --atk - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(77013169,1)) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e3:SetRange(LOCATION_MZONE) - e3:SetCode(EVENT_BATTLED) - e3:SetCondition(c77013169.atkcon) - e3:SetOperation(c77013169.atkop) - c:RegisterEffect(e3) -end -function c77013169.postg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_POSITION,e:GetHandler(),1,0,0) -end -function c77013169.posop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.ChangePosition(c,POS_FACEUP_DEFENCE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK) - end -end -function c77013169.atkcon(e,tp,eg,ep,ev,re,r,rp) - local a=Duel.GetAttacker() - local d=Duel.GetAttackTarget() - if a:IsControler(1-tp) then a,d=d,a end - e:SetLabelObject(d) - return a and d and a:IsFaceup() and a:IsSetCard(0x9a) and a:IsRelateToBattle() and d:IsFaceup() and d:IsRelateToBattle() -end -function c77013169.atkop(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetLabelObject() - if tc:IsFaceup() and tc:IsRelateToBattle() then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(0) - tc:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_SET_DEFENCE_FINAL) - tc:RegisterEffect(e2) - end -end diff --git a/script/c77027445.lua b/script/c77027445.lua deleted file mode 100644 index 1745fdfed5..0000000000 --- a/script/c77027445.lua +++ /dev/null @@ -1,50 +0,0 @@ ---ポセイドンの力 -function c77027445.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c77027445.target) - e1:SetOperation(c77027445.operation) - c:RegisterEffect(e1) - --atk up - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(300) - c:RegisterEffect(e2) - --def up - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_EQUIP) - e3:SetCode(EFFECT_UPDATE_DEFENCE) - e3:SetValue(300) - c:RegisterEffect(e3) - --equip limit - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetCode(EFFECT_EQUIP_LIMIT) - e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e4:SetValue(c77027445.eqlimit) - c:RegisterEffect(e4) -end -function c77027445.eqlimit(e,c) - return c:IsRace(RACE_AQUA) -end -function c77027445.filter(c) - return c:IsFaceup() and c:IsRace(RACE_AQUA) -end -function c77027445.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c77027445.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c77027445.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c77027445.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c77027445.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,e:GetHandler(),tc) - end -end diff --git a/script/c77036039.lua b/script/c77036039.lua deleted file mode 100644 index 243f9d9ea9..0000000000 --- a/script/c77036039.lua +++ /dev/null @@ -1,40 +0,0 @@ ---バスター・マーセナリ -function c77036039.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(77036039,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCost(c77036039.cost) - e1:SetTarget(c77036039.target) - e1:SetOperation(c77036039.operation) - c:RegisterEffect(e1) -end -function c77036039.cfilter(c) - return c:IsCode(80280737) and c:IsAbleToDeckAsCost() -end -function c77036039.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c77036039.cfilter,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectMatchingCard(tp,c77036039.cfilter,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,1,nil) - Duel.SendtoDeck(g,nil,2,REASON_COST) -end -function c77036039.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable() -end -function c77036039.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and c77036039.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c77036039.filter,tp,0,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c77036039.filter,tp,0,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c77036039.operation(e,tp,eg,ep,ev,re,r,rp,chk) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c770365.lua b/script/c770365.lua deleted file mode 100644 index d8a8224cf2..0000000000 --- a/script/c770365.lua +++ /dev/null @@ -1,53 +0,0 @@ ---魔導皇聖 トリス -function c770365.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsRace,RACE_SPELLCASTER),5,2) - c:EnableReviveLimit() - --atklimit - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetRange(LOCATION_MZONE) - e1:SetValue(c770365.atkval) - c:RegisterEffect(e1) - --confiem - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(770365,0)) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetCountLimit(1) - e2:SetRange(LOCATION_MZONE) - e2:SetCost(c770365.cost) - e2:SetTarget(c770365.target) - e2:SetOperation(c770365.operation) - c:RegisterEffect(e2) -end -function c770365.atkval(e,c) - return Duel.GetOverlayCount(c:GetControler(),1,0)*300 -end -function c770365.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c770365.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>=5 end -end -function c770365.filter(c) - return c:IsSetCard(0x106e) -end -function c770365.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.ShuffleDeck(tp) - Duel.BreakEffect() - Duel.ConfirmDecktop(tp,5) - local g=Duel.GetDecktopGroup(tp,5) - local ct=g:FilterCount(c770365.filter,nil) - local sg=Duel.GetMatchingGroup(Card.IsDestructable,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - if ct>0 and sg:GetCount()>0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local dg=sg:Select(tp,1,ct,nil) - Duel.HintSelection(dg) - Duel.Destroy(dg,REASON_EFFECT) - Duel.BreakEffect() - end - Duel.SortDecktop(tp,tp,5) -end diff --git a/script/c77044671.lua b/script/c77044671.lua deleted file mode 100644 index 592064dde8..0000000000 --- a/script/c77044671.lua +++ /dev/null @@ -1,33 +0,0 @@ ---ピラミッド・タートル -function c77044671.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(77044671,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetCondition(c77044671.condition) - e1:SetTarget(c77044671.target) - e1:SetOperation(c77044671.operation) - c:RegisterEffect(e1) -end -function c77044671.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) -end -function c77044671.filter(c,e,tp) - return c:IsDefenceBelow(2000) and c:IsRace(RACE_ZOMBIE) - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c77044671.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c77044671.filter,tp,LOCATION_DECK,0,1,nil,e,tp) - and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c77044671.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c77044671.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c77060848.lua b/script/c77060848.lua deleted file mode 100644 index 863c7dbdf1..0000000000 --- a/script/c77060848.lua +++ /dev/null @@ -1,30 +0,0 @@ ---極星霊デックアールヴ -function c77060848.initial_effect(c) - --salvage - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(77060848,0)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c77060848.thtg) - e1:SetOperation(c77060848.thop) - c:RegisterEffect(e1) -end -function c77060848.filter(c) - return c:IsSetCard(0x42) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() -end -function c77060848.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c77060848.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c77060848.filter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c77060848.filter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c77060848.thop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end diff --git a/script/c77084837.lua b/script/c77084837.lua deleted file mode 100644 index 6dd5a1a197..0000000000 --- a/script/c77084837.lua +++ /dev/null @@ -1,66 +0,0 @@ ---因幡之白兎 -function c77084837.initial_effect(c) - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(aux.FALSE) - c:RegisterEffect(e1) - --summon,flip - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetCode(EVENT_SUMMON_SUCCESS) - e2:SetOperation(c77084837.retreg) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EVENT_FLIP) - c:RegisterEffect(e3) - --attack limit - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetCode(EFFECT_DIRECT_ATTACK) - c:RegisterEffect(e4) - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_SINGLE) - e5:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET) - e5:SetValue(1) - c:RegisterEffect(e5) -end -function c77084837.retreg(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - --to hand - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetDescription(aux.Stringid(77084837,0)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e1:SetCondition(c77084837.retcon) - e1:SetTarget(c77084837.rettg) - e1:SetOperation(c77084837.retop) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - c:RegisterEffect(e2) -end -function c77084837.retcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsHasEffect(EFFECT_SPIRIT_DONOT_RETURN) then return false end - if e:IsHasType(EFFECT_TYPE_TRIGGER_F) then - return not c:IsHasEffect(EFFECT_SPIRIT_MAYNOT_RETURN) - else return c:IsHasEffect(EFFECT_SPIRIT_MAYNOT_RETURN) end -end -function c77084837.rettg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0) -end -function c77084837.retop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SendtoHand(c,nil,REASON_EFFECT) - end -end diff --git a/script/c77087109.lua b/script/c77087109.lua deleted file mode 100644 index f9bd33c77d..0000000000 --- a/script/c77087109.lua +++ /dev/null @@ -1,14 +0,0 @@ ---クロック・リゾネーター -function c77087109.initial_effect(c) - --battle des rep - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DESTROY_REPLACE) - e1:SetCountLimit(1) - e1:SetTarget(c77087109.reptg) - c:RegisterEffect(e1) -end -function c77087109.reptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsPosition(POS_FACEUP_DEFENCE) end - return true -end diff --git a/script/c77098449.lua b/script/c77098449.lua deleted file mode 100644 index 5c9fef17d1..0000000000 --- a/script/c77098449.lua +++ /dev/null @@ -1,34 +0,0 @@ ---ギャラクシー・ウェーブ -function c77098449.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --damage - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(77098449,0)) - e2:SetCategory(CATEGORY_DAMAGE) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetRange(LOCATION_SZONE) - e2:SetCondition(c77098449.condition) - e2:SetTarget(c77098449.target) - e2:SetOperation(c77098449.operation) - c:RegisterEffect(e2) -end -function c77098449.condition(e,tp,eg,ep,ev,re,r,rp) - return eg:GetFirst():GetSummonType()==SUMMON_TYPE_XYZ and eg:GetFirst():IsControler(tp) -end -function c77098449.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(500) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,0,0,1-tp,500) -end -function c77098449.operation(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) - end -end diff --git a/script/c77121851.lua b/script/c77121851.lua deleted file mode 100644 index 78464d201a..0000000000 --- a/script/c77121851.lua +++ /dev/null @@ -1,49 +0,0 @@ ---暗黒のマンティコア -function c77121851.initial_effect(c) - --to grave - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetOperation(c77121851.tgop) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(77121851,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_PHASE+PHASE_END) - e2:SetRange(LOCATION_GRAVE) - e2:SetCountLimit(1) - e2:SetCondition(c77121851.spcon) - e2:SetCost(c77121851.spcost) - e2:SetTarget(c77121851.sptg) - e2:SetOperation(c77121851.spop) - c:RegisterEffect(e2) -end -function c77121851.tgop(e,tp,eg,ep,ev,re,r,rp) - if bit.band(r,REASON_RETURN+REASON_ADJUST)~=0 then return end - e:GetHandler():RegisterFlagEffect(77121851,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) -end -function c77121851.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetFlagEffect(77121851)~=0 -end -function c77121851.costfilter(c) - return c:IsRace(RACE_BEAST+RACE_BEASTWARRIOR+RACE_WINDBEAST) and (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) and c:IsAbleToGraveAsCost() -end -function c77121851.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c77121851.costfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c77121851.costfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil) - Duel.SendtoGrave(g,REASON_COST) -end -function c77121851.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c77121851.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c77135531.lua b/script/c77135531.lua deleted file mode 100644 index 05be816450..0000000000 --- a/script/c77135531.lua +++ /dev/null @@ -1,64 +0,0 @@ ---竜の尖兵 -function c77135531.initial_effect(c) - --atkup - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(77135531,0)) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c77135531.cost) - e1:SetOperation(c77135531.atkop) - c:RegisterEffect(e1) - --spsum - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(77135531,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetCondition(c77135531.spcon) - e2:SetTarget(c77135531.sptg) - e2:SetOperation(c77135531.spop) - c:RegisterEffect(e2) -end -function c77135531.cfilter(c) - return c:IsRace(RACE_DRAGON) and c:IsAbleToGraveAsCost() -end -function c77135531.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c77135531.cfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c77135531.cfilter,tp,LOCATION_HAND,0,1,1,nil) - Duel.SendtoGrave(g,REASON_COST) -end -function c77135531.atkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFaceup() and c:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(300) - e1:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e1) - end -end -function c77135531.spcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsReason(REASON_EFFECT) and rp~=tp and c:GetPreviousControler()==tp -end -function c77135531.spfilter(c,e,tp) - return c:IsRace(RACE_DRAGON) and c:IsType(TYPE_NORMAL) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c77135531.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and c77135531.spfilter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c77135531.spfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c77135531.spfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c77135531.spop(e,tp,eg,ep,ev,re,r,rp,chk) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c77153811.lua b/script/c77153811.lua deleted file mode 100644 index 556bf06f54..0000000000 --- a/script/c77153811.lua +++ /dev/null @@ -1,55 +0,0 @@ ---儀式魔人カースエンチャンター -function c77153811.initial_effect(c) - --ritual material - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_EXTRA_RITUAL_MATERIAL) - e1:SetValue(1) - c:RegisterEffect(e1) - --become material - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetCode(EVENT_BE_MATERIAL) - e2:SetCondition(c77153811.condition) - e2:SetOperation(c77153811.operation) - c:RegisterEffect(e2) -end -function c77153811.condition(e,tp,eg,ep,ev,re,r,rp) - return r==REASON_RITUAL -end -function c77153811.operation(e,tp,eg,ep,ev,re,r,rp) - local rc=eg:GetFirst() - while rc do - if rc:GetFlagEffect(77153811)==0 then - --cannot special summon - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetDescription(aux.Stringid(77153811,0)) - e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e1:SetTarget(c77153811.distg) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000) - rc:RegisterEffect(e1,true) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_CHAIN_SOLVING) - e2:SetRange(LOCATION_MZONE) - e2:SetOperation(c77153811.disop) - e2:SetReset(RESET_EVENT+0x1fe0000) - rc:RegisterEffect(e2,true) - rc:RegisterFlagEffect(77153811,RESET_EVENT+0x1fe0000,0,1) - end - rc=eg:GetNext() - end -end -function c77153811.distg(e,c) - return c:IsType(TYPE_SYNCHRO) -end -function c77153811.disop(e,tp,eg,ep,ev,re,r,rp) - if re:IsActiveType(TYPE_SYNCHRO) then - Duel.NegateEffect(ev) - end -end diff --git a/script/c77205367.lua b/script/c77205367.lua deleted file mode 100644 index a765e5a8c9..0000000000 --- a/script/c77205367.lua +++ /dev/null @@ -1,78 +0,0 @@ ---CNo.96 ブラック・ストーム -function c77205367.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_DARK),3,4) - c:EnableReviveLimit() - --addown - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e1:SetValue(1) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_PRE_BATTLE_DAMAGE) - e2:SetRange(LOCATION_MZONE) - e2:SetCondition(c77205367.damcon) - e2:SetOperation(c77205367.damop) - c:RegisterEffect(e2) - --atk - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(77205367,0)) - e3:SetType(EFFECT_TYPE_QUICK_O) - e3:SetCode(EVENT_ATTACK_ANNOUNCE) - e3:SetRange(LOCATION_MZONE) - e3:SetCondition(c77205367.atkcon) - e3:SetCost(c77205367.atkcost) - e3:SetTarget(c77205367.atktg) - e3:SetOperation(c77205367.atkop) - c:RegisterEffect(e3) -end -c77205367.xyz_number=96 -function c77205367.damcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return ep==tp and c:IsRelateToBattle() and eg:GetFirst()==c:GetBattleTarget() -end -function c77205367.damop(e,tp,eg,ep,ev,re,r,rp) - Duel.ChangeBattleDamage(1-tp,ev,false) -end -function c77205367.atkcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetOverlayGroup():IsExists(Card.IsCode,1,nil,55727845) -end -function c77205367.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c77205367.atktg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local c=e:GetHandler() - local a=Duel.GetAttacker() - local at=Duel.GetAttackTarget() - return ((a==c and at and at:IsFaceup() and at:GetAttack()>0) or (at==c and a:GetAttack()>0)) - and not e:GetHandler():IsStatus(STATUS_CHAINING) - end - Duel.SetTargetCard(e:GetHandler():GetBattleTarget()) -end -function c77205367.atkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and c:IsFaceup() and tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:GetAttack()>0 then - local atk=tc:GetBaseAttack() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetValue(0) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(atk) - e2:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e2) - end -end diff --git a/script/c77207191.lua b/script/c77207191.lua deleted file mode 100644 index c9412058eb..0000000000 --- a/script/c77207191.lua +++ /dev/null @@ -1,30 +0,0 @@ ---バフォメット -function c77207191.initial_effect(c) - --effect - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(77207191,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c77207191.tg) - e1:SetOperation(c77207191.op) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - c:RegisterEffect(e2) -end -function c77207191.filter(c) - return c:IsCode(5818798) and c:IsAbleToHand() -end -function c77207191.tg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c77207191.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c77207191.op(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c77207191.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c77229910.lua b/script/c77229910.lua deleted file mode 100644 index 2b0c30c79c..0000000000 --- a/script/c77229910.lua +++ /dev/null @@ -1,45 +0,0 @@ ---D・バリア -function c77229910.initial_effect(c) - --Negate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY+CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_CHAINING) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) - e1:SetCondition(c77229910.condition) - e1:SetTarget(c77229910.target) - e1:SetOperation(c77229910.operation) - c:RegisterEffect(e1) -end -function c77229910.dfilter(c,p) - return c:GetControler()==p and c:IsLocation(LOCATION_MZONE) and c:IsFaceup() and c:IsSetCard(0x26) -end -function c77229910.condition(e,tp,eg,ep,ev,re,r,rp) - if not Duel.IsChainNegatable(ev) or not re:IsHasType(EFFECT_TYPE_ACTIVATE) then return false end - local ex,tg,tc=Duel.GetOperationInfo(ev,CATEGORY_DESTROY) - return ex and tg~=nil and tc+tg:FilterCount(c77229910.dfilter,nil,tp)-tg:GetCount()>0 -end -function c77229910.filter(c) - return c:IsSetCard(0x26) and c:IsAbleToHand() -end -function c77229910.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c77229910.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) - if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) - end -end -function c77229910.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateActivation(ev) - if re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(eg,REASON_EFFECT) - end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c77229910.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.BreakEffect() - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c77252217.lua b/script/c77252217.lua deleted file mode 100644 index f93de97c13..0000000000 --- a/script/c77252217.lua +++ /dev/null @@ -1,22 +0,0 @@ ---電動刃虫 -function c77252217.initial_effect(c) - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(77252217,0)) - e1:SetCategory(CATEGORY_DRAW) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_DAMAGE_STEP_END) - e1:SetTarget(c77252217.drtg) - e1:SetOperation(c77252217.drop) - c:RegisterEffect(e1) -end -function c77252217.drtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(1) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,1-tp,1) -end -function c77252217.drop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end diff --git a/script/c77330185.lua b/script/c77330185.lua deleted file mode 100644 index 3a9a5444a0..0000000000 --- a/script/c77330185.lua +++ /dev/null @@ -1,46 +0,0 @@ ---XX-セイバー ガルセム -function c77330185.initial_effect(c) - --search - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(77330185,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCondition(c77330185.condition) - e1:SetTarget(c77330185.target) - e1:SetOperation(c77330185.operation) - c:RegisterEffect(e1) - --atk - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetValue(c77330185.atkval) - c:RegisterEffect(e2) -end -function c77330185.atfilter(c) - return c:IsFaceup() and c:IsSetCard(0x100d) -end -function c77330185.atkval(e,c) - return Duel.GetMatchingGroupCount(c77330185.atfilter,c:GetControler(),LOCATION_MZONE,0,nil)*200 -end -function c77330185.condition(e,tp,eg,ep,ev,re,r,rp) - return bit.band(e:GetHandler():GetReason(),0x41)==0x41 - and e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) -end -function c77330185.filter(c) - return c:IsSetCard(0x100d) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() -end -function c77330185.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c77330185.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c77330185.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c77330185.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c77334267.lua b/script/c77334267.lua deleted file mode 100644 index 6076052411..0000000000 --- a/script/c77334267.lua +++ /dev/null @@ -1,37 +0,0 @@ ---発条装攻ゼンマイオー -function c77334267.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,5,2) - c:EnableReviveLimit() - --salvage - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetDescription(aux.Stringid(77334267,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCost(c77334267.descost) - e1:SetTarget(c77334267.destg) - e1:SetOperation(c77334267.desop) - c:RegisterEffect(e1) -end -function c77334267.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c77334267.filter(c) - return c:IsFacedown() and c:IsDestructable() -end -function c77334267.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and c77334267.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c77334267.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,2,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c77334267.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,2,2,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,2,0,0) -end -function c77334267.desop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local dg=g:Filter(Card.IsRelateToEffect,nil,e) - Duel.Destroy(dg,REASON_EFFECT) -end diff --git a/script/c77336644.lua b/script/c77336644.lua deleted file mode 100644 index 46ce140b80..0000000000 --- a/script/c77336644.lua +++ /dev/null @@ -1,64 +0,0 @@ ---レッド・デーモンズ・ドラゴン/バスター -function c77336644.initial_effect(c) - c:EnableReviveLimit() - --Cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(aux.FALSE) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(77336644,0)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_BATTLED) - e2:SetCondition(c77336644.descon) - e2:SetTarget(c77336644.destg) - e2:SetOperation(c77336644.desop) - c:RegisterEffect(e2) - --Special summon - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(77336644,1)) - e3:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e3:SetCode(EVENT_LEAVE_FIELD) - e3:SetCondition(c77336644.spcon) - e3:SetTarget(c77336644.sptg) - e3:SetOperation(c77336644.spop) - c:RegisterEffect(e3) -end -function c77336644.descon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetAttacker()==e:GetHandler() -end -function c77336644.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,LOCATION_MZONE,LOCATION_MZONE,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c77336644.desop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,LOCATION_MZONE,LOCATION_MZONE,e:GetHandler()) - Duel.Destroy(g,REASON_EFFECT) -end -function c77336644.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsReason(REASON_DESTROY) -end -function c77336644.spfilter(c,e,tp) - return c:IsCode(70902743) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c77336644.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c77336644.spfilter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c77336644.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c77336644.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c77336644.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c77360173.lua b/script/c77360173.lua deleted file mode 100644 index 49e23ecc0a..0000000000 --- a/script/c77360173.lua +++ /dev/null @@ -1,52 +0,0 @@ ---シンクローン・リゾネーター -function c77360173.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(1,77360173) - e1:SetCondition(c77360173.spcon) - c:RegisterEffect(e1) - --tohand - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(77360173,0)) - e2:SetCategory(CATEGORY_TOHAND) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetCondition(c77360173.thcon) - e2:SetTarget(c77360173.thtg) - e2:SetOperation(c77360173.thop) - c:RegisterEffect(e2) -end -function c77360173.cfilter(c) - return c:IsFaceup() and c:IsType(TYPE_SYNCHRO) -end -function c77360173.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c77360173.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) -end -function c77360173.thcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) -end -function c77360173.thfilter(c) - return c:IsSetCard(0x57) and not c:IsCode(77360173) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() -end -function c77360173.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c77360173.thfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c77360173.thfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c77360173.thfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c77360173.thop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end diff --git a/script/c7736719.lua b/script/c7736719.lua deleted file mode 100644 index 8a130aca0c..0000000000 --- a/script/c7736719.lua +++ /dev/null @@ -1,48 +0,0 @@ ---エア・サーキュレーター -function c7736719.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(7736719,0)) - e1:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c7736719.target) - e1:SetOperation(c7736719.activate) - c:RegisterEffect(e1) - --draw - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(7736719,1)) - e2:SetCategory(CATEGORY_DRAW) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetCode(EVENT_DESTROYED) - e2:SetTarget(c7736719.drtg) - e2:SetOperation(c7736719.drop) - c:RegisterEffect(e2) -end -function c7736719.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp,2) - and Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,LOCATION_HAND,0,2,nil) end - Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,2,tp,LOCATION_HAND) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2) -end -function c7736719.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,LOCATION_HAND,0,nil) - if g:GetCount()<2 or not Duel.IsPlayerCanDraw(tp) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local dg=g:Select(tp,2,2,nil) - Duel.SendtoDeck(dg,nil,2,REASON_EFFECT) - Duel.ShuffleDeck(tp) - Duel.BreakEffect() - Duel.Draw(tp,2,REASON_EFFECT) -end -function c7736719.drtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(1) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c7736719.drop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end diff --git a/script/c77372241.lua b/script/c77372241.lua deleted file mode 100644 index 395f35ffad..0000000000 --- a/script/c77372241.lua +++ /dev/null @@ -1,31 +0,0 @@ ---フレムベル・グルニカ -function c77372241.initial_effect(c) - --damage - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(77372241,0)) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c77372241.damcon) - e1:SetTarget(c77372241.damtg) - e1:SetOperation(c77372241.damop) - c:RegisterEffect(e1) -end -function c77372241.damcon(e,tp,eg,ep,ev,re,r,rp) - local tc=eg:GetFirst() - e:SetLabel(tc:GetLevel()) - return eg:GetCount()==1 and tc:GetReasonCard()==e:GetHandler() - and tc:IsLocation(LOCATION_GRAVE) and tc:IsReason(REASON_BATTLE) -end -function c77372241.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(e:GetLabel()*200) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,e:GetLabel()*200) -end -function c77372241.damop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c77379481.lua b/script/c77379481.lua deleted file mode 100644 index 1fbe6e54c2..0000000000 --- a/script/c77379481.lua +++ /dev/null @@ -1,32 +0,0 @@ ---大盤振舞侍 -function c77379481.initial_effect(c) - --draw - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(77379481,0)) - e1:SetCategory(CATEGORY_DRAW) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_BATTLE_DAMAGE) - e1:SetCondition(c77379481.condition) - e1:SetTarget(c77379481.target) - e1:SetOperation(c77379481.operation) - c:RegisterEffect(e1) -end -function c77379481.condition(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp -end -function c77379481.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - local ht=Duel.GetFieldGroupCount(tp,0,LOCATION_HAND) - if ht<7 then - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,1-tp,7-ht) - end -end -function c77379481.operation(e,tp,eg,ep,ev,re,r,rp) - local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) - local ht=Duel.GetFieldGroupCount(p,LOCATION_HAND,0) - if ht<7 then - Duel.Draw(p,7-ht,REASON_EFFECT) - end -end diff --git a/script/c77414722.lua b/script/c77414722.lua deleted file mode 100644 index d6f1e0443e..0000000000 --- a/script/c77414722.lua +++ /dev/null @@ -1,33 +0,0 @@ ---マジック・ジャマー -function c77414722.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_CHAINING) - e1:SetCondition(c77414722.condition) - e1:SetCost(c77414722.cost) - e1:SetTarget(c77414722.target) - e1:SetOperation(c77414722.activate) - c:RegisterEffect(e1) -end -function c77414722.condition(e,tp,eg,ep,ev,re,r,rp) - return re:IsActiveType(TYPE_SPELL) and re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev) -end -function c77414722.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) -end -function c77414722.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) - end -end -function c77414722.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateActivation(ev) - if re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(eg,REASON_EFFECT) - end -end diff --git a/script/c77428945.lua b/script/c77428945.lua deleted file mode 100644 index 722964c0ad..0000000000 --- a/script/c77428945.lua +++ /dev/null @@ -1,25 +0,0 @@ ---土地鋸 -function c77428945.initial_effect(c) - --position - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(77428945,0)) - e1:SetCategory(CATEGORY_POSITION) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCountLimit(1,77428945) - e1:SetTarget(c77428945.target) - e1:SetOperation(c77428945.operation) - c:RegisterEffect(e1) -end -function c77428945.filter(c) - return c:IsFaceup() and bit.band(c:GetSummonType(),SUMMON_TYPE_SPECIAL)~=0 -end -function c77428945.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local g=Duel.GetMatchingGroup(c77428945.filter,tp,LOCATION_MZONE,LOCATION_MZONE,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_POSITION,g,g:GetCount(),0,0) -end -function c77428945.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c77428945.filter,tp,LOCATION_MZONE,LOCATION_MZONE,e:GetHandler()) - Duel.ChangePosition(g,POS_FACEDOWN_DEFENCE) -end diff --git a/script/c77454922.lua b/script/c77454922.lua deleted file mode 100644 index 78279759c0..0000000000 --- a/script/c77454922.lua +++ /dev/null @@ -1,4 +0,0 @@ ---要塞クジラの誓い -function c77454922.initial_effect(c) - aux.AddRitualProcGreater(c,aux.FilterBoolFunction(Card.IsCode,62337487)) -end diff --git a/script/c77462146.lua b/script/c77462146.lua deleted file mode 100644 index 66629c0bed..0000000000 --- a/script/c77462146.lua +++ /dev/null @@ -1,79 +0,0 @@ ---幻影騎士団シャドーベイル -function c77462146.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetCondition(c77462146.condition) - e1:SetTarget(c77462146.target) - e1:SetOperation(c77462146.activate) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(77462146,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_ATTACK_ANNOUNCE) - e2:SetRange(LOCATION_GRAVE) - e2:SetCondition(c77462146.spcon) - e2:SetTarget(c77462146.sptg) - e2:SetOperation(c77462146.spop) - c:RegisterEffect(e2) -end -function c77462146.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end -function c77462146.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,nil) -end -function c77462146.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(300) - tc:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_UPDATE_DEFENCE) - tc:RegisterEffect(e2) - end -end -function c77462146.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetAttacker():IsControler(1-tp) and Duel.GetAttackTarget()==nil -end -function c77462146.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return not e:GetHandler():IsStatus(STATUS_CHAINING) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsPlayerCanSpecialSummonMonster(tp,77462146,0,0x11,4,0,300,RACE_WARRIOR,ATTRIBUTE_DARK) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c77462146.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local c=e:GetHandler() - if c:IsRelateToEffect(e) - and Duel.IsPlayerCanSpecialSummonMonster(tp,77462146,0,0x11,4,0,300,RACE_WARRIOR,ATTRIBUTE_DARK) then - c:SetStatus(STATUS_NO_LEVEL,false) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CHANGE_TYPE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetValue(TYPE_NORMAL+TYPE_MONSTER) - e1:SetReset(RESET_EVENT+0x47c0000) - c:RegisterEffect(e1,true) - Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP_DEFENCE) - local e7=Effect.CreateEffect(c) - e7:SetType(EFFECT_TYPE_SINGLE) - e7:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) - e7:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e7:SetReset(RESET_EVENT+0x47e0000) - e7:SetValue(LOCATION_REMOVED) - c:RegisterEffect(e7,true) - end -end diff --git a/script/c77491079.lua b/script/c77491079.lua deleted file mode 100644 index 8f437d5b0f..0000000000 --- a/script/c77491079.lua +++ /dev/null @@ -1,25 +0,0 @@ ---爆風トカゲ -function c77491079.initial_effect(c) - --flip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(77491079,0)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP) - e1:SetTarget(c77491079.target) - e1:SetOperation(c77491079.operation) - c:RegisterEffect(e1) -end -function c77491079.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:GetControler()~=tp and chkc:IsLocation(LOCATION_MZONE) and chkc:IsAbleToHand() end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g=Duel.SelectTarget(tp,Card.IsAbleToHand,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0) -end -function c77491079.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - end -end diff --git a/script/c77498348.lua b/script/c77498348.lua deleted file mode 100644 index e5923584c2..0000000000 --- a/script/c77498348.lua +++ /dev/null @@ -1,128 +0,0 @@ ---カオス・ソルジャー -宵闇の使者- -function c77498348.initial_effect(c) - c:EnableReviveLimit() - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - c:RegisterEffect(e1) - --attribute light - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetCode(EFFECT_ADD_ATTRIBUTE) - e2:SetRange(LOCATION_MZONE) - e2:SetValue(ATTRIBUTE_LIGHT) - c:RegisterEffect(e2) - --special summon - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(77498348,0)) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetCode(EFFECT_SPSUMMON_PROC) - e3:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e3:SetRange(LOCATION_HAND) - e3:SetCondition(c77498348.spcon) - e3:SetOperation(c77498348.spop) - e3:SetLabel(ATTRIBUTE_LIGHT) - c:RegisterEffect(e3) - local e4=e3:Clone() - e4:SetDescription(aux.Stringid(77498348,1)) - e4:SetLabel(ATTRIBUTE_DARK) - c:RegisterEffect(e4) - --remove - local e5=Effect.CreateEffect(c) - e5:SetDescription(aux.Stringid(77498348,2)) - e5:SetCategory(CATEGORY_REMOVE) - e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e5:SetCode(EVENT_SPSUMMON_SUCCESS) - e5:SetProperty(EFFECT_FLAG_CARD_TARGET) - e5:SetCost(c77498348.rmcost) - e5:SetTarget(c77498348.rmtg) - e5:SetOperation(c77498348.rmop) - c:RegisterEffect(e5) - e3:SetLabelObject(e5) - e4:SetLabelObject(e5) -end -function c77498348.spfilter(c,att) - return c:IsAttribute(att) and c:IsAbleToRemoveAsCost() -end -function c77498348.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - local ct=Duel.GetMatchingGroupCount(Card.IsAttribute,tp,LOCATION_GRAVE,0,nil,ATTRIBUTE_LIGHT) - return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and ct>0 and ct==Duel.GetMatchingGroupCount(Card.IsAttribute,tp,LOCATION_GRAVE,0,nil,ATTRIBUTE_DARK) - and Duel.IsExistingMatchingCard(c77498348.spfilter,tp,LOCATION_GRAVE,0,ct,nil,e:GetLabel()) -end -function c77498348.spop(e,tp,eg,ep,ev,re,r,rp,c) - local g=Duel.GetMatchingGroup(c77498348.spfilter,tp,LOCATION_GRAVE,0,nil,e:GetLabel()) - Duel.Remove(g,POS_FACEUP,REASON_COST) - e:GetLabelObject():SetLabel(e:GetLabel()) -end -function c77498348.rmcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetCurrentPhase()==PHASE_MAIN1 end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_BP) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) - e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function c77498348.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsAbleToRemove() end - if chk==0 then - if e:GetLabel()==ATTRIBUTE_LIGHT then - return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) - else - return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_HAND,1,nil) - end - end - if e:GetLabel()==ATTRIBUTE_LIGHT then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) - e:SetProperty(EFFECT_FLAG_CARD_TARGET) - else - Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,1-tp,LOCATION_HAND) - e:SetProperty(0) - end -end -function c77498348.rmop(e,tp,eg,ep,ev,re,r,rp) - if e:GetLabel()==ATTRIBUTE_LIGHT then - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) - end - else - local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_HAND,nil) - if g:GetCount()==0 then return end - local rg=g:RandomSelect(tp,1) - local tc=rg:GetFirst() - Duel.Remove(tc,POS_FACEDOWN,REASON_EFFECT) - tc:RegisterFlagEffect(77498348,RESET_EVENT+0x1fe0000,0,1) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetCountLimit(1) - e1:SetLabelObject(tc) - e1:SetReset(RESET_PHASE+PHASE_END,2) - e1:SetCondition(c77498348.retcon) - e1:SetOperation(c77498348.retop) - Duel.RegisterEffect(e1,tp) - end -end -function c77498348.retcon(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetLabelObject() - if tc:GetFlagEffect(77498348)==0 then - e:Reset() - return false - else - return Duel.GetTurnPlayer()==1-tp - end -end -function c77498348.retop(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetLabelObject() - Duel.SendtoHand(tc,1-tp,REASON_EFFECT) -end diff --git a/script/c77505534.lua b/script/c77505534.lua deleted file mode 100644 index 01a22016d3..0000000000 --- a/script/c77505534.lua +++ /dev/null @@ -1,34 +0,0 @@ ---堕ち影の蠢き -function c77505534.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,0x11e8) - e1:SetTarget(c77505534.target) - e1:SetOperation(c77505534.activate) - c:RegisterEffect(e1) -end -function c77505534.filter(c) - return c:IsSetCard(0x9d) and c:IsAbleToGrave() -end -function c77505534.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c77505534.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) -end -function c77505534.posfilter(c) - return c:IsFacedown() and c:IsSetCard(0x9d) -end -function c77505534.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c77505534.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 and Duel.SendtoGrave(g,REASON_EFFECT)~=0 then - local tg=Duel.GetMatchingGroup(c77505534.posfilter,tp,LOCATION_MZONE,0,nil) - if tg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(77505534,0)) then - Duel.BreakEffect() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE) - local sg=tg:Select(tp,1,5,nil) - Duel.ChangePosition(sg,POS_FACEUP_DEFENCE) - end - end -end diff --git a/script/c77506119.lua b/script/c77506119.lua deleted file mode 100644 index 6c03a02dcb..0000000000 --- a/script/c77506119.lua +++ /dev/null @@ -1,50 +0,0 @@ ---サンダー・ユニコーン -function c77506119.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsRace,RACE_BEAST),aux.NonTuner(nil),1) - c:EnableReviveLimit() - --atkdown - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(77506119,0)) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c77506119.atkcon) - e1:SetTarget(c77506119.atktg) - e1:SetOperation(c77506119.atkop) - c:RegisterEffect(e1) -end -function c77506119.atkcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()==PHASE_MAIN1 -end -function c77506119.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil) -end -function c77506119.atkop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - local c=e:GetHandler() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)*-500) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - end - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_CANNOT_ATTACK) - e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e2:SetTargetRange(LOCATION_MZONE,0) - e2:SetTarget(c77506119.atlimit) - e2:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e2,tp) -end -function c77506119.atlimit(e,c) - return c~=e:GetOwner() -end diff --git a/script/c77527210.lua b/script/c77527210.lua deleted file mode 100644 index 1298d65c79..0000000000 --- a/script/c77527210.lua +++ /dev/null @@ -1,41 +0,0 @@ ---神聖なる魂 -function c77527210.initial_effect(c) - c:EnableReviveLimit() - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c77527210.spcon) - e1:SetOperation(c77527210.spop) - c:RegisterEffect(e1) - --remove - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetRange(LOCATION_MZONE) - e2:SetTargetRange(0,LOCATION_MZONE) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetCondition(c77527210.atkcon) - e2:SetValue(-300) - c:RegisterEffect(e2) -end -function c77527210.atkcon(e) - local ph=Duel.GetCurrentPhase() - local tp=Duel.GetTurnPlayer() - return tp~=e:GetHandler():GetControler() and (ph==PHASE_BATTLE or ph==PHASE_DAMAGE or ph==PHASE_DAMAGE_CAL) -end -function c77527210.spfilter(c) - return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsAbleToRemoveAsCost() -end -function c77527210.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c77527210.spfilter,tp,LOCATION_GRAVE,0,2,nil) -end -function c77527210.spop(e,tp,eg,ep,ev,re,r,rp,c) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c77527210.spfilter,tp,LOCATION_GRAVE,0,2,2,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end diff --git a/script/c77538567.lua b/script/c77538567.lua deleted file mode 100644 index 41a40051c7..0000000000 --- a/script/c77538567.lua +++ /dev/null @@ -1,30 +0,0 @@ ---魔宮の賄賂 -function c77538567.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY+CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_CHAINING) - e1:SetCondition(c77538567.condition) - e1:SetTarget(c77538567.target) - e1:SetOperation(c77538567.activate) - c:RegisterEffect(e1) -end -function c77538567.condition(e,tp,eg,ep,ev,re,r,rp) - return re:IsHasType(EFFECT_TYPE_ACTIVATE) and rp~=tp and Duel.IsChainNegatable(ev) -end -function c77538567.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(1-tp,1) end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) - end - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,1-tp,1) -end -function c77538567.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateActivation(ev) - if re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(eg,REASON_EFFECT) - end - Duel.Draw(1-tp,1,REASON_EFFECT) -end diff --git a/script/c77558536.lua b/script/c77558536.lua deleted file mode 100644 index 73b636cd08..0000000000 --- a/script/c77558536.lua +++ /dev/null @@ -1,58 +0,0 @@ ---ライトロード・アサシン ライデン -function c77558536.initial_effect(c) - --atkup - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(77558536,0)) - e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DECKDES) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1,77558536) - e1:SetTarget(c77558536.target) - e1:SetOperation(c77558536.operation) - c:RegisterEffect(e1) - --discard deck - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(77558536,1)) - e2:SetCategory(CATEGORY_DECKDES) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_PHASE+PHASE_END) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCondition(c77558536.discon) - e2:SetTarget(c77558536.distg) - e2:SetOperation(c77558536.disop) - c:RegisterEffect(e2) -end -function c77558536.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,2) end - Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,2) -end -function c77558536.cfilter(c) - return c:IsLocation(LOCATION_GRAVE) and c:IsSetCard(0x38) and c:IsType(TYPE_MONSTER) -end -function c77558536.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.DiscardDeck(tp,2,REASON_EFFECT) - local g=Duel.GetOperatedGroup() - local ct=g:FilterCount(c77558536.cfilter,nil) - if ct==0 then return end - local c=e:GetHandler() - if c:IsFaceup() and c:IsRelateToEffect(e) then - Duel.BreakEffect() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(200) - e1:SetReset(RESET_EVENT+0x1ff0000+RESET_PHASE+PHASE_END,2) - c:RegisterEffect(e1) - end -end -function c77558536.discon(e,tp,eg,ep,ev,re,r,rp) - return tp==Duel.GetTurnPlayer() -end -function c77558536.distg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,2) -end -function c77558536.disop(e,tp,eg,ep,ev,re,r,rp) - Duel.DiscardDeck(tp,2,REASON_EFFECT) -end diff --git a/script/c77561728.lua b/script/c77561728.lua deleted file mode 100644 index 83a47b5531..0000000000 --- a/script/c77561728.lua +++ /dev/null @@ -1,25 +0,0 @@ ---攪乱作戦 -function c77561728.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_TOHAND) - e1:SetTarget(c77561728.target) - e1:SetOperation(c77561728.activate) - c:RegisterEffect(e1) -end -function c77561728.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(1-tp) - and Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,0,LOCATION_HAND,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,1-tp,LOCATION_HAND) -end -function c77561728.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND) - if g:GetCount()==0 then return end - Duel.SendtoDeck(g,nil,2,REASON_EFFECT) - Duel.ShuffleDeck(1-tp) - Duel.BreakEffect() - Duel.Draw(1-tp,g:GetCount(),REASON_EFFECT) -end diff --git a/script/c77565204.lua b/script/c77565204.lua deleted file mode 100644 index 9db5139cf6..0000000000 --- a/script/c77565204.lua +++ /dev/null @@ -1,109 +0,0 @@ ---未来融合-フューチャー・フュージョン -function c77565204.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c77565204.target) - e1:SetOperation(c77565204.activate) - c:RegisterEffect(e1) - --Destroy - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE) - e2:SetCode(EVENT_LEAVE_FIELD) - e2:SetOperation(c77565204.desop) - c:RegisterEffect(e2) - --Destroy2 - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e3:SetRange(LOCATION_SZONE) - e3:SetCode(EVENT_LEAVE_FIELD) - e3:SetCondition(c77565204.descon2) - e3:SetOperation(c77565204.desop2) - c:RegisterEffect(e3) -end -function c77565204.filter1(c,e) - return c:IsCanBeFusionMaterial() and c:IsAbleToGrave() and not c:IsImmuneToEffect(e) -end -function c77565204.filter2(c,m) - return c:IsType(TYPE_FUSION) and c:CheckFusionMaterial(m) -end -function c77565204.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local mg=Duel.GetMatchingGroup(c77565204.filter1,tp,LOCATION_DECK,0,nil,e) - return Duel.IsExistingMatchingCard(c77565204.filter2,tp,LOCATION_EXTRA,0,1,nil,mg) - end - e:GetHandler():SetTurnCounter(0) -end -function c77565204.activate(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) then return end - local mg=Duel.GetMatchingGroup(c77565204.filter1,tp,LOCATION_DECK,0,nil,e) - local sg=Duel.GetMatchingGroup(c77565204.filter2,tp,LOCATION_EXTRA,0,nil,mg) - if sg:GetCount()>0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local tg=sg:Select(tp,1,1,nil) - local tc=tg:GetFirst() - Duel.ConfirmCards(1-tp,tc) - local code=tc:GetCode() - local mat=Duel.SelectFusionMaterial(tp,tc,mg) - local fg=Duel.GetMatchingGroup(Card.IsCode,tp,LOCATION_EXTRA,0,nil,code) - local tc=fg:GetFirst() - while tc do - tc:SetMaterial(mat) - tc=fg:GetNext() - end - Duel.SendtoGrave(mat,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) - e1:SetCountLimit(1) - e1:SetReset(RESET_EVENT+0x1ff0000+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,2) - e1:SetRange(LOCATION_SZONE) - e1:SetCondition(c77565204.proccon) - e1:SetOperation(c77565204.procop) - e1:SetLabel(code) - e1:SetLabelObject(e) - c:RegisterEffect(e1) - end -end -function c77565204.procfilter(c,code,e,tp) - return c:IsCode(code) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) -end -function c77565204.proccon(e,tp,eg,ep,ev,re,r,rp) - return tp==Duel.GetTurnPlayer() -end -function c77565204.procop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local ct=c:GetTurnCounter() - ct=ct+1 - c:SetTurnCounter(ct) - if ct==2 then - local code=e:GetLabel() - local tc=Duel.GetFirstMatchingCard(c77565204.procfilter,tp,LOCATION_EXTRA,0,nil,code,e,tp) - if not tc then return end - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then - Duel.SendtoGrave(tc,REASON_EFFECT) - tc:CompleteProcedure() - else - Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP) - tc:CompleteProcedure() - c:SetCardTarget(tc) - end - end -end -function c77565204.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetHandler():GetFirstCardTarget() - if tc and tc:IsLocation(LOCATION_MZONE) then - Duel.Destroy(tc,REASON_EFFECT) - end -end -function c77565204.descon2(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetHandler():GetFirstCardTarget() - return tc and eg:IsContains(tc) and tc:IsReason(REASON_DESTROY) -end -function c77565204.desop2(e,tp,eg,ep,ev,re,r,rp) - Duel.Destroy(e:GetHandler(),REASON_EFFECT) -end diff --git a/script/c77584012.lua b/script/c77584012.lua deleted file mode 100644 index f1bb9c207e..0000000000 --- a/script/c77584012.lua +++ /dev/null @@ -1,41 +0,0 @@ ---擬似空間 -function c77584012.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --copy - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(77584012,0)) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_SZONE) - e2:SetCountLimit(1) - e2:SetCost(c77584012.cost) - e2:SetOperation(c77584012.operation) - c:RegisterEffect(e2) -end -function c77584012.filter(c) - return c:IsType(TYPE_FIELD) and c:IsAbleToRemoveAsCost() -end -function c77584012.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c77584012.filter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c77584012.filter,tp,LOCATION_GRAVE,0,1,1,nil) - local code=g:GetFirst():GetOriginalCode() - e:SetLabel(code) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c77584012.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) then return end - local code=e:GetLabel() - c:CopyEffect(code,RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END,1) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - e1:SetCode(EFFECT_CHANGE_CODE) - e1:SetValue(code) - c:RegisterEffect(e1) -end diff --git a/script/c77585513.lua b/script/c77585513.lua deleted file mode 100644 index 8baad86c7a..0000000000 --- a/script/c77585513.lua +++ /dev/null @@ -1,44 +0,0 @@ ---人造人間-サイコ・ショッカー -function c77585513.initial_effect(c) - --cannot trigger - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_TRIGGER) - e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(0xa,0xa) - e1:SetTarget(c77585513.distg) - c:RegisterEffect(e1) - --disable - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_DISABLE) - e2:SetRange(LOCATION_MZONE) - e2:SetTargetRange(LOCATION_SZONE,LOCATION_SZONE) - e2:SetTarget(c77585513.distg) - c:RegisterEffect(e2) - --disable effect - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e3:SetCode(EVENT_CHAIN_SOLVING) - e3:SetRange(LOCATION_MZONE) - e3:SetOperation(c77585513.disop) - c:RegisterEffect(e3) - --disable trap monster - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_FIELD) - e4:SetCode(EFFECT_DISABLE_TRAPMONSTER) - e4:SetRange(LOCATION_MZONE) - e4:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e4:SetTarget(c77585513.distg) - c:RegisterEffect(e4) -end -function c77585513.distg(e,c) - return c:IsType(TYPE_TRAP) -end -function c77585513.disop(e,tp,eg,ep,ev,re,r,rp) - local tl=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION) - if tl==LOCATION_SZONE and re:IsActiveType(TYPE_TRAP) then - Duel.NegateEffect(ev) - end -end diff --git a/script/c77600660.lua b/script/c77600660.lua deleted file mode 100644 index b48e9071fb..0000000000 --- a/script/c77600660.lua +++ /dev/null @@ -1,28 +0,0 @@ ---サイコ・エンペラー -function c77600660.initial_effect(c) - --recover - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(77600660,0)) - e1:SetCategory(CATEGORY_RECOVER) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetTarget(c77600660.rectg) - e1:SetOperation(c77600660.recop) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e2) -end -function c77600660.rectg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local val=Duel.GetMatchingGroupCount(Card.IsRace,tp,LOCATION_GRAVE,0,nil,RACE_PSYCHO)*500 - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(val) - Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,val) -end -function c77600660.recop(e,tp,eg,ep,ev,re,r,rp) - local val=Duel.GetMatchingGroupCount(Card.IsRace,tp,LOCATION_GRAVE,0,nil,RACE_PSYCHO)*500 - local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) - Duel.Recover(p,val,REASON_EFFECT) -end diff --git a/script/c77608643.lua b/script/c77608643.lua deleted file mode 100644 index 1fd1a165ce..0000000000 --- a/script/c77608643.lua +++ /dev/null @@ -1,60 +0,0 @@ ---D-HERO ダイハードガイ -function c77608643.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetOperation(c77608643.operation) - c:RegisterEffect(e1) - local g=Group.CreateGroup() - g:KeepAlive() - e1:SetLabelObject(g) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(77608643,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) - e2:SetCondition(c77608643.spcon) - e2:SetTarget(c77608643.sptg) - e2:SetOperation(c77608643.spop) - e2:SetLabelObject(g) - c:RegisterEffect(e2) -end -function c77608643.filter(c,e,tp) - return c:IsLocation(LOCATION_GRAVE) and c:IsReason(REASON_BATTLE) - and c:GetPreviousControler()==tp and c:IsSetCard(0xc008) -end -function c77608643.operation(e,tp,eg,ep,ev,re,r,rp) - local g=eg:Filter(c77608643.filter,nil,e,tp) - if g:GetCount()==0 then return end - local sg=e:GetLabelObject() - local c=e:GetHandler() - if c:GetFlagEffect(77608643)==0 then - sg:Clear() - c:RegisterFlagEffect(77608643,RESET_EVENT+0x3fe0000+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,0,1) - end - sg:Merge(g) -end -function c77608643.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp and e:GetHandler():GetFlagEffect(77608643)~=0 -end -function c77608643.spfilter(c,e,tp) - return c:IsLocation(LOCATION_GRAVE) and c:IsReason(REASON_BATTLE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c77608643.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetLabelObject():IsExists(c77608643.spfilter,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE) -end -function c77608643.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=e:GetLabelObject():FilterSelect(tp,c77608643.spfilter,1,1,nil,e,tp) - if g:GetCount()~=0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c77622396.lua b/script/c77622396.lua deleted file mode 100644 index aa24ede39e..0000000000 --- a/script/c77622396.lua +++ /dev/null @@ -1,18 +0,0 @@ ---あまのじゃくの呪い -function c77622396.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetOperation(c77622396.activate) - c:RegisterEffect(e1) -end -function c77622396.activate(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_REVERSE_UPDATE) - e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e1:SetReset(RESET_PHASE+PHASE_END) - e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - Duel.RegisterEffect(e1,tp) -end diff --git a/script/c77625948.lua b/script/c77625948.lua deleted file mode 100644 index b8be7a98ed..0000000000 --- a/script/c77625948.lua +++ /dev/null @@ -1,85 +0,0 @@ ---サイバー・ダーク・エッジ -function c77625948.initial_effect(c) - --equip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(77625948,0)) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c77625948.eqtg) - e1:SetOperation(c77625948.eqop) - c:RegisterEffect(e1) - --damage - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DIRECT_ATTACK) - c:RegisterEffect(e2) - -- - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e3:SetCode(EVENT_DAMAGE_CALCULATING) - e3:SetCondition(c77625948.atkcon) - e3:SetOperation(c77625948.atkop) - c:RegisterEffect(e3) -end -function c77625948.filter(c) - return c:IsLevelBelow(3) and c:IsRace(RACE_DRAGON) -end -function c77625948.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c77625948.filter(chkc) end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local g=Duel.SelectTarget(tp,c77625948.filter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0) -end -function c77625948.eqop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsFaceup() and c:IsRelateToEffect(e) and tc and tc:IsRelateToEffect(e) then - local atk=tc:GetTextAttack() - if atk<0 then atk=0 end - if not Duel.Equip(tp,tc,c,false) then return end - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_OWNER_RELATE) - e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(c77625948.eqlimit) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetProperty(EFFECT_FLAG_OWNER_RELATE+EFFECT_FLAG_IGNORE_IMMUNE) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetReset(RESET_EVENT+0x1fe0000) - e2:SetValue(atk) - tc:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_EQUIP) - e3:SetCode(EFFECT_DESTROY_SUBSTITUTE) - e3:SetReset(RESET_EVENT+0x1fe0000) - e3:SetValue(c77625948.repval) - tc:RegisterEffect(e3) - end -end -function c77625948.eqlimit(e,c) - return e:GetOwner()==c -end -function c77625948.repval(e,re,r,rp) - return bit.band(r,REASON_BATTLE)~=0 -end -function c77625948.atkcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetAttackTarget()==nil and Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)~=0 - and e:GetHandler():GetEffectCount(EFFECT_DIRECT_ATTACK)==1 -end -function c77625948.atkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetReset(RESET_PHASE+PHASE_DAMAGE_CAL) - e1:SetValue(c:GetAttack()/2) - c:RegisterEffect(e1) -end diff --git a/script/c77631175.lua b/script/c77631175.lua deleted file mode 100644 index 9d99428f56..0000000000 --- a/script/c77631175.lua +++ /dev/null @@ -1,50 +0,0 @@ ---CH キング・アーサー -function c77631175.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsRace,RACE_WARRIOR),4,2) - c:EnableReviveLimit() - --destroy replace - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetCode(EFFECT_DESTROY_REPLACE) - e1:SetRange(LOCATION_MZONE) - e1:SetTarget(c77631175.reptg) - c:RegisterEffect(e1) - --damage - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(77631175,1)) - e2:SetCategory(CATEGORY_DAMAGE) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(77631175) - e2:SetTarget(c77631175.target) - e2:SetOperation(c77631175.operation) - c:RegisterEffect(e2) -end -function c77631175.reptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReason(REASON_BATTLE) and e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_EFFECT) end - if Duel.SelectYesNo(tp,aux.Stringid(77631175,0)) then - local c=e:GetHandler() - c:RemoveOverlayCard(tp,1,1,REASON_EFFECT) - Duel.RaiseSingleEvent(c,77631175,e,0,0,0,0) - return true - else return false end -end -function c77631175.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(500) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,500) -end -function c77631175.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) or c:IsFacedown() then return end - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(500) - e1:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e1) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c77642288.lua b/script/c77642288.lua deleted file mode 100644 index a5acbf3a88..0000000000 --- a/script/c77642288.lua +++ /dev/null @@ -1,40 +0,0 @@ ---剣闘獣セクトル -function c77642288.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(77642288,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_PHASE+PHASE_BATTLE) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCondition(c77642288.spcon) - e1:SetTarget(c77642288.sptg) - e1:SetOperation(c77642288.spop) - c:RegisterEffect(e1) -end -function c77642288.spcon(e,tp,eg,ep,ev,re,r,rp) - local st=e:GetHandler():GetSummonType() - return st>=(SUMMON_TYPE_SPECIAL+100) and st<(SUMMON_TYPE_SPECIAL+150) - and e:GetHandler():GetBattledGroupCount()>0 -end -function c77642288.filter(c,e,tp) - return not c:IsCode(77642288) and c:IsSetCard(0x19) and c:IsCanBeSpecialSummoned(e,106,tp,false,false) -end -function c77642288.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_DECK) -end -function c77642288.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 then return end - if not Duel.IsExistingMatchingCard(c77642288.filter,tp,LOCATION_DECK,0,2,nil,e,tp) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c77642288.filter,tp,LOCATION_DECK,0,2,2,nil,e,tp) - local tc=g:GetFirst() - while tc do - Duel.SpecialSummonStep(tc,106,tp,tp,false,false,POS_FACEUP) - tc:RegisterFlagEffect(tc:GetOriginalCode(),RESET_EVENT+0x1ff0000,0,0) - tc=g:GetNext() - end - Duel.SpecialSummonComplete() -end diff --git a/script/c77679716.lua b/script/c77679716.lua deleted file mode 100644 index 3c78c36a34..0000000000 --- a/script/c77679716.lua +++ /dev/null @@ -1,92 +0,0 @@ ---超重武者装留ブレイク・アーマー -function c77679716.initial_effect(c) - --equip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(77679716,0)) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_HAND+LOCATION_MZONE) - e1:SetTarget(c77679716.eqtg) - e1:SetOperation(c77679716.eqop) - c:RegisterEffect(e1) - --indes - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e2:SetValue(1) - c:RegisterEffect(e2) - --damage - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(77679716,1)) - e3:SetCategory(CATEGORY_DAMAGE) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetRange(LOCATION_GRAVE) - e3:SetCost(c77679716.damcost) - e3:SetTarget(c77679716.damtg) - e3:SetOperation(c77679716.damop) - c:RegisterEffect(e3) -end -function c77679716.filter(c) - return c:IsFaceup() and c:IsSetCard(0x9a) -end -function c77679716.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c77679716.filter(chkc) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingTarget(c77679716.filter,tp,LOCATION_MZONE,0,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c77679716.filter,tp,LOCATION_MZONE,0,1,1,e:GetHandler()) -end -function c77679716.eqop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) then return end - if c:IsLocation(LOCATION_MZONE) and c:IsFacedown() then return end - local tc=Duel.GetFirstTarget() - if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or tc:GetControler()~=tp or tc:IsFacedown() or not tc:IsRelateToEffect(e) then - Duel.SendtoGrave(c,REASON_EFFECT) - return - end - Duel.Equip(tp,c,tc,true) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(c77679716.eqlimit) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_UPDATE_DEFENCE) - e2:SetValue(-1000) - e2:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e2) -end -function c77679716.eqlimit(e,c) - return c:IsSetCard(0x9a) -end -function c77679716.cfilter(c) - return c:IsCode(77679716) and c:IsAbleToRemoveAsCost() -end -function c77679716.damcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end - local g=Duel.GetMatchingGroup(c77679716.cfilter,tp,LOCATION_GRAVE,0,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c77679716.damfilter(c) - return c:IsFaceup() and c:IsSetCard(0x9a) and c:GetDefence()0 then - local tg=g:GetMaxGroup(Card.GetAttack) - if tg:GetCount()>1 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local sg=tg:Select(tp,1,1,nil) - Duel.Destroy(sg,REASON_EFFECT) - else Duel.Destroy(tg,REASON_EFFECT) end - end -end diff --git a/script/c77778835.lua b/script/c77778835.lua deleted file mode 100644 index ea57824f65..0000000000 --- a/script/c77778835.lua +++ /dev/null @@ -1,53 +0,0 @@ ---ヒステリック・パーティー -function c77778835.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_END_PHASE) - e1:SetCost(c77778835.cost) - e1:SetTarget(c77778835.target) - e1:SetOperation(c77778835.operation) - c:RegisterEffect(e1) - --Destroy - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE) - e2:SetCode(EVENT_LEAVE_FIELD) - e2:SetOperation(c77778835.desop) - c:RegisterEffect(e2) -end -function c77778835.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) -end -function c77778835.filter(c,e,tp) - return c:IsCode(76812113) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c77778835.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c77778835.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE) -end -function c77778835.operation(e,tp,eg,ep,ev,re,r,rp) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ft<=0 then return end - local c=e:GetHandler() - if not c:IsRelateToEffect(e) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c77778835.filter,tp,LOCATION_GRAVE,0,ft,ft,nil,e,tp) - local tc=g:GetFirst() - while tc do - Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) - c:SetCardTarget(tc) - tc=g:GetNext() - end - Duel.SpecialSummonComplete() -end -function c77778835.desfilter(c,rc) - return rc:IsHasCardTarget(c) -end -function c77778835.desop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c77778835.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,e:GetHandler()) - Duel.Destroy(g,REASON_EFFECT) -end diff --git a/script/c77783947.lua b/script/c77783947.lua deleted file mode 100644 index a5c1b88862..0000000000 --- a/script/c77783947.lua +++ /dev/null @@ -1,73 +0,0 @@ ---竜星の極み -function c77783947.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --must attack - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_MUST_ATTACK) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(0,LOCATION_MZONE) - c:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetCode(EFFECT_CANNOT_EP) - e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e3:SetRange(LOCATION_SZONE) - e3:SetTargetRange(0,1) - e3:SetCondition(c77783947.becon) - c:RegisterEffect(e3) - --synchro effect - local e4=Effect.CreateEffect(c) - e4:SetCategory(CATEGORY_SPECIAL_SUMMON) - e4:SetType(EFFECT_TYPE_QUICK_O) - e4:SetCode(EVENT_FREE_CHAIN) - e4:SetHintTiming(0,TIMING_BATTLE_START+TIMING_BATTLE_END) - e4:SetRange(LOCATION_SZONE) - e4:SetCondition(c77783947.sccon) - e4:SetCost(c77783947.sccost) - e4:SetTarget(c77783947.sctg) - e4:SetOperation(c77783947.scop) - c:RegisterEffect(e4) -end -function c77783947.becon(e) - return Duel.IsExistingMatchingCard(Card.IsAttackable,e:GetHandlerPlayer(),0,LOCATION_MZONE,1,nil) -end -function c77783947.sccon(e,tp,eg,ep,ev,re,r,rp) - local ph=Duel.GetCurrentPhase() - return ph==PHASE_MAIN1 or ph==PHASE_BATTLE or ph==PHASE_MAIN2 -end -function c77783947.mfilter(c) - return c:IsSetCard(0x9e) -end -function c77783947.cfilter(c,syn) - return syn:IsSynchroSummonable(c) -end -function c77783947.spfilter(c,mg) - return mg:IsExists(c77783947.cfilter,1,nil,c) -end -function c77783947.sccost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end -function c77783947.sctg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local mg=Duel.GetMatchingGroup(c77783947.mfilter,tp,LOCATION_MZONE,0,nil) - return Duel.IsExistingMatchingCard(c77783947.spfilter,tp,LOCATION_EXTRA,0,1,nil,mg) - end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function c77783947.scop(e,tp,eg,ep,ev,re,r,rp) - local mg=Duel.GetMatchingGroup(c77783947.mfilter,tp,LOCATION_MZONE,0,nil) - local g=Duel.GetMatchingGroup(c77783947.spfilter,tp,LOCATION_EXTRA,0,nil,mg) - if g:GetCount()>0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=g:Select(tp,1,1,nil) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SMATERIAL) - local tg=mg:FilterSelect(tp,c77783947.cfilter,1,1,nil,sg:GetFirst()) - Duel.SynchroSummon(tp,sg:GetFirst(),tg:GetFirst()) - end -end diff --git a/script/c77797992.lua b/script/c77797992.lua deleted file mode 100644 index e3a87a3a7e..0000000000 --- a/script/c77797992.lua +++ /dev/null @@ -1,39 +0,0 @@ ---森の聖獣 アルパカリブ -function c77797992.initial_effect(c) - --indes1 - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetCondition(c77797992.cona) - e1:SetTarget(c77797992.targeta) - e1:SetValue(1) - c:RegisterEffect(e1) - --cannot be target - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) - e2:SetRange(LOCATION_MZONE) - e2:SetTargetRange(LOCATION_MZONE,0) - e2:SetCondition(c77797992.cond) - e2:SetTarget(c77797992.targetd) - e2:SetValue(aux.tgval) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - e3:SetValue(1) - c:RegisterEffect(e3) -end -function c77797992.cona(e) - return e:GetHandler():IsAttackPos() -end -function c77797992.targeta(e,c) - return c:IsPosition(POS_FACEUP_ATTACK) and c:IsRace(RACE_WINDBEAST+RACE_PLANT+RACE_INSECT) -end -function c77797992.cond(e) - return e:GetHandler():IsDefencePos() -end -function c77797992.targetd(e,c) - return c:IsPosition(POS_FACEUP_DEFENCE) and c:IsRace(RACE_WINDBEAST+RACE_PLANT+RACE_INSECT) -end diff --git a/script/c77799846.lua b/script/c77799846.lua deleted file mode 100644 index c75f940e37..0000000000 --- a/script/c77799846.lua +++ /dev/null @@ -1,87 +0,0 @@ ---廃品眼の太鼓竜 -function c77799846.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsRace,RACE_MACHINE),8,2) - c:EnableReviveLimit() - --attack up - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetDescription(aux.Stringid(77799846,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c77799846.cost) - e1:SetOperation(c77799846.operation) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(77799846,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY+EFFECT_FLAG_CVAL_CHECK) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetCondition(c77799846.spcon) - e2:SetCost(c77799846.spcost) - e2:SetTarget(c77799846.sptg) - e2:SetOperation(c77799846.spop) - e2:SetValue(c77799846.valcheck) - c:RegisterEffect(e2) -end -function c77799846.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c77799846.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_COPY_INHERIT) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(1000) - e1:SetReset(RESET_EVENT+0x1ff0000+RESET_PHASE+PHASE_END,2) - c:RegisterEffect(e1) - end -end -function c77799846.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsReason(REASON_DESTROY) and e:GetHandler():GetOverlayCount()>0 -end -function c77799846.rfilter(c) - return c:IsSetCard(0x85) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost() -end -function c77799846.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - if Duel.GetFlagEffect(tp,77799846)==0 then - Duel.RegisterFlagEffect(tp,77799846,RESET_CHAIN,0,1) - c77799846[0]=Duel.GetMatchingGroupCount(c77799846.rfilter,tp,LOCATION_GRAVE,0,nil) - c77799846[1]=0 - end - return c77799846[0]-c77799846[1]>=1 - end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c77799846.rfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c77799846.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c77799846.mfilter(c) - return c:IsSetCard(0x85) and c:IsType(TYPE_MONSTER) and not c:IsHasEffect(EFFECT_NECRO_VALLEY) -end -function c77799846.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then - local g=Duel.GetMatchingGroup(c77799846.mfilter,tp,LOCATION_GRAVE,0,nil) - if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(77799846,2)) then - Duel.BreakEffect() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL) - local mg=g:Select(tp,1,1,nil) - Duel.Overlay(c,mg) - end - end -end -function c77799846.valcheck(e) - c77799846[1]=c77799846[1]+1 -end diff --git a/script/c77841719.lua b/script/c77841719.lua deleted file mode 100644 index 95a9f151e5..0000000000 --- a/script/c77841719.lua +++ /dev/null @@ -1,46 +0,0 @@ ---ヴェルズ・コッペリアル -function c77841719.initial_effect(c) - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - c:RegisterEffect(e1) - --control - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_CONTROL) - e2:SetDescription(aux.Stringid(77841719,0)) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_LEAVE_FIELD) - e2:SetCondition(c77841719.condition) - e2:SetTarget(c77841719.target) - e2:SetOperation(c77841719.operation) - c:RegisterEffect(e2) -end -function c77841719.condition(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsPreviousPosition(POS_FACEUP) and not c:IsLocation(LOCATION_DECK) - and c:GetPreviousControler()==tp and rp~=tp -end -function c77841719.filter(c) - return c:IsFaceup() and c:IsControlerCanBeChanged() -end -function c77841719.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c77841719.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c77841719.filter,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) - local g=Duel.SelectTarget(tp,c77841719.filter,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0) -end -function c77841719.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - local tct=1 - if Duel.GetTurnPlayer()~=tp then tct=2 - elseif Duel.GetCurrentPhase()==PHASE_END then tct=3 end - if tc:IsFaceup() and tc:IsRelateToEffect(e) and not Duel.GetControl(tc,tp,PHASE_END,tct) then - if not tc:IsImmuneToEffect(e) and tc:IsAbleToChangeControler() then - Duel.Destroy(tc,REASON_EFFECT) - end - end -end diff --git a/script/c77847678.lua b/script/c77847678.lua deleted file mode 100644 index fc10a33692..0000000000 --- a/script/c77847678.lua +++ /dev/null @@ -1,33 +0,0 @@ ---紫炎の計略 -function c77847678.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetCondition(c77847678.condition) - e1:SetTarget(c77847678.target) - e1:SetOperation(c77847678.activate) - c:RegisterEffect(e1) -end -function c77847678.condition(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(Card.IsSetCard,1,nil,0x3d) -end -function c77847678.filter(c,e,tp) - return c:IsSetCard(0x3d) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c77847678.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c77847678.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c77847678.activate(e,tp,eg,ep,ev,re,r,rp) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ft<=0 then return end - if ft>2 then ft=2 end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c77847678.filter,tp,LOCATION_HAND,0,1,ft,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c77859858.lua b/script/c77859858.lua deleted file mode 100644 index f9476f004a..0000000000 --- a/script/c77859858.lua +++ /dev/null @@ -1,77 +0,0 @@ ---破滅へのクイック・ドロー -function c77859858.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --leave - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e3:SetCode(EVENT_LEAVE_FIELD) - e3:SetOperation(c77859858.leave) - c:RegisterEffect(e3) - --Draw - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e4:SetCode(EVENT_PREDRAW) - e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e4:SetRange(LOCATION_SZONE) - e4:SetOperation(c77859858.pdraw) - c:RegisterEffect(e4) - local e5=Effect.CreateEffect(c) - e5:SetDescription(aux.Stringid(77859858,0)) - e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e5:SetCategory(CATEGORY_DRAW) - e5:SetRange(LOCATION_SZONE) - e5:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e5:SetCode(EVENT_DRAW) - e5:SetCondition(c77859858.drcon) - e5:SetTarget(c77859858.drtg) - e5:SetOperation(c77859858.drop) - e5:SetLabelObject(e4) - c:RegisterEffect(e5) - --cost - local e6=Effect.CreateEffect(c) - e6:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e6:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e6:SetRange(LOCATION_SZONE) - e6:SetCode(EVENT_PHASE+PHASE_END) - e6:SetCountLimit(1) - e6:SetCondition(c77859858.costcon) - e6:SetOperation(c77859858.costop) - c:RegisterEffect(e6) -end -function c77859858.leave(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:GetPreviousControler()==tp and c:IsStatus(STATUS_ACTIVATED) then - Duel.Damage(tp,3000,REASON_EFFECT) - end -end -function c77859858.pdraw(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetFieldGroupCount(ep,LOCATION_HAND,0)==0 then e:SetLabel(1) - else e:SetLabel(0) end -end -function c77859858.drcon(e,tp,eg,ep,ev,re,r,rp) - return r==REASON_RULE and e:GetLabelObject():GetLabel()==1 -end -function c77859858.drtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(ep) - Duel.SetTargetParam(1) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,ep,1) -end -function c77859858.drop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end -function c77859858.costcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c77859858.costop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLP(tp)>=700 then - Duel.PayLPCost(tp,700) - else - Duel.SetLP(tp,0) - end -end diff --git a/script/c77864539.lua b/script/c77864539.lua deleted file mode 100644 index 5b00bf1375..0000000000 --- a/script/c77864539.lua +++ /dev/null @@ -1,41 +0,0 @@ ---機皇廠 -function c77864539.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_DESTROY) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_BE_BATTLE_TARGET) - e1:SetCondition(c77864539.condition) - e1:SetTarget(c77864539.target) - e1:SetOperation(c77864539.activate) - c:RegisterEffect(e1) -end -function c77864539.condition(e,tp,eg,ep,ev,re,r,rp) - local d=Duel.GetAttackTarget() - return d:IsFaceup() and d:IsSetCard(0x13) -end -function c77864539.filter(c) - return c:IsSetCard(0x6013) and c:IsAbleToHand() -end -function c77864539.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c77864539.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c77864539.filter,tp,LOCATION_GRAVE,0,1,nil) - and Duel.GetAttackTarget():IsDestructable() end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c77864539.filter,tp,LOCATION_GRAVE,0,1,1,nil) - local d=Duel.GetAttackTarget() - d:RegisterFlagEffect(77864539,RESET_EVENT+0x3fe0000,0,1) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,d,1,0,0) -end -function c77864539.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - local d=Duel.GetAttackTarget() - if d:GetFlagEffect(77864539)~=0 then - Duel.Destroy(d,REASON_EFFECT) - end - end -end diff --git a/script/c77876207.lua b/script/c77876207.lua deleted file mode 100644 index 2599a9ba23..0000000000 --- a/script/c77876207.lua +++ /dev/null @@ -1,30 +0,0 @@ ---財宝への隠し通路 -function c77876207.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c77876207.target) - e1:SetOperation(c77876207.activate) - c:RegisterEffect(e1) -end -function c77876207.filter(c) - return c:IsFaceup() and c:IsAttackBelow(1000) -end -function c77876207.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c77876207.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c77876207.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c77876207.filter,tp,LOCATION_MZONE,0,1,1,nil) -end -function c77876207.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DIRECT_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - end -end diff --git a/script/c77901552.lua b/script/c77901552.lua deleted file mode 100644 index c2088510dc..0000000000 --- a/script/c77901552.lua +++ /dev/null @@ -1,69 +0,0 @@ ---聖刻龍-トフェニドラゴン -function c77901552.initial_effect(c) - --spsummon from hand - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetRange(LOCATION_HAND) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetCondition(c77901552.hspcon) - e1:SetOperation(c77901552.hspop) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(77901552,0)) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetCode(EVENT_RELEASE) - e2:SetTarget(c77901552.sptg) - e2:SetOperation(c77901552.spop) - c:RegisterEffect(e2) -end -function c77901552.hspcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 - and Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)~=0 -end -function c77901552.hspop(e,tp,eg,ep,ev,re,r,rp,c) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetReset(RESET_EVENT+0xfe0000+RESET_PHASE+PHASE_END) - c:RegisterEffect(e1) -end -function c77901552.spfilter(c,e,tp) - return c:IsType(TYPE_NORMAL) and c:IsRace(RACE_DRAGON) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) - and not c:IsHasEffect(EFFECT_NECRO_VALLEY) -end -function c77901552.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,0x13) -end -function c77901552.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c77901552.spfilter,tp,0x13,0,1,1,nil,e,tp) - local tc=g:GetFirst() - if tc and Duel.SpecialSummonStep(g:GetFirst(),0,tp,tp,false,false,POS_FACEUP) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK) - e1:SetValue(0) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_SET_DEFENCE) - tc:RegisterEffect(e2) - Duel.SpecialSummonComplete() - elseif Duel.IsPlayerCanSpecialSummon(tp) then - local cg1=Duel.GetFieldGroup(tp,LOCATION_HAND,0) - local cg2=Duel.GetFieldGroup(tp,LOCATION_DECK,0) - Duel.ConfirmCards(1-tp,cg1) - Duel.ConfirmCards(1-tp,cg2) - Duel.ConfirmCards(tp,cg2) - Duel.ShuffleHand(tp) - Duel.ShuffleDeck(tp) - end -end diff --git a/script/c77910045.lua b/script/c77910045.lua deleted file mode 100644 index ef2fd4abb4..0000000000 --- a/script/c77910045.lua +++ /dev/null @@ -1,28 +0,0 @@ ---死の演算盤 -function c77910045.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --damage - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetRange(LOCATION_SZONE) - e2:SetOperation(c77910045.operation) - c:RegisterEffect(e2) -end -function c77910045.filter(c,tp) - return c:IsPreviousLocation(LOCATION_MZONE) and c:IsControler(tp) and c:IsType(TYPE_MONSTER) -end -function c77910045.operation(e,tp,eg,ep,ev,re,r,rp) - local ct=eg:FilterCount(c77910045.filter,nil,tp) - if ct>0 then - Duel.Damage(tp,500*ct,REASON_EFFECT) - end - ct=eg:FilterCount(c77910045.filter,nil,1-tp) - if ct>0 then - Duel.Damage(1-tp,500*ct,REASON_EFFECT) - end -end diff --git a/script/c77936940.lua b/script/c77936940.lua deleted file mode 100644 index 359965a2f6..0000000000 --- a/script/c77936940.lua +++ /dev/null @@ -1,42 +0,0 @@ ---ゲルニア -function c77936940.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetOperation(c77936940.reg) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(77936940,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetRange(LOCATION_GRAVE) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) - e2:SetCondition(c77936940.spcon) - e2:SetTarget(c77936940.sptg) - e2:SetOperation(c77936940.spop) - c:RegisterEffect(e2) -end -function c77936940.reg(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if bit.band(r,0x41)==0x41 and rp==1-tp and c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_ONFIELD) - and c:IsPreviousPosition(POS_FACEUP) then - c:RegisterFlagEffect(77936940,RESET_EVENT+0x1fe0000,0,1) - end -end -function c77936940.spcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:GetTurnID()~=Duel.GetTurnCount() and tp==Duel.GetTurnPlayer() and c:GetFlagEffect(77936940)>0 -end -function c77936940.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local c=e:GetHandler() - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0) - c:ResetFlagEffect(77936940) -end -function c77936940.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c77972406.lua b/script/c77972406.lua deleted file mode 100644 index 7dbeb91d6d..0000000000 --- a/script/c77972406.lua +++ /dev/null @@ -1,30 +0,0 @@ ---反撃の毒牙 -function c77972406.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetCondition(c77972406.condition) - e1:SetTarget(c77972406.target) - e1:SetOperation(c77972406.activate) - c:RegisterEffect(e1) -end -function c77972406.condition(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetAttackTarget() - return tc and tc:IsControler(tp) and tc:IsFaceup() and tc:IsSetCard(0x50) -end -function c77972406.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local tg=Duel.GetAttacker() - if chkc then return chkc==tg end - if chk==0 then return tg:IsOnField() and tg:IsCanBeEffectTarget(e) end - Duel.SetTargetCard(tg) -end -function c77972406.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetAttacker() - if tc:IsRelateToEffect(e) and Duel.NegateAttack() then - Duel.SkipPhase(1-tp,PHASE_BATTLE,RESET_PHASE+PHASE_BATTLE,1) - Duel.BreakEffect() - tc:AddCounter(0x9,1) - end -end diff --git a/script/c78004197.lua b/script/c78004197.lua deleted file mode 100644 index ad465b6b1d..0000000000 --- a/script/c78004197.lua +++ /dev/null @@ -1,43 +0,0 @@ ---暗黒界の武神 ゴルド -function c78004197.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(78004197,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCondition(c78004197.spcon) - e1:SetTarget(c78004197.sptg) - e1:SetOperation(c78004197.spop) - c:RegisterEffect(e1) -end -function c78004197.spcon(e,tp,eg,ep,ev,re,r,rp) - e:SetLabel(e:GetHandler():GetPreviousControler()) - return e:GetHandler():IsPreviousLocation(LOCATION_HAND) and bit.band(r,0x4040)==0x4040 -end -function c78004197.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and chkc:IsDestructable() end - if chk==0 then return true end - if rp~=tp and tp==e:GetLabel() and Duel.IsExistingTarget(Card.IsDestructable,tp,0,LOCATION_ONFIELD,1,nil) - and Duel.SelectYesNo(tp,aux.Stringid(78004197,1)) then - e:SetProperty(EFFECT_FLAG_CARD_TARGET) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,0,LOCATION_ONFIELD,1,2,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) - e:SetLabel(1) - else - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) - e:SetProperty(0) - e:SetLabel(0) - end -end -function c78004197.spop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) and Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP)>0 and e:GetLabel()==1 then - Duel.BreakEffect() - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - if not g then return end - local sg=g:Filter(Card.IsRelateToEffect,nil,e) - Duel.Destroy(sg,REASON_EFFECT) - end -end diff --git a/script/c78009994.lua b/script/c78009994.lua deleted file mode 100644 index f54e86c81d..0000000000 --- a/script/c78009994.lua +++ /dev/null @@ -1,49 +0,0 @@ ---ドラゴニック・ガード -function c78009994.initial_effect(c) - --add counter - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetOperation(c78009994.ctop) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_MSET) - c:RegisterEffect(e2) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetDescription(aux.Stringid(78009994,0)) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCost(c78009994.spcost) - e2:SetTarget(c78009994.sptg) - e2:SetOperation(c78009994.spop) - c:RegisterEffect(e2) -end -function c78009994.ctop(e,tp,eg,ep,ev,re,r,rp) - if eg:GetFirst()~=e:GetHandler() then - e:GetHandler():AddCounter(0x22,1) - end -end -function c78009994.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - e:SetLabel(e:GetHandler():GetCounter(0x22)) - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end -function c78009994.spfilter(c,lv,e,tp) - return c:IsLevelBelow(lv) and c:IsRace(RACE_DRAGON) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c78009994.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsExistingMatchingCard(c78009994.spfilter,tp,LOCATION_DECK,0,1,nil,e:GetHandler():GetCounter(0x22),e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c78009994.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c78009994.spfilter,tp,LOCATION_DECK,0,1,1,nil,e:GetLabel(),e,tp) - if g:GetCount()~=0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c78010363.lua b/script/c78010363.lua deleted file mode 100644 index ab5e1c2e5c..0000000000 --- a/script/c78010363.lua +++ /dev/null @@ -1,31 +0,0 @@ ---黒き森のウィッチ -function c78010363.initial_effect(c) - --search - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(78010363,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCondition(c78010363.condition) - e1:SetTarget(c78010363.target) - e1:SetOperation(c78010363.operation) - c:RegisterEffect(e1) -end -function c78010363.condition(e,tp,eg,ep,ev,re,r,rp) - return bit.band(e:GetHandler():GetPreviousLocation(),LOCATION_ONFIELD)>0 -end -function c78010363.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c78010363.filter(c) - return c:IsDefenceBelow(1500) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() -end -function c78010363.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c78010363.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c7802006.lua b/script/c7802006.lua deleted file mode 100644 index ac06ae0a82..0000000000 --- a/script/c7802006.lua +++ /dev/null @@ -1,21 +0,0 @@ ---魔草 マンドラゴラ -function c7802006.initial_effect(c) - --flip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(7802006,0)) - e1:SetCategory(CATEGORY_COUNTER) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP) - e1:SetOperation(c7802006.operation) - c:RegisterEffect(e1) -end -function c7802006.filter(c) - return c:IsFaceup() and c:IsCanAddCounter(0x3001,1) -end -function c7802006.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c7802006.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) - local tc=g:GetFirst() - while tc do - tc:AddCounter(0x3001,1) - tc=g:GetNext() - end -end diff --git a/script/c78033100.lua b/script/c78033100.lua deleted file mode 100644 index 47daac54dc..0000000000 --- a/script/c78033100.lua +++ /dev/null @@ -1,72 +0,0 @@ ---聖刻龍-ドラゴンゲイヴ -function c78033100.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(78033100,0)) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetCode(EVENT_BATTLE_DESTROYING) - e1:SetCondition(c78033100.spcon) - e1:SetTarget(c78033100.sptg) - e1:SetOperation(c78033100.spop) - e1:SetLabel(0) - c:RegisterEffect(e1) - -- - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(78033100,0)) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetCode(EVENT_RELEASE) - e2:SetTarget(c78033100.sptg) - e2:SetOperation(c78033100.spop) - e2:SetLabel(1) - c:RegisterEffect(e2) -end -function c78033100.spcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local bc=c:GetBattleTarget() - return c:IsRelateToBattle() and c:IsFaceup() and bc:IsLocation(LOCATION_GRAVE) and bc:IsReason(REASON_BATTLE) -end -function c78033100.spfilter1(c,e,tp) - return c:IsType(TYPE_NORMAL) and c:IsRace(RACE_DRAGON) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) - and not c:IsHasEffect(EFFECT_NECRO_VALLEY) -end -function c78033100.spfilter2(c,e,tp) - return c:IsType(TYPE_NORMAL) and c:IsSetCard(0x69) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) - and not c:IsHasEffect(EFFECT_NECRO_VALLEY) -end -function c78033100.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,0x13) -end -function c78033100.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=nil - if e:GetLabel()==0 then - g=Duel.SelectMatchingCard(tp,c78033100.spfilter1,tp,0x13,0,1,1,nil,e,tp) - else - g=Duel.SelectMatchingCard(tp,c78033100.spfilter2,tp,0x13,0,1,1,nil,e,tp) - end - local tc=g:GetFirst() - if tc and Duel.SpecialSummonStep(g:GetFirst(),0,tp,tp,false,false,POS_FACEUP) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK) - e1:SetValue(0) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_SET_DEFENCE) - tc:RegisterEffect(e2) - Duel.SpecialSummonComplete() - elseif Duel.IsPlayerCanSpecialSummon(tp) then - local cg1=Duel.GetFieldGroup(tp,LOCATION_HAND,0) - local cg2=Duel.GetFieldGroup(tp,LOCATION_DECK,0) - Duel.ConfirmCards(1-tp,cg1) - Duel.ConfirmCards(1-tp,cg2) - Duel.ConfirmCards(tp,cg2) - Duel.ShuffleHand(tp) - Duel.ShuffleDeck(tp) - end -end diff --git a/script/c78053598.lua b/script/c78053598.lua deleted file mode 100644 index b4629dfe8d..0000000000 --- a/script/c78053598.lua +++ /dev/null @@ -1,31 +0,0 @@ ---闇の指名者 -function c78053598.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c78053598.target) - e1:SetOperation(c78053598.activate) - c:RegisterEffect(e1) -end -function c78053598.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,0,LOCATION_DECK,1,nil) end -end -function c78053598.filter(c,code) - return c:IsType(TYPE_MONSTER) and c:IsCode(code) and c:IsAbleToHand() -end -function c78053598.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,564) - local code=Duel.AnnounceCard(tp) - Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(1-tp,c78053598.filter,1-tp,LOCATION_DECK,0,1,1,nil,code) - local tc=g:GetFirst() - if tc then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(tp,tc) - else - local dg=Duel.GetFieldGroup(tp,0,LOCATION_DECK) - Duel.ConfirmCards(tp,dg) - Duel.ShuffleDeck(1-tp) - end -end diff --git a/script/c78082039.lua b/script/c78082039.lua deleted file mode 100644 index 229efadf6c..0000000000 --- a/script/c78082039.lua +++ /dev/null @@ -1,47 +0,0 @@ ---クローザー・フォレスト -function c78082039.initial_effect(c) - --activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --atkup - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(LOCATION_MZONE,0) - e2:SetTarget(aux.TargetBoolFunction(Card.IsRace,RACE_BEAST)) - e2:SetValue(c78082039.val) - c:RegisterEffect(e2) - --cannot activate - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetCode(EFFECT_CANNOT_ACTIVATE) - e3:SetRange(LOCATION_SZONE) - e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e3:SetTargetRange(1,1) - e3:SetValue(c78082039.efilter) - c:RegisterEffect(e3) - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e4:SetCode(EVENT_DESTROYED) - e4:SetOperation(c78082039.desop) - c:RegisterEffect(e4) -end -function c78082039.val(e,c) - return Duel.GetMatchingGroupCount(Card.IsType,e:GetHandlerPlayer(),LOCATION_GRAVE,0,nil,TYPE_MONSTER)*100 -end -function c78082039.efilter(e,re,tp) - return re:GetHandler():IsType(TYPE_FIELD) and re:IsHasType(EFFECT_TYPE_ACTIVATE) -end -function c78082039.desop(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetTargetRange(1,1) - e1:SetValue(c78082039.efilter) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) -end diff --git a/script/c7811875.lua b/script/c7811875.lua deleted file mode 100644 index 4c37c706ef..0000000000 --- a/script/c7811875.lua +++ /dev/null @@ -1,55 +0,0 @@ ---重力崩壊 -function c7811875.initial_effect(c) - --Activate(summon) - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DISABLE_SUMMON+CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_SUMMON) - e1:SetCondition(c7811875.condition) - e1:SetCost(c7811875.cost) - e1:SetTarget(c7811875.target) - e1:SetOperation(c7811875.activate) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_FLIP_SUMMON) - c:RegisterEffect(e2) - local e3=e1:Clone() - e3:SetCode(EVENT_SPSUMMON) - c:RegisterEffect(e3) -end -function c7811875.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentChain()==0 and eg:IsExists(Card.IsControler,1,nil,1-tp) -end -function c7811875.cfilter(c) - return c:IsFaceup() and c:IsType(TYPE_SYNCHRO) and c:IsAbleToGraveAsCost() -end -function c7811875.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c7811875.cfilter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c7811875.cfilter,tp,LOCATION_MZONE,0,1,1,nil) - Duel.SendtoGrave(g,REASON_COST) -end -function c7811875.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local g=eg:Filter(Card.IsControler,nil,1-tp) - Duel.SetOperationInfo(0,CATEGORY_DISABLE_SUMMON,g,g:GetCount(),0,0) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c7811875.activate(e,tp,eg,ep,ev,re,r,rp) - local g=eg:Filter(Card.IsControler,nil,1-tp) - Duel.NegateSummon(g) - Duel.Destroy(g,REASON_EFFECT) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) - e1:SetTargetRange(0,1) - Duel.RegisterEffect(e1,tp) - local e2=e1:Clone() - e2:SetCode(EFFECT_CANNOT_SUMMON) - Duel.RegisterEffect(e2,tp) - local e3=e2:Clone() - e3:SetCode(EFFECT_CANNOT_FLIP_SUMMON) - Duel.RegisterEffect(e3,tp) -end diff --git a/script/c78121572.lua b/script/c78121572.lua deleted file mode 100644 index 44138b085a..0000000000 --- a/script/c78121572.lua +++ /dev/null @@ -1,38 +0,0 @@ ---黒魔力の精製者 -function c78121572.initial_effect(c) - --counter - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(78121572,0)) - e1:SetCategory(CATEGORY_COUNTER) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCondition(c78121572.con) - e1:SetTarget(c78121572.tg) - e1:SetOperation(c78121572.op) - c:RegisterEffect(e1) -end -function c78121572.con(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPosition(POS_FACEUP_ATTACK) -end -function c78121572.filter(c) - return c:IsFaceup() and c:IsCanAddCounter(0x3001,1) -end -function c78121572.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsControler(tp) and c78121572.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c78121572.filter,tp,LOCATION_ONFIELD,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(78121572,1)) - local g=Duel.SelectTarget(tp,c78121572.filter,tp,LOCATION_ONFIELD,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,1,0,0x3001) -end -function c78121572.op(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and c:IsPosition(POS_FACEUP_ATTACK) then - Duel.ChangePosition(c,POS_FACEUP_DEFENCE) - if tc:IsRelateToEffect(e) then - tc:AddCounter(0x3001,1) - end - end -end diff --git a/script/c78156759.lua b/script/c78156759.lua deleted file mode 100644 index 56eae647af..0000000000 --- a/script/c78156759.lua +++ /dev/null @@ -1,51 +0,0 @@ ---発条機雷ゼンマイン -function c78156759.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,3,2) - c:EnableReviveLimit() - --destroy replace - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetCode(EFFECT_DESTROY_REPLACE) - e1:SetRange(LOCATION_MZONE) - e1:SetTarget(c78156759.reptg) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(78156759,1)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_PHASE+PHASE_END) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCondition(c78156759.descon) - e2:SetTarget(c78156759.destg) - e2:SetOperation(c78156759.desop) - c:RegisterEffect(e2) -end -function c78156759.reptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_EFFECT) end - if Duel.SelectYesNo(tp,aux.Stringid(78156759,0)) then - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_EFFECT) - e:GetHandler():RegisterFlagEffect(78156759,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) - return true - else return false end -end -function c78156759.descon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetFlagEffect(78156759)~=0 -end -function c78156759.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsDestructable() end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c78156759.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c7817703.lua b/script/c7817703.lua deleted file mode 100644 index 4d04d90001..0000000000 --- a/script/c7817703.lua +++ /dev/null @@ -1,75 +0,0 @@ ---D・パワーユニット -function c7817703.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c7817703.target) - e1:SetOperation(c7817703.operation) - c:RegisterEffect(e1) - --Atk Change - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_SET_ATTACK) - e2:SetValue(c7817703.value) - c:RegisterEffect(e2) - --Equip limit - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_EQUIP_LIMIT) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e3:SetValue(c7817703.eqlimit) - c:RegisterEffect(e3) -end -function c7817703.eqlimit(e,c) - return c:IsSetCard(0x26) and c:GetLevel()==3 -end -function c7817703.filter(c) - return c:IsFaceup() and c:IsSetCard(0x26) and c:GetLevel()==3 -end -function c7817703.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c7817703.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c7817703.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c7817703.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c7817703.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,e:GetHandler(),tc) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) - e1:SetRange(LOCATION_SZONE) - e1:SetCountLimit(1) - e1:SetLabel(Duel.GetTurnCount()) - e1:SetCondition(c7817703.descon) - e1:SetTarget(c7817703.destg) - e1:SetOperation(c7817703.desop) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END+RESET_SELF_TURN,3) - e:GetHandler():RegisterEffect(e1) - end -end -function c7817703.value(e,c) - return c:GetBaseAttack()*2 -end -function c7817703.descon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnCount()-e:GetLabel()==4 -end -function c7817703.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,tp,0) -end -function c7817703.desop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - local dam=c:GetEquipTarget():GetBaseAttack() - if Duel.Destroy(e:GetHandler(),REASON_EFFECT)==0 then return end - Duel.Damage(tp,dam,REASON_EFFECT) - end -end diff --git a/script/c78184733.lua b/script/c78184733.lua deleted file mode 100644 index 91850139ae..0000000000 --- a/script/c78184733.lua +++ /dev/null @@ -1,42 +0,0 @@ ---エンタメ・フラッシュ -function c78184733.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_POSITION) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c78184733.condition) - e1:SetTarget(c78184733.target) - e1:SetOperation(c78184733.activate) - c:RegisterEffect(e1) -end -function c78184733.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x9f) -end -function c78184733.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c78184733.cfilter,tp,LOCATION_MZONE,0,1,nil) -end -function c78184733.filter(c) - return c:IsPosition(POS_FACEUP_ATTACK) -end -function c78184733.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c78184733.filter,tp,0,LOCATION_MZONE,1,nil) end - local g=Duel.GetMatchingGroup(c78184733.filter,tp,0,LOCATION_MZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_POSITION,g,g:GetCount(),0,0) -end -function c78184733.activate(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local g=Duel.GetMatchingGroup(c78184733.filter,tp,0,LOCATION_MZONE,nil) - if g:GetCount()>0 then - Duel.ChangePosition(g,POS_FACEUP_DEFENCE) - local tc=g:GetFirst() - while tc do - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_CHANGE_POSITION) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,2) - tc:RegisterEffect(e1) - tc=g:GetNext() - end - end -end diff --git a/script/c78193831.lua b/script/c78193831.lua deleted file mode 100644 index 914de47f42..0000000000 --- a/script/c78193831.lua +++ /dev/null @@ -1,17 +0,0 @@ ---バスター・ブレイダー -function c78193831.initial_effect(c) - --atkup - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetRange(LOCATION_MZONE) - e1:SetValue(c78193831.val) - c:RegisterEffect(e1) -end -function c78193831.val(e,c) - return Duel.GetMatchingGroupCount(c78193831.filter,c:GetControler(),0,LOCATION_GRAVE+LOCATION_MZONE,nil)*500 -end -function c78193831.filter(c) - return c:IsRace(RACE_DRAGON) and (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup()) -end diff --git a/script/c78211862.lua b/script/c78211862.lua deleted file mode 100644 index aa106c89b3..0000000000 --- a/script/c78211862.lua +++ /dev/null @@ -1,39 +0,0 @@ ---ライジング・エナジー -function c78211862.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetCondition(c78211862.condition) - e1:SetCost(c78211862.cost) - e1:SetTarget(c78211862.target) - e1:SetOperation(c78211862.activate) - c:RegisterEffect(e1) -end -function c78211862.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end -function c78211862.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) -end -function c78211862.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) -end -function c78211862.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - e1:SetValue(1500) - tc:RegisterEffect(e1) - end -end diff --git a/script/c78243409.lua b/script/c78243409.lua deleted file mode 100644 index 4f6254893b..0000000000 --- a/script/c78243409.lua +++ /dev/null @@ -1,34 +0,0 @@ ---火口に潜む者 -function c78243409.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(78243409,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCondition(c78243409.condition) - e1:SetTarget(c78243409.target) - e1:SetOperation(c78243409.operation) - c:RegisterEffect(e1) -end -function c78243409.condition(e,tp,eg,ep,ev,re,r,rp) - local pl=e:GetHandler():GetPreviousLocation() - return bit.band(r,REASON_DESTROY)~=0 and bit.band(pl,LOCATION_ONFIELD)~=0 -end -function c78243409.filter(c,e,sp) - return c:IsRace(RACE_PYRO) and c:IsCanBeSpecialSummoned(e,0,sp,false,false) -end -function c78243409.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c78243409.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c78243409.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c78243409.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c78266168.lua b/script/c78266168.lua deleted file mode 100644 index 04667e6a84..0000000000 --- a/script/c78266168.lua +++ /dev/null @@ -1,47 +0,0 @@ ---ジャイアントマミー -function c78266168.initial_effect(c) - --turn set - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(78266168,0)) - e1:SetCategory(CATEGORY_POSITION) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetTarget(c78266168.target) - e1:SetOperation(c78266168.operation) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(78266168,1)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_DAMAGE_STEP_END) - e2:SetCondition(c78266168.descon) - e2:SetTarget(c78266168.destg) - e2:SetOperation(c78266168.desop) - c:RegisterEffect(e2) -end -function c78266168.target(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsCanTurnSet() and c:GetFlagEffect(78266168)==0 end - c:RegisterFlagEffect(78266168,RESET_EVENT+0x1fc0000+RESET_PHASE+PHASE_END,0,1) - Duel.SetOperationInfo(0,CATEGORY_POSITION,c,1,0,0) -end -function c78266168.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - Duel.ChangePosition(c,POS_FACEDOWN_DEFENCE) - end -end -function c78266168.descon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetAttackTarget()==e:GetHandler() and e:GetHandler():GetBattlePosition()==POS_FACEDOWN_DEFENCE - and Duel.GetAttacker():GetAttack()0 - and Duel.IsExistingTarget(c78275321.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c78275321.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c78275321.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1,true) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e2,true) - Duel.SpecialSummonComplete() - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e3:SetRange(LOCATION_MZONE) - e3:SetCode(EVENT_PHASE+PHASE_END) - e3:SetOperation(c78275321.desop) - e3:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e3:SetCountLimit(1) - tc:RegisterEffect(e3) - end -end -function c78275321.desop(e,tp,eg,ep,ev,re,r,rp) - Duel.SendtoGrave(e:GetHandler(),REASON_EFFECT) -end diff --git a/script/c78349103.lua b/script/c78349103.lua deleted file mode 100644 index bfb20b37a1..0000000000 --- a/script/c78349103.lua +++ /dev/null @@ -1,105 +0,0 @@ ---マシンナーズ・ピースキーパー -function c78349103.initial_effect(c) - --equip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(78349103,0)) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetTarget(c78349103.eqtg) - e1:SetOperation(c78349103.eqop) - c:RegisterEffect(e1) - --unequip - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(78349103,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_SZONE) - e2:SetCondition(c78349103.uncon) - e2:SetTarget(c78349103.sptg) - e2:SetOperation(c78349103.spop) - c:RegisterEffect(e2) - --destroy sub - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_EQUIP) - e3:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e3:SetCode(EFFECT_DESTROY_SUBSTITUTE) - e3:SetCondition(c78349103.uncon) - e3:SetValue(1) - c:RegisterEffect(e3) - --eqlimit - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetCode(EFFECT_EQUIP_LIMIT) - e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e4:SetValue(aux.TargetBoolFunction(Card.IsRace,RACE_MACHINE)) - c:RegisterEffect(e4) - --search - local e5=Effect.CreateEffect(c) - e5:SetDescription(aux.Stringid(78349103,2)) - e5:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e5:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE) - e5:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e5:SetCode(EVENT_TO_GRAVE) - e5:SetCondition(c78349103.scon) - e5:SetTarget(c78349103.stg) - e5:SetOperation(c78349103.sop) - c:RegisterEffect(e5) -end -function c78349103.uncon(e) - return e:GetHandler():IsStatus(STATUS_UNION) -end -function c78349103.filter(c) - return c:IsFaceup() and c:IsRace(RACE_MACHINE) and c:GetUnionCount()==0 -end -function c78349103.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c78349103.filter(chkc) end - if chk==0 then return e:GetHandler():GetFlagEffect(78349103)==0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingTarget(c78349103.filter,tp,LOCATION_MZONE,0,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local g=Duel.SelectTarget(tp,c78349103.filter,tp,LOCATION_MZONE,0,1,1,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0) - e:GetHandler():RegisterFlagEffect(78349103,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1) -end -function c78349103.eqop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if not c:IsRelateToEffect(e) or c:IsFacedown() then return end - if not tc:IsRelateToEffect(e) or not c78349103.filter(tc) then - Duel.SendtoGrave(c,REASON_EFFECT) - return - end - if not Duel.Equip(tp,c,tc,false) then return end - c:SetStatus(STATUS_UNION,true) -end -function c78349103.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():GetFlagEffect(78349103)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) - e:GetHandler():RegisterFlagEffect(78349103,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1) -end -function c78349103.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP_ATTACK) - end -end -function c78349103.sfilter(c) - return c:IsType(TYPE_UNION) and c:IsAbleToHand() -end -function c78349103.scon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) and e:GetHandler():IsReason(REASON_DESTROY) -end -function c78349103.stg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c78349103.sfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c78349103.sop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c78349103.sfilter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c78358521.lua b/script/c78358521.lua deleted file mode 100644 index 17dd2887be..0000000000 --- a/script/c78358521.lua +++ /dev/null @@ -1,110 +0,0 @@ ---セイクリッド・ソンブレス -function c78358521.initial_effect(c) - --salvage - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetDescription(aux.Stringid(78358521,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCountLimit(1,78358521) - e1:SetCost(c78358521.thcost) - e1:SetTarget(c78358521.thtg) - e1:SetOperation(c78358521.thop) - c:RegisterEffect(e1) - --summon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(78358521,1)) - e2:SetCategory(CATEGORY_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCondition(c78358521.sumcon) - e2:SetTarget(c78358521.sumtg) - e2:SetOperation(c78358521.sumop) - c:RegisterEffect(e2) - --decrease tribute - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e3:SetCode(EVENT_TO_GRAVE) - e3:SetOperation(c78358521.decop) - c:RegisterEffect(e3) -end -function c78358521.rmfilter(c,tp) - return c:IsSetCard(0x53) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost() - and Duel.IsExistingTarget(c78358521.filter,tp,LOCATION_GRAVE,0,1,c) -end -function c78358521.filter(c) - return c:IsSetCard(0x53) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() -end -function c78358521.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c78358521.rmfilter,tp,LOCATION_GRAVE,0,1,nil,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c78358521.rmfilter,tp,LOCATION_GRAVE,0,1,1,nil,tp) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c78358521.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c78358521.filter(chkc) end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g=Duel.SelectTarget(tp,c78358521.filter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c78358521.thop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end - if c:IsRelateToEffect(e) and c:IsFaceup() then - c:RegisterFlagEffect(78358521,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) - end -end -function c78358521.sumcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetFlagEffect(78358521)~=0 -end -function c78358521.sumfilter(c) - return c:IsSetCard(0x53) and c:IsSummonable(true,nil) -end -function c78358521.sumtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c78358521.sumfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,0,0) -end -function c78358521.sumop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON) - local g=Duel.SelectMatchingCard(tp,c78358521.sumfilter,tp,LOCATION_HAND,0,1,1,nil) - local tc=g:GetFirst() - if tc then - Duel.Summon(tp,tc,true,nil) - end -end -function c78358521.decop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if Duel.GetFlagEffect(tp,78358522)~=0 then return end - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_DECREASE_TRIBUTE) - e1:SetTargetRange(LOCATION_HAND,LOCATION_HAND) - e1:SetTarget(c78358521.rfilter) - e1:SetCondition(c78358521.econ) - e1:SetCountLimit(1) - e1:SetValue(0x1) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(0x10000000+78358523) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetRange(LOCATION_GRAVE) - e2:SetTargetRange(1,0) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - c:RegisterEffect(e2) - Duel.RegisterFlagEffect(tp,78358522,RESET_PHASE+PHASE_END,0,1) -end -function c78358521.econ(e) - return Duel.GetFlagEffect(e:GetHandlerPlayer(),78358523)~=0 -end -function c78358521.rfilter(e,c) - return c:IsSetCard(0x53) -end diff --git a/script/c78364470.lua b/script/c78364470.lua deleted file mode 100644 index e1b926afb1..0000000000 --- a/script/c78364470.lua +++ /dev/null @@ -1,20 +0,0 @@ ---セイクリッド・ポルクス -function c78364470.initial_effect(c) - --extra summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetOperation(c78364470.sumop) - c:RegisterEffect(e1) -end -function c78364470.sumop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetFlagEffect(tp,78364471)~=0 then return end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetTargetRange(LOCATION_HAND+LOCATION_MZONE,0) - e1:SetCode(EFFECT_EXTRA_SUMMON_COUNT) - e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x53)) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) - Duel.RegisterFlagEffect(tp,78364471,RESET_PHASE+PHASE_END,0,1) -end diff --git a/script/c78371393.lua b/script/c78371393.lua deleted file mode 100644 index 7177372ec9..0000000000 --- a/script/c78371393.lua +++ /dev/null @@ -1,100 +0,0 @@ ---ユベル -function c78371393.initial_effect(c) - --battle - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_AVOID_BATTLE_DAMAGE) - e1:SetValue(1) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e2:SetValue(1) - c:RegisterEffect(e2) - --damage - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(78371393,0)) - e3:SetCategory(CATEGORY_DAMAGE) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e3:SetCode(EVENT_BATTLE_CONFIRM) - e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e3:SetCondition(c78371393.damcon) - e3:SetTarget(c78371393.damtg) - e3:SetOperation(c78371393.damop) - c:RegisterEffect(e3) - --destroy - local e4=Effect.CreateEffect(c) - e4:SetCategory(CATEGORY_RELEASE+CATEGORY_DESTROY) - e4:SetDescription(aux.Stringid(78371393,1)) - e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e4:SetRange(LOCATION_MZONE) - e4:SetCountLimit(1) - e4:SetCode(EVENT_PHASE+PHASE_END) - e4:SetCondition(c78371393.descon) - e4:SetTarget(c78371393.destg) - e4:SetOperation(c78371393.desop) - c:RegisterEffect(e4) - --special summon - local e5=Effect.CreateEffect(c) - e5:SetDescription(aux.Stringid(78371393,3)) - e5:SetCategory(CATEGORY_SPECIAL_SUMMON) - e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e5:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e5:SetCode(EVENT_DESTROYED) - e5:SetCondition(c78371393.spcon) - e5:SetTarget(c78371393.sptg) - e5:SetOperation(c78371393.spop) - e5:SetLabelObject(e4) - c:RegisterEffect(e5) -end -function c78371393.damcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler()==Duel.GetAttackTarget() -end -function c78371393.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAttackPos() end - Duel.SetTargetPlayer(1-tp) - local atk=Duel.GetAttacker():GetAttack() - Duel.SetTargetParam(atk) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,atk) -end -function c78371393.damop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end -function c78371393.descon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c78371393.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return not e:GetHandler():IsLocation(LOCATION_DECK) end - if not Duel.CheckReleaseGroup(tp,nil,1,nil) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0) - end -end -function c78371393.desop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFacedown() or not c:IsRelateToEffect(e) then return end - if Duel.CheckReleaseGroup(tp,Card.IsReleasableByEffect,1,c) and Duel.SelectYesNo(tp,aux.Stringid(78371393,2)) then - local g=Duel.SelectReleaseGroup(tp,Card.IsReleasableByEffect,1,1,c) - Duel.Release(g,REASON_EFFECT) - else Duel.Destroy(c,REASON_EFFECT) end -end -function c78371393.spcon(e,tp,eg,ep,ev,re,r,rp) - return re~=e:GetLabelObject() -end -function c78371393.filter(c,e,tp) - return c:IsCode(4779091) and c:IsCanBeSpecialSummoned(e,0,tp,true,true) - and (not c:IsLocation(LOCATION_GRAVE) or not c:IsHasEffect(EFFECT_NECRO_VALLEY)) -end -function c78371393.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c78371393.filter,tp,0x13,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,0x13) -end -function c78371393.spop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c78371393.filter,tp,0x13,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,true,true,POS_FACEUP) - Duel.ShuffleDeck(tp) - end -end diff --git a/script/c78387742.lua b/script/c78387742.lua deleted file mode 100644 index 526b12842f..0000000000 --- a/script/c78387742.lua +++ /dev/null @@ -1,45 +0,0 @@ ---フェイク・ヒーロー -function c78387742.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c78387742.target) - e1:SetOperation(c78387742.activate) - c:RegisterEffect(e1) -end -function c78387742.filter(c,e,tp) - return c:IsSetCard(0x3008) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c78387742.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c78387742.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,LOCATION_HAND) -end -function c78387742.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c78387742.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - local tc=g:GetFirst() - if tc then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1,true) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EVENT_PHASE+PHASE_END) - e2:SetOperation(c78387742.retop) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e2:SetCountLimit(1) - tc:RegisterEffect(e2,true) - end -end -function c78387742.retop(e,tp,eg,ep,ev,re,r,rp) - Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT) -end diff --git a/script/c78391364.lua b/script/c78391364.lua deleted file mode 100644 index c21ba0b563..0000000000 --- a/script/c78391364.lua +++ /dev/null @@ -1,48 +0,0 @@ ---超重武者テンB-N -function c78391364.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c78391364.spcon) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(78391364,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_SUMMON_SUCCESS) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e2:SetCountLimit(1,78391364) - e2:SetTarget(c78391364.sptg) - e2:SetOperation(c78391364.spop) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e3) -end -function c78391364.spcon(e,c) - if c==nil then return true end - return Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0)==0 - and Duel.GetFieldGroupCount(c:GetControler(),0,LOCATION_MZONE)>1 - and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 -end -function c78391364.filter(c,e,tp) - return c:IsSetCard(0x9a) and c:IsLevelBelow(4) and not c:IsCode(78391364) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c78391364.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c78391364.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c78391364.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c78391364.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c78391364.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENCE) - end -end \ No newline at end of file diff --git a/script/c7841112.lua b/script/c7841112.lua deleted file mode 100644 index 01a1bbfc20..0000000000 --- a/script/c7841112.lua +++ /dev/null @@ -1,197 +0,0 @@ ---セイヴァー・スター・ドラゴン -function c7841112.initial_effect(c) - --synchro summon - c:EnableReviveLimit() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_IGNORE_IMMUNE) - e1:SetRange(LOCATION_EXTRA) - e1:SetCondition(c7841112.syncon) - e1:SetOperation(c7841112.synop) - e1:SetValue(SUMMON_TYPE_SYNCHRO) - c:RegisterEffect(e1) - --Negate - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(7841112,0)) - e2:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_CHAINING) - e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) - e2:SetRange(LOCATION_MZONE) - e2:SetCondition(c7841112.negcon) - e2:SetCost(c7841112.negcost) - e2:SetTarget(c7841112.negtg) - e2:SetOperation(c7841112.negop) - c:RegisterEffect(e2) - --Disable - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(7841112,1)) - e3:SetCategory(CATEGORY_DISABLE) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetCountLimit(1) - e3:SetRange(LOCATION_MZONE) - e3:SetTarget(c7841112.distg) - e3:SetOperation(c7841112.disop) - c:RegisterEffect(e3) - --activate limit - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e4:SetCode(EVENT_CHAINING) - e4:SetRange(LOCATION_MZONE) - e4:SetOperation(c7841112.alop) - c:RegisterEffect(e4) - --to extra & Special summon - local e5=Effect.CreateEffect(c) - e5:SetDescription(aux.Stringid(7841112,2)) - e5:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_FIELD) - e5:SetCategory(CATEGORY_SPECIAL_SUMMON) - e5:SetRange(LOCATION_MZONE) - e5:SetProperty(EFFECT_FLAG_CARD_TARGET) - e5:SetCountLimit(1) - e5:SetCode(EVENT_PHASE+PHASE_END) - e5:SetTarget(c7841112.sptg) - e5:SetOperation(c7841112.spop) - c:RegisterEffect(e5) -end -function c7841112.matfilter(c,syncard) - return c:IsFaceup() and c:IsCanBeSynchroMaterial(syncard) -end -function c7841112.synfilter1(c,syncard,lv,g) - if not c:IsCode(21159309) then return false end - local tlv=c:GetSynchroLevel(syncard) - if lv-tlv<=0 then return false end - local t=false - if c:IsType(TYPE_TUNER) then t=true end - local wg=g:Clone() - wg:RemoveCard(c) - return wg:IsExists(c7841112.synfilter2,1,nil,syncard,lv-tlv,wg,t) -end -function c7841112.synfilter2(c,syncard,lv,g,tuner) - if not c:IsCode(44508094) then return false end - local tlv=c:GetSynchroLevel(syncard) - if lv-tlv<=0 then return false end - if not tuner and not c:IsType(TYPE_TUNER) then return false end - return g:IsExists(c7841112.synfilter3,1,c,syncard,lv-tlv) -end -function c7841112.synfilter3(c,syncard,lv) - local mlv=c:GetSynchroLevel(syncard) - local lv1=bit.band(mlv,0xffff) - local lv2=bit.rshift(mlv,16) - return c:IsNotTuner() and (lv1==lv or lv2==lv) -end -function c7841112.syncon(e,c,tuner) - if c==nil then return true end - local tp=c:GetControler() - local mg=Duel.GetMatchingGroup(c7841112.matfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,c) - local lv=c:GetLevel() - if tuner then return c7841112.synfilter1(tuner,c,lv,mg) end - return mg:IsExists(c7841112.synfilter1,1,nil,c,lv,mg) -end -function c7841112.synop(e,tp,eg,ep,ev,re,r,rp,c,tuner) - local g=Group.CreateGroup() - local mg=Duel.GetMatchingGroup(c7841112.matfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,c) - local lv=c:GetLevel() - local m1=tuner - if not tuner then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SMATERIAL) - local t1=mg:FilterSelect(tp,c7841112.synfilter1,1,1,nil,c,lv,mg) - m1=t1:GetFirst() - g:AddCard(m1) - end - lv=lv-m1:GetSynchroLevel(c) - local t=false - if m1:IsType(TYPE_TUNER) then t=true end - mg:RemoveCard(m1) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SMATERIAL) - local t2=mg:FilterSelect(tp,c7841112.synfilter2,1,1,nil,c,lv,mg,t) - local m2=t2:GetFirst() - g:AddCard(m2) - lv=lv-m2:GetSynchroLevel(c) - mg:RemoveCard(m2) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SMATERIAL) - local t3=mg:FilterSelect(tp,c7841112.synfilter3,1,1,nil,c,lv) - g:Merge(t3) - c:SetMaterial(g) - Duel.SendtoGrave(g,REASON_MATERIAL+REASON_SYNCHRO) -end -function c7841112.negcon(e,tp,eg,ep,ev,re,r,rp) - return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and ep~=tp and Duel.IsChainNegatable(ev) -end -function c7841112.negcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end -function c7841112.negtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,0,LOCATION_ONFIELD,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c7841112.negop(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateActivation(ev) - local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,0,LOCATION_ONFIELD,nil) - Duel.Destroy(g,REASON_EFFECT) -end -function c7841112.disfilter(c) - return c:IsFaceup() and c:IsType(TYPE_EFFECT) and not c:IsDisabled() -end -function c7841112.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c7841112.disfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c7841112.disfilter,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - local g=Duel.SelectTarget(tp,c7841112.disfilter,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0) -end -function c7841112.disop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - local c=e:GetHandler() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e2) - Duel.MajesticCopy(c,tc) - end -end -function c7841112.alop(e,tp,eg,ep,ev,re,r,rp) - if re:GetOwner()==e:GetOwner() and not re:IsHasProperty(EFFECT_FLAG_INITIAL) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EFFECT_CANNOT_ACTIVATE) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(1,1) - e1:SetValue(c7841112.aclimit) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e:GetHandler():RegisterEffect(e1) - end -end -function c7841112.aclimit(e,re,tp) - return re:GetOwner()==e:GetOwner() and not re:IsHasProperty(EFFECT_FLAG_INITIAL) -end -function c7841112.spfilter(c,e,tp) - return c:IsCode(44508094) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c7841112.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c7841112.spfilter(chkc,e,tp) end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c7841112.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,g:GetCount(),0,0) -end -function c7841112.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - local c=e:GetHandler() - if bit.band(c:GetOriginalType(),0x802040)~=0 and Duel.SendtoDeck(c,nil,0,REASON_EFFECT)~=0 - and c:IsLocation(LOCATION_EXTRA) and tc and tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c7841921.lua b/script/c7841921.lua deleted file mode 100644 index 52d7bb6b99..0000000000 --- a/script/c7841921.lua +++ /dev/null @@ -1,61 +0,0 @@ ---疾走の暗黒騎士ガイア -function c7841921.initial_effect(c) - --summon with no tribute - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(7841921,0)) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SUMMON_PROC) - e1:SetCondition(c7841921.ntcon) - c:RegisterEffect(e1) - --atk - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_SUMMON_COST) - e2:SetOperation(c7841921.atkop) - c:RegisterEffect(e2) - --tohand - local e3=Effect.CreateEffect(c) - e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_RELEASE) - e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e3:SetCountLimit(1,7841921) - e3:SetTarget(c7841921.thtg) - e3:SetOperation(c7841921.thop) - c:RegisterEffect(e3) -end -function c7841921.ntcon(e,c,minc) - if c==nil then return true end - return minc==0 and c:GetLevel()>4 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 -end -function c7841921.atkcon(e) - return e:GetHandler():GetMaterialCount()==0 -end -function c7841921.atkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_BASE_ATTACK) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c7841921.atkcon) - e1:SetValue(1900) - e1:SetReset(RESET_EVENT+0xff0000) - c:RegisterEffect(e1) -end -function c7841921.thfilter(c) - return c:IsSetCard(0xcf) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() -end -function c7841921.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c7841921.thfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c7841921.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c7841921.thfilter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c78422252.lua b/script/c78422252.lua deleted file mode 100644 index 79bacc4d50..0000000000 --- a/script/c78422252.lua +++ /dev/null @@ -1,60 +0,0 @@ ---XX-セイバー フラムナイト -function c78422252.initial_effect(c) - --negate attack - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(78422252,0)) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_NO_TURN_RESET) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCondition(c78422252.condition) - e1:SetTarget(c78422252.target) - e1:SetOperation(c78422252.operation) - c:RegisterEffect(e1) - --draw - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(78422252,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_BATTLE_DESTROYING) - e2:SetCondition(c78422252.spcon) - e2:SetTarget(c78422252.sptg) - e2:SetOperation(c78422252.spop) - c:RegisterEffect(e2) -end -function c78422252.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetAttacker():IsControler(1-tp) -end -function c78422252.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local tg=Duel.GetAttacker() - if chkc then return chkc==tg end - if chk==0 then return tg:IsOnField() and tg:IsCanBeEffectTarget(e) end - Duel.SetTargetCard(tg) -end -function c78422252.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateAttack() -end -function c78422252.spcon(e,tp,eg,ep,ev,re,r,rp) - local a=Duel.GetAttacker() - local d=Duel.GetAttackTarget() - return a==Duel.GetAttacker() and bit.band(d:GetBattlePosition(),POS_DEFENCE)~=0 -end -function c78422252.filter(c,e,tp) - return c:IsSetCard(0x100d) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c78422252.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c78422252.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c78422252.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c78422252.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c78422252.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c7845138.lua b/script/c7845138.lua deleted file mode 100644 index a2ece335f2..0000000000 --- a/script/c7845138.lua +++ /dev/null @@ -1,38 +0,0 @@ ---茫漠の死者 -function c7845138.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c7845138.spcon) - c:RegisterEffect(e1) - --atk - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(7845138,0)) - e2:SetCategory(CATEGORY_ATKCHANGE) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetOperation(c7845138.atkop) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EVENT_SUMMON_SUCCESS) - c:RegisterEffect(e3) -end -function c7845138.spcon(e,c) - if c==nil then return true end - return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 - and Duel.GetLP(c:GetControler())<=2000 -end -function c7845138.atkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFaceup() and c:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetValue(Duel.GetLP(1-tp)/2) - e1:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e1) - end -end diff --git a/script/c78474168.lua b/script/c78474168.lua deleted file mode 100644 index 465fb14aa4..0000000000 --- a/script/c78474168.lua +++ /dev/null @@ -1,78 +0,0 @@ ---ブレイクスルー・スキル -function c78474168.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DISABLE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,0x1c0) - e1:SetTarget(c78474168.target) - e1:SetOperation(c78474168.activate) - c:RegisterEffect(e1) - -- - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(78474168,0)) - e2:SetCategory(CATEGORY_DISABLE) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetRange(LOCATION_GRAVE) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetCondition(c78474168.negcon) - e2:SetCost(c78474168.negcost) - e2:SetTarget(c78474168.target) - e2:SetOperation(c78474168.activate2) - c:RegisterEffect(e2) -end -function c78474168.filter(c) - return c:IsFaceup() and c:IsType(TYPE_EFFECT) and not c:IsDisabled() -end -function c78474168.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c78474168.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c78474168.filter,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c78474168.filter,tp,0,LOCATION_MZONE,1,1,nil) -end -function c78474168.activate(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() and not tc:IsDisabled() and tc:IsControler(1-tp) then - Duel.NegateRelatedChain(tc,RESET_TURN_SET) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetValue(RESET_TURN_SET) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - tc:RegisterEffect(e2) - end -end -function c78474168.negcon(e,tp,eg,ep,ev,re,r,rp) - return aux.exccon(e) and Duel.GetTurnPlayer()==tp -end -function c78474168.negcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) -end -function c78474168.activate2(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() and not tc:IsDisabled() and tc:IsControler(1-tp) and tc:IsType(TYPE_EFFECT) then - Duel.NegateRelatedChain(tc,RESET_TURN_SET) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetValue(RESET_TURN_SET) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - tc:RegisterEffect(e2) - end -end diff --git a/script/c78486968.lua b/script/c78486968.lua deleted file mode 100644 index 9be56309c8..0000000000 --- a/script/c78486968.lua +++ /dev/null @@ -1,27 +0,0 @@ ---セイクリッド・シェラタン -function c78486968.initial_effect(c) - --search - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(78486968,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c78486968.tg) - e1:SetOperation(c78486968.op) - c:RegisterEffect(e1) -end -function c78486968.filter(c) - return c:IsSetCard(0x53) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() -end -function c78486968.tg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c78486968.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c78486968.op(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c78486968.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c78512663.lua b/script/c78512663.lua deleted file mode 100644 index 210f9246e7..0000000000 --- a/script/c78512663.lua +++ /dev/null @@ -1,135 +0,0 @@ ---E・HERO マグマ・ネオス -function c78512663.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcCode3(c,89943723,89621922,80344569,false,false) - --spsummon condition - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(c78512663.splimit) - c:RegisterEffect(e1) - --special summon rule - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_SPSUMMON_PROC) - e2:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e2:SetRange(LOCATION_EXTRA) - e2:SetCondition(c78512663.spcon) - e2:SetOperation(c78512663.spop) - c:RegisterEffect(e2) - --return - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(78512663,0)) - e3:SetCategory(CATEGORY_TODECK) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e3:SetCode(EVENT_PHASE+PHASE_END) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1) - e3:SetCondition(c78512663.retcon1) - e3:SetTarget(c78512663.rettg) - e3:SetOperation(c78512663.retop) - c:RegisterEffect(e3) - local e4=e3:Clone() - e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e4:SetProperty(0) - e4:SetCondition(c78512663.retcon2) - c:RegisterEffect(e4) - --atkup - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_SINGLE) - e5:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e5:SetCode(EFFECT_UPDATE_ATTACK) - e5:SetRange(LOCATION_MZONE) - e5:SetValue(c78512663.atkval) - c:RegisterEffect(e5) - --tohand - local e6=Effect.CreateEffect(c) - e6:SetDescription(aux.Stringid(78512663,1)) - e6:SetCategory(CATEGORY_TOHAND) - e6:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e6:SetCode(78512663) - e6:SetTarget(c78512663.thtg) - e6:SetOperation(c78512663.thop) - c:RegisterEffect(e6) -end -function c78512663.splimit(e,se,sp,st) - return not e:GetHandler():IsLocation(LOCATION_EXTRA) -end -function c78512663.spfilter(c,code) - return c:IsAbleToDeckOrExtraAsCost() and c:GetCode()==code -end -function c78512663.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ft<-2 then return false end - local g1=Duel.GetMatchingGroup(c78512663.spfilter,tp,LOCATION_ONFIELD,0,nil,89943723) - local g2=Duel.GetMatchingGroup(c78512663.spfilter,tp,LOCATION_ONFIELD,0,nil,89621922) - local g3=Duel.GetMatchingGroup(c78512663.spfilter,tp,LOCATION_ONFIELD,0,nil,80344569) - if g1:GetCount()==0 or g2:GetCount()==0 or g3:GetCount()==0 then return false end - if ft>0 then return true end - local f1=g1:FilterCount(Card.IsLocation,nil,LOCATION_MZONE)>0 and 1 or 0 - local f2=g2:FilterCount(Card.IsLocation,nil,LOCATION_MZONE)>0 and 1 or 0 - local f3=g3:FilterCount(Card.IsLocation,nil,LOCATION_MZONE)>0 and 1 or 0 - if ft==-2 then return f1+f2+f3==3 - elseif ft==-1 then return f1+f2+f3>=2 - else return f1+f2+f3>=1 end -end -function c78512663.spop(e,tp,eg,ep,ev,re,r,rp,c) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - local g1=Duel.GetMatchingGroup(c78512663.spfilter,tp,LOCATION_ONFIELD,0,nil,89943723) - local g2=Duel.GetMatchingGroup(c78512663.spfilter,tp,LOCATION_ONFIELD,0,nil,89621922) - local g3=Duel.GetMatchingGroup(c78512663.spfilter,tp,LOCATION_ONFIELD,0,nil,80344569) - g1:Merge(g2) - g1:Merge(g3) - local g=Group.CreateGroup() - local tc=nil - for i=1,3 do - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - if ft<=0 then - tc=g1:FilterSelect(tp,Card.IsLocation,1,1,nil,LOCATION_MZONE):GetFirst() - else - tc=g1:Select(tp,1,1,nil):GetFirst() - end - g:AddCard(tc) - g1:Remove(Card.IsCode,nil,tc:GetCode()) - ft=ft+1 - end - local cg=g:Filter(Card.IsFacedown,nil) - if cg:GetCount()>0 then - Duel.ConfirmCards(1-tp,cg) - end - Duel.SendtoDeck(g,nil,2,REASON_COST) -end -function c78512663.atkval(e,c) - return Duel.GetFieldGroupCount(0,LOCATION_ONFIELD,LOCATION_ONFIELD)*400 -end -function c78512663.retcon1(e,tp,eg,ep,ev,re,r,rp,chk) - return not e:GetHandler():IsHasEffect(42015635) -end -function c78512663.retcon2(e,tp,eg,ep,ev,re,r,rp,chk) - return e:GetHandler():IsHasEffect(42015635) -end -function c78512663.rettg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToExtra() end - Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0) -end -function c78512663.retop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) or c:IsFacedown() then return end - Duel.SendtoDeck(c,nil,2,REASON_EFFECT) - if c:IsLocation(LOCATION_EXTRA) then - Duel.RaiseSingleEvent(c,78512663,e,0,0,0,0) - end -end -function c78512663.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local g=Duel.GetMatchingGroup(Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0) -end -function c78512663.thop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) - Duel.SendtoHand(g,nil,REASON_EFFECT) -end diff --git a/script/c7852878.lua b/script/c7852878.lua deleted file mode 100644 index 72f00b4d8b..0000000000 --- a/script/c7852878.lua +++ /dev/null @@ -1,26 +0,0 @@ ---針三千本 -function c7852878.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(7852878,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_DAMAGE_STEP_END) - e1:SetCondition(c7852878.condition) - e1:SetTarget(c7852878.target) - e1:SetOperation(c7852878.operation) - c:RegisterEffect(e1) -end -function c7852878.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetAttackTarget()==e:GetHandler() and e:GetHandler():IsDefencePos() - and Duel.GetAttacker():GetAttack()0 - and Duel.IsExistingMatchingCard(c78552773.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c78552773.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c78552773.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - local tc=g:GetFirst() - if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(tc:GetAttack()*2) - tc:RegisterEffect(e1,true) - Duel.SpecialSummonComplete() - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EVENT_PHASE+PHASE_END) - e2:SetOperation(c78552773.retop) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e2:SetCountLimit(1) - tc:RegisterEffect(e2) - end -end -function c78552773.retop(e,tp,eg,ep,ev,re,r,rp) - Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT) -end diff --git a/script/c78564023.lua b/script/c78564023.lua deleted file mode 100644 index c45414923d..0000000000 --- a/script/c78564023.lua +++ /dev/null @@ -1,35 +0,0 @@ ---BF-二の太刀のエテジア -function c78564023.initial_effect(c) - --atkup - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(78564023,0)) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_FIELD) - e1:SetCode(EVENT_DAMAGE_STEP_END) - e1:SetRange(LOCATION_HAND) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCondition(c78564023.condition) - e1:SetCost(c78564023.cost) - e1:SetTarget(c78564023.target) - e1:SetOperation(c78564023.operation) - c:RegisterEffect(e1) -end -function c78564023.condition(e,tp,eg,ep,ev,re,r,rp) - local a=Duel.GetAttacker() - local d=Duel.GetAttackTarget() - return a:IsControler(tp) and a:IsSetCard(0x33) and a:IsRelateToBattle() and d and d:IsRelateToBattle() -end -function c78564023.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end -function c78564023.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(1000) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,1000) -end -function c78564023.operation(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c78574395.lua b/script/c78574395.lua deleted file mode 100644 index d1131f2bc4..0000000000 --- a/script/c78574395.lua +++ /dev/null @@ -1,45 +0,0 @@ ---ワンダー・バルーン -function c78574395.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --counter - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(78574395,0)) - e2:SetCategory(CATEGORY_COUNTER) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_SZONE) - e2:SetCountLimit(1) - e2:SetCost(c78574395.cost) - e2:SetTarget(c78574395.target) - e2:SetOperation(c78574395.operation) - c:RegisterEffect(e2) - --atk down - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetCode(EFFECT_UPDATE_ATTACK) - e3:SetRange(LOCATION_SZONE) - e3:SetTargetRange(0,LOCATION_MZONE) - e3:SetValue(c78574395.atkval) - c:RegisterEffect(e3) -end -function c78574395.atkval(e,c) - return e:GetHandler():GetCounter(0x32)*-300 -end -function c78574395.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,1,nil) end - local ct=Duel.DiscardHand(tp,Card.IsAbleToGraveAsCost,1,60,REASON_COST) - e:SetLabel(ct) -end -function c78574395.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,e:GetLabel(),0,0x32) -end -function c78574395.operation(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - c:AddCounter(0x32,e:GetLabel()) - end -end diff --git a/script/c78577570.lua b/script/c78577570.lua deleted file mode 100644 index 446a3dacec..0000000000 --- a/script/c78577570.lua +++ /dev/null @@ -1,4 +0,0 @@ ---ガルマソードの誓い -function c78577570.initial_effect(c) - aux.AddRitualProcGreater(c,aux.FilterBoolFunction(Card.IsCode,90844184)) -end diff --git a/script/c78586116.lua b/script/c78586116.lua deleted file mode 100644 index b044fae618..0000000000 --- a/script/c78586116.lua +++ /dev/null @@ -1,79 +0,0 @@ ---パワーアップ・コネクター -function c78586116.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c78586116.target) - e1:SetOperation(c78586116.operation) - c:RegisterEffect(e1) - --attack up - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_ATKCHANGE) - e2:SetDescription(aux.Stringid(78586116,0)) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(78586116) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetTarget(c78586116.attg) - e2:SetOperation(c78586116.atop) - c:RegisterEffect(e2) -end -function c78586116.filter(c) - return c:IsFaceup() and c:IsSetCard(0x26) -end -function c78586116.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c78586116.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c78586116.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local g=Duel.SelectTarget(tp,c78586116.filter,tp,LOCATION_MZONE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0) -end -function c78586116.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsLocation(LOCATION_SZONE) then return end - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,c,tc) - c:CancelToGrave() - --Atkup - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_EQUIP) - e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e1) - --Equip limit - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_EQUIP_LIMIT) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetValue(c78586116.eqlimit) - e2:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e2) - Duel.RaiseSingleEvent(c,78586116,e,0,0,0,0,0) - end -end -function c78586116.eqlimit(e,c) - return c:IsSetCard(0x26) -end -function c78586116.attg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local eq=e:GetHandler():GetEquipTarget() - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() and chkc~=eq end - if chk==0 then return eq and Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,eq) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,eq) -end -function c78586116.atop(e,tp,eg,ep,ev,re,r,rp) - local eq=e:GetHandler():GetEquipTarget() - if not eq then return end - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(eq:GetAttack()) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - end -end diff --git a/script/c78610936.lua b/script/c78610936.lua deleted file mode 100644 index 2ff1b5a26f..0000000000 --- a/script/c78610936.lua +++ /dev/null @@ -1,57 +0,0 @@ ---エクシーズ・オーバーディレイ -function c78610936.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TODECK+CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,0x1e0) - e1:SetTarget(c78610936.target) - e1:SetOperation(c78610936.activate) - c:RegisterEffect(e1) -end -function c78610936.filter(c) - return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:IsAbleToExtra() and c:GetOverlayCount()>0 -end -function c78610936.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and c78610936.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c78610936.filter,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectTarget(tp,c78610936.filter,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0) - Duel.SetChainLimit(aux.FALSE) -end -function c78610936.spfilter(c,e,tp) - return c:IsLocation(LOCATION_GRAVE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,1-tp) and not c:IsHasEffect(EFFECT_NECRO_VALLEY) -end -function c78610936.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if not tc:IsRelateToEffect(e) then return end - local mg=tc:GetOverlayGroup() - Duel.SendtoGrave(mg,REASON_EFFECT) - if Duel.SendtoDeck(tc,nil,0,REASON_EFFECT)>0 then - local g=mg:Filter(c78610936.spfilter,nil,e,tp) - local ft=Duel.GetLocationCount(1-tp,LOCATION_MZONE) - if ft>0 and g:GetCount()>0 then - if g:GetCount()>ft then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - g=g:Select(tp,ft,ft,nil) - end - local tc=g:GetFirst() - while tc do - Duel.SpecialSummonStep(tc,0,tp,1-tp,false,false,POS_FACEUP_DEFENCE) - if tc:GetLevel()>0 then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_LEVEL) - e1:SetValue(-1) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - end - tc=g:GetNext() - end - Duel.SpecialSummonComplete() - end - end -end diff --git a/script/c78613627.lua b/script/c78613627.lua deleted file mode 100644 index 15afaa3bc0..0000000000 --- a/script/c78613627.lua +++ /dev/null @@ -1,26 +0,0 @@ ---デス・カンガルー -function c78613627.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(78613627,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_DAMAGE_STEP_END) - e1:SetCondition(c78613627.condition) - e1:SetTarget(c78613627.target) - e1:SetOperation(c78613627.operation) - c:RegisterEffect(e1) -end -function c78613627.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetAttackTarget()==e:GetHandler() and bit.band(e:GetHandler():GetBattlePosition(),POS_DEFENCE)~=0 - and Duel.GetAttacker():GetAttack()0 then - Duel.Readjust() - end -end -function c78637313.target(e,c) - return c:IsCode(83764718) -end -function c78637313.aclimit(e,re,tp) - return re:GetHandler():IsCode(83764718) -end diff --git a/script/c7864030.lua b/script/c7864030.lua deleted file mode 100644 index eab4e70c6e..0000000000 --- a/script/c7864030.lua +++ /dev/null @@ -1,66 +0,0 @@ ---超重武者タイマ-2 -function c7864030.initial_effect(c) - --change battle target - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetRange(LOCATION_HAND) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCondition(c7864030.condition1) - e1:SetCost(c7864030.cost) - e1:SetTarget(c7864030.target1) - e1:SetOperation(c7864030.operation1) - c:RegisterEffect(e1) - --change battle target - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_ATTACK_ANNOUNCE) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCondition(c7864030.condition2) - e2:SetOperation(c7864030.operation2) - c:RegisterEffect(e2) - --indes - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e3:SetValue(1) - c:RegisterEffect(e3) -end -function c7864030.condition1(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp and not Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_GRAVE,0,1,nil,TYPE_SPELL+TYPE_TRAP) -end -function c7864030.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end -function c7864030.filter(c) - return c:IsFaceup() and c:IsSetCard(0x9a) -end -function c7864030.target1(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c7864030.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c7864030.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - Duel.SelectTarget(tp,c7864030.filter,tp,LOCATION_MZONE,0,1,1,nil) -end -function c7864030.operation1(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - local at=Duel.GetAttacker() - if at:IsAttackable() and not at:IsImmuneToEffect(e) and not tc:IsImmuneToEffect(e) then - Duel.CalculateDamage(at,tc) - end - end -end -function c7864030.condition2(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp and Duel.GetAttackTarget()~=e:GetHandler() -end -function c7864030.operation2(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - local at=Duel.GetAttacker() - if at:IsAttackable() and not at:IsImmuneToEffect(e) then - Duel.CalculateDamage(at,c) - end - end -end diff --git a/script/c78651105.lua b/script/c78651105.lua deleted file mode 100644 index 44197803a4..0000000000 --- a/script/c78651105.lua +++ /dev/null @@ -1,72 +0,0 @@ ---神獣王バルバロス -function c78651105.initial_effect(c) - --summon & set with no tribute - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(78651105,0)) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SUMMON_PROC) - e1:SetCondition(c78651105.ntcon) - e1:SetOperation(c78651105.ntop) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_SET_PROC) - c:RegisterEffect(e2) - --summon with 3 tribute - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(78651105,1)) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_SUMMON_PROC) - e3:SetCondition(c78651105.ttcon) - e3:SetOperation(c78651105.ttop) - e3:SetValue(SUMMON_TYPE_ADVANCE+1) - c:RegisterEffect(e3) - --destroy - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(78651105,2)) - e4:SetCategory(CATEGORY_DESTROY) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e4:SetCode(EVENT_SUMMON_SUCCESS) - e4:SetCondition(c78651105.descon) - e4:SetTarget(c78651105.destg) - e4:SetOperation(c78651105.desop) - c:RegisterEffect(e4) -end -function c78651105.ntcon(e,c,minc) - if c==nil then return true end - return minc==0 and c:GetLevel()>4 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 -end -function c78651105.ntop(e,tp,eg,ep,ev,re,r,rp,c) - --change base attack - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetReset(RESET_EVENT+0xff0000) - e1:SetCode(EFFECT_SET_BASE_ATTACK) - e1:SetValue(1900) - c:RegisterEffect(e1) -end -function c78651105.ttcon(e,c) - if c==nil then return true end - return Duel.GetTributeCount(c)>=3 -end -function c78651105.ttop(e,tp,eg,ep,ev,re,r,rp,c) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) - local g=Duel.SelectTribute(tp,c,3,3) - c:SetMaterial(g) - Duel.Release(g, REASON_SUMMON+REASON_MATERIAL) -end -function c78651105.descon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_ADVANCE+1 -end -function c78651105.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local sg=Duel.GetMatchingGroup(Card.IsDestructable,tp,0,LOCATION_ONFIELD,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,sg:GetCount(),0,0) -end -function c78651105.desop(e,tp,eg,ep,ev,re,r,rp) - local sg=Duel.GetMatchingGroup(Card.IsDestructable,tp,0,LOCATION_ONFIELD,nil) - Duel.Destroy(sg,REASON_EFFECT) -end diff --git a/script/c78658564.lua b/script/c78658564.lua deleted file mode 100644 index f36ac7fcef..0000000000 --- a/script/c78658564.lua +++ /dev/null @@ -1,27 +0,0 @@ ---ゴブリン突撃部隊 -function c78658564.initial_effect(c) - --to defence - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE+PHASE_BATTLE) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCondition(c78658564.poscon) - e1:SetOperation(c78658564.posop) - c:RegisterEffect(e1) -end -function c78658564.poscon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetAttackedCount()>0 -end -function c78658564.posop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsAttackPos() then - Duel.ChangePosition(c,POS_FACEUP_DEFENCE) - end - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_CHANGE_POSITION) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_COPY_INHERIT) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,3) - c:RegisterEffect(e1) -end diff --git a/script/c78663366.lua b/script/c78663366.lua deleted file mode 100644 index d9e9e92d21..0000000000 --- a/script/c78663366.lua +++ /dev/null @@ -1,53 +0,0 @@ ---ヴェルズ・サンダーバード -function c78663366.initial_effect(c) - --remove - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetDescription(aux.Stringid(78663366,0)) - e1:SetCategory(CATEGORY_REMOVE) - e1:SetCode(EVENT_CHAINING) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1,78663366) - e1:SetTarget(c78663366.target) - e1:SetOperation(c78663366.operation) - c:RegisterEffect(e1) -end -function c78663366.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemove() end - Duel.SetOperationInfo(0,CATEGORY_REMOVE,e:GetHandler(),1,0,0) -end -function c78663366.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsControler(tp) and Duel.Remove(c,nil,REASON_EFFECT+REASON_TEMPORARY)~=0 then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) - if Duel.GetCurrentPhase()==PHASE_STANDBY then - e1:SetLabel(Duel.GetTurnCount()) - e1:SetCondition(c78663366.retcon) - e1:SetReset(RESET_PHASE+PHASE_STANDBY,2) - else - e1:SetReset(RESET_PHASE+PHASE_STANDBY) - end - e1:SetLabelObject(c) - e1:SetCountLimit(1) - e1:SetOperation(c78663366.retop) - Duel.RegisterEffect(e1,tp) - end -end -function c78663366.retcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnCount()~=e:GetLabel() -end -function c78663366.retop(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetLabelObject() - if tc:IsForbidden() then - Duel.SendtoGrave(tc,REASON_RULE) - elseif Duel.ReturnToField(tc) and tc:IsFaceup() then - local e1=Effect.CreateEffect(tc) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(300) - e1:SetReset(RESET_EVENT+0x1ff0000) - tc:RegisterEffect(e1) - end -end diff --git a/script/c78697395.lua b/script/c78697395.lua deleted file mode 100644 index dfc883c223..0000000000 --- a/script/c78697395.lua +++ /dev/null @@ -1,11 +0,0 @@ ---第三の棺 -function c78697395.initial_effect(c) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_SSET) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - c:RegisterEffect(e2) -end diff --git a/script/c78700060.lua b/script/c78700060.lua deleted file mode 100644 index 9bca4d6016..0000000000 --- a/script/c78700060.lua +++ /dev/null @@ -1,42 +0,0 @@ ---死霊騎士デスカリバー・ナイト -function c78700060.initial_effect(c) - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - c:RegisterEffect(e1) - --Negate - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(78700060,1)) - e2:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_QUICK_F) - e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) - e2:SetCode(EVENT_CHAINING) - e2:SetRange(LOCATION_MZONE) - e2:SetCondition(c78700060.condition) - e2:SetCost(c78700060.cost) - e2:SetTarget(c78700060.target) - e2:SetOperation(c78700060.operation) - c:RegisterEffect(e2) -end -function c78700060.condition(e,tp,eg,ep,ev,re,r,rp) - return re:IsActiveType(TYPE_MONSTER) -end -function c78700060.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end -function c78700060.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) - end -end -function c78700060.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetCurrentChain()~=ev+1 then return end - if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(eg,REASON_EFFECT) - end -end diff --git a/script/c78706415.lua b/script/c78706415.lua deleted file mode 100644 index 8f6ce46428..0000000000 --- a/script/c78706415.lua +++ /dev/null @@ -1,25 +0,0 @@ ---ファイバーポッド -function c78706415.initial_effect(c) - --flip - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP) - e1:SetTarget(c78706415.target) - e1:SetOperation(c78706415.operation) - c:RegisterEffect(e1) -end -function c78706415.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local g=Duel.GetFieldGroup(tp,0x1e,0x1e) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0) -end -function c78706415.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local g=Duel.GetFieldGroup(tp,0x1e,0x1e) - Duel.SendtoDeck(g,nil,2,REASON_EFFECT) - Duel.ShuffleDeck(tp) - Duel.ShuffleDeck(1-tp) - Duel.BreakEffect() - Duel.Draw(tp,5,REASON_EFFECT) - Duel.Draw(1-tp,5,REASON_EFFECT) -end diff --git a/script/c78734254.lua b/script/c78734254.lua deleted file mode 100644 index 2e15222a82..0000000000 --- a/script/c78734254.lua +++ /dev/null @@ -1,54 +0,0 @@ ---N・マリン・ドルフィン -function c78734254.initial_effect(c) - c:EnableReviveLimit() - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - c:RegisterEffect(e1) - --Activate - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(78734254,0)) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCost(c78734254.cost) - e2:SetTarget(c78734254.target) - e2:SetOperation(c78734254.activate) - c:RegisterEffect(e2) - --add code - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e4:SetCode(EFFECT_ADD_CODE) - e4:SetValue(17955766) - c:RegisterEffect(e4) -end -function c78734254.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) -end -function c78734254.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0 end -end -function c78734254.filter(c,atk) - return c:IsFaceup() and c:IsAttackAbove(atk) -end -function c78734254.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND) - if g:GetCount()>0 then - Duel.ConfirmCards(tp,g) - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(78734254,1)) - local tg=g:FilterSelect(tp,Card.IsType,1,1,nil,TYPE_MONSTER) - local tc=tg:GetFirst() - if tc then - local atk=tc:GetAttack() - if atk>=0 and Duel.IsExistingMatchingCard(c78734254.filter,tp,LOCATION_MZONE,0,1,nil,atk) then - Duel.Destroy(tc,REASON_EFFECT) - Duel.Damage(1-tp,500,REASON_EFFECT) - end - end - Duel.ShuffleHand(1-tp) - end -end diff --git a/script/c78748366.lua b/script/c78748366.lua deleted file mode 100644 index 3a0e40fa77..0000000000 --- a/script/c78748366.lua +++ /dev/null @@ -1,84 +0,0 @@ ---煉獄の消華 -function c78748366.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --search - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(78748366,0)) - e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_SZONE) - e2:SetCountLimit(1,78748366) - e2:SetCost(c78748366.thcost) - e2:SetTarget(c78748366.thtg) - e2:SetOperation(c78748366.thop) - c:RegisterEffect(e2) - --remove - local e3=Effect.CreateEffect(c) - e3:SetCategory(CATEGORY_REMOVE) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_BATTLED) - e3:SetRange(LOCATION_SZONE) - e3:SetCost(c78748366.cost) - e3:SetTarget(c78748366.target) - e3:SetOperation(c78748366.operation) - c:RegisterEffect(e3) -end -function c78748366.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) -end -function c78748366.thfilter(c) - return c:IsSetCard(0xc5) and c:IsType(TYPE_SPELL+TYPE_TRAP) and not c:IsCode(78748366) and c:IsAbleToHand() -end -function c78748366.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c78748366.thfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c78748366.thop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c78748366.thfilter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_SUMMON) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetTargetRange(1,0) - e1:SetTarget(c78748366.sumlimit) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) - local e2=e1:Clone() - e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - Duel.RegisterEffect(e2,tp) -end -function c78748366.sumlimit(e,c) - return not c:IsSetCard(0xbb) -end -function c78748366.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end -function c78748366.target(e,tp,eg,ep,ev,re,r,rp,chk) - local a=Duel.GetAttacker() - local d=Duel.GetAttackTarget() - if a:IsControler(1-tp) then a,d=d,a end - if chk==0 then return a and d and a:IsSetCard(0xbb) and (a:IsAbleToRemove() or d:IsAbleToRemove()) end - local g=Group.CreateGroup() - if a:IsRelateToBattle() then g:AddCard(a) end - if d:IsRelateToBattle() then g:AddCard(d) end - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,0) -end -function c78748366.operation(e,tp,eg,ep,ev,re,r,rp) - local a=Duel.GetAttacker() - local d=Duel.GetAttackTarget() - local g=Group.FromCards(a,d) - local rg=g:Filter(Card.IsRelateToBattle,nil) - Duel.Remove(rg,POS_FACEUP,REASON_EFFECT) -end diff --git a/script/c78783370.lua b/script/c78783370.lua deleted file mode 100644 index bc7b8a3cb4..0000000000 --- a/script/c78783370.lua +++ /dev/null @@ -1,36 +0,0 @@ ---地獄の扉越し銃 -function c78783370.initial_effect(c) - --reflect - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_CHAINING) - e1:SetCondition(c78783370.condition) - e1:SetOperation(c78783370.operation) - c:RegisterEffect(e1) -end -function c78783370.condition(e,tp,eg,ep,ev,re,r,rp) - if re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and not re:IsHasType(EFFECT_TYPE_ACTIVATE) then return false end - local ex,cg,ct,cp,cv=Duel.GetOperationInfo(ev,CATEGORY_DAMAGE) - if ex and (cp==tp or cp==PLAYER_ALL) then return true end - ex,cg,ct,cp,cv=Duel.GetOperationInfo(ev,CATEGORY_RECOVER) - return ex and (cp==tp or cp==PLAYER_ALL) and Duel.IsPlayerAffectedByEffect(tp,EFFECT_REVERSE_RECOVER) -end -function c78783370.operation(e,tp,eg,ep,ev,re,r,rp) - local cid=Duel.GetChainInfo(ev,CHAININFO_CHAIN_ID) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_REFLECT_DAMAGE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetTargetRange(1,0) - e1:SetLabel(cid) - e1:SetValue(c78783370.refcon) - e1:SetReset(RESET_CHAIN) - Duel.RegisterEffect(e1,tp) -end -function c78783370.refcon(e,re,val,r,rp,rc) - local cc=Duel.GetCurrentChain() - if cc==0 or bit.band(r,REASON_EFFECT)==0 then return end - local cid=Duel.GetChainInfo(0,CHAININFO_CHAIN_ID) - return cid==e:GetLabel() -end diff --git a/script/c78792195.lua b/script/c78792195.lua deleted file mode 100644 index 1570055fea..0000000000 --- a/script/c78792195.lua +++ /dev/null @@ -1,39 +0,0 @@ ---六武衆の露払い -function c78792195.initial_effect(c) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(78792195,0)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCondition(c78792195.con) - e2:SetCost(c78792195.cost) - e2:SetTarget(c78792195.target) - e2:SetOperation(c78792195.operation) - c:RegisterEffect(e2) -end -function c78792195.confilter(c) - return c:IsFaceup() and c:IsSetCard(0x3d) -end -function c78792195.con(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c78792195.confilter,tp,LOCATION_MZONE,0,1,e:GetHandler()) -end -function c78792195.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsSetCard,1,nil,0x3d) end - local sg=Duel.SelectReleaseGroup(tp,Card.IsSetCard,1,1,nil,0x3d) - Duel.Release(sg,REASON_COST) -end -function c78792195.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsDestructable() end - if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c78792195.operation(e,tp,eg,ep,ev,re,r,rp,chk) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c78794994.lua b/script/c78794994.lua deleted file mode 100644 index 98b81b1bc9..0000000000 --- a/script/c78794994.lua +++ /dev/null @@ -1,62 +0,0 @@ ---戦線復活の代償 -function c78794994.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCost(c78794994.cost) - e1:SetTarget(c78794994.target) - e1:SetOperation(c78794994.operation) - c:RegisterEffect(e1) - --Destroy - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE) - e2:SetCode(EVENT_LEAVE_FIELD) - e2:SetOperation(c78794994.desop) - c:RegisterEffect(e2) -end -function c78794994.costfilter(c) - return c:IsFaceup() and c:IsType(TYPE_NORMAL) and c:IsAbleToGraveAsCost() -end -function c78794994.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c78794994.costfilter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c78794994.costfilter,tp,LOCATION_MZONE,0,1,1,nil) - Duel.SendtoGrave(g,REASON_COST) -end -function c78794994.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsCanBeSpecialSummoned(e,0,tp,false,false) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsExistingTarget(Card.IsCanBeSpecialSummoned,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil,e,0,tp,false,false) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,Card.IsCanBeSpecialSummoned,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil,e,0,tp,false,false) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c78794994.eqlimit(e,c) - return e:GetOwner()==c -end -function c78794994.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then - if Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)==0 then return end - Duel.Equip(tp,c,tc) - --Add Equip limit - local e1=Effect.CreateEffect(tc) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(c78794994.eqlimit) - c:RegisterEffect(e1) - end -end -function c78794994.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetHandler():GetFirstCardTarget() - if tc and tc:IsLocation(LOCATION_MZONE) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c78811937.lua b/script/c78811937.lua deleted file mode 100644 index efe7d2cf63..0000000000 --- a/script/c78811937.lua +++ /dev/null @@ -1,36 +0,0 @@ ---忍び寄る闇 -function c78811937.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c78811937.cost) - e1:SetTarget(c78811937.target) - e1:SetOperation(c78811937.activate) - c:RegisterEffect(e1) -end -function c78811937.cfilter(c) - return c:IsAttribute(ATTRIBUTE_DARK) and c:IsAbleToRemoveAsCost() -end -function c78811937.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c78811937.cfilter,tp,LOCATION_GRAVE,0,2,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local rg=Duel.SelectMatchingCard(tp,c78811937.cfilter,tp,LOCATION_GRAVE,0,2,2,nil) - Duel.Remove(rg,POS_FACEUP,REASON_COST) -end -function c78811937.filter(c) - return c:GetLevel()==4 and c:IsAttribute(ATTRIBUTE_DARK) and c:IsAbleToHand() -end -function c78811937.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c78811937.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c78811937.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c78811937.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c78835747.lua b/script/c78835747.lua deleted file mode 100644 index 74d465500c..0000000000 --- a/script/c78835747.lua +++ /dev/null @@ -1,56 +0,0 @@ ---EMカレイドスコーピオン -function c78835747.initial_effect(c) - --pendulum summon - aux.AddPendulumProcedure(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --atk - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetRange(LOCATION_PZONE) - e2:SetTargetRange(LOCATION_MZONE,0) - e2:SetTarget(c78835747.atktg) - e2:SetValue(300) - c:RegisterEffect(e2) - --attack all - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(78835747,0)) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_MZONE) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetCountLimit(1) - e3:SetCondition(c78835747.condition) - e3:SetTarget(c78835747.target) - e3:SetOperation(c78835747.operation) - c:RegisterEffect(e3) -end -function c78835747.atktg(e,c) - return c:IsAttribute(ATTRIBUTE_LIGHT) -end -function c78835747.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsAbleToEnterBP() -end -function c78835747.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,nil) -end -function c78835747.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_ATTACK_ALL) - e1:SetValue(c78835747.atkfilter) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - end -end -function c78835747.atkfilter(e,c) - return bit.band(c:GetSummonType(),SUMMON_TYPE_SPECIAL)==SUMMON_TYPE_SPECIAL -end diff --git a/script/c78845026.lua b/script/c78845026.lua deleted file mode 100644 index eacf08ad98..0000000000 --- a/script/c78845026.lua +++ /dev/null @@ -1,32 +0,0 @@ ---ライトニング・チューン -function c78845026.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c78845026.target) - e1:SetOperation(c78845026.activate) - c:RegisterEffect(e1) -end -function c78845026.filter(c) - return c:IsFaceup() and c:GetLevel()==4 and c:IsAttribute(ATTRIBUTE_LIGHT) and not c:IsType(TYPE_TUNER) -end -function c78845026.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c78845026.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c78845026.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c78845026.filter,tp,LOCATION_MZONE,0,1,1,nil) -end -function c78845026.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_ADD_TYPE) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(TYPE_TUNER) - tc:RegisterEffect(e1) - end -end diff --git a/script/c78864369.lua b/script/c78864369.lua deleted file mode 100644 index a3e8f6c618..0000000000 --- a/script/c78864369.lua +++ /dev/null @@ -1,28 +0,0 @@ ---リバースソウル -function c78864369.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TODECK) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c78864369.target) - e1:SetOperation(c78864369.activate) - c:RegisterEffect(e1) -end -function c78864369.filter(c) - return c:IsType(TYPE_FLIP) and c:IsAbleToDeck() -end -function c78864369.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c78864369.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c78864369.filter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectTarget(tp,c78864369.filter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0) -end -function c78864369.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoDeck(tc,nil,0,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/script/c78868119.lua b/script/c78868119.lua deleted file mode 100644 index 73325d7908..0000000000 --- a/script/c78868119.lua +++ /dev/null @@ -1,28 +0,0 @@ ---深海のディーヴァ -function c78868119.initial_effect(c) - --summon success - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(78868119,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c78868119.sumtg) - e1:SetOperation(c78868119.sumop) - c:RegisterEffect(e1) -end -function c78868119.filter(c,e,sp) - return c:IsLevelBelow(3) and c:IsRace(RACE_SEASERPENT) and c:IsCanBeSpecialSummoned(e,0,sp,false,false) -end -function c78868119.sumtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c78868119.filter,tp,LOCATION_DECK,0,1,nil,e,tp) - and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c78868119.sumop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c78868119.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c78868776.lua b/script/c78868776.lua deleted file mode 100644 index 94f4ed01f9..0000000000 --- a/script/c78868776.lua +++ /dev/null @@ -1,51 +0,0 @@ ---剣闘獣ラクエル -function c78868776.initial_effect(c) - --atk - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_BASE_ATTACK) - e1:SetCondition(c78868776.atkcon) - e1:SetValue(2100) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(78868776,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_PHASE+PHASE_BATTLE) - e2:SetRange(LOCATION_MZONE) - e2:SetCondition(c78868776.spcon) - e2:SetCost(c78868776.spcost) - e2:SetTarget(c78868776.sptg) - e2:SetOperation(c78868776.spop) - c:RegisterEffect(e2) -end -function c78868776.atkcon(e) - return e:GetHandler():GetFlagEffect(78868776)>0 -end -function c78868776.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetBattledGroupCount()>0 -end -function c78868776.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToDeckAsCost() end - Duel.SendtoDeck(c,nil,2,REASON_COST) -end -function c78868776.filter(c,e,tp) - return not c:IsCode(78868776) and c:IsSetCard(0x19) and c:IsCanBeSpecialSummoned(e,100,tp,false,false) -end -function c78868776.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsExistingMatchingCard(c78868776.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c78868776.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c78868776.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - local tc=g:GetFirst() - if tc then - Duel.SpecialSummon(tc,100,tp,tp,false,false,POS_FACEUP) - tc:RegisterFlagEffect(tc:GetOriginalCode(),RESET_EVENT+0x1ff0000,0,0) - end -end diff --git a/script/c78910579.lua b/script/c78910579.lua deleted file mode 100644 index a32125af28..0000000000 --- a/script/c78910579.lua +++ /dev/null @@ -1,39 +0,0 @@ ---儀水鏡の反魂術 -function c78910579.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c78910579.target) - e1:SetOperation(c78910579.activate) - c:RegisterEffect(e1) -end -function c78910579.filter1(c) - return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_WATER) and c:IsAbleToDeck() -end -function c78910579.filter2(c) - return c:IsAttribute(ATTRIBUTE_WATER) and c:IsAbleToHand() -end -function c78910579.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - if chk==0 then return Duel.IsExistingTarget(c78910579.filter1,tp,LOCATION_MZONE,0,1,nil) - and Duel.IsExistingTarget(c78910579.filter2,tp,LOCATION_GRAVE,0,2,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g1=Duel.SelectTarget(tp,c78910579.filter1,tp,LOCATION_MZONE,0,1,1,nil) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g2=Duel.SelectTarget(tp,c78910579.filter2,tp,LOCATION_GRAVE,0,2,2,nil) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g1,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g2,2,0,0) -end -function c78910579.activate(e,tp,eg,ep,ev,re,r,rp) - local ex,g1=Duel.GetOperationInfo(0,CATEGORY_TODECK) - local ex,g2=Duel.GetOperationInfo(0,CATEGORY_TOHAND) - local tc1=g1:GetFirst() - if tc1:IsRelateToEffect(e) and Duel.SendtoDeck(tc1,nil,2,REASON_EFFECT)~=0 then - local hg=g2:Filter(Card.IsRelateToEffect,nil,e) - Duel.SendtoHand(hg,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,hg) - end -end diff --git a/script/c78922939.lua b/script/c78922939.lua deleted file mode 100644 index cf58960d9d..0000000000 --- a/script/c78922939.lua +++ /dev/null @@ -1,19 +0,0 @@ ---ジャンク・サーバント -function c78922939.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c78922939.spcon) - c:RegisterEffect(e1) -end -function c78922939.filter(c) - return c:IsFaceup() and c:IsSetCard(0x43) -end -function c78922939.spcon(e,c) - if c==nil then return true end - return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and - Duel.IsExistingMatchingCard(c78922939.filter,c:GetControler(),LOCATION_MZONE,0,1,nil) -end diff --git a/script/c78933589.lua b/script/c78933589.lua deleted file mode 100644 index 6f008aeaf3..0000000000 --- a/script/c78933589.lua +++ /dev/null @@ -1,43 +0,0 @@ ---原初のスープ -function c78933589.initial_effect(c) - c:SetUniqueOnField(1,0,78933589) - --activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --draw - local e2=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(78933589,0)) - e2:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_SZONE) - e2:SetCountLimit(1) - e2:SetTarget(c78933589.target) - e2:SetOperation(c78933589.activate) - c:RegisterEffect(e2) -end -function c78933589.filter(c) - return c:IsSetCard(0x604e) and c:IsAbleToDeck() -end -function c78933589.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp,1) - and Duel.IsExistingMatchingCard(c78933589.filter,tp,LOCATION_HAND,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_HAND) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c78933589.activate(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) or not Duel.IsPlayerCanDraw(tp) then return end - local ct=Duel.GetFieldGroupCount(tp,LOCATION_DECK,0) - if ct==0 then return end - if ct>2 then ct=2 end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectMatchingCard(tp,c78933589.filter,tp,LOCATION_HAND,0,1,ct,nil) - if g:GetCount()>0 then - Duel.ConfirmCards(1-tp,g) - Duel.SendtoDeck(g,nil,2,REASON_EFFECT) - Duel.ShuffleDeck(tp) - Duel.BreakEffect() - Duel.Draw(tp,g:GetCount(),REASON_EFFECT) - end -end diff --git a/script/c78986941.lua b/script/c78986941.lua deleted file mode 100644 index f1168ee622..0000000000 --- a/script/c78986941.lua +++ /dev/null @@ -1,37 +0,0 @@ ---突撃指令 -function c78986941.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,0x1c0) - e1:SetTarget(c78986941.target) - e1:SetOperation(c78986941.activate) - c:RegisterEffect(e1) -end -function c78986941.rfilter(c,e) - local tpe=c:GetType() - return bit.band(tpe,TYPE_NORMAL)~=0 and bit.band(tpe,TYPE_TOKEN)==0 - and c:IsFaceup() and c:IsReleasable() and c:IsReleasableByEffect() -end -function c78986941.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c78986941.rfilter(chkc,e) end - if chk==0 then return Duel.IsExistingTarget(c78986941.rfilter,tp,LOCATION_MZONE,0,1,nil,e) - and Duel.IsExistingMatchingCard(Card.IsDestructable,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) - local rg=Duel.SelectTarget(tp,c78986941.rfilter,tp,LOCATION_MZONE,0,1,1,nil,e) - local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,0,LOCATION_MZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c78986941.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) and Duel.Release(tc,REASON_EFFECT)>0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local dg=Duel.SelectMatchingCard(tp,Card.IsDestructable,tp,0,LOCATION_MZONE,1,1,nil) - if dg:GetCount()>0 then - Duel.Destroy(dg,REASON_EFFECT) - end - end -end diff --git a/script/c79068663.lua b/script/c79068663.lua deleted file mode 100644 index a275912740..0000000000 --- a/script/c79068663.lua +++ /dev/null @@ -1,64 +0,0 @@ ---ジャンク・アタック -function c79068663.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c79068663.target) - e1:SetOperation(c79068663.operation) - c:RegisterEffect(e1) - --Equip limit - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_EQUIP_LIMIT) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetValue(1) - c:RegisterEffect(e2) - --damage - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(79068663,0)) - e3:SetCategory(CATEGORY_DAMAGE) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e3:SetCode(EVENT_BATTLE_DESTROYED) - e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e3:SetRange(LOCATION_SZONE) - e3:SetCondition(c79068663.damcon) - e3:SetTarget(c79068663.damtg) - e3:SetOperation(c79068663.damop) - c:RegisterEffect(e3) -end -function c79068663.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c79068663.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,e:GetHandler(),tc) - end -end -function c79068663.damcon(e,tp,eg,ep,ev,re,r,rp) - local eqc=e:GetHandler():GetEquipTarget() - local des=eg:GetFirst() - return des:IsLocation(LOCATION_GRAVE) and des:GetReasonCard()==eqc and des:IsType(TYPE_MONSTER) -end -function c79068663.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - eg:GetFirst():CreateEffectRelation(e) - Duel.SetTargetPlayer(1-tp) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,0) -end -function c79068663.damop(e,tp,eg,ep,ev,re,r,rp) - local des=eg:GetFirst() - local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) - if des:IsRelateToEffect(e) then - local dam=des:GetAttack()/2 - if dam<0 then dam=0 end - Duel.Damage(p,dam,REASON_EFFECT) - end -end diff --git a/script/c79080761.lua b/script/c79080761.lua deleted file mode 100644 index c8495041b9..0000000000 --- a/script/c79080761.lua +++ /dev/null @@ -1,54 +0,0 @@ ---ギガストーン・オメガ -function c79080761.initial_effect(c) - c:EnableReviveLimit() - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c79080761.spcon) - e1:SetOperation(c79080761.spop) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(79080761,0)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetCondition(c79080761.condition) - e2:SetTarget(c79080761.target) - e2:SetOperation(c79080761.operation) - c:RegisterEffect(e2) -end -function c79080761.spfilter(c) - return c:IsAttribute(ATTRIBUTE_EARTH) and c:IsAbleToRemoveAsCost() -end -function c79080761.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c79080761.spfilter,tp,LOCATION_GRAVE,0,2,nil) -end -function c79080761.spop(e,tp,eg,ep,ev,re,r,rp,c) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c79080761.spfilter,tp,LOCATION_GRAVE,0,2,2,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c79080761.condition(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsReason(REASON_EFFECT) and c:GetPreviousControler()==tp - and bit.band(c:GetPreviousPosition(),POS_FACEUP)~=0 and bit.band(c:GetPreviousLocation(),LOCATION_ONFIELD)~=0 -end -function c79080761.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable() -end -function c79080761.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local g=Duel.GetMatchingGroup(c79080761.filter,tp,0,LOCATION_ONFIELD,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c79080761.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c79080761.filter,tp,0,LOCATION_ONFIELD,nil) - Duel.Destroy(g,REASON_EFFECT) -end diff --git a/script/c79106360.lua b/script/c79106360.lua deleted file mode 100644 index 1c4c055f97..0000000000 --- a/script/c79106360.lua +++ /dev/null @@ -1,83 +0,0 @@ ---カオスポッド -function c79106360.initial_effect(c) - --flip - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TODECK) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP) - e1:SetOperation(c79106360.operation) - c:RegisterEffect(e1) -end -function c79106360.filter(c) - return not c:IsStatus(STATUS_BATTLE_DESTROYED) and c:IsAbleToDeck() -end -function c79106360.operation(e,tp,eg,ep,ev,re,r,rp) - local rg=Duel.GetMatchingGroup(c79106360.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - Duel.SendtoDeck(rg,nil,0,REASON_EFFECT) - local ct1=0 - local ct2=0 - rg=Duel.GetOperatedGroup() - local tc=rg:GetFirst() - while tc do - if tc:IsLocation(LOCATION_DECK) and tc:IsType(TYPE_MONSTER) then - if tc:GetControler()==tp then ct1=ct1+1 - else ct2=ct2+1 end - end - tc=rg:GetNext() - end - if ct1>0 then Duel.ShuffleDeck(tp) end - if ct2>0 then Duel.ShuffleDeck(1-tp) end - Duel.BreakEffect() - local g1=nil - local g2=nil - if ct1>0 then g1=c79106360.sp(e,tp,ct1) end - if ct2>0 then g2=c79106360.sp(e,1-tp,ct2) end - Duel.SpecialSummonComplete() - if g1 then Duel.ShuffleSetCard(g1) end - if g2 then Duel.ShuffleSetCard(g2) end -end -function c79106360.spfilter(c,e,tp) - local lv=c:GetLevel() - return lv>0 and lv<=4 and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN) -end -function c79106360.sp(e,tp,ct) - local g=Duel.GetFieldGroup(tp,LOCATION_DECK,0) - local dt=g:GetCount() - if dt==0 then return false end - local dlist={} - local tc=g:GetFirst() - while tc do - if tc:IsType(TYPE_MONSTER) then dlist[tc:GetSequence()]=tc end - tc=g:GetNext() - end - local i=dt-1 - local a=0 - local last=nil - g=Group.CreateGroup() - while a=0 do - tc=dlist[i] - if tc then - g:AddCard(tc) - last=tc - a=a+1 - end - i=i-1 - end - local conf=dt-last:GetSequence() - Duel.ConfirmDecktop(tp,conf) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - g=g:Filter(c79106360.spfilter,nil,e,tp) - if g:GetCount()>ft then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - g=g:Select(tp,ft,ft,nil) - end - tc=g:GetFirst() - while tc do - Duel.DisableShuffleCheck() - Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEDOWN_DEFENCE) - tc=g:GetNext() - end - if conf-g:GetCount()>0 then - Duel.DiscardDeck(tp,conf-g:GetCount(),REASON_EFFECT+REASON_REVEAL) - end - return g -end diff --git a/script/c79109599.lua b/script/c79109599.lua deleted file mode 100644 index 0dd006ee65..0000000000 --- a/script/c79109599.lua +++ /dev/null @@ -1,42 +0,0 @@ ---沼地の魔神王 -function c79109599.initial_effect(c) - --search - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(79109599,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND) - e1:SetCost(c79109599.cost) - e1:SetTarget(c79109599.target) - e1:SetOperation(c79109599.operation) - c:RegisterEffect(e1) - --fusion substitute - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_FUSION_SUBSTITUTE) - e2:SetCondition(c79109599.subcon) - c:RegisterEffect(e2) -end -function c79109599.subcon(e) - return e:GetHandler():IsLocation(LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE) -end -function c79109599.cost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToGraveAsCost() and c:IsDiscardable() end - Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD) -end -function c79109599.filter(c) - return c:GetCode()==24094653 and c:IsAbleToHand() -end -function c79109599.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c79109599.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c79109599.operation(e,tp,eg,ep,ev,re,r,rp,chk) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c79109599.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c79126789.lua b/script/c79126789.lua deleted file mode 100644 index e8624da33d..0000000000 --- a/script/c79126789.lua +++ /dev/null @@ -1,33 +0,0 @@ ---暗黒界の狩人 ブラウ -function c79126789.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(79126789,0)) - e1:SetCategory(CATEGORY_DRAW) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCondition(c79126789.drcon) - e1:SetTarget(c79126789.drtg) - e1:SetOperation(c79126789.drop) - c:RegisterEffect(e1) -end -function c79126789.drcon(e,tp,eg,ep,ev,re,r,rp) - e:SetLabel(e:GetHandler():GetPreviousControler()) - return e:GetHandler():IsPreviousLocation(LOCATION_HAND) and bit.band(r,0x4040)==0x4040 -end -function c79126789.drtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(tp) - if tp==rp or tp~=e:GetLabel() then - Duel.SetTargetParam(1) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) - else - Duel.SetTargetParam(2) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2) - end -end -function c79126789.drop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end diff --git a/script/c7914843.lua b/script/c7914843.lua deleted file mode 100644 index 1f76ec8c89..0000000000 --- a/script/c7914843.lua +++ /dev/null @@ -1,53 +0,0 @@ ---電磁ミノ虫 -function c7914843.initial_effect(c) - --flip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(7914843,0)) - e1:SetCategory(CATEGORY_CONTROL) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c7914843.target) - e1:SetOperation(c7914843.operation) - c:RegisterEffect(e1) - --destroyed - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(7914843,1)) - e2:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_BATTLE_DESTROYED) - e2:SetOperation(c7914843.desop) - c:RegisterEffect(e2) -end -function c7914843.filter(c) - return c:IsFaceup() and c:IsRace(RACE_MACHINE) and c:IsControlerCanBeChanged() -end -function c7914843.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c7914843.filter(chkc) end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) - local g=Duel.SelectTarget(tp,c7914843.filter,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0) -end -function c7914843.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) and not Duel.GetControl(tc,tp,PHASE_END+RESET_SELF_TURN,1) then - if not tc:IsImmuneToEffect(e) and tc:IsAbleToChangeControler() then - Duel.Destroy(tc,REASON_EFFECT) - end - end -end -function c7914843.desop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local bc=c:GetBattleTarget() - if not bc:IsRelateToBattle() or bc:IsFacedown() then return end - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(-500) - bc:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_UPDATE_DEFENCE) - bc:RegisterEffect(e2) -end diff --git a/script/c79155167.lua b/script/c79155167.lua deleted file mode 100644 index 71866577c5..0000000000 --- a/script/c79155167.lua +++ /dev/null @@ -1,39 +0,0 @@ ---アーマーブラスト -function c79155167.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c79155167.target) - e1:SetOperation(c79155167.activate) - c:RegisterEffect(e1) -end -function c79155167.filter1(c) - return c:IsFaceup() and c:IsSetCard(0x56) and c:IsDestructable() -end -function c79155167.filter2(c) - return c:IsFaceup() and c:IsDestructable() -end -function c79155167.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - if chk==0 then return Duel.IsExistingTarget(c79155167.filter1,tp,LOCATION_ONFIELD,0,1,nil) - and Duel.IsExistingTarget(c79155167.filter2,tp,0,LOCATION_ONFIELD,2,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g1=Duel.SelectTarget(tp,c79155167.filter1,tp,LOCATION_ONFIELD,0,1,1,nil) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g2=Duel.SelectTarget(tp,c79155167.filter2,tp,0,LOCATION_ONFIELD,2,2,nil) - g1:Merge(g2) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g1,g1:GetCount(),0,0) -end -function c79155167.tgfilter(c,e) - return c:IsFaceup() and c:IsRelateToEffect(e) -end -function c79155167.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local tg=g:Filter(c79155167.tgfilter,nil,e) - if tg:GetCount()>0 then - Duel.Destroy(tg,REASON_EFFECT) - end -end diff --git a/script/c79161790.lua b/script/c79161790.lua deleted file mode 100644 index 6538d57dd5..0000000000 --- a/script/c79161790.lua +++ /dev/null @@ -1,45 +0,0 @@ ---反転世界 -function c79161790.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetCondition(c79161790.condition) - e1:SetTarget(c79161790.target) - e1:SetOperation(c79161790.activate) - c:RegisterEffect(e1) -end -function c79161790.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end -function c79161790.filter(c) - return c:IsFaceup() and c:IsType(TYPE_EFFECT) -end -function c79161790.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c79161790.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end -end -function c79161790.activate(e,tp,eg,ep,ev,re,r,rp) - local sg=Duel.GetMatchingGroup(c79161790.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - local c=e:GetHandler() - local tc=sg:GetFirst() - while tc do - local atk=tc:GetAttack() - local def=tc:GetDefence() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(def) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_SET_DEFENCE_FINAL) - e2:SetReset(RESET_EVENT+0x1fe0000) - e2:SetValue(atk) - tc:RegisterEffect(e2) - tc=sg:GetNext() - end -end diff --git a/script/c79178930.lua b/script/c79178930.lua deleted file mode 100644 index 46105a7578..0000000000 --- a/script/c79178930.lua +++ /dev/null @@ -1,30 +0,0 @@ ---時限カラクリ爆弾 -function c79178930.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_BE_BATTLE_TARGET) - e1:SetCondition(c79178930.condition) - e1:SetTarget(c79178930.target) - e1:SetOperation(c79178930.activate) - c:RegisterEffect(e1) -end -function c79178930.condition(e,tp,eg,ep,ev,re,r,rp) - local tc=eg:GetFirst() - return tc:IsFaceup() and tc:IsDefencePos() and tc:IsSetCard(0x11) -end -function c79178930.filter(c) - return c:IsFaceup() and c:IsDestructable() -end -function c79178930.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c79178930.filter,tp,0,LOCATION_MZONE,1,nil) end - local g=Duel.GetMatchingGroup(c79178930.filter,tp,0,LOCATION_MZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c79178930.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c79178930.filter,tp,0,LOCATION_MZONE,nil) - if g:GetCount()>0 then - Duel.Destroy(g,REASON_EFFECT) - end -end diff --git a/script/c79185500.lua b/script/c79185500.lua deleted file mode 100644 index 9405c57a5d..0000000000 --- a/script/c79185500.lua +++ /dev/null @@ -1,56 +0,0 @@ ---鉄巨人アイアンハンマー -function c79185500.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c79185500.spcon) - c:RegisterEffect(e1) - -- - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EFFECT_CANNOT_CHANGE_POSITION) - c:RegisterEffect(e2) - --atk - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(79185500,0)) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1) - e3:SetTarget(c79185500.target) - e3:SetOperation(c79185500.operation) - c:RegisterEffect(e3) -end -function c79185500.spfilter(c,code) - return c:IsFaceup() and c:IsCode(code) -end -function c79185500.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.GetLocationCount(tp,LOCATION_MZONE,0)~=0 - and Duel.IsExistingMatchingCard(c79185500.spfilter,tp,LOCATION_ONFIELD,0,1,nil,80208158) - and Duel.IsExistingMatchingCard(c79185500.spfilter,tp,LOCATION_ONFIELD,0,1,nil,16796157) - and Duel.IsExistingMatchingCard(c79185500.spfilter,tp,LOCATION_ONFIELD,0,1,nil,43791861) -end -function c79185500.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsFaceup() and chkc:IsLocation(LOCATION_MZONE) end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,nil) -end -function c79185500.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DIRECT_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - end -end diff --git a/script/c79205581.lua b/script/c79205581.lua deleted file mode 100644 index 6a33085f8c..0000000000 --- a/script/c79205581.lua +++ /dev/null @@ -1,49 +0,0 @@ ---強制終了 -function c79205581.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c79205581.cost1) - e1:SetOperation(c79205581.operation1) - c:RegisterEffect(e1) - --instant(chain) - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(79205581,0)) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetRange(LOCATION_SZONE) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetCondition(c79205581.condition2) - e2:SetTarget(c79205581.cost2) - e2:SetOperation(c79205581.operation2) - c:RegisterEffect(e2) -end -function c79205581.cost1(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - if Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_ONFIELD,0,1,e:GetHandler()) - and Duel.GetCurrentPhase()==PHASE_BATTLE and Duel.SelectYesNo(tp,aux.Stringid(79205581,1)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,Card.IsAbleToGraveAsCost,tp,LOCATION_ONFIELD,0,1,1,e:GetHandler()) - Duel.SendtoGrave(g,REASON_COST) - e:SetLabel(1) - else e:SetLabel(0) end -end -function c79205581.operation1(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - if e:GetLabel()==1 then - Duel.SkipPhase(Duel.GetTurnPlayer(),PHASE_BATTLE,RESET_PHASE+PHASE_BATTLE,1) - end -end -function c79205581.condition2(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()==PHASE_BATTLE and not e:GetHandler():IsStatus(STATUS_CHAINING) -end -function c79205581.cost2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_ONFIELD,0,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,Card.IsAbleToGraveAsCost,tp,LOCATION_ONFIELD,0,1,1,e:GetHandler()) - Duel.SendtoGrave(g,REASON_COST) -end -function c79205581.operation2(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - Duel.SkipPhase(Duel.GetTurnPlayer(),PHASE_BATTLE,RESET_PHASE+PHASE_BATTLE,1) -end diff --git a/script/c79206750.lua b/script/c79206750.lua deleted file mode 100644 index 368ecf6885..0000000000 --- a/script/c79206750.lua +++ /dev/null @@ -1,63 +0,0 @@ ---アビスコーン -function c79206750.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetCondition(c79206750.condition) - e1:SetTarget(c79206750.target) - e1:SetOperation(c79206750.activate) - c:RegisterEffect(e1) - -- - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(79206750,0)) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetCondition(c79206750.tgcon) - e2:SetTarget(c79206750.tgtg) - e2:SetOperation(c79206750.tgop) - c:RegisterEffect(e2) -end -function c79206750.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end -function c79206750.filter(c) - return c:IsFaceup() and c:IsSetCard(0x74) -end -function c79206750.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c79206750.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c79206750.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c79206750.filter,tp,LOCATION_MZONE,0,1,1,nil) -end -function c79206750.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - e1:SetValue(1000) - tc:RegisterEffect(e1) - end -end -function c79206750.tgcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) and e:GetHandler():IsPreviousPosition(POS_FACEDOWN) -end -function c79206750.tgtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectTarget(tp,nil,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,g:GetCount(),0,0) -end -function c79206750.tgop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.SendtoGrave(tc,REASON_EFFECT) - end -end diff --git a/script/c79229522.lua b/script/c79229522.lua deleted file mode 100644 index ab7a5bb1eb..0000000000 --- a/script/c79229522.lua +++ /dev/null @@ -1,78 +0,0 @@ ---キメラテック・フォートレス・ドラゴン -function c79229522.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcCodeFun(c,70095154,aux.FilterBoolFunction(Card.IsRace,RACE_MACHINE),1,true,true) - --spsummon condition - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(c79229522.splimit) - c:RegisterEffect(e1) - --special summon rule - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_SPSUMMON_PROC) - e2:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e2:SetRange(LOCATION_EXTRA) - e2:SetCondition(c79229522.sprcon) - e2:SetOperation(c79229522.sprop) - c:RegisterEffect(e2) - --cannot be fusion material - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e3:SetCode(EFFECT_CANNOT_BE_FUSION_MATERIAL) - e3:SetValue(1) - c:RegisterEffect(e3) -end -function c79229522.splimit(e,se,sp,st) - return e:GetHandler():GetLocation()~=LOCATION_EXTRA -end -function c79229522.spfilter1(c,tp,ft) - if c:IsCode(70095154) and c:IsAbleToGraveAsCost() and c:IsCanBeFusionMaterial(true) and (c:IsControler(tp) or c:IsFaceup()) then - if ft>0 or (c:IsControler(tp) and c:IsLocation(LOCATION_MZONE)) then - return Duel.IsExistingMatchingCard(c79229522.spfilter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,c,tp) - else - return Duel.IsExistingMatchingCard(c79229522.spfilter2,tp,LOCATION_MZONE,0,1,c,tp) - end - else return false end -end -function c79229522.spfilter2(c,tp) - return c:IsRace(RACE_MACHINE) and c:IsAbleToGraveAsCost() and c:IsCanBeFusionMaterial() and (c:IsControler(tp) or c:IsFaceup()) -end -function c79229522.sprcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - return ft>-1 and Duel.IsExistingMatchingCard(c79229522.spfilter1,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil,tp,ft) -end -function c79229522.sprop(e,tp,eg,ep,ev,re,r,rp,c) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(79229522,0)) - local g1=Duel.SelectMatchingCard(tp,c79229522.spfilter1,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil,tp,ft) - local tc=g1:GetFirst() - local g=Duel.GetMatchingGroup(c79229522.spfilter2,tp,LOCATION_MZONE,LOCATION_MZONE,tc,tp) - local g2=nil - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(79229522,1)) - if ft>0 or (tc:IsControler(tp) and tc:IsLocation(LOCATION_MZONE)) then - g2=g:Select(tp,1,10,nil) - else - g2=g:FilterSelect(tp,Card.IsControler,1,1,nil,tp) - if g:GetCount()>1 and Duel.SelectYesNo(tp,210) then - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(79229522,1)) - local g3=g:Select(tp,1,9,g2:GetFirst()) - g2:Merge(g3) - end - end - g1:Merge(g2) - Duel.SendtoGrave(g1,REASON_COST) - --spsummon condition - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_BASE_ATTACK) - e1:SetReset(RESET_EVENT+0xff0000) - e1:SetValue(g1:GetCount()*1000) - c:RegisterEffect(e1) -end diff --git a/script/c79234734.lua b/script/c79234734.lua deleted file mode 100644 index cb49f473f0..0000000000 --- a/script/c79234734.lua +++ /dev/null @@ -1,65 +0,0 @@ ---超戦士の魂 -function c79234734.initial_effect(c) - --atk - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1,79234734) - e1:SetCost(c79234734.atkcost) - e1:SetOperation(c79234734.atkop) - c:RegisterEffect(e1) - --search - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_GRAVE) - e2:SetCountLimit(1,79234735) - e2:SetCost(c79234734.thcost) - e2:SetTarget(c79234734.thtg) - e2:SetOperation(c79234734.thop) - c:RegisterEffect(e2) -end -function c79234734.cfilter(c) - return c:IsSetCard(0xcf) and c:IsType(TYPE_MONSTER) and c:IsAbleToGraveAsCost() -end -function c79234734.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c79234734.cfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,c79234734.cfilter,1,1,REASON_COST) -end -function c79234734.atkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CHANGE_CODE) - e1:SetValue(5405694) - e1:SetReset(RESET_EVENT+0x1ff0000+RESET_PHASE+PHASE_END+RESET_OPPO_TURN) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_SET_ATTACK_FINAL) - e2:SetValue(3000) - e2:SetReset(RESET_EVENT+0x1ff0000+RESET_PHASE+PHASE_END+RESET_OPPO_TURN) - c:RegisterEffect(e2) - end -end -function c79234734.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) -end -function c79234734.thfilter(c) - return (c:IsCode(6628343) or c:IsCode(32013448)) and c:IsAbleToHand() -end -function c79234734.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c79234734.thfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c79234734.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c79234734.thfilter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c79279397.lua b/script/c79279397.lua deleted file mode 100644 index 370d7fcb04..0000000000 --- a/script/c79279397.lua +++ /dev/null @@ -1,30 +0,0 @@ ---Dボーイズ -function c79279397.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(79279397,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DELAY) - e1:SetTarget(c79279397.target) - e1:SetOperation(c79279397.spop) - c:RegisterEffect(e1) -end -function c79279397.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c79279397.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c79279397.filter(c,e,tp) - return c:IsCode(79279397) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c79279397.spop(e,tp,eg,ep,ev,re,r,rp) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - local g=Duel.GetMatchingGroup(c79279397.filter,tp,LOCATION_DECK,0,nil,e,tp) - if g:GetCount()>0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=g:Select(tp,1,ft,nil) - Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP_ATTACK) - Duel.Damage(tp,sg:GetCount()*1000,REASON_EFFECT) - end -end diff --git a/script/c79306385.lua b/script/c79306385.lua deleted file mode 100644 index 8e032e4bb8..0000000000 --- a/script/c79306385.lua +++ /dev/null @@ -1,43 +0,0 @@ ---宣告者の神託 -function c79306385.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c79306385.target) - e1:SetOperation(c79306385.activate) - c:RegisterEffect(e1) -end -function c79306385.filter(c,e,tp,m) - if not c:IsCode(48546368) or not c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true) then return false end - local mg=m:Filter(Card.IsCanBeRitualMaterial,c,c) - return mg:CheckWithSumGreater(Card.GetRitualLevel,c:GetLevel(),c) -end -function c79306385.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local mg=Duel.GetRitualMaterial(tp) - return Duel.IsExistingMatchingCard(c79306385.filter,tp,LOCATION_HAND,0,1,nil,e,tp,mg) - end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) - Duel.SetChainLimit(c79306385.chlimit) -end -function c79306385.chlimit(e,ep,tp) - return tp==ep -end -function c79306385.activate(e,tp,eg,ep,ev,re,r,rp) - local mg=Duel.GetRitualMaterial(tp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local tg=Duel.SelectMatchingCard(tp,c79306385.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp,mg) - local tc=tg:GetFirst() - if tc then - mg=mg:Filter(Card.IsCanBeRitualMaterial,tc,tc) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) - local mat=mg:SelectWithSumGreater(tp,Card.GetRitualLevel,tc:GetLevel(),tc) - tc:SetMaterial(mat) - Duel.ReleaseRitualMaterial(mat) - Duel.BreakEffect() - Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP) - tc:CompleteProcedure() - end -end diff --git a/script/c79323590.lua b/script/c79323590.lua deleted file mode 100644 index 87777279a5..0000000000 --- a/script/c79323590.lua +++ /dev/null @@ -1,48 +0,0 @@ ---魔力の枷 -function c79323590.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --activate cost - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_ACTIVATE_COST) - e2:SetRange(LOCATION_SZONE) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetTargetRange(1,1) - e2:SetTarget(c79323590.actarget) - e2:SetCost(c79323590.costchk) - e2:SetOperation(c79323590.costop) - c:RegisterEffect(e2) - --summon cost - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetCode(EFFECT_SUMMON_COST) - e3:SetRange(LOCATION_SZONE) - e3:SetTargetRange(LOCATION_HAND,LOCATION_HAND) - e3:SetCost(c79323590.costchk) - e3:SetOperation(c79323590.costop) - c:RegisterEffect(e3) - local e4=e3:Clone() - e4:SetCode(EFFECT_SPSUMMON_COST) - c:RegisterEffect(e4) - --set cost - local e5=e3:Clone() - e5:SetCode(EFFECT_MSET_COST) - c:RegisterEffect(e5) - local e6=e3:Clone() - e6:SetCode(EFFECT_SSET_COST) - c:RegisterEffect(e6) -end -function c79323590.actarget(e,te,tp) - return te:GetHandler():IsLocation(LOCATION_HAND) -end -function c79323590.costchk(e,te_or_c,tp) - return Duel.CheckLPCost(tp,500) -end -function c79323590.costop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_CARD,0,79323590) - Duel.PayLPCost(tp,500) -end diff --git a/script/c79333300.lua b/script/c79333300.lua deleted file mode 100644 index 8856a84749..0000000000 --- a/script/c79333300.lua +++ /dev/null @@ -1,32 +0,0 @@ ---風霊術-「雅」 -function c79333300.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TODECK) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,0x1e0) - e1:SetCost(c79333300.cost) - e1:SetTarget(c79333300.target) - e1:SetOperation(c79333300.activate) - c:RegisterEffect(e1) -end -function c79333300.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsAttribute,1,nil,ATTRIBUTE_WIND) end - local g=Duel.SelectReleaseGroup(tp,Card.IsAttribute,1,1,nil,ATTRIBUTE_WIND) - Duel.Release(g,REASON_COST) -end -function c79333300.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() and chkc:IsAbleToDeck() end - if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToDeck,tp,0,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectTarget(tp,Card.IsAbleToDeck,tp,0,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0) -end -function c79333300.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.SendtoDeck(tc,nil,1,REASON_EFFECT) - end -end diff --git a/script/c79337169.lua b/script/c79337169.lua deleted file mode 100644 index fe634855c5..0000000000 --- a/script/c79337169.lua +++ /dev/null @@ -1,62 +0,0 @@ ---ガントレット・ウォリアー -function c79337169.initial_effect(c) - --atkup - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(79337169,0)) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetCondition(c79337169.condition) - e1:SetCost(c79337169.cost) - e1:SetTarget(c79337169.target) - e1:SetOperation(c79337169.operation) - c:RegisterEffect(e1) -end -function c79337169.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end -function c79337169.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end -function c79337169.filter(c) - return c:IsFaceup() and c:IsRace(RACE_WARRIOR) -end -function c79337169.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c79337169.filter,tp,LOCATION_MZONE,0,1,e:GetHandler()) end -end -function c79337169.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c79337169.filter,tp,LOCATION_MZONE,0,e:GetHandler()) - local tc=g:GetFirst() - local c=e:GetHandler() - while tc do - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(500) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_UPDATE_DEFENCE) - e2:SetLabelObject(e1) - tc:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e3:SetCode(EVENT_DAMAGE_STEP_END) - e3:SetOperation(c79337169.resetop) - e3:SetReset(RESET_EVENT+0x1fe0000) - e3:SetLabelObject(e2) - tc:RegisterEffect(e3) - tc=g:GetNext() - end -end -function c79337169.resetop(e,tp,eg,ep,ev,re,r,rp) - local e1=e:GetLabelObject() - local e2=e1:GetLabelObject() - e1:Reset() - e2:Reset() - e:Reset() -end diff --git a/script/c7935043.lua b/script/c7935043.lua deleted file mode 100644 index 5b16807303..0000000000 --- a/script/c7935043.lua +++ /dev/null @@ -1,30 +0,0 @@ ---海竜神の加護 -function c7935043.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetOperation(c7935043.activate) - c:RegisterEffect(e1) -end -function c7935043.activate(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e1:SetTarget(c7935043.tg) - e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetReset(RESET_PHASE+PHASE_END) - e1:SetValue(1) - Duel.RegisterEffect(e1,tp) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - e2:SetTarget(c7935043.tg) - e2:SetTargetRange(LOCATION_MZONE,0) - e2:SetReset(RESET_PHASE+PHASE_END) - e2:SetValue(1) - Duel.RegisterEffect(e2,tp) -end -function c7935043.tg(e,c) - return c:IsLevelBelow(3) and c:IsAttribute(ATTRIBUTE_WATER) -end diff --git a/script/c79407975.lua b/script/c79407975.lua deleted file mode 100644 index d156a080a5..0000000000 --- a/script/c79407975.lua +++ /dev/null @@ -1,72 +0,0 @@ ---究極宝玉神 レインボー・ダーク・ドラゴン -function c79407975.initial_effect(c) - c:EnableReviveLimit() - --splimit - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_SPSUMMON_PROC) - e2:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e2:SetRange(LOCATION_HAND) - e2:SetCondition(c79407975.spcon) - e2:SetOperation(c79407975.spop) - c:RegisterEffect(e2) - --atkup - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(79407975,0)) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetCategory(CATEGORY_ATKCHANGE) - e3:SetRange(LOCATION_MZONE) - e3:SetCost(c79407975.atkcost) - e3:SetOperation(c79407975.atkop) - c:RegisterEffect(e3) -end -function c79407975.spfilter(c) - return c:IsAttribute(ATTRIBUTE_DARK) and c:IsAbleToRemoveAsCost() -end -function c79407975.spcon(e,c) - if c==nil then return true end - if Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)<=0 then return false end - local g=Duel.GetMatchingGroup(c79407975.spfilter,c:GetControler(),LOCATION_GRAVE,0,nil) - local ct=g:GetClassCount(Card.GetCode) - return ct>=7 -end -function c79407975.spop(e,tp,eg,ep,ev,re,r,rp,c) - local g=Duel.GetMatchingGroup(c79407975.spfilter,tp,LOCATION_GRAVE,0,nil) - local rg=Group.CreateGroup() - for i=1,7 do - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local tc=g:Select(tp,1,1,nil):GetFirst() - if tc then - rg:AddCard(tc) - g:Remove(Card.IsCode,nil,tc:GetCode()) - end - end - Duel.Remove(rg,POS_FACEUP,REASON_COST) -end -function c79407975.cfilter(c) - return c:IsAttribute(ATTRIBUTE_DARK) and (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup()) -end -function c79407975.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - local g=Duel.GetMatchingGroup(c79407975.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,e:GetHandler()) - if chk==0 then return g:GetCount()>0 and g:FilterCount(Card.IsAbleToRemoveAsCost,nil)==g:GetCount() end - e:SetLabel(g:GetCount()) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c79407975.atkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFaceup() and c:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_COPY_INHERIT) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(e:GetLabel()*500) - e1:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e1) - end -end diff --git a/script/c79409334.lua b/script/c79409334.lua deleted file mode 100644 index 189a0f2fb7..0000000000 --- a/script/c79409334.lua +++ /dev/null @@ -1,22 +0,0 @@ ---暗黒ステゴ -function c79409334.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(79409334,0)) - e1:SetCategory(CATEGORY_POSITION) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_BE_BATTLE_TARGET) - e1:SetTarget(c79409334.target) - e1:SetOperation(c79409334.operation) - c:RegisterEffect(e1) -end -function c79409334.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAttackPos() end - Duel.SetOperationInfo(0,CATEGORY_POSITION,e:GetHandler(),1,0,0) -end -function c79409334.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsPosition(POS_FACEUP_ATTACK) then - Duel.ChangePosition(c,POS_FACEUP_DEFENCE) - end -end diff --git a/script/c79418153.lua b/script/c79418153.lua deleted file mode 100644 index 9f5711cf4c..0000000000 --- a/script/c79418153.lua +++ /dev/null @@ -1,34 +0,0 @@ ---ランサー・デーモン -function c79418153.initial_effect(c) - --pierce - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(79418153,0)) - e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_FIELD) - e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCondition(c79418153.piercecon) - e1:SetTarget(c79418153.piercetg) - e1:SetOperation(c79418153.pierceop) - c:RegisterEffect(e1) -end -function c79418153.piercecon(e,tp,eg,ep,ev,re,r,rp) - local a=Duel.GetAttacker() - local d=Duel.GetAttackTarget() - return d and a:IsControler(tp) and d:IsDefencePos() -end -function c79418153.piercetg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.GetAttacker():CreateEffectRelation(e) -end -function c79418153.pierceop(e,tp,eg,ep,ev,re,r,rp) - local a=Duel.GetAttacker() - if a:IsRelateToEffect(e) and a:IsFaceup() then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_PIERCE) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - a:RegisterEffect(e1) - end -end diff --git a/script/c79444933.lua b/script/c79444933.lua deleted file mode 100644 index dd08203302..0000000000 --- a/script/c79444933.lua +++ /dev/null @@ -1,34 +0,0 @@ ---炎の魔精イグニス -function c79444933.initial_effect(c) - --damage - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(79444933,0)) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c79444933.damcost) - e1:SetTarget(c79444933.damtg) - e1:SetOperation(c79444933.damop) - c:RegisterEffect(e1) -end -function c79444933.cfilter(c) - return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_FIRE) -end -function c79444933.damcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,c79444933.cfilter,1,nil) end - local g=Duel.SelectReleaseGroup(tp,c79444933.cfilter,1,1,nil) - Duel.Release(g,REASON_COST) -end -function c79444933.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAttribute,tp,LOCATION_GRAVE,0,1,nil,ATTRIBUTE_FIRE) end - local dam=Duel.GetMatchingGroupCount(Card.IsAttribute,tp,LOCATION_GRAVE,0,nil,ATTRIBUTE_FIRE)*100 - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(dam) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,0,0,1-tp,dam) -end -function c79444933.damop(e,tp,eg,ep,ev,re,r,rp) - local dam=Duel.GetMatchingGroupCount(Card.IsAttribute,tp,LOCATION_GRAVE,0,nil,ATTRIBUTE_FIRE)*100 - local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) - Duel.Damage(p,dam,REASON_EFFECT) -end diff --git a/script/c79447365.lua b/script/c79447365.lua deleted file mode 100644 index 11ebb0ee97..0000000000 --- a/script/c79447365.lua +++ /dev/null @@ -1,55 +0,0 @@ ---トゥーン・マスク -function c79447365.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCondition(c79447365.condition) - e1:SetTarget(c79447365.target) - e1:SetOperation(c79447365.activate) - c:RegisterEffect(e1) -end -function c79447365.cfilter(c) - return c:IsFaceup() and c:IsCode(15259703) -end -function c79447365.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c79447365.cfilter,tp,LOCATION_ONFIELD,0,1,nil) -end -function c79447365.filter(c,e,tp) - local lv=0 - if c:IsType(TYPE_XYZ) then - lv=c:GetRank() - else - lv=c:GetLevel() - end - return c:IsFaceup() and Duel.IsExistingMatchingCard(c79447365.spfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil,e,tp,lv) -end -function c79447365.spfilter(c,e,tp,lv) - return c:IsLevelBelow(lv) and c:IsType(TYPE_TOON) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) -end -function c79447365.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c79447365.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c79447365.filter,tp,0,LOCATION_MZONE,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - local g=Duel.SelectTarget(tp,c79447365.filter,tp,0,LOCATION_MZONE,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_HAND) -end -function c79447365.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local tc=Duel.GetFirstTarget() - if not tc:IsRelateToEffect(e) or tc:IsFacedown() then return end - local lv=0 - if tc:IsType(TYPE_XYZ) then - lv=tc:GetRank() - else - lv=tc:GetLevel() - end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c79447365.spfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil,e,tp,lv) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP) - end -end diff --git a/script/c79473793.lua b/script/c79473793.lua deleted file mode 100644 index 6ff44c22a6..0000000000 --- a/script/c79473793.lua +++ /dev/null @@ -1,61 +0,0 @@ ---青氷の白夜龍 -function c79473793.initial_effect(c) - --negate - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(79473793,0)) - e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_QUICK_F) - e1:SetCode(EVENT_CHAINING) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c79473793.negcon) - e1:SetTarget(c79473793.negtg) - e1:SetOperation(c79473793.negop) - c:RegisterEffect(e1) - --change battle target - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(79473793,1)) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_BE_BATTLE_TARGET) - e2:SetRange(LOCATION_MZONE) - e2:SetCondition(c79473793.cbcon) - e2:SetCost(c79473793.cbcost) - e2:SetOperation(c79473793.cbop) - c:RegisterEffect(e2) -end -function c79473793.negcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end - local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) - if not g or not g:IsContains(c) then return false end - return re:IsHasType(EFFECT_TYPE_ACTIVATE) -end -function c79473793.negtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - if re:GetHandler():IsRelateToEffect(re) and re:GetHandler():IsDestructable() then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) - end -end -function c79473793.negop(e,tp,eg,ep,ev,re,r,rp) - if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(re:GetHandler(),REASON_EFFECT) - end -end -function c79473793.cbcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local bt=eg:GetFirst() - return r~=REASON_REPLACE and c~=bt and bt:IsFaceup() and bt:GetControler()==c:GetControler() -end -function c79473793.cfilter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToGraveAsCost() -end -function c79473793.cbcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c79473793.cfilter,tp,LOCATION_ONFIELD,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c79473793.cfilter,tp,LOCATION_ONFIELD,0,1,1,nil) - Duel.SendtoGrave(g,REASON_COST) -end -function c79473793.cbop(e,tp,eg,ep,ev,re,r,rp) - Duel.ChangeAttackTarget(e:GetHandler()) -end diff --git a/script/c79491903.lua b/script/c79491903.lua deleted file mode 100644 index 21eb82007f..0000000000 --- a/script/c79491903.lua +++ /dev/null @@ -1,59 +0,0 @@ ---レプティレス・ナージャ -function c79491903.initial_effect(c) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e1:SetValue(1) - c:RegisterEffect(e1) - --atk change - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(79491903,0)) - e2:SetCategory(CATEGORY_ATKCHANGE) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_PHASE+PHASE_BATTLE) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetTarget(c79491903.atktg) - e2:SetOperation(c79491903.atkop) - c:RegisterEffect(e2) - --pos change - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(79491903,1)) - e3:SetCategory(CATEGORY_POSITION) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e3:SetCode(EVENT_PHASE+PHASE_END) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1) - e3:SetTarget(c79491903.postg) - e3:SetOperation(c79491903.posop) - c:RegisterEffect(e3) -end -function c79491903.filter(c,bc) - return c:IsFaceup() and c:GetBattledGroup():IsContains(bc) -end -function c79491903.atktg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c79491903.filter,tp,0,LOCATION_MZONE,1,nil,e:GetHandler()) end -end -function c79491903.atkop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c79491903.filter,tp,0,LOCATION_MZONE,nil,e:GetHandler()) - local tc=g:GetFirst() - while tc do - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetValue(0) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - tc=g:GetNext() - end -end -function c79491903.postg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetTurnPlayer()==tp and e:GetHandler():IsDefencePos() end - Duel.SetOperationInfo(0,CATEGORY_POSITION,e:GetHandler(),1,0,0) -end -function c79491903.posop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFaceup() and c:IsRelateToEffect(e) and c:IsDefencePos() then - Duel.ChangePosition(c,0,0,POS_FACEUP_ATTACK,0) - end -end diff --git a/script/c79514956.lua b/script/c79514956.lua deleted file mode 100644 index b3effc22c3..0000000000 --- a/script/c79514956.lua +++ /dev/null @@ -1,28 +0,0 @@ ---幻奏の音女エレジー -function c79514956.initial_effect(c) - --indes - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetTarget(c79514956.indtg) - e1:SetValue(1) - c:RegisterEffect(e1) - --atk - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetRange(LOCATION_MZONE) - e2:SetTargetRange(LOCATION_MZONE,0) - e2:SetTarget(aux.TargetBoolFunction(Card.IsRace,RACE_FAIRY)) - e2:SetValue(300) - e2:SetCondition(c79514956.tgcon) - c:RegisterEffect(e2) -end -function c79514956.indtg(e,c) - return c:IsSetCard(0x9b) and bit.band(c:GetSummonType(),SUMMON_TYPE_SPECIAL)==SUMMON_TYPE_SPECIAL -end -function c79514956.tgcon(e) - return bit.band(e:GetHandler():GetSummonType(),SUMMON_TYPE_SPECIAL)==SUMMON_TYPE_SPECIAL -end diff --git a/script/c79531196.lua b/script/c79531196.lua deleted file mode 100644 index 6a44abbada..0000000000 --- a/script/c79531196.lua +++ /dev/null @@ -1,82 +0,0 @@ ---クリスタル・ローズ -function c79531196.initial_effect(c) - --to grave - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOGRAVE) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetTarget(c79531196.tgtg) - e1:SetOperation(c79531196.tgop) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_GRAVE) - e2:SetCountLimit(1,79531196) - e2:SetCost(c79531196.spcost) - e2:SetTarget(c79531196.sptg) - e2:SetOperation(c79531196.spop) - c:RegisterEffect(e2) -end -function c79531196.filter(c) - return (c:IsSetCard(0x1047) or c:IsSetCard(0x9b)) and c:IsType(TYPE_MONSTER) and c:IsAbleToGrave() -end -function c79531196.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c79531196.filter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK+LOCATION_HAND) -end -function c79531196.tgop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c79531196.filter,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil) - local tc=g:GetFirst() - if tc and Duel.SendtoGrave(tc,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_GRAVE) - and c:IsRelateToEffect(e) and c:IsFaceup() then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CHANGE_CODE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetValue(tc:GetCode()) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(79531196,0)) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_PHASE+PHASE_END) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e2:SetCountLimit(1) - e2:SetRange(LOCATION_MZONE) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e2:SetLabelObject(e1) - e2:SetOperation(c79531196.rstop) - c:RegisterEffect(e2) - end -end -function c79531196.rstop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local e1=e:GetLabelObject() - e1:Reset() - Duel.HintSelection(Group.FromCards(c)) - Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) -end -function c79531196.cfilter(c) - return c:IsType(TYPE_FUSION) and c:IsAbleToRemoveAsCost() -end -function c79531196.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c79531196.cfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c79531196.cfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c79531196.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c79531196.spop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP_DEFENCE) - end -end diff --git a/script/c7953868.lua b/script/c7953868.lua deleted file mode 100644 index 35baf603f6..0000000000 --- a/script/c7953868.lua +++ /dev/null @@ -1,58 +0,0 @@ ---蒼血鬼 -function c7953868.initial_effect(c) - --to defence - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(7953868,0)) - e1:SetCategory(CATEGORY_POSITION) - e1:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_SINGLE) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c7953868.potg) - e1:SetOperation(c7953868.poop) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - c:RegisterEffect(e2) - --special summon - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(7953868,1)) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetCountLimit(1) - e3:SetRange(LOCATION_MZONE) - e3:SetCost(c7953868.spcost) - e3:SetTarget(c7953868.sptg) - e3:SetOperation(c7953868.spop) - c:RegisterEffect(e3) -end -function c7953868.potg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chk==0 then return e:GetHandler():IsAttackPos() end - Duel.SetOperationInfo(0,CATEGORY_POSITION,e:GetHandler(),1,0,0) -end -function c7953868.poop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFaceup() and c:IsAttackPos() and c:IsRelateToEffect(e) then - Duel.ChangePosition(c,POS_FACEUP_DEFENCE) - end -end -function c7953868.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckRemoveOverlayCard(tp,1,0,1,REASON_COST) end - Duel.RemoveOverlayCard(tp,1,0,1,1,REASON_COST) -end -function c7953868.filter(c,e,tp) - return c:IsRace(RACE_ZOMBIE) and c:GetLevel()==4 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c7953868.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c7953868.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c7953868.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c7953868.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c7953868.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsRace(RACE_ZOMBIE) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c79544790.lua b/script/c79544790.lua deleted file mode 100644 index 65478da62f..0000000000 --- a/script/c79544790.lua +++ /dev/null @@ -1,46 +0,0 @@ ---リグレット・リボーン -function c79544790.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetTarget(c79544790.target) - e1:SetOperation(c79544790.activate) - c:RegisterEffect(e1) -end -function c79544790.filter(c,e,tp) - return c:IsLocation(LOCATION_GRAVE) and c:IsCanBeEffectTarget(e) - and c:GetPreviousControler()==tp and c:IsReason(REASON_BATTLE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c79544790.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return eg:IsContains(chkc) and c79544790.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and eg:IsExists(c79544790.filter,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=eg:FilterSelect(tp,c79544790.filter,1,1,nil,e,tp) - Duel.SetTargetCard(g) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c79544790.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENCE)~=0 then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetCondition(c79544790.descon) - e1:SetOperation(c79544790.desop) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,2) - e1:SetCountLimit(1) - tc:RegisterEffect(e1,true) - end -end -function c79544790.descon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c79544790.desop(e,tp,eg,ep,ev,re,r,rp) - Duel.Destroy(e:GetHandler(),REASON_EFFECT) -end diff --git a/script/c79555535.lua b/script/c79555535.lua deleted file mode 100644 index d9d68ced50..0000000000 --- a/script/c79555535.lua +++ /dev/null @@ -1,57 +0,0 @@ ---イグニッションP -function c79555535.initial_effect(c) - --activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --atk & def - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetRange(LOCATION_FZONE) - e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e2:SetValue(300) - e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0xc8)) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EFFECT_UPDATE_DEFENCE) - c:RegisterEffect(e3) - --destroy - local e4=Effect.CreateEffect(c) - e4:SetCategory(CATEGORY_DESTROY+CATEGORY_TOHAND+CATEGORY_SEARCH) - e4:SetType(EFFECT_TYPE_IGNITION) - e4:SetRange(LOCATION_FZONE) - e4:SetProperty(EFFECT_FLAG_CARD_TARGET) - e4:SetCountLimit(1) - e4:SetTarget(c79555535.destg) - e4:SetOperation(c79555535.desop) - c:RegisterEffect(e4) -end -function c79555535.desfilter(c) - return c:IsSetCard(0xc8) and c:IsDestructable() -end -function c79555535.thfilter(c) - return c:IsSetCard(0xc8) and c:IsAbleToHand() -end -function c79555535.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsControler(tp) and c79555535.desfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c79555535.desfilter,tp,LOCATION_ONFIELD,0,1,nil) - and Duel.IsExistingMatchingCard(c79555535.thfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c79555535.desfilter,tp,LOCATION_ONFIELD,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c79555535.desop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)~=0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c79555535.thfilter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end - end -end diff --git a/script/c79569173.lua b/script/c79569173.lua deleted file mode 100644 index d33e1653c5..0000000000 --- a/script/c79569173.lua +++ /dev/null @@ -1,89 +0,0 @@ ---大地震 -function c79569173.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCondition(c79569173.condition) - e1:SetTarget(c79569173.target) - e1:SetOperation(c79569173.activate) - c:RegisterEffect(e1) - --salvage - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(79569173,0)) - e2:SetCategory(CATEGORY_TOHAND) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(79569173) - e2:SetTarget(c79569173.thtg) - e2:SetOperation(c79569173.thop) - c:RegisterEffect(e2) -end -function c79569173.cfilter(c,tp) - return c:IsPreviousLocation(LOCATION_ONFIELD) and c:GetPreviousControler()==tp - and c:IsReason(REASON_DESTROY) and c:IsRace(RACE_DINOSAUR) -end -function c79569173.condition(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c79569173.cfilter,1,nil,tp) -end -function c79569173.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(1-tp,LOCATION_SZONE)>2 end - local c=e:GetHandler() - c:SetTurnCounter(0) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_SZONE) - e1:SetCondition(c79569173.descon) - e1:SetOperation(c79569173.desop) - e1:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e1) - local dis=Duel.SelectDisableField(tp,3,0,LOCATION_SZONE,0) - e:SetLabel(dis) -end -function c79569173.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(1-tp,LOCATION_SZONE)<3 then return end - --disable field - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetRange(LOCATION_SZONE) - e1:SetCode(EFFECT_DISABLE_FIELD) - e1:SetOperation(c79569173.disop) - e1:SetLabel(e:GetLabel()) - e1:SetReset(RESET_EVENT+0x1fe0000) - e:GetHandler():RegisterEffect(e1) -end -function c79569173.descon(e,tp,eg,ep,ev,re,r,rp) - return tp==Duel.GetTurnPlayer() -end -function c79569173.desop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local ct=c:GetTurnCounter() - ct=ct+1 - c:SetTurnCounter(ct) - if ct==3 and Duel.Destroy(c,REASON_EFFECT)>0 then - Duel.RaiseSingleEvent(e:GetHandler(),79569173,e,0,tp,tp,0) - end -end -function c79569173.disop(e,tp) - return e:GetLabel() -end -function c79569173.thfilter(c) - return c:IsRace(RACE_DINOSAUR) and c:IsAbleToHand() -end -function c79569173.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c79569173.thfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c79569173.thfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g=Duel.SelectTarget(tp,c79569173.thfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0) -end -function c79569173.thop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end diff --git a/script/c79571449.lua b/script/c79571449.lua deleted file mode 100644 index 61f0b750b7..0000000000 --- a/script/c79571449.lua +++ /dev/null @@ -1,27 +0,0 @@ ---天使の施し -function c79571449.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DRAW+CATEGORY_HANDES) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c79571449.target) - e1:SetOperation(c79571449.activate) - c:RegisterEffect(e1) -end -function c79571449.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp,3) end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(3) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,3) - Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,2) -end -function c79571449.activate(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - if Duel.Draw(p,d,REASON_EFFECT)==3 then - Duel.ShuffleHand(tp) - Duel.BreakEffect() - Duel.DiscardHand(tp,aux.TRUE,2,2,REASON_EFFECT+REASON_DISCARD) - end -end diff --git a/script/c79575620.lua b/script/c79575620.lua deleted file mode 100644 index b5902353f8..0000000000 --- a/script/c79575620.lua +++ /dev/null @@ -1,32 +0,0 @@ ---お注射天使リリー -function c79575620.initial_effect(c) - --attack up - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(79575620,0)) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_QUICK_O+EFFECT_TYPE_FIELD) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EVENT_PRE_DAMAGE_CALCULATE) - e1:SetCondition(c79575620.con) - e1:SetCost(c79575620.cost) - e1:SetOperation(c79575620.op) - c:RegisterEffect(e1) -end -function c79575620.con(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:GetFlagEffect(79575620)==0 and (Duel.GetAttacker()==c or Duel.GetAttackTarget()==c) -end -function c79575620.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,2000) end - Duel.PayLPCost(tp,2000) - e:GetHandler():RegisterFlagEffect(79575620,RESET_PHASE+RESET_DAMAGE_CAL,0,1) -end -function c79575620.op(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_PHASE+RESET_DAMAGE_CAL) - e1:SetValue(3000) - c:RegisterEffect(e1) -end diff --git a/script/c79580323.lua b/script/c79580323.lua deleted file mode 100644 index 9a7f6dd500..0000000000 --- a/script/c79580323.lua +++ /dev/null @@ -1,75 +0,0 @@ ---剣闘獣スパルティクス -function c79580323.initial_effect(c) - --search - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(79580323,0)) - e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetTarget(c79580323.stg) - e1:SetOperation(c79580323.sop) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(79580323,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_PHASE+PHASE_BATTLE) - e2:SetRange(LOCATION_MZONE) - e2:SetCondition(c79580323.spcon) - e2:SetCost(c79580323.spcost) - e2:SetTarget(c79580323.sptg) - e2:SetOperation(c79580323.spop) - c:RegisterEffect(e2) - --spsummon limit - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e3:SetCode(EFFECT_SPSUMMON_CONDITION) - e3:SetValue(c79580323.splimit) - c:RegisterEffect(e3) -end -function c79580323.splimit(e,se,sp,st) - return st==(SUMMON_TYPE_SPECIAL+101) or bit.band(st,SUMMON_TYPE_PENDULUM)==SUMMON_TYPE_PENDULUM -end -function c79580323.sfilter(c) - return c:IsSetCard(0x19) and c:IsType(TYPE_EQUIP) and c:IsAbleToHand() -end -function c79580323.stg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,0) -end -function c79580323.sop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c79580323.sfilter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end -function c79580323.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetBattledGroupCount()>0 -end -function c79580323.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToDeckAsCost() end - Duel.SendtoDeck(c,nil,2,REASON_COST) -end -function c79580323.filter(c,e,tp) - return not c:IsCode(79580323) and c:IsSetCard(0x19) and c:IsCanBeSpecialSummoned(e,110,tp,false,false) -end -function c79580323.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsExistingMatchingCard(c79580323.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c79580323.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c79580323.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - local tc=g:GetFirst() - if tc then - Duel.SpecialSummon(tc,110,tp,tp,false,false,POS_FACEUP) - tc:RegisterFlagEffect(tc:GetOriginalCode(),RESET_EVENT+0x1ff0000,0,0) - end -end diff --git a/script/c79606837.lua b/script/c79606837.lua deleted file mode 100644 index 601d9f1cec..0000000000 --- a/script/c79606837.lua +++ /dev/null @@ -1,79 +0,0 @@ ---虹光の宣告者 -function c79606837.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1) - c:EnableReviveLimit() - --remove - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE) - e1:SetCode(EFFECT_TO_GRAVE_REDIRECT) - e1:SetRange(LOCATION_MZONE) - e1:SetTarget(c79606837.rmtarget) - e1:SetTargetRange(LOCATION_HAND+LOCATION_DECK,LOCATION_HAND+LOCATION_DECK) - e1:SetValue(LOCATION_REMOVED) - c:RegisterEffect(e1) - --negate - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(79606837,0)) - e2:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_CHAINING) - e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) - e2:SetRange(LOCATION_MZONE) - e2:SetCondition(c79606837.discon) - e2:SetCost(c79606837.discost) - e2:SetTarget(c79606837.distg) - e2:SetOperation(c79606837.disop) - c:RegisterEffect(e2) - --tohand - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(79606837,1)) - e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_TO_GRAVE) - e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e3:SetTarget(c79606837.thtg) - e3:SetOperation(c79606837.thop) - c:RegisterEffect(e3) -end -function c79606837.rmtarget(e,c) - return c:IsType(TYPE_MONSTER) -end -function c79606837.discon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsStatus(STATUS_BATTLE_DESTROYED) then return false end - return (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE)) and Duel.IsChainNegatable(ev) -end -function c79606837.discost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end -function c79606837.distg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) - end -end -function c79606837.disop(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateActivation(ev) - if re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(eg,REASON_EFFECT) - end -end -function c79606837.filter(c) - return c:IsType(TYPE_RITUAL) and c:IsAbleToHand() -end -function c79606837.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c79606837.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c79606837.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c79606837.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c79636594.lua b/script/c79636594.lua deleted file mode 100644 index 9ed4a79aa0..0000000000 --- a/script/c79636594.lua +++ /dev/null @@ -1,41 +0,0 @@ ---ブロック・スパイダー -function c79636594.initial_effect(c) - --cannot be battle target - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(0,LOCATION_MZONE) - e1:SetValue(c79636594.bttg) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(79636594,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetCountLimit(1,79636594) - e2:SetTarget(c79636594.sptg) - e2:SetOperation(c79636594.spop) - c:RegisterEffect(e2) -end -function c79636594.bttg(e,c) - return c:IsFaceup() and c:IsRace(RACE_INSECT) and c~=e:GetHandler() -end -function c79636594.filter(c,e,tp) - return c:IsCode(79636594) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c79636594.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c79636594.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c79636594.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c79636594.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c79649195.lua b/script/c79649195.lua deleted file mode 100644 index cb9fa46706..0000000000 --- a/script/c79649195.lua +++ /dev/null @@ -1,28 +0,0 @@ ---アーマーブレイク -function c79649195.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_CHAINING) - e1:SetCondition(c79649195.condition) - e1:SetTarget(c79649195.target) - e1:SetOperation(c79649195.activate) - c:RegisterEffect(e1) -end -function c79649195.condition(e,tp,eg,ep,ev,re,r,rp) - return re:IsActiveType(TYPE_EQUIP) and re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev) -end -function c79649195.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) - end -end -function c79649195.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateActivation(ev) - if re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(eg,REASON_EFFECT) - end -end diff --git a/script/c79703905.lua b/script/c79703905.lua deleted file mode 100644 index 2edfeb7b26..0000000000 --- a/script/c79703905.lua +++ /dev/null @@ -1,59 +0,0 @@ ---雲魔物-アルトス -function c79703905.initial_effect(c) - --battle indestructable - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e1:SetValue(1) - c:RegisterEffect(e1) - --selfdes - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EFFECT_SELF_DESTROY) - e2:SetCondition(c79703905.sdcon) - c:RegisterEffect(e2) - --counter - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(79703905,0)) - e3:SetCategory(CATEGORY_COUNTER) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e3:SetCode(EVENT_SUMMON_SUCCESS) - e3:SetOperation(c79703905.addc) - c:RegisterEffect(e3) - --handes - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(79703905,1)) - e4:SetCategory(CATEGORY_HANDES) - e4:SetType(EFFECT_TYPE_IGNITION) - e4:SetRange(LOCATION_MZONE) - e4:SetCost(c79703905.hdcost) - e4:SetTarget(c79703905.hdtg) - e4:SetOperation(c79703905.hdop) - c:RegisterEffect(e4) -end -function c79703905.sdcon(e) - return e:GetHandler():IsPosition(POS_FACEUP_DEFENCE) -end -function c79703905.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x18) -end -function c79703905.addc(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - local ct=Duel.GetMatchingGroupCount(c79703905.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - e:GetHandler():AddCounter(0x19,ct) - end -end -function c79703905.hdcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsCanRemoveCounter(tp,1,1,0x19,3,REASON_COST) end - Duel.RemoveCounter(tp,1,1,0x19,3,REASON_COST) -end -function c79703905.hdtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)~=0 end - Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1) -end -function c79703905.hdop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND):RandomSelect(tp,1) - Duel.SendtoGrave(g,REASON_EFFECT+REASON_DISCARD) -end diff --git a/script/c79707116.lua b/script/c79707116.lua deleted file mode 100644 index 18926ddf91..0000000000 --- a/script/c79707116.lua +++ /dev/null @@ -1,35 +0,0 @@ ---パラライズ・チェーン -function c79707116.initial_effect(c) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --discard deck - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(79707116,0)) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetCategory(CATEGORY_DAMAGE) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetRange(LOCATION_SZONE) - e2:SetCondition(c79707116.damcon) - e2:SetTarget(c79707116.damtg) - e2:SetOperation(c79707116.damop) - c:RegisterEffect(e2) -end -function c79707116.cfilter(c,tp) - return c:IsPreviousLocation(LOCATION_DECK) and c:GetPreviousControler()==tp -end -function c79707116.damcon(e,tp,eg,ep,ev,re,r,rp) - return re and bit.band(r,REASON_EFFECT)~=0 and eg:IsExists(c79707116.cfilter,1,nil,1-tp) -end -function c79707116.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(300) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,300) -end -function c79707116.damop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c79718768.lua b/script/c79718768.lua deleted file mode 100644 index 3cca3b46a5..0000000000 --- a/script/c79718768.lua +++ /dev/null @@ -1,50 +0,0 @@ ---急転直下 -function c79718768.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e2:SetCode(EVENT_BECOME_TARGET) - e2:SetRange(LOCATION_SZONE) - e2:SetOperation(c79718768.desop1) - c:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e3:SetCode(EVENT_CHAIN_SOLVED) - e3:SetRange(LOCATION_SZONE) - e3:SetOperation(c79718768.desop2) - c:RegisterEffect(e3) - e3:SetLabelObject(e2) - --to deck - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(79718768,0)) - e4:SetCategory(CATEGORY_TOHAND) - e4:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_SINGLE) - e4:SetCode(EVENT_TO_GRAVE) - e4:SetCondition(c79718768.retcon) - e4:SetOperation(c79718768.retop) - c:RegisterEffect(e4) -end -function c79718768.desop1(e,tp,eg,ep,ev,re,r,rp) - if rp==tp or not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) - or not eg:IsExists(Card.IsLocation,1,nil,LOCATION_GRAVE) then - e:SetLabelObject(nil) - else e:SetLabelObject(re) end -end -function c79718768.desop2(e,tp,eg,ep,ev,re,r,rp) - local pe=e:GetLabelObject():GetLabelObject() - if pe and pe==re then - Duel.Destroy(e:GetHandler(),REASON_EFFECT) - end -end -function c79718768.retcon(e,tp,eg,ep,ev,re,r,rp) - return re:GetHandler()==e:GetHandler() -end -function c79718768.retop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetFieldGroup(tp,0,LOCATION_GRAVE) - Duel.SendtoDeck(g,nil,2,REASON_EFFECT) -end diff --git a/script/c79757784.lua b/script/c79757784.lua deleted file mode 100644 index a0eba850e0..0000000000 --- a/script/c79757784.lua +++ /dev/null @@ -1,66 +0,0 @@ ---幻奏の音女タムタム -function c79757784.initial_effect(c) - --to hand - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e1:SetCondition(c79757784.thcon) - e1:SetTarget(c79757784.thtg) - e1:SetOperation(c79757784.thop) - c:RegisterEffect(e1) - --damage - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_DAMAGE+CATEGORY_ATKCHANGE) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_BE_MATERIAL) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e2:SetCondition(c79757784.damcon) - e2:SetTarget(c79757784.damtg) - e2:SetOperation(c79757784.damop) - c:RegisterEffect(e2) -end -function c79757784.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x9b) -end -function c79757784.thcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c79757784.cfilter,tp,LOCATION_MZONE,0,1,e:GetHandler()) -end -function c79757784.thfilter(c) - return c:IsCode(24094653) and c:IsAbleToHand() and not c:IsHasEffect(EFFECT_NECRO_VALLEY) -end -function c79757784.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c79757784.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE) -end -function c79757784.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c79757784.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end -function c79757784.damcon(e,tp,eg,ep,ev,re,r,rp) - return r==REASON_FUSION and e:GetHandler():IsLocation(LOCATION_GRAVE) -end -function c79757784.damtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c79757784.cfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c79757784.cfilter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - Duel.SelectTarget(tp,c79757784.cfilter,tp,LOCATION_MZONE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,500) -end -function c79757784.damop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() and not tc:IsImmuneToEffect(e) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(-500) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - Duel.Damage(1-tp,500,REASON_EFFECT) - end -end diff --git a/script/c79759367.lua b/script/c79759367.lua deleted file mode 100644 index 7f48e9d92f..0000000000 --- a/script/c79759367.lua +++ /dev/null @@ -1,32 +0,0 @@ ---魔導人形の夜 -function c79759367.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_NEGATE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) - e1:SetCode(EVENT_CHAINING) - e1:SetCondition(c79759367.condition) - e1:SetTarget(c79759367.target) - e1:SetOperation(c79759367.activate) - c:RegisterEffect(e1) -end -function c79759367.condition(e,tp,eg,ep,ev,re,r,rp) - return re:IsActiveType(TYPE_MONSTER) and Duel.IsChainNegatable(ev) - and not Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_GRAVE,0,1,nil,TYPE_MONSTER) -end -function c79759367.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) -end -function c79759367.cfilter(c) - return c:IsFaceup() and c:IsCode(74641045) -end -function c79759367.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateActivation(ev) - if Duel.IsExistingMatchingCard(c79759367.cfilter,tp,LOCATION_ONFIELD,0,1,nil) - and Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0 then - local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND):RandomSelect(tp,1) - Duel.SendtoDeck(g,nil,2,REASON_EFFECT) - end -end diff --git a/script/c79759861.lua b/script/c79759861.lua deleted file mode 100644 index d2fc32ef27..0000000000 --- a/script/c79759861.lua +++ /dev/null @@ -1,30 +0,0 @@ ---死者への手向け -function c79759861.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c79759861.cost) - e1:SetTarget(c79759861.target) - e1:SetOperation(c79759861.activate) - c:RegisterEffect(e1) -end -function c79759861.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) -end -function c79759861.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsDestructable() end - if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c79759861.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c79766336.lua b/script/c79766336.lua deleted file mode 100644 index 2175de98b0..0000000000 --- a/script/c79766336.lua +++ /dev/null @@ -1,53 +0,0 @@ ---闇よりの罠 -function c79766336.initial_effect(c) - --copy trap - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0x1e1,0x1e1) - e1:SetCondition(c79766336.condition) - e1:SetCost(c79766336.cost) - e1:SetTarget(c79766336.target) - e1:SetOperation(c79766336.operation) - c:RegisterEffect(e1) -end -function c79766336.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetLP(tp)<=3000 -end -function c79766336.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,1000) end - Duel.PayLPCost(tp,1000) -end -function c79766336.filter(c) - return c:GetType()==0x4 and not c:IsCode(79766336) and c:IsAbleToRemove() and c:CheckActivateEffect(false,true,false)~=nil -end -function c79766336.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then - local te=e:GetLabelObject() - local tg=te:GetTarget() - return tg and tg(e,tp,eg,ep,ev,re,r,rp,0,chkc) - end - if chk==0 then return Duel.IsExistingTarget(c79766336.filter,tp,LOCATION_GRAVE,0,1,nil) end - e:SetProperty(EFFECT_FLAG_CARD_TARGET) - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(79766336,0)) - local g=Duel.SelectTarget(tp,c79766336.filter,tp,LOCATION_GRAVE,0,1,1,nil) - local te,ceg,cep,cev,cre,cr,crp=g:GetFirst():CheckActivateEffect(false,true,true) - Duel.ClearTargetCard() - g:GetFirst():CreateEffectRelation(e) - local tg=te:GetTarget() - e:SetCategory(te:GetCategory()) - e:SetProperty(te:GetProperty()) - if tg then tg(e,tp,ceg,cep,cev,cre,cr,crp,1) end - te:SetLabelObject(e:GetLabelObject()) - e:SetLabelObject(te) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,0,0,0) -end -function c79766336.operation(e,tp,eg,ep,ev,re,r,rp) - local te=e:GetLabelObject() - if not te then return end - if not te:GetHandler():IsRelateToEffect(e) then return end - e:SetLabelObject(te:GetLabelObject()) - local op=te:GetOperation() - if op then op(e,tp,eg,ep,ev,re,r,rp) end - Duel.Remove(te:GetHandler(),POS_FACEUP,REASON_EFFECT) -end diff --git a/script/c79777187.lua b/script/c79777187.lua deleted file mode 100644 index becb3fa828..0000000000 --- a/script/c79777187.lua +++ /dev/null @@ -1,51 +0,0 @@ ---バリア・バブル -function c79777187.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --avoid battle damage - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_AVOID_BATTLE_DAMAGE) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(LOCATION_MZONE,0) - e2:SetTarget(c79777187.target) - e2:SetValue(1) - c:RegisterEffect(e2) - --indes - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e3:SetCode(EFFECT_DESTROY_REPLACE) - e3:SetRange(LOCATION_SZONE) - e3:SetTarget(c79777187.reptg) - e3:SetValue(c79777187.repval) - c:RegisterEffect(e3) - local g=Group.CreateGroup() - g:KeepAlive() - e3:SetLabelObject(g) -end -function c79777187.target(e,c) - return c:IsSetCard(0xc6) or c:IsSetCard(0x9f) -end -function c79777187.repfilter(c,tp) - return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) - and (c:IsSetCard(0xc6) or c:IsSetCard(0x9f)) and c:IsReason(REASON_BATTLE+REASON_EFFECT) and c:GetFlagEffect(79777187)==0 -end -function c79777187.reptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return eg:IsExists(c79777187.repfilter,1,nil,tp) end - local g=eg:Filter(c79777187.repfilter,nil,tp) - local tc=g:GetFirst() - while tc do - tc:RegisterFlagEffect(79777187,RESET_EVENT+0x1fc0000+RESET_PHASE+RESET_END,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(79777187,0)) - tc=g:GetNext() - end - e:GetLabelObject():Clear() - e:GetLabelObject():Merge(g) - return true -end -function c79777187.repval(e,c) - local g=e:GetLabelObject() - return g:IsContains(c) -end diff --git a/script/c79785958.lua b/script/c79785958.lua deleted file mode 100644 index 30fad2cb68..0000000000 --- a/script/c79785958.lua +++ /dev/null @@ -1,20 +0,0 @@ ---ヴェルズ・カストル -function c79785958.initial_effect(c) - --extra summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetOperation(c79785958.sumop) - c:RegisterEffect(e1) -end -function c79785958.sumop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetFlagEffect(tp,79785958)~=0 then return end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetTargetRange(LOCATION_HAND+LOCATION_MZONE,0) - e1:SetCode(EFFECT_EXTRA_SUMMON_COUNT) - e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0xa)) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) - Duel.RegisterFlagEffect(tp,79785958,RESET_PHASE+PHASE_END,0,1) -end diff --git a/script/c79796561.lua b/script/c79796561.lua deleted file mode 100644 index f84604c00a..0000000000 --- a/script/c79796561.lua +++ /dev/null @@ -1,46 +0,0 @@ ---シンクロ・ガンナー -function c79796561.initial_effect(c) - --remove - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(79796561,0)) - e1:SetCategory(CATEGORY_REMOVE+CATEGORY_DAMAGE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetTarget(c79796561.target) - e1:SetOperation(c79796561.operation) - c:RegisterEffect(e1) -end -function c79796561.filter(c) - return c:IsFaceup() and c:IsType(TYPE_SYNCHRO) and c:IsAbleToRemove() -end -function c79796561.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c79796561.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c79796561.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,c79796561.filter,tp,LOCATION_MZONE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,600) -end -function c79796561.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() and Duel.Remove(tc,0,REASON_EFFECT+REASON_TEMPORARY)~=0 then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) - e1:SetReset(RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN) - e1:SetLabelObject(tc) - e1:SetCountLimit(1) - e1:SetCondition(c79796561.retcon) - e1:SetOperation(c79796561.retop) - Duel.RegisterEffect(e1,tp) - Duel.Damage(1-tp,600,REASON_EFFECT) - end -end -function c79796561.retcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c79796561.retop(e,tp,eg,ep,ev,re,r,rp) - Duel.ReturnToField(e:GetLabelObject()) -end diff --git a/script/c79798060.lua b/script/c79798060.lua deleted file mode 100644 index eb22e195e3..0000000000 --- a/script/c79798060.lua +++ /dev/null @@ -1,55 +0,0 @@ ---地縛神 Ccarayhua -function c79798060.initial_effect(c) - c:SetUniqueOnField(1,1,10000000) - -- - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e4:SetRange(LOCATION_MZONE) - e4:SetCode(EFFECT_SELF_DESTROY) - e4:SetCondition(c79798060.sdcon) - c:RegisterEffect(e4) - --battle target - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_SINGLE) - e5:SetCode(EFFECT_CANNOT_BE_BATTLE_TARGET) - e5:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e5:SetRange(LOCATION_MZONE) - e5:SetValue(aux.imval1) - c:RegisterEffect(e5) - --direct atk - local e6=Effect.CreateEffect(c) - e6:SetType(EFFECT_TYPE_SINGLE) - e6:SetCode(EFFECT_DIRECT_ATTACK) - c:RegisterEffect(e6) - --destroy - local e7=Effect.CreateEffect(c) - e7:SetDescription(aux.Stringid(79798060,0)) - e7:SetCategory(CATEGORY_DESTROY) - e7:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e7:SetCode(EVENT_DESTROYED) - e7:SetCondition(c79798060.descon) - e7:SetTarget(c79798060.destg) - e7:SetOperation(c79798060.desop) - c:RegisterEffect(e7) -end -function c79798060.sdcon(e) - local c=e:GetHandler() - if c:IsStatus(STATUS_BATTLE_DESTROYED) then return false end - local f1=Duel.GetFieldCard(0,LOCATION_SZONE,5) - local f2=Duel.GetFieldCard(1,LOCATION_SZONE,5) - return ((f1==nil or not f1:IsFaceup()) and (f2==nil or not f2:IsFaceup())) -end -function c79798060.descon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return not c:IsReason(REASON_BATTLE) and re and re:GetOwner()~=c -end -function c79798060.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c79798060.desop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) - Duel.Destroy(g,REASON_EFFECT) -end diff --git a/script/c79814787.lua b/script/c79814787.lua deleted file mode 100644 index d8121eba7c..0000000000 --- a/script/c79814787.lua +++ /dev/null @@ -1,27 +0,0 @@ ---伝説の白石 -function c79814787.initial_effect(c) - --to hand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(79814787,0)) - e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetTarget(c79814787.target) - e1:SetOperation(c79814787.operation) - c:RegisterEffect(e1) -end -function c79814787.filter(c) - return c:GetCode()==89631139 and c:IsAbleToHand() -end -function c79814787.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c79814787.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local tc=Duel.GetFirstMatchingCard(c79814787.filter,tp,LOCATION_DECK,0,nil) - if tc~=nil then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end diff --git a/script/c79816536.lua b/script/c79816536.lua deleted file mode 100644 index f7bd2d80de..0000000000 --- a/script/c79816536.lua +++ /dev/null @@ -1,26 +0,0 @@ ---召喚師のスキル -function c79816536.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c79816536.target) - e1:SetOperation(c79816536.activate) - c:RegisterEffect(e1) -end -function c79816536.filter(c) - return c:GetLevel()>=5 and c:IsType(TYPE_NORMAL) and c:IsAbleToHand() -end -function c79816536.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c79816536.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c79816536.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c79816536.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c79844764.lua b/script/c79844764.lua deleted file mode 100644 index 3d4a265eb2..0000000000 --- a/script/c79844764.lua +++ /dev/null @@ -1,39 +0,0 @@ ---帝王の烈旋 -function c79844764.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,79844764+EFFECT_COUNT_CODE_OATH) - e1:SetCost(c79844764.cost) - e1:SetOperation(c79844764.activate) - c:RegisterEffect(e1) - Duel.AddCustomActivityCounter(79844764,ACTIVITY_SPSUMMON,c79844764.counterfilter) -end -function c79844764.counterfilter(c) - return c:GetSummonLocation()~=LOCATION_EXTRA -end -function c79844764.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetCustomActivityCount(79844764,tp,ACTIVITY_SPSUMMON)==0 end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) - e1:SetTargetRange(1,0) - e1:SetTarget(c79844764.splimit) - Duel.RegisterEffect(e1,tp) -end -function c79844764.splimit(e,c,sump,sumtype,sumpos,targetp,se) - return c:IsLocation(LOCATION_EXTRA) -end -function c79844764.activate(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_EXTRA_RELEASE_SUM) - e1:SetTargetRange(0,LOCATION_MZONE) - e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE) - e1:SetCountLimit(1) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) -end diff --git a/script/c79850798.lua b/script/c79850798.lua deleted file mode 100644 index 5b567ce67d..0000000000 --- a/script/c79850798.lua +++ /dev/null @@ -1,86 +0,0 @@ ---爆走特急ロケット・アロー -function c79850798.initial_effect(c) - c:EnableReviveLimit() - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c79850798.spcon) - e1:SetOperation(c79850798.spop) - c:RegisterEffect(e1) - --cannot special summon - local e2=Effect.CreateEffect(c) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_SPSUMMON_CONDITION) - c:RegisterEffect(e2) - -- - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetCode(EFFECT_CANNOT_ACTIVATE) - e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e3:SetRange(LOCATION_MZONE) - e3:SetTargetRange(1,0) - e3:SetValue(1) - c:RegisterEffect(e3) - --cannot set - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_FIELD) - e4:SetCode(EFFECT_CANNOT_MSET) - e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e4:SetRange(LOCATION_MZONE) - e4:SetTargetRange(1,0) - e4:SetTarget(aux.TRUE) - c:RegisterEffect(e4) - local e5=e4:Clone() - e5:SetCode(EFFECT_CANNOT_SSET) - c:RegisterEffect(e5) - local e6=e4:Clone() - e6:SetCode(EFFECT_CANNOT_TURN_SET) - c:RegisterEffect(e6) - local e7=e4:Clone() - e7:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e7:SetTarget(c79850798.sumlimit) - c:RegisterEffect(e7) - --maintain - local e8=Effect.CreateEffect(c) - e8:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e8:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e8:SetCode(EVENT_PHASE+PHASE_STANDBY) - e8:SetRange(LOCATION_MZONE) - e8:SetCountLimit(1) - e8:SetCondition(c79850798.mtcon) - e8:SetOperation(c79850798.mtop) - c:RegisterEffect(e8) -end -function c79850798.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.GetActivityCount(tp,ACTIVITY_BATTLE_PHASE)==0 - and Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,0)==0 - and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 -end -function c79850798.spop(e,tp,eg,ep,ev,re,r,rp,c) - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_BP) - e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function c79850798.sumlimit(e,c,sump,sumtype,sumpos,targetp) - return bit.band(sumpos,POS_FACEDOWN)~=0 -end -function c79850798.mtcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c79850798.mtop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)~=0 and Duel.SelectYesNo(tp,aux.Stringid(79850798,1)) then - Duel.SendtoGrave(Duel.GetFieldGroup(tp,LOCATION_HAND,0),REASON_COST) - else - Duel.Destroy(e:GetHandler(),REASON_RULE) - end -end diff --git a/script/c79852326.lua b/script/c79852326.lua deleted file mode 100644 index 36cfa740b9..0000000000 --- a/script/c79852326.lua +++ /dev/null @@ -1,53 +0,0 @@ ---死霊ゾーマ -function c79852326.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_END_PHASE) - e1:SetTarget(c79852326.target) - e1:SetOperation(c79852326.activate) - c:RegisterEffect(e1) -end -function c79852326.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and - Duel.IsPlayerCanSpecialSummonMonster(tp,79852326,0,0x21,1800,500,4,RACE_ZOMBIE,ATTRIBUTE_DARK) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c79852326.activate(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) then return end - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 - or not Duel.IsPlayerCanSpecialSummonMonster(tp,79852326,0,0x21,1800,500,4,RACE_ZOMBIE,ATTRIBUTE_DARK) then return end - c:AddTrapMonsterAttribute(TYPE_EFFECT,ATTRIBUTE_DARK,RACE_ZOMBIE,4,1800,500) - Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP_DEFENCE) - c:TrapMonsterBlock() - --damage - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(79852326,0)) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_LEAVE_FIELD) - e1:SetCondition(c79852326.damcon) - e1:SetTarget(c79852326.damtg) - e1:SetOperation(c79852326.damop) - e1:SetReset(RESET_EVENT+0x17e0000) - c:RegisterEffect(e1) -end -function c79852326.damcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsReason(REASON_BATTLE) -end -function c79852326.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local bc=e:GetHandler():GetBattleTarget() - local dam=bc:GetAttack() - if dam<0 then dam=0 end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(dam) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,dam) -end -function c79852326.damop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c79853073.lua b/script/c79853073.lua deleted file mode 100644 index 92ffd57ab1..0000000000 --- a/script/c79853073.lua +++ /dev/null @@ -1,31 +0,0 @@ ---サイファー・スカウター -function c79853073.initial_effect(c) - --atkdef up - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(79853073,0)) - e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE) - e1:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_SINGLE) - e1:SetCode(EVENT_PRE_DAMAGE_CALCULATE) - e1:SetCondition(c79853073.con) - e1:SetOperation(c79853073.op) - c:RegisterEffect(e1) -end -function c79853073.con(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local bc=c:GetBattleTarget() - return bc and bc:IsRace(RACE_WARRIOR) -end -function c79853073.op(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_PHASE+RESET_DAMAGE_CAL) - e1:SetValue(2000) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_UPDATE_DEFENCE) - c:RegisterEffect(e2) - end -end diff --git a/script/c79856792.lua b/script/c79856792.lua deleted file mode 100644 index 6cd79e6b30..0000000000 --- a/script/c79856792.lua +++ /dev/null @@ -1,107 +0,0 @@ ---究極宝玉神 レインボー・ドラゴン -function c79856792.initial_effect(c) - c:EnableReviveLimit() - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c79856792.spcon) - c:RegisterEffect(e1) - --cannot special summon - local e2=Effect.CreateEffect(c) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_SPSUMMON_CONDITION) - c:RegisterEffect(e2) - --atkup - local e3=Effect.CreateEffect(c) - e3:SetCategory(CATEGORY_ATKCHANGE) - e3:SetDescription(aux.Stringid(79856792,0)) - e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e3:SetType(EFFECT_TYPE_QUICK_O) - e3:SetCode(EVENT_FREE_CHAIN) - e3:SetHintTiming(TIMING_DAMAGE_STEP) - e3:SetRange(LOCATION_MZONE) - e3:SetCondition(c79856792.atcon) - e3:SetCost(c79856792.atcost) - e3:SetOperation(c79856792.atop) - c:RegisterEffect(e3) - --todeck - local e4=Effect.CreateEffect(c) - e4:SetCategory(CATEGORY_TODECK) - e4:SetDescription(aux.Stringid(79856792,1)) - e4:SetType(EFFECT_TYPE_IGNITION) - e4:SetRange(LOCATION_MZONE) - e4:SetCondition(c79856792.tdcon) - e4:SetCost(c79856792.tdcost) - e4:SetTarget(c79856792.tdtg) - e4:SetOperation(c79856792.tdop) - c:RegisterEffect(e4) - -- - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e5:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e5:SetCode(EVENT_SPSUMMON_SUCCESS) - e5:SetOperation(c79856792.spop) - c:RegisterEffect(e5) -end -function c79856792.spfilter(c) - return c:IsSetCard(0x1034) and (not c:IsOnField() or c:IsFaceup()) -end -function c79856792.spcon(e,c) - if c==nil then return true end - if Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)<=0 then return false end - local g=Duel.GetMatchingGroup(c79856792.spfilter,c:GetControler(),LOCATION_ONFIELD+LOCATION_GRAVE,0,nil) - local ct=g:GetClassCount(Card.GetCode) - return ct>6 -end -function c79856792.spop(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():RegisterFlagEffect(79856792,RESET_EVENT+0xfc0000+RESET_PHASE+PHASE_END,0,1) -end -function c79856792.atcon(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():GetFlagEffect(79856792)~=0 then return false end - local phase=Duel.GetCurrentPhase() - return phase~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end -function c79856792.afilter(c) - return c:IsFaceup() and c:IsSetCard(0x1034) and c:IsAbleToGraveAsCost() -end -function c79856792.atcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c79856792.afilter,tp,LOCATION_MZONE,0,1,nil) end - local g=Duel.GetMatchingGroup(c79856792.afilter,tp,LOCATION_MZONE,0,nil) - Duel.SendtoGrave(g,REASON_COST) - e:SetLabel(g:GetCount()) -end -function c79856792.atop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFaceup() and c:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(e:GetLabel()*1000) - e1:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e1) - end -end -function c79856792.tdcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetFlagEffect(79856792)==0 -end -function c79856792.cfilter(c) - return c:IsSetCard(0x1034) and c:IsAbleToRemoveAsCost() -end -function c79856792.tdcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c79856792.cfilter,tp,LOCATION_GRAVE,0,1,nil) end - local g=Duel.GetMatchingGroup(c79856792.cfilter,tp,LOCATION_GRAVE,0,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c79856792.tdtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end - local g=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0) -end -function c79856792.tdop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) - Duel.SendtoDeck(g,nil,2,REASON_EFFECT) -end diff --git a/script/c79861914.lua b/script/c79861914.lua deleted file mode 100644 index 812765c79c..0000000000 --- a/script/c79861914.lua +++ /dev/null @@ -1,64 +0,0 @@ ---妖仙大旋風 -function c79861914.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c79861914.cost) - c:RegisterEffect(e1) - --tohand - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(79861914,0)) - e2:SetCategory(CATEGORY_TOHAND) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) - e2:SetRange(LOCATION_SZONE) - e2:SetCode(EVENT_TO_HAND) - e2:SetCountLimit(1) - e2:SetCondition(c79861914.condition) - e2:SetTarget(c79861914.target) - e2:SetOperation(c79861914.operation) - c:RegisterEffect(e2) - --self destroy - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(79861914,1)) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e3:SetCode(EVENT_PHASE+PHASE_END) - e3:SetRange(LOCATION_SZONE) - e3:SetCountLimit(1) - e3:SetCondition(c79861914.descon) - e3:SetOperation(c79861914.desop) - c:RegisterEffect(e3) -end -function c79861914.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,800) end - Duel.PayLPCost(tp,800) -end -function c79861914.cfilter(c,tp) - return c:IsSetCard(0xb3) and c:GetPreviousControler()==tp - and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP) -end -function c79861914.condition(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c79861914.cfilter,1,nil,tp) -end -function c79861914.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and chkc:IsAbleToHand() end - if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g=Duel.SelectTarget(tp,Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c79861914.operation(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - end - e:GetHandler():RegisterFlagEffect(79861914,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) -end -function c79861914.descon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp and e:GetHandler():GetFlagEffect(79861914)==0 -end -function c79861914.desop(e,tp,eg,ep,ev,re,r,rp) - Duel.Destroy(e:GetHandler(),REASON_EFFECT) -end diff --git a/script/c79867938.lua b/script/c79867938.lua deleted file mode 100644 index 4010a23b9c..0000000000 --- a/script/c79867938.lua +++ /dev/null @@ -1,39 +0,0 @@ ---BK ヘッドギア -function c79867938.initial_effect(c) - --send to grave - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(79867938,0)) - e1:SetCategory(CATEGORY_TOGRAVE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c79867938.target) - e1:SetOperation(c79867938.operation) - c:RegisterEffect(e1) - -- - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_INDESTRUCTABLE_COUNT) - e1:SetCountLimit(1) - e1:SetValue(c79867938.valcon) - c:RegisterEffect(e1) -end -function c79867938.tgfilter(c) - return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x84) and c:IsAbleToGrave() -end -function c79867938.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c79867938.tgfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) -end -function c79867938.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c79867938.tgfilter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoGrave(g,REASON_EFFECT) - end -end -function c79867938.valcon(e,re,r,rp) - return e:GetHandler():IsAttackPos() and bit.band(r,REASON_BATTLE)~=0 -end diff --git a/script/c79870141.lua b/script/c79870141.lua deleted file mode 100644 index f4fdf8507b..0000000000 --- a/script/c79870141.lua +++ /dev/null @@ -1,8 +0,0 @@ ---猛進する剣角獣 -function c79870141.initial_effect(c) - --pierce - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_PIERCE) - c:RegisterEffect(e1) -end diff --git a/script/c79875176.lua b/script/c79875176.lua deleted file mode 100644 index 25ca62a3e1..0000000000 --- a/script/c79875176.lua +++ /dev/null @@ -1,81 +0,0 @@ ---トゥーン・キャノン・ソルジャー -function c79875176.initial_effect(c) - --cannot attack - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetOperation(c79875176.atklimit) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e2) - local e3=e1:Clone() - e3:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - c:RegisterEffect(e3) - --destroy - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e4:SetRange(LOCATION_MZONE) - e4:SetCode(EVENT_LEAVE_FIELD) - e4:SetCondition(c79875176.sdescon) - e4:SetOperation(c79875176.sdesop) - c:RegisterEffect(e4) - --direct attack - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_SINGLE) - e5:SetCode(EFFECT_DIRECT_ATTACK) - e5:SetCondition(c79875176.dircon) - c:RegisterEffect(e5) - --damage - local e6=Effect.CreateEffect(c) - e6:SetDescription(aux.Stringid(79875176,0)) - e6:SetCategory(CATEGORY_DAMAGE) - e6:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e6:SetType(EFFECT_TYPE_IGNITION) - e6:SetRange(LOCATION_MZONE) - e6:SetCost(c79875176.damcost) - e6:SetTarget(c79875176.damtg) - e6:SetOperation(c79875176.damop) - c:RegisterEffect(e6) -end -function c79875176.atklimit(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e:GetHandler():RegisterEffect(e1) -end -function c79875176.sfilter(c) - return c:IsReason(REASON_DESTROY) and c:IsPreviousPosition(POS_FACEUP) and c:GetPreviousCodeOnField()==15259703 and c:IsPreviousLocation(LOCATION_ONFIELD) -end -function c79875176.sdescon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c79875176.sfilter,1,nil) -end -function c79875176.sdesop(e,tp,eg,ep,ev,re,r,rp) - Duel.Destroy(e:GetHandler(),REASON_EFFECT) -end -function c79875176.dirfilter1(c) - return c:IsFaceup() and c:IsCode(15259703) -end -function c79875176.dirfilter2(c) - return c:IsFaceup() and c:IsType(TYPE_TOON) -end -function c79875176.dircon(e) - return Duel.IsExistingMatchingCard(c79875176.dirfilter1,e:GetHandlerPlayer(),LOCATION_ONFIELD,0,1,nil) - and not Duel.IsExistingMatchingCard(c79875176.dirfilter2,e:GetHandlerPlayer(),0,LOCATION_MZONE,1,nil) -end -function c79875176.damcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,nil,1,nil) end - local sg=Duel.SelectReleaseGroup(tp,nil,1,1,nil) - Duel.Release(sg,REASON_COST) -end -function c79875176.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(500) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,500) -end -function c79875176.damop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c799183.lua b/script/c799183.lua deleted file mode 100644 index 381dc54d78..0000000000 --- a/script/c799183.lua +++ /dev/null @@ -1,63 +0,0 @@ ---超戦士の盾 -function c799183.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_CHAINING) - e1:SetCondition(c799183.condition) - e1:SetTarget(c799183.target) - e1:SetOperation(c799183.activate) - c:RegisterEffect(e1) - --set - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_DISABLE) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetRange(LOCATION_GRAVE) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetCost(c799183.setcost) - e2:SetTarget(c799183.settg) - e2:SetOperation(c799183.setop) - c:RegisterEffect(e2) -end -function c799183.condition(e,tp,eg,ep,ev,re,r,rp) - if not Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_MZONE,0,1,nil,0xcf) then return false end - if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end - local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) - return g and g:IsExists(Card.IsLocation,1,nil,LOCATION_MZONE) - and Duel.IsChainNegatable(ev) and (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE)) -end -function c799183.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) - end -end -function c799183.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateActivation(ev) - if re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(eg,REASON_EFFECT) - end -end -function c799183.setcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsCanRemoveCounter(tp,1,0,0x3001,1,REASON_COST) end - Duel.RemoveCounter(tp,1,0,0x3001,1,REASON_COST) -end -function c799183.settg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsSSetable() end - Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,0,0) -end -function c799183.setop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsSSetable() then - Duel.SSet(tp,c) - Duel.ConfirmCards(1-tp,c) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) - e1:SetReset(RESET_EVENT+0x47e0000) - e1:SetValue(LOCATION_REMOVED) - c:RegisterEffect(e1) - end -end diff --git a/script/c79965360.lua b/script/c79965360.lua deleted file mode 100644 index d63155cc4e..0000000000 --- a/script/c79965360.lua +++ /dev/null @@ -1,72 +0,0 @@ ---アマゾネスの秘宝 -function c79965360.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c79965360.target) - e1:SetOperation(c79965360.operation) - c:RegisterEffect(e1) - --Equip limit - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_EQUIP_LIMIT) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetValue(c79965360.eqlimit) - c:RegisterEffect(e2) - --destroy rep - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_EQUIP) - e3:SetCode(EFFECT_INDESTRUCTABLE_COUNT) - e3:SetValue(c79965360.valcon) - e3:SetCountLimit(1) - c:RegisterEffect(e3) - --destroy - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(79965360,0)) - e4:SetCategory(CATEGORY_DESTROY) - e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e4:SetCode(EVENT_BATTLED) - e4:SetRange(LOCATION_SZONE) - e4:SetCondition(c79965360.descon) - e4:SetTarget(c79965360.destg) - e4:SetOperation(c79965360.desop) - c:RegisterEffect(e4) -end -function c79965360.eqlimit(e,c) - return c:IsSetCard(0x4) -end -function c79965360.filter(c) - return c:IsFaceup() and c:IsSetCard(0x4) -end -function c79965360.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c79965360.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c79965360.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c79965360.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c79965360.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,e:GetHandler(),tc) - end -end -function c79965360.valcon(e,re,r,rp) - return r==REASON_BATTLE -end -function c79965360.descon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetEquipTarget()==Duel.GetAttacker() and Duel.GetAttackTarget() -end -function c79965360.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,Duel.GetAttackTarget(),1,0,0) -end -function c79965360.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetAttackTarget() - if tc:IsRelateToBattle() then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c79967395.lua b/script/c79967395.lua deleted file mode 100644 index 3223490d84..0000000000 --- a/script/c79967395.lua +++ /dev/null @@ -1,39 +0,0 @@ ---EMウィップ・バイパー -function c79967395.initial_effect(c) - --swap - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(79967395,0)) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetRange(LOCATION_MZONE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetHintTiming(0,TIMING_MAIN_END) - e1:SetCountLimit(1) - e1:SetCondition(c79967395.condition) - e1:SetTarget(c79967395.target) - e1:SetOperation(c79967395.operation) - c:RegisterEffect(e1) -end -function c79967395.condition(e,tp,eg,ep,ev,re,r,rp) - local ph=Duel.GetCurrentPhase() - return ph==PHASE_MAIN1 or ph==PHASE_MAIN2 -end -function c79967395.filter(c) - return c:IsFaceup() -end -function c79967395.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c79967395.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c79967395.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c79967395.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) -end -function c79967395.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SWAP_AD) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - end -end diff --git a/script/c79972330.lua b/script/c79972330.lua deleted file mode 100644 index b99ca1f4c3..0000000000 --- a/script/c79972330.lua +++ /dev/null @@ -1,36 +0,0 @@ ---幻蝶の刺客アゲハ -function c79972330.initial_effect(c) - --atk - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(79972330,0)) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_FIELD) - e1:SetCode(EVENT_BATTLE_DAMAGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c79972330.atcon) - e1:SetTarget(c79972330.attg) - e1:SetOperation(c79972330.atop) - c:RegisterEffect(e1) -end -function c79972330.atcon(e,tp,eg,ep,ev,re,r,rp) - local rc=eg:GetFirst() - return ep~=tp and rc~=e:GetHandler() and rc:IsControler(tp) -end -function c79972330.attg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsFaceup() end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil) -end -function c79972330.atop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(-ev) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - end -end diff --git a/script/c79979666.lua b/script/c79979666.lua deleted file mode 100644 index 521fdde2ff..0000000000 --- a/script/c79979666.lua +++ /dev/null @@ -1,50 +0,0 @@ ---E・HERO バブルマン -function c79979666.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c79979666.spcon) - c:RegisterEffect(e1) - --draw - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(79979666,1)) - e2:SetCategory(CATEGORY_DRAW) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e2:SetCode(EVENT_SUMMON_SUCCESS) - e2:SetCondition(c79979666.condition) - e2:SetTarget(c79979666.target) - e2:SetOperation(c79979666.operation) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e3) - local e4=e2:Clone() - e4:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - c:RegisterEffect(e4) -end -function c79979666.spcon(e,c) - if c==nil then return true end - return Duel.GetFieldGroupCount(c:GetControler(),LOCATION_HAND,0)==1 - and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 -end -function c79979666.filter(c) - return not c:IsStatus(STATUS_LEAVE_CONFIRMED) -end -function c79979666.condition(e,tp,eg,ep,ev,re,r,rp) - return not Duel.IsExistingMatchingCard(c79979666.filter,tp,LOCATION_ONFIELD+LOCATION_HAND,0,1,e:GetHandler()) -end -function c79979666.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp,2) end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(2) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2) -end -function c79979666.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.IsExistingMatchingCard(c79979666.filter,tp,LOCATION_ONFIELD+LOCATION_HAND,0,1,e:GetHandler()) then return end - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end diff --git a/script/c79997591.lua b/script/c79997591.lua deleted file mode 100644 index c4ae99a9c5..0000000000 --- a/script/c79997591.lua +++ /dev/null @@ -1,28 +0,0 @@ ---ドゥーブルパッセ -function c79997591.initial_effect(c) - --change battle target - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(79997591,0)) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetCondition(c79997591.cbcon) - e1:SetOperation(c79997591.cbop) - c:RegisterEffect(e1) -end -function c79997591.cbcon(e,tp,eg,ep,ev,re,r,rp) - local bt=Duel.GetAttackTarget() - return bt and bt:IsPosition(POS_FACEUP_ATTACK) and bt:IsControler(tp) -end -function c79997591.cbop(e,tp,eg,ep,ev,re,r,rp) - local at=Duel.GetAttacker() - local bt=Duel.GetAttackTarget() - if not (bt:IsRelateToBattle() and bt:IsControler(tp)) then return end - if at:IsAttackable() and not at:IsStatus(STATUS_ATTACK_CANCELED) and Duel.Damage(1-tp,bt:GetAttack(),REASON_EFFECT)>0 then - Duel.ChangeAttackTarget(nil) - end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DIRECT_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END+RESET_SELF_TURN) - bt:RegisterEffect(e1) -end diff --git a/script/c80019195.lua b/script/c80019195.lua deleted file mode 100644 index 1a8f2e28ef..0000000000 --- a/script/c80019195.lua +++ /dev/null @@ -1,64 +0,0 @@ ---伝説の騎士 ティマイオス -function c80019195.initial_effect(c) - c:EnableReviveLimit() - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(aux.FALSE) - c:RegisterEffect(e1) - --remove - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(80019195,0)) - e2:SetCategory(CATEGORY_REMOVE) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetTarget(c80019195.rmtg) - e2:SetOperation(c80019195.rmop) - c:RegisterEffect(e2) - --set - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(80019195,1)) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_BE_BATTLE_TARGET) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetTarget(c80019195.settg) - e3:SetOperation(c80019195.setop) - c:RegisterEffect(e3) -end -function c80019195.rmfilter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToRemove() and c:IsFaceup() -end -function c80019195.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and c80019195.rmfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c80019195.rmfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,c80019195.rmfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) -end -function c80019195.rmop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) - end -end -function c80019195.setfilter(c) - return c:IsType(TYPE_SPELL) and c:IsSSetable() -end -function c80019195.settg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c80019195.setfilter(chkc) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingTarget(c80019195.setfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) - local g=Duel.SelectTarget(tp,c80019195.setfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g,1,0,0) -end -function c80019195.setop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 then - Duel.SSet(tp,tc) - Duel.ConfirmCards(1-tp,tc) - end -end diff --git a/script/c80032567.lua b/script/c80032567.lua deleted file mode 100644 index 200856a2e2..0000000000 --- a/script/c80032567.lua +++ /dev/null @@ -1,21 +0,0 @@ ---ジュラック・ギガノト -function c80032567.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,nil,aux.NonTuner(Card.IsRace,RACE_DINOSAUR),1) - c:EnableReviveLimit() - --Atk - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x22)) - e1:SetValue(c80032567.val) - c:RegisterEffect(e1) -end -function c80032567.filter(c) - return c:IsSetCard(0x22) and c:IsType(TYPE_MONSTER) -end -function c80032567.val(e,c) - return Duel.GetMatchingGroupCount(c80032567.filter,e:GetHandlerPlayer(),LOCATION_GRAVE,0,nil)*200 -end diff --git a/script/c80033124.lua b/script/c80033124.lua deleted file mode 100644 index edff3a8f01..0000000000 --- a/script/c80033124.lua +++ /dev/null @@ -1,66 +0,0 @@ ---サイバーダーク・インパクト! -function c80033124.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TODECK+CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c80033124.target) - e1:SetOperation(c80033124.activate) - c:RegisterEffect(e1) -end -function c80033124.ffilter0(c) - local code=c:GetCode() - return (code==41230939 or code==77625948 or code==3019642) and c:IsAbleToDeck() and not c:IsHasEffect(EFFECT_NECRO_VALLEY) -end -function c80033124.ffilter(c,e) - local code=c:GetCode() - return (code==41230939 or code==77625948 or code==3019642) and c:IsAbleToDeck() - and not c:IsImmuneToEffect(e) and not c:IsHasEffect(EFFECT_NECRO_VALLEY) -end -function c80033124.spfilter(c,e,tp) - return c:IsCode(40418351) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) -end -function c80033124.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - if not Duel.IsExistingMatchingCard(c80033124.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) then return false end - local g=Duel.GetMatchingGroup(c80033124.ffilter0,tp,0x1e,0,nil) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 and not g:IsExists(Card.IsLocation,1,nil,LOCATION_MZONE) then return false end - return g:IsExists(Card.IsCode,1,nil,41230939) - and g:IsExists(Card.IsCode,1,nil,77625948) - and g:IsExists(Card.IsCode,1,nil,3019642) - end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function c80033124.cfilter(c) - return c:IsLocation(LOCATION_HAND) or (c:IsOnField() and c:IsFacedown()) -end -function c80033124.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c80033124.ffilter,tp,0x1e,0,nil,e) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if (ft<=0 and not g:IsExists(Card.IsLocation,1,nil,LOCATION_MZONE)) - or not g:IsExists(Card.IsCode,1,nil,41230939) - or not g:IsExists(Card.IsCode,1,nil,77625948) - or not g:IsExists(Card.IsCode,1,nil,3019642) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - if ft<=0 then g1=g:FilterSelect(tp,Card.IsLocation,1,1,nil,LOCATION_MZONE) - else g1=g:Select(tp,1,1,nil) end - g:Remove(Card.IsCode,nil,g1:GetFirst():GetCode()) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g2=g:Select(tp,1,1,nil) - g:Remove(Card.IsCode,nil,g2:GetFirst():GetCode()) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g3=g:Select(tp,1,1,nil) - g1:Merge(g2) - g1:Merge(g3) - local cg=g1:Filter(c80033124.cfilter,nil) - if cg:GetCount()>0 then - Duel.ConfirmCards(1-tp,cg) - Duel.ShuffleHand(tp) - end - Duel.SendtoDeck(g1,nil,2,REASON_EFFECT) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=Duel.SelectMatchingCard(tp,c80033124.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp) - Duel.SpecialSummon(sg,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP) - sg:GetFirst():CompleteProcedure() -end diff --git a/script/c80036543.lua b/script/c80036543.lua deleted file mode 100644 index fc478f4151..0000000000 --- a/script/c80036543.lua +++ /dev/null @@ -1,32 +0,0 @@ ---活路への希望 -function c80036543.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c80036543.condition) - e1:SetCost(c80036543.cost) - e1:SetTarget(c80036543.target) - e1:SetOperation(c80036543.activate) - c:RegisterEffect(e1) -end -function c80036543.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetLP(tp)<=Duel.GetLP(1-tp)-1000 -end -function c80036543.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,1000) end - Duel.PayLPCost(tp,1000) -end -function c80036543.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c80036543.activate(e,tp,eg,ep,ev,re,r,rp) - local p1=Duel.GetLP(tp) - local p2=Duel.GetLP(1-tp) - local s=p2-p1 - if s<0 then s=p1-p2 end - local d=math.floor(s/2000) - Duel.Draw(tp,d,REASON_EFFECT) -end diff --git a/script/c80045583.lua b/script/c80045583.lua deleted file mode 100644 index 42dad1cac2..0000000000 --- a/script/c80045583.lua +++ /dev/null @@ -1,39 +0,0 @@ ---古代の機械砲台 -function c80045583.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(80045583,0)) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c80045583.damcost) - e1:SetTarget(c80045583.damtg) - e1:SetOperation(c80045583.damop) - c:RegisterEffect(e1) -end -function c80045583.damcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end -function c80045583.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,500) -end -function c80045583.damop(e,tp,eg,ep,ev,re,r,rp) - if Duel.Damage(1-tp,500,REASON_EFFECT)~=500 then return end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EFFECT_CANNOT_ACTIVATE) - e1:SetTargetRange(1,1) - e1:SetCondition(c80045583.accon) - e1:SetValue(c80045583.aclimit) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function c80045583.accon(e) - return bit.band(Duel.GetCurrentPhase(),0x38)~=0 -end -function c80045583.aclimit(e,re,tp) - return re:GetHandler():IsType(TYPE_TRAP) and re:IsHasType(EFFECT_TYPE_ACTIVATE) -end diff --git a/script/c80071763.lua b/script/c80071763.lua deleted file mode 100644 index f79f670951..0000000000 --- a/script/c80071763.lua +++ /dev/null @@ -1,57 +0,0 @@ ---魔人 ダーク・バルター -function c80071763.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcCode2(c,52860176,38742075,false,false) - --negate - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(80071763,0)) - e1:SetCategory(CATEGORY_DISABLE) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_CHAINING) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c80071763.discon) - e1:SetCost(c80071763.discost) - e1:SetTarget(c80071763.distg) - e1:SetOperation(c80071763.disop) - c:RegisterEffect(e1) - --disable - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_BATTLED) - e2:SetRange(LOCATION_MZONE) - e2:SetOperation(c80071763.disop2) - c:RegisterEffect(e2) -end -function c80071763.discon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsStatus(STATUS_BATTLE_DESTROYED) then return false end - return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:GetActiveType()==TYPE_SPELL and Duel.IsChainDisablable(ev) -end -function c80071763.discost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,1000) end - Duel.PayLPCost(tp,1000) -end -function c80071763.distg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0) -end -function c80071763.disop(e,tp,eg,ep,ev,re,r,rp,chk) - Duel.NegateEffect(ev) -end -function c80071763.disop2(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local bc=c:GetBattleTarget() - if bc and bc:IsStatus(STATUS_BATTLE_DESTROYED) and not c:IsStatus(STATUS_BATTLE_DESTROYED) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0x17a0000) - bc:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+0x17a0000) - bc:RegisterEffect(e2) - end -end diff --git a/script/c80075749.lua b/script/c80075749.lua deleted file mode 100644 index 2de6058782..0000000000 --- a/script/c80075749.lua +++ /dev/null @@ -1,25 +0,0 @@ ---バブルイリュージョン -function c80075749.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c80075749.condition) - e1:SetOperation(c80075749.activate) - c:RegisterEffect(e1) -end -function c80075749.filter(c) - return c:IsFaceup() and c:IsCode(79979666) -end -function c80075749.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c80075749.filter,tp,LOCATION_MZONE,0,1,nil) -end -function c80075749.activate(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_TRAP_ACT_IN_HAND) - e1:SetTargetRange(LOCATION_HAND,0) - e1:SetCountLimit(1,80075749) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) -end diff --git a/script/c80102359.lua b/script/c80102359.lua deleted file mode 100644 index 94326121f8..0000000000 --- a/script/c80102359.lua +++ /dev/null @@ -1,34 +0,0 @@ ---強化人類サイコ -function c80102359.initial_effect(c) - --atkup - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(80102359,0)) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(2) - e1:SetCost(c80102359.cost) - e1:SetOperation(c80102359.operation) - c:RegisterEffect(e1) -end -function c80102359.cfilter(c) - return c:IsRace(RACE_PSYCHO) and c:IsAbleToRemoveAsCost() -end -function c80102359.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c80102359.cfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c80102359.cfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c80102359.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFaceup() and c:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetProperty(EFFECT_FLAG_COPY_INHERIT) - e1:SetValue(500) - e1:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e1) - end -end diff --git a/script/c80108118.lua b/script/c80108118.lua deleted file mode 100644 index ac8368fcb6..0000000000 --- a/script/c80108118.lua +++ /dev/null @@ -1,29 +0,0 @@ ---X-セイバー ウルベルム -function c80108118.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1) - c:EnableReviveLimit() - --handes - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(80108118,0)) - e1:SetCategory(CATEGORY_TODECK) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_BATTLE_DAMAGE) - e1:SetCondition(c80108118.condition) - e1:SetTarget(c80108118.target) - e1:SetOperation(c80108118.operation) - c:RegisterEffect(e1) -end -function c80108118.condition(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp and Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>=4 -end -function c80108118.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,1-tp,LOCATION_HAND) -end -function c80108118.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetFieldGroup(ep,LOCATION_HAND,0,nil) - if g:GetCount()==0 then return end - local sg=g:RandomSelect(1-tp,1) - Duel.SendtoDeck(sg,nil,0,REASON_EFFECT) -end diff --git a/script/c80117527.lua b/script/c80117527.lua deleted file mode 100644 index ae942695b4..0000000000 --- a/script/c80117527.lua +++ /dev/null @@ -1,45 +0,0 @@ ---No.11 ビッグ・アイ -function c80117527.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,7,2) - c:EnableReviveLimit() - --attack up - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_CONTROL) - e1:SetDescription(aux.Stringid(80117527,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c80117527.cost) - e1:SetTarget(c80117527.target) - e1:SetOperation(c80117527.operation) - c:RegisterEffect(e1) -end -c80117527.xyz_number=11 -function c80117527.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) - and e:GetHandler():GetAttackAnnouncedCount()==0 end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_OATH) - e1:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - e:GetHandler():RegisterEffect(e1) -end -function c80117527.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:GetLocation()==LOCATION_MZONE and chkc:GetControler()~=tp and chkc:IsControlerCanBeChanged() end - if chk==0 then return Duel.IsExistingTarget(Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) - local g=Duel.SelectTarget(tp,Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0) -end -function c80117527.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and not Duel.GetControl(tc,tp) then - if not tc:IsImmuneToEffect(e) and tc:IsAbleToChangeControler() then - Duel.Destroy(tc,REASON_EFFECT) - end - end -end diff --git a/script/c80159717.lua b/script/c80159717.lua deleted file mode 100644 index db1bbd1503..0000000000 --- a/script/c80159717.lua +++ /dev/null @@ -1,34 +0,0 @@ ---ドラグニティナイト-トライデント -function c80159717.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsRace,RACE_DRAGON),aux.NonTuner(Card.IsRace,RACE_WINDBEAST),1) - c:EnableReviveLimit() - --extra - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(80159717,0)) - e1:SetCategory(CATEGORY_TOGRAVE) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c80159717.excost) - e1:SetOperation(c80159717.exop) - c:RegisterEffect(e1) -end -function c80159717.excost(e,tp,eg,ep,ev,re,r,rp,chk) - local ct=Duel.GetFieldGroupCount(tp,0,LOCATION_EXTRA) - if ct>3 then ct=3 end - if chk==0 then return ct>0 and Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_ONFIELD,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,Card.IsAbleToGraveAsCost,tp,LOCATION_ONFIELD,0,1,ct,nil) - Duel.SendtoGrave(g,REASON_COST) - e:SetLabel(g:GetCount()) -end -function c80159717.exop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetFieldGroup(tp,0,LOCATION_EXTRA) - local ct=e:GetLabel() - if g:GetCount()0 then - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.ChangePosition(tc,POS_FACEUP_DEFENCE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK) - end - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c80208158.lua b/script/c80208158.lua deleted file mode 100644 index 90395bb33a..0000000000 --- a/script/c80208158.lua +++ /dev/null @@ -1,55 +0,0 @@ ---異次元エスパー・スター・ロビン -function c80208158.initial_effect(c) - c:SetUniqueOnField(1,1,80208158) - --target - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(0,LOCATION_MZONE) - e1:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET) - e1:SetValue(c80208158.atlimit) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_CANNOT_SELECT_EFFECT_TARGET) - e2:SetProperty(EFFECT_FLAG_SET_AVAILABLE) - e2:SetTargetRange(0,0xff) - e2:SetValue(c80208158.tglimit) - c:RegisterEffect(e2) - --spsummon - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(80208158,0)) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_ATTACK_ANNOUNCE) - e3:SetRange(LOCATION_GRAVE) - e3:SetCondition(c80208158.spcon) - e3:SetTarget(c80208158.sptg) - e3:SetOperation(c80208158.spop) - c:RegisterEffect(e3) -end -function c80208158.atlimit(e,c) - return c~=e:GetHandler() -end -function c80208158.tglimit(e,re,c) - return c:IsControler(e:GetHandlerPlayer()) and c:IsLocation(LOCATION_MZONE) and c~=e:GetHandler() -end -function c80208158.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetAttacker():IsControler(1-tp) and Duel.GetAttackTarget()==nil -end -function c80208158.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c80208158.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP_DEFENCE)>0 then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+0x47e0000) - e1:SetValue(LOCATION_REMOVED) - c:RegisterEffect(e1,true) - end -end diff --git a/script/c80208323.lua b/script/c80208323.lua deleted file mode 100644 index b67171baa6..0000000000 --- a/script/c80208323.lua +++ /dev/null @@ -1,38 +0,0 @@ ---異界の棘紫獣 -function c80208323.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(80208323,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetRange(LOCATION_GRAVE) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetCountLimit(1,80208323) - e1:SetCondition(c80208323.spcon) - e1:SetTarget(c80208323.sptg) - e1:SetOperation(c80208323.spop) - c:RegisterEffect(e1) -end -function c80208323.spfilter(c,tp) - return c:IsLocation(LOCATION_GRAVE) and c:IsReason(REASON_BATTLE) and c:GetPreviousControler()==tp and c:IsType(TYPE_MONSTER) -end -function c80208323.spcon(e,tp,eg,ep,ev,re,r,rp) - return not eg:IsContains(e:GetHandler()) and eg:IsExists(c80208323.spfilter,1,nil,tp) -end -function c80208323.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c80208323.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+0x47e0000) - e1:SetValue(LOCATION_REMOVED) - c:RegisterEffect(e1,true) - end -end diff --git a/script/c80233946.lua b/script/c80233946.lua deleted file mode 100644 index c26430f839..0000000000 --- a/script/c80233946.lua +++ /dev/null @@ -1,14 +0,0 @@ ---ゴラ・タートル -function c80233946.initial_effect(c) - --cannot attack - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e1:SetTarget(c80233946.atktarget) - c:RegisterEffect(e1) -end -function c80233946.atktarget(e,c) - return c:IsAttackAbove(1900) -end diff --git a/script/c80244114.lua b/script/c80244114.lua deleted file mode 100644 index 2b1b895d67..0000000000 --- a/script/c80244114.lua +++ /dev/null @@ -1,94 +0,0 @@ ---スターダスト・ファントム -function c80244114.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(80244114,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCondition(c80244114.spcon) - e1:SetTarget(c80244114.sptg) - e1:SetOperation(c80244114.spop) - c:RegisterEffect(e1) - --indes - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(80244114,1)) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_GRAVE) - e2:SetCost(c80244114.indcost) - e2:SetTarget(c80244114.indtg) - e2:SetOperation(c80244114.indop) - c:RegisterEffect(e2) -end -function c80244114.spcon(e,tp,eg,ep,ev,re,r,rp) - return rp~=tp and e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) and e:GetHandler():IsReason(REASON_DESTROY) -end -function c80244114.spfilter(c,e,tp) - return c:IsCode(44508094) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c80244114.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c80244114.spfilter(chkc,e,tp) end - if chk==0 then return Duel.IsExistingTarget(c80244114.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c80244114.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,g:GetCount(),0,0) -end -function c80244114.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENCE) - end -end -function c80244114.indcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) -end -function c80244114.indfilter(c) - return c:IsFaceup() and c:IsRace(RACE_DRAGON) and c:IsType(TYPE_SYNCHRO) -end -function c80244114.indtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c80244114.indfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c80244114.indfilter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - local g=Duel.SelectTarget(tp,c80244114.indfilter,tp,LOCATION_MZONE,0,1,1,nil) -end -function c80244114.indop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_INDESTRUCTABLE_COUNT) - e1:SetCountLimit(1) - e1:SetValue(c80244114.valcon) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE) - e2:SetCode(EVENT_DAMAGE_STEP_END) - e2:SetOperation(c80244114.addown) - e2:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e2) - end -end -function c80244114.valcon(e,re,r,rp) - if bit.band(r,REASON_BATTLE)~=0 then - e:GetHandler():RegisterFlagEffect(80244114,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_DAMAGE,0,1) - return true - else return false end -end -function c80244114.addown(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():GetFlagEffect(80244114)==0 then return end - local e1=Effect.CreateEffect(e:GetOwner()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(-800) - e1:SetReset(RESET_EVENT+0x1fe0000) - e:GetHandler():RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_UPDATE_DEFENCE) - e:GetHandler():RegisterEffect(e2) -end diff --git a/script/c80280737.lua b/script/c80280737.lua deleted file mode 100644 index f43b8c41d1..0000000000 --- a/script/c80280737.lua +++ /dev/null @@ -1,48 +0,0 @@ ---バスター・モード -function c80280737.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_DRAW_PHASE+TIMING_END_PHASE) - e1:SetCost(c80280737.cost) - e1:SetTarget(c80280737.target) - e1:SetOperation(c80280737.activate) - c:RegisterEffect(e1) -end -c80280737.list={[44508094]=61257789,[70902743]=77336644,[6021033]=1764972, - [31924889]=14553285,[23693634]=38898779,[95526884]=37169670} -function c80280737.cost(e,tp,eg,ep,ev,re,r,rp,chk) - e:SetLabel(1) - return true -end -function c80280737.filter1(c,e,tp) - local code=c:GetCode() - local tcode=c80280737.list[code] - return tcode and c:IsType(TYPE_SYNCHRO) and Duel.IsExistingMatchingCard(c80280737.filter2,tp,LOCATION_DECK,0,1,nil,tcode,e,tp) -end -function c80280737.filter2(c,tcode,e,tp) - return c:IsCode(tcode) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) -end -function c80280737.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - if e:GetLabel()~=1 then return false end - e:SetLabel(0) - return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.CheckReleaseGroup(tp,c80280737.filter1,1,nil,e,tp) - end - local rg=Duel.SelectReleaseGroup(tp,c80280737.filter1,1,1,nil,e,tp) - e:SetLabel(rg:GetFirst():GetCode()) - Duel.Release(rg,REASON_COST) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c80280737.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local code=e:GetLabel() - local tcode=c80280737.list[code] - local tc=Duel.GetFirstMatchingCard(c80280737.filter2,tp,LOCATION_DECK,0,nil,tcode,e,tp) - if tc and Duel.SpecialSummon(tc,0,tp,tp,true,false,POS_FACEUP_ATTACK)>0 then - tc:CompleteProcedure() - end -end diff --git a/script/c80304126.lua b/script/c80304126.lua deleted file mode 100644 index 2c0d5fa373..0000000000 --- a/script/c80304126.lua +++ /dev/null @@ -1,14 +0,0 @@ ---マジシャンズ・ヴァルキリア -function c80304126.initial_effect(c) - --cannot be battle target - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(0,LOCATION_MZONE) - e1:SetValue(c80304126.tg) - c:RegisterEffect(e1) -end -function c80304126.tg(e,c) - return c~=e:GetHandler() and c:IsFaceup() and c:IsRace(RACE_SPELLCASTER) -end diff --git a/script/c80316585.lua b/script/c80316585.lua deleted file mode 100644 index cdaae8737e..0000000000 --- a/script/c80316585.lua +++ /dev/null @@ -1,3 +0,0 @@ ---ハーピィ・レディ・SB -function c80316585.initial_effect(c) -end diff --git a/script/c80321197.lua b/script/c80321197.lua deleted file mode 100644 index f49a3a31cf..0000000000 --- a/script/c80321197.lua +++ /dev/null @@ -1,39 +0,0 @@ ---クリムゾン・ブレーダー -function c80321197.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1) - c:EnableReviveLimit() - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(80321197,0)) - e1:SetCode(EVENT_BATTLE_DESTROYING) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCondition(aux.bdogcon) - e1:SetOperation(c80321197.spop) - c:RegisterEffect(e1) -end -function c80321197.spop(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetTargetRange(0,1) - e1:SetCondition(c80321197.sumcon) - e1:SetTarget(c80321197.sumlimit) - e1:SetLabel(Duel.GetTurnCount()) - if Duel.GetTurnPlayer()==tp then - e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN) - else - e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN,2) - end - Duel.RegisterEffect(e1,tp) - local e2=e1:Clone() - e2:SetCode(EFFECT_CANNOT_SUMMON) - Duel.RegisterEffect(e2,tp) -end -function c80321197.sumcon(e) - return Duel.GetTurnCount()~=e:GetLabel() and Duel.GetTurnPlayer()~=e:GetOwnerPlayer() -end -function c80321197.sumlimit(e,c) - return c:IsLevelAbove(5) -end diff --git a/script/c80344569.lua b/script/c80344569.lua deleted file mode 100644 index 872c6fa8ef..0000000000 --- a/script/c80344569.lua +++ /dev/null @@ -1,28 +0,0 @@ ---N・グラン・モール -function c80344569.initial_effect(c) - --return to hand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(80344569,0)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_BATTLE_START) - e1:SetTarget(c80344569.target) - e1:SetOperation(c80344569.operation) - c:RegisterEffect(e1) -end -function c80344569.target(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return Duel.GetAttackTarget()==c or (Duel.GetAttacker()==c and Duel.GetAttackTarget()~=nil) end - local g=Group.FromCards(Duel.GetAttacker(),Duel.GetAttackTarget()) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0) -end -function c80344569.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Group.CreateGroup() - local c=Duel.GetAttacker() - if c:IsRelateToBattle() then g:AddCard(c) end - c=Duel.GetAttackTarget() - if c~=nil and c:IsRelateToBattle() then g:AddCard(c) end - if g:GetCount()>0 then - Duel.SendtoHand(g, nil, REASON_EFFECT) - end -end diff --git a/script/c8034697.lua b/script/c8034697.lua deleted file mode 100644 index 9082ebf572..0000000000 --- a/script/c8034697.lua +++ /dev/null @@ -1,61 +0,0 @@ ---魔法の操り人形 -function c8034697.initial_effect(c) - c:EnableCounterPermit(0x3001) - --add counter - local e0=Effect.CreateEffect(c) - e0:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e0:SetCode(EVENT_CHAINING) - e0:SetRange(LOCATION_MZONE) - e0:SetOperation(aux.chainreg) - c:RegisterEffect(e0) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e1:SetCode(EVENT_CHAIN_SOLVING) - e1:SetProperty(EFFECT_FLAG_DELAY) - e1:SetRange(LOCATION_MZONE) - e1:SetOperation(c8034697.acop) - c:RegisterEffect(e1) - --attackup - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(c8034697.attackup) - c:RegisterEffect(e2) - --destroy - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(8034697,1)) - e3:SetCategory(CATEGORY_DESTROY) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_MZONE) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetCost(c8034697.descost) - e3:SetTarget(c8034697.destarg) - e3:SetOperation(c8034697.desop) - c:RegisterEffect(e3) -end -function c8034697.acop(e,tp,eg,ep,ev,re,r,rp) - if re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL) and e:GetHandler():GetFlagEffect(1)>0 then - e:GetHandler():AddCounter(0x3001,1) - end -end -function c8034697.attackup(e,c) - return c:GetCounter(0x3001)*200 -end -function c8034697.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsCanRemoveCounter(tp,0x3001,2,REASON_COST) end - e:GetHandler():RemoveCounter(tp,0x3001,2,REASON_COST) -end -function c8034697.destarg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsDestructable() end - if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c8034697.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c80367387.lua b/script/c80367387.lua deleted file mode 100644 index 4bfd70c71d..0000000000 --- a/script/c80367387.lua +++ /dev/null @@ -1,65 +0,0 @@ ---コアキメイル・ベルグザーク -function c80367387.initial_effect(c) - --cost - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c80367387.mtcon) - e1:SetOperation(c80367387.mtop) - c:RegisterEffect(e1) - --chain attack - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(80367387,3)) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_BATTLED) - e2:SetCondition(c80367387.atcon) - e2:SetOperation(c80367387.atop) - c:RegisterEffect(e2) -end -function c80367387.mtcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c80367387.cfilter1(c) - return c:IsCode(36623431) and c:IsAbleToGraveAsCost() -end -function c80367387.cfilter2(c) - return c:IsType(TYPE_MONSTER) and c:IsRace(RACE_WARRIOR) and not c:IsPublic() -end -function c80367387.mtop(e,tp,eg,ep,ev,re,r,rp) - local g1=Duel.GetMatchingGroup(c80367387.cfilter1,tp,LOCATION_HAND,0,nil) - local g2=Duel.GetMatchingGroup(c80367387.cfilter2,tp,LOCATION_HAND,0,nil) - local select=2 - Duel.Hint(HINT_SELECTMSG,tp,0) - if g1:GetCount()>0 and g2:GetCount()>0 then - select=Duel.SelectOption(tp,aux.Stringid(80367387,0),aux.Stringid(80367387,1),aux.Stringid(80367387,2)) - elseif g1:GetCount()>0 then - select=Duel.SelectOption(tp,aux.Stringid(80367387,0),aux.Stringid(80367387,2)) - if select==1 then select=2 end - elseif g2:GetCount()>0 then - select=Duel.SelectOption(tp,aux.Stringid(80367387,1),aux.Stringid(80367387,2)) - select=select+1 - end - if select==0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=g1:Select(tp,1,1,nil) - Duel.SendtoGrave(g,REASON_COST) - elseif select==1 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) - local g=g2:Select(tp,1,1,nil) - Duel.ConfirmCards(1-tp,g) - Duel.ShuffleHand(tp) - else - Duel.Destroy(e:GetHandler(),REASON_RULE) - end -end -function c80367387.atcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local bc=c:GetBattleTarget() - return bc and bc:IsStatus(STATUS_BATTLE_DESTROYED) and c:IsChainAttackable() and c:IsStatus(STATUS_OPPO_BATTLE) -end -function c80367387.atop(e,tp,eg,ep,ev,re,r,rp) - Duel.ChainAttack() -end diff --git a/script/c80368942.lua b/script/c80368942.lua deleted file mode 100644 index 251fce7d83..0000000000 --- a/script/c80368942.lua +++ /dev/null @@ -1,52 +0,0 @@ ---コクーン・パーティ -function c80368942.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c80368942.target) - e1:SetOperation(c80368942.activate) - c:RegisterEffect(e1) -end -function c80368942.gfilter(c) - return c:IsSetCard(0x1f) and c:IsType(TYPE_MONSTER) -end -function c80368942.spfilter(c,e,tp) - return c:IsSetCard(0x1e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c80368942.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local g=Duel.GetMatchingGroup(c80368942.gfilter,tp,LOCATION_GRAVE,0,nil) - local ct=c80368942.count_unique_code(g) - e:SetLabel(ct) - return ct>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>=ct - and Duel.IsExistingMatchingCard(c80368942.spfilter,tp,LOCATION_DECK,0,ct,nil,e,tp) - end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,e:GetLabel(),tp,LOCATION_DECK) -end -function c80368942.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c80368942.gfilter,tp,LOCATION_GRAVE,0,nil) - local ct=c80368942.count_unique_code(g) - if ct==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c8041569.lua b/script/c8041569.lua deleted file mode 100644 index a92afabbef..0000000000 --- a/script/c8041569.lua +++ /dev/null @@ -1,45 +0,0 @@ ---ラヴァル炎湖畔の淑女 -function c8041569.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetDescription(aux.Stringid(8041569,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_GRAVE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCondition(c8041569.descon) - e1:SetCost(c8041569.descost) - e1:SetTarget(c8041569.destg) - e1:SetOperation(c8041569.desop) - c:RegisterEffect(e1) -end -function c8041569.descon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetMatchingGroup(Card.IsSetCard,tp,LOCATION_GRAVE,0,nil,0x39):GetClassCount(Card.GetCode)>=3 -end -function c8041569.cfilter(c) - return c:IsSetCard(0x39) and c:IsAbleToRemoveAsCost() -end -function c8041569.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() - and Duel.IsExistingMatchingCard(c8041569.cfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c8041569.cfilter,tp,LOCATION_GRAVE,0,1,1,e:GetHandler()) - g:AddCard(e:GetHandler()) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c8041569.filter(c) - return c:IsFacedown() and c:IsDestructable() -end -function c8041569.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and c8041569.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c8041569.filter,tp,0,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c8041569.filter,tp,0,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c8041569.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsFacedown() and tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c80441106.lua b/script/c80441106.lua deleted file mode 100644 index 35d4fdac10..0000000000 --- a/script/c80441106.lua +++ /dev/null @@ -1,37 +0,0 @@ ---ケルドウ -function c80441106.initial_effect(c) - --todeck - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(80441106,0)) - e1:SetCategory(CATEGORY_TODECK) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetCondition(c80441106.condition) - e1:SetTarget(c80441106.target) - e1:SetOperation(c80441106.operation) - c:RegisterEffect(e1) -end -function c80441106.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) -end -function c80441106.filter(c,e) - return c:IsAbleToDeck() and c:IsCanBeEffectTarget(e) -end -function c80441106.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(1-tp) and c80441106.filter(chkc,e) end - if chk==0 then return true end - local g=Duel.GetMatchingGroup(c80441106.filter,tp,0,LOCATION_GRAVE,nil,e) - if g:GetCount()>=2 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local sg=g:Select(tp,2,2,nil) - Duel.SetTargetCard(sg) - Duel.SetOperationInfo(0,CATEGORY_TODECK,sg,2,0,0) - end -end -function c80441106.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - if not g then return end - local sg=g:Filter(Card.IsRelateToEffect,nil,e) - Duel.SendtoDeck(sg,nil,2,REASON_EFFECT) -end diff --git a/script/c80457744.lua b/script/c80457744.lua deleted file mode 100644 index cace0e00cf..0000000000 --- a/script/c80457744.lua +++ /dev/null @@ -1,29 +0,0 @@ ---ブースト・ウォリアー -function c80457744.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_SPSUM_PARAM) - e1:SetTargetRange(POS_FACEUP_DEFENCE,0) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c80457744.spcon) - c:RegisterEffect(e1) - --atk - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetRange(LOCATION_MZONE) - e2:SetTargetRange(LOCATION_MZONE,0) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetTarget(aux.TargetBoolFunction(Card.IsRace,RACE_WARRIOR)) - e2:SetValue(300) - c:RegisterEffect(e2) -end -function c80457744.filter(c) - return c:IsFaceup() and c:IsType(TYPE_TUNER) -end -function c80457744.spcon(e,c) - if c==nil then return true end - return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and - Duel.IsExistingMatchingCard(c80457744.filter,c:GetControler(),LOCATION_MZONE,0,1,nil) -end diff --git a/script/c80485722.lua b/script/c80485722.lua deleted file mode 100644 index f2e7e1c973..0000000000 --- a/script/c80485722.lua +++ /dev/null @@ -1,25 +0,0 @@ ---ヴァンパイア・キラー -function c80485722.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(80485722,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_BATTLE_START) - e1:SetTarget(c80485722.destg) - e1:SetOperation(c80485722.desop) - c:RegisterEffect(e1) -end -function c80485722.destg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - local bc=c:GetBattleTarget() - if chk==0 then return bc and bc:IsFaceup() and bc:IsAttribute(ATTRIBUTE_DARK) end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,bc,1,0,0) -end -function c80485722.desop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local bc=c:GetBattleTarget() - if bc:IsRelateToBattle() then - Duel.Destroy(bc,REASON_EFFECT) - end -end diff --git a/script/c80495985.lua b/script/c80495985.lua deleted file mode 100644 index 1eae4bee49..0000000000 --- a/script/c80495985.lua +++ /dev/null @@ -1,44 +0,0 @@ ---フォトン・サーベルタイガー -function c80495985.initial_effect(c) - --search - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(80495985,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c80495985.thtg) - e1:SetOperation(c80495985.thop) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - c:RegisterEffect(e2) - --atkdown - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e3:SetRange(LOCATION_MZONE) - e3:SetCode(EFFECT_UPDATE_ATTACK) - e3:SetCondition(c80495985.atcon) - e3:SetValue(-800) - c:RegisterEffect(e3) -end -function c80495985.filter(c) - return c:IsCode(80495985) and c:IsAbleToHand() -end -function c80495985.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c80495985.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c80495985.thop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstMatchingCard(c80495985.filter,tp,LOCATION_DECK,0,nil) - if tc then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end -function c80495985.atfilter(c) - return c:IsFaceup() and c:IsCode(80495985) -end -function c80495985.atcon(e) - return not Duel.IsExistingMatchingCard(c80495985.atfilter,e:GetHandlerPlayer(),LOCATION_ONFIELD,0,1,e:GetHandler()) -end diff --git a/script/c80513550.lua b/script/c80513550.lua deleted file mode 100644 index 75c07dc280..0000000000 --- a/script/c80513550.lua +++ /dev/null @@ -1,78 +0,0 @@ ---バッド・エンド・クイーン・ドラゴン -function c80513550.initial_effect(c) - c:EnableReviveLimit() - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c80513550.hspcon) - c:RegisterEffect(e1) - --damage - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(80513550,0)) - e2:SetCategory(CATEGORY_HANDES+CATEGORY_DRAW) - e2:SetCode(EVENT_BATTLE_DAMAGE) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCondition(c80513550.hdcon) - e2:SetTarget(c80513550.hdtg) - e2:SetOperation(c80513550.hdop) - c:RegisterEffect(e2) - --Special Summon - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(80513550,1)) - e3:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_FIELD) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetCode(EVENT_PHASE+PHASE_STANDBY) - e3:SetRange(LOCATION_GRAVE) - e3:SetCondition(c80513550.spcon) - e3:SetCost(c80513550.spcost) - e3:SetTarget(c80513550.sptg) - e3:SetOperation(c80513550.spop) - c:RegisterEffect(e3) -end -function c80513550.hspfilter(c) - return c:IsFaceup() and c:GetType()==TYPE_SPELL+TYPE_CONTINUOUS -end -function c80513550.hspcon(e,c) - if c==nil then return true end - return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c80513550.hspfilter,c:GetControler(),LOCATION_SZONE,0,3,nil) -end -function c80513550.hdcon(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp and e:GetHandler()==Duel.GetAttacker() -end -function c80513550.hdtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,1-tp,1) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c80513550.hdop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)~=0 and Duel.IsPlayerCanDraw(tp,1) then - Duel.DiscardHand(1-tp,nil,1,1,REASON_EFFECT) - Duel.Draw(tp,1,REASON_EFFECT) - end -end -function c80513550.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp and e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) -end -function c80513550.cfilter(c) - return c:IsFaceup() and c:GetType()==TYPE_SPELL+TYPE_CONTINUOUS and c:IsAbleToGraveAsCost() -end -function c80513550.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c80513550.cfilter,tp,LOCATION_SZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c80513550.cfilter,tp,LOCATION_SZONE,0,1,1,nil) - Duel.SendtoGrave(g,REASON_COST) -end -function c80513550.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c80513550.spop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c80516007.lua b/script/c80516007.lua deleted file mode 100644 index 03e5011cbd..0000000000 --- a/script/c80516007.lua +++ /dev/null @@ -1,6 +0,0 @@ ---レア・フィッシュ -function c80516007.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcCode2(c,1641882,75376965,true,true) -end diff --git a/script/c80532587.lua b/script/c80532587.lua deleted file mode 100644 index 192d2a3104..0000000000 --- a/script/c80532587.lua +++ /dev/null @@ -1,93 +0,0 @@ ---旧神ヌトス -function c80532587.initial_effect(c) - c:SetSPSummonOnce(80532587) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcFun2(c,aux.FilterBoolFunction(Card.IsType,TYPE_SYNCHRO),aux.FilterBoolFunction(Card.IsType,TYPE_XYZ),false) - --spsummon condition - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - c:RegisterEffect(e1) - --special summon rule - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_SPSUMMON_PROC) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e2:SetRange(LOCATION_EXTRA) - e2:SetCondition(c80532587.sprcon) - e2:SetOperation(c80532587.sprop) - c:RegisterEffect(e2) - --special summon - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(80532587,0)) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetCountLimit(1) - e3:SetRange(LOCATION_MZONE) - e3:SetTarget(c80532587.sptg) - e3:SetOperation(c80532587.spop) - c:RegisterEffect(e3) - --destroy - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(80532587,1)) - e4:SetCategory(CATEGORY_DESTROY) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e4:SetCode(EVENT_TO_GRAVE) - e4:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) - e4:SetTarget(c80532587.destg) - e4:SetOperation(c80532587.desop) - c:RegisterEffect(e4) -end -function c80532587.sprfilter1(c,tp) - return c:IsType(TYPE_SYNCHRO) and c:IsAbleToGraveAsCost() and c:IsCanBeFusionMaterial() - and Duel.IsExistingMatchingCard(c80532587.sprfilter2,tp,LOCATION_MZONE,0,1,c) -end -function c80532587.sprfilter2(c) - return c:IsType(TYPE_XYZ) and c:IsAbleToGraveAsCost() and c:IsCanBeFusionMaterial() -end -function c80532587.sprcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.GetLocationCount(tp,LOCATION_MZONE)>-2 - and Duel.IsExistingMatchingCard(c80532587.sprfilter1,tp,LOCATION_MZONE,0,1,nil,tp) -end -function c80532587.sprop(e,tp,eg,ep,ev,re,r,rp,c) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g1=Duel.SelectMatchingCard(tp,c80532587.sprfilter1,tp,LOCATION_MZONE,0,1,1,nil,tp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g2=Duel.SelectMatchingCard(tp,c80532587.sprfilter2,tp,LOCATION_MZONE,0,1,1,g1:GetFirst()) - g1:Merge(g2) - c:SetMaterial(g1) - Duel.SendtoGrave(g1,REASON_COST) -end -function c80532587.spfilter(c,e,tp) - return c:GetLevel()==4 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c80532587.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c80532587.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,LOCATION_HAND) -end -function c80532587.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c80532587.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end -function c80532587.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsDestructable() end - if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c80532587.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c80538728.lua b/script/c80538728.lua deleted file mode 100644 index 4eebe554b3..0000000000 --- a/script/c80538728.lua +++ /dev/null @@ -1,21 +0,0 @@ ---ゼンマイナイト -function c80538728.initial_effect(c) - --negate attack - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(80538728,0)) - e1:SetProperty(EFFECT_FLAG_NO_TURN_RESET) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_BE_BATTLE_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCondition(c80538728.condition) - e1:SetOperation(c80538728.operation) - c:RegisterEffect(e1) -end -function c80538728.condition(e,tp,eg,ep,ev,re,r,rp) - local d=Duel.GetAttackTarget() - return d and d:IsControler(tp) and d:IsFaceup() and d:IsSetCard(0x58) -end -function c80538728.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateAttack() -end diff --git a/script/c80549379.lua b/script/c80549379.lua deleted file mode 100644 index 628f413aee..0000000000 --- a/script/c80549379.lua +++ /dev/null @@ -1,41 +0,0 @@ ---ドラグニティ-ジャベリン -function c80549379.initial_effect(c) - --send replace - local e1=Effect.CreateEffect(c) - e1:SetCode(EFFECT_SEND_REPLACE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_MZONE) - e1:SetTarget(c80549379.reptg) - e1:SetOperation(c80549379.repop) - c:RegisterEffect(e1) -end -function c80549379.filter(c) - return c:IsFaceup() and c:IsSetCard(0x29) and c:IsRace(RACE_WINDBEAST) -end -function c80549379.reptg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsFaceup() and c:GetDestination()==LOCATION_GRAVE and c:IsReason(REASON_DESTROY) end - if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 - or not Duel.IsExistingMatchingCard(c80549379.filter,tp,LOCATION_MZONE,0,1,e:GetHandler()) then return false end - return Duel.SelectEffectYesNo(tp,c) -end -function c80549379.repop(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local g=Duel.SelectMatchingCard(tp,c80549379.filter,tp,LOCATION_MZONE,0,1,1,e:GetHandler()) - local tc=g:GetFirst() - if Duel.Equip(tp,c,tc,false) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(c80549379.eqlimit) - e1:SetLabelObject(tc) - c:RegisterEffect(e1) - end -end -function c80549379.eqlimit(e,c) - return c==e:GetLabelObject() -end diff --git a/script/c80551130.lua b/script/c80551130.lua deleted file mode 100644 index 4741de729f..0000000000 --- a/script/c80551130.lua +++ /dev/null @@ -1,59 +0,0 @@ ---奇跡の光臨 -function c80551130.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_END_PHASE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c80551130.target) - e1:SetOperation(c80551130.operation) - c:RegisterEffect(e1) - --Destroy - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE) - e2:SetCode(EVENT_LEAVE_FIELD) - e2:SetOperation(c80551130.desop) - c:RegisterEffect(e2) - --Destroy2 - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e3:SetRange(LOCATION_SZONE) - e3:SetCode(EVENT_LEAVE_FIELD) - e3:SetCondition(c80551130.descon2) - e3:SetOperation(c80551130.desop2) - c:RegisterEffect(e3) -end -function c80551130.filter(c,e,tp) - return c:IsFaceup() and c:IsRace(RACE_FAIRY) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c80551130.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and c80551130.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c80551130.filter,tp,LOCATION_REMOVED,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c80551130.filter,tp,LOCATION_REMOVED,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c80551130.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then - if Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)==0 then return end - c:SetCardTarget(tc) - end -end -function c80551130.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetHandler():GetFirstCardTarget() - if tc and tc:IsLocation(LOCATION_MZONE) then - Duel.Destroy(tc,REASON_EFFECT) - end -end -function c80551130.descon2(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetHandler():GetFirstCardTarget() - return tc and eg:IsContains(tc) and tc:IsReason(REASON_DESTROY) -end -function c80551130.desop2(e,tp,eg,ep,ev,re,r,rp) - Duel.Destroy(e:GetHandler(),REASON_EFFECT) -end diff --git a/script/c80555062.lua b/script/c80555062.lua deleted file mode 100644 index 129828524a..0000000000 --- a/script/c80555062.lua +++ /dev/null @@ -1,19 +0,0 @@ ---武神器-チカヘシ -function c80555062.initial_effect(c) - -- - local e1=Effect.CreateEffect(c) - e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetTarget(c80555062.target) - e1:SetCondition(c80555062.con) - e1:SetValue(1) - c:RegisterEffect(e1) -end -function c80555062.con(e) - return e:GetHandler():IsDefencePos() -end -function c80555062.target(e,c) - return c~=e:GetHandler() and c:IsSetCard(0x88) -end diff --git a/script/c80555116.lua b/script/c80555116.lua deleted file mode 100644 index bc503ceeb4..0000000000 --- a/script/c80555116.lua +++ /dev/null @@ -1,27 +0,0 @@ ---ナチュル・ガーディアン -function c80555116.initial_effect(c) - --atk up - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(80555116,0)) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c80555116.atkcon) - e1:SetOperation(c80555116.atkop) - c:RegisterEffect(e1) -end -function c80555116.atkcon(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp -end -function c80555116.atkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFaceup() and c:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(300) - e1:SetReset(RESET_EVENT+0x1ff0000+RESET_PHASE+PHASE_END) - c:RegisterEffect(e1) - end -end diff --git a/script/c80559548.lua b/script/c80559548.lua deleted file mode 100644 index 8592dd237d..0000000000 --- a/script/c80559548.lua +++ /dev/null @@ -1,52 +0,0 @@ ---SRシェイブー・メラン -function c80559548.initial_effect(c) - --cannot attack - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetOperation(c80559548.sumop) - c:RegisterEffect(e1) - --atk down - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(80559548,0)) - e2:SetCategory(CATEGORY_ATKCHANGE) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCondition(c80559548.atkcon) - e2:SetTarget(c80559548.atktg) - e2:SetOperation(c80559548.atkop) - c:RegisterEffect(e2) -end -function c80559548.sumop(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e:GetHandler():RegisterEffect(e1) -end -function c80559548.atkcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPosition(POS_FACEUP_ATTACK) -end -function c80559548.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) -end -function c80559548.atkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and c:IsPosition(POS_FACEUP_ATTACK) then - Duel.ChangePosition(c,POS_FACEUP_DEFENCE) - if tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - e1:SetValue(-800) - tc:RegisterEffect(e1) - end - end -end diff --git a/script/c80566312.lua b/script/c80566312.lua deleted file mode 100644 index db209219b4..0000000000 --- a/script/c80566312.lua +++ /dev/null @@ -1,27 +0,0 @@ ---祝祷の聖歌 -function c80566312.initial_effect(c) - aux.AddRitualProcGreater(c,aux.FilterBoolFunction(Card.IsCode,56350972)) - --destroy replace - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EFFECT_DESTROY_REPLACE) - e1:SetRange(LOCATION_GRAVE) - e1:SetTarget(c80566312.reptg) - e1:SetValue(c80566312.repval) - e1:SetOperation(c80566312.repop) - c:RegisterEffect(e1) -end -function c80566312.repfilter(c,tp) - return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) and c:IsType(TYPE_RITUAL) - and c:IsReason(REASON_EFFECT+REASON_BATTLE) -end -function c80566312.reptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemove() and eg:IsExists(c80566312.repfilter,1,nil,tp) end - return Duel.SelectYesNo(tp,aux.Stringid(80566312,0)) -end -function c80566312.repval(e,c) - return c80566312.repfilter(c,e:GetHandlerPlayer()) -end -function c80566312.repop(e,tp,eg,ep,ev,re,r,rp) - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT) -end diff --git a/script/c8057630.lua b/script/c8057630.lua deleted file mode 100644 index 8758ab4172..0000000000 --- a/script/c8057630.lua +++ /dev/null @@ -1,70 +0,0 @@ ---コアの再練成 -function c8057630.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_END_PHASE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c8057630.target) - e1:SetOperation(c8057630.operation) - c:RegisterEffect(e1) - --Destroy - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE) - e2:SetCode(EVENT_LEAVE_FIELD) - e2:SetOperation(c8057630.desop) - c:RegisterEffect(e2) - --Destroy2 - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e3:SetRange(LOCATION_SZONE) - e3:SetCode(EVENT_LEAVE_FIELD) - e3:SetCondition(c8057630.descon2) - e3:SetOperation(c8057630.desop2) - e2:SetLabelObject(e3) - c:RegisterEffect(e3) -end -function c8057630.filter(c,e,tp) - return c:IsSetCard(0x1d) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c8057630.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c8057630.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c8057630.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c8057630.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c8057630.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then - if Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_ATTACK)==0 then return end - c:SetCardTarget(tc) - end -end -function c8057630.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetHandler():GetFirstCardTarget() - if not tc then return end - if tc:IsLocation(LOCATION_MZONE) and Duel.Destroy(tc,REASON_EFFECT)==0 then return end - if re~=e:GetLabelObject() and Duel.GetTurnPlayer()==tp and Duel.GetCurrentPhase()==PHASE_END then - local atk=tc:GetBaseAttack() - if atk<0 then atk=0 end - Duel.Damage(tp,atk,REASON_EFFECT) - end -end -function c8057630.descon2(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetHandler():GetFirstCardTarget() - return tc and eg:IsContains(tc) and tc:IsReason(REASON_DESTROY) -end -function c8057630.desop2(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetHandler():GetFirstCardTarget() - if Duel.GetTurnPlayer()==tp and Duel.GetCurrentPhase()==PHASE_END then - local atk=tc:GetBaseAttack() - if atk<0 then atk=0 end - Duel.Damage(tp,atk,REASON_EFFECT) - end - Duel.Destroy(e:GetHandler(),REASON_EFFECT) -end diff --git a/script/c80604091.lua b/script/c80604091.lua deleted file mode 100644 index 43a3a3b90a..0000000000 --- a/script/c80604091.lua +++ /dev/null @@ -1,94 +0,0 @@ ---血の代償 -function c80604091.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c80604091.cost1) - e1:SetTarget(c80604091.target1) - e1:SetOperation(c80604091.activate1) - c:RegisterEffect(e1) - --instant - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(80604091,0)) - e3:SetCategory(CATEGORY_SUMMON) - e3:SetType(EFFECT_TYPE_QUICK_O) - e3:SetRange(LOCATION_SZONE) - e3:SetCode(EVENT_FREE_CHAIN) - e3:SetCondition(c80604091.condition2) - e3:SetCost(c80604091.cost2) - e3:SetTarget(c80604091.target2) - e3:SetOperation(c80604091.activate2) - c:RegisterEffect(e3) -end -function c80604091.filter(c) - return c:IsSummonable(true,nil) or c:IsMSetable(true,nil) -end -function c80604091.cost1(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - e:SetLabel(0) - local tn=Duel.GetTurnPlayer() - local ph=Duel.GetCurrentPhase() - if (tn==tp and ph~=PHASE_MAIN1 and ph~=PHASE_MAIN2) or (tn~=tp and ph~=PHASE_BATTLE) then return false end - if Duel.GetLP(tp)<=500 then return end - if Duel.IsExistingMatchingCard(c80604091.filter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil) - and Duel.SelectYesNo(tp,aux.Stringid(80604091,1)) then - Duel.PayLPCost(tp,500) - e:SetLabel(1) - end -end -function c80604091.target1(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - if e:GetLabel()~=1 then return end - Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,0,0) -end -function c80604091.activate1(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) then return end - if e:GetLabel()~=1 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON) - local g=Duel.SelectMatchingCard(tp,c80604091.filter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil) - local tc=g:GetFirst() - if tc then - if tc:IsSummonable(true,nil) and (not tc:IsMSetable(true,nil) - or Duel.SelectPosition(tp,tc,POS_FACEUP_ATTACK+POS_FACEDOWN_DEFENCE)==POS_FACEUP_ATTACK) then - Duel.Summon(tp,tc,true,nil) - else Duel.MSet(tp,tc,true,nil) end - end -end -function c80604091.condition2(e,tp,eg,ep,ev,re,r,rp) - local tn=Duel.GetTurnPlayer() - local ph=Duel.GetCurrentPhase() - return (tn==tp and (ph==PHASE_MAIN1 or ph==PHASE_MAIN2)) or (tn~=tp and ph==PHASE_BATTLE) -end -function c80604091.cost2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,500) - else Duel.PayLPCost(tp,500) end -end -function c80604091.target2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - if not e:GetHandler():IsStatus(STATUS_CHAINING) then - local ct=Duel.GetMatchingGroupCount(c80604091.filter,tp,LOCATION_HAND+LOCATION_MZONE,0,nil) - e:SetLabel(ct) - return ct>0 - else return e:GetLabel()>0 end - end - e:SetLabel(e:GetLabel()-1) - Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,0,0) -end -function c80604091.activate2(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON) - local g=Duel.SelectMatchingCard(tp,c80604091.filter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil) - local tc=g:GetFirst() - if tc then - local s1=tc:IsSummonable(true,nil) - local s2=tc:IsMSetable(true,nil) - if (s1 and s2 and Duel.SelectPosition(tp,tc,POS_FACEUP_ATTACK+POS_FACEDOWN_DEFENCE)==POS_FACEUP_ATTACK) or not s2 then - Duel.Summon(tp,tc,true,nil) - else - Duel.MSet(tp,tc,true,nil) - end - end -end diff --git a/script/c8062132.lua b/script/c8062132.lua deleted file mode 100644 index f33a7841a6..0000000000 --- a/script/c8062132.lua +++ /dev/null @@ -1,88 +0,0 @@ ---毒蛇神ヴェノミナーガ -function c8062132.initial_effect(c) - c:EnableReviveLimit() - --spsummon condition - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - c:RegisterEffect(e1) - --atkup - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetValue(c8062132.atkval) - c:RegisterEffect(e2) - --special summon - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(8062132,0)) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_BATTLE_DESTROYED) - e3:SetCondition(c8062132.condition) - e3:SetCost(c8062132.cost) - e3:SetTarget(c8062132.target) - e3:SetOperation(c8062132.operation) - c:RegisterEffect(e3) - --unaffectable - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e4:SetRange(LOCATION_MZONE) - e4:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) - e4:SetValue(aux.tgval) - c:RegisterEffect(e4) - local e5=e4:Clone() - e5:SetCode(EFFECT_IMMUNE_EFFECT) - e5:SetValue(c8062132.efilter) - c:RegisterEffect(e5) - --win - local e6=Effect.CreateEffect(c) - e6:SetDescription(aux.Stringid(8062132,1)) - e6:SetCategory(CATEGORY_COUNTER) - e6:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e6:SetCode(EVENT_BATTLE_DAMAGE) - e6:SetCondition(c8062132.ctcon) - e6:SetOperation(c8062132.ctop) - c:RegisterEffect(e6) -end -function c8062132.efilter(e,te) - return te:GetOwner()~=e:GetOwner() -end -function c8062132.atkval(e,c) - return Duel.GetMatchingGroupCount(Card.IsRace,c:GetControler(),LOCATION_GRAVE,0,nil,RACE_REPTILE)*500 -end -function c8062132.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) -end -function c8062132.cfilter(c) - return c:IsRace(RACE_REPTILE) and c:IsAbleToRemoveAsCost() -end -function c8062132.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c8062132.cfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c8062132.cfilter,tp,LOCATION_GRAVE,0,1,1,e:GetHandler()) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c8062132.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c8062132.operation(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - Duel.SpecialSummon(e:GetHandler(),0,tp,tp,true,false,POS_FACEUP) - end -end -function c8062132.ctcon(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp -end -function c8062132.ctop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - c:AddCounter(0x11,1) - if c:GetCounter(0x11)>=3 then - Duel.Win(tp,0x12) - end -end diff --git a/script/c80637190.lua b/script/c80637190.lua deleted file mode 100644 index 112984cf46..0000000000 --- a/script/c80637190.lua +++ /dev/null @@ -1,35 +0,0 @@ ---スパイダー・スパイダー -function c80637190.initial_effect(c) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(80637190,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_BATTLE_DESTROYING) - e2:SetCondition(c80637190.spcon) - e2:SetTarget(c80637190.sptg) - e2:SetOperation(c80637190.spop) - c:RegisterEffect(e2) -end -function c80637190.spcon(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetHandler():GetBattleTarget() - return bit.band(tc:GetBattlePosition(),POS_DEFENCE)~=0 -end -function c80637190.filter(c,e,tp) - return c:IsLevelBelow(4) and c:IsRace(RACE_INSECT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c80637190.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c80637190.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c80637190.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c80637190.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c80637190.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c80651316.lua b/script/c80651316.lua deleted file mode 100644 index 0e5f6c0573..0000000000 --- a/script/c80651316.lua +++ /dev/null @@ -1,51 +0,0 @@ ---エヴォルダー・ケラト -function c80651316.initial_effect(c) - --atkup - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(c80651316.atkcon) - e1:SetOperation(c80651316.atkop) - c:RegisterEffect(e1) -end -function c80651316.atkcon(e,tp,eg,ep,ev,re,r,rp) - local st=e:GetHandler():GetSummonType() - return st>=(SUMMON_TYPE_SPECIAL+150) and st<(SUMMON_TYPE_SPECIAL+180) -end -function c80651316.atkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFacedown() or not c:IsRelateToEffect(e) then return end - --atkup - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(200) - e1:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e1) - --search - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(80651316,0)) - e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_BATTLE_DESTROYING) - e2:SetTarget(c80651316.schtg) - e2:SetOperation(c80651316.schop) - e2:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e2) -end -function c80651316.sfilter(c) - return c:IsSetCard(0x304e) and c:IsAbleToHand() -end -function c80651316.schtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c80651316.sfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c80651316.schop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c80651316.sfilter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c80666118.lua b/script/c80666118.lua deleted file mode 100644 index 8cbdcbb40d..0000000000 --- a/script/c80666118.lua +++ /dev/null @@ -1,44 +0,0 @@ ---レッド・デーモンズ・ドラゴン・スカーライト -function c80666118.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1) - c:EnableReviveLimit() - --change name - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetCode(EFFECT_CHANGE_CODE) - e1:SetRange(LOCATION_MZONE+LOCATION_GRAVE) - e1:SetValue(70902743) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetTarget(c80666118.destg) - e2:SetOperation(c80666118.desop) - c:RegisterEffect(e2) -end -function c80666118.filter(c,atk) - return c:IsFaceup() and c:IsAttackBelow(atk) and bit.band(c:GetSummonType(),SUMMON_TYPE_SPECIAL)==SUMMON_TYPE_SPECIAL - and c:IsType(TYPE_EFFECT) and c:IsDestructable() -end -function c80666118.destg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return Duel.IsExistingMatchingCard(c80666118.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,c,c:GetAttack()) end - local g=Duel.GetMatchingGroup(c80666118.filter,tp,LOCATION_MZONE,LOCATION_MZONE,c,c:GetAttack()) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,g:GetCount()*500) -end -function c80666118.desop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) or c:IsFacedown() then return end - local g=Duel.GetMatchingGroup(c80666118.filter,tp,LOCATION_MZONE,LOCATION_MZONE,c,c:GetAttack()) - local ct=Duel.Destroy(g,REASON_EFFECT) - if ct>0 then - Duel.BreakEffect() - Duel.Damage(1-tp,ct*500,REASON_EFFECT) - end -end diff --git a/script/c80678380.lua b/script/c80678380.lua deleted file mode 100644 index 14d03052bd..0000000000 --- a/script/c80678380.lua +++ /dev/null @@ -1,39 +0,0 @@ ---蛇神の勅命 -function c80678380.initial_effect(c) - --negate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_CHAINING) - e1:SetCondition(c80678380.condition) - e1:SetCost(c80678380.cost) - e1:SetTarget(c80678380.target) - e1:SetOperation(c80678380.activate) - c:RegisterEffect(e1) -end -function c80678380.condition(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp and re:IsActiveType(TYPE_SPELL) and re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev) -end -function c80678380.cfilter(c) - return c:IsSetCard(0x50) and c:IsType(TYPE_MONSTER) and not c:IsPublic() -end -function c80678380.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c80678380.cfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) - local g=Duel.SelectMatchingCard(tp,c80678380.cfilter,tp,LOCATION_HAND,0,1,1,nil) - Duel.ConfirmCards(1-tp,g) - Duel.ShuffleHand(tp) -end -function c80678380.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) - end -end -function c80678380.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateActivation(ev) - if re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(eg,REASON_EFFECT) - end -end diff --git a/script/c80696379.lua b/script/c80696379.lua deleted file mode 100644 index f3d6b192f2..0000000000 --- a/script/c80696379.lua +++ /dev/null @@ -1,60 +0,0 @@ ---オッドアイズ・メテオバースト・ドラゴン -function c80696379.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1) - c:EnableReviveLimit() - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(80696379,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCountLimit(1,80696379) - e1:SetTarget(c80696379.sptg) - e1:SetOperation(c80696379.spop) - c:RegisterEffect(e1) - --activate limit - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetCode(EFFECT_CANNOT_ACTIVATE) - e2:SetRange(LOCATION_MZONE) - e2:SetTargetRange(0,1) - e2:SetCondition(c80696379.condition) - e2:SetValue(c80696379.aclimit) - c:RegisterEffect(e2) -end -function c80696379.filter(c,e,tp) - return (c:GetSequence()==6 or c:GetSequence()==7) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c80696379.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_SZONE) and chkc:IsControler(tp) and c80696379.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c80696379.filter,tp,LOCATION_SZONE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c80696379.filter,tp,LOCATION_SZONE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c80696379.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end - if c:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - c:RegisterEffect(e1) - end -end -function c80696379.condition(e) - local ph=Duel.GetCurrentPhase() - return ph==PHASE_BATTLE or ph==PHASE_DAMAGE or ph==PHASE_DAMAGE_CAL -end -function c80696379.aclimit(e,re,tp) - return re:IsActiveType(TYPE_MONSTER) and not re:GetHandler():IsImmuneToEffect(e) -end diff --git a/script/c80723580.lua b/script/c80723580.lua deleted file mode 100644 index e8a98ed190..0000000000 --- a/script/c80723580.lua +++ /dev/null @@ -1,26 +0,0 @@ ---大落とし穴 -function c80723580.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(c80723580.condition) - e1:SetTarget(c80723580.target) - e1:SetOperation(c80723580.activate) - c:RegisterEffect(e1) -end -function c80723580.condition(e,tp,eg,ep,ev,re,r,rp) - return eg:GetCount()>=2 -end -function c80723580.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDestructable,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c80723580.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - if g:GetCount()>0 then - Duel.Destroy(g,REASON_EFFECT) - end -end diff --git a/script/c80727036.lua b/script/c80727036.lua deleted file mode 100644 index 9a19303104..0000000000 --- a/script/c80727036.lua +++ /dev/null @@ -1,6 +0,0 @@ ---黒き人食い鮫 -function c80727036.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcCode3(c,71746462,65623423,17968114,true,true) -end diff --git a/script/c80727721.lua b/script/c80727721.lua deleted file mode 100644 index 45eaf5f7d5..0000000000 --- a/script/c80727721.lua +++ /dev/null @@ -1,35 +0,0 @@ ---ジュラック・アウロ -function c80727721.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(80727721,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c80727721.spcost) - e1:SetTarget(c80727721.sptg) - e1:SetOperation(c80727721.spop) - c:RegisterEffect(e1) -end -function c80727721.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end -function c80727721.filter(c,e,tp) - return c:IsLevelBelow(4) and c:IsSetCard(0x22) and c:GetCode()~=80727721 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c80727721.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c80727721.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsExistingTarget(c80727721.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c80727721.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c80727721.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c80741828.lua b/script/c80741828.lua deleted file mode 100644 index 0b879b1b95..0000000000 --- a/script/c80741828.lua +++ /dev/null @@ -1,21 +0,0 @@ ---見習い魔女 -function c80741828.initial_effect(c) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetTarget(c80741828.tg1) - e1:SetValue(500) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetTarget(c80741828.tg2) - e2:SetValue(-400) - c:RegisterEffect(e2) -end -function c80741828.tg1(e,c) - return c:IsAttribute(ATTRIBUTE_DARK) -end -function c80741828.tg2(e,c) - return c:IsAttribute(ATTRIBUTE_LIGHT) -end diff --git a/script/c80744121.lua b/script/c80744121.lua deleted file mode 100644 index 8423accbba..0000000000 --- a/script/c80744121.lua +++ /dev/null @@ -1,46 +0,0 @@ ---D-HERO ドゥームガイ -function c80744121.initial_effect(c) - --reg - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetOperation(c80744121.regop) - c:RegisterEffect(e1) -end -function c80744121.regop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsReason(REASON_BATTLE) and c:IsLocation(LOCATION_GRAVE) then - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(80744121,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_GRAVE) - e1:SetCountLimit(1) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) - e1:SetCondition(c80744121.spcon) - e1:SetTarget(c80744121.sptg) - e1:SetOperation(c80744121.spop) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,1) - c:RegisterEffect(e1) - end -end -function c80744121.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c80744121.spfilter(c,e,tp) - return c:IsSetCard(0xc008) and c:GetCode()~=80744121 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c80744121.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c80744121.spfilter(chkc,e,tp) end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c80744121.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,g:GetCount(),0,0) -end -function c80744121.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c80764541.lua b/script/c80764541.lua deleted file mode 100644 index e30d72ca4b..0000000000 --- a/script/c80764541.lua +++ /dev/null @@ -1,48 +0,0 @@ ---No.44 白天馬スカイ・ペガサス -function c80764541.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,4,2) - c:EnableReviveLimit() - --destroy - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetDescription(aux.Stringid(80764541,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCost(c80764541.descost) - e1:SetTarget(c80764541.destg) - e1:SetOperation(c80764541.desop) - c:RegisterEffect(e1) -end -c80764541.xyz_number=44 -function c80764541.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c80764541.filter(c) - return c:IsFaceup() and c:IsDestructable() -end -function c80764541.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c80764541.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c80764541.filter,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c80764541.filter,tp,0,LOCATION_MZONE,1,1,nil) - if Duel.GetLP(1-tp)>1000 then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) - end -end -function c80764541.desop(e,tp,eg,ep,ev,re,r,rp) - if Duel.CheckLPCost(1-tp,1000) and Duel.SelectYesNo(1-tp,aux.Stringid(80764541,1)) then - Duel.PayLPCost(1-tp,1000) - if Duel.IsChainDisablable(0) then - Duel.NegateEffect(0) - return - end - end - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c80769747.lua b/script/c80769747.lua deleted file mode 100644 index 5c2b1e5350..0000000000 --- a/script/c80769747.lua +++ /dev/null @@ -1,87 +0,0 @@ ---C・スネーク -function c80769747.initial_effect(c) - --equip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(80769747,0)) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetTarget(c80769747.eqtg) - e1:SetOperation(c80769747.eqop) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(80769747,1)) - e2:SetCategory(CATEGORY_DECKDES) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_LEAVE_FIELD) - e2:SetCondition(c80769747.ddescon) - e2:SetTarget(c80769747.ddestg) - e2:SetOperation(c80769747.ddesop) - c:RegisterEffect(e2) -end -function c80769747.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsFaceup() end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c80769747.eqlimit(e,c) - return e:GetOwner()==c -end -function c80769747.eqop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and c:IsFaceup() then - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - Duel.Equip(tp,c,tc,true) - --Add Equip limit - local e1=Effect.CreateEffect(tc) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(c80769747.eqlimit) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(-800) - e2:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_EQUIP) - e3:SetCode(EFFECT_UPDATE_DEFENCE) - e3:SetValue(-800) - e3:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e3) - else - Duel.SendtoGrave(c,REASON_EFFECT) - end - end -end -function c80769747.ddescon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local ec=c:GetPreviousEquipTarget() - if c:IsReason(REASON_LOST_TARGET) and ec:IsReason(REASON_BATTLE) and ec:IsLocation(LOCATION_GRAVE) then - e:SetLabelObject(ec) - return true - else return false end -end -function c80769747.ddestg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local ec=e:GetLabelObject() - local desp=ec:GetPreviousControler() - local desc=ec:GetLevel() - Duel.SetTargetPlayer(desp) - Duel.SetTargetParam(desc) - Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,desp,desc) -end -function c80769747.ddesop(e,tp,eg,ep,ev,re,r,rp) - local dp,dc=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.DiscardDeck(dp,dc,REASON_EFFECT) -end diff --git a/script/c8078366.lua b/script/c8078366.lua deleted file mode 100644 index 7bb367335f..0000000000 --- a/script/c8078366.lua +++ /dev/null @@ -1,18 +0,0 @@ ---海皇の突撃兵 -function c8078366.initial_effect(c) - --ayk - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c8078366.atkcon) - e1:SetValue(800) - c:RegisterEffect(e1) -end -function c8078366.cfilter(c) - return c:IsFaceup() and c:IsRace(RACE_FISH+RACE_SEASERPENT+RACE_AQUA) -end -function c8078366.atkcon(e) - return Duel.IsExistingMatchingCard(c8078366.cfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,e:GetHandler()) -end diff --git a/script/c80802524.lua b/script/c80802524.lua deleted file mode 100644 index eede28452a..0000000000 --- a/script/c80802524.lua +++ /dev/null @@ -1,46 +0,0 @@ ---ゴーストリック・ブレイク -function c80802524.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCondition(c80802524.condition) - e1:SetTarget(c80802524.target) - e1:SetOperation(c80802524.activate) - c:RegisterEffect(e1) -end -function c80802524.condition(e,tp,eg,ep,ev,re,r,rp) - local tc=eg:GetFirst() - if rp~=tp and eg:GetCount()==1 and tc:IsReason(REASON_DESTROY) and tc:IsReason(REASON_BATTLE+REASON_EFFECT) - and tc:IsPreviousLocation(LOCATION_MZONE) and tc:GetPreviousControler()==tp and tc:IsSetCard(0x8d) then - e:SetLabel(tc:GetCode()) - return true - else return false end -end -function c80802524.filter(c,e,tp,code) - return c:IsSetCard(0x8d) and c:GetCode()~=code and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN) -end -function c80802524.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c80802524.filter(chkc,e,tp,e:GetLabel()) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>1 - and Duel.IsExistingTarget(c80802524.filter,tp,LOCATION_GRAVE,0,2,nil,e,tp,e:GetLabel()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c80802524.filter,tp,LOCATION_GRAVE,0,2,2,nil,e,tp,e:GetLabel()) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,2,0,0) -end -function c80802524.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local sg=g:Filter(Card.IsRelateToEffect,nil,e) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if sg:GetCount()==0 or ft<=0 then return end - if ft0 then - Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEDOWN_DEFENCE) - Duel.ConfirmCards(1-tp,sg) - end -end diff --git a/script/c80811661.lua b/script/c80811661.lua deleted file mode 100644 index 95a864e072..0000000000 --- a/script/c80811661.lua +++ /dev/null @@ -1,4 +0,0 @@ ---ハンバーガーのレシピ -function c80811661.initial_effect(c) - aux.AddRitualProcGreater(c,aux.FilterBoolFunction(Card.IsCode,30243636)) -end diff --git a/script/c80831721.lua b/script/c80831721.lua deleted file mode 100644 index 54c25e51bf..0000000000 --- a/script/c80831721.lua +++ /dev/null @@ -1,74 +0,0 @@ ---賢者の石-サバティエル -function c80831721.initial_effect(c) - --search - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c80831721.condition) - e1:SetCost(c80831721.cost) - e1:SetTarget(c80831721.target) - e1:SetOperation(c80831721.operation) - c:RegisterEffect(e1) - --atkup - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(80831721,0)) - e2:SetCategory(CATEGORY_ATKCHANGE) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_GRAVE) - e2:SetCost(c80831721.atkcost) - e2:SetTarget(c80831721.atktg) - e2:SetOperation(c80831721.atkop) - c:RegisterEffect(e2) -end -function c80831721.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_GRAVE,0,1,nil,0xa4) -end -function c80831721.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.PayLPCost(tp,math.floor(Duel.GetLP(tp)/2)) -end -function c80831721.filter(c) - return c:IsSetCard(0x46) and c:IsType(TYPE_SPELL) and c:IsAbleToHand() -end -function c80831721.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c80831721.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c80831721.operation(e,tp,eg,ep,ev,re,r,rp,chk) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c80831721.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end -function c80831721.rfilter(c) - return c:IsCode(80831721) and c:IsAbleToRemoveAsCost() -end -function c80831721.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c80831721.rfilter,tp,LOCATION_GRAVE,0,3,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c80831721.rfilter,tp,LOCATION_GRAVE,0,3,3,nil) - Duel.Remove(g,POS_FACEUP,REASON_EFFECT) -end -function c80831721.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) -end -function c80831721.atkop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsFaceup() then - local og=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - local mg,matk=og:GetMaxGroup(Card.GetAttack) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - e1:SetValue(matk) - tc:RegisterEffect(e1) - end -end \ No newline at end of file diff --git a/script/c80863132.lua b/script/c80863132.lua deleted file mode 100644 index 2c92ab1c78..0000000000 --- a/script/c80863132.lua +++ /dev/null @@ -1,25 +0,0 @@ ---無効 -function c80863132.initial_effect(c) - --change effect - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_CHAINING) - e1:SetCondition(c80863132.condition) - e1:SetOperation(c80863132.activate) - c:RegisterEffect(e1) -end -function c80863132.condition(e,tp,eg,ep,ev,re,r,rp) - if not re:IsHasProperty(EFFECT_FLAG_PLAYER_TARGET) then return false end - if Duel.GetOperationCount(ev)~=1 then return false end - local ex,cg,cc,cp,cv=Duel.GetOperationInfo(ev,CATEGORY_DRAW) - return ex and cv>0 -end -function c80863132.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.ChangeChainOperation(ev,c80863132.repop) -end -function c80863132.repop(e,tp,eg,ep,ev,re,r,rp) - local ex,cg,cc,cp,cv=Duel.GetOperationInfo(ev,CATEGORY_DRAW) - if cp<2 then - Duel.DiscardDeck(cp,cv,REASON_EFFECT) - end -end diff --git a/script/c80885284.lua b/script/c80885284.lua deleted file mode 100644 index d927ecc3ab..0000000000 --- a/script/c80885284.lua +++ /dev/null @@ -1,66 +0,0 @@ ---ゴーストリック・キョンシー -function c80885284.initial_effect(c) - --summon limit - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_SUMMON) - e1:SetCondition(c80885284.sumcon) - c:RegisterEffect(e1) - --turn set - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(80885284,0)) - e2:SetCategory(CATEGORY_POSITION) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetTarget(c80885284.postg) - e2:SetOperation(c80885284.posop) - c:RegisterEffect(e2) - --search - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(80885284,1)) - e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e3:SetCode(EVENT_FLIP) - e3:SetCountLimit(1,80885284) - e3:SetTarget(c80885284.thtg) - e3:SetOperation(c80885284.thop) - c:RegisterEffect(e3) -end -function c80885284.sfilter(c) - return c:IsFaceup() and c:IsSetCard(0x8d) -end -function c80885284.sumcon(e) - return not Duel.IsExistingMatchingCard(c80885284.sfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) -end -function c80885284.postg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsCanTurnSet() and c:GetFlagEffect(80885284)==0 end - c:RegisterFlagEffect(80885284,RESET_EVENT+0x1fc0000+RESET_PHASE+PHASE_END,0,1) - Duel.SetOperationInfo(0,CATEGORY_POSITION,c,1,0,0) -end -function c80885284.posop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - Duel.ChangePosition(c,POS_FACEDOWN_DEFENCE) - end -end -function c80885284.thfilter(c,lv) - return c:IsLevelBelow(lv) and c:IsSetCard(0x8d) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() -end -function c80885284.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local count=Duel.GetMatchingGroupCount(c80885284.sfilter,tp,LOCATION_MZONE,0,nil) - return Duel.IsExistingMatchingCard(c80885284.thfilter,tp,LOCATION_DECK,0,1,nil,count) - end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c80885284.thop(e,tp,eg,ep,ev,re,r,rp) - local count=Duel.GetMatchingGroupCount(c80885284.sfilter,tp,LOCATION_MZONE,0,nil) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c80885284.thfilter,tp,LOCATION_DECK,0,1,1,nil,count) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c80885324.lua b/script/c80885324.lua deleted file mode 100644 index 71281299a3..0000000000 --- a/script/c80885324.lua +++ /dev/null @@ -1,52 +0,0 @@ ---サーチ・ストライカー -function c80885324.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(80885324,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_BATTLE_START) - e1:SetCondition(c80885324.descon) - e1:SetTarget(c80885324.destg) - e1:SetOperation(c80885324.desop) - c:RegisterEffect(e1) - --to defence - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_PHASE+PHASE_BATTLE) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCondition(c80885324.poscon) - e2:SetOperation(c80885324.posop) - c:RegisterEffect(e2) -end -function c80885324.descon(e,tp,eg,ep,ev,re,r,rp) - local d=Duel.GetAttackTarget() - return e:GetHandler()==Duel.GetAttacker() and d and d:IsFacedown() and d:IsDefencePos() -end -function c80885324.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,Duel.GetAttackTarget(),1,0,0) -end -function c80885324.desop(e,tp,eg,ep,ev,re,r,rp) - local d=Duel.GetAttackTarget() - if d:IsRelateToBattle() then - Duel.Destroy(d,REASON_EFFECT) - e:GetHandler():RegisterFlagEffect(80885324,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) - end -end -function c80885324.poscon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetFlagEffect(80885324)~=0 -end -function c80885324.posop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsAttackPos() then - Duel.ChangePosition(c,POS_FACEUP_DEFENCE) - end - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_CHANGE_POSITION) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_COPY_INHERIT) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,3) - c:RegisterEffect(e1) -end diff --git a/script/c80887714.lua b/script/c80887714.lua deleted file mode 100644 index 9c6104e923..0000000000 --- a/script/c80887714.lua +++ /dev/null @@ -1,29 +0,0 @@ ---ギャラクシー・ストーム -function c80887714.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,0x1e0) - e1:SetTarget(c80887714.target) - e1:SetOperation(c80887714.activate) - c:RegisterEffect(e1) -end -function c80887714.filter(c) - return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:GetOverlayCount()==0 and c:IsDestructable() -end -function c80887714.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c80887714.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c80887714.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c80887714.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c80887714.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c80887952.lua b/script/c80887952.lua deleted file mode 100644 index 5ce6f95da7..0000000000 --- a/script/c80887952.lua +++ /dev/null @@ -1,75 +0,0 @@ ---ヘリオス・デュオ・メギストス -function c80887952.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c80887952.hspcon) - e1:SetOperation(c80887952.hspop) - c:RegisterEffect(e1) - --atk/def - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EFFECT_SET_ATTACK) - e2:SetValue(c80887952.value) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EFFECT_SET_DEFENCE) - c:RegisterEffect(e3) - --spsummon - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(80887952,0)) - e4:SetCategory(CATEGORY_SPECIAL_SUMMON) - e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e4:SetCode(EVENT_PHASE+PHASE_END) - e4:SetRange(LOCATION_GRAVE) - e4:SetCountLimit(1) - e4:SetCondition(c80887952.spcon) - e4:SetTarget(c80887952.sptg) - e4:SetOperation(c80887952.spop) - c:RegisterEffect(e4) -end -function c80887952.hspcon(e,c) - if c==nil then return true end - return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-1 - and Duel.CheckReleaseGroup(c:GetControler(),Card.IsCode,1,nil,54493213) -end -function c80887952.hspop(e,tp,eg,ep,ev,re,r,rp,c) - local g=Duel.SelectReleaseGroup(tp,Card.IsCode,1,1,nil,54493213) - Duel.Release(g,REASON_COST) -end -function c80887952.filter(c) - return c:IsFaceup() and c:IsType(TYPE_MONSTER) -end -function c80887952.value(e,c) - return Duel.GetMatchingGroupCount(c80887952.filter,c:GetControler(),LOCATION_REMOVED,LOCATION_REMOVED,nil)*200 -end -function c80887952.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsReason(REASON_BATTLE) and e:GetHandler():GetTurnID()==Duel.GetTurnCount() -end -function c80887952.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c80887952.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.SpecialSummonStep(c,0,tp,tp,false,false,POS_FACEUP) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(300) - e1:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_UPDATE_DEFENCE) - c:RegisterEffect(e2) - end - Duel.SpecialSummonComplete() -end diff --git a/script/c80889750.lua b/script/c80889750.lua deleted file mode 100644 index 8f6a854ee5..0000000000 --- a/script/c80889750.lua +++ /dev/null @@ -1,93 +0,0 @@ ---デストーイ・サーベル・タイガー -function c80889750.initial_effect(c) - --fusion material - c:EnableReviveLimit() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_FUSION_MATERIAL) - e1:SetCondition(c80889750.fscon) - e1:SetOperation(c80889750.fsop) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetCondition(c80889750.spcon) - e2:SetTarget(c80889750.sptg) - e2:SetOperation(c80889750.spop) - c:RegisterEffect(e2) - --atk - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetCode(EFFECT_UPDATE_ATTACK) - e3:SetRange(LOCATION_MZONE) - e3:SetTargetRange(LOCATION_MZONE,0) - e3:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0xad)) - e3:SetValue(400) - c:RegisterEffect(e3) - --indes - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e4:SetCode(EVENT_SPSUMMON_SUCCESS) - e4:SetCondition(c80889750.indcon) - e4:SetOperation(c80889750.indop) - c:RegisterEffect(e4) -end -function c80889750.mfilter1(c,mg) - return c:IsSetCard(0xad) and c:IsType(TYPE_FUSION) and mg:IsExists(c80889750.mfilter2,1,c) -end -function c80889750.mfilter2(c) - return c:IsSetCard(0xa9) or c:IsSetCard(0xc3) -end -function c80889750.fscon(e,mg,gc) - if mg==nil then return true end - if gc then return false end - return mg:IsExists(c80889750.mfilter1,1,nil,mg) -end -function c80889750.fsop(e,tp,eg,ep,ev,re,r,rp,gc) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL) - local g1=eg:FilterSelect(tp,c80889750.mfilter1,1,1,nil,eg) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL) - local g2=eg:FilterSelect(tp,c80889750.mfilter2,1,63,g1:GetFirst()) - g1:Merge(g2) - Duel.SetFusionMaterial(g1) -end -function c80889750.spcon(e,tp,eg,ep,ev,re,r,rp) - return bit.band(e:GetHandler():GetSummonType(),SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION -end -function c80889750.spfilter(c,e,tp) - return c:IsSetCard(0xad) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c80889750.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c80889750.spfilter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c80889750.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c80889750.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c80889750.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end -function c80889750.indcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return bit.band(c:GetSummonType(),SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION and c:GetMaterialCount()>=3 -end -function c80889750.indop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e1:SetValue(1) - e1:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - c:RegisterEffect(e2) -end diff --git a/script/c80908502.lua b/script/c80908502.lua deleted file mode 100644 index 4cc39b48dd..0000000000 --- a/script/c80908502.lua +++ /dev/null @@ -1,43 +0,0 @@ ---E・HERO キャプテン・ゴールド -function c80908502.initial_effect(c) - --search - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(80908502,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND) - e1:SetCost(c80908502.cost) - e1:SetTarget(c80908502.target) - e1:SetOperation(c80908502.operation) - c:RegisterEffect(e1) - --self destroy - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EFFECT_SELF_DESTROY) - e2:SetCondition(c80908502.descon) - c:RegisterEffect(e2) -end -function c80908502.cost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToGraveAsCost() and c:IsDiscardable() end - Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD) -end -function c80908502.filter(c) - return c:GetCode()==63035430 and c:IsAbleToHand() -end -function c80908502.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chk==0 then return Duel.IsExistingMatchingCard(c80908502.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c80908502.operation(e,tp,eg,ep,ev,re,r,rp,chk) - local tg=Duel.GetFirstMatchingCard(c80908502.filter,tp,LOCATION_DECK,0,nil) - if tg then - Duel.SendtoHand(tg,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tg) - end -end -function c80908502.descon(e) - return not Duel.IsEnvironment(63035430) -end diff --git a/script/c8091563.lua b/script/c8091563.lua deleted file mode 100644 index 6fa2a5fd80..0000000000 --- a/script/c8091563.lua +++ /dev/null @@ -1,57 +0,0 @@ ---SDロボ・ライオ -function c8091563.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(8091563,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c8091563.sumtg) - e1:SetOperation(c8091563.sumop) - c:RegisterEffect(e1) - --spsummon2 - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(8091563,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EVENT_TO_HAND) - e2:SetCountLimit(1) - e2:SetCondition(c8091563.spcon) - e2:SetTarget(c8091563.sptg) - e2:SetOperation(c8091563.spop) - c:RegisterEffect(e2) -end -function c8091563.filter(c,e,tp) - return (c:IsSetCard(0x85) or c:IsCode(71071546)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c8091563.sumtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c8091563.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c8091563.sumop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c8091563.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end -function c8091563.spcon(e,tp,eg,ep,ev,re,r,rp) - local tc=eg:GetFirst() - return eg:GetCount()==1 and (tc:IsSetCard(0x85) or tc:IsCode(71071546)) - and tc:IsControler(tp) and tc:GetPreviousControler()==tp and tc:IsPreviousLocation(LOCATION_GRAVE) -end -function c8091563.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and eg:GetFirst():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetTargetCard(eg) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,eg,1,0,0) -end -function c8091563.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c80921533.lua b/script/c80921533.lua deleted file mode 100644 index ea307f592a..0000000000 --- a/script/c80921533.lua +++ /dev/null @@ -1,79 +0,0 @@ ---死皇帝の陵墓 -function c80921533.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetValue(SUMMON_TYPE_NORMAL) - c:RegisterEffect(e1) - --summon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(80921533,0)) - e2:SetProperty(EFFECT_FLAG_BOTH_SIDE) - e2:SetCategory(CATEGORY_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_SZONE) - e2:SetTarget(c80921533.target) - e2:SetOperation(c80921533.operation) - e2:SetLabelObject(e1) - c:RegisterEffect(e2) -end -function c80921533.filter(c,se) - if not c:IsSummonableCard() then return false end - local mi,ma=c:GetTributeRequirement() - return mi>0 and (c:IsSummonable(false,se) or c:IsMSetable(false,se)) -end -function c80921533.get_targets(se,tp) - local g=Duel.GetMatchingGroup(c80921533.filter,tp,LOCATION_HAND,0,nil,se) - local minct=5 - local maxct=0 - local tc=g:GetFirst() - while tc do - local mi,ma=tc:GetTributeRequirement() - if mi>0 and mimaxct then maxct=ma end - tc=g:GetNext() - end - return minct,maxct -end -function c80921533.target(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - local se=e:GetLabelObject() - if chk==0 then - local mi,ma=c80921533.get_targets(se,tp) - if mi==5 then return false end - return Duel.CheckLPCost(tp,mi*1000) - end - local mi,ma=c80921533.get_targets(se,tp) - local ac=0 - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(80921533,3)) - if mi==ma then ac=Duel.AnnounceNumber(tp,mi*1000) - elseif ma>=2 and Duel.CheckLPCost(tp,2000) then ac=Duel.AnnounceNumber(tp,1000,2000) - else ac=Duel.AnnounceNumber(tp,1000) end - Duel.PayLPCost(tp,ac) - e:SetLabel(ac/1000) - Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,0,0) -end -function c80921533.sfilter(c,se,ct) - if not c:IsSummonableCard() then return false end - local mi,ma=c:GetTributeRequirement() - return (mi==ct or ma==ct) and (c:IsSummonable(false,se) or c:IsMSetable(false,se)) -end -function c80921533.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) then return end - local ct=e:GetLabel() - local se=e:GetLabelObject() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON) - local g=Duel.SelectMatchingCard(tp,c80921533.sfilter,tp,LOCATION_HAND,0,1,1,nil,se,ct) - local tc=g:GetFirst() - if tc then - local s1=tc:IsSummonable(false,se) - local s2=tc:IsMSetable(false,se) - if (s1 and s2 and Duel.SelectPosition(tp,tc,POS_FACEUP_ATTACK+POS_FACEDOWN_DEFENCE)==POS_FACEUP_ATTACK) or not s2 then - Duel.Summon(tp,tc,false,se) - else - Duel.MSet(tp,tc,false,se) - end - end -end diff --git a/script/c80925836.lua b/script/c80925836.lua deleted file mode 100644 index 29e4cb5d8a..0000000000 --- a/script/c80925836.lua +++ /dev/null @@ -1,63 +0,0 @@ ---コアキメイル・デビル -function c80925836.initial_effect(c) - --cost - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c80925836.mtcon) - e1:SetOperation(c80925836.mtop) - c:RegisterEffect(e1) - --disable - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EVENT_CHAIN_ACTIVATING) - e2:SetOperation(c80925836.disop) - c:RegisterEffect(e2) -end -function c80925836.mtcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c80925836.cfilter1(c) - return c:IsCode(36623431) and c:IsAbleToGraveAsCost() -end -function c80925836.cfilter2(c) - return c:IsType(TYPE_MONSTER) and c:IsRace(RACE_FIEND) and not c:IsPublic() -end -function c80925836.mtop(e,tp,eg,ep,ev,re,r,rp) - local g1=Duel.GetMatchingGroup(c80925836.cfilter1,tp,LOCATION_HAND,0,nil) - local g2=Duel.GetMatchingGroup(c80925836.cfilter2,tp,LOCATION_HAND,0,nil) - local select=2 - Duel.Hint(HINT_SELECTMSG,tp,0) - if g1:GetCount()>0 and g2:GetCount()>0 then - select=Duel.SelectOption(tp,aux.Stringid(80925836,0),aux.Stringid(80925836,1),aux.Stringid(80925836,2)) - elseif g1:GetCount()>0 then - select=Duel.SelectOption(tp,aux.Stringid(80925836,0),aux.Stringid(80925836,2)) - if select==1 then select=2 end - elseif g2:GetCount()>0 then - select=Duel.SelectOption(tp,aux.Stringid(80925836,1),aux.Stringid(80925836,2)) - select=select+1 - end - if select==0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=g1:Select(tp,1,1,nil) - Duel.SendtoGrave(g,REASON_COST) - elseif select==1 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) - local g=g2:Select(tp,1,1,nil) - Duel.ConfirmCards(1-tp,g) - Duel.ShuffleHand(tp) - else - Duel.Destroy(e:GetHandler(),REASON_RULE) - end -end -function c80925836.disop(e,tp,eg,ep,ev,re,r,rp) - local ph=Duel.GetCurrentPhase() - if (ph==PHASE_MAIN1 or ph==PHASE_MAIN2) and re:IsActiveType(TYPE_MONSTER) - and re:GetHandler():IsAttribute(ATTRIBUTE_DARK+ATTRIBUTE_LIGHT) then - Duel.NegateEffect(ev) - end -end diff --git a/script/c80955168.lua b/script/c80955168.lua deleted file mode 100644 index e707ccf488..0000000000 --- a/script/c80955168.lua +++ /dev/null @@ -1,31 +0,0 @@ ---王墓の罠 -function c80955168.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(c80955168.condition) - e1:SetTarget(c80955168.target) - e1:SetOperation(c80955168.activate) - c:RegisterEffect(e1) -end -function c80955168.cfilter(c,tp) - return c:IsFaceup() and c:IsPreviousLocation(LOCATION_GRAVE) and c:GetPreviousControler()==1-tp - and c:IsControler(tp) and c:IsRace(RACE_ZOMBIE) -end -function c80955168.condition(e,tp,eg,ep,ev,re,r,rp,chk) - return eg:IsExists(c80955168.cfilter,1,nil,tp) -end -function c80955168.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsDestructable() end - if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,2,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,2,2,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,2,0,0) -end -function c80955168.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) - Duel.Destroy(g,REASON_EFFECT) -end diff --git a/script/c80978111.lua b/script/c80978111.lua deleted file mode 100644 index 80823a4583..0000000000 --- a/script/c80978111.lua +++ /dev/null @@ -1,46 +0,0 @@ ---飛翔するG -function c80978111.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(80978111,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetRange(LOCATION_HAND) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetCondition(c80978111.condition) - e1:SetTarget(c80978111.target) - e1:SetOperation(c80978111.operation) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e2) - -- - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetRange(LOCATION_MZONE) - e3:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e3:SetTargetRange(1,0) - e3:SetTarget(c80978111.splimit) - c:RegisterEffect(e3) -end -function c80978111.cfilter(c,tp) - return c:GetSummonPlayer()==tp -end -function c80978111.condition(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c80978111.cfilter,1,nil,1-tp) -end -function c80978111.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(1-tp,LOCATION_MZONE,tp)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c80978111.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.GetLocationCount(1-tp,LOCATION_MZONE,tp)>0 then - Duel.SpecialSummon(c,0,tp,1-tp,false,false,POS_FACEUP_DEFENCE) - end -end -function c80978111.splimit(e,c,tp,sumtp,sumpos) - return bit.band(sumtp,SUMMON_TYPE_XYZ)==SUMMON_TYPE_XYZ -end diff --git a/script/c80987696.lua b/script/c80987696.lua deleted file mode 100644 index 3c0c815d23..0000000000 --- a/script/c80987696.lua +++ /dev/null @@ -1,25 +0,0 @@ ---時の機械-タイム・マシーン -function c80987696.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetTarget(c80987696.target) - e1:SetOperation(c80987696.activate) - c:RegisterEffect(e1) -end -function c80987696.target(e,tp,eg,ep,ev,re,r,rp,chk) - local tc=eg:GetFirst() - if chk==0 then return Duel.GetLocationCount(tc:GetPreviousControler(),LOCATION_MZONE)>0 and eg:GetCount()==1 - and tc:IsLocation(LOCATION_GRAVE) and tc:IsReason(REASON_BATTLE) - and tc:IsCanBeSpecialSummoned(e,0,tp,false,false,tc:GetPreviousPosition(),tc:GetPreviousControler()) end - tc:CreateEffectRelation(e) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,eg,1,0,0) -end -function c80987696.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=eg:GetFirst() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tc:GetPreviousControler(),false,false,tc:GetPreviousPosition()) - end -end diff --git a/script/c81000306.lua b/script/c81000306.lua deleted file mode 100644 index ed455de57b..0000000000 --- a/script/c81000306.lua +++ /dev/null @@ -1,53 +0,0 @@ ---渾身の一撃 -function c81000306.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c81000306.target) - e1:SetOperation(c81000306.activate) - c:RegisterEffect(e1) -end -function c81000306.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,nil) -end -function c81000306.activate(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e1:SetValue(1) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_AVOID_BATTLE_DAMAGE) - e2:SetValue(1) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_NO_BATTLE_DAMAGE) - e3:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e3) - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e4:SetCode(EVENT_BATTLED) - e4:SetOperation(c81000306.desop) - e4:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e4) - end -end -function c81000306.desop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetAttackTarget() - if c==Duel.GetAttacker() and tc and tc:IsRelateToBattle() then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c81003500.lua b/script/c81003500.lua deleted file mode 100644 index a23b85783e..0000000000 --- a/script/c81003500.lua +++ /dev/null @@ -1,50 +0,0 @@ ---E・HERO ネクロイド・シャーマン -function c81003500.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcCode2(c,86188410,89252153,true,true) - --spsummon condition - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(aux.fuslimit) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(81003500,0)) - e2:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetCondition(c81003500.condition) - e2:SetTarget(c81003500.target) - e2:SetOperation(c81003500.operation) - c:RegisterEffect(e2) -end -function c81003500.condition(e,tp,eg,ep,ev,re,r,rp) - return bit.band(e:GetHandler():GetSummonType(),SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION -end -function c81003500.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsDestructable() end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c81003500.spfilter(c,e,tp) - return c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,1-tp) and not c:IsHasEffect(EFFECT_NECRO_VALLEY) -end -function c81003500.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)~=0 then - Duel.BreakEffect() - if Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=Duel.SelectMatchingCard(tp,c81003500.spfilter,tp,0,LOCATION_GRAVE,1,1,nil,e,tp) - if sg:GetCount()>0 then - Duel.SpecialSummon(sg,0,tp,1-tp,false,false,POS_FACEUP) - end - end - end -end diff --git a/script/c81020140.lua b/script/c81020140.lua deleted file mode 100644 index a5b00ed04f..0000000000 --- a/script/c81020140.lua +++ /dev/null @@ -1,30 +0,0 @@ ---ヴォルカニック・リボルバー -function c81020140.initial_effect(c) - --search - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(81020140,0)) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetCondition(c81020140.condition) - e1:SetTarget(c81020140.target) - e1:SetOperation(c81020140.operation) - c:RegisterEffect(e1) -end -function c81020140.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) -end -function c81020140.filter(c) - return c:IsSetCard(0x32) and c:IsType(TYPE_MONSTER) -end -function c81020140.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c81020140.filter,tp,LOCATION_DECK,0,1,nil) end -end -function c81020140.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(81020140,1)) - local g=Duel.SelectMatchingCard(tp,c81020140.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.ShuffleDeck(tp) - Duel.MoveSequence(g:GetFirst(),0) - Duel.ConfirmDecktop(tp,1) - end -end diff --git a/script/c81020646.lua b/script/c81020646.lua deleted file mode 100644 index 16422385bd..0000000000 --- a/script/c81020646.lua +++ /dev/null @@ -1,36 +0,0 @@ ---煉獄龍 オーガ・ドラグーン -function c81020646.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_DARK),aux.NonTuner(nil),1) - c:EnableReviveLimit() - --negate - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(81020646,0)) - e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCode(EVENT_CHAINING) - e1:SetCondition(c81020646.discon) - e1:SetTarget(c81020646.distg) - e1:SetOperation(c81020646.disop) - c:RegisterEffect(e1) -end -function c81020646.discon(e,tp,eg,ep,ev,re,r,rp) - return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and ep~=tp - and re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev) and Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)==0 -end -function c81020646.distg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) - end -end -function c81020646.disop(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateActivation(ev) - if re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(eg,REASON_EFFECT) - end -end diff --git a/script/c8102334.lua b/script/c8102334.lua deleted file mode 100644 index 0e3a9ae638..0000000000 --- a/script/c8102334.lua +++ /dev/null @@ -1,47 +0,0 @@ ---ゲート・ブロッカー -function c8102334.initial_effect(c) - --disable - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_DISABLE) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(0,LOCATION_SZONE) - e1:SetTarget(c8102334.distg) - c:RegisterEffect(e1) - --disable effect - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_CHAIN_SOLVING) - e2:SetRange(LOCATION_MZONE) - e2:SetOperation(c8102334.disop) - c:RegisterEffect(e2) - --prevent counter - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetRange(LOCATION_MZONE) - e3:SetCode(EFFECT_CANNOT_PLACE_COUNTER) - e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e3:SetTargetRange(0,1) - c:RegisterEffect(e3) - --target - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_FIELD) - e4:SetRange(LOCATION_MZONE) - e4:SetTargetRange(0,0xff) - e4:SetCode(EFFECT_CANNOT_SELECT_EFFECT_TARGET) - e4:SetProperty(EFFECT_FLAG_SET_AVAILABLE) - e4:SetValue(c8102334.tglimit) - c:RegisterEffect(e4) -end -function c8102334.distg(e,c) - return c:IsType(TYPE_FIELD) -end -function c8102334.disop(e,tp,eg,ep,ev,re,r,rp) - local tl=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION) - if tl==LOCATION_SZONE and re:IsActiveType(TYPE_FIELD) and tp~=rp then - Duel.NegateEffect(ev) - end -end -function c8102334.tglimit(e,re,c) - return c~=e:GetHandler() and c:IsControler(e:GetHandlerPlayer()) and c:IsLocation(LOCATION_MZONE) -end diff --git a/script/c81028112.lua b/script/c81028112.lua deleted file mode 100644 index 9395307656..0000000000 --- a/script/c81028112.lua +++ /dev/null @@ -1,31 +0,0 @@ ---エレキック・ファイター -function c81028112.initial_effect(c) - --to deck - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(81028112,0)) - e1:SetCategory(CATEGORY_TODECK) - e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCountLimit(1,81028112) - e1:SetTarget(c81028112.target) - e1:SetOperation(c81028112.operation) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e2) -end -function c81028112.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(1-tp) and chkc:IsAbleToDeck() end - if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToDeck,tp,0,LOCATION_GRAVE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectTarget(tp,Card.IsAbleToDeck,tp,0,LOCATION_GRAVE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0) -end -function c81028112.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - local opt=Duel.SelectOption(tp,aux.Stringid(81028112,1),aux.Stringid(81028112,2)) - Duel.SendtoDeck(tc,nil,opt,REASON_EFFECT) - end -end diff --git a/script/c81035362.lua b/script/c81035362.lua deleted file mode 100644 index c2fe6d5ecf..0000000000 --- a/script/c81035362.lua +++ /dev/null @@ -1,43 +0,0 @@ ---魔サイの戦士 -function c81035362.initial_effect(c) - --indes - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetTarget(c81035362.indtg) - e1:SetValue(1) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - c:RegisterEffect(e2) - --to grave - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(81035362,0)) - e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_DELAY) - e3:SetCode(EVENT_TO_GRAVE) - e3:SetCountLimit(1,81035362) - e3:SetTarget(c81035362.tgtg) - e3:SetOperation(c81035362.tgop) - c:RegisterEffect(e3) -end -function c81035362.indtg(e,c) - return c:IsRace(RACE_FIEND) and not c:IsCode(81035362) -end -function c81035362.tgfilter(c) - return c:IsRace(RACE_FIEND) and not c:IsCode(81035362) and c:IsAbleToGrave() -end -function c81035362.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c81035362.tgfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) -end -function c81035362.tgop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c81035362.tgfilter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoGrave(g,REASON_EFFECT) - end -end diff --git a/script/c81059524.lua b/script/c81059524.lua deleted file mode 100644 index e194e1bb93..0000000000 --- a/script/c81059524.lua +++ /dev/null @@ -1,56 +0,0 @@ ---デス・ヴォルストガルフ -function c81059524.initial_effect(c) - --damage - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(81059524,0)) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_BATTLE_DESTROYING) - e1:SetCondition(c81059524.damcon) - e1:SetTarget(c81059524.damtg) - e1:SetOperation(c81059524.damop) - c:RegisterEffect(e1) - --atkup - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetCode(EVENT_CHAINING) - e2:SetRange(LOCATION_MZONE) - e2:SetOperation(aux.chainreg) - c:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e3:SetRange(LOCATION_MZONE) - e3:SetCode(EVENT_CHAIN_SOLVED) - e3:SetCondition(c81059524.atkcon) - e3:SetOperation(c81059524.atkop) - c:RegisterEffect(e3) -end -function c81059524.damcon(e,tp,eg,ep,ev,re,r,rp) - local bc=e:GetHandler():GetBattleTarget() - return bc:IsType(TYPE_MONSTER) and bc:IsLocation(LOCATION_GRAVE) and bc:IsReason(REASON_BATTLE) -end -function c81059524.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(500) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,500) -end -function c81059524.damop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end -function c81059524.atkcon(e,tp,eg,ep,ev,re,r,rp) - local tpe=re:GetActiveType() - return re:IsHasType(EFFECT_TYPE_ACTIVATE) and (tpe==TYPE_SPELL or tpe==TYPE_QUICKPLAY+TYPE_SPELL) and e:GetHandler():GetFlagEffect(1)>0 -end -function c81059524.atkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(200) - e1:SetReset(RESET_EVENT+0x1ff0000+RESET_PHASE+PHASE_END) - c:RegisterEffect(e1) -end diff --git a/script/c81066751.lua b/script/c81066751.lua deleted file mode 100644 index eac8ae5c86..0000000000 --- a/script/c81066751.lua +++ /dev/null @@ -1,33 +0,0 @@ ---神罰 -function c81066751.initial_effect(c) - --Activate(effect) - local e4=Effect.CreateEffect(c) - e4:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) - e4:SetType(EFFECT_TYPE_ACTIVATE) - e4:SetCode(EVENT_CHAINING) - e4:SetCondition(c81066751.condition) - e4:SetTarget(c81066751.target) - e4:SetOperation(c81066751.activate) - c:RegisterEffect(e4) -end -function c81066751.cfilter(c) - return c:IsFaceup() and c:IsCode(56433456) -end -function c81066751.condition(e,tp,eg,ep,ev,re,r,rp) - if not Duel.IsExistingMatchingCard(c81066751.cfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) then return false end - if not Duel.IsChainNegatable(ev) then return false end - return re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE) -end -function c81066751.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) - end -end -function c81066751.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateActivation(ev) - if re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(eg,REASON_EFFECT) - end -end diff --git a/script/c81105204.lua b/script/c81105204.lua deleted file mode 100644 index 4d97dce1df..0000000000 --- a/script/c81105204.lua +++ /dev/null @@ -1,32 +0,0 @@ ---BF-残夜のクリス -function c81105204.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(1,81105204) - e1:SetCondition(c81105204.spcon) - c:RegisterEffect(e1) - --indes - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EFFECT_INDESTRUCTABLE_COUNT) - e2:SetCountLimit(1) - e2:SetValue(c81105204.valcon) - c:RegisterEffect(e2) -end -function c81105204.filter(c) - return c:IsFaceup() and c:IsSetCard(0x33) and not c:IsCode(81105204) -end -function c81105204.spcon(e,c) - if c==nil then return true end - return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c81105204.filter,c:GetControler(),LOCATION_MZONE,0,1,nil) -end -function c81105204.valcon(e,re,r,rp) - return bit.band(r,REASON_EFFECT)~=0 and re:IsActiveType(TYPE_SPELL+TYPE_TRAP) -end diff --git a/script/c81122844.lua b/script/c81122844.lua deleted file mode 100644 index ad92d20fd8..0000000000 --- a/script/c81122844.lua +++ /dev/null @@ -1,72 +0,0 @@ ---発条空母ゼンマイティ -function c81122844.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,3,2) - c:EnableReviveLimit() - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetDescription(aux.Stringid(81122844,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c81122844.cost) - e1:SetTarget(c81122844.sptg) - e1:SetOperation(c81122844.spop) - c:RegisterEffect(e1) - --salvage - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_TOHAND) - e2:SetDescription(aux.Stringid(81122844,1)) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetRange(LOCATION_MZONE) - e2:SetCondition(c81122844.thcon) - e2:SetCost(c81122844.cost) - e2:SetTarget(c81122844.thtg) - e2:SetOperation(c81122844.thop) - c:RegisterEffect(e2) -end -function c81122844.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c81122844.spfilter(c,e,tp) - return c:IsSetCard(0x58) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c81122844.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c81122844.spfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_HAND) -end -function c81122844.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c81122844.spfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end -function c81122844.tgfilter(c,e,tp) - return c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP) and c:IsControler(tp) - and c:IsReason(REASON_DESTROY) and c:IsSetCard(0x58) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() and c:IsCanBeEffectTarget(e) -end -function c81122844.thcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c81122844.tgfilter,1,nil,e,tp) -end -function c81122844.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return eg:IsContains(chkc) and c81122844.tgfilter(chkc,e,tp) end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=eg:FilterSelect(tp,c81122844.tgfilter,1,1,nil,e,tp) - Duel.SetTargetCard(g) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c81122844.thop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end diff --git a/script/c81128478.lua b/script/c81128478.lua deleted file mode 100644 index faa971e148..0000000000 --- a/script/c81128478.lua +++ /dev/null @@ -1,36 +0,0 @@ ---ライヤー・ワイヤー -function c81128478.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,0x1c0) - e1:SetCost(c81128478.cost) - e1:SetTarget(c81128478.target) - e1:SetOperation(c81128478.activate) - c:RegisterEffect(e1) -end -function c81128478.cfilter(c) - return c:IsRace(RACE_INSECT) and c:IsAbleToRemoveAsCost() -end -function c81128478.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c81128478.cfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c81128478.cfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c81128478.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsDestructable() end - if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c81128478.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c81146288.lua b/script/c81146288.lua deleted file mode 100644 index cf4c004d29..0000000000 --- a/script/c81146288.lua +++ /dev/null @@ -1,69 +0,0 @@ ---大凛魔天使ローザリアン -function c81146288.initial_effect(c) - c:EnableReviveLimit() - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c81146288.spcon) - e1:SetOperation(c81146288.spop) - c:RegisterEffect(e1) - --negate - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(81146288,0)) - e2:SetCategory(CATEGORY_DISABLE) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetTarget(c81146288.distg) - e2:SetOperation(c81146288.disop) - c:RegisterEffect(e2) -end -function c81146288.spfilter(c) - return c:IsLevelAbove(7) and c:IsRace(RACE_PLANT) and c:IsAbleToRemoveAsCost() -end -function c81146288.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c81146288.spfilter,tp,LOCATION_HAND,0,1,c) - and Duel.IsExistingMatchingCard(c81146288.spfilter,tp,LOCATION_GRAVE,0,1,nil) -end -function c81146288.spop(e,tp,eg,ep,ev,re,r,rp,c) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g1=Duel.SelectMatchingCard(tp,c81146288.spfilter,tp,LOCATION_HAND,0,1,1,c) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g2=Duel.SelectMatchingCard(tp,c81146288.spfilter,tp,LOCATION_GRAVE,0,1,1,nil) - g1:Merge(g2) - Duel.Remove(g1,POS_FACEUP,REASON_COST) -end -function c81146288.distg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(aux.disfilter1,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end -end -function c81146288.disop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local g=Duel.GetMatchingGroup(aux.disfilter1,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,c) - local tc=g:GetFirst() - while tc do - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e2) - if tc:IsType(TYPE_TRAPMONSTER) then - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_DISABLE_TRAPMONSTER) - e3:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e3) - end - tc=g:GetNext() - end -end diff --git a/script/c81167171.lua b/script/c81167171.lua deleted file mode 100644 index f2a9fb7e98..0000000000 --- a/script/c81167171.lua +++ /dev/null @@ -1,73 +0,0 @@ ---ヒーロースピリッツ -function c81167171.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_END_PHASE) - e1:SetCondition(c81167171.condition) - e1:SetOperation(c81167171.activate) - c:RegisterEffect(e1) - if not c81167171.global_check then - c81167171.global_check=true - c81167171[0]=false - c81167171[1]=false - local ge1=Effect.CreateEffect(c) - ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - ge1:SetCode(EVENT_BATTLE_DESTROYED) - ge1:SetOperation(c81167171.checkop1) - Duel.RegisterEffect(ge1,0) - local ge2=Effect.CreateEffect(c) - ge2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - ge2:SetCode(EVENT_PHASE_START+PHASE_DRAW) - ge2:SetOperation(c81167171.clear) - Duel.RegisterEffect(ge2,0) - end -end -function c81167171.checkop1(e,tp,eg,ep,ev,re,r,rp) - local tc=eg:GetFirst() - while tc do - if tc:IsPreviousSetCard(0x3008) then - c81167171[tc:GetPreviousControler()]=true - end - tc=eg:GetNext() - end -end -function c81167171.clear(e,tp,eg,ep,ev,re,r,rp) - c81167171[0]=false - c81167171[1]=false -end -function c81167171.condition(e,tp,eg,ep,ev,re,r,rp) - return c81167171[tp] and Duel.GetCurrentPhase()==PHASE_BATTLE -end -function c81167171.activate(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_DAMAGE_CALCULATING) - e1:SetReset(RESET_PHASE+PHASE_DAMAGE_CAL) - e1:SetOperation(c81167171.batop) - Duel.RegisterEffect(e1,tp) -end -function c81167171.batop(e,tp,eg,ep,ev,re,r,rp) - local s=Duel.GetAttacker() - local o=Duel.GetAttackTarget() - if Duel.GetTurnPlayer()~=tp then - s=Duel.GetAttackTarget() - o=Duel.GetAttacker() - end - if not o then return end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_NO_BATTLE_DAMAGE) - e1:SetReset(RESET_PHASE+PHASE_DAMAGE_CAL) - o:RegisterEffect(e1) - if s then - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e2:SetReset(RESET_PHASE+PHASE_DAMAGE_CAL) - e2:SetValue(1) - s:RegisterEffect(e2) - end - e:Reset() -end diff --git a/script/c81171949.lua b/script/c81171949.lua deleted file mode 100644 index c48b50a797..0000000000 --- a/script/c81171949.lua +++ /dev/null @@ -1,47 +0,0 @@ ---ジャックポット7 -function c81171949.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TODECK) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetOperation(c81171949.activate) - c:RegisterEffect(e1) - --remove - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(81171949,0)) - e2:SetCategory(CATEGORY_REMOVE) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetCondition(c81171949.rmcon) - e2:SetTarget(c81171949.rmtg) - e2:SetOperation(c81171949.rmop) - c:RegisterEffect(e2) -end -function c81171949.activate(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - c:CancelToGrave() - Duel.SendtoDeck(c,nil,2,REASON_EFFECT) - end -end -function c81171949.rmcon(e,tp,eg,ep,ev,re,r,rp) - return rp~=tp and bit.band(r,REASON_EFFECT)~=0 and bit.band(r,REASON_RETURN)==0 -end -function c81171949.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_REMOVE,e:GetHandler(),1,0,0) -end -function c81171949.filter(c) - return c:IsCode(81171949) and c:GetFlagEffect(81171949)~=0 -end -function c81171949.rmop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.Remove(c,POS_FACEUP,REASON_EFFECT)~=0 then - c:RegisterFlagEffect(81171949,RESET_EVENT+0x1fe0000,0,0) - if Duel.IsExistingMatchingCard(c81171949.filter,tp,LOCATION_REMOVED,0,3,nil) then - local WIN_REASON_JACKPOT7=0x19 - Duel.Win(tp,WIN_REASON_JACKPOT7) - end - end -end diff --git a/script/c81172176.lua b/script/c81172176.lua deleted file mode 100644 index 73fd6b2e21..0000000000 --- a/script/c81172176.lua +++ /dev/null @@ -1,22 +0,0 @@ ---デビル・コメディアン -function c81172176.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_COIN+CATEGORY_REMOVE+CATEGORY_TOGRAVE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c81172176.target) - e1:SetOperation(c81172176.activate) - c:RegisterEffect(e1) -end -function c81172176.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,nil) - and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>=Duel.GetFieldGroupCount(tp,0,LOCATION_GRAVE) end - Duel.SetOperationInfo(0,CATEGORY_COIN,nil,0,tp,1) -end -function c81172176.activate(e,tp,eg,ep,ev,re,r,rp) - local coin=Duel.SelectOption(tp,60,61) - local res=Duel.TossCoin(tp,1) - if coin~=res then Duel.Remove(Duel.GetFieldGroup(tp,0,LOCATION_GRAVE),POS_FACEUP,REASON_EFFECT) - else Duel.DiscardDeck(tp,Duel.GetFieldGroupCount(tp,0,LOCATION_GRAVE),REASON_EFFECT) end -end diff --git a/script/c811734.lua b/script/c811734.lua deleted file mode 100644 index 75019c6708..0000000000 --- a/script/c811734.lua +++ /dev/null @@ -1,62 +0,0 @@ ---DDDの契約変更 -function c811734.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetCondition(c811734.condition) - e1:SetTarget(c811734.target) - e1:SetOperation(c811734.activate) - c:RegisterEffect(e1) -end -function c811734.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetAttacker():IsControler(1-tp) -end -function c811734.atkfilter(c) - return c:IsSetCard(0x10af) and c:GetAttack()>0 and c:IsAbleToRemove() -end -function c811734.thfilter(c) - return c:IsLevelBelow(4) and c:IsSetCard(0xaf) and c:IsType(TYPE_PENDULUM) and c:IsAbleToHand() -end -function c811734.target(e,tp,eg,ep,ev,re,r,rp,chk) - local b1=Duel.IsExistingMatchingCard(c811734.atkfilter,tp,LOCATION_GRAVE,0,1,nil) - local b2=Duel.IsExistingMatchingCard(c811734.thfilter,tp,LOCATION_DECK,0,1,nil) - if chk==0 then return b1 or b2 end - local op=0 - if b1 and b2 then - op=Duel.SelectOption(tp,aux.Stringid(811734,0),aux.Stringid(811734,1)) - elseif b1 then - op=Duel.SelectOption(tp,aux.Stringid(811734,0)) - else op=Duel.SelectOption(tp,aux.Stringid(811734,1))+1 end - e:SetLabel(op) - if op==0 then - e:SetCategory(CATEGORY_REMOVE) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_GRAVE) - else - e:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) - end -end -function c811734.activate(e,tp,eg,ep,ev,re,r,rp) - if e:GetLabel()==0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c811734.atkfilter,tp,LOCATION_GRAVE,0,1,1,nil) - local atk=g:GetFirst():GetAttack() - local tc=Duel.GetAttacker() - if Duel.Remove(g,POS_FACEUP,REASON_EFFECT)~=0 and tc:IsRelateToBattle() and tc:IsFaceup() then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(-atk) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - end - else - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c811734.thfilter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end - end -end diff --git a/script/c81191584.lua b/script/c81191584.lua deleted file mode 100644 index a0e477fdad..0000000000 --- a/script/c81191584.lua +++ /dev/null @@ -1,30 +0,0 @@ ---悪夢再び -function c81191584.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c81191584.target) - e1:SetOperation(c81191584.activate) - c:RegisterEffect(e1) -end -function c81191584.filter(c) - return c:GetDefence()==0 and c:IsAttribute(ATTRIBUTE_DARK) and c:IsAbleToHand() -end -function c81191584.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c81191584.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c81191584.filter,tp,LOCATION_GRAVE,0,2,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c81191584.filter,tp,LOCATION_GRAVE,0,2,2,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,2,0,0) -end -function c81191584.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local sg=g:Filter(Card.IsRelateToEffect,nil,e) - if sg:GetCount()>0 then - Duel.SendtoHand(sg,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,sg) - end -end diff --git a/script/c81197327.lua b/script/c81197327.lua deleted file mode 100644 index 9851430e5d..0000000000 --- a/script/c81197327.lua +++ /dev/null @@ -1,43 +0,0 @@ ---E・HERO スチーム・ヒーラー -function c81197327.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcCode2(c,58932615,79979666,true,true) - --spsummon condition - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(aux.fuslimit) - c:RegisterEffect(e1) - --recover - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(81197327,0)) - e2:SetCategory(CATEGORY_RECOVER) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetCode(EVENT_BATTLE_DESTROYING) - e2:SetCondition(c81197327.reccon) - e2:SetTarget(c81197327.rectg) - e2:SetOperation(c81197327.recop) - c:RegisterEffect(e2) -end -function c81197327.reccon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local bc=c:GetBattleTarget() - return c:IsRelateToBattle() and bc:IsLocation(LOCATION_GRAVE) and bc:IsType(TYPE_MONSTER) -end -function c81197327.rectg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local c=e:GetHandler() - local bc=c:GetBattleTarget() - local rec=bc:GetBaseAttack() - if rec<0 then rec=0 end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(rec) - Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,rec) -end -function c81197327.recop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Recover(p,d,REASON_EFFECT) -end diff --git a/script/c81210420.lua b/script/c81210420.lua deleted file mode 100644 index 64e5372ee9..0000000000 --- a/script/c81210420.lua +++ /dev/null @@ -1,103 +0,0 @@ ---マジカルシルクハット ---destroy is not fully implemented -function c81210420.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_POSITION+CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_BATTLE_START+TIMING_BATTLE_END) - e1:SetCondition(c81210420.condition) - e1:SetTarget(c81210420.target) - e1:SetOperation(c81210420.activate) - c:RegisterEffect(e1) -end -function c81210420.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp and Duel.GetCurrentPhase()==PHASE_BATTLE -end -function c81210420.filter(c) - return not c:IsType(TYPE_TOKEN) -end -function c81210420.spfilter(c,tp) - return c:IsType(TYPE_SPELL+TYPE_TRAP) and Duel.IsPlayerCanSpecialSummonMonster(tp,c:GetCode(),nil,0x11,0,0,0,0,0) -end -function c81210420.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c81210420.filter,tp,LOCATION_MZONE,0,1,nil) - and Duel.GetLocationCount(tp,LOCATION_MZONE)>1 - and Duel.IsExistingMatchingCard(c81210420.spfilter,tp,LOCATION_DECK,0,2,nil,tp) - end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_DECK) -end -function c81210420.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 then return end - local g=Duel.GetMatchingGroup(c81210420.spfilter,tp,LOCATION_DECK,0,nil,tp) - if g:GetCount()<2 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - local tc=Duel.SelectMatchingCard(tp,c81210420.filter,tp,LOCATION_MZONE,0,1,1,nil):GetFirst() - if not tc or tc:IsImmuneToEffect(e) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=g:Select(tp,2,2,nil) - if tc:IsFaceup() then - if tc:IsHasEffect(EFFECT_DEVINE_LIGHT) then Duel.ChangePosition(tc,POS_FACEUP_DEFENCE) - else - Duel.ChangePosition(tc,POS_FACEDOWN_DEFENCE) - tc:ClearEffectRelation() - end - end - local tg=sg:GetFirst() - local fid=e:GetHandler():GetFieldID() - while tg do - local e1=Effect.CreateEffect(tg) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CHANGE_TYPE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetValue(TYPE_NORMAL+TYPE_MONSTER) - e1:SetReset(RESET_EVENT+0x47c0000) - tg:RegisterEffect(e1,true) - local e2=e1:Clone() - e2:SetCode(EFFECT_REMOVE_RACE) - e2:SetValue(RACE_ALL) - tg:RegisterEffect(e2,true) - local e3=e1:Clone() - e3:SetCode(EFFECT_REMOVE_ATTRIBUTE) - e3:SetValue(0xff) - tg:RegisterEffect(e3,true) - local e4=e1:Clone() - e4:SetCode(EFFECT_SET_BASE_ATTACK) - e4:SetValue(0) - tg:RegisterEffect(e4,true) - local e5=e1:Clone() - e5:SetCode(EFFECT_SET_BASE_DEFENCE) - e5:SetValue(0) - tg:RegisterEffect(e5,true) - tg:RegisterFlagEffect(81210420,RESET_EVENT+0x47c0000+RESET_PHASE+PHASE_BATTLE,0,1,fid) - tg:SetStatus(STATUS_NO_LEVEL,true) - tg=sg:GetNext() - end - Duel.SpecialSummon(sg,0,tp,tp,true,false,POS_FACEDOWN_DEFENCE) - Duel.ConfirmCards(1-tp,sg) - sg:AddCard(tc) - Duel.ShuffleSetCard(sg) - sg:RemoveCard(tc) - sg:KeepAlive() - local de=Effect.CreateEffect(e:GetHandler()) - de:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - de:SetCode(EVENT_PHASE+PHASE_BATTLE) - de:SetReset(RESET_PHASE+PHASE_BATTLE) - de:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - de:SetCountLimit(1) - de:SetLabel(fid) - de:SetLabelObject(sg) - de:SetOperation(c81210420.desop) - Duel.RegisterEffect(de,tp) -end -function c81210420.desfilter(c,fid) - return c:GetFlagEffectLabel(81210420)==fid -end -function c81210420.desop(e,tp,eg,ep,ev,re,r,rp) - local g=e:GetLabelObject() - local fid=e:GetLabel() - local tg=g:Filter(c81210420.desfilter,nil,fid) - g:DeleteGroup() - Duel.Destroy(tg,REASON_EFFECT) -end diff --git a/script/c81218874.lua b/script/c81218874.lua deleted file mode 100644 index a07066c86c..0000000000 --- a/script/c81218874.lua +++ /dev/null @@ -1,35 +0,0 @@ ---侵略の波紋 -function c81218874.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_END_PHASE) - e1:SetCost(c81218874.cost) - e1:SetTarget(c81218874.target) - e1:SetOperation(c81218874.activate) - c:RegisterEffect(e1) -end -function c81218874.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,500) end - Duel.PayLPCost(tp,500) -end -function c81218874.filter(c,e,tp) - return c:IsLevelBelow(4) and c:IsSetCard(0x100a) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c81218874.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c81218874.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c81218874.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c81218874.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c81218874.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c81231742.lua b/script/c81231742.lua deleted file mode 100644 index e14d6cf10c..0000000000 --- a/script/c81231742.lua +++ /dev/null @@ -1,32 +0,0 @@ ---破邪の魔法壁 -function c81231742.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --atk - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(LOCATION_MZONE,0) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetCondition(c81231742.atkcon) - e2:SetValue(300) - c:RegisterEffect(e2) - --def - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetRange(LOCATION_SZONE) - e3:SetTargetRange(LOCATION_MZONE,0) - e3:SetCode(EFFECT_UPDATE_DEFENCE) - e3:SetCondition(c81231742.defcon) - e3:SetValue(300) - c:RegisterEffect(e3) -end -function c81231742.atkcon(e) - return Duel.GetTurnPlayer()==e:GetHandlerPlayer() -end -function c81231742.defcon(e) - return Duel.GetTurnPlayer()~=e:GetHandlerPlayer() -end diff --git a/script/c81254059.lua b/script/c81254059.lua deleted file mode 100644 index 3ea7811b97..0000000000 --- a/script/c81254059.lua +++ /dev/null @@ -1,64 +0,0 @@ ---ワーム・クィーン -function c81254059.initial_effect(c) - --summon with 1 tribute - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(81254059,0)) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SUMMON_PROC) - e1:SetCondition(c81254059.otcon) - e1:SetOperation(c81254059.otop) - e1:SetValue(SUMMON_TYPE_ADVANCE) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(81254059,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCost(c81254059.spcost) - e2:SetTarget(c81254059.sptg) - e2:SetOperation(c81254059.spop) - c:RegisterEffect(e2) -end -function c81254059.cfilter(c,tp) - return c:IsSetCard(0x3e) and c:IsRace(RACE_REPTILE) and (c:IsControler(tp) or c:IsFaceup()) -end -function c81254059.otcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - local mg=Duel.GetMatchingGroup(c81254059.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp) - return c:GetLevel()>6 and Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.GetTributeCount(c,mg)>0 -end -function c81254059.otop(e,tp,eg,ep,ev,re,r,rp,c) - local mg=Duel.GetMatchingGroup(c81254059.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp) - local sg=Duel.SelectTribute(tp,c,1,1,mg) - c:SetMaterial(sg) - Duel.Release(sg,REASON_SUMMON+REASON_MATERIAL) -end -function c81254059.costfilter(c,e,tp) - return c:IsSetCard(0x3e) and c:IsRace(RACE_REPTILE) - and Duel.IsExistingMatchingCard(c81254059.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp,c:GetLevel()) -end -function c81254059.spfilter(c,e,tp,lv) - return c:IsSetCard(0x3e) and c:IsRace(RACE_REPTILE) and c:GetLevel()<=lv - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c81254059.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,c81254059.costfilter,1,nil,e,tp) end - local sg=Duel.SelectReleaseGroup(tp,c81254059.costfilter,1,1,nil,e,tp) - e:SetLabel(sg:GetFirst():GetLevel()) - Duel.Release(sg,REASON_COST) -end -function c81254059.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c81254059.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c81254059.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,e:GetLabel()) - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) -end diff --git a/script/c81275020.lua b/script/c81275020.lua deleted file mode 100644 index 162d970ecd..0000000000 --- a/script/c81275020.lua +++ /dev/null @@ -1,45 +0,0 @@ ---SRベイゴマックス -function c81275020.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c81275020.spcon) - c:RegisterEffect(e1) - --search - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(81275020,0)) - e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_SUMMON_SUCCESS) - e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e2:SetCountLimit(1,81275020) - e2:SetTarget(c81275020.thtg) - e2:SetOperation(c81275020.thop) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e3) -end -function c81275020.spcon(e,c) - if c==nil then return true end - return Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0)==0 - and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 -end -function c81275020.thfilter(c) - return c:IsSetCard(0x2016) and not c:IsCode(81275020) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() -end -function c81275020.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c81275020.thfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c81275020.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c81275020.thfilter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c81275309.lua b/script/c81275309.lua deleted file mode 100644 index 0fe7978ef4..0000000000 --- a/script/c81275309.lua +++ /dev/null @@ -1,20 +0,0 @@ ---氷結界の虎将 ライホウ -function c81275309.initial_effect(c) - --summon,flip - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EVENT_CHAIN_SOLVING) - e1:SetOperation(c81275309.handes) - c:RegisterEffect(e1) -end -c81275309[0]=0 -function c81275309.handes(e,tp,eg,ep,ev,re,r,rp) - local loc,id=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION,CHAININFO_CHAIN_ID) - if ep==tp or loc~=LOCATION_MZONE or id==c81275309[0] or not re:IsActiveType(TYPE_MONSTER) then return end - c81275309[0]=id - if Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0 and Duel.SelectYesNo(1-tp,aux.Stringid(81275309,0)) then - Duel.DiscardHand(1-tp,aux.TRUE,1,1,REASON_EFFECT+REASON_DISCARD,nil) - Duel.BreakEffect() - else Duel.NegateEffect(ev) end -end diff --git a/script/c81278754.lua b/script/c81278754.lua deleted file mode 100644 index 83e79e4b64..0000000000 --- a/script/c81278754.lua +++ /dev/null @@ -1,49 +0,0 @@ ---裏ガエル -function c81278754.initial_effect(c) - --turn set - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(81278754,0)) - e1:SetCategory(CATEGORY_POSITION) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetTarget(c81278754.target) - e1:SetOperation(c81278754.operation) - c:RegisterEffect(e1) - --damage - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(81278754,1)) - e2:SetCategory(CATEGORY_TOHAND) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e2:SetCode(EVENT_FLIP) - e2:SetTarget(c81278754.rettg) - e2:SetOperation(c81278754.retop) - c:RegisterEffect(e2) -end -function c81278754.target(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsCanTurnSet() and c:GetFlagEffect(81278754)==0 end - c:RegisterFlagEffect(81278754,RESET_EVENT+0x1fc0000+RESET_PHASE+PHASE_END,0,1) - Duel.SetOperationInfo(0,CATEGORY_POSITION,c,1,0,0) -end -function c81278754.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - Duel.ChangePosition(c,POS_FACEDOWN_DEFENCE) - end -end -function c81278754.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x12) -end -function c81278754.rettg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c81278754.cfilter,tp,LOCATION_MZONE,0,1,nil) - and Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,0,LOCATION_MZONE,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,0) -end -function c81278754.retop(e,tp,eg,ep,ev,re,r,rp) - local ct=Duel.GetMatchingGroupCount(c81278754.cfilter,tp,LOCATION_MZONE,0,nil) - if ct==0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g=Duel.SelectMatchingCard(tp,Card.IsAbleToHand,tp,0,LOCATION_MZONE,1,ct,nil) - Duel.SendtoHand(g,nil,REASON_EFFECT) -end diff --git a/script/c81306586.lua b/script/c81306586.lua deleted file mode 100644 index 6beec07e8a..0000000000 --- a/script/c81306586.lua +++ /dev/null @@ -1,35 +0,0 @@ ---ペンギン・ナイトメア -function c81306586.initial_effect(c) - --return - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(81306586,0)) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_SINGLE) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetCode(EVENT_FLIP) - e1:SetTarget(c81306586.thtg) - e1:SetOperation(c81306586.thop) - c:RegisterEffect(e1) - --atkup - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetRange(LOCATION_MZONE) - e2:SetTargetRange(LOCATION_MZONE,0) - e2:SetTarget(aux.TargetBoolFunction(Card.IsAttribute,ATTRIBUTE_WATER)) - e2:SetValue(200) - c:RegisterEffect(e2) -end -function c81306586.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and chkc:IsAbleToHand() end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g=Duel.SelectTarget(tp,Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0) -end -function c81306586.thop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - end -end diff --git a/script/c8131171.lua b/script/c8131171.lua deleted file mode 100644 index 7620081281..0000000000 --- a/script/c8131171.lua +++ /dev/null @@ -1,46 +0,0 @@ ---キラー・スネーク -function c8131171.initial_effect(c) - --to hand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(8131171,0)) - e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_FIELD) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) - e1:SetRange(LOCATION_GRAVE) - e1:SetCountLimit(1,8131171) - e1:SetCondition(c8131171.condition) - e1:SetTarget(c8131171.target) - e1:SetOperation(c8131171.operation) - c:RegisterEffect(e1) -end -function c8131171.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c8131171.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToHand() end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0) -end -function c8131171.operation(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT) - end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetCountLimit(1) - e1:SetCondition(c8131171.rmcon) - e1:SetOperation(c8131171.rmop) - e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN) - Duel.RegisterEffect(e1,tp) -end -function c8131171.rmcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp -end -function c8131171.filter(c) - return c:IsCode(8131171) and c:IsAbleToRemove() -end -function c8131171.rmop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c8131171.filter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.Remove(g,POS_FACEUP,REASON_EFFECT) -end diff --git a/script/c81325903.lua b/script/c81325903.lua deleted file mode 100644 index 18561db8ae..0000000000 --- a/script/c81325903.lua +++ /dev/null @@ -1,45 +0,0 @@ ---アマゾネスの呪詛師 -function c81325903.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c81325903.target) - e1:SetOperation(c81325903.activate) - c:RegisterEffect(e1) -end -function c81325903.filter(c) - return c:IsFaceup() and c:IsSetCard(0x4) -end -function c81325903.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - if chk==0 then return Duel.IsExistingTarget(c81325903.filter,tp,LOCATION_MZONE,0,1,nil) - and Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c81325903.filter,tp,LOCATION_MZONE,0,1,1,nil) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil) -end -function c81325903.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local tc1=g:GetFirst() - local tc2=g:GetNext() - if tc1:IsFaceup() and tc2:IsFaceup() and tc1:IsRelateToEffect(e) and tc2:IsRelateToEffect(e) then - local atk1=tc1:GetBaseAttack() - local atk2=tc2:GetBaseAttack() - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_BASE_ATTACK) - e1:SetValue(atk2) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc1:RegisterEffect(e1) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_SET_BASE_ATTACK) - e2:SetValue(atk1) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc2:RegisterEffect(e2) - end -end diff --git a/script/c81330115.lua b/script/c81330115.lua deleted file mode 100644 index 33f60f39ff..0000000000 --- a/script/c81330115.lua +++ /dev/null @@ -1,52 +0,0 @@ ---No.30 破滅のアシッド・ゴーレム -function c81330115.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,3,2) - c:EnableReviveLimit() - --remove material - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(81330115,0)) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCondition(c81330115.rmcon) - e1:SetTarget(c81330115.rmtg) - e1:SetOperation(c81330115.rmop) - c:RegisterEffect(e1) - --cannot attack - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_CANNOT_ATTACK) - e2:SetCondition(c81330115.atcon) - c:RegisterEffect(e2) - --disable spsummon - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetRange(LOCATION_MZONE) - e3:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e3:SetTargetRange(1,0) - c:RegisterEffect(e3) -end -c81330115.xyz_number=30 -function c81330115.atcon(e) - return e:GetHandler():GetOverlayCount()==0 -end -function c81330115.rmcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c81330115.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - if e:GetHandler():GetOverlayCount()==0 then - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,tp,2000) - end -end -function c81330115.rmop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_EFFECT) and Duel.SelectYesNo(tp,aux.Stringid(81330115,1)) then - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_EFFECT) - else - Duel.Damage(tp,2000,REASON_EFFECT) - end -end diff --git a/script/c81332143.lua b/script/c81332143.lua deleted file mode 100644 index fbdf0bc7a7..0000000000 --- a/script/c81332143.lua +++ /dev/null @@ -1,29 +0,0 @@ ---友情 YU-JYO -function c81332143.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetOperation(c81332143.activate) - c:RegisterEffect(e1) -end -function c81332143.activate(e,tp,eg,ep,ev,re,r,rp) - local opt=0 - if Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_HAND,0,1,nil,14731897) and Duel.SelectYesNo(tp,aux.Stringid(81332143,2)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) - local g=Duel.SelectMatchingCard(tp,Card.IsCode,tp,LOCATION_HAND,0,1,1,nil,14731897) - Duel.ConfirmCards(1-tp,g) - Duel.ShuffleHand(tp) - opt=1 - end - if opt==0 then - opt=Duel.SelectOption(1-tp,aux.Stringid(81332143,0),aux.Stringid(81332143,1)) - else - opt=Duel.SelectOption(1-tp,aux.Stringid(81332143,0)) - end - if opt==0 then - local lp=(Duel.GetLP(tp)+Duel.GetLP(1-tp))/2 - Duel.SetLP(tp,lp) - Duel.SetLP(1-tp,lp) - end -end diff --git a/script/c81336148.lua b/script/c81336148.lua deleted file mode 100644 index 622da6dc19..0000000000 --- a/script/c81336148.lua +++ /dev/null @@ -1,35 +0,0 @@ ---ソード・マスター -function c81336148.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(81336148,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetRange(LOCATION_HAND) - e1:SetCode(EVENT_DAMAGE_STEP_END) - e1:SetCondition(c81336148.spcon) - e1:SetTarget(c81336148.sptg) - e1:SetOperation(c81336148.spop) - c:RegisterEffect(e1) - --pierce - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_PIERCE) - c:RegisterEffect(e2) -end -function c81336148.spcon(e,tp,eg,ep,ev,re,r,rp) - local a=Duel.GetAttacker() - local d=Duel.GetAttackTarget() - return d and Duel.GetTurnPlayer()==tp and a:IsRace(RACE_WARRIOR) and (d:IsRelateToBattle() or not d:IsReason(REASON_BATTLE)) -end -function c81336148.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c81336148.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c81354330.lua b/script/c81354330.lua deleted file mode 100644 index bfcbd15300..0000000000 --- a/script/c81354330.lua +++ /dev/null @@ -1,33 +0,0 @@ ---朱雀の召喚士 -function c81354330.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(81354330,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetCondition(c81354330.condition) - e1:SetTarget(c81354330.target) - e1:SetOperation(c81354330.operation) - c:RegisterEffect(e1) -end -function c81354330.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) - and Duel.GetAttacker():IsControler(1-tp) -end -function c81354330.filter(c,e,tp) - return c:IsAttackBelow(1500) and c:IsRace(RACE_WARRIOR) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c81354330.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c81354330.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c81354330.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c81354330.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_ATTACK) - end -end diff --git a/script/c81380218.lua b/script/c81380218.lua deleted file mode 100644 index ed6bc4b4cf..0000000000 --- a/script/c81380218.lua +++ /dev/null @@ -1,20 +0,0 @@ ---聖域の歌声 -function c81380218.initial_effect(c) - --activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --Def up - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e2:SetCode(EFFECT_UPDATE_DEFENCE) - e2:SetTarget(c81380218.filter) - e2:SetValue(500) - c:RegisterEffect(e2) -end -function c81380218.filter(e,c) - return c:IsDefencePos() -end diff --git a/script/c81383947.lua b/script/c81383947.lua deleted file mode 100644 index f17f606b8d..0000000000 --- a/script/c81383947.lua +++ /dev/null @@ -1,30 +0,0 @@ ---白魔導士ピケル -function c81383947.initial_effect(c) - --recover - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(81383947,0)) - e1:SetCategory(CATEGORY_RECOVER) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCondition(c81383947.condition) - e1:SetTarget(c81383947.target) - e1:SetOperation(c81383947.operation) - c:RegisterEffect(e1) -end -function c81383947.condition(e,tp,eg,ep,ev,re,r,rp) - return tp==Duel.GetTurnPlayer() -end -function c81383947.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local ct=Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0) - Duel.SetTargetPlayer(tp) - Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,ct*400) -end -function c81383947.operation(e,tp,eg,ep,ev,re,r,rp) - local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) - local ct=Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0) - Duel.Recover(p,ct*400,REASON_EFFECT) -end diff --git a/script/c81385346.lua b/script/c81385346.lua deleted file mode 100644 index eb49361199..0000000000 --- a/script/c81385346.lua +++ /dev/null @@ -1,37 +0,0 @@ ---スタンピング・クラッシュ -function c81385346.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c81385346.condition) - e1:SetTarget(c81385346.target) - e1:SetOperation(c81385346.activate) - c:RegisterEffect(e1) -end -function c81385346.filter1(c) - return c:IsFaceup() and c:IsRace(RACE_DRAGON) -end -function c81385346.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c81385346.filter1,tp,LOCATION_MZONE,0,1,nil) -end -function c81385346.filter2(c) - return c:IsDestructable() and c:IsType(TYPE_SPELL+TYPE_TRAP) -end -function c81385346.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and c81385346.filter2(chkc) and chkc~=e:GetHandler() end - if chk==0 then return Duel.IsExistingTarget(c81385346.filter2,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c81385346.filter2,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c81385346.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - local p=tc:GetControler() - if Duel.Destroy(tc,REASON_EFFECT)==0 then return end - Duel.Damage(p,500,REASON_EFFECT) - end -end diff --git a/script/c81426505.lua b/script/c81426505.lua deleted file mode 100644 index d847deeffb..0000000000 --- a/script/c81426505.lua +++ /dev/null @@ -1,56 +0,0 @@ ---六武式三段衝 -function c81426505.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c81426505.descon) - e1:SetTarget(c81426505.destg) - e1:SetOperation(c81426505.desop) - c:RegisterEffect(e1) -end -function c81426505.confilter(c) - return c:IsFaceup() and c:IsSetCard(0x3d) -end -function c81426505.descon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c81426505.confilter,tp,LOCATION_MZONE,0,3,nil) -end -function c81426505.filter1(c) - return c:IsFaceup() and c:IsDestructable() -end -function c81426505.filter2(c) - return c:IsFaceup() and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable() -end -function c81426505.filter3(c) - return c:IsFacedown() and c:IsDestructable() -end -function c81426505.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return - Duel.IsExistingMatchingCard(c81426505.filter1,tp,0,LOCATION_MZONE,1,nil) or - Duel.IsExistingMatchingCard(c81426505.filter2,tp,0,LOCATION_ONFIELD,1,nil) or - Duel.IsExistingMatchingCard(c81426505.filter3,tp,0,LOCATION_SZONE,1,nil) - end - local t={} - local p=1 - if Duel.IsExistingMatchingCard(c81426505.filter1,tp,0,LOCATION_MZONE,1,nil) then t[p]=aux.Stringid(81426505,0) p=p+1 end - if Duel.IsExistingMatchingCard(c81426505.filter2,tp,0,LOCATION_ONFIELD,1,nil) then t[p]=aux.Stringid(81426505,1) p=p+1 end - if Duel.IsExistingMatchingCard(c81426505.filter3,tp,0,LOCATION_SZONE,1,nil) then t[p]=aux.Stringid(81426505,2) p=p+1 end - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(81426505,3)) - local sel=Duel.SelectOption(tp,table.unpack(t))+1 - local opt=t[sel]-aux.Stringid(81426505,0) - local sg=nil - if opt==0 then sg=Duel.GetMatchingGroup(c81426505.filter1,tp,0,LOCATION_MZONE,nil) - elseif opt==1 then sg=Duel.GetMatchingGroup(c81426505.filter2,tp,0,LOCATION_ONFIELD,nil) - else sg=Duel.GetMatchingGroup(c81426505.filter3,tp,0,LOCATION_SZONE,nil) end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,sg:GetCount(),0,0) - e:SetLabel(opt) -end -function c81426505.desop(e,tp,eg,ep,ev,re,r,rp) - local opt=e:GetLabel() - local sg=nil - if opt==0 then sg=Duel.GetMatchingGroup(c81426505.filter1,tp,0,LOCATION_MZONE,nil) - elseif opt==1 then sg=Duel.GetMatchingGroup(c81426505.filter2,tp,0,LOCATION_ONFIELD,nil) - else sg=Duel.GetMatchingGroup(c81426505.filter3,tp,0,LOCATION_SZONE,nil) end - Duel.Destroy(sg,REASON_EFFECT) -end diff --git a/script/c81434470.lua b/script/c81434470.lua deleted file mode 100644 index 04db28d25a..0000000000 --- a/script/c81434470.lua +++ /dev/null @@ -1,38 +0,0 @@ ---サウザンド・アイズ・フィッシュ -function c81434470.initial_effect(c) - c:EnableReviveLimit() - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_SPSUMMON_PROC) - e2:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e2:SetRange(LOCATION_HAND) - e2:SetCondition(c81434470.spcon) - e2:SetOperation(c81434470.spop) - c:RegisterEffect(e2) - --public - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetCode(EFFECT_PUBLIC) - e3:SetRange(LOCATION_MZONE) - e3:SetTargetRange(0,LOCATION_HAND) - c:RegisterEffect(e3) -end -function c81434470.rfilter(c) - return c:IsCode(45045866) -end -function c81434470.spcon(e,c) - if c==nil then return true end - return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-1 - and Duel.CheckReleaseGroup(c:GetControler(),c81434470.rfilter,1,nil) -end -function c81434470.spop(e,tp,eg,ep,ev,re,r,rp,c) - local g=Duel.SelectReleaseGroup(c:GetControler(),c81434470.rfilter,1,1,nil) - Duel.Release(g,REASON_COST) -end diff --git a/script/c81439173.lua b/script/c81439173.lua deleted file mode 100644 index 57c080a006..0000000000 --- a/script/c81439173.lua +++ /dev/null @@ -1,25 +0,0 @@ ---おろかな埋葬 -function c81439173.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOGRAVE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c81439173.target) - e1:SetOperation(c81439173.activate) - c:RegisterEffect(e1) -end -function c81439173.tgfilter(c) - return c:IsType(TYPE_MONSTER) and c:IsAbleToGrave() -end -function c81439173.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c81439173.tgfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) -end -function c81439173.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c81439173.tgfilter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoGrave(g,REASON_EFFECT) - end -end diff --git a/script/c81443745.lua b/script/c81443745.lua deleted file mode 100644 index 7de4e6fd73..0000000000 --- a/script/c81443745.lua +++ /dev/null @@ -1,63 +0,0 @@ ---水遁封印式 -function c81443745.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_END_PHASE) - e1:SetTarget(c81443745.target1) - e1:SetOperation(c81443745.operation) - c:RegisterEffect(e1) - --remove - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(81443745,0)) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetRange(LOCATION_SZONE) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetHintTiming(0,TIMING_END_PHASE) - e2:SetCost(c81443745.cost2) - e2:SetTarget(c81443745.target2) - e2:SetOperation(c81443745.operation) - c:RegisterEffect(e2) -end -function c81443745.cfilter(c) - return c:IsAttribute(ATTRIBUTE_WATER) and c:IsAbleToGraveAsCost() -end -function c81443745.target1(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(1-tp) and chkc:IsAbleToRemove() end - if chk==0 then return true end - if Duel.IsExistingMatchingCard(c81443745.cfilter,tp,LOCATION_HAND,0,1,nil) - and Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(81443745,1)) then - e:SetProperty(EFFECT_FLAG_CARD_TARGET) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local cg=Duel.SelectMatchingCard(tp,c81443745.cfilter,tp,LOCATION_HAND,0,1,1,nil) - Duel.SendtoGrave(cg,REASON_COST) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) - e:GetHandler():RegisterFlagEffect(81443745,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) - else e:SetProperty(0) end -end -function c81443745.cost2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c81443745.cfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local cg=Duel.SelectMatchingCard(tp,c81443745.cfilter,tp,LOCATION_HAND,0,1,1,nil) - Duel.SendtoGrave(cg,REASON_COST) -end -function c81443745.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(1-tp) and chkc:IsAbleToRemove() end - if chk==0 then return e:GetHandler():GetFlagEffect(81443745)==0 - and Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) - e:GetHandler():RegisterFlagEffect(81443745,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) -end -function c81443745.operation(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) - end -end diff --git a/script/c81471108.lua b/script/c81471108.lua deleted file mode 100644 index 685085c38d..0000000000 --- a/script/c81471108.lua +++ /dev/null @@ -1,82 +0,0 @@ ---ZW-風神雲龍剣 -function c81471108.initial_effect(c) - c:SetUniqueOnField(1,0,81471108) - --equip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(81471108,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetRange(LOCATION_HAND+LOCATION_MZONE) - e1:SetCondition(c81471108.eqcon) - e1:SetTarget(c81471108.eqtg) - e1:SetOperation(c81471108.eqop) - c:RegisterEffect(e1) - --cannot be target - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_CANNOT_SELECT_EFFECT_TARGET) - e2:SetProperty(EFFECT_FLAG_SET_AVAILABLE) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(0,0xff) - e2:SetCondition(c81471108.tgcon) - e2:SetValue(c81471108.tglimit) - c:RegisterEffect(e2) - --destroy sub - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_EQUIP) - e3:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e3:SetCode(EFFECT_DESTROY_SUBSTITUTE) - e3:SetValue(c81471108.repval) - c:RegisterEffect(e3) -end -function c81471108.eqcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():CheckUniqueOnField(tp) -end -function c81471108.filter(c) - return c:IsFaceup() and c:IsSetCard(0x7f) -end -function c81471108.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c81471108.filter(chkc) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingTarget(c81471108.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c81471108.filter,tp,LOCATION_MZONE,0,1,1,nil) -end -function c81471108.eqop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) then return end - if c:IsLocation(LOCATION_MZONE) and c:IsFacedown() then return end - local tc=Duel.GetFirstTarget() - if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or tc:GetControler()~=tp or tc:IsFacedown() or not tc:IsRelateToEffect(e) or not c:CheckUniqueOnField(tp) then - Duel.SendtoGrave(c,REASON_EFFECT) - return - end - Duel.Equip(tp,c,tc,true) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(c81471108.eqlimit) - e1:SetLabelObject(tc) - c:RegisterEffect(e1) - --atkup - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(1300) - e2:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e2) -end -function c81471108.eqlimit(e,c) - return c==e:GetLabelObject() -end -function c81471108.tgcon(e) - return e:GetHandler():GetEquipTarget()~=nil -end -function c81471108.tglimit(e,re,c) - return c==e:GetHandler():GetEquipTarget() -end -function c81471108.repval(e,re,r,rp) - return bit.band(r,REASON_BATTLE)~=0 -end diff --git a/script/c81480460.lua b/script/c81480460.lua deleted file mode 100644 index 2eae68da9e..0000000000 --- a/script/c81480460.lua +++ /dev/null @@ -1,29 +0,0 @@ ---リボルバー・ドラゴン -function c81480460.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(81480460,0)) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_COIN) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetTarget(c81480460.destg) - e1:SetOperation(c81480460.desop) - c:RegisterEffect(e1) -end -function c81480460.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsDestructable() end - if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_COIN,nil,0,tp,3) -end -function c81480460.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - local c1,c2,c3=Duel.TossCoin(tp,3) - if c1+c2+c3<2 then return end - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c81489939.lua b/script/c81489939.lua deleted file mode 100644 index dd85eef20e..0000000000 --- a/script/c81489939.lua +++ /dev/null @@ -1,17 +0,0 @@ ---デビリアン・ソング -function c81489939.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,0x1c0) - c:RegisterEffect(e1) - --level - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_UPDATE_LEVEL) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(0,LOCATION_MZONE) - e2:SetValue(-1) - c:RegisterEffect(e2) -end diff --git a/script/c81510157.lua b/script/c81510157.lua deleted file mode 100644 index edac45cefb..0000000000 --- a/script/c81510157.lua +++ /dev/null @@ -1,30 +0,0 @@ ---ソウルテイカー -function c81510157.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_RECOVER) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c81510157.target) - e1:SetOperation(c81510157.activate) - c:RegisterEffect(e1) -end -function c81510157.filter(c) - return c:IsFaceup() and c:IsDestructable() -end -function c81510157.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and c81510157.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c81510157.filter,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c81510157.filter,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,1-tp,1000) -end -function c81510157.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)>0 then - Duel.BreakEffect() - Duel.Recover(1-tp,1000,REASON_EFFECT) - end -end diff --git a/script/c81524977.lua b/script/c81524977.lua deleted file mode 100644 index 3132a9d828..0000000000 --- a/script/c81524977.lua +++ /dev/null @@ -1,59 +0,0 @@ ---種子弾丸 -function c81524977.initial_effect(c) - c:SetCounterLimit(0x20,5) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --add counter - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetProperty(EFFECT_FLAG_DELAY) - e2:SetRange(LOCATION_SZONE) - e2:SetCode(EVENT_SUMMON_SUCCESS) - e2:SetCondition(c81524977.ctcon) - e2:SetOperation(c81524977.ctop) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - c:RegisterEffect(e3) - local e4=e2:Clone() - e4:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e4) - --damage - local e5=Effect.CreateEffect(c) - e5:SetDescription(aux.Stringid(81524977,0)) - e5:SetCategory(CATEGORY_DAMAGE) - e5:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e5:SetType(EFFECT_TYPE_IGNITION) - e5:SetRange(LOCATION_SZONE) - e5:SetCost(c81524977.damcost) - e5:SetTarget(c81524977.damtg) - e5:SetOperation(c81524977.damop) - c:RegisterEffect(e5) -end -function c81524977.ctfilter(c) - return c:IsFaceup() and c:IsRace(RACE_PLANT) -end -function c81524977.ctcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c81524977.ctfilter,1,nil) -end -function c81524977.ctop(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():AddCounter(0x20,1) -end -function c81524977.damcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - e:SetLabel(e:GetHandler():GetCounter(0x20)) - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end -function c81524977.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():GetCounter(0x20)>0 end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(e:GetLabel()*500) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,e:GetLabel()*500) -end -function c81524977.damop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c81566151.lua b/script/c81566151.lua deleted file mode 100644 index e9bd9f7a8e..0000000000 --- a/script/c81566151.lua +++ /dev/null @@ -1,108 +0,0 @@ ---E・HERO フレア・ネオス -function c81566151.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcCode2(c,89943723,89621922,false,false) - --spsummon condition - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(c81566151.splimit) - c:RegisterEffect(e1) - --special summon rule - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_SPSUMMON_PROC) - e2:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e2:SetRange(LOCATION_EXTRA) - e2:SetCondition(c81566151.spcon) - e2:SetOperation(c81566151.spop) - c:RegisterEffect(e2) - --return - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(81566151,0)) - e3:SetCategory(CATEGORY_TODECK) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e3:SetCode(EVENT_PHASE+PHASE_END) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1) - e3:SetCondition(c81566151.retcon1) - e3:SetTarget(c81566151.rettg) - e3:SetOperation(c81566151.retop) - c:RegisterEffect(e3) - local e4=e3:Clone() - e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e4:SetProperty(0) - e4:SetCondition(c81566151.retcon2) - c:RegisterEffect(e4) - --atkup - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_SINGLE) - e5:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e5:SetCode(EFFECT_UPDATE_ATTACK) - e5:SetRange(LOCATION_MZONE) - e5:SetValue(c81566151.atkval) - c:RegisterEffect(e5) -end -function c81566151.splimit(e,se,sp,st) - return not e:GetHandler():IsLocation(LOCATION_EXTRA) -end -function c81566151.spfilter(c,code) - return c:IsAbleToDeckOrExtraAsCost() and c:GetCode()==code -end -function c81566151.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ft<-1 then return false end - local g1=Duel.GetMatchingGroup(c81566151.spfilter,tp,LOCATION_ONFIELD,0,nil,89943723) - local g2=Duel.GetMatchingGroup(c81566151.spfilter,tp,LOCATION_ONFIELD,0,nil,89621922) - if g1:GetCount()==0 or g2:GetCount()==0 then return false end - if ft>0 then return true end - local f1=g1:FilterCount(Card.IsLocation,nil,LOCATION_MZONE) - local f2=g2:FilterCount(Card.IsLocation,nil,LOCATION_MZONE) - if ft==-1 then return f1>0 and f2>0 - else return f1>0 or f2>0 end -end -function c81566151.spop(e,tp,eg,ep,ev,re,r,rp,c) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - local g1=Duel.GetMatchingGroup(c81566151.spfilter,tp,LOCATION_ONFIELD,0,nil,89943723) - local g2=Duel.GetMatchingGroup(c81566151.spfilter,tp,LOCATION_ONFIELD,0,nil,89621922) - g1:Merge(g2) - local g=Group.CreateGroup() - local tc=nil - for i=1,2 do - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - if ft<=0 then - tc=g1:FilterSelect(tp,Card.IsLocation,1,1,nil,LOCATION_MZONE):GetFirst() - else - tc=g1:Select(tp,1,1,nil):GetFirst() - end - g:AddCard(tc) - g1:Remove(Card.IsCode,nil,tc:GetCode()) - ft=ft+1 - end - local cg=g:Filter(Card.IsFacedown,nil) - if cg:GetCount()>0 then - Duel.ConfirmCards(1-tp,cg) - end - Duel.SendtoDeck(g,nil,2,REASON_COST) -end -function c81566151.retcon1(e,tp,eg,ep,ev,re,r,rp,chk) - return not e:GetHandler():IsHasEffect(42015635) -end -function c81566151.retcon2(e,tp,eg,ep,ev,re,r,rp,chk) - return e:GetHandler():IsHasEffect(42015635) -end -function c81566151.rettg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToExtra() end - Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0) -end -function c81566151.retop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) or e:GetHandler():IsFacedown() then return end - Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_EFFECT) -end -function c81566151.atkval(e,c) - return Duel.GetMatchingGroupCount(Card.IsType,0,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,TYPE_SPELL+TYPE_TRAP)*400 -end diff --git a/script/c81571633.lua b/script/c81571633.lua deleted file mode 100644 index f9c1aa1e7c..0000000000 --- a/script/c81571633.lua +++ /dev/null @@ -1,113 +0,0 @@ ---DDプラウド・オーガ -function c81571633.initial_effect(c) - --pendulum summon - aux.AddPendulumProcedure(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --atk - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(81571633,0)) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_PZONE) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCountLimit(1) - e2:SetCost(c81571633.atkcost) - e2:SetTarget(c81571633.atktg) - e2:SetOperation(c81571633.atkop) - c:RegisterEffect(e2) - --scale - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e3:SetCode(EFFECT_CHANGE_LSCALE) - e3:SetRange(LOCATION_PZONE) - e3:SetCondition(c81571633.sccon) - e3:SetValue(5) - c:RegisterEffect(e3) - local e4=e3:Clone() - e4:SetCode(EFFECT_CHANGE_RSCALE) - c:RegisterEffect(e4) - --spsummon - local e5=Effect.CreateEffect(c) - e5:SetDescription(aux.Stringid(81571633,1)) - e5:SetCategory(CATEGORY_SPECIAL_SUMMON) - e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e5:SetCode(EVENT_SUMMON_SUCCESS) - e5:SetTarget(c81571633.sptg) - e5:SetOperation(c81571633.spop) - c:RegisterEffect(e5) -end -function c81571633.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,500) end - Duel.PayLPCost(tp,500) -end -function c81571633.atkfilter(c) - return c:IsFaceup() and c:IsSetCard(0xaf) -end -function c81571633.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c81571633.atkfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c81571633.atkfilter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c81571633.atkfilter,tp,LOCATION_MZONE,0,1,1,nil) -end -function c81571633.atkop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(500) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - end -end -function c81571633.sccon(e) - local seq=e:GetHandler():GetSequence() - local tc=Duel.GetFieldCard(e:GetHandlerPlayer(),LOCATION_SZONE,13-seq) - return not tc or not tc:IsSetCard(0xaf) -end -function c81571633.filter(c,e,tp) - return c:IsFaceup() and c:IsType(TYPE_PENDULUM) and c:IsAttribute(ATTRIBUTE_DARK) - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c81571633.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c81571633.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function c81571633.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local g=Duel.GetMatchingGroup(c81571633.filter,tp,LOCATION_EXTRA,0,nil,e,tp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and g:GetCount()>0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=g:Select(tp,1,1,nil) - local tc=sg:GetFirst() - Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e2) - Duel.SpecialSummonComplete() - end - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e3:SetTargetRange(1,0) - e3:SetTarget(c81571633.splimit) - e3:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e3,tp) -end -function c81571633.splimit(e,c) - return not c:IsSetCard(0xaf) -end diff --git a/script/c81587028.lua b/script/c81587028.lua deleted file mode 100644 index 13720bb272..0000000000 --- a/script/c81587028.lua +++ /dev/null @@ -1,96 +0,0 @@ ---おもちゃ箱 -function c81587028.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(81587028,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCountLimit(1,81587028) - e1:SetCondition(c81587028.spcon) - e1:SetTarget(c81587028.sptg) - e1:SetOperation(c81587028.spop) - c:RegisterEffect(e1) -end -function c81587028.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsReason(REASON_DESTROY) -end -function c81587028.filter1(c,e,tp) - return c:IsType(TYPE_NORMAL) and (c:GetAttack()==0 or c:GetDefence()==0) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c81587028.filter2(c,g) - return g:IsExists(c81587028.filter3,1,c,c:GetCode()) -end -function c81587028.filter3(c,code) - return c:GetCode()~=code -end -function c81587028.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 then return false end - local g=Duel.GetMatchingGroup(c81587028.filter1,tp,LOCATION_DECK,0,nil,e,tp) - return g:IsExists(c81587028.filter2,1,nil,g) - end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_DECK) -end -function c81587028.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 then return end - local g=Duel.GetMatchingGroup(c81587028.filter1,tp,LOCATION_DECK,0,nil,e,tp) - local dg=g:Filter(c81587028.filter2,nil,g) - if dg:GetCount()>=1 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=dg:Select(tp,1,1,nil) - local tc1=sg:GetFirst() - dg:Remove(Card.IsCode,nil,tc1:GetCode()) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local tc2=dg:Select(tp,1,1,nil):GetFirst() - Duel.SpecialSummonStep(tc1,0,tp,tp,false,false,POS_FACEUP_DEFENCE) - Duel.SpecialSummonStep(tc2,0,tp,tp,false,false,POS_FACEUP_DEFENCE) - tc1:RegisterFlagEffect(81587028,RESET_EVENT+0x1fe0000,0,1) - tc2:RegisterFlagEffect(81587028,RESET_EVENT+0x1fe0000,0,1) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL) - e1:SetValue(1) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc1:RegisterEffect(e1) - local e2=e1:Clone() - tc2:RegisterEffect(e2) - Duel.SpecialSummonComplete() - sg:AddCard(tc2) - sg:KeepAlive() - local de=Effect.CreateEffect(e:GetHandler()) - de:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - de:SetCode(EVENT_PHASE+PHASE_END) - de:SetCountLimit(1) - de:SetLabelObject(sg) - de:SetCondition(c81587028.descon) - de:SetOperation(c81587028.desop) - if Duel.GetTurnPlayer()==tp and Duel.GetCurrentPhase()==PHASE_END then - de:SetLabel(Duel.GetTurnCount()) - de:SetReset(RESET_PHASE+PHASE_END+RESET_SELF_TURN,2) - else - de:SetLabel(0) - de:SetReset(RESET_PHASE+PHASE_END+RESET_SELF_TURN) - end - Duel.RegisterEffect(de,tp) - end -end -function c81587028.descon(e,tp,eg,ep,ev,re,r,rp) - local g=e:GetLabelObject() - if not g:IsExists(c81587028.desfilter,1,nil) then - g:DeleteGroup() - e:Reset() - return false - end - return Duel.GetTurnPlayer()==tp and Duel.GetTurnCount()~=e:GetLabel() -end -function c81587028.desfilter(c) - return c:GetFlagEffect(81587028)>0 -end -function c81587028.desop(e,tp,eg,ep,ev,re,r,rp) - local g=e:GetLabelObject() - local tg=g:Filter(c81587028.desfilter,nil) - g:DeleteGroup() - Duel.Destroy(tg,REASON_EFFECT) -end diff --git a/script/c81601517.lua b/script/c81601517.lua deleted file mode 100644 index 2fa007202e..0000000000 --- a/script/c81601517.lua +++ /dev/null @@ -1,39 +0,0 @@ ---ヴィクティム・カウンター -function c81601517.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_CHAINING) - e1:SetCondition(c81601517.condition) - e1:SetTarget(c81601517.target) - e1:SetOperation(c81601517.activate) - c:RegisterEffect(e1) -end -function c81601517.condition(e,tp,eg,ep,ev,re,r,rp) - return rp~=tp and re:IsActiveType(TYPE_SPELL) and re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev) -end -function c81601517.filter(c) - return c:IsFaceup() and c:IsType(TYPE_DUAL) and c:IsCanTurnSet() -end -function c81601517.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c81601517.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c81601517.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c81601517.filter,tp,LOCATION_MZONE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) - end -end -function c81601517.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) and Duel.ChangePosition(tc,POS_FACEDOWN_DEFENCE)~=0 then - Duel.BreakEffect() - Duel.NegateActivation(ev) - if re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(eg,REASON_EFFECT) - end - end -end diff --git a/script/c81661951.lua b/script/c81661951.lua deleted file mode 100644 index f64a0e4861..0000000000 --- a/script/c81661951.lua +++ /dev/null @@ -1,31 +0,0 @@ ---ドラグニティ-ミリトゥム -function c81661951.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(81661951,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_MZONE) - e1:SetTarget(c81661951.sptg) - e1:SetOperation(c81661951.spop) - c:RegisterEffect(e1) -end -function c81661951.filter(c,e,tp) - return c:IsFaceup() and c:IsSetCard(0x29) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c81661951.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_SZONE) and c81661951.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c81661951.filter,tp,LOCATION_SZONE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c81661951.filter,tp,LOCATION_SZONE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,g:GetCount(),0,0) -end -function c81661951.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c81665333.lua b/script/c81665333.lua deleted file mode 100644 index 72d0f4aa70..0000000000 --- a/script/c81665333.lua +++ /dev/null @@ -1,20 +0,0 @@ ---撤収命令 -function c81665333.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c81665333.target) - e1:SetOperation(c81665333.activate) - c:RegisterEffect(e1) -end -function c81665333.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,LOCATION_MZONE,0,1,nil) end - local sg=Duel.GetMatchingGroup(Card.IsAbleToHand,tp,LOCATION_MZONE,0,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,sg,sg:GetCount(),0,0) -end -function c81665333.activate(e,tp,eg,ep,ev,re,r,rp) - local sg=Duel.GetMatchingGroup(Card.IsAbleToHand,tp,LOCATION_MZONE,0,nil) - Duel.SendtoHand(sg,nil,REASON_EFFECT) -end diff --git a/script/c81674782.lua b/script/c81674782.lua deleted file mode 100644 index b42a5e88ec..0000000000 --- a/script/c81674782.lua +++ /dev/null @@ -1,33 +0,0 @@ ---次元の裂け目 -function c81674782.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --remove - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_RANGE) - e2:SetCode(EFFECT_TO_GRAVE_REDIRECT) - e2:SetRange(LOCATION_SZONE) - e2:SetTarget(c81674782.rmtarget) - e2:SetTargetRange(0xff,0xff) - e2:SetValue(LOCATION_REMOVED) - c:RegisterEffect(e2) - -- - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetCode(81674782) - e3:SetRange(LOCATION_SZONE) - e3:SetProperty(EFFECT_FLAG_SET_AVAILABLE) - e3:SetTargetRange(0xff,0xff) - e3:SetTarget(c81674782.checktg) - c:RegisterEffect(e3) -end -function c81674782.rmtarget(e,c) - return not c:IsLocation(0x80) and not c:IsType(TYPE_SPELL+TYPE_TRAP) -end -function c81674782.checktg(e,c) - return not c:IsPublic() -end diff --git a/script/c8175346.lua b/script/c8175346.lua deleted file mode 100644 index a148d31242..0000000000 --- a/script/c8175346.lua +++ /dev/null @@ -1,26 +0,0 @@ ---ポケ・ドラ -function c8175346.initial_effect(c) - --search - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(8175346,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c8175346.target) - e1:SetOperation(c8175346.operation) - c:RegisterEffect(e1) -end -function c8175346.filter(c) - return c:IsCode(8175346) and c:IsAbleToHand() -end -function c8175346.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c8175346.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c8175346.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstMatchingCard(c8175346.filter,tp,LOCATION_DECK,0,nil) - if tc then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end diff --git a/script/c81755371.lua b/script/c81755371.lua deleted file mode 100644 index d67c888d7b..0000000000 --- a/script/c81755371.lua +++ /dev/null @@ -1,12 +0,0 @@ ---ダークフレーム -function c81755371.initial_effect(c) - --double tribute - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DOUBLE_TRIBUTE) - e1:SetValue(c81755371.condition) - c:RegisterEffect(e1) -end -function c81755371.condition(e,c) - return c:IsAttribute(ATTRIBUTE_DARK) and c:IsType(TYPE_NORMAL) -end diff --git a/script/c81756897.lua b/script/c81756897.lua deleted file mode 100644 index 983ec861f2..0000000000 --- a/script/c81756897.lua +++ /dev/null @@ -1,4 +0,0 @@ ---ゼラの儀式 -function c81756897.initial_effect(c) - aux.AddRitualProcGreater(c,aux.FilterBoolFunction(Card.IsCode,69123138)) -end diff --git a/script/c81759748.lua b/script/c81759748.lua deleted file mode 100644 index db6b6070d0..0000000000 --- a/script/c81759748.lua +++ /dev/null @@ -1,36 +0,0 @@ ---ダーク・スパイダー -function c81759748.initial_effect(c) - --lv up - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(81759748,0)) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetTarget(c81759748.target) - e1:SetOperation(c81759748.operation) - c:RegisterEffect(e1) -end -function c81759748.filter(c) - return c:IsFaceup() and c:IsRace(RACE_INSECT) and c:IsLevelAbove(1) -end -function c81759748.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c81759748.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c81759748.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - local g=Duel.SelectTarget(tp,c81759748.filter,tp,LOCATION_MZONE,0,1,1,nil) -end -function c81759748.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_LEVEL) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e1:SetValue(2) - tc:RegisterEffect(e1) - end -end diff --git a/script/c81777047.lua b/script/c81777047.lua deleted file mode 100644 index b0543cd2b4..0000000000 --- a/script/c81777047.lua +++ /dev/null @@ -1,29 +0,0 @@ ---シャインスパーク -function c81777047.initial_effect(c) - --activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --Atk up - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetTarget(c81777047.filter) - e2:SetValue(500) - c:RegisterEffect(e2) - --Def down - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetRange(LOCATION_SZONE) - e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e3:SetCode(EFFECT_UPDATE_DEFENCE) - e3:SetTarget(c81777047.filter) - e3:SetValue(-400) - c:RegisterEffect(e3) -end -function c81777047.filter(e,c) - return c:IsAttribute(ATTRIBUTE_LIGHT) -end \ No newline at end of file diff --git a/script/c81788994.lua b/script/c81788994.lua deleted file mode 100644 index d6c8cdca78..0000000000 --- a/script/c81788994.lua +++ /dev/null @@ -1,50 +0,0 @@ ---影牢の呪縛 -function c81788994.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --counter - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e2:SetRange(LOCATION_SZONE) - e2:SetCondition(c81788994.ctcon) - e2:SetOperation(c81788994.ctop) - c:RegisterEffect(e2) - --atkdown - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetCode(EFFECT_UPDATE_ATTACK) - e3:SetRange(LOCATION_SZONE) - e3:SetTargetRange(0,LOCATION_MZONE) - e3:SetCondition(c81788994.atkcon) - e3:SetValue(c81788994.atkval) - c:RegisterEffect(e3) - -- - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(81788994,0)) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e4:SetRange(LOCATION_SZONE) - e4:SetCode(81788994) - c:RegisterEffect(e4) -end -function c81788994.cfilter(c) - return c:IsSetCard(0x9d) and c:IsType(TYPE_MONSTER) and c:IsReason(REASON_EFFECT) -end -function c81788994.ctcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c81788994.cfilter,1,nil) -end -function c81788994.ctop(e,tp,eg,ep,ev,re,r,rp) - local ct=eg:FilterCount(c81788994.cfilter,nil) - e:GetHandler():AddCounter(0x16,ct) -end -function c81788994.atkcon(e) - return Duel.GetTurnPlayer()~=e:GetHandlerPlayer() -end -function c81788994.atkval(e,c) - return e:GetHandler():GetCounter(0x16)*-100 -end diff --git a/script/c81791932.lua b/script/c81791932.lua deleted file mode 100644 index 41931e6643..0000000000 --- a/script/c81791932.lua +++ /dev/null @@ -1,36 +0,0 @@ ---スネーク・ホイッスル -function c81791932.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_DESTROYED) - e1:SetCondition(c81791932.condition) - e1:SetTarget(c81791932.target) - e1:SetOperation(c81791932.activate) - c:RegisterEffect(e1) -end -function c81791932.cfilter(c,tp) - return c:IsRace(RACE_REPTILE) and c:GetPreviousControler()==tp - and c:IsPreviousLocation(LOCATION_ONFIELD) -end -function c81791932.condition(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c81791932.cfilter,1,nil,tp) -end -function c81791932.filter(c,e,tp) - return c:IsLevelBelow(4) and c:IsRace(RACE_REPTILE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c81791932.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c81791932.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c81791932.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c81791932.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - local tc=g:GetFirst() - if tc then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c81810441.lua b/script/c81810441.lua deleted file mode 100644 index 60b07bddb5..0000000000 --- a/script/c81810441.lua +++ /dev/null @@ -1,70 +0,0 @@ ---星輝士の因子 -function c81810441.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c81810441.target) - e1:SetOperation(c81810441.operation) - c:RegisterEffect(e1) - --equip limit - local e2=Effect.CreateEffect(c) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_EQUIP_LIMIT) - e2:SetValue(c81810441.eqlimit) - c:RegisterEffect(e2) - --atk/def - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_EQUIP) - e3:SetCode(EFFECT_UPDATE_ATTACK) - e3:SetValue(500) - c:RegisterEffect(e3) - local e4=e3:Clone() - e4:SetCode(EFFECT_UPDATE_DEFENCE) - c:RegisterEffect(e4) - --immune - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_EQUIP) - e5:SetCode(EFFECT_IMMUNE_EFFECT) - e5:SetValue(c81810441.efilter) - c:RegisterEffect(e5) - --selfdes - local e6=Effect.CreateEffect(c) - e6:SetType(EFFECT_TYPE_SINGLE) - e6:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e6:SetCode(EFFECT_SELF_DESTROY) - e6:SetRange(LOCATION_SZONE) - e6:SetCondition(c81810441.descon) - c:RegisterEffect(e6) -end -function c81810441.filter(c) - return c:IsFaceup() and c:IsSetCard(0x9c) -end -function c81810441.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c81810441.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c81810441.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c81810441.filter,tp,LOCATION_MZONE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c81810441.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,e:GetHandler(),tc) - end -end -function c81810441.eqlimit(e,c) - return c:IsSetCard(0x9c) -end -function c81810441.efilter(e,re) - return e:GetHandlerPlayer()~=re:GetOwnerPlayer() -end -function c81810441.cfilter(c) - return c:IsFaceup() and not c:IsSetCard(0x9c) -end -function c81810441.descon(e) - return Duel.IsExistingMatchingCard(c81810441.cfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) -end diff --git a/script/c81816475.lua b/script/c81816475.lua deleted file mode 100644 index 6904c33867..0000000000 --- a/script/c81816475.lua +++ /dev/null @@ -1,35 +0,0 @@ ---オーバーレイ・イーター -function c81816475.initial_effect(c) - -- - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(81816475,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_GRAVE) - e1:SetCost(c81816475.cost) - e1:SetTarget(c81816475.target) - e1:SetOperation(c81816475.operation) - c:RegisterEffect(e1) -end -function c81816475.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) -end -function c81816475.filter(c) - return c:IsFaceup() and c:IsType(TYPE_XYZ) -end -function c81816475.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetOverlayCount(tp,0,1)~=0 - and Duel.IsExistingMatchingCard(c81816475.filter,tp,LOCATION_MZONE,0,1,nil) end -end -function c81816475.operation(e,tp,eg,ep,ev,re,r,rp) - local g1=Duel.GetOverlayGroup(tp,0,1) - local g2=Duel.GetMatchingGroup(c81816475.filter,tp,LOCATION_MZONE,0,nil) - if g1:GetCount()==0 or g2:GetCount()==0 then return end - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(81816475,2)) - local mg=g1:Select(tp,1,1,nil) - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(81816475,1)) - local tc=g2:Select(tp,1,1,nil):GetFirst() - local oc=mg:GetFirst():GetOverlayTarget() - Duel.Overlay(tc,mg) - Duel.RaiseSingleEvent(oc,EVENT_DETACH_MATERIAL,e,0,0,0,0) -end diff --git a/script/c81820689.lua b/script/c81820689.lua deleted file mode 100644 index 6ae1030e81..0000000000 --- a/script/c81820689.lua +++ /dev/null @@ -1,24 +0,0 @@ ---未熟な密偵 -function c81820689.initial_effect(c) - --confirm - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c81820689.cftg) - e1:SetOperation(c81820689.cfop) - c:RegisterEffect(e1) -end -function c81820689.cftg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0 end - Duel.SetTargetPlayer(tp) -end -function c81820689.cfop(e,tp,eg,ep,ev,re,r,rp) - local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) - Duel.Hint(HINT_SELECTMSG,p,HINTMSG_CONFIRM) - local g=Duel.SelectMatchingCard(p,nil,p,0,LOCATION_HAND,1,1,nil) - if g:GetCount()>0 then - Duel.ConfirmCards(p,g) - Duel.ShuffleHand(1-p) - end -end diff --git a/script/c81843628.lua b/script/c81843628.lua deleted file mode 100644 index ca20b39366..0000000000 --- a/script/c81843628.lua +++ /dev/null @@ -1,18 +0,0 @@ ---ニードルワーム -function c81843628.initial_effect(c) - --flip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(81843628,0)) - e1:SetCategory(CATEGORY_DECKDES) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP) - e1:SetTarget(c81843628.target) - e1:SetOperation(c81843628.operation) - c:RegisterEffect(e1) -end -function c81843628.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,1-tp,5) -end -function c81843628.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.DiscardDeck(1-tp,5,REASON_EFFECT) -end diff --git a/script/c81846636.lua b/script/c81846636.lua deleted file mode 100644 index bd2809da13..0000000000 --- a/script/c81846636.lua +++ /dev/null @@ -1,34 +0,0 @@ ---ジェムナイト・ラズリー -function c81846636.initial_effect(c) - --salvage - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(81846636,0)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCondition(c81846636.condition) - e1:SetTarget(c81846636.target) - e1:SetOperation(c81846636.operation) - c:RegisterEffect(e1) -end -function c81846636.condition(e,tp,eg,ep,ev,re,r,rp) - return bit.band(r,REASON_RETURN)==0 and bit.band(r,REASON_EFFECT)~=0 -end -function c81846636.filter(c) - return c:IsType(TYPE_NORMAL) and c:IsAbleToHand() -end -function c81846636.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c81846636.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c81846636.filter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c81846636.filter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c81846636.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end diff --git a/script/c81863068.lua b/script/c81863068.lua deleted file mode 100644 index 9375347c68..0000000000 --- a/script/c81863068.lua +++ /dev/null @@ -1,27 +0,0 @@ ---悪魔の偵察者 -function c81863068.initial_effect(c) - --flip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(81863068,0)) - e1:SetCategory(CATEGORY_DRAW) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP) - e1:SetTarget(c81863068.target) - e1:SetOperation(c81863068.operation) - c:RegisterEffect(e1) -end -function c81863068.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(3) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,1-tp,3) -end -function c81863068.operation(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - if Duel.Draw(p,d,REASON_EFFECT)==0 then return end - local g=Duel.GetOperatedGroup() - Duel.ConfirmCards(1-p,g) - local dg=g:Filter(Card.IsType,nil,TYPE_SPELL) - Duel.SendtoGrave(dg,REASON_EFFECT+REASON_DISCARD) - Duel.ShuffleHand(p) -end diff --git a/script/c81866673.lua b/script/c81866673.lua deleted file mode 100644 index 62740b041d..0000000000 --- a/script/c81866673.lua +++ /dev/null @@ -1,89 +0,0 @@ ---D-HERO ダッシュガイ -function c81866673.initial_effect(c) - --atkup - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(81866673,0)) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCost(c81866673.atkcost) - e1:SetOperation(c81866673.atkop) - c:RegisterEffect(e1) - --pos - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_PHASE+PHASE_BATTLE) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCondition(c81866673.poscon) - e2:SetOperation(c81866673.posop) - c:RegisterEffect(e2) - --spsummon - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(81866673,1)) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_NO_TURN_RESET) - e3:SetRange(LOCATION_GRAVE) - e3:SetCountLimit(1) - e3:SetCode(EVENT_DRAW) - e3:SetCondition(c81866673.spcon) - e3:SetTarget(c81866673.sptg) - e3:SetOperation(c81866673.spop) - c:RegisterEffect(e3) -end -function c81866673.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,nil,1,e:GetHandler()) end - local g=Duel.SelectReleaseGroup(tp,nil,1,1,e:GetHandler()) - Duel.Release(g,REASON_COST) -end -function c81866673.atkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFacedown() or not c:IsRelateToEffect(e) then return end - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(1000) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - c:RegisterEffect(e1) -end -function c81866673.poscon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetAttackedCount()>0 -end -function c81866673.posop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsAttackPos() then - Duel.ChangePosition(c,POS_FACEUP_DEFENCE) - end -end -function c81866673.spcon(e,tp,eg,ep,ev,re,r,rp) - return ep==tp and Duel.GetCurrentPhase()==PHASE_DRAW -end -function c81866673.spfilter(c,e,tp) - return c:IsLocation(LOCATION_HAND) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c81866673.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and eg:IsExists(c81866673.spfilter,1,nil,e,tp) end - if eg:GetCount()==1 then - Duel.ConfirmCards(1-tp,eg) - Duel.ShuffleHand(tp) - Duel.SetTargetCard(eg) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,eg,1,0,0) - else - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=eg:FilterSelect(tp,c81866673.spfilter,1,1,nil,e,tp) - Duel.ConfirmCards(1-tp,g) - Duel.ShuffleHand(tp) - Duel.SetTargetCard(g) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) - end -end -function c81866673.spop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c81873903.lua b/script/c81873903.lua deleted file mode 100644 index 7ba6612a86..0000000000 --- a/script/c81873903.lua +++ /dev/null @@ -1,28 +0,0 @@ ---エヴォルド・ウェストロ -function c81873903.initial_effect(c) - --search - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(81873903,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_FLIP+EFFECT_TYPE_SINGLE) - e1:SetTarget(c81873903.target) - e1:SetOperation(c81873903.operation) - c:RegisterEffect(e1) -end -function c81873903.filter(c,e,tp) - return c:IsSetCard(0x604e) and c:IsCanBeSpecialSummoned(e,151,tp,false,false) -end -function c81873903.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c81873903.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c81873903.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,151,tp,tp,false,false,POS_FACEUP) - local rf=g:GetFirst().evolreg - if rf then rf(g:GetFirst()) end - end -end diff --git a/script/c81896370.lua b/script/c81896370.lua deleted file mode 100644 index fe0a871242..0000000000 --- a/script/c81896370.lua +++ /dev/null @@ -1,43 +0,0 @@ ---疾風鳥人ジョー -function c81896370.initial_effect(c) - --summon success - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(81896370,0)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetCondition(c81896370.condition) - e1:SetTarget(c81896370.target) - e1:SetOperation(c81896370.operation) - c:RegisterEffect(e1) - --tribute check - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_MATERIAL_CHECK) - e2:SetValue(c81896370.valcheck) - e2:SetLabelObject(e1) - c:RegisterEffect(e2) -end -function c81896370.valcheck(e,c) - local g=c:GetMaterial() - if g:IsExists(Card.IsAttribute,1,nil,ATTRIBUTE_WIND) then - e:GetLabelObject():SetLabel(1) - else - e:GetLabelObject():SetLabel(0) - end -end -function c81896370.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_ADVANCE and e:GetLabel()==1 -end -function c81896370.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand() -end -function c81896370.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c81896370.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end - local sg=Duel.GetMatchingGroup(c81896370.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,sg,sg:GetCount(),0,0) -end -function c81896370.operation(e,tp,eg,ep,ev,re,r,rp) - local sg=Duel.GetMatchingGroup(c81896370.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) - Duel.SendtoHand(sg,nil,REASON_EFFECT) -end diff --git a/script/c81896771.lua b/script/c81896771.lua deleted file mode 100644 index 3858f2bc30..0000000000 --- a/script/c81896771.lua +++ /dev/null @@ -1,48 +0,0 @@ ---エレキジ -function c81896771.initial_effect(c) - --direct attack - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DIRECT_ATTACK) - c:RegisterEffect(e1) - --act limit - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(81896771,0)) - e2:SetCategory(CATEGORY_REMOVE) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_BATTLE_DAMAGE) - e2:SetCondition(c81896771.condition) - e2:SetTarget(c81896771.target) - e2:SetOperation(c81896771.operation) - c:RegisterEffect(e2) -end -function c81896771.condition(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp and Duel.GetAttackTarget()==nil -end -function c81896771.filter(c) - return c:IsFaceup() and c:IsAbleToRemove() -end -function c81896771.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c81896771.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c81896771.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,c81896771.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) -end -function c81896771.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() and Duel.Remove(tc,tc:GetPosition(),REASON_EFFECT+REASON_TEMPORARY)~=0 then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetReset(RESET_PHASE+PHASE_END) - e1:SetLabelObject(tc) - e1:SetCountLimit(1) - e1:SetOperation(c81896771.retop) - Duel.RegisterEffect(e1,tp) - end -end -function c81896771.retop(e,tp,eg,ep,ev,re,r,rp) - Duel.ReturnToField(e:GetLabelObject()) -end \ No newline at end of file diff --git a/script/c81907872.lua b/script/c81907872.lua deleted file mode 100644 index 7cd5e322df..0000000000 --- a/script/c81907872.lua +++ /dev/null @@ -1,72 +0,0 @@ ---ゴーストリック・スペクター -function c81907872.initial_effect(c) - --summon limit - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_SUMMON) - e1:SetCondition(c81907872.sumcon) - c:RegisterEffect(e1) - --turn set - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(81907872,0)) - e2:SetCategory(CATEGORY_POSITION) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetTarget(c81907872.postg) - e2:SetOperation(c81907872.posop) - c:RegisterEffect(e2) - --spsummon - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(81907872,1)) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DRAW) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e3:SetCode(EVENT_TO_GRAVE) - e3:SetRange(LOCATION_HAND) - e3:SetCondition(c81907872.spcon) - e3:SetTarget(c81907872.sptg) - e3:SetOperation(c81907872.spop) - c:RegisterEffect(e3) -end -function c81907872.sfilter(c) - return c:IsFaceup() and c:IsSetCard(0x8d) -end -function c81907872.sumcon(e) - return not Duel.IsExistingMatchingCard(c81907872.sfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) -end -function c81907872.postg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsCanTurnSet() and c:GetFlagEffect(81907872)==0 end - c:RegisterFlagEffect(81907872,RESET_EVENT+0x1fc0000+RESET_PHASE+PHASE_END,0,1) - Duel.SetOperationInfo(0,CATEGORY_POSITION,c,1,0,0) -end -function c81907872.posop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - Duel.ChangePosition(c,POS_FACEDOWN_DEFENCE) - end -end -function c81907872.cfilter1(c,tp) - return c:IsControler(tp) and c:GetPreviousControler()==tp and c:IsReason(REASON_DESTROY) and c:IsReason(REASON_EFFECT) - and c:IsSetCard(0x8d) and c:IsType(TYPE_MONSTER) and not c:IsPreviousLocation(LOCATION_SZONE) -end -function c81907872.cfilter2(c) - return c:IsReason(REASON_BATTLE) and c:IsStatus(STATUS_OPPO_BATTLE) and c==Duel.GetAttackTarget() -end -function c81907872.spcon(e,tp,eg,ep,ev,re,r,rp) - return (rp~=tp and eg:IsExists(c81907872.cfilter1,1,nil,tp)) or eg:IsExists(c81907872.cfilter2,1,nil) -end -function c81907872.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN) - and Duel.IsPlayerCanDraw(tp,1) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c81907872.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEDOWN_DEFENCE)~=0 then - Duel.ConfirmCards(1-tp,c) - Duel.Draw(tp,1,REASON_EFFECT) - end -end diff --git a/script/c81913510.lua b/script/c81913510.lua deleted file mode 100644 index d31d119f91..0000000000 --- a/script/c81913510.lua +++ /dev/null @@ -1,40 +0,0 @@ ---NEX -function c81913510.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c81913510.target) - e1:SetOperation(c81913510.activate) - c:RegisterEffect(e1) -end -function c81913510.filter1(c,e,tp) - local code=c:GetCode() - return c:IsFaceup() and c:IsSetCard(0x1f) - and Duel.IsExistingMatchingCard(c81913510.filter2,tp,LOCATION_EXTRA,0,1,nil,code,e,tp) -end -function c81913510.filter2(c,code,e,tp) - return c:IsCode(code) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) -end -function c81913510.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c81913510.filter1(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsExistingTarget(c81913510.filter1,tp,LOCATION_MZONE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectTarget(tp,c81913510.filter1,tp,LOCATION_MZONE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function c81913510.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<0 then return end - local tc1=Duel.GetFirstTarget() - if tc1:IsRelateToEffect(e) and Duel.SendtoGrave(tc1,REASON_EFFECT)~=0 then - local code=tc1:GetCode() - local tc2=Duel.GetFirstMatchingCard(c81913510.filter2,tp,LOCATION_EXTRA,0,nil,code,e,tp) - if tc2 and Duel.SpecialSummon(tc2,0,tp,tp,true,false,POS_FACEUP)~=0 then - tc2:CompleteProcedure() - end - end -end diff --git a/script/c81919143.lua b/script/c81919143.lua deleted file mode 100644 index b657b17065..0000000000 --- a/script/c81919143.lua +++ /dev/null @@ -1,44 +0,0 @@ ---ブレイン・クラッシャー -function c81919143.initial_effect(c) - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(81919143,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCondition(c81919143.spcon) - e1:SetTarget(c81919143.sptg) - e1:SetOperation(c81919143.spop) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_BATTLE_DESTROYING) - e2:SetOperation(c81919143.regop) - c:RegisterEffect(e2) -end -function c81919143.regop(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():RegisterFlagEffect(81919143,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) -end -function c81919143.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetFlagEffect(81919143)~=0 -end -function c81919143.filter(c,e,tp,rc,tid) - return c:IsReason(REASON_BATTLE) and c:GetReasonCard()==rc and c:GetTurnID()==tid - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c81919143.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and c81919143.filter(chkc,e,tp,e:GetHandler(),Duel.GetTurnCount()) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c81919143.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil,e,tp,e:GetHandler(),Duel.GetTurnCount()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c81919143.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil,e,tp,e:GetHandler(),Duel.GetTurnCount()) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,g:GetCount(),0,0) -end -function c81919143.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c81927732.lua b/script/c81927732.lua deleted file mode 100644 index e75527c05f..0000000000 --- a/script/c81927732.lua +++ /dev/null @@ -1,96 +0,0 @@ ---RR-レヴォリューション・ファルコン -function c81927732.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsRace,RACE_WINDBEAST),6,3) - c:EnableReviveLimit() - --attack all - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(81927732,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c81927732.condition) - e1:SetCost(c81927732.cost) - e1:SetOperation(c81927732.operation) - c:RegisterEffect(e1) - --atk/def - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_BATTLE_START) - e2:SetCondition(c81927732.adcon) - e2:SetOperation(c81927732.adop) - c:RegisterEffect(e2) - --destroy - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(81927732,1)) - e3:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetCountLimit(1) - e3:SetRange(LOCATION_MZONE) - e3:SetCondition(c81927732.descon) - e3:SetTarget(c81927732.destg) - e3:SetOperation(c81927732.desop) - c:RegisterEffect(e3) -end -function c81927732.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsAbleToEnterBP() and not e:GetHandler():IsHasEffect(EFFECT_ATTACK_ALL) -end -function c81927732.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c81927732.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFaceup() and c:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_ATTACK_ALL) - e1:SetValue(1) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - c:RegisterEffect(e1) - end -end -function c81927732.adcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local bc=c:GetBattleTarget() - return bc and bc:IsFaceup() and bit.band(bc:GetSummonType(),SUMMON_TYPE_SPECIAL)==SUMMON_TYPE_SPECIAL -end -function c81927732.adop(e,tp,eg,ep,ev,re,r,rp) - local bc=e:GetHandler():GetBattleTarget() - if bc:IsRelateToBattle() then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetValue(0) - e1:SetReset(RESET_EVENT+0x1fe0000) - bc:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_SET_DEFENCE_FINAL) - bc:RegisterEffect(e2) - end -end -function c81927732.filter(c) - return c:IsSetCard(0xba) and c:IsType(TYPE_XYZ) -end -function c81927732.descon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetOverlayGroup():IsExists(c81927732.filter,1,nil) -end -function c81927732.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsDestructable() end - if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,g:GetFirst():GetAttack()/2) -end -function c81927732.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - local dam=tc:GetAttack()/2 - if dam<0 or tc:IsFacedown() then dam=0 end - if Duel.Destroy(tc,REASON_EFFECT)~=0 then - Duel.Damage(1-tp,dam,REASON_EFFECT) - end - end -end diff --git a/script/c81933259.lua b/script/c81933259.lua deleted file mode 100644 index 140f0e9c71..0000000000 --- a/script/c81933259.lua +++ /dev/null @@ -1,4 +0,0 @@ ---悪魔鏡の儀式 -function c81933259.initial_effect(c) - aux.AddRitualProcGreater(c,aux.FilterBoolFunction(Card.IsCode,31890399)) -end diff --git a/script/c81954378.lua b/script/c81954378.lua deleted file mode 100644 index 907b27c039..0000000000 --- a/script/c81954378.lua +++ /dev/null @@ -1,47 +0,0 @@ ---死神の大鎌-デスサイス -function c81954378.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_CANNOT_DISABLE) - e1:SetTarget(c81954378.target) - e1:SetOperation(c81954378.operation) - c:RegisterEffect(e1) - --Equip limit - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_EQUIP_LIMIT) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetValue(c81954378.eqlimit) - c:RegisterEffect(e2) - --atk - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_EQUIP) - e3:SetCode(EFFECT_UPDATE_ATTACK) - e3:SetValue(c81954378.value) - c:RegisterEffect(e3) -end -function c81954378.eqlimit(e,c) - return c:IsCode(18175965) -end -function c81954378.filter(c) - return c:IsFaceup() and c:IsCode(18175965) -end -function c81954378.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c81954378.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c81954378.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c81954378.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c81954378.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,e:GetHandler(),tc) - end -end -function c81954378.value(e,c) - return Duel.GetMatchingGroupCount(Card.IsType,0,LOCATION_GRAVE,LOCATION_GRAVE,nil,TYPE_MONSTER)*500 -end diff --git a/script/c81962318.lua b/script/c81962318.lua deleted file mode 100644 index 89459925c6..0000000000 --- a/script/c81962318.lua +++ /dev/null @@ -1,30 +0,0 @@ ---ドラグニティ-トリブル -function c81962318.initial_effect(c) - --send to grave - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(81962318,0)) - e1:SetCategory(CATEGORY_TOGRAVE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c81962318.target) - e1:SetOperation(c81962318.operation) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e2) -end -function c81962318.tgfilter(c) - return c:IsRace(RACE_DRAGON) and c:IsLevelBelow(3) and c:IsAbleToGrave() -end -function c81962318.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c81962318.tgfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) -end -function c81962318.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c81962318.tgfilter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoGrave(g,REASON_EFFECT) - end -end diff --git a/script/c81977953.lua b/script/c81977953.lua deleted file mode 100644 index 75bf60a9d7..0000000000 --- a/script/c81977953.lua +++ /dev/null @@ -1,69 +0,0 @@ ---デザート・ツイスター -function c81977953.initial_effect(c) - c:EnableReviveLimit() - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_SPSUMMON_PROC) - e2:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e2:SetRange(LOCATION_HAND) - e2:SetCondition(c81977953.spcon) - e2:SetOperation(c81977953.spop) - c:RegisterEffect(e2) - --destroy - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(81977953,0)) - e3:SetCategory(CATEGORY_DESTROY) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetCountLimit(1) - e3:SetRange(LOCATION_MZONE) - e3:SetCost(c81977953.descost) - e3:SetTarget(c81977953.destg) - e3:SetOperation(c81977953.desop) - c:RegisterEffect(e3) -end -function c81977953.spfilter(c,att) - return c:IsAttribute(att) and c:IsAbleToRemoveAsCost() -end -function c81977953.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c81977953.spfilter,tp,LOCATION_GRAVE,0,2,nil,ATTRIBUTE_WIND) - and Duel.IsExistingMatchingCard(c81977953.spfilter,tp,LOCATION_GRAVE,0,1,nil,ATTRIBUTE_EARTH) -end -function c81977953.spop(e,tp,eg,ep,ev,re,r,rp,c) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g1=Duel.SelectMatchingCard(tp,c81977953.spfilter,tp,LOCATION_GRAVE,0,2,2,nil,ATTRIBUTE_WIND) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g2=Duel.SelectMatchingCard(tp,c81977953.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,ATTRIBUTE_EARTH) - g1:Merge(g2) - Duel.Remove(g1,POS_FACEUP,REASON_COST) -end -function c81977953.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) -end -function c81977953.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable() -end -function c81977953.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and c81977953.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c81977953.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c81977953.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c81977953.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c81983656.lua b/script/c81983656.lua deleted file mode 100644 index 6b0fd81b6d..0000000000 --- a/script/c81983656.lua +++ /dev/null @@ -1,96 +0,0 @@ ---BF T-漆黒のホーク・ジョー -function c81983656.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0x33),aux.NonTuner(Card.IsSetCard,0x33),1) - c:EnableReviveLimit() - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(81983656,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1,81983656) - e1:SetTarget(c81983656.sptg) - e1:SetOperation(c81983656.spop) - c:RegisterEffect(e1) - --change battle target - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_BE_BATTLE_TARGET) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,81983657) - e2:SetCondition(c81983656.cbcon) - e2:SetTarget(c81983656.cbtg) - e2:SetOperation(c81983656.cbop) - c:RegisterEffect(e2) - --change effect target - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_QUICK_O) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetCode(EVENT_CHAINING) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1,81983657) - e3:SetCondition(c81983656.cecon) - e3:SetTarget(c81983656.cetg) - e3:SetOperation(c81983656.ceop) - c:RegisterEffect(e3) -end -function c81983656.spfilter(c,e,tp) - return c:IsLevelAbove(5) and c:IsRace(RACE_WINDBEAST) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c81983656.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c81983656.spfilter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c81983656.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c81983656.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c81983656.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end -function c81983656.cbcon(e,tp,eg,ep,ev,re,r,rp) - return r~=REASON_REPLACE -end -function c81983656.cbfilter(c) - return c:IsFaceup() and c:IsSetCard(0x33) -end -function c81983656.cbtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c81983656.cbfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c81983656.cbfilter,tp,LOCATION_MZONE,0,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - Duel.SelectTarget(tp,c81983656.cbfilter,tp,LOCATION_MZONE,0,1,1,e:GetHandler()) -end -function c81983656.cbop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.ChangeAttackTarget(tc) - end -end -function c81983656.cecon(e,tp,eg,ep,ev,re,r,rp) - if e==re or rp==tp or not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end - local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) - return g and g:GetCount()==1 and g:GetFirst()==e:GetHandler() -end -function c81983656.cefilter(c,re,rp,tf,ceg,cep,cev,cre,cr,crp) - return c:IsFaceup() and c:IsSetCard(0x33) and tf(re,rp,ceg,cep,cev,cre,cr,crp,0,c) -end -function c81983656.cetg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local tf=re:GetTarget() - local res,ceg,cep,cev,cre,cr,crp=Duel.CheckEvent(re:GetCode(),true) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c81983656.cefilter(chkc,re,rp,tf,ceg,cep,cev,cre,cr,crp) end - if chk==0 then return Duel.IsExistingTarget(c81983656.cefilter,tp,LOCATION_MZONE,0,1,e:GetHandler(),re,rp,tf,ceg,cep,cev,cre,cr,crp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - Duel.SelectTarget(tp,c81983656.cefilter,tp,LOCATION_MZONE,0,1,1,e:GetHandler(),re,rp,tf,ceg,cep,cev,cre,cr,crp) -end -function c81983656.ceop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.ChangeTargetCard(ev,Group.FromCards(tc)) - end -end diff --git a/script/c81985784.lua b/script/c81985784.lua deleted file mode 100644 index 9b82d4c4c9..0000000000 --- a/script/c81985784.lua +++ /dev/null @@ -1,28 +0,0 @@ ---デスグレムリン -function c81985784.initial_effect(c) - --flip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(81985784,0)) - e1:SetCategory(CATEGORY_TODECK) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP) - e1:SetTarget(c81985784.target) - e1:SetOperation(c81985784.operation) - c:RegisterEffect(e1) -end -function c81985784.filter(c) - return c:IsAbleToDeck() -end -function c81985784.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c81985784.filter(chkc) end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectTarget(tp,c81985784.filter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0) -end -function c81985784.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.SendtoDeck(tc,nil,2,REASON_EFFECT) - end -end diff --git a/script/c8198620.lua b/script/c8198620.lua deleted file mode 100644 index da425be482..0000000000 --- a/script/c8198620.lua +++ /dev/null @@ -1,83 +0,0 @@ ---冥界龍 ドラゴネクロ -function c8198620.initial_effect(c) - c:SetUniqueOnField(1,0,8198620) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcFunRep(c,aux.FilterBoolFunction(Card.IsRace,RACE_ZOMBIE),2,false) - --spsummon condition - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_SINGLE_RANGE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetRange(LOCATION_EXTRA) - e1:SetValue(c8198620.splimit) - c:RegisterEffect(e1) - --battle - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(8198620,0)) - e2:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_DAMAGE_STEP_END) - e2:SetTarget(c8198620.attg) - e2:SetOperation(c8198620.atop) - c:RegisterEffect(e2) - -- - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e3:SetRange(LOCATION_MZONE) - e3:SetCode(EVENT_DAMAGE_CALCULATING) - e3:SetCondition(c8198620.indescon) - e3:SetOperation(c8198620.indesop) - c:RegisterEffect(e3) -end -function c8198620.splimit(e,se,sp,st) - return bit.band(st,SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION -end -function c8198620.attg(e,tp,eg,ep,ev,re,r,rp,chk) - local bc=e:GetHandler():GetBattleTarget() - if chk==0 then return bc and bc:IsRelateToBattle() end - Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0) -end -function c8198620.atop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local bc=c:GetBattleTarget() - if bc:IsRelateToBattle() and bc:IsFaceup() then - local atk=bc:GetBaseAttack() - local lv=bc:GetOriginalLevel() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetValue(0) - e1:SetReset(RESET_EVENT+0x1fe0000) - bc:RegisterEffect(e1) - if lv>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsPlayerCanSpecialSummonMonster(tp,8198621,0,0x4011,-2,0,0,RACE_ZOMBIE,ATTRIBUTE_DARK) then - local token=Duel.CreateToken(tp,8198621) - Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_BASE_ATTACK) - e1:SetValue(atk) - e1:SetReset(RESET_EVENT+0x1fe0000) - token:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_CHANGE_LEVEL) - e2:SetValue(lv) - token:RegisterEffect(e2) - Duel.SpecialSummonComplete() - end - end -end -function c8198620.indescon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetBattleTarget()~=nil -end -function c8198620.indesop(e,tp,eg,ep,ev,re,r,rp) - local bc=e:GetHandler():GetBattleTarget() - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e1:SetValue(1) - e1:SetReset(RESET_PHASE+PHASE_DAMAGE_CAL) - bc:RegisterEffect(e1,true) -end diff --git a/script/c8198712.lua b/script/c8198712.lua deleted file mode 100644 index 710a4e2c7a..0000000000 --- a/script/c8198712.lua +++ /dev/null @@ -1,8 +0,0 @@ ---エンド・オブ・ザ・ワールド -function c8198712.initial_effect(c) - aux.AddRitualProcEqual2(c,c8198712.ritual_filter) -end -function c8198712.ritual_filter(c) - local code=c:GetCode() - return code==72426662 or code==46427957 -end diff --git a/script/c81992475.lua b/script/c81992475.lua deleted file mode 100644 index bcc563c04f..0000000000 --- a/script/c81992475.lua +++ /dev/null @@ -1,76 +0,0 @@ ---彼岸の悪鬼 バルバリッチャ -function c81992475.initial_effect(c) - --self destroy - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_SELF_DESTROY) - e1:SetCondition(c81992475.sdcon) - c:RegisterEffect(e1) - --Special Summon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(81992475,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_HAND) - e2:SetCountLimit(1,81992475) - e2:SetCondition(c81992475.sscon) - e2:SetTarget(c81992475.sstg) - e2:SetOperation(c81992475.ssop) - c:RegisterEffect(e2) - --remove - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(81992475,1)) - e3:SetCategory(CATEGORY_REMOVE+CATEGORY_DAMAGE) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) - e3:SetCode(EVENT_TO_GRAVE) - e3:SetCountLimit(1,81992475) - e3:SetTarget(c81992475.rmtg) - e3:SetOperation(c81992475.rmop) - c:RegisterEffect(e3) -end -function c81992475.sdfilter(c) - return not c:IsFaceup() or not c:IsSetCard(0xb1) -end -function c81992475.sdcon(e) - return Duel.IsExistingMatchingCard(c81992475.sdfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) -end -function c81992475.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) -end -function c81992475.sscon(e,tp,eg,ep,ev,re,r,rp) - return not Duel.IsExistingMatchingCard(c81992475.filter,tp,LOCATION_ONFIELD,0,1,nil) -end -function c81992475.sstg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c81992475.ssop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP) - end -end -function c81992475.rmfilter(c) - return c:IsSetCard(0xb1) and not c:IsCode(81992475) and c:IsAbleToRemove() -end -function c81992475.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c81992475.rmfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c81992475.rmfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,c81992475.rmfilter,tp,LOCATION_GRAVE,0,1,3,nil) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,0) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,g:GetCount()*300) -end -function c81992475.rmop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) - if g:GetCount()>0 and Duel.Remove(g,POS_FACEUP,REASON_EFFECT)~=0 then - local rg=Duel.GetOperatedGroup() - local ct=rg:FilterCount(Card.IsLocation,nil,LOCATION_REMOVED) - if ct>0 then - Duel.Damage(1-tp,ct*300,REASON_EFFECT) - end - end -end diff --git a/script/c81994591.lua b/script/c81994591.lua deleted file mode 100644 index 242ae07720..0000000000 --- a/script/c81994591.lua +++ /dev/null @@ -1,48 +0,0 @@ ---コアキメイルの金剛核 -function c81994591.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c81994591.target) - e1:SetOperation(c81994591.activate) - c:RegisterEffect(e1) - --indes - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(81994591,0)) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_GRAVE) - e2:SetCost(c81994591.indcost) - e2:SetOperation(c81994591.indop) - c:RegisterEffect(e2) -end -function c81994591.filter(c) - return c:IsSetCard(0x1d) and c:GetCode()~=81994591 and c:IsAbleToHand() -end -function c81994591.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c81994591.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c81994591.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c81994591.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end -function c81994591.indcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) -end -function c81994591.indop(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_DESTROY_SUBSTITUTE) - e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x1d)) - e1:SetReset(RESET_PHASE+PHASE_END) - e1:SetValue(1) - Duel.RegisterEffect(e1,tp) -end diff --git a/script/c82003859.lua b/script/c82003859.lua deleted file mode 100644 index cc9762c9d2..0000000000 --- a/script/c82003859.lua +++ /dev/null @@ -1,39 +0,0 @@ ---通行税 -function c82003859.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --attack cost - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_ATTACK_COST) - e2:SetRange(LOCATION_SZONE) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetTargetRange(1,1) - e2:SetCondition(c82003859.atcon) - e2:SetCost(c82003859.atcost) - e2:SetOperation(c82003859.atop) - c:RegisterEffect(e2) - --accumulate - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetCode(0x10000000+82003859) - e3:SetRange(LOCATION_SZONE) - e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e3:SetTargetRange(1,1) - c:RegisterEffect(e3) -end -function c82003859.atcon(e) - c82003859[0]=false - return true -end -function c82003859.atcost(e,c,tp) - return Duel.CheckLPCost(tp,500) -end -function c82003859.atop(e,tp,eg,ep,ev,re,r,rp) - if c82003859[0] then return end - Duel.PayLPCost(tp,Duel.GetFlagEffect(tp,82003859)*500) - c82003859[0]=true -end diff --git a/script/c82005435.lua b/script/c82005435.lua deleted file mode 100644 index 64b482c498..0000000000 --- a/script/c82005435.lua +++ /dev/null @@ -1,34 +0,0 @@ ---女忍者ヤエ -function c82005435.initial_effect(c) - --to hand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(82005435,0)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c82005435.cost) - e1:SetTarget(c82005435.target) - e1:SetOperation(c82005435.operation) - c:RegisterEffect(e1) -end -function c82005435.costfilter(c) - return c:IsAttribute(ATTRIBUTE_WIND) and c:IsDiscardable() and c:IsAbleToGraveAsCost() -end -function c82005435.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c82005435.costfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) - local cg=Duel.SelectMatchingCard(tp,c82005435.costfilter,tp,LOCATION_HAND,0,1,1,nil) - Duel.SendtoGrave(cg,REASON_COST+REASON_DISCARD) -end -function c82005435.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand() -end -function c82005435.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c82005435.filter,tp,0,LOCATION_ONFIELD,1,nil) end - local sg=Duel.GetMatchingGroup(c82005435.filter,tp,0,LOCATION_ONFIELD,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,sg,sg:GetCount(),0,0) -end -function c82005435.operation(e,tp,eg,ep,ev,re,r,rp,chk) - local sg=Duel.GetMatchingGroup(c82005435.filter,tp,0,LOCATION_ONFIELD,nil) - Duel.SendtoHand(sg,nil,REASON_EFFECT) -end diff --git a/script/c82012319.lua b/script/c82012319.lua deleted file mode 100644 index d546d24cfb..0000000000 --- a/script/c82012319.lua +++ /dev/null @@ -1,40 +0,0 @@ ---スクラップ・ゴーレム -function c82012319.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(82012319,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c82012319.sptg) - e1:SetOperation(c82012319.spop) - c:RegisterEffect(e1) -end -function c82012319.filter(c,e,tp) - return c:IsLevelBelow(4) and c:IsSetCard(0x24) and (c:IsCanBeSpecialSummoned(e,0,tp,false,false) - or c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,1-tp)) -end -function c82012319.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c82012319.filter(chkc,e,tp) end - if chk==0 then return (Duel.GetLocationCount(tp,LOCATION_MZONE)>0 or Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0) - and Duel.IsExistingTarget(c82012319.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c82012319.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c82012319.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if not tc:IsRelateToEffect(e) then return end - local s1=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and tc:IsCanBeSpecialSummoned(e,0,tp,false,false) - local s2=Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0 and tc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,1-tp) - local op=0 - Duel.Hint(HINT_SELECTMSG,tp,0) - if s1 and s2 then op=Duel.SelectOption(tp,aux.Stringid(82012319,1),aux.Stringid(82012319,2)) - elseif s1 then op=Duel.SelectOption(tp,aux.Stringid(82012319,1)) - elseif s2 then op=Duel.SelectOption(tp,aux.Stringid(82012319,2))+1 - else return end - if op==0 then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - else Duel.SpecialSummon(tc,0,tp,1-tp,false,false,POS_FACEUP) end -end diff --git a/script/c82016179.lua b/script/c82016179.lua deleted file mode 100644 index d306ebd80f..0000000000 --- a/script/c82016179.lua +++ /dev/null @@ -1,43 +0,0 @@ ---森羅の施し -function c82016179.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DRAW+CATEGORY_TODECK) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,82016179+EFFECT_COUNT_CODE_OATH) - e1:SetTarget(c82016179.target) - e1:SetOperation(c82016179.activate) - c:RegisterEffect(e1) -end -function c82016179.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp,3) end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(3) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,3) - Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,0,tp,2) -end -function c82016179.activate(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - if Duel.Draw(p,d,REASON_EFFECT)==3 then - Duel.ShuffleHand(p) - Duel.BreakEffect() - local g=Duel.GetMatchingGroup(Card.IsAbleToDeck,p,LOCATION_HAND,0,nil) - if g:GetCount()>1 and g:IsExists(Card.IsSetCard,1,nil,0x90) then - Duel.Hint(HINT_SELECTMSG,p,HINTMSG_TODECK) - local sg1=g:FilterSelect(p,Card.IsSetCard,1,1,nil,0x90) - Duel.Hint(HINT_SELECTMSG,p,HINTMSG_TODECK) - local sg2=g:Select(p,1,1,sg1:GetFirst()) - sg1:Merge(sg2) - Duel.ConfirmCards(1-p,sg1) - Duel.SendtoDeck(sg1,nil,0,REASON_EFFECT) - Duel.SortDecktop(p,p,2) - else - local hg=Duel.GetFieldGroup(p,LOCATION_HAND,0) - Duel.ConfirmCards(1-p,hg) - local ct=Duel.SendtoDeck(hg,nil,0,REASON_EFFECT) - Duel.SortDecktop(p,p,ct) - end - end -end diff --git a/script/c8201910.lua b/script/c8201910.lua deleted file mode 100644 index 22431207bf..0000000000 --- a/script/c8201910.lua +++ /dev/null @@ -1,21 +0,0 @@ ---スター・ボーイ -function c8201910.initial_effect(c) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetTarget(c8201910.tg1) - e1:SetValue(500) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetTarget(c8201910.tg2) - e2:SetValue(-400) - c:RegisterEffect(e2) -end -function c8201910.tg1(e,c) - return c:IsAttribute(ATTRIBUTE_WATER) -end -function c8201910.tg2(e,c) - return c:IsAttribute(ATTRIBUTE_FIRE) -end diff --git a/script/c82035781.lua b/script/c82035781.lua deleted file mode 100644 index 0433c32ea3..0000000000 --- a/script/c82035781.lua +++ /dev/null @@ -1,9 +0,0 @@ ---ツインヘデッド・ビースト -function c82035781.initial_effect(c) - --multi attack - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_EXTRA_ATTACK) - e1:SetValue(1) - c:RegisterEffect(e1) -end diff --git a/script/c82044279.lua b/script/c82044279.lua deleted file mode 100644 index 90bfff63b2..0000000000 --- a/script/c82044279.lua +++ /dev/null @@ -1,86 +0,0 @@ ---クリアウィング・シンクロ・ドラゴン -function c82044279.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1) - c:EnableReviveLimit() - --negate - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(82044279,0)) - e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_CHAINING) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCondition(c82044279.condition) - e1:SetTarget(c82044279.target) - e1:SetOperation(c82044279.operation) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetDescription(aux.Stringid(82044279,1)) - e2:SetCondition(c82044279.condition2) - c:RegisterEffect(e2) - --atk - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e3:SetCode(EVENT_DESTROYED) - e3:SetRange(LOCATION_MZONE) - e3:SetCondition(c82044279.atkcon) - e3:SetOperation(c82044279.atkop) - c:RegisterEffect(e3) -end -function c82044279.condition(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local rc=re:GetHandler() - local loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION) - return re:IsActiveType(TYPE_MONSTER) and rc~=c and rc:IsLevelAbove(5) and loc==LOCATION_MZONE - and not c:IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev) -end -function c82044279.condition2(e,tp,eg,ep,ev,re,r,rp) - if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end - local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) - if not g or g:GetCount()~=1 then return false end - local tc=g:GetFirst() - local c=e:GetHandler() - return re:IsActiveType(TYPE_MONSTER) and tc:IsLevelAbove(5) and tc:IsLocation(LOCATION_MZONE) - and not c:IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev) -end -function c82044279.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) - end -end -function c82044279.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateActivation(ev) - local rc=re:GetHandler() - if rc:IsRelateToEffect(re) then - Duel.Destroy(rc,REASON_EFFECT) - end -end -function c82044279.atkcon(e,tp,eg,ep,ev,re,r,rp) - return bit.band(r,REASON_EFFECT)~=0 and re and re:GetOwner()==e:GetHandler() - and eg:IsExists(Card.IsType,1,nil,TYPE_MONSTER) -end -function c82044279.atkop(e,tp,eg,ep,ev,re,r,rp) - local g=eg:Filter(Card.IsType,nil,TYPE_MONSTER) - local c=e:GetHandler() - local atk=0 - local tc=g:GetFirst() - while tc do - if tc:GetTextAttack()>0 then - atk=atk+tc:GetTextAttack() - end - tc=g:GetNext() - end - if atk>0 then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(atk) - e1:SetReset(RESET_EVENT+0x1ff0000+RESET_PHASE+RESET_END) - c:RegisterEffect(e1) - end -end diff --git a/script/c82050203.lua b/script/c82050203.lua deleted file mode 100644 index d42a367ea7..0000000000 --- a/script/c82050203.lua +++ /dev/null @@ -1,30 +0,0 @@ ---ドテドテング -function c82050203.initial_effect(c) - --return - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(82050203,0)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCondition(c82050203.retcon) - e1:SetTarget(c82050203.rettg) - e1:SetOperation(c82050203.retop) - c:RegisterEffect(e1) -end -function c82050203.retcon(e,tp,eg,ep,ev,re,r,rp) - return bit.band(r,0x41)==0x41 and rp~=tp and e:GetHandler():GetPreviousControler()==tp -end -function c82050203.rettg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() and chkc:IsAbleToHand() end - if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g=Duel.SelectTarget(tp,Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c82050203.retop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - end -end diff --git a/script/c82052602.lua b/script/c82052602.lua deleted file mode 100644 index c55ec3f0de..0000000000 --- a/script/c82052602.lua +++ /dev/null @@ -1,66 +0,0 @@ ---ガガガバック -function c82052602.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_END_PHASE) - e1:SetCondition(c82052602.condition) - e1:SetTarget(c82052602.target) - e1:SetOperation(c82052602.activate) - c:RegisterEffect(e1) - if not c82052602.global_check then - c82052602.global_check=true - c82052602[0]=false - c82052602[1]=false - local ge1=Effect.CreateEffect(c) - ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - ge1:SetCode(EVENT_BATTLE_DESTROYED) - ge1:SetOperation(c82052602.checkop) - Duel.RegisterEffect(ge1,0) - local ge2=Effect.CreateEffect(c) - ge2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - ge2:SetCode(EVENT_PHASE_START+PHASE_DRAW) - ge2:SetOperation(c82052602.clear) - Duel.RegisterEffect(ge2,0) - end -end -function c82052602.checkop(e,tp,eg,ep,ev,re,r,rp) - local tc=eg:GetFirst() - while tc do - local pos=tc:GetPosition() - if tc:IsSetCard(0x54) and tc:IsLocation(LOCATION_GRAVE) and tc:IsReason(REASON_BATTLE) - and tc:GetControler()==tc:GetPreviousControler() then - c82052602[tc:GetControler()]=true - end - tc=eg:GetNext() - end -end -function c82052602.clear(e,tp,eg,ep,ev,re,r,rp) - c82052602[0]=false - c82052602[1]=false -end -function c82052602.filter(c,id,e,tp) - return c:IsReason(REASON_BATTLE) and c:GetTurnID()==id and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c82052602.condition(e,tp,eg,ep,ev,re,r,rp) - return c82052602[tp] and Duel.GetFlagEffect(tp,82052602)==0 -end -function c82052602.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c82052602.filter,tp,LOCATION_GRAVE,0,1,nil,Duel.GetTurnCount(),e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE) - Duel.RegisterFlagEffect(tp,82052602,RESET_PHASE+PHASE_END,0,1) -end -function c82052602.activate(e,tp,eg,ep,ev,re,r,rp) - local ft1=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ft1==0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c82052602.filter,tp,LOCATION_GRAVE,0,ft1,ft1,nil,Duel.GetTurnCount(),e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENCE) - Duel.BreakEffect() - Duel.Damage(tp,g:GetCount()*600,REASON_EFFECT) - end -end diff --git a/script/c82099401.lua b/script/c82099401.lua deleted file mode 100644 index 38f9cc0e62..0000000000 --- a/script/c82099401.lua +++ /dev/null @@ -1,29 +0,0 @@ ---水晶の占い師 -function c82099401.initial_effect(c) - --flip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(82099401,0)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP) - e1:SetOperation(c82099401.operation) - c:RegisterEffect(e1) -end -function c82099401.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)<2 then return end - Duel.ConfirmDecktop(tp,2) - local g=Duel.GetDecktopGroup(tp,2) - if g:GetCount()>0 then - Duel.DisableShuffleCheck() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local add=g:Select(tp,1,1,nil) - if add:GetFirst():IsAbleToHand() then - Duel.SendtoHand(add,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,add) - Duel.ShuffleHand(tp) - else - Duel.SendtoGrave(add,REASON_EFFECT) - end - local back=Duel.GetDecktopGroup(tp,1) - Duel.MoveSequence(back:GetFirst(),1) - end -end diff --git a/script/c82108372.lua b/script/c82108372.lua deleted file mode 100644 index 26e4b4897b..0000000000 --- a/script/c82108372.lua +++ /dev/null @@ -1,14 +0,0 @@ ---ムドラ -function c82108372.initial_effect(c) - --atkup - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetRange(LOCATION_MZONE) - e1:SetValue(c82108372.val) - c:RegisterEffect(e1) -end -function c82108372.val(e,c) - return Duel.GetMatchingGroupCount(Card.IsRace,c:GetControler(),LOCATION_GRAVE,0,nil,RACE_FAIRY)*200 -end diff --git a/script/c82112775.lua b/script/c82112775.lua deleted file mode 100644 index f68cd4a95a..0000000000 --- a/script/c82112775.lua +++ /dev/null @@ -1,39 +0,0 @@ ---D・D・M -function c82112775.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(82112775,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c82112775.cost) - e1:SetTarget(c82112775.target) - e1:SetOperation(c82112775.operation) - c:RegisterEffect(e1) -end -function c82112775.cfilter(c) - return c:IsType(TYPE_SPELL) and c:IsDiscardable() -end -function c82112775.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c82112775.cfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,c82112775.cfilter,1,1,REASON_COST+REASON_DISCARD) -end -function c82112775.filter(c,e,tp) - return c:IsFaceup() and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c82112775.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and c82112775.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c82112775.filter,tp,LOCATION_REMOVED,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c82112775.filter,tp,LOCATION_REMOVED,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c82112775.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c82114013.lua b/script/c82114013.lua deleted file mode 100644 index 9d5149f662..0000000000 --- a/script/c82114013.lua +++ /dev/null @@ -1,37 +0,0 @@ ---ドラコニアの海竜騎兵 -function c82114013.initial_effect(c) - --pendulum summon - aux.AddPendulumProcedure(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_BATTLE_DESTROYED) - e2:SetRange(LOCATION_PZONE) - e2:SetCountLimit(1,82114013) - e2:SetTarget(c82114013.sptg) - e2:SetOperation(c82114013.spop) - c:RegisterEffect(e2) -end -function c82114013.spfilter(c,e,tp) - return c:IsType(TYPE_NORMAL) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c82114013.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c82114013.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c82114013.spop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c82114013.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c82116191.lua b/script/c82116191.lua deleted file mode 100644 index 521f006142..0000000000 --- a/script/c82116191.lua +++ /dev/null @@ -1,34 +0,0 @@ ---ギガント・セファロタス -function c82116191.initial_effect(c) - --atkup - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(82116191,0)) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c82116191.atkcon) - e1:SetTarget(c82116191.atktg) - e1:SetOperation(c82116191.atkop) - c:RegisterEffect(e1) -end -function c82116191.filter(c) - return c:IsRace(RACE_PLANT) and c:IsPreviousLocation(LOCATION_ONFIELD) -end -function c82116191.atkcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c82116191.filter,1,nil) -end -function c82116191.atktg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsRelateToEffect(e) and e:GetHandler():IsFaceup() end -end -function c82116191.atkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFaceup() and c:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(200) - e1:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e1) - end -end diff --git a/script/c82140600.lua b/script/c82140600.lua deleted file mode 100644 index 6ab9bbcfae..0000000000 --- a/script/c82140600.lua +++ /dev/null @@ -1,45 +0,0 @@ ---約束の地-アヴァロン- -function c82140600.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_REMOVE+CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,0x1c0) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c82140600.target) - e1:SetOperation(c82140600.activate) - c:RegisterEffect(e1) -end -function c82140600.filter(c,e) - return c:IsSetCard(0x107a) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemove() and c:IsCanBeEffectTarget(e) -end -function c82140600.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - local g=Duel.GetMatchingGroup(c82140600.filter,tp,LOCATION_GRAVE,0,nil,e) - if chk==0 then return g:GetCount()>4 - and g:IsExists(Card.IsSetCard,1,nil,0xa7) and g:IsExists(Card.IsSetCard,1,nil,0xa8) - and Duel.IsExistingMatchingCard(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g1=g:FilterSelect(tp,Card.IsSetCard,1,1,nil,0xa7) - g:Sub(g1) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g2=g:FilterSelect(tp,Card.IsSetCard,1,1,nil,0xa8) - g:Sub(g2) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g3=g:Select(tp,3,3,nil) - g1:Merge(g2) - g1:Merge(g3) - Duel.SetTargetCard(g1) - local dg=Duel.GetMatchingGroup(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g1,5,0,0) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,dg,dg:GetCount(),0,0) -end -function c82140600.activate(e,tp,eg,ep,ev,re,r,rp) - local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local g=tg:Filter(Card.IsRelateToEffect,nil,e) - if g:GetCount()==5 and Duel.Remove(g,POS_FACEUP,REASON_EFFECT)>0 then - local dg=Duel.GetMatchingGroup(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) - Duel.Destroy(dg,REASON_EFFECT) - end -end diff --git a/script/c82176812.lua b/script/c82176812.lua deleted file mode 100644 index afebe7fda6..0000000000 --- a/script/c82176812.lua +++ /dev/null @@ -1,27 +0,0 @@ ---魔装戦士 ハイドロータス -function c82176812.initial_effect(c) - --flip - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c82176812.destg) - e1:SetOperation(c82176812.desop) - c:RegisterEffect(e1) -end -function c82176812.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable() -end -function c82176812.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and c82176812.filter(chkc) end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c82176812.filter,tp,0,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c82176812.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c82199284.lua b/script/c82199284.lua deleted file mode 100644 index bcda968112..0000000000 --- a/script/c82199284.lua +++ /dev/null @@ -1,18 +0,0 @@ ---霞の谷のファルコン -function c82199284.initial_effect(c) - --attack cost - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_ATTACK_COST) - e1:SetCost(c82199284.atcost) - e1:SetOperation(c82199284.atop) - c:RegisterEffect(e1) -end -function c82199284.atcost(e,c,tp) - return Duel.IsExistingMatchingCard(Card.IsAbleToHandAsCost,tp,LOCATION_ONFIELD,0,1,e:GetHandler()) -end -function c82199284.atop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g=Duel.SelectMatchingCard(tp,Card.IsAbleToHandAsCost,tp,LOCATION_ONFIELD,0,1,1,e:GetHandler()) - Duel.SendtoHand(g,nil,REASON_COST) -end diff --git a/script/c82213171.lua b/script/c82213171.lua deleted file mode 100644 index 691e70f6c4..0000000000 --- a/script/c82213171.lua +++ /dev/null @@ -1,28 +0,0 @@ ---闇王プロメティス -function c82213171.initial_effect(c) - --atkup - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(82213171,0)) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetOperation(c82213171.operation) - c:RegisterEffect(e1) -end -function c82213171.cfilter(c) - return c:IsAttribute(ATTRIBUTE_DARK) and c:IsAbleToRemoveAsCost() -end -function c82213171.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local cg=Duel.SelectMatchingCard(tp,c82213171.cfilter,tp,LOCATION_GRAVE,0,1,63,nil) - local ct=Duel.Remove(cg,POS_FACEUP,REASON_COST) - if ct>0 and c:IsFaceup() and c:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(ct*400) - e1:SetReset(RESET_EVENT+0x1ff0000+RESET_PHASE+PHASE_END,1) - c:RegisterEffect(e1) - end -end diff --git a/script/c82257940.lua b/script/c82257940.lua deleted file mode 100644 index 8883e0dda1..0000000000 --- a/script/c82257940.lua +++ /dev/null @@ -1,60 +0,0 @@ ---プレゼント交換 -function c82257940.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_REMOVE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c82257940.target) - e1:SetOperation(c82257940.activate) - c:RegisterEffect(e1) -end -function c82257940.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_DECK,0,1,nil) - and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_DECK,1,nil) end -end -function c82257940.activate(e,tp,eg,ep,ev,re,r,rp) - local g1=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_DECK,0,nil) - local g2=Duel.GetMatchingGroup(Card.IsAbleToRemove,1-tp,LOCATION_DECK,0,nil) - if g1:GetCount()==0 or g2:GetCount()==0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local rg1=g1:Select(tp,1,1,nil) - Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_REMOVE) - local rg2=g2:Select(1-tp,1,1,nil) - rg1:Merge(rg2) - local c=e:GetHandler() - local fid=c:GetFieldID() - Duel.Remove(rg1,POS_FACEDOWN,REASON_EFFECT) - rg1:GetFirst():RegisterFlagEffect(82257940,RESET_EVENT+0x1fe0000,0,0,fid) - rg1:GetNext():RegisterFlagEffect(82257940,RESET_EVENT+0x1fe0000,0,0,fid) - rg1:KeepAlive() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e1:SetReset(RESET_PHASE+PHASE_END) - e1:SetCountLimit(1) - e1:SetLabel(fid) - e1:SetLabelObject(rg1) - e1:SetCondition(c82257940.thcon) - e1:SetOperation(c82257940.thop) - Duel.RegisterEffect(e1,tp) -end -function c82257940.thfilter(c,fid) - return c:GetFlagEffectLabel(82257940)==fid -end -function c82257940.thcon(e,tp,eg,ep,ev,re,r,rp) - local g=e:GetLabelObject() - if g:Filter(c82257940.thfilter,nil,e:GetLabel()):GetCount()<2 then - g:DeleteGroup() - return false - else return true end -end -function c82257940.thop(e,tp,eg,ep,ev,re,r,rp) - local g=e:GetLabelObject() - local tc1=g:GetFirst() - local tc2=g:GetNext() - g:DeleteGroup() - Duel.SendtoHand(tc1,1-tc1:GetControler(),REASON_EFFECT) - Duel.SendtoHand(tc2,1-tc2:GetControler(),REASON_EFFECT) -end diff --git a/script/c82260502.lua b/script/c82260502.lua deleted file mode 100644 index 26deb8402f..0000000000 --- a/script/c82260502.lua +++ /dev/null @@ -1,14 +0,0 @@ ---ヒエラコスフィンクス -function c82260502.initial_effect(c) - --at limit - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(0,LOCATION_MZONE) - e1:SetValue(c82260502.atlimit) - c:RegisterEffect(e1) -end -function c82260502.atlimit(e,c) - return c:IsPosition(POS_FACEDOWN_DEFENCE) -end diff --git a/script/c82263578.lua b/script/c82263578.lua deleted file mode 100644 index c2a2089ce0..0000000000 --- a/script/c82263578.lua +++ /dev/null @@ -1,33 +0,0 @@ ---戦火の残滓 -function c82263578.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c82263578.condition) - e1:SetTarget(c82263578.target) - e1:SetOperation(c82263578.activate) - c:RegisterEffect(e1) -end -function c82263578.condition(e,tp,eg,ep,ev,re,r,rp) - return not Duel.IsExistingMatchingCard(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) -end -function c82263578.filter(c) - return c:IsAttribute(ATTRIBUTE_WATER+ATTRIBUTE_WIND) and c:IsAbleToHand() -end -function c82263578.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c82263578.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c82263578.filter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c82263578.filter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c82263578.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end diff --git a/script/c8226374.lua b/script/c8226374.lua deleted file mode 100644 index 08d918b000..0000000000 --- a/script/c8226374.lua +++ /dev/null @@ -1,33 +0,0 @@ ---ギミック・パペット-ハンプティ・ダンプティ -function c8226374.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(8226374,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e1:SetCountLimit(1,8226374) - e1:SetTarget(c8226374.sptg) - e1:SetOperation(c8226374.spop) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e2) -end -function c8226374.filter(c,e,tp) - return c:IsSetCard(0x83) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c8226374.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c8226374.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c8226374.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c8226374.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c82293134.lua b/script/c82293134.lua deleted file mode 100644 index 84b92ba539..0000000000 --- a/script/c82293134.lua +++ /dev/null @@ -1,53 +0,0 @@ ---紋章獣レオ -function c82293134.initial_effect(c) - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(82293134,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetCondition(c82293134.descon) - e1:SetTarget(c82293134.destg) - e1:SetOperation(c82293134.desop) - c:RegisterEffect(e1) - --search - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(82293134,1)) - e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetCountLimit(1,82293134) - e2:SetTarget(c82293134.thtg) - e2:SetOperation(c82293134.thop) - c:RegisterEffect(e2) -end -function c82293134.descon(e,tp,eg,ep,ev,re,r,rp) - return bit.band(e:GetHandler():GetSummonType(),SUMMON_TYPE_NORMAL)~=0 - and e:GetHandler():GetTurnID()==Duel.GetTurnCount() -end -function c82293134.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0) -end -function c82293134.desop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - Duel.Destroy(c,REASON_EFFECT) - end -end -function c82293134.filter(c) - return c:IsSetCard(0x76) and c:GetCode()~=82293134 and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() -end -function c82293134.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c82293134.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c82293134.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c82301904.lua b/script/c82301904.lua deleted file mode 100644 index 9cccfa06a5..0000000000 --- a/script/c82301904.lua +++ /dev/null @@ -1,85 +0,0 @@ ---混沌帝龍 -終焉の使者- -function c82301904.initial_effect(c) - c:EnableReviveLimit() - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(82301904,0)) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_SPSUMMON_PROC) - e2:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e2:SetRange(LOCATION_HAND) - e2:SetCondition(c82301904.spcon) - e2:SetOperation(c82301904.spop) - c:RegisterEffect(e2) - --to grave - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(82301904,1)) - e3:SetCategory(CATEGORY_TOGRAVE+CATEGORY_DAMAGE) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1) - e3:SetCost(c82301904.sgcost) - e3:SetTarget(c82301904.sgtg) - e3:SetOperation(c82301904.sgop) - c:RegisterEffect(e3) - Duel.AddCustomActivityCounter(82301904,ACTIVITY_CHAIN,aux.FALSE) -end -function c82301904.spfilter(c,att) - return c:IsAttribute(att) and c:IsAbleToRemoveAsCost() -end -function c82301904.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c82301904.spfilter,tp,LOCATION_GRAVE,0,1,nil,ATTRIBUTE_LIGHT) - and Duel.IsExistingMatchingCard(c82301904.spfilter,tp,LOCATION_GRAVE,0,1,nil,ATTRIBUTE_DARK) -end -function c82301904.spop(e,tp,eg,ep,ev,re,r,rp,c) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g1=Duel.SelectMatchingCard(tp,c82301904.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,ATTRIBUTE_LIGHT) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g2=Duel.SelectMatchingCard(tp,c82301904.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,ATTRIBUTE_DARK) - g1:Merge(g2) - Duel.Remove(g1,POS_FACEUP,REASON_COST) -end -function c82301904.sgcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,1000) and Duel.GetCustomActivityCount(82301904,tp,ACTIVITY_CHAIN)==0 end - Duel.PayLPCost(tp,1000) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) - e1:SetCode(EFFECT_CANNOT_ACTIVATE) - e1:SetTargetRange(1,0) - e1:SetValue(aux.TRUE) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function c82301904.damfilter(c,p) - return c:GetOwner()==p and c:IsAbleToGrave() -end -function c82301904.sgtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local g=Duel.GetFieldGroup(tp,0xe,0xe) - local dc=g:FilterCount(c82301904.damfilter,nil,1-tp) - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,g:GetCount(),0,0) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,0,0,1-tp,dc*300) -end -function c82301904.sgfilter(c,p) - return c:IsLocation(LOCATION_GRAVE) and c:IsControler(p) -end -function c82301904.sgop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetFieldGroup(tp,0xe,0xe) - Duel.SendtoGrave(g,REASON_EFFECT) - local og=Duel.GetOperatedGroup() - local ct=og:FilterCount(c82301904.sgfilter,nil,1-tp) - if ct>0 then - Duel.BreakEffect() - Duel.Damage(1-tp,ct*300,REASON_EFFECT) - end -end diff --git a/script/c82308875.lua b/script/c82308875.lua deleted file mode 100644 index 9399564bb5..0000000000 --- a/script/c82308875.lua +++ /dev/null @@ -1,66 +0,0 @@ ---No.7 ラッキー・ストライプ -function c82308875.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,7,3) - c:EnableReviveLimit() - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(82308875,0)) - e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DRAW+CATEGORY_SPECIAL_SUMMON+CATEGORY_TOGRAVE) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c82308875.cost) - e1:SetTarget(c82308875.target) - e1:SetOperation(c82308875.operation) - c:RegisterEffect(e1) -end -c82308875.xyz_number=7 -function c82308875.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c82308875.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DICE,nil,0,tp,2) -end -function c82308875.spfilter(c,e,tp) - return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsHasEffect(EFFECT_NECRO_VALLEY) -end -function c82308875.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local d1,d2=Duel.TossDice(tp,2) - if d2>d1 then d1,d2=d2,d1 end - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetValue(d1*700) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,2) - c:RegisterEffect(e1) - if d1+d2==7 then - local b1=Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,LOCATION_ONFIELD)>1 - local spg=Duel.GetMatchingGroup(c82308875.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,LOCATION_GRAVE,nil,e,tp) - local b2=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and spg:GetCount()>0 - local b3=Duel.IsPlayerCanDraw(tp,3) - if not b1 and not b2 and not b3 then return end - local op=0 - if b1 and not b2 and not b3 then op=Duel.SelectOption(tp,aux.Stringid(82308875,1)) - elseif not b1 and b2 and not b3 then op=Duel.SelectOption(tp,aux.Stringid(82308875,2))+1 - elseif not b1 and not b2 and b3 then op=Duel.SelectOption(tp,aux.Stringid(82308875,3))+2 - elseif b1 and b2 and not b3 then op=Duel.SelectOption(tp,aux.Stringid(82308875,1),aux.Stringid(82308875,2)) - elseif b1 and not b2 and b3 then op=Duel.SelectOption(tp,aux.Stringid(82308875,1),aux.Stringid(82308875,3)) if op==1 then op=2 end - elseif not b1 and b2 and b3 then op=Duel.SelectOption(tp,aux.Stringid(82308875,2),aux.Stringid(82308875,3))+1 - else op=Duel.SelectOption(tp,aux.Stringid(82308875,1),aux.Stringid(82308875,2),aux.Stringid(82308875,3)) end - if op==0 then - local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler()) - Duel.SendtoGrave(g,REASON_EFFECT) - elseif op==1 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=spg:Select(tp,1,1,nil) - Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) - else - Duel.Draw(tp,3,REASON_EFFECT) - Duel.BreakEffect() - Duel.DiscardHand(tp,aux.TRUE,2,2,REASON_EFFECT+REASON_DISCARD) - end - end -end diff --git a/script/c82315772.lua b/script/c82315772.lua deleted file mode 100644 index f47ebfd20c..0000000000 --- a/script/c82315772.lua +++ /dev/null @@ -1,19 +0,0 @@ ---紋章獣エアレー -function c82315772.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c82315772.spcon) - c:RegisterEffect(e1) -end -function c82315772.filter(c) - return c:IsFaceup() and c:IsSetCard(0x76) -end -function c82315772.spcon(e,c) - if c==nil then return true end - return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and - Duel.IsExistingMatchingCard(c82315772.filter,c:GetControler(),LOCATION_MZONE,0,2,nil) -end diff --git a/script/c82324105.lua b/script/c82324105.lua deleted file mode 100644 index 1bd8637072..0000000000 --- a/script/c82324105.lua +++ /dev/null @@ -1,42 +0,0 @@ ---極限への衝動 -function c82324105.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_END_PHASE) - e1:SetCost(c82324105.cost) - e1:SetTarget(c82324105.target) - e1:SetOperation(c82324105.activate) - c:RegisterEffect(e1) -end -function c82324105.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,2,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,2,2,e:GetHandler()) - Duel.SendtoGrave(g,REASON_COST) -end -function c82324105.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>1 - and Duel.IsPlayerCanSpecialSummonMonster(tp,82324106,0,0x4011,0,0,1,RACE_FIEND,ATTRIBUTE_DARK) end - Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,2,0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,0,0) -end -function c82324105.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)>1 - and Duel.IsPlayerCanSpecialSummonMonster(tp,82324106,0,0x4011,0,0,1,RACE_FIEND,ATTRIBUTE_DARK) then - for i=1,2 do - local token=Duel.CreateToken(tp,82324106) - Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UNRELEASABLE_NONSUM) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetValue(1) - e1:SetReset(RESET_EVENT+0x1fe0000) - token:RegisterEffect(e1,true) - end - Duel.SpecialSummonComplete() - end -end diff --git a/script/c82324312.lua b/script/c82324312.lua deleted file mode 100644 index 2af753b4ca..0000000000 --- a/script/c82324312.lua +++ /dev/null @@ -1,49 +0,0 @@ ---ゴブリン偵察部隊 -function c82324312.initial_effect(c) - --confirm - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(82324312,0)) - e1:SetCategory(CATEGORY_TOGRAVE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_BATTLE_DAMAGE) - e1:SetCondition(c82324312.condition) - e1:SetOperation(c82324312.operation) - c:RegisterEffect(e1) - --to defence - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_PHASE+PHASE_BATTLE) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCondition(c82324312.poscon) - e2:SetOperation(c82324312.posop) - c:RegisterEffect(e2) -end -function c82324312.condition(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp and Duel.GetAttackTarget()==nil -end -function c82324312.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetFieldGroup(ep,LOCATION_HAND,0) - if g:GetCount()==0 then return end - local sg=g:RandomSelect(ep,1) - Duel.ConfirmCards(tp,sg) - if sg:GetFirst():IsType(TYPE_SPELL) then - Duel.SendtoGrave(sg,REASON_EFFECT) - end - Duel.ShuffleHand(1-tp) -end -function c82324312.poscon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetAttackedCount()>0 -end -function c82324312.posop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsAttackPos() then - Duel.ChangePosition(c,POS_FACEUP_DEFENCE) - end - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_CHANGE_POSITION) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_COPY_INHERIT) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,3) - c:RegisterEffect(e1) -end diff --git a/script/c8233522.lua b/script/c8233522.lua deleted file mode 100644 index 3cff9c44a1..0000000000 --- a/script/c8233522.lua +++ /dev/null @@ -1,34 +0,0 @@ ---A・O・J サイクルリーダー -function c8233522.initial_effect(c) - --remove - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(8233522,0)) - e1:SetCategory(CATEGORY_REMOVE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetRange(LOCATION_HAND) - e1:SetCost(c8233522.cost) - e1:SetTarget(c8233522.target) - e1:SetOperation(c8233522.operation) - c:RegisterEffect(e1) -end -function c8233522.cost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToGraveAsCost() and c:IsDiscardable() end - Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD) -end -function c8233522.filter(c) - return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsAbleToRemove() -end -function c8233522.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_GRAVE) and c8233522.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c8233522.filter,tp,0,LOCATION_GRAVE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,c8233522.filter,tp,0,LOCATION_GRAVE,1,2,nil) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,0) -end -function c8233522.operation(e,tp,eg,ep,ev,re,r,rp,chk) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) - Duel.Remove(g,POS_FACEUP,REASON_EFFECT) -end diff --git a/script/c82340056.lua b/script/c82340056.lua deleted file mode 100644 index face30994b..0000000000 --- a/script/c82340056.lua +++ /dev/null @@ -1,63 +0,0 @@ ---栄誉の贄 -function c82340056.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetCondition(c82340056.condition) - e1:SetTarget(c82340056.target) - e1:SetOperation(c82340056.activate) - c:RegisterEffect(e1) -end -function c82340056.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetLP(tp)<=3000 and Duel.GetTurnPlayer()~=tp and Duel.GetAttackTarget()==nil -end -function c82340056.filter(c) - return c:IsSetCard(0x21) and c:IsAbleToHand() -end -function c82340056.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>1 - and Duel.IsPlayerCanSpecialSummonMonster(tp,82340057,0,0x4011,0,0,1,RACE_ROCK,ATTRIBUTE_EARTH) - and Duel.IsExistingMatchingCard(c82340056.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,2,0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,0,0) -end -function c82340056.activate(e,tp,eg,ep,ev,re,r,rp) - if not Duel.NegateAttack() then return end - if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 - or not Duel.IsPlayerCanSpecialSummonMonster(tp,82340057,0,0x4011,0,0,1,RACE_ROCK,ATTRIBUTE_EARTH) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c82340056.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()==0 then return end - Duel.BreakEffect() - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - Duel.ShuffleHand(tp) - for i=1,2 do - local token=Duel.CreateToken(tp,82340057) - Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UNRELEASABLE_NONSUM) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(1) - token:RegisterEffect(e1,true) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_UNRELEASABLE_SUM) - e2:SetReset(RESET_EVENT+0x1fe0000) - e2:SetValue(c82340056.sumlimit) - token:RegisterEffect(e2,true) - local e3=Effect.CreateEffect(e:GetHandler()) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL) - e3:SetReset(RESET_EVENT+0x1fe0000) - e3:SetValue(1) - token:RegisterEffect(e3,true) - end - Duel.SpecialSummonComplete() -end -function c82340056.sumlimit(e,c) - return not c:IsSetCard(0x21) -end diff --git a/script/c82361206.lua b/script/c82361206.lua deleted file mode 100644 index 03c7daa461..0000000000 --- a/script/c82361206.lua +++ /dev/null @@ -1,61 +0,0 @@ ---霊滅独鈷杵 -function c82361206.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c82361206.target) - e1:SetOperation(c82361206.operation) - c:RegisterEffect(e1) - --equip limit - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_EQUIP_LIMIT) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetValue(1) - c:RegisterEffect(e2) - --remove - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(82361206,0)) - e3:SetCategory(CATEGORY_REMOVE) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetCode(EVENT_BATTLE_DAMAGE) - e3:SetRange(LOCATION_SZONE) - e3:SetCondition(c82361206.rmcon) - e3:SetTarget(c82361206.rmtg) - e3:SetOperation(c82361206.rmop) - c:RegisterEffect(e3) -end -function c82361206.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c82361206.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,e:GetHandler(),tc) - end -end -function c82361206.rmcon(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp and eg:GetFirst()==e:GetHandler():GetEquipTarget() -end -function c82361206.filter(c) - return c:IsType(TYPE_MONSTER) and c:IsAbleToRemove() -end -function c82361206.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(1-tp) and c82361206.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c82361206.filter,tp,0,LOCATION_GRAVE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,c82361206.filter,tp,0,LOCATION_GRAVE,1,2,nil) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,0) -end -function c82361206.rmop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) - Duel.Remove(g,POS_FACEUP,REASON_EFFECT) -end diff --git a/script/c82377606.lua b/script/c82377606.lua deleted file mode 100644 index 292b17f0d8..0000000000 --- a/script/c82377606.lua +++ /dev/null @@ -1,38 +0,0 @@ ---A・O・J アンリミッター -function c82377606.initial_effect(c) - --atkup - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(82377606,0)) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c82377606.atkcost) - e1:SetTarget(c82377606.atktg) - e1:SetOperation(c82377606.atkop) - c:RegisterEffect(e1) -end -function c82377606.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end -function c82377606.filter(c) - return c:IsFaceup() and c:IsSetCard(0x1) -end -function c82377606.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c82377606.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c82377606.filter,tp,LOCATION_MZONE,0,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c82377606.filter,tp,LOCATION_MZONE,0,1,1,nil) -end -function c82377606.atkop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) and tc:IsFaceup() then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_BASE_ATTACK) - e1:SetValue(tc:GetTextAttack()*2) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - end -end diff --git a/script/c82382815.lua b/script/c82382815.lua deleted file mode 100644 index 08ada070ae..0000000000 --- a/script/c82382815.lua +++ /dev/null @@ -1,59 +0,0 @@ ---王者の看破 -function c82382815.initial_effect(c) - --Activate(summon) - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DISABLE_SUMMON+CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_SUMMON) - e1:SetCondition(c82382815.condition1) - e1:SetTarget(c82382815.target1) - e1:SetOperation(c82382815.activate1) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_FLIP_SUMMON) - c:RegisterEffect(e2) - local e3=e1:Clone() - e3:SetCode(EVENT_SPSUMMON) - c:RegisterEffect(e3) - --Activate(effect) - local e4=Effect.CreateEffect(c) - e4:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) - e4:SetType(EFFECT_TYPE_ACTIVATE) - e4:SetCode(EVENT_CHAINING) - e4:SetCondition(c82382815.condition2) - e4:SetTarget(c82382815.target2) - e4:SetOperation(c82382815.activate2) - c:RegisterEffect(e4) -end -function c82382815.cfilter(c) - return c:IsFaceup() and c:IsLevelAbove(7) and c:IsType(TYPE_NORMAL) -end -function c82382815.condition1(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentChain()==0 and Duel.IsExistingMatchingCard(c82382815.cfilter,tp,LOCATION_MZONE,0,1,nil) -end -function c82382815.target1(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DISABLE_SUMMON,eg,eg:GetCount(),0,0) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,eg:GetCount(),0,0) -end -function c82382815.activate1(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateSummon(eg) - Duel.Destroy(eg,REASON_EFFECT) -end -function c82382815.condition2(e,tp,eg,ep,ev,re,r,rp) - return re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev) - and Duel.IsExistingMatchingCard(c82382815.cfilter,tp,LOCATION_MZONE,0,1,nil) -end -function c82382815.target2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) - end -end -function c82382815.activate2(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateActivation(ev) - if re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(eg,REASON_EFFECT) - end -end diff --git a/script/c82386016.lua b/script/c82386016.lua deleted file mode 100644 index 46388cfc18..0000000000 --- a/script/c82386016.lua +++ /dev/null @@ -1,48 +0,0 @@ ---烏合の行進 -function c82386016.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c82386016.cost) - e1:SetTarget(c82386016.target) - e1:SetOperation(c82386016.activate) - c:RegisterEffect(e1) - Duel.AddCustomActivityCounter(82386016,ACTIVITY_CHAIN,c82386016.chainfilter) -end -function c82386016.chainfilter(re,tp,cid) - return not re:IsActiveType(TYPE_SPELL+TYPE_TRAP) -end -function c82386016.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetCustomActivityCount(82386016,tp,ACTIVITY_CHAIN)==0 end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) - e1:SetCode(EFFECT_CANNOT_ACTIVATE) - e1:SetTargetRange(1,0) - e1:SetValue(c82386016.aclimit) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function c82386016.aclimit(e,re,tp) - return re:IsActiveType(TYPE_SPELL+TYPE_TRAP) -end -function c82386016.filter(c) - return c:IsFaceup() and c:IsRace(RACE_BEAST+RACE_BEASTWARRIOR+RACE_WINDBEAST) -end -function c82386016.target(e,tp,eg,ep,ev,re,r,rp,chk) - local g=Duel.GetMatchingGroup(c82386016.filter,tp,LOCATION_MZONE,0,nil) - local ct=g:GetClassCount(Card.GetRace) - if chk==0 then return ct>0 and Duel.IsPlayerCanDraw(tp,ct) end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(ct) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,ct) -end -function c82386016.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c82386016.filter,tp,LOCATION_MZONE,0,nil) - local ct=g:GetClassCount(Card.GetRace) - local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) - Duel.Draw(p,ct,REASON_EFFECT) -end diff --git a/script/c82419869.lua b/script/c82419869.lua deleted file mode 100644 index 9818d0b1e9..0000000000 --- a/script/c82419869.lua +++ /dev/null @@ -1,62 +0,0 @@ ---U.A. Perfect Ace -function c82419869.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(1,82419869) - e1:SetCondition(c82419869.spcon) - e1:SetOperation(c82419869.spop) - c:RegisterEffect(e1) - --Negate - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(82419869,0)) - e2:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_CHAINING) - e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCondition(c82419869.discon) - e2:SetCost(c82419869.discost) - e2:SetTarget(c82419869.distg) - e2:SetOperation(c82419869.disop) - c:RegisterEffect(e2) -end -function c82419869.spfilter(c) - return c:IsFaceup() and c:IsSetCard(0xb2) and not c:IsCode(82419869) and c:IsAbleToHandAsCost() -end -function c82419869.spcon(e,c) - if c==nil then return true end - return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-1 - and Duel.IsExistingMatchingCard(c82419869.spfilter,c:GetControler(),LOCATION_MZONE,0,1,nil) -end -function c82419869.spop(e,tp,eg,ep,ev,re,r,rp,c) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g=Duel.SelectMatchingCard(tp,c82419869.spfilter,tp,LOCATION_MZONE,0,1,1,nil) - Duel.SendtoHand(g,nil,REASON_COST) -end -function c82419869.discon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsStatus(STATUS_BATTLE_DESTROYED) then return false end - return Duel.IsChainNegatable(ev) and Duel.GetTurnPlayer()~=tp -end -function c82419869.discost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) -end -function c82419869.distg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) - end -end -function c82419869.disop(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateActivation(ev) - if re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(eg,REASON_EFFECT) - end -end diff --git a/script/c82422049.lua b/script/c82422049.lua deleted file mode 100644 index 5aa0431a34..0000000000 --- a/script/c82422049.lua +++ /dev/null @@ -1,42 +0,0 @@ ---ガスタへの祈り -function c82422049.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TODECK+CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_END_PHASE) - e1:SetTarget(c82422049.target) - e1:SetOperation(c82422049.activate) - c:RegisterEffect(e1) -end -function c82422049.filter1(c) - return c:IsSetCard(0x10) and c:IsType(TYPE_MONSTER) and c:IsAbleToDeck() -end -function c82422049.filter2(c,e,tp) - return c:IsSetCard(0x10) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) - and Duel.IsExistingTarget(c82422049.filter1,tp,LOCATION_GRAVE,0,2,c) -end -function c82422049.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c82422049.filter2,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g1=Duel.SelectTarget(tp,c82422049.filter2,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g2=Duel.SelectTarget(tp,c82422049.filter1,tp,LOCATION_GRAVE,0,2,2,g1:GetFirst()) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g2,2,0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g1,1,0,0) -end -function c82422049.activate(e,tp,eg,ep,ev,re,r,rp) - local ex,g1=Duel.GetOperationInfo(0,CATEGORY_TODECK) - local ex,g2=Duel.GetOperationInfo(0,CATEGORY_SPECIAL_SUMMON) - if g1:GetFirst():IsRelateToEffect(e) and g1:GetNext():IsRelateToEffect(e) then - Duel.SendtoDeck(g1,nil,2,REASON_EFFECT) - if g2:GetFirst():IsRelateToEffect(e) then - Duel.BreakEffect() - Duel.SpecialSummon(g2,0,tp,tp,false,false,POS_FACEUP) - end - end -end diff --git a/script/c82432018.lua b/script/c82432018.lua deleted file mode 100644 index e49a74c624..0000000000 --- a/script/c82432018.lua +++ /dev/null @@ -1,63 +0,0 @@ ---凶暴化の仮面 -function c82432018.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c82432018.target) - e1:SetOperation(c82432018.operation) - c:RegisterEffect(e1) - --Atk,def - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(1000) - c:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_EQUIP) - e3:SetCode(EFFECT_UPDATE_DEFENCE) - e3:SetValue(-1000) - c:RegisterEffect(e3) - --Equip limit - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetCode(EFFECT_EQUIP_LIMIT) - e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e4:SetValue(1) - c:RegisterEffect(e4) - --cost - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e5:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e5:SetCode(EVENT_PHASE+PHASE_STANDBY) - e5:SetRange(LOCATION_SZONE) - e5:SetCountLimit(1) - e5:SetCondition(c82432018.mtcon) - e5:SetOperation(c82432018.mtop) - c:RegisterEffect(e5) -end -function c82432018.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:GetLocation()==LOCATION_MZONE and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c82432018.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,e:GetHandler(),tc) - end -end -function c82432018.mtcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c82432018.mtop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLP(tp)>1000 and Duel.SelectYesNo(tp,aux.Stringid(82432018,0)) then - Duel.PayLPCost(tp,1000) - else - Duel.Destroy(e:GetHandler(),REASON_RULE) - end -end diff --git a/script/c82452993.lua b/script/c82452993.lua deleted file mode 100644 index 89cb5b6a91..0000000000 --- a/script/c82452993.lua +++ /dev/null @@ -1,47 +0,0 @@ ---孤高の格闘家 -function c82452993.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c82452993.target) - e1:SetOperation(c82452993.operation) - c:RegisterEffect(e1) -end -function c82452993.filter(c) - local code=c:GetCode() - return c:IsFaceup() and (code==8508055 or code==3810071 or code==49814180) -end -function c82452993.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - local g=Duel.GetFieldGroup(tp,LOCATION_MZONE,0) - if chk==0 then return g:GetCount()==1 and c82452993.filter(g:GetFirst()) end - Duel.SetTargetCard(g) -end -function c82452993.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsRelateToEffect(e) then - c:SetCardTarget(tc) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_OWNER_RELATE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e1:SetCondition(c82452993.rcon) - e1:SetValue(1) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1,true) - local e2=e1:Clone() - e2:SetCode(EFFECT_IMMUNE_EFFECT) - e2:SetValue(c82452993.efilter) - tc:RegisterEffect(e2,true) - end -end -function c82452993.rcon(e) - return e:GetOwner():IsHasCardTarget(e:GetHandler()) -end -function c82452993.efilter(e,re) - return re:IsActiveType(TYPE_MONSTER) and re:GetOwnerPlayer()~=e:GetOwnerPlayer() -end diff --git a/script/c82458280.lua b/script/c82458280.lua deleted file mode 100644 index 5d73eb36c9..0000000000 --- a/script/c82458280.lua +++ /dev/null @@ -1,57 +0,0 @@ ---マジック・ホール・ゴーレム -function c82458280.initial_effect(c) - --direct attack - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(82458280,0)) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCondition(c82458280.condition) - e1:SetTarget(c82458280.target) - e1:SetOperation(c82458280.operation) - c:RegisterEffect(e1) -end -function c82458280.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()==PHASE_MAIN1 -end -function c82458280.filter(c) - return c:IsFaceup() -end -function c82458280.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c82458280.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c82458280.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - local g=Duel.SelectTarget(tp,c82458280.filter,tp,LOCATION_MZONE,0,1,1,nil) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetProperty(EFFECT_FLAG_OATH) - e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetTarget(c82458280.ftarget) - e1:SetLabel(g:GetFirst():GetFieldID()) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function c82458280.ftarget(e,c) - return e:GetLabel()~=c:GetFieldID() -end -function c82458280.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e1:SetValue(tc:GetAttack()/2) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DIRECT_ATTACK) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e2) - end -end diff --git a/script/c82482194.lua b/script/c82482194.lua deleted file mode 100644 index c8ba69dd09..0000000000 --- a/script/c82482194.lua +++ /dev/null @@ -1,30 +0,0 @@ ---ミレニアム・スコーピオン -function c82482194.initial_effect(c) - --atkup - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(82482194,0)) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c82482194.atcon) - e1:SetOperation(c82482194.atop) - c:RegisterEffect(e1) -end -function c82482194.filter(c,rc) - return c:IsReason(REASON_BATTLE) and c:IsLocation(LOCATION_GRAVE) and c:GetReasonCard()==rc -end -function c82482194.atcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c82482194.filter,1,nil,e:GetHandler()) -end -function c82482194.atop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(500) - e1:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e1) - end -end diff --git a/script/c82498947.lua b/script/c82498947.lua deleted file mode 100644 index 813f50a2cf..0000000000 --- a/script/c82498947.lua +++ /dev/null @@ -1,21 +0,0 @@ ---氷結界の守護陣 -function c82498947.initial_effect(c) - --cannot attack - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(0,LOCATION_MZONE) - e1:SetTarget(c82498947.tg) - e1:SetCondition(c82498947.con) - c:RegisterEffect(e1) -end -function c82498947.filter(c) - return c:IsFaceup() and c:IsSetCard(0x2f) -end -function c82498947.con(e) - return Duel.IsExistingMatchingCard(c82498947.filter,e:GetHandler():GetControler(),LOCATION_MZONE,0,1,e:GetHandler()) -end -function c82498947.tg(e,c) - return c:GetAttack()>=e:GetHandler():GetDefence() -end diff --git a/script/c8251996.lua b/script/c8251996.lua deleted file mode 100644 index f08985564a..0000000000 --- a/script/c8251996.lua +++ /dev/null @@ -1,29 +0,0 @@ ---おジャマ・デルタハリケーン!! -function c8251996.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c8251996.condition) - e1:SetTarget(c8251996.target) - e1:SetOperation(c8251996.activate) - c:RegisterEffect(e1) -end -function c8251996.cfilter(c,code) - return c:IsFaceup() and c:IsCode(code) -end -function c8251996.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c8251996.cfilter,tp,LOCATION_MZONE,0,1,nil,12482652) - and Duel.IsExistingMatchingCard(c8251996.cfilter,tp,LOCATION_MZONE,0,1,nil,42941100) - and Duel.IsExistingMatchingCard(c8251996.cfilter,tp,LOCATION_MZONE,0,1,nil,79335209) -end -function c8251996.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDestructable,tp,0,LOCATION_ONFIELD,1,nil) end - local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,0,LOCATION_ONFIELD,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c8251996.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,0,LOCATION_ONFIELD,nil) - Duel.Destroy(g,REASON_EFFECT) -end diff --git a/script/c82529174.lua b/script/c82529174.lua deleted file mode 100644 index 09cc1f4280..0000000000 --- a/script/c82529174.lua +++ /dev/null @@ -1,27 +0,0 @@ ---希望の光 -function c82529174.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TODECK) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c82529174.target) - e1:SetOperation(c82529174.activate) - c:RegisterEffect(e1) -end -function c82529174.filter(c) - return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsAbleToDeck() -end -function c82529174.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(1-tp) and c82529174.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c82529174.filter,tp,LOCATION_GRAVE,0,2,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectTarget(tp,c82529174.filter,tp,LOCATION_GRAVE,0,2,2,nil) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,2,0,0) -end -function c82529174.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local sg=g:Filter(Card.IsRelateToEffect,nil,e) - Duel.SendtoDeck(sg,nil,2,REASON_EFFECT) -end diff --git a/script/c82542267.lua b/script/c82542267.lua deleted file mode 100644 index 5595afa34c..0000000000 --- a/script/c82542267.lua +++ /dev/null @@ -1,27 +0,0 @@ ---墓掘りグール -function c82542267.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_REMOVE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c82542267.target) - e1:SetOperation(c82542267.activate) - c:RegisterEffect(e1) -end -function c82542267.filter(c) - return c:IsAbleToRemove() and c:IsType(TYPE_MONSTER) -end -function c82542267.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(1-tp) and c82542267.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c82542267.filter,tp,0,LOCATION_GRAVE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,c82542267.filter,tp,0,LOCATION_GRAVE,1,2,nil) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,0) -end -function c82542267.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local sg=g:Filter(Card.IsRelateToEffect,nil,e) - Duel.Remove(sg,POS_FACEUP,REASON_EFFECT) -end diff --git a/script/c82556058.lua b/script/c82556058.lua deleted file mode 100644 index f6520f0bd9..0000000000 --- a/script/c82556058.lua +++ /dev/null @@ -1,65 +0,0 @@ ---デモニック・モーター・Ω -function c82556058.initial_effect(c) - --token - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(82556058,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetCountLimit(1) - e1:SetCondition(c82556058.spcon) - e1:SetTarget(c82556058.sptg) - e1:SetOperation(c82556058.spop) - c:RegisterEffect(e1) - --atkup - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(82556058,1)) - e2:SetCategory(CATEGORY_ATKCHANGE) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetOperation(c82556058.atkop) - c:RegisterEffect(e2) -end -function c82556058.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c82556058.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0) -end -function c82556058.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - if not Duel.IsPlayerCanSpecialSummonMonster(tp,82556059,0,0x4011,200,200,1,RACE_MACHINE,ATTRIBUTE_EARTH) then return end - local token=Duel.CreateToken(tp,82556059) - Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP_ATTACK) -end -function c82556058.atkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_COPY_INHERIT) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(1000) - e1:SetReset(RESET_EVENT+0x1ff0000+RESET_PHASE+PHASE_END) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(82556058,2)) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_PHASE+PHASE_END) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetTarget(c82556058.destg) - e2:SetOperation(c82556058.desop) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - c:RegisterEffect(e2) -end -function c82556058.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0) -end -function c82556058.desop(e,tp,eg,ep,ev,re,r,rp) - Duel.Destroy(e:GetHandler(),REASON_EFFECT) -end diff --git a/script/c82579942.lua b/script/c82579942.lua deleted file mode 100644 index 8ae6350994..0000000000 --- a/script/c82579942.lua +++ /dev/null @@ -1,29 +0,0 @@ ---ライトレイ マドール -function c82579942.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c82579942.spcon) - c:RegisterEffect(e1) - -- - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EFFECT_INDESTRUCTABLE_COUNT) - e2:SetCountLimit(1) - e2:SetValue(c82579942.valcon) - c:RegisterEffect(e2) -end -function c82579942.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(Card.IsAttribute,tp,LOCATION_REMOVED,0,3,nil,ATTRIBUTE_LIGHT) -end -function c82579942.valcon(e,re,r,rp) - return bit.band(r,REASON_BATTLE)~=0 -end diff --git a/script/c82593786.lua b/script/c82593786.lua deleted file mode 100644 index e4bd0bb5d3..0000000000 --- a/script/c82593786.lua +++ /dev/null @@ -1,25 +0,0 @@ ---タスケルトン -function c82593786.initial_effect(c) - --disable attack - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(82593786,0)) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(TIMING_BATTLE_PHASE) - e1:SetRange(LOCATION_GRAVE) - e1:SetCountLimit(1,82593786+EFFECT_COUNT_CODE_DUEL) - e1:SetCondition(c82593786.condition) - e1:SetCost(c82593786.cost) - e1:SetOperation(c82593786.operation) - c:RegisterEffect(e1) -end -function c82593786.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetAttacker()~=nil -end -function c82593786.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) -end -function c82593786.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateAttack() -end diff --git a/script/c82633039.lua b/script/c82633039.lua deleted file mode 100644 index 4a3a2120e4..0000000000 --- a/script/c82633039.lua +++ /dev/null @@ -1,70 +0,0 @@ ---鳥銃士カステル -function c82633039.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,4,2) - c:EnableReviveLimit() - --pos - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(82633039,0)) - e1:SetCategory(CATEGORY_POSITION) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCountLimit(1,82633039) - e1:SetCost(c82633039.setcost) - e1:SetTarget(c82633039.settg) - e1:SetOperation(c82633039.setop) - c:RegisterEffect(e1) - --todeck - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(82633039,1)) - e2:SetCategory(CATEGORY_TODECK) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCountLimit(1,82633039) - e2:SetCost(c82633039.tdcost) - e2:SetTarget(c82633039.tdtg) - e2:SetOperation(c82633039.tdop) - c:RegisterEffect(e2) -end -function c82633039.setcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c82633039.setfilter(c) - return c:IsFaceup() and c:IsCanTurnSet() -end -function c82633039.settg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c82633039.setfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c82633039.setfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE) - local g=Duel.SelectTarget(tp,c82633039.setfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0) -end -function c82633039.setop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - Duel.ChangePosition(tc,POS_FACEDOWN_DEFENCE) - end -end -function c82633039.tdcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,2,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,2,2,REASON_COST) -end -function c82633039.tdfilter(c) - return c:IsFaceup() and c:IsAbleToDeck() -end -function c82633039.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and c82633039.tdfilter(chkc) and chkc~=e:GetHandler() end - if chk==0 then return Duel.IsExistingTarget(c82633039.tdfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectTarget(tp,c82633039.tdfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0) -end -function c82633039.tdop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoDeck(tc,nil,2,REASON_EFFECT) - end -end diff --git a/script/c82633308.lua b/script/c82633308.lua deleted file mode 100644 index 56cbe82354..0000000000 --- a/script/c82633308.lua +++ /dev/null @@ -1,36 +0,0 @@ ---サイコ・チャージ -function c82633308.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c82633308.target) - e1:SetOperation(c82633308.activate) - c:RegisterEffect(e1) -end -function c82633308.filter(c) - return c:IsRace(RACE_PSYCHO) and c:IsAbleToDeck() -end -function c82633308.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c82633308.filter(chkc) end - if chk==0 then return Duel.IsPlayerCanDraw(tp,2) - and Duel.IsExistingTarget(c82633308.filter,tp,LOCATION_GRAVE,0,3,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectTarget(tp,c82633308.filter,tp,LOCATION_GRAVE,0,3,3,nil) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2) -end -function c82633308.activate(e,tp,eg,ep,ev,re,r,rp) - local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - if not tg or tg:FilterCount(Card.IsRelateToEffect,nil,e)~=3 then return end - Duel.SendtoDeck(tg,nil,0,REASON_EFFECT) - local g=Duel.GetOperatedGroup() - local ct=g:FilterCount(Card.IsLocation,nil,LOCATION_DECK+LOCATION_EXTRA) - if ct==3 then - Duel.ShuffleDeck(tp) - Duel.BreakEffect() - Duel.Draw(tp,2,REASON_EFFECT) - end -end diff --git a/script/c82639107.lua b/script/c82639107.lua deleted file mode 100644 index 04f5ad24e4..0000000000 --- a/script/c82639107.lua +++ /dev/null @@ -1,39 +0,0 @@ ---コンバート・コンタクト -function c82639107.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c82639107.condition) - e1:SetTarget(c82639107.target) - e1:SetOperation(c82639107.activate) - c:RegisterEffect(e1) -end -function c82639107.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 -end -function c82639107.filter(c) - return c:IsSetCard(0x1f) and c:IsAbleToGrave() -end -function c82639107.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp,2) - and Duel.IsExistingMatchingCard(c82639107.filter,tp,LOCATION_HAND,0,1,nil) - and Duel.IsExistingMatchingCard(c82639107.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2) -end -function c82639107.activate(e,tp,eg,ep,ev,re,r,rp) - local g1=Duel.GetMatchingGroup(c82639107.filter,tp,LOCATION_HAND,0,nil) - local g2=Duel.GetMatchingGroup(c82639107.filter,tp,LOCATION_DECK,0,nil) - if g1:GetCount()>0 and g2:GetCount()>0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local sg1=g1:Select(tp,1,1,nil) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local sg2=g2:Select(tp,1,1,nil) - sg1:Merge(sg2) - Duel.SendtoGrave(sg1,REASON_EFFECT) - Duel.ShuffleDeck(tp) - Duel.BreakEffect() - Duel.Draw(tp,2,REASON_EFFECT) - end -end diff --git a/script/c82642348.lua b/script/c82642348.lua deleted file mode 100644 index c7adb762cf..0000000000 --- a/script/c82642348.lua +++ /dev/null @@ -1,30 +0,0 @@ ---クルーエル -function c82642348.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(82642348,0)) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_COIN) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetCondition(c82642348.descon) - e1:SetTarget(c82642348.destg) - e1:SetOperation(c82642348.desop) - c:RegisterEffect(e1) -end -function c82642348.descon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) -end -function c82642348.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_COIN,nil,0,tp,1) -end -function c82642348.desop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_COIN) - local coin=Duel.SelectOption(tp,60,61) - local res=Duel.TossCoin(tp,1) - if coin~=res then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectMatchingCard(tp,Card.IsDestructable,tp,0,LOCATION_MZONE,1,1,nil) - Duel.Destroy(g,REASON_EFFECT) - end -end diff --git a/script/c82670878.lua b/script/c82670878.lua deleted file mode 100644 index 7a2b5fabbf..0000000000 --- a/script/c82670878.lua +++ /dev/null @@ -1,113 +0,0 @@ ---血涙のオーガ -function c82670878.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(82670878,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(82670878) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c82670878.condition) - e1:SetTarget(c82670878.target) - e1:SetOperation(c82670878.operation) - c:RegisterEffect(e1) - --atk/def up - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(82670878,1)) - e2:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetCondition(c82670878.adcon) - e2:SetOperation(c82670878.adop) - c:RegisterEffect(e2) - if not c82670878.global_check then - c82670878.global_check=true - c82670878[0]=0 - c82670878[1]=0 - local ge1=Effect.CreateEffect(c) - ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - ge1:SetCode(EVENT_ATTACK_ANNOUNCE) - ge1:SetOperation(c82670878.check) - Duel.RegisterEffect(ge1,0) - local ge2=Effect.CreateEffect(c) - ge2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - ge2:SetCode(EVENT_ATTACK_DISABLED) - ge2:SetOperation(c82670878.check2) - Duel.RegisterEffect(ge2,0) - local ge3=Effect.CreateEffect(c) - ge3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - ge3:SetCode(EVENT_PHASE_START+PHASE_DRAW) - ge3:SetOperation(c82670878.clear) - Duel.RegisterEffect(ge3,0) - end -end -function c82670878.check(e,tp,eg,ep,ev,re,r,rp) - local tc=eg:GetFirst() - if Duel.GetAttackTarget()==nil then - c82670878[1-tc:GetControler()]=c82670878[1-tc:GetControler()]+1 - if c82670878[1-tc:GetControler()]==1 then - c82670878[2]=tc - tc:RegisterFlagEffect(82670878,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) - elseif c82670878[1-tc:GetControler()]==2 then - Duel.RaiseEvent(tc,82670878,e,0,0,0,0) - end - end -end -function c82670878.check2(e,tp,eg,ep,ev,re,r,rp) - local tc=eg:GetFirst() - if tc:GetFlagEffect(82670878)~=0 and Duel.GetAttackTarget()~=nil then - c82670878[1-tc:GetControler()]=c82670878[1-tc:GetControler()]-1 - end -end -function c82670878.clear(e,tp,eg,ep,ev,re,r,rp) - c82670878[0]=0 - c82670878[1]=0 -end -function c82670878.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp and Duel.GetAttackTarget()==nil and c82670878[tp]==2 -end -function c82670878.target(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0) -end -function c82670878.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,1,tp,tp,false,false,POS_FACEUP) - end -end -function c82670878.adcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+1 -end -function c82670878.adop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=c82670878[2] - if c:IsFaceup() and c:IsRelateToEffect(e) then - if tc and tc:GetFlagEffect(82670878) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetReset(RESET_EVENT+0x1ff0000) - e1:SetValue(tc:GetAttack()) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_SET_DEFENCE_FINAL) - e2:SetValue(tc:GetDefence()) - c:RegisterEffect(e2) - end - --at limit - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET) - e3:SetRange(LOCATION_MZONE) - e3:SetTargetRange(0,LOCATION_MZONE) - e3:SetValue(c82670878.atlimit) - e3:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - c:RegisterEffect(e3) - end -end -function c82670878.atlimit(e,c) - return c~=e:GetHandler() -end diff --git a/script/c82693042.lua b/script/c82693042.lua deleted file mode 100644 index 35893ee7a5..0000000000 --- a/script/c82693042.lua +++ /dev/null @@ -1,51 +0,0 @@ ---混沌球体 -function c82693042.initial_effect(c) - --attribute - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_ADD_ATTRIBUTE) - e1:SetValue(ATTRIBUTE_LIGHT) - c:RegisterEffect(e1) - --battle indes - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EFFECT_INDESTRUCTABLE_COUNT) - e2:SetCountLimit(1) - e2:SetValue(c82693042.valcon) - c:RegisterEffect(e2) - --search - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(82693042,0)) - e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_SUMMON_SUCCESS) - e3:SetCondition(c82693042.thcon) - e3:SetTarget(c82693042.thtg) - e3:SetOperation(c82693042.thop) - c:RegisterEffect(e3) -end -function c82693042.valcon(e,re,r,rp) - return bit.band(r,REASON_BATTLE)~=0 -end -function c82693042.thcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_ADVANCE -end -function c82693042.filter(c) - return c:GetLevel()==3 and c:IsAbleToHand() -end -function c82693042.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c82693042.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c82693042.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c82693042.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c82693917.lua b/script/c82693917.lua deleted file mode 100644 index 7a455aaeaa..0000000000 --- a/script/c82693917.lua +++ /dev/null @@ -1,74 +0,0 @@ ---フォーチュンレディ・ウインディー -function c82693917.initial_effect(c) - --atk,def - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_SET_ATTACK) - e1:SetValue(c82693917.value) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_SET_DEFENCE) - c:RegisterEffect(e2) - --level up - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(82693917,0)) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1) - e3:SetCode(EVENT_PHASE+PHASE_STANDBY) - e3:SetCondition(c82693917.lvcon) - e3:SetOperation(c82693917.lvop) - c:RegisterEffect(e3) - --destroy - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(82693917,1)) - e4:SetCategory(CATEGORY_DESTROY) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e4:SetCode(EVENT_SUMMON_SUCCESS) - e4:SetTarget(c82693917.destg) - e4:SetOperation(c82693917.desop) - c:RegisterEffect(e4) -end -function c82693917.value(e,c) - return c:GetLevel()*300 -end -function c82693917.lvcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp and e:GetHandler():IsLevelAbove(1) and e:GetHandler():IsLevelBelow(11) -end -function c82693917.lvop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFacedown() or not c:IsRelateToEffect(e) or c:IsLevelAbove(12) then return end - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_LEVEL) - e1:SetValue(1) - e1:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e1) -end -function c82693917.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x31) -end -function c82693917.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable() -end -function c82693917.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local ct=Duel.GetMatchingGroupCount(c82693917.cfilter,tp,LOCATION_MZONE,0,nil) - local dt=Duel.GetMatchingGroupCount(c82693917.filter,tp,0,LOCATION_ONFIELD,nil) - e:SetLabel(ct) - return dt>=ct - end - local g=Duel.GetMatchingGroup(c82693917.filter,tp,0,LOCATION_ONFIELD,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,e:GetLabel(),0,0) -end -function c82693917.desop(e,tp,eg,ep,ev,re,r,rp) - local ct=Duel.GetMatchingGroupCount(c82693917.cfilter,tp,LOCATION_MZONE,0,nil) - local g=Duel.GetMatchingGroup(c82693917.filter,tp,0,LOCATION_ONFIELD,nil) - if ct>g:GetCount() then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local sg=g:Select(tp,ct,ct,nil) - Duel.HintSelection(sg) - Duel.Destroy(sg,REASON_EFFECT) -end diff --git a/script/c82705573.lua b/script/c82705573.lua deleted file mode 100644 index 13e8d7bbaa..0000000000 --- a/script/c82705573.lua +++ /dev/null @@ -1,37 +0,0 @@ ---バックファイア -function c82705573.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --damage - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(82705573,0)) - e2:SetCategory(CATEGORY_DAMAGE) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetRange(LOCATION_SZONE) - e2:SetCondition(c82705573.condition) - e2:SetTarget(c82705573.target) - e2:SetOperation(c82705573.operation) - c:RegisterEffect(e2) -end -function c82705573.filter(c,tp) - return c:IsPreviousLocation(LOCATION_MZONE) and c:GetPreviousControler()==tp - and c:GetControler()==tp and c:IsReason(REASON_DESTROY) and c:IsAttribute(ATTRIBUTE_FIRE) -end -function c82705573.condition(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c82705573.filter,1,nil,tp) -end -function c82705573.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsRelateToEffect(e) end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(500) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,500) -end -function c82705573.operation(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c82732705.lua b/script/c82732705.lua deleted file mode 100644 index b437996486..0000000000 --- a/script/c82732705.lua +++ /dev/null @@ -1,24 +0,0 @@ ---スキルドレイン -function c82732705.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c82732705.cost) - c:RegisterEffect(e1) - --disable - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e2:SetTarget(c82732705.disable) - e2:SetCode(EFFECT_DISABLE) - c:RegisterEffect(e2) -end -function c82732705.disable(e,c) - return c:IsType(TYPE_EFFECT) or bit.band(c:GetOriginalType(),TYPE_EFFECT)==TYPE_EFFECT -end -function c82732705.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,1000) end - Duel.PayLPCost(tp,1000) -end diff --git a/script/c82734805.lua b/script/c82734805.lua deleted file mode 100644 index 6240fa63f5..0000000000 --- a/script/c82734805.lua +++ /dev/null @@ -1,237 +0,0 @@ ---インフェルノイド・ティエラ -function c82734805.initial_effect(c) - c:EnableReviveLimit() - --fusion material - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_FUSION_MATERIAL) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCondition(c82734805.fscon) - e1:SetOperation(c82734805.fsop) - c:RegisterEffect(e1) - --spsummon success - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(82734805,0)) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetCondition(c82734805.con) - e2:SetTarget(c82734805.tg) - e2:SetOperation(c82734805.op) - c:RegisterEffect(e2) - --material check - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_MATERIAL_CHECK) - e3:SetValue(c82734805.valcheck) - e3:SetLabelObject(e2) - c:RegisterEffect(e3) -end -c82734805.material_count=2 -c82734805.material={14799437,23440231} -function c82734805.valcheck(e,c) - local ct=e:GetHandler():GetMaterial():GetClassCount(Card.GetCode) - e:GetLabelObject():SetLabel(ct) -end -function c82734805.con(e,tp,eg,ep,ev,re,r,rp) - return bit.band(e:GetHandler():GetSummonType(),SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION -end -function c82734805.tg(e,tp,eg,ep,ev,re,r,rp,chk) - local ct=e:GetLabel() - local con3,con5,con8,con10=nil - if ct>=3 then - con3=Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,LOCATION_EXTRA,0,3,nil) - and Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,0,LOCATION_EXTRA,3,nil) - end - if ct>=5 then - con5=Duel.IsPlayerCanDiscardDeck(tp,3) and Duel.IsPlayerCanDiscardDeck(1-tp,3) - end - if ct>=8 then - con8=Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_REMOVED,0,1,nil) - and Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_REMOVED,1,nil) - end - if ct>=10 then - con10=Duel.GetFieldGroupCount(tp,LOCATION_HAND,LOCATION_HAND)>0 - end - if chk==0 then return con3 or con5 or con8 or con10 end -end -function c82734805.op(e,tp,eg,ep,ev,re,r,rp) - local ct=e:GetLabel() - if ct>=3 then - local g1=Duel.GetMatchingGroup(Card.IsAbleToGrave,tp,LOCATION_EXTRA,0,nil) - local sg1=nil - if g1:GetCount()>=3 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - sg1=g1:Select(tp,3,3,nil) - else sg1=g1 end - local g2=Duel.GetMatchingGroup(Card.IsAbleToGrave,tp,0,LOCATION_EXTRA,nil) - local sg2=nil - if g2:GetCount()>=3 then - Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_TOGRAVE) - sg2=g2:Select(1-tp,3,3,nil) - else sg2=g2 end - sg1:Merge(sg2) - if sg1:GetCount()>0 then - Duel.SendtoGrave(sg1,REASON_EFFECT) - end - end - if ct>=5 then - Duel.BreakEffect() - Duel.DiscardDeck(tp,3,REASON_EFFECT) - Duel.DiscardDeck(1-tp,3,REASON_EFFECT) - end - if ct>=8 then - Duel.BreakEffect() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g1=Duel.SelectMatchingCard(tp,Card.IsFaceup,tp,LOCATION_REMOVED,0,1,3,nil) - Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_TOGRAVE) - local g2=Duel.SelectMatchingCard(1-tp,Card.IsFaceup,1-tp,LOCATION_REMOVED,0,1,3,nil) - g1:Merge(g2) - if g1:GetCount()>0 then - Duel.SendtoGrave(g1,REASON_EFFECT+REASON_RETURN) - end - end - if ct>=10 then - Duel.BreakEffect() - local g1=Duel.GetFieldGroup(tp,LOCATION_HAND,LOCATION_HAND) - Duel.SendtoGrave(g1,REASON_EFFECT) - end -end -function c82734805.fcfilter1(c,code1,code2,g) - local code=c:GetCode() - return (code==code1 or code==code2) and g:IsExists(Card.IsSetCard,1,c,0xbb) -end -function c82734805.fcfilter2(c,code,g) - return (c:IsCode(code) or c:IsHasEffect(EFFECT_FUSION_SUBSTITUTE)) and g:IsExists(Card.IsSetCard,1,c,0xbb) -end -function c82734805.fcfilter3(c,g) - return ((c:IsCode(14799437) or c:IsHasEffect(EFFECT_FUSION_SUBSTITUTE)) and g:IsExists(Card.IsCode,1,c,23440231)) - or ((c:IsCode(23440231) or c:IsHasEffect(EFFECT_FUSION_SUBSTITUTE)) and g:IsExists(Card.IsCode,1,c,14799437)) -end -function c82734805.fcfilter4(c,code) - return c:IsCode(code) or c:IsHasEffect(EFFECT_FUSION_SUBSTITUTE) -end -function c82734805.fcfilter7(c,chkf) - return aux.FConditionCheckF(c,chkf) and (c:IsSetCard(0xbb) or c:IsHasEffect(EFFECT_FUSION_SUBSTITUTE)) -end -function c82734805.fscon(e,g,gc,chkf) - if g==nil then return true end - if gc then - local mg=g:Clone() - mg:RemoveCard(gc) - if gc:IsHasEffect(EFFECT_FUSION_SUBSTITUTE) then - return mg:IsExists(c82734805.fcfilter1,1,nil,14799437,23440231,mg) - elseif gc:IsCode(14799437) then - return mg:IsExists(c82734805.fcfilter2,1,nil,23440231,mg) - elseif gc:IsCode(23440231) then - return mg:IsExists(c82734805.fcfilter2,1,nil,14799437,mg) - elseif gc:IsSetCard(0xbb) then - return mg:IsExists(c82734805.fcfilter3,1,nil,mg) - else - return false - end - end - local b1=0 local b2=0 local b3=0 local bs=0 - local fs=false - local tc=g:GetFirst() - while tc do - if tc:IsHasEffect(EFFECT_FUSION_SUBSTITUTE) then - bs=1 if aux.FConditionCheckF(tc,chkf) then fs=true end - elseif tc:IsCode(14799437) then - if b1==0 then b1=1 else b3=1 end if aux.FConditionCheckF(tc,chkf) then fs=true end - elseif tc:IsCode(23440231) then - if b2==0 then b2=1 else b3=1 end if aux.FConditionCheckF(tc,chkf) then fs=true end - elseif tc:IsSetCard(0xbb) then - b3=1 if aux.FConditionCheckF(tc,chkf) then fs=true end - end - tc=g:GetNext() - end - if chkf~=PLAYER_NONE then - return fs and b1+b2+b3+bs>=3 - else - return b1+b2+b3+bs>=3 - end -end -function c82734805.fsop(e,tp,eg,ep,ev,re,r,rp,gc,chkf) - local g1=Group.CreateGroup() - if not gc and chkf~=PLAYER_NONE then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL) - gc=eg:FilterSelect(tp,c82734805.fcfilter7,1,1,nil,chkf):GetFirst() - g1:AddCard(gc) - end - local mg=eg:Clone() - if gc then mg:RemoveCard(gc) end - local ok=false - if gc then - if gc:IsHasEffect(EFFECT_FUSION_SUBSTITUTE) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL) - local sg=mg:FilterSelect(tp,c82734805.fcfilter1,1,1,nil,14799437,23440231,mg) - g1:Merge(sg) - elseif gc:IsCode(14799437) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL) - local sg=mg:FilterSelect(tp,c82734805.fcfilter2,1,1,nil,23440231,mg) - g1:Merge(sg) - elseif gc:IsCode(23440231) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL) - local sg=mg:FilterSelect(tp,c82734805.fcfilter2,1,1,nil,14799437,mg) - g1:Merge(sg) - elseif gc:IsSetCard(0xbb) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL) - local sg=mg:FilterSelect(tp,c82734805.fcfilter3,1,1,nil,14799437,23440231,mg) - g1:Merge(sg) - local tc1=sg:GetFirst() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL) - if tc1:IsCode(14799437) then - local sg=mg:FilterSelect(tp,c82734805.fcfilter4,1,1,nil,23440231) - g1:Merge(sg) - elseif tc1:IsCode(23440231) then - local sg=mg:FilterSelect(tp,c82734805.fcfilter4,1,1,nil,14799437) - g1:Merge(sg) - else - local sg=mg:FilterSelect(tp,aux.FConditionFilter21,1,1,nil,14799437,23440231) - g1:Merge(sg) - end - ok=true - end - else - local mg2=mg:Filter(aux.FConditionFilter22,nil,14799437,23440231,true) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL) - local sg1=mg2:Select(tp,1,1,nil) - local tc1=sg1:GetFirst() - if not mg:IsExists(Card.IsSetCard,2,tc1,0xbb) then - mg2:Remove(Card.IsSetCard,nil,0xbb) - end - if tc1:IsHasEffect(EFFECT_FUSION_SUBSTITUTE) then - mg2:Remove(Card.IsHasEffect,nil,EFFECT_FUSION_SUBSTITUTE) - else mg2:Remove(Card.IsCode,nil,tc1:GetCode()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL) - local sg2=mg2:Select(tp,1,1,nil) - g1:Merge(sg1) - g1:Merge(sg2) - end - mg:Sub(g1) - mg=mg:Filter(Card.IsSetCard,nil,0xbb) - if mg:GetCount()==0 or (ok and not Duel.SelectYesNo(tp,93)) then - Duel.SetFusionMaterial(g1) - return - end - ok=false - local dmg=mg:Filter(Card.IsLocation,nil,LOCATION_DECK) - if dmg:GetCount()>0 and e:GetHandler():GetFlagEffect(31444249)~=0 and Duel.SelectYesNo(tp,aux.Stringid(31444249,0)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL) - local sg=dmg:Select(tp,1,6-g1:FilterCount(Card.IsLocation,nil,LOCATION_DECK),nil) - g1:Merge(sg) - ok=true - end - if e:GetHandler():GetFlagEffect(31444249)~=0 then - mg:Remove(Card.IsLocation,nil,LOCATION_DECK) - end - if mg:GetCount()==0 or (ok and not Duel.SelectYesNo(tp,93)) then - Duel.SetFusionMaterial(g1) - return - end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL) - local sg=mg:Select(tp,1,99,nil) - g1:Merge(sg) - Duel.SetFusionMaterial(g1) - return -end diff --git a/script/c8275702.lua b/script/c8275702.lua deleted file mode 100644 index 76b8502e52..0000000000 --- a/script/c8275702.lua +++ /dev/null @@ -1,30 +0,0 @@ ---宝玉の契約 -function c8275702.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c8275702.sptg) - e1:SetOperation(c8275702.spop) - c:RegisterEffect(e1) -end -function c8275702.filter(c,e,sp) - return c:IsFaceup() and c:IsSetCard(0x1034) and c:IsCanBeSpecialSummoned(e,0,sp,true,false) -end -function c8275702.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_SZONE) and chkc:IsControler(tp) and c8275702.filter(chkc,e,tp) end - if chk==0 then return Duel.IsExistingTarget(c8275702.filter,tp,LOCATION_SZONE,0,1,nil,e,tp) - and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c8275702.filter,tp,LOCATION_SZONE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c8275702.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,true,false,POS_FACEUP) - end -end diff --git a/script/c82760689.lua b/script/c82760689.lua deleted file mode 100644 index 2f23576163..0000000000 --- a/script/c82760689.lua +++ /dev/null @@ -1,68 +0,0 @@ ---宝札雲 -function c82760689.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetOperation(c82760689.activate) - c:RegisterEffect(e1) - if not c82760689.global_check then - c82760689.global_check=true - c82760689[0]=false - c82760689[1]=Group.CreateGroup() - c82760689[1]:KeepAlive() - local ge1=Effect.CreateEffect(c) - ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - ge1:SetCode(EVENT_SUMMON_SUCCESS) - ge1:SetOperation(c82760689.checkop) - Duel.RegisterEffect(ge1,0) - local ge2=Effect.CreateEffect(c) - ge2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - ge2:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - ge2:SetOperation(c82760689.checkop) - Duel.RegisterEffect(ge2,0) - local ge3=Effect.CreateEffect(c) - ge3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - ge3:SetCode(EVENT_SPSUMMON_SUCCESS) - ge3:SetOperation(c82760689.checkop) - Duel.RegisterEffect(ge3,0) - local ge4=Effect.CreateEffect(c) - ge4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - ge4:SetCode(EVENT_PHASE_START+PHASE_DRAW) - ge4:SetOperation(c82760689.clear) - Duel.RegisterEffect(ge4,0) - end -end -function c82760689.checkop(e,tp,eg,ep,ev,re,r,rp) - local tc=eg:GetFirst() - while tc do - if not c82760689[0] and tc:IsFaceup() and tc:IsSetCard(0x18) then - if c82760689[1]:IsContains(tc) then c82760689[0]=true - else c82760689[1]:AddCard(tc) end - end - tc=eg:GetNext() - end -end -function c82760689.clear(e,tp,eg,ep,ev,re,r,rp) - c82760689[0]=false - c82760689[1]:Clear() -end -function c82760689.activate(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetCountLimit(1) - e1:SetCondition(c82760689.drcon) - e1:SetOperation(c82760689.drop) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function c82760689.filter(c,g) - return g:IsExists(Card.IsCode,1,c,c:GetCode()) -end -function c82760689.drcon(e,tp,eg,ep,ev,re,r,rp) - return c82760689[0] or c82760689[1]:IsExists(c82760689.filter,1,nil,c82760689[1]) -end -function c82760689.drop(e,tp,eg,ep,ev,re,r,rp) - Duel.Draw(tp,2,REASON_EFFECT) -end diff --git a/script/c8279188.lua b/script/c8279188.lua deleted file mode 100644 index 87af67b981..0000000000 --- a/script/c8279188.lua +++ /dev/null @@ -1,73 +0,0 @@ ---デプス・アミュレット -function c8279188.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c8279188.target1) - e1:SetOperation(c8279188.activate) - c:RegisterEffect(e1) - --negate - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(8279188,1)) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetRange(LOCATION_SZONE) - e2:SetCode(EVENT_ATTACK_ANNOUNCE) - e2:SetCondition(c8279188.condition) - e2:SetTarget(c8279188.target2) - e2:SetOperation(c8279188.activate) - c:RegisterEffect(e2) -end -function c8279188.condition(e,tp,eg,ep,ev,re,r,rp) - return tp~=Duel.GetTurnPlayer() -end -function c8279188.target1(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local tg=Duel.GetAttacker() - if chkc then return chkc==tg end - if chk==0 then return true end - e:GetHandler():SetTurnCounter(0) - --destroy - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_SZONE) - e1:SetCondition(c8279188.descon) - e1:SetOperation(c8279188.desop) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END+RESET_OPPO_TURN,3) - e:GetHandler():RegisterEffect(e1) - if Duel.CheckEvent(EVENT_ATTACK_ANNOUNCE) and tp~=Duel.GetTurnPlayer() and tg:IsOnField() and tg:IsCanBeEffectTarget(e) - and Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)~=0 and Duel.SelectYesNo(tp,aux.Stringid(8279188,0)) then - e:SetProperty(EFFECT_FLAG_CARD_TARGET) - Duel.SetTargetCard(tg) - else e:SetProperty(0) end -end -function c8279188.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local tg=Duel.GetAttacker() - if chkc then return chkc==tg end - if chk==0 then return not e:GetHandler():IsStatus(STATUS_CHAINING) - and Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)~=0 and tg:IsOnField() and tg:IsCanBeEffectTarget(e) end - Duel.SetTargetCard(tg) -end -function c8279188.activate(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) and tc:IsFaceup() and Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)~=0 then - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_EFFECT+REASON_DISCARD) - Duel.NegateAttack() - end -end -function c8279188.descon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp -end -function c8279188.desop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local ct=c:GetTurnCounter() - ct=ct+1 - c:SetTurnCounter(ct) - if ct==3 then - Duel.Destroy(c,REASON_EFFECT) - end -end diff --git a/script/c82828051.lua b/script/c82828051.lua deleted file mode 100644 index 7871d5d9c8..0000000000 --- a/script/c82828051.lua +++ /dev/null @@ -1,23 +0,0 @@ ---アースクエイク -function c82828051.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_POSITION) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c82828051.target) - e1:SetOperation(c82828051.activate) - c:RegisterEffect(e1) -end -function c82828051.filter(c) - return c:IsFaceup() and c:IsAttackPos() -end -function c82828051.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c82828051.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - local g=Duel.GetMatchingGroup(c82828051.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_POSITION,g,g:GetCount(),0,0) -end -function c82828051.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c82828051.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - Duel.ChangePosition(g,POS_FACEUP_DEFENCE) -end diff --git a/script/c82841979.lua b/script/c82841979.lua deleted file mode 100644 index 4065a808ce..0000000000 --- a/script/c82841979.lua +++ /dev/null @@ -1,101 +0,0 @@ ---大和神 -function c82841979.initial_effect(c) - c:EnableReviveLimit() - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_SPSUMMON_PROC) - e2:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e2:SetRange(LOCATION_HAND) - e2:SetCondition(c82841979.spcon) - e2:SetOperation(c82841979.spop) - c:RegisterEffect(e2) - --spsummon success - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - e3:SetOperation(c82841979.retreg) - c:RegisterEffect(e3) - --destroy - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(82841979,0)) - e4:SetCategory(CATEGORY_DESTROY) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e4:SetProperty(EFFECT_FLAG_CARD_TARGET) - e4:SetCode(EVENT_BATTLE_DESTROYING) - e4:SetTarget(c82841979.destg) - e4:SetOperation(c82841979.desop) - c:RegisterEffect(e4) -end -function c82841979.spfilter(c) - return c:IsType(TYPE_SPIRIT) and c:IsAbleToRemoveAsCost() -end -function c82841979.spcon(e,c) - if c==nil then return true end - return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and - Duel.IsExistingMatchingCard(c82841979.spfilter,c:GetControler(),LOCATION_GRAVE,0,1,nil) -end -function c82841979.spop(e,tp,eg,ep,ev,re,r,rp,c) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c82841979.spfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c82841979.retreg(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - --to hand - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetDescription(aux.Stringid(82841979,0)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetReset(RESET_EVENT+0x1ee0000+RESET_PHASE+PHASE_END) - e1:SetCondition(c82841979.retcon) - e1:SetTarget(c82841979.rettg) - e1:SetOperation(c82841979.retop) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - c:RegisterEffect(e2) -end -function c82841979.retcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsHasEffect(EFFECT_SPIRIT_DONOT_RETURN) then return false end - if e:IsHasType(EFFECT_TYPE_TRIGGER_F) then - return not c:IsHasEffect(EFFECT_SPIRIT_MAYNOT_RETURN) - else return c:IsHasEffect(EFFECT_SPIRIT_MAYNOT_RETURN) end -end -function c82841979.rettg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0) -end -function c82841979.retop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - Duel.SendtoHand(c,nil,REASON_EFFECT) - end -end -function c82841979.filter(c) - return c:IsDestructable() and c:IsType(TYPE_SPELL+TYPE_TRAP) -end -function c82841979.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and c82841979.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c82841979.filter,tp,0,LOCATION_ONFIELD,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c82841979.filter,tp,0,LOCATION_ONFIELD,1,1,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c82841979.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c82878489.lua b/script/c82878489.lua deleted file mode 100644 index 838122db97..0000000000 --- a/script/c82878489.lua +++ /dev/null @@ -1,44 +0,0 @@ ---シャイン・キャッスル -function c82878489.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c82878489.target) - e1:SetOperation(c82878489.operation) - c:RegisterEffect(e1) - --Atk up - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(700) - c:RegisterEffect(e2) - --Equip limit - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetCode(EFFECT_EQUIP_LIMIT) - e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e4:SetValue(c82878489.eqlimit) - c:RegisterEffect(e4) -end -function c82878489.eqlimit(e,c) - return c:IsAttribute(ATTRIBUTE_LIGHT) -end -function c82878489.filter(c) - return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_LIGHT) -end -function c82878489.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c82878489.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c82878489.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c82878489.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c82878489.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,e:GetHandler(),tc) - end -end diff --git a/script/c82888408.lua b/script/c82888408.lua deleted file mode 100644 index 8564cc817a..0000000000 --- a/script/c82888408.lua +++ /dev/null @@ -1,25 +0,0 @@ ---魔轟神獣ケルベラル -function c82888408.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(82888408,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCondition(c82888408.spcon) - e1:SetTarget(c82888408.sptg) - e1:SetOperation(c82888408.spop) - c:RegisterEffect(e1) -end -function c82888408.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_HAND) and bit.band(r,REASON_DISCARD)~=0 -end -function c82888408.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c82888408.spop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c82944432.lua b/script/c82944432.lua deleted file mode 100644 index 798d642602..0000000000 --- a/script/c82944432.lua +++ /dev/null @@ -1,46 +0,0 @@ ---機甲忍者ブレード・ハート -function c82944432.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsRace,RACE_WARRIOR),4,2) - c:EnableReviveLimit() - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(82944432,0)) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c82944432.condition) - e1:SetCost(c82944432.cost) - e1:SetTarget(c82944432.target) - e1:SetOperation(c82944432.operation) - c:RegisterEffect(e1) -end -function c82944432.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsAbleToEnterBP() -end -function c82944432.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c82944432.filter(c) - return c:IsFaceup() and c:IsSetCard(0x2b) and not c:IsHasEffect(EFFECT_EXTRA_ATTACK) -end -function c82944432.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c82944432.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c82944432.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c82944432.filter,tp,LOCATION_MZONE,0,1,1,nil) -end -function c82944432.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_EXTRA_ATTACK) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - e1:SetValue(1) - tc:RegisterEffect(e1) - end -end diff --git a/script/c82956492.lua b/script/c82956492.lua deleted file mode 100644 index 2c5003a234..0000000000 --- a/script/c82956492.lua +++ /dev/null @@ -1,18 +0,0 @@ ---DDD神託王ダルク -function c82956492.initial_effect(c) - --fustion material - aux.AddFusionProcFunRep(c,aux.FilterBoolFunction(Card.IsSetCard,0xaf),2,true) - c:EnableReviveLimit() - --damage conversion - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_REVERSE_DAMAGE) - e2:SetRange(LOCATION_MZONE) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetTargetRange(1,0) - e2:SetValue(c82956492.rev) - c:RegisterEffect(e2) -end -function c82956492.rev(e,re,r,rp,rc) - return bit.band(r,REASON_EFFECT)~=0 -end diff --git a/script/c82962242.lua b/script/c82962242.lua deleted file mode 100644 index 3df1fd7a23..0000000000 --- a/script/c82962242.lua +++ /dev/null @@ -1,112 +0,0 @@ ---ヴァンプ・オブ・ヴァンパイア -function c82962242.initial_effect(c) - --equip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(82962242,0)) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE) - e1:SetTarget(c82962242.eqtg) - e1:SetOperation(c82962242.eqop) - c:RegisterEffect(e1) - --equip - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(82962242,1)) - e2:SetCategory(CATEGORY_EQUIP) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_SUMMON_SUCCESS) - e2:SetRange(LOCATION_MZONE) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE) - e2:SetCondition(c82962242.eqcon) - e2:SetTarget(c82962242.eqtg) - e2:SetOperation(c82962242.eqop) - c:RegisterEffect(e2) - --spsummon - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e3:SetCode(EVENT_LEAVE_FIELD_P) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e3:SetOperation(c82962242.checkop) - c:RegisterEffect(e3) - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(82962242,2)) - e4:SetCategory(CATEGORY_SPECIAL_SUMMON) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e4:SetCode(EVENT_TO_GRAVE) - e4:SetCondition(c82962242.spcon) - e4:SetTarget(c82962242.sptg) - e4:SetOperation(c82962242.spop) - c:RegisterEffect(e4) - e3:SetLabelObject(e4) -end -function c82962242.cfilter(c,tp) - return c:IsFaceup() and c:IsSetCard(0x8e) and c:IsControler(tp) -end -function c82962242.eqcon(e,tp,eg,ep,ev,re,r,rp) - return not eg:IsContains(e:GetHandler()) and eg:IsExists(c82962242.cfilter,1,nil,tp) -end -function c82962242.eqfilter(c,atk) - return c:IsFaceup() and c:GetAttack()>atk and c:IsAbleToChangeControler() -end -function c82962242.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c82962242.eqfilter(chkc,e:GetHandler():GetAttack()) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingTarget(c82962242.eqfilter,tp,0,LOCATION_MZONE,1,nil,e:GetHandler():GetAttack()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local g=Duel.SelectTarget(tp,c82962242.eqfilter,tp,0,LOCATION_MZONE,1,1,nil,e:GetHandler():GetAttack()) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0) -end -function c82962242.eqop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if not tc:IsRelateToEffect(e) or not tc:IsType(TYPE_MONSTER) then return end - if c:IsFaceup() and c:IsRelateToEffect(e) then - local atk=tc:GetTextAttack() - if tc:IsFacedown() or atk<0 then atk=0 end - if Duel.Equip(tp,tc,c)==0 then return end - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_EQUIP) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(atk) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_EQUIP_LIMIT) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetValue(c82962242.eqlimit) - e2:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e2) - tc:RegisterFlagEffect(82962242,RESET_EVENT+0x1fe0000,0,1) - else Duel.SendtoGrave(tc,REASON_EFFECT) end -end -function c82962242.eqlimit(e,c) - return e:GetOwner()==c and not c:IsDisabled() -end -function c82962242.spfilter(c) - return c:GetFlagEffect(82962242)~=0 -end -function c82962242.checkop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():GetEquipGroup():IsExists(c82962242.spfilter,1,nil) then - e:GetLabelObject():SetLabel(1) - else - e:GetLabelObject():SetLabel(0) - end -end -function c82962242.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetLabel()==1 and e:GetHandler():IsPreviousLocation(LOCATION_MZONE) -end -function c82962242.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c82962242.spop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c82971335.lua b/script/c82971335.lua deleted file mode 100644 index 0d02037536..0000000000 --- a/script/c82971335.lua +++ /dev/null @@ -1,60 +0,0 @@ ---フォーチュンレディ・アーシー -function c82971335.initial_effect(c) - --atk,def - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_SET_ATTACK) - e1:SetValue(c82971335.value) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_SET_DEFENCE) - c:RegisterEffect(e2) - --level up - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(82971335,0)) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1) - e3:SetCode(EVENT_PHASE+PHASE_STANDBY) - e3:SetCondition(c82971335.lvcon) - e3:SetOperation(c82971335.lvop) - c:RegisterEffect(e3) - --damage - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(82971335,1)) - e4:SetCategory(CATEGORY_DAMAGE) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e4:SetCode(EVENT_LEVEL_UP) - e4:SetTarget(c82971335.damtg) - e4:SetOperation(c82971335.damop) - c:RegisterEffect(e4) -end -function c82971335.value(e,c) - return c:GetLevel()*400 -end -function c82971335.lvcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp and e:GetHandler():IsLevelAbove(1) and e:GetHandler():IsLevelBelow(11) -end -function c82971335.lvop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFacedown() or not c:IsRelateToEffect(e) or c:IsLevelAbove(12) then return end - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_LEVEL) - e1:SetValue(1) - e1:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e1) -end -function c82971335.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(400) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,400) -end -function c82971335.damop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c82994509.lua b/script/c82994509.lua deleted file mode 100644 index 2fb6da7cf4..0000000000 --- a/script/c82994509.lua +++ /dev/null @@ -1,50 +0,0 @@ ---ツクシー -function c82994509.initial_effect(c) - --token - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(82994509,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN) - e1:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_SINGLE) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetCondition(c82994509.condition) - e1:SetTarget(c82994509.target) - e1:SetOperation(c82994509.operation) - c:RegisterEffect(e1) -end -function c82994509.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) -end -function c82994509.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0) -end -function c82994509.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(1-tp,LOCATION_MZONE)<=0 then return end - if not Duel.IsPlayerCanSpecialSummonMonster(tp,82994510,0,0x4011,0,0,1,RACE_PLANT,ATTRIBUTE_WIND,POS_FACEUP_DEFENCE,1-tp) then return end - local token=Duel.CreateToken(tp,82994510) - if Duel.SpecialSummonStep(token,0,tp,1-tp,false,false,POS_FACEUP_DEFENCE) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetLabelObject(token) - e1:SetCondition(c82994509.handcon) - e1:SetOperation(c82994509.handop) - Duel.RegisterEffect(e1,tp) - end - Duel.SpecialSummonComplete() -end -function c82994509.handcon(e,tp,eg,ep,ev,re,r,rp) - local tok=e:GetLabelObject() - if eg:IsContains(tok) and tok:GetReasonCard():IsRace(RACE_PLANT) then - return true - else - if not tok:IsLocation(LOCATION_MZONE) then e:Reset() end - return false - end -end -function c82994509.handop(e,tp,eg,ep,ev,re,r,rp) - local tok=e:GetLabelObject() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - Duel.DiscardHand(tok:GetPreviousControler(),nil,1,1,REASON_EFFECT) -end diff --git a/script/c82999629.lua b/script/c82999629.lua deleted file mode 100644 index 7ab272a580..0000000000 --- a/script/c82999629.lua +++ /dev/null @@ -1,29 +0,0 @@ ---ウォーターワールド -function c82999629.initial_effect(c) - --activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --Atk up - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetTarget(c82999629.filter) - e2:SetValue(500) - c:RegisterEffect(e2) - --Def down - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetRange(LOCATION_SZONE) - e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e3:SetCode(EFFECT_UPDATE_DEFENCE) - e3:SetTarget(c82999629.filter) - e3:SetValue(-400) - c:RegisterEffect(e3) -end -function c82999629.filter(e,c) - return c:IsAttribute(ATTRIBUTE_WATER) -end diff --git a/script/c83011277.lua b/script/c83011277.lua deleted file mode 100644 index 49bc13db91..0000000000 --- a/script/c83011277.lua +++ /dev/null @@ -1,32 +0,0 @@ ---キラー・トマト -function c83011277.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(83011277,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetCondition(c83011277.condition) - e1:SetTarget(c83011277.target) - e1:SetOperation(c83011277.operation) - c:RegisterEffect(e1) -end -function c83011277.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsLocation(LOCATION_GRAVE) -end -function c83011277.filter(c,e,tp) - return c:IsAttackBelow(1500) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c83011277.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c83011277.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c83011277.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c83011277.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_ATTACK) - end -end diff --git a/script/c83021423.lua b/script/c83021423.lua deleted file mode 100644 index e767015c47..0000000000 --- a/script/c83021423.lua +++ /dev/null @@ -1,30 +0,0 @@ ---チャッチャカアーチャー -function c83021423.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(83021423,0)) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetTarget(c83021423.destg) - e1:SetOperation(c83021423.desop) - c:RegisterEffect(e1) -end -function c83021423.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable() -end -function c83021423.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and c83021423.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c83021423.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c83021423.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c83021423.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c83027236.lua b/script/c83027236.lua deleted file mode 100644 index e477f7c3a1..0000000000 --- a/script/c83027236.lua +++ /dev/null @@ -1,34 +0,0 @@ ---ライト・オブ・デストラクション -function c83027236.initial_effect(c) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --discard deck - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(83027236,0)) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetCategory(CATEGORY_DECKDES) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetRange(LOCATION_SZONE) - e2:SetCondition(c83027236.condtion) - e2:SetTarget(c83027236.target) - e2:SetOperation(c83027236.operation) - c:RegisterEffect(e2) -end -function c83027236.cfilter(c,tp) - return c:IsPreviousLocation(LOCATION_DECK) and c:GetPreviousControler()==tp -end -function c83027236.condtion(e,tp,eg,ep,ev,re,r,rp) - if not re then return false end - local rc=re:GetHandler() - return rp~=tp and bit.band(r,REASON_EFFECT)~=0 and eg:IsExists(c83027236.cfilter,1,nil,1-tp) -end -function c83027236.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsRelateToEffect(e) end - Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,1-tp,3) -end -function c83027236.operation(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - Duel.DiscardDeck(1-tp,3,REASON_EFFECT) -end diff --git a/script/c83039729.lua b/script/c83039729.lua deleted file mode 100644 index 87cb583640..0000000000 --- a/script/c83039729.lua +++ /dev/null @@ -1,52 +0,0 @@ ---六武衆の師範 -function c83039729.initial_effect(c) - c:SetUniqueOnField(1,0,83039729) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c83039729.spcon) - c:RegisterEffect(e1) - --to hand - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(83039729,0)) - e2:SetCategory(CATEGORY_TOHAND) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_DESTROYED) - e2:SetCondition(c83039729.thcon) - e2:SetTarget(c83039729.thtg) - e2:SetOperation(c83039729.thop) - c:RegisterEffect(e2) -end -function c83039729.spfilter(c) - return c:IsFaceup() and c:IsSetCard(0x3d) -end -function c83039729.spcon(e,c) - if c==nil then return true end - return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c83039729.spfilter,c:GetControler(),LOCATION_MZONE,0,1,nil) -end -function c83039729.thcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return not c:IsReason(REASON_BATTLE) and rp==1-tp and c:GetPreviousControler()==tp -end -function c83039729.filter(c) - return c:IsSetCard(0x3d) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() -end -function c83039729.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c83039729.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c83039729.filter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c83039729.filter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c83039729.thop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end diff --git a/script/c83054225.lua b/script/c83054225.lua deleted file mode 100644 index 1df9ad72b6..0000000000 --- a/script/c83054225.lua +++ /dev/null @@ -1,77 +0,0 @@ ---緊急発進 -function c83054225.initial_effect(c) - --activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c83054225.spcon) - e1:SetTarget(c83054225.sptg) - e1:SetOperation(c83054225.spop) - c:RegisterEffect(e1) -end -function c83054225.cfilter(c) - return not c:IsType(TYPE_TOKEN) -end -function c83054225.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>Duel.GetMatchingGroupCount(c83054225.cfilter,tp,LOCATION_MZONE,0,nil) -end -function c83054225.spfilter(c,e,tp) - return c:IsSetCard(0x101b) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c83054225.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - if Duel.GetFlagEffect(tp,83054225)~=0 or Duel.GetLocationCount(tp,LOCATION_MZONE)<0 then return false end - local ct=Duel.GetMatchingGroupCount(c83054225.spfilter,tp,LOCATION_DECK,0,nil,e,tp) - return ct>0 and Duel.CheckReleaseGroup(tp,Card.IsCode,1,nil,31533705) - end - local ct=Duel.GetMatchingGroupCount(c83054225.spfilter,tp,LOCATION_DECK,0,nil,e,tp) - local g=Duel.SelectReleaseGroup(tp,Card.IsCode,1,ct,nil,31533705) - Duel.Release(g,REASON_COST) - e:SetLabel(g:GetCount()) - Duel.RegisterFlagEffect(tp,83054225,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,g:GetCount(),tp,LOCATION_DECK) -end -function c83054225.spop(e,tp,eg,ep,ev,re,r,rp) - local ct=e:GetLabel() - if Duel.GetLocationCount(tp,LOCATION_MZONE)0 - and Duel.IsExistingTarget(c8310162.spfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c8310162.spfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c8310162.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c83102080.lua b/script/c83102080.lua deleted file mode 100644 index 92e9240d6c..0000000000 --- a/script/c83102080.lua +++ /dev/null @@ -1,51 +0,0 @@ ---パラレル・ツイスター -function c83102080.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c83102080.cost) - e1:SetTarget(c83102080.target) - e1:SetOperation(c83102080.activate) - c:RegisterEffect(e1) -end -function c83102080.filter(c,ec) - return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToGraveAsCost() - and Duel.IsExistingTarget(c83102080.tgfilter,0,LOCATION_ONFIELD,LOCATION_ONFIELD,1,ec,c) -end -function c83102080.tgfilter(c,tc) - return c:IsDestructable() and c~=tc -end -function c83102080.cost(e,tp,eg,ep,ev,re,r,rp,chk) - e:SetLabel(1) - return true -end -function c83102080.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local c=e:GetHandler() - if chkc then return chkc:IsOnField() and chkc:IsDestructable() and chkc~=c end - if chk==0 then - if e:GetLabel()~=0 then - e:SetLabel(0) - return Duel.IsExistingMatchingCard(c83102080.filter,tp,LOCATION_ONFIELD,0,1,c,c) - else - return Duel.IsExistingTarget(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c) - end - end - if e:GetLabel()~=0 then - e:SetLabel(0) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c83102080.filter,tp,LOCATION_ONFIELD,0,1,1,c,c) - Duel.SendtoGrave(g,REASON_COST) - end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,c) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c83102080.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c83104731.lua b/script/c83104731.lua deleted file mode 100644 index 191bd7a5f0..0000000000 --- a/script/c83104731.lua +++ /dev/null @@ -1,33 +0,0 @@ ---古代の機械巨人 -function c83104731.initial_effect(c) - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - c:RegisterEffect(e1) - --pierce - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_PIERCE) - c:RegisterEffect(e2) - --actlimit - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e3:SetCode(EVENT_ATTACK_ANNOUNCE) - e3:SetOperation(c83104731.atkop) - c:RegisterEffect(e3) -end -function c83104731.atkop(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EFFECT_CANNOT_ACTIVATE) - e1:SetTargetRange(0,1) - e1:SetValue(c83104731.aclimit) - e1:SetReset(RESET_PHASE+PHASE_DAMAGE) - Duel.RegisterEffect(e1,tp) -end -function c83104731.aclimit(e,re,tp) - return re:IsHasType(EFFECT_TYPE_ACTIVATE) -end diff --git a/script/c83108603.lua b/script/c83108603.lua deleted file mode 100644 index 14b6e1b92e..0000000000 --- a/script/c83108603.lua +++ /dev/null @@ -1,55 +0,0 @@ ---陽炎柱 -function c83108603.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --decrease tribute - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_DECREASE_TRIBUTE) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(LOCATION_HAND,0) - e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x107d)) - e2:SetValue(0x1) - c:RegisterEffect(e2) - --material - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(83108603,0)) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_SZONE) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetCountLimit(1) - e3:SetTarget(c83108603.mattg) - e3:SetOperation(c83108603.matop) - c:RegisterEffect(e3) -end -function c83108603.xyzfilter(c,tp) - return c:IsFaceup() and c:IsType(TYPE_XYZ) - and Duel.IsExistingMatchingCard(c83108603.matfilter,tp,LOCATION_MZONE+LOCATION_HAND,0,1,c) -end -function c83108603.matfilter(c) - return (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) and c:IsSetCard(0x107d) and c:IsType(TYPE_MONSTER) and not c:IsType(TYPE_TOKEN) -end -function c83108603.mattg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c83108603.xyzfilter(chkc,tp) end - if chk==0 then return Duel.IsExistingTarget(c83108603.xyzfilter,tp,LOCATION_MZONE,0,1,nil,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c83108603.xyzfilter,tp,LOCATION_MZONE,0,1,1,nil,tp) -end -function c83108603.matop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL) - local g=Duel.SelectMatchingCard(tp,c83108603.matfilter,tp,LOCATION_MZONE+LOCATION_HAND,0,1,1,tc) - if g:GetCount()>0 then - local mg=g:GetFirst():GetOverlayGroup() - if mg:GetCount()>0 then - Duel.SendtoGrave(mg,REASON_RULE) - end - Duel.Overlay(tc,g) - end - end -end diff --git a/script/c83121692.lua b/script/c83121692.lua deleted file mode 100644 index 77a58b1b0c..0000000000 --- a/script/c83121692.lua +++ /dev/null @@ -1,65 +0,0 @@ ---E・HERO テンペスター -function c83121692.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcCode3(c,21844576,20721928,79979666,true,true) - --spsummon condition - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(aux.fuslimit) - c:RegisterEffect(e1) - --set target - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(83121692,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCost(c83121692.cost) - e1:SetTarget(c83121692.target) - e1:SetOperation(c83121692.operation) - c:RegisterEffect(e1) -end -function c83121692.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_ONFIELD,0,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,Card.IsAbleToGraveAsCost,tp,LOCATION_ONFIELD,0,1,1,e:GetHandler()) - Duel.SendtoGrave(g,REASON_COST) -end -function c83121692.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) end - if chk==0 then return Duel.IsExistingTarget(nil,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - Duel.SelectTarget(tp,nil,tp,LOCATION_MZONE,0,1,1,nil) -end -function c83121692.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsFacedown() or not c:IsRelateToEffect(e) then return end - if not tc:IsRelateToEffect(e) then return end - if c==tc then - tc:RegisterFlagEffect(83121692,RESET_EVENT+0x1fe0000,0,0) - else - c:SetCardTarget(tc) - end - if c:GetFlagEffect(83121693)==0 then - c:RegisterFlagEffect(83121693,RESET_EVENT+0x1fe0000,0,0) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e1:SetTarget(c83121692.indtg) - e1:SetValue(1) - e1:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e1) - end -end -function c83121692.indtg(e,c) - if c==e:GetHandler() then - return c:GetFlagEffect(83121692)~=0 - else - return e:GetHandler():IsHasCardTarget(c) - end -end diff --git a/script/c83133491.lua b/script/c83133491.lua deleted file mode 100644 index 24f411dffa..0000000000 --- a/script/c83133491.lua +++ /dev/null @@ -1,22 +0,0 @@ ---重力解除 -function c83133491.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_POSITION) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c83133491.target) - e1:SetOperation(c83133491.activate) - c:RegisterEffect(e1) -end -function c83133491.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - local sg=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_POSITION,sg,sg:GetCount(),0,0) -end -function c83133491.activate(e,tp,eg,ep,ev,re,r,rp) - local sg=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - if sg:GetCount()>0 then - Duel.ChangePosition(sg,POS_FACEUP_DEFENCE,0,POS_FACEUP_ATTACK,0) - end -end diff --git a/script/c83135907.lua b/script/c83135907.lua deleted file mode 100644 index cb5e4fe23c..0000000000 --- a/script/c83135907.lua +++ /dev/null @@ -1,72 +0,0 @@ ---スクラップ・ゴブリン -function c83135907.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EVENT_BE_BATTLE_TARGET) - e1:SetOperation(c83135907.regop) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(83135907,0)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EVENT_PHASE+PHASE_BATTLE) - e2:SetCountLimit(1) - e2:SetTarget(c83135907.destg) - e2:SetOperation(c83135907.desop) - c:RegisterEffect(e2) - --search - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(83135907,1)) - e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_TO_GRAVE) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) - e3:SetCondition(c83135907.thcon) - e3:SetTarget(c83135907.thtg) - e3:SetOperation(c83135907.thop) - c:RegisterEffect(e3) - --indes - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e4:SetValue(1) - c:RegisterEffect(e4) -end -function c83135907.regop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsDefencePos() and e:GetHandler():IsFaceup() then - e:GetHandler():RegisterFlagEffect(83135907,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_BATTLE,0,1) - end -end -function c83135907.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():GetFlagEffect(83135907)~=0 end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0) -end -function c83135907.desop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - Duel.Destroy(e:GetHandler(),REASON_EFFECT) - end -end -function c83135907.thcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return bit.band(c:GetReason(),0x41)==0x41 and re and re:GetOwner():IsSetCard(0x24) -end -function c83135907.filter(c) - return c:IsSetCard(0x24) and c:IsType(TYPE_MONSTER) and c:GetCode()~=83135907 and c:IsAbleToHand() -end -function c83135907.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c83135907.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c83135907.filter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c83135907.filter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c83135907.thop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end diff --git a/script/c8316565.lua b/script/c8316565.lua deleted file mode 100644 index 5fd4831c37..0000000000 --- a/script/c8316565.lua +++ /dev/null @@ -1,34 +0,0 @@ ---ジョルト・カウンター -function c8316565.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_CHAINING) - e1:SetCondition(c8316565.condition) - e1:SetTarget(c8316565.target) - e1:SetOperation(c8316565.activate) - c:RegisterEffect(e1) -end -function c8316565.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x84) -end -function c8316565.condition(e,tp,eg,ep,ev,re,r,rp) - local ph=Duel.GetCurrentPhase() - return Duel.IsExistingMatchingCard(c8316565.cfilter,tp,LOCATION_MZONE,0,1,nil) - and ph>PHASE_MAIN1 and ph0 then - g:AddCard(c) - Duel.Remove(g,POS_FACEUP,REASON_EFFECT) - end -end diff --git a/script/c83236601.lua b/script/c83236601.lua deleted file mode 100644 index d75f4d5c5d..0000000000 --- a/script/c83236601.lua +++ /dev/null @@ -1,94 +0,0 @@ ---RR-トリビュート・レイニアス -function c83236601.initial_effect(c) - --tograve - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(83236601,0)) - e1:SetCategory(CATEGORY_TOGRAVE) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1,83236601) - e1:SetCondition(c83236601.tgcon) - e1:SetTarget(c83236601.tgtg) - e1:SetOperation(c83236601.tgop) - c:RegisterEffect(e1) - --tohand - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetCode(EVENT_BATTLE_DESTROYING) - e2:SetOperation(c83236601.regop) - c:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(83236601,1)) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1,83236602) - e3:SetCondition(c83236601.thcon) - e3:SetTarget(c83236601.thtg) - e3:SetOperation(c83236601.thop) - c:RegisterEffect(e3) - if not c83236601.global_check then - c83236601.global_check=true - local ge1=Effect.CreateEffect(c) - ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - ge1:SetCode(EVENT_SUMMON_SUCCESS) - ge1:SetLabel(83236601) - ge1:SetOperation(aux.sumreg) - Duel.RegisterEffect(ge1,0) - local ge2=ge1:Clone() - ge2:SetCode(EVENT_SPSUMMON_SUCCESS) - ge2:SetLabel(83236601) - Duel.RegisterEffect(ge2,0) - end -end -function c83236601.tgcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetFlagEffect(83236601)>0 -end -function c83236601.tgfilter(c) - return c:IsSetCard(0xba) and c:IsAbleToGrave() -end -function c83236601.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c83236601.tgfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) -end -function c83236601.tgop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c83236601.tgfilter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoGrave(g,REASON_EFFECT) - end -end -function c83236601.regop(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():RegisterFlagEffect(83236602,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) -end -function c83236601.thcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetFlagEffect(83236602)>0 and Duel.GetCurrentPhase()==PHASE_MAIN2 -end -function c83236601.filter(c) - return c:IsSetCard(0x95) and c:GetType()==TYPE_SPELL+TYPE_QUICKPLAY and c:IsAbleToHand() -end -function c83236601.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c83236601.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c83236601.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c83236601.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetTargetRange(1,0) - e1:SetTarget(c83236601.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function c83236601.splimit(e,c) - return not c:IsSetCard(0xba) -end diff --git a/script/c83239739.lua b/script/c83239739.lua deleted file mode 100644 index a8070c7ec7..0000000000 --- a/script/c83239739.lua +++ /dev/null @@ -1,28 +0,0 @@ ---オイスターマイスター -function c83239739.initial_effect(c) - --token - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(83239739,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCondition(c83239739.condition) - e1:SetTarget(c83239739.target) - e1:SetOperation(c83239739.operation) - c:RegisterEffect(e1) -end -function c83239739.condition(e,tp,eg,ep,ev,re,r,rp) - return bit.band(e:GetHandler():GetPreviousLocation(),LOCATION_ONFIELD)>0 - and not (bit.band(r,REASON_BATTLE+REASON_DESTROY)==REASON_BATTLE+REASON_DESTROY) -end -function c83239739.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0) -end -function c83239739.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 then return end - if not Duel.IsPlayerCanSpecialSummonMonster(tp,83239740,0,0x4011,0,0,1,RACE_FISH,ATTRIBUTE_WATER) then return end - local token=Duel.CreateToken(tp,83239740) - Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP) -end diff --git a/script/c83241722.lua b/script/c83241722.lua deleted file mode 100644 index 5a6c01dab0..0000000000 --- a/script/c83241722.lua +++ /dev/null @@ -1,31 +0,0 @@ ---リバースダイス -function c83241722.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetOperation(c83241722.regop) - c:RegisterEffect(e1) -end -function c83241722.regop(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_TOSS_DICE_NEGATE) - e1:SetCondition(c83241722.coincon) - e1:SetOperation(c83241722.coinop) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function c83241722.coincon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetFlagEffect(tp,83241722)==0 -end -function c83241722.coinop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetFlagEffect(tp,83241722)~=0 then return end - if Duel.SelectYesNo(tp,aux.Stringid(83241722,0)) then - Duel.Hint(HINT_CARD,0,83241722) - Duel.RegisterFlagEffect(tp,83241722,RESET_PHASE+PHASE_END,0,1) - local ct1=bit.band(ev,0xff) - local ct2=bit.rshift(ev,16) - Duel.TossDice(ep,ct1,ct2) - end -end diff --git a/script/c83258273.lua b/script/c83258273.lua deleted file mode 100644 index 55caed9b3d..0000000000 --- a/script/c83258273.lua +++ /dev/null @@ -1,30 +0,0 @@ ---追い剥ぎゾンビ -function c83258273.initial_effect(c) - --activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --handes - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(83258273,0)) - e2:SetCategory(CATEGORY_DECKDES) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetRange(LOCATION_SZONE) - e2:SetCode(EVENT_BATTLE_DAMAGE) - e2:SetCondition(c83258273.condition) - e2:SetTarget(c83258273.target) - e2:SetOperation(c83258273.operation) - c:RegisterEffect(e2) -end -function c83258273.condition(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp and eg:GetFirst():GetControler()==tp -end -function c83258273.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DECKDES,0,0,1-tp,1) -end -function c83258273.operation(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - Duel.DiscardDeck(1-tp,1,REASON_EFFECT) -end diff --git a/script/c83266092.lua b/script/c83266092.lua deleted file mode 100644 index db1950781e..0000000000 --- a/script/c83266092.lua +++ /dev/null @@ -1,28 +0,0 @@ ---超古代生物の墓場 -function c83266092.initial_effect(c) - --activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_DRAW_PHASE) - c:RegisterEffect(e1) - --cannot attack - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e2:SetTarget(c83266092.target) - c:RegisterEffect(e2) - --cannot trigger - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetCode(EFFECT_CANNOT_TRIGGER) - e3:SetRange(LOCATION_SZONE) - e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e3:SetTarget(c83266092.target) - c:RegisterEffect(e3) -end -function c83266092.target(e,c) - return c:GetLevel()>=6 and bit.band(c:GetSummonType(),SUMMON_TYPE_SPECIAL)~=0 -end diff --git a/script/c83269557.lua b/script/c83269557.lua deleted file mode 100644 index e5d2452629..0000000000 --- a/script/c83269557.lua +++ /dev/null @@ -1,72 +0,0 @@ ---ダーク・ヴァルキリア -function c83269557.initial_effect(c) - aux.EnableDualAttribute(c) - --counter permit - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetCode(EFFECT_COUNTER_PERMIT+0x3001) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(aux.IsDualState) - c:RegisterEffect(e1) - --atk up - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetCondition(aux.IsDualState) - e2:SetValue(c83269557.atkval) - c:RegisterEffect(e2) - --add counter - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(83269557,0)) - e3:SetCategory(CATEGORY_COUNTER) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_MZONE) - e3:SetProperty(EFFECT_FLAG_NO_TURN_RESET) - e3:SetCountLimit(1) - e3:SetCondition(aux.IsDualState) - e3:SetTarget(c83269557.target1) - e3:SetOperation(c83269557.operation1) - c:RegisterEffect(e3) - --destroy - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(83269557,1)) - e4:SetCategory(CATEGORY_DESTROY) - e4:SetProperty(EFFECT_FLAG_CARD_TARGET) - e4:SetType(EFFECT_TYPE_IGNITION) - e4:SetRange(LOCATION_MZONE) - e4:SetCondition(aux.IsDualState) - e4:SetCost(c83269557.cost2) - e4:SetTarget(c83269557.target2) - e4:SetOperation(c83269557.operation2) - c:RegisterEffect(e4) -end -function c83269557.atkval(e,c) - return c:GetCounter(0x3001)*300 -end -function c83269557.target1(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsCanAddCounter(0x3001,1) end - Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,1,0,0) -end -function c83269557.operation1(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():AddCounter(0x3001,1) -end -function c83269557.cost2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsCanRemoveCounter(tp,0x3001,1,REASON_COST) end - e:GetHandler():RemoveCounter(tp,0x3001,1,REASON_COST) -end -function c83269557.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsDestructable() end - if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c83269557.operation2(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c83272895.lua b/script/c83272895.lua deleted file mode 100644 index eb277b63bb..0000000000 --- a/script/c83272895.lua +++ /dev/null @@ -1,30 +0,0 @@ ---バチバチバチ -function c83272895.initial_effect(c) - --effect gain - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_BE_MATERIAL) - e1:SetCondition(c83272895.efcon) - e1:SetOperation(c83272895.efop) - c:RegisterEffect(e1) -end -function c83272895.efcon(e,tp,eg,ep,ev,re,r,rp) - return r==REASON_XYZ -end -function c83272895.efop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local rc=c:GetReasonCard() - local e1=Effect.CreateEffect(rc) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_PIERCE) - e1:SetReset(RESET_EVENT+0x1fe0000) - rc:RegisterEffect(e1) - if not rc:IsType(TYPE_EFFECT) then - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_ADD_TYPE) - e2:SetValue(TYPE_EFFECT) - e2:SetReset(RESET_EVENT+0x1fe0000) - rc:RegisterEffect(e2,true) - end -end diff --git a/script/c83274244.lua b/script/c83274244.lua deleted file mode 100644 index bd1f945804..0000000000 --- a/script/c83274244.lua +++ /dev/null @@ -1,48 +0,0 @@ ---ドドドウォリアー -function c83274244.initial_effect(c) - --summon with no tribute - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(83274244,0)) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SUMMON_PROC) - e1:SetCondition(c83274244.ntcon) - e1:SetOperation(c83274244.ntop) - c:RegisterEffect(e1) - --negate - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_ATTACK_ANNOUNCE) - e2:SetOperation(c83274244.atop) - c:RegisterEffect(e2) -end -function c83274244.ntcon(e,c,minc) - if c==nil then return true end - return minc==0 and c:GetLevel()>4 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 -end -function c83274244.ntop(e,tp,eg,ep,ev,re,r,rp,c) - --change base attack - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetReset(RESET_EVENT+0xff0000) - e1:SetCode(EFFECT_SET_BASE_ATTACK) - e1:SetValue(1800) - c:RegisterEffect(e1) -end -function c83274244.atop(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e1:SetCode(EVENT_CHAIN_SOLVING) - e1:SetRange(LOCATION_MZONE) - e1:SetOperation(c83274244.negop) - e1:SetReset(RESET_EVENT+0x1ff0000+RESET_PHASE+PHASE_DAMAGE) - e:GetHandler():RegisterEffect(e1) -end -function c83274244.negop(e,tp,eg,ep,ev,re,r,rp) - local loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION) - if ep~=tp and loc==LOCATION_GRAVE then - Duel.NegateEffect(ev) - end -end diff --git a/script/c8327462.lua b/script/c8327462.lua deleted file mode 100644 index 8f0a7a7623..0000000000 --- a/script/c8327462.lua +++ /dev/null @@ -1,6 +0,0 @@ ---デス・バード -function c8327462.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcCode2(c,3170832,732302,true,true) -end diff --git a/script/c83295594.lua b/script/c83295594.lua deleted file mode 100644 index 697a72be98..0000000000 --- a/script/c83295594.lua +++ /dev/null @@ -1,33 +0,0 @@ ---スチーム・シンクロン -function c83295594.initial_effect(c) - --synchro effect - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(83295594,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,0x1c0+TIMING_MAIN_END) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c83295594.sccon) - e1:SetTarget(c83295594.sctarg) - e1:SetOperation(c83295594.scop) - c:RegisterEffect(e1) -end -function c83295594.sccon(e,tp,eg,ep,ev,re,r,rp) - return not e:GetHandler():IsStatus(STATUS_CHAINING) and Duel.GetTurnPlayer()~=tp - and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2) -end -function c83295594.sctarg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,1,nil,e:GetHandler()) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function c83295594.scop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:GetControler()~=tp or not c:IsRelateToEffect(e) then return end - local g=Duel.GetMatchingGroup(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,nil,c) - if g:GetCount()>0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=g:Select(tp,1,1,nil) - Duel.SynchroSummon(tp,sg:GetFirst(),c) - end -end diff --git a/script/c83319610.lua b/script/c83319610.lua deleted file mode 100644 index 91c876e69d..0000000000 --- a/script/c83319610.lua +++ /dev/null @@ -1,115 +0,0 @@ ---発条の巻き上げ -function c83319610.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c83319610.mttg1) - e1:SetOperation(c83319610.mtop) - c:RegisterEffect(e1) - --material - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(83319610,0)) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetRange(LOCATION_SZONE) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetCost(c83319610.mtcost) - e2:SetTarget(c83319610.mttg2) - e2:SetOperation(c83319610.mtop) - e2:SetLabel(1) - c:RegisterEffect(e2) - --spsummon - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(83319610,1)) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_QUICK_O) - e3:SetRange(LOCATION_SZONE) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetCode(EVENT_FREE_CHAIN) - e3:SetCost(c83319610.spcost) - e3:SetTarget(c83319610.sptg) - e3:SetOperation(c83319610.spop) - c:RegisterEffect(e3) -end -function c83319610.filter1(c,e,tp) - return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:IsRace(RACE_MACHINE) - and Duel.IsExistingMatchingCard(c83319610.filter2,tp,LOCATION_HAND+LOCATION_MZONE,0,1,c,e) -end -function c83319610.filter2(c,e) - return c:IsSetCard(0x58) and c:IsType(TYPE_MONSTER) and (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) and not c:IsImmuneToEffect(e) -end -function c83319610.mttg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c83319610.filter1(chkc,e,tp) end - if chk==0 then return true end - if Duel.IsExistingTarget(c83319610.filter1,tp,LOCATION_MZONE,0,1,nil,e,tp) - and Duel.SelectYesNo(tp,aux.Stringid(83319610,2)) then - e:SetProperty(EFFECT_FLAG_CARD_TARGET) - e:GetHandler():RegisterFlagEffect(83319610,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c83319610.filter1,tp,LOCATION_MZONE,0,1,1,nil,e,tp) - e:SetLabel(1) - else - e:SetProperty(0) - e:SetLabel(0) - end -end -function c83319610.mtcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():GetFlagEffect(83319610)==0 end - e:GetHandler():RegisterFlagEffect(83319610,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) -end -function c83319610.mttg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c83319610.filter1(chkc,e,tp) end - if chk==0 then return Duel.IsExistingTarget(c83319610.filter1,tp,LOCATION_MZONE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c83319610.filter1,tp,LOCATION_MZONE,0,1,1,nil,e,tp) -end -function c83319610.mtop(e,tp,eg,ep,ev,re,r,rp) - if e:GetLabel()==0 or not e:GetHandler():IsRelateToEffect(e) then return end - local tc=Duel.GetFirstTarget() - if not tc:IsRelateToEffect(e) or tc:IsImmuneToEffect(e) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL) - local g=Duel.SelectMatchingCard(tp,c83319610.filter2,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,tc,e) - if g:GetCount()>0 then - Duel.Overlay(tc,g) - end -end -function c83319610.spfilter1(c,e,tp) - return c:IsFaceup() and c:IsSetCard(0x58) and c:IsType(TYPE_XYZ) - and Duel.IsExistingMatchingCard(c83319610.spfilter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,c,c:GetRank()+1) -end -function c83319610.spfilter2(c,e,tp,mc,rk) - return c:GetRank()==rk and c:IsSetCard(0x58) and mc:IsCanBeXyzMaterial(c) - and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) -end -function c83319610.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end -function c83319610.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c83319610.spfilter1(chkc,e,tp) end - if chk==0 then return not e:GetHandler():IsStatus(STATUS_CHAINING) - and Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsExistingTarget(c83319610.spfilter1,tp,LOCATION_MZONE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - Duel.SelectTarget(tp,c83319610.spfilter1,tp,LOCATION_MZONE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function c83319610.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<0 then return end - local tc=Duel.GetFirstTarget() - if tc:IsFacedown() or not tc:IsRelateToEffect(e) or tc:IsControler(1-tp) or tc:IsImmuneToEffect(e) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c83319610.spfilter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc,tc:GetRank()+1) - local sc=g:GetFirst() - if sc then - local mg=tc:GetOverlayGroup() - if mg:GetCount()~=0 then - Duel.Overlay(sc,mg) - end - sc:SetMaterial(Group.FromCards(tc)) - Duel.Overlay(sc,Group.FromCards(tc)) - Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP) - sc:CompleteProcedure() - end -end diff --git a/script/c83370323.lua b/script/c83370323.lua deleted file mode 100644 index 3e52ef7ca9..0000000000 --- a/script/c83370323.lua +++ /dev/null @@ -1,46 +0,0 @@ ---トラパート -function c83370323.initial_effect(c) - -- - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_BE_MATERIAL) - e1:SetCondition(c83370323.con) - e1:SetOperation(c83370323.op) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e2:SetValue(c83370323.synlimit) - c:RegisterEffect(e2) -end -function c83370323.con(e,tp,eg,ep,ev,re,r,rp) - return r==REASON_SYNCHRO -end -function c83370323.op(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local sync=c:GetReasonCard() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetOperation(c83370323.atkop) - e1:SetReset(RESET_EVENT+0x1fe0000) - sync:RegisterEffect(e1) -end -function c83370323.atkop(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EFFECT_CANNOT_ACTIVATE) - e1:SetTargetRange(0,1) - e1:SetValue(c83370323.aclimit) - e1:SetReset(RESET_PHASE+PHASE_DAMAGE) - Duel.RegisterEffect(e1,tp) -end -function c83370323.aclimit(e,re,tp) - return re:GetHandler():IsType(TYPE_TRAP) and re:IsHasType(EFFECT_TYPE_ACTIVATE) -end -function c83370323.synlimit(e,c) - if not c then return false end - return not c:IsRace(RACE_WARRIOR) -end diff --git a/script/c83392426.lua b/script/c83392426.lua deleted file mode 100644 index 0c6d7188b0..0000000000 --- a/script/c83392426.lua +++ /dev/null @@ -1,32 +0,0 @@ ---ヴィークラー -function c83392426.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(83392426,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetCondition(c83392426.condition) - e1:SetTarget(c83392426.target) - e1:SetOperation(c83392426.operation) - c:RegisterEffect(e1) -end -function c83392426.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) -end -function c83392426.filter(c,e,tp) - return c:IsCode(57308711) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c83392426.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c83392426.filter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) -end -function c83392426.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c83392426.filter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c8339504.lua b/script/c8339504.lua deleted file mode 100644 index 6cbde00bbd..0000000000 --- a/script/c8339504.lua +++ /dev/null @@ -1,70 +0,0 @@ ---エクシーズ・シフト -function c8339504.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,8339504+EFFECT_COUNT_CODE_OATH) - e1:SetLabel(0) - e1:SetCost(c8339504.cost) - e1:SetTarget(c8339504.target) - e1:SetOperation(c8339504.activate) - c:RegisterEffect(e1) -end -function c8339504.cost(e,tp,eg,ep,ev,re,r,rp,chk) - e:SetLabel(100) - if chk==0 then return true end -end -function c8339504.cfilter(c,e,tp) - local rk=c:GetRank() - return rk>0 and Duel.IsExistingMatchingCard(c8339504.spfilter1,tp,LOCATION_EXTRA,0,1,nil,c,e,tp) -end -function c8339504.spfilter1(c,tc,e,tp) - return c:GetRank()==tc:GetRank() and c:IsRace(tc:GetRace()) and c:IsAttribute(tc:GetAttribute()) - and not c:IsCode(tc:GetCode()) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c8339504.spfilter2(c,tc,e,tp) - return c:GetRank()==tc:GetPreviousRankOnField() and c:IsRace(tc:GetPreviousRaceOnField()) and c:IsAttribute(tc:GetPreviousAttributeOnField()) - and not c:IsCode(tc:GetPreviousCodeOnField()) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c8339504.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - if e:GetLabel()~=100 then return false end - e:SetLabel(0) - return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.CheckReleaseGroup(tp,c8339504.cfilter,1,nil,e,tp) - end - e:SetLabel(0) - local g=Duel.SelectReleaseGroup(tp,c8339504.cfilter,1,1,nil,e,tp) - Duel.Release(g,REASON_COST) - Duel.SetTargetCard(g) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function c8339504.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c8339504.spfilter2,tp,LOCATION_EXTRA,0,1,1,nil,tc,e,tp) - local sc=g:GetFirst() - if sc then - Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP) - if c:IsRelateToEffect(e) then - c:CancelToGrave() - Duel.Overlay(sc,Group.FromCards(c)) - end - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetCountLimit(1) - e1:SetOperation(c8339504.tgop) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - sc:RegisterEffect(e1) - end -end -function c8339504.tgop(e,tp,eg,ep,ev,re,r,rp) - Duel.SendtoGrave(e:GetHandler(),REASON_EFFECT) -end diff --git a/script/c83438826.lua b/script/c83438826.lua deleted file mode 100644 index 32c69a7503..0000000000 --- a/script/c83438826.lua +++ /dev/null @@ -1,105 +0,0 @@ ---聖剣アロンダイト -function c83438826.initial_effect(c) - c:SetUniqueOnField(1,0,83438826) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c83438826.target) - e1:SetOperation(c83438826.operation) - c:RegisterEffect(e1) - --Equip limit - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_EQUIP_LIMIT) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e3:SetValue(c83438826.eqlimit) - c:RegisterEffect(e3) - --destroy - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(83438826,0)) - e4:SetCategory(CATEGORY_DESTROY) - e4:SetType(EFFECT_TYPE_IGNITION) - e4:SetProperty(EFFECT_FLAG_CARD_TARGET) - e4:SetRange(LOCATION_SZONE) - e4:SetCountLimit(1) - e4:SetTarget(c83438826.destg) - e4:SetOperation(c83438826.desop) - c:RegisterEffect(e4) - --equip - local e5=Effect.CreateEffect(c) - e5:SetDescription(aux.Stringid(83438826,1)) - e5:SetCategory(CATEGORY_EQUIP) - e5:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e5:SetCode(EVENT_TO_GRAVE) - e5:SetCountLimit(1,83438826) - e5:SetCondition(c83438826.eqcon) - e5:SetTarget(c83438826.eqtg) - e5:SetOperation(c83438826.operation) - c:RegisterEffect(e5) -end -function c83438826.eqlimit(e,c) - return c:IsRace(RACE_WARRIOR) -end -function c83438826.eqfilter1(c) - return c:IsFaceup() and c:IsRace(RACE_WARRIOR) -end -function c83438826.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c83438826.eqfilter1(chkc) end - if chk==0 then return Duel.IsExistingTarget(c83438826.eqfilter1,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c83438826.eqfilter1,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c83438826.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() and c:CheckUniqueOnField(tp) then - Duel.Equip(tp,c,tc) - end -end -function c83438826.desfilter(c) - return c:IsFacedown() and c:IsDestructable() -end -function c83438826.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() and c83438826.desfilter(chkc) end - local eq=e:GetHandler():GetEquipTarget() - if chk==0 then return eq and eq:IsAttackAbove(500) - and Duel.IsExistingTarget(c83438826.desfilter,tp,0,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c83438826.desfilter,tp,0,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c83438826.desop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - local eq=c:GetEquipTarget() - if not c:IsRelateToEffect(e) or eq:IsImmuneToEffect(e) or not eq:IsAttackAbove(500) then return end - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(-500) - e1:SetReset(RESET_EVENT+0x1fe0000) - eq:RegisterEffect(e1) - if tc:IsRelateToEffect(e) and tc:IsControler(1-tp) and tc:IsFacedown() then - Duel.Destroy(tc,REASON_EFFECT) - end -end -function c83438826.eqcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousPosition(POS_FACEUP) and c:IsReason(REASON_DESTROY) and c:CheckUniqueOnField(tp) -end -function c83438826.eqfilter2(c) - return c:IsFaceup() and c:IsSetCard(0x107a) and c:IsRace(RACE_WARRIOR) -end -function c83438826.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c83438826.eqfilter2(chkc) end - if chk==0 then return e:GetHandler():IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingTarget(c83438826.eqfilter2,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c83438826.eqfilter2,tp,LOCATION_MZONE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end diff --git a/script/c83446909.lua b/script/c83446909.lua deleted file mode 100644 index bb1d38f164..0000000000 --- a/script/c83446909.lua +++ /dev/null @@ -1,45 +0,0 @@ ---充電池メン -function c83446909.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(83446909,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c83446909.sumtg) - e1:SetOperation(c83446909.sumop) - c:RegisterEffect(e1) - --atk,def - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetValue(c83446909.val) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EFFECT_UPDATE_DEFENCE) - c:RegisterEffect(e3) -end -function c83446909.spfilter(c,e,tp) - return c:GetCode()~=83446909 and c:IsSetCard(0x28) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c83446909.sumtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c83446909.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) -end -function c83446909.sumop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c83446909.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end -function c83446909.filter(c) - return c:IsFaceup() and c:IsRace(RACE_THUNDER) -end -function c83446909.val(e,c) - return Duel.GetMatchingGroupCount(c83446909.filter,c:GetControler(),LOCATION_MZONE,0,nil)*300 -end diff --git a/script/c83467607.lua b/script/c83467607.lua deleted file mode 100644 index ecf2417397..0000000000 --- a/script/c83467607.lua +++ /dev/null @@ -1,22 +0,0 @@ ---リフレクト・ネイチャー -function c83467607.initial_effect(c) - --reflect - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetOperation(c83467607.operation) - c:RegisterEffect(e1) -end -function c83467607.operation(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_REFLECT_DAMAGE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetTargetRange(1,0) - e1:SetValue(c83467607.refcon) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function c83467607.refcon(e,re,val,r,rp,rc) - return re and not re:IsHasType(EFFECT_TYPE_CONTINUOUS) and rp~=e:GetOwnerPlayer() -end diff --git a/script/c83500096.lua b/script/c83500096.lua deleted file mode 100644 index 8ab39df8e4..0000000000 --- a/script/c83500096.lua +++ /dev/null @@ -1,34 +0,0 @@ ---A・ジェネクス・ソリッド -function c83500096.initial_effect(c) - --draw - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(83500096,0)) - e1:SetCategory(CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCost(c83500096.drcost) - e1:SetTarget(c83500096.drtg) - e1:SetOperation(c83500096.drop) - c:RegisterEffect(e1) -end -function c83500096.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x2) and c:IsAttribute(ATTRIBUTE_WATER) and c:IsAbleToGraveAsCost() -end -function c83500096.drcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c83500096.cfilter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c83500096.cfilter,tp,LOCATION_MZONE,0,1,1,nil) - Duel.SendtoGrave(g,REASON_COST) -end -function c83500096.drtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp,2) end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(2) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2) -end -function c83500096.drop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end diff --git a/script/c83519853.lua b/script/c83519853.lua deleted file mode 100644 index 002a319827..0000000000 --- a/script/c83519853.lua +++ /dev/null @@ -1,83 +0,0 @@ ---魔聖騎士皇ランスロット -function c83519853.initial_effect(c) - c:SetUniqueOnField(1,0,83519853) - --synchro summon - aux.AddSynchroProcedure(c,nil,aux.NonTuner(Card.IsSetCard,0x107a),1) - c:EnableReviveLimit() - --equip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(83519853,0)) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(c83519853.condition) - e1:SetTarget(c83519853.target) - e1:SetOperation(c83519853.operation) - c:RegisterEffect(e1) - --tohand - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_BATTLE_DESTROYING) - e2:SetCondition(c83519853.regcon) - e2:SetOperation(c83519853.regop) - c:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(83519853,1)) - e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_PHASE+PHASE_BATTLE) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1) - e3:SetCondition(c83519853.thcon) - e3:SetTarget(c83519853.thtg) - e3:SetOperation(c83519853.thop) - c:RegisterEffect(e3) -end -function c83519853.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_SYNCHRO -end -function c83519853.filter(c,ec) - return c:IsSetCard(0x207a) and c:IsType(TYPE_EQUIP) and c:CheckEquipTarget(ec) -end -function c83519853.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingMatchingCard(c83519853.filter,tp,LOCATION_DECK,0,1,nil,e:GetHandler()) end - Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_DECK) -end -function c83519853.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end - local c=e:GetHandler() - if c:IsFacedown() or not c:IsRelateToEffect(e) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local g=Duel.SelectMatchingCard(tp,c83519853.filter,tp,LOCATION_DECK,0,1,1,nil,c) - local tc=g:GetFirst() - if tc then - Duel.Equip(tp,tc,c,true) - end -end -function c83519853.regcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local bc=c:GetBattleTarget() - return c:IsRelateToBattle() and bc:IsLocation(LOCATION_GRAVE) and bc:IsType(TYPE_MONSTER) -end -function c83519853.regop(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():RegisterFlagEffect(83519853,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) -end -function c83519853.thcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetFlagEffect(83519853)~=0 -end -function c83519853.thfilter(c) - return (c:IsSetCard(0x107a) or c:IsSetCard(0x207a)) and c:IsAbleToHand() -end -function c83519853.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c83519853.thfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c83519853.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c83519853.thfilter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c83531441.lua b/script/c83531441.lua deleted file mode 100644 index b660962ca9..0000000000 --- a/script/c83531441.lua +++ /dev/null @@ -1,89 +0,0 @@ ---彼岸の旅人 ダンテ -function c83531441.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,3,2) - c:EnableReviveLimit() - --atkup - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(83531441,0)) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCost(c83531441.atkcost) - e1:SetOperation(c83531441.atkop) - c:RegisterEffect(e1) - --to defence - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_PHASE+PHASE_BATTLE) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCondition(c83531441.poscon) - e2:SetOperation(c83531441.posop) - c:RegisterEffect(e2) - --to hand - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(83531441,1)) - e3:SetCategory(CATEGORY_TOHAND) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) - e3:SetCode(EVENT_TO_GRAVE) - e3:SetTarget(c83531441.thtg) - e3:SetOperation(c83531441.thop) - c:RegisterEffect(e3) -end -function c83531441.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDiscardDeckAsCost(tp,1) and e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) - local ct=Duel.GetFieldGroupCount(tp,LOCATION_DECK,0) - if ct==1 then - Duel.DiscardDeck(tp,1,REASON_COST) - e:SetLabel(1) - else - local ac=0 - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(83531441,2)) - if ct==2 then ac=Duel.AnnounceNumber(tp,2,1) - else ac=Duel.AnnounceNumber(tp,3,2,1) end - Duel.DiscardDeck(tp,ac,REASON_COST) - e:SetLabel(ac) - end -end -function c83531441.atkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFaceup() and c:IsRelateToEffect(e) then - local ct=e:GetLabel() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+0x1ff0000+RESET_PHASE+PHASE_END) - e1:SetValue(ct*500) - c:RegisterEffect(e1) - end -end -function c83531441.poscon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetAttackedCount()>0 -end -function c83531441.posop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsAttackPos() then - Duel.ChangePosition(c,POS_FACEUP_DEFENCE) - end -end -function c83531441.filter(c) - return c:IsSetCard(0xb1) and c:IsAbleToHand() -end -function c83531441.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c83531441.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c83531441.filter,tp,LOCATION_GRAVE,0,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c83531441.filter,tp,LOCATION_GRAVE,0,1,1,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c83531441.thop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end diff --git a/script/c83544697.lua b/script/c83544697.lua deleted file mode 100644 index d163cfdd53..0000000000 --- a/script/c83544697.lua +++ /dev/null @@ -1,40 +0,0 @@ ---ガスタの交信 -function c83544697.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TODECK+CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c83544697.target) - e1:SetOperation(c83544697.activate) - c:RegisterEffect(e1) -end -function c83544697.filter1(c) - return c:IsSetCard(0x10) and c:IsType(TYPE_MONSTER) and c:IsAbleToDeck() -end -function c83544697.filter2(c) - return c:IsDestructable() -end -function c83544697.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - if chk==0 then return Duel.IsExistingTarget(c83544697.filter1,tp,LOCATION_GRAVE,0,2,nil) - and Duel.IsExistingTarget(c83544697.filter2,tp,0,LOCATION_ONFIELD,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g1=Duel.SelectTarget(tp,c83544697.filter1,tp,LOCATION_GRAVE,0,2,2,nil) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g2=Duel.SelectTarget(tp,c83544697.filter2,tp,0,LOCATION_ONFIELD,1,1,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g1,2,0,0) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g2,1,0,0) -end -function c83544697.activate(e,tp,eg,ep,ev,re,r,rp) - local ex,g1=Duel.GetOperationInfo(0,CATEGORY_TODECK) - local ex,g2=Duel.GetOperationInfo(0,CATEGORY_DESTROY) - if g1:GetFirst():IsRelateToEffect(e) and g1:GetNext():IsRelateToEffect(e) then - Duel.SendtoDeck(g1,nil,2,REASON_EFFECT) - if g2:GetFirst():IsRelateToEffect(e) then - Duel.BreakEffect() - Duel.Destroy(g2,REASON_EFFECT) - end - end -end diff --git a/script/c83546647.lua b/script/c83546647.lua deleted file mode 100644 index 1260e39c7c..0000000000 --- a/script/c83546647.lua +++ /dev/null @@ -1,72 +0,0 @@ ---無抵抗の真相 -function c83546647.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_BATTLE_DAMAGE) - e1:SetCondition(c83546647.condition) - e1:SetCost(c83546647.cost) - e1:SetTarget(c83546647.target) - e1:SetOperation(c83546647.activate) - e1:SetLabel(1) - c:RegisterEffect(e1) -end -function c83546647.condition(e,tp,eg,ep,ev,re,r,rp) - return eg:GetFirst():IsControler(1-tp) and ep==tp and Duel.GetAttackTarget()==nil -end -function c83546647.spfilter(c,e,tp) - return c:GetLevel()==1 and not c:IsPublic() and c:IsCanBeSpecialSummoned(e,0,tp,false,false) - and Duel.IsExistingMatchingCard(c83546647.spfilter2,tp,LOCATION_DECK,0,1,nil,e,tp,c:GetCode()) -end -function c83546647.spfilter2(c,e,tp,code) - return c:IsCode(code) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c83546647.cost(e,tp,eg,ep,ev,re,r,rp,chk) - e:SetLabel(0) - return true -end -function c83546647.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - if e:GetLabel()~=0 then return false end - e:SetLabel(1) - return Duel.GetLocationCount(tp,LOCATION_MZONE)>1 - and Duel.IsExistingMatchingCard(c83546647.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) - end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) - local g=Duel.SelectMatchingCard(tp,c83546647.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - local tc=g:GetFirst() - Duel.ConfirmCards(1-tp,g) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_PUBLIC) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_CHAIN) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_CHAIN_SOLVED) - e2:SetRange(LOCATION_HAND) - e2:SetOperation(c83546647.clearop) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_CHAIN) - e2:SetLabel(Duel.GetCurrentChain()) - e2:SetLabelObject(e1) - tc:RegisterEffect(e2) - Duel.SetTargetCard(g) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_HAND+LOCATION_DECK) -end -function c83546647.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 then return end - local tc1=Duel.GetFirstTarget() - if not tc1:IsRelateToEffect(e) or not tc1:IsCanBeSpecialSummoned(e,0,tp,false,false) then return end - local tc2=Duel.GetFirstMatchingCard(c83546647.spfilter2,tp,LOCATION_DECK,0,nil,e,tp,tc1:GetCode()) - if tc2 then - Duel.SpecialSummonStep(tc1,0,tp,tp,false,false,POS_FACEUP) - Duel.SpecialSummonStep(tc2,0,tp,tp,false,false,POS_FACEUP) - Duel.SpecialSummonComplete() - end -end -function c83546647.clearop(e,tp,eg,ep,ev,re,r,rp) - if ev~=e:GetLabel() then return end - e:GetLabelObject():Reset() - e:Reset() -end diff --git a/script/c83555666.lua b/script/c83555666.lua deleted file mode 100644 index 7f7c4c9d77..0000000000 --- a/script/c83555666.lua +++ /dev/null @@ -1,42 +0,0 @@ ---破壊輪 -function c83555666.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,0x1e0) - e1:SetCountLimit(1,83555666+EFFECT_COUNT_CODE_OATH) - e1:SetCondition(c83555666.condition) - e1:SetTarget(c83555666.target) - e1:SetOperation(c83555666.activate) - c:RegisterEffect(e1) -end -function c83555666.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp -end -function c83555666.filter(c,lp) - return c:IsFaceup() and c:IsAttackBelow(lp) and c:IsDestructable() -end -function c83555666.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local lp=Duel.GetLP(1-tp) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c83555666.filter(chkc,lp) end - if chk==0 then return Duel.IsExistingTarget(c83555666.filter,tp,0,LOCATION_MZONE,1,nil,lp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c83555666.filter,tp,0,LOCATION_MZONE,1,1,nil,lp) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,PLAYER_ALL,0) -end -function c83555666.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() and Duel.Destroy(tc,REASON_EFFECT)~=0 then - local atk=tc:GetTextAttack() - if atk<0 then atk=0 end - local val=Duel.Damage(tp,atk,REASON_EFFECT) - if val>0 and Duel.GetLP(tp)>0 then - Duel.BreakEffect() - Duel.Damage(1-tp,val,REASON_EFFECT) - end - end -end diff --git a/script/c83584898.lua b/script/c83584898.lua deleted file mode 100644 index e26d8b380c..0000000000 --- a/script/c83584898.lua +++ /dev/null @@ -1,75 +0,0 @@ ---魔界の足枷 -function c83584898.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c83584898.target) - e1:SetOperation(c83584898.operation) - c:RegisterEffect(e1) - --atk,def - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_SET_ATTACK) - e2:SetValue(100) - c:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_EQUIP) - e3:SetCode(EFFECT_SET_DEFENCE) - e3:SetValue(100) - c:RegisterEffect(e3) - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_EQUIP) - e4:SetCode(EFFECT_CANNOT_ATTACK) - c:RegisterEffect(e4) - --equip limit - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_SINGLE) - e5:SetCode(EFFECT_EQUIP_LIMIT) - e5:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e5:SetValue(1) - c:RegisterEffect(e5) - --damage - local e6=Effect.CreateEffect(c) - e6:SetDescription(aux.Stringid(83584898,0)) - e6:SetCategory(CATEGORY_DAMAGE) - e6:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e6:SetCode(EVENT_PHASE+PHASE_STANDBY) - e6:SetRange(LOCATION_SZONE) - e6:SetCountLimit(1) - e6:SetCondition(c83584898.damcon) - e6:SetTarget(c83584898.damtg) - e6:SetOperation(c83584898.damop) - c:RegisterEffect(e6) -end -function c83584898.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c83584898.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,e:GetHandler(),tc) - end -end -function c83584898.damcon(e,tp,eg,ep,ev,re,r,rp) - return tp==Duel.GetTurnPlayer() -end -function c83584898.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local p=e:GetHandler():GetEquipTarget():GetControler() - Duel.SetTargetPlayer(p) - Duel.SetTargetParam(500) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,p,500) -end -function c83584898.damop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local p=e:GetHandler():GetEquipTarget():GetControler() - local d=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c83602069.lua b/script/c83602069.lua deleted file mode 100644 index c32e98f63b..0000000000 --- a/script/c83602069.lua +++ /dev/null @@ -1,12 +0,0 @@ ---共闘するランドスターの剣士 -function c83602069.initial_effect(c) - --atk - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetTarget(aux.TargetBoolFunction(Card.IsRace,RACE_WARRIOR)) - e1:SetValue(400) - c:RegisterEffect(e1) -end diff --git a/script/c83604828.lua b/script/c83604828.lua deleted file mode 100644 index 648a4b32b0..0000000000 --- a/script/c83604828.lua +++ /dev/null @@ -1,36 +0,0 @@ ---雲魔物-ゴースト・フォッグ -function c83604828.initial_effect(c) - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - c:RegisterEffect(e1) - --no battle damage - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_NO_BATTLE_DAMAGE) - c:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_AVOID_BATTLE_DAMAGE) - e3:SetValue(1) - c:RegisterEffect(e3) - --counter - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(83604828,0)) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e4:SetCode(EVENT_BATTLE_DESTROYED) - e4:SetOperation(c83604828.ctop) - c:RegisterEffect(e4) -end -function c83604828.ctop(e,tp,eg,ep,ev,re,r,rp) - local lv=e:GetHandler():GetBattleTarget():GetLevel() - local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - if g:GetCount()==0 then return end - for i=1,lv do - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(83604828,1)) - local tc=g:Select(tp,1,1,nil):GetFirst() - tc:AddCounter(0x19,1) - end -end diff --git a/script/c83629030.lua b/script/c83629030.lua deleted file mode 100644 index 715817952d..0000000000 --- a/script/c83629030.lua +++ /dev/null @@ -1,53 +0,0 @@ ---トゥーン・サイバー・ドラゴン -function c83629030.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c83629030.spcon) - c:RegisterEffect(e1) - --cannot attack - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_SUMMON_SUCCESS) - e2:SetOperation(c83629030.atklimit) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - c:RegisterEffect(e3) - local e4=e2:Clone() - e4:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e4) - --direct attack - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_SINGLE) - e5:SetCode(EFFECT_DIRECT_ATTACK) - e5:SetCondition(c83629030.dircon) - c:RegisterEffect(e5) -end -function c83629030.spcon(e,c) - if c==nil then return true end - return Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0)==0 - and Duel.GetFieldGroupCount(c:GetControler(),0,LOCATION_MZONE)>0 - and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 -end -function c83629030.atklimit(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e:GetHandler():RegisterEffect(e1) -end -function c83629030.cfilter1(c) - return c:IsFaceup() and c:IsCode(15259703) -end -function c83629030.cfilter2(c) - return c:IsFaceup() and c:IsType(TYPE_TOON) -end -function c83629030.dircon(e) - local tp=e:GetHandlerPlayer() - return Duel.IsExistingMatchingCard(c83629030.cfilter1,tp,LOCATION_ONFIELD,0,1,nil) - and not Duel.IsExistingMatchingCard(c83629030.cfilter2,tp,0,LOCATION_MZONE,1,nil) -end diff --git a/script/c83675475.lua b/script/c83675475.lua deleted file mode 100644 index ffba57a924..0000000000 --- a/script/c83675475.lua +++ /dev/null @@ -1,26 +0,0 @@ ---トークン謝肉祭 -function c83675475.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(c83675475.condition) - e1:SetTarget(c83675475.target) - e1:SetOperation(c83675475.activate) - c:RegisterEffect(e1) -end -function c83675475.condition(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(Card.IsType,1,nil,TYPE_TOKEN) -end -function c83675475.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local g=Duel.GetMatchingGroup(Card.IsType,tp,LOCATION_MZONE,LOCATION_MZONE,nil,TYPE_TOKEN) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,g:GetCount()*300) -end -function c83675475.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsType,tp,LOCATION_MZONE,LOCATION_MZONE,nil,TYPE_TOKEN) - local ct=Duel.Destroy(g,REASON_EFFECT) - Duel.Damage(1-tp,ct*300,REASON_EFFECT) -end diff --git a/script/c83682725.lua b/script/c83682725.lua deleted file mode 100644 index 60517e9517..0000000000 --- a/script/c83682725.lua +++ /dev/null @@ -1,35 +0,0 @@ ---テールスイング -function c83682725.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c83682725.target) - e1:SetOperation(c83682725.activate) - c:RegisterEffect(e1) -end -function c83682725.filter(c,tp) - return c:IsFaceup() and c:IsRace(RACE_DINOSAUR) and c:IsLevelAbove(5) - and Duel.IsExistingMatchingCard(c83682725.dfilter,tp,0,LOCATION_MZONE,1,nil,c:GetLevel()) -end -function c83682725.dfilter(c,lv) - return (c:IsFacedown() or c:IsLevelBelow(lv-1)) and c:IsAbleToHand() -end -function c83682725.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c83682725.filter(chkc,tp) end - if chk==0 then return Duel.IsExistingTarget(c83682725.filter,tp,LOCATION_MZONE,0,1,nil,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - local g=Duel.SelectTarget(tp,c83682725.filter,tp,LOCATION_MZONE,0,1,1,nil,tp) - local sg=Duel.GetMatchingGroup(c83682725.dfilter,tp,0,LOCATION_MZONE,nil,g:GetFirst():GetLevel()) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,sg,1,0,0) -end -function c83682725.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local sg=Duel.SelectMatchingCard(tp,c83682725.dfilter,tp,0,LOCATION_MZONE,1,2,nil,tc:GetLevel()) - Duel.SendtoHand(sg,nil,REASON_EFFECT) - end -end diff --git a/script/c83715234.lua b/script/c83715234.lua deleted file mode 100644 index 52e1897a55..0000000000 --- a/script/c83715234.lua +++ /dev/null @@ -1,47 +0,0 @@ ---ムーン・スクレイパー -function c83715234.initial_effect(c) - --activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(83715234,0)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_CHANGE_POS) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetRange(LOCATION_SZONE) - e2:SetCountLimit(1) - e2:SetCondition(c83715234.descon) - e2:SetTarget(c83715234.destg) - e2:SetOperation(c83715234.desop) - c:RegisterEffect(e2) -end -function c83715234.cfilter(c,tp) - local np=c:GetPosition() - local pp=c:GetPreviousPosition() - return c:IsControler(tp) and c:IsRace(RACE_ROCK) and not c:IsStatus(STATUS_CONTINUOUS_POS) and ((np<3 and pp>3) or (pp<3 and np>3)) -end -function c83715234.descon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c83715234.cfilter,1,nil,tp) -end -function c83715234.desfilter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable() -end -function c83715234.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() and c83715234.desfilter(chkc) end - if chk==0 then return e:GetHandler():IsRelateToEffect(e) and not e:GetHandler():IsStatus(STATUS_CHAINING) - and Duel.IsExistingTarget(c83715234.desfilter,tp,0,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c83715234.desfilter,tp,0,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c83715234.desop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c83725008.lua b/script/c83725008.lua deleted file mode 100644 index 5357b487e9..0000000000 --- a/script/c83725008.lua +++ /dev/null @@ -1,57 +0,0 @@ ---ライトロード・プリースト ジェニス -function c83725008.initial_effect(c) - --recover&damage - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetDescription(aux.Stringid(83725008,0)) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCondition(c83725008.lpcon) - e1:SetTarget(c83725008.lptg) - e1:SetOperation(c83725008.lpop) - c:RegisterEffect(e1) - if c83725008.discard==nil then - c83725008.discard=true - c83725008[0]=false - c83725008[1]=false - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e2:SetCode(EVENT_PHASE_START+PHASE_DRAW) - e2:SetOperation(c83725008.reset) - Duel.RegisterEffect(e2,0) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e3:SetCode(EVENT_TO_GRAVE) - e3:SetOperation(c83725008.set) - Duel.RegisterEffect(e3,0) - end -end -function c83725008.reset(e,tp,eg,ep,ev,re,r,rp) - c83725008[0]=false - c83725008[1]=false -end -function c83725008.cfilter(c) - return c:GetPreviousLocation()==LOCATION_DECK -end -function c83725008.set(e,tp,eg,ep,ev,re,r,rp) - if not re then return false end - local rc=re:GetHandler() - if bit.band(r,REASON_EFFECT)>0 and rc:IsSetCard(0x38) and eg:IsExists(c83725008.cfilter,1,nil) then - c83725008[rp]=true - end -end -function c83725008.lpcon(e,tp,eg,ep,ev,re,r,rp) - return tp==Duel.GetTurnPlayer() and c83725008[tp] -end -function c83725008.lptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,500) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,500) -end -function c83725008.lpop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:GetControler()~=tp or not c:IsRelateToEffect(e) or c:IsFacedown() then return end - Duel.Recover(tp,500,REASON_EFFECT) - Duel.Damage(1-tp,500,REASON_EFFECT) -end diff --git a/script/c83743222.lua b/script/c83743222.lua deleted file mode 100644 index c90834e6b6..0000000000 --- a/script/c83743222.lua +++ /dev/null @@ -1,73 +0,0 @@ ---女神の聖弓-アルテミス -function c83743222.initial_effect(c) - c:EnableReviveLimit() - --spsummon condition - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - c:RegisterEffect(e1) - --equip - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_EQUIP) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetTarget(c83743222.eqtg) - e2:SetOperation(c83743222.eqop) - c:RegisterEffect(e2) -end -c83743222.material_race=RACE_WARRIOR -function c83743222.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() and chkc~=e:GetHandler() end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,e:GetHandler()) -end -function c83743222.eqop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if not tc then return end - local c=e:GetHandler() - if not c:IsRelateToEffect(e) or c:IsLocation(LOCATION_SZONE) or c:IsFacedown() then return end - if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or tc:IsFacedown() or not tc:IsRelateToEffect(e) then - Duel.SendtoGrave(c,REASON_EFFECT) - return - end - Duel.Equip(tp,c,tc) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetValue(c83743222.eqlimit) - e1:SetLabelObject(tc) - e1:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e1) - --negate - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_CHAIN_SOLVING) - e2:SetRange(LOCATION_SZONE) - e2:SetCountLimit(1) - e2:SetCondition(c83743222.negcon) - e2:SetOperation(c83743222.negop) - e2:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e2) -end -function c83743222.eqlimit(e,c) - return c==e:GetLabelObject() -end -function c83743222.negcon(e,tp,eg,ep,ev,re,r,rp) - local ph=Duel.GetCurrentPhase() - return e:GetHandler():GetEquipTarget() and (ph>PHASE_MAIN1 and ph0 end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectTarget(tp,Card.IsAbleToDeck,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,ct,nil) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0) -end -function c83755611.tdop(e,tp,eg,ep,ev,re,r,rp) - local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local g=tg:Filter(Card.IsRelateToEffect,nil,e) - if g:GetCount()>0 then - Duel.SendtoDeck(g,nil,2,REASON_EFFECT) - end -end -function c83755611.filter(c,e,tp) - return c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c83755611.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if chk==0 then - if not Duel.IsExistingTarget(c83755611.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) then return false end - if ft<0 then - return false - elseif ft>0 then - return Duel.IsExistingTarget(Card.IsDestructable,tp,LOCATION_ONFIELD,0,1,nil) - else - return Duel.IsExistingTarget(Card.IsDestructable,tp,LOCATION_MZONE,0,1,nil) - end - end - local g1=nil - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - if ft>0 then - g1=Duel.SelectTarget(tp,Card.IsDestructable,tp,LOCATION_ONFIELD,0,1,1,nil) - else - g1=Duel.SelectTarget(tp,Card.IsDestructable,tp,LOCATION_MZONE,0,1,1,nil) - end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g2=Duel.SelectTarget(tp,c83755611.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g1,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g2,1,0,0) -end -function c83755611.desop(e,tp,eg,ep,ev,re,r,rp) - local ex,g1=Duel.GetOperationInfo(0,CATEGORY_DESTROY) - local ex,g2=Duel.GetOperationInfo(0,CATEGORY_SPECIAL_SUMMON) - local tc1=g1:GetFirst() - local tc2=g2:GetFirst() - if tc1:IsRelateToEffect(e) and tc2:IsRelateToEffect(e) and Duel.Destroy(tc1,REASON_EFFECT)~=0 then - Duel.SpecialSummon(tc2,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c83764718.lua b/script/c83764718.lua deleted file mode 100644 index ef8481a1c0..0000000000 --- a/script/c83764718.lua +++ /dev/null @@ -1,29 +0,0 @@ ---死者蘇生 -function c83764718.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c83764718.target) - e1:SetOperation(c83764718.activate) - c:RegisterEffect(e1) -end -function c83764718.filter(c,e,tp) - return c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c83764718.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and c83764718.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c83764718.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c83764718.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c83764718.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c83778600.lua b/script/c83778600.lua deleted file mode 100644 index 5e4b25a7cb..0000000000 --- a/script/c83778600.lua +++ /dev/null @@ -1,29 +0,0 @@ ---ミス・リバイブ -function c83778600.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c83778600.target) - e1:SetOperation(c83778600.activate) - c:RegisterEffect(e1) -end -function c83778600.filter(c,e,tp) - return c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENCE,1-tp) -end -function c83778600.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(1-tp) and c83778600.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(1-tp,LOCATION_MZONE,tp)>0 - and Duel.IsExistingTarget(c83778600.filter,tp,0,LOCATION_GRAVE,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c83778600.filter,tp,0,LOCATION_GRAVE,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c83778600.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,1-tp,false,false,POS_FACEUP_DEFENCE) - end -end diff --git a/script/c83810690.lua b/script/c83810690.lua deleted file mode 100644 index 22ae1a22d9..0000000000 --- a/script/c83810690.lua +++ /dev/null @@ -1,35 +0,0 @@ ---X-セイバー ウェイン -function c83810690.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1) - c:EnableReviveLimit() - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(83810690,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(c83810690.spcon) - e1:SetTarget(c83810690.sptg) - e1:SetOperation(c83810690.spop) - c:RegisterEffect(e1) -end -function c83810690.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_SYNCHRO -end -function c83810690.filter(c,e,tp) - return c:IsRace(RACE_WARRIOR) and c:GetLevel()<=4 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c83810690.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c83810690.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c83810690.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c83810690.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c83812099.lua b/script/c83812099.lua deleted file mode 100644 index 6c6b06b382..0000000000 --- a/script/c83812099.lua +++ /dev/null @@ -1,70 +0,0 @@ ---フリントロック -function c83812099.initial_effect(c) - --equip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(83812099,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCondition(c83812099.eqcon1) - e1:SetTarget(c83812099.eqtg1) - e1:SetOperation(c83812099.eqop1) - c:RegisterEffect(e1) - --equip - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(83812099,1)) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetRange(LOCATION_MZONE) - e2:SetCondition(c83812099.eqcon2) - e2:SetTarget(c83812099.eqtg2) - e2:SetOperation(c83812099.eqop2) - c:RegisterEffect(e2) - --indes - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e3:SetCondition(c83812099.eqcon2) - e3:SetValue(1) - c:RegisterEffect(e3) -end -function c83812099.eqcon1(e,tp,eg,ep,ev,re,r,rp) - return not e:GetHandler():GetEquipGroup():IsExists(Card.IsCode,1,nil,75560629) -end -function c83812099.filter1(c,ec) - return c:IsFaceup() and c:IsCode(75560629) and c:CheckEquipTarget(ec) -end -function c83812099.eqtg1(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c83812099.filter1,tp,LOCATION_SZONE,LOCATION_SZONE,1,nil,e:GetHandler()) end - Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,0,LOCATION_SZONE) -end -function c83812099.eqop1(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local g=Duel.SelectMatchingCard(tp,c83812099.filter1,tp,LOCATION_SZONE,LOCATION_SZONE,1,1,nil,c) - local eqc=g:GetFirst() - if eqc and c:IsRelateToEffect(e) and c:IsFaceup() then - Duel.Equip(tp,eqc,c) - end -end -function c83812099.eqcon2(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetEquipGroup():IsExists(Card.IsCode,1,nil,75560629) -end -function c83812099.filter2(c,eqc) - return c:IsFaceup() and eqc:CheckEquipTarget(c) -end -function c83812099.eqtg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local eqc=e:GetHandler():GetEquipGroup():Filter(Card.IsCode,nil,75560629):GetFirst() - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c83812099.filter2(chkc,eqc) end - if chk==0 then return Duel.IsExistingTarget(c83812099.filter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,e:GetHandler(),eqc) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c83812099.filter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,e:GetHandler(),eqc) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,eqc,1,0,0) -end -function c83812099.eqop2(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - local eqc=e:GetHandler():GetEquipGroup():Filter(Card.IsCode,nil,75560629):GetFirst() - if eqc and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,eqc,tc) - end -end diff --git a/script/c83831356.lua b/script/c83831356.lua deleted file mode 100644 index 13283f9f6d..0000000000 --- a/script/c83831356.lua +++ /dev/null @@ -1,49 +0,0 @@ ---カラクリ大暴走 -function c83831356.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DISABLE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP+0x1c0) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c83831356.condition) - e1:SetTarget(c83831356.target) - e1:SetOperation(c83831356.activate) - c:RegisterEffect(e1) -end -function c83831356.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end -function c83831356.filter(c) - return c:IsFaceup() and c:IsSetCard(0x11) -end -function c83831356.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c83831356.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c83831356.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - local g=Duel.SelectTarget(tp,c83831356.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0) -end -function c83831356.activate(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - e1:SetValue(1000) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - tc:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_DISABLE_EFFECT) - e3:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - tc:RegisterEffect(e3) - end -end diff --git a/script/c83866861.lua b/script/c83866861.lua deleted file mode 100644 index b47fe2bdc5..0000000000 --- a/script/c83866861.lua +++ /dev/null @@ -1,83 +0,0 @@ ---デストーイ・マッド・キマイラ -function c83866861.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcFunRep(c,c83866861.ffilter,3,false) - --spsummon condition - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(aux.fuslimit) - c:RegisterEffect(e1) - --actlimit - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetCode(EFFECT_CANNOT_ACTIVATE) - e2:SetRange(LOCATION_MZONE) - e2:SetTargetRange(0,1) - e2:SetValue(c83866861.aclimit) - e2:SetCondition(c83866861.actcon) - c:RegisterEffect(e2) - --special summon - local e3=Effect.CreateEffect(c) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetCode(EVENT_BATTLE_DESTROYING) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetCountLimit(1,83866861) - e3:SetCondition(c83866861.spcon) - e3:SetTarget(c83866861.sptg) - e3:SetOperation(c83866861.spop) - c:RegisterEffect(e3) - --atkup - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e4:SetCode(EFFECT_UPDATE_ATTACK) - e4:SetRange(LOCATION_MZONE) - e4:SetValue(c83866861.atkval) - c:RegisterEffect(e4) -end -function c83866861.ffilter(c) - return c:IsSetCard(0xad) or c:IsHasEffect(36693940) -end -function c83866861.aclimit(e,re,tp) - return not re:GetHandler():IsImmuneToEffect(e) -end -function c83866861.actcon(e) - return Duel.GetAttacker()==e:GetHandler() or Duel.GetAttackTarget()==e:GetHandler() -end -function c83866861.spcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local bc=c:GetBattleTarget() - return c:IsRelateToBattle() and c:IsFaceup() and bc:IsLocation(LOCATION_GRAVE) and bc:IsType(TYPE_MONSTER) -end -function c83866861.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - local bc=e:GetHandler():GetBattleTarget() - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and bc:IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetTargetCard(bc) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,bc,1,0,LOCATION_GRAVE) -end -function c83866861.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - local atk=tc:GetAttack() - if tc:IsRelateToEffect(e) and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e1:SetCode(EFFECT_SET_ATTACK) - e1:SetValue(atk/2) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1,true) - Duel.SpecialSummonComplete() - end -end -function c83866861.atkfilter(c,p) - return c:GetOwner()==p -end -function c83866861.atkval(e,c) - local tp=c:GetControler() - return Duel.GetMatchingGroupCount(c83866861.atkfilter,tp,LOCATION_MZONE,0,nil,1-tp)*300 -end diff --git a/script/c83887306.lua b/script/c83887306.lua deleted file mode 100644 index a3b744b3e8..0000000000 --- a/script/c83887306.lua +++ /dev/null @@ -1,30 +0,0 @@ ---はさみ撃ち -function c83887306.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c83887306.target) - e1:SetOperation(c83887306.activate) - c:RegisterEffect(e1) -end -function c83887306.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,LOCATION_MZONE,0,2,nil) - and Duel.IsExistingTarget(Card.IsDestructable,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g1=Duel.SelectTarget(tp,Card.IsDestructable,tp,LOCATION_MZONE,0,2,2,nil) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g2=Duel.SelectTarget(tp,Card.IsDestructable,tp,0,LOCATION_MZONE,1,1,nil) - g1:Merge(g2) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g1,3,0,0) -end -function c83887306.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local tg=g:Filter(Card.IsRelateToEffect,nil,e) - if tg:GetCount()==3 then - Duel.Destroy(tg,REASON_EFFECT) - end -end diff --git a/script/c83903521.lua b/script/c83903521.lua deleted file mode 100644 index 0fa8fbecca..0000000000 --- a/script/c83903521.lua +++ /dev/null @@ -1,34 +0,0 @@ ---ファラオの化身 -function c83903521.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(83903521,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_BE_MATERIAL) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) - e1:SetCondition(c83903521.spcon) - e1:SetTarget(c83903521.sptg) - e1:SetOperation(c83903521.spop) - c:RegisterEffect(e1) -end -function c83903521.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsLocation(LOCATION_GRAVE) and r==REASON_SYNCHRO -end -function c83903521.filter(c,e,tp) - return c:IsLevelBelow(4) and c:IsRace(RACE_ZOMBIE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c83903521.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c83903521.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c83903521.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c83903521.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c83903521.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end \ No newline at end of file diff --git a/script/c83957459.lua b/script/c83957459.lua deleted file mode 100644 index e02e0968a5..0000000000 --- a/script/c83957459.lua +++ /dev/null @@ -1,36 +0,0 @@ ---ライノタウルス -function c83957459.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_EXTRA_ATTACK) - e1:SetCondition(c83957459.macon) - e1:SetValue(1) - c:RegisterEffect(e1) - if not c83957459.global_check then - c83957459.global_check=true - c83957459[0]=0 - c83957459[1]=0 - local ge1=Effect.CreateEffect(c) - ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - ge1:SetCode(EVENT_BATTLE_DESTROYING) - ge1:SetOperation(c83957459.checkop) - Duel.RegisterEffect(ge1,0) - local ge2=Effect.CreateEffect(c) - ge2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - ge2:SetCode(EVENT_PHASE_START+PHASE_DRAW) - ge2:SetOperation(c83957459.clear) - Duel.RegisterEffect(ge2,0) - end -end -function c83957459.checkop(e,tp,eg,ep,ev,re,r,rp) - local cp=eg:GetFirst():GetControler() - c83957459[cp]=c83957459[cp]+1 -end -function c83957459.clear(e,tp,eg,ep,ev,re,r,rp) - c83957459[0]=0 - c83957459[1]=0 -end -function c83957459.macon(e) - return c83957459[e:GetHandlerPlayer()]>=2 -end diff --git a/script/c83965310.lua b/script/c83965310.lua deleted file mode 100644 index 9fef91a61d..0000000000 --- a/script/c83965310.lua +++ /dev/null @@ -1,96 +0,0 @@ ---D-HERO Bloo-D -function c83965310.initial_effect(c) - c:EnableReviveLimit() - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(aux.FALSE) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(83965310,0)) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_SPSUMMON_PROC) - e2:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e2:SetRange(LOCATION_HAND) - e2:SetCondition(c83965310.spcon) - e2:SetOperation(c83965310.spop) - c:RegisterEffect(e2) - --equip - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(83965310,1)) - e3:SetCategory(CATEGORY_EQUIP) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1) - e3:SetCondition(c83965310.eqcon) - e3:SetTarget(c83965310.eqtg) - e3:SetOperation(c83965310.eqop) - c:RegisterEffect(e3) - --disable - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_FIELD) - e4:SetRange(LOCATION_MZONE) - e4:SetTargetRange(0,LOCATION_MZONE) - e4:SetCode(EFFECT_DISABLE) - c:RegisterEffect(e4) -end -function c83965310.spcon(e,c) - if c==nil then return true end - return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-3 - and Duel.CheckReleaseGroup(c:GetControler(),nil,3,nil) -end -function c83965310.spop(e,tp,eg,ep,ev,re,r,rp,c) - local g=Duel.SelectReleaseGroup(c:GetControler(),nil,3,3,nil) - Duel.Release(g,REASON_COST) -end -function c83965310.eqcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local ec=e:GetLabelObject() - return ec==nil or ec:GetFlagEffect(83965310)==0 -end -function c83965310.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsAbleToChangeControler() end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingTarget(Card.IsAbleToChangeControler,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local g=Duel.SelectTarget(tp,Card.IsAbleToChangeControler,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0) -end -function c83965310.eqlimit(e,c) - return e:GetOwner()==c -end -function c83965310.eqop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - if c:IsFaceup() and c:IsRelateToEffect(e) then - local atk=tc:GetTextAttack()/2 - if tc:IsFacedown() then atk=0 end - if atk<0 then atk=0 end - if not Duel.Equip(tp,tc,c,false) then return end - --Add Equip limit - tc:RegisterFlagEffect(83965310,RESET_EVENT+0x1fe0000,0,0) - e:SetLabelObject(tc) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_COPY_INHERIT+EFFECT_FLAG_OWNER_RELATE) - e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(c83965310.eqlimit) - tc:RegisterEffect(e1) - if atk>0 then - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_OWNER_RELATE) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetReset(RESET_EVENT+0x1fe0000) - e2:SetValue(atk) - tc:RegisterEffect(e2) - end - else Duel.SendtoGrave(tc,REASON_EFFECT) end - end -end diff --git a/script/c83968380.lua b/script/c83968380.lua deleted file mode 100644 index 99b0aca4db..0000000000 --- a/script/c83968380.lua +++ /dev/null @@ -1,22 +0,0 @@ ---強欲な瓶 -function c83968380.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c83968380.target) - e1:SetOperation(c83968380.activate) - c:RegisterEffect(e1) -end -function c83968380.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(1) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c83968380.activate(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end diff --git a/script/c8396952.lua b/script/c8396952.lua deleted file mode 100644 index bfa9f9a57f..0000000000 --- a/script/c8396952.lua +++ /dev/null @@ -1,57 +0,0 @@ ---アルカナフォースI-THE MAGICIAN -function c8396952.initial_effect(c) - --coin - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(8396952,0)) - e1:SetCategory(CATEGORY_COIN) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c8396952.cointg) - e1:SetOperation(c8396952.coinop) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e2) - local e3=e1:Clone() - e3:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - c:RegisterEffect(e3) -end -function c8396952.cointg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_COIN,nil,0,tp,1) -end -function c8396952.coinop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) or c:IsFacedown() then return end - local res=0 - if c:IsHasEffect(73206827) then - res=1-Duel.SelectOption(tp,60,61) - else res=Duel.TossCoin(tp,1) end - c8396952.arcanareg(c,res) -end -function c8396952.arcanareg(c,coin) - --disable effect - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_CHAIN_SOLVED) - e1:SetRange(LOCATION_MZONE) - e1:SetOperation(c8396952.speop) - e1:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e1) - c:RegisterFlagEffect(36690018,RESET_EVENT+0x1ff0000,EFFECT_FLAG_CLIENT_HINT,1,coin,63-coin) -end -function c8396952.speop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not re:IsActiveType(TYPE_SPELL) or not re:IsHasType(EFFECT_TYPE_ACTIVATE) then return end - local val=c:GetFlagEffectLabel(36690018) - if val==1 then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetValue(c:GetBaseAttack()*2) - e1:SetReset(RESET_EVENT+0x1ff0000+RESET_PHASE+PHASE_END) - c:RegisterEffect(e1) - else - Duel.Recover(1-tp,500,REASON_EFFECT) - end -end diff --git a/script/c83980492.lua b/script/c83980492.lua deleted file mode 100644 index a938061677..0000000000 --- a/script/c83980492.lua +++ /dev/null @@ -1,10 +0,0 @@ ---銅鑼ドラゴン -function c83980492.initial_effect(c) - --pendulum summon - aux.AddPendulumProcedure(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) -end diff --git a/script/c83982270.lua b/script/c83982270.lua deleted file mode 100644 index bab10d6f8b..0000000000 --- a/script/c83982270.lua +++ /dev/null @@ -1,28 +0,0 @@ ---雲魔物-ポイズン・クラウド -function c83982270.initial_effect(c) - --destroy&damage - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(83982270,0)) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetCondition(c83982270.condition) - e1:SetTarget(c83982270.target) - e1:SetOperation(c83982270.operation) - c:RegisterEffect(e1) -end -function c83982270.condition(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsLocation(LOCATION_GRAVE) and c:IsReason(REASON_BATTLE) and c:IsPreviousPosition(POS_FACEUP) -end -function c83982270.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler():GetBattleTarget(),1,0,0) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,800) -end -function c83982270.operation(e,tp,eg,ep,ev,re,r,rp) - local bc=e:GetHandler():GetBattleTarget() - if bc:IsFaceup() and bc:IsRelateToBattle() and Duel.Destroy(bc,REASON_EFFECT)~=0 then - Duel.Damage(1-tp,800,REASON_EFFECT) - end -end diff --git a/script/c83986578.lua b/script/c83986578.lua deleted file mode 100644 index 85cbf93629..0000000000 --- a/script/c83986578.lua +++ /dev/null @@ -1,39 +0,0 @@ ---王虎ワンフー -function c83986578.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(83986578,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c83986578.condition) - e1:SetTarget(c83986578.target) - e1:SetOperation(c83986578.operation) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e2) -end -function c83986578.cfilter(c) - return c:IsFaceup() and c:IsAttackBelow(1400) -end -function c83986578.condition(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c83986578.cfilter,1,nil) and not eg:IsContains(e:GetHandler()) -end -function c83986578.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local g=eg:Filter(c83986578.cfilter,nil) - Duel.SetTargetCard(eg) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c83986578.filter(c,e) - return c:IsFaceup() and c:IsAttackBelow(1400) and c:IsRelateToEffect(e) -end -function c83986578.operation(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local g=eg:Filter(c83986578.filter,nil,e) - if g:GetCount()>0 then - Duel.Destroy(g,REASON_EFFECT) - end -end diff --git a/script/c83991690.lua b/script/c83991690.lua deleted file mode 100644 index 663096b473..0000000000 --- a/script/c83991690.lua +++ /dev/null @@ -1,37 +0,0 @@ ---ブーテン -function c83991690.initial_effect(c) - --tuner - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(83991690,0)) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_GRAVE) - e1:SetCost(c83991690.cost) - e1:SetTarget(c83991690.target) - e1:SetOperation(c83991690.operation) - c:RegisterEffect(e1) -end -function c83991690.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) -end -function c83991690.filter(c) - return c:IsFaceup() and c:IsLevelBelow(4) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_FAIRY) and not c:IsType(TYPE_TUNER) -end -function c83991690.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c83991690.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c83991690.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c83991690.filter,tp,LOCATION_MZONE,0,1,1,nil) -end -function c83991690.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_ADD_TYPE) - e1:SetValue(TYPE_TUNER) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - end -end diff --git a/script/c83994433.lua b/script/c83994433.lua deleted file mode 100644 index 77be0f1699..0000000000 --- a/script/c83994433.lua +++ /dev/null @@ -1,42 +0,0 @@ ---閃珖竜 スターダスト -function c83994433.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1) - c:EnableReviveLimit() - --indes - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(83994433,0)) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c83994433.target) - e1:SetOperation(c83994433.operation) - c:RegisterEffect(e1) -end -function c83994433.filter(c) - return c:IsFaceup() -end -function c83994433.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsOnField() and c83994433.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c83994433.filter,tp,LOCATION_ONFIELD,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c83994433.filter,tp,LOCATION_ONFIELD,0,1,1,nil) -end -function c83994433.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_INDESTRUCTABLE_COUNT) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCountLimit(1) - e1:SetValue(c83994433.valcon) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - end -end -function c83994433.valcon(e,re,r,rp) - return bit.band(r,REASON_BATTLE+REASON_EFFECT)~=0 -end diff --git a/script/c83994646.lua b/script/c83994646.lua deleted file mode 100644 index 7935b02c7e..0000000000 --- a/script/c83994646.lua +++ /dev/null @@ -1,23 +0,0 @@ ---死の4つ星てんとう虫 -function c83994646.initial_effect(c) - --flip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(83994646,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP) - e1:SetTarget(c83994646.target) - e1:SetOperation(c83994646.operation) - c:RegisterEffect(e1) -end -function c83994646.filter(c) - return c:IsFaceup() and c:GetLevel()==4 and c:IsDestructable() -end -function c83994646.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chk==0 then return true end - local g=Duel.GetMatchingGroup(c83994646.filter,tp,0,LOCATION_MZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c83994646.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c83994646.filter,tp,0,LOCATION_MZONE,nil) - Duel.Destroy(g,REASON_EFFECT) -end diff --git a/script/c8400623.lua b/script/c8400623.lua deleted file mode 100644 index 9283000d79..0000000000 --- a/script/c8400623.lua +++ /dev/null @@ -1,72 +0,0 @@ ---邪龍アナンタ -function c8400623.initial_effect(c) - c:EnableReviveLimit() - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(aux.FALSE) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_SPSUMMON_PROC) - e2:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e2:SetRange(LOCATION_HAND) - e2:SetCondition(c8400623.spcon) - e2:SetOperation(c8400623.spop) - c:RegisterEffect(e2) - --destroy - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(8400623,0)) - e3:SetCategory(CATEGORY_DESTROY) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e3:SetCode(EVENT_PHASE+PHASE_END) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1) - e3:SetCondition(c8400623.descon) - e3:SetTarget(c8400623.destg) - e3:SetOperation(c8400623.desop) - c:RegisterEffect(e3) -end -function c8400623.cfilter(c) - return c:IsRace(RACE_REPTILE) and c:IsAbleToRemoveAsCost() - and (not c:IsLocation(LOCATION_MZONE) or c:IsFaceup()) -end -function c8400623.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.IsExistingMatchingCard(c8400623.cfilter,tp,LOCATION_MZONE,0,1,nil) - or (Duel.IsExistingMatchingCard(c8400623.cfilter,tp,LOCATION_GRAVE,0,1,nil) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0) -end -function c8400623.spop(e,tp,eg,ep,ev,re,r,rp,c) - local g=Duel.GetMatchingGroup(c8400623.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK) - e1:SetReset(RESET_EVENT+0xff0000) - e1:SetValue(g:GetCount()*600) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_SET_DEFENCE) - c:RegisterEffect(e2) -end -function c8400623.descon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c8400623.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsDestructable() end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c8400623.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c84013237.lua b/script/c84013237.lua deleted file mode 100644 index ca472accba..0000000000 --- a/script/c84013237.lua +++ /dev/null @@ -1,46 +0,0 @@ ---No.39 希望皇ホープ -function c84013237.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,4,2) - c:EnableReviveLimit() - --disable attack - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(84013237,0)) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetCost(c84013237.atkcost) - e1:SetOperation(c84013237.atkop) - c:RegisterEffect(e1) - --self destroy - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(84013237,1)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_BE_BATTLE_TARGET) - e2:SetCondition(c84013237.descon) - e2:SetTarget(c84013237.destg) - e2:SetOperation(c84013237.desop) - c:RegisterEffect(e2) -end -c84013237.xyz_number=39 -function c84013237.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c84013237.atkop(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateAttack() -end -function c84013237.descon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return Duel.GetAttackTarget()==c and c:GetOverlayCount()==0 -end -function c84013237.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0) -end -function c84013237.desop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - Duel.Destroy(e:GetHandler(),REASON_EFFECT) - end -end diff --git a/script/c84055227.lua b/script/c84055227.lua deleted file mode 100644 index 5b93386f08..0000000000 --- a/script/c84055227.lua +++ /dev/null @@ -1,30 +0,0 @@ ---ゲイシャドウ -function c84055227.initial_effect(c) - c:EnableCounterPermit(0x3001) - --add counter - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(84055227,0)) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_BATTLE_DESTROYING) - e1:SetCondition(c84055227.condition) - e1:SetOperation(c84055227.operation) - c:RegisterEffect(e1) - --attackup - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(c84055227.attackup) - c:RegisterEffect(e2) -end -function c84055227.condition(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsRelateToBattle() and c:GetBattleTarget():IsType(TYPE_MONSTER) -end -function c84055227.operation(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():AddCounter(0x3001,1) -end -function c84055227.attackup(e,c) - return c:GetCounter(0x3001)*200 -end diff --git a/script/c84058253.lua b/script/c84058253.lua deleted file mode 100644 index 63f8929638..0000000000 --- a/script/c84058253.lua +++ /dev/null @@ -1,105 +0,0 @@ ---キメラテック・ランページ・ドラゴン -function c84058253.initial_effect(c) - c:EnableReviveLimit() - --fusion material - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_FUSION_MATERIAL) - e1:SetCondition(c84058253.fscondition) - e1:SetOperation(c84058253.fsoperation) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetCondition(c84058253.descon) - e2:SetTarget(c84058253.destg) - e2:SetOperation(c84058253.desop) - c:RegisterEffect(e2) - --extra attack - local e3=Effect.CreateEffect(c) - e3:SetCategory(CATEGORY_TOGRAVE) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1) - e3:SetTarget(c84058253.tgtg) - e3:SetOperation(c84058253.tgop) - c:RegisterEffect(e3) -end -function c84058253.ffilter(c) - return c:IsSetCard(0x1093) -end -function c84058253.fscondition(e,g,gc,chkf) - if g==nil then return false end - if gc then return c84058253.ffilter(gc) and g:IsExists(c84058253.ffilter,1,gc) end - local g1=g:Filter(c84058253.ffilter,nil) - if chkf~=PLAYER_NONE then - return g1:FilterCount(Card.IsOnField,nil)~=0 and g1:GetCount()>=2 - else return g1:GetCount()>=2 end -end -function c84058253.fsoperation(e,tp,eg,ep,ev,re,r,rp,gc,chkf) - if gc then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL) - local g1=eg:FilterSelect(tp,c84058253.ffilter,1,63,gc) - Duel.SetFusionMaterial(g1) - return - end - local sg=eg:Filter(c84058253.ffilter,nil) - if chkf==PLAYER_NONE or sg:GetCount()==2 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL) - local g1=sg:Select(tp,2,63,nil) - Duel.SetFusionMaterial(g1) - return - end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL) - local g1=sg:FilterSelect(tp,aux.FConditionCheckF,1,1,nil,chkf) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL) - local g2=sg:Select(tp,1,63,g1:GetFirst()) - g1:Merge(g2) - Duel.SetFusionMaterial(g1) -end -function c84058253.descon(e,tp,eg,ep,ev,re,r,rp) - return bit.band(e:GetHandler():GetSummonType(),SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION -end -function c84058253.desfilter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable() -end -function c84058253.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and c84058253.desfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c84058253.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end - local ct=e:GetHandler():GetMaterialCount() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp, c84058253.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,ct,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c84058253.desop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) - Duel.Destroy(g,REASON_EFFECT) -end -function c84058253.tgfilter(c) - return c:IsRace(RACE_MACHINE) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsAbleToGrave() -end -function c84058253.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c84058253.tgfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) -end -function c84058253.tgop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c84058253.tgfilter,tp,LOCATION_DECK,0,1,2,nil) - if g:GetCount()==0 then return end - Duel.SendtoGrave(g,REASON_EFFECT) - local c=e:GetHandler() - local ct=g:FilterCount(Card.IsLocation,nil,LOCATION_GRAVE) - if ct>0 and c:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_EXTRA_ATTACK) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetValue(ct) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - c:RegisterEffect(e1) - end -end diff --git a/script/c84080938.lua b/script/c84080938.lua deleted file mode 100644 index 7945f04ef7..0000000000 --- a/script/c84080938.lua +++ /dev/null @@ -1,35 +0,0 @@ ---慈悲深き修道女 -function c84080938.initial_effect(c) - --to hand - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c84080938.cost) - e1:SetTarget(c84080938.target) - e1:SetOperation(c84080938.operation) - c:RegisterEffect(e1) -end -function c84080938.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end -function c84080938.filter(c,tid) - return c:IsType(TYPE_MONSTER) and c:GetTurnID()==tid and c:IsReason(REASON_BATTLE) and c:IsAbleToHand() -end -function c84080938.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local tid=Duel.GetTurnCount() - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c84080938.filter(chkc,tid) end - if chk==0 then return Duel.IsExistingTarget(c84080938.filter,tp,LOCATION_GRAVE,0,1,nil,tid) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g=Duel.SelectTarget(tp,c84080938.filter,tp,LOCATION_GRAVE,0,1,1,nil,tid) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c84080938.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end diff --git a/script/c84117021.lua b/script/c84117021.lua deleted file mode 100644 index aff4886146..0000000000 --- a/script/c84117021.lua +++ /dev/null @@ -1,100 +0,0 @@ ---魔力隔壁 -function c84117021.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c84117021.target) - e1:SetOperation(c84117021.activate) - c:RegisterEffect(e1) -end -function c84117021.filter(c) - return c:IsFaceup() and c:IsRace(RACE_SPELLCASTER) -end -function c84117021.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local opt=0 - if Duel.IsExistingTarget(c84117021.filter,tp,LOCATION_MZONE,0,1,nil) then - opt=Duel.SelectOption(tp,aux.Stringid(84117021,0),aux.Stringid(84117021,1)) - end - Duel.SetTargetParam(opt) - if opt==0 then - e:SetProperty(0) - else - e:SetProperty(EFFECT_FLAG_CARD_TARGET) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - Duel.SelectTarget(tp,c84117021.filter,tp,LOCATION_MZONE,0,1,1,nil) - end -end -function c84117021.activate(e,tp,eg,ep,ev,re,r,rp) - local opt=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM) - if opt==0 then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_DISABLE_SUMMON) - e1:SetProperty(EFFECT_FLAG_IGNORE_RANGE+EFFECT_FLAG_SET_AVAILABLE) - e1:SetTarget(aux.TargetBoolFunction(Card.IsRace,RACE_SPELLCASTER)) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) - local e2=e1:Clone() - e2:SetCode(EFFECT_CANNOT_DISABLE_SPSUMMON) - Duel.RegisterEffect(e2,tp) - local e3=e1:Clone() - e3:SetCode(EFFECT_CANNOT_DISABLE_FLIP_SUMMON) - Duel.RegisterEffect(e3,tp) - local e4=Effect.CreateEffect(e:GetHandler()) - e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e4:SetCode(EVENT_SUMMON_SUCCESS) - e4:SetCondition(c84117021.sumcon) - e4:SetOperation(c84117021.sumsuc) - e4:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e4,tp) - local e5=e4:Clone() - e5:SetCode(EVENT_SPSUMMON_SUCCESS) - Duel.RegisterEffect(e5,tp) - local e6=e4:Clone() - e6:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - Duel.RegisterEffect(e6,tp) - else - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetOperation(c84117021.atkop) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - end - end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CHANGE_DAMAGE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetTargetRange(0,1) - e1:SetValue(0) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) - local e2=e1:Clone() - e2:SetCode(EFFECT_NO_EFFECT_DAMAGE) - e2:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e2,tp) -end -function c84117021.sumcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c84117021.filter,1,nil) -end -function c84117021.sumsuc(e,tp,eg,ep,ev,re,r,rp) - Duel.SetChainLimitTillChainEnd(c84117021.efun) -end -function c84117021.efun(e,ep,tp) - return ep==tp -end -function c84117021.atkop(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EFFECT_CANNOT_ACTIVATE) - e1:SetTargetRange(0,1) - e1:SetValue(1) - e1:SetReset(RESET_PHASE+PHASE_DAMAGE) - Duel.RegisterEffect(e1,tp) -end diff --git a/script/c84124261.lua b/script/c84124261.lua deleted file mode 100644 index 1414f1bc98..0000000000 --- a/script/c84124261.lua +++ /dev/null @@ -1,38 +0,0 @@ ---No.39 希望皇ホープ・ルーツ -function c84124261.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,1,2) - c:EnableReviveLimit() - --disable attack - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(84124261,0)) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetCost(c84124261.atkcost) - e1:SetTarget(c84124261.atktg) - e1:SetOperation(c84124261.atkop) - c:RegisterEffect(e1) -end -c84124261.xyz_number=39 -function c84124261.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c84124261.atktg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetCard(Duel.GetAttacker()) -end -function c84124261.atkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if Duel.NegateAttack() and tc:IsType(TYPE_XYZ) and tc:IsFaceup() - and c:IsRelateToEffect(e) and c:IsFaceup() then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(tc:GetRank()*500) - e1:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e1) - end -end diff --git a/script/c84133008.lua b/script/c84133008.lua deleted file mode 100644 index 973ccd6cbf..0000000000 --- a/script/c84133008.lua +++ /dev/null @@ -1,35 +0,0 @@ ---モンスター・アイ -function c84133008.initial_effect(c) - --salvage - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(84133008,0)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c84133008.thcost) - e1:SetTarget(c84133008.thtg) - e1:SetOperation(c84133008.thop) - c:RegisterEffect(e1) -end -function c84133008.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,1000) end - Duel.PayLPCost(tp,1000) -end -function c84133008.filter(c) - return c:IsCode(24094653) and c:IsAbleToHand() -end -function c84133008.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c84133008.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c84133008.filter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c84133008.filter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c84133008.thop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end diff --git a/script/c84136000.lua b/script/c84136000.lua deleted file mode 100644 index d3632ceb2b..0000000000 --- a/script/c84136000.lua +++ /dev/null @@ -1,50 +0,0 @@ ---復活の墓穴 -function c84136000.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetCondition(c84136000.condition) - e1:SetTarget(c84136000.target) - e1:SetOperation(c84136000.activate) - c:RegisterEffect(e1) -end -function c84136000.cfilter(c,tp) - return c:IsLocation(LOCATION_GRAVE) and c:GetPreviousControler()==tp and c:IsReason(REASON_BATTLE) -end -function c84136000.condition(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c84136000.cfilter,1,nil,tp) -end -function c84136000.spfilter(c,e,tp) - return c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c84136000.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c84136000.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) - and Duel.IsExistingTarget(c84136000.spfilter,1-tp,LOCATION_GRAVE,0,1,nil,e,1-tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g1=Duel.SelectTarget(tp,c84136000.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_SPSUMMON) - local g2=Duel.SelectTarget(1-tp,c84136000.spfilter,1-tp,LOCATION_GRAVE,0,1,1,nil,e,1-tp) - g1:Merge(g2) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g1,2,PLAYER_ALL,g1:GetFirst():GetOwner()) -end -function c84136000.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local tc=g:GetFirst() - while tc do - if tc:IsRelateToEffect(e) and Duel.SpecialSummonStep(tc,0,tc:GetControler(),tc:GetControler(),false,false,POS_FACEUP_DEFENCE) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_CHANGE_POSITION) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1,true) - end - tc=g:GetNext() - end - Duel.SpecialSummonComplete() -end diff --git a/script/c8414337.lua b/script/c8414337.lua deleted file mode 100644 index 6c81f2934b..0000000000 --- a/script/c8414337.lua +++ /dev/null @@ -1,27 +0,0 @@ ---ガスタの風塵 -function c8414337.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c8414337.condition) - e1:SetOperation(c8414337.activate) - c:RegisterEffect(e1) -end -function c8414337.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp and Duel.GetCurrentPhase()<=PHASE_BATTLE -end -function c8414337.activate(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EFFECT_CANNOT_ACTIVATE) - e1:SetTargetRange(0,1) - e1:SetCondition(c8414337.actcon) - e1:SetValue(1) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function c8414337.actcon(e) - return Duel.CheckEvent(EVENT_ATTACK_ANNOUNCE) and Duel.GetAttacker():IsSetCard(0x10) -end diff --git a/script/c84171830.lua b/script/c84171830.lua deleted file mode 100644 index e1393f8f47..0000000000 --- a/script/c84171830.lua +++ /dev/null @@ -1,77 +0,0 @@ ---真帝王領域 -function c84171830.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --cannot spsummon - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e2:SetRange(LOCATION_FZONE) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetTargetRange(0,1) - e2:SetCondition(c84171830.discon) - e2:SetTarget(c84171830.splimit) - c:RegisterEffect(e2) - --atk - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetCode(EFFECT_UPDATE_ATTACK) - e3:SetRange(LOCATION_FZONE) - e3:SetTargetRange(LOCATION_MZONE,0) - e3:SetTarget(c84171830.atktg) - e3:SetCondition(c84171830.atkcon) - e3:SetValue(800) - c:RegisterEffect(e3) - --lv - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(84171830,0)) - e4:SetType(EFFECT_TYPE_IGNITION) - e4:SetRange(LOCATION_FZONE) - e4:SetCountLimit(1) - e4:SetTarget(c84171830.lvtg) - e4:SetOperation(c84171830.lvop) - c:RegisterEffect(e4) -end -function c84171830.splimit(e,c) - return c:IsLocation(LOCATION_EXTRA) -end -function c84171830.cfilter(c) - return bit.band(c:GetSummonType(),SUMMON_TYPE_ADVANCE)==SUMMON_TYPE_ADVANCE -end -function c84171830.discon(e) - local tp=e:GetHandlerPlayer() - return Duel.GetFieldGroupCount(tp,LOCATION_EXTRA,0)==0 - and Duel.IsExistingMatchingCard(c84171830.cfilter,tp,LOCATION_MZONE,0,1,nil) - and not Duel.IsExistingMatchingCard(c84171830.cfilter,tp,0,LOCATION_MZONE,1,nil) -end -function c84171830.atktg(e,c) - return bit.band(c:GetSummonType(),SUMMON_TYPE_ADVANCE)==SUMMON_TYPE_ADVANCE and Duel.GetAttacker()==c -end -function c84171830.atkcon(e) - return Duel.GetCurrentPhase()==PHASE_DAMAGE_CAL and Duel.GetAttackTarget()~=nil -end -function c84171830.filter(c) - return c:GetAttack()==2800 and c:GetDefence()==1000 -end -function c84171830.lvtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c84171830.filter,tp,LOCATION_HAND,0,1,nil) end -end -function c84171830.lvop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) then return end - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(84171830,1)) - local g=Duel.SelectMatchingCard(tp,c84171830.filter,tp,LOCATION_HAND,0,1,1,nil) - if g:GetCount()>0 then - Duel.ConfirmCards(1-tp,g) - Duel.ShuffleHand(tp) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_LEVEL) - e1:SetValue(-2) - e1:SetReset(RESET_EVENT+0xfe0000+RESET_PHASE+PHASE_END) - g:GetFirst():RegisterEffect(e1) - end -end diff --git a/script/c84173492.lua b/script/c84173492.lua deleted file mode 100644 index 9c79c28cbb..0000000000 --- a/script/c84173492.lua +++ /dev/null @@ -1,27 +0,0 @@ ---不屈闘士 レイレイ -function c84173492.initial_effect(c) - --to defence - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE+PHASE_BATTLE) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCondition(c84173492.poscon) - e1:SetOperation(c84173492.posop) - c:RegisterEffect(e1) -end -function c84173492.poscon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetAttackedCount()>0 -end -function c84173492.posop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsAttackPos() then - Duel.ChangePosition(c,POS_FACEUP_DEFENCE) - end - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_CHANGE_POSITION) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_COPY_INHERIT) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,3) - c:RegisterEffect(e1) -end diff --git a/script/c84177693.lua b/script/c84177693.lua deleted file mode 100644 index f28a48b19a..0000000000 --- a/script/c84177693.lua +++ /dev/null @@ -1,27 +0,0 @@ ---ホーリー・ジェラル -function c84177693.initial_effect(c) - --recover - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(84177693,0)) - e1:SetCategory(CATEGORY_RECOVER) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCondition(c84177693.reccon) - e1:SetTarget(c84177693.rectg) - e1:SetOperation(c84177693.recop) - c:RegisterEffect(e1) -end -function c84177693.reccon(e,tp,eg,ep,ev,re,r,rp) - return not e:GetHandler():IsReason(REASON_BATTLE) and Duel.IsEnvironment(56433456) -end -function c84177693.rectg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(1000) - Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,1000) -end -function c84177693.recop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Recover(p,d,REASON_EFFECT) -end diff --git a/script/c84206435.lua b/script/c84206435.lua deleted file mode 100644 index cf272eede2..0000000000 --- a/script/c84206435.lua +++ /dev/null @@ -1,26 +0,0 @@ ---氷結界の紋章 -function c84206435.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c84206435.target) - e1:SetOperation(c84206435.activate) - c:RegisterEffect(e1) -end -function c84206435.filter(c) - return c:IsSetCard(0x2f) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() -end -function c84206435.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c84206435.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c84206435.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c84206435.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c84220251.lua b/script/c84220251.lua deleted file mode 100644 index f85f440815..0000000000 --- a/script/c84220251.lua +++ /dev/null @@ -1,29 +0,0 @@ ---蘇生紋章 -function c84220251.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c84220251.target) - e1:SetOperation(c84220251.activate) - c:RegisterEffect(e1) -end -function c84220251.filter(c,e,tp) - return c:IsSetCard(0x76) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c84220251.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c84220251.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c84220251.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c84220251.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c84220251.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c84224627.lua b/script/c84224627.lua deleted file mode 100644 index d3df1850b2..0000000000 --- a/script/c84224627.lua +++ /dev/null @@ -1,60 +0,0 @@ ---キャット・シャーク -function c84224627.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,2,2) - c:EnableReviveLimit() - --battle indestructable - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e1:SetCondition(c84224627.indcon) - e1:SetValue(1) - c:RegisterEffect(e1) - --double - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetRange(LOCATION_MZONE) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetHintTiming(TIMING_DAMAGE_STEP) - e2:SetCountLimit(1) - e2:SetCondition(c84224627.condition) - e2:SetCost(c84224627.cost) - e2:SetTarget(c84224627.target) - e2:SetOperation(c84224627.operation) - c:RegisterEffect(e2) -end -function c84224627.indcon(e) - return e:GetHandler():GetOverlayGroup():IsExists(Card.IsAttribute,1,nil,ATTRIBUTE_WATER) -end -function c84224627.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end -function c84224627.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c84224627.filter(c) - return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:IsRankBelow(4) -end -function c84224627.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c84224627.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c84224627.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c84224627.filter,tp,LOCATION_MZONE,0,1,1,nil) -end -function c84224627.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - e1:SetValue(tc:GetBaseAttack()*2) - tc:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_SET_DEFENCE_FINAL) - e2:SetValue(tc:GetBaseDefence()*2) - tc:RegisterEffect(e2) - end -end diff --git a/script/c84243274.lua b/script/c84243274.lua deleted file mode 100644 index 524f668de6..0000000000 --- a/script/c84243274.lua +++ /dev/null @@ -1,109 +0,0 @@ ---VWXYZ-ドラゴン・カタパルトキャノン -function c84243274.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcCode2(c,58859575,91998119,true,true) - --spsummon condition - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(c84243274.splimit) - c:RegisterEffect(e1) - --special summon rule - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_SPSUMMON_PROC) - e2:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e2:SetRange(LOCATION_EXTRA) - e2:SetCondition(c84243274.spcon) - e2:SetOperation(c84243274.spop) - c:RegisterEffect(e2) - --remove - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(84243274,0)) - e3:SetCategory(CATEGORY_REMOVE) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1) - e3:SetTarget(c84243274.rmtg) - e3:SetOperation(c84243274.rmop) - c:RegisterEffect(e3) - --poschange - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(84243274,1)) - e4:SetCategory(CATEGORY_POSITION) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e4:SetCode(EVENT_ATTACK_ANNOUNCE) - e4:SetProperty(EFFECT_FLAG_CARD_TARGET) - e4:SetTarget(c84243274.postg) - e4:SetOperation(c84243274.posop) - c:RegisterEffect(e4) -end -function c84243274.splimit(e,se,sp,st) - return not e:GetHandler():IsLocation(LOCATION_EXTRA) -end -function c84243274.spfilter(c,code) - return c:IsCode(code) and c:IsAbleToRemoveAsCost() -end -function c84243274.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ft<-1 then return false end - local g1=Duel.GetMatchingGroup(c84243274.spfilter,tp,LOCATION_ONFIELD,0,nil,58859575) - local g2=Duel.GetMatchingGroup(c84243274.spfilter,tp,LOCATION_ONFIELD,0,nil,91998119) - if g1:GetCount()==0 or g2:GetCount()==0 then return false end - if ft>0 then return true end - local f1=g1:FilterCount(Card.IsLocation,nil,LOCATION_MZONE) - local f2=g2:FilterCount(Card.IsLocation,nil,LOCATION_MZONE) - if ft==-1 then return f1>0 and f2>0 - else return f1>0 or f2>0 end -end -function c84243274.spop(e,tp,eg,ep,ev,re,r,rp,c) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - local g1=Duel.GetMatchingGroup(c84243274.spfilter,tp,LOCATION_ONFIELD,0,nil,58859575) - local g2=Duel.GetMatchingGroup(c84243274.spfilter,tp,LOCATION_ONFIELD,0,nil,91998119) - g1:Merge(g2) - local g=Group.CreateGroup() - local tc=nil - for i=1,2 do - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - if ft<=0 then - tc=g1:FilterSelect(tp,Card.IsLocation,1,1,nil,LOCATION_MZONE):GetFirst() - else - tc=g1:Select(tp,1,1,nil):GetFirst() - end - g:AddCard(tc) - g1:Remove(Card.IsCode,nil,tc:GetCode()) - ft=ft+1 - end - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c84243274.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and chkc:IsAbleToRemove() end - if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,0) -end -function c84243274.rmop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) - end -end -function c84243274.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - local bc=Duel.GetAttackTarget() - if chk==0 then return bc and bc:IsCanBeEffectTarget(e) end - Duel.SetTargetCard(bc) - Duel.SetOperationInfo(0,CATEGORY_POSITION,bc,1,0,0) -end -function c84243274.posop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.ChangePosition(tc,POS_FACEUP_DEFENCE,POS_FACEDOWN_DEFENCE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK,true) - end -end diff --git a/script/c84257639.lua b/script/c84257639.lua deleted file mode 100644 index 1066d09fba..0000000000 --- a/script/c84257639.lua +++ /dev/null @@ -1,22 +0,0 @@ ---治療の神 ディアン・ケト -function c84257639.initial_effect(c) - --recover - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCategory(CATEGORY_RECOVER) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c84257639.tg) - e1:SetOperation(c84257639.op) - c:RegisterEffect(e1) -end -function c84257639.tg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(1000) - Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,1000) -end -function c84257639.op(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Recover(p,d,REASON_EFFECT) -end diff --git a/script/c84268896.lua b/script/c84268896.lua deleted file mode 100644 index 9898bf5f08..0000000000 --- a/script/c84268896.lua +++ /dev/null @@ -1,62 +0,0 @@ ---アーティファクト-カドケウス -function c84268896.initial_effect(c) - c:SetUniqueOnField(1,0,84268896) - --set - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_MONSTER_SSET) - e1:SetValue(TYPE_SPELL) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(84268896,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetCondition(c84268896.spcon) - e2:SetTarget(c84268896.sptg) - e2:SetOperation(c84268896.spop) - c:RegisterEffect(e2) - --draw - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(84268896,1)) - e3:SetCategory(CATEGORY_DRAW) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - e3:SetRange(LOCATION_MZONE) - e3:SetCondition(c84268896.drcon) - e3:SetTarget(c84268896.drtg) - e3:SetOperation(c84268896.drop) - c:RegisterEffect(e3) -end -function c84268896.spcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsPreviousLocation(LOCATION_SZONE) and c:IsPreviousPosition(POS_FACEDOWN) - and c:IsReason(REASON_DESTROY) and Duel.GetTurnPlayer()~=tp -end -function c84268896.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c84268896.spop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP) - end -end -function c84268896.filter(c) - return c:IsFaceup() and c:IsSetCard(0x97) -end -function c84268896.drcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp and not eg:IsContains(e:GetHandler()) and eg:IsExists(c84268896.filter,1,nil) -end -function c84268896.drtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsRelateToEffect(e) and e:GetHandler():IsFaceup() end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(1) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c84268896.drop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) or e:GetHandler():IsFacedown() then return end - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end diff --git a/script/c84290642.lua b/script/c84290642.lua deleted file mode 100644 index 035661f3bd..0000000000 --- a/script/c84290642.lua +++ /dev/null @@ -1,34 +0,0 @@ ---スナイプストーカー -function c84290642.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(84290642,0)) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_DICE) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c84290642.cost) - e1:SetTarget(c84290642.target) - e1:SetOperation(c84290642.activate) - c:RegisterEffect(e1) -end -function c84290642.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) -end -function c84290642.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsDestructable() end - if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - Duel.SelectTarget(tp,Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DICE,nil,0,tp,1) -end -function c84290642.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - local d=Duel.TossDice(tp,1) - if d~=1 and d~=6 then - Duel.Destroy(tc,REASON_EFFECT) - end - end -end diff --git a/script/c84298614.lua b/script/c84298614.lua deleted file mode 100644 index 1698a93841..0000000000 --- a/script/c84298614.lua +++ /dev/null @@ -1,64 +0,0 @@ ---強化蘇生 -function c84298614.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_END_PHASE) - e1:SetTarget(c84298614.target) - e1:SetOperation(c84298614.operation) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e2:SetRange(LOCATION_SZONE) - e2:SetCode(EVENT_LEAVE_FIELD) - e2:SetCondition(c84298614.descon) - e2:SetOperation(c84298614.desop) - c:RegisterEffect(e2) -end -function c84298614.filter(c,e,tp) - return c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c84298614.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c84298614.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c84298614.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c84298614.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c84298614.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)~=0 then - c:SetCardTarget(tc) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_OWNER_RELATE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(100) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetCondition(c84298614.rcon) - tc:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_UPDATE_DEFENCE) - tc:RegisterEffect(e2) - local e3=e1:Clone() - e3:SetCode(EFFECT_UPDATE_LEVEL) - e3:SetValue(1) - tc:RegisterEffect(e3) - end -end -function c84298614.rcon(e) - return e:GetOwner():IsHasCardTarget(e:GetHandler()) and not e:GetHandler():IsImmuneToEffect(e) -end -function c84298614.descon(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetHandler():GetFirstCardTarget() - return tc and eg:IsContains(tc) and tc:IsReason(REASON_DESTROY) -end -function c84298614.desop(e,tp,eg,ep,ev,re,r,rp) - Duel.Destroy(e:GetHandler(),REASON_EFFECT) -end diff --git a/script/c84313685.lua b/script/c84313685.lua deleted file mode 100644 index 55a3bf13a1..0000000000 --- a/script/c84313685.lua +++ /dev/null @@ -1,112 +0,0 @@ ---ヴァイロン・テセラクト -function c84313685.initial_effect(c) - --equip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(84313685,0)) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetTarget(c84313685.eqtg) - e1:SetOperation(c84313685.eqop) - c:RegisterEffect(e1) - --unequip - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(84313685,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_SZONE) - e2:SetCondition(c84313685.uncon) - e2:SetTarget(c84313685.sptg) - e2:SetOperation(c84313685.spop) - c:RegisterEffect(e2) - --destroy sub - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_EQUIP) - e3:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e3:SetCode(EFFECT_DESTROY_SUBSTITUTE) - e3:SetCondition(c84313685.uncon) - e3:SetValue(1) - c:RegisterEffect(e3) - --special summon - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(84313685,2)) - e4:SetCategory(CATEGORY_SPECIAL_SUMMON) - e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e4:SetCode(EVENT_BATTLE_DESTROYING) - e4:SetProperty(EFFECT_FLAG_CARD_TARGET) - e4:SetRange(LOCATION_SZONE) - e4:SetCondition(c84313685.gspcon) - e4:SetTarget(c84313685.gsptg) - e4:SetOperation(c84313685.gspop) - c:RegisterEffect(e4) - --eqlimit - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_SINGLE) - e5:SetCode(EFFECT_EQUIP_LIMIT) - e5:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e5:SetValue(c84313685.eqlimit) - c:RegisterEffect(e5) -end -function c84313685.uncon(e) - return e:GetHandler():IsStatus(STATUS_UNION) -end -function c84313685.eqlimit(e,c) - return c:IsSetCard(0x30) -end -function c84313685.filter(c) - return c:IsFaceup() and c:IsSetCard(0x30) and c:GetUnionCount()==0 -end -function c84313685.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c84313685.filter(chkc) end - if chk==0 then return e:GetHandler():GetFlagEffect(84313685)==0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingTarget(c84313685.filter,tp,LOCATION_MZONE,0,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local g=Duel.SelectTarget(tp,c84313685.filter,tp,LOCATION_MZONE,0,1,1,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0) - e:GetHandler():RegisterFlagEffect(84313685,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1) -end -function c84313685.eqop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if not c:IsRelateToEffect(e) or c:IsFacedown() then return end - if not tc:IsRelateToEffect(e) or not c84313685.filter(tc) then - Duel.SendtoGrave(c,REASON_EFFECT) - return - end - if not Duel.Equip(tp,c,tc,false) then return end - c:SetStatus(STATUS_UNION,true) -end -function c84313685.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():GetFlagEffect(84313685)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) - e:GetHandler():RegisterFlagEffect(84313685,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1) -end -function c84313685.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP_ATTACK) - end -end -function c84313685.gspcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsStatus(STATUS_UNION) and e:GetHandler():GetEquipTarget()==eg:GetFirst() -end -function c84313685.gfilter(c,e,tp) - return c:IsLevelBelow(4) and c:IsSetCard(0x30) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c84313685.gsptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c84313685.gfilter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c84313685.gfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c84313685.gfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c84313685.gspop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c84341431.lua b/script/c84341431.lua deleted file mode 100644 index 9830f23431..0000000000 --- a/script/c84341431.lua +++ /dev/null @@ -1,49 +0,0 @@ ---デーモンの巨神 -function c84341431.initial_effect(c) - --destroy replace - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EFFECT_DESTROY_REPLACE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_NO_TURN_RESET) - e1:SetRange(LOCATION_MZONE) - e1:SetTarget(c84341431.reptg) - e1:SetCountLimit(1) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(84341431,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e2:SetCondition(c84341431.condition) - e2:SetTarget(c84341431.target) - e2:SetOperation(c84341431.operation) - c:RegisterEffect(e2) -end -function c84341431.reptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReason(REASON_EFFECT) and Duel.CheckLPCost(tp,500) end - if Duel.SelectYesNo(tp,aux.Stringid(84341431,0)) then - Duel.PayLPCost(tp,500) - return true - else return false end -end -function c84341431.condition(e,tp,eg,ep,ev,re,r,rp) - return bit.band(e:GetHandler():GetReason(),0x41)==0x41 -end -function c84341431.filter(c,e,tp) - return c:IsSetCard(0x45) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c84341431.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c84341431.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c84341431.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c84341431.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c84361420.lua b/script/c84361420.lua deleted file mode 100644 index dbe531643f..0000000000 --- a/script/c84361420.lua +++ /dev/null @@ -1,40 +0,0 @@ ---エッジ・ハンマー -function c84361420.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,0x1e0) - e1:SetCost(c84361420.cost) - e1:SetTarget(c84361420.target) - e1:SetOperation(c84361420.activate) - c:RegisterEffect(e1) -end -function c84361420.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsCode,1,nil,59793705) end - local g=Duel.SelectReleaseGroup(tp,Card.IsCode,1,1,nil,59793705) - Duel.Release(g,REASON_COST) -end -function c84361420.filter(c) - return c:IsDestructable() -end -function c84361420.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c84361420.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c84361420.filter,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c84361420.filter,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,0) -end -function c84361420.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - local atk=tc:GetAttack() - if Duel.Destroy(tc,REASON_EFFECT)>0 then - local dam=tc:GetBaseAttack() - Duel.Damage(1-tp,dam,REASON_EFFECT) - end - end -end diff --git a/script/c8437145.lua b/script/c8437145.lua deleted file mode 100644 index bb1a23014a..0000000000 --- a/script/c8437145.lua +++ /dev/null @@ -1,68 +0,0 @@ ---煉獄の死徒 -function c8437145.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c8437145.target) - e1:SetOperation(c8437145.activate) - c:RegisterEffect(e1) - --destroy replace - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EFFECT_DESTROY_REPLACE) - e2:SetRange(LOCATION_GRAVE) - e2:SetTarget(c8437145.reptg) - e2:SetValue(c8437145.repval) - c:RegisterEffect(e2) -end -function c8437145.filter(c) - return c:IsFaceup() and c:IsSetCard(0xbb) -end -function c8437145.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c8437145.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c8437145.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c8437145.filter,tp,LOCATION_MZONE,0,1,1,nil) -end -function c8437145.activate(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsControler(tp) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_IMMUNE_EFFECT) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e1:SetValue(c8437145.efilter) - e1:SetOwnerPlayer(tp) - tc:RegisterEffect(e1) - end -end -function c8437145.efilter(e,re) - return e:GetOwnerPlayer()~=re:GetOwnerPlayer() -end -function c8437145.repfilter(c,tp) - return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) - and c:IsSetCard(0xbb) and c:IsReason(REASON_EFFECT) -end -function c8437145.reptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemove() and eg:IsExists(c8437145.repfilter,1,nil,tp) end - if Duel.SelectYesNo(tp,aux.Stringid(8437145,0)) then - local g=eg:Filter(c8437145.repfilter,nil,tp) - if g:GetCount()==1 then - e:SetLabelObject(g:GetFirst()) - else - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESREPLACE) - local cg=g:Select(tp,1,1,nil) - e:SetLabelObject(cg:GetFirst()) - end - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT) - return true - else return false end -end -function c8437145.repval(e,c) - return c==e:GetLabelObject() -end diff --git a/script/c84385264.lua b/script/c84385264.lua deleted file mode 100644 index ef1d2d30f2..0000000000 --- a/script/c84385264.lua +++ /dev/null @@ -1,30 +0,0 @@ ---ライカン・スロープ -function c84385264.initial_effect(c) - c:EnableReviveLimit() - --damage - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(84385264,0)) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_BATTLE_DAMAGE) - e1:SetCondition(c84385264.damcon) - e1:SetTarget(c84385264.damtg) - e1:SetOperation(c84385264.damop) - c:RegisterEffect(e1) -end -function c84385264.damcon(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp -end -function c84385264.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local dam=Duel.GetMatchingGroupCount(Card.IsType,tp,LOCATION_GRAVE,0,nil,TYPE_NORMAL)*200 - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(dam) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,dam) -end -function c84385264.damop(e,tp,eg,ep,ev,re,r,rp) - local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) - local dam=Duel.GetMatchingGroupCount(Card.IsType,tp,LOCATION_GRAVE,0,nil,TYPE_NORMAL)*200 - Duel.Damage(p,dam,REASON_EFFECT) -end diff --git a/script/c84388461.lua b/script/c84388461.lua deleted file mode 100644 index 2802572d73..0000000000 --- a/script/c84388461.lua +++ /dev/null @@ -1,83 +0,0 @@ ---剣聖の影霊衣-セフィラセイバー -function c84388461.initial_effect(c) - --pendulum summon - aux.AddPendulumProcedure(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(84388461,0)) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --splimit - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetRange(LOCATION_PZONE) - e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE) - e2:SetTargetRange(1,0) - e2:SetTarget(c84388461.splimit) - e2:SetCondition(aux.nfbdncon) - c:RegisterEffect(e2) - --spsummon - local e3=Effect.CreateEffect(c) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetDescription(aux.Stringid(84388461,1)) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetCountLimit(1,84388461) - e3:SetRange(LOCATION_MZONE+LOCATION_HAND) - e3:SetCost(c84388461.cost) - e3:SetTarget(c84388461.target) - e3:SetOperation(c84388461.operation) - c:RegisterEffect(e3) -end -function c84388461.splimit(e,c,sump,sumtype,sumpos,targetp) - if c:IsSetCard(0xb4) or c:IsSetCard(0xc4) then return false end - return bit.band(sumtype,SUMMON_TYPE_PENDULUM)==SUMMON_TYPE_PENDULUM -end -function c84388461.filter(c,e,tp,m) - if not c:IsSetCard(0xb4) or bit.band(c:GetType(),0x81)~=0x81 - or not c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true) then return false end - local mg=m:Filter(Card.IsCanBeRitualMaterial,c,c) - if c:IsCode(21105106) then return c:ritual_custom_condition(mg) end - if c.mat_filter then - mg=mg:Filter(c.mat_filter,nil) - end - return mg:CheckWithSumEqual(Card.GetRitualLevel,c:GetLevel(),1,99,c) -end -function c84388461.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end -function c84388461.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local mg=Duel.GetRitualMaterial(tp) - mg:RemoveCard(e:GetHandler()) - return Duel.IsExistingMatchingCard(c84388461.filter,tp,LOCATION_HAND,0,1,nil,e,tp,mg) - end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c84388461.operation(e,tp,eg,ep,ev,re,r,rp) - local mg=Duel.GetRitualMaterial(tp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local tg=Duel.SelectMatchingCard(tp,c84388461.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp,mg) - local tc=tg:GetFirst() - if tc then - mg=mg:Filter(Card.IsCanBeRitualMaterial,tc,tc) - if tc:IsCode(21105106) then - tc:ritual_custom_operation(mg) - local mat=tc:GetMaterial() - Duel.ReleaseRitualMaterial(mat) - else - if tc.mat_filter then - mg=mg:Filter(tc.mat_filter,nil) - end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) - local mat=mg:SelectWithSumEqual(tp,Card.GetRitualLevel,tc:GetLevel(),1,99,tc) - tc:SetMaterial(mat) - Duel.ReleaseRitualMaterial(mat) - end - Duel.BreakEffect() - Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP) - tc:CompleteProcedure() - end -end diff --git a/script/c84389640.lua b/script/c84389640.lua deleted file mode 100644 index 0e2d9e217d..0000000000 --- a/script/c84389640.lua +++ /dev/null @@ -1,67 +0,0 @@ ---窮鼠の進撃 -function c84389640.initial_effect(c) - --activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --atkup - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetDescription(aux.Stringid(84389640,0)) - e2:SetCategory(CATEGORY_ATKCHANGE) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetHintTiming(TIMING_DAMAGE_STEP) - e2:SetRange(LOCATION_SZONE) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e2:SetCondition(c84389640.condition) - e2:SetCost(c84389640.cost) - e2:SetTarget(c84389640.target) - e2:SetOperation(c84389640.operation) - c:RegisterEffect(e2) -end -function c84389640.condition(e,tp,eg,ep,ev,re,r,rp) - local phase=Duel.GetCurrentPhase() - if phase~=PHASE_DAMAGE or Duel.IsDamageCalculated() then return false end - local a=Duel.GetAttacker() - local d=Duel.GetAttackTarget() - if not d then return false end - if d:IsControler(tp) then a,d=d,a end - e:SetLabelObject(d) - return a:IsFaceup() and a:IsLevelBelow(3) and a:IsType(TYPE_NORMAL) and a:IsRelateToBattle() - and d:IsFaceup() and d:IsRelateToBattle() -end -function c84389640.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():GetFlagEffect(84389640)==0 and Duel.CheckLPCost(tp,100) - and e:GetLabelObject():IsAttackAbove(100) end - local lp=Duel.GetLP(tp) - local atk=e:GetLabelObject():GetAttack() - local maxc=lp>atk and atk or lp - maxc=math.floor(maxc/100)*100 - local t={} - for i=1,maxc/100 do - t[i]=i*100 - end - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(84389640,1)) - local pay=Duel.AnnounceNumber(tp,table.unpack(t)) - Duel.PayLPCost(tp,pay) - e:SetLabel(-pay) - e:GetHandler():RegisterFlagEffect(84389640,RESET_PHASE+RESET_DAMAGE,0,1) -end -function c84389640.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local tc=e:GetLabelObject() - if chkc then return chkc==tc end - if chk==0 then return tc:IsCanBeEffectTarget(e) end - Duel.SetTargetCard(tc) -end -function c84389640.operation(e,tp,eg,ep,ev,re,r,rp) - local bc=Duel.GetFirstTarget() - if not e:GetHandler():IsRelateToEffect(e) or not bc or not bc:IsRelateToEffect(e) or not bc:IsControler(1-tp) then return end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetOwnerPlayer(tp) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e1:SetValue(e:GetLabel()) - bc:RegisterEffect(e1) -end diff --git a/script/c84397023.lua b/script/c84397023.lua deleted file mode 100644 index 787d78b963..0000000000 --- a/script/c84397023.lua +++ /dev/null @@ -1,31 +0,0 @@ ---レベル変換実験室 -function c84397023.initial_effect(c) - --activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c84397023.tg) - e1:SetOperation(c84397023.op) - c:RegisterEffect(e1) -end -function c84397023.tg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_HAND,0,1,nil,TYPE_MONSTER) end -end -function c84397023.op(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) - local g=Duel.SelectMatchingCard(tp,Card.IsType,tp,LOCATION_HAND,0,1,1,nil,TYPE_MONSTER) - if g:GetCount()>0 then - Duel.ConfirmCards(1-tp,g) - local ct=Duel.TossDice(tp,1) - if ct==1 then Duel.SendtoGrave(g,REASON_EFFECT) - else - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CHANGE_LEVEL) - e1:SetValue(ct) - e1:SetReset(RESET_EVENT+0xfe0000+RESET_PHASE+PHASE_END) - g:GetFirst():RegisterEffect(e1) - Duel.ShuffleHand(tp) - end - end -end diff --git a/script/c84401683.lua b/script/c84401683.lua deleted file mode 100644 index 1089ec4067..0000000000 --- a/script/c84401683.lua +++ /dev/null @@ -1,90 +0,0 @@ ---ゴルゴニック・ガーディアン -function c84401683.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsRace,RACE_ROCK),3,2) - c:EnableReviveLimit() - --negate - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(84401683,0)) - e1:SetCategory(CATEGORY_DISABLE) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP+0x1c0) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCondition(c84401683.negcon) - e1:SetCost(c84401683.negcost) - e1:SetTarget(c84401683.negtg) - e1:SetOperation(c84401683.negop) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(84401683,1)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetTarget(c84401683.destg) - e2:SetOperation(c84401683.desop) - c:RegisterEffect(e2) -end -function c84401683.negcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end -function c84401683.negcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c84401683.filter(c) - return c:IsFaceup() and c:GetAttack()>0 -end -function c84401683.negtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and c84401683.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c84401683.filter,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - local g=Duel.SelectTarget(tp,c84401683.filter,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0) -end -function c84401683.negop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) and tc:GetAttack()>0 then - Duel.NegateRelatedChain(tc,RESET_TURN_SET) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetValue(0) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - tc:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_DISABLE_EFFECT) - e3:SetValue(RESET_TURN_SET) - e3:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - tc:RegisterEffect(e3) - end -end -function c84401683.desfilter(c) - return c:IsFaceup() and c:GetAttack()==0 and c:IsDestructable() -end -function c84401683.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c84401683.desfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c84401683.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c84401683.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c84401683.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c84417082.lua b/script/c84417082.lua deleted file mode 100644 index 5387c4d981..0000000000 --- a/script/c84417082.lua +++ /dev/null @@ -1,60 +0,0 @@ ---No.91 サンダー・スパーク・ドラゴン -function c84417082.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,4,3) - c:EnableReviveLimit() - --destroy1 - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(84417082,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE) - e1:SetCost(c84417082.cost1) - e1:SetTarget(c84417082.target1) - e1:SetOperation(c84417082.operation1) - c:RegisterEffect(e1) - --destroy2 - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(84417082,1)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE) - e2:SetCost(c84417082.cost2) - e2:SetTarget(c84417082.target2) - e2:SetOperation(c84417082.operation2) - c:RegisterEffect(e2) -end -c84417082.xyz_number=91 -function c84417082.cost1(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,3,REASON_COST) end - Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) - e:GetHandler():RemoveOverlayCard(tp,3,3,REASON_COST) -end -function c84417082.filter1(c) - return c:IsFaceup() and c:IsDestructable() -end -function c84417082.target1(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c84417082.filter1,tp,LOCATION_MZONE,LOCATION_MZONE,1,e:GetHandler()) end - local g=Duel.GetMatchingGroup(c84417082.filter1,tp,LOCATION_MZONE,LOCATION_MZONE,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c84417082.operation1(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c84417082.filter1,tp,LOCATION_MZONE,LOCATION_MZONE,e:GetHandler()) - Duel.Destroy(g,REASON_EFFECT) -end -function c84417082.cost2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,5,REASON_COST) end - Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) - e:GetHandler():RemoveOverlayCard(tp,5,5,REASON_COST) -end -function c84417082.target2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDestructable,tp,0,LOCATION_ONFIELD,1,nil) end - local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,0,LOCATION_ONFIELD,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c84417082.operation2(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,0,LOCATION_ONFIELD,nil) - Duel.Destroy(g,REASON_EFFECT) -end diff --git a/script/c84428023.lua b/script/c84428023.lua deleted file mode 100644 index a4d6e97158..0000000000 --- a/script/c84428023.lua +++ /dev/null @@ -1,74 +0,0 @@ ---エレキャッシュ -function c84428023.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c84428023.target) - e1:SetOperation(c84428023.operation) - c:RegisterEffect(e1) - --Atk up - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(800) - c:RegisterEffect(e2) - --Disable - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_EQUIP) - e3:SetCode(EFFECT_DISABLE) - c:RegisterEffect(e3) - --Equip limit - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetCode(EFFECT_EQUIP_LIMIT) - e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e4:SetValue(c84428023.eqlimit) - c:RegisterEffect(e4) - --atkup - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(84428023,0)) - e4:SetCategory(CATEGORY_DRAW) - e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e4:SetCode(EVENT_DAMAGE) - e4:SetRange(LOCATION_SZONE) - e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e4:SetCondition(c84428023.drcon) - e4:SetTarget(c84428023.drtg) - e4:SetOperation(c84428023.drop) - c:RegisterEffect(e4) -end -function c84428023.eqlimit(e,c) - return c:IsLevelBelow(3) and c:IsRace(RACE_THUNDER) -end -function c84428023.filter(c) - return c:IsLevelBelow(3) and c:IsFaceup() and c:IsRace(RACE_THUNDER) -end -function c84428023.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c84428023.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c84428023.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c84428023.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c84428023.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,e:GetHandler(),tc) - end -end -function c84428023.drcon(e,tp,eg,ep,ev,re,r,rp,chk) - return ep~=tp and r==REASON_BATTLE and eg:GetFirst()==e:GetHandler():GetEquipTarget() -end -function c84428023.drtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(1) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c84428023.drop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end diff --git a/script/c84430950.lua b/script/c84430950.lua deleted file mode 100644 index 94645fcff0..0000000000 --- a/script/c84430950.lua +++ /dev/null @@ -1,14 +0,0 @@ ---重装武者-ベン・ケイ -function c84430950.initial_effect(c) - --multi attack - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_EXTRA_ATTACK) - e1:SetValue(c84430950.val) - c:RegisterEffect(e1) -end -function c84430950.val(e,c) - return c:GetEquipCount() -end diff --git a/script/c84451804.lua b/script/c84451804.lua deleted file mode 100644 index 3b418220e9..0000000000 --- a/script/c84451804.lua +++ /dev/null @@ -1,34 +0,0 @@ ---デスガエル -function c84451804.initial_effect(c) - --Special Summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(84451804,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetCondition(c84451804.condition) - e1:SetTarget(c84451804.target) - e1:SetOperation(c84451804.operation) - c:RegisterEffect(e1) -end -function c84451804.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_ADVANCE -end -function c84451804.filter(c,e,tp) - return c:IsCode(84451804) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c84451804.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_GRAVE,0,1,nil,10456559) - and Duel.IsExistingMatchingCard(c84451804.filter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_HAND) -end -function c84451804.operation(e,tp,eg,ep,ev,re,r,rp) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - local ct=Duel.GetMatchingGroupCount(Card.IsCode,tp,LOCATION_GRAVE,0,nil,10456559) - if ft0 and g2:GetCount()>0 then - op=Duel.SelectOption(tp,aux.Stringid(84488827,1),aux.Stringid(84488827,2))+1 - elseif g1:GetCount()>0 then - op=Duel.SelectOption(tp,aux.Stringid(84488827,1))+1 - elseif g2:GetCount()>0 then - op=Duel.SelectOption(tp,aux.Stringid(84488827,2))+2 - end - if op==1 then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g1,g1:GetCount(),0,0) - elseif op==2 then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g2,g2:GetCount(),0,0) - end - e:SetLabel(op) -end -function c84488827.operation(e,tp,eg,ep,ev,re,r,rp) - if e:GetLabel()==1 then - local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,LOCATION_MZONE,LOCATION_MZONE,e:GetHandler()) - Duel.Destroy(g,REASON_EFFECT) - elseif e:GetLabel()==2 then - local g=Duel.GetMatchingGroup(c84488827.sfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) - Duel.Destroy(g,REASON_EFFECT) - end -end diff --git a/script/c84491298.lua b/script/c84491298.lua deleted file mode 100644 index 4ed669cd4f..0000000000 --- a/script/c84491298.lua +++ /dev/null @@ -1,30 +0,0 @@ ---細胞爆破ウイルス -function c84491298.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetCondition(c84491298.condition) - e1:SetTarget(c84491298.target) - e1:SetOperation(c84491298.activate) - c:RegisterEffect(e1) -end -function c84491298.condition(e,tp,eg,ep,ev,re,r,rp) - local a=Duel.GetAttacker() - return a:IsControler(1-tp) and a:GetCounter(0xe)>0 -end -function c84491298.filter(c) - return c:IsAttackPos() and c:IsDestructable() -end -function c84491298.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c84491298.filter,tp,0,LOCATION_MZONE,1,nil) end - local g=Duel.GetMatchingGroup(c84491298.filter,tp,0,LOCATION_MZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c84491298.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c84491298.filter,tp,0,LOCATION_MZONE,nil) - if g:GetCount()>0 then - Duel.Destroy(g,REASON_EFFECT) - end -end diff --git a/script/c84530620.lua b/script/c84530620.lua deleted file mode 100644 index 1fcfebec2b..0000000000 --- a/script/c84530620.lua +++ /dev/null @@ -1,30 +0,0 @@ ---OToサンダー -function c84530620.initial_effect(c) - --summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(84530620,0)) - e1:SetCategory(CATEGORY_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetTarget(c84530620.target) - e1:SetOperation(c84530620.operation) - c:RegisterEffect(e1) -end -function c84530620.filter(c) - return c:IsRace(RACE_THUNDER) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:GetLevel()==4 - and c:GetCode()~=84530620 and c:IsSummonable(true,nil) -end -function c84530620.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c84530620.filter,tp,LOCATION_HAND,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,0,0) -end -function c84530620.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON) - local g=Duel.SelectMatchingCard(tp,c84530620.filter,tp,LOCATION_HAND,0,1,1,nil) - local tc=g:GetFirst() - if tc then - Duel.Summon(tp,tc,true,nil) - end -end diff --git a/script/c84536654.lua b/script/c84536654.lua deleted file mode 100644 index 425fb13412..0000000000 --- a/script/c84536654.lua +++ /dev/null @@ -1,43 +0,0 @@ ---フォーム・チェンジ -function c84536654.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c84536654.target) - e1:SetOperation(c84536654.activate) - c:RegisterEffect(e1) -end -function c84536654.spfilter(c,code,lv,e,tp) - return c:GetLevel()==lv and c:IsSetCard(0xa008) and not c:IsCode(code) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) -end -function c84536654.filter(c,e,tp) - return c:IsFaceup() and c:IsSetCard(0x8) and c:IsType(TYPE_FUSION) and c:IsAbleToExtra() - and Duel.IsExistingMatchingCard(c84536654.spfilter,tp,LOCATION_EXTRA,0,1,nil,c:GetCode(),c:GetOriginalLevel(),e,tp) -end -function c84536654.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c84536654.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsExistingTarget(c84536654.filter,tp,LOCATION_MZONE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectTarget(tp,c84536654.filter,tp,LOCATION_MZONE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function c84536654.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<0 then return end - local tc=Duel.GetFirstTarget() - if not tc:IsRelateToEffect(e) then return end - local code=tc:GetCode() - local lv=tc:GetOriginalLevel() - if Duel.SendtoDeck(tc,nil,0,REASON_EFFECT)==0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c84536654.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,code,lv,e,tp) - if g:GetCount()>0 then - Duel.BreakEffect() - Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP) - g:GetFirst():CompleteProcedure() - end -end diff --git a/script/c84550200.lua b/script/c84550200.lua deleted file mode 100644 index 731f46c5cd..0000000000 --- a/script/c84550200.lua +++ /dev/null @@ -1,22 +0,0 @@ ---ソニックジャマー -function c84550200.initial_effect(c) - --flip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(84550200,0)) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP) - e1:SetOperation(c84550200.operation) - c:RegisterEffect(e1) -end -function c84550200.operation(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EFFECT_CANNOT_ACTIVATE) - e1:SetTargetRange(0,1) - e1:SetValue(c84550200.aclimit) - e1:SetReset(RESET_PHASE+PHASE_END,2) - Duel.RegisterEffect(e1,tp) -end -function c84550200.aclimit(e,re,tp) - return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL) -end diff --git a/script/c84565800.lua b/script/c84565800.lua deleted file mode 100644 index 813160e6ec..0000000000 --- a/script/c84565800.lua +++ /dev/null @@ -1,69 +0,0 @@ ---伝説の騎士 ヘルモス -function c84565800.initial_effect(c) - c:EnableReviveLimit() - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - c:RegisterEffect(e1) - --remove - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(84565800,0)) - e2:SetCategory(CATEGORY_REMOVE) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e2:SetTarget(c84565800.rmtg) - e2:SetOperation(c84565800.rmop) - c:RegisterEffect(e2) - --copy - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(84565800,1)) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_BE_BATTLE_TARGET) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetCountLimit(1) - e3:SetTarget(c84565800.cptg) - e3:SetOperation(c84565800.cpop) - c:RegisterEffect(e3) -end -function c84565800.rmfilter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToRemove() and c:IsFaceup() -end -function c84565800.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and c84565800.rmfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c84565800.rmfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,c84565800.rmfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) -end -function c84565800.rmop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsType(TYPE_SPELL+TYPE_TRAP) then - Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) - end -end -function c84565800.cpfilter(c) - return c:IsType(TYPE_EFFECT) -end -function c84565800.cptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c84565800.cpfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c84565800.cpfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - Duel.SelectTarget(tp,c84565800.cpfilter,tp,LOCATION_GRAVE,0,1,1,nil) -end -function c84565800.cpop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and c:IsFaceup() and c:IsRelateToEffect(e) then - local code=tc:GetCode() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CHANGE_CODE) - e1:SetValue(code) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END+RESET_SELF_TURN) - c:RegisterEffect(e1) - c:CopyEffect(code,RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END+RESET_SELF_TURN) - end -end diff --git a/script/c84569017.lua b/script/c84569017.lua deleted file mode 100644 index af816df3c3..0000000000 --- a/script/c84569017.lua +++ /dev/null @@ -1,17 +0,0 @@ ---スピアフィッシュソルジャー -function c84569017.initial_effect(c) - --atkup - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(c84569017.atkup) - c:RegisterEffect(e1) -end -function c84569017.atkfilter(c) - return c:IsFaceup() and c:IsRace(RACE_FISH+RACE_AQUA+RACE_SEASERPENT) -end -function c84569017.atkup(e,c) - return Duel.GetMatchingGroupCount(c84569017.atkfilter,c:GetControler(),LOCATION_REMOVED,0,nil)*100 -end diff --git a/script/c84592800.lua b/script/c84592800.lua deleted file mode 100644 index 15aad5b2a0..0000000000 --- a/script/c84592800.lua +++ /dev/null @@ -1,26 +0,0 @@ ---D・ビデオン -function c84592800.initial_effect(c) - --atk - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetCondition(c84592800.cona) - e1:SetValue(c84592800.val) - c:RegisterEffect(e1) - --def - local e2=e1:Clone() - e2:SetCode(EFFECT_UPDATE_DEFENCE) - e2:SetCondition(c84592800.cond) - c:RegisterEffect(e2) -end -function c84592800.cona(e) - return e:GetHandler():IsAttackPos() -end -function c84592800.cond(e) - return e:GetHandler():IsDefencePos() -end -function c84592800.val(e,c) - return c:GetEquipCount()*800 -end diff --git a/script/c84613836.lua b/script/c84613836.lua deleted file mode 100644 index 5376f8928a..0000000000 --- a/script/c84613836.lua +++ /dev/null @@ -1,51 +0,0 @@ ---神速の具足 -function c84613836.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_END_PHASE) - c:RegisterEffect(e1) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(84613836,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetRange(LOCATION_SZONE) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_DRAW) - e1:SetCondition(c84613836.spcon) - e1:SetTarget(c84613836.sptg) - e1:SetOperation(c84613836.spop) - c:RegisterEffect(e1) -end -function c84613836.spcon(e,tp,eg,ep,ev,re,r,rp) - return ep==tp and Duel.GetCurrentPhase()==PHASE_DRAW -end -function c84613836.filter(c,e,tp) - return c:IsSetCard(0x3d) and c:IsType(TYPE_MONSTER) and not c:IsPublic() and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c84613836.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and eg:IsExists(c84613836.filter,1,nil,e,tp) end - local g=eg:Filter(c84613836.filter,nil,e,tp) - if g:GetCount()==1 then - Duel.ConfirmCards(1-tp,g) - Duel.ShuffleHand(tp) - Duel.SetTargetCard(g) - else - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) - local sg=g:Select(tp,1,1,nil) - Duel.ConfirmCards(1-tp,sg) - Duel.ShuffleHand(tp) - Duel.SetTargetCard(sg) - end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c84613836.spop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c84636823.lua b/script/c84636823.lua deleted file mode 100644 index 51eec0a1db..0000000000 --- a/script/c84636823.lua +++ /dev/null @@ -1,39 +0,0 @@ ---マジック・キャンセラー -function c84636823.initial_effect(c) - --cannot trigger - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(1,1) - e1:SetValue(c84636823.aclimit) - c:RegisterEffect(e1) - --disable - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_DISABLE) - e2:SetRange(LOCATION_MZONE) - e2:SetTargetRange(LOCATION_SZONE,LOCATION_SZONE) - e2:SetTarget(c84636823.distg) - c:RegisterEffect(e2) - --disable effect - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e3:SetCode(EVENT_CHAIN_SOLVING) - e3:SetRange(LOCATION_MZONE) - e3:SetOperation(c84636823.disop) - c:RegisterEffect(e3) -end -function c84636823.aclimit(e,re,tp) - return re:IsActiveType(TYPE_SPELL) -end -function c84636823.distg(e,c) - return c:IsType(TYPE_SPELL) -end -function c84636823.disop(e,tp,eg,ep,ev,re,r,rp) - local tl=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION) - if tl==LOCATION_SZONE and re:IsActiveType(TYPE_SPELL) then - Duel.NegateEffect(ev) - end -end diff --git a/script/c84650463.lua b/script/c84650463.lua deleted file mode 100644 index 932a34f3b7..0000000000 --- a/script/c84650463.lua +++ /dev/null @@ -1,66 +0,0 @@ ---フラッピィ -function c84650463.initial_effect(c) - --send to grave - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(84650463,0)) - e1:SetCategory(CATEGORY_TOGRAVE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c84650463.target) - e1:SetOperation(c84650463.operation) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(84650463,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_GRAVE) - e2:SetCountLimit(1,84650463) - e2:SetCondition(c84650463.spcon) - e2:SetCost(c84650463.spcost) - e2:SetTarget(c84650463.sptg) - e2:SetOperation(c84650463.spop) - c:RegisterEffect(e2) -end -function c84650463.tgfilter(c) - return c:IsCode(84650463) and c:IsAbleToGrave() -end -function c84650463.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c84650463.tgfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) -end -function c84650463.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c84650463.tgfilter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoGrave(g,REASON_EFFECT) - end -end -function c84650463.cfilter(c) - return c:IsCode(84650463) and c:IsFaceup() -end -function c84650463.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetMatchingGroupCount(c84650463.cfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,nil)==3 -end -function c84650463.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) -end -function c84650463.filter(c,e,tp) - return c:IsLevelAbove(5) and c:IsRace(RACE_SEASERPENT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c84650463.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c84650463.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c84650463.filter,tp,LOCATION_GRAVE,0,1,e:GetHandler(),e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c84650463.filter,tp,LOCATION_GRAVE,0,1,1,e:GetHandler(),e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c84650463.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c84653834.lua b/script/c84653834.lua deleted file mode 100644 index 575fc72c82..0000000000 --- a/script/c84653834.lua +++ /dev/null @@ -1,51 +0,0 @@ ---超能力増幅器 -function c84653834.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetCondition(c84653834.condition) - e1:SetTarget(c84653834.target) - e1:SetOperation(c84653834.activate) - c:RegisterEffect(e1) -end -function c84653834.condition(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetCurrentPhase()==PHASE_DAMAGE and Duel.IsDamageCalculated() then return false end - return true -end -function c84653834.filter(c) - return c:IsFaceup() and c:IsRace(RACE_PSYCHO) -end -function c84653834.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c84653834.filter,tp,LOCATION_MZONE,0,1,nil) end -end -function c84653834.activate(e,tp,eg,ep,ev,re,r,rp) - local sg=Duel.GetMatchingGroup(c84653834.filter,tp,LOCATION_MZONE,0,nil) - local c=e:GetHandler() - local tc=sg:GetFirst() - local atk=Duel.GetMatchingGroupCount(c84653834.filter,tp,LOCATION_REMOVED,0,nil)*300 - while tc do - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - e1:SetValue(atk) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e2:SetCode(EVENT_PHASE+PHASE_END) - e2:SetRange(LOCATION_MZONE) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - e2:SetCountLimit(1) - e2:SetOperation(c84653834.rmop) - tc:RegisterEffect(e2) - tc=sg:GetNext() - end -end -function c84653834.rmop(e,tp,eg,ep,ev,re,r,rp) - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT) -end diff --git a/script/c84677654.lua b/script/c84677654.lua deleted file mode 100644 index c1ae0a3545..0000000000 --- a/script/c84677654.lua +++ /dev/null @@ -1,40 +0,0 @@ ---大金星!? -function c84677654.initial_effect(c) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c84677654.target) - e1:SetOperation(c84677654.operation) - c:RegisterEffect(e1) -end -function c84677654.cfilter(c) - return c:IsFaceup() and not c:IsType(TYPE_XYZ) -end -function c84677654.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c84677654.cfilter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,567) - local lv=Duel.AnnounceNumber(tp,1,2,3,4,5,6,7,8,9,10,11,12) - Duel.SetTargetParam(lv) - Duel.SetOperationInfo(0,CATEGORY_COIN,nil,0,PLAYER_ALL,2) -end -function c84677654.operation(e,tp,eg,ep,ev,re,r,rp) - local lv=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM) - local coin1=Duel.TossCoin(tp,1) - local coin2=Duel.TossCoin(1-tp,1) - if coin1==1 and coin2==1 then - local g=Duel.GetMatchingGroup(c84677654.cfilter,tp,LOCATION_MZONE,0,nil) - local tc=g:GetFirst() - while tc do - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CHANGE_LEVEL) - e1:SetValue(lv) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - tc=g:GetNext() - end - elseif coin1==0 and coin2==0 then - local lp=Duel.GetLP(tp)-lv*500 - Duel.SetLP(tp,lp>0 and lp or 0) - end -end diff --git a/script/c84687358.lua b/script/c84687358.lua deleted file mode 100644 index 5d47d7de88..0000000000 --- a/script/c84687358.lua +++ /dev/null @@ -1,48 +0,0 @@ ---ミラーフォース・ドラゴン -function c84687358.initial_effect(c) - c:EnableReviveLimit() - --spsummon condition - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_BE_BATTLE_TARGET) - e2:SetRange(LOCATION_MZONE) - e2:SetCondition(c84687358.descon1) - e2:SetTarget(c84687358.destg) - e2:SetOperation(c84687358.desop) - c:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetCategory(CATEGORY_DESTROY) - e3:SetType(EFFECT_TYPE_QUICK_O) - e3:SetCode(EVENT_BECOME_TARGET) - e3:SetRange(LOCATION_MZONE) - e3:SetCondition(c84687358.descon2) - e3:SetTarget(c84687358.destg) - e3:SetOperation(c84687358.desop) - c:RegisterEffect(e3) -end -c84687358.material_trap=44095762 -function c84687358.tgfilter(c,tp) - return c:IsLocation(LOCATION_MZONE) and c:IsControler(tp) -end -function c84687358.descon1(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c84687358.tgfilter,1,nil,tp) -end -function c84687358.descon2(e,tp,eg,ep,ev,re,r,rp) - return rp~=tp and eg:IsExists(c84687358.tgfilter,1,nil,tp) -end -function c84687358.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDestructable,tp,0,LOCATION_ONFIELD,1,nil) end - local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,0,LOCATION_ONFIELD,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c84687358.desop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,0,LOCATION_ONFIELD,nil) - Duel.Destroy(g,REASON_EFFECT) -end diff --git a/script/c84740193.lua b/script/c84740193.lua deleted file mode 100644 index 6ca7df21a3..0000000000 --- a/script/c84740193.lua +++ /dev/null @@ -1,52 +0,0 @@ ---バスターランチャー -function c84740193.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c84740193.target) - e1:SetOperation(c84740193.operation) - c:RegisterEffect(e1) - --Atk,def - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetCondition(c84740193.atkcon) - e2:SetValue(2500) - c:RegisterEffect(e2) - --Equip limit - local e3=Effect.CreateEffect(c) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_EQUIP_LIMIT) - e3:SetValue(c84740193.eqlimit) - c:RegisterEffect(e3) -end -function c84740193.eqlimit(e,c) - return Duel.GetCurrentPhase()==PHASE_DAMAGE_CAL or c:IsAttackBelow(1000) -end -function c84740193.filter(c) - return c:IsFaceup() and c:IsAttackBelow(1000) -end -function c84740193.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c84740193.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c84740193.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c84740193.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c84740193.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,e:GetHandler(),tc) - end -end -function c84740193.atkcon(e) - local ec=e:GetHandler():GetEquipTarget() - if not ec:IsRelateToBattle() then return end - local bc=ec:GetBattleTarget() - return Duel.GetCurrentPhase()==PHASE_DAMAGE_CAL and bc - and ((bc:IsAttackPos() and bc:IsAttackAbove(2500)) or (bc:IsDefencePos() and bc:IsDefenceAbove(2500))) -end diff --git a/script/c84747429.lua b/script/c84747429.lua deleted file mode 100644 index 732fe0339c..0000000000 --- a/script/c84747429.lua +++ /dev/null @@ -1,57 +0,0 @@ ---エアジャチ -function c84747429.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(84747429,0)) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_REMOVE) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCost(c84747429.descost) - e1:SetTarget(c84747429.destg) - e1:SetOperation(c84747429.desop) - c:RegisterEffect(e1) -end -function c84747429.cfilter(c) - return c:IsRace(RACE_FISH+RACE_SEASERPENT+RACE_AQUA) and c:IsAbleToRemoveAsCost() -end -function c84747429.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c84747429.cfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c84747429.cfilter,tp,LOCATION_HAND,0,1,1,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c84747429.filter(c) - return c:IsFaceup() and c:IsDestructable() -end -function c84747429.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and c84747429.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c84747429.filter,tp,0,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c84747429.filter,tp,0,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c84747429.desop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)~=0 and c:IsRelateToEffect(e) then - Duel.BreakEffect() - if Duel.Remove(c,0,REASON_EFFECT+REASON_TEMPORARY)==0 then return end - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) - e1:SetCountLimit(1) - e1:SetLabelObject(c) - e1:SetCondition(c84747429.retcon) - e1:SetOperation(c84747429.retop) - e1:SetReset(RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN) - Duel.RegisterEffect(e1,tp) - end -end -function c84747429.retcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c84747429.retop(e,tp,eg,ep,ev,re,r,rp) - Duel.ReturnToField(e:GetLabelObject()) -end diff --git a/script/c84749824.lua b/script/c84749824.lua deleted file mode 100644 index ff4106dd3a..0000000000 --- a/script/c84749824.lua +++ /dev/null @@ -1,68 +0,0 @@ ---神の警告 -function c84749824.initial_effect(c) - --Activate(summon) - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DISABLE_SUMMON+CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_SUMMON) - e1:SetCondition(c84749824.condition1) - e1:SetCost(c84749824.cost1) - e1:SetTarget(c84749824.target1) - e1:SetOperation(c84749824.activate1) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_FLIP_SUMMON) - c:RegisterEffect(e2) - local e3=e1:Clone() - e3:SetCode(EVENT_SPSUMMON) - c:RegisterEffect(e3) - --Activate(effect) - local e4=Effect.CreateEffect(c) - e4:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) - e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) - e4:SetType(EFFECT_TYPE_ACTIVATE) - e4:SetCode(EVENT_CHAINING) - e4:SetCondition(c84749824.condition2) - e4:SetCost(c84749824.cost2) - e4:SetTarget(c84749824.target2) - e4:SetOperation(c84749824.activate2) - c:RegisterEffect(e4) -end -function c84749824.condition1(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentChain()==0 -end -function c84749824.cost1(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,2000) - else Duel.PayLPCost(tp,2000) end -end -function c84749824.target1(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DISABLE_SUMMON,eg,eg:GetCount(),0,0) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,eg:GetCount(),0,0) -end -function c84749824.activate1(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateSummon(eg) - Duel.Destroy(eg,REASON_EFFECT) -end -function c84749824.condition2(e,tp,eg,ep,ev,re,r,rp) - if not Duel.IsChainNegatable(ev) then return false end - if not re:IsActiveType(TYPE_MONSTER) and not re:IsHasType(EFFECT_TYPE_ACTIVATE) then return false end - return re:IsHasCategory(CATEGORY_SPECIAL_SUMMON) -end -function c84749824.cost2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,2000) - else Duel.PayLPCost(tp,2000) end -end -function c84749824.target2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) - end -end -function c84749824.activate2(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateActivation(ev) - if re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(eg,REASON_EFFECT) - end -end diff --git a/script/c84764038.lua b/script/c84764038.lua deleted file mode 100644 index debf5d7ae5..0000000000 --- a/script/c84764038.lua +++ /dev/null @@ -1,80 +0,0 @@ ---彼岸の悪鬼 スカラマリオン -function c84764038.initial_effect(c) - --self destroy - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_SELF_DESTROY) - e1:SetCondition(c84764038.sdcon) - c:RegisterEffect(e1) - --Special Summon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(84764038,0)) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetRange(LOCATION_HAND) - e2:SetCountLimit(1,84764038) - e2:SetCondition(c84764038.sscon) - e2:SetTarget(c84764038.sstg) - e2:SetOperation(c84764038.ssop) - c:RegisterEffect(e2) - --to grave - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e3:SetCode(EVENT_TO_GRAVE) - e3:SetOperation(c84764038.regop) - c:RegisterEffect(e3) -end -function c84764038.sdfilter(c) - return not c:IsFaceup() or not c:IsSetCard(0xb1) -end -function c84764038.sdcon(e) - return Duel.IsExistingMatchingCard(c84764038.sdfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) -end -function c84764038.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) -end -function c84764038.sscon(e,tp,eg,ep,ev,re,r,rp) - return not Duel.IsExistingMatchingCard(c84764038.filter,tp,LOCATION_ONFIELD,0,1,nil) -end -function c84764038.sstg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c84764038.ssop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP) - end -end -function c84764038.regop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(84764038,1)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetCountLimit(1,84764038) - e1:SetRange(LOCATION_GRAVE) - e1:SetTarget(c84764038.thtg) - e1:SetOperation(c84764038.thop) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - c:RegisterEffect(e1) -end -function c84764038.thfilter(c) - return c:GetLevel()==3 and c:IsAttribute(ATTRIBUTE_DARK) and c:IsRace(RACE_FIEND) - and not c:IsCode(84764038) and c:IsAbleToHand() -end -function c84764038.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c84764038.thfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c84764038.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c84764038.thfilter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c84766279.lua b/script/c84766279.lua deleted file mode 100644 index f3d39116af..0000000000 --- a/script/c84766279.lua +++ /dev/null @@ -1,43 +0,0 @@ ---ダイガスタ・ガルドス -function c84766279.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,nil,aux.NonTuner(Card.IsSetCard,0x10),1) - c:EnableReviveLimit() - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(84766279,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCost(c84766279.cost) - e1:SetTarget(c84766279.target) - e1:SetOperation(c84766279.operation) - c:RegisterEffect(e1) -end -function c84766279.costfilter(c) - return c:IsSetCard(0x10) and c:IsType(TYPE_MONSTER) and c:IsAbleToDeckAsCost() -end -function c84766279.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c84766279.costfilter,tp,LOCATION_GRAVE,0,2,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectMatchingCard(tp,c84766279.costfilter,tp,LOCATION_GRAVE,0,2,2,nil) - Duel.SendtoDeck(g,nil,2,REASON_COST) -end -function c84766279.filter(c) - return c:IsFaceup() and c:IsDestructable() -end -function c84766279.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c84766279.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c84766279.filter,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c84766279.filter,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c84766279.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c847915.lua b/script/c847915.lua deleted file mode 100644 index 0f4bfec295..0000000000 --- a/script/c847915.lua +++ /dev/null @@ -1,52 +0,0 @@ ---ナンバーズ・ウォール -function c847915.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c847915.actcon) - c:RegisterEffect(e1) - --indes - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x48)) - e2:SetValue(c847915.indval) - c:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - e3:SetRange(LOCATION_SZONE) - e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e3:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x48)) - e3:SetValue(1) - c:RegisterEffect(e3) - --destroy - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e4:SetRange(LOCATION_SZONE) - e4:SetCode(EVENT_DESTROYED) - e4:SetCondition(c847915.descon) - e4:SetOperation(c847915.desop) - c:RegisterEffect(e4) -end -function c847915.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x48) -end -function c847915.indval(e,c) - return not c:IsSetCard(0x48) -end -function c847915.actcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c847915.cfilter,tp,LOCATION_MZONE,0,1,nil) -end -function c847915.dfilter(c,tp) - return c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousSetCard(0x48) -end -function c847915.descon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c847915.dfilter,1,nil,tp) -end -function c847915.desop(e,tp,eg,ep,ev,re,r,rp) - Duel.Destroy(e:GetHandler(),REASON_EFFECT) -end diff --git a/script/c84808313.lua b/script/c84808313.lua deleted file mode 100644 index a9966e5380..0000000000 --- a/script/c84808313.lua +++ /dev/null @@ -1,56 +0,0 @@ ---大進化薬 -function c84808313.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c84808313.cost) - e1:SetTarget(c84808313.target) - c:RegisterEffect(e1) - --reduce tribute - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_DECREASE_TRIBUTE) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(LOCATION_HAND,0) - e2:SetTarget(aux.TargetBoolFunction(Card.IsRace,RACE_DINOSAUR)) - e2:SetValue(0x20002) - c:RegisterEffect(e2) - --remain field - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_REMAIN_FIELD) - c:RegisterEffect(e3) -end -function c84808313.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsRace,1,nil,RACE_DINOSAUR) end - local g=Duel.SelectReleaseGroup(tp,Card.IsRace,1,1,nil,RACE_DINOSAUR) - Duel.Release(g,REASON_COST) -end -function c84808313.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local c=e:GetHandler() - c:SetTurnCounter(0) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_SZONE) - e1:SetCondition(c84808313.descon) - e1:SetOperation(c84808313.desop) - e1:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e1) -end -function c84808313.descon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp -end -function c84808313.desop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local ct=c:GetTurnCounter() - ct=ct+1 - c:SetTurnCounter(ct) - if ct==3 then - Duel.Destroy(c,REASON_RULE) - end -end diff --git a/script/c84814897.lua b/script/c84814897.lua deleted file mode 100644 index 4d9cb12962..0000000000 --- a/script/c84814897.lua +++ /dev/null @@ -1,122 +0,0 @@ ---騎竜 -function c84814897.initial_effect(c) - --equip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(84814897,0)) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetTarget(c84814897.eqtg) - e1:SetOperation(c84814897.eqop) - c:RegisterEffect(e1) - --unequip - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(84814897,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_SZONE) - e2:SetCondition(c84814897.uncon) - e2:SetTarget(c84814897.sptg) - e2:SetOperation(c84814897.spop) - c:RegisterEffect(e2) - --Atk up - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_EQUIP) - e3:SetCode(EFFECT_UPDATE_ATTACK) - e3:SetValue(900) - e3:SetCondition(c84814897.uncon) - c:RegisterEffect(e3) - --Def up - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_EQUIP) - e4:SetCode(EFFECT_UPDATE_DEFENCE) - e4:SetValue(900) - e4:SetCondition(c84814897.uncon) - c:RegisterEffect(e4) - --direct_attack - local e5=Effect.CreateEffect(c) - e5:SetDescription(aux.Stringid(84814897,2)) - e5:SetType(EFFECT_TYPE_IGNITION) - e5:SetRange(LOCATION_SZONE) - e5:SetCondition(c84814897.uncon) - e5:SetCost(c84814897.atkcost) - e5:SetOperation(c84814897.atkop) - c:RegisterEffect(e5) - --destroy sub - local e6=Effect.CreateEffect(c) - e6:SetType(EFFECT_TYPE_EQUIP) - e6:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e6:SetCode(EFFECT_DESTROY_SUBSTITUTE) - e6:SetCondition(c84814897.uncon) - e6:SetValue(c84814897.repval) - c:RegisterEffect(e6) - --eqlimit - local e7=Effect.CreateEffect(c) - e7:SetType(EFFECT_TYPE_SINGLE) - e7:SetCode(EFFECT_EQUIP_LIMIT) - e7:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e7:SetValue(c84814897.eqlimit) - c:RegisterEffect(e7) -end -function c84814897.uncon(e) - return e:GetHandler():IsStatus(STATUS_UNION) -end -function c84814897.repval(e,re,r,rp) - return bit.band(r,REASON_BATTLE)~=0 -end -function c84814897.eqlimit(e,c) - return c:IsCode(11321183) -end -function c84814897.filter(c) - return c:IsFaceup() and c:IsCode(11321183) and c:GetUnionCount()==0 -end -function c84814897.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c84814897.filter(chkc) end - if chk==0 then return e:GetHandler():GetFlagEffect(84814897)==0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingTarget(c84814897.filter,tp,LOCATION_MZONE,0,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local g=Duel.SelectTarget(tp,c84814897.filter,tp,LOCATION_MZONE,0,1,1,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0) - e:GetHandler():RegisterFlagEffect(84814897,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1) -end -function c84814897.eqop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if not c:IsRelateToEffect(e) or c:IsFacedown() then return end - if not tc:IsRelateToEffect(e) or not c84814897.filter(tc) then - Duel.SendtoGrave(c,REASON_EFFECT) - return - end - if not Duel.Equip(tp,c,tc,false) then return end - c:SetStatus(STATUS_UNION,true) -end -function c84814897.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():GetFlagEffect(84814897)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,false) end - Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) - e:GetHandler():RegisterFlagEffect(84814897,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1) -end -function c84814897.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP_ATTACK) - end -end -function c84814897.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) - Duel.SetTargetCard(e:GetHandler():GetEquipTarget()) - Duel.Release(e:GetHandler(),REASON_COST) -end -function c84814897.atkop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DIRECT_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - end -end diff --git a/script/c84824601.lua b/script/c84824601.lua deleted file mode 100644 index 46524c6549..0000000000 --- a/script/c84824601.lua +++ /dev/null @@ -1,32 +0,0 @@ ---ボタニティ・ガール -function c84824601.initial_effect(c) - --search - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(84824601,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCondition(c84824601.condition) - e1:SetTarget(c84824601.target) - e1:SetOperation(c84824601.operation) - c:RegisterEffect(e1) -end -function c84824601.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) -end -function c84824601.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c84824601.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c84824601.filter(c) - return c:IsDefenceBelow(1000) and c:IsRace(RACE_PLANT) and c:IsAbleToHand() -end -function c84824601.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c84824601.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c8483333.lua b/script/c8483333.lua deleted file mode 100644 index 0bf34cd9fe..0000000000 --- a/script/c8483333.lua +++ /dev/null @@ -1,72 +0,0 @@ ---モザイク・マンティコア -function c8483333.initial_effect(c) - --remove - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetCondition(c8483333.regcon) - e1:SetOperation(c8483333.regop) - c:RegisterEffect(e1) -end -function c8483333.regcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_ADVANCE -end -function c8483333.regop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(8483333,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) - e1:SetCondition(c8483333.spcon) - e1:SetTarget(c8483333.sptg) - e1:SetOperation(c8483333.spop) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN) - c:RegisterEffect(e1) -end -function c8483333.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c8483333.spfilter(c,e,tp,rc) - return c:IsLocation(LOCATION_GRAVE) and c:IsReason(REASON_SUMMON) and c:GetReasonCard()==rc and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c8483333.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local g=e:GetHandler():GetMaterial():Filter(c8483333.spfilter,nil,e,tp,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,g:GetCount(),0,0) -end -function c8483333.spop(e,tp,eg,ep,ev,re,r,rp) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ft<=0 then return end - local c=e:GetHandler() - local g=c:GetMaterial():Filter(c8483333.spfilter,nil,e,tp,c) - if g:GetCount()>0 then - if g:GetCount()>ft then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - g=g:Select(tp,ft,ft,nil) - end - local tc=g:GetFirst() - while tc do - Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE) - e2:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_DISABLE_EFFECT) - e3:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e3) - tc=g:GetNext() - end - Duel.SpecialSummonComplete() - end -end diff --git a/script/c84834865.lua b/script/c84834865.lua deleted file mode 100644 index c05a302fb6..0000000000 --- a/script/c84834865.lua +++ /dev/null @@ -1,32 +0,0 @@ ---ドラゴンフライ -function c84834865.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(84834865,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetCondition(c84834865.condition) - e1:SetTarget(c84834865.target) - e1:SetOperation(c84834865.operation) - c:RegisterEffect(e1) -end -function c84834865.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsLocation(LOCATION_GRAVE) -end -function c84834865.filter(c,e,tp) - return c:IsAttackBelow(1500) and c:IsAttribute(ATTRIBUTE_WIND) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c84834865.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c84834865.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c84834865.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c84834865.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_ATTACK) - end -end diff --git a/script/c84845628.lua b/script/c84845628.lua deleted file mode 100644 index 00d672d107..0000000000 --- a/script/c84845628.lua +++ /dev/null @@ -1,51 +0,0 @@ ---獄落鳥 -function c84845628.initial_effect(c) - --atk & def - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetValue(c84845628.adval) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_UPDATE_DEFENCE) - c:RegisterEffect(e2) - --control - local e3=Effect.CreateEffect(c) - e3:SetCategory(CATEGORY_CONTROL) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_MZONE) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetCountLimit(1) - e3:SetCost(c84845628.cost) - e3:SetTarget(c84845628.target) - e3:SetOperation(c84845628.operation) - c:RegisterEffect(e3) -end -function c84845628.adval(e,c) - local tp=c:GetControler() - return Duel.GetMatchingGroupCount(Card.IsType,tp,LOCATION_GRAVE,0,nil,TYPE_TUNER)*100 -end -function c84845628.cfilter(c) - return c:IsType(TYPE_TUNER) and c:IsAbleToGraveAsCost() -end -function c84845628.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c84845628.cfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,c84845628.cfilter,1,1,REASON_COST,nil) -end -function c84845628.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsControlerCanBeChanged() end - if chk==0 then return Duel.IsExistingTarget(Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) - local g=Duel.SelectTarget(tp,Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0) -end -function c84845628.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and not Duel.GetControl(tc,tp,RESET_END,1) then - if not tc:IsImmuneToEffect(e) and tc:IsAbleToChangeControler() then - Duel.Destroy(tc,REASON_EFFECT) - end - end -end diff --git a/script/c84847656.lua b/script/c84847656.lua deleted file mode 100644 index 57b50b142a..0000000000 --- a/script/c84847656.lua +++ /dev/null @@ -1,29 +0,0 @@ ---テレキアタッカー -function c84847656.initial_effect(c) - --destroy replace - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_DESTROY_REPLACE) - e1:SetRange(LOCATION_MZONE) - e1:SetTarget(c84847656.destg) - e1:SetValue(c84847656.value) - e1:SetOperation(c84847656.desop) - c:RegisterEffect(e1) -end -function c84847656.dfilter(c) - return c:IsLocation(LOCATION_MZONE) and c:IsFaceup() and c:IsRace(RACE_PSYCHO) and not c:IsReason(REASON_REPLACE) -end -function c84847656.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return not eg:IsContains(e:GetHandler()) - and Duel.CheckLPCost(tp,500) and eg:IsExists(c84847656.dfilter,1,nil) end - if Duel.SelectYesNo(tp,aux.Stringid(84847656,0)) then - Duel.PayLPCost(tp,500) - return true - else return false end -end -function c84847656.value(e,c) - return c:IsLocation(LOCATION_MZONE) and c:IsFaceup() and c:IsRace(RACE_PSYCHO) and not c:IsReason(REASON_REPLACE) -end -function c84847656.desop(e,tp,eg,ep,ev,re,r,rp) - Duel.Destroy(e:GetHandler(),REASON_EFFECT+REASON_REPLACE) -end diff --git a/script/c8487449.lua b/script/c8487449.lua deleted file mode 100644 index 5ebcd81804..0000000000 --- a/script/c8487449.lua +++ /dev/null @@ -1,70 +0,0 @@ ---ジェスター・コンフィ -function c8487449.initial_effect(c) - c:SetUniqueOnField(1,0,8487449) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_SPSUM_PARAM+EFFECT_FLAG_UNCOPYABLE) - e1:SetTargetRange(POS_FACEUP_ATTACK,0) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c8487449.spcon) - e1:SetValue(1) - c:RegisterEffect(e1) - --spsummon success - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetCondition(c8487449.regcon) - e2:SetOperation(c8487449.regop) - c:RegisterEffect(e2) -end -function c8487449.spcon(e,c) - if c==nil then return true end - return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 -end -function c8487449.regcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+1 -end -function c8487449.regop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(8487449,0)) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c8487449.thcon) - e1:SetTarget(c8487449.thtg) - e1:SetOperation(c8487449.thop) - e1:SetReset(RESET_EVENT+0x16a0000+RESET_PHASE+PHASE_END,2) - e1:SetLabel(Duel.GetTurnCount()) - c:RegisterEffect(e1) -end -function c8487449.thcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnCount()==e:GetLabel()+1 -end -function c8487449.filter(c) - return c:IsFaceup() and c:IsAbleToHand() -end -function c8487449.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local c=e:GetHandler() - local sp=c:GetSummonPlayer() - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-sp) and c8487449.filter(chkc) and chkc~=c end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g=Duel.SelectTarget(tp,c8487449.filter,sp,0,LOCATION_MZONE,1,1,c) - if g:GetCount()>0 then - g:AddCard(c) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,2,0,0) - end -end -function c8487449.thop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc and c:IsFaceup() and c:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsRelateToEffect(e) then - local g=Group.FromCards(c,tc) - Duel.SendtoHand(g,nil,REASON_EFFECT) - end -end diff --git a/script/c84877802.lua b/script/c84877802.lua deleted file mode 100644 index 4269c691fa..0000000000 --- a/script/c84877802.lua +++ /dev/null @@ -1,55 +0,0 @@ ---最強の盾 -function c84877802.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c84877802.target) - e1:SetOperation(c84877802.operation) - c:RegisterEffect(e1) - --atk/def - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(c84877802.atkval) - c:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_EQUIP) - e3:SetCode(EFFECT_UPDATE_DEFENCE) - e3:SetValue(c84877802.defval) - c:RegisterEffect(e3) - --Equip limit - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetCode(EFFECT_EQUIP_LIMIT) - e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e4:SetValue(c84877802.equiplimit) - c:RegisterEffect(e4) -end -function c84877802.equiplimit(e,c) - return c:IsRace(RACE_WARRIOR) -end -function c84877802.filter(c) - return c:IsFaceup() and c:IsRace(RACE_WARRIOR) -end -function c84877802.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c84877802.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c84877802.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c84877802.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c84877802.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,e:GetHandler(),tc) - end -end -function c84877802.atkval(e,c) - if c:IsDefencePos() then return 0 else return c:GetBaseDefence() end -end -function c84877802.defval(e,c) - if c:IsAttackPos() then return 0 else return c:GetBaseAttack() end -end diff --git a/script/c84905691.lua b/script/c84905691.lua deleted file mode 100644 index a7813eea2e..0000000000 --- a/script/c84905691.lua +++ /dev/null @@ -1,37 +0,0 @@ ---ナチュル・ホーストニードル -function c84905691.initial_effect(c) - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(84905691,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCost(c84905691.cost) - e1:SetTarget(c84905691.target) - e1:SetOperation(c84905691.operation) - c:RegisterEffect(e1) -end -function c84905691.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x2a) -end -function c84905691.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,c84905691.cfilter,1,e:GetHandler()) end - local g=Duel.SelectReleaseGroup(tp,c84905691.cfilter,1,1,e:GetHandler()) - Duel.Release(g,REASON_COST) -end -function c84905691.filter(c,e,tp) - return c:GetSummonPlayer()~=tp and c:IsDestructable() and (not e or c:IsRelateToEffect(e)) -end -function c84905691.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return not e:GetHandler():IsStatus(STATUS_CHAINING) and not eg:IsContains(e:GetHandler()) - and eg:IsExists(c84905691.filter,1,nil,nil,tp) end - local g=eg:Filter(c84905691.filter,nil,nil,tp) - Duel.SetTargetCard(eg) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c84905691.operation(e,tp,eg,ep,ev,re,r,rp) - local g=eg:Filter(c84905691.filter,nil,e,tp) - if g:GetCount()>0 then - Duel.Destroy(g,REASON_EFFECT) - end -end diff --git a/script/c84914462.lua b/script/c84914462.lua deleted file mode 100644 index 9175f5f690..0000000000 --- a/script/c84914462.lua +++ /dev/null @@ -1,19 +0,0 @@ ---アックス・ドラゴニュート -function c84914462.initial_effect(c) - --to defence - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_DAMAGE_STEP_END) - e1:SetCondition(c84914462.poscon) - e1:SetOperation(c84914462.posop) - c:RegisterEffect(e1) -end -function c84914462.poscon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler()==Duel.GetAttacker() and e:GetHandler():IsRelateToBattle() -end -function c84914462.posop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsAttackPos() then - Duel.ChangePosition(c,POS_FACEUP_DEFENCE) - end -end diff --git a/script/c84926738.lua b/script/c84926738.lua deleted file mode 100644 index 9d1dff6617..0000000000 --- a/script/c84926738.lua +++ /dev/null @@ -1,31 +0,0 @@ ---雷仙人 -function c84926738.initial_effect(c) - --flip effect - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(84926738,0)) - e1:SetCategory(CATEGORY_RECOVER) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP) - e1:SetOperation(c84926738.flipop) - c:RegisterEffect(e1) - --lpchange - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(84926738,1)) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetTarget(c84926738.lptg) - e2:SetOperation(c84926738.lpop) - c:RegisterEffect(e2) -end -function c84926738.flipop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - Duel.Recover(tp,3000,REASON_EFFECT) - if c:IsLocation(LOCATION_MZONE+LOCATION_GRAVE) then - c:RegisterFlagEffect(84926738,RESET_EVENT+0x57a0000,0,0) - end -end -function c84926738.lptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():GetFlagEffect(84926738)~=0 end -end -function c84926738.lpop(e,tp,eg,ep,ev,re,r,rp) - Duel.SetLP(tp,Duel.GetLP(tp)-5000) -end diff --git a/script/c84932271.lua b/script/c84932271.lua deleted file mode 100644 index 5509867092..0000000000 --- a/script/c84932271.lua +++ /dev/null @@ -1,37 +0,0 @@ ---ワーム・ジェートリクプス -function c84932271.initial_effect(c) - --flip effect - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_FLIP) - e1:SetOperation(c84932271.flipop) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(84932271,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetCondition(c84932271.spcon) - e2:SetTarget(c84932271.sptg) - e2:SetOperation(c84932271.spop) - c:RegisterEffect(e2) -end -function c84932271.flipop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsLocation(LOCATION_MZONE+LOCATION_GRAVE) then - c:RegisterFlagEffect(84932271,RESET_EVENT+0x17a0000+RESET_PHASE+PHASE_END,0,1) - end -end -function c84932271.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsReason(REASON_DESTROY) -end -function c84932271.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():GetFlagEffect(84932271)~=0 end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c84932271.spop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP_DEFENCE) - end -end diff --git a/script/c84962466.lua b/script/c84962466.lua deleted file mode 100644 index b3911b9eed..0000000000 --- a/script/c84962466.lua +++ /dev/null @@ -1,71 +0,0 @@ ---ビーストライザー -function c84962466.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetTarget(c84962466.target1) - e1:SetOperation(c84962466.operation) - c:RegisterEffect(e1) - --atk - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(84962466,1)) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetRange(LOCATION_SZONE) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetHintTiming(TIMING_DAMAGE_STEP) - e2:SetTarget(c84962466.target2) - e2:SetOperation(c84962466.operation) - c:RegisterEffect(e2) -end -function c84962466.cfilter(c,tp) - return c:IsFaceup() and c:IsRace(RACE_BEAST+RACE_BEASTWARRIOR) and c:IsAbleToRemove() - and Duel.IsExistingTarget(c84962466.filter,tp,LOCATION_MZONE,0,1,c) -end -function c84962466.filter(c) - return c:IsFaceup() and c:IsRace(RACE_BEAST+RACE_BEASTWARRIOR) -end -function c84962466.target1(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c84962466.filter(chkc) end - if chk==0 then - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or Duel.IsExistingMatchingCard(c84962466.cfilter,tp,LOCATION_MZONE,0,1,nil,tp) - end - if Duel.GetCurrentPhase()==PHASE_DAMAGE or - (Duel.IsExistingMatchingCard(c84962466.cfilter,tp,LOCATION_MZONE,0,1,nil,tp) and Duel.SelectYesNo(tp,aux.Stringid(84962466,0))) then - e:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local rg=Duel.SelectMatchingCard(tp,c84962466.cfilter,tp,LOCATION_MZONE,0,1,1,nil,tp) - e:SetLabel(rg:GetFirst():GetBaseAttack()) - Duel.Remove(rg,POS_FACEUP,REASON_COST) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c84962466.filter,tp,LOCATION_MZONE,0,1,1,nil) - e:GetHandler():RegisterFlagEffect(84962466,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) - else e:SetProperty(EFFECT_FLAG_DAMAGE_STEP) end -end -function c84962466.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c84962466.filter(chkc) end - if chk==0 then return e:GetHandler():GetFlagEffect(84962466)==0 - and Duel.IsExistingMatchingCard(c84962466.cfilter,tp,LOCATION_MZONE,0,1,nil,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local rg=Duel.SelectMatchingCard(tp,c84962466.cfilter,tp,LOCATION_MZONE,0,1,1,nil,tp) - e:SetLabel(rg:GetFirst():GetBaseAttack()) - Duel.Remove(rg,POS_FACEUP,REASON_COST) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c84962466.filter,tp,LOCATION_MZONE,0,1,1,nil) - e:GetHandler():RegisterFlagEffect(84962466,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) -end -function c84962466.operation(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local tc=Duel.GetFirstTarget() - if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(e:GetLabel()) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - end -end diff --git a/script/c84968490.lua b/script/c84968490.lua deleted file mode 100644 index 38705bb8af..0000000000 --- a/script/c84968490.lua +++ /dev/null @@ -1,22 +0,0 @@ ---針虫の巣窟 -function c84968490.initial_effect(c) - --discard deck - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCategory(CATEGORY_DECKDES) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetTarget(c84968490.distarget) - e1:SetOperation(c84968490.disop) - c:RegisterEffect(e1) -end -function c84968490.distarget(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,5) end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(5) - Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,5) -end -function c84968490.disop(e,tp,eg,ep,ev,re,r,rp) - local p,val=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.DiscardDeck(p,val,REASON_EFFECT) -end diff --git a/script/c84970821.lua b/script/c84970821.lua deleted file mode 100644 index ff2e0183b5..0000000000 --- a/script/c84970821.lua +++ /dev/null @@ -1,29 +0,0 @@ ---暗黒の呪縛 -function c84970821.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_DRAW_PHASE) - c:RegisterEffect(e1) - --damage - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetCode(EVENT_CHAINING) - e2:SetRange(LOCATION_SZONE) - e2:SetOperation(aux.chainreg) - c:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e3:SetCode(EVENT_CHAIN_SOLVED) - e3:SetRange(LOCATION_SZONE) - e3:SetOperation(c84970821.damop) - c:RegisterEffect(e3) -end -function c84970821.damop(e,tp,eg,ep,ev,re,r,rp) - local c=re:GetHandler() - if re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL) and e:GetHandler():GetFlagEffect(1)>0 then - Duel.Damage(rp,1000,REASON_EFFECT) - end -end diff --git a/script/c84988419.lua b/script/c84988419.lua deleted file mode 100644 index 65491839b2..0000000000 --- a/script/c84988419.lua +++ /dev/null @@ -1,50 +0,0 @@ ---幻奏の華歌聖ブルーム・ディーヴァ -function c84988419.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcFun2(c,aux.FilterBoolFunction(Card.IsSetCard,0x109b),aux.FilterBoolFunction(Card.IsSetCard,0x9b),true) - --indes - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e1:SetValue(1) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - c:RegisterEffect(e2) - --avoid battle damage - local e3=e1:Clone() - e3:SetCode(EFFECT_AVOID_BATTLE_DAMAGE) - c:RegisterEffect(e3) - --destroy - local e4=Effect.CreateEffect(c) - e4:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e4:SetCode(EVENT_BATTLED) - e4:SetCondition(c84988419.condition) - e4:SetTarget(c84988419.target) - e4:SetOperation(c84988419.operation) - c:RegisterEffect(e4) -end -function c84988419.condition(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local bc=c:GetBattleTarget() - return bc and bit.band(bc:GetSummonType(),SUMMON_TYPE_SPECIAL)==SUMMON_TYPE_SPECIAL and c:GetBaseAttack()~=bc:GetBaseAttack() -end -function c84988419.target(e,tp,eg,ep,ev,re,r,rp,chk) - local bc=e:GetHandler():GetBattleTarget() - if chk==0 then return bc:IsDestructable() end - local atk=math.abs(e:GetHandler():GetBaseAttack()-bc:GetBaseAttack()) - Duel.SetTargetCard(bc) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,atk) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,bc,1,0,0) -end -function c84988419.operation(e,tp,eg,ep,ev,re,r,rp) - local bc=Duel.GetFirstTarget() - local atk=math.abs(e:GetHandler():GetBaseAttack()-bc:GetBaseAttack()) - if bc:IsRelateToEffect(e) and bc:IsFaceup() and Duel.Damage(1-tp,atk,REASON_EFFECT)~=0 then - Duel.Destroy(bc,REASON_EFFECT) - end -end diff --git a/script/c85028288.lua b/script/c85028288.lua deleted file mode 100644 index f8ae58ee1c..0000000000 --- a/script/c85028288.lua +++ /dev/null @@ -1,50 +0,0 @@ ---ジュラック・タイタン -function c85028288.initial_effect(c) - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - c:RegisterEffect(e1) - --cannot be target - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetValue(c85028288.efilter) - c:RegisterEffect(e2) - --atkup - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(85028288,0)) - e3:SetCategory(CATEGORY_ATKCHANGE) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1) - e3:SetCost(c85028288.atkcost) - e3:SetOperation(c85028288.atkop) - c:RegisterEffect(e3) -end -function c85028288.efilter(e,re,rp) - return re:GetHandler():IsType(TYPE_TRAP+TYPE_MONSTER) and aux.tgval(e,re,rp) -end -function c85028288.cfilter(c) - return c:IsAttackBelow(1700) and c:IsSetCard(0x22) and c:IsAbleToRemoveAsCost() -end -function c85028288.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c85028288.cfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c85028288.cfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c85028288.atkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFaceup() and c:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(1000) - e1:SetReset(RESET_EVENT+0x1ff0000+RESET_PHASE+PHASE_END) - c:RegisterEffect(e1) - end -end diff --git a/script/c85060248.lua b/script/c85060248.lua deleted file mode 100644 index 05b2e3d1f3..0000000000 --- a/script/c85060248.lua +++ /dev/null @@ -1,34 +0,0 @@ ---メンタルプロテクター -function c85060248.initial_effect(c) - --cannot attack - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_CANNOT_ATTACK) - e2:SetRange(LOCATION_MZONE) - e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e2:SetTarget(c85060248.atktarget) - c:RegisterEffect(e2) - --maintain - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e3:SetCode(EVENT_PHASE+PHASE_STANDBY) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1) - e3:SetCondition(c85060248.mtcon) - e3:SetOperation(c85060248.mtop) - c:RegisterEffect(e3) -end -function c85060248.atktarget(e,c) - return not c:IsRace(RACE_PSYCHO) and c:IsAttackBelow(2000) -end -function c85060248.mtcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c85060248.mtop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLP(tp)>500 and Duel.SelectYesNo(tp,aux.Stringid(85060248,0)) then - Duel.PayLPCost(tp,500) - else - Duel.Destroy(e:GetHandler(),REASON_RULE) - end -end diff --git a/script/c85066822.lua b/script/c85066822.lua deleted file mode 100644 index 0477047bc1..0000000000 --- a/script/c85066822.lua +++ /dev/null @@ -1,57 +0,0 @@ ---ウォーター・ドラゴン -function c85066822.initial_effect(c) - c:EnableReviveLimit() - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - c:RegisterEffect(e1) - --atkchange - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_SET_ATTACK) - e2:SetRange(LOCATION_MZONE) - e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e2:SetTarget(c85066822.atfilter) - c:RegisterEffect(e2) - --spsummon - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(85066822,0)) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e3:SetCode(EVENT_TO_GRAVE) - e3:SetCondition(c85066822.spcon) - e3:SetTarget(c85066822.sptg) - e3:SetOperation(c85066822.spop) - c:RegisterEffect(e3) -end -function c85066822.atfilter(e,c) - return c:IsAttribute(ATTRIBUTE_FIRE) or c:IsRace(RACE_PYRO) -end -function c85066822.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsReason(REASON_DESTROY) -end -function c85066822.spfilter(c,e,tp,code) - return c:IsCode(code) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c85066822.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>2 - and Duel.IsExistingTarget(c85066822.spfilter,tp,LOCATION_GRAVE,0,2,nil,e,tp,22587018) - and Duel.IsExistingTarget(c85066822.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp,58071123) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g1=Duel.SelectTarget(tp,c85066822.spfilter,tp,LOCATION_GRAVE,0,2,2,nil,e,tp,22587018) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g2=Duel.SelectTarget(tp,c85066822.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp,58071123) - g1:Merge(g2) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g1,3,0,0) -end -function c85066822.spop(e,tp,eg,ep,ev,re,r,rp) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ft<=0 then return end - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) - if g:GetCount()==0 or g:GetCount()>ft then return end - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) -end diff --git a/script/c85080048.lua b/script/c85080048.lua deleted file mode 100644 index b4fd83b1fb..0000000000 --- a/script/c85080048.lua +++ /dev/null @@ -1,38 +0,0 @@ ---雷の裁き -function c85080048.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetCondition(c85080048.condition) - e1:SetTarget(c85080048.target) - e1:SetOperation(c85080048.activate) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e2) - local e3=e1:Clone() - e3:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - c:RegisterEffect(e3) -end -function c85080048.cfilter(c,tp) - return c:IsFaceup() and c:IsRace(RACE_THUNDER) and c:IsControler(tp) -end -function c85080048.condition(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c85080048.cfilter,1,nil,tp) -end -function c85080048.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and chkc:IsDestructable() end - if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,0,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,0,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c85080048.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c85080444.lua b/script/c85080444.lua deleted file mode 100644 index df3191840e..0000000000 --- a/script/c85080444.lua +++ /dev/null @@ -1,64 +0,0 @@ ---アーティファクト-アイギス -function c85080444.initial_effect(c) - --set - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_MONSTER_SSET) - e1:SetValue(TYPE_SPELL) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(85080444,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetCondition(c85080444.spcon) - e2:SetTarget(c85080444.sptg) - e2:SetOperation(c85080444.spop) - c:RegisterEffect(e2) - --indes - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(85080444,1)) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - e3:SetCondition(c85080444.indcon) - e3:SetOperation(c85080444.indop) - c:RegisterEffect(e3) -end -function c85080444.spcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsPreviousLocation(LOCATION_SZONE) and c:IsPreviousPosition(POS_FACEDOWN) - and c:IsReason(REASON_DESTROY) and Duel.GetTurnPlayer()~=tp -end -function c85080444.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c85080444.spop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP) - end -end -function c85080444.indcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp -end -function c85080444.tg(e,c) - return c:IsFaceup() and c:IsSetCard(0x97) -end -function c85080444.indop(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) - e1:SetTarget(c85080444.tg) - e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetReset(RESET_PHASE+PHASE_END) - e1:SetValue(aux.tgoval) - Duel.RegisterEffect(e1,tp) - local e2=e1:Clone() - e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - e2:SetValue(c85080444.tgvalue) - Duel.RegisterEffect(e2,tp) -end -function c85080444.tgvalue(e,re,rp) - return rp~=e:GetHandlerPlayer() -end diff --git a/script/c85087012.lua b/script/c85087012.lua deleted file mode 100644 index 7dea0d9e36..0000000000 --- a/script/c85087012.lua +++ /dev/null @@ -1,64 +0,0 @@ ---カードガンナー -function c85087012.initial_effect(c) - --atkup - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(85087012,0)) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCost(c85087012.cost) - e1:SetOperation(c85087012.operation) - c:RegisterEffect(e1) - --draw - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(85087012,1)) - e2:SetCategory(CATEGORY_DRAW) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetCondition(c85087012.drcon) - e2:SetTarget(c85087012.drtg) - e2:SetOperation(c85087012.drop) - c:RegisterEffect(e2) -end -function c85087012.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDiscardDeckAsCost(tp,1) end - local ct=Duel.GetFieldGroupCount(tp,LOCATION_DECK,0) - if ct==1 then - Duel.DiscardDeck(tp,1,REASON_COST) - e:SetLabel(1) - else - local ac=0 - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(85087012,2)) - if ct==2 then ac=Duel.AnnounceNumber(tp,2,1) - else ac=Duel.AnnounceNumber(tp,3,2,1) end - Duel.DiscardDeck(tp,ac,REASON_COST) - e:SetLabel(ac) - end -end -function c85087012.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFaceup() and c:IsRelateToEffect(e) then - local ct=e:GetLabel() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+0x1ff0000+RESET_PHASE+PHASE_END) - e1:SetValue(ct*500) - c:RegisterEffect(e1) - end -end -function c85087012.drcon(e,tp,eg,ep,ev,re,r,rp) - return bit.band(r,REASON_DESTROY)~=0 and e:GetHandler():GetPreviousControler()==tp - and e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) -end -function c85087012.drtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(1) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c85087012.drop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end diff --git a/script/c85101097.lua b/script/c85101097.lua deleted file mode 100644 index 6801d3b5a2..0000000000 --- a/script/c85101097.lua +++ /dev/null @@ -1,86 +0,0 @@ ---プリン隊 -function c85101097.initial_effect(c) - --cannot release - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_UNRELEASABLE_SUM) - e1:SetValue(1) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_UNRELEASABLE_NONSUM) - c:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e3:SetCode(EFFECT_CANNOT_BE_FUSION_MATERIAL) - e3:SetValue(1) - c:RegisterEffect(e3) - local e4=e3:Clone() - e4:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL) - c:RegisterEffect(e4) - local e5=e3:Clone() - e5:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL) - c:RegisterEffect(e5) - --control - local e6=Effect.CreateEffect(c) - e6:SetDescription(aux.Stringid(85101097,0)) - e6:SetCategory(CATEGORY_DESTROY+CATEGORY_CONTROL) - e6:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e6:SetCode(EVENT_PHASE+PHASE_END) - e6:SetProperty(EFFECT_FLAG_CARD_TARGET) - e6:SetRange(LOCATION_MZONE) - e6:SetCountLimit(1) - e6:SetCondition(c85101097.ctlcon) - e6:SetTarget(c85101097.ctltg) - e6:SetOperation(c85101097.ctlop) - c:RegisterEffect(e6) - --damage - local e7=Effect.CreateEffect(c) - e7:SetDescription(aux.Stringid(85101097,1)) - e7:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e7:SetCategory(CATEGORY_DAMAGE) - e7:SetCode(EVENT_PHASE+PHASE_STANDBY) - e7:SetRange(LOCATION_MZONE) - e7:SetCountLimit(1) - e7:SetCondition(c85101097.damcon) - e7:SetTarget(c85101097.damtg) - e7:SetOperation(c85101097.damop) - c:RegisterEffect(e7) -end -function c85101097.ctlcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c85101097.filter(c) - return (c:GetSequence()==6 or c:GetSequence()==7) and c:IsDestructable() -end -function c85101097.ctltg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_SZONE) and chkc:IsControler(tp) and c85101097.filter(chkc) end - if chk==0 then return e:GetHandler():IsControlerCanBeChanged() - and Duel.IsExistingTarget(c85101097.filter,tp,LOCATION_SZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c85101097.filter,tp,LOCATION_SZONE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_CONTROL,e:GetHandler(),1,0,0) -end -function c85101097.ctlop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)~=0 - and c:IsRelateToEffect(e) and c:IsFaceup() and not Duel.GetControl(c,1-tp) then - if not c:IsImmuneToEffect(e) and c:IsAbleToChangeControler() then - Duel.Destroy(c,REASON_EFFECT) - end - end -end -function c85101097.damcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c85101097.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,0,0,tp,300) -end -function c85101097.damop(e,tp,eg,ep,ev,re,r,rp) - Duel.Damage(tp,300,REASON_EFFECT) -end diff --git a/script/c85101228.lua b/script/c85101228.lua deleted file mode 100644 index 03d42f9470..0000000000 --- a/script/c85101228.lua +++ /dev/null @@ -1,30 +0,0 @@ ---D・バインド -function c85101228.initial_effect(c) - --activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --cannot attack - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(0,LOCATION_MZONE) - e2:SetTarget(c85101228.tg) - e2:SetCondition(c85101228.con) - c:RegisterEffect(e2) - --pos limit - local e3=e2:Clone() - e3:SetCode(EFFECT_CANNOT_CHANGE_POSITION) - c:RegisterEffect(e3) -end -function c85101228.filter(c) - return c:IsFaceup() and c:IsSetCard(0x26) -end -function c85101228.con(e) - return Duel.IsExistingMatchingCard(c85101228.filter,e:GetHandler():GetControler(),LOCATION_MZONE,0,1,nil) -end -function c85101228.tg(e,c) - return c:GetLevel()>=4 -end diff --git a/script/c85103922.lua b/script/c85103922.lua deleted file mode 100644 index 0ad2dfd6aa..0000000000 --- a/script/c85103922.lua +++ /dev/null @@ -1,63 +0,0 @@ ---アーティファクト-モラルタ -function c85103922.initial_effect(c) - --set - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_MONSTER_SSET) - e1:SetValue(TYPE_SPELL) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(85103922,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetCondition(c85103922.spcon) - e2:SetTarget(c85103922.sptg) - e2:SetOperation(c85103922.spop) - c:RegisterEffect(e2) - --destroy - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(85103922,1)) - e3:SetCategory(CATEGORY_DESTROY) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP) - e3:SetCondition(c85103922.descon) - e3:SetTarget(c85103922.destg) - e3:SetOperation(c85103922.desop) - c:RegisterEffect(e3) -end -function c85103922.spcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsPreviousLocation(LOCATION_SZONE) and c:IsPreviousPosition(POS_FACEDOWN) - and c:IsReason(REASON_DESTROY) and Duel.GetTurnPlayer()~=tp -end -function c85103922.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c85103922.spop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP) - end -end -function c85103922.descon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp -end -function c85103922.filter(c) - return c:IsFaceup() and c:IsDestructable() -end -function c85103922.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c85103922.filter,tp,0,LOCATION_ONFIELD,1,nil) end - local g=Duel.GetMatchingGroup(c85103922.filter,tp,0,LOCATION_ONFIELD,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c85103922.desop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectMatchingCard(tp,c85103922.filter,tp,0,LOCATION_ONFIELD,1,1,nil) - if g:GetCount()>0 then - Duel.HintSelection(g) - Duel.Destroy(g,REASON_EFFECT) - end -end diff --git a/script/c85121942.lua b/script/c85121942.lua deleted file mode 100644 index 5bcd4ee72b..0000000000 --- a/script/c85121942.lua +++ /dev/null @@ -1,78 +0,0 @@ ---CNo.105 BK 彗星のカエストス -function c85121942.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,5,4) - c:EnableReviveLimit() - --damage - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(85121942,0)) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_BATTLE_DESTROYING) - e1:SetCondition(c85121942.damcon) - e1:SetTarget(c85121942.damtg) - e1:SetOperation(c85121942.damop) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE) - e2:SetDescription(aux.Stringid(85121942,1)) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCountLimit(1) - e2:SetRange(LOCATION_MZONE) - e2:SetCondition(c85121942.descon) - e2:SetCost(c85121942.descost) - e2:SetTarget(c85121942.destg) - e2:SetOperation(c85121942.desop) - c:RegisterEffect(e2) -end -c85121942.xyz_number=105 -function c85121942.damcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local bc=c:GetBattleTarget() - return c:IsRelateToBattle() and bc:IsLocation(LOCATION_GRAVE) and bc:IsType(TYPE_MONSTER) -end -function c85121942.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local c=e:GetHandler() - local bc=c:GetBattleTarget() - local dam=bc:GetTextAttack()/2 - if dam<0 then dam=0 end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(dam) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,dam) -end -function c85121942.damop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end -function c85121942.descon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetOverlayGroup():IsExists(Card.IsCode,1,nil,59627393) -end -function c85121942.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c85121942.filter(c) - return c:IsDestructable() -end -function c85121942.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c85121942.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c85121942.filter,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c85121942.filter,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,g:GetFirst():GetAttack()) -end -function c85121942.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsControler(1-tp) then - local atk=tc:GetAttack() - if atk<0 or tc:IsFacedown() then atk=0 end - if Duel.Destroy(tc,REASON_EFFECT)~=0 then - Duel.Damage(1-tp,atk,REASON_EFFECT) - end - end -end diff --git a/script/c85138716.lua b/script/c85138716.lua deleted file mode 100644 index 7b05e40bce..0000000000 --- a/script/c85138716.lua +++ /dev/null @@ -1,84 +0,0 @@ ---レスキューラビット -function c85138716.initial_effect(c) - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_DECK) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(85138716,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,85138716) - e2:SetCost(c85138716.spcost) - e2:SetTarget(c85138716.sptg) - e2:SetOperation(c85138716.spop) - c:RegisterEffect(e2) -end -function c85138716.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) -end -function c85138716.filter(c,e,tp) - return c:IsType(TYPE_NORMAL) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c85138716.filter2(c,g) - return g:IsExists(Card.IsCode,1,c,c:GetCode()) -end -function c85138716.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local g=Duel.GetMatchingGroup(c85138716.filter,tp,LOCATION_DECK,0,nil,e,tp) - return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and g:IsExists(c85138716.filter2,1,nil,g) - end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_DECK) -end -function c85138716.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 then return end - local g=Duel.GetMatchingGroup(c85138716.filter,tp,LOCATION_DECK,0,nil,e,tp) - local dg=g:Filter(c85138716.filter2,nil,g) - if dg:GetCount()>=1 then - local fid=e:GetHandler():GetFieldID() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=dg:Select(tp,1,1,nil) - local tc1=sg:GetFirst() - dg:RemoveCard(tc1) - local tc2=dg:Filter(Card.IsCode,nil,tc1:GetCode()):GetFirst() - Duel.SpecialSummonStep(tc1,0,tp,tp,false,false,POS_FACEUP) - Duel.SpecialSummonStep(tc2,0,tp,tp,false,false,POS_FACEUP) - tc1:RegisterFlagEffect(85138716,RESET_EVENT+0x1fe0000,0,1,fid) - tc2:RegisterFlagEffect(85138716,RESET_EVENT+0x1fe0000,0,1,fid) - Duel.SpecialSummonComplete() - sg:AddCard(tc2) - sg:KeepAlive() - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetCountLimit(1) - e1:SetLabel(fid) - e1:SetLabelObject(sg) - e1:SetCondition(c85138716.descon) - e1:SetOperation(c85138716.desop) - Duel.RegisterEffect(e1,tp) - end -end -function c85138716.desfilter(c,fid) - return c:GetFlagEffectLabel(85138716)==fid -end -function c85138716.descon(e,tp,eg,ep,ev,re,r,rp) - local g=e:GetLabelObject() - if not g:IsExists(c85138716.desfilter,1,nil,e:GetLabel()) then - g:DeleteGroup() - e:Reset() - return false - else return true end -end -function c85138716.desop(e,tp,eg,ep,ev,re,r,rp) - local g=e:GetLabelObject() - local tg=g:Filter(c85138716.desfilter,nil,e:GetLabel()) - Duel.Destroy(tg,REASON_EFFECT) -end diff --git a/script/c85166216.lua b/script/c85166216.lua deleted file mode 100644 index 1cc5d6f994..0000000000 --- a/script/c85166216.lua +++ /dev/null @@ -1,27 +0,0 @@ ---恵みの像 -function c85166216.initial_effect(c) - --recover - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(85166216,0)) - e1:SetCategory(CATEGORY_RECOVER) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCondition(c85166216.condition) - e1:SetTarget(c85166216.target) - e1:SetOperation(c85166216.operation) - c:RegisterEffect(e1) -end -function c85166216.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_HAND) and rp~=tp and bit.band(r,REASON_EFFECT)==REASON_EFFECT -end -function c85166216.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(2000) - Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,2000) -end -function c85166216.operation(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Recover(p,d,REASON_EFFECT) -end diff --git a/script/c85215458.lua b/script/c85215458.lua deleted file mode 100644 index ed8ff6fee4..0000000000 --- a/script/c85215458.lua +++ /dev/null @@ -1,39 +0,0 @@ ---BF-月影のカルート -function c85215458.initial_effect(c) - --atkup - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetDescription(aux.Stringid(85215458,0)) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetRange(LOCATION_HAND) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e1:SetCondition(c85215458.condition) - e1:SetCost(c85215458.cost) - e1:SetOperation(c85215458.operation) - c:RegisterEffect(e1) -end -function c85215458.condition(e,tp,eg,ep,ev,re,r,rp) - local phase=Duel.GetCurrentPhase() - if phase~=PHASE_DAMAGE or Duel.IsDamageCalculated() then return false end - local a=Duel.GetAttacker() - local d=Duel.GetAttackTarget() - return (a:GetControler()==tp and a:IsSetCard(0x33) and a:IsRelateToBattle()) - or (d and d:GetControler()==tp and d:IsSetCard(0x33) and d:IsRelateToBattle()) -end -function c85215458.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end -function c85215458.operation(e,tp,eg,ep,ev,re,r,rp,chk) - local a=Duel.GetAttacker() - if Duel.GetTurnPlayer()~=tp then a=Duel.GetAttackTarget() end - if not a:IsRelateToBattle() then return end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e1:SetValue(1400) - a:RegisterEffect(e1) -end diff --git a/script/c8522996.lua b/script/c8522996.lua deleted file mode 100644 index 79c9268597..0000000000 --- a/script/c8522996.lua +++ /dev/null @@ -1,82 +0,0 @@ ---始源の帝王 -function c8522996.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c8522996.target) - e1:SetOperation(c8522996.activate) - c:RegisterEffect(e1) - --change attribute - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(8522996,1)) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetProperty(EFFECT_FLAG_DELAY) - e2:SetCondition(c8522996.chcon) - e2:SetCost(c8522996.chcost) - e2:SetTarget(c8522996.chtg) - e2:SetOperation(c8522996.chop) - c:RegisterEffect(e2) - --sum limit - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetRange(LOCATION_MZONE) - e3:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e3:SetTargetRange(1,0) - e3:SetTarget(c8522996.splimit) - c:RegisterEffect(e3) -end -function c8522996.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsPlayerCanSpecialSummonMonster(tp,8522996,0,0x21,1000,2400,6,RACE_FIEND,ATTRIBUTE_DARK) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c8522996.activate(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) then return end - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 - or not Duel.IsPlayerCanSpecialSummonMonster(tp,8522996,0,0x21,1000,2400,6,RACE_FIEND,ATTRIBUTE_DARK) then return end - c:AddTrapMonsterAttribute(TYPE_EFFECT,ATTRIBUTE_DARK,RACE_FIEND,6,1000,2400) - Duel.SpecialSummon(c,1,tp,tp,true,false,POS_FACEUP) - c:TrapMonsterBlock() -end -function c8522996.chcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+1 -end -function c8522996.chcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) -end -function c8522996.chtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,0) - local aat=Duel.AnnounceAttribute(tp,1,0x7f) - e:SetLabel(aat) -end -function c8522996.chop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local att=e:GetLabel() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_COPY_INHERIT) - e1:SetCode(EFFECT_CHANGE_ATTRIBUTE) - e1:SetValue(att) - e1:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e1) - --double tribute - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DOUBLE_TRIBUTE) - e2:SetValue(c8522996.condition) - e2:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e2) -end -function c8522996.condition(e,c) - return c:IsAttribute(e:GetHandler():GetAttribute()) -end -function c8522996.splimit(e,c,tp,sumtp,sumpos) - return c:IsAttribute(0xff-e:GetHandler():GetAttribute()) -end diff --git a/script/c85239662.lua b/script/c85239662.lua deleted file mode 100644 index 0522f28f5f..0000000000 --- a/script/c85239662.lua +++ /dev/null @@ -1,37 +0,0 @@ ---神秘の妖精 エルフィリア -function c85239662.initial_effect(c) - --xyz limit - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(85239662,0)) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCost(c85239662.cost) - e2:SetOperation(c85239662.operation) - c:RegisterEffect(e2) -end -function c85239662.cfilter(c) - return c:IsAttribute(ATTRIBUTE_WIND) and not c:IsPublic() -end -function c85239662.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c85239662.cfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) - local g=Duel.SelectMatchingCard(tp,c85239662.cfilter,tp,LOCATION_HAND,0,1,1,nil) - Duel.ConfirmCards(1-tp,g) - e:SetLabel(g:GetFirst():GetLevel()) - Duel.ShuffleHand(tp) -end -function c85239662.operation(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL) - e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e1:SetTarget(c85239662.target) - e1:SetLabel(e:GetLabel()) - e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN) - e1:SetValue(1) - Duel.RegisterEffect(e1,tp) -end -function c85239662.target(e,c) - return c:GetLevel()~=e:GetLabel() -end diff --git a/script/c85255550.lua b/script/c85255550.lua deleted file mode 100644 index f7d8d679aa..0000000000 --- a/script/c85255550.lua +++ /dev/null @@ -1,42 +0,0 @@ ---異国の剣士 -function c85255550.initial_effect(c) - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(85255550,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_DAMAGE_STEP_END) - e1:SetCondition(c85255550.condition) - e1:SetOperation(c85255550.operation) - c:RegisterEffect(e1) -end -function c85255550.condition(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local bc=c:GetBattleTarget() - return c==Duel.GetAttacker() and bc and bc:IsRelateToBattle() and bc:IsFaceup() -end -function c85255550.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local bc=c:GetBattleTarget() - if bc:IsRelateToBattle() then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_MZONE) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetOperation(c85255550.desop) - e1:SetLabel(0) - e1:SetOwnerPlayer(tp) - bc:RegisterEffect(e1) - end -end -function c85255550.desop(e,tp,eg,ep,ev,re,r,rp) - local ct=e:GetLabel() - ct=ct+1 - e:SetLabel(ct) - e:GetOwner():SetTurnCounter(ct) - if ct==5 then - Duel.Destroy(e:GetHandler(),REASON_EFFECT) - end -end diff --git a/script/c8529136.lua b/script/c8529136.lua deleted file mode 100644 index ceae2b45db..0000000000 --- a/script/c8529136.lua +++ /dev/null @@ -1,96 +0,0 @@ ---スクラップ・フィスト -function c8529136.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c8529136.condition) - e1:SetTarget(c8529136.target) - e1:SetOperation(c8529136.activate) - c:RegisterEffect(e1) -end -function c8529136.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()0 -end -function c85306040.posop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsAttackPos() then - Duel.ChangePosition(c,POS_FACEUP_DEFENCE) - end - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_CHANGE_POSITION) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_COPY_INHERIT) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,3) - c:RegisterEffect(e1) -end diff --git a/script/c85310252.lua b/script/c85310252.lua deleted file mode 100644 index d40e640e17..0000000000 --- a/script/c85310252.lua +++ /dev/null @@ -1,59 +0,0 @@ ---ドドドドライバー -function c85310252.initial_effect(c) - --lv change - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(c85310252.spcon) - e1:SetOperation(c85310252.spop) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(85310252,0)) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCountLimit(2) - e2:SetCondition(c85310252.condition) - e2:SetTarget(c85310252.target) - e2:SetOperation(c85310252.operation) - c:RegisterEffect(e2) -end -function c85310252.spcon(e,tp,eg,ep,ev,re,r,rp) - return re and re:GetHandler():IsSetCard(0x82) -end -function c85310252.spop(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():RegisterFlagEffect(85310252,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) -end -function c85310252.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetFlagEffect(85310252)>0 -end -function c85310252.filter(c) - return c:IsFaceup() and c:IsSetCard(0x82) and c:IsLevelAbove(1) -end -function c85310252.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c85310252.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c85310252.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - local g=Duel.SelectTarget(tp,c85310252.filter,tp,LOCATION_MZONE,0,1,1,nil) - local tc=g:GetFirst() - local op=0 - if tc:GetLevel()==1 then op=Duel.SelectOption(tp,aux.Stringid(85310252,1)) - else op=Duel.SelectOption(tp,aux.Stringid(85310252,1),aux.Stringid(85310252,2)) end - e:SetLabel(op) -end -function c85310252.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_UPDATE_LEVEL) - e1:SetReset(RESET_EVENT+0x1fe0000) - if e:GetLabel()==0 then - e1:SetValue(1) - else e1:SetValue(-1) end - tc:RegisterEffect(e1) - end -end diff --git a/script/c85313220.lua b/script/c85313220.lua deleted file mode 100644 index 62be687e92..0000000000 --- a/script/c85313220.lua +++ /dev/null @@ -1,71 +0,0 @@ ---漆黒の魔王 LV4 -function c85313220.initial_effect(c) - --disable - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_BATTLED) - e1:SetRange(LOCATION_MZONE) - e1:SetOperation(c85313220.disop) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EVENT_BATTLE_DESTROYING) - e2:SetOperation(c85313220.btop) - c:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(85313220,0)) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetRange(LOCATION_MZONE) - e3:SetCode(EVENT_PHASE+PHASE_STANDBY) - e3:SetCondition(c85313220.spcon) - e3:SetCost(c85313220.spcost) - e3:SetTarget(c85313220.sptg) - e3:SetOperation(c85313220.spop) - c:RegisterEffect(e3) -end -c85313220.lvupcount=1 -c85313220.lvup={12817939} -function c85313220.disop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local d=Duel.GetAttackTarget() - if d==c then d=Duel.GetAttacker() end - if d and d:IsStatus(STATUS_BATTLE_DESTROYED) and not c:IsStatus(STATUS_BATTLE_DESTROYED) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0x17a0000) - d:RegisterEffect(e1) - end -end -function c85313220.btop(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():RegisterFlagEffect(85313220,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END+RESET_SELF_TURN,0,2) -end -function c85313220.spcon(e,tp,eg,ep,ev,re,r,rp) - return tp==Duel.GetTurnPlayer() and e:GetHandler():GetFlagEffect(85313220)~=0 -end -function c85313220.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end -function c85313220.spfilter(c,e,tp) - return c:IsCode(12817939) and c:IsCanBeSpecialSummoned(e,0,tp,true,true) -end -function c85313220.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsExistingMatchingCard(c85313220.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) -end -function c85313220.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c85313220.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp) - local tc=g:GetFirst() - if tc then - Duel.SpecialSummon(tc,0,tp,tp,true,true,POS_FACEUP) - tc:RegisterFlagEffect(85313220,RESET_EVENT+0x16e0000,0,0) - tc:CompleteProcedure() - end -end diff --git a/script/c85346853.lua b/script/c85346853.lua deleted file mode 100644 index 69fb9f8081..0000000000 --- a/script/c85346853.lua +++ /dev/null @@ -1,61 +0,0 @@ ---光子竜の聖騎士 -function c85346853.initial_effect(c) - c:EnableReviveLimit() - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(85346853,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c85346853.spcost) - e1:SetTarget(c85346853.sptg) - e1:SetOperation(c85346853.spop) - c:RegisterEffect(e1) - --draw - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(85346853,1)) - e2:SetCategory(CATEGORY_DRAW) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_BATTLE_DESTROYING) - e2:SetCondition(c85346853.drcon) - e2:SetTarget(c85346853.drtg) - e2:SetOperation(c85346853.drop) - c:RegisterEffect(e2) -end -function c85346853.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end -function c85346853.spfilter(c,e,tp) - return c:IsCode(93717133) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c85346853.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsExistingMatchingCard(c85346853.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) -end -function c85346853.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c85346853.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end -function c85346853.drcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local bc=c:GetBattleTarget() - return c:IsRelateToBattle() and c:IsFaceup() - and bc:IsLocation(LOCATION_GRAVE) and bc:IsType(TYPE_MONSTER) and bc:IsReason(REASON_BATTLE) -end -function c85346853.drtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(1) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c85346853.drop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end diff --git a/script/c85352446.lua b/script/c85352446.lua deleted file mode 100644 index 4f5003b264..0000000000 --- a/script/c85352446.lua +++ /dev/null @@ -1,36 +0,0 @@ ---統制訓練 -function c85352446.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(TIMING_ATTACK,0x11e0) - e1:SetTarget(c85352446.target) - e1:SetOperation(c85352446.activate) - c:RegisterEffect(e1) -end -function c85352446.filter(c) - local lv=c:GetLevel() - return lv>0 and lv<=5 and c:IsFaceup() and Duel.IsExistingMatchingCard(c85352446.filter2,0,LOCATION_MZONE,LOCATION_MZONE,1,c,lv) -end -function c85352446.filter2(c,lv) - local clv=c:GetLevel() - return c:IsFaceup() and clv>0 and lv~=clv and c:IsDestructable() -end -function c85352446.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c85352446.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c85352446.filter,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - local g=Duel.SelectTarget(tp,c85352446.filter,tp,0,LOCATION_MZONE,1,1,nil) - local dg=Duel.GetMatchingGroup(c85352446.filter2,0,LOCATION_MZONE,LOCATION_MZONE,nil,g:GetFirst():GetLevel()) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,dg,dg:GetCount(),0,0) -end -function c85352446.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - local dg=Duel.GetMatchingGroup(c85352446.filter2,0,LOCATION_MZONE,LOCATION_MZONE,tc,tc:GetLevel()) - Duel.Destroy(dg,REASON_EFFECT) - end -end diff --git a/script/c85359414.lua b/script/c85359414.lua deleted file mode 100644 index 532b9ec84c..0000000000 --- a/script/c85359414.lua +++ /dev/null @@ -1,114 +0,0 @@ ---氷岩魔獣 -function c85359414.initial_effect(c) - --equip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(85359414,0)) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetTarget(c85359414.eqtg) - e1:SetOperation(c85359414.eqop) - c:RegisterEffect(e1) - --unequip - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(85359414,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_SZONE) - e2:SetCondition(c85359414.uncon) - e2:SetTarget(c85359414.sptg) - e2:SetOperation(c85359414.spop) - c:RegisterEffect(e2) - --destroy - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(85359414,2)) - e3:SetCategory(CATEGORY_DESTROY) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetRange(LOCATION_SZONE) - e3:SetCode(EVENT_BATTLE_DAMAGE) - e3:SetCondition(c85359414.descon) - e3:SetTarget(c85359414.destg) - e3:SetOperation(c85359414.desop) - c:RegisterEffect(e3) - --destroy sub - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_EQUIP) - e4:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e4:SetCode(EFFECT_DESTROY_SUBSTITUTE) - e4:SetCondition(c85359414.uncon) - e4:SetValue(c85359414.repval) - c:RegisterEffect(e4) - --eqlimit - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_SINGLE) - e5:SetCode(EFFECT_EQUIP_LIMIT) - e5:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e5:SetValue(c85359414.eqlimit) - c:RegisterEffect(e5) -end -function c85359414.uncon(e) - return e:GetHandler():IsStatus(STATUS_UNION) -end -function c85359414.repval(e,re,r,rp) - return bit.band(r,REASON_BATTLE)~=0 -end -function c85359414.eqlimit(e,c) - return c:IsCode(59364406) -end -function c85359414.filter(c) - return c:IsFaceup() and c:IsCode(59364406) and c:GetUnionCount()==0 -end -function c85359414.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c85359414.filter(chkc) end - if chk==0 then return e:GetHandler():GetFlagEffect(85359414)==0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingTarget(c85359414.filter,tp,LOCATION_MZONE,0,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local g=Duel.SelectTarget(tp,c85359414.filter,tp,LOCATION_MZONE,0,1,1,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0) - e:GetHandler():RegisterFlagEffect(85359414,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1) -end -function c85359414.eqop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if not c:IsRelateToEffect(e) or c:IsFacedown() then return end - if not tc:IsRelateToEffect(e) or not c85359414.filter(tc) then - Duel.SendtoGrave(c,REASON_EFFECT) - return - end - if not Duel.Equip(tp,c,tc,false) then return end - c:SetStatus(STATUS_UNION,true) -end -function c85359414.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():GetFlagEffect(85359414)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,false) end - Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) - e:GetHandler():RegisterFlagEffect(85359414,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1) -end -function c85359414.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP_ATTACK) - end -end -function c85359414.descon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsStatus(STATUS_UNION) and ep~=tp and eg:GetFirst()==e:GetHandler():GetEquipTarget() -end -function c85359414.desfilter(c) - return c:IsFacedown() and c:IsDestructable() -end -function c85359414.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_SZONE) and c85359414.desfilter(chkc) end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c85359414.desfilter,tp,LOCATION_SZONE,LOCATION_SZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c85359414.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsFacedown() and tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c85399281.lua b/script/c85399281.lua deleted file mode 100644 index 93338f33aa..0000000000 --- a/script/c85399281.lua +++ /dev/null @@ -1,34 +0,0 @@ ---智天使ハーヴェスト -function c85399281.initial_effect(c) - --to hand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(85399281,0)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetCondition(c85399281.condition) - e1:SetTarget(c85399281.target) - e1:SetOperation(c85399281.operation) - c:RegisterEffect(e1) -end -function c85399281.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) -end -function c85399281.filter(c) - return c:IsType(TYPE_COUNTER) and c:IsAbleToHand() -end -function c85399281.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c85399281.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c85399281.filter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c85399281.filter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c85399281.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end diff --git a/script/c85431040.lua b/script/c85431040.lua deleted file mode 100644 index d629f99414..0000000000 --- a/script/c85431040.lua +++ /dev/null @@ -1,50 +0,0 @@ ---イービル・ソーン -function c85431040.initial_effect(c) - --damage - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(85431040,0)) - e1:SetCategory(CATEGORY_DAMAGE+CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c85431040.cost) - e1:SetTarget(c85431040.target) - e1:SetOperation(c85431040.operation) - c:RegisterEffect(e1) -end -function c85431040.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end -function c85431040.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,300) -end -function c85431040.filter(c,e,tp) - return c:IsCode(85431040) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c85431040.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.Damage(1-tp,300,REASON_EFFECT) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ft<=0 then return end - if ft>2 then ft=2 end - local g=Duel.GetMatchingGroup(c85431040.filter,tp,LOCATION_DECK,0,nil,e,tp) - if g:GetCount()==0 then return end - if Duel.SelectYesNo(tp,aux.Stringid(85431040,1)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=g:Select(tp,1,ft,nil) - local tc=sg:GetFirst() - while tc do - if Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP_ATTACK) then - --cannot trigger - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_TRIGGER) - e1:SetRange(LOCATION_MZONE) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - end - tc=sg:GetNext() - end - Duel.SpecialSummonComplete() - end -end diff --git a/script/c85446833.lua b/script/c85446833.lua deleted file mode 100644 index 1b37246899..0000000000 --- a/script/c85446833.lua +++ /dev/null @@ -1,19 +0,0 @@ ---ゼロゼロック -function c85446833.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --atklimit - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(0,LOCATION_MZONE) - e2:SetValue(c85446833.target) - c:RegisterEffect(e2) -end -function c85446833.target(e,c) - return c:IsPosition(POS_FACEUP_ATTACK) and c:GetAttack()==0 -end diff --git a/script/c85463083.lua b/script/c85463083.lua deleted file mode 100644 index 62d8bba9ae..0000000000 --- a/script/c85463083.lua +++ /dev/null @@ -1,89 +0,0 @@ ---ゴーストリック・グール -function c85463083.initial_effect(c) - --summon limit - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_SUMMON) - e1:SetCondition(c85463083.sumcon) - c:RegisterEffect(e1) - --turn set - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(85463083,0)) - e2:SetCategory(CATEGORY_POSITION) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetTarget(c85463083.postg) - e2:SetOperation(c85463083.posop) - c:RegisterEffect(e2) - --atkup - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(85463083,1)) - e3:SetCategory(CATEGORY_ATKCHANGE) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1) - e3:SetCondition(c85463083.atkcon) - e3:SetTarget(c85463083.atktg) - e3:SetOperation(c85463083.atkop) - c:RegisterEffect(e3) -end -function c85463083.filter(c) - return c:IsFaceup() and c:IsSetCard(0x8d) -end -function c85463083.sumcon(e) - return not Duel.IsExistingMatchingCard(c85463083.filter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) -end -function c85463083.postg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsCanTurnSet() and c:GetFlagEffect(85463083)==0 end - c:RegisterFlagEffect(85463083,RESET_EVENT+0x1fc0000+RESET_PHASE+PHASE_END,0,1) - Duel.SetOperationInfo(0,CATEGORY_POSITION,c,1,0,0) -end -function c85463083.posop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - Duel.ChangePosition(c,POS_FACEDOWN_DEFENCE) - end -end -function c85463083.atkcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()==PHASE_MAIN1 -end -function c85463083.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c85463083.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c85463083.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - local g=Duel.SelectTarget(tp,c85463083.filter,tp,LOCATION_MZONE,0,1,1,nil) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetProperty(EFFECT_FLAG_OATH) - e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetTarget(c85463083.ftarget) - e1:SetLabel(g:GetFirst():GetFieldID()) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function c85463083.atkop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - local atk=0 - local g=Duel.GetMatchingGroup(c85463083.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - local bc=g:GetFirst() - while bc do - local catk=bc:GetBaseAttack() - if catk<0 then catk=0 end - atk=atk+catk - bc=g:GetNext() - end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetValue(atk) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,2) - tc:RegisterEffect(e1) - end -end -function c85463083.ftarget(e,c) - return e:GetLabel()~=c:GetFieldID() -end diff --git a/script/c85475641.lua b/script/c85475641.lua deleted file mode 100644 index 580cd13c35..0000000000 --- a/script/c85475641.lua +++ /dev/null @@ -1,44 +0,0 @@ ---インフェルニティ・リベンジャー -function c85475641.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(85475641,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetRange(LOCATION_GRAVE) - e1:SetCondition(c85475641.spcon) - e1:SetTarget(c85475641.sptg) - e1:SetOperation(c85475641.spop) - c:RegisterEffect(e1) -end -function c85475641.filter(c,tp) - return c:IsLocation(LOCATION_GRAVE) and c:IsReason(REASON_BATTLE) and c:GetLevel()>0 - and c:IsControler(tp) and c:GetPreviousControler()==tp and c:GetCode()~=85475641 -end -function c85475641.spcon(e,tp,eg,ep,ev,re,r,rp) - local g=eg:Filter(c85475641.filter,nil,tp) - local tc=g:GetFirst() - if tc then - e:SetLabel(tc:GetLevel()) - return Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)==0 - else return false end -end -function c85475641.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c85475641.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - if Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)~=0 or not c:IsRelateToEffect(e) then return end - Duel.SpecialSummonStep(c,0,tp,tp,false,false,POS_FACEUP) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CHANGE_LEVEL) - e1:SetValue(e:GetLabel()) - e1:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e1) - Duel.SpecialSummonComplete() -end diff --git a/script/c85489096.lua b/script/c85489096.lua deleted file mode 100644 index 237c00ef95..0000000000 --- a/script/c85489096.lua +++ /dev/null @@ -1,26 +0,0 @@ ---ウェポンサモナー -function c85489096.initial_effect(c) - --flip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(85489096,0)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP) - e1:SetTarget(c85489096.target) - e1:SetOperation(c85489096.operation) - c:RegisterEffect(e1) -end -function c85489096.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c85489096.filter(c) - return c:IsSetCard(0x52) and c:IsAbleToHand() -end -function c85489096.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c85489096.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c85505315.lua b/script/c85505315.lua deleted file mode 100644 index 1c9a8165d2..0000000000 --- a/script/c85505315.lua +++ /dev/null @@ -1,54 +0,0 @@ ---インヴェルズ・マディス -function c85505315.initial_effect(c) - --summon success - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(85505315,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetCondition(c85505315.condition) - e1:SetCost(c85505315.cost) - e1:SetTarget(c85505315.target) - e1:SetOperation(c85505315.operation) - c:RegisterEffect(e1) - --tribute check - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_MATERIAL_CHECK) - e2:SetValue(c85505315.valcheck) - e2:SetLabelObject(e1) - c:RegisterEffect(e2) -end -function c85505315.valcheck(e,c) - local g=c:GetMaterial() - if g:IsExists(Card.IsSetCard,1,nil,0x100a) then - e:GetLabelObject():SetLabel(1) - else - e:GetLabelObject():SetLabel(0) - end -end -function c85505315.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_ADVANCE and e:GetLabel()==1 -end -function c85505315.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,1000) end - Duel.PayLPCost(tp,1000) -end -function c85505315.filter(c,e,tp) - return c:IsSetCard(0x100a) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c85505315.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c85505315.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c85505315.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c85505315.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c85505315.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c85507811.lua b/script/c85507811.lua deleted file mode 100644 index b27c4b020a..0000000000 --- a/script/c85507811.lua +++ /dev/null @@ -1,147 +0,0 @@ ---E・HERO グロー・ネオス -function c85507811.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcCode2(c,89943723,17732278,false,false) - --spsummon condition - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(c85507811.splimit) - c:RegisterEffect(e1) - --special summon rule - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_SPSUMMON_PROC) - e2:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e2:SetRange(LOCATION_EXTRA) - e2:SetCondition(c85507811.spcon) - e2:SetOperation(c85507811.spop) - c:RegisterEffect(e2) - --return - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(85507811,0)) - e3:SetCategory(CATEGORY_TODECK) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e3:SetCode(EVENT_PHASE+PHASE_END) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1) - e3:SetCondition(c85507811.retcon1) - e3:SetTarget(c85507811.rettg) - e3:SetOperation(c85507811.retop) - c:RegisterEffect(e3) - local e4=e3:Clone() - e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e4:SetProperty(0) - e4:SetCondition(c85507811.retcon2) - c:RegisterEffect(e4) - --destroy - local e5=Effect.CreateEffect(c) - e5:SetDescription(aux.Stringid(85507811,1)) - e5:SetCategory(CATEGORY_DESTROY) - e5:SetType(EFFECT_TYPE_IGNITION) - e5:SetRange(LOCATION_MZONE) - e5:SetCountLimit(1) - e5:SetProperty(EFFECT_FLAG_CARD_TARGET) - e5:SetCondition(c85507811.descon) - e5:SetTarget(c85507811.destg) - e5:SetOperation(c85507811.desop) - c:RegisterEffect(e5) -end -function c85507811.splimit(e,se,sp,st) - return not e:GetHandler():IsLocation(LOCATION_EXTRA) -end -function c85507811.spfilter(c,code) - return c:IsAbleToDeckOrExtraAsCost() and c:GetCode()==code -end -function c85507811.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ft<-1 then return false end - local g1=Duel.GetMatchingGroup(c85507811.spfilter,tp,LOCATION_ONFIELD,0,nil,89943723) - local g2=Duel.GetMatchingGroup(c85507811.spfilter,tp,LOCATION_ONFIELD,0,nil,17732278) - if g1:GetCount()==0 or g2:GetCount()==0 then return false end - if ft>0 then return true end - local f1=g1:FilterCount(Card.IsLocation,nil,LOCATION_MZONE) - local f2=g2:FilterCount(Card.IsLocation,nil,LOCATION_MZONE) - if ft==-1 then return f1>0 and f2>0 - else return f1>0 or f2>0 end -end -function c85507811.spop(e,tp,eg,ep,ev,re,r,rp,c) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - local g1=Duel.GetMatchingGroup(c85507811.spfilter,tp,LOCATION_ONFIELD,0,nil,89943723) - local g2=Duel.GetMatchingGroup(c85507811.spfilter,tp,LOCATION_ONFIELD,0,nil,17732278) - g1:Merge(g2) - local g=Group.CreateGroup() - local tc=nil - for i=1,2 do - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - if ft<=0 then - tc=g1:FilterSelect(tp,Card.IsLocation,1,1,nil,LOCATION_MZONE):GetFirst() - else - tc=g1:Select(tp,1,1,nil):GetFirst() - end - g:AddCard(tc) - g1:Remove(Card.IsCode,nil,tc:GetCode()) - ft=ft+1 - end - local cg=g:Filter(Card.IsFacedown,nil) - if cg:GetCount()>0 then - Duel.ConfirmCards(1-tp,cg) - end - Duel.SendtoDeck(g,nil,2,REASON_COST) -end -function c85507811.retcon1(e,tp,eg,ep,ev,re,r,rp,chk) - return not e:GetHandler():IsHasEffect(42015635) -end -function c85507811.retcon2(e,tp,eg,ep,ev,re,r,rp,chk) - return e:GetHandler():IsHasEffect(42015635) -end -function c85507811.rettg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToExtra() end - Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0) -end -function c85507811.retop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) or e:GetHandler():IsFacedown() then return end - Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_EFFECT) -end -function c85507811.descon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()==PHASE_MAIN1 -end -function c85507811.filter(c) - return c:IsFaceup() and c:IsDestructable() -end -function c85507811.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and c85507811.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c85507811.filter,tp,0,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c85507811.filter,tp,0,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c85507811.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Destroy(tc,REASON_EFFECT) - local c=e:GetHandler() - if c:IsFacedown() or not c:IsRelateToEffect(e) then return end - if tc:IsType(TYPE_MONSTER) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - c:RegisterEffect(e1) - elseif tc:IsType(TYPE_SPELL) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_DIRECT_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - c:RegisterEffect(e1) - else - Duel.ChangePosition(c,POS_FACEUP_DEFENCE) - end - end -end diff --git a/script/c85519211.lua b/script/c85519211.lua deleted file mode 100644 index 7e02a27698..0000000000 --- a/script/c85519211.lua +++ /dev/null @@ -1,25 +0,0 @@ ---岩盤爆破 -function c85519211.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c85519211.target) - e1:SetOperation(c85519211.activate) - c:RegisterEffect(e1) -end -function c85519211.filter(c) - return c:IsFaceup() and c:IsCode(76321376) -end -function c85519211.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c85519211.filter,tp,LOCATION_MZONE,0,1,nil) end - local g=Duel.GetMatchingGroup(c85519211.filter,tp,LOCATION_MZONE,0,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,g:GetCount()*1000) -end -function c85519211.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c85519211.filter,tp,LOCATION_MZONE,0,nil) - Duel.Damage(1-tp,g:GetCount()*1000,REASON_EFFECT) - Duel.Destroy(g,REASON_EFFECT) -end diff --git a/script/c85520851.lua b/script/c85520851.lua deleted file mode 100644 index 4fa4119bcf..0000000000 --- a/script/c85520851.lua +++ /dev/null @@ -1,36 +0,0 @@ ---超伝導恐獣 -function c85520851.initial_effect(c) - --damage - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(85520851,0)) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c85520851.cost) - e1:SetTarget(c85520851.target) - e1:SetOperation(c85520851.operation) - c:RegisterEffect(e1) -end -function c85520851.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():GetAttackAnnouncedCount()==0 and Duel.CheckReleaseGroup(tp,nil,1,nil) end - local sg=Duel.SelectReleaseGroup(tp,nil,1,1,nil) - Duel.Release(sg,REASON_COST) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_OATH) - e1:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - e:GetHandler():RegisterEffect(e1) -end -function c85520851.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(1000) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,1000) -end -function c85520851.operation(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c85541675.lua b/script/c85541675.lua deleted file mode 100644 index 3ec1fd3ec5..0000000000 --- a/script/c85541675.lua +++ /dev/null @@ -1,56 +0,0 @@ ---カラクリ解体新書 -function c85541675.initial_effect(c) - c:SetCounterLimit(0x12,2) - --activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --add counter - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_CHANGE_POS) - e2:SetRange(LOCATION_SZONE) - e2:SetCondition(c85541675.accon) - e2:SetOperation(c85541675.acop) - c:RegisterEffect(e2) - --draw - local e3=Effect.CreateEffect(c) - e3:SetCategory(CATEGORY_DRAW) - e3:SetDescription(aux.Stringid(85541675,0)) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_SZONE) - e3:SetCost(c85541675.drcost) - e3:SetTarget(c85541675.drtg) - e3:SetOperation(c85541675.drop) - c:RegisterEffect(e3) -end -function c85541675.cfilter(c) - local np=c:GetPosition() - local pp=c:GetPreviousPosition() - return c:IsSetCard(0x11) and ((pp==0x1 and np==0x4) or (pp==0x4 and np==0x1) or (pp==0x8 and np==0x1)) -end -function c85541675.accon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c85541675.cfilter,1,nil) -end -function c85541675.acop(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():AddCounter(0x12,1) -end -function c85541675.drcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - local ct=e:GetHandler():GetCounter(0x12) - e:SetLabel(ct) - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end -function c85541675.drtg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:GetCounter(0x12)>0 and Duel.IsPlayerCanDraw(tp,c:GetCounter(0x12)) end - local ct=e:GetLabel() - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(ct) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,ct) -end -function c85541675.drop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end diff --git a/script/c85545073.lua b/script/c85545073.lua deleted file mode 100644 index 533f8dadb6..0000000000 --- a/script/c85545073.lua +++ /dev/null @@ -1,53 +0,0 @@ ---デストーイ・シザー・ベアー -function c85545073.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcCode2(c,30068120,3841833,true,true) - --equip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(85545073,0)) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_BATTLE_DESTROYING) - e1:SetCondition(c85545073.eqcon) - e1:SetTarget(c85545073.eqtg) - e1:SetOperation(c85545073.eqop) - c:RegisterEffect(e1) -end -function c85545073.eqcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=c:GetBattleTarget() - if not c:IsRelateToBattle() or c:IsFacedown() then return false end - e:SetLabelObject(tc) - return tc:IsLocation(LOCATION_GRAVE) and tc:IsType(TYPE_MONSTER) and tc:IsReason(REASON_BATTLE) -end -function c85545073.eqtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local tc=e:GetLabelObject() - Duel.SetTargetCard(tc) - Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,tc,1,0,0) -end -function c85545073.eqop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and c:IsFaceup() and tc:IsRelateToEffect(e) then - if not Duel.Equip(tp,tc,c,false) then return end - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_COPY_INHERIT+EFFECT_FLAG_OWNER_RELATE) - e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(c85545073.eqlimit) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_OWNER_RELATE) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetReset(RESET_EVENT+0x1fe0000) - e2:SetValue(1000) - tc:RegisterEffect(e2) - end -end -function c85545073.eqlimit(e,c) - return e:GetOwner()==c -end diff --git a/script/c85562745.lua b/script/c85562745.lua deleted file mode 100644 index 134b2ae11b..0000000000 --- a/script/c85562745.lua +++ /dev/null @@ -1,34 +0,0 @@ ---悪夢の拷問部屋 -function c85562745.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --damage - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(85562745,0)) - e2:SetCategory(CATEGORY_DAMAGE) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetCode(EVENT_DAMAGE) - e2:SetRange(LOCATION_SZONE) - e2:SetCondition(c85562745.con) - e2:SetTarget(c85562745.tg) - e2:SetOperation(c85562745.op) - c:RegisterEffect(e2) -end -function c85562745.con(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp and bit.band(r,REASON_BATTLE)==0 and re and re:GetHandler():GetCode()~=85562745 -end -function c85562745.tg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsRelateToEffect(e) end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(300) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,300) -end -function c85562745.op(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c8559793.lua b/script/c8559793.lua deleted file mode 100644 index 56841fe73e..0000000000 --- a/script/c8559793.lua +++ /dev/null @@ -1,40 +0,0 @@ ---RR-ネスト -function c8559793.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --search - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_SZONE) - e2:SetCountLimit(1,8559793) - e2:SetCondition(c8559793.condition) - e2:SetTarget(c8559793.target) - e2:SetOperation(c8559793.operation) - c:RegisterEffect(e2) -end -function c8559793.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0xba) -end -function c8559793.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c8559793.cfilter,tp,LOCATION_MZONE,0,2,nil) -end -function c8559793.filter(c) - return c:IsSetCard(0xba) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() and not c:IsHasEffect(EFFECT_NECRO_VALLEY) -end -function c8559793.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c8559793.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE) -end -function c8559793.operation(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c8559793.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c85602018.lua b/script/c85602018.lua deleted file mode 100644 index be7f5a4d26..0000000000 --- a/script/c85602018.lua +++ /dev/null @@ -1,74 +0,0 @@ ---遺言状 -function c85602018.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetOperation(c85602018.operation) - c:RegisterEffect(e1) -end -function c85602018.operation(e,tp,eg,ep,ev,re,r,rp) - --spsummon - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCondition(c85602018.check) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_SUMMON_SUCCESS) - e2:SetCondition(c85602018.spcon) - e2:SetOperation(c85602018.spop) - e2:SetLabelObject(e1) - e2:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e2,tp) - local e3=e2:Clone() - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - e3:SetCondition(c85602018.spcon2) - Duel.RegisterEffect(e3,tp) - local e4=e2:Clone() - e4:SetCode(EVENT_CHAIN_END) - Duel.RegisterEffect(e4,tp) - local e5=e2:Clone() - e5:SetCode(EVENT_ATTACK_ANNOUNCE) - Duel.RegisterEffect(e5,tp) - local e6=e2:Clone() - e6:SetCode(EVENT_DAMAGE_STEP_END) - Duel.RegisterEffect(e6,tp) - local e7=e2:Clone() - e7:SetCode(EVENT_PHASE+PHASE_END) - Duel.RegisterEffect(e7,tp) -end -function c85602018.cfilter(c,tp) - return c:IsControler(tp) and c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_MZONE) -end -function c85602018.check(e,tp,eg,ep,ev,re,r,rp) - if e:GetLabel()==2 then return end - if eg:IsExists(c85602018.cfilter,1,nil,tp) then - e:SetLabel(1) - end -end -function c85602018.spfilter(c,e,tp) - return c:IsAttackBelow(1500) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c85602018.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetLabelObject():GetLabel()==1 -end -function c85602018.spcon2(e,tp,eg,ep,ev,re,r,rp) - return e:GetLabelObject():GetLabel()==1 and Duel.GetCurrentChain()==0 -end -function c85602018.spop(e,tp,eg,ep,ev,re,r,rp) - if e:GetLabelObject():GetLabel()~=1 then return end - if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c85602018.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) - and Duel.SelectYesNo(tp,aux.Stringid(85602018,0)) then - e:GetLabelObject():SetLabel(2) - Duel.Hint(HINT_CARD,0,85602018) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c85602018.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - else - e:GetLabelObject():SetLabel(0) - end -end diff --git a/script/c85605684.lua b/script/c85605684.lua deleted file mode 100644 index 60fdce0d1c..0000000000 --- a/script/c85605684.lua +++ /dev/null @@ -1,40 +0,0 @@ ---バーサーク・デッド・ドラゴン -function c85605684.initial_effect(c) - c:EnableReviveLimit() - --spsummon limit - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(aux.FALSE) - c:RegisterEffect(e1) - --attack all - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_ATTACK_ALL) - e2:SetValue(1) - c:RegisterEffect(e2) - --cost - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(85605684,0)) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e3:SetRange(LOCATION_MZONE) - e3:SetCode(EVENT_PHASE+PHASE_END) - e3:SetCountLimit(1) - e3:SetCondition(c85605684.atkcon) - e3:SetOperation(c85605684.atkop) - c:RegisterEffect(e3) -end -function c85605684.atkcon(e,tp,eg,ep,ev,re,r,rp) - return tp==Duel.GetTurnPlayer() -end -function c85605684.atkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_COPY_INHERIT) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(-500) - e1:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e1) -end diff --git a/script/c8561192.lua b/script/c8561192.lua deleted file mode 100644 index ef37a6d118..0000000000 --- a/script/c8561192.lua +++ /dev/null @@ -1,18 +0,0 @@ ---神樹の守護獣-牙王 -function c8561192.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1) - c:EnableReviveLimit() - --immune - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) - e1:SetCondition(c8561192.tgcon) - e1:SetValue(aux.tgoval) - c:RegisterEffect(e1) -end -function c8561192.tgcon(e) - return Duel.GetTurnPlayer()~=e:GetHandlerPlayer() or Duel.GetCurrentPhase()~=PHASE_MAIN2 -end diff --git a/script/c85646474.lua b/script/c85646474.lua deleted file mode 100644 index 18681f5261..0000000000 --- a/script/c85646474.lua +++ /dev/null @@ -1,35 +0,0 @@ ---墓守の使徒 -function c85646474.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(85646474,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetCondition(c85646474.condition) - e1:SetTarget(c85646474.target) - e1:SetOperation(c85646474.operation) - c:RegisterEffect(e1) -end -function c85646474.condition(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsLocation(LOCATION_GRAVE) and c:IsReason(REASON_BATTLE) - and c:GetPreviousControler()==tp and c==Duel.GetAttackTarget() and Duel.GetAttacker():IsControler(1-tp) -end -function c85646474.filter(c,e,tp) - return c:IsSetCard(0x2e) and not c:IsCode(85646474) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN) -end -function c85646474.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c85646474.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c85646474.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c85646474.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEDOWN_DEFENCE) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c85668449.lua b/script/c85668449.lua deleted file mode 100644 index 3e98a0d8bd..0000000000 --- a/script/c85668449.lua +++ /dev/null @@ -1,64 +0,0 @@ ---脳開発研究所 -function c85668449.initial_effect(c) - c:EnableCounterPermit(0x3004) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --extra summon - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(LOCATION_HAND+LOCATION_MZONE,LOCATION_HAND+LOCATION_MZONE) - e2:SetCode(EFFECT_EXTRA_SUMMON_COUNT) - e2:SetTarget(aux.TargetBoolFunction(Card.IsRace,RACE_PSYCHO)) - e2:SetValue(c85668449.esop) - c:RegisterEffect(e2) - --lpcost replace - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(85668449,0)) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e3:SetRange(LOCATION_SZONE) - e3:SetCode(EFFECT_LPCOST_REPLACE) - e3:SetCondition(c85668449.lrcon) - e3:SetOperation(c85668449.lrop) - c:RegisterEffect(e3) - --damage - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e4:SetCode(EVENT_LEAVE_FIELD_P) - e4:SetOperation(c85668449.damp) - c:RegisterEffect(e4) - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e5:SetCode(EVENT_LEAVE_FIELD) - e5:SetOperation(c85668449.damop) - e5:SetLabelObject(e4) - c:RegisterEffect(e5) -end -function c85668449.esop(e,c) - e:GetHandler():AddCounter(0x3004,1) -end -function c85668449.lrcon(e,tp,eg,ep,ev,re,r,rp) - if tp~=ep then return false end - local lp=Duel.GetLP(ep) - if lp<=ev then return false end - if not re then return false end - local rc=re:GetHandler() - return rc:IsLocation(LOCATION_MZONE) and rc:IsRace(RACE_PSYCHO) -end -function c85668449.lrop(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():AddCounter(0x3004,1) -end -function c85668449.damp(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local ct=c:GetCounter(0x3004) - e:SetLabel(ct) -end -function c85668449.damop(e,tp,eg,ep,ev,re,r,rp) - local ct=e:GetLabelObject():GetLabel() - if ct>0 then - Duel.Damage(tp,ct*1000,REASON_EFFECT) - end -end diff --git a/script/c85682655.lua b/script/c85682655.lua deleted file mode 100644 index 114d4338dc..0000000000 --- a/script/c85682655.lua +++ /dev/null @@ -1,27 +0,0 @@ ---ゼンマイジャグラー -function c85682655.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(85682655,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_BATTLED) - e1:SetProperty(EFFECT_FLAG_NO_TURN_RESET) - e1:SetCountLimit(1) - e1:SetTarget(c85682655.target) - e1:SetOperation(c85682655.operation) - c:RegisterEffect(e1) -end -function c85682655.target(e,tp,eg,ep,ev,re,r,rp,chk) - local tc=Duel.GetAttacker() - if tc==e:GetHandler() then tc=Duel.GetAttackTarget() end - if chk==0 then return tc and not tc:IsStatus(STATUS_BATTLE_DESTROYED) and tc:IsDestructable() end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,tc,1,0,0) -end -function c85682655.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetAttacker() - if tc==e:GetHandler() then tc=Duel.GetAttackTarget() end - if tc:IsRelateToBattle() then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c85684223.lua b/script/c85684223.lua deleted file mode 100644 index 326708bab5..0000000000 --- a/script/c85684223.lua +++ /dev/null @@ -1,97 +0,0 @@ ---ナイトメアを駆る死霊 -function c85684223.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcCode2(c,23205979,59290628,true,true) - --battle indestructable - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e1:SetValue(1) - c:RegisterEffect(e1) - --handes - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(85684223,0)) - e2:SetCategory(CATEGORY_HANDES) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_BATTLE_DAMAGE) - e2:SetCondition(c85684223.condition) - e2:SetTarget(c85684223.target) - e2:SetOperation(c85684223.operation) - c:RegisterEffect(e2) - --self des - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e3:SetRange(LOCATION_MZONE) - e3:SetCode(EFFECT_SELF_DESTROY) - e3:SetCondition(c85684223.sdcon) - c:RegisterEffect(e3) - --be target - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e4:SetCode(EVENT_BECOME_TARGET) - e4:SetOperation(c85684223.desop1) - c:RegisterEffect(e4) - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e5:SetRange(LOCATION_MZONE) - e5:SetCode(EVENT_CHAIN_SOLVED) - e5:SetOperation(c85684223.desop2) - e5:SetLabelObject(e4) - c:RegisterEffect(e5) - local e6=Effect.CreateEffect(c) - e6:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e6:SetRange(LOCATION_MZONE) - e6:SetCode(EVENT_BATTLED) - e6:SetOperation(c85684223.desop3) - e6:SetLabelObject(e4) - c:RegisterEffect(e6) - --direct attack - local e7=Effect.CreateEffect(c) - e7:SetType(EFFECT_TYPE_SINGLE) - e7:SetCode(EFFECT_DIRECT_ATTACK) - c:RegisterEffect(e7) -end -function c85684223.condition(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp and Duel.GetAttackTarget()==nil -end -function c85684223.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_HANDES,0,0,1-tp,1) -end -function c85684223.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetFieldGroup(ep,LOCATION_HAND,0,nil) - if g:GetCount()==0 then return end - local sg=g:RandomSelect(1-tp,1) - Duel.SendtoGrave(sg,REASON_DISCARD+REASON_EFFECT) -end -function c85684223.sdcon(e) - return e:GetHandler():GetOwnerTargetCount()>0 -end -function c85684223.desop1(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsLocation(LOCATION_MZONE) and c:IsFaceup() then - e:SetLabelObject(re) - e:SetLabel(0) - end -end -function c85684223.desop2(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if re==e:GetLabelObject():GetLabelObject() and c:IsRelateToEffect(re) then - if Duel.GetCurrentPhase()==PHASE_DAMAGE and not Duel.IsDamageCalculated() then - e:GetLabelObject():SetLabel(1) - else - if not c:IsDisabled() then Duel.Destroy(c,REASON_EFFECT) end - end - end -end -function c85684223.desop3(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local des=e:GetLabelObject():GetLabel() - e:GetLabelObject():SetLabel(0) - if des==1 and not c:IsDisabled() then - Duel.Destroy(c,REASON_EFFECT) - end -end diff --git a/script/c85709845.lua b/script/c85709845.lua deleted file mode 100644 index a3d90c6b2c..0000000000 --- a/script/c85709845.lua +++ /dev/null @@ -1,48 +0,0 @@ ---ガムシャラ -function c85709845.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_POSITION) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_BE_BATTLE_TARGET) - e1:SetTarget(c85709845.target) - e1:SetOperation(c85709845.activate) - c:RegisterEffect(e1) -end -function c85709845.target(e,tp,eg,ep,ev,re,r,rp,chk) - local d=Duel.GetAttackTarget() - if chk==0 then return d:IsDefencePos() and d:IsControler(tp) end - Duel.SetTargetCard(d) -end -function c85709845.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsDefencePos() then - Duel.ChangePosition(tc,POS_FACEUP_ATTACK) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetDescription(aux.Stringid(85709845,0)) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetCondition(c85709845.damcon) - e1:SetTarget(c85709845.damtg) - e1:SetOperation(c85709845.damop) - e1:SetReset(RESET_PHASE+PHASE_DAMAGE) - Duel.RegisterEffect(e1,tp) - end -end -function c85709845.damcon(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetAttacker() - return eg:IsContains(tc) and tc:IsLocation(LOCATION_GRAVE) and tc:IsReason(REASON_BATTLE) -end -function c85709845.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local atk=Duel.GetAttacker():GetBaseAttack() - if atk<0 then atk=0 end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(atk) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,atk) -end -function c85709845.damop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c85718645.lua b/script/c85718645.lua deleted file mode 100644 index 88e52e721c..0000000000 --- a/script/c85718645.lua +++ /dev/null @@ -1,46 +0,0 @@ ---闇帝ディルグ -function c85718645.initial_effect(c) - --remove - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(85718645,0)) - e1:SetCategory(CATEGORY_REMOVE+CATEGORY_DECKDES) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c85718645.target) - e1:SetOperation(c85718645.operation) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e2) - --cannot attack - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e3:SetCode(EVENT_SUMMON_SUCCESS) - e3:SetOperation(c85718645.disatt) - c:RegisterEffect(e3) - local e4=e3:Clone() - e4:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e4) -end -function c85718645.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(1-tp) and chkc:IsAbleToRemove() end - if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,2,nil) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,0) -end -function c85718645.operation(e,tp,eg,ep,ev,re,r,rp) - local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local sg=tg:Filter(Card.IsRelateToEffect,nil,e) - local count=Duel.Remove(sg,POS_FACEUP,REASON_EFFECT) - if count>0 then Duel.DiscardDeck(1-tp,count,REASON_EFFECT) end -end -function c85718645.disatt(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - c:RegisterEffect(e1) -end diff --git a/script/c85742772.lua b/script/c85742772.lua deleted file mode 100644 index d6088de4f2..0000000000 --- a/script/c85742772.lua +++ /dev/null @@ -1,19 +0,0 @@ ---グラヴィティ・バインド-超重力の網- -function c85742772.initial_effect(c) - --activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --cannot attack - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_CANNOT_ATTACK) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e2:SetTarget(c85742772.atktarget) - c:RegisterEffect(e2) -end -function c85742772.atktarget(e,c) - return c:GetLevel()>=4 -end diff --git a/script/c85754829.lua b/script/c85754829.lua deleted file mode 100644 index 7908a72a7f..0000000000 --- a/script/c85754829.lua +++ /dev/null @@ -1,31 +0,0 @@ ---ワーム・グルス -function c85754829.initial_effect(c) - --add counter - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_CHANGE_POS) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c85754829.accon) - e1:SetOperation(c85754829.acop) - c:RegisterEffect(e1) - --atkup - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetValue(c85754829.atkval) - c:RegisterEffect(e2) -end -function c85754829.atkval(e,c) - return c:GetCounter(0xf)*300 -end -function c85754829.cfilter(c) - return bit.band(c:GetPreviousPosition(),POS_FACEDOWN)~=0 and bit.band(c:GetPosition(),POS_FACEUP)~=0 -end -function c85754829.accon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c85754829.cfilter,1,e:GetHandler()) -end -function c85754829.acop(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():AddCounter(0xf,1) -end diff --git a/script/c85771019.lua b/script/c85771019.lua deleted file mode 100644 index a31f421f57..0000000000 --- a/script/c85771019.lua +++ /dev/null @@ -1,81 +0,0 @@ ---堕天使アスモディウス -function c85771019.initial_effect(c) - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_SINGLE_RANGE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetRange(LOCATION_DECK+LOCATION_GRAVE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(aux.FALSE) - c:RegisterEffect(e1) - --to grave - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(85771019,0)) - e2:SetCategory(CATEGORY_TOGRAVE) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetCountLimit(1) - e2:SetRange(LOCATION_MZONE) - e2:SetTarget(c85771019.tgtg) - e2:SetOperation(c85771019.tgop) - c:RegisterEffect(e2) - --token - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(85771019,1)) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e3:SetCode(EVENT_TO_GRAVE) - e3:SetCondition(c85771019.spcon) - e3:SetTarget(c85771019.sptg) - e3:SetOperation(c85771019.spop) - c:RegisterEffect(e3) -end -function c85771019.tgfilter(c) - return c:IsType(TYPE_MONSTER) and c:IsRace(RACE_FAIRY) and c:IsAbleToGrave() -end -function c85771019.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c85771019.tgfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) -end -function c85771019.tgop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c85771019.tgfilter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoGrave(g,REASON_EFFECT) - end -end -function c85771019.spcon(e,tp,eg,ep,ev,re,r,rp) - return bit.band(r,REASON_DESTROY)~=0 and e:GetHandler():GetPreviousControler()==tp - and e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) -end -function c85771019.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,2,0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,0,0) -end -function c85771019.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 then return end - if Duel.IsPlayerCanSpecialSummonMonster(tp,85771020,0,0x4011,1800,1300,5,RACE_FAIRY,ATTRIBUTE_DARK) then - local token=Duel.CreateToken(tp,85771020) - Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetValue(1) - e1:SetReset(RESET_EVENT+0x1fe0000) - token:RegisterEffect(e1) - end - if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsPlayerCanSpecialSummonMonster(tp,85771021,0,0x4011,1200,1200,3,RACE_FAIRY,ATTRIBUTE_DARK) then - local token=Duel.CreateToken(tp,85771021) - Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetValue(1) - e1:SetReset(RESET_EVENT+0x1fe0000) - token:RegisterEffect(e1) - end - Duel.SpecialSummonComplete() -end diff --git a/script/c85775486.lua b/script/c85775486.lua deleted file mode 100644 index d9639d9459..0000000000 --- a/script/c85775486.lua +++ /dev/null @@ -1,39 +0,0 @@ ---再機動 -function c85775486.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c85775486.cost) - e1:SetTarget(c85775486.target) - e1:SetOperation(c85775486.activate) - c:RegisterEffect(e1) -end -function c85775486.cfilter(c) - return c:IsSetCard(0x13) and c:IsType(TYPE_MONSTER) and c:IsAbleToDeckAsCost() -end -function c85775486.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c85775486.cfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectMatchingCard(tp,c85775486.cfilter,tp,LOCATION_HAND,0,1,1,nil) - Duel.SendtoDeck(g,nil,2,REASON_COST) -end -function c85775486.filter(c) - return c:IsSetCard(0x13) and c:IsAbleToHand() -end -function c85775486.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c85775486.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c85775486.filter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c85775486.filter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c85775486.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end diff --git a/script/c85800949.lua b/script/c85800949.lua deleted file mode 100644 index 522b036ada..0000000000 --- a/script/c85800949.lua +++ /dev/null @@ -1,68 +0,0 @@ ---伝説の騎士 クリティウス -function c85800949.initial_effect(c) - c:EnableReviveLimit() - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - c:RegisterEffect(e1) - --remove - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(85800949,0)) - e2:SetCategory(CATEGORY_REMOVE) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e2:SetTarget(c85800949.rmtg) - e2:SetOperation(c85800949.rmop) - c:RegisterEffect(e2) - --set - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(85800949,1)) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_BE_BATTLE_TARGET) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetTarget(c85800949.settg) - e3:SetOperation(c85800949.setop) - c:RegisterEffect(e3) -end -function c85800949.rmfilter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToRemove() and c:IsFaceup() -end -function c85800949.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and c85800949.rmfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c85800949.rmfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,c85800949.rmfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) -end -function c85800949.rmop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsType(TYPE_SPELL+TYPE_TRAP) then - Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) - end -end -function c85800949.setfilter(c) - return c:IsType(TYPE_TRAP) and c:IsSSetable() -end -function c85800949.settg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c85800949.setfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c85800949.setfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) - local g=Duel.SelectTarget(tp,c85800949.setfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g,1,0,0) -end -function c85800949.setop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsSSetable() then - Duel.SSet(tp,tc) - Duel.ConfirmCards(1-tp,tc) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN) - e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - end -end diff --git a/script/c85802526.lua b/script/c85802526.lua deleted file mode 100644 index 82976b7b7e..0000000000 --- a/script/c85802526.lua +++ /dev/null @@ -1,32 +0,0 @@ ---プリンセス人魚 -function c85802526.initial_effect(c) - --recover - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(85802526,0)) - e1:SetCategory(CATEGORY_RECOVER) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCondition(c85802526.condition) - e1:SetTarget(c85802526.target) - e1:SetOperation(c85802526.operation) - c:RegisterEffect(e1) -end -function c85802526.condition(e,tp,eg,ep,ev,re,r,rp) - return tp==Duel.GetTurnPlayer() -end -function c85802526.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(800) - Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,800) -end -function c85802526.operation(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - Duel.Recover(p,d,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/script/c8581705.lua b/script/c8581705.lua deleted file mode 100644 index 9cf7169d7f..0000000000 --- a/script/c8581705.lua +++ /dev/null @@ -1,75 +0,0 @@ ---インフェルノクインデーモン -function c8581705.initial_effect(c) - --maintain - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCondition(c8581705.mtcon) - e1:SetOperation(c8581705.mtop) - c:RegisterEffect(e1) - --disable and destroy - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_CHAIN_SOLVING) - e2:SetRange(LOCATION_MZONE) - e2:SetOperation(c8581705.disop) - c:RegisterEffect(e2) - --atkup - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(8581705,0)) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e3:SetCode(EVENT_PHASE+PHASE_STANDBY) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetCountLimit(1) - e3:SetRange(LOCATION_MZONE) - e3:SetTarget(c8581705.atktg) - e3:SetOperation(c8581705.atkop) - c:RegisterEffect(e3) -end -function c8581705.mtcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c8581705.mtop(e,tp,eg,ep,ev,re,r,rp) - if Duel.CheckLPCost(tp,500) then - Duel.PayLPCost(tp,500) - else - Duel.Destroy(e:GetHandler(),REASON_RULE) - end -end -function c8581705.disop(e,tp,eg,ep,ev,re,r,rp) - if ep==tp then return end - if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end - local tg=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) - if not tg or not tg:IsContains(e:GetHandler()) or not Duel.IsChainDisablable(ev) then return false end - local rc=re:GetHandler() - local dc=Duel.TossDice(tp,1) - if dc~=2 and dc~=5 then return end - Duel.NegateEffect(ev) - if rc:IsRelateToEffect(re) then - Duel.Destroy(rc,REASON_EFFECT) - end -end -function c8581705.filter(c) - return c:IsFaceup() and c:IsSetCard(0x45) -end -function c8581705.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c8581705.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c8581705.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c8581705.filter,tp,LOCATION_MZONE,0,1,1,nil) -end -function c8581705.atkop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(1000) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - end -end diff --git a/script/c85827713.lua b/script/c85827713.lua deleted file mode 100644 index 9dda8d3548..0000000000 --- a/script/c85827713.lua +++ /dev/null @@ -1,45 +0,0 @@ ---ゴーストリック・ナイト -function c85827713.initial_effect(c) - --activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --cannot remove - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_CANNOT_FLIP_SUMMON) - e2:SetRange(LOCATION_SZONE) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetTargetRange(0,1) - e2:SetCondition(c85827713.sumcon) - c:RegisterEffect(e2) - -- - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(85827713,0)) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e3:SetCode(EVENT_TO_GRAVE) - e3:SetCondition(c85827713.limcon) - e3:SetOperation(c85827713.limop) - c:RegisterEffect(e3) -end -function c85827713.sfilter(c) - return c:IsFaceup() and c:IsSetCard(0x8d) -end -function c85827713.sumcon(e) - return Duel.IsExistingMatchingCard(c85827713.sfilter,0,LOCATION_MZONE,LOCATION_MZONE,1,nil) -end -function c85827713.limcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return rp~=tp and c:IsReason(REASON_DESTROY) and c:GetPreviousControler()==tp -end -function c85827713.limop(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE) - e1:SetRange(LOCATION_SZONE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetTargetRange(0,1) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) -end diff --git a/script/c85839825.lua b/script/c85839825.lua deleted file mode 100644 index 0b9c941d18..0000000000 --- a/script/c85839825.lua +++ /dev/null @@ -1,33 +0,0 @@ ---エクシーズエナジー -function c85839825.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c85839825.cost) - e1:SetTarget(c85839825.target) - e1:SetOperation(c85839825.activate) - c:RegisterEffect(e1) -end -function c85839825.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckRemoveOverlayCard(tp,1,0,1,REASON_COST) end - Duel.RemoveOverlayCard(tp,1,0,1,1,REASON_COST) -end -function c85839825.filter(c) - return c:IsFaceup() and c:IsDestructable() -end -function c85839825.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c85839825.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c85839825.filter,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c85839825.filter,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c85839825.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c85852291.lua b/script/c85852291.lua deleted file mode 100644 index 2340336d94..0000000000 --- a/script/c85852291.lua +++ /dev/null @@ -1,28 +0,0 @@ ---打ち出の小槌 -function c85852291.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c85852291.target) - e1:SetOperation(c85852291.activate) - c:RegisterEffect(e1) -end -function c85852291.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp) - and Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.SetTargetPlayer(tp) - Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_HAND) -end -function c85852291.activate(e,tp,eg,ep,ev,re,r,rp) - local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) - Duel.Hint(HINT_SELECTMSG,p,HINTMSG_TODECK) - local g=Duel.SelectMatchingCard(p,Card.IsAbleToDeck,p,LOCATION_HAND,0,1,63,nil) - if g:GetCount()==0 then return end - Duel.SendtoDeck(g,nil,2,REASON_EFFECT) - Duel.ShuffleDeck(p) - Duel.BreakEffect() - Duel.Draw(p,g:GetCount(),REASON_EFFECT) -end diff --git a/script/c85854214.lua b/script/c85854214.lua deleted file mode 100644 index 370cbfc89d..0000000000 --- a/script/c85854214.lua +++ /dev/null @@ -1,31 +0,0 @@ ---ヒーローズルール2 -function c85854214.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_CHAINING) - e1:SetCondition(c85854214.condition) - e1:SetTarget(c85854214.target) - e1:SetOperation(c85854214.activate) - c:RegisterEffect(e1) -end -function c85854214.condition(e,tp,eg,ep,ev,re,r,rp) - if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end - local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) - return g and g:IsExists(Card.IsLocation,1,nil,LOCATION_GRAVE) - and Duel.IsChainNegatable(ev) and (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE)) -end -function c85854214.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) - end -end -function c85854214.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateActivation(ev) - if re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(eg,REASON_EFFECT) - end -end diff --git a/script/c85876417.lua b/script/c85876417.lua deleted file mode 100644 index 473682f420..0000000000 --- a/script/c85876417.lua +++ /dev/null @@ -1,35 +0,0 @@ ---A・O・J サウザンド・アームズ -function c85876417.initial_effect(c) - --attack all - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_ATTACK_ALL) - e1:SetValue(c85876417.atkfilter) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(85876417,0)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_PRE_DAMAGE_CALCULATE) - e2:SetTarget(c85876417.destg) - e2:SetOperation(c85876417.desop) - c:RegisterEffect(e2) -end -function c85876417.atkfilter(e,c) - return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_LIGHT) -end -function c85876417.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local c=e:GetHandler() - local a=Duel.GetAttacker() - if a==c then a=Duel.GetAttackTarget() end - return a and a:IsAttribute(0x6f) - end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0) -end -function c85876417.desop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToBattle() then - Duel.Destroy(e:GetHandler(),REASON_EFFECT) - end -end diff --git a/script/c85893201.lua b/script/c85893201.lua deleted file mode 100644 index c5700ab2ba..0000000000 --- a/script/c85893201.lua +++ /dev/null @@ -1,45 +0,0 @@ ---連鎖誘爆 -function c85893201.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(85893201,0)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetRange(LOCATION_SZONE) - e2:SetCode(EVENT_DESTROYED) - e2:SetCountLimit(1) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) - e2:SetCondition(c85893201.descon) - e2:SetTarget(c85893201.destg) - e2:SetOperation(c85893201.desop) - c:RegisterEffect(e2) -end -function c85893201.cfilter(c,tp) - return c:IsPreviousLocation(LOCATION_MZONE) and c:IsReason(REASON_EFFECT) and c:GetPreviousControler()==tp -end -function c85893201.descon(e,tp,eg,ep,ev,re,r,rp) - return rp~=tp and eg:IsExists(c85893201.cfilter,1,nil,1-tp) -end -function c85893201.filter(c) - return c:IsDestructable() -end -function c85893201.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and c85893201.filter(chkc) end - if chk==0 then return e:GetHandler():IsRelateToEffect(e) - and Duel.IsExistingTarget(c85893201.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c85893201.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c85893201.desop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c85909450.lua b/script/c85909450.lua deleted file mode 100644 index 280c31c0bb..0000000000 --- a/script/c85909450.lua +++ /dev/null @@ -1,55 +0,0 @@ ---ハーピィズペット幻竜 -function c85909450.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_WIND),4,3) - c:EnableReviveLimit() - --direct attack - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DIRECT_ATTACK) - e1:SetCondition(c85909450.effcon) - c:RegisterEffect(e1) - --cannot be target - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET) - e2:SetRange(LOCATION_MZONE) - e2:SetTargetRange(0,LOCATION_MZONE) - e2:SetCondition(c85909450.effcon) - e2:SetValue(c85909450.atlimit) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EFFECT_CANNOT_SELECT_EFFECT_TARGET) - e3:SetProperty(EFFECT_FLAG_SET_AVAILABLE) - e3:SetTargetRange(0,0xff) - e3:SetValue(c85909450.tglimit) - c:RegisterEffect(e3) - --remove material - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(85909450,0)) - e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e4:SetCode(EVENT_PHASE+PHASE_END) - e4:SetRange(LOCATION_MZONE) - e4:SetCountLimit(1) - e4:SetCondition(c85909450.rmcon) - e4:SetOperation(c85909450.rmop) - c:RegisterEffect(e4) -end -function c85909450.effcon(e) - return e:GetHandler():GetOverlayCount()>0 -end -function c85909450.atlimit(e,c) - return c:IsFaceup() and c:IsSetCard(0x64) -end -function c85909450.tglimit(e,re,c) - return c:IsFaceup() and c:IsSetCard(0x64) and c:IsType(TYPE_MONSTER) -end -function c85909450.rmcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c85909450.rmop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:GetOverlayCount()>0 then - c:RemoveOverlayCard(tp,1,1,REASON_EFFECT) - end -end diff --git a/script/c8594079.lua b/script/c8594079.lua deleted file mode 100644 index 4920e8ff41..0000000000 --- a/script/c8594079.lua +++ /dev/null @@ -1,16 +0,0 @@ ---ジュラック・ブラキス -function c8594079.initial_effect(c) - --battle indestructable - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e2:SetCondition(c8594079.indcon) - e2:SetValue(1) - c:RegisterEffect(e2) -end -function c8594079.filter(c) - return c:IsFaceup() and c:IsSetCard(0x22) -end -function c8594079.indcon(e) - return Duel.IsExistingMatchingCard(c8594079.filter,0,LOCATION_MZONE,LOCATION_MZONE,1,e:GetHandler()) -end diff --git a/script/c85967160.lua b/script/c85967160.lua deleted file mode 100644 index 6179467898..0000000000 --- a/script/c85967160.lua +++ /dev/null @@ -1,47 +0,0 @@ ---アロマージ-ベルガモット -function c85967160.initial_effect(c) - --pierce - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_PIERCE) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetCondition(c85967160.pccon) - e1:SetTarget(aux.TargetBoolFunction(Card.IsRace,RACE_PLANT)) - c:RegisterEffect(e1) - --atk & def - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_RECOVER) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCondition(c85967160.adcon) - e2:SetTarget(c85967160.adtg) - e2:SetOperation(c85967160.adop) - c:RegisterEffect(e2) -end -function c85967160.pccon(e) - local tp=e:GetHandlerPlayer() - return Duel.GetLP(tp)>Duel.GetLP(1-tp) -end -function c85967160.adcon(e,tp,eg,ep,ev,re,r,rp) - return ep==tp -end -function c85967160.adtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return ep==tp and e:GetHandler():IsRelateToEffect(e) end -end -function c85967160.adop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(1000) - e1:SetReset(RESET_EVENT+0x1ff0000+RESET_PHASE+RESET_END+RESET_OPPO_TURN) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_UPDATE_DEFENCE) - c:RegisterEffect(e2) - end -end diff --git a/script/c86016245.lua b/script/c86016245.lua deleted file mode 100644 index cf770da4e0..0000000000 --- a/script/c86016245.lua +++ /dev/null @@ -1,38 +0,0 @@ ---弱者の意地 -function c86016245.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --draw - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(86016245,0)) - e2:SetCategory(CATEGORY_DRAW) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetCode(EVENT_BATTLE_DESTROYED) - e2:SetRange(LOCATION_SZONE) - e2:SetCondition(c86016245.drcon) - e2:SetTarget(c86016245.drtg) - e2:SetOperation(c86016245.drop) - c:RegisterEffect(e2) -end -function c86016245.drcon(e,tp,eg,ep,ev,re,r,rp) - local tc=eg:GetFirst() - local bc=tc:GetBattleTarget() - return Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)==0 and eg:GetCount()==1 - and tc:IsLocation(LOCATION_GRAVE) and tc:IsReason(REASON_BATTLE) - and bc:IsRelateToBattle() and bc:IsControler(tp) and bc:IsLevelBelow(2) -end -function c86016245.drtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(2) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2) -end -function c86016245.drop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) or Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)~=0 then return end - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end diff --git a/script/c86039057.lua b/script/c86039057.lua deleted file mode 100644 index 511d2f0077..0000000000 --- a/script/c86039057.lua +++ /dev/null @@ -1,30 +0,0 @@ ---タスケナイト -function c86039057.initial_effect(c) - --end battle phase - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(86039057,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetRange(LOCATION_GRAVE) - e1:SetCountLimit(1,86039057+EFFECT_COUNT_CODE_DUEL) - e1:SetCondition(c86039057.condition) - e1:SetTarget(c86039057.target) - e1:SetOperation(c86039057.operation) - c:RegisterEffect(e1) -end -function c86039057.condition(e,tp,eg,ep,ev,re,r,rp) - local at=Duel.GetAttacker() - return at:GetControler()~=tp and Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)==0 -end -function c86039057.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c86039057.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then - Duel.SkipPhase(1-tp,PHASE_BATTLE,RESET_PHASE+PHASE_BATTLE,1) - end -end diff --git a/script/c86049351.lua b/script/c86049351.lua deleted file mode 100644 index 3d73df45be..0000000000 --- a/script/c86049351.lua +++ /dev/null @@ -1,57 +0,0 @@ ---ラスト・カウンター -function c86049351.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetCondition(c86049351.condition) - e1:SetTarget(c86049351.target) - e1:SetOperation(c86049351.activate) - c:RegisterEffect(e1) -end -function c86049351.condition(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetAttacker() - local at=Duel.GetAttackTarget() - if not at or tc:IsFacedown() or at:IsFacedown() then return false end - if not tc:IsControler(tp) then tc=at end - e:SetLabelObject(tc) - return tc:IsControler(tp) and tc:IsLocation(LOCATION_MZONE) and tc:IsSetCard(0x84) -end -function c86049351.filter(c,pos) - return c:IsPosition(pos) and c:IsSetCard(0x84) -end -function c86049351.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local tc=e:GetLabelObject() - local bc=tc:GetBattleTarget() - local pos=POS_FACEUP - if bc==Duel.GetAttackTarget() then pos=POS_FACEUP_ATTACK end - return Duel.IsExistingMatchingCard(c86049351.filter,tp,LOCATION_MZONE,0,1,tc,pos) - end -end -function c86049351.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetLabelObject() - local bc=tc:GetBattleTarget() - if Duel.NegateAttack() and tc:IsRelateToBattle() and bc:IsRelateToBattle() and bc:IsFaceup() then - Duel.SendtoGrave(tc,REASON_EFFECT) - local pos=POS_FACEUP - if bc==Duel.GetAttackTarget() then pos=POS_FACEUP_ATTACK end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - local g=Duel.SelectMatchingCard(tp,c86049351.filter,tp,LOCATION_MZONE,0,1,1,nil,pos) - local sc=g:GetFirst() - local atk=bc:GetBaseAttack() - if atk<0 then atk=0 end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(atk) - e1:SetReset(RESET_EVENT+0x1fe0000) - sc:RegisterEffect(e1) - if bc==Duel.GetAttackTarget() then bc,sc=sc,bc end - if bc:IsAttackable() and not bc:IsImmuneToEffect(e) and not sc:IsImmuneToEffect(e) then - Duel.CalculateDamage(bc,sc) - Duel.BreakEffect() - Duel.Damage(tp,atk,REASON_EFFECT) - end - end -end diff --git a/script/c86062400.lua b/script/c86062400.lua deleted file mode 100644 index 2ee0690543..0000000000 --- a/script/c86062400.lua +++ /dev/null @@ -1,61 +0,0 @@ ---エクシーズ・アヴェンジャー -function c86062400.initial_effect(c) - --immune - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_IMMUNE_EFFECT) - e1:SetValue(c86062400.efilter) - c:RegisterEffect(e1) - -- - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(86062400,0)) - e2:SetCategory(CATEGORY_TOGRAVE) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_BATTLE_DESTROYED) - e2:SetCondition(c86062400.tgcon) - e2:SetTarget(c86062400.tgtg) - e2:SetOperation(c86062400.tgop) - c:RegisterEffect(e2) -end -function c86062400.efilter(e,te) - return te:IsActiveType(TYPE_XYZ) -end -function c86062400.tgcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local bc=c:GetBattleTarget() - return c:IsLocation(LOCATION_GRAVE) and c:IsReason(REASON_BATTLE) - and bc:IsFaceup() and bc:IsRelateToBattle() and bc:IsType(TYPE_XYZ) -end -function c86062400.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local rk=e:GetHandler():GetBattleTarget():GetRank() - if rk<5 then - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,1-tp,LOCATION_EXTRA) - else - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,rk,1-tp,LOCATION_EXTRA) - end -end -function c86062400.tgop(e,tp,eg,ep,ev,re,r,rp) - local bc=e:GetHandler():GetBattleTarget() - if bc:IsFaceup() and bc:IsRelateToBattle() then - local rk=bc:GetRank() - local g=nil - local tg=Duel.GetFieldGroup(tp,0,LOCATION_EXTRA) - if rk<4 then - Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_TOGRAVE) - g=tg:Select(1-tp,1,1,nil) - elseif rk==4 then - Duel.ConfirmCards(tp,tg) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - g=tg:Select(tp,1,1,nil) - else - Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_TOGRAVE) - g=tg:Select(1-tp,rk,rk,nil) - end - if g:GetCount()>0 then - Duel.SendtoGrave(g,REASON_EFFECT) - end - end -end diff --git a/script/c86099788.lua b/script/c86099788.lua deleted file mode 100644 index 20dde9b307..0000000000 --- a/script/c86099788.lua +++ /dev/null @@ -1,38 +0,0 @@ ---異星の最終戦士 -function c86099788.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcCode2(c,71466592,88472456,true,true) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(86099788,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetTarget(c86099788.target) - e1:SetOperation(c86099788.operation) - c:RegisterEffect(e1) - --disable summon - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetTargetRange(1,1) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EFFECT_CANNOT_FLIP_SUMMON) - c:RegisterEffect(e3) - local e4=e2:Clone() - e4:SetCode(EFFECT_CANNOT_SUMMON) - c:RegisterEffect(e4) -end -function c86099788.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,LOCATION_MZONE,0,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c86099788.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,LOCATION_MZONE,0,e:GetHandler()) - Duel.Destroy(g,REASON_EFFECT) -end diff --git a/script/c86100785.lua b/script/c86100785.lua deleted file mode 100644 index eef4569230..0000000000 --- a/script/c86100785.lua +++ /dev/null @@ -1,42 +0,0 @@ ---ゾーン・イーター -function c86100785.initial_effect(c) - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(86100785,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_DAMAGE_STEP_END) - e1:SetCondition(c86100785.condition) - e1:SetOperation(c86100785.operation) - c:RegisterEffect(e1) -end -function c86100785.condition(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local bc=c:GetBattleTarget() - return c==Duel.GetAttacker() and bc and bc:IsRelateToBattle() and bc:IsFaceup() -end -function c86100785.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local bc=c:GetBattleTarget() - if bc:IsRelateToBattle() then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_MZONE) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetOperation(c86100785.desop) - e1:SetLabel(0) - e1:SetOwnerPlayer(tp) - bc:RegisterEffect(e1) - end -end -function c86100785.desop(e,tp,eg,ep,ev,re,r,rp) - local ct=e:GetLabel() - ct=ct+1 - e:SetLabel(ct) - e:GetOwner():SetTurnCounter(ct) - if ct==5 then - Duel.Destroy(e:GetHandler(),REASON_EFFECT) - end -end diff --git a/script/c8611007.lua b/script/c8611007.lua deleted file mode 100644 index 53306cba92..0000000000 --- a/script/c8611007.lua +++ /dev/null @@ -1,36 +0,0 @@ ---ラヴァルバル・ドラグーン -function c8611007.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,nil,aux.NonTuner(Card.IsAttribute,ATTRIBUTE_FIRE),1) - c:EnableReviveLimit() - --to hand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(8611007,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetTarget(c8611007.target) - e1:SetOperation(c8611007.operation) - c:RegisterEffect(e1) -end -function c8611007.filter(c) - return c:IsSetCard(0x39) and c:IsAbleToHand() -end -function c8611007.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c8611007.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_HAND) -end -function c8611007.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c8611007.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()==0 then return end - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - Duel.ShuffleHand(tp) - Duel.BreakEffect() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local dg=Duel.SelectMatchingCard(tp,Card.IsSetCard,tp,LOCATION_HAND,0,1,1,nil,0x39) - Duel.SendtoGrave(dg,REASON_EFFECT) -end diff --git a/script/c86137485.lua b/script/c86137485.lua deleted file mode 100644 index 3f25db0dab..0000000000 --- a/script/c86137485.lua +++ /dev/null @@ -1,54 +0,0 @@ ---ヘル・ツイン・コップ -function c86137485.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsRace,RACE_FIEND),aux.NonTuner(nil),1) - c:EnableReviveLimit() - --chain attack - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(86137485,0)) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_BATTLE_DESTROYING) - e1:SetCondition(c86137485.atcon1) - e1:SetOperation(c86137485.atop1) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(86137485,0)) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_BATTLE_DESTROYING) - e2:SetCondition(c86137485.atcon2) - e2:SetOperation(c86137485.atop2) - c:RegisterEffect(e2) -end -function c86137485.atcon1(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local bc=c:GetBattleTarget() - return Duel.GetTurnPlayer()==tp and bc:IsLocation(LOCATION_GRAVE) and bc:IsType(TYPE_MONSTER) - and c:IsChainAttackable() and c:IsStatus(STATUS_OPPO_BATTLE) -end -function c86137485.atop1(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) or c:IsFacedown() then return end - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(800) - e1:SetReset(RESET_EVENT+0x1ff0000+RESET_PHASE+PHASE_END) - c:RegisterEffect(e1) - Duel.ChainAttack() -end -function c86137485.atcon2(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local bc=c:GetBattleTarget() - return Duel.GetTurnPlayer()~=tp and c:IsRelateToBattle() and c:IsStatus(STATUS_OPPO_BATTLE) - and bc:IsLocation(LOCATION_GRAVE) and bc:IsType(TYPE_MONSTER) -end -function c86137485.atop2(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) or c:IsFacedown() then return end - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(800) - e1:SetReset(RESET_EVENT+0x1ff0000+RESET_PHASE+PHASE_END) - c:RegisterEffect(e1) -end diff --git a/script/c86164529.lua b/script/c86164529.lua deleted file mode 100644 index 23e84df19e..0000000000 --- a/script/c86164529.lua +++ /dev/null @@ -1,6 +0,0 @@ ---アクア・ドラゴン -function c86164529.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcCode3(c,20315854,17968114,86100785,true,true) -end diff --git a/script/c86170989.lua b/script/c86170989.lua deleted file mode 100644 index 187cda42c8..0000000000 --- a/script/c86170989.lua +++ /dev/null @@ -1,64 +0,0 @@ ---ファルシオンβ -function c86170989.initial_effect(c) - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(86170989,0)) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_BATTLE_DESTROYING) - e1:SetTarget(c86170989.target) - e1:SetOperation(c86170989.operation) - c:RegisterEffect(e1) -end -function c86170989.filter1(c) - return c:IsRace(RACE_MACHINE) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsAttackBelow(1200) and c:IsAbleToGrave() -end -function c86170989.filter2(c,e,tp) - return c:IsRace(RACE_MACHINE) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsAttackBelow(1200) - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c86170989.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c86170989.filter2(chkc,e,tp) end - if chk==0 then return true end - local op=0 - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(86170989,0)) - local t1=Duel.IsExistingMatchingCard(c86170989.filter1,tp,LOCATION_DECK,0,1,nil) - local t2=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c86170989.filter2,tp,LOCATION_GRAVE,0,1,nil,e,tp) - if t1 and t2 then - op=Duel.SelectOption(tp,aux.Stringid(86170989,1),aux.Stringid(86170989,2))+1 - elseif t1 then - Duel.SelectOption(tp,aux.Stringid(86170989,1)) - op=1 - elseif t2 then - Duel.SelectOption(tp,aux.Stringid(86170989,2)) - op=2 - end - e:SetLabel(op) - if op==2 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c86170989.filter2,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) - e:SetProperty(EFFECT_FLAG_CARD_TARGET) - e:SetCategory(CATEGORY_SPECIAL_SUMMON) - elseif op==1 then - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) - e:SetProperty(0) - e:SetCategory(CATEGORY_TOGRAVE) - else - e:SetProperty(0) - e:SetCategory(0) - end -end -function c86170989.operation(e,tp,eg,ep,ev,re,r,rp) - if e:GetLabel()==2 then - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end - elseif e:GetLabel()==1 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c86170989.filter1,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoGrave(g,REASON_EFFECT) - end - end -end diff --git a/script/c86174055.lua b/script/c86174055.lua deleted file mode 100644 index c48f95ec55..0000000000 --- a/script/c86174055.lua +++ /dev/null @@ -1,50 +0,0 @@ ---スピッド・バード -function c86174055.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(86174055,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetCondition(c86174055.condition) - e1:SetTarget(c86174055.target) - e1:SetOperation(c86174055.operation) - c:RegisterEffect(e1) -end -function c86174055.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) -end -function c86174055.filter(c,e,tp) - return c:GetLevel()==2 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c86174055.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c86174055.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>1 - and Duel.IsExistingTarget(c86174055.filter,tp,LOCATION_GRAVE,0,2,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c86174055.filter,tp,LOCATION_GRAVE,0,2,2,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,g:GetCount(),0,0) -end -function c86174055.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) - local ct=Duel.GetLocationCount(tp,LOCATION_MZONE) - if g:GetCount()<=ct then - local tc=g:GetFirst() - while tc do - Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1,true) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e2,true) - tc=g:GetNext() - end - Duel.SpecialSummonComplete() - end -end diff --git a/script/c86188410.lua b/script/c86188410.lua deleted file mode 100644 index 5dd5de7d70..0000000000 --- a/script/c86188410.lua +++ /dev/null @@ -1,13 +0,0 @@ ---E・HERO ワイルドマン -function c86188410.initial_effect(c) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_IMMUNE_EFFECT) - e1:SetValue(c86188410.efilter) - c:RegisterEffect(e1) -end -function c86188410.efilter(e,te) - return te:IsActiveType(TYPE_TRAP) -end diff --git a/script/c86197239.lua b/script/c86197239.lua deleted file mode 100644 index 694d09b67a..0000000000 --- a/script/c86197239.lua +++ /dev/null @@ -1,49 +0,0 @@ ---インフェルニティ・ミラージュ -function c86197239.initial_effect(c) - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_SINGLE_RANGE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetRange(LOCATION_GRAVE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(aux.FALSE) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(86197239,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCondition(c86197239.spcon) - e2:SetCost(c86197239.spcost) - e2:SetTarget(c86197239.sptg) - e2:SetOperation(c86197239.spop) - c:RegisterEffect(e2) -end -function c86197239.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)==0 -end -function c86197239.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end -function c86197239.filter(c,e,tp) - return c:IsSetCard(0xb) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c86197239.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c86197239.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c86197239.filter,tp,LOCATION_GRAVE,0,2,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c86197239.filter,tp,LOCATION_GRAVE,0,2,2,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,g:GetCount(),0,0) -end -function c86197239.spop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local sg=g:Filter(Card.IsRelateToEffect,nil,e) - if Duel.GetLocationCount(tp,LOCATION_MZONE)0 then - Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c86198326.lua b/script/c86198326.lua deleted file mode 100644 index f5100cede7..0000000000 --- a/script/c86198326.lua +++ /dev/null @@ -1,50 +0,0 @@ ---7カード -function c86198326.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c86198326.target) - e1:SetOperation(c86198326.operation) - c:RegisterEffect(e1) - --equip limit - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_EQUIP_LIMIT) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetValue(c86198326.eqlimit) - c:RegisterEffect(e2) -end -function c86198326.eqlimit(e,c) - return c:IsRace(RACE_MACHINE) -end -function c86198326.filter(c) - return c:IsFaceup() and c:IsRace(RACE_MACHINE) -end -function c86198326.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c86198326.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c86198326.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c86198326.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c86198326.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - local opt=Duel.SelectOption(tp,aux.Stringid(86198326,0),aux.Stringid(86198326,1)) - Duel.Equip(tp,c,tc) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_EQUIP) - if opt==0 then - e1:SetCode(EFFECT_UPDATE_ATTACK) - else - e1:SetCode(EFFECT_UPDATE_DEFENCE) - end - e1:SetValue(700) - e1:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e1) - end -end diff --git a/script/c86209650.lua b/script/c86209650.lua deleted file mode 100644 index dab480b132..0000000000 --- a/script/c86209650.lua +++ /dev/null @@ -1,24 +0,0 @@ ---迷走悪魔 -function c86209650.initial_effect(c) - --battle destroyed - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(86209650,0)) - e1:SetCategory(CATEGORY_RECOVER) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetCondition(c86209650.condition) - e1:SetTarget(c86209650.target) - e1:SetOperation(c86209650.operation) - c:RegisterEffect(e1) -end -function c86209650.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) -end -function c86209650.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,PLAYER_ALL,800) -end -function c86209650.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.Recover(tp,800,REASON_EFFECT) - Duel.Recover(1-tp,800,REASON_EFFECT) -end diff --git a/script/c86223870.lua b/script/c86223870.lua deleted file mode 100644 index 757b14ecb6..0000000000 --- a/script/c86223870.lua +++ /dev/null @@ -1,37 +0,0 @@ ---レベル・リチューナー -function c86223870.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c86223870.target) - e1:SetOperation(c86223870.activate) - c:RegisterEffect(e1) -end -function c86223870.filter(c) - return c:IsFaceup() and c:IsLevelAbove(2) -end -function c86223870.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c86223870.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c86223870.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c86223870.filter,tp,LOCATION_MZONE,0,1,1,nil) -end -function c86223870.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - local lv=tc:GetLevel() - local dlv=1 - if lv==1 then return - elseif lv>2 then - dlv=Duel.SelectOption(tp,aux.Stringid(86223870,0),aux.Stringid(86223870,1))+1 - end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_LEVEL) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(-dlv) - tc:RegisterEffect(e1) - end -end diff --git a/script/c86229493.lua b/script/c86229493.lua deleted file mode 100644 index 24b03b6164..0000000000 --- a/script/c86229493.lua +++ /dev/null @@ -1,28 +0,0 @@ ---ダークネスソウル -function c86229493.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(86229493,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetCondition(c86229493.condition) - e1:SetTarget(c86229493.target) - e1:SetOperation(c86229493.operation) - c:RegisterEffect(e1) -end -function c86229493.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) -end -function c86229493.filter(c) - return (c:IsFacedown() or c:GetAttribute()~=ATTRIBUTE_DARK) and c:IsDestructable() -end -function c86229493.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local g=Duel.GetMatchingGroup(c86229493.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c86229493.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c86229493.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - Duel.Destroy(g,REASON_EFFECT) -end diff --git a/script/c86274272.lua b/script/c86274272.lua deleted file mode 100644 index 8eaab03afe..0000000000 --- a/script/c86274272.lua +++ /dev/null @@ -1,112 +0,0 @@ ---聖霊獣騎 アペライオ -function c86274272.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcFun2(c,aux.FilterBoolFunction(Card.IsSetCard,0x10b5),aux.FilterBoolFunction(Card.IsSetCard,0x20b5),true) - --spsummon condition - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - c:RegisterEffect(e1) - --special summon rule - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_SPSUMMON_PROC) - e2:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e2:SetRange(LOCATION_EXTRA) - e2:SetCondition(c86274272.sprcon) - e2:SetOperation(c86274272.sprop) - c:RegisterEffect(e2) - --immune - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e3:SetCode(EVENT_ATTACK_ANNOUNCE) - e3:SetOperation(c86274272.atkop) - c:RegisterEffect(e3) - --special summon - local e4=Effect.CreateEffect(c) - e4:SetCategory(CATEGORY_SPECIAL_SUMMON) - e4:SetProperty(EFFECT_FLAG_CARD_TARGET) - e4:SetType(EFFECT_TYPE_QUICK_O) - e4:SetCode(EVENT_FREE_CHAIN) - e4:SetHintTiming(0,TIMING_END_PHASE) - e4:SetRange(LOCATION_MZONE) - e4:SetCost(c86274272.spcost) - e4:SetTarget(c86274272.sptg) - e4:SetOperation(c86274272.spop) - c:RegisterEffect(e4) -end -function c86274272.spfilter1(c,tp) - return c:IsSetCard(0x10b5) and c:IsAbleToRemoveAsCost() and c:IsCanBeFusionMaterial() - and Duel.IsExistingMatchingCard(c86274272.spfilter2,tp,LOCATION_MZONE,0,1,c) -end -function c86274272.spfilter2(c) - return c:IsSetCard(0x20b5) and c:IsAbleToRemoveAsCost() and c:IsCanBeFusionMaterial() -end -function c86274272.sprcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.GetLocationCount(tp,LOCATION_MZONE)>-2 - and Duel.IsExistingMatchingCard(c86274272.spfilter1,tp,LOCATION_MZONE,0,1,nil,tp) -end -function c86274272.sprop(e,tp,eg,ep,ev,re,r,rp,c) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g1=Duel.SelectMatchingCard(tp,c86274272.spfilter1,tp,LOCATION_MZONE,0,1,1,nil,tp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g2=Duel.SelectMatchingCard(tp,c86274272.spfilter2,tp,LOCATION_MZONE,0,1,1,g1:GetFirst()) - g1:Merge(g2) - c:SetMaterial(g1) - Duel.Remove(g1,POS_FACEUP,REASON_COST) -end -function c86274272.atkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_IMMUNE_EFFECT) - e1:SetValue(c86274272.efilter) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_DAMAGE) - c:RegisterEffect(e1) -end -function c86274272.efilter(e,te) - return te:GetOwner()~=e:GetOwner() -end -function c86274272.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToExtraAsCost() end - Duel.SendtoDeck(e:GetHandler(),nil,0,REASON_COST) -end -function c86274272.filter1(c,e,tp) - return c:IsFaceup() and c:IsSetCard(0x10b5) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) - and Duel.IsExistingTarget(c86274272.filter2,tp,LOCATION_REMOVED,0,1,c,e,tp) -end -function c86274272.filter2(c,e,tp) - return c:IsFaceup() and c:IsSetCard(0x20b5) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c86274272.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c86274272.filter1,tp,LOCATION_REMOVED,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g1=Duel.SelectTarget(tp,c86274272.filter1,tp,LOCATION_REMOVED,0,1,1,nil,e,tp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g2=Duel.SelectTarget(tp,c86274272.filter2,tp,LOCATION_REMOVED,0,1,1,g1:GetFirst(),e,tp) - g1:Merge(g2) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g1,2,0,0) -end -function c86274272.spop(e,tp,eg,ep,ev,re,r,rp) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ft<=0 then return end - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) - if g:GetCount()==0 then return end - if g:GetCount()<=ft then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENCE) - else - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=g:Select(tp,ft,ft,nil) - Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP_DEFENCE) - g:Sub(sg) - Duel.SendtoGrave(g,REASON_EFFECT) - end -end diff --git a/script/c8628798.lua b/script/c8628798.lua deleted file mode 100644 index bd4a8e75b9..0000000000 --- a/script/c8628798.lua +++ /dev/null @@ -1,25 +0,0 @@ ---D.D.ダイナマイト -function c8628798.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,0x1c1) - e1:SetTarget(c8628798.target) - e1:SetOperation(c8628798.activate) - c:RegisterEffect(e1) -end -function c8628798.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_REMOVED,1,nil) end - Duel.SetTargetPlayer(1-tp) - local dam=Duel.GetFieldGroupCount(1-tp,LOCATION_REMOVED,0)*300 - Duel.SetTargetParam(dam) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,dam) -end -function c8628798.activate(e,tp,eg,ep,ev,re,r,rp) - local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) - local dam=Duel.GetFieldGroupCount(1-tp,LOCATION_REMOVED,0)*300 - Duel.Damage(p,dam,REASON_EFFECT) -end diff --git a/script/c86308219.lua b/script/c86308219.lua deleted file mode 100644 index ce7d8980bb..0000000000 --- a/script/c86308219.lua +++ /dev/null @@ -1,65 +0,0 @@ ---ハーピィ・レディ -鳳凰の陣- -function c86308219.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c86308219.condition) - e1:SetCost(c86308219.cost) - e1:SetTarget(c86308219.target) - e1:SetOperation(c86308219.activate) - c:RegisterEffect(e1) - Duel.AddCustomActivityCounter(86308219,ACTIVITY_SPSUMMON,c86308219.counterfilter) -end -function c86308219.counterfilter(c) - return bit.band(c:GetSummonLocation(),LOCATION_DECK+LOCATION_EXTRA)==0 -end -function c86308219.cfilter(c) - return c:IsFaceup() and (c:IsCode(76812113) or c:IsCode(12206212)) -end -function c86308219.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c86308219.cfilter,tp,LOCATION_ONFIELD,0,3,nil) -end -function c86308219.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetCustomActivityCount(86308219,tp,ACTIVITY_SPSUMMON)==0 - and Duel.GetCurrentPhase()==PHASE_MAIN1 end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetTargetRange(1,0) - e1:SetTarget(c86308219.sumlimit) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) - e2:SetCode(EFFECT_CANNOT_BP) - e2:SetTargetRange(1,0) - e2:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e2,tp) -end -function c86308219.sumlimit(e,c,sump,sumtype,sumpos,targetp) - return c:IsLocation(LOCATION_DECK+LOCATION_EXTRA) -end -function c86308219.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsDestructable() end - if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,0,LOCATION_MZONE,1,nil) end - local ct=Duel.GetMatchingGroupCount(c86308219.cfilter,tp,LOCATION_MZONE,0,nil) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,0,LOCATION_MZONE,ct,ct,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,0) -end -function c86308219.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) - if Duel.Destroy(g,REASON_EFFECT)~=0 then - local og=Duel.GetOperatedGroup() - local mg,matk=og:GetMaxGroup(Card.GetBaseAttack) - if matk>0 then - Duel.Damage(1-tp,matk,REASON_EFFECT) - end - end -end diff --git a/script/c86318356.lua b/script/c86318356.lua deleted file mode 100644 index 88da255edc..0000000000 --- a/script/c86318356.lua +++ /dev/null @@ -1,29 +0,0 @@ ---草原 -function c86318356.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --Atk - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e2:SetTarget(c86318356.tg) - e2:SetValue(200) - c:RegisterEffect(e2) - --Def - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetCode(EFFECT_UPDATE_DEFENCE) - e3:SetRange(LOCATION_SZONE) - e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e3:SetTarget(c86318356.tg) - e3:SetValue(200) - c:RegisterEffect(e3) -end -function c86318356.tg(e,c) - return c:IsRace(RACE_WARRIOR+RACE_BEASTWARRIOR) -end diff --git a/script/c86321248.lua b/script/c86321248.lua deleted file mode 100644 index e15eb9fa79..0000000000 --- a/script/c86321248.lua +++ /dev/null @@ -1,89 +0,0 @@ ---古代の機械合成獣 -function c86321248.initial_effect(c) - --mat check - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_MATERIAL_CHECK) - e1:SetValue(c86321248.valcheck) - c:RegisterEffect(e1) - --summon success - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_SUMMON_SUCCESS) - e2:SetCondition(c86321248.regcon) - e2:SetOperation(c86321248.regop) - c:RegisterEffect(e2) - e2:SetLabelObject(e1) -end -function c86321248.valcheck(e,c) - local g=c:GetMaterial() - local flag=0 - local tc=g:GetFirst() - while tc do - local code=tc:GetCode() - if code==41172955 then flag=bit.bor(flag,0x1) - elseif code==86445415 then flag=bit.bor(flag,0x2) - elseif code==13839120 then flag=bit.bor(flag,0x4) - end - tc=g:GetNext() - end - e:SetLabel(flag) -end -function c86321248.regcon(e,tp,eg,ep,ev,re,r,rp) - return bit.band(e:GetHandler():GetSummonType(),SUMMON_TYPE_ADVANCE)==SUMMON_TYPE_ADVANCE -end -function c86321248.regop(e,tp,eg,ep,ev,re,r,rp) - local flag=e:GetLabelObject():GetLabel() - local c=e:GetHandler() - if bit.band(flag,0x1)~=0 then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(300) - e1:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e1) - end - if bit.band(flag,0x2)~=0 then - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(86321248,0)) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_BATTLE_DAMAGE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCondition(c86321248.damcon1) - e1:SetTarget(c86321248.damtg1) - e1:SetOperation(c86321248.damop) - e1:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e1) - end - if bit.band(flag,0x4)~=0 then - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(86321248,1)) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_BATTLE_DESTROYING) - e1:SetTarget(c86321248.damtg2) - e1:SetOperation(c86321248.damop) - e1:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e1) - end -end -function c86321248.damcon1(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp and Duel.GetAttackTarget()==nil -end -function c86321248.damtg1(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(500) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,500) -end -function c86321248.damtg2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(700) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,700) -end -function c86321248.damop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c86325573.lua b/script/c86325573.lua deleted file mode 100644 index a0c097a909..0000000000 --- a/script/c86325573.lua +++ /dev/null @@ -1,55 +0,0 @@ ---BK ビッグバンテージ -function c86325573.initial_effect(c) - --battle indes - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_INDESTRUCTABLE_COUNT) - e1:SetCountLimit(1) - e1:SetValue(c86325573.valcon) - c:RegisterEffect(e1) - --level - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(86325573,0)) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCountLimit(1) - e2:SetTarget(c86325573.lvtg) - e2:SetOperation(c86325573.lvop) - c:RegisterEffect(e2) -end -function c86325573.valcon(e,re,r,rp) - return bit.band(r,REASON_BATTLE)~=0 -end -function c86325573.filter(c) - return c:GetLevel()>0 and c:IsSetCard(0x84) and (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup()) -end -function c86325573.lvfilter(c) - return c:IsFaceup() and c:IsSetCard(0x84) and c:GetLevel()>0 -end -function c86325573.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) and chkc:IsControler(tp) and c86325573.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c86325573.filter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) - and Duel.IsExistingMatchingCard(c86325573.lvfilter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - Duel.SelectTarget(tp,c86325573.filter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil) -end -function c86325573.lvop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if not tc:IsRelateToEffect(e) then return end - local lv=tc:GetLevel() - local g=Duel.GetMatchingGroup(c86325573.lvfilter,tp,LOCATION_MZONE,0,nil) - local lc=g:GetFirst() - while lc do - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CHANGE_LEVEL) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetValue(lv) - e1:SetReset(RESET_EVENT+0x1fe0000) - lc:RegisterEffect(e1) - lc=g:GetNext() - end -end diff --git a/script/c86327225.lua b/script/c86327225.lua deleted file mode 100644 index 9fb0e2f097..0000000000 --- a/script/c86327225.lua +++ /dev/null @@ -1,35 +0,0 @@ ---天界王 シナト -function c86327225.initial_effect(c) - c:EnableReviveLimit() - --damage - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(86327225,0)) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_BATTLE_DESTROYING) - e1:SetCondition(c86327225.damcon) - e1:SetTarget(c86327225.damtg) - e1:SetOperation(c86327225.damop) - c:RegisterEffect(e1) -end -function c86327225.damcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local bc=c:GetBattleTarget() - return c:IsRelateToBattle() and bc:IsLocation(LOCATION_GRAVE) and bc:IsType(TYPE_MONSTER) - and bit.band(bc:GetBattlePosition(),POS_DEFENCE)~=0 -end -function c86327225.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local c=e:GetHandler() - local bc=c:GetBattleTarget() - local dam=bc:GetBaseAttack() - if dam<0 then dam=0 end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(dam) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,dam) -end -function c86327225.damop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c8632967.lua b/script/c8632967.lua deleted file mode 100644 index c7049fdca6..0000000000 --- a/script/c8632967.lua +++ /dev/null @@ -1,39 +0,0 @@ ---進化の宿命 -function c8632967.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --act limit - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetRange(LOCATION_SZONE) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetOperation(c8632967.sucop) - c:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e3:SetRange(LOCATION_SZONE) - e3:SetCode(EVENT_CHAIN_END) - e3:SetOperation(c8632967.cedop) - e3:SetLabelObject(e2) - c:RegisterEffect(e3) -end -function c8632967.chainlm(e,rp,tp) - return tp==rp -end -function c8632967.sucfilter(c) - local st=c:GetSummonType() - return c:IsSetCard(0x304e) and st>=(SUMMON_TYPE_SPECIAL+150) and st<(SUMMON_TYPE_SPECIAL+180) -end -function c8632967.sucop(e,tp,eg,ep,ev,re,r,rp) - if eg:IsExists(c8632967.sucfilter,1,nil) then - e:SetLabel(1) - else e:SetLabel(0) end -end -function c8632967.cedop(e,tp,eg,ep,ev,re,r,rp) - if Duel.CheckEvent(EVENT_SPSUMMON_SUCCESS) and e:GetLabelObject():GetLabel()==1 then - Duel.SetChainLimitTillChainEnd(c8632967.chainlm) - end -end diff --git a/script/c8634636.lua b/script/c8634636.lua deleted file mode 100644 index b2655892f5..0000000000 --- a/script/c8634636.lua +++ /dev/null @@ -1,32 +0,0 @@ ---尾も白い黒猫 -function c8634636.initial_effect(c) - --flip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(8634636,0)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP) - e1:SetTarget(c8634636.target) - e1:SetOperation(c8634636.operation) - c:RegisterEffect(e1) -end -function c8634636.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - if chk==0 then return true end - if Duel.IsExistingTarget(Card.IsAbleToHand,tp,LOCATION_MZONE,0,1,nil) - and Duel.IsExistingTarget(Card.IsAbleToHand,tp,0,LOCATION_MZONE,2,nil) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g1=Duel.SelectTarget(tp,Card.IsAbleToHand,tp,0,LOCATION_MZONE,2,2,nil) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g2=Duel.SelectTarget(tp,Card.IsAbleToHand,tp,LOCATION_MZONE,0,1,1,nil) - g1:Merge(g2) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g1,g1:GetCount(),0,0) - end -end -function c8634636.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - if g then - local sg=g:Filter(Card.IsRelateToEffect,nil,e) - Duel.SendtoHand(sg,nil,REASON_EFFECT) - end -end diff --git a/script/c86346643.lua b/script/c86346643.lua deleted file mode 100644 index 0afe799d6c..0000000000 --- a/script/c86346643.lua +++ /dev/null @@ -1,106 +0,0 @@ ---レインボー・ネオス -function c86346643.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcCodeFun(c,89943723,c86346643.fusfilter,1,false,false) - --spsummon condition - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(c86346643.splimit) - c:RegisterEffect(e1) - --to deck - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(86346643,1)) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetCategory(CATEGORY_TODECK) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE) - e2:SetCost(c86346643.tdcost1) - e2:SetTarget(c86346643.tdtg1) - e2:SetOperation(c86346643.tdop1) - c:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(86346643,2)) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetCategory(CATEGORY_TODECK) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE) - e3:SetCost(c86346643.tdcost2) - e3:SetTarget(c86346643.tdtg2) - e3:SetOperation(c86346643.tdop2) - c:RegisterEffect(e3) - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(86346643,3)) - e4:SetType(EFFECT_TYPE_IGNITION) - e4:SetCategory(CATEGORY_TODECK) - e4:SetRange(LOCATION_MZONE) - e4:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE) - e4:SetCost(c86346643.tdcost3) - e4:SetTarget(c86346643.tdtg3) - e4:SetOperation(c86346643.tdop3) - c:RegisterEffect(e4) -end -function c86346643.splimit(e,se,sp,st) - return bit.band(st,SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION -end -function c86346643.fusfilter(c) - local code=c:GetCode() - return code==79856792 or code==79407975 -end -function c86346643.cfilter1(c) - return c:IsAbleToGraveAsCost() -end -function c86346643.tdcost1(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c86346643.cfilter1,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c86346643.cfilter1,tp,LOCATION_MZONE,0,1,1,nil) - Duel.SendtoGrave(g,REASON_COST) -end -function c86346643.tdtg1(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,0,LOCATION_MZONE,1,nil) end - local g=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,0,LOCATION_MZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0) -end -function c86346643.tdop1(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,0,LOCATION_MZONE,nil) - Duel.SendtoDeck(g,nil,2,REASON_EFFECT) -end -function c86346643.cfilter2(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToGraveAsCost() -end -function c86346643.tdcost2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c86346643.cfilter2,tp,LOCATION_ONFIELD,0,1,nil) end - Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c86346643.cfilter2,tp,LOCATION_ONFIELD,0,1,1,nil) - Duel.SendtoGrave(g,REASON_COST) -end -function c86346643.filter2(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToDeck() -end -function c86346643.tdtg2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c86346643.filter2,tp,0,LOCATION_ONFIELD,1,nil) end - local g=Duel.GetMatchingGroup(c86346643.filter2,tp,0,LOCATION_ONFIELD,nil) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0) -end -function c86346643.tdop2(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c86346643.filter2,tp,0,LOCATION_ONFIELD,nil) - Duel.SendtoDeck(g,nil,2,REASON_EFFECT) -end -function c86346643.tdcost3(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDiscardDeckAsCost(tp,1) end - Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) - Duel.DiscardDeck(tp,1,REASON_COST) -end -function c86346643.tdtg3(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,0,LOCATION_GRAVE,1,nil) end - local g=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,0,LOCATION_GRAVE,nil) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0) -end -function c86346643.tdop3(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,0,LOCATION_GRAVE,nil) - Duel.SendtoDeck(g,nil,2,REASON_EFFECT) -end diff --git a/script/c86361354.lua b/script/c86361354.lua deleted file mode 100644 index 8804c50033..0000000000 --- a/script/c86361354.lua +++ /dev/null @@ -1,38 +0,0 @@ ---同族感電ウィルス -function c86361354.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(86361354,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCost(c86361354.cost) - e1:SetTarget(c86361354.target) - e1:SetOperation(c86361354.operation) - c:RegisterEffect(e1) -end -function c86361354.cfilter(c) - local rc=c:GetRace() - return rc~=0 and c:IsAbleToRemoveAsCost() - and Duel.IsExistingMatchingCard(c86361354.dfilter,0,LOCATION_MZONE,LOCATION_MZONE,1,nil,rc) -end -function c86361354.dfilter(c,rc) - return c:IsFaceup() and c:IsRace(rc) and c:IsDestructable() -end -function c86361354.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c86361354.cfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c86361354.cfilter,tp,LOCATION_HAND,0,1,1,nil) - e:SetLabel(g:GetFirst():GetRace()) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c86361354.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local g=Duel.GetMatchingGroup(c86361354.dfilter,0,LOCATION_MZONE,LOCATION_MZONE,nil,e:GetLabel()) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c86361354.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c86361354.dfilter,0,LOCATION_MZONE,LOCATION_MZONE,nil,e:GetLabel()) - Duel.Destroy(g,REASON_EFFECT) -end diff --git a/script/c86396750.lua b/script/c86396750.lua deleted file mode 100644 index 40e3e0b380..0000000000 --- a/script/c86396750.lua +++ /dev/null @@ -1,45 +0,0 @@ ---精霊獣 アペライオ -function c86396750.initial_effect(c) - c:SetSPSummonOnce(86396750) - --atk - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(86396750,0)) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetRange(LOCATION_MZONE) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e1:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP+0x1c0) - e1:SetCountLimit(1) - e1:SetCondition(c86396750.atkcon) - e1:SetCost(c86396750.atkcost) - e1:SetOperation(c86396750.atkop) - c:RegisterEffect(e1) -end -function c86396750.atkcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end -function c86396750.cfilter(c) - return c:IsSetCard(0xb5) and c:IsAbleToRemoveAsCost() -end -function c86396750.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c86396750.cfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c86396750.cfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c86396750.atkop(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetTarget(c86396750.atktg) - e1:SetValue(500) - e1:SetReset(RESET_PHASE+RESET_END) - Duel.RegisterEffect(e1,tp) - local e2=e1:Clone() - e2:SetCode(EFFECT_UPDATE_DEFENCE) - Duel.RegisterEffect(e2,tp) -end -function c86396750.atktg(e,c) - return c:IsSetCard(0xb5) -end diff --git a/script/c8643186.lua b/script/c8643186.lua deleted file mode 100644 index 9e9c080af1..0000000000 --- a/script/c8643186.lua +++ /dev/null @@ -1,36 +0,0 @@ ---DDリクルート -function c8643186.initial_effect(c) - --activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCountLimit(1,8643186+EFFECT_COUNT_CODE_OATH) - e1:SetCondition(c8643186.condition) - e1:SetTarget(c8643186.target) - e1:SetOperation(c8643186.operation) - c:RegisterEffect(e1) -end -function c8643186.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0) -end -function c8643186.filter(c) - return ((c:IsSetCard(0xaf) and c:IsType(TYPE_MONSTER)) or c:IsSetCard(0xae)) and c:IsAbleToHand() -end -function c8643186.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c8643186.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c8643186.filter,tp,LOCATION_GRAVE,0,1,nil) end - local ct=Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)-Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c8643186.filter,tp,LOCATION_GRAVE,0,1,ct,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0) -end -function c8643186.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local sg=g:Filter(Card.IsRelateToEffect,nil,e) - if sg:GetCount()>0 then - Duel.SendtoHand(sg,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,sg) - end -end diff --git a/script/c86442081.lua b/script/c86442081.lua deleted file mode 100644 index af0e193fcf..0000000000 --- a/script/c86442081.lua +++ /dev/null @@ -1,28 +0,0 @@ ---サイレントアビス -function c86442081.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(86442081,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetCondition(c86442081.condition) - e1:SetTarget(c86442081.target) - e1:SetOperation(c86442081.operation) - c:RegisterEffect(e1) -end -function c86442081.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) -end -function c86442081.filter(c) - return (c:IsFacedown() or c:GetAttribute()~=ATTRIBUTE_WATER) and c:IsDestructable() -end -function c86442081.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local g=Duel.GetMatchingGroup(c86442081.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c86442081.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c86442081.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - Duel.Destroy(g,REASON_EFFECT) -end diff --git a/script/c86445415.lua b/script/c86445415.lua deleted file mode 100644 index eb8e4dbaf5..0000000000 --- a/script/c86445415.lua +++ /dev/null @@ -1,30 +0,0 @@ ---レッド・ガジェット -function c86445415.initial_effect(c) - --search - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(86445415,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c86445415.tg) - e1:SetOperation(c86445415.op) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e2) -end -function c86445415.filter(c) - return c:IsCode(13839120) and c:IsAbleToHand() -end -function c86445415.tg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c86445415.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c86445415.op(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstMatchingCard(c86445415.filter,tp,LOCATION_DECK,0,nil) - if tc then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end diff --git a/script/c86466163.lua b/script/c86466163.lua deleted file mode 100644 index 0dcdee16e7..0000000000 --- a/script/c86466163.lua +++ /dev/null @@ -1,36 +0,0 @@ ---星因士 カペラ -function c86466163.initial_effect(c) - Duel.EnableGlobalFlag(GLOBALFLAG_XMAT_COUNT_LIMIT) - --xyzlv - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(86466163,0)) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e1:SetCountLimit(1,86466163) - e1:SetOperation(c86466163.operation) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - c:RegisterEffect(e2) - local e3=e1:Clone() - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e3) -end -function c86466163.operation(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_XYZ_LEVEL) - e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetTarget(c86466163.xyztg) - e1:SetValue(c86466163.xyzlv) - e1:SetReset(RESET_PHASE+RESET_END) - Duel.RegisterEffect(e1,tp) -end -function c86466163.xyztg(e,c) - return c:IsLevelBelow(4) and c:IsSetCard(0x9c) -end -function c86466163.xyzlv(e,c,rc) - return 0x30050000+c:GetLevel() -end diff --git a/script/c86474024.lua b/script/c86474024.lua deleted file mode 100644 index 058ab3f5c9..0000000000 --- a/script/c86474024.lua +++ /dev/null @@ -1,36 +0,0 @@ ---共同戦線 -function c86474024.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_CHAINING) - e1:SetCondition(c86474024.condition) - e1:SetTarget(c86474024.target) - e1:SetOperation(c86474024.activate) - c:RegisterEffect(e1) -end -function c86474024.filter1(c,tp) - local lv1=c:GetLevel() - return lv1>0 and c:IsFaceup() and Duel.IsExistingMatchingCard(c86474024.filter2,tp,LOCATION_MZONE,0,1,c,lv1) -end -function c86474024.filter2(c,lv1) - return c:IsFaceup() and c:GetLevel()==lv1 -end -function c86474024.condition(e,tp,eg,ep,ev,re,r,rp) - return re:IsActiveType(TYPE_TRAP) and re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev) - and Duel.IsExistingMatchingCard(c86474024.filter1,tp,LOCATION_MZONE,0,1,nil,tp) -end -function c86474024.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) - end -end -function c86474024.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateActivation(ev) - if re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(eg,REASON_EFFECT) - end -end diff --git a/script/c86489182.lua b/script/c86489182.lua deleted file mode 100644 index 4e3342b19d..0000000000 --- a/script/c86489182.lua +++ /dev/null @@ -1,70 +0,0 @@ ---始祖神鳥シムルグ -function c86489182.initial_effect(c) - --normal monster - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_HAND) - e1:SetCode(EFFECT_ADD_TYPE) - e1:SetValue(TYPE_NORMAL) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_REMOVE_TYPE) - e2:SetValue(TYPE_EFFECT) - c:RegisterEffect(e2) - --decrease tribute - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetCode(EFFECT_DECREASE_TRIBUTE) - e3:SetRange(LOCATION_MZONE) - e3:SetTargetRange(LOCATION_HAND,LOCATION_HAND) - e3:SetTarget(aux.TargetBoolFunction(Card.IsAttribute,ATTRIBUTE_WIND)) - e3:SetValue(0x10001) - c:RegisterEffect(e3) - local e4=e3:Clone() - e4:SetCode(EFFECT_DECREASE_TRIBUTE_SET) - c:RegisterEffect(e4) - --summon success - local e5=Effect.CreateEffect(c) - e5:SetDescription(aux.Stringid(86489182,0)) - e5:SetCategory(CATEGORY_TOHAND) - e5:SetProperty(EFFECT_FLAG_CARD_TARGET) - e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e5:SetCode(EVENT_SUMMON_SUCCESS) - e5:SetCondition(c86489182.condition) - e5:SetTarget(c86489182.target) - e5:SetOperation(c86489182.operation) - c:RegisterEffect(e5) - --tribute check - local e6=Effect.CreateEffect(c) - e6:SetType(EFFECT_TYPE_SINGLE) - e6:SetCode(EFFECT_MATERIAL_CHECK) - e6:SetValue(c86489182.valcheck) - e6:SetLabelObject(e5) - c:RegisterEffect(e6) -end -function c86489182.valcheck(e,c) - local g=c:GetMaterial() - if g:FilterCount(Card.IsAttribute,nil,ATTRIBUTE_WIND)==g:GetCount() then - e:GetLabelObject():SetLabel(1) - else - e:GetLabelObject():SetLabel(0) - end -end -function c86489182.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_ADVANCE and e:GetLabel()==1 -end -function c86489182.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and chkc:IsAbleToHand() end - if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g=Duel.SelectTarget(tp,Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,1,2,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0) -end -function c86489182.operation(e,tp,eg,ep,ev,re,r,rp) - local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local g=tg:Filter(Card.IsRelateToEffect,nil,e) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - end -end diff --git a/script/c8649148.lua b/script/c8649148.lua deleted file mode 100644 index 2cf93b76c7..0000000000 --- a/script/c8649148.lua +++ /dev/null @@ -1,34 +0,0 @@ ---ディープ・スィーパー -function c8649148.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(8649148,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c8649148.cost) - e1:SetTarget(c8649148.target) - e1:SetOperation(c8649148.operation) - c:RegisterEffect(e1) -end -function c8649148.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end -function c8649148.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable() -end -function c8649148.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and c8649148.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c8649148.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c8649148.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c8649148.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c86516889.lua b/script/c86516889.lua deleted file mode 100644 index ab61986170..0000000000 --- a/script/c86516889.lua +++ /dev/null @@ -1,36 +0,0 @@ ---ゴーストリック・パニック -function c86516889.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_POSITION) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,0x1e0) - e1:SetTarget(c86516889.target) - e1:SetOperation(c86516889.activate) - c:RegisterEffect(e1) -end -function c86516889.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsFacedown() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFacedown,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEDOWN) - local g=Duel.SelectTarget(tp,Card.IsFacedown,tp,LOCATION_MZONE,0,1,5,nil) - Duel.SetOperationInfo(0,CATEGORY_POSITION,g,g:GetCount(),0,0) -end -function c86516889.filter(c,e) - return c:IsFacedown() and c:IsRelateToEffect(e) -end -function c86516889.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(c86516889.filter,nil,e) - Duel.ChangePosition(g,POS_FACEUP_DEFENCE) - local ct=g:FilterCount(Card.IsSetCard,nil,0x8d) - if ct>0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE) - local sg=Duel.SelectMatchingCard(tp,Card.IsCanTurnSet,tp,0,LOCATION_MZONE,1,ct,nil) - if sg:GetCount()>0 then - Duel.HintSelection(sg) - Duel.ChangePosition(sg,POS_FACEDOWN_DEFENCE) - end - end -end diff --git a/script/c86532744.lua b/script/c86532744.lua deleted file mode 100644 index 9a4a95cf25..0000000000 --- a/script/c86532744.lua +++ /dev/null @@ -1,50 +0,0 @@ ---SNo.39 希望皇ホープONE -function c86532744.initial_effect(c) - --xyz summon - c:EnableReviveLimit() - aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_LIGHT),4,3,c86532744.ovfilter,aux.Stringid(86532744,1)) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE) - e1:SetDescription(aux.Stringid(86532744,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c86532744.condition) - e1:SetCost(c86532744.cost) - e1:SetTarget(c86532744.target) - e1:SetOperation(c86532744.operation) - c:RegisterEffect(e1) -end -c86532744.xyz_number=39 -function c86532744.ovfilter(c) - return c:IsFaceup() and c:IsCode(84013237) -end -function c86532744.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetLP(tp)<=Duel.GetLP(1-tp)-3000 -end -function c86532744.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLP(tp)>10 and e:GetHandler():CheckRemoveOverlayCard(tp,3,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,3,3,REASON_COST) - Duel.PayLPCost(tp,Duel.GetLP(tp)-10) -end -function c86532744.filter(c) - return c:IsDestructable() and c:IsAbleToRemove() - and bit.band(c:GetSummonType(),SUMMON_TYPE_SPECIAL)==SUMMON_TYPE_SPECIAL -end -function c86532744.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c86532744.filter(chkc) end - if chk==0 then return Duel.IsExistingMatchingCard(c86532744.filter,tp,0,LOCATION_MZONE,1,nil) end - local sg=Duel.GetMatchingGroup(c86532744.filter,tp,0,LOCATION_MZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,sg:GetCount(),0,0) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,sg:GetCount()*300) -end -function c86532744.operation(e,tp,eg,ep,ev,re,r,rp) - local sg=Duel.GetMatchingGroup(c86532744.filter,tp,0,LOCATION_MZONE,nil) - Duel.Destroy(sg,REASON_EFFECT,LOCATION_REMOVED) - local ct=Duel.GetOperatedGroup():FilterCount(Card.IsLocation,nil,LOCATION_REMOVED) - if ct>0 then - Duel.BreakEffect() - Duel.Damage(1-tp,ct*300,REASON_EFFECT) - end -end diff --git a/script/c86555018.lua b/script/c86555018.lua deleted file mode 100644 index ee56d88832..0000000000 --- a/script/c86555018.lua +++ /dev/null @@ -1,42 +0,0 @@ ---ストーンヘンジ・メソッド -function c86555018.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetCode(EVENT_DESTROYED) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e1:SetCondition(c86555018.condition) - e1:SetTarget(c86555018.target) - e1:SetOperation(c86555018.operation) - c:RegisterEffect(e1) -end -function c86555018.cfilter(c,tp) - return c:IsLocation(LOCATION_GRAVE) and c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_MZONE) - and c:IsSetCard(0x70) and c:IsType(TYPE_MONSTER) -end -function c86555018.condition(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c86555018.cfilter,1,nil,tp) -end -function c86555018.spfilter(c,e,tp) - return c:IsLevelBelow(4) and c:IsSetCard(0x70) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c86555018.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c86555018.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c86555018.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c86555018.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - local tc=g:GetFirst() - if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP_DEFENCE) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_CHANGE_POSITION) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1,true) - Duel.SpecialSummonComplete() - end -end diff --git a/script/c86559484.lua b/script/c86559484.lua deleted file mode 100644 index 181dde866d..0000000000 --- a/script/c86559484.lua +++ /dev/null @@ -1,68 +0,0 @@ ---X-レイ・ピアース -function c86559484.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(86559484,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1,86559484) - e1:SetCost(c86559484.spcost) - e1:SetTarget(c86559484.sptg) - e1:SetOperation(c86559484.spop) - c:RegisterEffect(e1) - --damage - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(86559484,1)) - e2:SetCategory(CATEGORY_DAMAGE) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e2:SetCountLimit(1,86559485) - e2:SetCondition(c86559484.damcon) - e2:SetTarget(c86559484.damtg) - e2:SetOperation(c86559484.damop) - c:RegisterEffect(e2) -end -function c86559484.cfilter(c,rac) - return c:IsRace(rac) and c:IsAbleToRemoveAsCost() -end -function c86559484.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c86559484.cfilter,tp,LOCATION_GRAVE,0,1,nil,RACE_DRAGON) - and Duel.IsExistingMatchingCard(c86559484.cfilter,tp,LOCATION_GRAVE,0,1,nil,RACE_WYRM) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g1=Duel.SelectMatchingCard(tp,c86559484.cfilter,tp,LOCATION_GRAVE,0,1,1,nil,RACE_DRAGON) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g2=Duel.SelectMatchingCard(tp,c86559484.cfilter,tp,LOCATION_GRAVE,0,1,1,nil,RACE_WYRM) - g1:Merge(g2) - Duel.Remove(g1,POS_FACEUP,REASON_COST) -end -function c86559484.spfilter(c,e,tp) - return c:IsCode(86559484) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c86559484.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c86559484.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) -end -function c86559484.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c86559484.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end -function c86559484.damcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) -end -function c86559484.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(500) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,500) -end -function c86559484.damop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c86585274.lua b/script/c86585274.lua deleted file mode 100644 index f2e2f01ff9..0000000000 --- a/script/c86585274.lua +++ /dev/null @@ -1,69 +0,0 @@ ---魔導法士 ジュノン -function c86585274.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(86585274,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND) - e1:SetCost(c86585274.spcost) - e1:SetTarget(c86585274.sptg) - e1:SetOperation(c86585274.spop) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(86585274,1)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCost(c86585274.descost) - e2:SetTarget(c86585274.destg) - e2:SetOperation(c86585274.desop) - c:RegisterEffect(e2) -end -function c86585274.cffilter(c) - return c:IsSetCard(0x106e) and c:IsType(TYPE_SPELL) and not c:IsPublic() -end -function c86585274.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c86585274.cffilter,tp,LOCATION_HAND,0,3,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) - local g=Duel.SelectMatchingCard(tp,c86585274.cffilter,tp,LOCATION_HAND,0,3,3,nil) - Duel.ConfirmCards(1-tp,g) - Duel.ShuffleHand(tp) -end -function c86585274.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c86585274.spop(e,tp,eg,ep,ev,re,r,rp,c) - local c=e:GetHandler() - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) - end -end -function c86585274.cfilter(c) - return c:IsSetCard(0x106e) and c:IsType(TYPE_SPELL) and c:IsAbleToRemoveAsCost() -end -function c86585274.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c86585274.cfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c86585274.cfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c86585274.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsDestructable() end - if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c86585274.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c86676862.lua b/script/c86676862.lua deleted file mode 100644 index 69d830d0c4..0000000000 --- a/script/c86676862.lua +++ /dev/null @@ -1,47 +0,0 @@ ---E-HERO マリシャス・デビル -function c86676862.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcCodeFun(c,58554959,c86676862.ffilter,1,true,true) - --spsummon condition - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e2:SetCode(EFFECT_SPSUMMON_CONDITION) - e2:SetValue(c86676862.splimit) - c:RegisterEffect(e2) - --Pos Change - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetCode(EFFECT_SET_POSITION) - e3:SetProperty(EFFECT_FLAG_SET_AVAILABLE) - e3:SetRange(LOCATION_MZONE) - e3:SetTargetRange(0,LOCATION_MZONE) - e3:SetCondition(c86676862.poscon) - e3:SetValue(POS_FACEUP_ATTACK) - c:RegisterEffect(e3) - --must attack - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_FIELD) - e4:SetCode(EFFECT_MUST_ATTACK) - e4:SetRange(LOCATION_MZONE) - e4:SetTargetRange(0,LOCATION_MZONE) - c:RegisterEffect(e4) - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_SINGLE) - e5:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e5:SetCode(EFFECT_MUST_BE_ATTACKED) - e5:SetRange(LOCATION_MZONE) - e5:SetValue(aux.imval1) - c:RegisterEffect(e5) -end -function c86676862.splimit(e,se,sp,st) - return st==SUMMON_TYPE_FUSION+0x10 -end -function c86676862.ffilter(c) - return c:IsRace(RACE_FIEND) and c:GetLevel()>=6 -end -function c86676862.poscon(e) - local ph=Duel.GetCurrentPhase() - return Duel.GetTurnPlayer()~=e:GetHandler():GetControler() and ph>=0x8 and ph<=0x20 -end diff --git a/script/c86686671.lua b/script/c86686671.lua deleted file mode 100644 index 415f9c8d99..0000000000 --- a/script/c86686671.lua +++ /dev/null @@ -1,72 +0,0 @@ ---サイバー・リペア・プラント -function c86686671.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_TODECK) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,86686671+EFFECT_COUNT_CODE_OATH) - e1:SetCondition(c86686671.condition) - e1:SetTarget(c86686671.target) - e1:SetOperation(c86686671.activate) - c:RegisterEffect(e1) -end -function c86686671.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_GRAVE,0,1,nil,70095154) -end -function c86686671.filter1(c) - return c:IsRace(RACE_MACHINE) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsAbleToHand() -end -function c86686671.filter2(c) - return c:IsRace(RACE_MACHINE) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsAbleToDeck() -end -function c86686671.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then - if e:GetLabel()~=0 then - return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c86686671.filter2(chkc) - else return false end - end - local b1=Duel.IsExistingMatchingCard(c86686671.filter1,tp,LOCATION_DECK,0,1,nil) - local b2=Duel.IsExistingTarget(c86686671.filter2,tp,LOCATION_GRAVE,0,1,nil) - if chk==0 then return b1 or b2 end - local op=0 - if b1 and b2 then - if Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_GRAVE,0,3,nil,70095154) then - op=Duel.SelectOption(tp,aux.Stringid(86686671,0),aux.Stringid(86686671,1),aux.Stringid(86686671,2)) - else - op=Duel.SelectOption(tp,aux.Stringid(86686671,0),aux.Stringid(86686671,1)) - end - elseif b1 then - op=Duel.SelectOption(tp,aux.Stringid(86686671,0)) - else - op=Duel.SelectOption(tp,aux.Stringid(86686671,1))+1 - end - e:SetLabel(op) - if op~=0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectTarget(tp,c86686671.filter2,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0) - e:SetProperty(EFFECT_FLAG_CARD_TARGET) - else - e:SetProperty(0) - end -end -function c86686671.activate(e,tp,eg,ep,ev,re,r,rp) - local op=e:GetLabel() - if op~=1 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c86686671.filter1,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end - end - if op~=0 then - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - if op==2 then Duel.BreakEffect() end - Duel.SendtoDeck(tc,nil,2,REASON_EFFECT) - end - end -end diff --git a/script/c86690572.lua b/script/c86690572.lua deleted file mode 100644 index 4b5e3b901b..0000000000 --- a/script/c86690572.lua +++ /dev/null @@ -1,68 +0,0 @@ ---炎渦の胎動 -function c86690572.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_CHAINING) - e1:SetCondition(c86690572.condition) - e1:SetCost(c86690572.cost) - e1:SetTarget(c86690572.target) - e1:SetOperation(c86690572.activate) - c:RegisterEffect(e1) - --to hand - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_TOHAND) - e2:SetDescription(aux.Stringid(86690572,0)) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_GRAVE) - e2:SetCost(c86690572.thcost) - e2:SetTarget(c86690572.thtg) - e2:SetOperation(c86690572.thop) - c:RegisterEffect(e2) -end -function c86690572.condition(e,tp,eg,ep,ev,re,r,rp) - return re:IsActiveType(TYPE_TRAP) and re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev) -end -function c86690572.cfilter(c) - return c:IsSetCard(0x39) and c:IsAbleToGraveAsCost() -end -function c86690572.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c86690572.cfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c86690572.cfilter,tp,LOCATION_HAND,0,1,1,nil) - Duel.SendtoGrave(g,REASON_COST) -end -function c86690572.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) - end -end -function c86690572.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateActivation(ev) - if re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(eg,REASON_EFFECT) - end -end -function c86690572.thfilter(c) - return c:IsAttribute(ATTRIBUTE_FIRE) and c:IsAbleToRemoveAsCost() -end -function c86690572.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c86690572.thfilter,tp,LOCATION_GRAVE,0,2,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c86690572.thfilter,tp,LOCATION_GRAVE,0,2,2,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c86690572.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToHand() end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0) -end -function c86690572.thop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SendtoHand(c,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,c) - end -end diff --git a/script/c86742443.lua b/script/c86742443.lua deleted file mode 100644 index 8edcb8135d..0000000000 --- a/script/c86742443.lua +++ /dev/null @@ -1,70 +0,0 @@ ---王宮の重税 -function c86742443.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(TIMING_STANDBY_PHASE) - e1:SetCondition(c86742443.condition) - e1:SetTarget(c86742443.target) - e1:SetOperation(c86742443.operation) - c:RegisterEffect(e1) -end -function c86742443.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()==PHASE_STANDBY and Duel.GetTurnPlayer()~=tp -end -function c86742443.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetFieldGroupCount(1-tp,LOCATION_HAND,0)>0 end -end -function c86742443.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetFieldGroupCount(1-tp,LOCATION_HAND,0)==0 then return end - local g=Duel.GetFieldGroup(1-tp,LOCATION_HAND,0):RandomSelect(tp,1) - local tc=g:GetFirst() - Duel.ConfirmCards(tp,tc) - Duel.ShuffleHand(1-tp) - local code=tc:GetCode() - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetCountLimit(1) - e1:SetCondition(c86742443.damcon) - e1:SetOperation(c86742443.damop) - e1:SetLabel(0) - e1:SetReset(RESET_PHASE+PHASE_END,2) - Duel.RegisterEffect(e1,tp) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_SUMMON_SUCCESS) - e2:SetOperation(c86742443.damop2) - e2:SetLabelObject(e1) - e2:SetLabel(code) - e2:SetReset(RESET_PHASE+PHASE_END,2) - Duel.RegisterEffect(e2,tp) - local e3=Effect.CreateEffect(e:GetHandler()) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e3:SetProperty(EFFECT_FLAG_DELAY) - e3:SetCode(EVENT_CHAIN_SOLVING) - e3:SetOperation(c86742443.damop3) - e3:SetLabelObject(e1) - e3:SetLabel(code) - e3:SetReset(RESET_PHASE+PHASE_END,2) - Duel.RegisterEffect(e3,tp) -end -function c86742443.damcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp and e:GetLabel()==0 -end -function c86742443.damop(e,tp,eg,ep,ev,re,r,rp) - Duel.Damage(1-tp,1000,REASON_EFFECT) -end -function c86742443.damop2(e,tp,eg,ep,ev,re,r,rp) - if eg:GetFirst():GetCode()==e:GetLabel() then - Duel.Damage(tp,1000,REASON_EFFECT) - e:GetLabelObject():SetLabel(1) - end -end -function c86742443.damop3(e,tp,eg,ep,ev,re,r,rp) - if re:GetHandler():GetCode()==e:GetLabel() then - Duel.Damage(tp,1000,REASON_EFFECT) - e:GetLabelObject():SetLabel(1) - end -end diff --git a/script/c86767655.lua b/script/c86767655.lua deleted file mode 100644 index d279b955ad..0000000000 --- a/script/c86767655.lua +++ /dev/null @@ -1,21 +0,0 @@ ---Ms.JUDGE -function c86767655.initial_effect(c) - --disable - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_CHAIN_SOLVING) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1,86767655) - e1:SetCondition(c86767655.discon) - e1:SetOperation(c86767655.disop) - c:RegisterEffect(e1) -end -function c86767655.discon(e,tp,eg,ep,ev,re,r,rp) - return rp~=tp and Duel.IsChainDisablable(ev) -end -function c86767655.disop(e,tp,eg,ep,ev,re,r,rp) - local c1,c2=Duel.TossCoin(tp,2) - if c1+c2==2 then - Duel.NegateEffect(ev) - end -end diff --git a/script/c86778566.lua b/script/c86778566.lua deleted file mode 100644 index 72f1415a1b..0000000000 --- a/script/c86778566.lua +++ /dev/null @@ -1,53 +0,0 @@ ---攻撃の無敵化 -function c86778566.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c86778566.condition) - e1:SetTarget(c86778566.target) - e1:SetOperation(c86778566.activate) - c:RegisterEffect(e1) -end -function c86778566.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()==PHASE_BATTLE -end -function c86778566.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) end - if chk==0 then return true end - local opt=0 - if Duel.IsExistingTarget(nil,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) then - opt=Duel.SelectOption(tp,aux.Stringid(86778566,0),aux.Stringid(86778566,1)) - else opt=Duel.SelectOption(tp,aux.Stringid(86778566,1))+1 end - e:SetLabel(opt) - if opt==0 then - e:SetProperty(EFFECT_FLAG_CARD_TARGET) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - Duel.SelectTarget(tp,nil,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - else e:SetProperty(0) end -end -function c86778566.activate(e,tp,eg,ep,ev,re,r,rp) - if e:GetLabel()==0 then - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e1:SetValue(1) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_BATTLE) - tc:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - tc:RegisterEffect(e2) - end - else - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_AVOID_BATTLE_DAMAGE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetTargetRange(1,0) - e1:SetValue(1) - e1:SetReset(RESET_PHASE+PHASE_BATTLE) - Duel.RegisterEffect(e1,tp) - end -end diff --git a/script/c86780027.lua b/script/c86780027.lua deleted file mode 100644 index 351c69afd5..0000000000 --- a/script/c86780027.lua +++ /dev/null @@ -1,39 +0,0 @@ ---一族の結束 -function c86780027.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --atk up - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(LOCATION_MZONE,0) - e2:SetLabel(0) - e2:SetTarget(c86780027.tg) - e2:SetValue(800) - c:RegisterEffect(e2) - --adjust - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e3:SetCode(EVENT_ADJUST) - e3:SetRange(LOCATION_SZONE) - e3:SetOperation(c86780027.adjustop) - c:RegisterEffect(e3) - e3:SetLabelObject(e2) -end -function c86780027.tg(e,c) - return c:IsRace(e:GetLabel()) -end -function c86780027.adjustop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsType,tp,LOCATION_GRAVE,0,nil,TYPE_MONSTER) - local te=e:GetLabelObject() - if g:GetCount()==0 then te:SetLabel(0) - else - local ct=g:GetClassCount(Card.GetOriginalRace) - if ct==1 then te:SetLabel(g:GetFirst():GetOriginalRace()) - else te:SetLabel(0) end - end -end diff --git a/script/c86801871.lua b/script/c86801871.lua deleted file mode 100644 index 717984c0e7..0000000000 --- a/script/c86801871.lua +++ /dev/null @@ -1,43 +0,0 @@ ---スネークポット -function c86801871.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(86801871,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP) - e1:SetTarget(c86801871.sptg) - e1:SetOperation(c86801871.spop) - c:RegisterEffect(e1) -end -function c86801871.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0) -end -function c86801871.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - if not Duel.IsPlayerCanSpecialSummonMonster(tp,86801872,0,0x4011,1200,1200,3,RACE_REPTILE,ATTRIBUTE_EARTH) then return end - local token=Duel.CreateToken(tp,86801872) - if Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetLabelObject(token) - e1:SetCondition(c86801871.damcon) - e1:SetOperation(c86801871.damop) - Duel.RegisterEffect(e1,tp) - end - Duel.SpecialSummonComplete() -end -function c86801871.damcon(e,tp,eg,ep,ev,re,r,rp) - local tok=e:GetLabelObject() - if eg:IsContains(tok) then - return true - else - if not tok:IsLocation(LOCATION_MZONE) then e:Reset() end - return false - end -end -function c86801871.damop(e,tp,eg,ep,ev,re,r,rp) - Duel.Damage(1-tp,500,REASON_EFFECT) -end diff --git a/script/c86804246.lua b/script/c86804246.lua deleted file mode 100644 index 56d0e1bb56..0000000000 --- a/script/c86804246.lua +++ /dev/null @@ -1,48 +0,0 @@ ---スーパーバグマン -function c86804246.initial_effect(c) - c:EnableReviveLimit() - c:SetUniqueOnField(1,1,86804246) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_SPSUM_PARAM) - e1:SetRange(LOCATION_HAND) - e1:SetTargetRange(POS_FACEUP_DEFENCE,0) - e1:SetCondition(c86804246.spcon) - e1:SetOperation(c86804246.spop) - c:RegisterEffect(e1) - --swap ad - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_SWAP_AD) - e2:SetRange(LOCATION_MZONE) - e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e2:SetTarget(c86804246.adfilter) - c:RegisterEffect(e2) -end -function c86804246.spfilter(c,code) - return c:IsCode(code) and c:IsAbleToRemoveAsCost() -end -function c86804246.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c86804246.spfilter,tp,LOCATION_GRAVE,0,1,nil,87526784) - and Duel.IsExistingMatchingCard(c86804246.spfilter,tp,LOCATION_GRAVE,0,1,nil,23915499) - and Duel.IsExistingMatchingCard(c86804246.spfilter,tp,LOCATION_GRAVE,0,1,nil,50319138) -end -function c86804246.spop(e,tp,eg,ep,ev,re,r,rp,c) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g1=Duel.SelectMatchingCard(tp,c86804246.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,87526784) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g2=Duel.SelectMatchingCard(tp,c86804246.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,23915499) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g3=Duel.SelectMatchingCard(tp,c86804246.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,50319138) - g1:Merge(g2) - g1:Merge(g3) - Duel.Remove(g1,POS_FACEUP,REASON_COST) -end -function c86804246.adfilter(e,c) - return c:IsPosition(POS_FACEUP_ATTACK) -end diff --git a/script/c86805855.lua b/script/c86805855.lua deleted file mode 100644 index 6ef07a3438..0000000000 --- a/script/c86805855.lua +++ /dev/null @@ -1,35 +0,0 @@ ---闇魔界の竜騎士 ダークソード -function c86805855.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcCode2(c,11321183,47415292,true,true) - --remove - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(86805855,0)) - e1:SetCategory(CATEGORY_REMOVE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_BATTLE_DAMAGE) - e1:SetCondition(c86805855.rmcon) - e1:SetTarget(c86805855.rmtg) - e1:SetOperation(c86805855.rmop) - c:RegisterEffect(e1) -end -function c86805855.rmcon(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp -end -function c86805855.filter(c) - return c:IsType(TYPE_MONSTER) and c:IsAbleToRemove() -end -function c86805855.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_GRAVE) and c86805855.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c86805855.filter,tp,0,LOCATION_GRAVE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,c86805855.filter,tp,0,LOCATION_GRAVE,1,3,nil) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,0) -end -function c86805855.rmop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local sg=g:Filter(Card.IsRelateToEffect,nil,e) - Duel.Remove(sg,POS_FACEUP,REASON_EFFECT) -end diff --git a/script/c86821010.lua b/script/c86821010.lua deleted file mode 100644 index f4a49ccd4e..0000000000 --- a/script/c86821010.lua +++ /dev/null @@ -1,39 +0,0 @@ ---パワー・ブレイク -function c86821010.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TODECK+CATEGORY_DAMAGE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c86821010.condition) - e1:SetTarget(c86821010.target) - e1:SetOperation(c86821010.activate) - c:RegisterEffect(e1) -end -function c86821010.cfilter(c) - return c:IsFaceup() and c:IsCode(2403771) -end -function c86821010.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c86821010.cfilter,tp,LOCATION_ONFIELD,0,1,nil) -end -function c86821010.filter(c) - return c:IsType(TYPE_EQUIP) and c:IsAbleToDeck() -end -function c86821010.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_SZONE+LOCATION_GRAVE) and chkc:IsControler(tp) and c86821010.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c86821010.filter,tp,LOCATION_SZONE+LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectTarget(tp,c86821010.filter,tp,LOCATION_SZONE+LOCATION_GRAVE,0,1,3,nil) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,g:GetCount()*500) -end -function c86821010.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) - Duel.SendtoDeck(g,nil,2,REASON_EFFECT) - local g=Duel.GetOperatedGroup() - local ct=g:FilterCount(Card.IsLocation,nil,LOCATION_DECK+LOCATION_EXTRA) - if ct>0 then - Duel.Damage(1-tp,ct*500,REASON_EFFECT) - end -end diff --git a/script/c86825483.lua b/script/c86825483.lua deleted file mode 100644 index 533f6f7fbe..0000000000 --- a/script/c86825483.lua +++ /dev/null @@ -1,19 +0,0 @@ ---神星なる領域 -function c86825483.initial_effect(c) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --inactivatable - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_CANNOT_INACTIVATE) - e2:SetRange(LOCATION_SZONE) - e2:SetValue(c86825483.efilter) - c:RegisterEffect(e2) -end -function c86825483.efilter(e,ct) - local te=Duel.GetChainInfo(ct,CHAININFO_TRIGGERING_EFFECT) - local tc=te:GetHandler() - return te:IsActiveType(TYPE_MONSTER) and tc:IsAttribute(ATTRIBUTE_LIGHT) -end diff --git a/script/c86827882.lua b/script/c86827882.lua deleted file mode 100644 index 47d2b1774e..0000000000 --- a/script/c86827882.lua +++ /dev/null @@ -1,50 +0,0 @@ ---極星宝メギンギョルズ -function c86827882.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetCondition(c86827882.condition) - e1:SetTarget(c86827882.target) - e1:SetOperation(c86827882.activate) - c:RegisterEffect(e1) -end -function c86827882.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end -function c86827882.filter(c) - return c:IsFaceup() and (c:IsSetCard(0x42) or c:IsSetCard(0x4b)) -end -function c86827882.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c86827882.filter(chkc) end - local exc=nil - if Duel.GetCurrentPhase()==PHASE_DAMAGE and Duel.GetAttackTarget()==nil then exc=Duel.GetAttacker() end - if chk==0 then return Duel.IsExistingTarget(c86827882.filter,tp,LOCATION_MZONE,0,1,exc) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c86827882.filter,tp,LOCATION_MZONE,0,1,1,exc) -end -function c86827882.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - e1:SetValue(tc:GetBaseAttack()*2) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_SET_DEFENCE_FINAL) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - e2:SetValue(tc:GetBaseDefence()*2) - tc:RegisterEffect(e2) - local e3=Effect.CreateEffect(e:GetHandler()) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_CANNOT_DIRECT_ATTACK) - e3:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - tc:RegisterEffect(e3) - end -end diff --git a/script/c86840720.lua b/script/c86840720.lua deleted file mode 100644 index b74873d181..0000000000 --- a/script/c86840720.lua +++ /dev/null @@ -1,37 +0,0 @@ ---魔轟神ディフ -function c86840720.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(86840720,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c86840720.spcost) - e1:SetTarget(c86840720.sptg) - e1:SetOperation(c86840720.spop) - c:RegisterEffect(e1) -end -function c86840720.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end -function c86840720.filter(c,e,tp) - return c:IsSetCard(0x35) and c:IsPreviousLocation(LOCATION_HAND) and c:IsControler(tp) - and c:IsCanBeEffectTarget(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c86840720.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return eg:IsContains(chkc) and c86840720.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 and eg:IsExists(c86840720.filter,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=eg:FilterSelect(tp,c86840720.filter,1,1,nil,e,tp) - Duel.SetTargetCard(g) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c86840720.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c86848580.lua b/script/c86848580.lua deleted file mode 100644 index 64db966c12..0000000000 --- a/script/c86848580.lua +++ /dev/null @@ -1,59 +0,0 @@ ---零鳥獣シルフィーネ -function c86848580.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsRace,RACE_WINDBEAST),4,2) - c:EnableReviveLimit() - --negate - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(86848580,0)) - e1:SetCategory(CATEGORY_DISABLE) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCost(c86848580.discost) - e1:SetTarget(c86848580.distg) - e1:SetOperation(c86848580.disop) - c:RegisterEffect(e1) -end -function c86848580.discost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c86848580.distg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(aux.disfilter1,tp,0,LOCATION_ONFIELD,1,nil) end -end -function c86848580.disop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(aux.disfilter1,tp,0,LOCATION_ONFIELD,nil) - local tc=g:GetFirst() - if not tc then return end - local c=e:GetHandler() - while tc do - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_STANDBY,2) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_STANDBY,2) - tc:RegisterEffect(e2) - if tc:IsType(TYPE_TRAPMONSTER) then - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_DISABLE_TRAPMONSTER) - e3:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_STANDBY,2) - tc:RegisterEffect(e3) - end - tc=g:GetNext() - end - local atk=Duel.GetMatchingGroupCount(Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,c)*300 - if atk>0 then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(atk) - e1:SetReset(RESET_EVENT+0x1ff0000+RESET_PHASE+PHASE_STANDBY,2) - c:RegisterEffect(e1) - end -end diff --git a/script/c86868952.lua b/script/c86868952.lua deleted file mode 100644 index 8e4533c88b..0000000000 --- a/script/c86868952.lua +++ /dev/null @@ -1,54 +0,0 @@ ---武神器-ヤツカ -function c86868952.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(86868952,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCondition(c86868952.condition) - e1:SetCost(c86868952.cost) - e1:SetTarget(c86868952.target) - e1:SetOperation(c86868952.operation) - c:RegisterEffect(e1) -end -function c86868952.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsAbleToEnterBP() -end -function c86868952.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end -function c86868952.filter(c) - return c:IsFaceup() and c:IsSetCard(0x88) and not c:IsHasEffect(EFFECT_EXTRA_ATTACK) -end -function c86868952.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c86868952.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c86868952.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - local g=Duel.SelectTarget(tp,c86868952.filter,tp,LOCATION_MZONE,0,1,1,nil) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetProperty(EFFECT_FLAG_OATH) - e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetTarget(c86868952.ftarget) - e1:SetLabel(g:GetFirst():GetFieldID()) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function c86868952.ftarget(e,c) - return e:GetLabel()~=c:GetFieldID() -end -function c86868952.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_EXTRA_ATTACK) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - e1:SetValue(1) - tc:RegisterEffect(e1) - end -end diff --git a/script/c86871614.lua b/script/c86871614.lua deleted file mode 100644 index a167bfd9b0..0000000000 --- a/script/c86871614.lua +++ /dev/null @@ -1,77 +0,0 @@ ---クローン複製 -function c86871614.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetCondition(c86871614.condition) - e1:SetTarget(c86871614.target) - e1:SetOperation(c86871614.activate) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - c:RegisterEffect(e2) -end -function c86871614.condition(e,tp,eg,ep,ev,re,r,rp) - local ec=eg:GetFirst() - return ep~=tp -end -function c86871614.target(e,tp,eg,ep,ev,re,r,rp,chk) - local ec=eg:GetFirst() - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and - Duel.IsPlayerCanSpecialSummonMonster(tp,86871615,0,0x4011,ec:GetBaseAttack(),ec:GetBaseDefence(), - ec:GetOriginalLevel(),ec:GetOriginalRace(),ec:GetOriginalAttribute()) end - ec:CreateEffectRelation(e) - Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0) -end -function c86871614.activate(e,tp,eg,ep,ev,re,r,rp) - local ec=eg:GetFirst() - if not ec:IsRelateToEffect(e) or ec:IsFacedown() then return end - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 - or not Duel.IsPlayerCanSpecialSummonMonster(tp,86871615,0,0x4011,ec:GetBaseAttack(),ec:GetBaseDefence(), - ec:GetOriginalLevel(),ec:GetOriginalRace(),ec:GetOriginalAttribute()) then return end - ec:RegisterFlagEffect(86871614,RESET_EVENT+0x17a0000,0,0) - local token=Duel.CreateToken(tp,86871615) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_BASE_ATTACK) - e1:SetValue(ec:GetBaseAttack()) - e1:SetReset(RESET_EVENT+0xfe0000) - token:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_SET_BASE_DEFENCE) - e2:SetValue(ec:GetBaseDefence()) - token:RegisterEffect(e2) - local e3=e1:Clone() - e3:SetCode(EFFECT_CHANGE_LEVEL) - e3:SetValue(ec:GetOriginalLevel()) - token:RegisterEffect(e3) - local e4=e1:Clone() - e4:SetCode(EFFECT_CHANGE_RACE) - e4:SetValue(ec:GetOriginalRace()) - token:RegisterEffect(e4) - local e5=e1:Clone() - e5:SetCode(EFFECT_CHANGE_ATTRIBUTE) - e5:SetValue(ec:GetOriginalAttribute()) - token:RegisterEffect(e5) - Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP) - local de=Effect.CreateEffect(e:GetHandler()) - de:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - de:SetRange(LOCATION_MZONE) - de:SetCode(EVENT_TO_GRAVE) - de:SetCondition(c86871614.descon) - de:SetOperation(c86871614.desop) - de:SetReset(RESET_EVENT+0xfe0000) - token:RegisterEffect(de) -end -function c86871614.dfilter(c) - return c:IsReason(REASON_DESTROY) and c:GetFlagEffect(86871614)~=0 -end -function c86871614.descon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c86871614.dfilter,1,nil) -end -function c86871614.desop(e,tp,eg,ep,ev,re,r,rp) - Duel.Destroy(e:GetHandler(),REASON_EFFECT) -end diff --git a/script/c8687195.lua b/script/c8687195.lua deleted file mode 100644 index 63be5e638e..0000000000 --- a/script/c8687195.lua +++ /dev/null @@ -1,28 +0,0 @@ ---幻影の妖精 -function c8687195.initial_effect(c) - --change target - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(8687195,0)) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_BATTLE_CONFIRM) - e1:SetCondition(c8687195.condition) - e1:SetTarget(c8687195.target) - e1:SetOperation(c8687195.operation) - c:RegisterEffect(e1) -end -function c8687195.condition(e,tp,eg,ep,ev,re,r,rp) - return r~=REASON_REPLACE and Duel.GetAttackTarget()==e:GetHandler() and Duel.GetAttacker():IsControler(1-tp) -end -function c8687195.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,nil,tp,LOCATION_MZONE,0,1,1,e:GetHandler()) -end -function c8687195.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.ChangeAttackTarget(tc) - end -end diff --git a/script/c86889202.lua b/script/c86889202.lua deleted file mode 100644 index bd3b658d28..0000000000 --- a/script/c86889202.lua +++ /dev/null @@ -1,57 +0,0 @@ ---番犬-ウォッチドッグ -function c86889202.initial_effect(c) - --sset - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetOperation(c86889202.regop) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(86889202,0)) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,86889202) - e2:SetCondition(c86889202.condition) - e2:SetCost(c86889202.cost) - e2:SetTarget(c86889202.target) - e2:SetOperation(c86889202.operation) - c:RegisterEffect(e2) -end -function c86889202.regop(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():RegisterFlagEffect(86889202,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) -end -function c86889202.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetFlagEffect(86889202)~=0 and Duel.GetCurrentPhase()==PHASE_MAIN2 -end -function c86889202.cfilter(c) - return c:IsType(TYPE_SPELL) and c:IsAbleToGraveAsCost() -end -function c86889202.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_SPSUMMON)==0 - and Duel.IsExistingMatchingCard(c86889202.cfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,c86889202.cfilter,1,1,REASON_COST) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) - e1:SetTargetRange(1,0) - Duel.RegisterEffect(e1,tp) -end -function c86889202.filter(c) - return c:GetType()==TYPE_SPELL+TYPE_CONTINUOUS and c:IsSSetable() -end -function c86889202.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingMatchingCard(c86889202.filter,tp,LOCATION_DECK,0,1,nil) end -end -function c86889202.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) - local g=Duel.SelectMatchingCard(tp,c86889202.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SSet(tp,g:GetFirst()) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c86915847.lua b/script/c86915847.lua deleted file mode 100644 index 2c402d7135..0000000000 --- a/script/c86915847.lua +++ /dev/null @@ -1,31 +0,0 @@ ---アーマード・ビー -function c86915847.initial_effect(c) - --atk down - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(86915847,0)) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetTarget(c86915847.target) - e1:SetOperation(c86915847.operation) - c:RegisterEffect(e1) -end -function c86915847.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsFaceup() and chkc:IsLocation(LOCATION_MZONE) end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil) -end -function c86915847.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e1:SetValue(tc:GetAttack()/2) - tc:RegisterEffect(e1) - end -end diff --git a/script/c8692301.lua b/script/c8692301.lua deleted file mode 100644 index e6bb2b4c1e..0000000000 --- a/script/c8692301.lua +++ /dev/null @@ -1,6 +0,0 @@ ---ジェムナイト・ジルコニア -function c8692301.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcFun2(c,aux.FilterBoolFunction(Card.IsSetCard,0x1047),aux.FilterBoolFunction(Card.IsRace,RACE_ROCK),true) -end diff --git a/script/c86952477.lua b/script/c86952477.lua deleted file mode 100644 index bed461e1a7..0000000000 --- a/script/c86952477.lua +++ /dev/null @@ -1,15 +0,0 @@ ---シャインナイト -function c86952477.initial_effect(c) - --lvchange - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CHANGE_LEVEL) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c86952477.lvcon) - e1:SetValue(4) - c:RegisterEffect(e1) -end -function c86952477.lvcon(e) - return e:GetHandler():IsDefencePos() -end diff --git a/script/c8696773.lua b/script/c8696773.lua deleted file mode 100644 index 6b6a629b32..0000000000 --- a/script/c8696773.lua +++ /dev/null @@ -1,75 +0,0 @@ ---陽炎獣 ヒュドラー -function c8696773.initial_effect(c) - --cannot be target - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetValue(aux.tgoval) - c:RegisterEffect(e1) - --sum limit - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetTargetRange(1,0) - e2:SetTarget(c8696773.splimit) - c:RegisterEffect(e2) - --effect gain - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e3:SetCode(EVENT_BE_MATERIAL) - e3:SetCondition(c8696773.effcon) - e3:SetOperation(c8696773.effop) - c:RegisterEffect(e3) -end -function c8696773.splimit(e,c,tp,sumtp,sumpos) - return c:GetAttribute()~=ATTRIBUTE_FIRE -end -function c8696773.effcon(e,tp,eg,ep,ev,re,r,rp) - return r==REASON_XYZ -end -function c8696773.effop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local rc=c:GetReasonCard() - local e1=Effect.CreateEffect(rc) - e1:SetDescription(aux.Stringid(8696773,0)) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(c8696773.matcon) - e1:SetTarget(c8696773.mattg) - e1:SetOperation(c8696773.matop) - e1:SetReset(RESET_EVENT+0x1fe0000) - rc:RegisterEffect(e1,true) - if not rc:IsType(TYPE_EFFECT) then - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_ADD_TYPE) - e2:SetValue(TYPE_EFFECT) - e2:SetReset(RESET_EVENT+0x1fe0000) - rc:RegisterEffect(e2,true) - end -end -function c8696773.matcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_XYZ -end -function c8696773.matfilter(c) - return c:IsSetCard(0x107d) and c:IsType(TYPE_MONSTER) -end -function c8696773.mattg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c8696773.matfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c8696773.matfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL) - local g=Duel.SelectTarget(tp,c8696773.matfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g,1,0,0) -end -function c8696773.matop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then - Duel.Overlay(c,Group.FromCards(tc)) - end -end diff --git a/script/c8698851.lua b/script/c8698851.lua deleted file mode 100644 index 7ac2262bb2..0000000000 --- a/script/c8698851.lua +++ /dev/null @@ -1,28 +0,0 @@ ---D-カウンター -function c8698851.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_BE_BATTLE_TARGET) - e1:SetCondition(c8698851.condition) - e1:SetTarget(c8698851.target) - e1:SetOperation(c8698851.operation) - c:RegisterEffect(e1) -end -function c8698851.condition(e,tp,eg,ep,ev,re,r,rp) - local tc=eg:GetFirst() - return tc:IsControler(tp) and tc:IsPosition(POS_FACEUP) and tc:IsSetCard(0xc008) -end -function c8698851.target(e,tp,eg,ep,ev,re,r,rp,chk) - local a=Duel.GetAttacker() - if chk==0 then return a:IsOnField() and a:IsDestructable() end - Duel.SetTargetCard(a) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,a,1,0,0) -end -function c8698851.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsAttackable() and not tc:IsStatus(STATUS_ATTACK_CANCELED) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c86988864.lua b/script/c86988864.lua deleted file mode 100644 index acab1e32d0..0000000000 --- a/script/c86988864.lua +++ /dev/null @@ -1,35 +0,0 @@ ---みつこぶラクーダ -function c86988864.initial_effect(c) - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(86988864,0)) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCategory(CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c86988864.condition) - e1:SetCost(c86988864.cost) - e1:SetTarget(c86988864.target) - e1:SetOperation(c86988864.operation) - c:RegisterEffect(e1) -end -function c86988864.cfilter(c) - return c:IsFaceup() and c:IsCode(86988864) -end -function c86988864.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c86988864.cfilter,tp,LOCATION_MZONE,0,3,nil) -end -function c86988864.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,c86988864.cfilter,2,nil) end - local g=Duel.SelectReleaseGroup(tp,c86988864.cfilter,2,2,nil) - Duel.Release(g,REASON_COST) -end -function c86988864.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp,3) end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(3) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,3) -end -function c86988864.operation(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end diff --git a/script/c86997073.lua b/script/c86997073.lua deleted file mode 100644 index 353f75fca9..0000000000 --- a/script/c86997073.lua +++ /dev/null @@ -1,35 +0,0 @@ ---機動要塞フォルテシモ -function c86997073.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(86997073,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_SZONE) - e1:SetTarget(c86997073.target) - e1:SetOperation(c86997073.operation) - c:RegisterEffect(e1) -end -function c86997073.filter(c,e,sp) - return c:IsSetCard(0x6013) and c:IsCanBeSpecialSummoned(e,0,sp,false,false) -end -function c86997073.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c86997073.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c86997073.operation(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c86997073.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c87008374.lua b/script/c87008374.lua deleted file mode 100644 index 70d4dff0ad..0000000000 --- a/script/c87008374.lua +++ /dev/null @@ -1,80 +0,0 @@ ---ZW-不死鳥弩弓 -function c87008374.initial_effect(c) - c:SetUniqueOnField(1,0,87008374) - --equip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(87008374,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c87008374.eqcon) - e1:SetTarget(c87008374.eqtg) - e1:SetOperation(c87008374.eqop) - c:RegisterEffect(e1) - --damage - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(87008374,1)) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e3:SetCode(EVENT_BATTLE_DESTROYING) - e3:SetRange(LOCATION_SZONE) - e3:SetCondition(c87008374.damcon) - e3:SetTarget(c87008374.damtg) - e3:SetOperation(c87008374.damop) - c:RegisterEffect(e3) -end -function c87008374.eqcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():CheckUniqueOnField(tp) -end -function c87008374.filter(c) - return c:IsFaceup() and c:IsCode(56840427) -end -function c87008374.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c87008374.filter(chkc) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingTarget(c87008374.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c87008374.filter,tp,LOCATION_MZONE,0,1,1,nil) -end -function c87008374.eqop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) then return end - local tc=Duel.GetFirstTarget() - if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or tc:GetControler()~=tp or tc:IsFacedown() or not tc:IsRelateToEffect(e) or not c:CheckUniqueOnField(tp) then - Duel.SendtoGrave(c,REASON_EFFECT) - return - end - Duel.Equip(tp,c,tc,true) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(c87008374.eqlimit) - e1:SetLabelObject(tc) - c:RegisterEffect(e1) - --atkup - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(1100) - e2:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e2) -end -function c87008374.damcon(e,tp,eg,ep,ev,re,r,rp) - local ec=e:GetHandler():GetEquipTarget() - return ec and eg:IsContains(ec) -end -function c87008374.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(1000) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,1000) -end -function c87008374.damop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end -function c87008374.eqlimit(e,c) - return c==e:GetLabelObject() -end diff --git a/script/c87010442.lua b/script/c87010442.lua deleted file mode 100644 index 9afc5287fb..0000000000 --- a/script/c87010442.lua +++ /dev/null @@ -1,28 +0,0 @@ ---レガシーハンター -function c87010442.initial_effect(c) - --todeck - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(87010442,0)) - e1:SetCategory(CATEGORY_TODECK) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_BATTLE_DESTROYING) - e1:SetCondition(c87010442.condition) - e1:SetTarget(c87010442.target) - e1:SetOperation(c87010442.operation) - c:RegisterEffect(e1) -end -function c87010442.condition(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local bc=c:GetBattleTarget() - return bc:GetBattlePosition()==POS_FACEDOWN_DEFENCE and c:IsRelateToBattle() and c:IsFaceup() -end -function c87010442.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TODECK,0,0,1-tp,LOCATION_HAND) -end -function c87010442.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetFieldGroup(1-tp,LOCATION_HAND,0,nil) - if g:GetCount()==0 then return end - local sg=g:RandomSelect(1-tp,1) - Duel.SendtoDeck(sg,nil,2,REASON_EFFECT) -end diff --git a/script/c87025064.lua b/script/c87025064.lua deleted file mode 100644 index 9258345571..0000000000 --- a/script/c87025064.lua +++ /dev/null @@ -1,30 +0,0 @@ ---銀龍の轟咆 -function c87025064.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,87025064+EFFECT_COUNT_CODE_OATH) - e1:SetTarget(c87025064.target) - e1:SetOperation(c87025064.activate) - c:RegisterEffect(e1) -end -function c87025064.filter(c,e,tp) - return c:IsRace(RACE_DRAGON) and c:IsType(TYPE_NORMAL) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c87025064.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c87025064.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c87025064.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c87025064.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c87025064.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c87043568.lua b/script/c87043568.lua deleted file mode 100644 index 7b63ff436e..0000000000 --- a/script/c87043568.lua +++ /dev/null @@ -1,83 +0,0 @@ ---アサルト・スピリッツ -function c87043568.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c87043568.target) - e1:SetOperation(c87043568.operation) - c:RegisterEffect(e1) -end -function c87043568.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c87043568.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsLocation(LOCATION_SZONE) then return end - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,c,tc) - c:CancelToGrave() - --atkup - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(87043568,0)) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetRange(LOCATION_SZONE) - e1:SetCountLimit(1) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e1:SetCondition(c87043568.atkcon) - e1:SetCost(c87043568.atkcost) - e1:SetOperation(c87043568.atkop) - e1:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e1) - --Equip limit - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_EQUIP_LIMIT) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetValue(c87043568.eqlimit) - e2:SetReset(RESET_EVENT+0x1fe0000) - e2:SetLabelObject(tc) - c:RegisterEffect(e2) - end -end -function c87043568.eqlimit(e,c) - return c:GetControler()==e:GetOwnerPlayer() and c==e:GetLabelObject() -end -function c87043568.atkcon(e,tp,eg,ep,ev,re,r,rp) - local a=Duel.GetAttacker() - local ph=Duel.GetCurrentPhase() - return a==e:GetHandler():GetEquipTarget() - and ph==PHASE_DAMAGE and not Duel.IsDamageCalculated() -end -function c87043568.cfilter(c) - return c:IsType(TYPE_MONSTER) and c:IsAttackBelow(1000) and c:IsAbleToGraveAsCost() -end -function c87043568.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c87043568.cfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c87043568.cfilter,tp,LOCATION_HAND,0,1,1,nil) - e:SetLabel(g:GetFirst():GetAttack()) - Duel.SendtoGrave(g,REASON_COST) -end -function c87043568.atkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local a=Duel.GetAttacker() - if c:IsRelateToEffect(e) and a:IsRelateToBattle() and a:IsFaceup() then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e1:SetValue(e:GetLabel()) - a:RegisterEffect(e1) - end -end diff --git a/script/c87046457.lua b/script/c87046457.lua deleted file mode 100644 index 2ad37c46d4..0000000000 --- a/script/c87046457.lua +++ /dev/null @@ -1,88 +0,0 @@ ---オーバー・デッド・ライン -function c87046457.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c87046457.acttg) - c:RegisterEffect(e1) - -- - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(87046457,0)) - e2:SetCategory(CATEGORY_ATKCHANGE) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetRange(LOCATION_SZONE) - e2:SetTarget(c87046457.target) - e2:SetOperation(c87046457.operation) - c:RegisterEffect(e2) - --atk - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetCode(EFFECT_UPDATE_ATTACK) - e3:SetRange(LOCATION_SZONE) - e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e3:SetCondition(c87046457.atkcon) - e3:SetTarget(c87046457.atktg) - e3:SetValue(1000) - c:RegisterEffect(e3) - local g=Group.CreateGroup() - g:KeepAlive() - e2:SetLabelObject(g) - e3:SetLabelObject(g) -end -function c87046457.acttg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local c=e:GetHandler() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_SZONE) - e1:SetCondition(c87046457.descon) - e1:SetOperation(c87046457.desop) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END+RESET_SELF_TURN,2) - c:RegisterEffect(e1) - c:SetTurnCounter(0) -end -function c87046457.descon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c87046457.desop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local ct=c:GetTurnCounter() - ct=ct+1 - c:SetTurnCounter(ct) - if ct==2 then - Duel.Destroy(c,REASON_EFFECT) - end -end -function c87046457.filter(c,e,tp) - return c:IsFaceup() and c:IsRace(RACE_PLANT) and c:IsControler(tp) and c:IsPreviousLocation(LOCATION_GRAVE) and (not e or c:IsRelateToEffect(e)) -end -function c87046457.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return eg:IsExists(c87046457.filter,1,nil,nil,tp) end - Duel.SetTargetCard(eg) -end -function c87046457.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) then return end - local atkg=e:GetLabelObject() - if c:GetFlagEffect(87046457)==0 then - c:RegisterFlagEffect(87046457,RESET_EVENT+0x1ff0000,0,1) - atkg:Clear() - end - local g=eg:Filter(c87046457.filter,nil,e,tp) - local tc=g:GetFirst() - while tc do - tc:RegisterFlagEffect(87046457,RESET_EVENT+0x1fe0000,0,1) - atkg:AddCard(tc) - tc=g:GetNext() - end -end -function c87046457.atkcon(e) - return e:GetHandler():GetFlagEffect(87046457)~=0 -end -function c87046457.atktg(e,c) - return e:GetLabelObject():IsContains(c) and c:GetFlagEffect(87046457)~=0 -end diff --git a/script/c87047074.lua b/script/c87047074.lua deleted file mode 100644 index 910b52291e..0000000000 --- a/script/c87047074.lua +++ /dev/null @@ -1,62 +0,0 @@ ---甲虫装機の魔弓 ゼクトアロー -function c87047074.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c87047074.target) - e1:SetOperation(c87047074.operation) - c:RegisterEffect(e1) - --Atk - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(500) - c:RegisterEffect(e2) - --Equip limit - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_EQUIP_LIMIT) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e3:SetValue(c87047074.eqlimit) - c:RegisterEffect(e3) - --chain limit - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e4:SetRange(LOCATION_SZONE) - e4:SetCode(EVENT_CHAINING) - e4:SetCondition(c87047074.chcon) - e4:SetOperation(c87047074.chop) - c:RegisterEffect(e4) -end -function c87047074.eqlimit(e,c) - return c:IsSetCard(0x56) -end -function c87047074.filter(c) - return c:IsFaceup() and c:IsSetCard(0x56) -end -function c87047074.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c87047074.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c87047074.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c87047074.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c87047074.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,c,tc) - end -end -function c87047074.chcon(e,tp,eg,ep,ev,re,r,rp) - return re:GetHandler()==e:GetHandler():GetEquipTarget() -end -function c87047074.chop(e,tp,eg,ep,ev,re,r,rp) - Duel.SetChainLimit(c87047074.chlimit) -end -function c87047074.chlimit(e,ep,tp) - return ep==tp -end diff --git a/script/c87047161.lua b/script/c87047161.lua deleted file mode 100644 index da90b65b62..0000000000 --- a/script/c87047161.lua +++ /dev/null @@ -1,28 +0,0 @@ ---マーメイド・シャーク -function c87047161.initial_effect(c) - --tohand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(87047161,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c87047161.target) - e1:SetOperation(c87047161.operation) - c:RegisterEffect(e1) -end -function c87047161.filter(c) - local lv=c:GetLevel() - return (lv==3 or lv==4 or lv==5) and c:IsRace(RACE_FISH) and c:IsAbleToHand() -end -function c87047161.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c87047161.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c87047161.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c87047161.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c87102774.lua b/script/c87102774.lua deleted file mode 100644 index ac827effcb..0000000000 --- a/script/c87102774.lua +++ /dev/null @@ -1,38 +0,0 @@ ---黄金の天道虫 -function c87102774.initial_effect(c) - --recover - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(87102774,0)) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetCategory(CATEGORY_RECOVER) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(1) - e1:SetCondition(c87102774.reccon) - e1:SetCost(c87102774.reccost) - e1:SetTarget(c87102774.rectg) - e1:SetOperation(c87102774.recop) - c:RegisterEffect(e1) -end -function c87102774.reccon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c87102774.reccost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return not e:GetHandler():IsPublic() end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_PUBLIC) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e:GetHandler():RegisterEffect(e1) -end -function c87102774.rectg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(500) - Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,500) -end -function c87102774.recop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Recover(p,d,REASON_EFFECT) -end diff --git a/script/c87106146.lua b/script/c87106146.lua deleted file mode 100644 index 29d7f9df47..0000000000 --- a/script/c87106146.lua +++ /dev/null @@ -1,33 +0,0 @@ ---ダメージ・ゲート -function c87106146.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_BATTLE_DAMAGE) - e1:SetCondition(c87106146.condition) - e1:SetTarget(c87106146.target) - e1:SetOperation(c87106146.activate) - c:RegisterEffect(e1) -end -function c87106146.condition(e,tp,eg,ep,ev,re,r,rp) - return ep==tp -end -function c87106146.filter(c,e,tp,dam) - return c:IsAttackBelow(dam) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c87106146.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c87106146.filter(chkc,e,tp,ev) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c87106146.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp,ev) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c87106146.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp,ev) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c87106146.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c87118301.lua b/script/c87118301.lua deleted file mode 100644 index d81ec0cfcc..0000000000 --- a/script/c87118301.lua +++ /dev/null @@ -1,31 +0,0 @@ ---霊獣使い レラ -function c87118301.initial_effect(c) - c:SetSPSummonOnce(87118301) - --spsuccess - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(87118301,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c87118301.sptg) - e1:SetOperation(c87118301.spop) - c:RegisterEffect(e1) -end -function c87118301.filter(c,e,tp) - return c:IsSetCard(0xb5) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c87118301.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c87118301.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c87118301.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c87118301.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c87118301.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c87148330.lua b/script/c87148330.lua deleted file mode 100644 index a3dbf19492..0000000000 --- a/script/c87148330.lua +++ /dev/null @@ -1,41 +0,0 @@ ---光神テテュス -function c87148330.initial_effect(c) - --draw - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(87148330,0)) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_PLAYER_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_DRAW) - e1:SetCost(c87148330.drcost) - e1:SetTarget(c87148330.drtg) - e1:SetOperation(c87148330.drop) - c:RegisterEffect(e1) -end -function c87148330.filter(c) - return c:IsRace(RACE_FAIRY) and not c:IsPublic() -end -function c87148330.drcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return ep==tp and eg:IsExists(c87148330.filter,1,nil) end - local g=eg:Filter(c87148330.filter,nil) - if g:GetCount()==1 then - Duel.ConfirmCards(1-tp,g) - Duel.ShuffleHand(tp) - else - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) - local sg=g:Select(tp,1,1,nil) - Duel.ConfirmCards(1-tp,sg) - Duel.ShuffleHand(tp) - end -end -function c87148330.drtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(1) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c87148330.drop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsFacedown() or not e:GetHandler():IsRelateToEffect(e) then return end - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end diff --git a/script/c8719957.lua b/script/c8719957.lua deleted file mode 100644 index 63f14b23e4..0000000000 --- a/script/c8719957.lua +++ /dev/null @@ -1,60 +0,0 @@ ---アビスケイル-クラーケン -function c8719957.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c8719957.target) - e1:SetOperation(c8719957.operation) - c:RegisterEffect(e1) - --Atk up - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(400) - c:RegisterEffect(e2) - --Equip limit - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_EQUIP_LIMIT) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e3:SetValue(c8719957.eqlimit) - c:RegisterEffect(e3) - --negate - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e4:SetCode(EVENT_CHAIN_SOLVING) - e4:SetRange(LOCATION_SZONE) - e4:SetCondition(c8719957.negcon) - e4:SetOperation(c8719957.negop) - c:RegisterEffect(e4) -end -function c8719957.eqlimit(e,c) - return c:IsSetCard(0x74) -end -function c8719957.filter(c) - return c:IsFaceup() and c:IsSetCard(0x74) -end -function c8719957.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c8719957.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c8719957.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c8719957.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c8719957.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,e:GetHandler(),tc) - end -end -function c8719957.negcon(e,tp,eg,ep,ev,re,r,rp) - return rp~=tp and Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)==LOCATION_MZONE - and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainDisablable(ev) -end -function c8719957.negop(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateEffect(ev) - Duel.SendtoGrave(e:GetHandler(),REASON_EFFECT) -end diff --git a/script/c87210505.lua b/script/c87210505.lua deleted file mode 100644 index 4bdfa4ef85..0000000000 --- a/script/c87210505.lua +++ /dev/null @@ -1,37 +0,0 @@ ---騎士の称号 -function c87210505.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c87210505.cost) - e1:SetTarget(c87210505.target) - e1:SetOperation(c87210505.activate) - c:RegisterEffect(e1) -end -function c87210505.costfilter(c) - return c:IsFaceup() and c:IsCode(46986414) -end -function c87210505.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,c87210505.costfilter,1,nil) end - local g=Duel.SelectReleaseGroup(tp,c87210505.costfilter,1,1,nil) - Duel.Release(g,REASON_COST) -end -function c87210505.spfilter(c,e,tp) - return c:IsCode(50725996) and c:IsCanBeSpecialSummoned(e,0,tp,true,true) and not c:IsHasEffect(EFFECT_NECRO_VALLEY) -end -function c87210505.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsExistingMatchingCard(c87210505.spfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE) -end -function c87210505.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c87210505.spfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp) - if g:GetCount()~=0 then - Duel.SpecialSummon(g,0,tp,tp,true,true,POS_FACEUP) - g:GetFirst():CompleteProcedure() - end -end diff --git a/script/c87255382.lua b/script/c87255382.lua deleted file mode 100644 index 021eccaf0f..0000000000 --- a/script/c87255382.lua +++ /dev/null @@ -1,52 +0,0 @@ ---紋章獣アンフィスバエナ -function c87255382.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(87255382,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND) - e1:SetCost(c87255382.cost) - e1:SetTarget(c87255382.sptg) - e1:SetOperation(c87255382.spop) - c:RegisterEffect(e1) - --atkup - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(87255382,1)) - e2:SetCategory(CATEGORY_ATKCHANGE) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCost(c87255382.cost) - e2:SetOperation(c87255382.atkop) - c:RegisterEffect(e2) -end -function c87255382.cfilter(c) - return c:IsSetCard(0x76) and c:IsDiscardable() -end -function c87255382.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c87255382.cfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,c87255382.cfilter,1,1,REASON_COST+REASON_DISCARD,e:GetHandler()) -end -function c87255382.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c87255382.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) - end -end -function c87255382.atkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+0x1ff0000+RESET_PHASE+PHASE_END) - e1:SetValue(800) - c:RegisterEffect(e1) - end -end diff --git a/script/c87257460.lua b/script/c87257460.lua deleted file mode 100644 index 7d72fe3fbd..0000000000 --- a/script/c87257460.lua +++ /dev/null @@ -1,103 +0,0 @@ ---魅惑の女王 LV3 -function c87257460.initial_effect(c) - --equip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(87257460,0)) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCondition(c87257460.eqcon) - e1:SetTarget(c87257460.eqtg) - e1:SetOperation(c87257460.eqop) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(87257460,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) - e2:SetCondition(c87257460.spcon) - e2:SetCost(c87257460.spcost) - e2:SetTarget(c87257460.sptg) - e2:SetOperation(c87257460.spop) - e2:SetLabelObject(e1) - c:RegisterEffect(e2) -end -c87257460.lvupcount=1 -c87257460.lvup={23756165} -function c87257460.eqcon(e,tp,eg,ep,ev,re,r,rp) - local ec=e:GetLabelObject() - return ec==nil or ec:GetFlagEffect(87257460)==0 -end -function c87257460.filter(c) - return c:IsLevelBelow(3) and c:IsFaceup() and c:IsAbleToChangeControler() -end -function c87257460.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c87257460.filter(chkc) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingTarget(c87257460.filter,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local g=Duel.SelectTarget(tp,c87257460.filter,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0) -end -function c87257460.eqlimit(e,c) - return e:GetOwner()==c and not c:IsDisabled() -end -function c87257460.eqop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - if c:IsFaceup() and c:IsRelateToEffect(e) then - if not Duel.Equip(tp,tc,c,false) then return end - --Add Equip limit - tc:RegisterFlagEffect(87257460,RESET_EVENT+0x1fe0000,0,0) - e:SetLabelObject(tc) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_COPY_INHERIT+EFFECT_FLAG_OWNER_RELATE) - e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(c87257460.eqlimit) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_DESTROY_SUBSTITUTE) - e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_OWNER_RELATE) - e2:SetReset(RESET_EVENT+0x1fe0000) - e2:SetValue(c87257460.repval) - tc:RegisterEffect(e2) - else Duel.SendtoGrave(tc,REASON_EFFECT) end - end -end -function c87257460.repval(e,re,r,rp) - return bit.band(r,REASON_BATTLE)~=0 -end -function c87257460.spcon(e,tp,eg,ep,ev,re,r,rp) - local ec=e:GetLabelObject():GetLabelObject() - return Duel.GetTurnPlayer()==tp and ec and ec:GetFlagEffect(87257460)~=0 -end -function c87257460.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end -function c87257460.spfilter(c,e,tp) - return c:IsCode(23756165) and c:IsCanBeSpecialSummoned(e,1,tp,true,false) -end -function c87257460.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsExistingMatchingCard(c87257460.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) -end -function c87257460.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c87257460.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp) - local tc=g:GetFirst() - if tc then - Duel.SpecialSummon(tc,1,tp,tp,true,false,POS_FACEUP) - tc:CompleteProcedure() - end -end diff --git a/script/c87259077.lua b/script/c87259077.lua deleted file mode 100644 index 4bf6ef7b31..0000000000 --- a/script/c87259077.lua +++ /dev/null @@ -1,33 +0,0 @@ ---ライトニング・ウォリアー -function c87259077.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1) - c:EnableReviveLimit() - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(87259077,0)) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_BATTLE_DESTROYING) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCondition(c87259077.damcon) - e1:SetTarget(c87259077.damtg) - e1:SetOperation(c87259077.damop) - c:RegisterEffect(e1) -end -function c87259077.damcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local t=Duel.GetAttackTarget() - if ev==1 then t=Duel.GetAttacker() end - if not c:IsRelateToBattle() or c:IsFacedown() then return false end - return t:GetLocation()==LOCATION_GRAVE and t:IsType(TYPE_MONSTER) -end -function c87259077.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,0) -end -function c87259077.damop(e,tp,eg,ep,ev,re,r,rp) - local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) - Duel.Damage(p,Duel.GetFieldGroupCount(p,LOCATION_HAND,0)*300,REASON_EFFECT) -end diff --git a/script/c87259933.lua b/script/c87259933.lua deleted file mode 100644 index b35f7a951b..0000000000 --- a/script/c87259933.lua +++ /dev/null @@ -1,119 +0,0 @@ ---宝玉の集結 -function c87259933.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e1:SetHintTiming(TIMING_DESTROY) - e1:SetCondition(c87259933.spcon1) - e1:SetTarget(c87259933.sptg1) - e1:SetOperation(c87259933.spop) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(87259933,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_DESTROYED) - e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e2:SetRange(LOCATION_SZONE) - e2:SetCountLimit(1) - e2:SetCondition(c87259933.spcon2) - e2:SetCost(c87259933.spcost) - e2:SetTarget(c87259933.sptg2) - e2:SetOperation(c87259933.spop) - c:RegisterEffect(e2) - --tohand - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(87259933,1)) - e3:SetCategory(CATEGORY_TOHAND) - e3:SetType(EFFECT_TYPE_QUICK_O) - e3:SetCode(EVENT_FREE_CHAIN) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetRange(LOCATION_SZONE) - e3:SetCost(c87259933.thcost) - e3:SetTarget(c87259933.thtg) - e3:SetOperation(c87259933.thop) - c:RegisterEffect(e3) -end -function c87259933.cfilter(c,tp) - return c:IsSetCard(0x1034) and c:IsReason(REASON_BATTLE+REASON_EFFECT) - and c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousLocation(LOCATION_MZONE) and c:GetPreviousControler()==tp -end -function c87259933.spcon1(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetCurrentPhase()~=PHASE_DAMAGE then return true end - local res,teg,tep,tev,tre,tr,trp=Duel.CheckEvent(EVENT_DESTROYED,true) - return res and teg:IsExists(c87259933.cfilter,1,nil,tp) - and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c87259933.filter,tp,LOCATION_DECK,0,1,nil,e,tp) -end -function c87259933.sptg1(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local res,teg,tep,tev,tre,tr,trp=Duel.CheckEvent(EVENT_DESTROYED,true) - if Duel.GetCurrentPhase()==PHASE_DAMAGE - or (res and teg:IsExists(c87259933.cfilter,1,nil,tp) - and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c87259933.filter,tp,LOCATION_DECK,0,1,nil,e,tp) - and Duel.SelectYesNo(tp,aux.Stringid(87259933,2))) then - e:SetCategory(CATEGORY_SPECIAL_SUMMON) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) - e:GetHandler():RegisterFlagEffect(87259933,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) - e:GetHandler():RegisterFlagEffect(0,RESET_CHAIN,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(87259933,3)) - else - e:SetCategory(0) - end -end -function c87259933.spcon2(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c87259933.cfilter,1,nil,tp) -end -function c87259933.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():GetFlagEffect(87259933)==0 end - e:GetHandler():RegisterFlagEffect(87259933,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) -end -function c87259933.filter(c,e,tp) - return c:IsSetCard(0x1034) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c87259933.sptg2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsRelateToEffect(e) - and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c87259933.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c87259933.spop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():GetFlagEffect(87259933)==0 then return end - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c87259933.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end -function c87259933.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end -function c87259933.thfilter1(c,rc) - return c:IsFaceup() and c:IsSetCard(0x1034) and c:IsAbleToHand() - and Duel.IsExistingTarget(c87259933.thfilter2,0,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c,rc) -end -function c87259933.thfilter2(c,rc) - return c~=rc and c:IsAbleToHand() -end -function c87259933.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - if chk==0 then return not e:GetHandler():IsStatus(STATUS_CHAINING) - and Duel.IsExistingTarget(c87259933.thfilter1,tp,LOCATION_ONFIELD,0,1,nil,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g1=Duel.SelectTarget(tp,c87259933.thfilter1,tp,LOCATION_ONFIELD,0,1,1,nil,e:GetHandler()) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g2=Duel.SelectTarget(tp,c87259933.thfilter2,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,g1:GetFirst(),e:GetHandler()) - g1:Merge(g2) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g1,2,0,0) -end -function c87259933.thop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - end -end diff --git a/script/c87288189.lua b/script/c87288189.lua deleted file mode 100644 index e418dec73f..0000000000 --- a/script/c87288189.lua +++ /dev/null @@ -1,89 +0,0 @@ ---怨邪帝ガイウス -function c87288189.initial_effect(c) - --summon with 1 tribute - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(87288189,0)) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SUMMON_PROC) - e1:SetCondition(c87288189.otcon) - e1:SetOperation(c87288189.otop) - e1:SetValue(SUMMON_TYPE_ADVANCE) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_SET_PROC) - c:RegisterEffect(e2) - --destroy - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(87288189,1)) - e3:SetCategory(CATEGORY_REMOVE+CATEGORY_DAMAGE) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetCode(EVENT_SUMMON_SUCCESS) - e3:SetCondition(c87288189.condition) - e3:SetTarget(c87288189.target) - e3:SetOperation(c87288189.operation) - c:RegisterEffect(e3) - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetCode(EFFECT_MATERIAL_CHECK) - e4:SetValue(c87288189.valcheck) - e4:SetLabelObject(e3) - c:RegisterEffect(e4) -end -function c87288189.otfilter(c) - return bit.band(c:GetSummonType(),SUMMON_TYPE_ADVANCE)==SUMMON_TYPE_ADVANCE -end -function c87288189.otcon(e,c) - if c==nil then return true end - local mg=Duel.GetMatchingGroup(c87288189.otfilter,0,LOCATION_MZONE,LOCATION_MZONE,nil) - return c:GetLevel()>6 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-1 - and Duel.GetTributeCount(c,mg)>0 -end -function c87288189.otop(e,tp,eg,ep,ev,re,r,rp,c) - local mg=Duel.GetMatchingGroup(c87288189.otfilter,0,LOCATION_MZONE,LOCATION_MZONE,nil) - local sg=Duel.SelectTribute(tp,c,1,1,mg) - c:SetMaterial(sg) - Duel.Release(sg,REASON_SUMMON+REASON_MATERIAL) -end -function c87288189.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_ADVANCE -end -function c87288189.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() end - if chk==0 then return true end - local ct=1 - if e:GetLabel()==1 then ct=2 end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,ct,nil) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,0) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,1000) -end -function c87288189.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) - if g:GetCount()>0 and Duel.Remove(g,POS_FACEUP,REASON_EFFECT)~=0 then - Duel.Damage(1-tp,1000,REASON_EFFECT) - local og=Duel.GetOperatedGroup() - local rg=Group.CreateGroup() - local tc=og:GetFirst() - while tc do - if tc:IsAttribute(ATTRIBUTE_DARK) then - local sg=Duel.GetMatchingGroup(Card.IsCode,tc:GetControler(),0x53,0,nil,tc:GetCode()) - rg:Merge(sg) - end - tc=og:GetNext() - end - if rg:GetCount()>0 then - Duel.BreakEffect() - Duel.Remove(rg,POS_FACEUP,REASON_EFFECT) - end - end -end -function c87288189.valcheck(e,c) - local g=c:GetMaterial() - if g:IsExists(Card.IsAttribute,1,nil,ATTRIBUTE_DARK) then - e:GetLabelObject():SetLabel(1) - else - e:GetLabelObject():SetLabel(0) - end -end diff --git a/script/c87292536.lua b/script/c87292536.lua deleted file mode 100644 index 7aa50224c0..0000000000 --- a/script/c87292536.lua +++ /dev/null @@ -1,33 +0,0 @@ ---XX-セイバー レイジグラ -function c87292536.initial_effect(c) - --salvage - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(87292536,0)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetTarget(c87292536.target) - e1:SetOperation(c87292536.operation) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e2) -end -function c87292536.filter(c) - return c:IsSetCard(0x100d) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() -end -function c87292536.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c87292536.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c87292536.filter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c87292536.filter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c87292536.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end diff --git a/script/c87294988.lua b/script/c87294988.lua deleted file mode 100644 index 9d7382222a..0000000000 --- a/script/c87294988.lua +++ /dev/null @@ -1,44 +0,0 @@ ---紅姫チルビメ -function c87294988.initial_effect(c) - --cannot be battle target - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(0,LOCATION_MZONE) - e1:SetValue(c87294988.bttg) - c:RegisterEffect(e1) - --summon success - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(87294988,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetCondition(c87294988.spcon) - e2:SetTarget(c87294988.sptg) - e2:SetOperation(c87294988.spop) - c:RegisterEffect(e2) -end -function c87294988.bttg(e,c) - return c~=e:GetHandler() and c:IsFaceup() and c:IsRace(RACE_PLANT) -end -function c87294988.spcon(e,tp,eg,ep,ev,re,r,rp) - return rp~=tp and e:GetHandler():GetPreviousControler()==tp -end -function c87294988.filter(c,e,tp) - return c:IsRace(RACE_PLANT) and not c:IsCode(87294988) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c87294988.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c87294988.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c87294988.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c87294988.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c8730435.lua b/script/c8730435.lua deleted file mode 100644 index 957184e102..0000000000 --- a/script/c8730435.lua +++ /dev/null @@ -1,72 +0,0 @@ ---剣闘獣の闘器デーモンズシールド -function c8730435.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c8730435.target) - e1:SetOperation(c8730435.operation) - c:RegisterEffect(e1) - --destroy sub - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e2:SetCode(EFFECT_DESTROY_SUBSTITUTE) - e2:SetValue(1) - c:RegisterEffect(e2) - --Equip limit - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_EQUIP_LIMIT) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e3:SetValue(c8730435.eqlimit) - c:RegisterEffect(e3) - --tohand - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e4:SetCategory(CATEGORY_TOHAND) - e4:SetDescription(aux.Stringid(8730435,0)) - e4:SetCode(EVENT_TO_GRAVE) - e4:SetCondition(c8730435.retcon) - e4:SetTarget(c8730435.rettg) - e4:SetOperation(c8730435.retop) - c:RegisterEffect(e4) -end -function c8730435.eqlimit(e,c) - return c:IsSetCard(0x19) -end -function c8730435.filter(c) - return c:IsFaceup() and c:IsSetCard(0x19) -end -function c8730435.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:GetLocation()==LOCATION_MZONE and c8730435.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c8730435.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c8730435.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c8730435.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,c,tc) - end -end -function c8730435.retcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local ec=c:GetPreviousEquipTarget() - return c:IsReason(REASON_LOST_TARGET) and (ec:GetLocation()==LOCATION_DECK or ec:GetLocation()==LOCATION_EXTRA) -end -function c8730435.rettg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToHand() end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0) -end -function c8730435.retop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SendtoHand(c,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,c) - end -end diff --git a/script/c87313164.lua b/script/c87313164.lua deleted file mode 100644 index e1fe5d4c0c..0000000000 --- a/script/c87313164.lua +++ /dev/null @@ -1,38 +0,0 @@ ---ギョッ! -function c87313164.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_CHAINING) - e1:SetCondition(c87313164.condition) - e1:SetCost(c87313164.cost) - e1:SetTarget(c87313164.target) - e1:SetOperation(c87313164.activate) - c:RegisterEffect(e1) -end -function c87313164.condition(e,tp,eg,ep,ev,re,r,rp) - return re:IsActiveType(TYPE_MONSTER) and Duel.IsChainNegatable(ev) -end -function c87313164.cfilter(c) - return c:IsFaceup() and c:IsRace(RACE_FISH+RACE_SEASERPENT+RACE_AQUA) and c:IsAbleToDeckAsCost() -end -function c87313164.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c87313164.cfilter,tp,LOCATION_REMOVED,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectMatchingCard(tp,c87313164.cfilter,tp,LOCATION_REMOVED,0,1,1,nil) - Duel.SendtoDeck(g,nil,2,REASON_COST) -end -function c87313164.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) - end -end -function c87313164.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateActivation(ev) - if re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(eg,REASON_EFFECT) - end -end diff --git a/script/c87319876.lua b/script/c87319876.lua deleted file mode 100644 index 2c0a20386f..0000000000 --- a/script/c87319876.lua +++ /dev/null @@ -1,66 +0,0 @@ ---トラスト・ガーディアン -function c87319876.initial_effect(c) - --synchro - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetValue(c87319876.synlimit) - c:RegisterEffect(e1) - --be material - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_BE_MATERIAL) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetCondition(c87319876.ccon) - e2:SetOperation(c87319876.cop) - c:RegisterEffect(e2) -end -function c87319876.synlimit(e,c) - if not c then return false end - return c:IsLevelBelow(6) -end -function c87319876.ccon(e,tp,eg,ep,ev,re,r,rp) - return r==REASON_SYNCHRO -end -function c87319876.cop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local rc=c:GetReasonCard() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_INDESTRUCTABLE_COUNT) - e1:SetCountLimit(1) - e1:SetValue(c87319876.valcon) - e1:SetReset(RESET_EVENT+0x1fe0000) - rc:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE) - e2:SetCode(EVENT_DAMAGE_STEP_END) - e2:SetCondition(c87319876.adcon) - e2:SetOperation(c87319876.adop) - e2:SetReset(RESET_EVENT+0x1fe0000) - rc:RegisterEffect(e2) -end -function c87319876.valcon(e,re,r,rp) - if bit.band(r,REASON_BATTLE)~=0 then - e:GetHandler():RegisterFlagEffect(87319876,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_DAMAGE,0,1) - return true - else return false end -end -function c87319876.adcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetFlagEffect(87319876)~=0 -end -function c87319876.adop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local e1=Effect.CreateEffect(e:GetOwner()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(-400) - e1:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_UPDATE_DEFENCE) - c:RegisterEffect(e2) -end diff --git a/script/c87340664.lua b/script/c87340664.lua deleted file mode 100644 index 3d3828a559..0000000000 --- a/script/c87340664.lua +++ /dev/null @@ -1,28 +0,0 @@ ---原子ホタル -function c87340664.initial_effect(c) - --damage - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(87340664,0)) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetCondition(c87340664.condition) - e1:SetTarget(c87340664.target) - e1:SetOperation(c87340664.operation) - c:RegisterEffect(e1) -end -function c87340664.condition(e,tp,eg,ep,ev,re,r,rp) - e:SetLabel(e:GetHandler():GetReasonPlayer()) - return e:GetHandler():IsReason(REASON_BATTLE) and e:GetHandler():IsPreviousPosition(POS_FACEUP) -end -function c87340664.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chk==0 then return true end - Duel.SetTargetPlayer(e:GetLabel()) - Duel.SetTargetParam(1000) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,e:GetLabel(),1000) -end -function c87340664.operation(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c87347365.lua b/script/c87347365.lua deleted file mode 100644 index f5bd32be9b..0000000000 --- a/script/c87347365.lua +++ /dev/null @@ -1,53 +0,0 @@ ---リバイバルゴーレム -function c87347365.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(87347365,0)) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCountLimit(1,87347365) - e1:SetCondition(c87347365.condtion) - e1:SetTarget(c87347365.target) - e1:SetOperation(c87347365.operation) - c:RegisterEffect(e1) -end -function c87347365.condtion(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_DECK) -end -function c87347365.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local opt=0 - local c=e:GetHandler() - local b1=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) - local b2=c:IsAbleToHand() - if b1 and b2 then - opt=Duel.SelectOption(tp,aux.Stringid(87347365,1),aux.Stringid(87347365,2))+1 - elseif b1 then - opt=Duel.SelectOption(tp,aux.Stringid(87347365,1))+1 - elseif b2 then - opt=Duel.SelectOption(tp,aux.Stringid(87347365,2))+2 - end - e:SetLabel(opt) - if opt==1 then - e:SetCategory(CATEGORY_SPECIAL_SUMMON) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) - elseif opt==2 then - e:SetCategory(CATEGORY_TOHAND) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0) - else - e:SetCategory(0) - end -end -function c87347365.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if e:GetLabel()==1 then - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP) - end - elseif e:GetLabel()==2 then - if c:IsRelateToEffect(e) then - Duel.SendtoHand(c,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,c) - end - end -end diff --git a/script/c87350908.lua b/script/c87350908.lua deleted file mode 100644 index 63119a3dbe..0000000000 --- a/script/c87350908.lua +++ /dev/null @@ -1,22 +0,0 @@ ---マスクド・チョッパー -function c87350908.initial_effect(c) - --damage - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(87350908,0)) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetCode(EVENT_BATTLE_DESTROYING) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetTarget(c87350908.damtg) - e1:SetOperation(c87350908.damop) - c:RegisterEffect(e1) -end -function c87350908.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(2000) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,2000) -end -function c87350908.damop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c87390067.lua b/script/c87390067.lua deleted file mode 100644 index 370ba95054..0000000000 --- a/script/c87390067.lua +++ /dev/null @@ -1,35 +0,0 @@ ---BF-蒼天のジェット -function c87390067.initial_effect(c) - --indes - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetDescription(aux.Stringid(87390067,0)) - e2:SetCode(EVENT_PRE_DAMAGE_CALCULATE) - e2:SetRange(LOCATION_HAND) - e2:SetCondition(c87390067.condition) - e2:SetCost(c87390067.cost) - e2:SetOperation(c87390067.operation) - c:RegisterEffect(e2) -end -function c87390067.condition(e,tp,eg,ep,ev,re,r,rp) - local a=Duel.GetAttacker() - local d=Duel.GetAttackTarget() - if not d then return false end - return (a:GetControler()==tp and a:IsSetCard(0x33)) - or (d:GetControler()==tp and d:IsSetCard(0x33)) -end -function c87390067.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end -function c87390067.operation(e,tp,eg,ep,ev,re,r,rp,chk) - local a=Duel.GetAttacker() - if Duel.GetTurnPlayer()~=tp then a=Duel.GetAttackTarget() end - if not a:IsRelateToBattle() then return end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_DAMAGE_CAL) - e1:SetValue(1) - a:RegisterEffect(e1) -end diff --git a/script/c87430304.lua b/script/c87430304.lua deleted file mode 100644 index 4bf0ae964b..0000000000 --- a/script/c87430304.lua +++ /dev/null @@ -1,20 +0,0 @@ ---先史遺産モアイ -function c87430304.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_SPSUM_PARAM) - e1:SetRange(LOCATION_HAND) - e1:SetTargetRange(POS_FACEUP_DEFENCE,0) - e1:SetCondition(c87430304.hspcon) - c:RegisterEffect(e1) -end -function c87430304.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x70) -end -function c87430304.hspcon(e,c) - if c==nil then return true end - return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c87430304.cfilter,c:GetControler(),LOCATION_MZONE,0,1,nil) -end diff --git a/script/c87430998.lua b/script/c87430998.lua deleted file mode 100644 index 8507055a0c..0000000000 --- a/script/c87430998.lua +++ /dev/null @@ -1,29 +0,0 @@ ---森 -function c87430998.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --Atk - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e2:SetTarget(c87430998.tg) - e2:SetValue(200) - c:RegisterEffect(e2) - --Def - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetCode(EFFECT_UPDATE_DEFENCE) - e3:SetRange(LOCATION_SZONE) - e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e3:SetTarget(c87430998.tg) - e3:SetValue(200) - c:RegisterEffect(e3) -end -function c87430998.tg(e,c) - return c:IsRace(RACE_INSECT+RACE_BEAST+RACE_PLANT+RACE_BEASTWARRIOR) -end diff --git a/script/c87473172.lua b/script/c87473172.lua deleted file mode 100644 index 1fa149560f..0000000000 --- a/script/c87473172.lua +++ /dev/null @@ -1,36 +0,0 @@ ---火炎鳥 -function c87473172.initial_effect(c) - --atkup - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(87473172,0)) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_FIELD) - e1:SetCode(EVENT_DESTROYED) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c87473172.atkcon) - e1:SetTarget(c87473172.atktg) - e1:SetOperation(c87473172.atkop) - c:RegisterEffect(e1) -end -function c87473172.cfilter(c,tp) - return c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP) - and bit.band(c:GetPreviousRaceOnField(),RACE_WINDBEAST)~=0 -end -function c87473172.atkcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c87473172.cfilter,1,nil,tp) -end -function c87473172.atktg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsRelateToEffect(e) and e:GetHandler():IsFaceup() end -end -function c87473172.atkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFaceup() and c:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_COPY_INHERIT) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(500) - c:RegisterEffect(e1) - end -end diff --git a/script/c87475570.lua b/script/c87475570.lua deleted file mode 100644 index f09a4488cc..0000000000 --- a/script/c87475570.lua +++ /dev/null @@ -1,52 +0,0 @@ ---宝玉の先導者 -function c87475570.initial_effect(c) - --pendulum summon - aux.AddPendulumProcedure(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --cannot be target - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) - e2:SetRange(LOCATION_PZONE) - e2:SetTargetRange(LOCATION_ONFIELD,0) - e2:SetTarget(c87475570.tgtg) - e2:SetValue(aux.tgoval) - c:RegisterEffect(e2) - --tohand - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(87475570,0)) - e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_MZONE) - e3:SetCost(c87475570.cost) - e3:SetTarget(c87475570.target) - e3:SetOperation(c87475570.operation) - c:RegisterEffect(e3) -end -function c87475570.tgtg(e,c) - return c:IsSetCard(0x1034) or (c:IsLocation(LOCATION_MZONE) and (c:IsCode(79407975) or c:IsCode(79856792))) -end -function c87475570.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end -function c87475570.filter(c) - return (((c:IsSetCard(0x1034) or c:IsCode(79856792) or c:IsCode(79407975)) and c:IsType(TYPE_MONSTER)) - or (c:IsSetCard(0x34) and c:IsType(TYPE_SPELL+TYPE_TRAP))) and c:IsAbleToHand() -end -function c87475570.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c87475570.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c87475570.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c87475570.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c87483942.lua b/script/c87483942.lua deleted file mode 100644 index cde0b86bc3..0000000000 --- a/script/c87483942.lua +++ /dev/null @@ -1,33 +0,0 @@ ---渋い忍者 -function c87483942.initial_effect(c) - c:SetUniqueOnField(1,1,87483942) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(87483942,0)) - e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetCode(EVENT_FLIP) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e1:SetTarget(c87483942.sptg) - e1:SetOperation(c87483942.spop) - c:RegisterEffect(e1) -end -function c87483942.filter(c,e,tp) - return c:IsSetCard(0x2b) and c:GetCode()~=87483942 and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENCE) - and not c:IsHasEffect(EFFECT_NECRO_VALLEY) -end -function c87483942.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c87483942.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE) -end -function c87483942.spop(e,tp,eg,ep,ev,re,r,rp) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ft<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c87483942.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,ft,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEDOWN_DEFENCE) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c87514539.lua b/script/c87514539.lua deleted file mode 100644 index fbb64da0cb..0000000000 --- a/script/c87514539.lua +++ /dev/null @@ -1,36 +0,0 @@ ---傀儡虫 -function c87514539.initial_effect(c) - --control - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(87514539,0)) - e1:SetCategory(CATEGORY_CONTROL) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND) - e1:SetCost(c87514539.cost) - e1:SetTarget(c87514539.target) - e1:SetOperation(c87514539.operation) - c:RegisterEffect(e1) -end -function c87514539.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD) -end -function c87514539.filter(c) - return c:IsFaceup() and c:IsRace(RACE_ZOMBIE+RACE_FIEND) and c:IsControlerCanBeChanged() -end -function c87514539.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c87514539.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c87514539.filter,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) - local g=Duel.SelectTarget(tp,c87514539.filter,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0) -end -function c87514539.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsRace(RACE_ZOMBIE+RACE_FIEND) then - if not Duel.GetControl(tc,tp,PHASE_END,1) and not tc:IsImmuneToEffect(e) and tc:IsAbleToChangeControler() then - Duel.Destroy(tc,REASON_EFFECT) - end - end -end diff --git a/script/c87523462.lua b/script/c87523462.lua deleted file mode 100644 index c251c9868d..0000000000 --- a/script/c87523462.lua +++ /dev/null @@ -1,31 +0,0 @@ ---有翼賢者ファルコス -function c87523462.initial_effect(c) - --to deck - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(87523462,0)) - e1:SetCategory(CATEGORY_TODECK) - e1:SetCode(EVENT_BATTLE_DESTROYING) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCondition(c87523462.tdcon) - e1:SetTarget(c87523462.tdtg) - e1:SetOperation(c87523462.tdop) - c:RegisterEffect(e1) -end -function c87523462.tdcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local bc=c:GetBattleTarget() - if not c:IsRelateToBattle() or c:IsFacedown() then return false end - return bc:IsLocation(LOCATION_GRAVE) and bc:IsType(TYPE_MONSTER) and bc:IsControler(1-tp) and bc:GetBattlePosition()==POS_FACEUP_ATTACK -end -function c87523462.tdtg(e,tp,eg,ep,ev,re,r,rp,chk) - local bc=e:GetHandler():GetBattleTarget() - if chk==0 then return bc:IsAbleToDeck() end - Duel.SetTargetCard(bc) - Duel.SetOperationInfo(0,CATEGORY_TODECK,bc,1,0,0) -end -function c87523462.tdop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoDeck(tc,nil,0,REASON_EFFECT) - end -end diff --git a/script/c87526784.lua b/script/c87526784.lua deleted file mode 100644 index ed0164bf98..0000000000 --- a/script/c87526784.lua +++ /dev/null @@ -1,35 +0,0 @@ ---バグマンX -function c87526784.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(87526784,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetCondition(c87526784.condition) - e1:SetTarget(c87526784.target) - e1:SetOperation(c87526784.operation) - c:RegisterEffect(e1) -end -function c87526784.cfilter(c) - return c:IsFaceup() and c:IsCode(23915499) -end -function c87526784.spfilter(c,e,tp) - return c:IsCode(50319138) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c87526784.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c87526784.cfilter,tp,LOCATION_ONFIELD,0,1,nil) -end -function c87526784.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c87526784.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c87526784.operation(e,tp,eg,ep,ev,re,r,rp,chk) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - if not Duel.IsExistingMatchingCard(c87526784.cfilter,tp,LOCATION_ONFIELD,0,1,nil) then return end - local tc=Duel.GetFirstMatchingCard(c87526784.spfilter,tp,LOCATION_DECK,0,nil,e,tp) - if tc then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c87535691.lua b/script/c87535691.lua deleted file mode 100644 index ff75f84f74..0000000000 --- a/script/c87535691.lua +++ /dev/null @@ -1,35 +0,0 @@ ---超重武者ツヅ-3 -function c87535691.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(87535691,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCountLimit(1,87535691) - e1:SetCondition(c87535691.spcon) - e1:SetTarget(c87535691.sptg) - e1:SetOperation(c87535691.spop) - c:RegisterEffect(e1) -end -function c87535691.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) and e:GetHandler():IsReason(REASON_DESTROY) -end -function c87535691.spfilter(c,e,tp) - return c:IsSetCard(0x9a) and not c:IsCode(87535691) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c87535691.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c87535691.spfilter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c87535691.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c87535691.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c87535691.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c87557188.lua b/script/c87557188.lua deleted file mode 100644 index 2dd2c917f0..0000000000 --- a/script/c87557188.lua +++ /dev/null @@ -1,18 +0,0 @@ ---厳格な老魔術師 -function c87557188.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP) - e1:SetTarget(c87557188.target) - e1:SetOperation(c87557188.activate) - c:RegisterEffect(e1) -end -function c87557188.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFacedown,tp,0,LOCATION_ONFIELD,1,nil) end -end -function c87557188.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsFacedown,tp,0,LOCATION_ONFIELD,nil) - if g:GetCount()>0 then - Duel.ConfirmCards(tp,g) - end -end diff --git a/script/c87564935.lua b/script/c87564935.lua deleted file mode 100644 index 01e0627e40..0000000000 --- a/script/c87564935.lua +++ /dev/null @@ -1,98 +0,0 @@ ---メタル化寄生生物-ソルタイト -function c87564935.initial_effect(c) - --equip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(87564935,0)) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetTarget(c87564935.eqtg) - e1:SetOperation(c87564935.eqop) - c:RegisterEffect(e1) - --unequip - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(87564935,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_SZONE) - e2:SetCondition(c87564935.uncon) - e2:SetTarget(c87564935.sptg) - e2:SetOperation(c87564935.spop) - c:RegisterEffect(e2) - --equip effect - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_EQUIP) - e3:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) - e3:SetCondition(c87564935.uncon) - e3:SetValue(c87564935.efilter1) - c:RegisterEffect(e3) - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_EQUIP) - e4:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - e4:SetCondition(c87564935.uncon) - e4:SetValue(c87564935.efilter2) - c:RegisterEffect(e4) - --destroy sub - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_EQUIP) - e5:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e5:SetCode(EFFECT_DESTROY_SUBSTITUTE) - e5:SetCondition(c87564935.uncon) - e5:SetValue(c87564935.repval) - c:RegisterEffect(e5) - --eqlimit - local e6=Effect.CreateEffect(c) - e6:SetType(EFFECT_TYPE_SINGLE) - e6:SetCode(EFFECT_EQUIP_LIMIT) - e6:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e6:SetValue(1) - c:RegisterEffect(e6) -end -function c87564935.uncon(e) - return e:GetHandler():IsStatus(STATUS_UNION) -end -function c87564935.repval(e,re,r,rp) - return bit.band(r,REASON_BATTLE)~=0 -end -function c87564935.filter(c) - return c:IsFaceup() and c:GetUnionCount()==0 -end -function c87564935.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c87564935.filter(chkc) end - if chk==0 then return e:GetHandler():GetFlagEffect(87564935)==0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingTarget(c87564935.filter,tp,LOCATION_MZONE,0,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local g=Duel.SelectTarget(tp,c87564935.filter,tp,LOCATION_MZONE,0,1,1,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0) - e:GetHandler():RegisterFlagEffect(87564935,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1) -end -function c87564935.eqop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if not c:IsRelateToEffect(e) or c:IsFacedown() then return end - if not tc:IsRelateToEffect(e) or not c87564935.filter(tc) then - Duel.SendtoGrave(c,REASON_EFFECT) - return - end - if not Duel.Equip(tp,c,tc,false) then return end - c:SetStatus(STATUS_UNION,true) -end -function c87564935.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():GetFlagEffect(87564935)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) - e:GetHandler():RegisterFlagEffect(87564935,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1) -end -function c87564935.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP_ATTACK) - end -end -function c87564935.efilter1(e,re,rp) - return aux.tgoval(e,re,rp) and re:IsActiveType(TYPE_MONSTER) -end -function c87564935.efilter2(e,te) - return te:GetHandlerPlayer()~=e:GetHandlerPlayer() and te:IsActiveType(TYPE_MONSTER) -end diff --git a/script/c87588741.lua b/script/c87588741.lua deleted file mode 100644 index e18539a836..0000000000 --- a/script/c87588741.lua +++ /dev/null @@ -1,155 +0,0 @@ ---クリフォート・アクセス -function c87588741.initial_effect(c) - --pendulum summon - aux.AddPendulumProcedure(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --splimit - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE) - e2:SetRange(LOCATION_PZONE) - e2:SetTargetRange(1,0) - e2:SetCondition(aux.nfbdncon) - e2:SetTarget(c87588741.splimit) - c:RegisterEffect(e2) - --atk down - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetRange(LOCATION_PZONE) - e3:SetCode(EFFECT_UPDATE_ATTACK) - e3:SetTargetRange(0,LOCATION_MZONE) - e3:SetValue(-300) - c:RegisterEffect(e3) - --summon with no tribute - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(87588741,0)) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e4:SetCode(EFFECT_SUMMON_PROC) - e4:SetCondition(c87588741.ntcon) - c:RegisterEffect(e4) - --change level - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_SINGLE) - e5:SetCode(EFFECT_SUMMON_COST) - e5:SetOperation(c87588741.lvop) - c:RegisterEffect(e5) - local e6=Effect.CreateEffect(c) - e6:SetType(EFFECT_TYPE_SINGLE) - e6:SetCode(EFFECT_SPSUMMON_COST) - e6:SetOperation(c87588741.lvop2) - c:RegisterEffect(e6) - --immune - local e7=Effect.CreateEffect(c) - e7:SetType(EFFECT_TYPE_SINGLE) - e7:SetCode(EFFECT_IMMUNE_EFFECT) - e7:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_UNCOPYABLE) - e7:SetRange(LOCATION_MZONE) - e7:SetCondition(c87588741.immcon) - e7:SetValue(aux.qlifilter) - c:RegisterEffect(e7) - --damage - local e8=Effect.CreateEffect(c) - e8:SetDescription(aux.Stringid(87588741,1)) - e8:SetCategory(CATEGORY_DAMAGE+CATEGORY_RECOVER) - e8:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e8:SetCode(EVENT_SUMMON_SUCCESS) - e8:SetCondition(c87588741.damcon) - e8:SetTarget(c87588741.damtg) - e8:SetOperation(c87588741.damop) - c:RegisterEffect(e8) - --tribute check - local e9=Effect.CreateEffect(c) - e9:SetType(EFFECT_TYPE_SINGLE) - e9:SetCode(EFFECT_MATERIAL_CHECK) - e9:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e9:SetValue(c87588741.valcheck) - e9:SetLabelObject(e8) - c:RegisterEffect(e9) -end -function c87588741.splimit(e,c) - return not c:IsSetCard(0xaa) -end -function c87588741.ntcon(e,c,minc) - if c==nil then return true end - return minc==0 and c:GetLevel()>4 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 -end -function c87588741.lvcon(e) - return e:GetHandler():GetMaterialCount()==0 -end -function c87588741.lvop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CHANGE_LEVEL) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c87588741.lvcon) - e1:SetValue(4) - e1:SetReset(RESET_EVENT+0xff0000) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_SET_BASE_ATTACK) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetCondition(c87588741.lvcon) - e2:SetValue(1800) - e2:SetReset(RESET_EVENT+0xff0000) - c:RegisterEffect(e2) -end -function c87588741.lvop2(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CHANGE_LEVEL) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetValue(4) - e1:SetReset(RESET_EVENT+0xff0000) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_SET_BASE_ATTACK) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetValue(1800) - e2:SetReset(RESET_EVENT+0xff0000) - c:RegisterEffect(e2) -end -function c87588741.immcon(e) - return bit.band(e:GetHandler():GetSummonType(),SUMMON_TYPE_NORMAL)==SUMMON_TYPE_NORMAL -end -function c87588741.damcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_ADVANCE and e:GetLabel()==1 -end -function c87588741.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - local ct1=Duel.GetMatchingGroupCount(Card.IsType,tp,LOCATION_GRAVE,0,nil,TYPE_MONSTER) - local ct2=Duel.GetMatchingGroupCount(Card.IsType,tp,0,LOCATION_GRAVE,nil,TYPE_MONSTER) - local ct=ct2-ct1 - if chk==0 then return ct>0 end - Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,ct*300) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,ct*300) -end -function c87588741.damop(e,tp,eg,ep,ev,re,r,rp) - local ct1=Duel.GetMatchingGroupCount(Card.IsType,tp,LOCATION_GRAVE,0,nil,TYPE_MONSTER) - local ct2=Duel.GetMatchingGroupCount(Card.IsType,tp,0,LOCATION_GRAVE,nil,TYPE_MONSTER) - local ct=ct2-ct1 - if ct>0 then - local val=Duel.Recover(tp,ct*300,REASON_EFFECT) - Duel.Damage(1-tp,val,REASON_EFFECT) - end -end -function c87588741.valcheck(e,c) - local g=c:GetMaterial() - if g:IsExists(Card.IsSetCard,1,nil,0xaa) then - e:GetLabelObject():SetLabel(1) - else - e:GetLabelObject():SetLabel(0) - end -end diff --git a/script/c87602890.lua b/script/c87602890.lua deleted file mode 100644 index 3301c42230..0000000000 --- a/script/c87602890.lua +++ /dev/null @@ -1,93 +0,0 @@ ---轟雷帝ザボルグ -function c87602890.initial_effect(c) - --summon with 1 tribute - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(87602890,0)) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SUMMON_PROC) - e1:SetCondition(c87602890.otcon) - e1:SetOperation(c87602890.otop) - e1:SetValue(SUMMON_TYPE_ADVANCE) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_SET_PROC) - c:RegisterEffect(e2) - --destroy - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(87602890,1)) - e3:SetCategory(CATEGORY_DESTROY) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetCode(EVENT_SUMMON_SUCCESS) - e3:SetCondition(c87602890.condition) - e3:SetTarget(c87602890.target) - e3:SetOperation(c87602890.operation) - c:RegisterEffect(e3) - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetCode(EFFECT_MATERIAL_CHECK) - e4:SetValue(c87602890.valcheck) - e4:SetLabelObject(e3) - c:RegisterEffect(e4) -end -function c87602890.otfilter(c) - return bit.band(c:GetSummonType(),SUMMON_TYPE_ADVANCE)==SUMMON_TYPE_ADVANCE -end -function c87602890.otcon(e,c) - if c==nil then return true end - local mg=Duel.GetMatchingGroup(c87602890.otfilter,0,LOCATION_MZONE,LOCATION_MZONE,nil) - return c:GetLevel()>6 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-1 - and Duel.GetTributeCount(c,mg)>0 -end -function c87602890.otop(e,tp,eg,ep,ev,re,r,rp,c) - local mg=Duel.GetMatchingGroup(c87602890.otfilter,0,LOCATION_MZONE,LOCATION_MZONE,nil) - local sg=Duel.SelectTribute(tp,c,1,1,mg) - c:SetMaterial(sg) - Duel.Release(sg,REASON_SUMMON+REASON_MATERIAL) -end -function c87602890.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_ADVANCE -end -function c87602890.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsDestructable() end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c87602890.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - if Duel.Destroy(tc,REASON_EFFECT)==0 or bit.band(tc:GetPreviousAttributeOnField(),ATTRIBUTE_LIGHT)==0 then return end - local lv=tc:GetOriginalLevel() - if tc:IsType(TYPE_XYZ) then - lv=tc:GetOriginalRank() - end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g1=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_EXTRA,0,lv,lv,nil) - local tg=Duel.GetFieldGroup(tp,0,LOCATION_EXTRA) - if e:GetLabel()==1 then - Duel.ConfirmCards(tp,tg) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g2=tg:Select(tp,lv,lv,nil) - g1:Merge(g2) - else - Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_TOGRAVE) - local g2=tg:Select(1-tp,lv,lv,nil) - g1:Merge(g2) - end - if g1:GetCount()>0 then - Duel.BreakEffect() - Duel.SendtoGrave(g1,REASON_EFFECT) - end - end -end -function c87602890.valcheck(e,c) - local g=c:GetMaterial() - if g:IsExists(Card.IsAttribute,1,nil,ATTRIBUTE_LIGHT) then - e:GetLabelObject():SetLabel(1) - else - e:GetLabelObject():SetLabel(0) - end -end diff --git a/script/c87608852.lua b/script/c87608852.lua deleted file mode 100644 index dd521f26c4..0000000000 --- a/script/c87608852.lua +++ /dev/null @@ -1,57 +0,0 @@ ---魔導召喚士 テンペル -function c87608852.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(87608852,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c87608852.spcost) - e1:SetTarget(c87608852.sptg) - e1:SetOperation(c87608852.spop) - c:RegisterEffect(e1) - Duel.AddCustomActivityCounter(87608852,ACTIVITY_SPSUMMON,c87608852.counterfilter) - Duel.AddCustomActivityCounter(87608852,ACTIVITY_CHAIN,c87608852.chainfilter) -end -function c87608852.counterfilter(c) - return not c:IsLevelAbove(5) -end -function c87608852.chainfilter(re,tp,cid) - return not (re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL) and re:GetHandler():IsSetCard(0x106e)) -end -function c87608852.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() - and Duel.GetCustomActivityCount(87608852,tp,ACTIVITY_SPSUMMON)==0 - and Duel.GetCustomActivityCount(87608852,tp,ACTIVITY_CHAIN)>0 end - Duel.Release(e:GetHandler(),REASON_COST) - --oath effects - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) - e1:SetTargetRange(1,0) - e1:SetTarget(c87608852.splimit) - e1:SetLabelObject(e) - Duel.RegisterEffect(e1,tp) -end -function c87608852.splimit(e,c,sump,sumtype,sumpos,targetp,se) - return e:GetLabelObject()~=se and c:IsLevelAbove(5) -end -function c87608852.spfilter(c,e,tp) - return c:IsLevelAbove(5) and c:IsRace(RACE_SPELLCASTER) and c:IsAttribute(0x30) - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c87608852.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsExistingMatchingCard(c87608852.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,LOCATION_DECK) -end -function c87608852.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c87608852.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c87609391.lua b/script/c87609391.lua deleted file mode 100644 index ba8f7688cd..0000000000 --- a/script/c87609391.lua +++ /dev/null @@ -1,92 +0,0 @@ ---ラプターズ・アルティメット・メイス -function c87609391.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c87609391.target) - e1:SetOperation(c87609391.operation) - c:RegisterEffect(e1) - --atk up - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(1000) - c:RegisterEffect(e2) - --equip limit - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_EQUIP_LIMIT) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e3:SetValue(c87609391.eqlimit) - c:RegisterEffect(e3) - --search - local e4=Effect.CreateEffect(c) - e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e4:SetRange(LOCATION_SZONE) - e4:SetCode(EVENT_BE_BATTLE_TARGET) - e4:SetCondition(c87609391.thcon) - e4:SetTarget(c87609391.thtg) - e4:SetOperation(c87609391.thop) - c:RegisterEffect(e4) -end -function c87609391.eqlimit(e,c) - return c:IsSetCard(0xba) -end -function c87609391.filter(c) - return c:IsFaceup() and c:IsSetCard(0xba) -end -function c87609391.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c87609391.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c87609391.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c87609391.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c87609391.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,e:GetHandler(),tc) - end -end -function c87609391.thcon(e,tp,eg,ep,ev,re,r,rp) - local tc=eg:GetFirst() - local ec=e:GetHandler():GetEquipTarget() - local at=Duel.GetAttacker() - return tc==ec and at and at:GetAttack()>ec:GetAttack() -end -function c87609391.thfilter(c) - return c:IsSetCard(0x95) and c:IsType(TYPE_SPELL) and c:IsAbleToHand() -end -function c87609391.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c87609391.thfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c87609391.thop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c87609391.thfilter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - local c=e:GetHandler() - local tc=Duel.GetAttacker() - if tc:IsRelateToBattle() and tc:IsFaceup() and tc:IsAttackable() then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_AVOID_BATTLE_DAMAGE) - e1:SetValue(1) - e1:SetCondition(c87609391.damcon) - e1:SetReset(RESET_PHASE+RESET_DAMAGE_CAL) - e1:SetLabelObject(tc) - c:GetEquipTarget():RegisterEffect(e1,true) - end - end -end -function c87609391.damcon(e) - return e:GetLabelObject()==Duel.GetAttacker() -end diff --git a/script/c87614611.lua b/script/c87614611.lua deleted file mode 100644 index 4cfc130911..0000000000 --- a/script/c87614611.lua +++ /dev/null @@ -1,48 +0,0 @@ ---紅蓮魔竜の壺 -function c87614611.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c87614611.condition) - e1:SetCost(c87614611.cost) - e1:SetTarget(c87614611.target) - e1:SetOperation(c87614611.activate) - c:RegisterEffect(e1) -end -function c87614611.cfilter(c) - return c:IsFaceup() and c:IsCode(70902743) -end -function c87614611.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c87614611.cfilter,tp,LOCATION_ONFIELD,0,1,nil) -end -function c87614611.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_SUMMON)==0 - and Duel.GetActivityCount(tp,ACTIVITY_SPSUMMON)==0 end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) - e1:SetCode(EFFECT_CANNOT_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN,1) - e1:SetTargetRange(1,0) - Duel.RegisterEffect(e1,tp) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) - e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e2:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN,1) - e2:SetTargetRange(1,0) - Duel.RegisterEffect(e2,tp) -end -function c87614611.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp,2) end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(2) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2) -end -function c87614611.activate(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end diff --git a/script/c87621407.lua b/script/c87621407.lua deleted file mode 100644 index 2035503a1e..0000000000 --- a/script/c87621407.lua +++ /dev/null @@ -1,25 +0,0 @@ ---魔装機関車 デコイチ -function c87621407.initial_effect(c) - --flip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(87621407,0)) - e1:SetCategory(CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP) - e1:SetTarget(c87621407.target) - e1:SetOperation(c87621407.operation) - c:RegisterEffect(e1) -end -function c87621407.filter(c) - return c:IsFaceup() and c:IsCode(8715625) -end -function c87621407.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local ct=Duel.GetMatchingGroupCount(c87621407.filter,tp,LOCATION_ONFIELD,0,nil) - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(ct+1) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,ct+1) -end -function c87621407.operation(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end diff --git a/script/c87622767.lua b/script/c87622767.lua deleted file mode 100644 index fc0e3c520f..0000000000 --- a/script/c87622767.lua +++ /dev/null @@ -1,35 +0,0 @@ ---ファイナルサイコオーガ -function c87622767.initial_effect(c) - --salvage - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(87622767,0)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_BATTLE_DESTROYING) - e1:SetCost(c87622767.thcost) - e1:SetTarget(c87622767.thtg) - e1:SetOperation(c87622767.thop) - c:RegisterEffect(e1) -end -function c87622767.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,800) end - Duel.PayLPCost(tp,800) -end -function c87622767.filter(c) - return c:IsRace(RACE_PSYCHO) and c:IsAbleToHand() -end -function c87622767.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c87622767.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c87622767.filter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c87622767.filter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c87622767.thop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end diff --git a/script/c87624166.lua b/script/c87624166.lua deleted file mode 100644 index 1badb02eae..0000000000 --- a/script/c87624166.lua +++ /dev/null @@ -1,47 +0,0 @@ ---古の森 -function c87624166.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_POSITION) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c87624166.target) - e1:SetOperation(c87624166.activate) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(87624166,0)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetRange(LOCATION_SZONE) - e2:SetCountLimit(1) - e2:SetCode(EVENT_PHASE+PHASE_BATTLE) - e2:SetTarget(c87624166.destg) - e2:SetOperation(c87624166.desop) - c:RegisterEffect(e2) -end -function c87624166.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local g=Duel.GetMatchingGroup(Card.IsDefencePos,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_POSITION,g,g:GetCount(),0,0) -end -function c87624166.activate(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local g=Duel.GetMatchingGroup(Card.IsDefencePos,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - if g:GetCount()>0 then - Duel.ChangePosition(g,0,0,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK,true) - end -end -function c87624166.desfilter(c) - return c:GetAttackedCount()>0 -end -function c87624166.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c87624166.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - local g=Duel.GetMatchingGroup(c87624166.desfilter,Duel.GetTurnPlayer(),LOCATION_MZONE,LOCATION_MZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c87624166.desop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local g=Duel.GetMatchingGroup(c87624166.desfilter,Duel.GetTurnPlayer(),LOCATION_MZONE,LOCATION_MZONE,nil) - Duel.Destroy(g,REASON_EFFECT) -end diff --git a/script/c876330.lua b/script/c876330.lua deleted file mode 100644 index 11a7f11d31..0000000000 --- a/script/c876330.lua +++ /dev/null @@ -1,72 +0,0 @@ ---ドラグニティアームズ-ミスティル -function c876330.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c876330.spcon) - e1:SetOperation(c876330.spop) - c:RegisterEffect(e1) - --equip - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(876330,0)) - e2:SetCategory(CATEGORY_LEAVE_GRAVE+CATEGORY_EQUIP) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_SUMMON_SUCCESS) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e2:SetCondition(c876330.eqcon) - e2:SetTarget(c876330.eqtg) - e2:SetOperation(c876330.eqop) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e3) -end -function c876330.spfilter(c) - return c:IsFaceup() and c:IsSetCard(0x29) and c:IsAbleToGraveAsCost() -end -function c876330.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsExistingMatchingCard(c876330.spfilter,tp,LOCATION_MZONE,0,1,nil) -end -function c876330.spop(e,tp,eg,ep,ev,re,r,rp,c) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c876330.spfilter,tp,LOCATION_MZONE,0,1,1,nil) - Duel.SendtoGrave(g,REASON_COST) -end -function c876330.eqcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetPreviousLocation()==LOCATION_HAND -end -function c876330.filter(c) - return c:IsSetCard(0x29) and c:IsRace(RACE_DRAGON) -end -function c876330.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c876330.filter(chkc) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingTarget(c876330.filter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local g=Duel.SelectTarget(tp,c876330.filter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0) -end -function c876330.eqop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsFaceup() and c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then - if not Duel.Equip(tp,tc,c,false) then return end - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(c876330.eqlimit) - tc:RegisterEffect(e1) - end -end -function c876330.eqlimit(e,c) - return e:GetOwner()==c and not c:IsDisabled() -end diff --git a/script/c8763963.lua b/script/c8763963.lua deleted file mode 100644 index 0bb920a6c7..0000000000 --- a/script/c8763963.lua +++ /dev/null @@ -1,79 +0,0 @@ ---魔王超龍 ベエルゼウス -function c8763963.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_DARK),aux.NonTuner(nil),2) - c:EnableReviveLimit() - --indes - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e1:SetValue(1) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - c:RegisterEffect(e2) - --cannot attack announce - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetRange(LOCATION_MZONE) - e3:SetCode(EFFECT_CANNOT_ATTACK) - e3:SetTargetRange(LOCATION_MZONE,0) - e3:SetTarget(c8763963.antarget) - c:RegisterEffect(e3) - --atk 0 - local e4=Effect.CreateEffect(c) - e4:SetCategory(CATEGORY_RECOVER) - e4:SetProperty(EFFECT_FLAG_CARD_TARGET) - e4:SetType(EFFECT_TYPE_IGNITION) - e4:SetRange(LOCATION_MZONE) - e4:SetCountLimit(1) - e4:SetTarget(c8763963.target) - e4:SetOperation(c8763963.operation) - c:RegisterEffect(e4) -end -function c8763963.antarget(e,c) - return c~=e:GetHandler() -end -function c8763963.filter(c) - return c:IsFaceup() and c:GetAttack()>0 -end -function c8763963.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and c8763963.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c8763963.filter,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - local g=Duel.SelectTarget(tp,c8763963.filter,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,g:GetFirst():GetBaseAttack()) -end -function c8763963.dcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return ep~=tp and (c==Duel.GetAttacker() or c==Duel.GetAttackTarget()) -end -function c8763963.dop(e,tp,eg,ep,ev,re,r,rp) - Duel.ChangeBattleDamage(ep,ev/2) -end -function c8763963.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) and tc:GetAttack()>0 and not tc:IsImmuneToEffect(e) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetValue(0) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - Duel.Recover(tp,tc:GetBaseAttack(),REASON_EFFECT) - end - if c:IsRelateToEffect(e) then - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e2:SetRange(LOCATION_MZONE) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetCode(EVENT_PRE_BATTLE_DAMAGE) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e2:SetCondition(c8763963.dcon) - e2:SetOperation(c8763963.dop) - c:RegisterEffect(e2) - end -end diff --git a/script/c87649699.lua b/script/c87649699.lua deleted file mode 100644 index a4bece660c..0000000000 --- a/script/c87649699.lua +++ /dev/null @@ -1,32 +0,0 @@ ---ナチュル・ラグウィード -function c87649699.initial_effect(c) - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(87649699,0)) - e1:SetCategory(CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EVENT_DRAW) - e1:SetCondition(c87649699.condition) - e1:SetCost(c87649699.cost) - e1:SetTarget(c87649699.target) - e1:SetOperation(c87649699.operation) - c:RegisterEffect(e1) -end -function c87649699.condition(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp and Duel.GetCurrentPhase()~=PHASE_DRAW -end -function c87649699.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end -function c87649699.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp,2) end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(2) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2) -end -function c87649699.operation(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end diff --git a/script/c87685879.lua b/script/c87685879.lua deleted file mode 100644 index f82e7bf461..0000000000 --- a/script/c87685879.lua +++ /dev/null @@ -1,39 +0,0 @@ ---コアラッコ -function c87685879.initial_effect(c) - --atk down - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(87685879,0)) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCondition(c87685879.condition) - e1:SetTarget(c87685879.target) - e1:SetOperation(c87685879.operation) - c:RegisterEffect(e1) -end -function c87685879.cfilter(c) - return c:IsFaceup() and c:IsRace(RACE_BEAST) -end -function c87685879.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c87685879.cfilter,tp,LOCATION_MZONE,0,1,e:GetHandler()) -end -function c87685879.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsFaceup() and chkc:IsControler(1-tp) and chkc:GetLocation()==LOCATION_MZONE end - if chk==0 then return Duel.IsExistingTarget(aux.nzatk,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,aux.nzatk,tp,0,LOCATION_MZONE,1,1,nil) -end -function c87685879.operation(e,tp,eg,ep,ev,re,r,rp) - if not Duel.IsExistingMatchingCard(c87685879.cfilter,tp,LOCATION_MZONE,0,1,e:GetHandler()) then return end - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e1:SetValue(0) - tc:RegisterEffect(e1) - end -end diff --git a/script/c87751584.lua b/script/c87751584.lua deleted file mode 100644 index 3664753b6e..0000000000 --- a/script/c87751584.lua +++ /dev/null @@ -1,32 +0,0 @@ ---ガトリング・ドラゴン -function c87751584.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcCode2(c,81480460,25551951,true,true) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(87751584,0)) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_COIN) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetTarget(c87751584.destg) - e1:SetOperation(c87751584.desop) - c:RegisterEffect(e1) -end -function c87751584.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDestructable,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_COIN,nil,0,tp,3) -end -function c87751584.desop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - if g:GetCount()==0 then return end - local c1,c2,c3=Duel.TossCoin(tp,3) - local ct=c1+c2+c3 - if ct==0 then return end - if ct>g:GetCount() then ct=g:GetCount() end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local dg=g:Select(tp,ct,ct,nil) - Duel.HintSelection(dg) - Duel.Destroy(dg,REASON_EFFECT) -end diff --git a/script/c87756343.lua b/script/c87756343.lua deleted file mode 100644 index bd6900d722..0000000000 --- a/script/c87756343.lua +++ /dev/null @@ -1,28 +0,0 @@ ---ラーバモス -function c87756343.initial_effect(c) - c:EnableReviveLimit() - --special summon - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_SPSUMMON_PROC) - e2:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e2:SetRange(LOCATION_HAND) - e2:SetCondition(c87756343.spcon) - e2:SetOperation(c87756343.spop) - c:RegisterEffect(e2) -end -function c87756343.eqfilter(c) - return c:IsCode(40240595) and c:GetTurnCounter()>=2 -end -function c87756343.rfilter(c) - return c:IsCode(58192742) and c:GetEquipGroup():FilterCount(c87756343.eqfilter,nil)>0 -end -function c87756343.spcon(e,c) - if c==nil then return true end - return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-1 - and Duel.CheckReleaseGroup(c:GetControler(),c87756343.rfilter,1,nil) -end -function c87756343.spop(e,tp,eg,ep,ev,re,r,rp,c) - local g=Duel.SelectReleaseGroup(c:GetControler(),c87756343.rfilter,1,1,nil) - Duel.Release(g,REASON_COST) -end diff --git a/script/c87772572.lua b/script/c87772572.lua deleted file mode 100644 index b9e0d6e070..0000000000 --- a/script/c87772572.lua +++ /dev/null @@ -1,56 +0,0 @@ ---量子猫 -function c87772572.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c87772572.target) - e1:SetOperation(c87772572.activate) - c:RegisterEffect(e1) -end -function c87772572.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local rac=0 - local crac=1 - for irac=0,23 do - local catt=1 - for iatt=0,7 do - if Duel.IsPlayerCanSpecialSummonMonster(tp,87772572,0,0x11,0,2200,4,crac,catt) then - rac=rac+crac - break - end - catt=catt*2 - end - crac=crac*2 - end - e:SetLabel(rac) - return rac~=0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - end - Duel.Hint(HINT_SELECTMSG,tp,563) - local crac=Duel.AnnounceRace(tp,1,e:GetLabel()) - local att=0 - local catt=1 - for iatt=0,7 do - if Duel.IsPlayerCanSpecialSummonMonster(tp,87772572,0,0x11,0,2200,4,crac,catt) then - att=att+catt - end - catt=catt*2 - end - Duel.Hint(HINT_SELECTMSG,tp,562) - catt=Duel.AnnounceAttribute(tp,1,att) - e:SetLabel(crac) - Duel.SetTargetParam(catt) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c87772572.activate(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) then return end - local rac=e:GetLabel() - local att=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 - or not Duel.IsPlayerCanSpecialSummonMonster(tp,87772572,0,0x11,0,2200,4,rac,att) then return end - c:AddTrapMonsterAttribute(TYPE_NORMAL,att,rac,4,0,2200) - Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP) - c:TrapMonsterBlock() -end diff --git a/script/c87774234.lua b/script/c87774234.lua deleted file mode 100644 index 19415597ee..0000000000 --- a/script/c87774234.lua +++ /dev/null @@ -1,28 +0,0 @@ ---ワタポン -function c87774234.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(87774234,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DELAY) - e1:SetCode(EVENT_TO_HAND) - e1:SetCondition(c87774234.condition) - e1:SetTarget(c87774234.target) - e1:SetOperation(c87774234.operation) - c:RegisterEffect(e1) -end -function c87774234.condition(e,tp,eg,ep,ev,re,r,rp) - return bit.band(r,REASON_EFFECT)~=0 and e:GetHandler():IsPreviousLocation(LOCATION_DECK) -end -function c87774234.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c87774234.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c87798440.lua b/script/c87798440.lua deleted file mode 100644 index e431ef79df..0000000000 --- a/script/c87798440.lua +++ /dev/null @@ -1,111 +0,0 @@ ---アーマー・ブレイカー -function c87798440.initial_effect(c) - --equip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(87798440,0)) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetTarget(c87798440.eqtg) - e1:SetOperation(c87798440.eqop) - c:RegisterEffect(e1) - --unequip - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(87798440,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_SZONE) - e2:SetCondition(c87798440.uncon) - e2:SetTarget(c87798440.sptg) - e2:SetOperation(c87798440.spop) - c:RegisterEffect(e2) - --destroy sub - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_EQUIP) - e3:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e3:SetCode(EFFECT_DESTROY_SUBSTITUTE) - e3:SetCondition(c87798440.uncon) - e3:SetValue(c87798440.repval) - c:RegisterEffect(e3) - --destroy - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(87798440,2)) - e4:SetCategory(CATEGORY_DESTROY) - e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e4:SetCode(EVENT_BATTLE_DAMAGE) - e4:SetProperty(EFFECT_FLAG_CARD_TARGET) - e4:SetRange(LOCATION_SZONE) - e4:SetCondition(c87798440.descon) - e4:SetTarget(c87798440.destg) - e4:SetOperation(c87798440.desop) - c:RegisterEffect(e4) - --eqlimit - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_SINGLE) - e5:SetCode(EFFECT_EQUIP_LIMIT) - e5:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e5:SetValue(c87798440.eqlimit) - c:RegisterEffect(e5) -end -function c87798440.uncon(e) - return e:GetHandler():IsStatus(STATUS_UNION) -end -function c87798440.repval(e,re,r,rp) - return bit.band(r,REASON_BATTLE)~=0 -end -function c87798440.eqlimit(e,c) - return c:IsRace(RACE_WARRIOR) -end -function c87798440.filter(c) - return c:IsFaceup() and c:IsRace(RACE_WARRIOR) and c:GetUnionCount()==0 -end -function c87798440.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c87798440.filter(chkc) end - if chk==0 then return e:GetHandler():GetFlagEffect(87798440)==0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingTarget(c87798440.filter,tp,LOCATION_MZONE,0,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local g=Duel.SelectTarget(tp,c87798440.filter,tp,LOCATION_MZONE,0,1,1,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0) - e:GetHandler():RegisterFlagEffect(87798440,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1) -end -function c87798440.eqop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if not c:IsRelateToEffect(e) or c:IsFacedown() then return end - if not tc:IsRelateToEffect(e) or not c87798440.filter(tc) then - Duel.SendtoGrave(c,REASON_EFFECT) - return - end - if not Duel.Equip(tp,c,tc,false) then return end - c:SetStatus(STATUS_UNION,true) -end -function c87798440.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():GetFlagEffect(87798440)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) - e:GetHandler():RegisterFlagEffect(87798440,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1) -end -function c87798440.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP) - end -end -function c87798440.descon(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp and e:GetHandler():GetEquipTarget()==eg:GetFirst() and c87798440.uncon(e) -end -function c87798440.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsDestructable() end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c87798440.desop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c87819421.lua b/script/c87819421.lua deleted file mode 100644 index dac44f53ed..0000000000 --- a/script/c87819421.lua +++ /dev/null @@ -1,37 +0,0 @@ ---マスク・チャージ -function c87819421.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c87819421.target) - e1:SetOperation(c87819421.activate) - c:RegisterEffect(e1) -end -function c87819421.filter1(c) - return c:IsSetCard(0x8) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() -end -function c87819421.filter2(c) - return c:IsSetCard(0xa5) and c:IsType(TYPE_QUICKPLAY) and c:IsAbleToHand() -end -function c87819421.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - if chk==0 then return Duel.IsExistingTarget(c87819421.filter1,tp,LOCATION_GRAVE,0,1,nil) - and Duel.IsExistingTarget(c87819421.filter2,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g1=Duel.SelectTarget(tp,c87819421.filter1,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g2=Duel.SelectTarget(tp,c87819421.filter2,tp,LOCATION_GRAVE,0,1,1,nil) - g1:Merge(g2) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g1,2,0,0) -end -function c87819421.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local sg=g:Filter(Card.IsRelateToEffect,nil,e) - if sg:GetCount()>0 then - Duel.SendtoHand(sg,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,sg) - end -end diff --git a/script/c87836938.lua b/script/c87836938.lua deleted file mode 100644 index 30c999baf8..0000000000 --- a/script/c87836938.lua +++ /dev/null @@ -1,32 +0,0 @@ ---ヴァイロン・ヴァンガード -function c87836938.initial_effect(c) - --draw - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(87836938,0)) - e1:SetCategory(CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_LEAVE_FIELD) - e1:SetCondition(c87836938.drcon) - e1:SetTarget(c87836938.drtg) - e1:SetOperation(c87836938.drop) - c:RegisterEffect(e1) -end -function c87836938.drcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local et=c:GetEquipCount() - if et>0 and c:IsReason(REASON_EFFECT) and c:IsReason(REASON_DESTROY) and c:IsLocation(LOCATION_GRAVE) then - e:SetLabel(et) - return true - else return false end -end -function c87836938.drtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp,e:GetLabel()) end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(e:GetLabel()) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,e:GetLabel()) -end -function c87836938.drop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end diff --git a/script/c8785161.lua b/script/c8785161.lua deleted file mode 100644 index ef19d34eb0..0000000000 --- a/script/c8785161.lua +++ /dev/null @@ -1,57 +0,0 @@ ---RR-ワイルド・ヴァルチャー -function c8785161.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c8785161.spcon) - e1:SetCost(c8785161.spcost) - e1:SetTarget(c8785161.sptg) - e1:SetOperation(c8785161.spop) - c:RegisterEffect(e1) - if not c8785161.global_check then - c8785161.global_check=true - local ge1=Effect.CreateEffect(c) - ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - ge1:SetCode(EVENT_SUMMON_SUCCESS) - ge1:SetLabel(8785161) - ge1:SetOperation(aux.sumreg) - Duel.RegisterEffect(ge1,0) - local ge2=ge1:Clone() - ge2:SetCode(EVENT_SPSUMMON_SUCCESS) - ge2:SetLabel(8785161) - Duel.RegisterEffect(ge2,0) - end -end -function c8785161.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetFlagEffect(8785161)>0 -end -function c8785161.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end -function c8785161.spfilter1(c,e,tp) - local lv=c:GetLevel() - return lv>0 and lv<6 and c:IsSetCard(0xba) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) - and Duel.IsExistingMatchingCard(c8785161.spfilter2,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,c,e,tp,6-lv) -end -function c8785161.spfilter2(c,e,tp,lv) - return c:IsSetCard(0xba) and c:GetLevel()==lv and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c8785161.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c8785161.spfilter1,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE) -end -function c8785161.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g1=Duel.SelectMatchingCard(tp,c8785161.spfilter1,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp) - local tc1=g1:GetFirst() - if not tc1 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g2=Duel.SelectMatchingCard(tp,c8785161.spfilter2,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,tc1,e,tp,6-tc1:GetLevel()) - g1:Merge(g2) - Duel.SpecialSummon(g1,0,tp,tp,false,false,POS_FACEUP) -end diff --git a/script/c87880531.lua b/script/c87880531.lua deleted file mode 100644 index 3f426f3408..0000000000 --- a/script/c87880531.lua +++ /dev/null @@ -1,84 +0,0 @@ ---拡散する波動 -function c87880531.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c87880531.condition) - e1:SetCost(c87880531.cost) - e1:SetTarget(c87880531.target) - e1:SetOperation(c87880531.activate) - c:RegisterEffect(e1) -end -function c87880531.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsAbleToEnterBP() -end -function c87880531.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,1000) end - Duel.PayLPCost(tp,1000) -end -function c87880531.filter(c) - return c:IsFaceup() and c:IsRace(RACE_SPELLCASTER) and c:IsLevelAbove(7) -end -function c87880531.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c87880531.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c87880531.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c87880531.filter,tp,LOCATION_MZONE,0,1,1,nil) -end -function c87880531.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsControler(tp) and tc:IsRelateToEffect(e) then - local ae=Effect.CreateEffect(e:GetHandler()) - ae:SetType(EFFECT_TYPE_FIELD) - ae:SetCode(EFFECT_CANNOT_ATTACK) - ae:SetTargetRange(LOCATION_MZONE,0) - ae:SetTarget(c87880531.ftarget) - ae:SetLabel(tc:GetFieldID()) - ae:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(ae,tp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_MUST_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_CANNOT_EP) - e2:SetRange(LOCATION_MZONE) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetTargetRange(1,0) - e2:SetCondition(c87880531.becon) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e2) - local e3=Effect.CreateEffect(e:GetHandler()) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_ATTACK_ALL) - e3:SetValue(1) - e3:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e3) - local e4=Effect.CreateEffect(e:GetHandler()) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e4:SetCode(EVENT_BATTLED) - e4:SetOperation(c87880531.disop) - e4:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e4) - end -end -function c87880531.ftarget(e,c) - return e:GetLabel()~=c:GetFieldID() -end -function c87880531.becon(e) - return e:GetHandler():IsAttackable() -end -function c87880531.disop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local bc=c:GetBattleTarget() - if not bc or not bc:IsStatus(STATUS_BATTLE_DESTROYED) then return end - local e1=Effect.CreateEffect(e:GetOwner()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_TRIGGER) - e1:SetReset(RESET_EVENT+0x17a0000) - bc:RegisterEffect(e1) -end diff --git a/script/c87890143.lua b/script/c87890143.lua deleted file mode 100644 index a42abe7c53..0000000000 --- a/script/c87890143.lua +++ /dev/null @@ -1,33 +0,0 @@ ---ジェネレーション・フォース -function c87890143.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c87890143.condition) - e1:SetTarget(c87890143.target) - e1:SetOperation(c87890143.activate) - c:RegisterEffect(e1) -end -function c87890143.cfilter(c) - return c:IsFaceup() and c:IsType(TYPE_XYZ) -end -function c87890143.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c87890143.cfilter,tp,LOCATION_MZONE,0,1,nil) -end -function c87890143.filter(c) - return c:IsSetCard(0x73) and c:IsAbleToHand() -end -function c87890143.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c87890143.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c87890143.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c87890143.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c87902575.lua b/script/c87902575.lua deleted file mode 100644 index 212158e8ca..0000000000 --- a/script/c87902575.lua +++ /dev/null @@ -1,96 +0,0 @@ ---フューチャー・ヴィジョン -function c87902575.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c87902575.clear) - c:RegisterEffect(e1) - local ng=Group.CreateGroup() - ng:KeepAlive() - e1:SetLabelObject(ng) - --remove - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(87902575,0)) - e2:SetCategory(CATEGORY_REMOVE) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetRange(LOCATION_SZONE) - e2:SetCode(EVENT_SUMMON_SUCCESS) - e2:SetTarget(c87902575.rmtg) - e2:SetOperation(c87902575.rmop) - e2:SetLabelObject(e1) - c:RegisterEffect(e2) - --return - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(87902575,1)) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e3:SetRange(LOCATION_SZONE) - e3:SetCode(EVENT_PHASE+PHASE_STANDBY) - e3:SetCountLimit(1) - e3:SetCondition(c87902575.retcon) - e3:SetOperation(c87902575.retop) - e3:SetLabelObject(e1) - c:RegisterEffect(e3) - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e4:SetCode(EVENT_PHASE_START+PHASE_MAIN1) - e4:SetRange(LOCATION_SZONE) - e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e4:SetCountLimit(1) - e4:SetOperation(c87902575.clearop) - e4:SetLabelObject(e1) - c:RegisterEffect(e4) -end -function c87902575.clear(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - e:GetLabelObject():Clear() -end -function c87902575.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - if chk==0 then return eg:GetFirst():IsOnField() - and eg:GetFirst():IsCanBeEffectTarget(e) end - Duel.SetTargetCard(eg:GetFirst()) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,eg,1,0,0) -end -function c87902575.rmop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local tc=eg:GetFirst() - if tc:IsRelateToEffect(e) and tc:IsLocation(LOCATION_MZONE) and Duel.Remove(tc,POS_FACEUP,REASON_EFFECT+REASON_TEMPORARY)~=0 then - tc:CreateRelation(e:GetHandler(),RESET_EVENT+0x1fe0000) - e:GetLabelObject():GetLabelObject():AddCard(tc) - end -end -function c87902575.retfilter(c,ec,tp) - return c:IsRelateToCard(ec) and c:GetPreviousControler()==tp -end -function c87902575.retcon(e,tp,eg,ep,ev,re,r,rp) - local g=e:GetLabelObject():GetLabelObject() - return g:FilterCount(c87902575.retfilter,nil,e:GetHandler(),Duel.GetTurnPlayer())>0 -end -function c87902575.retop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local p=Duel.GetTurnPlayer() - local lg=e:GetLabelObject():GetLabelObject() - local g=lg:Filter(c87902575.retfilter,nil,e:GetHandler(),p) - lg:Sub(g) - local ft=Duel.GetLocationCount(p,LOCATION_MZONE) - if g:GetCount()>ft then - local sg=g - Duel.Hint(HINT_SELECTMSG,p,aux.Stringid(87902575,2)) - g=g:Select(p,ft,ft,nil) - sg:Sub(g) - Duel.SendtoGrave(sg,REASON_EFFECT) - end - local tc=g:GetFirst() - while tc do - Duel.ReturnToField(tc,POS_FACEUP_ATTACK) - tc=g:GetNext() - end -end -function c87902575.clfilter(c,ec,tp) - return (not c:IsRelateToCard(ec)) or c:GetPreviousControler()==tp -end -function c87902575.clearop(e,tp,eg,ep,ev,re,r,rp) - e:GetLabelObject():GetLabelObject():Remove(c87902575.clfilter,nil,e:GetHandler(),Duel.GetTurnPlayer()) -end diff --git a/script/c87910978.lua b/script/c87910978.lua deleted file mode 100644 index 9e65d83f3a..0000000000 --- a/script/c87910978.lua +++ /dev/null @@ -1,35 +0,0 @@ ---洗脳-ブレインコントロール -function c87910978.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_CONTROL) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c87910978.cost) - e1:SetTarget(c87910978.target) - e1:SetOperation(c87910978.activate) - c:RegisterEffect(e1) -end -function c87910978.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,800) - else Duel.PayLPCost(tp,800) end -end -function c87910978.filter(c) - return c:IsControlerCanBeChanged() and c:IsFaceup() -end -function c87910978.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c87910978.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c87910978.filter,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) - local g=Duel.SelectTarget(tp,c87910978.filter,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0) -end -function c87910978.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() and not Duel.GetControl(tc,tp,PHASE_END,1) then - if not tc:IsImmuneToEffect(e) and tc:IsAbleToChangeControler() then - Duel.Destroy(tc,REASON_EFFECT) - end - end -end diff --git a/script/c87911394.lua b/script/c87911394.lua deleted file mode 100644 index 5a75ea5406..0000000000 --- a/script/c87911394.lua +++ /dev/null @@ -1,76 +0,0 @@ ---CNo.39 希望皇ホープレイ・ヴィクトリー -function c87911394.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,5,3) - c:EnableReviveLimit() - --actlimit - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetOperation(c87911394.operation) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(87911394,0)) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_ATTACK_ANNOUNCE) - e2:SetCondition(c87911394.atkcon) - e2:SetCost(c87911394.atkcost) - e2:SetTarget(c87911394.atktg) - e2:SetOperation(c87911394.atkop) - c:RegisterEffect(e2) -end -c87911394.xyz_number=39 -function c87911394.operation(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EFFECT_CANNOT_ACTIVATE) - e1:SetTargetRange(0,1) - e1:SetValue(c87911394.aclimit) - e1:SetReset(RESET_PHASE+PHASE_DAMAGE) - Duel.RegisterEffect(e1,tp) -end -function c87911394.aclimit(e,re,tp) - return re:IsHasType(EFFECT_TYPE_ACTIVATE) -end -function c87911394.atkcon(e,tp,eg,ep,ev,re,r,rp) - local at=Duel.GetAttackTarget() - return at and at:IsFaceup() and e:GetHandler():GetOverlayGroup():IsExists(Card.IsSetCard,1,nil,0x7f) -end -function c87911394.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c87911394.atktg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetCard(Duel.GetAttackTarget()) -end -function c87911394.atkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetValue(RESET_TURN_SET) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e2) - Duel.AdjustInstantly(tc) - local atk=tc:GetAttack() - if c:IsFaceup() and c:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetValue(atk) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - c:RegisterEffect(e1) - end - end -end diff --git a/script/c8794435.lua b/script/c8794435.lua deleted file mode 100644 index 912acb1406..0000000000 --- a/script/c8794435.lua +++ /dev/null @@ -1,38 +0,0 @@ ---合成魔獣 ガーゼット -function c8794435.initial_effect(c) - --tribute check - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_MATERIAL_CHECK) - e1:SetValue(c8794435.valcheck) - c:RegisterEffect(e1) - --give atk effect only when summon - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_SUMMON_COST) - e2:SetOperation(c8794435.facechk) - e2:SetLabelObject(e1) - c:RegisterEffect(e2) -end -function c8794435.valcheck(e,c) - local g=c:GetMaterial() - local tc=g:GetFirst() - local atk=0 - while tc do - local catk=tc:GetTextAttack() - atk=atk+(catk>=0 and catk or 0) - tc=g:GetNext() - end - if e:GetLabel()==1 then - e:SetLabel(0) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK) - e1:SetValue(atk) - e1:SetReset(RESET_EVENT+0xff0000) - c:RegisterEffect(e1) - end -end -function c8794435.facechk(e,tp,eg,ep,ev,re,r,rp) - e:GetLabelObject():SetLabel(1) -end diff --git a/script/c87973893.lua b/script/c87973893.lua deleted file mode 100644 index 192fe7e782..0000000000 --- a/script/c87973893.lua +++ /dev/null @@ -1,69 +0,0 @@ ---甲虫装機の魔斧 ゼクトホーク -function c87973893.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c87973893.target) - e1:SetOperation(c87973893.operation) - c:RegisterEffect(e1) - --Atk - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(1000) - c:RegisterEffect(e2) - --Equip limit - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_EQUIP_LIMIT) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e3:SetValue(c87973893.eqlimit) - c:RegisterEffect(e3) - --actlimit - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e4:SetRange(LOCATION_SZONE) - e4:SetCode(EVENT_ATTACK_ANNOUNCE) - e4:SetCondition(c87973893.accon) - e4:SetOperation(c87973893.acop) - c:RegisterEffect(e4) -end -function c87973893.eqlimit(e,c) - return c:IsSetCard(0x56) -end -function c87973893.filter(c) - return c:IsFaceup() and c:IsSetCard(0x56) -end -function c87973893.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c87973893.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c87973893.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c87973893.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c87973893.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,c,tc) - end -end -function c87973893.accon(e,tp,eg,ep,ev,re,r,rp) - return eg:GetFirst()==e:GetHandler():GetEquipTarget() -end -function c87973893.acop(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EFFECT_CANNOT_ACTIVATE) - e1:SetTargetRange(1,1) - e1:SetValue(c87973893.aclimit) - e1:SetReset(RESET_PHASE+PHASE_DAMAGE) - Duel.RegisterEffect(e1,tp) -end -function c87973893.aclimit(e,re,tp) - return re:IsHasType(EFFECT_TYPE_ACTIVATE) -end diff --git a/script/c87978805.lua b/script/c87978805.lua deleted file mode 100644 index 0e87687c47..0000000000 --- a/script/c87978805.lua +++ /dev/null @@ -1,17 +0,0 @@ ---寄生体ダニー -function c87978805.initial_effect(c) - --atk/def - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_SET_ATTACK) - e1:SetValue(c87978805.val) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_SET_DEFENCE) - c:RegisterEffect(e2) -end -function c87978805.val(e,c) - return Duel.GetMatchingGroupCount(Card.IsType,c:GetControler(),LOCATION_MZONE,LOCATION_MZONE,nil,TYPE_TOKEN)*500 -end diff --git a/script/c87997872.lua b/script/c87997872.lua deleted file mode 100644 index 833e503a30..0000000000 --- a/script/c87997872.lua +++ /dev/null @@ -1,67 +0,0 @@ ---スフィンクス・アンドロジュネス -function c87997872.initial_effect(c) - c:EnableReviveLimit() - --spsummon condition - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(87997872,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetRange(LOCATION_HAND+LOCATION_DECK) - e2:SetProperty(EFFECT_FLAG_CHAIN_UNIQUE) - e2:SetCode(EVENT_LEAVE_FIELD) - e2:SetCondition(c87997872.spcon) - e2:SetCost(c87997872.cost) - e2:SetTarget(c87997872.sptg) - e2:SetOperation(c87997872.spop) - c:RegisterEffect(e2) - --atkup - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(87997872,1)) - e3:SetCategory(CATEGORY_ATKCHANGE) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - e3:SetCost(c87997872.cost) - e3:SetOperation(c87997872.atkop) - c:RegisterEffect(e3) -end -function c87997872.cfilter(c,tp,code) - return c:IsCode(code) and c:GetPreviousControler()==tp and c:IsReason(REASON_DESTROY) -end -function c87997872.spcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c87997872.cfilter,1,nil,tp,15013468) - and eg:IsExists(c87997872.cfilter,1,nil,tp,51402177) -end -function c87997872.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,500) end - Duel.PayLPCost(tp,500) -end -function c87997872.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,false) end - if e:GetHandler():IsLocation(LOCATION_DECK) then - Duel.ConfirmCards(1-tp,e:GetHandler()) - end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c87997872.spop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - Duel.SpecialSummon(e:GetHandler(),0,tp,tp,true,false,POS_FACEUP) - end -end -function c87997872.atkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFaceup() and c:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(3000) - e1:SetReset(RESET_EVENT+0x1ff0000+RESET_PHASE+PHASE_END) - c:RegisterEffect(e1) - end -end diff --git a/script/c88032368.lua b/script/c88032368.lua deleted file mode 100644 index f6766fc44b..0000000000 --- a/script/c88032368.lua +++ /dev/null @@ -1,35 +0,0 @@ ---セカンド・ブースター -function c88032368.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(88032368,0)) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c88032368.cost) - e1:SetTarget(c88032368.target) - e1:SetOperation(c88032368.operation) - c:RegisterEffect(e1) -end -function c88032368.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end -function c88032368.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:IsPosition(POS_FACEUP_ATTACK) end - if chk==0 then return Duel.IsExistingTarget(Card.IsPosition,tp,LOCATION_MZONE,0,1,e:GetHandler(),POS_FACEUP_ATTACK) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUPATTACK) - Duel.SelectTarget(tp,Card.IsPosition,tp,LOCATION_MZONE,0,1,1,nil,POS_FACEUP_ATTACK) -end -function c88032368.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsPosition(POS_FACEUP_ATTACK) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(1500) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - end -end diff --git a/script/c88032456.lua b/script/c88032456.lua deleted file mode 100644 index 648d2b7a65..0000000000 --- a/script/c88032456.lua +++ /dev/null @@ -1,52 +0,0 @@ ---コピーキャット -function c88032456.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCountLimit(1,88032456+EFFECT_COUNT_CODE_OATH) - e1:SetCondition(c88032456.condition) - e1:SetTarget(c88032456.target) - e1:SetOperation(c88032456.activate) - c:RegisterEffect(e1) -end -function c88032456.cfilter1(c) - return c:IsFaceup() and c:IsCode(15259703) -end -function c88032456.cfilter2(c) - return c:IsFaceup() and c:IsType(TYPE_TOON) -end -function c88032456.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c88032456.cfilter1,tp,LOCATION_ONFIELD,0,1,nil) - and Duel.IsExistingMatchingCard(c88032456.cfilter2,tp,LOCATION_MZONE,0,1,nil) -end -function c88032456.filter(c,e,tp) - if c:IsType(TYPE_MONSTER) then - return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - else - return c:IsSSetable(true) and (c:IsType(TYPE_FIELD) or Duel.GetLocationCount(tp,LOCATION_SZONE)>0) - end -end -function c88032456.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(1-tp) and c88032456.filter(chkc,e,tp) end - if chk==0 then return Duel.IsExistingTarget(c88032456.filter,tp,0,LOCATION_GRAVE,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - local g=Duel.SelectTarget(tp,c88032456.filter,tp,0,LOCATION_GRAVE,1,1,nil,e,tp) - if g:GetFirst():IsType(TYPE_MONSTER) then - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) - else - Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g,1,0,0) - end -end -function c88032456.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if not tc:IsRelateToEffect(e) then return end - if tc:IsType(TYPE_MONSTER) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - elseif (tc:IsType(TYPE_FIELD) or Duel.GetLocationCount(tp,LOCATION_SZONE)>0) then - Duel.SSet(tp,tc) - Duel.ConfirmCards(1-tp,tc) - end -end diff --git a/script/c88033975.lua b/script/c88033975.lua deleted file mode 100644 index aa2b9d8462..0000000000 --- a/script/c88033975.lua +++ /dev/null @@ -1,22 +0,0 @@ ---幻層の守護者アルマデス -function c88033975.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1) - c:EnableReviveLimit() - --actlimit - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EFFECT_CANNOT_ACTIVATE) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(0,1) - e1:SetValue(c88033975.aclimit) - e1:SetCondition(c88033975.actcon) - c:RegisterEffect(e1) -end -function c88033975.aclimit(e,re,tp) - return not re:GetHandler():IsImmuneToEffect(e) -end -function c88033975.actcon(e) - return Duel.GetAttacker()==e:GetHandler() or Duel.GetAttackTarget()==e:GetHandler() -end diff --git a/script/c8806072.lua b/script/c8806072.lua deleted file mode 100644 index e1be92543c..0000000000 --- a/script/c8806072.lua +++ /dev/null @@ -1,27 +0,0 @@ ---コンボファイター -function c8806072.initial_effect(c) - --chain - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EVENT_CHAINING) - e1:SetRange(LOCATION_MZONE) - e1:SetOperation(c8806072.chop) - c:RegisterEffect(e1) - --atk - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_EXTRA_ATTACK) - e2:SetCondition(c8806072.atkcon) - e2:SetValue(1) - c:RegisterEffect(e2) -end -function c8806072.chop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetCurrentPhase()==PHASE_MAIN1 and Duel.GetTurnPlayer()==tp and Duel.GetCurrentChain()>1 - and e:GetHandler():GetFlagEffect(8806072)==0 then - e:GetHandler():RegisterFlagEffect(8806072,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) - end -end -function c8806072.atkcon(e) - return e:GetHandler():GetFlagEffect(8806072)~=0 -end diff --git a/script/c88069166.lua b/script/c88069166.lua deleted file mode 100644 index 69d34cef19..0000000000 --- a/script/c88069166.lua +++ /dev/null @@ -1,69 +0,0 @@ ---オーディンの眼 -function c88069166.initial_effect(c) - --activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(TIMING_DRAW_PHASE) - c:RegisterEffect(e1) - --confirm - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(88069166,0)) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) - e2:SetRange(LOCATION_SZONE) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCountLimit(1) - e2:SetTarget(c88069166.target) - e2:SetOperation(c88069166.operation) - c:RegisterEffect(e2) - --cancel target - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e3:SetCode(EVENT_PHASE+PHASE_END) - e3:SetRange(LOCATION_SZONE) - e3:SetCountLimit(1) - e3:SetOperation(c88069166.ctarget) - c:RegisterEffect(e3) -end -function c88069166.filter(c) - return c:IsFaceup() and c:IsSetCard(0x4b) -end -function c88069166.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c88069166.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c88069166.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c88069166.filter,tp,LOCATION_MZONE,0,1,1,nil) - Duel.SetChainLimit(c88069166.chlimit) -end -function c88069166.chlimit(e,ep,tp) - return tp==ep -end -function c88069166.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc and c:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsRelateToEffect(e) then - c:SetCardTarget(tc) - e:SetLabelObject(tc) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e1:SetCondition(c88069166.rcon) - tc:RegisterEffect(e1) - local g1=Duel.GetFieldGroup(tp,0,LOCATION_HAND) - local g2=Duel.GetMatchingGroup(Card.IsFacedown,tp,0,LOCATION_ONFIELD,nil) - g1:Merge(g2) - Duel.ConfirmCards(tp,g1) - Duel.ShuffleHand(1-tp) - end -end -function c88069166.rcon(e) - return e:GetOwner():IsHasCardTarget(e:GetHandler()) -end -function c88069166.ctarget(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetHandler():GetFirstCardTarget() - if tc then e:GetHandler():CancelCardTarget(tc) end -end diff --git a/script/c88071625.lua b/script/c88071625.lua deleted file mode 100644 index 4141e6a2b6..0000000000 --- a/script/c88071625.lua +++ /dev/null @@ -1,116 +0,0 @@ ---The tyrant NEPTUNE -function c88071625.initial_effect(c) - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(aux.FALSE) - c:RegisterEffect(e1) - --summon/set with 1 tribute - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(88071625,0)) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_SUMMON_PROC) - e2:SetCondition(c88071625.otcon) - e2:SetOperation(c88071625.otop) - e2:SetValue(SUMMON_TYPE_ADVANCE) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EFFECT_SET_PROC) - c:RegisterEffect(e3) - --tribute check - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetCode(EFFECT_MATERIAL_CHECK) - e4:SetValue(c88071625.valcheck) - c:RegisterEffect(e4) - --give atk effect only when summon - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_SINGLE) - e5:SetCode(EFFECT_SUMMON_COST) - e5:SetOperation(c88071625.facechk) - e5:SetLabelObject(e4) - c:RegisterEffect(e5) - --copy - local e6=Effect.CreateEffect(c) - e6:SetDescription(aux.Stringid(88071625,1)) - e6:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e6:SetProperty(EFFECT_FLAG_CARD_TARGET) - e6:SetCode(EVENT_SUMMON_SUCCESS) - e6:SetCondition(c88071625.copycon) - e6:SetTarget(c88071625.copytg) - e6:SetOperation(c88071625.copyop) - c:RegisterEffect(e6) -end -function c88071625.otcon(e,c) - if c==nil then return true end - return c:GetLevel()>6 and Duel.GetTributeCount(c)>0 -end -function c88071625.otop(e,tp,eg,ep,ev,re,r,rp,c) - local sg=Duel.SelectTribute(tp,c,1,1) - c:SetMaterial(sg) - Duel.Release(sg, REASON_SUMMON+REASON_MATERIAL) -end -function c88071625.valcheck(e,c) - local g=c:GetMaterial() - local tc=g:GetFirst() - local atk=0 - local def=0 - while tc do - local catk=tc:GetTextAttack() - local cdef=tc:GetTextDefence() - atk=atk+(catk>=0 and catk or 0) - def=def+(cdef>=0 and cdef or 0) - tc=g:GetNext() - end - if e:GetLabel()==1 then - e:SetLabel(0) - --atk continuous effect - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetValue(atk) - e1:SetReset(RESET_EVENT+0xff0000) - c:RegisterEffect(e1) - --def continuous effect - local e2=e1:Clone() - e2:SetCode(EFFECT_UPDATE_DEFENCE) - e2:SetValue(def) - c:RegisterEffect(e2) - end -end -function c88071625.facechk(e,tp,eg,ep,ev,re,r,rp) - e:GetLabelObject():SetLabel(1) -end -function c88071625.copycon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_ADVANCE -end -function c88071625.filter(c,e) - return c:IsType(TYPE_EFFECT) and c:IsLocation(LOCATION_GRAVE) and c:IsCanBeEffectTarget(e) -end -function c88071625.copytg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return e:GetHandler():GetMaterial():IsContains(chkc) and c88071625.filter(chkc,e) end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - local g=e:GetHandler():GetMaterial():FilterSelect(tp,c88071625.filter,1,1,nil,e) - Duel.SetTargetCard(g) -end -function c88071625.copyop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) and c:IsRelateToEffect(e) and c:IsFaceup() then - local code=tc:GetOriginalCode() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetCode(EFFECT_CHANGE_CODE) - e1:SetValue(code) - c:RegisterEffect(e1) - c:CopyEffect(code,RESET_EVENT+0x1fe0000,1) - end -end diff --git a/script/c88089103.lua b/script/c88089103.lua deleted file mode 100644 index cd1a5e3d9a..0000000000 --- a/script/c88089103.lua +++ /dev/null @@ -1,30 +0,0 @@ ---四次元の墓 -function c88089103.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TODECK) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c88089103.target) - e1:SetOperation(c88089103.activate) - c:RegisterEffect(e1) -end -function c88089103.filter(c) - return c:IsSetCard(0x41) and c:IsAbleToDeck() -end -function c88089103.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c88089103.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c88089103.filter,tp,LOCATION_GRAVE,0,2,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectTarget(tp,c88089103.filter,tp,LOCATION_GRAVE,0,2,2,nil) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,2,0,0) -end -function c88089103.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local sg=g:Filter(Card.IsRelateToEffect,nil,e) - if sg:GetCount()>0 then - Duel.SendtoDeck(sg,nil,2,REASON_EFFECT) - Duel.ConfirmCards(1-tp,sg) - end -end diff --git a/script/c8809344.lua b/script/c8809344.lua deleted file mode 100644 index 37f710f432..0000000000 --- a/script/c8809344.lua +++ /dev/null @@ -1,76 +0,0 @@ ---外神ナイアルラ -function c8809344.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,4,2) - c:EnableReviveLimit() - --rankup - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(8809344,0)) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(c8809344.rkcon) - e1:SetCost(c8809344.rkcost) - e1:SetOperation(c8809344.rkop) - c:RegisterEffect(e1) - --attach - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(8809344,1)) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCountLimit(1) - e2:SetRange(LOCATION_MZONE) - e2:SetCondition(c8809344.condition) - e2:SetTarget(c8809344.target) - e2:SetOperation(c8809344.operation) - c:RegisterEffect(e2) -end -function c8809344.rkcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_XYZ -end -function c8809344.rkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end - local ct=Duel.DiscardHand(tp,Card.IsDiscardable,1,60,REASON_COST+REASON_DISCARD) - e:SetLabel(ct) -end -function c8809344.rkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFaceup() and c:IsRelateToEffect(e) then - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_UPDATE_RANK) - e2:SetReset(RESET_EVENT+0x1ff0000) - e2:SetValue(e:GetLabel()) - c:RegisterEffect(e2) - end -end -function c8809344.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsType(TYPE_XYZ) and e:GetHandler():GetOverlayCount()>0 -end -function c8809344.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and chkc:IsType(TYPE_MONSTER) end - if chk==0 then return Duel.IsExistingTarget(Card.IsType,tp,LOCATION_GRAVE,0,1,nil,TYPE_MONSTER) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - local g=Duel.SelectTarget(tp,Card.IsType,tp,LOCATION_GRAVE,0,1,1,nil,TYPE_MONSTER) - Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g,1,0,0) -end -function c8809344.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then - local og=c:GetOverlayGroup() - if og:GetCount()==0 then return end - Duel.SendtoGrave(og,REASON_EFFECT) - Duel.Overlay(c,Group.FromCards(tc)) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_COPY_INHERIT) - e1:SetCode(EFFECT_CHANGE_ATTRIBUTE) - e1:SetValue(tc:GetOriginalAttribute()) - e1:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_CHANGE_RACE) - e2:SetValue(tc:GetOriginalRace()) - c:RegisterEffect(e2) - end -end diff --git a/script/c88095331.lua b/script/c88095331.lua deleted file mode 100644 index f709a49e8f..0000000000 --- a/script/c88095331.lua +++ /dev/null @@ -1,35 +0,0 @@ ---エヴォルド・ナハシュ -function c88095331.initial_effect(c) - --search - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(88095331,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE) - e1:SetCode(EVENT_RELEASE) - e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCondition(c88095331.condition) - e1:SetTarget(c88095331.target) - e1:SetOperation(c88095331.operation) - c:RegisterEffect(e1) -end -function c88095331.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) -end -function c88095331.filter(c,e,tp) - return c:IsSetCard(0x604e) and c:IsCanBeSpecialSummoned(e,155,tp,false,false) -end -function c88095331.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c88095331.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c88095331.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c88095331.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,155,tp,tp,false,false,POS_FACEUP) - local rf=g:GetFirst().evolreg - if rf then rf(g:GetFirst()) end - end -end diff --git a/script/c88120966.lua b/script/c88120966.lua deleted file mode 100644 index aa9c4f6e06..0000000000 --- a/script/c88120966.lua +++ /dev/null @@ -1,48 +0,0 @@ ---No.15 ギミック・パペット-ジャイアントキラー -function c88120966.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,8,2) - c:EnableReviveLimit() - --attack up - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE) - e1:SetDescription(aux.Stringid(88120966,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCountLimit(2) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c88120966.condition) - e1:SetCost(c88120966.cost) - e1:SetTarget(c88120966.target) - e1:SetOperation(c88120966.operation) - c:RegisterEffect(e1) -end -c88120966.xyz_number=15 -function c88120966.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()==PHASE_MAIN1 -end -function c88120966.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c88120966.filter(c) - return c:IsDestructable() and bit.band(c:GetSummonType(),SUMMON_TYPE_SPECIAL)==SUMMON_TYPE_SPECIAL -end -function c88120966.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c88120966.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c88120966.filter,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c88120966.filter,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c88120966.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - if Duel.Destroy(tc,REASON_EFFECT)~=0 and tc:IsType(TYPE_XYZ) then - Duel.BreakEffect() - local atk=tc:GetBaseAttack() - if atk<0 then atk=0 end - Duel.Damage(1-tp,atk,REASON_EFFECT) - end - end -end diff --git a/script/c88123329.lua b/script/c88123329.lua deleted file mode 100644 index 018e545e1c..0000000000 --- a/script/c88123329.lua +++ /dev/null @@ -1,34 +0,0 @@ ---精霊獣 ラムペンタ -function c88123329.initial_effect(c) - c:SetSPSummonOnce(88123329) - --tohand - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_REMOVE+CATEGORY_TOGRAVE) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetTarget(c88123329.target) - e1:SetOperation(c88123329.operation) - c:RegisterEffect(e1) -end -function c88123329.tgfilter(c,rac) - return c:IsSetCard(0xb5) and c:IsRace(rac) and c:IsAbleToGrave() -end -function c88123329.rmfilter(c,tp) - return c:IsSetCard(0xb5) and c:IsAbleToRemove() - and Duel.IsExistingMatchingCard(c88123329.tgfilter,tp,LOCATION_DECK,0,1,nil,c:GetRace()) -end -function c88123329.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c88123329.rmfilter,tp,LOCATION_EXTRA,0,1,nil,tp) end - Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_EXTRA) - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) -end -function c88123329.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c88123329.rmfilter,tp,LOCATION_EXTRA,0,1,1,nil,tp) - if g:GetCount()>0 and Duel.Remove(g,POS_FACEUP,REASON_EFFECT)~=0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local sg=Duel.SelectMatchingCard(tp,c88123329.tgfilter,tp,LOCATION_DECK,0,1,1,nil,g:GetFirst():GetRace()) - Duel.SendtoGrave(sg,REASON_EFFECT) - end -end diff --git a/script/c88132637.lua b/script/c88132637.lua deleted file mode 100644 index 05c6ab9815..0000000000 --- a/script/c88132637.lua +++ /dev/null @@ -1,33 +0,0 @@ ---ツインヘッド・ケルベロス -function c88132637.initial_effect(c) - --disable - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_BATTLED) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c88132637.discon) - e1:SetOperation(c88132637.disop) - c:RegisterEffect(e1) -end -function c88132637.filter(c) - return c:IsFaceup() and c:IsRace(RACE_FIEND) -end -function c88132637.discon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c88132637.filter,tp,LOCATION_MZONE,0,1,e:GetHandler()) -end -function c88132637.disop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local bc=c:GetBattleTarget() - if bc and bc:IsStatus(STATUS_BATTLE_DESTROYED) and bc:IsType(TYPE_FLIP) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0x17a0000) - bc:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+0x17a0000) - bc:RegisterEffect(e2) - end -end diff --git a/script/c8814959.lua b/script/c8814959.lua deleted file mode 100644 index 957e2f3630..0000000000 --- a/script/c8814959.lua +++ /dev/null @@ -1,16 +0,0 @@ ---ヴェルズ・マンドラゴ -function c8814959.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c8814959.spcon) - c:RegisterEffect(e1) -end -function c8814959.spcon(e,c) - if c==nil then return true end - return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 - and Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0,nil)0 -end -function c88177324.regop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(1000) - e1:SetReset(RESET_EVENT+0x1ff0000+RESET_PHASE+PHASE_BATTLE) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_EXTRA_ATTACK) - e2:SetValue(1) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_BATTLE) - c:RegisterEffect(e2) -end diff --git a/script/c88190453.lua b/script/c88190453.lua deleted file mode 100644 index 2fbf28768c..0000000000 --- a/script/c88190453.lua +++ /dev/null @@ -1,12 +0,0 @@ ---チェイン・スラッシャー -function c88190453.initial_effect(c) - --multiattack - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_EXTRA_ATTACK) - e1:SetValue(c88190453.val) - c:RegisterEffect(e1) -end -function c88190453.val(e,c) - return Duel.GetMatchingGroupCount(Card.IsCode,e:GetHandlerPlayer(),LOCATION_GRAVE,0,nil,88190453) -end diff --git a/script/c88190790.lua b/script/c88190790.lua deleted file mode 100644 index 5b4a1d8627..0000000000 --- a/script/c88190790.lua +++ /dev/null @@ -1,81 +0,0 @@ ---アサルト・アーマー -function c88190790.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCondition(c88190790.condition) - e1:SetTarget(c88190790.target) - e1:SetOperation(c88190790.operation) - c:RegisterEffect(e1) - --Atk up - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(300) - c:RegisterEffect(e2) - --Equip limit - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_EQUIP_LIMIT) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e3:SetValue(c88190790.eqlimit) - c:RegisterEffect(e3) - --multi attack - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(88190790,0)) - e4:SetType(EFFECT_TYPE_IGNITION) - e4:SetRange(LOCATION_SZONE) - e4:SetCondition(c88190790.macon) - e4:SetCost(c88190790.macost) - e4:SetOperation(c88190790.maop) - c:RegisterEffect(e4) -end -function c88190790.eqlimit(e,c) - if e:GetHandler():GetEquipTarget()==c then return true end - local g=Duel.GetFieldGroup(e:GetHandlerPlayer(),LOCATION_MZONE,0) - local tc=g:GetFirst() - return g:GetCount()==1 and tc==c and tc:IsRace(RACE_WARRIOR) -end -function c88190790.condition(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetFieldGroup(tp,LOCATION_MZONE,0) - local tc=g:GetFirst() - e:SetLabelObject(tc) - return g:GetCount()==1 and tc:IsFaceup() and tc:IsRace(RACE_WARRIOR) -end -function c88190790.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local tc=e:GetLabelObject() - if chkc then return chkc==tc end - if chk==0 then return tc and tc:IsCanBeEffectTarget(e) end - Duel.SetTargetCard(tc) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c88190790.operation(e,tp,eg,ep,ev,re,r,rp) - local ct=Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0) - local tc=Duel.GetFirstTarget() - if ct==1 and e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,e:GetHandler(),tc) - end -end -function c88190790.macon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsAbleToEnterBP() -end -function c88190790.macost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToGraveAsCost() end - Duel.SetTargetCard(c:GetEquipTarget()) - Duel.SendtoGrave(c,REASON_COST) -end -function c88190790.maop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_EXTRA_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - e1:SetValue(1) - tc:RegisterEffect(e1) - end -end diff --git a/script/c88197162.lua b/script/c88197162.lua deleted file mode 100644 index 075c40f1b7..0000000000 --- a/script/c88197162.lua +++ /dev/null @@ -1,47 +0,0 @@ ---魂の転身 -function c88197162.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,88197162+EFFECT_COUNT_CODE_OATH) - e1:SetCondition(c88197162.condition) - e1:SetCost(c88197162.cost) - e1:SetTarget(c88197162.target) - e1:SetOperation(c88197162.activate) - c:RegisterEffect(e1) -end -function c88197162.cfilter(c) - return bit.band(c:GetSummonType(),SUMMON_TYPE_SPECIAL)==SUMMON_TYPE_SPECIAL -end -function c88197162.condition(e,tp,eg,ep,ev,re,r,rp) - return not Duel.IsExistingMatchingCard(c88197162.cfilter,tp,LOCATION_MZONE,0,1,nil) -end -function c88197162.filter(c) - return c:IsFaceup() and c:GetLevel()==4 and bit.band(c:GetSummonType(),SUMMON_TYPE_NORMAL)==SUMMON_TYPE_NORMAL -end -function c88197162.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_SPSUMMON)==0 - and Duel.CheckReleaseGroup(tp,c88197162.filter,1,nil) end - local g=Duel.SelectReleaseGroup(tp,c88197162.filter,1,1,nil) - Duel.Release(g,REASON_COST) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) - e1:SetTargetRange(1,0) - Duel.RegisterEffect(e1,tp) -end -function c88197162.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp,2) end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(2) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2) -end -function c88197162.activate(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end diff --git a/script/c88204302.lua b/script/c88204302.lua deleted file mode 100644 index f083a13127..0000000000 --- a/script/c88204302.lua +++ /dev/null @@ -1,63 +0,0 @@ ---スピードリバース -function c88204302.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(88204302,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c88204302.target) - e1:SetOperation(c88204302.activate) - c:RegisterEffect(e1) - --tohand - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(88204302,1)) - e2:SetCategory(CATEGORY_TOHAND) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_GRAVE) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCondition(aux.exccon) - e2:SetCost(c88204302.thcost) - e2:SetTarget(c88204302.thtg) - e2:SetOperation(c88204302.thop) - c:RegisterEffect(e2) -end -function c88204302.filter(c,e,tp) - return c:IsSetCard(0x2016) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c88204302.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c88204302.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c88204302.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c88204302.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c88204302.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end -function c88204302.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) -end -function c88204302.thfilter(c) - return c:IsSetCard(0x2016) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() -end -function c88204302.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c88204302.thfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c88204302.thfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local sg=Duel.SelectTarget(tp,c88204302.thfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,sg,sg:GetCount(),0,0) -end -function c88204302.thop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end diff --git a/script/c88205593.lua b/script/c88205593.lua deleted file mode 100644 index 06e7788176..0000000000 --- a/script/c88205593.lua +++ /dev/null @@ -1,36 +0,0 @@ ---エレキングコブラ -function c88205593.initial_effect(c) - --direct attack - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DIRECT_ATTACK) - c:RegisterEffect(e1) - --search - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(88205593,0)) - e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_BATTLE_DAMAGE) - e2:SetCondition(c88205593.condition) - e2:SetTarget(c88205593.target) - e2:SetOperation(c88205593.operation) - c:RegisterEffect(e2) -end -function c88205593.condition(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp and Duel.GetAttackTarget()==nil -end -function c88205593.filter(c) - return c:IsSetCard(0xe) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() -end -function c88205593.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c88205593.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c88205593.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c8822710.lua b/script/c8822710.lua deleted file mode 100644 index 08ec230c2f..0000000000 --- a/script/c8822710.lua +++ /dev/null @@ -1,20 +0,0 @@ ---A・O・J コズミック・クローザー -function c8822710.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c8822710.spcon) - c:RegisterEffect(e1) -end -function c8822710.spfilter(c) - return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_LIGHT) -end -function c8822710.spcon(e,c) - if c==nil then return true end - return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 - and Duel.GetFieldGroupCount(c:GetControler(),0,LOCATION_MZONE)>1 - and Duel.IsExistingMatchingCard(c8822710.spfilter,c:GetControler(),0,LOCATION_MZONE,1,nil) -end diff --git a/script/c88236094.lua b/script/c88236094.lua deleted file mode 100644 index a61600f25e..0000000000 --- a/script/c88236094.lua +++ /dev/null @@ -1,33 +0,0 @@ ---アスワンの亡霊 -function c88236094.initial_effect(c) - --todeck - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(88236094,0)) - e1:SetCategory(CATEGORY_TODECK) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_BATTLE_DAMAGE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCondition(c88236094.condition) - e1:SetTarget(c88236094.target) - e1:SetOperation(c88236094.operation) - c:RegisterEffect(e1) -end -function c88236094.condition(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp -end -function c88236094.filter(c) - return c:IsType(TYPE_TRAP) and c:IsAbleToDeck() -end -function c88236094.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c88236094.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c88236094.filter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectTarget(tp,c88236094.filter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0) -end -function c88236094.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoDeck(tc,nil,0,REASON_EFFECT) - end -end diff --git a/script/c88240808.lua b/script/c88240808.lua deleted file mode 100644 index 84e45b45f2..0000000000 --- a/script/c88240808.lua +++ /dev/null @@ -1,44 +0,0 @@ ---霊滅術師 カイク -function c88240808.initial_effect(c) - --remove - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(88240808,0)) - e1:SetCategory(CATEGORY_REMOVE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_BATTLE_DAMAGE) - e1:SetCondition(c88240808.rmcon) - e1:SetTarget(c88240808.rmtg) - e1:SetOperation(c88240808.rmop) - c:RegisterEffect(e1) - --cannot remove - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_CANNOT_REMOVE) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetRange(LOCATION_MZONE) - e2:SetTargetRange(0,1) - e2:SetTarget(c88240808.rmlimit) - c:RegisterEffect(e2) -end -function c88240808.rmlimit(e,c,p) - return c:IsLocation(LOCATION_GRAVE) -end -function c88240808.rmcon(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp -end -function c88240808.filter(c) - return c:IsType(TYPE_MONSTER) and c:IsAbleToRemove() -end -function c88240808.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_GRAVE) and c88240808.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c88240808.filter,tp,0,LOCATION_GRAVE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,c88240808.filter,tp,0,LOCATION_GRAVE,1,2,nil) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,0) -end -function c88240808.rmop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local sg=g:Filter(Card.IsRelateToEffect,nil,e) - Duel.Remove(sg,POS_FACEUP,REASON_EFFECT) -end diff --git a/script/c88240999.lua b/script/c88240999.lua deleted file mode 100644 index c7c87f990d..0000000000 --- a/script/c88240999.lua +++ /dev/null @@ -1,88 +0,0 @@ ---ディサイシブの影霊衣 -function c88240999.initial_effect(c) - c:EnableReviveLimit() - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(aux.ritlimit) - c:RegisterEffect(e1) - --boost - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(88240999,0)) - e2:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetRange(LOCATION_HAND) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e2:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP+0x1c0) - e2:SetCountLimit(1,88240999) - e2:SetCondition(c88240999.adcon) - e2:SetCost(c88240999.adcost) - e2:SetTarget(c88240999.adtg) - e2:SetOperation(c88240999.adop) - c:RegisterEffect(e2) - --destroy - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(88240999,1)) - e3:SetCategory(CATEGORY_DESTROY+CATEGORY_REMOVE) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_MZONE) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetCountLimit(1,88241000) - e3:SetTarget(c88240999.destg) - e3:SetOperation(c88240999.desop) - c:RegisterEffect(e3) -end -function c88240999.mat_filter(c) - return c:GetLevel()~=10 -end -function c88240999.adcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end -function c88240999.adcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsDiscardable() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD) -end -function c88240999.filter(c) - return c:IsFaceup() and c:IsSetCard(0xb4) -end -function c88240999.adtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c88240999.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c88240999.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c88240999.filter,tp,LOCATION_MZONE,0,1,1,nil) -end -function c88240999.adop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetValue(1000) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - tc:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_UPDATE_DEFENCE) - tc:RegisterEffect(e2) - end -end -function c88240999.desfilter(c) - return c:IsFacedown() and c:IsDestructable() and c:IsAbleToRemove() -end -function c88240999.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and c88240999.desfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c88240999.desfilter,tp,0,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c88240999.desfilter,tp,0,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) -end -function c88240999.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT,LOCATION_REMOVED) - end -end diff --git a/script/c88241506.lua b/script/c88241506.lua deleted file mode 100644 index 8fb03e4622..0000000000 --- a/script/c88241506.lua +++ /dev/null @@ -1,62 +0,0 @@ ---青き眼の乙女 -function c88241506.initial_effect(c) - --negate attack - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(88241506,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_BE_BATTLE_TARGET) - e1:SetCountLimit(1,88241506) - e1:SetTarget(c88241506.natg) - e1:SetOperation(c88241506.naop) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(88241506,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EVENT_BECOME_TARGET) - e2:SetCountLimit(1,88241506) - e2:SetCondition(c88241506.spcon) - e2:SetTarget(c88241506.sptg) - e2:SetOperation(c88241506.spop) - c:RegisterEffect(e2) -end -function c88241506.spfilter(c,e,tp) - return c:IsCode(89631139) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsHasEffect(EFFECT_NECRO_VALLEY) -end -function c88241506.natg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_POSITION,e:GetHandler(),1,0,0) -end -function c88241506.naop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if Duel.NegateAttack() and c:IsRelateToEffect(e) then - Duel.ChangePosition(c,POS_FACEUP_DEFENCE,POS_FACEUP_DEFENCE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local g=Duel.GetMatchingGroup(c88241506.spfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,nil,e,tp) - if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(88241506,2)) then - Duel.BreakEffect() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g1=g:Select(tp,1,1,nil) - Duel.SpecialSummon(g1,0,tp,tp,false,false,POS_FACEUP) - end - end -end -function c88241506.spcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsContains(e:GetHandler()) -end -function c88241506.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c88241506.spfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE) -end -function c88241506.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c88241506.spfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c88264978.lua b/script/c88264978.lua deleted file mode 100644 index 3b7bc0b980..0000000000 --- a/script/c88264978.lua +++ /dev/null @@ -1,52 +0,0 @@ ---レッドアイズ・ダークネスメタルドラゴン -function c88264978.initial_effect(c) - --spsummon proc - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c88264978.hspcon) - e1:SetOperation(c88264978.hspop) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(88264978,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetCountLimit(1) - e2:SetRange(LOCATION_MZONE) - e2:SetTarget(c88264978.sptg) - e2:SetOperation(c88264978.spop) - c:RegisterEffect(e2) -end -function c88264978.spfilter(c) - return c:IsFaceup() and c:IsRace(RACE_DRAGON) and c:IsAbleToRemoveAsCost() -end -function c88264978.hspcon(e,c) - if c==nil then return true end - return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-1 - and Duel.IsExistingMatchingCard(c88264978.spfilter,c:GetControler(),LOCATION_MZONE,0,1,nil) -end -function c88264978.hspop(e,tp,eg,ep,ev,re,r,rp,c) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c88264978.spfilter,c:GetControler(),LOCATION_MZONE,0,1,1,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c88264978.filter(c,e,tp) - return c:IsRace(RACE_DRAGON) and c:GetCode()~=88264978 - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsHasEffect(EFFECT_NECRO_VALLEY) -end -function c88264978.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c88264978.filter,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_HAND) -end -function c88264978.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c88264978.filter,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c88279736.lua b/script/c88279736.lua deleted file mode 100644 index 4ab85abb63..0000000000 --- a/script/c88279736.lua +++ /dev/null @@ -1,32 +0,0 @@ ---追い剥ぎゴブリン -function c88279736.initial_effect(c) - --activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --handes - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(88279736,0)) - e2:SetCategory(CATEGORY_HANDES) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetRange(LOCATION_SZONE) - e2:SetCode(EVENT_BATTLE_DAMAGE) - e2:SetCondition(c88279736.condition) - e2:SetTarget(c88279736.target) - e2:SetOperation(c88279736.operation) - c:RegisterEffect(e2) -end -function c88279736.condition(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp and eg:GetFirst():GetControler()==tp -end -function c88279736.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_HANDES,0,0,1-tp,1) -end -function c88279736.operation(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local g=Duel.GetFieldGroup(ep,LOCATION_HAND,0,nil) - local sg=g:RandomSelect(ep,1) - Duel.SendtoGrave(sg,REASON_DISCARD+REASON_EFFECT) -end diff --git a/script/c88283496.lua b/script/c88283496.lua deleted file mode 100644 index a86cd604a5..0000000000 --- a/script/c88283496.lua +++ /dev/null @@ -1,30 +0,0 @@ ---極星獣ガルム -function c88283496.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(88283496,0)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_BATTLED) - e1:SetCondition(c88283496.retcon) - e1:SetTarget(c88283496.rettg) - e1:SetOperation(c88283496.retop) - c:RegisterEffect(e1) -end -function c88283496.retcon(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetAttacker() - if tc==e:GetHandler() then tc=Duel.GetAttackTarget() end - if not tc then return false end - e:SetLabelObject(tc) - local lv=tc:GetLevel() - return lv>0 and lv<=4 and not tc:IsStatus(STATUS_BATTLE_DESTROYED) -end -function c88283496.rettg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk ==0 then return e:GetLabelObject():IsAbleToHand() end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetLabelObject(),0,0,0) -end -function c88283496.retop(e,tp,eg,ep,ev,re,r,rp) - if e:GetLabelObject():IsRelateToBattle() then - Duel.SendtoHand(e:GetLabelObject(),nil,REASON_EFFECT) - end -end diff --git a/script/c88289295.lua b/script/c88289295.lua deleted file mode 100644 index f78fcf03bd..0000000000 --- a/script/c88289295.lua +++ /dev/null @@ -1,42 +0,0 @@ ---シンクロ・コントロール -function c88289295.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_CONTROL) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,0x1c0) - e1:SetCondition(c88289295.condition) - e1:SetCost(c88289295.cost) - e1:SetTarget(c88289295.target) - e1:SetOperation(c88289295.activate) - c:RegisterEffect(e1) -end -function c88289295.condition(e,tp,eg,ep,ev,re,r,rp) - return not Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil,TYPE_SYNCHRO) -end -function c88289295.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,1000) end - Duel.PayLPCost(tp,1000) -end -function c88289295.filter(c) - return c:IsFaceup() and c:IsType(TYPE_SYNCHRO) and c:IsControlerCanBeChanged() -end -function c88289295.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c88289295.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c88289295.filter,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) - local g=Duel.SelectTarget(tp,c88289295.filter,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0) -end -function c88289295.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - local ct=1 - if Duel.GetTurnPlayer()~=tp then ct=2 end - if tc:IsFaceup() and tc:IsRelateToEffect(e) and not Duel.GetControl(tc,tp,PHASE_END,ct) then - if not tc:IsImmuneToEffect(e) and tc:IsAbleToChangeControler() then - Duel.Destroy(tc,REASON_EFFECT) - end - end -end diff --git a/script/c88301393.lua b/script/c88301393.lua deleted file mode 100644 index 5883b6d2fd..0000000000 --- a/script/c88301393.lua +++ /dev/null @@ -1,118 +0,0 @@ ---インフェルノイド・アドラメレク -function c88301393.initial_effect(c) - c:EnableReviveLimit() - --special summon condition - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_SPSUMMON_PROC) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e2:SetRange(LOCATION_HAND+LOCATION_GRAVE) - e2:SetCondition(c88301393.spcon) - e2:SetOperation(c88301393.spop) - c:RegisterEffect(e2) - --chain attack - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(88301393,0)) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_BATTLE_DESTROYING) - e3:SetCondition(c88301393.atcon) - e3:SetOperation(c88301393.atop) - c:RegisterEffect(e3) - --remove - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(88301393,1)) - e4:SetCategory(CATEGORY_REMOVE) - e4:SetType(EFFECT_TYPE_QUICK_O) - e4:SetCode(EVENT_FREE_CHAIN) - e4:SetRange(LOCATION_MZONE) - e4:SetProperty(EFFECT_FLAG_CARD_TARGET) - e4:SetCountLimit(1) - e4:SetCost(c88301393.rmcost) - e4:SetTarget(c88301393.rmtg) - e4:SetOperation(c88301393.rmop) - c:RegisterEffect(e4) -end -function c88301393.spfilter(c) - return c:IsSetCard(0xbb) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost() -end -function c88301393.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - local sum=0 - for i=0,4 do - local tc=Duel.GetFieldCard(tp,LOCATION_MZONE,i) - if tc and tc:IsFaceup() and tc:IsType(TYPE_EFFECT) then - if tc:IsType(TYPE_XYZ) then sum=sum+tc:GetRank() - else sum=sum+tc:GetLevel() end - end - end - if sum>8 then return false end - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ft<-1 then return false end - if c:IsHasEffect(34822850) then - if ft>0 then - return Duel.IsExistingMatchingCard(c88301393.spfilter,tp,LOCATION_MZONE+LOCATION_GRAVE+LOCATION_HAND,0,2,c) - else - local ct=-ft+1 - return Duel.IsExistingMatchingCard(c88301393.spfilter,tp,LOCATION_MZONE,0,ct,nil) - and Duel.IsExistingMatchingCard(c88301393.spfilter,tp,LOCATION_MZONE+LOCATION_GRAVE+LOCATION_HAND,0,2,c) - end - else - return ft>0 and Duel.IsExistingMatchingCard(c88301393.spfilter,tp,LOCATION_GRAVE+LOCATION_HAND,0,2,c) - end -end -function c88301393.spop(e,tp,eg,ep,ev,re,r,rp,c) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - local g=nil - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - if c:IsHasEffect(34822850) then - if ft>0 then - g=Duel.SelectMatchingCard(tp,c88301393.spfilter,tp,LOCATION_MZONE+LOCATION_GRAVE+LOCATION_HAND,0,2,2,c) - else - local sg=Duel.GetMatchingGroup(c88301393.spfilter,tp,LOCATION_MZONE+LOCATION_GRAVE+LOCATION_HAND,0,c) - local ct=-ft+1 - g=sg:FilterSelect(tp,Card.IsLocation,ct,ct,nil,LOCATION_MZONE) - if ct<2 then - sg:Sub(g) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g2=sg:Select(tp,1,1,nil) - g:Merge(g2) - end - end - else - g=Duel.SelectMatchingCard(tp,c88301393.spfilter,tp,LOCATION_GRAVE+LOCATION_HAND,0,2,2,c) - end - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c88301393.atcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local bc=c:GetBattleTarget() - return bc:IsLocation(LOCATION_GRAVE) and bc:IsType(TYPE_MONSTER) and c:IsChainAttackable() and c:IsStatus(STATUS_OPPO_BATTLE) -end -function c88301393.atop(e,tp,eg,ep,ev,re,r,rp) - Duel.ChainAttack() -end -function c88301393.rmcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsReleasable,1,nil) end - local g=Duel.SelectReleaseGroup(tp,Card.IsReleasable,1,1,nil) - Duel.Release(g,REASON_COST) -end -function c88301393.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(1-tp) and chkc:IsAbleToRemove() end - if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) -end -function c88301393.rmop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) - end -end diff --git a/script/c88301833.lua b/script/c88301833.lua deleted file mode 100644 index b9ab93f02b..0000000000 --- a/script/c88301833.lua +++ /dev/null @@ -1,45 +0,0 @@ ---昇華する魂 -function c88301833.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --salvage - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(88301833,0)) - e2:SetCategory(CATEGORY_TOHAND) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetRange(LOCATION_SZONE) - e2:SetCountLimit(1) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetCondition(c88301833.thcon) - e2:SetTarget(c88301833.thtg) - e2:SetOperation(c88301833.thop) - c:RegisterEffect(e2) -end -function c88301833.thcon(e,tp,eg,ep,ev,re,r,rp) - return eg:GetCount()==1 and eg:GetFirst():GetSummonType()==SUMMON_TYPE_RITUAL -end -function c88301833.thfilter(c,e,tp) - return c:IsLocation(LOCATION_GRAVE) and c:IsControler(tp) and c:IsAbleToHand() and c:IsCanBeEffectTarget(e) -end -function c88301833.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local tc=eg:GetFirst() - local mat=tc:GetMaterial() - if chkc then return mat:IsContains(chkc) and c88301833.thfilter(chkc,e,tp) end - if chk==0 then return mat:IsExists(c88301833.thfilter,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g=mat:FilterSelect(tp,c88301833.thfilter,1,1,nil,e,tp) - Duel.SetTargetCard(g) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0) -end -function c88301833.thop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end diff --git a/script/c88305978.lua b/script/c88305978.lua deleted file mode 100644 index 0bf97192ec..0000000000 --- a/script/c88305978.lua +++ /dev/null @@ -1,51 +0,0 @@ ---BF-陽炎のカーム -function c88305978.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(88305978,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_GRAVE) - e1:SetCondition(c88305978.condition) - e1:SetCost(c88305978.cost) - e1:SetTarget(c88305978.target) - e1:SetOperation(c88305978.operation) - c:RegisterEffect(e1) -end -function c88305978.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp and Duel.GetCurrentPhase()==PHASE_BATTLE - and Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 -end -function c88305978.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) -end -function c88305978.filter(c,e,tp) - return c:IsType(TYPE_SYNCHRO) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c88305978.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c88305978.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c88305978.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c88305978.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c88305978.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)~=0 then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE+PHASE_BATTLE) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_MZONE) - e1:SetOperation(c88305978.rmop) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - end -end -function c88305978.rmop(e,tp,eg,ep,ev,re,r,rp) - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT) -end diff --git a/script/c88307361.lua b/script/c88307361.lua deleted file mode 100644 index 8ecbcaea01..0000000000 --- a/script/c88307361.lua +++ /dev/null @@ -1,92 +0,0 @@ ---超古深海王シーラカンス -function c88307361.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(88307361,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c88307361.sumcost) - e1:SetTarget(c88307361.sumtg) - e1:SetOperation(c88307361.sumop) - c:RegisterEffect(e1) - --Inactivate - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(88307361,1)) - e2:SetCategory(CATEGORY_DISABLE+CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_CHAINING) - e2:SetRange(LOCATION_MZONE) - e2:SetCondition(c88307361.discon) - e2:SetCost(c88307361.discost) - e2:SetTarget(c88307361.distg) - e2:SetOperation(c88307361.disop) - c:RegisterEffect(e2) -end -function c88307361.sumcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) -end -function c88307361.filter(c,e,sp) - return c:IsLevelBelow(4) and c:IsRace(RACE_FISH) and c:IsCanBeSpecialSummoned(e,0,sp,false,false) -end -function c88307361.sumtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c88307361.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,LOCATION_DECK) -end -function c88307361.sumop(e,tp,eg,ep,ev,re,r,rp) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ft<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c88307361.filter,tp,LOCATION_DECK,0,ft,ft,nil,e,tp) - if g:GetCount()==0 then return end - local c=e:GetHandler() - local tc=g:GetFirst() - while tc do - Duel.SpecialSummonStep(tc, 0, tp, tp, false, false, POS_FACEUP) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE) - e3:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e3) - tc=g:GetNext() - end - Duel.SpecialSummonComplete() -end -function c88307361.discon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsStatus(STATUS_BATTLE_DESTROYED) then return false end - if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return end - local tg=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) - return tg and tg:IsContains(c) and Duel.IsChainNegatable(ev) -end -function c88307361.discost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsRace,1,e:GetHandler(),RACE_FISH) end - local sg=Duel.SelectReleaseGroup(tp,Card.IsRace,1,1,e:GetHandler(),RACE_FISH) - Duel.Release(sg,REASON_COST) -end -function c88307361.distg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0) - if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) - end -end -function c88307361.disop(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateActivation(ev) - if re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(eg,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/script/c88341502.lua b/script/c88341502.lua deleted file mode 100644 index 6a3d1b356a..0000000000 --- a/script/c88341502.lua +++ /dev/null @@ -1,69 +0,0 @@ ---ブラック・アロー -function c88341502.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetCondition(c88341502.condition) - e1:SetTarget(c88341502.target) - e1:SetOperation(c88341502.activate) - c:RegisterEffect(e1) -end -function c88341502.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end -function c88341502.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,nil) -end -function c88341502.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(-500) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_PIERCE) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e2) - local e3=Effect.CreateEffect(e:GetHandler()) - e3:SetDescription(aux.Stringid(88341502,0)) - e3:SetCategory(CATEGORY_DAMAGE) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e3:SetCode(EVENT_BATTLE_DESTROYING) - e3:SetCondition(c88341502.damcon) - e3:SetTarget(c88341502.damtg) - e3:SetOperation(c88341502.damop) - e3:SetReset(RESET_PHASE+PHASE_END) - e3:SetLabelObject(tc) - Duel.RegisterEffect(e3,tp) - tc:RegisterFlagEffect(88341502,RESET_EVENT+0x1020000+RESET_PHASE+PHASE_END,0,1) - end -end -function c88341502.damcon(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetLabelObject() - local bc=tc:GetBattleTarget() - return eg:IsContains(tc) and tc:GetFlagEffect(88341502)~=0 - and bc:IsLocation(LOCATION_GRAVE) and bc:IsReason(REASON_BATTLE) -end -function c88341502.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local def=e:GetLabelObject():GetBattleTarget():GetBaseDefence() - if def<0 then def=0 end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(def) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,def) -end -function c88341502.damop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c88358139.lua b/script/c88358139.lua deleted file mode 100644 index 49c3b7a6ba..0000000000 --- a/script/c88358139.lua +++ /dev/null @@ -1,33 +0,0 @@ ---EMヘルプリンセス -function c88358139.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetRange(LOCATION_HAND) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetCondition(c88358139.spcon) - e1:SetTarget(c88358139.sptg) - e1:SetOperation(c88358139.spop) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e2) -end -function c88358139.cfilter(c,tp) - return c:IsFaceup() and c:GetSummonPlayer()==tp and c:IsSetCard(0x9f) and not c:IsCode(88358139) -end -function c88358139.spcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c88358139.cfilter,1,nil,tp) -end -function c88358139.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c88358139.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c88361177.lua b/script/c88361177.lua deleted file mode 100644 index 920a477c50..0000000000 --- a/script/c88361177.lua +++ /dev/null @@ -1,12 +0,0 @@ ---ドラグニティ-アングス -function c88361177.initial_effect(c) - --pierce - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_PIERCE) - e1:SetCondition(c88361177.pcon) - c:RegisterEffect(e1) -end -function c88361177.pcon(e) - return e:GetHandler():GetEquipGroup():IsExists(Card.IsSetCard,1,nil,0x29) -end diff --git a/script/c88369727.lua b/script/c88369727.lua deleted file mode 100644 index a4c8b1f601..0000000000 --- a/script/c88369727.lua +++ /dev/null @@ -1,25 +0,0 @@ ---おろかな転生 -function c88369727.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TODECK) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c88369727.target) - e1:SetOperation(c88369727.activate) - c:RegisterEffect(e1) -end -function c88369727.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(1-tp) and chkc:IsAbleToDeck() end - if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToDeck,tp,0,LOCATION_GRAVE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectTarget(tp,Card.IsAbleToDeck,tp,0,LOCATION_GRAVE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0) -end -function c88369727.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoDeck(tc,nil,2,REASON_EFFECT) - end -end diff --git a/script/c88409165.lua b/script/c88409165.lua deleted file mode 100644 index 5f99d6ddd3..0000000000 --- a/script/c88409165.lua +++ /dev/null @@ -1,43 +0,0 @@ ---アビス・ウォリアー -function c88409165.initial_effect(c) - --to hand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(88409165,0)) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCategory(CATEGORY_TODECK) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCost(c88409165.cost) - e1:SetTarget(c88409165.target) - e1:SetOperation(c88409165.operation) - c:RegisterEffect(e1) -end -function c88409165.cfilter(c) - return c:IsAttribute(ATTRIBUTE_WATER) and c:IsDiscardable() and c:IsAbleToGraveAsCost() -end -function c88409165.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c88409165.cfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,c88409165.cfilter,1,1,REASON_COST+REASON_DISCARD) -end -function c88409165.filter(c) - return c:IsType(TYPE_MONSTER) and c:IsAbleToDeck() -end -function c88409165.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and c88409165.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c88409165.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectTarget(tp,c88409165.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0) -end -function c88409165.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - if tc:IsType(TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ) - or Duel.SelectOption(tp,aux.Stringid(88409165,1),aux.Stringid(88409165,2))==0 then - Duel.SendtoDeck(tc,nil,0,REASON_EFFECT) - else - Duel.SendtoDeck(tc,nil,1,REASON_EFFECT) - end - end -end diff --git a/script/c8842266.lua b/script/c8842266.lua deleted file mode 100644 index 2e9aa65ee6..0000000000 --- a/script/c8842266.lua +++ /dev/null @@ -1,35 +0,0 @@ ---ご隠居の猛毒薬 -function c8842266.initial_effect(c) - --rec or dam - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_DRAW_PHASE) - e1:SetTarget(c8842266.target) - e1:SetOperation(c8842266.operation) - c:RegisterEffect(e1) -end -function c8842266.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EFFECT) - local op=Duel.SelectOption(tp,aux.Stringid(8842266,0),aux.Stringid(8842266,1)) - e:SetLabel(op) - if op==0 then - e:SetCategory(CATEGORY_RECOVER) - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(1200) - Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,1200) - else - e:SetCategory(CATEGORY_DAMAGE) - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(800) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,800) - end -end -function c8842266.operation(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - if e:GetLabel()==0 then - Duel.Recover(p,d,REASON_EFFECT) - else Duel.Damage(p,d,REASON_EFFECT) end -end diff --git a/script/c88438982.lua b/script/c88438982.lua deleted file mode 100644 index 5f5cf5db31..0000000000 --- a/script/c88438982.lua +++ /dev/null @@ -1,23 +0,0 @@ ---ワーム・ディミクレス -function c88438982.initial_effect(c) - --flip - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FLIP+EFFECT_TYPE_SINGLE) - e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE) - e1:SetOperation(c88438982.adop) - c:RegisterEffect(e1) -end -function c88438982.adop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFaceup() and c:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(300) - e1:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_UPDATE_DEFENCE) - c:RegisterEffect(e2) - end -end diff --git a/script/c88472456.lua b/script/c88472456.lua deleted file mode 100644 index 3636d7ef54..0000000000 --- a/script/c88472456.lua +++ /dev/null @@ -1,23 +0,0 @@ ---ダーク・ヒーロー ゾンバイア -function c88472456.initial_effect(c) - --cannot direct attack - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_DIRECT_ATTACK) - c:RegisterEffect(e1) - --atkdown - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_BATTLE_DESTROYING) - e2:SetOperation(c88472456.atkop) - c:RegisterEffect(e2) -end -function c88472456.atkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(-200) - e1:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e1) -end diff --git a/script/c88482761.lua b/script/c88482761.lua deleted file mode 100644 index 2928e5d0c2..0000000000 --- a/script/c88482761.lua +++ /dev/null @@ -1,95 +0,0 @@ ---ダイスロール・バトル -function c88482761.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetCondition(c88482761.condition) - e1:SetTarget(c88482761.target) - e1:SetOperation(c88482761.operation) - c:RegisterEffect(e1) - -- - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(88482761,0)) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetRange(LOCATION_GRAVE) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetCondition(c88482761.atkcon) - e2:SetCost(c88482761.atkcost) - e2:SetTarget(c88482761.atktg) - e2:SetOperation(c88482761.atkop) - c:RegisterEffect(e2) -end -function c88482761.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp -end -function c88482761.rmfilter1(c,e,tp) - return c:IsSetCard(0x2016) and c:IsAbleToRemove() - and Duel.IsExistingMatchingCard(c88482761.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c:GetOriginalLevel()) -end -function c88482761.rmfilter2(c,lv) - return c:IsSetCard(0x2016) and c:IsType(TYPE_TUNER) and c:IsAbleToRemove() and c:GetOriginalLevel()==lv -end -function c88482761.spfilter(c,e,tp,lv) - return c:IsType(TYPE_SYNCHRO) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) - and Duel.IsExistingMatchingCard(c88482761.rmfilter2,tp,LOCATION_HAND,0,1,nil,c:GetLevel()-lv) -end -function c88482761.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c88482761.rmfilter1(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c88482761.rmfilter1,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,c88482761.rmfilter1,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function c88482761.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if not tc:IsRelateToEffect(e) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c88482761.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc:GetOriginalLevel()) - if g:GetCount()>0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local rg=Duel.SelectMatchingCard(tp,c88482761.rmfilter2,tp,LOCATION_HAND,0,1,1,nil,g:GetFirst():GetLevel()-tc:GetOriginalLevel()) - rg:AddCard(tc) - if Duel.Remove(rg,POS_FACEUP,REASON_EFFECT)==2 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end - end -end -function c88482761.atkcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp and Duel.GetCurrentPhase()==PHASE_BATTLE - and not Duel.CheckTiming(TIMING_BATTLE_START+TIMING_BATTLE_END) -end -function c88482761.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) -end -function c88482761.atkfilter(c) - return c:IsType(TYPE_SYNCHRO) and c:IsPosition(POS_FACEUP_ATTACK) -end -function c88482761.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - if chk==0 then return Duel.IsExistingTarget(c88482761.atkfilter,tp,LOCATION_MZONE,0,1,nil) - and Duel.IsExistingTarget(c88482761.atkfilter,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - Duel.SelectTarget(tp,c88482761.atkfilter,tp,LOCATION_MZONE,0,1,1,nil) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - local g2=Duel.SelectTarget(tp,c88482761.atkfilter,tp,0,LOCATION_MZONE,1,1,nil) - e:SetLabelObject(g2:GetFirst()) -end -function c88482761.atkop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) - if g:GetCount()==2 then - local c1=g:GetFirst() - local c2=g:GetNext() - if c1~=e:GetLabelObject() then c1,c2=c2,c1 end - if c1:IsControler(1-tp) and c1:IsPosition(POS_FACEUP_ATTACK) and not c1:IsImmuneToEffect(e) - and c2:IsControler(tp) then - Duel.CalculateDamage(c1,c2) - end - end -end diff --git a/script/c88494120.lua b/script/c88494120.lua deleted file mode 100644 index 40f7e63386..0000000000 --- a/script/c88494120.lua +++ /dev/null @@ -1,43 +0,0 @@ ---不屈の闘志 -function c88494120.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetCondition(c88494120.condition) - e1:SetTarget(c88494120.target) - e1:SetOperation(c88494120.activate) - c:RegisterEffect(e1) -end -function c88494120.condition(e,tp,eg,ep,ev,re,r,rp) - return (Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()) - and Duel.GetMatchingGroupCount(Card.IsFaceup,tp,LOCATION_MZONE,0,nil)==1 -end -function c88494120.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:IsFaceup() end - if chk==0 then - local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil) - if g:GetCount()==0 then return false end - local mg,atk=g:GetMinGroup(Card.GetAttack) - return atk>0 and Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) - end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,nil) -end -function c88494120.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil) - if g:GetCount()==0 then return end - local mg,atk=g:GetMinGroup(Card.GetAttack) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - e1:SetValue(atk) - tc:RegisterEffect(e1) - end -end diff --git a/script/c88494899.lua b/script/c88494899.lua deleted file mode 100644 index bfda8eadec..0000000000 --- a/script/c88494899.lua +++ /dev/null @@ -1,53 +0,0 @@ ---氷結界の交霊師 -function c88494899.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c88494899.spcon) - c:RegisterEffect(e1) - --activate limit - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e2:SetCode(EVENT_CHAINING) - e2:SetRange(LOCATION_MZONE) - e2:SetOperation(c88494899.aclimit1) - c:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e3:SetCode(EVENT_CHAIN_NEGATED) - e3:SetRange(LOCATION_MZONE) - e3:SetOperation(c88494899.aclimit2) - c:RegisterEffect(e3) - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_FIELD) - e4:SetCode(EFFECT_CANNOT_ACTIVATE) - e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e4:SetRange(LOCATION_MZONE) - e4:SetTargetRange(0,1) - e4:SetCondition(c88494899.econ) - e4:SetValue(c88494899.elimit) - c:RegisterEffect(e4) -end -function c88494899.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD)-Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,0)>=4 -end -function c88494899.aclimit1(e,tp,eg,ep,ev,re,r,rp) - if ep==tp or not re:IsHasType(EFFECT_TYPE_ACTIVATE) then return end - e:GetHandler():RegisterFlagEffect(88494899,RESET_EVENT+0x3ff0000+RESET_PHASE+PHASE_END,0,1) -end -function c88494899.aclimit2(e,tp,eg,ep,ev,re,r,rp) - if ep==tp or not re:IsHasType(EFFECT_TYPE_ACTIVATE) then return end - e:GetHandler():ResetFlagEffect(88494899) -end -function c88494899.econ(e) - return e:GetHandler():GetFlagEffect(88494899)~=0 -end -function c88494899.elimit(e,te,tp) - return te:IsHasType(EFFECT_TYPE_ACTIVATE) -end diff --git a/script/c88513608.lua b/script/c88513608.lua deleted file mode 100644 index c59829540e..0000000000 --- a/script/c88513608.lua +++ /dev/null @@ -1,73 +0,0 @@ ---捨て身の宝札 -function c88513608.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DRAW) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c88513608.condition) - e1:SetCost(c88513608.cost) - e1:SetTarget(c88513608.target) - e1:SetOperation(c88513608.activate) - c:RegisterEffect(e1) -end -function c88513608.check(tp) - local at1=0 - local ct=0 - for i=0,4 do - local tc=Duel.GetFieldCard(tp,LOCATION_MZONE,i) - if tc and tc:IsPosition(POS_FACEUP_ATTACK) then - at1=at1+tc:GetAttack() - ct=ct+1 - end - end - if ct<2 then return false end - local at2=-1 - for i=0,4 do - local tc=Duel.GetFieldCard(1-tp,LOCATION_MZONE,i) - if tc and tc:IsFaceup() then - local atk=tc:GetAttack() - if at2<0 or atk-1 - and Duel.CheckReleaseGroup(c:GetControler(),Card.IsRace,1,nil,RACE_WARRIOR) -end -function c88559132.spop(e,tp,eg,ep,ev,re,r,rp,c) - local g=Duel.SelectReleaseGroup(c:GetControler(),Card.IsRace,1,1,nil,RACE_WARRIOR) - Duel.Release(g,REASON_COST) - local atk=g:GetFirst():GetBaseAttack() - if atk<0 then return end - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(atk) - e1:SetReset(RESET_EVENT+0xff0000) - c:RegisterEffect(e1) -end diff --git a/script/c88610708.lua b/script/c88610708.lua deleted file mode 100644 index 232d5a93b5..0000000000 --- a/script/c88610708.lua +++ /dev/null @@ -1,51 +0,0 @@ ---シールドバッシュ -function c88610708.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c88610708.target) - e1:SetOperation(c88610708.operation) - c:RegisterEffect(e1) - --Equip limit - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_EQUIP_LIMIT) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetValue(c88610708.eqlimit) - c:RegisterEffect(e2) - --Atk up - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_EQUIP) - e3:SetCode(EFFECT_UPDATE_ATTACK) - e3:SetValue(1000) - c:RegisterEffect(e3) - --no damage - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_EQUIP) - e4:SetCode(EFFECT_AVOID_BATTLE_DAMAGE) - e4:SetValue(1) - c:RegisterEffect(e4) -end -function c88610708.eqlimit(e,c) - return bit.band(c:GetSummonType(),SUMMON_TYPE_NORMAL)==SUMMON_TYPE_NORMAL -end -function c88610708.filter(c) - return c:IsFaceup() and bit.band(c:GetSummonType(),SUMMON_TYPE_NORMAL)==SUMMON_TYPE_NORMAL -end -function c88610708.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c88610708.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c88610708.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c88610708.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c88610708.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,c,tc) - end -end diff --git a/script/c88616795.lua b/script/c88616795.lua deleted file mode 100644 index fc1d607e44..0000000000 --- a/script/c88616795.lua +++ /dev/null @@ -1,46 +0,0 @@ ---トーラの魔導書 -function c88616795.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c88616795.target) - e1:SetOperation(c88616795.activate) - c:RegisterEffect(e1) -end -function c88616795.filter(c) - return c:IsFaceup() and c:IsRace(RACE_SPELLCASTER) -end -function c88616795.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c88616795.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c88616795.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c88616795.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - local opt=Duel.SelectOption(tp,aux.Stringid(88616795,0),aux.Stringid(88616795,1)) - e:SetLabel(opt) -end -function c88616795.activate(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EFFECT_IMMUNE_EFFECT) - if e:GetLabel()==0 then - e2:SetValue(c88616795.efilter1) - else - e2:SetValue(c88616795.efilter2) - end - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e2) - end -end -function c88616795.efilter1(e,te) - return te:IsActiveType(TYPE_SPELL) and te:GetOwner()~=e:GetOwner() -end -function c88616795.efilter2(e,te) - return te:IsActiveType(TYPE_TRAP) -end diff --git a/script/c88619463.lua b/script/c88619463.lua deleted file mode 100644 index 8827e5e80e..0000000000 --- a/script/c88619463.lua +++ /dev/null @@ -1,61 +0,0 @@ ---黒の魔法神官 -function c88619463.initial_effect(c) - c:EnableReviveLimit() - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(aux.FALSE) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_SPSUMMON_PROC) - e2:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e2:SetRange(LOCATION_HAND) - e2:SetCondition(c88619463.spcon) - e2:SetOperation(c88619463.spop) - c:RegisterEffect(e2) - --negate - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(88619463,0)) - e3:SetCategory(CATEGORY_NEGATE) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_QUICK_O) - e3:SetCode(EVENT_CHAINING) - e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) - e3:SetRange(LOCATION_MZONE) - e3:SetCondition(c88619463.discon) - e3:SetTarget(c88619463.distg) - e3:SetOperation(c88619463.disop) - c:RegisterEffect(e3) -end -function c88619463.rfilter(c) - return c:IsRace(RACE_SPELLCASTER) and c:IsLevelAbove(6) -end -function c88619463.spcon(e,c) - if c==nil then return true end - return Duel.CheckReleaseGroup(c:GetControler(),c88619463.rfilter,2,nil) -end -function c88619463.spop(e,tp,eg,ep,ev,re,r,rp,c) - local g=Duel.SelectReleaseGroup(c:GetControler(),c88619463.rfilter,2,2,nil) - Duel.Release(g,REASON_COST) -end -function c88619463.discon(e,tp,eg,ep,ev,re,r,rp) - return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) - and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_TRAP) and Duel.IsChainNegatable(ev) -end -function c88619463.distg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) - end -end -function c88619463.disop(e,tp,eg,ep,ev,re,r,rp,chk) - if e:GetHandler():IsFacedown() or not e:GetHandler():IsRelateToEffect(e) then return end - Duel.NegateActivation(ev) - if re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(eg,REASON_EFFECT) - end -end diff --git a/script/c88643579.lua b/script/c88643579.lua deleted file mode 100644 index 58ebc2cabc..0000000000 --- a/script/c88643579.lua +++ /dev/null @@ -1,45 +0,0 @@ ---ダークエンド・ドラゴン -function c88643579.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,nil,aux.NonTuner(Card.IsAttribute,ATTRIBUTE_DARK),1) - c:EnableReviveLimit() - --send to grave - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(88643579,0)) - e1:SetCategory(CATEGORY_TOGRAVE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_MZONE) - e1:SetTarget(c88643579.target) - e1:SetOperation(c88643579.operation) - c:RegisterEffect(e1) -end -function c88643579.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local c=e:GetHandler() - if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsAbleToGrave() end - if chk==0 then return c:GetAttack()>=500 and c:GetDefence()>=500 - and Duel.IsExistingTarget(Card.IsAbleToGrave,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectTarget(tp,Card.IsAbleToGrave,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,g:GetCount(),0,0) -end -function c88643579.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and c:IsFaceup() and c:GetAttack()>=500 and c:GetDefence()>=500 then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_COPY_INHERIT) - e1:SetReset(RESET_EVENT+0x1ff0000) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(-500) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_UPDATE_DEFENCE) - c:RegisterEffect(e2) - if tc and tc:IsControler(1-tp) and tc:IsRelateToEffect(e) and not c:IsHasEffect(EFFECT_REVERSE_UPDATE) then - Duel.SendtoGrave(tc,REASON_EFFECT) - end - end -end diff --git a/script/c88650530.lua b/script/c88650530.lua deleted file mode 100644 index ac0f359720..0000000000 --- a/script/c88650530.lua +++ /dev/null @@ -1,27 +0,0 @@ ---ワーム・アポカリプス -function c88650530.initial_effect(c) - --flip - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FLIP+EFFECT_TYPE_SINGLE) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c88650530.destg) - e1:SetOperation(c88650530.desop) - c:RegisterEffect(e1) -end -function c88650530.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable() -end -function c88650530.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and c88650530.filter(chkc) end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c88650530.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c88650530.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c88671720.lua b/script/c88671720.lua deleted file mode 100644 index c067df130b..0000000000 --- a/script/c88671720.lua +++ /dev/null @@ -1,42 +0,0 @@ ---ブラック・ボンバー -function c88671720.initial_effect(c) - --summon success - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(88671720,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c88671720.sumtg) - e1:SetOperation(c88671720.sumop) - c:RegisterEffect(e1) -end -function c88671720.filter(c,e,tp) - return c:GetLevel()==4 and c:IsRace(RACE_MACHINE) and c:IsAttribute(ATTRIBUTE_DARK) - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c88671720.sumtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c88671720.filter(chkc,e,tp) end - if chk==0 then return Duel.IsExistingTarget(c88671720.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) - and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c88671720.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c88671720.sumop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP_DEFENCE) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e2) - end - Duel.SpecialSummonComplete() -end diff --git a/script/c88686573.lua b/script/c88686573.lua deleted file mode 100644 index b9e39972b3..0000000000 --- a/script/c88686573.lua +++ /dev/null @@ -1,35 +0,0 @@ ---素早いアンコウ -function c88686573.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(88686573,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCondition(c88686573.condition) - e1:SetTarget(c88686573.target) - e1:SetOperation(c88686573.operation) - c:RegisterEffect(e1) -end -function c88686573.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_HAND+LOCATION_DECK) -end -function c88686573.filter(c,e,tp) - return c:IsSetCard(0x78) and c:GetCode()~=88686573 and c:IsLevelBelow(3) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c88686573.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c88686573.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c88686573.operation(e,tp,eg,ep,ev,re,r,rp) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ft<=0 then return end - if ft>2 then ft=2 end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c88686573.filter,tp,LOCATION_DECK,0,1,ft,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c88696724.lua b/script/c88696724.lua deleted file mode 100644 index 7e364e8905..0000000000 --- a/script/c88696724.lua +++ /dev/null @@ -1,58 +0,0 @@ ---融合呪印生物-地 -function c88696724.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetDescription(aux.Stringid(88696724,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetLabel(0) - e1:SetCost(c88696724.cost) - e1:SetTarget(c88696724.target) - e1:SetOperation(c88696724.operation) - c:RegisterEffect(e1) - --fusion substitute - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_FUSION_SUBSTITUTE) - e2:SetCondition(c88696724.subcon) - c:RegisterEffect(e2) -end -function c88696724.subcon(e) - return e:GetHandler():IsLocation(0x1e) -end -function c88696724.filter(c,e,tp,m,gc) - return c:IsType(TYPE_FUSION) and c:IsAttribute(ATTRIBUTE_EARTH) - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:CheckFusionMaterial(m,gc) -end -function c88696724.cost(e,tp,eg,ep,ev,re,r,rp,chk) - e:SetLabel(1) - return true -end -function c88696724.target(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then - if e:GetLabel()~=1 then return false end - e:SetLabel(0) - local mg=Duel.GetMatchingGroup(Card.IsCanBeFusionMaterial,tp,LOCATION_MZONE,0,nil) - return Duel.IsExistingMatchingCard(c88696724.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg,c) - end - local mg=Duel.GetMatchingGroup(Card.IsCanBeFusionMaterial,tp,LOCATION_MZONE,0,nil) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c88696724.filter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,mg,c) - local mat=Duel.SelectFusionMaterial(tp,g:GetFirst(),mg,c) - Duel.Release(mat,REASON_COST) - e:SetLabel(g:GetFirst():GetCode()) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function c88696724.filter2(c,e,tp,code) - return c:IsCode(code) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c88696724.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local code=e:GetLabel() - local tc=Duel.GetFirstMatchingCard(c88696724.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,code) - if tc then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c88722973.lua b/script/c88722973.lua deleted file mode 100644 index aebc270874..0000000000 --- a/script/c88722973.lua +++ /dev/null @@ -1,80 +0,0 @@ ---昇竜剣士マジェスターP -function c88722973.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsType,TYPE_PENDULUM),4,2) - c:EnableReviveLimit() - --search - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(c88722973.regcon) - e1:SetOperation(c88722973.regop) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCost(c88722973.spcost) - e2:SetTarget(c88722973.sptg) - e2:SetOperation(c88722973.spop) - c:RegisterEffect(e2) -end -function c88722973.regcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_XYZ -end -function c88722973.regop(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetCountLimit(1) - e1:SetCondition(c88722973.thcon) - e1:SetOperation(c88722973.thop) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function c88722973.thfilter(c) - return c:IsType(TYPE_PENDULUM) and c:IsAbleToHand() -end -function c88722973.thcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c88722973.thfilter,tp,LOCATION_DECK,0,1,nil) -end -function c88722973.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_CARD,0,88722973) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c88722973.thfilter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end -function c88722973.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c88722973.spfilter(c,e,tp) - return c:IsFaceup() and c:IsSetCard(0xc7) and c:IsType(TYPE_PENDULUM) - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c88722973.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c88722973.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function c88722973.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c88722973.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp) - local tc=g:GetFirst() - if tc then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL) - e1:SetValue(1) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - end -end diff --git a/script/c88724332.lua b/script/c88724332.lua deleted file mode 100644 index ec65b27ffc..0000000000 --- a/script/c88724332.lua +++ /dev/null @@ -1,34 +0,0 @@ ---ナイト・ドラゴリッチ -function c88724332.initial_effect(c) - --pos change - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SET_POSITION) - e1:SetRange(LOCATION_MZONE) - e1:SetTarget(c88724332.target) - e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e1:SetValue(POS_FACEUP_DEFENCE) - c:RegisterEffect(e1) - --def - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_UPDATE_DEFENCE) - e2:SetRange(LOCATION_MZONE) - e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e2:SetTarget(c88724332.deftg) - e2:SetValue(c88724332.defval) - c:RegisterEffect(e2) -end -function c88724332.target(e,c) - return c:IsPosition(POS_FACEUP_ATTACK) and not c:IsRace(RACE_WYRM) - and bit.band(c:GetSummonType(),SUMMON_TYPE_SPECIAL)==SUMMON_TYPE_SPECIAL - and bit.band(c:GetSummonLocation(),LOCATION_DECK+LOCATION_EXTRA)~=0 -end -function c88724332.deftg(e,c) - return c:IsFaceup() and not c:IsRace(RACE_WYRM) - and bit.band(c:GetSummonType(),SUMMON_TYPE_SPECIAL)==SUMMON_TYPE_SPECIAL - and bit.band(c:GetSummonLocation(),LOCATION_DECK+LOCATION_EXTRA)~=0 -end -function c88724332.defval(e,c) - return -c:GetBaseDefence() -end diff --git a/script/c88728507.lua b/script/c88728507.lua deleted file mode 100644 index 7756136ab0..0000000000 --- a/script/c88728507.lua +++ /dev/null @@ -1,66 +0,0 @@ ---ヴァンパイア・ソーサラー -function c88728507.initial_effect(c) - --search - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(88728507,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCondition(c88728507.condition) - e1:SetTarget(c88728507.target) - e1:SetOperation(c88728507.operation) - c:RegisterEffect(e1) - -- - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(88728507,1)) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_GRAVE) - e2:SetCost(c88728507.sumcost) - e2:SetOperation(c88728507.sumop) - c:RegisterEffect(e2) -end -function c88728507.condition(e,tp,eg,ep,ev,re,r,rp) - return rp~=tp and e:GetHandler():GetPreviousControler()==tp -end -function c88728507.filter(c) - return c:IsSetCard(0x8e) and (c:IsType(TYPE_SPELL+TYPE_TRAP) or c:IsAttribute(ATTRIBUTE_DARK)) and c:IsAbleToHand() -end -function c88728507.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c88728507.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c88728507.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c88728507.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end -function c88728507.sumcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) -end -function c88728507.sumop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetFlagEffect(tp,88728507)==0 then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetDescription(aux.Stringid(88728507,2)) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetTargetRange(LOCATION_HAND,0) - e1:SetCode(EFFECT_SUMMON_PROC) - e1:SetCountLimit(1) - e1:SetCondition(c88728507.ntcon) - e1:SetTarget(c88728507.nttg) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) - Duel.RegisterFlagEffect(tp,88728507,RESET_PHASE+PHASE_END,0,1) - end -end -function c88728507.ntcon(e,c,minc) - if c==nil then return true end - return minc==0 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 -end -function c88728507.nttg(e,c) - return c:IsLevelAbove(5) and c:IsSetCard(0x8e) and c:IsAttribute(ATTRIBUTE_DARK) -end diff --git a/script/c8873112.lua b/script/c8873112.lua deleted file mode 100644 index d3b95dcfe7..0000000000 --- a/script/c8873112.lua +++ /dev/null @@ -1,66 +0,0 @@ ---アーティファクト-チャクラム -function c8873112.initial_effect(c) - --set - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_MONSTER_SSET) - e1:SetValue(TYPE_SPELL) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(8873112,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetCondition(c8873112.spcon) - e2:SetTarget(c8873112.sptg) - e2:SetOperation(c8873112.spop) - c:RegisterEffect(e2) - --spsummon - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(8873112,1)) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_QUICK_O) - e3:SetCode(EVENT_CHAINING) - e3:SetRange(LOCATION_HAND) - e3:SetCondition(c8873112.spcon2) - e3:SetCost(c8873112.spcost) - e3:SetTarget(c8873112.sptg2) - e3:SetOperation(c8873112.spop) - c:RegisterEffect(e3) -end -function c8873112.spcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsPreviousLocation(LOCATION_SZONE) and c:IsPreviousPosition(POS_FACEDOWN) - and c:IsReason(REASON_DESTROY) and Duel.GetTurnPlayer()~=tp -end -function c8873112.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c8873112.spop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP) - end -end -function c8873112.cfilter(c,tp) - return c:IsOnField() and c:IsControler(tp) and c:IsType(TYPE_SPELL+TYPE_TRAP) -end -function c8873112.spcon2(e,tp,eg,ep,ev,re,r,rp) - local ex,tg,tc=Duel.GetOperationInfo(ev,CATEGORY_DESTROY) - return ex and tg~=nil and tc+tg:FilterCount(c8873112.cfilter,nil,tp)-tg:GetCount()>0 -end -function c8873112.filter(c) - return c:IsFacedown() and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHandAsCost() -end -function c8873112.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c8873112.filter,tp,LOCATION_SZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g=Duel.SelectMatchingCard(tp,c8873112.filter,tp,LOCATION_SZONE,0,1,1,nil) - Duel.SendtoHand(g,nil,REASON_COST) -end -function c8873112.sptg2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end diff --git a/script/c88733579.lua b/script/c88733579.lua deleted file mode 100644 index 9fbb54a86c..0000000000 --- a/script/c88733579.lua +++ /dev/null @@ -1,25 +0,0 @@ ---穿孔虫 -function c88733579.initial_effect(c) - --search - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(88733579,0)) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_BATTLE_DAMAGE) - e1:SetCondition(c88733579.condition) - e1:SetOperation(c88733579.operation) - c:RegisterEffect(e1) -end -function c88733579.condition(e,tp,eg,ep,ev,re,r,rp) - return ep==1-tp -end -function c88733579.filter(c) - return c:GetCode()==27911549 and c:GetPosition()~=POS_FACEUP_DEFENCE -end -function c88733579.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstMatchingCard(c88733579.filter,tp,LOCATION_DECK,0,nil) - if tc then - Duel.ShuffleDeck(tp) - Duel.MoveSequence(tc,0) - Duel.ConfirmDecktop(tp,1) - end -end diff --git a/script/c88753985.lua b/script/c88753985.lua deleted file mode 100644 index 55857bed76..0000000000 --- a/script/c88753985.lua +++ /dev/null @@ -1,42 +0,0 @@ ---きつね火 -function c88753985.initial_effect(c) - --register - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetOperation(c88753985.regop) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EFFECT_UNRELEASABLE_SUM) - e2:SetValue(1) - c:RegisterEffect(e2) -end -function c88753985.regop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsLocation(LOCATION_GRAVE) and c:IsReason(REASON_BATTLE) and c:IsPreviousPosition(POS_FACEUP) then - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(88753985,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_GRAVE) - e1:SetTarget(c88753985.sptg) - e1:SetOperation(c88753985.spop) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - c:RegisterEffect(e1) - end -end -function c88753985.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c88753985.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - if e:GetHandler():IsRelateToEffect(e) then - Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c88754763.lua b/script/c88754763.lua deleted file mode 100644 index ce7f2ccb1d..0000000000 --- a/script/c88754763.lua +++ /dev/null @@ -1,47 +0,0 @@ ---CX 熱血指導神アルティメットレーナー -function c88754763.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,9,4) - c:EnableReviveLimit() - --cannot be target - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetValue(aux.tgval) - c:RegisterEffect(e1) - --draw - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_DRAW+CATEGORY_DAMAGE) - e2:SetDescription(aux.Stringid(88754763,0)) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCondition(c88754763.condition) - e2:SetCost(c88754763.cost) - e2:SetTarget(c88754763.target) - e2:SetOperation(c88754763.operation) - c:RegisterEffect(e2) -end -function c88754763.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetOverlayGroup():IsExists(Card.IsType,1,nil,TYPE_XYZ) -end -function c88754763.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c88754763.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c88754763.operation(e,tp,eg,ep,ev,re,r,rp,chk) - local ct=Duel.Draw(tp,1,REASON_EFFECT) - if ct==0 then return end - local dc=Duel.GetOperatedGroup():GetFirst() - Duel.ConfirmCards(1-tp,dc) - if dc:IsType(TYPE_MONSTER) then - Duel.Damage(1-tp,800,REASON_EFFECT) - end - Duel.ShuffleHand(tp) -end diff --git a/script/c88757791.lua b/script/c88757791.lua deleted file mode 100644 index 748b13593d..0000000000 --- a/script/c88757791.lua +++ /dev/null @@ -1,86 +0,0 @@ ---法眼の魔術師 -function c88757791.initial_effect(c) - --pendulum summon - aux.AddPendulumProcedure(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --change scale - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(88757791,0)) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_PZONE) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCountLimit(1) - e2:SetTarget(c88757791.sctg) - e2:SetOperation(c88757791.scop) - c:RegisterEffect(e2) - --indes - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e3:SetOperation(c88757791.sumsuc) - c:RegisterEffect(e3) - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_FIELD) - e4:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - e4:SetRange(LOCATION_MZONE) - e4:SetTargetRange(LOCATION_MZONE,0) - e4:SetCondition(c88757791.indcon) - e4:SetTarget(c88757791.indtg) - e4:SetValue(c88757791.indval) - c:RegisterEffect(e4) -end -function c88757791.cfilter(c,tp) - return c:IsType(TYPE_PENDULUM) and not c:IsPublic() - and Duel.IsExistingTarget(c88757791.scfilter,tp,LOCATION_SZONE,0,1,nil,c) -end -function c88757791.scfilter(c,pc) - return c:IsSetCard(0x98) - and ((c:GetSequence()==6 and c:GetLeftScale()~=pc:GetLeftScale()) - or (c:GetSequence()==7 and c:GetRightScale()~=pc:GetRightScale())) -end -function c88757791.sctg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_SZONE) and c88757791.scfilter(chkc,e:GetLabelObject()) end - if chk==0 then return Duel.IsExistingMatchingCard(c88757791.cfilter,tp,LOCATION_HAND,0,1,nil,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) - local cg=Duel.SelectMatchingCard(tp,c88757791.cfilter,tp,LOCATION_HAND,0,1,1,nil,tp) - Duel.ConfirmCards(1-tp,cg) - Duel.ShuffleHand(tp) - e:SetLabelObject(cg:GetFirst()) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - Duel.SelectTarget(tp,c88757791.scfilter,tp,LOCATION_SZONE,0,1,1,nil,cg:GetFirst()) -end -function c88757791.scop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local tc=Duel.GetFirstTarget() - local pc=e:GetLabelObject() - if tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CHANGE_LSCALE) - e1:SetValue(pc:GetLeftScale()) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - tc:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_CHANGE_RSCALE) - e2:SetValue(pc:GetRightScale()) - tc:RegisterEffect(e2) - end -end -function c88757791.sumsuc(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():RegisterFlagEffect(88757791,RESET_EVENT+0x1ec0000+RESET_PHASE+PHASE_END,0,1) -end -function c88757791.indcon(e) - local c=e:GetHandler() - return c:GetFlagEffect(88757791)~=0 and c:GetSummonType()==SUMMON_TYPE_PENDULUM -end -function c88757791.indtg(e,c) - return c:IsSetCard(0x98) and c:IsType(TYPE_PENDULUM) -end -function c88757791.indval(e,re,rp) - return rp~=e:GetHandlerPlayer() -end diff --git a/script/c8875971.lua b/script/c8875971.lua deleted file mode 100644 index fbb69a33cc..0000000000 --- a/script/c8875971.lua +++ /dev/null @@ -1,29 +0,0 @@ ---光天使ウィングス -function c8875971.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(8875971,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c8875971.sptg) - e1:SetOperation(c8875971.spop) - c:RegisterEffect(e1) -end -function c8875971.spfilter(c,e,tp) - return c:IsSetCard(0x86) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c8875971.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c8875971.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c8875971.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c8875971.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c88760522.lua b/script/c88760522.lua deleted file mode 100644 index 88569ef4b5..0000000000 --- a/script/c88760522.lua +++ /dev/null @@ -1,27 +0,0 @@ ---多様進化 -function c88760522.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,88760522+EFFECT_COUNT_CODE_OATH) - e1:SetTarget(c88760522.target) - e1:SetOperation(c88760522.activate) - c:RegisterEffect(e1) -end -function c88760522.filter(c) - return c:IsType(TYPE_MONSTER) and (c:IsSetCard(0x304e) or c:IsSetCard(0x604e)) and c:IsAbleToHand() -end -function c88760522.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c88760522.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c88760522.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c88760522.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c88789641.lua b/script/c88789641.lua deleted file mode 100644 index a647a4c641..0000000000 --- a/script/c88789641.lua +++ /dev/null @@ -1,37 +0,0 @@ ---ホーリーライフバリアー -function c88789641.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c88789641.cost) - e1:SetOperation(c88789641.activate) - c:RegisterEffect(e1) -end -function c88789641.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) -end -function c88789641.activate(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CHANGE_DAMAGE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetTargetRange(1,0) - e1:SetValue(c88789641.val) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e2:SetTargetRange(LOCATION_MZONE,0) - e2:SetReset(RESET_PHASE+PHASE_END) - e2:SetValue(1) - Duel.RegisterEffect(e2,tp) -end -function c88789641.val(e,re,val,r,rp,rc) - if e:GetHandlerPlayer()~=rp then - return 0 - else return val end -end diff --git a/script/c88820235.lua b/script/c88820235.lua deleted file mode 100644 index 1879364dc6..0000000000 --- a/script/c88820235.lua +++ /dev/null @@ -1,30 +0,0 @@ ---E・HERO シャイニング・フェニックスガイ -function c88820235.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcCode2(c,41436536,20721928,true,true) - --spsummon condition - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(aux.fuslimit) - c:RegisterEffect(e1) - --indes - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e2:SetValue(1) - c:RegisterEffect(e2) - --atkup - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e3:SetRange(LOCATION_MZONE) - e3:SetCode(EFFECT_UPDATE_ATTACK) - e3:SetValue(c88820235.atkup) - c:RegisterEffect(e3) -end -function c88820235.atkup(e,c) - return Duel.GetMatchingGroupCount(Card.IsSetCard,c:GetControler(),LOCATION_GRAVE,0,nil,0x3008)*300 -end diff --git a/script/c88845345.lua b/script/c88845345.lua deleted file mode 100644 index 12ce235249..0000000000 --- a/script/c88845345.lua +++ /dev/null @@ -1,34 +0,0 @@ ---エレファン -function c88845345.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(88845345,0)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetCondition(c88845345.condition) - e1:SetTarget(c88845345.target) - e1:SetOperation(c88845345.operation) - c:RegisterEffect(e1) -end -function c88845345.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) -end -function c88845345.filter(c) - return c:IsLevelBelow(3) and c:IsRace(RACE_BEAST+RACE_BEASTWARRIOR+RACE_WINDBEAST) and c:IsAbleToHand() -end -function c88845345.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and c88845345.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c88845345.filter,tp,LOCATION_REMOVED,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c88845345.filter,tp,LOCATION_REMOVED,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c88845345.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end diff --git a/script/c88901771.lua b/script/c88901771.lua deleted file mode 100644 index 70203a6a33..0000000000 --- a/script/c88901771.lua +++ /dev/null @@ -1,85 +0,0 @@ ---熟練の青魔道士 -function c88901771.initial_effect(c) - c:EnableCounterPermit(0x3001) - c:SetCounterLimit(0x3001,3) - --add counter - local e0=Effect.CreateEffect(c) - e0:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e0:SetCode(EVENT_CHAINING) - e0:SetRange(LOCATION_MZONE) - e0:SetOperation(aux.chainreg) - c:RegisterEffect(e0) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_CHAIN_SOLVED) - e1:SetRange(LOCATION_MZONE) - e1:SetOperation(c88901771.acop) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(88901771,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCost(c88901771.spcost) - e2:SetTarget(c88901771.sptg) - e2:SetOperation(c88901771.spop) - c:RegisterEffect(e2) - --counter - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(88901771,1)) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_GRAVE) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetCost(c88901771.ctcost) - e3:SetTarget(c88901771.cttg) - e3:SetOperation(c88901771.ctop) - c:RegisterEffect(e3) -end -function c88901771.acop(e,tp,eg,ep,ev,re,r,rp) - if re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL) and e:GetHandler():GetFlagEffect(1)>0 then - e:GetHandler():AddCounter(0x3001,1) - end -end -function c88901771.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():GetCounter(0x3001)==3 and e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end -function c88901771.filter(c,e,tp) - return c:IsSetCard(0xbd) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) - and not c:IsHasEffect(EFFECT_NECRO_VALLEY) -end -function c88901771.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsExistingMatchingCard(c88901771.filter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE) -end -function c88901771.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c88901771.filter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end -function c88901771.ctcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) -end -function c88901771.ctfilter(c) - return c:IsFaceup() and c:IsCanAddCounter(0x3001,1) -end -function c88901771.cttg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsControler(tp) and c88901771.ctfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c88901771.ctfilter,tp,LOCATION_ONFIELD,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(88901771,2)) - Duel.SelectTarget(tp,c88901771.ctfilter,tp,LOCATION_ONFIELD,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,1,0,0x3001) -end -function c88901771.ctop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - tc:AddCounter(0x3001,1) - end -end diff --git a/script/c88928798.lua b/script/c88928798.lua deleted file mode 100644 index 19f5d440c0..0000000000 --- a/script/c88928798.lua +++ /dev/null @@ -1,36 +0,0 @@ ---ボム・ガード -function c88928798.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY+CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_CHAINING) - e1:SetCondition(c88928798.condition) - e1:SetTarget(c88928798.target) - e1:SetOperation(c88928798.activate) - c:RegisterEffect(e1) -end -function c88928798.condition(e,tp,eg,ep,ev,re,r,rp) - if not re:IsHasType(EFFECT_TYPE_ACTIVATE) or not Duel.IsChainNegatable(ev) then return false end - local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) - if not g or g:GetCount()~=1 then return false end - local gc=g:GetFirst() - if not gc:IsControler(tp) or not gc:IsLocation(LOCATION_MZONE) then return false end - local ex,tg,tc=Duel.GetOperationInfo(ev,CATEGORY_DESTROY) - return ex and tg~=nil and tg:GetCount()==1 and tg:GetFirst()==gc -end -function c88928798.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,500) - if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) - end -end -function c88928798.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateActivation(ev) - if re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(eg,REASON_EFFECT) - end - Duel.Damage(1-tp,500,REASON_EFFECT) -end diff --git a/script/c88935103.lua b/script/c88935103.lua deleted file mode 100644 index 94a4821d1c..0000000000 --- a/script/c88935103.lua +++ /dev/null @@ -1,87 +0,0 @@ ---貴竜の魔術師 -function c88935103.initial_effect(c) - --pendulum summon - aux.AddPendulumProcedure(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(88935103,0)) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --selfdes - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetCode(EFFECT_SELF_DESTROY) - e2:SetRange(LOCATION_PZONE) - e2:SetCondition(c88935103.descon) - c:RegisterEffect(e2) - --synchro limit - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e3:SetValue(c88935103.synlimit) - c:RegisterEffect(e3) - --todeck - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e4:SetCode(EFFECT_SEND_REPLACE) - e4:SetTarget(c88935103.check) - e4:SetValue(aux.FALSE) - c:RegisterEffect(e4) - --spsummon - local e5=Effect.CreateEffect(c) - e5:SetDescription(aux.Stringid(88935103,1)) - e5:SetCategory(CATEGORY_SPECIAL_SUMMON) - e5:SetProperty(EFFECT_FLAG_CARD_TARGET) - e5:SetType(EFFECT_TYPE_IGNITION) - e5:SetRange(LOCATION_HAND+LOCATION_GRAVE) - e5:SetTarget(c88935103.sptg) - e5:SetOperation(c88935103.spop) - c:RegisterEffect(e5) -end -function c88935103.descon(e) - local seq=e:GetHandler():GetSequence() - local tc=Duel.GetFieldCard(e:GetHandlerPlayer(),LOCATION_SZONE,13-seq) - return not tc or not tc:IsSetCard(0x98) -end -function c88935103.synlimit(e,c) - if not c then return false end - return not c:IsRace(RACE_DRAGON) -end -function c88935103.sfilter(c) - return not c:IsSetCard(0x99) -end -function c88935103.check(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return bit.band(r,REASON_SYNCHRO)~=0 and eg:IsExists(c88935103.sfilter,1,e:GetHandler()) end - Duel.SendtoDeck(e:GetHandler(),nil,1,r) - return true -end -function c88935103.cfilter(c) - return c:IsFaceup() and c:GetLevel()>=7 and c:IsSetCard(0x99) -end -function c88935103.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c88935103.cfilter(chkc) end - local c=e:GetHandler() - if chk==0 then return Duel.IsExistingTarget(c88935103.cfilter,tp,LOCATION_MZONE,0,1,nil) - and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - Duel.SelectTarget(tp,c88935103.cfilter,tp,LOCATION_MZONE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0) -end -function c88935103.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsFacedown() or not tc:IsRelateToEffect(e) or tc:IsImmuneToEffect(e) or tc:GetLevel()<4 then return end - local c=e:GetHandler() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_LEVEL) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(-3) - tc:RegisterEffect(e1) - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c88940154.lua b/script/c88940154.lua deleted file mode 100644 index b642b790e9..0000000000 --- a/script/c88940154.lua +++ /dev/null @@ -1,42 +0,0 @@ ---武神器-ハチ -function c88940154.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(88940154,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_GRAVE) - e1:SetCountLimit(1,88940154) - e1:SetCondition(c88940154.descon) - e1:SetCost(c88940154.descost) - e1:SetTarget(c88940154.destg) - e1:SetOperation(c88940154.desop) - c:RegisterEffect(e1) -end -function c88940154.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x88) and c:IsRace(RACE_BEASTWARRIOR) -end -function c88940154.descon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c88940154.cfilter,tp,LOCATION_MZONE,0,1,nil) -end -function c88940154.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) -end -function c88940154.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable() -end -function c88940154.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and c88940154.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c88940154.filter,tp,0,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c88940154.filter,tp,0,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c88940154.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c88942504.lua b/script/c88942504.lua deleted file mode 100644 index 6edc358653..0000000000 --- a/script/c88942504.lua +++ /dev/null @@ -1,46 +0,0 @@ ---管魔人メロメロメロディ -function c88942504.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,3,2) - c:EnableReviveLimit() - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(88942504,0)) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCondition(c88942504.condition) - e1:SetCost(c88942504.cost) - e1:SetTarget(c88942504.target) - e1:SetOperation(c88942504.operation) - c:RegisterEffect(e1) -end -function c88942504.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsAbleToEnterBP() -end -function c88942504.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c88942504.filter(c) - return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:IsSetCard(0x6d) and not c:IsHasEffect(EFFECT_EXTRA_ATTACK) -end -function c88942504.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c88942504.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c88942504.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c88942504.filter,tp,LOCATION_MZONE,0,1,1,nil) -end -function c88942504.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_EXTRA_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - e1:SetValue(1) - tc:RegisterEffect(e1) - end -end diff --git a/script/c88958576.lua b/script/c88958576.lua deleted file mode 100644 index 25d43f58ea..0000000000 --- a/script/c88958576.lua +++ /dev/null @@ -1,18 +0,0 @@ ---ラヴァルバーナー -function c88958576.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c88958576.spcon) - c:RegisterEffect(e1) -end -function c88958576.spcon(e,c) - if c==nil then return true end - if Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)<=0 then return false end - local g=Duel.GetMatchingGroup(Card.IsSetCard,c:GetControler(),LOCATION_GRAVE,0,nil,0x39) - local ct=g:GetClassCount(Card.GetCode) - return ct>=3 -end diff --git a/script/c88975532.lua b/script/c88975532.lua deleted file mode 100644 index a04278050d..0000000000 --- a/script/c88975532.lua +++ /dev/null @@ -1,20 +0,0 @@ ---漆黒の戦士 ワーウルフ -function c88975532.initial_effect(c) - --act limit - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EFFECT_CANNOT_ACTIVATE) - e1:SetCondition(c88975532.con) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(0,1) - e1:SetValue(c88975532.aclimit) - c:RegisterEffect(e1) -end -function c88975532.con(e) - local ph=Duel.GetCurrentPhase() - return ph==PHASE_BATTLE or ph==PHASE_DAMAGE or ph==PHASE_DAMAGE_CAL -end -function c88975532.aclimit(e,re,tp) - return re:GetHandler():IsType(TYPE_TRAP) and re:IsHasType(EFFECT_TYPE_ACTIVATE) -end diff --git a/script/c88989706.lua b/script/c88989706.lua deleted file mode 100644 index 05541302b7..0000000000 --- a/script/c88989706.lua +++ /dev/null @@ -1,70 +0,0 @@ ---大神官デ・ザード -function c88989706.initial_effect(c) - --check - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_BATTLE_DESTROYING) - e1:SetOperation(c88989706.regop) - c:RegisterEffect(e1) - --negate - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EVENT_CHAIN_ACTIVATING) - e2:SetCondition(c88989706.discon) - e2:SetOperation(c88989706.disop) - c:RegisterEffect(e2) - --special summon - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(88989706,0)) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_MZONE) - e3:SetCondition(c88989706.spcon) - e3:SetCost(c88989706.spcost) - e3:SetTarget(c88989706.sptg) - e3:SetOperation(c88989706.spop) - c:RegisterEffect(e3) -end -function c88989706.regop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToBattle() then - c:RegisterFlagEffect(88989707,RESET_EVENT+0x1fe0000,0,0) - end -end -function c88989706.discon(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():GetFlagEffect(88989707)==0 then return false end - if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end - local tg=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) - if not tg or not tg:IsContains(e:GetHandler()) then return false end - return re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev) -end -function c88989706.disop(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateActivation(ev) - if re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(re:GetHandler(),REASON_EFFECT) - end -end -function c88989706.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetFlagEffect(88989707)>=2 -end -function c88989706.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end -function c88989706.filter(c,e,tp) - return c:IsCode(39711336) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) -end -function c88989706.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsExistingMatchingCard(c88989706.filter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,0,tp,LOCATION_DECK+LOCATION_HAND) -end -function c88989706.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c88989706.filter,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil,e,tp) - if g:GetCount()>0 and Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP)>0 then - g:GetFirst():CompleteProcedure() - end -end diff --git a/script/c8903700.lua b/script/c8903700.lua deleted file mode 100644 index f5dcd35f78..0000000000 --- a/script/c8903700.lua +++ /dev/null @@ -1,39 +0,0 @@ ---儀式魔人リリーサー -function c8903700.initial_effect(c) - --ritual material - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_EXTRA_RITUAL_MATERIAL) - e1:SetValue(1) - c:RegisterEffect(e1) - --become material - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetCode(EVENT_BE_MATERIAL) - e2:SetCondition(c8903700.condition) - e2:SetOperation(c8903700.operation) - c:RegisterEffect(e2) -end -function c8903700.condition(e,tp,eg,ep,ev,re,r,rp) - return r==REASON_RITUAL -end -function c8903700.operation(e,tp,eg,ep,ev,re,r,rp) - local rc=eg:GetFirst() - while rc do - if rc:GetFlagEffect(8903700)==0 then - --cannot special summon - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetDescription(aux.Stringid(8903700,0)) - e1:SetProperty(EFFECT_FLAG_CLIENT_HINT+EFFECT_FLAG_PLAYER_TARGET) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetAbsoluteRange(rp,0,1) - rc:RegisterEffect(e1,true) - rc:RegisterFlagEffect(8903700,RESET_EVENT+0x1fe0000,0,1) - end - rc=eg:GetNext() - end -end diff --git a/script/c89040386.lua b/script/c89040386.lua deleted file mode 100644 index 657c574d63..0000000000 --- a/script/c89040386.lua +++ /dev/null @@ -1,33 +0,0 @@ ---BF-バックフラッシュ -function c89040386.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetCondition(c89040386.condition) - e1:SetTarget(c89040386.target) - e1:SetOperation(c89040386.activate) - c:RegisterEffect(e1) -end -function c89040386.cfilter(c) - return c:IsSetCard(0x33) and c:IsType(TYPE_MONSTER) -end -function c89040386.condition(e,tp,eg,ep,ev,re,r,rp) - return tp~=Duel.GetTurnPlayer() and Duel.GetAttackTarget()==nil - and Duel.IsExistingMatchingCard(c89040386.cfilter,tp,LOCATION_GRAVE,0,5,nil) -end -function c89040386.filter(c) - return c:IsDestructable() -end -function c89040386.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c89040386.filter,tp,0,LOCATION_MZONE,1,nil) end - local g=Duel.GetMatchingGroup(c89040386.filter,tp,0,LOCATION_MZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c89040386.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c89040386.filter,tp,0,LOCATION_MZONE,nil) - if g:GetCount()>0 then - Duel.Destroy(g,REASON_EFFECT) - end -end diff --git a/script/c89041555.lua b/script/c89041555.lua deleted file mode 100644 index e4f58f3ae4..0000000000 --- a/script/c89041555.lua +++ /dev/null @@ -1,30 +0,0 @@ ---生贄の抱く爆弾 -function c89041555.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetCondition(c89041555.condition) - e1:SetTarget(c89041555.target) - e1:SetOperation(c89041555.activate) - c:RegisterEffect(e1) -end -function c89041555.condition(e,tp,eg,ep,ev,re,r,rp) - return tp~=Duel.GetTurnPlayer() and bit.band(eg:GetFirst():GetSummonType(),SUMMON_TYPE_ADVANCE)==SUMMON_TYPE_ADVANCE -end -function c89041555.filter(c) - return c:IsAttackPos() and c:IsDestructable() -end -function c89041555.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c89041555.filter,tp,0,LOCATION_MZONE,1,nil) end - local g=Duel.GetMatchingGroup(c89041555.filter,tp,0,LOCATION_MZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,1000) -end -function c89041555.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c89041555.filter,tp,0,LOCATION_MZONE,nil) - if g:GetCount()>0 and Duel.Destroy(g,REASON_EFFECT)>0 then - Duel.Damage(1-tp,1000,REASON_EFFECT) - end -end diff --git a/script/c89086566.lua b/script/c89086566.lua deleted file mode 100644 index 4f574f0881..0000000000 --- a/script/c89086566.lua +++ /dev/null @@ -1,33 +0,0 @@ ---機雷化 -function c89086566.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,0x1c0) - e1:SetTarget(c89086566.target) - e1:SetOperation(c89086566.activate) - c:RegisterEffect(e1) -end -function c89086566.cfilter(c) - local code=c:GetCode() - return c:IsFaceup() and (code==40640057 or code==40703223) and c:IsDestructable() -end -function c89086566.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c89086566.cfilter,tp,LOCATION_MZONE,0,1,nil) end - local g=Duel.GetMatchingGroup(c89086566.cfilter,tp,LOCATION_MZONE,0,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c89086566.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c89086566.cfilter,tp,LOCATION_MZONE,0,nil) - local dt=Duel.Destroy(g,REASON_EFFECT) - if dt==0 then return end - local dg=Duel.GetMatchingGroup(Card.IsDestructable,tp,0,LOCATION_ONFIELD,nil) - if dg:GetCount()>0 then - Duel.BreakEffect() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local sg=dg:Select(tp,1,dt,nil) - Duel.Destroy(sg,REASON_EFFECT) - end -end diff --git a/script/c89111398.lua b/script/c89111398.lua deleted file mode 100644 index c1bbee1066..0000000000 --- a/script/c89111398.lua +++ /dev/null @@ -1,82 +0,0 @@ ---砂塵の悪霊 -function c89111398.initial_effect(c) - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(aux.FALSE) - c:RegisterEffect(e1) - --summon,flip - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetCode(EVENT_SUMMON_SUCCESS) - e2:SetOperation(c89111398.retreg) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EVENT_FLIP) - c:RegisterEffect(e3) - --destroy - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(89111398,1)) - e4:SetCategory(CATEGORY_DESTROY) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e4:SetCode(EVENT_SUMMON_SUCCESS) - e4:SetTarget(c89111398.destg) - e4:SetOperation(c89111398.desop) - c:RegisterEffect(e4) - local e5=e4:Clone() - e5:SetCode(EVENT_FLIP) - c:RegisterEffect(e5) -end -function c89111398.filter(c) - return c:IsFaceup() and c:IsDestructable() -end -function c89111398.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local g=Duel.GetMatchingGroup(c89111398.filter,tp,LOCATION_MZONE,LOCATION_MZONE,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c89111398.desop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c89111398.filter,tp,LOCATION_MZONE,LOCATION_MZONE,e:GetHandler()) - if g:GetCount()>0 then - Duel.Destroy(g,REASON_EFFECT) - end -end -function c89111398.retreg(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - --to hand - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetDescription(aux.Stringid(89111398,0)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetReset(RESET_EVENT+0x1ee0000+RESET_PHASE+PHASE_END) - e1:SetCondition(c89111398.retcon) - e1:SetTarget(c89111398.rettg) - e1:SetOperation(c89111398.retop) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - c:RegisterEffect(e2) -end -function c89111398.retcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsHasEffect(EFFECT_SPIRIT_DONOT_RETURN) then return false end - if e:IsHasType(EFFECT_TYPE_TRIGGER_F) then - return not c:IsHasEffect(EFFECT_SPIRIT_MAYNOT_RETURN) - else return c:IsHasEffect(EFFECT_SPIRIT_MAYNOT_RETURN) end -end -function c89111398.rettg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0) -end -function c89111398.retop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - Duel.SendtoHand(c,nil,REASON_EFFECT) - end -end diff --git a/script/c89112729.lua b/script/c89112729.lua deleted file mode 100644 index 04e79e83c8..0000000000 --- a/script/c89112729.lua +++ /dev/null @@ -1,6 +0,0 @@ ---メカ・ザウルス -function c89112729.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcCode2(c,70138455,94119974,true,true) -end diff --git a/script/c89127526.lua b/script/c89127526.lua deleted file mode 100644 index 4c5de11050..0000000000 --- a/script/c89127526.lua +++ /dev/null @@ -1,45 +0,0 @@ ---バリア・リゾネーター -function c89127526.initial_effect(c) - -- - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(89127526,0)) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetRange(LOCATION_HAND) - e1:SetCost(c89127526.cost) - e1:SetTarget(c89127526.target) - e1:SetOperation(c89127526.operation) - c:RegisterEffect(e1) -end -function c89127526.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end -function c89127526.filter(c) - return c:IsFaceup() and c:IsType(TYPE_TUNER) -end -function c89127526.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c89127526.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c89127526.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c89127526.filter,tp,LOCATION_MZONE,0,1,1,nil) -end -function c89127526.operation(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_AVOID_BATTLE_DAMAGE) - e1:SetValue(1) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e2:SetValue(1) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - tc:RegisterEffect(e2) - end -end diff --git a/script/c89181369.lua b/script/c89181369.lua deleted file mode 100644 index 452045e226..0000000000 --- a/script/c89181369.lua +++ /dev/null @@ -1,51 +0,0 @@ ---星屑のきらめき -function c89181369.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_REMOVE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c89181369.target) - e1:SetOperation(c89181369.activate) - c:RegisterEffect(e1) -end -function c89181369.spfilter(c,e,tp,rg) - if not c:IsType(TYPE_SYNCHRO) or not c:IsRace(RACE_DRAGON) or not c:IsCanBeSpecialSummoned(e,0,tp,false,false) then return false end - if rg:IsContains(c) then - rg:RemoveCard(c) - result=rg:CheckWithSumEqual(Card.GetLevel,c:GetLevel(),1,99) - rg:AddCard(c) - else - result=rg:CheckWithSumEqual(Card.GetLevel,c:GetLevel(),1,99) - end - return result -end -function c89181369.rmfilter(c) - return c:GetLevel()>0 and c:IsAbleToRemove() -end -function c89181369.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - if chk==0 then - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return false end - local rg=Duel.GetMatchingGroup(c89181369.rmfilter,tp,LOCATION_GRAVE,0,nil) - return Duel.IsExistingTarget(c89181369.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp,rg) - end - local rg=Duel.GetMatchingGroup(c89181369.rmfilter,tp,LOCATION_GRAVE,0,nil) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c89181369.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp,rg) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c89181369.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if not tc:IsRelateToEffect(e) or Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 - or not tc:IsCanBeSpecialSummoned(e,0,tp,false,false) then return end - local rg=Duel.GetMatchingGroup(c89181369.rmfilter,tp,LOCATION_GRAVE,0,nil) - rg:RemoveCard(tc) - if rg:CheckWithSumEqual(Card.GetLevel,tc:GetLevel(),1,99) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local rm=rg:SelectWithSumEqual(tp,Card.GetLevel,tc:GetLevel(),1,99) - Duel.Remove(rm,POS_FACEUP,REASON_EFFECT) - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c89185742.lua b/script/c89185742.lua deleted file mode 100644 index 4108e55b9e..0000000000 --- a/script/c89185742.lua +++ /dev/null @@ -1,46 +0,0 @@ ---風征竜-ライトニング -function c89185742.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(89185742,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(1,89185742) - e1:SetCost(c89185742.spcost) - e1:SetTarget(c89185742.sptg) - e1:SetOperation(c89185742.spop) - c:RegisterEffect(e1) -end -function c89185742.costfilter(c) - return (c:IsRace(RACE_DRAGON) or c:IsAttribute(ATTRIBUTE_WIND)) and c:IsDiscardable() -end -function c89185742.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsDiscardable() - and Duel.IsExistingMatchingCard(c89185742.costfilter,tp,LOCATION_HAND,0,1,c) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) - local g=Duel.SelectMatchingCard(tp,c89185742.costfilter,tp,LOCATION_HAND,0,1,1,c) - g:AddCard(c) - Duel.SendtoGrave(g,REASON_COST+REASON_DISCARD) -end -function c89185742.spfilter(c,e,tp) - return c:IsCode(89399912) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c89185742.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c89185742.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c89185742.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local tc=Duel.GetFirstMatchingCard(c89185742.spfilter,tp,LOCATION_DECK,0,nil,e,tp) - if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - Duel.SpecialSummonComplete() - end -end diff --git a/script/c89194033.lua b/script/c89194033.lua deleted file mode 100644 index a0b779be4f..0000000000 --- a/script/c89194033.lua +++ /dev/null @@ -1,44 +0,0 @@ ---聖獣セルケト -function c89194033.initial_effect(c) - --selfdestroy - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_SELF_DESTROY) - e1:SetCondition(c89194033.descon) - c:RegisterEffect(e1) - --redirect - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_BATTLE_DESTROY_REDIRECT) - e2:SetValue(LOCATION_REMOVED) - c:RegisterEffect(e2) - --atkup - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(89194033,0)) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e3:SetCode(EVENT_BATTLE_DESTROYING) - e3:SetCondition(c89194033.atkcon) - e3:SetOperation(c89194033.atkop) - c:RegisterEffect(e3) -end -function c89194033.desfilter(c) - return c:IsFaceup() and c:IsCode(29762407) -end -function c89194033.descon(e) - return not Duel.IsExistingMatchingCard(c89194033.desfilter,e:GetHandler():GetControler(),LOCATION_SZONE,0,1,nil) -end -function c89194033.atkcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsFaceup() and e:GetHandler():IsRelateToBattle() -end -function c89194033.atkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFacedown() or not c:IsRelateToEffect(e) then return end - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(500) - e1:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e1) -end diff --git a/script/c89194103.lua b/script/c89194103.lua deleted file mode 100644 index 3f35cb400b..0000000000 --- a/script/c89194103.lua +++ /dev/null @@ -1,45 +0,0 @@ ---魔轟神獣クダベ -function c89194103.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0x35),aux.NonTuner(nil),1) - c:EnableReviveLimit() - --cannot destroy - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c89194103.indcon) - e1:SetValue(1) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - c:RegisterEffect(e2) - --selfdes - local e3=Effect.CreateEffect(c) - e3:SetCategory(CATEGORY_DESTROY) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e3:SetCode(EVENT_PHASE+PHASE_END) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1) - e3:SetCondition(c89194103.descon) - e3:SetTarget(c89194103.destg) - e3:SetOperation(c89194103.desop) - c:RegisterEffect(e3) -end -function c89194103.indcon(e) - return Duel.GetFieldGroupCount(e:GetHandler():GetControler(),LOCATION_HAND,0)==0 -end -function c89194103.descon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)>=3 -end -function c89194103.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0) -end -function c89194103.desop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFaceup() and c:IsRelateToEffect(e) then - Duel.Destroy(c,REASON_EFFECT) - end -end diff --git a/script/c89211486.lua b/script/c89211486.lua deleted file mode 100644 index 147e11c57e..0000000000 --- a/script/c89211486.lua +++ /dev/null @@ -1,35 +0,0 @@ ---ジェネクス・ドクター -function c89211486.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(89211486,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c89211486.cost) - e1:SetTarget(c89211486.target) - e1:SetOperation(c89211486.operation) - c:RegisterEffect(e1) -end -function c89211486.cfilter(c) - return c:IsFaceup() and c:IsCode(68505803) -end -function c89211486.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,c89211486.cfilter,1,e:GetHandler()) end - local sg=Duel.SelectReleaseGroup(tp,c89211486.cfilter,1,1,e:GetHandler()) - Duel.Release(sg,REASON_COST) -end -function c89211486.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsDestructable() end - if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c89211486.operation(e,tp,eg,ep,ev,re,r,rp,chk) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c89222931.lua b/script/c89222931.lua deleted file mode 100644 index e734d1c512..0000000000 --- a/script/c89222931.lua +++ /dev/null @@ -1,21 +0,0 @@ ---機械王-プロトタイプ -function c89222931.initial_effect(c) - --atkup - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetRange(LOCATION_MZONE) - e1:SetValue(c89222931.val) - c:RegisterEffect(e1) - --defup - local e2=e1:Clone() - e2:SetCode(EFFECT_UPDATE_DEFENCE) - c:RegisterEffect(e2) -end -function c89222931.val(e,c) - return Duel.GetMatchingGroupCount(c89222931.filter,c:GetControler(),LOCATION_MZONE,LOCATION_MZONE,e:GetHandler())*100 -end -function c89222931.filter(c) - return c:IsFaceup() and c:IsRace(RACE_MACHINE) -end diff --git a/script/c89235196.lua b/script/c89235196.lua deleted file mode 100644 index 1b5970225d..0000000000 --- a/script/c89235196.lua +++ /dev/null @@ -1,33 +0,0 @@ ---ビッグ・ワン・ウォリアー -function c89235196.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(89235196,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND) - e1:SetCost(c89235196.spcost) - e1:SetTarget(c89235196.sptg) - e1:SetOperation(c89235196.spop) - c:RegisterEffect(e1) -end -function c89235196.cfilter(c) - return c:GetLevel()==1 and c:IsAbleToGraveAsCost() -end -function c89235196.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c89235196.cfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c89235196.cfilter,tp,LOCATION_HAND,0,1,1,e:GetHandler()) - Duel.SendtoGrave(g,REASON_COST) -end -function c89235196.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c89235196.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - if not c:IsRelateToEffect(e) or not c:IsCanBeSpecialSummoned(e,0,tp,false,false) then return end - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) -end diff --git a/script/c89252153.lua b/script/c89252153.lua deleted file mode 100644 index 6bcddcf609..0000000000 --- a/script/c89252153.lua +++ /dev/null @@ -1,22 +0,0 @@ ---E・HERO ネクロダークマン -function c89252153.initial_effect(c) - --summon with no tribute - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(89252153,0)) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetRange(LOCATION_GRAVE) - e1:SetTargetRange(LOCATION_HAND,0) - e1:SetCode(EFFECT_SUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_NO_TURN_RESET) - e1:SetCountLimit(1) - e1:SetCondition(c89252153.ntcon) - e1:SetTarget(c89252153.nttg) - c:RegisterEffect(e1) -end -function c89252153.ntcon(e,c,minc) - if c==nil then return true end - return minc==0 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 -end -function c89252153.nttg(e,c) - return c:IsLevelAbove(5) and c:IsSetCard(0x3008) -end diff --git a/script/c89252157.lua b/script/c89252157.lua deleted file mode 100644 index 3257f17ca2..0000000000 --- a/script/c89252157.lua +++ /dev/null @@ -1,46 +0,0 @@ ---薔薇恋人 -function c89252157.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_GRAVE) - e1:SetCountLimit(1,89252157) - e1:SetCost(c89252157.spcost) - e1:SetTarget(c89252157.sptg) - e1:SetOperation(c89252157.spop) - c:RegisterEffect(e1) -end -function c89252157.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) -end -function c89252157.spfilter(c,e,tp) - return c:IsRace(RACE_PLANT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c89252157.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c89252157.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c89252157.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c89252157.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - local tc=g:GetFirst() - if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_IMMUNE_EFFECT) - e1:SetValue(c89252157.efilter) - e1:SetOwnerPlayer(tp) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - tc:RegisterEffect(e1,true) - Duel.SpecialSummonComplete() - end -end -function c89252157.efilter(e,re) - return e:GetOwnerPlayer()~=re:GetOwnerPlayer() and re:IsActiveType(TYPE_TRAP) -end diff --git a/script/c89258225.lua b/script/c89258225.lua deleted file mode 100644 index f6b05c821d..0000000000 --- a/script/c89258225.lua +++ /dev/null @@ -1,41 +0,0 @@ ---ハ・デスの使い魔 -function c89258225.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(89258225,0)) - e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c89258225.cost) - e1:SetTarget(c89258225.target) - e1:SetOperation(c89258225.operation) - c:RegisterEffect(e1) -end -function c89258225.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end -function c89258225.filter(c) - return c:IsFaceup() and c:IsRace(RACE_FIEND) -end -function c89258225.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c89258225.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c89258225.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c89258225.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) -end -function c89258225.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and c89258225.filter(tc) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(700) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_UPDATE_DEFENCE) - tc:RegisterEffect(e2) - end -end diff --git a/script/c89258906.lua b/script/c89258906.lua deleted file mode 100644 index b2b7338db9..0000000000 --- a/script/c89258906.lua +++ /dev/null @@ -1,39 +0,0 @@ ---BF-そよ風のブリーズ -function c89258906.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(89258906,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DELAY) - e1:SetCode(EVENT_TO_HAND) - e1:SetCondition(c89258906.condition) - e1:SetTarget(c89258906.target) - e1:SetOperation(c89258906.operation) - c:RegisterEffect(e1) - --synchro limit - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e2:SetValue(c89258906.synlimit) - c:RegisterEffect(e2) -end -function c89258906.synlimit(e,c) - if not c then return false end - return not c:IsSetCard(0x33) -end -function c89258906.condition(e,tp,eg,ep,ev,re,r,rp) - return bit.band(r,REASON_EFFECT)~=0 and e:GetHandler():IsPreviousLocation(LOCATION_DECK) -end -function c89258906.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c89258906.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c89310929.lua b/script/c89310929.lua deleted file mode 100644 index 9dd4994e83..0000000000 --- a/script/c89310929.lua +++ /dev/null @@ -1,43 +0,0 @@ ---霞の谷の雷神鬼 -function c89310929.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,nil,aux.NonTuner(Card.IsSetCard,0x37),1) - c:EnableReviveLimit() - --atkup - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(89310929,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetCountLimit(1) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c89310929.condition) - e1:SetTarget(c89310929.target) - e1:SetOperation(c89310929.operation) - c:RegisterEffect(e1) -end -function c89310929.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end -function c89310929.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsControler(tp) and chkc:IsAbleToHand() end - if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToHand,tp,LOCATION_ONFIELD,0,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g=Duel.SelectTarget(tp,Card.IsAbleToHand,tp,LOCATION_ONFIELD,0,1,1,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c89310929.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if not tc:IsRelateToEffect(e) then return end - Duel.SendtoHand(tc,nil,REASON_EFFECT) - local c=e:GetHandler() - if c:IsFacedown() or not c:IsRelateToEffect(e) or not tc:IsLocation(LOCATION_HAND) then return end - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(500) - e1:SetReset(RESET_EVENT+0x1ff0000+RESET_PHASE+PHASE_END) - c:RegisterEffect(e1) -end diff --git a/script/c89312388.lua b/script/c89312388.lua deleted file mode 100644 index f926f62e7c..0000000000 --- a/script/c89312388.lua +++ /dev/null @@ -1,63 +0,0 @@ ---E・HERO プリズマー -function c89312388.initial_effect(c) - --cos - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(89312388,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c89312388.coscost) - e1:SetOperation(c89312388.cosoperation) - c:RegisterEffect(e1) -end -function c89312388.filter2(c,fc) - local fd=c:GetCode() - if not c:IsAbleToGraveAsCost() then return false end - for i=1,fc.material_count do - if fd==fc.material[i] then return true end - end - return false -end -function c89312388.filter1(c,tp) - local ct=c.material_count - return ct~=nil and Duel.IsExistingMatchingCard(c89312388.filter2,tp,LOCATION_DECK,0,1,nil,c) -end -function c89312388.coscost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c89312388.filter1,tp,LOCATION_EXTRA,0,1,nil,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) - local g=Duel.SelectMatchingCard(tp,c89312388.filter1,tp,LOCATION_EXTRA,0,1,1,nil,tp) - Duel.ConfirmCards(1-tp,g) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local cg=Duel.SelectMatchingCard(tp,c89312388.filter2,tp,LOCATION_DECK,0,1,1,nil,g:GetFirst()) - Duel.SendtoGrave(cg,REASON_COST) - e:SetLabel(cg:GetFirst():GetCode()) -end -function c89312388.cosoperation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) or c:IsFacedown() then return end - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CHANGE_CODE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e1:SetValue(e:GetLabel()) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(89312388,1)) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_PHASE+PHASE_END) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e2:SetCountLimit(1) - e2:SetRange(LOCATION_MZONE) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e2:SetLabelObject(e1) - e2:SetOperation(c89312388.rstop) - c:RegisterEffect(e2) -end -function c89312388.rstop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local e1=e:GetLabelObject() - e1:Reset() - Duel.HintSelection(Group.FromCards(c)) - Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) -end diff --git a/script/c89326990.lua b/script/c89326990.lua deleted file mode 100644 index 8b39562785..0000000000 --- a/script/c89326990.lua +++ /dev/null @@ -1,44 +0,0 @@ ---SRオハジキッド -function c89326990.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(89326990,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c89326990.target) - e1:SetOperation(c89326990.operation) - c:RegisterEffect(e1) -end -function c89326990.filter(c,e,tp,mc) - local mg=Group.FromCards(c,mc) - return c:IsType(TYPE_TUNER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) - and Duel.IsExistingMatchingCard(c89326990.scfilter,tp,LOCATION_EXTRA,0,1,nil,mg) -end -function c89326990.scfilter(c,mg) - return c:IsAttribute(ATTRIBUTE_WIND) and c:IsSynchroSummonable(nil,mg) -end -function c89326990.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and c89326990.filter(chkc,e,tp,e:GetHandler()) end - if chk==0 then return Duel.IsPlayerCanSpecialSummonCount(tp,2) - and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c89326990.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil,e,tp,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c89326990.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil,e,tp,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c89326990.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 then return end - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if not tc:IsRelateToEffect(e) or Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)==0 then return end - if not c:IsRelateToEffect(e) then return end - local mg=Group.FromCards(c,tc) - local g=Duel.GetMatchingGroup(c89326990.scfilter,tp,LOCATION_EXTRA,0,nil,mg) - if g:GetCount()>0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=g:Select(tp,1,1,nil) - Duel.SynchroSummon(tp,sg:GetFirst(),nil,mg) - end -end diff --git a/script/c89333528.lua b/script/c89333528.lua deleted file mode 100644 index 9508b4b567..0000000000 --- a/script/c89333528.lua +++ /dev/null @@ -1,30 +0,0 @@ ---ジェネクス・ガイア -function c89333528.initial_effect(c) - --Destroy replace - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DESTROY_REPLACE) - e2:SetTarget(c89333528.desreptg) - e2:SetOperation(c89333528.desrepop) - c:RegisterEffect(e2) -end -function c89333528.repfilter(c) - return c:IsFaceup() and c:IsCode(68505803) and not c:IsStatus(STATUS_DESTROY_CONFIRMED) -end -function c89333528.desreptg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return not c:IsReason(REASON_REPLACE) and c:IsOnField() and c:IsFaceup() - and Duel.IsExistingMatchingCard(c89333528.repfilter,tp,LOCATION_MZONE,0,1,c) end - if Duel.SelectYesNo(tp,aux.Stringid(89333528,0)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESREPLACE) - local g=Duel.SelectMatchingCard(tp,c89333528.repfilter,tp,LOCATION_MZONE,0,1,1,c) - Duel.SetTargetCard(g) - g:GetFirst():SetStatus(STATUS_DESTROY_CONFIRMED,true) - return true - else return false end -end -function c89333528.desrepop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - g:GetFirst():SetStatus(STATUS_DESTROY_CONFIRMED,false) - Duel.Destroy(g,REASON_EFFECT+REASON_REPLACE) -end diff --git a/script/c89362180.lua b/script/c89362180.lua deleted file mode 100644 index 55790f78a2..0000000000 --- a/script/c89362180.lua +++ /dev/null @@ -1,56 +0,0 @@ ---ナチュラル・ボーン・サウルス -function c89362180.initial_effect(c) - aux.EnableDualAttribute(c) - --prop change - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetCode(EFFECT_CHANGE_ATTRIBUTE) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(aux.IsDualState) - e1:SetValue(ATTRIBUTE_EARTH) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetCode(EFFECT_CHANGE_RACE) - e2:SetRange(LOCATION_MZONE) - e2:SetCondition(aux.IsDualState) - e2:SetValue(RACE_DINOSAUR) - c:RegisterEffect(e2) - --special summon - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(89362180,0)) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetCode(EVENT_BATTLE_DESTROYING) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetCondition(c89362180.spcon) - e3:SetTarget(c89362180.sptg) - e3:SetOperation(c89362180.spop) - c:RegisterEffect(e3) -end -function c89362180.spcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsDualState() then return false end - local bc=c:GetBattleTarget() - if not c:IsRelateToBattle() or c:IsFacedown() then return false end - return bc:IsLocation(LOCATION_GRAVE) and bc:IsType(TYPE_MONSTER) -end -function c89362180.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - local bc=e:GetHandler():GetBattleTarget() - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and bc:IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetTargetCard(bc) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,bc,1,0,LOCATION_GRAVE) -end -function c89362180.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENCE)>0 then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CHANGE_RACE) - e1:SetValue(RACE_ZOMBIE) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - end -end diff --git a/script/c89397517.lua b/script/c89397517.lua deleted file mode 100644 index 0abe8d613b..0000000000 --- a/script/c89397517.lua +++ /dev/null @@ -1,62 +0,0 @@ ---レジェンド・オブ・ハート -function c89397517.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_REMOVE+CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,89397517+EFFECT_COUNT_CODE_OATH) - e1:SetCost(c89397517.cost) - e1:SetTarget(c89397517.target) - e1:SetOperation(c89397517.activate) - c:RegisterEffect(e1) -end -function c89397517.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,2000) and Duel.CheckReleaseGroup(tp,Card.IsRace,1,nil,RACE_WARRIOR) end - Duel.PayLPCost(tp,2000) - local sg=Duel.SelectReleaseGroup(tp,Card.IsRace,1,1,nil,RACE_WARRIOR) - Duel.Release(sg,REASON_COST) -end -function c89397517.rmfilter(c) - return c:IsSetCard(0xa1) and c:IsType(TYPE_SPELL) and c:IsAbleToRemove() -end -function c89397517.spfilter(c,e,tp) - return c:IsSetCard(0xa0) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,true,true) and not c:IsHasEffect(EFFECT_NECRO_VALLEY) -end -function c89397517.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c89397517.rmfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil) - and Duel.IsExistingMatchingCard(c89397517.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_DECK,0,1,nil,e,tp) end - local g=Duel.GetMatchingGroup(c89397517.rmfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,nil) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_DECK) -end -function c89397517.activate(e,tp,eg,ep,ev,re,r,rp) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ft<=0 then return end - local rmg=Duel.GetMatchingGroup(c89397517.rmfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,nil) - local rmct=rmg:GetClassCount(Card.GetCode) - local spg=Duel.GetMatchingGroup(c89397517.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_DECK,0,nil,e,tp) - local spct=spg:GetClassCount(Card.GetCode) - local ct=math.min(3,ft,spct,rmct) - if ct==0 then return end - local g=Group.CreateGroup() - repeat - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local tc=rmg:Select(tp,1,1,nil):GetFirst() - rmg:Remove(Card.IsCode,nil,tc:GetCode()) - g:AddCard(tc) - ct=ct-1 - until ct<1 or not Duel.SelectYesNo(tp,aux.Stringid(89397517,0)) - Duel.Remove(g,POS_FACEUP,REASON_EFFECT) - ct=g:FilterCount(Card.IsLocation,nil,LOCATION_REMOVED) - while ct>0 do - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local tc=spg:Select(tp,1,1,nil):GetFirst() - spg:Remove(Card.IsCode,nil,tc:GetCode()) - Duel.SpecialSummonStep(tc,0,tp,tp,true,true,POS_FACEUP) - tc:CompleteProcedure() - ct=ct-1 - end - Duel.SpecialSummonComplete() -end diff --git a/script/c89399912.lua b/script/c89399912.lua deleted file mode 100644 index 88318f5ae3..0000000000 --- a/script/c89399912.lua +++ /dev/null @@ -1,123 +0,0 @@ ---嵐征竜-テンペスト -function c89399912.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(89399912,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND+LOCATION_GRAVE) - e1:SetCountLimit(1,89399912) - e1:SetCost(c89399912.hspcost) - e1:SetTarget(c89399912.hsptg) - e1:SetOperation(c89399912.hspop) - c:RegisterEffect(e1) - --return - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(89399912,1)) - e2:SetCategory(CATEGORY_TOHAND) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EVENT_PHASE+PHASE_END) - e2:SetCountLimit(1,89399912) - e2:SetCondition(c89399912.retcon) - e2:SetTarget(c89399912.rettg) - e2:SetOperation(c89399912.retop) - c:RegisterEffect(e2) - --search - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(89399912,2)) - e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_HAND) - e3:SetCountLimit(1,89399912) - e3:SetCost(c89399912.shcost) - e3:SetTarget(c89399912.shtg) - e3:SetOperation(c89399912.shop) - c:RegisterEffect(e3) - --search - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(89399912,3)) - e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e4:SetCode(EVENT_REMOVE) - e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e4:SetCountLimit(1,89399912) - e4:SetTarget(c89399912.thtg) - e4:SetOperation(c89399912.thop) - c:RegisterEffect(e4) -end -function c89399912.rfilter(c) - return (c:IsRace(RACE_DRAGON) or c:IsAttribute(ATTRIBUTE_WIND)) and c:IsAbleToRemoveAsCost() -end -function c89399912.hspcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c89399912.rfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,2,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c89399912.rfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,2,2,e:GetHandler()) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c89399912.hsptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c89399912.hspop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) - end -end -function c89399912.retcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp - and bit.band(e:GetHandler():GetSummonType(),SUMMON_TYPE_SPECIAL)==SUMMON_TYPE_SPECIAL -end -function c89399912.rettg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,e:GetHandler(),1,0,0) -end -function c89399912.retop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - Duel.SendtoHand(c,nil,REASON_EFFECT) - end -end -function c89399912.dfilter(c) - return c:IsAttribute(ATTRIBUTE_WIND) and c:IsDiscardable() and c:IsAbleToGraveAsCost() -end -function c89399912.shcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsDiscardable() and e:GetHandler():IsAbleToGraveAsCost() - and Duel.IsExistingMatchingCard(c89399912.dfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) - local g=Duel.SelectMatchingCard(tp,c89399912.dfilter,tp,LOCATION_HAND,0,1,1,e:GetHandler()) - g:AddCard(e:GetHandler()) - Duel.SendtoGrave(g,REASON_COST+REASON_DISCARD) -end -function c89399912.shfilter(c) - return c:IsRace(RACE_DRAGON) and c:IsAbleToHand() -end -function c89399912.shtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c89399912.shfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c89399912.shop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c89399912.shfilter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end -function c89399912.thfilter(c) - return c:IsRace(RACE_DRAGON) and c:IsAttribute(ATTRIBUTE_WIND) and c:IsAbleToHand() -end -function c89399912.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c89399912.thfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c89399912.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c89399912.thfilter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c89405199.lua b/script/c89405199.lua deleted file mode 100644 index 6f0e37278e..0000000000 --- a/script/c89405199.lua +++ /dev/null @@ -1,66 +0,0 @@ ---グリード -function c89405199.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --reg - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetRange(LOCATION_SZONE) - e2:SetCode(EVENT_DRAW) - e2:SetCondition(c89405199.drcon) - e2:SetOperation(c89405199.drop) - c:RegisterEffect(e2) - --damage - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(89405199,0)) - e3:SetCategory(CATEGORY_DAMAGE) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e3:SetRange(LOCATION_SZONE) - e3:SetCode(EVENT_PHASE+PHASE_END) - e3:SetCountLimit(1) - e3:SetCondition(c89405199.damcon) - e3:SetTarget(c89405199.damtg) - e3:SetOperation(c89405199.damop) - c:RegisterEffect(e3) -end -function c89405199.drcon(e,tp,eg,ep,ev,re,r,rp) - return bit.band(r,REASON_EFFECT)~=0 -end -function c89405199.drop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local flag=(ep==0 and 89405199 or 89405200) - local ct=c:GetFlagEffectLabel(flag) - if ct then - c:SetFlagEffectLabel(flag,ct+ev) - else - c:RegisterFlagEffect(flag,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1,ev) - end -end -function c89405199.damcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:GetFlagEffect(89405199)>0 or c:GetFlagEffect(89405200)>0 -end -function c89405199.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local c=e:GetHandler() - local ct1=c:GetFlagEffectLabel(89405199) - local ct2=c:GetFlagEffectLabel(89405200) - if ct1 and ct2 then - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,PLAYER_ALL,0) - elseif ct1 then - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,0,ct1*500) - elseif ct2 then - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1,ct2*500) - end -end -function c89405199.damop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) then return end - local ct1=c:GetFlagEffectLabel(89405199+tp) - local ct2=c:GetFlagEffectLabel(89405199+1-tp) - if ct1 then Duel.Damage(tp,ct1*500,REASON_EFFECT) end - if ct2 then Duel.Damage(1-tp,ct2*500,REASON_EFFECT) end -end diff --git a/script/c89423971.lua b/script/c89423971.lua deleted file mode 100644 index 507be33774..0000000000 --- a/script/c89423971.lua +++ /dev/null @@ -1,133 +0,0 @@ ---インフェルノイド・アスタロス -function c89423971.initial_effect(c) - c:EnableReviveLimit() - --special summon condition - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_SPSUMMON_PROC) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e2:SetRange(LOCATION_HAND) - e2:SetCondition(c89423971.spcon) - e2:SetOperation(c89423971.spop) - c:RegisterEffect(e2) - --destroy - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(89423971,0)) - e3:SetCategory(CATEGORY_DESTROY) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_MZONE) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetCountLimit(1) - e3:SetCost(c89423971.descost) - e3:SetTarget(c89423971.destg) - e3:SetOperation(c89423971.desop) - c:RegisterEffect(e3) - --remove - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(89423971,1)) - e4:SetCategory(CATEGORY_REMOVE) - e4:SetType(EFFECT_TYPE_QUICK_O) - e4:SetCode(EVENT_FREE_CHAIN) - e4:SetRange(LOCATION_MZONE) - e4:SetProperty(EFFECT_FLAG_CARD_TARGET) - e4:SetCountLimit(1) - e4:SetCondition(c89423971.rmcon) - e4:SetCost(c89423971.rmcost) - e4:SetTarget(c89423971.rmtg) - e4:SetOperation(c89423971.rmop) - c:RegisterEffect(e4) -end -function c89423971.spfilter(c) - return c:IsSetCard(0xbb) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost() -end -function c89423971.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - local sum=0 - for i=0,4 do - local tc=Duel.GetFieldCard(tp,LOCATION_MZONE,i) - if tc and tc:IsFaceup() and tc:IsType(TYPE_EFFECT) then - if tc:IsType(TYPE_XYZ) then sum=sum+tc:GetRank() - else sum=sum+tc:GetLevel() end - end - end - if sum>8 then return false end - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ft<0 then return false end - if c:IsHasEffect(34822850) then - if ft>0 then - return Duel.IsExistingMatchingCard(c89423971.spfilter,tp,LOCATION_MZONE+LOCATION_GRAVE+LOCATION_HAND,0,1,c) - else - return Duel.IsExistingMatchingCard(c89423971.spfilter,tp,LOCATION_MZONE,0,1,nil) - end - else - return ft>0 and Duel.IsExistingMatchingCard(c89423971.spfilter,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,c) - end -end -function c89423971.spop(e,tp,eg,ep,ev,re,r,rp,c) - local g=nil - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - if c:IsHasEffect(34822850) then - if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then - g=Duel.SelectMatchingCard(tp,c89423971.spfilter,tp,LOCATION_MZONE+LOCATION_GRAVE+LOCATION_HAND,0,1,1,c) - else - g=Duel.SelectMatchingCard(tp,c89423971.spfilter,tp,LOCATION_MZONE,0,1,1,nil) - end - else - g=Duel.SelectMatchingCard(tp,c89423971.spfilter,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,1,c) - end - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c89423971.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable() -end -function c89423971.descost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:GetAttackAnnouncedCount()==0 end - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_OATH) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - c:RegisterEffect(e1) -end -function c89423971.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and c89423971.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c89423971.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c89423971.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c89423971.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end -function c89423971.rmcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp -end -function c89423971.rmcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsReleasable,1,nil) end - local g=Duel.SelectReleaseGroup(tp,Card.IsReleasable,1,1,nil) - Duel.Release(g,REASON_COST) -end -function c89423971.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(1-tp) and chkc:IsAbleToRemove() end - if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) -end -function c89423971.rmop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) - end -end diff --git a/script/c89463537.lua b/script/c89463537.lua deleted file mode 100644 index c93cb148fb..0000000000 --- a/script/c89463537.lua +++ /dev/null @@ -1,55 +0,0 @@ ---ユニコールの影霊衣 -function c89463537.initial_effect(c) - c:EnableReviveLimit() - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(aux.ritlimit) - c:RegisterEffect(e1) - --tohand - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(89463537,0)) - e2:SetCategory(CATEGORY_TOHAND) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetRange(LOCATION_HAND) - e2:SetCountLimit(1,89463537) - e2:SetCost(c89463537.cost) - e2:SetTarget(c89463537.target) - e2:SetOperation(c89463537.operation) - c:RegisterEffect(e2) - --disable - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetCode(EFFECT_DISABLE) - e3:SetRange(LOCATION_MZONE) - e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e3:SetTarget(c89463537.distg) - c:RegisterEffect(e3) -end -function c89463537.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsDiscardable() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD) -end -function c89463537.filter(c) - return c:IsSetCard(0xb4) and not c:IsCode(89463537) and c:IsAbleToHand() -end -function c89463537.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c89463537.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c89463537.filter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c89463537.filter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c89463537.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end -function c89463537.distg(e,c) - return c:GetSummonLocation()==LOCATION_EXTRA -end diff --git a/script/c89474727.lua b/script/c89474727.lua deleted file mode 100644 index 380295ba3f..0000000000 --- a/script/c89474727.lua +++ /dev/null @@ -1,77 +0,0 @@ ---真閃珖竜 スターダスト・クロニクル -function c89474727.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsType,TYPE_SYNCHRO),aux.NonTuner(Card.IsType,TYPE_SYNCHRO),1) - c:EnableReviveLimit() - --special summon condition - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetValue(aux.synlimit) - c:RegisterEffect(e1) - --immune - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(89474727,0)) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCost(c89474727.immcost) - e2:SetOperation(c89474727.immop) - c:RegisterEffect(e2) - --spsummon - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(89474727,1)) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_DESTROYED) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e3:SetCondition(c89474727.spcon) - e3:SetTarget(c89474727.sptg) - e3:SetOperation(c89474727.spop) - c:RegisterEffect(e3) -end -function c89474727.cfilter(c) - return c:IsType(TYPE_SYNCHRO) and c:IsAbleToRemoveAsCost() -end -function c89474727.immcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c89474727.cfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c89474727.cfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c89474727.immop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_IMMUNE_EFFECT) - e1:SetValue(c89474727.efilter) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - c:RegisterEffect(e1) - end -end -function c89474727.efilter(e,re) - return re:GetOwner()~=e:GetOwner() -end -function c89474727.spcon(e,tp,eg,ep,ev,re,r,rp) - return rp~=tp and e:GetHandler():GetPreviousControler()==tp -end -function c89474727.spfilter(c,e,tp) - return c:IsType(TYPE_SYNCHRO) and c:IsRace(RACE_DRAGON) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c89474727.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and c89474727.spfilter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c89474727.spfilter,tp,LOCATION_REMOVED,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c89474727.spfilter,tp,LOCATION_REMOVED,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c89474727.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c89493368.lua b/script/c89493368.lua deleted file mode 100644 index 584af6abc7..0000000000 --- a/script/c89493368.lua +++ /dev/null @@ -1,102 +0,0 @@ ---サモン・リアクター・AI -function c89493368.initial_effect(c) - --damage - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(89493368,0)) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE) - e1:SetCondition(c89493368.damcon) - e1:SetTarget(c89493368.damtg) - e1:SetOperation(c89493368.damop) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e2) - local e3=e1:Clone() - e3:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - c:RegisterEffect(e3) - --negate attack - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(89493368,1)) - e4:SetProperty(EFFECT_FLAG_CARD_TARGET) - e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e4:SetRange(LOCATION_MZONE) - e4:SetCountLimit(1) - e4:SetCode(EVENT_ATTACK_ANNOUNCE) - e4:SetCondition(c89493368.nacon) - e4:SetTarget(c89493368.natg) - e4:SetOperation(c89493368.naop) - c:RegisterEffect(e4) - --spsummon - local e5=Effect.CreateEffect(c) - e5:SetDescription(aux.Stringid(89493368,2)) - e5:SetCategory(CATEGORY_SPECIAL_SUMMON) - e5:SetType(EFFECT_TYPE_IGNITION) - e5:SetRange(LOCATION_MZONE) - e5:SetCost(c89493368.spcost) - e5:SetTarget(c89493368.sptg) - e5:SetOperation(c89493368.spop) - c:RegisterEffect(e5) -end -function c89493368.damcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(Card.IsControler,1,nil,1-tp) -end -function c89493368.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsRelateToEffect(e) end - e:GetHandler():RegisterFlagEffect(89493368,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,800) -end -function c89493368.damop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - Duel.Damage(1-tp,800,REASON_EFFECT) - end -end -function c89493368.nacon(e,tp,eg,ep,ev,re,r,rp) - return eg:GetFirst():IsControler(1-tp) and e:GetHandler():GetFlagEffect(89493368)~=0 -end -function c89493368.natg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local tg=Duel.GetAttacker() - if chkc then return chkc==tg end - if chk==0 then return tg:IsOnField() and tg:IsCanBeEffectTarget(e) end - Duel.SetTargetCard(tg) -end -function c89493368.naop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetAttacker() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.NegateAttack() - end -end -function c89493368.spcfilter(c,code) - return c:IsCode(code) and c:IsAbleToGraveAsCost() -end -function c89493368.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-3 and e:GetHandler():IsAbleToGraveAsCost() - and Duel.IsExistingMatchingCard(c89493368.spcfilter,tp,LOCATION_ONFIELD,0,1,nil,15175429) - and Duel.IsExistingMatchingCard(c89493368.spcfilter,tp,LOCATION_ONFIELD,0,1,nil,52286175) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g1=Duel.SelectMatchingCard(tp,c89493368.spcfilter,tp,LOCATION_ONFIELD,0,1,1,nil,15175429) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g2=Duel.SelectMatchingCard(tp,c89493368.spcfilter,tp,LOCATION_ONFIELD,0,1,1,nil,52286175) - g1:Merge(g2) - g1:AddCard(e:GetHandler()) - Duel.SendtoGrave(g1,REASON_COST) -end -function c89493368.spfilter(c,e,tp) - return c:IsCode(16898077) and c:IsCanBeSpecialSummoned(e,0,tp,true,true) and not c:IsHasEffect(EFFECT_NECRO_VALLEY) -end -function c89493368.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c89493368.spfilter,tp,0x13,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,0,tp,0x13) -end -function c89493368.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c89493368.spfilter,tp,0x13,0,1,1,nil,e,tp) - if g:GetCount()~=0 then - Duel.SpecialSummon(g,0,tp,tp,true,true,POS_FACEUP) - g:GetFirst():CompleteProcedure() - end -end diff --git a/script/c8949584.lua b/script/c8949584.lua deleted file mode 100644 index 00842a08db..0000000000 --- a/script/c8949584.lua +++ /dev/null @@ -1,36 +0,0 @@ ---ヒーローアライブ -function c8949584.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c8949584.condition) - e1:SetCost(c8949584.cost) - e1:SetTarget(c8949584.target) - e1:SetOperation(c8949584.activate) - c:RegisterEffect(e1) -end -function c8949584.condition(e,tp,eg,ep,ev,re,r,rp) - return not Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) -end -function c8949584.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.PayLPCost(tp,math.floor(Duel.GetLP(tp)/2)) -end -function c8949584.filter(c,e,tp) - return c:IsSetCard(0x3008) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c8949584.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c8949584.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c8949584.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c8949584.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c8951260.lua b/script/c8951260.lua deleted file mode 100644 index ed2bf591ab..0000000000 --- a/script/c8951260.lua +++ /dev/null @@ -1,29 +0,0 @@ ---正々堂々 -function c8951260.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - -- - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_PUBLIC) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(LOCATION_HAND,0) - e2:SetCondition(c8951260.con1) - c:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetCode(EFFECT_PUBLIC) - e3:SetRange(LOCATION_SZONE) - e3:SetTargetRange(0,LOCATION_HAND) - e3:SetCondition(c8951260.con2) - c:RegisterEffect(e3) -end -function c8951260.con1(e) - return Duel.GetTurnPlayer()==e:GetHandlerPlayer() -end -function c8951260.con2(e) - return Duel.GetTurnPlayer()~=e:GetHandlerPlayer() -end diff --git a/script/c89516305.lua b/script/c89516305.lua deleted file mode 100644 index 98c37f29a1..0000000000 --- a/script/c89516305.lua +++ /dev/null @@ -1,112 +0,0 @@ ---No.87 雪月花美神クイーン・オブ・ナイツ -function c89516305.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,8,3) - c:EnableReviveLimit() - --s/t - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(89516305,0)) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE) - e1:SetCost(c89516305.cost) - e1:SetTarget(c89516305.sttg) - e1:SetOperation(c89516305.stop) - c:RegisterEffect(e1) - --turn set - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(89516305,1)) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE) - e2:SetCost(c89516305.cost) - e2:SetTarget(c89516305.settg) - e2:SetOperation(c89516305.setop) - c:RegisterEffect(e2) - --atkup - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(89516305,2)) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e3:SetType(EFFECT_TYPE_QUICK_O) - e3:SetCode(EVENT_FREE_CHAIN) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE) - e3:SetHintTiming(TIMING_DAMAGE_STEP) - e3:SetCondition(c89516305.atkcon) - e3:SetCost(c89516305.cost) - e3:SetTarget(c89516305.atktg) - e3:SetOperation(c89516305.atkop) - c:RegisterEffect(e3) -end -c89516305.xyz_number=87 -function c89516305.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c89516305.sttg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_SZONE) and chkc:IsFacedown() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFacedown,tp,0,LOCATION_SZONE,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEDOWN) - Duel.SelectTarget(tp,Card.IsFacedown,tp,0,LOCATION_SZONE,1,1,e:GetHandler()) -end -function c89516305.stop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsFacedown() and tc:IsRelateToEffect(e) then - c:SetCardTarget(tc) - e:SetLabelObject(tc) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_OWNER_RELATE) - e1:SetCode(EFFECT_CANNOT_TRIGGER) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetCondition(c89516305.rcon) - e1:SetValue(1) - tc:RegisterEffect(e1) - end -end -function c89516305.rcon(e) - return e:GetOwner():IsHasCardTarget(e:GetHandler()) -end -function c89516305.setfilter(c) - return c:IsFaceup() and c:IsRace(RACE_PLANT) and c:IsCanTurnSet() -end -function c89516305.settg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c89516305.setfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c89516305.setfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE) - local g=Duel.SelectTarget(tp,c89516305.setfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0) -end -function c89516305.setop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - Duel.ChangePosition(tc,POS_FACEDOWN_DEFENCE) - end -end -function c89516305.atkcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end -function c89516305.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) -end -function c89516305.atkop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetValue(300) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - end -end diff --git a/script/c89521713.lua b/script/c89521713.lua deleted file mode 100644 index 39c17e6b6b..0000000000 --- a/script/c89521713.lua +++ /dev/null @@ -1,66 +0,0 @@ ---マドルチェ・クロワンサン -function c89521713.initial_effect(c) - --to deck - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(89521713,0)) - e1:SetCategory(CATEGORY_TODECK) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCondition(c89521713.retcon) - e1:SetTarget(c89521713.rettg) - e1:SetOperation(c89521713.retop) - c:RegisterEffect(e1) - --tohand - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(89521713,1)) - e2:SetCategory(CATEGORY_TOHAND) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetTarget(c89521713.thtg) - e2:SetOperation(c89521713.thop) - c:RegisterEffect(e2) -end -function c89521713.retcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsReason(REASON_DESTROY) and e:GetHandler():GetReasonPlayer()~=tp - and e:GetHandler():GetPreviousControler()==tp -end -function c89521713.rettg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0) -end -function c89521713.retop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_EFFECT) - end -end -function c89521713.filter(c) - return c:IsFaceup() and c:IsSetCard(0x71) and c:IsAbleToHand() -end -function c89521713.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsControler(tp) and c89521713.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c89521713.filter,tp,LOCATION_ONFIELD,0,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g=Duel.SelectTarget(tp,c89521713.filter,tp,LOCATION_ONFIELD,0,1,1,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c89521713.thop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() and Duel.SendtoHand(tc,nil,REASON_EFFECT)>0 and tc:IsLocation(LOCATION_HAND) then - if c:IsRelateToEffect(e) and c:IsFaceup() then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_COPY_INHERIT) - e1:SetCode(EFFECT_UPDATE_LEVEL) - e1:SetValue(1) - e1:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(300) - c:RegisterEffect(e2) - end - end -end diff --git a/script/c89529919.lua b/script/c89529919.lua deleted file mode 100644 index 9a40aa9d67..0000000000 --- a/script/c89529919.lua +++ /dev/null @@ -1,26 +0,0 @@ ---戦士ラーズ -function c89529919.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(89529919,0)) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetOperation(c89529919.operation) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e2) -end -function c89529919.filter(c) - return c:IsLevelBelow(4) and c:IsRace(RACE_WARRIOR) and c:GetCode()~=89529919 -end -function c89529919.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(89529919,1)) - local g=Duel.SelectMatchingCard(tp,c89529919.filter,tp,LOCATION_DECK,0,1,1,nil) - local tc=g:GetFirst() - if tc then - Duel.ShuffleDeck(tp) - Duel.MoveSequence(tc,0) - Duel.ConfirmDecktop(tp,1) - end -end diff --git a/script/c89544521.lua b/script/c89544521.lua deleted file mode 100644 index 8d600faadb..0000000000 --- a/script/c89544521.lua +++ /dev/null @@ -1,101 +0,0 @@ ---ブンボーグ・ジェット -function c89544521.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1) - c:EnableReviveLimit() - --atk/def - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(c89544521.val) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_UPDATE_DEFENCE) - c:RegisterEffect(e2) - --spsummon - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(89544521,0)) - e3:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_MZONE) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetCountLimit(1,89544521) - e3:SetTarget(c89544521.sptg) - e3:SetOperation(c89544521.spop) - c:RegisterEffect(e3) - --destroy - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(89544521,1)) - e4:SetCategory(CATEGORY_DESTROY) - e4:SetType(EFFECT_TYPE_IGNITION) - e4:SetRange(LOCATION_MZONE) - e4:SetProperty(EFFECT_FLAG_CARD_TARGET) - e4:SetCountLimit(1,89544521) - e4:SetTarget(c89544521.destg) - e4:SetOperation(c89544521.desop) - c:RegisterEffect(e4) -end -function c89544521.filter(c) - return c:IsFaceup() and c:IsSetCard(0xab) -end -function c89544521.val(e,c) - return Duel.GetMatchingGroupCount(c89544521.filter,c:GetControler(),LOCATION_ONFIELD,0,nil)*500 -end -function c89544521.desfilter1(c) - return c:IsFaceup() and c:IsSetCard(0xab) and c:IsDestructable() -end -function c89544521.spfilter(c,e,tp) - return c:IsSetCard(0xab) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c89544521.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(e:GetLabel()) and chkc:IsControler(tp) and c89544521.desfilter1(chkc) end - if chk==0 then - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ft<-1 then return false end - local loc=LOCATION_ONFIELD - if ft==0 then loc=LOCATION_MZONE end - e:SetLabel(loc) - return Duel.IsExistingTarget(c89544521.desfilter1,tp,loc,0,1,nil) - and Duel.IsExistingMatchingCard(c89544521.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) - end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c89544521.desfilter1,tp,e:GetLabel(),0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c89544521.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)~=0 then - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c89544521.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end - end -end -function c89544521.desfilter2(c) - return c:IsFaceup() and c:IsSetCard(0xab) and c:IsDestructable() - and Duel.IsExistingTarget(c89544521.desfilter3,0,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c) -end -function c89544521.desfilter3(c) - return c:IsFaceup() and c:IsDestructable() -end -function c89544521.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - if chk==0 then return Duel.IsExistingTarget(c89544521.desfilter2,tp,LOCATION_ONFIELD,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g1=Duel.SelectTarget(tp,c89544521.desfilter2,tp,LOCATION_ONFIELD,0,1,1,nil) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g2=Duel.SelectTarget(tp,c89544521.desfilter3,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,g1:GetFirst()) - g1:Merge(g2) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g1,2,0,0) -end -function c89544521.desop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) - if g:GetCount()>0 then - Duel.Destroy(g,REASON_EFFECT) - end -end diff --git a/script/c89547299.lua b/script/c89547299.lua deleted file mode 100644 index a3b137fbce..0000000000 --- a/script/c89547299.lua +++ /dev/null @@ -1,38 +0,0 @@ ---パワー・インジェクター -function c89547299.initial_effect(c) - --atkup - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(89547299,0)) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCost(c89547299.atkcost) - e1:SetTarget(c89547299.atktg) - e1:SetOperation(c89547299.atkop) - c:RegisterEffect(e1) -end -function c89547299.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,600) end - Duel.PayLPCost(tp,600) -end -function c89547299.filter(c) - return c:IsFaceup() and c:IsRace(RACE_PSYCHO) -end -function c89547299.atktg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c89547299.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end -end -function c89547299.atkop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c89547299.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - local tc=g:GetFirst() - while tc do - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(500) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - tc=g:GetNext() - end -end diff --git a/script/c89563150.lua b/script/c89563150.lua deleted file mode 100644 index fafa4793af..0000000000 --- a/script/c89563150.lua +++ /dev/null @@ -1,34 +0,0 @@ ---白銀のバリア-シルバーフォース- -function c89563150.initial_effect(c) - --Negate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_CHAINING) - e1:SetCondition(c89563150.discon) - e1:SetTarget(c89563150.distg) - e1:SetOperation(c89563150.disop) - c:RegisterEffect(e1) -end -function c89563150.discon(e,tp,eg,ep,ev,re,r,rp) - if ep==tp or not re:IsHasType(EFFECT_TYPE_ACTIVATE) or not re:IsActiveType(TYPE_TRAP) or not Duel.IsChainNegatable(ev) then return false end - local ex,cg,ct,cp,cv=Duel.GetOperationInfo(ev,CATEGORY_DAMAGE) - if ex then return true end - ex,cg,ct,cp,cv=Duel.GetOperationInfo(ev,CATEGORY_RECOVER) - return ex and ((cp~=PLAYER_ALL and Duel.IsPlayerAffectedByEffect(cp,EFFECT_REVERSE_RECOVER)) or - (cp==PLAYER_ALL and (Duel.IsPlayerAffectedByEffect(0,EFFECT_REVERSE_RECOVER) or Duel.IsPlayerAffectedByEffect(1,EFFECT_REVERSE_RECOVER)))) -end -function c89563150.dfilter(c) - return c:IsFaceup() and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable() -end -function c89563150.distg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - local g=Duel.GetMatchingGroup(c89563150.dfilter,tp,0,LOCATION_ONFIELD,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c89563150.disop(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateActivation(ev) - local g=Duel.GetMatchingGroup(c89563150.dfilter,tp,0,LOCATION_ONFIELD,nil) - Duel.Destroy(g,REASON_EFFECT) -end diff --git a/script/c89567993.lua b/script/c89567993.lua deleted file mode 100644 index 41a906d449..0000000000 --- a/script/c89567993.lua +++ /dev/null @@ -1,34 +0,0 @@ ---アマゾネス訓練生 -function c89567993.initial_effect(c) - --to deck - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_BATTLE_DESTROY_REDIRECT) - e1:SetValue(LOCATION_DECKBOT) - c:RegisterEffect(e1) - --atkup - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(89567993,0)) - e2:SetCategory(CATEGORY_ATKCHANGE) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_BATTLE_DESTROYING) - e2:SetCondition(c89567993.atkcon) - e2:SetOperation(c89567993.atkop) - c:RegisterEffect(e2) -end -function c89567993.atkcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsFaceup() and e:GetHandler():IsRelateToBattle() -end -function c89567993.atkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFaceup() and c:IsRelateToBattle() then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(200) - e1:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e1) - end -end diff --git a/script/c89609515.lua b/script/c89609515.lua deleted file mode 100644 index b40bdc1763..0000000000 --- a/script/c89609515.lua +++ /dev/null @@ -1,27 +0,0 @@ ---ラヴァル・フロギス -function c89609515.initial_effect(c) - --to grave - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(89609515,0)) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetOperation(c89609515.operation) - c:RegisterEffect(e1) -end -function c89609515.filter(c) - return c:IsFaceup() and c:IsSetCard(0x39) -end -function c89609515.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c89609515.filter,tp,LOCATION_MZONE,0,nil) - local tc=g:GetFirst() - while tc do - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(300) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - tc=g:GetNext() - end -end diff --git a/script/c89621922.lua b/script/c89621922.lua deleted file mode 100644 index 16f4349776..0000000000 --- a/script/c89621922.lua +++ /dev/null @@ -1,15 +0,0 @@ ---N・フレア・スカラベ -function c89621922.initial_effect(c) - --atk up - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(89621922,0)) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(c89621922.val) - c:RegisterEffect(e1) -end -function c89621922.val(e,c) - return Duel.GetMatchingGroupCount(Card.IsType,c:GetControler(),0,LOCATION_ONFIELD,nil,TYPE_SPELL+TYPE_TRAP)*400 -end diff --git a/script/c89628781.lua b/script/c89628781.lua deleted file mode 100644 index 8f54aef57b..0000000000 --- a/script/c89628781.lua +++ /dev/null @@ -1,39 +0,0 @@ ---忍法 空蝉の術 -function c89628781.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c89628781.target) - e1:SetOperation(c89628781.operation) - c:RegisterEffect(e1) -end -function c89628781.filter(c) - return c:IsFaceup() and c:IsSetCard(0x2b) -end -function c89628781.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c89628781.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c89628781.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - local g=Duel.SelectTarget(tp,c89628781.filter,tp,LOCATION_MZONE,0,1,1,nil) -end -function c89628781.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsRelateToEffect(e) then - c:SetCardTarget(tc) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetRange(LOCATION_SZONE) - e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetTarget(c89628781.indtg) - e1:SetValue(1) - c:RegisterEffect(e1) - end -end -function c89628781.indtg(e,c) - return e:GetHandler():GetFirstCardTarget()==c -end \ No newline at end of file diff --git a/script/c89642993.lua b/script/c89642993.lua deleted file mode 100644 index 12c634a45b..0000000000 --- a/script/c89642993.lua +++ /dev/null @@ -1,49 +0,0 @@ ---No.63 おしゃもじソルジャー -function c89642993.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,1,2) - c:EnableReviveLimit() - -- - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(89642993,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1,89642993) - e1:SetCost(c89642993.efcost) - e1:SetTarget(c89642993.eftg) - e1:SetOperation(c89642993.efop) - c:RegisterEffect(e1) -end -c89642993.xyz_number=63 -function c89642993.efcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c89642993.eftg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local op=Duel.SelectOption(tp,aux.Stringid(89642993,1),aux.Stringid(89642993,2)) - e:SetLabel(op) -end -function c89642993.efop(e,tp,eg,ep,ev,re,r,rp) - if e:GetLabel()==0 then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE_START+PHASE_STANDBY) - e1:SetCountLimit(1) - e1:SetCondition(c89642993.drcon) - e1:SetOperation(c89642993.drop) - e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN) - Duel.RegisterEffect(e1,tp) - else - Duel.Recover(tp,1000,REASON_EFFECT) - Duel.Recover(1-tp,1000,REASON_EFFECT) - end -end -function c89642993.drcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp -end -function c89642993.drop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_CARD,0,89642993) - Duel.Draw(tp,1,REASON_EFFECT) - Duel.Draw(1-tp,1,REASON_EFFECT) -end diff --git a/script/c8964854.lua b/script/c8964854.lua deleted file mode 100644 index 1c041ef5be..0000000000 --- a/script/c8964854.lua +++ /dev/null @@ -1,44 +0,0 @@ ---コンビネーション・アタック -function c8964854.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCondition(c8964854.condition) - e1:SetTarget(c8964854.target) - e1:SetOperation(c8964854.operation) - c:RegisterEffect(e1) -end -function c8964854.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()==PHASE_BATTLE -end -function c8964854.filter(c,e,tp) - return c:GetAttackAnnouncedCount()>0 and Duel.IsExistingMatchingCard(c8964854.eqfilter,tp,LOCATION_SZONE,0,1,nil,e,tp,c) -end -function c8964854.eqfilter(c,e,tp,ec) - return c:IsStatus(STATUS_UNION) and c:GetEquipTarget()==ec and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c8964854.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c8964854.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c8964854.filter,tp,LOCATION_MZONE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - Duel.SelectTarget(tp,c8964854.filter,tp,LOCATION_MZONE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_SZONE) -end -function c8964854.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then - local g=Duel.GetMatchingGroup(c8964854.eqfilter,tp,LOCATION_SZONE,0,nil,e,tp,tc) - if Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)>0 then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_EXTRA_ATTACK) - e1:SetValue(tc:GetAttackAnnouncedCount()) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - end - end -end diff --git a/script/c89662736.lua b/script/c89662736.lua deleted file mode 100644 index fdc6b75477..0000000000 --- a/script/c89662736.lua +++ /dev/null @@ -1,35 +0,0 @@ ---武神器-ヤタ -function c89662736.initial_effect(c) - --negate attack - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(89662736,0)) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_BE_BATTLE_TARGET) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(1,89662736) - e1:SetCondition(c89662736.nacon) - e1:SetCost(c89662736.nacost) - e1:SetTarget(c89662736.natg) - e1:SetOperation(c89662736.naop) - c:RegisterEffect(e1) -end -function c89662736.nacon(e,tp,eg,ep,ev,re,r,rp) - local at=Duel.GetAttackTarget() - return at:IsControler(tp) and at:IsFaceup() and at:IsSetCard(0x88) and at:IsRace(RACE_BEASTWARRIOR) -end -function c89662736.nacost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end -function c89662736.natg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetAttacker():IsOnField() end - local dam=Duel.GetAttacker():GetAttack()/2 - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,dam) -end -function c89662736.naop(e,tp,eg,ep,ev,re,r,rp) - local a=Duel.GetAttacker() - if Duel.NegateAttack() then - Duel.Damage(1-tp,a:GetAttack()/2,REASON_EFFECT) - end -end diff --git a/script/c8967776.lua b/script/c8967776.lua deleted file mode 100644 index ff942697e7..0000000000 --- a/script/c8967776.lua +++ /dev/null @@ -1,68 +0,0 @@ ---究極時械神セフィロン -function c8967776.initial_effect(c) - c:EnableReviveLimit() - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(aux.FALSE) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_SPSUMMON_PROC) - e2:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e2:SetRange(LOCATION_HAND) - e2:SetCondition(c8967776.spcon) - c:RegisterEffect(e2) - --spsummon - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(8967776,0)) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetCountLimit(1) - e3:SetRange(LOCATION_MZONE) - e3:SetTarget(c8967776.sptg) - e3:SetOperation(c8967776.spop) - c:RegisterEffect(e3) -end -function c8967776.spcon(e,c) - if c==nil then return true end - return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and - Duel.IsExistingMatchingCard(Card.IsType,c:GetControler(),LOCATION_GRAVE,0,10,nil,TYPE_MONSTER) -end -function c8967776.filter(c,e,tp) - return c:IsRace(RACE_FAIRY) and c:GetLevel()>=8 - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsHasEffect(EFFECT_NECRO_VALLEY) -end -function c8967776.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c8967776.filter,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_HAND) -end -function c8967776.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c8967776.filter,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,1,nil,e,tp) - local c=e:GetHandler() - local tc=g:GetFirst() - if not tc then return end - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0xfe0000) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+0xfe0000) - tc:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_SET_ATTACK) - e3:SetValue(4000) - e3:SetReset(RESET_EVENT+0xfe0000) - tc:RegisterEffect(e3) - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) -end diff --git a/script/c89698120.lua b/script/c89698120.lua deleted file mode 100644 index 0f2895ca00..0000000000 --- a/script/c89698120.lua +++ /dev/null @@ -1,15 +0,0 @@ ---華麗なる潜入工作員 -function c89698120.initial_effect(c) - --summon success - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetOperation(c89698120.sumsuc) - c:RegisterEffect(e1) -end -function c89698120.sumsuc(e,tp,eg,ep,ev,re,r,rp) - Duel.SetChainLimitTillChainEnd(c89698120.chlimit) -end -function c89698120.chlimit(re,rp,tp) - return not re:GetHandler():IsType(TYPE_TRAP) or not re:IsHasType(EFFECT_TYPE_ACTIVATE) -end diff --git a/script/c89718302.lua b/script/c89718302.lua deleted file mode 100644 index f637c5aec7..0000000000 --- a/script/c89718302.lua +++ /dev/null @@ -1,27 +0,0 @@ ---暴れ牛鬼 -function c89718302.initial_effect(c) - --coin - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(89718302,0)) - e1:SetCategory(CATEGORY_COIN+CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetTarget(c89718302.damtg) - e1:SetOperation(c89718302.damop) - c:RegisterEffect(e1) -end -function c89718302.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_COIN,nil,0,tp,1) -end -function c89718302.damop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_COIN) - local coin=Duel.SelectOption(tp,60,61) - local res=Duel.TossCoin(tp,1) - if coin~=res then - Duel.Damage(1-tp,1000,REASON_EFFECT) - else - Duel.Damage(tp,1000,REASON_EFFECT) - end -end diff --git a/script/c89719143.lua b/script/c89719143.lua deleted file mode 100644 index 97af8e563a..0000000000 --- a/script/c89719143.lua +++ /dev/null @@ -1,39 +0,0 @@ ---決戦融合-ファイナル・フュージョン -function c89719143.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_BATTLE_PHASE) - e1:SetCondition(c89719143.condition) - e1:SetTarget(c89719143.target) - e1:SetOperation(c89719143.activate) - c:RegisterEffect(e1) -end -function c89719143.condition(e,tp,eg,ep,ev,re,r,rp) - local a=Duel.GetAttacker() - local at=Duel.GetAttackTarget() - return a and at and a:IsFaceup() and a:IsType(TYPE_FUSION) and at:IsFaceup() and at:IsType(TYPE_FUSION) -end -function c89719143.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local a=Duel.GetAttacker() - local at=Duel.GetAttackTarget() - if chkc then return chkc==a or chkc==at end - if chk==0 then return a:IsOnField() and a:IsCanBeEffectTarget(e) and at:IsOnField() and at:IsCanBeEffectTarget(e) end - Duel.SetTargetCard(a) - Duel.SetTargetCard(at) - local dam=a:GetAttack()+at:GetAttack() - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,PLAYER_ALL,dam) -end -function c89719143.activate(e,tp,eg,ep,ev,re,r,rp) - local tc1,tc2=Duel.GetFirstTarget() - local dam=tc1:GetAttack()+tc2:GetAttack() - if Duel.NegateAttack() then - if tc1:IsRelateToEffect(e) and tc1:IsFaceup() and tc2:IsRelateToEffect(e) and tc2:IsFaceup() then - Duel.Damage(1-tp,dam,REASON_EFFECT) - Duel.Damage(tp,dam,REASON_EFFECT) - end - end -end diff --git a/script/c89731911.lua b/script/c89731911.lua deleted file mode 100644 index 6e6857c269..0000000000 --- a/script/c89731911.lua +++ /dev/null @@ -1,40 +0,0 @@ ---ファミリア・ナイト -function c89731911.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(89731911,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetCondition(c89731911.condition) - e1:SetTarget(c89731911.target) - e1:SetOperation(c89731911.operation) - c:RegisterEffect(e1) -end -function c89731911.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) -end -function c89731911.filter(c,e,tp) - return c:GetLevel()==4 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c89731911.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c89731911.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c89731911.filter,tp,LOCATION_HAND,0,1,nil,e,tp) - and Duel.SelectYesNo(tp,aux.Stringid(89731911,1)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g1=Duel.SelectMatchingCard(tp,c89731911.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - Duel.SpecialSummonStep(g1:GetFirst(),0,tp,tp,false,false,POS_FACEUP) - end - if Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c89731911.filter,1-tp,LOCATION_HAND,0,1,nil,e,1-tp) - and Duel.SelectYesNo(1-tp,aux.Stringid(89731911,1)) then - Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_SPSUMMON) - local g2=Duel.SelectMatchingCard(1-tp,c89731911.filter,1-tp,LOCATION_HAND,0,1,1,nil,e,1-tp) - Duel.SpecialSummonStep(g2:GetFirst(),0,1-tp,1-tp,false,false,POS_FACEUP) - end - Duel.SpecialSummonComplete() -end diff --git a/script/c89732524.lua b/script/c89732524.lua deleted file mode 100644 index 6373997215..0000000000 --- a/script/c89732524.lua +++ /dev/null @@ -1,26 +0,0 @@ ---魔界発冥界行きバス -function c89732524.initial_effect(c) - --flip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(89732524,0)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP) - e1:SetTarget(c89732524.target) - e1:SetOperation(c89732524.operation) - c:RegisterEffect(e1) -end -function c89732524.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c89732524.filter(c) - return c:IsRace(RACE_FIEND) and not c:IsAttribute(ATTRIBUTE_DARK+ATTRIBUTE_LIGHT) and c:IsAbleToHand() -end -function c89732524.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c89732524.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c89739383.lua b/script/c89739383.lua deleted file mode 100644 index 0d1f3b0282..0000000000 --- a/script/c89739383.lua +++ /dev/null @@ -1,27 +0,0 @@ ---グリモの魔導書 -function c89739383.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,89739383+EFFECT_COUNT_CODE_OATH) - e1:SetTarget(c89739383.target) - e1:SetOperation(c89739383.activate) - c:RegisterEffect(e1) -end -function c89739383.filter(c) - return c:IsSetCard(0x106e) and c:GetCode()~=89739383 and c:IsAbleToHand() -end -function c89739383.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c89739383.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c89739383.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c89739383.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c89770167.lua b/script/c89770167.lua deleted file mode 100644 index 86100b4787..0000000000 --- a/script/c89770167.lua +++ /dev/null @@ -1,40 +0,0 @@ ---炎熱刀プロミネンス -function c89770167.initial_effect(c) - --atkup - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(89770167,0)) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCondition(c89770167.atcon) - e1:SetCost(c89770167.atcost) - e1:SetOperation(c89770167.atop) - c:RegisterEffect(e1) -end -function c89770167.atcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end -function c89770167.cfilter(c) - return c:IsSetCard(0x39) and c:IsAbleToRemoveAsCost() -end -function c89770167.atcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c89770167.cfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c89770167.cfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c89770167.atop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFaceup() and c:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(300) - e1:SetReset(RESET_EVENT+0x1ff0000+RESET_PHASE+PHASE_END) - c:RegisterEffect(e1) - end -end diff --git a/script/c89774530.lua b/script/c89774530.lua deleted file mode 100644 index 382d7e3cab..0000000000 --- a/script/c89774530.lua +++ /dev/null @@ -1,47 +0,0 @@ ---H・C ダブル・ランス -function c89774530.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(89774530,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c89774530.sptg) - e1:SetOperation(c89774530.spop) - c:RegisterEffect(e1) - --unsynchroable - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e2:SetValue(1) - c:RegisterEffect(e2) - --xyzlimit - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e3:SetValue(c89774530.xyzlimit) - c:RegisterEffect(e3) -end -function c89774530.filter(c,e,tp) - return c:IsCode(89774530) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) - and not c:IsHasEffect(EFFECT_NECRO_VALLEY) -end -function c89774530.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c89774530.filter,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_HAND) -end -function c89774530.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c89774530.filter,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENCE) - end -end -function c89774530.xyzlimit(e,c) - if not c then return false end - return not c:IsRace(RACE_WARRIOR) -end diff --git a/script/c89792713.lua b/script/c89792713.lua deleted file mode 100644 index 9556767985..0000000000 --- a/script/c89792713.lua +++ /dev/null @@ -1,46 +0,0 @@ ---極星宝レーヴァテイン -function c89792713.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c89792713.target) - e1:SetOperation(c89792713.activate) - c:RegisterEffect(e1) - if not c89792713.global_check then - c89792713.global_check=true - local ge=Effect.CreateEffect(c) - ge:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - ge:SetCode(EVENT_BATTLE_DESTROYING) - ge:SetOperation(c89792713.checkop) - Duel.RegisterEffect(ge,0) - end -end -function c89792713.checkop(e,tp,eg,ep,ev,re,r,rp) - local tc=eg:GetFirst() - while tc do - if tc:IsFaceup() and tc:IsRelateToBattle() then - tc:RegisterFlagEffect(89792713,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) - end - tc=eg:GetNext() - end -end -function c89792713.filter(c) - return c:IsFaceup() and c:GetFlagEffect(89792713)~=0 and c:IsDestructable() -end -function c89792713.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c89792713.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c89792713.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c89792713.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) - Duel.SetChainLimit(aux.FALSE) -end -function c89792713.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c89801755.lua b/script/c89801755.lua deleted file mode 100644 index 4cc5c6c854..0000000000 --- a/script/c89801755.lua +++ /dev/null @@ -1,44 +0,0 @@ ---深淵の指名者 -function c89801755.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCost(c89801755.cost) - e1:SetTarget(c89801755.target) - e1:SetOperation(c89801755.activate) - c:RegisterEffect(e1) -end -function c89801755.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,1000) end - Duel.PayLPCost(tp,1000) -end -function c89801755.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,562) - local att=Duel.AnnounceAttribute(tp,1,0xff) - Duel.Hint(HINT_SELECTMSG,tp,563) - local rc=Duel.AnnounceRace(tp,1,0xffffff) - e:SetLabel(att) - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(rc) - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,1-tp,LOCATION_HAND+LOCATION_GRAVE) -end -function c89801755.filter(c,rc,att) - return c:IsRace(rc) and c:IsAttribute(att) and c:IsAbleToGrave() -end -function c89801755.activate(e,tp,eg,ep,ev,re,r,rp) - local att=e:GetLabel() - local p,rc=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(p,c89801755.filter,p,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,rc,att) - if g:GetCount()>0 then - Duel.SendtoGrave(g,REASON_EFFECT) - else - local cg=Duel.GetFieldGroup(p,LOCATION_DECK+LOCATION_HAND,0) - Duel.ConfirmCards(1-p,cg) - Duel.ShuffleHand(p) - Duel.ShuffleDeck(p) - end -end diff --git a/script/c89810518.lua b/script/c89810518.lua deleted file mode 100644 index 84dc22a981..0000000000 --- a/script/c89810518.lua +++ /dev/null @@ -1,42 +0,0 @@ ---レプティレス・メデューサ -function c89810518.initial_effect(c) - --atk change - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(89810518,0)) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c89810518.cost) - e1:SetTarget(c89810518.target) - e1:SetOperation(c89810518.operation) - c:RegisterEffect(e1) -end -function c89810518.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,1,1,nil) - Duel.SendtoGrave(g,REASON_COST) -end -function c89810518.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil) -end -function c89810518.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetValue(0) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_CANNOT_CHANGE_POSITION) - e2:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e2) - end -end diff --git a/script/c89856523.lua b/script/c89856523.lua deleted file mode 100644 index 31cb969c85..0000000000 --- a/script/c89856523.lua +++ /dev/null @@ -1,47 +0,0 @@ ---罡炎星-リシュンキ -function c89856523.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_FIRE),aux.NonTuner(Card.IsSetCard,0x79),1) - c:EnableReviveLimit() - --set - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(89856523,0)) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(c89856523.setcon) - e1:SetTarget(c89856523.settg) - e1:SetOperation(c89856523.setop) - c:RegisterEffect(e1) - --atkdown - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetRange(LOCATION_MZONE) - e2:SetTargetRange(0,LOCATION_MZONE) - e2:SetValue(c89856523.atkval) - c:RegisterEffect(e2) -end -function c89856523.setcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_SYNCHRO -end -function c89856523.filter(c) - return c:IsSetCard(0x7c) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSSetable() -end -function c89856523.settg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingMatchingCard(c89856523.filter,tp,LOCATION_DECK,0,1,nil) end -end -function c89856523.setop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) - local g=Duel.SelectMatchingCard(tp,c89856523.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SSet(tp,g:GetFirst()) - Duel.ConfirmCards(1-tp,g) - end -end -function c89856523.atkfilter(c) - return c:IsFaceup() and c:IsType(TYPE_SPELL+TYPE_TRAP) -end -function c89856523.atkval(e,c) - return Duel.GetMatchingGroupCount(c89856523.atkfilter,e:GetHandlerPlayer(),LOCATION_ONFIELD,0,nil)*-100 -end diff --git a/script/c89870349.lua b/script/c89870349.lua deleted file mode 100644 index 3caf1fe325..0000000000 --- a/script/c89870349.lua +++ /dev/null @@ -1,70 +0,0 @@ ---M・HERO ブラスト -function c89870349.initial_effect(c) - c:EnableReviveLimit() - --special summon condition - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE) - c:RegisterEffect(e1) - --atk - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(89870349,0)) - e2:SetCategory(CATEGORY_ATKCHANGE) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e2:SetTarget(c89870349.atktg) - e2:SetOperation(c89870349.atkop) - c:RegisterEffect(e2) - --to hand - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(89870349,1)) - e3:SetCategory(CATEGORY_TOHAND) - e3:SetType(EFFECT_TYPE_QUICK_O) - e3:SetCode(EVENT_FREE_CHAIN) - e3:SetRange(LOCATION_MZONE) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetCountLimit(1) - e3:SetCost(c89870349.thcost) - e3:SetTarget(c89870349.thtg) - e3:SetOperation(c89870349.thop) - c:RegisterEffect(e3) -end -function c89870349.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil) -end -function c89870349.atkop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetValue(tc:GetAttack()/2) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - end -end -function c89870349.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,500) end - Duel.PayLPCost(tp,500) -end -function c89870349.thfilter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand() -end -function c89870349.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and c89870349.thfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c89870349.thfilter,tp,0,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g=Duel.SelectTarget(tp,c89870349.thfilter,tp,0,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c89870349.thop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - end -end diff --git a/script/c89882100.lua b/script/c89882100.lua deleted file mode 100644 index 7adcd4b27e..0000000000 --- a/script/c89882100.lua +++ /dev/null @@ -1,34 +0,0 @@ ---ナイト・ショット -function c89882100.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c89882100.target) - e1:SetOperation(c89882100.activate) - c:RegisterEffect(e1) -end -function c89882100.filter(c) - return c:IsFacedown() and c:IsDestructable() -end -function c89882100.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_SZONE) and chkc:IsControler(1-tp) and c89882100.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c89882100.filter,tp,0,LOCATION_SZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c89882100.filter,tp,0,LOCATION_SZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) - Duel.SetChainLimit(c89882100.limit(g:GetFirst())) -end -function c89882100.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsFacedown() and tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end -function c89882100.limit(c) - return function (e,lp,tp) - return e:GetHandler()~=c - end -end diff --git a/script/c89893715.lua b/script/c89893715.lua deleted file mode 100644 index 1de7cad914..0000000000 --- a/script/c89893715.lua +++ /dev/null @@ -1,30 +0,0 @@ ---ラヴァルの炎車回し -function c89893715.initial_effect(c) - --to grave - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(89893715,0)) - e1:SetCategory(CATEGORY_TOGRAVE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetCondition(c89893715.condition) - e1:SetTarget(c89893715.target) - e1:SetOperation(c89893715.operation) - c:RegisterEffect(e1) -end -function c89893715.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) -end -function c89893715.filter(c) - return c:IsSetCard(0x39) and c:IsAbleToGrave() -end -function c89893715.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c89893715.filter,tp,LOCATION_DECK,0,2,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,2,tp,LOCATION_DECK) -end -function c89893715.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c89893715.filter,tp,LOCATION_DECK,0,nil) - if g:GetCount()<2 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local sg=g:Select(tp,2,2,nil) - Duel.SendtoGrave(sg,REASON_EFFECT) -end diff --git a/script/c89899996.lua b/script/c89899996.lua deleted file mode 100644 index 28634506ce..0000000000 --- a/script/c89899996.lua +++ /dev/null @@ -1,34 +0,0 @@ ---D-スピリッツ -function c89899996.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c89899996.condition) - e1:SetTarget(c89899996.target) - e1:SetOperation(c89899996.operation) - c:RegisterEffect(e1) -end -function c89899996.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0xc008) -end -function c89899996.condition(e,tp,eg,ep,ev,re,r,rp) - return not Duel.IsExistingMatchingCard(c89899996.cfilter,tp,LOCATION_MZONE,0,1,nil) -end -function c89899996.spfilter(c,e,tp) - return c:IsLevelBelow(4) and c:IsSetCard(0xc008) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c89899996.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c89899996.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c89899996.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c89899996.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - if g:GetCount()~=0 then - Duel.SpecialSummon(g,1,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c89914395.lua b/script/c89914395.lua deleted file mode 100644 index 857033cb8f..0000000000 --- a/script/c89914395.lua +++ /dev/null @@ -1,35 +0,0 @@ ---ミョルニルの魔槌 -function c89914395.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCondition(c89914395.condition) - e1:SetTarget(c89914395.target) - e1:SetOperation(c89914395.operation) - c:RegisterEffect(e1) -end -function c89914395.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsAbleToEnterBP() or Duel.GetCurrentPhase()==PHASE_BATTLE -end -function c89914395.filter(c) - return c:IsFaceup() and c:IsSetCard(0x4b) and not c:IsHasEffect(EFFECT_EXTRA_ATTACK) -end -function c89914395.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c89914395.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c89914395.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c89914395.filter,tp,LOCATION_MZONE,0,1,1,nil) -end -function c89914395.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_EXTRA_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e1:SetValue(1) - tc:RegisterEffect(e1) - end -end diff --git a/script/c89997728.lua b/script/c89997728.lua deleted file mode 100644 index 235e4f923d..0000000000 --- a/script/c89997728.lua +++ /dev/null @@ -1,26 +0,0 @@ ---トゥーンのもくじ -function c89997728.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c89997728.target) - e1:SetOperation(c89997728.activate) - c:RegisterEffect(e1) -end -function c89997728.filter(c) - return c:IsSetCard(0x62) and c:IsAbleToHand() -end -function c89997728.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c89997728.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c89997728.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c89997728.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c90011152.lua b/script/c90011152.lua deleted file mode 100644 index bdd704a29f..0000000000 --- a/script/c90011152.lua +++ /dev/null @@ -1,61 +0,0 @@ ---おジャマ・カントリー -function c90011152.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(90011152,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_SZONE) - e2:SetCountLimit(1) - e2:SetCost(c90011152.spcost) - e2:SetTarget(c90011152.sptg) - e2:SetOperation(c90011152.spop) - c:RegisterEffect(e2) - --swap ad - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetRange(LOCATION_SZONE) - e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e3:SetCondition(c90011152.atcon) - e3:SetCode(EFFECT_SWAP_BASE_AD) - c:RegisterEffect(e3) -end -function c90011152.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0xf) -end -function c90011152.atcon(e) - return Duel.IsExistingMatchingCard(c90011152.cfilter,e:GetHandler():GetControler(),LOCATION_MZONE,0,1,nil) -end -function c90011152.costfilter(c) - return c:IsSetCard(0xf) and c:IsAbleToGraveAsCost() -end -function c90011152.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c90011152.costfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c90011152.costfilter,tp,LOCATION_HAND,0,1,1,nil) - Duel.SendtoGrave(g,REASON_COST) -end -function c90011152.filter(c,e,tp) - return c:IsSetCard(0xf) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c90011152.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c90011152.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c90011152.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c90011152.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c90011152.spop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c90019393.lua b/script/c90019393.lua deleted file mode 100644 index 217d0b82e0..0000000000 --- a/script/c90019393.lua +++ /dev/null @@ -1,32 +0,0 @@ ---ジェムナイト・アレキサンド -function c90019393.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(90019393,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c90019393.cost) - e1:SetTarget(c90019393.target) - e1:SetOperation(c90019393.operation) - c:RegisterEffect(e1) -end -function c90019393.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end -function c90019393.filter(c,e,tp) - return c:IsSetCard(0x1047) and c:IsType(TYPE_NORMAL) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c90019393.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c90019393.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,LOCATION_DECK) -end -function c90019393.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c90019393.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c90020065.lua b/script/c90020065.lua deleted file mode 100644 index 513d63eee8..0000000000 --- a/script/c90020065.lua +++ /dev/null @@ -1,45 +0,0 @@ ---タイム・ボマー -function c90020065.initial_effect(c) - --flip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(90020065,0)) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP) - e1:SetOperation(c90020065.operation) - c:RegisterEffect(e1) -end -function c90020065.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(90020065,1)) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c90020065.descon) - e1:SetCost(c90020065.descost) - e1:SetTarget(c90020065.destg) - e1:SetOperation(c90020065.desop) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN) - c:RegisterEffect(e1) - end -end -function c90020065.descon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c90020065.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end -function c90020065.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,LOCATION_MZONE,0,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,0) -end -function c90020065.desop(e,tp,eg,ep,ev,re,r,rp,chk) - local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,LOCATION_MZONE,0,nil) - local dam=g:GetSum(Card.GetAttack)/2 - Duel.Destroy(g,REASON_EFFECT) - Duel.Damage(1-tp,dam,REASON_EFFECT) -end diff --git a/script/c90075978.lua b/script/c90075978.lua deleted file mode 100644 index db61f94b53..0000000000 --- a/script/c90075978.lua +++ /dev/null @@ -1,55 +0,0 @@ ---W星雲隕石 -function c90075978.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_POSITION+CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,0x1e0) - e1:SetTarget(c90075978.target) - e1:SetOperation(c90075978.activate) - c:RegisterEffect(e1) -end -function c90075978.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFacedown,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - local g=Duel.GetMatchingGroup(Card.IsFacedown,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_POSITION,g,g:GetCount(),0,0) -end -function c90075978.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsFacedown,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - if g:GetCount()>0 then - Duel.ChangePosition(g,POS_FACEUP_DEFENCE) - end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetCountLimit(1) - e1:SetReset(RESET_PHASE+PHASE_END) - e1:SetCondition(c90075978.setcon) - e1:SetOperation(c90075978.setop) - Duel.RegisterEffect(e1,tp) -end -function c90075978.sfilter(c) - return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_REPTILE) and c:IsCanTurnSet() -end -function c90075978.spfilter(c,e,tp) - return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_REPTILE) and c:GetLevel()>=7 - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c90075978.setcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c90075978.sfilter,tp,LOCATION_MZONE,0,1,nil) -end -function c90075978.setop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c90075978.sfilter,tp,LOCATION_MZONE,0,nil) - if g:GetCount()>0 then - Duel.ChangePosition(g,POS_FACEDOWN_DEFENCE) - local dt=Duel.Draw(tp,g:GetCount(),REASON_EFFECT) - if dt==0 or Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local sg=Duel.GetMatchingGroup(c90075978.spfilter,tp,LOCATION_DECK,0,nil,e,tp) - if sg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(90075978,0)) then - Duel.BreakEffect() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - Duel.SpecialSummon(sg:Select(tp,1,1,nil),0,tp,tp,false,false,POS_FACEUP) - end - end -end diff --git a/script/c900787.lua b/script/c900787.lua deleted file mode 100644 index 200053b5e9..0000000000 --- a/script/c900787.lua +++ /dev/null @@ -1,48 +0,0 @@ ---ドラグニティナイト-ゲイボルグ -function c900787.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsRace,RACE_DRAGON),aux.NonTuner(Card.IsRace,RACE_WINDBEAST),1) - c:EnableReviveLimit() - --search - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(900787,0)) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c900787.condition) - e1:SetCost(c900787.cost) - e1:SetOperation(c900787.operation) - c:RegisterEffect(e1) -end -function c900787.condition(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local ph=Duel.GetCurrentPhase() - return ph==PHASE_DAMAGE and (c==Duel.GetAttacker() or c==Duel.GetAttackTarget()) - and not Duel.IsDamageCalculated() -end -function c900787.cfilter(c) - return c:IsRace(RACE_WINDBEAST) and c:IsAbleToRemoveAsCost() -end -function c900787.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():GetFlagEffect(900787)==0 - and Duel.IsExistingMatchingCard(c900787.cfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c900787.cfilter,tp,LOCATION_GRAVE,0,1,1,nil) - e:SetLabel(g:GetFirst():GetAttack()) - Duel.Remove(g,POS_FACEUP,REASON_COST) - e:GetHandler():RegisterFlagEffect(900787,RESET_PHASE+PHASE_DAMAGE,0,1) -end -function c900787.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFaceup() and c:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(e:GetLabel()) - e1:SetReset(RESET_EVENT+0x1ff0000+RESET_PHASE+PHASE_END) - c:RegisterEffect(e1) - end -end diff --git a/script/c90098780.lua b/script/c90098780.lua deleted file mode 100644 index 60fafc60ee..0000000000 --- a/script/c90098780.lua +++ /dev/null @@ -1,72 +0,0 @@ ---鍵魔人ハミハミハミング -function c90098780.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,3,2) - c:EnableReviveLimit() - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(90098780,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetTarget(c90098780.sptg) - e1:SetOperation(c90098780.spop) - c:RegisterEffect(e1) - --direct - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(90098780,1)) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCountLimit(1) - e2:SetCost(c90098780.atkcost) - e2:SetTarget(c90098780.atktg) - e2:SetOperation(c90098780.atkop) - c:RegisterEffect(e2) -end -function c90098780.filter(c,e,tp) - return c:IsSetCard(0x6d) and c:IsType(TYPE_XYZ) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c90098780.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c90098780.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c90098780.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c90098780.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c90098780.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)~=0 then - local g=Duel.GetFieldGroup(tp,LOCATION_HAND,0) - if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(90098780,2)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL) - local sg=g:Select(tp,1,2,nil) - Duel.Overlay(tc,sg) - end - end -end -function c90098780.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c90098780.atkfilter(c) - return c:IsFaceup() and c:IsSetCard(0x6d) and c:IsType(TYPE_XYZ) and not c:IsHasEffect(EFFECT_DIRECT_ATTACK) -end -function c90098780.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c90098780.atkfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c90098780.atkfilter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c90098780.atkfilter,tp,LOCATION_MZONE,0,1,1,nil) -end -function c90098780.atkop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DIRECT_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - end -end diff --git a/script/c9012916.lua b/script/c9012916.lua deleted file mode 100644 index 6ae74bc2d6..0000000000 --- a/script/c9012916.lua +++ /dev/null @@ -1,75 +0,0 @@ ---ブラックフェザー・ドラゴン -function c9012916.initial_effect(c) - c:EnableCounterPermit(0x3010) - --synchro summon - aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1) - c:EnableReviveLimit() - --damage reduce - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CHANGE_DAMAGE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(1,0) - e1:SetValue(c9012916.damval) - c:RegisterEffect(e1) - local e4=e1:Clone() - e4:SetCode(EFFECT_NO_EFFECT_DAMAGE) - c:RegisterEffect(e4) - --atkdown-c - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(c9012916.atkval) - c:RegisterEffect(e2) - --atkdown - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(9012916,0)) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1) - e3:SetCost(c9012916.cost) - e3:SetTarget(c9012916.target) - e3:SetOperation(c9012916.operation) - c:RegisterEffect(e3) -end -function c9012916.damval(e,re,val,r,rp,rc) - if bit.band(r,REASON_EFFECT)~=0 then - e:GetHandler():AddCounter(0x3010,1) - return 0 - end - return val -end -function c9012916.atkval(e,c) - return c:GetCounter(0x3010)*-700 -end -function c9012916.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():GetCounter(0x3010)>0 end - local ct=e:GetHandler():GetCounter(0x3010) - e:SetLabel(ct*700) - e:GetHandler():RemoveCounter(tp,0x3010,ct,REASON_COST) -end -function c9012916.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(aux.nzatk,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,aux.nzatk,tp,0,LOCATION_MZONE,1,1,nil) -end -function c9012916.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - local val=e:GetLabel() - local atk=tc:GetAttack() - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(-val) - tc:RegisterEffect(e1) - if val>atk then Duel.Damage(1-tp,atk,REASON_EFFECT) - else Duel.Damage(1-tp,val,REASON_EFFECT) end - end -end diff --git a/script/c90135989.lua b/script/c90135989.lua deleted file mode 100644 index dd30ad1415..0000000000 --- a/script/c90135989.lua +++ /dev/null @@ -1,30 +0,0 @@ ---雲魔物のスコール -function c90135989.initial_effect(c) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --counter - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(90135989,0)) - e2:SetCategory(CATEGORY_COUNTER) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetRange(LOCATION_SZONE) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) - e2:SetCountLimit(1) - e2:SetCondition(c90135989.condition) - e2:SetOperation(c90135989.operation) - c:RegisterEffect(e2) -end -function c90135989.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c90135989.operation(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - local tc=g:GetFirst() - while tc do - tc:AddCounter(0x19,1) - tc=g:GetNext() - end -end diff --git a/script/c90140980.lua b/script/c90140980.lua deleted file mode 100644 index a8b3837091..0000000000 --- a/script/c90140980.lua +++ /dev/null @@ -1,27 +0,0 @@ ---おジャマ・キング -function c90140980.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcCode3(c,12482652,42941100,79335209,true,true) - --disable field - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_DISABLE_FIELD) - e1:SetOperation(c90140980.disop) - c:RegisterEffect(e1) -end -function c90140980.disop(e,tp) - local c=Duel.GetLocationCount(1-tp,LOCATION_MZONE) - if c==0 then return end - local dis1=Duel.SelectDisableField(tp,1,0,LOCATION_MZONE,0) - if c>1 and Duel.SelectYesNo(tp,aux.Stringid(90140980,0)) then - local dis2=Duel.SelectDisableField(tp,1,0,LOCATION_MZONE,dis1) - dis1=bit.bor(dis1,dis2) - if c>2 and Duel.SelectYesNo(tp,aux.Stringid(90140980,0)) then - local dis3=Duel.SelectDisableField(tp,1,0,LOCATION_MZONE,dis1) - dis1=bit.bor(dis1,dis3) - end - end - return dis1 -end diff --git a/script/c90147755.lua b/script/c90147755.lua deleted file mode 100644 index 364dafb11c..0000000000 --- a/script/c90147755.lua +++ /dev/null @@ -1,29 +0,0 @@ ---炎の女暗殺者 -function c90147755.initial_effect(c) - --flip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(90147755,0)) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP) - e1:SetCost(c90147755.cost) - e1:SetTarget(c90147755.target) - e1:SetOperation(c90147755.operation) - c:RegisterEffect(e1) -end -function c90147755.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemoveAsCost,tp,LOCATION_DECK,0,3,nil) end - local g=Duel.GetDecktopGroup(tp,3) - Duel.DisableShuffleCheck() - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c90147755.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(800) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,800) -end -function c90147755.operation(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c90156158.lua b/script/c90156158.lua deleted file mode 100644 index e7876cb7c8..0000000000 --- a/script/c90156158.lua +++ /dev/null @@ -1,41 +0,0 @@ ---セイクリッドの超新生 -function c90156158.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c90156158.cost) - e1:SetTarget(c90156158.target) - e1:SetOperation(c90156158.activate) - c:RegisterEffect(e1) -end -function c90156158.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetCurrentPhase()~=PHASE_MAIN2 end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_BP) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) - e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function c90156158.filter(c) - return c:IsSetCard(0x53) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() -end -function c90156158.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c90156158.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c90156158.filter,tp,LOCATION_GRAVE,0,2,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c90156158.filter,tp,LOCATION_GRAVE,0,2,2,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,2,0,0) -end -function c90156158.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local sg=g:Filter(Card.IsRelateToEffect,nil,e) - if sg:GetCount()>0 then - Duel.SendtoHand(sg,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,sg) - end -end diff --git a/script/c90200789.lua b/script/c90200789.lua deleted file mode 100644 index 327550aec1..0000000000 --- a/script/c90200789.lua +++ /dev/null @@ -1,77 +0,0 @@ ---忍法 超変化の術 -function c90200789.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,0x1c0) - e1:SetTarget(c90200789.target) - e1:SetOperation(c90200789.operation) - c:RegisterEffect(e1) - --Destroy - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE) - e2:SetCode(EVENT_LEAVE_FIELD) - e2:SetOperation(c90200789.desop) - c:RegisterEffect(e2) -end -function c90200789.filter1(c,tp,slv) - local lv1=c:GetLevel() - return c:IsFaceup() and c:IsSetCard(0x2b) and lv1>0 - and Duel.IsExistingTarget(c90200789.filter2,tp,0,LOCATION_MZONE,1,nil,lv1,slv) -end -function c90200789.filter2(c,lv1,slv) - local lv2=c:GetLevel() - return c:IsFaceup() and lv2>0 and lv1+lv2>=slv -end -function c90200789.spfilter(c,e,tp,lv) - return c:IsRace(RACE_DRAGON+RACE_DINOSAUR+RACE_SEASERPENT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and (not lv or c:IsLevelBelow(lv)) -end -function c90200789.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - local sg=Duel.GetMatchingGroup(c90200789.spfilter,tp,LOCATION_DECK,0,nil,e,tp) - if chk==0 then - if sg:GetCount()==0 then return false end - local mg,mlv=sg:GetMinGroup(Card.GetLevel) - return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsExistingTarget(c90200789.filter1,tp,LOCATION_MZONE,0,1,nil,tp,mlv) - end - local mg,mlv=sg:GetMinGroup(Card.GetLevel) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g1=Duel.SelectTarget(tp,c90200789.filter1,tp,LOCATION_MZONE,0,1,1,nil,tp,mlv) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g2=Duel.SelectTarget(tp,c90200789.filter2,tp,0,LOCATION_MZONE,1,1,nil,g1:GetFirst():GetLevel(),mlv) - g1:Merge(g2) - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g1,2,0,0) -end -function c90200789.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) then return end - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local tg=g:Filter(Card.IsRelateToEffect,nil,e) - if tg:GetCount()==0 then return end - Duel.SendtoGrave(tg,REASON_EFFECT) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local tc=tg:GetFirst() - local lv=0 - if tc:IsLocation(LOCATION_GRAVE) then lv=lv+tc:GetLevel() end - tc=tg:GetNext() - if tc and tc:IsLocation(LOCATION_GRAVE) then lv=lv+tc:GetLevel() end - if lv==0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c90200789.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,lv) - local tc=g:GetFirst() - if tc then - Duel.BreakEffect() - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - c:SetCardTarget(tc) - end -end -function c90200789.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetHandler():GetFirstCardTarget() - if tc and tc:IsLocation(LOCATION_MZONE) then - Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) - end -end diff --git a/script/c90219263.lua b/script/c90219263.lua deleted file mode 100644 index d92c6d7f97..0000000000 --- a/script/c90219263.lua +++ /dev/null @@ -1,36 +0,0 @@ ---万華鏡-華麗なる分身- -function c90219263.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c90219263.condition) - e1:SetTarget(c90219263.target) - e1:SetOperation(c90219263.activate) - c:RegisterEffect(e1) -end -function c90219263.cfilter(c) - return c:IsFaceup() and c:IsCode(76812113) -end -function c90219263.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c90219263.cfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) -end -function c90219263.filter(c,e,tp) - local code=c:GetCode() - return (code==76812113 or code==12206212) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) -end -function c90219263.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c90219263.filter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) -end -function c90219263.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c90219263.filter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp) - local tc=g:GetFirst() - if tc and Duel.SpecialSummon(tc,0,tp,tp,true,false,POS_FACEUP)~=0 then - tc:CompleteProcedure() - end -end diff --git a/script/c90238142.lua b/script/c90238142.lua deleted file mode 100644 index 29d90c54c9..0000000000 --- a/script/c90238142.lua +++ /dev/null @@ -1,60 +0,0 @@ ---ハーピィ・チャネラー -function c90238142.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(90238142,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetCountLimit(1,90238142) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c90238142.spcost) - e1:SetTarget(c90238142.sptg) - e1:SetOperation(c90238142.spop) - c:RegisterEffect(e1) - --change name - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetCode(EFFECT_CHANGE_CODE) - e2:SetRange(LOCATION_MZONE+LOCATION_GRAVE) - e2:SetValue(76812113) - c:RegisterEffect(e2) - --change level - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e3:SetCode(EFFECT_CHANGE_LEVEL) - e3:SetRange(LOCATION_MZONE) - e3:SetCondition(c90238142.lvcon) - e3:SetValue(7) - c:RegisterEffect(e3) -end -function c90238142.cfilter(c) - return c:IsSetCard(0x64) and c:IsDiscardable() -end -function c90238142.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c90238142.cfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,c90238142.cfilter,1,1,REASON_COST+REASON_DISCARD) -end -function c90238142.filter(c,e,tp) - return c:IsSetCard(0x64) and c:GetCode()~=90238142 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c90238142.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c90238142.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c90238142.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c90238142.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENCE) - end -end -function c90238142.lvfilter(c) - return c:IsFaceup() and c:IsRace(RACE_DRAGON) -end -function c90238142.lvcon(e) - return Duel.IsExistingMatchingCard(c90238142.lvfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) -end diff --git a/script/c90239723.lua b/script/c90239723.lua deleted file mode 100644 index ddbdf974fe..0000000000 --- a/script/c90239723.lua +++ /dev/null @@ -1,72 +0,0 @@ ---D・リペアユニット -function c90239723.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCost(c90239723.cost) - e1:SetTarget(c90239723.target) - e1:SetOperation(c90239723.operation) - c:RegisterEffect(e1) - --Destroy - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE) - e2:SetCode(EVENT_LEAVE_FIELD) - e2:SetOperation(c90239723.desop) - c:RegisterEffect(e2) - --Pos limit - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_EQUIP) - e3:SetCode(EFFECT_CANNOT_CHANGE_POSITION) - c:RegisterEffect(e3) -end -function c90239723.cfilter(c) - return c:IsSetCard(0x26) and c:IsType(TYPE_MONSTER) and c:IsAbleToGraveAsCost() -end -function c90239723.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c90239723.cfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c90239723.cfilter,tp,LOCATION_HAND,0,1,1,nil) - Duel.SendtoGrave(g,REASON_COST) -end -function c90239723.filter(c,e,tp) - return c:IsSetCard(0x26) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c90239723.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c90239723.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c90239723.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c90239723.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c90239723.eqlimit(e,c) - return e:GetOwner()==c -end -function c90239723.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then - if Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)==0 then return end - Duel.Equip(tp,c,tc) - --Add Equip limit - e:SetLabelObject(tc) - tc:CreateRelation(c,RESET_EVENT+0x1fe0000) - local e1=Effect.CreateEffect(tc) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(c90239723.eqlimit) - c:RegisterEffect(e1) - end -end -function c90239723.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetHandler():GetFirstCardTarget() - if tc and tc:IsLocation(LOCATION_MZONE) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c9024367.lua b/script/c9024367.lua deleted file mode 100644 index fd2008ddac..0000000000 --- a/script/c9024367.lua +++ /dev/null @@ -1,55 +0,0 @@ ---ギャラクシー・ドラグーン -function c9024367.initial_effect(c) - --atklimit - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET) - e1:SetValue(c9024367.bttg) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_CANNOT_DIRECT_ATTACK) - c:RegisterEffect(e2) - --atkup - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e3:SetRange(LOCATION_MZONE) - e3:SetCode(EFFECT_UPDATE_ATTACK) - e3:SetCondition(c9024367.atkcon) - e3:SetValue(1000) - c:RegisterEffect(e3) - --disable - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e4:SetCode(EVENT_ATTACK_ANNOUNCE) - e4:SetOperation(c9024367.disop) - c:RegisterEffect(e4) - local e5=e4:Clone() - e5:SetCode(EVENT_BE_BATTLE_TARGET) - c:RegisterEffect(e5) -end -function c9024367.bttg(e,c) - return c:IsFacedown() or not c:IsRace(RACE_DRAGON) -end -function c9024367.atkcon(e) - local ph=Duel.GetCurrentPhase() - local bc=e:GetHandler():GetBattleTarget() - return (ph==PHASE_DAMAGE or ph==PHASE_DAMAGE_CAL) and bc and bc:IsRace(RACE_DRAGON) -end -function c9024367.disop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local bc=c:GetBattleTarget() - if bc and bc:IsRace(RACE_DRAGON) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_BATTLE) - bc:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_BATTLE) - bc:RegisterEffect(e2) - end -end diff --git a/script/c90246973.lua b/script/c90246973.lua deleted file mode 100644 index 2893833be2..0000000000 --- a/script/c90246973.lua +++ /dev/null @@ -1,68 +0,0 @@ ---パワー・ピカクス -function c90246973.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c90246973.target) - e1:SetOperation(c90246973.operation) - c:RegisterEffect(e1) - --Equip limit - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_EQUIP_LIMIT) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetValue(1) - c:RegisterEffect(e2) - --remove - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(90246973,0)) - e3:SetCategory(CATEGORY_REMOVE+CATEGORY_ATKCHANGE) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetCountLimit(1) - e3:SetRange(LOCATION_SZONE) - e3:SetTarget(c90246973.rmtg) - e3:SetOperation(c90246973.rmop) - c:RegisterEffect(e3) -end -function c90246973.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c90246973.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,e:GetHandler(),tc) - end -end -function c90246973.rmfilter(c,lv) - return c:IsLevelBelow(lv) and c:IsAbleToRemove() -end -function c90246973.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local ec=e:GetHandler():GetEquipTarget() - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(1-tp) and c90246973.rmfilter(chkc,ec:GetLevel()) end - if chk==0 then return Duel.IsExistingTarget(c90246973.rmfilter,tp,0,LOCATION_GRAVE,1,nil,ec:GetLevel()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,c90246973.rmfilter,tp,0,LOCATION_GRAVE,1,1,nil,ec:GetLevel()) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) -end -function c90246973.rmop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) then return end - local ec=c:GetEquipTarget() - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)~=0 then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e1:SetValue(500) - ec:RegisterEffect(e1) - end -end diff --git a/script/c90263923.lua b/script/c90263923.lua deleted file mode 100644 index deab7eb0b0..0000000000 --- a/script/c90263923.lua +++ /dev/null @@ -1,39 +0,0 @@ ---シャイニング・アブソーブ -function c90263923.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c90263923.target) - e1:SetOperation(c90263923.activate) - c:RegisterEffect(e1) -end -function c90263923.filter(c) - return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_LIGHT) -end -function c90263923.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c90263923.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c90263923.filter,tp,0,LOCATION_MZONE,1,nil) - and Duel.IsExistingMatchingCard(Card.IsPosition,tp,LOCATION_MZONE,0,1,nil,POS_FACEUP_ATTACK) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c90263923.filter,tp,0,LOCATION_MZONE,1,1,nil) -end -function c90263923.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - local g=Duel.GetMatchingGroup(Card.IsPosition,tp,LOCATION_MZONE,0,nil,POS_FACEUP_ATTACK) - if g:GetCount()>0 and tc:IsRelateToEffect(e) and tc:IsFaceup() then - local sc=g:GetFirst() - local atk=tc:GetAttack() - while sc do - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - e1:SetValue(atk) - sc:RegisterEffect(e1) - sc=g:GetNext() - end - end -end diff --git a/script/c90303176.lua b/script/c90303176.lua deleted file mode 100644 index 2636156d87..0000000000 --- a/script/c90303176.lua +++ /dev/null @@ -1,33 +0,0 @@ ---サイレント・アングラー -function c90303176.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c90303176.spcon) - e1:SetOperation(c90303176.spop) - c:RegisterEffect(e1) -end -function c90303176.filter(c) - return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_WATER) -end -function c90303176.spcon(e,c) - if c==nil then return true end - return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c90303176.filter,c:GetControler(),LOCATION_MZONE,0,1,nil) -end -function c90303176.spop(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) - e1:SetTargetRange(1,0) - e1:SetTarget(c90303176.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function c90303176.splimit(e,c,sump,sumtype,sumpos,targetp) - return c:IsLocation(LOCATION_HAND) -end diff --git a/script/c90307777.lua b/script/c90307777.lua deleted file mode 100644 index ccc1db83ab..0000000000 --- a/script/c90307777.lua +++ /dev/null @@ -1,46 +0,0 @@ ---影霊衣の術士 シュリット -function c90307777.initial_effect(c) - --ritual level - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_RITUAL_LEVEL) - e1:SetValue(c90307777.rlevel) - c:RegisterEffect(e1) - --tohand - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(90307777,0)) - e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_RELEASE) - e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e2:SetCountLimit(1,90307777) - e2:SetCondition(c90307777.thcon) - e2:SetTarget(c90307777.thtg) - e2:SetOperation(c90307777.thop) - c:RegisterEffect(e2) -end -function c90307777.rlevel(e,c) - local lv=e:GetHandler():GetLevel() - if c:IsSetCard(0xb4) then - local clv=c:GetLevel() - return lv*65536+clv - else return lv end -end -function c90307777.thcon(e,tp,eg,ep,ev,re,r,rp) - return bit.band(r,REASON_EFFECT)~=0 -end -function c90307777.filter(c) - return c:IsSetCard(0xb4) and c:IsType(TYPE_RITUAL) and c:IsRace(RACE_WARRIOR) and c:IsAbleToHand() -end -function c90307777.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c90307777.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c90307777.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c90307777.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c90311614.lua b/script/c90311614.lua deleted file mode 100644 index dd1fadaff6..0000000000 --- a/script/c90311614.lua +++ /dev/null @@ -1,17 +0,0 @@ ---氷結界の水影 -function c90311614.initial_effect(c) - --direct attack - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DIRECT_ATTACK) - e1:SetCondition(c90311614.dircon) - c:RegisterEffect(e1) -end -function c90311614.filter(c) - local lv=c:GetLevel() - return c:IsFaceup() and (lv==0 or c:GetLevel()>2) -end -function c90311614.dircon(e) - local tp=e:GetHandler():GetControler() - return not Duel.IsExistingMatchingCard(c90311614.filter,tp,LOCATION_MZONE,0,1,nil) -end diff --git a/script/c90330453.lua b/script/c90330453.lua deleted file mode 100644 index 06883d7f51..0000000000 --- a/script/c90330453.lua +++ /dev/null @@ -1,23 +0,0 @@ ---魔女狩り -function c90330453.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c90330453.target) - e1:SetOperation(c90330453.activate) - c:RegisterEffect(e1) -end -function c90330453.filter(c) - return c:IsRace(RACE_SPELLCASTER) and c:IsFaceup() and c:IsDestructable() -end -function c90330453.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c90330453.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - local sg=Duel.GetMatchingGroup(c90330453.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,sg:GetCount(),0,0) -end -function c90330453.activate(e,tp,eg,ep,ev,re,r,rp) - local sg=Duel.GetMatchingGroup(c90330453.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - Duel.Destroy(sg,REASON_EFFECT) -end diff --git a/script/c90337190.lua b/script/c90337190.lua deleted file mode 100644 index eb203a5cc9..0000000000 --- a/script/c90337190.lua +++ /dev/null @@ -1,22 +0,0 @@ ---魚雷魚 -function c90337190.initial_effect(c) - --immune spell - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_IMMUNE_EFFECT) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c90337190.econ) - e1:SetValue(c90337190.efilter) - c:RegisterEffect(e1) -end -function c90337190.filter(c) - return c:IsFaceup() and c:IsCode(22702055) -end -function c90337190.econ(e) - return Duel.IsExistingMatchingCard(c90337190.filter,0,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) - or Duel.IsEnvironment(22702055) -end -function c90337190.efilter(e,te) - return te:IsActiveType(TYPE_SPELL) -end diff --git a/script/c90361010.lua b/script/c90361010.lua deleted file mode 100644 index 4f2609e5ad..0000000000 --- a/script/c90361010.lua +++ /dev/null @@ -1,77 +0,0 @@ ---超重武者装留イワトオシ -function c90361010.initial_effect(c) - --equip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(90361010,0)) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_HAND+LOCATION_MZONE) - e1:SetTarget(c90361010.eqtg) - e1:SetOperation(c90361010.eqop) - c:RegisterEffect(e1) - --tohand - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(90361010,1)) - e2:SetCategory(CATEGORY_TOHAND) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetCondition(c90361010.thcon) - e2:SetTarget(c90361010.thtg) - e2:SetOperation(c90361010.thop) - c:RegisterEffect(e2) -end -function c90361010.filter(c) - return c:IsFaceup() and c:IsSetCard(0x9a) -end -function c90361010.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c90361010.filter(chkc) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingTarget(c90361010.filter,tp,LOCATION_MZONE,0,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c90361010.filter,tp,LOCATION_MZONE,0,1,1,e:GetHandler()) -end -function c90361010.eqop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) then return end - if c:IsLocation(LOCATION_MZONE) and c:IsFacedown() then return end - local tc=Duel.GetFirstTarget() - if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or tc:GetControler()~=tp or tc:IsFacedown() or not tc:IsRelateToEffect(e) then - Duel.SendtoGrave(c,REASON_EFFECT) - return - end - Duel.Equip(tp,c,tc,true) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(c90361010.eqlimit) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_PIERCE) - e2:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e2) -end -function c90361010.eqlimit(e,c) - return c:IsSetCard(0x9a) -end -function c90361010.thcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) -end -function c90361010.thfilter(c) - return c:IsSetCard(0x9a) and not c:IsCode(90361010) and c:IsAbleToHand() -end -function c90361010.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c90361010.thfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c90361010.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c90361010.thfilter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c90374791.lua b/script/c90374791.lua deleted file mode 100644 index 2e4d1644e4..0000000000 --- a/script/c90374791.lua +++ /dev/null @@ -1,73 +0,0 @@ ---アームド・チェンジャー -function c90374791.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCost(c90374791.cost) - e1:SetTarget(c90374791.target) - e1:SetOperation(c90374791.operation) - c:RegisterEffect(e1) - --Equip limit - local e2=Effect.CreateEffect(c) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_EQUIP_LIMIT) - e2:SetValue(1) - c:RegisterEffect(e2) - --salvage - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(90374791,0)) - e3:SetCategory(CATEGORY_TOHAND) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_BATTLE_DESTROYING) - e3:SetRange(LOCATION_SZONE) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetCondition(c90374791.thcon) - e3:SetTarget(c90374791.thtg) - e3:SetOperation(c90374791.thop) - c:RegisterEffect(e3) -end -function c90374791.cfilter(c) - return c:IsType(TYPE_EQUIP) and c:IsAbleToGraveAsCost() -end -function c90374791.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c90374791.cfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,c90374791.cfilter,1,1,REASON_COST) -end -function c90374791.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c90374791.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,e:GetHandler(),tc) - end -end -function c90374791.thcon(e,tp,eg,ep,ev,re,r,rp) - return eg:GetFirst()==e:GetHandler():GetEquipTarget() -end -function c90374791.filter(c,atk) - return c:IsType(TYPE_MONSTER) and c:IsAttackBelow(atk) and c:IsAbleToHand() -end -function c90374791.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local eatk=e:GetHandler():GetEquipTarget():GetAttack() - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c90374791.filter(chkc,eatk) end - if chk==0 then return Duel.IsExistingTarget(c90374791.filter,tp,LOCATION_GRAVE,0,1,nil,eatk) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c90374791.filter,tp,LOCATION_GRAVE,0,1,1,nil,eatk) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c90374791.thop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end diff --git a/script/c90397998.lua b/script/c90397998.lua deleted file mode 100644 index 4a7ba9c9cc..0000000000 --- a/script/c90397998.lua +++ /dev/null @@ -1,78 +0,0 @@ ---六武衆-カモン -function c90397998.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(90397998,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCondition(c90397998.descon) - e1:SetCost(c90397998.descost) - e1:SetTarget(c90397998.destg) - e1:SetOperation(c90397998.desop) - c:RegisterEffect(e1) - --Destroy replace - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DESTROY_REPLACE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetTarget(c90397998.desreptg) - e2:SetOperation(c90397998.desrepop) - c:RegisterEffect(e2) -end -function c90397998.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x3d) and c:GetCode()~=90397998 -end -function c90397998.descon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c90397998.cfilter,tp,LOCATION_MZONE,0,1,nil) -end -function c90397998.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():GetAttackAnnouncedCount()==0 end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e1:SetProperty(EFFECT_FLAG_OATH) - e:GetHandler():RegisterEffect(e1) -end -function c90397998.desfilter(c) - return c:IsFaceup() and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable() -end -function c90397998.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and c90397998.desfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c90397998.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c90397998.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c90397998.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if not Duel.IsExistingMatchingCard(c90397998.cfilter,tp,LOCATION_MZONE,0,1,nil) then return end - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end -function c90397998.repfilter(c) - return c:IsFaceup() and c:IsSetCard(0x3d) and not c:IsStatus(STATUS_DESTROY_CONFIRMED+STATUS_BATTLE_DESTROYED) -end -function c90397998.desreptg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return not c:IsReason(REASON_REPLACE) and c:IsOnField() and c:IsFaceup() - and Duel.IsExistingMatchingCard(c90397998.repfilter,tp,LOCATION_MZONE,0,1,c) end - if Duel.SelectYesNo(tp,aux.Stringid(90397998,1)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESREPLACE) - local g=Duel.SelectMatchingCard(tp,c90397998.repfilter,tp,LOCATION_MZONE,0,1,1,c) - e:SetLabelObject(g:GetFirst()) - Duel.HintSelection(g) - g:GetFirst():SetStatus(STATUS_DESTROY_CONFIRMED,true) - return true - else return false end -end -function c90397998.desrepop(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetLabelObject() - tc:SetStatus(STATUS_DESTROY_CONFIRMED,false) - Duel.Destroy(tc,REASON_EFFECT+REASON_REPLACE) -end diff --git a/script/c90407382.lua b/script/c90407382.lua deleted file mode 100644 index 0a12d7b0ad..0000000000 --- a/script/c90407382.lua +++ /dev/null @@ -1,32 +0,0 @@ ---ザ・キックマン -function c90407382.initial_effect(c) - --equip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(90407382,0)) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetTarget(c90407382.eqtg) - e1:SetOperation(c90407382.eqop) - c:RegisterEffect(e1) -end -function c90407382.filter(c,ec) - return c:IsType(TYPE_EQUIP) and c:CheckEquipTarget(ec) -end -function c90407382.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c90407382.filter(chkc,e:GetHandler()) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingTarget(c90407382.filter,tp,LOCATION_GRAVE,0,1,nil,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local g=Duel.SelectTarget(tp,c90407382.filter,tp,LOCATION_GRAVE,0,1,1,nil,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0) -end -function c90407382.eqop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and c:IsFaceup() and c:IsRelateToEffect(e) then - Duel.Equip(tp,tc,c) - end -end diff --git a/script/c90411554.lua b/script/c90411554.lua deleted file mode 100644 index de277af0df..0000000000 --- a/script/c90411554.lua +++ /dev/null @@ -1,126 +0,0 @@ ---巌征竜-レドックス -function c90411554.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(90411554,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND+LOCATION_GRAVE) - e1:SetCountLimit(1,90411554) - e1:SetCost(c90411554.hspcost) - e1:SetTarget(c90411554.hsptg) - e1:SetOperation(c90411554.hspop) - c:RegisterEffect(e1) - --return - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(90411554,1)) - e2:SetCategory(CATEGORY_TOHAND) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EVENT_PHASE+PHASE_END) - e2:SetCountLimit(1,90411554) - e2:SetCondition(c90411554.retcon) - e2:SetTarget(c90411554.rettg) - e2:SetOperation(c90411554.retop) - c:RegisterEffect(e2) - --spsummon - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(90411554,2)) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_HAND) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetCountLimit(1,90411554) - e3:SetCost(c90411554.spcost) - e3:SetTarget(c90411554.sptg) - e3:SetOperation(c90411554.spop) - c:RegisterEffect(e3) - --search - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(90411554,3)) - e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e4:SetCode(EVENT_REMOVE) - e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e4:SetCountLimit(1,90411554) - e4:SetTarget(c90411554.thtg) - e4:SetOperation(c90411554.thop) - c:RegisterEffect(e4) -end -function c90411554.rfilter(c) - return (c:IsRace(RACE_DRAGON) or c:IsAttribute(ATTRIBUTE_EARTH)) and c:IsAbleToRemoveAsCost() -end -function c90411554.hspcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c90411554.rfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,2,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c90411554.rfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,2,2,e:GetHandler()) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c90411554.hsptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c90411554.hspop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) - end -end -function c90411554.retcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp - and bit.band(e:GetHandler():GetSummonType(),SUMMON_TYPE_SPECIAL)==SUMMON_TYPE_SPECIAL -end -function c90411554.rettg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,e:GetHandler(),1,0,0) -end -function c90411554.retop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - Duel.SendtoHand(c,nil,REASON_EFFECT) - end -end -function c90411554.dfilter(c) - return c:IsAttribute(ATTRIBUTE_EARTH) and c:IsDiscardable() and c:IsAbleToGraveAsCost() -end -function c90411554.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsDiscardable() and e:GetHandler():IsAbleToGraveAsCost() - and Duel.IsExistingMatchingCard(c90411554.dfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) - local g=Duel.SelectMatchingCard(tp,c90411554.dfilter,tp,LOCATION_HAND,0,1,1,e:GetHandler()) - g:AddCard(e:GetHandler()) - Duel.SendtoGrave(g,REASON_COST+REASON_DISCARD) -end -function c90411554.spfilter(c,e,tp) - return c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c90411554.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c90411554.spfilter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c90411554.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c90411554.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c90411554.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end -function c90411554.thfilter(c) - return c:IsRace(RACE_DRAGON) and c:IsAttribute(ATTRIBUTE_EARTH) and c:IsAbleToHand() -end -function c90411554.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c90411554.thfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c90411554.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c90411554.thfilter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c904185.lua b/script/c904185.lua deleted file mode 100644 index a3431b18ec..0000000000 --- a/script/c904185.lua +++ /dev/null @@ -1,38 +0,0 @@ ---垂直着陸 -function c904185.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,904185+EFFECT_COUNT_CODE_OATH) - e1:SetCost(c904185.cost) - e1:SetTarget(c904185.target) - e1:SetOperation(c904185.activate) - c:RegisterEffect(e1) -end -function c904185.rfilter(c) - return c:IsAttribute(ATTRIBUTE_WIND) and not c:IsType(TYPE_TOKEN) -end -function c904185.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,c904185.rfilter,1,nil) end - local g=Duel.SelectReleaseGroup(tp,c904185.rfilter,1,10,nil) - e:SetLabel(g:GetCount()) - Duel.Release(g,REASON_COST) -end -function c904185.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsPlayerCanSpecialSummonMonster(tp,31533705,0x101b,0x4011,0,0,3,RACE_MACHINE,ATTRIBUTE_WIND) end - Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,e:GetLabel(),0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,e:GetLabel(),0,0) -end -function c904185.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)0 and - Duel.IsPlayerCanSpecialSummonMonster(tp,90440725,0,0x21,-2,-2,4,RACE_MACHINE,ATTRIBUTE_EARTH) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c90440725.activate(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) then return end - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 - or not Duel.IsPlayerCanSpecialSummonMonster(tp,90440725,0,0x21,-2,-2,4,RACE_MACHINE,ATTRIBUTE_EARTH) then return end - c:AddTrapMonsterAttribute(TYPE_EFFECT,ATTRIBUTE_EARTH,RACE_MACHINE,4,-2,-2) - Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP) - c:TrapMonsterBlock() - --cannot attack - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c90440725.atkcon) - e1:SetOperation(c90440725.atkop) - e1:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e1) - --turn set - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(90440725,0)) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_PHASE+PHASE_END) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCondition(c90440725.setcon) - e2:SetTarget(c90440725.settg) - e2:SetOperation(c90440725.setop) - e2:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e2) -end -function c90440725.atkcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetAttacker():IsControler(1-tp) and Duel.GetAttackTarget()==e:GetHandler() -end -function c90440725.atkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetValue(Duel.GetAttacker():GetAttack()) - e1:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e1) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_DEFENCE_FINAL) - e1:SetValue(Duel.GetAttacker():GetDefence()) - e1:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e1) -end -function c90440725.setcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==1-tp -end -function c90440725.settg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsCanTurnSet() end - Duel.SetOperationInfo(0,CATEGORY_POSITION,e:GetHandler(),1,0,0) -end -function c90440725.setop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsLocation(LOCATION_MZONE) then - Duel.ChangePosition(c,POS_FACEDOWN_DEFENCE) - end -end diff --git a/script/c90464188.lua b/script/c90464188.lua deleted file mode 100644 index 29de4d89e9..0000000000 --- a/script/c90464188.lua +++ /dev/null @@ -1,44 +0,0 @@ ---黒曜岩竜 -function c90464188.initial_effect(c) - --disable - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_DISABLE) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(LOCATION_SZONE,LOCATION_SZONE) - e1:SetTarget(c90464188.distg) - c:RegisterEffect(e1) - --disable effect - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_CHAIN_SOLVING) - e2:SetRange(LOCATION_MZONE) - e2:SetOperation(c90464188.disop) - c:RegisterEffect(e2) - --self destroy - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetCode(EFFECT_SELF_DESTROY) - e3:SetRange(LOCATION_MZONE) - e3:SetTargetRange(LOCATION_SZONE,LOCATION_SZONE) - e3:SetTarget(c90464188.distg) - c:RegisterEffect(e3) -end -function c90464188.distg(e,c) - if c:GetCardTargetCount()==0 then return false end - return c:GetCardTarget():IsExists(c90464188.disfilter,1,nil,e:GetHandlerPlayer()) -end -function c90464188.disfilter(c,tp) - return c:IsControler(tp) and c:IsFaceup() and c:IsLocation(LOCATION_MZONE) and c:IsAttribute(ATTRIBUTE_DARK) -end -function c90464188.disop(e,tp,eg,ep,ev,re,r,rp) - if not re:IsActiveType(TYPE_SPELL+TYPE_TRAP) then return end - if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return end - local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) - if not g or g:GetCount()==0 then return end - if g:IsExists(c90464188.disfilter,1,nil,tp) then - if Duel.NegateEffect(ev) and re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(re:GetHandler(),REASON_EFFECT) - end - end -end diff --git a/script/c90470931.lua b/script/c90470931.lua deleted file mode 100644 index 655c9c1e3e..0000000000 --- a/script/c90470931.lua +++ /dev/null @@ -1,49 +0,0 @@ ---鬼神の連撃 -function c90470931.initial_effect(c) - --multi attack - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c90470931.condition) - e1:SetCost(c90470931.cost) - e1:SetTarget(c90470931.target) - e1:SetOperation(c90470931.operation) - c:RegisterEffect(e1) -end -function c90470931.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsAbleToEnterBP() -end -function c90470931.cost(e,tp,eg,ep,ev,re,r,rp,chk) - e:SetLabel(1) - return true -end -function c90470931.filter(c,cst) - return c:IsFaceup() and c:IsType(TYPE_XYZ) and not c:IsHasEffect(EFFECT_EXTRA_ATTACK) and (not cst or c:GetOverlayCount()~=0) -end -function c90470931.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local chkcost=e:GetLabel()==1 and true or false - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c90470931.filter(chkc,chkcost) end - if chk==0 then - e:SetLabel(0) - return Duel.IsExistingTarget(c90470931.filter,tp,LOCATION_MZONE,0,1,nil,chkcost) - end - e:SetLabel(0) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - local tc=Duel.SelectTarget(tp,c90470931.filter,tp,LOCATION_MZONE,0,1,1,nil,chkcost):GetFirst() - if chkcost then - tc:RemoveOverlayCard(tp,tc:GetOverlayCount(),tc:GetOverlayCount(),REASON_COST) - end -end -function c90470931.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_EXTRA_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e1:SetValue(1) - tc:RegisterEffect(e1) - end -end diff --git a/script/c9047460.lua b/script/c9047460.lua deleted file mode 100644 index 2dffde2163..0000000000 --- a/script/c9047460.lua +++ /dev/null @@ -1,85 +0,0 @@ ---BF-隠れ蓑のスチーム -function c9047460.initial_effect(c) - --token - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(9047460,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_LEAVE_FIELD) - e1:SetCondition(c9047460.tkcon) - e1:SetTarget(c9047460.tktg) - e1:SetOperation(c9047460.tkop) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(9047460,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_GRAVE) - e2:SetCountLimit(1,9047460+EFFECT_COUNT_CODE_DUEL) - e2:SetCost(c9047460.spcost) - e2:SetTarget(c9047460.sptg) - e2:SetOperation(c9047460.spop) - c:RegisterEffect(e2) -end -function c9047460.tkcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsPreviousPosition(POS_FACEUP) and c:GetLocation()~=LOCATION_DECK -end -function c9047460.tktg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0) -end -function c9047460.tkop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - if Duel.IsPlayerCanSpecialSummonMonster(tp,9047461,0,0x4011,100,100,3,RACE_AQUA,ATTRIBUTE_WIND) then - local token=Duel.CreateToken(tp,9047461) - Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP) - end -end -function c9047460.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,nil,1,nil) end - local sg=Duel.SelectReleaseGroup(tp,nil,1,1,nil) - Duel.Release(sg,REASON_COST) -end -function c9047460.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c9047460.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SYNCHRO_MATERIAL_CUSTOM) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetTarget(c9047460.syntg) - e1:SetValue(1) - e1:SetOperation(c9047460.synop) - e1:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e1) - end -end -c9047460.tuner_filter=aux.FilterBoolFunction(Card.IsSetCard,0x33) -function c9047460.synfilter(c,syncard,tuner,f) - return c:IsFaceup() and c:IsNotTuner() and c:IsCanBeSynchroMaterial(syncard,tuner) and c:IsSetCard(0x33) and (f==nil or f(c)) -end -function c9047460.syntg(e,syncard,f,minc,maxc) - local c=e:GetHandler() - local lv=syncard:GetLevel()-c:GetLevel() - if lv<=0 then return false end - local g=Duel.GetMatchingGroup(c9047460.synfilter,syncard:GetControler(),LOCATION_MZONE,LOCATION_MZONE,c,syncard,c,f) - local res=g:CheckWithSumEqual(Card.GetSynchroLevel,lv,minc,maxc,syncard) - return res -end -function c9047460.synop(e,tp,eg,ep,ev,re,r,rp,syncard,f,minc,maxc) - local c=e:GetHandler() - local lv=syncard:GetLevel()-c:GetLevel() - local g=Duel.GetMatchingGroup(c9047460.synfilter,syncard:GetControler(),LOCATION_MZONE,LOCATION_MZONE,c,syncard,c,f) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SMATERIAL) - local sg=g:SelectWithSumEqual(tp,Card.GetSynchroLevel,lv,minc,maxc,syncard) - Duel.SetSynchroMaterial(sg) -end diff --git a/script/c90500169.lua b/script/c90500169.lua deleted file mode 100644 index bfb4f62528..0000000000 --- a/script/c90500169.lua +++ /dev/null @@ -1,51 +0,0 @@ ---レベルダウン!? -function c90500169.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TODECK) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c90500169.target) - e1:SetOperation(c90500169.activate) - c:RegisterEffect(e1) -end -function c90500169.filter(c,e,tp) - if c:IsFacedown() or not c:IsSetCard(0x41) or not c:IsAbleToDeck() then return false end - local code=c:GetCode() - local class=_G["c"..code] - return class and class.lvdncount~=nil and Duel.IsExistingMatchingCard(c90500169.spfilter,tp,LOCATION_GRAVE,0,1,nil,class,e,tp) -end -function c90500169.spfilter(c,class,e,tp) - local code=c:GetCode() - for i=1,class.lvdncount do - if code==class.lvdn[i] then return c:IsCanBeSpecialSummoned(e,0,tp,true,true) end - end - return false -end -function c90500169.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c90500169.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsExistingTarget(c90500169.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - local g=Duel.SelectTarget(tp,c90500169.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE) -end -function c90500169.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - local code=tc:GetCode() - if not tc:IsRelateToEffect(e) then return end - local rc=Duel.SendtoDeck(tc,nil,0,REASON_EFFECT) - if tc:GetLocation()==LOCATION_DECK then Duel.ShuffleDeck(tc:GetControler()) end - if rc==0 then return end - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local class=_G["c"..code] - if class==nil or class.lvdncount==nil then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c90500169.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,class,e,tp) - local tc=g:GetFirst() - if tc then - Duel.SpecialSummon(tc,0,tp,tp,true,true,POS_FACEUP) - end -end diff --git a/script/c90502999.lua b/script/c90502999.lua deleted file mode 100644 index fd426bfd6e..0000000000 --- a/script/c90502999.lua +++ /dev/null @@ -1,25 +0,0 @@ ---地盤沈下 -function c90502999.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c90502999.target) - c:RegisterEffect(e1) - --disable field - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetRange(LOCATION_SZONE) - e2:SetCode(EFFECT_DISABLE_FIELD) - e2:SetOperation(c90502999.disop) - e2:SetLabelObject(e1) - c:RegisterEffect(e2) -end -function c90502999.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)+Duel.GetLocationCount(1-tp,LOCATION_MZONE)>1 end - local dis=Duel.SelectDisableField(tp,2,LOCATION_MZONE,LOCATION_MZONE,0) - e:SetLabel(dis) -end -function c90502999.disop(e,tp) - return e:GetLabelObject():GetLabel() -end diff --git a/script/c90508760.lua b/script/c90508760.lua deleted file mode 100644 index bb7563c95f..0000000000 --- a/script/c90508760.lua +++ /dev/null @@ -1,26 +0,0 @@ ---X-セイバー エアベルン -function c90508760.initial_effect(c) - --handes - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(90508760,0)) - e1:SetCategory(CATEGORY_HANDES) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_BATTLE_DAMAGE) - e1:SetCondition(c90508760.condition) - e1:SetTarget(c90508760.target) - e1:SetOperation(c90508760.operation) - c:RegisterEffect(e1) -end -function c90508760.condition(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp and Duel.GetAttackTarget()==nil -end -function c90508760.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_HANDES,0,0,1-tp,1) -end -function c90508760.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetFieldGroup(ep,LOCATION_HAND,0,nil) - if g:GetCount()==0 then return end - local sg=g:RandomSelect(1-tp,1) - Duel.SendtoGrave(sg,REASON_DISCARD+REASON_EFFECT) -end diff --git a/script/c9053187.lua b/script/c9053187.lua deleted file mode 100644 index 8c7331d6c4..0000000000 --- a/script/c9053187.lua +++ /dev/null @@ -1,6 +0,0 @@ ---覚醒の勇士 ガガギゴ -function c9053187.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,4,3) - c:EnableReviveLimit() -end diff --git a/script/c90555947.lua b/script/c90555947.lua deleted file mode 100644 index 62cbc7a56a..0000000000 --- a/script/c90555947.lua +++ /dev/null @@ -1,45 +0,0 @@ ---ナチュル・ガイアストライオ -function c90555947.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcFunRep(c,c90555947.ffilter,2,false) - --negate - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(90555947,0)) - e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_CHAINING) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c90555947.discon) - e1:SetCost(c90555947.discost) - e1:SetTarget(c90555947.distg) - e1:SetOperation(c90555947.disop) - c:RegisterEffect(e1) -end -function c90555947.ffilter(c) - return c:IsAttribute(ATTRIBUTE_EARTH) and c:IsType(TYPE_SYNCHRO) -end -function c90555947.discon(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) then return false end - if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end - local tg=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) - return tg and tg:GetCount()==1 and tg:GetFirst():IsOnField() and Duel.IsChainNegatable(ev) -end -function c90555947.discost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,Card.IsAbleToGraveAsCost,1,1,REASON_COST) -end -function c90555947.distg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) - end -end -function c90555947.disop(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateActivation(ev) - if re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(eg,REASON_EFFECT) - end -end diff --git a/script/c90557975.lua b/script/c90557975.lua deleted file mode 100644 index c7dfb01171..0000000000 --- a/script/c90557975.lua +++ /dev/null @@ -1,39 +0,0 @@ ---上昇気流 -function c90557975.initial_effect(c) - --damage - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c90557975.damcost) - e1:SetTarget(c90557975.damtg) - e1:SetOperation(c90557975.damop) - c:RegisterEffect(e1) -end -function c90557975.filter(c) - return c:GetCounter(0x19)>0 -end -function c90557975.damcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c90557975.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - local g=Duel.GetMatchingGroup(c90557975.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - local tc=g:GetFirst() - local s=0 - while tc do - local ct=tc:GetCounter(0x19) - s=s+ct - tc:RemoveCounter(tp,0x19,ct,REASON_COST) - tc=g:GetNext() - end - e:SetLabel(s*300) -end -function c90557975.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(e:GetLabel()) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,e:GetLabel()) -end -function c90557975.damop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c9056100.lua b/script/c9056100.lua deleted file mode 100644 index a179f5f89d..0000000000 --- a/script/c9056100.lua +++ /dev/null @@ -1,11 +0,0 @@ ---氷結界の虎将 グルナード -function c9056100.initial_effect(c) - --extra summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(LOCATION_HAND+LOCATION_MZONE,0) - e1:SetCode(EFFECT_EXTRA_SUMMON_COUNT) - e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x2f)) - c:RegisterEffect(e1) -end diff --git a/script/c90576781.lua b/script/c90576781.lua deleted file mode 100644 index 1098aff213..0000000000 --- a/script/c90576781.lua +++ /dev/null @@ -1,37 +0,0 @@ ---レプティレス・ポイズン -function c90576781.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_POSITION) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c90576781.condition) - e1:SetTarget(c90576781.target) - e1:SetOperation(c90576781.activate) - c:RegisterEffect(e1) -end -function c90576781.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x3c) -end -function c90576781.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c90576781.cfilter,tp,LOCATION_MZONE,0,1,nil) -end -function c90576781.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsDefencePos() end - if chk==0 then return Duel.IsExistingTarget(Card.IsDefencePos,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DEFENCE) - local g=Duel.SelectTarget(tp,Card.IsDefencePos,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0) -end -function c90576781.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsDefencePos() and tc:IsRelateToEffect(e) and Duel.ChangePosition(tc,0,0,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK)~=0 then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetValue(0) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - end -end diff --git a/script/c90592429.lua b/script/c90592429.lua deleted file mode 100644 index 12d30cfbc5..0000000000 --- a/script/c90592429.lua +++ /dev/null @@ -1,90 +0,0 @@ ---ヴァイロン・フィラメント -function c90592429.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c90592429.target) - e1:SetOperation(c90592429.operation) - c:RegisterEffect(e1) - --Actlimit - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetRange(LOCATION_SZONE) - e2:SetCode(EVENT_ATTACK_ANNOUNCE) - e2:SetOperation(c90592429.lmop) - c:RegisterEffect(e2) - --Equip limit - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_EQUIP_LIMIT) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e3:SetValue(c90592429.eqlimit) - c:RegisterEffect(e3) - --Search - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(90592429,0)) - e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e4:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP) - e4:SetCode(EVENT_TO_GRAVE) - e4:SetCondition(c90592429.thcon) - e4:SetTarget(c90592429.thtg) - e4:SetOperation(c90592429.thop) - c:RegisterEffect(e4) -end -function c90592429.eqlimit(e,c) - return c:IsSetCard(0x30) -end -function c90592429.filter(c) - return c:IsFaceup() and c:IsSetCard(0x30) -end -function c90592429.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:GetLocation()==LOCATION_MZONE and c90592429.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c90592429.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c90592429.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c90592429.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,c,tc) - end -end -function c90592429.lmop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetAttacker()~=e:GetHandler():GetEquipTarget() then return end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EFFECT_CANNOT_ACTIVATE) - e1:SetTargetRange(0,1) - e1:SetValue(c90592429.aclimit) - e1:SetReset(RESET_PHASE+PHASE_DAMAGE) - Duel.RegisterEffect(e1,tp) -end -function c90592429.aclimit(e,re,tp) - return re:IsHasType(EFFECT_TYPE_ACTIVATE) -end -function c90592429.thcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousPosition(POS_FACEUP) - and e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) -end -function c90592429.thfilter(c) - return c:IsSetCard(0x30) and c:IsType(TYPE_SPELL) and c:IsAbleToHand() -end -function c90592429.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c90592429.thfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c90592429.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c90592429.thfilter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c9059700.lua b/script/c9059700.lua deleted file mode 100644 index 800e1092bc..0000000000 --- a/script/c9059700.lua +++ /dev/null @@ -1,33 +0,0 @@ ---インフェルニティ・バリア -function c9059700.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_CHAINING) - e1:SetCondition(c9059700.condition) - e1:SetTarget(c9059700.target) - e1:SetOperation(c9059700.activate) - c:RegisterEffect(e1) -end -function c9059700.cfilter(c) - return c:IsPosition(POS_FACEUP_ATTACK) and c:IsSetCard(0xb) -end -function c9059700.condition(e,tp,eg,ep,ev,re,r,rp) - if ep==tp or not Duel.IsExistingMatchingCard(c9059700.cfilter,tp,LOCATION_MZONE,0,1,nil) - or Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)~=0 then return false end - return Duel.IsChainNegatable(ev) and (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE)) -end -function c9059700.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) - end -end -function c9059700.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateActivation(ev) - if re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(eg,REASON_EFFECT) - end -end diff --git a/script/c90616316.lua b/script/c90616316.lua deleted file mode 100644 index bb1fb9efa3..0000000000 --- a/script/c90616316.lua +++ /dev/null @@ -1,63 +0,0 @@ ---魔轟神獣ペガラサス -function c90616316.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(90616316,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCondition(c90616316.spcon) - e1:SetTarget(c90616316.sptg) - e1:SetOperation(c90616316.spop) - c:RegisterEffect(e1) - --to grave - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(90616316,1)) - e2:SetCategory(CATEGORY_TOGRAVE) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e2:SetCode(EVENT_FLIP) - e2:SetCost(c90616316.cost2) - e2:SetTarget(c90616316.tg2) - e2:SetOperation(c90616316.op2) - c:RegisterEffect(e2) -end -function c90616316.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_HAND) and bit.band(r,REASON_DISCARD)~=0 -end -function c90616316.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENCE) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c90616316.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEDOWN_DEFENCE) - Duel.ConfirmCards(1-tp,c) - end -end -function c90616316.cfilter(c) - return c:IsSetCard(0x35) and not c:IsPublic() -end -function c90616316.cost2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c90616316.cfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) - local g=Duel.SelectMatchingCard(tp,c90616316.cfilter,tp,LOCATION_HAND,0,1,1,nil) - Duel.ConfirmCards(1-tp,g) - Duel.ShuffleHand(tp) -end -function c90616316.filter2(c) - return c:IsSetCard(0x35) and c:IsAbleToGrave() -end -function c90616316.tg2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c90616316.filter2,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) -end -function c90616316.op2(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c90616316.filter2,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoGrave(g,REASON_EFFECT) - end -end diff --git a/script/c90640901.lua b/script/c90640901.lua deleted file mode 100644 index 7d2f05c6ad..0000000000 --- a/script/c90640901.lua +++ /dev/null @@ -1,58 +0,0 @@ ---リバース・バスター -function c90640901.initial_effect(c) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET) - e1:SetValue(c90640901.vala) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_CANNOT_DIRECT_ATTACK) - c:RegisterEffect(e2) - --actlimit - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e3:SetCode(EVENT_ATTACK_ANNOUNCE) - e3:SetOperation(c90640901.atkop) - c:RegisterEffect(e3) - --destroy - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(90640901,0)) - e4:SetCategory(CATEGORY_DESTROY) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e4:SetCode(EVENT_BATTLE_START) - e4:SetCondition(c90640901.descon) - e4:SetTarget(c90640901.destg) - e4:SetOperation(c90640901.desop) - c:RegisterEffect(e4) -end -function c90640901.vala(e,c) - return not c:IsFacedown() -end -function c90640901.atkop(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EFFECT_CANNOT_ACTIVATE) - e1:SetTargetRange(0,1) - e1:SetValue(c90640901.aclimit) - e1:SetReset(RESET_PHASE+PHASE_DAMAGE) - Duel.RegisterEffect(e1,tp) -end -function c90640901.aclimit(e,re,tp) - return re:IsHasType(EFFECT_TYPE_ACTIVATE) -end -function c90640901.descon(e,tp,eg,ep,ev,re,r,rp) - local d=Duel.GetAttackTarget() - return e:GetHandler()==Duel.GetAttacker() and d and d:IsFacedown() and d:IsDefencePos() -end -function c90640901.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,Duel.GetAttackTarget(),1,0,0) -end -function c90640901.desop(e,tp,eg,ep,ev,re,r,rp) - local d=Duel.GetAttackTarget() - if d:IsRelateToBattle() then - Duel.Destroy(d,REASON_EFFECT) - end -end diff --git a/script/c90642597.lua b/script/c90642597.lua deleted file mode 100644 index 15ae53a593..0000000000 --- a/script/c90642597.lua +++ /dev/null @@ -1,42 +0,0 @@ ---未来サムライ -function c90642597.initial_effect(c) - aux.EnableDualAttribute(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(90642597,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCondition(aux.IsDualState) - e1:SetCost(c90642597.cost) - e1:SetTarget(c90642597.target) - e1:SetOperation(c90642597.operation) - c:RegisterEffect(e1) -end -function c90642597.costfilter(c) - return c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost() -end -function c90642597.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c90642597.costfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c90642597.costfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c90642597.dfilter(c) - return c:IsFaceup() and c:IsDestructable() -end -function c90642597.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c90642597.dfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c90642597.dfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c90642597.dfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c90642597.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c90654356.lua b/script/c90654356.lua deleted file mode 100644 index 7504020ac9..0000000000 --- a/script/c90654356.lua +++ /dev/null @@ -1,26 +0,0 @@ ---暗黒プテラ -function c90654356.initial_effect(c) - --to grave - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(90654356,0)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCondition(c90654356.condition) - e1:SetTarget(c90654356.target) - e1:SetOperation(c90654356.operation) - c:RegisterEffect(e1) -end -function c90654356.condition(e,tp,eg,ep,ev,re,r,rp) - return not e:GetHandler():IsReason(REASON_BATTLE) and e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) -end -function c90654356.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0) -end -function c90654356.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SendtoHand(c,nil,REASON_EFFECT) - end -end diff --git a/script/c90660762.lua b/script/c90660762.lua deleted file mode 100644 index 6199d12c22..0000000000 --- a/script/c90660762.lua +++ /dev/null @@ -1,6 +0,0 @@ ---メテオ・ブラック・ドラゴン -function c90660762.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcCode2(c,74677422,64271667,true,true) -end diff --git a/script/c90669991.lua b/script/c90669991.lua deleted file mode 100644 index 424aff66bb..0000000000 --- a/script/c90669991.lua +++ /dev/null @@ -1,30 +0,0 @@ ---パイナップル爆弾 -function c90669991.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetCondition(c90669991.condition) - e1:SetTarget(c90669991.target) - e1:SetOperation(c90669991.activate) - c:RegisterEffect(e1) -end -function c90669991.condition(e,tp,eg,ep,ev,re,r,rp) - return ep==tp and Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0) -end -function c90669991.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,0,LOCATION_MZONE,nil) - local ct=Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)-Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,ct,0,0) -end -function c90669991.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,0,LOCATION_MZONE,nil) - local ct=Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)-Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0) - if ct>0 then - Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_DESTROY) - local dg=g:Select(1-tp,ct,ct,nil) - Duel.Destroy(dg,REASON_EFFECT) - end -end diff --git a/script/c90673413.lua b/script/c90673413.lua deleted file mode 100644 index 40fad4379d..0000000000 --- a/script/c90673413.lua +++ /dev/null @@ -1,84 +0,0 @@ ---ガガガリベンジ -function c90673413.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c90673413.target) - e1:SetOperation(c90673413.operation) - c:RegisterEffect(e1) - --Destroy - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE) - e2:SetCode(EVENT_LEAVE_FIELD) - e2:SetOperation(c90673413.desop) - c:RegisterEffect(e2) - --atkup - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(90673413,0)) - e3:SetCategory(CATEGORY_ATKCHANGE) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e3:SetCode(EVENT_TO_GRAVE) - e3:SetCondition(c90673413.atkcon) - e3:SetOperation(c90673413.atkop) - c:RegisterEffect(e3) -end -function c90673413.filter(c,e,tp) - return c:IsSetCard(0x54) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c90673413.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c90673413.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c90673413.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c90673413.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c90673413.eqlimit(e,c) - return e:GetOwner()==c -end -function c90673413.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then - if Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)==0 then return end - Duel.Equip(tp,c,tc) - --Add Equip limit - local e1=Effect.CreateEffect(tc) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(c90673413.eqlimit) - c:RegisterEffect(e1) - end -end -function c90673413.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetHandler():GetEquipTarget() - if tc and tc:IsLocation(LOCATION_MZONE) then - Duel.Destroy(tc,REASON_EFFECT) - end -end -function c90673413.atkcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsReason(REASON_LOST_TARGET) and c:GetPreviousEquipTarget():IsLocation(LOCATION_OVERLAY) -end -function c90673413.atkfilter(c) - return c:IsFaceup() and c:IsType(TYPE_XYZ) -end -function c90673413.atkop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c90673413.atkfilter,tp,LOCATION_MZONE,0,nil) - local tc=g:GetFirst() - while tc do - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(300) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - tc=g:GetNext() - end -end diff --git a/script/c90726340.lua b/script/c90726340.lua deleted file mode 100644 index 0744aff9eb..0000000000 --- a/script/c90726340.lua +++ /dev/null @@ -1,66 +0,0 @@ ---竜魔人 クィーンドラグーン -function c90726340.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,4,2) - c:EnableReviveLimit() - -- - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e1:SetTarget(c90726340.indtg) - e1:SetValue(1) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(90726340,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCost(c90726340.spcost) - e2:SetTarget(c90726340.sptg) - e2:SetOperation(c90726340.spop) - c:RegisterEffect(e2) -end -function c90726340.indtg(e,c) - return c:IsRace(RACE_DRAGON) and c:GetCode()~=90726340 -end -function c90726340.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c90726340.spfilter(c,e,tp) - return c:IsLevelAbove(5) and c:IsRace(RACE_DRAGON) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c90726340.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c90726340.spfilter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c90726340.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c90726340.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c90726340.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1,true) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e2,true) - local e3=Effect.CreateEffect(e:GetHandler()) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_CANNOT_ATTACK) - e3:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e3,true) - Duel.SpecialSummonComplete() - end -end diff --git a/script/c90727556.lua b/script/c90727556.lua deleted file mode 100644 index 7db57ca1b1..0000000000 --- a/script/c90727556.lua +++ /dev/null @@ -1,66 +0,0 @@ ---インヴェルズの斥候 -function c90727556.initial_effect(c) - --Special Summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(90727556,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetRange(LOCATION_GRAVE) - e1:SetCondition(c90727556.condition) - e1:SetCost(c90727556.cost) - e1:SetTarget(c90727556.target) - e1:SetOperation(c90727556.operation) - c:RegisterEffect(e1) - --cannot release - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EFFECT_UNRELEASABLE_NONSUM) - e2:SetValue(1) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EFFECT_UNRELEASABLE_SUM) - e3:SetValue(c90727556.sumlimit) - c:RegisterEffect(e3) - --cannot be synchro material - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e4:SetRange(LOCATION_MZONE) - e4:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL) - e4:SetValue(1) - c:RegisterEffect(e4) -end -function c90727556.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()==PHASE_MAIN1 and not Duel.CheckPhaseActivity() and e:GetHandler():IsSetCard(0x100a) - and not Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_ONFIELD,0,1,nil,TYPE_SPELL+TYPE_TRAP) -end -function c90727556.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_SPSUMMON)==0 end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) - e1:SetTargetRange(1,0) - e1:SetLabelObject(e) - e1:SetTarget(c90727556.splimit) - Duel.RegisterEffect(e1,tp) -end -function c90727556.splimit(e,c,sump,sumtype,sumpos,targetp,se) - return e:GetLabelObject()~=se -end -function c90727556.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c90727556.operation(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP) - end -end -function c90727556.sumlimit(e,c) - return not c:IsSetCard(0x100a) -end diff --git a/script/c90740329.lua b/script/c90740329.lua deleted file mode 100644 index c8bff8ccfc..0000000000 --- a/script/c90740329.lua +++ /dev/null @@ -1,33 +0,0 @@ ---挑発 -function c90740329.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_MAIN_END) - e1:SetCondition(c90740329.condition) - e1:SetTarget(c90740329.target) - e1:SetOperation(c90740329.activate) - c:RegisterEffect(e1) -end -function c90740329.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp and Duel.GetCurrentPhase()==PHASE_MAIN1 -end -function c90740329.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,nil) -end -function c90740329.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_MUST_BE_ATTACKED) - e1:SetValue(aux.imval1) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - end -end diff --git a/script/c90743290.lua b/script/c90743290.lua deleted file mode 100644 index c8cf0fa4ba..0000000000 --- a/script/c90743290.lua +++ /dev/null @@ -1,28 +0,0 @@ ---魔導老士 エアミット -function c90743290.initial_effect(c) - --atk/lvup - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EVENT_CHAIN_SOLVING) - e1:SetCondition(c90743290.condition) - e1:SetOperation(c90743290.operation) - c:RegisterEffect(e1) -end -function c90743290.condition(e,tp,eg,ep,ev,re,r,rp) - return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL) and re:GetHandler():IsSetCard(0x106e) -end -function c90743290.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_COPY_INHERIT) - e1:SetCode(EFFECT_UPDATE_LEVEL) - e1:SetValue(2) - e1:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(300) - c:RegisterEffect(e2) -end diff --git a/script/c9074847.lua b/script/c9074847.lua deleted file mode 100644 index 204fd27e9f..0000000000 --- a/script/c9074847.lua +++ /dev/null @@ -1,57 +0,0 @@ ---大騒動 -function c9074847.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_TO_HAND) - e1:SetCondition(c9074847.condition) - e1:SetTarget(c9074847.target) - e1:SetOperation(c9074847.operation) - c:RegisterEffect(e1) -end -function c9074847.confilter(c,tp) - return c:IsControler(tp) and c:IsPreviousLocation(LOCATION_MZONE) -end -function c9074847.condition(e,tp,eg,ep,ev,re,r,rp) - return rp~=tp and eg:IsExists(c9074847.confilter,1,nil,tp) -end -function c9074847.thfilter(c,tp) - return c:IsLocation(LOCATION_HAND) and c:IsControler(tp) -end -function c9074847.spfilter(c,e,tp) - return c:GetLevel()<=4 and c:IsSummonableCard() and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c9074847.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - local g=Duel.GetMatchingGroup(Card.IsAbleToHand,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0) -end -function c9074847.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsAbleToHand,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - if g:GetCount()==0 then return end - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.BreakEffect() - local og=Duel.GetOperatedGroup() - local ct1=og:FilterCount(c9074847.thfilter,nil,tp) - local ct2=og:FilterCount(c9074847.thfilter,nil,1-tp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g1=Duel.SelectMatchingCard(tp,c9074847.spfilter,tp,LOCATION_HAND,0,ct1,ct1,nil,e,tp) - if g1:GetCount()>0 then - local tc=g1:GetFirst() - while tc do - Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEDOWN_DEFENCE) - tc=g1:GetNext() - end - end - Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_SPSUMMON) - local g2=Duel.SelectMatchingCard(1-tp,c9074847.spfilter,1-tp,LOCATION_HAND,0,ct2,ct2,nil,e,1-tp) - if g2:GetCount()>0 then - local tc=g2:GetFirst() - while tc do - Duel.SpecialSummonStep(tc,0,1-tp,1-tp,false,false,POS_FACEDOWN_DEFENCE) - tc=g2:GetNext() - end - end - Duel.SpecialSummonComplete() -end diff --git a/script/c9076207.lua b/script/c9076207.lua deleted file mode 100644 index cd90472ace..0000000000 --- a/script/c9076207.lua +++ /dev/null @@ -1,31 +0,0 @@ ---青い忍者 -function c9076207.initial_effect(c) - --flip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(9076207,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP) - e1:SetTarget(c9076207.target) - e1:SetOperation(c9076207.operation) - c:RegisterEffect(e1) -end -function c9076207.filter(c) - return c:IsFacedown() or c:IsType(TYPE_SPELL) -end -function c9076207.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_SZONE) and c9076207.filter(chkc) end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c9076207.filter,tp,LOCATION_SZONE,LOCATION_SZONE,1,1,nil) - if g:GetCount()>0 and g:GetFirst():IsFaceup() then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) - end -end -function c9076207.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - if tc:IsFacedown() then Duel.ConfirmCards(tp,tc) end - if tc:IsType(TYPE_SPELL) then Duel.Destroy(tc,REASON_EFFECT) end - end -end diff --git a/script/c90764875.lua b/script/c90764875.lua deleted file mode 100644 index a45743bd09..0000000000 --- a/script/c90764875.lua +++ /dev/null @@ -1,35 +0,0 @@ ---ゴルゴニック・グール -function c90764875.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(90764875,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(2,90764875) - e1:SetCondition(c90764875.spcon) - e1:SetCost(c90764875.spcost) - e1:SetTarget(c90764875.sptg) - e1:SetOperation(c90764875.spop) - c:RegisterEffect(e1) -end -function c90764875.cfilter(c) - return c:IsFaceup() and c:IsCode(90764875) -end -function c90764875.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c90764875.cfilter,tp,LOCATION_ONFIELD,0,1,nil) -end -function c90764875.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,300) end - Duel.PayLPCost(tp,300) -end -function c90764875.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c90764875.spop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c90790253.lua b/script/c90790253.lua deleted file mode 100644 index c8df0a36b9..0000000000 --- a/script/c90790253.lua +++ /dev/null @@ -1,28 +0,0 @@ ---リトル・ウィンガード -function c90790253.initial_effect(c) - --pos change - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(90790253,0)) - e1:SetCategory(CATEGORY_POSITION) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCondition(c90790253.poscon) - e1:SetTarget(c90790253.postg) - e1:SetOperation(c90790253.posop) - c:RegisterEffect(e1) -end -function c90790253.poscon(e,tp,eg,ep,ev,re,r,rp) - return tp==Duel.GetTurnPlayer() -end -function c90790253.postg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_POSITION,e:GetHandler(),1,0,0) -end -function c90790253.posop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.ChangePosition(c,POS_FACEUP_DEFENCE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK) - end -end diff --git a/script/c90810762.lua b/script/c90810762.lua deleted file mode 100644 index e2e6fbc3f5..0000000000 --- a/script/c90810762.lua +++ /dev/null @@ -1,32 +0,0 @@ ---逆巻く炎の精霊 -function c90810762.initial_effect(c) - --direct attack - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DIRECT_ATTACK) - c:RegisterEffect(e1) - --atkup - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(90810762,0)) - e2:SetCategory(CATEGORY_ATKCHANGE) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_BATTLE_DAMAGE) - e2:SetCondition(c90810762.atkcon) - e2:SetOperation(c90810762.atkop) - c:RegisterEffect(e2) -end -function c90810762.atkcon(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp and Duel.GetAttackTarget()==nil -end -function c90810762.atkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetProperty(EFFECT_FLAG_COPY_INHERIT) - e1:SetValue(1000) - e1:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e1) - end -end diff --git a/script/c90844184.lua b/script/c90844184.lua deleted file mode 100644 index 6b4f348283..0000000000 --- a/script/c90844184.lua +++ /dev/null @@ -1,4 +0,0 @@ ---ガルマソード -function c90844184.initial_effect(c) - c:EnableReviveLimit() -end diff --git a/script/c90846359.lua b/script/c90846359.lua deleted file mode 100644 index 2b4177f748..0000000000 --- a/script/c90846359.lua +++ /dev/null @@ -1,105 +0,0 @@ ---群雄割拠 -function c90846359.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_DRAW_PHASE+0x1c0) - e1:SetTarget(c90846359.acttg) - c:RegisterEffect(e1) - --adjust - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e2:SetCode(EVENT_ADJUST) - e2:SetRange(LOCATION_SZONE) - e2:SetOperation(c90846359.adjustop) - c:RegisterEffect(e2) - --cannot summon,spsummon,flipsummon - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_FIELD) - e4:SetRange(LOCATION_SZONE) - e4:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e4:SetTargetRange(1,1) - e4:SetTarget(c90846359.sumlimit) - c:RegisterEffect(e4) - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_FIELD) - e5:SetRange(LOCATION_SZONE) - e5:SetCode(EFFECT_CANNOT_SUMMON) - e5:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e5:SetTargetRange(1,1) - e5:SetTarget(c90846359.sumlimit) - c:RegisterEffect(e5) - local e6=Effect.CreateEffect(c) - e6:SetType(EFFECT_TYPE_FIELD) - e6:SetRange(LOCATION_SZONE) - e6:SetCode(EFFECT_CANNOT_FLIP_SUMMON) - e6:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e6:SetTargetRange(1,1) - e6:SetTarget(c90846359.sumlimit) - c:RegisterEffect(e6) -end -c90846359[0]=0 -c90846359[1]=0 -function c90846359.acttg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - c90846359[0]=0 - c90846359[1]=0 -end -function c90846359.sumlimit(e,c,sump,sumtype,sumpos,targetp) - if sumpos and bit.band(sumpos,POS_FACEDOWN)>0 then return false end - local rc=c90846359[sump] - if targetp then rc=c90846359[targetp] end - if rc==0 then return false end - return c:GetRace()~=rc -end -function c90846359.getrace(g) - local arc=0 - local tc=g:GetFirst() - while tc do - arc=bit.bor(arc,tc:GetRace()) - tc=g:GetNext() - end - return arc -end -function c90846359.rmfilter(c,rc) - return c:GetRace()==rc -end -function c90846359.adjustop(e,tp,eg,ep,ev,re,r,rp) - local phase=Duel.GetCurrentPhase() - if (phase==PHASE_DAMAGE and not Duel.IsDamageCalculated()) or phase==PHASE_DAMAGE_CAL then return end - local g1=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil) - local g2=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil) - local c=e:GetHandler() - if g1:GetCount()==0 then c90846359[tp]=0 - else - local rac=c90846359.getrace(g1) - if bit.band(rac,rac-1)~=0 then - if c90846359[tp]==0 or bit.band(c90846359[tp],rac)==0 then - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(90846359,0)) - rac=Duel.AnnounceRace(tp,1,rac) - else rac=c90846359[tp] end - end - g1:Remove(c90846359.rmfilter,nil,rac) - c90846359[tp]=rac - end - if g2:GetCount()==0 then c90846359[1-tp]=0 - else - local rac=c90846359.getrace(g2) - if bit.band(rac,rac-1)~=0 then - if c90846359[1-tp]==0 or bit.band(c90846359[1-tp],rac)==0 then - Duel.Hint(HINT_SELECTMSG,1-tp,aux.Stringid(90846359,0)) - rac=Duel.AnnounceRace(1-tp,1,rac) - else rac=c90846359[1-tp] end - end - g2:Remove(c90846359.rmfilter,nil,rac) - c90846359[1-tp]=rac - end - g1:Merge(g2) - if g1:GetCount()>0 then - Duel.SendtoGrave(g1,REASON_RULE) - Duel.Readjust() - end -end diff --git a/script/c90873992.lua b/script/c90873992.lua deleted file mode 100644 index d13e964bba..0000000000 --- a/script/c90873992.lua +++ /dev/null @@ -1,23 +0,0 @@ ---戦士抹殺 -function c90873992.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c90873992.target) - e1:SetOperation(c90873992.activate) - c:RegisterEffect(e1) -end -function c90873992.filter(c) - return c:IsRace(RACE_WARRIOR) and c:IsFaceup() and c:IsDestructable() -end -function c90873992.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c90873992.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - local sg=Duel.GetMatchingGroup(c90873992.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,sg:GetCount(),0,0) -end -function c90873992.activate(e,tp,eg,ep,ev,re,r,rp) - local sg=Duel.GetMatchingGroup(c90873992.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - Duel.Destroy(sg,REASON_EFFECT) -end diff --git a/script/c90885155.lua b/script/c90885155.lua deleted file mode 100644 index 4cc698523e..0000000000 --- a/script/c90885155.lua +++ /dev/null @@ -1,150 +0,0 @@ ---クリフォート・シェル -function c90885155.initial_effect(c) - --pendulum summon - aux.AddPendulumProcedure(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --splimit - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE) - e2:SetRange(LOCATION_PZONE) - e2:SetTargetRange(1,0) - e2:SetCondition(aux.nfbdncon) - e2:SetTarget(c90885155.splimit) - c:RegisterEffect(e2) - --atk down - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetRange(LOCATION_PZONE) - e3:SetCode(EFFECT_UPDATE_ATTACK) - e3:SetTargetRange(0,LOCATION_MZONE) - e3:SetValue(-300) - c:RegisterEffect(e3) - --summon with no tribute - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(90885155,0)) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e4:SetCode(EFFECT_SUMMON_PROC) - e4:SetCondition(c90885155.ntcon) - c:RegisterEffect(e4) - --change level - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_SINGLE) - e5:SetCode(EFFECT_SUMMON_COST) - e5:SetOperation(c90885155.lvop) - c:RegisterEffect(e5) - local e6=Effect.CreateEffect(c) - e6:SetType(EFFECT_TYPE_SINGLE) - e6:SetCode(EFFECT_SPSUMMON_COST) - e6:SetOperation(c90885155.lvop2) - c:RegisterEffect(e6) - --immune - local e7=Effect.CreateEffect(c) - e7:SetType(EFFECT_TYPE_SINGLE) - e7:SetCode(EFFECT_IMMUNE_EFFECT) - e7:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_UNCOPYABLE) - e7:SetRange(LOCATION_MZONE) - e7:SetCondition(c90885155.immcon) - e7:SetValue(aux.qlifilter) - c:RegisterEffect(e7) - --effect - local e8=Effect.CreateEffect(c) - e8:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e8:SetCode(EVENT_SUMMON_SUCCESS) - e8:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e8:SetCondition(c90885155.effcon) - e8:SetOperation(c90885155.effop) - c:RegisterEffect(e8) - --tribute check - local e9=Effect.CreateEffect(c) - e9:SetType(EFFECT_TYPE_SINGLE) - e9:SetCode(EFFECT_MATERIAL_CHECK) - e9:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e9:SetValue(c90885155.valcheck) - e9:SetLabelObject(e8) - c:RegisterEffect(e9) -end -function c90885155.splimit(e,c) - return not c:IsSetCard(0xaa) -end -function c90885155.ntcon(e,c,minc) - if c==nil then return true end - return minc==0 and c:GetLevel()>4 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 -end -function c90885155.lvcon(e) - return e:GetHandler():GetMaterialCount()==0 -end -function c90885155.lvop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CHANGE_LEVEL) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c90885155.lvcon) - e1:SetValue(4) - e1:SetReset(RESET_EVENT+0xff0000) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_SET_BASE_ATTACK) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetCondition(c90885155.lvcon) - e2:SetValue(1800) - e2:SetReset(RESET_EVENT+0xff0000) - c:RegisterEffect(e2) -end -function c90885155.lvop2(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CHANGE_LEVEL) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetValue(4) - e1:SetReset(RESET_EVENT+0xff0000) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_SET_BASE_ATTACK) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetValue(1800) - e2:SetReset(RESET_EVENT+0xff0000) - c:RegisterEffect(e2) -end -function c90885155.immcon(e) - return bit.band(e:GetHandler():GetSummonType(),SUMMON_TYPE_NORMAL)==SUMMON_TYPE_NORMAL -end -function c90885155.effcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_ADVANCE and e:GetLabel()==1 -end -function c90885155.effop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_EXTRA_ATTACK) - e1:SetValue(1) - e1:SetReset(RESET_EVENT+0x1fc0000) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_PIERCE) - e2:SetReset(RESET_EVENT+0x1fc0000) - c:RegisterEffect(e2) -end -function c90885155.valcheck(e,c) - local g=c:GetMaterial() - if g:IsExists(Card.IsSetCard,1,nil,0xaa) then - e:GetLabelObject():SetLabel(1) - else - e:GetLabelObject():SetLabel(0) - end -end diff --git a/script/c90887783.lua b/script/c90887783.lua deleted file mode 100644 index 209165280d..0000000000 --- a/script/c90887783.lua +++ /dev/null @@ -1,34 +0,0 @@ ---竜の交感 -function c90887783.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TODECK+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c90887783.target) - e1:SetOperation(c90887783.operation) - c:RegisterEffect(e1) -end -function c90887783.filter1(c,tp) - return c:IsRace(RACE_DRAGON) and c:IsAbleToDeck() and not c:IsPublic() - and Duel.IsExistingMatchingCard(c90887783.filter2,tp,LOCATION_DECK,0,1,nil,c:GetLevel()) -end -function c90887783.filter2(c,lv) - return c:IsRace(RACE_DRAGON) and c:GetLevel()==lv and c:IsAbleToHand() -end -function c90887783.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c90887783.filter1,tp,LOCATION_HAND,0,1,nil,tp) end - Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_HAND) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c90887783.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g1=Duel.SelectMatchingCard(tp,c90887783.filter1,tp,LOCATION_HAND,0,1,1,nil,tp) - Duel.ConfirmCards(1-tp,g1) - if g1:GetCount()==0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g2=Duel.SelectMatchingCard(tp,c90887783.filter2,tp,LOCATION_DECK,0,1,1,nil,g1:GetFirst():GetLevel()) - Duel.SendtoHand(g2,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g2) - Duel.SendtoDeck(g1,nil,2,REASON_EFFECT) -end diff --git a/script/c90925163.lua b/script/c90925163.lua deleted file mode 100644 index 4ff66ca665..0000000000 --- a/script/c90925163.lua +++ /dev/null @@ -1,32 +0,0 @@ ---踊る妖精 -function c90925163.initial_effect(c) - --recover - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(90925163,0)) - e1:SetCategory(CATEGORY_RECOVER) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCondition(c90925163.condition) - e1:SetTarget(c90925163.target) - e1:SetOperation(c90925163.operation) - c:RegisterEffect(e1) -end -function c90925163.condition(e,tp,eg,ep,ev,re,r,rp) - return tp==Duel.GetTurnPlayer() and e:GetHandler():IsDefencePos() -end -function c90925163.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(1000) - Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,1000) -end -function c90925163.operation(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsPosition(POS_FACEUP_DEFENCE) then - Duel.Recover(p,d,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/script/c90928333.lua b/script/c90928333.lua deleted file mode 100644 index 54a9b51223..0000000000 --- a/script/c90928333.lua +++ /dev/null @@ -1,30 +0,0 @@ ---闇の量産工場 -function c90928333.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c90928333.target) - e1:SetOperation(c90928333.activate) - c:RegisterEffect(e1) -end -function c90928333.filter(c) - return c:IsType(TYPE_NORMAL) and c:IsAbleToHand() -end -function c90928333.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c90928333.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c90928333.filter,tp,LOCATION_GRAVE,0,2,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c90928333.filter,tp,LOCATION_GRAVE,0,2,2,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,2,0,0) -end -function c90928333.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local sg=g:Filter(Card.IsRelateToEffect,nil,e) - if sg:GetCount()>0 then - Duel.SendtoHand(sg,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,sg) - end -end diff --git a/script/c90934570.lua b/script/c90934570.lua deleted file mode 100644 index 93c50e203a..0000000000 --- a/script/c90934570.lua +++ /dev/null @@ -1,35 +0,0 @@ ---侵略の侵喰崩壊 -function c90934570.initial_effect(c) - --remove & tohand - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_REMOVE+CATEGORY_TOHAND) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,0x1c0) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c90934570.target) - e1:SetOperation(c90934570.operation) - c:RegisterEffect(e1) -end -function c90934570.rmfilter(c) - return c:IsFaceup() and c:IsSetCard(0xa) and c:IsAbleToRemove() -end -function c90934570.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - if chk==0 then return Duel.IsExistingTarget(c90934570.rmfilter,tp,LOCATION_MZONE,0,1,nil) - and Duel.IsExistingTarget(Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,2,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g1=Duel.SelectTarget(tp,c90934570.rmfilter,tp,LOCATION_MZONE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g1,1,0,0) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g2=Duel.SelectTarget(tp,Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,2,2,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g2,g2:GetCount(),0,0) -end -function c90934570.operation(e,tp,eg,ep,ev,re,r,rp) - local ex,g1=Duel.GetOperationInfo(0,CATEGORY_REMOVE) - local ex,g2=Duel.GetOperationInfo(0,CATEGORY_TOHAND) - if g1:GetFirst():IsRelateToEffect(e) and g1:GetFirst():IsFaceup() and Duel.Remove(g1,POS_FACEUP,REASON_EFFECT)~=0 then - local hg=g2:Filter(Card.IsRelateToEffect,nil,e) - Duel.SendtoHand(hg,nil,REASON_EFFECT) - end -end diff --git a/script/c90951921.lua b/script/c90951921.lua deleted file mode 100644 index b13a9975f0..0000000000 --- a/script/c90951921.lua +++ /dev/null @@ -1,70 +0,0 @@ ---先史遺産技術 -function c90951921.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_REMOVE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,90951921+EFFECT_COUNT_CODE_OATH) - e1:SetCost(c90951921.cost) - e1:SetTarget(c90951921.target) - e1:SetOperation(c90951921.activate) - c:RegisterEffect(e1) - Duel.AddCustomActivityCounter(90951921,ACTIVITY_SPSUMMON,c90951921.counterfilter) -end -function c90951921.counterfilter(c) - return c:IsSetCard(0x70) -end -function c90951921.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetCustomActivityCount(90951921,tp,ACTIVITY_SPSUMMON)==0 end - --oath effects - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) - e1:SetTargetRange(1,0) - e1:SetTarget(c90951921.splimit) - Duel.RegisterEffect(e1,tp) -end -function c90951921.splimit(e,c,sump,sumtype,sumpos,targetp,se) - return not c:IsSetCard(0x70) -end -function c90951921.filter(c) - return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x70) and c:IsAbleToRemove() -end -function c90951921.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c90951921.filter(chkc) end - if chk==0 then - if not Duel.IsPlayerCanDiscardDeck(tp,2) - or not Duel.IsExistingTarget(c90951921.filter,tp,LOCATION_GRAVE,0,1,nil) then return false end - local g=Duel.GetDecktopGroup(tp,2) - return g:FilterCount(Card.IsAbleToHand,nil)>0 - end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,c90951921.filter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,LOCATION_DECK) -end -function c90951921.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)~=0 and Duel.IsPlayerCanDiscardDeck(tp,2) then - Duel.BreakEffect() - local g=Duel.GetDecktopGroup(tp,2) - Duel.ConfirmCards(tp,g) - if g:GetCount()>0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local sg=g:FilterSelect(tp,Card.IsAbleToHand,1,1,nil) - g:Sub(sg) - if sg:GetCount()>0 then - Duel.DisableShuffleCheck() - Duel.SendtoHand(sg,nil,REASON_EFFECT) - end - if g:GetCount()>0 then - Duel.DisableShuffleCheck() - Duel.SendtoGrave(g,REASON_EFFECT) - end - end - end -end diff --git a/script/c90953320.lua b/script/c90953320.lua deleted file mode 100644 index e286d6a45b..0000000000 --- a/script/c90953320.lua +++ /dev/null @@ -1,32 +0,0 @@ ---TG ハイパー・ライブラリアン -function c90953320.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1) - c:EnableReviveLimit() - --draw - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(90953320,0)) - e1:SetCategory(CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(c90953320.drcon) - e1:SetTarget(c90953320.drtg) - e1:SetOperation(c90953320.drop) - c:RegisterEffect(e1) -end -function c90953320.drcon(e,tp,eg,ep,ev,re,r,rp) - local tg=eg:GetFirst() - return eg:GetCount()==1 and tg~=e:GetHandler() and tg:GetSummonType()==SUMMON_TYPE_SYNCHRO -end -function c90953320.drtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsRelateToEffect(e) end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(1) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c90953320.drop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) or e:GetHandler():IsFacedown() then return end - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end diff --git a/script/c90957527.lua b/script/c90957527.lua deleted file mode 100644 index 716f5da009..0000000000 --- a/script/c90957527.lua +++ /dev/null @@ -1,128 +0,0 @@ ---剣闘獣ゲオルディアス -function c90957527.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcCodeFun(c,79580323,aux.FilterBoolFunction(Card.IsSetCard,0x19),1,true,true) - --spsummon condition - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(c90957527.splimit) - c:RegisterEffect(e1) - --special summon rule - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(90957527,1)) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_SPSUMMON_PROC) - e2:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e2:SetRange(LOCATION_EXTRA) - e2:SetCondition(c90957527.sprcon) - e2:SetOperation(c90957527.sprop) - c:RegisterEffect(e2) - --damage - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(90957527,0)) - e3:SetCategory(CATEGORY_DAMAGE) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e3:SetCode(EVENT_BATTLE_DESTROYING) - e3:SetCondition(c90957527.damcon) - e3:SetTarget(c90957527.damtg) - e3:SetOperation(c90957527.damop) - c:RegisterEffect(e3) - --special summon - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(90957527,1)) - e4:SetCategory(CATEGORY_SPECIAL_SUMMON) - e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e4:SetCode(EVENT_PHASE+PHASE_BATTLE) - e4:SetRange(LOCATION_MZONE) - e4:SetCondition(c90957527.spcon) - e4:SetCost(c90957527.spcost) - e4:SetTarget(c90957527.sptg) - e4:SetOperation(c90957527.spop) - c:RegisterEffect(e4) -end -function c90957527.splimit(e,se,sp,st) - return e:GetHandler():GetLocation()~=LOCATION_EXTRA -end -function c90957527.spfilter1(c,tp) - return c:IsCode(79580323) and c:IsAbleToDeckOrExtraAsCost() and c:IsCanBeFusionMaterial(true) - and Duel.IsExistingMatchingCard(c90957527.spfilter2,tp,LOCATION_MZONE,0,1,c) -end -function c90957527.spfilter2(c) - return c:IsSetCard(0x19) and c:IsCanBeFusionMaterial() and c:IsAbleToDeckOrExtraAsCost() -end -function c90957527.sprcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.GetLocationCount(tp,LOCATION_MZONE)>-2 - and Duel.IsExistingMatchingCard(c90957527.spfilter1,tp,LOCATION_ONFIELD,0,1,nil,tp) -end -function c90957527.sprop(e,tp,eg,ep,ev,re,r,rp,c) - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(90957527,2)) - local g1=Duel.SelectMatchingCard(tp,c90957527.spfilter1,tp,LOCATION_ONFIELD,0,1,1,nil,tp) - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(90957527,3)) - local g2=Duel.SelectMatchingCard(tp,c90957527.spfilter2,tp,LOCATION_MZONE,0,1,1,g1:GetFirst()) - g1:Merge(g2) - local tc=g1:GetFirst() - while tc do - if not tc:IsFaceup() then Duel.ConfirmCards(1-tp,tc) end - tc=g1:GetNext() - end - Duel.SendtoDeck(g1,nil,2,REASON_COST) -end -function c90957527.damcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local a=Duel.GetAttacker() - local d=Duel.GetAttackTarget() - if c==a then - e:SetLabel(d:GetDefence()) - return c:IsRelateToBattle() and d:GetLocation()==LOCATION_GRAVE and d:IsType(TYPE_MONSTER) - else - e:SetLabel(a:GetDefence()) - return c:IsRelateToBattle() and a:GetLocation()==LOCATION_GRAVE and a:IsType(TYPE_MONSTER) - end -end -function c90957527.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local d=e:GetLabel() - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(d) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,d) -end -function c90957527.damop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end -function c90957527.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetBattledGroupCount()>0 -end -function c90957527.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToExtraAsCost() end - Duel.SendtoDeck(c,nil,0,REASON_COST) -end -function c90957527.filter(c,e,tp) - return not c:IsCode(79580323) and c:IsSetCard(0x19) and c:IsCanBeSpecialSummoned(e,121,tp,false,false) -end -function c90957527.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c90957527.filter,tp,LOCATION_DECK,0,2,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_DECK) -end -function c90957527.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 then return end - local g=Duel.GetMatchingGroup(c90957527.filter,tp,LOCATION_DECK,0,nil,e,tp) - if g:GetCount()>=2 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=g:Select(tp,2,2,nil) - local tc=sg:GetFirst() - Duel.SpecialSummonStep(tc,121,tp,tp,false,false,POS_FACEUP) - tc:RegisterFlagEffect(tc:GetOriginalCode(),RESET_EVENT+0x1ff0000,0,0) - tc=sg:GetNext() - Duel.SpecialSummonStep(tc,121,tp,tp,false,false,POS_FACEUP) - tc:RegisterFlagEffect(tc:GetOriginalCode(),RESET_EVENT+0x1ff0000,0,0) - Duel.SpecialSummonComplete() - end -end diff --git a/script/c90960358.lua b/script/c90960358.lua deleted file mode 100644 index f25ea4f634..0000000000 --- a/script/c90960358.lua +++ /dev/null @@ -1,101 +0,0 @@ ---トゥーン・ブラック・マジシャン・ガール -function c90960358.initial_effect(c) - c:EnableReviveLimit() - --special summon - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_SPSUMMON_PROC) - e2:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e2:SetRange(LOCATION_HAND) - e2:SetCondition(c90960358.spcon) - e2:SetOperation(c90960358.spop) - c:RegisterEffect(e2) - --destroy - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e3:SetRange(LOCATION_MZONE) - e3:SetCode(EVENT_LEAVE_FIELD) - e3:SetCondition(c90960358.sdescon) - e3:SetOperation(c90960358.sdesop) - c:RegisterEffect(e3) - --direct attack - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetCode(EFFECT_DIRECT_ATTACK) - e4:SetCondition(c90960358.dircon) - c:RegisterEffect(e4) - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_SINGLE) - e5:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET) - e5:SetCondition(c90960358.atcon) - e5:SetValue(c90960358.atlimit) - c:RegisterEffect(e5) - local e6=Effect.CreateEffect(c) - e6:SetType(EFFECT_TYPE_SINGLE) - e6:SetCode(EFFECT_CANNOT_DIRECT_ATTACK) - e6:SetCondition(c90960358.atcon) - c:RegisterEffect(e6) - --cannot attack - local e7=Effect.CreateEffect(c) - e7:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e7:SetCode(EVENT_SUMMON_SUCCESS) - e7:SetOperation(c90960358.atklimit) - c:RegisterEffect(e7) - --atkup - local e8=Effect.CreateEffect(c) - e8:SetType(EFFECT_TYPE_SINGLE) - e8:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e8:SetCode(EFFECT_UPDATE_ATTACK) - e8:SetRange(LOCATION_MZONE) - e8:SetValue(c90960358.val) - c:RegisterEffect(e8) -end -function c90960358.cfilter(c) - return c:IsFaceup() and c:IsCode(15259703) -end -function c90960358.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.IsExistingMatchingCard(c90960358.cfilter,tp,LOCATION_ONFIELD,0,1,nil) - and Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 and Duel.CheckReleaseGroup(tp,nil,1,nil) -end -function c90960358.spop(e,tp,eg,ep,ev,re,r,rp,c) - local tp=c:GetControler() - local g=Duel.SelectReleaseGroup(tp,nil,1,1,nil) - Duel.Release(g,REASON_COST) -end -function c90960358.sfilter(c) - return c:IsReason(REASON_DESTROY) and c:IsPreviousPosition(POS_FACEUP) and c:GetPreviousCodeOnField()==15259703 and c:IsPreviousLocation(LOCATION_ONFIELD) -end -function c90960358.sdescon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c90960358.sfilter,1,nil) -end -function c90960358.sdesop(e,tp,eg,ep,ev,re,r,rp) - Duel.Destroy(e:GetHandler(),REASON_EFFECT) -end -function c90960358.atkfilter(c) - return c:IsFaceup() and c:IsType(TYPE_TOON) -end -function c90960358.dircon(e) - return not Duel.IsExistingMatchingCard(c90960358.atkfilter,e:GetHandlerPlayer(),0,LOCATION_MZONE,1,nil) -end -function c90960358.atcon(e) - return Duel.IsExistingMatchingCard(c90960358.atkfilter,e:GetHandlerPlayer(),0,LOCATION_MZONE,1,nil) -end -function c90960358.atlimit(e,c) - return not c:IsType(TYPE_TOON) or c:IsFacedown() -end -function c90960358.atklimit(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e:GetHandler():RegisterEffect(e1) -end -function c90960358.val(e,c) - return Duel.GetMatchingGroupCount(c90960358.filter,c:GetControler(),LOCATION_GRAVE,LOCATION_GRAVE,nil)*300 -end -function c90960358.filter(c) - local code=c:GetCode() - return code==46986414 or code==30208479 -end diff --git a/script/c90980792.lua b/script/c90980792.lua deleted file mode 100644 index e439fbed0b..0000000000 --- a/script/c90980792.lua +++ /dev/null @@ -1,37 +0,0 @@ ---ダークジェロイド -function c90980792.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(90980792,0)) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c90980792.target) - e1:SetOperation(c90980792.operation) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e2) - local e3=e1:Clone() - e3:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - c:RegisterEffect(e3) -end -function c90980792.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) -end -function c90980792.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(-800) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - end -end diff --git a/script/c91020571.lua b/script/c91020571.lua deleted file mode 100644 index f07bb1d87f..0000000000 --- a/script/c91020571.lua +++ /dev/null @@ -1,46 +0,0 @@ ---地征竜-リアクタン -function c91020571.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(91020571,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(1,91020571) - e1:SetCost(c91020571.spcost) - e1:SetTarget(c91020571.sptg) - e1:SetOperation(c91020571.spop) - c:RegisterEffect(e1) -end -function c91020571.costfilter(c) - return (c:IsRace(RACE_DRAGON) or c:IsAttribute(ATTRIBUTE_EARTH)) and c:IsDiscardable() -end -function c91020571.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsDiscardable() - and Duel.IsExistingMatchingCard(c91020571.costfilter,tp,LOCATION_HAND,0,1,c) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) - local g=Duel.SelectMatchingCard(tp,c91020571.costfilter,tp,LOCATION_HAND,0,1,1,c) - g:AddCard(c) - Duel.SendtoGrave(g,REASON_COST+REASON_DISCARD) -end -function c91020571.spfilter(c,e,tp) - return c:IsCode(90411554) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c91020571.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c91020571.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c91020571.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local tc=Duel.GetFirstMatchingCard(c91020571.spfilter,tp,LOCATION_DECK,0,nil,e,tp) - if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - Duel.SpecialSummonComplete() - end -end diff --git a/script/c91070115.lua b/script/c91070115.lua deleted file mode 100644 index 9a96d5ac77..0000000000 --- a/script/c91070115.lua +++ /dev/null @@ -1,61 +0,0 @@ ---エーリアン・テレパス -function c91070115.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(91070115,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCost(c91070115.descost) - e1:SetTarget(c91070115.destg) - e1:SetOperation(c91070115.desop) - c:RegisterEffect(e1) - --atk def - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_DAMAGE_CALCULATING) - e2:SetRange(LOCATION_MZONE) - e2:SetOperation(c91070115.adval) - c:RegisterEffect(e2) -end -function c91070115.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsCanRemoveCounter(tp,0,1,0xe,1,REASON_COST) end - Duel.RemoveCounter(tp,0,1,0xe,1,REASON_COST) -end -function c91070115.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable() -end -function c91070115.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and c91070115.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c91070115.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c91070115.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c91070115.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end -function c91070115.addown(c,e) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_PHASE+RESET_DAMAGE_CAL) - e1:SetValue(c:GetCounter(0xe)*-300) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_UPDATE_DEFENCE) - c:RegisterEffect(e2) -end -function c91070115.adval(e,tp,eg,ep,ev,re,r,rp) - local a=Duel.GetAttacker() - local d=Duel.GetAttackTarget() - if not d then return end - if a:GetCounter(0xe)>0 and d:IsSetCard(0xc) then c91070115.addown(a,e) end - if d:GetCounter(0xe)>0 and a:IsSetCard(0xc) then c91070115.addown(d,e) end -end diff --git a/script/c91078716.lua b/script/c91078716.lua deleted file mode 100644 index 35be1ea145..0000000000 --- a/script/c91078716.lua +++ /dev/null @@ -1,62 +0,0 @@ ---ポリノシス -function c91078716.initial_effect(c) - --Activate(summon) - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DISABLE_SUMMON+CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_SUMMON) - e1:SetCondition(c91078716.condition1) - e1:SetCost(c91078716.cost) - e1:SetTarget(c91078716.target1) - e1:SetOperation(c91078716.activate1) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_SPSUMMON) - c:RegisterEffect(e2) - --Activate(effect) - local e3=Effect.CreateEffect(c) - e3:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) - e3:SetType(EFFECT_TYPE_ACTIVATE) - e3:SetCode(EVENT_CHAINING) - e3:SetCondition(c91078716.condition2) - e3:SetCost(c91078716.cost) - e3:SetTarget(c91078716.target2) - e3:SetOperation(c91078716.activate2) - c:RegisterEffect(e3) -end -function c91078716.condition1(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentChain()==0 -end -function c91078716.filter(c) - return c:IsRace(RACE_PLANT) and not c:IsStatus(STATUS_BATTLE_DESTROYED) -end -function c91078716.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,c91078716.filter,1,nil) end - local g=Duel.SelectReleaseGroup(tp,c91078716.filter,1,1,nil) - Duel.Release(g,REASON_COST) -end -function c91078716.target1(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DISABLE_SUMMON,eg,eg:GetCount(),0,0) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,eg:GetCount(),0,0) -end -function c91078716.activate1(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateSummon(eg) - Duel.Destroy(eg,REASON_EFFECT) -end -function c91078716.condition2(e,tp,eg,ep,ev,re,r,rp) - return re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev) -end -function c91078716.target2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) - end -end -function c91078716.activate2(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateActivation(ev) - if re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(eg,REASON_EFFECT) - end -end diff --git a/script/c9109991.lua b/script/c9109991.lua deleted file mode 100644 index 96994f2781..0000000000 --- a/script/c9109991.lua +++ /dev/null @@ -1,38 +0,0 @@ ---BF-鉄鎖のフェーン -function c9109991.initial_effect(c) - --direct attack - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DIRECT_ATTACK) - c:RegisterEffect(e1) - --change pos - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(9109991,0)) - e2:SetCategory(CATEGORY_POSITION) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EVENT_BATTLE_DAMAGE) - e2:SetCondition(c9109991.condition) - e2:SetTarget(c9109991.target) - e2:SetOperation(c9109991.operation) - c:RegisterEffect(e2) -end -function c9109991.condition(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp and Duel.GetAttackTarget()==nil -end -function c9109991.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsAttackPos() end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATTACK) - local g=Duel.SelectTarget(tp,Card.IsAttackPos,tp,0,LOCATION_MZONE,1,1,nil) - if g:GetCount()>0 then - Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0) - end -end -function c9109991.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) and tc:IsAttackPos() then - Duel.ChangePosition(tc,POS_FACEUP_DEFENCE,POS_FACEDOWN_DEFENCE,POS_FACEUP_DEFENCE,POS_FACEDOWN_DEFENCE) - end -end diff --git a/script/c91107093.lua b/script/c91107093.lua deleted file mode 100644 index 97b43764da..0000000000 --- a/script/c91107093.lua +++ /dev/null @@ -1,34 +0,0 @@ ---電磁シールド -function c91107093.initial_effect(c) - --activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --indestructable - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(LOCATION_MZONE,0) - e2:SetTarget(c91107093.infilter) - e2:SetValue(1) - c:RegisterEffect(e2) - --self destroy - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e3:SetRange(LOCATION_SZONE) - e3:SetCode(EFFECT_SELF_DESTROY) - e3:SetCondition(c91107093.descon) - c:RegisterEffect(e3) -end -function c91107093.infilter(e,c) - return c:IsDefencePos() and c:IsLevelBelow(3) and c:IsRace(RACE_THUNDER) -end -function c91107093.filter(c) - return c:IsFaceup() and c:IsAttackPos() -end -function c91107093.descon(e) - return Duel.IsExistingMatchingCard(c91107093.filter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) -end diff --git a/script/c91110378.lua b/script/c91110378.lua deleted file mode 100644 index 3985c801d0..0000000000 --- a/script/c91110378.lua +++ /dev/null @@ -1,53 +0,0 @@ ---光天使スローネ -function c91110378.initial_effect(c) - Duel.EnableGlobalFlag(GLOBALFLAG_XMAT_COUNT_LIMIT) - --xyz limit - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_XYZ_LEVEL) - e1:SetValue(c91110378.xyz_level) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(91110378,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_SUMMON_SUCCESS) - e2:SetRange(LOCATION_HAND) - e2:SetCondition(c91110378.spcon) - e2:SetTarget(c91110378.sptg) - e2:SetOperation(c91110378.spop) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e3) -end -function c91110378.xyz_level(e,c,rc) - return 0x3000+c:GetLevel() -end -function c91110378.cfilter(c,tp) - return c:IsFaceup() and c:IsSetCard(0x86) and c:GetSummonPlayer()==tp -end -function c91110378.spcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c91110378.cfilter,1,nil,tp) -end -function c91110378.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp,1) - and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c91110378.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then - if Duel.Draw(tp,1,REASON_EFFECT)==0 then return end - local dc=Duel.GetOperatedGroup():GetFirst() - if dc:IsSetCard(0x86) and dc:IsCanBeSpecialSummoned(e,0,tp,false,false) - and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.SelectYesNo(tp,aux.Stringid(91110378,1)) then - Duel.BreakEffect() - Duel.SpecialSummon(dc,0,tp,tp,false,false,POS_FACEUP) - end - end -end diff --git a/script/c91123920.lua b/script/c91123920.lua deleted file mode 100644 index 39a3d8391e..0000000000 --- a/script/c91123920.lua +++ /dev/null @@ -1,31 +0,0 @@ ---力の代行者 マーズ -function c91123920.initial_effect(c) - --immune spell - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_IMMUNE_EFFECT) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetValue(c91123920.efilter) - c:RegisterEffect(e1) - --update atk,def - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetValue(c91123920.val) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EFFECT_UPDATE_DEFENCE) - c:RegisterEffect(e3) -end -function c91123920.efilter(e,te) - return te:IsActiveType(TYPE_SPELL) -end -function c91123920.val(e,c) - local tp=c:GetControler() - if not Duel.IsEnvironment(56433456,tp) then return 0 end - local v=Duel.GetLP(tp)-Duel.GetLP(1-tp) - if v>0 then return v else return 0 end -end diff --git a/script/c91133740.lua b/script/c91133740.lua deleted file mode 100644 index f747717c5d..0000000000 --- a/script/c91133740.lua +++ /dev/null @@ -1,29 +0,0 @@ ---スノーマンイーター -function c91133740.initial_effect(c) - --Destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(91133740,0)) - e1:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_SINGLE) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetCode(EVENT_FLIP) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c91133740.destg) - e1:SetOperation(c91133740.desop) - c:RegisterEffect(e1) -end -function c91133740.filter(c) - return c:IsFaceup() and c:IsDestructable() -end -function c91133740.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c91133740.filter(chkc) end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c91133740.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c91133740.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c91148083.lua b/script/c91148083.lua deleted file mode 100644 index 2c1b1c64a3..0000000000 --- a/script/c91148083.lua +++ /dev/null @@ -1,46 +0,0 @@ ---神々の黄昏 -function c91148083.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c91148083.target) - e1:SetOperation(c91148083.operation) - c:RegisterEffect(e1) -end -function c91148083.filter(c) - return c:IsFaceup() and c:IsSetCard(0x4b) and c:IsControlerCanBeChanged() -end -function c91148083.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c91148083.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c91148083.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) - local g=Duel.SelectTarget(tp,c91148083.filter,tp,LOCATION_MZONE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0) -end -function c91148083.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) and Duel.GetControl(tc,1-tp,0,0) then - tc:RegisterFlagEffect(91148083,RESET_EVENT+0x1fe0000,0,0) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetCountLimit(1) - e1:SetCondition(c91148083.rmcon) - e1:SetOperation(c91148083.rmop) - e1:SetLabelObject(tc) - e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN,1) - Duel.RegisterEffect(e1,tp) - end -end -function c91148083.rmcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp -end -function c91148083.rmop(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetLabelObject() - if tc:GetFlagEffect(91148083)==0 then return end - Duel.Destroy(tc,REASON_EFFECT) - local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,nil) - Duel.Remove(g,POS_FACEUP,REASON_EFFECT) -end diff --git a/script/c911883.lua b/script/c911883.lua deleted file mode 100644 index 5d453a4068..0000000000 --- a/script/c911883.lua +++ /dev/null @@ -1,31 +0,0 @@ ---予想GUY -function c911883.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c911883.condition) - e1:SetTarget(c911883.target) - e1:SetOperation(c911883.activate) - c:RegisterEffect(e1) -end -function c911883.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 -end -function c911883.filter(c,e,tp) - return c:IsType(TYPE_NORMAL) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c911883.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c911883.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c911883.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c911883.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c91188343.lua b/script/c91188343.lua deleted file mode 100644 index 49c9112651..0000000000 --- a/script/c91188343.lua +++ /dev/null @@ -1,37 +0,0 @@ ---神秘の代行者 アース -function c91188343.initial_effect(c) - --search - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(91188343,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c91188343.tg) - e1:SetOperation(c91188343.op) - c:RegisterEffect(e1) -end -function c91188343.filter1(c) - return c:IsSetCard(0x44) and c:GetCode()~=91188343 and c:IsAbleToHand() -end -function c91188343.filter2(c) - return ((c:IsSetCard(0x44) and c:GetCode()~=91188343) or c:GetCode()==55794644) and c:IsAbleToHand() -end -function c91188343.tg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - if not Duel.IsEnvironment(56433456) then - return Duel.IsExistingMatchingCard(c91188343.filter1,tp,LOCATION_DECK,0,1,nil) end - return Duel.IsExistingMatchingCard(c91188343.filter2,tp,LOCATION_DECK,0,1,nil) - end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c91188343.op(e,tp,eg,ep,ev,re,r,rp) - local g=nil - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - if not Duel.IsEnvironment(56433456) then - g=Duel.SelectMatchingCard(tp,c91188343.filter1,tp,LOCATION_DECK,0,1,1,nil) - else g=Duel.SelectMatchingCard(tp,c91188343.filter2,tp,LOCATION_DECK,0,1,1,nil) end - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c91250514.lua b/script/c91250514.lua deleted file mode 100644 index 2d10e6125f..0000000000 --- a/script/c91250514.lua +++ /dev/null @@ -1,29 +0,0 @@ ---タン・ツイスター -function c91250514.initial_effect(c) - --draw - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(91250514,0)) - e1:SetCategory(CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCondition(c91250514.condition) - e1:SetTarget(c91250514.target) - e1:SetOperation(c91250514.operation) - c:RegisterEffect(e1) -end -function c91250514.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) - and bit.band(e:GetHandler():GetSummonType(),SUMMON_TYPE_ADVANCE)==SUMMON_TYPE_ADVANCE -end -function c91250514.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,e:GetHandler(),1,0,0) -end -function c91250514.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.Draw(tp,2,REASON_EFFECT) - Duel.BreakEffect() - if e:GetHandler():IsRelateToEffect(e) then - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT) - end -end diff --git a/script/c9126351.lua b/script/c9126351.lua deleted file mode 100644 index 7abbd88331..0000000000 --- a/script/c9126351.lua +++ /dev/null @@ -1,86 +0,0 @@ ---鬼ガエル -function c9126351.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c9126351.spcon) - e1:SetOperation(c9126351.spop) - c:RegisterEffect(e1) - --send to grave - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_TOGRAVE) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e2:SetCode(EVENT_SUMMON_SUCCESS) - e2:SetTarget(c9126351.target) - e2:SetOperation(c9126351.operation) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - c:RegisterEffect(e3) - local e4=e2:Clone() - e4:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e4) - --extra summon - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_IGNITION) - e5:SetRange(LOCATION_MZONE) - e5:SetCountLimit(1) - e5:SetCost(c9126351.excost) - e5:SetTarget(c9126351.extg) - e5:SetOperation(c9126351.exop) - c:RegisterEffect(e5) -end -function c9126351.spfilter(c) - return c:IsType(TYPE_MONSTER) and c:IsAttribute(ATTRIBUTE_WATER) -end -function c9126351.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c9126351.spfilter,tp,LOCATION_HAND,0,1,c) -end -function c9126351.spop(e,tp,eg,ep,ev,re,r,rp,c) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) - local g=Duel.SelectMatchingCard(tp,c9126351.spfilter,tp,LOCATION_HAND,0,1,1,c) - Duel.SendtoGrave(g,REASON_COST+REASON_DISCARD) -end -function c9126351.tgfilter(c) - return c:IsLevelBelow(2) and c:IsAttribute(ATTRIBUTE_WATER) and c:IsRace(RACE_AQUA) and c:IsAbleToGrave() -end -function c9126351.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c9126351.tgfilter,tp,LOCATION_DECK+LOCATION_MZONE,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK+LOCATION_MZONE) -end -function c9126351.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c9126351.tgfilter,tp,LOCATION_DECK+LOCATION_MZONE,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoGrave(g,REASON_EFFECT) - end -end -function c9126351.excost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetFlagEffect(tp,9126352)==0 and Duel.IsExistingMatchingCard(Card.IsAbleToHandAsCost,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g=Duel.SelectMatchingCard(tp,Card.IsAbleToHandAsCost,tp,LOCATION_MZONE,0,1,1,nil) - Duel.SendtoHand(g,nil,REASON_COST) - Duel.RegisterFlagEffect(tp,9126352,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1) -end -function c9126351.extg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanSummon(tp) end -end -function c9126351.exop(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetTargetRange(LOCATION_HAND+LOCATION_MZONE,0) - e1:SetCode(EFFECT_EXTRA_SUMMON_COUNT) - e1:SetTarget(c9126351.estg) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function c9126351.estg(e,c) - return c:IsSetCard(0x12) and c:GetCode()~=9126351 -end diff --git a/script/c91279700.lua b/script/c91279700.lua deleted file mode 100644 index 45ca302551..0000000000 --- a/script/c91279700.lua +++ /dev/null @@ -1,51 +0,0 @@ ---ヴェルズ・オピオン -function c91279700.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0xa),4,2) - c:EnableReviveLimit() - --disable spsummon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetTargetRange(1,1) - e1:SetTarget(c91279700.sumlimit) - e1:SetCondition(c91279700.dscon) - c:RegisterEffect(e1) - --search - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(91279700,0)) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetCountLimit(1) - e2:SetRange(LOCATION_MZONE) - e2:SetCost(c91279700.cost) - e2:SetTarget(c91279700.target) - e2:SetOperation(c91279700.operation) - c:RegisterEffect(e2) -end -function c91279700.dscon(e) - return e:GetHandler():GetOverlayCount()~=0 -end -function c91279700.sumlimit(e,c,sump,sumtype,sumpos,targetp) - return c:IsLevelAbove(5) -end -function c91279700.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c91279700.filter(c) - return c:IsSetCard(0x65) and c:IsAbleToHand() -end -function c91279700.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c91279700.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c91279700.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c91279700.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c91345518.lua b/script/c91345518.lua deleted file mode 100644 index 74617fad55..0000000000 --- a/script/c91345518.lua +++ /dev/null @@ -1,38 +0,0 @@ ---裁きの代行者 サターン -function c91345518.initial_effect(c) - --damage - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(91345518,0)) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c91345518.damcost) - e1:SetTarget(c91345518.damtg) - e1:SetOperation(c91345518.damop) - c:RegisterEffect(e1) -end -function c91345518.damcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetCurrentPhase()~=PHASE_MAIN2 and e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) - e1:SetCode(EFFECT_CANNOT_BP) - e1:SetReset(RESET_PHASE+PHASE_END) - e1:SetTargetRange(1,0) - Duel.RegisterEffect(e1,tp) -end -function c91345518.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLP(tp)>Duel.GetLP(1-tp) end - Duel.SetTargetPlayer(1-tp) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,0) -end -function c91345518.damop(e,tp,eg,ep,ev,re,r,rp) - if not Duel.IsEnvironment(56433456) then return end - local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) - local val=Duel.GetLP(1-p)-Duel.GetLP(p) - if val>0 then - Duel.Damage(p,val,REASON_EFFECT) - end -end diff --git a/script/c91349449.lua b/script/c91349449.lua deleted file mode 100644 index fe18e6e319..0000000000 --- a/script/c91349449.lua +++ /dev/null @@ -1,74 +0,0 @@ ---ライトレイ ソーサラー -function c91349449.initial_effect(c) - c:EnableReviveLimit() - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c91349449.spcon) - c:RegisterEffect(e1) - --spsummon limit - local e2=Effect.CreateEffect(c) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_SPSUMMON_CONDITION) - c:RegisterEffect(e2) - --remove - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(91349449,0)) - e3:SetCategory(CATEGORY_TODECK+CATEGORY_REMOVE) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetCountLimit(1) - e3:SetRange(LOCATION_MZONE) - e3:SetCost(c91349449.rmcost) - e3:SetTarget(c91349449.rmtg) - e3:SetOperation(c91349449.rmop) - c:RegisterEffect(e3) -end -function c91349449.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(Card.IsAttribute,tp,LOCATION_REMOVED,0,3,nil,ATTRIBUTE_LIGHT) -end -function c91349449.rmcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():GetAttackAnnouncedCount()==0 end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_OATH) - e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e:GetHandler():RegisterEffect(e1,true) -end -function c91349449.filter1(c) - return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsAbleToDeck() -end -function c91349449.filter2(c) - return c:IsFaceup() and c:IsAbleToRemove() -end -function c91349449.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - if chk==0 then return Duel.IsExistingTarget(c91349449.filter1,tp,LOCATION_REMOVED,0,1,nil) - and Duel.IsExistingTarget(c91349449.filter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g1=Duel.SelectTarget(tp,c91349449.filter1,tp,LOCATION_REMOVED,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g1,1,0,0) - e:SetLabelObject(g1:GetFirst()) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g2=Duel.SelectTarget(tp,c91349449.filter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g2,1,0,0) -end -function c91349449.rmop(e,tp,eg,ep,ev,re,r,rp) - local tc1=e:GetLabelObject() - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local tc2=g:GetFirst() - if tc1==tc2 then tc2=g:GetNext() end - if tc1:IsRelateToEffect(e) and Duel.SendtoDeck(tc1,nil,2,REASON_EFFECT)~=0 then - if tc2:IsFaceup() and tc2:IsRelateToEffect(e) then - Duel.Remove(tc2,POS_FACEUP,REASON_EFFECT) - end - end -end diff --git a/script/c91350799.lua b/script/c91350799.lua deleted file mode 100644 index 7b446a64cd..0000000000 --- a/script/c91350799.lua +++ /dev/null @@ -1,64 +0,0 @@ ---マドルチェ・ホーットケーキ -function c91350799.initial_effect(c) - --to deck - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(91350799,0)) - e1:SetCategory(CATEGORY_TODECK) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCondition(c91350799.retcon) - e1:SetTarget(c91350799.rettg) - e1:SetOperation(c91350799.retop) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(91350799,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCountLimit(1,91350799) - e2:SetTarget(c91350799.sptg) - e2:SetOperation(c91350799.spop) - c:RegisterEffect(e2) -end -function c91350799.retcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsReason(REASON_DESTROY) and e:GetHandler():GetReasonPlayer()~=tp - and e:GetHandler():GetPreviousControler()==tp -end -function c91350799.rettg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0) -end -function c91350799.retop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_EFFECT) - end -end -function c91350799.rmfilter(c) - return c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost() -end -function c91350799.filter(c,e,tp) - return c:IsSetCard(0x71) and c:GetCode()~=91350799 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c91350799.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c91350799.rmfilter(chkc) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c91350799.rmfilter,tp,LOCATION_GRAVE,0,1,nil) - and Duel.IsExistingMatchingCard(c91350799.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,c91350799.rmfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c91350799.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) and Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)>0 then - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c91350799.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end - end -end diff --git a/script/c91351370.lua b/script/c91351370.lua deleted file mode 100644 index 7900b66bd8..0000000000 --- a/script/c91351370.lua +++ /dev/null @@ -1,39 +0,0 @@ ---黒い旋風 -function c91351370.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --search - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(91351370,0)) - e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetRange(LOCATION_SZONE) - e2:SetCode(EVENT_SUMMON_SUCCESS) - e2:SetTarget(c91351370.target) - e2:SetOperation(c91351370.operation) - c:RegisterEffect(e2) -end -function c91351370.filter(c,val) - local atk=c:GetAttack() - return atk>=0 and atk0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c91420254.lua b/script/c91420254.lua deleted file mode 100644 index c6461aaa68..0000000000 --- a/script/c91420254.lua +++ /dev/null @@ -1,78 +0,0 @@ ---妖仙獣 右鎌神柱 -function c91420254.initial_effect(c) - --pendulum summon - aux.AddPendulumProcedure(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --scale change - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(91420254,0)) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_PZONE) - e2:SetCountLimit(1) - e2:SetCondition(c91420254.sccon) - e2:SetOperation(c91420254.scop) - c:RegisterEffect(e2) - --to defence - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(91420254,1)) - e3:SetCategory(CATEGORY_POSITION) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e3:SetCode(EVENT_SUMMON_SUCCESS) - e3:SetTarget(c91420254.postg) - e3:SetOperation(c91420254.posop) - c:RegisterEffect(e3) - --cannot be battle target - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_FIELD) - e4:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET) - e4:SetRange(LOCATION_MZONE) - e4:SetTargetRange(0,LOCATION_MZONE) - e4:SetValue(c91420254.bttg) - c:RegisterEffect(e4) -end -function c91420254.sccon(e,tp,eg,ep,ev,re,r,rp) - local seq=e:GetHandler():GetSequence() - local tc=Duel.GetFieldCard(e:GetHandlerPlayer(),LOCATION_SZONE,13-seq) - return tc and tc:IsSetCard(0xb3) -end -function c91420254.scop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) then return end - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CHANGE_LSCALE) - e1:SetValue(11) - e1:SetReset(RESET_EVENT+0x1ff0000+RESET_PHASE+PHASE_END) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_CHANGE_RSCALE) - c:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e3:SetTargetRange(1,0) - e3:SetTarget(c91420254.splimit) - e3:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e3,tp) -end -function c91420254.splimit(e,c) - return not c:IsSetCard(0xb3) -end -function c91420254.postg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAttackPos() end - Duel.SetOperationInfo(0,CATEGORY_POSITION,e:GetHandler(),1,0,0) -end -function c91420254.posop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsPosition(POS_FACEUP_ATTACK) and c:IsRelateToEffect(e) then - Duel.ChangePosition(c,POS_FACEUP_DEFENCE) - end -end -function c91420254.bttg(e,c) - return c:IsFaceup() and c:IsSetCard(0xb3) and c~=e:GetHandler() -end diff --git a/script/c91422370.lua b/script/c91422370.lua deleted file mode 100644 index a45491ed4f..0000000000 --- a/script/c91422370.lua +++ /dev/null @@ -1,49 +0,0 @@ ---螺旋式発条 -function c91422370.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_END_PHASE) - e1:SetCost(c91422370.cost) - e1:SetTarget(c91422370.target) - e1:SetOperation(c91422370.activate) - c:RegisterEffect(e1) -end -function c91422370.costfilter(c) - return c:IsSetCard(0x58) and c:IsAttackAbove(1500) -end -function c91422370.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,c91422370.costfilter,1,nil) end - local sg=Duel.SelectReleaseGroup(tp,c91422370.costfilter,1,1,nil) - Duel.Release(sg,REASON_COST) -end -function c91422370.filter(c,e,tp) - return c:IsSetCard(0x58) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c91422370.filter2(c,atk,e,tp) - return c:IsSetCard(0x58) and c:GetAttack()==atk and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c91422370.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsExistingMatchingCard(c91422370.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c91422370.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c91422370.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local atk=g:GetFirst():GetAttack() - local sg=Duel.GetMatchingGroup(c91422370.filter2,tp,LOCATION_DECK,0,nil,atk,e,tp) - if sg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(91422370,0)) then - Duel.BreakEffect() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local dg=sg:Select(tp,1,1,nil) - Duel.SpecialSummon(dg,0,tp,tp,false,false,POS_FACEUP) - end - end -end diff --git a/script/c91438994.lua b/script/c91438994.lua deleted file mode 100644 index 28a610dcc1..0000000000 --- a/script/c91438994.lua +++ /dev/null @@ -1,77 +0,0 @@ ---A・ジェネクス・ベルフレイム -function c91438994.initial_effect(c) - --add counter - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetRange(LOCATION_MZONE) - e1:SetOperation(c91438994.addc1) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_REMOVE) - e2:SetRange(LOCATION_MZONE) - e2:SetOperation(c91438994.addc2) - c:RegisterEffect(e2) - --attackup - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e3:SetRange(LOCATION_MZONE) - e3:SetCode(EFFECT_UPDATE_ATTACK) - e3:SetValue(c91438994.attackup) - c:RegisterEffect(e3) - --damage - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e4:SetCode(EVENT_LEAVE_FIELD_P) - e4:SetOperation(c91438994.damp) - c:RegisterEffect(e4) - local e5=Effect.CreateEffect(c) - e5:SetDescription(aux.Stringid(91438994,0)) - e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e5:SetCategory(CATEGORY_DAMAGE) - e5:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e5:SetCode(EVENT_BATTLE_DESTROYED) - e5:SetCondition(c91438994.damcon) - e5:SetTarget(c91438994.damtg) - e5:SetOperation(c91438994.damop) - e5:SetLabelObject(e4) - c:RegisterEffect(e5) -end -function c91438994.filter1(c,tp) - return c:GetPreviousControler()==tp and c:GetPreviousLocation()==LOCATION_MZONE -end -function c91438994.addc1(e,tp,eg,ep,ev,re,r,rp) - if eg:IsExists(c91438994.filter1,1,nil,tp) then - e:GetHandler():AddCounter(0xa,1) - end -end -function c91438994.filter2(c,tp) - return c:GetPreviousControler()~=tp and c:GetPreviousLocation()==LOCATION_GRAVE -end -function c91438994.addc2(e,tp,eg,ep,ev,re,r,rp) - if eg:IsExists(c91438994.filter2,1,nil,tp) then - e:GetHandler():AddCounter(0xa,2) - end -end -function c91438994.attackup(e,c) - return c:GetCounter(0xa)*100 -end -function c91438994.damp(e,tp,eg,ep,ev,re,r,rp) - e:SetLabel(e:GetHandler():GetCounter(0xa)) -end -function c91438994.damcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) -end -function c91438994.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - local ct=e:GetLabelObject():GetLabel() - if chk==0 then return ct~=0 end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(ct*300) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,ct*300) -end -function c91438994.damop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c91449144.lua b/script/c91449144.lua deleted file mode 100644 index f1f5c5c83c..0000000000 --- a/script/c91449144.lua +++ /dev/null @@ -1,34 +0,0 @@ ---ガスタの静寂 カーム -function c91449144.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(91449144,0)) - e1:SetCategory(CATEGORY_DRAW) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCost(c91449144.cost) - e1:SetTarget(c91449144.target) - e1:SetOperation(c91449144.operation) - c:RegisterEffect(e1) -end -function c91449144.filter(c) - return c:IsSetCard(0x10) and c:IsType(TYPE_MONSTER) and c:IsAbleToDeckAsCost() -end -function c91449144.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c91449144.filter,tp,LOCATION_GRAVE,0,2,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectMatchingCard(tp,c91449144.filter,tp,LOCATION_GRAVE,0,2,2,nil) - Duel.SendtoDeck(g,nil,2,REASON_COST) -end -function c91449144.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(1) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c91449144.operation(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end diff --git a/script/c9145181.lua b/script/c9145181.lua deleted file mode 100644 index b1d0ca7234..0000000000 --- a/script/c9145181.lua +++ /dev/null @@ -1,29 +0,0 @@ ---儀式降臨封印の書 -function c9145181.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,0x1e0) - e1:SetTarget(c9145181.target) - e1:SetOperation(c9145181.activate) - c:RegisterEffect(e1) -end -function c9145181.filter(c) - return c:IsFaceup() and c:IsType(TYPE_RITUAL) and c:IsDestructable() -end -function c9145181.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c9145181.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c9145181.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c9145181.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c9145181.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c91468551.lua b/script/c91468551.lua deleted file mode 100644 index 4e6ea9e4e9..0000000000 --- a/script/c91468551.lua +++ /dev/null @@ -1,20 +0,0 @@ ---太陽の祭壇 -function c91468551.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --atk up - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(LOCATION_MZONE,0) - e2:SetTarget(c91468551.atktg) - e2:SetValue(300) - c:RegisterEffect(e2) -end -function c91468551.atktg(e,c) - return bit.band(c:GetSummonType(),SUMMON_TYPE_SPECIAL)~=0 and c:GetSummonLocation()==LOCATION_GRAVE -end diff --git a/script/c91499077.lua b/script/c91499077.lua deleted file mode 100644 index 12453416c5..0000000000 --- a/script/c91499077.lua +++ /dev/null @@ -1,68 +0,0 @@ ---ガガガザムライ -function c91499077.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,4,2) - c:EnableReviveLimit() - --attack twice - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(91499077,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetCountLimit(1) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c91499077.atcon) - e1:SetCost(c91499077.atcost) - e1:SetTarget(c91499077.attg) - e1:SetOperation(c91499077.atop) - c:RegisterEffect(e1) - --change target - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(91499077,1)) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_BE_BATTLE_TARGET) - e2:SetRange(LOCATION_MZONE) - e2:SetCondition(c91499077.cbcon) - e2:SetOperation(c91499077.cbop) - c:RegisterEffect(e2) -end -function c91499077.atcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsAbleToEnterBP() -end -function c91499077.atcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c91499077.filter(c) - return c:IsFaceup() and c:IsSetCard(0x54) and c:GetEffectCount(EFFECT_EXTRA_ATTACK)==0 -end -function c91499077.attg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c91499077.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c91499077.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c91499077.filter,tp,LOCATION_MZONE,0,1,1,nil) -end -function c91499077.atop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_EXTRA_ATTACK) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetValue(1) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - tc:RegisterEffect(e1) - end -end -function c91499077.cbcon(e,tp,eg,ep,ev,re,r,rp) - local bt=eg:GetFirst() - return r~=REASON_REPLACE and bt~=e:GetHandler() and bt:IsControler(tp) -end -function c91499077.cbop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFaceup() and c:IsRelateToEffect(e) and Duel.ChangePosition(c,POS_FACEUP_DEFENCE)~=0 then - local at=Duel.GetAttacker() - if at:IsAttackable() and not at:IsImmuneToEffect(e) and not c:IsImmuneToEffect(e) then - Duel.CalculateDamage(at,c) - end - end -end diff --git a/script/c91501248.lua b/script/c91501248.lua deleted file mode 100644 index 8a3bef2a5a..0000000000 --- a/script/c91501248.lua +++ /dev/null @@ -1,88 +0,0 @@ ---禁忌の壺 -function c91501248.initial_effect(c) - --flip - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DELAY) - e1:SetCountLimit(1,91501248) - e1:SetTarget(c91501248.target) - e1:SetOperation(c91501248.operation) - c:RegisterEffect(e1) -end -function c91501248.thfilter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand() -end -function c91501248.target(e,tp,eg,ep,ev,re,r,rp,chk) - local b1=Duel.IsPlayerCanDraw(tp,2) - local b2=Duel.IsExistingMatchingCard(c91501248.thfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) - local b3=Duel.IsExistingMatchingCard(Card.IsDestructable,tp,0,LOCATION_MZONE,1,nil) - local b4=Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,0,LOCATION_HAND,1,nil) - if chk==0 then return b1 or b2 or b3 or b4 end - local off=1 - local ops={} - local opval={} - if b1 then - ops[off]=aux.Stringid(91501248,0) - opval[off-1]=1 - off=off+1 - end - if b2 then - ops[off]=aux.Stringid(91501248,1) - opval[off-1]=2 - off=off+1 - end - if b3 then - ops[off]=aux.Stringid(91501248,2) - opval[off-1]=3 - off=off+1 - end - if b4 then - ops[off]=aux.Stringid(91501248,3) - opval[off-1]=4 - off=off+1 - end - local op=Duel.SelectOption(tp,table.unpack(ops)) - local sel=opval[op] - e:SetLabel(sel) - if sel==1 then - e:SetCategory(CATEGORY_DRAW) - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(2) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2) - elseif sel==2 then - e:SetCategory(CATEGORY_TOHAND) - local g=Duel.GetMatchingGroup(c91501248.thfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0) - elseif sel==3 then - e:SetCategory(CATEGORY_DESTROY) - local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,0,LOCATION_MZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) - else - e:SetCategory(CATEGORY_TODECK) - Duel.SetTargetPlayer(tp) - Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,0,1-tp,LOCATION_HAND) - end -end -function c91501248.operation(e,tp,eg,ep,ev,re,r,rp) - local sel=e:GetLabel() - if sel==1 then - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) - elseif sel==2 then - local g=Duel.GetMatchingGroup(c91501248.thfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) - Duel.SendtoHand(g,nil,REASON_EFFECT) - elseif sel==3 then - local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,0,LOCATION_MZONE,nil) - Duel.Destroy(g,REASON_EFFECT) - else - local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) - local g=Duel.GetFieldGroup(p,0,LOCATION_HAND) - if g:GetCount()>0 then - Duel.ConfirmCards(p,g) - Duel.Hint(HINT_SELECTMSG,p,HINTMSG_TODECK) - local sg=g:FilterSelect(p,Card.IsAbleToDeck,1,1,nil) - Duel.SendtoDeck(sg,nil,2,REASON_EFFECT) - Duel.ShuffleHand(1-p) - end - end -end diff --git a/script/c91512835.lua b/script/c91512835.lua deleted file mode 100644 index a93bf3358c..0000000000 --- a/script/c91512835.lua +++ /dev/null @@ -1,66 +0,0 @@ ---インセクト女王 -function c91512835.initial_effect(c) - --attack cost - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_ATTACK_COST) - e1:SetCost(c91512835.atcost) - e1:SetOperation(c91512835.atop) - c:RegisterEffect(e1) - --atkup - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(c91512835.value) - c:RegisterEffect(e2) - --spsummon - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e3:SetCode(EVENT_BATTLE_DESTROYING) - e3:SetOperation(c91512835.regop) - c:RegisterEffect(e3) - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(91512835,0)) - e4:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN) - e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e4:SetRange(LOCATION_MZONE) - e4:SetCode(EVENT_PHASE+PHASE_END) - e4:SetCountLimit(1) - e4:SetCondition(c91512835.spcon) - e4:SetTarget(c91512835.sptg) - e4:SetOperation(c91512835.spop) - c:RegisterEffect(e4) -end -function c91512835.atcost(e,c,tp) - return Duel.CheckReleaseGroup(tp,nil,1,e:GetHandler()) -end -function c91512835.atop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.SelectReleaseGroup(tp,nil,1,1,e:GetHandler()) - Duel.Release(g,REASON_COST) -end -function c91512835.filter(c) - return c:IsFaceup() and c:IsRace(RACE_INSECT) -end -function c91512835.value(e,c) - return Duel.GetMatchingGroupCount(c91512835.filter,0,LOCATION_MZONE,LOCATION_MZONE,nil)*200 -end -function c91512835.regop(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():RegisterFlagEffect(91512835,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) -end -function c91512835.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetFlagEffect(91512835)~=0 -end -function c91512835.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0) -end -function c91512835.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - if not Duel.IsPlayerCanSpecialSummonMonster(tp,91512836,0,0x4011,100,100,1,RACE_INSECT,ATTRIBUTE_EARTH) then return end - local token=Duel.CreateToken(tp,91512836) - Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP_ATTACK) -end diff --git a/script/c91554542.lua b/script/c91554542.lua deleted file mode 100644 index 27b535ef7e..0000000000 --- a/script/c91554542.lua +++ /dev/null @@ -1,17 +0,0 @@ ---ネオフレムベル・サーベル -function c91554542.initial_effect(c) - --atk - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(c91554542.val) - c:RegisterEffect(e1) -end -function c91554542.val(e) - local gct=Duel.GetFieldGroupCount(e:GetHandler():GetControler(),0,LOCATION_GRAVE) - if gct<=4 then return 600 - elseif gct>=8 then return -300 - else return 0 end -end diff --git a/script/c91559748.lua b/script/c91559748.lua deleted file mode 100644 index 76c7a90e2a..0000000000 --- a/script/c91559748.lua +++ /dev/null @@ -1,39 +0,0 @@ ---棘の妖精 -function c91559748.initial_effect(c) - --change position - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(91559748,0)) - e1:SetCategory(CATEGORY_POSITION) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_DAMAGE_STEP_END) - e1:SetCondition(c91559748.cpcon) - e1:SetTarget(c91559748.cptg) - e1:SetOperation(c91559748.cpop) - c:RegisterEffect(e1) - --cannot be battle target - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET) - e2:SetRange(LOCATION_MZONE) - e2:SetTargetRange(0,LOCATION_MZONE) - e2:SetValue(c91559748.tg) - c:RegisterEffect(e2) -end -function c91559748.tg(e,c) - return c:IsFaceup() and c:IsRace(RACE_INSECT) -end -function c91559748.cpcon(e,tp,eg,ep,ev,re,r,rp) - local t=e:GetHandler():GetBattleTarget() - e:SetLabelObject(t) - return t and t:IsRelateToBattle() -end -function c91559748.cptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_POSITION,e:GetLabelObject(),1,0,0) -end -function c91559748.cpop(e,tp,eg,ep,ev,re,r,rp) - local g=e:GetLabelObject() - if g:IsRelateToBattle() and g:IsAttackPos() then - Duel.ChangePosition(g,POS_FACEUP_DEFENCE) - end -end diff --git a/script/c9156135.lua b/script/c9156135.lua deleted file mode 100644 index 5b7ad2ef19..0000000000 --- a/script/c9156135.lua +++ /dev/null @@ -1,65 +0,0 @@ ---見習い魔術師 -function c9156135.initial_effect(c) - --counter - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(9156135,0)) - e1:SetCategory(CATEGORY_COUNTER) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c9156135.addct) - e1:SetOperation(c9156135.addc) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - c:RegisterEffect(e2) - local e3=e1:Clone() - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e3) - --spsummon - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(9156135,1)) - e4:SetCategory(CATEGORY_SPECIAL_SUMMON) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e4:SetCode(EVENT_BATTLE_DESTROYED) - e4:SetCondition(c9156135.condition) - e4:SetTarget(c9156135.target) - e4:SetOperation(c9156135.operation) - c:RegisterEffect(e4) -end -function c9156135.filter(c) - return c:IsFaceup() and c:IsCanAddCounter(0x3001,1) -end -function c9156135.addct(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and c9156135.filter(chkc) end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c9156135.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,1,0,0x3001) -end -function c9156135.addc(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) then - tc:AddCounter(0x3001,1) - end -end -function c9156135.condition(e,tp,eg,ep,ev,re,r,rp) - return not e:GetHandler():IsLocation(LOCATION_DECK) and e:GetHandler():IsReason(REASON_BATTLE) -end -function c9156135.spfilter(c,e,tp) - return c:IsLevelBelow(2) and c:IsRace(RACE_SPELLCASTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN) -end -function c9156135.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c9156135.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c9156135.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c9156135.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEDOWN_DEFENCE) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c91580102.lua b/script/c91580102.lua deleted file mode 100644 index ee7bd3b404..0000000000 --- a/script/c91580102.lua +++ /dev/null @@ -1,74 +0,0 @@ ---レプティレス・アンガー -function c91580102.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c91580102.target) - e1:SetOperation(c91580102.operation) - c:RegisterEffect(e1) - --Atk,race - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(800) - c:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_EQUIP) - e3:SetCode(EFFECT_CHANGE_RACE) - e3:SetValue(RACE_REPTILE) - c:RegisterEffect(e3) - --Equip limit - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetCode(EFFECT_EQUIP_LIMIT) - e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e4:SetValue(1) - c:RegisterEffect(e4) - --atkdown - local e5=Effect.CreateEffect(c) - e5:SetDescription(aux.Stringid(91580102,0)) - e5:SetCategory(CATEGORY_ATKCHANGE) - e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e5:SetCode(EVENT_TO_GRAVE) - e5:SetProperty(EFFECT_FLAG_CARD_TARGET) - e5:SetCondition(c91580102.atkcon) - e5:SetTarget(c91580102.atktg) - e5:SetOperation(c91580102.atkop) - c:RegisterEffect(e5) -end -function c91580102.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c91580102.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,e:GetHandler(),tc) - end -end -function c91580102.atkcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsReason(REASON_DESTROY) -end -function c91580102.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsFaceup() end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil) -end -function c91580102.atkop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) and tc:IsFaceup() then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(-800) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - end -end diff --git a/script/c91584698.lua b/script/c91584698.lua deleted file mode 100644 index cacb3a74e2..0000000000 --- a/script/c91584698.lua +++ /dev/null @@ -1,106 +0,0 @@ ---EMトランプ・ウィッチ -function c91584698.initial_effect(c) - --pendulum summon - aux.AddPendulumProcedure(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_PZONE) - e2:SetCountLimit(1) - e2:SetTarget(c91584698.sptg) - e2:SetOperation(c91584698.spop) - c:RegisterEffect(e2) - --tohand - local e3=Effect.CreateEffect(c) - e3:SetCategory(CATEGORY_TOHAND) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_MZONE) - e3:SetCost(c91584698.thcost) - e3:SetTarget(c91584698.thtg) - e3:SetOperation(c91584698.thop) - c:RegisterEffect(e3) -end -function c91584698.filter1(c,e) - return c:IsCanBeFusionMaterial() and not c:IsImmuneToEffect(e) -end -function c91584698.filter2(c,e,tp,m,f,chkf) - return c:IsType(TYPE_FUSION) and (not f or f(c)) - and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf) -end -function c91584698.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp - local mg1=Duel.GetMatchingGroup(Card.IsCanBeFusionMaterial,tp,LOCATION_MZONE,0,nil) - local res=Duel.IsExistingMatchingCard(c91584698.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf) - if not res then - local ce=Duel.GetChainMaterial(tp) - if ce~=nil then - local fgroup=ce:GetTarget() - local mg2=fgroup(ce,e,tp) - local mf=ce:GetValue() - res=Duel.IsExistingMatchingCard(c91584698.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,chkf) - end - end - return res - end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function c91584698.spop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp - local mg1=Duel.GetMatchingGroup(c91584698.filter1,tp,LOCATION_MZONE,0,nil,e) - local sg1=Duel.GetMatchingGroup(c91584698.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf) - local mg2=nil - local sg2=nil - local ce=Duel.GetChainMaterial(tp) - if ce~=nil then - local fgroup=ce:GetTarget() - mg2=fgroup(ce,e,tp) - local mf=ce:GetValue() - sg2=Duel.GetMatchingGroup(c91584698.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,mf,chkf) - end - if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then - local sg=sg1:Clone() - if sg2 then sg:Merge(sg2) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local tg=sg:Select(tp,1,1,nil) - local tc=tg:GetFirst() - if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then - local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf) - tc:SetMaterial(mat1) - Duel.SendtoGrave(mat1,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION) - Duel.BreakEffect() - Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP) - else - local mat2=Duel.SelectFusionMaterial(tp,tc,mg2,nil,chkf) - local fop=ce:GetOperation() - fop(ce,e,tp,tc,mat2) - end - tc:CompleteProcedure() - end -end -function c91584698.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end -function c91584698.thfilter(c) - return c:IsCode(24094653) and c:IsAbleToHand() -end -function c91584698.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c91584698.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,0,1,0,LOCATION_DECK+LOCATION_GRAVE) -end -function c91584698.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c91584698.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil) - if g:GetCount()>0 and not g:GetFirst():IsHasEffect(EFFECT_NECRO_VALLEY) then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c91595718.lua b/script/c91595718.lua deleted file mode 100644 index 652a9513d6..0000000000 --- a/script/c91595718.lua +++ /dev/null @@ -1,50 +0,0 @@ ---秘術の書 -function c91595718.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c91595718.target) - e1:SetOperation(c91595718.operation) - c:RegisterEffect(e1) - --atk up - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(300) - c:RegisterEffect(e2) - --def up - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_EQUIP) - e3:SetCode(EFFECT_UPDATE_DEFENCE) - e3:SetValue(300) - c:RegisterEffect(e3) - --equip limit - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetCode(EFFECT_EQUIP_LIMIT) - e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e4:SetValue(c91595718.eqlimit) - c:RegisterEffect(e4) -end -function c91595718.eqlimit(e,c) - return c:IsRace(RACE_SPELLCASTER) -end -function c91595718.filter(c) - return c:IsFaceup() and c:IsRace(RACE_SPELLCASTER) -end -function c91595718.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c91595718.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c91595718.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c91595718.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c91595718.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,e:GetHandler(),tc) - end -end diff --git a/script/c91596726.lua b/script/c91596726.lua deleted file mode 100644 index cd0d0d660e..0000000000 --- a/script/c91596726.lua +++ /dev/null @@ -1,32 +0,0 @@ ---ダーク・クルセイダー -function c91596726.initial_effect(c) - --atkup - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(91596726,0)) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c91596726.cost) - e1:SetOperation(c91596726.operation) - c:RegisterEffect(e1) -end -function c91596726.cfilter(c) - return c:IsAttribute(ATTRIBUTE_DARK) and c:IsAbleToGraveAsCost() -end -function c91596726.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c91596726.cfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c91596726.cfilter,tp,LOCATION_HAND,0,1,1,nil) - Duel.SendtoGrave(g,REASON_COST) -end -function c91596726.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFaceup() and c:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(400) - e1:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e1) - end -end \ No newline at end of file diff --git a/script/c91597389.lua b/script/c91597389.lua deleted file mode 100644 index be0adeff0b..0000000000 --- a/script/c91597389.lua +++ /dev/null @@ -1,37 +0,0 @@ ---ゲットライド! -function c91597389.initial_effect(c) - --equip - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c91597389.target) - e1:SetOperation(c91597389.operation) - c:RegisterEffect(e1) -end -function c91597389.filter(c,tp) - return c:IsType(TYPE_UNION) and Duel.IsExistingMatchingCard(c91597389.filter2,tp,LOCATION_MZONE,0,1,nil,c) -end -function c91597389.filter2(c,eqc) - return c:IsFaceup() and c:GetUnionCount()==0 and eqc:CheckEquipTarget(c) -end -function c91597389.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c91597389.filter(chkc,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>(e:GetHandler():IsLocation(LOCATION_SZONE) and 0 or 1) - and Duel.IsExistingTarget(c91597389.filter,tp,LOCATION_GRAVE,0,1,nil,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local g=Duel.SelectTarget(tp,c91597389.filter,tp,LOCATION_GRAVE,0,1,1,nil,tp) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0) -end -function c91597389.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - local g=Duel.SelectMatchingCard(tp,c91597389.filter2,tp,LOCATION_MZONE,0,1,1,nil,tc) - if g:GetCount()>0 then - Duel.Equip(tp,tc,g:GetFirst()) - tc:SetStatus(STATUS_UNION,true) - end - end -end diff --git a/script/c91607976.lua b/script/c91607976.lua deleted file mode 100644 index 0e353d2c4b..0000000000 --- a/script/c91607976.lua +++ /dev/null @@ -1,66 +0,0 @@ ---D・クロックン -function c91607976.initial_effect(c) - --atk - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetCondition(c91607976.cona) - e1:SetValue(c91607976.vala) - c:RegisterEffect(e1) - --counter - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(91607976,0)) - e2:SetCategory(CATEGORY_COUNTER) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetCountLimit(1) - e2:SetRange(LOCATION_MZONE) - e2:SetCondition(c91607976.cond1) - e2:SetOperation(c91607976.opd1) - c:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(91607976,1)) - e3:SetCategory(CATEGORY_DAMAGE) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e3:SetCountLimit(1) - e3:SetRange(LOCATION_MZONE) - e3:SetCondition(c91607976.cond2) - e3:SetCost(c91607976.costd2) - e3:SetTarget(c91607976.tgd2) - e3:SetOperation(c91607976.opd2) - c:RegisterEffect(e3) -end -function c91607976.cona(e) - return e:GetHandler():IsAttackPos() -end -function c91607976.vala(e,c) - return c:GetCounter(0x8)*500 -end -function c91607976.cond1(e,tp,eg,ep,ev,re,r,rp) - return not e:GetHandler():IsDisabled() and e:GetHandler():IsDefencePos() -end -function c91607976.opd1(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - e:GetHandler():AddCounter(0x8,1) - end -end -function c91607976.cond2(e,tp,eg,ep,ev,re,r,rp) - return not e:GetHandler():IsDisabled() and e:GetHandler():IsDefencePos() -end -function c91607976.costd2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - e:SetLabel(e:GetHandler():GetCounter(0x8)*1000) - Duel.Release(e:GetHandler(),REASON_COST) -end -function c91607976.tgd2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():GetCounter(0x8)>0 end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(e:GetLabel()) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,e:GetLabel()) -end -function c91607976.opd2(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c9161357.lua b/script/c9161357.lua deleted file mode 100644 index c559e9f782..0000000000 --- a/script/c9161357.lua +++ /dev/null @@ -1,90 +0,0 @@ ---No.6 先史遺産アトランタル -function c9161357.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,6,2) - c:EnableReviveLimit() - --equip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(9161357,0)) - e1:SetCategory(CATEGORY_LEAVE_GRAVE+CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCondition(c9161357.eqcon) - e1:SetTarget(c9161357.eqtg) - e1:SetOperation(c9161357.eqop) - c:RegisterEffect(e1) - --lp - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(9161357,1)) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetCountLimit(1) - e2:SetRange(LOCATION_MZONE) - e2:SetCost(c9161357.lpcost) - e2:SetOperation(c9161357.lpop) - e2:SetLabelObject(e1) - c:RegisterEffect(e2) -end -c9161357.xyz_number=6 -function c9161357.eqcon(e,tp,eg,ep,ev,re,r,rp) - return bit.band(e:GetHandler():GetSummonType(),SUMMON_TYPE_XYZ)==SUMMON_TYPE_XYZ -end -function c9161357.filter(c) - return c:IsSetCard(0x48) and c:IsType(TYPE_MONSTER) -end -function c9161357.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c9161357.filter(chkc) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingTarget(c9161357.filter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local g=Duel.SelectTarget(tp,c9161357.filter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0) -end -function c9161357.eqop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsFaceup() and c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then - if not Duel.Equip(tp,tc,c,false) then return end - e:SetLabelObject(tc) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_OWNER_RELATE) - e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(c9161357.eqlimit) - tc:RegisterEffect(e1) - local atk=tc:GetBaseAttack()/2 - if atk>0 then - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetProperty(EFFECT_FLAG_OWNER_RELATE+EFFECT_FLAG_IGNORE_IMMUNE) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetReset(RESET_EVENT+0x1fe0000) - e2:SetValue(atk) - tc:RegisterEffect(e2) - end - end -end -function c9161357.eqlimit(e,c) - return e:GetOwner()==c -end -function c9161357.lpcost(e,tp,eg,ep,ev,re,r,rp,chk) - local ec=e:GetLabelObject():GetLabelObject() - if chk==0 then return Duel.GetCurrentPhase()==PHASE_MAIN1 - and ec and ec:GetEquipTarget()==e:GetHandler() and ec:IsAbleToGraveAsCost() - and e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) - Duel.SendtoGrave(ec,REASON_COST) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_BP) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) - e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function c9161357.lpop(e,tp,eg,ep,ev,re,r,rp) - Duel.SetLP(1-tp,Duel.GetLP(1-tp)/2) -end diff --git a/script/c91623717.lua b/script/c91623717.lua deleted file mode 100644 index e87f889ade..0000000000 --- a/script/c91623717.lua +++ /dev/null @@ -1,26 +0,0 @@ ---連鎖爆撃 -function c91623717.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c91623717.condition) - e1:SetTarget(c91623717.target) - e1:SetOperation(c91623717.activate) - c:RegisterEffect(e1) -end -function c91623717.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentChain()>0 and Duel.CheckChainUniqueness() -end -function c91623717.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - local dam=Duel.GetCurrentChain()*400 - Duel.SetTargetParam(dam) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,dam) -end -function c91623717.activate(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c91650245.lua b/script/c91650245.lua deleted file mode 100644 index 76a009962d..0000000000 --- a/script/c91650245.lua +++ /dev/null @@ -1,67 +0,0 @@ ---森羅の恵み -function c91650245.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TODECK+CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c91650245.target) - e1:SetOperation(c91650245.activate) - c:RegisterEffect(e1) -end -function c91650245.filter(c,e,tp) - return c:IsAbleToDeck() and Duel.IsExistingMatchingCard(c91650245.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,c,e,tp) -end -function c91650245.spfilter(c,e,tp) - return c:IsSetCard(0x90) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsHasEffect(EFFECT_NECRO_VALLEY) -end -function c91650245.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c91650245.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_HAND) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE) -end -function c91650245.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectMatchingCard(tp,c91650245.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - local tc=g:GetFirst() - if tc then - local opt=Duel.SelectOption(tp,aux.Stringid(91650245,0),aux.Stringid(91650245,1)) - Duel.SendtoDeck(g,nil,opt,REASON_EFFECT) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=Duel.SelectMatchingCard(tp,c91650245.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,tc,e,tp) - local sc=sg:GetFirst() - if sc then - Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetOperation(c91650245.tdop) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - sc:RegisterEffect(e1) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EFFECT_IMMUNE_EFFECT) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - e2:SetValue(c91650245.efilter) - sc:RegisterEffect(e2) - end - end -end -function c91650245.tdop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsType(TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ) - or Duel.SelectOption(tp,aux.Stringid(91650245,0),aux.Stringid(91650245,1))==0 then - Duel.SendtoDeck(c,nil,0,REASON_EFFECT) - else - Duel.SendtoDeck(c,nil,1,REASON_EFFECT) - end -end -function c91650245.efilter(e,te) - return te:GetOwner()~=e:GetOwner() -end diff --git a/script/c91662792.lua b/script/c91662792.lua deleted file mode 100644 index c1d87ca8d6..0000000000 --- a/script/c91662792.lua +++ /dev/null @@ -1,33 +0,0 @@ ---ガスタ・イグル -function c91662792.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(91662792,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetCondition(c91662792.condition) - e1:SetTarget(c91662792.target) - e1:SetOperation(c91662792.operation) - c:RegisterEffect(e1) -end -function c91662792.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) -end -function c91662792.filter(c,e,tp) - return c:IsLevelBelow(4) and c:IsSetCard(0x10) and not c:IsType(TYPE_TUNER) - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c91662792.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c91662792.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c91662792.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c91662792.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c91663373.lua b/script/c91663373.lua deleted file mode 100644 index e46e199083..0000000000 --- a/script/c91663373.lua +++ /dev/null @@ -1,24 +0,0 @@ ---サイバー・エスパー -function c91663373.initial_effect(c) - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(91663373,0)) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EVENT_DRAW) - e1:SetCondition(c91663373.cfcon) - e1:SetOperation(c91663373.cfop) - c:RegisterEffect(e1) -end -function c91663373.cfcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsAttackPos() and ep==1-tp -end -function c91663373.filter(c) - return c:IsLocation(LOCATION_HAND) and not c:IsPublic() -end -function c91663373.cfop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) and e:GetHandler():IsPosition(POS_FACEUP_ATTACK) then - local cg=eg:Filter(c91663373.filter,nil) - Duel.ConfirmCards(tp,cg) - Duel.ShuffleHand(1-tp) - end -end diff --git a/script/c91677585.lua b/script/c91677585.lua deleted file mode 100644 index ec7a4f9a4b..0000000000 --- a/script/c91677585.lua +++ /dev/null @@ -1,54 +0,0 @@ ---かっとビング・チャレンジ -function c91677585.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetHintTiming(TIMING_BATTLE_PHASE) - e1:SetCondition(c91677585.condition) - e1:SetTarget(c91677585.target) - e1:SetOperation(c91677585.activate) - c:RegisterEffect(e1) -end -function c91677585.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp and Duel.GetCurrentPhase()==PHASE_BATTLE -end -function c91677585.filter(c) - return c:IsFaceup() and c:IsType(TYPE_XYZ) - and c:GetBattledGroupCount()==1 and c:GetEffectCount(EFFECT_EXTRA_ATTACK)==0 -end -function c91677585.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c91677585.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c91677585.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c91677585.filter,tp,LOCATION_MZONE,0,1,1,nil) -end -function c91677585.activate(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_EXTRA_ATTACK) - e1:SetValue(1) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EFFECT_CANNOT_ACTIVATE) - e2:SetTargetRange(0,1) - e2:SetValue(c91677585.aclimit) - e2:SetCondition(c91677585.actcon) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_BATTLE) - tc:RegisterEffect(e2) - end -end -function c91677585.actcon(e) - return Duel.GetAttacker()==e:GetHandler() -end -function c91677585.aclimit(e,re,tp) - return re:IsHasType(EFFECT_TYPE_ACTIVATE) or re:IsActiveType(TYPE_MONSTER) -end diff --git a/script/c91697229.lua b/script/c91697229.lua deleted file mode 100644 index baa375c241..0000000000 --- a/script/c91697229.lua +++ /dev/null @@ -1,69 +0,0 @@ ---極星邪狼フェンリル -function c91697229.initial_effect(c) - c:EnableReviveLimit() - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(91697229,0)) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_SPSUM_PARAM) - e1:SetRange(LOCATION_HAND) - e1:SetTargetRange(POS_FACEUP_DEFENCE,1) - e1:SetCondition(c91697229.spcon) - c:RegisterEffect(e1) - --self destroy - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e4:SetRange(LOCATION_MZONE) - e4:SetCode(EFFECT_SELF_DESTROY) - e4:SetCondition(c91697229.descon) - c:RegisterEffect(e4) - --pos - local e5=Effect.CreateEffect(c) - e5:SetDescription(aux.Stringid(91697229,1)) - e5:SetCategory(CATEGORY_POSITION) - e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e5:SetCode(EVENT_PHASE_START+PHASE_BATTLE) - e5:SetRange(LOCATION_MZONE) - e5:SetCountLimit(1) - e5:SetCondition(c91697229.poscon) - e5:SetTarget(c91697229.postg) - e5:SetOperation(c91697229.posop) - c:RegisterEffect(e5) - --damage - local e6=Effect.CreateEffect(c) - e6:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE) - e6:SetCode(EVENT_PRE_BATTLE_DAMAGE) - e6:SetOperation(c91697229.damop) - c:RegisterEffect(e6) -end -function c91697229.spcon(e,c) - if c==nil then return Duel.GetCurrentPhase()==PHASE_MAIN2 end - local tp=c:GetControler() - return Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c91697229.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) -end -function c91697229.filter(c) - return c:IsFaceup() and c:IsSetCard(0x4b) -end -function c91697229.descon(e) - return not Duel.IsExistingMatchingCard(c91697229.filter,0,LOCATION_MZONE,LOCATION_MZONE,1,nil) -end -function c91697229.poscon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c91697229.postg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local g=Duel.GetMatchingGroup(Card.IsDefencePos,tp,LOCATION_MZONE,0,nil) - Duel.SetOperationInfo(0,CATEGORY_POSITION,g,g:GetCount(),0,0) -end -function c91697229.posop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsDefencePos,tp,LOCATION_MZONE,0,nil) - if g:GetCount()>0 then - Duel.ChangePosition(g,POS_FACEUP_ATTACK) - end -end -function c91697229.damop(e,tp,eg,ep,ev,re,r,rp) - Duel.ChangeBattleDamage(1-ep,ev,false) -end diff --git a/script/c91711547.lua b/script/c91711547.lua deleted file mode 100644 index 8dfa3de36d..0000000000 --- a/script/c91711547.lua +++ /dev/null @@ -1,27 +0,0 @@ ---フレムベル・デビル -function c91711547.initial_effect(c) - --damage - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(91711547,0)) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_BATTLE_DAMAGE) - e1:SetCondition(c91711547.damcon) - e1:SetTarget(c91711547.damtg) - e1:SetOperation(c91711547.damop) - c:RegisterEffect(e1) -end -function c91711547.damcon(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp -end -function c91711547.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,0) -end -function c91711547.damop(e,tp,eg,ep,ev,re,r,rp) - local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) - local d=Duel.GetMatchingGroupCount(Card.IsRace,tp,LOCATION_GRAVE,0,nil,RACE_PYRO)*200 - Duel.Damage(p,d,REASON_EFFECT) -end \ No newline at end of file diff --git a/script/c91718579.lua b/script/c91718579.lua deleted file mode 100644 index 94944bef11..0000000000 --- a/script/c91718579.lua +++ /dev/null @@ -1,86 +0,0 @@ ---ゴゴゴアリステラ&デクシア -function c91718579.initial_effect(c) - --untargetable - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(0,LOCATION_MZONE) - e1:SetCondition(c91718579.tgcon) - e1:SetValue(c91718579.atlimit) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_CANNOT_SELECT_EFFECT_TARGET) - e2:SetProperty(EFFECT_FLAG_SET_AVAILABLE) - e2:SetTargetRange(0,0xff) - e2:SetValue(c91718579.tglimit) - c:RegisterEffect(e2) - --effect gain - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e3:SetCode(EVENT_BE_MATERIAL) - e3:SetCondition(c91718579.effcon) - e3:SetOperation(c91718579.effop) - c:RegisterEffect(e3) -end -function c91718579.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x59) -end -function c91718579.tgcon(e) - return Duel.IsExistingMatchingCard(c91718579.cfilter,0,LOCATION_MZONE,LOCATION_MZONE,1,e:GetHandler()) -end -function c91718579.atlimit(e,c) - return c:IsFaceup() and c:IsSetCard(0x59) -end -function c91718579.tglimit(e,re,c) - return c:IsFaceup() and c:IsSetCard(0x59) and c:IsType(TYPE_MONSTER) -end -function c91718579.effcon(e,tp,eg,ep,ev,re,r,rp) - local mg=e:GetHandler():GetReasonCard():GetMaterial() - return r==REASON_XYZ and mg:IsExists(Card.IsSetCard,mg:GetCount(),nil,0x59) -end -function c91718579.effop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_CARD,0,91718579) - local c=e:GetHandler() - local rc=c:GetReasonCard() - local e1=Effect.CreateEffect(rc) - e1:SetDescription(aux.Stringid(91718579,0)) - e1:SetCategory(CATEGORY_POSITION+CATEGORY_DEFCHANGE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(c91718579.poscon) - e1:SetTarget(c91718579.postg) - e1:SetOperation(c91718579.posop) - e1:SetReset(RESET_EVENT+0x1fe0000) - rc:RegisterEffect(e1,true) - if not rc:IsType(TYPE_EFFECT) then - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_ADD_TYPE) - e2:SetValue(TYPE_EFFECT) - e2:SetReset(RESET_EVENT+0x1fe0000) - rc:RegisterEffect(e2,true) - end -end -function c91718579.poscon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_XYZ -end -function c91718579.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsPosition(POS_FACEUP_ATTACK) end - if chk==0 then return Duel.IsExistingTarget(Card.IsPosition,tp,0,LOCATION_MZONE,1,nil,POS_FACEUP_ATTACK) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE) - local g=Duel.SelectTarget(tp,Card.IsPosition,tp,0,LOCATION_MZONE,1,1,nil,POS_FACEUP_ATTACK) - Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0) -end -function c91718579.posop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsDefencePos() or not tc:IsRelateToEffect(e) then return end - if Duel.ChangePosition(tc,POS_FACEUP_DEFENCE)==0 then return end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_DEFENCE_FINAL) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e1:SetValue(0) - tc:RegisterEffect(e1) -end diff --git a/script/c91754175.lua b/script/c91754175.lua deleted file mode 100644 index f536ad9d79..0000000000 --- a/script/c91754175.lua +++ /dev/null @@ -1,39 +0,0 @@ ---犬タウルス -function c91754175.initial_effect(c) - --atk up - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(91754175,0)) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_PRE_DAMAGE_CALCULATE) - e1:SetCountLimit(1) - e1:SetCondition(c91754175.condition) - e1:SetTarget(c91754175.target) - e1:SetOperation(c91754175.operation) - c:RegisterEffect(e1) -end -function c91754175.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetAttackTarget()~=nil -end -function c91754175.tgfilter(c) - return c:IsRace(RACE_BEAST+RACE_BEASTWARRIOR+RACE_WINDBEAST) and c:IsAbleToGrave() -end -function c91754175.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c91754175.tgfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_HAND+LOCATION_DECK) -end -function c91754175.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c91754175.tgfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil) - local c=e:GetHandler() - local tc=g:GetFirst() - if tc and Duel.SendtoGrave(tc,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_GRAVE) - and c:IsRelateToBattle() and c:IsFaceup() then - local lv=tc:GetLevel() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(lv*100) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_BATTLE) - c:RegisterEffect(e1) - end -end diff --git a/script/c917796.lua b/script/c917796.lua deleted file mode 100644 index 3a58696f48..0000000000 --- a/script/c917796.lua +++ /dev/null @@ -1,33 +0,0 @@ ---ガガガタッグ -function c917796.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,917796+EFFECT_COUNT_CODE_OATH) - e1:SetTarget(c917796.target) - e1:SetOperation(c917796.activate) - c:RegisterEffect(e1) -end -function c917796.filter(c) - return c:IsFaceup() and c:IsSetCard(0x54) -end -function c917796.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c917796.filter,tp,LOCATION_MZONE,0,1,nil) end -end -function c917796.activate(e,tp,eg,ep,ev,re,r,rp) - local sg=Duel.GetMatchingGroup(c917796.filter,tp,LOCATION_MZONE,0,nil) - local atk=sg:GetCount()*500 - local c=e:GetHandler() - local tc=sg:GetFirst() - while tc do - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(atk) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_STANDBY,2) - tc:RegisterEffect(e1) - tc=sg:GetNext() - end -end diff --git a/script/c91781589.lua b/script/c91781589.lua deleted file mode 100644 index 67801bd90c..0000000000 --- a/script/c91781589.lua +++ /dev/null @@ -1,23 +0,0 @@ ---覇者の一括 -function c91781589.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_STANDBY_PHASE) - e1:SetCondition(c91781589.condition) - e1:SetOperation(c91781589.activate) - c:RegisterEffect(e1) -end -function c91781589.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp and Duel.GetCurrentPhase()==PHASE_STANDBY -end -function c91781589.activate(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_BP) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetReset(RESET_PHASE+PHASE_END) - e1:SetTargetRange(0,1) - Duel.RegisterEffect(e1,tp) -end diff --git a/script/c91782219.lua b/script/c91782219.lua deleted file mode 100644 index 01d291d223..0000000000 --- a/script/c91782219.lua +++ /dev/null @@ -1,4 +0,0 @@ ---クラブ・タートル -function c91782219.initial_effect(c) - c:EnableReviveLimit() -end diff --git a/script/c91798373.lua b/script/c91798373.lua deleted file mode 100644 index 822e8e8b50..0000000000 --- a/script/c91798373.lua +++ /dev/null @@ -1,32 +0,0 @@ ---デュアル・スコーピオン -function c91798373.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(91798373,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c91798373.sumtg) - e1:SetOperation(c91798373.sumop) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e2) -end -function c91798373.filter(c,e,tp) - return c:IsLevelBelow(4) and c:IsType(TYPE_DUAL) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c91798373.sumtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c91798373.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c91798373.sumop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c91798373.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c91812341.lua b/script/c91812341.lua deleted file mode 100644 index 5fd278e6bd..0000000000 --- a/script/c91812341.lua +++ /dev/null @@ -1,65 +0,0 @@ ---トリオンの蟲惑魔 -function c91812341.initial_effect(c) - --immune - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_IMMUNE_EFFECT) - e1:SetValue(c91812341.efilter) - c:RegisterEffect(e1) - --search - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(91812341,0)) - e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e2:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE) - e2:SetCode(EVENT_SUMMON_SUCCESS) - e2:SetTarget(c91812341.thtg) - e2:SetOperation(c91812341.thop) - c:RegisterEffect(e2) - --destroy - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(91812341,1)) - e3:SetCategory(CATEGORY_DESTROY) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - e3:SetTarget(c91812341.destg) - e3:SetOperation(c91812341.desop) - c:RegisterEffect(e3) -end -function c91812341.efilter(e,te) - local c=te:GetHandler() - return c:GetType()==TYPE_TRAP and (c:IsSetCard(0x4c) or c:IsSetCard(0x89)) -end -function c91812341.filter(c) - return c:GetType()==TYPE_TRAP and (c:IsSetCard(0x4c) or c:IsSetCard(0x89)) and c:IsAbleToHand() -end -function c91812341.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c91812341.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c91812341.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c91812341.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end -function c91812341.desfilter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable() -end -function c91812341.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() and c91812341.desfilter(chkc) end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c91812341.desfilter,tp,0,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c91812341.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c91819979.lua b/script/c91819979.lua deleted file mode 100644 index 58d6d66890..0000000000 --- a/script/c91819979.lua +++ /dev/null @@ -1,65 +0,0 @@ ---マジックブラスト -function c91819979.initial_effect(c) - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c91819979.damtg) - e1:SetOperation(c91819979.damop) - c:RegisterEffect(e1) - --salvage - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(91819979,0)) - e2:SetCategory(CATEGORY_TOHAND) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_PREDRAW) - e2:SetRange(LOCATION_GRAVE) - e2:SetCondition(c91819979.thcon) - e2:SetTarget(c91819979.thtg) - e2:SetOperation(c91819979.thop) - c:RegisterEffect(e2) -end -function c91819979.cfilter(c) - return c:IsFaceup() and c:IsRace(RACE_SPELLCASTER) -end -function c91819979.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c91819979.cfilter,tp,LOCATION_MZONE,0,1,nil) end - local ct=Duel.GetMatchingGroupCount(c91819979.cfilter,tp,LOCATION_MZONE,0,nil) - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(ct*200) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,ct*200) -end -function c91819979.damop(e,tp,eg,ep,ev,re,r,rp) - local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) - local ct=Duel.GetMatchingGroupCount(c91819979.cfilter,tp,LOCATION_MZONE,0,nil) - Duel.Damage(p,ct*200,REASON_EFFECT) -end -function c91819979.thcon(e,tp,eg,ep,ev,re,r,rp) - return tp==Duel.GetTurnPlayer() and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0 - and Duel.GetDrawCount(tp)>0 -end -function c91819979.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToHand() end - local dt=Duel.GetDrawCount(tp) - if dt~=0 then - _replace_count=0 - _replace_max=dt - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EFFECT_DRAW_COUNT) - e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_DRAW) - e1:SetValue(0) - Duel.RegisterEffect(e1,tp) - end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0) -end -function c91819979.thop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - _replace_count=_replace_count+1 - if _replace_count<=_replace_max and c:IsRelateToEffect(e) then - Duel.SendtoHand(c,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,c) - end -end diff --git a/script/c91822647.lua b/script/c91822647.lua deleted file mode 100644 index 2beaac6de5..0000000000 --- a/script/c91822647.lua +++ /dev/null @@ -1,46 +0,0 @@ ---ガスタのつむじ風 -function c91822647.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TODECK+CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c91822647.condition) - e1:SetTarget(c91822647.target) - e1:SetOperation(c91822647.activate) - c:RegisterEffect(e1) -end -function c91822647.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 -end -function c91822647.filter1(c) - return c:IsSetCard(0x10) and c:IsType(TYPE_MONSTER) and c:IsAbleToDeck() -end -function c91822647.filter2(c,e,tp) - return c:IsSetCard(0x10) and c:IsDefenceBelow(1000) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c91822647.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c91822647.filter1,tp,LOCATION_GRAVE,0,2,nil) - and Duel.IsExistingMatchingCard(c91822647.filter2,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectTarget(tp,c91822647.filter1,tp,LOCATION_GRAVE,0,2,2,nil) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,2,0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c91822647.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local tg=g:Filter(Card.IsRelateToEffect,nil,e) - if tg:GetCount()==2 then - Duel.SendtoDeck(tg,nil,2,REASON_EFFECT) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=Duel.SelectMatchingCard(tp,c91822647.filter2,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if sg:GetCount()>0 then - Duel.BreakEffect() - Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) - end - end -end diff --git a/script/c91831066.lua b/script/c91831066.lua deleted file mode 100644 index 540201a23d..0000000000 --- a/script/c91831066.lua +++ /dev/null @@ -1,83 +0,0 @@ ---水照明 -function c91831066.initial_effect(c) - c:SetUniqueOnField(1,0,91831066) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --atk & def - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_PRE_DAMAGE_CALCULATE) - e2:SetRange(LOCATION_SZONE) - e2:SetCondition(c91831066.atkcon) - e2:SetOperation(c91831066.atkop) - c:RegisterEffect(e2) - --spsummon - local e3=Effect.CreateEffect(c) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_TO_GRAVE) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e3:SetCondition(c91831066.spcon) - e3:SetTarget(c91831066.sptg) - e3:SetOperation(c91831066.spop) - c:RegisterEffect(e3) -end -function c91831066.atkcon(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetAttacker() - local bc=Duel.GetAttackTarget() - if not bc then return false end - if bc:IsControler(1-tp) then bc=tc end - e:SetLabelObject(bc) - return bc:IsFaceup() and bc:IsSetCard(0xcd) -end -function c91831066.atkop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local tc=e:GetLabelObject() - if tc:IsRelateToBattle() and tc:IsFaceup() and tc:IsControler(tp) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetValue(tc:GetAttack()*2) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_DAMAGE_CAL) - tc:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_SET_DEFENCE_FINAL) - e2:SetValue(tc:GetDefence()*2) - tc:RegisterEffect(e2) - end -end -function c91831066.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) -end -function c91831066.spfilter(c,e,tp) - return c:IsRace(RACE_AQUA) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c91831066.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c91831066.spfilter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c91831066.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c91831066.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c91831066.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetTargetRange(1,0) - e1:SetTarget(c91831066.splimit) - e1:SetReset(RESET_PHASE+RESET_END) - Duel.RegisterEffect(e1,tp) -end -function c91831066.splimit(e,c,sump,sumtype,sumpos,targetp,se) - return c:GetRace()~=RACE_AQUA -end diff --git a/script/c91842653.lua b/script/c91842653.lua deleted file mode 100644 index 11934dd424..0000000000 --- a/script/c91842653.lua +++ /dev/null @@ -1,99 +0,0 @@ ---トゥーン・デーモン -function c91842653.initial_effect(c) - c:EnableReviveLimit() - --special summon - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_SPSUMMON_PROC) - e2:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e2:SetRange(LOCATION_HAND) - e2:SetCondition(c91842653.spcon) - e2:SetOperation(c91842653.spop) - c:RegisterEffect(e2) - --destroy - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e3:SetRange(LOCATION_MZONE) - e3:SetCode(EVENT_LEAVE_FIELD) - e3:SetCondition(c91842653.sdescon) - e3:SetOperation(c91842653.sdesop) - c:RegisterEffect(e3) - --direct attack - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetCode(EFFECT_DIRECT_ATTACK) - e4:SetCondition(c91842653.dircon) - c:RegisterEffect(e4) - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_SINGLE) - e5:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET) - e5:SetCondition(c91842653.atcon) - e5:SetValue(c91842653.atlimit) - c:RegisterEffect(e5) - local e6=Effect.CreateEffect(c) - e6:SetType(EFFECT_TYPE_SINGLE) - e6:SetCode(EFFECT_CANNOT_DIRECT_ATTACK) - e6:SetCondition(c91842653.atcon) - c:RegisterEffect(e6) - --cannot attack - local e7=Effect.CreateEffect(c) - e7:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e7:SetCode(EVENT_SPSUMMON_SUCCESS) - e7:SetOperation(c91842653.atklimit) - c:RegisterEffect(e7) - --attack cost - local e8=Effect.CreateEffect(c) - e8:SetType(EFFECT_TYPE_SINGLE) - e8:SetCode(EFFECT_ATTACK_COST) - e8:SetCost(c91842653.atcost) - e8:SetOperation(c91842653.atop) - c:RegisterEffect(e8) -end -function c91842653.cfilter(c) - return c:IsFaceup() and c:IsCode(15259703) -end -function c91842653.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.IsExistingMatchingCard(c91842653.cfilter,tp,LOCATION_ONFIELD,0,1,nil) - and Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 and Duel.CheckReleaseGroup(tp,nil,1,nil) -end -function c91842653.spop(e,tp,eg,ep,ev,re,r,rp,c) - local tp=c:GetControler() - local g=Duel.SelectReleaseGroup(tp,nil,1,1,nil) - Duel.Release(g,REASON_COST) -end -function c91842653.sfilter(c) - return c:IsReason(REASON_DESTROY) and c:IsPreviousPosition(POS_FACEUP) and c:GetPreviousCodeOnField()==15259703 and c:IsPreviousLocation(LOCATION_ONFIELD) -end -function c91842653.sdescon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c91842653.sfilter,1,nil) -end -function c91842653.sdesop(e,tp,eg,ep,ev,re,r,rp) - Duel.Destroy(e:GetHandler(),REASON_EFFECT) -end -function c91842653.atkfilter(c) - return c:IsFaceup() and c:IsType(TYPE_TOON) -end -function c91842653.dircon(e) - return not Duel.IsExistingMatchingCard(c91842653.atkfilter,e:GetHandlerPlayer(),0,LOCATION_MZONE,1,nil) -end -function c91842653.atcon(e) - return Duel.IsExistingMatchingCard(c91842653.atkfilter,e:GetHandlerPlayer(),0,LOCATION_MZONE,1,nil) -end -function c91842653.atlimit(e,c) - return not c:IsType(TYPE_TOON) or c:IsFacedown() -end -function c91842653.atklimit(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e:GetHandler():RegisterEffect(e1) -end -function c91842653.atcost(e,c,tp) - return Duel.CheckLPCost(tp,500) -end -function c91842653.atop(e,tp,eg,ep,ev,re,r,rp) - Duel.PayLPCost(tp,500) -end diff --git a/script/c91862578.lua b/script/c91862578.lua deleted file mode 100644 index f98ed14d94..0000000000 --- a/script/c91862578.lua +++ /dev/null @@ -1,18 +0,0 @@ ---激昂のムカムカ -function c91862578.initial_effect(c) - --atkup - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetRange(LOCATION_MZONE) - e1:SetValue(c91862578.val) - c:RegisterEffect(e1) - --defup - local e2=e1:Clone() - e2:SetCode(EFFECT_UPDATE_DEFENCE) - c:RegisterEffect(e2) -end -function c91862578.val(e,c) - return Duel.GetFieldGroupCount(c:GetControler(),LOCATION_HAND,0)*400 -end diff --git a/script/c91869203.lua b/script/c91869203.lua deleted file mode 100644 index 14c7fa2d5f..0000000000 --- a/script/c91869203.lua +++ /dev/null @@ -1,29 +0,0 @@ ---アマゾネスの射手 -function c91869203.initial_effect(c) - --damage - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(91869203,0)) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c91869203.cost) - e1:SetTarget(c91869203.target) - e1:SetOperation(c91869203.operation) - c:RegisterEffect(e1) -end -function c91869203.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,nil,2,nil) end - local sg=Duel.SelectReleaseGroup(tp,nil,2,2,nil) - Duel.Release(sg,REASON_COST) -end -function c91869203.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(1200) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,1200) -end -function c91869203.operation(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c91895091.lua b/script/c91895091.lua deleted file mode 100644 index 6127d65c00..0000000000 --- a/script/c91895091.lua +++ /dev/null @@ -1,80 +0,0 @@ ---銀嶺の巨神 -function c91895091.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_EARTH),3,2) - c:EnableReviveLimit() - --actlimit - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(91895091,0)) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCost(c91895091.cost) - e1:SetTarget(c91895091.target) - e1:SetOperation(c91895091.operation) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(91895091,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_BATTLE_DESTROYING) - e2:SetCondition(c91895091.spcon) - e2:SetTarget(c91895091.sptg) - e2:SetOperation(c91895091.spop) - c:RegisterEffect(e2) -end -function c91895091.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c91895091.filter(c) - return c:IsFacedown() and c:GetSequence()~=5 -end -function c91895091.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_SZONE) and chkc:IsControler(1-tp) and c91895091.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c91895091.filter,tp,0,LOCATION_SZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(91895091,2)) - Duel.SelectTarget(tp,c91895091.filter,tp,0,LOCATION_SZONE,1,1,nil) -end -function c91895091.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsFacedown() and tc:IsRelateToEffect(e) then - c:SetCardTarget(tc) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_OWNER_RELATE) - e1:SetCode(EFFECT_CANNOT_TRIGGER) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetCondition(c91895091.rcon) - e1:SetValue(1) - tc:RegisterEffect(e1) - end -end -function c91895091.rcon(e) - return e:GetOwner():IsHasCardTarget(e:GetHandler()) -end -function c91895091.spcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsRelateToBattle() and c:GetOverlayCount()>0 -end -function c91895091.spfilter(c,e,tp) - return c:IsAttribute(ATTRIBUTE_EARTH) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c91895091.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c91895091.spfilter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c91895091.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c91895091.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c91895091.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENCE) - end -end diff --git a/script/c91903221.lua b/script/c91903221.lua deleted file mode 100644 index eadd845649..0000000000 --- a/script/c91903221.lua +++ /dev/null @@ -1,42 +0,0 @@ ---エヴォルド・エルギネル -function c91903221.initial_effect(c) - --draw & search - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(91903221,0)) - e1:SetCategory(CATEGORY_DRAW+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_SINGLE) - e1:SetCode(EVENT_RELEASE) - e1:SetCondition(c91903221.condition) - e1:SetTarget(c91903221.target) - e1:SetOperation(c91903221.operation) - c:RegisterEffect(e1) -end -function c91903221.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) and e:GetHandler():IsLocation(LOCATION_GRAVE) -end -function c91903221.filter1(c) - return c:IsRace(RACE_DINOSAUR) and c:IsAbleToDeck() -end -function c91903221.filter2(c) - return c:IsSetCard(0x304e) and c:IsAbleToHand() -end -function c91903221.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c91903221.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.Draw(tp,1,REASON_EFFECT) - local g1=Duel.GetMatchingGroup(c91903221.filter1,tp,LOCATION_HAND,0,nil) - local g2=Duel.GetMatchingGroup(c91903221.filter2,tp,LOCATION_DECK,0,nil) - if g1:GetCount()>0 and g2:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(91903221,1)) then - Duel.BreakEffect() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local tg1=g1:Select(tp,1,1,nil) - Duel.ConfirmCards(1-tp,tg1) - Duel.SendtoDeck(tg1,nil,2,REASON_EFFECT) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local tg2=g2:Select(tp,1,1,nil) - Duel.SendtoHand(tg2,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tg2) - end -end diff --git a/script/c91907707.lua b/script/c91907707.lua deleted file mode 100644 index 469a488e5a..0000000000 --- a/script/c91907707.lua +++ /dev/null @@ -1,133 +0,0 @@ ---クリフォート・アーカイブ -function c91907707.initial_effect(c) - --pendulum summon - aux.AddPendulumProcedure(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --splimit - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE) - e2:SetRange(LOCATION_PZONE) - e2:SetTargetRange(1,0) - e2:SetCondition(aux.nfbdncon) - e2:SetTarget(c91907707.splimit) - c:RegisterEffect(e2) - --atk up - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetRange(LOCATION_PZONE) - e3:SetCode(EFFECT_UPDATE_ATTACK) - e3:SetTargetRange(LOCATION_MZONE,0) - e3:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0xaa)) - e3:SetValue(300) - c:RegisterEffect(e3) - --summon with no tribute - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(91907707,0)) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e4:SetCode(EFFECT_SUMMON_PROC) - e4:SetCondition(c91907707.ntcon) - c:RegisterEffect(e4) - --change level - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_SINGLE) - e5:SetCode(EFFECT_SUMMON_COST) - e5:SetOperation(c91907707.lvop) - c:RegisterEffect(e5) - local e6=Effect.CreateEffect(c) - e6:SetType(EFFECT_TYPE_SINGLE) - e6:SetCode(EFFECT_SPSUMMON_COST) - e6:SetOperation(c91907707.lvop2) - c:RegisterEffect(e6) - --immune - local e7=Effect.CreateEffect(c) - e7:SetType(EFFECT_TYPE_SINGLE) - e7:SetCode(EFFECT_IMMUNE_EFFECT) - e7:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_UNCOPYABLE) - e7:SetRange(LOCATION_MZONE) - e7:SetCondition(c91907707.immcon) - e7:SetValue(aux.qlifilter) - c:RegisterEffect(e7) - --tohand - local e8=Effect.CreateEffect(c) - e8:SetDescription(aux.Stringid(91907707,1)) - e8:SetCategory(CATEGORY_TOHAND) - e8:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e8:SetCode(EVENT_RELEASE) - e8:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e8:SetTarget(c91907707.thtg) - e8:SetOperation(c91907707.thop) - c:RegisterEffect(e8) -end -function c91907707.splimit(e,c) - return not c:IsSetCard(0xaa) -end -function c91907707.ntcon(e,c,minc) - if c==nil then return true end - return minc==0 and c:GetLevel()>4 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 -end -function c91907707.lvcon(e) - return e:GetHandler():GetMaterialCount()==0 -end -function c91907707.lvop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CHANGE_LEVEL) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c91907707.lvcon) - e1:SetValue(4) - e1:SetReset(RESET_EVENT+0xff0000) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_SET_BASE_ATTACK) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetCondition(c91907707.lvcon) - e2:SetValue(1800) - e2:SetReset(RESET_EVENT+0xff0000) - c:RegisterEffect(e2) -end -function c91907707.lvop2(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CHANGE_LEVEL) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetValue(4) - e1:SetReset(RESET_EVENT+0xff0000) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_SET_BASE_ATTACK) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetValue(1800) - e2:SetReset(RESET_EVENT+0xff0000) - c:RegisterEffect(e2) -end -function c91907707.immcon(e) - return bit.band(e:GetHandler():GetSummonType(),SUMMON_TYPE_NORMAL)==SUMMON_TYPE_NORMAL -end -function c91907707.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsAbleToHand() end - if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToHand,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g=Duel.SelectTarget(tp,Card.IsAbleToHand,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c91907707.thop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - end -end diff --git a/script/c91932350.lua b/script/c91932350.lua deleted file mode 100644 index 249fab5164..0000000000 --- a/script/c91932350.lua +++ /dev/null @@ -1,12 +0,0 @@ ---ハーピィ・レディ1 -function c91932350.initial_effect(c) - --atkup - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetRange(LOCATION_MZONE) - e1:SetTarget(aux.TargetBoolFunction(Card.IsAttribute,ATTRIBUTE_WIND)) - e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e1:SetValue(300) - c:RegisterEffect(e1) -end diff --git a/script/c91949988.lua b/script/c91949988.lua deleted file mode 100644 index cd55211f3c..0000000000 --- a/script/c91949988.lua +++ /dev/null @@ -1,15 +0,0 @@ ---迅雷の騎士ガイアドラグーン -function c91949988.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,7,2,c91949988.ovfilter,aux.Stringid(91949988,0)) - c:EnableReviveLimit() - --pierce - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_PIERCE) - c:RegisterEffect(e1) -end -function c91949988.ovfilter(c) - local rk=c:GetRank() - return c:IsFaceup() and (rk==5 or rk==6) -end diff --git a/script/c91985515.lua b/script/c91985515.lua deleted file mode 100644 index 7bc3ba30c1..0000000000 --- a/script/c91985515.lua +++ /dev/null @@ -1,32 +0,0 @@ ---鋼核初期化 -function c91985515.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c91985515.cost) - e1:SetTarget(c91985515.target) - e1:SetOperation(c91985515.activate) - c:RegisterEffect(e1) -end -function c91985515.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsSetCard,1,nil,0x1d) end - local g=Duel.SelectReleaseGroup(tp,Card.IsSetCard,1,1,nil,0x1d) - Duel.Release(g,REASON_COST) -end -function c91985515.filter(c) - return c:IsCode(36623431) and c:IsAbleToHand() and not c:IsHasEffect(EFFECT_NECRO_VALLEY) -end -function c91985515.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c91985515.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE) -end -function c91985515.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c91985515.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c91989718.lua b/script/c91989718.lua deleted file mode 100644 index 192dbc4c92..0000000000 --- a/script/c91989718.lua +++ /dev/null @@ -1,34 +0,0 @@ ---アタック・リフレクター・ユニット -function c91989718.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c91989718.cost) - e1:SetTarget(c91989718.target) - e1:SetOperation(c91989718.activate) - c:RegisterEffect(e1) -end -function c91989718.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsCode,1,nil,70095154) end - local g=Duel.SelectReleaseGroup(tp,Card.IsCode,1,1,nil,70095154) - Duel.Release(g,REASON_COST) -end -function c91989718.spfilter(c,e,tp) - return c:IsCode(68774379) and c:IsCanBeSpecialSummoned(e,0,tp,true,true) -end -function c91989718.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsExistingMatchingCard(c91989718.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) -end -function c91989718.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c91989718.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()~=0 then - Duel.SpecialSummon(g,0,tp,tp,true,true,POS_FACEUP) - g:GetFirst():CompleteProcedure() - end -end diff --git a/script/c91998119.lua b/script/c91998119.lua deleted file mode 100644 index 646ba750ab..0000000000 --- a/script/c91998119.lua +++ /dev/null @@ -1,98 +0,0 @@ ---XYZ-ドラゴン・キャノン -function c91998119.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcCode3(c,62651957,65622692,64500000,true,true) - --spsummon condition - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(c91998119.splimit) - c:RegisterEffect(e1) - --special summon rule - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_SPSUMMON_PROC) - e2:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e2:SetRange(LOCATION_EXTRA) - e2:SetCondition(c91998119.spcon) - e2:SetOperation(c91998119.spop) - c:RegisterEffect(e2) - --destroy - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(91998119,0)) - e3:SetCategory(CATEGORY_DESTROY) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetRange(LOCATION_MZONE) - e3:SetCost(c91998119.descost) - e3:SetTarget(c91998119.destg) - e3:SetOperation(c91998119.desop) - c:RegisterEffect(e3) -end -function c91998119.splimit(e,se,sp,st) - return not e:GetHandler():IsLocation(LOCATION_EXTRA+LOCATION_GRAVE) -end -function c91998119.spfilter(c,code) - return c:IsCode(code) and c:IsAbleToRemoveAsCost() -end -function c91998119.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ft<-2 then return false end - local g1=Duel.GetMatchingGroup(c91998119.spfilter,tp,LOCATION_ONFIELD,0,nil,62651957) - local g2=Duel.GetMatchingGroup(c91998119.spfilter,tp,LOCATION_ONFIELD,0,nil,65622692) - local g3=Duel.GetMatchingGroup(c91998119.spfilter,tp,LOCATION_ONFIELD,0,nil,64500000) - if g1:GetCount()==0 or g2:GetCount()==0 or g3:GetCount()==0 then return false end - if ft>0 then return true end - local f1=g1:FilterCount(Card.IsLocation,nil,LOCATION_MZONE)>0 and 1 or 0 - local f2=g2:FilterCount(Card.IsLocation,nil,LOCATION_MZONE)>0 and 1 or 0 - local f3=g3:FilterCount(Card.IsLocation,nil,LOCATION_MZONE)>0 and 1 or 0 - if ft==-2 then return f1+f2+f3==3 - elseif ft==-1 then return f1+f2+f3>=2 - else return f1+f2+f3>=1 end -end -function c91998119.spop(e,tp,eg,ep,ev,re,r,rp,c) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - local g1=Duel.GetMatchingGroup(c91998119.spfilter,tp,LOCATION_ONFIELD,0,nil,62651957) - local g2=Duel.GetMatchingGroup(c91998119.spfilter,tp,LOCATION_ONFIELD,0,nil,65622692) - local g3=Duel.GetMatchingGroup(c91998119.spfilter,tp,LOCATION_ONFIELD,0,nil,64500000) - g1:Merge(g2) - g1:Merge(g3) - local g=Group.CreateGroup() - local tc=nil - for i=1,3 do - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - if ft<=0 then - tc=g1:FilterSelect(tp,Card.IsLocation,1,1,nil,LOCATION_MZONE):GetFirst() - else - tc=g1:Select(tp,1,1,nil):GetFirst() - end - g:AddCard(tc) - g1:Remove(Card.IsCode,nil,tc:GetCode()) - ft=ft+1 - end - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c91998119.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) -end -function c91998119.filter(c) - return c:IsDestructable() -end -function c91998119.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and c91998119.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c91998119.filter,tp,0,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c91998119.filter,tp,0,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c91998119.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c92001300.lua b/script/c92001300.lua deleted file mode 100644 index c7b53fc185..0000000000 --- a/script/c92001300.lua +++ /dev/null @@ -1,54 +0,0 @@ ---古代の機械城 -function c92001300.initial_effect(c) - c:EnableCounterPermit(0x300b) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --atk up - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x7)) - e2:SetValue(300) - c:RegisterEffect(e2) - --counter - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e3:SetCode(EVENT_SUMMON_SUCCESS) - e3:SetRange(LOCATION_SZONE) - e3:SetOperation(c92001300.addc) - c:RegisterEffect(e3) - local e4=e3:Clone() - e4:SetCode(EVENT_MSET) - c:RegisterEffect(e4) - --summon proc - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(92001300,0)) - e4:SetType(EFFECT_TYPE_FIELD) - e4:SetCode(EFFECT_SUMMON_PROC) - e4:SetRange(LOCATION_SZONE) - e4:SetTargetRange(LOCATION_HAND,0) - e4:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x7)) - e4:SetCondition(c92001300.sumcon) - e4:SetOperation(c92001300.sumop) - e4:SetValue(SUMMON_TYPE_ADVANCE) - c:RegisterEffect(e4) - local e5=e4:Clone() - e5:SetCode(EFFECT_SET_PROC) - c:RegisterEffect(e5) -end -function c92001300.addc(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():AddCounter(0x300b,1) -end -function c92001300.sumcon(e,c) - if c==nil then return e:GetHandler():IsReleasable() end - local mi,ma=c:GetTributeRequirement() - return ma>0 and e:GetHandler():GetCounter(0x300b)>=mi and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 -end -function c92001300.sumop(e,tp,eg,ep,ev,re,r,rp,c) - Duel.Release(e:GetHandler(),REASON_COST) -end diff --git a/script/c9201964.lua b/script/c9201964.lua deleted file mode 100644 index eb92720569..0000000000 --- a/script/c9201964.lua +++ /dev/null @@ -1,26 +0,0 @@ ---D-フォーチュン -function c9201964.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetCondition(c9201964.condition) - e1:SetCost(c9201964.cost) - e1:SetOperation(c9201964.activate) - c:RegisterEffect(e1) -end -function c9201964.condition(e,tp,eg,ep,ev,re,r,rp) - return tp~=Duel.GetTurnPlayer() and Duel.GetAttackTarget()==nil -end -function c9201964.cfilter(c) - return c:IsSetCard(0xc008) and c:IsAbleToRemoveAsCost() -end -function c9201964.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c9201964.cfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c9201964.cfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c9201964.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.SkipPhase(1-tp,PHASE_BATTLE,RESET_PHASE+PHASE_BATTLE,1) -end diff --git a/script/c92035412.lua b/script/c92035412.lua deleted file mode 100644 index 8ba9ecfe4a..0000000000 --- a/script/c92035412.lua +++ /dev/null @@ -1,61 +0,0 @@ ---ヴァイロン・エレメント -function c92035412.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --Search - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(92035412,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetRange(LOCATION_SZONE) - e2:SetCode(EVENT_DESTROYED) - e2:SetCondition(c92035412.spcon) - e2:SetTarget(c92035412.sptg) - e2:SetOperation(c92035412.spop) - c:RegisterEffect(e2) -end -function c92035412.cfilter(c,tp) - return c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_SZONE) and c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousSetCard(0x30) - and bit.band(c:GetPreviousTypeOnField(),TYPE_EQUIP)~=0 -end -function c92035412.spcon(e,tp,eg,ep,ev,re,r,rp) - local ct=eg:FilterCount(c92035412.cfilter,nil,tp) - e:SetLabel(ct) - return ct>0 -end -function c92035412.spfilter(c,e,tp) - return c:IsSetCard(0x30) and c:IsType(TYPE_TUNER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c92035412.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return not e:GetHandler():IsStatus(STATUS_CHAINING) - and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c92035412.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c92035412.spop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ft<=0 then return end - if ft>e:GetLabel() then ft=e:GetLabel() end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c92035412.spfilter,tp,LOCATION_DECK,0,1,ft,nil,e,tp) - local tc=g:GetFirst() - while tc do - Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL) - e1:SetValue(c92035412.synlimit) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - tc=g:GetNext() - end - Duel.SpecialSummonComplete() -end -function c92035412.synlimit(e,c) - if not c then return false end - return not c:IsSetCard(0x30) -end diff --git a/script/c92039899.lua b/script/c92039899.lua deleted file mode 100644 index 3de67d7e47..0000000000 --- a/script/c92039899.lua +++ /dev/null @@ -1,41 +0,0 @@ ---デーモンの騎兵 -function c92039899.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(92039899,0)) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCondition(c92039899.spcon) - e1:SetTarget(c92039899.sptg) - e1:SetOperation(c92039899.spop) - c:RegisterEffect(e1) -end -function c92039899.spcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsReason(REASON_EFFECT) and c:IsReason(REASON_DESTROY) -end -function c92039899.spfilter(c,e,tp) - return c:IsSetCard(0x45) and c:GetCode()~=92039899 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c92039899.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c92039899.spfilter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c92039899.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c92039899.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,g:GetCount(),0,0) -end -function c92039899.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)>0 then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetDescription(aux.Stringid(92039899,0)) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - end -end diff --git a/script/c92053608.lua b/script/c92053608.lua deleted file mode 100644 index 5735c05e34..0000000000 --- a/script/c92053608.lua +++ /dev/null @@ -1,27 +0,0 @@ ---アクアアクトレス・アロワナ -function c92053608.initial_effect(c) - --to hand - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetTarget(c92053608.thtg) - e1:SetOperation(c92053608.thop) - c:RegisterEffect(e1) -end -function c92053608.filter(c) - return c:IsSetCard(0xcd) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() -end -function c92053608.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c92053608.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c92053608.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c92053608.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c92065772.lua b/script/c92065772.lua deleted file mode 100644 index 4340705e4e..0000000000 --- a/script/c92065772.lua +++ /dev/null @@ -1,26 +0,0 @@ ---氷結界に住む魔酔虫 -function c92065772.initial_effect(c) - --dis field - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(92065772,0)) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetOperation(c92065772.operation) - c:RegisterEffect(e1) -end -function c92065772.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 - and Duel.GetLocationCount(1-tp,LOCATION_MZONE)<=0 then return end - --disable field - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_DISABLE_FIELD) - e1:SetOperation(c92065772.disop) - e1:SetReset(RESET_EVENT+0x1ff0000) - e:GetHandler():RegisterEffect(e1) -end -function c92065772.disop(e,tp) - local dis1=Duel.SelectDisableField(tp,1,LOCATION_MZONE,LOCATION_MZONE,0) - return dis1 -end diff --git a/script/c92084010.lua b/script/c92084010.lua deleted file mode 100644 index 0deb0c27cf..0000000000 --- a/script/c92084010.lua +++ /dev/null @@ -1,12 +0,0 @@ ---ヒゲアンコウ -function c92084010.initial_effect(c) - --double tribute - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DOUBLE_TRIBUTE) - e1:SetValue(c92084010.condition) - c:RegisterEffect(e1) -end -function c92084010.condition(e,c) - return c:IsAttribute(ATTRIBUTE_WATER) -end diff --git a/script/c92099232.lua b/script/c92099232.lua deleted file mode 100644 index 7d441f4743..0000000000 --- a/script/c92099232.lua +++ /dev/null @@ -1,26 +0,0 @@ ---シェイプシスター -function c92099232.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,92099232+EFFECT_COUNT_CODE_OATH) - e1:SetTarget(c92099232.target) - e1:SetOperation(c92099232.activate) - c:RegisterEffect(e1) -end -function c92099232.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and - Duel.IsPlayerCanSpecialSummonMonster(tp,92099232,0,0x11,0,0,2,RACE_FIEND,ATTRIBUTE_EARTH) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c92099232.activate(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) then return end - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 - or not Duel.IsPlayerCanSpecialSummonMonster(tp,92099232,0,0x11,0,0,2,RACE_FIEND,ATTRIBUTE_EARTH) then return end - c:AddTrapMonsterAttribute(TYPE_NORMAL+TYPE_TUNER,ATTRIBUTE_EARTH,RACE_FIEND,2,0,0) - Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP) - c:TrapMonsterBlock() -end diff --git a/script/c92142169.lua b/script/c92142169.lua deleted file mode 100644 index 3b0342b039..0000000000 --- a/script/c92142169.lua +++ /dev/null @@ -1,51 +0,0 @@ ---パクバグ -function c92142169.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c92142169.spcon) - e1:SetValue(1) - c:RegisterEffect(e1) - --atkchange - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(92142169,0)) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCondition(c92142169.atkcon) - e2:SetTarget(c92142169.atktg) - e2:SetOperation(c92142169.atkop) - c:RegisterEffect(e2) -end -function c92142169.filter(c) - return c:IsFaceup() and c:IsType(TYPE_XYZ) -end -function c92142169.spcon(e,c) - if c==nil then return true end - return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and - Duel.IsExistingMatchingCard(c92142169.filter,c:GetControler(),0,LOCATION_MZONE,1,nil) -end -function c92142169.atkcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+1 -end -function c92142169.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsFaceup() end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil) -end -function c92142169.atkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) and tc:IsFaceup() then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(-300) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - end -end diff --git a/script/c92219931.lua b/script/c92219931.lua deleted file mode 100644 index c7db66dd6c..0000000000 --- a/script/c92219931.lua +++ /dev/null @@ -1,19 +0,0 @@ ---二者一両損 -function c92219931.initial_effect(c) - --discard deck - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCategory(CATEGORY_DECKDES) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c92219931.discost) - e1:SetOperation(c92219931.disop) - c:RegisterEffect(e1) -end -function c92219931.discost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,1) and Duel.IsPlayerCanDiscardDeck(1-tp,1) end - Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,PLAYER_ALL,1) -end -function c92219931.disop(e,tp,eg,ep,ev,re,r,rp) - Duel.DiscardDeck(0,1,REASON_EFFECT) - Duel.DiscardDeck(1,1,REASON_EFFECT) -end diff --git a/script/c92223641.lua b/script/c92223641.lua deleted file mode 100644 index 3f7097b649..0000000000 --- a/script/c92223641.lua +++ /dev/null @@ -1,45 +0,0 @@ ---天空の泉 -function c92223641.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --adjust - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_RECOVER) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_BATTLE_DESTROYED) - e2:SetRange(LOCATION_SZONE) - e2:SetCost(c92223641.cost) - e2:SetTarget(c92223641.tg) - e2:SetOperation(c92223641.op) - c:RegisterEffect(e2) -end -function c92223641.filter(g,tp) - local c=g:GetFirst() - if c:IsControler(1-tp) then c=g:GetNext() end - if c and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsLocation(LOCATION_GRAVE) then return c end - return nil -end -function c92223641.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local rc=c92223641.filter(eg,tp) - return rc and rc:IsAbleToRemoveAsCost() - end - local rc=c92223641.filter(eg,tp) - e:SetLabel(rc:GetAttack()) - Duel.Remove(rc,POS_FACEUP,REASON_EFFECT) -end -function c92223641.tg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(e:GetLabel()) - Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,e:GetLabel()) -end -function c92223641.op(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Recover(p,d,REASON_EFFECT) -end diff --git a/script/c92246806.lua b/script/c92246806.lua deleted file mode 100644 index bf3ab28193..0000000000 --- a/script/c92246806.lua +++ /dev/null @@ -1,77 +0,0 @@ ---妖仙獣 鎌弐太刀 -function c92246806.initial_effect(c) - --summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(92246806,0)) - e1:SetCategory(CATEGORY_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DELAY) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c92246806.sumtg) - e1:SetOperation(c92246806.sumop) - c:RegisterEffect(e1) - --direct attack - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DIRECT_ATTACK) - c:RegisterEffect(e2) - --damage reduce - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e3:SetCode(EVENT_PRE_BATTLE_DAMAGE) - e3:SetCondition(c92246806.rdcon) - e3:SetOperation(c92246806.rdop) - c:RegisterEffect(e3) - --return - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e4:SetCode(EVENT_SUMMON_SUCCESS) - e4:SetOperation(c92246806.regop) - c:RegisterEffect(e4) -end -function c92246806.filter(c) - return c:IsSetCard(0xb3) and not c:IsCode(92246806) and c:IsSummonable(true,nil) -end -function c92246806.sumtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c92246806.filter,tp,LOCATION_HAND,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,0,0) -end -function c92246806.sumop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON) - local g=Duel.SelectMatchingCard(tp,c92246806.filter,tp,LOCATION_HAND,0,1,1,nil) - if g:GetCount()>0 then - Duel.Summon(tp,g:GetFirst(),true,nil) - end -end -function c92246806.rdcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return ep~=tp and Duel.GetAttackTarget()==nil - and c:GetEffectCount(EFFECT_DIRECT_ATTACK)<2 and Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0 -end -function c92246806.rdop(e,tp,eg,ep,ev,re,r,rp) - Duel.ChangeBattleDamage(ep,ev/2) -end -function c92246806.regop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(92246806,1)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetTarget(c92246806.rettg) - e1:SetOperation(c92246806.retop) - e1:SetReset(RESET_EVENT+0x1ec0000+RESET_PHASE+PHASE_END) - c:RegisterEffect(e1) -end -function c92246806.rettg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0) -end -function c92246806.retop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SendtoHand(c,nil,REASON_EFFECT) - end -end diff --git a/script/c92266279.lua b/script/c92266279.lua deleted file mode 100644 index 7562d3a42d..0000000000 --- a/script/c92266279.lua +++ /dev/null @@ -1,104 +0,0 @@ ---潤いの風 -function c92266279.initial_effect(c) - --activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_END_PHASE) - e1:SetTarget(c92266279.target) - c:RegisterEffect(e1) - --to hand - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(92266279,1)) - e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetHintTiming(0,TIMING_END_PHASE) - e2:SetRange(LOCATION_SZONE) - e2:SetCountLimit(1,92266279) - e2:SetCost(c92266279.thcost) - e2:SetTarget(c92266279.thtg) - e2:SetOperation(c92266279.thop) - c:RegisterEffect(e2) - --recover - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(92266279,2)) - e3:SetCategory(CATEGORY_RECOVER) - e3:SetType(EFFECT_TYPE_QUICK_O) - e3:SetCode(EVENT_FREE_CHAIN) - e3:SetHintTiming(0,TIMING_END_PHASE) - e3:SetRange(LOCATION_SZONE) - e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e3:SetCountLimit(1,92266280) - e3:SetCondition(c92266279.reccon) - e3:SetTarget(c92266279.rectg) - e3:SetOperation(c92266279.recop) - c:RegisterEffect(e3) -end -function c92266279.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local b1=c92266279.thcost(e,tp,eg,ep,ev,re,r,rp,0) and c92266279.thtg(e,tp,eg,ep,ev,re,r,rp,0) - local b2=c92266279.reccon(e,tp,eg,ep,ev,re,r,rp) and c92266279.rectg(e,tp,eg,ep,ev,re,r,rp,0) - if (b1 or b2) and Duel.SelectYesNo(tp,94) then - local opt=0 - if b1 and b2 then - opt=Duel.SelectOption(tp,aux.Stringid(92266279,1),aux.Stringid(92266279,2)) - elseif b1 then - opt=Duel.SelectOption(tp,aux.Stringid(92266279,1)) - else - opt=Duel.SelectOption(tp,aux.Stringid(92266279,2))+1 - end - if opt==0 then - e:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e:SetProperty(0) - e:SetOperation(c92266279.thop) - c92266279.thcost(e,tp,eg,ep,ev,re,r,rp,1) - c92266279.thtg(e,tp,eg,ep,ev,re,r,rp,1) - else - e:SetCategory(CATEGORY_RECOVER) - e:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e:SetOperation(c92266279.recop) - c92266279.rectg(e,tp,eg,ep,ev,re,r,rp,1) - end - else - e:SetCategory(0) - e:SetProperty(0) - e:SetOperation(nil) - end -end -function c92266279.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,1000) and Duel.GetFlagEffect(tp,92266279)==0 end - Duel.PayLPCost(tp,1000) - Duel.RegisterFlagEffect(tp,92266279,RESET_PHASE+RESET_END,0,1) -end -function c92266279.thfilter(c) - return c:IsSetCard(0xc9) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() -end -function c92266279.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c92266279.thfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c92266279.thop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c92266279.thfilter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end -function c92266279.reccon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetLP(tp)0 then - return dif>2000 and 2000 or dif - else return 0 end -end diff --git a/script/c923596.lua b/script/c923596.lua deleted file mode 100644 index ce2fc15b5e..0000000000 --- a/script/c923596.lua +++ /dev/null @@ -1,49 +0,0 @@ ---ギアギアーマー -function c923596.initial_effect(c) - --turn set - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(923596,0)) - e1:SetCategory(CATEGORY_POSITION) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetTarget(c923596.target) - e1:SetOperation(c923596.operation) - c:RegisterEffect(e1) - --tohand - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(923596,1)) - e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e2:SetCode(EVENT_FLIP) - e2:SetTarget(c923596.shtg) - e2:SetOperation(c923596.shop) - c:RegisterEffect(e2) -end -function c923596.target(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsCanTurnSet() and c:GetFlagEffect(923596)==0 end - c:RegisterFlagEffect(923596,RESET_EVENT+0x1fc0000+RESET_PHASE+PHASE_END,0,1) - Duel.SetOperationInfo(0,CATEGORY_POSITION,c,1,0,0) -end -function c923596.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - Duel.ChangePosition(c,POS_FACEDOWN_DEFENCE) - end -end -function c923596.filter(c) - return c:IsSetCard(0x72) and c:GetCode()~=923596 and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() -end -function c923596.shtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c923596.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c923596.shop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c923596.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c92361635.lua b/script/c92361635.lua deleted file mode 100644 index 0633a7a413..0000000000 --- a/script/c92361635.lua +++ /dev/null @@ -1,68 +0,0 @@ ---アトミック・スクラップ・ドラゴン -function c92361635.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0x24),aux.NonTuner(nil),2) - c:EnableReviveLimit() - --Destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(92361635,0)) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_TODECK) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_MZONE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c92361635.destg) - e1:SetOperation(c92361635.desop) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(92361635,1)) - e2:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetCondition(c92361635.spcon) - e2:SetTarget(c92361635.sptg) - e2:SetOperation(c92361635.spop) - c:RegisterEffect(e2) -end -function c92361635.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,LOCATION_ONFIELD,0,1,nil) - and Duel.IsExistingTarget(Card.IsAbleToDeck,tp,0,LOCATION_GRAVE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g1=Duel.SelectTarget(tp,Card.IsDestructable,tp,LOCATION_ONFIELD,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g1,1,0,0) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g2=Duel.SelectTarget(tp,Card.IsAbleToDeck,tp,0,LOCATION_GRAVE,1,3,nil) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g2,g2:GetCount(),0,0) -end -function c92361635.desop(e,tp,eg,ep,ev,re,r,rp) - local ex,g1=Duel.GetOperationInfo(0,CATEGORY_DESTROY) - local ex,g2=Duel.GetOperationInfo(0,CATEGORY_TODECK) - if g1:GetFirst():IsRelateToEffect(e) and Duel.Destroy(g1,REASON_EFFECT)~=0 then - local hg=g2:Filter(Card.IsRelateToEffect,nil,e) - Duel.SendtoDeck(hg,nil,2,REASON_EFFECT) - end -end -function c92361635.spcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local crp=c:GetReasonPlayer() - return c:IsReason(REASON_DESTROY) and c:GetPreviousControler()==tp and tp~=crp and crp~=PLAYER_NONE -end -function c92361635.spfilter(c,e,tp) - return c:IsSetCard(0x24) and not c:IsType(TYPE_SYNCHRO) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c92361635.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c92361635.spfilter(chkc,e,tp) end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c92361635.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,g:GetCount(),0,0) -end -function c92361635.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c92365601.lua b/script/c92365601.lua deleted file mode 100644 index 7cebf39c92..0000000000 --- a/script/c92365601.lua +++ /dev/null @@ -1,48 +0,0 @@ ---RUM-リミテッド・バリアンズ・フォース -function c92365601.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c92365601.target) - e1:SetOperation(c92365601.activate) - c:RegisterEffect(e1) -end -function c92365601.filter1(c,e,tp) - local rk=c:GetRank() - return c:IsFaceup() and c:IsType(TYPE_XYZ) and rk==4 - and Duel.IsExistingMatchingCard(c92365601.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,c,rk+1) -end -function c92365601.filter2(c,e,tp,mc,rk) - if c:GetOriginalCode()==6165656 and not mc:IsCode(48995978) then return false end - return c:GetRank()==rk and c:IsSetCard(0x1048) and mc:IsCanBeXyzMaterial(c) - and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) -end -function c92365601.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c92365601.filter1(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsExistingTarget(c92365601.filter1,tp,LOCATION_MZONE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - local g=Duel.SelectTarget(tp,c92365601.filter1,tp,LOCATION_MZONE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function c92365601.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<0 then return end - local tc=Duel.GetFirstTarget() - if tc:IsFacedown() or not tc:IsRelateToEffect(e) or tc:IsControler(1-tp) or tc:IsImmuneToEffect(e) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c92365601.filter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc,tc:GetRank()+1) - local sc=g:GetFirst() - if sc then - local mg=tc:GetOverlayGroup() - if mg:GetCount()~=0 then - Duel.Overlay(sc,mg) - end - sc:SetMaterial(Group.FromCards(tc)) - Duel.Overlay(sc,Group.FromCards(tc)) - Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP) - sc:CompleteProcedure() - end -end diff --git a/script/c9236985.lua b/script/c9236985.lua deleted file mode 100644 index e07711bdbe..0000000000 --- a/script/c9236985.lua +++ /dev/null @@ -1,37 +0,0 @@ ---リチュアの写魂鏡 -function c9236985.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c9236985.target) - e1:SetOperation(c9236985.activate) - c:RegisterEffect(e1) -end -function c9236985.filter(c,e,tp,lp) - if bit.band(c:GetType(),0x81)~=0x81 or not c:IsSetCard(0x3a) - or not c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,true,false) then return false end - return lp>c:GetLevel()*500 -end -function c9236985.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local lp=Duel.GetLP(tp) - return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c9236985.filter,tp,LOCATION_HAND,0,1,nil,e,tp,lp) - end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c9236985.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local lp=Duel.GetLP(tp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local tg=Duel.SelectMatchingCard(tp,c9236985.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp,lp) - local tc=tg:GetFirst() - if tc then - Duel.PayLPCost(tp,tc:GetLevel()*500) - tc:SetMaterial(nil) - Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,true,false,POS_FACEUP) - tc:CompleteProcedure() - end -end diff --git a/script/c92373006.lua b/script/c92373006.lua deleted file mode 100644 index ce1185f69a..0000000000 --- a/script/c92373006.lua +++ /dev/null @@ -1,65 +0,0 @@ ---スレイブタイガー -function c92373006.initial_effect(c) - --special summon rule - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(92373006,0)) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c92373006.sprcon) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(92373006,0)) - e2:SetCategory(CATEGORY_TODECK+CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetRange(LOCATION_MZONE) - e2:SetCost(c92373006.spcost) - e2:SetTarget(c92373006.sptg) - e2:SetOperation(c92373006.spop) - c:RegisterEffect(e2) -end -function c92373006.sprfilter(c) - return c:IsFaceup() and c:IsSetCard(0x19) -end -function c92373006.sprcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c92373006.sprfilter,tp,LOCATION_MZONE,0,1,nil) -end -function c92373006.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsReleasable() end - Duel.Release(c,REASON_COST) -end -function c92373006.tgfilter(c) - return c:IsFaceup() and c:IsSetCard(0x19) and c:IsAbleToDeck() -end -function c92373006.spfilter(c,e,tp) - return c:IsSetCard(0x19) and c:IsCanBeSpecialSummoned(e,130,tp,false,false) -end -function c92373006.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:GetLocation()==LOCATION_MZONE and chkc:GetControler()==tp and c92373006.tgfilter(chkc) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-2 - and Duel.IsExistingTarget(c92373006.tgfilter,tp,LOCATION_MZONE,0,1,nil) - and Duel.IsExistingMatchingCard(c92373006.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - Duel.SelectTarget(tp,c92373006.tgfilter,tp,LOCATION_MZONE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,LOCATION_DECK) -end -function c92373006.spop(e,tp,eg,ep,ev,re,r,rp) - local rc=Duel.GetFirstTarget() - if not rc or not rc:IsFaceup() or not rc:IsRelateToEffect(e) then return end - local rt=Duel.SendtoDeck(rc,nil,2,REASON_EFFECT) - if rt==0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c92373006.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - local tc=g:GetFirst() - if tc then - Duel.SpecialSummon(tc,130,tp,tp,false,false,POS_FACEUP) - tc:RegisterFlagEffect(tc:GetOriginalCode(),RESET_EVENT+0x1ff0000,0,0) - end -end diff --git a/script/c92377303.lua b/script/c92377303.lua deleted file mode 100644 index 8d06c1e1c1..0000000000 --- a/script/c92377303.lua +++ /dev/null @@ -1,67 +0,0 @@ ---黒衣の大賢者 -function c92377303.initial_effect(c) - c:EnableReviveLimit() - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(92377303,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetRange(LOCATION_HAND+LOCATION_DECK) - e1:SetProperty(EFFECT_FLAG_CHAIN_UNIQUE) - e1:SetCode(71625222) - e1:SetCondition(c92377303.spcon) - e1:SetCost(c92377303.cost) - e1:SetTarget(c92377303.sptg) - e1:SetOperation(c92377303.spop) - c:RegisterEffect(e1) - --to hand - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(92377303,1)) - e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetCondition(c92377303.thcon) - e2:SetTarget(c92377303.thtg) - e2:SetOperation(c92377303.thop) - c:RegisterEffect(e2) -end -function c92377303.spcon(e,tp,eg,ep,ev,re,r,rp) - return ep==tp -end -function c92377303.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsCode,1,nil,46986414) end - local g=Duel.SelectReleaseGroup(tp,Card.IsCode,1,1,nil,46986414) - Duel.Release(g,REASON_COST) -end -function c92377303.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,false) end - if e:GetHandler():IsLocation(LOCATION_DECK) then - Duel.ConfirmCards(1-tp,e:GetHandler()) - end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c92377303.spop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) and Duel.SpecialSummon(e:GetHandler(),0,tp,tp,true,false,POS_FACEUP)>0 then - e:GetHandler():CompleteProcedure() - end -end -function c92377303.thcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler()==re:GetHandler() -end -function c92377303.thfilter(c) - return c:IsType(TYPE_SPELL) and c:IsAbleToHand() -end -function c92377303.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c92377303.thfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c92377303.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c92377303.thfilter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c92394653.lua b/script/c92394653.lua deleted file mode 100644 index b1986326ae..0000000000 --- a/script/c92394653.lua +++ /dev/null @@ -1,60 +0,0 @@ ---スピリットの誘い -function c92394653.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --tohand - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(92394653,0)) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_TO_HAND) - e2:SetRange(LOCATION_SZONE) - e2:SetCondition(c92394653.condition) - e2:SetTarget(c92394653.target) - e2:SetOperation(c92394653.operation) - c:RegisterEffect(e2) - --maintain - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e3:SetCode(EVENT_PHASE+PHASE_STANDBY) - e3:SetRange(LOCATION_SZONE) - e3:SetCountLimit(1) - e3:SetCondition(c92394653.mtcon) - e3:SetOperation(c92394653.mtop) - c:RegisterEffect(e3) -end -function c92394653.filter(c,tp) - return c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP) - and c:IsControler(tp) and c:IsType(TYPE_SPIRIT) -end -function c92394653.condition(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c92394653.filter,1,nil,tp) -end -function c92394653.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsAbleToHand() end - if chk==0 then return e:GetHandler():IsRelateToEffect(e) end - Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_RTOHAND) - local g=Duel.SelectTarget(1-tp,Card.IsAbleToHand,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0) -end -function c92394653.operation(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - end -end -function c92394653.mtcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c92394653.mtop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLP(tp)>500 and Duel.SelectYesNo(tp,aux.Stringid(92394653,1)) then - Duel.PayLPCost(tp,500) - else - Duel.Destroy(e:GetHandler(),REASON_RULE) - end -end \ No newline at end of file diff --git a/script/c92408984.lua b/script/c92408984.lua deleted file mode 100644 index b52b882a9e..0000000000 --- a/script/c92408984.lua +++ /dev/null @@ -1,92 +0,0 @@ ---ドラゴンの宝珠 -function c92408984.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c92408984.cost1) - e1:SetTarget(c92408984.target1) - e1:SetOperation(c92408984.operation1) - c:RegisterEffect(e1) - --instant(chain) - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(92408984,0)) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetRange(LOCATION_SZONE) - e2:SetCode(EVENT_CHAINING) - e2:SetCondition(c92408984.condition2) - e2:SetCost(c92408984.cost2) - e2:SetTarget(c92408984.target2) - e2:SetOperation(c92408984.operation2) - c:RegisterEffect(e2) -end -function c92408984.cfilter(c) - return c:IsLocation(LOCATION_MZONE) and c:IsFaceup() and c:IsRace(RACE_DRAGON) -end -function c92408984.cost1(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - e:SetLabel(0) - local ct=Duel.GetCurrentChain() - if ct==1 then return end - local pe=Duel.GetChainInfo(ct-1,CHAININFO_TRIGGERING_EFFECT) - if not pe:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return end - if not pe:GetHandler():IsType(TYPE_TRAP) then return false end - local tg=Duel.GetChainInfo(ct-1,CHAININFO_TARGET_CARDS) - if not tg or not tg:IsExists(c92408984.cfilter,1,nil) then return false end - if not Duel.IsChainNegatable(ct-1) then return false end - if not Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) then return end - if Duel.SelectYesNo(tp,aux.Stringid(92408984,1)) then - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) - e:SetLabel(1) - end -end -function c92408984.target1(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - if e:GetLabel()~=1 then return end - local ct=Duel.GetCurrentChain() - local te=Duel.GetChainInfo(ct-1,CHAININFO_TRIGGERING_EFFECT) - local tc=te:GetHandler() - Duel.SetOperationInfo(0,CATEGORY_DISABLE,tc,1,0,0) - if tc:IsDestructable() then - Duel.SetTargetCard(tc) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,tc,1,0,0) - end -end -function c92408984.operation1(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if e:GetLabel()~=1 then return end - if not c:IsRelateToEffect(e) then return end - local ct=Duel.GetChainInfo(0,CHAININFO_CHAIN_COUNT) - local tc=Duel.GetFirstTarget() - Duel.NegateEffect(ct-1) - if tc and tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end -function c92408984.condition2(e,tp,eg,ep,ev,re,r,rp) - if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return end - if not re:GetHandler():IsType(TYPE_TRAP) then return false end - local tg=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) - if not tg or not tg:IsExists(c92408984.cfilter,1,nil) then return false end - return Duel.IsChainNegatable(ev) -end -function c92408984.cost2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) -end -function c92408984.target2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0) - if eg:GetFirst():IsDestructable() then - eg:GetFirst():CreateEffectRelation(e) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) - end -end -function c92408984.operation2(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) then return end - Duel.NegateEffect(ev) - if re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(eg,REASON_EFFECT) - end -end diff --git a/script/c92418590.lua b/script/c92418590.lua deleted file mode 100644 index aff9c4e68b..0000000000 --- a/script/c92418590.lua +++ /dev/null @@ -1,45 +0,0 @@ ---ギミック・パペット-ネクロ・ドール -function c92418590.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(92418590,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_GRAVE) - e1:SetCountLimit(1,92418590) - e1:SetCost(c92418590.cost) - e1:SetTarget(c92418590.target) - e1:SetOperation(c92418590.operation) - c:RegisterEffect(e1) - --xyz limit - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE) - e2:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL) - e2:SetValue(c92418590.xyzlimit) - c:RegisterEffect(e2) -end -function c92418590.cfilter(c) - return c:IsSetCard(0x83) and c:IsAbleToRemoveAsCost() and c:IsType(TYPE_MONSTER) -end -function c92418590.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c92418590.cfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c92418590.cfilter,tp,LOCATION_GRAVE,0,1,1,e:GetHandler()) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c92418590.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c92418590.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) - end -end -function c92418590.xyzlimit(e,c) - if not c then return false end - return not c:IsSetCard(0x83) -end diff --git a/script/c92450185.lua b/script/c92450185.lua deleted file mode 100644 index e1186784c9..0000000000 --- a/script/c92450185.lua +++ /dev/null @@ -1,27 +0,0 @@ ---リミッター・ブレイク -function c92450185.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(92450185,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetTarget(c92450185.thtg) - e1:SetOperation(c92450185.thop) - c:RegisterEffect(e1) -end -function c92450185.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_HAND+LOCATION_GRAVE) -end -function c92450185.spfilter(c,e,tp) - return c:IsCode(9365703) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsHasEffect(EFFECT_NECRO_VALLEY) -end -function c92450185.thop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c92450185.spfilter,tp,LOCATION_DECK+LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp) - if g:GetCount()~=0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c92510265.lua b/script/c92510265.lua deleted file mode 100644 index 4e02bc041f..0000000000 --- a/script/c92510265.lua +++ /dev/null @@ -1,69 +0,0 @@ ---聖戦士カオス・ソルジャー -function c92510265.initial_effect(c) - --remove - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(92510265,0)) - e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_REMOVE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCountLimit(1,92510265) - e1:SetTarget(c92510265.rmtg) - e1:SetOperation(c92510265.rmop) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e2) - --tohand - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(92510265,1)) - e3:SetCategory(CATEGORY_TOHAND) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_BATTLE_DESTROYING) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetCondition(aux.bdocon) - e3:SetTarget(c92510265.thtg) - e3:SetOperation(c92510265.thop) - c:RegisterEffect(e3) -end -function c92510265.rgfilter(c) - return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_LIGHT+ATTRIBUTE_DARK) -end -function c92510265.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - if chk==0 then return Duel.IsExistingTarget(c92510265.rgfilter,tp,LOCATION_REMOVED,0,1,nil) - and Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(92510265,2)) - local g1=Duel.SelectTarget(tp,c92510265.rgfilter,tp,LOCATION_REMOVED,0,1,1,nil) - e:SetLabelObject(g1:GetFirst()) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g2=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g1,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g2,1,0,0) -end -function c92510265.rmop(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetLabelObject() - local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local lc=tg:GetFirst() - if lc==tc then lc=tg:GetNext() end - if tc:IsRelateToEffect(e) and Duel.SendtoGrave(tc,REASON_EFFECT+REASON_RETURN)~=0 and lc:IsRelateToEffect(e) and lc:IsControler(1-tp) then - Duel.Remove(lc,POS_FACEUP,REASON_EFFECT) - end -end -function c92510265.thfilter(c) - return c:IsLevelBelow(7) and c:IsRace(RACE_WARRIOR) and c:IsAbleToHand() -end -function c92510265.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c92510265.thfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c92510265.thfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c92510265.thfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c92510265.thop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end diff --git a/script/c92512625.lua b/script/c92512625.lua deleted file mode 100644 index d7b9a6112a..0000000000 --- a/script/c92512625.lua +++ /dev/null @@ -1,66 +0,0 @@ ---神の忠告 -function c92512625.initial_effect(c) - --Activate(summon) - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DISABLE_SUMMON+CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_SUMMON) - e1:SetCondition(c92512625.condition1) - e1:SetCost(c92512625.cost) - e1:SetTarget(c92512625.target1) - e1:SetOperation(c92512625.activate1) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_FLIP_SUMMON) - c:RegisterEffect(e2) - local e3=e1:Clone() - e3:SetCode(EVENT_SPSUMMON) - c:RegisterEffect(e3) - --Activate(effect) - local e4=Effect.CreateEffect(c) - e4:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) - e4:SetType(EFFECT_TYPE_ACTIVATE) - e4:SetCode(EVENT_CHAINING) - e4:SetCondition(c92512625.condition2) - e4:SetCost(c92512625.cost) - e4:SetTarget(c92512625.target2) - e4:SetOperation(c92512625.activate2) - c:RegisterEffect(e4) -end -function c92512625.cfilter(c) - return c:IsFacedown() and c:GetSequence()<5 -end -function c92512625.condition1(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentChain()==0 - and not Duel.IsExistingMatchingCard(c92512625.cfilter,tp,LOCATION_SZONE,0,1,e:GetHandler()) -end -function c92512625.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,3000) end - Duel.PayLPCost(tp,3000) -end -function c92512625.target1(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DISABLE_SUMMON,eg,eg:GetCount(),0,0) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,eg:GetCount(),0,0) -end -function c92512625.activate1(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateSummon(eg) - Duel.Destroy(eg,REASON_EFFECT) -end -function c92512625.condition2(e,tp,eg,ep,ev,re,r,rp) - return (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE)) and Duel.IsChainNegatable(ev) - and not Duel.IsExistingMatchingCard(c92512625.cfilter,tp,LOCATION_SZONE,0,1,e:GetHandler()) -end -function c92512625.target2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) - end -end -function c92512625.activate2(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateActivation(ev) - if re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(eg,REASON_EFFECT) - end -end diff --git a/script/c92518817.lua b/script/c92518817.lua deleted file mode 100644 index 6eb5424af1..0000000000 --- a/script/c92518817.lua +++ /dev/null @@ -1,46 +0,0 @@ ---燃え盛るヒータ -function c92518817.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCost(c92518817.spcost) - e1:SetTarget(c92518817.sptg) - e1:SetOperation(c92518817.spop) - c:RegisterEffect(e1) -end -function c92518817.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsAttribute,1,e:GetHandler(),ATTRIBUTE_FIRE) end - local g=Duel.SelectReleaseGroup(tp,Card.IsAttribute,1,1,e:GetHandler(),ATTRIBUTE_FIRE) - Duel.Release(g,REASON_COST) -end -function c92518817.filter(c,e,tp) - return c:IsAttribute(ATTRIBUTE_FIRE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c92518817.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c92518817.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c92518817.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c92518817.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_LEAVE_FIELD) - e1:SetRange(LOCATION_MZONE) - e1:SetOperation(c92518817.desop) - e1:SetReset(RESET_EVENT+0x1fe0000) - g:GetFirst():RegisterEffect(e1) - end -end -function c92518817.desop(e,tp,eg,ep,ev,re,r,rp) - if eg:IsExists(Card.IsCode,1,nil,92518817) then - Duel.Destroy(e:GetHandler(),REASON_EFFECT) - end -end diff --git a/script/c92536468.lua b/script/c92536468.lua deleted file mode 100644 index d8dc92f80a..0000000000 --- a/script/c92536468.lua +++ /dev/null @@ -1,80 +0,0 @@ ---DDD反骨王レオニダス -function c92536468.initial_effect(c) - --pendulum summon - aux.AddPendulumProcedure(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --reverse damage - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetRange(LOCATION_PZONE) - e2:SetCode(EVENT_DAMAGE) - e2:SetCondition(c92536468.effcon) - e2:SetTarget(c92536468.revtg) - e2:SetOperation(c92536468.revop) - c:RegisterEffect(e2) - --special summon - local e3=Effect.CreateEffect(c) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_RECOVER) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetRange(LOCATION_HAND) - e3:SetCode(EVENT_DAMAGE) - e3:SetCondition(c92536468.effcon) - e3:SetTarget(c92536468.sptg) - e3:SetOperation(c92536468.spop) - c:RegisterEffect(e3) - --avoid damage - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_FIELD) - e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e4:SetCode(EFFECT_CHANGE_DAMAGE) - e4:SetRange(LOCATION_MZONE) - e4:SetTargetRange(1,0) - e4:SetValue(c92536468.damval) - c:RegisterEffect(e4) - local e5=e4:Clone() - e5:SetCode(EFFECT_NO_EFFECT_DAMAGE) - c:RegisterEffect(e5) -end -function c92536468.effcon(e,tp,eg,ep,ev,re,r,rp) - return ep==tp and bit.band(r,REASON_EFFECT)~=0 -end -function c92536468.revtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsDestructable(e) end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0) -end -function c92536468.revop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.Destroy(c,REASON_EFFECT)~=0 then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_REVERSE_DAMAGE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetTargetRange(1,1) - e1:SetValue(c92536468.revval) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) - end -end -function c92536468.revval(e,re,r,rp,rc) - return bit.band(r,REASON_EFFECT)~=0 -end -function c92536468.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) - Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,ev) -end -function c92536468.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then - Duel.Recover(tp,ev,REASON_EFFECT) - end -end -function c92536468.damval(e,re,val,r,rp,rc) - if bit.band(r,REASON_EFFECT)~=0 then return 0 end - return val -end diff --git a/script/c92572371.lua b/script/c92572371.lua deleted file mode 100644 index 84404819f5..0000000000 --- a/script/c92572371.lua +++ /dev/null @@ -1,33 +0,0 @@ ---殺炎星-ブルキ -function c92572371.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(92572371,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_GRAVE) - e1:SetCountLimit(1,92572371) - e1:SetCost(c92572371.spcost) - e1:SetTarget(c92572371.sptg) - e1:SetOperation(c92572371.spop) - c:RegisterEffect(e1) -end -function c92572371.cfilter(c) - return (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) and (c:IsSetCard(0x79) or c:IsSetCard(0x7c)) and c:IsAbleToGraveAsCost() -end -function c92572371.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c92572371.cfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,2,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c92572371.cfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,2,2,nil) - Duel.SendtoGrave(g,REASON_COST) -end -function c92572371.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c92572371.spop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c92595545.lua b/script/c92595545.lua deleted file mode 100644 index b0a2a7c96f..0000000000 --- a/script/c92595545.lua +++ /dev/null @@ -1,30 +0,0 @@ ---プラズマ・ボール -function c92595545.initial_effect(c) - --direct attack - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DIRECT_ATTACK) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(92595545,0)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_BATTLE_DAMAGE) - e2:SetCondition(c92595545.condition) - e2:SetTarget(c92595545.target) - e2:SetOperation(c92595545.operation) - c:RegisterEffect(e2) -end -function c92595545.condition(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp and Duel.GetAttackTarget()==nil -end -function c92595545.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0) -end -function c92595545.operation(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - Duel.Destroy(e:GetHandler(),REASON_EFFECT) - end -end diff --git a/script/c92595643.lua b/script/c92595643.lua deleted file mode 100644 index 8bb992fa33..0000000000 --- a/script/c92595643.lua +++ /dev/null @@ -1,21 +0,0 @@ ---罰則金 -function c92595643.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_HANDES) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c92595643.target) - e1:SetOperation(c92595643.activate) - c:RegisterEffect(e1) -end -function c92595643.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(nil,tp,LOCATION_HAND,0,2,e:GetHandler()) end - Duel.SetTargetPlayer(tp) - Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,2) -end -function c92595643.activate(e,tp,eg,ep,ev,re,r,rp) - local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) - Duel.DiscardHand(p,nil,2,2,REASON_EFFECT+REASON_DISCARD) -end diff --git a/script/c9260791.lua b/script/c9260791.lua deleted file mode 100644 index 9e822b5806..0000000000 --- a/script/c9260791.lua +++ /dev/null @@ -1,61 +0,0 @@ ---銀河眼の雲篭 -function c9260791.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(9260791,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1,9260791) - e1:SetCost(c9260791.spcost) - e1:SetTarget(c9260791.sptg) - e1:SetOperation(c9260791.spop) - c:RegisterEffect(e1) - --material - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(9260791,1)) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetRange(LOCATION_GRAVE) - e2:SetCountLimit(1,9260791+EFFECT_COUNT_CODE_DUEL) - e2:SetTarget(c9260791.target) - e2:SetOperation(c9260791.operation) - c:RegisterEffect(e2) -end -function c9260791.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end -function c9260791.spfilter(c,e,tp) - return c:IsSetCard(0x107b) and not c:IsCode(9260791) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) - and not c:IsHasEffect(EFFECT_NECRO_VALLEY) -end -function c9260791.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsExistingMatchingCard(c9260791.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE) -end -function c9260791.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c9260791.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end -function c9260791.filter(c) - return c:IsFaceup() and c:IsSetCard(0x107b) and c:IsType(TYPE_XYZ) -end -function c9260791.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c9260791.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c9260791.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - Duel.SelectTarget(tp,c9260791.filter,tp,LOCATION_MZONE,0,1,1,nil) -end -function c9260791.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then - Duel.Overlay(tc,Group.FromCards(c)) - end -end diff --git a/script/c92609670.lua b/script/c92609670.lua deleted file mode 100644 index ac7fef48e5..0000000000 --- a/script/c92609670.lua +++ /dev/null @@ -1,74 +0,0 @@ ---H・C アンブッシュ・ソルジャー -function c92609670.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(92609670,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1,92609670) - e1:SetCondition(c92609670.spcon) - e1:SetCost(c92609670.spcost) - e1:SetTarget(c92609670.sptg) - e1:SetOperation(c92609670.spop) - c:RegisterEffect(e1) - --lvchange - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(92609670,1)) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(92609670) - e2:SetCost(c92609670.lvcost) - e2:SetTarget(c92609670.lvtg) - e2:SetOperation(c92609670.lvop) - c:RegisterEffect(e2) -end -function c92609670.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c92609670.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end -function c92609670.filter(c,e,tp) - return c:GetCode()~=92609670 and c:IsSetCard(0x106f) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsHasEffect(EFFECT_NECRO_VALLEY) -end -function c92609670.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsExistingMatchingCard(c92609670.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE) -end -function c92609670.spop(e,tp,eg,ep,ev,re,r,rp) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ft<1 then return end - if ft>2 then ft=2 end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c92609670.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,ft,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - Duel.RaiseSingleEvent(e:GetHandler(),92609670,e,0,tp,tp,0) - end -end -function c92609670.lvcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsAbleToRemove() end - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) -end -function c92609670.lvfilter(c) - return c:IsFaceup() and c:IsSetCard(0x106f) and c:GetLevel()>1 -end -function c92609670.lvtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c92609670.lvfilter,tp,LOCATION_MZONE,0,1,nil) end -end -function c92609670.lvop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c92609670.lvfilter,tp,LOCATION_MZONE,0,nil) - local tc=g:GetFirst() - while tc do - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CHANGE_LEVEL) - e1:SetValue(1) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - tc=g:GetNext() - end -end diff --git a/script/c9264485.lua b/script/c9264485.lua deleted file mode 100644 index 225dce7c64..0000000000 --- a/script/c9264485.lua +++ /dev/null @@ -1,16 +0,0 @@ ---ホルスのしもべ -function c9264485.initial_effect(c) - --cannot be target - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_SELECT_EFFECT_TARGET) - e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(0,0xff) - e1:SetValue(c9264485.etarget) - c:RegisterEffect(e1) -end -function c9264485.etarget(e,re,c) - local code=c:GetCode() - return c:IsLocation(LOCATION_MZONE) and c:IsFaceup() and (code==75830094 or code==11224103 or code==48229808) -end diff --git a/script/c92661479.lua b/script/c92661479.lua deleted file mode 100644 index f690bbf68d..0000000000 --- a/script/c92661479.lua +++ /dev/null @@ -1,38 +0,0 @@ ---フォトン・ストリーク・バウンサー -function c92661479.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,6,2) - c:EnableReviveLimit() - --negate activate - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(92661479,0)) - e1:SetCategory(CATEGORY_DISABLE+CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCode(EVENT_CHAINING) - e1:SetCondition(c92661479.condition) - e1:SetCost(c92661479.cost) - e1:SetTarget(c92661479.target) - e1:SetOperation(c92661479.operation) - c:RegisterEffect(e1) -end -function c92661479.condition(e,tp,eg,ep,ev,re,r,rp,chk) - local loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION) - return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and ep~=tp - and loc==LOCATION_MZONE and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainDisablable(ev) -end -function c92661479.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c92661479.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,1000) -end -function c92661479.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.NegateEffect(ev) then - Duel.Damage(1-tp,1000,REASON_EFFECT) - end -end diff --git a/script/c92676637.lua b/script/c92676637.lua deleted file mode 100644 index 8210929736..0000000000 --- a/script/c92676637.lua +++ /dev/null @@ -1,37 +0,0 @@ ---チューニング・サポーター -function c92676637.initial_effect(c) - --draw - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(92676637,0)) - e1:SetCategory(CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_BE_MATERIAL) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCondition(c92676637.drcon) - e1:SetTarget(c92676637.drtg) - e1:SetOperation(c92676637.drop) - c:RegisterEffect(e1) - --synchro level - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_SYNCHRO_LEVEL) - e2:SetValue(c92676637.slevel) - c:RegisterEffect(e2) -end -function c92676637.slevel(e,c) - local lv=e:GetHandler():GetLevel() - return 2*65536+lv -end -function c92676637.drcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsLocation(LOCATION_GRAVE) and r==REASON_SYNCHRO -end -function c92676637.drtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(1) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c92676637.drop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end diff --git a/script/c9267769.lua b/script/c9267769.lua deleted file mode 100644 index b980d4c61b..0000000000 --- a/script/c9267769.lua +++ /dev/null @@ -1,17 +0,0 @@ ---閃光弾 -function c9267769.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_BATTLE_DAMAGE) - e1:SetCondition(c9267769.condition) - e1:SetOperation(c9267769.activate) - c:RegisterEffect(e1) -end -function c9267769.condition(e,tp,eg,ep,ev,re,r,rp) - return eg:GetFirst():IsControler(1-tp) and Duel.GetAttackTarget()==nil -end -function c9267769.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.SkipPhase(1-tp,PHASE_BATTLE,RESET_PHASE+PHASE_END,1,1) - Duel.SkipPhase(1-tp,PHASE_MAIN2,RESET_PHASE+PHASE_END,1) -end diff --git a/script/c92693205.lua b/script/c92693205.lua deleted file mode 100644 index 1fa4601a59..0000000000 --- a/script/c92693205.lua +++ /dev/null @@ -1,52 +0,0 @@ ---ギアギアンカー -function c92693205.initial_effect(c) - --turn set - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_POSITION) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetTarget(c92693205.postg) - e1:SetOperation(c92693205.posop) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY) - e2:SetCondition(c92693205.descon) - e2:SetTarget(c92693205.destg) - e2:SetOperation(c92693205.desop) - c:RegisterEffect(e2) -end -function c92693205.postg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsCanTurnSet() and c:GetFlagEffect(92693205)==0 end - c:RegisterFlagEffect(92693205,RESET_EVENT+0x1fc0000+RESET_PHASE+PHASE_END,0,1) - Duel.SetOperationInfo(0,CATEGORY_POSITION,c,1,0,0) -end -function c92693205.posop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - Duel.ChangePosition(c,POS_FACEDOWN_DEFENCE) - end -end -function c92693205.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x72) -end -function c92693205.descon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c92693205.cfilter,tp,LOCATION_MZONE,0,1,e:GetHandler()) -end -function c92693205.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDestructable,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c92693205.desop(e,tp,eg,ep,ev,re,r,rp) - local ct=Duel.GetMatchingGroupCount(c92693205.cfilter,tp,LOCATION_MZONE,0,e:GetHandler()) - if ct==0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectMatchingCard(tp,Card.IsDestructable,tp,LOCATION_MZONE,LOCATION_MZONE,1,ct,nil) - if g:GetCount()>0 then - Duel.Destroy(g,REASON_EFFECT) - end -end diff --git a/script/c92719314.lua b/script/c92719314.lua deleted file mode 100644 index 0e6580a3fd..0000000000 --- a/script/c92719314.lua +++ /dev/null @@ -1,69 +0,0 @@ ---ダーク・クリエイター -function c92719314.initial_effect(c) - c:EnableReviveLimit() - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c92719314.spcon) - c:RegisterEffect(e1) - --SpecialSummon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(92719314,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetCountLimit(1) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetRange(LOCATION_MZONE) - e2:SetCost(c92719314.cost) - e2:SetTarget(c92719314.target) - e2:SetOperation(c92719314.operation) - c:RegisterEffect(e2) -end -function c92719314.spcon(e,c) - if c==nil then return true end - return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 - and Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0)==0 - and Duel.IsExistingMatchingCard(Card.IsAttribute,c:GetControler(),LOCATION_GRAVE,0,5,nil,ATTRIBUTE_DARK) -end -function c92719314.costfilter(c,e,tp) - return c:IsAttribute(ATTRIBUTE_DARK) and c:IsAbleToRemoveAsCost() - and Duel.IsExistingTarget(c92719314.tgfilter,tp,LOCATION_GRAVE,0,1,c,e,tp) -end -function c92719314.tgfilter(c,e,tp) - return c:IsAttribute(ATTRIBUTE_DARK) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c92719314.cost(e,tp,eg,ep,ev,re,r,rp,chk) - e:SetLabel(1) - return true -end -function c92719314.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c92719314.tgfilter(chkc,e,tp) end - if chk==0 then - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return false end - if e:GetLabel()==1 then - e:SetLabel(0) - return Duel.IsExistingMatchingCard(c92719314.costfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) - else - return Duel.IsExistingTarget(c92719314.tgfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) - end - end - if e:GetLabel()==1 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local cg=Duel.SelectMatchingCard(tp,c92719314.costfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.Remove(cg,POS_FACEUP,REASON_COST) - e:SetLabel(0) - end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c92719314.tgfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c92719314.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c92720564.lua b/script/c92720564.lua deleted file mode 100644 index 0abfc78ba7..0000000000 --- a/script/c92720564.lua +++ /dev/null @@ -1,31 +0,0 @@ ---D・ラジカッセン -function c92720564.initial_effect(c) - --atk - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_EXTRA_ATTACK) - e1:SetCondition(c92720564.cona) - e1:SetValue(1) - c:RegisterEffect(e1) - --def - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(92720564,0)) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_BE_BATTLE_TARGET) - e2:SetCountLimit(1) - e2:SetRange(LOCATION_MZONE) - e2:SetCondition(c92720564.cond) - e2:SetOperation(c92720564.opd) - c:RegisterEffect(e2) -end -function c92720564.cona(e) - return e:GetHandler():IsAttackPos() -end -function c92720564.cond(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local d=Duel.GetAttackTarget() - return not c:IsDisabled() and c:IsDefencePos() and d:IsFaceup() and d:IsSetCard(0x26) -end -function c92720564.opd(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateAttack() -end diff --git a/script/c92723496.lua b/script/c92723496.lua deleted file mode 100644 index 0896f83d26..0000000000 --- a/script/c92723496.lua +++ /dev/null @@ -1,36 +0,0 @@ ---竜宮のツガイ -function c92723496.initial_effect(c) - --spsummon - local e3=Effect.CreateEffect(c) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1,92723496) - e3:SetCost(c92723496.spcost) - e3:SetTarget(c92723496.sptg) - e3:SetOperation(c92723496.spop) - c:RegisterEffect(e3) -end -function c92723496.costfilter(c) - return c:IsType(TYPE_MONSTER) and c:IsDiscardable() -end -function c92723496.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c92723496.costfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,c92723496.costfilter,1,1,REASON_COST+REASON_DISCARD) -end -function c92723496.filter(c,e,tp) - return c:IsLevelBelow(4) and c:IsRace(RACE_WYRM) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c92723496.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c92723496.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c92723496.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c92723496.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c9272381.lua b/script/c9272381.lua deleted file mode 100644 index 61649f2ebc..0000000000 --- a/script/c9272381.lua +++ /dev/null @@ -1,71 +0,0 @@ ---星輝士 セイクリッド・ダイヤ -function c9272381.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_LIGHT),5,3,c9272381.ovfilter,aux.Stringid(9272381,0),5) - c:EnableReviveLimit() - -- - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_TO_GRAVE) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(LOCATION_DECK,LOCATION_DECK) - e1:SetCondition(c9272381.effcon) - c:RegisterEffect(e1) - -- - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_CANNOT_DISCARD_DECK) - e2:SetRange(LOCATION_MZONE) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetTargetRange(1,1) - e2:SetCondition(c9272381.effcon) - c:RegisterEffect(e2) - -- - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetCode(EFFECT_TO_HAND_REDIRECT) - e3:SetRange(LOCATION_MZONE) - e3:SetTargetRange(LOCATION_GRAVE,LOCATION_GRAVE) - e3:SetValue(LOCATION_REMOVED) - e3:SetCondition(c9272381.effcon) - c:RegisterEffect(e3) - --Negate - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(9272381,1)) - e4:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) - e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_QUICK_O) - e4:SetCode(EVENT_CHAINING) - e4:SetRange(LOCATION_MZONE) - e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) - e4:SetCondition(c9272381.condition) - e4:SetCost(c9272381.cost) - e4:SetTarget(c9272381.target) - e4:SetOperation(c9272381.operation) - c:RegisterEffect(e4) -end -function c9272381.ovfilter(c) - return c:IsFaceup() and c:IsSetCard(0x9c) and c:IsType(TYPE_XYZ) and not c:IsCode(9272381) and Duel.GetCurrentPhase()==PHASE_MAIN2 -end -function c9272381.effcon(e) - return e:GetHandler():GetOverlayCount()>0 -end -function c9272381.condition(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp and re:IsActiveType(TYPE_MONSTER) and re:GetHandler():IsAttribute(ATTRIBUTE_DARK) and Duel.IsChainNegatable(ev) -end -function c9272381.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c9272381.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) - end -end -function c9272381.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateActivation(ev) - if re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(eg,REASON_EFFECT) - end -end diff --git a/script/c92729410.lua b/script/c92729410.lua deleted file mode 100644 index 3143d21bf5..0000000000 --- a/script/c92729410.lua +++ /dev/null @@ -1,49 +0,0 @@ ---子狸ぽんぽこ -function c92729410.initial_effect(c) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(92729410,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_SUMMON_SUCCESS) - e2:SetCost(c92729410.spcost) - e2:SetTarget(c92729410.sptg) - e2:SetOperation(c92729410.spop) - c:RegisterEffect(e2) - Duel.AddCustomActivityCounter(92729410,ACTIVITY_SPSUMMON,c92729410.counterfilter) -end -function c92729410.counterfilter(c) - return c:IsRace(RACE_BEAST) -end -function c92729410.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetCustomActivityCount(92729410,tp,ACTIVITY_SPSUMMON)==0 end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) - e1:SetTargetRange(1,0) - e1:SetTarget(c92729410.splimit) - Duel.RegisterEffect(e1,tp) -end -function c92729410.splimit(e,c) - return c:GetRace()~=RACE_BEAST -end -function c92729410.filter(c,e,tp) - return c:GetCode()~=92729410 and c:GetLevel()==2 and c:IsRace(RACE_BEAST) - and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN) -end -function c92729410.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c92729410.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c92729410.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c92729410.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEDOWN_DEFENCE) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c92736188.lua b/script/c92736188.lua deleted file mode 100644 index 859d8f3ef4..0000000000 --- a/script/c92736188.lua +++ /dev/null @@ -1,63 +0,0 @@ ---グレート・スピリット -function c92736188.initial_effect(c) - --turn set - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(92736188,0)) - e1:SetCategory(CATEGORY_POSITION) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetTarget(c92736188.target) - e1:SetOperation(c92736188.operation) - c:RegisterEffect(e1) - --to hand - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(92736188,1)) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - e2:SetTarget(c92736188.adtg) - e2:SetOperation(c92736188.adop) - c:RegisterEffect(e2) -end -function c92736188.target(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsCanTurnSet() and c:GetFlagEffect(92736188)==0 end - c:RegisterFlagEffect(92736188,RESET_EVENT+0x1fc0000+RESET_PHASE+PHASE_END,0,1) - Duel.SetOperationInfo(0,CATEGORY_POSITION,c,1,0,0) -end -function c92736188.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - Duel.ChangePosition(c,POS_FACEDOWN_DEFENCE) - end -end -function c92736188.filter(c) - return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_EARTH) -end -function c92736188.adtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c92736188.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c92736188.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c92736188.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) -end -function c92736188.adop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) and tc:IsFaceup() then - local atk=tc:GetBaseAttack() - local def=tc:GetBaseDefence() - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_BASE_ATTACK) - e1:SetValue(def) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_SET_BASE_DEFENCE) - e2:SetValue(atk) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e2) - end -end diff --git a/script/c92746535.lua b/script/c92746535.lua deleted file mode 100644 index 813feb9cc9..0000000000 --- a/script/c92746535.lua +++ /dev/null @@ -1,65 +0,0 @@ ---竜剣士ラスターP -function c92746535.initial_effect(c) - --pendulum summon - aux.AddPendulumProcedure(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --to hand - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_PZONE) - e2:SetCountLimit(1) - e2:SetCondition(c92746535.thcon) - e2:SetTarget(c92746535.thtg) - e2:SetOperation(c92746535.thop) - c:RegisterEffect(e2) - --cannot be material - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e3:SetCode(EFFECT_CANNOT_BE_FUSION_MATERIAL) - e3:SetValue(c92746535.splimit) - c:RegisterEffect(e3) - local e4=e3:Clone() - e4:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL) - c:RegisterEffect(e4) - local e5=e3:Clone() - e5:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL) - c:RegisterEffect(e5) -end -function c92746535.thcon(e,tp,eg,ep,ev,re,r,rp) - local seq=e:GetHandler():GetSequence() - return Duel.GetFieldCard(tp,LOCATION_SZONE,13-seq) -end -function c92746535.thfilter(c,code) - return c:IsCode(code) and c:IsAbleToHand() -end -function c92746535.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - local seq=e:GetHandler():GetSequence() - local sc=Duel.GetFieldCard(tp,LOCATION_SZONE,13-seq) - if chk==0 then return sc:IsDestructable() - and Duel.IsExistingMatchingCard(c92746535.thfilter,tp,LOCATION_DECK,0,1,nil,sc:GetOriginalCode()) end - Duel.SetTargetCard(sc) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,sc,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c92746535.thop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)~=0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c92746535.thfilter,tp,LOCATION_DECK,0,1,1,nil,tc:GetOriginalCode()) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end - end -end -function c92746535.splimit(e,c) - if not c then return false end - return not c:IsSetCard(0xc7) -end diff --git a/script/c92755808.lua b/script/c92755808.lua deleted file mode 100644 index b4055a075b..0000000000 --- a/script/c92755808.lua +++ /dev/null @@ -1,45 +0,0 @@ ---エレメント・ザウルス -function c92755808.initial_effect(c) - --atk - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(500) - e1:SetCondition(c92755808.atkcon) - c:RegisterEffect(e1) - --disable - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_BATTLED) - e2:SetCondition(c92755808.discon) - e2:SetOperation(c92755808.disop) - c:RegisterEffect(e2) -end -function c92755808.filter(c,att) - return c:IsFaceup() and c:IsAttribute(att) -end -function c92755808.atkcon(e) - return Duel.IsExistingMatchingCard(c92755808.filter,0,LOCATION_MZONE,LOCATION_MZONE,1,nil,ATTRIBUTE_FIRE) -end -function c92755808.discon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local bc=c:GetBattleTarget() - return bc and bc:IsStatus(STATUS_BATTLE_DESTROYED) and not c:IsStatus(STATUS_BATTLE_DESTROYED) - and Duel.IsExistingMatchingCard(c92755808.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,ATTRIBUTE_EARTH) -end -function c92755808.disop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local bc=c:GetBattleTarget() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0x17a0000) - bc:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+0x17a0000) - bc:RegisterEffect(e2) -end \ No newline at end of file diff --git a/script/c92773018.lua b/script/c92773018.lua deleted file mode 100644 index c0f23b40eb..0000000000 --- a/script/c92773018.lua +++ /dev/null @@ -1,70 +0,0 @@ ---サイバネティック・ヒドゥン・テクノロジー -function c92773018.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c92773018.target1) - e1:SetOperation(c92773018.activate) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(92773018,0)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetRange(LOCATION_SZONE) - e2:SetCode(EVENT_ATTACK_ANNOUNCE) - e2:SetCondition(c92773018.condition) - e2:SetCost(c92773018.cost) - e2:SetTarget(c92773018.target2) - e2:SetOperation(c92773018.activate) - c:RegisterEffect(e2) -end -function c92773018.condition(e,tp,eg,ep,ev,re,r,rp) - return tp~=Duel.GetTurnPlayer() -end -function c92773018.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x103) and c:IsAbleToGraveAsCost() -end -function c92773018.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c92773018.cfilter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c92773018.cfilter,tp,LOCATION_MZONE,0,1,1,nil) - Duel.SendtoGrave(g,REASON_COST) -end -function c92773018.target1(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc==Duel.GetAttacker() end - if chk==0 then return true end - local tg=Duel.GetAttacker() - if Duel.CheckEvent(EVENT_ATTACK_ANNOUNCE) and tp~=Duel.GetTurnPlayer() - and Duel.IsExistingMatchingCard(c92773018.cfilter,tp,LOCATION_MZONE,0,1,nil) - and tg:IsOnField() and tg:IsDestructable() and tg:IsCanBeEffectTarget(e) - and Duel.SelectYesNo(tp,aux.Stringid(92773018,1)) then - e:SetCategory(CATEGORY_DESTROY) - e:SetProperty(EFFECT_FLAG_CARD_TARGET) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c92773018.cfilter,tp,LOCATION_MZONE,0,1,1,nil) - Duel.SendtoGrave(g,REASON_COST) - Duel.SetTargetCard(tg) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,tg,1,0,0) - else - e:SetCategory(0) - e:SetProperty(0) - end -end -function c92773018.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local tg=Duel.GetAttacker() - if chkc then return chkc==tg end - if chk==0 then return not e:GetHandler():IsStatus(STATUS_CHAINING) - and tg:IsOnField() and tg:IsDestructable() and tg:IsCanBeEffectTarget(e) end - Duel.SetTargetCard(tg) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,tg,1,0,0) -end -function c92773018.activate(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) and tc:IsAttackable() and not tc:IsStatus(STATUS_ATTACK_CANCELED) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c92784374.lua b/script/c92784374.lua deleted file mode 100644 index da00d0cf0c..0000000000 --- a/script/c92784374.lua +++ /dev/null @@ -1,28 +0,0 @@ ---リチュア・エリアル -function c92784374.initial_effect(c) - --search - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(92784374,0)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DELAY) - e1:SetTarget(c92784374.tg) - e1:SetOperation(c92784374.op) - c:RegisterEffect(e1) -end -function c92784374.filter(c) - return c:IsSetCard(0x3a) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() -end -function c92784374.tg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c92784374.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c92784374.op(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c92784374.filter,tp,LOCATION_DECK,0,nil) - if g:GetCount()>0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local sg=g:Select(tp,1,1,nil) - Duel.SendtoHand(sg,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,sg) - end -end diff --git a/script/c92821268.lua b/script/c92821268.lua deleted file mode 100644 index 2bdd323457..0000000000 --- a/script/c92821268.lua +++ /dev/null @@ -1,35 +0,0 @@ ---ギミック・パペット-ナイト・ジョーカー -function c92821268.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(92821268,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetRange(LOCATION_HAND) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetCountLimit(1,92821268) - e1:SetCost(c92821268.cost) - e1:SetTarget(c92821268.target) - e1:SetOperation(c92821268.operation) - c:RegisterEffect(e1) -end -function c92821268.cfilter(c,tp) - return c:IsControler(tp) and c:IsLocation(LOCATION_GRAVE) and c:IsSetCard(0x83) - and c:GetPreviousControler()==tp and c:IsAbleToRemoveAsCost() -end -function c92821268.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return eg:IsExists(c92821268.cfilter,1,nil,tp) end - local g=eg:Filter(c92821268.cfilter,nil,tp) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c92821268.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c92821268.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c92826944.lua b/script/c92826944.lua deleted file mode 100644 index b8ad9e3eda..0000000000 --- a/script/c92826944.lua +++ /dev/null @@ -1,36 +0,0 @@ ---馬頭鬼 -function c92826944.initial_effect(c) - --revive - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(92826944,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_GRAVE) - e1:SetCost(c92826944.cost) - e1:SetTarget(c92826944.target) - e1:SetOperation(c92826944.operation) - c:RegisterEffect(e1) -end -function c92826944.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) -end -function c92826944.filter(c,e,tp) - return c:IsRace(RACE_ZOMBIE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c92826944.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c92826944.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c92826944.filter,tp,LOCATION_GRAVE,0,1,e:GetHandler(),e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c92826944.filter,tp,LOCATION_GRAVE,0,1,1,e:GetHandler(),e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c92826944.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local tc=Duel.GetFirstTarget() - if tc:IsRace(RACE_ZOMBIE) and tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c92841002.lua b/script/c92841002.lua deleted file mode 100644 index d47cb9cba3..0000000000 --- a/script/c92841002.lua +++ /dev/null @@ -1,21 +0,0 @@ ---幻水龍 -function c92841002.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(1,92841002) - e1:SetCondition(c92841002.spcon) - c:RegisterEffect(e1) -end -function c92841002.spfilter(c) - return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_EARTH) -end -function c92841002.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c92841002.spfilter,tp,LOCATION_MZONE,0,1,nil) -end diff --git a/script/c9284723.lua b/script/c9284723.lua deleted file mode 100644 index bcf5559a11..0000000000 --- a/script/c9284723.lua +++ /dev/null @@ -1,37 +0,0 @@ ---ヴェノム・ボア -function c9284723.initial_effect(c) - --add counter - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(9284723,0)) - e1:SetCategory(CATEGORY_COUNTER) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c9284723.cost) - e1:SetTarget(c9284723.target) - e1:SetOperation(c9284723.operation) - c:RegisterEffect(e1) -end -function c9284723.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():GetAttackAnnouncedCount()==0 end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_OATH) - e1:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - e:GetHandler():RegisterEffect(e1) -end -function c9284723.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsCanAddCounter(0x9,2) end - if chk==0 then return Duel.IsExistingTarget(Card.IsCanAddCounter,tp,0,LOCATION_MZONE,1,nil,0x9,2) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - local g=Duel.SelectTarget(tp,Card.IsCanAddCounter,tp,0,LOCATION_MZONE,1,1,nil,0x9,2) - Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,2,0,0) -end -function c9284723.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsCanAddCounter(0x9,2) then - tc:AddCounter(0x9,2) - end -end diff --git a/script/c92854392.lua b/script/c92854392.lua deleted file mode 100644 index f7c60fc764..0000000000 --- a/script/c92854392.lua +++ /dev/null @@ -1,50 +0,0 @@ ---立ちはだかる強敵 -function c92854392.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetCondition(c92854392.condition) - e1:SetTarget(c92854392.target) - e1:SetOperation(c92854392.activate) - c:RegisterEffect(e1) -end -function c92854392.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp -end -function c92854392.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local at=Duel.GetAttackTarget() - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:IsFaceup() and chkc~=at end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,at) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,at) -end -function c92854392.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.ChangeAttackTarget(tc) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_DIRECT_ATTACK) - e1:SetTargetRange(0,LOCATION_MZONE) - e1:SetReset(RESET_PHASE+PHASE_BATTLE) - Duel.RegisterEffect(e1,tp) - local e2=e1:Clone() - e2:SetCode(EFFECT_MUST_ATTACK) - Duel.RegisterEffect(e2,tp) - local e3=Effect.CreateEffect(e:GetHandler()) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetCode(EFFECT_CANNOT_BE_BATTLE_TARGET) - e3:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_IMMUNE) - e3:SetTargetRange(LOCATION_MZONE,0) - e3:SetTarget(c92854392.attg) - e3:SetValue(1) - e3:SetLabel(tc:GetRealFieldID()) - e3:SetReset(RESET_PHASE+PHASE_BATTLE) - Duel.RegisterEffect(e3,tp) - end -end -function c92854392.attg(e,c) - return c:GetRealFieldID()~=e:GetLabel() -end diff --git a/script/c92870717.lua b/script/c92870717.lua deleted file mode 100644 index 711e5662fa..0000000000 --- a/script/c92870717.lua +++ /dev/null @@ -1,67 +0,0 @@ ---魔装戦士 ドラゴノックス -function c92870717.initial_effect(c) - --pendulum summon - aux.AddPendulumProcedure(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - -- - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_ATTACK_ANNOUNCE) - e2:SetRange(LOCATION_PZONE) - e2:SetCondition(c92870717.descon) - e2:SetTarget(c92870717.destg) - e2:SetOperation(c92870717.desop) - c:RegisterEffect(e2) - --spsummon - local e3=Effect.CreateEffect(c) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_MZONE) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetCountLimit(1) - e3:SetCost(c92870717.spcost) - e3:SetTarget(c92870717.sptg) - e3:SetOperation(c92870717.spop) - c:RegisterEffect(e3) -end -function c92870717.descon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp -end -function c92870717.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsDestructable() end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0) -end -function c92870717.desop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - if Duel.Destroy(e:GetHandler(),REASON_EFFECT)~=0 then - Duel.SkipPhase(1-tp,PHASE_BATTLE,RESET_PHASE+PHASE_BATTLE,1) - end -end -function c92870717.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_DISCARD+REASON_COST,nil) -end -function c92870717.spfilter(c,e,tp) - return c:IsAttackBelow(2000) and c:IsRace(RACE_WARRIOR+RACE_SPELLCASTER) - and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENCE) -end -function c92870717.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c92870717.spfilter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c92870717.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c92870717.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c92870717.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEDOWN_DEFENCE) - Duel.ConfirmCards(1-tp,tc) - end -end diff --git a/script/c9287078.lua b/script/c9287078.lua deleted file mode 100644 index b6488f992e..0000000000 --- a/script/c9287078.lua +++ /dev/null @@ -1,50 +0,0 @@ ---黒魔族復活の棺 -function c9287078.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c9287078.target) - e1:SetOperation(c9287078.activate) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e2) -end -function c9287078.filter1(c,e,tp) - return c:GetSummonPlayer()==1-tp and c:IsLocation(LOCATION_MZONE) and c:IsCanBeEffectTarget(e) - and Duel.IsExistingTarget(c9287078.filter2,tp,LOCATION_MZONE,0,1,c) -end -function c9287078.filter2(c) - return c:IsFaceup() and c:IsRace(RACE_SPELLCASTER) -end -function c9287078.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - if chk==0 then return eg:IsExists(c9287078.filter1,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g1=eg:FilterSelect(tp,c9287078.filter1,1,1,nil,e,tp) - Duel.SetTargetCard(g1) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g2=Duel.SelectTarget(tp,c9287078.filter2,tp,LOCATION_MZONE,0,1,1,g1:GetFirst()) - g1:Merge(g2) - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g1,2,0,0) -end -function c9287078.spfilter(c,e,tp) - return c:IsRace(RACE_SPELLCASTER) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) - and not c:IsHasEffect(EFFECT_NECRO_VALLEY) -end -function c9287078.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) - if g:GetCount()==2 and Duel.SendtoGrave(g,REASON_EFFECT)==2 and g:IsExists(Card.IsLocation,2,nil,LOCATION_GRAVE) then - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local sg=Duel.GetMatchingGroup(c9287078.spfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,nil,e,tp) - if sg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(9287078,0)) then - Duel.BreakEffect() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local tg=sg:Select(tp,1,1,nil) - Duel.SpecialSummon(tg,0,tp,tp,false,false,POS_FACEUP) - end - end -end diff --git a/script/c92887027.lua b/script/c92887027.lua deleted file mode 100644 index 2928f3ddcc..0000000000 --- a/script/c92887027.lua +++ /dev/null @@ -1,40 +0,0 @@ ---ながれ者傭兵部隊 -function c92887027.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(92887027,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_BATTLE_DESTROYING) - e1:SetCondition(c92887027.condition) - e1:SetCost(c92887027.cost) - e1:SetTarget(c92887027.target) - e1:SetOperation(c92887027.operation) - c:RegisterEffect(e1) -end -function c92887027.condition(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local bc=c:GetBattleTarget() - return bc:IsLocation(LOCATION_GRAVE) and bc:IsReason(REASON_BATTLE) and c:IsRelateToBattle() -end -function c92887027.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end -function c92887027.filter(c) - return c:IsPosition(POS_FACEDOWN_DEFENCE) and c:IsDestructable() -end -function c92887027.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c92887027.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c92887027.filter,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c92887027.filter,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c92887027.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsPosition(POS_FACEDOWN_DEFENCE) and tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c92890308.lua b/script/c92890308.lua deleted file mode 100644 index 99cbb2114a..0000000000 --- a/script/c92890308.lua +++ /dev/null @@ -1,34 +0,0 @@ ---ディフォーム -function c92890308.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_POSITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_BE_BATTLE_TARGET) - e1:SetCondition(c92890308.condition) - e1:SetTarget(c92890308.target) - e1:SetOperation(c92890308.activate) - c:RegisterEffect(e1) -end -function c92890308.condition(e,tp,eg,ep,ev,re,r,rp) - local d=Duel.GetAttackTarget() - return d:IsControler(tp) and d:IsFaceup() and d:IsSetCard(0x26) -end -function c92890308.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local ta=Duel.GetAttacker() - local td=Duel.GetAttackTarget() - if chkc then return chkc==ta end - if chk==0 then return ta:IsOnField() and ta:IsCanBeEffectTarget(e) - and td:IsOnField() and td:IsCanBeEffectTarget(e) end - local g=Group.FromCards(ta,td) - Duel.SetTargetCard(g) - Duel.SetOperationInfo(0,CATEGORY_POSITION,td,1,0,0) -end -function c92890308.activate(e,tp,eg,ep,ev,re,r,rp) - local ta=Duel.GetAttacker() - local td=Duel.GetAttackTarget() - if ta:IsRelateToEffect(e) and Duel.NegateAttack() and td:IsFaceup() and td:IsRelateToEffect(e) then - Duel.ChangePosition(td,POS_FACEUP_DEFENCE,0,POS_FACEUP_ATTACK,0) - end -end diff --git a/script/c92901944.lua b/script/c92901944.lua deleted file mode 100644 index c1efa79565..0000000000 --- a/script/c92901944.lua +++ /dev/null @@ -1,52 +0,0 @@ ---スクラップ・サーチャー -function c92901944.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(92901944,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetRange(LOCATION_GRAVE) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCondition(c92901944.spcon) - e1:SetTarget(c92901944.sptg) - e1:SetOperation(c92901944.spop) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(92901944,1)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetTarget(c92901944.destg) - e2:SetOperation(c92901944.desop) - c:RegisterEffect(e2) -end -function c92901944.cfilter(c,tp) - return c:IsSetCard(0x24) and c:GetCode()~=92901944 and c:IsReason(REASON_DESTROY) and c:GetPreviousControler()==tp - and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP) -end -function c92901944.spcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c92901944.cfilter,1,e:GetHandler(),tp) and not eg:IsContains(e:GetHandler()) -end -function c92901944.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c92901944.spop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP) - end -end -function c92901944.desfilter(c) - return c:IsFaceup() and not c:IsSetCard(0x24) and c:IsDestructable() -end -function c92901944.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local g=Duel.GetMatchingGroup(c92901944.desfilter,tp,LOCATION_MZONE,0,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c92901944.desop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c92901944.desfilter,tp,LOCATION_MZONE,0,nil) - Duel.Destroy(g,REASON_EFFECT) -end diff --git a/script/c92918648.lua b/script/c92918648.lua deleted file mode 100644 index 85eadace85..0000000000 --- a/script/c92918648.lua +++ /dev/null @@ -1,40 +0,0 @@ ---魔導法皇 ハイロン -function c92918648.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsRace,RACE_SPELLCASTER),7,2) - c:EnableReviveLimit() - --attack up - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(92918648,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCost(c92918648.cost) - e1:SetTarget(c92918648.target) - e1:SetOperation(c92918648.operation) - c:RegisterEffect(e1) -end -function c92918648.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c92918648.cfilter(c) - return c:IsSetCard(0x106e) and c:IsType(TYPE_SPELL) -end -function c92918648.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable() -end -function c92918648.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c92918648.cfilter,tp,LOCATION_GRAVE,0,1,nil) - and Duel.IsExistingMatchingCard(c92918648.filter,tp,0,LOCATION_ONFIELD,1,nil) end - local g=Duel.GetMatchingGroup(c92918648.filter,tp,0,LOCATION_ONFIELD,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c92918648.operation(e,tp,eg,ep,ev,re,r,rp) - local ct=Duel.GetMatchingGroupCount(c92918648.cfilter,tp,LOCATION_GRAVE,0,nil) - if ct==0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectMatchingCard(tp,c92918648.filter,tp,0,LOCATION_ONFIELD,1,ct,nil) - Duel.Destroy(g,REASON_EFFECT) -end diff --git a/script/c92924317.lua b/script/c92924317.lua deleted file mode 100644 index f7b76394ca..0000000000 --- a/script/c92924317.lua +++ /dev/null @@ -1,59 +0,0 @@ ---蘇りし魂 -function c92924317.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_END_PHASE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c92924317.target) - e1:SetOperation(c92924317.operation) - c:RegisterEffect(e1) - --Destroy - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE) - e2:SetCode(EVENT_LEAVE_FIELD) - e2:SetOperation(c92924317.desop) - c:RegisterEffect(e2) - --Destroy2 - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e3:SetRange(LOCATION_SZONE) - e3:SetCode(EVENT_LEAVE_FIELD) - e3:SetCondition(c92924317.descon2) - e3:SetOperation(c92924317.desop2) - c:RegisterEffect(e3) -end -function c92924317.filter(c,e,tp) - return c:IsType(TYPE_NORMAL) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c92924317.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c92924317.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c92924317.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c92924317.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c92924317.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then - if Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENCE)==0 then return end - c:SetCardTarget(tc) - end -end -function c92924317.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetHandler():GetFirstCardTarget() - if tc and tc:IsLocation(LOCATION_MZONE) then - Duel.Destroy(tc,REASON_EFFECT) - end -end -function c92924317.descon2(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetHandler():GetFirstCardTarget() - return tc and eg:IsContains(tc) and tc:IsReason(REASON_DESTROY) -end -function c92924317.desop2(e,tp,eg,ep,ev,re,r,rp) - Duel.Destroy(e:GetHandler(),REASON_EFFECT) -end diff --git a/script/c92933195.lua b/script/c92933195.lua deleted file mode 100644 index 61ec15ada0..0000000000 --- a/script/c92933195.lua +++ /dev/null @@ -1,32 +0,0 @@ ---霞の谷の風使い -function c92933195.initial_effect(c) - --hand adjust - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(92933195,0)) - e1:SetCategory(CATEGORY_TOGRAVE) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCondition(c92933195.handcon) - e1:SetOperation(c92933195.handop) - c:RegisterEffect(e1) -end -function c92933195.handcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)>=5 and Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>=5 -end -function c92933195.handop(e,tp,eg,ep,ev,re,r,rp) - local g=Group.CreateGroup() - local ht1=Duel.GetFieldGroupCount(tp,LOCATION_HAND,0) - if ht1>=5 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local sg=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_HAND,0,ht1-4,ht1-4,nil) - g:Merge(sg) - end - local ht2=Duel.GetFieldGroupCount(1-tp,LOCATION_HAND,0) - if ht2>=5 then - Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_TOGRAVE) - local sg=Duel.SelectMatchingCard(1-tp,aux.TRUE,1-tp,LOCATION_HAND,0,ht2-4,ht2-4,nil) - g:Merge(sg) - end - Duel.SendtoGrave(g,REASON_EFFECT) -end diff --git a/script/c9293977.lua b/script/c9293977.lua deleted file mode 100644 index b598f53d8a..0000000000 --- a/script/c9293977.lua +++ /dev/null @@ -1,6 +0,0 @@ ---メタル・ドラゴン -function c9293977.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcCode2(c,29172562,55444629,true,true) -end diff --git a/script/c9298235.lua b/script/c9298235.lua deleted file mode 100644 index 24738a242e..0000000000 --- a/script/c9298235.lua +++ /dev/null @@ -1,37 +0,0 @@ ---ファーニマル・クレーン -function c9298235.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCondition(c9298235.condition) - e1:SetTarget(c9298235.target) - e1:SetOperation(c9298235.activate) - c:RegisterEffect(e1) -end -function c9298235.filter(c,tp) - return c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE+REASON_EFFECT) and c:GetReasonPlayer()~=tp - and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP) - and c:GetPreviousControler()==tp and c:IsControler(tp) and c:IsSetCard(0xa9) and c:IsAbleToHand() -end -function c9298235.condition(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c9298235.filter,1,nil,tp) -end -function c9298235.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return eg:IsContains(chkc) and c9298235.filter(chkc,tp) end - if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=eg:FilterSelect(tp,c9298235.filter,1,1,nil,tp) - Duel.SetTargetCard(g) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c9298235.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.SendtoHand(tc,nil,REASON_EFFECT)~=0 then - Duel.ConfirmCards(1-tp,tc) - Duel.Draw(tp,1,REASON_EFFECT) - end -end diff --git a/script/c93013676.lua b/script/c93013676.lua deleted file mode 100644 index 7c22cb888c..0000000000 --- a/script/c93013676.lua +++ /dev/null @@ -1,14 +0,0 @@ ---マハー・ヴァイロ -function c93013676.initial_effect(c) - --atkup - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetRange(LOCATION_MZONE) - e1:SetValue(c93013676.val) - c:RegisterEffect(e1) -end -function c93013676.val(e,c) - return c:GetEquipCount()*500 -end diff --git a/script/c93016201.lua b/script/c93016201.lua deleted file mode 100644 index 173b02e269..0000000000 --- a/script/c93016201.lua +++ /dev/null @@ -1,120 +0,0 @@ ---王宮の弾圧 -function c93016201.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c93016201.cost1) - e1:SetTarget(c93016201.target1) - e1:SetOperation(c93016201.activate1) - c:RegisterEffect(e1) - --Activate(timing) - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(93016201,0)) - e2:SetType(EFFECT_TYPE_ACTIVATE) - e2:SetCode(EVENT_SPSUMMON) - e2:SetCondition(c93016201.condition2) - e2:SetCost(c93016201.cost2) - e2:SetTarget(c93016201.target2) - e2:SetOperation(c93016201.activate2) - c:RegisterEffect(e2) - --instant - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(93016201,0)) - e3:SetType(EFFECT_TYPE_QUICK_O) - e3:SetRange(LOCATION_SZONE) - e3:SetProperty(EFFECT_FLAG_BOTH_SIDE) - e3:SetCode(EVENT_SPSUMMON) - e3:SetCondition(c93016201.condition2) - e3:SetCost(c93016201.cost2) - e3:SetTarget(c93016201.target2) - e3:SetOperation(c93016201.activate2) - c:RegisterEffect(e3) - --instant(chain) - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(93016201,0)) - e4:SetType(EFFECT_TYPE_QUICK_O) - e4:SetRange(LOCATION_SZONE) - e4:SetProperty(EFFECT_FLAG_BOTH_SIDE) - e4:SetCode(EVENT_CHAINING) - e4:SetCondition(c93016201.condition3) - e4:SetCost(c93016201.cost3) - e4:SetTarget(c93016201.target3) - e4:SetOperation(c93016201.activate3) - c:RegisterEffect(e4) -end -function c93016201.cost1(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - e:SetLabel(0) - if not Duel.CheckLPCost(tp,800) then return end - local ct=Duel.GetCurrentChain() - if ct==1 then return end - local pe=Duel.GetChainInfo(ct-1,CHAININFO_TRIGGERING_EFFECT) - if not pe:IsHasCategory(CATEGORY_SPECIAL_SUMMON) then return end - if not Duel.IsChainDisablable(ct-1) then return end - if Duel.SelectYesNo(tp,aux.Stringid(93016201,1)) then - Duel.PayLPCost(tp,800) - e:SetLabel(1) - end -end -function c93016201.target1(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - if e:GetLabel()~=1 then return end - local ct=Duel.GetCurrentChain() - local te=Duel.GetChainInfo(ct-1,CHAININFO_TRIGGERING_EFFECT) - local tc=te:GetHandler() - Duel.SetOperationInfo(0,CATEGORY_DISABLE,tc,1,0,0) - if tc:IsDestructable() and tc:IsRelateToEffect(te) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,tc,1,0,0) - end -end -function c93016201.activate1(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if e:GetLabel()~=1 then return end - if not c:IsRelateToEffect(e) then return end - local ct=Duel.GetChainInfo(0,CHAININFO_CHAIN_COUNT) - local te=Duel.GetChainInfo(ct-1,CHAININFO_TRIGGERING_EFFECT) - local tc=te:GetHandler() - Duel.NegateEffect(ct-1) - if tc:IsRelateToEffect(te) then - Duel.Destroy(tc,REASON_EFFECT) - end -end -function c93016201.condition2(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentChain()==0 -end -function c93016201.cost2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,800) end - Duel.PayLPCost(tp,800) -end -function c93016201.target2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DISABLE_SUMMON,eg,eg:GetCount(),0,0) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,eg:GetCount(),0,0) -end -function c93016201.activate2(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - Duel.NegateSummon(eg) - Duel.Destroy(eg,REASON_EFFECT) -end -function c93016201.condition3(e,tp,eg,ep,ev,re,r,rp) - return re:IsHasCategory(CATEGORY_SPECIAL_SUMMON) and Duel.IsChainDisablable(ev) -end -function c93016201.cost3(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,800) end - Duel.PayLPCost(tp,800) -end -function c93016201.target3(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0) - if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) - end -end -function c93016201.activate3(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - Duel.NegateEffect(ev) - if re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(eg,REASON_EFFECT) - end -end diff --git a/script/c93023479.lua b/script/c93023479.lua deleted file mode 100644 index 577df89c87..0000000000 --- a/script/c93023479.lua +++ /dev/null @@ -1,32 +0,0 @@ ---墓守の召喚師 -function c93023479.initial_effect(c) - --search - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(93023479,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCondition(c93023479.condition) - e1:SetTarget(c93023479.target) - e1:SetOperation(c93023479.operation) - c:RegisterEffect(e1) -end -function c93023479.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) - and e:GetHandler():GetPreviousControler()==tp -end -function c93023479.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c93023479.filter(c) - return c:IsDefenceBelow(1500) and c:IsSetCard(0x2e) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() -end -function c93023479.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c93023479.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c93085839.lua b/script/c93085839.lua deleted file mode 100644 index 997b4f02cd..0000000000 --- a/script/c93085839.lua +++ /dev/null @@ -1,78 +0,0 @@ ---聖騎士エクター・ド・マリス -function c93085839.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(93085839,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND+LOCATION_GRAVE) - e1:SetCountLimit(1,93085839) - e1:SetCost(c93085839.spcost) - e1:SetTarget(c93085839.sptg) - e1:SetOperation(c93085839.spop) - c:RegisterEffect(e1) - --effect gain - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_BE_MATERIAL) - e2:SetCondition(c93085839.effcon) - e2:SetOperation(c93085839.effop1) - c:RegisterEffect(e2) - --effect gain - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e3:SetCode(EVENT_BE_PRE_MATERIAL) - e3:SetCondition(c93085839.effcon) - e3:SetOperation(c93085839.effop2) - c:RegisterEffect(e3) -end -function c93085839.spfilter(c) - return c:IsSetCard(0x107a) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost() -end -function c93085839.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c93085839.spfilter,tp,LOCATION_GRAVE,0,2,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c93085839.spfilter,tp,LOCATION_GRAVE,0,2,2,e:GetHandler()) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c93085839.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c93085839.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) - end -end -function c93085839.effcon(e,tp,eg,ep,ev,re,r,rp) - return (r==REASON_XYZ or r==REASON_SYNCHRO) and e:GetHandler():GetReasonCard():IsSetCard(0x107a) -end -function c93085839.effop1(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local rc=c:GetReasonCard() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetOperation(c93085839.sumop) - rc:RegisterEffect(e1) -end -function c93085839.sumop(e,tp,eg,ep,ev,re,r,rp) - Duel.SetChainLimitTillChainEnd(c93085839.chainlm) -end -function c93085839.chainlm(e,rp,tp) - return tp==rp -end -function c93085839.effop2(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local rc=c:GetReasonCard() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_DISABLE_SPSUMMON) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetReset(RESET_EVENT+0x1fe0000) - rc:RegisterEffect(e1) -end diff --git a/script/c93087299.lua b/script/c93087299.lua deleted file mode 100644 index 7ff8246307..0000000000 --- a/script/c93087299.lua +++ /dev/null @@ -1,31 +0,0 @@ ---炎の護封剣 -function c93087299.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --cannot attack - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(0,LOCATION_MZONE) - e2:SetCondition(c93087299.atcon) - c:RegisterEffect(e2) - -- - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_SELF_DESTROY) - e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e3:SetRange(LOCATION_SZONE) - e3:SetCondition(c93087299.descon) - c:RegisterEffect(e3) -end -function c93087299.atcon(e) - return Duel.GetFieldGroupCount(e:GetHandlerPlayer(),LOCATION_MZONE,0)==0 -end -function c93087299.descon(e) - return Duel.GetFieldGroupCount(e:GetHandlerPlayer(),LOCATION_MZONE,0)~=0 - or Duel.GetFieldGroupCount(e:GetHandlerPlayer(),0,LOCATION_HAND)>=5 -end diff --git a/script/c93107608.lua b/script/c93107608.lua deleted file mode 100644 index 5c6e0bdd61..0000000000 --- a/script/c93107608.lua +++ /dev/null @@ -1,32 +0,0 @@ ---共鳴虫 -function c93107608.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(93107608,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetCondition(c93107608.condition) - e1:SetTarget(c93107608.target) - e1:SetOperation(c93107608.operation) - c:RegisterEffect(e1) -end -function c93107608.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) -end -function c93107608.filter(c,e,tp) - return c:IsAttackBelow(1500) and c:IsRace(RACE_INSECT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c93107608.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c93107608.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c93107608.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c93107608.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c93108433.lua b/script/c93108433.lua deleted file mode 100644 index 897bb4c9b4..0000000000 --- a/script/c93108433.lua +++ /dev/null @@ -1,45 +0,0 @@ ---モンスター回収 -function c93108433.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c93108433.target) - e1:SetOperation(c93108433.activate) - c:RegisterEffect(e1) -end -function c93108433.mfilter(c,tp) - return c:IsAbleToDeck() and tp==c:GetOwner() -end -function c93108433.hfilter(c,tp) - return tp~=c:GetOwner() -end -function c93108433.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c93108433.mfilter(chkc,tp) end - if chk==0 then return Duel.IsPlayerCanDraw(tp) and Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)>0 - and Duel.IsExistingTarget(c93108433.mfilter,tp,LOCATION_MZONE,0,1,e:GetHandler(),tp) - and not Duel.IsExistingMatchingCard(c93108433.hfilter,tp,LOCATION_HAND,0,1,nil,tp) - end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g1=Duel.SelectTarget(tp,c93108433.mfilter,tp,LOCATION_MZONE,0,1,1,nil,tp) - local g2=Duel.GetFieldGroup(tp,LOCATION_HAND,0) - g1:Merge(g2) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g1,g1:GetCount(),0,0) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,g2:GetCount()) -end -function c93108433.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - local g=Duel.GetFieldGroup(tp,LOCATION_HAND,0) - local ct=g:GetCount() - if tc:IsRelateToEffect(e) and ct>0 then - g:AddCard(tc) - Duel.SendtoDeck(g,nil,2,REASON_EFFECT) - Duel.ShuffleDeck(tp) - if ct>0 then - Duel.BreakEffect() - Duel.Draw(tp,ct,REASON_EFFECT) - end - end -end diff --git a/script/c93108839.lua b/script/c93108839.lua deleted file mode 100644 index 841b2bf315..0000000000 --- a/script/c93108839.lua +++ /dev/null @@ -1,109 +0,0 @@ ---No.58 炎圧鬼バーナー・バイサー -function c93108839.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,4,2) - c:EnableReviveLimit() - --equip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(93108839,0)) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetTarget(c93108839.eqtg) - e1:SetOperation(c93108839.eqop) - c:RegisterEffect(e1) - --direct - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_DIRECT_ATTACK) - c:RegisterEffect(e2) - --damage - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(93108839,2)) - e3:SetCategory(CATEGORY_DAMAGE) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_BATTLE_DAMAGE) - e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e3:SetRange(LOCATION_SZONE) - e3:SetCondition(c93108839.damcon) - e3:SetCost(c93108839.damcost) - e3:SetTarget(c93108839.damtg) - e3:SetOperation(c93108839.damop) - c:RegisterEffect(e3) -end -c93108839.xyz_number=58 -function c93108839.filter(c) - return c:IsFaceup() and c:IsType(TYPE_XYZ) -end -function c93108839.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c93108839.filter(chkc) and chkc~=e:GetHandler() end - if chk==0 then return e:GetHandler():GetFlagEffect(93108839)==0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingTarget(c93108839.filter,tp,LOCATION_MZONE,0,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local g=Duel.SelectTarget(tp,c93108839.filter,tp,LOCATION_MZONE,0,1,1,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0) - e:GetHandler():RegisterFlagEffect(93108839,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1) -end -function c93108839.eqop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if not c:IsRelateToEffect(e) or c:IsFacedown() then return end - if not tc:IsRelateToEffect(e) or tc:IsFacedown() or tc:IsControler(1-tp) then - Duel.SendtoGrave(c,REASON_EFFECT) - return - end - if not Duel.Equip(tp,c,tc,false) then return end - --unequip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(93108839,1)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_SZONE) - e1:SetTarget(c93108839.sptg) - e1:SetOperation(c93108839.spop) - e1:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e1) - --eqlimit - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetCode(EFFECT_EQUIP_LIMIT) - e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e4:SetValue(c93108839.eqlimit) - e4:SetReset(RESET_EVENT+0x1fe0000) - e4:SetLabelObject(tc) - c:RegisterEffect(e4) -end -function c93108839.eqlimit(e,c) - return c==e:GetLabelObject() -end -function c93108839.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():GetFlagEffect(93108839)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) - e:GetHandler():RegisterFlagEffect(93108839,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1) -end -function c93108839.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP_ATTACK) - end -end -function c93108839.damcon(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp and eg:GetFirst()==e:GetHandler():GetEquipTarget() -end -function c93108839.damcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) -end -function c93108839.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(500) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,500) -end -function c93108839.damop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c93130021.lua b/script/c93130021.lua deleted file mode 100644 index d84668fa4e..0000000000 --- a/script/c93130021.lua +++ /dev/null @@ -1,135 +0,0 @@ ---ビクトリー・バイパーXX03 -function c93130021.initial_effect(c) - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(93130021,0)) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_BATTLE_DESTROYING) - e1:SetCondition(c93130021.condition) - e1:SetTarget(c93130021.target) - e1:SetOperation(c93130021.operation) - c:RegisterEffect(e1) -end -function c93130021.condition(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsRelateToBattle() and c:GetBattleTarget():IsType(TYPE_MONSTER) -end -function c93130021.filter(c) - return c:IsFaceup() and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable() -end -function c93130021.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and c93130021.filter(chkc) end - if chk==0 then return true end - local c=e:GetHandler() - local t1=Duel.IsExistingTarget(c93130021.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) - local t2=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsPlayerCanSpecialSummonMonster(tp,93130022,0,0x4011,c:GetAttack(),c:GetDefence(),c:GetLevel(),c:GetRace(),c:GetAttribute()) - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(93130021,0)) - if t1 and t2 then - op=Duel.SelectOption(tp,aux.Stringid(93130021,1),aux.Stringid(93130021,2),aux.Stringid(93130021,3)) - elseif t1 then - op=Duel.SelectOption(tp,aux.Stringid(93130021,1),aux.Stringid(93130021,2)) - elseif t2 then - op=Duel.SelectOption(tp,aux.Stringid(93130021,1),aux.Stringid(93130021,3)) - if op==1 then op=2 end - else op=Duel.SelectOption(tp,aux.Stringid(93130021,1)) end - e:SetLabel(op) - if op==1 then - e:SetProperty(EFFECT_FLAG_CARD_TARGET) - e:SetCategory(CATEGORY_DESTROY) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c93130021.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) - elseif op==2 then - e:SetProperty(0) - e:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0) - else - e:SetProperty(0) - e:SetCategory(CATEGORY_ATKCHANGE) - end -end -function c93130021.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if e:GetLabel()==1 then - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end - elseif e:GetLabel()==2 then - local atk=c:GetAttack() - local def=c:GetDefence() - local lv=c:GetLevel() - local race=c:GetRace() - local att=c:GetAttribute() - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 or not c:IsRelateToEffect(e) or c:IsFacedown() - or not Duel.IsPlayerCanSpecialSummonMonster(tp,93130022,0,0x4011,atk,def,lv,race,att) then return end - local token=Duel.CreateToken(tp,93130022) - c:CreateRelation(token,RESET_EVENT+0x1fe0000) - Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetValue(c93130021.tokenatk) - e1:SetReset(RESET_EVENT+0xfe0000) - token:RegisterEffect(e1,true) - local e2=e1:Clone() - e2:SetCode(EFFECT_SET_DEFENCE_FINAL) - e2:SetValue(c93130021.tokendef) - token:RegisterEffect(e2,true) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_CHANGE_LEVEL) - e3:SetValue(c93130021.tokenlv) - e3:SetReset(RESET_EVENT+0xfe0000) - token:RegisterEffect(e3,true) - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetCode(EFFECT_CHANGE_RACE) - e4:SetValue(c93130021.tokenrace) - e4:SetReset(RESET_EVENT+0xfe0000) - token:RegisterEffect(e4,true) - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_SINGLE) - e5:SetCode(EFFECT_CHANGE_ATTRIBUTE) - e5:SetValue(c93130021.tokenatt) - e5:SetReset(RESET_EVENT+0xfe0000) - token:RegisterEffect(e5,true) - local e6=Effect.CreateEffect(c) - e6:SetType(EFFECT_TYPE_SINGLE) - e6:SetCode(EFFECT_SELF_DESTROY) - e6:SetCondition(c93130021.tokendes) - e6:SetReset(RESET_EVENT+0xfe0000) - token:RegisterEffect(e6,true) - Duel.SpecialSummonComplete() - else - if c:IsRelateToEffect(e) and c:IsFaceup() then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(400) - e1:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e1) - end - end -end -function c93130021.tokenatk(e,c) - return e:GetOwner():GetAttack() -end -function c93130021.tokendef(e,c) - return e:GetOwner():GetDefence() -end -function c93130021.tokenlv(e,c) - return e:GetOwner():GetLevel() -end -function c93130021.tokenrace(e,c) - return e:GetOwner():GetRace() -end -function c93130021.tokenatt(e,c) - return e:GetOwner():GetAttribute() -end -function c93130021.tokendes(e) - return not e:GetOwner():IsRelateToCard(e:GetHandler()) -end diff --git a/script/c93151201.lua b/script/c93151201.lua deleted file mode 100644 index 7078c9c318..0000000000 --- a/script/c93151201.lua +++ /dev/null @@ -1,28 +0,0 @@ ---ボルテック・コング -function c93151201.initial_effect(c) - --discard deck - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(93151201,0)) - e2:SetCategory(CATEGORY_DECKDES) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_BATTLE_DAMAGE) - e2:SetCondition(c93151201.condition) - e2:SetTarget(c93151201.target) - e2:SetOperation(c93151201.operation) - c:RegisterEffect(e2) -end -function c93151201.condition(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp -end -function c93151201.filter(c) - return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_LIGHT) -end -function c93151201.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local ct=Duel.GetMatchingGroupCount(c93151201.filter,tp,LOCATION_MZONE,0,nil) - Duel.SetOperationInfo(0,CATEGORY_DECKDES,0,0,1-tp,ct) -end -function c93151201.operation(e,tp,eg,ep,ev,re,r,rp) - local ct=Duel.GetMatchingGroupCount(c93151201.filter,tp,LOCATION_MZONE,0,nil) - Duel.DiscardDeck(1-tp,ct,REASON_EFFECT) -end diff --git a/script/c93157004.lua b/script/c93157004.lua deleted file mode 100644 index 0c0bf4fb54..0000000000 --- a/script/c93157004.lua +++ /dev/null @@ -1,267 +0,0 @@ ---ヴァイロン・オメガ -function c93157004.initial_effect(c) - --synchro summon - c:EnableReviveLimit() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_IGNORE_IMMUNE) - e1:SetRange(LOCATION_EXTRA) - e1:SetCondition(c93157004.syncon) - e1:SetOperation(c93157004.synop) - e1:SetValue(SUMMON_TYPE_SYNCHRO) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(93157004,0)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetCondition(c93157004.descon) - e2:SetTarget(c93157004.destg) - e2:SetOperation(c93157004.desop) - c:RegisterEffect(e2) - --equip - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(93157004,1)) - e3:SetCategory(CATEGORY_EQUIP) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1) - e3:SetTarget(c93157004.eqtg) - e3:SetOperation(c93157004.eqop) - c:RegisterEffect(e3) - --negate - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(93157004,2)) - e4:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) - e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_QUICK_O) - e4:SetCode(EVENT_CHAINING) - e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) - e4:SetRange(LOCATION_MZONE) - e4:SetCondition(c93157004.discon) - e4:SetCost(c93157004.discost) - e4:SetTarget(c93157004.distg) - e4:SetOperation(c93157004.disop) - c:RegisterEffect(e4) -end -function c93157004.matfilter1(c,syncard) - return c:IsType(TYPE_TUNER) and (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) and c:IsCanBeSynchroMaterial(syncard) -end -function c93157004.matfilter2(c,syncard) - return c:IsNotTuner() and (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) and c:IsSetCard(0x30) and c:IsCanBeSynchroMaterial(syncard) -end -function c93157004.synfilter1(c,syncard,lv,g1,g2,g3,g4) - local tlv=c:GetSynchroLevel(syncard) - if lv-tlv<=0 then return false end - local f1=c.tuner_filter - if c:IsHasEffect(55863245) then - return g3:IsExists(c93157004.synfilter2,1,c,syncard,lv-tlv,g2,g4,f1,c) - else - return g1:IsExists(c93157004.synfilter2,1,c,syncard,lv-tlv,g2,g4,f1,c) - end -end -function c93157004.synfilter2(c,syncard,lv,g2,g4,f1,tuner1) - local tlv=c:GetSynchroLevel(syncard) - if lv-tlv<=0 then return false end - local f2=c.tuner_filter - if f1 and not f1(c) then return false end - if f2 and not f2(tuner1) then return false end - if (tuner1:IsHasEffect(55863245) and not c:IsLocation(LOCATION_HAND)) or c:IsHasEffect(55863245) then - return g4:IsExists(c93157004.synfilter3,1,nil,syncard,lv-tlv,f1,f2) - else - return g2:IsExists(c93157004.synfilter3,1,nil,syncard,lv-tlv,f1,f2) - end -end -function c93157004.synfilter3(c,syncard,lv,f1,f2) - local mlv=c:GetSynchroLevel(syncard) - local lv1=bit.band(mlv,0xffff) - local lv2=bit.rshift(mlv,16) - return (lv1==lv or lv2==lv) and (not f1 or f1(c)) and (not f2 or f2(c)) -end -function c93157004.syncon(e,c,tuner,mg) - if c==nil then return true end - local tp=c:GetControler() - if Duel.GetLocationCount(tp,LOCATION_MZONE)<-2 then return false end - local g1=nil - local g2=nil - local g3=nil - local g4=nil - if mg then - g1=mg:Filter(c93157004.matfilter1,nil,c) - g2=mg:Filter(c93157004.matfilter2,nil,c) - g3=mg:Filter(c93157004.matfilter1,nil,c) - g4=mg:Filter(c93157004.matfilter2,nil,c) - else - g1=Duel.GetMatchingGroup(c93157004.matfilter1,tp,LOCATION_MZONE,LOCATION_MZONE,nil,c) - g2=Duel.GetMatchingGroup(c93157004.matfilter2,tp,LOCATION_MZONE,LOCATION_MZONE,nil,c) - g3=Duel.GetMatchingGroup(c93157004.matfilter1,tp,LOCATION_MZONE+LOCATION_HAND,LOCATION_MZONE,nil,c) - g4=Duel.GetMatchingGroup(c93157004.matfilter2,tp,LOCATION_MZONE+LOCATION_HAND,LOCATION_MZONE,nil,c) - end - local pe=Duel.IsPlayerAffectedByEffect(tp,EFFECT_MUST_BE_SMATERIAL) - local lv=c:GetLevel() - if tuner then - local tlv=tuner:GetSynchroLevel(c) - if lv-tlv<=0 then return false end - local f1=tuner.tuner_filter - if not pe then - return g1:IsExists(c93157004.synfilter2,1,tuner,c,lv-tlv,g2,g4,f1,tuner) - else - return c93157004.synfilter2(pe:GetOwner(),c,lv-tlv,g2,nil,f1,tuner) - end - end - if not pe then - return g1:IsExists(c93157004.synfilter1,1,nil,c,lv,g1,g2,g3,g4) - else - return c93157004.synfilter1(pe:GetOwner(),c,lv,g1,g2,g3,g4) - end -end -function c93157004.synop(e,tp,eg,ep,ev,re,r,rp,c,tuner,mg) - local g=Group.CreateGroup() - local g1=nil - local g2=nil - local g3=nil - local g4=nil - if mg then - g1=mg:Filter(c93157004.matfilter1,nil,c) - g2=mg:Filter(c93157004.matfilter2,nil,c) - g3=mg:Filter(c93157004.matfilter1,nil,c) - g4=mg:Filter(c93157004.matfilter2,nil,c) - else - g1=Duel.GetMatchingGroup(c93157004.matfilter1,tp,LOCATION_MZONE,LOCATION_MZONE,nil,c) - g2=Duel.GetMatchingGroup(c93157004.matfilter2,tp,LOCATION_MZONE,LOCATION_MZONE,nil,c) - g3=Duel.GetMatchingGroup(c93157004.matfilter1,tp,LOCATION_MZONE+LOCATION_HAND,LOCATION_MZONE,nil,c) - g4=Duel.GetMatchingGroup(c93157004.matfilter2,tp,LOCATION_MZONE+LOCATION_HAND,LOCATION_MZONE,nil,c) - end - local pe=Duel.IsPlayerAffectedByEffect(tp,EFFECT_MUST_BE_SMATERIAL) - local lv=c:GetLevel() - if tuner then - g:AddCard(tuner) - local lv1=tuner:GetSynchroLevel(c) - local f1=tuner.tuner_filter - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SMATERIAL) - local tuner2=nil - if not pe then - local t2=g1:FilterSelect(tp,c93157004.synfilter2,1,1,tuner,c,lv-lv1,g2,g4,f1,tuner) - tuner2=t2:GetFirst() - else - tuner2=pe:GetOwner() - Group.FromCards(tuner2):Select(tp,1,1,nil) - end - g:AddCard(tuner2) - local lv2=tuner2:GetSynchroLevel(c) - local f2=tuner2.tuner_filter - local m3=nil - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SMATERIAL) - if tuner2:IsHasEffect(55863245) then - m3=g4:FilterSelect(tp,c93157004.synfilter3,1,1,nil,c,lv-lv1-lv2,f1,f2) - else - m3=g2:FilterSelect(tp,c93157004.synfilter3,1,1,nil,c,lv-lv1-lv2,f1,f2) - end - g:Merge(m3) - else - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SMATERIAL) - local tuner1=nil - local hand=nil - if not pe then - local t1=g1:FilterSelect(tp,c93157004.synfilter1,1,1,nil,c,lv,g1,g2,g3,g4) - tuner1=t1:GetFirst() - else - tuner1=pe:GetOwner() - Group.FromCards(tuner1):Select(tp,1,1,nil) - end - g:AddCard(tuner1) - local lv1=tuner1:GetSynchroLevel(c) - local f1=tuner1.tuner_filter - local tuner2=nil - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SMATERIAL) - if tuner1:IsHasEffect(55863245) then - local t2=g3:FilterSelect(tp,c93157004.synfilter2,1,1,tuner1,c,lv-lv1,g2,g4,f1,tuner1) - tuner2=t2:GetFirst() - else - local t2=g1:FilterSelect(tp,c93157004.synfilter2,1,1,tuner1,c,lv-lv1,g2,g4,f1,tuner1) - tuner2=t2:GetFirst() - end - g:AddCard(tuner2) - local lv2=tuner2:GetSynchroLevel(c) - local f2=tuner2.tuner_filter - local m3=nil - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SMATERIAL) - if (tuner1:IsHasEffect(55863245) and not tuner2:IsLocation(LOCATION_HAND)) - or tuner2:IsHasEffect(55863245) then - m3=g4:FilterSelect(tp,c93157004.synfilter3,1,1,nil,c,lv-lv1-lv2,f1,f2) - else - m3=g2:FilterSelect(tp,c93157004.synfilter3,1,1,nil,c,lv-lv1-lv2,f1,f2) - end - g:Merge(m3) - end - c:SetMaterial(g) - Duel.SendtoGrave(g,REASON_MATERIAL+REASON_SYNCHRO) -end -function c93157004.descon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_SYNCHRO -end -function c93157004.desfilter(c) - return c:IsFaceup() and bit.band(c:GetSummonType(),SUMMON_TYPE_NORMAL)~=0 and c:IsDestructable() -end -function c93157004.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local g=Duel.GetMatchingGroup(c93157004.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c93157004.desop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c93157004.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - if g:GetCount()>0 then - Duel.Destroy(g,REASON_EFFECT) - end -end -function c93157004.eqfilter(c) - return c:IsSetCard(0x30) and c:IsType(TYPE_MONSTER) -end -function c93157004.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingTarget(c93157004.eqfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local g=Duel.SelectTarget(tp,c93157004.eqfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0) -end -function c93157004.eqop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and c:IsFaceup() and c:IsRelateToEffect(e) then - if not Duel.Equip(tp,tc,c) then return end - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_COPY_INHERIT+EFFECT_FLAG_OWNER_RELATE) - e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(c93157004.eqlimit) - tc:RegisterEffect(e1) - end -end -function c93157004.eqlimit(e,c) - return e:GetOwner()==c -end -function c93157004.discon(e,tp,eg,ep,ev,re,r,rp) - return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and re:IsActiveType(TYPE_MONSTER) - and Duel.IsChainNegatable(ev) -end -function c93157004.discost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():GetEquipGroup():IsExists(Card.IsAbleToGraveAsCost,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=e:GetHandler():GetEquipGroup():FilterSelect(tp,Card.IsAbleToGraveAsCost,1,1,nil) - Duel.SendtoGrave(g,REASON_COST) -end -function c93157004.distg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) - end -end -function c93157004.disop(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateActivation(ev) - if re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(eg,REASON_EFFECT) - end -end diff --git a/script/c93187568.lua b/script/c93187568.lua deleted file mode 100644 index 165dbeb92a..0000000000 --- a/script/c93187568.lua +++ /dev/null @@ -1,37 +0,0 @@ ---マジック・ストライカー -function c93187568.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c93187568.spcon) - e1:SetOperation(c93187568.spop) - c:RegisterEffect(e1) - --diratk - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DIRECT_ATTACK) - c:RegisterEffect(e2) - --dam - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_AVOID_BATTLE_DAMAGE) - e3:SetValue(1) - c:RegisterEffect(e3) -end -function c93187568.spfilter(c) - return c:IsType(TYPE_SPELL) and c:IsAbleToRemoveAsCost() -end -function c93187568.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c93187568.spfilter,tp,LOCATION_GRAVE,0,1,nil) -end -function c93187568.spop(e,tp,eg,ep,ev,re,r,rp,c) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c93187568.spfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end diff --git a/script/c93211810.lua b/script/c93211810.lua deleted file mode 100644 index 7eff706c3a..0000000000 --- a/script/c93211810.lua +++ /dev/null @@ -1,115 +0,0 @@ ---超音速波 -function c93211810.initial_effect(c) - --atkup - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetCondition(c93211810.condition) - e1:SetCost(c93211810.cost) - e1:SetTarget(c93211810.target) - e1:SetOperation(c93211810.activate) - c:RegisterEffect(e1) - if not c93211810.global_check then - c93211810.global_check=true - c93211810[0]=0 - c93211810[1]=0 - local ge1=Effect.CreateEffect(c) - ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - ge1:SetCode(EVENT_ATTACK_ANNOUNCE) - ge1:SetOperation(c93211810.checkop) - Duel.RegisterEffect(ge1,0) - local ge2=Effect.CreateEffect(c) - ge2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - ge2:SetCode(EVENT_PHASE_START+PHASE_DRAW) - ge2:SetOperation(c93211810.clear) - Duel.RegisterEffect(ge2,0) - end -end -function c93211810.checkop(e,tp,eg,ep,ev,re,r,rp) - local tc=eg:GetFirst() - if tc:GetFlagEffect(93211810)==0 then - c93211810[ep]=c93211810[ep]+1 - tc:RegisterFlagEffect(93211810,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) - end -end -function c93211810.clear(e,tp,eg,ep,ev,re,r,rp) - c93211810[0]=0 - c93211810[1]=0 -end -function c93211810.condition(e,tp,eg,ep,ev,re,r,rp) - local ph=Duel.GetCurrentPhase() - return Duel.GetTurnPlayer()==tp and ph0 -end -function c93220472.afilter(c) - return c:IsFaceup() and c:IsRace(RACE_DRAGON) -end -function c93220472.atkcon(e) - return not Duel.IsExistingMatchingCard(c93220472.afilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,e:GetHandler()) -end diff --git a/script/c93224848.lua b/script/c93224848.lua deleted file mode 100644 index 53f8c96c5d..0000000000 --- a/script/c93224848.lua +++ /dev/null @@ -1,45 +0,0 @@ ---幻魔の殉教者 -function c93224848.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c93224848.condition) - e1:SetCost(c93224848.cost) - e1:SetTarget(c93224848.target) - e1:SetOperation(c93224848.activate) - c:RegisterEffect(e1) -end -function c93224848.filter(c) - local code=c:GetCode() - return c:IsFaceup() and (code==6007213 or code==32491822) -end -function c93224848.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)>=2 - and Duel.IsExistingMatchingCard(c93224848.filter,tp,LOCATION_ONFIELD,0,1,nil) -end -function c93224848.cfilter(c) - return not c:IsAbleToGraveAsCost() -end -function c93224848.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return not Duel.IsExistingMatchingCard(c93224848.cfilter,tp,LOCATION_HAND,0,1,nil) end - local g=Duel.GetFieldGroup(tp,LOCATION_HAND,0) - Duel.SendtoGrave(g,REASON_COST) -end -function c93224848.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>2 - and Duel.IsPlayerCanSpecialSummonMonster(tp,93224849,0,0x4011,0,0,1,RACE_FIEND,ATTRIBUTE_DARK) end - Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,3,0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,3,0,0) -end -function c93224848.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)>2 - and Duel.IsPlayerCanSpecialSummonMonster(tp,93224849,0,0x4011,0,0,1,RACE_FIEND,ATTRIBUTE_DARK) then - for i=1,3 do - local token=Duel.CreateToken(tp,93224849) - Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP_ATTACK) - end - Duel.SpecialSummonComplete() - end -end diff --git a/script/c93238626.lua b/script/c93238626.lua deleted file mode 100644 index 490238aa0f..0000000000 --- a/script/c93238626.lua +++ /dev/null @@ -1,99 +0,0 @@ ---ドン・サウザンドの玉座 -function c93238626.initial_effect(c) - c:SetUniqueOnField(1,0,93238626) - --activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_END_PHASE) - c:RegisterEffect(e1) - --recover - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(93238626,0)) - e2:SetCategory(CATEGORY_RECOVER) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_PHASE+PHASE_END) - e2:SetRange(LOCATION_SZONE) - e2:SetCountLimit(1) - e2:SetCondition(c93238626.reccon) - e2:SetTarget(c93238626.rectg) - e2:SetOperation(c93238626.recop) - c:RegisterEffect(e2) - -- - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(93238626,1)) - e3:SetType(EFFECT_TYPE_QUICK_O) - e3:SetRange(LOCATION_SZONE) - e3:SetCode(EVENT_BE_BATTLE_TARGET) - e3:SetCondition(c93238626.spcon) - e3:SetCost(c93238626.spcost) - e3:SetTarget(c93238626.sptg) - e3:SetOperation(c93238626.spop) - c:RegisterEffect(e3) - if not c93238626.global_check then - c93238626.global_check=true - local ge1=Effect.CreateEffect(c) - ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - ge1:SetCode(EVENT_BATTLE_DAMAGE) - ge1:SetOperation(c93238626.checkop) - Duel.RegisterEffect(ge1,0) - end -end -function c93238626.checkop(e,tp,eg,ep,ev,re,r,rp) - Duel.RegisterFlagEffect(ep,93238626,RESET_PHASE+PHASE_END,0,1) -end -function c93238626.reccon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp -end -function c93238626.rectg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local ct=Duel.GetFlagEffect(tp,93238626) - Duel.SetTargetPlayer(tp) - Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,ct*500) -end -function c93238626.recop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) - local ct=Duel.GetFlagEffect(tp,93238626) - Duel.Recover(p,ct*500,REASON_EFFECT) -end -function c93238626.spcon(e,tp,eg,ep,ev,re,r,rp) - local at=Duel.GetAttackTarget() - return at:IsFaceup() and at:IsControler(tp) and at:IsSetCard(0x48) and not at:IsSetCard(0x1048) -end -function c93238626.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end -function c93238626.filter(c,e,tp,mc,no) - return c.xyz_number==no and c:IsSetCard(0x1048) and mc:IsCanBeXyzMaterial(c) - and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) -end -function c93238626.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local at=Duel.GetAttackTarget() - local m=_G["c"..at:GetCode()] - return m and m.xyz_number and Duel.IsExistingMatchingCard(c93238626.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp,at,m.xyz_number) - end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function c93238626.spop(e,tp,eg,ep,ev,re,r,rp) - if not Duel.NegateAttack() then return end - if Duel.GetLocationCount(tp,LOCATION_MZONE)<0 then return end - local tc=Duel.GetAttackTarget() - local m=_G["c"..tc:GetCode()] - if tc:IsFacedown() or not tc:IsRelateToBattle() or tc:IsControler(1-tp) or tc:IsImmuneToEffect(e) or not m then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c93238626.filter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc,m.xyz_number) - local sc=g:GetFirst() - if sc then - local mg=tc:GetOverlayGroup() - if mg:GetCount()~=0 then - Duel.Overlay(sc,mg) - end - sc:SetMaterial(Group.FromCards(tc)) - Duel.Overlay(sc,Group.FromCards(tc)) - Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP) - sc:CompleteProcedure() - end -end diff --git a/script/c93260132.lua b/script/c93260132.lua deleted file mode 100644 index 5540db3380..0000000000 --- a/script/c93260132.lua +++ /dev/null @@ -1,25 +0,0 @@ ---魔法効果の矢 -function c93260132.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c93260132.target) - e1:SetOperation(c93260132.activate) - c:RegisterEffect(e1) -end -function c93260132.filter(c) - return c:IsFaceup() and c:IsType(TYPE_SPELL) and c:IsDestructable() -end -function c93260132.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c93260132.filter,tp,0,LOCATION_ONFIELD,1,nil) end - local sg=Duel.GetMatchingGroup(c93260132.filter,tp,0,LOCATION_ONFIELD,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,sg:GetCount(),0,0) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,sg:GetCount()*500) -end -function c93260132.activate(e,tp,eg,ep,ev,re,r,rp) - local sg=Duel.GetMatchingGroup(c93260132.filter,tp,0,LOCATION_ONFIELD,nil) - local ct=Duel.Destroy(sg,REASON_EFFECT) - Duel.Damage(1-tp,ct*500,REASON_EFFECT) -end diff --git a/script/c9327502.lua b/script/c9327502.lua deleted file mode 100644 index f4cf9a9bfd..0000000000 --- a/script/c9327502.lua +++ /dev/null @@ -1,32 +0,0 @@ ---E・HERO ボルテック -function c9327502.initial_effect(c) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_BATTLE_DAMAGE) - e1:SetCondition(c9327502.condition) - e1:SetTarget(c9327502.target) - e1:SetOperation(c9327502.operation) - c:RegisterEffect(e1) -end -function c9327502.condition(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp -end -function c9327502.filter(c,e,tp) - return c:IsFaceup() and c:IsSetCard(0x3008) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c9327502.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and c9327502.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c9327502.filter,tp,LOCATION_REMOVED,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c9327502.filter,tp,LOCATION_REMOVED,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,g:GetCount(),0,0) -end -function c9327502.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c93294869.lua b/script/c93294869.lua deleted file mode 100644 index 3a5d15c50e..0000000000 --- a/script/c93294869.lua +++ /dev/null @@ -1,52 +0,0 @@ ---傷炎星-ウルブショウ -function c93294869.initial_effect(c) - --set - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(93294869,0)) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_FLIP) - e1:SetTarget(c93294869.settg) - e1:SetOperation(c93294869.setop) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - e2:SetOperation(c93294869.flipop) - c:RegisterEffect(e2) -end -function c93294869.filter1(c) - return c:IsSetCard(0x7c) and c:IsType(TYPE_TRAP) and c:IsSSetable() -end -function c93294869.filter2(c) - return c:IsSetCard(0x7c) and c:IsType(TYPE_SPELL) and c:IsSSetable() -end -function c93294869.settg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingMatchingCard(c93294869.filter1,tp,LOCATION_DECK,0,1,nil) end - if e:GetHandler():GetFlagEffect(93294869)~=0 then - e:SetLabel(1) - e:GetHandler():ResetFlagEffect(93294869) - else - e:SetLabel(0) - end -end -function c93294869.setop(e,tp,eg,ep,ev,re,r,rp) - local ft=Duel.GetLocationCount(tp,LOCATION_SZONE) - if ft<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) - local g=Duel.SelectMatchingCard(tp,c93294869.filter1,tp,LOCATION_DECK,0,1,1,nil) - local sg=Duel.GetMatchingGroup(c93294869.filter2,tp,LOCATION_DECK,0,nil) - if e:GetLabel()==1 and sg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(93294869,1)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) - g:AddCard(sg:Select(tp,1,1,nil):GetFirst()) - end - if g:GetCount()>0 then - Duel.SSet(tp,g) - Duel.ConfirmCards(1-tp,g) - end -end -function c93294869.flipop(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():RegisterFlagEffect(93294869,0,0,0) -end diff --git a/script/c93298460.lua b/script/c93298460.lua deleted file mode 100644 index 62adf7c06f..0000000000 --- a/script/c93298460.lua +++ /dev/null @@ -1,39 +0,0 @@ ---魔装戦士 ヴァンドラ -function c93298460.initial_effect(c) - --direct attack - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DIRECT_ATTACK) - c:RegisterEffect(e1) - --tohand - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(93298460,0)) - e2:SetCategory(CATEGORY_TOHAND) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetCondition(c93298460.condition) - e2:SetTarget(c93298460.target) - e2:SetOperation(c93298460.operation) - c:RegisterEffect(e2) -end -function c93298460.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) -end -function c93298460.filter(c) - return c:IsType(TYPE_NORMAL) and c:IsRace(RACE_DRAGON+RACE_WARRIOR+RACE_SPELLCASTER) and c:IsAbleToHand() -end -function c93298460.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c93298460.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c93298460.filter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c93298460.filter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c93298460.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end diff --git a/script/c93332803.lua b/script/c93332803.lua deleted file mode 100644 index 847d5f010e..0000000000 --- a/script/c93332803.lua +++ /dev/null @@ -1,72 +0,0 @@ ---Dogoran, the Mad Flame Kaiju -function c93332803.initial_effect(c) - c:SetUniqueOnField(1,0,20000000) - --special summon rule - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetRange(LOCATION_HAND) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_SPSUM_PARAM) - e1:SetTargetRange(POS_FACEUP_ATTACK,1) - e1:SetCondition(c93332803.spcon) - e1:SetOperation(c93332803.spop) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_SPSUMMON_PROC) - e2:SetRange(LOCATION_HAND) - e2:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_SPSUM_PARAM) - e2:SetTargetRange(POS_FACEUP_ATTACK,0) - e2:SetCondition(c93332803.spcon2) - c:RegisterEffect(e2) - --destroy - local e3=Effect.CreateEffect(c) - e3:SetCategory(CATEGORY_DESTROY) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1) - e3:SetCost(c93332803.descost) - e3:SetTarget(c93332803.destg) - e3:SetOperation(c93332803.desop) - c:RegisterEffect(e3) -end -function c93332803.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0xd3) -end -function c93332803.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.GetLocationCount(1-tp,LOCATION_MZONE)>-1 - and Duel.IsExistingMatchingCard(Card.IsReleasable,tp,0,LOCATION_MZONE,1,nil) -end -function c93332803.spop(e,tp,eg,ep,ev,re,r,rp,c) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) - local g=Duel.SelectMatchingCard(tp,Card.IsReleasable,tp,0,LOCATION_MZONE,1,1,nil) - Duel.Release(g,REASON_COST) -end -function c93332803.spcon2(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c93332803.cfilter,tp,0,LOCATION_MZONE,1,nil) -end -function c93332803.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsCanRemoveCounter(tp,1,1,0x37,3,REASON_COST) - and e:GetHandler():GetAttackAnnouncedCount()==0 end - Duel.RemoveCounter(tp,1,1,0x37,3,REASON_COST) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_OATH) - e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - e:GetHandler():RegisterEffect(e1) -end -function c93332803.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDestructable,tp,0,LOCATION_MZONE,1,nil) end - local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,0,LOCATION_MZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c93332803.desop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,0,LOCATION_MZONE,nil) - Duel.Destroy(g,REASON_EFFECT) -end diff --git a/script/c93353691.lua b/script/c93353691.lua deleted file mode 100644 index 7461e73509..0000000000 --- a/script/c93353691.lua +++ /dev/null @@ -1,40 +0,0 @@ ---不退の荒武者 -function c93353691.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsRace,RACE_WARRIOR),aux.NonTuner(Card.IsRace,RACE_WARRIOR),1) - c:EnableReviveLimit() - --indes - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e1:SetValue(c93353691.indes) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_BATTLED) - e2:SetCondition(c93353691.descon) - e2:SetTarget(c93353691.destg) - e2:SetOperation(c93353691.desop) - c:RegisterEffect(e2) -end -function c93353691.indes(e,c) - local ec=e:GetHandler() - return ec==Duel.GetAttackTarget() and c:GetAttack()>ec:GetAttack() -end -function c93353691.descon(e,tp,eg,ep,ev,re,r,rp) - return ev==1 and Duel.GetAttacker():IsRelateToBattle() - and Duel.GetAttacker():GetAttack()>e:GetHandler():GetAttack() -end -function c93353691.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,Duel.GetAttacker(),1,0,0) -end -function c93353691.desop(e,tp,eg,ep,ev,re,r,rp) - local a=Duel.GetAttacker() - if a:IsRelateToBattle() then - Duel.Destroy(a,REASON_EFFECT) - end -end diff --git a/script/c93368494.lua b/script/c93368494.lua deleted file mode 100644 index b648f99a35..0000000000 --- a/script/c93368494.lua +++ /dev/null @@ -1,109 +0,0 @@ ---魔妖仙獣 大刃禍是 -function c93368494.initial_effect(c) - --pendulum summon - aux.AddPendulumProcedure(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --atk - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(93368494,0)) - e2:SetCategory(CATEGORY_ATKCHANGE) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_ATTACK_ANNOUNCE) - e2:SetRange(LOCATION_PZONE) - e2:SetCondition(c93368494.atkcon) - e2:SetOperation(c93368494.atkop) - c:RegisterEffect(e2) - --spsummon limit - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e3:SetCode(EFFECT_SPSUMMON_CONDITION) - e3:SetValue(aux.penlimit) - c:RegisterEffect(e3) - --cannot disable - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetCode(EFFECT_CANNOT_DISABLE_SPSUMMON) - e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - c:RegisterEffect(e4) - --tohand - local e5=Effect.CreateEffect(c) - e5:SetDescription(aux.Stringid(93368494,1)) - e5:SetCategory(CATEGORY_TOHAND) - e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e5:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e5:SetCode(EVENT_SUMMON_SUCCESS) - e5:SetTarget(c93368494.thtg) - e5:SetOperation(c93368494.thop) - c:RegisterEffect(e5) - local e6=e5:Clone() - e6:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e6) - --return - local e7=Effect.CreateEffect(c) - e7:SetDescription(aux.Stringid(93368494,2)) - e7:SetCategory(CATEGORY_TOHAND) - e7:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e7:SetRange(LOCATION_MZONE) - e7:SetCountLimit(1) - e7:SetCode(EVENT_PHASE+PHASE_END) - e7:SetCondition(c93368494.retcon) - e7:SetTarget(c93368494.rettg) - e7:SetOperation(c93368494.retop) - c:RegisterEffect(e7) - if not c93368494.global_check then - c93368494.global_check=true - local ge1=Effect.CreateEffect(c) - ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - ge1:SetCode(EVENT_SPSUMMON_SUCCESS) - ge1:SetLabel(93368494) - ge1:SetOperation(aux.sumreg) - Duel.RegisterEffect(ge1,0) - end -end -function c93368494.atkcon(e,tp,eg,ep,ev,re,r,rp) - local at=Duel.GetAttacker() - return at:IsControler(tp) and at:IsSetCard(0xb3) -end -function c93368494.atkop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local at=Duel.GetAttacker() - if at:IsFaceup() and at:IsRelateToBattle() then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(300) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_BATTLE) - at:RegisterEffect(e1) - end -end -function c93368494.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsAbleToHand() end - if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g=Duel.SelectTarget(tp,Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,2,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0) -end -function c93368494.thop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - end -end -function c93368494.retcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetFlagEffect(93368494)~=0 -end -function c93368494.rettg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0) -end -function c93368494.retop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SendtoHand(c,nil,REASON_EFFECT) - end -end diff --git a/script/c93369354.lua b/script/c93369354.lua deleted file mode 100644 index 4117183d57..0000000000 --- a/script/c93369354.lua +++ /dev/null @@ -1,63 +0,0 @@ ---フィッシュボーグ-ガンナー -function c93369354.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(93369354,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_GRAVE) - e1:SetCondition(c93369354.spcon) - e1:SetCost(c93369354.spcost) - e1:SetTarget(c93369354.sptg) - e1:SetOperation(c93369354.spop) - c:RegisterEffect(e1) - --synchro custom - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_SYNCHRO_MATERIAL_CUSTOM) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e2:SetTarget(c93369354.syntg) - e2:SetValue(1) - e2:SetOperation(c93369354.synop) - c:RegisterEffect(e2) -end -function c93369354.filter(c) - return c:IsLevelBelow(3) and c:IsFaceup() and c:IsAttribute(ATTRIBUTE_WATER) -end -function c93369354.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c93369354.filter,tp,LOCATION_MZONE,0,1,nil) -end -function c93369354.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) -end -function c93369354.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0) -end -function c93369354.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) then return end - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) -end -c93369354.tuner_filter=aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_WATER) -function c93369354.synfilter(c,syncard,tuner,f) - return c:IsFaceup() and c:IsNotTuner() and c:IsCanBeSynchroMaterial(syncard,tuner) and c:IsAttribute(ATTRIBUTE_WATER) and (f==nil or f(c)) -end -function c93369354.syntg(e,syncard,f,minc,maxc) - local c=e:GetHandler() - local lv=syncard:GetLevel()-c:GetLevel() - if lv<=0 then return false end - local g=Duel.GetMatchingGroup(c93369354.synfilter,syncard:GetControler(),LOCATION_MZONE,LOCATION_MZONE,c,syncard,c,f) - return g:CheckWithSumEqual(Card.GetSynchroLevel,lv,minc,maxc,syncard) -end -function c93369354.synop(e,tp,eg,ep,ev,re,r,rp,syncard,f,minc,maxc) - local c=e:GetHandler() - local lv=syncard:GetLevel()-c:GetLevel() - local g=Duel.GetMatchingGroup(c93369354.synfilter,syncard:GetControler(),LOCATION_MZONE,LOCATION_MZONE,c,syncard,c,f) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SMATERIAL) - local sg=g:SelectWithSumEqual(tp,Card.GetSynchroLevel,lv,minc,maxc,syncard) - Duel.SetSynchroMaterial(sg) -end diff --git a/script/c93379652.lua b/script/c93379652.lua deleted file mode 100644 index 7f7e980910..0000000000 --- a/script/c93379652.lua +++ /dev/null @@ -1,53 +0,0 @@ ---ジェムナイト・プリズムオーラ -function c93379652.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcFun2(c,aux.FilterBoolFunction(Card.IsSetCard,0x1047),aux.FilterBoolFunction(Card.IsRace,RACE_THUNDER),true) - --spsummon condition - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e2:SetCode(EFFECT_SPSUMMON_CONDITION) - e2:SetValue(c93379652.splimit) - c:RegisterEffect(e2) - --destroy - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(93379652,0)) - e3:SetCategory(CATEGORY_DESTROY) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1) - e3:SetCost(c93379652.cost) - e3:SetTarget(c93379652.target) - e3:SetOperation(c93379652.operation) - c:RegisterEffect(e3) -end -function c93379652.splimit(e,se,sp,st) - return not e:GetHandler():IsLocation(LOCATION_EXTRA) or bit.band(st,SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION -end -function c93379652.costfilter(c) - return c:IsSetCard(0x1047) and c:IsAbleToGraveAsCost() -end -function c93379652.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c93379652.costfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c93379652.costfilter,tp,LOCATION_HAND,0,1,1,nil) - Duel.SendtoGrave(g,REASON_COST) -end -function c93379652.filter(c) - return c:IsFaceup() and c:IsDestructable() -end -function c93379652.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and c93379652.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c93379652.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c93379652.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c93379652.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c93382620.lua b/script/c93382620.lua deleted file mode 100644 index 1cef77ed71..0000000000 --- a/script/c93382620.lua +++ /dev/null @@ -1,44 +0,0 @@ ---命の綱 -function c93382620.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetCost(c93382620.cost) - e1:SetTarget(c93382620.target) - e1:SetOperation(c93382620.activate) - c:RegisterEffect(e1) -end -function c93382620.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local g=Duel.GetFieldGroup(tp,LOCATION_HAND,0) - g:RemoveCard(e:GetHandler()) - return g:GetCount()>0 and g:FilterCount(Card.IsDiscardable,nil)==g:GetCount() - end - local g=Duel.GetFieldGroup(tp,LOCATION_HAND,0) - Duel.SendtoGrave(g,REASON_COST+REASON_DISCARD) -end -function c93382620.filter(c,e,tp) - return c:IsLocation(LOCATION_GRAVE) and c:GetPreviousControler()==tp and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c93382620.target(e,tp,eg,ep,ev,re,r,rp,chk) - local tc=eg:GetFirst() - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and eg:IsExists(c93382620.filter,1,nil,e,tp) end - local g=eg:Filter(c93382620.filter,nil,e,tp) - Duel.SetTargetCard(g) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c93382620.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(800) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - Duel.SpecialSummonComplete() - end -end diff --git a/script/c93396832.lua b/script/c93396832.lua deleted file mode 100644 index 7446ec9743..0000000000 --- a/script/c93396832.lua +++ /dev/null @@ -1,29 +0,0 @@ ---角笛砕き -function c93396832.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_CHAINING) - e1:SetCondition(c93396832.condition) - e1:SetTarget(c93396832.target) - e1:SetOperation(c93396832.activate) - c:RegisterEffect(e1) -end -function c93396832.condition(e,tp,eg,ep,ev,re,r,rp) - return (re:IsActiveType(TYPE_MONSTER) or (re:IsActiveType(TYPE_TRAP) and re:IsHasType(EFFECT_TYPE_ACTIVATE))) - and re:IsHasCategory(CATEGORY_DISABLE_SUMMON) and Duel.IsChainNegatable(ev) -end -function c93396832.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) - end -end -function c93396832.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateActivation(ev) - if re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(eg,REASON_EFFECT) - end -end diff --git a/script/c9342162.lua b/script/c9342162.lua deleted file mode 100644 index 8baa2dc837..0000000000 --- a/script/c9342162.lua +++ /dev/null @@ -1,69 +0,0 @@ ---彼岸の悪鬼 ハロウハウンド -function c9342162.initial_effect(c) - --self destroy - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_SELF_DESTROY) - e1:SetCondition(c9342162.sdcon) - c:RegisterEffect(e1) - --Special Summon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(9342162,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_HAND) - e2:SetCountLimit(1,9342162) - e2:SetCondition(c9342162.sscon) - e2:SetTarget(c9342162.sstg) - e2:SetOperation(c9342162.ssop) - c:RegisterEffect(e2) - --to grave - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(9342162,1)) - e3:SetCategory(CATEGORY_TOGRAVE) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_TO_GRAVE) - e3:SetProperty(EFFECT_FLAG_DELAY) - e3:SetCountLimit(1,9342162) - e3:SetTarget(c9342162.tgtg) - e3:SetOperation(c9342162.tgop) - c:RegisterEffect(e3) -end -function c9342162.sdfilter(c) - return not c:IsFaceup() or not c:IsSetCard(0xb1) -end -function c9342162.sdcon(e) - return Duel.IsExistingMatchingCard(c9342162.sdfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) -end -function c9342162.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) -end -function c9342162.sscon(e,tp,eg,ep,ev,re,r,rp) - return not Duel.IsExistingMatchingCard(c9342162.filter,tp,LOCATION_ONFIELD,0,1,nil) -end -function c9342162.sstg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c9342162.ssop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP) - end -end -function c9342162.tgfilter(c) - return c:IsSetCard(0xb1) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToGrave() -end -function c9342162.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c9342162.tgfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) -end -function c9342162.tgop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c9342162.tgfilter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoGrave(g,REASON_EFFECT) - end -end diff --git a/script/c93431518.lua b/script/c93431518.lua deleted file mode 100644 index 62903cf7f5..0000000000 --- a/script/c93431518.lua +++ /dev/null @@ -1,57 +0,0 @@ ---暗黒界に続く結界通路 -function c93431518.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_END_PHASE) - e1:SetCost(c93431518.cost) - e1:SetTarget(c93431518.target) - e1:SetOperation(c93431518.activate) - c:RegisterEffect(e1) -end -function c93431518.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_SUMMON)==0 - and Duel.GetActivityCount(tp,ACTIVITY_FLIPSUMMON)==0 and Duel.GetActivityCount(tp,ACTIVITY_SPSUMMON)==0 end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) - e1:SetTargetRange(1,0) - e1:SetTarget(c93431518.sumlimit) - Duel.RegisterEffect(e1,tp) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) - e2:SetCode(EFFECT_CANNOT_SUMMON) - e2:SetReset(RESET_PHASE+PHASE_END) - e2:SetTargetRange(1,0) - Duel.RegisterEffect(e2,tp) - local e3=e2:Clone() - e3:SetCode(EFFECT_CANNOT_FLIP_SUMMON) - Duel.RegisterEffect(e3,tp) -end -function c93431518.sumlimit(e,c,sump,sumtype,sumpos,targetp,se) - return e:GetHandler()~=se:GetHandler() -end -function c93431518.filter(c,e,tp) - return c:IsSetCard(0x6) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c93431518.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:GetLocation()==LOCATION_GRAVE and chkc:GetControler()==tp and c93431518.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c93431518.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c93431518.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c93431518.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c93431862.lua b/script/c93431862.lua deleted file mode 100644 index 3276309f01..0000000000 --- a/script/c93431862.lua +++ /dev/null @@ -1,33 +0,0 @@ ---D-HERO ダンクガイ -function c93431862.initial_effect(c) - --damage - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(93431862,0)) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c93431862.damcost) - e1:SetTarget(c93431862.damtg) - e1:SetOperation(c93431862.damop) - c:RegisterEffect(e1) -end -function c93431862.cfilter(c) - return c:IsSetCard(0xc008) and c:IsAbleToGraveAsCost() -end -function c93431862.damcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c93431862.cfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c93431862.cfilter,tp,LOCATION_HAND,0,1,1,nil) - Duel.SendtoGrave(g,REASON_COST) -end -function c93431862.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(500) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,500) -end -function c93431862.damop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c93445074.lua b/script/c93445074.lua deleted file mode 100644 index a3fedd33e5..0000000000 --- a/script/c93445074.lua +++ /dev/null @@ -1,79 +0,0 @@ ---グレイドル・アリゲーター -function c93445074.initial_effect(c) - --equip - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCondition(c93445074.eqcon) - e1:SetTarget(c93445074.eqtg) - e1:SetOperation(c93445074.eqop) - c:RegisterEffect(e1) -end -function c93445074.eqcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return (c:IsReason(REASON_BATTLE) or (c:IsReason(REASON_EFFECT) and re:IsActiveType(TYPE_TRAP))) - and c:IsReason(REASON_DESTROY) and c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_MZONE) -end -function c93445074.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsFaceup() end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil) -end -function c93445074.eqlimit(e,c) - return c==e:GetLabelObject() -end -function c93445074.eqop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsRelateToEffect(e) and tc:IsControler(1-tp) then - Duel.Equip(tp,c,tc,true) - --Add Equip limit - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(c93445074.eqlimit) - e1:SetLabelObject(tc) - c:RegisterEffect(e1) - --control - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_SET_CONTROL) - e2:SetValue(tp) - e2:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e2) - --Destroy - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e3:SetCode(EVENT_LEAVE_FIELD_P) - e3:SetOperation(c93445074.checkop) - e3:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e3) - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE) - e4:SetCode(EVENT_LEAVE_FIELD) - e4:SetOperation(c93445074.desop) - e4:SetReset(RESET_EVENT+0x17e0000) - e4:SetLabelObject(e3) - c:RegisterEffect(e4) - end -end -function c93445074.checkop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsDisabled() then - e:SetLabel(1) - else e:SetLabel(0) end -end -function c93445074.desop(e,tp,eg,ep,ev,re,r,rp) - if e:GetLabelObject():GetLabel()~=0 then return end - local tc=e:GetHandler():GetEquipTarget() - if tc and tc:IsLocation(LOCATION_MZONE) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c93451636.lua b/script/c93451636.lua deleted file mode 100644 index 234dac1c91..0000000000 --- a/script/c93451636.lua +++ /dev/null @@ -1,32 +0,0 @@ ---ゼンマイハニー -function c93451636.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(93451636,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetCondition(c93451636.condition) - e1:SetTarget(c93451636.target) - e1:SetOperation(c93451636.operation) - c:RegisterEffect(e1) -end -function c93451636.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) -end -function c93451636.filter(c,e,tp) - return c:IsLevelBelow(4) and c:IsSetCard(0x58) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c93451636.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c93451636.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c93451636.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c93451636.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c93469007.lua b/script/c93469007.lua deleted file mode 100644 index d1eab91753..0000000000 --- a/script/c93469007.lua +++ /dev/null @@ -1,34 +0,0 @@ ---バスター・バースト -function c93469007.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c93469007.cost) - e1:SetTarget(c93469007.target) - e1:SetOperation(c93469007.activate) - c:RegisterEffect(e1) -end -function c93469007.cost(e,tp,eg,ep,ev,re,r,rp,chk) - e:SetLabel(1) - if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsSetCard,1,nil,0x104f) end - local g=Duel.SelectReleaseGroup(tp,Card.IsSetCard,1,1,nil,0x104f) - e:SetLabel(g:GetFirst():GetLevel()*200) - Duel.Release(g,REASON_COST) -end -function c93469007.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local res=e:GetLabel()~=0 - e:SetLabel(0) - return res - end - Duel.SetTargetParam(e:GetLabel()) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,PLAYER_ALL,e:GetLabel()) - e:SetLabel(0) -end -function c93469007.activate(e,tp,eg,ep,ev,re,r,rp) - local d=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM) - Duel.Damage(1-tp,d,REASON_EFFECT) - Duel.Damage(tp,d,REASON_EFFECT) -end diff --git a/script/c93483212.lua b/script/c93483212.lua deleted file mode 100644 index 4846982f02..0000000000 --- a/script/c93483212.lua +++ /dev/null @@ -1,106 +0,0 @@ ---極神聖帝オーディン -function c93483212.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,c93483212.tfilter,aux.NonTuner(nil),2) - c:EnableReviveLimit() - --disable - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(93483212,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetOperation(c93483212.imop) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetOperation(c93483212.regop) - c:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(93483212,1)) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_PHASE+PHASE_END) - e3:SetRange(LOCATION_GRAVE) - e3:SetCountLimit(1) - e3:SetCondition(c93483212.spcon) - e3:SetCost(c93483212.spcost) - e3:SetTarget(c93483212.sptg) - e3:SetOperation(c93483212.spop) - c:RegisterEffect(e3) - --damage - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(93483212,2)) - e4:SetCategory(CATEGORY_DRAW) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e4:SetCode(EVENT_SPSUMMON_SUCCESS) - e4:SetCondition(c93483212.drcon) - e4:SetTarget(c93483212.drtg) - e4:SetOperation(c93483212.drop) - c:RegisterEffect(e4) -end -function c93483212.tfilter(c) - return c:IsSetCard(0x3042) or c:IsCode(61777313) -end -function c93483212.imop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFaceup() and c:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_IMMUNE_EFFECT) - e1:SetValue(c93483212.imfilter) - e1:SetReset(RESET_EVENT+0x1ff0000+RESET_PHASE+PHASE_END) - c:RegisterEffect(e1) - end -end -function c93483212.imfilter(e,re) - return re:IsActiveType(TYPE_SPELL+TYPE_TRAP) -end -function c93483212.regop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local pos=c:GetPreviousPosition() - if c:IsReason(REASON_BATTLE) then pos=c:GetBattlePosition() end - if rp~=tp and c:GetPreviousControler()==tp and c:IsReason(REASON_DESTROY) - and c:IsPreviousLocation(LOCATION_ONFIELD) and bit.band(pos,POS_FACEUP)~=0 then - c:RegisterFlagEffect(93483212,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) - end -end -function c93483212.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetFlagEffect(93483212)~=0 -end -function c93483212.cfilter(c) - return c:IsSetCard(0x3042) and c:IsType(TYPE_TUNER) and c:IsAbleToRemoveAsCost() -end -function c93483212.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c93483212.cfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c93483212.cfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c93483212.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,1,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c93483212.spop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - Duel.SpecialSummon(e:GetHandler(),1,tp,tp,false,false,POS_FACEUP) - end -end -function c93483212.drcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+1 -end -function c93483212.drtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(1) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c93483212.drop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end diff --git a/script/c9348522.lua b/script/c9348522.lua deleted file mode 100644 index 867aa7d990..0000000000 --- a/script/c9348522.lua +++ /dev/null @@ -1,66 +0,0 @@ ---浮鵺城 -function c9348522.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1) - c:EnableReviveLimit() - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(9348522,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(c9348522.spcon) - e1:SetTarget(c9348522.sptg) - e1:SetOperation(c9348522.spop) - c:RegisterEffect(e1) - --cannot attack - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_CANNOT_ATTACK) - e2:SetRange(LOCATION_MZONE) - e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e2:SetTarget(c9348522.limtg) - c:RegisterEffect(e2) - if not c9348522.global_check then - c9348522.global_check=true - local ge1=Effect.CreateEffect(c) - ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - ge1:SetCode(EVENT_SUMMON_SUCCESS) - ge1:SetOperation(c9348522.checkop) - Duel.RegisterEffect(ge1,0) - local ge2=ge1:Clone() - ge2:SetCode(EVENT_SPSUMMON_SUCCESS) - Duel.RegisterEffect(ge2,0) - end -end -function c9348522.checkop(e,tp,eg,ep,ev,re,r,rp) - local tc=eg:GetFirst() - while tc do - tc:RegisterFlagEffect(9348522,RESET_EVENT+0x1ec0000+RESET_PHASE+PHASE_END,0,1) - tc=eg:GetNext() - end -end -function c9348522.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_SYNCHRO -end -function c9348522.spfilter(c,e,tp) - return c:GetLevel()==9 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c9348522.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c9348522.spfilter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c9348522.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c9348522.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c9348522.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end -function c9348522.limtg(e,c) - return c:IsLevelBelow(8) and c:GetFlagEffect(9348522)~=0 -end diff --git a/script/c93504463.lua b/script/c93504463.lua deleted file mode 100644 index 907a6e1a7b..0000000000 --- a/script/c93504463.lua +++ /dev/null @@ -1,37 +0,0 @@ ---進化への懸け橋 -function c93504463.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_BE_BATTLE_TARGET) - e1:SetCondition(c93504463.condition) - e1:SetTarget(c93504463.target) - e1:SetOperation(c93504463.activate) - c:RegisterEffect(e1) -end -function c93504463.condition(e,tp,eg,ep,ev,re,r,rp) - local d=Duel.GetAttackTarget() - return d and d:IsControler(tp) -end -function c93504463.spfilter(c,e,tp) - return c:IsSetCard(0x304e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c93504463.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c93504463.spfilter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c93504463.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c93504463.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c93504463.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)~=0 then - local a=Duel.GetAttacker() - if a:IsAttackable() and not a:IsImmuneToEffect(e) then - Duel.CalculateDamage(a,tc) - end - end -end diff --git a/script/c93506862.lua b/script/c93506862.lua deleted file mode 100644 index 782ac7c9c5..0000000000 --- a/script/c93506862.lua +++ /dev/null @@ -1,59 +0,0 @@ ---リチュア・ヴァニティ -function c93506862.initial_effect(c) - --act limit - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(93506862,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND) - e1:SetCost(c93506862.cost) - e1:SetOperation(c93506862.operation) - c:RegisterEffect(e1) -end -function c93506862.cost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsDiscardable() end - Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD) -end -function c93506862.operation(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_CHAINING) - e1:SetOperation(c93506862.chainop) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetOperation(c93506862.sucop) - e2:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e2,tp) - local e3=Effect.CreateEffect(e:GetHandler()) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e3:SetCode(EVENT_CHAIN_END) - e3:SetOperation(c93506862.cedop) - e3:SetReset(RESET_PHASE+PHASE_END) - e3:SetLabelObject(e2) - Duel.RegisterEffect(e3,tp) -end -function c93506862.chainop(e,tp,eg,ep,ev,re,r,rp) - local rc=re:GetHandler() - if re:IsHasType(EFFECT_TYPE_ACTIVATE) and rc:IsSetCard(0x3a) and rc:IsType(TYPE_RITUAL) then - Duel.SetChainLimit(c93506862.chainlm) - end -end -function c93506862.chainlm(e,rp,tp) - return tp==rp -end -function c93506862.sucfilter(c) - return c:IsSetCard(0x3a) and c:IsType(TYPE_RITUAL) and bit.band(c:GetSummonType(),SUMMON_TYPE_RITUAL)==SUMMON_TYPE_RITUAL -end -function c93506862.sucop(e,tp,eg,ep,ev,re,r,rp) - if eg:IsExists(c93506862.sucfilter,1,nil) then - e:SetLabel(1) - else e:SetLabel(0) end -end -function c93506862.cedop(e,tp,eg,ep,ev,re,r,rp) - if Duel.CheckEvent(EVENT_SPSUMMON_SUCCESS) and e:GetLabelObject():GetLabel()==1 then - Duel.SetChainLimitTillChainEnd(c93506862.chainlm) - end -end diff --git a/script/c93542102.lua b/script/c93542102.lua deleted file mode 100644 index 5ca2d16fa9..0000000000 --- a/script/c93542102.lua +++ /dev/null @@ -1,62 +0,0 @@ ---D・モバホン -function c93542102.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(93542102,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c93542102.cona) - e1:SetTarget(c93542102.tga) - e1:SetOperation(c93542102.opa) - c:RegisterEffect(e1) - --confirm - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(93542102,1)) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetCountLimit(1) - e2:SetRange(LOCATION_MZONE) - e2:SetCondition(c93542102.cond) - e2:SetTarget(c93542102.tgd) - e2:SetOperation(c93542102.opd) - c:RegisterEffect(e2) -end -function c93542102.cona(e,tp,eg,ep,ev,re,r,rp) - return not e:GetHandler():IsDisabled() and e:GetHandler():IsAttackPos() -end -function c93542102.cond(e,tp,eg,ep,ev,re,r,rp) - return not e:GetHandler():IsDisabled() and e:GetHandler():IsDefencePos() -end -function c93542102.cfilter(c) - return c:IsLevelBelow(4) and c:IsSetCard(0x26) and c:IsType(TYPE_MONSTER) -end -function c93542102.tga(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0 - and Duel.IsExistingMatchingCard(c93542102.cfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_DICE,nil,0,tp,1) -end -function c93542102.tgd(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0 end - Duel.SetOperationInfo(0,CATEGORY_DICE,nil,0,tp,1) -end -function c93542102.filter(c,e,tp) - return c:IsLevelBelow(4) and c:IsSetCard(0x26) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) -end -function c93542102.opa(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)==0 then return end - local dc=Duel.TossDice(tp,1) - Duel.ConfirmDecktop(tp,dc) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local g=Duel.GetDecktopGroup(tp,dc) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=g:FilterSelect(tp,c93542102.filter,1,1,nil,e,tp) - Duel.SpecialSummon(sg,0,tp,tp,true,false,POS_FACEUP) - Duel.ShuffleDeck(tp) -end -function c93542102.opd(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)==0 then return end - local dc=Duel.TossDice(tp,1) - local g=Duel.GetDecktopGroup(tp,dc) - Duel.ConfirmCards(tp,g) -end diff --git a/script/c93543806.lua b/script/c93543806.lua deleted file mode 100644 index 9985b39d82..0000000000 --- a/script/c93543806.lua +++ /dev/null @@ -1,53 +0,0 @@ ---先史遺産ソル・モノリス -function c93543806.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(93543806,0)) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCost(c93543806.lvcost) - e1:SetTarget(c93543806.lvtg) - e1:SetOperation(c93543806.lvop) - c:RegisterEffect(e1) - Duel.AddCustomActivityCounter(93543806,ACTIVITY_SPSUMMON,c93543806.counterfilter) -end -function c93543806.counterfilter(c) - return c:IsSetCard(0x70) -end -function c93543806.lvcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetCustomActivityCount(93543806,tp,ACTIVITY_SPSUMMON)==0 end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) - e1:SetTargetRange(1,0) - e1:SetTarget(c93543806.splimit) - Duel.RegisterEffect(e1,tp) -end -function c93543806.splimit(e,c) - return not c:IsSetCard(0x70) -end -function c93543806.filter(c) - return c:IsFaceup() and c:IsSetCard(0x70) and c:GetLevel()~=6 -end -function c93543806.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c93543806.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c93543806.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - Duel.SelectTarget(tp,c93543806.filter,tp,LOCATION_MZONE,0,1,1,nil) -end -function c93543806.lvop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CHANGE_LEVEL) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetValue(6) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - end -end diff --git a/script/c9354555.lua b/script/c9354555.lua deleted file mode 100644 index d6296650d7..0000000000 --- a/script/c9354555.lua +++ /dev/null @@ -1,44 +0,0 @@ ---フォトン・ベール -function c9354555.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TODECK+CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c9354555.target) - e1:SetOperation(c9354555.activate) - c:RegisterEffect(e1) -end -function c9354555.filter1(c) - return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsAbleToDeck() -end -function c9354555.filter2(c) - return c:IsLevelBelow(4) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsAbleToHand() -end -function c9354555.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c9354555.filter1,tp,LOCATION_HAND,0,3,nil) - and Duel.IsExistingMatchingCard(c9354555.filter2,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,3,tp,LOCATION_HAND) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c9354555.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c9354555.filter1,tp,LOCATION_HAND,0,nil) - if g:GetCount()<3 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local dg=g:Select(tp,3,3,nil) - Duel.ConfirmCards(1-tp,dg) - Duel.SendtoDeck(dg,nil,2,REASON_EFFECT) - local sg=Duel.GetMatchingGroup(c9354555.filter2,tp,LOCATION_DECK,0,nil) - if sg:GetCount()==0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local hg=sg:Select(tp,1,1,nil) - sg:RemoveCard(hg:GetFirst()) - sg=sg:Filter(Card.IsCode,nil,hg:GetFirst():GetCode()) - if sg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(9354555,0)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local tg=sg:Select(tp,1,2,nil) - hg:Merge(tg) - end - Duel.SendtoHand(hg,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,hg) -end diff --git a/script/c93554166.lua b/script/c93554166.lua deleted file mode 100644 index 629d508f19..0000000000 --- a/script/c93554166.lua +++ /dev/null @@ -1,34 +0,0 @@ ---暗黒界の雷 -function c93554166.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c93554166.target) - e1:SetOperation(c93554166.activate) - c:RegisterEffect(e1) -end -function c93554166.filter(c) - return c:IsDestructable() and c:IsFacedown() -end -function c93554166.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and c93554166.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c93554166.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) - and Duel.GetMatchingGroupCount(aux.TRUE,tp,LOCATION_HAND,0,e:GetHandler())>0 end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c93554166.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1) -end -function c93554166.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsFacedown() and tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - if Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)>0 then - Duel.BreakEffect() - Duel.DiscardHand(tp,aux.TRUE,1,1,REASON_EFFECT+REASON_DISCARD) - end - end -end diff --git a/script/c93568288.lua b/script/c93568288.lua deleted file mode 100644 index 90e3347dba..0000000000 --- a/script/c93568288.lua +++ /dev/null @@ -1,84 +0,0 @@ ---No.80 狂装覇王ラプソディ・イン・バーサーク -function c93568288.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,4,2) - c:EnableReviveLimit() - --equip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(93568288,0)) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetTarget(c93568288.eqtg) - e1:SetOperation(c93568288.eqop) - c:RegisterEffect(e1) - --banish - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(93568288,1)) - e2:SetCategory(CATEGORY_REMOVE) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCountLimit(2,93568288) - e2:SetCost(c93568288.rmcost) - e2:SetTarget(c93568288.rmtg) - e2:SetOperation(c93568288.rmop) - c:RegisterEffect(e2) -end -c93568288.xyz_number=80 -function c93568288.filter(c) - return c:IsFaceup() and c:IsType(TYPE_XYZ) -end -function c93568288.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c93568288.filter(chkc) and chkc~=e:GetHandler() end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingTarget(c93568288.filter,tp,LOCATION_MZONE,0,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local g=Duel.SelectTarget(tp,c93568288.filter,tp,LOCATION_MZONE,0,1,1,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0) -end -function c93568288.eqop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if not c:IsRelateToEffect(e) or c:IsFacedown() then return end - if not tc:IsRelateToEffect(e) or tc:IsFacedown() then - Duel.SendtoGrave(c,REASON_EFFECT) - return - end - if not Duel.Equip(tp,c,tc,false) then return end - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_EQUIP) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(1200) - e1:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_EQUIP_LIMIT) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetValue(c93568288.eqlimit) - e2:SetReset(RESET_EVENT+0x1fe0000) - e2:SetLabelObject(tc) - c:RegisterEffect(e2) -end -function c93568288.eqlimit(e,c) - return c==e:GetLabelObject() -end -function c93568288.rmcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c93568288.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(1-tp) and chkc:IsAbleToRemove() end - if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) -end -function c93568288.rmop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) - end -end diff --git a/script/c93599951.lua b/script/c93599951.lua deleted file mode 100644 index 9ea419819f..0000000000 --- a/script/c93599951.lua +++ /dev/null @@ -1,33 +0,0 @@ ---沈黙の邪悪霊 -function c93599951.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c93599951.condition) - e1:SetTarget(c93599951.target) - e1:SetOperation(c93599951.activate) - c:RegisterEffect(e1) -end -function c93599951.condition(e,tp,eg,ep,ev,re,r,rp) - return tp~=Duel.GetTurnPlayer() -end -function c93599951.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - local a=Duel.GetAttacker() - if chk==0 then return a and a:IsCanBeEffectTarget(e) and Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,a) end - Duel.SetTargetCard(a) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,a) - e:SetLabelObject(g:GetFirst()) -end -function c93599951.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetLabelObject() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - if tc:IsDefencePos() then - Duel.ChangePosition(tc,POS_FACEUP_ATTACK) - end - Duel.ChangeAttacker(tc) - end -end diff --git a/script/c93600443.lua b/script/c93600443.lua deleted file mode 100644 index 6aff751e78..0000000000 --- a/script/c93600443.lua +++ /dev/null @@ -1,57 +0,0 @@ ---マスク・チェンジ・セカンド -function c93600443.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,93600443+EFFECT_COUNT_CODE_OATH) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCost(c93600443.cost) - e1:SetTarget(c93600443.target) - e1:SetOperation(c93600443.activate) - c:RegisterEffect(e1) -end -function c93600443.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) -end -function c93600443.filter(c,e,tp) - local lv=c:GetLevel() - local att=c:GetAttribute() - return lv>0 and c:IsFaceup() - and Duel.IsExistingMatchingCard(c93600443.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,lv,att) -end -function c93600443.spfilter(c,e,tp,lv,att) - return c:IsSetCard(0xa008) and c:GetLevel()>lv and c:IsAttribute(att) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) -end -function c93600443.chkfilter(c,tc) - local lv=tc:GetLevel() - local att=tc:GetAttribute() - return c:IsFaceup() and c:IsLevelBelow(lv) and c:IsAttribute(att) -end -function c93600443.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c93600443.chkfilter(chkc,e:GetLabelObject()) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsExistingTarget(c93600443.filter,tp,LOCATION_MZONE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectTarget(tp,c93600443.filter,tp,LOCATION_MZONE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) - e:SetLabelObject(g:GetFirst()) -end -function c93600443.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<0 then return end - local tc=Duel.GetFirstTarget() - if not tc:IsRelateToEffect(e) then return end - local att=tc:GetAttribute() - local lv=tc:GetLevel() - if Duel.SendtoGrave(tc,REASON_EFFECT)==0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c93600443.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,lv,att) - if g:GetCount()>0 then - Duel.BreakEffect() - Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP) - g:GetFirst():CompleteProcedure() - end -end diff --git a/script/c9365703.lua b/script/c9365703.lua deleted file mode 100644 index b9d3a1d009..0000000000 --- a/script/c9365703.lua +++ /dev/null @@ -1,39 +0,0 @@ ---スピード・ウォリアー -function c9365703.initial_effect(c) - --summon success - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetOperation(c9365703.sumop) - c:RegisterEffect(e1) - --atk up - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(9365703,0)) - e2:SetCategory(CATEGORY_ATKCHANGE) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCondition(c9365703.dacon) - e2:SetOperation(c9365703.daop) - c:RegisterEffect(e2) -end -function c9365703.sumop(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():RegisterFlagEffect(9365703,RESET_EVENT+0x1fc0000+RESET_PHASE+PHASE_END,0,1) -end -function c9365703.dacon(e,tp,eg,ep,ev,re,r,rp) - if Duel.CheckTiming(TIMING_BATTLE_START) or Duel.CheckTiming(TIMING_BATTLE_END) then return false end - return Duel.GetCurrentPhase()==PHASE_BATTLE and Duel.GetCurrentChain()==0 - and e:GetHandler():GetFlagEffect(9365703)~=0 -end -function c9365703.daop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFacedown() or not c:IsRelateToEffect(e) then return end - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetValue(c:GetBaseAttack()*2) - e1:SetReset(RESET_EVENT+0x1ff0000+RESET_PHASE+PHASE_BATTLE) - c:RegisterEffect(e1) -end diff --git a/script/c93662626.lua b/script/c93662626.lua deleted file mode 100644 index a7b153f08b..0000000000 --- a/script/c93662626.lua +++ /dev/null @@ -1,50 +0,0 @@ ---イグナイト・ウージー -function c93662626.initial_effect(c) - --pendulum summon - aux.AddPendulumProcedure(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --tohand - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_DESTROY+CATEGORY_TOHAND+CATEGORY_SEARCH) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_PZONE) - e2:SetCondition(c93662626.thcon) - e2:SetTarget(c93662626.thtg) - e2:SetOperation(c93662626.thop) - c:RegisterEffect(e2) -end -function c93662626.thcon(e,tp,eg,ep,ev,re,r,rp) - local seq=e:GetHandler():GetSequence() - local pc=Duel.GetFieldCard(tp,LOCATION_SZONE,13-seq) - return pc and pc:IsSetCard(0xc8) -end -function c93662626.filter(c) - return c:IsRace(RACE_WARRIOR) and c:IsAttribute(ATTRIBUTE_FIRE) and c:IsAbleToHand() -end -function c93662626.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - local pc=Duel.GetFieldCard(tp,LOCATION_SZONE,13-c:GetSequence()) - if chk==0 then return c:IsDestructable() and pc:IsDestructable() - and Duel.IsExistingMatchingCard(c93662626.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end - local g=Group.FromCards(c,pc) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,2,0,0) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE) -end -function c93662626.thop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) then return end - local pc=Duel.GetFieldCard(tp,LOCATION_SZONE,13-c:GetSequence()) - if not pc then return end - local dg=Group.FromCards(c,pc) - if Duel.Destroy(dg,REASON_EFFECT)~=2 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c93662626.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil) - if g:GetCount()>0 and not g:GetFirst():IsHasEffect(EFFECT_NECRO_VALLEY) then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c93671934.lua b/script/c93671934.lua deleted file mode 100644 index 86dbe2cc2d..0000000000 --- a/script/c93671934.lua +++ /dev/null @@ -1,41 +0,0 @@ ---士気高揚 -function c93671934.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --recover - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetRange(LOCATION_SZONE) - e2:SetCode(EVENT_EQUIP) - e2:SetOperation(c93671934.recop) - c:RegisterEffect(e2) - --damage - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e3:SetRange(LOCATION_SZONE) - e3:SetCode(EVENT_LEAVE_FIELD) - e3:SetCondition(c93671934.damcon) - e3:SetOperation(c93671934.damop) - c:RegisterEffect(e3) -end -function c93671934.recop(e,tp,eg,ep,ev,re,r,rp) - Duel.Recover(eg:GetFirst():GetControler(),1000,REASON_EFFECT) -end -function c93671934.filter(c) - return c:GetEquipTarget()~=nil or c:IsReason(REASON_LOST_TARGET) -end -function c93671934.damcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c93671934.filter,1,nil) -end -function c93671934.damop(e,tp,eg,ep,ev,re,r,rp) - local g=eg:Filter(c93671934.filter,nil) - if g:IsExists(Card.IsControler,1,nil,tp) then - Duel.Damage(tp,1000,REASON_EFFECT) - end - if g:IsExists(Card.IsControler,1,nil,1-tp) then - Duel.Damage(1-tp,1000,REASON_EFFECT) - end -end diff --git a/script/c93709215.lua b/script/c93709215.lua deleted file mode 100644 index d5013b8fc8..0000000000 --- a/script/c93709215.lua +++ /dev/null @@ -1,18 +0,0 @@ ---ダークネス・デストロイヤー -function c93709215.initial_effect(c) - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_PIERCE) - c:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_EXTRA_ATTACK) - e3:SetValue(1) - c:RegisterEffect(e3) -end diff --git a/script/c93715853.lua b/script/c93715853.lua deleted file mode 100644 index efd88bebdb..0000000000 --- a/script/c93715853.lua +++ /dev/null @@ -1,32 +0,0 @@ ---魔神アーク・マキナ -function c93715853.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_BATTLE_DAMAGE) - e1:SetCondition(c93715853.spcon) - e1:SetTarget(c93715853.sptg) - e1:SetOperation(c93715853.spop) - c:RegisterEffect(e1) -end -function c93715853.spcon(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp -end -function c93715853.filter(c,e,tp) - return c:IsType(TYPE_NORMAL) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) - and not c:IsHasEffect(EFFECT_NECRO_VALLEY) -end -function c93715853.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c93715853.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE) -end -function c93715853.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c93715853.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c93717133.lua b/script/c93717133.lua deleted file mode 100644 index 6ad6c6bc8e..0000000000 --- a/script/c93717133.lua +++ /dev/null @@ -1,92 +0,0 @@ ---銀河眼の光子竜 -function c93717133.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c93717133.spcon) - e1:SetOperation(c93717133.spop) - c:RegisterEffect(e1) - --remove - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(93717133,0)) - e2:SetCategory(CATEGORY_REMOVE) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetHintTiming(TIMING_BATTLE_PHASE) - e2:SetRange(LOCATION_MZONE) - e2:SetCondition(c93717133.rmcon) - e2:SetTarget(c93717133.rmtg) - e2:SetOperation(c93717133.rmop) - c:RegisterEffect(e2) -end -function c93717133.spcon(e,c) - if c==nil then return true end - return Duel.CheckReleaseGroup(c:GetControler(),Card.IsAttackAbove,2,nil,2000) -end -function c93717133.spop(e,tp,eg,ep,ev,re,r,rp,c) - local g=Duel.SelectReleaseGroup(c:GetControler(),Card.IsAttackAbove,2,2,nil,2000) - Duel.Release(g,REASON_COST) -end -function c93717133.rmcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()==PHASE_BATTLE and not e:GetHandler():IsStatus(STATUS_CHAINING) -end -function c93717133.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - local c=e:GetHandler() - local bc=c:GetBattleTarget() - if chk==0 then return bc and bc:IsOnField() and bc:IsCanBeEffectTarget(e) and c:IsAbleToRemove() and bc:IsAbleToRemove() end - Duel.SetTargetCard(bc) - local g=Group.FromCards(c,bc) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,2,0,0) -end -function c93717133.rmop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if not c:IsRelateToEffect(e) or not tc:IsRelateToEffect(e) then return end - local g=Group.FromCards(c,tc) - local mcount=0 - if tc:IsFaceup() then mcount=tc:GetOverlayCount() end - if Duel.Remove(g,0,REASON_EFFECT+REASON_TEMPORARY)~=0 then - local og=Duel.GetOperatedGroup() - if not og:IsContains(tc) then mcount=0 end - local oc=og:GetFirst() - while oc do - oc:RegisterFlagEffect(93717133,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) - oc=og:GetNext() - end - og:KeepAlive() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE+PHASE_BATTLE) - e1:SetReset(RESET_PHASE+PHASE_BATTLE) - e1:SetLabel(mcount) - e1:SetCountLimit(1) - e1:SetLabelObject(og) - e1:SetOperation(c93717133.retop) - Duel.RegisterEffect(e1,tp) - end -end -function c93717133.retfilter(c) - return c:GetFlagEffect(93717133)~=0 -end -function c93717133.retop(e,tp,eg,ep,ev,re,r,rp) - local g=e:GetLabelObject() - local sg=g:Filter(c93717133.retfilter,nil) - g:DeleteGroup() - local tc=sg:GetFirst() - while tc do - if Duel.ReturnToField(tc) and tc==e:GetOwner() and tc:IsFaceup() and e:GetLabel()~=0 then - local e1=Effect.CreateEffect(e:GetOwner()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+0x1ff0000) - e1:SetValue(e:GetLabel()*500) - e:GetOwner():RegisterEffect(e1) - end - tc=sg:GetNext() - end -end diff --git a/script/c93724592.lua b/script/c93724592.lua deleted file mode 100644 index c599dc6e35..0000000000 --- a/script/c93724592.lua +++ /dev/null @@ -1,73 +0,0 @@ ---カラクリ忍者 参参九 -function c93724592.initial_effect(c) - --must attack - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_MUST_ATTACK) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_CANNOT_EP) - e2:SetRange(LOCATION_MZONE) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetTargetRange(1,0) - e2:SetCondition(c93724592.becon) - c:RegisterEffect(e2) - --to defence - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(93724592,0)) - e3:SetCategory(CATEGORY_POSITION) - e3:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_SINGLE) - e3:SetCode(EVENT_BE_BATTLE_TARGET) - e3:SetCondition(c93724592.poscon) - e3:SetOperation(c93724592.posop) - c:RegisterEffect(e3) - --Destroy - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(93724592,1)) - e4:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_SINGLE) - e4:SetCategory(CATEGORY_TOGRAVE) - e4:SetCode(EVENT_FLIP) - e4:SetProperty(EFFECT_FLAG_CARD_TARGET) - e4:SetTarget(c93724592.tgtg) - e4:SetOperation(c93724592.tgop) - c:RegisterEffect(e4) - --direct attack - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE) - e5:SetCode(EVENT_FLIP) - e5:SetOperation(c93724592.dirop) - c:RegisterEffect(e5) -end -function c93724592.becon(e) - return e:GetHandler():IsAttackable() -end -function c93724592.poscon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsAttackPos() -end -function c93724592.posop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFaceup() and c:IsRelateToEffect(e) then - Duel.ChangePosition(c,POS_FACEUP_DEFENCE) - end -end -function c93724592.tgtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,g:GetCount(),0,0) -end -function c93724592.tgop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) then - Duel.SendtoGrave(tc,REASON_EFFECT) - end -end -function c93724592.dirop(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DIRECT_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e:GetHandler():RegisterEffect(e1) -end diff --git a/script/c93730230.lua b/script/c93730230.lua deleted file mode 100644 index cd1b774ba5..0000000000 --- a/script/c93730230.lua +++ /dev/null @@ -1,38 +0,0 @@ ---先史遺産クリスタル・エイリアン -function c93730230.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,3,2) - c:EnableReviveLimit() - -- - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(93730230,0)) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_BE_BATTLE_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCost(c93730230.cost) - e1:SetOperation(c93730230.operation) - c:RegisterEffect(e1) -end -function c93730230.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c93730230.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e1:SetValue(1) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - c:RegisterEffect(e2) - local e3=e1:Clone() - e3:SetCode(EFFECT_REFLECT_BATTLE_DAMAGE) - c:RegisterEffect(e3) - end -end diff --git a/script/c93730409.lua b/script/c93730409.lua deleted file mode 100644 index 8a2cb38fa0..0000000000 --- a/script/c93730409.lua +++ /dev/null @@ -1,22 +0,0 @@ ---真空イタチ -function c93730409.initial_effect(c) - --flip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(93730409,0)) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP) - e1:SetOperation(c93730409.operation) - c:RegisterEffect(e1) -end -function c93730409.operation(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EFFECT_CANNOT_ACTIVATE) - e1:SetTargetRange(0,1) - e1:SetValue(c93730409.aclimit) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function c93730409.aclimit(e,re,tp) - return re:IsHasType(EFFECT_TYPE_ACTIVATE) -end diff --git a/script/c9373534.lua b/script/c9373534.lua deleted file mode 100644 index 018e812e8c..0000000000 --- a/script/c9373534.lua +++ /dev/null @@ -1,68 +0,0 @@ ---風魔手裏剣 -function c9373534.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c9373534.target) - e1:SetOperation(c9373534.operation) - c:RegisterEffect(e1) - --Atk up - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(700) - c:RegisterEffect(e2) - --Equip limit - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_EQUIP_LIMIT) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e3:SetValue(c9373534.eqlimit) - c:RegisterEffect(e3) - --damage - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(9373534,0)) - e4:SetCategory(CATEGORY_DAMAGE) - e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e4:SetCode(EVENT_TO_GRAVE) - e4:SetCondition(c9373534.damcon) - e4:SetTarget(c9373534.damtg) - e4:SetOperation(c9373534.damop) - c:RegisterEffect(e4) -end -function c9373534.eqlimit(e,c) - return c:IsSetCard(0x2b) -end -function c9373534.filter(c) - return c:IsFaceup() and c:IsSetCard(0x2b) -end -function c9373534.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:GetLocation()==LOCATION_MZONE and c9373534.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c9373534.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c9373534.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c9373534.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,e:GetHandler(),tc) - end -end -function c9373534.damcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) -end -function c9373534.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(700) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,700) -end -function c9373534.damop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c93747864.lua b/script/c93747864.lua deleted file mode 100644 index d0653490d6..0000000000 --- a/script/c93747864.lua +++ /dev/null @@ -1,25 +0,0 @@ ---砂漠の光 -function c93747864.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_POSITION) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c93747864.target) - e1:SetOperation(c93747864.activate) - c:RegisterEffect(e1) -end -function c93747864.filter(c) - return not c:IsPosition(POS_FACEUP_DEFENCE) -end -function c93747864.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c93747864.filter,tp,LOCATION_MZONE,0,1,nil) end - local g=Duel.GetMatchingGroup(c93747864.filter,tp,LOCATION_MZONE,0,nil) - Duel.SetOperationInfo(0,CATEGORY_POSITION,g,g:GetCount(),0,0) -end -function c93747864.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c93747864.filter,tp,LOCATION_MZONE,0,nil) - if g:GetCount()>0 then - Duel.ChangePosition(g,POS_FACEUP_DEFENCE) - end -end diff --git a/script/c93751476.lua b/script/c93751476.lua deleted file mode 100644 index 823c14b2c6..0000000000 --- a/script/c93751476.lua +++ /dev/null @@ -1,70 +0,0 @@ ---猛炎星-テンレイ -function c93751476.initial_effect(c) - --to grave - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetOperation(c93751476.regop) - c:RegisterEffect(e1) - --set - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(93751476,0)) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_BE_MATERIAL) - e2:SetCondition(c93751476.setcon) - e2:SetTarget(c93751476.settg) - e2:SetOperation(c93751476.setop) - c:RegisterEffect(e2) -end -function c93751476.regop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsReason(REASON_EFFECT) and c:IsReason(REASON_DESTROY) then - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(93751476,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_GRAVE) - e1:SetTarget(c93751476.sptg) - e1:SetOperation(c93751476.spop) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - c:RegisterEffect(e1) - end -end -function c93751476.spfilter(c,e,tp) - return c:IsSetCard(0x79) and c:GetLevel()==4 and c:GetCode()~=93751476 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c93751476.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c93751476.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c93751476.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c93751476.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end -function c93751476.setcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsLocation(LOCATION_GRAVE) and r==REASON_SYNCHRO - and e:GetHandler():GetReasonCard():IsSetCard(0x79) -end -function c93751476.filter(c) - return c:IsSetCard(0x7c) and c:IsType(TYPE_SPELL) and c:IsSSetable() -end -function c93751476.settg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingMatchingCard(c93751476.filter,tp,LOCATION_DECK,0,1,nil) end -end -function c93751476.setop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) - local g=Duel.SelectMatchingCard(tp,c93751476.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SSet(tp,g:GetFirst()) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c93775296.lua b/script/c93775296.lua deleted file mode 100644 index 1b29702dc7..0000000000 --- a/script/c93775296.lua +++ /dev/null @@ -1,39 +0,0 @@ ---リバース・リユース -function c93775296.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c93775296.target) - e1:SetOperation(c93775296.activate) - c:RegisterEffect(e1) -end -function c93775296.filter(c,e,tp) - return c:IsType(TYPE_FLIP) - and (c:IsCanBeSpecialSummoned(e,0,tp,false,false) or c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN)) -end -function c93775296.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c93775296.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c93775296.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - local ct=Duel.GetLocationCount(1-tp,LOCATION_MZONE) - if ct>2 then ct=2 end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c93775296.filter,tp,LOCATION_GRAVE,0,1,ct,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,g:GetCount(),0,0) -end -function c93775296.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) - if g:GetCount()==0 then return end - local tc=g:GetFirst() - while tc do - local spos=0 - if tc:IsCanBeSpecialSummoned(e,0,tp,false,false) then spos=spos+POS_FACEUP_DEFENCE end - if tc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN) then spos=spos+POS_FACEDOWN_DEFENCE end - if spos~=0 then Duel.SpecialSummonStep(tc,0,tp,1-tp,false,false,spos) end - tc=g:GetNext() - end - Duel.SpecialSummonComplete() -end diff --git a/script/c93816465.lua b/script/c93816465.lua deleted file mode 100644 index c48f344ab5..0000000000 --- a/script/c93816465.lua +++ /dev/null @@ -1,33 +0,0 @@ ---ゼロ・ガードナー -function c93816465.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(93816465,0)) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c93816465.cost) - e1:SetOperation(c93816465.operation) - c:RegisterEffect(e1) -end -function c93816465.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end -function c93816465.operation(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_AVOID_BATTLE_DAMAGE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetTargetRange(1,0) - e1:SetValue(1) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e2:SetTargetRange(LOCATION_MZONE,0) - e2:SetReset(RESET_PHASE+PHASE_END) - e2:SetValue(1) - Duel.RegisterEffect(e2,tp) -end diff --git a/script/c93830681.lua b/script/c93830681.lua deleted file mode 100644 index 9702530caa..0000000000 --- a/script/c93830681.lua +++ /dev/null @@ -1,42 +0,0 @@ ---キラー・ラブカ -function c93830681.initial_effect(c) - --disable attack - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(93830681,0)) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_BE_BATTLE_TARGET) - e1:SetRange(LOCATION_GRAVE) - e1:SetCountLimit(1,93830681) - e1:SetCondition(c93830681.condition) - e1:SetCost(c93830681.cost) - e1:SetTarget(c93830681.target) - e1:SetOperation(c93830681.operation) - c:RegisterEffect(e1) -end -function c93830681.condition(e,tp,eg,ep,ev,re,r,rp) - local at=Duel.GetAttackTarget() - return at and at:IsControler(tp) and at:IsFaceup() and at:IsRace(RACE_FISH+RACE_SEASERPENT+RACE_AQUA) -end -function c93830681.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) -end -function c93830681.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local tg=Duel.GetAttacker() - if chkc then return chkc==tg end - if chk==0 then return tg:IsOnField() and tg:IsCanBeEffectTarget(e) end - Duel.SetTargetCard(tg) -end -function c93830681.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetAttacker() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.NegateAttack() - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(-500) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,2) - tc:RegisterEffect(e1) - end -end diff --git a/script/c93882364.lua b/script/c93882364.lua deleted file mode 100644 index 63e29119ea..0000000000 --- a/script/c93882364.lua +++ /dev/null @@ -1,33 +0,0 @@ ---ジェネクス・ワーカー -function c93882364.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(93882364,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c93882364.cost) - e1:SetTarget(c93882364.target) - e1:SetOperation(c93882364.operation) - c:RegisterEffect(e1) -end -function c93882364.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end -function c93882364.filter(c,e,tp) - return c:IsSetCard(0x2) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c93882364.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsExistingMatchingCard(c93882364.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c93882364.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c93882364.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c93889755.lua b/script/c93889755.lua deleted file mode 100644 index 28a21263ed..0000000000 --- a/script/c93889755.lua +++ /dev/null @@ -1,31 +0,0 @@ ---マーダーサーカス -function c93889755.initial_effect(c) - --to hand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(93889755,0)) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_CHANGE_POS) - e1:SetCondition(c93889755.condition) - e1:SetTarget(c93889755.target) - e1:SetOperation(c93889755.operation) - c:RegisterEffect(e1) -end -function c93889755.condition(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return bit.band(c:GetPreviousPosition(),POS_DEFENCE)~=0 and c:IsFaceup() and c:IsAttackPos() -end -function c93889755.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsAbleToHand() end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g=Duel.SelectTarget(tp,Card.IsAbleToHand,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0) -end -function c93889755.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - end -end diff --git a/script/c93895605.lua b/script/c93895605.lua deleted file mode 100644 index bd0502975f..0000000000 --- a/script/c93895605.lua +++ /dev/null @@ -1,39 +0,0 @@ ---ヘイト・バスター -function c93895605.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_BE_BATTLE_TARGET) - e1:SetCondition(c93895605.condition) - e1:SetTarget(c93895605.target) - e1:SetOperation(c93895605.activate) - c:RegisterEffect(e1) -end -function c93895605.condition(e,tp,eg,ep,ev,re,r,rp) - local tc=eg:GetFirst() - return tc:IsControler(tp) and tc:IsFaceup() and tc:IsRace(RACE_FIEND) -end -function c93895605.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - local a=Duel.GetAttacker() - local d=Duel.GetAttackTarget() - if chk==0 then return a:IsOnField() and a:IsDestructable() and a:IsCanBeEffectTarget(e) - and d:IsOnField() and d:IsDestructable() and d:IsCanBeEffectTarget(e) end - local g=Group.FromCards(a,d) - Duel.SetTargetCard(g) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,2,0,0) -end -function c93895605.activate(e,tp,eg,ep,ev,re,r,rp) - local a=Duel.GetAttacker() - local d=Duel.GetAttackTarget() - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - if a:IsRelateToEffect(e) and a:IsAttackable() and not a:IsStatus(STATUS_ATTACK_CANCELED) - and d:IsFaceup() and d:IsRelateToEffect(e) then - Duel.Destroy(g,REASON_EFFECT) - if not a:IsOnField() then - Duel.Damage(1-tp,a:GetAttack(),REASON_EFFECT) - end - end -end diff --git a/script/c93900406.lua b/script/c93900406.lua deleted file mode 100644 index ecf9a7eb62..0000000000 --- a/script/c93900406.lua +++ /dev/null @@ -1,57 +0,0 @@ ---マタンゴ -function c93900406.initial_effect(c) - --damage - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(93900406,0)) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCondition(c93900406.damcon) - e1:SetTarget(c93900406.damtg) - e1:SetOperation(c93900406.damop) - c:RegisterEffect(e1) - --control - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(93900406,1)) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCategory(CATEGORY_CONTROL) - e2:SetCode(EVENT_PHASE+PHASE_END) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCondition(c93900406.ctlcon) - e2:SetCost(c93900406.ctlcost) - e2:SetTarget(c93900406.ctltg) - e2:SetOperation(c93900406.ctlop) - c:RegisterEffect(e2) -end -function c93900406.damcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c93900406.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,0,0,tp,300) -end -function c93900406.damop(e,tp,eg,ep,ev,re,r,rp) - Duel.Damage(tp,300,REASON_EFFECT) -end -function c93900406.ctlcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c93900406.ctlcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,500) end - Duel.PayLPCost(tp,500) -end -function c93900406.ctltg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsControlerCanBeChanged() end - Duel.SetOperationInfo(0,CATEGORY_CONTROL,e:GetHandler(),1,0,0) -end -function c93900406.ctlop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() and not Duel.GetControl(c,1-tp) then - if not c:IsImmuneToEffect(e) and c:IsAbleToChangeControler() then - Duel.Destroy(c,REASON_EFFECT) - end - end -end diff --git a/script/c93912845.lua b/script/c93912845.lua deleted file mode 100644 index ce57207aad..0000000000 --- a/script/c93912845.lua +++ /dev/null @@ -1,51 +0,0 @@ ---リバイバル・ギフト -function c93912845.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_END_PHASE) - e1:SetTarget(c93912845.target) - e1:SetOperation(c93912845.activate) - c:RegisterEffect(e1) -end -function c93912845.spfilter(c,e,tp) - return c:IsType(TYPE_TUNER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c93912845.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c93912845.spfilter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(1-tp,LOCATION_MZONE)>1 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c93912845.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) - and Duel.IsPlayerCanSpecialSummonMonster(tp,93912846,0,0x4011,1500,1500,3,RACE_FIEND,ATTRIBUTE_DARK,POS_FACEUP,1-tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c93912845.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,2,0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c93912845.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1,true) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e2,true) - end - end - if Duel.GetLocationCount(1-tp,LOCATION_MZONE)>1 - and Duel.IsPlayerCanSpecialSummonMonster(tp,93912846,0,0x4011,1500,1500,3,RACE_FIEND,ATTRIBUTE_DARK,POS_FACEUP,1-tp) then - for i=1,2 do - local token=Duel.CreateToken(tp,93912846) - Duel.SpecialSummonStep(token,0,tp,1-tp,false,false,POS_FACEUP) - end - end - Duel.SpecialSummonComplete() -end diff --git a/script/c9391354.lua b/script/c9391354.lua deleted file mode 100644 index 329e4a2542..0000000000 --- a/script/c9391354.lua +++ /dev/null @@ -1,39 +0,0 @@ ---グラビ・クラッシュドラゴン -function c9391354.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(9391354,0)) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c9391354.descost) - e1:SetTarget(c9391354.destg) - e1:SetOperation(c9391354.desop) - c:RegisterEffect(e1) -end -function c9391354.cfilter(c) - return c:IsFaceup() and c:GetType()==TYPE_SPELL+TYPE_CONTINUOUS and c:IsAbleToGraveAsCost() -end -function c9391354.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c9391354.cfilter,tp,LOCATION_SZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c9391354.cfilter,tp,LOCATION_SZONE,0,1,1,nil) - Duel.SendtoGrave(g,REASON_COST) -end -function c9391354.filter(c) - return c:IsDestructable() -end -function c9391354.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c9391354.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c9391354.filter,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c9391354.filter,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c9391354.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c93920745.lua b/script/c93920745.lua deleted file mode 100644 index dba3edb31e..0000000000 --- a/script/c93920745.lua +++ /dev/null @@ -1,26 +0,0 @@ ---ペンギン・ソルジャー -function c93920745.initial_effect(c) - --flip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(93920745,0)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP+EFFECT_TYPE_TRIGGER_O) - e1:SetTarget(c93920745.target) - e1:SetOperation(c93920745.operation) - c:RegisterEffect(e1) -end -function c93920745.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsAbleToHand() end - if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToHand,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g=Duel.SelectTarget(tp,Card.IsAbleToHand,tp,LOCATION_MZONE,LOCATION_MZONE,1,2,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0) -end -function c93920745.operation(e,tp,eg,ep,ev,re,r,rp) - local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - if tg then - local sg=tg:Filter(Card.IsRelateToEffect,nil,e) - Duel.SendtoHand(sg,nil,REASON_EFFECT) - end -end diff --git a/script/c93946239.lua b/script/c93946239.lua deleted file mode 100644 index 21eb0d6bf2..0000000000 --- a/script/c93946239.lua +++ /dev/null @@ -1,37 +0,0 @@ ---無の煉獄 -function c93946239.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DRAW) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c93946239.condition) - e1:SetTarget(c93946239.target) - e1:SetOperation(c93946239.activate) - c:RegisterEffect(e1) -end -function c93946239.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)>2 -end -function c93946239.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(1) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c93946239.activate(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetCountLimit(1) - e1:SetReset(RESET_PHASE+PHASE_END) - e1:SetOperation(c93946239.disop) - Duel.RegisterEffect(e1,p) -end -function c93946239.disop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetFieldGroup(e:GetOwnerPlayer(),LOCATION_HAND,0) - Duel.SendtoGrave(g,REASON_EFFECT+REASON_DISCARD) -end diff --git a/script/c93969023.lua b/script/c93969023.lua deleted file mode 100644 index 782694dcc6..0000000000 --- a/script/c93969023.lua +++ /dev/null @@ -1,78 +0,0 @@ ---黒鋼竜 -function c93969023.initial_effect(c) - --equip - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_HAND+LOCATION_MZONE) - e1:SetTarget(c93969023.eqtg) - e1:SetOperation(c93969023.eqop) - c:RegisterEffect(e1) - --to hand - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e2:SetCondition(c93969023.thcon) - e2:SetTarget(c93969023.thtg) - e2:SetOperation(c93969023.thop) - c:RegisterEffect(e2) -end -function c93969023.filter(c) - return c:IsFaceup() and c:IsSetCard(0x3b) -end -function c93969023.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c93969023.filter(chkc) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingTarget(c93969023.filter,tp,LOCATION_MZONE,0,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c93969023.filter,tp,LOCATION_MZONE,0,1,1,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c93969023.eqop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) then return end - if c:IsLocation(LOCATION_MZONE) and c:IsFacedown() then return end - local tc=Duel.GetFirstTarget() - if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or tc:GetControler()~=tp or tc:IsFacedown() or not tc:IsRelateToEffect(e) then - Duel.SendtoGrave(c,REASON_EFFECT) - return - end - Duel.Equip(tp,c,tc,true) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetLabelObject(tc) - e1:SetValue(c93969023.eqlimit) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(600) - e2:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e2) -end -function c93969023.eqlimit(e,c) - return c==e:GetLabelObject() -end -function c93969023.thcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) -end -function c93969023.thfilter(c) - return c:IsSetCard(0x3b) and c:IsAbleToHand() -end -function c93969023.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c93969023.thfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c93969023.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c93969023.thfilter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c93983867.lua b/script/c93983867.lua deleted file mode 100644 index 7e403bae8c..0000000000 --- a/script/c93983867.lua +++ /dev/null @@ -1,68 +0,0 @@ ---トリック・ボックス -function c93983867.initial_effect(c) - Duel.EnableGlobalFlag(GLOBALFLAG_DELAYED_QUICKEFFECT) - --activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_CONTROL+CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e1:SetCondition(c93983867.condition) - e1:SetTarget(c93983867.target) - e1:SetOperation(c93983867.activate) - c:RegisterEffect(e1) -end -function c93983867.cfilter(c,tp) - return c:IsSetCard(0xc6) and c:IsReason(REASON_DESTROY) and c:IsPreviousPosition(POS_FACEUP) - and c:IsPreviousLocation(LOCATION_MZONE) and c:GetPreviousControler()==tp -end -function c93983867.condition(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c93983867.cfilter,1,nil,tp) -end -function c93983867.spfilter(c,e,tp) - return c:IsSetCard(0xc6) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c93983867.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsControlerCanBeChanged() end - if chk==0 then return Duel.IsExistingTarget(Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,1,nil) - and Duel.IsExistingMatchingCard(c93983867.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) - local g=Duel.SelectTarget(tp,Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE) -end -function c93983867.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if not tc:IsRelateToEffect(e) then return end - if Duel.GetControl(tc,tp,PHASE_END,1) then - Duel.BreakEffect() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c93983867.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - local tc=g:GetFirst() - if tc and Duel.SpecialSummon(tc,0,tp,1-tp,false,false,POS_FACEUP)~=0 then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetRange(LOCATION_MZONE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCountLimit(1) - e1:SetOperation(c93983867.retop) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - tc:RegisterEffect(e1) - end - else - if not tc:IsImmuneToEffect(e) and tc:IsAbleToChangeControler() then - Duel.Destroy(tc,REASON_EFFECT) - end - end -end -function c93983867.retop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - c:ResetEffect(EFFECT_SET_CONTROL,RESET_CODE) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_CONTROL) - e1:SetValue(c:GetOwner()) - e1:SetReset(RESET_EVENT+0xec0000) - c:RegisterEffect(e1) -end diff --git a/script/c94004268.lua b/script/c94004268.lua deleted file mode 100644 index 43675aef66..0000000000 --- a/script/c94004268.lua +++ /dev/null @@ -1,9 +0,0 @@ ---アマゾネスの剣士 -function c94004268.initial_effect(c) - --reflect battle dam - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_REFLECT_BATTLE_DAMAGE) - e1:SetValue(1) - c:RegisterEffect(e1) -end diff --git a/script/c9402966.lua b/script/c9402966.lua deleted file mode 100644 index 8f3c92990b..0000000000 --- a/script/c9402966.lua +++ /dev/null @@ -1,57 +0,0 @@ ---超重武者タマ-C -function c9402966.initial_effect(c) - --synchro summon - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1,9402966) - e1:SetCondition(c9402966.sccon) - e1:SetTarget(c9402966.sctg) - e1:SetOperation(c9402966.scop) - c:RegisterEffect(e1) -end -function c9402966.cfilter(c) - return c:IsFacedown() or not c:IsSetCard(0x9a) -end -function c9402966.sccon(e,tp,eg,ep,ev,re,r,rp) - return not Duel.IsExistingMatchingCard(c9402966.cfilter,tp,LOCATION_MZONE,0,1,nil) - and not Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_GRAVE,0,1,nil,TYPE_SPELL+TYPE_TRAP) -end -function c9402966.filter(c,e,tp,lv) - return c:IsFaceup() and c:GetLevel()>0 - and Duel.IsExistingMatchingCard(c9402966.scfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,lv+c:GetOriginalLevel()) -end -function c9402966.scfilter(c,e,tp,lv) - return c:IsSetCard(0x9a) and c:GetLevel()==lv and c:IsType(TYPE_SYNCHRO) - and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_SYNCHRO,tp,false,false) -end -function c9402966.sctg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - local lv=e:GetHandler():GetOriginalLevel() - if chk==0 then return Duel.IsExistingTarget(c9402966.filter,tp,0,LOCATION_MZONE,1,nil,e,tp,lv) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectTarget(tp,c9402966.filter,tp,0,LOCATION_MZONE,1,1,nil,e,tp,lv) - g:AddCard(e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,2,0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function c9402966.scop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if not c:IsRelateToEffect(e) or not tc:IsRelateToEffect(e) then return end - local g=Group.FromCards(c,tc) - if Duel.SendtoGrave(g,REASON_EFFECT)==2 and c:GetLevel()>0 and c:IsLocation(LOCATION_GRAVE) - and tc:GetLevel()>0 and tc:IsLocation(LOCATION_GRAVE) then - local lv=c:GetLevel()+tc:GetLevel() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=Duel.SelectMatchingCard(tp,c9402966.scfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,lv) - local tc=sg:GetFirst() - if tc then - Duel.BreakEffect() - Duel.SpecialSummon(tc,SUMMON_TYPE_SYNCHRO,tp,tp,false,false,POS_FACEUP) - tc:CompleteProcedure() - end - end -end diff --git a/script/c94068856.lua b/script/c94068856.lua deleted file mode 100644 index ebbce39d86..0000000000 --- a/script/c94068856.lua +++ /dev/null @@ -1,30 +0,0 @@ ---タイムパッセージ -function c94068856.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c94068856.target) - e1:SetOperation(c94068856.activate) - c:RegisterEffect(e1) -end -function c94068856.filter(c) - return c:IsFaceup() and c:IsSetCard(0x31) -end -function c94068856.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c94068856.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c94068856.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - local g=Duel.SelectTarget(tp,c94068856.filter,tp,LOCATION_MZONE,0,1,1,nil) -end -function c94068856.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsFacedown() or not tc:IsRelateToEffect(e) then return end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_LEVEL) - e1:SetValue(3) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) -end diff --git a/script/c94079037.lua b/script/c94079037.lua deleted file mode 100644 index 850f713a73..0000000000 --- a/script/c94079037.lua +++ /dev/null @@ -1,51 +0,0 @@ ---マイン・モール -function c94079037.initial_effect(c) - --battle indes - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_INDESTRUCTABLE_COUNT) - e1:SetCountLimit(1) - e1:SetValue(c94079037.valcon) - c:RegisterEffect(e1) - --draw - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(94079037,0)) - e2:SetCategory(CATEGORY_DRAW) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_BE_MATERIAL) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetCondition(c94079037.drcon) - e2:SetTarget(c94079037.drtg) - e2:SetOperation(c94079037.drop) - c:RegisterEffect(e2) - --redirect - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) - e3:SetCondition(c94079037.rmcon) - e3:SetValue(LOCATION_REMOVED) - c:RegisterEffect(e3) -end -function c94079037.valcon(e,re,r,rp) - return bit.band(r,REASON_BATTLE)~=0 -end -function c94079037.drcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsLocation(LOCATION_GRAVE) and r==REASON_SYNCHRO - and e:GetHandler():GetReasonCard():IsRace(RACE_BEAST) -end -function c94079037.drtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(1) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c94079037.drop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end -function c94079037.rmcon(e) - local c=e:GetHandler() - return c:IsFaceup() and c:IsReason(REASON_EFFECT) and c:GetReasonPlayer()~=c:GetControler() -end diff --git a/script/c94081496.lua b/script/c94081496.lua deleted file mode 100644 index cda867a391..0000000000 --- a/script/c94081496.lua +++ /dev/null @@ -1,33 +0,0 @@ ---黒光りするG -function c94081496.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(94081496,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_GRAVE) - e1:SetCost(c94081496.cost) - e1:SetTarget(c94081496.target) - e1:SetOperation(c94081496.operation) - c:RegisterEffect(e1) -end -function c94081496.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) -end -function c94081496.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local tc=eg:GetFirst() - if chkc then return chkc==tc end - if chk==0 then return eg:GetCount()==1 and tc:IsFaceup() and tc:IsType(TYPE_SYNCHRO) and tc:IsOnField() - and tc:IsControler(1-tp) and tc:IsCanBeEffectTarget(e) and tc:IsDestructable() end - Duel.SetTargetCard(eg) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,tc,1,0,0) -end -function c94081496.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c94092230.lua b/script/c94092230.lua deleted file mode 100644 index 665d140d65..0000000000 --- a/script/c94092230.lua +++ /dev/null @@ -1,64 +0,0 @@ ---インヴェルズ・グレズ -function c94092230.initial_effect(c) - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - c:RegisterEffect(e1) - --tribute limit - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_TRIBUTE_LIMIT) - e2:SetValue(c94092230.tlimit) - c:RegisterEffect(e2) - --summon with 3 tribute - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(94092230,0)) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_LIMIT_SUMMON_PROC) - e3:SetCondition(c94092230.ttcon) - e3:SetOperation(c94092230.ttop) - e3:SetValue(SUMMON_TYPE_ADVANCE) - c:RegisterEffect(e3) - local e4=e3:Clone() - e4:SetCode(EFFECT_LIMIT_SET_PROC) - c:RegisterEffect(e4) - --destroy - local e5=Effect.CreateEffect(c) - e5:SetDescription(aux.Stringid(94092230,1)) - e5:SetCategory(CATEGORY_DESTROY) - e5:SetType(EFFECT_TYPE_IGNITION) - e5:SetRange(LOCATION_MZONE) - e5:SetCountLimit(1) - e5:SetCost(c94092230.descost) - e5:SetTarget(c94092230.destg) - e5:SetOperation(c94092230.desop) - c:RegisterEffect(e5) -end -function c94092230.tlimit(e,c) - return not c:IsSetCard(0x100a) -end -function c94092230.ttcon(e,c) - if c==nil then return true end - return Duel.GetTributeCount(c)>=3 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-3 -end -function c94092230.ttop(e,tp,eg,ep,ev,re,r,rp,c) - local g=Duel.SelectTribute(tp,c,3,3) - c:SetMaterial(g) - Duel.Release(g,REASON_SUMMON+REASON_MATERIAL) -end -function c94092230.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.PayLPCost(tp,math.floor(Duel.GetLP(tp)/2)) -end -function c94092230.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end - local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c94092230.desop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler()) - Duel.Destroy(g,REASON_EFFECT) -end diff --git a/script/c94096616.lua b/script/c94096616.lua deleted file mode 100644 index 7ce288c36a..0000000000 --- a/script/c94096616.lua +++ /dev/null @@ -1,40 +0,0 @@ ---武神器-オロチ -function c94096616.initial_effect(c) - --direct attack - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(94096616,0)) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c94096616.condition) - e1:SetCost(c94096616.cost) - e1:SetTarget(c94096616.target) - e1:SetOperation(c94096616.operation) - c:RegisterEffect(e1) -end -function c94096616.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsAbleToEnterBP() -end -function c94096616.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end -function c94096616.filter(c) - return c:IsFaceup() and c:IsSetCard(0x88) and not c:IsHasEffect(EFFECT_DIRECT_ATTACK) -end -function c94096616.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c94096616.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c94096616.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - Duel.SelectTarget(tp,c94096616.filter,tp,LOCATION_MZONE,0,1,1,nil) -end -function c94096616.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DIRECT_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - end -end diff --git a/script/c9411399.lua b/script/c9411399.lua deleted file mode 100644 index c6374671a9..0000000000 --- a/script/c9411399.lua +++ /dev/null @@ -1,36 +0,0 @@ ---D-HERO ディアボリックガイ -function c9411399.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(9411399,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_GRAVE) - e1:SetCost(c9411399.cost) - e1:SetTarget(c9411399.target) - e1:SetOperation(c9411399.operation) - c:RegisterEffect(e1) -end -function c9411399.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) -end -function c9411399.filter(c,e,sp) - return c:GetCode()==9411399 and c:IsCanBeSpecialSummoned(e,0,sp,false,false) -end -function c9411399.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c9411399.filter,tp,LOCATION_DECK,0,1,nil,e,tp) - and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c9411399.operation(e,tp,eg,ep,ev,re,r,rp) - local sc=Duel.GetFirstMatchingCard(c9411399.filter,tp,LOCATION_DECK,0,nil,e,tp) - if sc~=nil then - if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then - Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP) - else - Duel.Destroy(sc,REASON_EFFECT) - end - Duel.ShuffleDeck(tp) - end -end diff --git a/script/c94119480.lua b/script/c94119480.lua deleted file mode 100644 index 5a39304e05..0000000000 --- a/script/c94119480.lua +++ /dev/null @@ -1,38 +0,0 @@ ---終焉の守護者アドレウス -function c94119480.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,5,2) - c:EnableReviveLimit() - --destroy - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetDescription(aux.Stringid(94119480,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c94119480.cost) - e1:SetTarget(c94119480.target) - e1:SetOperation(c94119480.operation) - c:RegisterEffect(e1) -end -function c94119480.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c94119480.filter(c) - return c:IsFaceup() and c:IsDestructable() -end -function c94119480.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and c94119480.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c94119480.filter,tp,0,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c94119480.filter,tp,0,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c94119480.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c94145021.lua b/script/c94145021.lua deleted file mode 100644 index 999927f6fa..0000000000 --- a/script/c94145021.lua +++ /dev/null @@ -1,41 +0,0 @@ ---ドロール&ロックバード -function c94145021.initial_effect(c) - Duel.EnableGlobalFlag(GLOBALFLAG_DELAYED_QUICKEFFECT) - --disable - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(94145021,0)) - e1:SetCategory(CATEGORY_DISABLE) - e1:SetProperty(EFFECT_FLAG_DELAY) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_TO_HAND) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c94145021.condition) - e1:SetCost(c94145021.cost) - e1:SetOperation(c94145021.operation) - c:RegisterEffect(e1) -end -function c94145021.cfilter(c,tp) - return c:IsControler(tp) and c:IsPreviousLocation(LOCATION_DECK) -end -function c94145021.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DRAW and eg:IsExists(c94145021.cfilter,1,nil,1-tp) -end -function c94145021.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end -function c94145021.operation(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_TO_HAND) - e1:SetTargetRange(LOCATION_DECK,LOCATION_DECK) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetCode(EFFECT_CANNOT_DRAW) - e2:SetReset(RESET_PHASE+PHASE_END) - e2:SetTargetRange(1,1) - Duel.RegisterEffect(e2,tp) -end diff --git a/script/c94145683.lua b/script/c94145683.lua deleted file mode 100644 index 152367c918..0000000000 --- a/script/c94145683.lua +++ /dev/null @@ -1,46 +0,0 @@ ---スワローズ・ネスト -function c94145683.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetLabel(0) - e1:SetCost(c94145683.cost) - e1:SetTarget(c94145683.target) - e1:SetOperation(c94145683.activate) - c:RegisterEffect(e1) -end -function c94145683.cost(e,tp,eg,ep,ev,re,r,rp,chk) - e:SetLabel(100) - return true -end -function c94145683.filter1(c,e,tp) - local lv=c:GetLevel() - return lv>0 and c:IsFaceup() and c:IsRace(RACE_WINDBEAST) - and Duel.IsExistingMatchingCard(c94145683.filter2,tp,LOCATION_DECK,0,1,nil,lv,e,tp) -end -function c94145683.filter2(c,lv,e,tp) - return c:IsRace(RACE_WINDBEAST) and c:GetLevel()==lv and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c94145683.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - if e:GetLabel()~=100 then return false end - e:SetLabel(0) - return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.CheckReleaseGroup(tp,c94145683.filter1,1,nil,e,tp) - end - local rg=Duel.SelectReleaseGroup(tp,c94145683.filter1,1,1,nil,e,tp) - e:SetLabel(rg:GetFirst():GetLevel()) - Duel.Release(rg,REASON_COST) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c94145683.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local lv=e:GetLabel() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c94145683.filter2,tp,LOCATION_DECK,0,1,1,nil,lv,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c94156050.lua b/script/c94156050.lua deleted file mode 100644 index 9459258830..0000000000 --- a/script/c94156050.lua +++ /dev/null @@ -1,33 +0,0 @@ ---逆さ眼鏡 -function c94156050.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetCondition(c94156050.condition) - e1:SetTarget(c94156050.target) - e1:SetOperation(c94156050.operation) - c:RegisterEffect(e1) -end -function c94156050.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end -function c94156050.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end -end -function c94156050.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - local tc=g:GetFirst() - while tc do - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetValue(tc:GetAttack()/2) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - tc=g:GetNext() - end -end diff --git a/script/c94163677.lua b/script/c94163677.lua deleted file mode 100644 index 7220f3d6ca..0000000000 --- a/script/c94163677.lua +++ /dev/null @@ -1,17 +0,0 @@ ---無限の手札 -function c94163677.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - -- - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_HAND_LIMIT) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(1,1) - e2:SetValue(100) - c:RegisterEffect(e2) -end diff --git a/script/c9418365.lua b/script/c9418365.lua deleted file mode 100644 index 42f9e9a4a6..0000000000 --- a/script/c9418365.lua +++ /dev/null @@ -1,57 +0,0 @@ ---武神-ヒルメ -function c9418365.initial_effect(c) - c:SetUniqueOnField(1,0,9418365) - c:EnableReviveLimit() - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(9418365,0)) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetValue(1) - e1:SetCondition(c9418365.spcon) - e1:SetOperation(c9418365.spop) - c:RegisterEffect(e1) - --discard - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(9418365,1)) - e2:SetCategory(CATEGORY_HANDES) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetCondition(c9418365.hdcon) - e2:SetTarget(c9418365.hdtg) - e2:SetOperation(c9418365.hdop) - c:RegisterEffect(e2) -end -function c9418365.spfilter(c) - return c:IsSetCard(0x88) and c:IsType(TYPE_MONSTER) and not c:IsCode(9418365) and c:IsAbleToRemoveAsCost() -end -function c9418365.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c9418365.spfilter,tp,LOCATION_GRAVE,0,1,nil) -end -function c9418365.spop(e,tp,eg,ep,ev,re,r,rp,c) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c9418365.spfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c9418365.hdcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:GetSummonType()==SUMMON_TYPE_SPECIAL+1 and rp~=tp and c:IsReason(REASON_DESTROY) - and c:IsPreviousLocation(LOCATION_MZONE) and c:GetPreviousControler()==tp -end -function c9418365.hdtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)>0 - and Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0 end - Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,PLAYER_ALL,1) -end -function c9418365.hdop(e,tp,eg,ep,ev,re,r,rp) - if Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT+REASON_DISCARD)~=0 then - Duel.BreakEffect() - Duel.DiscardHand(1-tp,nil,1,1,REASON_EFFECT+REASON_DISCARD) - end -end diff --git a/script/c9418534.lua b/script/c9418534.lua deleted file mode 100644 index ec5895b8d5..0000000000 --- a/script/c9418534.lua +++ /dev/null @@ -1,50 +0,0 @@ ---人造人間-サイコ・リターナー -function c9418534.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(9418534,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetTarget(c9418534.target) - e1:SetOperation(c9418534.operation) - c:RegisterEffect(e1) - --direct attack - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DIRECT_ATTACK) - c:RegisterEffect(e2) -end -function c9418534.filter(c,e,tp) - return c:IsCode(77585513) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c9418534.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c9418534.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c9418534.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c9418534.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c9418534.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)~=0 then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetOwnerPlayer(tp) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetCondition(c9418534.descon) - e1:SetOperation(c9418534.desop) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,2) - e1:SetCountLimit(1) - tc:RegisterEffect(e1) - end -end -function c9418534.descon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c9418534.desop(e,tp,eg,ep,ev,re,r,rp) - Duel.Destroy(e:GetHandler(),REASON_EFFECT) -end diff --git a/script/c94192409.lua b/script/c94192409.lua deleted file mode 100644 index e47652889d..0000000000 --- a/script/c94192409.lua +++ /dev/null @@ -1,26 +0,0 @@ ---強制脱出装置 -function c94192409.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,0x1e0) - e1:SetTarget(c94192409.target) - e1:SetOperation(c94192409.activate) - c:RegisterEffect(e1) -end -function c94192409.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsAbleToHand() end - if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToHand,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g=Duel.SelectTarget(tp,Card.IsAbleToHand,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c94192409.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - end -end diff --git a/script/c94203886.lua b/script/c94203886.lua deleted file mode 100644 index 261524d2c7..0000000000 --- a/script/c94203886.lua +++ /dev/null @@ -1,66 +0,0 @@ ---ガガガキッド -function c94203886.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c94203886.spcon) - e1:SetValue(1) - c:RegisterEffect(e1) - --lvchange - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(94203886,0)) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCondition(c94203886.lvcon) - e2:SetCost(c94203886.lvcost) - e2:SetTarget(c94203886.lvtg) - e2:SetOperation(c94203886.lvop) - c:RegisterEffect(e2) -end -function c94203886.filter(c) - return c:IsFaceup() and c:IsSetCard(0x54) and c:GetCode()~=94203886 -end -function c94203886.spcon(e,c) - if c==nil then return true end - return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and - Duel.IsExistingMatchingCard(c94203886.filter,c:GetControler(),LOCATION_MZONE,0,1,nil) -end -function c94203886.lvcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+1 -end -function c94203886.lvcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetCurrentPhase()==PHASE_MAIN1 end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_BP) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function c94203886.lvfilter(c,lv) - local clv=c:GetLevel() - return c:IsFaceup() and c:IsSetCard(0x54) and clv>0 and clv~=lv -end -function c94203886.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c94203886.lvfilter(chkc,e:GetHandler():GetLevel()) end - if chk==0 then return Duel.IsExistingTarget(c94203886.lvfilter,tp,LOCATION_MZONE,0,1,nil,e:GetHandler():GetLevel()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c94203886.lvfilter,tp,LOCATION_MZONE,0,1,1,nil,e:GetHandler():GetLevel()) -end -function c94203886.lvop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and c:IsFaceup() and tc:IsRelateToEffect(e) and tc:IsFaceup() then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CHANGE_LEVEL) - e1:SetValue(tc:GetLevel()) - e1:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e1) - end -end \ No newline at end of file diff --git a/script/c94212438.lua b/script/c94212438.lua deleted file mode 100644 index 417d13d59f..0000000000 --- a/script/c94212438.lua +++ /dev/null @@ -1,83 +0,0 @@ ---ウィジャ盤 -function c94212438.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_END_PHASE) - c:RegisterEffect(e1) - -- - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(94212438,0)) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetRange(LOCATION_SZONE) - e2:SetCode(EVENT_PHASE+PHASE_END) - e2:SetCountLimit(1) - e2:SetCondition(c94212438.condition) - e2:SetOperation(c94212438.operation) - c:RegisterEffect(e2) - --tograve - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e3:SetRange(LOCATION_SZONE) - e3:SetCode(EVENT_LEAVE_FIELD) - e3:SetCondition(c94212438.tgcon) - e3:SetOperation(c94212438.tgop) - c:RegisterEffect(e3) - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e4:SetCode(EVENT_LEAVE_FIELD) - e4:SetOperation(c94212438.tgop) - c:RegisterEffect(e4) -end -function c94212438.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp -end -function c94212438.cfilter1(c,code) - return c:IsFaceup() and c:IsCode(code) -end -function c94212438.operation(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end - if not Duel.IsExistingMatchingCard(c94212438.cfilter1,tp,LOCATION_SZONE,0,1,nil,31893528) then - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(94212438,1)) - local g=Duel.SelectMatchingCard(tp,Card.IsCode,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil,31893528) - if g:GetCount()>0 then - Duel.MoveToField(g:GetFirst(),tp,tp,LOCATION_SZONE,POS_FACEUP,true) - end - elseif not Duel.IsExistingMatchingCard(c94212438.cfilter1,tp,LOCATION_SZONE,0,1,nil,67287533) then - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(94212438,1)) - local g=Duel.SelectMatchingCard(tp,Card.IsCode,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil,67287533) - if g:GetCount()>0 then - Duel.MoveToField(g:GetFirst(),tp,tp,LOCATION_SZONE,POS_FACEUP,true) - end - elseif not Duel.IsExistingMatchingCard(c94212438.cfilter1,tp,LOCATION_SZONE,0,1,nil,94772232) then - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(94212438,1)) - local g=Duel.SelectMatchingCard(tp,Card.IsCode,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil,94772232) - if g:GetCount()>0 then - Duel.MoveToField(g:GetFirst(),tp,tp,LOCATION_SZONE,POS_FACEUP,true) - end - elseif not Duel.IsExistingMatchingCard(c94212438.cfilter1,tp,LOCATION_SZONE,0,1,nil,30170981) then - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(94212438,1)) - local g=Duel.SelectMatchingCard(tp,Card.IsCode,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil,30170981) - if g:GetCount()>0 then - Duel.MoveToField(g:GetFirst(),tp,tp,LOCATION_SZONE,POS_FACEUP,true) - Duel.Win(tp,0x15) - end - end -end -function c94212438.cfilter2(c,tp) - local code=c:GetCode() - return (code==94212438 or code==31893528 or code==67287533 or code==94772232 or code==30170981) and c:IsControler(tp) -end -function c94212438.cfilter3(c) - local code=c:GetCode() - return c:IsFaceup() and (code==94212438 or code==31893528 or code==67287533 or code==94772232 or code==30170981) -end -function c94212438.tgcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c94212438.cfilter2,1,nil,tp) -end -function c94212438.tgop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c94212438.cfilter3,tp,LOCATION_SZONE,0,nil) - Duel.SendtoGrave(g,REASON_EFFECT) -end diff --git a/script/c94215860.lua b/script/c94215860.lua deleted file mode 100644 index bc54e9bf5c..0000000000 --- a/script/c94215860.lua +++ /dev/null @@ -1,85 +0,0 @@ ---夜叉 -function c94215860.initial_effect(c) - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(aux.FALSE) - c:RegisterEffect(e1) - --summon,flip - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetCode(EVENT_SUMMON_SUCCESS) - e2:SetOperation(c94215860.retreg) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EVENT_FLIP) - c:RegisterEffect(e3) - --return - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(94215860,0)) - e4:SetCategory(CATEGORY_TOHAND) - e4:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e4:SetCode(EVENT_SUMMON_SUCCESS) - e4:SetTarget(c94215860.srettg) - e4:SetOperation(c94215860.sretop) - c:RegisterEffect(e4) - local e5=e4:Clone() - e5:SetCode(EVENT_FLIP) - c:RegisterEffect(e5) -end -function c94215860.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand() -end -function c94215860.srettg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and c94215860.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c94215860.filter,tp,0,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g=Duel.SelectTarget(tp,c94215860.filter,tp,0,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c94215860.sretop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - end -end -function c94215860.retreg(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - --to hand - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetDescription(aux.Stringid(94215860,0)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetReset(RESET_EVENT+0x1ee0000+RESET_PHASE+PHASE_END) - e1:SetCondition(c94215860.retcon) - e1:SetTarget(c94215860.rettg) - e1:SetOperation(c94215860.retop) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - c:RegisterEffect(e2) -end -function c94215860.retcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsHasEffect(EFFECT_SPIRIT_DONOT_RETURN) then return false end - if e:IsHasType(EFFECT_TYPE_TRIGGER_F) then - return not c:IsHasEffect(EFFECT_SPIRIT_MAYNOT_RETURN) - else return c:IsHasEffect(EFFECT_SPIRIT_MAYNOT_RETURN) end -end -function c94215860.rettg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0) -end -function c94215860.retop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - Duel.SendtoHand(c,nil,REASON_EFFECT) - end -end diff --git a/script/c94220427.lua b/script/c94220427.lua deleted file mode 100644 index eff9389306..0000000000 --- a/script/c94220427.lua +++ /dev/null @@ -1,77 +0,0 @@ ---RUM-アージェント・カオス・フォース -function c94220427.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c94220427.target) - e1:SetOperation(c94220427.activate) - c:RegisterEffect(e1) - --salvage - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(94220427,0)) - e2:SetCategory(CATEGORY_TOHAND) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetRange(LOCATION_GRAVE) - e2:SetCountLimit(1,94220427+EFFECT_COUNT_CODE_DUEL) - e2:SetCondition(c94220427.thcon) - e2:SetTarget(c94220427.thtg) - e2:SetOperation(c94220427.thop) - c:RegisterEffect(e2) -end -function c94220427.filter1(c,e,tp) - local rk=c:GetRank() - return rk>4 and c:IsFaceup() and c:IsType(TYPE_XYZ) - and Duel.IsExistingMatchingCard(c94220427.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,c,rk+1,c:GetCode()) -end -function c94220427.filter2(c,e,tp,mc,rk,code) - if c:GetOriginalCode()==6165656 and code~=48995978 then return false end - return c:GetRank()==rk and (c:IsSetCard(0x1048) or c:IsSetCard(0x1073)) and mc:IsCanBeXyzMaterial(c) - and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) -end -function c94220427.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c94220427.filter1(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsExistingTarget(c94220427.filter1,tp,LOCATION_MZONE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - Duel.SelectTarget(tp,c94220427.filter1,tp,LOCATION_MZONE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function c94220427.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<0 then return end - local tc=Duel.GetFirstTarget() - if tc:IsFacedown() or not tc:IsRelateToEffect(e) or tc:IsControler(1-tp) or tc:IsImmuneToEffect(e) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c94220427.filter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc,tc:GetRank()+1,tc:GetCode()) - local sc=g:GetFirst() - if sc then - local mg=tc:GetOverlayGroup() - if mg:GetCount()~=0 then - Duel.Overlay(sc,mg) - end - sc:SetMaterial(Group.FromCards(tc)) - Duel.Overlay(sc,Group.FromCards(tc)) - Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP) - sc:CompleteProcedure() - end -end -function c94220427.cfilter(c,tp) - return c:IsFaceup() and c:IsRankAbove(5) and c:IsControler(tp) -end -function c94220427.thcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c94220427.cfilter,1,nil,tp) -end -function c94220427.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToHand() end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0) -end -function c94220427.thop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SendtoHand(c,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,c) - end -end diff --git a/script/c94230224.lua b/script/c94230224.lua deleted file mode 100644 index 7d619c2fb3..0000000000 --- a/script/c94230224.lua +++ /dev/null @@ -1,27 +0,0 @@ ---ニードル・ボール -function c94230224.initial_effect(c) - --flip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(94230224,0)) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_DELAY) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP+EFFECT_TYPE_TRIGGER_O) - e1:SetCost(c94230224.cost) - e1:SetTarget(c94230224.target) - e1:SetOperation(c94230224.operation) - c:RegisterEffect(e1) -end -function c94230224.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,2000) end - Duel.PayLPCost(tp,2000) -end -function c94230224.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(1000) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,1000) -end -function c94230224.operation(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c94243005.lua b/script/c94243005.lua deleted file mode 100644 index 8bf1e6d35f..0000000000 --- a/script/c94243005.lua +++ /dev/null @@ -1,88 +0,0 @@ ---混沌空間 -function c94243005.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --add counter - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetRange(LOCATION_SZONE) - e2:SetCode(EVENT_REMOVE) - e2:SetOperation(c94243005.ctop) - c:RegisterEffect(e2) - --special summon - local e3=Effect.CreateEffect(c) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetDescription(aux.Stringid(94243005,0)) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetCountLimit(1) - e3:SetRange(LOCATION_SZONE) - e3:SetTarget(c94243005.sptg) - e3:SetOperation(c94243005.spop) - c:RegisterEffect(e3) - --search - local e4=Effect.CreateEffect(c) - e4:SetCategory(CATEGORY_TOHAND) - e4:SetDescription(aux.Stringid(94243005,1)) - e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e4:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE) - e4:SetCode(EVENT_LEAVE_FIELD) - e4:SetCondition(c94243005.thcon) - e4:SetTarget(c94243005.thtg) - e4:SetOperation(c94243005.thop) - c:RegisterEffect(e4) -end -function c94243005.ctfilter(c) - return c:IsFaceup() and c:IsType(TYPE_MONSTER) and not c:IsPreviousLocation(0x80+LOCATION_SZONE) and not c:IsType(TYPE_TOKEN) -end -function c94243005.ctop(e,tp,eg,ep,ev,re,r,rp) - local ct=eg:FilterCount(c94243005.ctfilter,nil) - if ct>0 then - e:GetHandler():AddCounter(0x13,ct) - end -end -function c94243005.spfilter(c,e,tp) - local lv=c:GetLevel() - return lv>3 and c:IsFaceup() and Duel.IsCanRemoveCounter(tp,1,0,0x13,lv,REASON_COST) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c94243005.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_REMOVED) and c94243005.spfilter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c94243005.spfilter,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c94243005.spfilter,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,1,nil,e,tp) - Duel.RemoveCounter(tp,1,0,0x13,g:GetFirst():GetLevel(),REASON_COST) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c94243005.spop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end -function c94243005.thcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local ct=c:GetCounter(0x13) - e:SetLabel(ct) - return c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsLocation(LOCATION_GRAVE) and c:GetPreviousControler()==tp - and ct>0 and rp~=tp and bit.band(r,REASON_EFFECT)~=0 -end -function c94243005.thfilter(c,lv) - return c:IsLevelBelow(lv) and c:IsAttribute(ATTRIBUTE_LIGHT+ATTRIBUTE_DARK) and c:IsAbleToHand() -end -function c94243005.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c94243005.thfilter,tp,LOCATION_DECK,0,1,nil,e:GetLabel()) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c94243005.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c94243005.thfilter,tp,LOCATION_DECK,0,1,1,nil,e:GetLabel()) - if g:GetCount()~=0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c94253609.lua b/script/c94253609.lua deleted file mode 100644 index a53317ad0e..0000000000 --- a/script/c94253609.lua +++ /dev/null @@ -1,33 +0,0 @@ ---エレメンタル・アブソーバー -function c94253609.initial_effect(c) - --activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c94253609.cost) - c:RegisterEffect(e1) - --cannot attack - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_CANNOT_ATTACK) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(0,LOCATION_MZONE) - e2:SetTarget(c94253609.atktarget) - c:RegisterEffect(e2) - e1:SetLabelObject(e2) -end -function c94253609.cfilter(c) - return c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost() -end -function c94253609.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c94253609.cfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c94253609.cfilter,tp,LOCATION_HAND,0,1,1,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) - local att=g:GetFirst():GetAttribute() - e:GetLabelObject():SetLabel(att) - e:GetHandler():SetHint(CHINT_ATTRIBUTE,att) -end -function c94253609.atktarget(e,c) - return c:IsAttribute(e:GetLabel()) -end diff --git a/script/c94256039.lua b/script/c94256039.lua deleted file mode 100644 index cec67a5a65..0000000000 --- a/script/c94256039.lua +++ /dev/null @@ -1,53 +0,0 @@ ---バベル・タワー -function c94256039.initial_effect(c) - c:EnableCounterPermit(0x3001) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --add counter - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetCode(EVENT_CHAINING) - e2:SetRange(LOCATION_SZONE) - e2:SetOperation(aux.chainreg) - c:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e3:SetCode(EVENT_CHAIN_SOLVED) - e3:SetRange(LOCATION_SZONE) - e3:SetOperation(c94256039.acop) - c:RegisterEffect(e3) - --destroy&damage - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(94256039,0)) - e4:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e4:SetCode(94256039) - e4:SetTarget(c94256039.damtg) - e4:SetOperation(c94256039.damop) - c:RegisterEffect(e4) -end -function c94256039.acop(e,tp,eg,ep,ev,re,r,rp) - local p=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_PLAYER) - local c=e:GetHandler() - if re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL) and c:GetFlagEffect(1)>0 then - c:AddCounter(0x3001,1) - if c:GetCounter(0x3001)==4 then - Duel.RaiseSingleEvent(c,94256039,re,0,0,p,0) - end - end -end -function c94256039.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsRelateToEffect(e) end - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,ep,3000) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0) -end -function c94256039.damop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - if Duel.Destroy(e:GetHandler(),REASON_EFFECT)~=0 then - Duel.Damage(ep,3000,REASON_EFFECT) - end -end diff --git a/script/c94283662.lua b/script/c94283662.lua deleted file mode 100644 index 87839648f8..0000000000 --- a/script/c94283662.lua +++ /dev/null @@ -1,66 +0,0 @@ ---トランス・デーモン -function c94283662.initial_effect(c) - --atk up - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(94283662,0)) - e1:SetCategory(CATEGORY_HANDES+CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_MZONE) - e1:SetTarget(c94283662.target) - e1:SetOperation(c94283662.operation) - c:RegisterEffect(e1) - --salvage - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(94283662,1)) - e2:SetCategory(CATEGORY_TOHAND) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetCondition(c94283662.thcon) - e2:SetTarget(c94283662.thtg) - e2:SetOperation(c94283662.thop) - c:RegisterEffect(e2) -end -function c94283662.dfilter(c) - return c:IsRace(RACE_FIEND) and c:IsDiscardable() -end -function c94283662.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c94283662.dfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1) -end -function c94283662.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local ct=Duel.DiscardHand(tp,c94283662.dfilter,1,1,REASON_EFFECT+REASON_DISCARD,nil) - if ct>0 and c:IsFaceup() and c:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+0x1ff0000+RESET_PHASE+PHASE_END) - e1:SetValue(500) - c:RegisterEffect(e1) - end -end -function c94283662.thcon(e,tp,eg,ep,ev,re,r,rp) - return bit.band(r,REASON_DESTROY)>0 - and e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) - and e:GetHandler():GetPreviousControler()==tp -end -function c94283662.filter(c) - return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_DARK) and c:IsAbleToHand() -end -function c94283662.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_REMOVED) and c94283662.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c94283662.filter,tp,LOCATION_REMOVED,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c94283662.filter,tp,LOCATION_REMOVED,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0) -end -function c94283662.thop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end diff --git a/script/c94303232.lua b/script/c94303232.lua deleted file mode 100644 index 3888b7a463..0000000000 --- a/script/c94303232.lua +++ /dev/null @@ -1,107 +0,0 @@ ---プリベント・スター -function c94303232.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c94303232.target) - e1:SetOperation(c94303232.operation) - c:RegisterEffect(e1) - --Equip limit - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_EQUIP_LIMIT) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetValue(c94303232.eqlimit) - c:RegisterEffect(e2) - --Remove - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(94303232,0)) - e3:SetCategory(CATEGORY_REMOVE) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e3:SetCode(EVENT_LEAVE_FIELD) - e3:SetCondition(c94303232.rmcon) - e3:SetTarget(c94303232.rmtg) - e3:SetOperation(c94303232.rmop) - e3:SetLabelObject(e1) - c:RegisterEffect(e3) - if not c94303232.global_check then - c94303232.global_check=true - local ge1=Effect.CreateEffect(c) - ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - ge1:SetCode(EVENT_CHANGE_POS) - ge1:SetOperation(c94303232.checkop) - Duel.RegisterEffect(ge1,0) - end -end -function c94303232.checkop(e,tp,eg,ep,ev,re,r,rp) - local tc=eg:GetFirst() - while tc do - if tc:IsPreviousPosition(POS_FACEUP_ATTACK) and tc:IsPosition(POS_FACEUP_DEFENCE) then - tc:RegisterFlagEffect(94303232,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) - end - tc=eg:GetNext() - end -end -function c94303232.eqlimit(e,c) - return c:GetFlagEffect(94303232)~=0 or c:GetFlagEffect(94303233)~=0 -end -function c94303232.filter(c) - return c:IsFaceup() and c:GetFlagEffect(94303232)~=0 -end -function c94303232.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - if chk==0 then return Duel.IsExistingTarget(c94303232.filter,tp,LOCATION_MZONE,0,1,nil) - and Duel.IsExistingTarget(nil,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c94303232.filter,tp,LOCATION_MZONE,0,1,1,nil) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPPO) - local g=Duel.SelectTarget(tp,nil,tp,0,LOCATION_MZONE,1,1,nil) - e:SetLabelObject(g:GetFirst()) -end -function c94303232.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local dc=e:GetLabelObject() - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local tc=g:GetFirst() - if dc==tc then tc=g:GetNext() end - if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - if Duel.Equip(tp,c,tc) and dc:IsRelateToEffect(e) then - tc:RegisterFlagEffect(94303233,RESET_EVENT+0x1fe0000,0,1) - c:SetCardTarget(dc) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_OWNER_RELATE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_CANNOT_CHANGE_POSITION) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetCondition(c94303232.rcon) - dc:RegisterEffect(e1,true) - local e2=e1:Clone() - e2:SetCode(EFFECT_CANNOT_ATTACK) - dc:RegisterEffect(e2,true) - end - end -end -function c94303232.rcon(e) - return e:GetOwner():IsHasCardTarget(e:GetHandler()) -end -function c94303232.rmcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsLocation(LOCATION_GRAVE) and c:IsReason(REASON_LOST_TARGET) and c:GetPreviousEquipTarget():IsReason(REASON_DESTROY) - and c:IsHasCardTarget(e:GetLabelObject():GetLabelObject()) -end -function c94303232.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local tc=e:GetLabelObject():GetLabelObject() - Duel.SetTargetCard(tc) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,tc,1,0,0) -end -function c94303232.rmop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) - end -end diff --git a/script/c94331452.lua b/script/c94331452.lua deleted file mode 100644 index da250a7f01..0000000000 --- a/script/c94331452.lua +++ /dev/null @@ -1,59 +0,0 @@ ---音響戦士ドラムス -function c94331452.initial_effect(c) - --attribute change - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(94331452,0)) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetTarget(c94331452.target1) - e1:SetOperation(c94331452.operation) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(94331452,0)) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_GRAVE) - e2:SetCost(c94331452.cost) - e2:SetTarget(c94331452.target2) - e2:SetOperation(c94331452.operation) - c:RegisterEffect(e2) -end -function c94331452.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) -end -function c94331452.filter(c) - return c:IsFaceup() and c:IsSetCard(0x1066) and c:IsLevelAbove(1) -end -function c94331452.target1(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c94331452.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c94331452.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c94331452.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.Hint(HINT_SELECTMSG,tp,562) - local rc=Duel.AnnounceAttribute(tp,1,0xffff) - e:SetLabel(rc) -end -function c94331452.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c94331452.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c94331452.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c94331452.filter,tp,LOCATION_MZONE,0,1,1,nil) - Duel.Hint(HINT_SELECTMSG,tp,562) - local rc=Duel.AnnounceAttribute(tp,1,0xffff) - e:SetLabel(rc) -end -function c94331452.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CHANGE_ATTRIBUTE) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(e:GetLabel()) - tc:RegisterEffect(e1) - end -end diff --git a/script/c9433350.lua b/script/c9433350.lua deleted file mode 100644 index 715209bf4c..0000000000 --- a/script/c9433350.lua +++ /dev/null @@ -1,92 +0,0 @@ ---Sin 青眼の白龍 -function c9433350.initial_effect(c) - c:EnableReviveLimit() - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c9433350.spcon) - e1:SetOperation(c9433350.spop) - c:RegisterEffect(e1) - --only 1 can exists - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_CANNOT_FLIP_SUMMON) - e2:SetCondition(c9433350.excon) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - c:RegisterEffect(e3) - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_FIELD) - e4:SetRange(LOCATION_MZONE) - e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e4:SetTargetRange(1,1) - e4:SetCode(EFFECT_CANNOT_SUMMON) - e4:SetTarget(c9433350.sumlimit) - c:RegisterEffect(e4) - local e5=e4:Clone() - e5:SetCode(EFFECT_CANNOT_FLIP_SUMMON) - c:RegisterEffect(e5) - local e6=e4:Clone() - e6:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - c:RegisterEffect(e6) - --selfdes - local e7=Effect.CreateEffect(c) - e7:SetType(EFFECT_TYPE_SINGLE) - e7:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e7:SetRange(LOCATION_MZONE) - e7:SetCode(EFFECT_SELF_DESTROY) - e7:SetCondition(c9433350.descon) - c:RegisterEffect(e7) - local e8=Effect.CreateEffect(c) - e8:SetType(EFFECT_TYPE_FIELD) - e8:SetCode(EFFECT_SELF_DESTROY) - e8:SetRange(LOCATION_MZONE) - e8:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e8:SetTarget(c9433350.destarget) - c:RegisterEffect(e8) - --cannot announce - local e8=Effect.CreateEffect(c) - e8:SetType(EFFECT_TYPE_FIELD) - e8:SetRange(LOCATION_MZONE) - e8:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE) - e8:SetTargetRange(LOCATION_MZONE,0) - e8:SetTarget(c9433350.antarget) - c:RegisterEffect(e8) -end -function c9433350.sumlimit(e,c) - return c:IsSetCard(0x23) -end -function c9433350.exfilter(c) - return c:IsFaceup() and c:IsSetCard(0x23) -end -function c9433350.excon(e) - return Duel.IsExistingMatchingCard(c9433350.exfilter,0,LOCATION_MZONE,LOCATION_MZONE,1,nil) -end -function c9433350.spfilter(c) - return c:IsCode(89631139) and c:IsAbleToRemoveAsCost() -end -function c9433350.spcon(e,c) - if c==nil then return true end - return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c9433350.spfilter,c:GetControler(),LOCATION_DECK,0,1,nil) - and not Duel.IsExistingMatchingCard(c9433350.exfilter,0,LOCATION_MZONE,LOCATION_MZONE,1,nil) -end -function c9433350.spop(e,tp,eg,ep,ev,re,r,rp,c) - local tc=Duel.GetFirstMatchingCard(c9433350.spfilter,tp,LOCATION_DECK,0,nil) - Duel.Remove(tc,POS_FACEUP,REASON_COST) -end -function c9433350.descon(e) - local f1=Duel.GetFieldCard(0,LOCATION_SZONE,5) - local f2=Duel.GetFieldCard(1,LOCATION_SZONE,5) - return (f1==nil or f1:IsFacedown()) and (f2==nil or f2:IsFacedown()) -end -function c9433350.destarget(e,c) - return c:IsSetCard(0x23) and c:GetFieldID()>e:GetHandler():GetFieldID() -end -function c9433350.antarget(e,c) - return c~=e:GetHandler() -end diff --git a/script/c94374859.lua b/script/c94374859.lua deleted file mode 100644 index 3126bae3dd..0000000000 --- a/script/c94374859.lua +++ /dev/null @@ -1,39 +0,0 @@ ---押し売りゾンビ -function c94374859.initial_effect(c) - --activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --todeck - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(94374859,0)) - e2:SetCategory(CATEGORY_TODECK) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetRange(LOCATION_SZONE) - e2:SetCode(EVENT_BATTLE_DAMAGE) - e2:SetCondition(c94374859.condition) - e2:SetTarget(c94374859.target) - e2:SetOperation(c94374859.operation) - c:RegisterEffect(e2) -end -function c94374859.condition(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp and eg:GetFirst():GetControler()==tp -end -function c94374859.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(1-tp) and chkc:IsAbleToDeck() end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectTarget(tp,Card.IsAbleToDeck,tp,0,LOCATION_GRAVE,1,1,nil) - if g:GetCount()>0 then - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0) - end -end -function c94374859.operation(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.SendtoDeck(tc,nil,1,REASON_EFFECT) - end -end diff --git a/script/c94377247.lua b/script/c94377247.lua deleted file mode 100644 index bbee0ae8e4..0000000000 --- a/script/c94377247.lua +++ /dev/null @@ -1,4 +0,0 @@ ---仮面魔獣の儀式 -function c94377247.initial_effect(c) - aux.AddRitualProcGreater(c,aux.FilterBoolFunction(Card.IsCode,49064413)) -end diff --git a/script/c94380860.lua b/script/c94380860.lua deleted file mode 100644 index eabce36fe0..0000000000 --- a/script/c94380860.lua +++ /dev/null @@ -1,43 +0,0 @@ ---No.103 神葬零嬢ラグナ・ゼロ -function c94380860.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,4,2) - c:EnableReviveLimit() - -- - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(94380860,0)) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCost(c94380860.cost) - e1:SetTarget(c94380860.target) - e1:SetOperation(c94380860.operation) - e1:SetHintTiming(0,0x1e0) - c:RegisterEffect(e1) -end -c94380860.xyz_number=103 -function c94380860.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c94380860.filter(c) - return c:IsPosition(POS_FACEUP_ATTACK) and c:GetAttack()~=c:GetBaseAttack() and c:IsDestructable() -end -function c94380860.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and c94380860.filter(chkc) end - if chk==0 then return Duel.IsPlayerCanDraw(tp,1) - and Duel.IsExistingTarget(c94380860.filter,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c94380860.filter,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c94380860.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)~=0 then - Duel.Draw(tp,1,REASON_EFFECT) - end -end diff --git a/script/c94381039.lua b/script/c94381039.lua deleted file mode 100644 index f8dcde92a8..0000000000 --- a/script/c94381039.lua +++ /dev/null @@ -1,51 +0,0 @@ ---ライトロード・エンジェル ケルビム -function c94381039.initial_effect(c) - --summon success - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(94381039,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetCondition(c94381039.condition) - e1:SetCost(c94381039.cost) - e1:SetTarget(c94381039.target) - e1:SetOperation(c94381039.operation) - c:RegisterEffect(e1) - --tribute check - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_MATERIAL_CHECK) - e2:SetValue(c94381039.valcheck) - e2:SetLabelObject(e1) - c:RegisterEffect(e2) -end -function c94381039.valcheck(e,c) - local g=c:GetMaterial() - if g:IsExists(Card.IsSetCard,1,nil,0x38) then - e:GetLabelObject():SetLabel(1) - else - e:GetLabelObject():SetLabel(0) - end -end -function c94381039.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_ADVANCE and e:GetLabel()==1 -end -function c94381039.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDiscardDeckAsCost(tp,4) end - Duel.DiscardDeck(tp,4,REASON_COST) -end -function c94381039.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and chkc:IsDestructable() end - if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,0,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,0,LOCATION_ONFIELD,1,2,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c94381039.operation(e,tp,eg,ep,ev,re,r,rp) - local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local g=tg:Filter(Card.IsRelateToEffect,nil,e) - if g:GetCount()>0 then - Duel.Destroy(g,REASON_EFFECT) - end -end diff --git a/script/c94415058.lua b/script/c94415058.lua deleted file mode 100644 index 82106fdf34..0000000000 --- a/script/c94415058.lua +++ /dev/null @@ -1,91 +0,0 @@ ---星読みの魔術師 -function c94415058.initial_effect(c) - --pendulum summon - aux.AddPendulumProcedure(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --actlimit - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_ATTACK_ANNOUNCE) - e2:SetRange(LOCATION_PZONE) - e2:SetCondition(c94415058.actcon) - e2:SetOperation(c94415058.actop) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EVENT_BE_BATTLE_TARGET) - c:RegisterEffect(e3) - --scale - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetCode(EFFECT_CHANGE_LSCALE) - e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e4:SetRange(LOCATION_PZONE) - e4:SetCondition(c94415058.sccon) - e4:SetValue(4) - c:RegisterEffect(e4) - local e5=e4:Clone() - e5:SetCode(EFFECT_CHANGE_RSCALE) - c:RegisterEffect(e5) - -- - local e6=Effect.CreateEffect(c) - e6:SetDescription(aux.Stringid(94415058,0)) - e6:SetCategory(CATEGORY_SPECIAL_SUMMON) - e6:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e6:SetCode(EVENT_TO_HAND) - e6:SetRange(LOCATION_MZONE) - e6:SetCountLimit(1) - e6:SetCondition(c94415058.spcon) - e6:SetTarget(c94415058.sptg) - e6:SetOperation(c94415058.spop) - c:RegisterEffect(e6) -end -function c94415058.actcon(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetAttacker() - if tc:IsControler(1-tp) then tc=Duel.GetAttackTarget() end - return tc and tc:IsControler(tp) and tc:IsType(TYPE_PENDULUM) -end -function c94415058.actop(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EFFECT_CANNOT_ACTIVATE) - e1:SetTargetRange(0,1) - e1:SetValue(c94415058.aclimit) - e1:SetReset(RESET_PHASE+PHASE_DAMAGE) - Duel.RegisterEffect(e1,tp) -end -function c94415058.aclimit(e,re,tp) - return re:IsActiveType(TYPE_SPELL) and re:IsHasType(EFFECT_TYPE_ACTIVATE) -end -function c94415058.sccon(e) - local seq=e:GetHandler():GetSequence() - local tc=Duel.GetFieldCard(e:GetHandlerPlayer(),LOCATION_SZONE,13-seq) - return not tc or (not tc:IsSetCard(0x98) and not tc:IsSetCard(0x99)) -end -function c94415058.spcon(e,tp,eg,ep,ev,re,r,rp) - local tc=eg:GetFirst() - e:SetLabel(tc:GetCode()) - return eg:GetCount()==1 and rp~=tp and tc:IsReason(REASON_EFFECT) - and tc:GetPreviousControler()==tp and tc:IsPreviousLocation(LOCATION_MZONE) - and tc:IsType(TYPE_PENDULUM) and tc:IsControler(tp) -end -function c94415058.filter(c,e,tp,code) - return c:IsCode(code) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c94415058.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c94415058.filter,tp,LOCATION_HAND,0,1,nil,e,tp,e:GetLabel()) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c94415058.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c94415058.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp,e:GetLabel()) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c94425169.lua b/script/c94425169.lua deleted file mode 100644 index d0e4b6af05..0000000000 --- a/script/c94425169.lua +++ /dev/null @@ -1,26 +0,0 @@ ---エレメントの泉 -function c94425169.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --LP up - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetProperty(EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_TO_HAND) - e2:SetRange(LOCATION_SZONE) - e2:SetCondition(c94425169.condition) - e2:SetOperation(c94425169.operation) - c:RegisterEffect(e2) -end -function c94425169.filter(c) - return c:IsPreviousLocation(LOCATION_MZONE) and c:IsType(TYPE_MONSTER) -end -function c94425169.condition(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c94425169.filter,1,nil) -end -function c94425169.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.Recover(tp,500,REASON_EFFECT) -end diff --git a/script/c94432298.lua b/script/c94432298.lua deleted file mode 100644 index 42384333e7..0000000000 --- a/script/c94432298.lua +++ /dev/null @@ -1,73 +0,0 @@ ---殻醒する煉獄 -function c94432298.initial_effect(c) - Duel.EnableGlobalFlag(GLOBALFLAG_SELF_TOGRAVE) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(TIMING_STANDBY_PHASE,0) - e1:SetTarget(c94432298.tgtg1) - e1:SetOperation(c94432298.tgop) - c:RegisterEffect(e1) - --tograve - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_TOGRAVE) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetRange(LOCATION_SZONE) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) - e2:SetCountLimit(1) - e2:SetCondition(c94432298.tgcon) - e2:SetCost(c94432298.tgcost) - e2:SetTarget(c94432298.tgtg2) - e2:SetOperation(c94432298.tgop) - c:RegisterEffect(e2) - --tograve - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e3:SetRange(LOCATION_SZONE) - e3:SetCode(EFFECT_SELF_TOGRAVE) - e3:SetCondition(c94432298.sdcon) - c:RegisterEffect(e3) -end -function c94432298.tgtg1(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - if Duel.GetTurnPlayer()==tp and Duel.GetCurrentPhase()==PHASE_STANDBY - and Duel.IsExistingMatchingCard(c94432298.filter,tp,LOCATION_DECK,0,1,nil) - and Duel.SelectYesNo(tp,aux.Stringid(94432298,0)) then - e:SetCategory(CATEGORY_TOGRAVE) - e:GetHandler():RegisterFlagEffect(94432298,RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END,0,1) - e:GetHandler():RegisterFlagEffect(0,RESET_CHAIN,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(94432298,1)) - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) - else - e:SetCategory(0) - end -end -function c94432298.tgcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c94432298.tgcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():GetFlagEffect(94432298)==0 end - e:GetHandler():RegisterFlagEffect(94432298,RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END,0,1) -end -function c94432298.filter(c) - return c:IsSetCard(0xbb) and c:IsAbleToGrave() -end -function c94432298.tgtg2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c94432298.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) -end -function c94432298.tgop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():GetFlagEffect(94432298)==0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c94432298.filter,tp,LOCATION_DECK,0,1,2,nil) - if g:GetCount()>0 then - Duel.SendtoGrave(g,REASON_EFFECT) - end -end -function c94432298.sdfilter(c) - return c:IsFacedown() or not c:IsSetCard(0xbb) -end -function c94432298.sdcon(e) - return Duel.IsExistingMatchingCard(c94432298.sdfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) -end diff --git a/script/c94454495.lua b/script/c94454495.lua deleted file mode 100644 index 61f6f8cb24..0000000000 --- a/script/c94454495.lua +++ /dev/null @@ -1,66 +0,0 @@ ---Kozmo Sliprider -function c94454495.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e1:SetTarget(c94454495.destg) - e1:SetOperation(c94454495.desop) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e2) - --spsummon - local e3=Effect.CreateEffect(c) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_TO_GRAVE) - e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e3:SetCondition(c94454495.spcon) - e3:SetCost(c94454495.spcost) - e3:SetTarget(c94454495.sptg) - e3:SetOperation(c94454495.spop) - c:RegisterEffect(e3) -end -function c94454495.desfilter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable() -end -function c94454495.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and c94454495.desfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c94454495.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c94454495.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c94454495.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end -function c94454495.spcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE+REASON_EFFECT) -end -function c94454495.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() and e:GetHandler():IsLocation(LOCATION_GRAVE) end - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) -end -function c94454495.spfilter(c,e,tp) - return c:IsSetCard(0xd2) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c94454495.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c94454495.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c94454495.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c94454495.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c94463200.lua b/script/c94463200.lua deleted file mode 100644 index 58dece38ae..0000000000 --- a/script/c94463200.lua +++ /dev/null @@ -1,71 +0,0 @@ ---血の刻印 -function c94463200.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(TIMING_STANDBY_PHASE,0) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c94463200.target) - e1:SetOperation(c94463200.operation) - c:RegisterEffect(e1) - --lpcost - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetRange(LOCATION_SZONE) - e2:SetCode(EVENT_PAY_LPCOST) - e2:SetCondition(c94463200.lpcon) - e2:SetOperation(c94463200.lpop) - c:RegisterEffect(e2) - --Destroy - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e3:SetRange(LOCATION_SZONE) - e3:SetCode(EVENT_LEAVE_FIELD) - e3:SetCondition(c94463200.descon) - e3:SetOperation(c94463200.desop) - c:RegisterEffect(e3) - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e4:SetCode(EVENT_LEAVE_FIELD) - e4:SetOperation(c94463200.desop2) - c:RegisterEffect(e4) -end -function c94463200.filter(c) - return c:IsFaceup() and c:IsSetCard(0x45) -end -function c94463200.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c94463200.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c94463200.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c94463200.filter,tp,LOCATION_MZONE,0,1,1,nil) -end -function c94463200.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsRelateToEffect(e) then - c:SetCardTarget(tc) - end -end -function c94463200.lpcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()==PHASE_STANDBY and ep==tp - and re:GetHandler()==e:GetHandler():GetFirstCardTarget() -end -function c94463200.lpop(e,tp,eg,ep,ev,re,r,rp) - Duel.PayLPCost(1-ep,ev) -end -function c94463200.descon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsStatus(STATUS_DESTROY_CONFIRMED) then return false end - local tc=c:GetFirstCardTarget() - return tc and eg:IsContains(tc) and tc:IsReason(REASON_DESTROY) -end -function c94463200.desop(e,tp,eg,ep,ev,re,r,rp) - Duel.Destroy(e:GetHandler(), REASON_EFFECT) -end -function c94463200.desop2(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetHandler():GetFirstCardTarget() - if tc and tc:IsLocation(LOCATION_MZONE) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c94484482.lua b/script/c94484482.lua deleted file mode 100644 index cf63f1427b..0000000000 --- a/script/c94484482.lua +++ /dev/null @@ -1,55 +0,0 @@ ---スリップ・サモン -function c94484482.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetCondition(c94484482.condition) - e1:SetTarget(c94484482.target) - e1:SetOperation(c94484482.activate) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetCondition(c94484482.condition2) - c:RegisterEffect(e2) - local e3=e1:Clone() - e3:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - c:RegisterEffect(e3) -end -function c94484482.condition(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp -end -function c94484482.cfilter(c,tp) - return c:GetSummonPlayer()==1-tp -end -function c94484482.condition2(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c94484482.cfilter,1,nil,tp) -end -function c94484482.spfilter(c,e,tp) - return c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c94484482.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c94484482.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c94484482.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c94484482.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - local tc=g:GetFirst() - if tc and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENCE)~=0 then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetOperation(c94484482.retop) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - end -end -function c94484482.retop(e,tp,eg,ep,ev,re,r,rp) - Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT) -end diff --git a/script/c94515289.lua b/script/c94515289.lua deleted file mode 100644 index bac4b35e18..0000000000 --- a/script/c94515289.lua +++ /dev/null @@ -1,55 +0,0 @@ ---氷結のフィッツジェラルド -function c94515289.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure2(c,aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_DARK),aux.NonTuner(Card.IsRace,RACE_BEAST)) - c:EnableReviveLimit() - --actlimit - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetOperation(c94515289.operation) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(94515289,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_BATTLE_DESTROYED) - e2:SetCondition(c94515289.spcon) - e2:SetCost(c94515289.spcost) - e2:SetTarget(c94515289.sptg) - e2:SetOperation(c94515289.spop) - c:RegisterEffect(e2) -end -function c94515289.operation(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EFFECT_CANNOT_ACTIVATE) - e1:SetTargetRange(0,1) - e1:SetValue(c94515289.aclimit) - e1:SetReset(RESET_PHASE+PHASE_DAMAGE) - Duel.RegisterEffect(e1,tp) -end -function c94515289.aclimit(e,re,tp) - return re:IsHasType(EFFECT_TYPE_ACTIVATE) -end -function c94515289.spcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsLocation(LOCATION_GRAVE) and c:IsReason(REASON_BATTLE) and Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 -end -function c94515289.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) -end -function c94515289.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c94515289.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)>0 then return end - if e:GetHandler():IsRelateToEffect(e) then - Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP_DEFENCE) - end -end diff --git a/script/c94538053.lua b/script/c94538053.lua deleted file mode 100644 index 573c9cae36..0000000000 --- a/script/c94538053.lua +++ /dev/null @@ -1,48 +0,0 @@ ---マックス・ウォリアー -function c94538053.initial_effect(c) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetCondition(c94538053.condtion) - e1:SetValue(400) - c:RegisterEffect(e1) - --addown - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(94538053,0)) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetCategory(CATEGORY_ATKCHANGE) - e2:SetCode(EVENT_BATTLE_DESTROYING) - e2:SetRange(LOCATION_MZONE) - e2:SetCondition(c94538053.atkcon) - e2:SetOperation(c94538053.atkop) - c:RegisterEffect(e2) -end -function c94538053.condtion(e) - local ph=Duel.GetCurrentPhase() - return (ph==PHASE_DAMAGE or ph==PHASE_DAMAGE_CAL) - and Duel.GetAttacker()==e:GetHandler() and Duel.GetAttackTarget()~=nil -end -function c94538053.atkcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsRelateToBattle() and e:GetHandler():IsFaceup() -end -function c94538053.atkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToBattle() and c:IsFaceup() then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_BASE_ATTACK) - e1:SetValue(c:GetBaseAttack()/2) - e1:SetReset(RESET_EVENT+0x1ff0000+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_SET_BASE_DEFENCE) - e2:SetValue(c:GetBaseDefence()/2) - c:RegisterEffect(e2) - local e3=e1:Clone() - e3:SetCode(EFFECT_CHANGE_LEVEL) - e3:SetValue(2) - c:RegisterEffect(e3) - end -end diff --git a/script/c94566432.lua b/script/c94566432.lua deleted file mode 100644 index e62a770a8e..0000000000 --- a/script/c94566432.lua +++ /dev/null @@ -1,6 +0,0 @@ ---カイザー・ドラゴン -function c94566432.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcCode2(c,87796900,20315854,true,true) -end diff --git a/script/c94568601.lua b/script/c94568601.lua deleted file mode 100644 index 8a8ed53dc6..0000000000 --- a/script/c94568601.lua +++ /dev/null @@ -1,69 +0,0 @@ ---タイラント・ドラゴン ---not fully implemented -function c94568601.initial_effect(c) - --disable - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_DISABLE) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(LOCATION_SZONE,LOCATION_SZONE) - e1:SetTarget(c94568601.distg) - c:RegisterEffect(e1) - --disable effect - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_CHAIN_SOLVING) - e2:SetRange(LOCATION_MZONE) - e2:SetOperation(c94568601.disop) - c:RegisterEffect(e2) - --self destroy - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetCode(EFFECT_SELF_DESTROY) - e3:SetRange(LOCATION_MZONE) - e3:SetTargetRange(LOCATION_SZONE,LOCATION_SZONE) - e3:SetTarget(c94568601.distg) - c:RegisterEffect(e3) - --multiatk - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetCode(EFFECT_EXTRA_ATTACK) - e4:SetValue(1) - e4:SetCondition(c94568601.atkcon) - c:RegisterEffect(e4) - --spsummon cost - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_SINGLE) - e5:SetCode(EFFECT_SPSUMMON_COST) - e5:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_SINGLE_RANGE) - e5:SetRange(LOCATION_GRAVE) - e5:SetCost(c94568601.spcost) - e5:SetOperation(c94568601.spcop) - c:RegisterEffect(e5) -end -function c94568601.distg(e,c) - if not c:IsType(TYPE_TRAP) or c:GetCardTargetCount()==0 then return false end - return c:GetCardTarget():IsContains(e:GetHandler()) -end -function c94568601.disop(e,tp,eg,ep,ev,re,r,rp) - if not re:IsActiveType(TYPE_TRAP) then return end - if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return end - local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) - if not g or g:GetCount()==0 then return end - if g:IsContains(e:GetHandler()) then - Duel.NegateEffect(ev) - if re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(re:GetHandler(),REASON_EFFECT) - end - end -end -function c94568601.atkcon(e) - return Duel.GetFieldGroupCount(e:GetHandlerPlayer(),0,LOCATION_MZONE)>0 -end -function c94568601.spcost(e,c,tp) - return Duel.CheckReleaseGroup(tp,Card.IsRace,1,nil,RACE_DRAGON) -end -function c94568601.spcop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.SelectReleaseGroup(tp,Card.IsRace,1,1,nil,RACE_DRAGON) - Duel.Release(g,REASON_EFFECT) -end diff --git a/script/c94573223.lua b/script/c94573223.lua deleted file mode 100644 index 2719f28625..0000000000 --- a/script/c94573223.lua +++ /dev/null @@ -1,82 +0,0 @@ ---甲虫装機 ギガマンティス -function c94573223.initial_effect(c) - --equip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(94573223,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetRange(LOCATION_HAND) - e1:SetTarget(c94573223.eqtg) - e1:SetOperation(c94573223.eqop) - c:RegisterEffect(e1) - --equip effect - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_SET_BASE_ATTACK) - e2:SetValue(2400) - c:RegisterEffect(e2) - --special summon - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(94573223,1)) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) - e3:SetCode(EVENT_TO_GRAVE) - e3:SetCountLimit(1,94573223) - e3:SetCondition(c94573223.spcon) - e3:SetTarget(c94573223.sptg) - e3:SetOperation(c94573223.spop) - c:RegisterEffect(e3) -end -function c94573223.filter(c) - return c:IsFaceup() and c:IsSetCard(0x56) -end -function c94573223.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c94573223.filter(chkc) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingTarget(c94573223.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c94573223.filter,tp,LOCATION_MZONE,0,1,1,nil) -end -function c94573223.eqop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) then return end - local tc=Duel.GetFirstTarget() - if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or tc:IsFacedown() or not tc:IsRelateToEffect(e) or not tc:IsControler(tp) then - Duel.SendtoGrave(c,REASON_EFFECT) - return - end - Duel.Equip(tp,c,tc,true) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(c94573223.eqlimit) - e1:SetLabelObject(tc) - c:RegisterEffect(e1) -end -function c94573223.eqlimit(e,c) - return c==e:GetLabelObject() -end -function c94573223.spcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:GetPreviousLocation()==LOCATION_SZONE and not c:IsReason(REASON_LOST_TARGET) -end -function c94573223.spfilter(c,e,tp) - return c:IsSetCard(0x56) and c:GetCode()~=94573223 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c94573223.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c94573223.spfilter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c94573223.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c94573223.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c94573223.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c94585852.lua b/script/c94585852.lua deleted file mode 100644 index 36a57c4b54..0000000000 --- a/script/c94585852.lua +++ /dev/null @@ -1,73 +0,0 @@ ---万魔殿-悪魔の巣窟- -function c94585852.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --cost change - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EFFECT_LPCOST_REPLACE) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(1,1) - e2:SetCondition(c94585852.repcon) - c:RegisterEffect(e2) - --search - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e3:SetRange(LOCATION_SZONE) - e3:SetCode(EVENT_TO_GRAVE) - e3:SetOperation(c94585852.regop) - c:RegisterEffect(e3) - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(94585852,0)) - e4:SetCategory(CATEGORY_TOHAND) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e4:SetProperty(EFFECT_FLAG_EVENT_PLAYER+EFFECT_FLAG_DAMAGE_STEP) - e4:SetCode(94585852) - e4:SetTarget(c94585852.target) - e4:SetOperation(c94585852.operation) - c:RegisterEffect(e4) -end -function c94585852.repcon(e,tp,eg,ep,ev,re,r,rp) - if not re then return false end - local rc=re:GetHandler() - return Duel.GetCurrentPhase()==PHASE_STANDBY and rc:IsSetCard(0x45) and rc:IsType(TYPE_MONSTER) -end -function c94585852.regop(e,tp,eg,ep,ev,re,r,rp) - local lv1=0 - local lv2=0 - local tc=eg:GetFirst() - while tc do - if tc:IsReason(REASON_DESTROY) and not tc:IsReason(REASON_BATTLE) and tc:IsSetCard(0x45) then - local tlv=tc:GetLevel() - if tc:IsControler(0) then - if tlv>lv1 then lv1=tlv end - else - if tlv>lv2 then lv2=tlv end - end - end - tc=eg:GetNext() - end - if lv1>0 then Duel.RaiseSingleEvent(e:GetHandler(),94585852,e,0,0,0,lv1) end - if lv2>0 then Duel.RaiseSingleEvent(e:GetHandler(),94585852,e,0,1,1,lv2) end -end -function c94585852.filter(c,lv) - return c:GetLevel()0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c94622638.lua b/script/c94622638.lua deleted file mode 100644 index 58225ce4ea..0000000000 --- a/script/c94622638.lua +++ /dev/null @@ -1,15 +0,0 @@ ---A・ジェネクス・パワーコール -function c94622638.initial_effect(c) - --atkup - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetTarget(c94622638.atktg) - e1:SetValue(500) - c:RegisterEffect(e1) -end -function c94622638.atktg(e,c) - return c~=e:GetHandler() and e:GetHandler():IsAttribute(c:GetAttribute()) -end diff --git a/script/c94626050.lua b/script/c94626050.lua deleted file mode 100644 index 996c33fcab..0000000000 --- a/script/c94626050.lua +++ /dev/null @@ -1,35 +0,0 @@ ---フィッシュ・レイン -function c94626050.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_REMOVE) - e1:SetCondition(c94626050.condition) - e1:SetTarget(c94626050.target) - e1:SetOperation(c94626050.operation) - c:RegisterEffect(e1) -end -function c94626050.cfilter(c) - return c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousPosition(POS_FACEUP) - and c:IsRace(RACE_FISH+RACE_SEASERPENT+RACE_AQUA) -end -function c94626050.condition(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c94626050.cfilter,1,nil) -end -function c94626050.spfilter(c,e,tp) - return c:IsLevelBelow(3) and c:IsRace(RACE_FISH+RACE_SEASERPENT+RACE_AQUA) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c94626050.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c94626050.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c94626050.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c94626050.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - if g:GetCount()~=0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c94634433.lua b/script/c94634433.lua deleted file mode 100644 index 8dd2da0217..0000000000 --- a/script/c94634433.lua +++ /dev/null @@ -1,28 +0,0 @@ ---緊急同調 -function c94634433.initial_effect(c) - --synchro effect - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_BATTLE_START+TIMING_BATTLE_END) - e1:SetCondition(c94634433.sccon) - e1:SetTarget(c94634433.sctg) - e1:SetOperation(c94634433.scop) - c:RegisterEffect(e1) -end -function c94634433.sccon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()==PHASE_BATTLE -end -function c94634433.sctg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,1,nil,nil) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function c94634433.scop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,nil,nil) - if g:GetCount()>0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=g:Select(tp,1,1,nil) - Duel.SynchroSummon(tp,sg:GetFirst(),nil) - end -end diff --git a/script/c94656263.lua b/script/c94656263.lua deleted file mode 100644 index bceb8dcce3..0000000000 --- a/script/c94656263.lua +++ /dev/null @@ -1,38 +0,0 @@ ---カゲトカゲ -function c94656263.initial_effect(c) - c:EnableReviveLimit() - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(94656263,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetRange(LOCATION_HAND) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetCondition(c94656263.spcon) - e1:SetTarget(c94656263.sptg) - e1:SetOperation(c94656263.spop) - c:RegisterEffect(e1) - --unsynchroable - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e2:SetValue(1) - c:RegisterEffect(e2) -end -function c94656263.spcon(e,tp,eg,ep,ev,re,r,rp) - local ec=eg:GetFirst() - return ec:IsControler(tp) and ec:GetLevel()==4 -end -function c94656263.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c94656263.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP) - c:CompleteProcedure() - end -end diff --git a/script/c94662235.lua b/script/c94662235.lua deleted file mode 100644 index b7838a2b48..0000000000 --- a/script/c94662235.lua +++ /dev/null @@ -1,80 +0,0 @@ ---運命湾曲 -function c94662235.initial_effect(c) - --Activate(summon) - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DISABLE_SUMMON+CATEGORY_REMOVE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_SUMMON) - e1:SetCondition(c94662235.condition1) - e1:SetTarget(c94662235.target1) - e1:SetOperation(c94662235.activate1) - c:RegisterEffect(e1) - --Activate(effect) - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_NEGATE+CATEGORY_REMOVE) - e2:SetType(EFFECT_TYPE_ACTIVATE) - e2:SetCode(EVENT_CHAINING) - e2:SetCondition(c94662235.condition2) - e2:SetTarget(c94662235.target2) - e2:SetOperation(c94662235.activate2) - c:RegisterEffect(e2) -end -function c94662235.check(tp) - local ret=false - for i=0,4 do - local c=Duel.GetFieldCard(tp,LOCATION_MZONE,i) - if c and c:IsFaceup() then - if c:IsSetCard(0x31) then ret=true else return false end - end - end - return ret -end -function c94662235.condition1(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentChain()==0 and c94662235.check(tp) -end -function c94662235.target1(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return eg:GetFirst():IsAbleToRemove() end - Duel.SetOperationInfo(0,CATEGORY_DISABLE_SUMMON,eg,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,eg,1,0,0) -end -function c94662235.activate1(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateSummon(eg:GetFirst()) - local ec=eg:GetFirst() - Duel.Remove(ec,POS_FACEUP,REASON_EFFECT) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetRange(LOCATION_REMOVED) - e1:SetCountLimit(1) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e1:SetOperation(c94662235.retop) - ec:RegisterEffect(e1) -end -function c94662235.condition2(e,tp,eg,ep,ev,re,r,rp) - return re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev) and c94662235.check(tp) -end -function c94662235.target2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return eg:GetFirst():IsAbleToRemove() end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - if re:GetHandler():IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_REMOVE,eg,1,0,0) - end -end -function c94662235.activate2(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateActivation(ev) - local ec=eg:GetFirst() - if re:GetHandler():IsRelateToEffect(re) then - Duel.Remove(ec,POS_FACEUP,REASON_EFFECT) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetRange(LOCATION_REMOVED) - e1:SetCountLimit(1) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e1:SetOperation(c94662235.retop) - ec:RegisterEffect(e1) - end -end -function c94662235.retop(e,tp,eg,ep,ev,re,r,rp) - Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT) -end diff --git a/script/c94664694.lua b/script/c94664694.lua deleted file mode 100644 index 0ecc59ee63..0000000000 --- a/script/c94664694.lua +++ /dev/null @@ -1,27 +0,0 @@ ---マッド・デーモン -function c94664694.initial_effect(c) - --pierce - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_PIERCE) - c:RegisterEffect(e1) - --pos - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(94664694,0)) - e2:SetCategory(CATEGORY_POSITION) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_BE_BATTLE_TARGET) - e2:SetTarget(c94664694.target) - e2:SetOperation(c94664694.operation) - c:RegisterEffect(e2) -end -function c94664694.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAttackPos() end - Duel.SetOperationInfo(0,CATEGORY_POSITION,e:GetHandler(),1,0,0) -end -function c94664694.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsPosition(POS_FACEUP_ATTACK) then - Duel.ChangePosition(c,POS_FACEUP_DEFENCE) - end -end diff --git a/script/c94667532.lua b/script/c94667532.lua deleted file mode 100644 index b461070acf..0000000000 --- a/script/c94667532.lua +++ /dev/null @@ -1,35 +0,0 @@ ---機械犬マロン -function c94667532.initial_effect(c) - --damage - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(94667532,0)) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCondition(c94667532.damcon) - e1:SetTarget(c94667532.damtg) - e1:SetOperation(c94667532.damop) - c:RegisterEffect(e1) -end -function c94667532.damcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) and e:GetHandler():IsReason(REASON_DESTROY) -end -function c94667532.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local p=PLAYER_ALL - if not e:GetHandler():IsReason(REASON_BATTLE) then - p=1-tp - end - Duel.SetTargetPlayer(p) - Duel.SetTargetParam(1000) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,p,1000) -end -function c94667532.damop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - if p==PLAYER_ALL then - Duel.Damage(0,d,REASON_EFFECT) - Duel.Damage(1,d,REASON_EFFECT) - else - Duel.Damage(p,d,REASON_EFFECT) - end -end diff --git a/script/c94681654.lua b/script/c94681654.lua deleted file mode 100644 index 025703df30..0000000000 --- a/script/c94681654.lua +++ /dev/null @@ -1,36 +0,0 @@ ---フェザー・ウィンド・アタック -function c94681654.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c94681654.cost) - e1:SetTarget(c94681654.target) - e1:SetOperation(c94681654.activate) - c:RegisterEffect(e1) -end -function c94681654.costfilter(c) - return c:IsFaceup() and c:IsSetCard(0x33) and c:IsAbleToDeckAsCost() -end -function c94681654.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c94681654.costfilter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectMatchingCard(tp,c94681654.costfilter,tp,LOCATION_MZONE,0,1,1,nil) - Duel.SendtoDeck(g,nil,2,REASON_COST) -end -function c94681654.filter(c) - return c:IsSetCard(0x33) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() -end -function c94681654.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c94681654.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c94681654.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c94681654.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c94689635.lua b/script/c94689635.lua deleted file mode 100644 index a0a6122d55..0000000000 --- a/script/c94689635.lua +++ /dev/null @@ -1,45 +0,0 @@ ---紫光の宣告者 -function c94689635.initial_effect(c) - --Negate - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(94689635,0)) - e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_CHAINING) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c94689635.discon) - e1:SetCost(c94689635.discost) - e1:SetTarget(c94689635.distg) - e1:SetOperation(c94689635.disop) - c:RegisterEffect(e1) -end -function c94689635.discon(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp and re:IsActiveType(TYPE_TRAP) and re:IsHasType(EFFECT_TYPE_ACTIVATE) - and Duel.IsChainNegatable(ev) -end -function c94689635.costfilter(c) - return c:IsRace(RACE_FAIRY) and c:IsAbleToGraveAsCost() -end -function c94689635.discost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToGraveAsCost() and - Duel.IsExistingMatchingCard(c94689635.costfilter,tp,LOCATION_HAND,0,1,c) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c94689635.costfilter,tp,LOCATION_HAND,0,1,1,c) - g:AddCard(c) - Duel.SendtoGrave(g,REASON_COST) -end -function c94689635.distg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) - end -end -function c94689635.disop(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateActivation(ev) - if re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(eg,REASON_EFFECT) - end -end diff --git a/script/c94693857.lua b/script/c94693857.lua deleted file mode 100644 index dfd87fe160..0000000000 --- a/script/c94693857.lua +++ /dev/null @@ -1,46 +0,0 @@ ---ブンボーグ001 -function c94693857.initial_effect(c) - --atk/def - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(c94693857.atkval) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_UPDATE_DEFENCE) - c:RegisterEffect(e2) - --spsummon - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(94693857,0)) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetRange(LOCATION_GRAVE) - e3:SetProperty(EFFECT_FLAG_DELAY) - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - e3:SetCondition(c94693857.spcon) - e3:SetTarget(c94693857.sptg) - e3:SetOperation(c94693857.spop) - c:RegisterEffect(e3) -end -function c94693857.filter(c) - return c:IsFaceup() and c:IsRace(RACE_MACHINE) -end -function c94693857.atkval(e,c) - return Duel.GetMatchingGroupCount(c94693857.filter,c:GetControler(),LOCATION_MZONE,0,nil)*500 -end -function c94693857.spcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c94693857.filter,2,nil) -end -function c94693857.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c94693857.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c94716515.lua b/script/c94716515.lua deleted file mode 100644 index 69d462626a..0000000000 --- a/script/c94716515.lua +++ /dev/null @@ -1,23 +0,0 @@ ---トゲトゲ神の殺虫剤 -function c94716515.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c94716515.target) - e1:SetOperation(c94716515.activate) - c:RegisterEffect(e1) -end -function c94716515.filter(c) - return c:IsRace(RACE_INSECT) and c:IsFaceup() and c:IsDestructable() -end -function c94716515.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c94716515.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - local sg=Duel.GetMatchingGroup(c94716515.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,sg:GetCount(),0,0) -end -function c94716515.activate(e,tp,eg,ep,ev,re,r,rp) - local sg=Duel.GetMatchingGroup(c94716515.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - Duel.Destroy(sg,REASON_EFFECT) -end diff --git a/script/c94739788.lua b/script/c94739788.lua deleted file mode 100644 index 8c55d318e6..0000000000 --- a/script/c94739788.lua +++ /dev/null @@ -1,16 +0,0 @@ ---洗脳解除 -function c94739788.initial_effect(c) - Duel.EnableGlobalFlag(GLOBALFLAG_BRAINWASHING_CHECK) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - -- - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_REMOVE_BRAINWASHING) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - c:RegisterEffect(e2) -end diff --git a/script/c94766498.lua b/script/c94766498.lua deleted file mode 100644 index 98b0e6917b..0000000000 --- a/script/c94766498.lua +++ /dev/null @@ -1,21 +0,0 @@ ---先史遺産アステカ・マスク・ゴーレム -function c94766498.initial_effect(c) - c:SetUniqueOnField(1,0,94766498) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c94766498.hspcon) - c:RegisterEffect(e1) - Duel.AddCustomActivityCounter(94766498,ACTIVITY_CHAIN,c94766498.chainfilter) -end -function c94766498.chainfilter(re,tp,cid) - return not (re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:GetHandler():IsSetCard(0x70)) -end -function c94766498.hspcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.GetCustomActivityCount(94766498,tp,ACTIVITY_CHAIN)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 -end diff --git a/script/c94770493.lua b/script/c94770493.lua deleted file mode 100644 index bb327b2aee..0000000000 --- a/script/c94770493.lua +++ /dev/null @@ -1,45 +0,0 @@ ---ダブル・アップ・チャンス -function c94770493.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_ATTACK_DISABLED) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c94770493.target) - e1:SetOperation(c94770493.operation) - c:RegisterEffect(e1) -end -function c94770493.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc==eg:GetFirst() end - if chk==0 then return eg:GetFirst():IsFaceup() and eg:GetFirst():IsCanBeEffectTarget(e) end - Duel.SetTargetCard(eg:GetFirst()) -end -function c94770493.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) and tc:GetFlagEffect(94770493)==0 then - tc:RegisterFlagEffect(94770493,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_EXTRA_ATTACK) - e1:SetValue(1) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_BATTLE_START) - e2:SetCountLimit(1) - e2:SetOperation(c94770493.atkop) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e2) - end -end -function c94770493.atkop(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetOwner()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetValue(e:GetHandler():GetAttack()*2) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_DAMAGE) - e:GetHandler():RegisterEffect(e1) -end diff --git a/script/c94772232.lua b/script/c94772232.lua deleted file mode 100644 index 94bb0a928a..0000000000 --- a/script/c94772232.lua +++ /dev/null @@ -1,11 +0,0 @@ ---死のメッセージ「T」 -function c94772232.initial_effect(c) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_SSET) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - c:RegisterEffect(e2) -end diff --git a/script/c94773007.lua b/script/c94773007.lua deleted file mode 100644 index 8c0066ae21..0000000000 --- a/script/c94773007.lua +++ /dev/null @@ -1,23 +0,0 @@ ---地雷蜘蛛 -function c94773007.initial_effect(c) - --coin - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(94773007,0)) - e1:SetCategory(CATEGORY_COIN) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetTarget(c94773007.attg) - e1:SetOperation(c94773007.atop) - c:RegisterEffect(e1) -end -function c94773007.attg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_COIN,nil,0,tp,1) -end -function c94773007.atop(e,tp,eg,ep,ev,re,r,rp) - local opt=Duel.SelectOption(tp,60,61) - local coin=Duel.TossCoin(tp,1) - if opt==coin then - Duel.SetLP(tp,Duel.GetLP(tp)/2) - end -end diff --git a/script/c94784213.lua b/script/c94784213.lua deleted file mode 100644 index b004efb798..0000000000 --- a/script/c94784213.lua +++ /dev/null @@ -1,57 +0,0 @@ ---マジェスペクター・フォックス -function c94784213.initial_effect(c) - --pendulum summon - aux.AddPendulumProcedure(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --search - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_SUMMON_SUCCESS) - e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e2:SetCountLimit(1,94784213) - e2:SetTarget(c94784213.thtg) - e2:SetOperation(c94784213.thop) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e3) - --cannot target - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e4:SetRange(LOCATION_MZONE) - e4:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) - e4:SetValue(aux.tgoval) - c:RegisterEffect(e4) - --indes - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_SINGLE) - e5:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e5:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - e5:SetRange(LOCATION_MZONE) - e5:SetValue(c94784213.indval) - c:RegisterEffect(e5) -end -function c94784213.thfilter(c) - return c:IsSetCard(0xd0) and c:IsType(TYPE_TRAP) and c:IsAbleToHand() -end -function c94784213.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c94784213.thfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c94784213.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c94784213.thfilter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end -function c94784213.indval(e,re,tp) - return tp~=e:GetHandlerPlayer() -end diff --git a/script/c94793422.lua b/script/c94793422.lua deleted file mode 100644 index 04aaef095c..0000000000 --- a/script/c94793422.lua +++ /dev/null @@ -1,46 +0,0 @@ ---心眼の鉾 -function c94793422.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c94793422.target) - e1:SetOperation(c94793422.operation) - c:RegisterEffect(e1) - --Equip limit - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_EQUIP_LIMIT) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetValue(1) - c:RegisterEffect(e2) - --damage change - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e3:SetRange(LOCATION_SZONE) - e3:SetCode(EVENT_PRE_BATTLE_DAMAGE) - e3:SetCondition(c94793422.damcon) - e3:SetOperation(c94793422.damop) - c:RegisterEffect(e3) -end -function c94793422.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c94793422.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,e:GetHandler(),tc) - end -end -function c94793422.damcon(e,tp,eg,ep,ev,re,r,rp) - return eg:GetFirst()==e:GetHandler():GetEquipTarget() and ep~=tp -end -function c94793422.damop(e,tp,eg,ep,ev,re,r,rp) - Duel.ChangeBattleDamage(ep,1000) -end diff --git a/script/c94804055.lua b/script/c94804055.lua deleted file mode 100644 index bc6cb7090e..0000000000 --- a/script/c94804055.lua +++ /dev/null @@ -1,87 +0,0 @@ ---ファイヤー・ウォール -function c94804055.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c94804055.target1) - e1:SetOperation(c94804055.operation) - c:RegisterEffect(e1) - --quick - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(94804055,0)) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetRange(LOCATION_SZONE) - e2:SetCode(EVENT_ATTACK_ANNOUNCE) - e2:SetLabel(1) - e2:SetCondition(c94804055.condition) - e2:SetCost(c94804055.cost) - e2:SetTarget(c94804055.target2) - e2:SetOperation(c94804055.operation) - c:RegisterEffect(e2) - --maintain - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e3:SetCode(EVENT_PHASE+PHASE_STANDBY) - e3:SetRange(LOCATION_SZONE) - e3:SetCountLimit(1) - e3:SetCondition(c94804055.mtcon) - e3:SetOperation(c94804055.mtop) - c:RegisterEffect(e3) -end -function c94804055.cfilter(c) - return c:IsRace(RACE_PYRO) and c:IsAbleToRemoveAsCost() -end -function c94804055.target1(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - if chk==0 then return true end - if Duel.CheckEvent(EVENT_ATTACK_ANNOUNCE) then - local a=Duel.GetAttacker() - if a:IsControler(1-tp) and Duel.GetAttackTarget()==nil - and Duel.IsExistingMatchingCard(c94804055.cfilter,tp,LOCATION_GRAVE,0,1,nil) - and a:IsOnField() and a:IsCanBeEffectTarget(e) and Duel.SelectYesNo(tp,aux.Stringid(94804055,1)) then - e:SetProperty(EFFECT_FLAG_CARD_TARGET) - e:SetLabel(1) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c94804055.cfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) - Duel.SetTargetCard(a) - end - else - e:SetProperty(0) - e:SetLabel(0) - end -end -function c94804055.operation(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - if e:GetLabel()==1 then - Duel.NegateAttack() - end -end -function c94804055.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetAttacker():IsControler(1-tp) and Duel.GetAttackTarget()==nil and not e:GetHandler():IsStatus(STATUS_CHAINING) -end -function c94804055.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c94804055.cfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c94804055.cfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c94804055.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local tg=Duel.GetAttacker() - if chkc then return false end - if chk==0 then return tg:IsOnField() and tg:IsCanBeEffectTarget(e) end - Duel.SetTargetCard(tg) -end -function c94804055.mtcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c94804055.mtop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLP(tp)>500 and Duel.SelectYesNo(tp,aux.Stringid(94804055,2)) then - Duel.PayLPCost(tp,500) - else - Duel.Destroy(e:GetHandler(),REASON_RULE) - end -end diff --git a/script/c94807487.lua b/script/c94807487.lua deleted file mode 100644 index 6d416546ac..0000000000 --- a/script/c94807487.lua +++ /dev/null @@ -1,86 +0,0 @@ ---ホープ剣スラッシュ -function c94807487.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c94807487.target) - e1:SetOperation(c94807487.operation) - c:RegisterEffect(e1) - --Untargetable - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - e2:SetValue(1) - c:RegisterEffect(e2) - --Equip limit - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_EQUIP_LIMIT) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e3:SetValue(c94807487.eqlimit) - c:RegisterEffect(e3) - --counter - local e4=Effect.CreateEffect(c) - e4:SetCategory(CATEGORY_COUNTER) - e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e4:SetProperty(EFFECT_FLAG_DELAY) - e4:SetCode(EVENT_ATTACK_DISABLED) - e4:SetRange(LOCATION_SZONE) - e4:SetOperation(c94807487.regop) - c:RegisterEffect(e4) - --atk - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_EQUIP) - e5:SetCode(EFFECT_UPDATE_ATTACK) - e5:SetValue(c94807487.value) - c:RegisterEffect(e5) - --remove overlay replace - local e6=Effect.CreateEffect(c) - e6:SetDescription(aux.Stringid(94807487,0)) - e6:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e6:SetCode(EFFECT_OVERLAY_REMOVE_REPLACE) - e6:SetRange(LOCATION_SZONE) - e6:SetCondition(c94807487.rcon) - e6:SetOperation(c94807487.rop) - c:RegisterEffect(e6) -end -function c94807487.eqlimit(e,c) - return c:IsSetCard(0x7f) -end -function c94807487.filter(c) - return c:IsFaceup() and c:IsSetCard(0x7f) -end -function c94807487.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c94807487.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c94807487.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c94807487.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c94807487.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,c,tc) - end -end -function c94807487.regop(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():AddCounter(0x31,1) -end -function c94807487.value(e,c) - return e:GetHandler():GetCounter(0x31)*500 -end -function c94807487.rcon(e,tp,eg,ep,ev,re,r,rp) - return bit.band(r,REASON_COST)~=0 and re:GetHandler():IsType(TYPE_XYZ) - and ep==e:GetOwnerPlayer() and e:GetHandler():GetEquipTarget()==re:GetHandler() and re:GetHandler():GetOverlayCount()>=ev-1 -end -function c94807487.rop(e,tp,eg,ep,ev,re,r,rp) - local ct=bit.band(ev,0xffff) - Duel.SendtoGrave(e:GetHandler(),REASON_COST) - if ct>1 then - re:GetHandler():RemoveOverlayCard(tp,ct-1,ct-1,REASON_COST) - end -end diff --git a/script/c94820406.lua b/script/c94820406.lua deleted file mode 100644 index 12f52e49fa..0000000000 --- a/script/c94820406.lua +++ /dev/null @@ -1,84 +0,0 @@ ---ダーク・フュージョン -function c94820406.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c94820406.target) - e1:SetOperation(c94820406.activate) - c:RegisterEffect(e1) -end -function c94820406.filter1(c,e) - return c:IsCanBeFusionMaterial() and not c:IsImmuneToEffect(e) -end -function c94820406.filter2(c,e,tp,m,f,chkf) - return c:IsType(TYPE_FUSION) and c:IsRace(RACE_FIEND) and (not f or f(c)) - and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION+0x10,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf) -end -function c94820406.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp - local mg1=Duel.GetMatchingGroup(Card.IsCanBeFusionMaterial,tp,LOCATION_HAND+LOCATION_MZONE,0,nil) - local res=Duel.IsExistingMatchingCard(c94820406.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf) - if not res then - local ce=Duel.GetChainMaterial(tp) - if ce~=nil then - local fgroup=ce:GetTarget() - local mg2=fgroup(ce,e,tp) - local mf=ce:GetValue() - res=Duel.IsExistingMatchingCard(c94820406.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,chkf) - end - end - return res - end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function c94820406.activate(e,tp,eg,ep,ev,re,r,rp) - local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp - local mg1=Duel.GetMatchingGroup(c94820406.filter1,tp,LOCATION_HAND+LOCATION_MZONE,0,nil,e) - local sg1=Duel.GetMatchingGroup(c94820406.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf) - local mg2=nil - local sg2=nil - local ce=Duel.GetChainMaterial(tp) - if ce~=nil then - local fgroup=ce:GetTarget() - mg2=fgroup(ce,e,tp) - local mf=ce:GetValue() - sg2=Duel.GetMatchingGroup(c94820406.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,mf,chkf) - end - if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then - local sg=sg1:Clone() - if sg2 then sg:Merge(sg2) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local tg=sg:Select(tp,1,1,nil) - local tc=tg:GetFirst() - if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then - local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf) - tc:SetMaterial(mat1) - Duel.SendtoGrave(mat1,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION) - Duel.BreakEffect() - Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION+0x10,tp,tp,false,false,POS_FACEUP) - else - local mat2=Duel.SelectFusionMaterial(tp,tc,mg2,nil,chkf) - local fop=ce:GetOperation() - fop(ce,e,tp,tc,mat2,SUMMON_TYPE_FUSION+0x10) - end - tc:CompleteProcedure() - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e1:SetValue(aux.tgoval) - tc:RegisterEffect(e1) - else - local cg1=Duel.GetFieldGroup(tp,LOCATION_HAND+LOCATION_MZONE,0) - local cg2=Duel.GetFieldGroup(tp,LOCATION_EXTRA,0) - if cg1:GetCount()>1 and cg2:IsExists(Card.IsFacedown,1,nil) - and Duel.IsPlayerCanSpecialSummon(tp) and not Duel.IsPlayerAffectedByEffect(tp,27581098) then - Duel.ConfirmCards(1-tp,cg1) - Duel.ConfirmCards(1-tp,cg2) - Duel.ShuffleHand(tp) - end - end -end diff --git a/script/c94845226.lua b/script/c94845226.lua deleted file mode 100644 index 70f91d2067..0000000000 --- a/script/c94845226.lua +++ /dev/null @@ -1,21 +0,0 @@ ---魔轟神獣ルビィラーダ -function c94845226.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(94845226,0)) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_BE_BATTLE_TARGET) - e1:SetCost(c94845226.cost) - e1:SetOperation(c94845226.op) - c:RegisterEffect(e1) -end -function c94845226.cfilter(c) - return c:IsSetCard(0x35) and c:IsDiscardable() -end -function c94845226.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c94845226.cfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,c94845226.cfilter,1,1,REASON_COST+REASON_DISCARD) -end -function c94845226.op(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateAttack() -end diff --git a/script/c94853057.lua b/script/c94853057.lua deleted file mode 100644 index 7f8ccf1f5f..0000000000 --- a/script/c94853057.lua +++ /dev/null @@ -1,12 +0,0 @@ ---閃光の追放者 -function c94853057.initial_effect(c) - --remove - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_RANGE) - e1:SetCode(EFFECT_TO_GRAVE_REDIRECT) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(0xff,0xff) - e1:SetValue(LOCATION_REMOVED) - c:RegisterEffect(e1) -end diff --git a/script/c9485511.lua b/script/c9485511.lua deleted file mode 100644 index db65b62970..0000000000 --- a/script/c9485511.lua +++ /dev/null @@ -1,66 +0,0 @@ ---U.A.カストディアン -function c9485511.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(1,9485511) - e1:SetCondition(c9485511.spcon) - e1:SetOperation(c9485511.spop) - c:RegisterEffect(e1) - --indes - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(9485511,0)) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetCondition(c9485511.indcon) - e2:SetTarget(c9485511.indtg) - e2:SetOperation(c9485511.indop) - c:RegisterEffect(e2) -end -function c9485511.spfilter(c) - return c:IsFaceup() and c:IsSetCard(0xb2) and not c:IsCode(9485511) and c:IsAbleToHandAsCost() -end -function c9485511.spcon(e,c) - if c==nil then return true end - return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-1 - and Duel.IsExistingMatchingCard(c9485511.spfilter,c:GetControler(),LOCATION_MZONE,0,1,nil) -end -function c9485511.spop(e,tp,eg,ep,ev,re,r,rp,c) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g=Duel.SelectMatchingCard(tp,c9485511.spfilter,tp,LOCATION_MZONE,0,1,1,nil) - Duel.SendtoHand(g,nil,REASON_COST) -end -function c9485511.filter(c) - return c:IsFaceup() and c:IsSetCard(0xb2) -end -function c9485511.indcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp -end -function c9485511.indtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c9485511.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c9485511.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c9485511.filter,tp,LOCATION_MZONE,0,1,1,nil) -end -function c9485511.indop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_INDESTRUCTABLE_COUNT) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCountLimit(1) - e1:SetValue(c9485511.valcon) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - end -end -function c9485511.valcon(e,re,r,rp) - return bit.band(r,REASON_BATTLE+REASON_EFFECT)~=0 -end diff --git a/script/c94878265.lua b/script/c94878265.lua deleted file mode 100644 index 21abcc2d0b..0000000000 --- a/script/c94878265.lua +++ /dev/null @@ -1,34 +0,0 @@ ---モジャ -function c94878265.initial_effect(c) - --salvage - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(94878265,0)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetCondition(c94878265.condition) - e1:SetTarget(c94878265.target) - e1:SetOperation(c94878265.operation) - c:RegisterEffect(e1) -end -function c94878265.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) -end -function c94878265.filter(c) - return c:GetLevel()==4 and c:IsRace(RACE_BEAST) and c:IsAbleToHand() -end -function c94878265.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c94878265.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c94878265.filter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c94878265.filter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0) -end -function c94878265.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end diff --git a/script/c94886282.lua b/script/c94886282.lua deleted file mode 100644 index 8920a5f16d..0000000000 --- a/script/c94886282.lua +++ /dev/null @@ -1,31 +0,0 @@ ---光の援軍 -function c94886282.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c94886282.cost) - e1:SetTarget(c94886282.target) - e1:SetOperation(c94886282.activate) - c:RegisterEffect(e1) -end -function c94886282.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDiscardDeckAsCost(tp,3) end - Duel.DiscardDeck(tp,3,REASON_COST) -end -function c94886282.filter(c) - return c:IsSetCard(0x38) and c:IsLevelBelow(4) and c:IsAbleToHand() -end -function c94886282.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c94886282.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c94886282.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c94886282.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c94905343.lua b/script/c94905343.lua deleted file mode 100644 index 9b008cd82b..0000000000 --- a/script/c94905343.lua +++ /dev/null @@ -1,6 +0,0 @@ ---ミノケンタウロス -function c94905343.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcCode2(c,5053103,68516705,true,true) -end diff --git a/script/c94933468.lua b/script/c94933468.lua deleted file mode 100644 index 93e1549d83..0000000000 --- a/script/c94933468.lua +++ /dev/null @@ -1,81 +0,0 @@ ---Vain-裏切りの嘲笑 -function c94933468.initial_effect(c) - --activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DISABLE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c94933468.target) - e1:SetOperation(c94933468.operation) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e2:SetRange(LOCATION_SZONE) - e2:SetCode(EVENT_LEAVE_FIELD) - e2:SetCondition(c94933468.descon) - e2:SetOperation(c94933468.desop) - c:RegisterEffect(e2) - --discard deck - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(94933468,0)) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e3:SetCategory(CATEGORY_DECKDES) - e3:SetCountLimit(1) - e3:SetCode(EVENT_PHASE+PHASE_END) - e3:SetRange(LOCATION_SZONE) - e3:SetCondition(c94933468.deckcon) - e3:SetTarget(c94933468.decktg) - e3:SetOperation(c94933468.deckop) - c:RegisterEffect(e3) -end -function c94933468.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local at=Duel.GetAttacker() - if chkc then return false end - if chk==0 then return at:IsControler(1-tp) and at:IsType(TYPE_XYZ) and at:IsOnField() and at:IsCanBeEffectTarget(e) end - Duel.SetTargetCard(at) - Duel.SetOperationInfo(0,CATEGORY_DISABLE,at,1,0,0) -end -function c94933468.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsRelateToEffect(e) then - c:SetCardTarget(tc) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_OWNER_RELATE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetCondition(c94933468.rcon) - tc:RegisterEffect(e1,true) - local e2=e1:Clone() - e2:SetCode(EFFECT_CANNOT_ATTACK) - tc:RegisterEffect(e2,true) - end -end -function c94933468.rcon(e) - return e:GetOwner():IsHasCardTarget(e:GetHandler()) -end -function c94933468.descon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsStatus(STATUS_DESTROY_CONFIRMED) then return false end - local tc=c:GetFirstCardTarget() - return tc and eg:IsContains(tc) -end -function c94933468.desop(e,tp,eg,ep,ev,re,r,rp) - Duel.Destroy(e:GetHandler(),REASON_EFFECT) -end -function c94933468.deckcon(e,tp,eg,ep,ev,re,r,rp) - return tp~=Duel.GetTurnPlayer() and e:GetHandler():GetFirstCardTarget()~=nil -end -function c94933468.decktg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,1-tp,3) -end -function c94933468.deckop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) or c:IsFacedown() then return end - Duel.DiscardDeck(1-tp,3,REASON_EFFECT) -end diff --git a/script/c94937430.lua b/script/c94937430.lua deleted file mode 100644 index 7b34724df1..0000000000 --- a/script/c94937430.lua +++ /dev/null @@ -1,55 +0,0 @@ ---臨時収入 -function c94937430.initial_effect(c) - c:EnableCounterPermit(0x3001) - c:SetCounterLimit(0x3001,3) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --add counter - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e2:SetCode(EVENT_TO_DECK) - e2:SetRange(LOCATION_SZONE) - e2:SetOperation(c94937430.acop) - c:RegisterEffect(e2) - --draw - local e3=Effect.CreateEffect(c) - e3:SetCategory(CATEGORY_DRAW) - e3:SetType(EFFECT_TYPE_QUICK_O) - e3:SetCode(EVENT_FREE_CHAIN) - e3:SetRange(LOCATION_SZONE) - e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e3:SetCondition(c94937430.drcon) - e3:SetCost(c94937430.drcost) - e3:SetTarget(c94937430.drtg) - e3:SetOperation(c94937430.drop) - c:RegisterEffect(e3) -end -function c94937430.cfilter(c,tp) - return c:IsLocation(LOCATION_EXTRA) and c:IsControler(tp) -end -function c94937430.acop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if eg:IsExists(c94937430.cfilter,1,nil,tp) then - c:AddCounter(0x3001,1) - end -end -function c94937430.drcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetCounter(0x3001)==3 -end -function c94937430.drcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end -function c94937430.drtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp,2) end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(2) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2) -end -function c94937430.drop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end diff --git a/script/c94940436.lua b/script/c94940436.lua deleted file mode 100644 index ce40cf7c27..0000000000 --- a/script/c94940436.lua +++ /dev/null @@ -1,27 +0,0 @@ ---磁力の召喚円 LV2 -function c94940436.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c94940436.target) - e1:SetOperation(c94940436.activate) - c:RegisterEffect(e1) -end -function c94940436.filter(c,e,tp) - return c:IsLevelBelow(2) and c:IsRace(RACE_MACHINE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c94940436.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c94940436.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c94940436.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c94940436.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c94944637.lua b/script/c94944637.lua deleted file mode 100644 index 2ef8a2af9b..0000000000 --- a/script/c94944637.lua +++ /dev/null @@ -1,50 +0,0 @@ ---魔族召喚師 -function c94944637.initial_effect(c) - aux.EnableDualAttribute(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetDescription(aux.Stringid(94944637,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCondition(aux.IsDualState) - e1:SetTarget(c94944637.target) - e1:SetOperation(c94944637.operation) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_LEAVE_FIELD) - e2:SetOperation(c94944637.desop) - c:RegisterEffect(e2) -end -function c94944637.filter(c,e,tp) - return c:IsRace(RACE_FIEND) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsHasEffect(EFFECT_NECRO_VALLEY) -end -function c94944637.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c94944637.filter,tp,LOCATION_GRAVE+LOCATION_HAND,LOCATION_GRAVE,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_HAND) -end -function c94944637.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c94944637.filter,tp,LOCATION_GRAVE+LOCATION_HAND,LOCATION_GRAVE,1,1,nil,e,tp) - local c=e:GetHandler() - local tc=g:GetFirst() - if tc then - if Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)==0 then return end - if c:IsFaceup() and c:IsRelateToEffect(e) then c:SetCardTarget(tc) end - end -end -function c94944637.desfilter(c,rc) - return rc:GetCardTarget():IsContains(c) and c:IsRace(RACE_FIEND) -end -function c94944637.desop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:GetCardTargetCount()>0 then - local dg=Duel.GetMatchingGroup(c94944637.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,c) - Duel.Destroy(dg,REASON_EFFECT) - end -end diff --git a/script/c94950218.lua b/script/c94950218.lua deleted file mode 100644 index d6e33b32a2..0000000000 --- a/script/c94950218.lua +++ /dev/null @@ -1,74 +0,0 @@ ---リバース・ブレイカー -function c94950218.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c94950218.target) - e1:SetOperation(c94950218.operation) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(94950218,0)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_ATTACK_ANNOUNCE) - e2:SetRange(LOCATION_SZONE) - e2:SetCondition(c94950218.descon) - e2:SetTarget(c94950218.destg) - e2:SetOperation(c94950218.desop) - c:RegisterEffect(e2) - --equip limit - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_EQUIP_LIMIT) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e3:SetValue(c94950218.eqlimit) - c:RegisterEffect(e3) -end -function c94950218.eqlimit(e,c) - return c:IsSetCard(0x7f) -end -function c94950218.filter(c) - return c:IsFaceup() and c:IsSetCard(0x7f) -end -function c94950218.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c94950218.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c94950218.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c94950218.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c94950218.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,c,tc) - end -end -function c94950218.descon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetAttacker()==e:GetHandler():GetEquipTarget() -end -function c94950218.desfilter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable() -end -function c94950218.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() and c94950218.desfilter(chkc) end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c94950218.desfilter,tp,0,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) - Duel.SetChainLimit(c94950218.climit) -end -function c94950218.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end -function c94950218.climit(e,lp,tp) - return lp==tp or not e:IsHasType(EFFECT_TYPE_ACTIVATE) -end diff --git a/script/c94973028.lua b/script/c94973028.lua deleted file mode 100644 index 6cfe7503df..0000000000 --- a/script/c94973028.lua +++ /dev/null @@ -1,101 +0,0 @@ ---幻獣機コルトウィング -function c94973028.initial_effect(c) - --level - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_UPDATE_LEVEL) - e1:SetValue(c94973028.lvval) - c:RegisterEffect(e1) - -- - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e2:SetCondition(c94973028.indcon) - e2:SetValue(1) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - c:RegisterEffect(e3) - --token - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(94973028,0)) - e4:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e4:SetCode(EVENT_SPSUMMON_SUCCESS) - e4:SetCondition(c94973028.spcon) - e4:SetTarget(c94973028.sptg) - e4:SetOperation(c94973028.spop) - c:RegisterEffect(e4) - --destroy - local e5=Effect.CreateEffect(c) - e5:SetDescription(aux.Stringid(94973028,1)) - e5:SetCategory(CATEGORY_DESTROY) - e5:SetType(EFFECT_TYPE_IGNITION) - e5:SetRange(LOCATION_MZONE) - e5:SetCountLimit(1) - e5:SetProperty(EFFECT_FLAG_CARD_TARGET) - e5:SetCost(c94973028.descost) - e5:SetTarget(c94973028.destg) - e5:SetOperation(c94973028.desop) - c:RegisterEffect(e5) -end -function c94973028.lvval(e,c) - local tp=c:GetControler() - local lv=0 - for i=0,4 do - local tc=Duel.GetFieldCard(tp,LOCATION_MZONE,i) - if tc and tc:IsCode(31533705) then lv=lv+tc:GetLevel() end - end - return lv -end -function c94973028.indcon(e) - return Duel.IsExistingMatchingCard(Card.IsType,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil,TYPE_TOKEN) -end -function c94973028.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x101b) -end -function c94973028.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c94973028.cfilter,tp,LOCATION_MZONE,0,1,e:GetHandler()) -end -function c94973028.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,2,0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,0,0) -end -function c94973028.spop(e,tp,eg,ep,ev,re,r,rp) - if not c94973028.spcon(e,tp,eg,ep,ev,re,r,rp) then return end - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=1 then return end - if Duel.IsPlayerCanSpecialSummonMonster(tp,31533705,0x101b,0x4011,0,0,3,RACE_MACHINE,ATTRIBUTE_WIND) then - local token=Duel.CreateToken(tp,94973029) - Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP) - token=Duel.CreateToken(tp,94973029) - Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP) - Duel.SpecialSummonComplete() - end -end -function c94973028.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsType,2,nil,TYPE_TOKEN) end - local g=Duel.SelectReleaseGroup(tp,Card.IsType,2,2,nil,TYPE_TOKEN) - Duel.Release(g,REASON_COST) -end -function c94973028.desfilter(c) - return c:IsDestructable() and c:IsAbleToRemove() -end -function c94973028.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() and c94973028.desfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c94973028.desfilter,tp,0,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c94973028.desfilter,tp,0,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) -end -function c94973028.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT,LOCATION_REMOVED) - end -end diff --git a/script/c94977269.lua b/script/c94977269.lua deleted file mode 100644 index 2a60898fe4..0000000000 --- a/script/c94977269.lua +++ /dev/null @@ -1,179 +0,0 @@ ---エルシャドール・ミドラーシュ -function c94977269.initial_effect(c) - Duel.EnableGlobalFlag(GLOBALFLAG_SPSUMMON_COUNT) - c:EnableReviveLimit() - --fusion material - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_FUSION_MATERIAL) - e1:SetCondition(c94977269.fuscon) - e1:SetOperation(c94977269.fusop) - c:RegisterEffect(e1) - --splimit - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e2:SetCode(EFFECT_SPSUMMON_CONDITION) - e2:SetRange(LOCATION_EXTRA) - e2:SetValue(c94977269.splimit) - c:RegisterEffect(e2) - --indes - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - e3:SetRange(LOCATION_MZONE) - e3:SetValue(c94977269.indval) - c:RegisterEffect(e3) - --spsummon count limit - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_FIELD) - e4:SetCode(EFFECT_SPSUMMON_COUNT_LIMIT) - e4:SetRange(LOCATION_MZONE) - e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e4:SetTargetRange(1,1) - e4:SetValue(1) - c:RegisterEffect(e4) - --tohand - local e5=Effect.CreateEffect(c) - e5:SetDescription(aux.Stringid(94977269,0)) - e5:SetCategory(CATEGORY_TOHAND) - e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e5:SetCode(EVENT_TO_GRAVE) - e5:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) - e5:SetTarget(c94977269.thtg) - e5:SetOperation(c94977269.thop) - c:RegisterEffect(e5) -end -function c94977269.ffilter1(c) - return c:IsSetCard(0x9d) -end -function c94977269.ffilter2(c) - return c:IsAttribute(ATTRIBUTE_DARK) or c:IsHasEffect(4904633) -end -function c94977269.exfilter(c,g) - return c:IsFaceup() and c:IsCanBeFusionMaterial() and not g:IsContains(c) -end -function c94977269.fuscon(e,g,gc,chkf) - if g==nil then return true end - local tp=e:GetHandlerPlayer() - local fc=Duel.GetFieldCard(tp,LOCATION_SZONE,5) - local exg=Group.CreateGroup() - if fc and fc:IsHasEffect(81788994) and fc:IsCanRemoveCounter(tp,0x16,3,REASON_EFFECT) then - local sg=Duel.GetMatchingGroup(c94977269.exfilter,tp,0,LOCATION_MZONE,nil,g) - exg:Merge(sg) - end - if gc then return (c94977269.ffilter1(gc) and (g:IsExists(c94977269.ffilter2,1,gc) or exg:IsExists(c94977269.ffilter2,1,gc))) - or (c94977269.ffilter2(gc) and (g:IsExists(c94977269.ffilter1,1,gc) or exg:IsExists(c94977269.ffilter1,1,gc))) end - local g1=Group.CreateGroup() - local g2=Group.CreateGroup() - local g3=Group.CreateGroup() - local g4=Group.CreateGroup() - local tc=g:GetFirst() - while tc do - if c94977269.ffilter1(tc) then - g1:AddCard(tc) - if aux.FConditionCheckF(tc,chkf) then g3:AddCard(tc) end - end - if c94977269.ffilter2(tc) then - g2:AddCard(tc) - if aux.FConditionCheckF(tc,chkf) then g4:AddCard(tc) end - end - tc=g:GetNext() - end - local exg1=exg:Filter(c94977269.ffilter1,nil) - local exg2=exg:Filter(c94977269.ffilter2,nil) - if chkf~=PLAYER_NONE then - return (g3:IsExists(aux.FConditionFilterF2,1,nil,g2) - or g3:IsExists(aux.FConditionFilterF2,1,nil,exg2) - or g4:IsExists(aux.FConditionFilterF2,1,nil,g1) - or g4:IsExists(aux.FConditionFilterF2,1,nil,exg1)) - else - return (g1:IsExists(aux.FConditionFilterF2,1,nil,g2) - or g1:IsExists(aux.FConditionFilterF2,1,nil,exg2) - or g2:IsExists(aux.FConditionFilterF2,1,nil,exg1)) - end -end -function c94977269.fusop(e,tp,eg,ep,ev,re,r,rp,gc,chkf) - local fc=Duel.GetFieldCard(tp,LOCATION_SZONE,5) - local exg=Group.CreateGroup() - if fc and fc:IsHasEffect(81788994) and fc:IsCanRemoveCounter(tp,0x16,3,REASON_EFFECT) then - local sg=Duel.GetMatchingGroup(c94977269.exfilter,tp,0,LOCATION_MZONE,nil,eg) - exg:Merge(sg) - end - if gc then - local sg1=Group.CreateGroup() - local sg2=Group.CreateGroup() - if c94977269.ffilter1(gc) then - sg1:Merge(eg:Filter(c94977269.ffilter2,gc)) - sg2:Merge(exg:Filter(c94977269.ffilter2,gc)) - end - if c94977269.ffilter2(gc) then - sg1:Merge(eg:Filter(c94977269.ffilter1,gc)) - sg2:Merge(exg:Filter(c94977269.ffilter1,gc)) - end - local g1=nil - if sg1:GetCount()==0 or (sg2:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(81788994,0))) then - fc:RemoveCounter(tp,0x16,3,REASON_EFFECT) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL) - g1=sg2:Select(tp,1,1,nil) - else - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL) - g1=sg1:Select(tp,1,1,nil) - end - Duel.SetFusionMaterial(g1) - return - end - local sg=eg:Filter(aux.FConditionFilterF2c,nil,c94977269.ffilter1,c94977269.ffilter2) - local g1=nil - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL) - if chkf~=PLAYER_NONE then - g1=sg:FilterSelect(tp,aux.FConditionCheckF,1,1,nil,chkf) - else g1=sg:Select(tp,1,1,nil) end - local tc1=g1:GetFirst() - local sg1=Group.CreateGroup() - local sg2=Group.CreateGroup() - if c94977269.ffilter1(tc1) then - sg1:Merge(sg:Filter(c94977269.ffilter2,tc1)) - sg2:Merge(exg:Filter(c94977269.ffilter2,tc1)) - end - if c94977269.ffilter2(tc1) then - sg1:Merge(sg:Filter(c94977269.ffilter1,tc1)) - sg2:Merge(exg:Filter(c94977269.ffilter1,tc1)) - end - local g2=nil - if sg1:GetCount()==0 or (sg2:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(81788994,0))) then - fc:RemoveCounter(tp,0x16,3,REASON_EFFECT) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL) - g2=sg2:Select(tp,1,1,nil) - else - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL) - g2=sg1:Select(tp,1,1,nil) - end - g1:Merge(g2) - Duel.SetFusionMaterial(g1) -end -function c94977269.splimit(e,se,sp,st) - return bit.band(st,SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION -end -function c94977269.indval(e,re,tp) - return tp~=e:GetHandlerPlayer() -end -function c94977269.thfilter(c) - return c:IsSetCard(0x9d) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand() -end -function c94977269.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c94977269.thfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c94977269.thfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c94977269.thfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c94977269.thop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end diff --git a/script/c94997874.lua b/script/c94997874.lua deleted file mode 100644 index df00ec5a17..0000000000 --- a/script/c94997874.lua +++ /dev/null @@ -1,87 +0,0 @@ ---聖占術姫タロットレイ -function c94997874.initial_effect(c) - c:EnableReviveLimit() - --position change - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(94997874,0)) - e1:SetCategory(CATEGORY_POSITION) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetRange(LOCATION_MZONE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCountLimit(1,94997874) - e1:SetTarget(c94997874.postg) - e1:SetOperation(c94997874.posop) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetDescription(aux.Stringid(94997874,1)) - e2:SetTarget(c94997874.postg2) - e2:SetOperation(c94997874.posop2) - c:RegisterEffect(e2) - --spsummon - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(94997874,2)) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_PHASE+PHASE_END) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1) - e3:SetCondition(c94997874.spcon) - e3:SetTarget(c94997874.sptg) - e3:SetOperation(c94997874.spop) - c:RegisterEffect(e3) -end -function c94997874.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFacedown() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFacedown,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE) - local g=Duel.SelectTarget(tp,Card.IsFacedown,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0) -end -function c94997874.posop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.ChangePosition(tc,POS_FACEUP_ATTACK) - end -end -function c94997874.posfilter(c) - return c:IsFaceup() and c:IsCanTurnSet() -end -function c94997874.postg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c94997874.posfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c94997874.posfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE) - local g=Duel.SelectTarget(tp,c94997874.posfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0) - Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) -end -function c94997874.posop2(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.ChangePosition(tc,POS_FACEDOWN_DEFENCE) - end -end -function c94997874.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c94997874.spfilter(c,e,tp) - return c:IsType(TYPE_FLIP) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN) - and not c:IsHasEffect(EFFECT_NECRO_VALLEY) -end -function c94997874.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c94997874.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE) -end -function c94997874.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c94997874.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEDOWN_DEFENCE) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c95026693.lua b/script/c95026693.lua deleted file mode 100644 index b668bfafbe..0000000000 --- a/script/c95026693.lua +++ /dev/null @@ -1,41 +0,0 @@ ---ファイヤー・ソウル -function c95026693.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DRAW+CATEGORY_REMOVE+CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c95026693.cost) - e1:SetTarget(c95026693.target) - e1:SetOperation(c95026693.activate) - c:RegisterEffect(e1) -end -function c95026693.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_ATTACK)==0 end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) - e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function c95026693.filter(c) - return c:IsRace(RACE_PYRO) and c:IsAbleToRemove() -end -function c95026693.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(1-tp,1) - and Duel.IsExistingMatchingCard(c95026693.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,1-tp,1) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_DECK) -end -function c95026693.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.Draw(1-tp,1,REASON_EFFECT) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c95026693.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.Remove(g,POS_FACEUP,REASON_EFFECT) - local dam=g:GetFirst():GetAttack()/2 - Duel.Damage(1-tp,dam,REASON_EFFECT) - end -end diff --git a/script/c95027497.lua b/script/c95027497.lua deleted file mode 100644 index 2d9835f3df..0000000000 --- a/script/c95027497.lua +++ /dev/null @@ -1,53 +0,0 @@ ---忍者マスター HANZO -function c95027497.initial_effect(c) - --search - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(95027497,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c95027497.tg1) - e1:SetOperation(c95027497.op1) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(95027497,0)) - e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e2:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE) - e2:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - e2:SetTarget(c95027497.tg2) - e2:SetOperation(c95027497.op2) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e3) -end -function c95027497.filter1(c) - return c:IsSetCard(0x61) and c:IsAbleToHand() -end -function c95027497.filter2(c) - return c:IsSetCard(0x2b) and c:GetCode()~=95027497 and c:IsAbleToHand() -end -function c95027497.tg1(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c95027497.filter1,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c95027497.op1(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c95027497.filter1,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end -function c95027497.tg2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c95027497.filter2,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c95027497.op2(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c95027497.filter2,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end \ No newline at end of file diff --git a/script/c95040215.lua b/script/c95040215.lua deleted file mode 100644 index 43a9f82813..0000000000 --- a/script/c95040215.lua +++ /dev/null @@ -1,50 +0,0 @@ ---BF-星影のノートゥング -function c95040215.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1) - c:EnableReviveLimit() - --damage - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCountLimit(1,95040215) - e1:SetTarget(c95040215.target) - e1:SetOperation(c95040215.operation) - c:RegisterEffect(e1) - --extra summon - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_EXTRA_SUMMON_COUNT) - e2:SetRange(LOCATION_MZONE) - e2:SetTargetRange(LOCATION_HAND+LOCATION_MZONE,0) - e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x33)) - c:RegisterEffect(e2) -end -function c95040215.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(800) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,800) -end -function c95040215.operation(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - if Duel.Damage(p,d,REASON_EFFECT)>0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - local g=Duel.SelectMatchingCard(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil) - local tc=g:GetFirst() - if tc then - Duel.BreakEffect() - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(-800) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_UPDATE_DEFENCE) - tc:RegisterEffect(e2) - end - end -end diff --git a/script/c95051344.lua b/script/c95051344.lua deleted file mode 100644 index 6184a630ae..0000000000 --- a/script/c95051344.lua +++ /dev/null @@ -1,23 +0,0 @@ ---成仏 -function c95051344.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c95051344.target) - e1:SetOperation(c95051344.activate) - c:RegisterEffect(e1) -end -function c95051344.filter(c) - return c:GetEquipCount()>0 and c:IsDestructable() -end -function c95051344.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c95051344.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - local g=Duel.GetMatchingGroup(c95051344.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c95051344.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c95051344.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - Duel.Destroy(g,REASON_EFFECT) -end diff --git a/script/c95084054.lua b/script/c95084054.lua deleted file mode 100644 index 410953efa8..0000000000 --- a/script/c95084054.lua +++ /dev/null @@ -1,41 +0,0 @@ ---エレキャノン -function c95084054.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --damage - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(95084054,0)) - e2:SetCategory(CATEGORY_DAMAGE) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetRange(LOCATION_SZONE) - e2:SetCode(EVENT_SUMMON_SUCCESS) - e2:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE) - e2:SetCondition(c95084054.damcon) - e2:SetTarget(c95084054.damtg) - e2:SetOperation(c95084054.damop) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e3) -end -function c95084054.filter(c) - return c:IsFaceup() and c:IsLevelBelow(4) and c:IsRace(RACE_THUNDER) -end -function c95084054.damcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c95084054.filter,1,nil) -end -function c95084054.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(600) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,600) -end -function c95084054.damop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c95090813.lua b/script/c95090813.lua deleted file mode 100644 index 1d90149e42..0000000000 --- a/script/c95090813.lua +++ /dev/null @@ -1,108 +0,0 @@ ---コアキメイル・ウォーアームズ -function c95090813.initial_effect(c) - --cost - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c95090813.mtcon) - e1:SetOperation(c95090813.mtop) - c:RegisterEffect(e1) - --equip - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(95090813,3)) - e2:SetCategory(CATEGORY_LEAVE_GRAVE+CATEGORY_EQUIP) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetTarget(c95090813.eqtg) - e2:SetOperation(c95090813.eqop) - c:RegisterEffect(e2) -end -function c95090813.mtcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c95090813.cfilter1(c) - return c:IsCode(36623431) and c:IsAbleToGraveAsCost() -end -function c95090813.cfilter2(c) - return c:IsType(TYPE_MONSTER) and c:IsRace(RACE_WARRIOR) and not c:IsPublic() -end -function c95090813.mtop(e,tp,eg,ep,ev,re,r,rp) - local g1=Duel.GetMatchingGroup(c95090813.cfilter1,tp,LOCATION_HAND,0,nil) - local g2=Duel.GetMatchingGroup(c95090813.cfilter2,tp,LOCATION_HAND,0,nil) - local select=2 - if g1:GetCount()>0 and g2:GetCount()>0 then - select=Duel.SelectOption(tp,aux.Stringid(95090813,0),aux.Stringid(95090813,1),aux.Stringid(95090813,2)) - elseif g1:GetCount()>0 then - select=Duel.SelectOption(tp,aux.Stringid(95090813,0),aux.Stringid(95090813,2)) - if select==1 then select=2 end - elseif g2:GetCount()>0 then - select=Duel.SelectOption(tp,aux.Stringid(95090813,1),aux.Stringid(95090813,2)) - select=select+1 - end - if select==0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=g1:Select(tp,1,1,nil) - Duel.SendtoGrave(g,REASON_COST) - elseif select==1 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) - local g=g2:Select(tp,1,1,nil) - Duel.ConfirmCards(1-tp,g) - Duel.ShuffleHand(tp) - else - Duel.Destroy(e:GetHandler(),REASON_RULE) - end -end -function c95090813.filter(c) - return c:IsLevelBelow(3) and c:IsRace(RACE_WARRIOR) -end -function c95090813.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c95090813.filter(chkc) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingTarget(c95090813.filter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local g=Duel.SelectTarget(tp,c95090813.filter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0) -end -function c95090813.eqop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsFaceup() and c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then - if not Duel.Equip(tp,tc,c,false) then return end - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_COPY_INHERIT+EFFECT_FLAG_OWNER_RELATE) - e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(c95090813.eqlimit) - tc:RegisterEffect(e1) - local atk=tc:GetAttack() - if atk<0 then atk=0 end - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetReset(RESET_EVENT+0x1fe0000) - e2:SetValue(atk/2) - tc:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_EQUIP) - e3:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e3:SetCode(EFFECT_DESTROY_SUBSTITUTE) - e3:SetReset(RESET_EVENT+0x1fe0000) - e3:SetValue(c95090813.subval) - tc:RegisterEffect(e3) - end -end -function c95090813.eqlimit(e,c) - return e:GetOwner()==c -end -function c95090813.subval(e,re,r,rp) - return bit.band(r,REASON_BATTLE)~=0 -end diff --git a/script/c95096437.lua b/script/c95096437.lua deleted file mode 100644 index 34b5486b08..0000000000 --- a/script/c95096437.lua +++ /dev/null @@ -1,52 +0,0 @@ ---義賊の極意書 -function c95096437.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c95096437.target) - e1:SetOperation(c95096437.activate) - c:RegisterEffect(e1) -end -function c95096437.filter(c) - return c:IsFaceup() and c:IsType(TYPE_NORMAL) -end -function c95096437.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c95096437.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c95096437.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c95096437.filter,tp,LOCATION_MZONE,0,1,1,nil) -end -function c95096437.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() and not tc:IsImmuneToEffect(e) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetDescription(aux.Stringid(95096437,0)) - e1:SetCategory(CATEGORY_HANDES) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_BATTLE_DAMAGE) - e1:SetLabel(tc:GetFieldID()) - e1:SetCondition(c95096437.hdcon) - e1:SetTarget(c95096437.hdtg) - e1:SetOperation(c95096437.hdop) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) - end -end -function c95096437.hdcon(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp and eg:GetFirst():GetFieldID()==e:GetLabel() -end -function c95096437.hdtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(tp) - Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,1-tp,2) -end -function c95096437.hdop(e,tp,eg,ep,ev,re,r,rp) - local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) - local g=Duel.GetFieldGroup(p,0,LOCATION_HAND) - local dg=g:RandomSelect(tp,2) - Duel.SendtoGrave(dg,REASON_EFFECT+REASON_DISCARD) -end diff --git a/script/c95113856.lua b/script/c95113856.lua deleted file mode 100644 index 8d9147ce1f..0000000000 --- a/script/c95113856.lua +++ /dev/null @@ -1,79 +0,0 @@ ---幻子力空母エンタープラズニル -function c95113856.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,9,2) - c:EnableReviveLimit() - --remove - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(95113856,0)) - e1:SetCategory(CATEGORY_REMOVE) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCost(c95113856.cost) - e1:SetTarget(c95113856.target) - e1:SetOperation(c95113856.operation) - c:RegisterEffect(e1) -end -function c95113856.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c95113856.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD+LOCATION_HAND+LOCATION_GRAVE+LOCATION_DECK,1,nil) end - local off=1 - local ops={} - local opval={} - if Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,nil) then - ops[off]=aux.Stringid(95113856,1) - opval[off-1]=1 - off=off+1 - end - if Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_HAND,1,nil) then - ops[off]=aux.Stringid(95113856,2) - opval[off-1]=2 - off=off+1 - end - if Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,nil) then - ops[off]=aux.Stringid(95113856,3) - opval[off-1]=3 - off=off+1 - end - if Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_DECK,1,nil) then - ops[off]=aux.Stringid(95113856,4) - opval[off-1]=4 - off=off+1 - end - if off==1 then return end - local op=Duel.SelectOption(tp,table.unpack(ops)) - e:SetLabel(opval[op]) -end -function c95113856.operation(e,tp,eg,ep,ev,re,r,rp) - local op=e:GetLabel() - if op==1 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,1,nil) - if g:GetCount()>0 then - Duel.HintSelection(g) - Duel.Remove(g,POS_FACEUP,REASON_EFFECT) - end - elseif op==2 then - local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_HAND,nil) - if g:GetCount()>0 then - local sg=g:RandomSelect(tp,1) - Duel.Remove(sg,POS_FACEUP,REASON_EFFECT) - end - elseif op==3 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,1,nil) - if g:GetCount()>0 then - Duel.Remove(g,POS_FACEUP,REASON_EFFECT) - end - elseif op==4 then - local g=Duel.GetDecktopGroup(1-tp,1) - if g:GetCount()>0 then - Duel.DisableShuffleCheck() - Duel.Remove(g,POS_FACEUP,REASON_EFFECT) - end - end -end diff --git a/script/c95132338.lua b/script/c95132338.lua deleted file mode 100644 index 045b38ed1a..0000000000 --- a/script/c95132338.lua +++ /dev/null @@ -1,26 +0,0 @@ ---アクアの合唱 -function c95132338.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - -- - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e2:SetTarget(c95132338.target) - e2:SetValue(500) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EFFECT_UPDATE_DEFENCE) - c:RegisterEffect(e3) -end -function c95132338.cfilter(c,code) - return c:IsFaceup() and c:IsCode(code) -end -function c95132338.target(e,c) - return Duel.IsExistingMatchingCard(c95132338.cfilter,0,LOCATION_MZONE,LOCATION_MZONE,1,c,c:GetCode()) -end diff --git a/script/c95144193.lua b/script/c95144193.lua deleted file mode 100644 index c50121336e..0000000000 --- a/script/c95144193.lua +++ /dev/null @@ -1,6 +0,0 @@ ---クワガー・ヘラクレス -function c95144193.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcCode2(c,60802233,52584282,true,true) -end diff --git a/script/c95166228.lua b/script/c95166228.lua deleted file mode 100644 index 8cdf180d4a..0000000000 --- a/script/c95166228.lua +++ /dev/null @@ -1,11 +0,0 @@ ---ヴァリュアブル・アーマー -function c95166228.initial_effect(c) - aux.EnableDualAttribute(c) - --attack all - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_ATTACK_ALL) - e1:SetCondition(aux.IsDualState) - e1:SetValue(1) - c:RegisterEffect(e1) -end diff --git a/script/c95169481.lua b/script/c95169481.lua deleted file mode 100644 index 27482c31cc..0000000000 --- a/script/c95169481.lua +++ /dev/null @@ -1,40 +0,0 @@ ---恐牙狼 ダイヤウルフ -function c95169481.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,4,2) - c:EnableReviveLimit() - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(95169481,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c95169481.descost) - e1:SetTarget(c95169481.destg) - e1:SetOperation(c95169481.desop) - c:RegisterEffect(e1) -end -function c95169481.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c95169481.desfilter(c) - return c:IsFaceup() and c:IsRace(RACE_BEAST+RACE_WINDBEAST+RACE_BEASTWARRIOR) and c:IsDestructable() - and Duel.IsExistingTarget(Card.IsDestructable,0,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c) -end -function c95169481.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - if chk==0 then return Duel.IsExistingTarget(c95169481.desfilter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g1=Duel.SelectTarget(tp,c95169481.desfilter,tp,LOCATION_MZONE,0,1,1,nil) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g2=Duel.SelectTarget(tp,Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,g1:GetFirst()) - g1:Merge(g2) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g1,g1:GetCount(),0,0) -end -function c95169481.desop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) - Duel.Destroy(g,REASON_EFFECT) -end diff --git a/script/c95174353.lua b/script/c95174353.lua deleted file mode 100644 index e26d1a8031..0000000000 --- a/script/c95174353.lua +++ /dev/null @@ -1,21 +0,0 @@ ---アメーバ -function c95174353.initial_effect(c) - --damage - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(95174353,0)) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_CONTROL_CHANGED) - e1:SetProperty(EFFECT_FLAG_NO_TURN_RESET) - e1:SetCountLimit(1) - e1:SetTarget(c95174353.target) - e1:SetOperation(c95174353.operation) - c:RegisterEffect(e1) -end -function c95174353.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return not e:GetHandler():IsStatus(STATUS_CHAINING) end - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,tp,2000) -end -function c95174353.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.Damage(tp,2000,REASON_EFFECT) -end diff --git a/script/c95178994.lua b/script/c95178994.lua deleted file mode 100644 index 632bdddfc3..0000000000 --- a/script/c95178994.lua +++ /dev/null @@ -1,38 +0,0 @@ ---ジャイアントウィルス -function c95178994.initial_effect(c) - --battle destroyed - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(95178994,0)) - e1:SetCategory(CATEGORY_DAMAGE+CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetCondition(c95178994.condition) - e1:SetTarget(c95178994.target) - e1:SetOperation(c95178994.operation) - c:RegisterEffect(e1) -end -function c95178994.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsLocation(LOCATION_GRAVE) - and e:GetHandler():IsReason(REASON_BATTLE) -end -function c95178994.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,500) -end -function c95178994.filter(c,e,tp) - return c:IsCode(95178994) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c95178994.operation(e,tp,eg,ep,ev,re,r,rp) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - Duel.Damage(1-tp,500,REASON_EFFECT) - if ft<=0 then return end - local g=Duel.GetMatchingGroup(c95178994.filter,tp,LOCATION_DECK,0,nil,e,tp) - if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(95178994,1)) then - Duel.BreakEffect() - Duel.SpecialSummonStep(g:GetFirst(),0,tp,tp,false,false,POS_FACEUP_ATTACK) - if ft>1 and g:GetCount()>1 and Duel.SelectYesNo(tp,aux.Stringid(95178994,1)) then - Duel.SpecialSummonStep(g:GetNext(),0,tp,tp,false,false,POS_FACEUP_ATTACK) - end - Duel.SpecialSummonComplete() - end -end diff --git a/script/c95194279.lua b/script/c95194279.lua deleted file mode 100644 index 70c45fdde1..0000000000 --- a/script/c95194279.lua +++ /dev/null @@ -1,33 +0,0 @@ ---次元の歪み -function c95194279.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c95194279.condition) - e1:SetTarget(c95194279.target) - e1:SetOperation(c95194279.activate) - c:RegisterEffect(e1) -end -function c95194279.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetFieldGroupCount(tp,LOCATION_GRAVE,0)==0 -end -function c95194279.filter(c,e,tp) - return c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c95194279.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and c95194279.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c95194279.filter,tp,LOCATION_REMOVED,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c95194279.filter,tp,LOCATION_REMOVED,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c95194279.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c95204084.lua b/script/c95204084.lua deleted file mode 100644 index 6a1dce5e15..0000000000 --- a/script/c95204084.lua +++ /dev/null @@ -1,34 +0,0 @@ ---コアキメイル・トルネード -function c95204084.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(95204084,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c95204084.cost) - e1:SetTarget(c95204084.target) - e1:SetOperation(c95204084.operation) - c:RegisterEffect(e1) -end -function c95204084.cfilter(c) - return c:IsCode(36623431) and c:IsAbleToDeckAsCost() -end -function c95204084.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c95204084.cfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectMatchingCard(tp,c95204084.cfilter,tp,LOCATION_HAND,0,1,1,nil) - Duel.SendtoDeck(g,nil,0,REASON_COST) -end -function c95204084.filter(c) - return bit.band(c:GetSummonType(),SUMMON_TYPE_SPECIAL)==SUMMON_TYPE_SPECIAL and c:IsDestructable() -end -function c95204084.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c95204084.filter,tp,0,LOCATION_MZONE,1,nil) end - local g=Duel.GetMatchingGroup(c95204084.filter,tp,0,LOCATION_MZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c95204084.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c95204084.filter,tp,0,LOCATION_MZONE,nil) - Duel.Destroy(g,REASON_EFFECT) -end diff --git a/script/c95214051.lua b/script/c95214051.lua deleted file mode 100644 index 28183fbbe1..0000000000 --- a/script/c95214051.lua +++ /dev/null @@ -1,27 +0,0 @@ ---翡翠の蟲笛 -function c95214051.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c95214051.target) - e1:SetOperation(c95214051.activate) - c:RegisterEffect(e1) -end -function c95214051.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)>0 end -end -function c95214051.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,1-tp,aux.Stringid(95214051,0)) - local g=Duel.SelectMatchingCard(1-tp,Card.IsRace,1-tp,LOCATION_DECK,0,1,1,nil,RACE_INSECT) - local tc=g:GetFirst() - if tc then - Duel.ShuffleDeck(1-tp) - Duel.MoveSequence(tc,0) - Duel.ConfirmDecktop(1-tp,1) - else - local g=Duel.GetFieldGroup(tp,0,LOCATION_DECK) - Duel.ConfirmCards(tp,g) - Duel.ShuffleDeck(1-tp) - end -end diff --git a/script/c95220856.lua b/script/c95220856.lua deleted file mode 100644 index 2b5551efb5..0000000000 --- a/script/c95220856.lua +++ /dev/null @@ -1,19 +0,0 @@ ---怨霊の湿地帯 -function c95220856.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --attack res - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_CANNOT_ATTACK) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e2:SetTarget(c95220856.target) - c:RegisterEffect(e2) -end -function c95220856.target(e,c) - return c:IsStatus(STATUS_SUMMON_TURN+STATUS_FLIP_SUMMON_TURN+STATUS_SPSUMMON_TURN) -end diff --git a/script/c95231062.lua b/script/c95231062.lua deleted file mode 100644 index 6a5735df90..0000000000 --- a/script/c95231062.lua +++ /dev/null @@ -1,41 +0,0 @@ ---ロスト・ブルー・ブレイカー -function c95231062.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(95231062,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c95231062.condition) - e1:SetCost(c95231062.cost) - e1:SetTarget(c95231062.target) - e1:SetOperation(c95231062.operation) - c:RegisterEffect(e1) -end -function c95231062.cfilter(c) - return c:IsFaceup() and c:IsRace(RACE_FISH+RACE_AQUA+RACE_SEASERPENT) -end -function c95231062.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c95231062.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,e:GetHandler()) -end -function c95231062.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end -function c95231062.desfilter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable() -end -function c95231062.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and c95231062.desfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c95231062.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c95231062.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c95231062.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c95239444.lua b/script/c95239444.lua deleted file mode 100644 index 9b839fa8ab..0000000000 --- a/script/c95239444.lua +++ /dev/null @@ -1,82 +0,0 @@ ---森羅の鎮神 オレイア -function c95239444.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,7,2) - c:EnableReviveLimit() - --sort - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(95239444,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCost(c95239444.stcost) - e1:SetOperation(c95239444.stop) - c:RegisterEffect(e1) - --tograve - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(95239444,1)) - e2:SetCategory(CATEGORY_TOGRAVE) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetCountLimit(1) - e2:SetRange(LOCATION_MZONE) - e2:SetCost(c95239444.cost) - e2:SetTarget(c95239444.target) - e2:SetOperation(c95239444.operation) - c:RegisterEffect(e2) -end -function c95239444.cfilter(c,lv) - return c:IsRace(RACE_PLANT) and c:IsLevelBelow(lv) and (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) and c:IsAbleToGraveAsCost() -end -function c95239444.stcost(e,tp,eg,ep,ev,re,r,rp,chk) - local ct=Duel.GetFieldGroupCount(tp,LOCATION_DECK,0) - if chk==0 then return Duel.IsExistingMatchingCard(c95239444.cfilter,tp,LOCATION_MZONE+LOCATION_HAND,0,1,nil,ct) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c95239444.cfilter,tp,LOCATION_MZONE+LOCATION_HAND,0,1,1,nil,ct) - Duel.SendtoGrave(g,REASON_COST) - e:SetLabel(Duel.GetOperatedGroup():GetFirst():GetLevel()) -end -function c95239444.stop(e,tp,eg,ep,ev,re,r,rp) - local ct=e:GetLabel() - if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>=ct then - Duel.SortDecktop(tp,tp,ct) - end -end -function c95239444.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c95239444.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,1) - and Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end -end -function c95239444.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not Duel.IsPlayerCanDiscardDeck(tp,1) then return end - local ct=Duel.GetFieldGroupCount(tp,LOCATION_DECK,0) - if ct==0 then return end - if ct>3 then ct=3 end - local t={} - for i=1,ct do t[i]=i end - local ac=Duel.AnnounceNumber(tp,table.unpack(t)) - Duel.ConfirmDecktop(tp,ac) - local g=Duel.GetDecktopGroup(tp,ac) - local sg=g:Filter(Card.IsRace,nil,RACE_PLANT) - Duel.DisableShuffleCheck() - if Duel.SendtoGrave(sg,REASON_EFFECT+REASON_REVEAL)~=0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local tg=Duel.SelectMatchingCard(tp,Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,sg:GetCount(),c) - if tg:GetCount()>0 then - Duel.BreakEffect() - Duel.DisableShuffleCheck(false) - Duel.SendtoHand(tg,nil,REASON_EFFECT) - end - end - ac=ac-sg:GetCount() - if ac>0 then - Duel.SortDecktop(tp,tp,ac) - for i=1,ac do - local mg=Duel.GetDecktopGroup(tp,1) - Duel.MoveSequence(mg:GetFirst(),1) - end - end -end diff --git a/script/c95254840.lua b/script/c95254840.lua deleted file mode 100644 index 6cf57af09f..0000000000 --- a/script/c95254840.lua +++ /dev/null @@ -1,34 +0,0 @@ ---ドタキャン -function c95254840.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetCondition(c95254840.condition) - e1:SetTarget(c95254840.target) - e1:SetOperation(c95254840.activate) - c:RegisterEffect(e1) -end -function c95254840.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetAttacker():IsControler(1-tp) -end -function c95254840.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAttackPos,tp,LOCATION_MZONE,0,1,nil) end -end -function c95254840.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsAttackPos,tp,LOCATION_MZONE,0,nil) - if g:GetCount()>0 then - Duel.ChangePosition(g,POS_FACEUP_DEFENCE) - end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_TO_GRAVE_REDIRECT) - e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetTarget(c95254840.rmtg) - e1:SetValue(LOCATION_HAND) - e1:SetReset(RESET_PHASE+RESET_END) - Duel.RegisterEffect(e1,tp) -end -function c95254840.rmtg(e,c) - return c:IsSetCard(0x9f) and c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE+REASON_EFFECT) -end diff --git a/script/c95281259.lua b/script/c95281259.lua deleted file mode 100644 index 32a3ac05e2..0000000000 --- a/script/c95281259.lua +++ /dev/null @@ -1,29 +0,0 @@ ---戦士の生還 -function c95281259.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c95281259.target) - e1:SetOperation(c95281259.activate) - c:RegisterEffect(e1) -end -function c95281259.filter(c) - return c:IsRace(RACE_WARRIOR) and c:IsAbleToHand() -end -function c95281259.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:GetControler()==tp and chkc:GetLocation()==LOCATION_GRAVE and c95281259.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c95281259.filter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c95281259.filter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c95281259.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end diff --git a/script/c95286165.lua b/script/c95286165.lua deleted file mode 100644 index ed26710ef0..0000000000 --- a/script/c95286165.lua +++ /dev/null @@ -1,43 +0,0 @@ ---融合解除 -function c95286165.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TODECK+CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c95286165.target) - e1:SetOperation(c95286165.activate) - c:RegisterEffect(e1) -end -function c95286165.filter(c) - return c:IsFaceup() and c:IsType(TYPE_FUSION) and c:IsAbleToExtra() -end -function c95286165.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c95286165.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c95286165.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectTarget(tp,c95286165.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0) -end -function c95286165.mgfilter(c,e,tp,fusc) - return not c:IsControler(tp) or not c:IsLocation(LOCATION_GRAVE) - or bit.band(c:GetReason(),0x40008)~=0x40008 or c:GetReasonCard()~=fusc - or not c:IsCanBeSpecialSummoned(e,0,tp,false,false) or c:IsHasEffect(EFFECT_NECRO_VALLEY) -end -function c95286165.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if not (tc:IsRelateToEffect(e) and tc:IsFaceup()) then return end - local mg=tc:GetMaterial() - local sumable=true - local sumtype=tc:GetSummonType() - if Duel.SendtoDeck(tc,nil,0,REASON_EFFECT)==0 or bit.band(sumtype,SUMMON_TYPE_FUSION)~=SUMMON_TYPE_FUSION or mg:GetCount()==0 - or mg:GetCount()>Duel.GetLocationCount(tp,LOCATION_MZONE) - or mg:IsExists(c95286165.mgfilter,1,nil,e,tp,tc) then - sumable=false - end - if sumable and Duel.SelectYesNo(tp,aux.Stringid(95286165,0)) then - Duel.BreakEffect() - Duel.SpecialSummon(mg,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c95291684.lua b/script/c95291684.lua deleted file mode 100644 index fba5d175c9..0000000000 --- a/script/c95291684.lua +++ /dev/null @@ -1,82 +0,0 @@ ---異次元の一角戦士 -function c95291684.initial_effect(c) - c:EnableReviveLimit() - --special summon rule - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c95291684.sprcon) - e1:SetValue(1) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(95291684,0)) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCondition(c95291684.spcon) - e2:SetTarget(c95291684.sptg) - e2:SetOperation(c95291684.spop) - c:RegisterEffect(e2) - --cannot normal summon - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e3:SetOperation(c95291684.lmop) - c:RegisterEffect(e3) -end -function c95291684.cfilter(c) - return c:IsFaceup() and c:IsType(TYPE_TUNER) -end -function c95291684.sprcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.GetActivityCount(tp,ACTIVITY_NORMALSUMMON)==0 and Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0 - and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c95291684.cfilter,tp,LOCATION_MZONE,0,1,nil) -end -function c95291684.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+1 -end -function c95291684.spfilter(c,e,tp) - return c:IsFaceup() and c:IsLevelBelow(3) and not c:IsType(TYPE_TUNER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c95291684.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and c95291684.spfilter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c95291684.spfilter,tp,LOCATION_REMOVED,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c95291684.spfilter,tp,LOCATION_REMOVED,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c95291684.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)~=0 then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1,true) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e2,true) - end -end -function c95291684.lmop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_SUMMON) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetReset(RESET_PHASE+RESET_END) - e1:SetTargetRange(1,0) - Duel.RegisterEffect(e1,tp) - local e2=e1:Clone() - e2:SetCode(EFFECT_CANNOT_MSET) - Duel.RegisterEffect(e2,tp) -end diff --git a/script/c95308449.lua b/script/c95308449.lua deleted file mode 100644 index b76e79ba49..0000000000 --- a/script/c95308449.lua +++ /dev/null @@ -1,39 +0,0 @@ ---終焉のカウントダウン -function c95308449.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_REMOVE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c95308449.cost) - e1:SetOperation(c95308449.activate) - c:RegisterEffect(e1) -end -function c95308449.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,2000) end - Duel.PayLPCost(tp,2000) -end -function c95308449.activate(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if Duel.GetFlagEffect(tp,95308449)~=0 then return end - Duel.RegisterFlagEffect(tp,95308449,0,0,0) - c:SetTurnCounter(0) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetOperation(c95308449.checkop) - e1:SetCountLimit(1) - Duel.RegisterEffect(e1,tp) - c:RegisterFlagEffect(1082946,RESET_PHASE+PHASE_END,0,20) - c95308449[c]=e1 -end -function c95308449.checkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local ct=c:GetTurnCounter() - ct=ct+1 - c:SetTurnCounter(ct) - if ct==20 then - Duel.Win(tp,0x11) - c:ResetFlagEffect(1082946) - end -end diff --git a/script/c95326659.lua b/script/c95326659.lua deleted file mode 100644 index 95b2db3b58..0000000000 --- a/script/c95326659.lua +++ /dev/null @@ -1,35 +0,0 @@ ---宝玉の導き -function c95326659.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c95326659.condition) - e1:SetTarget(c95326659.target) - e1:SetOperation(c95326659.activate) - c:RegisterEffect(e1) -end -function c95326659.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x1034) -end -function c95326659.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c95326659.cfilter,tp,LOCATION_SZONE,0,2,nil) -end -function c95326659.filter(c,e,tp) - return c:IsSetCard(0x1034) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) -end -function c95326659.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c95326659.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,LOCATION_DECK) -end -function c95326659.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - if not Duel.IsExistingMatchingCard(c95326659.cfilter,tp,LOCATION_SZONE,0,2,nil) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c95326659.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP) - end -end diff --git a/script/c95352218.lua b/script/c95352218.lua deleted file mode 100644 index 99adfcf9e7..0000000000 --- a/script/c95352218.lua +++ /dev/null @@ -1,46 +0,0 @@ ---天下統一 -function c95352218.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(TIMING_STANDBY_PHASE) - c:RegisterEffect(e1) - --adjust - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(95352218,0)) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) - e2:SetRange(LOCATION_SZONE) - e2:SetCountLimit(1) - e2:SetOperation(c95352218.adjustop) - c:RegisterEffect(e2) -end -function c95352218.checklv(g) - local tc=g:GetFirst() - local lv=tc:GetLevel() - tc=g:GetNext() - while tc do - if tc:GetLevel()~=lv then return false end - tc=g:GetNext() - end - return true -end -function c95352218.filter1(c) - return c:IsFaceup() and c:IsLevelAbove(1) -end -function c95352218.filter2(c,lv) - return c:IsFaceup() and c:GetLevel()~=lv -end -function c95352218.adjustop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local turnp=Duel.GetTurnPlayer() - local g=Duel.GetMatchingGroup(c95352218.filter1,turnp,LOCATION_MZONE,0,nil) - if g:GetCount()<2 then return end - if c95352218.checklv(g) then return end - Duel.Hint(HINT_SELECTMSG,turnp,aux.Stringid(95352218,1)) - local clv=g:Select(turnp,1,1,nil):GetFirst():GetLevel() - local dg=g:Filter(c95352218.filter2,nil,clv) - Duel.SendtoGrave(dg,REASON_EFFECT) -end diff --git a/script/c95360850.lua b/script/c95360850.lua deleted file mode 100644 index b4ea1c30b5..0000000000 --- a/script/c95360850.lua +++ /dev/null @@ -1,34 +0,0 @@ ---シールド・ウォリアー -function c95360850.initial_effect(c) - -- - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(95360850,0)) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_PRE_DAMAGE_CALCULATE) - e1:SetRange(LOCATION_GRAVE) - e1:SetCondition(c95360850.atkcon) - e1:SetCost(c95360850.atkcost) - e1:SetOperation(c95360850.atkop) - c:RegisterEffect(e1) -end -function c95360850.atkcon(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetAttacker() - if tc:IsControler(1-tp) then tc=Duel.GetAttackTarget() end - e:SetLabelObject(tc) - return tc and tc:IsControler(tp) -end -function c95360850.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) -end -function c95360850.atkop(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetLabelObject() - if tc:IsRelateToBattle() then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e1:SetValue(1) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_DAMAGE) - tc:RegisterEffect(e1) - end -end diff --git a/script/c95362816.lua b/script/c95362816.lua deleted file mode 100644 index e389652f5e..0000000000 --- a/script/c95362816.lua +++ /dev/null @@ -1,33 +0,0 @@ ---E・HERO レディ・オブ・ファイア -function c95362816.initial_effect(c) - --damage - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(95362816,0)) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCondition(c95362816.condition) - e1:SetTarget(c95362816.target) - e1:SetOperation(c95362816.operation) - c:RegisterEffect(e1) -end -function c95362816.condition(e,tp,eg,ep,ev,re,r,rp) - return tp==Duel.GetTurnPlayer() -end -function c95362816.filter(c) - return c:IsFaceup() and c:IsSetCard(0x3008) -end -function c95362816.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local ct=Duel.GetMatchingGroupCount(c95362816.filter,tp,LOCATION_MZONE,0,nil) - Duel.SetTargetPlayer(1-tp) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,ct*200) -end -function c95362816.operation(e,tp,eg,ep,ev,re,r,rp) - local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) - local ct=Duel.GetMatchingGroupCount(c95362816.filter,tp,LOCATION_MZONE,0,nil) - Duel.Damage(p,ct*200,REASON_EFFECT) -end diff --git a/script/c95376428.lua b/script/c95376428.lua deleted file mode 100644 index e63c8ddafb..0000000000 --- a/script/c95376428.lua +++ /dev/null @@ -1,37 +0,0 @@ ---召喚制限-エクストラネット -function c95376428.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - -- - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(95376428,0)) - e2:SetCategory(CATEGORY_DRAW) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetRange(LOCATION_FZONE) - e2:SetCondition(c95376428.condition) - e2:SetTarget(c95376428.target) - e2:SetOperation(c95376428.operation) - c:RegisterEffect(e2) -end -function c95376428.condition(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(Card.IsPreviousLocation,1,nil,LOCATION_EXTRA) -end -function c95376428.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsRelateToEffect(e) end -end -function c95376428.filter(c,tp) - return c:GetSummonPlayer()==tp -end -function c95376428.operation(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - if eg:IsExists(c95376428.filter,1,nil,tp) and Duel.IsPlayerCanDraw(1-tp,1) and Duel.SelectYesNo(1-tp,aux.Stringid(95376428,1)) then - Duel.Draw(1-tp,1,REASON_EFFECT) - end - if eg:IsExists(c95376428.filter,1,nil,1-tp) and Duel.IsPlayerCanDraw(tp,1) and Duel.SelectYesNo(tp,aux.Stringid(95376428,1)) then - Duel.Draw(tp,1,REASON_EFFECT) - end -end diff --git a/script/c95395761.lua b/script/c95395761.lua deleted file mode 100644 index 275490d1c5..0000000000 --- a/script/c95395761.lua +++ /dev/null @@ -1,75 +0,0 @@ ---甲虫装機 アーマイゼ -function c95395761.initial_effect(c) - --equip - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetDescription(aux.Stringid(95395761,0)) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetTarget(c95395761.eqtg) - e1:SetOperation(c95395761.eqop) - c:RegisterEffect(e1) - --equip effect - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(200) - c:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_EQUIP) - e3:SetCode(EFFECT_UPDATE_DEFENCE) - e3:SetValue(600) - c:RegisterEffect(e3) - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_EQUIP) - e4:SetCode(EFFECT_UPDATE_LEVEL) - e4:SetValue(3) - c:RegisterEffect(e4) - --destroy rep - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_EQUIP) - e5:SetCode(EFFECT_DESTROY_REPLACE) - e5:SetTarget(c95395761.reptg) - e5:SetOperation(c95395761.repop) - c:RegisterEffect(e5) -end -function c95395761.filter(c) - return c:IsSetCard(0x56) and c:IsType(TYPE_MONSTER) and not c:IsHasEffect(EFFECT_NECRO_VALLEY) -end -function c95395761.eqtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingMatchingCard(c95395761.filter,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,nil,1,tp,LOCATION_GRAVE+LOCATION_HAND) -end -function c95395761.eqop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end - if c:IsFacedown() or not c:IsRelateToEffect(e) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local g=Duel.SelectMatchingCard(tp,c95395761.filter,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,1,nil) - local tc=g:GetFirst() - if tc then - if not Duel.Equip(tp,tc,c,true) then return end - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_COPY_INHERIT+EFFECT_FLAG_OWNER_RELATE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(c95395761.eqlimit) - tc:RegisterEffect(e1) - end -end -function c95395761.eqlimit(e,c) - return e:GetOwner()==c -end -function c95395761.reptg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - local tc=c:GetEquipTarget() - if chk==0 then return not c:IsStatus(STATUS_DESTROY_CONFIRMED) end - if Duel.SelectYesNo(tp,aux.Stringid(95395761,1)) then return true - else return false end -end -function c95395761.repop(e,tp,eg,ep,ev,re,r,rp) - Duel.Destroy(e:GetHandler(),REASON_EFFECT+REASON_REPLACE) -end diff --git a/script/c95401059.lua b/script/c95401059.lua deleted file mode 100644 index efa010abca..0000000000 --- a/script/c95401059.lua +++ /dev/null @@ -1,60 +0,0 @@ ---オルシャドール-セフィラルーツ -function c95401059.initial_effect(c) - --pendulum summon - aux.AddPendulumProcedure(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --splimit - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetRange(LOCATION_PZONE) - e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE) - e2:SetTargetRange(1,0) - e2:SetTarget(c95401059.splimit) - e2:SetCondition(aux.nfbdncon) - c:RegisterEffect(e2) - --spsummon - local e3=Effect.CreateEffect(c) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - e3:SetCountLimit(1,95401059) - e3:SetCondition(c95401059.condition1) - e3:SetTarget(c95401059.target) - e3:SetOperation(c95401059.operation) - c:RegisterEffect(e3) - local e4=e3:Clone() - e4:SetCode(EVENT_TO_GRAVE) - e4:SetCondition(aux.TRUE) - c:RegisterEffect(e4) -end -function c95401059.splimit(e,c,sump,sumtype,sumpos,targetp) - if c:IsSetCard(0x9d) or c:IsSetCard(0xc4) then return false end - return bit.band(sumtype,SUMMON_TYPE_PENDULUM)==SUMMON_TYPE_PENDULUM -end -function c95401059.condition1(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_PENDULUM -end -function c95401059.filter(c,e,tp) - return (c:GetSequence()==6 or c:GetSequence()==7) - and c:IsSetCard(0xc4) and not c:IsCode(95401059) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c95401059.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_SZONE) and chkc:IsControler(tp) and c95401059.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c95401059.filter,tp,LOCATION_SZONE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c95401059.filter,tp,LOCATION_SZONE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c95401059.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c95403418.lua b/script/c95403418.lua deleted file mode 100644 index 95dc325389..0000000000 --- a/script/c95403418.lua +++ /dev/null @@ -1,79 +0,0 @@ ---スターダストン -function c95403418.initial_effect(c) - c:EnableReviveLimit() - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_SPSUMMON_PROC) - e2:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e2:SetRange(LOCATION_HAND) - e2:SetCondition(c95403418.spcon) - e2:SetOperation(c95403418.spop) - c:RegisterEffect(e2) - -- - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e3:SetCode(EFFECT_CANNOT_ACTIVATE) - e3:SetRange(LOCATION_MZONE) - e3:SetTargetRange(0,1) - e3:SetValue(c95403418.aclimit) - c:RegisterEffect(e3) - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_FIELD) - e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e4:SetCode(EFFECT_CANNOT_FLIP_SUMMON) - e4:SetRange(LOCATION_MZONE) - e4:SetTargetRange(0,1) - c:RegisterEffect(e4) - local e5=e4:Clone() - e5:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - c:RegisterEffect(e5) - --self destroy - local e6=Effect.CreateEffect(c) - e6:SetType(EFFECT_TYPE_SINGLE) - e6:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e6:SetRange(LOCATION_MZONE) - e6:SetCode(EFFECT_SELF_DESTROY) - e6:SetCondition(c95403418.descon) - c:RegisterEffect(e6) -end -function c95403418.aclimit(e,re,tp) - local rc=re:GetHandler() - return re:IsHasType(EFFECT_TYPE_ACTIVATE) and rc:IsLocation(LOCATION_SZONE) and rc:IsFacedown() -end -function c95403418.filter(c) - return c:IsFaceup() and c:IsSetCard(0x80) and c:IsAbleToGraveAsCost() -end -function c95403418.spcon(e,c) - if c==nil then return true end - local ft=Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE) - if ft<=0 then ft=-ft+1 else ft=1 end - return Duel.IsExistingMatchingCard(c95403418.filter,c:GetControler(),LOCATION_MZONE,0,ft,nil) -end -function c95403418.spop(e,tp,eg,ep,ev,re,r,rp,c) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ft<=0 then ft=-ft+1 else ft=1 end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c95403418.filter,tp,LOCATION_MZONE,0,ft,5,nil) - local ct=Duel.SendtoGrave(g,REASON_COST) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK) - e1:SetValue(ct*1000) - e1:SetReset(RESET_EVENT+0xff0000) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_SET_DEFENCE) - c:RegisterEffect(e2) -end -function c95403418.descon(e) - local tp=e:GetHandlerPlayer() - return Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)0 end -end -function c95442074.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local g=Duel.GetFieldGroup(tp,0,LOCATION_MZONE) - if g:GetCount()>0 then - Duel.ChangePosition(g,POS_FACEUP_ATTACK) - c:RegisterFlagEffect(69058960,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) - local tc=g:GetFirst() - while tc do - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_MUST_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_CANNOT_EP) - e2:SetRange(LOCATION_MZONE) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetTargetRange(1,0) - e2:SetCondition(c95442074.becon) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetRange(LOCATION_MZONE) - e3:SetTargetRange(0,LOCATION_MZONE) - e3:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_IMMUNE) - e3:SetCode(EFFECT_CANNOT_BE_BATTLE_TARGET) - e3:SetTarget(c95442074.bttg) - e3:SetValue(c95442074.vala) - e3:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e3) - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetCode(EFFECT_CANNOT_DIRECT_ATTACK) - e4:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e4) - tc=g:GetNext() - end - end -end -function c95442074.filter(c) - return c:IsFaceup() and c:IsCode(69058960) -end -function c95442074.indcon(e) - return Duel.IsExistingMatchingCard(c95442074.filter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) - and e:GetHandler():GetOverlayCount()~=0 -end -function c95442074.refcon(e) - return Duel.IsExistingMatchingCard(c95442074.filter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) - and Duel.GetAttackTarget()==e:GetHandler() -end -function c95442074.becon(e) - return e:GetHandler():IsAttackable() -end -function c95442074.bttg(e,c) - return c:GetFlagEffect(69058960)==0 -end -function c95442074.vala(e,c) - return c==e:GetHandler() -end diff --git a/script/c95443805.lua b/script/c95443805.lua deleted file mode 100644 index 6c3d1a55d0..0000000000 --- a/script/c95443805.lua +++ /dev/null @@ -1,30 +0,0 @@ ---霞の谷の祈祷師 -function c95443805.initial_effect(c) - --atkup - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(95443805,0)) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCost(c95443805.atkcost) - e1:SetOperation(c95443805.atkop) - c:RegisterEffect(e1) -end -function c95443805.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToHandAsCost,tp,LOCATION_MZONE,0,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g=Duel.SelectMatchingCard(tp,Card.IsAbleToHandAsCost,tp,LOCATION_MZONE,0,1,1,e:GetHandler()) - Duel.SendtoHand(g,nil,REASON_COST) -end -function c95443805.atkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFaceup() and c:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(500) - e1:SetReset(RESET_EVENT+0x1ff0000+RESET_PHASE+PHASE_END) - c:RegisterEffect(e1) - end -end diff --git a/script/c95448692.lua b/script/c95448692.lua deleted file mode 100644 index d1885e4538..0000000000 --- a/script/c95448692.lua +++ /dev/null @@ -1,54 +0,0 @@ ---ダメージ・ダイエット -function c95448692.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetOperation(c95448692.activate) - c:RegisterEffect(e1) - --effect damage - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetRange(LOCATION_GRAVE) - e2:SetCost(c95448692.cost2) - e2:SetOperation(c95448692.activate2) - c:RegisterEffect(e2) -end -c95448692[0]=0 -c95448692[1]=0 -function c95448692.activate(e,tp,eg,ep,ev,re,r,rp) - c95448692[tp]=1 - if Duel.GetFlagEffect(tp,95448692)~=0 then return end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CHANGE_DAMAGE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetTargetRange(1,0) - e1:SetValue(c95448692.val) - e1:SetReset(RESET_PHASE+PHASE_END,1) - Duel.RegisterEffect(e1,tp) - Duel.RegisterFlagEffect(tp,95448692,RESET_PHASE+PHASE_END,0,1) -end -function c95448692.cost2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT) -end -function c95448692.activate2(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetFlagEffect(tp,95448692)~=0 then return end - c95448692[tp]=0 - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CHANGE_DAMAGE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetTargetRange(1,0) - e1:SetValue(c95448692.val) - e1:SetReset(RESET_PHASE+PHASE_END,1) - Duel.RegisterEffect(e1,tp) - Duel.RegisterFlagEffect(tp,95448692,RESET_PHASE+PHASE_END,0,1) -end -function c95448692.val(e,re,dam,r,rp,rc) - if c95448692[e:GetOwnerPlayer()]==1 or bit.band(r,REASON_EFFECT)~=0 then - return dam/2 - else return dam end -end diff --git a/script/c95451366.lua b/script/c95451366.lua deleted file mode 100644 index 3daa0427e5..0000000000 --- a/script/c95451366.lua +++ /dev/null @@ -1,25 +0,0 @@ ---魔力枯渇 -function c95451366.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c95451366.target) - e1:SetOperation(c95451366.activate) - c:RegisterEffect(e1) -end -function c95451366.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsCanRemoveCounter(tp,1,1,0x3001,1,REASON_EFFECT) end -end -function c95451366.filter(c) - return c:IsFaceup() and c:GetCounter(0x3001)~=0 -end -function c95451366.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c95451366.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) - local tc=g:GetFirst() - while tc do - local cc=tc:GetCounter(0x3001) - tc:RemoveCounter(tp,0x3001,cc,REASON_EFFECT) - tc=g:GetNext() - end -end diff --git a/script/c95453143.lua b/script/c95453143.lua deleted file mode 100644 index 23dfb300e3..0000000000 --- a/script/c95453143.lua +++ /dev/null @@ -1,88 +0,0 @@ ---ワンハンドレッド・アイ・ドラゴン -function c95453143.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_DARK),aux.NonTuner(Card.IsRace,RACE_FIEND),1) - c:EnableReviveLimit() - --copy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(95453143,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c95453143.cost) - e1:SetOperation(c95453143.operation) - c:RegisterEffect(e1) - --search - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(95453143,1)) - e2:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_SINGLE) - e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetCondition(c95453143.thcon) - e2:SetTarget(c95453143.thtg) - e2:SetOperation(c95453143.thop) - c:RegisterEffect(e2) -end -function c95453143.filter(c) - return c:IsLevelBelow(6) and c:IsType(TYPE_EFFECT) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsAbleToRemoveAsCost() -end -function c95453143.cost(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chk==0 then return Duel.IsExistingMatchingCard(c95453143.filter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c95453143.filter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) - e:SetLabel(g:GetFirst():GetOriginalCode()) -end -function c95453143.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local code=e:GetLabel() - if c:IsRelateToEffect(e) and c:IsFaceup() then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - e1:SetCode(EFFECT_CHANGE_CODE) - e1:SetValue(code) - c:RegisterEffect(e1) - local cid=c:CopyEffect(code,RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END,1) - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(95453143,2)) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_PHASE+PHASE_END) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e2:SetCountLimit(1) - e2:SetRange(LOCATION_MZONE) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - e2:SetLabelObject(e1) - e2:SetLabel(cid) - e2:SetOperation(c95453143.rstop) - c:RegisterEffect(e2) - end -end -function c95453143.rstop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local cid=e:GetLabel() - c:ResetEffect(cid,RESET_COPY) - local e1=e:GetLabelObject() - e1:Reset() - Duel.HintSelection(Group.FromCards(c)) - Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) -end -function c95453143.thcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsReason(REASON_DESTROY) -end -function c95453143.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,LOCATION_DECK) -end -function c95453143.thfilter(c) - return c:IsSetCard(0x21) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() -end -function c95453143.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c95453143.thfilter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c95457011.lua b/script/c95457011.lua deleted file mode 100644 index 82ac0fc873..0000000000 --- a/script/c95457011.lua +++ /dev/null @@ -1,73 +0,0 @@ ---天帝従騎イデア -function c95457011.initial_effect(c) - --summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(95457011,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetProperty(EFFECT_FLAG_DELAY) - e1:SetCountLimit(1,95457011) - e1:SetTarget(c95457011.sptg) - e1:SetOperation(c95457011.spop) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e2) - --to hand - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(95457011,1)) - e3:SetCategory(CATEGORY_TOHAND) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) - e3:SetCode(EVENT_TO_GRAVE) - e3:SetCountLimit(1,95457012) - e3:SetTarget(c95457011.thtg) - e3:SetOperation(c95457011.thop) - c:RegisterEffect(e3) -end -function c95457011.spfilter(c,e,tp) - return c:GetAttack()==800 and c:GetDefence()==1000 and not c:IsCode(95457011) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c95457011.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c95457011.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c95457011.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c95457011.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENCE) - end - end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) - e1:SetTargetRange(1,0) - e1:SetTarget(c95457011.splimit) - Duel.RegisterEffect(e1,tp) -end -function c95457011.splimit(e,c,sump,sumtype,sumpos,targetp,se) - return c:IsLocation(LOCATION_EXTRA) -end -function c95457011.thfilter(c) - return c:IsFaceup() and c:IsSetCard(0xbe) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand() -end -function c95457011.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_REMOVED) and c95457011.thfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c95457011.thfilter,tp,LOCATION_REMOVED,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c95457011.thfilter,tp,LOCATION_REMOVED,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c95457011.thop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end diff --git a/script/c95466842.lua b/script/c95466842.lua deleted file mode 100644 index bd3c7f4b64..0000000000 --- a/script/c95466842.lua +++ /dev/null @@ -1,23 +0,0 @@ ---水精鱗-アビスラング -function c95466842.initial_effect(c) - --at limit - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(0,LOCATION_MZONE) - e1:SetValue(c95466842.atlimit) - c:RegisterEffect(e1) - --atkup - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetRange(LOCATION_MZONE) - e2:SetTargetRange(LOCATION_MZONE,0) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetTarget(aux.TargetBoolFunction(Card.IsAttribute,ATTRIBUTE_WATER)) - e2:SetValue(300) - c:RegisterEffect(e2) -end -function c95466842.atlimit(e,c) - return c~=e:GetHandler() and c:IsFaceup() and c:IsAttribute(ATTRIBUTE_WATER) -end diff --git a/script/c95472621.lua b/script/c95472621.lua deleted file mode 100644 index 191e16a65e..0000000000 --- a/script/c95472621.lua +++ /dev/null @@ -1,29 +0,0 @@ ---大火葬 -function c95472621.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_REMOVE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_BECOME_TARGET) - e1:SetCondition(c95472621.condition) - e1:SetTarget(c95472621.target) - e1:SetOperation(c95472621.activate) - c:RegisterEffect(e1) -end -function c95472621.cfilter(c) - return c:IsLocation(LOCATION_GRAVE) and c:IsType(TYPE_MONSTER) -end -function c95472621.condition(e,tp,eg,ep,ev,re,r,rp) - return rp~=tp and eg:IsExists(c95472621.cfilter,1,nil) -end -function c95472621.filter(c) - return c:IsType(TYPE_MONSTER) and c:IsAbleToRemove() -end -function c95472621.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c95472621.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,PLAYER_ALL,LOCATION_GRAVE) -end -function c95472621.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsType,tp,LOCATION_GRAVE,LOCATION_GRAVE,nil,TYPE_MONSTER) - Duel.Remove(g,POS_FACEUP,REASON_EFFECT) -end diff --git a/script/c95486586.lua b/script/c95486586.lua deleted file mode 100644 index 13c34f76ff..0000000000 --- a/script/c95486586.lua +++ /dev/null @@ -1,88 +0,0 @@ ---E・HERO Core -function c95486586.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcFunRep(c,aux.FilterBoolFunction(Card.IsSetCard,0x3008),3,true) - --spsummon condition - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(aux.fuslimit) - c:RegisterEffect(e1) - --atkup - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(95486586,0)) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_BE_BATTLE_TARGET) - e2:SetCountLimit(1) - e2:SetOperation(c95486586.atkop) - c:RegisterEffect(e2) - --destroy - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(95486586,1)) - e3:SetCategory(CATEGORY_DESTROY) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_PHASE+PHASE_BATTLE) - e3:SetRange(LOCATION_MZONE) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetCountLimit(1) - e3:SetCondition(c95486586.descon) - e3:SetTarget(c95486586.destg) - e3:SetOperation(c95486586.desop) - c:RegisterEffect(e3) - --spsummon - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(95486586,2)) - e4:SetCategory(CATEGORY_SPECIAL_SUMMON) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e4:SetCode(EVENT_DESTROYED) - e4:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e4:SetTarget(c95486586.sptg) - e4:SetOperation(c95486586.spop) - c:RegisterEffect(e4) -end -function c95486586.atkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetValue(c:GetAttack()*2) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_DAMAGE) - c:RegisterEffect(e1) - end -end -function c95486586.descon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetBattledGroupCount()>0 -end -function c95486586.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsDestructable() end - if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c95486586.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end -function c95486586.spfilter(c,e,tp) - return c:IsLevelBelow(8) and c:IsSetCard(0x3008) and c:IsType(TYPE_FUSION) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) -end -function c95486586.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c95486586.spfilter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c95486586.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c95486586.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c95486586.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,true,false,POS_FACEUP) - end -end diff --git a/script/c95492061.lua b/script/c95492061.lua deleted file mode 100644 index e6451e4f44..0000000000 --- a/script/c95492061.lua +++ /dev/null @@ -1,30 +0,0 @@ ---マンジュ・ゴッド -function c95492061.initial_effect(c) - --effect - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(95492061,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c95492061.tg) - e1:SetOperation(c95492061.op) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - c:RegisterEffect(e2) -end -function c95492061.filter(c) - return c:IsType(TYPE_RITUAL) and c:IsAbleToHand() -end -function c95492061.tg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c95492061.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c95492061.op(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c95492061.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c95503687.lua b/script/c95503687.lua deleted file mode 100644 index 7eb793e121..0000000000 --- a/script/c95503687.lua +++ /dev/null @@ -1,58 +0,0 @@ ---ライトロード・サモナー ルミナス -function c95503687.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(95503687,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c95503687.spcost) - e1:SetTarget(c95503687.sptg) - e1:SetOperation(c95503687.spop) - c:RegisterEffect(e1) - --discard deck - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetCategory(CATEGORY_DECKDES) - e2:SetDescription(aux.Stringid(95503687,1)) - e2:SetCode(EVENT_PHASE+PHASE_END) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCondition(c95503687.discon) - e2:SetTarget(c95503687.distg) - e2:SetOperation(c95503687.disop) - c:RegisterEffect(e2) -end -function c95503687.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) -end -function c95503687.filter(c,e,tp) - return c:IsSetCard(0x38) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c95503687.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c95503687.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c95503687.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c95503687.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c95503687.spop(e,tp,eg,ep,ev,re,r,rp,chk) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end -function c95503687.discon(e,tp,eg,ep,ev,re,r,rp) - return tp==Duel.GetTurnPlayer() -end -function c95503687.distg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,3) -end -function c95503687.disop(e,tp,eg,ep,ev,re,r,rp) - Duel.DiscardDeck(tp,3,REASON_EFFECT) -end diff --git a/script/c95507060.lua b/script/c95507060.lua deleted file mode 100644 index 5655b7b6b9..0000000000 --- a/script/c95507060.lua +++ /dev/null @@ -1,53 +0,0 @@ ---狂植物の氾濫 -function c95507060.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetCondition(c95507060.condition) - e1:SetTarget(c95507060.target) - e1:SetOperation(c95507060.activate) - c:RegisterEffect(e1) -end -function c95507060.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end -function c95507060.filter(c) - return c:IsFaceup() and c:IsRace(RACE_PLANT) -end -function c95507060.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c95507060.filter,tp,LOCATION_MZONE,0,1,nil) end -end -function c95507060.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c95507060.filter,tp,LOCATION_MZONE,0,nil) - local atk=Duel.GetMatchingGroupCount(Card.IsRace,tp,LOCATION_GRAVE,0,nil,RACE_PLANT)*300 - local c=e:GetHandler() - local tc=g:GetFirst() - while tc do - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - e1:SetValue(atk) - tc:RegisterEffect(e1) - tc=g:GetNext() - end - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_PHASE+PHASE_END) - e2:SetReset(RESET_PHASE+RESET_END) - e2:SetCountLimit(1) - e2:SetCondition(c95507060.descon) - e2:SetOperation(c95507060.desop) - Duel.RegisterEffect(e2,tp) -end -function c95507060.descon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c95507060.filter,tp,LOCATION_MZONE,0,1,nil) -end -function c95507060.desop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c95507060.filter,tp,LOCATION_MZONE,0,nil) - Duel.Destroy(g,REASON_EFFECT) -end diff --git a/script/c95515060.lua b/script/c95515060.lua deleted file mode 100644 index 1ef3a87db6..0000000000 --- a/script/c95515060.lua +++ /dev/null @@ -1,78 +0,0 @@ ---静寂のロッド-ケースト -function c95515060.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c95515060.target) - e1:SetOperation(c95515060.operation) - c:RegisterEffect(e1) - --Def - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_UPDATE_DEFENCE) - e2:SetValue(500) - c:RegisterEffect(e2) - --Equip limit - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_EQUIP_LIMIT) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e3:SetValue(1) - c:RegisterEffect(e3) - --disable - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_FIELD) - e4:SetCode(EFFECT_DISABLE) - e4:SetRange(LOCATION_SZONE) - e4:SetTargetRange(LOCATION_SZONE,LOCATION_SZONE) - e4:SetTarget(c95515060.distg) - c:RegisterEffect(e4) - --disable effect - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e5:SetCode(EVENT_CHAIN_SOLVING) - e5:SetRange(LOCATION_SZONE) - e5:SetOperation(c95515060.disop) - c:RegisterEffect(e5) - --self destroy - local e6=Effect.CreateEffect(c) - e6:SetType(EFFECT_TYPE_FIELD) - e6:SetCode(EFFECT_SELF_DESTROY) - e6:SetRange(LOCATION_SZONE) - e6:SetTargetRange(LOCATION_SZONE,LOCATION_SZONE) - e6:SetTarget(c95515060.distg) - c:RegisterEffect(e6) -end -function c95515060.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c95515060.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,e:GetHandler(),tc) - end -end -function c95515060.distg(e,c) - local ec=e:GetHandler() - if c==ec or c:GetCardTargetCount()==0 then return false end - local eq=ec:GetEquipTarget() - return eq and c:GetCardTarget():IsContains(eq) and c:IsType(TYPE_SPELL) -end -function c95515060.disop(e,tp,eg,ep,ev,re,r,rp) - if not re:IsActiveType(TYPE_SPELL) then return end - local ec=e:GetHandler() - if not ec:GetEquipTarget() or not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return end - local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) - if not g or not g:IsContains(ec:GetEquipTarget()) then return end - Duel.NegateEffect(ev) - if re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(re:GetHandler(),REASON_EFFECT) - end -end diff --git a/script/c95519486.lua b/script/c95519486.lua deleted file mode 100644 index eebd13b071..0000000000 --- a/script/c95519486.lua +++ /dev/null @@ -1,61 +0,0 @@ ---六武衆-ザンジ -function c95519486.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(95519486,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_DAMAGE_STEP_END) - e1:SetCondition(c95519486.descon) - e1:SetTarget(c95519486.destg) - e1:SetOperation(c95519486.desop) - c:RegisterEffect(e1) - --Destroy replace - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DESTROY_REPLACE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetTarget(c95519486.desreptg) - e2:SetOperation(c95519486.desrepop) - c:RegisterEffect(e2) -end -function c95519486.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x3d) and c:GetCode()~=95519486 -end -function c95519486.descon(e,tp,eg,ep,ev,re,r,rp) - local d=Duel.GetAttackTarget() - return e:GetHandler()==Duel.GetAttacker() and d and d:IsRelateToBattle() - and Duel.IsExistingMatchingCard(c95519486.cfilter,tp,LOCATION_MZONE,0,1,nil) -end -function c95519486.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetAttackTarget():IsDestructable() end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,Duel.GetAttackTarget(),1,0,0) -end -function c95519486.desop(e,tp,eg,ep,ev,re,r,rp) - local d=Duel.GetAttackTarget() - if d:IsRelateToBattle() then - Duel.Destroy(d,REASON_EFFECT) - end -end -function c95519486.repfilter(c) - return c:IsFaceup() and c:IsSetCard(0x3d) and not c:IsStatus(STATUS_DESTROY_CONFIRMED+STATUS_BATTLE_DESTROYED) -end -function c95519486.desreptg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return not c:IsReason(REASON_REPLACE) and c:IsOnField() and c:IsFaceup() - and Duel.IsExistingMatchingCard(c95519486.repfilter,tp,LOCATION_MZONE,0,1,c) end - if Duel.SelectYesNo(tp,aux.Stringid(95519486,1)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESREPLACE) - local g=Duel.SelectMatchingCard(tp,c95519486.repfilter,tp,LOCATION_MZONE,0,1,1,c) - e:SetLabelObject(g:GetFirst()) - Duel.HintSelection(g) - g:GetFirst():SetStatus(STATUS_DESTROY_CONFIRMED,true) - return true - else return false end -end -function c95519486.desrepop(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetLabelObject() - tc:SetStatus(STATUS_DESTROY_CONFIRMED,false) - Duel.Destroy(tc,REASON_EFFECT+REASON_REPLACE) -end diff --git a/script/c95526884.lua b/script/c95526884.lua deleted file mode 100644 index 1767a3ab58..0000000000 --- a/script/c95526884.lua +++ /dev/null @@ -1,41 +0,0 @@ ---ハイパーサイコガンナー -function c95526884.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,nil,aux.NonTuner(Card.IsRace,RACE_PSYCHO),1) - c:EnableReviveLimit() - --pierce - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_PIERCE) - c:RegisterEffect(e1) - --recover - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(95526884,0)) - e2:SetCategory(CATEGORY_RECOVER) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_DAMAGE_STEP_END) - e2:SetCondition(c95526884.reccon) - e2:SetTarget(c95526884.rectg) - e2:SetOperation(c95526884.recop) - c:RegisterEffect(e2) -end -function c95526884.reccon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local a=Duel.GetAttacker() - local d=Duel.GetAttackTarget() - if not d then return false end - local m=a:GetAttack()-d:GetDefence() - e:SetLabel(m) - return c==a and d:GetDefence()>=0 and m>0 and bit.band(d:GetBattlePosition(),POS_DEFENCE)~=0 -end -function c95526884.rectg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(e:GetLabel()) - Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,e:GetLabel()) -end -function c95526884.recop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Recover(p,d,REASON_EFFECT) -end diff --git a/script/c95561280.lua b/script/c95561280.lua deleted file mode 100644 index 4326c1d767..0000000000 --- a/script/c95561280.lua +++ /dev/null @@ -1,29 +0,0 @@ ---猛毒の風 -function c95561280.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --atk down - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e2:SetTarget(c95561280.tg) - e2:SetValue(-500) - c:RegisterEffect(e2) - --disable spsummon - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetRange(LOCATION_SZONE) - e3:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e3:SetTargetRange(1,1) - e3:SetTarget(c95561280.tg) - c:RegisterEffect(e3) -end -function c95561280.tg(e,c) - return c:IsAttribute(ATTRIBUTE_WIND) -end diff --git a/script/c95600067.lua b/script/c95600067.lua deleted file mode 100644 index 63bc3fc6ea..0000000000 --- a/script/c95600067.lua +++ /dev/null @@ -1,40 +0,0 @@ ---宝玉獣 トパーズ・タイガー -function c95600067.initial_effect(c) - --send replace - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_TO_GRAVE_REDIRECT_CB) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetCondition(c95600067.repcon) - e1:SetOperation(c95600067.repop) - c:RegisterEffect(e1) - --atkup - local e2=Effect.CreateEffect(c) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetCondition(c95600067.condition) - e2:SetValue(400) - c:RegisterEffect(e2) -end -function c95600067.repcon(e) - local c=e:GetHandler() - return c:IsFaceup() and c:IsLocation(LOCATION_MZONE) and c:IsReason(REASON_DESTROY) -end -function c95600067.repop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local e1=Effect.CreateEffect(c) - e1:SetCode(EFFECT_CHANGE_TYPE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fc0000) - e1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS) - c:RegisterEffect(e1) - Duel.RaiseEvent(c,47408488,e,0,tp,0,0) -end -function c95600067.condition(e) - local phase=Duel.GetCurrentPhase() - return (phase==PHASE_DAMAGE or phase==PHASE_DAMAGE_CAL) - and Duel.GetAttacker()==e:GetHandler() and Duel.GetAttackTarget()~=nil -end diff --git a/script/c9560338.lua b/script/c9560338.lua deleted file mode 100644 index 8448bf3994..0000000000 --- a/script/c9560338.lua +++ /dev/null @@ -1,67 +0,0 @@ ---魔導冥士 ラモール -function c9560338.initial_effect(c) - --effect - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(9560338,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetCountLimit(1,9560338) - e1:SetTarget(c9560338.efftg) - e1:SetOperation(c9560338.effop) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e2) -end -function c9560338.cfilter(c) - return c:IsSetCard(0x106e) and c:IsType(TYPE_SPELL) -end -function c9560338.filter1(c) - return c:IsSetCard(0x106e) and c:IsType(TYPE_SPELL) and c:IsAbleToHand() -end -function c9560338.filter2(c,e,tp) - return c:IsRace(RACE_SPELLCASTER) and c:IsAttribute(ATTRIBUTE_DARK) - and c:IsLevelAbove(5) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c9560338.efftg(e,tp,eg,ep,ev,re,r,rp,chk) - local g=Duel.GetMatchingGroup(c9560338.cfilter,tp,LOCATION_GRAVE,0,nil) - if chk==0 then return g:GetClassCount(Card.GetCode)>=3 end - local ct=g:GetClassCount(Card.GetCode) - if ct>=4 then - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) - end - if ct>=5 then - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) - end -end -function c9560338.effop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local g=Duel.GetMatchingGroup(c9560338.cfilter,tp,LOCATION_GRAVE,0,nil) - local ct=g:GetClassCount(Card.GetCode) - if ct>=3 and c:IsFaceup() and c:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(600) - e1:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e1) - end - if ct>=4 then - Duel.BreakEffect() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c9560338.filter1,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end - end - if ct>=5 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then - Duel.BreakEffect() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c9560338.filter2,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end - end -end diff --git a/script/c95614612.lua b/script/c95614612.lua deleted file mode 100644 index 480a184053..0000000000 --- a/script/c95614612.lua +++ /dev/null @@ -1,22 +0,0 @@ ---砲弾ヤリ貝 -function c95614612.initial_effect(c) - --immune spell - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_IMMUNE_EFFECT) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c95614612.econ) - e1:SetValue(c95614612.efilter) - c:RegisterEffect(e1) -end -function c95614612.filter(c) - return c:IsFaceup() and c:IsCode(22702055) -end -function c95614612.econ(e) - return Duel.IsExistingMatchingCard(c95614612.filter,0,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) - or Duel.IsEnvironment(22702055) -end -function c95614612.efilter(e,te) - return te:IsActiveType(TYPE_SPELL) -end diff --git a/script/c95621257.lua b/script/c95621257.lua deleted file mode 100644 index 2750447cf1..0000000000 --- a/script/c95621257.lua +++ /dev/null @@ -1,18 +0,0 @@ ---フレムベル・マジカル -function c95621257.initial_effect(c) - --atk - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetCondition(c95621257.atkcon) - e1:SetValue(400) - c:RegisterEffect(e1) -end -function c95621257.filter(c) - return c:IsFaceup() and c:IsSetCard(0x1) -end -function c95621257.atkcon(e) - return Duel.IsExistingMatchingCard(c95621257.filter,e:GetHandler():GetControler(),LOCATION_MZONE,0,1,nil) -end diff --git a/script/c95637655.lua b/script/c95637655.lua deleted file mode 100644 index fac2e0e2cc..0000000000 --- a/script/c95637655.lua +++ /dev/null @@ -1,48 +0,0 @@ ---バックアップ・ウォリアー -function c95637655.initial_effect(c) - c:EnableReviveLimit() - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c95637655.spcon) - c:RegisterEffect(e1) - --spsummon cost - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_SPSUMMON_COST) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetCost(c95637655.spcost) - e2:SetOperation(c95637655.spop) - c:RegisterEffect(e2) - Duel.AddCustomActivityCounter(95637655,ACTIVITY_SPSUMMON,c95637655.counterfilter) -end -function c95637655.counterfilter(c) - return c:GetSummonType()~=SUMMON_TYPE_SYNCHRO -end -function c95637655.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==2 - and not Duel.IsExistingMatchingCard(Card.IsAttackPos,tp,LOCATION_MZONE,0,1,nil) - and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 -end -function c95637655.spcost(e,c,tp) - return Duel.GetCustomActivityCount(95637655,tp,ACTIVITY_SPSUMMON)==0 -end -function c95637655.spop(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetTargetRange(1,0) - e1:SetTarget(c95637655.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function c95637655.splimit(e,c,tp,sumtp,sumpos) - return bit.band(sumtp,SUMMON_TYPE_SYNCHRO)==SUMMON_TYPE_SYNCHRO -end diff --git a/script/c95638658.lua b/script/c95638658.lua deleted file mode 100644 index a0c8d89b30..0000000000 --- a/script/c95638658.lua +++ /dev/null @@ -1,43 +0,0 @@ ---流星の弓-シール -function c95638658.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c95638658.target) - e1:SetOperation(c95638658.operation) - c:RegisterEffect(e1) - --Atk down - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(-1000) - c:RegisterEffect(e2) - --Direct Attack - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_EQUIP) - e3:SetCode(EFFECT_DIRECT_ATTACK) - c:RegisterEffect(e3) - --Equip limit - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetCode(EFFECT_EQUIP_LIMIT) - e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e4:SetValue(1) - c:RegisterEffect(e4) -end -function c95638658.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:GetLocation()==LOCATION_MZONE and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c95638658.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,e:GetHandler(),tc) - end -end diff --git a/script/c95642274.lua b/script/c95642274.lua deleted file mode 100644 index 1dd16afbf3..0000000000 --- a/script/c95642274.lua +++ /dev/null @@ -1,30 +0,0 @@ ---謙虚な番兵 -function c95642274.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TODECK) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c95642274.target) - e1:SetOperation(c95642274.activate) - c:RegisterEffect(e1) -end -function c95642274.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,LOCATION_HAND,0,1,e:GetHandler()) - and not Duel.IsExistingMatchingCard(Card.IsPublic,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.SetTargetPlayer(tp) - Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_HAND) -end -function c95642274.activate(e,tp,eg,ep,ev,re,r,rp) - local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) - local cg=Duel.GetFieldGroup(p,LOCATION_HAND,0) - Duel.ConfirmCards(1-p,cg) - local g=Duel.GetMatchingGroup(Card.IsAbleToDeck,p,LOCATION_HAND,0,nil) - if g:GetCount()>=1 then - Duel.Hint(HINT_SELECTMSG,p,HINTMSG_TODECK) - local sg=g:Select(p,1,1,nil) - Duel.SendtoDeck(sg,nil,2,REASON_EFFECT) - end - Duel.ShuffleHand(p) -end diff --git a/script/c95676943.lua b/script/c95676943.lua deleted file mode 100644 index 7e5a3b5688..0000000000 --- a/script/c95676943.lua +++ /dev/null @@ -1,40 +0,0 @@ ---Extinction on Schedule -function c95676943.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_MAIN_END) - e1:SetCondition(c95676943.condition) - e1:SetCost(c95676943.cost) - e1:SetOperation(c95676943.activate) - c:RegisterEffect(e1) -end -function c95676943.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2 -end -function c95676943.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,2000) end - Duel.PayLPCost(tp,2000) -end -function c95676943.activate(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - c:SetTurnCounter(0) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE+PHASE_BATTLE) - e1:SetCountLimit(1) - e1:SetOperation(c95676943.tgop) - e1:SetReset(RESET_PHASE+PHASE_BATTLE,3) - Duel.RegisterEffect(e1,tp) -end -function c95676943.tgop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local ct=c:GetTurnCounter() - ct=ct+1 - c:SetTurnCounter(ct) - if ct==3 then - local g=Duel.GetFieldGroup(tp,LOCATION_ONFIELD,LOCATION_ONFIELD) - Duel.SendtoGrave(g,REASON_RULE) - end -end diff --git a/script/c95701283.lua b/script/c95701283.lua deleted file mode 100644 index 276e9ef8c9..0000000000 --- a/script/c95701283.lua +++ /dev/null @@ -1,49 +0,0 @@ ---光神機-轟龍 -function c95701283.initial_effect(c) - --summon with 1 tribute - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(95701283,0)) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SUMMON_PROC) - e1:SetCondition(c95701283.otcon) - e1:SetOperation(c95701283.otop) - e1:SetValue(SUMMON_TYPE_ADVANCE) - c:RegisterEffect(e1) - --pierce - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_PIERCE) - c:RegisterEffect(e2) -end -function c95701283.otcon(e,c) - if c==nil then return true end - return c:GetLevel()>6 and Duel.GetTributeCount(c)>0 -end -function c95701283.otop(e,tp,eg,ep,ev,re,r,rp,c) - local g=Duel.SelectTribute(tp,c,1,1) - c:SetMaterial(g) - Duel.Release(g, REASON_SUMMON+REASON_MATERIAL) - --to grave - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(95701283,1)) - e1:SetCategory(CATEGORY_TOGRAVE) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetTarget(c95701283.tgtg) - e1:SetOperation(c95701283.tgop) - e1:SetReset(RESET_EVENT+0xc6e0000) - c:RegisterEffect(e1) -end -function c95701283.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,e:GetHandler(),1,0,0) -end -function c95701283.tgop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - Duel.SendtoGrave(c,REASON_EFFECT) - end -end diff --git a/script/c95714077.lua b/script/c95714077.lua deleted file mode 100644 index 0b6f741415..0000000000 --- a/script/c95714077.lua +++ /dev/null @@ -1,42 +0,0 @@ ---ゼンマイマニュファクチャ -function c95714077.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(95714077,0)) - e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e2:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_FIELD) - e2:SetCode(EVENT_CHAIN_SOLVING) - e2:SetProperty(EFFECT_FLAG_DELAY) - e2:SetRange(LOCATION_SZONE) - e2:SetCountLimit(1) - e2:SetCondition(c95714077.thcon) - e2:SetTarget(c95714077.thtg) - e2:SetOperation(c95714077.thop) - c:RegisterEffect(e2) -end -function c95714077.thcon(e,tp,eg,ep,ev,re,r,rp) - return re:IsActiveType(TYPE_MONSTER) and re:GetHandler():IsSetCard(0x58) -end -function c95714077.filter(c) - return c:IsSetCard(0x58) and c:IsLevelBelow(4) and c:IsAbleToHand() -end -function c95714077.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsFaceup() and c:IsRelateToEffect(e) and not c:IsStatus(STATUS_CHAINING) - and Duel.IsExistingMatchingCard(c95714077.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c95714077.thop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c95714077.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c95727991.lua b/script/c95727991.lua deleted file mode 100644 index 10af0f73f1..0000000000 --- a/script/c95727991.lua +++ /dev/null @@ -1,31 +0,0 @@ ---カタパルト・タートル -function c95727991.initial_effect(c) - --damage - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(95727991,0)) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCost(c95727991.cost) - e1:SetTarget(c95727991.target) - e1:SetOperation(c95727991.operation) - c:RegisterEffect(e1) -end -function c95727991.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,nil,1,nil) end - local sg=Duel.SelectReleaseGroup(tp,nil,1,1,nil) - e:SetLabel(sg:GetFirst():GetAttack()/2) - Duel.Release(sg,REASON_COST) -end -function c95727991.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(e:GetLabel()) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,e:GetLabel()) -end -function c95727991.operation(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c95744531.lua b/script/c95744531.lua deleted file mode 100644 index 366e281789..0000000000 --- a/script/c95744531.lua +++ /dev/null @@ -1,21 +0,0 @@ ---グリグル -function c95744531.initial_effect(c) - --recover - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(95744531,0)) - e1:SetCategory(CATEGORY_RECOVER) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_CONTROL_CHANGED) - e1:SetProperty(EFFECT_FLAG_NO_TURN_RESET) - e1:SetCountLimit(1) - e1:SetTarget(c95744531.target) - e1:SetOperation(c95744531.operation) - c:RegisterEffect(e1) -end -function c95744531.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return not e:GetHandler():IsStatus(STATUS_CHAINING) end - Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,1-tp,3000) -end -function c95744531.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.Recover(1-tp,3000,REASON_EFFECT) -end diff --git a/script/c95750695.lua b/script/c95750695.lua deleted file mode 100644 index 612f8f0615..0000000000 --- a/script/c95750695.lua +++ /dev/null @@ -1,75 +0,0 @@ ---スーペルヴィス -function c95750695.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c95750695.target) - e1:SetOperation(c95750695.operation) - c:RegisterEffect(e1) - --duel status - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_DUAL_STATUS) - c:RegisterEffect(e2) - --Equip limit - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_EQUIP_LIMIT) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e3:SetValue(c95750695.eqlimit) - c:RegisterEffect(e3) - --spsummon - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(95750695,0)) - e4:SetCategory(CATEGORY_SPECIAL_SUMMON) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e4:SetProperty(EFFECT_FLAG_CARD_TARGET) - e4:SetCode(EVENT_TO_GRAVE) - e4:SetCondition(c95750695.spcon) - e4:SetTarget(c95750695.sptg) - e4:SetOperation(c95750695.spop) - c:RegisterEffect(e4) -end -function c95750695.eqlimit(e,c) - return c:IsType(TYPE_DUAL) -end -function c95750695.filter(c) - return c:IsFaceup() and c:IsType(TYPE_DUAL) -end -function c95750695.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c95750695.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c95750695.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c95750695.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c95750695.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,c,tc) - end -end -function c95750695.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousPosition(POS_FACEUP) - and e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) -end -function c95750695.spfilter(c,e,tp) - return c:IsType(TYPE_NORMAL) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c95750695.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c95750695.spfilter(chkc,e,tp) end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c95750695.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,g:GetCount(),0,0) -end -function c95750695.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c9576193.lua b/script/c9576193.lua deleted file mode 100644 index 497adf6a90..0000000000 --- a/script/c9576193.lua +++ /dev/null @@ -1,48 +0,0 @@ ---モンスター・スロット -function c9576193.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_REMOVE+CATEGORY_SPECIAL_SUMMON+CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c9576193.target) - e1:SetOperation(c9576193.activate) - c:RegisterEffect(e1) -end -function c9576193.filter1(c,tp) - local lv=c:GetLevel() - return lv>0 and c:IsFaceup() and Duel.IsExistingTarget(c9576193.filter2,tp,LOCATION_GRAVE,0,1,nil,lv) -end -function c9576193.filter2(c,lv) - return c:GetLevel()==lv and c:IsAbleToRemove() -end -function c9576193.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - if chk==0 then return Duel.IsPlayerCanDraw(tp,1) and Duel.IsExistingTarget(c9576193.filter1,tp,LOCATION_MZONE,0,1,nil,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - local g1=Duel.SelectTarget(tp,c9576193.filter1,tp,LOCATION_MZONE,0,1,1,nil,tp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g2=Duel.SelectTarget(tp,c9576193.filter2,tp,LOCATION_GRAVE,0,1,1,nil,g1:GetFirst():GetLevel()) - e:SetLabelObject(g1:GetFirst()) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g2,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c9576193.activate(e,tp,eg,ep,ev,re,r,rp) - local tc1=e:GetLabelObject() - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local tc2=g:GetFirst() - if tc2==tc1 then tc2=g:GetNext() end - if tc1:IsFacedown() or not tc1:IsRelateToEffect(e) then return end - if not tc2:IsRelateToEffect(e) or tc2:GetLevel()~=tc1:GetLevel() or Duel.Remove(tc2,POS_FACEUP,REASON_EFFECT)==0 then return end - Duel.BreakEffect() - if Duel.Draw(tp,1,REASON_EFFECT)==0 then return end - local dr=Duel.GetOperatedGroup():GetFirst() - Duel.ConfirmCards(1-tp,dr) - Duel.BreakEffect() - if dr:GetLevel()==tc1:GetLevel() then - if Duel.SpecialSummon(dr,0,tp,tp,false,false,POS_FACEUP)==0 then - Duel.ShuffleHand(tp) - end - else Duel.ShuffleHand(tp) end -end diff --git a/script/c95772051.lua b/script/c95772051.lua deleted file mode 100644 index 4bdf910143..0000000000 --- a/script/c95772051.lua +++ /dev/null @@ -1,65 +0,0 @@ ---魔聖騎士ランスロット -function c95772051.initial_effect(c) - c:SetUniqueOnField(1,0,95772051) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(95772051,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND+LOCATION_GRAVE) - e1:SetCost(c95772051.spcost) - e1:SetTarget(c95772051.sptg) - e1:SetOperation(c95772051.spop) - c:RegisterEffect(e1) - --search - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(95772051,1)) - e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,95772051) - e2:SetCost(c95772051.thcost) - e2:SetTarget(c95772051.thtg) - e2:SetOperation(c95772051.thop) - c:RegisterEffect(e2) -end -function c95772051.spfilter(c) - return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsType(TYPE_NORMAL) and c:IsAbleToGraveAsCost() -end -function c95772051.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c95772051.spfilter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c95772051.spfilter,tp,LOCATION_MZONE,0,1,1,nil) - Duel.SendtoGrave(g,REASON_COST) -end -function c95772051.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c95772051.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) - end -end -function c95772051.thfilter(c) - return c:IsSetCard(0x207a) and c:IsAbleToHand() -end -function c95772051.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsSetCard,1,nil,0x107a) end - local g=Duel.SelectReleaseGroup(tp,Card.IsSetCard,1,1,nil,0x107a) - Duel.Release(g,REASON_COST) -end -function c95772051.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c95772051.thfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c95772051.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c95772051.thfilter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c95784434.lua b/script/c95784434.lua deleted file mode 100644 index 3f229b5ab5..0000000000 --- a/script/c95784434.lua +++ /dev/null @@ -1,73 +0,0 @@ ---モルティング・エスケープ -function c95784434.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c95784434.target) - e1:SetOperation(c95784434.operation) - c:RegisterEffect(e1) - --Equip limit - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_EQUIP_LIMIT) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetValue(c95784434.eqlimit) - c:RegisterEffect(e2) - -- - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_EQUIP) - e3:SetCode(EFFECT_INDESTRUCTABLE_COUNT) - e3:SetCountLimit(1) - e3:SetValue(c95784434.valcon) - c:RegisterEffect(e3) - --atkup - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(95784434,0)) - e4:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_FIELD) - e4:SetRange(LOCATION_SZONE) - e4:SetCode(EVENT_DAMAGE_STEP_END) - e4:SetCondition(c95784434.adcon) - e4:SetOperation(c95784434.adop) - c:RegisterEffect(e4) -end -function c95784434.eqlimit(e,c) - return c:IsRace(RACE_REPTILE) -end -function c95784434.filter(c) - return c:IsFaceup() and c:IsRace(RACE_REPTILE) -end -function c95784434.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c95784434.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c95784434.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c95784434.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c95784434.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,e:GetHandler(),tc) - end -end -function c95784434.valcon(e,re,r,rp) - if bit.band(r,REASON_BATTLE)~=0 then - e:GetHandler():RegisterFlagEffect(95784434,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_DAMAGE,0,1) - return true - else return false end -end -function c95784434.adcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetFlagEffect(95784434)~=0 -end -function c95784434.adop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) then return end - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(300) - e1:SetReset(RESET_EVENT+0x1fe0000) - c:GetEquipTarget():RegisterEffect(e1) -end diff --git a/script/c95789089.lua b/script/c95789089.lua deleted file mode 100644 index 20e9716c08..0000000000 --- a/script/c95789089.lua +++ /dev/null @@ -1,28 +0,0 @@ ---カンガルー・チャンプ -function c95789089.initial_effect(c) - --change position - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(95789089,0)) - e1:SetCategory(CATEGORY_POSITION) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_DAMAGE_STEP_END) - e1:SetCondition(c95789089.cpcon) - e1:SetTarget(c95789089.cptg) - e1:SetOperation(c95789089.cpop) - c:RegisterEffect(e1) -end -function c95789089.cpcon(e,tp,eg,ep,ev,re,r,rp) - local t=e:GetHandler():GetBattleTarget() - e:SetLabelObject(t) - return t and t:IsRelateToBattle() -end -function c95789089.cptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_POSITION,e:GetLabelObject(),1,0,0) -end -function c95789089.cpop(e,tp,eg,ep,ev,re,r,rp) - local g=e:GetLabelObject() - if g:IsRelateToBattle() and g:IsAttackPos() then - Duel.ChangePosition(g,POS_FACEUP_DEFENCE) - end -end diff --git a/script/c95816395.lua b/script/c95816395.lua deleted file mode 100644 index 1c5e7f3aa2..0000000000 --- a/script/c95816395.lua +++ /dev/null @@ -1,44 +0,0 @@ ---どぐう -function c95816395.initial_effect(c) - --to grave - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetOperation(c95816395.regop) - c:RegisterEffect(e1) -end -function c95816395.regop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if rp~=tp and c:IsReason(REASON_EFFECT) then - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(95816395,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_GRAVE) - e1:SetTarget(c95816395.thtg) - e1:SetOperation(c95816395.thop) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - c:RegisterEffect(e1) - end -end -function c95816395.cfilter(c,lv) - return c:GetLevel()==lv -end -function c95816395.filter(c,tp) - return c:IsType(TYPE_MONSTER) and c:IsAbleToHand() - and not Duel.IsExistingMatchingCard(c95816395.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil,c:GetLevel()) -end -function c95816395.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c95816395.filter,tp,LOCATION_DECK,0,1,nil,tp) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c95816395.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c95816395.filter,tp,LOCATION_DECK,0,1,1,nil,tp) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c95833645.lua b/script/c95833645.lua deleted file mode 100644 index 04da3e4f90..0000000000 --- a/script/c95833645.lua +++ /dev/null @@ -1,59 +0,0 @@ ---マグマ・ドラゴン -function c95833645.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCost(c95833645.cost) - e1:SetTarget(c95833645.target) - e1:SetOperation(c95833645.operation) - c:RegisterEffect(e1) - Duel.AddCustomActivityCounter(95833645,ACTIVITY_SPSUMMON,c95833645.counterfilter) -end -function c95833645.counterfilter(c) - return c:IsRace(RACE_WYRM) -end -function c95833645.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetCustomActivityCount(95833645,tp,ACTIVITY_SPSUMMON)==0 end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) - e1:SetTargetRange(1,0) - e1:SetTarget(c95833645.splimit) - Duel.RegisterEffect(e1,tp) -end -function c95833645.splimit(e,c) - return c:GetRace()~=RACE_WYRM -end -function c95833645.filter(c,e,tp) - return c:IsRace(RACE_WYRM) and not c:IsCode(95833645) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c95833645.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c95833645.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c95833645.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c95833645.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c95833645.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP_DEFENCE) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e2) - Duel.SpecialSummonComplete() - end -end diff --git a/script/c9583383.lua b/script/c9583383.lua deleted file mode 100644 index 300b0693bd..0000000000 --- a/script/c9583383.lua +++ /dev/null @@ -1,63 +0,0 @@ ---ガガガカイザー -function c9583383.initial_effect(c) - --atklimit - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetCondition(c9583383.atkcon) - c:RegisterEffect(e1) - --unsynchroable - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e2:SetValue(1) - c:RegisterEffect(e2) - --level change - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(9583383,0)) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1) - e3:SetCost(c9583383.lvcost) - e3:SetOperation(c9583383.lvop) - c:RegisterEffect(e3) -end -function c9583383.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x54) -end -function c9583383.atkcon(e) - return not Duel.IsExistingMatchingCard(c9583383.cfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,e:GetHandler()) -end -function c9583383.rfilter(c,tp) - local lv=c:GetLevel() - return lv>0 and c:IsAbleToRemoveAsCost() - and Duel.IsExistingMatchingCard(c9583383.tfilter,tp,LOCATION_MZONE,0,1,nil,lv) -end -function c9583383.tfilter(c,clv) - local lv=c:GetLevel() - return lv>0 and lv~=clv and c:IsFaceup() and c:IsSetCard(0x54) -end -function c9583383.lvcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c9583383.rfilter,tp,LOCATION_GRAVE,0,1,nil,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c9583383.rfilter,tp,LOCATION_GRAVE,0,1,1,nil,tp) - local lv=g:GetFirst():GetLevel() - Duel.SetTargetParam(lv) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c9583383.lvop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c9583383.cfilter,tp,LOCATION_MZONE,0,nil) - local lv=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM) - local tc=g:GetFirst() - while tc do - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CHANGE_LEVEL) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetValue(lv) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - tc=g:GetNext() - end -end diff --git a/script/c95841282.lua b/script/c95841282.lua deleted file mode 100644 index 7d9bfc0a3e..0000000000 --- a/script/c95841282.lua +++ /dev/null @@ -1,20 +0,0 @@ ---ネコ耳族 -function c95841282.initial_effect(c) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SET_BASE_ATTACK) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(0,LOCATION_MZONE) - e1:SetTarget(c95841282.atktg) - e1:SetCondition(c95841282.atkcon) - e1:SetValue(200) - c:RegisterEffect(e1) -end -function c95841282.atkcon(e) - local ph=Duel.GetCurrentPhase() - return (ph==PHASE_DAMAGE or ph==PHASE_DAMAGE_CAL) and Duel.GetTurnPlayer()~=e:GetHandlerPlayer() - and Duel.GetAttackTarget()==e:GetHandler() -end -function c95841282.atktg(e,c) - return c==e:GetHandler():GetBattleTarget() -end diff --git a/script/c95888876.lua b/script/c95888876.lua deleted file mode 100644 index dd6f614ca4..0000000000 --- a/script/c95888876.lua +++ /dev/null @@ -1,11 +0,0 @@ ---ヘルカイザー・ドラゴン -function c95888876.initial_effect(c) - aux.EnableDualAttribute(c) - --double atk - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_EXTRA_ATTACK) - e1:SetValue(1) - e1:SetCondition(aux.IsDualState) - c:RegisterEffect(e1) -end \ No newline at end of file diff --git a/script/c95905259.lua b/script/c95905259.lua deleted file mode 100644 index 7bb9d482a7..0000000000 --- a/script/c95905259.lua +++ /dev/null @@ -1,39 +0,0 @@ ---予言僧 チョウレン -function c95905259.initial_effect(c) - --confirm - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(95905259,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c95905259.target) - e1:SetOperation(c95905259.operation) - c:RegisterEffect(e1) -end -function c95905259.filter(c) - return c:GetSequence()~=5 and c:IsFacedown() -end -function c95905259.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_SZONE) and c95905259.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c95905259.filter,tp,0,LOCATION_SZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(95905259,1)) - Duel.SelectTarget(tp,c95905259.filter,tp,0,LOCATION_SZONE,1,1,nil) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CARDTYPE) - local res=Duel.SelectOption(tp,71,72) - e:SetLabel(res) -end -function c95905259.operation(e,tp,eg,ep,ev,re,r,rp) - local res=e:GetLabel() - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFacedown() then - Duel.ConfirmCards(tp,tc) - if (res==0 and tc:IsType(TYPE_SPELL)) or (res==1 and tc:IsType(TYPE_TRAP)) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_TRIGGER) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - end - end -end diff --git a/script/c95920682.lua b/script/c95920682.lua deleted file mode 100644 index 3e2fac1d15..0000000000 --- a/script/c95920682.lua +++ /dev/null @@ -1,25 +0,0 @@ ---ヒロイック・ギフト -function c95920682.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,95920682+EFFECT_COUNT_CODE_OATH) - e1:SetCondition(c95920682.condition) - e1:SetTarget(c95920682.target) - e1:SetOperation(c95920682.activate) - c:RegisterEffect(e1) -end -function c95920682.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetLP(1-tp)<=2000 -end -function c95920682.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp,2) end - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2) -end -function c95920682.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLP(1-tp)==8000 then return end - Duel.SetLP(1-tp,8000) - Duel.Draw(tp,2,REASON_EFFECT) -end diff --git a/script/c95929069.lua b/script/c95929069.lua deleted file mode 100644 index d71c5b2709..0000000000 --- a/script/c95929069.lua +++ /dev/null @@ -1,44 +0,0 @@ ---アイス・ハンド -function c95929069.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(95929069,0)) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCondition(c95929069.condition) - e1:SetTarget(c95929069.target) - e1:SetOperation(c95929069.operation) - c:RegisterEffect(e1) -end -function c95929069.condition(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:GetPreviousControler()==tp and c:IsReason(REASON_DESTROY) and rp~=tp -end -function c95929069.dfilter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable() -end -function c95929069.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and c95929069.dfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c95929069.dfilter,tp,0,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c95929069.dfilter,tp,0,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c95929069.spfilter(c,e,tp) - return c:IsCode(68535320) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c95929069.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)~=0 then - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local g=Duel.GetMatchingGroup(c95929069.spfilter,tp,LOCATION_DECK,0,nil,e,tp) - if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(95929069,1)) then - Duel.BreakEffect() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=g:Select(tp,1,1,nil) - Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) - end - end -end diff --git a/script/c95943058.lua b/script/c95943058.lua deleted file mode 100644 index 86340ac323..0000000000 --- a/script/c95943058.lua +++ /dev/null @@ -1,73 +0,0 @@ ---E-HERO ヘル・ゲイナー -function c95943058.initial_effect(c) - --extra atk - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(95943058,0)) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c95943058.condition) - e1:SetCost(c95943058.cost) - e1:SetTarget(c95943058.target) - e1:SetOperation(c95943058.operation) - c:RegisterEffect(e1) -end -function c95943058.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsAbleToEnterBP() -end -function c95943058.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) -end -function c95943058.filter(c) - return c:IsFaceup() and c:IsRace(RACE_FIEND) and not c:IsHasEffect(EFFECT_EXTRA_ATTACK) -end -function c95943058.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c95943058.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c95943058.filter,tp,LOCATION_MZONE,0,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c95943058.filter,tp,LOCATION_MZONE,0,1,1,e:GetHandler()) -end -function c95943058.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - --extra atk - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_EXTRA_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(1) - tc:RegisterEffect(e1) - end - --sp summon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(95943058,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetRange(LOCATION_REMOVED) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) - e2:SetCountLimit(1) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,2) - e2:SetCondition(c95943058.spcon) - e2:SetTarget(c95943058.sptg) - e2:SetOperation(c95943058.spop) - e2:SetLabel(0) - c:RegisterEffect(e2) -end -function c95943058.spcon(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetTurnPlayer()~=tp then return end - local ct=e:GetLabel() - e:SetLabel(ct+1) - return ct==1 -end -function c95943058.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c95943058.spop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP_ATTACK) - end -end diff --git a/script/c95952802.lua b/script/c95952802.lua deleted file mode 100644 index a4223abc4b..0000000000 --- a/script/c95952802.lua +++ /dev/null @@ -1,6 +0,0 @@ ---フラワー・ウルフ -function c95952802.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcCode2(c,90357090,43500484,true,true) -end diff --git a/script/c95956346.lua b/script/c95956346.lua deleted file mode 100644 index 97692b5ea5..0000000000 --- a/script/c95956346.lua +++ /dev/null @@ -1,33 +0,0 @@ ---シャインエンジェル -function c95956346.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(95956346,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetCondition(c95956346.condition) - e1:SetTarget(c95956346.target) - e1:SetOperation(c95956346.operation) - c:RegisterEffect(e1) -end -function c95956346.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsLocation(LOCATION_GRAVE) -end -function c95956346.filter(c,e,tp) - return c:IsAttackBelow(1500) and c:IsAttribute(ATTRIBUTE_LIGHT) - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c95956346.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c95956346.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c95956346.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c95956346.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_ATTACK) - end -end diff --git a/script/c9596126.lua b/script/c9596126.lua deleted file mode 100644 index 9581d3aa97..0000000000 --- a/script/c9596126.lua +++ /dev/null @@ -1,69 +0,0 @@ ---カオス・ソーサラー -function c9596126.initial_effect(c) - c:EnableReviveLimit() - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(9596126,0)) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c9596126.spcon) - e1:SetOperation(c9596126.spop) - c:RegisterEffect(e1) - --remove - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(9596126,1)) - e2:SetCategory(CATEGORY_REMOVE) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetCountLimit(1) - e2:SetRange(LOCATION_MZONE) - e2:SetCost(c9596126.rmcost) - e2:SetTarget(c9596126.rmtg) - e2:SetOperation(c9596126.rmop) - c:RegisterEffect(e2) -end -function c9596126.spfilter(c,att) - return c:IsAttribute(att) and c:IsAbleToRemoveAsCost() -end -function c9596126.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c9596126.spfilter,tp,LOCATION_GRAVE,0,1,nil,ATTRIBUTE_LIGHT) - and Duel.IsExistingMatchingCard(c9596126.spfilter,tp,LOCATION_GRAVE,0,1,nil,ATTRIBUTE_DARK) -end -function c9596126.spop(e,tp,eg,ep,ev,re,r,rp,c) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g1=Duel.SelectMatchingCard(tp,c9596126.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,ATTRIBUTE_LIGHT) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g2=Duel.SelectMatchingCard(tp,c9596126.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,ATTRIBUTE_DARK) - g1:Merge(g2) - Duel.Remove(g1,POS_FACEUP,REASON_COST) -end -function c9596126.rmcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():GetAttackAnnouncedCount()==0 end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_OATH) - e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e:GetHandler():RegisterEffect(e1,true) -end -function c9596126.tgfilter(c) - return c:IsFaceup() and c:IsAbleToRemove() -end -function c9596126.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c9596126.tgfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c9596126.tgfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,c9596126.tgfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) -end -function c9596126.rmop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) - end -end diff --git a/script/c95992081.lua b/script/c95992081.lua deleted file mode 100644 index 30d58071ad..0000000000 --- a/script/c95992081.lua +++ /dev/null @@ -1,39 +0,0 @@ ---虚空海竜リヴァイエール -function c95992081.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,3,2) - c:EnableReviveLimit() - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetDescription(aux.Stringid(95992081,0)) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c95992081.cost) - e1:SetTarget(c95992081.target) - e1:SetOperation(c95992081.operation) - c:RegisterEffect(e1) -end -function c95992081.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c95992081.filter(c,e,tp) - return c:IsFaceup() and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c95992081.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_REMOVED) and c95992081.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c95992081.filter,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c95992081.filter,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c95992081.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c95993388.lua b/script/c95993388.lua deleted file mode 100644 index 9a2da9abc3..0000000000 --- a/script/c95993388.lua +++ /dev/null @@ -1,78 +0,0 @@ ---地帝家臣ランドローブ -function c95993388.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_POSITION) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(1,95993388) - e1:SetTarget(c95993388.sptg) - e1:SetOperation(c95993388.spop) - c:RegisterEffect(e1) - --tohand - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_TOHAND) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_RELEASE) - e2:SetCountLimit(1,95993389) - e2:SetCondition(c95993388.thcon) - e2:SetTarget(c95993388.thtg) - e2:SetOperation(c95993388.thop) - c:RegisterEffect(e2) -end -function c95993388.filter(c) - return c:IsFaceup() and c:IsCanTurnSet() -end -function c95993388.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and c95993388.filter(chkc) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) - and Duel.IsExistingTarget(c95993388.filter,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - local g=Duel.SelectTarget(tp,c95993388.filter,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) - Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0) -end -function c95993388.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsRelateToEffect(e) - and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.ChangePosition(tc,POS_FACEDOWN_DEFENCE) - end - end - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) - e1:SetTargetRange(1,0) - e1:SetTarget(c95993388.splimit) - Duel.RegisterEffect(e1,tp) -end -function c95993388.splimit(e,c,sump,sumtype,sumpos,targetp,se) - return c:IsLocation(LOCATION_EXTRA) -end -function c95993388.thcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsReason(REASON_SUMMON) -end -function c95993388.thfilter(c) - return c:GetAttack()==800 and c:GetDefence()==1000 and not c:IsCode(95993388) and c:IsAbleToHand() -end -function c95993388.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c95993388.thfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c95993388.thfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c95993388.thfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c95993388.thop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end diff --git a/script/c96008713.lua b/script/c96008713.lua deleted file mode 100644 index 8b5d1b1fec..0000000000 --- a/script/c96008713.lua +++ /dev/null @@ -1,40 +0,0 @@ ---マジックアーム・シールド -function c96008713.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_CONTROL) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetCondition(c96008713.condition) - e1:SetTarget(c96008713.target) - e1:SetOperation(c96008713.activate) - c:RegisterEffect(e1) -end -function c96008713.condition(e,tp,eg,ep,ev,re,r,rp) - return tp~=Duel.GetTurnPlayer() and Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)>0 -end -function c96008713.filter(c) - return c:IsFaceup() and c:IsControlerCanBeChanged() -end -function c96008713.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local atr=Duel.GetAttacker() - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c96008713.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c96008713.filter,tp,0,LOCATION_MZONE,1,atr) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) - local g=Duel.SelectTarget(tp,c96008713.filter,tp,0,LOCATION_MZONE,1,1,atr) - Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0) -end -function c96008713.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - local a=Duel.GetAttacker() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - if not Duel.GetControl(tc,tp,PHASE_BATTLE,1) then - if not tc:IsImmuneToEffect(e) and tc:IsAbleToChangeControler() then - Duel.Destroy(tc,REASON_EFFECT) - end - elseif a:IsAttackable() and not a:IsImmuneToEffect(e) then - Duel.CalculateDamage(a,tc) - end - end -end diff --git a/script/c96012004.lua b/script/c96012004.lua deleted file mode 100644 index beedbf4be4..0000000000 --- a/script/c96012004.lua +++ /dev/null @@ -1,66 +0,0 @@ ---ラッキー・チャンス! -function c96012004.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c96012004.cointg) - e1:SetOperation(c96012004.coinop) - c:RegisterEffect(e1) - --coin - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(96012004,0)) - e2:SetCategory(CATEGORY_DRAW) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_QUICK_F) - e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e2:SetCode(EVENT_CHAINING) - e2:SetRange(LOCATION_SZONE) - e2:SetCondition(c96012004.coincon) - e2:SetOperation(c96012004.coinop) - e2:SetLabel(1) - c:RegisterEffect(e2) -end -function c96012004.coincon(e,tp,eg,ep,ev,re,r,rp) - local ex,eg,et,cp,ct=Duel.GetOperationInfo(ev,CATEGORY_COIN) - if ex and ct==1 and re:IsActiveType(TYPE_MONSTER) then - e:SetLabelObject(re) - return true - else return false end -end -function c96012004.cointg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - e:SetLabel(0) - local cc=Duel.GetCurrentChain() - if cc==1 then return end - local te=Duel.GetChainInfo(cc-1,CHAININFO_TRIGGERING_EFFECT) - local ex,eg,et,cp,ct=Duel.GetOperationInfo(cc-1,CATEGORY_COIN) - if ex and ct==1 and te:IsActiveType(TYPE_MONSTER) then - e:SetLabel(1) - e:SetLabelObject(te) - end -end -function c96012004.coinop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if e:GetLabel()==0 or not c:IsRelateToEffect(e) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_COIN) - local res=1-Duel.SelectOption(tp,60,61) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetProperty(EFFECT_FLAG_DELAY) - e1:SetCode(EVENT_TOSS_COIN) - e1:SetCondition(c96012004.drcon) - e1:SetOperation(c96012004.drop) - e1:SetCountLimit(1) - e1:SetReset(RESET_CHAIN) - e1:SetLabelObject(e:GetLabelObject()) - e1:SetLabel(res) - Duel.RegisterEffect(e1,tp) -end -function c96012004.drcon(e,tp,eg,ep,ev,re,r,rp) - local res=Duel.GetCoinResult() - return re==e:GetLabelObject() and res==e:GetLabel() -end -function c96012004.drop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_CARD,0,96012004) - Duel.Draw(tp,1,REASON_EFFECT) -end diff --git a/script/c96015976.lua b/script/c96015976.lua deleted file mode 100644 index da75e7a8b3..0000000000 --- a/script/c96015976.lua +++ /dev/null @@ -1,60 +0,0 @@ ---再転 -function c96015976.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c96015976.target1) - e1:SetOperation(c96015976.operation) - c:RegisterEffect(e1) - -- - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(96015976,0)) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetRange(LOCATION_SZONE) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetCost(c96015976.cost) - e2:SetTarget(c96015976.target2) - e2:SetOperation(c96015976.operation) - c:RegisterEffect(e2) -end -function c96015976.target1(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c96015976.filter(chkc) end - if chk==0 then return true end - if Duel.IsExistingTarget(c96015976.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) and Duel.SelectYesNo(tp,94) then - e:SetProperty(EFFECT_FLAG_CARD_TARGET) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c96015976.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - e:GetHandler():RegisterFlagEffect(96015976,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) - else - e:SetProperty(0) - end -end -function c96015976.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():GetFlagEffect(96015976)==0 end - e:GetHandler():RegisterFlagEffect(96015976,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) -end -function c96015976.filter(c) - local lv=c:GetLevel() - return c:IsFaceup() and lv~=0 and lv~=c:GetOriginalLevel() -end -function c96015976.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c96015976.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c96015976.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c96015976.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) -end -function c96015976.operation(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():GetFlagEffect(96015976)==0 then return end - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - local dc=Duel.TossDice(tp,1) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CHANGE_LEVEL) - e1:SetValue(dc) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - end -end diff --git a/script/c96029574.lua b/script/c96029574.lua deleted file mode 100644 index b656cb8ce9..0000000000 --- a/script/c96029574.lua +++ /dev/null @@ -1,74 +0,0 @@ ---ブラック・ブルドラゴ -function c96029574.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,nil,aux.NonTuner(Card.IsType,TYPE_DUAL),1) - c:EnableReviveLimit() - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(96029574,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCost(c96029574.descost) - e1:SetTarget(c96029574.destg) - e1:SetOperation(c96029574.desop) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(96029574,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetCondition(c96029574.spcon) - e2:SetTarget(c96029574.sptg) - e2:SetOperation(c96029574.spop) - c:RegisterEffect(e2) -end -function c96029574.cfilter(c) - return c:IsType(TYPE_DUAL) and c:IsAbleToGraveAsCost() -end -function c96029574.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c96029574.cfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c96029574.cfilter,tp,LOCATION_HAND,0,1,1,nil) - Duel.SendtoGrave(g,REASON_COST) -end -function c96029574.desfilter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable() -end -function c96029574.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and c96029574.desfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c96029574.desfilter,tp,0,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c96029574.desfilter,tp,0,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c96029574.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end -function c96029574.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsReason(REASON_DESTROY) -end -function c96029574.spfilter(c,e,tp) - return c:IsType(TYPE_DUAL) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c96029574.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c96029574.spfilter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c96029574.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c96029574.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c96029574.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)~=0 then - tc:EnableDualState() - end -end diff --git a/script/c9603356.lua b/script/c9603356.lua deleted file mode 100644 index 6a350011e6..0000000000 --- a/script/c9603356.lua +++ /dev/null @@ -1,57 +0,0 @@ ---シャドウナイトデーモン -function c9603356.initial_effect(c) - --maintain - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCondition(c9603356.mtcon) - e1:SetOperation(c9603356.mtop) - c:RegisterEffect(e1) - --disable and destroy - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_CHAIN_SOLVING) - e2:SetRange(LOCATION_MZONE) - e2:SetOperation(c9603356.disop) - c:RegisterEffect(e2) - --damage reduce - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e3:SetRange(LOCATION_MZONE) - e3:SetCode(EVENT_PRE_BATTLE_DAMAGE) - e3:SetCondition(c9603356.rdcon) - e3:SetOperation(c9603356.rdop) - c:RegisterEffect(e3) -end -function c9603356.mtcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c9603356.mtop(e,tp,eg,ep,ev,re,r,rp) - if Duel.CheckLPCost(tp,900) then - Duel.PayLPCost(tp,900) - else - Duel.Destroy(e:GetHandler(),REASON_RULE) - end -end -function c9603356.disop(e,tp,eg,ep,ev,re,r,rp) - if ep==tp then return end - if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end - local tg=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) - if not tg or not tg:IsContains(e:GetHandler()) or not Duel.IsChainDisablable(ev) then return false end - local rc=re:GetHandler() - local dc=Duel.TossDice(tp,1) - if dc~=3 then return end - Duel.NegateEffect(ev) - if rc:IsRelateToEffect(re) then - Duel.Destroy(rc,REASON_EFFECT) - end -end -function c9603356.rdcon(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp and e:GetHandler()==Duel.GetAttacker() -end -function c9603356.rdop(e,tp,eg,ep,ev,re,r,rp) - Duel.ChangeBattleDamage(ep,ev/2) -end diff --git a/script/c96051150.lua b/script/c96051150.lua deleted file mode 100644 index 5b2401f264..0000000000 --- a/script/c96051150.lua +++ /dev/null @@ -1,41 +0,0 @@ ---陽炎獣 メコレオス -function c96051150.initial_effect(c) - --cannot be target - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetValue(aux.tgoval) - c:RegisterEffect(e1) - --indes - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(96051150,0)) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCost(c96051150.cost) - e2:SetOperation(c96051150.operation) - c:RegisterEffect(e2) -end -function c96051150.cfilter(c) - return (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) and c:IsAttribute(ATTRIBUTE_FIRE) and c:IsAbleToGraveAsCost() -end -function c96051150.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c96051150.cfilter,tp,LOCATION_MZONE+LOCATION_HAND,0,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c96051150.cfilter,tp,LOCATION_MZONE+LOCATION_HAND,0,1,1,e:GetHandler()) - Duel.SendtoGrave(g,REASON_COST) -end -function c96051150.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFaceup() and c:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - e1:SetValue(1) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - c:RegisterEffect(e1) - end -end diff --git a/script/c96055137.lua b/script/c96055137.lua deleted file mode 100644 index a8e8990732..0000000000 --- a/script/c96055137.lua +++ /dev/null @@ -1,118 +0,0 @@ ---インフェルノイド・ベルフェゴル -function c96055137.initial_effect(c) - c:EnableReviveLimit() - --special summon condition - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_SPSUMMON_PROC) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e2:SetRange(LOCATION_HAND+LOCATION_GRAVE) - e2:SetCondition(c96055137.spcon) - e2:SetOperation(c96055137.spop) - c:RegisterEffect(e2) - --remove - local e3=Effect.CreateEffect(c) - e3:SetCategory(CATEGORY_REMOVE) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_ATTACK_ANNOUNCE) - e3:SetTarget(c96055137.rmtg1) - e3:SetOperation(c96055137.rmop1) - c:RegisterEffect(e3) - --remove - local e4=Effect.CreateEffect(c) - e4:SetCategory(CATEGORY_REMOVE) - e4:SetType(EFFECT_TYPE_QUICK_O) - e4:SetCode(EVENT_FREE_CHAIN) - e4:SetRange(LOCATION_MZONE) - e4:SetProperty(EFFECT_FLAG_CARD_TARGET) - e4:SetCountLimit(1) - e4:SetCost(c96055137.rmcost2) - e4:SetTarget(c96055137.rmtg2) - e4:SetOperation(c96055137.rmop2) - c:RegisterEffect(e4) -end -function c96055137.spfilter(c) - return c:IsSetCard(0xbb) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost() -end -function c96055137.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - local sum=0 - for i=0,4 do - local tc=Duel.GetFieldCard(tp,LOCATION_MZONE,i) - if tc and tc:IsFaceup() and tc:IsType(TYPE_EFFECT) then - if tc:IsType(TYPE_XYZ) then sum=sum+tc:GetRank() - else sum=sum+tc:GetLevel() end - end - end - if sum>8 then return false end - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ft<-1 then return false end - if c:IsHasEffect(34822850) then - if ft>0 then - return Duel.IsExistingMatchingCard(c96055137.spfilter,tp,LOCATION_MZONE+LOCATION_GRAVE+LOCATION_HAND,0,2,c) - else - local ct=-ft+1 - return Duel.IsExistingMatchingCard(c96055137.spfilter,tp,LOCATION_MZONE,0,ct,nil) - and Duel.IsExistingMatchingCard(c96055137.spfilter,tp,LOCATION_MZONE+LOCATION_GRAVE+LOCATION_HAND,0,2,c) - end - else - return ft>0 and Duel.IsExistingMatchingCard(c96055137.spfilter,tp,LOCATION_GRAVE+LOCATION_HAND,0,2,c) - end -end -function c96055137.spop(e,tp,eg,ep,ev,re,r,rp,c) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - local g=nil - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - if c:IsHasEffect(34822850) then - if ft>0 then - g=Duel.SelectMatchingCard(tp,c96055137.spfilter,tp,LOCATION_MZONE+LOCATION_GRAVE+LOCATION_HAND,0,2,2,c) - else - local sg=Duel.GetMatchingGroup(c96055137.spfilter,tp,LOCATION_MZONE+LOCATION_GRAVE+LOCATION_HAND,0,c) - local ct=-ft+1 - g=sg:FilterSelect(tp,Card.IsLocation,ct,ct,nil,LOCATION_MZONE) - if ct<2 then - sg:Sub(g) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g2=sg:Select(tp,1,1,nil) - g:Merge(g2) - end - end - else - g=Duel.SelectMatchingCard(tp,c96055137.spfilter,tp,LOCATION_GRAVE+LOCATION_HAND,0,2,2,c) - end - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c96055137.rmtg1(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_EXTRA,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,1-tp,LOCATION_EXTRA) -end -function c96055137.rmop1(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(1-tp,nil,1-tp,LOCATION_EXTRA,0,1,1,nil) - Duel.Remove(g,POS_FACEUP,REASON_EFFECT) -end -function c96055137.rmcost2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsReleasable,1,nil) end - local g=Duel.SelectReleaseGroup(tp,Card.IsReleasable,1,1,nil) - Duel.Release(g,REASON_COST) -end -function c96055137.rmtg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(1-tp) and chkc:IsAbleToRemove() end - if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) -end -function c96055137.rmop2(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) - end -end diff --git a/script/c96099959.lua b/script/c96099959.lua deleted file mode 100644 index 724d31f919..0000000000 --- a/script/c96099959.lua +++ /dev/null @@ -1,36 +0,0 @@ ---X-セイバー パロムロ -function c96099959.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(96099959,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetRange(LOCATION_GRAVE) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetCondition(c96099959.condition) - e1:SetCost(c96099959.cost) - e1:SetTarget(c96099959.target) - e1:SetOperation(c96099959.operation) - c:RegisterEffect(e1) -end -function c96099959.filter(c,ec,tp) - return c~=ec and c:IsSetCard(0xd) and c:IsLocation(LOCATION_GRAVE) and c:GetPreviousControler()==tp - and c:IsReason(REASON_BATTLE) -end -function c96099959.condition(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c96099959.filter,1,nil,e:GetHandler(),tp) -end -function c96099959.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,500) end - Duel.PayLPCost(tp,500) -end -function c96099959.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c96099959.operation(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c96142517.lua b/script/c96142517.lua deleted file mode 100644 index 5d9e5468eb..0000000000 --- a/script/c96142517.lua +++ /dev/null @@ -1,98 +0,0 @@ ---RUM-千死蛮巧 -function c96142517.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCost(c96142517.cost) - e1:SetTarget(c96142517.target) - e1:SetOperation(c96142517.activate) - c:RegisterEffect(e1) -end -function c96142517.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_SPSUMMON)==0 end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) - e1:SetTargetRange(1,0) - e1:SetTarget(c96142517.sumlimit) - Duel.RegisterEffect(e1,tp) -end -function c96142517.sumlimit(e,c,sump,sumtype,sumpos,targetp,se) - return e:GetHandler()~=se:GetHandler() -end -function c96142517.filter1(c,e,tp) - local rk=c:GetRank() - return c:IsType(TYPE_XYZ) - and Duel.IsExistingMatchingCard(c96142517.filter2,tp,0,LOCATION_GRAVE,1,nil,e,rk) - and Duel.IsExistingMatchingCard(c96142517.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,rk+1) -end -function c96142517.filter2(c,e,rk) - return c:IsType(TYPE_XYZ) and c:GetRank()==rk and c:IsCanBeEffectTarget(e) -end -function c96142517.filter3(c) - return c:IsType(TYPE_XYZ) and c:GetRank()==8 and c:IsCode(48995978) -end -function c96142517.spfilter(c,e,tp,rk) - if c:GetOriginalCode()==6165656 then - local g1=Duel.GetMatchingGroup(c96142517.filter2,tp,LOCATION_GRAVE,0,nil,e,8) - local g2=Duel.GetMatchingGroup(c96142517.filter2,tp,0,LOCATION_GRAVE,nil,e,8) - return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and g1:GetCount()>0 and g2:GetCount()>0 - and (g1:IsExists(Card.IsCode,1,nil,48995978) or g2:IsExists(Card.IsCode,1,nil,48995978)) - else - return c:GetRank()==rk and (c:IsSetCard(0x1048) or c:IsSetCard(0x1073)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) - end -end -function c96142517.spfilter2(c,e,tp,rk,g) - if c:GetOriginalCode()==6165656 then - return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and g:IsExists(Card.IsCode,1,nil,48995978) - else - return c:GetRank()==rk and (c:IsSetCard(0x1048) or c:IsSetCard(0x1073)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) - end -end -function c96142517.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c96142517.filter1,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - local g1=Duel.SelectTarget(tp,c96142517.filter1,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - local rk=g1:GetFirst():GetRank() - e:SetLabel(rk) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - local g2=Duel.SelectTarget(tp,c96142517.filter2,tp,0,LOCATION_GRAVE,1,1,nil,e,rk) - g1:Merge(g2) - local g=Duel.GetMatchingGroup(c96142517.filter2,tp,LOCATION_GRAVE,LOCATION_GRAVE,nil,e,rk) - g:Sub(g1) - if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(96142517,1)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - local sg=g:Select(tp,1,99,nil) - Duel.SetTargetCard(sg) - g1:Merge(sg) - end - local xg=Duel.GetMatchingGroup(c96142517.spfilter,tp,LOCATION_EXTRA,0,nil,e,tp,9) - if rk==8 and xg:GetClassCount(Card.GetOriginalCode)==1 and xg:GetFirst():GetOriginalCode()==6165656 - and not g1:IsExists(Card.IsCode,1,nil,48995978) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - local ng=Duel.SelectTarget(tp,c96142517.filter3,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil) - g1:Merge(ng) - end - Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g1,g1:GetCount(),0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function c96142517.activate(e,tp,eg,ep,ev,re,r,rp) - local rk=e:GetLabel() - local mg0=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local mg=mg0:Filter(Card.IsRelateToEffect,nil,e) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 or mg:GetCount()==0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c96142517.spfilter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,rk+1,mg0) - local sc=g:GetFirst() - if sc then - Duel.Overlay(sc,mg) - Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c96146814.lua b/script/c96146814.lua deleted file mode 100644 index f9e0016d3a..0000000000 --- a/script/c96146814.lua +++ /dev/null @@ -1,31 +0,0 @@ ---ADチェンジャー -function c96146814.initial_effect(c) - --adchange - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(96146814,0)) - e1:SetCategory(CATEGORY_POSITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_GRAVE) - e1:SetCost(c96146814.cost) - e1:SetTarget(c96146814.target) - e1:SetOperation(c96146814.operation) - c:RegisterEffect(e1) -end -function c96146814.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) -end -function c96146814.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) end - if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE) - local g=Duel.SelectTarget(tp,aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0) -end -function c96146814.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.ChangePosition(tc,POS_FACEUP_DEFENCE,POS_FACEDOWN_DEFENCE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK) - end -end diff --git a/script/c96148285.lua b/script/c96148285.lua deleted file mode 100644 index ee9ea69cc4..0000000000 --- a/script/c96148285.lua +++ /dev/null @@ -1,36 +0,0 @@ ---誘発召喚 -function c96148285.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(c96148285.condition) - e1:SetOperation(c96148285.activate) - c:RegisterEffect(e1) -end -function c96148285.condition(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(Card.IsControler,1,nil,1-tp) -end -function c96148285.filter(c,e,tp) - return c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c96148285.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then - local g=Duel.GetMatchingGroup(c96148285.filter,tp,LOCATION_HAND,0,nil,e,tp) - if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(96148285,0)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local tc=g:Select(tp,1,1,nil):GetFirst() - Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) - end - end - if Duel.GetLocationCount(1-tp,LOCATION_MZONE,1-tp)>0 then - local g=Duel.GetMatchingGroup(c96148285.filter,1-tp,LOCATION_HAND,0,nil,e,1-tp) - if g:GetCount()>0 and Duel.SelectYesNo(1-tp,aux.Stringid(96148285,0)) then - Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_SPSUMMON) - local tc=g:Select(1-tp,1,1,nil):GetFirst() - Duel.SpecialSummonStep(tc,0,1-tp,1-tp,false,false,POS_FACEUP) - end - end - Duel.SpecialSummonComplete() -end diff --git a/script/c96163807.lua b/script/c96163807.lua deleted file mode 100644 index 1b3fdaff22..0000000000 --- a/script/c96163807.lua +++ /dev/null @@ -1,44 +0,0 @@ ---冥界騎士トリスタン -function c96163807.initial_effect(c) - --tohand - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c96163807.thtg) - e1:SetOperation(c96163807.thop) - c:RegisterEffect(e1) - --atk - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetCondition(c96163807.atkcon) - e2:SetValue(300) - c:RegisterEffect(e2) -end -function c96163807.thfilter(c) - return c:GetDefence()==0 and c:IsRace(RACE_ZOMBIE) and c:IsAbleToHand() -end -function c96163807.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c96163807.thfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c96163807.thfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c96163807.thfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c96163807.thop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end -function c96163807.atkfilter(c) - return c:IsFaceup() and c:IsRace(RACE_ZOMBIE) -end -function c96163807.atkcon(e) - return Duel.IsExistingMatchingCard(c96163807.atkfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,e:GetHandler()) -end diff --git a/script/c96182448.lua b/script/c96182448.lua deleted file mode 100644 index 67ca5b2a6a..0000000000 --- a/script/c96182448.lua +++ /dev/null @@ -1,28 +0,0 @@ ---ニトロ・シンクロン -function c96182448.initial_effect(c) - --draw - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(96182448,0)) - e1:SetCategory(CATEGORY_DRAW) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_BE_MATERIAL) - e1:SetCondition(c96182448.drcon) - e1:SetTarget(c96182448.drtg) - e1:SetOperation(c96182448.drop) - c:RegisterEffect(e1) -end -function c96182448.drcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsLocation(LOCATION_GRAVE) and r==REASON_SYNCHRO and c:GetReasonCard():IsCode(18013090) -end -function c96182448.drtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(1) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c96182448.drop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end diff --git a/script/c96216229.lua b/script/c96216229.lua deleted file mode 100644 index 7294ae83ec..0000000000 --- a/script/c96216229.lua +++ /dev/null @@ -1,33 +0,0 @@ ---剣闘獣の戦車 -function c96216229.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) - e1:SetCode(EVENT_CHAINING) - e1:SetCondition(c96216229.condition) - e1:SetTarget(c96216229.target) - e1:SetOperation(c96216229.activate) - c:RegisterEffect(e1) -end -function c96216229.filter(c) - return c:IsFaceup() and c:IsSetCard(0x19) -end -function c96216229.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c96216229.filter,tp,LOCATION_MZONE,0,1,nil) - and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainNegatable(ev) -end -function c96216229.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) - end -end -function c96216229.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateActivation(ev) - if re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(eg,REASON_EFFECT) - end -end diff --git a/script/c96218085.lua b/script/c96218085.lua deleted file mode 100644 index f1dd3c68cf..0000000000 --- a/script/c96218085.lua +++ /dev/null @@ -1,51 +0,0 @@ ---中央突破 -function c96218085.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c96218085.condition) - e1:SetTarget(c96218085.target) - e1:SetOperation(c96218085.activate) - c:RegisterEffect(e1) -end -function c96218085.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()0 - and Duel.IsExistingTarget(c9622164.filter,tp,LOCATION_REMOVED,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c9622164.filter,tp,LOCATION_REMOVED,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c9622164.eqlimit(e,c) - return e:GetOwner()==c -end -function c9622164.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then - if Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_ATTACK)==0 then return end - Duel.Equip(tp,c,tc) - --Add Equip limit - local e1=Effect.CreateEffect(tc) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(c9622164.eqlimit) - c:RegisterEffect(e1) - end -end -function c9622164.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetHandler():GetFirstCardTarget() - if tc and tc:IsLocation(LOCATION_MZONE) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c96223501.lua b/script/c96223501.lua deleted file mode 100644 index 333545cdb3..0000000000 --- a/script/c96223501.lua +++ /dev/null @@ -1,69 +0,0 @@ ---竜星因士-セフィラツバーン -function c96223501.initial_effect(c) - --pendulum summon - aux.AddPendulumProcedure(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --splimit - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE) - e2:SetRange(LOCATION_PZONE) - e2:SetTargetRange(1,0) - e2:SetTarget(c96223501.splimit) - e2:SetCondition(aux.nfbdncon) - c:RegisterEffect(e2) - --destroy - local e3=Effect.CreateEffect(c) - e3:SetCategory(CATEGORY_DESTROY) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e3:SetCode(EVENT_SUMMON_SUCCESS) - e3:SetCountLimit(1,96223501) - e3:SetTarget(c96223501.target) - e3:SetOperation(c96223501.operation) - c:RegisterEffect(e3) - local e4=e3:Clone() - e4:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - c:RegisterEffect(e4) - local e5=e3:Clone() - e5:SetCode(EVENT_SPSUMMON_SUCCESS) - e5:SetCondition(c96223501.condition) - c:RegisterEffect(e5) -end -function c96223501.splimit(e,c,sump,sumtype,sumpos,targetp) - if c:IsSetCard(0x9c) or c:IsSetCard(0xc4) then return false end - return bit.band(sumtype,SUMMON_TYPE_PENDULUM)==SUMMON_TYPE_PENDULUM -end -function c96223501.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_PENDULUM -end -function c96223501.filter1(c) - return ((c:IsLocation(LOCATION_MZONE) and c:IsFaceup()) - or (c:IsLocation(LOCATION_SZONE) and (c:GetSequence()==6 or c:GetSequence()==7))) - and (c:IsSetCard(0x9c) or c:IsSetCard(0xc4)) and c:IsDestructable() -end -function c96223501.filter2(c) - return c:IsFaceup() and c:IsDestructable() -end -function c96223501.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - if chk==0 then return Duel.IsExistingTarget(c96223501.filter1,tp,LOCATION_ONFIELD,0,1,e:GetHandler()) - and Duel.IsExistingTarget(c96223501.filter2,tp,0,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g1=Duel.SelectTarget(tp,c96223501.filter1,tp,LOCATION_ONFIELD,0,1,1,e:GetHandler()) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g2=Duel.SelectTarget(tp,c96223501.filter2,tp,0,LOCATION_ONFIELD,1,1,nil) - g1:Merge(g2) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g1,2,0,0) -end -function c96223501.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) - if g:GetCount()>0 then - Duel.Destroy(g,REASON_EFFECT) - end -end diff --git a/script/c96235275.lua b/script/c96235275.lua deleted file mode 100644 index baf823295a..0000000000 --- a/script/c96235275.lua +++ /dev/null @@ -1,38 +0,0 @@ ---ライトロード・パラディン ジェイン -function c96235275.initial_effect(c) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetCondition(c96235275.condtion) - e1:SetValue(300) - c:RegisterEffect(e1) - --discard deck - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetCategory(CATEGORY_DECKDES) - e2:SetDescription(aux.Stringid(96235275,0)) - e2:SetCode(EVENT_PHASE+PHASE_END) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCondition(c96235275.discon) - e2:SetTarget(c96235275.distg) - e2:SetOperation(c96235275.disop) - c:RegisterEffect(e2) -end -function c96235275.condtion(e) - local ph=Duel.GetCurrentPhase() - return (ph==PHASE_DAMAGE or ph==PHASE_DAMAGE_CAL) - and Duel.GetAttacker()==e:GetHandler() and Duel.GetAttackTarget()~=nil -end -function c96235275.discon(e,tp,eg,ep,ev,re,r,rp) - return tp==Duel.GetTurnPlayer() -end -function c96235275.distg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,2) -end -function c96235275.disop(e,tp,eg,ep,ev,re,r,rp) - Duel.DiscardDeck(tp,2,REASON_EFFECT) -end diff --git a/script/c9628664.lua b/script/c9628664.lua deleted file mode 100644 index 516c04937e..0000000000 --- a/script/c9628664.lua +++ /dev/null @@ -1,49 +0,0 @@ ---地母神アイリス -function c9628664.initial_effect(c) - --chain - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EVENT_CHAINING) - e1:SetRange(LOCATION_MZONE) - e1:SetOperation(c9628664.chop) - c:RegisterEffect(e1) - --draw - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(9628664,0)) - e2:SetCategory(CATEGORY_DRAW) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetCode(EVENT_CHAIN_END) - e2:SetRange(LOCATION_MZONE) - e2:SetCondition(c9628664.drcon) - e2:SetTarget(c9628664.drtg) - e2:SetOperation(c9628664.drop) - e2:SetLabelObject(e1) - c:RegisterEffect(e2) -end -function c9628664.chop(e,tp,eg,ep,ev,re,r,rp) - local ct=Duel.GetCurrentChain() - if ct==1 then - e:SetLabel(0) - elseif not Duel.CheckChainUniqueness() then - e:SetLabel(2) - elseif ct>=3 and e:GetLabel()~=2 then - e:SetLabel(1) - end -end -function c9628664.drcon(e,tp,eg,ep,ev,re,r,rp) - local res=e:GetLabelObject():GetLabel() - e:GetLabelObject():SetLabel(0) - return res==1 -end -function c9628664.drtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(1) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c9628664.drop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end diff --git a/script/c96287685.lua b/script/c96287685.lua deleted file mode 100644 index 9edba6271a..0000000000 --- a/script/c96287685.lua +++ /dev/null @@ -1,27 +0,0 @@ ---瓶亀 -function c96287685.initial_effect(c) - --draw - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e1:SetCode(EVENT_CHAINING) - e1:SetRange(LOCATION_MZONE) - e1:SetOperation(c96287685.regop) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e2:SetCode(EVENT_CHAIN_SOLVING) - e2:SetProperty(EFFECT_FLAG_DELAY) - e2:SetRange(LOCATION_MZONE) - e2:SetOperation(c96287685.drawop) - c:RegisterEffect(e2) -end -function c96287685.regop(e,tp,eg,ep,ev,re,r,rp) - if re:GetHandler():IsCode(83968380) then - e:GetHandler():RegisterFlagEffect(96287685,RESET_EVENT+0x1fe0000+RESET_CHAIN,0,1) - end -end -function c96287685.drawop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():GetFlagEffect(96287685)~=0 and re:GetHandler():IsCode(83968380) then - Duel.Draw(tp,1,REASON_EFFECT) - end -end diff --git a/script/c96300057.lua b/script/c96300057.lua deleted file mode 100644 index 804cf5f39a..0000000000 --- a/script/c96300057.lua +++ /dev/null @@ -1,96 +0,0 @@ ---W-ウィング・カタパルト -function c96300057.initial_effect(c) - --equip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(96300057,0)) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetTarget(c96300057.eqtg) - e1:SetOperation(c96300057.eqop) - c:RegisterEffect(e1) - --unequip - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(96300057,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_SZONE) - e2:SetCondition(c96300057.uncon) - e2:SetTarget(c96300057.sptg) - e2:SetOperation(c96300057.spop) - c:RegisterEffect(e2) - --Atk up - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_EQUIP) - e3:SetCode(EFFECT_UPDATE_ATTACK) - e3:SetValue(400) - e3:SetCondition(c96300057.uncon) - c:RegisterEffect(e3) - --Def up - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_EQUIP) - e4:SetCode(EFFECT_UPDATE_DEFENCE) - e4:SetValue(400) - e4:SetCondition(c96300057.uncon) - c:RegisterEffect(e4) - --destroy sub - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_EQUIP) - e5:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e5:SetCode(EFFECT_DESTROY_SUBSTITUTE) - e5:SetCondition(c96300057.uncon) - e5:SetValue(c96300057.repval) - c:RegisterEffect(e5) - --eqlimit - local e6=Effect.CreateEffect(c) - e6:SetType(EFFECT_TYPE_SINGLE) - e6:SetCode(EFFECT_EQUIP_LIMIT) - e6:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e6:SetValue(c96300057.eqlimit) - c:RegisterEffect(e6) -end -function c96300057.uncon(e) - return e:GetHandler():IsStatus(STATUS_UNION) -end -function c96300057.repval(e,re,r,rp) - return bit.band(r,REASON_BATTLE)~=0 -end -function c96300057.eqlimit(e,c) - return c:IsCode(51638941) -end -function c96300057.filter(c) - return c:IsFaceup() and c:IsCode(51638941) and c:GetUnionCount()==0 -end -function c96300057.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c96300057.filter(chkc) end - if chk==0 then return e:GetHandler():GetFlagEffect(96300057)==0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingTarget(c96300057.filter,tp,LOCATION_MZONE,0,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local g=Duel.SelectTarget(tp,c96300057.filter,tp,LOCATION_MZONE,0,1,1,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0) - e:GetHandler():RegisterFlagEffect(96300057,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1) -end -function c96300057.eqop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if not c:IsRelateToEffect(e) or c:IsFacedown() then return end - if not tc:IsRelateToEffect(e) or not c96300057.filter(tc) then - Duel.SendtoGrave(c,REASON_EFFECT) - return - end - if not Duel.Equip(tp,c,tc,false) then return end - c:SetStatus(STATUS_UNION,true) -end -function c96300057.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():GetFlagEffect(96300057)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) - e:GetHandler():RegisterFlagEffect(96300057,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1) -end -function c96300057.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP_ATTACK) - end -end diff --git a/script/c96316857.lua b/script/c96316857.lua deleted file mode 100644 index 95c026730f..0000000000 --- a/script/c96316857.lua +++ /dev/null @@ -1,45 +0,0 @@ ---リサイクル -function c96316857.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --recycle - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(96316857,0)) - e2:SetCategory(CATEGORY_TODECK) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) - e2:SetRange(LOCATION_SZONE) - e2:SetCondition(c96316857.rccon) - e2:SetCost(c96316857.rccost) - e2:SetTarget(c96316857.rctg) - e2:SetOperation(c96316857.rcop) - c:RegisterEffect(e2) -end -function c96316857.rccon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c96316857.rccost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,300) end - Duel.PayLPCost(tp,300) -end -function c96316857.filter(c) - return c:IsAbleToDeck() and not c:IsType(TYPE_MONSTER) -end -function c96316857.rctg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c96316857.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c96316857.filter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectTarget(tp,c96316857.filter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0) -end -function c96316857.rcop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoDeck(tc,nil,1,REASON_EFFECT) - end -end diff --git a/script/c96331676.lua b/script/c96331676.lua deleted file mode 100644 index dd3220bd47..0000000000 --- a/script/c96331676.lua +++ /dev/null @@ -1,35 +0,0 @@ ---宝玉の祈り -function c96331676.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c96331676.cost) - e1:SetTarget(c96331676.target) - e1:SetOperation(c96331676.activate) - c:RegisterEffect(e1) -end -function c96331676.costfilter(c) - return c:IsFaceup() and c:IsSetCard(0x1034) and c:IsAbleToGraveAsCost() -end -function c96331676.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c96331676.costfilter,tp,LOCATION_SZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c96331676.costfilter,tp,LOCATION_SZONE,0,1,1,nil) - Duel.SendtoGrave(g,REASON_COST) -end -function c96331676.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and chkc:IsDestructable() end - if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,0,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,0,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c96331676.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c9633505.lua b/script/c9633505.lua deleted file mode 100644 index 6378c7ce4f..0000000000 --- a/script/c9633505.lua +++ /dev/null @@ -1,40 +0,0 @@ ---ガーディアン・ケースト -function c9633505.initial_effect(c) - --sum limit - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_SUMMON) - e1:SetCondition(c9633505.sumlimit) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_CANNOT_FLIP_SUMMON) - c:RegisterEffect(e2) - local e3=e1:Clone() - e3:SetCode(EFFECT_SPSUMMON_CONDITION) - c:RegisterEffect(e3) - --immune spell - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetCode(EFFECT_IMMUNE_EFFECT) - e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e4:SetRange(LOCATION_MZONE) - e4:SetValue(c9633505.efilter) - c:RegisterEffect(e4) - --atk - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_SINGLE) - e5:SetCode(EFFECT_IGNORE_BATTLE_TARGET) - e5:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e5:SetRange(LOCATION_MZONE) - c:RegisterEffect(e5) -end -function c9633505.cfilter(c) - return c:IsFaceup() and c:IsCode(95515060) -end -function c9633505.sumlimit(e) - return not Duel.IsExistingMatchingCard(c9633505.cfilter,e:GetHandlerPlayer(),LOCATION_ONFIELD,0,1,nil) -end -function c9633505.efilter(e,te) - return te:IsActiveType(TYPE_SPELL) -end diff --git a/script/c96345188.lua b/script/c96345188.lua deleted file mode 100644 index 47075949f7..0000000000 --- a/script/c96345188.lua +++ /dev/null @@ -1,80 +0,0 @@ ---RR-ミミクリー・レイニアス -function c96345188.initial_effect(c) - --level - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCondition(c96345188.lvcon) - e1:SetTarget(c96345188.lvtg) - e1:SetOperation(c96345188.lvop) - c:RegisterEffect(e1) - --search - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_GRAVE) - e2:SetCountLimit(1,96345188) - e2:SetCondition(c96345188.thcon) - e2:SetCost(c96345188.thcost) - e2:SetTarget(c96345188.thtg) - e2:SetOperation(c96345188.thop) - c:RegisterEffect(e2) - if not c96345188.global_check then - c96345188.global_check=true - local ge1=Effect.CreateEffect(c) - ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - ge1:SetCode(EVENT_SUMMON_SUCCESS) - ge1:SetOperation(aux.sumreg) - ge1:SetLabel(96345188) - Duel.RegisterEffect(ge1,0) - local ge2=ge1:Clone() - ge2:SetCode(EVENT_SPSUMMON_SUCCESS) - ge2:SetLabel(96345188) - Duel.RegisterEffect(ge2,0) - end -end -function c96345188.lvcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetFlagEffect(96345188)>0 -end -function c96345188.filter(c) - return c:IsFaceup() and c:GetLevel()>0 and c:IsSetCard(0xba) -end -function c96345188.lvtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c96345188.filter,tp,LOCATION_MZONE,0,1,nil) end -end -function c96345188.lvop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c96345188.filter,tp,LOCATION_MZONE,0,nil) - local tc=g:GetFirst() - while tc do - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_LEVEL) - e1:SetValue(1) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - tc=g:GetNext() - end -end -function c96345188.thcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetTurnID()==Duel.GetTurnCount() -end -function c96345188.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) -end -function c96345188.thfilter(c) - return c:IsSetCard(0xba) and not c:IsCode(96345188) and c:IsAbleToHand() -end -function c96345188.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c96345188.thfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c96345188.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c96345188.thfilter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c96355986.lua b/script/c96355986.lua deleted file mode 100644 index ea21149afe..0000000000 --- a/script/c96355986.lua +++ /dev/null @@ -1,32 +0,0 @@ ---ホーリージャベリン -function c96355986.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_RECOVER) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetCondition(c96355986.condition) - e1:SetTarget(c96355986.target) - e1:SetOperation(c96355986.activate) - c:RegisterEffect(e1) -end -function c96355986.condition(e,tp,eg,ep,ev,re,r,rp) - return tp~=Duel.GetTurnPlayer() -end -function c96355986.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local tg=Duel.GetAttacker() - if chkc then return chkc==tg end - if chk==0 then return tg:IsOnField() and tg:IsCanBeEffectTarget(e) end - Duel.SetTargetCard(tg) - local rec=tg:GetAttack() - Duel.SetTargetParam(rec) - Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,rec) -end -function c96355986.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - local rec=tc:GetAttack() - Duel.Recover(tp,rec,REASON_EFFECT) - end -end diff --git a/script/c96363153.lua b/script/c96363153.lua deleted file mode 100644 index c58d0d8d2c..0000000000 --- a/script/c96363153.lua +++ /dev/null @@ -1,30 +0,0 @@ ---調律 -function c96363153.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c96363153.target) - e1:SetOperation(c96363153.activate) - c:RegisterEffect(e1) -end -function c96363153.filter(c) - return c:IsSetCard(0x17) and c:IsType(TYPE_TUNER) and c:IsAbleToHand() -end -function c96363153.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,1) - and Duel.IsExistingMatchingCard(c96363153.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c96363153.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c96363153.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - Duel.ShuffleDeck(tp) - Duel.BreakEffect() - Duel.DiscardDeck(tp,1,REASON_EFFECT) - end -end diff --git a/script/c9637706.lua b/script/c9637706.lua deleted file mode 100644 index 71ec9f6336..0000000000 --- a/script/c9637706.lua +++ /dev/null @@ -1,18 +0,0 @@ ---デス・ウォンバット -function c9637706.initial_effect(c) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CHANGE_DAMAGE) - e1:SetRange(LOCATION_MZONE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetTargetRange(1,0) - e1:SetValue(c9637706.damval) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_NO_EFFECT_DAMAGE) - c:RegisterEffect(e2) -end -function c9637706.damval(e,re,val,r,rp,rc) - if bit.band(r,REASON_EFFECT)~=0 then return 0 - else return val end -end diff --git a/script/c96381979.lua b/script/c96381979.lua deleted file mode 100644 index ec6d2e08f9..0000000000 --- a/script/c96381979.lua +++ /dev/null @@ -1,137 +0,0 @@ ---魁炎星王-ソウコ -function c96381979.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsRace,RACE_BEASTWARRIOR),4,2) - c:EnableReviveLimit() - --set - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(96381979,0)) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(c96381979.setcon) - e1:SetTarget(c96381979.settg) - e1:SetOperation(c96381979.setop) - c:RegisterEffect(e1) - --negate - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(96381979,1)) - e2:SetCategory(CATEGORY_DISABLE) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCost(c96381979.discost) - e2:SetTarget(c96381979.distg) - e2:SetOperation(c96381979.disop) - c:RegisterEffect(e2) - --spsummon - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(96381979,2)) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_CVAL_CHECK) - e3:SetCode(EVENT_TO_GRAVE) - e3:SetCondition(c96381979.spcon) - e3:SetCost(c96381979.spcost) - e3:SetTarget(c96381979.sptg) - e3:SetOperation(c96381979.spop) - e3:SetValue(c96381979.valcheck) - c:RegisterEffect(e3) -end -function c96381979.setcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_XYZ -end -function c96381979.filter(c) - return c:IsSetCard(0x7c) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSSetable() -end -function c96381979.settg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingMatchingCard(c96381979.filter,tp,LOCATION_DECK,0,1,nil) end -end -function c96381979.setop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) - local g=Duel.SelectMatchingCard(tp,c96381979.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SSet(tp,g:GetFirst()) - Duel.ConfirmCards(1-tp,g) - end -end -function c96381979.discost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c96381979.dfilter(c) - return c:IsFaceup() and c:IsType(TYPE_EFFECT) and not c:IsRace(RACE_BEASTWARRIOR) -end -function c96381979.distg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c96381979.dfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end -end -function c96381979.disop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c96381979.dfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - local tc=g:GetFirst() - local c=e:GetHandler() - while tc do - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,2) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,2) - tc:RegisterEffect(e2) - tc=g:GetNext() - end -end -function c96381979.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) -end -function c96381979.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x7c) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToGraveAsCost() -end -function c96381979.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - if Duel.GetFlagEffect(tp,96381979)==0 then - Duel.RegisterFlagEffect(tp,96381979,RESET_CHAIN,0,1) - c96381979[0]=Duel.GetMatchingGroupCount(c96381979.cfilter,tp,LOCATION_ONFIELD,0,nil) - c96381979[1]=0 - end - return c96381979[0]-c96381979[1]>=3 - end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c96381979.cfilter,tp,LOCATION_ONFIELD,0,3,3,nil) - Duel.SendtoGrave(g,REASON_COST) -end -function c96381979.spfilter(c,e,tp) - return c:IsLevelBelow(4) and c:IsRace(RACE_BEASTWARRIOR) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c96381979.afilter1(c,g) - return g:IsExists(c96381979.afilter2,1,c,c:GetAttack()) -end -function c96381979.afilter2(c,atk) - return c:GetAttack()==atk -end -function c96381979.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local g=Duel.GetMatchingGroup(c96381979.spfilter,tp,LOCATION_DECK,0,nil,e,tp) - return Duel.GetLocationCount(tp,LOCATION_MZONE)>1 and g:IsExists(c96381979.afilter1,1,nil,g) - end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_DECK) -end -function c96381979.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 then return end - local g=Duel.GetMatchingGroup(c96381979.spfilter,tp,LOCATION_DECK,0,nil,e,tp) - local dg=g:Filter(c96381979.afilter1,nil,g) - if dg:GetCount()>=1 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local tc1=dg:Select(tp,1,1,nil):GetFirst() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local tc2=dg:FilterSelect(tp,c96381979.afilter2,1,1,tc1,tc1:GetAttack()):GetFirst() - Duel.SpecialSummonStep(tc1,0,tp,tp,false,false,POS_FACEUP_DEFENCE) - Duel.SpecialSummonStep(tc2,0,tp,tp,false,false,POS_FACEUP_DEFENCE) - Duel.SpecialSummonComplete() - end -end -function c96381979.valcheck(e) - c96381979[1]=c96381979[1]+3 -end diff --git a/script/c96383838.lua b/script/c96383838.lua deleted file mode 100644 index 394efc0ed5..0000000000 --- a/script/c96383838.lua +++ /dev/null @@ -1,36 +0,0 @@ ---トライワイトゾーン -function c96383838.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c96383838.target) - e1:SetOperation(c96383838.activate) - c:RegisterEffect(e1) -end -function c96383838.filter(c,e,tp) - return c:IsType(TYPE_NORMAL) and c:IsLevelBelow(2) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c96383838.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c96383838.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>2 - and Duel.IsExistingTarget(c96383838.filter,tp,LOCATION_GRAVE,0,3,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c96383838.filter,tp,LOCATION_GRAVE,0,3,3,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,3,0,0) -end -function c96383838.rfilter(c,e,tp) - return c:IsRelateToEffect(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c96383838.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ft<=0 then return end - local sg=g:Filter(c96383838.rfilter,nil,e,tp) - if sg:GetCount()==0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - if sg:GetCount()>ft then sg=sg:Select(tp,ft,ft,nil) end - Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) -end diff --git a/script/c96384007.lua b/script/c96384007.lua deleted file mode 100644 index b40eb6265c..0000000000 --- a/script/c96384007.lua +++ /dev/null @@ -1,26 +0,0 @@ ---マシンナーズ・ディフェンダー -function c96384007.initial_effect(c) - --flip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(96384007,0)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP) - e1:SetTarget(c96384007.target) - e1:SetOperation(c96384007.operation) - c:RegisterEffect(e1) -end -function c96384007.filter(c) - return c:IsCode(22666164) and c:IsAbleToHand() -end -function c96384007.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c96384007.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local tc=Duel.GetFirstMatchingCard(c96384007.filter,tp,LOCATION_DECK,0,nil) - if tc then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end diff --git a/script/c96385345.lua b/script/c96385345.lua deleted file mode 100644 index acf2736695..0000000000 --- a/script/c96385345.lua +++ /dev/null @@ -1,67 +0,0 @@ ---薔薇の聖騎士 -function c96385345.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_BATTLE_DESTROYING) - e1:SetCondition(c96385345.spcon) - e1:SetCost(c96385345.spcost) - e1:SetTarget(c96385345.sptg) - e1:SetOperation(c96385345.spop) - c:RegisterEffect(e1) - --search - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_HAND) - e2:SetCountLimit(1,96385345) - e2:SetCost(c96385345.thcost) - e2:SetTarget(c96385345.thtg) - e2:SetOperation(c96385345.thop) - c:RegisterEffect(e2) -end -function c96385345.spcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local bc=c:GetBattleTarget() - return c:IsRelateToBattle() and bc:IsType(TYPE_MONSTER) and bc:IsLocation(LOCATION_GRAVE) -end -function c96385345.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end -function c96385345.spfilter(c,e,tp) - return c:IsRace(RACE_PLANT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c96385345.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsExistingMatchingCard(c96385345.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) -end -function c96385345.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c96385345.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENCE) - end -end -function c96385345.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end -function c96385345.thfilter(c) - return c:IsLevelAbove(7) and c:IsRace(RACE_PLANT) and c:IsAbleToHand() -end -function c96385345.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c96385345.thfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c96385345.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c96385345.thfilter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c96420087.lua b/script/c96420087.lua deleted file mode 100644 index c23d3dc688..0000000000 --- a/script/c96420087.lua +++ /dev/null @@ -1,4 +0,0 @@ ---闇の支配者との契約 -function c96420087.initial_effect(c) - aux.AddRitualProcGreater(c,aux.FilterBoolFunction(Card.IsCode,97642679)) -end diff --git a/script/c96427353.lua b/script/c96427353.lua deleted file mode 100644 index 219ba4fd6d..0000000000 --- a/script/c96427353.lua +++ /dev/null @@ -1,35 +0,0 @@ ---機甲忍者アクア -function c96427353.initial_effect(c) - --disable attack - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(96427353,0)) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetRange(LOCATION_GRAVE) - e1:SetCondition(c96427353.condition) - e1:SetCost(c96427353.cost) - e1:SetTarget(c96427353.target) - e1:SetOperation(c96427353.operation) - c:RegisterEffect(e1) -end -function c96427353.cfilter(c) - return c:IsSetCard(0x2b) and c:IsType(TYPE_MONSTER) -end -function c96427353.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp and Duel.GetAttackTarget()==nil - and Duel.IsExistingMatchingCard(c96427353.cfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler()) -end -function c96427353.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) -end -function c96427353.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local tg=Duel.GetAttacker() - if chkc then return chkc==tg end - if chk==0 then return tg:IsOnField() and tg:IsCanBeEffectTarget(e) end - Duel.SetTargetCard(tg) -end -function c96427353.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateAttack() -end diff --git a/script/c96428622.lua b/script/c96428622.lua deleted file mode 100644 index 6911d7c19f..0000000000 --- a/script/c96428622.lua +++ /dev/null @@ -1,15 +0,0 @@ ---サイバネティック・サイクロプス -function c96428622.initial_effect(c) - --atk - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(1000) - e1:SetCondition(c96428622.atkcon) - c:RegisterEffect(e1) -end -function c96428622.atkcon(e) - return Duel.GetFieldGroupCount(e:GetHandlerPlayer(),LOCATION_HAND,0)==0 -end diff --git a/script/c96457619.lua b/script/c96457619.lua deleted file mode 100644 index 1f692a4081..0000000000 --- a/script/c96457619.lua +++ /dev/null @@ -1,20 +0,0 @@ ---エクシーズ・ヴェール -function c96457619.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --untargetable - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e2:SetTarget(c96457619.etarget) - e2:SetValue(aux.tgval) - c:RegisterEffect(e2) -end -function c96457619.etarget(e,c) - return c:GetOverlayCount()~=0 -end diff --git a/script/c96458440.lua b/script/c96458440.lua deleted file mode 100644 index 2e3f09e09e..0000000000 --- a/script/c96458440.lua +++ /dev/null @@ -1,71 +0,0 @@ ---伝説の黒帯 -function c96458440.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c96458440.target) - e1:SetOperation(c96458440.operation) - c:RegisterEffect(e1) - --Equip limit - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_EQUIP_LIMIT) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e3:SetValue(c96458440.eqlimit) - c:RegisterEffect(e3) - --damage - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(96458440,0)) - e4:SetCategory(CATEGORY_DAMAGE) - e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e4:SetCode(EVENT_BATTLE_DESTROYING) - e4:SetRange(LOCATION_SZONE) - e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e4:SetCondition(c96458440.damcon) - e4:SetTarget(c96458440.damtg) - e4:SetOperation(c96458440.damop) - c:RegisterEffect(e4) -end -function c96458440.eqlimit(e,c) - local code=c:GetCode() - return code==8508055 or code==3810071 or code==49814180 -end -function c96458440.filter(c) - local code=c:GetCode() - return c:IsFaceup() and (code==8508055 or code==3810071 or code==49814180) -end -function c96458440.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c96458440.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c96458440.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c96458440.filter,tp,LOCATION_MZONE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c96458440.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,e:GetHandler(),tc) - end -end -function c96458440.damcon(e,tp,eg,ep,ev,re,r,rp) - local ec=eg:GetFirst() - local bc=ec:GetBattleTarget() - return ec==e:GetHandler():GetEquipTarget() and bc:IsLocation(LOCATION_GRAVE) and bc:IsReason(REASON_BATTLE) -end -function c96458440.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local ec=eg:GetFirst() - local bc=ec:GetBattleTarget() - local dam=bc:GetDefence() - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(dam) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,dam) -end -function c96458440.damop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c96470883.lua b/script/c96470883.lua deleted file mode 100644 index 555632f6a2..0000000000 --- a/script/c96470883.lua +++ /dev/null @@ -1,66 +0,0 @@ ---凛天使クイーン・オブ・ローズ -function c96470883.initial_effect(c) - --summon with 1 tribute - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(96470883,0)) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SUMMON_PROC) - e1:SetCondition(c96470883.otcon) - e1:SetOperation(c96470883.otop) - e1:SetValue(SUMMON_TYPE_ADVANCE) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(96470883,1)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCondition(c96470883.descon) - e2:SetTarget(c96470883.destg) - e2:SetOperation(c96470883.desop) - c:RegisterEffect(e2) -end -function c96470883.otfilter(c,tp) - return c:IsRace(RACE_PLANT) and (c:IsControler(tp) or c:IsFaceup()) -end -function c96470883.otcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - local mg=Duel.GetMatchingGroup(c96470883.otfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp) - return c:GetLevel()>6 and Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.GetTributeCount(c,mg)>0 -end -function c96470883.otop(e,tp,eg,ep,ev,re,r,rp,c) - local mg=Duel.GetMatchingGroup(c96470883.otfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp) - local sg=Duel.SelectTribute(tp,c,1,1,mg) - c:SetMaterial(sg) - Duel.Release(sg,REASON_SUMMON+REASON_MATERIAL) -end -function c96470883.filter(c) - return c:IsFaceup() and c:IsDestructable() -end -function c96470883.descon(e,tp,eg,ep,ev,re,r,rp) - return tp==Duel.GetTurnPlayer() -end -function c96470883.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local g=Duel.GetMatchingGroup(c96470883.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - if g:GetCount()>0 then - local tg=g:GetMinGroup(Card.GetAttack) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,tg,1,0,0) - end -end -function c96470883.desop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c96470883.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - if g:GetCount()>0 then - local tg=g:GetMinGroup(Card.GetAttack) - if tg:GetCount()>1 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local sg=tg:Select(tp,1,1,nil) - Duel.Destroy(sg,REASON_EFFECT) - else Duel.Destroy(tg,REASON_EFFECT) end - end -end diff --git a/script/c96471335.lua b/script/c96471335.lua deleted file mode 100644 index b4f298a8b7..0000000000 --- a/script/c96471335.lua +++ /dev/null @@ -1,70 +0,0 @@ ---幻想の黒魔導師 -function c96471335.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,7,2,c96471335.ovfilter,aux.Stringid(96471335,0)) - c:EnableReviveLimit() - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(96471335,1)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCost(c96471335.cost) - e1:SetTarget(c96471335.target) - e1:SetOperation(c96471335.operation) - c:RegisterEffect(e1) - --remove - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(96471335,2)) - e2:SetCategory(CATEGORY_REMOVE) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_ATTACK_ANNOUNCE) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,96471335) - e2:SetCondition(c96471335.rmcon) - e2:SetTarget(c96471335.rmtg) - e2:SetOperation(c96471335.rmop) - c:RegisterEffect(e2) -end -function c96471335.ovfilter(c) - return c:IsFaceup() and c:GetRank()==6 and c:IsRace(RACE_SPELLCASTER) -end -function c96471335.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c96471335.filter(c,e,tp) - return c:IsType(TYPE_NORMAL) and c:IsRace(RACE_SPELLCASTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c96471335.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c96471335.filter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) -end -function c96471335.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c96471335.filter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end -function c96471335.rmcon(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetAttacker() - return tc:IsType(TYPE_NORMAL) and tc:IsRace(RACE_SPELLCASTER) -end -function c96471335.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and chkc:IsAbleToRemove() end - if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) -end -function c96471335.rmop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) - end -end diff --git a/script/c96474800.lua b/script/c96474800.lua deleted file mode 100644 index 184c9101c9..0000000000 --- a/script/c96474800.lua +++ /dev/null @@ -1,38 +0,0 @@ ---マジック・ディフレクター -function c96474800.initial_effect(c) - --activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetOperation(c96474800.activate) - c:RegisterEffect(e1) -end -function c96474800.activate(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - --disable - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_DISABLE) - e1:SetTargetRange(LOCATION_SZONE,LOCATION_SZONE) - e1:SetTarget(c96474800.distg) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) - --disable effect - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_CHAIN_SOLVING) - e2:SetOperation(c96474800.disop) - e2:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e2,tp) -end -function c96474800.distg(e,c) - local tpe=c:GetType() - return bit.band(tpe,TYPE_SPELL)~=0 and bit.band(tpe,TYPE_EQUIP+TYPE_FIELD+TYPE_CONTINUOUS+TYPE_QUICKPLAY)~=0 -end -function c96474800.disop(e,tp,eg,ep,ev,re,r,rp) - local tl=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION) - local tpe=re:GetActiveType() - if tl==LOCATION_SZONE and bit.band(tpe,TYPE_SPELL)~=0 and bit.band(tpe,TYPE_EQUIP+TYPE_FIELD+TYPE_CONTINUOUS+TYPE_QUICKPLAY)~=0 then - Duel.NegateEffect(ev) - end -end diff --git a/script/c96501677.lua b/script/c96501677.lua deleted file mode 100644 index 19851415c5..0000000000 --- a/script/c96501677.lua +++ /dev/null @@ -1,46 +0,0 @@ ---またたびキャット -function c96501677.initial_effect(c) - --cannot be battle target - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_CANNOT_BE_BATTLE_TARGET) - e1:SetCondition(c96501677.ccon) - e1:SetValue(aux.imval1) - c:RegisterEffect(e1) - --defdown - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(96501677,0)) - e2:SetCategory(CATEGORY_DEFCHANGE) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetTarget(c96501677.deftg) - e2:SetOperation(c96501677.defop) - c:RegisterEffect(e2) -end -function c96501677.cfilter(c) - return c:IsFaceup() and c:IsRace(RACE_BEAST) -end -function c96501677.ccon(e) - return Duel.IsExistingMatchingCard(c96501677.cfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,e:GetHandler()) -end -function c96501677.deftg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsFaceup() and chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) end - if chk==0 then return Duel.IsExistingTarget(aux.nzdef,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,aux.nzdef,tp,0,LOCATION_MZONE,1,1,nil) -end -function c96501677.defop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_DEFENCE_FINAL) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e1:SetValue(0) - tc:RegisterEffect(e1) - end -end diff --git a/script/c9653271.lua b/script/c9653271.lua deleted file mode 100644 index 922ba5f3d4..0000000000 --- a/script/c9653271.lua +++ /dev/null @@ -1,6 +0,0 @@ ---雷神の怒り -function c9653271.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcCode2(c,86088138,21817254,true,true) -end diff --git a/script/c96553688.lua b/script/c96553688.lua deleted file mode 100644 index 412f567e0d..0000000000 --- a/script/c96553688.lua +++ /dev/null @@ -1,33 +0,0 @@ ---フェニキシアン・シード -function c96553688.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(96553688,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c96553688.cost) - e1:SetTarget(c96553688.target) - e1:SetOperation(c96553688.operation) - c:RegisterEffect(e1) -end -function c96553688.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end -function c96553688.filter(c,e,tp) - return c:IsCode(23558733) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) -end -function c96553688.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsExistingMatchingCard(c96553688.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c96553688.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c96553688.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP) - end -end diff --git a/script/c96561011.lua b/script/c96561011.lua deleted file mode 100644 index 7e5d2d092d..0000000000 --- a/script/c96561011.lua +++ /dev/null @@ -1,42 +0,0 @@ ---真紅眼の闇竜 -function c96561011.initial_effect(c) - c:EnableReviveLimit() - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_SPSUMMON_PROC) - e2:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e2:SetRange(LOCATION_HAND) - e2:SetCondition(c96561011.spcon) - e2:SetOperation(c96561011.spop) - c:RegisterEffect(e2) - --atkup - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e3:SetCode(EFFECT_UPDATE_ATTACK) - e3:SetRange(LOCATION_MZONE) - e3:SetValue(c96561011.val) - c:RegisterEffect(e3) -end -function c96561011.val(e,c) - return Duel.GetMatchingGroupCount(Card.IsRace,c:GetControler(),LOCATION_GRAVE,0,nil,RACE_DRAGON)*300 -end -function c96561011.rfilter(c) - return c:IsCode(74677422) -end -function c96561011.spcon(e,c) - if c==nil then return true end - return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-1 - and Duel.CheckReleaseGroup(c:GetControler(),c96561011.rfilter,1,nil) -end -function c96561011.spop(e,tp,eg,ep,ev,re,r,rp,c) - local g=Duel.SelectReleaseGroup(c:GetControler(),c96561011.rfilter,1,1,nil) - Duel.Release(g,REASON_COST) -end \ No newline at end of file diff --git a/script/c96565487.lua b/script/c96565487.lua deleted file mode 100644 index 3521f5dfc4..0000000000 --- a/script/c96565487.lua +++ /dev/null @@ -1,24 +0,0 @@ ---ブリザード・ウォリアー -function c96565487.initial_effect(c) - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(96565487,0)) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_BATTLE_DESTROYING) - e1:SetCondition(c96565487.condition) - e1:SetOperation(c96565487.operation) - c:RegisterEffect(e1) -end -function c96565487.condition(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsRelateToBattle() and c:GetBattleTarget():IsType(TYPE_MONSTER) -end -function c96565487.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetDecktopGroup(1-tp,1) - if g:GetCount()==0 then return end - Duel.ConfirmCards(tp,g) - local tc=g:GetFirst() - local opt=Duel.SelectOption(tp,aux.Stringid(96565487,1),aux.Stringid(96565487,2)) - if opt==1 then - Duel.MoveSequence(tc,opt) - end -end diff --git a/script/c96570609.lua b/script/c96570609.lua deleted file mode 100644 index 4c5a35f794..0000000000 --- a/script/c96570609.lua +++ /dev/null @@ -1,125 +0,0 @@ ---天帝アイテール -function c96570609.initial_effect(c) - --summon with 1 tribute - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(96570609,0)) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SUMMON_PROC) - e1:SetCondition(c96570609.otcon) - e1:SetOperation(c96570609.otop) - e1:SetValue(SUMMON_TYPE_ADVANCE) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_SET_PROC) - c:RegisterEffect(e2) - --spsummon - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(96570609,1)) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOGRAVE) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_SUMMON_SUCCESS) - e3:SetProperty(EFFECT_FLAG_DELAY) - e3:SetCondition(c96570609.spcon) - e3:SetTarget(c96570609.sptg) - e3:SetOperation(c96570609.spop) - c:RegisterEffect(e3) - --summon - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(96570609,2)) - e4:SetCategory(CATEGORY_SUMMON) - e4:SetType(EFFECT_TYPE_QUICK_O) - e4:SetRange(LOCATION_HAND) - e4:SetCode(EVENT_FREE_CHAIN) - e4:SetCountLimit(1) - e4:SetCondition(c96570609.sumcon) - e4:SetCost(c96570609.sumcost) - e4:SetTarget(c96570609.sumtg) - e4:SetOperation(c96570609.sumop) - c:RegisterEffect(e4) -end -function c96570609.otfilter(c) - return bit.band(c:GetSummonType(),SUMMON_TYPE_ADVANCE)==SUMMON_TYPE_ADVANCE -end -function c96570609.otcon(e,c) - if c==nil then return true end - local mg=Duel.GetMatchingGroup(c96570609.otfilter,0,LOCATION_MZONE,LOCATION_MZONE,nil) - return c:GetLevel()>6 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-1 - and Duel.GetTributeCount(c,mg)>0 -end -function c96570609.otop(e,tp,eg,ep,ev,re,r,rp,c) - local mg=Duel.GetMatchingGroup(c96570609.otfilter,0,LOCATION_MZONE,LOCATION_MZONE,nil) - local sg=Duel.SelectTribute(tp,c,1,1,mg) - c:SetMaterial(sg) - Duel.Release(sg,REASON_SUMMON+REASON_MATERIAL) -end -function c96570609.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_ADVANCE -end -function c96570609.tgfilter(c) - return c:IsSetCard(0xbe) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToGrave() -end -function c96570609.spfilter(c,e,tp) - return c:IsAttackAbove(2400) and c:GetDefence()==1000 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c96570609.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local g=Duel.GetMatchingGroup(c96570609.tgfilter,tp,LOCATION_HAND+LOCATION_DECK,0,nil) - return g:GetClassCount(Card.GetCode)>1 - and Duel.IsExistingMatchingCard(c96570609.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) - end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,2,tp,LOCATION_DECK) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c96570609.spop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c96570609.tgfilter,tp,LOCATION_HAND+LOCATION_DECK,0,nil) - if g:GetClassCount(Card.GetCode)<2 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local tg1=g:Select(tp,1,1,nil) - g:Remove(Card.IsCode,nil,tg1:GetFirst():GetCode()) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local tg2=g:Select(tp,1,1,nil) - tg1:Merge(tg2) - if Duel.SendtoGrave(tg1,REASON_EFFECT)~=0 and tg1:IsExists(Card.IsLocation,2,nil,LOCATION_GRAVE) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c96570609.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - local tc=g:GetFirst() - if tc then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetCountLimit(1) - e1:SetOperation(c96570609.thop) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1,true) - end - end -end -function c96570609.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT) -end -function c96570609.sumcon(e,tp,eg,ep,ev,re,r,rp) - local ph=Duel.GetCurrentPhase() - return Duel.GetTurnPlayer()~=tp and (ph==PHASE_MAIN1 or ph==PHASE_MAIN2) -end -function c96570609.cfilter(c) - return c:IsSetCard(0xbe) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToRemoveAsCost() -end -function c96570609.sumcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c96570609.cfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c96570609.cfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c96570609.sumtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsSummonable(true,nil,1) end - Duel.SetOperationInfo(0,CATEGORY_SUMMON,e:GetHandler(),1,0,0) -end -function c96570609.sumop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsSummonable(true,nil,1) then - Duel.Summon(tp,c,true,nil,1) - end -end diff --git a/script/c96594609.lua b/script/c96594609.lua deleted file mode 100644 index ac563ea260..0000000000 --- a/script/c96594609.lua +++ /dev/null @@ -1,62 +0,0 @@ ---炎王獣 キリン -function c96594609.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(96594609,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DELAY) - e1:SetRange(LOCATION_HAND) - e1:SetCode(EVENT_DESTROYED) - e1:SetCondition(c96594609.spcon) - e1:SetTarget(c96594609.sptg) - e1:SetOperation(c96594609.spop) - c:RegisterEffect(e1) - -- - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(96594609,1)) - e2:SetCategory(CATEGORY_TOGRAVE) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetCondition(c96594609.tgcon) - e2:SetTarget(c96594609.tgtg) - e2:SetOperation(c96594609.tgop) - c:RegisterEffect(e2) -end -function c96594609.cfilter(c,tp) - return c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP) and c:GetPreviousControler()==tp - and c:IsReason(REASON_EFFECT) and c:IsSetCard(0x81) -end -function c96594609.spcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c96594609.cfilter,1,nil,tp) -end -function c96594609.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsRelateToEffect(e) - and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c96594609.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) - end -end -function c96594609.tgcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsReason(REASON_DESTROY) -end -function c96594609.tgfilter(c) - return c:IsAttribute(ATTRIBUTE_FIRE) and c:IsAbleToGrave() -end -function c96594609.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c96594609.tgfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) -end -function c96594609.tgop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c96594609.tgfilter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoGrave(g,REASON_EFFECT) - end -end diff --git a/script/c96598015.lua b/script/c96598015.lua deleted file mode 100644 index 15f367c52f..0000000000 --- a/script/c96598015.lua +++ /dev/null @@ -1,53 +0,0 @@ ---金満な壺 -function c96598015.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,96598015+EFFECT_COUNT_CODE_OATH) - e1:SetCost(c96598015.cost) - e1:SetTarget(c96598015.target) - e1:SetOperation(c96598015.activate) - c:RegisterEffect(e1) - Duel.AddCustomActivityCounter(96598015,ACTIVITY_SPSUMMON,c96598015.counterfilter) -end -function c96598015.counterfilter(c) - return bit.band(c:GetSummonType(),SUMMON_TYPE_PENDULUM)==SUMMON_TYPE_PENDULUM -end -function c96598015.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetCustomActivityCount(96598015,tp,ACTIVITY_SPSUMMON)==0 end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) - e1:SetTargetRange(1,0) - e1:SetTarget(c96598015.splimit) - Duel.RegisterEffect(e1,tp) -end -function c96598015.splimit(e,c,sump,sumtype,sumpos,targetp,se) - return bit.band(sumtype,SUMMON_TYPE_PENDULUM)~=SUMMON_TYPE_PENDULUM -end -function c96598015.filter(c) - return c:IsType(TYPE_PENDULUM) and (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup()) and c:IsAbleToDeck() - and not c:IsHasEffect(EFFECT_NECRO_VALLEY) -end -function c96598015.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp,2) - and Duel.IsExistingMatchingCard(c96598015.filter,tp,LOCATION_EXTRA+LOCATION_GRAVE,0,3,nil) end - Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,3,0,0) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2) -end -function c96598015.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c96598015.filter,tp,LOCATION_EXTRA+LOCATION_GRAVE,0,nil) - if g:GetCount()<3 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local sg=g:Select(tp,3,3,nil) - Duel.SendtoDeck(sg,nil,0,REASON_EFFECT) - Duel.ShuffleDeck(tp) - if sg:IsExists(Card.IsLocation,3,nil,LOCATION_DECK+LOCATION_EXTRA) then - Duel.BreakEffect() - Duel.Draw(tp,2,REASON_EFFECT) - end -end diff --git a/script/c96606246.lua b/script/c96606246.lua deleted file mode 100644 index 2642f6fb71..0000000000 --- a/script/c96606246.lua +++ /dev/null @@ -1,29 +0,0 @@ ---EMフレンドンキー -function c96606246.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(96606246,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c96606246.sptg) - e1:SetOperation(c96606246.spop) - c:RegisterEffect(e1) -end -function c96606246.filter(c,e,tp) - return c:IsSetCard(0x9f) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) - and not c:IsHasEffect(EFFECT_NECRO_VALLEY) -end -function c96606246.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c96606246.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE) -end -function c96606246.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c96606246.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c96631852.lua b/script/c96631852.lua deleted file mode 100644 index 17258bc642..0000000000 --- a/script/c96631852.lua +++ /dev/null @@ -1,53 +0,0 @@ ---鉄壁の布陣 -function c96631852.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c96631852.target) - e1:SetOperation(c96631852.operation) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e2:SetRange(LOCATION_SZONE) - e2:SetCode(EVENT_LEAVE_FIELD) - e2:SetCondition(c96631852.descon) - e2:SetOperation(c96631852.desop) - c:RegisterEffect(e2) -end -function c96631852.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,nil) -end -function c96631852.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsRelateToEffect(e) then - c:SetCardTarget(tc) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_OWNER_RELATE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_UPDATE_DEFENCE) - e1:SetCondition(c96631852.rcon) - e1:SetValue(700) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1,true) - end -end -function c96631852.rcon(e) - local tp=e:GetHandlerPlayer() - return e:GetOwner():IsHasCardTarget(e:GetHandler()) and Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)>=2 - and not Duel.IsExistingMatchingCard(Card.IsAttackPos,tp,LOCATION_MZONE,0,1,nil) -end -function c96631852.descon(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetHandler():GetFirstCardTarget() - return tc and eg:IsContains(tc) -end -function c96631852.desop(e,tp,eg,ep,ev,re,r,rp) - Duel.Destroy(e:GetHandler(), REASON_EFFECT) -end diff --git a/script/c96653775.lua b/script/c96653775.lua deleted file mode 100644 index 8ad60f077c..0000000000 --- a/script/c96653775.lua +++ /dev/null @@ -1,32 +0,0 @@ ---ナチュル・パンプキン -function c96653775.initial_effect(c) - --summon success - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(96653775,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetCondition(c96653775.spcon) - e1:SetTarget(c96653775.sptg) - e1:SetOperation(c96653775.spop) - c:RegisterEffect(e1) -end -function c96653775.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)~=0 -end -function c96653775.filter(c,e,tp) - return c:IsSetCard(0x2a) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c96653775.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c96653775.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c96653775.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c96653775.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c9666558.lua b/script/c9666558.lua deleted file mode 100644 index 218f9c8f68..0000000000 --- a/script/c9666558.lua +++ /dev/null @@ -1,14 +0,0 @@ ---ゴーレム・ドラゴン -function c9666558.initial_effect(c) - --cannot be battle target - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(0,LOCATION_MZONE) - e1:SetValue(c9666558.tg) - c:RegisterEffect(e1) -end -function c9666558.tg(e,c) - return c~=e:GetHandler() and c:IsFaceup() and c:IsRace(RACE_DRAGON) -end diff --git a/script/c96677818.lua b/script/c96677818.lua deleted file mode 100644 index 6952c7a494..0000000000 --- a/script/c96677818.lua +++ /dev/null @@ -1,16 +0,0 @@ ---魔導書整理 -function c96677818.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c96677818.target) - e1:SetOperation(c96677818.activate) - c:RegisterEffect(e1) -end -function c96677818.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>2 end -end -function c96677818.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.SortDecktop(tp,tp,3) -end diff --git a/script/c96682430.lua b/script/c96682430.lua deleted file mode 100644 index b617e6f4dd..0000000000 --- a/script/c96682430.lua +++ /dev/null @@ -1,30 +0,0 @@ ---水精鱗-アビスヒルデ -function c96682430.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(96682430,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DELAY) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCountLimit(1,96682430) - e1:SetTarget(c96682430.target) - e1:SetOperation(c96682430.operation) - c:RegisterEffect(e1) -end -function c96682430.filter(c,e,tp) - return c:IsSetCard(0x74) and c:GetCode()~=96682430 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c96682430.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c96682430.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c96682430.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c96682430.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c96700602.lua b/script/c96700602.lua deleted file mode 100644 index be9c351b2f..0000000000 --- a/script/c96700602.lua +++ /dev/null @@ -1,37 +0,0 @@ ---波動障壁 -function c96700602.initial_effect(c) - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_POSITION+CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetCondition(c96700602.condition) - e1:SetCost(c96700602.cost) - e1:SetTarget(c96700602.target) - e1:SetOperation(c96700602.operation) - c:RegisterEffect(e1) -end -function c96700602.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp -end -function c96700602.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsType,1,nil,TYPE_SYNCHRO) end - local g=Duel.SelectReleaseGroup(tp,Card.IsType,1,1,nil,TYPE_SYNCHRO) - Duel.Release(g,REASON_COST) -end -function c96700602.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAttackPos,tp,0,LOCATION_MZONE,1,nil) end - local tc=eg:GetFirst() - if tc:IsLocation(LOCATION_MZONE) then - Duel.SetTargetCard(tc) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,tc:GetDefence()) - end -end -function c96700602.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - local g=Duel.GetMatchingGroup(Card.IsAttackPos,tp,0,LOCATION_MZONE,nil) - if Duel.ChangePosition(g,POS_FACEUP_DEFENCE,POS_FACEDOWN_DEFENCE,0,0)~=0 then - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Damage(1-tp,tc:GetDefence(),REASON_EFFECT) - end - end -end diff --git a/script/c96704018.lua b/script/c96704018.lua deleted file mode 100644 index 8d83c590e9..0000000000 --- a/script/c96704018.lua +++ /dev/null @@ -1,38 +0,0 @@ ---紋章獣ベルナーズ・ファルコン -function c96704018.initial_effect(c) - --lv change - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(96704018,0)) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c96704018.target) - e1:SetOperation(c96704018.operation) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - c:RegisterEffect(e2) - local e3=e1:Clone() - e3:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - c:RegisterEffect(e3) -end -function c96704018.filter(c) - return c:IsFaceup() and c:IsLevelAbove(5) -end -function c96704018.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c96704018.filter,tp,LOCATION_MZONE,0,1,nil) end -end -function c96704018.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c96704018.filter,tp,LOCATION_MZONE,0,nil) - local tc=g:GetFirst() - while tc do - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CHANGE_LEVEL) - e1:SetValue(4) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - tc=g:GetNext() - end -end diff --git a/script/c96729612.lua b/script/c96729612.lua deleted file mode 100644 index 2bc4ba5a0b..0000000000 --- a/script/c96729612.lua +++ /dev/null @@ -1,37 +0,0 @@ ---儀式の準備 -function c96729612.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c96729612.target) - e1:SetOperation(c96729612.activate) - c:RegisterEffect(e1) -end -function c96729612.filter(c) - return bit.band(c:GetType(),0x81)==0x81 and c:GetLevel()<=7 and c:IsAbleToHand() -end -function c96729612.filter2(c) - return bit.band(c:GetType(),0x82)==0x82 and c:IsAbleToHand() and not c:IsHasEffect(EFFECT_NECRO_VALLEY) -end -function c96729612.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c96729612.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c96729612.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c96729612.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - local mg=Duel.GetMatchingGroup(c96729612.filter2,tp,LOCATION_GRAVE,0,nil) - if mg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(96729612,0)) then - Duel.BreakEffect() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local sg=mg:Select(tp,1,1,nil) - Duel.SendtoHand(sg,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,sg) - end - end -end diff --git a/script/c96765646.lua b/script/c96765646.lua deleted file mode 100644 index d08c3764ab..0000000000 --- a/script/c96765646.lua +++ /dev/null @@ -1,41 +0,0 @@ ---思い出のブランコ -function c96765646.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c96765646.target) - e1:SetOperation(c96765646.activate) - c:RegisterEffect(e1) -end -function c96765646.filter(c,e,tp) - return c:IsType(TYPE_NORMAL) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c96765646.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c96765646.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c96765646.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c96765646.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c96765646.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)~=0 then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e1:SetOperation(c96765646.desop) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e1:SetCountLimit(1) - tc:RegisterEffect(e1,true) - end -end -function c96765646.desop(e,tp,eg,ep,ev,re,r,rp) - Duel.Destroy(e:GetHandler(),REASON_EFFECT) -end diff --git a/script/c96782886.lua b/script/c96782886.lua deleted file mode 100644 index 709de8d44e..0000000000 --- a/script/c96782886.lua +++ /dev/null @@ -1,36 +0,0 @@ ---メンタルマスター -function c96782886.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(96782886,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c96782886.cost) - e1:SetTarget(c96782886.target) - e1:SetOperation(c96782886.operation) - c:RegisterEffect(e1) -end -function c96782886.costfilter(c) - return c:IsRace(RACE_PSYCHO) and c:GetCode()~=96782886 -end -function c96782886.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,800) and Duel.CheckReleaseGroup(tp,c96782886.costfilter,1,nil) end - Duel.PayLPCost(tp,800) - local sg=Duel.SelectReleaseGroup(tp,c96782886.costfilter,1,1,nil) - Duel.Release(sg,REASON_COST) -end -function c96782886.filter(c,e,tp) - return c:IsRace(RACE_PSYCHO) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c96782886.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsExistingMatchingCard(c96782886.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c96782886.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c96782886.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end diff --git a/script/c96789758.lua b/script/c96789758.lua deleted file mode 100644 index 2add49f2e9..0000000000 --- a/script/c96789758.lua +++ /dev/null @@ -1,44 +0,0 @@ ---アロマージ-ジャスミン -function c96789758.initial_effect(c) - --extra summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_EXTRA_SUMMON_COUNT) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(LOCATION_HAND+LOCATION_MZONE,0) - e1:SetCondition(c96789758.excon) - e1:SetTarget(c96789758.extg) - c:RegisterEffect(e1) - --draw - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_DRAW) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_RECOVER) - e2:SetRange(LOCATION_MZONE) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetCountLimit(1) - e2:SetCondition(c96789758.drcon) - e2:SetTarget(c96789758.drtg) - e2:SetOperation(c96789758.drop) - c:RegisterEffect(e2) -end -function c96789758.excon(e) - local tp=e:GetHandlerPlayer() - return Duel.GetLP(tp)>Duel.GetLP(1-tp) -end -function c96789758.extg(e,c) - return c:IsRace(RACE_PLANT) and not c:IsCode(96789758) -end -function c96789758.drcon(e,tp,eg,ep,ev,re,r,rp) - return ep==tp -end -function c96789758.drtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return ep==tp and e:GetHandler():IsRelateToEffect(e) end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(1) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c96789758.drop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TRIGGERING_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end diff --git a/script/c967928.lua b/script/c967928.lua deleted file mode 100644 index e4ceb42f7d..0000000000 --- a/script/c967928.lua +++ /dev/null @@ -1,60 +0,0 @@ ---罰ゲーム! -function c967928.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetHintTiming(0,TIMING_TOHAND) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c967928.condition) - e1:SetTarget(c967928.target) - e1:SetOperation(c967928.activate) - c:RegisterEffect(e1) -end -function c967928.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)==4 -end -function c967928.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local op=Duel.SelectOption(tp,aux.Stringid(967928,0),aux.Stringid(967928,1)) - e:SetLabel(op) - Duel.SetTargetPlayer(1-tp) -end -function c967928.activate(e,tp,eg,ep,ev,re,r,rp) - local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) - if e:GetLabel()==0 then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetTargetRange(1,0) - e1:SetCode(EFFECT_CANNOT_DRAW) - if Duel.GetTurnPlayer()==p and Duel.GetCurrentPhase()==PHASE_DRAW then - e1:SetReset(RESET_PHASE+PHASE_DRAW+RESET_SELF_TURN,2) - e1:SetLabel(Duel.GetTurnCount()) - else - e1:SetReset(RESET_PHASE+PHASE_DRAW+RESET_SELF_TURN) - e1:SetLabel(0) - end - e1:SetCondition(c967928.skipcon) - Duel.RegisterEffect(e1,p) - local e2=e1:Clone() - e2:SetCode(EFFECT_DRAW_COUNT) - e2:SetValue(0) - Duel.RegisterEffect(e2,p) - else - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EFFECT_CANNOT_ACTIVATE) - e1:SetTargetRange(1,0) - e1:SetValue(c967928.aclimit) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,p) - end -end -function c967928.skipcon(e) - return Duel.GetTurnCount()~=e:GetLabel() and Duel.GetCurrentPhase()==PHASE_DRAW -end -function c967928.aclimit(e,re,tp) - return re:IsHasType(EFFECT_TYPE_ACTIVATE) -end diff --git a/script/c96802306.lua b/script/c96802306.lua deleted file mode 100644 index 77e6a3ca5a..0000000000 --- a/script/c96802306.lua +++ /dev/null @@ -1,50 +0,0 @@ ---イグナイト・キャリバー -function c96802306.initial_effect(c) - --pendulum summon - aux.AddPendulumProcedure(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --tohand - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_DESTROY+CATEGORY_TOHAND+CATEGORY_SEARCH) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_PZONE) - e2:SetCondition(c96802306.thcon) - e2:SetTarget(c96802306.thtg) - e2:SetOperation(c96802306.thop) - c:RegisterEffect(e2) -end -function c96802306.thcon(e,tp,eg,ep,ev,re,r,rp) - local seq=e:GetHandler():GetSequence() - local pc=Duel.GetFieldCard(tp,LOCATION_SZONE,13-seq) - return pc and pc:IsSetCard(0xc8) -end -function c96802306.filter(c) - return c:IsRace(RACE_WARRIOR) and c:IsAttribute(ATTRIBUTE_FIRE) and c:IsAbleToHand() -end -function c96802306.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - local pc=Duel.GetFieldCard(tp,LOCATION_SZONE,13-c:GetSequence()) - if chk==0 then return c:IsDestructable() and pc:IsDestructable() - and Duel.IsExistingMatchingCard(c96802306.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end - local g=Group.FromCards(c,pc) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,2,0,0) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE) -end -function c96802306.thop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) then return end - local pc=Duel.GetFieldCard(tp,LOCATION_SZONE,13-c:GetSequence()) - if not pc then return end - local dg=Group.FromCards(c,pc) - if Duel.Destroy(dg,REASON_EFFECT)~=2 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c96802306.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil) - if g:GetCount()>0 and not g:GetFirst():IsHasEffect(EFFECT_NECRO_VALLEY) then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c96864105.lua b/script/c96864105.lua deleted file mode 100644 index 5579db5f26..0000000000 --- a/script/c96864105.lua +++ /dev/null @@ -1,54 +0,0 @@ ---CNo.73 激瀧瀑神アビス・スープラ -function c96864105.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,6,3) - c:EnableReviveLimit() - --atk up - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(96864105,0)) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_PRE_DAMAGE_CALCULATE) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c96864105.atkcon) - e1:SetCost(c96864105.atkcost) - e1:SetOperation(c96864105.atkop) - c:RegisterEffect(e1) - --indes - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - e2:SetCondition(c96864105.indcon) - e2:SetValue(1) - c:RegisterEffect(e2) -end -c96864105.xyz_number=73 -function c96864105.atkcon(e,tp,eg,ep,ev,re,r,rp) - local a=Duel.GetAttacker() - local d=Duel.GetAttackTarget() - return d and a:GetControler()~=d:GetControler() -end -function c96864105.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:CheckRemoveOverlayCard(tp,1,REASON_COST) and c:GetFlagEffect(96864105)==0 end - c:RemoveOverlayCard(tp,1,1,REASON_COST) - c:RegisterFlagEffect(96864105,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_DAMAGE_CAL,0,1) -end -function c96864105.atkop(e,tp,eg,ep,ev,re,r,rp) - local a=Duel.GetAttacker() - local d=Duel.GetAttackTarget() - if not a:IsRelateToBattle() or a:IsFacedown() or not d:IsRelateToBattle() or d:IsFacedown() then return end - if a:IsControler(1-tp) then a,d=d,a end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetOwnerPlayer(tp) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_DAMAGE_CAL) - e1:SetValue(d:GetAttack()) - a:RegisterEffect(e1) -end -function c96864105.indcon(e) - return e:GetHandler():GetOverlayGroup():IsExists(Card.IsCode,1,nil,36076683) -end diff --git a/script/c96864811.lua b/script/c96864811.lua deleted file mode 100644 index 0b0172701a..0000000000 --- a/script/c96864811.lua +++ /dev/null @@ -1,47 +0,0 @@ ---禁じられた聖衣 -function c96864811.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c96864811.condition) - e1:SetTarget(c96864811.target) - e1:SetOperation(c96864811.activate) - c:RegisterEffect(e1) -end -function c96864811.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end -function c96864811.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) -end -function c96864811.activate(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e1:SetValue(-600) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) - e2:SetValue(aux.tgval) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - e3:SetValue(1) - e3:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e3) - end -end diff --git a/script/c96872283.lua b/script/c96872283.lua deleted file mode 100644 index 0ab3e8e5b9..0000000000 --- a/script/c96872283.lua +++ /dev/null @@ -1,38 +0,0 @@ ---エヴォルテクター シュバリエ -function c96872283.initial_effect(c) - aux.EnableDualAttribute(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(96872283,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(aux.IsDualState) - e1:SetCost(c96872283.cost) - e1:SetTarget(c96872283.target) - e1:SetOperation(c96872283.operation) - c:RegisterEffect(e1) -end -function c96872283.costfilter(c) - return c:IsFaceup() and c:IsType(TYPE_EQUIP) and c:IsAbleToGraveAsCost() -end -function c96872283.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c96872283.costfilter,tp,LOCATION_SZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c96872283.costfilter,tp,LOCATION_SZONE,0,1,1,nil) - Duel.SendtoGrave(g,REASON_COST) -end -function c96872283.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() and chkc:IsDestructable() end - if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,0,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,0,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c96872283.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/script/c96875080.lua b/script/c96875080.lua deleted file mode 100644 index dd6e7538a1..0000000000 --- a/script/c96875080.lua +++ /dev/null @@ -1,39 +0,0 @@ ---大気圏外射撃 -function c96875080.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_END_PHASE) - e1:SetCost(c96875080.cost) - e1:SetTarget(c96875080.target) - e1:SetOperation(c96875080.activate) - c:RegisterEffect(e1) -end -function c96875080.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0xc) and c:IsAbleToGraveAsCost() -end -function c96875080.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c96875080.cfilter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c96875080.cfilter,tp,LOCATION_MZONE,0,1,1,nil) - Duel.SendtoGrave(g,REASON_COST) -end -function c96875080.filter(c) - return c:IsDestructable() and c:IsType(TYPE_SPELL+TYPE_TRAP) -end -function c96875080.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and c96875080.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c96875080.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c96875080.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c96875080.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c96890582.lua b/script/c96890582.lua deleted file mode 100644 index 946b2d344c..0000000000 --- a/script/c96890582.lua +++ /dev/null @@ -1,18 +0,0 @@ ---秒殺の暗殺者 -function c96890582.initial_effect(c) - --atkdown - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetRange(LOCATION_MZONE) - e1:SetValue(c96890582.val) - c:RegisterEffect(e1) - --defdown - local e2=e1:Clone() - e2:SetCode(EFFECT_UPDATE_DEFENCE) - c:RegisterEffect(e2) -end -function c96890582.val(e,c) - return Duel.GetFieldGroupCount(c:GetControler(),LOCATION_HAND,0)*(-400) -end diff --git a/script/c96907086.lua b/script/c96907086.lua deleted file mode 100644 index d874785b45..0000000000 --- a/script/c96907086.lua +++ /dev/null @@ -1,30 +0,0 @@ ---地縛旋風 -function c96907086.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c96907086.condition) - e1:SetTarget(c96907086.target) - e1:SetOperation(c96907086.activate) - c:RegisterEffect(e1) -end -function c96907086.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x21) -end -function c96907086.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c96907086.cfilter,tp,LOCATION_MZONE,0,1,nil) -end -function c96907086.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable() -end -function c96907086.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c96907086.filter,tp,0,LOCATION_ONFIELD,1,nil) end - local g=Duel.GetMatchingGroup(c96907086.filter,tp,0,LOCATION_ONFIELD,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c96907086.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c96907086.filter,tp,0,LOCATION_ONFIELD,nil) - Duel.Destroy(g,REASON_EFFECT) -end diff --git a/script/c96914272.lua b/script/c96914272.lua deleted file mode 100644 index 55b44f4ca5..0000000000 --- a/script/c96914272.lua +++ /dev/null @@ -1,61 +0,0 @@ ---虚栄の大猿 -function c96914272.initial_effect(c) - c:EnableReviveLimit() - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c96914272.spcon) - e1:SetOperation(c96914272.spop) - e1:SetValue(1) - c:RegisterEffect(e1) - --lv change - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(96914272,0)) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetCondition(c96914272.lvcon) - e2:SetOperation(c96914272.lvop) - e2:SetLabelObject(e1) - c:RegisterEffect(e2) -end -function c96914272.spfilter(c) - return c:IsRace(RACE_BEAST) and c:IsAbleToGraveAsCost() -end -function c96914272.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c96914272.spfilter,tp,LOCATION_HAND,0,1,c) -end -function c96914272.spop(e,tp,eg,ep,ev,re,r,rp,c) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c96914272.spfilter,tp,LOCATION_HAND,0,1,1,c) - Duel.SendtoGrave(g,REASON_COST) - e:SetLabel(g:GetFirst():GetLevel()) -end -function c96914272.lvcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+1 -end -function c96914272.lvop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - local lv=e:GetLabelObject():GetLabel() - local clv=c:GetLevel() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_LEVEL) - if lv0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c96930127.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+0x47e0000) - e1:SetValue(LOCATION_REMOVED) - c:RegisterEffect(e1,true) - end -end -function c96930127.synlimit(e,c) - if not c then return false end - return not c:IsRace(RACE_BEAST) -end diff --git a/script/c96938777.lua b/script/c96938777.lua deleted file mode 100644 index 62b246904f..0000000000 --- a/script/c96938777.lua +++ /dev/null @@ -1,14 +0,0 @@ ---神機王ウル -function c96938777.initial_effect(c) - --attack all - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_ATTACK_ALL) - e1:SetValue(1) - c:RegisterEffect(e1) - --attack all - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_NO_BATTLE_DAMAGE) - c:RegisterEffect(e2) -end diff --git a/script/c96938986.lua b/script/c96938986.lua deleted file mode 100644 index 35dfeccdb5..0000000000 --- a/script/c96938986.lua +++ /dev/null @@ -1,56 +0,0 @@ ---共振虫 -function c96938986.initial_effect(c) - --tohand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(96938986,0)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCondition(c96938986.thcon) - e1:SetTarget(c96938986.thtg) - e1:SetOperation(c96938986.thop) - c:RegisterEffect(e1) - --tograve - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(96938986,1)) - e2:SetCategory(CATEGORY_TOGRAVE) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_REMOVE) - e2:SetTarget(c96938986.tgtg) - e2:SetOperation(c96938986.tgop) - c:RegisterEffect(e2) -end -function c96938986.thcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) -end -function c96938986.thfilter(c) - return c:IsLevelAbove(5) and c:IsRace(RACE_INSECT) and c:IsAbleToHand() -end -function c96938986.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c96938986.thfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c96938986.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c96938986.thfilter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end -function c96938986.tgfilter(c) - return c:IsRace(RACE_INSECT) and not c:IsCode(96938986) and c:IsAbleToGrave() -end -function c96938986.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c96938986.tgfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) -end -function c96938986.tgop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c96938986.tgfilter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoGrave(g,REASON_EFFECT) - end -end diff --git a/script/c96947648.lua b/script/c96947648.lua deleted file mode 100644 index 63cc3658dc..0000000000 --- a/script/c96947648.lua +++ /dev/null @@ -1,31 +0,0 @@ ---サルベージ -function c96947648.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c96947648.target) - e1:SetOperation(c96947648.activate) - c:RegisterEffect(e1) -end -function c96947648.filter(c) - local atk=c:GetAttack() - return atk>=0 and atk<=1500 and c:IsAttribute(ATTRIBUTE_WATER) and c:IsAbleToHand() -end -function c96947648.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:GetControler()==tp and chkc:GetLocation()==LOCATION_GRAVE and c96947648.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c96947648.filter,tp,LOCATION_GRAVE,0,2,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c96947648.filter,tp,LOCATION_GRAVE,0,2,2,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,2,0,0) -end -function c96947648.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local sg=g:Filter(Card.IsRelateToEffect,nil,e) - if sg:GetCount()>0 then - Duel.SendtoHand(sg,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,sg) - end -end diff --git a/script/c96965364.lua b/script/c96965364.lua deleted file mode 100644 index b4a623cf79..0000000000 --- a/script/c96965364.lua +++ /dev/null @@ -1,44 +0,0 @@ ---孵化 -function c96965364.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetLabel(0) - e1:SetCost(c96965364.cost) - e1:SetTarget(c96965364.target) - e1:SetOperation(c96965364.activate) - c:RegisterEffect(e1) -end -function c96965364.cost(e,tp,eg,ep,ev,re,r,rp,chk) - e:SetLabel(100) - return true -end -function c96965364.cfilter(c,e,tp) - local lv=c:GetLevel() - return lv>0 and Duel.IsExistingMatchingCard(c96965364.spfilter,tp,LOCATION_DECK,0,1,nil,lv+1,e,tp) -end -function c96965364.spfilter(c,lv,e,tp) - return c:GetLevel()==lv and c:IsRace(RACE_INSECT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c96965364.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - if e:GetLabel()~=100 then return false end - e:SetLabel(0) - return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 and Duel.CheckReleaseGroup(tp,c96965364.cfilter,1,nil,e,tp) - end - local rg=Duel.SelectReleaseGroup(tp,c96965364.cfilter,1,1,nil,e,tp) - e:SetLabel(rg:GetFirst():GetLevel()) - Duel.Release(rg,REASON_COST) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c96965364.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local lv=e:GetLabel() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c96965364.spfilter,tp,LOCATION_DECK,0,1,1,nil,lv+1,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c97000273.lua b/script/c97000273.lua deleted file mode 100644 index c519706d5f..0000000000 --- a/script/c97000273.lua +++ /dev/null @@ -1,53 +0,0 @@ ---スクラップ・コング -function c97000273.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(97000273,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c97000273.destg) - e1:SetOperation(c97000273.desop) - c:RegisterEffect(e1) - --search - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(97000273,1)) - e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) - e2:SetCondition(c97000273.thcon) - e2:SetTarget(c97000273.thtg) - e2:SetOperation(c97000273.thop) - c:RegisterEffect(e2) -end -function c97000273.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0) -end -function c97000273.desop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - Duel.Destroy(e:GetHandler(),REASON_EFFECT) - end -end -function c97000273.thcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return bit.band(c:GetReason(),0x41)==0x41 and re:GetOwner():IsSetCard(0x24) -end -function c97000273.filter(c) - return c:IsSetCard(0x24) and c:IsType(TYPE_MONSTER) and c:GetCode()~=97000273 and c:IsAbleToHand() -end -function c97000273.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c97000273.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c97000273.filter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c97000273.filter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c97000273.thop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end diff --git a/script/c97007933.lua b/script/c97007933.lua deleted file mode 100644 index 369ae851f6..0000000000 --- a/script/c97007933.lua +++ /dev/null @@ -1,81 +0,0 @@ ---HSR魔剣ダーマ -function c97007933.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1) - c:EnableReviveLimit() - --pierce - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_PIERCE) - c:RegisterEffect(e1) - --damage - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(97007933,0)) - e2:SetCategory(CATEGORY_DAMAGE) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,97007933) - e2:SetCost(c97007933.damcost) - e2:SetTarget(c97007933.damtg) - e2:SetOperation(c97007933.damop) - c:RegisterEffect(e2) - --spsummon - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(97007933,1)) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_GRAVE) - e3:SetCountLimit(1,97007934) - e3:SetCondition(c97007933.spcon) - e3:SetCost(c97007933.spcost) - e3:SetTarget(c97007933.sptg) - e3:SetOperation(c97007933.spop) - c:RegisterEffect(e3) -end -function c97007933.cfilter(c) - return c:IsRace(RACE_MACHINE) and c:IsAbleToRemoveAsCost() -end -function c97007933.damcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c97007933.cfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c97007933.cfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c97007933.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(500) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,500) -end -function c97007933.damop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end -function c97007933.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,0)==0 -end -function c97007933.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_NORMALSUMMON)==0 end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_SUMMON) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) - e1:SetReset(RESET_PHASE+RESET_END) - e1:SetTargetRange(1,0) - Duel.RegisterEffect(e1,tp) - local e2=e1:Clone() - e2:SetCode(EFFECT_CANNOT_MSET) - Duel.RegisterEffect(e2,tp) -end -function c97007933.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c97007933.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c97017120.lua b/script/c97017120.lua deleted file mode 100644 index 207482e176..0000000000 --- a/script/c97017120.lua +++ /dev/null @@ -1,33 +0,0 @@ ---巨大ネズミ -function c97017120.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(97017120,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetCondition(c97017120.condition) - e1:SetTarget(c97017120.target) - e1:SetOperation(c97017120.operation) - c:RegisterEffect(e1) -end -function c97017120.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsLocation(LOCATION_GRAVE) -end -function c97017120.filter(c,e,tp) - return c:IsAttackBelow(1500) and c:IsAttribute(ATTRIBUTE_EARTH) - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c97017120.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c97017120.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c97017120.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c97017120.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_ATTACK) - end -end diff --git a/script/c97021916.lua b/script/c97021916.lua deleted file mode 100644 index 921426aee7..0000000000 --- a/script/c97021916.lua +++ /dev/null @@ -1,15 +0,0 @@ ---ダーク・リゾネーター -function c97021916.initial_effect(c) - --battle indes - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_INDESTRUCTABLE_COUNT) - e1:SetCountLimit(1) - e1:SetValue(c97021916.valcon) - c:RegisterEffect(e1) -end -function c97021916.valcon(e,re,r,rp) - return bit.band(r,REASON_BATTLE)~=0 -end diff --git a/script/c97024987.lua b/script/c97024987.lua deleted file mode 100644 index b99d2fb5ad..0000000000 --- a/script/c97024987.lua +++ /dev/null @@ -1,50 +0,0 @@ ---イグナイト・ドラグノフ -function c97024987.initial_effect(c) - --pendulum summon - aux.AddPendulumProcedure(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --tohand - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_DESTROY+CATEGORY_TOHAND+CATEGORY_SEARCH) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_PZONE) - e2:SetCondition(c97024987.thcon) - e2:SetTarget(c97024987.thtg) - e2:SetOperation(c97024987.thop) - c:RegisterEffect(e2) -end -function c97024987.thcon(e,tp,eg,ep,ev,re,r,rp) - local seq=e:GetHandler():GetSequence() - local pc=Duel.GetFieldCard(tp,LOCATION_SZONE,13-seq) - return pc and pc:IsSetCard(0xc8) -end -function c97024987.filter(c) - return c:IsRace(RACE_WARRIOR) and c:IsAttribute(ATTRIBUTE_FIRE) and c:IsAbleToHand() -end -function c97024987.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - local pc=Duel.GetFieldCard(tp,LOCATION_SZONE,13-c:GetSequence()) - if chk==0 then return c:IsDestructable() and pc:IsDestructable() - and Duel.IsExistingMatchingCard(c97024987.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end - local g=Group.FromCards(c,pc) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,2,0,0) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE) -end -function c97024987.thop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) then return end - local pc=Duel.GetFieldCard(tp,LOCATION_SZONE,13-c:GetSequence()) - if not pc then return end - local dg=Group.FromCards(c,pc) - if Duel.Destroy(dg,REASON_EFFECT)~=2 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c97024987.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil) - if g:GetCount()>0 and not g:GetFirst():IsHasEffect(EFFECT_NECRO_VALLEY) then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c97064649.lua b/script/c97064649.lua deleted file mode 100644 index dce9a9e577..0000000000 --- a/script/c97064649.lua +++ /dev/null @@ -1,39 +0,0 @@ ---暗躍のドルイド・ウィド -function c97064649.initial_effect(c) - --set - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(97064649,0)) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCountLimit(1,97064649) - e1:SetCondition(c97064649.setcon) - e1:SetTarget(c97064649.settg) - e1:SetOperation(c97064649.setop) - c:RegisterEffect(e1) -end -function c97064649.setcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) -end -function c97064649.filter(c) - return c:GetType()==TYPE_SPELL+TYPE_CONTINUOUS and c:IsSSetable() -end -function c97064649.settg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c97064649.filter(chkc) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingTarget(c97064649.filter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) - Duel.SelectTarget(tp,c97064649.filter,tp,LOCATION_GRAVE,0,1,1,nil) -end -function c97064649.setop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsSSetable() and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 then - Duel.SSet(tp,tc) - Duel.ConfirmCards(1-tp,tc) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_TRIGGER) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - end -end diff --git a/script/c97077563.lua b/script/c97077563.lua deleted file mode 100644 index 1950d36fb8..0000000000 --- a/script/c97077563.lua +++ /dev/null @@ -1,73 +0,0 @@ ---リビングデッドの呼び声 -function c97077563.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_END_PHASE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c97077563.target) - e1:SetOperation(c97077563.operation) - c:RegisterEffect(e1) - --Destroy - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetCode(EVENT_LEAVE_FIELD_P) - e2:SetOperation(c97077563.checkop) - c:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE) - e3:SetCode(EVENT_LEAVE_FIELD) - e3:SetOperation(c97077563.desop) - e3:SetLabelObject(e2) - c:RegisterEffect(e3) - --Destroy2 - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e4:SetRange(LOCATION_SZONE) - e4:SetCode(EVENT_LEAVE_FIELD) - e4:SetCondition(c97077563.descon2) - e4:SetOperation(c97077563.desop2) - c:RegisterEffect(e4) -end -function c97077563.filter(c,e,tp) - return c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c97077563.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:GetLocation()==LOCATION_GRAVE and chkc:GetControler()==tp - and chkc:IsCanBeSpecialSummoned(e,0,tp,false,false) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c97077563.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c97077563.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c97077563.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then - if Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_ATTACK)==0 then return end - c:SetCardTarget(tc) - end -end -function c97077563.checkop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsDisabled() then - e:SetLabel(1) - else e:SetLabel(0) end -end -function c97077563.desop(e,tp,eg,ep,ev,re,r,rp) - if e:GetLabelObject():GetLabel()~=0 then return end - local tc=e:GetHandler():GetFirstCardTarget() - if tc and tc:IsLocation(LOCATION_MZONE) then - Duel.Destroy(tc,REASON_EFFECT) - end -end -function c97077563.descon2(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetHandler():GetFirstCardTarget() - return tc and eg:IsContains(tc) and tc:IsReason(REASON_DESTROY) -end -function c97077563.desop2(e,tp,eg,ep,ev,re,r,rp) - Duel.Destroy(e:GetHandler(),REASON_EFFECT) -end diff --git a/script/c97093037.lua b/script/c97093037.lua deleted file mode 100644 index 0c848b6369..0000000000 --- a/script/c97093037.lua +++ /dev/null @@ -1,33 +0,0 @@ ---創世者の化身 -function c97093037.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(97093037,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c97093037.spcost) - e1:SetTarget(c97093037.sptg) - e1:SetOperation(c97093037.spop) - c:RegisterEffect(e1) -end -function c97093037.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end -function c97093037.filter(c,e,tp) - return c:GetCode()==61505339 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c97093037.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsExistingMatchingCard(c97093037.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c97093037.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c97093037.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c97120394.lua b/script/c97120394.lua deleted file mode 100644 index 3997a7b126..0000000000 --- a/script/c97120394.lua +++ /dev/null @@ -1,32 +0,0 @@ ---封魔の矢 -function c97120394.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(TIMING_BATTLE_START) - e1:SetCondition(c97120394.condition) - e1:SetTarget(c97120394.target) - e1:SetOperation(c97120394.activate) - c:RegisterEffect(e1) -end -function c97120394.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()==PHASE_BATTLE and not Duel.CheckPhaseActivity() -end -function c97120394.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetChainLimit(aux.FALSE) -end -function c97120394.activate(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetTargetRange(1,1) - e1:SetValue(c97120394.aclimit) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function c97120394.aclimit(e,re,tp) - return re:IsActiveType(TYPE_SPELL+TYPE_TRAP) -end diff --git a/script/c97151365.lua b/script/c97151365.lua deleted file mode 100644 index 06f22a897d..0000000000 --- a/script/c97151365.lua +++ /dev/null @@ -1,56 +0,0 @@ ---スターゲート -function c97151365.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --Add counter - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e2:SetCode(EVENT_DAMAGE_STEP_END) - e2:SetRange(LOCATION_SZONE) - e2:SetOperation(c97151365.ctop) - c:RegisterEffect(e2) - --spsummon - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(97151365,0)) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_QUICK_O) - e3:SetCode(EVENT_FREE_CHAIN) - e3:SetRange(LOCATION_SZONE) - e3:SetCondition(c97151365.spcon) - e3:SetCost(c97151365.spcost) - e3:SetTarget(c97151365.sptg) - e3:SetOperation(c97151365.spop) - c:RegisterEffect(e3) -end -function c97151365.ctop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetTurnPlayer()~=tp or Duel.GetAttackTarget()~=nil then - e:GetHandler():AddCounter(0x1e,1) - end -end -function c97151365.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2) -end -function c97151365.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - e:SetLabel(e:GetHandler():GetCounter(0x1e)) - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end -function c97151365.filter(c,e,tp,lv) - return c:IsLevelBelow(lv) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c97151365.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c97151365.filter,tp,LOCATION_HAND,0,1,nil,e,tp,e:GetHandler():GetCounter(0x1e)) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function c97151365.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c97151365.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp,e:GetLabel()) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c97168905.lua b/script/c97168905.lua deleted file mode 100644 index 044719b98c..0000000000 --- a/script/c97168905.lua +++ /dev/null @@ -1,48 +0,0 @@ ---奇跡の軌跡 -function c97168905.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DRAW+CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetCondition(c97168905.condition) - e1:SetTarget(c97168905.target) - e1:SetOperation(c97168905.activate) - c:RegisterEffect(e1) -end -function c97168905.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end -function c97168905.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:IsPosition(POS_FACEUP_ATTACK) end - if chk==0 then return Duel.IsPlayerCanDraw(1-tp,1) - and Duel.IsExistingTarget(Card.IsPosition,tp,LOCATION_MZONE,0,1,nil,POS_FACEUP_ATTACK) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,Card.IsPosition,tp,LOCATION_MZONE,0,1,1,nil,POS_FACEUP_ATTACK) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,1-tp,1) -end -function c97168905.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.Draw(1-tp,1,REASON_EFFECT) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - e1:SetValue(1000) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_EXTRA_ATTACK) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e2:SetValue(1) - tc:RegisterEffect(e2) - local e3=Effect.CreateEffect(e:GetHandler()) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_NO_BATTLE_DAMAGE) - e3:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e3) - end -end diff --git a/script/c97169186.lua b/script/c97169186.lua deleted file mode 100644 index 0c1275f33d..0000000000 --- a/script/c97169186.lua +++ /dev/null @@ -1,32 +0,0 @@ ---地砕き -function c97169186.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c97169186.target) - e1:SetOperation(c97169186.activate) - c:RegisterEffect(e1) -end -function c97169186.filter(c) - return c:IsFaceup() and c:IsDestructable() -end -function c97169186.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c97169186.filter,tp,0,LOCATION_MZONE,1,nil) end - local g=Duel.GetMatchingGroup(c97169186.filter,tp,0,LOCATION_MZONE,nil) - local tg=g:GetMaxGroup(Card.GetDefence) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,tg,1,0,0) -end -function c97169186.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c97169186.filter,tp,0,LOCATION_MZONE,nil) - if g:GetCount()>0 then - local tg=g:GetMaxGroup(Card.GetDefence) - if tg:GetCount()>1 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local sg=tg:Select(tp,1,1,nil) - Duel.HintSelection(sg) - Duel.Destroy(sg,REASON_EFFECT) - else Duel.Destroy(tg,REASON_EFFECT) end - end -end diff --git a/script/c97170107.lua b/script/c97170107.lua deleted file mode 100644 index 903f9275e8..0000000000 --- a/script/c97170107.lua +++ /dev/null @@ -1,44 +0,0 @@ ---シャインエルフ -function c97170107.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,2,2) - c:EnableReviveLimit() - --atkdown - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(97170107,0)) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c97170107.cost) - e1:SetTarget(c97170107.target) - e1:SetOperation(c97170107.operation) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_SUMMON_SUCCESS) - c:RegisterEffect(e2) -end -function c97170107.filter(c,e,tp) - return c:IsFaceup() and c:IsControler(1-tp) and c:GetAttack()>0 and (not e or c:IsRelateToEffect(e)) -end -function c97170107.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c97170107.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return eg:IsExists(c97170107.filter,1,nil,nil,tp) end - Duel.SetTargetCard(eg) -end -function c97170107.operation(e,tp,eg,ep,ev,re,r,rp) - local g=eg:Filter(c97170107.filter,nil,e,tp) - local tc=g:GetFirst() - while tc do - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(-500) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - tc=g:GetNext() - end -end diff --git a/script/c97173708.lua b/script/c97173708.lua deleted file mode 100644 index 9db02d4bcd..0000000000 --- a/script/c97173708.lua +++ /dev/null @@ -1,101 +0,0 @@ ---トークン生誕祭 -function c97173708.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetLabel(0) - e1:SetCost(c97173708.cost) - e1:SetTarget(c97173708.target) - e1:SetOperation(c97173708.activate) - c:RegisterEffect(e1) -end -function c97173708.cost(e,tp,eg,ep,ev,re,r,rp,chk) - e:SetLabel(100) - return true -end -function c97173708.rfilter1(c,e,tp) - local lv=c:GetLevel() - return lv>0 and c:IsType(TYPE_TOKEN) and Duel.CheckReleaseGroup(tp,c97173708.rfilter2,1,c,lv) - and Duel.IsExistingTarget(c97173708.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp,lv) -end -function c97173708.rfilter2(c,clv) - local lv=c:GetLevel() - return lv==clv and c:IsType(TYPE_TOKEN) -end -function c97173708.spfilter(c,e,tp,clv) - return c:GetLevel()==clv and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c97173708.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c97173708.spfilter(chkc,e,tp,e:GetLabel()) end - if chk==0 then - if e:GetLabel()~=100 then return false end - e:SetLabel(0) - return Duel.GetLocationCount(tp,LOCATION_MZONE)>-2 - and Duel.CheckReleaseGroup(tp,c97173708.rfilter1,1,nil,e,tp) - end - local rg1=Duel.SelectReleaseGroup(tp,c97173708.rfilter1,1,1,nil,e,tp) - local lv=rg1:GetFirst():GetLevel() - e:SetLabel(lv) - local rg2=Duel.SelectReleaseGroup(tp,c97173708.rfilter2,1,9,rg1:GetFirst(),lv) - rg1:Merge(rg2) - Duel.Release(rg1,REASON_COST) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ft>rg1:GetCount() then ft=rg1:GetCount() end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c97173708.spfilter,tp,LOCATION_GRAVE,0,1,ft,nil,e,tp,lv) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,g:GetCount(),0,0) -end -function c97173708.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) - if g:GetCount()==0 then return end - if Duel.GetLocationCount(tp,LOCATION_MZONE)0 - and Duel.IsExistingMatchingCard(c9718968.cfilter,0,LOCATION_MZONE,LOCATION_MZONE,1,nil) -end diff --git a/script/c97204936.lua b/script/c97204936.lua deleted file mode 100644 index dfb53455c9..0000000000 --- a/script/c97204936.lua +++ /dev/null @@ -1,6 +0,0 @@ ---大地の騎士ガイアナイト -function c97204936.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1) - c:EnableReviveLimit() -end diff --git a/script/c9720537.lua b/script/c9720537.lua deleted file mode 100644 index 5f45207ced..0000000000 --- a/script/c9720537.lua +++ /dev/null @@ -1,33 +0,0 @@ ---所有者の刻印 -function c9720537.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_CONTROL) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c9720537.target) - e1:SetOperation(c9720537.activate) - c:RegisterEffect(e1) -end -function c9720537.filter(c) - return c:GetControler()~=c:GetOwner() -end -function c9720537.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c9720537.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end -end -function c9720537.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetFieldGroup(tp,LOCATION_MZONE,LOCATION_MZONE) - local tc=g:GetFirst() - while tc do - if not tc:IsImmuneToEffect(e) then - tc:ResetEffect(EFFECT_SET_CONTROL,RESET_CODE) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_CONTROL) - e1:SetValue(tc:GetOwner()) - e1:SetReset(RESET_EVENT+0xec0000) - tc:RegisterEffect(e1) - end - tc=g:GetNext() - end -end diff --git a/script/c97211663.lua b/script/c97211663.lua deleted file mode 100644 index 29d4aa2ac8..0000000000 --- a/script/c97211663.lua +++ /dev/null @@ -1,93 +0,0 @@ ---影霊衣の反魂術 -function c97211663.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,97211663) - e1:SetTarget(c97211663.target) - e1:SetOperation(c97211663.activate) - c:RegisterEffect(e1) - --search - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_GRAVE) - e2:SetCondition(c97211663.thcon) - e2:SetCost(c97211663.thcost) - e2:SetTarget(c97211663.thtg) - e2:SetOperation(c97211663.thop) - c:RegisterEffect(e2) -end -function c97211663.filter(c,e,tp,m) - if not c:IsSetCard(0xb4) or bit.band(c:GetType(),0x81)~=0x81 - or not c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true) or c:IsHasEffect(EFFECT_NECRO_VALLEY) then return false end - local mg=m:Filter(Card.IsCanBeRitualMaterial,c,c) - if c:IsCode(21105106) then return c:ritual_custom_condition(mg) end - if c.mat_filter then - mg=mg:Filter(c.mat_filter,nil) - end - return mg:CheckWithSumEqual(Card.GetRitualLevel,c:GetLevel(),1,99,c) -end -function c97211663.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local mg=Duel.GetRitualMaterial(tp) - return Duel.IsExistingMatchingCard(c97211663.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp,mg) - end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE) -end -function c97211663.activate(e,tp,eg,ep,ev,re,r,rp) - local mg=Duel.GetRitualMaterial(tp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local tg=Duel.SelectMatchingCard(tp,c97211663.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp,mg) - local tc=tg:GetFirst() - if tc then - mg=mg:Filter(Card.IsCanBeRitualMaterial,tc,tc) - if tc:IsCode(21105106) then - tc:ritual_custom_operation(mg) - local mat=tc:GetMaterial() - Duel.ReleaseRitualMaterial(mat) - else - if tc.mat_filter then - mg=mg:Filter(tc.mat_filter,nil) - end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) - local mat=mg:SelectWithSumEqual(tp,Card.GetRitualLevel,tc:GetLevel(),1,99,tc) - tc:SetMaterial(mat) - Duel.ReleaseRitualMaterial(mat) - end - Duel.BreakEffect() - Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP) - tc:CompleteProcedure() - end -end -function c97211663.thcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 -end -function c97211663.cfilter(c) - return c:IsSetCard(0xb4) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost() -end -function c97211663.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() - and Duel.IsExistingMatchingCard(c97211663.cfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c97211663.cfilter,tp,LOCATION_GRAVE,0,1,1,nil) - g:AddCard(e:GetHandler()) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c97211663.thfilter(c) - return c:IsSetCard(0xb4) and c:IsType(TYPE_SPELL) and c:IsAbleToHand() -end -function c97211663.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c97211663.thfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c97211663.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c97211663.thfilter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c97232518.lua b/script/c97232518.lua deleted file mode 100644 index 2479e75a9e..0000000000 --- a/script/c97232518.lua +++ /dev/null @@ -1,33 +0,0 @@ ---深淵のスタングレイ -function c97232518.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c97232518.target) - e1:SetOperation(c97232518.activate) - c:RegisterEffect(e1) -end -function c97232518.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsPlayerCanSpecialSummonMonster(tp,97232518,0,0x21,1900,0,5,RACE_THUNDER,ATTRIBUTE_LIGHT) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c97232518.activate(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) then return end - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 - or not Duel.IsPlayerCanSpecialSummonMonster(tp,97232518,0,0x21,1900,0,5,RACE_THUNDER,ATTRIBUTE_LIGHT) then return end - c:AddTrapMonsterAttribute(TYPE_EFFECT,ATTRIBUTE_LIGHT,RACE_THUNDER,5,1900,0) - Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP) - c:TrapMonsterBlock() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e1:SetRange(LOCATION_MZONE) - e1:SetValue(1) - e1:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e1) -end diff --git a/script/c97234686.lua b/script/c97234686.lua deleted file mode 100644 index 9ce1a4db57..0000000000 --- a/script/c97234686.lua +++ /dev/null @@ -1,25 +0,0 @@ ---グラディアル・チェンジ -function c97234686.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCategory(CATEGORY_HANDES) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(c97234686.condition) - e1:SetTarget(c97234686.target) - e1:SetOperation(c97234686.activate) - c:RegisterEffect(e1) -end -function c97234686.filter(c,tp) - return c:IsFaceup() and c:IsControler(tp) and c:IsSetCard(0x19) -end -function c97234686.condition(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c97234686.filter,1,nil,tp) -end -function c97234686.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0 end - Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1) -end -function c97234686.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.DiscardHand(1-tp,aux.TRUE,1,1,REASON_DISCARD+REASON_EFFECT) -end diff --git a/script/c97268402.lua b/script/c97268402.lua deleted file mode 100644 index b43dec631d..0000000000 --- a/script/c97268402.lua +++ /dev/null @@ -1,53 +0,0 @@ ---エフェクト・ヴェーラー -function c97268402.initial_effect(c) - --disable - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(97268402,0)) - e1:SetCategory(CATEGORY_DISABLE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,0x1c0+TIMING_MAIN_END) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c97268402.condition) - e1:SetCost(c97268402.cost) - e1:SetTarget(c97268402.target) - e1:SetOperation(c97268402.operation) - c:RegisterEffect(e1) -end -function c97268402.condition(e,tp,eg,ep,ev,re,r,rp) - local ph=Duel.GetCurrentPhase() - return Duel.GetTurnPlayer()~=tp and (ph==PHASE_MAIN1 or ph==PHASE_MAIN2) -end -function c97268402.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end -function c97268402.filter(c) - return c:IsFaceup() and not c:IsDisabled() and c:IsType(TYPE_EFFECT) -end -function c97268402.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and c97268402.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c97268402.filter,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - local g=Duel.SelectTarget(tp,c97268402.filter,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0) -end -function c97268402.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) and tc:IsType(TYPE_MONSTER) and not tc:IsDisabled() and tc:IsControler(1-tp) then - Duel.NegateRelatedChain(tc,RESET_TURN_SET) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetValue(RESET_TURN_SET) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - tc:RegisterEffect(e2) - end -end diff --git a/script/c97317530.lua b/script/c97317530.lua deleted file mode 100644 index c5ee641961..0000000000 --- a/script/c97317530.lua +++ /dev/null @@ -1,30 +0,0 @@ ---森の聖獣 カラントーサ -function c97317530.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(97317530,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e1:SetCondition(c97317530.descon) - e1:SetTarget(c97317530.destg) - e1:SetOperation(c97317530.desop) - c:RegisterEffect(e1) -end -function c97317530.descon(e,tp,eg,ep,ev,re,r,rp) - return re and re:GetOwner():IsRace(RACE_BEAST) -end -function c97317530.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsDestructable() end - if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c97317530.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c97342942.lua b/script/c97342942.lua deleted file mode 100644 index 6ebc3506f8..0000000000 --- a/script/c97342942.lua +++ /dev/null @@ -1,40 +0,0 @@ ---エクトプラズマー -function c97342942.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --release - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(97342942,0)) - e2:SetCategory(CATEGORY_RELEASE+CATEGORY_DAMAGE) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetRange(LOCATION_SZONE) - e2:SetProperty(EFFECT_FLAG_BOTH_SIDE) - e2:SetCode(EVENT_PHASE+PHASE_END) - e2:SetCountLimit(1) - e2:SetCondition(c97342942.condition) - e2:SetTarget(c97342942.target) - e2:SetOperation(c97342942.operation) - c:RegisterEffect(e2) -end -function c97342942.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c97342942.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_RELEASE,nil,1,tp,LOCATION_MZONE) -end -function c97342942.rfilter(c,e) - return c:IsFaceup() and c:IsReleasableByEffect() and not c:IsImmuneToEffect(e) -end -function c97342942.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) then return end - local rg=Duel.SelectReleaseGroup(tp,c97342942.rfilter,1,1,e:GetHandler(),e) - if Duel.Release(rg,REASON_EFFECT)>0 then - local atk=rg:GetFirst():GetBaseAttack()/2 - Duel.Damage(1-tp,atk,REASON_EFFECT) - end -end diff --git a/script/c97362768.lua b/script/c97362768.lua deleted file mode 100644 index fd9fc57352..0000000000 --- a/script/c97362768.lua +++ /dev/null @@ -1,67 +0,0 @@ ---スパークガン -function c97362768.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c97362768.target) - e1:SetOperation(c97362768.operation) - c:RegisterEffect(e1) - --Equip limit - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_EQUIP_LIMIT) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetValue(c97362768.eqlimit) - c:RegisterEffect(e2) - --pos - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(97362768,0)) - e3:SetCategory(CATEGORY_POSITION) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_SZONE) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetTarget(c97362768.postg) - e3:SetOperation(c97362768.posop) - c:RegisterEffect(e3) - e1:SetLabelObject(e3) -end -function c97362768.eqlimit(e,c) - return c:IsCode(20721928) -end -function c97362768.filter(c) - return c:IsFaceup() and c:IsCode(20721928) -end -function c97362768.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c97362768.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c97362768.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c97362768.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c97362768.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,e:GetHandler(),tc) - e:GetLabelObject():SetLabel(0) - end -end -function c97362768.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE) - local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0) -end -function c97362768.posop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.ChangePosition(tc,POS_FACEUP_DEFENCE,0,POS_FACEUP_ATTACK,0) - local ct=e:GetLabel() - ct=ct+1 - e:SetLabel(ct) - if ct==3 then Duel.Destroy(e:GetHandler(),REASON_EFFECT) end - end -end diff --git a/script/c97385276.lua b/script/c97385276.lua deleted file mode 100644 index 9570b475be..0000000000 --- a/script/c97385276.lua +++ /dev/null @@ -1,50 +0,0 @@ ---レベル・ウォリアー -function c97385276.initial_effect(c) - --summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(97385276,0)) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetCondition(c97385276.sumcon) - e1:SetOperation(c97385276.sumop) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_SPSUMMON_PROC) - e2:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e2:SetRange(LOCATION_HAND) - e2:SetCondition(c97385276.spcon) - e2:SetOperation(c97385276.spop) - c:RegisterEffect(e2) -end -function c97385276.sumcon(e,c,minc) - if c==nil then return true end - local tp=c:GetControler() - return minc==0 and Duel.GetFieldGroupCount(tp,LOCATION_MZONE,LOCATION_MZONE)==0 - and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 -end -function c97385276.sumop(e,tp,eg,ep,ev,re,r,rp,c) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CHANGE_LEVEL) - e1:SetValue(2) - e1:SetReset(RESET_EVENT+0xff0000) - c:RegisterEffect(e1) -end -function c97385276.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 - and Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0 - and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 -end -function c97385276.spop(e,tp,eg,ep,ev,re,r,rp,c) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CHANGE_LEVEL) - e1:SetValue(4) - e1:SetReset(RESET_EVENT+0xff0000) - c:RegisterEffect(e1) -end diff --git a/script/c97396380.lua b/script/c97396380.lua deleted file mode 100644 index 9f7d3758bc..0000000000 --- a/script/c97396380.lua +++ /dev/null @@ -1,36 +0,0 @@ ---火舞太刀 -function c97396380.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(97396380,0)) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCondition(c97396380.condition) - e1:SetTarget(c97396380.target) - e1:SetOperation(c97396380.operation) - c:RegisterEffect(e1) -end -function c97396380.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsReason(REASON_DESTROY) -end -function c97396380.filter(c) - return c:IsFaceup() and c:IsDestructable() -end -function c97396380.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c97396380.filter(chkc) end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c97396380.filter,tp,0,LOCATION_MZONE,1,1,nil) - if g:GetCount()>0 then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,500) - end -end -function c97396380.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)>0 then - Duel.Damage(1-tp,500,REASON_EFFECT) - end -end diff --git a/script/c97403510.lua b/script/c97403510.lua deleted file mode 100644 index 7f7006d7f0..0000000000 --- a/script/c97403510.lua +++ /dev/null @@ -1,116 +0,0 @@ ---No.92 偽骸神龍 Heart-eartH Dragon -function c97403510.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,nil,9,3) - c:EnableReviveLimit() - --battle - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_REFLECT_BATTLE_DAMAGE) - e1:SetValue(1) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e2:SetValue(1) - c:RegisterEffect(e2) - --remove - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(97403510,0)) - e3:SetCategory(CATEGORY_REMOVE) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_PHASE+PHASE_END) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1) - e3:SetCondition(c97403510.rmcon) - e3:SetCost(c97403510.rmcost) - e3:SetTarget(c97403510.rmtg) - e3:SetOperation(c97403510.rmop) - c:RegisterEffect(e3) - --spsummon - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(97403510,1)) - e4:SetCategory(CATEGORY_SPECIAL_SUMMON) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e4:SetCode(EVENT_TO_GRAVE) - e4:SetCondition(c97403510.spcon) - e4:SetTarget(c97403510.sptg) - e4:SetOperation(c97403510.spop) - c:RegisterEffect(e4) - --atkup - local e5=Effect.CreateEffect(c) - e5:SetDescription(aux.Stringid(97403510,2)) - e5:SetCategory(CATEGORY_ATKCHANGE) - e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e5:SetCode(EVENT_SPSUMMON_SUCCESS) - e5:SetCondition(c97403510.atkcon) - e5:SetOperation(c97403510.atkop) - c:RegisterEffect(e5) - if not c97403510.global_check then - c97403510.global_check=true - local ge1=Effect.CreateEffect(c) - ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - ge1:SetCode(EVENT_SSET) - ge1:SetOperation(c97403510.checkop) - Duel.RegisterEffect(ge1,0) - end -end -c97403510.xyz_number=92 -function c97403510.checkop(e,tp,eg,ep,ev,re,r,rp) - local tc=eg:GetFirst() - while tc do - tc:RegisterFlagEffect(97403510,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) - tc=eg:GetNext() - end -end -function c97403510.rmcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp -end -function c97403510.rmcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c97403510.filter(c,turn) - return (c:IsLocation(LOCATION_MZONE) or c:GetFlagEffect(97403510)~=0) and c:GetTurnID()==turn and c:IsAbleToRemove() -end -function c97403510.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c97403510.filter,tp,0,LOCATION_ONFIELD,1,nil,Duel.GetTurnCount()) end - local g=Duel.GetMatchingGroup(c97403510.filter,tp,0,LOCATION_ONFIELD,nil,Duel.GetTurnCount()) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,0) -end -function c97403510.rmop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c97403510.filter,tp,0,LOCATION_ONFIELD,nil,Duel.GetTurnCount()) - if g:GetCount()>0 then - Duel.Remove(g,POS_FACEUP,REASON_EFFECT) - end -end -function c97403510.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsReason(REASON_DESTROY) and e:GetHandler():GetOverlayCount()>0 -end -function c97403510.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c97403510.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,1,tp,tp,false,false,POS_FACEUP) - end -end -function c97403510.atkcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+1 -end -function c97403510.atkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local atk=Duel.GetFieldGroupCount(tp,LOCATION_REMOVED,LOCATION_REMOVED)*1000 - if atk>0 and c:IsFaceup() and c:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(atk) - e1:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e1) - end -end diff --git a/script/c9742784.lua b/script/c9742784.lua deleted file mode 100644 index ffa82206f6..0000000000 --- a/script/c9742784.lua +++ /dev/null @@ -1,63 +0,0 @@ ---ジェット・シンクロン -function c9742784.initial_effect(c) - --tohand - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DELAY) - e1:SetCode(EVENT_BE_MATERIAL) - e1:SetCountLimit(1,9742784) - e1:SetCondition(c9742784.thcon) - e1:SetTarget(c9742784.thtg) - e1:SetOperation(c9742784.thop) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_GRAVE) - e2:SetCountLimit(1,9742784) - e2:SetCost(c9742784.spcost) - e2:SetTarget(c9742784.sptg) - e2:SetOperation(c9742784.spop) - c:RegisterEffect(e2) -end -function c9742784.thcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsLocation(LOCATION_GRAVE) and r==REASON_SYNCHRO -end -function c9742784.filter(c) - return c:IsSetCard(0x43) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() -end -function c9742784.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c9742784.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c9742784.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c9742784.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end -function c9742784.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,Card.IsAbleToGraveAsCost,1,1,REASON_COST) -end -function c9742784.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c9742784.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+0x47e0000) - e1:SetValue(LOCATION_REMOVED) - c:RegisterEffect(e1,true) - end -end diff --git a/script/c97433739.lua b/script/c97433739.lua deleted file mode 100644 index c9121acf7e..0000000000 --- a/script/c97433739.lua +++ /dev/null @@ -1,113 +0,0 @@ ---未来への思い -function c97433739.initial_effect(c) - --activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c97433739.cost) - e1:SetTarget(c97433739.target) - e1:SetOperation(c97433739.operation) - c:RegisterEffect(e1) - Duel.AddCustomActivityCounter(97433739,ACTIVITY_SPSUMMON,c97433739.counterfilter) -end -function c97433739.counterfilter(c) - return c:GetSummonType()==SUMMON_TYPE_XYZ -end -function c97433739.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetCustomActivityCount(97433739,tp,ACTIVITY_SPSUMMON)==0 end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) - e1:SetTargetRange(1,0) - e1:SetLabelObject(e) - e1:SetTarget(c97433739.sumlimit) - Duel.RegisterEffect(e1,tp) -end -function c97433739.sumlimit(e,c,sump,sumtype,sumpos,targetp,se) - return sumtype~=SUMMON_TYPE_XYZ and e:GetLabelObject()~=se -end -function c97433739.spfilter(c,e,tp) - return c:IsLevelAbove(1) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsCanBeEffectTarget(e) -end -function c97433739.rfilter(c,lv) - return c:GetLevel()==lv -end -function c97433739.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - local g=Duel.GetMatchingGroup(c97433739.spfilter,tp,LOCATION_GRAVE,0,nil,e,tp) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>2 - and g:GetClassCount(Card.GetLevel)>=3 end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g1=g:Select(tp,1,1,nil) - g:Remove(c97433739.rfilter,nil,g1:GetFirst():GetLevel()) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g2=g:Select(tp,1,1,nil) - g:Remove(c97433739.rfilter,nil,g2:GetFirst():GetLevel()) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g3=g:Select(tp,1,1,nil) - g1:Merge(g2) - g1:Merge(g3) - Duel.SetTargetCard(g1) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g1,3,0,0) -end -function c97433739.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) - if g:GetCount()~=3 then return end - if Duel.GetLocationCount(tp,LOCATION_MZONE)=4 - and Duel.GetFieldGroupCount(tp,LOCATION_GRAVE,0)==0 -end -function c97439308.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp,2) end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(2) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2) -end -function c97439308.activate(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end diff --git a/script/c97439806.lua b/script/c97439806.lua deleted file mode 100644 index 1fecd9e49c..0000000000 --- a/script/c97439806.lua +++ /dev/null @@ -1,30 +0,0 @@ ---魔轟神クシャノ -function c97439806.initial_effect(c) - --to hand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(97439806,0)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_GRAVE) - e1:SetCost(c97439806.cost) - e1:SetTarget(c97439806.tg) - e1:SetOperation(c97439806.op) - c:RegisterEffect(e1) -end -function c97439806.costfilter(c) - return c:IsSetCard(0x35) and c:GetCode()~=97439806 and c:IsDiscardable() -end -function c97439806.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c97439806.costfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,c97439806.costfilter,1,1,REASON_DISCARD+REASON_COST) -end -function c97439806.tg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToHand() end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0) -end -function c97439806.op(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,e:GetHandler()) - end -end diff --git a/script/c9744376.lua b/script/c9744376.lua deleted file mode 100644 index 84ca96a752..0000000000 --- a/script/c9744376.lua +++ /dev/null @@ -1,28 +0,0 @@ ---ゴブリンのやりくり上手 -function c9744376.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DRAW+CATEGORY_TODECK) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c9744376.target) - e1:SetOperation(c9744376.activate) - c:RegisterEffect(e1) -end -function c9744376.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end - Duel.SetTargetPlayer(tp) - local ct=Duel.GetMatchingGroupCount(Card.IsCode,tp,LOCATION_GRAVE,0,nil,9744376) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,ct+1) - Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_HAND) -end -function c9744376.activate(e,tp,eg,ep,ev,re,r,rp) - local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) - local d=Duel.GetMatchingGroupCount(Card.IsCode,p,LOCATION_GRAVE,0,nil,9744376)+1 - Duel.Draw(p,d,REASON_EFFECT) - Duel.BreakEffect() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectMatchingCard(p,aux.TRUE,p,LOCATION_HAND,0,1,1,nil) - Duel.SendtoDeck(g,nil,1,REASON_EFFECT) -end diff --git a/script/c97452817.lua b/script/c97452817.lua deleted file mode 100644 index 2982e46e12..0000000000 --- a/script/c97452817.lua +++ /dev/null @@ -1,94 +0,0 @@ ---アルカナフォースXVIII-THE MOON -function c97452817.initial_effect(c) - --coin - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(97452817,0)) - e1:SetCategory(CATEGORY_COIN) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c97452817.cointg) - e1:SetOperation(c97452817.coinop) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e2) - local e3=e1:Clone() - e3:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - c:RegisterEffect(e3) -end -function c97452817.cointg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_COIN,nil,0,tp,1) -end -function c97452817.coinop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) or c:IsFacedown() then return end - local res=0 - if c:IsHasEffect(73206827) then - res=1-Duel.SelectOption(tp,60,61) - else res=Duel.TossCoin(tp,1) end - c97452817.arcanareg(c,res) -end -function c97452817.arcanareg(c,coin) - --coin effect - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(97452817,1)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) - e1:SetCountLimit(1) - e1:SetCondition(c97452817.spcon) - e1:SetTarget(c97452817.sptg) - e1:SetOperation(c97452817.spop) - e1:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e1) - -- - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(97452817,2)) - e2:SetCategory(CATEGORY_CONTROL) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_PHASE+PHASE_END) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCondition(c97452817.ctcon) - e2:SetTarget(c97452817.cttg) - e2:SetOperation(c97452817.ctop) - e2:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e2) - c:RegisterFlagEffect(36690018,RESET_EVENT+0x1ff0000,EFFECT_FLAG_CLIENT_HINT,1,coin,63-coin) -end -function c97452817.spcon(e,tp,eg,ep,ev,re,r,rp) - return ep==tp and e:GetHandler():GetFlagEffectLabel(36690018)==1 -end -function c97452817.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsPlayerCanSpecialSummonMonster(tp,97452818,0,0x4011,0,0,1,RACE_FAIRY,ATTRIBUTE_LIGHT) end - Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0) -end -function c97452817.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - if not Duel.IsPlayerCanSpecialSummonMonster(tp,97452818,0,0x4011,0,0,1,RACE_FAIRY,ATTRIBUTE_LIGHT) then return end - local token=Duel.CreateToken(tp,97452818) - Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP) -end -function c97452817.ctcon(e,tp,eg,ep,ev,re,r,rp) - return ep==tp and e:GetHandler():GetFlagEffectLabel(36690018)==0 -end -function c97452817.cttg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:IsAbleToChangeControler() end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) - local g=Duel.SelectTarget(tp,Card.IsAbleToChangeControler,tp,LOCATION_MZONE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0) -end -function c97452817.ctop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsControler(tp) and not Duel.GetControl(tc,1-tp) then - if not tc:IsImmuneToEffect(e) and tc:IsAbleToChangeControler() then - Duel.Destroy(tc,REASON_EFFECT) - end - end -end diff --git a/script/c9748752.lua b/script/c9748752.lua deleted file mode 100644 index 6b9263bd58..0000000000 --- a/script/c9748752.lua +++ /dev/null @@ -1,39 +0,0 @@ ---邪帝ガイウス -function c9748752.initial_effect(c) - --remove - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(9748752,0)) - e1:SetCategory(CATEGORY_REMOVE+CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetCondition(c9748752.condition) - e1:SetTarget(c9748752.target) - e1:SetOperation(c9748752.operation) - c:RegisterEffect(e1) -end -function c9748752.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_ADVANCE -end -function c9748752.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - local tc=g:GetFirst() - if tc and tc:IsAbleToRemove() then - Duel.SetOperationInfo(0,CATEGORY_REMOVE,tc,1,0,0) - if tc:IsFaceup() and tc:IsAttribute(ATTRIBUTE_DARK) then - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,1000) - end - end -end -function c9748752.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) - if tc:IsLocation(LOCATION_REMOVED) and tc:IsType(TYPE_MONSTER) and tc:IsAttribute(ATTRIBUTE_DARK) then - Duel.Damage(1-tp,1000,REASON_EFFECT) - end - end -end diff --git a/script/c97489701.lua b/script/c97489701.lua deleted file mode 100644 index 69d3553e4c..0000000000 --- a/script/c97489701.lua +++ /dev/null @@ -1,220 +0,0 @@ ---スカーレッド・ノヴァ・ドラゴン -function c97489701.initial_effect(c) - --synchro summon - c:EnableReviveLimit() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_IGNORE_IMMUNE) - e1:SetRange(LOCATION_EXTRA) - e1:SetCondition(c97489701.syncon) - e1:SetOperation(c97489701.synop) - e1:SetValue(SUMMON_TYPE_SYNCHRO) - c:RegisterEffect(e1) - --atk - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(c97489701.atkval) - c:RegisterEffect(e2) - --indestructable - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e3:SetRange(LOCATION_MZONE) - e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - e3:SetValue(c97489701.indval) - c:RegisterEffect(e3) - --negate attack - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(97489701,0)) - e4:SetCategory(CATEGORY_REMOVE) - e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e4:SetProperty(EFFECT_FLAG_CARD_TARGET) - e4:SetCode(EVENT_ATTACK_ANNOUNCE) - e4:SetRange(LOCATION_MZONE) - e4:SetCondition(c97489701.nacon) - e4:SetTarget(c97489701.natg) - e4:SetOperation(c97489701.naop) - c:RegisterEffect(e4) - --special summon - local e5=Effect.CreateEffect(c) - e5:SetDescription(aux.Stringid(97489701,1)) - e5:SetCategory(CATEGORY_SPECIAL_SUMMON) - e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e5:SetCode(EVENT_PHASE+PHASE_END) - e5:SetRange(LOCATION_REMOVED) - e5:SetCountLimit(1) - e5:SetCondition(c97489701.spcon) - e5:SetTarget(c97489701.sptg) - e5:SetOperation(c97489701.spop) - c:RegisterEffect(e5) -end -function c97489701.matfilter1(c,syncard) - return c:IsType(TYPE_TUNER) and (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) and c:IsCanBeSynchroMaterial(syncard) -end -function c97489701.matfilter2(c,syncard) - return c:IsFaceup() and c:IsCode(70902743) and c:IsCanBeSynchroMaterial(syncard) -end -function c97489701.synfilter1(c,syncard,lv,g1,g2,g3) - local tlv=c:GetSynchroLevel(syncard) - if lv-tlv<=0 then return false end - local f1=c.tuner_filter - if c:IsHasEffect(55863245) then - return g3:IsExists(c97489701.synfilter2,1,c,syncard,lv-tlv,g2,f1,c) - else - return g1:IsExists(c97489701.synfilter2,1,c,syncard,lv-tlv,g2,f1,c) - end -end -function c97489701.synfilter2(c,syncard,lv,g2,f1,tuner1) - local tlv=c:GetSynchroLevel(syncard) - if lv-tlv<=0 then return false end - local f2=c.tuner_filter - if f1 and not f1(c) then return false end - if f2 and not f2(tuner1) then return false end - return g2:IsExists(c97489701.synfilter3,1,nil,syncard,lv-tlv,f1,f2) -end -function c97489701.synfilter3(c,syncard,lv,f1,f2) - local mlv=c:GetSynchroLevel(syncard) - local lv1=bit.band(mlv,0xffff) - local lv2=bit.rshift(mlv,16) - return (lv1==lv or lv2==lv) and (not f1 or f1(c)) and (not f2 or f2(c)) -end -function c97489701.syncon(e,c,tuner,mg) - if c==nil then return true end - local tp=c:GetControler() - if Duel.GetLocationCount(tp,LOCATION_MZONE)<-2 then return false end - local g1=nil - local g2=nil - local g3=nil - if mg then - g1=mg:Filter(c97489701.matfilter1,nil,c) - g2=mg:Filter(c97489701.matfilter2,nil,c) - g3=mg:Filter(c97489701.matfilter1,nil,c) - else - g1=Duel.GetMatchingGroup(c97489701.matfilter1,tp,LOCATION_MZONE,LOCATION_MZONE,nil,c) - g2=Duel.GetMatchingGroup(c97489701.matfilter2,tp,LOCATION_MZONE,LOCATION_MZONE,nil,c) - g3=Duel.GetMatchingGroup(c97489701.matfilter1,tp,LOCATION_MZONE+LOCATION_HAND,LOCATION_MZONE,nil,c) - end - local pe=Duel.IsPlayerAffectedByEffect(tp,EFFECT_MUST_BE_SMATERIAL) - local lv=c:GetLevel() - if tuner then - local tlv=tuner:GetSynchroLevel(c) - if lv-tlv<=0 then return false end - local f1=tuner.tuner_filter - if not pe then - return g1:IsExists(c97489701.synfilter2,1,tuner,c,lv-tlv,g2,f1,tuner) - else - return c97489701.synfilter2(pe:GetOwner(),c,lv-tlv,g2,f1,tuner) - end - end - if not pe then - return g1:IsExists(c97489701.synfilter1,1,nil,c,lv,g1,g2,g3) - else - return c97489701.synfilter1(pe:GetOwner(),c,lv,g1,g2) - end -end -function c97489701.synop(e,tp,eg,ep,ev,re,r,rp,c,tuner,mg) - local g=Group.CreateGroup() - local g1=nil - local g2=nil - local g3=nil - if mg then - g1=mg:Filter(c97489701.matfilter1,nil,c) - g2=mg:Filter(c97489701.matfilter2,nil,c) - g3=mg:Filter(c97489701.matfilter1,nil,c) - else - g1=Duel.GetMatchingGroup(c97489701.matfilter1,tp,LOCATION_MZONE,LOCATION_MZONE,nil,c) - g2=Duel.GetMatchingGroup(c97489701.matfilter2,tp,LOCATION_MZONE,LOCATION_MZONE,nil,c) - g3=Duel.GetMatchingGroup(c97489701.matfilter1,tp,LOCATION_MZONE+LOCATION_HAND,LOCATION_MZONE,nil,c) - end - local pe=Duel.IsPlayerAffectedByEffect(tp,EFFECT_MUST_BE_SMATERIAL) - local lv=c:GetLevel() - if tuner then - g:AddCard(tuner) - local lv1=tuner:GetSynchroLevel(c) - local f1=tuner.tuner_filter - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SMATERIAL) - local tuner2=nil - if not pe then - local t2=g1:FilterSelect(tp,c97489701.synfilter2,1,1,tuner,c,lv-lv1,g2,f1,tuner) - tuner2=t2:GetFirst() - else - tuner2=pe:GetOwner() - Group.FromCards(tuner2):Select(tp,1,1,nil) - end - g:AddCard(tuner2) - local lv2=tuner2:GetSynchroLevel(c) - local f2=tuner2.tuner_filter - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SMATERIAL) - local m3=g2:FilterSelect(tp,c97489701.synfilter3,1,1,nil,c,lv-lv1-lv2,f1,f2) - g:Merge(m3) - else - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SMATERIAL) - local tuner1=nil - if not pe then - local t1=g1:FilterSelect(tp,c97489701.synfilter1,1,1,nil,c,lv,g1,g2,g3) - tuner1=t1:GetFirst() - else - tuner1=pe:GetOwner() - Group.FromCards(tuner1):Select(tp,1,1,nil) - end - g:AddCard(tuner1) - local lv1=tuner1:GetSynchroLevel(c) - local f1=tuner1.tuner_filter - local t2=nil - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SMATERIAL) - if tuner1:IsHasEffect(55863245) then - t2=g3:FilterSelect(tp,c97489701.synfilter2,1,1,tuner1,c,lv-lv1,g2,f1,tuner1) - else - t2=g1:FilterSelect(tp,c97489701.synfilter2,1,1,tuner1,c,lv-lv1,g2,f1,tuner1) - end - local tuner2=t2:GetFirst() - g:AddCard(tuner2) - local lv2=tuner2:GetSynchroLevel(c) - local f2=tuner2.tuner_filter - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SMATERIAL) - local m3=g2:FilterSelect(tp,c97489701.synfilter3,1,1,nil,c,lv-lv1-lv2,f1,f2) - g:Merge(m3) - end - c:SetMaterial(g) - Duel.SendtoGrave(g,REASON_MATERIAL+REASON_SYNCHRO) -end -function c97489701.atkval(e,c) - return Duel.GetMatchingGroupCount(Card.IsType,c:GetControler(),LOCATION_GRAVE,0,nil,TYPE_TUNER)*500 -end -function c97489701.indval(e,re,tp) - return e:GetHandler():GetControler()~=tp -end -function c97489701.nacon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetAttacker():GetControler()~=tp -end -function c97489701.natg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc==Duel.GetAttacker() end - if chk==0 then return e:GetHandler():IsAbleToRemove() and Duel.GetAttacker():IsCanBeEffectTarget(e) - and not e:GetHandler():IsStatus(STATUS_CHAINING) end - Duel.SetTargetCard(Duel.GetAttacker()) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,e:GetHandler(),1,0,0) -end -function c97489701.naop(e,tp,eg,ep,ev,re,r,rp,chk) - Duel.NegateAttack() - local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.Remove(c,POS_FACEUP,REASON_EFFECT)~=0 then - c:RegisterFlagEffect(97489701,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) - end -end -function c97489701.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetFlagEffect(97489701)~=0 -end -function c97489701.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c97489701.spop(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c97520701.lua b/script/c97520701.lua deleted file mode 100644 index a653c02e81..0000000000 --- a/script/c97520701.lua +++ /dev/null @@ -1,61 +0,0 @@ ---臨時ダイヤ -function c97520701.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,97520701+EFFECT_COUNT_CODE_OATH) - e1:SetTarget(c97520701.target) - e1:SetOperation(c97520701.operation) - c:RegisterEffect(e1) - --salvage - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(97520701,0)) - e2:SetCategory(CATEGORY_TOHAND) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetCondition(c97520701.thcon) - e2:SetTarget(c97520701.thtg) - e2:SetOperation(c97520701.thop) - c:RegisterEffect(e2) -end -function c97520701.filter(c,e,tp) - return c:IsRace(RACE_MACHINE) and c:IsAttackAbove(3000) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c97520701.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c97520701.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c97520701.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c97520701.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c97520701.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENCE) - end -end -function c97520701.thcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) and e:GetHandler():IsPreviousPosition(POS_FACEDOWN) -end -function c97520701.thfilter(c) - return c:GetLevel()==10 and c:IsRace(RACE_MACHINE) and c:IsAbleToHand() -end -function c97520701.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c97520701.thfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c97520701.thfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c97520701.thfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c97520701.thop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end diff --git a/script/c97526666.lua b/script/c97526666.lua deleted file mode 100644 index 9a8fea363e..0000000000 --- a/script/c97526666.lua +++ /dev/null @@ -1,32 +0,0 @@ ---惑星探査車 -function c97526666.initial_effect(c) - --search - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(97526666,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c97526666.cost) - e1:SetTarget(c97526666.target) - e1:SetOperation(c97526666.operation) - c:RegisterEffect(e1) -end -function c97526666.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end -function c97526666.filter(c) - return c:IsType(TYPE_FIELD) and c:IsAbleToHand() -end -function c97526666.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c97526666.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c97526666.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c97526666.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c9753964.lua b/script/c9753964.lua deleted file mode 100644 index bab561e299..0000000000 --- a/script/c9753964.lua +++ /dev/null @@ -1,89 +0,0 @@ ---琰魔竜 レッド・デーモン・アビス -function c9753964.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure2(c,nil,aux.NonTuner(c9753964.sfilter)) - c:EnableReviveLimit() - --negate - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(9753964,0)) - e1:SetCategory(CATEGORY_DISABLE) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetHintTiming(0,0x1c0) - e1:SetCountLimit(1,9753964) - e1:SetTarget(c9753964.target) - e1:SetOperation(c9753964.operation) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(9753964,1)) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_BATTLE_DAMAGE) - e2:SetCountLimit(1,9753965) - e2:SetCondition(c9753964.spcon) - e2:SetTarget(c9753964.sptg) - e2:SetOperation(c9753964.spop) - c:RegisterEffect(e2) -end -function c9753964.sfilter(c) - return c:IsRace(RACE_DRAGON) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsType(TYPE_SYNCHRO) -end -function c9753964.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() and aux.disfilter1(chkc) end - if chk==0 then return Duel.IsExistingTarget(aux.disfilter1,tp,0,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - local g=Duel.SelectTarget(tp,aux.disfilter1,tp,0,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0) -end -function c9753964.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if ((tc:IsFaceup() and not tc:IsDisabled()) or tc:IsType(TYPE_TRAPMONSTER)) and tc:IsRelateToEffect(e) then - Duel.NegateRelatedChain(tc,RESET_TURN_SET) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetValue(RESET_TURN_SET) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - tc:RegisterEffect(e2) - if tc:IsType(TYPE_TRAPMONSTER) then - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e3:SetCode(EFFECT_DISABLE_TRAPMONSTER) - e3:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - tc:RegisterEffect(e3) - end - end -end -function c9753964.spcon(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp -end -function c9753964.spfilter(c,e,tp) - return c:IsType(TYPE_TUNER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c9753964.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c9753964.spfilter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c9753964.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c9753964.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,g:GetCount(),0,0) -end -function c9753964.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENCE) - end -end diff --git a/script/c97567736.lua b/script/c97567736.lua deleted file mode 100644 index 743ff295a1..0000000000 --- a/script/c97567736.lua +++ /dev/null @@ -1,80 +0,0 @@ ---エッジインプ・トマホーク -function c97567736.initial_effect(c) - --damage - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(97567736,0)) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1,97567736) - e1:SetCost(c97567736.damcost) - e1:SetTarget(c97567736.damtg) - e1:SetOperation(c97567736.damop) - c:RegisterEffect(e1) - --change name - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(97567736,1)) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,97567737) - e2:SetCost(c97567736.tgcost) - e2:SetOperation(c97567736.tgop) - c:RegisterEffect(e2) -end -function c97567736.cfilter(c) - return c:IsSetCard(0xc3) and c:IsAbleToGraveAsCost() -end -function c97567736.damcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c97567736.cfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,c97567736.cfilter,1,1,REASON_COST) -end -function c97567736.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(800) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,800) -end -function c97567736.damop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end -function c97567736.tgfilter(c) - return c:IsSetCard(0xc3) and not c:IsCode(97567736) and c:IsAbleToGraveAsCost() -end -function c97567736.tgcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c97567736.tgfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c97567736.tgfilter,tp,LOCATION_DECK,0,1,1,nil) - Duel.SendtoGrave(g,REASON_COST) - e:SetLabel(g:GetFirst():GetCode()) -end -function c97567736.tgop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) or c:IsFacedown() then return end - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CHANGE_CODE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e1:SetValue(e:GetLabel()) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(97567736,2)) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_PHASE+PHASE_END) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e2:SetCountLimit(1) - e2:SetRange(LOCATION_MZONE) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e2:SetLabelObject(e1) - e2:SetOperation(c97567736.rstop) - c:RegisterEffect(e2) -end -function c97567736.rstop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local e1=e:GetLabelObject() - e1:Reset() - Duel.HintSelection(Group.FromCards(c)) - Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) -end diff --git a/script/c97570038.lua b/script/c97570038.lua deleted file mode 100644 index b3d4a03497..0000000000 --- a/script/c97570038.lua +++ /dev/null @@ -1,41 +0,0 @@ ---ゴッドハンド・スマッシュ -function c97570038.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c97570038.condition) - e1:SetOperation(c97570038.operation) - c:RegisterEffect(e1) -end -function c97570038.filter(c) - local code=c:GetCode() - return c:IsFaceup() and (code==8508055 or code==3810071 or code==49814180) -end -function c97570038.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c97570038.filter,tp,LOCATION_MZONE,0,1,nil) -end -function c97570038.operation(e,tp,eg,ep,ev,re,r,rp) - --destroy - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_DAMAGE_STEP_END) - e1:SetOperation(c97570038.desop) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function c97570038.cfilter(c) - local code=c:GetCode() - return code==8508055 or code==3810071 or code==49814180 -end -function c97570038.desop(e,tp,eg,ep,ev,re,r,rp) - local a=Duel.GetAttacker() - local at=Duel.GetAttackTarget() - if not at then return end - local g=Group.CreateGroup() - if c97570038.cfilter(a) and at:IsLocation(LOCATION_MZONE) then g:AddCard(at) end - if c97570038.cfilter(at) and a:IsLocation(LOCATION_MZONE) then g:AddCard(a) end - if g:GetCount()>0 then - Duel.Destroy(g,REASON_EFFECT) - end -end diff --git a/script/c97574404.lua b/script/c97574404.lua deleted file mode 100644 index 03a5a6fa3a..0000000000 --- a/script/c97574404.lua +++ /dev/null @@ -1,68 +0,0 @@ ---アルカナフォースVI-THE LOVERS -function c97574404.initial_effect(c) - --coin - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(97574404,0)) - e1:SetCategory(CATEGORY_COIN) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c97574404.cointg) - e1:SetOperation(c97574404.coinop) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e2) - local e3=e1:Clone() - e3:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - c:RegisterEffect(e3) -end -function c97574404.cointg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_COIN,nil,0,tp,1) -end -function c97574404.coinop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) or c:IsFacedown() then return end - local res=0 - if c:IsHasEffect(73206827) then - res=1-Duel.SelectOption(tp,60,61) - else res=Duel.TossCoin(tp,1) end - c97574404.arcanareg(c,res) -end -function c97574404.arcanareg(c,coin) - --coin effect - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DOUBLE_TRIBUTE) - e1:SetCondition(c97574404.dtcon) - e1:SetValue(c97574404.dtval) - e1:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e1) - -- - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EFFECT_CANNOT_SUMMON) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetTargetRange(1,1) - e2:SetCondition(c97574404.sumcon) - e2:SetTarget(c97574404.sumtg) - e2:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EFFECT_CANNOT_MSET) - c:RegisterEffect(e3) - c:RegisterFlagEffect(36690018,RESET_EVENT+0x1ff0000,EFFECT_FLAG_CLIENT_HINT,1,coin,63-coin) -end -function c97574404.dtcon(e) - return e:GetHandler():GetFlagEffectLabel(36690018)==1 -end -function c97574404.dtval(e,c) - return c:IsSetCard(0x5) -end -function c97574404.sumcon(e) - return e:GetHandler():GetFlagEffectLabel(36690018)==0 -end -function c97574404.sumtg(e,c,tp,sumtp) - return bit.band(sumtp,SUMMON_TYPE_ADVANCE)==SUMMON_TYPE_ADVANCE and c:IsSetCard(0x5) -end diff --git a/script/c97584500.lua b/script/c97584500.lua deleted file mode 100644 index f2a7ce9a76..0000000000 --- a/script/c97584500.lua +++ /dev/null @@ -1,56 +0,0 @@ ---ゴーストリック・マミー -function c97584500.initial_effect(c) - --summon limit - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_SUMMON) - e1:SetCondition(c97584500.sumcon) - c:RegisterEffect(e1) - --turn set - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(97584500,0)) - e2:SetCategory(CATEGORY_POSITION) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetTarget(c97584500.postg) - e2:SetOperation(c97584500.posop) - c:RegisterEffect(e2) - --extra summon - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetRange(LOCATION_MZONE) - e3:SetTargetRange(LOCATION_HAND+LOCATION_MZONE,0) - e3:SetCode(EFFECT_EXTRA_SUMMON_COUNT) - e3:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x8d)) - c:RegisterEffect(e3) - --sum limit - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_FIELD) - e4:SetRange(LOCATION_MZONE) - e4:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e4:SetTargetRange(1,0) - e4:SetTarget(c97584500.splimit) - c:RegisterEffect(e4) -end -function c97584500.splimit(e,c,tp,sumtp,sumpos) - return c:GetAttribute()~=ATTRIBUTE_DARK -end -function c97584500.sfilter(c) - return c:IsFaceup() and c:IsSetCard(0x8d) -end -function c97584500.sumcon(e) - return not Duel.IsExistingMatchingCard(c97584500.sfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) -end -function c97584500.postg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsCanTurnSet() and c:GetFlagEffect(97584500)==0 end - c:RegisterFlagEffect(97584500,RESET_EVENT+0x1fc0000+RESET_PHASE+PHASE_END,0,1) - Duel.SetOperationInfo(0,CATEGORY_POSITION,c,1,0,0) -end -function c97584500.posop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - Duel.ChangePosition(c,POS_FACEDOWN_DEFENCE) - end -end diff --git a/script/c97617181.lua b/script/c97617181.lua deleted file mode 100644 index 04e8c416cd..0000000000 --- a/script/c97617181.lua +++ /dev/null @@ -1,99 +0,0 @@ ---銀河零式 -function c97617181.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCountLimit(1,97617181+EFFECT_COUNT_CODE_OATH) - e1:SetTarget(c97617181.target) - e1:SetOperation(c97617181.operation) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_CANNOT_ATTACK) - c:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_EQUIP) - e3:SetCode(EFFECT_CANNOT_TRIGGER) - c:RegisterEffect(e3) - --desrep - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_EQUIP+EFFECT_TYPE_CONTINUOUS) - e4:SetCode(EFFECT_DESTROY_REPLACE) - e4:SetTarget(c97617181.desreptg) - e4:SetOperation(c97617181.desrepop) - c:RegisterEffect(e4) - --leave - local e5=Effect.CreateEffect(c) - e5:SetDescription(aux.Stringid(97617181,0)) - e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e5:SetCode(EVENT_LEAVE_FIELD) - e5:SetCondition(c97617181.atkcon) - e5:SetOperation(c97617181.atkop) - c:RegisterEffect(e5) -end -function c97617181.spfilter(c,e,tp) - return (c:IsSetCard(0x55) or c:IsSetCard(0x7b)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c97617181.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c97617181.spfilter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c97617181.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c97617181.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c97617181.eqlimit(e,c) - return e:GetLabelObject()==c -end -function c97617181.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then - if Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_ATTACK)==0 then return end - Duel.Equip(tp,c,tc) - --Add Equip limit - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(c97617181.eqlimit) - e1:SetLabelObject(tc) - c:RegisterEffect(e1) - end -end -function c97617181.atkcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=c:GetFirstCardTarget() - if tc and tc:IsLocation(LOCATION_MZONE) and tc:IsFaceup() and not c:IsLocation(LOCATION_DECK) then - e:SetLabelObject(tc) - tc:CreateEffectRelation(e) - return true - else return false end -end -function c97617181.atkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=e:GetLabelObject() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetValue(0) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - end -end -function c97617181.desreptg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - local ec=c:GetEquipTarget() - local ph=Duel.GetCurrentPhase() - if chk==0 then return (ph>PHASE_MAIN1 and ph0 and g:FilterCount(Card.IsAbleToGraveAsCost,nil)==g:GetCount() end - Duel.SendtoGrave(g,REASON_COST) -end -function c97697447.filter(c,tp) - return (c:IsFacedown() or c:IsControler(1-tp) or c:GetCode()~=22702055) and c:IsType(TYPE_SPELL+TYPE_TRAP) -end -function c97697447.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - if e:GetLabel()==0 then - return Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler(),TYPE_SPELL+TYPE_TRAP) - end - e:SetLabel(0) - return Duel.IsExistingMatchingCard(c97697447.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler(),tp) - end - e:SetLabel(0) - local g=Duel.GetMatchingGroup(Card.IsType,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler(),TYPE_SPELL+TYPE_TRAP) - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,g:GetCount(),0,0) -end -function c97697447.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsType,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler(),TYPE_SPELL+TYPE_TRAP) - Duel.SendtoGrave(g,REASON_EFFECT) -end diff --git a/script/c97697678.lua b/script/c97697678.lua deleted file mode 100644 index 263131d1d0..0000000000 --- a/script/c97697678.lua +++ /dev/null @@ -1,47 +0,0 @@ ---円盤ムスキー -function c97697678.initial_effect(c) - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(97697678,0)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_PREDRAW) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c97697678.condition) - e1:SetTarget(c97697678.target) - e1:SetOperation(c97697678.operation) - c:RegisterEffect(e1) -end -function c97697678.condition(e,tp,eg,ep,ev,re,r,rp) - return tp==Duel.GetTurnPlayer() and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0 - and Duel.GetDrawCount(tp)>0 -end -function c97697678.filter(c) - return c:IsSetCard(0xc) and c:IsAbleToHand() -end -function c97697678.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c97697678.filter,tp,LOCATION_DECK,0,1,nil) end - local dt=Duel.GetDrawCount(tp) - if dt~=0 then - _replace_count=0 - _replace_max=dt - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EFFECT_DRAW_COUNT) - e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_DRAW) - e1:SetValue(0) - Duel.RegisterEffect(e1,tp) - end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c97697678.operation(e,tp,eg,ep,ev,re,r,rp) - _replace_count=_replace_count+1 - if _replace_count>_replace_max or not e:GetHandler():IsRelateToEffect(e) or e:GetHandler():IsFacedown()then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c97697678.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end \ No newline at end of file diff --git a/script/c97705809.lua b/script/c97705809.lua deleted file mode 100644 index 8cf00ba850..0000000000 --- a/script/c97705809.lua +++ /dev/null @@ -1,30 +0,0 @@ ---スーパーチャージ -function c97705809.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetCondition(c97705809.condition) - e1:SetTarget(c97705809.target) - e1:SetOperation(c97705809.activate) - c:RegisterEffect(e1) -end -function c97705809.cfilter(c) - return c:IsFacedown() or not c:IsSetCard(0x16) or not c:IsRace(RACE_MACHINE) -end -function c97705809.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp and Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)~=0 - and not Duel.IsExistingMatchingCard(c97705809.cfilter,tp,LOCATION_MZONE,0,1,nil) -end -function c97705809.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp,2) end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(2) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2) -end -function c97705809.activate(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end diff --git a/script/c97738431.lua b/script/c97738431.lua deleted file mode 100644 index e4171e6d56..0000000000 --- a/script/c97738431.lua +++ /dev/null @@ -1,32 +0,0 @@ ---ナンバーズ・オーバーレイ・ブースト -function c97738431.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c97738431.target) - e1:SetOperation(c97738431.activate) - c:RegisterEffect(e1) -end -function c97738431.filter(c) - return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:IsSetCard(0x48) and c:GetOverlayCount()==0 -end -function c97738431.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c97738431.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c97738431.filter,tp,LOCATION_MZONE,0,1,nil) - and Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_HAND,0,2,nil,TYPE_MONSTER) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - Duel.SelectTarget(tp,c97738431.filter,tp,LOCATION_MZONE,0,1,1,nil) -end -function c97738431.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() and not tc:IsImmuneToEffect(e) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL) - local g=Duel.GetMatchingGroup(Card.IsType,tp,LOCATION_HAND,0,nil,TYPE_MONSTER) - if g:GetCount()>=2 then - local og=g:Select(tp,2,2,nil) - Duel.Overlay(tc,og) - end - end -end diff --git a/script/c97750534.lua b/script/c97750534.lua deleted file mode 100644 index 551611115b..0000000000 --- a/script/c97750534.lua +++ /dev/null @@ -1,47 +0,0 @@ ---死の代行者 ウラヌス -function c97750534.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c97750534.spcon) - c:RegisterEffect(e1) - --tograve - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(97750534,0)) - e2:SetCategory(CATEGORY_TOGRAVE) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetTarget(c97750534.tgtg) - e2:SetOperation(c97750534.tgop) - c:RegisterEffect(e2) -end -function c97750534.spcon(e,c) - if c==nil then return Duel.IsEnvironment(56433456) end - return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 -end -function c97750534.filter(c) - return c:IsSetCard(0x44) and c:IsAbleToGrave() -end -function c97750534.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c97750534.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) -end -function c97750534.tgop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c97750534.filter,tp,LOCATION_DECK,0,1,1,nil) - local tc=g:GetFirst() - if tc and Duel.SendtoGrave(tc,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_GRAVE) then - local lv=tc:GetLevel() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CHANGE_LEVEL) - e1:SetValue(lv) - e1:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e1) - end -end diff --git a/script/c97783659.lua b/script/c97783659.lua deleted file mode 100644 index c820635012..0000000000 --- a/script/c97783659.lua +++ /dev/null @@ -1,23 +0,0 @@ ---ブラッド・サッカー -function c97783659.initial_effect(c) - --handes - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(97783659,0)) - e1:SetCategory(CATEGORY_DECKDES) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_BATTLE_DAMAGE) - e1:SetCondition(c97783659.ddcon) - e1:SetTarget(c97783659.ddtg) - e1:SetOperation(c97783659.ddop) - c:RegisterEffect(e1) -end -function c97783659.ddcon(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp -end -function c97783659.ddtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DECKDES,0,0,1-tp,1) -end -function c97783659.ddop(e,tp,eg,ep,ev,re,r,rp) - Duel.DiscardDeck(1-tp,1,REASON_EFFECT) -end diff --git a/script/c97792247.lua b/script/c97792247.lua deleted file mode 100644 index c20756b4cf..0000000000 --- a/script/c97792247.lua +++ /dev/null @@ -1,44 +0,0 @@ ---スターダスト・アサルト・ウォリアー -function c97792247.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1) - c:EnableReviveLimit() - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(97792247,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCountLimit(1,97792247) - e1:SetCondition(c97792247.spcon) - e1:SetTarget(c97792247.sptg) - e1:SetOperation(c97792247.spop) - c:RegisterEffect(e1) - --pierce - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_PIERCE) - c:RegisterEffect(e2) -end -function c97792247.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_SYNCHRO - and not Duel.IsExistingMatchingCard(nil,tp,LOCATION_MZONE,0,1,e:GetHandler()) -end -function c97792247.spfilter(c,e,tp) - return c:IsSetCard(0x43) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c97792247.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c97792247.spfilter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c97792247.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c97792247.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c97792247.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c9780364.lua b/script/c9780364.lua deleted file mode 100644 index 412c6c576d..0000000000 --- a/script/c9780364.lua +++ /dev/null @@ -1,60 +0,0 @@ ---剣闘調教 -function c9780364.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_POSITION) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c9780364.condition) - e1:SetTarget(c9780364.target) - e1:SetOperation(c9780364.activate) - c:RegisterEffect(e1) -end -function c9780364.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x19) -end -function c9780364.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c9780364.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) -end -function c9780364.filter(c,e) - return c:IsFaceup() and c:IsCanBeEffectTarget(e) -end -function c9780364.filter2(c) - return c:IsFaceup() and c:IsSetCard(0x19) and c:IsAbleToChangeControler() -end -function c9780364.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end - local g=Duel.GetMatchingGroup(c9780364.filter,tp,0,LOCATION_MZONE,nil,e) - local cg=g:Filter(c9780364.filter2,nil) - local sel=0 - Duel.Hint(HINT_SELECTMSG,tp,550) - if cg:GetCount()==0 then - sel=Duel.SelectOption(tp,aux.Stringid(9780364,0)) - else sel=Duel.SelectOption(tp,aux.Stringid(9780364,0),aux.Stringid(9780364,1)) end - if sel==0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE) - local sg=g:Select(tp,1,1,nil) - Duel.SetTargetCard(sg) - Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0) - else - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) - local sg=cg:Select(tp,1,1,nil) - Duel.SetTargetCard(sg) - Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0) - end - e:SetLabel(sel) -end -function c9780364.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) and tc:IsFaceup() then - if e:GetLabel()==0 then - Duel.ChangePosition(tc,POS_FACEUP_DEFENCE,0,POS_FACEUP_ATTACK,0) - else - if not Duel.GetControl(tc,tp,PHASE_END,1) and not tc:IsImmuneToEffect(e) and tc:IsAbleToChangeControler() then - Duel.Destroy(tc,REASON_EFFECT) - end - end - end -end diff --git a/script/c97806240.lua b/script/c97806240.lua deleted file mode 100644 index 24c555dcb6..0000000000 --- a/script/c97806240.lua +++ /dev/null @@ -1,27 +0,0 @@ ---強引な安全協定 -function c97806240.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c97806240.cost) - e1:SetOperation(c97806240.activate) - c:RegisterEffect(e1) -end -function c97806240.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) -end -function c97806240.activate(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EFFECT_CANNOT_ACTIVATE) - e1:SetTargetRange(1,1) - e1:SetValue(c97806240.aclimit) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function c97806240.aclimit(e,re,tp) - return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_TRAP) -end diff --git a/script/c97809599.lua b/script/c97809599.lua deleted file mode 100644 index d7196225e0..0000000000 --- a/script/c97809599.lua +++ /dev/null @@ -1,24 +0,0 @@ ---旧神の印 -function c97809599.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c97809599.cost) - e1:SetTarget(c97809599.target) - e1:SetOperation(c97809599.activate) - c:RegisterEffect(e1) -end -function c97809599.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,1000) end - Duel.PayLPCost(tp,1000) -end -function c97809599.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFacedown,tp,0,LOCATION_ONFIELD,1,nil) end -end -function c97809599.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsFacedown,tp,0,LOCATION_ONFIELD,nil) - if g:GetCount()>0 then - Duel.ConfirmCards(tp,g) - end -end diff --git a/script/c97811903.lua b/script/c97811903.lua deleted file mode 100644 index 0d4c3e206e..0000000000 --- a/script/c97811903.lua +++ /dev/null @@ -1,46 +0,0 @@ ---クリアー・バイス・ドラゴン -function c97811903.initial_effect(c) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_DAMAGE_CALCULATING) - e1:SetCondition(c97811903.condtion) - e1:SetOperation(c97811903.atkop) - c:RegisterEffect(e1) - -- - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EFFECT_DESTROY_REPLACE) - e2:SetTarget(c97811903.reptg) - c:RegisterEffect(e2) - -- - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e3:SetRange(LOCATION_MZONE) - e3:SetTargetRange(1,0) - e3:SetCode(97811903) - c:RegisterEffect(e3) -end -function c97811903.condtion(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler()==Duel.GetAttacker() and Duel.GetAttackTarget()~=nil -end -function c97811903.atkop(e,tp,eg,ep,ev,re,r,rp) - local bc=Duel.GetAttackTarget() - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK) - e1:SetReset(RESET_PHASE+RESET_DAMAGE_CAL) - e1:SetValue(bc:GetAttack()*2) - e:GetHandler():RegisterEffect(e1) -end -function c97811903.reptg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return not c:IsReason(REASON_REPLACE) and c:IsReason(REASON_EFFECT) and c:GetReasonPlayer()~=tp - and Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)>0 end - if Duel.SelectYesNo(tp,aux.Stringid(97811903,0)) then - Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT+REASON_DISCARD) - return true - else return false end -end diff --git a/script/c97836203.lua b/script/c97836203.lua deleted file mode 100644 index 479329c8e7..0000000000 --- a/script/c97836203.lua +++ /dev/null @@ -1,78 +0,0 @@ ---TG ハルバード・キャノン -function c97836203.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsType,TYPE_SYNCHRO),aux.NonTuner(Card.IsType,TYPE_SYNCHRO),2) - c:EnableReviveLimit() - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(aux.synlimit) - c:RegisterEffect(e1) - --Negate summon - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_DISABLE_SUMMON+CATEGORY_DESTROY) - e2:SetDescription(aux.Stringid(97836203,0)) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EVENT_SUMMON) - e2:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE) - e2:SetCondition(c97836203.discon) - e2:SetTarget(c97836203.distg) - e2:SetOperation(c97836203.disop) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetDescription(aux.Stringid(97836203,1)) - e3:SetCode(EVENT_FLIP_SUMMON) - c:RegisterEffect(e3) - local e4=e2:Clone() - e4:SetDescription(aux.Stringid(97836203,2)) - e4:SetCode(EVENT_SPSUMMON) - c:RegisterEffect(e4) - --Special Summon - local e5=Effect.CreateEffect(c) - e5:SetDescription(aux.Stringid(97836203,3)) - e5:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE) - e5:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e5:SetCategory(CATEGORY_SPECIAL_SUMMON) - e5:SetCode(EVENT_TO_GRAVE) - e5:SetCondition(c97836203.spcon) - e5:SetTarget(c97836203.sptg) - e5:SetOperation(c97836203.spop) - c:RegisterEffect(e5) -end -function c97836203.discon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentChain()==0 -end -function c97836203.distg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DISABLE_SUMMON,eg,eg:GetCount(),0,0) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,eg:GetCount(),0,0) -end -function c97836203.disop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFacedown() or not c:IsRelateToEffect(e) then return end - Duel.NegateSummon(eg) - Duel.Destroy(eg,REASON_EFFECT) -end -function c97836203.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) -end -function c97836203.filter(c,e,tp) - return c:IsSetCard(0x27) and c:IsCanBeSpecialSummoned(e,0,tp,false,true) -end -function c97836203.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c97836203.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c97836203.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c97836203.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c97836203.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,true,POS_FACEUP) - end -end diff --git a/script/c9786492.lua b/script/c9786492.lua deleted file mode 100644 index 05270a1781..0000000000 --- a/script/c9786492.lua +++ /dev/null @@ -1,4 +0,0 @@ ---白竜降臨 -function c9786492.initial_effect(c) - aux.AddRitualProcGreater(c,aux.FilterBoolFunction(Card.IsCode,73398797)) -end diff --git a/script/c97885363.lua b/script/c97885363.lua deleted file mode 100644 index 843c795114..0000000000 --- a/script/c97885363.lua +++ /dev/null @@ -1,33 +0,0 @@ ---エレキトンボ -function c97885363.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(97885363,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_DESTROYED) - e1:SetCondition(c97885363.condition) - e1:SetTarget(c97885363.target) - e1:SetOperation(c97885363.operation) - c:RegisterEffect(e1) -end -function c97885363.condition(e,tp,eg,ep,ev,re,r,rp) - return rp~=tp and e:GetHandler():GetPreviousControler()==tp -end -function c97885363.filter(c,e,tp) - return c:IsSetCard(0xe) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c97885363.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c97885363.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c97885363.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c97885363.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c97896503.lua b/script/c97896503.lua deleted file mode 100644 index 9b35c9a350..0000000000 --- a/script/c97896503.lua +++ /dev/null @@ -1,24 +0,0 @@ ---ズババナイト -function c97896503.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(97896503,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_BATTLE_START) - e1:SetTarget(c97896503.tg) - e1:SetOperation(c97896503.op) - c:RegisterEffect(e1) -end -function c97896503.tg(e,tp,eg,ep,ev,re,r,rp,chk) - local d=Duel.GetAttackTarget() - if chk ==0 then return Duel.GetAttacker()==e:GetHandler() - and d~=nil and d:IsPosition(POS_FACEUP_DEFENCE) and d:IsDestructable() end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,d,1,0,0) -end -function c97896503.op(e,tp,eg,ep,ev,re,r,rp) - local d=Duel.GetAttackTarget() - if d~=nil and d:IsRelateToBattle() and d:IsDefencePos() then - Duel.Destroy(d,REASON_EFFECT) - end -end diff --git a/script/c97904474.lua b/script/c97904474.lua deleted file mode 100644 index a39ff0fdcd..0000000000 --- a/script/c97904474.lua +++ /dev/null @@ -1,71 +0,0 @@ ---手錠龍 -function c97904474.initial_effect(c) - --equip - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(97904474,0)) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetCondition(c97904474.eqcon) - e1:SetTarget(c97904474.eqtg) - e1:SetOperation(c97904474.eqop) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(97904474,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetCondition(c97904474.spcon) - e2:SetTarget(c97904474.sptg) - e2:SetOperation(c97904474.spop) - c:RegisterEffect(e2) -end -function c97904474.eqcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local bc=c:GetBattleTarget() - return c:IsLocation(LOCATION_GRAVE) and c:IsReason(REASON_BATTLE) and c:GetPreviousControler()==tp - and c==Duel.GetAttackTarget() and bc:IsFaceup() and bc:IsControler(1-tp) and bc:IsRelateToBattle() -end -function c97904474.eqtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 end -end -function c97904474.eqlimit(e,c) - return e:GetOwner()==c -end -function c97904474.eqop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end - local tc=c:GetBattleTarget() - if c:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsRelateToBattle() then - Duel.Equip(tp,c,tc,true) - --Add Equip limit - local e1=Effect.CreateEffect(tc) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(c97904474.eqlimit) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(-1800) - e2:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e2) - end -end -function c97904474.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsReason(REASON_LOST_TARGET) and e:GetHandler():GetPreviousEquipTarget():IsReason(REASON_DESTROY) -end -function c97904474.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c97904474.spop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c9791914.lua b/script/c9791914.lua deleted file mode 100644 index fdfdaae1be..0000000000 --- a/script/c9791914.lua +++ /dev/null @@ -1,49 +0,0 @@ ---白銀のスナイパー -function c9791914.initial_effect(c) - --Negate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_MONSTER_SSET) - e1:SetValue(TYPE_SPELL) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetOperation(c9791914.regop) - c:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(9791914,0)) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DESTROY) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetCode(EVENT_PHASE+PHASE_END) - e3:SetRange(LOCATION_GRAVE) - e3:SetCountLimit(1) - e3:SetTarget(c9791914.sptg) - e3:SetOperation(c9791914.spop) - c:RegisterEffect(e3) -end -function c9791914.regop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsPreviousLocation(LOCATION_SZONE) and c:IsPreviousPosition(POS_FACEDOWN) - and c:IsReason(REASON_EFFECT) and c:IsReason(REASON_DESTROY) and rp~=tp then - c:RegisterFlagEffect(9791914,RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END,0,0) - end -end -function c9791914.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and chkc:IsDestructable() end - if chk==0 then return e:GetHandler():GetFlagEffect(9791914)>0 end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,0,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c9791914.spop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) and Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP)~=0 then - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end - end -end diff --git a/script/c97922283.lua b/script/c97922283.lua deleted file mode 100644 index f9c3ef34ed..0000000000 --- a/script/c97922283.lua +++ /dev/null @@ -1,40 +0,0 @@ ---野生の咆哮 -function c97922283.initial_effect(c) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --no damage & spsummon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(97922283,0)) - e2:SetCategory(CATEGORY_DAMAGE) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_BATTLE_DESTROYING) - e2:SetRange(LOCATION_SZONE) - e2:SetCondition(c97922283.condition) - e2:SetTarget(c97922283.target) - e2:SetOperation(c97922283.operation) - c:RegisterEffect(e2) -end -function c97922283.condition(e,tp,eg,ep,ev,re,r,rp) - local tc=eg:GetFirst() - local bc=tc:GetBattleTarget() - return tc:IsRelateToBattle() and tc:IsControler(tp) - and bc:IsLocation(LOCATION_GRAVE) and bc:IsReason(REASON_BATTLE) and bc:IsType(TYPE_MONSTER) -end -function c97922283.filter(c) - return c:IsFaceup() and c:IsRace(RACE_BEAST) -end -function c97922283.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - local dam=Duel.GetMatchingGroupCount(c97922283.filter,tp,LOCATION_MZONE,0,nil)*300 - Duel.SetTargetParam(dam) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,dam) -end -function c97922283.operation(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) - local dam=Duel.GetMatchingGroupCount(c97922283.filter,tp,LOCATION_MZONE,0,nil)*300 - Duel.Damage(p,dam,REASON_EFFECT) -end diff --git a/script/c97940434.lua b/script/c97940434.lua deleted file mode 100644 index fa28acddd1..0000000000 --- a/script/c97940434.lua +++ /dev/null @@ -1,51 +0,0 @@ ---カオスハンター -function c97940434.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(97940434,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetRange(LOCATION_HAND) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(c97940434.spcon) - e1:SetCost(c97940434.spcost) - e1:SetTarget(c97940434.sptg) - e1:SetOperation(c97940434.spop) - c:RegisterEffect(e1) - --cannot remove - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_CANNOT_REMOVE) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetRange(LOCATION_MZONE) - e2:SetTargetRange(0,1) - c:RegisterEffect(e2) - --30459350 chk - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetCode(30459350) - e3:SetRange(LOCATION_MZONE) - e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e3:SetTargetRange(0,1) - c:RegisterEffect(e3) -end -function c97940434.spfilter(c,sp) - return c:GetSummonPlayer()==sp -end -function c97940434.spcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c97940434.spfilter,1,nil,1-tp) -end -function c97940434.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD,e:GetHandler()) -end -function c97940434.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c97940434.spop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c97970833.lua b/script/c97970833.lua deleted file mode 100644 index 7c9709541e..0000000000 --- a/script/c97970833.lua +++ /dev/null @@ -1,36 +0,0 @@ ---ラスト・リゾート -function c97970833.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetCondition(c97970833.condition) - e1:SetTarget(c97970833.target) - e1:SetOperation(c97970833.activate) - c:RegisterEffect(e1) -end -function c97970833.condition(e,tp,eg,ep,ev,re,r,rp) - return tp~=Duel.GetTurnPlayer() -end -function c97970833.filter(c,tp) - return c:IsCode(34487429) and c:GetActivateEffect():IsActivatable(tp) -end -function c97970833.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c97970833.filter,tp,LOCATION_DECK,0,1,nil,tp) end -end -function c97970833.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstMatchingCard(c97970833.filter,tp,LOCATION_DECK,0,nil,tp) - if tc then - local fc=Duel.GetFieldCard(tp,LOCATION_SZONE,5) - if fc then - Duel.SendtoGrave(fc,REASON_RULE) - Duel.BreakEffect() - end - Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) - fc=Duel.GetFieldCard(1-tp,LOCATION_SZONE,5) - if fc and fc:IsFaceup() and Duel.IsPlayerCanDraw(1-tp,1) and Duel.SelectYesNo(tp,aux.Stringid(97970833,0)) then - Duel.Draw(1-tp,1,REASON_EFFECT) - end - Duel.RaiseEvent(tc,EVENT_CHAIN_SOLVED,tc:GetActivateEffect(),0,tp,tp,Duel.GetCurrentChain()) - end -end diff --git a/script/c97997309.lua b/script/c97997309.lua deleted file mode 100644 index c8d7d6d871..0000000000 --- a/script/c97997309.lua +++ /dev/null @@ -1,114 +0,0 @@ ---ゲーテの魔導書 -function c97997309.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(97997309,0)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_END_PHASE) - e1:SetCountLimit(1,97997309+EFFECT_COUNT_CODE_OATH) - e1:SetCondition(c97997309.condition) - e1:SetCost(c97997309.cost) - e1:SetTarget(c97997309.target1) - e1:SetOperation(c97997309.activate1) - e1:SetLabel(1) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(97997309,1)) - e2:SetCategory(CATEGORY_POSITION) - e2:SetType(EFFECT_TYPE_ACTIVATE) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetHintTiming(0,0x1c0+TIMING_BATTLE_PHASE) - e2:SetCountLimit(1,97997309+EFFECT_COUNT_CODE_OATH) - e2:SetCondition(c97997309.condition) - e2:SetCost(c97997309.cost) - e2:SetTarget(c97997309.target2) - e2:SetOperation(c97997309.activate2) - e2:SetLabel(2) - c:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(97997309,2)) - e3:SetCategory(CATEGORY_REMOVE) - e3:SetType(EFFECT_TYPE_ACTIVATE) - e3:SetCode(EVENT_FREE_CHAIN) - e3:SetHintTiming(0,0x1e0) - e3:SetCountLimit(1,97997309+EFFECT_COUNT_CODE_OATH) - e3:SetCondition(c97997309.condition) - e3:SetCost(c97997309.cost) - e3:SetTarget(c97997309.target3) - e3:SetOperation(c97997309.activate3) - e3:SetLabel(3) - c:RegisterEffect(e3) -end -function c97997309.cfilter(c) - return c:IsFaceup() and c:IsRace(RACE_SPELLCASTER) -end -function c97997309.rfilter(c) - return c:IsSetCard(0x106e) and c:IsType(TYPE_SPELL) and c:IsAbleToRemoveAsCost() -end -function c97997309.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c97997309.cfilter,tp,LOCATION_MZONE,0,1,nil) -end -function c97997309.cost(e,tp,eg,ep,ev,re,r,rp,chk) - local ct=e:GetLabel() - if chk==0 then return Duel.IsExistingMatchingCard(c97997309.rfilter,tp,LOCATION_GRAVE,0,ct,nil) end - Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c97997309.rfilter,tp,LOCATION_GRAVE,0,ct,ct,nil) - Duel.Remove(g,POS_FACEUP,REASON_EFFECT) -end -function c97997309.filter1(c) - return c:IsFacedown() and c:IsAbleToHand() -end -function c97997309.target1(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c97997309.filter1,tp,LOCATION_SZONE,LOCATION_SZONE,1,e:GetHandler()) end - local g=Duel.GetMatchingGroup(c97997309.filter1,tp,LOCATION_SZONE,LOCATION_SZONE,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c97997309.activate1(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g=Duel.SelectMatchingCard(tp,c97997309.filter1,tp,LOCATION_SZONE,LOCATION_SZONE,1,1,e:GetHandler()) - if g:GetCount()>0 then - Duel.HintSelection(g) - Duel.SendtoHand(g,nil,REASON_EFFECT) - end -end -function c97997309.filter2(c) - return not c:IsPosition(POS_FACEUP_ATTACK) or c:IsCanTurnSet() -end -function c97997309.target2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c97997309.filter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - local g=Duel.GetMatchingGroup(c97997309.filter2,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0) -end -function c97997309.activate2(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE) - local g=Duel.SelectMatchingCard(tp,c97997309.filter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - local tc=g:GetFirst() - if tc then - Duel.HintSelection(g) - if tc:IsPosition(POS_FACEUP_ATTACK) then - Duel.ChangePosition(tc,POS_FACEDOWN_DEFENCE) - else - local pos=Duel.SelectPosition(tp,tc,POS_FACEUP_ATTACK+POS_FACEDOWN_DEFENCE) - Duel.ChangePosition(tc,pos) - end - end -end -function c97997309.filter3(c) - return c:IsAbleToRemove() -end -function c97997309.target3(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c97997309.filter3,tp,0,LOCATION_ONFIELD,1,nil) end - local g=Duel.GetMatchingGroup(c97997309.filter3,tp,0,LOCATION_ONFIELD,nil) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) -end -function c97997309.activate3(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c97997309.filter3,tp,0,LOCATION_ONFIELD,1,1,nil) - if g:GetCount()>0 then - Duel.HintSelection(g) - Duel.Remove(g,POS_FACEUP,REASON_EFFECT) - end -end diff --git a/script/c98012938.lua b/script/c98012938.lua deleted file mode 100644 index 4554894161..0000000000 --- a/script/c98012938.lua +++ /dev/null @@ -1,67 +0,0 @@ ---獣神ヴァルカン -function c98012938.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1) - c:EnableReviveLimit() - --return - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(98012938,0)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCountLimit(1,98012938) - e1:SetCondition(c98012938.condition) - e1:SetTarget(c98012938.target) - e1:SetOperation(c98012938.operation) - c:RegisterEffect(e1) -end -function c98012938.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_SYNCHRO -end -function c98012938.filter(c) - return c:IsFaceup() and c:IsAbleToHand() -end -function c98012938.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - if chk==0 then return true end - if Duel.IsExistingTarget(c98012938.filter,tp,LOCATION_ONFIELD,0,1,nil) - and Duel.IsExistingTarget(c98012938.filter,tp,0,LOCATION_ONFIELD,1,nil) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g1=Duel.SelectTarget(tp,c98012938.filter,tp,LOCATION_ONFIELD,0,1,1,nil) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g2=Duel.SelectTarget(tp,c98012938.filter,tp,0,LOCATION_ONFIELD,1,1,nil) - g1:Merge(g2) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g1,2,0,0) - end -end -function c98012938.hfilter(c,e) - return c:IsRelateToEffect(e) and c:IsFaceup() -end -function c98012938.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - if not g then return end - g=g:Filter(c98012938.hfilter,nil,e) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - local tc=g:GetFirst() - while tc do - if tc:IsLocation(LOCATION_HAND) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EFFECT_CANNOT_ACTIVATE) - e1:SetTargetRange(1,0) - e1:SetValue(c98012938.aclimit) - e1:SetLabel(tc:GetCode()) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) - end - tc=g:GetNext() - end - end -end -function c98012938.aclimit(e,re,tp) - return re:GetHandler():IsCode(e:GetLabel()) -end diff --git a/script/c98024118.lua b/script/c98024118.lua deleted file mode 100644 index 32d69b1fc8..0000000000 --- a/script/c98024118.lua +++ /dev/null @@ -1,45 +0,0 @@ ---ホワイトポータン -function c98024118.initial_effect(c) - --lp damage - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e1:SetCondition(c98024118.indcon) - e1:SetValue(1) - c:RegisterEffect(e1) - --lp damage - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(98024118,0)) - e2:SetCategory(CATEGORY_DAMAGE) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_BATTLE_DESTROYED) - e2:SetRange(LOCATION_MZONE) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetCondition(c98024118.damcon) - e2:SetTarget(c98024118.damtg) - e2:SetOperation(c98024118.damop) - c:RegisterEffect(e2) -end -function c98024118.indfilter(c) - return c:IsFaceup() and c:IsType(TYPE_TUNER) -end -function c98024118.indcon(e) - return Duel.IsExistingMatchingCard(c98024118.indfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) -end -function c98024118.filter(c,tp) - return c:IsLocation(LOCATION_GRAVE) and c:IsReason(REASON_BATTLE) and c:IsType(TYPE_TUNER) - and c:GetPreviousControler()==tp and c:IsPreviousPosition(POS_FACEUP) -end -function c98024118.damcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c98024118.filter,1,nil,tp) -end -function c98024118.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(500) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,500) -end -function c98024118.damop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c98045062.lua b/script/c98045062.lua deleted file mode 100644 index 29c9ac6d04..0000000000 --- a/script/c98045062.lua +++ /dev/null @@ -1,69 +0,0 @@ ---エネミーコントローラー -function c98045062.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_POSITION) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(TIMING_BATTLE_PHASE+TIMING_STANDBY_PHASE,TIMING_BATTLE_PHASE) - e1:SetCost(c98045062.cost) - e1:SetTarget(c98045062.target) - e1:SetOperation(c98045062.activate) - c:RegisterEffect(e1) -end -function c98045062.cost(e,tp,eg,ep,ev,re,r,rp,chk) - e:SetLabel(1) - return true -end -function c98045062.filter(c,e) - return c:IsFaceup() and c:IsCanBeEffectTarget(e) -end -function c98045062.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsFaceup() end - if chk==0 then - e:SetLabel(0) - return Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) - end - local g=Duel.GetMatchingGroup(c98045062.filter,tp,0,LOCATION_MZONE,nil,e) - local cg=nil - if e:GetLabel()==1 then cg=g:Filter(Card.IsAbleToChangeControler,nil) - else cg=g:Filter(Card.IsControlerCanBeChanged,nil) end - local sel=0 - Duel.Hint(HINT_SELECTMSG,tp,550) - if cg:GetCount()==0 then - sel=Duel.SelectOption(tp,aux.Stringid(98045062,0)) - elseif e:GetLabel()==1 and not Duel.CheckReleaseGroup(tp,nil,1,nil) then - sel=Duel.SelectOption(tp,aux.Stringid(98045062,0)) - else - sel=Duel.SelectOption(tp,aux.Stringid(98045062,0),aux.Stringid(98045062,1)) - if sel==1 and e:GetLabel()==1 then - local rg=Duel.SelectReleaseGroup(tp,nil,1,1,nil) - Duel.Release(rg,REASON_COST) - end - end - if sel==0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE) - local sg=g:Select(tp,1,1,nil) - Duel.SetTargetCard(sg) - Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0) - else - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) - local sg=cg:Select(tp,1,1,nil) - Duel.SetTargetCard(sg) - Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0) - end - e:SetLabel(sel) -end -function c98045062.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) and tc:IsFaceup() then - if e:GetLabel()==0 then - Duel.ChangePosition(tc,POS_FACEUP_DEFENCE,0,POS_FACEUP_ATTACK,0) - else - if not Duel.GetControl(tc,tp,PHASE_END,1) and not tc:IsImmuneToEffect(e) and tc:IsAbleToChangeControler() then - Duel.Destroy(tc,REASON_EFFECT) - end - end - end -end diff --git a/script/c98049038.lua b/script/c98049038.lua deleted file mode 100644 index 7125942717..0000000000 --- a/script/c98049038.lua +++ /dev/null @@ -1,40 +0,0 @@ ---ステルスロイド -function c98049038.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(98049038,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_PHASE+PHASE_BATTLE) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCondition(c98049038.descon) - e1:SetTarget(c98049038.destg) - e1:SetOperation(c98049038.desop) - c:RegisterEffect(e1) -end -function c98049038.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x16) -end -function c98049038.descon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp and e:GetHandler():GetBattledGroupCount()>0 - and Duel.IsExistingMatchingCard(c98049038.cfilter,tp,LOCATION_MZONE,0,1,e:GetHandler()) -end -function c98049038.desfilter(c) - return c:IsDestructable() and c:IsType(TYPE_SPELL+TYPE_TRAP) -end -function c98049038.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and c98049038.desfilter(chkc) end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c98049038.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c98049038.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if not Duel.IsExistingMatchingCard(c98049038.cfilter,tp,LOCATION_MZONE,0,1,e:GetHandler()) then return end - if tc and tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c98049915.lua b/script/c98049915.lua deleted file mode 100644 index a47f28daa6..0000000000 --- a/script/c98049915.lua +++ /dev/null @@ -1,8 +0,0 @@ ---魔法のランプ -function c98049915.initial_effect(c) - --direct attack - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DIRECT_ATTACK) - c:RegisterEffect(e1) -end diff --git a/script/c98069388.lua b/script/c98069388.lua deleted file mode 100644 index 36cfd9a490..0000000000 --- a/script/c98069388.lua +++ /dev/null @@ -1,36 +0,0 @@ ---昇天の角笛 -function c98069388.initial_effect(c) - --Activate(summon) - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DISABLE_SUMMON+CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_SUMMON) - e1:SetCondition(c98069388.condition) - e1:SetCost(c98069388.cost) - e1:SetTarget(c98069388.target) - e1:SetOperation(c98069388.activate) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_FLIP_SUMMON) - c:RegisterEffect(e2) - local e3=e1:Clone() - e3:SetCode(EVENT_SPSUMMON) - c:RegisterEffect(e3) -end -function c98069388.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentChain()==0 -end -function c98069388.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,aux.TRUE,1,nil) end - local g=Duel.SelectReleaseGroup(tp,aux.TRUE,1,1,nil) - Duel.Release(g,REASON_COST) -end -function c98069388.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DISABLE_SUMMON,eg,eg:GetCount(),0,0) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,eg:GetCount(),0,0) -end -function c98069388.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateSummon(eg) - Duel.Destroy(eg,REASON_EFFECT) -end diff --git a/script/c98076754.lua b/script/c98076754.lua deleted file mode 100644 index 62292168a2..0000000000 --- a/script/c98076754.lua +++ /dev/null @@ -1,88 +0,0 @@ ---セフィラの聖選士 -function c98076754.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetCondition(c98076754.condition) - c:RegisterEffect(e1) - --Atk up - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(LOCATION_MZONE,0) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetCondition(c98076754.effcon) - e2:SetValue(c98076754.atkval) - e2:SetLabel(3) - c:RegisterEffect(e2) - --indes - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - e3:SetProperty(EFFECT_FLAG_SET_AVAILABLE) - e3:SetRange(LOCATION_SZONE) - e3:SetTargetRange(LOCATION_MZONE,0) - e3:SetCondition(c98076754.effcon) - e3:SetValue(c98076754.indval) - e3:SetLabel(5) - c:RegisterEffect(e3) - --cannot be target - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_FIELD) - e4:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) - e4:SetProperty(EFFECT_FLAG_SET_AVAILABLE) - e4:SetRange(LOCATION_SZONE) - e4:SetTargetRange(LOCATION_MZONE,0) - e4:SetCondition(c98076754.effcon) - e4:SetValue(aux.tgoval) - e4:SetLabel(8) - c:RegisterEffect(e4) - --todeck - local e5=Effect.CreateEffect(c) - e5:SetCategory(CATEGORY_TODECK) - e5:SetType(EFFECT_TYPE_QUICK_O) - e5:SetCode(EVENT_FREE_CHAIN) - e5:SetRange(LOCATION_SZONE) - e5:SetCondition(c98076754.tdcon) - e5:SetCost(c98076754.tdcost) - e5:SetTarget(c98076754.tdtg) - e5:SetOperation(c98076754.tdop) - c:RegisterEffect(e5) -end -function c98076754.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end -function c98076754.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0xc4) -end -function c98076754.effcon(e) - return Duel.GetMatchingGroup(c98076754.cfilter,e:GetHandlerPlayer(),LOCATION_EXTRA,0,nil):GetClassCount(Card.GetCode)>=e:GetLabel() -end -function c98076754.atkval(e,c) - return Duel.GetMatchingGroupCount(Card.IsFaceup,0,LOCATION_EXTRA,LOCATION_EXTRA,nil)*100 -end -function c98076754.indval(e,re,rp) - return rp~=e:GetHandlerPlayer() -end -function c98076754.tdcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetMatchingGroup(c98076754.cfilter,tp,LOCATION_EXTRA,0,nil):GetClassCount(Card.GetCode)==10 -end -function c98076754.tdcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end -function c98076754.filter(c) - return c:IsAbleToDeck() and not c:IsHasEffect(EFFECT_NECRO_VALLEY) -end -function c98076754.tdtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c98076754.filter,tp,0,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE,1,nil) end - local g=Duel.GetMatchingGroup(c98076754.filter,tp,0,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE,nil) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0) -end -function c98076754.tdop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c98076754.filter,tp,0,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE,nil) - Duel.SendtoDeck(g,nil,2,REASON_EFFECT) -end diff --git a/script/c980973.lua b/script/c980973.lua deleted file mode 100644 index 6418436dd5..0000000000 --- a/script/c980973.lua +++ /dev/null @@ -1,42 +0,0 @@ ---アームド・ドラゴン LV3 -function c980973.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(980973,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) - e1:SetCondition(c980973.spcon) - e1:SetCost(c980973.spcost) - e1:SetTarget(c980973.sptg) - e1:SetOperation(c980973.spop) - c:RegisterEffect(e1) -end -c980973.lvupcount=1 -c980973.lvup={46384672} -function c980973.spcon(e,tp,eg,ep,ev,re,r,rp) - return tp==Duel.GetTurnPlayer() -end -function c980973.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end -function c980973.spfilter(c,e,tp) - return c:IsCode(46384672) and c:IsCanBeSpecialSummoned(e,0,tp,true,true) -end -function c980973.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsExistingMatchingCard(c980973.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) -end -function c980973.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c980973.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp) - local tc=g:GetFirst() - if tc then - Duel.SpecialSummon(tc,0,tp,tp,true,true,POS_FACEUP) - tc:CompleteProcedure() - end -end diff --git a/script/c98126725.lua b/script/c98126725.lua deleted file mode 100644 index e9eb0c7aa3..0000000000 --- a/script/c98126725.lua +++ /dev/null @@ -1,52 +0,0 @@ ---紫炎の参謀 -function c98126725.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(98126725,0)) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetCondition(c98126725.atcon) - e1:SetTarget(c98126725.attg) - e1:SetOperation(c98126725.atop) - c:RegisterEffect(e1) -end -function c98126725.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x3d) -end -function c98126725.atcon(e,tp,eg,ep,ev,re,r,rp,chk) - return Duel.IsExistingMatchingCard(c98126725.cfilter,tp,LOCATION_MZONE,0,1,nil) -end -function c98126725.attg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,0) - local ac=Duel.AnnounceRace(tp,1,0xffffff) - e:SetLabel(ac) -end -function c98126725.atop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFacedown() or not c:IsRelateToEffect(e) then return end - --cannot attack announce - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e1:SetTarget(c98126725.tglimit) - e1:SetLabel(e:GetLabel()) - e1:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e1) - --disable spsummon - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetTargetRange(1,1) - e2:SetTarget(c98126725.tglimit) - e2:SetLabel(e:GetLabel()) - e2:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e2) -end -function c98126725.tglimit(e,c) - return c:IsRace(e:GetLabel()) -end diff --git a/script/c98139712.lua b/script/c98139712.lua deleted file mode 100644 index 2ed28e0334..0000000000 --- a/script/c98139712.lua +++ /dev/null @@ -1,27 +0,0 @@ ---死霊の誘い -function c98139712.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --damage - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetRange(LOCATION_SZONE) - e2:SetOperation(c98139712.operation) - c:RegisterEffect(e2) -end -function c98139712.filter1(c,tp) - return c:GetOwner()==1-tp -end -function c98139712.filter2(c,tp) - return c:GetOwner()==tp -end -function c98139712.operation(e,tp,eg,ep,ev,re,r,rp) - local d1=eg:FilterCount(c98139712.filter1,nil,tp)*300 - local d2=eg:FilterCount(c98139712.filter2,nil,tp)*300 - Duel.Damage(1-tp,d1,REASON_EFFECT) - Duel.Damage(tp,d2,REASON_EFFECT) -end diff --git a/script/c98143165.lua b/script/c98143165.lua deleted file mode 100644 index b4cf3102fb..0000000000 --- a/script/c98143165.lua +++ /dev/null @@ -1,49 +0,0 @@ ---シンクロ・ヒーロー -function c98143165.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c98143165.target) - e1:SetOperation(c98143165.operation) - c:RegisterEffect(e1) - --atk&lv - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(500) - c:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_EQUIP) - e3:SetCode(EFFECT_UPDATE_LEVEL) - e3:SetValue(1) - c:RegisterEffect(e3) - --Equip limit - local e4=Effect.CreateEffect(c) - e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetCode(EFFECT_EQUIP_LIMIT) - e4:SetValue(c98143165.eqlimit) - c:RegisterEffect(e4) -end -function c98143165.eqlimit(e,c) - return c:GetLevel()>0 -end -function c98143165.filter(c) - return c:IsFaceup() and c:GetLevel()>0 -end -function c98143165.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c98143165.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c98143165.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c98143165.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c98143165.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,e:GetHandler(),tc) - end -end diff --git a/script/c98147766.lua b/script/c98147766.lua deleted file mode 100644 index eea9584a41..0000000000 --- a/script/c98147766.lua +++ /dev/null @@ -1,36 +0,0 @@ ---ジェネティック・ウーマン -function c98147766.initial_effect(c) - --salvage - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(98147766,0)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCost(c98147766.cost) - e1:SetTarget(c98147766.target) - e1:SetOperation(c98147766.operation) - c:RegisterEffect(e1) -end -function c98147766.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,1000) end - Duel.PayLPCost(tp,1000) -end -function c98147766.filter(c) - return c:IsFaceup() and c:IsRace(RACE_PSYCHO) and c:IsAbleToHand() -end -function c98147766.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_REMOVED) and c98147766.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c98147766.filter,tp,LOCATION_REMOVED,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c98147766.filter,tp,LOCATION_REMOVED,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function c98147766.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end diff --git a/script/c981540.lua b/script/c981540.lua deleted file mode 100644 index 74d2c17d05..0000000000 --- a/script/c981540.lua +++ /dev/null @@ -1,42 +0,0 @@ ---ハーフ・アンブレイク -function c981540.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c981540.target) - e1:SetOperation(c981540.activate) - c:RegisterEffect(e1) -end -function c981540.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) end - if chk==0 then return Duel.IsExistingTarget(nil,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - Duel.SelectTarget(tp,nil,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) -end -function c981540.activate(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e1:SetValue(1) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_PRE_BATTLE_DAMAGE) - e2:SetCondition(c981540.rdcon) - e2:SetOperation(c981540.rdop) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - tc:RegisterEffect(e2) - end -end -function c981540.rdcon(e,tp,eg,ep,ev,re,r,rp) - return ep==e:GetOwnerPlayer() -end -function c981540.rdop(e,tp,eg,ep,ev,re,r,rp) - Duel.ChangeBattleDamage(ep,ev/2) -end diff --git a/script/c98154550.lua b/script/c98154550.lua deleted file mode 100644 index 7882a9997f..0000000000 --- a/script/c98154550.lua +++ /dev/null @@ -1,44 +0,0 @@ ---プリミティブ・バタフライ -function c98154550.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c98154550.spcon) - c:RegisterEffect(e1) - --level - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(98154550,0)) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetTarget(c98154550.target) - e2:SetOperation(c98154550.operation) - c:RegisterEffect(e2) -end -function c98154550.spcon(e,c) - if c==nil then return true end - return Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0)==0 - and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 -end -function c98154550.filter(c) - return c:IsFaceup() and c:GetLevel()>0 and c:IsRace(RACE_INSECT) -end -function c98154550.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c98154550.filter,tp,LOCATION_MZONE,0,1,nil) end -end -function c98154550.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c98154550.filter,tp,LOCATION_MZONE,0,nil) - local tc=g:GetFirst() - while tc do - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_LEVEL) - e1:SetValue(1) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - tc=g:GetNext() - end -end diff --git a/script/c98162021.lua b/script/c98162021.lua deleted file mode 100644 index 1f486f2fd4..0000000000 --- a/script/c98162021.lua +++ /dev/null @@ -1,61 +0,0 @@ ---紫炎の荒武者 -function c98162021.initial_effect(c) - c:EnableCounterPermit(0x3003) - c:SetCounterLimit(0x3003,1) - --summon success - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(98162021,0)) - e1:SetCategory(CATEGORY_COUNTER) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c98162021.addct) - e1:SetOperation(c98162021.addc) - c:RegisterEffect(e1) - --attackup - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(c98162021.attackup) - c:RegisterEffect(e2) - --destroy - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(98162021,0)) - e3:SetCategory(CATEGORY_COUNTER) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetCountLimit(1) - e3:SetRange(LOCATION_MZONE) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetTarget(c98162021.addct2) - e3:SetOperation(c98162021.addc2) - c:RegisterEffect(e3) -end -function c98162021.addct(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,1,0,0x3003) -end -function c98162021.addc(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - e:GetHandler():AddCounter(0x3003,1) - end -end -function c98162021.attackup(e,c) - return c:GetCounter(0x3003)*300 -end -function c98162021.addct2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsCanAddCounter(0x3003,1) end - if chk==0 then return e:GetHandler():IsCanRemoveCounter(tp,0x3003,1,REASON_EFFECT) - and Duel.IsExistingTarget(Card.IsCanAddCounter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler(),0x3003,1) end - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(98162021,1)) - Duel.SelectTarget(tp,Card.IsCanAddCounter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,e:GetHandler(),0x3003,1) -end -function c98162021.addc2(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:GetCounter(0x3003)==0 then return end - c:RemoveCounter(tp,0x3003,1,REASON_EFFECT) - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - tc:AddCounter(0x3003,1) - end -end diff --git a/script/c98162242.lua b/script/c98162242.lua deleted file mode 100644 index 15f207770d..0000000000 --- a/script/c98162242.lua +++ /dev/null @@ -1,30 +0,0 @@ ---ニードルバンカー -function c98162242.initial_effect(c) - --damage - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(98162242,0)) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetCode(EVENT_BATTLE_DESTROYING) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCondition(c98162242.damcon) - e1:SetTarget(c98162242.damtg) - e1:SetOperation(c98162242.damop) - c:RegisterEffect(e1) -end -function c98162242.damcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local bc=c:GetBattleTarget() - return c:IsRelateToBattle() and bc:IsLocation(LOCATION_GRAVE) and bc:IsReason(REASON_BATTLE) and bc:IsType(TYPE_MONSTER) -end -function c98162242.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local bc=e:GetHandler():GetBattleTarget() - local dam=bc:GetLevel()*500 - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(dam) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,dam) -end -function c98162242.damop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c9817927.lua b/script/c9817927.lua deleted file mode 100644 index 46e0ab9bbd..0000000000 --- a/script/c9817927.lua +++ /dev/null @@ -1,19 +0,0 @@ ---逆ギレパンダ -function c9817927.initial_effect(c) - --atk - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(c9817927.val) - c:RegisterEffect(e1) - --pierce - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_PIERCE) - c:RegisterEffect(e2) -end -function c9817927.val(e,c) - return Duel.GetFieldGroupCount(c:GetControler(),0,LOCATION_MZONE)*500 -end diff --git a/script/c98225108.lua b/script/c98225108.lua deleted file mode 100644 index 5d4ad422fb..0000000000 --- a/script/c98225108.lua +++ /dev/null @@ -1,16 +0,0 @@ ---レオンタウロス -function c98225108.initial_effect(c) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetCondition(c98225108.condtion) - e1:SetValue(500) - c:RegisterEffect(e1) -end -function c98225108.condtion(e) - local ph=Duel.GetCurrentPhase() - local bc=e:GetHandler():GetBattleTarget() - return (ph==PHASE_DAMAGE or ph==PHASE_DAMAGE_CAL) and bc and not bc:IsType(TYPE_NORMAL) -end diff --git a/script/c98229575.lua b/script/c98229575.lua deleted file mode 100644 index f5869dafc4..0000000000 --- a/script/c98229575.lua +++ /dev/null @@ -1,57 +0,0 @@ ---U.A.フィールドゼネラル -function c98229575.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(1,98229575) - e1:SetCondition(c98229575.spcon) - e1:SetOperation(c98229575.spop) - c:RegisterEffect(e1) - --atk - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_ATKCHANGE) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_ATTACK_ANNOUNCE) - e2:SetRange(LOCATION_MZONE) - e2:SetCondition(c98229575.atkcon) - e2:SetOperation(c98229575.atkop) - c:RegisterEffect(e2) -end -function c98229575.spfilter(c) - return c:IsFaceup() and c:IsSetCard(0xb2) and not c:IsCode(98229575) and c:IsAbleToHandAsCost() -end -function c98229575.spcon(e,c) - if c==nil then return true end - return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-1 - and Duel.IsExistingMatchingCard(c98229575.spfilter,c:GetControler(),LOCATION_MZONE,0,1,nil) -end -function c98229575.spop(e,tp,eg,ep,ev,re,r,rp,c) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g=Duel.SelectMatchingCard(tp,c98229575.spfilter,tp,LOCATION_MZONE,0,1,1,nil) - Duel.SendtoHand(g,nil,REASON_COST) -end -function c98229575.atkcon(e,tp,eg,ep,ev,re,r,rp) - local at=Duel.GetAttacker() - return at:IsSetCard(0xb2) and at:IsControler(tp) and at~=e:GetHandler() and e:GetHandler():IsAttackAbove(800) -end -function c98229575.atkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local at=Duel.GetAttacker() - if c:IsFaceup() and c:IsRelateToEffect(e) and c:IsAttackAbove(800) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetValue(-800) - e1:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e1) - if at:IsFaceup() and at:IsRelateToBattle() then - local e2=e1:Clone() - e2:SetValue(800) - at:RegisterEffect(e2) - end - end -end diff --git a/script/c98239899.lua b/script/c98239899.lua deleted file mode 100644 index 0f4fa383d2..0000000000 --- a/script/c98239899.lua +++ /dev/null @@ -1,79 +0,0 @@ ---鎖付き爆弾 -function c98239899.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCondition(c98239899.condition) - e1:SetTarget(c98239899.target) - e1:SetOperation(c98239899.operation) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(98239899,0)) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_LEAVE_FIELD) - e2:SetCondition(c98239899.descon) - e2:SetTarget(c98239899.destg) - e2:SetOperation(c98239899.desop) - c:RegisterEffect(e2) -end -function c98239899.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end -function c98239899.filter(c) - return c:IsFaceup() -end -function c98239899.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c98239899.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c98239899.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local g=Duel.SelectTarget(tp,c98239899.filter,tp,LOCATION_MZONE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c98239899.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsLocation(LOCATION_SZONE) then return end - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,c,tc) - c:CancelToGrave() - --Atkup - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_EQUIP) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(500) - e1:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e1) - --Equip limit - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_EQUIP_LIMIT) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetValue(c98239899.eqlimit) - e2:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e2) - end -end -function c98239899.eqlimit(e,c) - return c:GetControler()==e:GetOwnerPlayer() -end -function c98239899.descon(e,tp,eg,ep,ev,re,r,rp) - return bit.band(r,0x41)==0x41 and e:GetHandler():GetEquipTarget()~=nil -end -function c98239899.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsDestructable() end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c98239899.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c98252586.lua b/script/c98252586.lua deleted file mode 100644 index 2af8cad851..0000000000 --- a/script/c98252586.lua +++ /dev/null @@ -1,50 +0,0 @@ ---フォロー・ウィンド -function c98252586.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c98252586.target) - e1:SetOperation(c98252586.operation) - c:RegisterEffect(e1) - --atk up - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(300) - c:RegisterEffect(e2) - --def up - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_EQUIP) - e3:SetCode(EFFECT_UPDATE_DEFENCE) - e3:SetValue(300) - c:RegisterEffect(e3) - --equip limit - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetCode(EFFECT_EQUIP_LIMIT) - e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e4:SetValue(c98252586.eqlimit) - c:RegisterEffect(e4) -end -function c98252586.eqlimit(e,c) - return c:IsRace(RACE_WINDBEAST) -end -function c98252586.filter(c) - return c:IsFaceup() and c:IsRace(RACE_WINDBEAST) -end -function c98252586.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c98252586.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c98252586.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c98252586.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c98252586.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,e:GetHandler(),tc) - end -end diff --git a/script/c98259197.lua b/script/c98259197.lua deleted file mode 100644 index 759179caf6..0000000000 --- a/script/c98259197.lua +++ /dev/null @@ -1,40 +0,0 @@ ---おジャマッスル -function c98259197.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c98259197.target) - e1:SetOperation(c98259197.activate) - c:RegisterEffect(e1) -end -function c98259197.filter(c) - return c:IsFaceup() and c:IsCode(90140980) - and Duel.IsExistingMatchingCard(c98259197.filter2,0,LOCATION_MZONE,LOCATION_MZONE,1,c) -end -function c98259197.filter2(c) - return c:IsFaceup() and c:IsSetCard(0xf) -end -function c98259197.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c98259197.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c98259197.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - local g=Duel.SelectTarget(tp,c98259197.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - local dg=Duel.GetMatchingGroup(c98259197.filter2,0,LOCATION_MZONE,LOCATION_MZONE,g:GetFirst()) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,dg,dg:GetCount(),0,0) -end -function c98259197.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - local dg=Duel.GetMatchingGroup(c98259197.filter2,0,LOCATION_MZONE,LOCATION_MZONE,tc) - local ct=Duel.Destroy(dg,REASON_EFFECT) - if ct>0 and tc:IsFaceup() and tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(ct*1000) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1) - end -end diff --git a/script/c98263709.lua b/script/c98263709.lua deleted file mode 100644 index bce076bb24..0000000000 --- a/script/c98263709.lua +++ /dev/null @@ -1,74 +0,0 @@ ---銀河魔鏡士 -function c98263709.initial_effect(c) - --recover - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(98263709,0)) - e1:SetCategory(CATEGORY_RECOVER) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetTarget(c98263709.rectg) - e1:SetOperation(c98263709.recop) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_FLIP) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetOperation(c98263709.flipop) - c:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(98263709,1)) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_TO_GRAVE) - e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e3:SetCondition(c98263709.spcon) - e3:SetTarget(c98263709.sptg) - e3:SetOperation(c98263709.spop) - c:RegisterEffect(e3) -end -function c98263709.filter(c) - return c:IsSetCard(0x7b) and c:IsType(TYPE_MONSTER) -end -function c98263709.rectg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local val=Duel.GetMatchingGroupCount(c98263709.filter,tp,LOCATION_GRAVE,0,nil)*500 - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(val) - Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,val) -end -function c98263709.recop(e,tp,eg,ep,ev,re,r,rp) - local val=Duel.GetMatchingGroupCount(c98263709.filter,tp,LOCATION_GRAVE,0,nil)*500 - local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) - Duel.Recover(p,val,REASON_EFFECT) -end -function c98263709.flipop(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():RegisterFlagEffect(98263709,RESET_EVENT+0x57a0000,0,0) -end -function c98263709.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetFlagEffect(98263709)~=0 and e:GetHandler():IsReason(REASON_DESTROY) -end -function c98263709.spfilter(c,e,tp) - return c:IsSetCard(0x7b) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN) - and not c:IsHasEffect(EFFECT_NECRO_VALLEY) -end -function c98263709.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c98263709.spfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE) -end -function c98263709.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c98263709.spfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp) - local tc=g:GetFirst() - if Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEDOWN_DEFENCE) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+0x47e0000) - e1:SetValue(LOCATION_REMOVED) - tc:RegisterEffect(e1,true) - end -end diff --git a/script/c98266377.lua b/script/c98266377.lua deleted file mode 100644 index d2bad9621e..0000000000 --- a/script/c98266377.lua +++ /dev/null @@ -1,16 +0,0 @@ ---E・HERO ザ・ヒート -function c98266377.initial_effect(c) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(c98266377.val) - c:RegisterEffect(e1) -end -function c98266377.filter(c) - return c:IsFaceup() and c:IsSetCard(0x3008) -end -function c98266377.val(e,c) - return Duel.GetMatchingGroupCount(c98266377.filter,c:GetControler(),LOCATION_MZONE,0,nil)*200 -end diff --git a/script/c98273947.lua b/script/c98273947.lua deleted file mode 100644 index c17aa89c72..0000000000 --- a/script/c98273947.lua +++ /dev/null @@ -1,59 +0,0 @@ ---エンジェル・リフト -function c98273947.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_END_PHASE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c98273947.target) - e1:SetOperation(c98273947.operation) - c:RegisterEffect(e1) - --Destroy - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE) - e2:SetCode(EVENT_LEAVE_FIELD) - e2:SetOperation(c98273947.desop) - c:RegisterEffect(e2) - --Destroy2 - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e3:SetRange(LOCATION_SZONE) - e3:SetCode(EVENT_LEAVE_FIELD) - e3:SetCondition(c98273947.descon2) - e3:SetOperation(c98273947.desop2) - c:RegisterEffect(e3) -end -function c98273947.filter(c,e,tp) - return c:IsLevelBelow(2) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c98273947.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:GetLocation()==LOCATION_GRAVE and chkc:GetControler()==tp and c98273947.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c98273947.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c98273947.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c98273947.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then - if Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_ATTACK)==0 then return end - c:SetCardTarget(tc) - end -end -function c98273947.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetHandler():GetFirstCardTarget() - if tc and tc:IsLocation(LOCATION_MZONE) then - Duel.Destroy(tc,REASON_EFFECT) - end -end -function c98273947.descon2(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetHandler():GetFirstCardTarget() - return tc and eg:IsContains(tc) -end -function c98273947.desop2(e,tp,eg,ep,ev,re,r,rp) - Duel.Destroy(e:GetHandler(),REASON_EFFECT) -end diff --git a/script/c98280324.lua b/script/c98280324.lua deleted file mode 100644 index fcfa8ddf73..0000000000 --- a/script/c98280324.lua +++ /dev/null @@ -1,54 +0,0 @@ ---ファーニマル・シープ -function c98280324.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c98280324.spcon) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,98280324) - e2:SetCost(c98280324.spcost) - e2:SetTarget(c98280324.sptg) - e2:SetOperation(c98280324.spop) - c:RegisterEffect(e2) -end -function c98280324.filter(c) - return c:IsFaceup() and c:IsSetCard(0xa9) and not c:IsCode(98280324) -end -function c98280324.spcon(e,c) - if c==nil then return true end - return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c98280324.filter,c:GetControler(),LOCATION_MZONE,0,1,nil) -end -function c98280324.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0xa9) and c:IsAbleToHandAsCost() -end -function c98280324.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c98280324.cfilter,tp,LOCATION_MZONE,0,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g=Duel.SelectMatchingCard(tp,c98280324.cfilter,tp,LOCATION_MZONE,0,1,1,e:GetHandler()) - Duel.SendtoHand(g,nil,REASON_COST) -end -function c98280324.spfilter(c,e,tp) - return c:IsSetCard(0xc3) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsHasEffect(EFFECT_NECRO_VALLEY) -end -function c98280324.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsExistingMatchingCard(c98280324.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE) -end -function c98280324.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c98280324.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c98299011.lua b/script/c98299011.lua deleted file mode 100644 index 65e5444188..0000000000 --- a/script/c98299011.lua +++ /dev/null @@ -1,25 +0,0 @@ ---ホーリー・エルフの祝福 -function c98299011.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_RECOVER) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,0x1c1) - e1:SetTarget(c98299011.target) - e1:SetOperation(c98299011.activate) - c:RegisterEffect(e1) -end -function c98299011.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,LOCATION_MZONE)>0 end - local rec=Duel.GetFieldGroupCount(tp,LOCATION_MZONE,LOCATION_MZONE)*300 - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(rec) - Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,rec) -end -function c98299011.activate(e,tp,eg,ep,ev,re,r,rp) - local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) - local rec=Duel.GetFieldGroupCount(tp,LOCATION_MZONE,LOCATION_MZONE)*300 - Duel.Recover(p,rec,REASON_EFFECT) -end diff --git a/script/c9831539.lua b/script/c9831539.lua deleted file mode 100644 index 66fbbbcb28..0000000000 --- a/script/c9831539.lua +++ /dev/null @@ -1,42 +0,0 @@ ---タンホイザーゲート -function c9831539.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c9831539.target) - e1:SetOperation(c9831539.activate) - c:RegisterEffect(e1) -end -function c9831539.filter1(c,tp) - return c:IsLevelAbove(1) and c:IsAttackBelow(1000) - and Duel.IsExistingTarget(c9831539.filter2,tp,LOCATION_MZONE,0,1,c,c:GetRace()) -end -function c9831539.filter2(c,rac) - return c:IsLevelAbove(1) and c:IsAttackBelow(1000) and c:IsRace(rac) -end -function c9831539.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(c9831539.filter1,tp,LOCATION_MZONE,0,1,nil,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - local g1=Duel.SelectTarget(tp,c9831539.filter1,tp,LOCATION_MZONE,0,1,1,nil,tp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c9831539.filter2,tp,LOCATION_MZONE,0,1,1,g1:GetFirst(),g1:GetFirst():GetRace()) -end -function c9831539.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local tc1=g:GetFirst() - local tc2=g:GetNext() - if tc1:IsRelateToEffect(e) and tc1:IsFaceup() and tc2:IsRelateToEffect(e) and tc2:IsFaceup() then - local lv=tc1:GetLevel()+tc2:GetLevel() - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CHANGE_LEVEL_FINAL) - e1:SetValue(lv) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc1:RegisterEffect(e1) - local e2=e1:Clone() - tc2:RegisterEffect(e2) - end -end diff --git a/script/c98336111.lua b/script/c98336111.lua deleted file mode 100644 index 57e20da13e..0000000000 --- a/script/c98336111.lua +++ /dev/null @@ -1,20 +0,0 @@ ---フュージョニストキラー -function c98336111.initial_effect(c) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(0,LOCATION_MZONE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetCondition(c98336111.condtion) - e1:SetTarget(c98336111.target) - e1:SetValue(0) - c:RegisterEffect(e1) -end -function c98336111.condtion(e) - local ph=Duel.GetCurrentPhase() - return (ph==PHASE_DAMAGE or ph==PHASE_DAMAGE_CAL) and Duel.GetAttackTarget()~=nil - and (Duel.GetAttacker()==e:GetHandler() or Duel.GetAttackTarget()==e:GetHandler()) -end -function c98336111.target(e,c) - return c==e:GetHandler():GetBattleTarget() and c:IsType(TYPE_FUSION) -end diff --git a/script/c98358303.lua b/script/c98358303.lua deleted file mode 100644 index 3333a3b9e6..0000000000 --- a/script/c98358303.lua +++ /dev/null @@ -1,70 +0,0 @@ ---静寂のサイコウィッチ -function c98358303.initial_effect(c) - --remove - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(98358303,0)) - e1:SetCategory(CATEGORY_REMOVE) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCondition(c98358303.rmcon) - e1:SetTarget(c98358303.rmtg) - e1:SetOperation(c98358303.rmop) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(98358303,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetRange(LOCATION_GRAVE) - e2:SetCountLimit(1) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) - e2:SetCondition(c98358303.spcon) - e2:SetTarget(c98358303.sptg) - e2:SetOperation(c98358303.spop) - e2:SetLabelObject(e1) - c:RegisterEffect(e2) -end -function c98358303.rmcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsReason(REASON_DESTROY) - and e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) -end -function c98358303.filter(c) - return c:IsAttackBelow(2000) and c:IsRace(RACE_PSYCHO) and c:IsAbleToRemove() -end -function c98358303.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c98358303.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_DECK) -end -function c98358303.rmop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c98358303.filter,tp,LOCATION_DECK,0,1,1,nil) - local tc=g:GetFirst() - local c=e:GetHandler() - if tc then - Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) - if c:IsRelateToEffect(e) then - c:RegisterFlagEffect(98358303,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,2) - tc:RegisterFlagEffect(98358303,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,2) - e:SetLabelObject(tc) - end - end -end -function c98358303.spcon(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetLabelObject():GetLabelObject() - local c=e:GetHandler() - return tc and Duel.GetTurnCount()~=tc:GetTurnID() - and c:GetFlagEffect(98358303)~=0 and tc:GetFlagEffect(98358303)~=0 -end -function c98358303.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - local tc=e:GetLabelObject():GetLabelObject() - if chk==0 then return tc:IsCanBeSpecialSummoned(e,0,tp,false,false) end - tc:CreateEffectRelation(e) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,tc,1,0,0) -end -function c98358303.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetLabelObject():GetLabelObject() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c9837195.lua b/script/c9837195.lua deleted file mode 100644 index 927e7e15f6..0000000000 --- a/script/c9837195.lua +++ /dev/null @@ -1,51 +0,0 @@ ---ガスタの神官 ムスト -function c9837195.initial_effect(c) - --disable - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(9837195,0)) - e1:SetCategory(CATEGORY_DISABLE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetTarget(c9837195.target) - e1:SetOperation(c9837195.operation) - c:RegisterEffect(e1) -end -function c9837195.filter1(c) - return c:IsSetCard(0x10) and c:IsType(TYPE_MONSTER) and c:IsAbleToDeck() -end -function c9837195.filter2(c) - return c:IsFaceup() and c:IsType(TYPE_EFFECT) -end -function c9837195.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - if chk==0 then return Duel.IsExistingTarget(c9837195.filter1,tp,LOCATION_GRAVE,0,1,nil) - and Duel.IsExistingTarget(c9837195.filter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g1=Duel.SelectTarget(tp,c9837195.filter1,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - local g2=Duel.SelectTarget(tp,c9837195.filter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g1,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_DISABLE,g2,1,0,0) -end -function c9837195.operation(e,tp,eg,ep,ev,re,r,rp) - local ex,g1=Duel.GetOperationInfo(0,CATEGORY_TODECK) - local ex,g2=Duel.GetOperationInfo(0,CATEGORY_DISABLE) - if g1:GetFirst():IsRelateToEffect(e) then - Duel.SendtoDeck(g1,nil,2,REASON_EFFECT) - end - local tc=g2:GetFirst() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - tc:RegisterEffect(e2) - end -end diff --git a/script/c98374133.lua b/script/c98374133.lua deleted file mode 100644 index 4b2ffd41a2..0000000000 --- a/script/c98374133.lua +++ /dev/null @@ -1,50 +0,0 @@ ---覚醒 -function c98374133.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c98374133.target) - e1:SetOperation(c98374133.operation) - c:RegisterEffect(e1) - --atk up - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(400) - c:RegisterEffect(e2) - --def down - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_EQUIP) - e3:SetCode(EFFECT_UPDATE_DEFENCE) - e3:SetValue(-200) - c:RegisterEffect(e3) - --equip limit - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetCode(EFFECT_EQUIP_LIMIT) - e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e4:SetValue(c98374133.eqlimit) - c:RegisterEffect(e4) -end -function c98374133.eqlimit(e,c) - return c:IsAttribute(ATTRIBUTE_EARTH) -end -function c98374133.filter(c) - return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_EARTH) -end -function c98374133.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c98374133.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c98374133.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c98374133.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c98374133.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,e:GetHandler(),tc) - end -end diff --git a/script/c98380593.lua b/script/c98380593.lua deleted file mode 100644 index 296def8731..0000000000 --- a/script/c98380593.lua +++ /dev/null @@ -1,33 +0,0 @@ ---至高の木の実 -function c98380593.initial_effect(c) - --recover - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCategory(CATEGORY_RECOVER+CATEGORY_DAMAGE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c98380593.rectg) - e1:SetOperation(c98380593.recop) - c:RegisterEffect(e1) -end -function c98380593.rectg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.GetLP(tp)~=Duel.GetLP(1-tp) end - Duel.SetTargetPlayer(tp) - if Duel.GetLP(tp)0 -end -function c983995.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD+LOCATION_HAND)>0 end - Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,1-tp,LOCATION_ONFIELD+LOCATION_HAND) -end -function c983995.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateEffect(ev) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,nil,tp,0,LOCATION_ONFIELD+LOCATION_HAND,1,1,nil) - if g:GetCount()~=0 then - Duel.SendtoGrave(g,REASON_EFFECT) - end -end -function c983995.drcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return bit.band(r,REASON_DESTROY)~=0 and rp~=tp and c:GetPreviousControler()==tp - and c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousPosition(POS_FACEDOWN) -end -function c983995.drtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(1) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c983995.drop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end diff --git a/script/c984114.lua b/script/c984114.lua deleted file mode 100644 index 88949a35f6..0000000000 --- a/script/c984114.lua +++ /dev/null @@ -1,37 +0,0 @@ ---エクスプレスロイド -function c984114.initial_effect(c) - --salvage - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(984114,0)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c984114.target) - e1:SetOperation(c984114.activate) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e2) - local e3=e1:Clone() - e3:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - c:RegisterEffect(e3) -end -function c984114.filter(c) - return c:IsSetCard(0x16) and c:GetCode()~=984114 and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() -end -function c984114.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c984114.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c984114.filter,tp,LOCATION_GRAVE,0,2,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c984114.filter,tp,LOCATION_GRAVE,0,2,2,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,2,0,0) -end -function c984114.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local sg=g:Filter(Card.IsRelateToEffect,nil,e) - if sg:GetCount()>0 then - Duel.SendtoHand(sg,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,sg) - end -end diff --git a/script/c98414735.lua b/script/c98414735.lua deleted file mode 100644 index 257ac723e3..0000000000 --- a/script/c98414735.lua +++ /dev/null @@ -1,83 +0,0 @@ ---버제스토마 카나디아 -function c98414735.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_POSITION) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetHintTiming(TIMING_BATTLE_PHASE,0x1c0+TIMING_BATTLE_PHASE) - e1:SetTarget(c98414735.target) - e1:SetOperation(c98414735.activate) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_CHAINING) - e2:SetRange(LOCATION_GRAVE) - e2:SetCondition(c98414735.spcon) - e2:SetTarget(c98414735.sptg) - e2:SetOperation(c98414735.spop) - c:RegisterEffect(e2) -end -function c98414735.filter(c) - return c:IsFaceup() and c:IsCanTurnSet() -end -function c98414735.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c98414735.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c98414735.filter,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - local g=Duel.SelectTarget(tp,c98414735.filter,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0) -end -function c98414735.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.ChangePosition(tc,POS_FACEDOWN_DEFENCE) - end -end -function c98414735.spcon(e,tp,eg,ep,ev,re,r,rp) - return re:IsActiveType(TYPE_TRAP) and re:IsHasType(EFFECT_TYPE_ACTIVATE) -end -function c98414735.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:GetFlagEffect(98414735)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsPlayerCanSpecialSummonMonster(tp,98414735,0xd4,0x11,1200,0,2,RACE_AQUA,ATTRIBUTE_WATER) end - c:RegisterFlagEffect(98414735,RESET_CHAIN,0,1) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0) -end -function c98414735.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local c=e:GetHandler() - if c:IsRelateToEffect(e) - and Duel.IsPlayerCanSpecialSummonMonster(tp,98414735,0xd4,0x11,1200,0,2,RACE_AQUA,ATTRIBUTE_WATER) then - c:SetStatus(STATUS_NO_LEVEL,false) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CHANGE_TYPE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetValue(TYPE_NORMAL+TYPE_MONSTER) - e1:SetReset(RESET_EVENT+0x47c0000) - c:RegisterEffect(e1,true) - Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_IMMUNE_EFFECT) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetValue(c98414735.efilter) - e2:SetReset(RESET_EVENT+0x1fe0000) - c:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e3:SetReset(RESET_EVENT+0x47e0000) - e3:SetValue(LOCATION_REMOVED) - c:RegisterEffect(e3,true) - end -end -function c98414735.efilter(e,re) - return re:IsActiveType(TYPE_MONSTER) -end diff --git a/script/c98427577.lua b/script/c98427577.lua deleted file mode 100644 index 00d08dbd03..0000000000 --- a/script/c98427577.lua +++ /dev/null @@ -1,31 +0,0 @@ ---くず鉄のかかし -function c98427577.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetCondition(c98427577.condition) - e1:SetTarget(c98427577.target) - e1:SetOperation(c98427577.activate) - c:RegisterEffect(e1) -end -function c98427577.condition(e,tp,eg,ep,ev,re,r,rp) - return tp~=Duel.GetTurnPlayer() -end -function c98427577.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local tg=Duel.GetAttacker() - if chkc then return chkc==tg end - if chk==0 then return tg:IsOnField() and tg:IsCanBeEffectTarget(e) end - Duel.SetTargetCard(tg) -end -function c98427577.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateAttack() - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsCanTurnSet() then - Duel.BreakEffect() - c:CancelToGrave() - Duel.ChangePosition(c,POS_FACEDOWN) - Duel.RaiseEvent(c,EVENT_SSET,e,REASON_EFFECT,tp,tp,0) - end -end diff --git a/script/c98434877.lua b/script/c98434877.lua deleted file mode 100644 index cf65be0af0..0000000000 --- a/script/c98434877.lua +++ /dev/null @@ -1,34 +0,0 @@ ---水魔神-スーガ -function c98434877.initial_effect(c) - --atkdown - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(98434877,0)) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_QUICK_O) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EVENT_PRE_DAMAGE_CALCULATE) - e1:SetProperty(EFFECT_FLAG_NO_TURN_RESET) - e1:SetCountLimit(1) - e1:SetCondition(c98434877.condition) - e1:SetTarget(c98434877.target) - e1:SetOperation(c98434877.operation) - c:RegisterEffect(e1) -end -function c98434877.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp and Duel.GetAttackTarget()==e:GetHandler() -end -function c98434877.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetAttacker():IsCanBeEffectTarget(e) end - Duel.SetTargetCard(Duel.GetAttacker()) -end -function c98434877.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetReset(RESET_PHASE+RESET_DAMAGE_CAL) - e1:SetValue(0) - tc:RegisterEffect(e1) - end -end diff --git a/script/c98437424.lua b/script/c98437424.lua deleted file mode 100644 index 86f11273c5..0000000000 --- a/script/c98437424.lua +++ /dev/null @@ -1,30 +0,0 @@ ---ナチュル・コスモスビート -function c98437424.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(98437424,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetRange(LOCATION_HAND) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetCondition(c98437424.spcon) - e1:SetTarget(c98437424.sptg) - e1:SetOperation(c98437424.spop) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_MSET) - c:RegisterEffect(e2) -end -function c98437424.spcon(e,tp,eg,ep,ev,re,r,rp) - return rp~=tp -end -function c98437424.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c98437424.spop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c98444741.lua b/script/c98444741.lua deleted file mode 100644 index 0d8b2ee0c4..0000000000 --- a/script/c98444741.lua +++ /dev/null @@ -1,26 +0,0 @@ ---積み上げる幸福 -function c98444741.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c98444741.condition) - e1:SetTarget(c98444741.target) - e1:SetOperation(c98444741.activate) - c:RegisterEffect(e1) -end -function c98444741.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentChain()>2 and Duel.CheckChainUniqueness() -end -function c98444741.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp,2) end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(2) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2) -end -function c98444741.activate(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end diff --git a/script/c98446407.lua b/script/c98446407.lua deleted file mode 100644 index 7c2af3ec5f..0000000000 --- a/script/c98446407.lua +++ /dev/null @@ -1,37 +0,0 @@ ---ネフティスの導き手 -function c98446407.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(98446407,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c98446407.spcost) - e1:SetTarget(c98446407.sptg) - e1:SetOperation(c98446407.spop) - c:RegisterEffect(e1) -end -function c98446407.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsReleasable() and Duel.CheckReleaseGroup(tp,nil,1,c) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) - local rg=Duel.SelectReleaseGroup(tp,nil,1,1,c) - rg:AddCard(c) - Duel.Release(rg,REASON_COST) -end -function c98446407.filter(c,e,tp) - return c:GetCode()==61441708 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c98446407.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-2 - and Duel.IsExistingMatchingCard(c98446407.filter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_HAND) -end -function c98446407.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c98446407.filter,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c9845733.lua b/script/c9845733.lua deleted file mode 100644 index cb6eecef8c..0000000000 --- a/script/c9845733.lua +++ /dev/null @@ -1,4 +0,0 @@ ---覚醒の証 -function c9845733.initial_effect(c) - aux.AddRitualProcGreater(c,aux.FilterBoolFunction(Card.IsCode,10789972)) -end diff --git a/script/c9848939.lua b/script/c9848939.lua deleted file mode 100644 index 3c0b6a3955..0000000000 --- a/script/c9848939.lua +++ /dev/null @@ -1,52 +0,0 @@ ---樹海の射手 -function c9848939.initial_effect(c) - c:EnableReviveLimit() - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_SPSUMMON_PROC) - e2:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e2:SetRange(LOCATION_HAND) - e2:SetCondition(c9848939.spcon) - c:RegisterEffect(e2) - --search - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(9848939,0)) - e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_MZONE) - e3:SetCost(c9848939.cost) - e3:SetTarget(c9848939.target) - e3:SetOperation(c9848939.operation) - c:RegisterEffect(e3) -end -function c9848939.spcon(e,c) - if c==nil then return true end - return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and - Duel.IsExistingMatchingCard(Card.IsType,c:GetControler(),LOCATION_GRAVE,0,2,nil,TYPE_NORMAL) -end -function c9848939.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end -function c9848939.filter(c) - return c:IsType(TYPE_DUAL) and c:IsAbleToHand() -end -function c9848939.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c9848939.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c9848939.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c9848939.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c98494543.lua b/script/c98494543.lua deleted file mode 100644 index 3d9bbd0be7..0000000000 --- a/script/c98494543.lua +++ /dev/null @@ -1,33 +0,0 @@ ---魔法石の採掘 -function c98494543.initial_effect(c) - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c98494543.cost) - e1:SetTarget(c98494543.target) - e1:SetOperation(c98494543.operation) - c:RegisterEffect(e1) -end -function c98494543.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,2,e:GetHandler()) end - Duel.DiscardHand(tp,Card.IsDiscardable,2,2,REASON_COST+REASON_DISCARD) -end -function c98494543.filter(c) - return c:IsType(TYPE_SPELL) and c:IsAbleToHand() -end -function c98494543.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:GetLocation()==LOCATION_GRAVE and chkc:GetControler()==tp and c98494543.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c98494543.filter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c98494543.filter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0) -end -function c98494543.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end diff --git a/script/c98495314.lua b/script/c98495314.lua deleted file mode 100644 index a40e8f4d1f..0000000000 --- a/script/c98495314.lua +++ /dev/null @@ -1,59 +0,0 @@ ---執念の剣 -function c98495314.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c98495314.target) - e1:SetOperation(c98495314.operation) - c:RegisterEffect(e1) - --Atk up - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(500) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EFFECT_UPDATE_DEFENCE) - c:RegisterEffect(e3) - --Equip limit - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetCode(EFFECT_EQUIP_LIMIT) - e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e4:SetValue(1) - c:RegisterEffect(e4) - --to deck - local e5=Effect.CreateEffect(c) - e5:SetDescription(aux.Stringid(98495314,0)) - e5:SetCategory(CATEGORY_TODECK) - e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e5:SetCode(EVENT_TO_GRAVE) - e5:SetTarget(c98495314.tdtg) - e5:SetOperation(c98495314.tdop) - c:RegisterEffect(e5) -end -function c98495314.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c98495314.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,e:GetHandler(),tc) - end -end -function c98495314.tdtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsRelateToEffect(e) end - Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0) -end -function c98495314.tdop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - Duel.SendtoDeck(e:GetHandler(),nil,0,REASON_EFFECT) - end -end diff --git a/script/c98502113.lua b/script/c98502113.lua deleted file mode 100644 index 3418271d06..0000000000 --- a/script/c98502113.lua +++ /dev/null @@ -1,63 +0,0 @@ ---超魔導剣士-ブラック・パラディン -function c98502113.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcCode2(c,46986414,78193831,true,true) - --negate - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(98502113,0)) - e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetRange(LOCATION_MZONE) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) - e1:SetCode(EVENT_CHAINING) - e1:SetCondition(c98502113.discon) - e1:SetCost(c98502113.discost) - e1:SetTarget(c98502113.distg) - e1:SetOperation(c98502113.disop) - c:RegisterEffect(e1) - --atkup - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetRange(LOCATION_MZONE) - e2:SetValue(c98502113.val) - c:RegisterEffect(e2) - --spsummon condition - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e3:SetCode(EFFECT_SPSUMMON_CONDITION) - e3:SetValue(aux.fuslimit) - c:RegisterEffect(e3) -end -function c98502113.val(e,c) - return Duel.GetMatchingGroupCount(c98502113.filter,0,0x14,0x14,nil)*500 -end -function c98502113.filter(c) - return c:IsRace(RACE_DRAGON) and (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup()) -end -function c98502113.discon(e,tp,eg,ep,ev,re,r,rp) - return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) - and re:IsActiveType(TYPE_SPELL) and re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev) -end -function c98502113.discost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD,nil) -end -function c98502113.distg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) - end -end -function c98502113.disop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsFaceup() or not c:IsRelateToEffect(e) then return end - Duel.NegateActivation(ev) - if re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(eg,REASON_EFFECT) - end -end diff --git a/script/c98535702.lua b/script/c98535702.lua deleted file mode 100644 index 69c2da5085..0000000000 --- a/script/c98535702.lua +++ /dev/null @@ -1,22 +0,0 @@ ---ダメージ・ワクチンΩMAX -function c98535702.initial_effect(c) - --recover - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCategory(CATEGORY_RECOVER) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_DAMAGE) - e1:SetTarget(c98535702.rectg) - e1:SetOperation(c98535702.recop) - c:RegisterEffect(e1) -end -function c98535702.rectg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return ep==tp end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(ev) - Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,ev) -end -function c98535702.recop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Recover(p,d,REASON_EFFECT) -end diff --git a/script/c98555327.lua b/script/c98555327.lua deleted file mode 100644 index 6cbd23723b..0000000000 --- a/script/c98555327.lua +++ /dev/null @@ -1,51 +0,0 @@ ---銀河の魔導師 -function c98555327.initial_effect(c) - --lv up - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(98555327,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetOperation(c98555327.lvop) - c:RegisterEffect(e1) - --search - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(98555327,1)) - e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCost(c98555327.cost) - e2:SetTarget(c98555327.target) - e2:SetOperation(c98555327.operation) - c:RegisterEffect(e2) -end -function c98555327.lvop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFaceup() and c:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_LEVEL) - e1:SetReset(RESET_EVENT+0x1ff0000+RESET_PHASE+PHASE_END) - e1:SetValue(4) - c:RegisterEffect(e1) - end -end -function c98555327.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end -function c98555327.filter(c) - return c:IsSetCard(0x7b) and c:GetCode()~=98555327 and c:IsAbleToHand() -end -function c98555327.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c98555327.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c98555327.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c98555327.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c98558751.lua b/script/c98558751.lua deleted file mode 100644 index d285257b1f..0000000000 --- a/script/c98558751.lua +++ /dev/null @@ -1,90 +0,0 @@ ---TG ワンダー・マジシャン -function c98558751.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,nil,aux.NonTuner(Card.IsSetCard,0x27),1) - c:EnableReviveLimit() - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(98558751,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(c98558751.descon) - e1:SetTarget(c98558751.destg) - e1:SetOperation(c98558751.desop) - c:RegisterEffect(e1) - --draw - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(98558751,1)) - e2:SetCategory(CATEGORY_DRAW) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetCode(EVENT_LEAVE_FIELD) - e2:SetCondition(c98558751.drcon) - e2:SetTarget(c98558751.drtg) - e2:SetOperation(c98558751.drop) - c:RegisterEffect(e2) - --synchro effect - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(98558751,2)) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_QUICK_O) - e3:SetCode(EVENT_FREE_CHAIN) - e3:SetHintTiming(0,0x1c0+TIMING_MAIN_END) - e3:SetRange(LOCATION_MZONE) - e3:SetCondition(c98558751.sccon) - e3:SetTarget(c98558751.sctg) - e3:SetOperation(c98558751.scop) - c:RegisterEffect(e3) -end -function c98558751.descon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_SYNCHRO -end -function c98558751.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable() -end -function c98558751.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and c98558751.filter(chkc) end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c98558751.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c98558751.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end -function c98558751.drcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsReason(REASON_DESTROY) -end -function c98558751.drtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(1) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c98558751.drop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end -function c98558751.sccon(e,tp,eg,ep,ev,re,r,rp) - return not e:GetHandler():IsStatus(STATUS_CHAINING) and Duel.GetTurnPlayer()~=tp - and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2) -end -function c98558751.sctg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,1,nil,e:GetHandler()) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function c98558751.scop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:GetControler()~=tp or not c:IsRelateToEffect(e) then return end - local g=Duel.GetMatchingGroup(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,nil,c) - if g:GetCount()>0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=g:Select(tp,1,1,nil) - Duel.SynchroSummon(tp,sg:GetFirst(),c) - end -end diff --git a/script/c98585345.lua b/script/c98585345.lua deleted file mode 100644 index d0807d5bc5..0000000000 --- a/script/c98585345.lua +++ /dev/null @@ -1,56 +0,0 @@ ---ハネクリボー LV10 -function c98585345.initial_effect(c) - c:EnableReviveLimit() - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(aux.FALSE) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(98585345,0)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetHintTiming(TIMING_BATTLE_PHASE) - e2:SetRange(LOCATION_MZONE) - e2:SetCondition(c98585345.descon) - e2:SetCost(c98585345.descost) - e2:SetTarget(c98585345.destg) - e2:SetOperation(c98585345.desop) - c:RegisterEffect(e2) -end -c98585345.lvdncount=1 -c98585345.lvdn={33776734} -function c98585345.descon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp and Duel.GetCurrentPhase()==PHASE_BATTLE -end -function c98585345.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end -function c98585345.dfilter(c) - return c:IsAttackPos() and c:IsDestructable() -end -function c98585345.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c98585345.dfilter,tp,0,LOCATION_MZONE,1,nil) end - local g=Duel.GetMatchingGroup(c98585345.dfilter,tp,0,LOCATION_MZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,0) -end -function c98585345.desop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c98585345.dfilter,tp,0,LOCATION_MZONE,nil) - Duel.Destroy(g,REASON_EFFECT) - local dg=Duel.GetOperatedGroup() - local tc=dg:GetFirst() - local dam=0 - while tc do - local atk=tc:GetTextAttack() - if atk<0 then atk=0 end - dam=dam+atk - tc=dg:GetNext() - end - Duel.Damage(1-tp,dam,REASON_EFFECT) -end diff --git a/script/c9861795.lua b/script/c9861795.lua deleted file mode 100644 index 17bd1e2348..0000000000 --- a/script/c9861795.lua +++ /dev/null @@ -1,29 +0,0 @@ ---モグモール -function c9861795.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(9861795,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCountLimit(1,9861795+EFFECT_COUNT_CODE_DUEL) - e1:SetCondition(c9861795.condition) - e1:SetTarget(c9861795.target) - e1:SetOperation(c9861795.operation) - c:RegisterEffect(e1) -end -function c9861795.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsReason(REASON_DESTROY) and e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) -end -function c9861795.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c9861795.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - if e:GetHandler():IsRelateToEffect(e) then - Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP_DEFENCE) - end -end diff --git a/script/c98637386.lua b/script/c98637386.lua deleted file mode 100644 index 5a064b5a28..0000000000 --- a/script/c98637386.lua +++ /dev/null @@ -1,42 +0,0 @@ ---ゴヨウ・プレデター -function c98637386.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1) - c:EnableReviveLimit() - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(98637386,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetCode(EVENT_BATTLE_DESTROYING) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCountLimit(1,98637386) - e1:SetCondition(aux.bdogcon) - e1:SetTarget(c98637386.sptg) - e1:SetOperation(c98637386.spop) - c:RegisterEffect(e1) -end -function c98637386.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - local bc=e:GetHandler():GetBattleTarget() - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and bc:IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetTargetCard(bc) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,bc,1,0,0) -end -function c98637386.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - if Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e1:SetCode(EVENT_PRE_BATTLE_DAMAGE) - e1:SetOperation(c98637386.rdop) - e1:SetReset(RESET_EVENT+0x1fe0000) - tc:RegisterEffect(e1,true) - Duel.SpecialSummonComplete() - end - end -end -function c98637386.rdop(e,tp,eg,ep,ev,re,r,rp) - Duel.ChangeBattleDamage(ep,ev/2) -end diff --git a/script/c98643358.lua b/script/c98643358.lua deleted file mode 100644 index 41f135cc63..0000000000 --- a/script/c98643358.lua +++ /dev/null @@ -1,32 +0,0 @@ ---ダイヤモンド・ダスト -function c98643358.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,0x1e0) - e1:SetTarget(c98643358.target) - e1:SetOperation(c98643358.activate) - c:RegisterEffect(e1) -end -function c98643358.filter(c) - return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_WATER) and c:IsDestructable() -end -function c98643358.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c98643358.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - local g=Duel.GetMatchingGroup(c98643358.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,g:GetCount()*500) -end -function c98643358.ctfilter(c) - return c:IsLocation(LOCATION_GRAVE) and c:IsAttribute(ATTRIBUTE_WATER) -end -function c98643358.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c98643358.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - if Duel.Destroy(g,REASON_EFFECT)~=0 then - Duel.BreakEffect() - local ct=Duel.GetOperatedGroup():FilterCount(c98643358.ctfilter,nil) - Duel.Damage(1-tp,ct*500,REASON_EFFECT) - end -end diff --git a/script/c98645731.lua b/script/c98645731.lua deleted file mode 100644 index df01a08f97..0000000000 --- a/script/c98645731.lua +++ /dev/null @@ -1,52 +0,0 @@ ---強欲で謙虚な壺 -function c98645731.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,98645731+EFFECT_COUNT_CODE_OATH) - e1:SetCost(c98645731.cost) - e1:SetTarget(c98645731.target) - e1:SetOperation(c98645731.activate) - c:RegisterEffect(e1) -end -function c98645731.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_SPSUMMON)==0 end - --oath effects - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) - e1:SetTargetRange(1,0) - Duel.RegisterEffect(e1,tp) -end -function c98645731.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)<3 then return false end - local g=Duel.GetDecktopGroup(tp,3) - local result=g:FilterCount(Card.IsAbleToHand,nil)>0 - return result - end - Duel.SetTargetPlayer(tp) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,LOCATION_DECK) -end -function c98645731.activate(e,tp,eg,ep,ev,re,r,rp) - local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) - Duel.ConfirmDecktop(p,3) - local g=Duel.GetDecktopGroup(p,3) - if g:GetCount()>0 then - Duel.Hint(HINT_SELECTMSG,p,HINTMSG_ATOHAND) - local sg=g:Select(p,1,1,nil) - if sg:GetFirst():IsAbleToHand() then - Duel.SendtoHand(sg,nil,REASON_EFFECT) - Duel.ConfirmCards(1-p,sg) - Duel.ShuffleHand(p) - else - Duel.SendtoGrave(sg,REASON_RULE) - end - Duel.ShuffleDeck(p) - end -end diff --git a/script/c98649372.lua b/script/c98649372.lua deleted file mode 100644 index e587c4941f..0000000000 --- a/script/c98649372.lua +++ /dev/null @@ -1,44 +0,0 @@ ---スカル・クラーケン -function c98649372.initial_effect(c) - --destroy - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(98649372,0)) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c98649372.destg) - e1:SetOperation(c98649372.desop) - c:RegisterEffect(e1) - --pos - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(98649372,1)) - e2:SetCategory(CATEGORY_POSITION) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetOperation(c98649372.posop) - c:RegisterEffect(e2) -end -function c98649372.filter(c) - return c:IsFaceup() and c:IsType(TYPE_SPELL) and c:IsDestructable() -end -function c98649372.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and c98649372.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c98649372.filter,tp,0,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c98649372.filter,tp,0,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c98649372.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end -function c98649372.posop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.ChangePosition(c,POS_FACEUP_DEFENCE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK) - end -end diff --git a/script/c98666339.lua b/script/c98666339.lua deleted file mode 100644 index 2873f2ca86..0000000000 --- a/script/c98666339.lua +++ /dev/null @@ -1,31 +0,0 @@ ---リバースディメンション -function c98666339.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_REMOVE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c98666339.target) - e1:SetOperation(c98666339.operation) - c:RegisterEffect(e1) -end -function c98666339.filter(c,e,tp) - return c:GetControler()==tp and c:IsFaceup() and c:GetReasonPlayer()==1-tp - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c98666339.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_REMOVED) and eg:IsContains(chkc) and c98666339.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and eg:IsExists(c98666339.filter,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=eg:FilterSelect(tp,c98666339.filter,1,1,nil,e,tp) - Duel.SetTargetCard(g) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c98666339.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c98672567.lua b/script/c98672567.lua deleted file mode 100644 index 88d9608557..0000000000 --- a/script/c98672567.lua +++ /dev/null @@ -1,64 +0,0 @@ ---貪欲で無欲な壺 -function c98672567.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c98672567.condition) - e1:SetCost(c98672567.cost) - e1:SetTarget(c98672567.target) - e1:SetOperation(c98672567.activate) - c:RegisterEffect(e1) -end -function c98672567.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetActivityCount(tp,ACTIVITY_BATTLE_PHASE)==0 and not Duel.CheckPhaseActivity() -end -function c98672567.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_BP) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) - e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function c98672567.filter(c,e) - return c:IsType(TYPE_MONSTER) and c:IsAbleToDeck() and c:IsCanBeEffectTarget(e) -end -function c98672567.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - if chk==0 then - if not Duel.IsPlayerCanDraw(tp,2) then return false end - local g=Duel.GetMatchingGroup(c98672567.filter,tp,LOCATION_GRAVE,0,nil,e) - return g:GetClassCount(Card.GetRace)>=3 - end - local g=Duel.GetMatchingGroup(c98672567.filter,tp,LOCATION_GRAVE,0,nil,e) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g1=g:Select(tp,1,1,nil) - g:Remove(Card.IsRace,nil,g1:GetFirst():GetRace()) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g2=g:Select(tp,1,1,nil) - g:Remove(Card.IsRace,nil,g2:GetFirst():GetRace()) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g3=g:Select(tp,1,1,nil) - g1:Merge(g2) - g1:Merge(g3) - Duel.SetTargetCard(g1) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g1,3,0,0) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2) -end -function c98672567.activate(e,tp,eg,ep,ev,re,r,rp) - local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - if not tg or tg:FilterCount(Card.IsRelateToEffect,nil,e)~=3 then return end - Duel.SendtoDeck(tg,nil,0,REASON_EFFECT) - local g=Duel.GetOperatedGroup() - local ct=g:FilterCount(Card.IsLocation,nil,LOCATION_DECK+LOCATION_EXTRA) - if ct==3 then - Duel.ShuffleDeck(tp) - Duel.BreakEffect() - Duel.Draw(tp,2,REASON_EFFECT) - end -end diff --git a/script/c98707192.lua b/script/c98707192.lua deleted file mode 100644 index 801c82e940..0000000000 --- a/script/c98707192.lua +++ /dev/null @@ -1,74 +0,0 @@ ---ゴーストリック・マリー -function c98707192.initial_effect(c) - --summon limit - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_SUMMON) - e1:SetCondition(c98707192.sumcon) - c:RegisterEffect(e1) - --turn set - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(98707192,0)) - e2:SetCategory(CATEGORY_POSITION) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetTarget(c98707192.postg) - e2:SetOperation(c98707192.posop) - c:RegisterEffect(e2) - --spsummon - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(98707192,1)) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e3:SetRange(LOCATION_HAND) - e3:SetCode(EVENT_DAMAGE) - e3:SetCountLimit(1,98707192) - e3:SetCondition(c98707192.condition) - e3:SetCost(c98707192.cost) - e3:SetTarget(c98707192.target) - e3:SetOperation(c98707192.operation) - c:RegisterEffect(e3) -end -function c98707192.sfilter(c) - return c:IsFaceup() and c:IsSetCard(0x8d) -end -function c98707192.sumcon(e) - return not Duel.IsExistingMatchingCard(c98707192.sfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) -end -function c98707192.postg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsCanTurnSet() and c:GetFlagEffect(98707192)==0 end - c:RegisterFlagEffect(98707192,RESET_EVENT+0x1fc0000+RESET_PHASE+PHASE_END,0,1) - Duel.SetOperationInfo(0,CATEGORY_POSITION,c,1,0,0) -end -function c98707192.posop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - Duel.ChangePosition(c,POS_FACEDOWN_DEFENCE) - end -end -function c98707192.condition(e,tp,eg,ep,ev,re,r,rp) - return ep==tp and bit.band(r,REASON_BATTLE+REASON_EFFECT)~=0 -end -function c98707192.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsDiscardable() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD) -end -function c98707192.filter(c,e,tp) - return c:IsSetCard(0x8d) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN) -end -function c98707192.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c98707192.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,LOCATION_DECK) -end -function c98707192.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c98707192.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEDOWN_DEFENCE) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c98719226.lua b/script/c98719226.lua deleted file mode 100644 index 61c280d811..0000000000 --- a/script/c98719226.lua +++ /dev/null @@ -1,47 +0,0 @@ ---エーリアン・ウォリアー -function c98719226.initial_effect(c) - --counter - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(98719226,0)) - e1:SetCategory(CATEGORY_COUNTER) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetCondition(c98719226.ctcon) - e1:SetOperation(c98719226.ctop) - c:RegisterEffect(e1) - --atk def - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_DAMAGE_CALCULATING) - e2:SetRange(LOCATION_MZONE) - e2:SetOperation(c98719226.adval) - c:RegisterEffect(e2) -end -function c98719226.ctcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) -end -function c98719226.ctop(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetHandler():GetReasonCard() - if tc:IsFaceup() and tc:IsRelateToBattle() then - tc:AddCounter(0xe,2) - end -end -function c98719226.addown(c,e) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_PHASE+RESET_DAMAGE_CAL) - e1:SetValue(c:GetCounter(0xe)*-300) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_UPDATE_DEFENCE) - c:RegisterEffect(e2) -end -function c98719226.adval(e,tp,eg,ep,ev,re,r,rp) - local a=Duel.GetAttacker() - local d=Duel.GetAttackTarget() - if not d then return end - if a:GetCounter(0xe)>0 and d:IsSetCard(0xc) then c98719226.addown(a,e) end - if d:GetCounter(0xe)>0 and a:IsSetCard(0xc) then c98719226.addown(d,e) end -end diff --git a/script/c987311.lua b/script/c987311.lua deleted file mode 100644 index 5cbf260daf..0000000000 --- a/script/c987311.lua +++ /dev/null @@ -1,44 +0,0 @@ ---DDD疾風王アレクサンダー -function c987311.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0xaf),aux.NonTuner(nil),1) - c:EnableReviveLimit() - --tohand - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1,987311) - e1:SetCondition(c987311.spcon) - e1:SetTarget(c987311.sptg) - e1:SetOperation(c987311.spop) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e2) -end -function c987311.cfilter(c,tp) - return c:IsFaceup() and c:IsSetCard(0xaf) and c:IsControler(tp) -end -function c987311.spcon(e,tp,eg,ep,ev,re,r,rp) - return not eg:IsContains(e:GetHandler()) and eg:IsExists(c987311.cfilter,1,nil,tp) -end -function c987311.spfilter(c,e,tp) - return c:IsLevelBelow(4) and c:IsSetCard(0xaf) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c987311.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c987311.spfilter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c987311.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c987311.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c987311.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c98745000.lua b/script/c98745000.lua deleted file mode 100644 index fb5a644ee0..0000000000 --- a/script/c98745000.lua +++ /dev/null @@ -1,31 +0,0 @@ ---ジャッカルの聖戦士 -function c98745000.initial_effect(c) - --to deck - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(98745000,0)) - e1:SetCategory(CATEGORY_TODECK) - e1:SetCode(EVENT_BATTLE_DESTROYING) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCondition(c98745000.tdcon) - e1:SetTarget(c98745000.tdtg) - e1:SetOperation(c98745000.tdop) - c:RegisterEffect(e1) -end -function c98745000.tdcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local bc=c:GetBattleTarget() - if not c:IsRelateToBattle() or c:IsFacedown() then return false end - return bc:IsLocation(LOCATION_GRAVE) and bc:IsType(TYPE_MONSTER) and bc:IsControler(1-tp) -end -function c98745000.tdtg(e,tp,eg,ep,ev,re,r,rp,chk) - local bc=e:GetHandler():GetBattleTarget() - if chk==0 then return bc:IsAbleToDeck() end - Duel.SetTargetCard(bc) - Duel.SetOperationInfo(0,CATEGORY_TODECK,bc,1,0,0) -end -function c98745000.tdop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoDeck(tc,nil,0,REASON_EFFECT) - end -end diff --git a/script/c98777036.lua b/script/c98777036.lua deleted file mode 100644 index 6669736a59..0000000000 --- a/script/c98777036.lua +++ /dev/null @@ -1,118 +0,0 @@ ---トラゴエディア -function c98777036.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(98777036,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e1:SetRange(LOCATION_HAND) - e1:SetCode(EVENT_DAMAGE) - e1:SetCondition(c98777036.sumcon) - e1:SetTarget(c98777036.sumtg) - e1:SetOperation(c98777036.sumop) - c:RegisterEffect(e1) - --atk def - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(c98777036.value) - c:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e3:SetRange(LOCATION_MZONE) - e3:SetCode(EFFECT_UPDATE_DEFENCE) - e3:SetValue(c98777036.value) - c:RegisterEffect(e3) - --control - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_IGNITION) - e4:SetRange(LOCATION_MZONE) - e4:SetDescription(aux.Stringid(98777036,1)) - e4:SetCategory(CATEGORY_CONTROL) - e4:SetCountLimit(1) - e4:SetProperty(EFFECT_FLAG_CARD_TARGET) - e4:SetCost(c98777036.ctcos) - e4:SetTarget(c98777036.cttar) - e4:SetOperation(c98777036.ctop) - c:RegisterEffect(e4) - --level change - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_IGNITION) - e5:SetRange(LOCATION_MZONE) - e5:SetDescription(aux.Stringid(98777036,2)) - e5:SetCountLimit(1) - e5:SetProperty(EFFECT_FLAG_CARD_TARGET) - e5:SetTarget(c98777036.lvtar) - e5:SetOperation(c98777036.lvop) - c:RegisterEffect(e5) -end -function c98777036.value(e,c) - return Duel.GetFieldGroupCount(c:GetControler(),LOCATION_HAND,0)*600 -end -function c98777036.sumcon(e,tp,eg,ep,ev,re,r,rp) - return bit.band(r,REASON_BATTLE)>0 and ep==tp -end -function c98777036.sumtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c98777036.sumop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP) - end -end -function c98777036.ctffilter(c,lv) - return c:IsControlerCanBeChanged() and c:IsFaceup() and c:GetLevel()==lv -end -function c98777036.ctfilter(c,tp) - return c:IsType(TYPE_MONSTER) and c:IsAbleToGraveAsCost() - and Duel.IsExistingTarget(c98777036.ctffilter,tp,0,LOCATION_MZONE,1,nil,c:GetLevel()) -end -function c98777036.ctcos(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c98777036.ctfilter,tp,LOCATION_HAND,0,1,nil,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local sg=Duel.SelectMatchingCard(tp,c98777036.ctfilter,tp,LOCATION_HAND,0,1,1,nil,tp) - e:SetLabel(sg:GetFirst():GetLevel()) - Duel.SendtoGrave(sg,REASON_COST) -end -function c98777036.cttar(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c98777036.ctffilter(e,e:GetLabel()) end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) - local g=Duel.SelectTarget(tp,c98777036.ctffilter,tp,0,LOCATION_MZONE,1,1,nil,e:GetLabel()) - Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0) -end -function c98777036.ctop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) and tc:IsFaceup() and not Duel.GetControl(tc,tp) then - if not tc:IsImmuneToEffect(e) and tc:IsAbleToChangeControler() then - Duel.Destroy(tc,REASON_EFFECT) - end - end -end -function c98777036.lvfilter(c) - return c:GetLevel()>0 -end -function c98777036.lvtar(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and chkc:IsType(TYPE_MONSTER) end - if chk==0 then return Duel.IsExistingTarget(c98777036.lvfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - Duel.SelectTarget(tp,c98777036.lvfilter,tp,LOCATION_GRAVE,0,1,1,nil) -end -function c98777036.lvop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - local c=e:GetHandler() - if tc:IsRelateToEffect(e) and c:IsFaceup() and c:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CHANGE_LEVEL) - e1:SetValue(tc:GetLevel()) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - c:RegisterEffect(e1) - end -end diff --git a/script/c98780137.lua b/script/c98780137.lua deleted file mode 100644 index 56f389b285..0000000000 --- a/script/c98780137.lua +++ /dev/null @@ -1,31 +0,0 @@ ---マリスボラス・ナイフ -function c98780137.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(98780137,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c98780137.target) - e1:SetOperation(c98780137.operation) - c:RegisterEffect(e1) -end -function c98780137.filter(c,e,tp) - return c:GetCode()~=98780137 and c:IsSetCard(0x8b) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c98780137.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c98780137.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c98780137.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c98780137.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,g:GetCount(),0,0) -end -function c98780137.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c98792570.lua b/script/c98792570.lua deleted file mode 100644 index 04d342c266..0000000000 --- a/script/c98792570.lua +++ /dev/null @@ -1,46 +0,0 @@ ---受け継がれる力 -function c98792570.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetLabel(0) - e1:SetCost(c98792570.cost) - e1:SetTarget(c98792570.target) - e1:SetOperation(c98792570.activate) - c:RegisterEffect(e1) -end -function c98792570.cost(e,tp,eg,ep,ev,re,r,rp,chk) - e:SetLabel(1) - return true -end -function c98792570.cfilter(c,e,tp) - return c:GetTextAttack()>0 and Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,c) -end -function c98792570.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:IsFaceup() end - if chk==0 then - if e:GetLabel()~=1 then return false end - e:SetLabel(0) - return Duel.IsExistingMatchingCard(c98792570.cfilter,tp,LOCATION_MZONE,0,1,nil,e,tp) - end - e:SetLabel(0) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,c98792570.cfilter,tp,LOCATION_MZONE,0,1,1,nil,e,tp) - Duel.SendtoGrave(g,REASON_COST) - Duel.SetTargetParam(g:GetFirst():GetTextAttack()) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,nil) -end -function c98792570.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM)) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - end -end diff --git a/script/c98847704.lua b/script/c98847704.lua deleted file mode 100644 index 75c4a0f85f..0000000000 --- a/script/c98847704.lua +++ /dev/null @@ -1,36 +0,0 @@ ---拘束解放波 -function c98847704.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c98847704.target) - e1:SetOperation(c98847704.activate) - c:RegisterEffect(e1) -end -function c98847704.filter1(c) - return c:IsFaceup() and c:IsType(TYPE_EQUIP) and c:IsDestructable() -end -function c98847704.filter2(c) - return c:IsFacedown() and c:IsDestructable() -end -function c98847704.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_SZONE) and chkc:IsControler(tp) and c98847704.filter1(chkc) end - if chk==0 then return Duel.IsExistingTarget(c98847704.filter1,tp,LOCATION_SZONE,0,1,nil) - and Duel.IsExistingMatchingCard(c98847704.filter2,tp,0,LOCATION_SZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c98847704.filter1,tp,LOCATION_SZONE,0,1,1,nil) - local dg=Duel.GetMatchingGroup(c98847704.filter2,tp,0,LOCATION_SZONE,nil) - dg:Merge(g) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,dg,dg:GetCount(),0,0) -end -function c98847704.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - local dg=Duel.GetMatchingGroup(c98847704.filter2,tp,0,LOCATION_SZONE,nil) - dg:AddCard(tc) - Duel.Destroy(dg,REASON_EFFECT) - end -end diff --git a/script/c98850929.lua b/script/c98850929.lua deleted file mode 100644 index 8fab09e89c..0000000000 --- a/script/c98850929.lua +++ /dev/null @@ -1,86 +0,0 @@ ---聖蛇の息吹 -function c98850929.initial_effect(c) - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(98850929,4)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,98850929+EFFECT_COUNT_CODE_OATH) - e1:SetTarget(c98850929.target) - e1:SetOperation(c98850929.operation) - c:RegisterEffect(e1) -end -function c98850929.cfilter(c) - return c:IsFaceup() and c:IsType(TYPE_FUSION+TYPE_RITUAL+TYPE_SYNCHRO+TYPE_XYZ) -end -function c98850929.typecast(c) - return bit.band(c:GetType(),TYPE_FUSION+TYPE_RITUAL+TYPE_SYNCHRO+TYPE_XYZ) -end -function c98850929.filter1(c,e) - return c:IsFaceup() and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() and c:IsCanBeEffectTarget(e) -end -function c98850929.filter2(c,e) - return c:IsType(TYPE_TRAP) and c:IsAbleToHand() and c:IsCanBeEffectTarget(e) -end -function c98850929.filter3(c,e) - return c:IsType(TYPE_SPELL) and c:GetCode()~=98850929 and c:IsAbleToHand() and c:IsCanBeEffectTarget(e) -end -function c98850929.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - local g=Duel.GetMatchingGroup(c98850929.cfilter,tp,LOCATION_MZONE,0,nil) - local ct=g:GetClassCount(c98850929.typecast) - local g1=Duel.GetMatchingGroup(c98850929.filter1,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,nil,e) - local g2=Duel.GetMatchingGroup(c98850929.filter2,tp,LOCATION_GRAVE,0,nil,e) - local g3=Duel.GetMatchingGroup(c98850929.filter3,tp,LOCATION_GRAVE,0,nil,e) - if chk==0 then return (ct>1 and g1:GetCount()>0) or (ct>2 and g2:GetCount()>0) or (ct>3 and g3:GetCount()>0) end - local tg=Group.CreateGroup() - local off=0 - repeat - local ops={} - local opval={} - off=1 - if ct>1 and g1:GetCount()>0 then - ops[off]=aux.Stringid(98850929,0) - opval[off-1]=1 - off=off+1 - end - if ct>2 and g2:GetCount()>0 then - ops[off]=aux.Stringid(98850929,1) - opval[off-1]=2 - off=off+1 - end - if ct>3 and g3:GetCount()>0 then - ops[off]=aux.Stringid(98850929,2) - opval[off-1]=3 - off=off+1 - end - local op=Duel.SelectOption(tp,table.unpack(ops)) - if opval[op]==1 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local sg=g1:Select(tp,1,1,nil) - tg:Merge(sg) - g1:Clear() - elseif opval[op]==2 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local sg=g2:Select(tp,1,1,nil) - tg:Merge(sg) - g2:Clear() - else - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local sg=g3:Select(tp,1,1,nil) - tg:Merge(sg) - g3:Clear() - end - until off<3 or not Duel.SelectYesNo(tp,aux.Stringid(98850929,3)) - Duel.SetTargetCard(tg) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,tg,tg:GetCount(),0,0) -end -function c98850929.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local sg=g:Filter(Card.IsRelateToEffect,nil,e) - if sg:GetCount()>0 then - Duel.SendtoHand(sg,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,sg) - end -end diff --git a/script/c98865920.lua b/script/c98865920.lua deleted file mode 100644 index 8fe8f0e616..0000000000 --- a/script/c98865920.lua +++ /dev/null @@ -1,25 +0,0 @@ ---アチャチャアーチャー -function c98865920.initial_effect(c) - --damage - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(98865920,0)) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_SINGLE) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(c98865920.target) - e1:SetOperation(c98865920.operation) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - c:RegisterEffect(e2) -end -function c98865920.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(500) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,500) -end -function c98865920.operation(e,tp,eg,ep,ev,re,r,rp,chk) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c98867329.lua b/script/c98867329.lua deleted file mode 100644 index e21b2f6acb..0000000000 --- a/script/c98867329.lua +++ /dev/null @@ -1,63 +0,0 @@ ---災いの装備品 -function c98867329.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c98867329.target) - e1:SetOperation(c98867329.operation) - c:RegisterEffect(e1) - --Atk up - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(c98867329.atkval) - c:RegisterEffect(e2) - --Equip limit - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_EQUIP_LIMIT) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e3:SetValue(1) - c:RegisterEffect(e3) - --equip - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(98867329,0)) - e4:SetCategory(CATEGORY_EQUIP) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e4:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e4:SetCode(EVENT_TO_GRAVE) - e4:SetCondition(c98867329.eqcon) - e4:SetTarget(c98867329.eqtg) - e4:SetOperation(c98867329.operation) - c:RegisterEffect(e4) -end -function c98867329.atkval(e,c) - return Duel.GetFieldGroupCount(e:GetHandlerPlayer(),LOCATION_MZONE,0)*-600 -end -function c98867329.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c98867329.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,e:GetHandler(),tc) - end -end -function c98867329.eqcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) -end -function c98867329.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsFaceup() end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end diff --git a/script/c9888196.lua b/script/c9888196.lua deleted file mode 100644 index fbc704449b..0000000000 --- a/script/c9888196.lua +++ /dev/null @@ -1,114 +0,0 @@ ---A・O・J ディサイシブ・アームズ -function c9888196.initial_effect(c) - --synchro summon - aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),2) - c:EnableReviveLimit() - --destroy1 - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(9888196,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c9888196.con) - e1:SetTarget(c9888196.destg1) - e1:SetOperation(c9888196.desop1) - c:RegisterEffect(e1) - --destroy2 - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(9888196,1)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE) - e2:SetRange(LOCATION_MZONE) - e2:SetCondition(c9888196.con) - e2:SetCost(c9888196.descost2) - e2:SetTarget(c9888196.destg2) - e2:SetOperation(c9888196.desop2) - c:RegisterEffect(e2) - --handes - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(9888196,2)) - e3:SetCategory(CATEGORY_HANDES+CATEGORY_TOGRAVE+CATEGORY_DAMAGE) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE) - e3:SetRange(LOCATION_MZONE) - e3:SetCondition(c9888196.con) - e3:SetCost(c9888196.hdcost) - e3:SetTarget(c9888196.hdtg) - e3:SetOperation(c9888196.hdop) - c:RegisterEffect(e3) -end -function c9888196.confilter(c) - return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_LIGHT) -end -function c9888196.con(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(c9888196.confilter,tp,0,LOCATION_MZONE,1,nil) -end -function c9888196.filter1(c) - return c:IsFacedown() and c:IsDestructable() -end -function c9888196.destg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() and c9888196.filter1(chkc) end - if chk==0 then return Duel.IsExistingTarget(c9888196.filter1,tp,0,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c9888196.filter1,tp,0,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c9888196.desop1(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFacedown() then - Duel.Destroy(tc,REASON_EFFECT) - end -end -function c9888196.descost2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,1,nil) end - Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,1,1,nil) - Duel.SendtoGrave(g,REASON_COST) -end -function c9888196.filter2(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable() -end -function c9888196.destg2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c9888196.filter2,tp,0,LOCATION_ONFIELD,1,nil) end - local g=Duel.GetMatchingGroup(c9888196.filter2,tp,0,LOCATION_ONFIELD,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c9888196.desop2(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c9888196.filter2,tp,0,LOCATION_ONFIELD,nil) - Duel.Destroy(g,REASON_EFFECT) -end -function c9888196.hdcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,1,nil) end - Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) - local g=Duel.GetFieldGroup(tp,LOCATION_HAND,0) - Duel.SendtoGrave(g,REASON_COST) -end -function c9888196.hdtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0 end - Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,1-tp,0) - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,0,1-tp,LOCATION_HAND) -end -function c9888196.hdop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND) - Duel.ConfirmCards(tp,g) - local sg=g:Filter(Card.IsAttribute,nil,ATTRIBUTE_LIGHT) - if sg:GetCount()>0 then - local atk=0 - Duel.SendtoGrave(sg,REASON_EFFECT) - local tc=sg:GetFirst() - while tc do - local tatk=tc:GetAttack() - if tatk<0 then tatk=0 end - atk=atk+tatk - tc=sg:GetNext() - end - Duel.BreakEffect() - Duel.Damage(1-tp,atk,REASON_EFFECT) - end - Duel.ShuffleHand(1-tp) -end diff --git a/script/c98884569.lua b/script/c98884569.lua deleted file mode 100644 index d52c3f2fe5..0000000000 --- a/script/c98884569.lua +++ /dev/null @@ -1,33 +0,0 @@ ---ブルーローズ・ドラゴン -function c98884569.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(98884569,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCondition(c98884569.condition) - e1:SetTarget(c98884569.target) - e1:SetOperation(c98884569.operation) - c:RegisterEffect(e1) -end -function c98884569.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) and e:GetHandler():IsReason(REASON_DESTROY) -end -function c98884569.filter(c,e,tp) - return (c:IsRace(RACE_PLANT) or c:GetCode()==73580471) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c98884569.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c98884569.filter(chkc,e,tp) end - if chk==0 then return Duel.IsExistingTarget(c98884569.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c98884569.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,g:GetCount(),0,0) -end -function c98884569.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c98891840.lua b/script/c98891840.lua deleted file mode 100644 index 23974d5ec7..0000000000 --- a/script/c98891840.lua +++ /dev/null @@ -1,39 +0,0 @@ ---休息する剣闘獣 -function c98891840.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c98891840.target) - e1:SetOperation(c98891840.activate) - c:RegisterEffect(e1) -end -function c98891840.filter(c) - return c:IsSetCard(0x19) and c:IsAbleToDeck() -end -function c98891840.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp,3) - and Duel.IsExistingMatchingCard(c98891840.filter,tp,LOCATION_HAND,0,2,e:GetHandler()) end - Duel.SetTargetPlayer(tp) - Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,2,tp,LOCATION_HAND) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,3) -end -function c98891840.activate(e,tp,eg,ep,ev,re,r,rp) - local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) - local g=Duel.GetMatchingGroup(c98891840.filter,p,LOCATION_HAND,0,nil) - if g:GetCount()<2 then - local hg=Duel.GetFieldGroup(p,LOCATION_HAND,0) - Duel.ConfirmCards(1-p,hg) - Duel.ShuffleHand(p) - else - Duel.Hint(HINT_SELECTMSG,p,HINTMSG_TODECK) - local sg=g:Select(p,2,2,nil) - Duel.ConfirmCards(1-p,sg) - Duel.SendtoDeck(sg,nil,2,REASON_EFFECT) - Duel.ShuffleDeck(p) - Duel.BreakEffect() - Duel.Draw(p,3,REASON_EFFECT) - end -end diff --git a/script/c98927491.lua b/script/c98927491.lua deleted file mode 100644 index 7a75299309..0000000000 --- a/script/c98927491.lua +++ /dev/null @@ -1,43 +0,0 @@ ---レスキューキューロイド -function c98927491.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcCode2(c,24311595,36378213,true,true) - --spsummon condition - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(aux.fuslimit) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(98927491,0)) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetCode(EVENT_BATTLE_DESTROYED) - e2:SetTarget(c98927491.target) - e2:SetOperation(c98927491.activate) - c:RegisterEffect(e2) -end -function c98927491.filter(c,e,tp) - return c:IsLocation(LOCATION_GRAVE) and c:IsReason(REASON_BATTLE) and c:GetPreviousControler()==tp - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c98927491.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local g=eg:Filter(c98927491.filter,nil,e,tp) - e:SetLabelObject(g:GetFirst()) - return g:GetCount()~=0 - end - Duel.SetTargetCard(e:GetLabelObject()) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetLabelObject(),1,0,0) -end -function c98927491.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENCE) - end -end diff --git a/script/c98931003.lua b/script/c98931003.lua deleted file mode 100644 index e2784f780f..0000000000 --- a/script/c98931003.lua +++ /dev/null @@ -1,34 +0,0 @@ ---ナナナ -function c98931003.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c98931003.target) - e1:SetOperation(c98931003.operation) - c:RegisterEffect(e1) -end -function c98931003.filter(c) - return c:IsFaceup() and (c:GetLevel()==7 or c:GetRank()==7) -end -function c98931003.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c98931003.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c98931003.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c98931003.filter,tp,LOCATION_MZONE,0,1,1,nil) -end -function c98931003.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(700) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - tc:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_UPDATE_DEFENCE) - tc:RegisterEffect(e2) - end -end diff --git a/script/c98954106.lua b/script/c98954106.lua deleted file mode 100644 index d4ea703299..0000000000 --- a/script/c98954106.lua +++ /dev/null @@ -1,37 +0,0 @@ ---貪欲な瓶 -function c98954106.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,98954106+EFFECT_COUNT_CODE_OATH) - e1:SetTarget(c98954106.target) - e1:SetOperation(c98954106.activate) - c:RegisterEffect(e1) -end -function c98954106.filter(c) - return not c:IsCode(98954106) and c:IsAbleToDeck() -end -function c98954106.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c98954106.filter(chkc) end - if chk==0 then return Duel.IsPlayerCanDraw(tp,1) - and Duel.IsExistingTarget(c98954106.filter,tp,LOCATION_GRAVE,0,5,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectTarget(tp,c98954106.filter,tp,LOCATION_GRAVE,0,5,5,nil) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,5,0,0) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c98954106.activate(e,tp,eg,ep,ev,re,r,rp) - local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - if tg:FilterCount(Card.IsRelateToEffect,nil,e)~=5 then return end - Duel.SendtoDeck(tg,nil,0,REASON_EFFECT) - Duel.ShuffleDeck(tp) - local g=Duel.GetOperatedGroup() - local ct=g:FilterCount(Card.IsLocation,nil,LOCATION_DECK+LOCATION_EXTRA) - if ct==5 then - Duel.BreakEffect() - Duel.Draw(tp,1,REASON_EFFECT) - end -end diff --git a/script/c98954375.lua b/script/c98954375.lua deleted file mode 100644 index f9431b9bbc..0000000000 --- a/script/c98954375.lua +++ /dev/null @@ -1,31 +0,0 @@ ---インフェルニティ・デストロイヤー -function c98954375.initial_effect(c) - --damage - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(98954375,0)) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetCode(EVENT_BATTLE_DESTROYING) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCondition(c98954375.damcon) - e1:SetTarget(c98954375.damtg) - e1:SetOperation(c98954375.damop) - c:RegisterEffect(e1) -end -function c98954375.damcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local d=Duel.GetAttacker() - if d==c then d=Duel.GetAttackTarget() end - return c:IsRelateToBattle() and Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)==0 - and d:IsLocation(LOCATION_GRAVE) and d:IsReason(REASON_BATTLE) and d:IsType(TYPE_MONSTER) -end -function c98954375.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(1600) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,1600) -end -function c98954375.damop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)>0 then return end - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c98956134.lua b/script/c98956134.lua deleted file mode 100644 index 538a87cfab..0000000000 --- a/script/c98956134.lua +++ /dev/null @@ -1,35 +0,0 @@ ---デストラクション・ジャマー -function c98956134.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_CHAINING) - e1:SetCondition(c98956134.condition) - e1:SetCost(c98956134.cost) - e1:SetTarget(c98956134.target) - e1:SetOperation(c98956134.activate) - c:RegisterEffect(e1) -end -function c98956134.condition(e,tp,eg,ep,ev,re,r,rp) - if not Duel.IsChainNegatable(ev) then return false end - local ex,tg,tc=Duel.GetOperationInfo(ev,CATEGORY_DESTROY) - return ex and tg~=nil and tc+tg:FilterCount(Card.IsLocation,nil,LOCATION_MZONE)-tg:GetCount()>0 -end -function c98956134.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) -end -function c98956134.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) - end -end -function c98956134.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateActivation(ev) - if re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(eg,REASON_EFFECT) - end -end diff --git a/script/c9897998.lua b/script/c9897998.lua deleted file mode 100644 index d582e798bd..0000000000 --- a/script/c9897998.lua +++ /dev/null @@ -1,37 +0,0 @@ ---ガスタ・コドル -function c9897998.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(9897998,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_BATTLE_DESTROYING) - e1:SetCondition(c9897998.condition) - e1:SetTarget(c9897998.target) - e1:SetOperation(c9897998.operation) - c:RegisterEffect(e1) -end -function c9897998.condition(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local a=Duel.GetAttacker() - local d=Duel.GetAttackTarget() - return c:IsRelateToBattle() and ((a==c and d:IsLocation(LOCATION_GRAVE) and d:IsType(TYPE_MONSTER)) - or (d==c and a:IsLocation(LOCATION_GRAVE) and a:IsType(TYPE_MONSTER))) -end -function c9897998.filter(c,e,tp) - return c:IsDefenceBelow(1500) and c:IsRace(RACE_PSYCHO) and c:IsAttribute(ATTRIBUTE_WIND) - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c9897998.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c9897998.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c9897998.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g = Duel.SelectMatchingCard(tp,c9897998.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c99000151.lua b/script/c99000151.lua deleted file mode 100644 index 42f881fa1c..0000000000 --- a/script/c99000151.lua +++ /dev/null @@ -1,32 +0,0 @@ ---死の花-ネクロ・フルール -function c99000151.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(99000151,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCondition(c99000151.condition) - e1:SetTarget(c99000151.target) - e1:SetOperation(c99000151.operation) - c:RegisterEffect(e1) -end -function c99000151.condition(e,tp,eg,ep,ev,re,r,rp) - return bit.band(e:GetHandler():GetReason(),0x41)==0x41 -end -function c99000151.filter(c,e,tp) - return c:GetCode()==36405256 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c99000151.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c99000151.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c99000151.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local tc=Duel.GetFirstMatchingCard(c99000151.filter,tp,LOCATION_DECK,0,nil,e,tp) - if tc then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c99002135.lua b/script/c99002135.lua deleted file mode 100644 index b594a303ed..0000000000 --- a/script/c99002135.lua +++ /dev/null @@ -1,38 +0,0 @@ ---緊急合成 -function c99002135.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c99002135.cost) - e1:SetTarget(c99002135.target) - e1:SetOperation(c99002135.activate) - c:RegisterEffect(e1) -end -function c99002135.cfilter(c) - return c:IsCode(36623431) and c:IsAbleToDeckAsCost() -end -function c99002135.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c99002135.cfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectMatchingCard(tp,c99002135.cfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SendtoDeck(g,nil,2,REASON_COST) -end -function c99002135.spfilter(c,e,tp) - return c:IsLevelBelow(4) and c:IsSetCard(0x1d) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) - and not c:IsHasEffect(EFFECT_NECRO_VALLEY) -end -function c99002135.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c99002135.spfilter,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_HAND) -end -function c99002135.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c99002135.spfilter,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,1,nil,e,tp) - if g:GetCount()~=0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c99004752.lua b/script/c99004752.lua deleted file mode 100644 index 57c48d9805..0000000000 --- a/script/c99004752.lua +++ /dev/null @@ -1,64 +0,0 @@ ---ミニマム・ガッツ -function c99004752.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c99004752.cost) - e1:SetTarget(c99004752.target) - e1:SetOperation(c99004752.activate) - c:RegisterEffect(e1) -end -function c99004752.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,nil,1,nil) end - local g=Duel.SelectReleaseGroup(tp,nil,1,1,nil) - Duel.Release(g,REASON_COST) -end -function c99004752.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil) -end -function c99004752.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetValue(0) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetDescription(aux.Stringid(99004752,0)) - e2:SetCategory(CATEGORY_DAMAGE) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_BATTLE_DESTROYED) - e2:SetCondition(c99004752.damcon) - e2:SetTarget(c99004752.damtg) - e2:SetOperation(c99004752.damop) - e2:SetReset(RESET_PHASE+PHASE_END) - e2:SetLabelObject(tc) - Duel.RegisterEffect(e2,tp) - tc:RegisterFlagEffect(99004752,RESET_EVENT+0x17a0000+RESET_PHASE+PHASE_END,0,1) - end -end -function c99004752.damcon(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetLabelObject() - return eg:IsContains(tc) and tc:GetFlagEffect(99004752)~=0 and tc:GetOwner()==1-tp - and tc:IsLocation(LOCATION_GRAVE) and tc:IsReason(REASON_BATTLE) -end -function c99004752.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local atk=e:GetLabelObject():GetBaseAttack() - if atk<0 then atk=0 end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(atk) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,atk) -end -function c99004752.damop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c99013397.lua b/script/c99013397.lua deleted file mode 100644 index 529122ebfa..0000000000 --- a/script/c99013397.lua +++ /dev/null @@ -1,97 +0,0 @@ ---剣闘獣の闘器ハルバード -function c99013397.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c99013397.target) - e1:SetOperation(c99013397.operation) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetDescription(aux.Stringid(99013397,0)) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_DAMAGE_STEP_END) - e2:SetRange(LOCATION_SZONE) - e2:SetCondition(c99013397.descon) - e2:SetTarget(c99013397.destg) - e2:SetOperation(c99013397.desop) - c:RegisterEffect(e2) - --Equip limit - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_EQUIP_LIMIT) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e3:SetValue(c99013397.eqlimit) - c:RegisterEffect(e3) - --tohand - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e4:SetCategory(CATEGORY_TOHAND) - e4:SetDescription(aux.Stringid(99013397,1)) - e4:SetCode(EVENT_TO_GRAVE) - e4:SetCondition(c99013397.retcon) - e4:SetTarget(c99013397.rettg) - e4:SetOperation(c99013397.retop) - c:RegisterEffect(e4) -end -function c99013397.eqlimit(e,c) - return c:IsSetCard(0x19) -end -function c99013397.filter(c) - return c:IsFaceup() and c:IsSetCard(0x19) -end -function c99013397.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c99013397.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c99013397.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,c99013397.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c99013397.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,c,tc) - end -end -function c99013397.descon(e,tp,eg,ep,ev,re,r,rp) - local eqc=e:GetHandler():GetEquipTarget() - return eqc==Duel.GetAttacker() -end -function c99013397.dfilter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable() -end -function c99013397.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and c99013397.dfilter(chkc) end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c99013397.dfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c99013397.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end -function c99013397.retcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local ec=c:GetPreviousEquipTarget() - return c:IsReason(REASON_LOST_TARGET) and (ec:GetLocation()==LOCATION_DECK or ec:GetLocation()==LOCATION_EXTRA) -end -function c99013397.rettg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToHand() end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0) -end -function c99013397.retop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SendtoHand(c,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,c) - end -end diff --git a/script/c99050989.lua b/script/c99050989.lua deleted file mode 100644 index 9be23eafc8..0000000000 --- a/script/c99050989.lua +++ /dev/null @@ -1,17 +0,0 @@ ---ドリラゴ -function c99050989.initial_effect(c) - --direct attack - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DIRECT_ATTACK) - e1:SetCondition(c99050989.dircon) - c:RegisterEffect(e1) -end -function c99050989.filter(c) - return c:GetAttack()<1600 or c:IsFacedown() -end -function c99050989.dircon(e) - local tp=e:GetHandlerPlayer() - return Duel.GetFieldGroupCount(tp,0,LOCATION_SZONE)==0 - and not Duel.IsExistingMatchingCard(c99050989.filter,tp,0,LOCATION_MZONE,1,nil) -end diff --git a/script/c99064191.lua b/script/c99064191.lua deleted file mode 100644 index e967c0cd9e..0000000000 --- a/script/c99064191.lua +++ /dev/null @@ -1,75 +0,0 @@ ---エクシーズ・パニッシュ -function c99064191.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c99064191.target1) - e1:SetOperation(c99064191.activate1) - c:RegisterEffect(e1) - --instant(chain) - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(99064191,0)) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetRange(LOCATION_SZONE) - e2:SetCode(EVENT_CHAINING) - e2:SetCondition(c99064191.condition2) - e2:SetCost(c99064191.cost2) - e2:SetTarget(c99064191.target2) - e2:SetOperation(c99064191.activate2) - c:RegisterEffect(e2) -end -function c99064191.cfilter(c) - return c:IsFaceup() and c:IsType(TYPE_XYZ) -end -function c99064191.target1(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - e:SetLabel(0) - local ct=Duel.GetCurrentChain() - if ct==1 or not Duel.IsExistingMatchingCard(c99064191.cfilter,tp,LOCATION_MZONE,0,1,nil) - or not Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) then return false end - local pe=Duel.GetChainInfo(ct-1,CHAININFO_TRIGGERING_EFFECT) - local tc=pe:GetHandler() - if pe:IsActiveType(TYPE_EFFECT) and tc:IsLevelAbove(5) - and Duel.IsChainDisablable(ct-1) and Duel.SelectYesNo(tp,aux.Stringid(99064191,1)) then - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) - Duel.SetOperationInfo(0,CATEGORY_DISABLE,tc,1,0,0) - if tc:IsDestructable() and tc:IsRelateToEffect(pe) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,tc,1,0,0) - end - e:SetLabel(1) - e:GetHandler():RegisterFlagEffect(99064191,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) - end -end -function c99064191.activate1(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if e:GetLabel()~=1 or not c:IsRelateToEffect(e) then return end - local ct=Duel.GetChainInfo(0,CHAININFO_CHAIN_COUNT) - local te=Duel.GetChainInfo(ct-1,CHAININFO_TRIGGERING_EFFECT) - local tc=te:GetHandler() - if Duel.NegateEffect(ct-1) and tc:IsRelateToEffect(te) then - Duel.Destroy(tc,REASON_EFFECT) - end -end -function c99064191.condition2(e,tp,eg,ep,ev,re,r,rp,chk) - return Duel.IsExistingMatchingCard(c99064191.cfilter,tp,LOCATION_MZONE,0,1,nil) - and re:IsActiveType(TYPE_EFFECT) and re:GetHandler():IsLevelAbove(5) and Duel.IsChainDisablable(ev) -end -function c99064191.cost2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) -end -function c99064191.target2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():GetFlagEffect(99064191)==0 end - Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0) - if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) - end - e:GetHandler():RegisterFlagEffect(99064191,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) -end -function c99064191.activate2(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - if Duel.NegateEffect(ev) and re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(eg,REASON_EFFECT) - end -end diff --git a/script/c99070951.lua b/script/c99070951.lua deleted file mode 100644 index 5c2f30a3ca..0000000000 --- a/script/c99070951.lua +++ /dev/null @@ -1,60 +0,0 @@ ---サイ・ガール -function c99070951.initial_effect(c) - --remove - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(99070951,0)) - e1:SetCategory(CATEGORY_REMOVE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(c99070951.rmcon) - e1:SetTarget(c99070951.rmtg) - e1:SetOperation(c99070951.rmop) - c:RegisterEffect(e1) - --add to hand - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(99070951,1)) - e2:SetCategory(CATEGORY_TOHAND) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetCondition(c99070951.thcon) - e2:SetTarget(c99070951.thtg) - e2:SetOperation(c99070951.thop) - e2:SetLabelObject(e1) - c:RegisterEffect(e2) -end -function c99070951.rmcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_REMOVED) -end -function c99070951.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_DECK) -end -function c99070951.rmop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local g=Duel.GetDecktopGroup(tp,1) - local tc=g:GetFirst() - if not tc or not tc:IsAbleToRemove() then return end - Duel.DisableShuffleCheck() - Duel.Remove(tc,POS_FACEDOWN,REASON_EFFECT) - tc:RegisterFlagEffect(99070951,RESET_EVENT+0x1fe0000,0,1) - if c:IsLocation(LOCATION_MZONE) then - c:RegisterFlagEffect(99070951,RESET_EVENT+0x680000,0,1) - end - e:SetLabelObject(tc) -end -function c99070951.thcon(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetLabelObject():GetLabelObject() - return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) and e:GetHandler():GetFlagEffect(99070951)~=0 - and tc and tc:GetFlagEffect(99070951)~=0 -end -function c99070951.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local tc=e:GetLabelObject():GetLabelObject() - Duel.SetOperationInfo(0,CATEGORY_TOHAND,tc,1,0,0) -end -function c99070951.thop(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetLabelObject():GetLabelObject() - if tc and tc:GetFlagEffect(99070951)~=0 then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - end -end diff --git a/script/c99075257.lua b/script/c99075257.lua deleted file mode 100644 index 797b9a8aa5..0000000000 --- a/script/c99075257.lua +++ /dev/null @@ -1,33 +0,0 @@ ---D-タイム -function c99075257.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetCode(EVENT_LEAVE_FIELD) - e1:SetCondition(c99075257.condition) - e1:SetTarget(c99075257.target) - e1:SetOperation(c99075257.operation) - c:RegisterEffect(e1) -end -function c99075257.condition(e,tp,eg,ep,ev,re,r,rp) - local tc=eg:GetFirst() - local lv=tc:GetLevel() - return eg:GetCount()==1 and tc:IsSetCard(0x3008) and tc:IsPreviousPosition(POS_FACEUP) and tc:GetPreviousControler()==tp -end -function c99075257.filter(c,lv) - return c:IsLevelBelow(lv) and c:IsSetCard(0xc008) and c:IsAbleToHand() -end -function c99075257.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c99075257.filter,tp,LOCATION_DECK,0,1,nil,eg:GetFirst():GetLevel()) end - e:SetLabel(eg:GetFirst():GetLevel()) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c99075257.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c99075257.filter,tp,LOCATION_DECK,0,1,1,nil,e:GetLabel()) - if g:GetCount()~=0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c9910360.lua b/script/c9910360.lua deleted file mode 100644 index 3f179cf548..0000000000 --- a/script/c9910360.lua +++ /dev/null @@ -1,17 +0,0 @@ ---ガエル・サンデス -function c9910360.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcCodeRep(c,84451804,3,false,false) - --atk - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(c9910360.atkval) - c:RegisterEffect(e2) -end -function c9910360.atkval(e,c) - return Duel.GetMatchingGroupCount(Card.IsCode,c:GetControler(),LOCATION_GRAVE,0,nil,12538374)*500 -end diff --git a/script/c99150062.lua b/script/c99150062.lua deleted file mode 100644 index c21a999d1e..0000000000 --- a/script/c99150062.lua +++ /dev/null @@ -1,34 +0,0 @@ ---ナチュル・アントジョー -function c99150062.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(99150062,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c99150062.spcon) - e1:SetTarget(c99150062.sptg) - e1:SetOperation(c99150062.spop) - c:RegisterEffect(e1) -end -function c99150062.cfilter(c,tp) - return c:GetSummonPlayer()~=tp -end -function c99150062.spcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c99150062.cfilter,1,nil,tp) -end -function c99150062.filter(c,e,tp) - return c:IsSetCard(0x2a) and c:GetLevel()<=3 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c99150062.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c99150062.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c99150062.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c99150062.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) -end diff --git a/script/c99173029.lua b/script/c99173029.lua deleted file mode 100644 index 49bc7a2cde..0000000000 --- a/script/c99173029.lua +++ /dev/null @@ -1,50 +0,0 @@ ---霊子エネルギー固定装置 -function c99173029.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --spirit do not return - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_SPIRIT_DONOT_RETURN) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - c:RegisterEffect(e2) - --leave - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e3:SetCode(EVENT_LEAVE_FIELD) - e3:SetOperation(c99173029.levop) - c:RegisterEffect(e3) - --maintain - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e4:SetCode(EVENT_PHASE+PHASE_END) - e4:SetRange(LOCATION_SZONE) - e4:SetCountLimit(1) - e4:SetCondition(c99173029.mtcon) - e4:SetOperation(c99173029.mtop) - c:RegisterEffect(e4) -end -function c99173029.filter(c) - return c:IsFaceup() and c:IsType(TYPE_SPIRIT) -end -function c99173029.levop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c99173029.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - end -end -function c99173029.mtcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c99173029.mtop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)>0 and Duel.SelectYesNo(tp,aux.Stringid(99173029,0)) then - Duel.DiscardHand(tp,nil,1,1,REASON_COST+REASON_DISCARD) - else - Duel.Destroy(e:GetHandler(),REASON_RULE) - end -end diff --git a/script/c99177923.lua b/script/c99177923.lua deleted file mode 100644 index 381aa5c340..0000000000 --- a/script/c99177923.lua +++ /dev/null @@ -1,65 +0,0 @@ ---インフェルニティ・デーモン -function c99177923.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(99177923,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetCode(EVENT_DRAW) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c99177923.spcon) - e1:SetCost(c99177923.spcost) - e1:SetTarget(c99177923.sptg) - e1:SetOperation(c99177923.spop) - c:RegisterEffect(e1) - --search - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(99177923,1)) - e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCondition(c99177923.srcon) - e2:SetTarget(c99177923.srtg) - e2:SetOperation(c99177923.srop) - c:RegisterEffect(e2) -end -function c99177923.spcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local ct=Duel.GetFieldGroupCount(tp,LOCATION_HAND,0) - return ev==ct and eg:IsContains(c) -end -function c99177923.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return not e:GetHandler():IsPublic() end -end -function c99177923.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0) -end -function c99177923.spop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP) - end -end -function c99177923.srcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)==0 -end -function c99177923.filter(c) - return c:IsSetCard(0xb) and c:IsAbleToHand() -end -function c99177923.srtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c99177923.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c99177923.srop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)>0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c99177923.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c99185129.lua b/script/c99185129.lua deleted file mode 100644 index f659c1eef6..0000000000 --- a/script/c99185129.lua +++ /dev/null @@ -1,99 +0,0 @@ ---クラウソラスの影霊衣 -function c99185129.initial_effect(c) - c:EnableReviveLimit() - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(aux.ritlimit) - c:RegisterEffect(e1) - --tohand - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(99185129,0)) - e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_HAND) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetCountLimit(1,99185129) - e2:SetCost(c99185129.thcost) - e2:SetTarget(c99185129.thtg) - e2:SetOperation(c99185129.thop) - c:RegisterEffect(e2) - --atk - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(99185129,1)) - e3:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DISABLE) - e3:SetType(EFFECT_TYPE_QUICK_O) - e3:SetCode(EVENT_FREE_CHAIN) - e3:SetRange(LOCATION_MZONE) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e3:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP+0x1c0) - e3:SetCountLimit(1,99185130) - e3:SetCondition(c99185129.condition) - e3:SetTarget(c99185129.target) - e3:SetOperation(c99185129.operation) - c:RegisterEffect(e3) -end -function c99185129.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsDiscardable() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD) -end -function c99185129.thfilter(c) - return c:IsSetCard(0xb4) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand() -end -function c99185129.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c99185129.thfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c99185129.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c99185129.thfilter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end -function c99185129.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end -function c99185129.filter(c) - return c:GetSummonLocation()==LOCATION_EXTRA and not (c:GetAttack()==0 and c:IsDisabled()) -end -function c99185129.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and c99185129.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c99185129.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - Duel.SelectTarget(tp,c99185129.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) -end -function c99185129.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetValue(0) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - tc:RegisterEffect(e1) - Duel.NegateRelatedChain(tc,RESET_TURN_SET) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - tc:RegisterEffect(e2) - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_DISABLE_EFFECT) - e3:SetValue(RESET_TURN_SET) - e3:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - tc:RegisterEffect(e3) - if tc:IsType(TYPE_TRAPMONSTER) then - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetCode(EFFECT_DISABLE_TRAPMONSTER) - e4:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) - tc:RegisterEffect(e4) - end - end -end diff --git a/script/c99188141.lua b/script/c99188141.lua deleted file mode 100644 index 2516793057..0000000000 --- a/script/c99188141.lua +++ /dev/null @@ -1,31 +0,0 @@ ---大革命返し -function c99188141.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_NEGATE+CATEGORY_REMOVE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_CHAINING) - e1:SetCondition(c99188141.condition) - e1:SetTarget(c99188141.target) - e1:SetOperation(c99188141.activate) - c:RegisterEffect(e1) -end -function c99188141.condition(e,tp,eg,ep,ev,re,r,rp) - if (not re:IsActiveType(TYPE_MONSTER) and not re:IsHasType(EFFECT_TYPE_ACTIVATE)) - or not Duel.IsChainNegatable(ev) then return false end - local ex,tg,tc=Duel.GetOperationInfo(ev,CATEGORY_DESTROY) - return ex and tg~=nil and tc+tg:FilterCount(Card.IsOnField,nil)-tg:GetCount()>1 -end -function c99188141.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return re:GetHandler():IsAbleToRemove() end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - if re:GetHandler():IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_REMOVE,eg,1,0,0) - end -end -function c99188141.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateActivation(ev) - if re:GetHandler():IsRelateToEffect(re) then - Duel.Remove(re:GetHandler(),POS_FACEUP,REASON_EFFECT) - end -end diff --git a/script/c99189322.lua b/script/c99189322.lua deleted file mode 100644 index 46f8aa759a..0000000000 --- a/script/c99189322.lua +++ /dev/null @@ -1,60 +0,0 @@ ---アルカナコール -function c99189322.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c99189322.target) - e1:SetOperation(c99189322.activate) - c:RegisterEffect(e1) -end -function c99189322.filter(c) - return c:GetFlagEffect(36690018)~=0 -end -function c99189322.rfilter(c) - return c:IsSetCard(0x5) and c:IsAbleToRemove() -end -function c99189322.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - if chk==0 then return Duel.IsExistingTarget(c99189322.filter,tp,LOCATION_MZONE,0,1,nil) - and Duel.IsExistingTarget(c99189322.rfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,c99189322.filter,tp,LOCATION_MZONE,0,1,1,nil) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,c99189322.rfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) - e:SetLabelObject(g:GetFirst()) -end -function c99189322.activate(e,tp,eg,ep,ev,re,r,rp) - local regc=e:GetLabelObject() - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local tc=g:GetFirst() - if tc==regc then tc=g:GetNext() end - if tc:IsRelateToEffect(e) and tc:IsFaceup() and c99189322.filter(tc) and regc:IsRelateToEffect(e) then - Duel.Remove(regc,POS_FACEUP,REASON_EFFECT) - local regfun=regc.arcanareg - if not regfun then return end - local val=tc:GetFlagEffectLabel(36690018) - tc:ResetEffect(RESET_DISABLE,RESET_EVENT) - regfun(tc,val) - tc:RegisterFlagEffect(99189322,RESET_EVENT+0x1ff0000+RESET_PHASE+PHASE_END,0,1) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetCountLimit(1) - e1:SetLabelObject(tc) - e1:SetOperation(c99189322.rec_effect) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) - end -end -function c99189322.rec_effect(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetLabelObject() - if tc:GetFlagEffect(99189322)==0 or tc:GetFlagEffect(36690018)==0 then return end - local regfun=tc.arcanareg - if not regfun then return end - local val=tc:GetFlagEffectLabel(36690018) - tc:ResetEffect(RESET_DISABLE,RESET_EVENT) - regfun(tc,val) -end diff --git a/script/c99212922.lua b/script/c99212922.lua deleted file mode 100644 index 8af82cd080..0000000000 --- a/script/c99212922.lua +++ /dev/null @@ -1,26 +0,0 @@ ---白竜の忍者 -function c99212922.initial_effect(c) - --spsummon limit - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(c99212922.splimit) - c:RegisterEffect(e1) - --indes - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - e2:SetProperty(EFFECT_FLAG_SET_AVAILABLE) - e2:SetRange(LOCATION_MZONE) - e2:SetTargetRange(LOCATION_ONFIELD,0) - e2:SetTarget(c99212922.indes) - e2:SetValue(1) - c:RegisterEffect(e2) -end -function c99212922.splimit(e,se,sp,st) - return se:GetHandler():IsSetCard(0x61) -end -function c99212922.indes(e,c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) -end diff --git a/script/c99214782.lua b/script/c99214782.lua deleted file mode 100644 index 9b7dc766bf..0000000000 --- a/script/c99214782.lua +++ /dev/null @@ -1,18 +0,0 @@ ---インヴェルズの歩哨 -function c99214782.initial_effect(c) - --cannot trigger - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_TRIGGER) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c99214782.condition) - e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e1:SetTarget(c99214782.target) - c:RegisterEffect(e1) -end -function c99214782.condition(e) - return e:GetHandler():IsAttackPos() -end -function c99214782.target(e,c) - return c:GetLevel()>=5 and bit.band(c:GetSummonType(),SUMMON_TYPE_SPECIAL)~=0 -end diff --git a/script/c99234526.lua b/script/c99234526.lua deleted file mode 100644 index 93dbbb6920..0000000000 --- a/script/c99234526.lua +++ /dev/null @@ -1,63 +0,0 @@ ---輝白竜 ワイバースター -function c99234526.initial_effect(c) - c:EnableReviveLimit() - --cannot special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_SPSUMMON_PROC) - e2:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e2:SetRange(LOCATION_HAND) - e2:SetCountLimit(1,99234526) - e2:SetCondition(c99234526.spcon) - e2:SetOperation(c99234526.spop) - c:RegisterEffect(e2) - --search - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(99234526,0)) - e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e3:SetCode(EVENT_TO_GRAVE) - e3:SetCondition(c99234526.condition) - e3:SetTarget(c99234526.target) - e3:SetOperation(c99234526.operation) - c:RegisterEffect(e3) -end -function c99234526.spfilter(c) - return c:IsAttribute(ATTRIBUTE_DARK) and c:IsAbleToRemoveAsCost() -end -function c99234526.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c99234526.spfilter,tp,LOCATION_GRAVE,0,1,nil) -end -function c99234526.spop(e,tp,eg,ep,ev,re,r,rp,c) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,c99234526.spfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c99234526.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) -end -function c99234526.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c99234526.filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c99234526.filter(c) - return c:IsCode(61901281) and c:IsAbleToHand() -end -function c99234526.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c99234526.filter,tp,LOCATION_DECK,0,1,1,nil) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c9925982.lua b/script/c9925982.lua deleted file mode 100644 index 8345cfddab..0000000000 --- a/script/c9925982.lua +++ /dev/null @@ -1,34 +0,0 @@ ---ブラック・リベンジ -function c9925982.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetCondition(c9925982.condition) - e1:SetTarget(c9925982.target) - e1:SetOperation(c9925982.activate) - c:RegisterEffect(e1) -end -function c9925982.cfilter(c,tp) - return c:IsReason(REASON_BATTLE) and c:IsLocation(LOCATION_GRAVE) and c:GetPreviousControler()==tp and c:IsRace(RACE_WINDBEAST) -end -function c9925982.condition(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c9925982.cfilter,1,nil,tp) -end -function c9925982.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>1 - and Duel.IsPlayerCanSpecialSummonMonster(tp,9925983,0,0x4011,0,800,2,RACE_WINDBEAST,ATTRIBUTE_DARK) end - Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,2,0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,0,0) -end -function c9925982.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)>1 - and Duel.IsPlayerCanSpecialSummonMonster(tp,9925983,0,0x4011,0,800,2,RACE_WINDBEAST,ATTRIBUTE_DARK) then - for i=1,2 do - local token=Duel.CreateToken(tp,9925983) - Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP) - end - Duel.SpecialSummonComplete() - end -end diff --git a/script/c99267150.lua b/script/c99267150.lua deleted file mode 100644 index 0c2d13438b..0000000000 --- a/script/c99267150.lua +++ /dev/null @@ -1,58 +0,0 @@ ---F・G・D -function c99267150.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcFunRep(c,aux.FilterBoolFunction(Card.IsRace,RACE_DRAGON),5,true) - --battle indestructable - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e2:SetValue(c99267150.batfilter) - c:RegisterEffect(e2) - --spsummon condition - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e3:SetCode(EFFECT_SPSUMMON_CONDITION) - e3:SetValue(aux.fuslimit) - c:RegisterEffect(e3) -end -function c99267150.batfilter(e,c) - return c:IsAttribute(0x2f) -end -function c99267150.check_fusion_material_48144509(m,chkf) - local g1=m:Filter(Card.IsRace,nil,RACE_DRAGON) - if chkf~=PLAYER_NONE and not g1:IsExists(Card.IsOnField,1,nil) then return false end - local ct1=g1:GetCount() - local ct2=g1:FilterCount(Card.IsLocation,nil,LOCATION_EXTRA) - return (ct1-ct2)+math.min(ct2,2)>=5 -end -function c99267150.select_fusion_material_48144509(tp,m,chkf) - local cc=5 - local mg1=m:Filter(Card.IsRace,nil,RACE_DRAGON) - local mg2=mg1:Filter(Card.IsLocation,nil,LOCATION_EXTRA) - local sg=Group.CreateGroup() - if mg2:GetCount()>2 then - mg1:Sub(mg2) - if mg1:GetCount()<5 or Duel.SelectYesNo(tp,aux.Stringid(48144509,0)) then - local minc=1 - if mg1:GetCount()<4 then minc=2 end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL) - local g=mg2:Select(tp,minc,2,nil) - sg:Merge(g) - cc=cc-g:GetCount() - end - end - if chkf~=PLAYER_NONE and mg1:GetCount()>cc then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL) - local g=mg1:FilterSelect(tp,aux.FConditionCheckF,1,1,nil,chkf) - mg1:Sub(g) - sg:Merge(g) - cc=cc-1 - end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL) - local g=mg1:Select(tp,cc,cc,nil) - sg:Merge(g) - Duel.SetFusionMaterial(sg) - return sg -end diff --git a/script/c99284890.lua b/script/c99284890.lua deleted file mode 100644 index f3c3a314f4..0000000000 --- a/script/c99284890.lua +++ /dev/null @@ -1,31 +0,0 @@ ---壺魔神 -function c99284890.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(99284890,0)) - e1:SetCategory(CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c99284890.cost) - e1:SetTarget(c99284890.target) - e1:SetOperation(c99284890.operation) - c:RegisterEffect(e1) -end -function c99284890.filter(c) - return c:IsCode(55144522) and c:IsAbleToGraveAsCost() -end -function c99284890.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c99284890.filter,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,c99284890.filter,1,1,REASON_COST) -end -function c99284890.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp,3) end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(3) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,3) -end -function c99284890.operation(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end diff --git a/script/c99311109.lua b/script/c99311109.lua deleted file mode 100644 index c400b4e5c8..0000000000 --- a/script/c99311109.lua +++ /dev/null @@ -1,48 +0,0 @@ ---戦友の誓い -function c99311109.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_CONTROL) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c99311109.condition) - e1:SetCost(c99311109.cost) - e1:SetTarget(c99311109.target) - e1:SetOperation(c99311109.activate) - c:RegisterEffect(e1) -end -function c99311109.cfilter(c) - return c:GetSummonLocation()==LOCATION_EXTRA -end -function c99311109.condition(e,tp,eg,ep,ev,re,r,rp) - return not Duel.IsExistingMatchingCard(c99311109.cfilter,tp,LOCATION_MZONE,0,1,nil) -end -function c99311109.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_SPSUMMON)==0 end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) - e1:SetTargetRange(1,0) - Duel.RegisterEffect(e1,tp) -end -function c99311109.filter(c) - return c:IsFaceup() and c:IsControlerCanBeChanged() and c:GetSummonLocation()==LOCATION_EXTRA -end -function c99311109.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c99311109.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c99311109.filter,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) - local g=Duel.SelectTarget(tp,c99311109.filter,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0) -end -function c99311109.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and not Duel.GetControl(tc,tp,PHASE_END,1) then - if not tc:IsImmuneToEffect(e) and tc:IsAbleToChangeControler() then - Duel.Destroy(tc,REASON_EFFECT) - end - end -end diff --git a/script/c99342953.lua b/script/c99342953.lua deleted file mode 100644 index 4eaf615f61..0000000000 --- a/script/c99342953.lua +++ /dev/null @@ -1,58 +0,0 @@ ---古代遺跡コードA -function c99342953.initial_effect(c) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --counter - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetRange(LOCATION_SZONE) - e2:SetCode(EVENT_DESTROYED) - e2:SetCondition(c99342953.ctcon) - e2:SetOperation(c99342953.ctop) - c:RegisterEffect(e2) - --special summon - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(99342953,0)) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetRange(LOCATION_SZONE) - e3:SetCountLimit(1) - e3:SetCost(c99342953.spcost) - e3:SetTarget(c99342953.sptg) - e3:SetOperation(c99342953.spop) - c:RegisterEffect(e3) -end -function c99342953.ctfilter(c) - return c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousSetCard(0xc) -end -function c99342953.ctcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c99342953.ctfilter,1,nil) -end -function c99342953.ctop(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():AddCounter(0xe,1) -end -function c99342953.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsCanRemoveCounter(tp,1,1,0xe,2,REASON_COST) end - Duel.RemoveCounter(tp,1,1,0xe,2,REASON_COST) -end -function c99342953.filter(c,e,tp) - return c:IsSetCard(0xc) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c99342953.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c99342953.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c99342953.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c99342953.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c99342953.spop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c99348756.lua b/script/c99348756.lua deleted file mode 100644 index c55ab3417e..0000000000 --- a/script/c99348756.lua +++ /dev/null @@ -1,56 +0,0 @@ ---バルキリー・ナイト -function c99348756.initial_effect(c) - --cannot be battle target - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(0,LOCATION_MZONE) - e1:SetValue(c99348756.atktg) - c:RegisterEffect(e1) - --spsummon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(99348756,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_BATTLE_DESTROYED) - e2:SetCondition(c99348756.spcon) - e2:SetTarget(c99348756.sptg) - e2:SetOperation(c99348756.spop) - c:RegisterEffect(e2) -end -function c99348756.atktg(e,c) - return c:GetCode()~=99348756 and c:IsFaceup() and c:IsRace(RACE_WARRIOR) -end -function c99348756.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) -end -function c99348756.rmfilter(c,e,tp,g) - return c:IsAbleToRemoveAsCost() and g:IsExists(c99348756.spfilter,1,c,e,tp) -end -function c99348756.spfilter(c,e,tp) - return c:IsCanBeEffectTarget(e) and c:IsLevelAbove(5) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c99348756.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c99348756.spfilter(chkc,e,tp) end - local g=Duel.GetMatchingGroup(Card.IsRace,tp,LOCATION_GRAVE,0,e:GetHandler(),RACE_WARRIOR) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsAbleToRemoveAsCost() - and g:IsExists(c99348756.rmfilter,1,nil,e,tp,g) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local rg=g:FilterSelect(tp,c99348756.rmfilter,1,1,nil,e,tp,g) - g:Sub(rg) - rg:AddCard(e:GetHandler()) - Duel.Remove(rg,POS_FACEUP,REASON_COST) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=g:FilterSelect(tp,c99348756.spfilter,1,1,nil,e,tp) - Duel.SetTargetCard(sg) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,sg,1,0,0) -end -function c99348756.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c99351431.lua b/script/c99351431.lua deleted file mode 100644 index c5046d0488..0000000000 --- a/script/c99351431.lua +++ /dev/null @@ -1,46 +0,0 @@ ---盗賊の極意 -function c99351431.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c99351431.target) - e1:SetOperation(c99351431.activate) - c:RegisterEffect(e1) -end -function c99351431.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end - if chk==0 then return Duel.GetCurrentPhase()==PHASE_MAIN1 - and Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) -end -function c99351431.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() and not tc:IsImmuneToEffect(e) and tc:GetFlagEffect(99351431)==0 then - tc:RegisterFlagEffect(99351431,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetDescription(aux.Stringid(99351431,0)) - e1:SetCategory(CATEGORY_HANDES) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_BATTLE_DAMAGE) - e1:SetLabelObject(tc) - e1:SetCondition(c99351431.hdcon) - e1:SetTarget(c99351431.hdtg) - e1:SetOperation(c99351431.hdop) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) - end -end -function c99351431.hdcon(e,tp,eg,ep,ev,re,r,rp) - return ep==1-tp and eg:GetFirst()==e:GetLabelObject() and eg:GetFirst():GetFlagEffect(99351431)~=0 -end -function c99351431.hdtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1) -end -function c99351431.hdop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND):RandomSelect(tp,1) - Duel.SendtoGrave(g,REASON_EFFECT+REASON_COST) -end diff --git a/script/c99365553.lua b/script/c99365553.lua deleted file mode 100644 index 6e71da8a0f..0000000000 --- a/script/c99365553.lua +++ /dev/null @@ -1,88 +0,0 @@ ---ライトパルサー・ドラゴン -function c99365553.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c99365553.spcon1) - e1:SetOperation(c99365553.spop1) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_SPSUMMON_PROC) - e2:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e2:SetRange(LOCATION_GRAVE) - e2:SetCondition(c99365553.spcon2) - e2:SetOperation(c99365553.spop2) - c:RegisterEffect(e2) - --spsummon - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(99365553,0)) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_TO_GRAVE) - e3:SetCondition(c99365553.spcon3) - e3:SetTarget(c99365553.sptg3) - e3:SetOperation(c99365553.spop3) - c:RegisterEffect(e3) -end -function c99365553.spfilter1(c,att) - return c:IsAttribute(att) and c:IsAbleToRemoveAsCost() -end -function c99365553.spcon1(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c99365553.spfilter1,tp,LOCATION_GRAVE,0,1,nil,ATTRIBUTE_LIGHT) - and Duel.IsExistingMatchingCard(c99365553.spfilter1,tp,LOCATION_GRAVE,0,1,nil,ATTRIBUTE_DARK) -end -function c99365553.spop1(e,tp,eg,ep,ev,re,r,rp,c) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g1=Duel.SelectMatchingCard(tp,c99365553.spfilter1,tp,LOCATION_GRAVE,0,1,1,nil,ATTRIBUTE_LIGHT) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g2=Duel.SelectMatchingCard(tp,c99365553.spfilter1,tp,LOCATION_GRAVE,0,1,1,nil,ATTRIBUTE_DARK) - g1:Merge(g2) - Duel.Remove(g1,POS_FACEUP,REASON_COST) -end -function c99365553.spfilter2(c,att) - return c:IsAttribute(att) and c:IsAbleToGraveAsCost() -end -function c99365553.spcon2(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c99365553.spfilter2,tp,LOCATION_HAND,0,1,nil,ATTRIBUTE_LIGHT) - and Duel.IsExistingMatchingCard(c99365553.spfilter2,tp,LOCATION_HAND,0,1,nil,ATTRIBUTE_DARK) -end -function c99365553.spop2(e,tp,eg,ep,ev,re,r,rp,c) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g1=Duel.SelectMatchingCard(tp,c99365553.spfilter2,tp,LOCATION_HAND,0,1,1,nil,ATTRIBUTE_LIGHT) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g2=Duel.SelectMatchingCard(tp,c99365553.spfilter2,tp,LOCATION_HAND,0,1,1,nil,ATTRIBUTE_DARK) - g1:Merge(g2) - Duel.SendtoGrave(g1,REASON_COST) -end -function c99365553.spcon3(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) -end -function c99365553.spfilter3(c,e,tp) - return c:IsLevelAbove(5) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsRace(RACE_DRAGON) - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c99365553.sptg3(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c99365553.spfilter3(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(c99365553.spfilter3,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,c99365553.spfilter3,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function c99365553.spop3(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c99414168.lua b/script/c99414168.lua deleted file mode 100644 index bf7817dec5..0000000000 --- a/script/c99414168.lua +++ /dev/null @@ -1,12 +0,0 @@ ---精霊術師 ドリアード -function c99414168.initial_effect(c) - c:EnableReviveLimit() - --Attribute - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetCode(EFFECT_ADD_ATTRIBUTE) - e1:SetRange(LOCATION_MZONE) - e1:SetValue(0xf) - c:RegisterEffect(e1) -end diff --git a/script/c99426834.lua b/script/c99426834.lua deleted file mode 100644 index d24082cf46..0000000000 --- a/script/c99426834.lua +++ /dev/null @@ -1,12 +0,0 @@ ---沼地の魔獣王 -function c99426834.initial_effect(c) - --fusion substitute - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_FUSION_SUBSTITUTE) - e1:SetCondition(c99426834.subcon) - c:RegisterEffect(e1) -end -function c99426834.subcon(e) - return e:GetHandler():IsLocation(LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE) -end diff --git a/script/c99429730.lua b/script/c99429730.lua deleted file mode 100644 index 9353cda020..0000000000 --- a/script/c99429730.lua +++ /dev/null @@ -1,73 +0,0 @@ ---森羅の番人 オーク -function c99429730.initial_effect(c) - --deck - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(99429730,0)) - e1:SetCategory(CATEGORY_TOGRAVE) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_MZONE) - e1:SetTarget(c99429730.target) - e1:SetOperation(c99429730.operation) - c:RegisterEffect(e1) - --to deck - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(99429730,2)) - e2:SetCategory(CATEGORY_TODECK) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetCondition(c99429730.tdcon) - e2:SetTarget(c99429730.tdtg) - e2:SetOperation(c99429730.tdop) - c:RegisterEffect(e2) -end -function c99429730.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,1) end -end -function c99429730.operation(e,tp,eg,ep,ev,re,r,rp) - if not Duel.IsPlayerCanDiscardDeck(tp,1) then return end - local ct=Duel.GetFieldGroupCount(tp,LOCATION_DECK,0) - if ct==0 then return end - if ct>3 then ct=3 end - local t={} - for i=1,ct do t[i]=i end - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(99429730,1)) - local ac=Duel.AnnounceNumber(tp,table.unpack(t)) - Duel.ConfirmDecktop(tp,ac) - local g=Duel.GetDecktopGroup(tp,ac) - local sg=g:Filter(Card.IsRace,nil,RACE_PLANT) - if sg:GetCount()>0 then - Duel.DisableShuffleCheck() - Duel.SendtoGrave(sg,REASON_EFFECT+REASON_REVEAL) - end - ac=ac-sg:GetCount() - if ac>0 then - Duel.SortDecktop(tp,tp,ac) - for i=1,ac do - local mg=Duel.GetDecktopGroup(tp,1) - Duel.MoveSequence(mg:GetFirst(),1) - end - end -end -function c99429730.tdcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsPreviousLocation(LOCATION_DECK) and - (c:IsReason(REASON_REVEAL) or c:GetPreviousPosition()==POS_FACEUP_DEFENCE or Duel.IsPlayerAffectedByEffect(tp,EFFECT_REVERSE_DECK)) -end -function c99429730.filter(c) - return c:IsRace(RACE_PLANT) and c:IsAbleToDeck() -end -function c99429730.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c99429730.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c99429730.filter,tp,LOCATION_GRAVE,0,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectTarget(tp,c99429730.filter,tp,LOCATION_GRAVE,0,1,1,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0) -end -function c99429730.tdop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoDeck(tc,nil,0,REASON_EFFECT) - end -end diff --git a/script/c99458769.lua b/script/c99458769.lua deleted file mode 100644 index 8d2a3ef4d3..0000000000 --- a/script/c99458769.lua +++ /dev/null @@ -1,65 +0,0 @@ ---暗黒界の魔神 レイン -function c99458769.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(99458769,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCondition(c99458769.spcon) - e1:SetTarget(c99458769.sptg) - e1:SetOperation(c99458769.spop) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(99458769,1)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetCondition(c99458769.descon) - e2:SetTarget(c99458769.destg) - e2:SetOperation(c99458769.desop) - c:RegisterEffect(e2) -end -function c99458769.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_HAND) and bit.band(r,0x4040)==0x4040 and rp~=tp - and e:GetHandler():GetPreviousControler()==tp -end -function c99458769.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c99458769.spop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - Duel.SpecialSummon(e:GetHandler(),1,tp,tp,false,false,POS_FACEUP) - end -end -function c99458769.descon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+1 -end -function c99458769.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local c1=Duel.GetMatchingGroupCount(Card.IsDestructable,tp,0,LOCATION_MZONE,nil) - local c2=Duel.GetMatchingGroupCount(Card.IsDestructable,tp,0,LOCATION_SZONE,nil) - if (c1>c2 and c2~=0) or c1==0 then c1=c2 end - if c1~=0 then - local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,0,LOCATION_ONFIELD,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,c1,0,0) - end -end -function c99458769.desop(e,tp,eg,ep,ev,re,r,rp) - local g1=Duel.GetMatchingGroup(Card.IsDestructable,tp,0,LOCATION_MZONE,nil) - local g2=Duel.GetMatchingGroup(Card.IsDestructable,tp,0,LOCATION_SZONE,nil) - if g1:GetCount()>0 or g2:GetCount()>0 then - if g1:GetCount()==0 then - Duel.Destroy(g2,REASON_EFFECT) - elseif g2:GetCount()==0 then - Duel.Destroy(g1,REASON_EFFECT) - else - Duel.Hint(HINT_SELECTMSG,tp,0) - local ac=Duel.SelectOption(tp,aux.Stringid(99458769,2),aux.Stringid(99458769,3)) - if ac==0 then Duel.Destroy(g1,REASON_EFFECT) - else Duel.Destroy(g2,REASON_EFFECT) end - end - end -end diff --git a/script/c99469936.lua b/script/c99469936.lua deleted file mode 100644 index f477de661d..0000000000 --- a/script/c99469936.lua +++ /dev/null @@ -1,71 +0,0 @@ ---FA-クリスタル・ゼロ・ランサー -function c99469936.initial_effect(c) - --xyz summon - aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_WATER),6,3,c99469936.ovfilter,aux.Stringid(99469936,0)) - c:EnableReviveLimit() - --atk - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(c99469936.atkval) - c:RegisterEffect(e1) - --destroy replace - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetCode(EFFECT_DESTROY_REPLACE) - e2:SetRange(LOCATION_MZONE) - e2:SetTarget(c99469936.reptg) - c:RegisterEffect(e2) - --negate - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(99469936,2)) - e3:SetCategory(CATEGORY_DISABLE) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetCountLimit(1) - e3:SetRange(LOCATION_MZONE) - e3:SetCost(c99469936.cost) - e3:SetTarget(c99469936.target) - e3:SetOperation(c99469936.operation) - c:RegisterEffect(e3) -end -function c99469936.ovfilter(c) - return c:IsFaceup() and c:GetRank()==5 and c:IsAttribute(ATTRIBUTE_WATER) -end -function c99469936.atkval(e,c) - return c:GetOverlayCount()*500 -end -function c99469936.reptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_EFFECT) end - if Duel.SelectYesNo(tp,aux.Stringid(99469936,1)) then - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_EFFECT) - return true - else return false end -end -function c99469936.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function c99469936.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(aux.disfilter1,tp,0,LOCATION_MZONE,1,nil) end -end -function c99469936.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local g=Duel.GetMatchingGroup(aux.disfilter1,tp,0,LOCATION_MZONE,nil) - local tc=g:GetFirst() - while tc do - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - tc:RegisterEffect(e2) - tc=g:GetNext() - end -end diff --git a/script/c99517131.lua b/script/c99517131.lua deleted file mode 100644 index 2480d501b7..0000000000 --- a/script/c99517131.lua +++ /dev/null @@ -1,29 +0,0 @@ ---生命力吸収魔術 -function c99517131.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_POSITION+CATEGORY_RECOVER) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_DRAW_PHASE) - e1:SetTarget(c99517131.target) - e1:SetOperation(c99517131.activate) - c:RegisterEffect(e1) -end -function c99517131.filter(c) - return c:IsFaceup() and c:IsType(TYPE_EFFECT) -end -function c99517131.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(nil,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - local rec=Duel.GetMatchingGroupCount(c99517131.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)*400 - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(rec) - if rec>0 then Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,rec) end -end -function c99517131.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsFacedown,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - Duel.ChangePosition(g,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK,POS_FACEUP_DEFENCE,POS_FACEUP_DEFENCE,true) - local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) - local rec=Duel.GetMatchingGroupCount(c99517131.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)*400 - Duel.Recover(p,rec,REASON_EFFECT) -end diff --git a/script/c99518961.lua b/script/c99518961.lua deleted file mode 100644 index ddfa868fba..0000000000 --- a/script/c99518961.lua +++ /dev/null @@ -1,21 +0,0 @@ ---革命 -function c99518961.initial_effect(c) - --damage - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c99518961.damtg) - e1:SetOperation(c99518961.damop) - c:RegisterEffect(e1) -end -function c99518961.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetFieldGroupCount(1-tp,LOCATION_HAND,0)>0 end - Duel.SetTargetPlayer(1-tp) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,Duel.GetFieldGroupCount(1-tp,LOCATION_HAND,0)*200) -end -function c99518961.damop(e,tp,eg,ep,ev,re,r,rp) - local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) - Duel.Damage(p,Duel.GetFieldGroupCount(p,LOCATION_HAND,0)*200,REASON_EFFECT) -end diff --git a/script/c9952083.lua b/script/c9952083.lua deleted file mode 100644 index dd8f089870..0000000000 --- a/script/c9952083.lua +++ /dev/null @@ -1,23 +0,0 @@ ---サモンチェーン -function c9952083.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(c9952083.condition) - e1:SetOperation(c9952083.activate) - c:RegisterEffect(e1) -end -function c9952083.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentChain()>1 and Duel.CheckChainUniqueness() and Duel.GetTurnPlayer()==tp -end -function c9952083.activate(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SET_SUMMON_COUNT_LIMIT) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetTargetRange(1,0) - e1:SetValue(3) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) -end diff --git a/script/c99523325.lua b/script/c99523325.lua deleted file mode 100644 index 8a5c2df92a..0000000000 --- a/script/c99523325.lua +++ /dev/null @@ -1,35 +0,0 @@ ---墓守の石版 -function c99523325.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c99523325.target) - e1:SetOperation(c99523325.activate) - c:RegisterEffect(e1) - --immune to necro valley - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_NECRO_VALLEY_IM) - c:RegisterEffect(e2) -end -function c99523325.filter(c) - return c:IsSetCard(0x2e) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() -end -function c99523325.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c99523325.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c99523325.filter,tp,LOCATION_GRAVE,0,2,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c99523325.filter,tp,LOCATION_GRAVE,0,2,2,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,2,0,0) -end -function c99523325.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local sg=g:Filter(Card.IsRelateToEffect,nil,e) - if sg:GetCount()>0 then - Duel.SendtoHand(sg,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,sg) - end -end diff --git a/script/c99532708.lua b/script/c99532708.lua deleted file mode 100644 index 2d5bd7d2f4..0000000000 --- a/script/c99532708.lua +++ /dev/null @@ -1,14 +0,0 @@ ---エーリアン・マーズ -function c99532708.initial_effect(c) - --disable - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e1:SetCode(EFFECT_DISABLE) - e1:SetTarget(c99532708.distg) - c:RegisterEffect(e1) -end -function c99532708.distg(e,c) - return c:GetCounter(0xe)>0 and c:GetCode()~=99532708 -end diff --git a/script/c99551425.lua b/script/c99551425.lua deleted file mode 100644 index 68ff28245b..0000000000 --- a/script/c99551425.lua +++ /dev/null @@ -1,6 +0,0 @@ ---迷宮の魔戦車 -function c99551425.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcCode2(c,8471389,11384280,true,true) -end diff --git a/script/c99581584.lua b/script/c99581584.lua deleted file mode 100644 index 648201d87a..0000000000 --- a/script/c99581584.lua +++ /dev/null @@ -1,29 +0,0 @@ ---ガード・ペンギン -function c99581584.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(99581584,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_RECOVER) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetRange(LOCATION_HAND) - e1:SetCode(EVENT_DAMAGE) - e1:SetCondition(c99581584.spcon) - e1:SetTarget(c99581584.sptg) - e1:SetOperation(c99581584.spop) - c:RegisterEffect(e1) -end -function c99581584.spcon(e,tp,eg,ep,ev,re,r,rp) - return ep==tp and bit.band(r,REASON_EFFECT)~=0 -end -function c99581584.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) - Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,ev) -end -function c99581584.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then - Duel.Recover(tp,ev,REASON_EFFECT) - end -end diff --git a/script/c99590524.lua b/script/c99590524.lua deleted file mode 100644 index 08c324dbc3..0000000000 --- a/script/c99590524.lua +++ /dev/null @@ -1,28 +0,0 @@ ---狡猾な落とし穴 -function c99590524.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,0x1e0) - e1:SetCondition(c99590524.condition) - e1:SetTarget(c99590524.target) - e1:SetOperation(c99590524.activate) - c:RegisterEffect(e1) -end -function c99590524.condition(e,tp,eg,ep,ev,re,r,rp) - return not Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_GRAVE,0,1,nil,TYPE_TRAP) -end -function c99590524.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsDestructable() end - if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,LOCATION_MZONE,LOCATION_MZONE,2,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,LOCATION_MZONE,LOCATION_MZONE,2,2,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,2,0,0) -end -function c99590524.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) - Duel.Destroy(g,REASON_EFFECT) -end diff --git a/script/c99594764.lua b/script/c99594764.lua deleted file mode 100644 index 52f849ea58..0000000000 --- a/script/c99594764.lua +++ /dev/null @@ -1,35 +0,0 @@ ---ドラグニティ-コルセスカ -function c99594764.initial_effect(c) - --search - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(99594764,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_BATTLE_DESTROYING) - e1:SetRange(LOCATION_SZONE) - e1:SetCondition(c99594764.thcon) - e1:SetTarget(c99594764.thtg) - e1:SetOperation(c99594764.thop) - c:RegisterEffect(e1) -end -function c99594764.thcon(e,tp,eg,ep,ev,re,r,rp) - return eg:GetCount()==1 and eg:GetFirst()==e:GetHandler():GetEquipTarget() -end -function c99594764.filter(c,race,att) - return c:IsRace(race) and c:IsAttribute(att) and c:GetLevel()<=4 and c:IsAbleToHand() -end -function c99594764.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - local eqc=e:GetHandler():GetEquipTarget() - if chk==0 then return Duel.IsExistingMatchingCard(c99594764.filter,tp,LOCATION_DECK,0,1,nil,eqc:GetRace(),eqc:GetAttribute()) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c99594764.thop(e,tp,eg,ep,ev,re,r,rp) - local eqc=e:GetHandler():GetEquipTarget() - if not eqc then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c99594764.filter,tp,LOCATION_DECK,0,1,1,nil,eqc:GetRace(),eqc:GetAttribute()) - if g:GetCount()>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/script/c99597615.lua b/script/c99597615.lua deleted file mode 100644 index 2bcd8f4061..0000000000 --- a/script/c99597615.lua +++ /dev/null @@ -1,66 +0,0 @@ ---悪魔のくちづけ -function c99597615.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(c99597615.target) - e1:SetOperation(c99597615.operation) - c:RegisterEffect(e1) - --Atk up - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_EQUIP) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(700) - c:RegisterEffect(e2) - --Equip limit - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_EQUIP_LIMIT) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e3:SetValue(1) - c:RegisterEffect(e3) - --to deck - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(99597615,0)) - e4:SetCategory(CATEGORY_TODECK) - e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e4:SetCode(EVENT_TO_GRAVE) - e4:SetCondition(c99597615.tdcon) - e4:SetCost(c99597615.tdcost) - e4:SetTarget(c99597615.tdtg) - e4:SetOperation(c99597615.tdop) - c:RegisterEffect(e4) -end -function c99597615.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function c99597615.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,e:GetHandler(),tc) - end -end -function c99597615.tdcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) -end -function c99597615.tdcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,500) - else Duel.PayLPCost(tp,500) end -end -function c99597615.tdtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToDeck() end - Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0) -end -function c99597615.tdop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - Duel.SendtoDeck(e:GetHandler(),nil,0,REASON_EFFECT) - end -end diff --git a/script/c99641328.lua b/script/c99641328.lua deleted file mode 100644 index 1b2dbc6c26..0000000000 --- a/script/c99641328.lua +++ /dev/null @@ -1,73 +0,0 @@ ---森羅の影胞子 ストール -function c99641328.initial_effect(c) - --deck - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(99641328,0)) - e1:SetCategory(CATEGORY_TOGRAVE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_FLIP) - e1:SetTarget(c99641328.target) - e1:SetOperation(c99641328.operation) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(99641328,2)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetCondition(c99641328.descon) - e2:SetTarget(c99641328.destg) - e2:SetOperation(c99641328.desop) - c:RegisterEffect(e2) -end -function c99641328.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,1) end -end -function c99641328.operation(e,tp,eg,ep,ev,re,r,rp) - if not Duel.IsPlayerCanDiscardDeck(tp,1) then return end - local ct=Duel.GetFieldGroupCount(tp,LOCATION_DECK,0) - if ct==0 then return end - if ct>5 then ct=5 end - local t={} - for i=1,ct do t[i]=i end - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(99641328,1)) - local ac=Duel.AnnounceNumber(tp,table.unpack(t)) - Duel.ConfirmDecktop(tp,ac) - local g=Duel.GetDecktopGroup(tp,ac) - local sg=g:Filter(Card.IsRace,nil,RACE_PLANT) - if sg:GetCount()>0 then - Duel.DisableShuffleCheck() - Duel.SendtoGrave(sg,REASON_EFFECT+REASON_REVEAL) - end - ac=ac-sg:GetCount() - if ac>0 then - Duel.SortDecktop(tp,tp,ac) - for i=1,ac do - local mg=Duel.GetDecktopGroup(tp,1) - Duel.MoveSequence(mg:GetFirst(),1) - end - end -end -function c99641328.descon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsPreviousLocation(LOCATION_DECK) and - (c:IsReason(REASON_REVEAL) or c:GetPreviousPosition()==POS_FACEUP_DEFENCE or Duel.IsPlayerAffectedByEffect(tp,EFFECT_REVERSE_DECK)) -end -function c99641328.desfilter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable() -end -function c99641328.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and c99641328.desfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c99641328.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c99641328.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c99641328.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c99657399.lua b/script/c99657399.lua deleted file mode 100644 index 610eff3529..0000000000 --- a/script/c99657399.lua +++ /dev/null @@ -1,29 +0,0 @@ ---油断大敵 -function c99657399.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_RECOVER) - e1:SetCondition(c99657399.condition) - e1:SetTarget(c99657399.target) - e1:SetOperation(c99657399.activate) - c:RegisterEffect(e1) -end -function c99657399.condition(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp -end -function c99657399.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsDestructable() end - if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c99657399.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c99659159.lua b/script/c99659159.lua deleted file mode 100644 index 888fdadb82..0000000000 --- a/script/c99659159.lua +++ /dev/null @@ -1,63 +0,0 @@ ---竜操術 -function c99659159.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --atk - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(LOCATION_MZONE,0) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetTarget(c99659159.atktg) - e2:SetValue(500) - c:RegisterEffect(e2) - --equip - local e3=Effect.CreateEffect(c) - e3:SetCategory(CATEGORY_EQUIP) - e3:SetDescription(aux.Stringid(99659159,0)) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetRange(LOCATION_SZONE) - e3:SetCountLimit(1) - e3:SetTarget(c99659159.target) - e3:SetOperation(c99659159.operation) - c:RegisterEffect(e3) -end -function c99659159.atktg(e,c) - return c:GetEquipGroup():IsExists(Card.IsSetCard,1,nil,0x29) -end -function c99659159.filter(c) - return c:IsSetCard(0x29) and c:IsRace(RACE_DRAGON) -end -function c99659159.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) - and Duel.IsExistingMatchingCard(c99659159.filter,tp,LOCATION_HAND,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,nil) -end -function c99659159.operation(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end - local tc=Duel.GetFirstTarget() - if tc:IsFacedown() or not tc:IsRelateToEffect(e) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local sg=Duel.SelectMatchingCard(tp,c99659159.filter,tp,LOCATION_HAND,0,1,1,nil) - if sg:GetCount()==0 then return end - local sc=sg:GetFirst() - Duel.Equip(tp,sc,tc,true) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(c99659159.eqlimit) - e1:SetLabelObject(tc) - sc:RegisterEffect(e1) -end -function c99659159.eqlimit(e,c) - return e:GetLabelObject()==c -end diff --git a/script/c99668578.lua b/script/c99668578.lua deleted file mode 100644 index 94ed776282..0000000000 --- a/script/c99668578.lua +++ /dev/null @@ -1,34 +0,0 @@ ---星因士 プロキオン -function c99668578.initial_effect(c) - --handes - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(99668578,0)) - e1:SetCategory(CATEGORY_HANDES+CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e1:SetCountLimit(1,99668578) - e1:SetTarget(c99668578.target) - e1:SetOperation(c99668578.operation) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - c:RegisterEffect(e2) - local e3=e1:Clone() - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e3) -end -function c99668578.filter(c) - return c:IsSetCard(0x9c) and c:IsType(TYPE_MONSTER) -end -function c99668578.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp,1) - and Duel.IsExistingMatchingCard(c99668578.filter,tp,LOCATION_HAND,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_HAND) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function c99668578.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.DiscardHand(tp,c99668578.filter,1,1,REASON_EFFECT)~=0 then - Duel.Draw(tp,1,REASON_EFFECT) - end -end diff --git a/script/c99675356.lua b/script/c99675356.lua deleted file mode 100644 index f55ff076ff..0000000000 --- a/script/c99675356.lua +++ /dev/null @@ -1,32 +0,0 @@ ---紫炎の足軽 -function c99675356.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(99675356,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetCondition(c99675356.condition) - e1:SetTarget(c99675356.target) - e1:SetOperation(c99675356.operation) - c:RegisterEffect(e1) -end -function c99675356.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) -end -function c99675356.filter(c,e,tp) - return c:IsLevelBelow(3) and c:IsSetCard(0x3d) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c99675356.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c99675356.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c99675356.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c99675356.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c99690140.lua b/script/c99690140.lua deleted file mode 100644 index 262020a798..0000000000 --- a/script/c99690140.lua +++ /dev/null @@ -1,8 +0,0 @@ ---墓守の従者 -function c99690140.initial_effect(c) - --battle damage to effect damage - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_BATTLE_DAMAGE_TO_EFFECT) - c:RegisterEffect(e1) -end diff --git a/script/c99721536.lua b/script/c99721536.lua deleted file mode 100644 index e1ddaed492..0000000000 --- a/script/c99721536.lua +++ /dev/null @@ -1,4 +0,0 @@ ---スカルライダー -function c99721536.initial_effect(c) - c:EnableReviveLimit() -end diff --git a/script/c99724761.lua b/script/c99724761.lua deleted file mode 100644 index d343962cde..0000000000 --- a/script/c99724761.lua +++ /dev/null @@ -1,93 +0,0 @@ ---XZ-キャタピラー・キャノン -function c99724761.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcCode2(c,62651957,64500000,true,true) - --spsummon condition - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(c99724761.splimit) - c:RegisterEffect(e1) - --special summon rule - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_SPSUMMON_PROC) - e2:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e2:SetRange(LOCATION_EXTRA) - e2:SetCondition(c99724761.spcon) - e2:SetOperation(c99724761.spop) - c:RegisterEffect(e2) - --destroy - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(99724761,0)) - e3:SetCategory(CATEGORY_DESTROY) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetRange(LOCATION_MZONE) - e3:SetCost(c99724761.descost) - e3:SetTarget(c99724761.destg) - e3:SetOperation(c99724761.desop) - c:RegisterEffect(e3) -end -function c99724761.splimit(e,se,sp,st) - return not e:GetHandler():IsLocation(LOCATION_EXTRA+LOCATION_GRAVE) -end -function c99724761.spfilter(c,code) - return c:IsCode(code) and c:IsAbleToRemoveAsCost() -end -function c99724761.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ft<-1 then return false end - local g1=Duel.GetMatchingGroup(c99724761.spfilter,tp,LOCATION_ONFIELD,0,nil,62651957) - local g2=Duel.GetMatchingGroup(c99724761.spfilter,tp,LOCATION_ONFIELD,0,nil,64500000) - if g1:GetCount()==0 or g2:GetCount()==0 then return false end - if ft>0 then return true end - local f1=g1:FilterCount(Card.IsLocation,nil,LOCATION_MZONE) - local f2=g2:FilterCount(Card.IsLocation,nil,LOCATION_MZONE) - if ft==-1 then return f1>0 and f2>0 - else return f1>0 or f2>0 end -end -function c99724761.spop(e,tp,eg,ep,ev,re,r,rp,c) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - local g1=Duel.GetMatchingGroup(c99724761.spfilter,tp,LOCATION_ONFIELD,0,nil,62651957) - local g2=Duel.GetMatchingGroup(c99724761.spfilter,tp,LOCATION_ONFIELD,0,nil,64500000) - g1:Merge(g2) - local g=Group.CreateGroup() - local tc=nil - for i=1,2 do - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - if ft<=0 then - tc=g1:FilterSelect(tp,Card.IsLocation,1,1,nil,LOCATION_MZONE):GetFirst() - else - tc=g1:Select(tp,1,1,nil):GetFirst() - end - g:AddCard(tc) - g1:Remove(Card.IsCode,nil,tc:GetCode()) - ft=ft+1 - end - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function c99724761.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) -end -function c99724761.filter(c) - return c:IsFacedown() and c:IsDestructable() -end -function c99724761.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_SZONE) and chkc:IsControler(1-tp) and c99724761.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c99724761.filter,tp,0,LOCATION_SZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c99724761.filter,tp,0,LOCATION_SZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c99724761.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFacedown() then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/script/c99733359.lua b/script/c99733359.lua deleted file mode 100644 index 02d011a4f2..0000000000 --- a/script/c99733359.lua +++ /dev/null @@ -1,49 +0,0 @@ ---盾航戦車ステゴサイバー -function c99733359.initial_effect(c) - --no damage - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(99733359,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_QUICK_O+EFFECT_TYPE_FIELD) - e1:SetRange(LOCATION_GRAVE) - e1:SetCode(EVENT_PRE_DAMAGE_CALCULATE) - e1:SetCountLimit(1,99733359) - e1:SetCondition(c99733359.condition) - e1:SetCost(c99733359.cost) - e1:SetTarget(c99733359.target) - e1:SetOperation(c99733359.operation) - c:RegisterEffect(e1) -end -function c99733359.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp and Duel.GetBattleDamage(tp)>0 -end -function c99733359.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,1000) end - Duel.PayLPCost(tp,1000) -end -function c99733359.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end -function c99733359.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+0x47e0000) - e1:SetValue(LOCATION_REMOVED) - c:RegisterEffect(e1,true) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_PRE_BATTLE_DAMAGE) - e2:SetOperation(c99733359.damop) - e2:SetReset(RESET_PHASE+PHASE_DAMAGE) - Duel.RegisterEffect(e2,tp) - end -end -function c99733359.damop(e,tp,eg,ep,ev,re,r,rp) - Duel.ChangeBattleDamage(tp,0) -end diff --git a/script/c99735427.lua b/script/c99735427.lua deleted file mode 100644 index 2096d3d3b3..0000000000 --- a/script/c99735427.lua +++ /dev/null @@ -1,22 +0,0 @@ ---暗闇を吸い込むマジック・ミラー -function c99735427.initial_effect(c) - --activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --disable - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e2:SetRange(LOCATION_SZONE) - e2:SetCode(EVENT_CHAIN_ACTIVATING) - e2:SetOperation(c99735427.disop) - c:RegisterEffect(e2) -end -function c99735427.disop(e,tp,eg,ep,ev,re,r,rp) - local loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION) - if re:IsActiveType(TYPE_MONSTER) and (loc==LOCATION_MZONE or loc==LOCATION_GRAVE) - and re:GetHandler():IsAttribute(ATTRIBUTE_DARK) then - Duel.NegateEffect(ev) - end -end diff --git a/script/c99747800.lua b/script/c99747800.lua deleted file mode 100644 index d3b5e2725b..0000000000 --- a/script/c99747800.lua +++ /dev/null @@ -1,27 +0,0 @@ ---レジェンド・デビル -function c99747800.initial_effect(c) - --atkup - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(99747800,0)) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCondition(c99747800.atkcon) - e1:SetOperation(c99747800.atkop) - c:RegisterEffect(e1) -end -function c99747800.atkcon(e,tp,eg,ep,ev,re,r,rp) - return tp==Duel.GetTurnPlayer() -end -function c99747800.atkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetProperty(EFFECT_FLAG_COPY_INHERIT) - e1:SetReset(RESET_EVENT+0x1ff0000) - e1:SetValue(700) - c:RegisterEffect(e1) -end diff --git a/script/c99788587.lua b/script/c99788587.lua deleted file mode 100644 index 6c170cf485..0000000000 --- a/script/c99788587.lua +++ /dev/null @@ -1,44 +0,0 @@ ---爆導索 -function c99788587.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,0x1e0) - e1:SetCondition(c99788587.condition) - e1:SetTarget(c99788587.target) - e1:SetOperation(c99788587.activate) - c:RegisterEffect(e1) -end -function c99788587.condition(e,tp,eg,ep,ev,re,r,rp) - local seq=e:GetHandler():GetSequence() - return e:GetHandler():IsFacedown() - and Duel.GetFieldCard(tp,LOCATION_MZONE,seq) - and Duel.GetFieldCard(tp,LOCATION_SZONE,seq) - and Duel.GetFieldCard(1-tp,LOCATION_MZONE,4-seq) - and Duel.GetFieldCard(1-tp,LOCATION_SZONE,4-seq) -end -function c99788587.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chk==0 then return true end - local seq=e:GetHandler():GetSequence() - local g=Group.CreateGroup() - g:AddCard(Duel.GetFieldCard(tp,LOCATION_MZONE,seq)) - g:AddCard(Duel.GetFieldCard(tp,LOCATION_SZONE,seq)) - g:AddCard(Duel.GetFieldCard(1-tp,LOCATION_MZONE,4-seq)) - g:AddCard(Duel.GetFieldCard(1-tp,LOCATION_SZONE,4-seq)) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c99788587.activate(e,tp,eg,ep,ev,re,r,rp) - local seq=e:GetHandler():GetSequence() - local g=Group.CreateGroup() - local tc=Duel.GetFieldCard(tp,LOCATION_MZONE,seq) - if tc then g:AddCard(tc) end - tc=Duel.GetFieldCard(tp,LOCATION_SZONE,seq) - if tc then g:AddCard(tc) end - tc=Duel.GetFieldCard(1-tp,LOCATION_MZONE,4-seq) - if tc then g:AddCard(tc) end - tc=Duel.GetFieldCard(1-tp,LOCATION_SZONE,4-seq) - if tc then g:AddCard(tc) end - Duel.Destroy(g,REASON_EFFECT) -end diff --git a/script/c99789342.lua b/script/c99789342.lua deleted file mode 100644 index 590331d3d1..0000000000 --- a/script/c99789342.lua +++ /dev/null @@ -1,55 +0,0 @@ ---黒魔術のカーテン -function c99789342.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(c99789342.cost) - e1:SetTarget(c99789342.target) - e1:SetOperation(c99789342.activate) - c:RegisterEffect(e1) -end -function c99789342.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_SUMMON)==0 - and Duel.GetActivityCount(tp,ACTIVITY_FLIPSUMMON)==0 and Duel.GetActivityCount(tp,ACTIVITY_SPSUMMON)==0 end - Duel.PayLPCost(tp,math.floor(Duel.GetLP(tp)/2)) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) - e1:SetTargetRange(1,0) - e1:SetTarget(c99789342.sumlimit) - Duel.RegisterEffect(e1,tp) - local e2=Effect.CreateEffect(e:GetHandler()) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) - e2:SetCode(EFFECT_CANNOT_SUMMON) - e2:SetReset(RESET_PHASE+PHASE_END) - e2:SetTargetRange(1,0) - Duel.RegisterEffect(e2,tp) - local e3=e2:Clone() - e3:SetCode(EFFECT_CANNOT_FLIP_SUMMON) - Duel.RegisterEffect(e3,tp) -end -function c99789342.sumlimit(e,c,sump,sumtype,sumpos,targetp,se) - return e:GetHandler()~=se:GetHandler() -end -function c99789342.filter(c,e,tp) - return c:IsCode(46986414) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c99789342.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c99789342.filter,tp,LOCATION_DECK,0,1,nil,e,tp) - end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c99789342.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c99789342.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/script/c99795159.lua b/script/c99795159.lua deleted file mode 100644 index 4d79ee5f16..0000000000 --- a/script/c99795159.lua +++ /dev/null @@ -1,44 +0,0 @@ ---ゴーストリック・ハウス -function c99795159.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e1) - --atklimit - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e2:SetValue(c99795159.atlimit) - c:RegisterEffect(e2) - --direct attack - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetCode(EFFECT_DIRECT_ATTACK) - e3:SetRange(LOCATION_SZONE) - e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e3:SetTarget(c99795159.dirtg) - c:RegisterEffect(e3) - -- - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_FIELD) - e4:SetRange(LOCATION_SZONE) - e4:SetCode(EFFECT_CHANGE_DAMAGE) - e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e4:SetTargetRange(1,1) - e4:SetValue(c99795159.val) - c:RegisterEffect(e4) -end -function c99795159.atlimit(e,c) - return c:IsFacedown() -end -function c99795159.dirtg(e,c) - return not Duel.IsExistingMatchingCard(Card.IsFaceup,c:GetControler(),0,LOCATION_MZONE,1,nil) -end -function c99795159.val(e,re,dam,r,rp,rc) - if bit.band(r,REASON_EFFECT)~=0 or (rc and not rc:IsSetCard(0x8d)) then - return dam/2 - else return dam end -end diff --git a/script/c99861526.lua b/script/c99861526.lua deleted file mode 100644 index 0b1ce8612c..0000000000 --- a/script/c99861526.lua +++ /dev/null @@ -1,42 +0,0 @@ ---サブマリンロイド -function c99861526.initial_effect(c) - --direct attack - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DIRECT_ATTACK) - c:RegisterEffect(e1) - --damage reduce - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e2:SetRange(LOCATION_MZONE) - e2:SetCode(EVENT_PRE_BATTLE_DAMAGE) - e2:SetCondition(c99861526.rdcon) - e2:SetOperation(c99861526.rdop) - c:RegisterEffect(e2) - --pos - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(99861526,0)) - e3:SetCategory(CATEGORY_POSITION) - e3:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE) - e3:SetCode(EVENT_DAMAGE_STEP_END) - e3:SetCondition(c99861526.poscon) - e3:SetOperation(c99861526.posop) - c:RegisterEffect(e3) -end -function c99861526.rdcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return ep~=tp and c==Duel.GetAttacker() and Duel.GetAttackTarget()==nil - and c:GetEffectCount(EFFECT_DIRECT_ATTACK)<2 and Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0 -end -function c99861526.rdop(e,tp,eg,ep,ev,re,r,rp) - Duel.ChangeBattleDamage(ep,e:GetHandler():GetBaseAttack()) -end -function c99861526.poscon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsRelateToBattle() and c:IsAttackPos() -end -function c99861526.posop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - Duel.ChangePosition(e:GetHandler(),POS_FACEUP_DEFENCE) - end -end diff --git a/script/c99865167.lua b/script/c99865167.lua deleted file mode 100644 index fbd692483f..0000000000 --- a/script/c99865167.lua +++ /dev/null @@ -1,12 +0,0 @@ ---ウィンドフレーム -function c99865167.initial_effect(c) - --double tribute - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DOUBLE_TRIBUTE) - e1:SetValue(c99865167.condition) - c:RegisterEffect(e1) -end -function c99865167.condition(e,c) - return c:IsAttribute(ATTRIBUTE_WIND) and c:IsType(TYPE_NORMAL) -end diff --git a/script/c99877698.lua b/script/c99877698.lua deleted file mode 100644 index 07c8334151..0000000000 --- a/script/c99877698.lua +++ /dev/null @@ -1,32 +0,0 @@ ---墓守の大筒持ち -function c99877698.initial_effect(c) - --damage - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(99877698,0)) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(c99877698.cost) - e1:SetTarget(c99877698.target) - e1:SetOperation(c99877698.operation) - c:RegisterEffect(e1) -end -function c99877698.costfilter(c) - return c:IsSetCard(0x2e) and c:GetCode()~=99877698 -end -function c99877698.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,c99877698.costfilter,1,nil) end - local sg=Duel.SelectReleaseGroup(tp,c99877698.costfilter,1,1,nil) - Duel.Release(sg,REASON_COST) -end -function c99877698.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(700) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,700) -end -function c99877698.operation(e,tp,eg,ep,ev,re,r,rp,chk) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/script/c99899504.lua b/script/c99899504.lua deleted file mode 100644 index d1a27d98d6..0000000000 --- a/script/c99899504.lua +++ /dev/null @@ -1,84 +0,0 @@ ---スカル・フレイム -function c99899504.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(99899504,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(c99899504.spcon) - e1:SetTarget(c99899504.sptg) - e1:SetOperation(c99899504.spop) - c:RegisterEffect(e1) - --draw - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(99899504,1)) - e2:SetCategory(CATEGORY_TOHAND) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_PREDRAW) - e2:SetRange(LOCATION_MZONE) - e2:SetCondition(c99899504.thcon) - e2:SetTarget(c99899504.thtg) - e2:SetOperation(c99899504.thop) - c:RegisterEffect(e2) -end -function c99899504.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetActivityCount(tp,ACTIVITY_BATTLE_PHASE)==0 -end -function c99899504.spfilter(c,e,tp) - return c:IsCode(26293219) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c99899504.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c99899504.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_BP) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) - e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function c99899504.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c99899504.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end -function c99899504.thcon(e,tp,eg,ep,ev,re,r,rp) - return tp==Duel.GetTurnPlayer() and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0 -end -function c99899504.thfilter(c) - return c:IsCode(26293219) and c:IsAbleToHand() -end -function c99899504.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c99899504.thfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c99899504.thfilter,tp,LOCATION_GRAVE,0,1,nil) end - local dt=Duel.GetDrawCount(tp) - if dt~=0 then - e:SetLabel(1) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c99899504.thfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EFFECT_DRAW_COUNT) - e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_DRAW) - e1:SetValue(0) - Duel.RegisterEffect(e1,tp) - else e:SetLabel(0) end -end -function c99899504.thop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if e:GetLabel()==1 and tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end diff --git a/script/c99902789.lua b/script/c99902789.lua deleted file mode 100644 index 306da6c59a..0000000000 --- a/script/c99902789.lua +++ /dev/null @@ -1,36 +0,0 @@ ---チャウチャウちゃん -function c99902789.initial_effect(c) - --Negate - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(99902789,0)) - e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_CHAINING) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(c99902789.discon) - e1:SetCost(c99902789.discost) - e1:SetTarget(c99902789.distg) - e1:SetOperation(c99902789.disop) - c:RegisterEffect(e1) -end -function c99902789.discon(e,tp,eg,ep,ev,re,r,rp) - return Duel.CheckEvent(EVENT_ATTACK_ANNOUNCE) and Duel.GetAttacker():IsControler(tp) and Duel.GetAttackTarget()~=nil - and ep~=tp and re:GetActiveType()==TYPE_TRAP and re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev) -end -function c99902789.discost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsDiscardable() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD) -end -function c99902789.distg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) - end -end -function c99902789.disop(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateActivation(ev) - if re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(eg,REASON_EFFECT) - end -end diff --git a/script/c99916754.lua b/script/c99916754.lua deleted file mode 100644 index b96147802b..0000000000 --- a/script/c99916754.lua +++ /dev/null @@ -1,46 +0,0 @@ ---ナチュル・エクストリオ -function c99916754.initial_effect(c) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcCode2(c,33198837,2956282,false,false) - --negate - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(99916754,0)) - e2:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetRange(LOCATION_MZONE) - e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) - e2:SetCode(EVENT_CHAINING) - e2:SetCondition(c99916754.discon) - e2:SetCost(c99916754.discost) - e2:SetTarget(c99916754.distg) - e2:SetOperation(c99916754.disop) - c:RegisterEffect(e2) -end -function c99916754.discon(e,tp,eg,ep,ev,re,r,rp) - return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) - and re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev) -end -function c99916754.discost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDiscardDeckAsCost(tp,1) - and Duel.IsExistingMatchingCard(Card.IsAbleToRemoveAsCost,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemoveAsCost,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) - Duel.DiscardDeck(tp,1,REASON_COST) -end -function c99916754.distg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) - end -end -function c99916754.disop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsFaceup() or not c:IsRelateToEffect(e) then return end - Duel.NegateActivation(ev) - if re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(eg,REASON_EFFECT) - end -end diff --git a/script/c99946920.lua b/script/c99946920.lua deleted file mode 100644 index bdf6131f2b..0000000000 --- a/script/c99946920.lua +++ /dev/null @@ -1,91 +0,0 @@ ---魔竜星-トウテツ -function c99946920.initial_effect(c) - --spsummon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(99946920,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCountLimit(1,99946920) - e1:SetCondition(c99946920.condition) - e1:SetTarget(c99946920.target) - e1:SetOperation(c99946920.operation) - c:RegisterEffect(e1) - --synchro effect - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetRange(LOCATION_MZONE) - e2:SetHintTiming(0,TIMING_BATTLE_START+TIMING_BATTLE_END) - e2:SetCountLimit(1) - e2:SetCondition(c99946920.sccon) - e2:SetTarget(c99946920.sctg) - e2:SetOperation(c99946920.scop) - c:RegisterEffect(e2) - -- - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e3:SetCode(EVENT_BE_MATERIAL) - e3:SetCondition(c99946920.atkcon) - e3:SetOperation(c99946920.atkop) - c:RegisterEffect(e3) -end -function c99946920.condition(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE+REASON_EFFECT) - and c:IsPreviousLocation(LOCATION_ONFIELD) and c:GetPreviousControler()==tp -end -function c99946920.filter(c,e,tp) - return c:IsSetCard(0x9e) and not c:IsCode(99946920) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function c99946920.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c99946920.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function c99946920.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,c99946920.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENCE) -end -function c99946920.sccon(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetTurnPlayer()==tp then return false end - local ph=Duel.GetCurrentPhase() - return ph==PHASE_MAIN1 or ph==PHASE_BATTLE or ph==PHASE_MAIN2 -end -function c99946920.mfilter(c) - return c:IsSetCard(0x9e) -end -function c99946920.sctg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local mg=Duel.GetMatchingGroup(c99946920.mfilter,tp,LOCATION_MZONE,0,nil) - return Duel.IsExistingMatchingCard(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,1,nil,nil,mg) - end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function c99946920.scop(e,tp,eg,ep,ev,re,r,rp) - local mg=Duel.GetMatchingGroup(c99946920.mfilter,tp,LOCATION_MZONE,0,nil) - local g=Duel.GetMatchingGroup(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,nil,nil,mg) - if g:GetCount()>0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=g:Select(tp,1,1,nil) - Duel.SynchroSummon(tp,sg:GetFirst(),nil,mg) - end -end -function c99946920.atkcon(e,tp,eg,ep,ev,re,r,rp) - return r==REASON_SYNCHRO -end -function c99946920.atkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local rc=c:GetReasonCard() - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(99946920,1)) - e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_CHANGE_CONTROL) - e1:SetReset(RESET_EVENT+0x1fe0000) - rc:RegisterEffect(e1) -end diff --git a/script/c9995766.lua b/script/c9995766.lua deleted file mode 100644 index e161e31710..0000000000 --- a/script/c9995766.lua +++ /dev/null @@ -1,21 +0,0 @@ ---宮廷のしきたり -function c9995766.initial_effect(c) - c:SetUniqueOnField(1,0,9995766) - --activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_DRAW_PHASE) - c:RegisterEffect(e1) - --indestructable - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_INDESTRUCTABLE) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(LOCATION_ONFIELD,LOCATION_ONFIELD) - e2:SetTarget(c9995766.infilter) - c:RegisterEffect(e2) -end -function c9995766.infilter(e,c) - return bit.band(c:GetType(),0x20004)==0x20004 and c:GetCode()~=9995766 -end diff --git a/script/c99995595.lua b/script/c99995595.lua deleted file mode 100644 index 864f4ddeaa..0000000000 --- a/script/c99995595.lua +++ /dev/null @@ -1,30 +0,0 @@ ---バッテリーリサイクル -function c99995595.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c99995595.target) - e1:SetOperation(c99995595.activate) - c:RegisterEffect(e1) -end -function c99995595.filter(c) - return c:IsRace(RACE_THUNDER) and c:IsAttackBelow(1500) and c:IsAbleToHand() -end -function c99995595.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:GetControler()==tp and chkc:GetLocation()==LOCATION_GRAVE and c99995595.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(c99995595.filter,tp,LOCATION_GRAVE,0,2,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,c99995595.filter,tp,LOCATION_GRAVE,0,2,2,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,2,0,0) -end -function c99995595.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - local sg=g:Filter(Card.IsRelateToEffect,nil,e) - if sg:GetCount()>0 then - Duel.SendtoHand(sg,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,sg) - end -end diff --git a/script/c9999961.lua b/script/c9999961.lua deleted file mode 100644 index c30338e72b..0000000000 --- a/script/c9999961.lua +++ /dev/null @@ -1,33 +0,0 @@ ---ビーストレイジ -function c9999961.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(c9999961.target) - e1:SetOperation(c9999961.activate) - c:RegisterEffect(e1) -end -function c9999961.rfilter(c) - return c:IsFaceup() and c:IsRace(RACE_BEAST+RACE_WINDBEAST) -end -function c9999961.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) - and Duel.IsExistingMatchingCard(c9999961.rfilter,tp,LOCATION_REMOVED,0,1,nil) end -end -function c9999961.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil) - local atk=Duel.GetMatchingGroupCount(c9999961.rfilter,tp,LOCATION_REMOVED,0,nil)*200 - if g:GetCount()==0 or atk==0 then return end - local tc=g:GetFirst() - while tc do - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000) - e1:SetValue(atk) - tc:RegisterEffect(e1) - tc=g:GetNext() - end -end diff --git a/script/constant.lua b/script/constant.lua deleted file mode 100644 index 0f864f73c3..0000000000 --- a/script/constant.lua +++ /dev/null @@ -1,696 +0,0 @@ ---Card id -MIN_ID =1000 --4 digit, by DataManager::GetDesc() -MAX_ID =999999999 --9 digit, by Auxiliary.Stringid(), field::select_chain() ---Locations 区域 -LOCATION_DECK =0x01 --卡组 -LOCATION_HAND =0x02 --手牌 -LOCATION_MZONE =0x04 --怪兽区 -LOCATION_SZONE =0x08 --魔陷区 -LOCATION_GRAVE =0x10 --墓地 -LOCATION_REMOVED =0x20 --除外区 -LOCATION_EXTRA =0x40 --额外 -LOCATION_OVERLAY =0x80 --超量素材 -LOCATION_ONFIELD =0x0c --场上(怪兽+魔陷) ---Locations (for redirect) 若在重定向类效果中指定LOCATION_DECK则为弹回卡组顶部 -LOCATION_DECKBOT =0x10001 --弹回卡组底部 -LOCATION_DECKSHF =0x20001 --弹回卡组并洗牌 ---Locations (for SetRange) -LOCATION_FZONE =0x100 --场地区 -LOCATION_PZONE =0x200 --灵摆区 ---Positions 表示形式 -POS_FACEUP_ATTACK =0x1 --表侧攻击 -POS_FACEDOWN_ATTACK =0x2 --里侧攻击 -POS_FACEUP_DEFENCE =0x4 --表侧守备 -POS_FACEDOWN_DEFENCE =0x8 --里侧守备 -POS_FACEUP =0x5 --正面表示 -POS_FACEDOWN =0xa --背面表示 -POS_ATTACK =0x3 --攻击表示 -POS_DEFENCE =0xc --守备表示 -NO_FLIP_EFFECT =0x10000--不发动反转效果 ---Types 卡片类型 -TYPE_MONSTER =0x1 --怪兽卡 -TYPE_SPELL =0x2 --魔法卡 -TYPE_TRAP =0x4 --陷阱卡 -TYPE_NORMAL =0x10 --通常 -TYPE_EFFECT =0x20 --效果 -TYPE_FUSION =0x40 --融合 -TYPE_RITUAL =0x80 --仪式 -TYPE_TRAPMONSTER =0x100 --陷阱怪兽 -TYPE_SPIRIT =0x200 --灵魂 -TYPE_UNION =0x400 --同盟 -TYPE_DUAL =0x800 --二重 -TYPE_TUNER =0x1000 --调整 -TYPE_SYNCHRO =0x2000 --同调 -TYPE_TOKEN =0x4000 --衍生物 -TYPE_QUICKPLAY =0x10000 --速攻 -TYPE_CONTINUOUS =0x20000 --永续 -TYPE_EQUIP =0x40000 --装备 -TYPE_FIELD =0x80000 --场地 -TYPE_COUNTER =0x100000 --反击 -TYPE_FLIP =0x200000 --翻转 -TYPE_TOON =0x400000 --卡通 -TYPE_XYZ =0x800000 --超量 -TYPE_PENDULUM =0x1000000 --灵摆 ---Attributes 属性 -ATTRIBUTE_EARTH =0x01 --地 -ATTRIBUTE_WATER =0x02 --水 -ATTRIBUTE_FIRE =0x04 --炎 -ATTRIBUTE_WIND =0x08 --风 -ATTRIBUTE_LIGHT =0x10 --光 -ATTRIBUTE_DARK =0x20 --暗 -ATTRIBUTE_DEVINE =0x40 --神 ---Races 种族 -RACE_ALL =0xffffff --全种族 -RACE_WARRIOR =0x1 --战士 -RACE_SPELLCASTER =0x2 --魔法师 -RACE_FAIRY =0x4 --天使 -RACE_FIEND =0x8 --恶魔 -RACE_ZOMBIE =0x10 --不死 -RACE_MACHINE =0x20 --机械 -RACE_AQUA =0x40 --水 -RACE_PYRO =0x80 --炎 -RACE_ROCK =0x100 --岩石 -RACE_WINDBEAST =0x200 --鸟兽 -RACE_PLANT =0x400 --植物 -RACE_INSECT =0x800 --昆虫 -RACE_THUNDER =0x1000 --雷 -RACE_DRAGON =0x2000 --龙 -RACE_BEAST =0x4000 --兽 -RACE_BEASTWARRIOR =0x8000 --兽战士 -RACE_DINOSAUR =0x10000 --恐龙 -RACE_FISH =0x20000 --鱼 -RACE_SEASERPENT =0x40000 --海龙 -RACE_REPTILE =0x80000 --爬虫 -RACE_PSYCHO =0x100000 --念动力 -RACE_DEVINE =0x200000 --幻神兽 -RACE_CREATORGOD =0x400000 --创造神 -RACE_WYRM =0x800000 --幻龙 ---Reason 卡片到当前位置的原因 -REASON_DESTROY =0x1 --破坏 -REASON_RELEASE =0x2 --解放 -REASON_TEMPORARY =0x4 --暂时 -REASON_MATERIAL =0x8 --作为融合/同调/超量素材或用於儀式/升級召喚 -REASON_SUMMON =0x10 --召唤 -REASON_BATTLE =0x20 --战斗破坏 -REASON_EFFECT =0x40 --效果 -REASON_COST =0x80 --COST -REASON_ADJUST =0x100 --调整(御前试合) -REASON_LOST_TARGET =0x200 --失去效果对象 -REASON_RULE =0x400 --规则 -REASON_SPSUMMON =0x800 --特殊召唤 -REASON_DISSUMMON =0x1000 --召唤失败 -REASON_FLIP =0x2000 --翻转 -REASON_DISCARD =0x4000 --丢弃 -REASON_RDAMAGE =0x8000 --回復轉換後的傷害 -REASON_RRECOVER =0x10000 --傷害轉換後的回復 -REASON_RETURN =0x20000 --回到墓地 -REASON_FUSION =0x40000 --用於融合召喚 -REASON_SYNCHRO =0x80000 --用於同调召喚 -REASON_RITUAL =0x100000 --用於仪式召喚 -REASON_XYZ =0x200000 --用於超量召喚 -REASON_REPLACE =0x1000000 --代替 -REASON_DRAW =0x2000000 --抽卡 -REASON_REDIRECT =0x4000000 --改变去向(大宇宙,带菌等) -REASON_REVEAL =0x8000000 --翻开卡组(森罗) ---Location Reason -LOCATION_REASON_TOFIELD =0x1 --Duel.GetLocationCount()預設值,凱薩競技場 -LOCATION_REASON_CONTROL =0x2 --Card.IsControlerCanBeChanged()使用 ---Summon Type --召唤类型 -SUMMON_TYPE_NORMAL =0x10000000 --通常召唤(EFFECT_SUMMON_PROC,EFFECT_SET_PROC 可用Value修改數值) -SUMMON_TYPE_ADVANCE =0x11000000 --上级召唤 -SUMMON_TYPE_DUAL =0x12000000 --再度召唤(二重) -SUMMON_TYPE_FLIP =0x20000000 --翻转召唤 -SUMMON_TYPE_SPECIAL =0x40000000 --特殊召唤(EFFECT_SPSUMMON_PROC,EFFECT_SPSUMMON_PROC_G 可用Value修改數值) -SUMMON_TYPE_FUSION =0x43000000 --融合召唤 -SUMMON_TYPE_RITUAL =0x45000000 --仪式召唤 -SUMMON_TYPE_SYNCHRO =0x46000000 --同调召唤 -SUMMON_TYPE_XYZ =0x49000000 --超量召唤 -SUMMON_TYPE_PENDULUM =0x4a000000 --灵摆召唤 ---Status --卡片当前状态 -STATUS_DISABLED =0x0001 --效果被无效 -STATUS_TO_ENABLE =0x0002 --将变成有效 -STATUS_TO_DISABLE =0x0004 --将变成无效 -STATUS_PROC_COMPLETE =0x0008 --完成正规召唤(解除苏生限制) -STATUS_SET_TURN =0x0010 --覆盖 -STATUS_NO_LEVEL =0x0020 --无等级 -STATUS_REVIVE_LIMIT =0x0040 --(N/A) -STATUS_SPSUMMON_STEP =0x0080 --效果特召處理中 -STATUS_FORM_CHANGED =0x0100 --改变过表示形式 -STATUS_SUMMONING =0x0200 --召唤中 -STATUS_EFFECT_ENABLED =0x0400 --效果有效 -STATUS_SUMMON_TURN =0x0800 --在本回合召喚/SET -STATUS_DESTROY_CONFIRMED =0x1000 --破坏确定 -STATUS_LEAVE_CONFIRMED =0x2000 --連鎖處理完後送去墓地的魔法陷阱 -STATUS_BATTLE_DESTROYED =0x4000 --战斗破坏确定 -STATUS_COPYING_EFFECT =0x8000 --复制效果 -STATUS_CHAINING =0x10000 --正在連鎖串中 -STATUS_SUMMON_DISABLED =0x20000 --召唤无效後尚未移動 -STATUS_ACTIVATE_DISABLED =0x40000 --发动无效 -STATUS_UNSUMMONABLE_CARD =0x80000 --(N/A) -STATUS_UNION =0x100000 --同盟 -STATUS_ATTACK_CANCELED =0x200000 --攻击取消(卷回?) -STATUS_INITIALIZING =0x400000 --初始化.. -STATUS_ACTIVATED =0x800000 --效果已发动 -STATUS_JUST_POS =0x1000000 --已改變表示形式(用於STATUS_CONTINUOUS_POS判定) -STATUS_CONTINUOUS_POS =0x2000000 --改變後再次設定成其他表示形式 -STATUS_IS_PUBLIC =0x4000000 --公开展示 -STATUS_ACT_FROM_HAND =0x8000000 --從手牌发动 -STATUS_OPPO_BATTLE =0x10000000 --和對手的怪兽戰鬥 -STATUS_FLIP_SUMMON_TURN =0x20000000 --在本回合反转召唤 -STATUS_SPSUMMON_TURN =0x40000000 --在本回合特殊召唤 ---Assume -ASSUME_CODE =1 -ASSUME_TYPE =2 -ASSUME_LEVEL =3 -ASSUME_RANK =4 -ASSUME_ATTRIBUTE =5 -ASSUME_RACE =6 -ASSUME_ATTACK =7 -ASSUME_DEFENCE =8 ---Counter --指示物 -COUNTER_NEED_PERMIT =0x1000 --某指示物数量上限 -COUNTER_NEED_ENABLE =0x2000 --可以放置某指示物 ---Phase --阶段 -PHASE_DRAW =0x01 --抽卡阶段 -PHASE_STANDBY =0x02 --准备阶段 -PHASE_MAIN1 =0x04 --主要阶段1 -PHASE_BATTLE =0x08 --战斗阶段 -PHASE_DAMAGE =0x10 --伤害计算前 -PHASE_DAMAGE_CAL =0x20 --伤害计算时 -PHASE_MAIN2 =0x40 --主要阶段2 -PHASE_END =0x80 --结束阶段 ---Player --玩家 -PLAYER_NONE =2 --2个玩家都不是 -PLAYER_ALL =3 --2个玩家都是 ---Chain info --连锁信息 -CHAININFO_CHAIN_COUNT =0x01 --连锁数 -CHAININFO_TRIGGERING_EFFECT =0x02 --连锁的效果 -CHAININFO_TRIGGERING_PLAYER =0x04 --连锁的玩家 -CHAININFO_TRIGGERING_CONTROLER =0x08 --连锁的卡的控制者 -CHAININFO_TRIGGERING_LOCATION =0x10 --连锁的位置 -CHAININFO_TRIGGERING_SEQUENCE =0x20 --连锁的位置的编号(指怪兽和魔陷区的格子) -CHAININFO_TARGET_CARDS =0x40 --连锁的效果的对象(以下3个需要在target函数里设置) -CHAININFO_TARGET_PLAYER =0x80 --连锁的效果的对象(玩家) -CHAININFO_TARGET_PARAM =0x100 --连锁的效果的参数值 -CHAININFO_DISABLE_REASON =0x200 --无效的原因 -CHAININFO_DISABLE_PLAYER =0x400 --无效的玩家 -CHAININFO_CHAIN_ID =0x800 --连锁ID -CHAININFO_TYPE =0x1000 --连锁类型 -CHAININFO_EXTTYPE =0x2000 --连锁额外类型 ---========== Reset ========== --重置条件(注意:重置条件可以多个相加) -RESET_DRAW =PHASE_DRAW --抽卡阶段重置 -RESET_STANDBY =PHASE_STANDBY --准备阶段重置 -RESET_MAIN1 =PHASE_MAIN1 --主要阶段1重置 -RESET_BATTLE =PHASE_BATTLE --战斗阶段重置 -RESET_DAMAGE =PHASE_DAMAGE --伤害计算前重置 -RESET_DAMAGE_CAL =PHASE_DAMAGE_CAL --伤害计算时重置 -RESET_MAIN2 =PHASE_MAIN2 --主要阶段2重置 -RESET_END =PHASE_END --结束阶段重置 -RESET_SELF_TURN =0x0100 --自己回合结束重置 -RESET_OPPO_TURN =0x0200 --对方回合结束重置 -RESET_PHASE =0x0400 --阶段结束重置(一般和上面那些阶段配合使用) -RESET_CHAIN =0x0800 --连锁结束重置 -RESET_EVENT =0x1000 --指定的條件下重置(一般和下面这些事件配合使用) -RESET_CARD =0x2000 --重置Owner為指定卡片的效果 -RESET_CODE =0x4000 --重置指定Code的single效果(不含EFFECT_FLAG_SINGLE_RANGE) -RESET_COPY =0x8000 --重置以复制取得的效果 -RESET_DISABLE =0x00010000 --效果无效重置(只適用於owner==handler的效果) -RESET_TURN_SET =0x00020000 --变里侧重置 -RESET_TOGRAVE =0x00040000 --去墓地重置(以下皆為事件觸發前重置) -RESET_REMOVE =0x00080000 --除外重置 -RESET_TEMP_REMOVE =0x00100000 --暂时除外重置 -RESET_TOHAND =0x00200000 --回手牌或加入手牌重置 -RESET_TODECK =0x00400000 --回卡组重置 -RESET_LEAVE =0x00800000 --从场上移到其他位置/超量叠放重置 -RESET_TOFIELD =0x01000000 --到场上重置 -RESET_CONTROL =0x02000000 --控制者变更重置 -RESET_OVERLAY =0x04000000 --超量叠放重置 -RESET_MSCHANGE =0x08000000 --从怪兽区到魔法区,或者从魔法区到怪兽区 ---========== Types ========== --效果类型(定义效果触发类型,和codes一起使用) -EFFECT_TYPE_SINGLE =0x0001 --自己状态变化时触发 -EFFECT_TYPE_FIELD =0x0002 --场上所有卡状态变化时触发 -EFFECT_TYPE_EQUIP =0x0004 --装备效果 -EFFECT_TYPE_ACTIONS =0x0008 --触发型,以下類型會自動添加此屬性(对峙的G) -EFFECT_TYPE_ACTIVATE =0x0010 --魔陷发动 -EFFECT_TYPE_FLIP =0x0020 --翻转效果 -EFFECT_TYPE_IGNITION =0x0040 --起动效果 -EFFECT_TYPE_TRIGGER_O =0x0080 --诱发选发效果 -EFFECT_TYPE_QUICK_O =0x0100 --诱发即时效果 -EFFECT_TYPE_TRIGGER_F =0x0200 --诱发必发效果 -EFFECT_TYPE_QUICK_F =0x0400 --诱发即时必发效果(熊猫龙等) -EFFECT_TYPE_CONTINUOUS =0x0800 --由事件觸發的輔助用效果/永續效果 ---========== Flags ========== --效果的特殊性质 -EFFECT_FLAG_INITIAL =0x0001 --可以发动的 -EFFECT_FLAG_FUNC_VALUE =0x0002 --此效果的Value属性是函数 -EFFECT_FLAG_COUNT_LIMIT =0x0004 --发动次数限制 -EFFECT_FLAG_FIELD_ONLY =0x0008 --此效果是注册给全局环境的 -EFFECT_FLAG_CARD_TARGET =0x0010 --取对象效果 -EFFECT_FLAG_IGNORE_RANGE =0x0020 --影响所有区域的卡(禁止令 大宇宙 王宫的铁壁) -EFFECT_FLAG_ABSOLUTE_TARGET =0x0040 --Target Range不会因为控制权的改变而改变 -EFFECT_FLAG_IGNORE_IMMUNE =0x0080 --无视效果免疫 -EFFECT_FLAG_SET_AVAILABLE =0x0100 --影响场上里侧的卡/裡側狀態可發動 -EFFECT_FLAG_CONTINUOUS =0x0200 --N/A -EFFECT_FLAG_CANNOT_DISABLE =0x0400 --不会被无效 -EFFECT_FLAG_PLAYER_TARGET =0x0800 --以玩家为对象 -EFFECT_FLAG_BOTH_SIDE =0x1000 --双方都能使用(部分场地,弹压) -EFFECT_FLAG_COPY_INHERIT =0x2000 --继承复制的效果的Reset属性 -EFFECT_FLAG_DAMAGE_STEP =0x4000 --可以在伤害步骤发动 -EFFECT_FLAG_DAMAGE_CAL =0x8000 --可以在伤害计算时发动 -EFFECT_FLAG_DELAY =0x10000 --場合型誘發效果、用於永續效果的EFFECT_TYPE_CONTINUOUS -EFFECT_FLAG_SINGLE_RANGE =0x20000 --只对自己有效 -EFFECT_FLAG_UNCOPYABLE =0x40000 --不能复制(效果外文本) -EFFECT_FLAG_OATH =0x80000 --誓约效果 -EFFECT_FLAG_SPSUM_PARAM =0x100000 --指定召喚/规则特殊召唤的位置和表示形式(熔岩魔神) -EFFECT_FLAG_REPEAT =0x200000 --发动被无效后可以再次发动 -EFFECT_FLAG_NO_TURN_RESET =0x400000 --发条等“这张卡在场上只能发动一次”的效果 -EFFECT_FLAG_EVENT_PLAYER =0x800000 --视为对方玩家的效果(动作?) -EFFECT_FLAG_OWNER_RELATE =0x1000000 --持續成為對象 -EFFECT_FLAG_AVAILABLE_BD =0x2000000 --战斗破坏确定时效果也适用(纳祭之魔 地狱战士) -EFFECT_FLAG_CLIENT_HINT =0x4000000 --客户端提示 -EFFECT_FLAG_CHAIN_UNIQUE =0x8000000 --同一组连锁只能发动一次 -EFFECT_FLAG_NAGA =0x10000000 --神卡纳迦! -EFFECT_FLAG_COF =0x20000000 --邪恶的仪式 -EFFECT_FLAG_CVAL_CHECK =0x40000000 --以卡为COST的诱发效果需要使用 -EFFECT_FLAG_IMMEDIATELY_APPLY =0x80000000 --卡在发动时效果就立即适用(卡通王國) ---========== Codes ========== --对永续性效果表示效果类型 EFFECT开头,对诱发型效果表示触发效果的事件/时点 EVENT开头 -EFFECT_IMMUNE_EFFECT =1 --效果免疫 -EFFECT_DISABLE =2 --效果无效(技能抽取) -EFFECT_CANNOT_DISABLE =3 --效果不能无效 -EFFECT_SET_CONTROL =4 --改变控制器 -EFFECT_CANNOT_CHANGE_CONTROL =5 --不能改变控制权 -EFFECT_CANNOT_ACTIVATE =6 --玩家不能发动效果 -EFFECT_CANNOT_TRIGGER =7 --不能发动效果 -EFFECT_DISABLE_EFFECT =8 --效果无效 (聖杯) -EFFECT_DISABLE_CHAIN =9 --不能连锁 -EFFECT_DISABLE_TRAPMONSTER =10 --陷阱怪兽无效 -EFFECT_CANNOT_INACTIVATE =12 --不能发动 -EFFECT_CANNOT_DISEFFECT =13 --效果不能被无效(魔法·陷阱) -EFFECT_CANNOT_CHANGE_POSITION =14 --不能改变表示形式 -EFFECT_TRAP_ACT_IN_HAND =15 --陷阱可以从手牌发动 -EFFECT_TRAP_ACT_IN_SET_TURN =16 --陷阱可以在盖放的回合发动 -EFFECT_REMAIN_FIELD =17 --X回合内留在场上(光之护封剑等) -EFFECT_MONSTER_SSET =18 --怪兽可以在魔陷区放置 -EFFECT_CANNOT_SUMMON =20 --不能召唤怪兽 -EFFECT_CANNOT_FLIP_SUMMON =21 --不能翻转召唤怪兽 -EFFECT_CANNOT_SPECIAL_SUMMON =22 --不能特殊召唤怪兽 -EFFECT_CANNOT_MSET =23 --不能覆盖怪兽 -EFFECT_CANNOT_SSET =24 --不能覆盖魔陷 -EFFECT_CANNOT_DRAW =25 --不能抽卡 -EFFECT_CANNOT_DISABLE_SUMMON =26 --召唤不会无效 -EFFECT_CANNOT_DISABLE_SPSUMMON =27 --特殊召唤不会无效 -EFFECT_SET_SUMMON_COUNT_LIMIT =28 --限制每回合放置怪兽次数 -EFFECT_EXTRA_SUMMON_COUNT =29 --增加召唤(通常召唤)次数 -EFFECT_SPSUMMON_CONDITION =30 --特殊召唤条件 -EFFECT_REVIVE_LIMIT =31 --有苏生限制的怪獸 -EFFECT_SUMMON_PROC =32 --召唤规则效果 -EFFECT_LIMIT_SUMMON_PROC =33 --召唤规则限制 -EFFECT_SPSUMMON_PROC =34 --特殊召唤规则 -EFFECT_EXTRA_SET_COUNT =35 --增加盖放(通常召唤)次数 -EFFECT_SET_PROC =36 --放置(通常召唤)规则 -EFFECT_LIMIT_SET_PROC =37 --放置(通常召唤)规则限制 -EFFECT_DEVINE_LIGHT =38 --神圣光辉(魔术礼帽) -EFFECT_CANNOT_DISABLE_FLIP_SUMMON =39 --翻转召唤不会无效 -EFFECT_INDESTRUCTABLE =40 --不能被破坏(宫廷的规矩) -EFFECT_INDESTRUCTABLE_EFFECT =41 --不会被效果破坏 -EFFECT_INDESTRUCTABLE_BATTLE =42 --不会被战斗破坏 -EFFECT_UNRELEASABLE_SUM =43 --不能做上级召唤的祭品 -EFFECT_UNRELEASABLE_NONSUM =44 --不能做上级召唤以外的祭品 -EFFECT_DESTROY_SUBSTITUTE =45 --代替破坏(别人破坏时牺牲自己 -EFFECT_CANNOT_RELEASE =46 --不能进行解放行为 -EFFECT_INDESTRUCTABLE_COUNT =47 --一回合几次不会被破坏 -EFFECT_UNRELEASABLE_EFFECT =48 --不能被解放 -EFFECT_DESTROY_REPLACE =50 --代替破坏(自己破坏时牺牲别人 -EFFECT_RELEASE_REPLACE =51 --代替解放 -EFFECT_SEND_REPLACE =52 --可以不送去XX而送去OO(宝玉 甜点城堡等) -EFFECT_CANNOT_DISCARD_HAND =55 --不能丢弃手牌 -EFFECT_CANNOT_DISCARD_DECK =56 --不能把卡组上方的卡送去墓地 -EFFECT_CANNOT_USE_AS_COST =57 --不能作为COST使用 -EFFECT_CANNOT_PLACE_COUNTER =58 --不能放置counter - -EFFECT_LEAVE_FIELD_REDIRECT =60 --离场时重新指定去向 -EFFECT_TO_HAND_REDIRECT =61 --回手牌时重新指定去向 -EFFECT_TO_DECK_REDIRECT =62 --回卡组时重新指定去向 -EFFECT_TO_GRAVE_REDIRECT =63 --去墓地时重新指定去向 -EFFECT_REMOVE_REDIRECT =64 --除外时重新指定去向 -EFFECT_CANNOT_TO_HAND =65 --不能加入手牌 -EFFECT_CANNOT_TO_DECK =66 --不能回卡组 -EFFECT_CANNOT_REMOVE =67 --不能除外 -EFFECT_CANNOT_TO_GRAVE =68 --不能去墓地 -EFFECT_CANNOT_TURN_SET =69 --不能变里侧 -EFFECT_CANNOT_BE_BATTLE_TARGET =70 --不能成为攻击对象 -EFFECT_CANNOT_BE_EFFECT_TARGET =71 --不能成为效果对象 -EFFECT_IGNORE_BATTLE_TARGET =72 --不能成为攻击对象-鶸型(传说的渔人) -EFFECT_CANNOT_DIRECT_ATTACK =73 --不能直接攻击 -EFFECT_DIRECT_ATTACK =74 --可以直接攻击 -EFFECT_DUAL_STATUS =75 --二重状态 -EFFECT_EQUIP_LIMIT =76 --装备对象限制 -EFFECT_DUAL_SUMMONABLE =77 --可以再度召唤 -EFFECT_REVERSE_DAMAGE =80 --伤害变回复 -EFFECT_REVERSE_RECOVER =81 --回复变伤害 -EFFECT_CHANGE_DAMAGE =82 --改变伤害数值 -EFFECT_REFLECT_DAMAGE =83 --反射伤害 -EFFECT_CANNOT_ATTACK =85 --不能攻击 -EFFECT_CANNOT_ATTACK_ANNOUNCE =86 --不能攻击宣言 -EFFECT_CANNOT_CHANGE_POS_E =87 --不会被卡的效果变成守备表示(攻击性云魔物) -EFFECT_ACTIVATE_COST =90 --发动代价(魔力之枷) -EFFECT_SUMMON_COST =91 --召唤代价 -EFFECT_SPSUMMON_COST =92 --特殊召唤代价(暴君龙) -EFFECT_FLIPSUMMON_COST =93 --翻转召唤代价 -EFFECT_MSET_COST =94 --怪兽放置代价 -EFFECT_SSET_COST =95 --魔陷放置代价 -EFFECT_ATTACK_COST =96 --攻击代价(霞之谷猎鹰) - -EFFECT_UPDATE_ATTACK =100 --改变攻击力(攻击力增加/减少) -EFFECT_SET_ATTACK =101 --设置攻击力(攻击变成) -EFFECT_SET_ATTACK_FINAL =102 --设置最终攻击力(神之化身) -EFFECT_SET_BASE_ATTACK =103 --设置原本攻击力 -EFFECT_UPDATE_DEFENCE =104 --改变防御力 -EFFECT_SET_DEFENCE =105 --设置防御力 -EFFECT_SET_DEFENCE_FINAL =106 --设置最终防御力 -EFFECT_SET_BASE_DEFENCE =107 --设置原本防御力 -EFFECT_REVERSE_UPDATE =108 --倒置改变攻击力、防御力(天邪鬼) -EFFECT_SWAP_AD =109 --交换攻防 -EFFECT_SWAP_BASE_AD =110 --交换原本攻防 -EFFECT_ADD_CODE =113 --增加卡名 -EFFECT_CHANGE_CODE =114 --改变卡名 -EFFECT_ADD_TYPE =115 --增加卡片种类(types) -EFFECT_REMOVE_TYPE =116 --删除卡片种类 -EFFECT_CHANGE_TYPE =117 --改变卡片种类 -EFFECT_ADD_RACE =120 --增加种族 -EFFECT_REMOVE_RACE =121 --删除种族 -EFFECT_CHANGE_RACE =122 --改变种族 -EFFECT_ADD_ATTRIBUTE =125 --增加属性 -EFFECT_REMOVE_ATTRIBUTE =126 --删除属性 -EFFECT_CHANGE_ATTRIBUTE =127 --改变属性 -EFFECT_UPDATE_LEVEL =130 --改变等级 -EFFECT_CHANGE_LEVEL =131 --设置等级 -EFFECT_UPDATE_RANK =132 --改变阶级 -EFFECT_CHANGE_RANK =133 --设置阶级 -EFFECT_UPDATE_LSCALE =134 --改变左刻度 -EFFECT_CHANGE_LSCALE =135 --设置左刻度 -EFFECT_UPDATE_RSCALE =136 --改变右刻度 -EFFECT_CHANGE_RSCALE =137 --设置右刻度 -EFFECT_SET_POSITION =140 --設定表示形式 -EFFECT_SELF_DESTROY =141 --不入連鎖的破壞(罪系列等) -EFFECT_SELF_TOGRAVE =142 --不入連鎖的送墓 -EFFECT_DOUBLE_TRIBUTE =150 --可以作为2个祭品 -EFFECT_DECREASE_TRIBUTE =151 --减少祭品 -EFFECT_DECREASE_TRIBUTE_SET =152 --减少放置怪兽的祭品 -EFFECT_EXTRA_RELEASE =153 --代替解放(灵魂交错) -EFFECT_TRIBUTE_LIMIT =154 --祭品限制 -EFFECT_EXTRA_RELEASE_SUM =155 --代替召唤解放(帝王的烈旋) -EFFECT_PUBLIC =160 --公开手牌 -EFFECT_COUNTER_PERMIT =0x10000--允许放置指示物类型 -EFFECT_COUNTER_LIMIT =0x20000--允许放置指示物数量 -EFFECT_RCOUNTER_REPLACE =0x30000--代替取除指示物 -EFFECT_LPCOST_CHANGE =170 --改变生命值代价 -EFFECT_LPCOST_REPLACE =171 --代替生命值代价 -EFFECT_SKIP_DP =180 --跳过抽卡阶段 -EFFECT_SKIP_SP =181 --跳过准备阶段 -EFFECT_SKIP_M1 =182 --跳过主要阶段1 -EFFECT_SKIP_BP =183 --跳过战斗阶段 -EFFECT_SKIP_M2 =184 --跳过主要阶段2 -EFFECT_CANNOT_BP =185 --不能进入战斗阶段 -EFFECT_CANNOT_M2 =186 --不能进入主要阶段2 -EFFECT_CANNOT_EP =187 --不能进入结束阶段 -EFFECT_SKIP_TURN =188 --跳过整个回合 -EFFECT_DEFENCE_ATTACK =190 --可以守备表示攻击 -EFFECT_MUST_ATTACK =191 --必须攻击 -EFFECT_FIRST_ATTACK =192 --必须第一个攻击 -EFFECT_ATTACK_ALL =193 --可以攻击所有怪兽 -EFFECT_EXTRA_ATTACK =194 --增加攻击次数 -EFFECT_MUST_BE_ATTACKED =195 --必须攻击(那只怪兽) -EFFECT_AUTO_BE_ATTACKED =196 --只能攻击(那只怪兽) -EFFECT_ATTACK_DISABLED =197 --攻击已被無效(processor.cpp) -EFFECT_NO_BATTLE_DAMAGE =200 --不会给对方造成战斗伤害 -EFFECT_AVOID_BATTLE_DAMAGE =201 --不会对自己造成战斗伤害 -EFFECT_REFLECT_BATTLE_DAMAGE =202 --反弹战斗伤害 -EFFECT_PIERCE =203 --贯穿伤害 -EFFECT_BATTLE_DESTROY_REDIRECT =204 --战斗破坏时重新指定去向 -EFFECT_BATTLE_DAMAGE_TO_EFFECT =205 --战斗伤害视为效果伤害 -EFFECT_TOSS_COIN_REPLACE =220 --重新抛硬币 -EFFECT_TOSS_DICE_REPLACE =221 --重新掷骰子 -EFFECT_FUSION_MATERIAL =230 --指定融合素材的條件 -EFFECT_CHAIN_MATERIAL =231 --玩家受到連鎖物質的效果影響 -EFFECT_SYNCHRO_MATERIAL =232 --可以当作同调素材 -EFFECT_XYZ_MATERIAL =233 --可以当作超量素材 -EFFECT_FUSION_SUBSTITUTE =234 --代替融合素材 -EFFECT_CANNOT_BE_FUSION_MATERIAL =235--不能做融合素材 -EFFECT_CANNOT_BE_SYNCHRO_MATERIAL =236--不能做同调素材 -EFFECT_SYNCHRO_MATERIAL_CUSTOM =237--同调素材限制 -EFFECT_CANNOT_BE_XYZ_MATERIAL =238--不能做超量素材 -EFFECT_SYNCHRO_LEVEL =240--做同调素材时的等级 -EFFECT_RITUAL_LEVEL =241--做仪式祭品时的等级 -EFFECT_XYZ_LEVEL =242--做超量素材时的等级 -EFFECT_EXTRA_RITUAL_MATERIAL =243--在墓地当做仪式祭品 -EFFECT_NONTUNER =244--同时当作调整以外的怪兽(幻影王 幽骑) -EFFECT_OVERLAY_REMOVE_REPLACE =245--代替去除超量素材 -EFFECT_SCRAP_CHIMERA =246--废铁奇美拉 -EFFECT_SPSUM_EFFECT_ACTIVATED =250 --发动特殊召唤的效果(冥府的使者 格斯) -EFFECT_MATERIAL_CHECK =251 --检查素材 -EFFECT_DISABLE_FIELD =260 --无效区域(扰乱王等) -EFFECT_USE_EXTRA_MZONE =261 --怪兽区域封锁 -EFFECT_USE_EXTRA_SZONE =262 --魔法区域封锁 -EFFECT_MAX_MZONE =263 --怪獸区格數上限 -EFFECT_MAX_SZONE =264 --魔陷区格數上限 -EFFECT_HAND_LIMIT =270 --手牌数量限制 -EFFECT_DRAW_COUNT =271 --抽卡阶段的抽卡数 -EFFECT_SPIRIT_DONOT_RETURN =280 --灵魂怪兽不返回手牌 -EFFECT_SPIRIT_MAYNOT_RETURN =281 --灵魂怪兽可以不返回手牌 -EFFECT_CHANGE_ENVIRONMENT =290 --改变场地 -EFFECT_NECRO_VALLEY =291 --王家长眠之谷 -EFFECT_FORBIDDEN =292 --禁止令 -EFFECT_NECRO_VALLEY_IM =293 --不受「王家长眠之谷」的影响 -EFFECT_REVERSE_DECK =294 --翻转卡组 -EFFECT_REMOVE_BRAINWASHING =295 --洗脑解除 -EFFECT_BP_TWICE =296 --2次战斗阶段 -EFFECT_UNIQUE_CHECK =297 -- -EFFECT_MATCH_KILL =300 --Match胜利(胜利龙) -EFFECT_SYNCHRO_CHECK =310 --基因组斗士 -EFFECT_QP_ACT_IN_NTPHAND =311 --对方回合从自己手卡发动(失乐的圣女) -EFFECT_MUST_BE_SMATERIAL =312 --必须作为同调素材(波动龙 声子龙) -EFFECT_TO_GRAVE_REDIRECT_CB =313 --重新指定去向(寶玉獸) -EFFECT_CHANGE_LEVEL_FINAL =314 --設定最終等級(銀河女王之光) -EFFECT_CHANGE_RANK_FINAL =315 --設定最終階級 -EFFECT_SPSUMMON_PROC_G =320 --P召唤规则 -EFFECT_SPSUMMON_COUNT_LIMIT =330 --特殊召唤次数限制 -EFFECT_LEFT_SPSUMMON_COUNT =331 --剩餘召喚次數(召喚限制網) -EFFECT_CANNOT_SELECT_BATTLE_TARGET =332 --對手不能選擇為攻擊對象 -EFFECT_CANNOT_SELECT_EFFECT_TARGET =333 --對手不能選擇為效果對象 -EFFECT_ADD_SETCODE =334 --规则上视为「XX」字段 -EFFECT_NO_EFFECT_DAMAGE =335 --玩家已受到"效果傷害變成0"的效果影響 -EFFECT_UNSUMMONABLE_CARD =336 --不能通常召唤的怪獸 - ---下面是诱发效果的诱发事件、时点 (如果是TYPE_SINGLE则自己发生以下事件后触发,如果TYPE_FIELD则场上任何卡发生以下事件都触发) -EVENT_STARTUP =1000 --游戏开始时 -EVENT_FLIP =1001 --翻转时 -EVENT_FREE_CHAIN =1002 --自由时点(强脱等,还有昴星团等诱发即时效果) -EVENT_DESTROY =1010 --被破坏时(移動前) -EVENT_REMOVE =1011 --除外时 -EVENT_TO_HAND =1012 --加入手牌时 -EVENT_TO_DECK =1013 --回卡组时 -EVENT_TO_GRAVE =1014 --进墓地时(不含REASON_RETURN) -EVENT_LEAVE_FIELD =1015 --离场时 -EVENT_CHANGE_POS =1016 --表示形式变更时 -EVENT_RELEASE =1017 --解放时 -EVENT_DISCARD =1018 --丢弃手牌时 -EVENT_LEAVE_FIELD_P =1019 --永久离场时 -EVENT_CHAIN_SOLVING =1020 --连锁处理开始时(EVENT_CHAIN_ACTIVATING之後) -EVENT_CHAIN_ACTIVATING =1021 --连锁处理准备中 -EVENT_CHAIN_SOLVED =1022 --连锁处理结束时 -EVENT_CHAIN_ACTIVATED =1023 --(N/A) -EVENT_CHAIN_NEGATED =1024 --连锁被无效时(发动无效,EVENT_CHAIN_ACTIVATING之後) -EVENT_CHAIN_DISABLED =1025 --连锁被无效时(效果无效) -EVENT_CHAIN_END =1026 --连锁串结束时 -EVENT_CHAINING =1027 --效果发动时 -EVENT_BECOME_TARGET =1028 --成为效果对象时 -EVENT_DESTROYED =1029 --被破坏时 -EVENT_ADJUST =1040 --adjust_all()调整後(御前试合) -EVENT_SUMMON_SUCCESS =1100 --通常召唤成功时 -EVENT_FLIP_SUMMON_SUCCESS =1101 --翻转召唤成功时 -EVENT_SPSUMMON_SUCCESS =1102 --特殊召唤成功时 -EVENT_SUMMON =1103 --召唤时(怪兽还没上场、神宣等时点) -EVENT_FLIP_SUMMON =1104 --翻转召唤时 -EVENT_SPSUMMON =1105 --特殊召唤时 -EVENT_MSET =1106 --放置怪兽时 -EVENT_SSET =1107 --放置魔陷时 -EVENT_BE_MATERIAL =1108 --作为融合/仪式同调/超量素材时 -EVENT_BE_PRE_MATERIAL =1109 --将要作为融合/仪式同调/超量素材时 -EVENT_DRAW =1110 --抽卡 -EVENT_DAMAGE =1111 --造成战斗/效果伤害时 -EVENT_RECOVER =1112 --回复生命值时 -EVENT_PREDRAW =1113 --抽卡前 -EVENT_CONTROL_CHANGED =1120 --控制权变更 -EVENT_EQUIP =1121 --装备卡装备时 -EVENT_ATTACK_ANNOUNCE =1130 --攻击宣言时 -EVENT_BE_BATTLE_TARGET =1131 --被选为攻击对象时 -EVENT_BATTLE_START =1132 --伤害步骤开始时(反转前) -EVENT_BATTLE_CONFIRM =1133 --伤害计算前(反转後) -EVENT_PRE_DAMAGE_CALCULATE =1134 --伤害计算时(羽斬) -EVENT_DAMAGE_CALCULATING =1135 --伤害计算(只能使用EFFECT_TYPE_CONTINUOUS) -EVENT_PRE_BATTLE_DAMAGE =1136 --即将产生战斗伤害(只能使用EFFECT_TYPE_CONTINUOUS) -EVENT_BATTLE_END =1137 --(N/A) -EVENT_BATTLED =1138 --伤害计算后(异女、同反转效果时点) -EVENT_BATTLE_DESTROYING =1139 --战斗破坏送去墓地时(BF-苍炎之修罗) -EVENT_BATTLE_DESTROYED =1140 --战斗破坏送去墓地时(杀人番茄等) -EVENT_DAMAGE_STEP_END =1141 --伤害步骤结束时 -EVENT_ATTACK_DISABLED =1142 --攻击无效时(翻倍机会) -EVENT_BATTLE_DAMAGE =1143 --造成战斗伤害时 -EVENT_TOSS_DICE =1150 --掷骰子时 -EVENT_TOSS_COIN =1151 --抛硬币时 -EVENT_TOSS_COIN_NEGATE =1152 --抛硬币被无效时 -EVENT_TOSS_DICE_NEGATE =1153 --掷骰子被无效时 -EVENT_LEVEL_UP =1200 --等级上升时 -EVENT_PAY_LPCOST =1201 --支付生命值时 -EVENT_DETACH_MATERIAL =1202 --去除超量素材时 -EVENT_RETURN_TO_GRAVE =1203 --回到墓地时 -EVENT_TURN_END =1210 --回合结束时 -EVENT_PHASE =0x1000 --阶段结束时 -EVENT_PHASE_START =0x2000 --阶段开始时 -EVENT_ADD_COUNTER =0x10000--增加指示物时 -EVENT_REMOVE_COUNTER =0x20000--去除指示物时 ---Categorys 效果分类(表示这个效果将要发生什么事,OperationInfo设置了效果分类才能触发针对这一类型发动的卡,如破坏->星尘龙 -CATEGORY_DESTROY =0x1 --破坏效果 -CATEGORY_RELEASE =0x2 --解放效果 -CATEGORY_REMOVE =0x4 --除外效果 -CATEGORY_TOHAND =0x8 --加入手牌效果 -CATEGORY_TODECK =0x10 --回卡组效果 -CATEGORY_TOGRAVE =0x20 --送去墓地效果 -CATEGORY_DECKDES =0x40 --卡组破坏效果 -CATEGORY_HANDES =0x80 --手牌破坏效果 -CATEGORY_SUMMON =0x100 --含召唤的效果 -CATEGORY_SPECIAL_SUMMON =0x200 --含特殊召唤的效果 -CATEGORY_TOKEN =0x400 --含衍生物效果 -CATEGORY_FLIP =0x800 --含翻转效果 -CATEGORY_POSITION =0x1000 --改变表示形式效果 -CATEGORY_CONTROL =0x2000 --改变控制权效果 -CATEGORY_DISABLE =0x4000 --使效果无效效果 -CATEGORY_DISABLE_SUMMON =0x8000 --无效召唤效果 -CATEGORY_DRAW =0x10000 --抽卡效果 -CATEGORY_SEARCH =0x20000 --检索卡组效果 -CATEGORY_EQUIP =0x40000 --装备效果 -CATEGORY_DAMAGE =0x80000 --伤害效果 -CATEGORY_RECOVER =0x100000 --回复效果 -CATEGORY_ATKCHANGE =0x200000 --改变攻击效果 -CATEGORY_DEFCHANGE =0x400000 --改变防御效果 -CATEGORY_COUNTER =0x800000 --指示物效果 -CATEGORY_COIN =0x1000000 --硬币效果 -CATEGORY_DICE =0x2000000 --骰子效果 -CATEGORY_LEAVE_GRAVE =0x4000000 --离开墓地效果 -CATEGORY_LVCHANGE =0x8000000 --改变等级效果 -CATEGORY_NEGATE =0x10000000 --使发动无效效果 ---Hint -HINT_EVENT =1 -HINT_MESSAGE =2 -HINT_SELECTMSG =3 -HINT_OPSELECTED =4 -HINT_EFFECT =5 -HINT_RACE =6 -HINT_ATTRIB =7 -HINT_CODE =8 -HINT_NUMBER =9 -HINT_CARD =10 ---Card Hint -CHINT_TURN =1 -CHINT_CARD =2 -CHINT_RACE =3 -CHINT_ATTRIBUTE =4 -CHINT_NUMBER =5 -CHINT_DESC =6 ---Hint Message --提示消息,显示在窗口的上面 -HINTMSG_RELEASE =500 --请选择要解放的卡 -HINTMSG_DISCARD =501 --请选择要丢弃的手牌 -HINTMSG_DESTROY =502 --请选择要破坏的卡 -HINTMSG_REMOVE =503 --请选择要除外的卡 -HINTMSG_TOGRAVE =504 --请选择要送去墓地的卡 -HINTMSG_RTOHAND =505 --请选择要返回手牌的卡 -HINTMSG_ATOHAND =506 --请选择要加入手牌的卡 -HINTMSG_TODECK =507 --请选择要返回卡组的卡 -HINTMSG_SUMMON =508 --请选择要召唤的卡 -HINTMSG_SPSUMMON =509 --请选择要特殊召唤的卡 -HINTMSG_SET =510 --请选择要盖放的卡 -HINTMSG_FMATERIAL =511 --请选择融合召唤的素材 -HINTMSG_SMATERIAL =512 --请选择同调召唤的素材 -HINTMSG_XMATERIAL =513 --请选择超量召唤的素材 -HINTMSG_FACEUP =514 --请选择表侧表示的卡 -HINTMSG_FACEDOWN =515 --请选择里侧表示的卡 -HINTMSG_ATTACK =516 --请选择攻击表示的怪兽 -HINTMSG_DEFENCE =517 --请选择守备表示的怪兽 -HINTMSG_EQUIP =518 --请选择要装备的卡 -HINTMSG_REMOVEXYZ =519 --请选择要取除的超量素材 -HINTMSG_CONTROL =520 --请选择要改变控制权的怪兽 -HINTMSG_DESREPLACE =521 --请选择要代替破坏的卡 -HINTMSG_FACEUPATTACK =522 --请选择表侧攻击表示的怪兽 -HINTMSG_FACEUPDEFENCE =523 --请选择表侧守备表示的怪兽 -HINTMSG_FACEDOWNATTACK =524 --请选择里侧攻击表示的怪兽 -HINTMSG_FACEDOWNDEFENCE =525 --请选择里侧守备表示的怪兽 -HINTMSG_CONFIRM =526 --请选择给对方确认的卡 -HINTMSG_TOFIELD =527 --请选择要放置到场上的卡 -HINTMSG_POSCHANGE =528 --请选择要改变表示形式的怪兽 -HINTMSG_SELF =529 --请选择自己的卡 -HINTMSG_OPPO =530 --请选择对方的卡 -HINTMSG_EFFECT =550 --请选择要发动的效果 -HINTMSG_TARGET =551 --请选择效果的对象 -HINTMSG_COIN =552 --请选择硬币的正反面 -HINTMSG_DICE =553 --请选择骰子的结果 -HINTMSG_CARDTYPE =554 --请选择一个种类 ---Timing --提示时点,可以给freechain卡片增加自动提示时点 -TIMING_DRAW_PHASE =0x1 --抽卡阶段时点 -TIMING_STANDBY_PHASE =0x2 --准备阶段时点 -TIMING_MAIN_END =0x4 --主要阶段结束时点 -TIMING_BATTLE_START =0x8 --战斗阶段开始时点 -TIMING_BATTLE_END =0x10 --战斗阶段结束时点 -TIMING_END_PHASE =0x20 --结束阶段时点 -TIMING_SUMMON =0x40 --召唤时点 -TIMING_SPSUMMON =0x80 --特殊召唤时点 -TIMING_FLIPSUMMON =0x100 --翻转召唤时点 -TIMING_MSET =0x200 --放置怪兽时点 -TIMING_SSET =0x400 --放置魔陷时点 -TIMING_POS_CHANGE =0x800 --表示形式变更时点 -TIMING_ATTACK =0x1000 --攻击宣言时点 -TIMING_DAMAGE_STEP =0x2000 --伤害步骤时点 -TIMING_DAMAGE_CAL =0x4000 --伤害计算时点 -TIMING_CHAIN_END =0x8000 --连锁结束时点 -TIMING_DRAW =0x10000 --抽卡时点(不是抽卡阶段 -TIMING_DAMAGE =0x20000 --造成伤害时点 -TIMING_RECOVER =0x40000 --回复时点 -TIMING_DESTROY =0x80000 --破坏时点 -TIMING_REMOVE =0x100000 --除外时点 -TIMING_TOHAND =0x200000 --加入手牌时点(检索、回收等) -TIMING_TODECK =0x400000 --回卡组时点 -TIMING_TOGRAVE =0x800000 --进墓地时点 -TIMING_BATTLE_PHASE =0x1000000 --战斗阶段时点 -TIMING_EQUIP =0x2000000 --装备时点 ---Global flag --特殊标记 -GLOBALFLAG_DECK_REVERSE_CHECK =0x1 --卡组翻转标记 -GLOBALFLAG_BRAINWASHING_CHECK =0x2 --洗脑解除标记 -GLOBALFLAG_SCRAP_CHIMERA =0x4 --废铁奇美拉标记 -GLOBALFLAG_DELAYED_QUICKEFFECT =0x8 --小丑和锁鸟标记 -GLOBALFLAG_DETACH_EVENT =0x10 --超量素材被取除标记 -GLOBALFLAG_MUST_BE_SMATERIAL =0x20 --必须作为同调素材(波动龙 声子龙) -GLOBALFLAG_SPSUMMON_COUNT =0x40 --特殊召唤次数标记 -GLOBALFLAG_XMAT_COUNT_LIMIT =0x80 --超量素材数量限制标记(光天使 天座) -GLOBALFLAG_SELF_TOGRAVE =0x100 -- -GLOBALFLAG_SPSUMMON_ONCE =0x200 -- ---count_code -EFFECT_COUNT_CODE_OATH =0x10000000 --使用次数限制(誓约效果) -EFFECT_COUNT_CODE_DUEL =0x20000000 --决斗中使用次数 -EFFECT_COUNT_CODE_SINGLE =0x1 --多个效果公共使用次数 ---特殊选项 -DUEL_TEST_MODE =0x01 --测试模式?坑了? -DUEL_ATTACK_FIRST_TURN =0x02 --第一回合可以攻击(用于残局 -DUEL_NO_CHAIN_HINT =0x04 --不提示连锁 -DUEL_ENABLE_PRIORITY =0x08 --启动优先权 -DUEL_PSEUDO_SHUFFLE =0x10 --不洗牌 -DUEL_TAG_MODE =0x20 --双打PP -DUEL_SIMPLE_AI =0x40 --AI ---Activity counter ---global: 1-6 (binary: 5,6) ---custom: 1-5,7 (binary: 1-5) -ACTIVITY_SUMMON =1 -- -ACTIVITY_NORMALSUMMON =2 -- -ACTIVITY_SPSUMMON =3 -- -ACTIVITY_FLIPSUMMON =4 -- -ACTIVITY_ATTACK =5 -- -ACTIVITY_BATTLE_PHASE =6 -- not available in custom counter -ACTIVITY_CHAIN =7 -- only available in custom counter diff --git a/script/utility.lua b/script/utility.lua deleted file mode 100644 index e84138587f..0000000000 --- a/script/utility.lua +++ /dev/null @@ -1,1278 +0,0 @@ -Auxiliary={} -aux=Auxiliary - -function Auxiliary.Stringid(code,id) - return code*16+id -end -function Auxiliary.Next(g) - local first=true - return function() - if first then first=false return g:GetFirst() - else return g:GetNext() end - end -end -function Auxiliary.NULL() -end -function Auxiliary.TRUE() - return true -end -function Auxiliary.FALSE() - return false -end -function Auxiliary.AND(f1,f2) - return function(a,b,c) - return f1(a,b,c) and f2(a,b,c) - end -end -function Auxiliary.OR(f1,f2) - return function(a,b,c) - return f1(a,b,c) or f2(a,b,c) - end -end -function Auxiliary.NOT(f) - return function(a,b,c) - return not f(a,b,c) - end -end -function Auxiliary.IsDualState(effect) - local c=effect:GetHandler() - return not c:IsDisabled() and c:IsDualState() -end -function Auxiliary.IsNotDualState(effect) - local c=effect:GetHandle() - return c:IsDisabled() or not c:IsDualState() -end -function Auxiliary.DualNormalCondition(effect) - local c=effect:GetHandler() - return c:IsFaceup() and not c:IsDualState() -end -function Auxiliary.BeginPuzzle(effect) - local e1=Effect.GlobalEffect() - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_TURN_END) - e1:SetCountLimit(1) - e1:SetOperation(Auxiliary.PuzzleOp) - Duel.RegisterEffect(e1,0) - local e2=Effect.GlobalEffect() - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetCode(EFFECT_SKIP_DP) - e2:SetTargetRange(1,0) - Duel.RegisterEffect(e2,0) - local e3=Effect.GlobalEffect() - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e3:SetCode(EFFECT_SKIP_SP) - e3:SetTargetRange(1,0) - Duel.RegisterEffect(e3,0) -end -function Auxiliary.PuzzleOp(e,tp) - Duel.SetLP(0,0) -end -function Auxiliary.EnableDualAttribute(c) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DUAL_SUMMONABLE) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_ADD_TYPE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE+LOCATION_GRAVE) - e2:SetCondition(aux.DualNormalCondition) - e2:SetValue(TYPE_NORMAL) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EFFECT_REMOVE_TYPE) - e3:SetValue(TYPE_EFFECT) - c:RegisterEffect(e3) -end -function Auxiliary.TargetEqualFunction(f,value,a,b,c) - return function(effect,target) - return f(target,a,b,c)==value - end -end -function Auxiliary.TargetBoolFunction(f,a,b,c) - return function(effect,target) - return f(target,a,b,c) - end -end -function Auxiliary.FilterEqualFunction(f,value,a,b,c) - return function(target) - return f(target,a,b,c)==value - end -end -function Auxiliary.FilterBoolFunction(f,a,b,c) - return function(target) - return f(target,a,b,c) - end -end -function Auxiliary.NonTuner(f,a,b,c) - return function(target) - return target:IsNotTuner() and (not f or f(target,a,b,c)) - end -end ---Synchro monster, 1 tuner + n or more monsters -function Auxiliary.AddSynchroProcedure(c,f1,f2,ct) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_IGNORE_IMMUNE) - e1:SetRange(LOCATION_EXTRA) - e1:SetCondition(Auxiliary.SynCondition(f1,f2,ct,99)) - e1:SetTarget(Auxiliary.SynTarget(f1,f2,ct,99)) - e1:SetOperation(Auxiliary.SynOperation(f1,f2,ct,99)) - e1:SetValue(SUMMON_TYPE_SYNCHRO) - c:RegisterEffect(e1) -end -function Auxiliary.SynCondition(f1,f2,minct,maxc) - return function(e,c,smat,mg) - if c==nil then return true end - if c:IsType(TYPE_PENDULUM) and c:IsFaceup() then return false end - local ft=Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE) - local ct=-ft - local minc=minct - if minc=2 and (fs or chkf==PLAYER_NONE) - end -end -function Auxiliary.FOperationCode2(code1,code2,sub,insf) - return function(e,tp,eg,ep,ev,re,r,rp,gc,chkf) - if gc then - local g1=nil - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL) - if gc:IsHasEffect(EFFECT_FUSION_SUBSTITUTE) then - g1=eg:FilterSelect(tp,Auxiliary.FConditionFilter21,1,1,gc,code1,code2) - elseif gc:IsCode(code1) then - g1=eg:FilterSelect(tp,Card.IsCode,1,1,gc,code2) - else - g1=eg:FilterSelect(tp,Card.IsCode,1,1,gc,code1) - end - Duel.SetFusionMaterial(g1) - return - end - local sg=eg:Filter(Auxiliary.FConditionFilter22,nil,code1,code2,sub) - local g1=nil - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL) - if chkf~=PLAYER_NONE then g1=sg:FilterSelect(tp,Auxiliary.FConditionCheckF,1,1,nil,chkf) - else g1=sg:Select(tp,1,1,nil) end - if g1:GetFirst():IsHasEffect(EFFECT_FUSION_SUBSTITUTE) then - sg:Remove(Card.IsHasEffect,nil,EFFECT_FUSION_SUBSTITUTE) - else sg:Remove(Card.IsCode,nil,g1:GetFirst():GetCode()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL) - local g2=sg:Select(tp,1,1,nil) - g1:Merge(g2) - Duel.SetFusionMaterial(g1) - end -end ---Fusion monster, name + name + name -function Auxiliary.AddFusionProcCode3(c,code1,code2,code3,sub,insf) - if c.material_count==nil then - local code=c:GetOriginalCode() - local mt=_G["c" .. code] - mt.material_count=3 - mt.material={code1,code2,code3} - end - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_FUSION_MATERIAL) - e1:SetCondition(Auxiliary.FConditionCode3(code1,code2,code3,sub,insf)) - e1:SetOperation(Auxiliary.FOperationCode3(code1,code2,code3,sub,insf)) - c:RegisterEffect(e1) -end -function Auxiliary.FConditionFilter31(c,code1,code2,code3) - local code=c:GetCode() - return code==code1 or code==code2 or code==code3 -end -function Auxiliary.FConditionFilter32(c,code1,code2,code3,sub) - local code=c:GetCode() - return code==code1 or code==code2 or code==code3 or (sub and c:IsHasEffect(EFFECT_FUSION_SUBSTITUTE)) -end -function Auxiliary.FConditionCode3(code1,code2,code3,sub,insf) - return function(e,g,gc,chkf) - if g==nil then return insf end - if gc then - local b1=0 local b2=0 local b3=0 - local tc=g:GetFirst() - while tc do - local code=tc:GetCode() - if code==code1 then b1=1 - elseif code==code2 then b2=1 - elseif code==code3 then b3=1 - end - tc=g:GetNext() - end - if gc:IsHasEffect(EFFECT_FUSION_SUBSTITUTE) then - return b1+b2+b3>1 - else - local code=gc:GetCode() - if code==code1 then b1=1 - elseif code==code2 then b2=1 - elseif code==code3 then b3=1 - else return false - end - return b1+b2+b3>2 - end - end - local b1=0 local b2=0 local b3=0 local bs=0 - local fs=false - local tc=g:GetFirst() - while tc do - local code=tc:GetCode() - if code==code1 then b1=1 if Auxiliary.FConditionCheckF(tc,chkf) then fs=true end - elseif code==code2 then b2=1 if Auxiliary.FConditionCheckF(tc,chkf) then fs=true end - elseif code==code3 then b3=1 if Auxiliary.FConditionCheckF(tc,chkf) then fs=true end - elseif sub and tc:IsHasEffect(EFFECT_FUSION_SUBSTITUTE) then bs=1 if Auxiliary.FConditionCheckF(tc,chkf) then fs=true end - end - tc=g:GetNext() - end - return b1+b2+b3+bs>=3 and (fs or chkf==PLAYER_NONE) - end -end -function Auxiliary.FOperationCode3(code1,code2,code3,sub,insf) - return function(e,tp,eg,ep,ev,re,r,rp,gc,chkf) - if gc then - local sg=eg:Filter(Auxiliary.FConditionFilter31,gc,code1,code2,code3) - if not gc:IsHasEffect(EFFECT_FUSION_SUBSTITUTE) then - sg:Remove(Card.IsCode,nil,gc:GetCode()) - end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL) - local g1=sg:Select(tp,1,1,nil) - sg:Remove(Card.IsCode,nil,g1:GetFirst():GetCode()) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL) - local g2=sg:Select(tp,1,1,nil) - g1:Merge(g2) - Duel.SetFusionMaterial(g1) - return - end - local sg=eg:Filter(Auxiliary.FConditionFilter32,nil,code1,code2,code3,sub) - local g1=nil - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL) - if chkf~=PLAYER_NONE then g1=sg:FilterSelect(tp,Auxiliary.FConditionCheckF,1,1,nil,chkf) - else g1=sg:Select(tp,1,1,nil) end - if g1:GetFirst():IsHasEffect(EFFECT_FUSION_SUBSTITUTE) then - sg:Remove(Card.IsHasEffect,nil,EFFECT_FUSION_SUBSTITUTE) - else sg:Remove(Card.IsCode,nil,g1:GetFirst():GetCode()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL) - local g2=sg:Select(tp,1,1,nil) - if g2:GetFirst():IsHasEffect(EFFECT_FUSION_SUBSTITUTE) then - sg:Remove(Card.IsHasEffect,nil,EFFECT_FUSION_SUBSTITUTE) - else sg:Remove(Card.IsCode,nil,g2:GetFirst():GetCode()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL) - local g3=sg:Select(tp,1,1,nil) - g1:Merge(g2) - g1:Merge(g3) - Duel.SetFusionMaterial(g1) - end -end ---Fusion monster, name + name + name + name -function Auxiliary.AddFusionProcCode4(c,code1,code2,code3,code4,sub,insf) - if c.material_count==nil then - local code=c:GetOriginalCode() - local mt=_G["c" .. code] - mt.material_count=4 - mt.material={code1,code2,code3,code4} - end - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_FUSION_MATERIAL) - e1:SetCondition(Auxiliary.FConditionCode4(code1,code2,code3,code4,sub,insf)) - e1:SetOperation(Auxiliary.FOperationCode4(code1,code2,code3,code4,sub,insf)) - c:RegisterEffect(e1) -end -function Auxiliary.FConditionFilter41(c,code1,code2,code3,code4) - local code=c:GetCode() - return code==code1 or code==code2 or code==code3 or code==code4 -end -function Auxiliary.FConditionFilter42(c,code1,code2,code3,code4,sub) - local code=c:GetCode() - return code==code1 or code==code2 or code==code3 or code==code4 or (sub and c:IsHasEffect(EFFECT_FUSION_SUBSTITUTE)) -end -function Auxiliary.FConditionCode4(code1,code2,code3,code4,sub,insf) - return function(e,g,gc,chkf) - if g==nil then return insf end - if gc then - local b1=0 local b2=0 local b3=0 local b4=0 - local tc=g:GetFirst() - while tc do - local code=tc:GetCode() - if code==code1 then b1=1 - elseif code==code2 then b2=1 - elseif code==code3 then b3=1 - elseif code==code4 then b4=1 - else return false - end - tc=g:GetNext() - end - if gc:IsHasEffect(EFFECT_FUSION_SUBSTITUTE) then - return b1+b2+b3+b4>2 - else - local code=gc:GetCode() - if code==code1 then b1=1 - elseif code==code2 then b2=1 - elseif code==code3 then b3=1 - elseif code==code4 then b4=1 - end - return b1+b2+b3+b4>3 - end - end - local b1=0 local b2=0 local b3=0 local b4=0 local bs=0 - local fs=false - local tc=g:GetFirst() - while tc do - local code=tc:GetCode() - if code==code1 then b1=1 if Auxiliary.FConditionCheckF(tc,chkf) then fs=true end - elseif code==code2 then b2=1 if Auxiliary.FConditionCheckF(tc,chkf) then fs=true end - elseif code==code3 then b3=1 if Auxiliary.FConditionCheckF(tc,chkf) then fs=true end - elseif code==code4 then b4=1 if Auxiliary.FConditionCheckF(tc,chkf) then fs=true end - elseif sub and tc:IsHasEffect(EFFECT_FUSION_SUBSTITUTE) then bs=1 if Auxiliary.FConditionCheckF(tc,chkf) then fs=true end - end - tc=g:GetNext() - end - return b1+b2+b3+b4+bs>=4 and (fs or chkf==PLAYER_NONE) - end -end -function Auxiliary.FOperationCode4(code1,code2,code3,code4,sub,insf) - return function(e,tp,eg,ep,ev,re,r,rp,gc,chkf) - if gc then - local sg=eg:Filter(Auxiliary.FConditionFilter41,gc,code1,code2,code3,code4) - if not gc:IsHasEffect(EFFECT_FUSION_SUBSTITUTE) then - sg:Remove(Card.IsCode,nil,gc:GetCode()) - end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL) - local g1=sg:Select(tp,1,1,nil) - sg:Remove(Card.IsCode,nil,g1:GetFirst():GetCode()) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL) - local g2=sg:Select(tp,1,1,nil) - sg:Remove(Card.IsCode,nil,g2:GetFirst():GetCode()) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL) - local g3=sg:Select(tp,1,1,nil) - g1:Merge(g2) - g1:Merge(g3) - Duel.SetFusionMaterial(g1) - return - end - local sg=eg:Filter(Auxiliary.FConditionFilter42,nil,code1,code2,code3,code4,sub) - local g1=nil - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL) - if chkf~=PLAYER_NONE then g1=sg:FilterSelect(tp,Auxiliary.FConditionCheckF,1,1,nil,chkf) - else g1=sg:Select(tp,1,1,nil) end - if g1:GetFirst():IsHasEffect(EFFECT_FUSION_SUBSTITUTE) then - sg:Remove(Card.IsHasEffect,nil,EFFECT_FUSION_SUBSTITUTE) - else sg:Remove(Card.IsCode,nil,g1:GetFirst():GetCode()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL) - local g2=sg:Select(tp,1,1,nil) - if g2:GetFirst():IsHasEffect(EFFECT_FUSION_SUBSTITUTE) then - sg:Remove(Card.IsHasEffect,nil,EFFECT_FUSION_SUBSTITUTE) - else sg:Remove(Card.IsCode,nil,g2:GetFirst():GetCode()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL) - local g3=sg:Select(tp,1,1,nil) - if g3:GetFirst():IsHasEffect(EFFECT_FUSION_SUBSTITUTE) then - sg:Remove(Card.IsHasEffect,nil,EFFECT_FUSION_SUBSTITUTE) - else sg:Remove(Card.IsCode,nil,g3:GetFirst():GetCode()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL) - local g4=sg:Select(tp,1,1,nil) - g1:Merge(g2) - g1:Merge(g3) - g1:Merge(g4) - Duel.SetFusionMaterial(g1) - end -end ---Fusion monster, name + condition -function Auxiliary.AddFusionProcCodeFun(c,code1,f,cc,sub,insf) - if c.material_count==nil then - local code=c:GetOriginalCode() - local mt=_G["c" .. code] - mt.material_count=1 - mt.material={code1} - end - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_FUSION_MATERIAL) - e1:SetCondition(Auxiliary.FConditionCodeFun(code1,f,cc,sub,insf)) - e1:SetOperation(Auxiliary.FOperationCodeFun(code1,f,cc,sub,insf)) - c:RegisterEffect(e1) -end -function Auxiliary.FConditionFilterCF(c,g2,cc) - return g2:IsExists(aux.TRUE,cc,c) -end -function Auxiliary.FConditionCodeFun(code,f,cc,sub,insf) - return function(e,g,gc,chkf) - if g==nil then return insf end - if gc then - if (gc:IsCode(code) or (sub and gc:IsHasEffect(EFFECT_FUSION_SUBSTITUTE))) and g:IsExists(f,cc,gc) then - return true - elseif f(gc) then - local g1=Group.CreateGroup() local g2=Group.CreateGroup() - local tc=g:GetFirst() - while tc do - if tc:IsCode(code) or (sub and tc:IsHasEffect(EFFECT_FUSION_SUBSTITUTE)) - then g1:AddCard(tc) end - if f(tc) then g2:AddCard(tc) end - tc=g:GetNext() - end - if cc>1 then - g2:RemoveCard(gc) - return g1:IsExists(Auxiliary.FConditionFilterCF,1,gc,g2,cc-1) - else - g1:RemoveCard(gc) - return g1:GetCount()>0 - end - else return false end - end - local b1=0 local b2=0 local bw=0 - local fs=false - local tc=g:GetFirst() - while tc do - local c1=tc:IsCode(code) or (sub and tc:IsHasEffect(EFFECT_FUSION_SUBSTITUTE)) - local c2=f(tc) - if c1 or c2 then - if Auxiliary.FConditionCheckF(tc,chkf) then fs=true end - if c1 and c2 then bw=bw+1 - elseif c1 then b1=1 - else b2=b2+1 - end - end - tc=g:GetNext() - end - if b2>cc then b2=cc end - return b1+b2+bw>=1+cc and (fs or chkf==PLAYER_NONE) - end -end -function Auxiliary.FOperationCodeFun(code,f,cc,sub,insf) - return function(e,tp,eg,ep,ev,re,r,rp,gc,chkf) - if gc then - if (gc:IsCode(code) or (sub and gc:IsHasEffect(EFFECT_FUSION_SUBSTITUTE))) and eg:IsExists(f,cc,gc) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL) - local g1=eg:FilterSelect(tp,f,cc,cc,gc) - Duel.SetFusionMaterial(g1) - else - local sg1=Group.CreateGroup() local sg2=Group.CreateGroup() - local tc=eg:GetFirst() - while tc do - if tc:IsCode(code) or (sub and tc:IsHasEffect(EFFECT_FUSION_SUBSTITUTE)) then sg1:AddCard(tc) end - if f(tc) then sg2:AddCard(tc) end - tc=eg:GetNext() - end - if cc>1 then - sg2:RemoveCard(gc) - if sg2:GetCount()==cc-1 then - sg1:Sub(sg2) - end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL) - local g1=sg1:Select(tp,1,1,gc) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL) - local g2=sg2:Select(tp,cc-1,cc-1,g1:GetFirst()) - g1:Merge(g2) - Duel.SetFusionMaterial(g1) - else - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL) - local g1=sg1:Select(tp,1,1,gc) - Duel.SetFusionMaterial(g1) - end - end - return - end - local sg1=Group.CreateGroup() local sg2=Group.CreateGroup() local fs=false - local tc=eg:GetFirst() - while tc do - if tc:IsCode(code) or (sub and tc:IsHasEffect(EFFECT_FUSION_SUBSTITUTE)) then sg1:AddCard(tc) end - if f(tc) then sg2:AddCard(tc) if Auxiliary.FConditionCheckF(tc,chkf) then fs=true end end - tc=eg:GetNext() - end - if chkf~=PLAYER_NONE then - if sg2:GetCount()==cc then - sg1:Sub(sg2) - end - local g1=nil - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL) - if fs then g1=sg1:Select(tp,1,1,nil) - else g1=sg1:FilterSelect(tp,Auxiliary.FConditionCheckF,1,1,nil,chkf) end - local tc1=g1:GetFirst() - sg2:RemoveCard(tc1) - if Auxiliary.FConditionCheckF(tc1,chkf) or sg2:GetCount()==cc then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL) - local g2=sg2:Select(tp,cc,cc,tc1) - g1:Merge(g2) - else - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL) - local g2=sg2:FilterSelect(tp,Auxiliary.FConditionCheckF,1,1,tc1,chkf) - g1:Merge(g2) - if cc>1 then - sg2:RemoveCard(g2:GetFirst()) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL) - g2=sg2:Select(tp,cc-1,cc-1,tc1) - g1:Merge(g2) - end - end - Duel.SetFusionMaterial(g1) - else - if sg2:GetCount()==cc then - sg1:Sub(sg2) - end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL) - local g1=sg1:Select(tp,1,1,nil) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL) - g1:Merge(sg2:Select(tp,cc,cc,g1:GetFirst())) - Duel.SetFusionMaterial(g1) - end - end -end ---Fusion monster, condition + condition -function Auxiliary.AddFusionProcFun2(c,f1,f2,insf) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_FUSION_MATERIAL) - e1:SetCondition(Auxiliary.FConditionFun2(f1,f2,insf)) - e1:SetOperation(Auxiliary.FOperationFun2(f1,f2,insf)) - c:RegisterEffect(e1) -end -function Auxiliary.FConditionFilterF2(c,g2) - return g2:IsExists(aux.TRUE,1,c) -end -function Auxiliary.FConditionFilterF2c(c,f1,f2) - return f1(c) or f2(c) -end -function Auxiliary.FConditionFilterF2r(c,f1,f2) - return f1(c) and not f2(c) -end -function Auxiliary.FConditionFun2(f1,f2,insf) - return function(e,g,gc,chkf) - if g==nil then return insf end - if gc then return (f1(gc) and g:IsExists(f2,1,gc)) - or (f2(gc) and g:IsExists(f1,1,gc)) end - local g1=Group.CreateGroup() local g2=Group.CreateGroup() local fs=false - local tc=g:GetFirst() - while tc do - if f1(tc) then g1:AddCard(tc) if Auxiliary.FConditionCheckF(tc,chkf) then fs=true end end - if f2(tc) then g2:AddCard(tc) if Auxiliary.FConditionCheckF(tc,chkf) then fs=true end end - tc=g:GetNext() - end - if chkf~=PLAYER_NONE then - return fs and g1:IsExists(Auxiliary.FConditionFilterF2,1,nil,g2) - else return g1:IsExists(Auxiliary.FConditionFilterF2,1,nil,g2) end - end -end -function Auxiliary.FOperationFun2(f1,f2,insf) - return function(e,tp,eg,ep,ev,re,r,rp,gc,chkf) - if gc then - local sg=Group.CreateGroup() - if f1(gc) then sg:Merge(eg:Filter(f2,gc)) end - if f2(gc) then sg:Merge(eg:Filter(f1,gc)) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL) - local g1=sg:Select(tp,1,1,nil) - Duel.SetFusionMaterial(g1) - return - end - local sg=eg:Filter(Auxiliary.FConditionFilterF2c,nil,f1,f2) - local g1=nil - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL) - if chkf~=PLAYER_NONE then - g1=sg:FilterSelect(tp,Auxiliary.FConditionCheckF,1,1,nil,chkf) - else g1=sg:Select(tp,1,1,nil) end - local tc1=g1:GetFirst() - sg:RemoveCard(tc1) - local b1=f1(tc1) - local b2=f2(tc1) - if b1 and not b2 then sg:Remove(Auxiliary.FConditionFilterF2r,nil,f1,f2) end - if b2 and not b1 then sg:Remove(Auxiliary.FConditionFilterF2r,nil,f2,f1) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL) - local g2=sg:Select(tp,1,1,nil) - g1:Merge(g2) - Duel.SetFusionMaterial(g1) - end -end ---Fusion monster, name * n -function Auxiliary.AddFusionProcCodeRep(c,code1,cc,sub,insf) - if c.material_count==nil then - local code=c:GetOriginalCode() - local mt=_G["c" .. code] - mt.material_count=1 - mt.material={code1} - end - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_FUSION_MATERIAL) - e1:SetCondition(Auxiliary.FConditionCodeRep(code1,cc,sub,insf)) - e1:SetOperation(Auxiliary.FOperationCodeRep(code1,cc,sub,insf)) - c:RegisterEffect(e1) -end -function Auxiliary.FConditionFilterCR(c,code,sub) - return c:IsCode(code) or (sub and c:IsHasEffect(EFFECT_FUSION_SUBSTITUTE)) -end -function Auxiliary.FConditionCodeRep(code,cc,sub,insf) - return function(e,g,gc,chkf) - if g==nil then return insf end - if gc then return (gc:IsCode(code) or gc:IsHasEffect(EFFECT_FUSION_SUBSTITUTE)) and g:IsExists(Card.IsCode,cc-1,gc,code) end - local g1=g:Filter(Card.IsCode,nil,code) - if not sub then - if chkf~=PLAYER_NONE then return g1:GetCount()>=cc and g1:FilterCount(Card.IsOnField,nil)~=0 - else return g1:GetCount()>=cc end - end - local g2=g:Filter(Card.IsHasEffect,nil,EFFECT_FUSION_SUBSTITUTE) - if chkf~=PLAYER_NONE then - return (g1:FilterCount(Card.IsOnField,nil)~=0 or g2:FilterCount(Card.IsOnField,nil)~=0) - and g1:GetCount()>=cc-1 and g1:GetCount()+g2:GetCount()>=cc - else return g1:GetCount()>=cc-1 and g1:GetCount()+g2:GetCount()>=cc end - end -end -function Auxiliary.FOperationCodeRep(code,cc,sub,insf) - return function(e,tp,eg,ep,ev,re,r,rp,gc,chkf) - if gc then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL) - local g1=eg:FilterSelect(tp,Card.IsCode,cc-1,cc-1,gc,code) - Duel.SetFusionMaterial(g1) - return - end - local sg=eg:Filter(Auxiliary.FConditionFilterCR,nil,code,sub) - local g1=nil - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL) - if chkf~=PLAYER_NONE then g1=sg:FilterSelect(tp,Auxiliary.FConditionCheckF,1,1,nil,chkf) - else g1=sg:Select(tp,1,1,nil) end - local tc1=g1:GetFirst() - for i=1,cc-1 do - if tc1:IsHasEffect(EFFECT_FUSION_SUBSTITUTE) then sg:Remove(Card.IsHasEffect,nil,EFFECT_FUSION_SUBSTITUTE) - else sg:RemoveCard(tc1) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL) - local g2=sg:Select(tp,1,1,nil) - tc1=g2:GetFirst() - g1:Merge(g2) - end - Duel.SetFusionMaterial(g1) - end -end ---Fusion monster, condition * n -function Auxiliary.AddFusionProcFunRep(c,f,cc,insf) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_FUSION_MATERIAL) - e1:SetCondition(Auxiliary.FConditionFunRep(f,cc,insf)) - e1:SetOperation(Auxiliary.FOperationFunRep(f,cc,insf)) - c:RegisterEffect(e1) -end -function Auxiliary.FConditionFunRep(f,cc,insf) - return function(e,g,gc,chkf) - if g==nil then return insf end - if gc then return f(gc) and g:IsExists(f,cc-1,gc) end - local g1=g:Filter(f,nil) - if chkf~=PLAYER_NONE then - return g1:FilterCount(Card.IsOnField,nil)~=0 and g1:GetCount()>=cc - else return g1:GetCount()>=cc end - end -end -function Auxiliary.FOperationFunRep(f,cc,insf) - return function(e,tp,eg,ep,ev,re,r,rp,gc,chkf) - if gc then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL) - local g1=eg:FilterSelect(tp,f,cc-1,cc-1,gc) - Duel.SetFusionMaterial(g1) - return - end - local sg=eg:Filter(f,nil) - if chkf==PLAYER_NONE or sg:GetCount()==cc then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL) - local g1=sg:Select(tp,cc,cc,nil) - Duel.SetFusionMaterial(g1) - return - end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL) - local g1=sg:FilterSelect(tp,Auxiliary.FConditionCheckF,1,1,nil,chkf) - if cc>1 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL) - local g2=sg:Select(tp,cc-1,cc-1,g1:GetFirst()) - g1:Merge(g2) - end - Duel.SetFusionMaterial(g1) - end -end ---Ritual Summon, geq fixed lv -function Auxiliary.AddRitualProcGreater(c,filter) - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(Auxiliary.RPGTarget(filter)) - e1:SetOperation(Auxiliary.RPGOperation(filter)) - c:RegisterEffect(e1) -end -function Auxiliary.RPGFilter(c,filter,e,tp,m) - if (filter and not filter(c)) or not c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true) then return false end - local mg=m:Filter(Card.IsCanBeRitualMaterial,c,c) - return mg:CheckWithSumGreater(Card.GetRitualLevel,c:GetOriginalLevel(),c) -end -function Auxiliary.RPGTarget(filter) - return function(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local mg=Duel.GetRitualMaterial(tp) - return Duel.IsExistingMatchingCard(Auxiliary.RPGFilter,tp,LOCATION_HAND,0,1,nil,filter,e,tp,mg) - end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) - end -end -function Auxiliary.RPGOperation(filter) - return function(e,tp,eg,ep,ev,re,r,rp) - local mg=Duel.GetRitualMaterial(tp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local tg=Duel.SelectMatchingCard(tp,Auxiliary.RPGFilter,tp,LOCATION_HAND,0,1,1,nil,filter,e,tp,mg) - local tc=tg:GetFirst() - if tc then - mg=mg:Filter(Card.IsCanBeRitualMaterial,tc,tc) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) - local mat=mg:SelectWithSumGreater(tp,Card.GetRitualLevel,tc:GetOriginalLevel(),tc) - tc:SetMaterial(mat) - Duel.ReleaseRitualMaterial(mat) - Duel.BreakEffect() - Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP) - tc:CompleteProcedure() - end - end -end ---Ritual Summon, equal to fixed lv -function Auxiliary.AddRitualProcEqual(c,filter) - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(Auxiliary.RPETarget(filter)) - e1:SetOperation(Auxiliary.RPEOperation(filter)) - c:RegisterEffect(e1) -end -function Auxiliary.RPEFilter(c,filter,e,tp,m) - if (filter and not filter(c)) or not c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true) then return false end - local mg=m:Filter(Card.IsCanBeRitualMaterial,c,c) - return mg:CheckWithSumEqual(Card.GetRitualLevel,c:GetOriginalLevel(),1,99,c) -end -function Auxiliary.RPETarget(filter) - return function(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local mg=Duel.GetRitualMaterial(tp) - return Duel.IsExistingMatchingCard(Auxiliary.RPEFilter,tp,LOCATION_HAND,0,1,nil,filter,e,tp,mg) - end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) - end -end -function Auxiliary.RPEOperation(filter) - return function(e,tp,eg,ep,ev,re,r,rp) - local mg=Duel.GetRitualMaterial(tp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local tg=Duel.SelectMatchingCard(tp,Auxiliary.RPEFilter,tp,LOCATION_HAND,0,1,1,nil,filter,e,tp,mg) - local tc=tg:GetFirst() - if tc then - mg=mg:Filter(Card.IsCanBeRitualMaterial,tc,tc) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) - local mat=mg:SelectWithSumEqual(tp,Card.GetRitualLevel,tc:GetOriginalLevel(),1,99,tc) - tc:SetMaterial(mat) - Duel.ReleaseRitualMaterial(mat) - Duel.BreakEffect() - Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP) - tc:CompleteProcedure() - end - end -end ---Ritual Summon, equal to monster lv -function Auxiliary.AddRitualProcEqual2(c,filter) - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(Auxiliary.RPETarget2(filter)) - e1:SetOperation(Auxiliary.RPEOperation2(filter)) - c:RegisterEffect(e1) -end -function Auxiliary.RPEFilter2(c,filter,e,tp,m) - if (filter and not filter(c)) or not c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true) then return false end - local mg=m:Filter(Card.IsCanBeRitualMaterial,c,c) - return mg:CheckWithSumEqual(Card.GetRitualLevel,c:GetLevel(),1,99,c) -end -function Auxiliary.RPETarget2(filter) - return function(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local mg=Duel.GetRitualMaterial(tp) - return Duel.IsExistingMatchingCard(Auxiliary.RPEFilter2,tp,LOCATION_HAND,0,1,nil,filter,e,tp,mg) - end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) - end -end -function Auxiliary.RPEOperation2(filter) - return function(e,tp,eg,ep,ev,re,r,rp) - local mg=Duel.GetRitualMaterial(tp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local tg=Duel.SelectMatchingCard(tp,Auxiliary.RPEFilter2,tp,LOCATION_HAND,0,1,1,nil,filter,e,tp,mg) - local tc=tg:GetFirst() - if tc then - mg=mg:Filter(Card.IsCanBeRitualMaterial,tc,tc) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) - local mat=mg:SelectWithSumEqual(tp,Card.GetRitualLevel,tc:GetLevel(),1,99,tc) - tc:SetMaterial(mat) - Duel.ReleaseRitualMaterial(mat) - Duel.BreakEffect() - Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP) - tc:CompleteProcedure() - end - end -end ---add procedure to Pendulum monster -function Auxiliary.AddPendulumProcedure(c) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC_G) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE) - e1:SetRange(LOCATION_PZONE) - e1:SetCountLimit(1,10000000) - e1:SetCondition(Auxiliary.PendCondition()) - e1:SetOperation(Auxiliary.PendOperation()) - e1:SetValue(SUMMON_TYPE_PENDULUM) - c:RegisterEffect(e1) -end -function Auxiliary.PConditionFilter(c,e,tp,lscale,rscale) - local lv=0 - if c.pendulum_level then - lv=c.pendulum_level - else - lv=c:GetLevel() - end - return (c:IsLocation(LOCATION_HAND) or (c:IsFaceup() and c:IsType(TYPE_PENDULUM))) - and lv>lscale and lvrscale then lscale,rscale=rscale,lscale end - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ft<=0 then return false end - if og then - return og:IsExists(Auxiliary.PConditionFilter,1,nil,e,tp,lscale,rscale) - else - return Duel.IsExistingMatchingCard(Auxiliary.PConditionFilter,tp,LOCATION_HAND+LOCATION_EXTRA,0,1,nil,e,tp,lscale,rscale) - end - end -end -function Auxiliary.PendOperation() - return function(e,tp,eg,ep,ev,re,r,rp,c,sg,og) - local rpz=Duel.GetFieldCard(tp,LOCATION_SZONE,7) - local lscale=c:GetLeftScale() - local rscale=rpz:GetRightScale() - if lscale>rscale then lscale,rscale=rscale,lscale end - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if og then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=og:FilterSelect(tp,Auxiliary.PConditionFilter,1,ft,nil,e,tp,lscale,rscale) - sg:Merge(g) - else - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,Auxiliary.PConditionFilter,tp,LOCATION_HAND+LOCATION_EXTRA,0,1,ft,nil,e,tp,lscale,rscale) - sg:Merge(g) - end - Duel.HintSelection(Group.FromCards(c)) - Duel.HintSelection(Group.FromCards(rpz)) - end -end ---card effect disable filter(target) -function Auxiliary.disfilter1(c) - return c:IsFaceup() and not c:IsDisabled() and (not c:IsType(TYPE_NORMAL) or bit.band(c:GetOriginalType(),TYPE_EFFECT)~=0) -end ---condition of EVENT_BATTLE_DESTROYING -function Auxiliary.bdcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsRelateToBattle() -end ---condition of EVENT_BATTLE_DESTROYING + opponent monster -function Auxiliary.bdocon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsRelateToBattle() and c:IsStatus(STATUS_OPPO_BATTLE) -end ---condition of EVENT_BATTLE_DESTROYING + to_grave -function Auxiliary.bdgcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local bc=c:GetBattleTarget() - return c:IsRelateToBattle() and bc:IsLocation(LOCATION_GRAVE) and bc:IsType(TYPE_MONSTER) -end ---condition of EVENT_BATTLE_DESTROYING + opponent monster + to_grave -function Auxiliary.bdogcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local bc=c:GetBattleTarget() - return c:IsRelateToBattle() and c:IsStatus(STATUS_OPPO_BATTLE) and bc:IsLocation(LOCATION_GRAVE) and bc:IsType(TYPE_MONSTER) -end ---condition of "cannot be negated" -function Auxiliary.nfbdncon(e) - return not e:GetHandler():IsForbidden() -end ---condition of "except the turn this card was sent to the Graveyard" -function Auxiliary.exccon(e) - return Duel.GetTurnCount()~=e:GetHandler():GetTurnID() or e:GetHandler():IsReason(REASON_RETURN) -end ---flag effect for spell counter -function Auxiliary.chainreg(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():GetFlagEffect(1)==0 then - e:GetHandler():RegisterFlagEffect(1,RESET_EVENT+0x1fc0000+RESET_CHAIN,0,1) - end -end ---default filter for EFFECT_CANNOT_BE_BATTLE_TARGET/EFFECT_MUST_BE_ATTACKED -function Auxiliary.imval1(e,c) - return not c:IsImmuneToEffect(e) -end ---default filter for EFFECT_CANNOT_BE_EFFECT_TARGET -function Auxiliary.tgval(e,re,rp) - return not re:GetHandler():IsImmuneToEffect(e) -end ---filter for EFFECT_CANNOT_BE_EFFECT_TARGET + opponent -function Auxiliary.tgoval(e,re,rp) - return rp~=e:GetHandlerPlayer() and not re:GetHandler():IsImmuneToEffect(e) -end ---filter for non-zero ATK -function Auxiliary.nzatk(c) - return c:IsFaceup() and c:GetAttack()>0 -end ---filter for non-zero DEF -function Auxiliary.nzdef(c) - return c:IsFaceup() and c:GetDefence()>0 -end ---flag effect for summon/sp_summon turn -function Auxiliary.sumreg(e,tp,eg,ep,ev,re,r,rp) - local tc=eg:GetFirst() - local code=e:GetLabel() - while tc do - if tc:GetOriginalCode()==code then - tc:RegisterFlagEffect(code,RESET_EVENT+0x1ec0000+RESET_PHASE+PHASE_END,0,1) - end - tc=eg:GetNext() - end -end ---sp_summon condition for fusion monster -function Auxiliary.fuslimit(e,se,sp,st) - return bit.band(st,SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION -end ---sp_summon condition for ritual monster -function Auxiliary.ritlimit(e,se,sp,st) - return bit.band(st,SUMMON_TYPE_RITUAL)==SUMMON_TYPE_RITUAL -end ---sp_summon condition for synchro monster -function Auxiliary.synlimit(e,se,sp,st) - return bit.band(st,SUMMON_TYPE_SYNCHRO)==SUMMON_TYPE_SYNCHRO -end ---sp_summon condition for xyz monster -function Auxiliary.xyzlimit(e,se,sp,st) - return bit.band(st,SUMMON_TYPE_XYZ)==SUMMON_TYPE_XYZ -end ---sp_summon condition for pendulum monster -function Auxiliary.penlimit(e,se,sp,st) - return bit.band(st,SUMMON_TYPE_PENDULUM)==SUMMON_TYPE_PENDULUM -end ---effects inflicting damage to tp -function Auxiliary.damcon1(e,tp,eg,ep,ev,re,r,rp) - local e1=Duel.IsPlayerAffectedByEffect(tp,EFFECT_REVERSE_DAMAGE) - local e2=Duel.IsPlayerAffectedByEffect(tp,EFFECT_REVERSE_RECOVER) - local rd=e1 and not e2 - local rr=not e1 and e2 - local ex,cg,ct,cp,cv=Duel.GetOperationInfo(ev,CATEGORY_DAMAGE) - if ex and (cp==tp or cp==PLAYER_ALL) and not rd and not Duel.IsPlayerAffectedByEffect(tp,EFFECT_NO_EFFECT_DAMAGE) then - return true - end - ex,cg,ct,cp,cv=Duel.GetOperationInfo(ev,CATEGORY_RECOVER) - return ex and (cp==tp or cp==PLAYER_ALL) and rr and not Duel.IsPlayerAffectedByEffect(tp,EFFECT_NO_EFFECT_DAMAGE) -end ---filter for the immune effetc of qli monsters -function Auxiliary.qlifilter(e,te) - if te:IsActiveType(TYPE_MONSTER) and te:IsActivated() then - local lv=e:GetHandler():GetLevel() - local ec=te:GetOwner() - if ec:IsType(TYPE_XYZ) then - return ec:GetOriginalRank()= 0: Start search automatically when the user enters N chars +auto_search_limit = -1 +#search_multiple_keywords = 0: Disable. 1: Search mutiple keywords with separator " ". 2: with separator "+" +search_multiple_keywords = 1 +ignore_deck_changes = 0 +default_ot = 1 +enable_bot_mode = 0 +bot_deck_path = ./botdeck +quick_animation = 0 +auto_save_replay = 0 +draw_single_chain = 0 +hide_player_name = 0 +prefer_expansion_script = 0 +window_maximized = 0 +window_width = 1280 +window_height = 800 +resize_popup_menu = 0 +enable_sound = 1 +enable_music = 1 +#Volume of sound and music, between 0 and 100 +sound_volume = 50 +music_volume = 50 +music_mode = 1 diff --git a/textures/bg_deck.jpg b/textures/bg_deck.jpg new file mode 100644 index 0000000000..e39b9e17bf Binary files /dev/null and b/textures/bg_deck.jpg differ diff --git a/textures/bg_menu.jpg b/textures/bg_menu.jpg new file mode 100644 index 0000000000..e39b9e17bf Binary files /dev/null and b/textures/bg_menu.jpg differ diff --git a/textures/chaintarget.png b/textures/chaintarget.png new file mode 100644 index 0000000000..a53e90a43c Binary files /dev/null and b/textures/chaintarget.png differ diff --git a/textures/cover2.jpg b/textures/cover2.jpg new file mode 100644 index 0000000000..7f2ac1e2dd Binary files /dev/null and b/textures/cover2.jpg differ diff --git a/textures/field-transparent2.png b/textures/field-transparent2.png new file mode 100644 index 0000000000..d6ba848c55 Binary files /dev/null and b/textures/field-transparent2.png differ diff --git a/textures/field-transparent3.png b/textures/field-transparent3.png new file mode 100644 index 0000000000..3b0ce77159 Binary files /dev/null and b/textures/field-transparent3.png differ diff --git a/textures/field3.png b/textures/field3.png new file mode 100644 index 0000000000..a00ecb3a73 Binary files /dev/null and b/textures/field3.png differ diff --git a/textures/lp.png b/textures/lp.png index 0d9a379106..378bc3b59c 100644 Binary files a/textures/lp.png and b/textures/lp.png differ diff --git a/textures/ot.png b/textures/ot.png new file mode 100644 index 0000000000..699c756a0a Binary files /dev/null and b/textures/ot.png differ